diff -Nrc3pad gcc-3.3.3/boehm-gc/aix_irix_threads.c gcc-3.4.0/boehm-gc/aix_irix_threads.c *** gcc-3.3.3/boehm-gc/aix_irix_threads.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/boehm-gc/aix_irix_threads.c 2003-07-28 03:46:08.000000000 +0000 *************** *** 0 **** --- 1,693 ---- + /* + * Copyright (c) 1991-1995 by Xerox Corporation. All rights reserved. + * Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved. + * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved. + * + * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED + * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. + * + * Permission is hereby granted to use or copy this program + * for any purpose, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + */ + /* + * Support code for Irix (>=6.2) Pthreads and for AIX pthreads. + * This relies on properties + * not guaranteed by the Pthread standard. It may or may not be portable + * to other implementations. + * + * Note that there is a lot of code duplication between this file and + * (pthread_support.c, pthread_stop_world.c). They should be merged. + * Pthread_support.c should be directly usable. + * + * Please avoid adding new ports here; use the generic pthread support + * as a base instead. + */ + + # if defined(GC_IRIX_THREADS) || defined(GC_AIX_THREADS) + + # include "private/gc_priv.h" + # include + # include + # include + # include + # include + # include + # include + # include + + #undef pthread_create + #undef pthread_sigmask + #undef pthread_join + + #if defined(GC_IRIX_THREADS) && !defined(MUTEX_RECURSIVE_NP) + #define MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE + #endif + + void GC_thr_init(); + + #if 0 + void GC_print_sig_mask() + { + sigset_t blocked; + int i; + + if (pthread_sigmask(SIG_BLOCK, NULL, &blocked) != 0) + ABORT("pthread_sigmask"); + GC_printf0("Blocked: "); + for (i = 1; i <= MAXSIG; i++) { + if (sigismember(&blocked, i)) { GC_printf1("%ld ",(long) i); } + } + GC_printf0("\n"); + } + #endif + + /* We use the allocation lock to protect thread-related data structures. */ + + /* The set of all known threads. We intercept thread creation and */ + /* joins. We never actually create detached threads. We allocate all */ + /* new thread stacks ourselves. These allow us to maintain this */ + /* data structure. */ + /* Protected by GC_thr_lock. */ + /* Some of this should be declared volatile, but that's incosnsistent */ + /* with some library routine declarations. */ + typedef struct GC_Thread_Rep { + struct GC_Thread_Rep * next; /* More recently allocated threads */ + /* with a given pthread id come */ + /* first. (All but the first are */ + /* guaranteed to be dead, but we may */ + /* not yet have registered the join.) */ + pthread_t id; + word stop; + # define NOT_STOPPED 0 + # define PLEASE_STOP 1 + # define STOPPED 2 + word flags; + # define FINISHED 1 /* Thread has exited. */ + # define DETACHED 2 /* Thread is intended to be detached. */ + ptr_t stack_cold; /* cold end of the stack */ + ptr_t stack_hot; /* Valid only when stopped. */ + /* But must be within stack region at */ + /* all times. */ + void * status; /* Used only to avoid premature */ + /* reclamation of any data it might */ + /* reference. */ + } * GC_thread; + + GC_thread GC_lookup_thread(pthread_t id); + + /* + * The only way to suspend threads given the pthread interface is to send + * signals. Unfortunately, this means we have to reserve + * a signal, and intercept client calls to change the signal mask. + */ + #if 0 /* DOB: 6.1 */ + # if defined(GC_AIX_THREADS) + # define SIG_SUSPEND SIGUSR1 + # else + # define SIG_SUSPEND (SIGRTMIN + 6) + # endif + #endif + + pthread_mutex_t GC_suspend_lock = PTHREAD_MUTEX_INITIALIZER; + /* Number of threads stopped so far */ + pthread_cond_t GC_suspend_ack_cv = PTHREAD_COND_INITIALIZER; + pthread_cond_t GC_continue_cv = PTHREAD_COND_INITIALIZER; + + void GC_suspend_handler(int sig) + { + int dummy; + GC_thread me; + sigset_t all_sigs; + sigset_t old_sigs; + int i; + + if (sig != SIG_SUSPEND) ABORT("Bad signal in suspend_handler"); + me = GC_lookup_thread(pthread_self()); + /* The lookup here is safe, since I'm doing this on behalf */ + /* of a thread which holds the allocation lock in order */ + /* to stop the world. Thus concurrent modification of the */ + /* data structure is impossible. */ + if (PLEASE_STOP != me -> stop) { + /* Misdirected signal. */ + pthread_mutex_unlock(&GC_suspend_lock); + return; + } + pthread_mutex_lock(&GC_suspend_lock); + me -> stack_hot = (ptr_t)(&dummy); + me -> stop = STOPPED; + pthread_cond_signal(&GC_suspend_ack_cv); + pthread_cond_wait(&GC_continue_cv, &GC_suspend_lock); + pthread_mutex_unlock(&GC_suspend_lock); + /* GC_printf1("Continuing 0x%x\n", pthread_self()); */ + } + + + GC_bool GC_thr_initialized = FALSE; + + + # define THREAD_TABLE_SZ 128 /* Must be power of 2 */ + volatile GC_thread GC_threads[THREAD_TABLE_SZ]; + + void GC_push_thread_structures GC_PROTO((void)) + { + GC_push_all((ptr_t)(GC_threads), (ptr_t)(GC_threads)+sizeof(GC_threads)); + } + + /* Add a thread to GC_threads. We assume it wasn't already there. */ + /* Caller holds allocation lock. */ + GC_thread GC_new_thread(pthread_t id) + { + int hv = ((word)id) % THREAD_TABLE_SZ; + GC_thread result; + static struct GC_Thread_Rep first_thread; + static GC_bool first_thread_used = FALSE; + + GC_ASSERT(I_HOLD_LOCK()); + if (!first_thread_used) { + result = &first_thread; + first_thread_used = TRUE; + /* Dont acquire allocation lock, since we may already hold it. */ + } else { + result = (struct GC_Thread_Rep *) + GC_generic_malloc_inner(sizeof(struct GC_Thread_Rep), NORMAL); + } + if (result == 0) return(0); + result -> id = id; + result -> next = GC_threads[hv]; + GC_threads[hv] = result; + /* result -> flags = 0; */ + /* result -> stop = 0; */ + return(result); + } + + /* Delete a thread from GC_threads. We assume it is there. */ + /* (The code intentionally traps if it wasn't.) */ + /* Caller holds allocation lock. */ + /* We explicitly pass in the GC_thread we're looking for, since */ + /* if a thread has been joined, but we have not yet */ + /* been notified, then there may be more than one thread */ + /* in the table with the same pthread id. */ + /* This is OK, but we need a way to delete a specific one. */ + void GC_delete_gc_thread(pthread_t id, GC_thread gc_id) + { + int hv = ((word)id) % THREAD_TABLE_SZ; + register GC_thread p = GC_threads[hv]; + register GC_thread prev = 0; + + GC_ASSERT(I_HOLD_LOCK()); + while (p != gc_id) { + prev = p; + p = p -> next; + } + if (prev == 0) { + GC_threads[hv] = p -> next; + } else { + prev -> next = p -> next; + } + } + + /* Return a GC_thread corresponding to a given thread_t. */ + /* Returns 0 if it's not there. */ + /* Caller holds allocation lock or otherwise inhibits */ + /* updates. */ + /* If there is more than one thread with the given id we */ + /* return the most recent one. */ + GC_thread GC_lookup_thread(pthread_t id) + { + int hv = ((word)id) % THREAD_TABLE_SZ; + register GC_thread p = GC_threads[hv]; + + /* I either hold the lock, or i'm being called from the stop-the-world + * handler. */ + #if defined(GC_AIX_THREADS) + GC_ASSERT(I_HOLD_LOCK()); /* no stop-the-world handler needed on AIX */ + #endif + while (p != 0 && !pthread_equal(p -> id, id)) p = p -> next; + return(p); + } + + #if defined(GC_AIX_THREADS) + void GC_stop_world() + { + pthread_t my_thread = pthread_self(); + register int i; + register GC_thread p; + register int result; + struct timespec timeout; + + GC_ASSERT(I_HOLD_LOCK()); + for (i = 0; i < THREAD_TABLE_SZ; i++) { + for (p = GC_threads[i]; p != 0; p = p -> next) { + if (p -> id != my_thread) { + pthread_suspend_np(p->id); + } + } + } + /* GC_printf1("World stopped 0x%x\n", pthread_self()); */ + } + + void GC_start_world() + { + GC_thread p; + unsigned i; + pthread_t my_thread = pthread_self(); + + /* GC_printf0("World starting\n"); */ + GC_ASSERT(I_HOLD_LOCK()); + for (i = 0; i < THREAD_TABLE_SZ; i++) { + for (p = GC_threads[i]; p != 0; p = p -> next) { + if (p -> id != my_thread) { + pthread_continue_np(p->id); + } + } + } + } + + #else /* GC_AIX_THREADS */ + + /* Caller holds allocation lock. */ + void GC_stop_world() + { + pthread_t my_thread = pthread_self(); + register int i; + register GC_thread p; + register int result; + struct timespec timeout; + + GC_ASSERT(I_HOLD_LOCK()); + for (i = 0; i < THREAD_TABLE_SZ; i++) { + for (p = GC_threads[i]; p != 0; p = p -> next) { + if (p -> id != my_thread) { + if (p -> flags & FINISHED) { + p -> stop = STOPPED; + continue; + } + p -> stop = PLEASE_STOP; + result = pthread_kill(p -> id, SIG_SUSPEND); + /* GC_printf1("Sent signal to 0x%x\n", p -> id); */ + switch(result) { + case ESRCH: + /* Not really there anymore. Possible? */ + p -> stop = STOPPED; + break; + case 0: + break; + default: + ABORT("pthread_kill failed"); + } + } + } + } + pthread_mutex_lock(&GC_suspend_lock); + for (i = 0; i < THREAD_TABLE_SZ; i++) { + for (p = GC_threads[i]; p != 0; p = p -> next) { + while (p -> id != my_thread && p -> stop != STOPPED) { + clock_gettime(CLOCK_REALTIME, &timeout); + timeout.tv_nsec += 50000000; /* 50 msecs */ + if (timeout.tv_nsec >= 1000000000) { + timeout.tv_nsec -= 1000000000; + ++timeout.tv_sec; + } + result = pthread_cond_timedwait(&GC_suspend_ack_cv, + &GC_suspend_lock, + &timeout); + if (result == ETIMEDOUT) { + /* Signal was lost or misdirected. Try again. */ + /* Duplicate signals should be benign. */ + result = pthread_kill(p -> id, SIG_SUSPEND); + } + } + } + } + pthread_mutex_unlock(&GC_suspend_lock); + /* GC_printf1("World stopped 0x%x\n", pthread_self()); */ + } + + /* Caller holds allocation lock. */ + void GC_start_world() + { + GC_thread p; + unsigned i; + + /* GC_printf0("World starting\n"); */ + GC_ASSERT(I_HOLD_LOCK()); + for (i = 0; i < THREAD_TABLE_SZ; i++) { + for (p = GC_threads[i]; p != 0; p = p -> next) { + p -> stop = NOT_STOPPED; + } + } + pthread_mutex_lock(&GC_suspend_lock); + /* All other threads are at pthread_cond_wait in signal handler. */ + /* Otherwise we couldn't have acquired the lock. */ + pthread_mutex_unlock(&GC_suspend_lock); + pthread_cond_broadcast(&GC_continue_cv); + } + + #endif /* GC_AIX_THREADS */ + + + /* We hold allocation lock. Should do exactly the right thing if the */ + /* world is stopped. Should not fail if it isn't. */ + void GC_push_all_stacks() + { + register int i; + register GC_thread p; + register ptr_t hot, cold; + pthread_t me = pthread_self(); + + /* GC_init() should have been called before GC_push_all_stacks is + * invoked, and GC_init calls GC_thr_init(), which sets + * GC_thr_initialized. */ + GC_ASSERT(GC_thr_initialized); + + /* GC_printf1("Pushing stacks from thread 0x%x\n", me); */ + GC_ASSERT(I_HOLD_LOCK()); + for (i = 0; i < THREAD_TABLE_SZ; i++) { + for (p = GC_threads[i]; p != 0; p = p -> next) { + if (p -> flags & FINISHED) continue; + cold = p->stack_cold; + if (!cold) cold=GC_stackbottom; /* 0 indicates 'original stack' */ + if (pthread_equal(p -> id, me)) { + hot = GC_approx_sp(); + } else { + # ifdef GC_AIX_THREADS + /* AIX doesn't use signals to suspend, so we need to get an */ + /* accurate hot stack pointer. */ + /* See http://publib16.boulder.ibm.com/pseries/en_US/libs/basetrf1/pthread_getthrds_np.htm */ + pthread_t id = p -> id; + struct __pthrdsinfo pinfo; + int regbuf[64]; + int val = sizeof(regbuf); + int retval = pthread_getthrds_np(&id, PTHRDSINFO_QUERY_ALL, &pinfo, + sizeof(pinfo), regbuf, &val); + if (retval != 0) { + printf("ERROR: pthread_getthrds_np() failed in GC\n"); + abort(); + } + /* according to the AIX ABI, + "the lowest possible valid stack address is 288 bytes (144 + 144) + less than the current value of the stack pointer. Functions may + use this stack space as volatile storage which is not preserved + across function calls." + ftp://ftp.penguinppc64.org/pub/people/amodra/PPC-elf64abi.txt.gz + */ + hot = (ptr_t)(unsigned long)pinfo.__pi_ustk-288; + cold = (ptr_t)pinfo.__pi_stackend; /* more precise */ + /* push the registers too, because they won't be on stack */ + GC_push_all_eager((ptr_t)&pinfo.__pi_context, + (ptr_t)((&pinfo.__pi_context)+1)); + GC_push_all_eager((ptr_t)regbuf, ((ptr_t)regbuf)+val); + # else + hot = p -> stack_hot; + # endif + } + # ifdef STACK_GROWS_UP + GC_push_all_stack(cold, hot); + # else + /* printf("thread 0x%x: hot=0x%08x cold=0x%08x\n", p -> id, hot, cold); */ + GC_push_all_stack(hot, cold); + # endif + } + } + } + + + /* We hold the allocation lock. */ + void GC_thr_init() + { + GC_thread t; + struct sigaction act; + + if (GC_thr_initialized) return; + #if 0 + /* unfortunately, GC_init_inner calls us without the lock, so + * this assertion is not always true. */ + /* Why doesn't GC_init_inner hold the lock? - HB */ + GC_ASSERT(I_HOLD_LOCK()); + #endif + GC_thr_initialized = TRUE; + #ifndef GC_AIX_THREADS + (void) sigaction(SIG_SUSPEND, 0, &act); + if (act.sa_handler != SIG_DFL) + ABORT("Previously installed SIG_SUSPEND handler"); + /* Install handler. */ + act.sa_handler = GC_suspend_handler; + act.sa_flags = SA_RESTART; + (void) sigemptyset(&act.sa_mask); + if (0 != sigaction(SIG_SUSPEND, &act, 0)) + ABORT("Failed to install SIG_SUSPEND handler"); + #endif + /* Add the initial thread, so we can stop it. */ + t = GC_new_thread(pthread_self()); + /* use '0' to indicate GC_stackbottom, since GC_init() has not + * completed by the time we are called (from GC_init_inner()) */ + t -> stack_cold = 0; /* the original stack. */ + t -> stack_hot = (ptr_t)(&t); + t -> flags = DETACHED; + } + + int GC_pthread_sigmask(int how, const sigset_t *set, sigset_t *oset) + { + sigset_t fudged_set; + + #ifdef GC_AIX_THREADS + return(pthread_sigmask(how, set, oset)); + #endif + + if (set != NULL && (how == SIG_BLOCK || how == SIG_SETMASK)) { + fudged_set = *set; + sigdelset(&fudged_set, SIG_SUSPEND); + set = &fudged_set; + } + return(pthread_sigmask(how, set, oset)); + } + + struct start_info { + void *(*start_routine)(void *); + void *arg; + word flags; + pthread_mutex_t registeredlock; + pthread_cond_t registered; + int volatile registereddone; + }; + + void GC_thread_exit_proc(void *arg) + { + GC_thread me; + + LOCK(); + me = GC_lookup_thread(pthread_self()); + me -> flags |= FINISHED; + /* reclaim DETACHED thread right away; otherwise wait until join() */ + if (me -> flags & DETACHED) { + GC_delete_gc_thread(pthread_self(), me); + } + UNLOCK(); + } + + int GC_pthread_join(pthread_t thread, void **retval) + { + int result; + GC_thread thread_gc_id; + + LOCK(); + thread_gc_id = GC_lookup_thread(thread); + /* This is guaranteed to be the intended one, since the thread id */ + /* cant have been recycled by pthreads. */ + UNLOCK(); + GC_ASSERT(!(thread_gc_id->flags & DETACHED)); + result = pthread_join(thread, retval); + /* Some versions of the Irix pthreads library can erroneously */ + /* return EINTR when the call succeeds. */ + if (EINTR == result) result = 0; + GC_ASSERT(thread_gc_id->flags & FINISHED); + LOCK(); + /* Here the pthread thread id may have been recycled. */ + GC_delete_gc_thread(thread, thread_gc_id); + UNLOCK(); + return result; + } + + void * GC_start_routine(void * arg) + { + int dummy; + struct start_info * si = arg; + void * result; + GC_thread me; + pthread_t my_pthread; + void *(*start)(void *); + void *start_arg; + + my_pthread = pthread_self(); + /* If a GC occurs before the thread is registered, that GC will */ + /* ignore this thread. That's fine, since it will block trying to */ + /* acquire the allocation lock, and won't yet hold interesting */ + /* pointers. */ + LOCK(); + /* We register the thread here instead of in the parent, so that */ + /* we don't need to hold the allocation lock during pthread_create. */ + /* Holding the allocation lock there would make REDIRECT_MALLOC */ + /* impossible. It probably still doesn't work, but we're a little */ + /* closer ... */ + /* This unfortunately means that we have to be careful the parent */ + /* doesn't try to do a pthread_join before we're registered. */ + me = GC_new_thread(my_pthread); + me -> flags = si -> flags; + me -> stack_cold = (ptr_t) &dummy; /* this now the 'start of stack' */ + me -> stack_hot = me->stack_cold;/* this field should always be sensible */ + UNLOCK(); + start = si -> start_routine; + start_arg = si -> arg; + + pthread_mutex_lock(&(si->registeredlock)); + si->registereddone = 1; + pthread_cond_signal(&(si->registered)); + pthread_mutex_unlock(&(si->registeredlock)); + /* si went away as soon as we did this unlock */ + + pthread_cleanup_push(GC_thread_exit_proc, 0); + result = (*start)(start_arg); + me -> status = result; + pthread_cleanup_pop(1); + /* This involves acquiring the lock, ensuring that we can't exit */ + /* while a collection that thinks we're alive is trying to stop */ + /* us. */ + return(result); + } + + int + GC_pthread_create(pthread_t *new_thread, + const pthread_attr_t *attr, + void *(*start_routine)(void *), void *arg) + { + int result; + GC_thread t; + int detachstate; + word my_flags = 0; + struct start_info * si; + /* This is otherwise saved only in an area mmapped by the thread */ + /* library, which isn't visible to the collector. */ + + LOCK(); + /* GC_INTERNAL_MALLOC implicitly calls GC_init() if required */ + si = (struct start_info *)GC_INTERNAL_MALLOC(sizeof(struct start_info), + NORMAL); + GC_ASSERT(GC_thr_initialized); /* initialized by GC_init() */ + UNLOCK(); + if (0 == si) return(ENOMEM); + pthread_mutex_init(&(si->registeredlock), NULL); + pthread_cond_init(&(si->registered),NULL); + pthread_mutex_lock(&(si->registeredlock)); + si -> start_routine = start_routine; + si -> arg = arg; + + pthread_attr_getdetachstate(attr, &detachstate); + if (PTHREAD_CREATE_DETACHED == detachstate) my_flags |= DETACHED; + si -> flags = my_flags; + result = pthread_create(new_thread, attr, GC_start_routine, si); + + /* Wait until child has been added to the thread table. */ + /* This also ensures that we hold onto si until the child is done */ + /* with it. Thus it doesn't matter whether it is otherwise */ + /* visible to the collector. */ + + if (0 == result) { + si->registereddone = 0; + while (!si->registereddone) + pthread_cond_wait(&(si->registered), &(si->registeredlock)); + } + pthread_mutex_unlock(&(si->registeredlock)); + + pthread_cond_destroy(&(si->registered)); + pthread_mutex_destroy(&(si->registeredlock)); + LOCK(); + GC_INTERNAL_FREE(si); + UNLOCK(); + + return(result); + } + + /* For now we use the pthreads locking primitives on HP/UX */ + + VOLATILE GC_bool GC_collecting = 0; /* A hint that we're in the collector and */ + /* holding the allocation lock for an */ + /* extended period. */ + + /* Reasonably fast spin locks. Basically the same implementation */ + /* as STL alloc.h. */ + + #define SLEEP_THRESHOLD 3 + + volatile unsigned int GC_allocate_lock = 0; + #define GC_TRY_LOCK() !GC_test_and_set(&GC_allocate_lock) + #define GC_LOCK_TAKEN GC_allocate_lock + + void GC_lock() + { + # define low_spin_max 30 /* spin cycles if we suspect uniprocessor */ + # define high_spin_max 1000 /* spin cycles for multiprocessor */ + static unsigned spin_max = low_spin_max; + unsigned my_spin_max; + static unsigned last_spins = 0; + unsigned my_last_spins; + volatile unsigned junk; + # define PAUSE junk *= junk; junk *= junk; junk *= junk; junk *= junk + int i; + + if (GC_TRY_LOCK()) { + return; + } + junk = 0; + my_spin_max = spin_max; + my_last_spins = last_spins; + for (i = 0; i < my_spin_max; i++) { + if (GC_collecting) goto yield; + if (i < my_last_spins/2 || GC_LOCK_TAKEN) { + PAUSE; + continue; + } + if (GC_TRY_LOCK()) { + /* + * got it! + * Spinning worked. Thus we're probably not being scheduled + * against the other process with which we were contending. + * Thus it makes sense to spin longer the next time. + */ + last_spins = i; + spin_max = high_spin_max; + return; + } + } + /* We are probably being scheduled against the other process. Sleep. */ + spin_max = low_spin_max; + yield: + for (i = 0;; ++i) { + if (GC_TRY_LOCK()) { + return; + } + if (i < SLEEP_THRESHOLD) { + sched_yield(); + } else { + struct timespec ts; + + if (i > 26) i = 26; + /* Don't wait for more than about 60msecs, even */ + /* under extreme contention. */ + ts.tv_sec = 0; + ts.tv_nsec = 1 << i; + nanosleep(&ts, 0); + } + } + } + + # else /* !GC_IRIX_THREADS && !GC_AIX_THREADS */ + + #ifndef LINT + int GC_no_Irix_threads; + #endif + + # endif /* IRIX_THREADS */ + diff -Nrc3pad gcc-3.3.3/boehm-gc/allchblk.c gcc-3.4.0/boehm-gc/allchblk.c *** gcc-3.3.3/boehm-gc/allchblk.c 2002-04-09 00:39:15.000000000 +0000 --- gcc-3.4.0/boehm-gc/allchblk.c 2003-07-28 04:18:20.000000000 +0000 *************** GC_bool GC_use_entire_heap = 0; *** 47,58 **** struct hblk * GC_hblkfreelist[N_HBLK_FLS+1] = { 0 }; #ifndef USE_MUNMAP word GC_free_bytes[N_HBLK_FLS+1] = { 0 }; /* Number of free bytes on each list. */ /* Is bytes + the number of free bytes on lists n .. N_HBLK_FLS */ /* > GC_max_large_allocd_bytes? */ ! GC_bool GC_enough_large_bytes_left(bytes,n) word bytes; int n; { --- 47,62 ---- struct hblk * GC_hblkfreelist[N_HBLK_FLS+1] = { 0 }; #ifndef USE_MUNMAP + word GC_free_bytes[N_HBLK_FLS+1] = { 0 }; /* Number of free bytes on each list. */ /* Is bytes + the number of free bytes on lists n .. N_HBLK_FLS */ /* > GC_max_large_allocd_bytes? */ ! # ifdef __GNUC__ ! __inline__ ! # endif ! static GC_bool GC_enough_large_bytes_left(bytes,n) word bytes; int n; { *************** int n; *** 583,593 **** if (!GC_use_entire_heap && size_avail != size_needed && USED_HEAP_SIZE >= GC_requested_heapsize ! && !GC_incremental && GC_should_collect()) { # ifdef USE_MUNMAP continue; # else ! /* If we enough large blocks left to cover any */ /* previous request for large blocks, we go ahead */ /* and split. Assuming a steady state, that should */ /* be safe. It means that we can use the full */ --- 587,597 ---- if (!GC_use_entire_heap && size_avail != size_needed && USED_HEAP_SIZE >= GC_requested_heapsize ! && !TRUE_INCREMENTAL && GC_should_collect()) { # ifdef USE_MUNMAP continue; # else ! /* If we have enough large blocks left to cover any */ /* previous request for large blocks, we go ahead */ /* and split. Assuming a steady state, that should */ /* be safe. It means that we can use the full */ *************** int n; *** 595,600 **** --- 599,610 ---- if (!GC_enough_large_bytes_left(GC_large_allocd_bytes, n)) { continue; } + /* If we are deallocating lots of memory from */ + /* finalizers, fail and collect sooner rather */ + /* than later. */ + if (GC_finalizer_mem_freed > (GC_heapsize >> 4)) { + continue; + } # endif /* !USE_MUNMAP */ } /* If the next heap block is obviously better, go on. */ diff -Nrc3pad gcc-3.3.3/boehm-gc/alloc.c gcc-3.4.0/boehm-gc/alloc.c *** gcc-3.3.3/boehm-gc/alloc.c 2003-03-04 06:38:30.000000000 +0000 --- gcc-3.4.0/boehm-gc/alloc.c 2003-07-28 04:18:20.000000000 +0000 *************** int GC_full_freq = 19; /* Every 20th *** 72,77 **** --- 72,84 ---- GC_bool GC_need_full_gc = FALSE; /* Need full GC do to heap growth. */ + #ifdef THREADS + GC_bool GC_world_stopped = FALSE; + # define IF_THREADS(x) x + #else + # define IF_THREADS(x) + #endif + word GC_used_heap_size_after_full = 0; char * GC_copyright[] = *************** static word min_words_allocd() *** 160,166 **** + (GC_large_free_bytes >> 2) /* use a bit more of large empty heap */ + total_root_size); ! if (GC_incremental) { return scan_size / (2 * GC_free_space_divisor); } else { return scan_size / GC_free_space_divisor; --- 167,173 ---- + (GC_large_free_bytes >> 2) /* use a bit more of large empty heap */ + total_root_size); ! if (TRUE_INCREMENTAL) { return scan_size / (2 * GC_free_space_divisor); } else { return scan_size / GC_free_space_divisor; *************** word GC_adj_words_allocd() *** 182,188 **** /* managed object should not alter result, assuming the client */ /* is playing by the rules. */ result = (signed_word)GC_words_allocd ! - (signed_word)GC_mem_freed - expl_managed; if (result > (signed_word)GC_words_allocd) { result = GC_words_allocd; /* probably client bug or unfortunate scheduling */ --- 189,196 ---- /* managed object should not alter result, assuming the client */ /* is playing by the rules. */ result = (signed_word)GC_words_allocd ! - (signed_word)GC_mem_freed ! + (signed_word)GC_finalizer_mem_freed - expl_managed; if (result > (signed_word)GC_words_allocd) { result = GC_words_allocd; /* probably client bug or unfortunate scheduling */ *************** void GC_maybe_gc() *** 250,256 **** if (GC_should_collect()) { if (!GC_incremental) { - GC_notify_full_gc(); GC_gcollect_inner(); n_partial_gcs = 0; return; --- 258,263 ---- *************** void GC_maybe_gc() *** 302,311 **** --- 309,322 ---- /* * Stop the world garbage collection. Assumes lock held, signals disabled. * If stop_func is not GC_never_stop_func, then abort if stop_func returns TRUE. + * Return TRUE if we successfully completed the collection. */ GC_bool GC_try_to_collect_inner(stop_func) GC_stop_func stop_func; { + # ifdef CONDPRINT + CLOCK_TYPE start_time, current_time; + # endif if (GC_dont_gc) return FALSE; if (GC_incremental && GC_collection_in_progress()) { # ifdef CONDPRINT *************** GC_stop_func stop_func; *** 320,327 **** --- 331,340 ---- GC_collect_a_little_inner(1); } } + if (stop_func == GC_never_stop_func) GC_notify_full_gc(); # ifdef CONDPRINT if (GC_print_stats) { + if (GC_print_stats) GET_TIME(start_time); GC_printf2( "Initiating full world-stop collection %lu after %ld allocd bytes\n", (unsigned long) GC_gc_no+1, *************** GC_stop_func stop_func; *** 360,365 **** --- 373,385 ---- return(FALSE); } GC_finish_collection(); + # if defined(CONDPRINT) + if (GC_print_stats) { + GET_TIME(current_time); + GC_printf1("Complete collection took %lu msecs\n", + MS_TIME_DIFF(current_time,start_time)); + } + # endif return(TRUE); } *************** int GC_collect_a_little GC_PROTO(()) *** 430,435 **** --- 450,456 ---- result = (int)GC_collection_in_progress(); UNLOCK(); ENABLE_SIGNALS(); + if (!result && GC_debugging_started) GC_print_all_smashed(); return(result); } *************** GC_stop_func stop_func; *** 448,463 **** CLOCK_TYPE start_time, current_time; # endif - # if defined(REGISTER_LIBRARIES_EARLY) - GC_cond_register_dynamic_libraries(); - # endif - STOP_WORLD(); # ifdef PRINTTIMES GET_TIME(start_time); # endif # if defined(CONDPRINT) && !defined(PRINTTIMES) if (GC_print_stats) GET_TIME(start_time); # endif # ifdef CONDPRINT if (GC_print_stats) { GC_printf1("--> Marking for collection %lu ", --- 469,485 ---- CLOCK_TYPE start_time, current_time; # endif # ifdef PRINTTIMES GET_TIME(start_time); # endif # if defined(CONDPRINT) && !defined(PRINTTIMES) if (GC_print_stats) GET_TIME(start_time); # endif + # if defined(REGISTER_LIBRARIES_EARLY) + GC_cond_register_dynamic_libraries(); + # endif + STOP_WORLD(); + IF_THREADS(GC_world_stopped = TRUE); # ifdef CONDPRINT if (GC_print_stats) { GC_printf1("--> Marking for collection %lu ", *************** GC_stop_func stop_func; *** 488,493 **** --- 510,516 ---- } # endif GC_deficit = i; /* Give the mutator a chance. */ + IF_THREADS(GC_world_stopped = FALSE); START_WORLD(); return(FALSE); } *************** GC_stop_func stop_func; *** 521,526 **** --- 544,551 ---- (*GC_check_heap)(); } + IF_THREADS(GC_world_stopped = FALSE); + START_WORLD(); # ifdef PRINTTIMES GET_TIME(current_time); GC_printf1("World-stopped marking took %lu msecs\n", *************** GC_stop_func stop_func; *** 534,540 **** } # endif # endif - START_WORLD(); return(TRUE); } --- 559,564 ---- *************** void GC_finish_collection() *** 611,616 **** --- 635,641 ---- GC_print_address_map(); } # endif + COND_DUMP; if (GC_find_leak) { /* Mark all objects on the free list. All objects should be */ /* marked when we're done. */ *************** void GC_finish_collection() *** 707,712 **** --- 732,738 ---- GC_words_allocd = 0; GC_words_wasted = 0; GC_mem_freed = 0; + GC_finalizer_mem_freed = 0; # ifdef USE_MUNMAP GC_unmap_old(); *************** void GC_finish_collection() *** 730,735 **** --- 756,762 ---- int result; DCL_LOCK_STATE; + if (GC_debugging_started) GC_print_all_smashed(); GC_INVOKE_FINALIZERS(); DISABLE_SIGNALS(); LOCK(); *************** void GC_finish_collection() *** 741,754 **** EXIT_GC(); UNLOCK(); ENABLE_SIGNALS(); ! if(result) GC_INVOKE_FINALIZERS(); return(result); } void GC_gcollect GC_PROTO(()) { - GC_notify_full_gc(); (void)GC_try_to_collect(GC_never_stop_func); } word GC_n_heap_sects = 0; /* Number of sections currently in heap. */ --- 768,784 ---- EXIT_GC(); UNLOCK(); ENABLE_SIGNALS(); ! if(result) { ! if (GC_debugging_started) GC_print_all_smashed(); ! GC_INVOKE_FINALIZERS(); ! } return(result); } void GC_gcollect GC_PROTO(()) { (void)GC_try_to_collect(GC_never_stop_func); + if (GC_have_errors) GC_print_all_errors(); } word GC_n_heap_sects = 0; /* Number of sections currently in heap. */ *************** GC_bool ignore_off_page; *** 950,956 **** { if (!GC_incremental && !GC_dont_gc && (GC_dont_expand && GC_words_allocd > 0 || GC_should_collect())) { - GC_notify_full_gc(); GC_gcollect_inner(); } else { word blocks_to_get = GC_heapsize/(HBLKSIZE*GC_free_space_divisor) --- 980,985 ---- *************** GC_bool ignore_off_page; *** 975,981 **** && !GC_expand_hp_inner(needed_blocks)) { if (GC_fail_count++ < GC_max_retries) { WARN("Out of Memory! Trying to continue ...\n", 0); - GC_notify_full_gc(); GC_gcollect_inner(); } else { # if !defined(AMIGA) || !defined(GC_AMIGA_FASTALLOC) --- 1004,1009 ---- *************** ptr_t GC_allocobj(sz, kind) *** 1005,1033 **** word sz; int kind; { ! register ptr_t * flh = &(GC_obj_kinds[kind].ok_freelist[sz]); if (sz == 0) return(0); while (*flh == 0) { ENTER_GC(); /* Do our share of marking work */ ! if(GC_incremental && !GC_dont_gc) GC_collect_a_little_inner(1); /* Sweep blocks for objects of this size */ ! GC_continue_reclaim(sz, kind); EXIT_GC(); if (*flh == 0) { GC_new_hblk(sz, kind); } if (*flh == 0) { ENTER_GC(); ! if (!GC_collect_or_expand((word)1,FALSE)) { EXIT_GC(); return(0); } EXIT_GC(); } } return(*flh); } --- 1033,1070 ---- word sz; int kind; { ! ptr_t * flh = &(GC_obj_kinds[kind].ok_freelist[sz]); ! GC_bool tried_minor = FALSE; if (sz == 0) return(0); while (*flh == 0) { ENTER_GC(); /* Do our share of marking work */ ! if(TRUE_INCREMENTAL) GC_collect_a_little_inner(1); /* Sweep blocks for objects of this size */ ! GC_continue_reclaim(sz, kind); EXIT_GC(); if (*flh == 0) { GC_new_hblk(sz, kind); } if (*flh == 0) { ENTER_GC(); ! if (GC_incremental && GC_time_limit == GC_TIME_UNLIMITED ! && ! tried_minor ) { ! GC_collect_a_little_inner(1); ! tried_minor = TRUE; ! } else { ! if (!GC_collect_or_expand((word)1,FALSE)) { EXIT_GC(); return(0); + } } EXIT_GC(); } } + /* Successful allocation; reset failure count. */ + GC_fail_count = 0; return(*flh); } diff -Nrc3pad gcc-3.3.3/boehm-gc/alpha_mach_dep.s gcc-3.4.0/boehm-gc/alpha_mach_dep.s *** gcc-3.3.3/boehm-gc/alpha_mach_dep.s 2001-08-17 18:30:45.000000000 +0000 --- gcc-3.4.0/boehm-gc/alpha_mach_dep.s 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,86 **** - .arch ev6 - - .text - .align 4 - .globl GC_push_regs - .ent GC_push_regs 2 - GC_push_regs: - ldgp $gp, 0($27) - lda $sp, -16($sp) - stq $26, 0($sp) - .mask 0x04000000, 0 - .frame $sp, 16, $26, 0 - - # $0 integer result - # $1-$8 temp regs - not preserved cross calls - # $9-$15 call saved regs - # $16-$21 argument regs - not preserved cross calls - # $22-$28 temp regs - not preserved cross calls - # $29 global pointer - not preserved cross calls - # $30 stack pointer - - # define call_push(x) \ - mov x, $16; \ - jsr $26, GC_push_one; \ - ldgp $gp, 0($26) - - call_push($9) - call_push($10) - call_push($11) - call_push($12) - call_push($13) - call_push($14) - call_push($15) - - # $f0-$f1 floating point results - # $f2-$f9 call saved regs - # $f10-$f30 temp regs - not preserved cross calls - - # Use the most efficient transfer method for this hardware. - # Bit 1 detects the FIX extension, which includes ftoit. - amask 2, $0 - bne $0, $use_stack - - #undef call_push - #define call_push(x) \ - ftoit x, $16; \ - jsr $26, GC_push_one; \ - ldgp $gp, 0($26) - - call_push($f2) - call_push($f3) - call_push($f4) - call_push($f5) - call_push($f6) - call_push($f7) - call_push($f8) - call_push($f9) - - ldq $26, 0($sp) - lda $sp, 16($sp) - ret $31, ($26), 1 - - .align 4 - $use_stack: - - #undef call_push - #define call_push(x) \ - stt x, 8($sp); \ - ldq $16, 8($sp); \ - jsr $26, GC_push_one; \ - ldgp $gp, 0($26) - - call_push($f2) - call_push($f3) - call_push($f4) - call_push($f5) - call_push($f6) - call_push($f7) - call_push($f8) - call_push($f9) - - ldq $26, 0($sp) - lda $sp, 16($sp) - ret $31, ($26), 1 - - .end GC_push_regs --- 0 ---- diff -Nrc3pad gcc-3.3.3/boehm-gc/alpha_mach_dep.S gcc-3.4.0/boehm-gc/alpha_mach_dep.S *** gcc-3.3.3/boehm-gc/alpha_mach_dep.S 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/boehm-gc/alpha_mach_dep.S 2003-07-28 03:46:09.000000000 +0000 *************** *** 0 **** --- 1,87 ---- + # $Id: alpha_mach_dep.s,v 1.2 1993/01/18 22:54:51 dosser Exp $ + .arch ev6 + + .text + .align 4 + .globl GC_push_regs + .ent GC_push_regs 2 + GC_push_regs: + ldgp $gp, 0($27) + lda $sp, -16($sp) + stq $26, 0($sp) + .mask 0x04000000, 0 + .frame $sp, 16, $26, 0 + + # $0 integer result + # $1-$8 temp regs - not preserved cross calls + # $9-$15 call saved regs + # $16-$21 argument regs - not preserved cross calls + # $22-$28 temp regs - not preserved cross calls + # $29 global pointer - not preserved cross calls + # $30 stack pointer + + # define call_push(x) \ + mov x, $16; \ + jsr $26, GC_push_one; \ + ldgp $gp, 0($26) + + call_push($9) + call_push($10) + call_push($11) + call_push($12) + call_push($13) + call_push($14) + call_push($15) + + # $f0-$f1 floating point results + # $f2-$f9 call saved regs + # $f10-$f30 temp regs - not preserved cross calls + + # Use the most efficient transfer method for this hardware. + # Bit 1 detects the FIX extension, which includes ftoit. + amask 2, $0 + bne $0, $use_stack + + #undef call_push + #define call_push(x) \ + ftoit x, $16; \ + jsr $26, GC_push_one; \ + ldgp $gp, 0($26) + + call_push($f2) + call_push($f3) + call_push($f4) + call_push($f5) + call_push($f6) + call_push($f7) + call_push($f8) + call_push($f9) + + ldq $26, 0($sp) + lda $sp, 16($sp) + ret $31, ($26), 1 + + .align 4 + $use_stack: + + #undef call_push + #define call_push(x) \ + stt x, 8($sp); \ + ldq $16, 8($sp); \ + jsr $26, GC_push_one; \ + ldgp $gp, 0($26) + + call_push($f2) + call_push($f3) + call_push($f4) + call_push($f5) + call_push($f6) + call_push($f7) + call_push($f8) + call_push($f9) + + ldq $26, 0($sp) + lda $sp, 16($sp) + ret $31, ($26), 1 + + .end GC_push_regs diff -Nrc3pad gcc-3.3.3/boehm-gc/backgraph.c gcc-3.4.0/boehm-gc/backgraph.c *** gcc-3.3.3/boehm-gc/backgraph.c 2002-01-31 02:48:45.000000000 +0000 --- gcc-3.4.0/boehm-gc/backgraph.c 2003-07-28 04:18:20.000000000 +0000 *************** static void add_back_edges(ptr_t p, word *** 307,312 **** --- 307,313 ---- } while (currentp < (word *)(p + gc_descr)) { word current = *currentp++; + FIXUP_POINTER(current); if (current >= (word)GC_least_plausible_heap_addr && current <= (word)GC_greatest_plausible_heap_addr) { ptr_t target = GC_base((GC_PTR)current); diff -Nrc3pad gcc-3.3.3/boehm-gc/BCC_MAKEFILE gcc-3.4.0/boehm-gc/BCC_MAKEFILE *** gcc-3.3.3/boehm-gc/BCC_MAKEFILE 2001-08-17 18:30:44.000000000 +0000 --- gcc-3.4.0/boehm-gc/BCC_MAKEFILE 2003-07-28 04:18:19.000000000 +0000 *************** *** 1,29 **** ! # Makefile for Borland C++ 4.5 on NT ! # For Borland 5.0, replace bc45 by bc5. # If you have the Borland assembler, remove "-DUSE_GENERIC" # ! bc= c:\bc45 ! bcbin= $(bc)\bin ! bclib= $(bc)\lib bcinclude= $(bc)\include ! cc= $(bcbin)\bcc32 ! rc= $(bcbin)\brc32 ! lib= $(bcbin)\tlib ! link= $(bcbin)\tlink32 ! cflags= -R -v -vi -H -H=gc.csm -I$(bcinclude);cord -L$(bclib) \ ! -w-pro -w-aus -w-par -w-ccc -w-rch -a4 -D__STDC__=0 #defines= -DSILENT ! defines= -DSMALL_CONFIG -DSILENT -DALL_INTERIOR_POINTERS -DUSE_GENERIC .c.obj: $(cc) @&&| ! $(cdebug) $(cflags) $(cvars) $(defines) -o$* -c $*.c | .cpp.obj: $(cc) @&&| ! $(cdebug) $(cflags) $(cvars) $(defines) -o$* -c $*.cpp | .rc.res: --- 1,31 ---- ! # Makefile for Borland C++ 5.5 on NT # If you have the Borland assembler, remove "-DUSE_GENERIC" # ! bc= c:\Borland\BCC55 ! bcbin= $(bc)\bin ! bclib= $(bc)\lib bcinclude= $(bc)\include ! gcinclude1 = $(bc)\gc6.2\include ! gcinclude2 = $(bc)\gc6.2\cord ! ! cc= $(bcbin)\bcc32 ! rc= $(bcbin)\brc32 ! lib= $(bcbin)\tlib ! link= $(bcbin)\ilink32 ! cflags= -O2 -R -v- -vi -H -H=gc.csm -I$(bcinclude);$(gcinclude1);$(gcinclude2) -L$(bclib) \ ! -w-pro -w-aus -w-par -w-ccc -w-rch -a4 -D__STDC__=0 #defines= -DSILENT ! defines= -DSMALL_CONFIG -DSILENT -DALL_INTERIOR_POINTERS -DUSE_GENERIC -DNO_GETENV -DJAVA_FINALIZATION -DGC_OPERATOR_NEW_ARRAY .c.obj: $(cc) @&&| ! $(cdebug) $(cflags) $(cvars) $(defines) -o$* -c $*.c | .cpp.obj: $(cc) @&&| ! $(cdebug) $(cflags) $(cvars) $(defines) -o$* -c $*.cpp | .rc.res: *************** OBJS= $(XXXOBJS:XXX=) *** 39,69 **** all: gctest.exe cord\de.exe test_cpp.exe ! $(OBJS) test.obj: gc_priv.h gc_hdrs.h gc.h gcconfig.h MAKEFILE gc.lib: $(OBJS) ! -del gc.lib ! tlib $* @&&| ! $(XXXOBJS:XXX=+) | gctest.exe: tests\test.obj gc.lib $(cc) @&&| ! $(cflags) -W -e$* tests\test.obj gc.lib | ! cord\de.obj cord\de_win.obj: cord\cord.h cord\private\cord_pos.h cord\de_win.h \ cord\de_cmds.h cord\de.exe: cord\cordbscs.obj cord\cordxtra.obj cord\de.obj cord\de_win.obj \ ! cord\de_win.res gc.lib $(cc) @&&| ! $(cflags) -W -e$* cord\cordbscs.obj cord\cordxtra.obj \ ! cord\de.obj cord\de_win.obj gc.lib | $(rc) cord\de_win.res cord\de.exe ! gc_cpp.obj: gc_cpp.h gc.h gc_cpp.cpp: gc_cpp.cc copy gc_cpp.cc gc_cpp.cpp --- 41,71 ---- all: gctest.exe cord\de.exe test_cpp.exe ! $(OBJS) test.obj: include\private\gc_priv.h include\private\gc_hdrs.h include\gc.h include\private\gcconfig.h MAKEFILE gc.lib: $(OBJS) ! del gc.lib ! $(lib) $* @&&| ! $(XXXOBJS:XXX=+) | gctest.exe: tests\test.obj gc.lib $(cc) @&&| ! $(cflags) -W -e$* tests\test.obj gc.lib | ! cord\de.obj cord\de_win.obj: include\cord.h include\private\cord_pos.h cord\de_win.h \ cord\de_cmds.h cord\de.exe: cord\cordbscs.obj cord\cordxtra.obj cord\de.obj cord\de_win.obj \ ! cord\de_win.res gc.lib $(cc) @&&| ! $(cflags) -W -e$* cord\cordbscs.obj cord\cordxtra.obj \ ! cord\de.obj cord\de_win.obj gc.lib | $(rc) cord\de_win.res cord\de.exe ! gc_cpp.obj: include\gc_cpp.h include\gc.h gc_cpp.cpp: gc_cpp.cc copy gc_cpp.cc gc_cpp.cpp *************** gc_cpp.cpp: gc_cpp.cc *** 71,82 **** test_cpp.cpp: tests\test_cpp.cc copy tests\test_cpp.cc test_cpp.cpp ! test_cpp.exe: test_cpp.obj gc_cpp.h gc.h gc.lib $(cc) @&&| ! $(cflags) -W -e$* test_cpp.obj gc.lib | scratch: -del *.obj *.res *.exe *.csm cord\*.obj cord\*.res cord\*.exe cord\*.csm --- 73,88 ---- test_cpp.cpp: tests\test_cpp.cc copy tests\test_cpp.cc test_cpp.cpp ! test_cpp.exe: test_cpp.obj include\gc_cpp.h include\gc.h gc.lib $(cc) @&&| ! $(cflags) -W -e$* test_cpp.obj gc.lib | scratch: -del *.obj *.res *.exe *.csm cord\*.obj cord\*.res cord\*.exe cord\*.csm + clean: + del gc.lib + del *.obj + del tests\test.obj diff -Nrc3pad gcc-3.3.3/boehm-gc/ChangeLog gcc-3.4.0/boehm-gc/ChangeLog *** gcc-3.3.3/boehm-gc/ChangeLog 2004-02-14 20:16:39.000000000 +0000 --- gcc-3.4.0/boehm-gc/ChangeLog 2004-04-19 01:57:30.000000000 +0000 *************** *** 1,49 **** ! 2004-02-14 Release Manager ! * GCC 3.3.3 Released. ! 2003-12-21 Roger Sayle ! * configure.host: Backport/synchronize from mainline. ! 2003-10-16 Release Manager ! * GCC 3.3.2 Released. ! 2003-10-01 Rainer Orth * configure.in: Remove wildcard from Solaris 8-9/Intel and Solaris 2.3/SPARC, there are no micro versions. Treat Solaris 10 and up alike. * configure: Regenerate. 2003-09-09 Alan Modra * configure: Regenerate. ! 2003-08-04 Release Manager ! ! * GCC 3.3.1 Released. ! 2003-08-04 Release Manager ! * GCC 3.3.1 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. 2003-04-28 Mohan Embar --- 1,197 ---- ! 2004-04-18 Release Manager ! * GCC 3.4.0 released. ! 2004-02-22 Matthias Klose ! * config.guess: Update from version 2002-01-10 to 2004-02-16. ! * config.sub: Update from version 2002-01-02 to 2004-02-16. ! 2004-01-20 Andrew Haley ! * include/private/gcconfig.h (USE_MMAP): Define for all Linux. ! * configure.in: Comment change. ! ! 2004-01-16 Andrew Haley ! ! * configure.in (NO_EXECUTE_PERMISSION): Remove global declaration; ! add for ia64; remove for MIPS. ! * configure: Regnerated. ! ! 2004-01-14 Kelley Cook ! ! * configure.in: Add in AC_PREREQ(2.13) ! ! 2004-01-07 Dave Jones ! ! * malloc.c (GC_generic_malloc): Correct initialization typo. ! * mallocx.c (GC_generic_malloc_ignore_off_page): Ditto. ! ! 2003-10-31 Richard Earnshaw ! ! * include/private/gcconfig.h: Re-install change of 2003-04-16. ! ! 2003-10-20 Rainer Orth ! ! * mips_sgi_mach_dep.s: Use _ABIO32 instead of external ! _MIPS_SIM_ABI32. ! ! 2003-10-18 Alan Modra ! ! * include/private/gcconfig.h (ALIGNMENT ): Remove ! unsure comment. ! ! 2003-10-03 Jeff Sturm ! ! * configure: Rebuild. ! ! 2003-10-03 Hans Boehm ! ! * configure.in: Remove NO_GETENV definition for win32. ! * mach_dep.c (GC_generic_push_regs): Prevent tail call optimization. ! * misc.c (GC_init_inner): Call GC_thr_init for win32. ! (GC_set_warn_proc): Add assertion. ! * win32_threads.c: Import 6.3alpha2 version. ! * include/private/gc_priv.h: Add support for EMPTY_GETENV_RESULTS. ! ! 2003-09-29 Rainer Orth * configure.in: Remove wildcard from Solaris 8-9/Intel and Solaris 2.3/SPARC, there are no micro versions. Treat Solaris 10 and up alike. * configure: Regenerate. + 2003-09-22 Anthony Green + + * os_dep.c: Fix GC_get_stack_base build problem for vanilla elf + "NOSYS" targets. + + 2003-09-20 + + * include/private/gcconfig.h: Don't check for __XSCALE__. Instead + check for __arm__ or __thumb__. + 2003-09-09 Alan Modra * configure: Regenerate. ! 2003-08-07 Rainer Orth ! Roger Sayle ! * configure.in: Set INCLUDES to absolute path. ! Save $INCLUDES in boehm-cflags, too. ! Set INCLUDES so it's available to config.status. ! * configure: Regenerate. ! 2003-07-31 Danny Smith ! * include/gc.h (GC_CreateThread): Declare with WINAPI ! attribute. ! * win32_threads.c (GC_CreateThread): Make definitions consistent ! with declaration. Cast &thread_table[i].handle to PHANDLE ! in call to DuplicateHandle ! (thread_start): Declare as static. ! 2003-07-30 Andreas Tobler ! * dyn_load.c: Define __private_extern__ to match Apple's system ! header. ! ! 2003-07-28 Loren J. Rittle ! * os_dep.c: Remove redundancy introduced in last merge. ! 2003-07-28 Jeff Sturm ! Import GC 6.3alpha1. ! * BCC_MAKEFILE: Merge with GC 6.3alpha1 release. ! * ChangeLog: Likewise. ! * Makefile.am: Likewise. ! * Makefile.direct: Likewise. ! * Makefile.dj: Likewise. ! * allchblk.c: Likewise. ! * alloc.c: Likewise. ! * backgraph.c: Likewise. ! * configure.host: Likewise. ! * configure.in: Likewise. ! * dbg_mlc.c: Likewise. ! * dyn_load.c: Likewise. ! * finalize.c: Likewise. ! * gc_cpp.cc: Likewise. ! * gc_dlopen.c: Likewise. ! * gcj_mlc.c: Likewise. ! * if_mach.c: Likewise. ! * mach_dep.c: Likewise. ! * malloc.c: Likewise. ! * mallocx.c: Likewise. ! * mark.c: Likewise. ! * mark_rts.c: Likewise. ! * misc.c: Likewise. ! * os_dep.c: Likewise. ! * ptr_chck.c: Likewise. ! * reclaim.c: Likewise. ! * solaris_pthreads.c: Likewise. ! * solaris_threads.c: Likewise. ! * sparc_mach_dep.S: Likewise. ! * threadlibs.c: Likewise. ! * typd_mlc.c: Likewise. ! * version.h: Likewise. ! * win32_threads.c: Likewise. ! * Mac_files/MacOS_Test_config.h: Likewise. ! * Mac_files/MacOS_config.h: Likewise. ! * cord/cordbscs.c: Likewise. ! * cord/cordprnt.c: Likewise. ! * cord/de_win.c: Likewise. ! * doc/README: Likewise. ! * doc/README.MacOSX: Likewise. ! * doc/README.changes: Likewise. ! * doc/README.environment: Likewise. ! * doc/README.ews4800: Likewise. ! * doc/README.linux: Likewise. ! * doc/README.macros: Likewise. ! * doc/README.win32: Likewise. ! * doc/debugging.html: Likewise. ! * doc/gcdescr.html: Likewise. ! * doc/tree.html: Likewise. ! * include/Makefile.in: Likewise. ! * include/gc.h: Likewise. ! * include/gc_cpp.h: Likewise. ! * include/gc_local_alloc.h: Likewise. ! * include/gc_mark.h: Likewise. ! * include/gc_pthread_redirects.h: Likewise. ! * include/gc_typed.h: Likewise. ! * include/new_gc_alloc.h: Likewise. ! * include/private/dbg_mlc.h: Likewise. ! * include/private/gc_hdrs.h: Likewise. ! * include/private/gc_locks.h: Likewise. ! * include/private/gc_pmark.h: Likewise. ! * include/private/gc_priv.h: Likewise. ! * include/private/gcconfig.h: Likewise. ! * include/private/solaris_threads.h: Likewise. ! * include/private/specific.h: Likewise. ! * tests/test.c: Likewise. ! * tests/test_cpp.cc: Likewise. ! ! * configure: Rebuild. ! * Makefile.in: Rebuild. ! ! * mips_sgi_mach_dep.s: Add. ! ! * alpha_mach_dep.s: Remove. ! * irix_threads.c: Remove. ! * linux_threads.c: Remove. ! * mips_sgi_mach_dep.S: Remove. ! * missing: Remove. ! * powerpc_macosx_mach_dep.s: Remove. ! * doc/Makefile.am: Remove. ! * doc/Makefile.in: Remove. ! 2003-07-25 Roger Sayle ! * configure.host: Only use +ESdbgasm when using the HPUX native ! compiler on PA-Risc. It isn't recognized by GCC and is silently ! ignored by HP's compilers on ia64. 2003-04-28 Mohan Embar *************** *** 51,66 **** --- 199,236 ---- * configure: rebuilt * win32_threads.c: add #ifdef GC_DLL around DllMain + 2003-04-16 Richard Earnshaw + + * include/private/gcconfig.h: Add support for arm-netbsdelf. + 2003-04-09 Tom Tromey * include/private/gcconfig.h (LINUX_STACKBOTTOM): Define for POWERPC. (STACK_GRAN, HEURISTIC1): Don't define for POWERPC. + 2003-03-22 Richard Henderson + + * include/private/gc_locks.h [IA64]: Include ia64intrin.h. + (GC_test_and_set): Use __sync_lock_test_and_set. + (GC_clear): Use volatile assignment. + (GC_compare_and_exchange): Use __sync_bool_compare_and_swap. + (GC_memory_write_barrier): Use __sync_synchronize. + + 2003-03-12 Andreas Schwab + + * configure.in: Avoid trailing /. in toolexeclibdir. + * configure: Rebuilt. + 2003-03-04 Hans Boehm * include/private/gcconfig.h (GC_data_start): declare when needed. * include/private/gc_priv.h: Include gcconfig.h after ptr_t declaration. + * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr, + GC_register_dynlib_callback): Register main data for static + executable if dl_iterate_phdr() didn't. + * misc.c (GC_init_inner): Call GC_init_linux_data_start() even + if we don't expect to register main static data. 2003-03-03 Hans Boehm * mark_rts.c (GC_cond_register_dynamic_libraries): add. *************** *** 71,77 **** (GC_collect_a_little_inner, GC_try_to_collect_inner): Check GC_dont_gc. * dyn_load.c (GC_register_main_static_data): define. (GC_register_dyn_libraries (Linux /proc, Linux ELF versions)): ! no longer skip main data. Register main data for static executable. * misc.c (GC_REGISTER_MAIN_STATIC_DATA): define. (GC_init_inner): Make main data registration conditional. * include/private/gc_priv.h (GC_register_main_static_data): declare. --- 241,247 ---- (GC_collect_a_little_inner, GC_try_to_collect_inner): Check GC_dont_gc. * dyn_load.c (GC_register_main_static_data): define. (GC_register_dyn_libraries (Linux /proc, Linux ELF versions)): ! no longer skip main data. * misc.c (GC_REGISTER_MAIN_STATIC_DATA): define. (GC_init_inner): Make main data registration conditional. * include/private/gc_priv.h (GC_register_main_static_data): declare. diff -Nrc3pad gcc-3.3.3/boehm-gc/config.guess gcc-3.4.0/boehm-gc/config.guess *** gcc-3.3.3/boehm-gc/config.guess 2002-02-12 04:37:53.000000000 +0000 --- gcc-3.4.0/boehm-gc/config.guess 2004-02-22 14:43:48.000000000 +0000 *************** *** 1,9 **** #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ! # 2000, 2001, 2002 Free Software Foundation, Inc. ! timestamp='2002-01-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by --- 1,9 ---- #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ! # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. ! timestamp='2004-02-16' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by *************** if test $# != 0; then *** 88,117 **** exit 1 fi ! dummy=dummy-$$ ! trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 - # CC_FOR_BUILD -- compiler used by this script. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. ! set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in ! ,,) echo "int dummy(){}" > $dummy.c ; ! for c in cc gcc c89 ; do ! ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; ! if test $? = 0 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; - rm -f $dummy.c $dummy.o $dummy.rel ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; ! esac' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) --- 88,129 ---- exit 1 fi + trap 'exit 1' 1 2 15 ! # CC_FOR_BUILD -- compiler used by this script. Note that the use of a ! # compiler to aid in system detection is discouraged as it requires ! # temporary files to be created and, as you can see below, it is a ! # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. ! # Portable tmp directory creation inspired by the Autoconf team. ! ! set_cc_for_build=' ! trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; ! trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; ! : ${TMPDIR=/tmp} ; ! { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || ! { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || ! { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || ! { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; ! dummy=$tmp/dummy ; ! tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; ! case $CC_FOR_BUILD,$HOST_CC,$CC in ! ,,) echo "int x;" > $dummy.c ; ! for c in cc gcc c89 c99 ; do ! if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; ! esac ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) *************** case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ *** 138,146 **** # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". ! UNAME_MACHINE_ARCH=`(uname -p) 2>/dev/null` || \ ! UNAME_MACHINE_ARCH=unknown case "${UNAME_MACHINE_ARCH}" in arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; --- 150,160 ---- # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". ! sysctl="sysctl -n hw.machine_arch" ! UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ ! /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; *************** case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ *** 166,183 **** ;; esac # The OS release ! release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; --- 180,214 ---- ;; esac # The OS release ! # Debian GNU/NetBSD machines have a different userland, and ! # thus, need a distinct triplet. However, they do not need ! # kernel version information, so it can be replaced with a ! # suitable tag, in the style of linux-gnu. ! case "${UNAME_VERSION}" in ! Debian*) ! release='-gnu' ! ;; ! *) ! release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ! ;; ! esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; + amd64:OpenBSD:*:*) + echo x86_64-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; + cats:OpenBSD:*:*) + echo arm-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *************** case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ *** 196,201 **** --- 227,235 ---- mvmeppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; + pegasos:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *************** case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ *** 211,279 **** *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - cat <$dummy.s - .data - \$Lformat: - .byte 37,100,45,37,120,10,0 # "%d-%x\n" - - .text - .globl main - .align 4 - .ent main - main: - .frame \$30,16,\$26,0 - ldgp \$29,0(\$27) - .prologue 1 - .long 0x47e03d80 # implver \$0 - lda \$2,-1 - .long 0x47e20c21 # amask \$2,\$1 - lda \$16,\$Lformat - mov \$0,\$17 - not \$1,\$18 - jsr \$26,printf - ldgp \$29,0(\$26) - mov 0,\$16 - jsr \$26,exit - .end main - EOF - eval $set_cc_for_build - $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null - if test "$?" = 0 ; then - case `./$dummy` in - 0-0) - UNAME_MACHINE="alpha" - ;; - 1-0) - UNAME_MACHINE="alphaev5" - ;; - 1-1) - UNAME_MACHINE="alphaev56" - ;; - 1-101) - UNAME_MACHINE="alphapca56" - ;; - 2-303) - UNAME_MACHINE="alphaev6" - ;; - 2-307) - UNAME_MACHINE="alphaev67" - ;; - 2-1307) - UNAME_MACHINE="alphaev68" - ;; - esac - fi - rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead --- 245,309 ---- *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit 0 ;; + macppc:MirBSD:*:*) + echo powerppc-unknown-mirbsd${UNAME_RELEASE} + exit 0 ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; + Alpha*:OpenVMS:*:*) + echo alpha-hp-vms + exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead *************** EOF *** 295,300 **** --- 325,333 ---- *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; *************** EOF *** 312,317 **** --- 345,357 ---- NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit 0 ;; + DRS?6000:UNIX_SV:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7 && exit 0 ;; + esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *************** EOF *** 340,346 **** echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) ! UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) --- 380,386 ---- echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) ! UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) *************** EOF *** 380,385 **** --- 420,428 ---- *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; *************** EOF *** 418,432 **** exit (-1); } EOF ! $CC_FOR_BUILD $dummy.c -o $dummy \ ! && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ ! && rm -f $dummy.c $dummy && exit 0 ! rm -f $dummy.c $dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; --- 461,480 ---- exit (-1); } EOF ! $CC_FOR_BUILD -o $dummy $dummy.c \ ! && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ ! && exit 0 echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; *************** EOF *** 499,506 **** exit(0); } EOF ! $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 ! rm -f $dummy.c $dummy echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 --- 547,553 ---- exit(0); } EOF ! $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 *************** EOF *** 509,515 **** fi exit 0 ;; *:AIX:*:[45]) ! IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else --- 556,562 ---- fi exit 0 ;; *:AIX:*:[45]) ! IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else *************** EOF *** 598,608 **** exit (0); } EOF ! (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy` ! if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi ! rm -f $dummy.c $dummy fi ;; esac echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) --- 645,665 ---- exit (0); } EOF ! (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` ! test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + # avoid double evaluation of $set_cc_for_build + test -n "$CC_FOR_BUILD" || eval $set_cc_for_build + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) *************** EOF *** 636,643 **** exit (0); } EOF ! $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 ! rm -f $dummy.c $dummy echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) --- 693,699 ---- exit (0); } EOF ! $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) *************** EOF *** 683,691 **** C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; - CRAY*X-MP:*:*:*) - echo xmp-cray-unicos - exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; --- 739,744 ---- *************** EOF *** 698,721 **** CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; - CRAY*T3D:*:*:*) - echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; ! CRAY-2:*:*:*) ! echo cray2-cray-unicos ! exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; --- 751,776 ---- CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; ! *:UNICOS/mp:*:*) ! echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' ! exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; *************** EOF *** 726,732 **** echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) ! echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin --- 781,801 ---- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) ! # Determine whether the default compiler uses glibc. ! eval $set_cc_for_build ! sed 's/^ //' << EOF >$dummy.c ! #include ! #if __GLIBC__ >= 2 ! LIBC=gnu ! #else ! LIBC= ! #endif ! EOF ! eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` ! # GNU/KFreeBSD systems have a "k" prefix to indicate we are using ! # FreeBSD's kernel, but not the complete OS. ! case ${LIBC} in gnu) kernel_only='k' ;; esac ! echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin *************** EOF *** 737,750 **** i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; ! x86:Interix*:3*) ! echo i386-pc-interix3 exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? ! echo i386-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin --- 806,822 ---- i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; ! x86:Interix*:[34]*) ! echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' ! exit 0 ;; ! [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) ! echo i${UNAME_MACHINE}-pc-mks exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? ! echo i586-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin *************** EOF *** 756,771 **** echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; ia64:Linux:*:*) ! echo ${UNAME_MACHINE}-unknown-linux exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu --- 828,851 ---- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) + # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit 0 ;; ia64:Linux:*:*) ! echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu *************** EOF *** 776,794 **** #undef CPU #undef mips #undef mipsel ! #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) ! CPU=mipsel #else ! #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif ! #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` ! rm -f $dummy.c ! test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu --- 856,892 ---- #undef CPU #undef mips #undef mipsel ! #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) ! CPU=mipsel #else ! #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif ! #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` ! test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ! ;; ! mips64:Linux:*:*) ! eval $set_cc_for_build ! sed 's/^ //' << EOF >$dummy.c ! #undef CPU ! #undef mips64 ! #undef mips64el ! #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) ! CPU=mips64el ! #else ! #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) ! CPU=mips64 ! #else ! CPU= ! #endif ! #endif ! EOF ! eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` ! test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu *************** EOF *** 824,829 **** --- 922,930 ---- s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; *************** EOF *** 837,843 **** # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. ! ld_supported_targets=`cd /; ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// --- 938,945 ---- # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. ! # Set LC_ALL=C to ensure ld outputs messages in English. ! ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// *************** EOF *** 849,855 **** ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ! exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; --- 951,957 ---- ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ! exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; *************** EOF *** 874,884 **** LIBC=gnulibc1 # endif #else LIBC=gnuaout #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - rm -f $dummy.c test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; --- 976,992 ---- LIBC=gnulibc1 # endif #else + #ifdef __INTEL_COMPILER + LIBC=gnu + #else LIBC=gnuaout #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; *************** EOF *** 896,901 **** --- 1004,1029 ---- # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit 0 ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit 0 ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then *************** EOF *** 917,938 **** UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then ! UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` ! (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 ! (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 ! (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ && UNAME_MACHINE=i686 ! (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about --- 1045,1063 ---- UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then ! UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` ! (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 ! (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 ! (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 ! (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about *************** EOF *** 956,964 **** # "miniframe" echo m68010-convergent-sysv exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; ! 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` --- 1081,1095 ---- # "miniframe" echo m68010-convergent-sysv exit 0 ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit 0 ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; ! 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` *************** EOF *** 975,983 **** mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; --- 1106,1111 ---- *************** EOF *** 1049,1054 **** --- 1177,1185 ---- SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *************** EOF *** 1056,1073 **** echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) ! echo `uname -p`-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) ! if test "${UNAME_MACHINE}" = "x86pc"; then UNAME_MACHINE=pc fi ! echo `uname -p`-${UNAME_MACHINE}-nto-qnx exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; ! NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) --- 1187,1210 ---- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) ! case `uname -p` in ! *86) UNAME_PROCESSOR=i686 ;; ! powerpc) UNAME_PROCESSOR=powerpc ;; ! esac ! echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) ! UNAME_PROCESSOR=`uname -p` ! if test "$UNAME_PROCESSOR" = "x86"; then ! UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi ! echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; ! NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) *************** EOF *** 1090,1100 **** fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; --- 1227,1232 ---- *************** EOF *** 1113,1123 **** *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; ! i*86:XTS-300:*:STOP) ! echo ${UNAME_MACHINE}-unknown-stop exit 0 ;; ! i*86:atheos:*:*) ! echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; esac --- 1245,1255 ---- *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; ! SEI:*:*:SEIUX) ! echo mips-sei-seiux${UNAME_RELEASE} exit 0 ;; ! *:DragonFly:*:*) ! echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; esac *************** main () *** 1239,1246 **** } EOF ! $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 ! rm -f $dummy.c $dummy # Apollos put the system type in the environment. --- 1371,1377 ---- } EOF ! $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 # Apollos put the system type in the environment. diff -Nrc3pad gcc-3.3.3/boehm-gc/config.sub gcc-3.4.0/boehm-gc/config.sub *** gcc-3.3.3/boehm-gc/config.sub 2002-02-12 04:37:53.000000000 +0000 --- gcc-3.4.0/boehm-gc/config.sub 2004-02-22 14:43:48.000000000 +0000 *************** *** 1,9 **** #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ! # 2000, 2001, 2002 Free Software Foundation, Inc. ! timestamp='2002-01-02' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software --- 1,9 ---- #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ! # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. ! timestamp='2004-02-16' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software *************** esac *** 118,124 **** # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in ! nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; --- 118,125 ---- # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in ! nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ ! kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *************** case $basic_machine in *** 228,255 **** | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | c4x | clipper \ ! | d10v | d30v | dsp16xx \ ! | fr30 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | m32r | m68000 | m68k | m88k | mcore \ ! | mips16 | mips64 | mips64el | mips64orion | mips64orionel \ ! | mips64vr4100 | mips64vr4100el | mips64vr4300 \ ! | mips64vr4300el | mips64vr5000 | mips64vr5000el \ ! | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \ ! | mipsisa32 \ | mn10200 | mn10300 \ | ns16k | ns32k \ ! | openrisc \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ ! | sh | sh[34] | sh[34]eb | shbe | shle \ ! | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \ | strongarm \ ! | tahoe | thumb | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xstormy16 | xtensa \ --- 229,270 ---- | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | c4x | clipper \ ! | d10v | d30v | dlx | dsp16xx \ ! | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ | m32r | m68000 | m68k | m88k | mcore \ ! | mips | mipsbe | mipseb | mipsel | mipsle \ ! | mips16 \ ! | mips64 | mips64el \ ! | mips64vr | mips64vrel \ ! | mips64orion | mips64orionel \ ! | mips64vr4100 | mips64vr4100el \ ! | mips64vr4300 | mips64vr4300el \ ! | mips64vr5000 | mips64vr5000el \ ! | mipsisa32 | mipsisa32el \ ! | mipsisa32r2 | mipsisa32r2el \ ! | mipsisa64 | mipsisa64el \ ! | mipsisa64r2 | mipsisa64r2el \ ! | mipsisa64sb1 | mipsisa64sb1el \ ! | mipsisa64sr71k | mipsisa64sr71kel \ ! | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ + | msp430 \ | ns16k | ns32k \ ! | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ ! | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ ! | sh64 | sh64le \ ! | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ | strongarm \ ! | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xstormy16 | xtensa \ *************** case $basic_machine in *** 281,317 **** | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ ! | arm-* | armbe-* | armle-* | armv*-* \ | avr-* \ | bs2000-* \ ! | c[123]* | c30-* | [cjt]90-* | c54x-* \ ! | clipper-* | cray2-* | cydra-* \ ! | d10v-* | d30v-* \ | elxsi-* \ ! | f30[01]-* | f700-* | fr30-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | m32r-* \ ! | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ ! | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \ ! | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \ ! | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \ ! | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \ ! | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ ! | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \ ! | sparc-* | sparc64-* | sparc86x-* | sparclite-* \ ! | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* \ ! | t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ ! | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* | xstormy16-* \ | xtensa-* \ | ymp-* \ | z8k-*) --- 296,348 ---- | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ ! | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bs2000-* \ ! | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ ! | clipper-* | cydra-* \ ! | d10v-* | d30v-* | dlx-* \ | elxsi-* \ ! | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ | m32r-* \ ! | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ ! | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ ! | mips16-* \ ! | mips64-* | mips64el-* \ ! | mips64vr-* | mips64vrel-* \ ! | mips64orion-* | mips64orionel-* \ ! | mips64vr4100-* | mips64vr4100el-* \ ! | mips64vr4300-* | mips64vr4300el-* \ ! | mips64vr5000-* | mips64vr5000el-* \ ! | mipsisa32-* | mipsisa32el-* \ ! | mipsisa32r2-* | mipsisa32r2el-* \ ! | mipsisa64-* | mipsisa64el-* \ ! | mipsisa64r2-* | mipsisa64r2el-* \ ! | mipsisa64sb1-* | mipsisa64sb1el-* \ ! | mipsisa64sr71k-* | mipsisa64sr71kel-* \ ! | mipstx39-* | mipstx39el-* \ ! | msp430-* \ ! | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ ! | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ ! | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ ! | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ ! | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ ! | tahoe-* | thumb-* \ ! | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ ! | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ ! | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ | xtensa-* \ | ymp-* \ | z8k-*) *************** case $basic_machine in *** 332,337 **** --- 363,371 ---- basic_machine=a29k-amd os=-udi ;; + abacus) + basic_machine=abacus-unknown + ;; adobe68k) basic_machine=m68010-adobe os=-scout *************** case $basic_machine in *** 346,351 **** --- 380,391 ---- basic_machine=a29k-none os=-bsd ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; amdahl) basic_machine=580-amdahl os=-sysv *************** case $basic_machine in *** 377,382 **** --- 417,426 ---- basic_machine=ns32k-sequent os=-dynix ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; convex-c1) basic_machine=c1-convex os=-bsd *************** case $basic_machine in *** 397,413 **** basic_machine=c38-convex os=-bsd ;; ! cray | ymp) ! basic_machine=ymp-cray ! os=-unicos ! ;; ! cray2) ! basic_machine=cray2-cray os=-unicos ;; ! [cjt]90) ! basic_machine=${basic_machine}-cray ! os=-unicos ;; crds | unos) basic_machine=m68k-crds --- 441,453 ---- basic_machine=c38-convex os=-bsd ;; ! cray | j90) ! basic_machine=j90-cray os=-unicos ;; ! cr16c) ! basic_machine=cr16c-unknown ! os=-elf ;; crds | unos) basic_machine=m68k-crds *************** case $basic_machine in *** 609,622 **** basic_machine=m68k-atari os=-mint ;; - mipsel*-linux*) - basic_machine=mipsel-unknown - os=-linux-gnu - ;; - mips*-linux*) - basic_machine=mips-unknown - os=-linux-gnu - ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; --- 649,654 ---- *************** case $basic_machine in *** 707,712 **** --- 739,748 ---- np1) basic_machine=np1-gould ;; + nv1) + basic_machine=nv1-cray + os=-unicosmp + ;; nsr-tandem) basic_machine=nsr-tandem ;; *************** case $basic_machine in *** 714,719 **** --- 750,763 ---- basic_machine=hppa1.1-oki os=-proelf ;; + or32 | or32-*) + basic_machine=or32-unknown + os=-coff + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose *************** case $basic_machine in *** 736,784 **** pbb) basic_machine=m68k-tti ;; ! pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; ! pentiumpro | p6 | 6x86 | athlon) basic_machine=i686-pc ;; ! pentiumii | pentium2) basic_machine=i686-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ! pentiumii-* | pentium2-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ! ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ! ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ! ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ! ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; --- 780,834 ---- pbb) basic_machine=m68k-tti ;; ! pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; ! pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; ! pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; + pentium4) + basic_machine=i786-pc + ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ! pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ! ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ! ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ! ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ! ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; *************** case $basic_machine in *** 809,814 **** --- 859,874 ---- basic_machine=a29k-amd os=-udi ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; sequent) basic_machine=i386-sequent ;; *************** case $basic_machine in *** 816,821 **** --- 876,884 ---- basic_machine=sh-hitachi os=-hms ;; + sh64) + basic_machine=sh64-unknown + ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks *************** case $basic_machine in *** 883,895 **** os=-dynix ;; t3e) ! basic_machine=t3e-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; --- 946,970 ---- os=-dynix ;; t3e) ! basic_machine=alphaev5-cray ! os=-unicos ! ;; ! t90) ! basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; tx39) basic_machine=mipstx39-unknown ;; *************** case $basic_machine in *** 903,908 **** --- 978,987 ---- tower | tower-32) basic_machine=m68k-ncr ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; udi29k) basic_machine=a29k-amd os=-udi *************** case $basic_machine in *** 924,931 **** os=-vms ;; vpp*|vx|vx-*) ! basic_machine=f301-fujitsu ! ;; vxworks960) basic_machine=i960-wrs os=-vxworks --- 1003,1010 ---- os=-vms ;; vpp*|vx|vx-*) ! basic_machine=f301-fujitsu ! ;; vxworks960) basic_machine=i960-wrs os=-vxworks *************** case $basic_machine in *** 946,962 **** basic_machine=hppa1.1-winbond os=-proelf ;; ! windows32) ! basic_machine=i386-pc ! os=-windows32-msvcrt ;; ! xmp) ! basic_machine=xmp-cray os=-unicos ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim --- 1025,1037 ---- basic_machine=hppa1.1-winbond os=-proelf ;; ! xps | xps100) ! basic_machine=xps100-honeywell ;; ! ymp) ! basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim *************** case $basic_machine in *** 977,989 **** op60c) basic_machine=hppa1.1-oki ;; - mips) - if [ x$os = x-linux-gnu ]; then - basic_machine=mips-unknown - else - basic_machine=mips-mips - fi - ;; romp) basic_machine=romp-ibm ;; --- 1052,1057 ---- *************** case $basic_machine in *** 1003,1015 **** we32k) basic_machine=we32k-att ;; ! sh3 | sh4 | sh3eb | sh4eb) basic_machine=sh-unknown ;; sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; ! cydra) basic_machine=cydra-cydrome ;; orion) --- 1071,1086 ---- we32k) basic_machine=we32k-att ;; ! sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; + sh64) + basic_machine=sh64-unknown + ;; sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; ! cydra) basic_machine=cydra-cydrome ;; orion) *************** case $basic_machine in *** 1024,1033 **** pmac | pmac-mpw) basic_machine=powerpc-apple ;; - c4x*) - basic_machine=c4x-none - os=-coff - ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; --- 1095,1100 ---- *************** case $os in *** 1083,1099 **** | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ ! | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ ! | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ ! | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ ! | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ ! | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* | -morphos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) --- 1150,1169 ---- | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ ! | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ ! | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ ! | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ ! | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ ! | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ ! | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ ! | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ ! | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) *************** case $os in *** 1105,1112 **** ;; esac ;; -nto*) ! os=-nto-qnx ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ --- 1175,1184 ---- ;; esac ;; + -nto-qnx*) + ;; -nto*) ! os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ *************** case $os in *** 1115,1120 **** --- 1187,1195 ---- -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; *************** case $os in *** 1127,1132 **** --- 1202,1210 ---- -opened*) os=-openedition ;; + -os400*) + os=-os400 + ;; -wince*) os=-wince ;; *************** case $os in *** 1148,1161 **** -atheos*) os=-atheos ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -ns2 ) ! os=-nextstep2 ;; -nsk*) os=-nsk --- 1226,1245 ---- -atheos*) os=-atheos ;; + -syllable*) + os=-syllable + ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; + -nova*) + os=-rtmk-nova + ;; -ns2 ) ! os=-nextstep2 ;; -nsk*) os=-nsk *************** case $os in *** 1167,1172 **** --- 1251,1259 ---- -sinix*) os=-sysv4 ;; + -tpf*) + os=-tpf + ;; -triton*) os=-sysv3 ;; *************** case $os in *** 1194,1201 **** -xenix) os=-xenix ;; ! -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) ! os=-mint ;; -none) ;; --- 1281,1294 ---- -xenix) os=-xenix ;; ! -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) ! os=-mint ! ;; ! -aros*) ! os=-aros ! ;; ! -kaos*) ! os=-kaos ;; -none) ;; *************** case $basic_machine in *** 1228,1238 **** arm*-semi) os=-aout ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; ! pdp11-*) os=-none ;; *-dec | vax-*) --- 1321,1334 ---- arm*-semi) os=-aout ;; + c4x-* | tic4x-*) + os=-coff + ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; ! pdp11-*) os=-none ;; *-dec | vax-*) *************** case $basic_machine in *** 1259,1264 **** --- 1355,1363 ---- mips*-*) os=-elf ;; + or32-*) + os=-coff + ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; *************** case $basic_machine in *** 1322,1340 **** *-next) os=-nextstep3 ;; ! *-gould) os=-sysv ;; ! *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; ! *-sgi) os=-irix ;; ! *-siemens) os=-sysv4 ;; *-masscomp) --- 1421,1439 ---- *-next) os=-nextstep3 ;; ! *-gould) os=-sysv ;; ! *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; ! *-sgi) os=-irix ;; ! *-siemens) os=-sysv4 ;; *-masscomp) *************** case $basic_machine in *** 1403,1412 **** -mvs* | -opened*) vendor=ibm ;; -ptx*) vendor=sequent ;; ! -vxsim* | -vxworks*) vendor=wrs ;; -aux*) --- 1502,1517 ---- -mvs* | -opened*) vendor=ibm ;; + -os400*) + vendor=ibm + ;; -ptx*) vendor=sequent ;; ! -tpf*) ! vendor=ibm ! ;; ! -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) diff -Nrc3pad gcc-3.3.3/boehm-gc/configure gcc-3.4.0/boehm-gc/configure *** gcc-3.3.3/boehm-gc/configure 2004-02-14 20:34:20.000000000 +0000 --- gcc-3.4.0/boehm-gc/configure 2004-04-19 02:23:04.000000000 +0000 *************** ac_help="$ac_help *** 41,47 **** ac_help="$ac_help --with-ecos enable runtime eCos target support" ac_help="$ac_help ! --enable-shared[=PKGS] build shared libraries [default=no]" ac_help="$ac_help --enable-full-debug include full support for pointer backtracing etc." --- 41,52 ---- ac_help="$ac_help --with-ecos enable runtime eCos target support" ac_help="$ac_help ! --enable-shared[=PKGS] build shared libraries [default=yes]" ! ac_help="$ac_help ! --with-target-subdir=SUBDIR ! configuring with a cross compiler" ! ac_help="$ac_help ! --with-cross-host=HOST configuring with a cross compiler" ac_help="$ac_help --enable-full-debug include full support for pointer backtracing etc." *************** ac_configure=$ac_aux_dir/configure # Thi *** 593,599 **** # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:597: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 598,604 ---- # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:602: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** test -z "$INSTALL_SCRIPT" && INSTALL_SCR *** 646,652 **** test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 ! echo "configure:650: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile --- 651,657 ---- test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 ! echo "configure:655: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile *************** test "$program_suffix" != NONE && *** 703,709 **** test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:707: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 708,714 ---- test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:712: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** else *** 736,747 **** fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 ! echo "configure:740: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:745: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else --- 757,763 ---- return __CYGWIN__; ; return 0; } EOF ! if { (eval echo configure:761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else *************** echo "$ac_t""$ac_cv_cygwin" 1>&6 *** 769,787 **** CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 ! echo "configure:773: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else --- 774,792 ---- CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 ! echo "configure:778: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else *************** else { echo "configure: error: can not r *** 892,898 **** fi echo $ac_n "checking host system type""... $ac_c" 1>&6 ! echo "configure:896: checking host system type" >&5 host_alias=$host case "$host_alias" in --- 897,903 ---- fi echo $ac_n "checking host system type""... $ac_c" 1>&6 ! echo "configure:901: checking host system type" >&5 host_alias=$host case "$host_alias" in *************** host_os=`echo $host | sed 's/^\([^-]*\)- *** 913,919 **** echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 ! echo "configure:917: checking target system type" >&5 target_alias=$target case "$target_alias" in --- 918,924 ---- echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 ! echo "configure:922: checking target system type" >&5 target_alias=$target case "$target_alias" in *************** target_os=`echo $target | sed 's/^\([^-] *** 931,937 **** echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 ! echo "configure:935: checking build system type" >&5 build_alias=$build case "$build_alias" in --- 936,942 ---- echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 ! echo "configure:940: checking build system type" >&5 build_alias=$build case "$build_alias" in *************** fi *** 971,977 **** missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 ! echo "configure:975: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. --- 976,982 ---- missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 ! echo "configure:980: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. *************** else *** 984,990 **** fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 ! echo "configure:988: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. --- 989,995 ---- fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 ! echo "configure:993: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. *************** else *** 997,1003 **** fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 ! echo "configure:1001: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. --- 1002,1008 ---- fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 ! echo "configure:1006: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. *************** else *** 1010,1016 **** fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 ! echo "configure:1014: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. --- 1015,1021 ---- fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 ! echo "configure:1019: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. *************** else *** 1023,1029 **** fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 ! echo "configure:1027: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. --- 1028,1034 ---- fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 ! echo "configure:1032: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. *************** fi *** 1049,1055 **** # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1053: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1054,1060 ---- # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1058: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** if test -z "$CC"; then *** 1079,1085 **** # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1083: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1084,1090 ---- # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1088: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 1128,1134 **** fi echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:1132: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1133,1139 ---- fi echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:1137: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 1137,1143 **** yes; #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no --- 1142,1148 ---- yes; #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no *************** if test $ac_cv_prog_gcc = yes; then *** 1152,1158 **** ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:1156: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1157,1163 ---- ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:1161: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** do *** 1189,1195 **** # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1193: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1194,1200 ---- # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1198: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** test -n "$CXX" || CXX="gcc" *** 1222,1228 **** test -z "$CXX" && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 ! echo "configure:1226: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1227,1233 ---- test -z "$CXX" && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 ! echo "configure:1231: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 1231,1237 **** yes; #endif EOF ! if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no --- 1236,1242 ---- yes; #endif EOF ! if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no *************** if test $ac_cv_prog_gxx = yes; then *** 1246,1252 **** ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 ! echo "configure:1250: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1251,1257 ---- ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 ! echo "configure:1255: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 1279,1285 **** # NEWLIB_CONFIGURE, which doesn't work because that means that it will # be run before AC_CANONICAL_HOST. echo $ac_n "checking build system type""... $ac_c" 1>&6 ! echo "configure:1283: checking build system type" >&5 build_alias=$build case "$build_alias" in --- 1284,1290 ---- # NEWLIB_CONFIGURE, which doesn't work because that means that it will # be run before AC_CANONICAL_HOST. echo $ac_n "checking build system type""... $ac_c" 1>&6 ! echo "configure:1288: checking build system type" >&5 build_alias=$build case "$build_alias" in *************** echo "$ac_t""$build" 1>&6 *** 1300,1306 **** # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1304: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1305,1311 ---- # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1309: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 1332,1338 **** # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1336: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1337,1343 ---- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1341: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 1364,1370 **** # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1368: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1369,1375 ---- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1373: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** if test -n "$ac_tool_prefix"; then *** 1396,1402 **** # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1400: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1401,1407 ---- # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1405: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 1441,1447 **** # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:1445: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1446,1452 ---- # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:1450: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** test -z "$INSTALL_DATA" && INSTALL_DATA= *** 1495,1501 **** echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 ! echo "configure:1499: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" --- 1500,1506 ---- echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 ! echo "configure:1504: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" *************** if false; then *** 1533,1539 **** echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 ! echo "configure:1537: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1538,1544 ---- echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 ! echo "configure:1542: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 1543,1549 **** rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= ! if { (eval echo configure:1547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; --- 1548,1554 ---- rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= ! if { (eval echo configure:1552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; *************** ac_prog=ld *** 1665,1671 **** if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 ! echo "configure:1669: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw --- 1670,1676 ---- if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 ! echo "configure:1674: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw *************** echo "configure:1669: checking for ld us *** 1695,1704 **** esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 ! echo "configure:1699: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 ! echo "configure:1702: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1700,1709 ---- esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 ! echo "configure:1704: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 ! echo "configure:1707: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** else *** 1733,1739 **** fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 ! echo "configure:1737: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1738,1744 ---- fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 ! echo "configure:1742: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** with_gnu_ld=$lt_cv_prog_gnu_ld *** 1750,1756 **** echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 ! echo "configure:1754: checking for $LD option to reload object files" >&5 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1755,1761 ---- echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 ! echo "configure:1759: checking for $LD option to reload object files" >&5 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** reload_flag=$lt_cv_ld_reload_flag *** 1762,1768 **** test -n "$reload_flag" && reload_flag=" $reload_flag" echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 ! echo "configure:1766: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1767,1773 ---- test -n "$reload_flag" && reload_flag=" $reload_flag" echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 ! echo "configure:1771: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** NM="$lt_cv_path_NM" *** 1800,1806 **** echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 ! echo "configure:1804: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1805,1811 ---- echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 ! echo "configure:1809: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 1821,1827 **** fi echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 ! echo "configure:1825: checking how to recognise dependant libraries" >&5 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1826,1832 ---- fi echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 ! echo "configure:1830: checking how to recognise dependant libraries" >&5 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** cygwin* | mingw* |pw32*) *** 1860,1865 **** --- 1865,1871 ---- ;; darwin* | rhapsody*) + # this will be overwritten by pass_all, but leave it in just in case lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' lt_cv_file_magic_cmd='/usr/bin/file -L' case "$host_os" in *************** darwin* | rhapsody*) *** 1870,1875 **** --- 1876,1882 ---- lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' ;; esac + lt_cv_deplibs_check_method=pass_all ;; freebsd* ) *************** irix5* | irix6*) *** 1931,1937 **** # This must be Linux ELF. linux-gnu*) case $host_cpu in ! alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* ) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM --- 1938,1944 ---- # This must be Linux ELF. linux-gnu*) case $host_cpu in ! alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* ) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM *************** file_magic_cmd=$lt_cv_file_magic_cmd *** 1994,2006 **** deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 ! echo "configure:1998: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext ! if { (eval echo configure:2004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; --- 2001,2013 ---- deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 ! echo "configure:2005: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext ! if { (eval echo configure:2011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; *************** case $deplibs_check_method in *** 2024,2030 **** file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 ! echo "configure:2028: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2031,2037 ---- file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 ! echo "configure:2035: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 2086,2092 **** if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 ! echo "configure:2090: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2093,2099 ---- if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 ! echo "configure:2097: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** esac *** 2157,2163 **** # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2161: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2164,2170 ---- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2168: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** if test -n "$ac_tool_prefix"; then *** 2189,2195 **** # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2193: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2196,2202 ---- # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2200: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 2224,2230 **** # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2228: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2231,2237 ---- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2235: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** if test -n "$ac_tool_prefix"; then *** 2256,2262 **** # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2260: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2263,2269 ---- # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2267: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** test x"$pic_mode" = xno && libtool_flags *** 2323,2330 **** case $host in *-*-irix6*) # Find out which ABI we are using. ! echo '#line 2327 "configure"' > conftest.$ac_ext ! if { (eval echo configure:2328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) --- 2330,2337 ---- case $host in *-*-irix6*) # Find out which ABI we are using. ! echo '#line 2334 "configure"' > conftest.$ac_ext ! if { (eval echo configure:2335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) *************** case $host in *** 2357,2363 **** ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext ! if { (eval echo configure:2361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *ELF-32*) HPUX_IA64_MODE="32" --- 2364,2370 ---- ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext ! if { (eval echo configure:2368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *ELF-32*) HPUX_IA64_MODE="32" *************** ia64-*-hpux*) *** 2373,2379 **** x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext ! if { (eval echo configure:2377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) case $host in --- 2380,2386 ---- x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext ! if { (eval echo configure:2384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) case $host in *************** x86_64-*linux*|ppc*-*linux*|powerpc*-*li *** 2417,2423 **** SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 ! echo "configure:2421: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2424,2430 ---- SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 ! echo "configure:2428: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** ac_link='${CC-cc} -o conftest${ac_exeext *** 2430,2443 **** cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else --- 2437,2450 ---- cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else *************** echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 *** 2467,2473 **** esac echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 ! echo "configure:2471: checking how to run the C++ preprocessor" >&5 if test -z "$CXXCPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2474,2480 ---- esac echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 ! echo "configure:2478: checking how to run the C++ preprocessor" >&5 if test -z "$CXXCPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** ac_link='${CXX-g++} -o conftest${ac_exee *** 2480,2491 **** cross_compiling=$ac_cv_prog_cxx_cross CXXCPP="${CXX-g++} -E" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : --- 2487,2498 ---- cross_compiling=$ac_cv_prog_cxx_cross CXXCPP="${CXX-g++} -E" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : *************** fi *** 2632,2638 **** echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 ! echo "configure:2636: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" --- 2639,2645 ---- echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 ! echo "configure:2643: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" *************** if false; then *** 2665,2671 **** echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 ! echo "configure:2669: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2672,2678 ---- echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 ! echo "configure:2676: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 2675,2681 **** rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= ! if { (eval echo configure:2679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; --- 2682,2688 ---- rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= ! if { (eval echo configure:2686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; *************** ac_exeext=$EXEEXT *** 2698,2704 **** fi echo $ac_n "checking for thread model used by GCC""... $ac_c" 1>&6 ! echo "configure:2702: checking for thread model used by GCC" >&5 THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'` if test -z "$THREADS"; then THREADS=no --- 2705,2711 ---- fi echo $ac_n "checking for thread model used by GCC""... $ac_c" 1>&6 ! echo "configure:2709: checking for thread model used by GCC" >&5 THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'` if test -z "$THREADS"; then THREADS=no *************** if test "${enable_parallel_mark+set}" = *** 2717,2723 **** fi ! INCLUDES=-I${srcdir}/include THREADLIBS= case "$THREADS" in no | none | single) --- 2724,2730 ---- fi ! INCLUDES="-I`cd $srcdir && ${PWDCMD-pwd}`/include" THREADLIBS= case "$THREADS" in no | none | single) *************** case "$THREADS" in *** 2727,2733 **** THREADS=posix THREADLIBS=-lpthread case "$host" in ! x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* ) cat >> confdefs.h <<\EOF #define GC_LINUX_THREADS 1 EOF --- 2734,2740 ---- THREADS=posix THREADLIBS=-lpthread case "$host" in ! x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* | alpha-*-linux*) cat >> confdefs.h <<\EOF #define GC_LINUX_THREADS 1 EOF *************** EOF *** 2736,2742 **** #define _REENTRANT 1 EOF ! if test "${enable_parallel_mark}"; then cat >> confdefs.h <<\EOF #define PARALLEL_MARK 1 EOF --- 2743,2749 ---- #define _REENTRANT 1 EOF ! if test "${enable_parallel_mark}" = yes; then cat >> confdefs.h <<\EOF #define PARALLEL_MARK 1 EOF *************** EOF *** 2757,2762 **** --- 2764,2779 ---- EOF ;; + *-*-aix*) + cat >> confdefs.h <<\EOF + #define GC_AIX_THREADS 1 + EOF + + cat >> confdefs.h <<\EOF + #define _REENTRANT 1 + EOF + + ;; *-*-hpux*) echo "configure: warning: "Only HP/UX 11 threads are supported."" 1>&2 cat >> confdefs.h <<\EOF *************** EOF *** 2805,2811 **** ;; *-*-cygwin*) ! THREADLIBS= ;; esac ;; --- 2822,2867 ---- ;; *-*-cygwin*) ! cat >> confdefs.h <<\EOF ! #define GC_WIN32_THREADS 1 ! EOF ! ! ;; ! *-*-darwin*) ! cat >> confdefs.h <<\EOF ! #define GC_DARWIN_THREADS 1 ! EOF ! ! cat >> confdefs.h <<\EOF ! #define THREAD_LOCAL_ALLOC 1 ! EOF ! ! if test "${enable_parallel_mark}" = yes; then ! cat >> confdefs.h <<\EOF ! #define PARALLEL_MARK 1 ! EOF ! ! fi ! ;; ! *-*-osf*) ! cat >> confdefs.h <<\EOF ! #define GC_OSF1_THREADS 1 ! EOF ! ! if test "${enable_parallel_mark}" = yes; then ! cat >> confdefs.h <<\EOF ! #define PARALLEL_MARK 1 ! EOF ! ! cat >> confdefs.h <<\EOF ! #define THREAD_LOCAL_ALLOC 1 ! EOF ! ! # May want to enable it in other cases, too. ! # Measurements havent yet been done. ! fi ! INCLUDES="$INCLUDES -pthread" ! THREADLIBS="-lpthread -lrt" ;; esac ;; *************** EOF *** 2814,2829 **** #define GC_WIN32_THREADS 1 EOF cat >> confdefs.h <<\EOF ! #define NO_GETENV 1 EOF ! if test $enable_shared = yes; then ! cat >> confdefs.h <<\EOF ! #define GC_DLL 1 EOF - fi ;; decosf1 | irix | mach | os2 | solaris | dce | vxworks) { echo "configure: error: thread package $THREADS not yet supported" 1>&2; exit 1; } --- 2870,2913 ---- #define GC_WIN32_THREADS 1 EOF + ;; + dgux386) + THREADS=dgux386 + echo "$ac_t""$THREADLIBS" 1>&6 + # Use pthread GCC switch + THREADLIBS=-pthread + if test "${enable_parallel_mark}" = yes; then + cat >> confdefs.h <<\EOF + #define PARALLEL_MARK 1 + EOF + + fi cat >> confdefs.h <<\EOF ! #define THREAD_LOCAL_ALLOC 1 EOF ! cat >> confdefs.h <<\EOF ! #define GC_DGUX386_THREADS 1 ! EOF ! ! cat >> confdefs.h <<\EOF ! #define DGUX_THREADS 1 ! EOF ! ! # Enable _POSIX4A_DRAFT10_SOURCE with flag -pthread ! INCLUDES="-pthread $INCLUDES" ! ;; ! aix) ! THREADS=posix ! THREADLIBS=-lpthread ! cat >> confdefs.h <<\EOF ! #define GC_AIX_THREADS 1 ! EOF ! ! cat >> confdefs.h <<\EOF ! #define _REENTRANT 1 EOF ;; decosf1 | irix | mach | os2 | solaris | dce | vxworks) { echo "configure: error: thread package $THREADS not yet supported" 1>&2; exit 1; } *************** EOF *** 2834,2841 **** esac ! echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 ! echo "configure:2839: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2918,2945 ---- esac ! case "$host" in ! powerpc-*-darwin*) ! powerpc_darwin=true ! ;; ! esac ! ! ! if test x$powerpc_darwin = xtrue; then ! POWERPC_DARWIN_TRUE= ! POWERPC_DARWIN_FALSE='#' ! else ! POWERPC_DARWIN_TRUE='#' ! POWERPC_DARWIN_FALSE= ! fi ! ! # We never want libdl on darwin. It is a fake libdl that just ends up making ! # dyld calls anyway ! case "$host" in ! *-*-darwin*) ;; ! *) ! echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 ! echo "configure:2943: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** else *** 2843,2849 **** ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else --- 2958,2964 ---- dlopen() ; return 0; } EOF ! if { (eval echo configure:2962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else *************** else *** 2874,2879 **** --- 2978,2986 ---- echo "$ac_t""no" 1>&6 fi + ;; + esac + target_all=libgcjgc.la *************** fi *** 2890,2895 **** --- 2997,3005 ---- addobjs= + addlibs= + addincludes= + addtests= CXXINCLUDES= case "$TARGET_ECOS" in no) *************** EOF *** 2904,2920 **** ;; esac ! machdep= ! case "$host" in ! alpha*-*-openbsd*) ! machdep="alpha_mach_dep.lo" ! if test x"${ac_cv_lib_dl_dlopen}" != xyes ; then ! echo "configure: warning: OpenBSD/Alpha without dlopen(). Shared library support is disabled" 1>&2 ! # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" p=${PACKAGE-default} --- 3014,3044 ---- ;; esac + if test "${enable_cplusplus}" = yes; then + addincludes="$addincludes include/gc_cpp.h include/gc_allocator.h" + addtests="$addtests test_cpp" + fi + + if test "${enable_cplusplus}" = yes; then + CPLUSPLUS_TRUE= + CPLUSPLUS_FALSE='#' + else + CPLUSPLUS_TRUE='#' + CPLUSPLUS_FALSE= + fi + ! ! ! ! # Configuration of shared libraries ! # ! echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6 ! echo "configure:3041: checking whether to build shared libraries" >&5 ! # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" p=${PACKAGE-default} *************** no) enable_shared=no ;; *** 2934,2945 **** ;; esac else ! enable_shared=no fi fi ;; ! alpha*-*-*) machdep="alpha_mach_dep.lo" ;; i?86-*-solaris2.[89] | i?86-*-solaris2.1?) --- 3058,3096 ---- ;; esac else ! enable_shared=yes fi + + case "$host" in + alpha-*-openbsd*) + enable_shared=no + echo "$ac_t""no" 1>&6 + ;; + *) + echo "$ac_t""yes" 1>&6 + ;; + esac + + # Configuration of machine-dependent code + # + # We don't set NO_EXECUTE_PERMISSION by default because gcj (and + # anything else that creates trampolines in gc-allocated memory) + # always needs exec permission. The exception to this is IA-64 and + # some variations of Power PC, where trampolines don't contain + # executable code. + # + echo $ac_n "checking which machine-dependent code should be used""... $ac_c" 1>&6 + echo "configure:3085: checking which machine-dependent code should be used" >&5 + machdep= + case "$host" in + alpha*-*-openbsd*) + machdep="alpha_mach_dep.lo" + if test x"${ac_cv_lib_dl_dlopen}" != xyes ; then + echo "configure: warning: OpenBSD/Alpha without dlopen(). Shared library support is disabled" 1>&2 fi ;; ! alpha*-*-linux*) machdep="alpha_mach_dep.lo" ;; i?86-*-solaris2.[89] | i?86-*-solaris2.1?) *************** EOF *** 2962,2975 **** mips-dec-ultrix*) machdep="mips_ultrix_mach-dep.lo" ;; ! mips*-*-linux*) ;; mips-*-*) machdep="mips_sgi_mach_dep.lo" ! cat >> confdefs.h <<\EOF ! #define NO_EXECUTE_PERMISSION 1 ! EOF ! ;; sparc-sun-solaris2.3) machdep="sparc_mach_dep.lo" --- 3113,3127 ---- mips-dec-ultrix*) machdep="mips_ultrix_mach-dep.lo" ;; ! mips-nec-sysv*|mips-unknown-sysv*) ;; + mips*-*-linux*) + ;; mips-*-*) machdep="mips_sgi_mach_dep.lo" ! ;; ! sparc-*-netbsd*) ! machdep="sparc_netbsd_mach_dep.lo" ;; sparc-sun-solaris2.3) machdep="sparc_mach_dep.lo" *************** EOF *** 2982,2999 **** machdep="sparc_mach_dep.lo" ;; ia64-*-*) machdep="mach_dep.lo ia64_save_regs_in_stack.lo" ;; esac if test x"$machdep" = x; then machdep="mach_dep.lo" fi addobjs="$addobjs $machdep" case "$host" in ! sparc-sun-solaris2*) if test "$GCC" = yes; then new_CFLAGS= for i in $CFLAGS; do case "$i" in --- 3134,3358 ---- machdep="sparc_mach_dep.lo" ;; ia64-*-*) + cat >> confdefs.h <<\EOF + #define NO_EXECUTE_PERMISSION 1 + EOF + machdep="mach_dep.lo ia64_save_regs_in_stack.lo" ;; esac if test x"$machdep" = x; then + echo "$ac_t""$machdep" 1>&6 machdep="mach_dep.lo" fi addobjs="$addobjs $machdep" + + + + + + + + + + # + # Check for AViiON Machines running DGUX + # + echo $ac_n "checking if host is AViiON running DGUX""... $ac_c" 1>&6 + echo "configure:3165: checking if host is AViiON running DGUX" >&5 + ac_is_dgux=no + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 + echo "configure:3168: checking how to run the C preprocessor" >&5 + # On Suns, sometimes $CPP names a directory. + if test -n "$CPP" && test -d "$CPP"; then + CPP= + fi + if test -z "$CPP"; then + if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" + { (eval echo configure:3189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : + else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" + { (eval echo configure:3206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : + else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" + { (eval echo configure:3223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : + else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp + fi + rm -f conftest* + fi + rm -f conftest* + fi + rm -f conftest* + ac_cv_prog_CPP="$CPP" + fi + CPP="$ac_cv_prog_CPP" + else + ac_cv_prog_CPP="$CPP" + fi + echo "$ac_t""$CPP" 1>&6 + + ac_safe=`echo "sys/dg_sys_info.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for sys/dg_sys_info.h""... $ac_c" 1>&6 + echo "configure:3249: checking for sys/dg_sys_info.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" + { (eval echo configure:3259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" + fi + rm -f conftest* + fi + if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_is_dgux=yes; + else + echo "$ac_t""no" 1>&6 + fi + + + echo "$ac_t""$ac_is_dgux" 1>&6 + ## :GOTCHA: we do not check anything but sys/dg_sys_info.h + if test $ac_is_dgux = yes; then + if test "$enable_full_debug" = "yes"; then + CFLAGS="-g -mstandard -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2" + CXXFLAGS="-g -mstandard -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2" + else + CFLAGS="-DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2" + CXXFLAGS="-DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2" + fi + + + fi + + # Check whether --with-target-subdir or --without-target-subdir was given. + if test "${with_target_subdir+set}" = set; then + withval="$with_target_subdir" + : + fi + + # Check whether --with-cross-host or --without-cross-host was given. + if test "${with_cross_host+set}" = set; then + withval="$with_cross_host" + : + fi + + + # automake wants to see AC_EXEEXT. But we don't need it. And having + # it is actually a problem, because the compiler we're passed can't + # necessarily do a full link. So we fool automake here. + if false; then + # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands + # to nothing, so nothing would remain between `then' and `fi' if it + # were not for the `:' below. + : + + + echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 + echo "configure:3319: checking for executable suffix" >&5 + if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + if test "$CYGWIN" = yes || test "$MINGW32" = yes; then + ac_cv_exeext=.exe + else + rm -f conftest* + echo 'int main () { return 0; }' > conftest.$ac_ext + ac_cv_exeext= + if { (eval echo configure:3329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + for file in conftest.*; do + case $file in + *.c | *.o | *.obj) ;; + *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; + esac + done + else + { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } + fi + rm -f conftest* + test x"${ac_cv_exeext}" = x && ac_cv_exeext=no + fi + fi + + EXEEXT="" + test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} + echo "$ac_t""${ac_cv_exeext}" 1>&6 + ac_exeext=$EXEEXT + + fi + + echo $ac_n "checking whether Solaris gcc optimization fix is necessary""... $ac_c" 1>&6 + echo "configure:3352: checking whether Solaris gcc optimization fix is necessary" >&5 case "$host" in ! sparc-sun-solaris2*|*aix*) if test "$GCC" = yes; then + echo "$ac_t""yes" 1>&6 new_CFLAGS= for i in $CFLAGS; do case "$i" in *************** case "$host" in *** 3005,3012 **** --- 3364,3374 ---- esac done CFLAGS="$new_CFLAGS" + else + echo "$ac_t""no" 1>&6 fi ;; + *) echo "$ac_t""no" 1>&6 ;; esac MY_CFLAGS="$CFLAGS" *************** cat >> confdefs.h <<\EOF *** 3021,3030 **** EOF cat >> confdefs.h <<\EOF - #define NO_EXECUTE_PERMISSION 1 - EOF - - cat >> confdefs.h <<\EOF #define ALL_INTERIOR_POINTERS 1 EOF --- 3383,3388 ---- *************** EOF *** 3084,3089 **** --- 3442,3453 ---- EOF ;; + i345686-*-dgux*) + cat >> confdefs.h <<\EOF + #define MAKE_BACK_GRAPH 1 + EOF + + ;; esac fi fi *************** else *** 3097,3103 **** toolexecdir='$(libdir)/gcc-lib/$(target_alias)' toolexeclibdir='$(libdir)' fi ! toolexeclibdir=$toolexeclibdir/`$CC -print-multi-os-directory` --- 3461,3471 ---- toolexecdir='$(libdir)/gcc-lib/$(target_alias)' toolexeclibdir='$(libdir)' fi ! multi_os_directory=`$CC -print-multi-os-directory` ! case $multi_os_directory in ! .) ;; # Avoid trailing /. ! *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; ! esac *************** s%@STRIP@%$STRIP%g *** 3296,3306 **** --- 3664,3682 ---- s%@LIBTOOL@%$LIBTOOL%g s%@CXXCPP@%$CXXCPP%g s%@THREADLIBS@%$THREADLIBS%g + s%@POWERPC_DARWIN_TRUE@%$POWERPC_DARWIN_TRUE%g + s%@POWERPC_DARWIN_FALSE@%$POWERPC_DARWIN_FALSE%g s%@EXTRA_TEST_LIBS@%$EXTRA_TEST_LIBS%g s%@target_all@%$target_all%g + s%@CPLUSPLUS_TRUE@%$CPLUSPLUS_TRUE%g + s%@CPLUSPLUS_FALSE@%$CPLUSPLUS_FALSE%g s%@INCLUDES@%$INCLUDES%g s%@CXXINCLUDES@%$CXXINCLUDES%g s%@addobjs@%$addobjs%g + s%@addincludes@%$addincludes%g + s%@addlibs@%$addlibs%g + s%@addtests@%$addtests%g + s%@CPP@%$CPP%g s%@MY_CFLAGS@%$MY_CFLAGS%g s%@toolexecdir@%$toolexecdir%g s%@toolexeclibdir@%$toolexeclibdir%g *************** gc_basedir=${gc_basedir} *** 3416,3426 **** CC="${CC}" ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}" DEFS="$DEFS" EOF cat >> $CONFIG_STATUS <<\EOF ! echo "$DEFS" > boehm-cflags if test -n "$CONFIG_FILES"; then LD="${ORIGINAL_LD_FOR_MULTILIBS}" --- 3792,3803 ---- CC="${CC}" ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}" DEFS="$DEFS" + INCLUDES="$INCLUDES" EOF cat >> $CONFIG_STATUS <<\EOF ! echo "$INCLUDES $DEFS" > boehm-cflags if test -n "$CONFIG_FILES"; then LD="${ORIGINAL_LD_FOR_MULTILIBS}" diff -Nrc3pad gcc-3.3.3/boehm-gc/configure.in gcc-3.4.0/boehm-gc/configure.in *** gcc-3.3.3/boehm-gc/configure.in 2003-10-01 19:06:52.000000000 +0000 --- gcc-3.4.0/boehm-gc/configure.in 2004-01-20 15:15:48.000000000 +0000 *************** *** 13,18 **** --- 13,19 ---- dnl Process this file with autoconf to produce configure. + AC_PREREQ(2.13) AC_INIT(gcj_mlc.c) # This works around the fact that libtool configuration may change LD *************** AC_ARG_ENABLE(parallel-mark, *** 63,69 **** esac] ) ! INCLUDES=-I${srcdir}/include THREADLIBS= case "$THREADS" in no | none | single) --- 64,70 ---- esac] ) ! INCLUDES="-I`cd $srcdir && ${PWDCMD-pwd}`/include" THREADLIBS= case "$THREADS" in no | none | single) *************** case "$THREADS" in *** 73,82 **** THREADS=posix THREADLIBS=-lpthread case "$host" in ! x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* ) AC_DEFINE(GC_LINUX_THREADS) AC_DEFINE(_REENTRANT) ! if test "${enable_parallel_mark}"; then AC_DEFINE(PARALLEL_MARK) fi AC_DEFINE(THREAD_LOCAL_ALLOC) --- 74,83 ---- THREADS=posix THREADLIBS=-lpthread case "$host" in ! x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* | alpha-*-linux*) AC_DEFINE(GC_LINUX_THREADS) AC_DEFINE(_REENTRANT) ! if test "${enable_parallel_mark}" = yes; then AC_DEFINE(PARALLEL_MARK) fi AC_DEFINE(THREAD_LOCAL_ALLOC) *************** case "$THREADS" in *** 85,90 **** --- 86,95 ---- AC_DEFINE(GC_LINUX_THREADS) AC_DEFINE(_REENTRANT) ;; + *-*-aix*) + AC_DEFINE(GC_AIX_THREADS) + AC_DEFINE(_REENTRANT) + ;; *-*-hpux*) AC_MSG_WARN("Only HP/UX 11 threads are supported.") AC_DEFINE(GC_HPUX_THREADS) *************** case "$THREADS" in *** 109,124 **** AC_DEFINE(GC_IRIX_THREADS) ;; *-*-cygwin*) ! THREADLIBS= ;; esac ;; win32) AC_DEFINE(GC_WIN32_THREADS) ! AC_DEFINE(NO_GETENV) ! if test $enable_shared = yes; then ! AC_DEFINE(GC_DLL) fi ;; decosf1 | irix | mach | os2 | solaris | dce | vxworks) AC_MSG_ERROR(thread package $THREADS not yet supported) --- 114,165 ---- AC_DEFINE(GC_IRIX_THREADS) ;; *-*-cygwin*) ! AC_DEFINE(GC_WIN32_THREADS) ! ;; ! *-*-darwin*) ! AC_DEFINE(GC_DARWIN_THREADS) ! AC_DEFINE(THREAD_LOCAL_ALLOC) ! if test "${enable_parallel_mark}" = yes; then ! AC_DEFINE(PARALLEL_MARK) ! fi ! ;; ! *-*-osf*) ! AC_DEFINE(GC_OSF1_THREADS) ! if test "${enable_parallel_mark}" = yes; then ! AC_DEFINE(PARALLEL_MARK) ! AC_DEFINE(THREAD_LOCAL_ALLOC) ! # May want to enable it in other cases, too. ! # Measurements havent yet been done. ! fi ! INCLUDES="$INCLUDES -pthread" ! THREADLIBS="-lpthread -lrt" ;; esac ;; win32) AC_DEFINE(GC_WIN32_THREADS) ! dnl Old wine getenv may not return NULL for missing entry. ! dnl Define EMPTY_GETENV_RESULTS here to work around the bug. ! ;; ! dgux386) ! THREADS=dgux386 ! AC_MSG_RESULT($THREADLIBS) ! # Use pthread GCC switch ! THREADLIBS=-pthread ! if test "${enable_parallel_mark}" = yes; then ! AC_DEFINE(PARALLEL_MARK) fi + AC_DEFINE(THREAD_LOCAL_ALLOC) + AC_DEFINE(GC_DGUX386_THREADS) + AC_DEFINE(DGUX_THREADS) + # Enable _POSIX4A_DRAFT10_SOURCE with flag -pthread + INCLUDES="-pthread $INCLUDES" + ;; + aix) + THREADS=posix + THREADLIBS=-lpthread + AC_DEFINE(GC_AIX_THREADS) + AC_DEFINE(_REENTRANT) ;; decosf1 | irix | mach | os2 | solaris | dce | vxworks) AC_MSG_ERROR(thread package $THREADS not yet supported) *************** case "$THREADS" in *** 129,135 **** esac AC_SUBST(THREADLIBS) ! AC_CHECK_LIB(dl, dlopen, EXTRA_TEST_LIBS="$EXTRA_TEST_LIBS -ldl") AC_SUBST(EXTRA_TEST_LIBS) target_all=libgcjgc.la --- 170,191 ---- esac AC_SUBST(THREADLIBS) ! case "$host" in ! powerpc-*-darwin*) ! powerpc_darwin=true ! ;; ! esac ! AM_CONDITIONAL(POWERPC_DARWIN,test x$powerpc_darwin = xtrue) ! ! # We never want libdl on darwin. It is a fake libdl that just ends up making ! # dyld calls anyway ! case "$host" in ! *-*-darwin*) ;; ! *) ! AC_CHECK_LIB(dl, dlopen, EXTRA_TEST_LIBS="$EXTRA_TEST_LIBS -ldl") ! ;; ! esac ! AC_SUBST(EXTRA_TEST_LIBS) target_all=libgcjgc.la *************** TARGET_ECOS="$with_ecos" *** 147,152 **** --- 203,211 ---- ) addobjs= + addlibs= + addincludes= + addtests= CXXINCLUDES= case "$TARGET_ECOS" in no) *************** case "$TARGET_ECOS" in *** 157,177 **** addobjs="$addobjs ecos.lo" ;; esac AC_SUBST(CXX) AC_SUBST(INCLUDES) AC_SUBST(CXXINCLUDES) machdep= case "$host" in alpha*-*-openbsd*) machdep="alpha_mach_dep.lo" if test x"${ac_cv_lib_dl_dlopen}" != xyes ; then AC_MSG_WARN(OpenBSD/Alpha without dlopen(). Shared library support is disabled) - AM_DISABLE_SHARED fi ;; ! alpha*-*-*) machdep="alpha_mach_dep.lo" ;; i?86-*-solaris2.[[89]] | i?86-*-solaris2.1?) --- 216,267 ---- addobjs="$addobjs ecos.lo" ;; esac + + if test "${enable_cplusplus}" = yes; then + addincludes="$addincludes include/gc_cpp.h include/gc_allocator.h" + addtests="$addtests test_cpp" + fi + + AM_CONDITIONAL(CPLUSPLUS, test "${enable_cplusplus}" = yes) + AC_SUBST(CXX) AC_SUBST(INCLUDES) AC_SUBST(CXXINCLUDES) + # Configuration of shared libraries + # + AC_MSG_CHECKING(whether to build shared libraries) + AC_ENABLE_SHARED + + case "$host" in + alpha-*-openbsd*) + enable_shared=no + AC_MSG_RESULT(no) + ;; + *) + AC_MSG_RESULT(yes) + ;; + esac + + # Configuration of machine-dependent code + # + # We don't set NO_EXECUTE_PERMISSION by default because gcj (and + # anything else that creates trampolines in gc-allocated memory) + # always needs exec permission. The exceptions to this are IA-64 and + # some variations of Power PC, where trampolines don't contain + # executable code. + # + AC_MSG_CHECKING(which machine-dependent code should be used) machdep= case "$host" in alpha*-*-openbsd*) machdep="alpha_mach_dep.lo" if test x"${ac_cv_lib_dl_dlopen}" != xyes ; then AC_MSG_WARN(OpenBSD/Alpha without dlopen(). Shared library support is disabled) fi ;; ! alpha*-*-linux*) machdep="alpha_mach_dep.lo" ;; i?86-*-solaris2.[[89]] | i?86-*-solaris2.1?) *************** case "$host" in *** 185,195 **** mips-dec-ultrix*) machdep="mips_ultrix_mach-dep.lo" ;; ! mips*-*-linux*) ;; mips-*-*) machdep="mips_sgi_mach_dep.lo" ! AC_DEFINE(NO_EXECUTE_PERMISSION) ;; sparc-sun-solaris2.3) machdep="sparc_mach_dep.lo" --- 275,289 ---- mips-dec-ultrix*) machdep="mips_ultrix_mach-dep.lo" ;; ! mips-nec-sysv*|mips-unknown-sysv*) ;; + mips*-*-linux*) + ;; mips-*-*) machdep="mips_sgi_mach_dep.lo" ! ;; ! sparc-*-netbsd*) ! machdep="sparc_netbsd_mach_dep.lo" ;; sparc-sun-solaris2.3) machdep="sparc_mach_dep.lo" *************** case "$host" in *** 199,218 **** machdep="sparc_mach_dep.lo" ;; ia64-*-*) machdep="mach_dep.lo ia64_save_regs_in_stack.lo" ;; esac if test x"$machdep" = x; then machdep="mach_dep.lo" fi addobjs="$addobjs $machdep" AC_SUBST(addobjs) dnl As of 4.13a2, the collector will not properly work on Solaris when dnl built with gcc and -O. So we remove -O in the appropriate case. case "$host" in ! sparc-sun-solaris2*) if test "$GCC" = yes; then new_CFLAGS= for i in $CFLAGS; do case "$i" in --- 293,362 ---- machdep="sparc_mach_dep.lo" ;; ia64-*-*) + AC_DEFINE(NO_EXECUTE_PERMISSION) machdep="mach_dep.lo ia64_save_regs_in_stack.lo" ;; esac if test x"$machdep" = x; then + AC_MSG_RESULT($machdep) machdep="mach_dep.lo" fi addobjs="$addobjs $machdep" AC_SUBST(addobjs) + AC_SUBST(addincludes) + AC_SUBST(addlibs) + AC_SUBST(addtests) + + AC_PROG_LIBTOOL + + # + # Check for AViiON Machines running DGUX + # + AC_MSG_CHECKING(if host is AViiON running DGUX) + ac_is_dgux=no + AC_CHECK_HEADER(sys/dg_sys_info.h, + [ac_is_dgux=yes;]) + + AC_MSG_RESULT($ac_is_dgux) + ## :GOTCHA: we do not check anything but sys/dg_sys_info.h + if test $ac_is_dgux = yes; then + if test "$enable_full_debug" = "yes"; then + CFLAGS="-g -mstandard -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2" + CXXFLAGS="-g -mstandard -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2" + else + CFLAGS="-DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2" + CXXFLAGS="-DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2" + fi + AC_SUBST(CFLAGS) + AC_SUBST(CXXFLAGS) + fi + + dnl We use these options to decide which functions to include. + AC_ARG_WITH(target-subdir, + [ --with-target-subdir=SUBDIR + configuring with a cross compiler]) + AC_ARG_WITH(cross-host, + [ --with-cross-host=HOST configuring with a cross compiler]) + + # automake wants to see AC_EXEEXT. But we don't need it. And having + # it is actually a problem, because the compiler we're passed can't + # necessarily do a full link. So we fool automake here. + if false; then + # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands + # to nothing, so nothing would remain between `then' and `fi' if it + # were not for the `:' below. + : + AC_EXEEXT + fi dnl As of 4.13a2, the collector will not properly work on Solaris when dnl built with gcc and -O. So we remove -O in the appropriate case. + dnl + AC_MSG_CHECKING(whether Solaris gcc optimization fix is necessary) case "$host" in ! sparc-sun-solaris2*|*aix*) if test "$GCC" = yes; then + AC_MSG_RESULT(yes) new_CFLAGS= for i in $CFLAGS; do case "$i" in *************** case "$host" in *** 224,231 **** --- 368,378 ---- esac done CFLAGS="$new_CFLAGS" + else + AC_MSG_RESULT(no) fi ;; + *) AC_MSG_RESULT(no) ;; esac dnl We need to override the top-level CFLAGS. This is how we do it. *************** dnl Include defines that have become de *** 236,242 **** dnl ALL_INTERIOR_POINTERS can be overridden in startup code. AC_DEFINE(SILENT) AC_DEFINE(NO_SIGNALS) - AC_DEFINE(NO_EXECUTE_PERMISSION) AC_DEFINE(ALL_INTERIOR_POINTERS) dnl By default, make the library as general as possible. --- 383,388 ---- *************** AC_ARG_ENABLE(full-debug, *** 267,272 **** --- 413,421 ---- AC_MSG_WARN("Client must not use -fomit-frame-pointer.") AC_DEFINE(SAVE_CALL_COUNT, 8) ;; + i[3456]86-*-dgux*) + AC_DEFINE(MAKE_BACK_GRAPH) + ;; esac ] fi) *************** else *** 278,284 **** toolexecdir='$(libdir)/gcc-lib/$(target_alias)' toolexeclibdir='$(libdir)' fi ! toolexeclibdir=$toolexeclibdir/`$CC -print-multi-os-directory` AC_SUBST(toolexecdir) AC_SUBST(toolexeclibdir) --- 427,437 ---- toolexecdir='$(libdir)/gcc-lib/$(target_alias)' toolexeclibdir='$(libdir)' fi ! multi_os_directory=`$CC -print-multi-os-directory` ! case $multi_os_directory in ! .) ;; # Avoid trailing /. ! *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; ! esac AC_SUBST(toolexecdir) AC_SUBST(toolexeclibdir) *************** else *** 289,296 **** fi AC_OUTPUT(Makefile include/Makefile, [ ! dnl Put all the -D options in a file. ! echo "$DEFS" > boehm-cflags if test -n "$CONFIG_FILES"; then LD="${ORIGINAL_LD_FOR_MULTILIBS}" --- 442,449 ---- fi AC_OUTPUT(Makefile include/Makefile, [ ! dnl Put all the -I and -D options in a file. ! echo "$INCLUDES $DEFS" > boehm-cflags if test -n "$CONFIG_FILES"; then LD="${ORIGINAL_LD_FOR_MULTILIBS}" *************** gc_basedir=${gc_basedir} *** 306,309 **** --- 459,463 ---- CC="${CC}" ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}" DEFS="$DEFS" + INCLUDES="$INCLUDES" ) diff -Nrc3pad gcc-3.3.3/boehm-gc/cord/cordbscs.c gcc-3.4.0/boehm-gc/cord/cordbscs.c *** gcc-3.3.3/boehm-gc/cord/cordbscs.c 2001-08-17 18:30:48.000000000 +0000 --- gcc-3.4.0/boehm-gc/cord/cordbscs.c 2003-07-28 04:18:22.000000000 +0000 *************** CORD CORD_cat_char_star(CORD x, const ch *** 219,225 **** result->len = result_len; result->left = x; result->right = y; ! if (depth > MAX_DEPTH) { return(CORD_balance((CORD)result)); } else { return((CORD) result); --- 219,225 ---- result->len = result_len; result->left = x; result->right = y; ! if (depth >= MAX_DEPTH) { return(CORD_balance((CORD)result)); } else { return((CORD) result); *************** CORD CORD_cat(CORD x, CORD y) *** 260,266 **** result->len = result_len; result->left = x; result->right = y; ! return((CORD) result); } } --- 260,270 ---- result->len = result_len; result->left = x; result->right = y; ! if (depth >= MAX_DEPTH) { ! return(CORD_balance((CORD)result)); ! } else { ! return((CORD) result); ! } } } diff -Nrc3pad gcc-3.3.3/boehm-gc/cord/cordprnt.c gcc-3.4.0/boehm-gc/cord/cordprnt.c *** gcc-3.3.3/boehm-gc/cord/cordprnt.c 2001-08-17 18:30:48.000000000 +0000 --- gcc-3.4.0/boehm-gc/cord/cordprnt.c 2003-07-28 04:18:22.000000000 +0000 *************** int CORD_vsprintf(CORD * out, CORD forma *** 233,239 **** if (width == NONE && prec == NONE) { register char c; ! c = va_arg(args, int); CORD_ec_append(result, c); goto done; } --- 233,239 ---- if (width == NONE && prec == NONE) { register char c; ! c = (char)va_arg(args, int); CORD_ec_append(result, c); goto done; } *************** int CORD_vsprintf(CORD * out, CORD forma *** 255,266 **** /* Use standard sprintf to perform conversion */ { register char * buf; ! va_list vsprintf_args = args; ! /* The above does not appear to be sanctioned */ ! /* by the ANSI C standard. */ int max_size = 0; int res; ! if (width == VARIABLE) width = va_arg(args, int); if (prec == VARIABLE) prec = va_arg(args, int); if (width != NONE) max_size = width; --- 255,272 ---- /* Use standard sprintf to perform conversion */ { register char * buf; ! va_list vsprintf_args; int max_size = 0; int res; ! # ifdef __va_copy ! __va_copy(vsprintf_args, args); ! # else ! # if defined(__GNUC__) /* and probably in other cases */ ! va_copy(vsprintf_args, args); ! # else ! vsprintf_args = args; ! # endif ! # endif if (width == VARIABLE) width = va_arg(args, int); if (prec == VARIABLE) prec = va_arg(args, int); if (width != NONE) max_size = width; diff -Nrc3pad gcc-3.3.3/boehm-gc/cord/de_win.c gcc-3.4.0/boehm-gc/cord/de_win.c *** gcc-3.3.3/boehm-gc/cord/de_win.c 2001-08-17 18:30:48.000000000 +0000 --- gcc-3.4.0/boehm-gc/cord/de_win.c 2003-07-28 04:18:22.000000000 +0000 *************** LRESULT CALLBACK WndProc (HWND hwnd, UIN *** 249,255 **** case IDM_HELPABOUT: if( DialogBox( hInstance, "ABOUTBOX", ! hwnd, lpfnAboutBox ) ); InvalidateRect( hwnd, NULL, TRUE ); return( 0 ); case IDM_HELPCONTENTS: --- 249,255 ---- case IDM_HELPABOUT: if( DialogBox( hInstance, "ABOUTBOX", ! hwnd, lpfnAboutBox ) ) InvalidateRect( hwnd, NULL, TRUE ); return( 0 ); case IDM_HELPCONTENTS: diff -Nrc3pad gcc-3.3.3/boehm-gc/darwin_stop_world.c gcc-3.4.0/boehm-gc/darwin_stop_world.c *** gcc-3.3.3/boehm-gc/darwin_stop_world.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/boehm-gc/darwin_stop_world.c 2003-07-28 03:46:09.000000000 +0000 *************** *** 0 **** --- 1,209 ---- + #include "private/pthread_support.h" + + # if defined(GC_DARWIN_THREADS) + + #define DEBUG_THREADS 0 + + /* From "Inside Mac OS X - Mach-O Runtime Architecture" published by Apple + Page 49: + "The space beneath the stack pointer, where a new stack frame would normally + be allocated, is called the red zone. This area as shown in Figure 3-2 may + be used for any purpose as long as a new stack frame does not need to be + added to the stack." + + Page 50: "If a leaf procedure's red zone usage would exceed 224 bytes, then + it must set up a stack frame just like routines that call other routines." + */ + #define PPC_RED_ZONE_SIZE 224 + + void GC_push_all_stacks() { + int i; + kern_return_t r; + GC_thread p; + pthread_t me; + ptr_t lo, hi; + # if defined(POWERPC) + ppc_thread_state_t state; + # else + # error FIXME for non-ppc OS X + # endif + mach_msg_type_number_t thread_state_count = MACHINE_THREAD_STATE_COUNT; + + me = pthread_self(); + if (!GC_thr_initialized) GC_thr_init(); + + for(i=0;inext) { + if(p -> flags & FINISHED) continue; + if(pthread_equal(p->id,me)) { + lo = GC_approx_sp(); + } else { + /* Get the thread state (registers, etc) */ + r = thread_get_state( + p->stop_info.mach_thread, + MACHINE_THREAD_STATE, + (natural_t*)&state, + &thread_state_count); + if(r != KERN_SUCCESS) ABORT("thread_get_state failed"); + + #ifdef POWERPC + lo = (void*)(state.r1 - PPC_RED_ZONE_SIZE); + + GC_push_one(state.r0); + GC_push_one(state.r2); + GC_push_one(state.r3); + GC_push_one(state.r4); + GC_push_one(state.r5); + GC_push_one(state.r6); + GC_push_one(state.r7); + GC_push_one(state.r8); + GC_push_one(state.r9); + GC_push_one(state.r10); + GC_push_one(state.r11); + GC_push_one(state.r12); + GC_push_one(state.r13); + GC_push_one(state.r14); + GC_push_one(state.r15); + GC_push_one(state.r16); + GC_push_one(state.r17); + GC_push_one(state.r18); + GC_push_one(state.r19); + GC_push_one(state.r20); + GC_push_one(state.r21); + GC_push_one(state.r22); + GC_push_one(state.r23); + GC_push_one(state.r24); + GC_push_one(state.r25); + GC_push_one(state.r26); + GC_push_one(state.r27); + GC_push_one(state.r28); + GC_push_one(state.r29); + GC_push_one(state.r30); + GC_push_one(state.r31); + #else + # error FIXME for non-PPC darwin + #endif /* !POWERPC */ + } /* p != me */ + if(p->flags & MAIN_THREAD) + hi = GC_stackbottom; + else + hi = p->stack_end; + #if DEBUG_THREADS + GC_printf3("Darwin: Stack for thread 0x%lx = [%lx,%lx)\n", + (unsigned long) p -> id, + (unsigned long) lo, + (unsigned long) hi + ); + #endif + GC_push_all_stack(lo,hi); + } /* for(p=GC_threads[i]...) */ + } /* for(i=0;i next) { + if (p -> id == my_thread) continue; + if (p -> flags & FINISHED) continue; + if (p -> thread_blocked) /* Will wait */ continue; + + #if DEBUG_THREADS + GC_printf1("Suspending thread 0x%lx\n", p -> id); + #endif + + /* Suspend the thread */ + kern_result = thread_suspend(p->stop_info.mach_thread); + if(kern_result != KERN_SUCCESS) ABORT("thread_suspend failed"); + + /* This is only needed if we are modifying the threads + state. thread_abort_safely should also be used + if this code is ever added in again. + + kern_result = thread_abort(p->stop_info.mach_thread); + if(kern_result != KERN_SUCCESS) + ABORT("thread_abort failed (%ul)",kern_result); + */ + } + } + + # ifdef MPROTECT_VDB + if(GC_incremental) { + extern void GC_mprotect_stop(); + GC_mprotect_stop(); + } + # endif + + # ifdef PARALLEL_MARK + GC_release_mark_lock(); + # endif + #if DEBUG_THREADS + GC_printf1("World stopped from 0x%lx\n", pthread_self()); + #endif + } + + /* Caller holds allocation lock, and has held it continuously since */ + /* the world stopped. */ + void GC_start_world() + { + pthread_t my_thread = pthread_self(); + int i; + GC_thread p; + kern_return_t kern_result; + + # if DEBUG_THREADS + GC_printf0("World starting\n"); + # endif + + # ifdef MPROTECT_VDB + if(GC_incremental) { + extern void GC_mprotect_resume(); + GC_mprotect_resume(); + } + # endif + + for (i = 0; i < THREAD_TABLE_SZ; i++) { + for (p = GC_threads[i]; p != 0; p = p -> next) { + if (p -> id == my_thread) continue; + if (p -> flags & FINISHED) continue; + if (p -> thread_blocked) continue; + + #if DEBUG_THREADS + GC_printf1("Resuming 0x%lx\n", p -> id); + #endif + + /* Resume the thread */ + kern_result = thread_resume(p->stop_info.mach_thread); + if(kern_result != KERN_SUCCESS) ABORT("thread_resume failed"); + } + } + #if DEBUG_THREADS + GC_printf0("World started\n"); + #endif + } + + void GC_stop_init() { + + } + + #endif diff -Nrc3pad gcc-3.3.3/boehm-gc/dbg_mlc.c gcc-3.4.0/boehm-gc/dbg_mlc.c *** gcc-3.3.3/boehm-gc/dbg_mlc.c 2002-02-13 05:38:39.000000000 +0000 --- gcc-3.4.0/boehm-gc/dbg_mlc.c 2003-07-28 04:18:20.000000000 +0000 *************** ptr_t p; *** 60,66 **** # include # if defined(LINUX) || defined(SUNOS4) || defined(SUNOS5) \ ! || defined(HPUX) || defined(IRIX) || defined(OSF1) # define RANDOM() random() # else # define RANDOM() (long)rand() --- 60,66 ---- # include # if defined(LINUX) || defined(SUNOS4) || defined(SUNOS5) \ ! || defined(HPUX) || defined(IRIX5) || defined(OSF1) # define RANDOM() random() # else # define RANDOM() (long)rand() *************** ptr_t p; *** 228,233 **** --- 228,235 ---- #endif /* KEEP_BACK_PTRS */ + # define CROSSES_HBLK(p, sz) \ + (((word)(p + sizeof(oh) + sz - 1) ^ (word)p) >= HBLKSIZE) /* Store debugging info into p. Return displaced pointer. */ /* Assumes we don't hold allocation lock. */ ptr_t GC_store_debug_info(p, sz, string, integer) *************** word integer; *** 243,248 **** --- 245,252 ---- /* But that's expensive. And this way things should only appear */ /* inconsistent while we're in the handler. */ LOCK(); + GC_ASSERT(GC_size(p) >= sizeof(oh) + sz); + GC_ASSERT(!(SMALL_OBJ(sz) && CROSSES_HBLK(p, sz))); # ifdef KEEP_BACK_PTRS ((oh *)p) -> oh_back_ptr = HIDE_BACK_PTR(NOT_MARKED); # endif *************** word integer; *** 275,280 **** --- 279,286 ---- /* There is some argument that we should disable signals here. */ /* But that's expensive. And this way things should only appear */ /* inconsistent while we're in the handler. */ + GC_ASSERT(GC_size(p) >= sizeof(oh) + sz); + GC_ASSERT(!(SMALL_OBJ(sz) && CROSSES_HBLK(p, sz))); # ifdef KEEP_BACK_PTRS ((oh *)p) -> oh_back_ptr = HIDE_BACK_PTR(NOT_MARKED); # endif *************** ptr_t p; *** 324,333 **** { register oh * ohdr = (oh *)GC_base(p); GC_err_printf1("0x%lx (", ((unsigned long)ohdr + sizeof(oh))); GC_err_puts(ohdr -> oh_string); # ifdef SHORT_DBG_HDRS ! GC_err_printf1(":%ld, sz=%ld)\n", (unsigned long)(ohdr -> oh_int)); # else GC_err_printf2(":%ld, sz=%ld)\n", (unsigned long)(ohdr -> oh_int), (unsigned long)(ohdr -> oh_sz)); --- 330,340 ---- { register oh * ohdr = (oh *)GC_base(p); + GC_ASSERT(!I_HOLD_LOCK()); GC_err_printf1("0x%lx (", ((unsigned long)ohdr + sizeof(oh))); GC_err_puts(ohdr -> oh_string); # ifdef SHORT_DBG_HDRS ! GC_err_printf1(":%ld)\n", (unsigned long)(ohdr -> oh_int)); # else GC_err_printf2(":%ld, sz=%ld)\n", (unsigned long)(ohdr -> oh_int), (unsigned long)(ohdr -> oh_sz)); *************** ptr_t p; *** 342,347 **** --- 349,355 ---- ptr_t p; # endif { + GC_ASSERT(!I_HOLD_LOCK()); if (GC_HAS_DEBUG_INFO(p)) { GC_print_obj(p); } else { *************** ptr_t p, clobbered_addr; *** 355,360 **** --- 363,369 ---- { register oh * ohdr = (oh *)GC_base(p); + GC_ASSERT(!I_HOLD_LOCK()); GC_err_printf2("0x%lx in object at 0x%lx(", (unsigned long)clobbered_addr, (unsigned long)p); if (clobbered_addr <= (ptr_t)(&(ohdr -> oh_sz)) *************** ptr_t p, clobbered_addr; *** 376,389 **** --- 385,402 ---- void GC_check_heap_proc GC_PROTO((void)); + void GC_print_all_smashed_proc GC_PROTO((void)); + void GC_do_nothing() {} void GC_start_debugging() { # ifndef SHORT_DBG_HDRS GC_check_heap = GC_check_heap_proc; + GC_print_all_smashed = GC_print_all_smashed_proc; # else GC_check_heap = GC_do_nothing; + GC_print_all_smashed = GC_do_nothing; # endif GC_print_heap_obj = GC_debug_print_heap_obj_proc; GC_debugging_started = TRUE; *************** void GC_start_debugging() *** 429,434 **** --- 442,503 ---- return (GC_store_debug_info(result, (word)lb, s, (word)i)); } + # ifdef __STDC__ + GC_PTR GC_debug_malloc_ignore_off_page(size_t lb, GC_EXTRA_PARAMS) + # else + GC_PTR GC_debug_malloc_ignore_off_page(lb, s, i) + size_t lb; + char * s; + int i; + # ifdef GC_ADD_CALLER + --> GC_ADD_CALLER not implemented for K&R C + # endif + # endif + { + GC_PTR result = GC_malloc_ignore_off_page(lb + DEBUG_BYTES); + + if (result == 0) { + GC_err_printf1("GC_debug_malloc_ignore_off_page(%ld) returning NIL (", + (unsigned long) lb); + GC_err_puts(s); + GC_err_printf1(":%ld)\n", (unsigned long)i); + return(0); + } + if (!GC_debugging_started) { + GC_start_debugging(); + } + ADD_CALL_CHAIN(result, ra); + return (GC_store_debug_info(result, (word)lb, s, (word)i)); + } + + # ifdef __STDC__ + GC_PTR GC_debug_malloc_atomic_ignore_off_page(size_t lb, GC_EXTRA_PARAMS) + # else + GC_PTR GC_debug_malloc_atomic_ignore_off_page(lb, s, i) + size_t lb; + char * s; + int i; + # ifdef GC_ADD_CALLER + --> GC_ADD_CALLER not implemented for K&R C + # endif + # endif + { + GC_PTR result = GC_malloc_atomic_ignore_off_page(lb + DEBUG_BYTES); + + if (result == 0) { + GC_err_printf1("GC_debug_malloc_atomic_ignore_off_page(%ld)" + " returning NIL (", (unsigned long) lb); + GC_err_puts(s); + GC_err_printf1(":%ld)\n", (unsigned long)i); + return(0); + } + if (!GC_debugging_started) { + GC_start_debugging(); + } + ADD_CALL_CHAIN(result, ra); + return (GC_store_debug_info(result, (word)lb, s, (word)i)); + } + # ifdef DBG_HDRS_ALL /* * An allocation function for internal use. *************** void GC_start_debugging() *** 447,453 **** (unsigned long) lb); return(0); } ! ADD_CALL_CHAIN(result, ra); return (GC_store_debug_info_inner(result, (word)lb, "INTERNAL", (word)0)); } --- 516,522 ---- (unsigned long) lb); return(0); } ! ADD_CALL_CHAIN(result, GC_RETURN_ADDR); return (GC_store_debug_info_inner(result, (word)lb, "INTERNAL", (word)0)); } *************** void GC_start_debugging() *** 461,467 **** (unsigned long) lb); return(0); } ! ADD_CALL_CHAIN(result, ra); return (GC_store_debug_info_inner(result, (word)lb, "INTERNAL", (word)0)); } # endif --- 530,536 ---- (unsigned long) lb); return(0); } ! ADD_CALL_CHAIN(result, GC_RETURN_ADDR); return (GC_store_debug_info_inner(result, (word)lb, "INTERNAL", (word)0)); } # endif *************** GC_PTR p; *** 592,598 **** int i; # endif { ! GC_PTR result = GC_malloc_uncollectable(lb + DEBUG_BYTES); if (result == 0) { GC_err_printf1("GC_debug_malloc_uncollectable(%ld) returning NIL (", --- 661,667 ---- int i; # endif { ! GC_PTR result = GC_malloc_uncollectable(lb + UNCOLLECTABLE_DEBUG_BYTES); if (result == 0) { GC_err_printf1("GC_debug_malloc_uncollectable(%ld) returning NIL (", *************** GC_PTR p; *** 618,624 **** int i; # endif { ! GC_PTR result = GC_malloc_atomic_uncollectable(lb + DEBUG_BYTES); if (result == 0) { GC_err_printf1( --- 687,694 ---- int i; # endif { ! GC_PTR result = ! GC_malloc_atomic_uncollectable(lb + UNCOLLECTABLE_DEBUG_BYTES); if (result == 0) { GC_err_printf1( *************** void GC_debug_free_inner(GC_PTR p) *** 774,779 **** --- 844,888 ---- } #ifndef SHORT_DBG_HDRS + + /* List of smashed objects. We defer printing these, since we can't */ + /* always print them nicely with the allocation lock held. */ + /* We put them here instead of in GC_arrays, since it may be useful to */ + /* be able to look at them with the debugger. */ + #define MAX_SMASHED 20 + ptr_t GC_smashed[MAX_SMASHED]; + unsigned GC_n_smashed = 0; + + # if defined(__STDC__) || defined(__cplusplus) + void GC_add_smashed(ptr_t smashed) + # else + void GC_add_smashed(smashed) + ptr_t smashed; + #endif + { + GC_ASSERT(GC_is_marked(GC_base(smashed))); + GC_smashed[GC_n_smashed] = smashed; + if (GC_n_smashed < MAX_SMASHED - 1) ++GC_n_smashed; + /* In case of overflow, we keep the first MAX_SMASHED-1 */ + /* entries plus the last one. */ + GC_have_errors = TRUE; + } + + /* Print all objects on the list. Clear the list. */ + void GC_print_all_smashed_proc () + { + unsigned i; + + GC_ASSERT(!I_HOLD_LOCK()); + if (GC_n_smashed == 0) return; + GC_err_printf0("GC_check_heap_block: found smashed heap objects:\n"); + for (i = 0; i < GC_n_smashed; ++i) { + GC_print_smashed_obj(GC_base(GC_smashed[i]), GC_smashed[i]); + GC_smashed[i] = 0; + } + GC_n_smashed = 0; + } + /* Check all marked objects in the given block for validity */ /*ARGSUSED*/ # if defined(__STDC__) || defined(__cplusplus) *************** void GC_debug_free_inner(GC_PTR p) *** 802,812 **** && GC_HAS_DEBUG_INFO((ptr_t)p)) { ptr_t clobbered = GC_check_annotated_obj((oh *)p); ! if (clobbered != 0) { ! GC_err_printf0( ! "GC_check_heap_block: found smashed location at "); ! GC_print_smashed_obj((ptr_t)p, clobbered); ! } } word_no += sz; p += sz; --- 911,917 ---- && GC_HAS_DEBUG_INFO((ptr_t)p)) { ptr_t clobbered = GC_check_annotated_obj((oh *)p); ! if (clobbered != 0) GC_add_smashed(clobbered); } word_no += sz; p += sz; *************** void GC_debug_free_inner(GC_PTR p) *** 819,827 **** void GC_check_heap_proc() { # ifndef SMALL_CONFIG ! if (sizeof(oh) & (2 * sizeof(word) - 1) != 0) { ! ABORT("Alignment problem: object header has inappropriate size\n"); ! } # endif GC_apply_to_all_blocks(GC_check_heap_block, (word)0); } --- 924,934 ---- void GC_check_heap_proc() { # ifndef SMALL_CONFIG ! # ifdef ALIGN_DOUBLE ! GC_STATIC_ASSERT((sizeof(oh) & (2 * sizeof(word) - 1)) == 0); ! # else ! GC_STATIC_ASSERT((sizeof(oh) & (sizeof(word) - 1)) == 0); ! # endif # endif GC_apply_to_all_blocks(GC_check_heap_block, (word)0); } *************** struct closure { *** 842,853 **** # endif { struct closure * result = ! # ifdef DBG_HDRS_ALL ! (struct closure *) GC_debug_malloc(sizeof (struct closure), ! GC_EXTRAS); ! # else ! (struct closure *) GC_malloc(sizeof (struct closure)); ! # endif result -> cl_fn = fn; result -> cl_data = data; --- 949,960 ---- # endif { struct closure * result = ! # ifdef DBG_HDRS_ALL ! (struct closure *) GC_debug_malloc(sizeof (struct closure), ! GC_EXTRAS); ! # else ! (struct closure *) GC_malloc(sizeof (struct closure)); ! # endif result -> cl_fn = fn; result -> cl_data = data; *************** GC_PTR *ocd; *** 908,914 **** ptr_t base = GC_base(obj); if (0 == base || (ptr_t)obj - base != sizeof(oh)) { GC_err_printf1( ! "GC_register_finalizer called with non-base-pointer 0x%lx\n", obj); } if (0 == fn) { --- 1015,1021 ---- ptr_t base = GC_base(obj); if (0 == base || (ptr_t)obj - base != sizeof(oh)) { GC_err_printf1( ! "GC_debug_register_finalizer called with non-base-pointer 0x%lx\n", obj); } if (0 == fn) { *************** GC_PTR *ocd; *** 940,946 **** ptr_t base = GC_base(obj); if (0 == base || (ptr_t)obj - base != sizeof(oh)) { GC_err_printf1( ! "GC_register_finalizer_no_order called with non-base-pointer 0x%lx\n", obj); } if (0 == fn) { --- 1047,1053 ---- ptr_t base = GC_base(obj); if (0 == base || (ptr_t)obj - base != sizeof(oh)) { GC_err_printf1( ! "GC_debug_register_finalizer_no_order called with non-base-pointer 0x%lx\n", obj); } if (0 == fn) { *************** GC_PTR *ocd; *** 973,979 **** ptr_t base = GC_base(obj); if (0 == base || (ptr_t)obj - base != sizeof(oh)) { GC_err_printf1( ! "GC_register_finalizer_ignore_self called with non-base-pointer 0x%lx\n", obj); } if (0 == fn) { --- 1080,1086 ---- ptr_t base = GC_base(obj); if (0 == base || (ptr_t)obj - base != sizeof(oh)) { GC_err_printf1( ! "GC_debug_register_finalizer_ignore_self called with non-base-pointer 0x%lx\n", obj); } if (0 == fn) { diff -Nrc3pad gcc-3.3.3/boehm-gc/depcomp gcc-3.4.0/boehm-gc/depcomp *** gcc-3.3.3/boehm-gc/depcomp 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/boehm-gc/depcomp 2003-07-28 03:46:15.000000000 +0000 *************** *** 0 **** --- 1,436 ---- + #! /bin/sh + + # depcomp - compile a program generating dependencies as side-effects + # Copyright 1999, 2000 Free Software Foundation, Inc. + + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2, or (at your option) + # any later version. + + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + # 02111-1307, USA. + + # As a special exception to the GNU General Public License, if you + # distribute this file as part of a program that contains a + # configuration script generated by Autoconf, you may include it under + # the same distribution terms that you use for the rest of that program. + + # Originally written by Alexandre Oliva . + + if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 + fi + # `libtool' can also be set to `yes' or `no'. + + if test -z "$depfile"; then + base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` + dir=`echo "$object" | sed 's,/.*$,/,'` + if test "$dir" = "$object"; then + dir= + fi + # FIXME: should be _deps on DOS. + depfile="$dir.deps/$base" + fi + + tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + + rm -f "$tmpdepfile" + + # Some modes work just like other modes, but use different flags. We + # parameterize here, but still list the modes in the big case below, + # to make depend.m4 easier to write. Note that we *cannot* use a case + # here, because this file can only contain one case statement. + if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc + fi + + if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout + fi + + case "$depmode" in + gcc3) + ## gcc 3 implements dependency tracking that does exactly what + ## we want. Yay! Note: for some reason libtool 1.4 doesn't like + ## it if -MD -MP comes after the -MF stuff. Hmm. + "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + + gcc) + ## There are various ways to get dependency output from gcc. Here's + ## why we pick this rather obscure method: + ## - Don't want to use -MD because we'd like the dependencies to end + ## up in a subdir. Having to rename by hand is ugly. + ## (We might end up doing this anyway to support other compilers.) + ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like + ## -MM, not -M (despite what the docs say). + ## - Using -M directly means running the compiler twice (even worse + ## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz + ## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" + ## This next piece of magic avoids the `deleted header file' problem. + ## The problem is that when a header file which appears in a .P file + ## is deleted, the dependency causes make to die (because there is + ## typically no way to rebuild the header). We avoid this by adding + ## dummy dependencies for each header file. Too bad gcc doesn't do + ## this for us directly. + tr ' ' ' + ' < "$tmpdepfile" | + ## Some versions of gcc put a space before the `:'. On the theory + ## that the space means something, we add a space to the output as + ## well. + ## Some versions of the HPUX 10.20 sed can't process this invocation + ## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + + hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + + sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' + ' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' + ' ' ' >> $depfile + echo >> $depfile + + # The second pass generates a dummy entry for each header file. + tr ' ' ' + ' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> $depfile + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + + aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. This file always lives in the current directory. + # Also, the AIX compiler puts `$object:' at the start of each line; + # $object doesn't have directory information. + stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` + tmpdepfile="$stripped.u" + outname="$stripped.o" + if test "$libtool" = yes; then + "$@" -Wc,-M + else + "$@" -M + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + + if test -f "$tmpdepfile"; then + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" + sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + + tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + + base=`echo "$object" | sed -e 's/\.o$//' -e 's/\.lo$//'` + tmpdepfile1="$base.o.d" + tmpdepfile2="$base.d" + if test "$libtool" = yes; then + "$@" -Wc,-MD + else + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + if test -f "$tmpdepfile1"; then + tmpdepfile="$tmpdepfile1" + else + tmpdepfile="$tmpdepfile2" + fi + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a space and a tab in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + + #nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + + dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the proprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + test -z "$dashmflag" && dashmflag=-M + ( IFS=" " + case " $* " in + *" --mode=compile "*) # this is libtool, let us make it quiet + for arg + do # cycle over the arguments + case "$arg" in + "--mode=compile") + # insert --quiet before "--mode=compile" + set fnord "$@" --quiet + shift # fnord + ;; + esac + set fnord "$@" "$arg" + shift # fnord + shift # "$arg" + done + ;; + esac + "$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + ) & + proc=$! + "$@" + stat=$? + wait "$proc" + if test "$stat" != 0; then exit $stat; fi + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' + ' < "$tmpdepfile" | \ + ## Some versions of the HPUX 10.20 sed can't process this invocation + ## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + + dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + + makedepend) + # X makedepend + ( + shift + cleared=no + for arg in "$@"; do + case $cleared in no) + set ""; shift + cleared=yes + esac + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift;; + -*) + ;; + *) + set fnord "$@" "$arg"; shift;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@" + ) & + proc=$! + "$@" + stat=$? + wait "$proc" + if test "$stat" != 0; then exit $stat; fi + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' + ' | \ + ## Some versions of the HPUX 10.20 sed can't process this invocation + ## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + + cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the proprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + ( IFS=" " + case " $* " in + *" --mode=compile "*) + for arg + do # cycle over the arguments + case $arg in + "--mode=compile") + # insert --quiet before "--mode=compile" + set fnord "$@" --quiet + shift # fnord + ;; + esac + set fnord "$@" "$arg" + shift # fnord + shift # "$arg" + done + ;; + esac + "$@" -E | + sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + ) & + proc=$! + "$@" + stat=$? + wait "$proc" + if test "$stat" != 0; then exit $stat; fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + + msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the proprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + ( IFS=" " + case " $* " in + *" --mode=compile "*) + for arg + do # cycle over the arguments + case $arg in + "--mode=compile") + # insert --quiet before "--mode=compile" + set fnord "$@" --quiet + shift # fnord + ;; + esac + set fnord "$@" "$arg" + shift # fnord + shift # "$arg" + done + ;; + esac + for arg + do + case "$arg" in + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + ) & + proc=$! + "$@" + stat=$? + wait "$proc" + if test "$stat" != 0; then exit $stat; fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + + none) + exec "$@" + ;; + + *) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; + esac + + exit 0 diff -Nrc3pad gcc-3.3.3/boehm-gc/doc/debugging.html gcc-3.4.0/boehm-gc/doc/debugging.html *** gcc-3.3.3/boehm-gc/doc/debugging.html 2002-02-12 04:37:55.000000000 +0000 --- gcc-3.4.0/boehm-gc/doc/debugging.html 2003-07-28 04:18:22.000000000 +0000 *************** The hb_last_reclaimed field wil *** 248,255 **** during which its block was last swept.
  • Verify that the offending object still has its correct contents at this point. ! The call GC_is_marked(p) from the debugger to verify that the ! object has not been marked, and is about to be reclaimed.
  • Determine a path from a root, i.e. static variable, stack, or register variable, to the reclaimed object. Call GC_is_marked(q) for each object --- 248,259 ---- during which its block was last swept.
  • Verify that the offending object still has its correct contents at this point. ! Then call GC_is_marked(p) from the debugger to verify that the ! object has not been marked, and is about to be reclaimed. Note that ! GC_is_marked(p) expects the real address of an object (the ! address of the debug header if there is one), and thus it may ! be more appropriate to call GC_is_marked(GC_base(p)) ! instead.
  • Determine a path from a root, i.e. static variable, stack, or register variable, to the reclaimed object. Call GC_is_marked(q) for each object diff -Nrc3pad gcc-3.3.3/boehm-gc/doc/gcdescr.html gcc-3.4.0/boehm-gc/doc/gcdescr.html *** gcc-3.3.3/boehm-gc/doc/gcdescr.html 2001-08-17 18:39:18.000000000 +0000 --- gcc-3.4.0/boehm-gc/doc/gcdescr.html 2003-07-28 04:18:22.000000000 +0000 *************** *** 1,7 **** Conservative GC Algorithmic Overview ! Hans-J. Boehm, Silicon Graphics

    This is under construction

    --- 1,7 ---- Conservative GC Algorithmic Overview ! Hans-J. Boehm, HP Labs (Much of this was written at SGI)

    This is under construction

    *************** typically on the order of the page size. *** 96,115 ****

    Large block sizes are rounded up to the next multiple of HBLKSIZE and then allocated by ! GC_allochblk. This uses roughly what Paul Wilson has termed ! a "next fit" algorithm, i.e. first-fit with a rotating pointer. ! The implementation does check for a better fitting immediately ! adjacent block, which gives it somewhat better fragmentation characteristics. ! I'm now convinced it should use a best fit algorithm. The actual implementation of GC_allochblk is significantly complicated by black-listing issues (see below).

    ! Small blocks are allocated in blocks of size HBLKSIZE. ! Each block is dedicated to only one object size and kind. The allocator maintains separate free lists for each size and kind of object.

    In order to avoid allocating blocks for too many distinct object sizes, the collector normally does not directly allocate objects of every possible request size. Instead request are rounded up to one of a smaller number --- 96,119 ----

    Large block sizes are rounded up to the next multiple of HBLKSIZE and then allocated by ! GC_allochblk. Recent versions of the collector ! use an approximate best fit algorithm by keeping free lists for ! several large block sizes. ! The actual implementation of GC_allochblk is significantly complicated by black-listing issues (see below).

    ! Small blocks are allocated in chunks of size HBLKSIZE. ! Each chunk is dedicated to only one object size and kind. The allocator maintains separate free lists for each size and kind of object.

    + Once a large block is split for use in smaller objects, it can only + be used for objects of that size, unless the collector discovers a completely + empty chunk. Completely empty chunks are restored to the appropriate + large block free list. +

    In order to avoid allocating blocks for too many distinct object sizes, the collector normally does not directly allocate objects of every possible request size. Instead request are rounded up to one of a smaller number *************** expand the heap. Otherwise, we initiate *** 139,165 **** that the amount of garbage collection work per allocated byte remains constant.

    ! The above is in fat an oversimplification of the real heap expansion ! heuristic, which adjusts slightly for root size and certain kinds of ! fragmentation. In particular, programs with a large root set size and little live heap memory will expand the heap to amortize the cost of ! scanning the roots. !

    ! Versions 5.x of the collector actually collect more frequently in nonincremental mode. The large block allocator usually refuses to split large heap blocks once the garbage collection threshold is reached. This often has the effect of collecting well before the heap fills up, thus reducing fragmentation and working set size at the ! expense of GC time. 6.x will chose an intermediate strategy depending on how much large object allocation has taken place in the past. (If the collector is configured to unmap unused pages, versions 6.x ! will use the 5.x strategy.)

    ! (It has been suggested that this should be adjusted so that we favor expansion if the resulting heap still fits into physical memory. In many cases, that would no doubt help. But it is tricky to do this in a way that remains robust if multiple application are contending ! for a single pool of physical memory.)

    Mark phase

    --- 143,177 ---- that the amount of garbage collection work per allocated byte remains constant.

    ! The above is in fact an oversimplification of the real heap expansion ! and GC triggering heuristic, which adjusts slightly for root size ! and certain kinds of ! fragmentation. In particular: !

      !
    • Programs with a large root set size and little live heap memory will expand the heap to amortize the cost of ! scanning the roots. !
    • Versions 5.x of the collector actually collect more frequently in nonincremental mode. The large block allocator usually refuses to split large heap blocks once the garbage collection threshold is reached. This often has the effect of collecting well before the heap fills up, thus reducing fragmentation and working set size at the ! expense of GC time. Versions 6.x choose an intermediate strategy depending on how much large object allocation has taken place in the past. (If the collector is configured to unmap unused pages, versions 6.x ! use the 5.x strategy.) !
    • In calculating the amount of allocation since the last collection we ! give partial credit for objects we expect to be explicitly deallocated. ! Even if all objects are explicitly managed, it is often desirable to collect ! on rare occasion, since that is our only mechanism for coalescing completely ! empty chunks. !

    ! It has been suggested that this should be adjusted so that we favor expansion if the resulting heap still fits into physical memory. In many cases, that would no doubt help. But it is tricky to do this in a way that remains robust if multiple application are contending ! for a single pool of physical memory.

    Mark phase

    *************** changes to *** 204,210 ****
  • MS_NONE indicating that reachable objects are marked. ! The core mark routine GC_mark_from_mark_stack, is called repeatedly by several of the sub-phases when the mark stack starts to fill up. It is also called repeatedly in MS_ROOTS_PUSHED state to empty the mark stack. --- 216,222 ----
  • MS_NONE indicating that reachable objects are marked. ! The core mark routine GC_mark_from, is called repeatedly by several of the sub-phases when the mark stack starts to fill up. It is also called repeatedly in MS_ROOTS_PUSHED state to empty the mark stack. *************** each call, so that it can also be used b *** 213,218 **** --- 225,236 ---- It is fairly carefully tuned, since it usually consumes a large majority of the garbage collection time.

    + The fact that it perform a only a small amount of work per call also + allows it to be used as the core routine of the parallel marker. In that + case it is normally invoked on thread-private mark stacks instead of the + global mark stack. More details can be found in + scale.html +

    The marker correctly handles mark stack overflows. Whenever the mark stack overflows, the mark state is reset to MS_INVALID. Since there are already marked objects in the heap, *************** Unmarked large objects are immediately r *** 281,287 **** Each small object page is checked to see if all mark bits are clear. If so, the entire page is returned to the large object free list. Small object pages containing some reachable object are queued for later ! sweeping.

    This initial sweep pass touches only block headers, not the blocks themselves. Thus it does not require significant paging, even --- 299,306 ---- Each small object page is checked to see if all mark bits are clear. If so, the entire page is returned to the large object free list. Small object pages containing some reachable object are queued for later ! sweeping, unless we determine that the page contains very little free ! space, in which case it is not examined further.

    This initial sweep pass touches only block headers, not the blocks themselves. Thus it does not require significant paging, even *************** object itself becomes marked, we have un *** 341,352 **** a cycle involving the object. This usually results in a warning from the collector. Such objects are not finalized, since it may be unsafe to do so. See the more detailed ! discussion of finalization semantics.

    Any objects remaining unmarked at the end of this process are added to a queue of objects whose finalizers can be run. Depending on collector configuration, finalizers are dequeued and run either implicitly during allocation calls, or explicitly in response to a user request.

    The collector provides a mechanism for replacing the procedure that is used to mark through objects. This is used both to provide support for --- 360,375 ---- a cycle involving the object. This usually results in a warning from the collector. Such objects are not finalized, since it may be unsafe to do so. See the more detailed ! discussion of finalization semantics.

    Any objects remaining unmarked at the end of this process are added to a queue of objects whose finalizers can be run. Depending on collector configuration, finalizers are dequeued and run either implicitly during allocation calls, or explicitly in response to a user request. + (Note that the former is unfortunately both the default and not generally safe. + If finalizers perform synchronization, it may result in deadlocks. + Nontrivial finalizers generally need to perform synchronization, and + thus require a different collector configuration.)

    The collector provides a mechanism for replacing the procedure that is used to mark through objects. This is used both to provide support for *************** Java-style unordered finalization, and t *** 354,366 **** e.g. those arising from C++ implementations of virtual inheritance.

    Generational Collection and Dirty Bits

    ! We basically use the parallel and generational GC algorithm described in ! "Mostly Parallel Garbage Collection", by Boehm, Demers, and Shenker.

    The most significant modification is that ! the collector always runs in the allocating thread. ! There is no separate garbage collector thread. If an allocation attempt either requests a large object, or encounters an empty small object free list, and notices that there is a collection in progress, it immediately performs a small amount of marking work --- 377,390 ---- e.g. those arising from C++ implementations of virtual inheritance.

    Generational Collection and Dirty Bits

    ! We basically use the concurrent and generational GC algorithm described in ! "Mostly Parallel Garbage Collection", by Boehm, Demers, and Shenker.

    The most significant modification is that ! the collector always starts running in the allocating thread. ! There is no separate garbage collector thread. (If parallel GC is ! enabled, helper threads may also be woken up.) If an allocation attempt either requests a large object, or encounters an empty small object free list, and notices that there is a collection in progress, it immediately performs a small amount of marking work *************** cannot be satisfied from small object fr *** 389,438 **** the set of modified pages is retrieved, and we mark once again from marked objects on those pages, this time with the mutator stopped.

    ! We keep track of modified pages using one of three distinct mechanisms:

    1. Through explicit mutator cooperation. Currently this requires ! the use of GC_malloc_stubborn.
    2. ! By write-protecting physical pages and catching write faults. This is implemented for many Unix-like systems and for win32. It is not possible in a few environments.
    3. ! By retrieving dirty bit information from /proc. (Currently only Sun's Solaris supports this. Though this is considerably cleaner, performance may actually be better with mprotect and signals.)

    Thread support

    We support several different threading models. Unfortunately Pthreads, the only reasonably well standardized thread model, supports too narrow an interface for conservative garbage collection. There appears to be ! no portable way to allow the collector to coexist with various Pthreads implementations. Hence we currently support only a few of the more common Pthreads implementations.

    In particular, it is very difficult for the collector to stop all other threads in the system and examine the register contents. This is currently ! accomplished with very different mechanisms for different Pthreads implementations. The Solaris implementation temporarily disables much of the user-level threads implementation by stopping kernel-level threads ! ("lwp"s). The Irix implementation sends signals to individual Pthreads ! and has them wait in the signal handler. The Linux implementation ! is similar in spirit to the Irix one.

    ! The Irix implementation uses ! only documented Pthreads calls, but relies on extensions to their semantics, ! notably the use of mutexes and condition variables from signal ! handlers. The Linux implementation should be far closer to ! portable, though impirically it is not completely portable.

    All implementations must intercept thread creation and a few other thread-specific calls to allow enumeration of threads and location of thread stacks. This is current ! accomplished with # define's in gc.h, or optionally by using ld's function call wrapping mechanism under Linux.

    Comments are appreciated. Please send mail to ! boehm@acm.org --- 413,520 ---- the set of modified pages is retrieved, and we mark once again from marked objects on those pages, this time with the mutator stopped.

    ! We keep track of modified pages using one of several distinct mechanisms:

    1. Through explicit mutator cooperation. Currently this requires ! the use of GC_malloc_stubborn, and is rarely used.
    2. ! (MPROTECT_VDB) By write-protecting physical pages and ! catching write faults. This is implemented for many Unix-like systems and for win32. It is not possible in a few environments.
    3. ! (PROC_VDB) By retrieving dirty bit information from /proc. ! (Currently only Sun's Solaris supports this. Though this is considerably cleaner, performance may actually be better with mprotect and signals.) +
    4. + (PCR_VDB) By relying on an external dirty bit implementation, in this + case the one in Xerox PCR. +
    5. + (DEFAULT_VDB) By treating all pages as dirty. This is the default if + none of the other techniques is known to be usable, and + GC_malloc_stubborn is not used. Practical only for testing, or if + the vast majority of objects use GC_malloc_stubborn.
    +

    Black-listing

    + + The collector implements black-listing of pages, as described + in + + Boehm, ``Space Efficient Conservative Collection'', PLDI '93, also available + here. +

    + During the mark phase, the collector tracks ``near misses'', i.e. attempts + to follow a ``pointer'' to just outside the garbage-collected heap, or + to a currently unallocated page inside the heap. Pages that have been + the targets of such near misses are likely to be the targets of + misidentified ``pointers'' in the future. To minimize the future + damage caused by such misidentifications they will be allocated only to + small pointerfree objects. +

    + The collector understands two different kinds of black-listing. A + page may be black listed for interior pointer references + (GC_add_to_black_list_stack), if it was the target of a near + miss from a location that requires interior pointer recognition, + e.g. the stack, or the heap if GC_all_interior_pointers + is set. In this case, we also avoid allocating large blocks that include + this page. +

    + If the near miss came from a source that did not require interior + pointer recognition, it is black-listed with + GC_add_to_black_list_normal. + A page black-listed in this way may appear inside a large object, + so long as it is not the first page of a large object. +

    + The GC_allochblk routine respects black-listing when assigning + a block to a particular object kind and size. It occasionally + drops (i.e. allocates and forgets) blocks that are completely black-listed + in order to avoid excessively long large block free lists containing + only unusable blocks. This would otherwise become an issue + if there is low demand for small pointerfree objects. +

    Thread support

    We support several different threading models. Unfortunately Pthreads, the only reasonably well standardized thread model, supports too narrow an interface for conservative garbage collection. There appears to be ! no completely portable way to allow the collector to coexist with various Pthreads implementations. Hence we currently support only a few of the more common Pthreads implementations.

    In particular, it is very difficult for the collector to stop all other threads in the system and examine the register contents. This is currently ! accomplished with very different mechanisms for some Pthreads implementations. The Solaris implementation temporarily disables much of the user-level threads implementation by stopping kernel-level threads ! ("lwp"s). The Linux/HPUX/OSF1 and Irix implementations sends signals to ! individual Pthreads and has them wait in the signal handler.

    ! The Linux and Irix implementations use ! only documented Pthreads calls, but rely on extensions to their semantics. ! The Linux implementation linux_threads.c relies on only very ! mild extensions to the pthreads semantics, and already supports a large number ! of other Unix-like pthreads implementations. Our goal is to make this the ! only pthread support in the collector. !

    ! (The Irix implementation is separate only for historical reasons and should ! clearly be merged. The current Solaris implementation probably performs ! better in the uniprocessor case, but does not support thread operations in the ! collector. Hence it cannot support the parallel marker.)

    All implementations must intercept thread creation and a few other thread-specific calls to allow enumeration of threads and location of thread stacks. This is current ! accomplished with # define's in gc.h ! (really gc_pthread_redirects.h), or optionally by using ld's function call wrapping mechanism under Linux.

    Comments are appreciated. Please send mail to ! boehm@acm.org or ! Hans.Boehm@hp.com !

    ! This is a modified copy of a page written while the author was at SGI. ! The original was here. + diff -Nrc3pad gcc-3.3.3/boehm-gc/doc/gcinterface.html gcc-3.4.0/boehm-gc/doc/gcinterface.html *** gcc-3.3.3/boehm-gc/doc/gcinterface.html 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/boehm-gc/doc/gcinterface.html 2003-07-28 03:46:20.000000000 +0000 *************** *** 0 **** --- 1,203 ---- + + + Garbage Collector Interface + + +

    C Interface

    + On many platforms, a single-threaded garbage collector library can be built + to act as a plug-in malloc replacement. (Build with -DREDIRECT_MALLOC=GC_malloc + -DIGNORE_FREE.) This is often the best way to deal with third-party libraries + which leak or prematurely free objects. -DREDIRECT_MALLOC is intended + primarily as an easy way to adapt old code, not for new development. +

    + New code should use the interface discussed below. +

    + Code must be linked against the GC library. On most UNIX platforms, + this will be gc.a. +

    + The following describes the standard C interface to the garbage collector. + It is not a complete definition of the interface. It describes only the + most commonly used functionality, approximately in decreasing order of + frequency of use. The description assumes an ANSI C compiler. + The full interface is described in + gc.h + or gc.h in the distribution. +

    + Clients should include gc.h. +

    + In the case of multithreaded code, + gc.h should be included after the threads header file, and + after defining the appropriate GC_XXXX_THREADS macro. + (For 6.2alpha4 and later, simply defining GC_THREADS should suffice.) + Gc.h must be included + in files that use either GC or threads primitives, since threads primitives + will be redefined to cooperate with the GC on many platforms. +

    +
    void * GC_MALLOC(size_t nbytes) +
    + Allocates and clears nbytes of storage. + Requires (amortized) time proportional to nbytes. + The resulting object will be automatically deallocated when unreferenced. + References from objects allocated with the system malloc are usually not + considered by the collector. (See GC_MALLOC_UNCOLLECTABLE, however.) + GC_MALLOC is a macro which invokes GC_malloc by default or, if GC_DEBUG + is defined before gc.h is included, a debugging version that checks + occasionally for overwrite errors, and the like. +
    void * GC_MALLOC_ATOMIC(size_t nbytes) +
    + Allocates nbytes of storage. + Requires (amortized) time proportional to nbytes. + The resulting object will be automatically deallocated when unreferenced. + The client promises that the resulting object will never contain any pointers. + The memory is not cleared. + This is the preferred way to allocate strings, floating point arrays, + bitmaps, etc. + More precise information about pointer locations can be communicated to the + collector using the interface in + gc_typed.h in the distribution. +
    void * GC_MALLOC_UNCOLLECTABLE(size_t nbytes) +
    + Identical to GC_MALLOC, except that the resulting object is not automatically + deallocated. Unlike the system-provided malloc, the collector does + scan the object for pointers to garbage-collectable memory, even if the + block itself does not appear to be reachable. (Objects allocated in this way + are effectively treated as roots by the collector.) +
    void * GC_REALLOC(void *old, size_t new_size) +
    + Allocate a new object of the indicated size and copy (a prefix of) the + old object into the new object. The old object is reused in place if + convenient. If the original object was allocated with GC_malloc_atomic, + the new object is subject to the same constraints. If it was allocated + as an uncollectable object, then the new object is uncollectable, and + the old object (if different) is deallocated. + (Use GC_REALLOC with GC_MALLOC, etc.) +
    void GC_FREE(void *dead) +
    + Explicitly deallocate an object. Typically not useful for small + collectable objects. (Use GC_FREE with GC_MALLOC, etc.) +
    void * GC_MALLOC_IGNORE_OFF_PAGE(size_t nbytes) +
    +
    void * GC_MALLOC_ATOMIC_IGNORE_OFF_PAGE(size_t nbytes) +
    + Analogous to GC_MALLOC and GC_MALLOC_ATOMIC, except that the client + guarantees that as long + as the resulting object is of use, a pointer is maintained to someplace + inside the first 512 bytes of the object. This pointer should be declared + volatile to avoid interference from compiler optimizations. + (Other nonvolatile pointers to the object may exist as well.) + This is the + preferred way to allocate objects that are likely to be > 100KBytes in size. + It greatly reduces the risk that such objects will be accidentally retained + when they are no longer needed. Thus space usage may be significantly reduced. +
    void GC_gcollect(void) +
    + Explicitly force a garbage collection. +
    void GC_enable_incremental(void) +
    + Cause the garbage collector to perform a small amount of work + every few invocations of GC_malloc or the like, instead of performing + an entire collection at once. This is likely to increase total + running time. It will improve response on a platform that either has + suitable support in the garbage collector (Irix and most other Unix + versions, win32 if the collector was suitably built) or if "stubborn" + allocation is used (see gc.h). + On many platforms this interacts poorly with system calls + that write to the garbage collected heap. +
    GC_warn_proc GC_set_warn_proc(GC_warn_proc p) +
    + Replace the default procedure used by the collector to print warnings. + The collector + may otherwise write to sterr, most commonly because GC_malloc was used + in a situation in which GC_malloc_ignore_off_page would have been more + appropriate. See gc.h for details. +
    void GC_register_finalizer(...) +
    + Register a function to be called when an object becomes inaccessible. + This is often useful as a backup method for releasing system resources + (e.g. closing files) when the object referencing them becomes + inaccessible. + It is not an acceptable method to perform actions that must be performed + in a timely fashion. + See gc.h for details of the interface. + See here for a more detailed discussion + of the design. +

    + Note that an object may become inaccessible before client code is done + operating on its fields. Suitable synchronization is usually required. + See here + or here + for details. +

    +

    + If you are concerned with multiprocessor performance and scalability, + you should consider enabling and using thread local allocation (e.g. + GC_LOCAL_MALLOC, see gc_local_alloc.h. If your platform + supports it, you should build the collector with parallel marking support + (-DPARALLEL_MARK, or --enable-parallel-mark). +

    + If the collector is used in an environment in which pointer location + information for heap objects is easily available, this can be passed on + to the colllector using the interfaces in either gc_typed.h + or gc_gcj.h. +

    + The collector distribution also includes a string package that takes + advantage of the collector. For details see + cord.h + +

    C++ Interface

    + There are three distinct ways to use the collector from C++: +
    +
    STL allocators +
    + Users of the SGI extended STL + can include new_gc_alloc.h before including + STL header files. + (gc_alloc.h corresponds to now obsolete versions of the + SGI STL.) + This defines SGI-style allocators +
      +
    • alloc +
    • single_client_alloc +
    • gc_alloc +
    • single_client_gc_alloc +
    + which may be used either directly to allocate memory or to instantiate + container templates. The first two allocate uncollectable but traced + memory, while the second two allocate collectable memory. + The single_client versions are not safe for concurrent access by + multiple threads, but are faster. +

    + For an example, click here. +

    + Recent versions of the collector also include a more standard-conforming + allocator implemention in gc_allocator.h. It defines +

      +
    • traceable_allocator +
    • gc_allocator +
    + Again the former allocates uncollectable but traced memory. + This should work with any fully standard-conforming C++ compiler. +
    Class inheritance based interface +
    + Users may include gc_cpp.h and then cause members of certain classes to + be allocated in garbage collectable memory by inheriting from class gc. + For details see gc_cpp.h. +
    C interface +
    + It is also possible to use the C interface from + gc.h directly. + On platforms which use malloc to implement ::new, it should usually be possible + to use a version of the collector that has been compiled as a malloc + replacement. It is also possible to replace ::new and other allocation + functions suitably. +

    + Note that user-implemented small-block allocation often works poorly with + an underlying garbage-collected large block allocator, since the collector + has to view all objects accessible from the user's free list as reachable. + This is likely to cause problems if GC_malloc is used with something like + the original HP version of STL. + This approach works with the SGI versions of the STL only if the + malloc_alloc allocator is used. +

    + + diff -Nrc3pad gcc-3.3.3/boehm-gc/doc/leak.html gcc-3.4.0/boehm-gc/doc/leak.html *** gcc-3.3.3/boehm-gc/doc/leak.html 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/boehm-gc/doc/leak.html 2003-07-28 03:46:20.000000000 +0000 *************** *** 0 **** --- 1,197 ---- + + + Using the Garbage Collector as Leak Detector + + +

    Using the Garbage Collector as Leak Detector

    + The garbage collector may be used as a leak detector. + In this case, the primary function of the collector is to report + objects that were allocated (typically with GC_MALLOC), + not deallocated (normally with GC_FREE), but are + no longer accessible. Since the object is no longer accessible, + there in normally no way to deallocate the object at a later time; + thus it can safely be assumed that the object has been "leaked". +

    + This is substantially different from counting leak detectors, + which simply verify that all allocated objects are eventually + deallocated. A garbage-collector based leak detector can provide + somewhat more precise information when an object was leaked. + More importantly, it does not report objects that are never + deallocated because they are part of "permanent" data structures. + Thus it does not require all objects to be deallocated at process + exit time, a potentially useless activity that often triggers + large amounts of paging. +

    + All non-ancient versions of the garbage collector provide + leak detection support. Version 5.3 adds the following + features: +

      +
    1. Leak detection mode can be initiated at run-time by + setting GC_find_leak instead of building the collector with FIND_LEAK + defined. This variable should be set to a nonzero value + at program startup. +
    2. Leaked objects should be reported and then correctly garbage collected. + Prior versions either reported leaks or functioned as a garbage collector. +
    + For the rest of this description we will give instructions that work + with any reasonable version of the collector. +

    + To use the collector as a leak detector, follow the following steps: +

      +
    1. Build the collector with -DFIND_LEAK. Otherwise use default + build options. +
    2. Change the program so that all allocation and deallocation goes + through the garbage collector. +
    3. Arrange to call GC_gcollect at appropriate points to check + for leaks. + (For sufficiently long running programs, this will happen implicitly, + but probably not with sufficient frequency.) +
    + The second step can usually be accomplished with the + -DREDIRECT_MALLOC=GC_malloc option when the collector is built, + or by defining malloc, calloc, + realloc and free + to call the corresponding garbage collector functions. + But this, by itself, will not yield very informative diagnostics, + since the collector does not keep track of information about + how objects were allocated. The error reports will include + only object addresses. +

    + For more precise error reports, as much of the program as possible + should use the all uppercase variants of these functions, after + defining GC_DEBUG, and then including gc.h. + In this environment GC_MALLOC is a macro which causes + at least the file name and line number at the allocation point to + be saved as part of the object. Leak reports will then also include + this information. +

    + Many collector features (e.g stubborn objects, finalization, + and disappearing links) are less useful in this context, and are not + fully supported. Their use will usually generate additional bogus + leak reports, since the collector itself drops some associated objects. +

    + The same is generally true of thread support. However, as of 6.0alpha4, + correct leak reports should be generated with linuxthreads. +

    + On a few platforms (currently Solaris/SPARC, Irix, and, with -DSAVE_CALL_CHAIN, + Linux/X86), GC_MALLOC + also causes some more information about its call stack to be saved + in the object. Such information is reproduced in the error + reports in very non-symbolic form, but it can be very useful with the + aid of a debugger. +

    An Example

    + The following header file leak_detector.h is included in the + "include" subdirectory of the distribution: +
    + #define GC_DEBUG
    + #include "gc.h"
    + #define malloc(n) GC_MALLOC(n)
    + #define calloc(m,n) GC_MALLOC((m)*(n))
    + #define free(p) GC_FREE(p)
    + #define realloc(p,n) GC_REALLOC((p),(n))
    + #define CHECK_LEAKS() GC_gcollect()
    + 
    +

    + Assume the collector has been built with -DFIND_LEAK. (For very + new versions of the collector, we could instead add the statement + GC_find_leak = 1 as the first statement in main. +

    + The program to be tested for leaks can then look like: +

    + #include "leak_detector.h"
    + 
    + main() {
    +     int *p[10];
    +     int i;
    +     /* GC_find_leak = 1; for new collector versions not 	*/
    +     /* compiled with -DFIND_LEAK.				*/
    +     for (i = 0; i < 10; ++i) {
    + 	p[i] = malloc(sizeof(int)+i);
    +     }
    +     for (i = 1; i < 10; ++i) {
    + 	free(p[i]);
    +     }
    +     for (i = 0; i < 9; ++i) {
    + 	p[i] = malloc(sizeof(int)+i);
    +     }
    +     CHECK_LEAKS();
    + }	
    + 
    +

    + On an Intel X86 Linux system this produces on the stderr stream: +

    + Leaked composite object at 0x806dff0 (leak_test.c:8, sz=4)
    + 
    + (On most unmentioned operating systems, the output is similar to this. + If the collector had been built on Linux/X86 with -DSAVE_CALL_CHAIN, + the output would be closer to the Solaris example. For this to work, + the program should not be compiled with -fomit_frame_pointer.) +

    + On Irix it reports +

    + Leaked composite object at 0x10040fe0 (leak_test.c:8, sz=4)
    +         Caller at allocation:
    +                 ##PC##= 0x10004910
    + 
    + and on Solaris the error report is +
    + Leaked composite object at 0xef621fc8 (leak_test.c:8, sz=4)
    +         Call chain at allocation:
    +                 args: 4 (0x4), 200656 (0x30FD0)
    +                 ##PC##= 0x14ADC
    +                 args: 1 (0x1), -268436012 (0xEFFFFDD4)
    +                 ##PC##= 0x14A64
    + 
    + In the latter two cases some additional information is given about + how malloc was called when the leaked object was allocated. For + Solaris, the first line specifies the arguments to GC_debug_malloc + (the actual allocation routine), The second the program counter inside + main, the third the arguments to main, and finally the program + counter inside the caller to main (i.e. in the C startup code). +

    + In the Irix case, only the address inside the caller to main is given. +

    + In many cases, a debugger is needed to interpret the additional information. + On systems supporting the "adb" debugger, the callprocs script + can be used to replace program counter values with symbolic names. + As of version 6.1, the collector tries to generate symbolic names for + call stacks if it knows how to do so on the platform. This is true on + Linux/X86, but not on most other platforms. +

    Simplified leak detection under Linux

    + Since version 6.1, it should be possible to run the collector in leak + detection mode on a program a.out under Linux/X86 as follows: +
      +
    1. Ensure that a.out is a single-threaded executable. This doesn't yet work + for multithreaded programs. +
    2. If possible, ensure that the addr2line program is installed in + /usr/bin. (It comes with RedHat Linux.) +
    3. If possible, compile a.out with full debug information. + This will improve the quality of the leak reports. With this approach, it is + no longer necessary to call GC_ routines explicitly, though that can also + improve the quality of the leak reports. +
    4. Build the collector and install it in directory foo as follows: +
        +
      • configure --prefix=foo --enable-full-debug --enable-redirect-malloc + --disable-threads +
      • make +
      • make install +
      +
    5. Set environment variables as follows: +
        +
      • LD_PRELOAD=foo/lib/libgc.so +
      • GC_FIND_LEAK +
      • You may also want to set GC_PRINT_STATS (to confirm that the collector + is running) and/or GC_LOOP_ON_ABORT (to facilitate debugging from another + window if something goes wrong). +
      Simply run a.out as you normally would. Note that if you run anything + else (e.g. your editor) with those environment variables set, + it will also be leak tested. This may or may not be useful and/or + embarrassing. It can generate + mountains of leak reports if the application wasn't designed to avoid leaks, + e.g. because it's always short-lived. +
    + This has not yet been thropughly tested on large applications, but it's known + to do the right thing on at least some small ones. + + diff -Nrc3pad gcc-3.3.3/boehm-gc/doc/README gcc-3.4.0/boehm-gc/doc/README *** gcc-3.3.3/boehm-gc/doc/README 2002-02-12 04:37:55.000000000 +0000 --- gcc-3.4.0/boehm-gc/doc/README 2003-07-28 04:18:22.000000000 +0000 *************** *** 1,7 **** Copyright (c) 1988, 1989 Hans-J. Boehm, Alan J. Demers Copyright (c) 1991-1996 by Xerox Corporation. All rights reserved. Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved. ! Copyright (c) 1999-2001 by Hewlett-Packard Company. All rights reserved. The file linux_threads.c is also Copyright (c) 1998 by Fergus Henderson. All rights reserved. --- 1,7 ---- Copyright (c) 1988, 1989 Hans-J. Boehm, Alan J. Demers Copyright (c) 1991-1996 by Xerox Corporation. All rights reserved. Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved. ! Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved. The file linux_threads.c is also Copyright (c) 1998 by Fergus Henderson. All rights reserved. *************** Copyright (c) 1998 by Fergus Henderson. *** 9,16 **** The files Makefile.am, and configure.in are Copyright (c) 2001 by Red Hat Inc. All rights reserved. ! The files config.guess and a few others are copyrighted by the Free ! Software Foundation. THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. --- 9,17 ---- The files Makefile.am, and configure.in are Copyright (c) 2001 by Red Hat Inc. All rights reserved. ! Several files supporting GNU-style builds are copyrighted by the Free ! Software Foundation, and carry a different license from that given ! below. THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. *************** are GPL'ed, but with an exception that s *** 27,33 **** collector. (If you are concerned about such things, I recommend you look at the notice in config.guess or ltmain.sh.) ! This is version 6.1alpha3 of a conservative garbage collector for C and C++. You might find a more recent version of this at --- 28,34 ---- collector. (If you are concerned about such things, I recommend you look at the notice in config.guess or ltmain.sh.) ! This is version 6.3alpha1 of a conservative garbage collector for C and C++. You might find a more recent version of this at *************** and several of those are compatible with *** 228,237 **** or equivalent is supplied. Many of these have separate README.system files. ! Dynamic libraries are completely supported only under SunOS (and even that support is not functional on the last Sun 3 release), ! Linux, IRIX 5&6, HP-PA, Win32 (not Win32S) and OSF/1 on DEC AXP machines. ! On other machines we recommend that you do one of the following: 1) Add dynamic library support (and send us the code). 2) Use static versions of the libraries. --- 229,240 ---- or equivalent is supplied. Many of these have separate README.system files. ! Dynamic libraries are completely supported only under SunOS/Solaris, (and even that support is not functional on the last Sun 3 release), ! Linux, FreeBSD, NetBSD, IRIX 5&6, HP/UX, Win32 (not Win32S) and OSF/1 ! on DEC AXP machines plus perhaps a few others listed near the top ! of dyn_load.c. On other machines we recommend that you do one of ! the following: 1) Add dynamic library support (and send us the code). 2) Use static versions of the libraries. *************** On other machines we recommend that you *** 245,250 **** --- 248,255 ---- In all cases we assume that pointer alignment is consistent with that enforced by the standard C compilers. If you use a nonstandard compiler you may have to adjust the alignment parameters defined in gc_priv.h. + Note that this may also be an issue with packed records/structs, if those + enforce less alignment for pointers. A port to a machine that is not byte addressed, or does not use 32 bit or 64 bit addresses will require a major effort. A port to plain MSDOS diff -Nrc3pad gcc-3.3.3/boehm-gc/doc/README.arm.cross gcc-3.4.0/boehm-gc/doc/README.arm.cross *** gcc-3.3.3/boehm-gc/doc/README.arm.cross 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/boehm-gc/doc/README.arm.cross 2003-07-28 03:46:20.000000000 +0000 *************** *** 0 **** --- 1,68 ---- + From: Margaret Fleck + + Here's the key details of what worked for me, in case anyone else needs them. + There may well be better ways to do some of this, but .... + -- Margaret + + + The badge4 has a StrongArm-1110 processor and a StrongArm-1111 coprocessor. + + Assume that the garbage collector distribution is unpacked into /home/arm/gc6.0, + which is visible to both the ARM machine and a linux desktop (e.g. via NFS mounting). + + Assume that you have a file /home/arm/config.site with contents something like the + example attached below. Notice that our local ARM toolchain lives in + /skiff/local. + + Go to /home/arm/gc6.0 directory. Do + CONFIG_SITE=/home/arm/config.site ./configure --target=arm-linux + --prefix=/home/arm/gc6.0 + + On your desktop, do: + make + make install + The main garbage collector library should now be in ../gc6.0/lib/libgc.so. + + To test the garbage collector, first do the following on your desktop + make gctest + ./gctest + Then do the following on the ARM machine + cd .libs + ./lt-gctest + + Do not try to do "make test" (the usual way of running the test + program). This does not work and seems to erase some of the important + files. + + The gctest program claims to have succeeded. Haven't run any further tests + with it, though I'll be doing so in the near future. + + ------------------------------- + # config.site for configure + + # Modified from the one provided by Bradley D. LaRonde + # Edited by Andrej Cedilnik + # Used some of solutions by Tilman Vogel + # Ported for iPAQ Familiar by Oliver Kurth + # Further modified by Margaret Fleck for the badge4 + + HOSTCC=gcc + + # Names of the cross-compilers + CC=/skiff/local/bin/arm-linux-gcc + CXX=/skiff/local/bin/arm-linux-gcc + + # The cross compiler specific options + CFLAGS="-O2 -fno-exceptions" + CXXFLAGS="-O2 -fno-exceptions" + CPPFLAGS="-O2 -fno-exceptions" + LDFLAGS="" + + # Some other programs + AR=/skiff/local/bin/arm-linux-ar + RANLIB=/skiff/local/bin/arm-linux-ranlib + NM=/skiff/local/bin/arm-linux-nm + ac_cv_path_NM=/skiff/local/bin/arm-linux-nm + ac_cv_func_setpgrp_void=yes + x_includes=/skiff/local/arm-linux/include/X11 + x_libraries=/skiff/local/arm-linux/lib/X11 diff -Nrc3pad gcc-3.3.3/boehm-gc/doc/README.changes gcc-3.4.0/boehm-gc/doc/README.changes *** gcc-3.3.3/boehm-gc/doc/README.changes 2002-02-12 04:37:55.000000000 +0000 --- gcc-3.4.0/boehm-gc/doc/README.changes 2003-07-28 04:18:22.000000000 +0000 *************** Since 6.1 alpha2: *** 1469,1476 **** --- 1469,1907 ---- - Caused the Solaris and Irix thread creation primitives to call GC_init_inner(). + Since 6.1alpha3: + - Fixed typo in sparc_mach_dep.S, preventing the 64-bit version from + building. Increased 64-bit heap size limit in test.c slightly, since + a functional SPARC collector seems to slightly exceed the old limits. + (Thanks again to Jeff Sturm.) + - Use NPRGREG in solaris_threads.c, thus printing all registers if things + go wrong. + - Added GC_MARKERS environment variable to allow use of a single marker + thread on an MP without confusing the lock implementation. + - Collect much less aggressively in incremental mode with GC_TIME_UNLIMITED. + This is really a purely generational mode, and we can afford to + postpone the collection until the heap is (nearly) full. + - Remove read() wrapper for MPROTECT_VDB. It was causing more harm than + good. It is often no longer needed if system calls avoid writing to + pointerfull heap objects. + - Fix MACOSX test in gcconfig.h. (Thanks to John Clements.) + - Change GC_test_and_set so that it consistently has one argument. + Add spaces to ::: in powerpc assembly code in gc_locks.h. + (Thanks to Ryan Murray.) + - Fixed a formatting error in dbg_mlc.c. Added prototype to GC_abort() + declaration. (Thanks to Michael Smith.) + - Removed "source" argument to GC_find_start(). Eliminate GC_FIND_START(). + - Added win32 recognition code in configure.in. Changed some of the + dllimport/export defines in gc.h. (Thanks to Adam Megacz.) + - GC_malloc_many didn't set hb_last_reclaimed when it called + GC_reclaim_generic. (I'm not sure this matters much, but ...) + - Allocating uncollectable objects with debug information sometimes + allocated objects that were one byte too small, since uncollectable + objects don't have the extra byte added at the end. (Thanks to + Wink Saville for pointing this out.) + - Added a bit more assertion checking to make sure that gcj objects + on free lists never have a nonzero second word. + - Replaced BCC_MAKEFILE with an up-to-date one. (Thanks to + Andre Leiradella.) + - Upgraded libtool, cinfigure.in and some related files to hopefully + support NetBSD/SPARC. (Thanks to Adrian Bunk.) Unfortunately, + libtool 1.4.2 seemed to be buggy due to missing quotes in several + "test" invocations. Fixed those in the ltmain.sh script. + - Some win32-specific patches, including the introduction of + GC_CreateThread. (Thanks to Adam Megacz.) + - Merged in gcj changes from Anthony Green to support embedded systems. + - Tried to consistently rename preprocessed assembly files with a capital + .S extension. + - Use alpha_mach_dep.S on ALPHA again. It doesn't really matter, but this + makes our distribution consistent with the gcc one, avoiding future merge + problems. + - Move GET_MEM definition into gcconfig.h. Include gcconfig.h slightly + later in gc_priv.h to avoid forward references to ptr_t. + - Add some testing of local allocation to test.c. + - Change definition of INVALID_QTID in specific.h. The -1 value was used + inconsistently, and too likely to collide with a valid stack address. + Some general clean-up of specific.[ch]. Added assertions. (Thanks + to Michael Smith for tracking down an intermittent bug to this + general area. I'm not sure it has been squashed yet, however.) + - On Pthread systems it was not safe to call GC_malloc() between fork() + and exec(). According to the applicable standards, it doesn't appear + to be safe to call malloc() or many other libc functions either, thus + it's not clear this is fixable. Added experimental support for + -DHANDLE_FORK in linux_threads.c which tries to support it. It may + succeed if libc does the right thing. I'm not sure whether it does. + (Thanks to Kenneth Schalk for pointing out this issue.) + - Documented thread local allocation primitives to require an + explicit GC_init call. GC_init_parallel is no longer declared to + be a constructor function, since that isn't portable and often + seems to lead to initialization order problems. + - Changed gc_cpp.cc and gc_cpp.h in one more attempt to make them + compatible with Visual C++ 6. (Thanks to Wink Saville for the + patch.) + - Some more patches for Linux on HP PA-RISC. + - Added include/gc_allocator.h. It implements (hopefully) standard + conforming (as opposed to SGI-style) allocators that allocate + collectable (gc_allocator) or GC-traceable, but not collectable + (traceable_allocator) objects. This borrows heavily from libstc++, + which borrows heavily from the SGI implementation, this part of + which was written by Matt Austern. Changed test_cpp.cc to very + minimally test this. + - On Linux/X86, retry mmap with a different start argument. That should + allow the collector to use more (closer to 3GB) of the address space. + (Thanks to Jeffrey Mark Siskind for tracking this down.) + - Force 64 bit alignment with GCJ support. (Reflects Bryce McKinley's + patch to the gcc tree.) + - Refined the choice of sa_handler vs. sa_sigaction in GC_dirty_init + to accomodate some glibc5 systems. (Thanks to Dan Fandrich for the + patch.) + - Compensated for the fact that current versions of glibc set + __libc_stack_end incorrectly on Linux/IA64 while initialization code + is running. This could cause the collector to miss 16 bytes of + the memory stack if GC_malloc or friends where called before main(). + - Mostly integrated Takis Psarogiannakopoulos' port to DG/UX Inix 86. + This will probably take another iteration to work, since his + patch conflicted with the libtool upgrade. + - Added README.arm.cross containing some information about cross- + compiling to an ARM processor from Margaret Fleck. + + Since 6.1alpha4: + - Added GC_finalizer_mem_freed, and changed some of the code that + decided on heap expansion to look at it. Memory explicitly + deallocated by finalizers essentially needs to be counted as reclaimed + by the GC. Otherwise there are cases in which the heap can grow + unboundedly. (Thanks to Mark Reichert for the test case.) + - Integrated Adam Megacz patches to not scan dynamic libraries if + we are compiling with gcc on win32. Otherwise we need structured + exception handling to deal with asynchronously unmapped root + segments, and gcc doesn't directly support that. + - Integrated Anthony Green's patch to support Wine. + - GC_OPERATOR_NEW_ARRAY was misspelled OPERATOR_NEW_ARRAY in several + places, including gc_cpp.cc. (Thanks to Wink Saville for pointing + this out.) + - Integrated Loren James Rittle's Alpha FreeBSD patches. In + response to Richard Henderson's suggestion, these also + changed the declarations of symbols like _end on many platforms to + that they wouldn't mistakenly be declared as short data symbols. + - Integrated changes from the Debian distribution. (Thanks to Ryan Murray + for pointing these out.) Fix C++ comments in POWERPC port. Add ARM32 + incremental GC support. Get rid of USE_GENERIC_PUSH_REGS for alpha/Linux, + this time for real. Use va_copy to get rid of cord printf problems + (finally). + - Close file descriptor used to count cpus. Thanks to Jeff Sturm for + pointing out the omission. + - Don't just drop gcj free lists in GC_start_reclaim, since that can + eventually cause the marker to see a bogus mark descriptor in the + dropped objects. The usual symptom was a very intermittent segmentation + fault in the marker. This mattered only if one of the GC_gcj_malloc + variants was used. (Thanks to Michael Smith, Jeff Sturm, Bryce + McKinley and Tom Tromey for helping to track this down.) + - Fixed Linux and Solaris/64 SPARC configuration. (Thanks to David Miller, + Jeff Sturm, Tom Tromey, and Christian Joensson.) + - Fixed a typo in strdup definition. (Thanks to Gerard A Allan.) + - Changed Makefile.direct to invoke $(CC) to assemble alpha_mach_dep.S. + This is needed on Linux. I'm not sure whether it's better or worse + on Tru64. + - Changed gc_cpp.h once more to declare operator new and friends only in + a Microsoft environment. This may need further fine tuning. (Thanks to + Johannes Schmidt for pointing out that the older code breaks on gcc3.0.4.) + - Don't ever override strdup if it's already macro defined. (Thanks to + Adnan Ali for pointing out the problem.) + - Changed gc_cpp.h yet again to also overload placement new. Due to the + C++ overloading rules, the other overloaded new operations otherwise hide + placement new, which causes many STL uses to break. (Thanks to Reza + Shahidi for reporting this, and to Matt Austern for proposing a fix.) + - Integrated cygwin pthreads support from Dan Bonachea. + - Turn on DYNAMIC_LOADING for NetBSD. (Thanks to Krister Walfridsson.) + - Changed printing code to print more complete GC times. + - Applied Mark Mitchell's Irix patch to correct some bitrot. + - Clarified which object-printing routines in dbg_mlc.c should hold + the allocation lock. Restructured the code to allow reasonable object + printing with -DREDIRECT_MALLOC. + - Fix the Linux mmap code to always start with 0x1000 as the initial hint. + Minor patches for 64-bit AIX, particularly to STACKBOTTOM. + (Thanks again to Jeffrey Mark Siskind.) + - Renamed "SUSPENDED" flag for Solaris threads support to avoid a conflict + with a system header. (Thanks to Philp Brown.) + - Cause win32_threads.c to handle an out of range stack pointer correctly, + though currently with a warning. (Thanks to Jonathan Clark for + observing that win32 applications may temporarily use the stack + pointer for other purposes, and suggesting a fix. Unfortunately, it's + not clear that there is a complete solution to this problem.) + + Since 6.1alpha5: + - Added GC_MAXIMUM_HEAP_SIZE environment variable. + - Fix configure.in for MIPS/LINUX. (Thanks to H.J. Lu.) + - Double page hash table size for -DLARGE_CONFIG. + - Integrated Bo Thorsen's X86-64 support. + - STACKBOTTOM definition for LINUX/MIPS was partially changed back. + (Thanks to H.J. Lu and Hiroshi Kawashima for resolving this.) + - Replaced all occurrences of LINUX_DATA_START in gcconfig.h with + SEARCH_FOR_DATA_START. It doesn't hurt to falll back to a search. + And __data_start doesn't seem to get defined correctly of the GC + library is loaded with LD_PRELOAD, e.g. for leak detection. + - If the GC_find_leak environment variable is set, do a + atexit(GC_gcollect) to give us at least one chance to detect leaks. + This may report some very benign leaks, but ... + - Addeded REDIRECT_FREE. It's necessary if we want leak detection with + LD_PRELOAD. + - Defer printing of leaked objects, as for smashed objects. + - Fixed process and descriptor leak in GC_print_callers. Try for + line number even if we got function name.) + - Ported parallel GC support and thread local allocation to Alpha. + Not yet well-tested. + - Added GC_DUMP_REGULARLY and added finalization statistics to GC_dump(). + - Fixed Makefile.am to mention alpha_mach_dep.S instead of the defunct + alpha_mach_dep.s. (Thanks to Fergus Henderson.) + - Incorporated a change to new_gc_alloc.h, suggested by Johannes Schmidt, + which should make it work with gcc3.1. (I would still like to encourage + use of gc_allocator.h instead.) + - Use alpha_mach_dep.S only on Linux. (It's not clear that this is + optimal, but it otherwise didn't build on Tru64. Thanks to Fergus + Henderson.) + - Added ifdef to guard free() in os_dep.c. Otherwise we get a + compilation error on Irix. (Thanks to Dai Sato.) + - Added an experimental version of GC_memalign to mallocx.c. This can't + always work, since we don't handle alignment requests in the hblk-level + allocator, and we can't handle arbitrary pointer displacements unless + GC_all_interior_pointers is enabled. But it should work for alignment + requests up to HBLKSIZE. This is not yet documented in the standard + places. + - Finally debugged the OSF1/Tru64 thread support. This needs more testing, + since I needed to add a somewhat unconvincing workaround for signal + delivery issues that I don't yet completely understand. But it does + pass my tests, even in parallel GC mode. Incremental GC support is + disabled if thread support is enabled, due to the signal issues. + - Eliminated name-space-incorrect definition of _cdecl from gc_cpp.h. + - Added GC_debug_malloc_replacement and GC_debug_realloc_replacement + declarations to gc.h. On IA64, this is required for REDIRECT_MALLOC + to work correctly with these. + - Fixed Linux USE_PROC_FOR_LIBRARIES to work with a 64-bit /proc format. + + Since 6.1: + - Guard the test for GC_DUMP_REGULARLY in misc.c with + "#ifndef NO_DEBUGGING". Otherwise it fails to build with NO_DEBUGGING + defined. (Thanks to Manuel Serrano.) + - Message about retrying suspend signals was incorrectly generated even when + flag was not set. + - Cleaned up MACOSX/NEXT root registration code. There was apparently a + separate ifdef case in GC_register_data_segments() for no reason. + - Removed MPROTECT_VDB for MACOSX port, based on one negative report. + - Arrange for gc.h and friends to be correctly installed with GNU-style + "make install". + - Enable the GNU-style build facility include C++ support in the library + with --enable-cplusplus. (Thanks to Thomas Maier for some of the patch.) + - Mark from GC_thread_key in linux_threads.c, in case that's allocated + from the garbage collected heap, as it is with our own thread-specific + storage implementation. (Thanks to Jeff Sturm.) + - Mark all free list header blocks if they are heap allocated. This avoids + some unnecessary tracing. And it remains correct if we clear the + root set. (Thanks to Jeff Sturm for identifying the bug.) + - Improved S390/Linux support. Add S390/Linux 64-bit support. (Thanks + to Ulrich Weigand.) + - Corrected the spelling of GC_{M,C}ALLOC_EXPLICTLY_TYPED to + GC_{M,C}ALLOC_EXPLICITLY_TYPED in gc_typed.h. This is technically + an interface change. Based on the fact that nobody reported this, + I suspect/hope there were no clients. + - Cleaned up gc_typed.h so that (1) it adds an extern "C" declaration + when appropriate, (2) doesn't generate references to undefined internal + macros, and (3) allows easier manual construction of descriptors. + - Close the file descriptor used by GC_print_address_map(). + - Set the "close-on-exec" bit for various file descriptors maintained + for the collector's internal use. + - Added a hack to find memory segments owned by the system allocator + under win32. Based on my tests, this tends to eventually find all + segments, though it may take a while. There appear to be cleaner, + but slower solutions under NT/XP. But they rely on an API that's + unsupported under 9X. + - Changed Linux PowerPC stack finding to LINUX_STACKBOTTOM. (Thanks + to Akira Tagoh for pointing out that HEURISTIC1 doesn't work on + 64-bit kernels.) + - Added GC_set_free_space_divisor to avoid some Windows dll issues. + - Added FIXUP_POINTER, POINTER_SHIFT, POINTER_MASK to allow preprocessing + of candidate pointers for tagging, etc. + - Always lock around GC_notify_full_gc(). Simplified code for + invoking GC_notify_full_gc(). + - Changed the way DATASTART is defined on FreeBSD to be robust against + an unmapped page after etext. (Thanks to Hironori Sakamoto for + tracking down the intermittent failure.) + - Made GC_enable() and GC_disable() official. Deprecated direct update + of GC_dont_gc. Changed GC_gcollect to be a noop when garbage collection + is disabled. + - Call GC_register_dynamic_libraries before stopping the world on Linux, + in order to avoid a potential deadlock due to the dl_iterate_phdr lock. + - Introduced a more general mechanism for platform-dependent code to + decide whether the main data segment should be handled separately + from dynamic libraries, or registered by GC_register_dynamic_libraries. + The latter is more reliable and easier on Linux with dl_iterate_phdr. + + Since 6.2alpha1: + - Fixed the completely broken FreeBSD code in 6.2alpha1. (Thanks to + Hironori Sakamoto for the patch.) + - Changed IRIX reference in dbg_mlc.c to IRIX5. (Thanks to Marcus Herbert.) + - Attempted to work around the problems with .S filenames and the SGI + compiler. (Reported by several people. Untested.) + - Worked around an HP/UX make issue with the GNU-style build process. + - Fixed the --enable-cplusplus build machinery to allow builds without + a C++ compiler. (That was always the intent ...) + - Changed the debugging allocation macros to explicitly pass the return + address for Linux and XXXBSD on hardware for which we can't get stack + traces. Use __builtin_return_address(0) to generate it when possible. + Some of the configuration work was cleaned up (good) and moved to gc.h + (bad, but necessary). This should make leak detection more useful + on a number of platforms. (Thanks to Fabian Thylman for the suggestion.) + - Fixed compilation problems in dbg_mlc.c with GC_ADD_CALLER. + - Bumped revision number for dynamic library. + + Since 6.2alpha2: + - Don't include execinfo.h in os_dep.c when it's not needed, and may not exist. + + Since 6.2alpha3: + - Use LINUX_STACKBOTTOM for >= glibc2.2 on Linux/MIPS. (See Debian bug + # 177204) + - Integrated Jeff Sturm and Jesse Rosenstock's MACOSX threads patches. + - Integrated Grzegorz Jakacki's substantial GNU build patch. "Make dist" + should now work for the GNU build process. Documentation files + are installed under share/gc. + - Tweaked gc_cpp.h to again support the Borland compiler. (Thanks to + Rene Girard for pointing out the problems.) + - Updated BCC_MAKEFILE (thanks to Rene Girard). + - Added GC_ASSERT check for minimum thread stack size. + - Added --enable-gc-assertions. + - Added some web documentation to the distribution. Updated it in the + process. + - Separate gc_conf_macros.h from gc.h. + - Added generic GC_THREADS client-defined macro to set the appropriate + GC_XXX_THREADS internal macro. (gc_config_macros.h.) + - Add debugging versions of _ignore_off_page allocation primitves. + - Moved declarations of GC_make_closure and GC_debug_invoke_finalizer + from gc.h to gc_priv.h. + - Reset GC_fail_count even if only a small allocation succeeds. + - Integrated Brian Alliet's patch for dynamic library support on Darwin. + - gc_cpp.h's gc_cleanup destructor called GC_REGISTER_FINALIZER_IGNORE_SELF + when it should have called the lower case version, since it was + explicitly computing a base pointer. + + Since 6.2alpha4: + - GC_invoke_finalizers could, under rare conditions, set + GC_finalizer_mem_freed to an essentially random value. This could + possibly cause unbounded heap growth for long-running applications + under some conditions. (The bug was introduced in 6.1alpha5, and + is not in gcc3.3. Thanks to Ben Hutchings for finding it.) + - Attempted to sanitize the various DLL macros. GC_USE_DLL disappeared. + GC_DLL is used instead. All internal tests are now on GC_DLL. + README.macros is now more precise about the intended meaning. + - Include DllMain in the multithreaded win32 version only if the + collector is actually built as a dll. (Thanks to Mohan Embar for + a version of the patch.) + - Hide the cygwin threadAttach/Detach functions. They were violating our + namespace rules. + - Fixed an assertion in GC_check_heap_proc. Added GC_STATIC_ASSERT. + (Thanks again to Ben Hutchings.) + - Removed some obsolete definitions for Linux/PowerPC in gcconfig.h. + - CORD_cat was not rebalancing unbalanced trees in some cases, violating + a CORD invariant. Also tweaked the rebalancing rule for + CORD_cat_char_star. (Thanks to Alexandr Petrosian for the bug report + and patch.) + - Added hand-coded structured exception handling support to mark.c. + This should enable support of dynamic libraries under win32 with + gcc-compiled code. (Thanks to Ranjit Mathew for the patch.) + Turned on dynamic library scanning for win32/gcc. + - Removed some remnants of read wrapping. (Thanks to Kenneth Schalk.) + GC_USE_LD_WRAP ws probably broken in recent versions. + - The build could fail on some platforms since gcconfig.h could include + declarations mentioning ptr_t, which was not defined, e.g. when if_mach + was built. (Thanks to Yann Dirson for pointing this out.) Also + cleaned up tests for GC_PRIVATE_H in gcconfig.h a bit. + - The GC_LOOP_ON_ABORT environment variable interfered with incremental + collection, since the write fault handler was erroneously overridden. + Handlers are now set up in the correct order. + - It used to be possible to call GC_mark_thread_local_free_lists() while + the world was not stopped during an incremental GC. This was not safe. + Fortunately, it was also unnecessary. Added GC_world_stopped flag + to avoid it. (This caused occasional crashes in GC_set_fl_marks + with thread local allocation and incremental GC. This probably happened + primarily on old, slow multiprocessors.) + - Allowed overriding of MAX_THREADS in win32_threads.c from the build + command line. (Patch from Yannis Bres.) + - Taught the IA64/linux code to determine the register backing store base from + /proc/self/maps after checking the __libc symbol, but before guessing. + (__libc symbols are on the endangered list, and the guess is likely to not + always be right for 2.6 kernels.) Restructured the code to read and parse + /proc/self/maps so it only exists in one place (all platforms). + - The -DUSE_PROC_FOR_LIBRARIES code was broken on Linux. It claimed that it + also registered the main data segment, but didn't actually do so. (I don't + think anyone actually uses this configuration, but ...) + - Made another attempt to get --enablecplusplus to do the right thing. + Since there are unavoidable problems with C programs linking against a + dynamic library that includes C++ code, I separated out the c++ code into + libgccpp. + + Since 6.2alpha5: + - There was extra underscore in the name of GC_save_registers_in_stack + for NetBSD/SPARC. (Thanks to Jaap Boender for the patch.) + - Integrated Brian Alliet's patch for Darwin. This restructured the + linuxthreads/pthreads support to separate generic pthreads support + from more the system-dependent thread-stopping code. I believe this + should make it easier to eliminate the code duplication between + pthreads platforms in the future. The patch included some other + code cleanups. + - Integrated Dan Bonachea's patch to support AIX threads. This required + substantial manual integration, mostly due to conflicts with other + recent threads changes. It may take another iteration to + get it to work. + - Removed HPUX/PA-RISC support from aix_irix_threads.c. It wasn't used + anyway and it cluttered up the code. And anything we can do to migrate + towards generic pthreads support is a good thing. + - Added a more explicit test for tracing of function arguments to test.c. + (Thanks to Dan Grayson.) + - Added Akira Tagoh's PowerPC64 patch. + - Fixed some bit rot in the Cygwin port. (Thanks to Dan Bonachea for + pointing it out.) Gc.h now includes just windows.h, not winbase.h. + - Declared GC_save_regs_in_stack() in gc_priv.h. Remove other declarations. + - Changed --enable-cplusplus to use automake consitionals. The old way + confused libtool. "Make install" didn't work correctly for the old version. + Previously --enable-cplusplus was broken on cygwin. + - Changed the C version of GC_push_regs to fail at compile time if it is + generated with an empty body. This seems to have been the cause of one + or two subtle failures on unusual platforms. Those failures should + now occur at build time and be easily fixable. + + Since 6.2alpha6: + - Integrated a second round of Irix/AIX patches from Dan Bonachea. + Renamed mips_sgi_mach_dep.S back to mips_sgi_mach_dep.s, since it requires + the Irix assembler to do the C preprocessing; gcc -E doesn't work. + - Fixed Makefile.direct for DARWIN. (Thanks to Manuel Serrano.) + - There was a race between GC_pthread_detach and thread exit that could + result in a thread structure being deallocated by GC_pthread_detach + eventhough it was still needed by the thread exit code. (Thanks to + Dick Porter for the small test case that allowed this to be debugged.) + - Fixed version parsing for non-alpha versions in acinclude.m4 and + version checking in version.h. + + Since 6.2: + - Integrated some NetBSD patches forwarded to me by Marc Recht. These + were already in the NetBSD package. + - GC_pthread_create waited for the semaphore even if pthread_create failed. + Thanks to Dick Porter for the pthread_support.c patch. Applied the + analogous fix for aix_irix_threads.c. + - Added Rainer Orth's Tru64 fixes. + - The check for exceeding the thread table size in win32 threadDetach + was incorrect. (Thanks to Alexandr Petrosian for the patch.) + - Applied Andrew Begel's patch to correct some reentrancy issues + with dynamic loading on Darwin. + - GC_CreateThread() was neglecting to duplicate the thread handle in + the table. (Thanks to Tum Nguyen for the patch.) + - Pass +ESdbgasm only on PA-RISC machines with vendor compiler. + (Thanks to Roger Sayle for the patch.) + - Applied more AIX threads patches from Scott Ananian. To do: + - A dynamic libgc.so references dlopen unconditionally, but doesn't link + against libdl. + - GC_proc_fd for Solaris is not correctly updated in response to a + fork() call. Thus incremental collection in the child won't work + correctly. (Thanks to Ben Cottrell for pointing this out.) + - --enable-redirect-malloc is mostly untested and known not to work + on some platforms. - There seem to be outstanding issues on Solaris/X86, possibly with finding the data segment starting address. Information/patches would be appreciated. *************** To do: *** 1488,1494 **** - Incremental collector should handle large objects better. Currently, it looks like the whole object is treated as dirty if any part of it is. ! - Cord/cordprnt.c doesn't build on a few platforms (notably PowerPC), since ! we make some unwarranted assumptions about how varargs are handled. This ! currently makes the cord-aware versions of printf unusable on some platforms. ! Fixing this is unfortunately not trivial. --- 1919,1922 ---- - Incremental collector should handle large objects better. Currently, it looks like the whole object is treated as dirty if any part of it is. ! diff -Nrc3pad gcc-3.3.3/boehm-gc/doc/README.darwin gcc-3.4.0/boehm-gc/doc/README.darwin *** gcc-3.3.3/boehm-gc/doc/README.darwin 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/boehm-gc/doc/README.darwin 2003-07-28 03:46:20.000000000 +0000 *************** *** 0 **** --- 1,106 ---- + Darwin/MacOSX Support - July 22, 2003 + ==================================== + + Important Usage Notes + ===================== + + GC_init() MUST be called before calling any other GC functions. This + is necessary to properly register segments in dynamic libraries. This + call is required even if you code does not use dynamic libraries as the + dyld code handles registering all data segments. + + When your use of the garbage collector is confined to dylibs and you + cannot call GC_init() before your libraries' static initializers have + run and perhaps called GC_malloc(), create an initialization routine + for each library to call GC_init(): + + #include + void my_library_init() { GC_init(); } + + Compile this code into a my_library_init.o, and link it into your + dylib. When you link the dylib, pass the -init argument with + _my_library_init (e.g. gcc -dynamiclib -o my_library.dylib a.o b.o c.o + my_library_init.o -init _my_library_init). This causes + my_library_init() to be called before any static initializers, and + will initialize the garbage collector properly. + + Note: It doesn't hurt to call GC_init() more than once, so it's best, + if you have an application or set of libraries that all use the + garbage collector, to create an initialization routine for each of + them that calls GC_init(). Better safe than sorry. + + The incremental collector is still a bit flaky on darwin. It seems to + work reliably with workarounds for a few possible bugs in place however + these workaround may not work correctly in all cases. There may also + be additional problems that I have not found. + + Implementation Information + ========================== + Darwin/MacOSX support is nearly complete. Thread support is reliable on + Darwin 6.x (MacOSX 10.2) and there have been reports of success on older + Darwin versions (MacOSX 10.1). Shared library support had also been + added and the gc can be run from a shared library. There is currently only + support for Darwin/PPC although adding x86 support should be trivial. + + Thread support is implemented in terms of mach thread_suspend and + thread_resume calls. These provide a very clean interface to thread + suspension. This implementation doesn't rely on pthread_kill so the + code works on Darwin < 6.0 (MacOSX 10.1). All the code to stop the + world is located in darwin_stop_world.c. + + The original incremental collector support unfortunatelly no longer works + on recent Darwin versions. It also relied on some undocumented kernel + structures. Mach, however, does have a very clean interface to exception + handing. The current implementation uses Mach's exception handling. + + Much thanks goes to Andrew Stone, Dietmar Planitzer, Andrew Begel, + Jeff Sturm, and Jesse Rosenstock for all their work on the + Darwin/OS X port. + + -Brian Alliet + brian@brianweb.net + + + Older Information (Most of this no longer applies to the current code) + ====================================================================== + + While the GC should work on MacOS X Server, MacOS X and Darwin, I only tested + it on MacOS X Server. + I've added a PPC assembly version of GC_push_regs(), thus the setjmp() hack is + no longer necessary. Incremental collection is supported via mprotect/signal. + The current solution isn't really optimal because the signal handler must decode + the faulting PPC machine instruction in order to find the correct heap address. + Further, it must poke around in the register state which the kernel saved away + in some obscure register state structure before it calls the signal handler - + needless to say the layout of this structure is no where documented. + Threads and dynamic libraries are not yet supported (adding dynamic library + support via the low-level dyld API shouldn't be that hard). + + The original MacOS X port was brought to you by Andrew Stone. + + + June, 1 2000 + + Dietmar Planitzer + dave.pl@ping.at + + Note from Andrew Begel: + + One more fix to enable gc.a to link successfully into a shared library for + MacOS X. You have to add -fno-common to the CFLAGS in the Makefile. MacOSX + disallows common symbols in anything that eventually finds its way into a + shared library. (I don't completely understand why, but -fno-common seems to + work and doesn't mess up the garbage collector's functionality). + + Feb 26, 2003 + + Jeff Sturm and Jesse Rosenstock provided a patch that adds thread support. + GC_MACOSX_THREADS should be defined in the build and in clients. Real + dynamic library support is still missing, i.e. dynamic library data segments + are still not scanned. Code that stores pointers to the garbage collected + heap in statically allocated variables should not reside in a dynamic + library. This still doesn't appear to be 100% reliable. + + Mar 10, 2003 + Brian Alliet contributed dynamic library support for MacOSX. It could also + use more testing. diff -Nrc3pad gcc-3.3.3/boehm-gc/doc/README.DGUX386 gcc-3.4.0/boehm-gc/doc/README.DGUX386 *** gcc-3.3.3/boehm-gc/doc/README.DGUX386 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/boehm-gc/doc/README.DGUX386 2003-07-28 03:46:20.000000000 +0000 *************** *** 0 **** --- 1,215 ---- + Garbage Collector (parallel iversion) for ix86 DG/UX Release R4.20MU07 + + + *READ* the file README.QUICK. + + You need the GCC-3.0.3 rev (DG/UX) compiler to build this tree. + This compiler has the new "dgux386" threads package implemented. + It also supports the switch "-pthread" needed to link correctly + the DG/UX's -lrte -lthread with -lgcc and the system's -lc. + Finally we support parralleli-mark for the SMP DG/UX machines. + To build the garbage collector do: + + ./configure --enable-parallel-mark + make + make gctest + + Before you run "gctest" you need to set your LD_LIBRARY_PATH + correctly so that "gctest" can find the shared library libgc. + Alternatively you can do a configuration + + ./configure --enable-parallel-mark --disable-shared + + to build only the static version of libgc. + + To enable debugging messages please do: + 1) Add the "--enable-full-debug" flag during configuration. + 2) Edit the file linux-threads.c and uncommnect the line: + + /* #define DEBUG_THREADS 1 */ to ---> + + #define DEBUG_THREADS 1 + + Then give "make" as usual. + + In a machine with 4 CPUs (my own machine) the option parallel + mark (aka --enable-parallel-mark) makes a BIG difference. + + Takis Psarogiannakopoulos + University of Cambridge + Centre for Mathematical Sciences + Department of Pure Mathematics + Wilberforce Road + Cambridge CB3 0WB ,UK , + January 2002 + + + Note (HB): + The integration of this patch is currently not complete. + The following patches against 6.1alpha3 where hard to move + to alpha4, and are not integrated. There may also be minor + problems with stylistic corrections made by me. + + + --- ltconfig.ORIG Mon Jan 28 20:22:18 2002 + +++ ltconfig Mon Jan 28 20:44:00 2002 + @@ -689,6 +689,11 @@ + pic_flag=-Kconform_pic + fi + ;; + + dgux*) + + pic_flag='-fPIC' + + link_static='-Bstatic' + + wl='-Wl,' + + ;; + *) + pic_flag='-fPIC' + ;; + @@ -718,6 +723,12 @@ + # We can build DLLs from non-PIC. + ;; + + + dgux*) + + pic_flag='-KPIC' + + link_static='-Bstatic' + + wl='-Wl,' + + ;; + + + osf3* | osf4* | osf5*) + # All OSF/1 code is PIC. + wl='-Wl,' + @@ -1154,6 +1165,22 @@ + fi + ;; + + + dgux*) + + ld_shlibs=yes + + # For both C/C++ ommit the deplibs. This is because we relying on the fact + + # that compilation of execitables will put them in correct order + + # in any case and sometimes are wrong when listed as deplibs (or missing some deplibs) + + # However when GNU ld and --whole-archive needs to be used we have the problem + + # that if the -fPIC *_s.a archive is linked through deplibs list we ommiting crucial + + # .lo/.o files from the created shared lib. This I think is not the case here. + + archive_cmds='$CC -shared -h $soname -o $lib $libobjs $linkopts' + + thread_safe_flag_spec='-pthread' + + wlarc= + + hardcode_libdir_flag_spec='-L$libdir' + + hardcode_shlibpath_var=no + + ac_cv_archive_cmds_needs_lc=no + + ;; + + + cygwin* | mingw*) + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + @@ -1497,7 +1524,7 @@ + ;; + + dgux*) + - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' + + archive_cmds='$CC -shared -h $soname -o $lib $libobjs $linkopts' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + @@ -2092,12 +2119,17 @@ + ;; + + dgux*) + - version_type=linux + + version_type=dgux + need_lib_prefix=no + need_version=no + - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + - soname_spec='${libname}${release}.so$major' + + library_names_spec='$libname.so$versuffix' + + soname_spec='$libname.so$versuffix' + shlibpath_var=LD_LIBRARY_PATH + + thread_safe_flag_spec='-pthread' + + wlarc= + + hardcode_libdir_flag_spec='-L$libdir' + + hardcode_shlibpath_var=no + + ac_cv_archive_cmds_needs_lc=no + ;; + + sysv4*MP*) + + + --- ltmain.sh.ORIG Mon Jan 28 20:31:18 2002 + +++ ltmain.sh Tue Jan 29 00:11:29 2002 + @@ -1072,11 +1072,38 @@ + esac + ;; + + + -thread*) + + # DG/UX GCC 2.95.x, 3.x.x rev (DG/UX) links -lthread + + # with the switch -threads + + if test "$arg" = "-threads"; then + + case "$host" in + + i[3456]86-*-dgux*) + + deplibs="$deplibs $arg" + + continue + + ;; + + esac + + fi + + ;; + + + + -pthread*) + + # DG/UX GCC 2.95.x, 3.x.x rev (DG/UX) links -lthread + + # with the switch -pthread + + if test "$arg" = "-pthread"; then + + case "$host" in + + i[3456]86-*-dgux*) + + deplibs="$deplibs $arg" + + continue + + ;; + + esac + + fi + + ;; + + + -l*) + if test "$arg" = "-lc"; then + case "$host" in + - *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*) + + *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos* | i[3456]86-*-dgux*) + # These systems don't actually have c library (as such) + + # It is wrong in DG/UX to add -lc when creating shared/dynamic objs/libs + continue + ;; + esac + @@ -1248,6 +1275,12 @@ + temp_deplibs= + for deplib in $dependency_libs; do + case "$deplib" in + + -thread*) + + temp_deplibs="$temp_deplibs $deplib" + + ;; + + -pthread) + + temp_deplibs="$temp_deplibs $deplib" + + ;; + -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'` + case " $rpath $xrpath " in + *" $temp_xrpath "*) ;; + @@ -1709,6 +1742,13 @@ + done + ;; + + + dgux) + + # Leave mostly blank for DG/UX + + major= + + versuffix=".$current.$revision"; + + verstring= + + ;; + + + linux) + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + @@ -1792,8 +1832,9 @@ + + dependency_libs="$deplibs" + case "$host" in + - *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*) + + *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos* | i[3456]86-*-dgux*) + # these systems don't actually have a c library (as such)! + + # It is wrong in DG/UX to add -lc when creating shared/dynamic objs/libs + ;; + *) + # Add libc to deplibs on all other systems. diff -Nrc3pad gcc-3.3.3/boehm-gc/doc/README.environment gcc-3.4.0/boehm-gc/doc/README.environment *** gcc-3.3.3/boehm-gc/doc/README.environment 2002-04-09 00:39:16.000000000 +0000 --- gcc-3.4.0/boehm-gc/doc/README.environment 2003-07-28 04:18:22.000000000 +0000 *************** platforms. *** 5,10 **** --- 5,12 ---- GC_INITIAL_HEAP_SIZE= - Initial heap size in bytes. May speed up process start-up. + GC_MAXIMUM_HEAP_SIZE= - Maximum collected heap size. + GC_LOOP_ON_ABORT - Causes the collector abort routine to enter a tight loop. This may make it easier to debug, such a process, especially for multithreaded platforms that don't produce usable core *************** GC_PRINT_STATS - Turn on as much logging *** 19,24 **** --- 21,31 ---- by setting GC_quiet. On by default if the collector was built without -DSILENT. + GC_DUMP_REGULARLY - Generate a GC debugging dump GC_dump() on startup + and during every collection. Very verbose. Useful + if you have a bug to report, but please include only the + last complete dump. + GC_PRINT_ADDRESS_MAP - Linux only. Dump /proc/self/maps, i.e. various address maps for the process, to stderr on every GC. Useful for mapping root addresses to source for deciphering leak *************** GC_PRINT_ADDRESS_MAP - Linux only. Dump *** 27,33 **** GC_NPROCS= - Linux w/threads only. Explicitly sets the number of processors that the GC should expect to use. Note that setting this to 1 when multiple processors are available will preserve ! correctness, but may lead to really horrible performance. GC_NO_BLACKLIST_WARNING - Prevents the collector from issuing warnings about allocations of very large blocks. --- 34,47 ---- GC_NPROCS= - Linux w/threads only. Explicitly sets the number of processors that the GC should expect to use. Note that setting this to 1 when multiple processors are available will preserve ! correctness, but may lead to really horrible performance, ! since the lock implementation will immediately yield without ! first spinning. ! ! GC_MARKERS= - Linux w/threads and parallel marker only. Set the number ! of marker threads. This is normaly set to the number of ! processors. It is safer to adjust GC_MARKERS than GC_NPROCS, ! since GC_MARKERS has no impact on the lock implementation. GC_NO_BLACKLIST_WARNING - Prevents the collector from issuing warnings about allocations of very large blocks. *************** GC_PRINT_BACK_HEIGHT - Print max length *** 62,67 **** --- 76,95 ---- of Conservative Garbage Collectors", POPL 2001, or http://lib.hpl.hp.com/techpubs/2001/HPL-2001-251.html . + GC_RETRY_SIGNALS, GC_NO_RETRY_SIGNALS - Try to compensate for lost + thread suspend signals in linux_threads.c. On by + default for GC_OSF1_THREADS, off otherwise. Note + that this does not work around a possible loss of + thread restart signals. This seems to be necessary for + some versions of Tru64. Since we've previously seen + similar issues on some other operating systems, it + was turned into a runtime flag to enable last-minute + work-arounds. + + The following turn on runtime flags that are also program settable. Checked + only during initialization. We expect that they will usually be set through + other means, but this may help with debugging and testing: + GC_ENABLE_INCREMENTAL - Turn on incremental collection at startup. Note that, depending on platform and collector configuration, this may involve write protecting pieces of the heap to *************** GC_ENABLE_INCREMENTAL - Turn on incremen *** 71,92 **** Use with caution. GC_PAUSE_TIME_TARGET - Set the desired garbage collector pause time in msecs. ! This only has an effect if incremental collection is enabled. ! If a collection requires appreciably more time than this, ! the client will be restarted, and the collector will need ! to do additional work to compensate. The special value ! "999999" indicates that pause time is unlimited, and the ! incremental collector will behave completely like a ! simple generational collector. If the collector is ! configured for parallel marking, and run on a multiprocessor, ! incremental collection should only be used with unlimited ! pause time. ! ! The following turn on runtime flags that are also program settable. Checked ! only during initialization. We expect that they will usually be set through ! other means, but this may help with debugging and testing: ! GC_FIND_LEAK - Turns on GC_find_leak and thus leak detection. GC_ALL_INTERIOR_POINTERS - Turns on GC_all_interior_pointers and thus interior pointer recognition. --- 99,118 ---- Use with caution. GC_PAUSE_TIME_TARGET - Set the desired garbage collector pause time in msecs. ! This only has an effect if incremental collection is ! enabled. If a collection requires appreciably more time ! than this, the client will be restarted, and the collector ! will need to do additional work to compensate. The ! special value "999999" indicates that pause time is ! unlimited, and the incremental collector will behave ! completely like a simple generational collector. If ! the collector is configured for parallel marking, and ! run on a multiprocessor, incremental collection should ! only be used with unlimited pause time. ! GC_FIND_LEAK - Turns on GC_find_leak and thus leak detection. Forces a ! collection at program termination to detect leaks that would ! otherwise occur after the last GC. GC_ALL_INTERIOR_POINTERS - Turns on GC_all_interior_pointers and thus interior pointer recognition. diff -Nrc3pad gcc-3.3.3/boehm-gc/doc/README.ews4800 gcc-3.4.0/boehm-gc/doc/README.ews4800 *** gcc-3.3.3/boehm-gc/doc/README.ews4800 2002-01-31 02:48:54.000000000 +0000 --- gcc-3.4.0/boehm-gc/doc/README.ews4800 2003-07-28 04:18:22.000000000 +0000 *************** GC on EWS4800 *** 73,75 **** --- 73,81 ---- -- Hironori SAKAMOTO + + When using the new "configure; make" build process, please + run configure with the --disable-shared option. "Make check" does not + yet pass with dynamic libraries. Ther reasons for that are not yet + understood. (HB, paraphrasing message from Hironori SAKAMOTO.) + diff -Nrc3pad gcc-3.3.3/boehm-gc/doc/README.linux gcc-3.4.0/boehm-gc/doc/README.linux *** gcc-3.3.3/boehm-gc/doc/README.linux 2001-08-17 18:30:49.000000000 +0000 --- gcc-3.4.0/boehm-gc/doc/README.linux 2003-07-28 04:18:22.000000000 +0000 *************** *** 1,21 **** See README.alpha for Linux on DEC AXP info. ! This file applies mostly to Linux/Intel IA32. Ports to Linux on an M68K ! and PowerPC are also integrated. They should behave similarly, except that ! the PowerPC port lacks incremental GC support, and it is unknown to what ! extent the Linux threads code is functional. See below for M68K specific ! notes. ! Incremental GC is supported on Intel IA32 and M68K. Dynamic libraries are supported on an ELF system. A static executable should be linked with the gcc option "-Wl,-defsym,_DYNAMIC=0". ! The collector appears to work with Linux threads. We have seen ! intermittent hangs in sem_wait. So far we have been unable to reproduce ! these unless the process was being debugged or traced. Thus it's ! possible that the only real issue is that the debugger loses ! signals on rare occasions. The garbage collector uses SIGPWR and SIGXCPU if it is used with Linux threads. These should not be touched by the client program. --- 1,18 ---- See README.alpha for Linux on DEC AXP info. ! This file applies mostly to Linux/Intel IA32. Ports to Linux on an M68K, IA64, ! SPARC, MIPS, Alpha and PowerPC are also integrated. They should behave ! similarly, except that the PowerPC port lacks incremental GC support, and ! it is unknown to what extent the Linux threads code is functional. ! See below for M68K specific notes. ! Incremental GC is generally supported. Dynamic libraries are supported on an ELF system. A static executable should be linked with the gcc option "-Wl,-defsym,_DYNAMIC=0". ! The collector appears to work reliably with Linux threads, but beware ! of older versions of glibc and gdb. The garbage collector uses SIGPWR and SIGXCPU if it is used with Linux threads. These should not be touched by the client program. diff -Nrc3pad gcc-3.3.3/boehm-gc/doc/README.MacOSX gcc-3.4.0/boehm-gc/doc/README.MacOSX *** gcc-3.3.3/boehm-gc/doc/README.MacOSX 2001-08-18 01:04:43.000000000 +0000 --- gcc-3.4.0/boehm-gc/doc/README.MacOSX 2003-07-28 04:18:22.000000000 +0000 *************** *** 1,27 **** ! While the GC should work on MacOS X Server, MacOS X and Darwin, I only tested ! it on MacOS X Server. ! I've added a PPC assembly version of GC_push_regs(), thus the setjmp() hack is ! no longer necessary. Incremental collection is supported via mprotect/signal. ! The current solution isn't really optimal because the signal handler must decode ! the faulting PPC machine instruction in order to find the correct heap address. ! Further, it must poke around in the register state which the kernel saved away ! in some obscure register state structure before it calls the signal handler - ! needless to say the layout of this structure is no where documented. ! Threads and dynamic libraries are not yet supported (adding dynamic library ! support via the low-level dyld API shouldn't be that hard). ! ! The original MacOS X port was brought to you by Andrew Stone. ! ! ! June, 1 2000 ! ! Dietmar Planitzer ! dave.pl@ping.at ! ! Note from Andrew Begel: ! ! One more fix to enable gc.a to link successfully into a shared library for ! MacOS X. You have to add -fno-common to the CFLAGS in the Makefile. MacOSX ! disallows common symbols in anything that eventually finds its way into a ! shared library. (I don't completely understand why, but -fno-common seems to ! work and doesn't mess up the garbage collector's functionality). --- 1 ---- ! See README.darwin for the latest Darwin/MacOSX information. diff -Nrc3pad gcc-3.3.3/boehm-gc/doc/README.macros gcc-3.4.0/boehm-gc/doc/README.macros *** gcc-3.3.3/boehm-gc/doc/README.macros 2001-08-17 18:39:18.000000000 +0000 --- gcc-3.4.0/boehm-gc/doc/README.macros 2003-07-28 04:18:22.000000000 +0000 *************** _DLL Defined by Visual C++ if dynamic l *** 51,57 **** __declspec(dllexport) needs to be added to declarations to support the case in which the collector is in a dll. ! GC_DLL User-settable macro that forces the effect of _DLL. GC_NOT_DLL User-settable macro that overrides _DLL, e.g. if dynamic libraries are used, but the collector is in a static library. --- 51,68 ---- __declspec(dllexport) needs to be added to declarations to support the case in which the collector is in a dll. ! GC_DLL User-settable macro that forces the effect of _DLL. Set ! by gc.h if _DLL is defined and GC_NOT_DLL is undefined. ! This is the macro that is tested internally to determine ! whether the GC is in its own dynamic library. May need ! to be set by clients before including gc.h. Note that ! inside the GC implementation it indicates that the ! collector is in its own dynamic library, should export ! its symbols, etc. But in clients it indicates that the ! GC resides in a different DLL, its entry points should ! be referenced accordingly, and precautions may need to ! be taken to properly deal with statically allocated ! variables in the main program. Used only for MS Windows. GC_NOT_DLL User-settable macro that overrides _DLL, e.g. if dynamic libraries are used, but the collector is in a static library. diff -Nrc3pad gcc-3.3.3/boehm-gc/doc/README.win32 gcc-3.4.0/boehm-gc/doc/README.win32 *** gcc-3.3.3/boehm-gc/doc/README.win32 2002-02-12 04:37:55.000000000 +0000 --- gcc-3.4.0/boehm-gc/doc/README.win32 2003-07-28 04:18:22.000000000 +0000 *************** registrations are ignored, but not terri *** 21,26 **** --- 21,33 ---- pointers. And the VirtualQuery call has different semantics under the two systems, and under different versions of win32s.) + Win32 applications compiled with some flavor of gcc currently behave + like win32s applications, in that dynamic library data segments are + not scanned. (Gcc does not directly support Microsoft's "structured + exception handling". It turns out that use of this feature is + unavoidable if you scan arbitrary memory segments obtained from + VirtualQuery.) + The collector test program "gctest" is linked as a GUI application, but does not open any windows. Its output appears in the file "gc.log". It may be started from the file manager. The hour glass *************** This appears to cause problems under Win *** 50,62 **** not Windows 95/98) if the memory is later passed to CreateDIBitmap. To work around this problem, build the collector with -DUSE_GLOBAL_ALLOC. This is currently incompatible with -DUSE_MUNMAP. (Thanks to Jonathan ! Clark for tracking this down.) For Microsoft development tools, rename NT_MAKEFILE as MAKEFILE. (Make sure that the CPU environment variable is defined to be i386.) In order to use the gc_cpp.h C++ interface, all client code should include gc_cpp.h. Clients may need to define GC_NOT_DLL before including gc.h, if the collector was built as a static library (as it normally is in the absence of thread support). --- 57,76 ---- not Windows 95/98) if the memory is later passed to CreateDIBitmap. To work around this problem, build the collector with -DUSE_GLOBAL_ALLOC. This is currently incompatible with -DUSE_MUNMAP. (Thanks to Jonathan ! Clark for tracking this down. There's some chance this may be fixed ! in 6.1alpha4, since we now separate heap sections with an unused page.) For Microsoft development tools, rename NT_MAKEFILE as MAKEFILE. (Make sure that the CPU environment variable is defined to be i386.) In order to use the gc_cpp.h C++ interface, all client code should include gc_cpp.h. + If you would prefer a VC++.NET project file, ask boehm@acm.org. One has + been contributed, but it seems to contain some absolute paths etc., so + it can presumably only be a starting point, and is not in the standard + distribution. It is unclear (to me, Hans Boehm) whether it is feasible to + change that. + Clients may need to define GC_NOT_DLL before including gc.h, if the collector was built as a static library (as it normally is in the absence of thread support). *************** absence of thread support). *** 64,70 **** For GNU-win32, use the regular makefile, possibly after uncommenting the line "include Makefile.DLLs". The latter should be necessary only if you want to package the collector as a DLL. The GNU-win32 port is ! believed to work only for b18, not b19, probably dues to linker changes in b19. This is probably fixable with a different definition of DATASTART and DATAEND in gcconfig.h. --- 78,84 ---- For GNU-win32, use the regular makefile, possibly after uncommenting the line "include Makefile.DLLs". The latter should be necessary only if you want to package the collector as a DLL. The GNU-win32 port is ! believed to work only for b18, not b19, probably due to linker changes in b19. This is probably fixable with a different definition of DATASTART and DATAEND in gcconfig.h. *************** To compile the collector and testing pro *** 147,153 **** All programs using gc should be compiled with 4-byte alignment. For further explanations on this see comments about Borland. ! If gc compiled as dll, the macro ``GC_DLL'' should be defined before including "gc.h" (for example, with -DGC_DLL compiler option). It's important, otherwise resulting programs will not run. --- 161,167 ---- All programs using gc should be compiled with 4-byte alignment. For further explanations on this see comments about Borland. ! If the gc is compiled as dll, the macro ``GC_DLL'' should be defined before including "gc.h" (for example, with -DGC_DLL compiler option). It's important, otherwise resulting programs will not run. diff -Nrc3pad gcc-3.3.3/boehm-gc/doc/scale.html gcc-3.4.0/boehm-gc/doc/scale.html *** gcc-3.3.3/boehm-gc/doc/scale.html 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/boehm-gc/doc/scale.html 2003-07-28 03:46:20.000000000 +0000 *************** *** 0 **** --- 1,210 ---- + + + Garbage collector scalability + + +

    Garbage collector scalability

    + In its default configuration, the Boehm-Demers-Weiser garbage collector + is not thread-safe. It can be made thread-safe for a number of environments + by building the collector with the appropriate + -DXXX-THREADS compilation + flag. This has primarily two effects: +
      +
    1. It causes the garbage collector to stop all other threads when + it needs to see a consistent memory state. +
    2. It causes the collector to acquire a lock around essentially all + allocation and garbage collection activity. +
    + Since a single lock is used for all allocation-related activity, only one + thread can be allocating or collecting at one point. This inherently + limits performance of multi-threaded applications on multiprocessors. +

    + On most platforms, the allocator/collector lock is implemented as a + spin lock with exponential back-off. Longer wait times are implemented + by yielding and/or sleeping. If a collection is in progress, the pure + spinning stage is skipped. This has the advantage that uncontested and + thus most uniprocessor lock acquisitions are very cheap. It has the + disadvantage that the application may sleep for small periods of time + even when there is work to be done. And threads may be unnecessarily + woken up for short periods. Nonetheless, this scheme empirically + outperforms native queue-based mutual exclusion implementations in most + cases, sometimes drastically so. +

    Options for enhanced scalability

    + Version 6.0 of the collector adds two facilities to enhance collector + scalability on multiprocessors. As of 6.0alpha1, these are supported + only under Linux on X86 and IA64 processors, though ports to other + otherwise supported Pthreads platforms should be straightforward. + They are intended to be used together. +
      +
    • + Building the collector with -DPARALLEL_MARK allows the collector to + run the mark phase in parallel in multiple threads, and thus on multiple + processors. The mark phase typically consumes the large majority of the + collection time. Thus this largely parallelizes the garbage collector + itself, though not the allocation process. Currently the marking is + performed by the thread that triggered the collection, together with + N-1 dedicated + threads, where N is the number of processors detected by the collector. + The dedicated threads are created once at initialization time. +

      + A second effect of this flag is to switch to a more concurrent + implementation of GC_malloc_many, so that free lists can be + built, and memory can be cleared, by more than one thread concurrently. +

    • + Building the collector with -DTHREAD_LOCAL_ALLOC adds support for thread + local allocation. It does not, by itself, cause thread local allocation + to be used. It simply allows the use of the interface in + gc_local_alloc.h. +

      + Memory returned from thread-local allocators is completely interchangeable + with that returned by the standard allocators. It may be used by other + threads. The only difference is that, if the thread allocates enough + memory of a certain kind, it will build a thread-local free list for + objects of that kind, and allocate from that. This greatly reduces + locking. The thread-local free lists are refilled using + GC_malloc_many. +

      + An important side effect of this flag is to replace the default + spin-then-sleep lock to be replace by a spin-then-queue based implementation. + This reduces performance for the standard allocation functions, + though it usually improves performance when thread-local allocation is + used heavily, and thus the number of short-duration lock acquisitions + is greatly reduced. +

    +

    + The easiest way to switch an application to thread-local allocation is to +

      +
    1. Define the macro GC_REDIRECT_TO_LOCAL, + and then include the gc.h + header in each client source file. +
    2. Invoke GC_thr_init() before any allocation. +
    3. Allocate using GC_MALLOC, GC_MALLOC_ATOMIC, + and/or GC_GCJ_MALLOC. +
    +

    The Parallel Marking Algorithm

    + We use an algorithm similar to + that developed by + Endo, Taura, and Yonezawa at the University of Tokyo. + However, the data structures and implementation are different, + and represent a smaller change to the original collector source, + probably at the expense of extreme scalability. Some of + the refinements they suggest, e.g. splitting large + objects, were also incorporated into out approach. +

    + The global mark stack is transformed into a global work queue. + Unlike the usual case, it never shrinks during a mark phase. + The mark threads remove objects from the queue by copying them to a + local mark stack and changing the global descriptor to zero, indicating + that there is no more work to be done for this entry. + This removal + is done with no synchronization. Thus it is possible for more than + one worker to remove the same entry, resulting in some work duplication. +

    + The global work queue grows only if a marker thread decides to + return some of its local mark stack to the global one. This + is done if the global queue appears to be running low, or if + the local stack is in danger of overflowing. It does require + synchronization, but should be relatively rare. +

    + The sequential marking code is reused to process local mark stacks. + Hence the amount of additional code required for parallel marking + is minimal. +

    + It should be possible to use generational collection in the presence of the + parallel collector, by calling GC_enable_incremental(). + This does not result in fully incremental collection, since parallel mark + phases cannot currently be interrupted, and doing so may be too + expensive. +

    + Gcj-style mark descriptors do not currently mix with the combination + of local allocation and incremental collection. They should work correctly + with one or the other, but not both. +

    + The number of marker threads is set on startup to the number of + available processors (or to the value of the GC_NPROCS + environment variable). If only a single processor is detected, + parallel marking is disabled. +

    + Note that setting GC_NPROCS to 1 also causes some lock acquisitions inside + the collector to immediately yield the processor instead of busy waiting + first. In the case of a multiprocessor and a client with multiple + simultaneously runnable threads, this may have disastrous performance + consequences (e.g. a factor of 10 slowdown). +

    Performance

    + We conducted some simple experiments with a version of + our GC benchmark that was slightly modified to + run multiple concurrent client threads in the same address space. + Each client thread does the same work as the original benchmark, but they share + a heap. + This benchmark involves very little work outside of memory allocation. + This was run with GC 6.0alpha3 on a dual processor Pentium III/500 machine + under Linux 2.2.12. +

    + Running with a thread-unsafe collector, the benchmark ran in 9 + seconds. With the simple thread-safe collector, + built with -DLINUX_THREADS, the execution time + increased to 10.3 seconds, or 23.5 elapsed seconds with two clients. + (The times for the malloc/ifree version + with glibc malloc + are 10.51 (standard library, pthreads not linked), + 20.90 (one thread, pthreads linked), + and 24.55 seconds respectively. The benchmark favors a + garbage collector, since most objects are small.) +

    + The following table gives execution times for the collector built + with parallel marking and thread-local allocation support + (-DGC_LINUX_THREADS -DPARALLEL_MARK -DTHREAD_LOCAL_ALLOC). We tested + the client using either one or two marker threads, and running + one or two client threads. Note that the client uses thread local + allocation exclusively. With -DTHREAD_LOCAL_ALLOC the collector + switches to a locking strategy that is better tuned to less frequent + lock acquisition. The standard allocation primitives thus peform + slightly worse than without -DTHREAD_LOCAL_ALLOC, and should be + avoided in time-critical code. +

    + (The results using pthread_mutex_lock + directly for allocation locking would have been worse still, at + least for older versions of linuxthreads. + With THREAD_LOCAL_ALLOC, we first repeatedly try to acquire the + lock with pthread_mutex_try_lock(), busy_waiting between attempts. + After a fixed number of attempts, we use pthread_mutex_lock().) +

    + These measurements do not use incremental collection, nor was prefetching + enabled in the marker. We used the C version of the benchmark. + All measurements are in elapsed seconds on an unloaded machine. +

    + + + + + +
    Number of threads1 marker thread (secs.)2 marker threads (secs.)
    1 client10.457.85
    2 clients19.9512.3
    + + The execution time for the single threaded case is slightly worse than with + simple locking. However, even the single-threaded benchmark runs faster than + even the thread-unsafe version if a second processor is available. + The execution time for two clients with thread local allocation time is + only 1.4 times the sequential execution time for a single thread in a + thread-unsafe environment, even though it involves twice the client work. + That represents close to a + factor of 2 improvement over the 2 client case with the old collector. + The old collector clearly + still suffered from some contention overhead, in spite of the fact that the + locking scheme had been fairly well tuned. +

    + Full linear speedup (i.e. the same execution time for 1 client on one + processor as 2 clients on 2 processors) + is probably not achievable on this kind of + hardware even with such a small number of processors, + since the memory system is + a major constraint for the garbage collector, + the processors usually share a single memory bus, and thus + the aggregate memory bandwidth does not increase in + proportion to the number of processors. +

    + These results are likely to be very sensitive to both hardware and OS + issues. Preliminary experiments with an older Pentium Pro machine running + an older kernel were far less encouraging. + + + diff -Nrc3pad gcc-3.3.3/boehm-gc/doc/tree.html gcc-3.4.0/boehm-gc/doc/tree.html *** gcc-3.3.3/boehm-gc/doc/tree.html 2001-08-17 18:39:18.000000000 +0000 --- gcc-3.4.0/boehm-gc/doc/tree.html 2003-07-28 04:18:22.000000000 +0000 *************** *** 1,13 **** Two-Level Tree Structure for Fast Pointer Lookup ! Hans-J. Boehm, Silicon Graphics

    Two-Level Tree Structure for Fast Pointer Lookup

    The conservative garbage collector described ! here uses a 2-level tree data structure to aid in fast pointer identification. This data structure is described in a bit more detail here, since

      --- 1,14 ---- Two-Level Tree Structure for Fast Pointer Lookup ! Hans-J. Boehm, Silicon Graphics (now at HP)

      Two-Level Tree Structure for Fast Pointer Lookup

      The conservative garbage collector described ! here ! uses a 2-level tree data structure to aid in fast pointer identification. This data structure is described in a bit more detail here, since

        diff -Nrc3pad gcc-3.3.3/boehm-gc/dyn_load.c gcc-3.4.0/boehm-gc/dyn_load.c *** gcc-3.3.3/boehm-gc/dyn_load.c 2003-03-04 06:38:30.000000000 +0000 --- gcc-3.4.0/boehm-gc/dyn_load.c 2003-07-30 17:42:28.000000000 +0000 *************** *** 55,63 **** !defined(MSWIN32) && !defined(MSWINCE) && \ !(defined(ALPHA) && defined(OSF1)) && \ !defined(HPUX) && !(defined(LINUX) && defined(__ELF__)) && \ ! !defined(RS6000) && !defined(SCO_ELF) && \ !(defined(FREEBSD) && defined(__ELF__)) && \ ! !(defined(NETBSD) && defined(__ELF__)) && !defined(HURD) --> We only know how to find data segments of dynamic libraries for the --> above. Additional SVR4 variants might not be too --> hard to add. --- 55,64 ---- !defined(MSWIN32) && !defined(MSWINCE) && \ !(defined(ALPHA) && defined(OSF1)) && \ !defined(HPUX) && !(defined(LINUX) && defined(__ELF__)) && \ ! !defined(RS6000) && !defined(SCO_ELF) && !defined(DGUX) && \ !(defined(FREEBSD) && defined(__ELF__)) && \ ! !(defined(NETBSD) && defined(__ELF__)) && !defined(HURD) && \ ! !defined(DARWIN) --> We only know how to find data segments of dynamic libraries for the --> above. Additional SVR4 variants might not be too --> hard to add. *************** *** 80,86 **** #endif #if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \ ! (defined(FREEBSD) && defined(__ELF__)) || \ (defined(NETBSD) && defined(__ELF__)) || defined(HURD) # include # include --- 81,87 ---- #endif #if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \ ! (defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \ (defined(NETBSD) && defined(__ELF__)) || defined(HURD) # include # include *************** void GC_register_dynamic_libraries() *** 264,270 **** # endif /* SUNOS */ #if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \ ! (defined(FREEBSD) && defined(__ELF__)) || \ (defined(NETBSD) && defined(__ELF__)) || defined(HURD) --- 265,271 ---- # endif /* SUNOS */ #if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \ ! (defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \ (defined(NETBSD) && defined(__ELF__)) || defined(HURD) *************** extern ssize_t GC_repeat_read(int fd, ch *** 282,337 **** /* Repeatedly read until buffer is filled, or EOF is encountered */ /* Defined in os_dep.c. */ ! static char *parse_map_entry(char *buf_ptr, word *start, word *end, ! char *prot_buf, unsigned int *maj_dev); ! void GC_register_dynamic_libraries() { - int f; - int result; char prot_buf[5]; ! int maps_size; ! char maps_temp[32768]; ! char *maps_buf; ! char *buf_ptr; int count; word start, end; ! unsigned int maj_dev, min_dev; word least_ha, greatest_ha; unsigned i; word datastart = (word)(DATASTART); ! /* Read /proc/self/maps */ ! /* Note that we may not allocate, and thus can't use stdio. */ ! f = open("/proc/self/maps", O_RDONLY); ! if (-1 == f) ABORT("Couldn't open /proc/self/maps"); ! /* stat() doesn't work for /proc/self/maps, so we have to ! read it to find out how large it is... */ ! maps_size = 0; ! do { ! result = GC_repeat_read(f, maps_temp, sizeof(maps_temp)); ! if (result <= 0) ABORT("Couldn't read /proc/self/maps"); ! maps_size += result; ! } while (result == sizeof(maps_temp)); ! ! if (maps_size > sizeof(maps_temp)) { ! /* If larger than our buffer, close and re-read it. */ ! close(f); ! f = open("/proc/self/maps", O_RDONLY); ! if (-1 == f) ABORT("Couldn't open /proc/self/maps"); ! maps_buf = alloca(maps_size); ! if (NULL == maps_buf) ABORT("/proc/self/maps alloca failed"); ! result = GC_repeat_read(f, maps_buf, maps_size); ! if (result <= 0) ABORT("Couldn't read /proc/self/maps"); ! } else { ! /* Otherwise use the fixed size buffer */ ! maps_buf = maps_temp; ! } ! ! close(f); ! maps_buf[result] = '\0'; ! buf_ptr = maps_buf; ! /* Compute heap bounds. Should be done by add_to_heap? */ least_ha = (word)(-1); greatest_ha = 0; for (i = 0; i < GC_n_heap_sects; ++i) { --- 283,305 ---- /* Repeatedly read until buffer is filled, or EOF is encountered */ /* Defined in os_dep.c. */ ! char *GC_parse_map_entry(char *buf_ptr, word *start, word *end, ! char *prot_buf, unsigned int *maj_dev); ! word GC_apply_to_maps(word (*fn)(char *)); ! /* From os_dep.c */ ! word GC_register_map_entries(char *maps) { char prot_buf[5]; ! char *buf_ptr = maps; int count; word start, end; ! unsigned int maj_dev; word least_ha, greatest_ha; unsigned i; word datastart = (word)(DATASTART); ! /* Compute heap bounds. FIXME: Should be done by add_to_heap? */ least_ha = (word)(-1); greatest_ha = 0; for (i = 0; i < GC_n_heap_sects; ++i) { *************** void GC_register_dynamic_libraries() *** 342,352 **** } if (greatest_ha < (word)GC_scratch_last_end_ptr) greatest_ha = (word)GC_scratch_last_end_ptr; - for (;;) { - - buf_ptr = parse_map_entry(buf_ptr, &start, &end, prot_buf, &maj_dev); - if (buf_ptr == NULL) return; if (prot_buf[1] == 'w') { /* This is a writable mapping. Add it to */ /* the root set unless it is already otherwise */ --- 310,319 ---- } if (greatest_ha < (word)GC_scratch_last_end_ptr) greatest_ha = (word)GC_scratch_last_end_ptr; + for (;;) { + buf_ptr = GC_parse_map_entry(buf_ptr, &start, &end, prot_buf, &maj_dev); + if (buf_ptr == NULL) return 1; if (prot_buf[1] == 'w') { /* This is a writable mapping. Add it to */ /* the root set unless it is already otherwise */ *************** void GC_register_dynamic_libraries() *** 358,373 **** # ifdef THREADS if (GC_segment_is_thread_stack(start, end)) continue; # endif ! /* The rest of this assumes that there is no mapping */ ! /* spanning the beginning of the data segment, or extending */ ! /* beyond the entire heap at both ends. */ ! /* Empirically these assumptions hold. */ ! ! if (start < (word)DATAEND && end > (word)DATAEND) { ! /* Rld may use space at the end of the main data */ ! /* segment. Thus we add that in. */ ! start = (word)DATAEND; ! } if (start < least_ha && end > least_ha) { end = least_ha; } --- 325,331 ---- # ifdef THREADS if (GC_segment_is_thread_stack(start, end)) continue; # endif ! /* We no longer exclude the main data segment. */ if (start < least_ha && end > least_ha) { end = least_ha; } *************** void GC_register_dynamic_libraries() *** 377,383 **** if (start >= least_ha && end <= greatest_ha) continue; GC_add_roots_inner((char *)start, (char *)end, TRUE); } ! } } /* We now take care of the main data segment ourselves: */ --- 335,348 ---- if (start >= least_ha && end <= greatest_ha) continue; GC_add_roots_inner((char *)start, (char *)end, TRUE); } ! } ! return 1; ! } ! ! void GC_register_dynamic_libraries() ! { ! if (!GC_apply_to_maps(GC_register_map_entries)) ! ABORT("Failed to read /proc for library registration."); } /* We now take care of the main data segment ourselves: */ *************** GC_bool GC_register_main_static_data() *** 387,446 **** } # define HAVE_REGISTER_MAIN_STATIC_DATA - // - // parse_map_entry parses an entry from /proc/self/maps so we can - // locate all writable data segments that belong to shared libraries. - // The format of one of these entries and the fields we care about - // is as follows: - // XXXXXXXX-XXXXXXXX r-xp 00000000 30:05 260537 name of mapping...\n - // ^^^^^^^^ ^^^^^^^^ ^^^^ ^^ - // start end prot maj_dev - // 0 9 18 32 - // - // The parser is called with a pointer to the entry and the return value - // is either NULL or is advanced to the next entry(the byte after the - // trailing '\n'.) - // - #define OFFSET_MAP_START 0 - #define OFFSET_MAP_END 9 - #define OFFSET_MAP_PROT 18 - #define OFFSET_MAP_MAJDEV 32 - - static char *parse_map_entry(char *buf_ptr, word *start, word *end, - char *prot_buf, unsigned int *maj_dev) - { - int i; - unsigned int val; - char *tok; - - if (buf_ptr == NULL || *buf_ptr == '\0') { - return NULL; - } - - memcpy(prot_buf, buf_ptr+OFFSET_MAP_PROT, 4); // do the protections first - prot_buf[4] = '\0'; - - if (prot_buf[1] == 'w') { // we can skip all of this if it's not writable - - tok = buf_ptr; - buf_ptr[OFFSET_MAP_START+8] = '\0'; - *start = strtoul(tok, NULL, 16); - - tok = buf_ptr+OFFSET_MAP_END; - buf_ptr[OFFSET_MAP_END+8] = '\0'; - *end = strtoul(tok, NULL, 16); - - buf_ptr += OFFSET_MAP_MAJDEV; - tok = buf_ptr; - while (*buf_ptr != ':') buf_ptr++; - *buf_ptr++ = '\0'; - *maj_dev = strtoul(tok, NULL, 16); - } - - while (*buf_ptr && *buf_ptr++ != '\n'); - - return buf_ptr; - } #endif /* USE_PROC_FOR_LIBRARIES */ --- 352,357 ---- *************** GC_bool GC_register_dynamic_libraries_dl *** 508,513 **** --- 419,425 ---- GC_add_roots_inner(DATASTART2, (char *)(DATAEND2), TRUE); # endif } + return TRUE; } else { return FALSE; *************** GC_bool GC_register_main_static_data() *** 534,539 **** --- 446,461 ---- #if defined(NETBSD) # include + /* for compatibility with 1.4.x */ + # ifndef DT_DEBUG + # define DT_DEBUG 21 + # endif + # ifndef PT_LOAD + # define PT_LOAD 1 + # endif + # ifndef PF_W + # define PF_W 2 + # endif #else # include #endif *************** void GC_register_dynamic_libraries() *** 1048,1054 **** len = ldi->ldinfo_next; GC_add_roots_inner( ldi->ldinfo_dataorg, ! (unsigned long)ldi->ldinfo_dataorg + ldi->ldinfo_datasize, TRUE); ldi = len ? (struct ld_info *)((char *)ldi + len) : 0; --- 970,976 ---- len = ldi->ldinfo_next; GC_add_roots_inner( ldi->ldinfo_dataorg, ! (ptr_t)(unsigned long)ldi->ldinfo_dataorg + ldi->ldinfo_datasize, TRUE); ldi = len ? (struct ld_info *)((char *)ldi + len) : 0; *************** void GC_register_dynamic_libraries() *** 1056,1062 **** --- 978,1116 ---- } #endif /* RS6000 */ + #ifdef DARWIN + + #ifndef __private_extern__ + #define __private_extern__ extern + #include + #undef __private_extern__ + #else + #include + #endif + #include + + /*#define DARWIN_DEBUG*/ + + const static struct { + const char *seg; + const char *sect; + } GC_dyld_sections[] = { + { SEG_DATA, SECT_DATA }, + { SEG_DATA, SECT_BSS }, + { SEG_DATA, SECT_COMMON } + }; + + #ifdef DARWIN_DEBUG + static const char *GC_dyld_name_for_hdr(struct mach_header *hdr) { + unsigned long i,c; + c = _dyld_image_count(); + for(i=0;isize == 0) continue; + start = slide + sec->addr; + end = start + sec->size; + # ifdef DARWIN_DEBUG + GC_printf4("Adding section at %p-%p (%lu bytes) from image %s\n", + start,end,sec->size,GC_dyld_name_for_hdr(hdr)); + # endif + GC_add_roots((char*)start,(char*)end); + } + # ifdef DARWIN_DEBUG + GC_print_static_roots(); + # endif + } + + /* This should never be called by a thread holding the lock */ + static void GC_dyld_image_remove(struct mach_header* hdr, unsigned long slide) { + unsigned long start,end,i; + const struct section *sec; + for(i=0;isize == 0) continue; + start = slide + sec->addr; + end = start + sec->size; + # ifdef DARWIN_DEBUG + GC_printf4("Removing section at %p-%p (%lu bytes) from image %s\n", + start,end,sec->size,GC_dyld_name_for_hdr(hdr)); + # endif + GC_remove_roots((char*)start,(char*)end); + } + # ifdef DARWIN_DEBUG + GC_print_static_roots(); + # endif + } + + void GC_register_dynamic_libraries() { + /* Currently does nothing. The callbacks are setup by GC_init_dyld() + The dyld library takes it from there. */ + } + /* The _dyld_* functions have an internal lock so no _dyld functions + can be called while the world is stopped without the risk of a deadlock. + Because of this we MUST setup callbacks BEFORE we ever stop the world. + This should be called BEFORE any thread in created and WITHOUT the + allocation lock held. */ + + void GC_init_dyld() { + static GC_bool initialized = FALSE; + char *bind_fully_env = NULL; + + if(initialized) return; + + # ifdef DARWIN_DEBUG + GC_printf0("Registering dyld callbacks...\n"); + # endif + + /* Apple's Documentation: + When you call _dyld_register_func_for_add_image, the dynamic linker runtime + calls the specified callback (func) once for each of the images that is + currently loaded into the program. When a new image is added to the program, + your callback is called again with the mach_header for the new image, and the + virtual memory slide amount of the new image. + + This WILL properly register already linked libraries and libraries + linked in the future + */ + + _dyld_register_func_for_add_image(GC_dyld_image_add); + _dyld_register_func_for_remove_image(GC_dyld_image_remove); + + /* Set this early to avoid reentrancy issues. */ + initialized = TRUE; + + bind_fully_env = getenv("DYLD_BIND_AT_LAUNCH"); + + if (bind_fully_env == NULL) { + # ifdef DARWIN_DEBUG + GC_printf0("Forcing full bind of GC code...\n"); + # endif + + if(!_dyld_bind_fully_image_containing_address((unsigned long*)GC_malloc)) + GC_abort("_dyld_bind_fully_image_containing_address failed"); + } + + } + + #define HAVE_REGISTER_MAIN_STATIC_DATA + GC_bool GC_register_main_static_data() + { + /* Already done through dyld callbacks */ + return FALSE; + } + + #endif /* DARWIN */ #else /* !DYNAMIC_LOADING */ diff -Nrc3pad gcc-3.3.3/boehm-gc/finalize.c gcc-3.4.0/boehm-gc/finalize.c *** gcc-3.3.3/boehm-gc/finalize.c 2002-02-12 04:37:53.000000000 +0000 --- gcc-3.4.0/boehm-gc/finalize.c 2003-07-28 04:18:20.000000000 +0000 *************** signed_word * log_size_ptr; *** 207,213 **** UNLOCK(); ENABLE_SIGNALS(); # endif ! new_dl = GC_oom_fn(sizeof(struct disappearing_link)); if (0 == new_dl) { GC_finalization_failures++; return(0); --- 207,214 ---- UNLOCK(); ENABLE_SIGNALS(); # endif ! new_dl = (struct disappearing_link *) ! GC_oom_fn(sizeof(struct disappearing_link)); if (0 == new_dl) { GC_finalization_failures++; return(0); *************** finalization_mark_proc * mp; *** 433,439 **** UNLOCK(); ENABLE_SIGNALS(); # endif ! new_fo = GC_oom_fn(sizeof(struct finalizable_object)); if (0 == new_fo) { GC_finalization_failures++; return; --- 434,441 ---- UNLOCK(); ENABLE_SIGNALS(); # endif ! new_fo = (struct finalizable_object *) ! GC_oom_fn(sizeof(struct finalizable_object)); if (0 == new_fo) { GC_finalization_failures++; return; *************** int GC_should_invoke_finalizers GC_PROTO *** 759,766 **** /* Should be called without allocation lock. */ int GC_invoke_finalizers() { ! register struct finalizable_object * curr_fo; ! register int count = 0; DCL_LOCK_STATE; while (GC_finalize_now != 0) { --- 761,769 ---- /* Should be called without allocation lock. */ int GC_invoke_finalizers() { ! struct finalizable_object * curr_fo; ! int count = 0; ! word mem_freed_before; DCL_LOCK_STATE; while (GC_finalize_now != 0) { *************** int GC_invoke_finalizers() *** 768,773 **** --- 771,779 ---- DISABLE_SIGNALS(); LOCK(); # endif + if (count == 0) { + mem_freed_before = GC_mem_freed; + } curr_fo = GC_finalize_now; # ifdef THREADS if (curr_fo != 0) GC_finalize_now = fo_next(curr_fo); *************** int GC_invoke_finalizers() *** 789,794 **** --- 795,805 ---- GC_free((GC_PTR)curr_fo); # endif } + if (count != 0 && mem_freed_before != GC_mem_freed) { + LOCK(); + GC_finalizer_mem_freed += (GC_mem_freed - mem_freed_before); + UNLOCK(); + } return count; } *************** void GC_notify_or_invoke_finalizers GC_P *** 801,807 **** if (GC_finalize_now == 0) return; if (!GC_finalize_on_demand) { (void) GC_invoke_finalizers(); ! GC_ASSERT(GC_finalize_now == 0); return; } if (GC_finalizer_notifier != (void (*) GC_PROTO((void)))0 --- 812,820 ---- if (GC_finalize_now == 0) return; if (!GC_finalize_on_demand) { (void) GC_invoke_finalizers(); ! # ifndef THREADS ! GC_ASSERT(GC_finalize_now == 0); ! # endif /* Otherwise GC can run concurrently and add more */ return; } if (GC_finalizer_notifier != (void (*) GC_PROTO((void)))0 *************** void GC_notify_or_invoke_finalizers GC_P *** 839,841 **** --- 852,868 ---- return(result); } + #if !defined(NO_DEBUGGING) + + void GC_print_finalization_stats() + { + struct finalizable_object *fo = GC_finalize_now; + size_t ready = 0; + + GC_printf2("%lu finalization table entries; %lu disappearing links\n", + GC_fo_entries, GC_dl_entries); + for (; 0 != fo; fo = fo_next(fo)) ++ready; + GC_printf1("%lu objects are eligible for immediate finalization\n", ready); + } + + #endif /* NO_DEBUGGING */ diff -Nrc3pad gcc-3.3.3/boehm-gc/gc_cpp.cc gcc-3.4.0/boehm-gc/gc_cpp.cc *** gcc-3.3.3/boehm-gc/gc_cpp.cc 2001-08-17 18:30:45.000000000 +0000 --- gcc-3.4.0/boehm-gc/gc_cpp.cc 2003-07-28 04:18:20.000000000 +0000 *************** Authors: John R. Ellis and Jesse Hull *** 26,40 **** #include "gc_cpp.h" - #ifndef _MSC_VER - /* In the Visual C++ case, we moved this into the header. */ void* operator new( size_t size ) { return GC_MALLOC_UNCOLLECTABLE( size );} void operator delete( void* obj ) { GC_FREE( obj );} ! #ifdef OPERATOR_NEW_ARRAY void* operator new[]( size_t size ) { return GC_MALLOC_UNCOLLECTABLE( size );} --- 26,38 ---- #include "gc_cpp.h" void* operator new( size_t size ) { return GC_MALLOC_UNCOLLECTABLE( size );} void operator delete( void* obj ) { GC_FREE( obj );} ! #ifdef GC_OPERATOR_NEW_ARRAY void* operator new[]( size_t size ) { return GC_MALLOC_UNCOLLECTABLE( size );} *************** void* operator new[]( size_t size ) { *** 42,49 **** void operator delete[]( void* obj ) { GC_FREE( obj );} ! #endif /* OPERATOR_NEW_ARRAY */ ! #endif /* _MSC_VER */ --- 40,61 ---- void operator delete[]( void* obj ) { GC_FREE( obj );} ! #endif /* GC_OPERATOR_NEW_ARRAY */ ! #ifdef _MSC_VER ! ! // This new operator is used by VC++ in case of Debug builds ! ! void* operator new( size_t size, ! int ,//nBlockUse, ! const char * szFileName, ! int nLine ) ! { ! #ifndef GC_DEBUG ! return GC_malloc_uncollectable( size ); ! #else ! return GC_debug_malloc_uncollectable(size, szFileName, nLine); ! #endif ! } + #endif /* _MSC_VER */ diff -Nrc3pad gcc-3.3.3/boehm-gc/gc_dlopen.c gcc-3.4.0/boehm-gc/gc_dlopen.c *** gcc-3.3.3/boehm-gc/gc_dlopen.c 2001-10-16 09:01:35.000000000 +0000 --- gcc-3.4.0/boehm-gc/gc_dlopen.c 2003-07-28 04:18:20.000000000 +0000 *************** *** 19,30 **** /* * This used to be in dyn_load.c. It was extracted into a separate file * to avoid having to link against libdl.{a,so} if the client doesn't call ! * dlopen. -HB */ #include "private/gc_priv.h" ! # if defined(GC_PTHREADS) || defined(GC_SOLARIS_THREADS) # if defined(dlopen) && !defined(GC_USE_LD_WRAP) /* To support various threads pkgs, gc.h interposes on dlopen by */ --- 19,32 ---- /* * This used to be in dyn_load.c. It was extracted into a separate file * to avoid having to link against libdl.{a,so} if the client doesn't call ! * dlopen. Of course this fails if the collector is in a dynamic ! * library. -HB */ #include "private/gc_priv.h" ! # if (defined(GC_PTHREADS) && !defined(GC_DARWIN_THREADS)) \ ! || defined(GC_SOLARIS_THREADS) # if defined(dlopen) && !defined(GC_USE_LD_WRAP) /* To support various threads pkgs, gc.h interposes on dlopen by */ *************** *** 44,62 **** /* calls in either a multithreaded environment, or if the library */ /* initialization code allocates substantial amounts of GC'ed memory. */ /* But I don't know of a better solution. */ ! /* This can still deadlock if the client explicitly starts a GC */ ! /* during the dlopen. He shouldn't do that. */ ! static GC_bool disable_gc_for_dlopen() { - GC_bool result; LOCK(); - result = GC_dont_gc; while (GC_incremental && GC_collection_in_progress()) { GC_collect_a_little_inner(1000); } ! GC_dont_gc = TRUE; UNLOCK(); - return(result); } /* Redefine dlopen to guarantee mutual exclusion with */ --- 46,59 ---- /* calls in either a multithreaded environment, or if the library */ /* initialization code allocates substantial amounts of GC'ed memory. */ /* But I don't know of a better solution. */ ! static void disable_gc_for_dlopen() { LOCK(); while (GC_incremental && GC_collection_in_progress()) { GC_collect_a_little_inner(1000); } ! ++GC_dont_gc; UNLOCK(); } /* Redefine dlopen to guarantee mutual exclusion with */ *************** *** 74,83 **** #endif { void * result; - GC_bool dont_gc_save; # ifndef USE_PROC_FOR_LIBRARIES ! dont_gc_save = disable_gc_for_dlopen(); # endif # ifdef GC_USE_LD_WRAP result = (void *)__real_dlopen(path, mode); --- 71,79 ---- #endif { void * result; # ifndef USE_PROC_FOR_LIBRARIES ! disable_gc_for_dlopen(); # endif # ifdef GC_USE_LD_WRAP result = (void *)__real_dlopen(path, mode); *************** *** 85,91 **** result = dlopen(path, mode); # endif # ifndef USE_PROC_FOR_LIBRARIES ! GC_dont_gc = dont_gc_save; # endif return(result); } --- 81,87 ---- result = dlopen(path, mode); # endif # ifndef USE_PROC_FOR_LIBRARIES ! GC_enable(); /* undoes disable_gc_for_dlopen */ # endif return(result); } diff -Nrc3pad gcc-3.3.3/boehm-gc/gcj_mlc.c gcc-3.4.0/boehm-gc/gcj_mlc.c *** gcc-3.3.3/boehm-gc/gcj_mlc.c 2002-02-12 04:37:53.000000000 +0000 --- gcc-3.4.0/boehm-gc/gcj_mlc.c 2003-07-28 04:18:20.000000000 +0000 *************** DCL_LOCK_STATE; *** 157,162 **** --- 157,163 ---- GC_words_allocd += lw; } *(void **)op = ptr_to_struct_containing_descr; + GC_ASSERT(((void **)op)[1] == 0); UNLOCK(); } else { LOCK(); diff -Nrc3pad gcc-3.3.3/boehm-gc/if_mach.c gcc-3.4.0/boehm-gc/if_mach.c *** gcc-3.3.3/boehm-gc/if_mach.c 2001-08-17 18:30:45.000000000 +0000 --- gcc-3.4.0/boehm-gc/if_mach.c 2003-07-28 04:18:20.000000000 +0000 *************** char ** envp; *** 14,20 **** if (strcmp(MACH_TYPE, argv[1]) != 0) return(0); if (strcmp(OS_TYPE, "") != 0 && strcmp(argv[2], "") != 0 && strcmp(OS_TYPE, argv[2]) != 0) return(0); ! printf("^^^^Starting command^^^^\n"); fflush(stdout); execvp(argv[3], argv+3); perror("Couldn't execute"); --- 14,20 ---- if (strcmp(MACH_TYPE, argv[1]) != 0) return(0); if (strcmp(OS_TYPE, "") != 0 && strcmp(argv[2], "") != 0 && strcmp(OS_TYPE, argv[2]) != 0) return(0); ! fprintf(stderr, "^^^^Starting command^^^^\n"); fflush(stdout); execvp(argv[3], argv+3); perror("Couldn't execute"); diff -Nrc3pad gcc-3.3.3/boehm-gc/include/gc_allocator.h gcc-3.4.0/boehm-gc/include/gc_allocator.h *** gcc-3.3.3/boehm-gc/include/gc_allocator.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/boehm-gc/include/gc_allocator.h 2003-07-28 03:46:17.000000000 +0000 *************** *** 0 **** --- 1,232 ---- + /* + * Copyright (c) 1996-1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * Copyright (c) 2002 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + + /* + * This implements standard-conforming allocators that interact with + * the garbage collector. Gc_alloctor allocates garbage-collectable + * objects of type T. Traceable_allocator allocates objects that + * are not temselves garbage collected, but are scanned by the + * collector for pointers to collectable objects. Traceable_alloc + * should be used for explicitly managed STL containers that may + * point to collectable objects. + * + * This code was derived from an earlier version of the GNU C++ standard + * library, which itself was derived from the SGI STL implementation. + */ + + #include "gc.h" // For size_t + + /* First some helpers to allow us to dispatch on whether or not a type + * is known to be pointerfree. + * These are private, except that the client may invoke the + * GC_DECLARE_PTRFREE macro. + */ + + struct GC_true_type {}; + struct GC_false_type {}; + + template + struct GC_type_traits { + GC_false_type GC_is_ptr_free; + }; + + # define GC_DECLARE_PTRFREE(T) \ + template<> struct GC_type_traits { GC_true_type GC_is_ptr_free; } + + GC_DECLARE_PTRFREE(signed char); + GC_DECLARE_PTRFREE(unsigned char); + GC_DECLARE_PTRFREE(signed short); + GC_DECLARE_PTRFREE(unsigned short); + GC_DECLARE_PTRFREE(signed int); + GC_DECLARE_PTRFREE(unsigned int); + GC_DECLARE_PTRFREE(signed long); + GC_DECLARE_PTRFREE(unsigned long); + GC_DECLARE_PTRFREE(float); + GC_DECLARE_PTRFREE(double); + /* The client may want to add others. */ + + // In the following GC_Tp is GC_true_type iff we are allocating a + // pointerfree object. + template + inline void * GC_selective_alloc(size_t n, GC_Tp) { + return GC_MALLOC(n); + } + + template <> + inline void * GC_selective_alloc(size_t n, GC_true_type) { + return GC_MALLOC_ATOMIC(n); + } + + /* Now the public gc_allocator class: + */ + template + class gc_allocator { + public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef GC_Tp* pointer; + typedef const GC_Tp* const_pointer; + typedef GC_Tp& reference; + typedef const GC_Tp& const_reference; + typedef GC_Tp value_type; + + template struct rebind { + typedef gc_allocator other; + }; + + gc_allocator() {} + # ifndef _MSC_VER + // I'm not sure why this is needed here in addition to the following. + // The standard specifies it for the standard allocator, but VC++ rejects + // it. -HB + gc_allocator(const gc_allocator&) throw() {} + # endif + template gc_allocator(const gc_allocator&) throw() {} + ~gc_allocator() throw() {} + + pointer address(reference GC_x) const { return &GC_x; } + const_pointer address(const_reference GC_x) const { return &GC_x; } + + // GC_n is permitted to be 0. The C++ standard says nothing about what + // the return value is when GC_n == 0. + GC_Tp* allocate(size_type GC_n, const void* = 0) { + GC_type_traits traits; + return static_cast + (GC_selective_alloc(GC_n * sizeof(GC_Tp), + traits.GC_is_ptr_free)); + } + + // __p is not permitted to be a null pointer. + void deallocate(pointer __p, size_type GC_n) + { GC_FREE(__p); } + + size_type max_size() const throw() + { return size_t(-1) / sizeof(GC_Tp); } + + void construct(pointer __p, const GC_Tp& __val) { new(__p) GC_Tp(__val); } + void destroy(pointer __p) { __p->~GC_Tp(); } + }; + + template<> + class gc_allocator { + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef void* pointer; + typedef const void* const_pointer; + typedef void value_type; + + template struct rebind { + typedef gc_allocator other; + }; + }; + + + template + inline bool operator==(const gc_allocator&, const gc_allocator&) + { + return true; + } + + template + inline bool operator!=(const gc_allocator&, const gc_allocator&) + { + return false; + } + + /* + * And the public traceable_allocator class. + */ + + // Note that we currently don't specialize the pointer-free case, since a + // pointer-free traceable container doesn't make that much sense, + // though it could become an issue due to abstraction boundaries. + template + class traceable_allocator { + public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef GC_Tp* pointer; + typedef const GC_Tp* const_pointer; + typedef GC_Tp& reference; + typedef const GC_Tp& const_reference; + typedef GC_Tp value_type; + + template struct rebind { + typedef traceable_allocator other; + }; + + traceable_allocator() throw() {} + # ifndef _MSC_VER + traceable_allocator(const traceable_allocator&) throw() {} + # endif + template traceable_allocator + (const traceable_allocator&) throw() {} + ~traceable_allocator() throw() {} + + pointer address(reference GC_x) const { return &GC_x; } + const_pointer address(const_reference GC_x) const { return &GC_x; } + + // GC_n is permitted to be 0. The C++ standard says nothing about what + // the return value is when GC_n == 0. + GC_Tp* allocate(size_type GC_n, const void* = 0) { + return static_cast(GC_MALLOC_UNCOLLECTABLE(GC_n * sizeof(GC_Tp))); + } + + // __p is not permitted to be a null pointer. + void deallocate(pointer __p, size_type GC_n) + { GC_FREE(__p); } + + size_type max_size() const throw() + { return size_t(-1) / sizeof(GC_Tp); } + + void construct(pointer __p, const GC_Tp& __val) { new(__p) GC_Tp(__val); } + void destroy(pointer __p) { __p->~GC_Tp(); } + }; + + template<> + class traceable_allocator { + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef void* pointer; + typedef const void* const_pointer; + typedef void value_type; + + template struct rebind { + typedef traceable_allocator other; + }; + }; + + + template + inline bool operator==(const traceable_allocator&, const traceable_allocator&) + { + return true; + } + + template + inline bool operator!=(const traceable_allocator&, const traceable_allocator&) + { + return false; + } + diff -Nrc3pad gcc-3.3.3/boehm-gc/include/gc_config_macros.h gcc-3.4.0/boehm-gc/include/gc_config_macros.h *** gcc-3.3.3/boehm-gc/include/gc_config_macros.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/boehm-gc/include/gc_config_macros.h 2003-07-28 03:46:17.000000000 +0000 *************** *** 0 **** --- 1,147 ---- + /* + * This should never be included directly. It is included only from gc.h. + * We separate it only to make gc.h more suitable as documentation. + * + * Some tests for old macros. These violate our namespace rules and will + * disappear shortly. Use the GC_ names. + */ + #if defined(SOLARIS_THREADS) || defined(_SOLARIS_THREADS) + # define GC_SOLARIS_THREADS + #endif + #if defined(_SOLARIS_PTHREADS) + # define GC_SOLARIS_PTHREADS + #endif + #if defined(IRIX_THREADS) + # define GC_IRIX_THREADS + #endif + #if defined(DGUX_THREADS) + # if !defined(GC_DGUX386_THREADS) + # define GC_DGUX386_THREADS + # endif + #endif + #if defined(AIX_THREADS) + # define GC_AIX_THREADS + #endif + #if defined(HPUX_THREADS) + # define GC_HPUX_THREADS + #endif + #if defined(OSF1_THREADS) + # define GC_OSF1_THREADS + #endif + #if defined(LINUX_THREADS) + # define GC_LINUX_THREADS + #endif + #if defined(WIN32_THREADS) + # define GC_WIN32_THREADS + #endif + #if defined(USE_LD_WRAP) + # define GC_USE_LD_WRAP + #endif + + #if !defined(_REENTRANT) && (defined(GC_SOLARIS_THREADS) \ + || defined(GC_SOLARIS_PTHREADS) \ + || defined(GC_HPUX_THREADS) \ + || defined(GC_AIX_THREADS) \ + || defined(GC_LINUX_THREADS)) + # define _REENTRANT + /* Better late than never. This fails if system headers that */ + /* depend on this were previously included. */ + #endif + + #if defined(GC_DGUX386_THREADS) && !defined(_POSIX4A_DRAFT10_SOURCE) + # define _POSIX4A_DRAFT10_SOURCE 1 + #endif + + # if defined(GC_SOLARIS_PTHREADS) || defined(GC_FREEBSD_THREADS) || \ + defined(GC_IRIX_THREADS) || defined(GC_LINUX_THREADS) || \ + defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) || \ + defined(GC_DGUX386_THREADS) || defined(GC_DARWIN_THREADS) || \ + defined(GC_AIX_THREADS) || \ + (defined(GC_WIN32_THREADS) && defined(__CYGWIN32__)) + # define GC_PTHREADS + # endif + + #if defined(GC_THREADS) && !defined(GC_PTHREADS) + # if defined(__linux__) + # define GC_LINUX_THREADS + # define GC_PTHREADS + # endif + # if !defined(LINUX) && (defined(_PA_RISC1_1) || defined(_PA_RISC2_0) \ + || defined(hppa) || defined(__HPPA)) + # define GC_HPUX_THREADS + # define GC_PTHREADS + # endif + # if !defined(__linux__) && (defined(__alpha) || defined(__alpha__)) + # define GC_OSF1_THREADS + # define GC_PTHREADS + # endif + # if defined(__mips) && !defined(__linux__) + # define GC_IRIX_THREADS + # define GC_PTHREADS + # endif + # if defined(__sparc) && !defined(__linux__) + # define GC_SOLARIS_PTHREADS + # define GC_PTHREADS + # endif + # if defined(__APPLE__) && defined(__MACH__) && defined(__ppc__) + # define GC_DARWIN_THREADS + # define GC_PTHREADS + # endif + # if !defined(GC_PTHREADS) && defined(__FreeBSD__) + # define GC_FREEBSD_THREADS + # define GC_PTHREADS + # endif + # if defined(DGUX) && (defined(i386) || defined(__i386__)) + # define GC_DGUX386_THREADS + # define GC_PTHREADS + # endif + #endif /* GC_THREADS */ + + #if defined(GC_THREADS) && !defined(GC_PTHREADS) && defined(MSWIN32) + # define GC_WIN32_THREADS + #endif + + #if defined(GC_SOLARIS_PTHREADS) && !defined(GC_SOLARIS_THREADS) + # define GC_SOLARIS_THREADS + #endif + + # define __GC + # include + # ifdef _WIN32_WCE + /* Yet more kluges for WinCE */ + # include /* size_t is defined here */ + typedef long ptrdiff_t; /* ptrdiff_t is not defined */ + # endif + + #if defined(_DLL) && !defined(GC_NOT_DLL) && !defined(GC_DLL) + # define GC_DLL + #endif + + #if defined(__MINGW32__) && defined(GC_DLL) + # ifdef GC_BUILD + # define GC_API __declspec(dllexport) + # else + # define GC_API __declspec(dllimport) + # endif + #endif + + #if (defined(__DMC__) || defined(_MSC_VER)) && defined(GC_DLL) + # ifdef GC_BUILD + # define GC_API extern __declspec(dllexport) + # else + # define GC_API __declspec(dllimport) + # endif + #endif + + #if defined(__WATCOMC__) && defined(GC_DLL) + # ifdef GC_BUILD + # define GC_API extern __declspec(dllexport) + # else + # define GC_API extern __declspec(dllimport) + # endif + #endif + + #ifndef GC_API + #define GC_API extern + #endif + diff -Nrc3pad gcc-3.3.3/boehm-gc/include/gc_cpp.h gcc-3.4.0/boehm-gc/include/gc_cpp.h *** gcc-3.3.3/boehm-gc/include/gc_cpp.h 2001-08-18 01:04:43.000000000 +0000 --- gcc-3.4.0/boehm-gc/include/gc_cpp.h 2003-07-28 04:18:23.000000000 +0000 *************** by UseGC. GC is an alias for UseGC, unl *** 134,140 **** #include "gc.h" #ifndef THINK_CPLUS ! #define _cdecl #endif #if ! defined( GC_NO_OPERATOR_NEW_ARRAY ) \ --- 134,142 ---- #include "gc.h" #ifndef THINK_CPLUS ! # define GC_cdecl ! #else ! # define GC_cdecl _cdecl #endif #if ! defined( GC_NO_OPERATOR_NEW_ARRAY ) \ *************** enum GCPlacement {UseGC, *** 159,170 **** --- 161,182 ---- class gc {public: inline void* operator new( size_t size ); inline void* operator new( size_t size, GCPlacement gcp ); + inline void* operator new( size_t size, void *p ); + /* Must be redefined here, since the other overloadings */ + /* hide the global definition. */ inline void operator delete( void* obj ); + # ifndef __BORLANDC__ /* Confuses the Borland compiler. */ + inline void operator delete( void*, void* ); + # endif #ifdef GC_OPERATOR_NEW_ARRAY inline void* operator new[]( size_t size ); inline void* operator new[]( size_t size, GCPlacement gcp ); + inline void* operator new[]( size_t size, void *p ); inline void operator delete[]( void* obj ); + # ifndef __BORLANDC__ + inline void gc::operator delete[]( void*, void* ); + # endif #endif /* GC_OPERATOR_NEW_ARRAY */ }; /* *************** class gc_cleanup: virtual public gc {pub *** 176,182 **** inline gc_cleanup(); inline virtual ~gc_cleanup(); private: ! inline static void _cdecl cleanup( void* obj, void* clientData );}; /* Instances of classes derived from "gc_cleanup" will be allocated in the collected heap by default. When the collector discovers an --- 188,194 ---- inline gc_cleanup(); inline virtual ~gc_cleanup(); private: ! inline static void GC_cdecl cleanup( void* obj, void* clientData );}; /* Instances of classes derived from "gc_cleanup" will be allocated in the collected heap by default. When the collector discovers an *************** inline void* operator new( *** 211,217 **** classes derived from "gc_cleanup" or containing members derived from "gc_cleanup". */ - #ifdef GC_OPERATOR_NEW_ARRAY #ifdef _MSC_VER /** This ensures that the system default operator new[] doesn't get --- 223,228 ---- *************** inline void* operator new( *** 220,261 **** * There seems to be really redirect new in this environment without * including this everywhere. */ ! inline void *operator new[]( size_t size ) ! { ! return GC_MALLOC_UNCOLLECTABLE( size ); ! } ! ! inline void operator delete[](void* obj) ! { ! GC_FREE(obj); ! }; ! ! inline void* operator new( size_t size) ! { ! return GC_MALLOC_UNCOLLECTABLE( size); ! }; ! inline void operator delete(void* obj) ! { ! GC_FREE(obj); ! }; ! // This new operator is used by VC++ in case of Debug builds ! ! inline void* operator new( size_t size, int ,//nBlockUse, const char * szFileName, ! int nLine ! ) { ! # ifndef GC_DEBUG ! return GC_malloc_uncollectable( size ); ! # else ! return GC_debug_malloc_uncollectable(size, szFileName, nLine); ! # endif ! } ! #endif /* _MSC_VER */ inline void* operator new[]( size_t size, GCPlacement gcp, --- 231,254 ---- * There seems to be really redirect new in this environment without * including this everywhere. */ ! void *operator new[]( size_t size ); ! ! void operator delete[](void* obj); ! void* operator new( size_t size); + void operator delete(void* obj); ! // This new operator is used by VC++ in case of Debug builds ! ! void* operator new( size_t size, int ,//nBlockUse, const char * szFileName, ! int nLine ); #endif /* _MSC_VER */ + + #ifdef GC_OPERATOR_NEW_ARRAY + inline void* operator new[]( size_t size, GCPlacement gcp, *************** inline void* gc::operator new( size_t si *** 283,291 **** --- 276,290 ---- else return GC_MALLOC_UNCOLLECTABLE( size );} + inline void* gc::operator new( size_t size, void *p ) { + return p;} + inline void gc::operator delete( void* obj ) { GC_FREE( obj );} + #ifndef __BORLANDC__ + inline void gc::operator delete( void*, void* ) {} + #endif #ifdef GC_OPERATOR_NEW_ARRAY *************** inline void* gc::operator new[]( size_t *** 295,308 **** inline void* gc::operator new[]( size_t size, GCPlacement gcp ) { return gc::operator new( size, gcp );} inline void gc::operator delete[]( void* obj ) { gc::operator delete( obj );} #endif /* GC_OPERATOR_NEW_ARRAY */ inline gc_cleanup::~gc_cleanup() { ! GC_REGISTER_FINALIZER_IGNORE_SELF( GC_base(this), 0, 0, 0, 0 );} inline void gc_cleanup::cleanup( void* obj, void* displ ) { ((gc_cleanup*) ((char*) obj + (ptrdiff_t) displ))->~gc_cleanup();} --- 294,314 ---- inline void* gc::operator new[]( size_t size, GCPlacement gcp ) { return gc::operator new( size, gcp );} + inline void* gc::operator new[]( size_t size, void *p ) { + return p;} + inline void gc::operator delete[]( void* obj ) { gc::operator delete( obj );} + + #ifndef __BORLANDC__ + inline void gc::operator delete[]( void*, void* ) {} + #endif #endif /* GC_OPERATOR_NEW_ARRAY */ inline gc_cleanup::~gc_cleanup() { ! GC_register_finalizer_ignore_self( GC_base(this), 0, 0, 0, 0 );} inline void gc_cleanup::cleanup( void* obj, void* displ ) { ((gc_cleanup*) ((char*) obj + (ptrdiff_t) displ))->~gc_cleanup();} diff -Nrc3pad gcc-3.3.3/boehm-gc/include/gc.h gcc-3.4.0/boehm-gc/include/gc.h *** gcc-3.3.3/boehm-gc/include/gc.h 2002-02-12 04:37:56.000000000 +0000 --- gcc-3.4.0/boehm-gc/include/gc.h 2003-07-31 04:52:36.000000000 +0000 *************** *** 30,120 **** # define _GC_H ! /* ! * Some tests for old macros. These violate our namespace rules and will ! * disappear shortly. Use the GC_ names. ! */ ! #if defined(SOLARIS_THREADS) || defined(_SOLARIS_THREADS) ! # define GC_SOLARIS_THREADS ! #endif ! #if defined(_SOLARIS_PTHREADS) ! # define GC_SOLARIS_PTHREADS ! #endif ! #if defined(IRIX_THREADS) ! # define GC_IRIX_THREADS ! #endif ! #if defined(HPUX_THREADS) ! # define GC_HPUX_THREADS ! #endif ! #if defined(OSF1_THREADS) ! # define GC_OSF1_THREADS ! #endif ! #if defined(LINUX_THREADS) ! # define GC_LINUX_THREADS ! #endif ! #if defined(WIN32_THREADS) ! # define GC_WIN32_THREADS ! #endif ! #if defined(USE_LD_WRAP) ! # define GC_USE_LD_WRAP ! #endif ! ! #if !defined(_REENTRANT) && (defined(GC_SOLARIS_THREADS) \ ! || defined(GC_SOLARIS_PTHREADS) \ ! || defined(GC_HPUX_THREADS) \ ! || defined(GC_LINUX_THREADS)) ! # define _REENTRANT ! /* Better late than never. This fails if system headers that */ ! /* depend on this were previously included. */ ! #endif ! ! #if defined(GC_SOLARIS_PTHREADS) && !defined(GC_SOLARIS_THREADS) ! # define GC_SOLARIS_THREADS ! #endif ! ! # if defined(GC_SOLARIS_PTHREADS) || defined(GC_FREEBSD_THREADS) || \ ! defined(GC_IRIX_THREADS) || defined(GC_LINUX_THREADS) || \ ! defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) ! # define GC_PTHREADS ! # endif ! ! # define __GC ! # include ! # ifdef _WIN32_WCE ! /* Yet more kluges for WinCE */ ! # include /* size_t is defined here */ ! typedef long ptrdiff_t; /* ptrdiff_t is not defined */ ! # endif ! ! #if defined(__MINGW32__) &&defined(_DLL) && !defined(GC_NOT_DLL) ! # ifdef GC_BUILD ! # define GC_API __declspec(dllexport) ! # else ! # define GC_API __declspec(dllimport) ! # endif ! #endif ! ! #if (defined(__DMC__) || defined(_MSC_VER)) \ ! && (defined(_DLL) && !defined(GC_NOT_DLL) \ ! || defined(GC_DLL)) ! # ifdef GC_BUILD ! # define GC_API extern __declspec(dllexport) ! # else ! # define GC_API __declspec(dllimport) ! # endif ! #endif ! ! #if defined(__WATCOMC__) && defined(GC_DLL) ! # ifdef GC_BUILD ! # define GC_API extern __declspec(dllexport) ! # else ! # define GC_API extern __declspec(dllimport) ! # endif ! #endif ! ! #ifndef GC_API ! #define GC_API extern ! #endif # if defined(__STDC__) || defined(__cplusplus) # define GC_PROTO(args) args --- 30,36 ---- # define _GC_H ! # include "gc_config_macros.h" # if defined(__STDC__) || defined(__cplusplus) # define GC_PROTO(args) args *************** GC_API int GC_parallel; /* GC is paralle *** 154,160 **** /* Env variable GC_NPROC is set to > 1, or */ /* GC_NPROC is not set and this is an MP. */ /* If GC_parallel is set, incremental */ ! /* collection is aonly partially functional, */ /* and may not be desirable. */ --- 70,76 ---- /* Env variable GC_NPROC is set to > 1, or */ /* GC_NPROC is not set and this is an MP. */ /* If GC_parallel is set, incremental */ ! /* collection is only partially functional, */ /* and may not be desirable. */ *************** GC_API void (* GC_finalizer_notifier)(); *** 215,222 **** /* thread, which will call GC_invoke_finalizers */ /* in response. */ ! GC_API int GC_dont_gc; /* Dont collect unless explicitly requested, e.g. */ ! /* because it's not safe. */ GC_API int GC_dont_expand; /* Dont expand heap unless explicitly requested */ --- 131,144 ---- /* thread, which will call GC_invoke_finalizers */ /* in response. */ ! GC_API int GC_dont_gc; /* != 0 ==> Dont collect. In versions 6.2a1+, */ ! /* this overrides explicit GC_gcollect() calls. */ ! /* Used as a counter, so that nested enabling */ ! /* and disabling work correctly. Should */ ! /* normally be updated with GC_enable() and */ ! /* GC_disable() calls. */ ! /* Direct assignment to GC_dont_gc is */ ! /* deprecated. */ GC_API int GC_dont_expand; /* Dont expand heap unless explicitly requested */ *************** GC_API unsigned long GC_time_limit; *** 316,324 **** /* enabled. */ # define GC_TIME_UNLIMITED 999999 /* Setting GC_time_limit to this value */ ! /* will disable the "pause time exceeded */ /* tests. */ /* * general purpose allocation routines, with roughly malloc calling conv. * The atomic versions promise that no relevant pointers are contained --- 238,255 ---- /* enabled. */ # define GC_TIME_UNLIMITED 999999 /* Setting GC_time_limit to this value */ ! /* will disable the "pause time exceeded"*/ /* tests. */ + /* Public procedures */ + + /* Initialize the collector. This is only required when using thread-local + * allocation, since unlike the regular allocation routines, GC_local_malloc + * is not self-initializing. If you use GC_local_malloc you should arrange + * to call this somehow (e.g. from a constructor) before doing any allocation. + */ + GC_API void GC_init GC_PROTO((void)); + /* * general purpose allocation routines, with roughly malloc calling conv. * The atomic versions promise that no relevant pointers are contained *************** GC_API void GC_clear_roots GC_PROTO((voi *** 419,435 **** GC_API void GC_add_roots GC_PROTO((char * low_address, char * high_address_plus_1)); /* Add a displacement to the set of those considered valid by the */ /* collector. GC_register_displacement(n) means that if p was returned */ /* by GC_malloc, then (char *)p + n will be considered to be a valid */ ! /* pointer to n. N must be small and less than the size of p. */ /* (All pointers to the interior of objects from the stack are */ /* considered valid in any case. This applies to heap objects and */ /* static data.) */ /* Preferably, this should be called before any other GC procedures. */ /* Calling it later adds to the probability of excess memory */ /* retention. */ ! /* This is a no-op if the collector was compiled with recognition of */ /* arbitrary interior pointers enabled, which is now the default. */ GC_API void GC_register_displacement GC_PROTO((GC_word n)); --- 350,370 ---- GC_API void GC_add_roots GC_PROTO((char * low_address, char * high_address_plus_1)); + /* Remove a root segment. Wizards only. */ + GC_API void GC_remove_roots GC_PROTO((char * low_address, + char * high_address_plus_1)); + /* Add a displacement to the set of those considered valid by the */ /* collector. GC_register_displacement(n) means that if p was returned */ /* by GC_malloc, then (char *)p + n will be considered to be a valid */ ! /* pointer to p. N must be small and less than the size of p. */ /* (All pointers to the interior of objects from the stack are */ /* considered valid in any case. This applies to heap objects and */ /* static data.) */ /* Preferably, this should be called before any other GC procedures. */ /* Calling it later adds to the probability of excess memory */ /* retention. */ ! /* This is a no-op if the collector has recognition of */ /* arbitrary interior pointers enabled, which is now the default. */ GC_API void GC_register_displacement GC_PROTO((GC_word n)); *************** GC_API size_t GC_get_free_bytes GC_PROTO *** 464,472 **** GC_API size_t GC_get_bytes_since_gc GC_PROTO((void)); /* Return the total number of bytes allocated in this process. */ ! /* Never decreases. */ GC_API size_t GC_get_total_bytes GC_PROTO((void)); /* Enable incremental/generational collection. */ /* Not advisable unless dirty bits are */ /* available or most heap objects are */ --- 399,416 ---- GC_API size_t GC_get_bytes_since_gc GC_PROTO((void)); /* Return the total number of bytes allocated in this process. */ ! /* Never decreases, except due to wrapping. */ GC_API size_t GC_get_total_bytes GC_PROTO((void)); + /* Disable garbage collection. Even GC_gcollect calls will be */ + /* ineffective. */ + GC_API void GC_disable GC_PROTO((void)); + + /* Reenable garbage collection. GC_disable() and GC_enable() calls */ + /* nest. Garbage collection is enabled if the number of calls to both */ + /* both functions is equal. */ + GC_API void GC_enable GC_PROTO((void)); + /* Enable incremental/generational collection. */ /* Not advisable unless dirty bits are */ /* available or most heap objects are */ *************** GC_API size_t GC_get_total_bytes GC_PROT *** 474,480 **** /* Don't use in leak finding mode. */ /* Ignored if GC_dont_gc is true. */ /* Only the generational piece of this is */ ! /* functional if GC_parallel is TRUE. */ GC_API void GC_enable_incremental GC_PROTO((void)); /* Does incremental mode write-protect pages? Returns zero or */ --- 418,428 ---- /* Don't use in leak finding mode. */ /* Ignored if GC_dont_gc is true. */ /* Only the generational piece of this is */ ! /* functional if GC_parallel is TRUE */ ! /* or if GC_time_limit is GC_TIME_UNLIMITED. */ ! /* Causes GC_local_gcj_malloc() to revert to */ ! /* locked allocation. Must be called */ ! /* before any GC_local_gcj_malloc() calls. */ GC_API void GC_enable_incremental GC_PROTO((void)); /* Does incremental mode write-protect pages? Returns zero or */ *************** GC_API GC_PTR GC_malloc_atomic_ignore_of *** 518,523 **** --- 466,507 ---- # define GC_RETURN_ADDR (GC_word)__return_address #endif + #ifdef __linux__ + # include + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ + && !defined(__ia64__) + # define GC_HAVE_BUILTIN_BACKTRACE + # define GC_CAN_SAVE_CALL_STACKS + # endif + # if defined(__i386__) || defined(__x86_64__) + # define GC_CAN_SAVE_CALL_STACKS + # endif + #endif + + #if defined(__sparc__) + # define GC_CAN_SAVE_CALL_STACKS + #endif + + /* If we're on an a platform on which we can't save call stacks, but */ + /* gcc is normally used, we go ahead and define GC_ADD_CALLER. */ + /* We make this decision independent of whether gcc is actually being */ + /* used, in order to keep the interface consistent, and allow mixing */ + /* of compilers. */ + /* This may also be desirable if it is possible but expensive to */ + /* retrieve the call chain. */ + #if (defined(__linux__) || defined(__NetBSD__) || defined(__OpenBSD__) \ + || defined(__FreeBSD__)) & !defined(GC_CAN_SAVE_CALL_STACKS) + # define GC_ADD_CALLER + # if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) + /* gcc knows how to retrieve return address, but we don't know */ + /* how to generate call stacks. */ + # define GC_RETURN_ADDR (GC_word)__builtin_return_address(0) + # else + /* Just pass 0 for gcc compatibility. */ + # define GC_RETURN_ADDR 0 + # endif + #endif + #ifdef GC_ADD_CALLER # define GC_EXTRAS GC_RETURN_ADDR, __FILE__, __LINE__ # define GC_EXTRA_PARAMS GC_word ra, GC_CONST char * s, int i *************** GC_API GC_PTR GC_debug_malloc_uncollecta *** 536,553 **** GC_PROTO((size_t size_in_bytes, GC_EXTRA_PARAMS)); GC_API GC_PTR GC_debug_malloc_stubborn GC_PROTO((size_t size_in_bytes, GC_EXTRA_PARAMS)); GC_API void GC_debug_free GC_PROTO((GC_PTR object_addr)); GC_API GC_PTR GC_debug_realloc GC_PROTO((GC_PTR old_object, size_t new_size_in_bytes, GC_EXTRA_PARAMS)); - GC_API void GC_debug_change_stubborn GC_PROTO((GC_PTR)); GC_API void GC_debug_end_stubborn_change GC_PROTO((GC_PTR)); # ifdef GC_DEBUG # define GC_MALLOC(sz) GC_debug_malloc(sz, GC_EXTRAS) # define GC_MALLOC_ATOMIC(sz) GC_debug_malloc_atomic(sz, GC_EXTRAS) ! # define GC_MALLOC_UNCOLLECTABLE(sz) GC_debug_malloc_uncollectable(sz, \ ! GC_EXTRAS) # define GC_REALLOC(old, sz) GC_debug_realloc(old, sz, GC_EXTRAS) # define GC_FREE(p) GC_debug_free(p) # define GC_REGISTER_FINALIZER(p, f, d, of, od) \ --- 520,561 ---- GC_PROTO((size_t size_in_bytes, GC_EXTRA_PARAMS)); GC_API GC_PTR GC_debug_malloc_stubborn GC_PROTO((size_t size_in_bytes, GC_EXTRA_PARAMS)); + GC_API GC_PTR GC_debug_malloc_ignore_off_page + GC_PROTO((size_t size_in_bytes, GC_EXTRA_PARAMS)); + GC_API GC_PTR GC_debug_malloc_atomic_ignore_off_page + GC_PROTO((size_t size_in_bytes, GC_EXTRA_PARAMS)); GC_API void GC_debug_free GC_PROTO((GC_PTR object_addr)); GC_API GC_PTR GC_debug_realloc GC_PROTO((GC_PTR old_object, size_t new_size_in_bytes, GC_EXTRA_PARAMS)); GC_API void GC_debug_change_stubborn GC_PROTO((GC_PTR)); GC_API void GC_debug_end_stubborn_change GC_PROTO((GC_PTR)); + + /* Routines that allocate objects with debug information (like the */ + /* above), but just fill in dummy file and line number information. */ + /* Thus they can serve as drop-in malloc/realloc replacements. This */ + /* can be useful for two reasons: */ + /* 1) It allows the collector to be built with DBG_HDRS_ALL defined */ + /* even if some allocation calls come from 3rd party libraries */ + /* that can't be recompiled. */ + /* 2) On some platforms, the file and line information is redundant, */ + /* since it can be reconstructed from a stack trace. On such */ + /* platforms it may be more convenient not to recompile, e.g. for */ + /* leak detection. This can be accomplished by instructing the */ + /* linker to replace malloc/realloc with these. */ + GC_API GC_PTR GC_debug_malloc_replacement GC_PROTO((size_t size_in_bytes)); + GC_API GC_PTR GC_debug_realloc_replacement + GC_PROTO((GC_PTR object_addr, size_t size_in_bytes)); + # ifdef GC_DEBUG # define GC_MALLOC(sz) GC_debug_malloc(sz, GC_EXTRAS) # define GC_MALLOC_ATOMIC(sz) GC_debug_malloc_atomic(sz, GC_EXTRAS) ! # define GC_MALLOC_UNCOLLECTABLE(sz) \ ! GC_debug_malloc_uncollectable(sz, GC_EXTRAS) ! # define GC_MALLOC_IGNORE_OFF_PAGE(sz) \ ! GC_debug_malloc_ignore_off_page(sz, GC_EXTRAS) ! # define GC_MALLOC_ATOMIC_IGNORE_OFF_PAGE(sz) \ ! GC_debug_malloc_atomic_ignore_off_page(sz, GC_EXTRAS) # define GC_REALLOC(old, sz) GC_debug_realloc(old, sz, GC_EXTRAS) # define GC_FREE(p) GC_debug_free(p) # define GC_REGISTER_FINALIZER(p, f, d, of, od) \ *************** GC_API void GC_debug_end_stubborn_change *** 566,571 **** --- 574,583 ---- # define GC_MALLOC(sz) GC_malloc(sz) # define GC_MALLOC_ATOMIC(sz) GC_malloc_atomic(sz) # define GC_MALLOC_UNCOLLECTABLE(sz) GC_malloc_uncollectable(sz) + # define GC_MALLOC_IGNORE_OFF_PAGE(sz) \ + GC_malloc_ignore_off_page(sz) + # define GC_MALLOC_ATOMIC_IGNORE_OFF_PAGE(sz) \ + GC_malloc_atomic_ignore_off_page(sz) # define GC_REALLOC(old, sz) GC_realloc(old, sz) # define GC_FREE(p) GC_free(p) # define GC_REGISTER_FINALIZER(p, f, d, of, od) \ *************** GC_API void GC_debug_register_finalizer *** 644,650 **** /* itself. There is a stylistic argument that this is wrong, */ /* but it's unavoidable for C++, since the compiler may */ /* silently introduce these. It's also benign in that specific */ ! /* case. */ /* Note that cd will still be viewed as accessible, even if it */ /* refers to the object itself. */ GC_API void GC_register_finalizer_ignore_self --- 656,663 ---- /* itself. There is a stylistic argument that this is wrong, */ /* but it's unavoidable for C++, since the compiler may */ /* silently introduce these. It's also benign in that specific */ ! /* case. And it helps if finalizable objects are split to */ ! /* avoid cycles. */ /* Note that cd will still be viewed as accessible, even if it */ /* refers to the object itself. */ GC_API void GC_register_finalizer_ignore_self *************** GC_API int GC_unregister_disappearing_li *** 717,727 **** /* Undoes a registration by either of the above two */ /* routines. */ - /* Auxiliary fns to make finalization work correctly with displaced */ - /* pointers introduced by the debugging allocators. */ - GC_API GC_PTR GC_make_closure GC_PROTO((GC_finalization_proc fn, GC_PTR data)); - GC_API void GC_debug_invoke_finalizer GC_PROTO((GC_PTR obj, GC_PTR data)); - /* Returns !=0 if GC_invoke_finalizers has something to do. */ GC_API int GC_should_invoke_finalizers GC_PROTO((void)); --- 730,735 ---- *************** GC_API int GC_invoke_finalizers GC_PROTO *** 738,743 **** --- 746,755 ---- typedef void (*GC_warn_proc) GC_PROTO((char *msg, GC_word arg)); GC_API GC_warn_proc GC_set_warn_proc GC_PROTO((GC_warn_proc p)); /* Returns old warning procedure. */ + + GC_API GC_word GC_set_free_space_divisor GC_PROTO((GC_word value)); + /* Set free_space_divisor. See above for definition. */ + /* Returns old value. */ /* The following is intended to be used by a higher level */ /* (e.g. Java-like) finalization facility. It is expected */ *************** extern void GC_thr_init(); /* Needed for *** 873,886 **** #endif /* THREADS && !SRC_M3 */ ! #if defined(GC_WIN32_THREADS) # include /* * All threads must be created using GC_CreateThread, so that they will be ! * recorded in the thread table. */ ! HANDLE WINAPI GC_CreateThread( LPSECURITY_ATTRIBUTES lpThreadAttributes, DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId ); --- 885,901 ---- #endif /* THREADS && !SRC_M3 */ ! #if defined(GC_WIN32_THREADS) && !defined(__CYGWIN32__) && !defined(__CYGWIN__) # include /* * All threads must be created using GC_CreateThread, so that they will be ! * recorded in the thread table. For backwards compatibility, this is not ! * technically true if the GC is built as a dynamic library, since it can ! * and does then use DllMain to keep track of thread creations. But new code ! * should be built to call GC_CreateThread. */ ! GC_API HANDLE WINAPI GC_CreateThread( LPSECURITY_ATTRIBUTES lpThreadAttributes, DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId ); *************** extern void GC_thr_init(); /* Needed for *** 902,908 **** # endif # endif /* defined(_WIN32_WCE) */ ! #endif /* defined(GC_WIN32_THREADS) */ /* * If you are planning on putting --- 917,923 ---- # endif # endif /* defined(_WIN32_WCE) */ ! #endif /* defined(GC_WIN32_THREADS) && !cygwin */ /* * If you are planning on putting *************** extern void GC_thr_init(); /* Needed for *** 914,926 **** # define GC_INIT() { extern end, etext; \ GC_noop(&end, &etext); } #else ! # if (defined(__CYGWIN32__) && defined(GC_USE_DLL)) || defined (_AIX) /* ! * Similarly gnu-win32 DLLs need explicit initialization */ # define GC_INIT() { GC_add_roots(DATASTART, DATAEND); } # else # define GC_INIT() # endif #endif --- 929,946 ---- # define GC_INIT() { extern end, etext; \ GC_noop(&end, &etext); } #else ! # if defined(__CYGWIN32__) && defined(GC_DLL) || defined (_AIX) /* ! * Similarly gnu-win32 DLLs need explicit initialization from ! * the main program, as does AIX. */ # define GC_INIT() { GC_add_roots(DATASTART, DATAEND); } # else + # if defined(__APPLE__) && defined(__MACH__) + # define GC_INIT() { GC_init(); } + # else # define GC_INIT() + # endif # endif #endif diff -Nrc3pad gcc-3.3.3/boehm-gc/include/gc_local_alloc.h gcc-3.4.0/boehm-gc/include/gc_local_alloc.h *** gcc-3.3.3/boehm-gc/include/gc_local_alloc.h 2001-08-17 18:30:50.000000000 +0000 --- gcc-3.4.0/boehm-gc/include/gc_local_alloc.h 2003-07-28 04:18:23.000000000 +0000 *************** *** 33,38 **** --- 33,41 ---- * -DTHREAD_LOCAL_ALLOC, which is currently supported only on Linux. * * The debugging allocators use standard, not thread-local allocation. + * + * These routines normally require an explicit call to GC_init(), though + * that may be done from a constructor function. */ #ifndef GC_LOCAL_ALLOC_H diff -Nrc3pad gcc-3.3.3/boehm-gc/include/gc_mark.h gcc-3.4.0/boehm-gc/include/gc_mark.h *** gcc-3.3.3/boehm-gc/include/gc_mark.h 2001-08-17 18:30:50.000000000 +0000 --- gcc-3.4.0/boehm-gc/include/gc_mark.h 2003-07-28 04:18:23.000000000 +0000 *************** extern GC_PTR GC_greatest_plausible_heap *** 129,135 **** /* be reserved for exceptional cases. That will ensure that */ /* performance of this call is not extremely performance critical. */ /* (Otherwise we would need to inline GC_mark_and_push completely, */ ! /* which would tie the client code to a fixed colllector version.) */ struct GC_ms_entry *GC_mark_and_push GC_PROTO((GC_PTR obj, struct GC_ms_entry * mark_stack_ptr, --- 129,137 ---- /* be reserved for exceptional cases. That will ensure that */ /* performance of this call is not extremely performance critical. */ /* (Otherwise we would need to inline GC_mark_and_push completely, */ ! /* which would tie the client code to a fixed collector version.) */ ! /* Note that mark procedures should explicitly call FIXUP_POINTER() */ ! /* if required. */ struct GC_ms_entry *GC_mark_and_push GC_PROTO((GC_PTR obj, struct GC_ms_entry * mark_stack_ptr, diff -Nrc3pad gcc-3.3.3/boehm-gc/include/gc_pthread_redirects.h gcc-3.4.0/boehm-gc/include/gc_pthread_redirects.h *** gcc-3.3.3/boehm-gc/include/gc_pthread_redirects.h 2001-10-17 04:55:28.000000000 +0000 --- gcc-3.4.0/boehm-gc/include/gc_pthread_redirects.h 2003-07-28 04:18:23.000000000 +0000 *************** *** 52,66 **** int GC_pthread_create(pthread_t *new_thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg); int GC_pthread_sigmask(int how, const sigset_t *set, sigset_t *oset); int GC_pthread_join(pthread_t thread, void **retval); int GC_pthread_detach(pthread_t thread); # define pthread_create GC_pthread_create - # define pthread_sigmask GC_pthread_sigmask # define pthread_join GC_pthread_join # define pthread_detach GC_pthread_detach # define dlopen GC_dlopen #endif /* GC_xxxxx_THREADS */ --- 52,81 ---- int GC_pthread_create(pthread_t *new_thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg); + #ifndef GC_DARWIN_THREADS int GC_pthread_sigmask(int how, const sigset_t *set, sigset_t *oset); + #endif int GC_pthread_join(pthread_t thread, void **retval); int GC_pthread_detach(pthread_t thread); + #if defined(GC_OSF1_THREADS) \ + && defined(_PTHREAD_USE_MANGLED_NAMES_) && !defined(_PTHREAD_USE_PTDNAM_) + /* Unless the compiler supports #pragma extern_prefix, the Tru64 UNIX + redefines some POSIX thread functions to use mangled names. + If so, undef them before redefining. */ + # undef pthread_create + # undef pthread_join + # undef pthread_detach + #endif + # define pthread_create GC_pthread_create # define pthread_join GC_pthread_join # define pthread_detach GC_pthread_detach + + #ifndef GC_DARWIN_THREADS + # define pthread_sigmask GC_pthread_sigmask # define dlopen GC_dlopen + #endif #endif /* GC_xxxxx_THREADS */ diff -Nrc3pad gcc-3.3.3/boehm-gc/include/gc_typed.h gcc-3.4.0/boehm-gc/include/gc_typed.h *** gcc-3.3.3/boehm-gc/include/gc_typed.h 2001-08-17 18:30:50.000000000 +0000 --- gcc-3.4.0/boehm-gc/include/gc_typed.h 2003-07-28 04:18:23.000000000 +0000 *************** *** 29,42 **** # include "gc.h" # endif typedef GC_word * GC_bitmap; /* The least significant bit of the first word is one if */ /* the first word in the object may be a pointer. */ # define GC_get_bit(bm, index) \ ! (((bm)[divWORDSZ(index)] >> modWORDSZ(index)) & 1) # define GC_set_bit(bm, index) \ ! (bm)[divWORDSZ(index)] |= (word)1 << modWORDSZ(index) typedef GC_word GC_descr; --- 29,49 ---- # include "gc.h" # endif + #ifdef __cplusplus + extern "C" { + #endif typedef GC_word * GC_bitmap; /* The least significant bit of the first word is one if */ /* the first word in the object may be a pointer. */ + # define GC_WORDSZ (8*sizeof(GC_word)) # define GC_get_bit(bm, index) \ ! (((bm)[index/GC_WORDSZ] >> (index%GC_WORDSZ)) & 1) # define GC_set_bit(bm, index) \ ! (bm)[index/GC_WORDSZ] |= ((GC_word)1 << (index%GC_WORDSZ)) ! # define GC_WORD_OFFSET(t, f) (offsetof(t,f)/sizeof(GC_word)) ! # define GC_WORD_LEN(t) (sizeof(t)/ sizeof(GC_word)) ! # define GC_BITMAP_SIZE(t) ((GC_WORD_LEN(t) + GC_WORDSZ-1)/GC_WORDSZ) typedef GC_word GC_descr; *************** GC_API GC_descr GC_make_descriptor GC_PR *** 57,62 **** --- 64,79 ---- /* is intended to be called once per type, not once */ /* per allocation. */ + /* It is possible to generate a descriptor for a C type T with */ + /* word aligned pointer fields f1, f2, ... as follows: */ + /* */ + /* GC_descr T_descr; */ + /* GC_word T_bitmap[GC_BITMAP_SIZE(T)] = {0}; */ + /* GC_set_bit(T_bitmap, GC_WORD_OFFSET(T,f1)); */ + /* GC_set_bit(T_bitmap, GC_WORD_OFFSET(T,f2)); */ + /* ... */ + /* T_descr = GC_make_descriptor(T_bitmap, GC_WORD_LEN(T)); */ + GC_API GC_PTR GC_malloc_explicitly_typed GC_PROTO((size_t size_in_bytes, GC_descr d)); /* Allocate an object whose layout is described by d. */ *************** GC_API GC_PTR GC_calloc_explicitly_typed *** 79,93 **** /* Returned object is cleared. */ #ifdef GC_DEBUG ! # define GC_MALLOC_EXPLICTLY_TYPED(bytes, d) GC_MALLOC(bytes) ! # define GC_CALLOC_EXPLICTLY_TYPED(n, bytes, d) GC_MALLOC(n*bytes) #else ! # define GC_MALLOC_EXPLICTLY_TYPED(bytes, d) \ GC_malloc_explicitly_typed(bytes, d) ! # define GC_CALLOC_EXPLICTLY_TYPED(n, bytes, d) \ GC_calloc_explicitly_typed(n, bytes, d) #endif /* !GC_DEBUG */ #endif /* _GC_TYPED_H */ --- 96,113 ---- /* Returned object is cleared. */ #ifdef GC_DEBUG ! # define GC_MALLOC_EXPLICITLY_TYPED(bytes, d) GC_MALLOC(bytes) ! # define GC_CALLOC_EXPLICITLY_TYPED(n, bytes, d) GC_MALLOC(n*bytes) #else ! # define GC_MALLOC_EXPLICITLY_TYPED(bytes, d) \ GC_malloc_explicitly_typed(bytes, d) ! # define GC_CALLOC_EXPLICITLY_TYPED(n, bytes, d) \ GC_calloc_explicitly_typed(n, bytes, d) #endif /* !GC_DEBUG */ + #ifdef __cplusplus + } /* matches extern "C" */ + #endif #endif /* _GC_TYPED_H */ diff -Nrc3pad gcc-3.3.3/boehm-gc/include/Makefile.in gcc-3.4.0/boehm-gc/include/Makefile.in *** gcc-3.3.3/boehm-gc/include/Makefile.in 2002-12-31 17:52:45.000000000 +0000 --- gcc-3.4.0/boehm-gc/include/Makefile.in 2003-07-28 04:18:22.000000000 +0000 *************** *** 1,6 **** ! # Makefile.in generated automatically by automake 1.4 from Makefile.am ! # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. --- 1,6 ---- ! # Makefile.in generated automatically by automake 1.4-p5 from Makefile.am ! # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. *************** target_triplet = @target@ *** 66,74 **** --- 66,76 ---- AR = @AR@ AS = @AS@ CC = @CC@ + CFLAGS = @CFLAGS@ CPP = @CPP@ CXX = @CXX@ CXXCPP = @CXXCPP@ + CXXFLAGS = @CXXFLAGS@ CXXINCLUDES = @CXXINCLUDES@ DLLTOOL = @DLLTOOL@ EXEEXT = @EXEEXT@ *************** RANLIB = @RANLIB@ *** 89,98 **** --- 91,105 ---- STRIP = @STRIP@ THREADLIBS = @THREADLIBS@ VERSION = @VERSION@ + addincludes = @addincludes@ + addlibs = @addlibs@ addobjs = @addobjs@ + addtests = @addtests@ gc_basedir = @gc_basedir@ mkinstalldirs = @mkinstalldirs@ target_all = @target_all@ + toolexecdir = @toolexecdir@ + toolexeclibdir = @toolexeclibdir@ AUTOMAKE_OPTIONS = foreign diff -Nrc3pad gcc-3.3.3/boehm-gc/include/new_gc_alloc.h gcc-3.4.0/boehm-gc/include/new_gc_alloc.h *** gcc-3.3.3/boehm-gc/include/new_gc_alloc.h 2001-10-16 09:01:38.000000000 +0000 --- gcc-3.4.0/boehm-gc/include/new_gc_alloc.h 2003-07-28 04:18:23.000000000 +0000 *************** *** 64,69 **** --- 64,77 ---- #endif #endif + /* A hack to deal with gcc 3.1. If you are using gcc3.1 and later, */ + /* you should probably really use gc_allocator.h instead. */ + #if defined (__GNUC__) && \ + (__GNUC > 3 || (__GNUC__ == 3 && (__GNUC_MINOR__ >= 1))) + # define simple_alloc __simple_alloc + #endif + + #define GC_ALLOC_H diff -Nrc3pad gcc-3.3.3/boehm-gc/include/private/darwin_semaphore.h gcc-3.4.0/boehm-gc/include/private/darwin_semaphore.h *** gcc-3.3.3/boehm-gc/include/private/darwin_semaphore.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/boehm-gc/include/private/darwin_semaphore.h 2003-07-28 03:46:18.000000000 +0000 *************** *** 0 **** --- 1,68 ---- + #ifndef GC_DARWIN_SEMAPHORE_H + #define GC_DARWIN_SEMAPHORE_H + + #if !defined(GC_DARWIN_THREADS) + #error darwin_semaphore.h included with GC_DARWIN_THREADS not defined + #endif + + /* + This is a very simple semaphore implementation for darwin. It + is implemented in terms of pthreads calls so it isn't async signal + safe. This isn't a problem because signals aren't used to + suspend threads on darwin. + */ + + typedef struct { + pthread_mutex_t mutex; + pthread_cond_t cond; + int value; + } sem_t; + + static int sem_init(sem_t *sem, int pshared, int value) { + int ret; + if(pshared) + GC_abort("sem_init with pshared set"); + sem->value = value; + + ret = pthread_mutex_init(&sem->mutex,NULL); + if(ret < 0) return -1; + ret = pthread_cond_init(&sem->cond,NULL); + if(ret < 0) return -1; + return 0; + } + + static int sem_post(sem_t *sem) { + if(pthread_mutex_lock(&sem->mutex) < 0) + return -1; + sem->value++; + if(pthread_cond_signal(&sem->cond) < 0) { + pthread_mutex_unlock(&sem->mutex); + return -1; + } + if(pthread_mutex_unlock(&sem->mutex) < 0) + return -1; + return 0; + } + + static int sem_wait(sem_t *sem) { + if(pthread_mutex_lock(&sem->mutex) < 0) + return -1; + while(sem->value == 0) { + pthread_cond_wait(&sem->cond,&sem->mutex); + } + sem->value--; + if(pthread_mutex_unlock(&sem->mutex) < 0) + return -1; + return 0; + } + + static int sem_destroy(sem_t *sem) { + int ret; + ret = pthread_cond_destroy(&sem->cond); + if(ret < 0) return -1; + ret = pthread_mutex_destroy(&sem->mutex); + if(ret < 0) return -1; + return 0; + } + + #endif diff -Nrc3pad gcc-3.3.3/boehm-gc/include/private/darwin_stop_world.h gcc-3.4.0/boehm-gc/include/private/darwin_stop_world.h *** gcc-3.3.3/boehm-gc/include/private/darwin_stop_world.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/boehm-gc/include/private/darwin_stop_world.h 2003-07-28 03:46:18.000000000 +0000 *************** *** 0 **** --- 1,15 ---- + #ifndef GC_DARWIN_STOP_WORLD_H + #define GC_DARWIN_STOP_WORLD_H + + #if !defined(GC_DARWIN_THREADS) + #error darwin_stop_world.h included without GC_DARWIN_THREADS defined + #endif + + #include + #include + + struct thread_stop_info { + mach_port_t mach_thread; + }; + + #endif diff -Nrc3pad gcc-3.3.3/boehm-gc/include/private/dbg_mlc.h gcc-3.4.0/boehm-gc/include/private/dbg_mlc.h *** gcc-3.3.3/boehm-gc/include/private/dbg_mlc.h 2002-02-12 04:37:57.000000000 +0000 --- gcc-3.4.0/boehm-gc/include/private/dbg_mlc.h 2003-07-28 04:18:23.000000000 +0000 *************** typedef struct { *** 115,130 **** #ifdef SHORT_DBG_HDRS # define DEBUG_BYTES (sizeof (oh)) #else /* Add space for END_FLAG, but use any extra space that was already */ /* added to catch off-the-end pointers. */ ! # define DEBUG_BYTES (sizeof (oh) + sizeof (word) - EXTRA_BYTES) #endif #define USR_PTR_FROM_BASE(p) ((ptr_t)(p) + sizeof(oh)) /* Round bytes to words without adding extra byte at end. */ #define SIMPLE_ROUNDED_UP_WORDS(n) BYTES_TO_WORDS((n) + WORDS_TO_BYTES(1) - 1) #ifdef SAVE_CALL_CHAIN # define ADD_CALL_CHAIN(base, ra) GC_save_callers(((oh *)(base)) -> oh_ci) # define PRINT_CALL_CHAIN(base) GC_print_callers(((oh *)(base)) -> oh_ci) --- 115,138 ---- #ifdef SHORT_DBG_HDRS # define DEBUG_BYTES (sizeof (oh)) + # define UNCOLLECTABLE_DEBUG_BYTES DEBUG_BYTES #else /* Add space for END_FLAG, but use any extra space that was already */ /* added to catch off-the-end pointers. */ ! /* For uncollectable objects, the extra byte is not added. */ ! # define UNCOLLECTABLE_DEBUG_BYTES (sizeof (oh) + sizeof (word)) ! # define DEBUG_BYTES (UNCOLLECTABLE_DEBUG_BYTES - EXTRA_BYTES) #endif #define USR_PTR_FROM_BASE(p) ((ptr_t)(p) + sizeof(oh)) /* Round bytes to words without adding extra byte at end. */ #define SIMPLE_ROUNDED_UP_WORDS(n) BYTES_TO_WORDS((n) + WORDS_TO_BYTES(1) - 1) + /* ADD_CALL_CHAIN stores a (partial) call chain into an object */ + /* header. It may be called with or without the allocation */ + /* lock. */ + /* PRINT_CALL_CHAIN prints the call chain stored in an object */ + /* to stderr. It requires that we do not hold the lock. */ #ifdef SAVE_CALL_CHAIN # define ADD_CALL_CHAIN(base, ra) GC_save_callers(((oh *)(base)) -> oh_ci) # define PRINT_CALL_CHAIN(base) GC_print_callers(((oh *)(base)) -> oh_ci) diff -Nrc3pad gcc-3.3.3/boehm-gc/include/private/gcconfig.h gcc-3.4.0/boehm-gc/include/private/gcconfig.h *** gcc-3.3.3/boehm-gc/include/private/gcconfig.h 2003-04-10 00:08:01.000000000 +0000 --- gcc-3.4.0/boehm-gc/include/private/gcconfig.h 2004-01-20 15:15:49.000000000 +0000 *************** *** 13,23 **** --- 13,37 ---- * provided the above notices are retained, and a notice that the code was * modified is included with the above copyright notice. */ + + /* + * This header is private to the gc. It is almost always included from + * gc_priv.h. However it is possible to include it by itself if just the + * configuration macros are needed. In that + * case, a few declarations relying on types declared in gc_priv.h will be + * omitted. + */ #ifndef GCCONFIG_H # define GCCONFIG_H + # ifndef GC_PRIVATE_H + /* Fake ptr_t declaration, just to avoid compilation errors. */ + /* This avoids many instances if "ifndef GC_PRIVATE_H" below. */ + typedef struct GC_undefined_struct * ptr_t; + # endif + /* Machine dependent parameters. Some tuning parameters can be found */ /* near the top of gc_private.h. */ *************** *** 25,31 **** --- 39,47 ---- /* First a unified test for Linux: */ # if defined(linux) || defined(__linux__) + # ifndef LINUX # define LINUX + # endif # endif /* And one for NetBSD: */ *************** *** 46,52 **** /* Determine the machine type: */ # if defined(__arm__) || defined(__thumb__) # define ARM32 ! # if !defined(LINUX) # define NOSYS # define mach_type_known # endif --- 62,68 ---- /* Determine the machine type: */ # if defined(__arm__) || defined(__thumb__) # define ARM32 ! # if !defined(LINUX) && !defined(NETBSD) # define NOSYS # define mach_type_known # endif *************** *** 69,75 **** # define SPARC # define mach_type_known # endif ! # if defined(NETBSD) && defined(m68k) # define M68K # define mach_type_known # endif --- 85,91 ---- # define SPARC # define mach_type_known # endif ! # if defined(NETBSD) && (defined(m68k) || defined(__m68k__)) # define M68K # define mach_type_known # endif *************** *** 77,83 **** # define POWERPC # define mach_type_known # endif ! # if defined(NETBSD) && defined(__arm32__) # define ARM32 # define mach_type_known # endif --- 93,99 ---- # define POWERPC # define mach_type_known # endif ! # if defined(NETBSD) && (defined(__arm32__) || defined(__arm__)) # define ARM32 # define mach_type_known # endif *************** *** 90,95 **** --- 106,115 ---- # endif # define mach_type_known # endif + # if defined(__NetBSD__) && defined(__vax__) + # define VAX + # define mach_type_known + # endif # if defined(mips) || defined(__mips) || defined(_mips) # define MIPS # if defined(nec_ews) || defined(_nec_ews) *************** *** 109,114 **** --- 129,141 ---- # endif /* !LINUX */ # define mach_type_known # endif + # if defined(DGUX) && (defined(i386) || defined(__i386__)) + # define I386 + # ifndef _USING_DGUX + # define _USING_DGUX + # endif + # define mach_type_known + # endif # if defined(sequent) && (defined(i386) || defined(__i386__)) # define I386 # define SEQUENT *************** *** 198,204 **** # define IA64 # define mach_type_known # endif ! # if defined(LINUX) && (defined(powerpc) || defined(__powerpc__)) # define POWERPC # define mach_type_known # endif --- 225,235 ---- # define IA64 # define mach_type_known # endif ! # if defined(LINUX) && defined(__arm__) ! # define ARM32 ! # define mach_type_known ! # endif ! # if defined(LINUX) && (defined(powerpc) || defined(__powerpc__) || defined(powerpc64) || defined(__powerpc64__)) # define POWERPC # define mach_type_known # endif *************** *** 237,255 **** # define MACOS # define mach_type_known # endif ! # if defined(__MWERKS__) && defined(__powerc) # define POWERPC # define MACOS # define mach_type_known # endif # if defined(macosx) || \ defined(__APPLE__) && defined(__MACH__) && defined(__ppc__) ! # define MACOSX # define POWERPC # define mach_type_known # endif # if defined(__APPLE__) && defined(__MACH__) && defined(__i386__) ! # define MACOSX # define I386 --> Not really supported, but at least we recognize it. # endif --- 268,286 ---- # define MACOS # define mach_type_known # endif ! # if defined(__MWERKS__) && defined(__powerc) && !defined(__MACH__) # define POWERPC # define MACOS # define mach_type_known # endif # if defined(macosx) || \ defined(__APPLE__) && defined(__MACH__) && defined(__ppc__) ! # define DARWIN # define POWERPC # define mach_type_known # endif # if defined(__APPLE__) && defined(__MACH__) && defined(__i386__) ! # define DARWIN # define I386 --> Not really supported, but at least we recognize it. # endif *************** *** 291,297 **** # define CX_UX # define mach_type_known # endif ! # if defined(DGUX) # define M88K /* DGUX defined */ # define mach_type_known --- 322,328 ---- # define CX_UX # define mach_type_known # endif ! # if defined(DGUX) && defined(m88k) # define M88K /* DGUX defined */ # define mach_type_known *************** *** 419,435 **** /* (CX_UX and DGUX) */ /* S370 ==> 370-like machine */ /* running Amdahl UTS4 */ ! /* S390 ==> 390-like machine */ ! /* running LINUX */ /* ARM32 ==> Intel StrongARM */ /* IA64 ==> Intel IPF */ /* (e.g. Itanium) */ /* (LINUX and HPUX) */ - /* IA64_32 ==> IA64 w/32 bit ABI */ - /* (HPUX) */ /* SH ==> Hitachi SuperH */ /* (LINUX & MSWINCE) */ /* X86_64 ==> AMD x86-64 */ /* --- 450,467 ---- /* (CX_UX and DGUX) */ /* S370 ==> 370-like machine */ /* running Amdahl UTS4 */ ! /* S390 ==> 390-like machine */ ! /* running LINUX */ /* ARM32 ==> Intel StrongARM */ /* IA64 ==> Intel IPF */ /* (e.g. Itanium) */ /* (LINUX and HPUX) */ /* SH ==> Hitachi SuperH */ /* (LINUX & MSWINCE) */ /* X86_64 ==> AMD x86-64 */ + /* POWERPC ==> IBM/Apple PowerPC */ + /* (MACOS(<=9),DARWIN(incl.MACOSX),*/ + /* LINUX, NETBSD, NOSYS variants) */ /* *************** *** 450,456 **** * defining it to be 1 will always work, but perform poorly. * * DATASTART is the beginning of the data segment. ! * On UNIX systems, the collector will scan the area between DATASTART * and DATAEND for root pointers. * * DATAEND, if not `end' where `end' is defined as ``extern int end[];''. --- 482,493 ---- * defining it to be 1 will always work, but perform poorly. * * DATASTART is the beginning of the data segment. ! * On some platforms SEARCH_FOR_DATA_START is defined. ! * SEARCH_FOR_DATASTART will cause GC_data_start to ! * be set to an address determined by accessing data backwards from _end ! * until an unmapped page is found. DATASTART will be defined to be ! * GC_data_start. ! * On UNIX-like systems, the collector will scan the area between DATASTART * and DATAEND for root pointers. * * DATAEND, if not `end' where `end' is defined as ``extern int end[];''. *************** *** 470,477 **** --- 507,519 ---- * 1) define STACK_GROWS_UP if the stack grows toward higher addresses, and * 2) define exactly one of * STACKBOTTOM (should be defined to be an expression) + * LINUX_STACKBOTTOM * HEURISTIC1 * HEURISTIC2 + * If STACKBOTTOM is defined, then it's value will be used directly as the + * stack base. If LINUX_STACKBOTTOM is defined, then it will be determined + * with a method appropriate for most Linux systems. Currently we look + * first for __libc_stack_end, and if that fails read it from /proc. * If either of the last two macros are defined, then STACKBOTTOM is computed * during collector startup using one of the following two heuristics: * HEURISTIC1: Take an address inside GC_init's frame, and round it up to *************** *** 536,541 **** --- 578,586 ---- * An architecture may also define CLEAR_DOUBLE(x) to be a fast way to * clear the two words at GC_malloc-aligned address x. By default, * word stores of 0 are used instead. + * + * HEAP_START may be defined as the initial address hint for mmap-based + * allocation. */ /* If we are using a recent version of gcc, we can use __builtin_unwind_init() *************** *** 560,577 **** # ifdef NETBSD # define OS_TYPE "NETBSD" # define HEURISTIC2 ! extern char etext[]; ! # define DATASTART ((ptr_t)(etext)) # endif # ifdef LINUX # define OS_TYPE "LINUX" # define STACKBOTTOM ((ptr_t)0xf0000000) /* # define MPROTECT_VDB - Reported to not work 9/17/01 */ # ifdef __ELF__ # define DYNAMIC_LOADING # include # if defined(__GLIBC__)&& __GLIBC__>=2 ! # define LINUX_DATA_START # else /* !GLIBC2 */ extern char **__environ; # define DATASTART ((ptr_t)(&__environ)) --- 605,630 ---- # ifdef NETBSD # define OS_TYPE "NETBSD" # define HEURISTIC2 ! # ifdef __ELF__ ! # define DATASTART GC_data_start ! # define DYNAMIC_LOADING ! # else ! extern char etext[]; ! # define DATASTART ((ptr_t)(etext)) ! # endif # endif # ifdef LINUX # define OS_TYPE "LINUX" # define STACKBOTTOM ((ptr_t)0xf0000000) + # define USE_MMAP + # define USE_GENERIC_PUSH_REGS + /* We never got around to the assembly version. */ /* # define MPROTECT_VDB - Reported to not work 9/17/01 */ # ifdef __ELF__ # define DYNAMIC_LOADING # include # if defined(__GLIBC__)&& __GLIBC__>=2 ! # define SEARCH_FOR_DATA_START # else /* !GLIBC2 */ extern char **__environ; # define DATASTART ((ptr_t)(&__environ)) *************** *** 666,691 **** # define DATAEND /* not needed */ # endif # ifdef LINUX ! # define ALIGNMENT 4 /* Guess. Can someone verify? */ ! /* This was 2, but that didn't sound right. */ # define OS_TYPE "LINUX" ! # define DYNAMIC_LOADING # define LINUX_STACKBOTTOM ! /* Stack usually starts at 0x80000000 */ ! # define LINUX_DATA_START extern int _end[]; # define DATAEND (_end) # endif ! # ifdef MACOSX ! /* There are reasons to suspect this may not be reliable. */ # define ALIGNMENT 4 ! # define OS_TYPE "MACOSX" # define DATASTART ((ptr_t) get_etext()) # define STACKBOTTOM ((ptr_t) 0xc0000000) ! # define DATAEND /* not needed */ ! # undef MPROTECT_VDB # include # define GETPAGESIZE() getpagesize() # endif # ifdef NETBSD # define ALIGNMENT 4 --- 719,766 ---- # define DATAEND /* not needed */ # endif # ifdef LINUX ! # if (defined (powerpc64) || defined(__powerpc64__)) ! # define ALIGNMENT 8 ! # define CPP_WORDSZ 64 ! # else ! # define ALIGNMENT 4 ! # endif # define OS_TYPE "LINUX" ! /* HEURISTIC1 has been reliably reported to fail for a 32-bit */ ! /* executable on a 64 bit kernel. */ # define LINUX_STACKBOTTOM ! # define DYNAMIC_LOADING ! # define SEARCH_FOR_DATA_START extern int _end[]; # define DATAEND (_end) # endif ! # ifdef DARWIN # define ALIGNMENT 4 ! # define OS_TYPE "DARWIN" ! # define DYNAMIC_LOADING ! /* XXX: see get_end(3), get_etext() and get_end() should not be used. ! These aren't used when dyld support is enabled (it is by default) */ # define DATASTART ((ptr_t) get_etext()) + # define DATAEND ((ptr_t) get_end()) # define STACKBOTTOM ((ptr_t) 0xc0000000) ! # define USE_MMAP ! # define USE_MMAP_ANON ! # define USE_ASM_PUSH_REGS ! /* This is potentially buggy. It needs more testing. See the comments in ! os_dep.c */ ! # define MPROTECT_VDB # include # define GETPAGESIZE() getpagesize() + # if defined(USE_PPC_PREFETCH) && defined(__GNUC__) + /* The performance impact of prefetches is untested */ + # define PREFETCH(x) \ + __asm__ __volatile__ ("dcbt 0,%0" : : "r" ((const void *) (x))) + # define PREFETCH_FOR_WRITE(x) \ + __asm__ __volatile__ ("dcbtst 0,%0" : : "r" ((const void *) (x))) + # endif + /* There seems to be some issues with trylock hanging on darwin. This + should be looked into some more */ + # define NO_PTHREAD_TRYLOCK # endif # ifdef NETBSD # define ALIGNMENT 4 *************** *** 746,753 **** # define OS_TYPE "SUNOS5" extern int _etext[]; extern int _end[]; ! extern char * GC_SysVGetDataStart(); ! # define DATASTART (ptr_t)GC_SysVGetDataStart(0x10000, _etext) # define DATAEND (_end) # if !defined(USE_MMAP) && defined(REDIRECT_MALLOC) # define USE_MMAP --- 821,828 ---- # define OS_TYPE "SUNOS5" extern int _etext[]; extern int _end[]; ! extern ptr_t GC_SysVGetDataStart(); ! # define DATASTART GC_SysVGetDataStart(0x10000, _etext) # define DATAEND (_end) # if !defined(USE_MMAP) && defined(REDIRECT_MALLOC) # define USE_MMAP *************** *** 801,809 **** # endif # ifdef DRSNX # define OS_TYPE "DRSNX" ! extern char * GC_SysVGetDataStart(); extern int etext[]; ! # define DATASTART (ptr_t)GC_SysVGetDataStart(0x10000, etext) # define MPROTECT_VDB # define STACKBOTTOM ((ptr_t) 0xdfff0000) # define DYNAMIC_LOADING --- 876,884 ---- # endif # ifdef DRSNX # define OS_TYPE "DRSNX" ! extern ptr_t GC_SysVGetDataStart(); extern int etext[]; ! # define DATASTART GC_SysVGetDataStart(0x10000, etext) # define MPROTECT_VDB # define STACKBOTTOM ((ptr_t) 0xdfff0000) # define DYNAMIC_LOADING *************** *** 819,831 **** extern int _etext[]; # define DATAEND (_end) # define SVR4 # ifdef __arch64__ /* libc_stack_end is not set reliably for sparc64 */ ! # define STACKBOTTOM ((ptr_t) 0x80000000000) ! # define DATASTART (ptr_t)GC_SysVGetDataStart(0x100000, _etext) # else ! # define LINUX_STACKBOTTOM ! # define DATASTART (ptr_t)GC_SysVGetDataStart(0x10000, _etext) # endif # endif # ifdef OPENBSD --- 894,907 ---- extern int _etext[]; # define DATAEND (_end) # define SVR4 + extern ptr_t GC_SysVGetDataStart(); # ifdef __arch64__ + # define DATASTART GC_SysVGetDataStart(0x100000, _etext) /* libc_stack_end is not set reliably for sparc64 */ ! # define STACKBOTTOM ((ptr_t) 0x80000000000ULL) # else ! # define DATASTART GC_SysVGetDataStart(0x10000, _etext) ! # define LINUX_STACKBOTTOM # endif # endif # ifdef OPENBSD *************** *** 876,882 **** # ifdef SUNOS5 # define OS_TYPE "SUNOS5" extern int _etext[], _end[]; ! extern char * GC_SysVGetDataStart(); # define DATASTART GC_SysVGetDataStart(0x1000, _etext) # define DATAEND (_end) /* # define STACKBOTTOM ((ptr_t)(_start)) worked through 2.7, */ --- 952,958 ---- # ifdef SUNOS5 # define OS_TYPE "SUNOS5" extern int _etext[], _end[]; ! extern ptr_t GC_SysVGetDataStart(); # define DATASTART GC_SysVGetDataStart(0x1000, _etext) # define DATAEND (_end) /* # define STACKBOTTOM ((ptr_t)(_start)) worked through 2.7, */ *************** *** 921,926 **** --- 997,1024 ---- # define DYNAMIC_LOADING # define ELF_CLASS ELFCLASS32 # endif + # ifdef DGUX + # define OS_TYPE "DGUX" + extern int _etext, _end; + extern ptr_t GC_SysVGetDataStart(); + # define DATASTART GC_SysVGetDataStart(0x1000, &_etext) + # define DATAEND (&_end) + # define STACK_GROWS_DOWN + # define HEURISTIC2 + # include + # define GETPAGESIZE() sysconf(_SC_PAGESIZE) + # define DYNAMIC_LOADING + # ifndef USE_MMAP + # define USE_MMAP + # endif /* USE_MMAP */ + # define MAP_FAILED (void *) -1 + # ifdef USE_MMAP + # define HEAP_START (ptr_t)0x40000000 + # else /* USE_MMAP */ + # define HEAP_START DATAEND + # endif /* USE_MMAP */ + # endif /* DGUX */ + # ifdef LINUX # ifndef __GNUC__ /* The Intel compiler doesn't like inline assembly */ *************** *** 944,949 **** --- 1042,1050 ---- /* possibly because Linux threads is itself a malloc client */ /* and can't deal with the signals. */ # endif + # define HEAP_START 0x1000 + /* This encourages mmap to give us low addresses, */ + /* thus allowing the heap to grow to ~3GB */ # ifdef __ELF__ # define DYNAMIC_LOADING # ifdef UNDEFINED /* includes ro data */ *************** *** 952,958 **** # endif # include # if defined(__GLIBC__) && __GLIBC__ >= 2 ! # define LINUX_DATA_START # else extern char **__environ; # define DATASTART ((ptr_t)(&__environ)) --- 1053,1059 ---- # endif # include # if defined(__GLIBC__) && __GLIBC__ >= 2 ! # define SEARCH_FOR_DATA_START # else extern char **__environ; # define DATASTART ((ptr_t)(&__environ)) *************** *** 1006,1013 **** --- 1107,1118 ---- /* DATAEND = _data_end__ */ /* To get it right for both, we take the */ /* minumum/maximum of the two. */ + # ifndef MAX # define MAX(x,y) ((x) > (y) ? (x) : (y)) + # endif + # ifndef MIN # define MIN(x,y) ((x) < (y) ? (x) : (y)) + # endif # define DATASTART ((ptr_t) MIN(_data_start__, _bss_start__)) # define DATAEND ((ptr_t) MAX(_data_end__, _bss_end__)) # undef STACK_GRAN *************** *** 1061,1076 **** # ifdef __ELF__ # define DYNAMIC_LOADING # endif - /* Handle unmapped hole i386*-*-freebsd[45]* may put between etext and edata. */ extern char etext[]; ! extern char edata[]; ! extern char end[]; ! # define NEED_FIND_LIMIT ! # define DATASTART ((ptr_t)(etext)) ! # define MIN(x,y) ((x) < (y) ? (x) : (y)) ! # define DATAEND (MIN (GC_find_limit (DATASTART, TRUE), DATASTART2)) ! # define DATASTART2 ((ptr_t)(edata)) ! # define DATAEND2 ((ptr_t)(end)) # endif # ifdef NETBSD # define OS_TYPE "NETBSD" --- 1166,1174 ---- # ifdef __ELF__ # define DYNAMIC_LOADING # endif extern char etext[]; ! extern char * GC_FreeBSDGetDataStart(); ! # define DATASTART GC_FreeBSDGetDataStart(0x1000, &etext) # endif # ifdef NETBSD # define OS_TYPE "NETBSD" *************** *** 1149,1155 **** # define DATASTART ((ptr_t)(__data_start)) # define ALIGNMENT 4 # define USE_GENERIC_PUSH_REGS ! # define LINUX_STACKBOTTOM # endif /* Linux */ # ifdef EWS4800 # define HEURISTIC2 --- 1247,1257 ---- # define DATASTART ((ptr_t)(__data_start)) # define ALIGNMENT 4 # define USE_GENERIC_PUSH_REGS ! # if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 2 || __GLIBC__ > 2 ! # define LINUX_STACKBOTTOM ! # else ! # define STACKBOTTOM 0x80000000 ! # endif # endif /* Linux */ # ifdef EWS4800 # define HEURISTIC2 *************** *** 1203,1209 **** /* heap sections so they're not */ /* considered as roots. */ # define OS_TYPE "IRIX5" ! # define MPROTECT_VDB # ifdef _MIPS_SZPTR # define CPP_WORDSZ _MIPS_SZPTR # define ALIGNMENT (_MIPS_SZPTR/8) --- 1305,1312 ---- /* heap sections so they're not */ /* considered as roots. */ # define OS_TYPE "IRIX5" ! /*# define MPROTECT_VDB DOB: this should work, but there is evidence */ ! /* of recent breakage. */ # ifdef _MIPS_SZPTR # define CPP_WORDSZ _MIPS_SZPTR # define ALIGNMENT (_MIPS_SZPTR/8) *************** *** 1226,1253 **** # define ALIGNMENT 4 # define HEURISTIC2 # define USE_GENERIC_PUSH_REGS ! extern int _fdata[]; ! # define DATASTART ((ptr_t)(_fdata)) ! extern int _end[]; ! # define DATAEND ((ptr_t)(_end)) ! # define DYNAMIC_LOADING # endif # endif # ifdef RS6000 # define MACH_TYPE "RS6000" # ifdef __64BIT__ # define ALIGNMENT 8 # define CPP_WORDSZ 64 # else # define ALIGNMENT 4 # define CPP_WORDSZ 32 # endif extern int _data[], _end[]; # define DATASTART ((ptr_t)((ulong)_data)) # define DATAEND ((ptr_t)((ulong)_end)) extern int errno; - # define STACKBOTTOM ((ptr_t)((ulong)&errno)) # define USE_GENERIC_PUSH_REGS # define DYNAMIC_LOADING /* For really old versions of AIX, this may have to be removed. */ --- 1329,1374 ---- # define ALIGNMENT 4 # define HEURISTIC2 # define USE_GENERIC_PUSH_REGS ! # ifdef __ELF__ ! extern int etext[]; ! # define DATASTART GC_data_start ! # define NEED_FIND_LIMIT ! # define DYNAMIC_LOADING ! # else ! # define DATASTART ((ptr_t) 0x10000000) ! # define STACKBOTTOM ((ptr_t) 0x7ffff000) ! # endif /* _ELF_ */ # endif # endif # ifdef RS6000 # define MACH_TYPE "RS6000" + # ifdef ALIGNMENT + # undef ALIGNMENT + # endif + # ifdef IA64 + # undef IA64 /* DOB: some AIX installs stupidly define IA64 in /usr/include/sys/systemcfg.h */ + # endif # ifdef __64BIT__ # define ALIGNMENT 8 # define CPP_WORDSZ 64 + # define STACKBOTTOM ((ptr_t)0x1000000000000000) # else # define ALIGNMENT 4 # define CPP_WORDSZ 32 + # define STACKBOTTOM ((ptr_t)((ulong)&errno)) # endif + /* From AIX linker man page: + _text Specifies the first location of the program. + _etext Specifies the first location after the program. + _data Specifies the first location of the data. + _edata Specifies the first location after the initialized data + _end or end Specifies the first location after all data. + */ extern int _data[], _end[]; # define DATASTART ((ptr_t)((ulong)_data)) # define DATAEND ((ptr_t)((ulong)_end)) extern int errno; # define USE_GENERIC_PUSH_REGS # define DYNAMIC_LOADING /* For really old versions of AIX, this may have to be removed. */ *************** *** 1311,1325 **** # define OS_TYPE "LINUX" # define LINUX_STACKBOTTOM # define DYNAMIC_LOADING ! # define LINUX_DATA_START extern int _end[]; ! # define DATAEND (_end) # endif /* LINUX */ # endif /* HP_PA */ # ifdef ALPHA # define MACH_TYPE "ALPHA" # define ALIGNMENT 8 # ifdef NETBSD # define OS_TYPE "NETBSD" # define HEURISTIC2 --- 1432,1454 ---- # define OS_TYPE "LINUX" # define LINUX_STACKBOTTOM # define DYNAMIC_LOADING ! # define SEARCH_FOR_DATA_START extern int _end[]; ! # define DATAEND (&_end) # endif /* LINUX */ # endif /* HP_PA */ # ifdef ALPHA # define MACH_TYPE "ALPHA" # define ALIGNMENT 8 + # define CPP_WORDSZ 64 + # ifndef LINUX + # define USE_GENERIC_PUSH_REGS + /* Gcc and probably the DEC/Compaq compiler spill pointers to preserved */ + /* fp registers in some cases when the target is a 21264. The assembly */ + /* code doesn't handle that yet, and version dependencies make that a */ + /* bit tricky. Do the easy thing for now. */ + # endif # ifdef NETBSD # define OS_TYPE "NETBSD" # define HEURISTIC2 *************** *** 1327,1339 **** # define ELFCLASS32 32 # define ELFCLASS64 64 # define ELF_CLASS ELFCLASS64 - # define CPP_WORDSZ 64 # define DYNAMIC_LOADING # endif # ifdef OPENBSD # define OS_TYPE "OPENBSD" # define HEURISTIC2 - # define CPP_WORDSZ 64 # ifdef __ELF__ /* since OpenBSD/Alpha 2.9 */ # define DATASTART GC_data_start # define ELFCLASS32 32 --- 1456,1466 ---- *************** *** 1357,1373 **** extern char edata[]; extern char end[]; # define NEED_FIND_LIMIT ! # define DATASTART ((ptr_t)(etext)) # define DATAEND (GC_find_limit (DATASTART, TRUE)) ! # define DATASTART2 ((ptr_t)(edata)) ! # define DATAEND2 ((ptr_t)(end)) ! # define CPP_WORDSZ 64 # endif # ifdef OSF1 # define OS_TYPE "OSF1" # define DATASTART ((ptr_t) 0x140000000) extern int _end[]; ! # define DATAEND ((ptr_t) _end) extern char ** environ; /* round up from the value of environ to the nearest page boundary */ /* Probably breaks if putenv is called before collector */ --- 1484,1499 ---- extern char edata[]; extern char end[]; # define NEED_FIND_LIMIT ! # define DATASTART ((ptr_t)(&etext)) # define DATAEND (GC_find_limit (DATASTART, TRUE)) ! # define DATASTART2 ((ptr_t)(&edata)) ! # define DATAEND2 ((ptr_t)(&end)) # endif # ifdef OSF1 # define OS_TYPE "OSF1" # define DATASTART ((ptr_t) 0x140000000) extern int _end[]; ! # define DATAEND ((ptr_t) &_end) extern char ** environ; /* round up from the value of environ to the nearest page boundary */ /* Probably breaks if putenv is called before collector */ *************** *** 1378,1396 **** /* the text segment immediately follows the stack. */ /* Hence we give an upper pound. */ /* This is currently unused, since we disabled HEURISTIC2 */ ! extern int __start[]; # define HEURISTIC2_LIMIT ((ptr_t)((word)(__start) & ~(getpagesize()-1))) ! # define CPP_WORDSZ 64 ! # define MPROTECT_VDB # define DYNAMIC_LOADING # endif # ifdef LINUX # define OS_TYPE "LINUX" - # define CPP_WORDSZ 64 # define STACKBOTTOM ((ptr_t) 0x120000000) # ifdef __ELF__ # define SEARCH_FOR_DATA_START - # define DATASTART GC_data_start # define DYNAMIC_LOADING # else # define DATASTART ((ptr_t) 0x140000000) --- 1504,1522 ---- /* the text segment immediately follows the stack. */ /* Hence we give an upper pound. */ /* This is currently unused, since we disabled HEURISTIC2 */ ! extern int __start[]; # define HEURISTIC2_LIMIT ((ptr_t)((word)(__start) & ~(getpagesize()-1))) ! # ifndef GC_OSF1_THREADS ! /* Unresolved signal issues with threads. */ ! # define MPROTECT_VDB ! # endif # define DYNAMIC_LOADING # endif # ifdef LINUX # define OS_TYPE "LINUX" # define STACKBOTTOM ((ptr_t) 0x120000000) # ifdef __ELF__ # define SEARCH_FOR_DATA_START # define DYNAMIC_LOADING # else # define DATASTART ((ptr_t) 0x140000000) *************** *** 1468,1474 **** extern char * GC_register_stackbottom; # define BACKING_STORE_BASE ((ptr_t)GC_register_stackbottom) # define SEARCH_FOR_DATA_START - # define DATASTART GC_data_start # ifdef __GNUC__ # define DYNAMIC_LOADING # else --- 1594,1599 ---- *************** *** 1502,1524 **** # endif # ifdef DGUX # define OS_TYPE "DGUX" ! extern char * GC_SysVGetDataStart(); ! # define DATASTART (ptr_t)GC_SysVGetDataStart(0x10000, etext) # endif # define STACKBOTTOM ((char*)0xf0000000) /* determined empirically */ # endif # ifdef S370 # define MACH_TYPE "S370" # define ALIGNMENT 4 /* Required by hardware */ # define USE_GENERIC_PUSH_REGS # ifdef UTS4 # define OS_TYPE "UTS4" ! extern int etext[]; extern int _etext[]; extern int _end[]; ! extern char * GC_SysVGetDataStart(); ! # define DATASTART (ptr_t)GC_SysVGetDataStart(0x10000, _etext) # define DATAEND (_end) # define HEURISTIC2 # endif --- 1627,1651 ---- # endif # ifdef DGUX # define OS_TYPE "DGUX" ! extern ptr_t GC_SysVGetDataStart(); ! # define DATASTART GC_SysVGetDataStart(0x10000, etext) # endif # define STACKBOTTOM ((char*)0xf0000000) /* determined empirically */ # endif # ifdef S370 + /* If this still works, and if anyone cares, this should probably */ + /* be moved to the S390 category. */ # define MACH_TYPE "S370" # define ALIGNMENT 4 /* Required by hardware */ # define USE_GENERIC_PUSH_REGS # ifdef UTS4 # define OS_TYPE "UTS4" ! extern int etext[]; extern int _etext[]; extern int _end[]; ! extern ptr_t GC_SysVGetDataStart(); ! # define DATASTART GC_SysVGetDataStart(0x10000, _etext) # define DATAEND (_end) # define HEURISTIC2 # endif *************** *** 1528,1550 **** # define MACH_TYPE "S390" # define USE_GENERIC_PUSH_REGS # ifndef __s390x__ ! # define ALIGNMENT 4 ! # define CPP_WORDSZ 32 # else ! # define ALIGNMENT 8 ! # define CPP_WORDSZ 64 ! # define HBLKSIZE 4096 # endif # ifdef LINUX # define OS_TYPE "LINUX" # define LINUX_STACKBOTTOM # define DYNAMIC_LOADING ! extern int __data_start[]; # define DATASTART ((ptr_t)(__data_start)) ! extern int _end[]; ! # define DATAEND (_end) ! # define CACHE_LINE_SIZE 256 ! # define GETPAGESIZE() 4096 # endif # endif --- 1655,1677 ---- # define MACH_TYPE "S390" # define USE_GENERIC_PUSH_REGS # ifndef __s390x__ ! # define ALIGNMENT 4 ! # define CPP_WORDSZ 32 # else ! # define ALIGNMENT 8 ! # define CPP_WORDSZ 64 ! # define HBLKSIZE 4096 # endif # ifdef LINUX # define OS_TYPE "LINUX" # define LINUX_STACKBOTTOM # define DYNAMIC_LOADING ! extern int __data_start[]; # define DATASTART ((ptr_t)(__data_start)) ! extern int _end[]; ! # define DATAEND (_end) ! # define CACHE_LINE_SIZE 256 ! # define GETPAGESIZE() 4096 # endif # endif *************** *** 1562,1569 **** # ifdef NETBSD # define OS_TYPE "NETBSD" # define HEURISTIC2 ! extern char etext[]; ! # define DATASTART ((ptr_t)(etext)) # define USE_GENERIC_PUSH_REGS # endif # ifdef LINUX --- 1689,1701 ---- # ifdef NETBSD # define OS_TYPE "NETBSD" # define HEURISTIC2 ! # ifdef __ELF__ ! # define DATASTART GC_data_start ! # define DYNAMIC_LOADING ! # else ! extern char etext[]; ! # define DATASTART ((ptr_t)(etext)) ! # endif # define USE_GENERIC_PUSH_REGS # endif # ifdef LINUX *************** *** 1576,1582 **** # define DYNAMIC_LOADING # include # if defined(__GLIBC__) && __GLIBC__ >= 2 ! # define LINUX_DATA_START # else extern char **__environ; # define DATASTART ((ptr_t)(&__environ)) --- 1708,1714 ---- # define DYNAMIC_LOADING # include # if defined(__GLIBC__) && __GLIBC__ >= 2 ! # define SEARCH_FOR_DATA_START # else extern char **__environ; # define DATASTART ((ptr_t)(&__environ)) *************** *** 1623,1629 **** # define STACKBOTTOM ((ptr_t) 0x7c000000) # define USE_GENERIC_PUSH_REGS # define DYNAMIC_LOADING ! # define LINUX_DATA_START extern int _end[]; # define DATAEND (_end) # endif --- 1755,1761 ---- # define STACKBOTTOM ((ptr_t) 0x7c000000) # define USE_GENERIC_PUSH_REGS # define DYNAMIC_LOADING ! # define SEARCH_FOR_DATA_START extern int _end[]; # define DATAEND (_end) # endif *************** *** 1640,1646 **** # define MACH_TYPE "X86_64" # define ALIGNMENT 8 # define CPP_WORDSZ 64 ! # define HBLKSIZE 4096 # define CACHE_LINE_SIZE 64 # define USE_GENERIC_PUSH_REGS # ifdef LINUX --- 1772,1780 ---- # define MACH_TYPE "X86_64" # define ALIGNMENT 8 # define CPP_WORDSZ 64 ! # ifndef HBLKSIZE ! # define HBLKSIZE 4096 ! # endif # define CACHE_LINE_SIZE 64 # define USE_GENERIC_PUSH_REGS # ifdef LINUX *************** *** 1660,1666 **** # define DATASTART ((ptr_t)((((word) (_etext)) + 0xfff) & ~0xfff)) # endif # include ! # define LINUX_DATA_START extern int _end[]; # define DATAEND (_end) # else --- 1794,1800 ---- # define DATASTART ((ptr_t)((((word) (_etext)) + 0xfff) & ~0xfff)) # endif # include ! # define SEARCH_FOR_DATA_START extern int _end[]; # define DATAEND (_end) # else *************** *** 1674,1692 **** # endif # endif - #ifdef LINUX_DATA_START - /* Some Linux distributions arrange to define __data_start. Some */ - /* define data_start as a weak symbol. The latter is technically */ - /* broken, since the user program may define data_start, in which */ - /* case we lose. Nonetheless, we try both, prefering __data_start. */ - /* We assume gcc. */ - # pragma weak __data_start - extern int __data_start[]; - # pragma weak data_start - extern int data_start[]; - # define DATASTART ((ptr_t)(__data_start != 0? __data_start : data_start)) - #endif - #if defined(LINUX) && defined(REDIRECT_MALLOC) /* Rld appears to allocate some memory with its own allocator, and */ /* some through malloc, which might be redirected. To make this */ --- 1808,1813 ---- *************** *** 1725,1739 **** # endif # if defined(SUNOS5) || defined(DRSNX) || defined(UTS4) ! /* OS has SVR4 generic features. Probably others also qualify. */ # define SVR4 # endif # if defined(SUNOS5) || defined(DRSNX) ! /* OS has SUNOS5 style semi-undocumented interface to dynamic */ ! /* loader. */ # define SUNOS5DL ! /* OS has SUNOS5 style signal handlers. */ # define SUNOS5SIGS # endif --- 1846,1860 ---- # endif # if defined(SUNOS5) || defined(DRSNX) || defined(UTS4) ! /* OS has SVR4 generic features. Probably others also qualify. */ # define SVR4 # endif # if defined(SUNOS5) || defined(DRSNX) ! /* OS has SUNOS5 style semi-undocumented interface to dynamic */ ! /* loader. */ # define SUNOS5DL ! /* OS has SUNOS5 style signal handlers. */ # define SUNOS5SIGS # endif *************** *** 1742,1754 **** # endif # if defined(SVR4) || defined(LINUX) || defined(IRIX) || defined(HPUX) \ ! || defined(OPENBSD) || defined(NETBSD) || defined(FREEBSD) \ ! || defined(BSD) || defined(_AIX) || defined(MACOSX) || defined(OSF1) # define UNIX_LIKE /* Basic Unix-like system calls work. */ # endif # if CPP_WORDSZ != 32 && CPP_WORDSZ != 64 ! -> bad word size # endif # ifdef PCR --- 1863,1876 ---- # endif # if defined(SVR4) || defined(LINUX) || defined(IRIX) || defined(HPUX) \ ! || defined(OPENBSD) || defined(NETBSD) || defined(FREEBSD) \ ! || defined(DGUX) || defined(BSD) \ ! || defined(_AIX) || defined(DARWIN) || defined(OSF1) # define UNIX_LIKE /* Basic Unix-like system calls work. */ # endif # if CPP_WORDSZ != 32 && CPP_WORDSZ != 64 ! -> bad word size # endif # ifdef PCR *************** *** 1762,1774 **** # endif # ifdef SRC_M3 ! /* Postponed for now. */ # undef PROC_VDB # undef MPROTECT_VDB # endif # ifdef SMALL_CONFIG ! /* Presumably not worth the space it takes. */ # undef PROC_VDB # undef MPROTECT_VDB # endif --- 1884,1896 ---- # endif # ifdef SRC_M3 ! /* Postponed for now. */ # undef PROC_VDB # undef MPROTECT_VDB # endif # ifdef SMALL_CONFIG ! /* Presumably not worth the space it takes. */ # undef PROC_VDB # undef MPROTECT_VDB # endif *************** *** 1808,1856 **** /* platforms as well, though it should be avoided in win32. */ # endif /* LINUX */ ! # if defined(SEARCH_FOR_DATA_START) && defined(GC_PRIVATE_H) extern ptr_t GC_data_start; # endif # ifndef CLEAR_DOUBLE # define CLEAR_DOUBLE(x) \ ! ((word*)x)[0] = 0; \ ! ((word*)x)[1] = 0; # endif /* CLEAR_DOUBLE */ ! /* Internally we use GC_SOLARIS_THREADS to test for either old or pthreads. */ # if defined(GC_SOLARIS_PTHREADS) && !defined(GC_SOLARIS_THREADS) # define GC_SOLARIS_THREADS # endif # if defined(GC_IRIX_THREADS) && !defined(IRIX5) ! --> inconsistent configuration # endif # if defined(GC_LINUX_THREADS) && !defined(LINUX) ! --> inconsistent configuration # endif # if defined(GC_SOLARIS_THREADS) && !defined(SUNOS5) ! --> inconsistent configuration # endif # if defined(GC_HPUX_THREADS) && !defined(HPUX) ! --> inconsistent configuration # endif ! # if defined(GC_WIN32_THREADS) && !defined(MSWIN32) ! /* Ideally CYGWIN32 should work, in addition to MSWIN32. I suspect */ ! /* the necessary code is mostly there, but nobody has actually made */ ! /* sure the right combination of pieces is compiled in, etc. */ ! --> inconsistent configuration # endif # if defined(PCR) || defined(SRC_M3) || \ ! defined(GC_SOLARIS_THREADS) || defined(GC_WIN32_THREADS) || \ ! defined(GC_PTHREADS) # define THREADS # endif ! # if defined(HP_PA) || defined(M88K) || defined(POWERPC) && !defined(MACOSX) \ ! || defined(LINT) || defined(MSWINCE) \ ! || (defined(I386) && defined(__LCC__)) /* Use setjmp based hack to mark from callee-save registers. */ /* The define should move to the individual platform */ /* descriptions. */ --- 1930,1979 ---- /* platforms as well, though it should be avoided in win32. */ # endif /* LINUX */ ! # if defined(SEARCH_FOR_DATA_START) extern ptr_t GC_data_start; + # define DATASTART GC_data_start # endif # ifndef CLEAR_DOUBLE # define CLEAR_DOUBLE(x) \ ! ((word*)x)[0] = 0; \ ! ((word*)x)[1] = 0; # endif /* CLEAR_DOUBLE */ ! /* Internally we use GC_SOLARIS_THREADS to test for either old or pthreads. */ # if defined(GC_SOLARIS_PTHREADS) && !defined(GC_SOLARIS_THREADS) # define GC_SOLARIS_THREADS # endif # if defined(GC_IRIX_THREADS) && !defined(IRIX5) ! --> inconsistent configuration # endif # if defined(GC_LINUX_THREADS) && !defined(LINUX) ! --> inconsistent configuration # endif # if defined(GC_SOLARIS_THREADS) && !defined(SUNOS5) ! --> inconsistent configuration # endif # if defined(GC_HPUX_THREADS) && !defined(HPUX) ! --> inconsistent configuration # endif ! # if defined(GC_AIX_THREADS) && !defined(_AIX) ! --> inconsistent configuration ! # endif ! # if defined(GC_WIN32_THREADS) && !defined(MSWIN32) && !defined(CYGWIN32) ! --> inconsistent configuration # endif # if defined(PCR) || defined(SRC_M3) || \ ! defined(GC_SOLARIS_THREADS) || defined(GC_WIN32_THREADS) || \ ! defined(GC_PTHREADS) # define THREADS # endif ! # if defined(HP_PA) || defined(M88K) || defined(POWERPC) && !defined(DARWIN) \ ! || defined(LINT) || defined(MSWINCE) || defined(ARM32) \ ! || (defined(I386) && defined(__LCC__)) /* Use setjmp based hack to mark from callee-save registers. */ /* The define should move to the individual platform */ /* descriptions. */ *************** *** 1862,1897 **** /* include assembly code to do it well. */ # endif ! /* Can we save call chain in objects for debugging? */ ! /* SET NFRAMES (# of saved frames) and NARGS (#of args for each frame) */ ! /* to reasonable values for the platform. */ ! /* Set SAVE_CALL_CHAIN if we can. SAVE_CALL_COUNT can be specified at */ ! /* build time, though we feel free to adjust it slightly. */ ! /* Define NEED_CALLINFO if we either save the call stack or */ ! /* GC_ADD_CALLER is defined. */ ! #ifdef LINUX ! # include ! # if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2 ! # define HAVE_BUILTIN_BACKTRACE ! # endif ! #endif #if defined(SPARC) - # define CAN_SAVE_CALL_STACKS # define CAN_SAVE_CALL_ARGS #endif #if (defined(I386) || defined(X86_64)) && defined(LINUX) ! /* SAVE_CALL_CHAIN is supported if the code is compiled to save */ ! /* frame pointers by default, i.e. no -fomit-frame-pointer flag. */ ! # define CAN_SAVE_CALL_STACKS # define CAN_SAVE_CALL_ARGS #endif - #if defined(HAVE_BUILTIN_BACKTRACE) && !defined(CAN_SAVE_CALL_STACKS) - # define CAN_SAVE_CALL_STACKS - #endif # if defined(SAVE_CALL_COUNT) && !defined(GC_ADD_CALLER) \ ! && defined(CAN_SAVE_CALL_STACKS) # define SAVE_CALL_CHAIN # endif # ifdef SAVE_CALL_CHAIN --- 1985,2010 ---- /* include assembly code to do it well. */ # endif ! /* Can we save call chain in objects for debugging? */ ! /* SET NFRAMES (# of saved frames) and NARGS (#of args for each */ ! /* frame) to reasonable values for the platform. */ ! /* Set SAVE_CALL_CHAIN if we can. SAVE_CALL_COUNT can be specified */ ! /* at build time, though we feel free to adjust it slightly. */ ! /* Define NEED_CALLINFO if we either save the call stack or */ ! /* GC_ADD_CALLER is defined. */ ! /* GC_CAN_SAVE_CALL_STACKS is set in gc.h. */ #if defined(SPARC) # define CAN_SAVE_CALL_ARGS #endif #if (defined(I386) || defined(X86_64)) && defined(LINUX) ! /* SAVE_CALL_CHAIN is supported if the code is compiled to save */ ! /* frame pointers by default, i.e. no -fomit-frame-pointer flag. */ # define CAN_SAVE_CALL_ARGS #endif # if defined(SAVE_CALL_COUNT) && !defined(GC_ADD_CALLER) \ ! && defined(GC_CAN_SAVE_CALL_STACKS) # define SAVE_CALL_CHAIN # endif # ifdef SAVE_CALL_CHAIN *************** *** 1904,1910 **** # ifdef SAVE_CALL_CHAIN # ifndef SAVE_CALL_COUNT # define NFRAMES 6 /* Number of frames to save. Even for */ ! /* alignment reasons. */ # else # define NFRAMES ((SAVE_CALL_COUNT + 1) & ~1) # endif --- 2017,2023 ---- # ifdef SAVE_CALL_CHAIN # ifndef SAVE_CALL_COUNT # define NFRAMES 6 /* Number of frames to save. Even for */ ! /* alignment reasons. */ # else # define NFRAMES ((SAVE_CALL_COUNT + 1) & ~1) # endif *************** *** 1920,1923 **** --- 2033,2128 ---- # define DBG_HDRS_ALL # endif + # if defined(POINTER_MASK) && !defined(POINTER_SHIFT) + # define POINTER_SHIFT 0 + # endif + + # if defined(POINTER_SHIFT) && !defined(POINTER_MASK) + # define POINTER_MASK ((GC_word)(-1)) + # endif + + # if !defined(FIXUP_POINTER) && defined(POINTER_MASK) + # define FIXUP_POINTER(p) (p) = ((p) & (POINTER_MASK) << POINTER_SHIFT) + # endif + + # if defined(FIXUP_POINTER) + # define NEED_FIXUP_POINTER 1 + # else + # define NEED_FIXUP_POINTER 0 + # define FIXUP_POINTER(p) + # endif + + #ifdef GC_PRIVATE_H + /* This relies on some type definitions from gc_priv.h, from */ + /* where it's normally included. */ + /* */ + /* How to get heap memory from the OS: */ + /* Note that sbrk()-like allocation is preferred, since it */ + /* usually makes it possible to merge consecutively allocated */ + /* chunks. It also avoids unintented recursion with */ + /* -DREDIRECT_MALLOC. */ + /* GET_MEM() returns a HLKSIZE aligned chunk. */ + /* 0 is taken to mean failure. */ + /* In the case os USE_MMAP, the argument must also be a */ + /* physical page size. */ + /* GET_MEM is currently not assumed to retrieve 0 filled space, */ + /* though we should perhaps take advantage of the case in which */ + /* does. */ + struct hblk; /* See gc_priv.h. */ + # ifdef PCR + char * real_malloc(); + # define GET_MEM(bytes) HBLKPTR(real_malloc((size_t)bytes + GC_page_size) \ + + GC_page_size-1) + # else + # ifdef OS2 + void * os2_alloc(size_t bytes); + # define GET_MEM(bytes) HBLKPTR((ptr_t)os2_alloc((size_t)bytes \ + + GC_page_size) \ + + GC_page_size-1) + # else + # if defined(NEXT) || defined(DOS4GW) || \ + (defined(AMIGA) && !defined(GC_AMIGA_FASTALLOC)) || \ + (defined(SUNOS5) && !defined(USE_MMAP)) + # define GET_MEM(bytes) HBLKPTR((size_t) \ + calloc(1, (size_t)bytes + GC_page_size) \ + + GC_page_size-1) + # else + # ifdef MSWIN32 + extern ptr_t GC_win32_get_mem(); + # define GET_MEM(bytes) (struct hblk *)GC_win32_get_mem(bytes) + # else + # ifdef MACOS + # if defined(USE_TEMPORARY_MEMORY) + extern Ptr GC_MacTemporaryNewPtr(size_t size, + Boolean clearMemory); + # define GET_MEM(bytes) HBLKPTR( \ + GC_MacTemporaryNewPtr(bytes + GC_page_size, true) \ + + GC_page_size-1) + # else + # define GET_MEM(bytes) HBLKPTR( \ + NewPtrClear(bytes + GC_page_size) + GC_page_size-1) + # endif + # else + # ifdef MSWINCE + extern ptr_t GC_wince_get_mem(); + # define GET_MEM(bytes) (struct hblk *)GC_wince_get_mem(bytes) + # else + # if defined(AMIGA) && defined(GC_AMIGA_FASTALLOC) + extern void *GC_amiga_get_mem(size_t size); + # define GET_MEM(bytes) HBLKPTR((size_t) \ + GC_amiga_get_mem((size_t)bytes + GC_page_size) \ + + GC_page_size-1) + # else + extern ptr_t GC_unix_get_mem(); + # define GET_MEM(bytes) (struct hblk *)GC_unix_get_mem(bytes) + # endif + # endif + # endif + # endif + # endif + # endif + # endif + + #endif /* GC_PRIVATE_H */ + # endif /* GCCONFIG_H */ diff -Nrc3pad gcc-3.3.3/boehm-gc/include/private/gc_hdrs.h gcc-3.4.0/boehm-gc/include/private/gc_hdrs.h *** gcc-3.3.3/boehm-gc/include/private/gc_hdrs.h 2001-08-18 01:04:43.000000000 +0000 --- gcc-3.4.0/boehm-gc/include/private/gc_hdrs.h 2003-07-28 04:18:23.000000000 +0000 *************** extern hdr * GC_invalid_header; /* heade *** 70,76 **** #define ADVANCE(p, hhdr, source) \ { \ hdr * new_hdr = GC_invalid_header; \ ! p = GC_FIND_START(p, hhdr, &new_hdr, (word)source); \ hhdr = new_hdr; \ } --- 70,76 ---- #define ADVANCE(p, hhdr, source) \ { \ hdr * new_hdr = GC_invalid_header; \ ! p = GC_find_start(p, hhdr, &new_hdr); \ hhdr = new_hdr; \ } diff -Nrc3pad gcc-3.3.3/boehm-gc/include/private/gc_locks.h gcc-3.4.0/boehm-gc/include/private/gc_locks.h *** gcc-3.3.3/boehm-gc/include/private/gc_locks.h 2002-09-27 20:40:06.000000000 +0000 --- gcc-3.4.0/boehm-gc/include/private/gc_locks.h 2003-07-28 04:18:23.000000000 +0000 *************** *** 100,116 **** # define GC_TEST_AND_SET_DEFINED # endif # if defined(IA64) inline static int GC_test_and_set(volatile unsigned int *addr) { ! long oldval, n = 1; ! __asm__ __volatile__("xchg4 %0=%1,%2" ! : "=r"(oldval), "=m"(*addr) ! : "r"(n), "1"(*addr) : "memory"); ! return oldval; } # define GC_TEST_AND_SET_DEFINED - /* Should this handle post-increment addressing?? */ inline static void GC_clear(volatile unsigned int *addr) { ! __asm__ __volatile__("st4.rel %0=r0" : "=m" (*addr) : : "memory"); } # define GC_CLEAR_DEFINED # endif --- 100,112 ---- # define GC_TEST_AND_SET_DEFINED # endif # if defined(IA64) + # include inline static int GC_test_and_set(volatile unsigned int *addr) { ! return __sync_lock_test_and_set(addr, 1); } # define GC_TEST_AND_SET_DEFINED inline static void GC_clear(volatile unsigned int *addr) { ! *addr = 0; } # define GC_CLEAR_DEFINED # endif *************** *** 145,167 **** # if defined(POWERPC) inline static int GC_test_and_set(volatile unsigned int *addr) { int oldval; ! int temp = 1; // locked value __asm__ __volatile__( ! "1:\tlwarx %0,0,%3\n" // load and reserve ! "\tcmpwi %0, 0\n" // if load is ! "\tbne 2f\n" // non-zero, return already set ! "\tstwcx. %2,0,%1\n" // else store conditional ! "\tbne- 1b\n" // retry if lost reservation ! "2:\t\n" // oldval is zero if we set : "=&r"(oldval), "=p"(addr) : "r"(temp), "1"(addr) ! : "memory"); ! return (int)oldval; } # define GC_TEST_AND_SET_DEFINED inline static void GC_clear(volatile unsigned int *addr) { ! __asm__ __volatile__("eieio" ::: "memory"); *(addr) = 0; } # define GC_CLEAR_DEFINED --- 141,164 ---- # if defined(POWERPC) inline static int GC_test_and_set(volatile unsigned int *addr) { int oldval; ! int temp = 1; /* locked value */ __asm__ __volatile__( ! "1:\tlwarx %0,0,%3\n" /* load and reserve */ ! "\tcmpwi %0, 0\n" /* if load is */ ! "\tbne 2f\n" /* non-zero, return already set */ ! "\tstwcx. %2,0,%1\n" /* else store conditional */ ! "\tbne- 1b\n" /* retry if lost reservation */ ! "\tsync\n" /* import barrier */ ! "2:\t\n" /* oldval is zero if we set */ : "=&r"(oldval), "=p"(addr) : "r"(temp), "1"(addr) ! : "cr0","memory"); ! return oldval; } # define GC_TEST_AND_SET_DEFINED inline static void GC_clear(volatile unsigned int *addr) { ! __asm__ __volatile__("eieio" : : : "memory"); *(addr) = 0; } # define GC_CLEAR_DEFINED *************** *** 178,189 **** --- 175,192 ---- " bne %2,2f\n" " xor %0,%3,%0\n" " stl_c %0,%1\n" + # ifdef __ELF__ " beq %0,3f\n" + # else + " beq %0,1b\n" + # endif " mb\n" "2:\n" + # ifdef __ELF__ ".section .text2,\"ax\"\n" "3: br 1b\n" ".previous" + # endif :"=&r" (temp), "=m" (*addr), "=&r" (oldvalue) :"Ir" (1), "m" (*addr) :"memory"); *************** *** 191,198 **** return oldvalue; } # define GC_TEST_AND_SET_DEFINED ! /* Should probably also define GC_clear, since it needs */ ! /* a memory barrier ?? */ # endif /* ALPHA */ # ifdef ARM32 inline static int GC_test_and_set(volatile unsigned int *addr) { --- 194,204 ---- return oldvalue; } # define GC_TEST_AND_SET_DEFINED ! inline static void GC_clear(volatile unsigned int *addr) { ! __asm__ __volatile__("mb" : : : "memory"); ! *(addr) = 0; ! } ! # define GC_CLEAR_DEFINED # endif /* ALPHA */ # ifdef ARM32 inline static int GC_test_and_set(volatile unsigned int *addr) { *************** *** 210,231 **** # define GC_TEST_AND_SET_DEFINED # endif /* ARM32 */ # ifdef S390 ! inline static int GC_test_and_set(volatile unsigned int *addr) { ! int ret; ! __asm__ __volatile__ ( ! " l %0,0(%2)\n" ! "0: cs %0,%1,0(%2)\n" ! " jl 0b" ! : "=&d" (ret) ! : "d" (1), "a" (addr) ! : "cc", "memory"); ! return ret; ! } # endif # endif /* __GNUC__ */ # if (defined(ALPHA) && !defined(__GNUC__)) ! # define GC_test_and_set(addr) __cxx_test_and_set_atomic(addr, 1) # define GC_TEST_AND_SET_DEFINED # endif # if defined(MSWIN32) # define GC_test_and_set(addr) InterlockedExchange((LPLONG)addr,1) --- 216,245 ---- # define GC_TEST_AND_SET_DEFINED # endif /* ARM32 */ # ifdef S390 ! inline static int GC_test_and_set(volatile unsigned int *addr) { ! int ret; ! __asm__ __volatile__ ( ! " l %0,0(%2)\n" ! "0: cs %0,%1,0(%2)\n" ! " jl 0b" ! : "=&d" (ret) ! : "d" (1), "a" (addr) ! : "cc", "memory"); ! return ret; ! } # endif # endif /* __GNUC__ */ # if (defined(ALPHA) && !defined(__GNUC__)) ! # ifndef OSF1 ! --> We currently assume that if gcc is not used, we are ! --> running under Tru64. ! # endif ! # include ! # include ! # define GC_test_and_set(addr) __ATOMIC_EXCH_LONG(addr, 1) # define GC_TEST_AND_SET_DEFINED + # define GC_clear(addr) { asm("mb"); *(volatile unsigned *)addr = 0; } + # define GC_CLEAR_DEFINED # endif # if defined(MSWIN32) # define GC_test_and_set(addr) InterlockedExchange((LPLONG)addr,1) *************** *** 238,251 **** # define GC_TEST_AND_SET_DEFINED # elif __mips < 3 || !(defined (_ABIN32) || defined(_ABI64)) \ || !defined(_COMPILER_VERSION) || _COMPILER_VERSION < 700 ! # define GC_test_and_set(addr) test_and_set(addr, 1) # else ! # define GC_test_and_set(addr) __test_and_set(addr,1) # define GC_clear(addr) __lock_release(addr); # define GC_CLEAR_DEFINED # endif # define GC_TEST_AND_SET_DEFINED # endif /* MIPS */ # if 0 /* defined(HP_PA) */ /* The official recommendation seems to be to not use ldcw from */ /* user mode. Since multithreaded incremental collection doesn't */ --- 252,302 ---- # define GC_TEST_AND_SET_DEFINED # elif __mips < 3 || !(defined (_ABIN32) || defined(_ABI64)) \ || !defined(_COMPILER_VERSION) || _COMPILER_VERSION < 700 ! # ifdef __GNUC__ ! # define GC_test_and_set(addr) _test_and_set((void *)addr,1) ! # else ! # define GC_test_and_set(addr) test_and_set((void *)addr,1) ! # endif # else ! # define GC_test_and_set(addr) __test_and_set32((void *)addr,1) # define GC_clear(addr) __lock_release(addr); # define GC_CLEAR_DEFINED # endif # define GC_TEST_AND_SET_DEFINED # endif /* MIPS */ + # if defined(_AIX) + # include + # if (defined(_POWER) || defined(_POWERPC)) + # if defined(__GNUC__) + inline static void GC_memsync() { + __asm__ __volatile__ ("sync" : : : "memory"); + } + # else + # ifndef inline + # define inline __inline + # endif + # pragma mc_func GC_memsync { \ + "7c0004ac" /* sync (same opcode used for dcs)*/ \ + } + # endif + # else + # error dont know how to memsync + # endif + inline static int GC_test_and_set(volatile unsigned int * addr) { + int oldvalue = 0; + if (compare_and_swap((void *)addr, &oldvalue, 1)) { + GC_memsync(); + return 0; + } else return 1; + } + # define GC_TEST_AND_SET_DEFINED + inline static void GC_clear(volatile unsigned int *addr) { + GC_memsync(); + *(addr) = 0; + } + # define GC_CLEAR_DEFINED + + # endif # if 0 /* defined(HP_PA) */ /* The official recommendation seems to be to not use ldcw from */ /* user mode. Since multithreaded incremental collection doesn't */ *************** *** 279,285 **** # endif # if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \ ! && !defined(GC_IRIX_THREADS) # define NO_THREAD (pthread_t)(-1) # include # if defined(PARALLEL_MARK) --- 330,336 ---- # endif # if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \ ! && !defined(GC_IRIX_THREADS) && !defined(GC_WIN32_THREADS) # define NO_THREAD (pthread_t)(-1) # include # if defined(PARALLEL_MARK) *************** *** 310,321 **** { char result; __asm__ __volatile__("lock; cmpxchgl %2, %0; setz %1" ! : "=m"(*(addr)), "=r"(result) ! : "r" (new_val), "0"(*(addr)), "a"(old) : "memory"); return (GC_bool) result; } # endif /* !GENERIC_COMPARE_AND_SWAP */ ! inline static void GC_memory_write_barrier() { /* We believe the processor ensures at least processor */ /* consistent ordering. Thus a compiler barrier */ --- 361,372 ---- { char result; __asm__ __volatile__("lock; cmpxchgl %2, %0; setz %1" ! : "+m"(*(addr)), "=r"(result) ! : "r" (new_val), "a"(old) : "memory"); return (GC_bool) result; } # endif /* !GENERIC_COMPARE_AND_SWAP */ ! inline static void GC_memory_barrier() { /* We believe the processor ensures at least processor */ /* consistent ordering. Thus a compiler barrier */ *************** *** 323,367 **** __asm__ __volatile__("" : : : "memory"); } # endif /* I386 */ # if defined(IA64) # if !defined(GENERIC_COMPARE_AND_SWAP) inline static GC_bool GC_compare_and_exchange(volatile GC_word *addr, ! GC_word old, GC_word new_val) { ! unsigned long oldval; ! __asm__ __volatile__("mov ar.ccv=%4 ;; cmpxchg8.rel %0=%1,%2,ar.ccv" ! : "=r"(oldval), "=m"(*addr) ! : "r"(new_val), "1"(*addr), "r"(old) : "memory"); ! return (oldval == old); } # endif /* !GENERIC_COMPARE_AND_SWAP */ # if 0 /* Shouldn't be needed; we use volatile stores instead. */ ! inline static void GC_memory_write_barrier() { ! __asm__ __volatile__("mf" : : : "memory"); } # endif /* 0 */ # endif /* IA64 */ # if defined(S390) # if !defined(GENERIC_COMPARE_AND_SWAP) ! inline static GC_bool GC_compare_and_exchange(volatile C_word *addr, ! GC_word old, GC_word new_val) ! { ! int retval; ! __asm__ __volatile__ ( ! # ifndef __s390x__ ! " cs %1,%2,0(%3)\n" ! # else ! " csg %1,%2,0(%3)\n" ! # endif ! " ipm %0\n" ! " srl %0,28\n" ! : "=&d" (retval), "+d" (old) ! : "d" (new_val), "a" (addr) ! : "cc", "memory"); ! return retval == 0; ! } # endif # endif # if !defined(GENERIC_COMPARE_AND_SWAP) --- 374,486 ---- __asm__ __volatile__("" : : : "memory"); } # endif /* I386 */ + + # if defined(POWERPC) + # if !defined(GENERIC_COMPARE_AND_SWAP) + /* Returns TRUE if the comparison succeeded. */ + inline static GC_bool GC_compare_and_exchange(volatile GC_word *addr, + GC_word old, GC_word new_val) + { + int result, dummy; + __asm__ __volatile__( + "1:\tlwarx %0,0,%5\n" + "\tcmpw %0,%4\n" + "\tbne 2f\n" + "\tstwcx. %3,0,%2\n" + "\tbne- 1b\n" + "\tsync\n" + "\tli %1, 1\n" + "\tb 3f\n" + "2:\tli %1, 0\n" + "3:\t\n" + : "=&r" (dummy), "=r" (result), "=p" (addr) + : "r" (new_val), "r" (old), "2"(addr) + : "cr0","memory"); + return (GC_bool) result; + } + # endif /* !GENERIC_COMPARE_AND_SWAP */ + inline static void GC_memory_barrier() + { + __asm__ __volatile__("sync" : : : "memory"); + } + # endif /* POWERPC */ + # if defined(IA64) # if !defined(GENERIC_COMPARE_AND_SWAP) inline static GC_bool GC_compare_and_exchange(volatile GC_word *addr, ! GC_word old, ! GC_word new_val) { ! return __sync_bool_compare_and_swap (addr, old, new_val); } # endif /* !GENERIC_COMPARE_AND_SWAP */ # if 0 /* Shouldn't be needed; we use volatile stores instead. */ ! inline static void GC_memory_barrier() { ! __sync_synchronize (); } # endif /* 0 */ # endif /* IA64 */ + # if defined(ALPHA) + # if !defined(GENERIC_COMPARE_AND_SWAP) + # if defined(__GNUC__) + inline static GC_bool GC_compare_and_exchange(volatile GC_word *addr, + GC_word old, GC_word new_val) + { + unsigned long was_equal; + unsigned long temp; + + __asm__ __volatile__( + "1: ldq_l %0,%1\n" + " cmpeq %0,%4,%2\n" + " mov %3,%0\n" + " beq %2,2f\n" + " stq_c %0,%1\n" + " beq %0,1b\n" + "2:\n" + " mb\n" + :"=&r" (temp), "=m" (*addr), "=&r" (was_equal) + : "r" (new_val), "Ir" (old) + :"memory"); + return was_equal; + } + # else /* !__GNUC__ */ + inline static GC_bool GC_compare_and_exchange(volatile GC_word *addr, + GC_word old, GC_word new_val) + { + return __CMP_STORE_QUAD(addr, old, new_val, addr); + } + # endif /* !__GNUC__ */ + # endif /* !GENERIC_COMPARE_AND_SWAP */ + # ifdef __GNUC__ + inline static void GC_memory_barrier() + { + __asm__ __volatile__("mb" : : : "memory"); + } + # else + # define GC_memory_barrier() asm("mb") + # endif /* !__GNUC__ */ + # endif /* ALPHA */ # if defined(S390) # if !defined(GENERIC_COMPARE_AND_SWAP) ! inline static GC_bool GC_compare_and_exchange(volatile C_word *addr, ! GC_word old, GC_word new_val) ! { ! int retval; ! __asm__ __volatile__ ( ! # ifndef __s390x__ ! " cs %1,%2,0(%3)\n" ! # else ! " csg %1,%2,0(%3)\n" ! # endif ! " ipm %0\n" ! " srl %0,28\n" ! : "=&d" (retval), "+d" (old) ! : "d" (new_val), "a" (addr) ! : "cc", "memory"); ! return retval == 0; ! } # endif # endif # if !defined(GENERIC_COMPARE_AND_SWAP) *************** *** 434,441 **** --- 553,564 ---- { GC_ASSERT(I_HOLD_LOCK()); UNSET_LOCK_HOLDER(); \ pthread_mutex_unlock(&GC_allocate_ml); } # else /* !GC_ASSERTIONS */ + # if defined(NO_PTHREAD_TRYLOCK) + # define LOCK() GC_lock(); + # else /* !defined(NO_PTHREAD_TRYLOCK) */ # define LOCK() \ { if (0 != pthread_mutex_trylock(&GC_allocate_ml)) GC_lock(); } + # endif # define UNLOCK() pthread_mutex_unlock(&GC_allocate_ml) # endif /* !GC_ASSERTIONS */ # endif /* USE_PTHREAD_LOCKS */ *************** *** 457,463 **** /* on Irix anymore. */ # include ! extern unsigned long GC_allocate_lock; /* This is not a mutex because mutexes that obey the (optional) */ /* POSIX scheduling rules are subject to convoys in high contention */ /* applications. This is basically a spin lock. */ --- 580,586 ---- /* on Irix anymore. */ # include ! extern volatile unsigned int GC_allocate_lock; /* This is not a mutex because mutexes that obey the (optional) */ /* POSIX scheduling rules are subject to convoys in high contention */ /* applications. This is basically a spin lock. */ *************** *** 478,488 **** } # define EXIT_GC() GC_collecting = 0; # endif /* GC_IRIX_THREADS */ ! # ifdef GC_WIN32_THREADS ! # include ! GC_API CRITICAL_SECTION GC_allocate_ml; ! # define LOCK() EnterCriticalSection(&GC_allocate_ml); ! # define UNLOCK() LeaveCriticalSection(&GC_allocate_ml); # endif # ifndef SET_LOCK_HOLDER # define SET_LOCK_HOLDER() --- 601,618 ---- } # define EXIT_GC() GC_collecting = 0; # endif /* GC_IRIX_THREADS */ ! # if defined(GC_WIN32_THREADS) ! # if defined(GC_PTHREADS) ! # include ! extern pthread_mutex_t GC_allocate_ml; ! # define LOCK() pthread_mutex_lock(&GC_allocate_ml) ! # define UNLOCK() pthread_mutex_unlock(&GC_allocate_ml) ! # else ! # include ! GC_API CRITICAL_SECTION GC_allocate_ml; ! # define LOCK() EnterCriticalSection(&GC_allocate_ml); ! # define UNLOCK() LeaveCriticalSection(&GC_allocate_ml); ! # endif # endif # ifndef SET_LOCK_HOLDER # define SET_LOCK_HOLDER() diff -Nrc3pad gcc-3.3.3/boehm-gc/include/private/gc_pmark.h gcc-3.4.0/boehm-gc/include/private/gc_pmark.h *** gcc-3.3.3/boehm-gc/include/private/gc_pmark.h 2002-02-12 04:37:57.000000000 +0000 --- gcc-3.4.0/boehm-gc/include/private/gc_pmark.h 2003-07-28 04:18:23.000000000 +0000 *************** extern mse * GC_mark_stack; *** 137,143 **** #ifdef __STDC__ # ifdef PRINT_BLACK_LIST ptr_t GC_find_start(ptr_t current, hdr *hhdr, hdr **new_hdr_p, ! ptr_t source); # else ptr_t GC_find_start(ptr_t current, hdr *hhdr, hdr **new_hdr_p); # endif --- 137,143 ---- #ifdef __STDC__ # ifdef PRINT_BLACK_LIST ptr_t GC_find_start(ptr_t current, hdr *hhdr, hdr **new_hdr_p, ! word source); # else ptr_t GC_find_start(ptr_t current, hdr *hhdr, hdr **new_hdr_p); # endif *************** extern mse * GC_mark_stack; *** 145,151 **** ptr_t GC_find_start(); #endif ! mse *GC_signal_mark_stack_overflow(mse *msp); # ifdef GATHERSTATS # define ADD_TO_ATOMIC(sz) GC_atomic_in_use += (sz) --- 145,151 ---- ptr_t GC_find_start(); #endif ! mse * GC_signal_mark_stack_overflow GC_PROTO((mse *msp)); # ifdef GATHERSTATS # define ADD_TO_ATOMIC(sz) GC_atomic_in_use += (sz) *************** mse *GC_signal_mark_stack_overflow(mse * *** 174,187 **** } \ } - #ifdef PRINT_BLACK_LIST - # define GC_FIND_START(current, hhdr, new_hdr_p, source) \ - GC_find_start(current, hhdr, new_hdr_p, source) - #else - # define GC_FIND_START(current, hhdr, new_hdr_p, source) \ - GC_find_start(current, hhdr, new_hdr_p) - #endif - /* Push the contents of current onto the mark stack if it is a valid */ /* ptr to a currently unmarked object. Mark it. */ /* If we assumed a standard-conforming compiler, we could probably */ --- 174,179 ---- *************** mse *GC_signal_mark_stack_overflow(mse * *** 195,202 **** GET_HDR(my_current, my_hhdr); \ if (IS_FORWARDING_ADDR_OR_NIL(my_hhdr)) { \ hdr * new_hdr = GC_invalid_header; \ ! my_current = GC_FIND_START(my_current, my_hhdr, \ ! &new_hdr, (word)source); \ my_hhdr = new_hdr; \ } \ PUSH_CONTENTS_HDR(my_current, mark_stack_top, mark_stack_limit, \ --- 187,193 ---- GET_HDR(my_current, my_hhdr); \ if (IS_FORWARDING_ADDR_OR_NIL(my_hhdr)) { \ hdr * new_hdr = GC_invalid_header; \ ! my_current = GC_find_start(my_current, my_hhdr, &new_hdr); \ my_hhdr = new_hdr; \ } \ PUSH_CONTENTS_HDR(my_current, mark_stack_top, mark_stack_limit, \ *************** exit_label: ; \ *** 290,310 **** /* * Push a single value onto mark stack. Mark from the object pointed to by p. * P is considered valid even if it is an interior pointer. * Previously marked objects are not pushed. Hence we make progress even * if the mark stack overflows. */ ! # define GC_PUSH_ONE_STACK(p, source) \ ! if ((ptr_t)(p) >= (ptr_t)GC_least_plausible_heap_addr \ && (ptr_t)(p) < (ptr_t)GC_greatest_plausible_heap_addr) { \ PUSH_ONE_CHECKED_STACK(p, source); \ ! } /* * As above, but interior pointer recognition as for * normal for heap pointers. */ # define GC_PUSH_ONE_HEAP(p,source) \ if ((ptr_t)(p) >= (ptr_t)GC_least_plausible_heap_addr \ && (ptr_t)(p) < (ptr_t)GC_greatest_plausible_heap_addr) { \ GC_mark_stack_top = GC_mark_and_push( \ --- 281,319 ---- /* * Push a single value onto mark stack. Mark from the object pointed to by p. + * Invoke FIXUP_POINTER(p) before any further processing. * P is considered valid even if it is an interior pointer. * Previously marked objects are not pushed. Hence we make progress even * if the mark stack overflows. */ ! ! # if NEED_FIXUP_POINTER ! /* Try both the raw version and the fixed up one. */ ! # define GC_PUSH_ONE_STACK(p, source) \ ! if ((ptr_t)(p) >= (ptr_t)GC_least_plausible_heap_addr \ && (ptr_t)(p) < (ptr_t)GC_greatest_plausible_heap_addr) { \ PUSH_ONE_CHECKED_STACK(p, source); \ ! } \ ! FIXUP_POINTER(p); \ ! if ((ptr_t)(p) >= (ptr_t)GC_least_plausible_heap_addr \ ! && (ptr_t)(p) < (ptr_t)GC_greatest_plausible_heap_addr) { \ ! PUSH_ONE_CHECKED_STACK(p, source); \ ! } ! # else /* !NEED_FIXUP_POINTER */ ! # define GC_PUSH_ONE_STACK(p, source) \ ! if ((ptr_t)(p) >= (ptr_t)GC_least_plausible_heap_addr \ ! && (ptr_t)(p) < (ptr_t)GC_greatest_plausible_heap_addr) { \ ! PUSH_ONE_CHECKED_STACK(p, source); \ ! } ! # endif ! /* * As above, but interior pointer recognition as for * normal for heap pointers. */ # define GC_PUSH_ONE_HEAP(p,source) \ + FIXUP_POINTER(p); \ if ((ptr_t)(p) >= (ptr_t)GC_least_plausible_heap_addr \ && (ptr_t)(p) < (ptr_t)GC_greatest_plausible_heap_addr) { \ GC_mark_stack_top = GC_mark_and_push( \ diff -Nrc3pad gcc-3.3.3/boehm-gc/include/private/gc_priv.h gcc-3.4.0/boehm-gc/include/private/gc_priv.h *** gcc-3.3.3/boehm-gc/include/private/gc_priv.h 2003-03-04 17:56:49.000000000 +0000 --- gcc-3.4.0/boehm-gc/include/private/gc_priv.h 2003-10-03 18:43:06.000000000 +0000 *************** *** 30,43 **** # define BSD_TIME #endif #ifdef BSD_TIME # include # include # include #endif /* BSD_TIME */ ! # ifndef GC_H ! # include "gc.h" # endif # ifndef GC_MARK_H --- 30,49 ---- # define BSD_TIME #endif + #ifdef DGUX + # include + # include + # include + #endif /* DGUX */ + #ifdef BSD_TIME # include # include # include #endif /* BSD_TIME */ ! # ifndef _GC_H ! # include "../gc.h" # endif # ifndef GC_MARK_H *************** typedef char * ptr_t; /* A generic point *** 206,216 **** #endif #if defined(GC_GCJ_SUPPORT) && ALIGNMENT < 8 && !defined(ALIGN_DOUBLE) ! /* GCJ's Hashtable synchronization code requires 64-bit alignment. */ # define ALIGN_DOUBLE #endif - /* ALIGN_DOUBLE requires MERGE_SIZES at present. */ # if defined(ALIGN_DOUBLE) && !defined(MERGE_SIZES) # define MERGE_SIZES --- 212,221 ---- #endif #if defined(GC_GCJ_SUPPORT) && ALIGNMENT < 8 && !defined(ALIGN_DOUBLE) ! /* GCJ's Hashtable synchronization code requires 64-bit alignment. */ # define ALIGN_DOUBLE #endif /* ALIGN_DOUBLE requires MERGE_SIZES at present. */ # if defined(ALIGN_DOUBLE) && !defined(MERGE_SIZES) # define MERGE_SIZES *************** void GC_print_callers GC_PROTO((struct c *** 347,353 **** # include # define BCOPY_EXISTS # endif ! # if defined(MACOSX) # define BCOPY_EXISTS # endif --- 352,359 ---- # include # define BCOPY_EXISTS # endif ! # if defined(DARWIN) ! # include # define BCOPY_EXISTS # endif *************** void GC_print_callers GC_PROTO((struct c *** 360,427 **** # define BZERO(x,n) bzero((char *)(x),(int)(n)) # endif - /* HBLKSIZE aligned allocation. 0 is taken to mean failure */ - /* space is assumed to be cleared. */ - /* In the case os USE_MMAP, the argument must also be a */ - /* physical page size. */ - /* GET_MEM is currently not assumed to retrieve 0 filled space, */ - /* though we should perhaps take advantage of the case in which */ - /* does. */ - struct hblk; /* See below. */ - # ifdef PCR - char * real_malloc(); - # define GET_MEM(bytes) HBLKPTR(real_malloc((size_t)bytes + GC_page_size) \ - + GC_page_size-1) - # else - # ifdef OS2 - void * os2_alloc(size_t bytes); - # define GET_MEM(bytes) HBLKPTR((ptr_t)os2_alloc((size_t)bytes \ - + GC_page_size) \ - + GC_page_size-1) - # else - # if defined(NEXT) || defined(MACOSX) || defined(DOS4GW) || \ - (defined(AMIGA) && !defined(GC_AMIGA_FASTALLOC)) || \ - (defined(SUNOS5) && !defined(USE_MMAP)) - # define GET_MEM(bytes) HBLKPTR((size_t) \ - calloc(1, (size_t)bytes + GC_page_size) \ - + GC_page_size-1) - # else - # ifdef MSWIN32 - extern ptr_t GC_win32_get_mem(); - # define GET_MEM(bytes) (struct hblk *)GC_win32_get_mem(bytes) - # else - # ifdef MACOS - # if defined(USE_TEMPORARY_MEMORY) - extern Ptr GC_MacTemporaryNewPtr(size_t size, - Boolean clearMemory); - # define GET_MEM(bytes) HBLKPTR( \ - GC_MacTemporaryNewPtr(bytes + GC_page_size, true) \ - + GC_page_size-1) - # else - # define GET_MEM(bytes) HBLKPTR( \ - NewPtrClear(bytes + GC_page_size) + GC_page_size-1) - # endif - # else - # ifdef MSWINCE - extern ptr_t GC_wince_get_mem(); - # define GET_MEM(bytes) (struct hblk *)GC_wince_get_mem(bytes) - # else - # if defined(AMIGA) && defined(GC_AMIGA_FASTALLOC) - extern void *GC_amiga_get_mem(size_t size); - define GET_MEM(bytes) HBLKPTR((size_t) \ - GC_amiga_get_mem((size_t)bytes + GC_page_size) \ - + GC_page_size-1) - # else - extern ptr_t GC_unix_get_mem(); - # define GET_MEM(bytes) (struct hblk *)GC_unix_get_mem(bytes) - # endif - # endif - # endif - # endif - # endif - # endif - # endif - /* Delay any interrupts or signals that may abort this thread. Data */ /* structures are in a consistent state outside this pair of calls. */ /* ANSI C allows both to be empty (though the standard isn't very */ --- 366,371 ---- *************** struct hblk; /* See below. */ *** 486,492 **** # ifdef SMALL_CONFIG # define ABORT(msg) abort(); # else ! GC_API void GC_abort(); # define ABORT(msg) GC_abort(msg); # endif # endif --- 430,436 ---- # ifdef SMALL_CONFIG # define ABORT(msg) abort(); # else ! GC_API void GC_abort GC_PROTO((GC_CONST char * msg)); # define ABORT(msg) GC_abort(msg); # endif # endif *************** extern GC_warn_proc GC_current_warn_proc *** 504,510 **** /* Get environment entry */ #if !defined(NO_GETENV) ! # define GETENV(name) getenv(name) #else # define GETENV(name) 0 #endif --- 448,466 ---- /* Get environment entry */ #if !defined(NO_GETENV) ! # if defined(EMPTY_GETENV_RESULTS) ! /* Workaround for a reputed Wine bug. */ ! static inline char * fixed_getenv(const char *name) ! { ! char * tmp = getenv(name); ! if (tmp == 0 || strlen(tmp) == 0) ! return 0; ! return tmp; ! } ! # define GETENV(name) fixed_getenv(name) ! # else ! # define GETENV(name) getenv(name) ! # endif #else # define GETENV(name) 0 #endif *************** extern GC_warn_proc GC_current_warn_proc *** 646,654 **** */ # ifdef LARGE_CONFIG ! # define LOG_PHT_ENTRIES 19 /* Collisions likely at 512K blocks, */ ! /* which is >= 2GB. Each table takes */ ! /* 64KB. */ # else # ifdef SMALL_CONFIG # define LOG_PHT_ENTRIES 14 /* Collisions are likely if heap grows */ --- 602,611 ---- */ # ifdef LARGE_CONFIG ! # define LOG_PHT_ENTRIES 20 /* Collisions likely at 1M blocks, */ ! /* which is >= 4GB. Each table takes */ ! /* 128KB, some of which may never be */ ! /* touched. */ # else # ifdef SMALL_CONFIG # define LOG_PHT_ENTRIES 14 /* Collisions are likely if heap grows */ *************** extern GC_warn_proc GC_current_warn_proc *** 656,662 **** /* Each hash table occupies 2K bytes. */ # else /* default "medium" configuration */ # define LOG_PHT_ENTRIES 16 /* Collisions are likely if heap grows */ ! /* to more than 16K hblks >= 256MB. */ /* Each hash table occupies 8K bytes. */ # endif # endif --- 613,619 ---- /* Each hash table occupies 2K bytes. */ # else /* default "medium" configuration */ # define LOG_PHT_ENTRIES 16 /* Collisions are likely if heap grows */ ! /* to more than 64K hblks >= 256MB. */ /* Each hash table occupies 8K bytes. */ # endif # endif *************** struct _GC_arrays { *** 897,902 **** --- 854,863 ---- word _mem_freed; /* Number of explicitly deallocated words of memory */ /* since last collection. */ + word _finalizer_mem_freed; + /* Words of memory explicitly deallocated while */ + /* finalizers were running. Used to approximate mem. */ + /* explicitly deallocated by finalizers. */ ptr_t _scratch_end_ptr; ptr_t _scratch_last_end_ptr; /* Used by headers.c, and can easily appear to point to */ *************** struct _GC_arrays { *** 957,963 **** /* OFFSET_TOO_BIG if the value j would be too */ /* large to fit in the entry. (Note that the */ /* size of these entries matters, both for */ ! /* space consumption and for cache utilization. */ # define OFFSET_TOO_BIG 0xfe # define OBJ_INVALID 0xff # define MAP_ENTRY(map, bytes) (map)[bytes] --- 918,924 ---- /* OFFSET_TOO_BIG if the value j would be too */ /* large to fit in the entry. (Note that the */ /* size of these entries matters, both for */ ! /* space consumption and for cache utilization.) */ # define OFFSET_TOO_BIG 0xfe # define OBJ_INVALID 0xff # define MAP_ENTRY(map, bytes) (map)[bytes] *************** GC_API GC_FAR struct _GC_arrays GC_array *** 1067,1072 **** --- 1028,1034 ---- # define GC_words_finalized GC_arrays._words_finalized # define GC_non_gc_bytes_at_gc GC_arrays._non_gc_bytes_at_gc # define GC_mem_freed GC_arrays._mem_freed + # define GC_finalizer_mem_freed GC_arrays._finalizer_mem_freed # define GC_scratch_end_ptr GC_arrays._scratch_end_ptr # define GC_scratch_last_end_ptr GC_arrays._scratch_last_end_ptr # define GC_mark_procs GC_arrays._mark_procs *************** extern struct hblk * GC_hblkfreelist[]; *** 1201,1217 **** /* header structure associated with */ /* block. */ - extern GC_bool GC_is_initialized; /* GC_init() has been run. */ - extern GC_bool GC_objects_are_marked; /* There are marked objects in */ /* the heap. */ #ifndef SMALL_CONFIG extern GC_bool GC_incremental; /* Using incremental/generational collection. */ #else # define GC_incremental FALSE /* Hopefully allow optimizer to remove some code. */ #endif extern GC_bool GC_dirty_maintained; --- 1163,1181 ---- /* header structure associated with */ /* block. */ extern GC_bool GC_objects_are_marked; /* There are marked objects in */ /* the heap. */ #ifndef SMALL_CONFIG extern GC_bool GC_incremental; /* Using incremental/generational collection. */ + # define TRUE_INCREMENTAL \ + (GC_incremental && GC_time_limit != GC_TIME_UNLIMITED) + /* True incremental, not just generational, mode */ #else # define GC_incremental FALSE /* Hopefully allow optimizer to remove some code. */ + # define TRUE_INCREMENTAL FALSE #endif extern GC_bool GC_dirty_maintained; *************** extern long GC_large_alloc_warn_interval *** 1229,1234 **** --- 1193,1202 ---- extern long GC_large_alloc_warn_suppressed; /* Number of warnings suppressed so far. */ + #ifdef THREADS + extern GC_bool GC_world_stopped; + #endif + /* Operations */ # ifndef abs # define abs(x) ((x) < 0? (-(x)) : (x)) *************** extern void (*GC_start_call_back) GC_PRO *** 1403,1408 **** --- 1371,1381 ---- # else void GC_push_regs GC_PROTO((void)); # endif + # if defined(SPARC) || defined(IA64) + /* Cause all stacked registers to be saved in memory. Return a */ + /* pointer to the top of the corresponding memory stack. */ + word GC_save_regs_in_stack GC_PROTO((void)); + # endif /* Push register contents onto mark stack. */ /* If NURSERY is defined, the default push */ /* action can be overridden with GC_push_proc */ *************** void GC_set_fl_marks GC_PROTO((ptr_t p)) *** 1452,1457 **** --- 1425,1431 ---- /* Set all mark bits associated with */ /* a free list. */ void GC_add_roots_inner GC_PROTO((char * b, char * e, GC_bool tmp)); + void GC_remove_roots_inner GC_PROTO((char * b, char * e)); GC_bool GC_is_static_root GC_PROTO((ptr_t p)); /* Is the address p in one of the registered static */ /* root sections? */ *************** GC_bool GC_is_tmp_root GC_PROTO((ptr_t p *** 1462,1472 **** # endif void GC_register_dynamic_libraries GC_PROTO((void)); /* Add dynamic library data sections to the root set. */ - GC_bool GC_register_main_static_data GC_PROTO((void)); ! /* We need to register the main data segment. Returns */ ! /* TRUE unless this is done implicitly as part of */ ! /* dynamic library registration. */ /* Machine dependent startup routines */ ptr_t GC_get_stack_base GC_PROTO((void)); /* Cold end of stack */ --- 1436,1445 ---- # endif void GC_register_dynamic_libraries GC_PROTO((void)); /* Add dynamic library data sections to the root set. */ GC_bool GC_register_main_static_data GC_PROTO((void)); ! /* We need to register the main data segment. Returns */ ! /* TRUE unless this is done implicitly as part of */ ! /* dynamic library registration. */ /* Machine dependent startup routines */ ptr_t GC_get_stack_base GC_PROTO((void)); /* Cold end of stack */ *************** GC_bool GC_collect_or_expand GC_PROTO(( *** 1624,1629 **** --- 1597,1604 ---- /* until the blocks are available or */ /* until it fails by returning FALSE. */ + extern GC_bool GC_is_initialized; /* GC_init() has been run. */ + #if defined(MSWIN32) || defined(MSWINCE) void GC_deinit GC_PROTO((void)); /* Free any resources allocated by */ *************** ptr_t GC_allocobj GC_PROTO((word sz, int *** 1665,1670 **** --- 1640,1647 ---- /* Make the indicated */ /* free list nonempty, and return its */ /* head. */ + + void GC_free_inner(GC_PTR p); void GC_init_headers GC_PROTO((void)); struct hblkhdr * GC_install_header GC_PROTO((struct hblk *h)); *************** void GC_notify_or_invoke_finalizers GC_P *** 1694,1699 **** --- 1671,1682 ---- /* Call *GC_finalizer_notifier if there are */ /* finalizers to be run, and we haven't called */ /* this procedure yet this GC cycle. */ + + GC_API GC_PTR GC_make_closure GC_PROTO((GC_finalization_proc fn, GC_PTR data)); + GC_API void GC_debug_invoke_finalizer GC_PROTO((GC_PTR obj, GC_PTR data)); + /* Auxiliary fns to make finalization work */ + /* correctly with displaced pointers introduced */ + /* by the debugging allocators. */ void GC_add_to_heap GC_PROTO((struct hblk *p, word bytes)); /* Add a HBLKSIZE aligned chunk to the heap. */ *************** void GC_print_obj GC_PROTO((ptr_t p)); *** 1704,1719 **** /* description of the object to stderr. */ extern void (*GC_check_heap) GC_PROTO((void)); /* Check that all objects in the heap with */ ! /* debugging info are intact. Print */ ! /* descriptions of any that are not. */ extern void (*GC_print_heap_obj) GC_PROTO((ptr_t p)); /* If possible print s followed by a more */ /* detailed description of the object */ /* referred to by p. */ extern GC_bool GC_print_stats; /* Produce at least some logging output */ /* Set from environment variable. */ /* Macros used for collector internal allocation. */ /* These assume the collector lock is held. */ #ifdef DBG_HDRS_ALL --- 1687,1722 ---- /* description of the object to stderr. */ extern void (*GC_check_heap) GC_PROTO((void)); /* Check that all objects in the heap with */ ! /* debugging info are intact. */ ! /* Add any that are not to GC_smashed list. */ ! extern void (*GC_print_all_smashed) GC_PROTO((void)); ! /* Print GC_smashed if it's not empty. */ ! /* Clear GC_smashed list. */ ! extern void GC_print_all_errors GC_PROTO((void)); ! /* Print smashed and leaked objects, if any. */ ! /* Clear the lists of such objects. */ extern void (*GC_print_heap_obj) GC_PROTO((ptr_t p)); /* If possible print s followed by a more */ /* detailed description of the object */ /* referred to by p. */ + #if defined(LINUX) && defined(__ELF__) && !defined(SMALL_CONFIG) + void GC_print_address_map GC_PROTO((void)); + /* Print an address map of the process. */ + #endif + extern GC_bool GC_have_errors; /* We saw a smashed or leaked object. */ + /* Call error printing routine */ + /* occasionally. */ extern GC_bool GC_print_stats; /* Produce at least some logging output */ /* Set from environment variable. */ + #ifndef NO_DEBUGGING + extern GC_bool GC_dump_regularly; /* Generate regular debugging dumps. */ + # define COND_DUMP if (GC_dump_regularly) GC_dump(); + #else + # define COND_DUMP + #endif + /* Macros used for collector internal allocation. */ /* These assume the collector lock is held. */ #ifdef DBG_HDRS_ALL *************** void GC_print_block_list GC_PROTO((void) *** 1785,1790 **** --- 1788,1794 ---- void GC_print_hblkfreelist GC_PROTO((void)); void GC_print_heap_sects GC_PROTO((void)); void GC_print_static_roots GC_PROTO((void)); + void GC_print_finalization_stats GC_PROTO((void)); void GC_dump GC_PROTO((void)); #ifdef KEEP_BACK_PTRS *************** void GC_err_puts GC_PROTO((GC_CONST char *** 1866,1871 **** --- 1870,1885 ---- # define GC_ASSERT(expr) # endif + /* Check a compile time assertion at compile time. The error */ + /* message for failure is a bit baroque, but ... */ + #if defined(mips) && !defined(__GNUC__) + /* DOB: MIPSPro C gets an internal error taking the sizeof an array type. + This code works correctly (ugliness is to avoid "unused var" warnings) */ + # define GC_STATIC_ASSERT(expr) do { if (0) { char j[(expr)? 1 : -1]; j[0]='\0'; j[0]=j[0]; } } while(0) + #else + # define GC_STATIC_ASSERT(expr) sizeof(char[(expr)? 1 : -1]) + #endif + # if defined(PARALLEL_MARK) || defined(THREAD_LOCAL_ALLOC) /* We need additional synchronization facilities from the thread */ /* support. We believe these are less performance critical */ *************** void GC_err_puts GC_PROTO((GC_CONST char *** 1911,1917 **** /* in Linux glibc, but it's not exported.) Thus we continue to use */ /* the same hard-coded signals we've always used. */ # if !defined(SIG_SUSPEND) ! # if defined(GC_LINUX_THREADS) # if defined(SPARC) && !defined(SIGPWR) /* SPARC/Linux doesn't properly define SIGPWR in . * It is aliased to SIGLOST in asm/signal.h, though. */ --- 1925,1931 ---- /* in Linux glibc, but it's not exported.) Thus we continue to use */ /* the same hard-coded signals we've always used. */ # if !defined(SIG_SUSPEND) ! # if defined(GC_LINUX_THREADS) || defined(GC_DGUX386_THREADS) # if defined(SPARC) && !defined(SIGPWR) /* SPARC/Linux doesn't properly define SIGPWR in . * It is aliased to SIGLOST in asm/signal.h, though. */ diff -Nrc3pad gcc-3.3.3/boehm-gc/include/private/pthread_stop_world.h gcc-3.4.0/boehm-gc/include/private/pthread_stop_world.h *** gcc-3.3.3/boehm-gc/include/private/pthread_stop_world.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/boehm-gc/include/private/pthread_stop_world.h 2003-07-28 03:46:18.000000000 +0000 *************** *** 0 **** --- 1,12 ---- + #ifndef GC_PTHREAD_STOP_WORLD_H + #define GC_PTHREAD_STOP_WORLD_H + + struct thread_stop_info { + int signal; + word last_stop_count; /* GC_last_stop_count value when thread */ + /* last successfully handled a suspend */ + /* signal. */ + ptr_t stack_ptr; /* Valid only when stopped. */ + }; + + #endif diff -Nrc3pad gcc-3.3.3/boehm-gc/include/private/pthread_support.h gcc-3.4.0/boehm-gc/include/private/pthread_support.h *** gcc-3.3.3/boehm-gc/include/private/pthread_support.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/boehm-gc/include/private/pthread_support.h 2003-07-28 03:46:18.000000000 +0000 *************** *** 0 **** --- 1,97 ---- + #ifndef GC_PTHREAD_SUPPORT_H + #define GC_PTHREAD_SUPPORT_H + + # include "private/gc_priv.h" + + # if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \ + && !defined(GC_IRIX_THREADS) && !defined(GC_WIN32_THREADS) + + #if defined(GC_DARWIN_THREADS) + # include "private/darwin_stop_world.h" + #else + # include "private/pthread_stop_world.h" + #endif + + /* We use the allocation lock to protect thread-related data structures. */ + + /* The set of all known threads. We intercept thread creation and */ + /* joins. */ + /* Protected by allocation/GC lock. */ + /* Some of this should be declared volatile, but that's inconsistent */ + /* with some library routine declarations. */ + typedef struct GC_Thread_Rep { + struct GC_Thread_Rep * next; /* More recently allocated threads */ + /* with a given pthread id come */ + /* first. (All but the first are */ + /* guaranteed to be dead, but we may */ + /* not yet have registered the join.) */ + pthread_t id; + /* Extra bookkeeping information the stopping code uses */ + struct thread_stop_info stop_info; + + short flags; + # define FINISHED 1 /* Thread has exited. */ + # define DETACHED 2 /* Thread is intended to be detached. */ + # define MAIN_THREAD 4 /* True for the original thread only. */ + short thread_blocked; /* Protected by GC lock. */ + /* Treated as a boolean value. If set, */ + /* thread will acquire GC lock before */ + /* doing any pointer manipulations, and */ + /* has set its sp value. Thus it does */ + /* not need to be sent a signal to stop */ + /* it. */ + ptr_t stack_end; /* Cold end of the stack. */ + # ifdef IA64 + ptr_t backing_store_end; + ptr_t backing_store_ptr; + # endif + void * status; /* The value returned from the thread. */ + /* Used only to avoid premature */ + /* reclamation of any data it might */ + /* reference. */ + # ifdef THREAD_LOCAL_ALLOC + # if CPP_WORDSZ == 64 && defined(ALIGN_DOUBLE) + # define GRANULARITY 16 + # define NFREELISTS 49 + # else + # define GRANULARITY 8 + # define NFREELISTS 65 + # endif + /* The ith free list corresponds to size i*GRANULARITY */ + # define INDEX_FROM_BYTES(n) ((ADD_SLOP(n) + GRANULARITY - 1)/GRANULARITY) + # define BYTES_FROM_INDEX(i) ((i) * GRANULARITY - EXTRA_BYTES) + # define SMALL_ENOUGH(bytes) (ADD_SLOP(bytes) <= \ + (NFREELISTS-1)*GRANULARITY) + ptr_t ptrfree_freelists[NFREELISTS]; + ptr_t normal_freelists[NFREELISTS]; + # ifdef GC_GCJ_SUPPORT + ptr_t gcj_freelists[NFREELISTS]; + # endif + /* Free lists contain either a pointer or a small count */ + /* reflecting the number of granules allocated at that */ + /* size. */ + /* 0 ==> thread-local allocation in use, free list */ + /* empty. */ + /* > 0, <= DIRECT_GRANULES ==> Using global allocation, */ + /* too few objects of this size have been */ + /* allocated by this thread. */ + /* >= HBLKSIZE => pointer to nonempty free list. */ + /* > DIRECT_GRANULES, < HBLKSIZE ==> transition to */ + /* local alloc, equivalent to 0. */ + # define DIRECT_GRANULES (HBLKSIZE/GRANULARITY) + /* Don't use local free lists for up to this much */ + /* allocation. */ + # endif + } * GC_thread; + + # define THREAD_TABLE_SZ 128 /* Must be power of 2 */ + extern volatile GC_thread GC_threads[THREAD_TABLE_SZ]; + + extern GC_bool GC_thr_initialized; + + GC_thread GC_lookup_thread(pthread_t id); + + void GC_stop_init(); + + #endif /* GC_PTHREADS && !GC_SOLARIS_THREADS.... etc */ + #endif /* GC_PTHREAD_SUPPORT_H */ diff -Nrc3pad gcc-3.3.3/boehm-gc/include/private/solaris_threads.h gcc-3.4.0/boehm-gc/include/private/solaris_threads.h *** gcc-3.3.3/boehm-gc/include/private/solaris_threads.h 2001-10-23 23:21:39.000000000 +0000 --- gcc-3.4.0/boehm-gc/include/private/solaris_threads.h 2003-07-28 04:18:23.000000000 +0000 *************** *** 16,22 **** # define DETACHED 2 /* Thread is intended to be detached. */ # define CLIENT_OWNS_STACK 4 /* Stack was supplied by client. */ ! # define SUSPENDED 8 /* Currently suspended. */ ptr_t stack; size_t stack_size; cond_t join_cv; --- 16,23 ---- # define DETACHED 2 /* Thread is intended to be detached. */ # define CLIENT_OWNS_STACK 4 /* Stack was supplied by client. */ ! # define SUSPNDED 8 /* Currently suspended. */ ! /* SUSPENDED is used insystem header. */ ptr_t stack; size_t stack_size; cond_t join_cv; diff -Nrc3pad gcc-3.3.3/boehm-gc/include/private/specific.h gcc-3.4.0/boehm-gc/include/private/specific.h *** gcc-3.3.3/boehm-gc/include/private/specific.h 2002-03-29 22:52:13.000000000 +0000 --- gcc-3.4.0/boehm-gc/include/private/specific.h 2003-07-28 04:18:23.000000000 +0000 *************** static __inline__ void * PREFIXED(getspe *** 85,91 **** unsigned hash_val = CACHE_HASH(qtid); tse * volatile * entry_ptr = key -> cache + hash_val; tse * entry = *entry_ptr; /* Must be loaded only once. */ ! if (entry -> qtid == qtid) { GC_ASSERT(entry -> thread == pthread_self()); return entry -> value; } --- 85,91 ---- unsigned hash_val = CACHE_HASH(qtid); tse * volatile * entry_ptr = key -> cache + hash_val; tse * entry = *entry_ptr; /* Must be loaded only once. */ ! if (EXPECT(entry -> qtid == qtid, 1)) { GC_ASSERT(entry -> thread == pthread_self()); return entry -> value; } diff -Nrc3pad gcc-3.3.3/boehm-gc/irix_threads.c gcc-3.4.0/boehm-gc/irix_threads.c *** gcc-3.3.3/boehm-gc/irix_threads.c 2002-05-19 17:36:14.000000000 +0000 --- gcc-3.4.0/boehm-gc/irix_threads.c 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,726 **** - /* - * Copyright (c) 1991-1995 by Xerox Corporation. All rights reserved. - * Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved. - * Copyright (c) 1999 by Hewlett-Packard Company. All rights reserved. - * - * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED - * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. - * - * Permission is hereby granted to use or copy this program - * for any purpose, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - */ - /* - * Support code for Irix (>=6.2) Pthreads. This relies on properties - * not guaranteed by the Pthread standard. It may or may not be portable - * to other implementations. - * - * This now also includes an initial attempt at thread support for - * HP/UX 11. - * - * Note that there is a lot of code duplication between linux_threads.c - * and irix_threads.c; any changes made here may need to be reflected - * there too. - */ - - # if defined(GC_IRIX_THREADS) - - # include "private/gc_priv.h" - # include - # include - # include - # include - # include - # include - # include - - #undef pthread_create - #undef pthread_sigmask - #undef pthread_join - #undef pthread_detach - - void GC_thr_init(); - - #if 0 - void GC_print_sig_mask() - { - sigset_t blocked; - int i; - - if (pthread_sigmask(SIG_BLOCK, NULL, &blocked) != 0) - ABORT("pthread_sigmask"); - GC_printf0("Blocked: "); - for (i = 1; i <= MAXSIG; i++) { - if (sigismember(&blocked, i)) { GC_printf1("%ld ",(long) i); } - } - GC_printf0("\n"); - } - #endif - - /* We use the allocation lock to protect thread-related data structures. */ - - /* The set of all known threads. We intercept thread creation and */ - /* joins. We never actually create detached threads. We allocate all */ - /* new thread stacks ourselves. These allow us to maintain this */ - /* data structure. */ - /* Protected by GC_thr_lock. */ - /* Some of this should be declared volatile, but that's incosnsistent */ - /* with some library routine declarations. */ - typedef struct GC_Thread_Rep { - struct GC_Thread_Rep * next; /* More recently allocated threads */ - /* with a given pthread id come */ - /* first. (All but the first are */ - /* guaranteed to be dead, but we may */ - /* not yet have registered the join.) */ - pthread_t id; - word stop; - # define NOT_STOPPED 0 - # define PLEASE_STOP 1 - # define STOPPED 2 - word flags; - # define FINISHED 1 /* Thread has exited. */ - # define DETACHED 2 /* Thread is intended to be detached. */ - # define CLIENT_OWNS_STACK 4 - /* Stack was supplied by client. */ - ptr_t stack; - ptr_t stack_ptr; /* Valid only when stopped. */ - /* But must be within stack region at */ - /* all times. */ - size_t stack_size; /* 0 for original thread. */ - void * status; /* Used only to avoid premature */ - /* reclamation of any data it might */ - /* reference. */ - } * GC_thread; - - GC_thread GC_lookup_thread(pthread_t id); - - /* - * The only way to suspend threads given the pthread interface is to send - * signals. Unfortunately, this means we have to reserve - * a signal, and intercept client calls to change the signal mask. - * We use SIG_SUSPEND, defined in gc_priv.h. - */ - - pthread_mutex_t GC_suspend_lock = PTHREAD_MUTEX_INITIALIZER; - /* Number of threads stopped so far */ - pthread_cond_t GC_suspend_ack_cv = PTHREAD_COND_INITIALIZER; - pthread_cond_t GC_continue_cv = PTHREAD_COND_INITIALIZER; - - void GC_suspend_handler(int sig) - { - int dummy; - GC_thread me; - sigset_t all_sigs; - sigset_t old_sigs; - int i; - - if (sig != SIG_SUSPEND) ABORT("Bad signal in suspend_handler"); - me = GC_lookup_thread(pthread_self()); - /* The lookup here is safe, since I'm doing this on behalf */ - /* of a thread which holds the allocation lock in order */ - /* to stop the world. Thus concurrent modification of the */ - /* data structure is impossible. */ - if (PLEASE_STOP != me -> stop) { - /* Misdirected signal. */ - pthread_mutex_unlock(&GC_suspend_lock); - return; - } - pthread_mutex_lock(&GC_suspend_lock); - me -> stack_ptr = (ptr_t)(&dummy); - me -> stop = STOPPED; - pthread_cond_signal(&GC_suspend_ack_cv); - pthread_cond_wait(&GC_continue_cv, &GC_suspend_lock); - pthread_mutex_unlock(&GC_suspend_lock); - /* GC_printf1("Continuing 0x%x\n", pthread_self()); */ - } - - - GC_bool GC_thr_initialized = FALSE; - - size_t GC_min_stack_sz; - - # define N_FREE_LISTS 25 - ptr_t GC_stack_free_lists[N_FREE_LISTS] = { 0 }; - /* GC_stack_free_lists[i] is free list for stacks of */ - /* size GC_min_stack_sz*2**i. */ - /* Free lists are linked through first word. */ - - /* Return a stack of size at least *stack_size. *stack_size is */ - /* replaced by the actual stack size. */ - /* Caller holds allocation lock. */ - ptr_t GC_stack_alloc(size_t * stack_size) - { - register size_t requested_sz = *stack_size; - register size_t search_sz = GC_min_stack_sz; - register int index = 0; /* = log2(search_sz/GC_min_stack_sz) */ - register ptr_t result; - - while (search_sz < requested_sz) { - search_sz *= 2; - index++; - } - if ((result = GC_stack_free_lists[index]) == 0 - && (result = GC_stack_free_lists[index+1]) != 0) { - /* Try next size up. */ - search_sz *= 2; index++; - } - if (result != 0) { - GC_stack_free_lists[index] = *(ptr_t *)result; - } else { - result = (ptr_t) GC_scratch_alloc(search_sz + 2*GC_page_size); - result = (ptr_t)(((word)result + GC_page_size) & ~(GC_page_size - 1)); - /* Protect hottest page to detect overflow. */ - # ifdef STACK_GROWS_UP - /* mprotect(result + search_sz, GC_page_size, PROT_NONE); */ - # else - /* mprotect(result, GC_page_size, PROT_NONE); */ - result += GC_page_size; - # endif - } - *stack_size = search_sz; - return(result); - } - - /* Caller holds allocation lock. */ - void GC_stack_free(ptr_t stack, size_t size) - { - register int index = 0; - register size_t search_sz = GC_min_stack_sz; - - while (search_sz < size) { - search_sz *= 2; - index++; - } - if (search_sz != size) ABORT("Bad stack size"); - *(ptr_t *)stack = GC_stack_free_lists[index]; - GC_stack_free_lists[index] = stack; - } - - - - # define THREAD_TABLE_SZ 128 /* Must be power of 2 */ - volatile GC_thread GC_threads[THREAD_TABLE_SZ]; - - void GC_push_thread_structures GC_PROTO((void)) - { - GC_push_all((ptr_t)(GC_threads), (ptr_t)(GC_threads)+sizeof(GC_threads)); - } - - /* Add a thread to GC_threads. We assume it wasn't already there. */ - /* Caller holds allocation lock. */ - GC_thread GC_new_thread(pthread_t id) - { - int hv = ((word)id) % THREAD_TABLE_SZ; - GC_thread result; - static struct GC_Thread_Rep first_thread; - static GC_bool first_thread_used = FALSE; - - if (!first_thread_used) { - result = &first_thread; - first_thread_used = TRUE; - /* Dont acquire allocation lock, since we may already hold it. */ - } else { - result = (struct GC_Thread_Rep *) - GC_INTERNAL_MALLOC(sizeof(struct GC_Thread_Rep), NORMAL); - } - if (result == 0) return(0); - result -> id = id; - result -> next = GC_threads[hv]; - GC_threads[hv] = result; - /* result -> flags = 0; */ - /* result -> stop = 0; */ - return(result); - } - - /* Delete a thread from GC_threads. We assume it is there. */ - /* (The code intentionally traps if it wasn't.) */ - /* Caller holds allocation lock. */ - void GC_delete_thread(pthread_t id) - { - int hv = ((word)id) % THREAD_TABLE_SZ; - register GC_thread p = GC_threads[hv]; - register GC_thread prev = 0; - - while (!pthread_equal(p -> id, id)) { - prev = p; - p = p -> next; - } - if (prev == 0) { - GC_threads[hv] = p -> next; - } else { - prev -> next = p -> next; - } - } - - /* If a thread has been joined, but we have not yet */ - /* been notified, then there may be more than one thread */ - /* in the table with the same pthread id. */ - /* This is OK, but we need a way to delete a specific one. */ - void GC_delete_gc_thread(pthread_t id, GC_thread gc_id) - { - int hv = ((word)id) % THREAD_TABLE_SZ; - register GC_thread p = GC_threads[hv]; - register GC_thread prev = 0; - - while (p != gc_id) { - prev = p; - p = p -> next; - } - if (prev == 0) { - GC_threads[hv] = p -> next; - } else { - prev -> next = p -> next; - } - } - - /* Return a GC_thread corresponding to a given thread_t. */ - /* Returns 0 if it's not there. */ - /* Caller holds allocation lock or otherwise inhibits */ - /* updates. */ - /* If there is more than one thread with the given id we */ - /* return the most recent one. */ - GC_thread GC_lookup_thread(pthread_t id) - { - int hv = ((word)id) % THREAD_TABLE_SZ; - register GC_thread p = GC_threads[hv]; - - while (p != 0 && !pthread_equal(p -> id, id)) p = p -> next; - return(p); - } - - - /* Caller holds allocation lock. */ - void GC_stop_world() - { - pthread_t my_thread = pthread_self(); - register int i; - register GC_thread p; - register int result; - struct timespec timeout; - - for (i = 0; i < THREAD_TABLE_SZ; i++) { - for (p = GC_threads[i]; p != 0; p = p -> next) { - if (p -> id != my_thread) { - if (p -> flags & FINISHED) { - p -> stop = STOPPED; - continue; - } - p -> stop = PLEASE_STOP; - result = pthread_kill(p -> id, SIG_SUSPEND); - /* GC_printf1("Sent signal to 0x%x\n", p -> id); */ - switch(result) { - case ESRCH: - /* Not really there anymore. Possible? */ - p -> stop = STOPPED; - break; - case 0: - break; - default: - ABORT("pthread_kill failed"); - } - } - } - } - pthread_mutex_lock(&GC_suspend_lock); - for (i = 0; i < THREAD_TABLE_SZ; i++) { - for (p = GC_threads[i]; p != 0; p = p -> next) { - while (p -> id != my_thread && p -> stop != STOPPED) { - clock_gettime(CLOCK_REALTIME, &timeout); - timeout.tv_nsec += 50000000; /* 50 msecs */ - if (timeout.tv_nsec >= 1000000000) { - timeout.tv_nsec -= 1000000000; - ++timeout.tv_sec; - } - result = pthread_cond_timedwait(&GC_suspend_ack_cv, - &GC_suspend_lock, - &timeout); - if (result == ETIMEDOUT) { - /* Signal was lost or misdirected. Try again. */ - /* Duplicate signals should be benign. */ - result = pthread_kill(p -> id, SIG_SUSPEND); - } - } - } - } - pthread_mutex_unlock(&GC_suspend_lock); - /* GC_printf1("World stopped 0x%x\n", pthread_self()); */ - } - - /* Caller holds allocation lock. */ - void GC_start_world() - { - GC_thread p; - unsigned i; - - /* GC_printf0("World starting\n"); */ - for (i = 0; i < THREAD_TABLE_SZ; i++) { - for (p = GC_threads[i]; p != 0; p = p -> next) { - p -> stop = NOT_STOPPED; - } - } - pthread_mutex_lock(&GC_suspend_lock); - /* All other threads are at pthread_cond_wait in signal handler. */ - /* Otherwise we couldn't have acquired the lock. */ - pthread_mutex_unlock(&GC_suspend_lock); - pthread_cond_broadcast(&GC_continue_cv); - } - - # ifdef MMAP_STACKS - --> not really supported yet. - int GC_is_thread_stack(ptr_t addr) - { - register int i; - register GC_thread p; - - for (i = 0; i < THREAD_TABLE_SZ; i++) { - for (p = GC_threads[i]; p != 0; p = p -> next) { - if (p -> stack_size != 0) { - if (p -> stack <= addr && - addr < p -> stack + p -> stack_size) - return 1; - } - } - } - return 0; - } - # endif - - /* We hold allocation lock. Should do exactly the right thing if the */ - /* world is stopped. Should not fail if it isn't. */ - void GC_push_all_stacks() - { - register int i; - register GC_thread p; - register ptr_t sp = GC_approx_sp(); - register ptr_t hot, cold; - pthread_t me = pthread_self(); - - if (!GC_thr_initialized) GC_thr_init(); - /* GC_printf1("Pushing stacks from thread 0x%x\n", me); */ - for (i = 0; i < THREAD_TABLE_SZ; i++) { - for (p = GC_threads[i]; p != 0; p = p -> next) { - if (p -> flags & FINISHED) continue; - if (pthread_equal(p -> id, me)) { - hot = GC_approx_sp(); - } else { - hot = p -> stack_ptr; - } - if (p -> stack_size != 0) { - # ifdef STACK_GROWS_UP - cold = p -> stack; - # else - cold = p -> stack + p -> stack_size; - # endif - } else { - /* The original stack. */ - cold = GC_stackbottom; - } - # ifdef STACK_GROWS_UP - GC_push_all_stack(cold, hot); - # else - GC_push_all_stack(hot, cold); - # endif - } - } - } - - - /* We hold the allocation lock. */ - void GC_thr_init() - { - GC_thread t; - struct sigaction act; - - if (GC_thr_initialized) return; - GC_thr_initialized = TRUE; - GC_min_stack_sz = HBLKSIZE; - (void) sigaction(SIG_SUSPEND, 0, &act); - if (act.sa_handler != SIG_DFL) - ABORT("Previously installed SIG_SUSPEND handler"); - /* Install handler. */ - act.sa_handler = GC_suspend_handler; - act.sa_flags = SA_RESTART; - (void) sigemptyset(&act.sa_mask); - if (0 != sigaction(SIG_SUSPEND, &act, 0)) - ABORT("Failed to install SIG_SUSPEND handler"); - /* Add the initial thread, so we can stop it. */ - t = GC_new_thread(pthread_self()); - t -> stack_size = 0; - t -> stack_ptr = (ptr_t)(&t); - t -> flags = DETACHED; - } - - int GC_pthread_sigmask(int how, const sigset_t *set, sigset_t *oset) - { - sigset_t fudged_set; - - if (set != NULL && (how == SIG_BLOCK || how == SIG_SETMASK)) { - fudged_set = *set; - sigdelset(&fudged_set, SIG_SUSPEND); - set = &fudged_set; - } - return(pthread_sigmask(how, set, oset)); - } - - struct start_info { - void *(*start_routine)(void *); - void *arg; - word flags; - ptr_t stack; - size_t stack_size; - sem_t registered; /* 1 ==> in our thread table, but */ - /* parent hasn't yet noticed. */ - }; - - void GC_thread_exit_proc(void *arg) - { - GC_thread me; - - LOCK(); - me = GC_lookup_thread(pthread_self()); - if (me -> flags & DETACHED) { - GC_delete_thread(pthread_self()); - } else { - me -> flags |= FINISHED; - } - UNLOCK(); - } - - int GC_pthread_join(pthread_t thread, void **retval) - { - int result; - GC_thread thread_gc_id; - - LOCK(); - thread_gc_id = GC_lookup_thread(thread); - /* This is guaranteed to be the intended one, since the thread id */ - /* cant have been recycled by pthreads. */ - UNLOCK(); - result = pthread_join(thread, retval); - /* Some versions of the Irix pthreads library can erroneously */ - /* return EINTR when the call succeeds. */ - if (EINTR == result) result = 0; - if (result == 0) { - LOCK(); - /* Here the pthread thread id may have been recycled. */ - GC_delete_gc_thread(thread, thread_gc_id); - UNLOCK(); - } - return result; - } - - int GC_pthread_detach(pthread_t thread) - { - int result; - GC_thread thread_gc_id; - - LOCK(); - thread_gc_id = GC_lookup_thread(thread); - UNLOCK(); - result = pthread_detach(thread); - if (result == 0) { - LOCK(); - thread_gc_id -> flags |= DETACHED; - /* Here the pthread thread id may have been recycled. */ - if (thread_gc_id -> flags & FINISHED) { - GC_delete_gc_thread(thread, thread_gc_id); - } - UNLOCK(); - } - return result; - } - - void * GC_start_routine(void * arg) - { - struct start_info * si = arg; - void * result; - GC_thread me; - pthread_t my_pthread; - void *(*start)(void *); - void *start_arg; - - my_pthread = pthread_self(); - /* If a GC occurs before the thread is registered, that GC will */ - /* ignore this thread. That's fine, since it will block trying to */ - /* acquire the allocation lock, and won't yet hold interesting */ - /* pointers. */ - LOCK(); - /* We register the thread here instead of in the parent, so that */ - /* we don't need to hold the allocation lock during pthread_create. */ - /* Holding the allocation lock there would make REDIRECT_MALLOC */ - /* impossible. It probably still doesn't work, but we're a little */ - /* closer ... */ - /* This unfortunately means that we have to be careful the parent */ - /* doesn't try to do a pthread_join before we're registered. */ - me = GC_new_thread(my_pthread); - me -> flags = si -> flags; - me -> stack = si -> stack; - me -> stack_size = si -> stack_size; - me -> stack_ptr = (ptr_t)si -> stack + si -> stack_size - sizeof(word); - UNLOCK(); - start = si -> start_routine; - start_arg = si -> arg; - sem_post(&(si -> registered)); - pthread_cleanup_push(GC_thread_exit_proc, 0); - result = (*start)(start_arg); - me -> status = result; - me -> flags |= FINISHED; - pthread_cleanup_pop(1); - /* This involves acquiring the lock, ensuring that we can't exit */ - /* while a collection that thinks we're alive is trying to stop */ - /* us. */ - return(result); - } - - # define copy_attr(pa_ptr, source) *(pa_ptr) = *(source) - - int - GC_pthread_create(pthread_t *new_thread, - const pthread_attr_t *attr, - void *(*start_routine)(void *), void *arg) - { - int result; - GC_thread t; - void * stack; - size_t stacksize; - pthread_attr_t new_attr; - int detachstate; - word my_flags = 0; - struct start_info * si = GC_malloc(sizeof(struct start_info)); - /* This is otherwise saved only in an area mmapped by the thread */ - /* library, which isn't visible to the collector. */ - - if (0 == si) return(ENOMEM); - if (0 != sem_init(&(si -> registered), 0, 0)) { - ABORT("sem_init failed"); - } - si -> start_routine = start_routine; - si -> arg = arg; - LOCK(); - if (!GC_is_initialized) GC_init(); - if (NULL == attr) { - stack = 0; - (void) pthread_attr_init(&new_attr); - } else { - copy_attr(&new_attr, attr); - pthread_attr_getstackaddr(&new_attr, &stack); - } - pthread_attr_getstacksize(&new_attr, &stacksize); - pthread_attr_getdetachstate(&new_attr, &detachstate); - if (stacksize < GC_min_stack_sz) ABORT("Stack too small"); - if (0 == stack) { - stack = (void *)GC_stack_alloc(&stacksize); - if (0 == stack) { - UNLOCK(); - return(ENOMEM); - } - pthread_attr_setstackaddr(&new_attr, stack); - } else { - my_flags |= CLIENT_OWNS_STACK; - } - if (PTHREAD_CREATE_DETACHED == detachstate) my_flags |= DETACHED; - si -> flags = my_flags; - si -> stack = stack; - si -> stack_size = stacksize; - result = pthread_create(new_thread, &new_attr, GC_start_routine, si); - if (0 == new_thread && !(my_flags & CLIENT_OWNS_STACK)) { - GC_stack_free(stack, stacksize); - } - UNLOCK(); - /* Wait until child has been added to the thread table. */ - /* This also ensures that we hold onto si until the child is done */ - /* with it. Thus it doesn't matter whether it is otherwise */ - /* visible to the collector. */ - while (0 != sem_wait(&(si -> registered))) { - if (errno != EINTR) { - GC_printf1("Sem_wait: errno = %ld\n", (unsigned long) errno); - ABORT("sem_wait failed"); - } - } - sem_destroy(&(si -> registered)); - pthread_attr_destroy(&new_attr); /* Probably unnecessary under Irix */ - return(result); - } - - VOLATILE GC_bool GC_collecting = 0; - /* A hint that we're in the collector and */ - /* holding the allocation lock for an */ - /* extended period. */ - - /* Reasonably fast spin locks. Basically the same implementation */ - /* as STL alloc.h. */ - - #define SLEEP_THRESHOLD 3 - - unsigned long GC_allocate_lock = 0; - # define GC_TRY_LOCK() !GC_test_and_set(&GC_allocate_lock) - # define GC_LOCK_TAKEN GC_allocate_lock - - void GC_lock() - { - # define low_spin_max 30 /* spin cycles if we suspect uniprocessor */ - # define high_spin_max 1000 /* spin cycles for multiprocessor */ - static unsigned spin_max = low_spin_max; - unsigned my_spin_max; - static unsigned last_spins = 0; - unsigned my_last_spins; - volatile unsigned junk; - # define PAUSE junk *= junk; junk *= junk; junk *= junk; junk *= junk - int i; - - if (GC_TRY_LOCK()) { - return; - } - junk = 0; - my_spin_max = spin_max; - my_last_spins = last_spins; - for (i = 0; i < my_spin_max; i++) { - if (GC_collecting) goto yield; - if (i < my_last_spins/2 || GC_LOCK_TAKEN) { - PAUSE; - continue; - } - if (GC_TRY_LOCK()) { - /* - * got it! - * Spinning worked. Thus we're probably not being scheduled - * against the other process with which we were contending. - * Thus it makes sense to spin longer the next time. - */ - last_spins = i; - spin_max = high_spin_max; - return; - } - } - /* We are probably being scheduled against the other process. Sleep. */ - spin_max = low_spin_max; - yield: - for (i = 0;; ++i) { - if (GC_TRY_LOCK()) { - return; - } - if (i < SLEEP_THRESHOLD) { - sched_yield(); - } else { - struct timespec ts; - - if (i > 26) i = 26; - /* Don't wait for more than about 60msecs, even */ - /* under extreme contention. */ - ts.tv_sec = 0; - ts.tv_nsec = 1 << i; - nanosleep(&ts, 0); - } - } - } - - # else - - #ifndef LINT - int GC_no_Irix_threads; - #endif - - # endif /* GC_IRIX_THREADS */ - --- 0 ---- diff -Nrc3pad gcc-3.3.3/boehm-gc/linux_threads.c gcc-3.4.0/boehm-gc/linux_threads.c *** gcc-3.3.3/boehm-gc/linux_threads.c 2002-03-29 22:52:12.000000000 +0000 --- gcc-3.4.0/boehm-gc/linux_threads.c 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,1735 **** - /* - * Copyright (c) 1994 by Xerox Corporation. All rights reserved. - * Copyright (c) 1996 by Silicon Graphics. All rights reserved. - * Copyright (c) 1998 by Fergus Henderson. All rights reserved. - * Copyright (c) 2000-2001 by Hewlett-Packard Company. All rights reserved. - * - * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED - * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. - * - * Permission is hereby granted to use or copy this program - * for any purpose, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - */ - /* - * Support code for LinuxThreads, the clone()-based kernel - * thread package for Linux which is included in libc6. - * - * This code relies on implementation details of LinuxThreads, - * (i.e. properties not guaranteed by the Pthread standard), - * though this version now does less of that than the other Pthreads - * support code. - * - * Note that there is a lot of code duplication between linux_threads.c - * and thread support for some of the other Posix platforms; any changes - * made here may need to be reflected there too. - */ - /* - * Linux_threads.c now also includes some code to support HPUX and - * OSF1 (Compaq Tru64 Unix, really). The OSF1 support is not yet - * functional. The OSF1 code is based on Eric Benson's - * patch, though that was originally against hpux_irix_threads. The code - * here is completely untested. With 0.0000001% probability, it might - * actually work. - * - * Eric also suggested an alternate basis for a lock implementation in - * his code: - * + #elif defined(OSF1) - * + unsigned long GC_allocate_lock = 0; - * + msemaphore GC_allocate_semaphore; - * + # define GC_TRY_LOCK() \ - * + ((msem_lock(&GC_allocate_semaphore, MSEM_IF_NOWAIT) == 0) \ - * + ? (GC_allocate_lock = 1) \ - * + : 0) - * + # define GC_LOCK_TAKEN GC_allocate_lock - */ - - /* #define DEBUG_THREADS 1 */ - - /* ANSI C requires that a compilation unit contains something */ - - # include "gc.h" - - # if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \ - && !defined(GC_IRIX_THREADS) - - # include "private/gc_priv.h" - - # if defined(GC_HPUX_THREADS) && !defined(USE_PTHREAD_SPECIFIC) \ - && !defined(USE_HPUX_TLS) - # define USE_HPUX_TLS - # endif - - # ifdef THREAD_LOCAL_ALLOC - # if !defined(USE_PTHREAD_SPECIFIC) && !defined(USE_HPUX_TLS) - # include "private/specific.h" - # endif - # if defined(USE_PTHREAD_SPECIFIC) - # define GC_getspecific pthread_getspecific - # define GC_setspecific pthread_setspecific - # define GC_key_create pthread_key_create - typedef pthread_key_t GC_key_t; - # endif - # if defined(USE_HPUX_TLS) - # define GC_getspecific(x) (x) - # define GC_setspecific(key, v) ((key) = (v), 0) - # define GC_key_create(key, d) 0 - typedef void * GC_key_t; - # endif - # endif - # include - # include - # include - # include - # include - # include - # include - # include - # include - # include - # include - # include - # include - - #ifndef __GNUC__ - # define __inline__ - #endif - - #ifdef GC_USE_LD_WRAP - # define WRAP_FUNC(f) __wrap_##f - # define REAL_FUNC(f) __real_##f - #else - # define WRAP_FUNC(f) GC_##f - # define REAL_FUNC(f) f - # undef pthread_create - # undef pthread_sigmask - # undef pthread_join - # undef pthread_detach - #endif - - - void GC_thr_init(); - - #if 0 - void GC_print_sig_mask() - { - sigset_t blocked; - int i; - - if (pthread_sigmask(SIG_BLOCK, NULL, &blocked) != 0) - ABORT("pthread_sigmask"); - GC_printf0("Blocked: "); - for (i = 1; i <= MAXSIG; i++) { - if (sigismember(&blocked, i)) { GC_printf1("%ld ",(long) i); } - } - GC_printf0("\n"); - } - #endif - - - /* We use the allocation lock to protect thread-related data structures. */ - - /* The set of all known threads. We intercept thread creation and */ - /* joins. */ - /* Protected by allocation/GC lock. */ - /* Some of this should be declared volatile, but that's inconsistent */ - /* with some library routine declarations. */ - typedef struct GC_Thread_Rep { - struct GC_Thread_Rep * next; /* More recently allocated threads */ - /* with a given pthread id come */ - /* first. (All but the first are */ - /* guaranteed to be dead, but we may */ - /* not yet have registered the join.) */ - pthread_t id; - short flags; - # define FINISHED 1 /* Thread has exited. */ - # define DETACHED 2 /* Thread is intended to be detached. */ - # define MAIN_THREAD 4 /* True for the original thread only. */ - short thread_blocked; /* Protected by GC lock. */ - /* Treated as a boolean value. If set, */ - /* thread will acquire GC lock before */ - /* doing any pointer manipulations, and */ - /* has set its sp value. Thus it does */ - /* not need to be sent a signal to stop */ - /* it. */ - ptr_t stack_end; /* Cold end of the stack. */ - ptr_t stack_ptr; /* Valid only when stopped. */ - # ifdef IA64 - ptr_t backing_store_end; - ptr_t backing_store_ptr; - # endif - int signal; - void * status; /* The value returned from the thread. */ - /* Used only to avoid premature */ - /* reclamation of any data it might */ - /* reference. */ - # ifdef THREAD_LOCAL_ALLOC - # if CPP_WORDSZ == 64 && defined(ALIGN_DOUBLE) - # define GRANULARITY 16 - # define NFREELISTS 49 - # else - # define GRANULARITY 8 - # define NFREELISTS 65 - # endif - /* The ith free list corresponds to size i*GRANULARITY */ - # define INDEX_FROM_BYTES(n) ((ADD_SLOP(n) + GRANULARITY - 1)/GRANULARITY) - # define BYTES_FROM_INDEX(i) ((i) * GRANULARITY - EXTRA_BYTES) - # define SMALL_ENOUGH(bytes) (ADD_SLOP(bytes) <= \ - (NFREELISTS-1)*GRANULARITY) - ptr_t ptrfree_freelists[NFREELISTS]; - ptr_t normal_freelists[NFREELISTS]; - # ifdef GC_GCJ_SUPPORT - ptr_t gcj_freelists[NFREELISTS]; - # endif - /* Free lists contain either a pointer or a small count */ - /* reflecting the number of granules allocated at that */ - /* size. */ - /* 0 ==> thread-local allocation in use, free list */ - /* empty. */ - /* > 0, <= DIRECT_GRANULES ==> Using global allocation, */ - /* too few objects of this size have been */ - /* allocated by this thread. */ - /* >= HBLKSIZE => pointer to nonempty free list. */ - /* > DIRECT_GRANULES, < HBLKSIZE ==> transition to */ - /* local alloc, equivalent to 0. */ - # define DIRECT_GRANULES (HBLKSIZE/GRANULARITY) - /* Don't use local free lists for up to this much */ - /* allocation. */ - # endif - } * GC_thread; - - GC_thread GC_lookup_thread(pthread_t id); - - static GC_bool parallel_initialized = FALSE; - - void GC_init_parallel(); - - # if defined(THREAD_LOCAL_ALLOC) && !defined(DBG_HDRS_ALL) - - /* We don't really support thread-local allocation with DBG_HDRS_ALL */ - - #ifdef USE_HPUX_TLS - __thread - #endif - GC_key_t GC_thread_key; - - static GC_bool keys_initialized; - - /* Recover the contents of the freelist array fl into the global one gfl.*/ - /* Note that the indexing scheme differs, in that gfl has finer size */ - /* resolution, even if not all entries are used. */ - /* We hold the allocator lock. */ - static void return_freelists(ptr_t *fl, ptr_t *gfl) - { - int i; - ptr_t q, *qptr; - size_t nwords; - - for (i = 1; i < NFREELISTS; ++i) { - nwords = i * (GRANULARITY/sizeof(word)); - qptr = fl + i; - q = *qptr; - if ((word)q >= HBLKSIZE) { - if (gfl[nwords] == 0) { - gfl[nwords] = q; - } else { - /* Concatenate: */ - for (; (word)q >= HBLKSIZE; qptr = &(obj_link(q)), q = *qptr); - GC_ASSERT(0 == q); - *qptr = gfl[nwords]; - gfl[nwords] = fl[i]; - } - } - /* Clear fl[i], since the thread structure may hang around. */ - /* Do it in a way that is likely to trap if we access it. */ - fl[i] = (ptr_t)HBLKSIZE; - } - } - - /* We statically allocate a single "size 0" object. It is linked to */ - /* itself, and is thus repeatedly reused for all size 0 allocation */ - /* requests. (Size 0 gcj allocation requests are incorrect, and */ - /* we arrange for those to fault asap.) */ - static ptr_t size_zero_object = (ptr_t)(&size_zero_object); - - /* Each thread structure must be initialized. */ - /* This call must be made from the new thread. */ - /* Caller holds allocation lock. */ - void GC_init_thread_local(GC_thread p) - { - int i; - - if (!keys_initialized) { - if (0 != GC_key_create(&GC_thread_key, 0)) { - ABORT("Failed to create key for local allocator"); - } - keys_initialized = TRUE; - } - if (0 != GC_setspecific(GC_thread_key, p)) { - ABORT("Failed to set thread specific allocation pointers"); - } - for (i = 1; i < NFREELISTS; ++i) { - p -> ptrfree_freelists[i] = (ptr_t)1; - p -> normal_freelists[i] = (ptr_t)1; - # ifdef GC_GCJ_SUPPORT - p -> gcj_freelists[i] = (ptr_t)1; - # endif - } - /* Set up the size 0 free lists. */ - p -> ptrfree_freelists[0] = (ptr_t)(&size_zero_object); - p -> normal_freelists[0] = (ptr_t)(&size_zero_object); - # ifdef GC_GCJ_SUPPORT - p -> gcj_freelists[0] = (ptr_t)(-1); - # endif - } - - #ifdef GC_GCJ_SUPPORT - extern ptr_t * GC_gcjobjfreelist; - #endif - - /* We hold the allocator lock. */ - void GC_destroy_thread_local(GC_thread p) - { - /* We currently only do this from the thread itself. */ - GC_ASSERT(GC_getspecific(GC_thread_key) == (void *)p); - return_freelists(p -> ptrfree_freelists, GC_aobjfreelist); - return_freelists(p -> normal_freelists, GC_objfreelist); - # ifdef GC_GCJ_SUPPORT - return_freelists(p -> gcj_freelists, GC_gcjobjfreelist); - # endif - } - - extern GC_PTR GC_generic_malloc_many(); - - GC_PTR GC_local_malloc(size_t bytes) - { - if (EXPECT(!SMALL_ENOUGH(bytes),0)) { - return(GC_malloc(bytes)); - } else { - int index = INDEX_FROM_BYTES(bytes); - ptr_t * my_fl; - ptr_t my_entry; - GC_key_t k = GC_thread_key; - void * tsd; - - # if defined(REDIRECT_MALLOC) && !defined(USE_PTHREAD_SPECIFIC) \ - || !defined(__GNUC__) - if (EXPECT(0 == k, 0)) { - /* This can happen if we get called when the world is */ - /* being initialized. Whether we can actually complete */ - /* the initialization then is unclear. */ - GC_init_parallel(); - k = GC_thread_key; - } - # endif - tsd = GC_getspecific(GC_thread_key); - # ifdef GC_ASSERTIONS - LOCK(); - GC_ASSERT(tsd == (void *)GC_lookup_thread(pthread_self())); - UNLOCK(); - # endif - my_fl = ((GC_thread)tsd) -> normal_freelists + index; - my_entry = *my_fl; - if (EXPECT((word)my_entry >= HBLKSIZE, 1)) { - ptr_t next = obj_link(my_entry); - GC_PTR result = (GC_PTR)my_entry; - *my_fl = next; - obj_link(my_entry) = 0; - PREFETCH_FOR_WRITE(next); - return result; - } else if ((word)my_entry - 1 < DIRECT_GRANULES) { - *my_fl = my_entry + index + 1; - return GC_malloc(bytes); - } else { - GC_generic_malloc_many(BYTES_FROM_INDEX(index), NORMAL, my_fl); - if (*my_fl == 0) return GC_oom_fn(bytes); - return GC_local_malloc(bytes); - } - } - } - - GC_PTR GC_local_malloc_atomic(size_t bytes) - { - if (EXPECT(!SMALL_ENOUGH(bytes), 0)) { - return(GC_malloc_atomic(bytes)); - } else { - int index = INDEX_FROM_BYTES(bytes); - ptr_t * my_fl = ((GC_thread)GC_getspecific(GC_thread_key)) - -> ptrfree_freelists + index; - ptr_t my_entry = *my_fl; - if (EXPECT((word)my_entry >= HBLKSIZE, 1)) { - GC_PTR result = (GC_PTR)my_entry; - *my_fl = obj_link(my_entry); - return result; - } else if ((word)my_entry - 1 < DIRECT_GRANULES) { - *my_fl = my_entry + index + 1; - return GC_malloc_atomic(bytes); - } else { - GC_generic_malloc_many(BYTES_FROM_INDEX(index), PTRFREE, my_fl); - /* *my_fl is updated while the collector is excluded; */ - /* the free list is always visible to the collector as */ - /* such. */ - if (*my_fl == 0) return GC_oom_fn(bytes); - return GC_local_malloc_atomic(bytes); - } - } - } - - #ifdef GC_GCJ_SUPPORT - - #include "include/gc_gcj.h" - - #ifdef GC_ASSERTIONS - extern GC_bool GC_gcj_malloc_initialized; - #endif - - extern int GC_gcj_kind; - - GC_PTR GC_local_gcj_malloc(size_t bytes, - void * ptr_to_struct_containing_descr) - { - GC_ASSERT(GC_gcj_malloc_initialized); - if (EXPECT(!SMALL_ENOUGH(bytes), 0)) { - return GC_gcj_malloc(bytes, ptr_to_struct_containing_descr); - } else { - int index = INDEX_FROM_BYTES(bytes); - ptr_t * my_fl = ((GC_thread)GC_getspecific(GC_thread_key)) - -> gcj_freelists + index; - ptr_t my_entry = *my_fl; - if (EXPECT((word)my_entry >= HBLKSIZE, 1)) { - GC_PTR result = (GC_PTR)my_entry; - GC_ASSERT(!GC_incremental); - /* We assert that any concurrent marker will stop us. */ - /* Thus it is impossible for a mark procedure to see the */ - /* allocation of the next object, but to see this object */ - /* still containing a free list pointer. Otherwise the */ - /* marker might find a random "mark descriptor". */ - *(volatile ptr_t *)my_fl = obj_link(my_entry); - /* We must update the freelist before we store the pointer. */ - /* Otherwise a GC at this point would see a corrupted */ - /* free list. */ - /* A memory barrier is probably never needed, since the */ - /* action of stopping this thread will cause prior writes */ - /* to complete. */ - GC_ASSERT(((void * volatile *)result)[1] == 0); - *(void * volatile *)result = ptr_to_struct_containing_descr; - return result; - } else if ((word)my_entry - 1 < DIRECT_GRANULES) { - *my_fl = my_entry + index + 1; - return GC_gcj_malloc(bytes, ptr_to_struct_containing_descr); - } else { - GC_generic_malloc_many(BYTES_FROM_INDEX(index), GC_gcj_kind, my_fl); - if (*my_fl == 0) return GC_oom_fn(bytes); - return GC_local_gcj_malloc(bytes, ptr_to_struct_containing_descr); - } - } - } - - #endif /* GC_GCJ_SUPPORT */ - - # else /* !THREAD_LOCAL_ALLOC && !DBG_HDRS_ALL */ - - # define GC_destroy_thread_local(t) - - # endif /* !THREAD_LOCAL_ALLOC */ - - /* - * We use signals to stop threads during GC. - * - * Suspended threads wait in signal handler for SIG_THR_RESTART. - * That's more portable than semaphores or condition variables. - * (We do use sem_post from a signal handler, but that should be portable.) - * - * The thread suspension signal SIG_SUSPEND is now defined in gc_priv.h. - * Note that we can't just stop a thread; we need it to save its stack - * pointer(s) and acknowledge. - */ - - #ifndef SIG_THR_RESTART - # if defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) - # define SIG_THR_RESTART _SIGRTMIN + 5 - # else - # define SIG_THR_RESTART SIGXCPU - # endif - #endif - - sem_t GC_suspend_ack_sem; - - #if 0 - /* - To make sure that we're using LinuxThreads and not some other thread - package, we generate a dummy reference to `pthread_kill_other_threads_np' - (was `__pthread_initial_thread_bos' but that disappeared), - which is a symbol defined in LinuxThreads, but (hopefully) not in other - thread packages. - - We no longer do this, since this code is now portable enough that it might - actually work for something else. - */ - void (*dummy_var_to_force_linux_threads)() = pthread_kill_other_threads_np; - #endif /* 0 */ - - #if defined(SPARC) || defined(IA64) - extern word GC_save_regs_in_stack(); - #endif - - long GC_nprocs = 1; /* Number of processors. We may not have */ - /* access to all of them, but this is as good */ - /* a guess as any ... */ - - #ifdef PARALLEL_MARK - - # ifndef MAX_MARKERS - # define MAX_MARKERS 16 - # endif - - static ptr_t marker_sp[MAX_MARKERS] = {0}; - - void * GC_mark_thread(void * id) - { - word my_mark_no = 0; - - marker_sp[(word)id] = GC_approx_sp(); - for (;; ++my_mark_no) { - /* GC_mark_no is passed only to allow GC_help_marker to terminate */ - /* promptly. This is important if it were called from the signal */ - /* handler or from the GC lock acquisition code. Under Linux, it's */ - /* not safe to call it from a signal handler, since it uses mutexes */ - /* and condition variables. Since it is called only here, the */ - /* argument is unnecessary. */ - if (my_mark_no < GC_mark_no || my_mark_no > GC_mark_no + 2) { - /* resynchronize if we get far off, e.g. because GC_mark_no */ - /* wrapped. */ - my_mark_no = GC_mark_no; - } - # ifdef DEBUG_THREADS - GC_printf1("Starting mark helper for mark number %ld\n", my_mark_no); - # endif - GC_help_marker(my_mark_no); - } - } - - extern long GC_markers; /* Number of mark threads we would */ - /* like to have. Includes the */ - /* initiating thread. */ - - pthread_t GC_mark_threads[MAX_MARKERS]; - - #define PTHREAD_CREATE REAL_FUNC(pthread_create) - - static void start_mark_threads() - { - unsigned i; - pthread_attr_t attr; - - if (GC_markers > MAX_MARKERS) { - WARN("Limiting number of mark threads\n", 0); - GC_markers = MAX_MARKERS; - } - if (0 != pthread_attr_init(&attr)) ABORT("pthread_attr_init failed"); - - if (0 != pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED)) - ABORT("pthread_attr_setdetachstate failed"); - - # ifdef HPUX - /* Default stack size is usually too small: fix it. */ - /* Otherwise marker threads or GC may run out of */ - /* space. */ - # define MIN_STACK_SIZE (8*HBLKSIZE*sizeof(word)) - { - size_t old_size; - int code; - - if (pthread_attr_getstacksize(&attr, &old_size) != 0) - ABORT("pthread_attr_getstacksize failed\n"); - if (old_size < MIN_STACK_SIZE) { - if (pthread_attr_setstacksize(&attr, MIN_STACK_SIZE) != 0) - ABORT("pthread_attr_setstacksize failed\n"); - } - } - # endif /* HPUX */ - # ifdef CONDPRINT - if (GC_print_stats) { - GC_printf1("Starting %ld marker threads\n", GC_markers - 1); - } - # endif - for (i = 0; i < GC_markers - 1; ++i) { - if (0 != PTHREAD_CREATE(GC_mark_threads + i, &attr, - GC_mark_thread, (void *)(word)i)) { - WARN("Marker thread creation failed, errno = %ld.\n", errno); - } - } - } - - #else /* !PARALLEL_MARK */ - - static __inline__ void start_mark_threads() - { - } - - #endif /* !PARALLEL_MARK */ - - void GC_suspend_handler(int sig) - { - int dummy; - pthread_t my_thread = pthread_self(); - GC_thread me; - sigset_t all_sigs; - sigset_t old_sigs; - int i; - sigset_t mask; - # ifdef PARALLEL_MARK - word my_mark_no = GC_mark_no; - /* Marker can't proceed until we acknowledge. Thus this is */ - /* guaranteed to be the mark_no correspending to our */ - /* suspension, i.e. the marker can't have incremented it yet. */ - # endif - - if (sig != SIG_SUSPEND) ABORT("Bad signal in suspend_handler"); - - #if DEBUG_THREADS - GC_printf1("Suspending 0x%x\n", my_thread); - #endif - - me = GC_lookup_thread(my_thread); - /* The lookup here is safe, since I'm doing this on behalf */ - /* of a thread which holds the allocation lock in order */ - /* to stop the world. Thus concurrent modification of the */ - /* data structure is impossible. */ - # ifdef SPARC - me -> stack_ptr = (ptr_t)GC_save_regs_in_stack(); - # else - me -> stack_ptr = (ptr_t)(&dummy); - # endif - # ifdef IA64 - me -> backing_store_ptr = (ptr_t)GC_save_regs_in_stack(); - # endif - - /* Tell the thread that wants to stop the world that this */ - /* thread has been stopped. Note that sem_post() is */ - /* the only async-signal-safe primitive in LinuxThreads. */ - sem_post(&GC_suspend_ack_sem); - - /* Wait until that thread tells us to restart by sending */ - /* this thread a SIG_THR_RESTART signal. */ - /* SIG_THR_RESTART should be masked at this point. Thus there */ - /* is no race. */ - if (sigfillset(&mask) != 0) ABORT("sigfillset() failed"); - if (sigdelset(&mask, SIG_THR_RESTART) != 0) ABORT("sigdelset() failed"); - # ifdef NO_SIGNALS - if (sigdelset(&mask, SIGINT) != 0) ABORT("sigdelset() failed"); - if (sigdelset(&mask, SIGQUIT) != 0) ABORT("sigdelset() failed"); - if (sigdelset(&mask, SIGTERM) != 0) ABORT("sigdelset() failed"); - if (sigdelset(&mask, SIGABRT) != 0) ABORT("sigdelset() failed"); - # endif - do { - me->signal = 0; - sigsuspend(&mask); /* Wait for signal */ - } while (me->signal != SIG_THR_RESTART); - - #if DEBUG_THREADS - GC_printf1("Continuing 0x%x\n", my_thread); - #endif - } - - void GC_restart_handler(int sig) - { - GC_thread me; - - if (sig != SIG_THR_RESTART) ABORT("Bad signal in suspend_handler"); - - /* Let the GC_suspend_handler() know that we got a SIG_THR_RESTART. */ - /* The lookup here is safe, since I'm doing this on behalf */ - /* of a thread which holds the allocation lock in order */ - /* to stop the world. Thus concurrent modification of the */ - /* data structure is impossible. */ - me = GC_lookup_thread(pthread_self()); - me->signal = SIG_THR_RESTART; - - /* - ** Note: even if we didn't do anything useful here, - ** it would still be necessary to have a signal handler, - ** rather than ignoring the signals, otherwise - ** the signals will not be delivered at all, and - ** will thus not interrupt the sigsuspend() above. - */ - - #if DEBUG_THREADS - GC_printf1("In GC_restart_handler for 0x%x\n", pthread_self()); - #endif - } - - /* Defining INSTALL_LOOPING_SEGV_HANDLER causes SIGSEGV and SIGBUS to */ - /* result in an infinite loop in a signal handler. This can be very */ - /* useful for debugging, since (as of RH7) gdb still seems to have */ - /* serious problems with threads. */ - #ifdef INSTALL_LOOPING_SEGV_HANDLER - void GC_looping_handler(int sig) - { - GC_printf3("Signal %ld in thread %lx, pid %ld\n", - sig, pthread_self(), getpid()); - for (;;); - } - #endif - - GC_bool GC_thr_initialized = FALSE; - - # define THREAD_TABLE_SZ 128 /* Must be power of 2 */ - volatile GC_thread GC_threads[THREAD_TABLE_SZ]; - - void GC_push_thread_structures GC_PROTO((void)) - { - GC_push_all((ptr_t)(GC_threads), (ptr_t)(GC_threads)+sizeof(GC_threads)); - } - - #ifdef THREAD_LOCAL_ALLOC - /* We must explicitly mark ptrfree and gcj free lists, since the free */ - /* list links wouldn't otherwise be found. We also set them in the */ - /* normal free lists, since that involves touching less memory than if */ - /* we scanned them normally. */ - void GC_mark_thread_local_free_lists(void) - { - int i, j; - GC_thread p; - ptr_t q; - - for (i = 0; i < THREAD_TABLE_SZ; ++i) { - for (p = GC_threads[i]; 0 != p; p = p -> next) { - for (j = 1; j < NFREELISTS; ++j) { - q = p -> ptrfree_freelists[j]; - if ((word)q > HBLKSIZE) GC_set_fl_marks(q); - q = p -> normal_freelists[j]; - if ((word)q > HBLKSIZE) GC_set_fl_marks(q); - # ifdef GC_GCJ_SUPPORT - q = p -> gcj_freelists[j]; - if ((word)q > HBLKSIZE) GC_set_fl_marks(q); - # endif /* GC_GCJ_SUPPORT */ - } - } - } - } - #endif /* THREAD_LOCAL_ALLOC */ - - /* Add a thread to GC_threads. We assume it wasn't already there. */ - /* Caller holds allocation lock. */ - GC_thread GC_new_thread(pthread_t id) - { - int hv = ((word)id) % THREAD_TABLE_SZ; - GC_thread result; - static struct GC_Thread_Rep first_thread; - static GC_bool first_thread_used = FALSE; - - if (!first_thread_used) { - result = &first_thread; - first_thread_used = TRUE; - } else { - result = (struct GC_Thread_Rep *) - GC_INTERNAL_MALLOC(sizeof(struct GC_Thread_Rep), NORMAL); - } - if (result == 0) return(0); - result -> id = id; - result -> next = GC_threads[hv]; - GC_threads[hv] = result; - GC_ASSERT(result -> flags == 0 && result -> thread_blocked == 0); - return(result); - } - - /* Delete a thread from GC_threads. We assume it is there. */ - /* (The code intentionally traps if it wasn't.) */ - /* Caller holds allocation lock. */ - void GC_delete_thread(pthread_t id) - { - int hv = ((word)id) % THREAD_TABLE_SZ; - register GC_thread p = GC_threads[hv]; - register GC_thread prev = 0; - - while (!pthread_equal(p -> id, id)) { - prev = p; - p = p -> next; - } - if (prev == 0) { - GC_threads[hv] = p -> next; - } else { - prev -> next = p -> next; - } - GC_INTERNAL_FREE(p); - } - - /* If a thread has been joined, but we have not yet */ - /* been notified, then there may be more than one thread */ - /* in the table with the same pthread id. */ - /* This is OK, but we need a way to delete a specific one. */ - void GC_delete_gc_thread(pthread_t id, GC_thread gc_id) - { - int hv = ((word)id) % THREAD_TABLE_SZ; - register GC_thread p = GC_threads[hv]; - register GC_thread prev = 0; - - while (p != gc_id) { - prev = p; - p = p -> next; - } - if (prev == 0) { - GC_threads[hv] = p -> next; - } else { - prev -> next = p -> next; - } - GC_INTERNAL_FREE(p); - } - - /* Return a GC_thread corresponding to a given thread_t. */ - /* Returns 0 if it's not there. */ - /* Caller holds allocation lock or otherwise inhibits */ - /* updates. */ - /* If there is more than one thread with the given id we */ - /* return the most recent one. */ - GC_thread GC_lookup_thread(pthread_t id) - { - int hv = ((word)id) % THREAD_TABLE_SZ; - register GC_thread p = GC_threads[hv]; - - while (p != 0 && !pthread_equal(p -> id, id)) p = p -> next; - return(p); - } - - /* There seems to be a very rare thread stopping problem. To help us */ - /* debug that, we save the ids of the stopping thread. */ - pthread_t GC_stopping_thread; - int GC_stopping_pid; - - /* Caller holds allocation lock. */ - void GC_stop_world() - { - pthread_t my_thread = pthread_self(); - register int i; - register GC_thread p; - register int n_live_threads = 0; - register int result; - - GC_stopping_thread = my_thread; /* debugging only. */ - GC_stopping_pid = getpid(); /* debugging only. */ - /* Make sure all free list construction has stopped before we start. */ - /* No new construction can start, since free list construction is */ - /* required to acquire and release the GC lock before it starts, */ - /* and we have the lock. */ - # ifdef PARALLEL_MARK - GC_acquire_mark_lock(); - GC_ASSERT(GC_fl_builder_count == 0); - /* We should have previously waited for it to become zero. */ - # endif /* PARALLEL_MARK */ - for (i = 0; i < THREAD_TABLE_SZ; i++) { - for (p = GC_threads[i]; p != 0; p = p -> next) { - if (p -> id != my_thread) { - if (p -> flags & FINISHED) continue; - if (p -> thread_blocked) /* Will wait */ continue; - n_live_threads++; - #if DEBUG_THREADS - GC_printf1("Sending suspend signal to 0x%x\n", p -> id); - #endif - result = pthread_kill(p -> id, SIG_SUSPEND); - switch(result) { - case ESRCH: - /* Not really there anymore. Possible? */ - n_live_threads--; - break; - case 0: - break; - default: - ABORT("pthread_kill failed"); - } - } - } - } - for (i = 0; i < n_live_threads; i++) { - if (0 != sem_wait(&GC_suspend_ack_sem)) - ABORT("sem_wait in handler failed"); - } - # ifdef PARALLEL_MARK - GC_release_mark_lock(); - # endif - #if DEBUG_THREADS - GC_printf1("World stopped 0x%x\n", pthread_self()); - #endif - GC_stopping_thread = 0; /* debugging only */ - } - - /* Caller holds allocation lock, and has held it continuously since */ - /* the world stopped. */ - void GC_start_world() - { - pthread_t my_thread = pthread_self(); - register int i; - register GC_thread p; - register int n_live_threads = 0; - register int result; - - # if DEBUG_THREADS - GC_printf0("World starting\n"); - # endif - - for (i = 0; i < THREAD_TABLE_SZ; i++) { - for (p = GC_threads[i]; p != 0; p = p -> next) { - if (p -> id != my_thread) { - if (p -> flags & FINISHED) continue; - if (p -> thread_blocked) continue; - n_live_threads++; - #if DEBUG_THREADS - GC_printf1("Sending restart signal to 0x%x\n", p -> id); - #endif - result = pthread_kill(p -> id, SIG_THR_RESTART); - switch(result) { - case ESRCH: - /* Not really there anymore. Possible? */ - n_live_threads--; - break; - case 0: - break; - default: - ABORT("pthread_kill failed"); - } - } - } - } - #if DEBUG_THREADS - GC_printf0("World started\n"); - #endif - GC_stopping_thread = 0; /* debugging only */ - } - - # ifdef IA64 - # define IF_IA64(x) x - # else - # define IF_IA64(x) - # endif - /* We hold allocation lock. Should do exactly the right thing if the */ - /* world is stopped. Should not fail if it isn't. */ - void GC_push_all_stacks() - { - int i; - GC_thread p; - ptr_t sp = GC_approx_sp(); - ptr_t lo, hi; - /* On IA64, we also need to scan the register backing store. */ - IF_IA64(ptr_t bs_lo; ptr_t bs_hi;) - pthread_t me = pthread_self(); - - if (!GC_thr_initialized) GC_thr_init(); - #if DEBUG_THREADS - GC_printf1("Pushing stacks from thread 0x%lx\n", (unsigned long) me); - #endif - for (i = 0; i < THREAD_TABLE_SZ; i++) { - for (p = GC_threads[i]; p != 0; p = p -> next) { - if (p -> flags & FINISHED) continue; - if (pthread_equal(p -> id, me)) { - # ifdef SPARC - lo = (ptr_t)GC_save_regs_in_stack(); - # else - lo = GC_approx_sp(); - # endif - IF_IA64(bs_hi = (ptr_t)GC_save_regs_in_stack();) - } else { - lo = p -> stack_ptr; - IF_IA64(bs_hi = p -> backing_store_ptr;) - } - if ((p -> flags & MAIN_THREAD) == 0) { - hi = p -> stack_end; - IF_IA64(bs_lo = p -> backing_store_end); - } else { - /* The original stack. */ - hi = GC_stackbottom; - IF_IA64(bs_lo = BACKING_STORE_BASE;) - } - #if DEBUG_THREADS - GC_printf3("Stack for thread 0x%lx = [%lx,%lx)\n", - (unsigned long) p -> id, - (unsigned long) lo, (unsigned long) hi); - #endif - if (0 == lo) ABORT("GC_push_all_stacks: sp not set!\n"); - # ifdef STACK_GROWS_UP - /* We got them backwards! */ - GC_push_all_stack(hi, lo); - # else - GC_push_all_stack(lo, hi); - # endif - # ifdef IA64 - if (pthread_equal(p -> id, me)) { - GC_push_all_eager(bs_lo, bs_hi); - } else { - GC_push_all_stack(bs_lo, bs_hi); - } - # endif - } - } - } - - #ifdef USE_PROC_FOR_LIBRARIES - int GC_segment_is_thread_stack(ptr_t lo, ptr_t hi) - { - int i; - GC_thread p; - - # ifdef PARALLEL_MARK - for (i = 0; i < GC_markers; ++i) { - if (marker_sp[i] > lo & marker_sp[i] < hi) return 1; - } - # endif - for (i = 0; i < THREAD_TABLE_SZ; i++) { - for (p = GC_threads[i]; p != 0; p = p -> next) { - if (0 != p -> stack_end) { - # ifdef STACK_GROWS_UP - if (p -> stack_end >= lo && p -> stack_end < hi) return 1; - # else /* STACK_GROWS_DOWN */ - if (p -> stack_end > lo && p -> stack_end <= hi) return 1; - # endif - } - } - } - return 0; - } - #endif /* USE_PROC_FOR_LIBRARIES */ - - #ifdef GC_LINUX_THREADS - /* Return the number of processors, or i<= 0 if it can't be determined. */ - int GC_get_nprocs() - { - /* Should be "return sysconf(_SC_NPROCESSORS_ONLN);" but that */ - /* appears to be buggy in many cases. */ - /* We look for lines "cpu" in /proc/stat. */ - # define STAT_BUF_SIZE 4096 - # if defined(GC_USE_LD_WRAP) - # define STAT_READ __real_read - # else - # define STAT_READ read - # endif - char stat_buf[STAT_BUF_SIZE]; - int f; - char c; - word result = 1; - /* Some old kernels only have a single "cpu nnnn ..." */ - /* entry in /proc/stat. We identify those as */ - /* uniprocessors. */ - size_t i, len = 0; - - f = open("/proc/stat", O_RDONLY); - if (f < 0 || (len = STAT_READ(f, stat_buf, STAT_BUF_SIZE)) < 100) { - WARN("Couldn't read /proc/stat\n", 0); - return -1; - } - close(f); - for (i = 0; i < len - 100; ++i) { - if (stat_buf[i] == '\n' && stat_buf[i+1] == 'c' - && stat_buf[i+2] == 'p' && stat_buf[i+3] == 'u') { - int cpu_no = atoi(stat_buf + i + 4); - if (cpu_no >= result) result = cpu_no + 1; - } - } - return result; - } - #endif /* GC_LINUX_THREADS */ - - /* We hold the allocation lock. */ - void GC_thr_init() - { - int dummy; - GC_thread t; - struct sigaction act; - - if (GC_thr_initialized) return; - GC_thr_initialized = TRUE; - - if (sem_init(&GC_suspend_ack_sem, 0, 0) != 0) - ABORT("sem_init failed"); - - act.sa_flags = SA_RESTART; - if (sigfillset(&act.sa_mask) != 0) { - ABORT("sigfillset() failed"); - } - # ifdef NO_SIGNALS - if (sigdelset(&act.sa_mask, SIGINT) != 0 - || sigdelset(&act.sa_mask, SIGQUIT != 0) - || sigdelset(&act.sa_mask, SIGABRT != 0) - || sigdelset(&act.sa_mask, SIGTERM != 0)) { - ABORT("sigdelset() failed"); - } - # endif - - /* SIG_THR_RESTART is unmasked by the handler when necessary. */ - act.sa_handler = GC_suspend_handler; - if (sigaction(SIG_SUSPEND, &act, NULL) != 0) { - ABORT("Cannot set SIG_SUSPEND handler"); - } - - act.sa_handler = GC_restart_handler; - if (sigaction(SIG_THR_RESTART, &act, NULL) != 0) { - ABORT("Cannot set SIG_THR_RESTART handler"); - } - # ifdef INSTALL_LOOPING_SEGV_HANDLER - act.sa_handler = GC_looping_handler; - if (sigaction(SIGSEGV, &act, NULL) != 0 - || sigaction(SIGBUS, &act, NULL) != 0) { - ABORT("Cannot set SIGSEGV or SIGBUS looping handler"); - } - # endif /* INSTALL_LOOPING_SEGV_HANDLER */ - - /* Add the initial thread, so we can stop it. */ - t = GC_new_thread(pthread_self()); - t -> stack_ptr = (ptr_t)(&dummy); - t -> flags = DETACHED | MAIN_THREAD; - - /* Set GC_nprocs. */ - { - char * nprocs_string = GETENV("GC_NPROCS"); - GC_nprocs = -1; - if (nprocs_string != NULL) GC_nprocs = atoi(nprocs_string); - } - if (GC_nprocs <= 0) { - # if defined(GC_HPUX_THREADS) - GC_nprocs = pthread_num_processors_np(); - # endif - # if defined(GC_OSF1_THREADS) || defined(GC_FREEBSD_THREADS) - GC_nprocs = 1; - # endif - # if defined(GC_LINUX_THREADS) - GC_nprocs = GC_get_nprocs(); - # endif - } - if (GC_nprocs <= 0) { - WARN("GC_get_nprocs() returned %ld\n", GC_nprocs); - GC_nprocs = 2; - # ifdef PARALLEL_MARK - GC_markers = 1; - # endif - } else { - # ifdef PARALLEL_MARK - GC_markers = GC_nprocs; - # endif - } - # ifdef PARALLEL_MARK - # ifdef CONDPRINT - if (GC_print_stats) { - GC_printf2("Number of processors = %ld, " - "number of marker threads = %ld\n", GC_nprocs, GC_markers); - } - # endif - if (GC_markers == 1) { - GC_parallel = FALSE; - # ifdef CONDPRINT - if (GC_print_stats) { - GC_printf0("Single marker thread, turning off parallel marking\n"); - } - # endif - } else { - GC_parallel = TRUE; - } - # endif - } - - - /* Perform all initializations, including those that */ - /* may require allocation. */ - /* Called as constructor without allocation lock. */ - /* Must be called before a second thread is created. */ - /* Called without allocation lock. */ - void GC_init_parallel() - { - if (parallel_initialized) return; - parallel_initialized = TRUE; - /* GC_init() calls us back, so set flag first. */ - if (!GC_is_initialized) GC_init(); - /* If we are using a parallel marker, start the helper threads. */ - # ifdef PARALLEL_MARK - if (GC_parallel) start_mark_threads(); - # endif - /* Initialize thread local free lists if used. */ - # if defined(THREAD_LOCAL_ALLOC) && !defined(DBG_HDRS_ALL) - LOCK(); - GC_init_thread_local(GC_lookup_thread(pthread_self())); - UNLOCK(); - # endif - } - - - int WRAP_FUNC(pthread_sigmask)(int how, const sigset_t *set, sigset_t *oset) - { - sigset_t fudged_set; - - if (set != NULL && (how == SIG_BLOCK || how == SIG_SETMASK)) { - fudged_set = *set; - sigdelset(&fudged_set, SIG_SUSPEND); - set = &fudged_set; - } - return(REAL_FUNC(pthread_sigmask)(how, set, oset)); - } - - /* Wrappers for functions that are likely to block for an appreciable */ - /* length of time. Must be called in pairs, if at all. */ - /* Nothing much beyond the system call itself should be executed */ - /* between these. */ - - void GC_start_blocking(void) { - # define SP_SLOP 128 - GC_thread me; - LOCK(); - me = GC_lookup_thread(pthread_self()); - GC_ASSERT(!(me -> thread_blocked)); - # ifdef SPARC - me -> stack_ptr = (ptr_t)GC_save_regs_in_stack(); - # else - me -> stack_ptr = (ptr_t)GC_approx_sp(); - # endif - # ifdef IA64 - me -> backing_store_ptr = (ptr_t)GC_save_regs_in_stack() + SP_SLOP; - # endif - /* Add some slop to the stack pointer, since the wrapped call may */ - /* end up pushing more callee-save registers. */ - # ifdef STACK_GROWS_UP - me -> stack_ptr += SP_SLOP; - # else - me -> stack_ptr -= SP_SLOP; - # endif - me -> thread_blocked = TRUE; - UNLOCK(); - } - - GC_end_blocking(void) { - GC_thread me; - LOCK(); /* This will block if the world is stopped. */ - me = GC_lookup_thread(pthread_self()); - GC_ASSERT(me -> thread_blocked); - me -> thread_blocked = FALSE; - UNLOCK(); - } - - /* A wrapper for the standard C sleep function */ - int WRAP_FUNC(sleep) (unsigned int seconds) - { - int result; - - GC_start_blocking(); - result = REAL_FUNC(sleep)(seconds); - GC_end_blocking(); - return result; - } - - struct start_info { - void *(*start_routine)(void *); - void *arg; - word flags; - sem_t registered; /* 1 ==> in our thread table, but */ - /* parent hasn't yet noticed. */ - }; - - /* Called at thread exit. */ - /* Never called for main thread. That's OK, since it */ - /* results in at most a tiny one-time leak. And */ - /* linuxthreads doesn't reclaim the main threads */ - /* resources or id anyway. */ - void GC_thread_exit_proc(void *arg) - { - GC_thread me; - - LOCK(); - me = GC_lookup_thread(pthread_self()); - GC_destroy_thread_local(me); - if (me -> flags & DETACHED) { - GC_delete_thread(pthread_self()); - } else { - me -> flags |= FINISHED; - } - # if defined(THREAD_LOCAL_ALLOC) && !defined(USE_PTHREAD_SPECIFIC) \ - && !defined(USE_HPUX_TLS) && !defined(DBG_HDRS_ALL) - GC_remove_specific(GC_thread_key); - # endif - if (GC_incremental && GC_collection_in_progress()) { - int old_gc_no = GC_gc_no; - - /* Make sure that no part of our stack is still on the mark stack, */ - /* since it's about to be unmapped. */ - while (GC_incremental && GC_collection_in_progress() - && old_gc_no == GC_gc_no) { - ENTER_GC(); - GC_collect_a_little_inner(1); - EXIT_GC(); - UNLOCK(); - sched_yield(); - LOCK(); - } - } - UNLOCK(); - } - - int WRAP_FUNC(pthread_join)(pthread_t thread, void **retval) - { - int result; - GC_thread thread_gc_id; - - LOCK(); - thread_gc_id = GC_lookup_thread(thread); - /* This is guaranteed to be the intended one, since the thread id */ - /* cant have been recycled by pthreads. */ - UNLOCK(); - result = REAL_FUNC(pthread_join)(thread, retval); - # if defined (GC_FREEBSD_THREADS) - /* On FreeBSD, the wrapped pthread_join() sometimes returns (what - appears to be) a spurious EINTR which caused the test and real code - to gratuitously fail. Having looked at system pthread library source - code, I see how this return code may be generated. In one path of - code, pthread_join() just returns the errno setting of the thread - being joined. This does not match the POSIX specification or the - local man pages thus I have taken the liberty to catch this one - spurious return value properly conditionalized on GC_FREEBSD_THREADS. */ - if (result == EINTR) result = 0; - # endif - if (result == 0) { - LOCK(); - /* Here the pthread thread id may have been recycled. */ - GC_delete_gc_thread(thread, thread_gc_id); - UNLOCK(); - } - return result; - } - - int - WRAP_FUNC(pthread_detach)(pthread_t thread) - { - int result; - GC_thread thread_gc_id; - - LOCK(); - thread_gc_id = GC_lookup_thread(thread); - UNLOCK(); - result = REAL_FUNC(pthread_detach)(thread); - if (result == 0) { - LOCK(); - thread_gc_id -> flags |= DETACHED; - /* Here the pthread thread id may have been recycled. */ - if (thread_gc_id -> flags & FINISHED) { - GC_delete_gc_thread(thread, thread_gc_id); - } - UNLOCK(); - } - return result; - } - - void * GC_start_routine(void * arg) - { - int dummy; - struct start_info * si = arg; - void * result; - GC_thread me; - pthread_t my_pthread; - void *(*start)(void *); - void *start_arg; - - my_pthread = pthread_self(); - # ifdef DEBUG_THREADS - GC_printf1("Starting thread 0x%lx\n", my_pthread); - GC_printf1("pid = %ld\n", (long) getpid()); - GC_printf1("sp = 0x%lx\n", (long) &arg); - # endif - LOCK(); - me = GC_new_thread(my_pthread); - me -> flags = si -> flags; - me -> stack_ptr = 0; - /* me -> stack_end = GC_linux_stack_base(); -- currently (11/99) */ - /* doesn't work because the stack base in /proc/self/stat is the */ - /* one for the main thread. There is a strong argument that that's */ - /* a kernel bug, but a pervasive one. */ - # ifdef STACK_GROWS_DOWN - me -> stack_end = (ptr_t)(((word)(&dummy) + (GC_page_size - 1)) - & ~(GC_page_size - 1)); - me -> stack_ptr = me -> stack_end - 0x10; - /* Needs to be plausible, since an asynchronous stack mark */ - /* should not crash. */ - # else - me -> stack_end = (ptr_t)((word)(&dummy) & ~(GC_page_size - 1)); - me -> stack_ptr = me -> stack_end + 0x10; - # endif - /* This is dubious, since we may be more than a page into the stack, */ - /* and hence skip some of it, though it's not clear that matters. */ - # ifdef IA64 - me -> backing_store_end = (ptr_t) - (GC_save_regs_in_stack() & ~(GC_page_size - 1)); - /* This is also < 100% convincing. We should also read this */ - /* from /proc, but the hook to do so isn't there yet. */ - # endif /* IA64 */ - UNLOCK(); - start = si -> start_routine; - # ifdef DEBUG_THREADS - GC_printf1("start_routine = 0x%lx\n", start); - # endif - start_arg = si -> arg; - # ifdef DEBUG_THREADS - GC_printf1("sem_post from 0x%lx\n", my_pthread); - # endif - sem_post(&(si -> registered)); /* Last action on si. */ - /* OK to deallocate. */ - pthread_cleanup_push(GC_thread_exit_proc, 0); - # if defined(THREAD_LOCAL_ALLOC) && !defined(DBG_HDRS_ALL) - LOCK(); - GC_init_thread_local(me); - UNLOCK(); - # endif - result = (*start)(start_arg); - #if DEBUG_THREADS - GC_printf1("Finishing thread 0x%x\n", pthread_self()); - #endif - me -> status = result; - me -> flags |= FINISHED; - pthread_cleanup_pop(1); - /* Cleanup acquires lock, ensuring that we can't exit */ - /* while a collection that thinks we're alive is trying to stop */ - /* us. */ - return(result); - } - - int - WRAP_FUNC(pthread_create)(pthread_t *new_thread, - const pthread_attr_t *attr, - void *(*start_routine)(void *), void *arg) - { - int result; - GC_thread t; - pthread_t my_new_thread; - int detachstate; - word my_flags = 0; - struct start_info * si; - /* This is otherwise saved only in an area mmapped by the thread */ - /* library, which isn't visible to the collector. */ - - LOCK(); - si = (struct start_info *)GC_INTERNAL_MALLOC(sizeof(struct start_info), NORMAL); - UNLOCK(); - if (!parallel_initialized) GC_init_parallel(); - if (0 == si) return(ENOMEM); - sem_init(&(si -> registered), 0, 0); - si -> start_routine = start_routine; - si -> arg = arg; - LOCK(); - if (!GC_thr_initialized) GC_thr_init(); - if (NULL == attr) { - detachstate = PTHREAD_CREATE_JOINABLE; - } else { - pthread_attr_getdetachstate(attr, &detachstate); - } - if (PTHREAD_CREATE_DETACHED == detachstate) my_flags |= DETACHED; - si -> flags = my_flags; - UNLOCK(); - # ifdef DEBUG_THREADS - GC_printf1("About to start new thread from thread 0x%X\n", - pthread_self()); - # endif - result = REAL_FUNC(pthread_create)(new_thread, attr, GC_start_routine, si); - # ifdef DEBUG_THREADS - GC_printf1("Started thread 0x%X\n", *new_thread); - # endif - /* Wait until child has been added to the thread table. */ - /* This also ensures that we hold onto si until the child is done */ - /* with it. Thus it doesn't matter whether it is otherwise */ - /* visible to the collector. */ - while (0 != sem_wait(&(si -> registered))) { - if (EINTR != errno) ABORT("sem_wait failed"); - } - # ifdef DEBUG_THREADS - GC_printf1("sem_wait complete from thread 0x%X\n", - pthread_self()); - # endif - sem_destroy(&(si -> registered)); - LOCK(); - GC_INTERNAL_FREE(si); - UNLOCK(); - return(result); - } - - #ifdef GENERIC_COMPARE_AND_SWAP - pthread_mutex_t GC_compare_and_swap_lock = PTHREAD_MUTEX_INITIALIZER; - - GC_bool GC_compare_and_exchange(volatile GC_word *addr, - GC_word old, GC_word new_val) - { - GC_bool result; - pthread_mutex_lock(&GC_compare_and_swap_lock); - if (*addr == old) { - *addr = new_val; - result = TRUE; - } else { - result = FALSE; - } - pthread_mutex_unlock(&GC_compare_and_swap_lock); - return result; - } - - GC_word GC_atomic_add(volatile GC_word *addr, GC_word how_much) - { - GC_word old; - pthread_mutex_lock(&GC_compare_and_swap_lock); - old = *addr; - *addr = old + how_much; - pthread_mutex_unlock(&GC_compare_and_swap_lock); - return old; - } - - #endif /* GENERIC_COMPARE_AND_SWAP */ - /* Spend a few cycles in a way that can't introduce contention with */ - /* othre threads. */ - void GC_pause() - { - int i; - volatile word dummy = 0; - - for (i = 0; i < 10; ++i) { - # ifdef __GNUC__ - __asm__ __volatile__ (" " : : : "memory"); - # else - /* Something that's unlikely to be optimized away. */ - GC_noop(++dummy); - # endif - } - } - - #define SPIN_MAX 1024 /* Maximum number of calls to GC_pause before */ - /* give up. */ - - VOLATILE GC_bool GC_collecting = 0; - /* A hint that we're in the collector and */ - /* holding the allocation lock for an */ - /* extended period. */ - - #if !defined(USE_SPIN_LOCK) || defined(PARALLEL_MARK) - /* If we don't want to use the below spinlock implementation, either */ - /* because we don't have a GC_test_and_set implementation, or because */ - /* we don't want to risk sleeping, we can still try spinning on */ - /* pthread_mutex_trylock for a while. This appears to be very */ - /* beneficial in many cases. */ - /* I suspect that under high contention this is nearly always better */ - /* than the spin lock. But it's a bit slower on a uniprocessor. */ - /* Hence we still default to the spin lock. */ - /* This is also used to acquire the mark lock for the parallel */ - /* marker. */ - - /* Here we use a strict exponential backoff scheme. I don't know */ - /* whether that's better or worse than the above. We eventually */ - /* yield by calling pthread_mutex_lock(); it never makes sense to */ - /* explicitly sleep. */ - - void GC_generic_lock(pthread_mutex_t * lock) - { - unsigned pause_length = 1; - unsigned i; - - if (0 == pthread_mutex_trylock(lock)) return; - for (; pause_length <= SPIN_MAX; pause_length <<= 1) { - for (i = 0; i < pause_length; ++i) { - GC_pause(); - } - switch(pthread_mutex_trylock(lock)) { - case 0: - return; - case EBUSY: - break; - default: - ABORT("Unexpected error from pthread_mutex_trylock"); - } - } - pthread_mutex_lock(lock); - } - - #endif /* !USE_SPIN_LOCK || PARALLEL_MARK */ - - #if defined(USE_SPIN_LOCK) - - /* Reasonably fast spin locks. Basically the same implementation */ - /* as STL alloc.h. This isn't really the right way to do this. */ - /* but until the POSIX scheduling mess gets straightened out ... */ - - volatile unsigned int GC_allocate_lock = 0; - - - void GC_lock() - { - # define low_spin_max 30 /* spin cycles if we suspect uniprocessor */ - # define high_spin_max SPIN_MAX /* spin cycles for multiprocessor */ - static unsigned spin_max = low_spin_max; - unsigned my_spin_max; - static unsigned last_spins = 0; - unsigned my_last_spins; - int i; - - if (!GC_test_and_set(&GC_allocate_lock)) { - return; - } - my_spin_max = spin_max; - my_last_spins = last_spins; - for (i = 0; i < my_spin_max; i++) { - if (GC_collecting || GC_nprocs == 1) goto yield; - if (i < my_last_spins/2 || GC_allocate_lock) { - GC_pause(); - continue; - } - if (!GC_test_and_set(&GC_allocate_lock)) { - /* - * got it! - * Spinning worked. Thus we're probably not being scheduled - * against the other process with which we were contending. - * Thus it makes sense to spin longer the next time. - */ - last_spins = i; - spin_max = high_spin_max; - return; - } - } - /* We are probably being scheduled against the other process. Sleep. */ - spin_max = low_spin_max; - yield: - for (i = 0;; ++i) { - if (!GC_test_and_set(&GC_allocate_lock)) { - return; - } - # define SLEEP_THRESHOLD 12 - /* nanosleep(<= 2ms) just spins under Linux. We */ - /* want to be careful to avoid that behavior. */ - if (i < SLEEP_THRESHOLD) { - sched_yield(); - } else { - struct timespec ts; - - if (i > 24) i = 24; - /* Don't wait for more than about 15msecs, even */ - /* under extreme contention. */ - ts.tv_sec = 0; - ts.tv_nsec = 1 << i; - nanosleep(&ts, 0); - } - } - } - - #else /* !USE_SPINLOCK */ - - void GC_lock() - { - if (1 == GC_nprocs || GC_collecting) { - pthread_mutex_lock(&GC_allocate_ml); - } else { - GC_generic_lock(&GC_allocate_ml); - } - } - - #endif /* !USE_SPINLOCK */ - - #if defined(PARALLEL_MARK) || defined(THREAD_LOCAL_ALLOC) - - #ifdef GC_ASSERTIONS - pthread_t GC_mark_lock_holder = NO_THREAD; - #endif - - #if 0 - /* Ugly workaround for a linux threads bug in the final versions */ - /* of glibc2.1. Pthread_mutex_trylock sets the mutex owner */ - /* field even when it fails to acquire the mutex. This causes */ - /* pthread_cond_wait to die. Remove for glibc2.2. */ - /* According to the man page, we should use */ - /* PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP, but that isn't actually */ - /* defined. */ - static pthread_mutex_t mark_mutex = - {0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, {0, 0}}; - #else - static pthread_mutex_t mark_mutex = PTHREAD_MUTEX_INITIALIZER; - #endif - - static pthread_cond_t builder_cv = PTHREAD_COND_INITIALIZER; - - void GC_acquire_mark_lock() - { - /* - if (pthread_mutex_lock(&mark_mutex) != 0) { - ABORT("pthread_mutex_lock failed"); - } - */ - GC_generic_lock(&mark_mutex); - # ifdef GC_ASSERTIONS - GC_mark_lock_holder = pthread_self(); - # endif - } - - void GC_release_mark_lock() - { - GC_ASSERT(GC_mark_lock_holder == pthread_self()); - # ifdef GC_ASSERTIONS - GC_mark_lock_holder = NO_THREAD; - # endif - if (pthread_mutex_unlock(&mark_mutex) != 0) { - ABORT("pthread_mutex_unlock failed"); - } - } - - /* Collector must wait for a freelist builders for 2 reasons: */ - /* 1) Mark bits may still be getting examined without lock. */ - /* 2) Partial free lists referenced only by locals may not be scanned */ - /* correctly, e.g. if they contain "pointer-free" objects, since the */ - /* free-list link may be ignored. */ - void GC_wait_builder() - { - GC_ASSERT(GC_mark_lock_holder == pthread_self()); - # ifdef GC_ASSERTIONS - GC_mark_lock_holder = NO_THREAD; - # endif - if (pthread_cond_wait(&builder_cv, &mark_mutex) != 0) { - ABORT("pthread_cond_wait failed"); - } - GC_ASSERT(GC_mark_lock_holder == NO_THREAD); - # ifdef GC_ASSERTIONS - GC_mark_lock_holder = pthread_self(); - # endif - } - - void GC_wait_for_reclaim() - { - GC_acquire_mark_lock(); - while (GC_fl_builder_count > 0) { - GC_wait_builder(); - } - GC_release_mark_lock(); - } - - void GC_notify_all_builder() - { - GC_ASSERT(GC_mark_lock_holder == pthread_self()); - if (pthread_cond_broadcast(&builder_cv) != 0) { - ABORT("pthread_cond_broadcast failed"); - } - } - - #endif /* PARALLEL_MARK || THREAD_LOCAL_ALLOC */ - - #ifdef PARALLEL_MARK - - static pthread_cond_t mark_cv = PTHREAD_COND_INITIALIZER; - - void GC_wait_marker() - { - GC_ASSERT(GC_mark_lock_holder == pthread_self()); - # ifdef GC_ASSERTIONS - GC_mark_lock_holder = NO_THREAD; - # endif - if (pthread_cond_wait(&mark_cv, &mark_mutex) != 0) { - ABORT("pthread_cond_wait failed"); - } - GC_ASSERT(GC_mark_lock_holder == NO_THREAD); - # ifdef GC_ASSERTIONS - GC_mark_lock_holder = pthread_self(); - # endif - } - - void GC_notify_all_marker() - { - if (pthread_cond_broadcast(&mark_cv) != 0) { - ABORT("pthread_cond_broadcast failed"); - } - } - - #endif /* PARALLEL_MARK */ - - # endif /* GC_LINUX_THREADS and friends */ - --- 0 ---- diff -Nrc3pad gcc-3.3.3/boehm-gc/Mac_files/MacOS_config.h gcc-3.4.0/boehm-gc/Mac_files/MacOS_config.h *** gcc-3.3.3/boehm-gc/Mac_files/MacOS_config.h 2001-08-17 18:30:47.000000000 +0000 --- gcc-3.4.0/boehm-gc/Mac_files/MacOS_config.h 2003-07-28 04:18:21.000000000 +0000 *************** *** 72,78 **** // implementations, and it sometimes has a significant performance // impact. However, it is dangerous for many not-quite-ANSI C // programs that call things like printf in asynchronous signal handlers. ! // -DOPERATOR_NEW_ARRAY declares that the C++ compiler supports the // new syntax "operator new[]" for allocating and deleting arrays. // See gc_cpp.h for details. No effect on the C part of the collector. // This is defined implicitly in a few environments. --- 72,78 ---- // implementations, and it sometimes has a significant performance // impact. However, it is dangerous for many not-quite-ANSI C // programs that call things like printf in asynchronous signal handlers. ! // -DGC_OPERATOR_NEW_ARRAY declares that the C++ compiler supports the // new syntax "operator new[]" for allocating and deleting arrays. // See gc_cpp.h for details. No effect on the C part of the collector. // This is defined implicitly in a few environments. *************** *** 86,89 **** // since some ports use malloc or calloc to obtain system memory. // (Probably works for UNIX, and win32.) // -DNO_DEBUG removes GC_dump and the debugging routines it calls. ! // Reduces code size slightly at the expense of debuggability. \ No newline at end of file --- 86,89 ---- // since some ports use malloc or calloc to obtain system memory. // (Probably works for UNIX, and win32.) // -DNO_DEBUG removes GC_dump and the debugging routines it calls. ! // Reduces code size slightly at the expense of debuggability. diff -Nrc3pad gcc-3.3.3/boehm-gc/Mac_files/MacOS_Test_config.h gcc-3.4.0/boehm-gc/Mac_files/MacOS_Test_config.h *** gcc-3.3.3/boehm-gc/Mac_files/MacOS_Test_config.h 2001-08-17 18:30:47.000000000 +0000 --- gcc-3.4.0/boehm-gc/Mac_files/MacOS_Test_config.h 2003-07-28 04:18:21.000000000 +0000 *************** *** 74,80 **** // implementations, and it sometimes has a significant performance // impact. However, it is dangerous for many not-quite-ANSI C // programs that call things like printf in asynchronous signal handlers. ! // -DOPERATOR_NEW_ARRAY declares that the C++ compiler supports the // new syntax "operator new[]" for allocating and deleting arrays. // See gc_cpp.h for details. No effect on the C part of the collector. // This is defined implicitly in a few environments. --- 74,80 ---- // implementations, and it sometimes has a significant performance // impact. However, it is dangerous for many not-quite-ANSI C // programs that call things like printf in asynchronous signal handlers. ! // -DGC_OPERATOR_NEW_ARRAY declares that the C++ compiler supports the // new syntax "operator new[]" for allocating and deleting arrays. // See gc_cpp.h for details. No effect on the C part of the collector. // This is defined implicitly in a few environments. diff -Nrc3pad gcc-3.3.3/boehm-gc/mach_dep.c gcc-3.4.0/boehm-gc/mach_dep.c *** gcc-3.3.3/boehm-gc/mach_dep.c 2002-07-18 20:06:00.000000000 +0000 --- gcc-3.4.0/boehm-gc/mach_dep.c 2003-10-03 18:43:06.000000000 +0000 *************** asm static void PushMacRegisters() *** 74,80 **** /* on your architecture. Run the test_setjmp program to see whether */ /* there is any chance it will work. */ ! #ifndef USE_GENERIC_PUSH_REGS void GC_push_regs() { # ifdef RT --- 74,81 ---- /* on your architecture. Run the test_setjmp program to see whether */ /* there is any chance it will work. */ ! #if !defined(USE_GENERIC_PUSH_REGS) && !defined(USE_ASM_PUSH_REGS) ! #undef HAVE_PUSH_REGS void GC_push_regs() { # ifdef RT *************** void GC_push_regs() *** 91,96 **** --- 92,98 ---- asm("pushl r8"); asm("calls $1,_GC_push_one"); asm("pushl r7"); asm("calls $1,_GC_push_one"); asm("pushl r6"); asm("calls $1,_GC_push_one"); + # define HAVE_PUSH_REGS # endif # if defined(M68K) && (defined(SUNOS4) || defined(NEXT)) /* M68K SUNOS - could be replaced by generic code */ *************** void GC_push_regs() *** 113,118 **** --- 115,121 ---- asm("movl d7,sp@"); asm("jbsr _GC_push_one"); asm("addqw #0x4,sp"); /* put stack back where it was */ + # define HAVE_PUSH_REGS # endif # if defined(M68K) && defined(HP) *************** void GC_push_regs() *** 135,140 **** --- 138,144 ---- asm("mov.l %d7,(%sp)"); asm("jsr _GC_push_one"); asm("addq.w &0x4,%sp"); /* put stack back where it was */ + # define HAVE_PUSH_REGS # endif /* M68K HP */ # if defined(M68K) && defined(AMIGA) *************** void GC_push_regs() *** 158,163 **** --- 162,168 ---- asm("mov.l %d7,(%sp)"); asm("jsr _GC_push_one"); asm("addq.w &0x4,%sp"); /* put stack back where it was */ + # define HAVE_PUSH_REGS # else /* !__GNUC__ */ GC_push_one(getreg(REG_A2)); GC_push_one(getreg(REG_A3)); *************** void GC_push_regs() *** 174,179 **** --- 179,185 ---- GC_push_one(getreg(REG_D5)); GC_push_one(getreg(REG_D6)); GC_push_one(getreg(REG_D7)); + # define HAVE_PUSH_REGS # endif /* !__GNUC__ */ # endif /* AMIGA */ *************** void GC_push_regs() *** 196,205 **** --- 202,213 ---- PushMacReg(d7); add.w #4,sp ; fix stack. } + # define HAVE_PUSH_REGS # undef PushMacReg # endif /* THINK_C */ # if defined(__MWERKS__) PushMacRegisters(); + # define HAVE_PUSH_REGS # endif /* __MWERKS__ */ # endif /* MACOS */ *************** void GC_push_regs() *** 222,234 **** asm("pushl %esi"); asm("call _GC_push_one"); asm("addl $4,%esp"); asm("pushl %edi"); asm("call _GC_push_one"); asm("addl $4,%esp"); asm("pushl %ebx"); asm("call _GC_push_one"); asm("addl $4,%esp"); # endif # if ( defined(I386) && defined(LINUX) && defined(__ELF__) ) \ || ( defined(I386) && defined(FREEBSD) && defined(__ELF__) ) \ || ( defined(I386) && defined(NETBSD) && defined(__ELF__) ) \ || ( defined(I386) && defined(OPENBSD) && defined(__ELF__) ) \ ! || ( defined(I386) && defined(HURD) && defined(__ELF__) ) /* This is modified for Linux with ELF (Note: _ELF_ only) */ /* This section handles FreeBSD with ELF. */ --- 230,244 ---- asm("pushl %esi"); asm("call _GC_push_one"); asm("addl $4,%esp"); asm("pushl %edi"); asm("call _GC_push_one"); asm("addl $4,%esp"); asm("pushl %ebx"); asm("call _GC_push_one"); asm("addl $4,%esp"); + # define HAVE_PUSH_REGS # endif # if ( defined(I386) && defined(LINUX) && defined(__ELF__) ) \ || ( defined(I386) && defined(FREEBSD) && defined(__ELF__) ) \ || ( defined(I386) && defined(NETBSD) && defined(__ELF__) ) \ || ( defined(I386) && defined(OPENBSD) && defined(__ELF__) ) \ ! || ( defined(I386) && defined(HURD) && defined(__ELF__) ) \ ! || ( defined(I386) && defined(DGUX) ) /* This is modified for Linux with ELF (Note: _ELF_ only) */ /* This section handles FreeBSD with ELF. */ *************** void GC_push_regs() *** 243,248 **** --- 253,259 ---- asm("pushl %esi; call GC_push_one; addl $4,%esp"); asm("pushl %edi; call GC_push_one; addl $4,%esp"); asm("pushl %ebx; call GC_push_one; addl $4,%esp"); + # define HAVE_PUSH_REGS # endif # if ( defined(I386) && defined(BEOS) && defined(__ELF__) ) *************** void GC_push_regs() *** 254,259 **** --- 265,271 ---- asm("pushl %esi; call GC_push_one; addl $4,%esp"); asm("pushl %edi; call GC_push_one; addl $4,%esp"); asm("pushl %ebx; call GC_push_one; addl $4,%esp"); + # define HAVE_PUSH_REGS # endif # if defined(I386) && defined(MSWIN32) && !defined(__MINGW32__) \ *************** void GC_push_regs() *** 280,285 **** --- 292,298 ---- __asm push edi __asm call GC_push_one __asm add esp,4 + # define HAVE_PUSH_REGS # endif # if defined(I386) && (defined(SVR4) || defined(SCO) || defined(SCO_ELF)) *************** void GC_push_regs() *** 291,296 **** --- 304,310 ---- asm("pushl %ebp"); asm("call GC_push_one"); asm("addl $4,%esp"); asm("pushl %esi"); asm("call GC_push_one"); asm("addl $4,%esp"); asm("pushl %edi"); asm("call GC_push_one"); asm("addl $4,%esp"); + # define HAVE_PUSH_REGS # endif # ifdef NS32K *************** void GC_push_regs() *** 299,312 **** asm ("movd r5, tos"); asm ("bsr ?_GC_push_one"); asm ("adjspb $-4"); asm ("movd r6, tos"); asm ("bsr ?_GC_push_one"); asm ("adjspb $-4"); asm ("movd r7, tos"); asm ("bsr ?_GC_push_one"); asm ("adjspb $-4"); # endif # if defined(SPARC) ! { ! word GC_save_regs_in_stack(); ! ! GC_save_regs_ret_val = GC_save_regs_in_stack(); ! } # endif # ifdef RT --- 313,324 ---- asm ("movd r5, tos"); asm ("bsr ?_GC_push_one"); asm ("adjspb $-4"); asm ("movd r6, tos"); asm ("bsr ?_GC_push_one"); asm ("adjspb $-4"); asm ("movd r7, tos"); asm ("bsr ?_GC_push_one"); asm ("adjspb $-4"); + # define HAVE_PUSH_REGS # endif # if defined(SPARC) ! GC_save_regs_ret_val = GC_save_regs_in_stack(); ! # define HAVE_PUSH_REGS # endif # ifdef RT *************** void GC_push_regs() *** 322,327 **** --- 334,340 ---- asm("cas r11, r13, r0"); GC_push_one(TMP_SP); /* through */ asm("cas r11, r14, r0"); GC_push_one(TMP_SP); /* r15 */ asm("cas r11, r15, r0"); GC_push_one(TMP_SP); + # define HAVE_PUSH_REGS # endif # if defined(M68K) && defined(SYSV) *************** void GC_push_regs() *** 345,350 **** --- 358,364 ---- asm("movl %d7,%sp@"); asm("jbsr GC_push_one"); asm("addqw #0x4,%sp"); /* put stack back where it was */ + # define HAVE_PUSH_REGS # else /* !__GNUC__*/ asm("subq.w &0x4,%sp"); /* allocate word on top of stack */ *************** void GC_push_regs() *** 362,367 **** --- 376,382 ---- asm("mov.l %d7,(%sp)"); asm("jsr GC_push_one"); asm("addq.w &0x4,%sp"); /* put stack back where it was */ + # define HAVE_PUSH_REGS # endif /* !__GNUC__ */ # endif /* M68K/SYSV */ *************** void GC_push_regs() *** 371,397 **** extern int *__libc_stack_end; GC_push_all_stack (sp, __libc_stack_end); } # endif /* other machines... */ ! # if !defined(M68K) && !defined(VAX) && !defined(RT) ! # if !defined(SPARC) && !defined(I386) && !defined(NS32K) ! # if !defined(POWERPC) && !defined(UTS4) ! # if !defined(PJ) && !(defined(MIPS) && defined(LINUX)) ! --> bad news <-- ! # endif ! # endif ! # endif # endif } ! #endif /* !USE_GENERIC_PUSH_REGS */ #if defined(USE_GENERIC_PUSH_REGS) void GC_generic_push_regs(cold_gc_frame) ptr_t cold_gc_frame; { { # ifdef HAVE_BUILTIN_UNWIND_INIT /* This was suggested by Richard Henderson as the way to */ /* force callee-save registers and register windows onto */ --- 386,412 ---- extern int *__libc_stack_end; GC_push_all_stack (sp, __libc_stack_end); + # define HAVE_PUSH_REGS + /* Isn't this redundant with the code to push the stack? */ } # endif /* other machines... */ ! # if !defined(HAVE_PUSH_REGS) ! --> We just generated an empty GC_push_regs, which ! --> is almost certainly broken. Try defining ! --> USE_GENERIC_PUSH_REGS instead. # endif } ! #endif /* !USE_GENERIC_PUSH_REGS && !USE_ASM_PUSH_REGS */ #if defined(USE_GENERIC_PUSH_REGS) void GC_generic_push_regs(cold_gc_frame) ptr_t cold_gc_frame; { { + word dummy; + # ifdef HAVE_BUILTIN_UNWIND_INIT /* This was suggested by Richard Henderson as the way to */ /* force callee-save registers and register windows onto */ *************** ptr_t cold_gc_frame; *** 427,434 **** /* needed on IA64, since some non-windowed registers are */ /* preserved. */ { - word GC_save_regs_in_stack(); - GC_save_regs_ret_val = GC_save_regs_in_stack(); /* On IA64 gcc, could use __builtin_ia64_flushrs() and */ /* __builtin_ia64_flushrs(). The latter will be done */ --- 442,447 ---- *************** ptr_t cold_gc_frame; *** 437,442 **** --- 450,459 ---- } # endif GC_push_current_stack(cold_gc_frame); + /* Strongly discourage the compiler from treating the above */ + /* as a tail-call, since that would pop the register */ + /* contents before we get a chance to look at them. */ + GC_noop1((word)(&dummy)); } } #endif /* USE_GENERIC_PUSH_REGS */ *************** ptr_t cold_gc_frame; *** 445,451 **** /* the stack. Return sp. */ # ifdef SPARC asm(" .seg \"text\""); ! # ifdef SVR4 asm(" .globl GC_save_regs_in_stack"); asm("GC_save_regs_in_stack:"); asm(" .type GC_save_regs_in_stack,#function"); --- 462,468 ---- /* the stack. Return sp. */ # ifdef SPARC asm(" .seg \"text\""); ! # if defined(SVR4) || defined(NETBSD) asm(" .globl GC_save_regs_in_stack"); asm("GC_save_regs_in_stack:"); asm(" .type GC_save_regs_in_stack,#function"); diff -Nrc3pad gcc-3.3.3/boehm-gc/Makefile.am gcc-3.4.0/boehm-gc/Makefile.am *** gcc-3.3.3/boehm-gc/Makefile.am 2003-01-28 01:44:52.000000000 +0000 --- gcc-3.4.0/boehm-gc/Makefile.am 2003-07-28 04:18:19.000000000 +0000 *************** MULTICLEAN = true *** 18,32 **** noinst_LTLIBRARIES = libgcjgc.la libgcjgc_convenience.la GC_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \ ! dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c irix_threads.c \ ! linux_threads.c malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \ obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \ solaris_pthreads.c solaris_threads.c specific.c stubborn.c typd_mlc.c \ ! backgraph.c win32_threads.c ! EXTRA_GC_SOURCES = alpha_mach_dep.s \ ! mips_sgi_mach_dep.S mips_ultrix_mach_dep.s powerpc_macosx_mach_dep.s \ rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s \ sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s --- 18,40 ---- noinst_LTLIBRARIES = libgcjgc.la libgcjgc_convenience.la + if POWERPC_DARWIN + asm_libgc_sources = powerpc_darwin_mach_dep.s + else + asm_libgc_sources = + endif + GC_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \ ! dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c aix_irix_threads.c \ ! malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \ obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \ solaris_pthreads.c solaris_threads.c specific.c stubborn.c typd_mlc.c \ ! backgraph.c win32_threads.c \ ! pthread_support.c pthread_stop_world.c darwin_stop_world.c \ ! $(asm_libgc_sources) ! EXTRA_GC_SOURCES = alpha_mach_dep.S \ ! mips_sgi_mach_dep.s mips_ultrix_mach_dep.s powerpc_darwin_mach_dep.s \ rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s \ sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s *************** TESTS = gctest *** 63,69 **** ## FIXME: relies on internal code generated by automake. all_objs = @addobjs@ $(libgcjgc_la_OBJECTS) $(all_objs) : include/private/gcconfig.h include/private/gc_priv.h \ ! include/private/gc_hdrs.h include/gc.h include/gc_gcj.h include/gc_mark.h ## FIXME: we shouldn't have to do this, but automake forces us to. .s.lo: --- 71,79 ---- ## FIXME: relies on internal code generated by automake. all_objs = @addobjs@ $(libgcjgc_la_OBJECTS) $(all_objs) : include/private/gcconfig.h include/private/gc_priv.h \ ! include/private/gc_hdrs.h include/gc.h include/gc_gcj.h \ ! include/gc_pthread_redirects.h include/gc_config_macros.h \ ! include/gc_mark.h @addincludes@ ## FIXME: we shouldn't have to do this, but automake forces us to. .s.lo: diff -Nrc3pad gcc-3.3.3/boehm-gc/Makefile.direct gcc-3.4.0/boehm-gc/Makefile.direct *** gcc-3.3.3/boehm-gc/Makefile.direct 2002-02-12 04:37:53.000000000 +0000 --- gcc-3.4.0/boehm-gc/Makefile.direct 2003-07-28 04:18:20.000000000 +0000 *************** CFLAGS= -O -I$(srcdir)/include -DATOMIC_ *** 27,34 **** # To build the parallel collector on Linux, add to the above: # -DGC_LINUX_THREADS -DPARALLEL_MARK -DTHREAD_LOCAL_ALLOC ! # To build the parallel collector n a static library on HP/UX, add to the above: # -DGC_HPUX_THREADS -DPARALLEL_MARK -DTHREAD_LOCAL_ALLOC -DUSE_HPUX_TLS -D_POSIX_C_SOURCE=199506L # HOSTCC and HOSTCFLAGS are used to build executables that will be run as # part of the build process, i.e. on the build machine. These will usually --- 27,37 ---- # To build the parallel collector on Linux, add to the above: # -DGC_LINUX_THREADS -DPARALLEL_MARK -DTHREAD_LOCAL_ALLOC ! # To build the parallel collector in a static library on HP/UX, ! # add to the above: # -DGC_HPUX_THREADS -DPARALLEL_MARK -DTHREAD_LOCAL_ALLOC -DUSE_HPUX_TLS -D_POSIX_C_SOURCE=199506L + # To build the thread-safe collector on Tru64, add to the above: + # -pthread -DGC_OSF1_THREADS # HOSTCC and HOSTCFLAGS are used to build executables that will be run as # part of the build process, i.e. on the build machine. These will usually *************** HOSTCFLAGS=$(CFLAGS) *** 60,65 **** --- 63,78 ---- # Also requires -D_REENTRANT or -D_POSIX_C_SOURCE=199506L. See README.hp. # -DGC_LINUX_THREADS enables support for Xavier Leroy's Linux threads. # see README.linux. -D_REENTRANT may also be required. + # -DGC_OSF1_THREADS enables support for Tru64 pthreads. Untested. + # -DGC_FREEBSD_THREADS enables support for FreeBSD pthreads. Untested. + # Appeared to run into some underlying thread problems. + # -DGC_DARWIN_THREADS enables support for Mac OS X pthreads. Untested. + # -DGC_DGUX386_THREADS enables support for DB/UX on I386 threads. + # See README.DGUX386. + # -DGC_WIN32_THREADS enables support for win32 threads. That makes sense + # for this Makefile only under Cygwin. + # -DGC_THREADS should set the appropriate one of the above macros. + # It assumes pthreads for Solaris. # -DALL_INTERIOR_POINTERS allows all pointers to the interior # of objects to be recognized. (See gc_priv.h for consequences.) # Alternatively, GC_all_interior_pointers can be set at process *************** HOSTCFLAGS=$(CFLAGS) *** 93,105 **** # See gc_cpp.h for details. No effect on the C part of the collector. # This is defined implicitly in a few environments. Must also be defined # by clients that use gc_cpp.h. ! # -DREDIRECT_MALLOC=X causes malloc, realloc, and free to be ! # defined as aliases for X, GC_realloc, and GC_free, respectively. # Calloc and strdup are redefined in terms of the new malloc. X should # be either GC_malloc or GC_malloc_uncollectable, or # GC_debug_malloc_replacement. (The latter invokes GC_debug_malloc # with dummy source location information, but still results in ! # properly remembered call stacks on Linux/X86 and Solaris/SPARC.) # The former is occasionally useful for working around leaks in code # you don't want to (or can't) look at. It may not work for # existing code, but it often does. Neither works on all platforms, --- 106,120 ---- # See gc_cpp.h for details. No effect on the C part of the collector. # This is defined implicitly in a few environments. Must also be defined # by clients that use gc_cpp.h. ! # -DREDIRECT_MALLOC=X causes malloc to be defined as alias for X. ! # Unless the following macros are defined, realloc is also redirected ! # to GC_realloc, and free is redirected to GC_free. # Calloc and strdup are redefined in terms of the new malloc. X should # be either GC_malloc or GC_malloc_uncollectable, or # GC_debug_malloc_replacement. (The latter invokes GC_debug_malloc # with dummy source location information, but still results in ! # properly remembered call stacks on Linux/X86 and Solaris/SPARC. ! # It requires that the following two macros also be used.) # The former is occasionally useful for working around leaks in code # you don't want to (or can't) look at. It may not work for # existing code, but it often does. Neither works on all platforms, *************** HOSTCFLAGS=$(CFLAGS) *** 111,116 **** --- 126,134 ---- # The canonical use is -DREDIRECT_REALLOC=GC_debug_realloc_replacement, # together with -DREDIRECT_MALLOC=GC_debug_malloc_replacement to # generate leak reports with call stacks for both malloc and realloc. + # This also requires the following: + # -DREDIRECT_FREE=X causes free to be redirected to X. The + # canonical use is -DREDIRECT_FREE=GC_debug_free. # -DIGNORE_FREE turns calls to free into a noop. Only useful with # -DREDIRECT_MALLOC. # -DNO_DEBUGGING removes GC_dump and the debugging routines it calls. *************** HOSTCFLAGS=$(CFLAGS) *** 197,204 **** # 15% or so. # -DUSE_3DNOW_PREFETCH causes the collector to issue AMD 3DNow style # prefetch instructions. Same restrictions as USE_I686_PREFETCH. ! # UNTESTED!! ! # -DGC_USE_LD_WRAP in combination with the gld flags listed in README.linux # causes the collector some system and pthread calls in a more transparent # fashion than the usual macro-based approach. Requires GNU ld, and # currently probably works only with Linux. --- 215,225 ---- # 15% or so. # -DUSE_3DNOW_PREFETCH causes the collector to issue AMD 3DNow style # prefetch instructions. Same restrictions as USE_I686_PREFETCH. ! # Minimally tested. Didn't appear to be an obvious win on a K6-2/500. ! # -DUSE_PPC_PREFETCH causes the collector to issue PowerPC style ! # prefetch instructions. No effect except on PowerPC OS X platforms. ! # Performance impact untested. ! # -DGC_USE_LD_WRAP in combination with the old flags listed in README.linux # causes the collector some system and pthread calls in a more transparent # fashion than the usual macro-based approach. Requires GNU ld, and # currently probably works only with Linux. *************** HOSTCFLAGS=$(CFLAGS) *** 226,231 **** --- 247,270 ---- # -DSTUBBORN_ALLOC allows allocation of "hard to change" objects, and thus # makes incremental collection easier. Was enabled by default until 6.0. # Rarely used, to my knowledge. + # -DHANDLE_FORK attempts to make GC_malloc() work in a child process fork()ed + # from a multithreaded parent. Currently only supported by pthread_support.c. + # (Similar code should work on Solaris or Irix, but it hasn't been tried.) + # -DTEST_WITH_SYSTEM_MALLOC causes gctest to allocate (and leak) large chunks + # of memory with the standard system malloc. This will cause the root + # set and collected heap to grow significantly if malloced memory is + # somehow getting traced by the collector. This has no impact on the + # generated library; it only affects the test. + # -DPOINTER_MASK=0x... causes candidate pointers to be ANDed with the + # given mask before being considered. If either this or the following + # macro is defined, it will be assumed that all pointers stored in + # the heap need to be processed this way. Stack and register pointers + # will be considered both with and without processing. + # These macros are normally needed only to support systems that use + # high-order pointer tags. EXPERIMENTAL. + # -DPOINTER_SHIFT=n causes the collector to left shift candidate pointers + # by the indicated amount before trying to interpret them. Applied + # after POINTER_MASK. EXPERIMENTAL. See also the preceding macro. # CXXFLAGS= $(CFLAGS) *************** AR= ar *** 233,247 **** RANLIB= ranlib ! OBJS= alloc.o reclaim.o allchblk.o misc.o mach_dep.o os_dep.o mark_rts.o headers.o mark.o obj_map.o blacklst.o finalize.o new_hblk.o dbg_mlc.o malloc.o stubborn.o checksums.o solaris_threads.o irix_threads.o linux_threads.o typd_mlc.o ptr_chck.o mallocx.o solaris_pthreads.o gcj_mlc.o specific.o gc_dlopen.o backgraph.o ! CSRCS= reclaim.c allchblk.c misc.c alloc.c mach_dep.c os_dep.c mark_rts.c headers.c mark.c obj_map.c pcr_interface.c blacklst.c finalize.c new_hblk.c real_malloc.c dyn_load.c dbg_mlc.c malloc.c stubborn.c checksums.c solaris_threads.c irix_threads.c linux_threads.c typd_mlc.c ptr_chck.c mallocx.c solaris_pthreads.c gcj_mlc.c specific.c gc_dlopen.c backgraph.c CORD_SRCS= cord/cordbscs.c cord/cordxtra.c cord/cordprnt.c cord/de.c cord/cordtest.c include/cord.h include/ec.h include/private/cord_pos.h cord/de_win.c cord/de_win.h cord/de_cmds.h cord/de_win.ICO cord/de_win.RC CORD_OBJS= cord/cordbscs.o cord/cordxtra.o cord/cordprnt.o ! SRCS= $(CSRCS) mips_sgi_mach_dep.s rs6000_mach_dep.s alpha_mach_dep.s \ sparc_mach_dep.S include/gc.h include/gc_typed.h \ include/private/gc_hdrs.h include/private/gc_priv.h \ include/private/gcconfig.h include/private/gc_pmark.h \ --- 272,286 ---- RANLIB= ranlib ! OBJS= alloc.o reclaim.o allchblk.o misc.o mach_dep.o os_dep.o mark_rts.o headers.o mark.o obj_map.o blacklst.o finalize.o new_hblk.o dbg_mlc.o malloc.o stubborn.o checksums.o solaris_threads.o aix_irix_threads.o pthread_support.o pthread_stop_world.o darwin_stop_world.o typd_mlc.o ptr_chck.o mallocx.o solaris_pthreads.o gcj_mlc.o specific.o gc_dlopen.o backgraph.o win32_threads.o ! CSRCS= reclaim.c allchblk.c misc.c alloc.c mach_dep.c os_dep.c mark_rts.c headers.c mark.c obj_map.c pcr_interface.c blacklst.c finalize.c new_hblk.c real_malloc.c dyn_load.c dbg_mlc.c malloc.c stubborn.c checksums.c solaris_threads.c aix_irix_threads.c pthread_support.c pthread_stop_world.c darwin_stop_world.c typd_mlc.c ptr_chck.c mallocx.c solaris_pthreads.c gcj_mlc.c specific.c gc_dlopen.c backgraph.c win32_threads.c CORD_SRCS= cord/cordbscs.c cord/cordxtra.c cord/cordprnt.c cord/de.c cord/cordtest.c include/cord.h include/ec.h include/private/cord_pos.h cord/de_win.c cord/de_win.h cord/de_cmds.h cord/de_win.ICO cord/de_win.RC CORD_OBJS= cord/cordbscs.o cord/cordxtra.o cord/cordprnt.o ! SRCS= $(CSRCS) mips_sgi_mach_dep.s rs6000_mach_dep.s alpha_mach_dep.S \ sparc_mach_dep.S include/gc.h include/gc_typed.h \ include/private/gc_hdrs.h include/private/gc_priv.h \ include/private/gcconfig.h include/private/gc_pmark.h \ *************** SRCS= $(CSRCS) mips_sgi_mach_dep.s rs600 *** 249,262 **** threadlibs.c if_mach.c if_not_there.c gc_cpp.cc include/gc_cpp.h \ gcname.c include/weakpointer.h include/private/gc_locks.h \ gcc_support.c mips_ultrix_mach_dep.s include/gc_alloc.h \ ! include/new_gc_alloc.h include/javaxfc.h sparc_sunos4_mach_dep.s \ ! sparc_netbsd_mach_dep.s \ include/private/solaris_threads.h include/gc_backptr.h \ hpux_test_and_clear.s include/gc_gcj.h \ include/gc_local_alloc.h include/private/dbg_mlc.h \ ! include/private/specific.h powerpc_macosx_mach_dep.s \ include/leak_detector.h include/gc_amiga_redirects.h \ ! include/gc_pthread_redirects.h $(CORD_SRCS) DOC_FILES= README.QUICK doc/README.Mac doc/README.MacOSX doc/README.OS2 \ doc/README.amiga doc/README.cords doc/debugging.html \ --- 288,304 ---- threadlibs.c if_mach.c if_not_there.c gc_cpp.cc include/gc_cpp.h \ gcname.c include/weakpointer.h include/private/gc_locks.h \ gcc_support.c mips_ultrix_mach_dep.s include/gc_alloc.h \ ! include/new_gc_alloc.h include/gc_allocator.h \ ! include/javaxfc.h sparc_sunos4_mach_dep.s sparc_netbsd_mach_dep.s \ include/private/solaris_threads.h include/gc_backptr.h \ hpux_test_and_clear.s include/gc_gcj.h \ include/gc_local_alloc.h include/private/dbg_mlc.h \ ! include/private/specific.h powerpc_darwin_mach_dep.s \ include/leak_detector.h include/gc_amiga_redirects.h \ ! include/gc_pthread_redirects.h ia64_save_regs_in_stack.s \ ! include/gc_config_macros.h include/private/pthread_support.h \ ! include/private/pthread_stop_world.h include/private/darwin_semaphore.h \ ! include/private/darwin_stop_world.h $(CORD_SRCS) DOC_FILES= README.QUICK doc/README.Mac doc/README.MacOSX doc/README.OS2 \ doc/README.amiga doc/README.cords doc/debugging.html \ *************** DOC_FILES= README.QUICK doc/README.Mac d *** 265,279 **** doc/README.win32 doc/barrett_diagram doc/README \ doc/README.contributors doc/README.changes doc/gc.man \ doc/README.environment doc/tree.html doc/gcdescr.html \ ! doc/README.autoconf doc/README.macros doc/README.ews4800 TESTS= tests/test.c tests/test_cpp.cc tests/trace_test.c \ tests/leak_test.c tests/thread_leak_test.c GNU_BUILD_FILES= configure.in Makefile.am configure acinclude.m4 \ libtool.m4 install-sh configure.host Makefile.in \ ! aclocal.m4 config.sub config.guess ltconfig \ ! ltmain.sh mkinstalldirs OTHER_MAKEFILES= OS2_MAKEFILE NT_MAKEFILE NT_THREADS_MAKEFILE gc.mak \ BCC_MAKEFILE EMX_MAKEFILE WCC_MAKEFILE Makefile.dj \ --- 307,325 ---- doc/README.win32 doc/barrett_diagram doc/README \ doc/README.contributors doc/README.changes doc/gc.man \ doc/README.environment doc/tree.html doc/gcdescr.html \ ! doc/README.autoconf doc/README.macros doc/README.ews4800 \ ! doc/README.DGUX386 doc/README.arm.cross doc/leak.html \ ! doc/scale.html doc/gcinterface.html doc/README.darwin TESTS= tests/test.c tests/test_cpp.cc tests/trace_test.c \ tests/leak_test.c tests/thread_leak_test.c GNU_BUILD_FILES= configure.in Makefile.am configure acinclude.m4 \ libtool.m4 install-sh configure.host Makefile.in \ ! ltconfig aclocal.m4 config.sub config.guess \ ! include/Makefile.am include/Makefile.in \ ! doc/Makefile.am doc/Makefile.in \ ! ltmain.sh mkinstalldirs depcomp missing OTHER_MAKEFILES= OS2_MAKEFILE NT_MAKEFILE NT_THREADS_MAKEFILE gc.mak \ BCC_MAKEFILE EMX_MAKEFILE WCC_MAKEFILE Makefile.dj \ *************** OTHER_FILES= Makefile setjmp_t.c callpro *** 285,291 **** MacProjects.sit.hqx MacOS.c \ Mac_files/datastart.c Mac_files/dataend.c \ Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h \ ! add_gc_prefix.c gc_cpp.cpp win32_threads.c \ version.h AmigaOS.c \ $(TESTS) $(GNU_BUILD_FILES) $(OTHER_MAKEFILES) --- 331,337 ---- MacProjects.sit.hqx MacOS.c \ Mac_files/datastart.c Mac_files/dataend.c \ Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h \ ! add_gc_prefix.c gc_cpp.cpp \ version.h AmigaOS.c \ $(TESTS) $(GNU_BUILD_FILES) $(OTHER_MAKEFILES) *************** mach_dep.o $(SRCS) *** 330,345 **** $(OBJS) tests/test.o dyn_load.o dyn_load_sunos53.o: \ $(srcdir)/include/private/gc_priv.h \ $(srcdir)/include/private/gc_hdrs.h $(srcdir)/include/private/gc_locks.h \ ! $(srcdir)/include/gc.h \ $(srcdir)/include/private/gcconfig.h $(srcdir)/include/gc_typed.h \ ! Makefile # The dependency on Makefile is needed. Changing # options such as -DSILENT affects the size of GC_arrays, # invalidating all .o files that rely on gc_priv.h mark.o typd_mlc.o finalize.o ptr_chck.o: $(srcdir)/include/gc_mark.h $(srcdir)/include/private/gc_pmark.h ! specific.o linux_threads.o: $(srcdir)/include/private/specific.h solaris_threads.o solaris_pthreads.o: $(srcdir)/include/private/solaris_threads.h --- 376,391 ---- $(OBJS) tests/test.o dyn_load.o dyn_load_sunos53.o: \ $(srcdir)/include/private/gc_priv.h \ $(srcdir)/include/private/gc_hdrs.h $(srcdir)/include/private/gc_locks.h \ ! $(srcdir)/include/gc.h $(srcdir)/include/gc_pthread_redirects.h \ $(srcdir)/include/private/gcconfig.h $(srcdir)/include/gc_typed.h \ ! $(srcdir)/include/gc_config_macros.h Makefile # The dependency on Makefile is needed. Changing # options such as -DSILENT affects the size of GC_arrays, # invalidating all .o files that rely on gc_priv.h mark.o typd_mlc.o finalize.o ptr_chck.o: $(srcdir)/include/gc_mark.h $(srcdir)/include/private/gc_pmark.h ! specific.o pthread_support.o: $(srcdir)/include/private/specific.h solaris_threads.o solaris_pthreads.o: $(srcdir)/include/private/solaris_threads.h *************** liblinuxgc.so: $(OBJS) dyn_load.o *** 434,450 **** # gcc -shared -Wl,-soname=libgc.so.0 -o libgc.so.0 $(LIBOBJS) dyn_load.lo # touch liblinuxgc.so ! mach_dep.o: $(srcdir)/mach_dep.c $(srcdir)/mips_sgi_mach_dep.s $(srcdir)/mips_ultrix_mach_dep.s \ ! $(srcdir)/rs6000_mach_dep.s $(srcdir)/powerpc_macosx_mach_dep.s $(UTILS) rm -f mach_dep.o ! ./if_mach MIPS IRIX5 $(AS) -o mach_dep.o $(srcdir)/mips_sgi_mach_dep.s ./if_mach MIPS RISCOS $(AS) -o mach_dep.o $(srcdir)/mips_ultrix_mach_dep.s ./if_mach MIPS ULTRIX $(AS) -o mach_dep.o $(srcdir)/mips_ultrix_mach_dep.s ! ./if_mach RS6000 "" $(AS) -o mach_dep.o $(srcdir)/rs6000_mach_dep.s ! ./if_mach POWERPC MACOSX $(AS) -o mach_dep.o $(srcdir)/powerpc_macosx_mach_dep.s ! # ./if_mach ALPHA "" $(AS) -o mach_dep.o $(srcdir)/alpha_mach_dep.s ! # alpha_mach_dep.s assumes that pointers are not saved in fp registers. ! # Gcc on a 21264 can spill pointers to fp registers. Oops. ./if_mach SPARC SUNOS5 $(CC) -c -o mach_dep.o $(srcdir)/sparc_mach_dep.S ./if_mach SPARC SUNOS4 $(AS) -o mach_dep.o $(srcdir)/sparc_sunos4_mach_dep.s ./if_mach SPARC OPENBSD $(AS) -o mach_dep.o $(srcdir)/sparc_sunos4_mach_dep.s --- 480,497 ---- # gcc -shared -Wl,-soname=libgc.so.0 -o libgc.so.0 $(LIBOBJS) dyn_load.lo # touch liblinuxgc.so ! mach_dep.o: $(srcdir)/mach_dep.c $(srcdir)/mips_sgi_mach_dep.s \ ! $(srcdir)/mips_ultrix_mach_dep.s \ ! $(srcdir)/rs6000_mach_dep.s $(srcdir)/powerpc_darwin_mach_dep.s \ ! $(srcdir)/sparc_mach_dep.S $(srcdir)/sparc_sunos4_mach_dep.s \ ! $(srcdir)/ia64_save_regs_in_stack.s \ ! $(srcdir)/sparc_netbsd_mach_dep.s $(UTILS) rm -f mach_dep.o ! ./if_mach MIPS IRIX5 $(CC) -c -o mach_dep.o $(srcdir)/mips_sgi_mach_dep.s ./if_mach MIPS RISCOS $(AS) -o mach_dep.o $(srcdir)/mips_ultrix_mach_dep.s ./if_mach MIPS ULTRIX $(AS) -o mach_dep.o $(srcdir)/mips_ultrix_mach_dep.s ! ./if_mach POWERPC DARWIN $(AS) -o mach_dep.o $(srcdir)/powerpc_darwin_mach_dep.s ! ./if_mach ALPHA LINUX $(CC) -c -o mach_dep.o $(srcdir)/alpha_mach_dep.S ./if_mach SPARC SUNOS5 $(CC) -c -o mach_dep.o $(srcdir)/sparc_mach_dep.S ./if_mach SPARC SUNOS4 $(AS) -o mach_dep.o $(srcdir)/sparc_sunos4_mach_dep.s ./if_mach SPARC OPENBSD $(AS) -o mach_dep.o $(srcdir)/sparc_sunos4_mach_dep.s *************** cord/de: $(srcdir)/cord/de.c cord/cordbs *** 491,497 **** ./if_mach SPARC DRSNX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $(CURSES) -lucb `./threadlibs` ./if_mach HP_PA HPUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $(CURSES) -ldld `./threadlibs` ./if_mach RS6000 "" $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses ! ./if_mach POWERPC MACOSX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a ./if_mach I386 LINUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses `./threadlibs` ./if_mach ALPHA LINUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses `./threadlibs` ./if_mach IA64 LINUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses `./threadlibs` --- 538,544 ---- ./if_mach SPARC DRSNX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $(CURSES) -lucb `./threadlibs` ./if_mach HP_PA HPUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $(CURSES) -ldld `./threadlibs` ./if_mach RS6000 "" $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses ! ./if_mach POWERPC DARWIN $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a ./if_mach I386 LINUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses `./threadlibs` ./if_mach ALPHA LINUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses `./threadlibs` ./if_mach IA64 LINUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses `./threadlibs` *************** if_not_there: $(srcdir)/if_not_there.c *** 510,516 **** clean: rm -f gc.a *.o *.exe tests/*.o gctest gctest_dyn_link test_cpp \ setjmp_test mon.out gmon.out a.out core if_not_there if_mach \ ! threadlibs $(CORD_OBJS) cord/cordtest cord/de -rm -f *~ gctest: tests/test.o gc.a $(UTILS) --- 557,563 ---- clean: rm -f gc.a *.o *.exe tests/*.o gctest gctest_dyn_link test_cpp \ setjmp_test mon.out gmon.out a.out core if_not_there if_mach \ ! threadlibs $(CORD_OBJS) cord/cordtest cord/de -rm -f *~ gctest: tests/test.o gc.a $(UTILS) diff -Nrc3pad gcc-3.3.3/boehm-gc/Makefile.dj gcc-3.4.0/boehm-gc/Makefile.dj *** gcc-3.3.3/boehm-gc/Makefile.dj 2001-10-16 09:01:34.000000000 +0000 --- gcc-3.4.0/boehm-gc/Makefile.dj 2003-07-28 04:18:20.000000000 +0000 *************** CFLAGS= -O -I$(srcdir)/include -DATOMIC_ *** 152,158 **** # currently probably works only with Linux. ! CXXFLAGS= $(CFLAGS) -DOPERATOR_NEW_ARRAY AR= ar RANLIB= ranlib --- 152,158 ---- # currently probably works only with Linux. ! CXXFLAGS= $(CFLAGS) -DGC_OPERATOR_NEW_ARRAY AR= ar RANLIB= ranlib *************** CORD_SRCS= cord/cordbscs.c cord/cordxtr *** 165,172 **** CORD_OBJS= cord/cordbscs.o cord/cordxtra.o cord/cordprnt.o ! SRCS= $(CSRCS) mips_sgi_mach_dep.s rs6000_mach_dep.s alpha_mach_dep.s \ ! sparc_mach_dep.s include/gc.h include/gc_typed.h \ include/private/gc_hdrs.h include/private/gc_priv.h \ include/private/gcconfig.h include/private/gc_mark.h \ include/gc_inl.h include/gc_inline.h gc.man \ --- 165,172 ---- CORD_OBJS= cord/cordbscs.o cord/cordxtra.o cord/cordprnt.o ! SRCS= $(CSRCS) mips_sgi_mach_dep.S rs6000_mach_dep.s alpha_mach_dep.S \ ! sparc_mach_dep.S include/gc.h include/gc_typed.h \ include/private/gc_hdrs.h include/private/gc_priv.h \ include/private/gcconfig.h include/private/gc_mark.h \ include/gc_inl.h include/gc_inline.h gc.man \ *************** SRCS= $(CSRCS) mips_sgi_mach_dep.s rs600 *** 177,183 **** include/private/solaris_threads.h include/gc_backptr.h \ hpux_test_and_clear.s include/gc_gcj.h \ include/gc_local_alloc.h include/private/dbg_mlc.h \ ! include/private/specific.h powerpc_macosx_mach_dep.s \ include/leak_detector.h $(CORD_SRCS) OTHER_FILES= Makefile PCR-Makefile OS2_MAKEFILE NT_MAKEFILE BCC_MAKEFILE \ --- 177,183 ---- include/private/solaris_threads.h include/gc_backptr.h \ hpux_test_and_clear.s include/gc_gcj.h \ include/gc_local_alloc.h include/private/dbg_mlc.h \ ! include/private/specific.h powerpc_darwin_mach_dep.s \ include/leak_detector.h $(CORD_SRCS) OTHER_FILES= Makefile PCR-Makefile OS2_MAKEFILE NT_MAKEFILE BCC_MAKEFILE \ *************** liblinuxgc.so: $(OBJS) dyn_load.o *** 284,299 **** gcc -shared -o liblinuxgc.so $(OBJS) dyn_load.o -lo ln liblinuxgc.so libgc.so ! mach_dep.o: $(srcdir)/mach_dep.c $(srcdir)/mips_sgi_mach_dep.s $(srcdir)/mips_ultrix_mach_dep.s \ ! $(srcdir)/rs6000_mach_dep.s $(srcdir)/powerpc_macosx_mach_dep.s $(UTILS) rm -f mach_dep.o ! ./if_mach MIPS IRIX5 $(AS) -o mach_dep.o $(srcdir)/mips_sgi_mach_dep.s ./if_mach MIPS RISCOS $(AS) -o mach_dep.o $(srcdir)/mips_ultrix_mach_dep.s ./if_mach MIPS ULTRIX $(AS) -o mach_dep.o $(srcdir)/mips_ultrix_mach_dep.s ./if_mach RS6000 "" $(AS) -o mach_dep.o $(srcdir)/rs6000_mach_dep.s ! ./if_mach POWERPC MACOSX $(AS) -o mach_dep.o $(srcdir)/powerpc_macosx_mach_dep.s ! ./if_mach ALPHA "" $(AS) -o mach_dep.o $(srcdir)/alpha_mach_dep.s ! ./if_mach SPARC SUNOS5 $(AS) -o mach_dep.o $(srcdir)/sparc_mach_dep.s ./if_mach SPARC SUNOS4 $(AS) -o mach_dep.o $(srcdir)/sparc_sunos4_mach_dep.s ./if_not_there mach_dep.o $(CC) -c $(SPECIALCFLAGS) $(srcdir)/mach_dep.c --- 284,299 ---- gcc -shared -o liblinuxgc.so $(OBJS) dyn_load.o -lo ln liblinuxgc.so libgc.so ! mach_dep.o: $(srcdir)/mach_dep.c $(srcdir)/mips_sgi_mach_dep.S $(srcdir)/mips_ultrix_mach_dep.s \ ! $(srcdir)/rs6000_mach_dep.s $(srcdir)/powerpc_darwin_mach_dep.s $(UTILS) rm -f mach_dep.o ! ./if_mach MIPS IRIX5 $(AS) -o mach_dep.o $(srcdir)/mips_sgi_mach_dep.S ./if_mach MIPS RISCOS $(AS) -o mach_dep.o $(srcdir)/mips_ultrix_mach_dep.s ./if_mach MIPS ULTRIX $(AS) -o mach_dep.o $(srcdir)/mips_ultrix_mach_dep.s ./if_mach RS6000 "" $(AS) -o mach_dep.o $(srcdir)/rs6000_mach_dep.s ! ./if_mach POWERPC MACOSX $(AS) -o mach_dep.o $(srcdir)/powerpc_darwin_mach_dep.s ! ./if_mach ALPHA "" $(AS) -o mach_dep.o $(srcdir)/alpha_mach_dep.S ! ./if_mach SPARC SUNOS5 $(AS) -o mach_dep.o $(srcdir)/sparc_mach_dep.S ./if_mach SPARC SUNOS4 $(AS) -o mach_dep.o $(srcdir)/sparc_sunos4_mach_dep.s ./if_not_there mach_dep.o $(CC) -c $(SPECIALCFLAGS) $(srcdir)/mach_dep.c diff -Nrc3pad gcc-3.3.3/boehm-gc/Makefile.in gcc-3.4.0/boehm-gc/Makefile.in *** gcc-3.3.3/boehm-gc/Makefile.in 2004-02-14 20:34:20.000000000 +0000 --- gcc-3.4.0/boehm-gc/Makefile.in 2004-04-19 02:23:04.000000000 +0000 *************** *** 1,6 **** ! # Makefile.in generated automatically by automake 1.4 from Makefile.am ! # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. --- 1,6 ---- ! # Makefile.in generated automatically by automake 1.4-p5 from Makefile.am ! # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. *************** target_triplet = @target@ *** 66,74 **** --- 66,76 ---- AR = @AR@ AS = @AS@ CC = @CC@ + CFLAGS = @CFLAGS@ CPP = @CPP@ CXX = @CXX@ CXXCPP = @CXXCPP@ + CXXFLAGS = @CXXFLAGS@ CXXINCLUDES = @CXXINCLUDES@ DLLTOOL = @DLLTOOL@ EXEEXT = @EXEEXT@ *************** RANLIB = @RANLIB@ *** 89,95 **** --- 91,100 ---- STRIP = @STRIP@ THREADLIBS = @THREADLIBS@ VERSION = @VERSION@ + addincludes = @addincludes@ + addlibs = @addlibs@ addobjs = @addobjs@ + addtests = @addtests@ gc_basedir = @gc_basedir@ mkinstalldirs = @mkinstalldirs@ target_all = @target_all@ *************** MULTIDO = true *** 109,125 **** MULTICLEAN = true noinst_LTLIBRARIES = libgcjgc.la libgcjgc_convenience.la GC_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \ ! dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c irix_threads.c \ ! linux_threads.c malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \ obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \ solaris_pthreads.c solaris_threads.c specific.c stubborn.c typd_mlc.c \ ! backgraph.c win32_threads.c ! EXTRA_GC_SOURCES = alpha_mach_dep.s \ ! mips_sgi_mach_dep.S mips_ultrix_mach_dep.s powerpc_macosx_mach_dep.s \ rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s \ sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s --- 114,134 ---- MULTICLEAN = true noinst_LTLIBRARIES = libgcjgc.la libgcjgc_convenience.la + @POWERPC_DARWIN_TRUE@asm_libgc_sources = @POWERPC_DARWIN_TRUE@powerpc_darwin_mach_dep.s + @POWERPC_DARWIN_FALSE@asm_libgc_sources = GC_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \ ! dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c aix_irix_threads.c \ ! malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \ obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \ solaris_pthreads.c solaris_threads.c specific.c stubborn.c typd_mlc.c \ ! backgraph.c win32_threads.c \ ! pthread_support.c pthread_stop_world.c darwin_stop_world.c \ ! $(asm_libgc_sources) ! EXTRA_GC_SOURCES = alpha_mach_dep.S \ ! mips_sgi_mach_dep.s mips_ultrix_mach_dep.s powerpc_darwin_mach_dep.s \ rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s \ sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s *************** DEFS = @DEFS@ -I. -I$(srcdir) *** 213,236 **** CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ ! libgcjgc_la_OBJECTS = allchblk.lo alloc.lo blacklst.lo checksums.lo \ ! dbg_mlc.lo dyn_load.lo finalize.lo gc_dlopen.lo gcj_mlc.lo headers.lo \ ! irix_threads.lo linux_threads.lo malloc.lo mallocx.lo mark.lo \ ! mark_rts.lo misc.lo new_hblk.lo obj_map.lo os_dep.lo pcr_interface.lo \ ! ptr_chck.lo real_malloc.lo reclaim.lo solaris_pthreads.lo \ ! solaris_threads.lo specific.lo stubborn.lo typd_mlc.lo backgraph.lo \ ! win32_threads.lo libgcjgc_convenience_la_LDFLAGS = ! libgcjgc_convenience_la_OBJECTS = allchblk.lo alloc.lo blacklst.lo \ ! checksums.lo dbg_mlc.lo dyn_load.lo finalize.lo gc_dlopen.lo gcj_mlc.lo \ ! headers.lo irix_threads.lo linux_threads.lo malloc.lo mallocx.lo \ ! mark.lo mark_rts.lo misc.lo new_hblk.lo obj_map.lo os_dep.lo \ ! pcr_interface.lo ptr_chck.lo real_malloc.lo reclaim.lo \ ! solaris_pthreads.lo solaris_threads.lo specific.lo stubborn.lo \ ! typd_mlc.lo backgraph.lo win32_threads.lo check_PROGRAMS = gctest$(EXEEXT) gctest_DEPENDENCIES = ./libgcjgc.la - CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) DIST_COMMON = ChangeLog Makefile.am Makefile.in acinclude.m4 aclocal.m4 \ --- 222,274 ---- CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ ! @POWERPC_DARWIN_FALSE@libgcjgc_la_OBJECTS = allchblk.lo alloc.lo \ ! @POWERPC_DARWIN_FALSE@blacklst.lo checksums.lo dbg_mlc.lo dyn_load.lo \ ! @POWERPC_DARWIN_FALSE@finalize.lo gc_dlopen.lo gcj_mlc.lo headers.lo \ ! @POWERPC_DARWIN_FALSE@aix_irix_threads.lo malloc.lo mallocx.lo mark.lo \ ! @POWERPC_DARWIN_FALSE@mark_rts.lo misc.lo new_hblk.lo obj_map.lo \ ! @POWERPC_DARWIN_FALSE@os_dep.lo pcr_interface.lo ptr_chck.lo \ ! @POWERPC_DARWIN_FALSE@real_malloc.lo reclaim.lo solaris_pthreads.lo \ ! @POWERPC_DARWIN_FALSE@solaris_threads.lo specific.lo stubborn.lo \ ! @POWERPC_DARWIN_FALSE@typd_mlc.lo backgraph.lo win32_threads.lo \ ! @POWERPC_DARWIN_FALSE@pthread_support.lo pthread_stop_world.lo \ ! @POWERPC_DARWIN_FALSE@darwin_stop_world.lo ! @POWERPC_DARWIN_TRUE@libgcjgc_la_OBJECTS = allchblk.lo alloc.lo \ ! @POWERPC_DARWIN_TRUE@blacklst.lo checksums.lo dbg_mlc.lo dyn_load.lo \ ! @POWERPC_DARWIN_TRUE@finalize.lo gc_dlopen.lo gcj_mlc.lo headers.lo \ ! @POWERPC_DARWIN_TRUE@aix_irix_threads.lo malloc.lo mallocx.lo mark.lo \ ! @POWERPC_DARWIN_TRUE@mark_rts.lo misc.lo new_hblk.lo obj_map.lo \ ! @POWERPC_DARWIN_TRUE@os_dep.lo pcr_interface.lo ptr_chck.lo \ ! @POWERPC_DARWIN_TRUE@real_malloc.lo reclaim.lo solaris_pthreads.lo \ ! @POWERPC_DARWIN_TRUE@solaris_threads.lo specific.lo stubborn.lo \ ! @POWERPC_DARWIN_TRUE@typd_mlc.lo backgraph.lo win32_threads.lo \ ! @POWERPC_DARWIN_TRUE@pthread_support.lo pthread_stop_world.lo \ ! @POWERPC_DARWIN_TRUE@darwin_stop_world.lo powerpc_darwin_mach_dep.lo libgcjgc_convenience_la_LDFLAGS = ! @POWERPC_DARWIN_FALSE@libgcjgc_convenience_la_OBJECTS = allchblk.lo \ ! @POWERPC_DARWIN_FALSE@alloc.lo blacklst.lo checksums.lo dbg_mlc.lo \ ! @POWERPC_DARWIN_FALSE@dyn_load.lo finalize.lo gc_dlopen.lo gcj_mlc.lo \ ! @POWERPC_DARWIN_FALSE@headers.lo aix_irix_threads.lo malloc.lo \ ! @POWERPC_DARWIN_FALSE@mallocx.lo mark.lo mark_rts.lo misc.lo \ ! @POWERPC_DARWIN_FALSE@new_hblk.lo obj_map.lo os_dep.lo pcr_interface.lo \ ! @POWERPC_DARWIN_FALSE@ptr_chck.lo real_malloc.lo reclaim.lo \ ! @POWERPC_DARWIN_FALSE@solaris_pthreads.lo solaris_threads.lo \ ! @POWERPC_DARWIN_FALSE@specific.lo stubborn.lo typd_mlc.lo backgraph.lo \ ! @POWERPC_DARWIN_FALSE@win32_threads.lo pthread_support.lo \ ! @POWERPC_DARWIN_FALSE@pthread_stop_world.lo darwin_stop_world.lo ! @POWERPC_DARWIN_TRUE@libgcjgc_convenience_la_OBJECTS = allchblk.lo \ ! @POWERPC_DARWIN_TRUE@alloc.lo blacklst.lo checksums.lo dbg_mlc.lo \ ! @POWERPC_DARWIN_TRUE@dyn_load.lo finalize.lo gc_dlopen.lo gcj_mlc.lo \ ! @POWERPC_DARWIN_TRUE@headers.lo aix_irix_threads.lo malloc.lo \ ! @POWERPC_DARWIN_TRUE@mallocx.lo mark.lo mark_rts.lo misc.lo new_hblk.lo \ ! @POWERPC_DARWIN_TRUE@obj_map.lo os_dep.lo pcr_interface.lo ptr_chck.lo \ ! @POWERPC_DARWIN_TRUE@real_malloc.lo reclaim.lo solaris_pthreads.lo \ ! @POWERPC_DARWIN_TRUE@solaris_threads.lo specific.lo stubborn.lo \ ! @POWERPC_DARWIN_TRUE@typd_mlc.lo backgraph.lo win32_threads.lo \ ! @POWERPC_DARWIN_TRUE@pthread_support.lo pthread_stop_world.lo \ ! @POWERPC_DARWIN_TRUE@darwin_stop_world.lo powerpc_darwin_mach_dep.lo check_PROGRAMS = gctest$(EXEEXT) gctest_DEPENDENCIES = ./libgcjgc.la COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) DIST_COMMON = ChangeLog Makefile.am Makefile.in acinclude.m4 aclocal.m4 \ *************** maintainer-clean-recursive: *** 368,374 **** dot_seen=no; \ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ rev="$$subdir $$rev"; \ ! test "$$subdir" = "." && dot_seen=yes; \ done; \ test "$$dot_seen" = "no" && rev=". $$rev"; \ target=`echo $@ | sed s/-recursive//`; \ --- 406,412 ---- dot_seen=no; \ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ rev="$$subdir $$rev"; \ ! test "$$subdir" != "." || dot_seen=yes; \ done; \ test "$$dot_seen" = "no" && rev=". $$rev"; \ target=`echo $@ | sed s/-recursive//`; \ *************** mostlyclean distclean maintainer-clean *** 598,604 **** test.o: tests/test.c $(COMPILE) -c $(srcdir)/tests/test.c $(all_objs) : include/private/gcconfig.h include/private/gc_priv.h \ ! include/private/gc_hdrs.h include/gc.h include/gc_gcj.h include/gc_mark.h .s.lo: $(LTCOMPILE) -Wp,-P -x assembler-with-cpp -c $< --- 636,644 ---- test.o: tests/test.c $(COMPILE) -c $(srcdir)/tests/test.c $(all_objs) : include/private/gcconfig.h include/private/gc_priv.h \ ! include/private/gc_hdrs.h include/gc.h include/gc_gcj.h \ ! include/gc_pthread_redirects.h include/gc_config_macros.h \ ! include/gc_mark.h @addincludes@ .s.lo: $(LTCOMPILE) -Wp,-P -x assembler-with-cpp -c $< diff -Nrc3pad gcc-3.3.3/boehm-gc/malloc.c gcc-3.4.0/boehm-gc/malloc.c *** gcc-3.3.3/boehm-gc/malloc.c 2002-02-12 04:37:53.000000000 +0000 --- gcc-3.4.0/boehm-gc/malloc.c 2004-01-07 21:47:35.000000000 +0000 *************** register int k; *** 182,187 **** --- 182,188 ---- ptr_t result; DCL_LOCK_STATE; + if (GC_have_errors) GC_print_all_errors(); GC_INVOKE_FINALIZERS(); if (SMALL_OBJ(lb)) { DISABLE_SIGNALS(); *************** register int k; *** 216,222 **** GC_words_allocd += lw; UNLOCK(); ENABLE_SIGNALS(); ! if (init & !GC_debugging_started && 0 != result) { BZERO(result, n_blocks * HBLKSIZE); } } --- 217,223 ---- GC_words_allocd += lw; UNLOCK(); ENABLE_SIGNALS(); ! if (init && !GC_debugging_started && 0 != result) { BZERO(result, n_blocks * HBLKSIZE); } } *************** DCL_LOCK_STATE; *** 294,299 **** --- 295,305 ---- return(GENERAL_MALLOC((word)lb, NORMAL)); } /* See above comment on signals. */ + GC_ASSERT(0 == obj_link(op) + || (word)obj_link(op) + <= (word)GC_greatest_plausible_heap_addr + && (word)obj_link(op) + >= (word)GC_least_plausible_heap_addr); *opp = obj_link(op); obj_link(op) = 0; GC_words_allocd += lw; *************** DCL_LOCK_STATE; *** 338,343 **** --- 344,350 ---- return((GC_PTR)REDIRECT_MALLOC(n*lb)); } + #ifndef strdup # include # ifdef __STDC__ char *strdup(const char *s) *************** DCL_LOCK_STATE; *** 346,356 **** char *s; # endif { ! size_t len = strlen + 1; char * result = ((char *)REDIRECT_MALLOC(len+1)); BCOPY(s, result, len+1); return result; } # endif /* REDIRECT_MALLOC */ /* Explicitly deallocate an object p. */ --- 353,368 ---- char *s; # endif { ! size_t len = strlen(s) + 1; char * result = ((char *)REDIRECT_MALLOC(len+1)); BCOPY(s, result, len+1); return result; } + #endif /* !defined(strdup) */ + /* If strdup is macro defined, we assume that it actually calls malloc, */ + /* and thus the right thing will happen even without overriding it. */ + /* This seems to be true on most Linux systems. */ + # endif /* REDIRECT_MALLOC */ /* Explicitly deallocate an object p. */ *************** DCL_LOCK_STATE; *** 373,378 **** --- 385,391 ---- /* Required by ANSI. It's not my fault ... */ h = HBLKPTR(p); hhdr = HDR(h); + GC_ASSERT(GC_base(p) == p); # if defined(REDIRECT_MALLOC) && \ (defined(GC_SOLARIS_THREADS) || defined(GC_LINUX_THREADS) \ || defined(__MINGW32__)) /* Should this be MSWIN32 in general? */ *************** void GC_free_inner(GC_PTR p) *** 454,460 **** } #endif /* THREADS */ ! # ifdef REDIRECT_MALLOC # ifdef __STDC__ void free(GC_PTR p) # else --- 467,476 ---- } #endif /* THREADS */ ! # if defined(REDIRECT_MALLOC) && !defined(REDIRECT_FREE) ! # define REDIRECT_FREE GC_free ! # endif ! # ifdef REDIRECT_FREE # ifdef __STDC__ void free(GC_PTR p) # else *************** void GC_free_inner(GC_PTR p) *** 463,469 **** # endif { # ifndef IGNORE_FREE ! GC_free(p); # endif } # endif /* REDIRECT_MALLOC */ --- 479,485 ---- # endif { # ifndef IGNORE_FREE ! REDIRECT_FREE(p); # endif } # endif /* REDIRECT_MALLOC */ diff -Nrc3pad gcc-3.3.3/boehm-gc/mallocx.c gcc-3.4.0/boehm-gc/mallocx.c *** gcc-3.3.3/boehm-gc/mallocx.c 2001-08-18 01:04:43.000000000 +0000 --- gcc-3.4.0/boehm-gc/mallocx.c 2004-01-07 21:47:35.000000000 +0000 *************** int obj_kind; *** 142,148 **** } } ! # if defined(REDIRECT_MALLOC) || defined(REDIRECT_REALLOC) # ifdef __STDC__ GC_PTR realloc(GC_PTR p, size_t lb) # else --- 142,152 ---- } } ! # if defined(REDIRECT_MALLOC) && !defined(REDIRECT_REALLOC) ! # define REDIRECT_REALLOC GC_realloc ! # endif ! ! # ifdef REDIRECT_REALLOC # ifdef __STDC__ GC_PTR realloc(GC_PTR p, size_t lb) # else *************** int obj_kind; *** 151,163 **** size_t lb; # endif { ! # ifdef REDIRECT_REALLOC ! return(REDIRECT_REALLOC(p, lb)); ! # else ! return(GC_realloc(p, lb)); ! # endif } ! # endif /* REDIRECT_MALLOC */ /* The same thing, except caller does not hold allocation lock. */ --- 155,163 ---- size_t lb; # endif { ! return(REDIRECT_REALLOC(p, lb)); } ! # endif /* REDIRECT_REALLOC */ /* The same thing, except caller does not hold allocation lock. */ *************** register int k; *** 177,182 **** --- 177,183 ---- lw = ROUNDED_UP_WORDS(lb); n_blocks = OBJ_SZ_TO_BLOCKS(lw); init = GC_obj_kinds[k].ok_init; + if (GC_have_errors) GC_print_all_errors(); GC_INVOKE_FINALIZERS(); DISABLE_SIGNALS(); LOCK(); *************** register int k; *** 201,207 **** if (0 == result) { return((*GC_oom_fn)(lb)); } else { ! if (init & !GC_debugging_started) { BZERO(result, n_blocks * HBLKSIZE); } return(result); --- 202,208 ---- if (0 == result) { return((*GC_oom_fn)(lb)); } else { ! if (init && !GC_debugging_started) { BZERO(result, n_blocks * HBLKSIZE); } return(result); *************** register struct obj_kind * kind = GC_obj *** 286,291 **** --- 287,293 ---- register ptr_t op; DCL_LOCK_STATE; + if (GC_have_errors) GC_print_all_errors(); GC_INVOKE_FINALIZERS(); DISABLE_SIGNALS(); LOCK(); *************** DCL_LOCK_STATE; *** 354,359 **** --- 356,362 ---- return; } lw = ALIGNED_WORDS(lb); + if (GC_have_errors) GC_print_all_errors(); GC_INVOKE_FINALIZERS(); DISABLE_SIGNALS(); LOCK(); *************** DCL_LOCK_STATE; *** 375,380 **** --- 378,384 ---- while ((hbp = *rlh) != 0) { hhdr = HDR(hbp); *rlh = hhdr -> hb_next; + hhdr -> hb_last_reclaimed = (unsigned short) GC_gc_no; # ifdef PARALLEL_MARK { signed_word my_words_allocd_tmp = GC_words_allocd_tmp; *************** DCL_LOCK_STATE; *** 575,580 **** --- 579,622 ---- } } + #ifdef __STDC__ + /* Not well tested nor integrated. */ + /* Debug version is tricky and currently missing. */ + #include + + GC_PTR GC_memalign(size_t align, size_t lb) + { + size_t new_lb; + size_t offset; + ptr_t result; + + # ifdef ALIGN_DOUBLE + if (align <= WORDS_TO_BYTES(2) && lb > align) return GC_malloc(lb); + # endif + if (align <= WORDS_TO_BYTES(1)) return GC_malloc(lb); + if (align >= HBLKSIZE/2 || lb >= HBLKSIZE/2) { + if (align > HBLKSIZE) return GC_oom_fn(LONG_MAX-1024) /* Fail */; + return GC_malloc(lb <= HBLKSIZE? HBLKSIZE : lb); + /* Will be HBLKSIZE aligned. */ + } + /* We could also try to make sure that the real rounded-up object size */ + /* is a multiple of align. That would be correct up to HBLKSIZE. */ + new_lb = lb + align - 1; + result = GC_malloc(new_lb); + offset = (word)result % align; + if (offset != 0) { + offset = align - offset; + if (!GC_all_interior_pointers) { + if (offset >= VALID_OFFSET_SZ) return GC_malloc(HBLKSIZE); + GC_register_displacement(offset); + } + } + result = (GC_PTR) ((ptr_t)result + offset); + GC_ASSERT((word)result % align == 0); + return result; + } + #endif + # ifdef ATOMIC_UNCOLLECTABLE /* Allocate lb bytes of pointerfree, untraced, uncollectable data */ /* This is normally roughly equivalent to the system malloc. */ diff -Nrc3pad gcc-3.3.3/boehm-gc/mark.c gcc-3.4.0/boehm-gc/mark.c *** gcc-3.3.3/boehm-gc/mark.c 2002-03-29 22:52:12.000000000 +0000 --- gcc-3.4.0/boehm-gc/mark.c 2003-07-28 04:18:20.000000000 +0000 *************** *** 19,24 **** --- 19,28 ---- # include # include "private/gc_pmark.h" + #if defined(MSWIN32) && defined(__GNUC__) + # include + #endif + /* We put this here to minimize the risk of inlining. */ /*VARARGS*/ #ifdef __WATCOMC__ *************** static void alloc_mark_stack(); *** 261,280 **** /* remains valid until all marking is complete. */ /* A zero value indicates that it's OK to miss some */ /* register values. */ ! GC_bool GC_mark_some(cold_gc_frame) ! ptr_t cold_gc_frame; { - #if defined(MSWIN32) && !defined(__GNUC__) - /* Windows 98 appears to asynchronously create and remove writable */ - /* memory mappings, for reasons we haven't yet understood. Since */ - /* we look for writable regions to determine the root set, we may */ - /* try to mark from an address range that disappeared since we */ - /* started the collection. Thus we have to recover from faults here. */ - /* This code does not appear to be necessary for Windows 95/NT/2000. */ - /* Note that this code should never generate an incremental GC write */ - /* fault. */ - __try { - #endif /* defined(MSWIN32) && !defined(__GNUC__) */ switch(GC_mark_state) { case MS_NONE: return(FALSE); --- 265,284 ---- /* remains valid until all marking is complete. */ /* A zero value indicates that it's OK to miss some */ /* register values. */ ! /* We hold the allocation lock. In the case of */ ! /* incremental collection, the world may not be stopped.*/ ! #ifdef MSWIN32 ! /* For win32, this is called after we establish a structured */ ! /* exception handler, in case Windows unmaps one of our root */ ! /* segments. See below. In either case, we acquire the */ ! /* allocator lock long before we get here. */ ! GC_bool GC_mark_some_inner(cold_gc_frame) ! ptr_t cold_gc_frame; ! #else ! GC_bool GC_mark_some(cold_gc_frame) ! ptr_t cold_gc_frame; ! #endif { switch(GC_mark_state) { case MS_NONE: return(FALSE); *************** ptr_t cold_gc_frame; *** 395,417 **** ABORT("GC_mark_some: bad state"); return(FALSE); } ! #if defined(MSWIN32) && !defined(__GNUC__) ! } __except (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION ? ! EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) { ! # ifdef CONDPRINT ! if (GC_print_stats) { ! GC_printf0("Caught ACCESS_VIOLATION in marker. " ! "Memory mapping disappeared.\n"); } ! # endif /* CONDPRINT */ ! /* We have bad roots on the stack. Discard mark stack. */ ! /* Rescan from marked objects. Redetermine roots. */ ! GC_invalidate_mark_state(); ! scan_ptr = 0; ! return FALSE; } ! #endif /* defined(MSWIN32) && !defined(__GNUC__) */ ! } GC_bool GC_mark_stack_empty() --- 399,528 ---- ABORT("GC_mark_some: bad state"); return(FALSE); } ! } ! ! ! #ifdef MSWIN32 ! ! # ifdef __GNUC__ ! ! typedef struct { ! EXCEPTION_REGISTRATION ex_reg; ! void *alt_path; ! } ext_ex_regn; ! ! ! static EXCEPTION_DISPOSITION mark_ex_handler( ! struct _EXCEPTION_RECORD *ex_rec, ! void *est_frame, ! struct _CONTEXT *context, ! void *disp_ctxt) ! { ! if (ex_rec->ExceptionCode == STATUS_ACCESS_VIOLATION) { ! ext_ex_regn *xer = (ext_ex_regn *)est_frame; ! ! /* Unwind from the inner function assuming the standard */ ! /* function prologue. */ ! /* Assumes code has not been compiled with */ ! /* -fomit-frame-pointer. */ ! context->Esp = context->Ebp; ! context->Ebp = *((DWORD *)context->Esp); ! context->Esp = context->Esp - 8; ! ! /* Resume execution at the "real" handler within the */ ! /* wrapper function. */ ! context->Eip = (DWORD )(xer->alt_path); ! ! return ExceptionContinueExecution; ! ! } else { ! return ExceptionContinueSearch; ! } ! } ! # endif /* __GNUC__ */ ! ! ! GC_bool GC_mark_some(cold_gc_frame) ! ptr_t cold_gc_frame; ! { ! GC_bool ret_val; ! ! # ifndef __GNUC__ ! /* Windows 98 appears to asynchronously create and remove */ ! /* writable memory mappings, for reasons we haven't yet */ ! /* understood. Since we look for writable regions to */ ! /* determine the root set, we may try to mark from an */ ! /* address range that disappeared since we started the */ ! /* collection. Thus we have to recover from faults here. */ ! /* This code does not appear to be necessary for Windows */ ! /* 95/NT/2000. Note that this code should never generate */ ! /* an incremental GC write fault. */ ! ! __try { ! ! # else /* __GNUC__ */ ! ! /* Manually install an exception handler since GCC does */ ! /* not yet support Structured Exception Handling (SEH) on */ ! /* Win32. */ ! ! ext_ex_regn er; ! ! er.alt_path = &&handle_ex; ! er.ex_reg.handler = mark_ex_handler; ! asm volatile ("movl %%fs:0, %0" : "=r" (er.ex_reg.prev)); ! asm volatile ("movl %0, %%fs:0" : : "r" (&er)); ! ! # endif /* __GNUC__ */ ! ! ret_val = GC_mark_some_inner(cold_gc_frame); ! ! # ifndef __GNUC__ ! ! } __except (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION ? ! EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) { ! ! # else /* __GNUC__ */ ! ! /* Prevent GCC from considering the following code unreachable */ ! /* and thus eliminating it. */ ! if (er.alt_path != 0) ! goto rm_handler; ! ! handle_ex: ! /* Execution resumes from here on an access violation. */ ! ! # endif /* __GNUC__ */ ! ! # ifdef CONDPRINT ! if (GC_print_stats) { ! GC_printf0("Caught ACCESS_VIOLATION in marker. " ! "Memory mapping disappeared.\n"); ! } ! # endif /* CONDPRINT */ ! ! /* We have bad roots on the stack. Discard mark stack. */ ! /* Rescan from marked objects. Redetermine roots. */ ! GC_invalidate_mark_state(); ! scan_ptr = 0; ! ! ret_val = FALSE; ! ! # ifndef __GNUC__ ! } ! ! # else /* __GNUC__ */ ! ! rm_handler: ! /* Uninstall the exception handler */ ! asm volatile ("mov %0, %%fs:0" : : "r" (er.ex_reg.prev)); ! ! # endif /* __GNUC__ */ ! ! return ret_val; } ! #endif /* MSWIN32 */ GC_bool GC_mark_stack_empty() *************** GC_bool GC_mark_stack_empty() *** 434,446 **** /* for the large object. */ /* - just return current if it does not point to a large object. */ /*ARGSUSED*/ ! # ifdef PRINT_BLACK_LIST ! ptr_t GC_find_start(current, hhdr, new_hdr_p, source) ! ptr_t source; ! # else ! ptr_t GC_find_start(current, hhdr, new_hdr_p) ! # define source 0 ! # endif register ptr_t current; register hdr *hhdr, **new_hdr_p; { --- 545,551 ---- /* for the large object. */ /* - just return current if it does not point to a large object. */ /*ARGSUSED*/ ! ptr_t GC_find_start(current, hhdr, new_hdr_p) register ptr_t current; register hdr *hhdr, **new_hdr_p; { *************** register hdr *hhdr, **new_hdr_p; *** 468,474 **** } else { return(current); } - # undef source } void GC_invalidate_mark_state() --- 573,578 ---- *************** mse * mark_stack_limit; *** 546,553 **** /* Large length. */ /* Process part of the range to avoid pushing too much on the */ /* stack. */ ! GC_ASSERT(descr < GC_greatest_plausible_heap_addr ! - GC_least_plausible_heap_addr); # ifdef PARALLEL_MARK # define SHARE_BYTES 2048 if (descr > SHARE_BYTES && GC_parallel --- 650,657 ---- /* Large length. */ /* Process part of the range to avoid pushing too much on the */ /* stack. */ ! GC_ASSERT(descr < (word)GC_greatest_plausible_heap_addr ! - (word)GC_least_plausible_heap_addr); # ifdef PARALLEL_MARK # define SHARE_BYTES 2048 if (descr > SHARE_BYTES && GC_parallel *************** mse * mark_stack_limit; *** 578,583 **** --- 682,688 ---- while (descr != 0) { if ((signed_word)descr < 0) { current = *current_p; + FIXUP_POINTER(current); if ((ptr_t)current >= least_ha && (ptr_t)current < greatest_ha) { PREFETCH(current); HC_PUSH_CONTENTS((ptr_t)current, mark_stack_top, *************** mse * mark_stack_limit; *** 652,657 **** --- 757,763 ---- PREFETCH((ptr_t)limit - PREF_DIST*CACHE_LINE_SIZE); GC_ASSERT(limit >= current_p); deferred = *limit; + FIXUP_POINTER(deferred); limit = (word *)((char *)limit - ALIGNMENT); if ((ptr_t)deferred >= least_ha && (ptr_t)deferred < greatest_ha) { PREFETCH(deferred); *************** mse * mark_stack_limit; *** 661,666 **** --- 767,773 ---- /* Unroll once, so we don't do too many of the prefetches */ /* based on limit. */ deferred = *limit; + FIXUP_POINTER(deferred); limit = (word *)((char *)limit - ALIGNMENT); if ((ptr_t)deferred >= least_ha && (ptr_t)deferred < greatest_ha) { PREFETCH(deferred); *************** mse * mark_stack_limit; *** 675,680 **** --- 782,788 ---- /* Since HC_PUSH_CONTENTS expands to a lot of code, */ /* we don't. */ current = *current_p; + FIXUP_POINTER(current); PREFETCH((ptr_t)current_p + PREF_DIST*CACHE_LINE_SIZE); if ((ptr_t)current >= least_ha && (ptr_t)current < greatest_ha) { /* Prefetch the contents of the object we just pushed. It's */ *************** mse * GC_steal_mark_stack(mse * low, mse *** 726,747 **** mse *top = local - 1; unsigned i = 0; GC_ASSERT(high >= low-1 && high - low + 1 <= GC_mark_stack_size); for (p = low; p <= high && i <= max; ++p) { word descr = *(volatile word *) &(p -> mse_descr); if (descr != 0) { *(volatile word *) &(p -> mse_descr) = 0; ++top; top -> mse_descr = descr; top -> mse_start = p -> mse_start; GC_ASSERT( top -> mse_descr & GC_DS_TAGS != GC_DS_LENGTH || top -> mse_descr < GC_greatest_plausible_heap_addr - GC_least_plausible_heap_addr); - /* There is no synchronization here. We assume that at */ - /* least one thread will see the original descriptor. */ - /* Otherwise we need a barrier. */ - /* More than one thread may get this entry, but that's only */ - /* a minor performance problem. */ /* If this is a big object, count it as */ /* size/256 + 1 objects. */ ++i; --- 834,866 ---- mse *top = local - 1; unsigned i = 0; + /* Make sure that prior writes to the mark stack are visible. */ + /* On some architectures, the fact that the reads are */ + /* volatile should suffice. */ + # if !defined(IA64) && !defined(HP_PA) && !defined(I386) + GC_memory_barrier(); + # endif GC_ASSERT(high >= low-1 && high - low + 1 <= GC_mark_stack_size); for (p = low; p <= high && i <= max; ++p) { word descr = *(volatile word *) &(p -> mse_descr); + /* In the IA64 memory model, the following volatile store is */ + /* ordered after this read of descr. Thus a thread must read */ + /* the original nonzero value. HP_PA appears to be similar, */ + /* and if I'm reading the P4 spec correctly, X86 is probably */ + /* also OK. In some other cases we need a barrier. */ + # if !defined(IA64) && !defined(HP_PA) && !defined(I386) + GC_memory_barrier(); + # endif if (descr != 0) { *(volatile word *) &(p -> mse_descr) = 0; + /* More than one thread may get this entry, but that's only */ + /* a minor performance problem. */ ++top; top -> mse_descr = descr; top -> mse_start = p -> mse_start; GC_ASSERT( top -> mse_descr & GC_DS_TAGS != GC_DS_LENGTH || top -> mse_descr < GC_greatest_plausible_heap_addr - GC_least_plausible_heap_addr); /* If this is a big object, count it as */ /* size/256 + 1 objects. */ ++i; *************** void GC_return_mark_stack(mse * low, mse *** 778,784 **** BCOPY(low, my_start, stack_size * sizeof(mse)); GC_ASSERT(GC_mark_stack_top = my_top); # if !defined(IA64) && !defined(HP_PA) ! GC_memory_write_barrier(); # endif /* On IA64, the volatile write acts as a release barrier. */ GC_mark_stack_top = my_top + stack_size; --- 897,903 ---- BCOPY(low, my_start, stack_size * sizeof(mse)); GC_ASSERT(GC_mark_stack_top = my_top); # if !defined(IA64) && !defined(HP_PA) ! GC_memory_barrier(); # endif /* On IA64, the volatile write acts as a release barrier. */ GC_mark_stack_top = my_top + stack_size; *************** ptr_t top; *** 1342,1349 **** # define GC_least_plausible_heap_addr least_ha if (top == 0) return; ! /* check all pointers in range and put in push if they appear */ ! /* to be valid. */ lim = t - 1 /* longword */; for (p = b; p <= lim; p = (word *)(((char *)p) + ALIGNMENT)) { q = *p; --- 1461,1468 ---- # define GC_least_plausible_heap_addr least_ha if (top == 0) return; ! /* check all pointers in range and push if they appear */ ! /* to be valid. */ lim = t - 1 /* longword */; for (p = b; p <= lim; p = (word *)(((char *)p) + ALIGNMENT)) { q = *p; *************** ptr_t bottom; *** 1366,1372 **** ptr_t top; ptr_t cold_gc_frame; { ! if (GC_all_interior_pointers) { # define EAGER_BYTES 1024 /* Push the hot end of the stack eagerly, so that register values */ /* saved inside GC frames are marked before they disappear. */ --- 1485,1491 ---- ptr_t top; ptr_t cold_gc_frame; { ! if (!NEED_FIXUP_POINTER && GC_all_interior_pointers) { # define EAGER_BYTES 1024 /* Push the hot end of the stack eagerly, so that register values */ /* saved inside GC frames are marked before they disappear. */ *************** ptr_t cold_gc_frame; *** 1375,1380 **** --- 1494,1500 ---- GC_push_all_stack(bottom, top); return; } + GC_ASSERT(bottom <= cold_gc_frame && cold_gc_frame <= top); # ifdef STACK_GROWS_DOWN GC_push_all(cold_gc_frame - sizeof(ptr_t), top); GC_push_all_eager(bottom, cold_gc_frame); *************** void GC_push_all_stack(bottom, top) *** 1395,1401 **** ptr_t bottom; ptr_t top; { ! if (GC_all_interior_pointers) { GC_push_all(bottom, top); } else { GC_push_all_eager(bottom, top); --- 1515,1521 ---- ptr_t bottom; ptr_t top; { ! if (!NEED_FIXUP_POINTER && GC_all_interior_pointers) { GC_push_all(bottom, top); } else { GC_push_all_eager(bottom, top); diff -Nrc3pad gcc-3.3.3/boehm-gc/mark_rts.c gcc-3.4.0/boehm-gc/mark_rts.c *** gcc-3.3.3/boehm-gc/mark_rts.c 2003-03-04 06:38:29.000000000 +0000 --- gcc-3.4.0/boehm-gc/mark_rts.c 2003-07-28 04:18:20.000000000 +0000 *************** void GC_clear_roots GC_PROTO((void)) *** 275,308 **** } /* Internal use only; lock held. */ void GC_remove_tmp_roots() { register int i; for (i = 0; i < n_root_sets; ) { if (GC_static_roots[i].r_tmp) { ! GC_root_size -= ! (GC_static_roots[i].r_end - GC_static_roots[i].r_start); ! GC_static_roots[i].r_start = GC_static_roots[n_root_sets-1].r_start; ! GC_static_roots[i].r_end = GC_static_roots[n_root_sets-1].r_end; ! GC_static_roots[i].r_tmp = GC_static_roots[n_root_sets-1].r_tmp; ! n_root_sets--; } else { i++; - } } - # if !defined(MSWIN32) && !defined(MSWINCE) - { - register int i; - - for (i = 0; i < RT_SIZE; i++) GC_root_index[i] = 0; - for (i = 0; i < n_root_sets; i++) - add_roots_to_index(GC_static_roots + i); } ! # endif } #if defined(MSWIN32) || defined(_WIN32_WCE_EMULATION) /* Workaround for the OS mapping and unmapping behind our back: */ /* Is the address p in one of the temporary static root sections? */ --- 275,347 ---- } /* Internal use only; lock held. */ + static void GC_remove_root_at_pos(i) + int i; + { + GC_root_size -= (GC_static_roots[i].r_end - GC_static_roots[i].r_start); + GC_static_roots[i].r_start = GC_static_roots[n_root_sets-1].r_start; + GC_static_roots[i].r_end = GC_static_roots[n_root_sets-1].r_end; + GC_static_roots[i].r_tmp = GC_static_roots[n_root_sets-1].r_tmp; + n_root_sets--; + } + + #if !defined(MSWIN32) && !defined(MSWINCE) + static void GC_rebuild_root_index() + { + register int i; + + for (i = 0; i < RT_SIZE; i++) GC_root_index[i] = 0; + for (i = 0; i < n_root_sets; i++) + add_roots_to_index(GC_static_roots + i); + } + #endif + + /* Internal use only; lock held. */ void GC_remove_tmp_roots() { register int i; for (i = 0; i < n_root_sets; ) { if (GC_static_roots[i].r_tmp) { ! GC_remove_root_at_pos(i); } else { i++; } } ! #if !defined(MSWIN32) && !defined(MSWINCE) ! GC_rebuild_root_index(); ! #endif ! } ! ! #if !defined(MSWIN32) && !defined(MSWINCE) ! void GC_remove_roots(b, e) ! char * b; char * e; ! { ! DCL_LOCK_STATE; + DISABLE_SIGNALS(); + LOCK(); + GC_remove_roots_inner(b, e); + UNLOCK(); + ENABLE_SIGNALS(); } + /* Should only be called when the lock is held */ + void GC_remove_roots_inner(b,e) + char * b; char * e; + { + int i; + for (i = 0; i < n_root_sets; ) { + if (GC_static_roots[i].r_start >= (ptr_t)b && GC_static_roots[i].r_end <= (ptr_t)e) { + GC_remove_root_at_pos(i); + } else { + i++; + } + } + GC_rebuild_root_index(); + } + #endif /* !defined(MSWIN32) && !defined(MSWINCE) */ + #if defined(MSWIN32) || defined(_WIN32_WCE_EMULATION) /* Workaround for the OS mapping and unmapping behind our back: */ /* Is the address p in one of the temporary static root sections? */ *************** ptr_t cold_gc_frame; *** 573,580 **** /* Mark thread local free lists, even if their mark */ /* descriptor excludes the link field. */ # ifdef THREAD_LOCAL_ALLOC ! GC_mark_thread_local_free_lists(); # endif /* --- 612,622 ---- /* Mark thread local free lists, even if their mark */ /* descriptor excludes the link field. */ + /* If the world is not stopped, this is unsafe. It is */ + /* also unnecessary, since we will do this again with the */ + /* world stopped. */ # ifdef THREAD_LOCAL_ALLOC ! if (GC_world_stopped) GC_mark_thread_local_free_lists(); # endif /* diff -Nrc3pad gcc-3.3.3/boehm-gc/mips_sgi_mach_dep.s gcc-3.4.0/boehm-gc/mips_sgi_mach_dep.s *** gcc-3.3.3/boehm-gc/mips_sgi_mach_dep.s 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/boehm-gc/mips_sgi_mach_dep.s 2003-10-20 18:37:01.000000000 +0000 *************** *** 0 **** --- 1,46 ---- + #include + #include + /* This file must be preprocessed. But the SGI assembler always does */ + /* that. Furthermore, a generic preprocessor won't do, since some of */ + /* the SGI-supplied include files rely on behavior of the MIPS */ + /* assembler. Hence we treat and name this file as though it required */ + /* no preprocessing. */ + + # define call_push(x) move $4,x; jal GC_push_one + + .option pic2 + .text + /* Mark from machine registers that are saved by C compiler */ + # define FRAMESZ 32 + # define RAOFF FRAMESZ-SZREG + # define GPOFF FRAMESZ-(2*SZREG) + NESTED(GC_push_regs, FRAMESZ, ra) + .mask 0x80000000,-SZREG # inform debugger of saved ra loc + move t0,gp + SETUP_GPX(t8) + PTR_SUBU sp,FRAMESZ + # ifdef SETUP_GP64 + SETUP_GP64(GPOFF, GC_push_regs) + # endif + SAVE_GP(GPOFF) + REG_S ra,RAOFF(sp) + # if (_MIPS_SIM == _ABIO32) + call_push($2) + call_push($3) + # endif + call_push($16) + call_push($17) + call_push($18) + call_push($19) + call_push($20) + call_push($21) + call_push($22) + call_push($23) + call_push($30) + REG_L ra,RAOFF(sp) + # ifdef RESTORE_GP64 + RESTORE_GP64 + # endif + PTR_ADDU sp,FRAMESZ + j ra + .end GC_push_regs diff -Nrc3pad gcc-3.3.3/boehm-gc/mips_sgi_mach_dep.S gcc-3.4.0/boehm-gc/mips_sgi_mach_dep.S *** gcc-3.3.3/boehm-gc/mips_sgi_mach_dep.S 2002-02-13 05:38:39.000000000 +0000 --- gcc-3.4.0/boehm-gc/mips_sgi_mach_dep.S 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,41 **** - #include - #include - - # define call_push(x) move $4,x; jal GC_push_one - - .option pic2 - .text - /* Mark from machine registers that are saved by C compiler */ - # define FRAMESZ 32 - # define RAOFF FRAMESZ-SZREG - # define GPOFF FRAMESZ-(2*SZREG) - NESTED(GC_push_regs, FRAMESZ, ra) - .mask 0x80000000,-SZREG # inform debugger of saved ra loc - move t0,gp - SETUP_GPX(t8) - PTR_SUBU sp,FRAMESZ - # ifdef SETUP_GP64 - SETUP_GP64(GPOFF, GC_push_regs) - # endif - SAVE_GP(GPOFF) - REG_S ra,RAOFF(sp) - # if (_MIPS_SIM == _MIPS_SIM_ABI32) - call_push($2) - call_push($3) - # endif - call_push($16) - call_push($17) - call_push($18) - call_push($19) - call_push($20) - call_push($21) - call_push($22) - call_push($23) - call_push($30) - REG_L ra,RAOFF(sp) - # ifdef RESTORE_GP64 - RESTORE_GP64 - # endif - PTR_ADDU sp,FRAMESZ - j ra - .end GC_push_regs --- 0 ---- diff -Nrc3pad gcc-3.3.3/boehm-gc/misc.c gcc-3.4.0/boehm-gc/misc.c *** gcc-3.3.3/boehm-gc/misc.c 2003-03-04 06:38:30.000000000 +0000 --- gcc-3.4.0/boehm-gc/misc.c 2003-10-03 18:43:06.000000000 +0000 *************** *** 46,53 **** # ifdef GC_SOLARIS_THREADS mutex_t GC_allocate_ml; /* Implicitly initialized. */ # else ! # ifdef GC_WIN32_THREADS ! # if !defined(GC_NOT_DLL) && (defined(_DLL) || defined(GC_DLL)) __declspec(dllexport) CRITICAL_SECTION GC_allocate_ml; # else CRITICAL_SECTION GC_allocate_ml; --- 46,55 ---- # ifdef GC_SOLARIS_THREADS mutex_t GC_allocate_ml; /* Implicitly initialized. */ # else ! # if defined(GC_WIN32_THREADS) ! # if defined(GC_PTHREADS) ! pthread_mutex_t GC_allocate_ml = PTHREAD_MUTEX_INITIALIZER; ! # elif defined(GC_DLL) __declspec(dllexport) CRITICAL_SECTION GC_allocate_ml; # else CRITICAL_SECTION GC_allocate_ml; *************** *** 75,82 **** #undef STACKBASE #endif ! /* Dont unnecessarily call GC_register_main_static_data() in case */ ! /* dyn_load.c isn't linked in. */ #ifdef DYNAMIC_LOADING # define GC_REGISTER_MAIN_STATIC_DATA() GC_register_main_static_data() #else --- 77,84 ---- #undef STACKBASE #endif ! /* Dont unnecessarily call GC_register_main_static_data() in case */ ! /* dyn_load.c isn't linked in. */ #ifdef DYNAMIC_LOADING # define GC_REGISTER_MAIN_STATIC_DATA() GC_register_main_static_data() #else *************** GC_bool GC_debugging_started = FALSE; *** 90,95 **** --- 92,98 ---- /* defined here so we don't have to load debug_malloc.o */ void (*GC_check_heap) GC_PROTO((void)) = (void (*) GC_PROTO((void)))0; + void (*GC_print_all_smashed) GC_PROTO((void)) = (void (*) GC_PROTO((void)))0; void (*GC_start_call_back) GC_PROTO((void)) = (void (*) GC_PROTO((void)))0; *************** GC_bool GC_print_stats = 0; *** 109,114 **** --- 112,121 ---- GC_bool GC_print_back_height = 0; + #ifndef NO_DEBUGGING + GC_bool GC_dump_regularly = 0; /* Generate regular debugging dumps. */ + #endif + #ifdef FIND_LEAK int GC_find_leak = 1; #else *************** GC_PTR (*GC_oom_fn) GC_PROTO((size_t byt *** 137,142 **** --- 144,156 ---- extern signed_word GC_mem_found; + void * GC_project2(arg1, arg2) + void *arg1; + void *arg2; + { + return arg2; + } + # ifdef MERGE_SIZES /* Set things up so that GC_size_map[i] >= words(i), */ /* but not too much bigger */ *************** void GC_init() *** 455,461 **** DISABLE_SIGNALS(); ! #ifdef MSWIN32 if (!GC_is_initialized) InitializeCriticalSection(&GC_allocate_ml); #endif /* MSWIN32 */ --- 469,475 ---- DISABLE_SIGNALS(); ! #if defined(GC_WIN32_THREADS) && !defined(GC_PTHREADS) if (!GC_is_initialized) InitializeCriticalSection(&GC_allocate_ml); #endif /* MSWIN32 */ *************** void GC_init() *** 473,478 **** --- 487,501 ---- GC_init_parallel(); } # endif /* PARALLEL_MARK || THREAD_LOCAL_ALLOC */ + + # if defined(DYNAMIC_LOADING) && defined(DARWIN) + { + /* This must be called WITHOUT the allocation lock held + and before any threads are created */ + extern void GC_init_dyld(); + GC_init_dyld(); + } + # endif } #if defined(MSWIN32) || defined(MSWINCE) *************** void GC_init() *** 485,490 **** --- 508,529 ---- extern void GC_setpagesize(); + + #ifdef MSWIN32 + extern GC_bool GC_no_win32_dlls; + #else + # define GC_no_win32_dlls FALSE + #endif + + void GC_exit_check GC_PROTO((void)) + { + GC_gcollect(); + } + + #ifdef SEARCH_FOR_DATA_START + extern void GC_init_linux_data_start GC_PROTO((void)); + #endif + #ifdef UNIX_LIKE extern void GC_set_and_save_fault_handler GC_PROTO((void (*handler)(int))); *************** int sig; *** 495,506 **** GC_err_printf1("Caught signal %d: looping in handler\n", sig); for(;;); } - #endif ! #ifdef MSWIN32 ! extern GC_bool GC_no_win32_dlls; ! #else ! # define GC_no_win32_dlls FALSE #endif void GC_init_inner() --- 534,556 ---- GC_err_printf1("Caught signal %d: looping in handler\n", sig); for(;;); } ! static GC_bool installed_looping_handler = FALSE; ! ! void maybe_install_looping_handler() ! { ! /* Install looping handler before the write fault handler, so we */ ! /* handle write faults correctly. */ ! if (!installed_looping_handler && 0 != GETENV("GC_LOOP_ON_ABORT")) { ! GC_set_and_save_fault_handler(looping_handler); ! installed_looping_handler = TRUE; ! } ! } ! ! #else /* !UNIX_LIKE */ ! ! # define maybe_install_looping_handler() ! #endif void GC_init_inner() *************** void GC_init_inner() *** 515,528 **** GC_print_stats = 1; # endif # if defined(MSWIN32) || defined(MSWINCE) ! InitializeCriticalSection(&GC_write_cs); # endif - if (0 != GETENV("GC_PRINT_STATS")) { GC_print_stats = 1; } if (0 != GETENV("GC_FIND_LEAK")) { GC_find_leak = 1; } if (0 != GETENV("GC_ALL_INTERIOR_POINTERS")) { GC_all_interior_pointers = 1; --- 565,585 ---- GC_print_stats = 1; # endif # if defined(MSWIN32) || defined(MSWINCE) ! InitializeCriticalSection(&GC_write_cs); # endif if (0 != GETENV("GC_PRINT_STATS")) { GC_print_stats = 1; } + # ifndef NO_DEBUGGING + if (0 != GETENV("GC_DUMP_REGULARLY")) { + GC_dump_regularly = 1; + } + # endif if (0 != GETENV("GC_FIND_LEAK")) { GC_find_leak = 1; + # ifdef __STDC__ + atexit(GC_exit_check); + # endif } if (0 != GETENV("GC_ALL_INTERIOR_POINTERS")) { GC_all_interior_pointers = 1; *************** void GC_init_inner() *** 560,570 **** } } } ! # ifdef UNIX_LIKE ! if (0 != GETENV("GC_LOOP_ON_ABORT")) { ! GC_set_and_save_fault_handler(looping_handler); ! } ! # endif /* Adjust normal object descriptor for extra allocation. */ if (ALIGNMENT > GC_DS_TAGS && EXTRA_BYTES != 0) { GC_obj_kinds[NORMAL].ok_descriptor = ((word)(-ALIGNMENT) | GC_DS_LENGTH); --- 617,623 ---- } } } ! maybe_install_looping_handler(); /* Adjust normal object descriptor for extra allocation. */ if (ALIGNMENT > GC_DS_TAGS && EXTRA_BYTES != 0) { GC_obj_kinds[NORMAL].ok_descriptor = ((word)(-ALIGNMENT) | GC_DS_LENGTH); *************** void GC_init_inner() *** 585,591 **** # if (defined(NETBSD) || defined(OPENBSD)) && defined(__ELF__) GC_init_netbsd_elf(); # endif ! # if defined(GC_PTHREADS) || defined(GC_SOLARIS_THREADS) GC_thr_init(); # endif # ifdef GC_SOLARIS_THREADS --- 638,645 ---- # if (defined(NETBSD) || defined(OPENBSD)) && defined(__ELF__) GC_init_netbsd_elf(); # endif ! # if defined(GC_PTHREADS) || defined(GC_SOLARIS_THREADS) \ ! || defined(GC_WIN32_THREADS) GC_thr_init(); # endif # ifdef GC_SOLARIS_THREADS *************** void GC_init_inner() *** 599,609 **** # if defined(LINUX) && defined(IA64) GC_register_stackbottom = GC_get_register_stack_base(); # endif } # endif ! GC_ASSERT(sizeof (ptr_t) == sizeof(word)); ! GC_ASSERT(sizeof (signed_word) == sizeof(word)); ! GC_ASSERT(sizeof (struct hblk) == HBLKSIZE); # ifndef THREADS # if defined(STACK_GROWS_UP) && defined(STACK_GROWS_DOWN) ABORT( --- 653,673 ---- # if defined(LINUX) && defined(IA64) GC_register_stackbottom = GC_get_register_stack_base(); # endif + } else { + # if defined(LINUX) && defined(IA64) + if (GC_register_stackbottom == 0) { + WARN("GC_register_stackbottom should be set with GC_stackbottom", 0); + /* The following is likely to fail, since we rely on */ + /* alignment properties that may not hold with a user set */ + /* GC_stackbottom. */ + GC_register_stackbottom = GC_get_register_stack_base(); + } + # endif } # endif ! GC_STATIC_ASSERT(sizeof (ptr_t) == sizeof(word)); ! GC_STATIC_ASSERT(sizeof (signed_word) == sizeof(word)); ! GC_STATIC_ASSERT(sizeof (struct hblk) == HBLKSIZE); # ifndef THREADS # if defined(STACK_GROWS_UP) && defined(STACK_GROWS_DOWN) ABORT( *************** void GC_init_inner() *** 642,647 **** --- 706,723 ---- initial_heap_sz = divHBLKSZ(initial_heap_sz); } } + { + char * sz_str = GETENV("GC_MAXIMUM_HEAP_SIZE"); + if (sz_str != NULL) { + word max_heap_sz = (word)atol(sz_str); + if (max_heap_sz < initial_heap_sz * HBLKSIZE) { + WARN("Bad maximum heap size %s - ignoring it.\n", + sz_str); + } + if (0 == GC_max_retries) GC_max_retries = 2; + GC_set_max_heap_size(max_heap_sz); + } + } if (!GC_expand_hp_inner(initial_heap_sz)) { GC_err_printf0("Can't start up: not enough memory\n"); EXIT(); *************** void GC_init_inner() *** 677,682 **** --- 753,759 ---- GC_incremental = TRUE; } # endif /* !SMALL_CONFIG */ + COND_DUMP; /* Get black list set up and/or incrmental GC started */ if (!GC_dont_precollect || GC_incremental) GC_gcollect_inner(); GC_is_initialized = TRUE; *************** void GC_enable_incremental GC_PROTO(()) *** 712,719 **** if (GC_incremental) goto out; GC_setpagesize(); if (GC_no_win32_dlls) goto out; ! # ifndef GC_SOLARIS_THREADS ! GC_dirty_init(); # endif if (!GC_is_initialized) { GC_init_inner(); --- 789,797 ---- if (GC_incremental) goto out; GC_setpagesize(); if (GC_no_win32_dlls) goto out; ! # ifndef GC_SOLARIS_THREADS ! maybe_install_looping_handler(); /* Before write fault handler! */ ! GC_dirty_init(); # endif if (!GC_is_initialized) { GC_init_inner(); *************** GC_warn_proc GC_current_warn_proc = GC_d *** 925,930 **** --- 1003,1011 ---- { GC_warn_proc result; + # ifdef GC_WIN32_THREADS + GC_ASSERT(GC_is_initialized); + # endif LOCK(); result = GC_current_warn_proc; GC_current_warn_proc = p; *************** GC_warn_proc GC_current_warn_proc = GC_d *** 932,937 **** --- 1013,1029 ---- return(result); } + # if defined(__STDC__) || defined(__cplusplus) + GC_word GC_set_free_space_divisor (GC_word value) + # else + GC_word GC_set_free_space_divisor (value) + GC_word value; + # endif + { + GC_word old = GC_free_space_divisor; + GC_free_space_divisor = value; + return old; + } #ifndef PCR void GC_abort(msg) *************** GC_CONST char * msg; *** 958,1079 **** } #endif - #ifdef NEED_CALLINFO - - #ifdef HAVE_BUILTIN_BACKTRACE - # include - # ifdef LINUX - # include - # endif - #endif - - void GC_print_callers (info) - struct callinfo info[NFRAMES]; - { - register int i; - - # if NFRAMES == 1 - GC_err_printf0("\tCaller at allocation:\n"); - # else - GC_err_printf0("\tCall chain at allocation:\n"); - # endif - for (i = 0; i < NFRAMES; i++) { - if (info[i].ci_pc == 0) break; - # if NARGS > 0 - { - int j; - - GC_err_printf0("\t\targs: "); - for (j = 0; j < NARGS; j++) { - if (j != 0) GC_err_printf0(", "); - GC_err_printf2("%d (0x%X)", ~(info[i].ci_arg[j]), - ~(info[i].ci_arg[j])); - } - GC_err_printf0("\n"); - } - # endif - # if defined(HAVE_BUILTIN_BACKTRACE) && !defined(REDIRECT_MALLOC) - /* Unfortunately backtrace_symbols calls malloc, which makes */ - /* it dangersous if that has been redirected. */ - { - char **sym_name = - backtrace_symbols((void **)(&(info[i].ci_pc)), 1); - char *name = sym_name[0]; - GC_bool found_it = (strchr(name, '(') != 0); - FILE *pipe; - # ifdef LINUX - if (!found_it) { - # define EXE_SZ 100 - static char exe_name[EXE_SZ]; - # define CMD_SZ 200 - char cmd_buf[CMD_SZ]; - # define RESULT_SZ 200 - static char result_buf[RESULT_SZ]; - size_t result_len; - static GC_bool found_exe_name = FALSE; - static GC_bool will_fail = FALSE; - int ret_code; - /* Unfortunately, this is the common case for the */ - /* main executable. */ - /* Try to get it via a hairy and expensive scheme. */ - /* First we get the name of the executable: */ - if (will_fail) goto out; - if (!found_exe_name) { - ret_code = readlink("/proc/self/exe", exe_name, EXE_SZ); - if (ret_code < 0 || ret_code >= EXE_SZ || exe_name[0] != '/') { - will_fail = TRUE; /* Dont try again. */ - goto out; - } - exe_name[ret_code] = '\0'; - found_exe_name = TRUE; - } - /* Then we use popen to start addr2line -e */ - /* There are faster ways to do this, but hopefully this */ - /* isn't time critical. */ - sprintf(cmd_buf, "/usr/bin/addr2line -e %s 0x%lx", exe_name, - (unsigned long)info[i].ci_pc); - pipe = popen(cmd_buf, "r"); - if (pipe < 0 || fgets(result_buf, RESULT_SZ, pipe) == 0) { - will_fail = TRUE; - goto out; - } - result_len = strlen(result_buf); - if (result_buf[result_len - 1] == '\n') --result_len; - if (result_buf[0] == '?' - || result_buf[result_len-2] == ':' - && result_buf[result_len-1] == '0') - goto out; - if (result_len < RESULT_SZ - 25) { - /* Add in hex address */ - sprintf(result_buf + result_len, " [0x%lx]", - (unsigned long)info[i].ci_pc); - } - name = result_buf; - pclose(pipe); - out: - } - # endif - GC_err_printf1("\t\t%s\n", name); - free(sym_name); - } - # else - GC_err_printf1("\t\t##PC##= 0x%lx\n", info[i].ci_pc); - # endif - } - } - - #endif /* SAVE_CALL_CHAIN */ - - /* Needed by SRC_M3, gcj, and should perhaps be the official interface */ - /* to GC_dont_gc. */ void GC_enable() { GC_dont_gc--; } void GC_disable() { GC_dont_gc++; } #if !defined(NO_DEBUGGING) --- 1050,1067 ---- } #endif void GC_enable() { + LOCK(); GC_dont_gc--; + UNLOCK(); } void GC_disable() { + LOCK(); GC_dont_gc++; + UNLOCK(); } #if !defined(NO_DEBUGGING) *************** void GC_dump() *** 1088,1093 **** --- 1076,1083 ---- GC_print_hblkfreelist(); GC_printf0("\n***Blocks in use:\n"); GC_print_block_list(); + GC_printf0("\n***Finalization statistics:\n"); + GC_print_finalization_stats(); } #endif /* NO_DEBUGGING */ diff -Nrc3pad gcc-3.3.3/boehm-gc/os_dep.c gcc-3.4.0/boehm-gc/os_dep.c *** gcc-3.3.3/boehm-gc/os_dep.c 2002-07-19 08:54:43.000000000 +0000 --- gcc-3.4.0/boehm-gc/os_dep.c 2003-09-22 16:00:23.000000000 +0000 *************** *** 80,91 **** # define NEED_FIND_LIMIT # endif - #ifdef NEED_FIND_LIMIT - # include - #endif - #if defined(FREEBSD) && defined(I386) # include #endif #ifdef AMIGA --- 80,94 ---- # define NEED_FIND_LIMIT # endif #if defined(FREEBSD) && defined(I386) # include + # if !defined(PCR) + # define NEED_FIND_LIMIT + # endif + #endif + + #ifdef NEED_FIND_LIMIT + # include #endif #ifdef AMIGA *************** *** 129,134 **** --- 132,142 ---- # define jmp_buf sigjmp_buf #endif + #ifdef DARWIN + /* for get_etext and friends */ + #include + #endif + #ifdef DJGPP /* Apparently necessary for djgpp 2.01. May cause problems with */ /* other versions. */ *************** *** 147,152 **** --- 155,310 ---- # define OPT_PROT_EXEC 0 #endif + #if defined(LINUX) && \ + (defined(USE_PROC_FOR_LIBRARIES) || defined(IA64) || !defined(SMALL_CONFIG)) + + /* We need to parse /proc/self/maps, either to find dynamic libraries, */ + /* and/or to find the register backing store base (IA64). Do it once */ + /* here. */ + + #define READ read + + /* Repeatedly perform a read call until the buffer is filled or */ + /* we encounter EOF. */ + ssize_t GC_repeat_read(int fd, char *buf, size_t count) + { + ssize_t num_read = 0; + ssize_t result; + + while (num_read < count) { + result = READ(fd, buf + num_read, count - num_read); + if (result < 0) return result; + if (result == 0) break; + num_read += result; + } + return num_read; + } + + /* + * Apply fn to a buffer containing the contents of /proc/self/maps. + * Return the result of fn or, if we failed, 0. + */ + + word GC_apply_to_maps(word (*fn)(char *)) + { + int f; + int result; + int maps_size; + char maps_temp[32768]; + char *maps_buf; + + /* Read /proc/self/maps */ + /* Note that we may not allocate, and thus can't use stdio. */ + f = open("/proc/self/maps", O_RDONLY); + if (-1 == f) return 0; + /* stat() doesn't work for /proc/self/maps, so we have to + read it to find out how large it is... */ + maps_size = 0; + do { + result = GC_repeat_read(f, maps_temp, sizeof(maps_temp)); + if (result <= 0) return 0; + maps_size += result; + } while (result == sizeof(maps_temp)); + + if (maps_size > sizeof(maps_temp)) { + /* If larger than our buffer, close and re-read it. */ + close(f); + f = open("/proc/self/maps", O_RDONLY); + if (-1 == f) return 0; + maps_buf = alloca(maps_size); + if (NULL == maps_buf) return 0; + result = GC_repeat_read(f, maps_buf, maps_size); + if (result <= 0) return 0; + } else { + /* Otherwise use the fixed size buffer */ + maps_buf = maps_temp; + } + + close(f); + maps_buf[result] = '\0'; + + /* Apply fn to result. */ + return fn(maps_buf); + } + + #endif /* Need GC_apply_to_maps */ + + #if defined(LINUX) && (defined(USE_PROC_FOR_LIBRARIES) || defined(IA64)) + // + // GC_parse_map_entry parses an entry from /proc/self/maps so we can + // locate all writable data segments that belong to shared libraries. + // The format of one of these entries and the fields we care about + // is as follows: + // XXXXXXXX-XXXXXXXX r-xp 00000000 30:05 260537 name of mapping...\n + // ^^^^^^^^ ^^^^^^^^ ^^^^ ^^ + // start end prot maj_dev + // 0 9 18 32 + // + // For 64 bit ABIs: + // 0 17 34 56 + // + // The parser is called with a pointer to the entry and the return value + // is either NULL or is advanced to the next entry(the byte after the + // trailing '\n'.) + // + #if CPP_WORDSZ == 32 + # define OFFSET_MAP_START 0 + # define OFFSET_MAP_END 9 + # define OFFSET_MAP_PROT 18 + # define OFFSET_MAP_MAJDEV 32 + # define ADDR_WIDTH 8 + #endif + + #if CPP_WORDSZ == 64 + # define OFFSET_MAP_START 0 + # define OFFSET_MAP_END 17 + # define OFFSET_MAP_PROT 34 + # define OFFSET_MAP_MAJDEV 56 + # define ADDR_WIDTH 16 + #endif + + /* + * Assign various fields of the first line in buf_ptr to *start, *end, + * *prot_buf and *maj_dev. Only *prot_buf may be set for unwritable maps. + */ + char *GC_parse_map_entry(char *buf_ptr, word *start, word *end, + char *prot_buf, unsigned int *maj_dev) + { + int i; + char *tok; + + if (buf_ptr == NULL || *buf_ptr == '\0') { + return NULL; + } + + memcpy(prot_buf, buf_ptr+OFFSET_MAP_PROT, 4); + /* do the protections first. */ + prot_buf[4] = '\0'; + + if (prot_buf[1] == 'w') {/* we can skip all of this if it's not writable. */ + + tok = buf_ptr; + buf_ptr[OFFSET_MAP_START+ADDR_WIDTH] = '\0'; + *start = strtoul(tok, NULL, 16); + + tok = buf_ptr+OFFSET_MAP_END; + buf_ptr[OFFSET_MAP_END+ADDR_WIDTH] = '\0'; + *end = strtoul(tok, NULL, 16); + + buf_ptr += OFFSET_MAP_MAJDEV; + tok = buf_ptr; + while (*buf_ptr != ':') buf_ptr++; + *buf_ptr++ = '\0'; + *maj_dev = strtoul(tok, NULL, 16); + } + + while (*buf_ptr && *buf_ptr++ != '\n'); + + return buf_ptr; + } + + #endif /* Need to parse /proc/self/maps. */ + #if defined(SEARCH_FOR_DATA_START) /* The I386 case can be handled without a search. The Alpha case */ /* used to be handled differently as well, but the rules changed */ *************** *** 154,159 **** --- 312,322 ---- /* cover all versions. */ # ifdef LINUX + /* Some Linux distributions arrange to define __data_start. Some */ + /* define data_start as a weak symbol. The latter is technically */ + /* broken, since the user program may define data_start, in which */ + /* case we lose. Nonetheless, we try both, prefering __data_start. */ + /* We assume gcc-compatible pragmas. */ # pragma weak __data_start extern int __data_start[]; # pragma weak data_start *************** *** 169,184 **** # ifdef LINUX /* Try the easy approaches first: */ ! if (__data_start != 0) { ! GC_data_start = (ptr_t)__data_start; return; } ! if (data_start != 0) { ! GC_data_start = (ptr_t)data_start; return; } # endif /* LINUX */ ! GC_data_start = GC_find_limit((ptr_t)_end, FALSE); } #endif --- 332,347 ---- # ifdef LINUX /* Try the easy approaches first: */ ! if ((ptr_t)__data_start != 0) { ! GC_data_start = (ptr_t)(__data_start); return; } ! if ((ptr_t)data_start != 0) { ! GC_data_start = (ptr_t)(data_start); return; } # endif /* LINUX */ ! GC_data_start = GC_find_limit((ptr_t)(_end), FALSE); } #endif *************** ptr_t GC_get_stack_base() *** 617,623 **** } /* Return the first nonaddressible location > p (up) or */ ! /* the smallest location q s.t. [q,p] is addressible (!up). */ ptr_t GC_find_limit(p, up) ptr_t p; GC_bool up; --- 780,787 ---- } /* Return the first nonaddressible location > p (up) or */ ! /* the smallest location q s.t. [q,p) is addressable (!up). */ ! /* We assume that p (up) or p-1 (!up) is addressable. */ ptr_t GC_find_limit(p, up) ptr_t p; GC_bool up; *************** ptr_t GC_get_stack_base() *** 650,667 **** } # endif ! # if defined(ECOS) || defined(NOSYS) ! ptr_t GC_get_stack_base() ! { ! return STACKBOTTOM; ! } ! ! #else #ifdef LINUX_STACKBOTTOM #include #include # define STAT_SKIP 27 /* Number of fields preceding startstack */ /* field in /proc/self/stat */ --- 814,831 ---- } # endif ! #if defined(ECOS) || defined(NOSYS) ! ptr_t GC_get_stack_base() ! { ! return STACKBOTTOM; ! } ! #endif #ifdef LINUX_STACKBOTTOM #include #include + #include # define STAT_SKIP 27 /* Number of fields preceding startstack */ /* field in /proc/self/stat */ *************** ptr_t GC_get_stack_base() *** 670,675 **** --- 834,866 ---- extern ptr_t __libc_stack_end; # ifdef IA64 + /* Try to read the backing store base from /proc/self/maps. */ + /* We look for the writable mapping with a 0 major device, */ + /* which is as close to our frame as possible, but below it.*/ + static word backing_store_base_from_maps(char *maps) + { + char prot_buf[5]; + char *buf_ptr = maps; + word start, end; + unsigned int maj_dev; + word current_best = 0; + word dummy; + + for (;;) { + buf_ptr = GC_parse_map_entry(buf_ptr, &start, &end, prot_buf, &maj_dev); + if (buf_ptr == NULL) return current_best; + if (prot_buf[1] == 'w' && maj_dev == 0) { + if (end < (word)(&dummy) && start > current_best) current_best = start; + } + } + return current_best; + } + + static word backing_store_base_from_proc(void) + { + return GC_apply_to_maps(backing_store_base_from_maps); + } + # pragma weak __libc_ia64_register_backing_store_base extern ptr_t __libc_ia64_register_backing_store_base; *************** ptr_t GC_get_stack_base() *** 679,691 **** && 0 != __libc_ia64_register_backing_store_base) { /* Glibc 2.2.4 has a bug such that for dynamically linked */ /* executables __libc_ia64_register_backing_store_base is */ ! /* defined but ininitialized during constructor calls. */ /* Hence we check for both nonzero address and value. */ return __libc_ia64_register_backing_store_base; } else { ! word result = (word)GC_stackbottom - BACKING_STORE_DISPLACEMENT; ! result += BACKING_STORE_ALIGNMENT - 1; ! result &= ~(BACKING_STORE_ALIGNMENT - 1); return (ptr_t)result; } } --- 870,888 ---- && 0 != __libc_ia64_register_backing_store_base) { /* Glibc 2.2.4 has a bug such that for dynamically linked */ /* executables __libc_ia64_register_backing_store_base is */ ! /* defined but uninitialized during constructor calls. */ /* Hence we check for both nonzero address and value. */ return __libc_ia64_register_backing_store_base; } else { ! word result = backing_store_base_from_proc(); ! if (0 == result) { ! /* Use dumb heuristics. Works only for default configuration. */ ! result = (word)GC_stackbottom - BACKING_STORE_DISPLACEMENT; ! result += BACKING_STORE_ALIGNMENT - 1; ! result &= ~(BACKING_STORE_ALIGNMENT - 1); ! /* Verify that it's at least readable. If not, we goofed. */ ! GC_noop1(*(word *)result); ! } return (ptr_t)result; } } *************** ptr_t GC_get_stack_base() *** 697,707 **** /* using direct I/O system calls in order to avoid calling malloc */ /* in case REDIRECT_MALLOC is defined. */ # define STAT_BUF_SIZE 4096 ! # if defined(GC_USE_LD_WRAP) ! # define STAT_READ __real_read ! # else ! # define STAT_READ read ! # endif char stat_buf[STAT_BUF_SIZE]; int f; char c; --- 894,901 ---- /* using direct I/O system calls in order to avoid calling malloc */ /* in case REDIRECT_MALLOC is defined. */ # define STAT_BUF_SIZE 4096 ! # define STAT_READ read ! /* Should probably call the real read, if read is wrapped. */ char stat_buf[STAT_BUF_SIZE]; int f; char c; *************** ptr_t GC_get_stack_base() *** 710,716 **** /* First try the easy way. This should work for glibc 2.2 */ if (0 != &__libc_stack_end) { ! return __libc_stack_end; } f = open("/proc/self/stat", O_RDONLY); if (f < 0 || STAT_READ(f, stat_buf, STAT_BUF_SIZE) < 2 * STAT_SKIP) { --- 904,919 ---- /* First try the easy way. This should work for glibc 2.2 */ if (0 != &__libc_stack_end) { ! # ifdef IA64 ! /* Some versions of glibc set the address 16 bytes too */ ! /* low while the initialization code is running. */ ! if (((word)__libc_stack_end & 0xfff) + 0x10 < 0x1000) { ! return __libc_stack_end + 0x10; ! } /* Otherwise it's not safe to add 16 bytes and we fall */ ! /* back to using /proc. */ ! # else ! return __libc_stack_end; ! # endif } f = open("/proc/self/stat", O_RDONLY); if (f < 0 || STAT_READ(f, stat_buf, STAT_BUF_SIZE) < 2 * STAT_SKIP) { *************** ptr_t GC_get_stack_base() *** 760,771 **** #endif /* FREEBSD_STACKBOTTOM */ #if !defined(BEOS) && !defined(AMIGA) && !defined(MSWIN32) \ ! && !defined(MSWINCE) && !defined(OS2) ptr_t GC_get_stack_base() { word dummy; ptr_t result; # define STACKBOTTOM_ALIGNMENT_M1 ((word)STACK_GRAN - 1) --- 963,977 ---- #endif /* FREEBSD_STACKBOTTOM */ #if !defined(BEOS) && !defined(AMIGA) && !defined(MSWIN32) \ ! && !defined(MSWINCE) && !defined(OS2) && !defined(NOSYS) && !defined(ECOS) ptr_t GC_get_stack_base() { + # if defined(HEURISTIC1) || defined(HEURISTIC2) || \ + defined(LINUX_STACKBOTTOM) || defined(FREEBSD_STACKBOTTOM) word dummy; ptr_t result; + # endif # define STACKBOTTOM_ALIGNMENT_M1 ((word)STACK_GRAN - 1) *************** ptr_t GC_get_stack_base() *** 814,822 **** return(result); # endif /* STACKBOTTOM */ } - # endif /* NOSYS ECOS */ ! # endif /* ! AMIGA, !OS 2, ! MS Windows, !BEOS */ /* * Register static data segment(s) as roots. --- 1020,1027 ---- return(result); # endif /* STACKBOTTOM */ } ! # endif /* ! AMIGA, !OS 2, ! MS Windows, !BEOS, !NOSYS, !ECOS */ /* * Register static data segment(s) as roots. *************** void GC_register_data_segments() *** 924,938 **** /* Unfortunately, we have to handle win32s very differently from NT, */ /* Since VirtualQuery has very different semantics. In particular, */ /* under win32s a VirtualQuery call on an unmapped page returns an */ ! /* invalid result. Under GC_register_data_segments is a noop and */ /* all real work is done by GC_register_dynamic_libraries. Under */ /* win32s, we cannot find the data segments associated with dll's. */ ! /* We rgister the main data segment here. */ ! # ifdef __GCC__ ! GC_bool GC_no_win32_dlls = TRUE; /* GCC can't do SEH, so we can't use VirtualQuery */ ! # else GC_bool GC_no_win32_dlls = FALSE; ! # endif void GC_init_win32() { --- 1129,1142 ---- /* Unfortunately, we have to handle win32s very differently from NT, */ /* Since VirtualQuery has very different semantics. In particular, */ /* under win32s a VirtualQuery call on an unmapped page returns an */ ! /* invalid result. Under NT, GC_register_data_segments is a noop and */ /* all real work is done by GC_register_dynamic_libraries. Under */ /* win32s, we cannot find the data segments associated with dll's. */ ! /* We register the main data segment here. */ GC_bool GC_no_win32_dlls = FALSE; ! /* This used to be set for gcc, to avoid dealing with */ ! /* the structured exception handling issues. But we now have */ ! /* assembly code to do that right. */ void GC_init_win32() { *************** void GC_register_data_segments() *** 964,999 **** return(p); } # endif /* Is p the start of either the malloc heap, or of one of our */ /* heap sections? */ GC_bool GC_is_heap_base (ptr_t p) { ! register unsigned i; # ifndef REDIRECT_MALLOC ! static ptr_t malloc_heap_pointer = 0; ! if (0 == malloc_heap_pointer) { ! MEMORY_BASIC_INFORMATION buf; ! void *pTemp = malloc( 1 ); ! register DWORD result = VirtualQuery(pTemp, &buf, sizeof(buf)); ! ! free( pTemp ); ! ! ! if (result != sizeof(buf)) { ! ABORT("Weird VirtualQuery result"); ! } ! malloc_heap_pointer = (ptr_t)(buf.AllocationBase); } ! if (p == malloc_heap_pointer) return(TRUE); # endif for (i = 0; i < GC_n_heap_bases; i++) { ! if (GC_heap_bases[i] == p) return(TRUE); } ! return(FALSE); } # ifdef MSWIN32 --- 1168,1269 ---- return(p); } # endif + + # ifndef REDIRECT_MALLOC + /* We maintain a linked list of AllocationBase values that we know */ + /* correspond to malloc heap sections. Currently this is only called */ + /* during a GC. But there is some hope that for long running */ + /* programs we will eventually see most heap sections. */ + + /* In the long run, it would be more reliable to occasionally walk */ + /* the malloc heap with HeapWalk on the default heap. But that */ + /* apparently works only for NT-based Windows. */ + + /* In the long run, a better data structure would also be nice ... */ + struct GC_malloc_heap_list { + void * allocation_base; + struct GC_malloc_heap_list *next; + } *GC_malloc_heap_l = 0; + + /* Is p the base of one of the malloc heap sections we already know */ + /* about? */ + GC_bool GC_is_malloc_heap_base(ptr_t p) + { + struct GC_malloc_heap_list *q = GC_malloc_heap_l; + + while (0 != q) { + if (q -> allocation_base == p) return TRUE; + q = q -> next; + } + return FALSE; + } + + void *GC_get_allocation_base(void *p) + { + MEMORY_BASIC_INFORMATION buf; + DWORD result = VirtualQuery(p, &buf, sizeof(buf)); + if (result != sizeof(buf)) { + ABORT("Weird VirtualQuery result"); + } + return buf.AllocationBase; + } + + size_t GC_max_root_size = 100000; /* Appr. largest root size. */ + + void GC_add_current_malloc_heap() + { + struct GC_malloc_heap_list *new_l = + malloc(sizeof(struct GC_malloc_heap_list)); + void * candidate = GC_get_allocation_base(new_l); + + if (new_l == 0) return; + if (GC_is_malloc_heap_base(candidate)) { + /* Try a little harder to find malloc heap. */ + size_t req_size = 10000; + do { + void *p = malloc(req_size); + if (0 == p) { free(new_l); return; } + candidate = GC_get_allocation_base(p); + free(p); + req_size *= 2; + } while (GC_is_malloc_heap_base(candidate) + && req_size < GC_max_root_size/10 && req_size < 500000); + if (GC_is_malloc_heap_base(candidate)) { + free(new_l); return; + } + } + # ifdef CONDPRINT + if (GC_print_stats) + GC_printf1("Found new system malloc AllocationBase at 0x%lx\n", + candidate); + # endif + new_l -> allocation_base = candidate; + new_l -> next = GC_malloc_heap_l; + GC_malloc_heap_l = new_l; + } + # endif /* REDIRECT_MALLOC */ /* Is p the start of either the malloc heap, or of one of our */ /* heap sections? */ GC_bool GC_is_heap_base (ptr_t p) { ! unsigned i; # ifndef REDIRECT_MALLOC ! static word last_gc_no = -1; ! if (last_gc_no != GC_gc_no) { ! GC_add_current_malloc_heap(); ! last_gc_no = GC_gc_no; } ! if (GC_root_size > GC_max_root_size) GC_max_root_size = GC_root_size; ! if (GC_is_malloc_heap_base(p)) return TRUE; # endif for (i = 0; i < GC_n_heap_bases; i++) { ! if (GC_heap_bases[i] == p) return TRUE; } ! return FALSE ; } # ifdef MSWIN32 *************** void GC_register_data_segments() *** 1043,1049 **** # if (defined(SVR4) || defined(AUX) || defined(DGUX) \ || (defined(LINUX) && defined(SPARC))) && !defined(PCR) ! char * GC_SysVGetDataStart(max_page_size, etext_addr) int max_page_size; int * etext_addr; { --- 1313,1319 ---- # if (defined(SVR4) || defined(AUX) || defined(DGUX) \ || (defined(LINUX) && defined(SPARC))) && !defined(PCR) ! ptr_t GC_SysVGetDataStart(max_page_size, etext_addr) int max_page_size; int * etext_addr; { *************** int * etext_addr; *** 1069,1080 **** /* string constants in the text segment, but after etext. */ /* Use plan B. Note that we now know there is a gap between */ /* text and data segments, so plan A bought us something. */ ! result = (char *)GC_find_limit((ptr_t)(DATAEND) - MIN_PAGE_SIZE, FALSE); } ! return((char *)result); } # endif #ifdef AMIGA --- 1339,1383 ---- /* string constants in the text segment, but after etext. */ /* Use plan B. Note that we now know there is a gap between */ /* text and data segments, so plan A bought us something. */ ! result = (char *)GC_find_limit((ptr_t)(DATAEND), FALSE); } ! return((ptr_t)result); } # endif + # if defined(FREEBSD) && defined(I386) && !defined(PCR) + /* Its unclear whether this should be identical to the above, or */ + /* whether it should apply to non-X86 architectures. */ + /* For now we don't assume that there is always an empty page after */ + /* etext. But in some cases there actually seems to be slightly more. */ + /* This also deals with holes between read-only data and writable data. */ + ptr_t GC_FreeBSDGetDataStart(max_page_size, etext_addr) + int max_page_size; + int * etext_addr; + { + word text_end = ((word)(etext_addr) + sizeof(word) - 1) + & ~(sizeof(word) - 1); + /* etext rounded to word boundary */ + VOLATILE word next_page = (text_end + (word)max_page_size - 1) + & ~((word)max_page_size - 1); + VOLATILE ptr_t result = (ptr_t)text_end; + GC_setup_temporary_fault_handler(); + if (setjmp(GC_jmp_buf) == 0) { + /* Try reading at the address. */ + /* This should happen before there is another thread. */ + for (; next_page < (word)(DATAEND); next_page += (word)max_page_size) + *(VOLATILE char *)next_page; + GC_reset_fault_handler(); + } else { + GC_reset_fault_handler(); + /* As above, we go to plan B */ + result = GC_find_limit((ptr_t)(DATAEND), FALSE); + } + return(result); + } + + # endif + #ifdef AMIGA *************** int * etext_addr; *** 1086,1093 **** void GC_register_data_segments() { ! # if !defined(PCR) && !defined(SRC_M3) && !defined(NEXT) && !defined(MACOS) \ ! && !defined(MACOSX) # if defined(REDIRECT_MALLOC) && defined(GC_SOLARIS_THREADS) /* As of Solaris 2.3, the Solaris threads implementation */ /* allocates the data structure for the initial thread with */ --- 1389,1395 ---- void GC_register_data_segments() { ! # if !defined(PCR) && !defined(SRC_M3) && !defined(MACOS) # if defined(REDIRECT_MALLOC) && defined(GC_SOLARIS_THREADS) /* As of Solaris 2.3, the Solaris threads implementation */ /* allocates the data structure for the initial thread with */ *************** void GC_register_data_segments() *** 1104,1112 **** # endif # endif # endif - # if !defined(PCR) && (defined(NEXT) || defined(MACOSX)) - GC_add_roots_inner(DATASTART, (char *) get_end(), FALSE); - # endif # if defined(MACOS) { # if defined(THINK_C) --- 1406,1411 ---- *************** word bytes; *** 1216,1233 **** ptr_t GC_unix_get_mem(bytes) word bytes; { - static GC_bool initialized = FALSE; - static int fd; void *result; static ptr_t last_addr = HEAP_START; ! if (!initialized) { ! fd = open("/dev/zero", O_RDONLY); ! initialized = TRUE; ! } if (bytes & (GC_page_size -1)) ABORT("Bad GET_MEM arg"); ! result = mmap(last_addr, bytes, PROT_READ | PROT_WRITE | OPT_PROT_EXEC, ! GC_MMAP_FLAGS, fd, 0/* offset */); if (result == MAP_FAILED) return(0); last_addr = (ptr_t)result + bytes + GC_page_size - 1; last_addr = (ptr_t)((word)last_addr & ~(GC_page_size - 1)); --- 1515,1542 ---- ptr_t GC_unix_get_mem(bytes) word bytes; { void *result; static ptr_t last_addr = HEAP_START; ! # ifndef USE_MMAP_ANON ! static GC_bool initialized = FALSE; ! static int fd; ! ! if (!initialized) { ! fd = open("/dev/zero", O_RDONLY); ! fcntl(fd, F_SETFD, FD_CLOEXEC); ! initialized = TRUE; ! } ! # endif ! if (bytes & (GC_page_size -1)) ABORT("Bad GET_MEM arg"); ! # ifdef USE_MMAP_ANON ! result = mmap(last_addr, bytes, PROT_READ | PROT_WRITE | OPT_PROT_EXEC, ! GC_MMAP_FLAGS | MAP_ANON, -1, 0/* offset */); ! # else ! result = mmap(last_addr, bytes, PROT_READ | PROT_WRITE | OPT_PROT_EXEC, ! GC_MMAP_FLAGS, fd, 0/* offset */); ! # endif if (result == MAP_FAILED) return(0); last_addr = (ptr_t)result + bytes + GC_page_size - 1; last_addr = (ptr_t)((word)last_addr & ~(GC_page_size - 1)); *************** word bytes; *** 1322,1328 **** result = (ptr_t) GlobalAlloc(0, bytes + HBLKSIZE); result = (ptr_t)(((word)result + HBLKSIZE) & ~(HBLKSIZE-1)); } else { ! result = (ptr_t) VirtualAlloc(NULL, bytes, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE); } --- 1631,1645 ---- result = (ptr_t) GlobalAlloc(0, bytes + HBLKSIZE); result = (ptr_t)(((word)result + HBLKSIZE) & ~(HBLKSIZE-1)); } else { ! /* VirtualProtect only works on regions returned by a */ ! /* single VirtualAlloc call. Thus we allocate one */ ! /* extra page, which will prevent merging of blocks */ ! /* in separate regions, and eliminate any temptation */ ! /* to call VirtualProtect on a range spanning regions. */ ! /* This wastes a small amount of memory, and risks */ ! /* increased fragmentation. But better alternatives */ ! /* would require effort. */ ! result = (ptr_t) VirtualAlloc(NULL, bytes + 1, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE); } *************** word bytes; *** 1378,1383 **** --- 1695,1704 ---- /* Reserve more pages */ word res_bytes = (bytes + GC_sysinfo.dwAllocationGranularity-1) & ~(GC_sysinfo.dwAllocationGranularity-1); + /* If we ever support MPROTECT_VDB here, we will probably need to */ + /* ensure that res_bytes is strictly > bytes, so that VirtualProtect */ + /* never spans regions. It seems to be OK for a VirtualFree argument */ + /* to span regions, so we should be OK for now. */ result = (ptr_t) VirtualAlloc(NULL, res_bytes, MEM_RESERVE | MEM_TOP_DOWN, PAGE_EXECUTE_READWRITE); *************** void GC_remap(ptr_t start, word bytes) *** 1508,1513 **** --- 1829,1835 ---- } # else if (-1 == zero_descr) zero_descr = open("/dev/zero", O_RDWR); + fcntl(zero_descr, F_SETFD, FD_CLOEXEC); if (0 == start_addr) return; result = mmap(start_addr, len, PROT_READ | PROT_WRITE | OPT_PROT_EXEC, MAP_FIXED | MAP_PRIVATE, zero_descr, 0); *************** void (*GC_push_other_roots) GC_PROTO((vo *** 1694,1700 **** * make sure that other system calls are similarly protected * or write only to the stack. */ - GC_bool GC_dirty_maintained = FALSE; # ifdef DEFAULT_VDB --- 2016,2021 ---- *************** GC_bool GC_dirty_maintained = FALSE; *** 1708,1713 **** --- 2029,2037 ---- /* Initialize virtual dirty bit implementation. */ void GC_dirty_init() { + # ifdef PRINTSTATS + GC_printf0("Initializing DEFAULT_VDB...\n"); + # endif GC_dirty_maintained = TRUE; } *************** GC_bool is_ptrfree; *** 1776,1792 **** /* * This implementation maintains dirty bits itself by catching write * faults and keeping track of them. We assume nobody else catches ! * SIGBUS or SIGSEGV. We assume no write faults occur in system calls ! * except as a result of a read system call. This means clients must ! * either ensure that system calls do not touch the heap, or must ! * provide their own wrappers analogous to the one for read. * We assume the page size is a multiple of HBLKSIZE. ! * This implementation is currently SunOS 4.X and IRIX 5.X specific, though we ! * tried to use portable code where easily possible. It is known ! * not to work under a number of other systems. */ ! # if !defined(MSWIN32) && !defined(MSWINCE) # include # include --- 2100,2120 ---- /* * This implementation maintains dirty bits itself by catching write * faults and keeping track of them. We assume nobody else catches ! * SIGBUS or SIGSEGV. We assume no write faults occur in system calls. ! * This means that clients must ensure that system calls don't write ! * to the write-protected heap. Probably the best way to do this is to ! * ensure that system calls write at most to POINTERFREE objects in the ! * heap, and do even that only if we are on a platform on which those ! * are not protected. Another alternative is to wrap system calls ! * (see example for read below), but the current implementation holds ! * a lock across blocking calls, making it problematic for multithreaded ! * applications. * We assume the page size is a multiple of HBLKSIZE. ! * We prefer them to be the same. We avoid protecting POINTERFREE ! * objects only if they are the same. */ ! # if !defined(MSWIN32) && !defined(MSWINCE) && !defined(DARWIN) # include # include *************** GC_bool is_ptrfree; *** 1805,1810 **** --- 2133,2155 ---- # else + # ifdef DARWIN + /* Using vm_protect (mach syscall) over mprotect (BSD syscall) seems to + decrease the likelihood of some of the problems described below. */ + #include + extern mach_port_t GC_task_self; + #define PROTECT(addr,len) \ + if(vm_protect(GC_task_self,(vm_address_t)(addr),(vm_size_t)(len), \ + FALSE,VM_PROT_READ) != KERN_SUCCESS) { \ + ABORT("vm_portect failed"); \ + } + #define UNPROTECT(addr,len) \ + if(vm_protect(GC_task_self,(vm_address_t)(addr),(vm_size_t)(len), \ + FALSE,VM_PROT_READ|VM_PROT_WRITE) != KERN_SUCCESS) { \ + ABORT("vm_portect failed"); \ + } + # else + # ifndef MSWINCE # include # endif *************** GC_bool is_ptrfree; *** 1822,1841 **** &protect_junk)) { \ ABORT("un-VirtualProtect failed"); \ } ! ! # endif #if defined(SUNOS4) || defined(FREEBSD) typedef void (* SIG_PF)(); ! #endif #if defined(SUNOS5SIGS) || defined(OSF1) || defined(LINUX) \ ! || defined(MACOSX) || defined(HURD) # ifdef __STDC__ typedef void (* SIG_PF)(int); # else typedef void (* SIG_PF)(); # endif ! #endif #if defined(MSWIN32) typedef LPTOP_LEVEL_EXCEPTION_FILTER SIG_PF; # undef SIG_DFL --- 2167,2188 ---- &protect_junk)) { \ ABORT("un-VirtualProtect failed"); \ } ! # endif /* !DARWIN */ ! # endif /* MSWIN32 || MSWINCE || DARWIN */ #if defined(SUNOS4) || defined(FREEBSD) typedef void (* SIG_PF)(); ! #endif /* SUNOS4 || FREEBSD */ ! #if defined(SUNOS5SIGS) || defined(OSF1) || defined(LINUX) \ ! || defined(HURD) # ifdef __STDC__ typedef void (* SIG_PF)(int); # else typedef void (* SIG_PF)(); # endif ! #endif /* SUNOS5SIGS || OSF1 || LINUX || HURD */ ! #if defined(MSWIN32) typedef LPTOP_LEVEL_EXCEPTION_FILTER SIG_PF; # undef SIG_DFL *************** GC_bool is_ptrfree; *** 1849,1855 **** #if defined(IRIX5) || defined(OSF1) || defined(HURD) typedef void (* REAL_SIG_PF)(int, int, struct sigcontext *); ! #endif #if defined(SUNOS5SIGS) # ifdef HPUX # define SIGINFO __siginfo --- 2196,2203 ---- #if defined(IRIX5) || defined(OSF1) || defined(HURD) typedef void (* REAL_SIG_PF)(int, int, struct sigcontext *); ! #endif /* IRIX5 || OSF1 || HURD */ ! #if defined(SUNOS5SIGS) # ifdef HPUX # define SIGINFO __siginfo *************** GC_bool is_ptrfree; *** 1861,1873 **** # else typedef void (* REAL_SIG_PF)(); # endif ! #endif #if defined(LINUX) # if __GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 2 typedef struct sigcontext s_c; # else /* glibc < 2.2 */ # include ! # if (LINUX_VERSION_CODE >= 0x20100) && !defined(M68K) || defined(ALPHA) typedef struct sigcontext s_c; # else typedef struct sigcontext_struct s_c; --- 2209,2222 ---- # else typedef void (* REAL_SIG_PF)(); # endif ! #endif /* SUNOS5SIGS */ ! #if defined(LINUX) # if __GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 2 typedef struct sigcontext s_c; # else /* glibc < 2.2 */ # include ! # if (LINUX_VERSION_CODE >= 0x20100) && !defined(M68K) || defined(ALPHA) || defined(ARM32) typedef struct sigcontext s_c; # else typedef struct sigcontext_struct s_c; *************** GC_bool is_ptrfree; *** 1895,2033 **** return (char *)faultaddr; } # endif /* !ALPHA */ ! # endif ! ! # if defined(MACOSX) /* Should also test for PowerPC? */ ! typedef void (* REAL_SIG_PF)(int, int, struct sigcontext *); ! ! /* Decodes the machine instruction which was responsible for the sending of the ! SIGBUS signal. Sadly this is the only way to find the faulting address because ! the signal handler doesn't get it directly from the kernel (although it is ! available on the Mach level, but droppped by the BSD personality before it ! calls our signal handler...) ! This code should be able to deal correctly with all PPCs starting from the ! 601 up to and including the G4s (including Velocity Engine). */ ! #define EXTRACT_OP1(iw) (((iw) & 0xFC000000) >> 26) ! #define EXTRACT_OP2(iw) (((iw) & 0x000007FE) >> 1) ! #define EXTRACT_REGA(iw) (((iw) & 0x001F0000) >> 16) ! #define EXTRACT_REGB(iw) (((iw) & 0x03E00000) >> 21) ! #define EXTRACT_REGC(iw) (((iw) & 0x0000F800) >> 11) ! #define EXTRACT_DISP(iw) ((short *) &(iw))[1] ! ! static char *get_fault_addr(struct sigcontext *scp) ! { ! unsigned int instr = *((unsigned int *) scp->sc_ir); ! unsigned int * regs = &((unsigned int *) scp->sc_regs)[2]; ! int disp = 0, tmp; ! unsigned int baseA = 0, baseB = 0; ! unsigned int addr, alignmask = 0xFFFFFFFF; ! ! #ifdef GC_DEBUG_DECODER ! GC_err_printf1("Instruction: 0x%lx\n", instr); ! GC_err_printf1("Opcode 1: d\n", (int)EXTRACT_OP1(instr)); ! #endif ! switch(EXTRACT_OP1(instr)) { ! case 38: /* stb */ ! case 39: /* stbu */ ! case 54: /* stfd */ ! case 55: /* stfdu */ ! case 52: /* stfs */ ! case 53: /* stfsu */ ! case 44: /* sth */ ! case 45: /* sthu */ ! case 47: /* stmw */ ! case 36: /* stw */ ! case 37: /* stwu */ ! tmp = EXTRACT_REGA(instr); ! if(tmp > 0) ! baseA = regs[tmp]; ! disp = EXTRACT_DISP(instr); ! break; ! case 31: ! #ifdef GC_DEBUG_DECODER ! GC_err_printf1("Opcode 2: %d\n", (int)EXTRACT_OP2(instr)); ! #endif ! switch(EXTRACT_OP2(instr)) { ! case 86: /* dcbf */ ! case 54: /* dcbst */ ! case 1014: /* dcbz */ ! case 247: /* stbux */ ! case 215: /* stbx */ ! case 759: /* stfdux */ ! case 727: /* stfdx */ ! case 983: /* stfiwx */ ! case 695: /* stfsux */ ! case 663: /* stfsx */ ! case 918: /* sthbrx */ ! case 439: /* sthux */ ! case 407: /* sthx */ ! case 661: /* stswx */ ! case 662: /* stwbrx */ ! case 150: /* stwcx. */ ! case 183: /* stwux */ ! case 151: /* stwx */ ! case 135: /* stvebx */ ! case 167: /* stvehx */ ! case 199: /* stvewx */ ! case 231: /* stvx */ ! case 487: /* stvxl */ ! tmp = EXTRACT_REGA(instr); ! if(tmp > 0) ! baseA = regs[tmp]; ! baseB = regs[EXTRACT_REGC(instr)]; ! /* determine Altivec alignment mask */ ! switch(EXTRACT_OP2(instr)) { ! case 167: /* stvehx */ ! alignmask = 0xFFFFFFFE; ! break; ! case 199: /* stvewx */ ! alignmask = 0xFFFFFFFC; ! break; ! case 231: /* stvx */ ! alignmask = 0xFFFFFFF0; ! break; ! case 487: /* stvxl */ ! alignmask = 0xFFFFFFF0; ! break; ! } ! break; ! case 725: /* stswi */ ! tmp = EXTRACT_REGA(instr); ! if(tmp > 0) ! baseA = regs[tmp]; ! break; ! default: /* ignore instruction */ ! #ifdef GC_DEBUG_DECODER ! GC_err_printf("Ignored by inner handler\n"); ! #endif ! return NULL; ! break; ! } ! break; ! default: /* ignore instruction */ ! #ifdef GC_DEBUG_DECODER ! GC_err_printf("Ignored by main handler\n"); ! #endif ! return NULL; ! break; ! } ! ! addr = (baseA + baseB) + disp; ! addr &= alignmask; ! #ifdef GC_DEBUG_DECODER ! GC_err_printf1("BaseA: %d\n", baseA); ! GC_err_printf1("BaseB: %d\n", baseB); ! GC_err_printf1("Disp: %d\n", disp); ! GC_err_printf1("Address: %d\n", addr); ! #endif ! return (char *)addr; ! } ! #endif /* MACOSX */ SIG_PF GC_old_bus_handler; SIG_PF GC_old_segv_handler; /* Also old MSWIN32 ACCESS_VIOLATION filter */ ! #ifdef THREADS /* We need to lock around the bitmap update in the write fault handler */ /* in order to avoid the risk of losing a bit. We do this with a */ /* test-and-set spin lock if we know how to do that. Otherwise we */ --- 2244,2257 ---- return (char *)faultaddr; } # endif /* !ALPHA */ ! # endif /* LINUX */ + #ifndef DARWIN SIG_PF GC_old_bus_handler; SIG_PF GC_old_segv_handler; /* Also old MSWIN32 ACCESS_VIOLATION filter */ + #endif /* !DARWIN */ ! #if defined(THREADS) /* We need to lock around the bitmap update in the write fault handler */ /* in order to avoid the risk of losing a bit. We do this with a */ /* test-and-set spin lock if we know how to do that. Otherwise we */ *************** SIG_PF GC_old_segv_handler; /* Also old *** 2076,2081 **** --- 2300,2306 ---- #endif /* !THREADS */ /*ARGSUSED*/ + #if !defined(DARWIN) # if defined (SUNOS4) || defined(FREEBSD) void GC_write_fault_handler(sig, code, scp, addr) int sig, code; *************** SIG_PF GC_old_segv_handler; /* Also old *** 2091,2097 **** # define SIG_OK (sig == SIGBUS) # define CODE_OK (code == BUS_PAGE_FAULT) # endif ! # endif # if defined(IRIX5) || defined(OSF1) || defined(HURD) # include void GC_write_fault_handler(int sig, int code, struct sigcontext *scp) --- 2316,2323 ---- # define SIG_OK (sig == SIGBUS) # define CODE_OK (code == BUS_PAGE_FAULT) # endif ! # endif /* SUNOS4 || FREEBSD */ ! # if defined(IRIX5) || defined(OSF1) || defined(HURD) # include void GC_write_fault_handler(int sig, int code, struct sigcontext *scp) *************** SIG_PF GC_old_segv_handler; /* Also old *** 2107,2113 **** # define SIG_OK (sig == SIGBUS || sig == SIGSEGV) # define CODE_OK TRUE # endif ! # endif # if defined(LINUX) # if defined(ALPHA) || defined(M68K) void GC_write_fault_handler(int sig, int code, s_c * sc) --- 2333,2340 ---- # define SIG_OK (sig == SIGBUS || sig == SIGSEGV) # define CODE_OK TRUE # endif ! # endif /* IRIX5 || OSF1 || HURD */ ! # if defined(LINUX) # if defined(ALPHA) || defined(M68K) void GC_write_fault_handler(int sig, int code, s_c * sc) *************** SIG_PF GC_old_segv_handler; /* Also old *** 2115,2121 **** # if defined(IA64) || defined(HP_PA) void GC_write_fault_handler(int sig, siginfo_t * si, s_c * scp) # else ! void GC_write_fault_handler(int sig, s_c sc) # endif # endif # define SIG_OK (sig == SIGSEGV) --- 2342,2352 ---- # if defined(IA64) || defined(HP_PA) void GC_write_fault_handler(int sig, siginfo_t * si, s_c * scp) # else ! # if defined(ARM32) ! void GC_write_fault_handler(int sig, int a2, int a3, int a4, s_c sc) ! # else ! void GC_write_fault_handler(int sig, s_c sc) ! # endif # endif # endif # define SIG_OK (sig == SIGSEGV) *************** SIG_PF GC_old_segv_handler; /* Also old *** 2123,2129 **** /* Empirically c.trapno == 14, on IA32, but is that useful? */ /* Should probably consider alignment issues on other */ /* architectures. */ ! # endif # if defined(SUNOS5SIGS) # ifdef __STDC__ void GC_write_fault_handler(int sig, struct SIGINFO *scp, void * context) --- 2354,2361 ---- /* Empirically c.trapno == 14, on IA32, but is that useful? */ /* Should probably consider alignment issues on other */ /* architectures. */ ! # endif /* LINUX */ ! # if defined(SUNOS5SIGS) # ifdef __STDC__ void GC_write_fault_handler(int sig, struct SIGINFO *scp, void * context) *************** SIG_PF GC_old_segv_handler; /* Also old *** 2144,2156 **** # define SIG_OK (sig == SIGSEGV) # define CODE_OK (scp -> si_code == SEGV_ACCERR) # endif ! # endif ! ! # if defined(MACOSX) ! void GC_write_fault_handler(int sig, int code, struct sigcontext *scp) ! # define SIG_OK (sig == SIGBUS) ! # define CODE_OK (code == 0 /* experimentally determined */) ! # endif # if defined(MSWIN32) || defined(MSWINCE) LONG WINAPI GC_write_fault_handler(struct _EXCEPTION_POINTERS *exc_info) --- 2376,2382 ---- # define SIG_OK (sig == SIGSEGV) # define CODE_OK (scp -> si_code == SEGV_ACCERR) # endif ! # endif /* SUNOS5SIGS */ # if defined(MSWIN32) || defined(MSWINCE) LONG WINAPI GC_write_fault_handler(struct _EXCEPTION_POINTERS *exc_info) *************** SIG_PF GC_old_segv_handler; /* Also old *** 2158,2164 **** STATUS_ACCESS_VIOLATION) # define CODE_OK (exc_info -> ExceptionRecord -> ExceptionInformation[0] == 1) /* Write fault */ ! # endif { register unsigned i; # if defined(HURD) --- 2384,2390 ---- STATUS_ACCESS_VIOLATION) # define CODE_OK (exc_info -> ExceptionRecord -> ExceptionInformation[0] == 1) /* Write fault */ ! # endif /* MSWIN32 || MSWINCE */ { register unsigned i; # if defined(HURD) *************** SIG_PF GC_old_segv_handler; /* Also old *** 2218,2233 **** # if defined(POWERPC) char * addr = (char *) (sc.regs->dar); # else ! --> architecture not supported # endif # endif # endif # endif # endif # endif - # if defined(MACOSX) - char * addr = get_fault_addr(scp); - # endif # if defined(MSWIN32) || defined(MSWINCE) char * addr = (char *) (exc_info -> ExceptionRecord -> ExceptionInformation[1]); --- 2444,2460 ---- # if defined(POWERPC) char * addr = (char *) (sc.regs->dar); # else ! # if defined(ARM32) ! char * addr = (char *)sc.fault_address; ! # else ! --> architecture not supported ! # endif # endif # endif # endif # endif # endif # endif # if defined(MSWIN32) || defined(MSWINCE) char * addr = (char *) (exc_info -> ExceptionRecord -> ExceptionInformation[1]); *************** SIG_PF GC_old_segv_handler; /* Also old *** 2291,2299 **** (*(REAL_SIG_PF)old_handler) (sig, code, scp); return; # endif - # ifdef MACOSX - (*(REAL_SIG_PF)old_handler) (sig, code, scp); - # endif # ifdef MSWIN32 return((*old_handler)(exc_info)); # endif --- 2518,2523 ---- *************** SIG_PF GC_old_segv_handler; /* Also old *** 2335,2344 **** ABORT("Unexpected bus error or segmentation fault"); #endif } /* * We hold the allocation lock. We expect block h to be written ! * shortly. Ensure that all pages cvontaining any part of the n hblks * starting at h are no longer protected. If is_ptrfree is false, * also ensure that they will subsequently appear to be dirty. */ --- 2559,2569 ---- ABORT("Unexpected bus error or segmentation fault"); #endif } + #endif /* !DARWIN */ /* * We hold the allocation lock. We expect block h to be written ! * shortly. Ensure that all pages containing any part of the n hblks * starting at h are no longer protected. If is_ptrfree is false, * also ensure that they will subsequently appear to be dirty. */ *************** GC_bool is_ptrfree; *** 2367,2372 **** --- 2592,2598 ---- UNPROTECT(h_trunc, (ptr_t)h_end - (ptr_t)h_trunc); } + #if !defined(DARWIN) void GC_dirty_init() { # if defined(SUNOS5SIGS) || defined(IRIX5) || defined(LINUX) || \ *************** void GC_dirty_init() *** 2389,2401 **** (void)sigaddset(&act.sa_mask, SIG_SUSPEND); # endif /* SIG_SUSPEND */ # endif - # if defined(MACOSX) - struct sigaction act, oldact; - - act.sa_flags = SA_RESTART; - act.sa_handler = GC_write_fault_handler; - sigemptyset(&act.sa_mask); - # endif # ifdef PRINTSTATS GC_printf0("Inititalizing mprotect virtual dirty bit implementation\n"); # endif --- 2615,2620 ---- *************** void GC_dirty_init() *** 2435,2443 **** sigaction(SIGSEGV, 0, &oldact); sigaction(SIGSEGV, &act, 0); # else ! sigaction(SIGSEGV, &act, &oldact); # endif ! # if defined(_sigargs) || defined(HURD) /* This is Irix 5.x, not 6.x. Irix 5.x does not have */ /* sa_sigaction. */ GC_old_segv_handler = oldact.sa_handler; --- 2654,2665 ---- sigaction(SIGSEGV, 0, &oldact); sigaction(SIGSEGV, &act, 0); # else ! { ! int res = sigaction(SIGSEGV, &act, &oldact); ! if (res != 0) ABORT("Sigaction failed"); ! } # endif ! # if defined(_sigargs) || defined(HURD) || !defined(SA_SIGINFO) /* This is Irix 5.x, not 6.x. Irix 5.x does not have */ /* sa_sigaction. */ GC_old_segv_handler = oldact.sa_handler; *************** void GC_dirty_init() *** 2458,2464 **** # endif } # endif ! # if defined(MACOSX) || defined(HPUX) || defined(LINUX) || defined(HURD) sigaction(SIGBUS, &act, &oldact); GC_old_bus_handler = oldact.sa_handler; if (GC_old_bus_handler == SIG_IGN) { --- 2680,2686 ---- # endif } # endif ! # if defined(HPUX) || defined(LINUX) || defined(HURD) sigaction(SIGBUS, &act, &oldact); GC_old_bus_handler = oldact.sa_handler; if (GC_old_bus_handler == SIG_IGN) { *************** void GC_dirty_init() *** 2470,2476 **** GC_err_printf0("Replaced other SIGBUS handler\n"); # endif } ! # endif /* MACOS || HPUX || LINUX */ # if defined(MSWIN32) GC_old_segv_handler = SetUnhandledExceptionFilter(GC_write_fault_handler); if (GC_old_segv_handler != NULL) { --- 2692,2698 ---- GC_err_printf0("Replaced other SIGBUS handler\n"); # endif } ! # endif /* HPUX || LINUX || HURD */ # if defined(MSWIN32) GC_old_segv_handler = SetUnhandledExceptionFilter(GC_write_fault_handler); if (GC_old_segv_handler != NULL) { *************** void GC_dirty_init() *** 2482,2487 **** --- 2704,2710 ---- } # endif } + #endif /* !DARWIN */ int GC_incremental_protection_needs() { *************** word len; *** 2628,2642 **** ((ptr_t)end_block - (ptr_t)start_block) + HBLKSIZE); } ! #if !defined(MSWIN32) && !defined(MSWINCE) && !defined(THREADS) \ ! && !defined(GC_USE_LD_WRAP) ! /* Replacement for UNIX system call. */ ! /* Other calls that write to the heap should be handled similarly. */ ! /* Note that this doesn't work well for blocking reads: It will hold */ ! /* tha allocation lock for the entur duration of the call. Multithreaded */ ! /* clients should really ensure that it won't block, either by setting */ ! /* the descriptor nonblocking, or by calling select or poll first, to */ ! /* make sure that input is available. */ # if defined(__STDC__) && !defined(SUNOS4) # include # include --- 2851,2873 ---- ((ptr_t)end_block - (ptr_t)start_block) + HBLKSIZE); } ! #if 0 ! ! /* We no longer wrap read by default, since that was causing too many */ ! /* problems. It is preferred that the client instead avoids writing */ ! /* to the write-protected heap with a system call. */ ! /* This still serves as sample code if you do want to wrap system calls.*/ ! ! #if !defined(MSWIN32) && !defined(MSWINCE) && !defined(GC_USE_LD_WRAP) ! /* Replacement for UNIX system call. */ ! /* Other calls that write to the heap should be handled similarly. */ ! /* Note that this doesn't work well for blocking reads: It will hold */ ! /* the allocation lock for the entire duration of the call. Multithreaded */ ! /* clients should really ensure that it won't block, either by setting */ ! /* the descriptor nonblocking, or by calling select or poll first, to */ ! /* make sure that input is available. */ ! /* Another, preferred alternative is to ensure that system calls never */ ! /* write to the protected heap (see above). */ # if defined(__STDC__) && !defined(SUNOS4) # include # include *************** word len; *** 2706,2711 **** --- 2937,2944 ---- /* actually calls. */ #endif + #endif /* 0 */ + /*ARGSUSED*/ GC_bool GC_page_was_ever_dirty(h) struct hblk *h; *************** word n; *** 2721,2733 **** { } - # else /* !MPROTECT_VDB */ - - # ifdef GC_USE_LD_WRAP - ssize_t __wrap_read(int fd, void *buf, size_t nbyte) - { return __real_read(fd, buf, nbyte); } - # endif - # endif /* MPROTECT_VDB */ # ifdef PROC_VDB --- 2954,2959 ---- *************** void GC_dirty_init() *** 2806,2811 **** --- 3032,3038 ---- } GC_proc_fd = syscall(SYS_ioctl, fd, PIOCOPENPD, 0); close(fd); + syscall(SYS_fcntl, GC_proc_fd, F_SETFD, FD_CLOEXEC); if (GC_proc_fd < 0) { ABORT("/proc ioctl failed"); } *************** GC_bool is_ptrfree; *** 3045,3050 **** --- 3272,3823 ---- # endif /* PCR_VDB */ + #if defined(MPROTECT_VDB) && defined(DARWIN) + /* The following sources were used as a *reference* for this exception handling + code: + 1. Apple's mach/xnu documentation + 2. Timothy J. Wood's "Mach Exception Handlers 101" post to the + omnigroup's macosx-dev list. + www.omnigroup.com/mailman/archive/macosx-dev/2000-June/002030.html + 3. macosx-nat.c from Apple's GDB source code. + */ + + /* The bug that caused all this trouble should now be fixed. This should + eventually be removed if all goes well. */ + /* define BROKEN_EXCEPTION_HANDLING */ + + #include + #include + #include + #include + #include + #include + + /* These are not defined in any header, although they are documented */ + extern boolean_t exc_server(mach_msg_header_t *,mach_msg_header_t *); + extern kern_return_t exception_raise( + mach_port_t,mach_port_t,mach_port_t, + exception_type_t,exception_data_t,mach_msg_type_number_t); + extern kern_return_t exception_raise_state( + mach_port_t,mach_port_t,mach_port_t, + exception_type_t,exception_data_t,mach_msg_type_number_t, + thread_state_flavor_t*,thread_state_t,mach_msg_type_number_t, + thread_state_t,mach_msg_type_number_t*); + extern kern_return_t exception_raise_state_identity( + mach_port_t,mach_port_t,mach_port_t, + exception_type_t,exception_data_t,mach_msg_type_number_t, + thread_state_flavor_t*,thread_state_t,mach_msg_type_number_t, + thread_state_t,mach_msg_type_number_t*); + + + #define MAX_EXCEPTION_PORTS 16 + + static mach_port_t GC_task_self; + + static struct { + mach_msg_type_number_t count; + exception_mask_t masks[MAX_EXCEPTION_PORTS]; + exception_handler_t ports[MAX_EXCEPTION_PORTS]; + exception_behavior_t behaviors[MAX_EXCEPTION_PORTS]; + thread_state_flavor_t flavors[MAX_EXCEPTION_PORTS]; + } GC_old_exc_ports; + + static struct { + mach_port_t exception; + #if defined(THREADS) + mach_port_t reply; + #endif + } GC_ports; + + typedef struct { + mach_msg_header_t head; + } GC_msg_t; + + typedef enum { + GC_MP_NORMAL, GC_MP_DISCARDING, GC_MP_STOPPED + } GC_mprotect_state_t; + + /* FIXME: 1 and 2 seem to be safe to use in the msgh_id field, + but it isn't documented. Use the source and see if they + should be ok. */ + #define ID_STOP 1 + #define ID_RESUME 2 + + /* These values are only used on the reply port */ + #define ID_ACK 3 + + #if defined(THREADS) + + GC_mprotect_state_t GC_mprotect_state; + + /* The following should ONLY be called when the world is stopped */ + static void GC_mprotect_thread_notify(mach_msg_id_t id) { + struct { + GC_msg_t msg; + mach_msg_trailer_t trailer; + } buf; + mach_msg_return_t r; + /* remote, local */ + buf.msg.head.msgh_bits = + MACH_MSGH_BITS(MACH_MSG_TYPE_MAKE_SEND,0); + buf.msg.head.msgh_size = sizeof(buf.msg); + buf.msg.head.msgh_remote_port = GC_ports.exception; + buf.msg.head.msgh_local_port = MACH_PORT_NULL; + buf.msg.head.msgh_id = id; + + r = mach_msg( + &buf.msg.head, + MACH_SEND_MSG|MACH_RCV_MSG|MACH_RCV_LARGE, + sizeof(buf.msg), + sizeof(buf), + GC_ports.reply, + MACH_MSG_TIMEOUT_NONE, + MACH_PORT_NULL); + if(r != MACH_MSG_SUCCESS) + ABORT("mach_msg failed in GC_mprotect_thread_notify"); + if(buf.msg.head.msgh_id != ID_ACK) + ABORT("invalid ack in GC_mprotect_thread_notify"); + } + + /* Should only be called by the mprotect thread */ + static void GC_mprotect_thread_reply() { + GC_msg_t msg; + mach_msg_return_t r; + /* remote, local */ + msg.head.msgh_bits = + MACH_MSGH_BITS(MACH_MSG_TYPE_MAKE_SEND,0); + msg.head.msgh_size = sizeof(msg); + msg.head.msgh_remote_port = GC_ports.reply; + msg.head.msgh_local_port = MACH_PORT_NULL; + msg.head.msgh_id = ID_ACK; + + r = mach_msg( + &msg.head, + MACH_SEND_MSG, + sizeof(msg), + 0, + MACH_PORT_NULL, + MACH_MSG_TIMEOUT_NONE, + MACH_PORT_NULL); + if(r != MACH_MSG_SUCCESS) + ABORT("mach_msg failed in GC_mprotect_thread_reply"); + } + + void GC_mprotect_stop() { + GC_mprotect_thread_notify(ID_STOP); + } + void GC_mprotect_resume() { + GC_mprotect_thread_notify(ID_RESUME); + } + + #else /* !THREADS */ + /* The compiler should optimize away any GC_mprotect_state computations */ + #define GC_mprotect_state GC_MP_NORMAL + #endif + + static void *GC_mprotect_thread(void *arg) { + mach_msg_return_t r; + /* These two structures contain some private kernel data. We don't need to + access any of it so we don't bother defining a proper struct. The + correct definitions are in the xnu source code. */ + struct { + mach_msg_header_t head; + char data[256]; + } reply; + struct { + mach_msg_header_t head; + mach_msg_body_t msgh_body; + char data[1024]; + } msg; + + mach_msg_id_t id; + + for(;;) { + r = mach_msg( + &msg.head, + MACH_RCV_MSG|MACH_RCV_LARGE| + (GC_mprotect_state == GC_MP_DISCARDING ? MACH_RCV_TIMEOUT : 0), + 0, + sizeof(msg), + GC_ports.exception, + GC_mprotect_state == GC_MP_DISCARDING ? 0 : MACH_MSG_TIMEOUT_NONE, + MACH_PORT_NULL); + + id = r == MACH_MSG_SUCCESS ? msg.head.msgh_id : -1; + + #if defined(THREADS) + if(GC_mprotect_state == GC_MP_DISCARDING) { + if(r == MACH_RCV_TIMED_OUT) { + GC_mprotect_state = GC_MP_STOPPED; + GC_mprotect_thread_reply(); + continue; + } + if(r == MACH_MSG_SUCCESS && (id == ID_STOP || id == ID_RESUME)) + ABORT("out of order mprotect thread request"); + } + #endif + + if(r != MACH_MSG_SUCCESS) { + GC_err_printf2("mach_msg failed with %d %s\n", + (int)r,mach_error_string(r)); + ABORT("mach_msg failed"); + } + + switch(id) { + #if defined(THREADS) + case ID_STOP: + if(GC_mprotect_state != GC_MP_NORMAL) + ABORT("Called mprotect_stop when state wasn't normal"); + GC_mprotect_state = GC_MP_DISCARDING; + break; + case ID_RESUME: + if(GC_mprotect_state != GC_MP_STOPPED) + ABORT("Called mprotect_resume when state wasn't stopped"); + GC_mprotect_state = GC_MP_NORMAL; + GC_mprotect_thread_reply(); + break; + #endif /* THREADS */ + default: + /* Handle the message (calls catch_exception_raise) */ + if(!exc_server(&msg.head,&reply.head)) + ABORT("exc_server failed"); + /* Send the reply */ + r = mach_msg( + &reply.head, + MACH_SEND_MSG, + reply.head.msgh_size, + 0, + MACH_PORT_NULL, + MACH_MSG_TIMEOUT_NONE, + MACH_PORT_NULL); + if(r != MACH_MSG_SUCCESS) { + /* This will fail if the thread dies, but the thread shouldn't + die... */ + #ifdef BROKEN_EXCEPTION_HANDLING + GC_err_printf2( + "mach_msg failed with %d %s while sending exc reply\n", + (int)r,mach_error_string(r)); + #else + ABORT("mach_msg failed while sending exception reply"); + #endif + } + } /* switch */ + } /* for(;;) */ + /* NOT REACHED */ + return NULL; + } + + /* All this SIGBUS code shouldn't be necessary. All protection faults should + be going throught the mach exception handler. However, it seems a SIGBUS is + occasionally sent for some unknown reason. Even more odd, it seems to be + meaningless and safe to ignore. */ + #ifdef BROKEN_EXCEPTION_HANDLING + + typedef void (* SIG_PF)(); + static SIG_PF GC_old_bus_handler; + + /* Updates to this aren't atomic, but the SIGBUSs seem pretty rare. + Even if this doesn't get updated property, it isn't really a problem */ + static int GC_sigbus_count; + + static void GC_darwin_sigbus(int num,siginfo_t *sip,void *context) { + if(num != SIGBUS) ABORT("Got a non-sigbus signal in the sigbus handler"); + + /* Ugh... some seem safe to ignore, but too many in a row probably means + trouble. GC_sigbus_count is reset for each mach exception that is + handled */ + if(GC_sigbus_count >= 8) { + ABORT("Got more than 8 SIGBUSs in a row!"); + } else { + GC_sigbus_count++; + GC_err_printf0("GC: WARNING: Ignoring SIGBUS.\n"); + } + } + #endif /* BROKEN_EXCEPTION_HANDLING */ + + void GC_dirty_init() { + kern_return_t r; + mach_port_t me; + pthread_t thread; + pthread_attr_t attr; + exception_mask_t mask; + + # ifdef PRINTSTATS + GC_printf0("Inititalizing mach/darwin mprotect virtual dirty bit " + "implementation\n"); + # endif + # ifdef BROKEN_EXCEPTION_HANDLING + GC_err_printf0("GC: WARNING: Enabling workarounds for various darwin " + "exception handling bugs.\n"); + # endif + GC_dirty_maintained = TRUE; + if (GC_page_size % HBLKSIZE != 0) { + GC_err_printf0("Page size not multiple of HBLKSIZE\n"); + ABORT("Page size not multiple of HBLKSIZE"); + } + + GC_task_self = me = mach_task_self(); + + r = mach_port_allocate(me,MACH_PORT_RIGHT_RECEIVE,&GC_ports.exception); + if(r != KERN_SUCCESS) ABORT("mach_port_allocate failed (exception port)"); + + r = mach_port_insert_right(me,GC_ports.exception,GC_ports.exception, + MACH_MSG_TYPE_MAKE_SEND); + if(r != KERN_SUCCESS) + ABORT("mach_port_insert_right failed (exception port)"); + + #if defined(THREADS) + r = mach_port_allocate(me,MACH_PORT_RIGHT_RECEIVE,&GC_ports.reply); + if(r != KERN_SUCCESS) ABORT("mach_port_allocate failed (reply port)"); + #endif + + /* The exceptions we want to catch */ + mask = EXC_MASK_BAD_ACCESS; + + r = task_get_exception_ports( + me, + mask, + GC_old_exc_ports.masks, + &GC_old_exc_ports.count, + GC_old_exc_ports.ports, + GC_old_exc_ports.behaviors, + GC_old_exc_ports.flavors + ); + if(r != KERN_SUCCESS) ABORT("task_get_exception_ports failed"); + + r = task_set_exception_ports( + me, + mask, + GC_ports.exception, + EXCEPTION_DEFAULT, + MACHINE_THREAD_STATE + ); + if(r != KERN_SUCCESS) ABORT("task_set_exception_ports failed"); + + if(pthread_attr_init(&attr) != 0) ABORT("pthread_attr_init failed"); + if(pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED) != 0) + ABORT("pthread_attr_setdetachedstate failed"); + + # undef pthread_create + /* This will call the real pthread function, not our wrapper */ + if(pthread_create(&thread,&attr,GC_mprotect_thread,NULL) != 0) + ABORT("pthread_create failed"); + pthread_attr_destroy(&attr); + + /* Setup the sigbus handler for ignoring the meaningless SIGBUSs */ + #ifdef BROKEN_EXCEPTION_HANDLING + { + struct sigaction sa, oldsa; + sa.sa_handler = (SIG_PF)GC_darwin_sigbus; + sigemptyset(&sa.sa_mask); + sa.sa_flags = SA_RESTART|SA_SIGINFO; + if(sigaction(SIGBUS,&sa,&oldsa) < 0) ABORT("sigaction"); + GC_old_bus_handler = (SIG_PF)oldsa.sa_handler; + if (GC_old_bus_handler != SIG_DFL) { + # ifdef PRINTSTATS + GC_err_printf0("Replaced other SIGBUS handler\n"); + # endif + } + } + #endif /* BROKEN_EXCEPTION_HANDLING */ + } + + /* The source code for Apple's GDB was used as a reference for the exception + forwarding code. This code is similar to be GDB code only because there is + only one way to do it. */ + static kern_return_t GC_forward_exception( + mach_port_t thread, + mach_port_t task, + exception_type_t exception, + exception_data_t data, + mach_msg_type_number_t data_count + ) { + int i; + kern_return_t r; + mach_port_t port; + exception_behavior_t behavior; + thread_state_flavor_t flavor; + + thread_state_data_t thread_state; + mach_msg_type_number_t thread_state_count = THREAD_STATE_MAX; + + for(i=0;i 0 ? code[0] : -1, + code_count > 1 ? code[1] : -1); + #endif + return FWD(); + } + + r = thread_get_state(thread,flavor, + (natural_t*)&exc_state,&exc_state_count); + if(r != KERN_SUCCESS) { + /* The thread is supposed to be suspended while the exception handler + is called. This shouldn't fail. */ + #ifdef BROKEN_EXCEPTION_HANDLING + GC_err_printf0("thread_get_state failed in " + "catch_exception_raise\n"); + return KERN_SUCCESS; + #else + ABORT("thread_get_state failed in catch_exception_raise"); + #endif + } + + /* This is the address that caused the fault */ + addr = (char*) exc_state.dar; + + if((HDR(addr)) == 0) { + /* Ugh... just like the SIGBUS problem above, it seems we get a bogus + KERN_PROTECTION_FAILURE every once and a while. We wait till we get + a bunch in a row before doing anything about it. If a "real" fault + ever occurres it'll just keep faulting over and over and we'll hit + the limit pretty quickly. */ + #ifdef BROKEN_EXCEPTION_HANDLING + static char *last_fault; + static int last_fault_count; + + if(addr != last_fault) { + last_fault = addr; + last_fault_count = 0; + } + if(++last_fault_count < 32) { + if(last_fault_count == 1) + GC_err_printf1( + "GC: WARNING: Ignoring KERN_PROTECTION_FAILURE at %p\n", + addr); + return KERN_SUCCESS; + } + + GC_err_printf1("Unexpected KERN_PROTECTION_FAILURE at %p\n",addr); + /* Can't pass it along to the signal handler because that is + ignoring SIGBUS signals. We also shouldn't call ABORT here as + signals don't always work too well from the exception handler. */ + GC_err_printf0("Aborting\n"); + exit(EXIT_FAILURE); + #else /* BROKEN_EXCEPTION_HANDLING */ + /* Pass it along to the next exception handler + (which should call SIGBUS/SIGSEGV) */ + return FWD(); + #endif /* !BROKEN_EXCEPTION_HANDLING */ + } + + #ifdef BROKEN_EXCEPTION_HANDLING + /* Reset the number of consecutive SIGBUSs */ + GC_sigbus_count = 0; + #endif + + if(GC_mprotect_state == GC_MP_NORMAL) { /* common case */ + h = (struct hblk*)((word)addr & ~(GC_page_size-1)); + UNPROTECT(h, GC_page_size); + for (i = 0; i < divHBLKSZ(GC_page_size); i++) { + register int index = PHT_HASH(h+i); + async_set_pht_entry_from_index(GC_dirty_pages, index); + } + } else if(GC_mprotect_state == GC_MP_DISCARDING) { + /* Lie to the thread for now. No sense UNPROTECT()ing the memory + when we're just going to PROTECT() it again later. The thread + will just fault again once it resumes */ + } else { + /* Shouldn't happen, i don't think */ + GC_printf0("KERN_PROTECTION_FAILURE while world is stopped\n"); + return FWD(); + } + return KERN_SUCCESS; + } + #undef FWD + + /* These should never be called, but just in case... */ + kern_return_t catch_exception_raise_state(mach_port_name_t exception_port, + int exception, exception_data_t code, mach_msg_type_number_t codeCnt, + int flavor, thread_state_t old_state, int old_stateCnt, + thread_state_t new_state, int new_stateCnt) + { + ABORT("catch_exception_raise_state"); + return(KERN_INVALID_ARGUMENT); + } + kern_return_t catch_exception_raise_state_identity( + mach_port_name_t exception_port, mach_port_t thread, mach_port_t task, + int exception, exception_data_t code, mach_msg_type_number_t codeCnt, + int flavor, thread_state_t old_state, int old_stateCnt, + thread_state_t new_state, int new_stateCnt) + { + ABORT("catch_exception_raise_state_identity"); + return(KERN_INVALID_ARGUMENT); + } + + + #endif /* DARWIN && MPROTECT_VDB */ + # ifndef HAVE_INCREMENTAL_PROTECTION_NEEDS int GC_incremental_protection_needs() { *************** GC_bool is_ptrfree; *** 3105,3123 **** # endif #endif /* SPARC */ ! #ifdef SAVE_CALL_CHAIN /* Fill in the pc and argument information for up to NFRAMES of my */ /* callers. Ignore my frame and my callers frame. */ #ifdef LINUX ! # include ! # if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2 ! # define HAVE_BUILTIN_BACKTRACE ! # endif #endif #if NARGS == 0 && NFRAMES % 2 == 0 /* No padding */ \ ! && defined(HAVE_BUILTIN_BACKTRACE) #include --- 3878,3897 ---- # endif #endif /* SPARC */ ! #ifdef NEED_CALLINFO /* Fill in the pc and argument information for up to NFRAMES of my */ /* callers. Ignore my frame and my callers frame. */ #ifdef LINUX ! # include #endif + #endif /* NEED_CALLINFO */ + + #ifdef SAVE_CALL_CHAIN + #if NARGS == 0 && NFRAMES % 2 == 0 /* No padding */ \ ! && defined(GC_HAVE_BUILTIN_BACKTRACE) #include *************** struct callinfo info[NFRAMES]; *** 3163,3170 **** asm("movl %%ebp,%0" : "=r"(frame)); fp = frame; # else - word GC_save_regs_in_stack(); - frame = (struct frame *) GC_save_regs_in_stack (); fp = (struct frame *)((long) frame -> FR_SAVFP + BIAS); #endif --- 3937,3942 ---- *************** struct callinfo info[NFRAMES]; *** 3188,3218 **** #endif /* SAVE_CALL_CHAIN */ ! #if defined(LINUX) && defined(__ELF__) && \ ! (!defined(SMALL_CONFIG) || defined(USE_PROC_FOR_LIBRARIES)) ! #ifdef GC_USE_LD_WRAP ! # define READ __real_read ! #else ! # define READ read ! #endif ! ! /* Repeatedly perform a read call until the buffer is filled or */ ! /* we encounter EOF. */ ! ssize_t GC_repeat_read(int fd, char *buf, size_t count) { ! ssize_t num_read = 0; ! ssize_t result; ! while (num_read < count) { ! result = READ(fd, buf + num_read, count - num_read); ! if (result < 0) return result; ! if (result == 0) break; ! num_read += result; } ! return num_read; } ! #endif /* LINUX && ... */ #if defined(LINUX) && defined(__ELF__) && !defined(SMALL_CONFIG) --- 3960,4098 ---- #endif /* SAVE_CALL_CHAIN */ ! #ifdef NEED_CALLINFO ! /* Print info to stderr. We do NOT hold the allocation lock */ ! void GC_print_callers (info) ! struct callinfo info[NFRAMES]; { ! register int i; ! static int reentry_count = 0; ! GC_bool stop = FALSE; ! ! LOCK(); ! ++reentry_count; ! UNLOCK(); ! # if NFRAMES == 1 ! GC_err_printf0("\tCaller at allocation:\n"); ! # else ! GC_err_printf0("\tCall chain at allocation:\n"); ! # endif ! for (i = 0; i < NFRAMES && !stop ; i++) { ! if (info[i].ci_pc == 0) break; ! # if NARGS > 0 ! { ! int j; ! ! GC_err_printf0("\t\targs: "); ! for (j = 0; j < NARGS; j++) { ! if (j != 0) GC_err_printf0(", "); ! GC_err_printf2("%d (0x%X)", ~(info[i].ci_arg[j]), ! ~(info[i].ci_arg[j])); ! } ! GC_err_printf0("\n"); ! } ! # endif ! if (reentry_count > 1) { ! /* We were called during an allocation during */ ! /* a previous GC_print_callers call; punt. */ ! GC_err_printf1("\t\t##PC##= 0x%lx\n", info[i].ci_pc); ! continue; ! } ! { ! # ifdef LINUX ! FILE *pipe; ! # endif ! # if defined(GC_HAVE_BUILTIN_BACKTRACE) ! char **sym_name = ! backtrace_symbols((void **)(&(info[i].ci_pc)), 1); ! char *name = sym_name[0]; ! # else ! char buf[40]; ! char *name = buf; ! sprintf(buf, "##PC##= 0x%lx", info[i].ci_pc); ! # endif ! # if defined(LINUX) && !defined(SMALL_CONFIG) ! /* Try for a line number. */ ! { ! # define EXE_SZ 100 ! static char exe_name[EXE_SZ]; ! # define CMD_SZ 200 ! char cmd_buf[CMD_SZ]; ! # define RESULT_SZ 200 ! static char result_buf[RESULT_SZ]; ! size_t result_len; ! static GC_bool found_exe_name = FALSE; ! static GC_bool will_fail = FALSE; ! int ret_code; ! /* Try to get it via a hairy and expensive scheme. */ ! /* First we get the name of the executable: */ ! if (will_fail) goto out; ! if (!found_exe_name) { ! ret_code = readlink("/proc/self/exe", exe_name, EXE_SZ); ! if (ret_code < 0 || ret_code >= EXE_SZ ! || exe_name[0] != '/') { ! will_fail = TRUE; /* Dont try again. */ ! goto out; ! } ! exe_name[ret_code] = '\0'; ! found_exe_name = TRUE; ! } ! /* Then we use popen to start addr2line -e */ ! /* There are faster ways to do this, but hopefully this */ ! /* isn't time critical. */ ! sprintf(cmd_buf, "/usr/bin/addr2line -f -e %s 0x%lx", exe_name, ! (unsigned long)info[i].ci_pc); ! pipe = popen(cmd_buf, "r"); ! if (pipe == NULL ! || (result_len = fread(result_buf, 1, RESULT_SZ - 1, pipe)) ! == 0) { ! if (pipe != NULL) pclose(pipe); ! will_fail = TRUE; ! goto out; ! } ! if (result_buf[result_len - 1] == '\n') --result_len; ! result_buf[result_len] = 0; ! if (result_buf[0] == '?' ! || result_buf[result_len-2] == ':' ! && result_buf[result_len-1] == '0') { ! pclose(pipe); ! goto out; ! } ! /* Get rid of embedded newline, if any. Test for "main" */ ! { ! char * nl = strchr(result_buf, '\n'); ! if (nl != NULL && nl < result_buf + result_len) { ! *nl = ':'; ! } ! if (strncmp(result_buf, "main", nl - result_buf) == 0) { ! stop = TRUE; ! } ! } ! if (result_len < RESULT_SZ - 25) { ! /* Add in hex address */ ! sprintf(result_buf + result_len, " [0x%lx]", ! (unsigned long)info[i].ci_pc); ! } ! name = result_buf; ! pclose(pipe); ! out:; ! } ! # endif /* LINUX */ ! GC_err_printf1("\t\t%s\n", name); ! # if defined(GC_HAVE_BUILTIN_BACKTRACE) ! free(sym_name); /* May call GC_free; that's OK */ ! # endif ! } } ! LOCK(); ! --reentry_count; ! UNLOCK(); } ! ! #endif /* NEED_CALLINFO */ ! #if defined(LINUX) && defined(__ELF__) && !defined(SMALL_CONFIG) *************** ssize_t GC_repeat_read(int fd, char *buf *** 3220,3239 **** /* Dump /proc/self/maps to GC_stderr, to enable looking up names for addresses in FIND_LEAK output. */ void GC_print_address_map() { - int f; - int result; - char maps_temp[32768]; GC_err_printf0("---------- Begin address map ----------\n"); ! f = open("/proc/self/maps", O_RDONLY); ! if (-1 == f) ABORT("Couldn't open /proc/self/maps"); ! do { ! result = GC_repeat_read(f, maps_temp, sizeof(maps_temp)); ! if (result <= 0) ABORT("Couldn't read /proc/self/maps"); ! GC_err_write(maps_temp, result); ! } while (result == sizeof(maps_temp)); ! GC_err_printf0("---------- End address map ----------\n"); } --- 4100,4115 ---- /* Dump /proc/self/maps to GC_stderr, to enable looking up names for addresses in FIND_LEAK output. */ + static word dump_maps(char *maps) + { + GC_err_write(maps, strlen(maps)); + return 1; + } + void GC_print_address_map() { GC_err_printf0("---------- Begin address map ----------\n"); ! GC_apply_to_maps(dump_maps); GC_err_printf0("---------- End address map ----------\n"); } diff -Nrc3pad gcc-3.3.3/boehm-gc/powerpc_darwin_mach_dep.s gcc-3.4.0/boehm-gc/powerpc_darwin_mach_dep.s *** gcc-3.3.3/boehm-gc/powerpc_darwin_mach_dep.s 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/boehm-gc/powerpc_darwin_mach_dep.s 2003-07-28 03:46:10.000000000 +0000 *************** *** 0 **** --- 1,84 ---- + + ; GC_push_regs function. Under some optimization levels GCC will clobber + ; some of the non-volatile registers before we get a chance to save them + ; therefore, this can't be inline asm. + + .text + .align 2 + .globl _GC_push_regs + _GC_push_regs: + + ; Prolog + mflr r0 + stw r0,8(r1) + stwu r1,-80(r1) + + ; Push r13-r31 + mr r3,r13 + bl L_GC_push_one$stub + mr r3,r14 + bl L_GC_push_one$stub + mr r3,r15 + bl L_GC_push_one$stub + mr r3,r16 + bl L_GC_push_one$stub + mr r3,r17 + bl L_GC_push_one$stub + mr r3,r18 + bl L_GC_push_one$stub + mr r3,r19 + bl L_GC_push_one$stub + mr r3,r20 + bl L_GC_push_one$stub + mr r3,r21 + bl L_GC_push_one$stub + mr r3,r22 + bl L_GC_push_one$stub + mr r3,r23 + bl L_GC_push_one$stub + mr r3,r24 + bl L_GC_push_one$stub + mr r3,r25 + bl L_GC_push_one$stub + mr r3,r26 + bl L_GC_push_one$stub + mr r3,r27 + bl L_GC_push_one$stub + mr r3,r28 + bl L_GC_push_one$stub + mr r3,r29 + bl L_GC_push_one$stub + mr r3,r30 + bl L_GC_push_one$stub + mr r3,r31 + bl L_GC_push_one$stub + + ; + lwz r0,88(r1) + addi r1,r1,80 + mtlr r0 + + ; Return + blr + + ; PIC stuff, generated by GCC + + .data + .picsymbol_stub + L_GC_push_one$stub: + .indirect_symbol _GC_push_one + mflr r0 + bcl 20,31,L0$_GC_push_one + L0$_GC_push_one: + mflr r11 + addis r11,r11,ha16(L_GC_push_one$lazy_ptr-L0$_GC_push_one) + mtlr r0 + lwz r12,lo16(L_GC_push_one$lazy_ptr-L0$_GC_push_one)(r11) + mtctr r12 + addi r11,r11,lo16(L_GC_push_one$lazy_ptr-L0$_GC_push_one) + bctr + .data + .lazy_symbol_pointer + L_GC_push_one$lazy_ptr: + .indirect_symbol _GC_push_one + .long dyld_stub_binding_helper diff -Nrc3pad gcc-3.3.3/boehm-gc/powerpc_macosx_mach_dep.s gcc-3.4.0/boehm-gc/powerpc_macosx_mach_dep.s *** gcc-3.3.3/boehm-gc/powerpc_macosx_mach_dep.s 2001-08-18 01:04:43.000000000 +0000 --- gcc-3.4.0/boehm-gc/powerpc_macosx_mach_dep.s 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,95 **** - - .text - - .set linkageArea,24 - .set params,4 - .set alignment,4 - - .set spaceToSave,linkageArea+params+alignment - .set spaceToSave8,spaceToSave+8 - - ; Mark from machine registers that are saved by C compiler - .globl _GC_push_regs - _GC_push_regs: - ; PROLOG - mflr r0 ; get return address - stw r0,8(r1) ; save return address - stwu r1,-spaceToSave(r1) ; skip over caller save area - ; - mr r3,r2 ; mark from r2. Well Im not really sure - ; that this is necessary or even the right - ; thing to do - at least it doesnt harm... - ; According to Apples docs it points to - ; the direct data area, whatever that is... - bl L_GC_push_one$stub - mr r3,r13 ; mark from r13-r31 - bl L_GC_push_one$stub - mr r3,r14 - bl L_GC_push_one$stub - mr r3,r15 - bl L_GC_push_one$stub - mr r3,r16 - bl L_GC_push_one$stub - mr r3,r17 - bl L_GC_push_one$stub - mr r3,r18 - bl L_GC_push_one$stub - mr r3,r19 - bl L_GC_push_one$stub - mr r3,r20 - bl L_GC_push_one$stub - mr r3,r21 - bl L_GC_push_one$stub - mr r3,r22 - bl L_GC_push_one$stub - mr r3,r23 - bl L_GC_push_one$stub - mr r3,r24 - bl L_GC_push_one$stub - mr r3,r25 - bl L_GC_push_one$stub - mr r3,r26 - bl L_GC_push_one$stub - mr r3,r27 - bl L_GC_push_one$stub - mr r3,r28 - bl L_GC_push_one$stub - mr r3,r29 - bl L_GC_push_one$stub - mr r3,r30 - bl L_GC_push_one$stub - mr r3,r31 - bl L_GC_push_one$stub - ; EPILOG - lwz r0,spaceToSave8(r1) ; get return address back - mtlr r0 ; reset link register - addic r1,r1,spaceToSave ; restore stack pointer - blr - - .data - .picsymbol_stub - L_GC_push_one$stub: - .indirect_symbol _GC_push_one - mflr r0 - bcl 20,31,L0$_GC_push_one - L0$_GC_push_one: - mflr r11 - addis r11,r11,ha16(L_GC_push_one$lazy_ptr-L0$_GC_push_one) - mtlr r0 - lwz r12,lo16(L_GC_push_one$lazy_ptr-L0$_GC_push_one)(r11) - mtctr r12 - addi r11,r11,lo16(L_GC_push_one$lazy_ptr-L0$_GC_push_one) - bctr - .data - .lazy_symbol_pointer - L_GC_push_one$lazy_ptr: - .indirect_symbol _GC_push_one - .long dyld_stub_binding_helper - .non_lazy_symbol_pointer - L_GC_push_one$non_lazy_ptr: - .indirect_symbol _GC_push_one - .long 0 - - - - --- 0 ---- diff -Nrc3pad gcc-3.3.3/boehm-gc/pthread_stop_world.c gcc-3.4.0/boehm-gc/pthread_stop_world.c *** gcc-3.3.3/boehm-gc/pthread_stop_world.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/boehm-gc/pthread_stop_world.c 2003-07-28 03:46:09.000000000 +0000 *************** *** 0 **** --- 1,445 ---- + #include "private/pthread_support.h" + + #if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \ + && !defined(GC_IRIX_THREADS) && !defined(GC_WIN32_THREADS) \ + && !defined(GC_DARWIN_THREADS) && !defined(GC_AIX_THREADS) + + #include + #include + #include + #include + + #if DEBUG_THREADS + + #ifndef NSIG + # if defined(MAXSIG) + # define NSIG (MAXSIG+1) + # elif defined(_NSIG) + # define NSIG _NSIG + # elif defined(__SIGRTMAX) + # define NSIG (__SIGRTMAX+1) + # else + --> please fix it + # endif + #endif + + void GC_print_sig_mask() + { + sigset_t blocked; + int i; + + if (pthread_sigmask(SIG_BLOCK, NULL, &blocked) != 0) + ABORT("pthread_sigmask"); + GC_printf0("Blocked: "); + for (i = 1; i < NSIG; i++) { + if (sigismember(&blocked, i)) { GC_printf1("%ld ",(long) i); } + } + GC_printf0("\n"); + } + + #endif + + word GC_stop_count; /* Incremented at the beginning of GC_stop_world. */ + + #ifdef GC_OSF1_THREADS + GC_bool GC_retry_signals = TRUE; + #else + GC_bool GC_retry_signals = FALSE; + #endif + + /* + * We use signals to stop threads during GC. + * + * Suspended threads wait in signal handler for SIG_THR_RESTART. + * That's more portable than semaphores or condition variables. + * (We do use sem_post from a signal handler, but that should be portable.) + * + * The thread suspension signal SIG_SUSPEND is now defined in gc_priv.h. + * Note that we can't just stop a thread; we need it to save its stack + * pointer(s) and acknowledge. + */ + + #ifndef SIG_THR_RESTART + # if defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) + # ifdef _SIGRTMIN + # define SIG_THR_RESTART _SIGRTMIN + 5 + # else + # define SIG_THR_RESTART SIGRTMIN + 5 + # endif + # else + # define SIG_THR_RESTART SIGXCPU + # endif + #endif + + sem_t GC_suspend_ack_sem; + + void GC_suspend_handler(int sig) + { + int dummy; + pthread_t my_thread = pthread_self(); + GC_thread me; + sigset_t mask; + # ifdef PARALLEL_MARK + word my_mark_no = GC_mark_no; + /* Marker can't proceed until we acknowledge. Thus this is */ + /* guaranteed to be the mark_no correspending to our */ + /* suspension, i.e. the marker can't have incremented it yet. */ + # endif + word my_stop_count = GC_stop_count; + + if (sig != SIG_SUSPEND) ABORT("Bad signal in suspend_handler"); + + #if DEBUG_THREADS + GC_printf1("Suspending 0x%lx\n", my_thread); + #endif + + me = GC_lookup_thread(my_thread); + /* The lookup here is safe, since I'm doing this on behalf */ + /* of a thread which holds the allocation lock in order */ + /* to stop the world. Thus concurrent modification of the */ + /* data structure is impossible. */ + if (me -> stop_info.last_stop_count == my_stop_count) { + /* Duplicate signal. OK if we are retrying. */ + if (!GC_retry_signals) { + WARN("Duplicate suspend signal in thread %lx\n", + pthread_self()); + } + return; + } + # ifdef SPARC + me -> stop_info.stack_ptr = (ptr_t)GC_save_regs_in_stack(); + # else + me -> stop_info.stack_ptr = (ptr_t)(&dummy); + # endif + # ifdef IA64 + me -> backing_store_ptr = (ptr_t)GC_save_regs_in_stack(); + # endif + + /* Tell the thread that wants to stop the world that this */ + /* thread has been stopped. Note that sem_post() is */ + /* the only async-signal-safe primitive in LinuxThreads. */ + sem_post(&GC_suspend_ack_sem); + me -> stop_info.last_stop_count = my_stop_count; + + /* Wait until that thread tells us to restart by sending */ + /* this thread a SIG_THR_RESTART signal. */ + /* SIG_THR_RESTART should be masked at this point. Thus there */ + /* is no race. */ + if (sigfillset(&mask) != 0) ABORT("sigfillset() failed"); + if (sigdelset(&mask, SIG_THR_RESTART) != 0) ABORT("sigdelset() failed"); + # ifdef NO_SIGNALS + if (sigdelset(&mask, SIGINT) != 0) ABORT("sigdelset() failed"); + if (sigdelset(&mask, SIGQUIT) != 0) ABORT("sigdelset() failed"); + if (sigdelset(&mask, SIGTERM) != 0) ABORT("sigdelset() failed"); + if (sigdelset(&mask, SIGABRT) != 0) ABORT("sigdelset() failed"); + # endif + do { + me->stop_info.signal = 0; + sigsuspend(&mask); /* Wait for signal */ + } while (me->stop_info.signal != SIG_THR_RESTART); + /* If the RESTART signal gets lost, we can still lose. That should be */ + /* less likely than losing the SUSPEND signal, since we don't do much */ + /* between the sem_post and sigsuspend. */ + /* We'd need more handshaking to work around that, since we don't want */ + /* to accidentally leave a RESTART signal pending, thus causing us to */ + /* continue prematurely in a future round. */ + + #if DEBUG_THREADS + GC_printf1("Continuing 0x%lx\n", my_thread); + #endif + } + + void GC_restart_handler(int sig) + { + pthread_t my_thread = pthread_self(); + GC_thread me; + + if (sig != SIG_THR_RESTART) ABORT("Bad signal in suspend_handler"); + + /* Let the GC_suspend_handler() know that we got a SIG_THR_RESTART. */ + /* The lookup here is safe, since I'm doing this on behalf */ + /* of a thread which holds the allocation lock in order */ + /* to stop the world. Thus concurrent modification of the */ + /* data structure is impossible. */ + me = GC_lookup_thread(my_thread); + me->stop_info.signal = SIG_THR_RESTART; + + /* + ** Note: even if we didn't do anything useful here, + ** it would still be necessary to have a signal handler, + ** rather than ignoring the signals, otherwise + ** the signals will not be delivered at all, and + ** will thus not interrupt the sigsuspend() above. + */ + + #if DEBUG_THREADS + GC_printf1("In GC_restart_handler for 0x%lx\n", pthread_self()); + #endif + } + + # ifdef IA64 + # define IF_IA64(x) x + # else + # define IF_IA64(x) + # endif + /* We hold allocation lock. Should do exactly the right thing if the */ + /* world is stopped. Should not fail if it isn't. */ + void GC_push_all_stacks() + { + int i; + GC_thread p; + ptr_t lo, hi; + /* On IA64, we also need to scan the register backing store. */ + IF_IA64(ptr_t bs_lo; ptr_t bs_hi;) + pthread_t me = pthread_self(); + + if (!GC_thr_initialized) GC_thr_init(); + #if DEBUG_THREADS + GC_printf1("Pushing stacks from thread 0x%lx\n", (unsigned long) me); + #endif + for (i = 0; i < THREAD_TABLE_SZ; i++) { + for (p = GC_threads[i]; p != 0; p = p -> next) { + if (p -> flags & FINISHED) continue; + if (pthread_equal(p -> id, me)) { + # ifdef SPARC + lo = (ptr_t)GC_save_regs_in_stack(); + # else + lo = GC_approx_sp(); + # endif + IF_IA64(bs_hi = (ptr_t)GC_save_regs_in_stack();) + } else { + lo = p -> stop_info.stack_ptr; + IF_IA64(bs_hi = p -> backing_store_ptr;) + } + if ((p -> flags & MAIN_THREAD) == 0) { + hi = p -> stack_end; + IF_IA64(bs_lo = p -> backing_store_end); + } else { + /* The original stack. */ + hi = GC_stackbottom; + IF_IA64(bs_lo = BACKING_STORE_BASE;) + } + #if DEBUG_THREADS + GC_printf3("Stack for thread 0x%lx = [%lx,%lx)\n", + (unsigned long) p -> id, + (unsigned long) lo, (unsigned long) hi); + #endif + if (0 == lo) ABORT("GC_push_all_stacks: sp not set!\n"); + # ifdef STACK_GROWS_UP + /* We got them backwards! */ + GC_push_all_stack(hi, lo); + # else + GC_push_all_stack(lo, hi); + # endif + # ifdef IA64 + if (pthread_equal(p -> id, me)) { + GC_push_all_eager(bs_lo, bs_hi); + } else { + GC_push_all_stack(bs_lo, bs_hi); + } + # endif + } + } + } + + /* There seems to be a very rare thread stopping problem. To help us */ + /* debug that, we save the ids of the stopping thread. */ + pthread_t GC_stopping_thread; + int GC_stopping_pid; + + /* We hold the allocation lock. Suspend all threads that might */ + /* still be running. Return the number of suspend signals that */ + /* were sent. */ + int GC_suspend_all() + { + int n_live_threads = 0; + int i; + GC_thread p; + int result; + pthread_t my_thread = pthread_self(); + + GC_stopping_thread = my_thread; /* debugging only. */ + GC_stopping_pid = getpid(); /* debugging only. */ + for (i = 0; i < THREAD_TABLE_SZ; i++) { + for (p = GC_threads[i]; p != 0; p = p -> next) { + if (p -> id != my_thread) { + if (p -> flags & FINISHED) continue; + if (p -> stop_info.last_stop_count == GC_stop_count) continue; + if (p -> thread_blocked) /* Will wait */ continue; + n_live_threads++; + #if DEBUG_THREADS + GC_printf1("Sending suspend signal to 0x%lx\n", p -> id); + #endif + + result = pthread_kill(p -> id, SIG_SUSPEND); + switch(result) { + case ESRCH: + /* Not really there anymore. Possible? */ + n_live_threads--; + break; + case 0: + break; + default: + ABORT("pthread_kill failed"); + } + } + } + } + return n_live_threads; + } + + /* Caller holds allocation lock. */ + void GC_stop_world() + { + int i; + int n_live_threads; + int code; + + #if DEBUG_THREADS + GC_printf1("Stopping the world from 0x%lx\n", pthread_self()); + #endif + + /* Make sure all free list construction has stopped before we start. */ + /* No new construction can start, since free list construction is */ + /* required to acquire and release the GC lock before it starts, */ + /* and we have the lock. */ + # ifdef PARALLEL_MARK + GC_acquire_mark_lock(); + GC_ASSERT(GC_fl_builder_count == 0); + /* We should have previously waited for it to become zero. */ + # endif /* PARALLEL_MARK */ + ++GC_stop_count; + n_live_threads = GC_suspend_all(); + + if (GC_retry_signals) { + unsigned long wait_usecs = 0; /* Total wait since retry. */ + # define WAIT_UNIT 3000 + # define RETRY_INTERVAL 100000 + for (;;) { + int ack_count; + + sem_getvalue(&GC_suspend_ack_sem, &ack_count); + if (ack_count == n_live_threads) break; + if (wait_usecs > RETRY_INTERVAL) { + int newly_sent = GC_suspend_all(); + + # ifdef CONDPRINT + if (GC_print_stats) { + GC_printf1("Resent %ld signals after timeout\n", + newly_sent); + } + # endif + sem_getvalue(&GC_suspend_ack_sem, &ack_count); + if (newly_sent < n_live_threads - ack_count) { + WARN("Lost some threads during GC_stop_world?!\n",0); + n_live_threads = ack_count + newly_sent; + } + wait_usecs = 0; + } + usleep(WAIT_UNIT); + wait_usecs += WAIT_UNIT; + } + } + for (i = 0; i < n_live_threads; i++) { + if (0 != (code = sem_wait(&GC_suspend_ack_sem))) { + GC_err_printf1("Sem_wait returned %ld\n", (unsigned long)code); + ABORT("sem_wait for handler failed"); + } + } + # ifdef PARALLEL_MARK + GC_release_mark_lock(); + # endif + #if DEBUG_THREADS + GC_printf1("World stopped from 0x%lx\n", pthread_self()); + #endif + GC_stopping_thread = 0; /* debugging only */ + } + + /* Caller holds allocation lock, and has held it continuously since */ + /* the world stopped. */ + void GC_start_world() + { + pthread_t my_thread = pthread_self(); + register int i; + register GC_thread p; + register int n_live_threads = 0; + register int result; + + # if DEBUG_THREADS + GC_printf0("World starting\n"); + # endif + + for (i = 0; i < THREAD_TABLE_SZ; i++) { + for (p = GC_threads[i]; p != 0; p = p -> next) { + if (p -> id != my_thread) { + if (p -> flags & FINISHED) continue; + if (p -> thread_blocked) continue; + n_live_threads++; + #if DEBUG_THREADS + GC_printf1("Sending restart signal to 0x%lx\n", p -> id); + #endif + + result = pthread_kill(p -> id, SIG_THR_RESTART); + switch(result) { + case ESRCH: + /* Not really there anymore. Possible? */ + n_live_threads--; + break; + case 0: + break; + default: + ABORT("pthread_kill failed"); + } + } + } + } + #if DEBUG_THREADS + GC_printf0("World started\n"); + #endif + } + + void GC_stop_init() { + struct sigaction act; + + if (sem_init(&GC_suspend_ack_sem, 0, 0) != 0) + ABORT("sem_init failed"); + + act.sa_flags = SA_RESTART; + if (sigfillset(&act.sa_mask) != 0) { + ABORT("sigfillset() failed"); + } + # ifdef NO_SIGNALS + if (sigdelset(&act.sa_mask, SIGINT) != 0 + || sigdelset(&act.sa_mask, SIGQUIT != 0) + || sigdelset(&act.sa_mask, SIGABRT != 0) + || sigdelset(&act.sa_mask, SIGTERM != 0)) { + ABORT("sigdelset() failed"); + } + # endif + + /* SIG_THR_RESTART is unmasked by the handler when necessary. */ + act.sa_handler = GC_suspend_handler; + if (sigaction(SIG_SUSPEND, &act, NULL) != 0) { + ABORT("Cannot set SIG_SUSPEND handler"); + } + + act.sa_handler = GC_restart_handler; + if (sigaction(SIG_THR_RESTART, &act, NULL) != 0) { + ABORT("Cannot set SIG_THR_RESTART handler"); + } + + /* Check for GC_RETRY_SIGNALS. */ + if (0 != GETENV("GC_RETRY_SIGNALS")) { + GC_retry_signals = TRUE; + } + if (0 != GETENV("GC_NO_RETRY_SIGNALS")) { + GC_retry_signals = FALSE; + } + # ifdef CONDPRINT + if (GC_print_stats && GC_retry_signals) { + GC_printf0("Will retry suspend signal if necessary.\n"); + } + # endif + } + + #endif diff -Nrc3pad gcc-3.3.3/boehm-gc/pthread_support.c gcc-3.4.0/boehm-gc/pthread_support.c *** gcc-3.3.3/boehm-gc/pthread_support.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/boehm-gc/pthread_support.c 2003-07-28 03:46:09.000000000 +0000 *************** *** 0 **** --- 1,1570 ---- + /* + * Copyright (c) 1994 by Xerox Corporation. All rights reserved. + * Copyright (c) 1996 by Silicon Graphics. All rights reserved. + * Copyright (c) 1998 by Fergus Henderson. All rights reserved. + * Copyright (c) 2000-2001 by Hewlett-Packard Company. All rights reserved. + * + * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED + * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. + * + * Permission is hereby granted to use or copy this program + * for any purpose, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + */ + /* + * Support code for LinuxThreads, the clone()-based kernel + * thread package for Linux which is included in libc6. + * + * This code relies on implementation details of LinuxThreads, + * (i.e. properties not guaranteed by the Pthread standard), + * though this version now does less of that than the other Pthreads + * support code. + * + * Note that there is a lot of code duplication between linux_threads.c + * and thread support for some of the other Posix platforms; any changes + * made here may need to be reflected there too. + */ + /* DG/UX ix86 support */ + /* + * Linux_threads.c now also includes some code to support HPUX and + * OSF1 (Compaq Tru64 Unix, really). The OSF1 support is based on Eric Benson's + * patch. + * + * Eric also suggested an alternate basis for a lock implementation in + * his code: + * + #elif defined(OSF1) + * + unsigned long GC_allocate_lock = 0; + * + msemaphore GC_allocate_semaphore; + * + # define GC_TRY_LOCK() \ + * + ((msem_lock(&GC_allocate_semaphore, MSEM_IF_NOWAIT) == 0) \ + * + ? (GC_allocate_lock = 1) \ + * + : 0) + * + # define GC_LOCK_TAKEN GC_allocate_lock + */ + + /*#define DEBUG_THREADS 1*/ + /*#define GC_ASSERTIONS*/ + + # include "private/pthread_support.h" + + # if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \ + && !defined(GC_IRIX_THREADS) && !defined(GC_WIN32_THREADS) \ + && !defined(GC_AIX_THREADS) + + # if defined(GC_HPUX_THREADS) && !defined(USE_PTHREAD_SPECIFIC) \ + && !defined(USE_HPUX_TLS) + # define USE_HPUX_TLS + # endif + + # if (defined(GC_DGUX386_THREADS) || defined(GC_OSF1_THREADS) || \ + defined(GC_DARWIN_THREADS)) && !defined(USE_PTHREAD_SPECIFIC) + # define USE_PTHREAD_SPECIFIC + # endif + + # if defined(GC_DGUX386_THREADS) && !defined(_POSIX4A_DRAFT10_SOURCE) + # define _POSIX4A_DRAFT10_SOURCE 1 + # endif + + # if defined(GC_DGUX386_THREADS) && !defined(_USING_POSIX4A_DRAFT10) + # define _USING_POSIX4A_DRAFT10 1 + # endif + + # ifdef THREAD_LOCAL_ALLOC + # if !defined(USE_PTHREAD_SPECIFIC) && !defined(USE_HPUX_TLS) + # include "private/specific.h" + # endif + # if defined(USE_PTHREAD_SPECIFIC) + # define GC_getspecific pthread_getspecific + # define GC_setspecific pthread_setspecific + # define GC_key_create pthread_key_create + typedef pthread_key_t GC_key_t; + # endif + # if defined(USE_HPUX_TLS) + # define GC_getspecific(x) (x) + # define GC_setspecific(key, v) ((key) = (v), 0) + # define GC_key_create(key, d) 0 + typedef void * GC_key_t; + # endif + # endif + # include + # include + # include + # include + # include + # include + # include + # include + # include + # include + # include + + #if defined(GC_DARWIN_THREADS) + # include "private/darwin_semaphore.h" + #else + # include + #endif /* !GC_DARWIN_THREADS */ + + #if defined(GC_DARWIN_THREADS) + # include + #endif /* GC_DARWIN_THREADS */ + + + + #if defined(GC_DGUX386_THREADS) + # include + # include + /* sem_t is an uint in DG/UX */ + typedef unsigned int sem_t; + #endif /* GC_DGUX386_THREADS */ + + #ifndef __GNUC__ + # define __inline__ + #endif + + #ifdef GC_USE_LD_WRAP + # define WRAP_FUNC(f) __wrap_##f + # define REAL_FUNC(f) __real_##f + #else + # define WRAP_FUNC(f) GC_##f + # if !defined(GC_DGUX386_THREADS) + # define REAL_FUNC(f) f + # else /* GC_DGUX386_THREADS */ + # define REAL_FUNC(f) __d10_##f + # endif /* GC_DGUX386_THREADS */ + # undef pthread_create + # if !defined(GC_DARWIN_THREADS) + # undef pthread_sigmask + # endif + # undef pthread_join + # undef pthread_detach + # if defined(GC_OSF1_THREADS) && defined(_PTHREAD_USE_MANGLED_NAMES_) \ + && !defined(_PTHREAD_USE_PTDNAM_) + /* Restore the original mangled names on Tru64 UNIX. */ + # define pthread_create __pthread_create + # define pthread_join __pthread_join + # define pthread_detach __pthread_detach + # endif + #endif + + void GC_thr_init(); + + static GC_bool parallel_initialized = FALSE; + + void GC_init_parallel(); + + # if defined(THREAD_LOCAL_ALLOC) && !defined(DBG_HDRS_ALL) + + /* We don't really support thread-local allocation with DBG_HDRS_ALL */ + + #ifdef USE_HPUX_TLS + __thread + #endif + GC_key_t GC_thread_key; + + static GC_bool keys_initialized; + + /* Recover the contents of the freelist array fl into the global one gfl.*/ + /* Note that the indexing scheme differs, in that gfl has finer size */ + /* resolution, even if not all entries are used. */ + /* We hold the allocator lock. */ + static void return_freelists(ptr_t *fl, ptr_t *gfl) + { + int i; + ptr_t q, *qptr; + size_t nwords; + + for (i = 1; i < NFREELISTS; ++i) { + nwords = i * (GRANULARITY/sizeof(word)); + qptr = fl + i; + q = *qptr; + if ((word)q >= HBLKSIZE) { + if (gfl[nwords] == 0) { + gfl[nwords] = q; + } else { + /* Concatenate: */ + for (; (word)q >= HBLKSIZE; qptr = &(obj_link(q)), q = *qptr); + GC_ASSERT(0 == q); + *qptr = gfl[nwords]; + gfl[nwords] = fl[i]; + } + } + /* Clear fl[i], since the thread structure may hang around. */ + /* Do it in a way that is likely to trap if we access it. */ + fl[i] = (ptr_t)HBLKSIZE; + } + } + + /* We statically allocate a single "size 0" object. It is linked to */ + /* itself, and is thus repeatedly reused for all size 0 allocation */ + /* requests. (Size 0 gcj allocation requests are incorrect, and */ + /* we arrange for those to fault asap.) */ + static ptr_t size_zero_object = (ptr_t)(&size_zero_object); + + /* Each thread structure must be initialized. */ + /* This call must be made from the new thread. */ + /* Caller holds allocation lock. */ + void GC_init_thread_local(GC_thread p) + { + int i; + + if (!keys_initialized) { + if (0 != GC_key_create(&GC_thread_key, 0)) { + ABORT("Failed to create key for local allocator"); + } + keys_initialized = TRUE; + } + if (0 != GC_setspecific(GC_thread_key, p)) { + ABORT("Failed to set thread specific allocation pointers"); + } + for (i = 1; i < NFREELISTS; ++i) { + p -> ptrfree_freelists[i] = (ptr_t)1; + p -> normal_freelists[i] = (ptr_t)1; + # ifdef GC_GCJ_SUPPORT + p -> gcj_freelists[i] = (ptr_t)1; + # endif + } + /* Set up the size 0 free lists. */ + p -> ptrfree_freelists[0] = (ptr_t)(&size_zero_object); + p -> normal_freelists[0] = (ptr_t)(&size_zero_object); + # ifdef GC_GCJ_SUPPORT + p -> gcj_freelists[0] = (ptr_t)(-1); + # endif + } + + #ifdef GC_GCJ_SUPPORT + extern ptr_t * GC_gcjobjfreelist; + #endif + + /* We hold the allocator lock. */ + void GC_destroy_thread_local(GC_thread p) + { + /* We currently only do this from the thread itself or from */ + /* the fork handler for a child process. */ + # ifndef HANDLE_FORK + GC_ASSERT(GC_getspecific(GC_thread_key) == (void *)p); + # endif + return_freelists(p -> ptrfree_freelists, GC_aobjfreelist); + return_freelists(p -> normal_freelists, GC_objfreelist); + # ifdef GC_GCJ_SUPPORT + return_freelists(p -> gcj_freelists, GC_gcjobjfreelist); + # endif + } + + extern GC_PTR GC_generic_malloc_many(); + + GC_PTR GC_local_malloc(size_t bytes) + { + if (EXPECT(!SMALL_ENOUGH(bytes),0)) { + return(GC_malloc(bytes)); + } else { + int index = INDEX_FROM_BYTES(bytes); + ptr_t * my_fl; + ptr_t my_entry; + # if defined(REDIRECT_MALLOC) && !defined(USE_PTHREAD_SPECIFIC) + GC_key_t k = GC_thread_key; + # endif + void * tsd; + + # if defined(REDIRECT_MALLOC) && !defined(USE_PTHREAD_SPECIFIC) + if (EXPECT(0 == k, 0)) { + /* This can happen if we get called when the world is */ + /* being initialized. Whether we can actually complete */ + /* the initialization then is unclear. */ + GC_init_parallel(); + k = GC_thread_key; + } + # endif + tsd = GC_getspecific(GC_thread_key); + # ifdef GC_ASSERTIONS + LOCK(); + GC_ASSERT(tsd == (void *)GC_lookup_thread(pthread_self())); + UNLOCK(); + # endif + my_fl = ((GC_thread)tsd) -> normal_freelists + index; + my_entry = *my_fl; + if (EXPECT((word)my_entry >= HBLKSIZE, 1)) { + ptr_t next = obj_link(my_entry); + GC_PTR result = (GC_PTR)my_entry; + *my_fl = next; + obj_link(my_entry) = 0; + PREFETCH_FOR_WRITE(next); + return result; + } else if ((word)my_entry - 1 < DIRECT_GRANULES) { + *my_fl = my_entry + index + 1; + return GC_malloc(bytes); + } else { + GC_generic_malloc_many(BYTES_FROM_INDEX(index), NORMAL, my_fl); + if (*my_fl == 0) return GC_oom_fn(bytes); + return GC_local_malloc(bytes); + } + } + } + + GC_PTR GC_local_malloc_atomic(size_t bytes) + { + if (EXPECT(!SMALL_ENOUGH(bytes), 0)) { + return(GC_malloc_atomic(bytes)); + } else { + int index = INDEX_FROM_BYTES(bytes); + ptr_t * my_fl = ((GC_thread)GC_getspecific(GC_thread_key)) + -> ptrfree_freelists + index; + ptr_t my_entry = *my_fl; + + if (EXPECT((word)my_entry >= HBLKSIZE, 1)) { + GC_PTR result = (GC_PTR)my_entry; + *my_fl = obj_link(my_entry); + return result; + } else if ((word)my_entry - 1 < DIRECT_GRANULES) { + *my_fl = my_entry + index + 1; + return GC_malloc_atomic(bytes); + } else { + GC_generic_malloc_many(BYTES_FROM_INDEX(index), PTRFREE, my_fl); + /* *my_fl is updated while the collector is excluded; */ + /* the free list is always visible to the collector as */ + /* such. */ + if (*my_fl == 0) return GC_oom_fn(bytes); + return GC_local_malloc_atomic(bytes); + } + } + } + + #ifdef GC_GCJ_SUPPORT + + #include "include/gc_gcj.h" + + #ifdef GC_ASSERTIONS + extern GC_bool GC_gcj_malloc_initialized; + #endif + + extern int GC_gcj_kind; + + GC_PTR GC_local_gcj_malloc(size_t bytes, + void * ptr_to_struct_containing_descr) + { + GC_ASSERT(GC_gcj_malloc_initialized); + if (EXPECT(!SMALL_ENOUGH(bytes), 0)) { + return GC_gcj_malloc(bytes, ptr_to_struct_containing_descr); + } else { + int index = INDEX_FROM_BYTES(bytes); + ptr_t * my_fl = ((GC_thread)GC_getspecific(GC_thread_key)) + -> gcj_freelists + index; + ptr_t my_entry = *my_fl; + if (EXPECT((word)my_entry >= HBLKSIZE, 1)) { + GC_PTR result = (GC_PTR)my_entry; + GC_ASSERT(!GC_incremental); + /* We assert that any concurrent marker will stop us. */ + /* Thus it is impossible for a mark procedure to see the */ + /* allocation of the next object, but to see this object */ + /* still containing a free list pointer. Otherwise the */ + /* marker might find a random "mark descriptor". */ + *(volatile ptr_t *)my_fl = obj_link(my_entry); + /* We must update the freelist before we store the pointer. */ + /* Otherwise a GC at this point would see a corrupted */ + /* free list. */ + /* A memory barrier is probably never needed, since the */ + /* action of stopping this thread will cause prior writes */ + /* to complete. */ + GC_ASSERT(((void * volatile *)result)[1] == 0); + *(void * volatile *)result = ptr_to_struct_containing_descr; + return result; + } else if ((word)my_entry - 1 < DIRECT_GRANULES) { + if (!GC_incremental) *my_fl = my_entry + index + 1; + /* In the incremental case, we always have to take this */ + /* path. Thus we leave the counter alone. */ + return GC_gcj_malloc(bytes, ptr_to_struct_containing_descr); + } else { + GC_generic_malloc_many(BYTES_FROM_INDEX(index), GC_gcj_kind, my_fl); + if (*my_fl == 0) return GC_oom_fn(bytes); + return GC_local_gcj_malloc(bytes, ptr_to_struct_containing_descr); + } + } + } + + #endif /* GC_GCJ_SUPPORT */ + + # else /* !THREAD_LOCAL_ALLOC && !DBG_HDRS_ALL */ + + # define GC_destroy_thread_local(t) + + # endif /* !THREAD_LOCAL_ALLOC */ + + #if 0 + /* + To make sure that we're using LinuxThreads and not some other thread + package, we generate a dummy reference to `pthread_kill_other_threads_np' + (was `__pthread_initial_thread_bos' but that disappeared), + which is a symbol defined in LinuxThreads, but (hopefully) not in other + thread packages. + + We no longer do this, since this code is now portable enough that it might + actually work for something else. + */ + void (*dummy_var_to_force_linux_threads)() = pthread_kill_other_threads_np; + #endif /* 0 */ + + long GC_nprocs = 1; /* Number of processors. We may not have */ + /* access to all of them, but this is as good */ + /* a guess as any ... */ + + #ifdef PARALLEL_MARK + + # ifndef MAX_MARKERS + # define MAX_MARKERS 16 + # endif + + static ptr_t marker_sp[MAX_MARKERS] = {0}; + + void * GC_mark_thread(void * id) + { + word my_mark_no = 0; + + marker_sp[(word)id] = GC_approx_sp(); + for (;; ++my_mark_no) { + /* GC_mark_no is passed only to allow GC_help_marker to terminate */ + /* promptly. This is important if it were called from the signal */ + /* handler or from the GC lock acquisition code. Under Linux, it's */ + /* not safe to call it from a signal handler, since it uses mutexes */ + /* and condition variables. Since it is called only here, the */ + /* argument is unnecessary. */ + if (my_mark_no < GC_mark_no || my_mark_no > GC_mark_no + 2) { + /* resynchronize if we get far off, e.g. because GC_mark_no */ + /* wrapped. */ + my_mark_no = GC_mark_no; + } + # ifdef DEBUG_THREADS + GC_printf1("Starting mark helper for mark number %ld\n", my_mark_no); + # endif + GC_help_marker(my_mark_no); + } + } + + extern long GC_markers; /* Number of mark threads we would */ + /* like to have. Includes the */ + /* initiating thread. */ + + pthread_t GC_mark_threads[MAX_MARKERS]; + + #define PTHREAD_CREATE REAL_FUNC(pthread_create) + + static void start_mark_threads() + { + unsigned i; + pthread_attr_t attr; + + if (GC_markers > MAX_MARKERS) { + WARN("Limiting number of mark threads\n", 0); + GC_markers = MAX_MARKERS; + } + if (0 != pthread_attr_init(&attr)) ABORT("pthread_attr_init failed"); + + if (0 != pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED)) + ABORT("pthread_attr_setdetachstate failed"); + + # if defined(HPUX) || defined(GC_DGUX386_THREADS) + /* Default stack size is usually too small: fix it. */ + /* Otherwise marker threads or GC may run out of */ + /* space. */ + # define MIN_STACK_SIZE (8*HBLKSIZE*sizeof(word)) + { + size_t old_size; + int code; + + if (pthread_attr_getstacksize(&attr, &old_size) != 0) + ABORT("pthread_attr_getstacksize failed\n"); + if (old_size < MIN_STACK_SIZE) { + if (pthread_attr_setstacksize(&attr, MIN_STACK_SIZE) != 0) + ABORT("pthread_attr_setstacksize failed\n"); + } + } + # endif /* HPUX || GC_DGUX386_THREADS */ + # ifdef CONDPRINT + if (GC_print_stats) { + GC_printf1("Starting %ld marker threads\n", GC_markers - 1); + } + # endif + for (i = 0; i < GC_markers - 1; ++i) { + if (0 != PTHREAD_CREATE(GC_mark_threads + i, &attr, + GC_mark_thread, (void *)(word)i)) { + WARN("Marker thread creation failed, errno = %ld.\n", errno); + } + } + } + + #else /* !PARALLEL_MARK */ + + static __inline__ void start_mark_threads() + { + } + + #endif /* !PARALLEL_MARK */ + + /* Defining INSTALL_LOOPING_SEGV_HANDLER causes SIGSEGV and SIGBUS to */ + /* result in an infinite loop in a signal handler. This can be very */ + /* useful for debugging, since (as of RH7) gdb still seems to have */ + /* serious problems with threads. */ + #ifdef INSTALL_LOOPING_SEGV_HANDLER + void GC_looping_handler(int sig) + { + GC_printf3("Signal %ld in thread %lx, pid %ld\n", + sig, pthread_self(), getpid()); + for (;;); + } + #endif + + GC_bool GC_thr_initialized = FALSE; + + volatile GC_thread GC_threads[THREAD_TABLE_SZ]; + + void GC_push_thread_structures GC_PROTO((void)) + { + GC_push_all((ptr_t)(GC_threads), (ptr_t)(GC_threads)+sizeof(GC_threads)); + # if defined(THREAD_LOCAL_ALLOC) && !defined(DBG_HDRS_ALL) + GC_push_all((ptr_t)(&GC_thread_key), + (ptr_t)(&GC_thread_key)+sizeof(&GC_thread_key)); + # endif + } + + #ifdef THREAD_LOCAL_ALLOC + /* We must explicitly mark ptrfree and gcj free lists, since the free */ + /* list links wouldn't otherwise be found. We also set them in the */ + /* normal free lists, since that involves touching less memory than if */ + /* we scanned them normally. */ + void GC_mark_thread_local_free_lists(void) + { + int i, j; + GC_thread p; + ptr_t q; + + for (i = 0; i < THREAD_TABLE_SZ; ++i) { + for (p = GC_threads[i]; 0 != p; p = p -> next) { + for (j = 1; j < NFREELISTS; ++j) { + q = p -> ptrfree_freelists[j]; + if ((word)q > HBLKSIZE) GC_set_fl_marks(q); + q = p -> normal_freelists[j]; + if ((word)q > HBLKSIZE) GC_set_fl_marks(q); + # ifdef GC_GCJ_SUPPORT + q = p -> gcj_freelists[j]; + if ((word)q > HBLKSIZE) GC_set_fl_marks(q); + # endif /* GC_GCJ_SUPPORT */ + } + } + } + } + #endif /* THREAD_LOCAL_ALLOC */ + + static struct GC_Thread_Rep first_thread; + + /* Add a thread to GC_threads. We assume it wasn't already there. */ + /* Caller holds allocation lock. */ + GC_thread GC_new_thread(pthread_t id) + { + int hv = ((word)id) % THREAD_TABLE_SZ; + GC_thread result; + static GC_bool first_thread_used = FALSE; + + if (!first_thread_used) { + result = &first_thread; + first_thread_used = TRUE; + } else { + result = (struct GC_Thread_Rep *) + GC_INTERNAL_MALLOC(sizeof(struct GC_Thread_Rep), NORMAL); + } + if (result == 0) return(0); + result -> id = id; + result -> next = GC_threads[hv]; + GC_threads[hv] = result; + GC_ASSERT(result -> flags == 0 && result -> thread_blocked == 0); + return(result); + } + + /* Delete a thread from GC_threads. We assume it is there. */ + /* (The code intentionally traps if it wasn't.) */ + /* Caller holds allocation lock. */ + void GC_delete_thread(pthread_t id) + { + int hv = ((word)id) % THREAD_TABLE_SZ; + register GC_thread p = GC_threads[hv]; + register GC_thread prev = 0; + + while (!pthread_equal(p -> id, id)) { + prev = p; + p = p -> next; + } + if (prev == 0) { + GC_threads[hv] = p -> next; + } else { + prev -> next = p -> next; + } + GC_INTERNAL_FREE(p); + } + + /* If a thread has been joined, but we have not yet */ + /* been notified, then there may be more than one thread */ + /* in the table with the same pthread id. */ + /* This is OK, but we need a way to delete a specific one. */ + void GC_delete_gc_thread(pthread_t id, GC_thread gc_id) + { + int hv = ((word)id) % THREAD_TABLE_SZ; + register GC_thread p = GC_threads[hv]; + register GC_thread prev = 0; + + while (p != gc_id) { + prev = p; + p = p -> next; + } + if (prev == 0) { + GC_threads[hv] = p -> next; + } else { + prev -> next = p -> next; + } + GC_INTERNAL_FREE(p); + } + + /* Return a GC_thread corresponding to a given thread_t. */ + /* Returns 0 if it's not there. */ + /* Caller holds allocation lock or otherwise inhibits */ + /* updates. */ + /* If there is more than one thread with the given id we */ + /* return the most recent one. */ + GC_thread GC_lookup_thread(pthread_t id) + { + int hv = ((word)id) % THREAD_TABLE_SZ; + register GC_thread p = GC_threads[hv]; + + while (p != 0 && !pthread_equal(p -> id, id)) p = p -> next; + return(p); + } + + #ifdef HANDLE_FORK + /* Remove all entries from the GC_threads table, except the */ + /* one for the current thread. We need to do this in the child */ + /* process after a fork(), since only the current thread */ + /* survives in the child. */ + void GC_remove_all_threads_but_me(void) + { + pthread_t self = pthread_self(); + int hv; + GC_thread p, next, me; + + for (hv = 0; hv < THREAD_TABLE_SZ; ++hv) { + me = 0; + for (p = GC_threads[hv]; 0 != p; p = next) { + next = p -> next; + if (p -> id == self) { + me = p; + p -> next = 0; + } else { + # ifdef THREAD_LOCAL_ALLOC + if (!(p -> flags & FINISHED)) { + GC_destroy_thread_local(p); + } + # endif /* THREAD_LOCAL_ALLOC */ + if (p != &first_thread) GC_INTERNAL_FREE(p); + } + } + GC_threads[hv] = me; + } + } + #endif /* HANDLE_FORK */ + + #ifdef USE_PROC_FOR_LIBRARIES + int GC_segment_is_thread_stack(ptr_t lo, ptr_t hi) + { + int i; + GC_thread p; + + # ifdef PARALLEL_MARK + for (i = 0; i < GC_markers; ++i) { + if (marker_sp[i] > lo & marker_sp[i] < hi) return 1; + } + # endif + for (i = 0; i < THREAD_TABLE_SZ; i++) { + for (p = GC_threads[i]; p != 0; p = p -> next) { + if (0 != p -> stack_end) { + # ifdef STACK_GROWS_UP + if (p -> stack_end >= lo && p -> stack_end < hi) return 1; + # else /* STACK_GROWS_DOWN */ + if (p -> stack_end > lo && p -> stack_end <= hi) return 1; + # endif + } + } + } + return 0; + } + #endif /* USE_PROC_FOR_LIBRARIES */ + + #ifdef GC_LINUX_THREADS + /* Return the number of processors, or i<= 0 if it can't be determined. */ + int GC_get_nprocs() + { + /* Should be "return sysconf(_SC_NPROCESSORS_ONLN);" but that */ + /* appears to be buggy in many cases. */ + /* We look for lines "cpu" in /proc/stat. */ + # define STAT_BUF_SIZE 4096 + # define STAT_READ read + /* If read is wrapped, this may need to be redefined to call */ + /* the real one. */ + char stat_buf[STAT_BUF_SIZE]; + int f; + word result = 1; + /* Some old kernels only have a single "cpu nnnn ..." */ + /* entry in /proc/stat. We identify those as */ + /* uniprocessors. */ + size_t i, len = 0; + + f = open("/proc/stat", O_RDONLY); + if (f < 0 || (len = STAT_READ(f, stat_buf, STAT_BUF_SIZE)) < 100) { + WARN("Couldn't read /proc/stat\n", 0); + return -1; + } + for (i = 0; i < len - 100; ++i) { + if (stat_buf[i] == '\n' && stat_buf[i+1] == 'c' + && stat_buf[i+2] == 'p' && stat_buf[i+3] == 'u') { + int cpu_no = atoi(stat_buf + i + 4); + if (cpu_no >= result) result = cpu_no + 1; + } + } + close(f); + return result; + } + #endif /* GC_LINUX_THREADS */ + + /* We hold the GC lock. Wait until an in-progress GC has finished. */ + /* Repeatedly RELEASES GC LOCK in order to wait. */ + /* If wait_for_all is true, then we exit with the GC lock held and no */ + /* collection in progress; otherwise we just wait for the current GC */ + /* to finish. */ + extern GC_bool GC_collection_in_progress(); + void GC_wait_for_gc_completion(GC_bool wait_for_all) + { + if (GC_incremental && GC_collection_in_progress()) { + int old_gc_no = GC_gc_no; + + /* Make sure that no part of our stack is still on the mark stack, */ + /* since it's about to be unmapped. */ + while (GC_incremental && GC_collection_in_progress() + && (wait_for_all || old_gc_no == GC_gc_no)) { + ENTER_GC(); + GC_collect_a_little_inner(1); + EXIT_GC(); + UNLOCK(); + sched_yield(); + LOCK(); + } + } + } + + #ifdef HANDLE_FORK + /* Procedures called before and after a fork. The goal here is to make */ + /* it safe to call GC_malloc() in a forked child. It's unclear that is */ + /* attainable, since the single UNIX spec seems to imply that one */ + /* should only call async-signal-safe functions, and we probably can't */ + /* quite guarantee that. But we give it our best shot. (That same */ + /* spec also implies that it's not safe to call the system malloc */ + /* between fork() and exec(). Thus we're doing no worse than it. */ + + /* Called before a fork() */ + void GC_fork_prepare_proc(void) + { + /* Acquire all relevant locks, so that after releasing the locks */ + /* the child will see a consistent state in which monitor */ + /* invariants hold. Unfortunately, we can't acquire libc locks */ + /* we might need, and there seems to be no guarantee that libc */ + /* must install a suitable fork handler. */ + /* Wait for an ongoing GC to finish, since we can't finish it in */ + /* the (one remaining thread in) the child. */ + LOCK(); + # if defined(PARALLEL_MARK) || defined(THREAD_LOCAL_ALLOC) + GC_wait_for_reclaim(); + # endif + GC_wait_for_gc_completion(TRUE); + # if defined(PARALLEL_MARK) || defined(THREAD_LOCAL_ALLOC) + GC_acquire_mark_lock(); + # endif + } + + /* Called in parent after a fork() */ + void GC_fork_parent_proc(void) + { + # if defined(PARALLEL_MARK) || defined(THREAD_LOCAL_ALLOC) + GC_release_mark_lock(); + # endif + UNLOCK(); + } + + /* Called in child after a fork() */ + void GC_fork_child_proc(void) + { + /* Clean up the thread table, so that just our thread is left. */ + # if defined(PARALLEL_MARK) || defined(THREAD_LOCAL_ALLOC) + GC_release_mark_lock(); + # endif + GC_remove_all_threads_but_me(); + # ifdef PARALLEL_MARK + /* Turn off parallel marking in the child, since we are probably */ + /* just going to exec, and we would have to restart mark threads. */ + GC_markers = 1; + GC_parallel = FALSE; + # endif /* PARALLEL_MARK */ + UNLOCK(); + } + #endif /* HANDLE_FORK */ + + #if defined(GC_DGUX386_THREADS) + /* Return the number of processors, or i<= 0 if it can't be determined. */ + int GC_get_nprocs() + { + /* */ + int numCpus; + struct dg_sys_info_pm_info pm_sysinfo; + int status =0; + + status = dg_sys_info((long int *) &pm_sysinfo, + DG_SYS_INFO_PM_INFO_TYPE, DG_SYS_INFO_PM_CURRENT_VERSION); + if (status < 0) + /* set -1 for error */ + numCpus = -1; + else + /* Active CPUs */ + numCpus = pm_sysinfo.idle_vp_count; + + # ifdef DEBUG_THREADS + GC_printf1("Number of active CPUs in this system: %d\n", numCpus); + # endif + return(numCpus); + } + #endif /* GC_DGUX386_THREADS */ + + /* We hold the allocation lock. */ + void GC_thr_init() + { + # ifndef GC_DARWIN_THREADS + int dummy; + # endif + GC_thread t; + + if (GC_thr_initialized) return; + GC_thr_initialized = TRUE; + + # ifdef HANDLE_FORK + /* Prepare for a possible fork. */ + pthread_atfork(GC_fork_prepare_proc, GC_fork_parent_proc, + GC_fork_child_proc); + # endif /* HANDLE_FORK */ + /* Add the initial thread, so we can stop it. */ + t = GC_new_thread(pthread_self()); + # ifdef GC_DARWIN_THREADS + t -> stop_info.mach_thread = mach_thread_self(); + # else + t -> stop_info.stack_ptr = (ptr_t)(&dummy); + # endif + t -> flags = DETACHED | MAIN_THREAD; + + GC_stop_init(); + + /* Set GC_nprocs. */ + { + char * nprocs_string = GETENV("GC_NPROCS"); + GC_nprocs = -1; + if (nprocs_string != NULL) GC_nprocs = atoi(nprocs_string); + } + if (GC_nprocs <= 0) { + # if defined(GC_HPUX_THREADS) + GC_nprocs = pthread_num_processors_np(); + # endif + # if defined(GC_OSF1_THREADS) + GC_nprocs = sysconf(_SC_NPROCESSORS_ONLN); + if (GC_nprocs <= 0) GC_nprocs = 1; + # endif + # if defined(GC_FREEBSD_THREADS) + GC_nprocs = 1; + # endif + # if defined(GC_DARWIN_THREADS) + int ncpus = 1; + size_t len = sizeof(ncpus); + sysctl((int[2]) {CTL_HW, HW_NCPU}, 2, &ncpus, &len, NULL, 0); + GC_nprocs = ncpus; + # endif + # if defined(GC_LINUX_THREADS) || defined(GC_DGUX386_THREADS) + GC_nprocs = GC_get_nprocs(); + # endif + } + if (GC_nprocs <= 0) { + WARN("GC_get_nprocs() returned %ld\n", GC_nprocs); + GC_nprocs = 2; + # ifdef PARALLEL_MARK + GC_markers = 1; + # endif + } else { + # ifdef PARALLEL_MARK + { + char * markers_string = GETENV("GC_MARKERS"); + if (markers_string != NULL) { + GC_markers = atoi(markers_string); + } else { + GC_markers = GC_nprocs; + } + } + # endif + } + # ifdef PARALLEL_MARK + # ifdef CONDPRINT + if (GC_print_stats) { + GC_printf2("Number of processors = %ld, " + "number of marker threads = %ld\n", GC_nprocs, GC_markers); + } + # endif + if (GC_markers == 1) { + GC_parallel = FALSE; + # ifdef CONDPRINT + if (GC_print_stats) { + GC_printf0("Single marker thread, turning off parallel marking\n"); + } + # endif + } else { + GC_parallel = TRUE; + /* Disable true incremental collection, but generational is OK. */ + GC_time_limit = GC_TIME_UNLIMITED; + } + # endif + } + + + /* Perform all initializations, including those that */ + /* may require allocation. */ + /* Called without allocation lock. */ + /* Must be called before a second thread is created. */ + /* Called without allocation lock. */ + void GC_init_parallel() + { + if (parallel_initialized) return; + parallel_initialized = TRUE; + + /* GC_init() calls us back, so set flag first. */ + if (!GC_is_initialized) GC_init(); + /* If we are using a parallel marker, start the helper threads. */ + # ifdef PARALLEL_MARK + if (GC_parallel) start_mark_threads(); + # endif + /* Initialize thread local free lists if used. */ + # if defined(THREAD_LOCAL_ALLOC) && !defined(DBG_HDRS_ALL) + LOCK(); + GC_init_thread_local(GC_lookup_thread(pthread_self())); + UNLOCK(); + # endif + } + + + #if !defined(GC_DARWIN_THREADS) + int WRAP_FUNC(pthread_sigmask)(int how, const sigset_t *set, sigset_t *oset) + { + sigset_t fudged_set; + + if (set != NULL && (how == SIG_BLOCK || how == SIG_SETMASK)) { + fudged_set = *set; + sigdelset(&fudged_set, SIG_SUSPEND); + set = &fudged_set; + } + return(REAL_FUNC(pthread_sigmask)(how, set, oset)); + } + #endif /* !GC_DARWIN_THREADS */ + + /* Wrappers for functions that are likely to block for an appreciable */ + /* length of time. Must be called in pairs, if at all. */ + /* Nothing much beyond the system call itself should be executed */ + /* between these. */ + + void GC_start_blocking(void) { + # define SP_SLOP 128 + GC_thread me; + LOCK(); + me = GC_lookup_thread(pthread_self()); + GC_ASSERT(!(me -> thread_blocked)); + # ifdef SPARC + me -> stop_info.stack_ptr = (ptr_t)GC_save_regs_in_stack(); + # else + # ifndef GC_DARWIN_THREADS + me -> stop_info.stack_ptr = (ptr_t)GC_approx_sp(); + # endif + # endif + # ifdef IA64 + me -> backing_store_ptr = (ptr_t)GC_save_regs_in_stack() + SP_SLOP; + # endif + /* Add some slop to the stack pointer, since the wrapped call may */ + /* end up pushing more callee-save registers. */ + # ifndef GC_DARWIN_THREADS + # ifdef STACK_GROWS_UP + me -> stop_info.stack_ptr += SP_SLOP; + # else + me -> stop_info.stack_ptr -= SP_SLOP; + # endif + # endif + me -> thread_blocked = TRUE; + UNLOCK(); + } + + void GC_end_blocking(void) { + GC_thread me; + LOCK(); /* This will block if the world is stopped. */ + me = GC_lookup_thread(pthread_self()); + GC_ASSERT(me -> thread_blocked); + me -> thread_blocked = FALSE; + UNLOCK(); + } + + #if defined(GC_DGUX386_THREADS) + #define __d10_sleep sleep + #endif /* GC_DGUX386_THREADS */ + + /* A wrapper for the standard C sleep function */ + int WRAP_FUNC(sleep) (unsigned int seconds) + { + int result; + + GC_start_blocking(); + result = REAL_FUNC(sleep)(seconds); + GC_end_blocking(); + return result; + } + + struct start_info { + void *(*start_routine)(void *); + void *arg; + word flags; + sem_t registered; /* 1 ==> in our thread table, but */ + /* parent hasn't yet noticed. */ + }; + + /* Called at thread exit. */ + /* Never called for main thread. That's OK, since it */ + /* results in at most a tiny one-time leak. And */ + /* linuxthreads doesn't reclaim the main threads */ + /* resources or id anyway. */ + void GC_thread_exit_proc(void *arg) + { + GC_thread me; + + LOCK(); + me = GC_lookup_thread(pthread_self()); + GC_destroy_thread_local(me); + if (me -> flags & DETACHED) { + GC_delete_thread(pthread_self()); + } else { + me -> flags |= FINISHED; + } + # if defined(THREAD_LOCAL_ALLOC) && !defined(USE_PTHREAD_SPECIFIC) \ + && !defined(USE_HPUX_TLS) && !defined(DBG_HDRS_ALL) + GC_remove_specific(GC_thread_key); + # endif + GC_wait_for_gc_completion(FALSE); + UNLOCK(); + } + + int WRAP_FUNC(pthread_join)(pthread_t thread, void **retval) + { + int result; + GC_thread thread_gc_id; + + LOCK(); + thread_gc_id = GC_lookup_thread(thread); + /* This is guaranteed to be the intended one, since the thread id */ + /* cant have been recycled by pthreads. */ + UNLOCK(); + result = REAL_FUNC(pthread_join)(thread, retval); + # if defined (GC_FREEBSD_THREADS) + /* On FreeBSD, the wrapped pthread_join() sometimes returns (what + appears to be) a spurious EINTR which caused the test and real code + to gratuitously fail. Having looked at system pthread library source + code, I see how this return code may be generated. In one path of + code, pthread_join() just returns the errno setting of the thread + being joined. This does not match the POSIX specification or the + local man pages thus I have taken the liberty to catch this one + spurious return value properly conditionalized on GC_FREEBSD_THREADS. */ + if (result == EINTR) result = 0; + # endif + if (result == 0) { + LOCK(); + /* Here the pthread thread id may have been recycled. */ + GC_delete_gc_thread(thread, thread_gc_id); + UNLOCK(); + } + return result; + } + + int + WRAP_FUNC(pthread_detach)(pthread_t thread) + { + int result; + GC_thread thread_gc_id; + + LOCK(); + thread_gc_id = GC_lookup_thread(thread); + UNLOCK(); + result = REAL_FUNC(pthread_detach)(thread); + if (result == 0) { + LOCK(); + thread_gc_id -> flags |= DETACHED; + /* Here the pthread thread id may have been recycled. */ + if (thread_gc_id -> flags & FINISHED) { + GC_delete_gc_thread(thread, thread_gc_id); + } + UNLOCK(); + } + return result; + } + + void * GC_start_routine(void * arg) + { + int dummy; + struct start_info * si = arg; + void * result; + GC_thread me; + pthread_t my_pthread; + void *(*start)(void *); + void *start_arg; + + my_pthread = pthread_self(); + # ifdef DEBUG_THREADS + GC_printf1("Starting thread 0x%lx\n", my_pthread); + GC_printf1("pid = %ld\n", (long) getpid()); + GC_printf1("sp = 0x%lx\n", (long) &arg); + # endif + LOCK(); + me = GC_new_thread(my_pthread); + #ifdef GC_DARWIN_THREADS + me -> stop_info.mach_thread = mach_thread_self(); + #else + me -> stop_info.stack_ptr = 0; + #endif + me -> flags = si -> flags; + /* me -> stack_end = GC_linux_stack_base(); -- currently (11/99) */ + /* doesn't work because the stack base in /proc/self/stat is the */ + /* one for the main thread. There is a strong argument that that's */ + /* a kernel bug, but a pervasive one. */ + # ifdef STACK_GROWS_DOWN + me -> stack_end = (ptr_t)(((word)(&dummy) + (GC_page_size - 1)) + & ~(GC_page_size - 1)); + # ifndef GC_DARWIN_THREADS + me -> stop_info.stack_ptr = me -> stack_end - 0x10; + # endif + /* Needs to be plausible, since an asynchronous stack mark */ + /* should not crash. */ + # else + me -> stack_end = (ptr_t)((word)(&dummy) & ~(GC_page_size - 1)); + me -> stop_info.stack_ptr = me -> stack_end + 0x10; + # endif + /* This is dubious, since we may be more than a page into the stack, */ + /* and hence skip some of it, though it's not clear that matters. */ + # ifdef IA64 + me -> backing_store_end = (ptr_t) + (GC_save_regs_in_stack() & ~(GC_page_size - 1)); + /* This is also < 100% convincing. We should also read this */ + /* from /proc, but the hook to do so isn't there yet. */ + # endif /* IA64 */ + UNLOCK(); + start = si -> start_routine; + # ifdef DEBUG_THREADS + GC_printf1("start_routine = 0x%lx\n", start); + # endif + start_arg = si -> arg; + sem_post(&(si -> registered)); /* Last action on si. */ + /* OK to deallocate. */ + pthread_cleanup_push(GC_thread_exit_proc, 0); + # if defined(THREAD_LOCAL_ALLOC) && !defined(DBG_HDRS_ALL) + LOCK(); + GC_init_thread_local(me); + UNLOCK(); + # endif + result = (*start)(start_arg); + #if DEBUG_THREADS + GC_printf1("Finishing thread 0x%x\n", pthread_self()); + #endif + me -> status = result; + pthread_cleanup_pop(1); + /* Cleanup acquires lock, ensuring that we can't exit */ + /* while a collection that thinks we're alive is trying to stop */ + /* us. */ + return(result); + } + + int + WRAP_FUNC(pthread_create)(pthread_t *new_thread, + const pthread_attr_t *attr, + void *(*start_routine)(void *), void *arg) + { + int result; + int detachstate; + word my_flags = 0; + struct start_info * si; + /* This is otherwise saved only in an area mmapped by the thread */ + /* library, which isn't visible to the collector. */ + + /* We resist the temptation to muck with the stack size here, */ + /* even if the default is unreasonably small. That's the client's */ + /* responsibility. */ + + LOCK(); + si = (struct start_info *)GC_INTERNAL_MALLOC(sizeof(struct start_info), + NORMAL); + UNLOCK(); + if (!parallel_initialized) GC_init_parallel(); + if (0 == si) return(ENOMEM); + sem_init(&(si -> registered), 0, 0); + si -> start_routine = start_routine; + si -> arg = arg; + LOCK(); + if (!GC_thr_initialized) GC_thr_init(); + # ifdef GC_ASSERTIONS + { + int stack_size; + if (NULL == attr) { + pthread_attr_t my_attr; + pthread_attr_init(&my_attr); + pthread_attr_getstacksize(&my_attr, &stack_size); + } else { + pthread_attr_getstacksize(attr, &stack_size); + } + GC_ASSERT(stack_size >= (8*HBLKSIZE*sizeof(word))); + /* Our threads may need to do some work for the GC. */ + /* Ridiculously small threads won't work, and they */ + /* probably wouldn't work anyway. */ + } + # endif + if (NULL == attr) { + detachstate = PTHREAD_CREATE_JOINABLE; + } else { + pthread_attr_getdetachstate(attr, &detachstate); + } + if (PTHREAD_CREATE_DETACHED == detachstate) my_flags |= DETACHED; + si -> flags = my_flags; + UNLOCK(); + # ifdef DEBUG_THREADS + GC_printf1("About to start new thread from thread 0x%X\n", + pthread_self()); + # endif + + result = REAL_FUNC(pthread_create)(new_thread, attr, GC_start_routine, si); + + # ifdef DEBUG_THREADS + GC_printf1("Started thread 0x%X\n", *new_thread); + # endif + /* Wait until child has been added to the thread table. */ + /* This also ensures that we hold onto si until the child is done */ + /* with it. Thus it doesn't matter whether it is otherwise */ + /* visible to the collector. */ + if (0 == result) { + while (0 != sem_wait(&(si -> registered))) { + if (EINTR != errno) ABORT("sem_wait failed"); + } + } + sem_destroy(&(si -> registered)); + LOCK(); + GC_INTERNAL_FREE(si); + UNLOCK(); + + return(result); + } + + #ifdef GENERIC_COMPARE_AND_SWAP + pthread_mutex_t GC_compare_and_swap_lock = PTHREAD_MUTEX_INITIALIZER; + + GC_bool GC_compare_and_exchange(volatile GC_word *addr, + GC_word old, GC_word new_val) + { + GC_bool result; + pthread_mutex_lock(&GC_compare_and_swap_lock); + if (*addr == old) { + *addr = new_val; + result = TRUE; + } else { + result = FALSE; + } + pthread_mutex_unlock(&GC_compare_and_swap_lock); + return result; + } + + GC_word GC_atomic_add(volatile GC_word *addr, GC_word how_much) + { + GC_word old; + pthread_mutex_lock(&GC_compare_and_swap_lock); + old = *addr; + *addr = old + how_much; + pthread_mutex_unlock(&GC_compare_and_swap_lock); + return old; + } + + #endif /* GENERIC_COMPARE_AND_SWAP */ + /* Spend a few cycles in a way that can't introduce contention with */ + /* othre threads. */ + void GC_pause() + { + int i; + # ifndef __GNUC__ + volatile word dummy = 0; + # endif + + for (i = 0; i < 10; ++i) { + # ifdef __GNUC__ + __asm__ __volatile__ (" " : : : "memory"); + # else + /* Something that's unlikely to be optimized away. */ + GC_noop(++dummy); + # endif + } + } + + #define SPIN_MAX 1024 /* Maximum number of calls to GC_pause before */ + /* give up. */ + + VOLATILE GC_bool GC_collecting = 0; + /* A hint that we're in the collector and */ + /* holding the allocation lock for an */ + /* extended period. */ + + #if !defined(USE_SPIN_LOCK) || defined(PARALLEL_MARK) + /* If we don't want to use the below spinlock implementation, either */ + /* because we don't have a GC_test_and_set implementation, or because */ + /* we don't want to risk sleeping, we can still try spinning on */ + /* pthread_mutex_trylock for a while. This appears to be very */ + /* beneficial in many cases. */ + /* I suspect that under high contention this is nearly always better */ + /* than the spin lock. But it's a bit slower on a uniprocessor. */ + /* Hence we still default to the spin lock. */ + /* This is also used to acquire the mark lock for the parallel */ + /* marker. */ + + /* Here we use a strict exponential backoff scheme. I don't know */ + /* whether that's better or worse than the above. We eventually */ + /* yield by calling pthread_mutex_lock(); it never makes sense to */ + /* explicitly sleep. */ + + void GC_generic_lock(pthread_mutex_t * lock) + { + #ifndef NO_PTHREAD_TRYLOCK + unsigned pause_length = 1; + unsigned i; + + if (0 == pthread_mutex_trylock(lock)) return; + for (; pause_length <= SPIN_MAX; pause_length <<= 1) { + for (i = 0; i < pause_length; ++i) { + GC_pause(); + } + switch(pthread_mutex_trylock(lock)) { + case 0: + return; + case EBUSY: + break; + default: + ABORT("Unexpected error from pthread_mutex_trylock"); + } + } + #endif /* !NO_PTHREAD_TRYLOCK */ + pthread_mutex_lock(lock); + } + + #endif /* !USE_SPIN_LOCK || PARALLEL_MARK */ + + #if defined(USE_SPIN_LOCK) + + /* Reasonably fast spin locks. Basically the same implementation */ + /* as STL alloc.h. This isn't really the right way to do this. */ + /* but until the POSIX scheduling mess gets straightened out ... */ + + volatile unsigned int GC_allocate_lock = 0; + + + void GC_lock() + { + # define low_spin_max 30 /* spin cycles if we suspect uniprocessor */ + # define high_spin_max SPIN_MAX /* spin cycles for multiprocessor */ + static unsigned spin_max = low_spin_max; + unsigned my_spin_max; + static unsigned last_spins = 0; + unsigned my_last_spins; + int i; + + if (!GC_test_and_set(&GC_allocate_lock)) { + return; + } + my_spin_max = spin_max; + my_last_spins = last_spins; + for (i = 0; i < my_spin_max; i++) { + if (GC_collecting || GC_nprocs == 1) goto yield; + if (i < my_last_spins/2 || GC_allocate_lock) { + GC_pause(); + continue; + } + if (!GC_test_and_set(&GC_allocate_lock)) { + /* + * got it! + * Spinning worked. Thus we're probably not being scheduled + * against the other process with which we were contending. + * Thus it makes sense to spin longer the next time. + */ + last_spins = i; + spin_max = high_spin_max; + return; + } + } + /* We are probably being scheduled against the other process. Sleep. */ + spin_max = low_spin_max; + yield: + for (i = 0;; ++i) { + if (!GC_test_and_set(&GC_allocate_lock)) { + return; + } + # define SLEEP_THRESHOLD 12 + /* Under Linux very short sleeps tend to wait until */ + /* the current time quantum expires. On old Linux */ + /* kernels nanosleep(<= 2ms) just spins under Linux. */ + /* (Under 2.4, this happens only for real-time */ + /* processes.) We want to minimize both behaviors */ + /* here. */ + if (i < SLEEP_THRESHOLD) { + sched_yield(); + } else { + struct timespec ts; + + if (i > 24) i = 24; + /* Don't wait for more than about 15msecs, even */ + /* under extreme contention. */ + ts.tv_sec = 0; + ts.tv_nsec = 1 << i; + nanosleep(&ts, 0); + } + } + } + + #else /* !USE_SPINLOCK */ + void GC_lock() + { + #ifndef NO_PTHREAD_TRYLOCK + if (1 == GC_nprocs || GC_collecting) { + pthread_mutex_lock(&GC_allocate_ml); + } else { + GC_generic_lock(&GC_allocate_ml); + } + #else /* !NO_PTHREAD_TRYLOCK */ + pthread_mutex_lock(&GC_allocate_ml); + #endif /* !NO_PTHREAD_TRYLOCK */ + } + + #endif /* !USE_SPINLOCK */ + + #if defined(PARALLEL_MARK) || defined(THREAD_LOCAL_ALLOC) + + #ifdef GC_ASSERTIONS + pthread_t GC_mark_lock_holder = NO_THREAD; + #endif + + #if 0 + /* Ugly workaround for a linux threads bug in the final versions */ + /* of glibc2.1. Pthread_mutex_trylock sets the mutex owner */ + /* field even when it fails to acquire the mutex. This causes */ + /* pthread_cond_wait to die. Remove for glibc2.2. */ + /* According to the man page, we should use */ + /* PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP, but that isn't actually */ + /* defined. */ + static pthread_mutex_t mark_mutex = + {0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, {0, 0}}; + #else + static pthread_mutex_t mark_mutex = PTHREAD_MUTEX_INITIALIZER; + #endif + + static pthread_cond_t builder_cv = PTHREAD_COND_INITIALIZER; + + void GC_acquire_mark_lock() + { + /* + if (pthread_mutex_lock(&mark_mutex) != 0) { + ABORT("pthread_mutex_lock failed"); + } + */ + GC_generic_lock(&mark_mutex); + # ifdef GC_ASSERTIONS + GC_mark_lock_holder = pthread_self(); + # endif + } + + void GC_release_mark_lock() + { + GC_ASSERT(GC_mark_lock_holder == pthread_self()); + # ifdef GC_ASSERTIONS + GC_mark_lock_holder = NO_THREAD; + # endif + if (pthread_mutex_unlock(&mark_mutex) != 0) { + ABORT("pthread_mutex_unlock failed"); + } + } + + /* Collector must wait for a freelist builders for 2 reasons: */ + /* 1) Mark bits may still be getting examined without lock. */ + /* 2) Partial free lists referenced only by locals may not be scanned */ + /* correctly, e.g. if they contain "pointer-free" objects, since the */ + /* free-list link may be ignored. */ + void GC_wait_builder() + { + GC_ASSERT(GC_mark_lock_holder == pthread_self()); + # ifdef GC_ASSERTIONS + GC_mark_lock_holder = NO_THREAD; + # endif + if (pthread_cond_wait(&builder_cv, &mark_mutex) != 0) { + ABORT("pthread_cond_wait failed"); + } + GC_ASSERT(GC_mark_lock_holder == NO_THREAD); + # ifdef GC_ASSERTIONS + GC_mark_lock_holder = pthread_self(); + # endif + } + + void GC_wait_for_reclaim() + { + GC_acquire_mark_lock(); + while (GC_fl_builder_count > 0) { + GC_wait_builder(); + } + GC_release_mark_lock(); + } + + void GC_notify_all_builder() + { + GC_ASSERT(GC_mark_lock_holder == pthread_self()); + if (pthread_cond_broadcast(&builder_cv) != 0) { + ABORT("pthread_cond_broadcast failed"); + } + } + + #endif /* PARALLEL_MARK || THREAD_LOCAL_ALLOC */ + + #ifdef PARALLEL_MARK + + static pthread_cond_t mark_cv = PTHREAD_COND_INITIALIZER; + + void GC_wait_marker() + { + GC_ASSERT(GC_mark_lock_holder == pthread_self()); + # ifdef GC_ASSERTIONS + GC_mark_lock_holder = NO_THREAD; + # endif + if (pthread_cond_wait(&mark_cv, &mark_mutex) != 0) { + ABORT("pthread_cond_wait failed"); + } + GC_ASSERT(GC_mark_lock_holder == NO_THREAD); + # ifdef GC_ASSERTIONS + GC_mark_lock_holder = pthread_self(); + # endif + } + + void GC_notify_all_marker() + { + if (pthread_cond_broadcast(&mark_cv) != 0) { + ABORT("pthread_cond_broadcast failed"); + } + } + + #endif /* PARALLEL_MARK */ + + # endif /* GC_LINUX_THREADS and friends */ + diff -Nrc3pad gcc-3.3.3/boehm-gc/ptr_chck.c gcc-3.4.0/boehm-gc/ptr_chck.c *** gcc-3.3.3/boehm-gc/ptr_chck.c 2001-08-17 18:30:46.000000000 +0000 --- gcc-3.4.0/boehm-gc/ptr_chck.c 2003-07-28 04:18:20.000000000 +0000 *************** void (*GC_same_obj_print_proc) GC_PROTO( *** 79,85 **** return(p); } sz = WORDS_TO_BYTES(hhdr -> hb_sz); ! if (sz > WORDS_TO_BYTES(MAXOBJSZ)) { base = (ptr_t)HBLKPTR(p); limit = base + sz; if ((ptr_t)p >= limit) { --- 79,85 ---- return(p); } sz = WORDS_TO_BYTES(hhdr -> hb_sz); ! if (sz > MAXOBJBYTES) { base = (ptr_t)HBLKPTR(p); limit = base + sz; if ((ptr_t)p >= limit) { *************** void (*GC_is_valid_displacement_print_pr *** 165,171 **** pdispl = HBLKDISPL(p); map_entry = MAP_ENTRY((hhdr -> hb_map), pdispl); if (map_entry == OBJ_INVALID ! || sz > MAXOBJSZ && (ptr_t)p >= (ptr_t)h + sz) { goto fail; } return(p); --- 165,171 ---- pdispl = HBLKDISPL(p); map_entry = MAP_ENTRY((hhdr -> hb_map), pdispl); if (map_entry == OBJ_INVALID ! || sz > MAXOBJBYTES && (ptr_t)p >= (ptr_t)h + sz) { goto fail; } return(p); diff -Nrc3pad gcc-3.3.3/boehm-gc/reclaim.c gcc-3.4.0/boehm-gc/reclaim.c *** gcc-3.3.3/boehm-gc/reclaim.c 2002-03-29 22:52:12.000000000 +0000 --- gcc-3.4.0/boehm-gc/reclaim.c 2003-07-28 04:18:20.000000000 +0000 *************** signed_word GC_mem_found = 0; *** 27,49 **** /* nonzero. */ #endif /* PARALLEL_MARK */ ! static void report_leak(p, sz) ! ptr_t p; ! word sz; { ! if (HDR(p) -> hb_obj_kind == PTRFREE) { ! GC_err_printf0("Leaked atomic object at "); ! } else { ! GC_err_printf0("Leaked composite object at "); } - GC_print_heap_obj(p); - GC_err_printf0("\n"); } # define FOUND_FREE(hblk, word_no) \ { \ ! report_leak((ptr_t)hblk + WORDS_TO_BYTES(word_no), \ ! HDR(hblk) -> hb_sz); \ } /* --- 27,87 ---- /* nonzero. */ #endif /* PARALLEL_MARK */ ! /* We defer printing of leaked objects until we're done with the GC */ ! /* cycle, since the routine for printing objects needs to run outside */ ! /* the collector, e.g. without the allocation lock. */ ! #define MAX_LEAKED 40 ! ptr_t GC_leaked[MAX_LEAKED]; ! unsigned GC_n_leaked = 0; ! ! GC_bool GC_have_errors = FALSE; ! ! void GC_add_leaked(leaked) ! ptr_t leaked; { ! if (GC_n_leaked < MAX_LEAKED) { ! GC_have_errors = TRUE; ! GC_leaked[GC_n_leaked++] = leaked; ! /* Make sure it's not reclaimed this cycle */ ! GC_set_mark_bit(leaked); } } + static GC_bool printing_errors = FALSE; + /* Print all objects on the list after printing any smashed objs. */ + /* Clear both lists. */ + void GC_print_all_errors () + { + unsigned i; + + LOCK(); + if (printing_errors) { + UNLOCK(); + return; + } + printing_errors = TRUE; + UNLOCK(); + if (GC_debugging_started) GC_print_all_smashed(); + for (i = 0; i < GC_n_leaked; ++i) { + ptr_t p = GC_leaked[i]; + if (HDR(p) -> hb_obj_kind == PTRFREE) { + GC_err_printf0("Leaked atomic object at "); + } else { + GC_err_printf0("Leaked composite object at "); + } + GC_print_heap_obj(p); + GC_err_printf0("\n"); + GC_free(p); + GC_leaked[i] = 0; + } + GC_n_leaked = 0; + printing_errors = FALSE; + } + + # define FOUND_FREE(hblk, word_no) \ { \ ! GC_add_leaked((ptr_t)hblk + WORDS_TO_BYTES(word_no)); \ } /* *************** void GC_print_block_list() *** 866,872 **** * Clear *flp. * This must be done before dropping a list of free gcj-style objects, * since may otherwise end up with dangling "descriptor" pointers. ! * It may help for other pointer-containg objects. */ void GC_clear_fl_links(flp) ptr_t *flp; --- 904,910 ---- * Clear *flp. * This must be done before dropping a list of free gcj-style objects, * since may otherwise end up with dangling "descriptor" pointers. ! * It may help for other pointer-containing objects. */ void GC_clear_fl_links(flp) ptr_t *flp; diff -Nrc3pad gcc-3.3.3/boehm-gc/solaris_pthreads.c gcc-3.4.0/boehm-gc/solaris_pthreads.c *** gcc-3.3.3/boehm-gc/solaris_pthreads.c 2002-02-12 04:37:53.000000000 +0000 --- gcc-3.4.0/boehm-gc/solaris_pthreads.c 2003-07-28 04:18:21.000000000 +0000 *************** *** 13,21 **** /* * Support code for Solaris threads. Provides functionality we wish Sun * had provided. Relies on some information we probably shouldn't rely on. ! * Modified Peter C. for Solaris Posix Threads. */ - /* Boehm, September 14, 1994 4:44 pm PDT */ # if defined(GC_SOLARIS_PTHREADS) # include "private/gc_priv.h" --- 13,20 ---- /* * Support code for Solaris threads. Provides functionality we wish Sun * had provided. Relies on some information we probably shouldn't rely on. ! * Modified by Peter C. for Solaris Posix Threads. */ # if defined(GC_SOLARIS_PTHREADS) # include "private/gc_priv.h" diff -Nrc3pad gcc-3.3.3/boehm-gc/solaris_threads.c gcc-3.4.0/boehm-gc/solaris_threads.c *** gcc-3.3.3/boehm-gc/solaris_threads.c 2002-02-12 04:37:53.000000000 +0000 --- gcc-3.4.0/boehm-gc/solaris_threads.c 2003-07-28 04:18:21.000000000 +0000 *************** *** 37,42 **** --- 37,46 ---- # include # include + #ifdef HANDLE_FORK + --> Not yet supported. Try porting the code from linux_threads.c. + #endif + /* * This is the default size of the LWP arrays. If there are more LWPs * than this when a stop-the-world GC happens, set_max_lwps will be *************** static void restart_all_lwps() *** 361,367 **** sizeof (prgregset_t)) != 0) { int j; ! for(j = 0; j < NGREG; j++) { GC_printf3("%i: %x -> %x\n", j, GC_lwp_registers[i][j], --- 365,371 ---- sizeof (prgregset_t)) != 0) { int j; ! for(j = 0; j < NPRGREG; j++) { GC_printf3("%i: %x -> %x\n", j, GC_lwp_registers[i][j], *************** int GC_thr_suspend(thread_t target_threa *** 821,827 **** if (result == 0) { t = GC_lookup_thread(target_thread); if (t == 0) ABORT("thread unknown to GC"); ! t -> flags |= SUSPENDED; } UNLOCK(); return(result); --- 825,831 ---- if (result == 0) { t = GC_lookup_thread(target_thread); if (t == 0) ABORT("thread unknown to GC"); ! t -> flags |= SUSPNDED; } UNLOCK(); return(result); *************** int GC_thr_continue(thread_t target_thre *** 837,843 **** if (result == 0) { t = GC_lookup_thread(target_thread); if (t == 0) ABORT("thread unknown to GC"); ! t -> flags &= ~SUSPENDED; } UNLOCK(); return(result); --- 841,847 ---- if (result == 0) { t = GC_lookup_thread(target_thread); if (t == 0) ABORT("thread unknown to GC"); ! t -> flags &= ~SUSPNDED; } UNLOCK(); return(result); *************** GC_thr_create(void *stack_base, size_t s *** 923,929 **** my_flags |= CLIENT_OWNS_STACK; } if (flags & THR_DETACHED) my_flags |= DETACHED; ! if (flags & THR_SUSPENDED) my_flags |= SUSPENDED; result = thr_create(stack, stack_size, start_routine, arg, flags & ~THR_DETACHED, &my_new_thread); if (result == 0) { --- 927,933 ---- my_flags |= CLIENT_OWNS_STACK; } if (flags & THR_DETACHED) my_flags |= DETACHED; ! if (flags & THR_SUSPENDED) my_flags |= SUSPNDED; result = thr_create(stack, stack_size, start_routine, arg, flags & ~THR_DETACHED, &my_new_thread); if (result == 0) { diff -Nrc3pad gcc-3.3.3/boehm-gc/sparc_mach_dep.S gcc-3.4.0/boehm-gc/sparc_mach_dep.S *** gcc-3.3.3/boehm-gc/sparc_mach_dep.S 2002-02-15 00:09:29.000000000 +0000 --- gcc-3.4.0/boehm-gc/sparc_mach_dep.S 2003-07-28 04:18:21.000000000 +0000 *************** loop: *** 37,43 **** stx %g0,[%o3] ! *(long *)p = 0 cmp %o3,%o1 bgu,pt %xcc, loop ! if (p > limit) goto loop ! add %o3,-8,%o3 ! p -= 8 (delay slot) retl mov %o2,%sp ! Restore sp., delay slot #else /* 32 bit SPARC */ --- 37,43 ---- stx %g0,[%o3] ! *(long *)p = 0 cmp %o3,%o1 bgu,pt %xcc, loop ! if (p > limit) goto loop ! add %o3,-8,%o3 ! p -= 8 (delay slot) retl mov %o2,%sp ! Restore sp., delay slot #else /* 32 bit SPARC */ diff -Nrc3pad gcc-3.3.3/boehm-gc/tests/test.c gcc-3.4.0/boehm-gc/tests/test.c *** gcc-3.3.3/boehm-gc/tests/test.c 2002-02-12 04:37:57.000000000 +0000 --- gcc-3.4.0/boehm-gc/tests/test.c 2003-07-28 04:18:23.000000000 +0000 *************** *** 43,49 **** # include "gc_local_alloc.h" # endif # include "private/gc_priv.h" /* For output, locking, MIN_WORDS, */ ! /* and some statistics. */ # include "private/gcconfig.h" # if defined(MSWIN32) || defined(MSWINCE) --- 43,49 ---- # include "gc_local_alloc.h" # endif # include "private/gc_priv.h" /* For output, locking, MIN_WORDS, */ ! /* and some statistics. */ # include "private/gcconfig.h" # if defined(MSWIN32) || defined(MSWINCE) *************** *** 68,81 **** # include # endif ! # ifdef GC_WIN32_THREADS ! # ifndef MSWINCE ! # include ! # define GC_CreateThread(a,b,c,d,e,f) ((HANDLE) _beginthreadex(a,b,c,d,e,f)) ! # endif static CRITICAL_SECTION incr_cs; # endif /* Allocation Statistics */ int stubborn_count = 0; --- 68,81 ---- # include # endif ! # if defined(GC_WIN32_THREADS) && !defined(GC_PTHREADS) static CRITICAL_SECTION incr_cs; # endif + #ifdef __STDC__ + # include + #endif + /* Allocation Statistics */ int stubborn_count = 0; *************** sexpr y; *** 205,244 **** } # endif - sexpr small_cons (x, y) - sexpr x; - sexpr y; - { - register sexpr r; - - collectable_count++; - r = (sexpr) GC_MALLOC(sizeof(struct SEXPR)); - if (r == 0) { - (void)GC_printf0("Out of memory\n"); - exit(1); - } - r -> sexpr_car = x; - r -> sexpr_cdr = y; - return(r); - } - - sexpr small_cons_uncollectable (x, y) - sexpr x; - sexpr y; - { - register sexpr r; - - uncollectable_count++; - r = (sexpr) GC_MALLOC_UNCOLLECTABLE(sizeof(struct SEXPR)); - if (r == 0) { - (void)GC_printf0("Out of memory\n"); - exit(1); - } - r -> sexpr_car = x; - r -> sexpr_cdr = (sexpr)(~(unsigned long)y); - return(r); - } - #ifdef GC_GCJ_SUPPORT #include "gc_mark.h" --- 205,210 ---- *************** struct GC_ms_entry * fake_gcj_mark_proc( *** 279,284 **** --- 245,337 ---- return(mark_stack_ptr); } + #endif /* GC_GCJ_SUPPORT */ + + #ifdef THREAD_LOCAL_ALLOC + + #undef GC_REDIRECT_TO_LOCAL + #include "gc_local_alloc.h" + + sexpr local_cons (x, y) + sexpr x; + sexpr y; + { + register sexpr r; + register int *p; + register int my_extra = extra_count; + static int my_random = 0; + + collectable_count++; + r = (sexpr) GC_LOCAL_MALLOC(sizeof(struct SEXPR) + my_extra); + # ifdef GC_GCJ_SUPPORT + if (collectable_count % 2 == 0) { + r = (sexpr) GC_LOCAL_GCJ_MALLOC(sizeof(struct SEXPR) + sizeof(GC_word) + my_extra, + &gcj_class_struct1); + r = (sexpr) ((GC_word *)r + 1); + } + # endif + if (r == 0) { + (void)GC_printf0("Out of memory\n"); + exit(1); + } + for (p = (int *)r; + ((char *)p) < ((char *)r) + my_extra + sizeof(struct SEXPR); p++) { + if (*p) { + (void)GC_printf1("Found nonzero at 0x%lx (local) - allocator is broken\n", + (unsigned long)p); + FAIL; + } + *p = 13; + } + r -> sexpr_car = x; + r -> sexpr_cdr = y; + my_extra++; + if ( my_extra >= 5000 || my_extra == 200 && ++my_random % 37 != 0) { + extra_count = 0; + } else { + extra_count = my_extra; + } + return(r); + } + #endif /* THREAD_LOCAL_ALLOC */ + + sexpr small_cons (x, y) + sexpr x; + sexpr y; + { + register sexpr r; + + collectable_count++; + r = (sexpr) GC_MALLOC(sizeof(struct SEXPR)); + if (r == 0) { + (void)GC_printf0("Out of memory\n"); + exit(1); + } + r -> sexpr_car = x; + r -> sexpr_cdr = y; + return(r); + } + + sexpr small_cons_uncollectable (x, y) + sexpr x; + sexpr y; + { + register sexpr r; + + uncollectable_count++; + r = (sexpr) GC_MALLOC_UNCOLLECTABLE(sizeof(struct SEXPR)); + if (r == 0) { + (void)GC_printf0("Out of memory\n"); + exit(1); + } + r -> sexpr_car = x; + r -> sexpr_cdr = (sexpr)(~(unsigned long)y); + return(r); + } + + #ifdef GC_GCJ_SUPPORT + + sexpr gcj_cons(x, y) sexpr x; sexpr y; *************** sexpr x, y; *** 323,328 **** --- 376,384 ---- sexpr reverse(x) sexpr x; { + # ifdef TEST_WITH_SYSTEM_MALLOC + malloc(100000); + # endif return( reverse1(x, nil) ); } *************** int low, up; *** 365,370 **** --- 421,455 ---- } #endif /* GC_GCJ_SUPPORT */ + #ifdef THREAD_LOCAL_ALLOC + /* Return reverse(x) concatenated with y */ + sexpr local_reverse1(x, y) + sexpr x, y; + { + if (is_nil(x)) { + return(y); + } else { + return( local_reverse1(cdr(x), local_cons(car(x), y)) ); + } + } + + sexpr local_reverse(x) + sexpr x; + { + return( local_reverse1(x, nil) ); + } + + sexpr local_ints(low, up) + int low, up; + { + if (low > up) { + return(nil); + } else { + return(local_cons(local_cons(INT_TO_SEXPR(low), nil), local_ints(low+1, up))); + } + } + #endif /* THREAD_LOCAL_ALLOC */ + /* To check uncollectable allocation we build lists with disguised cdr */ /* pointers, and make sure they don't go away. */ sexpr uncollectable_ints(low, up) *************** sexpr x; *** 435,459 **** } } - /* Try to force a to be strangely aligned */ - struct { - char dummy; - sexpr aa; - } A; - #define a A.aa - /* * A tiny list reversal test to check thread creation. */ #ifdef THREADS ! # ifdef GC_WIN32_THREADS ! unsigned __stdcall tiny_reverse_test(void * arg) # else void * tiny_reverse_test(void * arg) # endif { ! check_ints(reverse(reverse(ints(1,10))), 1, 10); return 0; } --- 520,543 ---- } } /* * A tiny list reversal test to check thread creation. */ #ifdef THREADS ! # if defined(GC_WIN32_THREADS) && !defined(CYGWIN32) ! DWORD __stdcall tiny_reverse_test(void * arg) # else void * tiny_reverse_test(void * arg) # endif { ! int i; ! for (i = 0; i < 5; ++i) { ! check_ints(reverse(reverse(ints(1,10))), 1, 10); ! # ifdef THREAD_LOCAL_ALLOC ! check_ints(local_reverse(local_reverse(local_ints(1,10))), 1, 10); ! # endif ! } return 0; } *************** struct { *** 477,483 **** # elif defined(GC_WIN32_THREADS) void fork_a_thread() { ! unsigned thread_id; HANDLE h; h = GC_CreateThread(NULL, 0, tiny_reverse_test, 0, 0, &thread_id); if (h == (HANDLE)NULL) { --- 561,567 ---- # elif defined(GC_WIN32_THREADS) void fork_a_thread() { ! DWORD thread_id; HANDLE h; h = GC_CreateThread(NULL, 0, tiny_reverse_test, 0, 0, &thread_id); if (h == (HANDLE)NULL) { *************** struct { *** 506,511 **** --- 590,602 ---- #endif + /* Try to force a to be strangely aligned */ + struct { + char dummy; + sexpr aa; + } A; + #define a A.aa + /* * Repeatedly reverse lists built out of very different sized cons cells. * Check that we didn't lose anything. *************** void reverse_test() *** 563,569 **** h = (sexpr *)GC_REALLOC((GC_PTR)h, 2000 * sizeof(sexpr)); # ifdef GC_GCJ_SUPPORT h[1999] = gcj_ints(1,200); ! h[1999] = gcj_reverse(h[1999]); # else h[1999] = ints(1,200); # endif --- 654,662 ---- h = (sexpr *)GC_REALLOC((GC_PTR)h, 2000 * sizeof(sexpr)); # ifdef GC_GCJ_SUPPORT h[1999] = gcj_ints(1,200); ! for (i = 0; i < 51; ++i) ! h[1999] = gcj_reverse(h[1999]); ! /* Leave it as the reveresed list for now. */ # else h[1999] = ints(1,200); # endif *************** void reverse_test() *** 594,599 **** --- 687,695 ---- /* 49 integers. Thus this is thread safe without locks, */ /* assuming atomic pointer assignments. */ a = reverse(reverse(a)); + # ifdef THREAD_LOCAL_ALLOC + a = local_reverse(local_reverse(a)); + # endif # if !defined(AT_END) && !defined(THREADS) /* This is not thread safe, since realloc explicitly deallocates */ if (i & 1) { *************** void reverse_test() *** 621,626 **** --- 717,724 ---- b = c = 0; } + #undef a + /* * The rest of this builds balanced binary trees, checks that they don't * disappear, and tests finalization. *************** VOLATILE int dropped_something = 0; *** 655,669 **** # if defined(GC_PTHREADS) static pthread_mutex_t incr_lock = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&incr_lock); ! # endif ! # ifdef GC_WIN32_THREADS ! EnterCriticalSection(&incr_cs); # endif if ((int)(GC_word)client_data != t -> level) { (void)GC_printf0("Wrong finalization data - collector is broken\n"); FAIL; } finalized_count++; # ifdef PCR PCR_ThCrSec_ExitSys(); # endif --- 753,769 ---- # if defined(GC_PTHREADS) static pthread_mutex_t incr_lock = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&incr_lock); ! # else ! # ifdef GC_WIN32_THREADS ! EnterCriticalSection(&incr_cs); ! # endif # endif if ((int)(GC_word)client_data != t -> level) { (void)GC_printf0("Wrong finalization data - collector is broken\n"); FAIL; } finalized_count++; + t -> level = -1; /* detect duplicate finalization immediately */ # ifdef PCR PCR_ThCrSec_ExitSys(); # endif *************** VOLATILE int dropped_something = 0; *** 672,680 **** # endif # if defined(GC_PTHREADS) pthread_mutex_unlock(&incr_lock); ! # endif ! # ifdef GC_WIN32_THREADS ! LeaveCriticalSection(&incr_cs); # endif } --- 772,781 ---- # endif # if defined(GC_PTHREADS) pthread_mutex_unlock(&incr_lock); ! # else ! # ifdef GC_WIN32_THREADS ! LeaveCriticalSection(&incr_cs); ! # endif # endif } *************** int n; *** 746,754 **** # if defined(GC_PTHREADS) static pthread_mutex_t incr_lock = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&incr_lock); ! # endif ! # ifdef GC_WIN32_THREADS ! EnterCriticalSection(&incr_cs); # endif /* Losing a count here causes erroneous report of failure. */ finalizable_count++; --- 847,856 ---- # if defined(GC_PTHREADS) static pthread_mutex_t incr_lock = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&incr_lock); ! # else ! # ifdef GC_WIN32_THREADS ! EnterCriticalSection(&incr_cs); ! # endif # endif /* Losing a count here causes erroneous report of failure. */ finalizable_count++; *************** int n; *** 761,769 **** # endif # if defined(GC_PTHREADS) pthread_mutex_unlock(&incr_lock); ! # endif ! # ifdef GC_WIN32_THREADS ! LeaveCriticalSection(&incr_cs); # endif } --- 863,872 ---- # endif # if defined(GC_PTHREADS) pthread_mutex_unlock(&incr_lock); ! # else ! # ifdef GC_WIN32_THREADS ! LeaveCriticalSection(&incr_cs); ! # endif # endif } *************** void fail_proc1(GC_PTR x) *** 1068,1073 **** --- 1171,1195 ---- fail_count++; } + static void uniq(void *p, ...) { + va_list a; + void *q[100]; + int n = 0, i, j; + q[n++] = p; + va_start(a,p); + for (;(q[n] = va_arg(a,void *));n++) ; + va_end(a); + for (i=0; i 4) { ! max_heap_sz = 15000000; } else { max_heap_sz = 11000000; } --- 1361,1367 ---- } # else if (sizeof(char *) > 4) { ! max_heap_sz = 19000000; } else { max_heap_sz = 11000000; } *************** void check_heap_stats() *** 1212,1218 **** # ifdef SAVE_CALL_CHAIN max_heap_sz *= 3; # ifdef SAVE_CALL_COUNT ! max_heap_sz *= SAVE_CALL_COUNT/4; # endif # endif # endif --- 1371,1377 ---- # ifdef SAVE_CALL_CHAIN max_heap_sz *= 3; # ifdef SAVE_CALL_COUNT ! max_heap_sz += max_heap_sz * SAVE_CALL_COUNT/4; # endif # endif # endif *************** void SetMinimumStack(long minSize) *** 1327,1332 **** --- 1486,1495 ---- # endif n_tests = 0; + #if defined(__APPLE__) && defined(__MACH__) + GC_INIT(); + #endif + # if defined(DJGPP) /* No good way to determine stack base from library; do it */ /* manually on this platform. */ *************** void SetMinimumStack(long minSize) *** 1340,1352 **** # endif GC_INIT(); /* Only needed if gc is dynamic library. */ (void) GC_set_warn_proc(warn_proc); ! # if (defined(MPROTECT_VDB) || defined(PROC_VDB)) && !defined(MAKE_BACK_GRAPH) GC_enable_incremental(); (void) GC_printf0("Switched to incremental mode\n"); # if defined(MPROTECT_VDB) (void)GC_printf0("Emulating dirty bits with mprotect/signals\n"); # else (void)GC_printf0("Reading dirty bits from /proc\n"); # endif # endif run_one_test(); --- 1503,1520 ---- # endif GC_INIT(); /* Only needed if gc is dynamic library. */ (void) GC_set_warn_proc(warn_proc); ! # if (defined(MPROTECT_VDB) || defined(PROC_VDB)) \ ! && !defined(MAKE_BACK_GRAPH) GC_enable_incremental(); (void) GC_printf0("Switched to incremental mode\n"); # if defined(MPROTECT_VDB) (void)GC_printf0("Emulating dirty bits with mprotect/signals\n"); # else + # ifdef PROC_VDB (void)GC_printf0("Reading dirty bits from /proc\n"); + # else + (void)GC_printf0("Using DEFAULT_VDB dirty bit implementation\n"); + # endif # endif # endif run_one_test(); *************** void SetMinimumStack(long minSize) *** 1378,1386 **** } # endif ! #ifdef GC_WIN32_THREADS ! unsigned __stdcall thr_run_one_test(void *arg) { run_one_test(); return 0; --- 1546,1554 ---- } # endif ! #if defined(GC_WIN32_THREADS) && !defined(CYGWIN32) ! DWORD __stdcall thr_run_one_test(void *arg) { run_one_test(); return 0; *************** LRESULT CALLBACK window_proc(HWND hwnd, *** 1412,1418 **** return ret; } ! unsigned __stdcall thr_window(void *arg) { WNDCLASS win_class = { CS_NOCLOSE, --- 1580,1586 ---- return ret; } ! DWORD __stdcall thr_window(void *arg) { WNDCLASS win_class = { CS_NOCLOSE, *************** int APIENTRY WinMain(HINSTANCE instance, *** 1474,1483 **** # ifdef MSWINCE HANDLE win_thr_h; # endif ! unsigned thread_id; # if 0 GC_enable_incremental(); # endif InitializeCriticalSection(&incr_cs); (void) GC_set_warn_proc(warn_proc); # ifdef MSWINCE --- 1642,1652 ---- # ifdef MSWINCE HANDLE win_thr_h; # endif ! DWORD thread_id; # if 0 GC_enable_incremental(); # endif + GC_init(); InitializeCriticalSection(&incr_cs); (void) GC_set_warn_proc(warn_proc); # ifdef MSWINCE *************** main() *** 1625,1639 **** (void)GC_printf0("pthread_default_stacksize_np failed.\n"); } # endif /* GC_HPUX_THREADS */ pthread_attr_init(&attr); ! # if defined(GC_IRIX_THREADS) || defined(GC_FREEBSD_THREADS) pthread_attr_setstacksize(&attr, 1000000); # endif n_tests = 0; ! # if defined(MPROTECT_VDB) && !defined(PARALLEL_MARK) &&!defined(REDIRECT_MALLOC) && !defined(MAKE_BACK_GRAPH) GC_enable_incremental(); (void) GC_printf0("Switched to incremental mode\n"); ! (void) GC_printf0("Emulating dirty bits with mprotect/signals\n"); # endif (void) GC_set_warn_proc(warn_proc); if ((code = pthread_key_create(&fl_key, 0)) != 0) { --- 1794,1823 ---- (void)GC_printf0("pthread_default_stacksize_np failed.\n"); } # endif /* GC_HPUX_THREADS */ + # if defined(__APPLE__) && defined(__MACH__) + GC_INIT(); + # endif + pthread_attr_init(&attr); ! # if defined(GC_IRIX_THREADS) || defined(GC_FREEBSD_THREADS) \ ! || defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS) pthread_attr_setstacksize(&attr, 1000000); # endif n_tests = 0; ! # if (defined(MPROTECT_VDB)) \ ! && !defined(PARALLEL_MARK) &&!defined(REDIRECT_MALLOC) \ ! && !defined(MAKE_BACK_GRAPH) GC_enable_incremental(); (void) GC_printf0("Switched to incremental mode\n"); ! # if defined(MPROTECT_VDB) ! (void)GC_printf0("Emulating dirty bits with mprotect/signals\n"); ! # else ! # ifdef PROC_VDB ! (void)GC_printf0("Reading dirty bits from /proc\n"); ! # else ! (void)GC_printf0("Using DEFAULT_VDB dirty bit implementation\n"); ! # endif ! # endif # endif (void) GC_set_warn_proc(warn_proc); if ((code = pthread_key_create(&fl_key, 0)) != 0) { diff -Nrc3pad gcc-3.3.3/boehm-gc/tests/test_cpp.cc gcc-3.4.0/boehm-gc/tests/test_cpp.cc *** gcc-3.3.3/boehm-gc/tests/test_cpp.cc 2001-08-17 18:30:51.000000000 +0000 --- gcc-3.4.0/boehm-gc/tests/test_cpp.cc 2003-07-28 04:18:23.000000000 +0000 *************** few minutes to complete. *** 28,34 **** #include #include #include ! #ifdef __GNUC__ # include "new_gc_alloc.h" #else # include "gc_alloc.h" --- 28,37 ---- #include #include #include ! #define USE_STD_ALLOCATOR ! #ifdef USE_STD_ALLOCATOR ! # include "gc_allocator.h" ! #elif __GNUC__ # include "new_gc_alloc.h" #else # include "gc_alloc.h" *************** int APIENTRY WinMain( *** 189,213 **** # endif #endif # if defined(MACOS) // MacOS char* argv_[] = {"test_cpp", "10"}; // doesn't argv = argv_; // have a argc = sizeof(argv_)/sizeof(argv_[0]); // commandline # endif int i, iters, n; ! # if !defined(MACOS) # ifdef __GNUC__ ! int *x = (int *)gc_alloc::allocate(sizeof(int)); # else ! int *x = (int *)alloc::allocate(sizeof(int)); # endif ! ! *x = 29; ! x -= 3; # endif if (argc != 2 || (0 >= (n = atoi( argv[ 1 ] )))) { ! GC_printf0( "usage: test_cpp number-of-iterations\n" ); ! exit( 1 );} for (iters = 1; iters <= n; iters++) { GC_printf1( "Starting iteration %d\n", iters ); --- 192,223 ---- # endif #endif + GC_init(); + # if defined(MACOS) // MacOS char* argv_[] = {"test_cpp", "10"}; // doesn't argv = argv_; // have a argc = sizeof(argv_)/sizeof(argv_[0]); // commandline # endif int i, iters, n; ! # ifdef USE_STD_ALLOCATOR ! int *x = gc_allocator().allocate(1); ! int **xptr = traceable_allocator().allocate(1); ! # else # ifdef __GNUC__ ! int *x = (int *)gc_alloc::allocate(sizeof(int)); # else ! int *x = (int *)alloc::allocate(sizeof(int)); # endif ! # endif ! *x = 29; ! # ifdef USE_STD_ALLOCATOR ! *xptr = x; ! x = 0; # endif if (argc != 2 || (0 >= (n = atoi( argv[ 1 ] )))) { ! GC_printf0( "usage: test_cpp number-of-iterations\nAssuming 10 iters\n" ); ! n = 10;} for (iters = 1; iters <= n; iters++) { GC_printf1( "Starting iteration %d\n", iters ); *************** int APIENTRY WinMain( *** 268,276 **** D::Test(); F::Test();} ! # if !defined(__GNUC__) && !defined(MACOS) ! my_assert (29 == x[3]); # endif GC_printf0( "The test appears to have succeeded.\n" ); return( 0 );} --- 278,287 ---- D::Test(); F::Test();} ! # ifdef USE_STD_ALLOCATOR ! x = *xptr; # endif + my_assert (29 == x[0]); GC_printf0( "The test appears to have succeeded.\n" ); return( 0 );} diff -Nrc3pad gcc-3.3.3/boehm-gc/threadlibs.c gcc-3.4.0/boehm-gc/threadlibs.c *** gcc-3.3.3/boehm-gc/threadlibs.c 2002-02-12 04:37:53.000000000 +0000 --- gcc-3.4.0/boehm-gc/threadlibs.c 2003-07-28 04:18:21.000000000 +0000 *************** *** 4,16 **** int main() { # if defined(GC_USE_LD_WRAP) ! printf("-Wl,--wrap -Wl,read -Wl,--wrap -Wl,dlopen " "-Wl,--wrap -Wl,pthread_create -Wl,--wrap -Wl,pthread_join " "-Wl,--wrap -Wl,pthread_detach " "-Wl,--wrap -Wl,pthread_sigmask -Wl,--wrap -Wl,sleep\n"); # endif # if defined(GC_LINUX_THREADS) || defined(GC_IRIX_THREADS) \ ! || defined(GC_FREEBSD_THREADS) || defined(GC_SOLARIS_PTHREADS) printf("-lpthread\n"); # endif # if defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) --- 4,17 ---- int main() { # if defined(GC_USE_LD_WRAP) ! printf("-Wl,--wrap -Wl,dlopen " "-Wl,--wrap -Wl,pthread_create -Wl,--wrap -Wl,pthread_join " "-Wl,--wrap -Wl,pthread_detach " "-Wl,--wrap -Wl,pthread_sigmask -Wl,--wrap -Wl,sleep\n"); # endif # if defined(GC_LINUX_THREADS) || defined(GC_IRIX_THREADS) \ ! || defined(GC_FREEBSD_THREADS) || defined(GC_SOLARIS_PTHREADS) \ ! || defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS) printf("-lpthread\n"); # endif # if defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) *************** int main() *** 19,24 **** --- 20,36 ---- # if defined(GC_SOLARIS_THREADS) && !defined(GC_SOLARIS_PTHREADS) printf("-lthread -ldl\n"); # endif + # if defined(GC_WIN32_THREADS) && defined(CYGWIN32) + printf("-lpthread\n"); + # endif + # if defined(GC_OSF1_THREADS) + printf("-pthread -lrt"); /* DOB: must be -pthread, not -lpthread */ + # endif + /* You need GCC 3.0.3 to build this one! */ + /* DG/UX native gcc doesnt know what "-pthread" is */ + # if defined(GC_DGUX386_THREADS) + printf("-ldl -pthread\n"); + # endif return 0; } diff -Nrc3pad gcc-3.3.3/boehm-gc/typd_mlc.c gcc-3.4.0/boehm-gc/typd_mlc.c *** gcc-3.3.3/boehm-gc/typd_mlc.c 2001-08-17 18:30:46.000000000 +0000 --- gcc-3.4.0/boehm-gc/typd_mlc.c 2003-07-28 04:18:21.000000000 +0000 *************** void GC_init_explicit_typing() *** 437,442 **** --- 437,443 ---- for (; bm != 0; bm >>= 1, current_p++) { if (bm & 1) { current = *current_p; + FIXUP_POINTER(current); if ((ptr_t)current >= least_ha && (ptr_t)current <= greatest_ha) { PUSH_CONTENTS((ptr_t)current, mark_stack_ptr, mark_stack_limit, current_p, exit1); *************** DCL_LOCK_STATE; *** 674,682 **** if( !FASTLOCK_SUCCEEDED() || (op = *opp) == 0 ) { FASTUNLOCK(); op = (ptr_t)GENERAL_MALLOC((word)lb, GC_explicit_kind); ! if (0 == op) return(0); # ifdef MERGE_SIZES ! lw = GC_size_map[lb]; /* May have been uninitialized. */ # endif } else { *opp = obj_link(op); --- 675,683 ---- if( !FASTLOCK_SUCCEEDED() || (op = *opp) == 0 ) { FASTUNLOCK(); op = (ptr_t)GENERAL_MALLOC((word)lb, GC_explicit_kind); ! if (0 == op) return 0; # ifdef MERGE_SIZES ! lw = GC_size_map[lb]; /* May have been uninitialized. */ # endif } else { *opp = obj_link(op); *************** DCL_LOCK_STATE; *** 720,726 **** FASTUNLOCK(); op = (ptr_t)GENERAL_MALLOC_IOP(lb, GC_explicit_kind); # ifdef MERGE_SIZES ! lw = GC_size_map[lb]; /* May have been uninitialized. */ # endif } else { *opp = obj_link(op); --- 721,727 ---- FASTUNLOCK(); op = (ptr_t)GENERAL_MALLOC_IOP(lb, GC_explicit_kind); # ifdef MERGE_SIZES ! lw = GC_size_map[lb]; /* May have been uninitialized. */ # endif } else { *opp = obj_link(op); diff -Nrc3pad gcc-3.3.3/boehm-gc/version.h gcc-3.4.0/boehm-gc/version.h *** gcc-3.3.3/boehm-gc/version.h 2002-02-12 04:37:53.000000000 +0000 --- gcc-3.4.0/boehm-gc/version.h 2003-07-28 04:18:21.000000000 +0000 *************** *** 1,11 **** ! #define GC_VERSION_MAJOR 6 ! #define GC_VERSION_MINOR 1 ! #define GC_ALPHA_VERSION 3 # define GC_NOT_ALPHA 0xff #ifndef GC_NO_VERSION_VAR ! unsigned GC_version = ((GC_VERSION_MAJOR << 16) | (GC_VERSION_MINOR << 8) | GC_ALPHA_VERSION); #endif /* GC_NO_VERSION_VAR */ --- 1,30 ---- ! /* The version here should match that in configure/configure.in */ ! /* Eventually this one may become unnecessary. For now we need */ ! /* it to keep the old-style build process working. */ ! #define GC_TMP_VERSION_MAJOR 6 ! #define GC_TMP_VERSION_MINOR 3 ! #define GC_TMP_ALPHA_VERSION 1 + #ifndef GC_NOT_ALPHA # define GC_NOT_ALPHA 0xff + #endif + + #if defined(GC_VERSION_MAJOR) + # if GC_TMP_VERSION_MAJOR != GC_VERSION_MAJOR || \ + GC_TMP_VERSION_MINOR != GC_VERSION_MINOR || \ + defined(GC_ALPHA_VERSION) != (GC_TMP_ALPHA_VERSION != GC_NOT_ALPHA) || \ + defined(GC_ALPHA_VERSION) && GC_TMP_ALPHA_VERSION != GC_ALPHA_VERSION + # error Inconsistent version info. Check version.h and configure.in. + # endif + #else + # define GC_VERSION_MAJOR GC_TMP_VERSION_MAJOR + # define GC_VERSION_MINOR GC_TMP_VERSION_MINOR + # define GC_ALPHA_VERSION GC_TMP_ALPHA_VERSION + #endif + #ifndef GC_NO_VERSION_VAR ! unsigned GC_version = ((GC_VERSION_MAJOR << 16) | (GC_VERSION_MINOR << 8) | GC_TMP_ALPHA_VERSION); #endif /* GC_NO_VERSION_VAR */ diff -Nrc3pad gcc-3.3.3/boehm-gc/win32_threads.c gcc-3.4.0/boehm-gc/win32_threads.c *** gcc-3.3.3/boehm-gc/win32_threads.c 2003-04-28 20:55:07.000000000 +0000 --- gcc-3.4.0/boehm-gc/win32_threads.c 2003-10-03 18:43:06.000000000 +0000 *************** *** 1,34 **** ! #if defined(GC_WIN32_THREADS) #include "private/gc_priv.h" - - #if 0 - #define STRICT #include #endif ! #define MAX_THREADS 64 ! struct thread_entry { ! LONG in_use; DWORD id; HANDLE handle; ! void *stack; /* The cold end of the stack. */ /* 0 ==> entry not valid. */ ! /* !in_use ==> stack == 0 */ ! CONTEXT context; GC_bool suspended; }; volatile GC_bool GC_please_stop = FALSE; ! volatile struct thread_entry thread_table[MAX_THREADS]; void GC_push_thread_structures GC_PROTO((void)) { /* Unlike the other threads implementations, the thread table here */ /* contains no pointers to the collectable heap. Thus we have */ /* no private structures we need to preserve. */ } void GC_stop_world() --- 1,234 ---- ! #if defined(GC_WIN32_THREADS) #include "private/gc_priv.h" #include + + #ifdef CYGWIN32 + # include + + /* Cygwin-specific forward decls */ + # undef pthread_create + # undef pthread_sigmask + # undef pthread_join + # undef dlopen + + # define DEBUG_CYGWIN_THREADS 0 + + void * GC_start_routine(void * arg); + void GC_thread_exit_proc(void *arg); + #endif ! /* The type of the first argument to InterlockedExchange. */ ! /* Documented to be LONG volatile *, but at least gcc likes */ ! /* this better. */ ! typedef LONG * IE_t; ! #ifndef MAX_THREADS ! # define MAX_THREADS 256 ! /* FIXME: */ ! /* Things may get quite slow for large numbers of threads, */ ! /* since we look them up with sequential search. */ ! #endif ! ! GC_bool GC_thr_initialized = FALSE; ! ! DWORD GC_main_thread = 0; ! ! struct GC_thread_Rep { ! LONG in_use; /* Updated without lock. */ ! /* We assert that unused */ ! /* entries have invalid ids of */ ! /* zero and zero stack fields. */ DWORD id; HANDLE handle; ! ptr_t stack_base; /* The cold end of the stack. */ /* 0 ==> entry not valid. */ ! /* !in_use ==> stack_base == 0 */ GC_bool suspended; + + # ifdef CYGWIN32 + void *status; /* hold exit value until join in case it's a pointer */ + pthread_t pthread_id; + short flags; /* Protected by GC lock. */ + # define FINISHED 1 /* Thread has exited. */ + # define DETACHED 2 /* Thread is intended to be detached. */ + # endif }; + typedef volatile struct GC_thread_Rep * GC_thread; + + /* + * We generally assume that volatile ==> memory ordering, at least among + * volatiles. + */ + volatile GC_bool GC_please_stop = FALSE; ! volatile struct GC_thread_Rep thread_table[MAX_THREADS]; ! ! volatile LONG GC_max_thread_index = 0; /* Largest index in thread_table */ ! /* that was ever used. */ ! ! extern LONG WINAPI GC_write_fault_handler(struct _EXCEPTION_POINTERS *exc_info); ! ! /* ! * This may be called from DllMain, and hence operates under unusual ! * constraints. ! */ ! static GC_thread GC_new_thread(void) { ! int i; ! /* It appears to be unsafe to acquire a lock here, since this */ ! /* code is apparently not preeemptible on some systems. */ ! /* (This is based on complaints, not on Microsoft's official */ ! /* documentation, which says this should perform "only simple */ ! /* initialization tasks".) */ ! /* Hence we make do with nonblocking synchronization. */ ! ! /* The following should be a noop according to the win32 */ ! /* documentation. There is empirical evidence that it */ ! /* isn't. - HB */ ! # if defined(MPROTECT_VDB) ! if (GC_incremental) SetUnhandledExceptionFilter(GC_write_fault_handler); ! # endif ! /* cast away volatile qualifier */ ! for (i = 0; InterlockedExchange((IE_t)&thread_table[i].in_use,1) != 0; i++) { ! /* Compare-and-swap would make this cleaner, but that's not */ ! /* supported before Windows 98 and NT 4.0. In Windows 2000, */ ! /* InterlockedExchange is supposed to be replaced by */ ! /* InterlockedExchangePointer, but that's not really what I */ ! /* want here. */ ! if (i == MAX_THREADS - 1) ! ABORT("too many threads"); ! } ! /* Update GC_max_thread_index if necessary. The following is safe, */ ! /* and unlike CompareExchange-based solutions seems to work on all */ ! /* Windows95 and later platforms. */ ! /* Unfortunately, GC_max_thread_index may be temporarily out of */ ! /* bounds, so readers have to compensate. */ ! while (i > GC_max_thread_index) { ! InterlockedIncrement((IE_t)&GC_max_thread_index); ! } ! if (GC_max_thread_index >= MAX_THREADS) { ! /* We overshot due to simultaneous increments. */ ! /* Setting it to MAX_THREADS-1 is always safe. */ ! GC_max_thread_index = MAX_THREADS - 1; ! } ! ! # ifdef CYGWIN32 ! thread_table[i].pthread_id = pthread_self(); ! # endif ! if (!DuplicateHandle(GetCurrentProcess(), ! GetCurrentThread(), ! GetCurrentProcess(), ! (HANDLE*)&thread_table[i].handle, ! 0, ! 0, ! DUPLICATE_SAME_ACCESS)) { ! DWORD last_error = GetLastError(); ! GC_printf1("Last error code: %lx\n", last_error); ! ABORT("DuplicateHandle failed"); ! } ! thread_table[i].stack_base = GC_get_stack_base(); ! /* Up until this point, GC_psuh_all_stacks considers this thread */ ! /* invalid. */ ! if (thread_table[i].stack_base == NULL) ! ABORT("Failed to find stack base in GC_new_thread"); ! /* Up until this point, this entry is viewed as reserved but invalid */ ! /* by GC_delete_thread. */ ! thread_table[i].id = GetCurrentThreadId(); ! /* If this thread is being created while we are trying to stop */ ! /* the world, wait here. Hopefully this can't happen on any */ ! /* systems that don't allow us to block here. */ ! while (GC_please_stop) Sleep(20); ! return thread_table + i; ! } ! ! /* ! * GC_max_thread_index may temporarily be larger than MAX_THREADS. ! * To avoid subscript errors, we check on access. ! */ ! #ifdef __GNUC__ ! __inline__ ! #endif ! LONG GC_get_max_thread_index() ! { ! LONG my_max = GC_max_thread_index; ! ! if (my_max >= MAX_THREADS) return MAX_THREADS-1; ! return my_max; ! } ! ! /* This is intended to be lock-free, though that */ ! /* assumes that the CloseHandle becomes visible before the */ ! /* in_use assignment. */ ! static void GC_delete_gc_thread(GC_thread thr) ! { ! CloseHandle(thr->handle); ! /* cast away volatile qualifier */ ! thr->stack_base = 0; ! thr->id = 0; ! # ifdef CYGWIN32 ! thr->pthread_id = 0; ! # endif /* CYGWIN32 */ ! thr->in_use = FALSE; ! } ! ! static void GC_delete_thread(DWORD thread_id) { ! int i; ! LONG my_max = GC_get_max_thread_index(); ! ! for (i = 0; ! i <= my_max && ! (!thread_table[i].in_use || thread_table[i].id != thread_id); ! /* Must still be in_use, since nobody else can store our thread_id. */ ! i++) {} ! if (i > my_max) { ! WARN("Removing nonexisiting thread %ld\n", (GC_word)thread_id); ! } else { ! GC_delete_gc_thread(thread_table+i); ! } ! } ! ! ! #ifdef CYGWIN32 ! ! /* Return a GC_thread corresponding to a given pthread_t. */ ! /* Returns 0 if it's not there. */ ! /* We assume that this is only called for pthread ids that */ ! /* have not yet terminated or are still joinable. */ ! static GC_thread GC_lookup_thread(pthread_t id) ! { ! int i; ! LONG my_max = GC_get_max_thread_index(); ! ! for (i = 0; ! i <= my_max && ! (!thread_table[i].in_use || thread_table[i].pthread_id != id ! || !thread_table[i].in_use); ! /* Must still be in_use, since nobody else can store our thread_id. */ ! i++); ! if (i > my_max) return 0; ! return thread_table + i; ! } ! ! #endif /* CYGWIN32 */ void GC_push_thread_structures GC_PROTO((void)) { /* Unlike the other threads implementations, the thread table here */ /* contains no pointers to the collectable heap. Thus we have */ /* no private structures we need to preserve. */ + # ifdef CYGWIN32 + { int i; /* pthreads may keep a pointer in the thread exit value */ + LONG my_max = GC_get_max_thread_index(); + + for (i = 0; i <= my_max; i++) + if (thread_table[i].in_use) + GC_push_all((ptr_t)&(thread_table[i].status), + (ptr_t)(&(thread_table[i].status)+1)); + } + # endif } void GC_stop_world() *************** void GC_stop_world() *** 36,44 **** DWORD thread_id = GetCurrentThreadId(); int i; GC_please_stop = TRUE; ! for (i = 0; i < MAX_THREADS; i++) ! if (thread_table[i].stack != 0 && thread_table[i].id != thread_id) { # ifdef MSWINCE /* SuspendThread will fail if thread is running kernel code */ --- 236,246 ---- DWORD thread_id = GetCurrentThreadId(); int i; + if (!GC_thr_initialized) ABORT("GC_stop_world() called before GC_thr_init()"); + GC_please_stop = TRUE; ! for (i = 0; i <= GC_get_max_thread_index(); i++) ! if (thread_table[i].stack_base != 0 && thread_table[i].id != thread_id) { # ifdef MSWINCE /* SuspendThread will fail if thread is running kernel code */ *************** void GC_stop_world() *** 53,63 **** DWORD exitCode; if (GetExitCodeThread(thread_table[i].handle,&exitCode) && exitCode != STILL_ACTIVE) { ! thread_table[i].stack = 0; thread_table[i].in_use = FALSE; CloseHandle(thread_table[i].handle); ! BZERO((void *)(&thread_table[i].context), sizeof(CONTEXT)); ! continue; } if (SuspendThread(thread_table[i].handle) == (DWORD)-1) ABORT("SuspendThread failed"); --- 255,268 ---- DWORD exitCode; if (GetExitCodeThread(thread_table[i].handle,&exitCode) && exitCode != STILL_ACTIVE) { ! thread_table[i].stack_base = 0; /* prevent stack from being pushed */ ! # ifndef CYGWIN32 ! /* this breaks pthread_join on Cygwin, which is guaranteed to */ ! /* only see user pthreads */ thread_table[i].in_use = FALSE; CloseHandle(thread_table[i].handle); ! # endif ! continue; } if (SuspendThread(thread_table[i].handle) == (DWORD)-1) ABORT("SuspendThread failed"); *************** void GC_start_world() *** 70,77 **** { DWORD thread_id = GetCurrentThreadId(); int i; ! for (i = 0; i < MAX_THREADS; i++) ! if (thread_table[i].stack != 0 && thread_table[i].suspended && thread_table[i].id != thread_id) { if (ResumeThread(thread_table[i].handle) == (DWORD)-1) ABORT("ResumeThread failed"); --- 275,284 ---- { DWORD thread_id = GetCurrentThreadId(); int i; ! LONG my_max = GC_get_max_thread_index(); ! ! for (i = 0; i <= my_max; i++) ! if (thread_table[i].stack_base != 0 && thread_table[i].suspended && thread_table[i].id != thread_id) { if (ResumeThread(thread_table[i].handle) == (DWORD)-1) ABORT("ResumeThread failed"); *************** ptr_t GC_current_stackbottom() *** 87,95 **** { DWORD thread_id = GetCurrentThreadId(); int i; ! for (i = 0; i < MAX_THREADS; i++) ! if (thread_table[i].stack && thread_table[i].id == thread_id) ! return thread_table[i].stack; ABORT("no thread table entry for current thread"); } # ifdef _MSC_VER --- 294,304 ---- { DWORD thread_id = GetCurrentThreadId(); int i; ! LONG my_max = GC_get_max_thread_index(); ! ! for (i = 0; i <= my_max; i++) ! if (thread_table[i].stack_base && thread_table[i].id == thread_id) ! return thread_table[i].stack_base; ABORT("no thread table entry for current thread"); } # ifdef _MSC_VER *************** ptr_t GC_current_stackbottom() *** 100,109 **** /* The VirtualQuery calls below won't work properly on WinCE, but */ /* since each stack is restricted to an aligned 64K region of */ /* virtual memory we can just take the next lowest multiple of 64K. */ ! # define GC_get_lo_stack_addr(s) \ ((ptr_t)(((DWORD)(s) - 1) & 0xFFFF0000)) # else ! static ptr_t GC_get_lo_stack_addr(ptr_t s) { ptr_t bottom; MEMORY_BASIC_INFORMATION info; --- 309,318 ---- /* The VirtualQuery calls below won't work properly on WinCE, but */ /* since each stack is restricted to an aligned 64K region of */ /* virtual memory we can just take the next lowest multiple of 64K. */ ! # define GC_get_stack_min(s) \ ((ptr_t)(((DWORD)(s) - 1) & 0xFFFF0000)) # else ! static ptr_t GC_get_stack_min(ptr_t s) { ptr_t bottom; MEMORY_BASIC_INFORMATION info; *************** ptr_t GC_current_stackbottom() *** 120,316 **** void GC_push_all_stacks() { DWORD thread_id = GetCurrentThreadId(); int i; ! for (i = 0; i < MAX_THREADS; i++) ! if (thread_table[i].stack) { ! ptr_t bottom = GC_get_lo_stack_addr(thread_table[i].stack); ! if (thread_table[i].id == thread_id) ! GC_push_all_stack((ptr_t)&i, thread_table[i].stack); ! else { ! thread_table[i].context.ContextFlags ! = (CONTEXT_INTEGER|CONTEXT_CONTROL); ! if (!GetThreadContext(thread_table[i].handle, ! /* cast away volatile qualifier */ ! (LPCONTEXT)&thread_table[i].context)) ABORT("GetThreadContext failed"); ! # ifdef I386 ! GC_push_one ((word) thread_table[i].context.Edi); ! GC_push_one ((word) thread_table[i].context.Esi); ! GC_push_one ((word) thread_table[i].context.Ebp); ! GC_push_one ((word) thread_table[i].context.Ebx); ! GC_push_one ((word) thread_table[i].context.Edx); ! GC_push_one ((word) thread_table[i].context.Ecx); ! GC_push_one ((word) thread_table[i].context.Eax); ! if (thread_table[i].context.Esp >= (DWORD)thread_table[i].stack ! || thread_table[i].context.Esp < (DWORD)bottom) { ! WARN("Thread stack pointer 0x%lx out of range, pushing everything", ! thread_table[i].context.Esp); ! GC_push_all_stack((char *) bottom, thread_table[i].stack); ! } else { ! GC_push_all_stack((char *) thread_table[i].context.Esp, ! thread_table[i].stack); ! } ! # else ! # ifdef ARM32 ! if (thread_table[i].context.Sp >= (DWORD)thread_table[i].stack ! || thread_table[i].context.Sp < (DWORD)bottom) ! ABORT("Thread stack pointer out of range"); ! GC_push_one ((word) thread_table[i].context.R0); ! GC_push_one ((word) thread_table[i].context.R1); ! GC_push_one ((word) thread_table[i].context.R2); ! GC_push_one ((word) thread_table[i].context.R3); ! GC_push_one ((word) thread_table[i].context.R4); ! GC_push_one ((word) thread_table[i].context.R5); ! GC_push_one ((word) thread_table[i].context.R6); ! GC_push_one ((word) thread_table[i].context.R7); ! GC_push_one ((word) thread_table[i].context.R8); ! GC_push_one ((word) thread_table[i].context.R9); ! GC_push_one ((word) thread_table[i].context.R10); ! GC_push_one ((word) thread_table[i].context.R11); ! GC_push_one ((word) thread_table[i].context.R12); ! GC_push_all_stack((char *) thread_table[i].context.Sp, ! thread_table[i].stack); ! # else ! # ifdef SHx ! if (thread_table[i].context.R15 >= (DWORD)thread_table[i].stack ! || thread_table[i].context.R15 < (DWORD)bottom) ! ABORT("Thread stack pointer out of range"); ! GC_push_one ((word) thread_table[i].context.R0); ! GC_push_one ((word) thread_table[i].context.R1); ! GC_push_one ((word) thread_table[i].context.R2); ! GC_push_one ((word) thread_table[i].context.R3); ! GC_push_one ((word) thread_table[i].context.R4); ! GC_push_one ((word) thread_table[i].context.R5); ! GC_push_one ((word) thread_table[i].context.R6); ! GC_push_one ((word) thread_table[i].context.R7); ! GC_push_one ((word) thread_table[i].context.R8); ! GC_push_one ((word) thread_table[i].context.R9); ! GC_push_one ((word) thread_table[i].context.R10); ! GC_push_one ((word) thread_table[i].context.R11); ! GC_push_one ((word) thread_table[i].context.R12); ! GC_push_one ((word) thread_table[i].context.R13); ! GC_push_one ((word) thread_table[i].context.R14); ! GC_push_all_stack((char *) thread_table[i].context.R15, ! thread_table[i].stack); # else ! # ifdef MIPS ! if (thread_table[i].context.IntSp >= (DWORD)thread_table[i].stack ! || thread_table[i].context.IntSp < (DWORD)bottom) ! ABORT("Thread stack pointer out of range"); ! GC_push_one ((word) thread_table[i].context.IntAt); ! GC_push_one ((word) thread_table[i].context.IntV0); ! GC_push_one ((word) thread_table[i].context.IntV1); ! GC_push_one ((word) thread_table[i].context.IntA0); ! GC_push_one ((word) thread_table[i].context.IntA1); ! GC_push_one ((word) thread_table[i].context.IntA2); ! GC_push_one ((word) thread_table[i].context.IntA3); ! GC_push_one ((word) thread_table[i].context.IntT0); ! GC_push_one ((word) thread_table[i].context.IntT1); ! GC_push_one ((word) thread_table[i].context.IntT2); ! GC_push_one ((word) thread_table[i].context.IntT3); ! GC_push_one ((word) thread_table[i].context.IntT4); ! GC_push_one ((word) thread_table[i].context.IntT5); ! GC_push_one ((word) thread_table[i].context.IntT6); ! GC_push_one ((word) thread_table[i].context.IntT7); ! GC_push_one ((word) thread_table[i].context.IntS0); ! GC_push_one ((word) thread_table[i].context.IntS1); ! GC_push_one ((word) thread_table[i].context.IntS2); ! GC_push_one ((word) thread_table[i].context.IntS3); ! GC_push_one ((word) thread_table[i].context.IntS4); ! GC_push_one ((word) thread_table[i].context.IntS5); ! GC_push_one ((word) thread_table[i].context.IntS6); ! GC_push_one ((word) thread_table[i].context.IntS7); ! GC_push_one ((word) thread_table[i].context.IntT8); ! GC_push_one ((word) thread_table[i].context.IntT9); ! GC_push_one ((word) thread_table[i].context.IntK0); ! GC_push_one ((word) thread_table[i].context.IntK1); ! GC_push_one ((word) thread_table[i].context.IntS8); ! GC_push_all_stack((char *) thread_table[i].context.IntSp, ! thread_table[i].stack); ! # else ! # ifdef PPC ! if (thread_table[i].context.Gpr1 >= (DWORD)thread_table[i].stack ! || thread_table[i].context.Gpr1 < (DWORD)bottom) ! ABORT("Thread stack pointer out of range"); ! GC_push_one ((word) thread_table[i].context.Gpr0); ! /* Gpr1 is stack pointer */ ! /* Gpr2 is global pointer */ ! GC_push_one ((word) thread_table[i].context.Gpr3); ! GC_push_one ((word) thread_table[i].context.Gpr4); ! GC_push_one ((word) thread_table[i].context.Gpr5); ! GC_push_one ((word) thread_table[i].context.Gpr6); ! GC_push_one ((word) thread_table[i].context.Gpr7); ! GC_push_one ((word) thread_table[i].context.Gpr8); ! GC_push_one ((word) thread_table[i].context.Gpr9); ! GC_push_one ((word) thread_table[i].context.Gpr10); ! GC_push_one ((word) thread_table[i].context.Gpr11); ! GC_push_one ((word) thread_table[i].context.Gpr12); ! /* Gpr13 is reserved for the kernel */ ! GC_push_one ((word) thread_table[i].context.Gpr14); ! GC_push_one ((word) thread_table[i].context.Gpr15); ! GC_push_one ((word) thread_table[i].context.Gpr16); ! GC_push_one ((word) thread_table[i].context.Gpr17); ! GC_push_one ((word) thread_table[i].context.Gpr18); ! GC_push_one ((word) thread_table[i].context.Gpr19); ! GC_push_one ((word) thread_table[i].context.Gpr20); ! GC_push_one ((word) thread_table[i].context.Gpr21); ! GC_push_one ((word) thread_table[i].context.Gpr22); ! GC_push_one ((word) thread_table[i].context.Gpr23); ! GC_push_one ((word) thread_table[i].context.Gpr24); ! GC_push_one ((word) thread_table[i].context.Gpr25); ! GC_push_one ((word) thread_table[i].context.Gpr26); ! GC_push_one ((word) thread_table[i].context.Gpr27); ! GC_push_one ((word) thread_table[i].context.Gpr28); ! GC_push_one ((word) thread_table[i].context.Gpr29); ! GC_push_one ((word) thread_table[i].context.Gpr30); ! GC_push_one ((word) thread_table[i].context.Gpr31); ! GC_push_all_stack((char *) thread_table[i].context.Gpr1, ! thread_table[i].stack); ! # else ! # ifdef ALPHA ! if (thread_table[i].context.IntSp >= (DWORD)thread_table[i].stack ! || thread_table[i].context.IntSp < (DWORD)bottom) ! ABORT("Thread stack pointer out of range"); ! GC_push_one ((word) thread_table[i].context.IntV0); ! GC_push_one ((word) thread_table[i].context.IntT0); ! GC_push_one ((word) thread_table[i].context.IntT1); ! GC_push_one ((word) thread_table[i].context.IntT2); ! GC_push_one ((word) thread_table[i].context.IntT3); ! GC_push_one ((word) thread_table[i].context.IntT4); ! GC_push_one ((word) thread_table[i].context.IntT5); ! GC_push_one ((word) thread_table[i].context.IntT6); ! GC_push_one ((word) thread_table[i].context.IntT7); ! GC_push_one ((word) thread_table[i].context.IntS0); ! GC_push_one ((word) thread_table[i].context.IntS1); ! GC_push_one ((word) thread_table[i].context.IntS2); ! GC_push_one ((word) thread_table[i].context.IntS3); ! GC_push_one ((word) thread_table[i].context.IntS4); ! GC_push_one ((word) thread_table[i].context.IntS5); ! GC_push_one ((word) thread_table[i].context.IntFp); ! GC_push_one ((word) thread_table[i].context.IntA0); ! GC_push_one ((word) thread_table[i].context.IntA1); ! GC_push_one ((word) thread_table[i].context.IntA2); ! GC_push_one ((word) thread_table[i].context.IntA3); ! GC_push_one ((word) thread_table[i].context.IntA4); ! GC_push_one ((word) thread_table[i].context.IntA5); ! GC_push_one ((word) thread_table[i].context.IntT8); ! GC_push_one ((word) thread_table[i].context.IntT9); ! GC_push_one ((word) thread_table[i].context.IntT10); ! GC_push_one ((word) thread_table[i].context.IntT11); ! GC_push_one ((word) thread_table[i].context.IntT12); ! GC_push_one ((word) thread_table[i].context.IntAt); ! GC_push_all_stack((char *) thread_table[i].context.IntSp, ! thread_table[i].stack); ! # else ! --> architecture not supported ! # endif /* !ALPHA */ ! # endif /* !PPC */ ! # endif /* !MIPS */ ! # endif /* !SHx */ ! # endif /* !ARM32 */ ! # endif /* !I386 */ } } } void GC_get_next_stack(char *start, char **lo, char **hi) --- 329,404 ---- void GC_push_all_stacks() { DWORD thread_id = GetCurrentThreadId(); + GC_bool found_me = FALSE; int i; ! int dummy; ! ptr_t sp, stack_min; ! GC_thread thread; ! LONG my_max = GC_get_max_thread_index(); ! ! for (i = 0; i <= my_max; i++) { ! thread = thread_table + i; ! if (thread -> in_use && thread -> stack_base) { ! if (thread -> id == thread_id) { ! sp = (ptr_t) &dummy; ! found_me = TRUE; ! } else { ! CONTEXT context; ! context.ContextFlags = CONTEXT_INTEGER|CONTEXT_CONTROL; ! if (!GetThreadContext(thread_table[i].handle, &context)) ABORT("GetThreadContext failed"); ! ! /* Push all registers that might point into the heap. Frame */ ! /* pointer registers are included in case client code was */ ! /* compiled with the 'omit frame pointer' optimisation. */ ! # define PUSH1(reg) GC_push_one((word)context.reg) ! # define PUSH2(r1,r2) PUSH1(r1), PUSH1(r2) ! # define PUSH4(r1,r2,r3,r4) PUSH2(r1,r2), PUSH2(r3,r4) ! # if defined(I386) ! PUSH4(Edi,Esi,Ebx,Edx), PUSH2(Ecx,Eax), PUSH1(Ebp); ! sp = (ptr_t)context.Esp; ! # elif defined(ARM32) ! PUSH4(R0,R1,R2,R3),PUSH4(R4,R5,R6,R7),PUSH4(R8,R9,R10,R11),PUSH1(R12); ! sp = (ptr_t)context.Sp; ! # elif defined(SHx) ! PUSH4(R0,R1,R2,R3), PUSH4(R4,R5,R6,R7), PUSH4(R8,R9,R10,R11); ! PUSH2(R12,R13), PUSH1(R14); ! sp = (ptr_t)context.R15; ! # elif defined(MIPS) ! PUSH4(IntAt,IntV0,IntV1,IntA0), PUSH4(IntA1,IntA2,IntA3,IntT0); ! PUSH4(IntT1,IntT2,IntT3,IntT4), PUSH4(IntT5,IntT6,IntT7,IntS0); ! PUSH4(IntS1,IntS2,IntS3,IntS4), PUSH4(IntS5,IntS6,IntS7,IntT8); ! PUSH4(IntT9,IntK0,IntK1,IntS8); ! sp = (ptr_t)context.IntSp; ! # elif defined(PPC) ! PUSH4(Gpr0, Gpr3, Gpr4, Gpr5), PUSH4(Gpr6, Gpr7, Gpr8, Gpr9); ! PUSH4(Gpr10,Gpr11,Gpr12,Gpr14), PUSH4(Gpr15,Gpr16,Gpr17,Gpr18); ! PUSH4(Gpr19,Gpr20,Gpr21,Gpr22), PUSH4(Gpr23,Gpr24,Gpr25,Gpr26); ! PUSH4(Gpr27,Gpr28,Gpr29,Gpr30), PUSH1(Gpr31); ! sp = (ptr_t)context.Gpr1; ! # elif defined(ALPHA) ! PUSH4(IntV0,IntT0,IntT1,IntT2), PUSH4(IntT3,IntT4,IntT5,IntT6); ! PUSH4(IntT7,IntS0,IntS1,IntS2), PUSH4(IntS3,IntS4,IntS5,IntFp); ! PUSH4(IntA0,IntA1,IntA2,IntA3), PUSH4(IntA4,IntA5,IntT8,IntT9); ! PUSH4(IntT10,IntT11,IntT12,IntAt); ! sp = (ptr_t)context.IntSp; # else ! # error "architecture is not supported" ! # endif ! } ! ! stack_min = GC_get_stack_min(thread->stack_base); ! ! if (sp >= stack_min && sp < thread->stack_base) ! GC_push_all_stack(sp, thread->stack_base); ! else { ! WARN("Thread stack pointer 0x%lx out of range, pushing everything\n", ! (unsigned long)sp); ! GC_push_all_stack(stack_min, thread->stack_base); } } + } + if (!found_me) ABORT("Collecting from unknown thread."); } void GC_get_next_stack(char *start, char **lo, char **hi) *************** void GC_get_next_stack(char *start, char *** 318,326 **** int i; # define ADDR_LIMIT (char *)(-1L) char * current_min = ADDR_LIMIT; ! ! for (i = 0; i < MAX_THREADS; i++) { ! char * s = (char *)thread_table[i].stack; if (0 != s && s > start && s < current_min) { current_min = s; --- 406,415 ---- int i; # define ADDR_LIMIT (char *)(-1L) char * current_min = ADDR_LIMIT; ! LONG my_max = GC_get_max_thread_index(); ! ! for (i = 0; i <= my_max; i++) { ! char * s = (char *)thread_table[i].stack_base; if (0 != s && s > start && s < current_min) { current_min = s; *************** void GC_get_next_stack(char *start, char *** 331,343 **** *lo = ADDR_LIMIT; return; } ! *lo = GC_get_lo_stack_addr(current_min); if (*lo < start) *lo = start; } ! #if !defined(MSWINCE) && !(defined(__MINGW32__) && !defined(_DLL)) ! HANDLE WINAPI GC_CreateThread( LPSECURITY_ATTRIBUTES lpThreadAttributes, DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId ) --- 420,436 ---- *lo = ADDR_LIMIT; return; } ! *lo = GC_get_stack_min(current_min); if (*lo < start) *lo = start; } ! #if !defined(CYGWIN32) ! #if !defined(MSWINCE) && defined(GC_DLL) ! ! /* We register threads from DllMain */ ! ! GC_API HANDLE WINAPI GC_CreateThread( LPSECURITY_ATTRIBUTES lpThreadAttributes, DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId ) *************** HANDLE WINAPI GC_CreateThread( *** 346,432 **** lpParameter, dwCreationFlags, lpThreadId); } ! #else /* !defined(MSWINCE) && !(defined(__MINGW32__) && !defined(_DLL)) */ typedef struct { - HANDLE child_ready_h, parent_ready_h; - volatile struct thread_entry * entry; LPTHREAD_START_ROUTINE start; LPVOID param; } thread_args; ! DWORD WINAPI thread_start(LPVOID arg); ! HANDLE WINAPI GC_CreateThread( LPSECURITY_ATTRIBUTES lpThreadAttributes, DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId ) { HANDLE thread_h = NULL; - HANDLE child_ready_h, parent_ready_h; ! int i; ! thread_args args; ! /* allocate thread slot */ ! LOCK(); ! for (i = 0; i != MAX_THREADS && thread_table[i].in_use; i++) ! ; ! if (i != MAX_THREADS) { ! thread_table[i].in_use = TRUE; } - UNLOCK(); - - if (i != MAX_THREADS) { - - /* create unnamed unsignalled events */ - if (child_ready_h = CreateEvent(NULL, FALSE, FALSE, NULL)) { - if (parent_ready_h = CreateEvent(NULL, FALSE, FALSE, NULL)) { - - /* set up thread arguments */ - args.child_ready_h = child_ready_h; - args.parent_ready_h = parent_ready_h; - args.entry = &thread_table[i]; - args.start = lpStartAddress; - args.param = lpParameter; - - thread_h = CreateThread(lpThreadAttributes, - dwStackSize, thread_start, - &args, - dwCreationFlags & ~CREATE_SUSPENDED, - lpThreadId); - - if (thread_h) { ! /* fill in ID and handle; tell child this is done */ ! thread_table[i].id = *lpThreadId; ! thread_table[i].handle = thread_h; ! SetEvent (parent_ready_h); ! ! /* wait for child to fill in stack and copy args */ ! WaitForSingleObject (child_ready_h, INFINITE); ! ! /* suspend the child if requested */ ! if (dwCreationFlags & CREATE_SUSPENDED) ! SuspendThread (thread_h); ! ! /* let child call given function now (or when resumed) */ ! SetEvent (parent_ready_h); ! ! } else { ! CloseHandle (parent_ready_h); ! } ! } ! } ! ! CloseHandle (child_ready_h); ! ! if (thread_h == NULL) ! thread_table[i].in_use = FALSE; ! } else { /* no thread slot found */ ! SetLastError (ERROR_TOO_MANY_TCBS); ! } return thread_h; } --- 439,483 ---- lpParameter, dwCreationFlags, lpThreadId); } ! #else /* defined(MSWINCE) || !defined(GC_DLL)) */ ! ! /* We have no DllMain to take care of new threads. Thus we */ ! /* must properly intercept thread creation. */ typedef struct { LPTHREAD_START_ROUTINE start; LPVOID param; } thread_args; ! static DWORD WINAPI thread_start(LPVOID arg); ! GC_API HANDLE WINAPI GC_CreateThread( LPSECURITY_ATTRIBUTES lpThreadAttributes, DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId ) { HANDLE thread_h = NULL; ! thread_args *args; ! if (!GC_is_initialized) GC_init(); ! /* make sure GC is initialized (i.e. main thread is attached) */ ! ! args = GC_malloc_uncollectable(sizeof(thread_args)); ! /* Handed off to and deallocated by child thread. */ ! if (0 == args) { ! SetLastError(ERROR_NOT_ENOUGH_MEMORY); ! return NULL; } ! /* set up thread arguments */ ! args -> start = lpStartAddress; ! args -> param = lpParameter; ! thread_h = CreateThread(lpThreadAttributes, ! dwStackSize, thread_start, ! args, dwCreationFlags, ! lpThreadId); return thread_h; } *************** HANDLE WINAPI GC_CreateThread( *** 434,452 **** static DWORD WINAPI thread_start(LPVOID arg) { DWORD ret = 0; ! thread_args args = *(thread_args *)arg; ! ! /* wait for parent to fill in ID and handle */ ! WaitForSingleObject (args.parent_ready_h, INFINITE); ! ResetEvent (args.parent_ready_h); ! ! /* fill in stack; tell parent this is done */ ! args.entry->stack = GC_get_stack_base(); ! SetEvent (args.child_ready_h); ! /* wait for parent to tell us to go (in case it needs to suspend us) */ ! WaitForSingleObject (args.parent_ready_h, INFINITE); ! CloseHandle (args.parent_ready_h); /* Clear the thread entry even if we exit with an exception. */ /* This is probably pointless, since an uncaught exception is */ --- 485,493 ---- static DWORD WINAPI thread_start(LPVOID arg) { DWORD ret = 0; ! thread_args *args = (thread_args *)arg; ! GC_new_thread(); /* Clear the thread entry even if we exit with an exception. */ /* This is probably pointless, since an uncaught exception is */ *************** static DWORD WINAPI thread_start(LPVOID *** 454,476 **** #ifndef __GNUC__ __try { #endif /* __GNUC__ */ ! ret = args.start (args.param); #ifndef __GNUC__ } __finally { #endif /* __GNUC__ */ ! LOCK(); ! args.entry->stack = 0; ! args.entry->in_use = FALSE; ! /* cast away volatile qualifier */ ! BZERO((void *) &args.entry->context, sizeof(CONTEXT)); ! UNLOCK(); #ifndef __GNUC__ } #endif /* __GNUC__ */ return ret; } ! #endif /* !defined(MSWINCE) && !(defined(__MINGW32__) && !defined(_DLL)) */ #ifdef MSWINCE --- 495,515 ---- #ifndef __GNUC__ __try { #endif /* __GNUC__ */ ! ret = args->start (args->param); #ifndef __GNUC__ } __finally { #endif /* __GNUC__ */ ! GC_free(args); ! GC_delete_thread(GetCurrentThreadId()); #ifndef __GNUC__ } #endif /* __GNUC__ */ return ret; } ! #endif /* !defined(MSWINCE) && !(defined(__MINGW32__) && !defined(_DLL)) */ ! ! #endif /* !CYGWIN32 */ #ifdef MSWINCE *************** int WINAPI WinMain(HINSTANCE hInstance, *** 495,501 **** DWORD thread_id; /* initialize everything */ - InitializeCriticalSection(&GC_allocate_ml); GC_init(); /* start the main thread */ --- 534,539 ---- *************** DWORD WINAPI main_thread_start(LPVOID ar *** 525,630 **** # else /* !MSWINCE */ ! LONG WINAPI GC_write_fault_handler(struct _EXCEPTION_POINTERS *exc_info); ! #ifdef GC_DLL /* ! * This isn't generally safe, since DllMain is not premptible. ! * If another thread holds the lock while this runs we're in trouble. * Pontus Rydin suggests wrapping the thread start routine instead. */ BOOL WINAPI DllMain(HINSTANCE inst, ULONG reason, LPVOID reserved) { switch (reason) { case DLL_PROCESS_ATTACH: - InitializeCriticalSection(&GC_allocate_ml); GC_init(); /* Force initialization before thread attach. */ /* fall through */ case DLL_THREAD_ATTACH: ! { ! int i; ! /* It appears to be unsafe to acquire a lock here, since this */ ! /* code is apparently not preeemptible on some systems. */ ! /* (This is based on complaints, not on Microsoft's official */ ! /* documentation, which says this should perform "only simple */ ! /* inititalization tasks".) */ ! /* Hence we make do with nonblocking synchronization. */ ! ! /* The following should be a noop according to the win32 */ ! /* documentation. There is empirical evidence that it */ ! /* isn't. - HB */ ! # ifdef MPROTECT_VDB ! if (GC_incremental) SetUnhandledExceptionFilter(GC_write_fault_handler); ! # endif ! ! for (i = 0; ! /* cast away volatile qualifier */ ! InterlockedExchange((LPLONG) &thread_table[i].in_use, 1) != 0; ! i++) { ! /* Compare-and-swap would make this cleaner, but that's not */ ! /* supported before Windows 98 and NT 4.0. In Windows 2000, */ ! /* InterlockedExchange is supposed to be replaced by */ ! /* InterlockedExchangePointer, but that's not really what I */ ! /* want here. */ ! if (i == MAX_THREADS - 1) ! ABORT("too many threads"); ! } ! thread_table[i].id = GetCurrentThreadId(); ! if (!DuplicateHandle(GetCurrentProcess(), ! GetCurrentThread(), ! GetCurrentProcess(), ! /* cast away volatile qualifier */ ! (HANDLE *) &thread_table[i].handle, ! 0, ! 0, ! DUPLICATE_SAME_ACCESS)) { ! DWORD last_error = GetLastError(); ! GC_printf1("Last error code: %lx\n", last_error); ! ABORT("DuplicateHandle failed"); ! } ! thread_table[i].stack = GC_get_stack_base(); ! /* If this thread is being created while we are trying to stop */ ! /* the world, wait here. Hopefully this can't happen on any */ ! /* systems that don't allow us to block here. */ ! while (GC_please_stop) Sleep(20); ! } break; case DLL_THREAD_DETACH: ! { ! int i; ! DWORD thread_id = GetCurrentThreadId(); ! LOCK(); ! for (i = 0; ! i < MAX_THREADS && ! (thread_table[i].stack == 0 || thread_table[i].id != thread_id); ! i++) {} ! if (i >= MAX_THREADS) { ! WARN("thread %ld not found on detach", (GC_word)thread_id); ! } else { ! thread_table[i].stack = 0; ! thread_table[i].in_use = FALSE; ! CloseHandle(thread_table[i].handle); ! /* cast away volatile qualifier */ ! BZERO((void *) &thread_table[i].context, sizeof(CONTEXT)); ! } ! UNLOCK(); ! } break; case DLL_PROCESS_DETACH: { int i; LOCK(); ! for (i = 0; i < MAX_THREADS; ++i) { if (thread_table[i].in_use) ! { ! thread_table[i].stack = 0; ! thread_table[i].in_use = FALSE; ! CloseHandle(thread_table[i].handle); ! BZERO((void *) &thread_table[i].context, sizeof(CONTEXT)); ! } } UNLOCK(); --- 563,780 ---- # else /* !MSWINCE */ ! /* Called by GC_init() - we hold the allocation lock. */ ! void GC_thr_init() { ! if (GC_thr_initialized) return; ! GC_main_thread = GetCurrentThreadId(); ! GC_thr_initialized = TRUE; ! /* Add the initial thread, so we can stop it. */ ! GC_new_thread(); ! } ! ! #ifdef CYGWIN32 ! ! struct start_info { ! void *(*start_routine)(void *); ! void *arg; ! GC_bool detached; ! }; ! ! int GC_pthread_join(pthread_t pthread_id, void **retval) { ! int result; ! int i; ! GC_thread me; ! ! # if DEBUG_CYGWIN_THREADS ! GC_printf3("thread 0x%x(0x%x) is joining thread 0x%x.\n", ! (int)pthread_self(), GetCurrentThreadId(), (int)pthread_id); ! # endif ! ! /* Thread being joined might not have registered itself yet. */ ! /* After the join,thread id may have been recycled. */ ! /* FIXME: It would be better if this worked more like */ ! /* pthread_support.c. */ ! ! while ((me = GC_lookup_thread(pthread_id)) == 0) Sleep(10); ! ! result = pthread_join(pthread_id, retval); ! ! GC_delete_gc_thread(me); ! ! # if DEBUG_CYGWIN_THREADS ! GC_printf3("thread 0x%x(0x%x) completed join with thread 0x%x.\n", ! (int)pthread_self(), GetCurrentThreadId(), (int)pthread_id); ! # endif ! ! return result; ! } ! ! /* Cygwin-pthreads calls CreateThread internally, but it's not ! * easily interceptible by us.. ! * so intercept pthread_create instead ! */ ! int ! GC_pthread_create(pthread_t *new_thread, ! const pthread_attr_t *attr, ! void *(*start_routine)(void *), void *arg) { ! int result; ! struct start_info * si; ! ! if (!GC_is_initialized) GC_init(); ! /* make sure GC is initialized (i.e. main thread is attached) */ ! ! /* This is otherwise saved only in an area mmapped by the thread */ ! /* library, which isn't visible to the collector. */ ! si = GC_malloc_uncollectable(sizeof(struct start_info)); ! if (0 == si) return(EAGAIN); ! ! si -> start_routine = start_routine; ! si -> arg = arg; ! if (attr != 0 && ! pthread_attr_getdetachstate(attr, &si->detached) ! == PTHREAD_CREATE_DETACHED) { ! si->detached = TRUE; ! } ! ! # if DEBUG_CYGWIN_THREADS ! GC_printf2("About to create a thread from 0x%x(0x%x)\n", ! (int)pthread_self(), GetCurrentThreadId); ! # endif ! result = pthread_create(new_thread, attr, GC_start_routine, si); ! ! if (result) { /* failure */ ! GC_free(si); ! } ! ! return(result); ! } ! ! void * GC_start_routine(void * arg) ! { ! struct start_info * si = arg; ! void * result; ! void *(*start)(void *); ! void *start_arg; ! pthread_t pthread_id; ! GC_thread me; ! GC_bool detached; ! int i; ! ! # if DEBUG_CYGWIN_THREADS ! GC_printf2("thread 0x%x(0x%x) starting...\n",(int)pthread_self(), ! GetCurrentThreadId()); ! # endif ! ! /* If a GC occurs before the thread is registered, that GC will */ ! /* ignore this thread. That's fine, since it will block trying to */ ! /* acquire the allocation lock, and won't yet hold interesting */ ! /* pointers. */ ! LOCK(); ! /* We register the thread here instead of in the parent, so that */ ! /* we don't need to hold the allocation lock during pthread_create. */ ! me = GC_new_thread(); ! UNLOCK(); ! ! start = si -> start_routine; ! start_arg = si -> arg; ! if (si-> detached) me -> flags |= DETACHED; ! me -> pthread_id = pthread_id = pthread_self(); ! ! GC_free(si); /* was allocated uncollectable */ ! ! pthread_cleanup_push(GC_thread_exit_proc, (void *)me); ! result = (*start)(start_arg); ! me -> status = result; ! pthread_cleanup_pop(0); ! ! # if DEBUG_CYGWIN_THREADS ! GC_printf2("thread 0x%x(0x%x) returned from start routine.\n", ! (int)pthread_self(),GetCurrentThreadId()); ! # endif ! ! return(result); ! } ! ! void GC_thread_exit_proc(void *arg) ! { ! GC_thread me = (GC_thread)arg; ! int i; ! ! # if DEBUG_CYGWIN_THREADS ! GC_printf2("thread 0x%x(0x%x) called pthread_exit().\n", ! (int)pthread_self(),GetCurrentThreadId()); ! # endif ! ! LOCK(); ! if (me -> flags & DETACHED) { ! GC_delete_thread(GetCurrentThreadId()); ! } else { ! /* deallocate it as part of join */ ! me -> flags |= FINISHED; ! } ! UNLOCK(); ! } ! ! /* nothing required here... */ ! int GC_pthread_sigmask(int how, const sigset_t *set, sigset_t *oset) { ! return pthread_sigmask(how, set, oset); ! } ! ! int GC_pthread_detach(pthread_t thread) ! { ! int result; ! GC_thread thread_gc_id; ! ! LOCK(); ! thread_gc_id = GC_lookup_thread(thread); ! UNLOCK(); ! result = pthread_detach(thread); ! if (result == 0) { ! LOCK(); ! thread_gc_id -> flags |= DETACHED; ! /* Here the pthread thread id may have been recycled. */ ! if (thread_gc_id -> flags & FINISHED) { ! GC_delete_gc_thread(thread_gc_id); ! } ! UNLOCK(); ! } ! return result; ! } ! ! #else /* !CYGWIN32 */ /* ! * We avoid acquiring locks here, since this doesn't seem to be preemptable. * Pontus Rydin suggests wrapping the thread start routine instead. */ + #ifdef GC_DLL BOOL WINAPI DllMain(HINSTANCE inst, ULONG reason, LPVOID reserved) { switch (reason) { case DLL_PROCESS_ATTACH: GC_init(); /* Force initialization before thread attach. */ /* fall through */ case DLL_THREAD_ATTACH: ! GC_ASSERT(GC_thr_initialized); ! if (GC_main_thread != GetCurrentThreadId()) { ! GC_new_thread(); ! } /* o.w. we already did it during GC_thr_init(), called by GC_init() */ break; + case DLL_THREAD_DETACH: ! GC_delete_thread(GetCurrentThreadId()); break; + case DLL_PROCESS_DETACH: { int i; LOCK(); ! for (i = 0; i <= GC_get_max_thread_index(); ++i) { if (thread_table[i].in_use) ! GC_delete_gc_thread(thread_table + i); } UNLOCK(); *************** BOOL WINAPI DllMain(HINSTANCE inst, ULON *** 636,643 **** } return TRUE; } ! ! # endif /* GC_DLL */ # endif /* !MSWINCE */ --- 786,793 ---- } return TRUE; } ! #endif /* GC_DLL */ ! #endif /* !CYGWIN32 */ # endif /* !MSWINCE */ diff -Nrc3pad gcc-3.3.3/fastjar/acinclude.m4 gcc-3.4.0/fastjar/acinclude.m4 *** gcc-3.3.3/fastjar/acinclude.m4 2002-09-09 21:19:16.000000000 +0000 --- gcc-3.4.0/fastjar/acinclude.m4 2002-12-16 18:18:45.000000000 +0000 *************** *** 1,114 **** ! ! dnl Host type sizes probe. ! dnl By Kaveh R. Ghazi. One typo fixed since. ! dnl ! AC_DEFUN([gcc_AC_COMPILE_CHECK_SIZEOF], ! [changequote(<<, >>)dnl ! dnl The name to #define. ! define(<>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl ! dnl The cache variable name. ! define(<>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl ! changequote([, ])dnl ! AC_MSG_CHECKING(size of $1) ! AC_CACHE_VAL(AC_CV_NAME, ! [for ac_size in 4 8 1 2 16 $3 ; do # List sizes in rough order of prevalence. ! AC_TRY_COMPILE([#include "confdefs.h" ! #include ! $2 ! ], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size) ! if test x$AC_CV_NAME != x ; then break; fi ! done ! ]) ! if test x$AC_CV_NAME = x ; then ! AC_MSG_ERROR([cannot determine a size for $1]) ! fi ! AC_MSG_RESULT($AC_CV_NAME) ! AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1]) ! undefine([AC_TYPE_NAME])dnl ! undefine([AC_CV_NAME])dnl ! ]) ! ! dnl Utility macro used by next two tests. ! dnl AC_EXAMINE_OBJECT(C source code, ! dnl commands examining object file, ! dnl [commands to run if compile failed]): ! dnl ! dnl Compile the source code to an object file; then convert it into a ! dnl printable representation. All unprintable characters and ! dnl asterisks (*) are replaced by dots (.). All white space is ! dnl deleted. Newlines (ASCII 0x10) in the input are preserved in the ! dnl output, but runs of newlines are compressed to a single newline. ! dnl Finally, line breaks are forcibly inserted so that no line is ! dnl longer than 80 columns and the file ends with a newline. The ! dnl result of all this processing is in the file conftest.dmp, which ! dnl may be examined by the commands in the second argument. ! dnl ! AC_DEFUN([gcc_AC_EXAMINE_OBJECT], ! [AC_LANG_SAVE ! AC_LANG_C ! dnl Next bit cribbed from AC_TRY_COMPILE. ! cat > conftest.$ac_ext < conftest.dmp ! $2 ! ifelse($3, , , else ! $3 ! )dnl ! fi ! rm -rf conftest* ! AC_LANG_RESTORE]) ! ! dnl Host endianness probe. ! dnl Differs from AC_C_BIGENDIAN in that it does not require ! dnl running a program on the host. ! dnl ! AC_DEFUN([fastjar_AC_COMPILE_C_BIGENDIAN], ! [AC_CACHE_CHECK(byte ordering, ac_cv_c_compile_endian, ! [ac_cv_c_compile_endian=unknown ! gcc_AC_EXAMINE_OBJECT([ ! #ifdef HAVE_LIMITS_H ! # include ! #endif ! /* This structure must have no internal padding. */ ! struct { ! char prefix[sizeof "\nendian:" - 1]; ! short word; ! char postfix[2]; ! } tester = { ! "\nendian:", ! #if SIZEOF_SHORT == 4 ! ('A' << (CHAR_BIT * 3)) | ('B' << (CHAR_BIT * 2)) | ! #endif ! ('A' << CHAR_BIT) | 'B', ! 'X', '\n' ! };], ! [if grep 'endian:AB' conftest.dmp >/dev/null 2>&1; then ! ac_cv_c_compile_endian=big-endian ! elif grep 'endian:BA' conftest.dmp >/dev/null 2>&1; then ! ac_cv_c_compile_endian=little-endian ! fi]) ! ]) ! if test $ac_cv_c_compile_endian = unknown; then ! AC_MSG_ERROR([*** unable to determine endianness]) ! elif test $ac_cv_c_compile_endian = big-endian; then ! AC_DEFINE(WORDS_BIG_ENDIAN, 1, ! [Define if the host machine stores words of multi-word integers in ! big-endian order.]) ! fi ! ]) dnl Define MKDIR_TAKES_ONE_ARG if mkdir accepts only one argument instead dnl of the usual 2. --- 1,4 ---- ! sinclude(../config/accross.m4) dnl Define MKDIR_TAKES_ONE_ARG if mkdir accepts only one argument instead dnl of the usual 2. diff -Nrc3pad gcc-3.3.3/fastjar/aclocal.m4 gcc-3.4.0/fastjar/aclocal.m4 *** gcc-3.3.3/fastjar/aclocal.m4 2004-02-14 20:34:20.000000000 +0000 --- gcc-3.4.0/fastjar/aclocal.m4 2004-04-19 02:23:04.000000000 +0000 *************** *** 1,126 **** ! dnl aclocal.m4 generated automatically by aclocal 1.4 ! ! dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. ! dnl This file is free software; the Free Software Foundation ! dnl gives unlimited permission to copy and/or distribute it, ! dnl with or without modifications, as long as this notice is preserved. ! ! dnl This program is distributed in the hope that it will be useful, ! dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without ! dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A ! dnl PARTICULAR PURPOSE. ! ! dnl Host type sizes probe. ! dnl By Kaveh R. Ghazi. One typo fixed since. ! dnl ! AC_DEFUN([gcc_AC_COMPILE_CHECK_SIZEOF], ! [changequote(<<, >>)dnl ! dnl The name to #define. ! define(<>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl ! dnl The cache variable name. ! define(<>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl ! changequote([, ])dnl ! AC_MSG_CHECKING(size of $1) ! AC_CACHE_VAL(AC_CV_NAME, ! [for ac_size in 4 8 1 2 16 $3 ; do # List sizes in rough order of prevalence. ! AC_TRY_COMPILE([#include "confdefs.h" ! #include ! $2 ! ], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size) ! if test x$AC_CV_NAME != x ; then break; fi ! done ! ]) ! if test x$AC_CV_NAME = x ; then ! AC_MSG_ERROR([cannot determine a size for $1]) ! fi ! AC_MSG_RESULT($AC_CV_NAME) ! AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1]) ! undefine([AC_TYPE_NAME])dnl ! undefine([AC_CV_NAME])dnl ! ]) ! dnl Utility macro used by next two tests. ! dnl AC_EXAMINE_OBJECT(C source code, ! dnl commands examining object file, ! dnl [commands to run if compile failed]): ! dnl ! dnl Compile the source code to an object file; then convert it into a ! dnl printable representation. All unprintable characters and ! dnl asterisks (*) are replaced by dots (.). All white space is ! dnl deleted. Newlines (ASCII 0x10) in the input are preserved in the ! dnl output, but runs of newlines are compressed to a single newline. ! dnl Finally, line breaks are forcibly inserted so that no line is ! dnl longer than 80 columns and the file ends with a newline. The ! dnl result of all this processing is in the file conftest.dmp, which ! dnl may be examined by the commands in the second argument. ! dnl ! AC_DEFUN([gcc_AC_EXAMINE_OBJECT], ! [AC_LANG_SAVE ! AC_LANG_C ! dnl Next bit cribbed from AC_TRY_COMPILE. ! cat > conftest.$ac_ext < conftest.dmp ! $2 ! ifelse($3, , , else ! $3 ! )dnl ! fi ! rm -rf conftest* ! AC_LANG_RESTORE]) ! dnl Host endianness probe. ! dnl Differs from AC_C_BIGENDIAN in that it does not require ! dnl running a program on the host. ! dnl ! AC_DEFUN([fastjar_AC_COMPILE_C_BIGENDIAN], ! [AC_CACHE_CHECK(byte ordering, ac_cv_c_compile_endian, ! [ac_cv_c_compile_endian=unknown ! gcc_AC_EXAMINE_OBJECT([ ! #ifdef HAVE_LIMITS_H ! # include ! #endif ! /* This structure must have no internal padding. */ ! struct { ! char prefix[sizeof "\nendian:" - 1]; ! short word; ! char postfix[2]; ! } tester = { ! "\nendian:", ! #if SIZEOF_SHORT == 4 ! ('A' << (CHAR_BIT * 3)) | ('B' << (CHAR_BIT * 2)) | ! #endif ! ('A' << CHAR_BIT) | 'B', ! 'X', '\n' ! };], ! [if grep 'endian:AB' conftest.dmp >/dev/null 2>&1; then ! ac_cv_c_compile_endian=big-endian ! elif grep 'endian:BA' conftest.dmp >/dev/null 2>&1; then ! ac_cv_c_compile_endian=little-endian ! fi]) ! ]) ! if test $ac_cv_c_compile_endian = unknown; then ! AC_MSG_ERROR([*** unable to determine endianness]) ! elif test $ac_cv_c_compile_endian = big-endian; then ! AC_DEFINE(WORDS_BIG_ENDIAN, 1, ! [Define if the host machine stores words of multi-word integers in ! big-endian order.]) ! fi ! ]) dnl Define MKDIR_TAKES_ONE_ARG if mkdir accepts only one argument instead dnl of the usual 2. --- 1,17 ---- ! # generated automatically by aclocal 1.7.9 -*- Autoconf -*- ! # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 ! # Free Software Foundation, Inc. ! # This file is free software; the Free Software Foundation ! # gives unlimited permission to copy and/or distribute it, ! # with or without modifications, as long as this notice is preserved. ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY, to the extent permitted by law; without ! # even the implied warranty of MERCHANTABILITY or FITNESS FOR A ! # PARTICULAR PURPOSE. ! sinclude(../config/accross.m4) dnl Define MKDIR_TAKES_ONE_ARG if mkdir accepts only one argument instead dnl of the usual 2. *************** single argument.]) *** 144,204 **** fi ]) ! # Do all the work for Automake. This macro actually does too much -- ! # some checks are only needed if your package does certain things. ! # But this isn't really a big deal. ! # serial 1 ! dnl Usage: ! dnl AM_INIT_AUTOMAKE(package,version, [no-define]) ! AC_DEFUN(AM_INIT_AUTOMAKE, ! [AC_REQUIRE([AC_PROG_INSTALL]) ! PACKAGE=[$1] ! AC_SUBST(PACKAGE) ! VERSION=[$2] ! AC_SUBST(VERSION) ! dnl test to see if srcdir already configured ! if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi ! ifelse([$3],, ! AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) ! AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) ! AC_REQUIRE([AM_SANITY_CHECK]) ! AC_REQUIRE([AC_ARG_PROGRAM]) ! dnl FIXME This is truly gross. ! missing_dir=`cd $ac_aux_dir && pwd` ! AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) ! AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) ! AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) ! AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) ! AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) ! AC_REQUIRE([AC_PROG_MAKE_SET])]) # # Check to make sure that the build environment is sane. # ! AC_DEFUN(AM_SANITY_CHECK, [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 ! echo timestamp > conftestfile # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( ! set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` ! if test "[$]*" = "X"; then # -L didn't work. ! set X `ls -t $srcdir/configure conftestfile` fi ! if test "[$]*" != "X $srcdir/configure conftestfile" \ ! && test "[$]*" != "X conftestfile $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a --- 35,282 ---- fi ]) ! # Do all the work for Automake. -*- Autoconf -*- ! # This macro actually does too much some checks are only needed if ! # your package does certain things. But this isn't really a big deal. ! # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 ! # Free Software Foundation, Inc. ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! # serial 10 ! ! AC_PREREQ([2.54]) ! ! # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow ! # the ones we care about. ! m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl ! ! # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) ! # AM_INIT_AUTOMAKE([OPTIONS]) ! # ----------------------------------------------- ! # The call with PACKAGE and VERSION arguments is the old style ! # call (pre autoconf-2.50), which is being phased out. PACKAGE ! # and VERSION should now be passed to AC_INIT and removed from ! # the call to AM_INIT_AUTOMAKE. ! # We support both call styles for the transition. After ! # the next Automake release, Autoconf can make the AC_INIT ! # arguments mandatory, and then we can depend on a new Autoconf ! # release and drop the old call support. ! AC_DEFUN([AM_INIT_AUTOMAKE], ! [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl ! AC_REQUIRE([AC_PROG_INSTALL])dnl ! # test to see if srcdir already configured ! if test "`cd $srcdir && pwd`" != "`pwd`" && ! test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi ! ! # test whether we have cygpath ! if test -z "$CYGPATH_W"; then ! if (cygpath --version) >/dev/null 2>/dev/null; then ! CYGPATH_W='cygpath -w' ! else ! CYGPATH_W=echo ! fi ! fi ! AC_SUBST([CYGPATH_W]) ! ! # Define the identity of the package. ! dnl Distinguish between old-style and new-style calls. ! m4_ifval([$2], ! [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl ! AC_SUBST([PACKAGE], [$1])dnl ! AC_SUBST([VERSION], [$2])], ! [_AM_SET_OPTIONS([$1])dnl ! AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl ! AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl ! ! _AM_IF_OPTION([no-define],, ! [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) ! AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl ! ! # Some tools Automake needs. ! AC_REQUIRE([AM_SANITY_CHECK])dnl ! AC_REQUIRE([AC_ARG_PROGRAM])dnl ! AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) ! AM_MISSING_PROG(AUTOCONF, autoconf) ! AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) ! AM_MISSING_PROG(AUTOHEADER, autoheader) ! AM_MISSING_PROG(MAKEINFO, makeinfo) ! AM_MISSING_PROG(AMTAR, tar) ! AM_PROG_INSTALL_SH ! AM_PROG_INSTALL_STRIP ! # We need awk for the "check" target. The system "awk" is bad on ! # some platforms. ! AC_REQUIRE([AC_PROG_AWK])dnl ! AC_REQUIRE([AC_PROG_MAKE_SET])dnl ! AC_REQUIRE([AM_SET_LEADING_DOT])dnl ! ! _AM_IF_OPTION([no-dependencies],, ! [AC_PROVIDE_IFELSE([AC_PROG_CC], ! [_AM_DEPENDENCIES(CC)], ! [define([AC_PROG_CC], ! defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl ! AC_PROVIDE_IFELSE([AC_PROG_CXX], ! [_AM_DEPENDENCIES(CXX)], ! [define([AC_PROG_CXX], ! defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ! ]) ! ]) ! ! ! # When config.status generates a header, we must update the stamp-h file. ! # This file resides in the same directory as the config header ! # that is generated. The stamp files are numbered to have different names. ! ! # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the ! # loop where config.status creates the headers, so we can generate ! # our stamp files there. ! AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], ! [# Compute $1's index in $config_headers. ! _am_stamp_count=1 ! for _am_header in $config_headers :; do ! case $_am_header in ! $1 | $1:* ) ! break ;; ! * ) ! _am_stamp_count=`expr $_am_stamp_count + 1` ;; ! esac ! done ! echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) ! ! # Copyright 2002 Free Software Foundation, Inc. ! ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! ! # AM_AUTOMAKE_VERSION(VERSION) ! # ---------------------------- ! # Automake X.Y traces this macro to ensure aclocal.m4 has been ! # generated from the m4 files accompanying Automake X.Y. ! AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) ! ! # AM_SET_CURRENT_AUTOMAKE_VERSION ! # ------------------------------- ! # Call AM_AUTOMAKE_VERSION so it can be traced. ! # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. ! AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], ! [AM_AUTOMAKE_VERSION([1.7.9])]) ! ! # Helper functions for option handling. -*- Autoconf -*- ! ! # Copyright 2001, 2002 Free Software Foundation, Inc. ! ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! # serial 2 ! ! # _AM_MANGLE_OPTION(NAME) ! # ----------------------- ! AC_DEFUN([_AM_MANGLE_OPTION], ! [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) ! ! # _AM_SET_OPTION(NAME) ! # ------------------------------ ! # Set option NAME. Presently that only means defining a flag for this option. ! AC_DEFUN([_AM_SET_OPTION], ! [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) ! ! # _AM_SET_OPTIONS(OPTIONS) ! # ---------------------------------- ! # OPTIONS is a space-separated list of Automake options. ! AC_DEFUN([_AM_SET_OPTIONS], ! [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) ! ! # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) ! # ------------------------------------------- ! # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. ! AC_DEFUN([_AM_IF_OPTION], ! [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # # Check to make sure that the build environment is sane. # ! # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. ! ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! # serial 3 ! ! # AM_SANITY_CHECK ! # --------------- ! AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 ! echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( ! set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` ! if test "$[*]" = "X"; then # -L didn't work. ! set X `ls -t $srcdir/configure conftest.file` fi ! rm -f conftest.file ! if test "$[*]" != "X $srcdir/configure conftest.file" \ ! && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a *************** if ( *** 208,214 **** alias in your environment]) fi ! test "[$]2" = conftestfile ) then # Ok. --- 286,292 ---- alias in your environment]) fi ! test "$[2]" = conftest.file ) then # Ok. *************** else *** 217,270 **** AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi - rm -f conftest* AC_MSG_RESULT(yes)]) ! dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) ! dnl The program must properly implement --version. ! AC_DEFUN(AM_MISSING_PROG, ! [AC_MSG_CHECKING(for working $2) ! # Run test in a subshell; some versions of sh will print an error if ! # an executable is not found, even if stderr is redirected. ! # Redirect stdin to placate older versions of autoconf. Sigh. ! if ($2 --version) < /dev/null > /dev/null 2>&1; then ! $1=$2 ! AC_MSG_RESULT(found) else ! $1="$3/missing $2" ! AC_MSG_RESULT(missing) fi ! AC_SUBST($1)]) ! # Like AC_CONFIG_HEADER, but automatically create stamp file. ! AC_DEFUN(AM_CONFIG_HEADER, ! [AC_PREREQ([2.12]) ! AC_CONFIG_HEADER([$1]) ! dnl When config.status generates a header, we must update the stamp-h file. ! dnl This file resides in the same directory as the config header ! dnl that is generated. We must strip everything past the first ":", ! dnl and everything past the last "/". ! AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl ! ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, ! <>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, ! <>; do ! case " <<$>>CONFIG_HEADERS " in ! *" <<$>>am_file "*<<)>> ! echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx ! ;; ! esac ! am_indx=`expr "<<$>>am_indx" + 1` ! done<<>>dnl>>) ! changequote([,]))]) # Add --enable-maintainer-mode option to configure. # From Jim Meyering ! # serial 1 ! AC_DEFUN(AM_MAINTAINER_MODE, [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default AC_ARG_ENABLE(maintainer-mode, --- 295,911 ---- AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) ! # -*- Autoconf -*- ! ! ! # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. ! ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! # serial 3 ! ! # AM_MISSING_PROG(NAME, PROGRAM) ! # ------------------------------ ! AC_DEFUN([AM_MISSING_PROG], ! [AC_REQUIRE([AM_MISSING_HAS_RUN]) ! $1=${$1-"${am_missing_run}$2"} ! AC_SUBST($1)]) ! ! ! # AM_MISSING_HAS_RUN ! # ------------------ ! # Define MISSING if not defined so far and test if it supports --run. ! # If it does, set am_missing_run to use it, otherwise, to nothing. ! AC_DEFUN([AM_MISSING_HAS_RUN], ! [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl ! test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" ! # Use eval to expand $SHELL ! if eval "$MISSING --run true"; then ! am_missing_run="$MISSING --run " else ! am_missing_run= ! AC_MSG_WARN([`missing' script is too old or missing]) fi ! ]) ! # AM_AUX_DIR_EXPAND ! # Copyright 2001 Free Software Foundation, Inc. ! ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets ! # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to ! # `$srcdir', `$srcdir/..', or `$srcdir/../..'. ! # ! # Of course, Automake must honor this variable whenever it calls a ! # tool from the auxiliary directory. The problem is that $srcdir (and ! # therefore $ac_aux_dir as well) can be either absolute or relative, ! # depending on how configure is run. This is pretty annoying, since ! # it makes $ac_aux_dir quite unusable in subdirectories: in the top ! # source directory, any form will work fine, but in subdirectories a ! # relative path needs to be adjusted first. ! # ! # $ac_aux_dir/missing ! # fails when called from a subdirectory if $ac_aux_dir is relative ! # $top_srcdir/$ac_aux_dir/missing ! # fails if $ac_aux_dir is absolute, ! # fails when called from a subdirectory in a VPATH build with ! # a relative $ac_aux_dir ! # ! # The reason of the latter failure is that $top_srcdir and $ac_aux_dir ! # are both prefixed by $srcdir. In an in-source build this is usually ! # harmless because $srcdir is `.', but things will broke when you ! # start a VPATH build or use an absolute $srcdir. ! # ! # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, ! # iff we strip the leading $srcdir from $ac_aux_dir. That would be: ! # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` ! # and then we would define $MISSING as ! # MISSING="\${SHELL} $am_aux_dir/missing" ! # This will work as long as MISSING is not called from configure, because ! # unfortunately $(top_srcdir) has no meaning in configure. ! # However there are other variables, like CC, which are often used in ! # configure, and could therefore not use this "fixed" $ac_aux_dir. ! # ! # Another solution, used here, is to always expand $ac_aux_dir to an ! # absolute PATH. The drawback is that using absolute paths prevent a ! # configured tree to be moved without reconfiguration. ! ! # Rely on autoconf to set up CDPATH properly. ! AC_PREREQ([2.50]) ! ! AC_DEFUN([AM_AUX_DIR_EXPAND], [ ! # expand $ac_aux_dir to an absolute path ! am_aux_dir=`cd $ac_aux_dir && pwd` ! ]) ! ! # AM_PROG_INSTALL_SH ! # ------------------ ! # Define $install_sh. ! ! # Copyright 2001 Free Software Foundation, Inc. ! ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! AC_DEFUN([AM_PROG_INSTALL_SH], ! [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl ! install_sh=${install_sh-"$am_aux_dir/install-sh"} ! AC_SUBST(install_sh)]) ! ! # AM_PROG_INSTALL_STRIP ! ! # Copyright 2001 Free Software Foundation, Inc. ! ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! # One issue with vendor `install' (even GNU) is that you can't ! # specify the program used to strip binaries. This is especially ! # annoying in cross-compiling environments, where the build's strip ! # is unlikely to handle the host's binaries. ! # Fortunately install-sh will honor a STRIPPROG variable, so we ! # always use install-sh in `make install-strip', and initialize ! # STRIPPROG with the value of the STRIP variable (set by the user). ! AC_DEFUN([AM_PROG_INSTALL_STRIP], ! [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl ! # Installed binaries are usually stripped using `strip' when the user ! # run `make install-strip'. However `strip' might not be the right ! # tool to use in cross-compilation environments, therefore Automake ! # will honor the `STRIP' environment variable to overrule this program. ! dnl Don't test for $cross_compiling = yes, because it might be `maybe'. ! if test "$cross_compiling" != no; then ! AC_CHECK_TOOL([STRIP], [strip], :) ! fi ! INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" ! AC_SUBST([INSTALL_STRIP_PROGRAM])]) ! ! # -*- Autoconf -*- ! # Copyright (C) 2003 Free Software Foundation, Inc. ! ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! # serial 1 ! ! # Check whether the underlying file-system supports filenames ! # with a leading dot. For instance MS-DOS doesn't. ! AC_DEFUN([AM_SET_LEADING_DOT], ! [rm -rf .tst 2>/dev/null ! mkdir .tst 2>/dev/null ! if test -d .tst; then ! am__leading_dot=. ! else ! am__leading_dot=_ ! fi ! rmdir .tst 2>/dev/null ! AC_SUBST([am__leading_dot])]) ! ! # serial 5 -*- Autoconf -*- ! ! # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. ! ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! ! # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be ! # written in clear, in which case automake, when reading aclocal.m4, ! # will think it sees a *use*, and therefore will trigger all it's ! # C support machinery. Also note that it means that autoscan, seeing ! # CC etc. in the Makefile, will ask for an AC_PROG_CC use... ! ! ! ! # _AM_DEPENDENCIES(NAME) ! # ---------------------- ! # See how the compiler implements dependency checking. ! # NAME is "CC", "CXX", "GCJ", or "OBJC". ! # We try a few techniques and use that to set a single cache variable. ! # ! # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was ! # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular ! # dependency, and given that the user is not expected to run this macro, ! # just rely on AC_PROG_CC. ! AC_DEFUN([_AM_DEPENDENCIES], ! [AC_REQUIRE([AM_SET_DEPDIR])dnl ! AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl ! AC_REQUIRE([AM_MAKE_INCLUDE])dnl ! AC_REQUIRE([AM_DEP_TRACK])dnl ! ! ifelse([$1], CC, [depcc="$CC" am_compiler_list=], ! [$1], CXX, [depcc="$CXX" am_compiler_list=], ! [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], ! [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], ! [depcc="$$1" am_compiler_list=]) ! ! AC_CACHE_CHECK([dependency style of $depcc], ! [am_cv_$1_dependencies_compiler_type], ! [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then ! # We make a subdir and do the tests there. Otherwise we can end up ! # making bogus files that we don't know about and never remove. For ! # instance it was reported that on HP-UX the gcc test will end up ! # making a dummy file named `D' -- because `-MD' means `put the output ! # in D'. ! mkdir conftest.dir ! # Copy depcomp to subdir because otherwise we won't find it if we're ! # using a relative directory. ! cp "$am_depcomp" conftest.dir ! cd conftest.dir ! # We will build objects and dependencies in a subdirectory because ! # it helps to detect inapplicable dependency modes. For instance ! # both Tru64's cc and ICC support -MD to output dependencies as a ! # side effect of compilation, but ICC will put the dependencies in ! # the current directory while Tru64 will put them in the object ! # directory. ! mkdir sub ! ! am_cv_$1_dependencies_compiler_type=none ! if test "$am_compiler_list" = ""; then ! am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` ! fi ! for depmode in $am_compiler_list; do ! # Setup a source with many dependencies, because some compilers ! # like to wrap large dependency lists on column 80 (with \), and ! # we should not choose a depcomp mode which is confused by this. ! # ! # We need to recreate these files for each test, as the compiler may ! # overwrite some of them when testing with obscure command lines. ! # This happens at least with the AIX C compiler. ! : > sub/conftest.c ! for i in 1 2 3 4 5 6; do ! echo '#include "conftst'$i'.h"' >> sub/conftest.c ! : > sub/conftst$i.h ! done ! echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf ! ! case $depmode in ! nosideeffect) ! # after this tag, mechanisms are not by side-effect, so they'll ! # only be used when explicitly requested ! if test "x$enable_dependency_tracking" = xyes; then ! continue ! else ! break ! fi ! ;; ! none) break ;; ! esac ! # We check with `-c' and `-o' for the sake of the "dashmstdout" ! # mode. It turns out that the SunPro C++ compiler does not properly ! # handle `-M -o', and we need to detect this. ! if depmode=$depmode \ ! source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ ! depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ ! $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ ! >/dev/null 2>conftest.err && ! grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && ! grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ! ${MAKE-make} -s -f confmf > /dev/null 2>&1; then ! # icc doesn't choke on unknown options, it will just issue warnings ! # (even with -Werror). So we grep stderr for any message ! # that says an option was ignored. ! if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else ! am_cv_$1_dependencies_compiler_type=$depmode ! break ! fi ! fi ! done ! ! cd .. ! rm -rf conftest.dir ! else ! am_cv_$1_dependencies_compiler_type=none ! fi ! ]) ! AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) ! AM_CONDITIONAL([am__fastdep$1], [ ! test "x$enable_dependency_tracking" != xno \ ! && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ! ]) ! ! ! # AM_SET_DEPDIR ! # ------------- ! # Choose a directory name for dependency files. ! # This macro is AC_REQUIREd in _AM_DEPENDENCIES ! AC_DEFUN([AM_SET_DEPDIR], ! [AC_REQUIRE([AM_SET_LEADING_DOT])dnl ! AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ! ]) ! ! ! # AM_DEP_TRACK ! # ------------ ! AC_DEFUN([AM_DEP_TRACK], ! [AC_ARG_ENABLE(dependency-tracking, ! [ --disable-dependency-tracking Speeds up one-time builds ! --enable-dependency-tracking Do not reject slow dependency extractors]) ! if test "x$enable_dependency_tracking" != xno; then ! am_depcomp="$ac_aux_dir/depcomp" ! AMDEPBACKSLASH='\' ! fi ! AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) ! AC_SUBST([AMDEPBACKSLASH]) ! ]) ! ! # Generate code to set up dependency tracking. -*- Autoconf -*- ! ! # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. ! ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! #serial 2 ! ! # _AM_OUTPUT_DEPENDENCY_COMMANDS ! # ------------------------------ ! AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], ! [for mf in $CONFIG_FILES; do ! # Strip MF so we end up with the name of the file. ! mf=`echo "$mf" | sed -e 's/:.*$//'` ! # Check whether this is an Automake generated Makefile or not. ! # We used to match only the files named `Makefile.in', but ! # some people rename them; so instead we look at the file content. ! # Grep'ing the first line is not enough: some people post-process ! # each Makefile.in and add a new line on top of each file to say so. ! # So let's grep whole file. ! if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then ! dirpart=`AS_DIRNAME("$mf")` ! else ! continue ! fi ! grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue ! # Extract the definition of DEP_FILES from the Makefile without ! # running `make'. ! DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` ! test -z "$DEPDIR" && continue ! # When using ansi2knr, U may be empty or an underscore; expand it ! U=`sed -n -e '/^U = / s///p' < "$mf"` ! test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" ! # We invoke sed twice because it is the simplest approach to ! # changing $(DEPDIR) to its actual value in the expansion. ! for file in `sed -n -e ' ! /^DEP_FILES = .*\\\\$/ { ! s/^DEP_FILES = // ! :loop ! s/\\\\$// ! p ! n ! /\\\\$/ b loop ! p ! } ! /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ ! sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do ! # Make sure the directory exists. ! test -f "$dirpart/$file" && continue ! fdir=`AS_DIRNAME(["$file"])` ! AS_MKDIR_P([$dirpart/$fdir]) ! # echo "creating $dirpart/$file" ! echo '# dummy' > "$dirpart/$file" ! done ! done ! ])# _AM_OUTPUT_DEPENDENCY_COMMANDS ! ! ! # AM_OUTPUT_DEPENDENCY_COMMANDS ! # ----------------------------- ! # This macro should only be invoked once -- use via AC_REQUIRE. ! # ! # This code is only required when automatic dependency tracking ! # is enabled. FIXME. This creates each `.P' file that we will ! # need in order to bootstrap the dependency handling code. ! AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], ! [AC_CONFIG_COMMANDS([depfiles], ! [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], ! [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ! ]) ! ! # Check to see how 'make' treats includes. -*- Autoconf -*- ! ! # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. ! ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! # serial 2 ! ! # AM_MAKE_INCLUDE() ! # ----------------- ! # Check to see how make treats includes. ! AC_DEFUN([AM_MAKE_INCLUDE], ! [am_make=${MAKE-make} ! cat > confinc << 'END' ! am__doit: ! @echo done ! .PHONY: am__doit ! END ! # If we don't find an include directive, just comment out the code. ! AC_MSG_CHECKING([for style of include used by $am_make]) ! am__include="#" ! am__quote= ! _am_result=none ! # First try GNU make style include. ! echo "include confinc" > confmf ! # We grep out `Entering directory' and `Leaving directory' ! # messages which can occur if `w' ends up in MAKEFLAGS. ! # In particular we don't look at `^make:' because GNU make might ! # be invoked under some other name (usually "gmake"), in which ! # case it prints its new name instead of `make'. ! if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then ! am__include=include ! am__quote= ! _am_result=GNU ! fi ! # Now try BSD make style include. ! if test "$am__include" = "#"; then ! echo '.include "confinc"' > confmf ! if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then ! am__include=.include ! am__quote="\"" ! _am_result=BSD ! fi ! fi ! AC_SUBST([am__include]) ! AC_SUBST([am__quote]) ! AC_MSG_RESULT([$_am_result]) ! rm -f confinc confmf ! ]) ! ! # AM_CONDITIONAL -*- Autoconf -*- ! ! # Copyright 1997, 2000, 2001 Free Software Foundation, Inc. ! ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! # serial 5 ! ! AC_PREREQ(2.52) ! ! # AM_CONDITIONAL(NAME, SHELL-CONDITION) ! # ------------------------------------- ! # Define a conditional. ! AC_DEFUN([AM_CONDITIONAL], ! [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], ! [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl ! AC_SUBST([$1_TRUE]) ! AC_SUBST([$1_FALSE]) ! if $2; then ! $1_TRUE= ! $1_FALSE='#' ! else ! $1_TRUE='#' ! $1_FALSE= ! fi ! AC_CONFIG_COMMANDS_PRE( ! [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then ! AC_MSG_ERROR([conditional "$1" was never defined. ! Usually this means the macro was only invoked conditionally.]) ! fi])]) ! ! # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- ! ! # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. ! ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! AC_PREREQ([2.52]) ! ! # serial 6 ! ! # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. ! AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Add --enable-maintainer-mode option to configure. # From Jim Meyering ! # Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! # serial 2 ! ! AC_DEFUN([AM_MAINTAINER_MODE], [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default AC_ARG_ENABLE(maintainer-mode, *************** AC_DEFUN(AM_MAINTAINER_MODE, *** 272,294 **** (and sometimes confusing) to the casual installer], USE_MAINTAINER_MODE=$enableval, USE_MAINTAINER_MODE=no) ! AC_MSG_RESULT($USE_MAINTAINER_MODE) ! AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST(MAINT)dnl ] ) ! # Define a conditional. ! ! AC_DEFUN(AM_CONDITIONAL, ! [AC_SUBST($1_TRUE) ! AC_SUBST($1_FALSE) ! if $2; then ! $1_TRUE= ! $1_FALSE='#' ! else ! $1_TRUE='#' ! $1_FALSE= ! fi]) --- 913,924 ---- (and sometimes confusing) to the casual installer], USE_MAINTAINER_MODE=$enableval, USE_MAINTAINER_MODE=no) ! AC_MSG_RESULT([$USE_MAINTAINER_MODE]) ! AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST(MAINT)dnl ] ) ! AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) diff -Nrc3pad gcc-3.3.3/fastjar/ChangeLog gcc-3.4.0/fastjar/ChangeLog *** gcc-3.3.3/fastjar/ChangeLog 2004-02-14 20:17:01.000000000 +0000 --- gcc-3.4.0/fastjar/ChangeLog 2004-04-19 01:57:50.000000000 +0000 *************** *** 1,10 **** ! 2004-02-14 Release Manager ! * GCC 3.3.3 Released. ! 2003-10-16 Release Manager ! * GCC 3.3.2 Released. 2003-08-13 Matthias Klose --- 1,50 ---- ! 2004-04-18 Release Manager ! * GCC 3.4.0 released. ! 2004-04-12 Kelley Cook ! PR bootstrap/14905 ! * configure.ac: Parse --enable-generated-files-in-srcdir. ! * Makefile.am: Copy man and info files to srcdir if requested. ! * configure: Regenerate. ! * Makefile.in Regenerate. ! ! 2004-01-09 Kelley Cook ! ! * configure.in: Rename file to ... ! * configure.ac: ... this. Add in AC_PREREQ(2.57) ! * config.h.in: Regenerate. ! * aclocal.m4: Regenerate. ! * Makefile.in: Regenerate. ! ! 2004-01-07 Andreas Tobler ! ! * jartool.c (make_manifest): Fix off-by-one bug when creating ! an empty MANIFEST.MF. ! ! 2003-12-01 Kelley Cook ! ! * Makefile.am: Define AM_MAKINFOFLAGS. Remove Automake 1.4 hack. ! * Makefile.in: Regenerate with automake 1.7.6 & autoconf 2.57 tools. ! * aclocal.m4, config.h.in, configure: Likewise. ! * install-sh, missing, mkinstalldirs, stamp-h.in: Remove. ! ! 2003-11-21 Kelley Cook ! ! * .cvsignore: Delete. ! ! 2003-10-30 Kelley Cook ! ! * Makefile.am (my_make_i_flags): Add $(srcdir) and update comment ! to match. ! (fastjar.info): Update target to write to build directory. ! (%.1): New implicit rule from a .pod file. ! (jar.1): Delete. ! (grepjar.1): Delete. ! (jar.pod): New intermediate rule. ! (grepjar.pod): Likewise. ! * Makefile.in: Regenerate. 2003-08-13 Matthias Klose *************** *** 12,28 **** * Makefile.am: Remove reference to fdl.texi * Makefile.in: Regenerate ! 2003-08-04 Release Manager ! * GCC 3.3.1 Released. 2003-07-11 Gerald Pfeifer * README: Note that FastJar is not part of GCC. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. 2003-03-30 Joseph S. Myers --- 52,80 ---- * Makefile.am: Remove reference to fdl.texi * Makefile.in: Regenerate ! 2003-07-29 Nathanael Nerode ! * mkinstalldirs: Import autoconf 2.57 / automake 1.7 version. 2003-07-11 Gerald Pfeifer * README: Note that FastJar is not part of GCC. ! 2003-07-02 Nathanael Nerode ! PR java/9532 ! * jartool.c (add_to_jar): Return 1 on failure to open file. ! Split out -C case to: ! * jartool.c (add_to_jar_with_dir): New function. ! ! 2003-06-15 Nathanael Nerode ! ! PR java/9532 ! * jartool.c (main) Give proper error messages with -C, and ! check for missing arguments properly. Send error messages ! to stderr. ! * jartool.c (add_to_jar): Make getcwd() call portable, ! and check for error return. 2003-03-30 Joseph S. Myers *************** *** 30,36 **** 2003-03-10 Mohan Embar ! * dostime.c: add #include for definition of NULL 2003-02-04 Joseph S. Myers --- 82,88 ---- 2003-03-10 Mohan Embar ! * dostime.c: add #include for definition of NULL 2003-02-04 Joseph S. Myers *************** *** 52,57 **** --- 104,113 ---- with a '\0' to guard against the case where the formatted time string is more than the size allowed by the buffer. + 2003-01-14 Tom Tromey + + * config.h.in: Rebuilt. + 2002-12-30 DJ Delorie * Makefile.am (jar.1, grepjar.1): Protect against *************** *** 66,71 **** --- 122,139 ---- * fastjar.texi (jar @direntry, grepjar @direntry): Add (fastjar). + 2002-11-23 H.J. Lu + + * acinclude.m4: Include ../config/accross.m4. + (gcc_AC_COMPILE_CHECK_SIZEOF): Removed. + (gcc_AC_EXAMINE_OBJECT): Removed. + (gcc_AC_C_COMPILE_ENDIAN): Removed. + * aclocal.m4; Rebuild. + + * configure.in: Replace AC_C_BIGENDIAN with AC_C_BIGENDIAN_CROSS. + Replace AC_CHECK_SIZEOF with AC_COMPILE_CHECK_SIZEOF. + * configure: Likewise. + 2002-11-21 Ranjit Mathew * jartool.c (extract_jar): Use "open" with O_BINARY instead of *************** *** 95,100 **** --- 163,173 ---- * jartool.c: Use mode 0666 when opening new file. + 2002-09-16 Volker Reichelt + + * jargrep.c (chk_wrd): Remove unused variable(s). + * jartool.c (main, create_central_header, list_jar): Likewise. + 2002-10-15 Ranjit Mathew * configure, config.h.in: Rebuilt. *************** *** 217,223 **** * aclocal.m4: Regenerated. * stamp-h.in: Regenerated. * jargrep.c: Eliminate some signed/unsigned and default ! uninitialized warnings. Use HAVE_STDLIB_H instead of STDC_HEADERS macro. * jartool.c: Likewise. * compress.c: Likewise. --- 290,296 ---- * aclocal.m4: Regenerated. * stamp-h.in: Regenerated. * jargrep.c: Eliminate some signed/unsigned and default ! uninitialized warnings. Use HAVE_STDLIB_H instead of STDC_HEADERS macro. * jartool.c: Likewise. * compress.c: Likewise. *************** *** 259,265 **** 2001-05-15 Per Bothner ! * Makefile.am (bin_PROGRAMS): Renamed from "fastjar" to "jar". 2001-05-03 John David Anglin --- 332,338 ---- 2001-05-15 Per Bothner ! * Makefile.am (bin_PROGRAMS): Renamed from "fastjar" to "jar". 2001-05-03 John David Anglin *************** *** 277,283 **** * jartool.c (MAXPATHLEN): Provide if not defined. 2000-12-15 Tom Tromey ! Kelley Cook * jargrep.c: Include getopt.h if it exists. (optind): Declare. --- 350,356 ---- * jartool.c (MAXPATHLEN): Provide if not defined. 2000-12-15 Tom Tromey ! Kelley Cook * jargrep.c: Include getopt.h if it exists. (optind): Declare. diff -Nrc3pad gcc-3.3.3/fastjar/compress.c gcc-3.4.0/fastjar/compress.c *** gcc-3.3.3/fastjar/compress.c 2002-01-03 04:57:56.000000000 +0000 --- gcc-3.4.0/fastjar/compress.c 2002-01-03 04:57:56.000000000 +0000 *************** *** 1,21 **** ! /* $Id: compress.c,v 1.3 2002/01/03 04:57:56 rodrigc Exp $ $Log: compress.c,v $ - Revision 1.3 2002/01/03 04:57:56 rodrigc - 2001-01-02 Craig Rodrigues - - PR bootstrap/5117 - * configure.in (AC_CHECK_HEADERS): Check for stdlib.h. - * Makefile.am: Move grepjar to bin_PROGRAMS. - * config.h.in: Regenerated. - * Makefile.in: Regenerated. - * aclocal.m4: Regenerated. - * jargrep.c: Eliminate some signed/unsigned and default - uninitialized warnings. Use HAVE_STDLIB_H instead of - STDC_HEADERS macro. - * jartool.c: Likewise. - * compress.c: Likewise. - Revision 1.2 2000/12/14 18:45:35 ghazi Warning fixes: --- 1,6 ---- ! /* $Id: compress.c,v 1.2 2000/12/14 18:45:35 ghazi Exp $ $Log: compress.c,v $ Revision 1.2 2000/12/14 18:45:35 ghazi Warning fixes: diff -Nrc3pad gcc-3.3.3/fastjar/compress.h gcc-3.4.0/fastjar/compress.h *** gcc-3.3.3/fastjar/compress.h 2000-12-14 18:45:35.000000000 +0000 --- gcc-3.4.0/fastjar/compress.h 2000-12-14 18:45:35.000000000 +0000 *************** *** 1,34 **** ! /* $Id: compress.h,v 1.2 2000/12/14 18:45:35 ghazi Exp $ $Log: compress.h,v $ - Revision 1.2 2000/12/14 18:45:35 ghazi - Warning fixes: - - * compress.c: Include stdlib.h and compress.h. - (rcsid): Delete. - (report_str_error): Make static. - (ez_inflate_str): Delete unused variable. Add parens in if-stmt. - (hrd_inflate_str): Likewise. - - * compress.h (init_compression, end_compression, init_inflation, - end_inflation): Prototype void arguments. - - * dostime.c (rcsid): Delete. - - * jargrep.c: Include ctype.h, stdlib.h, zlib.h and compress.h. - Make functions static. Cast ctype function argument to `unsigned - char'. Add parens in if-stmts. Constify. - (Usage): Change into a macro. - (jargrep): Remove unused parameter. - - * jartool.c: Constify. Add parens in if-stmts. Align - signed/unsigned char pointers in functions calls using casts. - (rcsid): Delete. - (list_jar): Fix printf format specifier. - (usage): Chop long string into bits. Reformat. - - * pushback.c (rcsid): Delete. - Revision 1.1 2000/12/09 03:08:23 apbianco 2000-12-08 Alexandre Petit-Bianco --- 1,6 ---- ! /* $Id: compress.h,v 1.1 2000/12/09 03:08:23 apbianco Exp $ $Log: compress.h,v $ Revision 1.1 2000/12/09 03:08:23 apbianco 2000-12-08 Alexandre Petit-Bianco diff -Nrc3pad gcc-3.3.3/fastjar/config.h.in gcc-3.4.0/fastjar/config.h.in *** gcc-3.3.3/fastjar/config.h.in 2002-11-10 21:04:24.000000000 +0000 --- gcc-3.4.0/fastjar/config.h.in 2004-01-10 02:09:08.000000000 +0000 *************** *** 1,57 **** ! /* config.h.in. Generated automatically from configure.in by autoheader. */ ! ! /* Define to `long' if doesn't define. */ ! #undef off_t ! ! /* Define if you have the ANSI C header files. */ ! #undef STDC_HEADERS ! /* Define if your declares struct tm. */ ! #undef TM_IN_SYS_TIME ! /* Define if you have the header file. */ #undef HAVE_DIRENT_H ! /* Define if you have the header file. */ #undef HAVE_FCNTL_H ! /* Define if you have the header file. */ #undef HAVE_NDIR_H ! /* Define if you have the header file. */ #undef HAVE_STDLIB_H ! /* Define if you have the header file. */ ! #undef HAVE_LIMITS_H ! /* Define if you have the header file. */ #undef HAVE_SYS_DIR_H ! /* Define if you have the header file. */ #undef HAVE_SYS_NDIR_H ! /* Define if you have the header file. */ #undef HAVE_SYS_PARAM_H ! /* Define if you have the header file. */ #undef HAVE_UNISTD_H /* Name of package */ #undef PACKAGE ! /* Version number of package */ ! #undef VERSION ! /* Define if host mkdir takes a ! single argument. */ ! #undef MKDIR_TAKES_ONE_ARG /* The number of bytes in type char */ #undef SIZEOF_CHAR - /* The number of bytes in type short */ - #undef SIZEOF_SHORT - /* The number of bytes in type int */ #undef SIZEOF_INT --- 1,87 ---- ! /* config.h.in. Generated from configure.ac by autoheader. */ ! /* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ ! #undef BYTEORDER ! /* Define to 1 if you have the header file, and it defines `DIR'. ! */ #undef HAVE_DIRENT_H ! /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H ! /* Define to 1 if you have the header file. */ ! #undef HAVE_INTTYPES_H ! ! /* Define to 1 if you have the header file. */ ! #undef HAVE_LIMITS_H ! ! /* Define to 1 if you have the header file. */ ! #undef HAVE_MEMORY_H ! ! /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H ! /* Define to 1 if you have the header file. */ ! #undef HAVE_STDINT_H ! ! /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H ! /* Define to 1 if you have the header file. */ ! #undef HAVE_STRINGS_H ! /* Define to 1 if you have the header file. */ ! #undef HAVE_STRING_H ! ! /* Define to 1 if you have the header file, and it defines `DIR'. ! */ #undef HAVE_SYS_DIR_H ! /* Define to 1 if you have the header file, and it defines `DIR'. ! */ #undef HAVE_SYS_NDIR_H ! /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H ! /* Define to 1 if you have the header file. */ ! #undef HAVE_SYS_STAT_H ! ! /* Define to 1 if you have the header file. */ ! #undef HAVE_SYS_TYPES_H ! ! /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H + /* Define if the host machine stores words of multi-word integers in + big-endian order. */ + #undef HOST_WORDS_BIG_ENDIAN + + /* Define if host mkdir takes a single argument. */ + #undef MKDIR_TAKES_ONE_ARG + /* Name of package */ #undef PACKAGE ! /* Define to the address where bug reports for this package should be sent. */ ! #undef PACKAGE_BUGREPORT ! /* Define to the full name of this package. */ ! #undef PACKAGE_NAME ! ! /* Define to the full name and version of this package. */ ! #undef PACKAGE_STRING ! ! /* Define to the one symbol short name of this package. */ ! #undef PACKAGE_TARNAME ! ! /* Define to the version of this package. */ ! #undef PACKAGE_VERSION /* The number of bytes in type char */ #undef SIZEOF_CHAR /* The number of bytes in type int */ #undef SIZEOF_INT *************** single argument. */ *** 61,67 **** /* The number of bytes in type long long */ #undef SIZEOF_LONG_LONG ! /* Define if the host machine stores words of multi-word integers in ! big-endian order. */ ! #undef WORDS_BIG_ENDIAN --- 91,110 ---- /* The number of bytes in type long long */ #undef SIZEOF_LONG_LONG ! /* The number of bytes in type short */ ! #undef SIZEOF_SHORT + /* Define to 1 if you have the ANSI C header files. */ + #undef STDC_HEADERS + + /* Define to 1 if your declares `struct tm'. */ + #undef TM_IN_SYS_TIME + + /* Version number of package */ + #undef VERSION + + /* whether byteorder is bigendian */ + #undef WORDS_BIGENDIAN + + /* Define to `long' if does not define. */ + #undef off_t diff -Nrc3pad gcc-3.3.3/fastjar/configure gcc-3.4.0/fastjar/configure *** gcc-3.3.3/fastjar/configure 2004-02-14 20:34:20.000000000 +0000 --- gcc-3.4.0/fastjar/configure 2004-04-19 02:23:04.000000000 +0000 *************** *** 1,31 **** #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.13 ! # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ! # Defaults: ! ac_help= ac_default_prefix=/usr/local ! # Any additions from configure.in: ! ac_help="$ac_help ! --enable-maintainer-mode enable make rules and dependencies not useful ! (and sometimes confusing) to the casual installer" ! ac_help="$ac_help ! --with-system-zlib use installed libz" # Initialize some variables set by options. # The variables have the same names as the options, with # dashes changed to underlines. ! build=NONE ! cache_file=./config.cache exec_prefix=NONE - host=NONE no_create= - nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE --- 1,324 ---- #! /bin/sh # Guess values for system-dependent variables and create Makefiles. ! # Generated by GNU Autoconf 2.57. # + # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 + # Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. + ## --------------------- ## + ## M4sh Initialization. ## + ## --------------------- ## ! # Be Bourne compatible ! if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then ! emulate sh ! NULLCMD=: ! # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which ! # is contrary to our usage. Disable this feature. ! alias -g '${1+"$@"}'='"$@"' ! elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then ! set -o posix ! fi ! ! # Support unset when possible. ! if (FOO=FOO; unset FOO) >/dev/null 2>&1; then ! as_unset=unset ! else ! as_unset=false ! fi ! ! ! # Work around bugs in pre-3.0 UWIN ksh. ! $as_unset ENV MAIL MAILPATH ! PS1='$ ' ! PS2='> ' ! PS4='+ ' ! ! # NLS nuisances. ! for as_var in \ ! LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ ! LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ ! LC_TELEPHONE LC_TIME ! do ! if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then ! eval $as_var=C; export $as_var ! else ! $as_unset $as_var ! fi ! done ! ! # Required to use basename. ! if expr a : '\(a\)' >/dev/null 2>&1; then ! as_expr=expr ! else ! as_expr=false ! fi ! ! if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then ! as_basename=basename ! else ! as_basename=false ! fi ! ! ! # Name of the executable. ! as_me=`$as_basename "$0" || ! $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ ! X"$0" : 'X\(//\)$' \| \ ! X"$0" : 'X\(/\)$' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X/"$0" | ! sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } ! /^X\/\(\/\/\)$/{ s//\1/; q; } ! /^X\/\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! ! ! # PATH needs CR, and LINENO needs CR and PATH. ! # Avoid depending upon Character Ranges. ! as_cr_letters='abcdefghijklmnopqrstuvwxyz' ! as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' ! as_cr_Letters=$as_cr_letters$as_cr_LETTERS ! as_cr_digits='0123456789' ! as_cr_alnum=$as_cr_Letters$as_cr_digits ! ! # The user is always right. ! if test "${PATH_SEPARATOR+set}" != set; then ! echo "#! /bin/sh" >conf$$.sh ! echo "exit 0" >>conf$$.sh ! chmod +x conf$$.sh ! if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then ! PATH_SEPARATOR=';' ! else ! PATH_SEPARATOR=: ! fi ! rm -f conf$$.sh ! fi ! ! ! as_lineno_1=$LINENO ! as_lineno_2=$LINENO ! as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` ! test "x$as_lineno_1" != "x$as_lineno_2" && ! test "x$as_lineno_3" = "x$as_lineno_2" || { ! # Find who we are. Look in the path if we contain no path at all ! # relative or not. ! case $0 in ! *[\\/]* ) as_myself=$0 ;; ! *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break ! done ! ! ;; ! esac ! # We did not find ourselves, most probably we were run as `sh COMMAND' ! # in which case we are not to be found in the path. ! if test "x$as_myself" = x; then ! as_myself=$0 ! fi ! if test ! -f "$as_myself"; then ! { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 ! { (exit 1); exit 1; }; } ! fi ! case $CONFIG_SHELL in ! '') ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for as_base in sh bash ksh sh5; do ! case $as_dir in ! /*) ! if ("$as_dir/$as_base" -c ' ! as_lineno_1=$LINENO ! as_lineno_2=$LINENO ! as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` ! test "x$as_lineno_1" != "x$as_lineno_2" && ! test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then ! $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } ! $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } ! CONFIG_SHELL=$as_dir/$as_base ! export CONFIG_SHELL ! exec "$CONFIG_SHELL" "$0" ${1+"$@"} ! fi;; ! esac ! done ! done ! ;; ! esac ! ! # Create $as_me.lineno as a copy of $as_myself, but with $LINENO ! # uniformly replaced by the line number. The first 'sed' inserts a ! # line-number line before each line; the second 'sed' does the real ! # work. The second script uses 'N' to pair each line-number line ! # with the numbered line, and appends trailing '-' during ! # substitution so that $LINENO is not a special case at line end. ! # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the ! # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) ! sed '=' <$as_myself | ! sed ' ! N ! s,$,-, ! : loop ! s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, ! t loop ! s,-$,, ! s,^['$as_cr_digits']*\n,, ! ' >$as_me.lineno && ! chmod +x $as_me.lineno || ! { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 ! { (exit 1); exit 1; }; } ! ! # Don't try to exec as it changes $[0], causing all sort of problems ! # (the dirname of $[0] is not the place where we might find the ! # original and so on. Autoconf is especially sensible to this). ! . ./$as_me.lineno ! # Exit status is that of the last command. ! exit ! } ! ! ! case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in ! *c*,-n*) ECHO_N= ECHO_C=' ! ' ECHO_T=' ' ;; ! *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; ! *) ECHO_N= ECHO_C='\c' ECHO_T= ;; ! esac ! ! if expr a : '\(a\)' >/dev/null 2>&1; then ! as_expr=expr ! else ! as_expr=false ! fi ! ! rm -f conf$$ conf$$.exe conf$$.file ! echo >conf$$.file ! if ln -s conf$$.file conf$$ 2>/dev/null; then ! # We could just check for DJGPP; but this test a) works b) is more generic ! # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). ! if test -f conf$$.exe; then ! # Don't use ln at all; we don't have any links ! as_ln_s='cp -p' ! else ! as_ln_s='ln -s' ! fi ! elif ln conf$$.file conf$$ 2>/dev/null; then ! as_ln_s=ln ! else ! as_ln_s='cp -p' ! fi ! rm -f conf$$ conf$$.exe conf$$.file ! ! if mkdir -p . 2>/dev/null; then ! as_mkdir_p=: ! else ! as_mkdir_p=false ! fi ! ! as_executable_p="test -f" ! ! # Sed expression to map a string onto a valid CPP name. ! as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" ! ! # Sed expression to map a string onto a valid variable name. ! as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" ! ! ! # IFS ! # We need space, tab and new line, in precisely that order. ! as_nl=' ! ' ! IFS=" $as_nl" ! ! # CDPATH. ! $as_unset CDPATH ! ! ! # Name of the host. ! # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, ! # so uname gets run too. ! ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` ! ! exec 6>&1 ! ! # ! # Initializations. ! # ac_default_prefix=/usr/local ! ac_config_libobj_dir=. ! cross_compiling=no ! subdirs= ! MFLAGS= ! MAKEFLAGS= ! SHELL=${CONFIG_SHELL-/bin/sh} ! ! # Maximum number of lines to put in a shell here document. ! # This variable seems obsolete. It should probably be removed, and ! # only ac_max_sed_lines should be used. ! : ${ac_max_here_lines=38} ! ! # Identity of this package. ! PACKAGE_NAME= ! PACKAGE_TARNAME= ! PACKAGE_VERSION= ! PACKAGE_STRING= ! PACKAGE_BUGREPORT= ! ! ac_unique_file="jartool.h" ! # Factoring default headers for most tests. ! ac_includes_default="\ ! #include ! #if HAVE_SYS_TYPES_H ! # include ! #endif ! #if HAVE_SYS_STAT_H ! # include ! #endif ! #if STDC_HEADERS ! # include ! # include ! #else ! # if HAVE_STDLIB_H ! # include ! # endif ! #endif ! #if HAVE_STRING_H ! # if !STDC_HEADERS && HAVE_MEMORY_H ! # include ! # endif ! # include ! #endif ! #if HAVE_STRINGS_H ! # include ! #endif ! #if HAVE_INTTYPES_H ! # include ! #else ! # if HAVE_STDINT_H ! # include ! # endif ! #endif ! #if HAVE_UNISTD_H ! # include ! #endif" ! ! ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE RM CP CHMOD MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT fastjar_warn_cflags CPP EGREP ZLIBS ZDEPS ZINCS GENINSRC_TRUE GENINSRC_FALSE gcc_version LIBOBJS LTLIBOBJS' ! ac_subst_files='' # Initialize some variables set by options. + ac_init_help= + ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. ! cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE *************** program_suffix=NONE *** 33,44 **** program_transform_name=s,x,x, silent= site= - sitefile= srcdir= - target=NONE verbose= x_includes=NONE x_libraries=NONE bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' --- 326,341 ---- program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE + + # Installation directory options. + # These are left unexpanded so users can "make install exec_prefix=/foo" + # and all the variables that are supposed to be based on exec_prefix + # by default will actually change. + # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' *************** oldincludedir='/usr/include' *** 52,68 **** infodir='${prefix}/info' mandir='${prefix}/man' - # Initialize some other variables. - subdirs= - MFLAGS= MAKEFLAGS= - SHELL=${CONFIG_SHELL-/bin/sh} - # Maximum number of lines to put in a shell here document. - ac_max_here_lines=12 - ac_prev= for ac_option do - # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" --- 349,357 ---- *************** do *** 70,128 **** continue fi ! case "$ac_option" in ! -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; ! *) ac_optarg= ;; ! esac # Accept the important Cygnus configure options, so we can diagnose typos. ! case "$ac_option" in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) ! bindir="$ac_optarg" ;; -build | --build | --buil | --bui | --bu) ! ac_prev=build ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) ! build="$ac_optarg" ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) ! cache_file="$ac_optarg" ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) ! datadir="$ac_optarg" ;; -disable-* | --disable-*) ! ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. ! if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then ! { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } ! fi ! ac_feature=`echo $ac_feature| sed 's/-/_/g'` ! eval "enable_${ac_feature}=no" ;; -enable-* | --enable-*) ! ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. ! if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then ! { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } ! fi ! ac_feature=`echo $ac_feature| sed 's/-/_/g'` ! case "$ac_option" in ! *=*) ;; *) ac_optarg=yes ;; esac ! eval "enable_${ac_feature}='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ --- 359,417 ---- continue fi ! ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. ! case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) ! bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ! ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) ! build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) ! cache_file=$ac_optarg ;; ! ! --config-cache | -C) ! cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) ! datadir=$ac_optarg ;; -disable-* | --disable-*) ! ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. ! expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && ! { echo "$as_me: error: invalid feature name: $ac_feature" >&2 ! { (exit 1); exit 1; }; } ! ac_feature=`echo $ac_feature | sed 's/-/_/g'` ! eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ! ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. ! expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && ! { echo "$as_me: error: invalid feature name: $ac_feature" >&2 ! { (exit 1); exit 1; }; } ! ac_feature=`echo $ac_feature | sed 's/-/_/g'` ! case $ac_option in ! *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac ! eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ *************** do *** 131,226 **** -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) ! exec_prefix="$ac_optarg" ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; ! -help | --help | --hel | --he) ! # Omit some internal or obsolete options to make the list less imposing. ! # This message is too long to be a string in the A/UX 3.1 sh. ! cat << EOF ! Usage: configure [options] [host] ! Options: [defaults in brackets after descriptions] ! Configuration: ! --cache-file=FILE cache test results in FILE ! --help print this message ! --no-create do not create output files ! --quiet, --silent do not print \`checking...' messages ! --site-file=FILE use FILE as the site file ! --version print the version of autoconf that created configure ! Directory and file names: ! --prefix=PREFIX install architecture-independent files in PREFIX ! [$ac_default_prefix] ! --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX ! [same as prefix] ! --bindir=DIR user executables in DIR [EPREFIX/bin] ! --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] ! --libexecdir=DIR program executables in DIR [EPREFIX/libexec] ! --datadir=DIR read-only architecture-independent data in DIR ! [PREFIX/share] ! --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] ! --sharedstatedir=DIR modifiable architecture-independent data in DIR ! [PREFIX/com] ! --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] ! --libdir=DIR object code libraries in DIR [EPREFIX/lib] ! --includedir=DIR C header files in DIR [PREFIX/include] ! --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] ! --infodir=DIR info documentation in DIR [PREFIX/info] ! --mandir=DIR man documentation in DIR [PREFIX/man] ! --srcdir=DIR find the sources in DIR [configure dir or ..] ! --program-prefix=PREFIX prepend PREFIX to installed program names ! --program-suffix=SUFFIX append SUFFIX to installed program names ! --program-transform-name=PROGRAM ! run sed PROGRAM on installed program names ! EOF ! cat << EOF ! Host type: ! --build=BUILD configure for building on BUILD [BUILD=HOST] ! --host=HOST configure for HOST [guessed] ! --target=TARGET configure for TARGET [TARGET=HOST] ! Features and packages: ! --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) ! --enable-FEATURE[=ARG] include FEATURE [ARG=yes] ! --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] ! --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) ! --x-includes=DIR X include files are in DIR ! --x-libraries=DIR X library files are in DIR ! EOF ! if test -n "$ac_help"; then ! echo "--enable and --with options recognized:$ac_help" ! fi ! exit 0 ;; -host | --host | --hos | --ho) ! ac_prev=host ;; -host=* | --host=* | --hos=* | --ho=*) ! host="$ac_optarg" ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) ! includedir="$ac_optarg" ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) ! infodir="$ac_optarg" ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) ! libdir="$ac_optarg" ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) ! libexecdir="$ac_optarg" ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ --- 420,466 ---- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) ! exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; ! -help | --help | --hel | --he | -h) ! ac_init_help=long ;; ! -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ! ac_init_help=recursive ;; ! -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ! ac_init_help=short ;; -host | --host | --hos | --ho) ! ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) ! host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) ! includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) ! infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) ! libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) ! libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ *************** EOF *** 229,247 **** -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) ! localstatedir="$ac_optarg" ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) ! mandir="$ac_optarg" ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ ! | --no-cr | --no-c) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ --- 469,487 ---- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) ! localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) ! mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ ! | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ *************** EOF *** 255,280 **** -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) ! oldincludedir="$ac_optarg" ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ! prefix="$ac_optarg" ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) ! program_prefix="$ac_optarg" ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) ! program_suffix="$ac_optarg" ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ --- 495,520 ---- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) ! oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ! prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) ! program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) ! program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ *************** EOF *** 291,297 **** | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) ! program_transform_name="$ac_optarg" ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) --- 531,537 ---- | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) ! program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) *************** EOF *** 301,307 **** ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) ! sbindir="$ac_optarg" ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ --- 541,547 ---- ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) ! sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ *************** EOF *** 312,374 **** | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) ! sharedstatedir="$ac_optarg" ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) ! site="$ac_optarg" ;; ! ! -site-file | --site-file | --site-fil | --site-fi | --site-f) ! ac_prev=sitefile ;; ! -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) ! sitefile="$ac_optarg" ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ! srcdir="$ac_optarg" ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) ! sysconfdir="$ac_optarg" ;; -target | --target | --targe | --targ | --tar | --ta | --t) ! ac_prev=target ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) ! target="$ac_optarg" ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; ! -version | --version | --versio | --versi | --vers) ! echo "configure generated by autoconf version 2.13" ! exit 0 ;; -with-* | --with-*) ! ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. ! if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then ! { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } ! fi ac_package=`echo $ac_package| sed 's/-/_/g'` ! case "$ac_option" in ! *=*) ;; *) ac_optarg=yes ;; esac ! eval "with_${ac_package}='$ac_optarg'" ;; -without-* | --without-*) ! ac_package=`echo $ac_option|sed -e 's/-*without-//'` # Reject names that are not valid shell variable names. ! if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then ! { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } ! fi ! ac_package=`echo $ac_package| sed 's/-/_/g'` ! eval "with_${ac_package}=no" ;; --x) # Obsolete; use --with-x. --- 552,608 ---- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) ! sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) ! site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ! srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) ! sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ! ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) ! target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; ! -version | --version | --versio | --versi | --vers | -V) ! ac_init_version=: ;; -with-* | --with-*) ! ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. ! expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && ! { echo "$as_me: error: invalid package name: $ac_package" >&2 ! { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` ! case $ac_option in ! *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac ! eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ! ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. ! expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && ! { echo "$as_me: error: invalid package name: $ac_package" >&2 ! { (exit 1); exit 1; }; } ! ac_package=`echo $ac_package | sed 's/-/_/g'` ! eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. *************** EOF *** 379,477 **** ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) ! x_includes="$ac_optarg" ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) ! x_libraries="$ac_optarg" ;; ! -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ;; *) ! if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then ! echo "configure: warning: $ac_option: invalid host type" 1>&2 ! fi ! if test "x$nonopt" != xNONE; then ! { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ! fi ! nonopt="$ac_option" ;; esac done if test -n "$ac_prev"; then ! { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } ! fi ! ! trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 ! ! # File descriptor usage: ! # 0 standard input ! # 1 file creation ! # 2 errors and warnings ! # 3 some systems may open it to /dev/tty ! # 4 used on the Kubota Titan ! # 6 checking for... messages and results ! # 5 compiler messages saved in config.log ! if test "$silent" = yes; then ! exec 6>/dev/null ! else ! exec 6>&1 fi - exec 5>./config.log ! echo "\ ! This file contains any messages produced by compilers while ! running configure, to aid debugging if configure makes a mistake. ! " 1>&5 ! # Strip out --no-create and --no-recursion so they do not pile up. ! # Also quote any args containing shell metacharacters. ! ac_configure_args= ! for ac_arg do ! case "$ac_arg" in ! -no-create | --no-create | --no-creat | --no-crea | --no-cre \ ! | --no-cr | --no-c) ;; ! -no-recursion | --no-recursion | --no-recursio | --no-recursi \ ! | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; ! *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ! ac_configure_args="$ac_configure_args '$ac_arg'" ;; ! *) ac_configure_args="$ac_configure_args $ac_arg" ;; esac done ! # NLS nuisances. ! # Only set these to C if already set. These must not be set unconditionally ! # because not all systems understand e.g. LANG=C (notably SCO). ! # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! ! # Non-C LC_CTYPE values break the ctype check. ! if test "${LANG+set}" = set; then LANG=C; export LANG; fi ! if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi ! if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi ! if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi ! # confdefs.h avoids OS command line length limits that DEFS can exceed. ! rm -rf conftest* confdefs.h ! # AIX cpp loses on an empty file, so make sure it contains at least a newline. ! echo > confdefs.h - # A filename unique to this package, relative to the directory that - # configure is in, which we can look for to find out if srcdir is correct. - ac_unique_file=jartool.h # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ! ac_prog=$0 ! ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` ! test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. --- 613,722 ---- ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) ! x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) ! x_libraries=$ac_optarg ;; ! -*) { echo "$as_me: error: unrecognized option: $ac_option ! Try \`$0 --help' for more information." >&2 ! { (exit 1); exit 1; }; } ;; + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + *) ! # FIXME: should be removed in autoconf 3.0. ! echo "$as_me: WARNING: you should use --build, --host, --target" >&2 ! expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && ! echo "$as_me: WARNING: invalid host type: $ac_option" >&2 ! : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ! ac_option=--`echo $ac_prev | sed 's/_/-/g'` ! { echo "$as_me: error: missing argument to $ac_option" >&2 ! { (exit 1); exit 1; }; } fi ! # Be sure to have absolute paths. ! for ac_var in exec_prefix prefix ! do ! eval ac_val=$`echo $ac_var` ! case $ac_val in ! [\\/$]* | ?:[\\/]* | NONE | '' ) ;; ! *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 ! { (exit 1); exit 1; }; };; ! esac ! done ! # Be sure to have absolute paths. ! for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ ! localstatedir libdir includedir oldincludedir infodir mandir do ! eval ac_val=$`echo $ac_var` ! case $ac_val in ! [\\/$]* | ?:[\\/]* ) ;; ! *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 ! { (exit 1); exit 1; }; };; esac done ! # There might be people who depend on the old broken behavior: `$host' ! # used to hold the argument of --host etc. ! # FIXME: To remove some day. ! build=$build_alias ! host=$host_alias ! target=$target_alias ! # FIXME: To remove some day. ! if test "x$host_alias" != x; then ! if test "x$build_alias" = x; then ! cross_compiling=maybe ! echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. ! If a cross compiler is detected then cross compile mode will be used." >&2 ! elif test "x$build_alias" != "x$host_alias"; then ! cross_compiling=yes ! fi ! fi ! ! ac_tool_prefix= ! test -n "$host_alias" && ac_tool_prefix=$host_alias- ! ! test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ! ac_confdir=`(dirname "$0") 2>/dev/null || ! $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X"$0" : 'X\(//\)[^/]' \| \ ! X"$0" : 'X\(//\)$' \| \ ! X"$0" : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X"$0" | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. *************** else *** 481,542 **** fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then ! { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } else ! { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } fi fi ! srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` ! # Prefer explicitly selected file to automatically selected ones. ! if test -z "$sitefile"; then ! if test -z "$CONFIG_SITE"; then ! if test "x$prefix" != xNONE; then ! CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else ! CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi - else - CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then ! echo "loading site script $ac_site_file" . "$ac_site_file" fi done if test -r "$cache_file"; then ! echo "loading cache $cache_file" ! . $cache_file else ! echo "creating cache $cache_file" ! > $cache_file fi ac_ext=c - # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ! ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ! cross_compiling=$ac_cv_prog_cc_cross - ac_exeext= - ac_objext=o - if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' - ' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi - else - ac_n= ac_c='\c' ac_t= - fi ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then --- 726,1279 ---- fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then ! { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 ! { (exit 1); exit 1; }; } else ! { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 ! { (exit 1); exit 1; }; } fi fi ! (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || ! { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 ! { (exit 1); exit 1; }; } ! srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ! ac_env_build_alias_set=${build_alias+set} ! ac_env_build_alias_value=$build_alias ! ac_cv_env_build_alias_set=${build_alias+set} ! ac_cv_env_build_alias_value=$build_alias ! ac_env_host_alias_set=${host_alias+set} ! ac_env_host_alias_value=$host_alias ! ac_cv_env_host_alias_set=${host_alias+set} ! ac_cv_env_host_alias_value=$host_alias ! ac_env_target_alias_set=${target_alias+set} ! ac_env_target_alias_value=$target_alias ! ac_cv_env_target_alias_set=${target_alias+set} ! ac_cv_env_target_alias_value=$target_alias ! ac_env_CC_set=${CC+set} ! ac_env_CC_value=$CC ! ac_cv_env_CC_set=${CC+set} ! ac_cv_env_CC_value=$CC ! ac_env_CFLAGS_set=${CFLAGS+set} ! ac_env_CFLAGS_value=$CFLAGS ! ac_cv_env_CFLAGS_set=${CFLAGS+set} ! ac_cv_env_CFLAGS_value=$CFLAGS ! ac_env_LDFLAGS_set=${LDFLAGS+set} ! ac_env_LDFLAGS_value=$LDFLAGS ! ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ! ac_cv_env_LDFLAGS_value=$LDFLAGS ! ac_env_CPPFLAGS_set=${CPPFLAGS+set} ! ac_env_CPPFLAGS_value=$CPPFLAGS ! ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ! ac_cv_env_CPPFLAGS_value=$CPPFLAGS ! ac_env_CPP_set=${CPP+set} ! ac_env_CPP_value=$CPP ! ac_cv_env_CPP_set=${CPP+set} ! ac_cv_env_CPP_value=$CPP ! # ! # Report the --help message. ! # ! if test "$ac_init_help" = "long"; then ! # Omit some internal or obsolete options to make the list less imposing. ! # This message is too long to be a string in the A/UX 3.1 sh. ! cat <<_ACEOF ! \`configure' configures this package to adapt to many kinds of systems. ! ! Usage: $0 [OPTION]... [VAR=VALUE]... ! ! To assign environment variables (e.g., CC, CFLAGS...), specify them as ! VAR=VALUE. See below for descriptions of some of the useful variables. ! ! Defaults for the options are specified in brackets. ! ! Configuration: ! -h, --help display this help and exit ! --help=short display options specific to this package ! --help=recursive display the short help of all the included packages ! -V, --version display version information and exit ! -q, --quiet, --silent do not print \`checking...' messages ! --cache-file=FILE cache test results in FILE [disabled] ! -C, --config-cache alias for \`--cache-file=config.cache' ! -n, --no-create do not create output files ! --srcdir=DIR find the sources in DIR [configure dir or \`..'] ! ! _ACEOF ! ! cat <<_ACEOF ! Installation directories: ! --prefix=PREFIX install architecture-independent files in PREFIX ! [$ac_default_prefix] ! --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX ! [PREFIX] ! ! By default, \`make install' will install all the files in ! \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify ! an installation prefix other than \`$ac_default_prefix' using \`--prefix', ! for instance \`--prefix=\$HOME'. ! ! For better control, use the options below. ! ! Fine tuning of the installation directories: ! --bindir=DIR user executables [EPREFIX/bin] ! --sbindir=DIR system admin executables [EPREFIX/sbin] ! --libexecdir=DIR program executables [EPREFIX/libexec] ! --datadir=DIR read-only architecture-independent data [PREFIX/share] ! --sysconfdir=DIR read-only single-machine data [PREFIX/etc] ! --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] ! --localstatedir=DIR modifiable single-machine data [PREFIX/var] ! --libdir=DIR object code libraries [EPREFIX/lib] ! --includedir=DIR C header files [PREFIX/include] ! --oldincludedir=DIR C header files for non-gcc [/usr/include] ! --infodir=DIR info documentation [PREFIX/info] ! --mandir=DIR man documentation [PREFIX/man] ! _ACEOF ! ! cat <<\_ACEOF ! ! Program names: ! --program-prefix=PREFIX prepend PREFIX to installed program names ! --program-suffix=SUFFIX append SUFFIX to installed program names ! --program-transform-name=PROGRAM run sed PROGRAM on installed program names ! _ACEOF ! fi ! ! if test -n "$ac_init_help"; then ! ! cat <<\_ACEOF ! ! Optional Features: ! --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) ! --enable-FEATURE[=ARG] include FEATURE [ARG=yes] ! --disable-dependency-tracking Speeds up one-time builds ! --enable-dependency-tracking Do not reject slow dependency extractors ! --enable-maintainer-mode enable make rules and dependencies not useful ! (and sometimes confusing) to the casual installer ! --enable-generated-files-in-srcdir ! put copies of generated files in source dir ! intended for creating source tarballs for users ! without texinfo, perl, bison or flex. ! ! Optional Packages: ! --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] ! --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) ! --with-system-zlib use installed libz ! ! Some influential environment variables: ! CC C compiler command ! CFLAGS C compiler flags ! LDFLAGS linker flags, e.g. -L if you have libraries in a ! nonstandard directory ! CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have ! headers in a nonstandard directory ! CPP C preprocessor ! ! Use these variables to override the choices made by `configure' or to help ! it to find libraries and programs with nonstandard names/locations. ! ! _ACEOF ! fi ! ! if test "$ac_init_help" = "recursive"; then ! # If there are subdirs, report their specific --help. ! ac_popdir=`pwd` ! for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue ! test -d $ac_dir || continue ! ac_builddir=. ! ! if test "$ac_dir" != .; then ! ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` ! # A "../" for each directory in $ac_dir_suffix. ! ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` ! else ! ac_dir_suffix= ac_top_builddir= ! fi ! ! case $srcdir in ! .) # No --srcdir option. We are building in place. ! ac_srcdir=. ! if test -z "$ac_top_builddir"; then ! ac_top_srcdir=. else ! ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` ! fi ;; ! [\\/]* | ?:[\\/]* ) # Absolute path. ! ac_srcdir=$srcdir$ac_dir_suffix; ! ac_top_srcdir=$srcdir ;; ! *) # Relative path. ! ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ! ac_top_srcdir=$ac_top_builddir$srcdir ;; ! esac ! # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be ! # absolute. ! ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ! ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ! ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ! ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` ! ! cd $ac_dir ! # Check for guested configure; otherwise get Cygnus style configure. ! if test -f $ac_srcdir/configure.gnu; then ! echo ! $SHELL $ac_srcdir/configure.gnu --help=recursive ! elif test -f $ac_srcdir/configure; then ! echo ! $SHELL $ac_srcdir/configure --help=recursive ! elif test -f $ac_srcdir/configure.ac || ! test -f $ac_srcdir/configure.in; then ! echo ! $ac_configure --help ! else ! echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi + cd $ac_popdir + done + fi + + test -n "$ac_init_help" && exit 0 + if $ac_init_version; then + cat <<\_ACEOF + + Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 + Free Software Foundation, Inc. + This configure script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it. + _ACEOF + exit 0 + fi + exec 5>config.log + cat >&5 <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + + It was created by $as_me, which was + generated by GNU Autoconf 2.57. Invocation command line was + + $ $0 $@ + + _ACEOF + { + cat <<_ASUNAME + ## --------- ## + ## Platform. ## + ## --------- ## + + hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` + uname -m = `(uname -m) 2>/dev/null || echo unknown` + uname -r = `(uname -r) 2>/dev/null || echo unknown` + uname -s = `(uname -s) 2>/dev/null || echo unknown` + uname -v = `(uname -v) 2>/dev/null || echo unknown` + + /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` + /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + + /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` + /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` + /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` + hostinfo = `(hostinfo) 2>/dev/null || echo unknown` + /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` + /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` + /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + + _ASUNAME + + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" + done + + } >&5 + + cat >&5 <<_ACEOF + + + ## ----------- ## + ## Core tests. ## + ## ----------- ## + + _ACEOF + + + # Keep a trace of the command line. + # Strip out --no-create and --no-recursion so they do not pile up. + # Strip out --silent because we don't want to record it for future runs. + # Also quote any args containing shell meta-characters. + # Make two passes to allow for proper duplicate-argument suppression. + ac_configure_args= + ac_configure_args0= + ac_configure_args1= + ac_sep= + ac_must_keep_next=false + for ac_pass in 1 2 + do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " + ;; + esac + done + done + $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } + $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + + # When interrupted or exit'd, cleanup temporary files, and complete + # config.log. We remove comments because anyway the quotes in there + # would cause problems or look ugly. + # WARNING: Be sure not to use single quotes in there, as some shells, + # such as our DU 5.0 friend, will then `close' the trap. + trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX + ## ---------------- ## + ## Cache variables. ## + ## ---------------- ## + _ASBOX + echo + # The following way of writing the cache mishandles newlines in values, + { + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; + } + echo + + cat <<\_ASBOX + ## ----------------- ## + ## Output variables. ## + ## ----------------- ## + _ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX + ## ------------- ## + ## Output files. ## + ## ------------- ## + _ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX + ## ----------- ## + ## confdefs.h. ## + ## ----------- ## + _ASBOX + echo + sed "/^$/d" confdefs.h | sort + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core core.* *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status + ' 0 + for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal + done + ac_signal=0 + + # confdefs.h avoids OS command line length limits that DEFS can exceed. + rm -rf conftest* confdefs.h + # AIX cpp loses on an empty file, so make sure it contains at least a newline. + echo >confdefs.h + + # Predefined preprocessor variables. + + cat >>confdefs.h <<_ACEOF + #define PACKAGE_NAME "$PACKAGE_NAME" + _ACEOF + + + cat >>confdefs.h <<_ACEOF + #define PACKAGE_TARNAME "$PACKAGE_TARNAME" + _ACEOF + + + cat >>confdefs.h <<_ACEOF + #define PACKAGE_VERSION "$PACKAGE_VERSION" + _ACEOF + + + cat >>confdefs.h <<_ACEOF + #define PACKAGE_STRING "$PACKAGE_STRING" + _ACEOF + + + cat >>confdefs.h <<_ACEOF + #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" + _ACEOF + + + # Let the site file select an alternate cache file if it wants to. + # Prefer explicitly selected file to automatically selected ones. + if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then ! { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 ! echo "$as_me: loading site script $ac_site_file" >&6;} ! sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then ! # Some versions of bash will fail to source /dev/null (special ! # files actually), so we avoid doing that. ! if test -f "$cache_file"; then ! { echo "$as_me:$LINENO: loading cache $cache_file" >&5 ! echo "$as_me: loading cache $cache_file" >&6;} ! case $cache_file in ! [\\/]* | ?:[\\/]* ) . $cache_file;; ! *) . ./$cache_file;; ! esac ! fi else ! { echo "$as_me:$LINENO: creating cache $cache_file" >&5 ! echo "$as_me: creating cache $cache_file" >&6;} ! >$cache_file ! fi ! ! # Check that the precious variables saved in the cache have kept the same ! # value. ! ac_cache_corrupted=false ! for ac_var in `(set) 2>&1 | ! sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do ! eval ac_old_set=\$ac_cv_env_${ac_var}_set ! eval ac_new_set=\$ac_env_${ac_var}_set ! eval ac_old_val="\$ac_cv_env_${ac_var}_value" ! eval ac_new_val="\$ac_env_${ac_var}_value" ! case $ac_old_set,$ac_new_set in ! set,) ! { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 ! echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ! ac_cache_corrupted=: ;; ! ,set) ! { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 ! echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ! ac_cache_corrupted=: ;; ! ,);; ! *) ! if test "x$ac_old_val" != "x$ac_new_val"; then ! { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 ! echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ! { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 ! echo "$as_me: former value: $ac_old_val" >&2;} ! { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 ! echo "$as_me: current value: $ac_new_val" >&2;} ! ac_cache_corrupted=: ! fi;; ! esac ! # Pass precious variables to config.status. ! if test "$ac_new_set" = set; then ! case $ac_new_val in ! *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ! ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; ! *) ac_arg=$ac_var=$ac_new_val ;; ! esac ! case " $ac_configure_args " in ! *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. ! *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; ! esac ! fi ! done ! if $ac_cache_corrupted; then ! { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 ! echo "$as_me: error: changes in the environment can compromise the build" >&2;} ! { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 ! echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} ! { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ! ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ! ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_c_compiler_gnu ! ! ! ! ! ! ! + + + + + + + + + + am__api_version="1.7" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then *************** for ac_dir in $srcdir $srcdir/.. $srcdir *** 547,560 **** ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break fi done if test -z "$ac_aux_dir"; then ! { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } fi ! ac_config_guess=$ac_aux_dir/config.guess ! ac_config_sub=$ac_aux_dir/config.sub ! ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or --- 1284,1303 ---- ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break fi done if test -z "$ac_aux_dir"; then ! { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 ! echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} ! { (exit 1); exit 1; }; } fi ! ac_config_guess="$SHELL $ac_aux_dir/config.guess" ! ac_config_sub="$SHELL $ac_aux_dir/config.sub" ! ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or *************** ac_configure=$ac_aux_dir/configure # Thi *** 563,1006 **** # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. ! echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:572: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then ! if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" ! for ac_dir in $PATH; do ! # Account for people who put trailing slashes in PATH elements. ! case "$ac_dir/" in ! /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; ! *) ! # OSF1 and SCO ODT 3.0 have their own names for install. ! # Don't use installbsd from OSF since it installs stuff as root ! # by default. ! for ac_prog in ginstall scoinst install; do ! if test -f $ac_dir/$ac_prog; then ! if test $ac_prog = install && ! grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then ! # AIX install. It has an incompatible calling convention. ! : ! else ! ac_cv_path_install="$ac_dir/$ac_prog -c" ! break 2 ! fi ! fi done ! ;; ! esac ! done ! IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then ! INSTALL="$ac_cv_path_install" else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. ! INSTALL="$ac_install_sh" fi fi ! echo "$ac_t""$INSTALL" 1>&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' ! test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ! echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 ! echo "configure:625: checking whether build environment is sane" >&5 # Just in case sleep 1 ! echo timestamp > conftestfile # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( ! set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` if test "$*" = "X"; then # -L didn't work. ! set X `ls -t $srcdir/configure conftestfile` fi ! if test "$*" != "X $srcdir/configure conftestfile" \ ! && test "$*" != "X conftestfile $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". ! { echo "configure: error: ls -t appears to fail. Make sure there is not a broken ! alias in your environment" 1>&2; exit 1; } fi ! test "$2" = conftestfile ) then # Ok. : else ! { echo "configure: error: newly created file is older than distributed files! ! Check your system clock" 1>&2; exit 1; } ! fi ! rm -f conftest* ! echo "$ac_t""yes" 1>&6 ! if test "$program_transform_name" = s,x,x,; then ! program_transform_name= ! else ! # Double any \ or $. echo might interpret backslashes. ! cat <<\EOF_SED > conftestsed ! s,\\,\\\\,g; s,\$,$$,g ! EOF_SED ! program_transform_name="`echo $program_transform_name|sed -f conftestsed`" ! rm -f conftestsed fi test "$program_prefix" != NONE && ! program_transform_name="s,^,${program_prefix},; $program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && ! program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" - # sed with no file args requires a program. - test "$program_transform_name" = "" && program_transform_name="s,x,x," ! echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:682: checking whether ${MAKE-make} sets \${MAKE}" >&5 ! set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` ! if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftestmake <<\EOF all: ! @echo 'ac_maketemp="${MAKE}"' ! EOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. ! eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi ! rm -f conftestmake fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then ! echo "$ac_t""yes" 1>&6 SET_MAKE= else ! echo "$ac_t""no" 1>&6 SET_MAKE="MAKE=${MAKE-make}" fi ! PACKAGE=fastjar ! ! VERSION=0.92-gcc ! if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then ! { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } fi ! cat >> confdefs.h <> confdefs.h <&6 ! echo "configure:728: checking for working aclocal" >&5 ! # Run test in a subshell; some versions of sh will print an error if ! # an executable is not found, even if stderr is redirected. ! # Redirect stdin to placate older versions of autoconf. Sigh. ! if (aclocal --version) < /dev/null > /dev/null 2>&1; then ! ACLOCAL=aclocal ! echo "$ac_t""found" 1>&6 else ! ACLOCAL="$missing_dir/missing aclocal" ! echo "$ac_t""missing" 1>&6 ! fi ! echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 ! echo "configure:741: checking for working autoconf" >&5 ! # Run test in a subshell; some versions of sh will print an error if ! # an executable is not found, even if stderr is redirected. ! # Redirect stdin to placate older versions of autoconf. Sigh. ! if (autoconf --version) < /dev/null > /dev/null 2>&1; then ! AUTOCONF=autoconf ! echo "$ac_t""found" 1>&6 else ! AUTOCONF="$missing_dir/missing autoconf" ! echo "$ac_t""missing" 1>&6 fi - echo $ac_n "checking for working automake""... $ac_c" 1>&6 - echo "configure:754: checking for working automake" >&5 - # Run test in a subshell; some versions of sh will print an error if - # an executable is not found, even if stderr is redirected. - # Redirect stdin to placate older versions of autoconf. Sigh. - if (automake --version) < /dev/null > /dev/null 2>&1; then - AUTOMAKE=automake - echo "$ac_t""found" 1>&6 - else - AUTOMAKE="$missing_dir/missing automake" - echo "$ac_t""missing" 1>&6 fi ! echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 ! echo "configure:767: checking for working autoheader" >&5 ! # Run test in a subshell; some versions of sh will print an error if ! # an executable is not found, even if stderr is redirected. ! # Redirect stdin to placate older versions of autoconf. Sigh. ! if (autoheader --version) < /dev/null > /dev/null 2>&1; then ! AUTOHEADER=autoheader ! echo "$ac_t""found" 1>&6 else ! AUTOHEADER="$missing_dir/missing autoheader" ! echo "$ac_t""missing" 1>&6 fi ! echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 ! echo "configure:780: checking for working makeinfo" >&5 ! # Run test in a subshell; some versions of sh will print an error if ! # an executable is not found, even if stderr is redirected. ! # Redirect stdin to placate older versions of autoconf. Sigh. ! if (makeinfo --version) < /dev/null > /dev/null 2>&1; then ! MAKEINFO=makeinfo ! echo "$ac_t""found" 1>&6 else ! MAKEINFO="$missing_dir/missing makeinfo" ! echo "$ac_t""missing" 1>&6 fi ! # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:800: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_CC="gcc" ! break ! fi ! done ! IFS="$ac_save_ifs" fi fi ! CC="$ac_cv_prog_CC" if test -n "$CC"; then ! echo "$ac_t""$CC" 1>&6 else ! echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:830: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ! ac_prog_rejected=yes ! continue ! fi ! ac_cv_prog_CC="cc" ! break ! fi ! done ! IFS="$ac_save_ifs" if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift ! if test $# -gt 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ! set dummy "$ac_dir/$ac_word" "$@" ! shift ! ac_cv_prog_CC="$@" fi fi fi fi ! CC="$ac_cv_prog_CC" if test -n "$CC"; then ! echo "$ac_t""$CC" 1>&6 else ! echo "$ac_t""no" 1>&6 fi ! if test -z "$CC"; then ! case "`uname -s`" in ! *win32* | *WIN32*) ! # Extract the first word of "cl", so it can be a program name with args. ! set dummy cl; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:881: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_CC="cl" ! break ! fi ! done ! IFS="$ac_save_ifs" fi fi ! CC="$ac_cv_prog_CC" if test -n "$CC"; then ! echo "$ac_t""$CC" 1>&6 else ! echo "$ac_t""no" 1>&6 fi ! ;; ! esac fi ! test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi ! echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ! echo "configure:913: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ! ac_ext=c ! # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ! cross_compiling=$ac_cv_prog_cc_cross ! cat > conftest.$ac_ext << EOF - #line 924 "configure" - #include "confdefs.h" ! main(){return(0);} ! EOF ! if { (eval echo configure:929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! ac_cv_prog_cc_works=yes ! # If we can't run a trivial program, we are probably using a cross compiler. ! if (./conftest; exit) 2>/dev/null; then ! ac_cv_prog_cc_cross=no else ! ac_cv_prog_cc_cross=yes fi - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no fi ! rm -fr conftest* ! ac_ext=c ! # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ! cross_compiling=$ac_cv_prog_cc_cross ! echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 ! if test $ac_cv_prog_cc_works = no; then ! { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi - echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 - echo "configure:955: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 - echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 - cross_compiling=$ac_cv_prog_cc_cross ! echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:960: checking whether we are using GNU C" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ! ac_cv_prog_gcc=yes else ! ac_cv_prog_gcc=no fi fi ! echo "$ac_t""$ac_cv_prog_gcc" 1>&6 ! if test $ac_cv_prog_gcc = yes; then ! GCC=yes else ! GCC= fi ! ac_test_CFLAGS="${CFLAGS+set}" ! ac_save_CFLAGS="$CFLAGS" ! CFLAGS= ! echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:988: checking whether ${CC-cc} accepts -g" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! echo 'void f(){}' > conftest.c ! if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ac_cv_prog_cc_g=yes else ! ac_cv_prog_cc_g=no ! fi ! rm -f conftest* fi ! ! echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 if test "$ac_test_CFLAGS" = set; then ! CFLAGS="$ac_save_CFLAGS" elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" --- 1306,2317 ---- # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install + # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. ! echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 ! echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then ! if test "${ac_cv_path_install+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! # Account for people who put trailing slashes in PATH elements. ! case $as_dir/ in ! ./ | .// | /cC/* | \ ! /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ! /usr/ucb/* ) ;; ! *) ! # OSF1 and SCO ODT 3.0 have their own names for install. ! # Don't use installbsd from OSF since it installs stuff as root ! # by default. ! for ac_prog in ginstall scoinst install; do ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then ! if test $ac_prog = install && ! grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then ! # AIX install. It has an incompatible calling convention. ! : ! elif test $ac_prog = install && ! grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then ! # program-specific install script used by HP pwplus--don't use. ! : ! else ! ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" ! break 3 ! fi ! fi done ! done ! ;; ! esac ! done ! fi if test "${ac_cv_path_install+set}" = set; then ! INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. ! INSTALL=$ac_install_sh fi fi ! echo "$as_me:$LINENO: result: $INSTALL" >&5 ! echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' ! test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ! echo "$as_me:$LINENO: checking whether build environment is sane" >&5 ! echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 ! echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( ! set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. ! set X `ls -t $srcdir/configure conftest.file` fi ! rm -f conftest.file ! if test "$*" != "X $srcdir/configure conftest.file" \ ! && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". ! { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken ! alias in your environment" >&5 ! echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken ! alias in your environment" >&2;} ! { (exit 1); exit 1; }; } fi ! test "$2" = conftest.file ) then # Ok. : else ! { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! ! Check your system clock" >&5 ! echo "$as_me: error: newly created file is older than distributed files! ! Check your system clock" >&2;} ! { (exit 1); exit 1; }; } fi + echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6 test "$program_prefix" != NONE && ! program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && ! program_transform_name="s,\$,$program_suffix,;$program_transform_name" ! # Double any \ or $. echo might interpret backslashes. ! # By default was `s,x,x', remove it if useless. ! cat <<\_ACEOF >conftest.sed ! s/[\\$]/&&/g;s/;s,x,x,$// ! _ACEOF ! program_transform_name=`echo $program_transform_name | sed -f conftest.sed` ! rm conftest.sed ! # expand $ac_aux_dir to an absolute path ! am_aux_dir=`cd $ac_aux_dir && pwd` ! ! test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" ! # Use eval to expand $SHELL ! if eval "$MISSING --run true"; then ! am_missing_run="$MISSING --run " else ! am_missing_run= ! { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 ! echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} ! fi ! ! for ac_prog in gawk mawk nawk awk ! do ! # Extract the first word of "$ac_prog", so it can be a program name with args. ! set dummy $ac_prog; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_AWK+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if test -n "$AWK"; then ! ac_cv_prog_AWK="$AWK" # Let the user override the test. ! else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_AWK="$ac_prog" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! ! fi ! fi ! AWK=$ac_cv_prog_AWK ! if test -n "$AWK"; then ! echo "$as_me:$LINENO: result: $AWK" >&5 ! echo "${ECHO_T}$AWK" >&6 ! else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! fi ! ! test -n "$AWK" && break ! done ! ! echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 ! echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 ! set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` ! if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.make <<\_ACEOF all: ! @echo 'ac_maketemp="$(MAKE)"' ! _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. ! eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi ! rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then ! echo "$as_me:$LINENO: result: yes" >&5 ! echo "${ECHO_T}yes" >&6 SET_MAKE= else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi + rm -rf .tst 2>/dev/null + mkdir .tst 2>/dev/null + if test -d .tst; then + am__leading_dot=. + else + am__leading_dot=_ + fi + rmdir .tst 2>/dev/null ! # test to see if srcdir already configured ! if test "`cd $srcdir && pwd`" != "`pwd`" && ! test -f $srcdir/config.status; then ! { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 ! echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} ! { (exit 1); exit 1; }; } ! fi ! # test whether we have cygpath ! if test -z "$CYGPATH_W"; then ! if (cygpath --version) >/dev/null 2>/dev/null; then ! CYGPATH_W='cygpath -w' ! else ! CYGPATH_W=echo ! fi fi ! ! ! # Define the identity of the package. ! PACKAGE=fastjar ! VERSION=0.92-gcc ! ! ! cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" ! _ACEOF ! ! cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" ! _ACEOF + # Some tools Automake needs. + ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} ! ! AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} ! ! ! AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} ! ! ! AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} ! ! ! MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} ! ! ! AMTAR=${AMTAR-"${am_missing_run}tar"} ! ! install_sh=${install_sh-"$am_aux_dir/install-sh"} ! ! # Installed binaries are usually stripped using `strip' when the user ! # run `make install-strip'. However `strip' might not be the right ! # tool to use in cross-compilation environments, therefore Automake ! # will honor the `STRIP' environment variable to overrule this program. ! if test "$cross_compiling" != no; then ! if test -n "$ac_tool_prefix"; then ! # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. ! set dummy ${ac_tool_prefix}strip; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_STRIP+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! if test -n "$STRIP"; then ! ac_cv_prog_STRIP="$STRIP" # Let the user override the test. ! else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_STRIP="${ac_tool_prefix}strip" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! fi ! fi ! STRIP=$ac_cv_prog_STRIP ! if test -n "$STRIP"; then ! echo "$as_me:$LINENO: result: $STRIP" >&5 ! echo "${ECHO_T}$STRIP" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi fi + if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. + set dummy strip; ac_word=$2 + echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 + if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ! test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" ! fi ! fi ! ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP ! if test -n "$ac_ct_STRIP"; then ! echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 ! echo "${ECHO_T}$ac_ct_STRIP" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi ! STRIP=$ac_ct_STRIP else ! STRIP="$ac_cv_prog_STRIP" fi + fi + INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" + # We need awk for the "check" target. The system "awk" is bad on + # some platforms. + ac_config_headers="$ac_config_headers config.h" ! ! ac_ext=c ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ! ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_c_compiler_gnu ! if test -n "$ac_tool_prefix"; then ! # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. ! set dummy ${ac_tool_prefix}gcc; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_CC+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if test -n "$CC"; then ! ac_cv_prog_CC="$CC" # Let the user override the test. ! else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_CC="${ac_tool_prefix}gcc" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! ! fi ! fi ! CC=$ac_cv_prog_CC ! if test -n "$CC"; then ! echo "$as_me:$LINENO: result: $CC" >&5 ! echo "${ECHO_T}$CC" >&6 ! else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! fi ! ! fi ! if test -z "$ac_cv_prog_CC"; then ! ac_ct_CC=$CC ! # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_ac_ct_CC+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if test -n "$ac_ct_CC"; then ! ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. ! else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_ac_ct_CC="gcc" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! ! fi ! fi ! ac_ct_CC=$ac_cv_prog_ac_ct_CC ! if test -n "$ac_ct_CC"; then ! echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 ! echo "${ECHO_T}$ac_ct_CC" >&6 ! else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! fi ! ! CC=$ac_ct_CC ! else ! CC="$ac_cv_prog_CC" ! fi ! ! if test -z "$CC"; then ! if test -n "$ac_tool_prefix"; then ! # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. ! set dummy ${ac_tool_prefix}cc; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_CC+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_CC="${ac_tool_prefix}cc" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! fi fi ! CC=$ac_cv_prog_CC if test -n "$CC"; then ! echo "$as_me:$LINENO: result: $CC" >&5 ! echo "${ECHO_T}$CC" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! fi ! fi + if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. + set dummy cc; ac_word=$2 + echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 + if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + fi + fi + ac_ct_CC=$ac_cv_prog_ac_ct_CC + if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 + echo "${ECHO_T}$ac_ct_CC" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + fi + + CC=$ac_ct_CC + else + CC="$ac_cv_prog_CC" + fi + + fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_CC+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ! ac_prog_rejected=yes ! continue ! fi ! ac_cv_prog_CC="cc" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift ! if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ! ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi ! CC=$ac_cv_prog_CC if test -n "$CC"; then ! echo "$as_me:$LINENO: result: $CC" >&5 ! echo "${ECHO_T}$CC" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi ! fi ! if test -z "$CC"; then ! if test -n "$ac_tool_prefix"; then ! for ac_prog in cl ! do ! # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ! set dummy $ac_tool_prefix$ac_prog; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_CC+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_CC="$ac_tool_prefix$ac_prog" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! fi fi ! CC=$ac_cv_prog_CC if test -n "$CC"; then ! echo "$as_me:$LINENO: result: $CC" >&5 ! echo "${ECHO_T}$CC" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi ! ! test -n "$CC" && break ! done ! fi ! if test -z "$CC"; then ! ac_ct_CC=$CC ! for ac_prog in cl ! do ! # Extract the first word of "$ac_prog", so it can be a program name with args. ! set dummy $ac_prog; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_ac_ct_CC+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if test -n "$ac_ct_CC"; then ! ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. ! else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_ac_ct_CC="$ac_prog" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 fi ! done ! done ! ! fi ! fi ! ac_ct_CC=$ac_cv_prog_ac_ct_CC ! if test -n "$ac_ct_CC"; then ! echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 ! echo "${ECHO_T}$ac_ct_CC" >&6 ! else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi ! test -n "$ac_ct_CC" && break ! done ! CC=$ac_ct_CC ! fi ! fi ! test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH ! See \`config.log' for more details." >&5 ! echo "$as_me: error: no acceptable C compiler found in \$PATH ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } ! ! # Provide some information about the compiler. ! echo "$as_me:$LINENO:" \ ! "checking for C compiler version" >&5 ! ac_compiler=`set X $ac_compile; echo $2` ! { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 ! (eval $ac_compiler --version &5) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } ! { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 ! (eval $ac_compiler -v &5) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } ! { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 ! (eval $ac_compiler -V &5) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } ! ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! int ! main () ! { ! ! ; ! return 0; ! } ! _ACEOF ! ac_clean_files_save=$ac_clean_files ! ac_clean_files="$ac_clean_files a.out a.exe b.out" ! # Try to create an executable without -o first, disregard a.out. ! # It will help us diagnose broken compilers, and finding out an intuition ! # of exeext. ! echo "$as_me:$LINENO: checking for C compiler default output" >&5 ! echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ! ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` ! if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 ! (eval $ac_link_default) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; then ! # Find the output, starting from the most likely. This scheme is ! # not robust to junk in `.', hence go to wildcards (a.*) only as a last ! # resort. ! ! # Be careful to initialize this variable, since it used to be cached. ! # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ! ac_cv_exeext= ! # b.out is created by i960 compilers. ! for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out ! do ! test -f "$ac_file" || continue ! case $ac_file in ! *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ! ;; ! conftest.$ac_ext ) ! # This is the source file. ! ;; ! [ab].out ) ! # We found the default executable, but exeext='' is most ! # certainly right. ! break;; ! *.* ) ! ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` ! # FIXME: I believe we export ac_cv_exeext for Libtool, ! # but it would be cool to find out if it's true. Does anybody ! # maintain Libtool? --akim. ! export ac_cv_exeext ! break;; ! * ) ! break;; ! esac ! done ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! { { echo "$as_me:$LINENO: error: C compiler cannot create executables ! See \`config.log' for more details." >&5 ! echo "$as_me: error: C compiler cannot create executables ! See \`config.log' for more details." >&2;} ! { (exit 77); exit 77; }; } ! fi ! ! ac_exeext=$ac_cv_exeext ! echo "$as_me:$LINENO: result: $ac_file" >&5 ! echo "${ECHO_T}$ac_file" >&6 ! ! # Check the compiler produces executables we can run. If not, either ! # the compiler is broken, or we cross compile. ! echo "$as_me:$LINENO: checking whether the C compiler works" >&5 ! echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 ! # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 ! # If not cross compiling, check that we can run a simple program. ! if test "$cross_compiling" != yes; then ! if { ac_try='./$ac_file' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! cross_compiling=no else ! if test "$cross_compiling" = maybe; then ! cross_compiling=yes ! else ! { { echo "$as_me:$LINENO: error: cannot run C compiled programs. ! If you meant to cross compile, use \`--host'. ! See \`config.log' for more details." >&5 ! echo "$as_me: error: cannot run C compiled programs. ! If you meant to cross compile, use \`--host'. ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } ! fi fi fi ! echo "$as_me:$LINENO: result: yes" >&5 ! echo "${ECHO_T}yes" >&6 ! rm -f a.out a.exe conftest$ac_cv_exeext b.out ! ac_clean_files=$ac_clean_files_save ! # Check the compiler produces executables we can run. If not, either ! # the compiler is broken, or we cross compile. ! echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 ! echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 ! echo "$as_me:$LINENO: result: $cross_compiling" >&5 ! echo "${ECHO_T}$cross_compiling" >&6 ! ! echo "$as_me:$LINENO: checking for suffix of executables" >&5 ! echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; then ! # If both `conftest.exe' and `conftest' are `present' (well, observable) ! # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will ! # work properly (i.e., refer to `conftest.exe'), while it won't with ! # `rm'. ! for ac_file in conftest.exe conftest conftest.*; do ! test -f "$ac_file" || continue ! case $ac_file in ! *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; ! *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` ! export ac_cv_exeext ! break;; ! * ) break;; ! esac ! done ! else ! { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link ! See \`config.log' for more details." >&5 ! echo "$as_me: error: cannot compute suffix of executables: cannot compile and link ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } fi ! rm -f conftest$ac_cv_exeext ! echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 ! echo "${ECHO_T}$ac_cv_exeext" >&6 ! ! rm -f conftest.$ac_ext ! EXEEXT=$ac_cv_exeext ! ac_exeext=$EXEEXT ! echo "$as_me:$LINENO: checking for suffix of object files" >&5 ! echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 ! if test "${ac_cv_objext+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! int ! main () ! { ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.o conftest.obj ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; then ! for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do ! case $ac_file in ! *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; ! *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` ! break;; ! esac ! done else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile ! See \`config.log' for more details." >&5 ! echo "$as_me: error: cannot compute suffix of object files: cannot compile ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } fi + + rm -f conftest.$ac_cv_objext conftest.$ac_ext fi + echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 + echo "${ECHO_T}$ac_cv_objext" >&6 + OBJEXT=$ac_cv_objext + ac_objext=$OBJEXT + echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 + echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 + if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ ! int ! main () ! { ! #ifndef __GNUC__ ! choke me ! #endif ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_compiler_gnu=yes else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_compiler_gnu=no fi + rm -f conftest.$ac_objext conftest.$ac_ext + ac_cv_c_compiler_gnu=$ac_compiler_gnu ! fi ! echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 ! echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 ! GCC=`test $ac_compiler_gnu = yes && echo yes` ! ac_test_CFLAGS=${CFLAGS+set} ! ac_save_CFLAGS=$CFLAGS ! CFLAGS="-g" ! echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 ! echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 ! if test "${ac_cv_prog_cc_g+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! int ! main () ! { ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_prog_cc_g=no fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 ! echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then ! CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" *************** else *** 1014,1019 **** --- 2325,2714 ---- CFLAGS= fi fi + echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 + echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 + if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_cv_prog_cc_stdc=no + ac_save_CC=$CC + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include + #include + #include + #include + /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ + struct buf { int x; }; + FILE * (*rcsopen) (struct buf *, struct stat *, int); + static char *e (p, i) + char **p; + int i; + { + return p[i]; + } + static char *f (char * (*g) (char **, int), char **p, ...) + { + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; + } + int test (int i, double x); + struct s1 {int (*f) (int a);}; + struct s2 {int (*f) (double a);}; + int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); + int argc; + char **argv; + int + main () + { + return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; + } + _ACEOF + # Don't try gcc -ansi; that turns off useful extensions and + # breaks some systems' header files. + # AIX -qlanglvl=ansi + # Ultrix and OSF/1 -std1 + # HP-UX 10.20 and later -Ae + # HP-UX older versions -Aa -D_HPUX_SOURCE + # SVR4 -Xc -D__EXTENSIONS__ + for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" + do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg + break + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + fi + rm -f conftest.$ac_objext + done + rm -f conftest.$ac_ext conftest.$ac_objext + CC=$ac_save_CC + + fi + + case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 + echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 + echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; + esac + + # Some people use a C++ compiler to compile C. Since we use `exit', + # in C++ we need to declare it. In case someone uses the same compiler + # for both compiling C and C++ we need to have the C++ compiler decide + # the declaration of exit, since it's the most demanding environment. + cat >conftest.$ac_ext <<_ACEOF + #ifndef __cplusplus + choke me + #endif + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' + do + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include + $ac_declaration + int + main () + { + exit (42); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + continue + fi + rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + $ac_declaration + int + main () + { + exit (42); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + fi + rm -f conftest.$ac_objext conftest.$ac_ext + done + rm -f conftest* + if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h + fi + + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + fi + rm -f conftest.$ac_objext conftest.$ac_ext + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + DEPDIR="${am__leading_dot}deps" + + ac_config_commands="$ac_config_commands depfiles" + + + am_make=${MAKE-make} + cat > confinc << 'END' + am__doit: + @echo done + .PHONY: am__doit + END + # If we don't find an include directive, just comment out the code. + echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 + echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 + am__include="#" + am__quote= + _am_result=none + # First try GNU make style include. + echo "include confinc" > confmf + # We grep out `Entering directory' and `Leaving directory' + # messages which can occur if `w' ends up in MAKEFLAGS. + # In particular we don't look at `^make:' because GNU make might + # be invoked under some other name (usually "gmake"), in which + # case it prints its new name instead of `make'. + if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU + fi + # Now try BSD make style include. + if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi + fi + + + echo "$as_me:$LINENO: result: $_am_result" >&5 + echo "${ECHO_T}$_am_result" >&6 + rm -f confinc confmf + + # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. + if test "${enable_dependency_tracking+set}" = set; then + enableval="$enable_dependency_tracking" + + fi; + if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + fi + + + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' + else + AMDEP_TRUE='#' + AMDEP_FALSE= + fi + + + + + depcc="$CC" am_compiler_list= + + echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 + echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 + if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + : > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # (even with -Werror). So we grep stderr for any message + # that says an option was ignored. + if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir + else + am_cv_CC_dependencies_compiler_type=none + fi + + fi + echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 + echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 + CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' + else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= + fi + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or *************** fi *** 1022,1336 **** # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. ! echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:1031: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then ! if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" ! for ac_dir in $PATH; do ! # Account for people who put trailing slashes in PATH elements. ! case "$ac_dir/" in ! /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; ! *) ! # OSF1 and SCO ODT 3.0 have their own names for install. ! # Don't use installbsd from OSF since it installs stuff as root ! # by default. ! for ac_prog in ginstall scoinst install; do ! if test -f $ac_dir/$ac_prog; then ! if test $ac_prog = install && ! grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then ! # AIX install. It has an incompatible calling convention. ! : ! else ! ac_cv_path_install="$ac_dir/$ac_prog -c" ! break 2 ! fi ! fi done ! ;; ! esac ! done ! IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then ! INSTALL="$ac_cv_path_install" else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. ! INSTALL="$ac_install_sh" fi fi ! echo "$ac_t""$INSTALL" 1>&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' ! test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1086: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! case "$RM" in ! /*) ac_cv_path_RM="$RM" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_RM="$RM" # Let the user override the test with a dos path. - ;; *) ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH:/bin:/usr/bin:/usr/local/bin" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_path_RM="$ac_dir/$ac_word" ! break ! fi ! done ! IFS="$ac_save_ifs" test -z "$ac_cv_path_RM" && ac_cv_path_RM="/bin/rm" ;; esac fi ! RM="$ac_cv_path_RM" if test -n "$RM"; then ! echo "$ac_t""$RM" 1>&6 else ! echo "$ac_t""no" 1>&6 fi # Extract the first word of "cp", so it can be a program name with args. set dummy cp; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1122: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_path_CP'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! case "$CP" in ! /*) ac_cv_path_CP="$CP" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_CP="$CP" # Let the user override the test with a dos path. - ;; *) ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH:/bin:/usr/bin:/usr/local/bin" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_path_CP="$ac_dir/$ac_word" ! break ! fi ! done ! IFS="$ac_save_ifs" test -z "$ac_cv_path_CP" && ac_cv_path_CP="/bin/cp" ;; esac fi ! CP="$ac_cv_path_CP" if test -n "$CP"; then ! echo "$ac_t""$CP" 1>&6 else ! echo "$ac_t""no" 1>&6 fi # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1158: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_path_STRIP'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! case "$STRIP" in ! /*) ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_STRIP="$STRIP" # Let the user override the test with a dos path. - ;; *) ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH:/bin:/usr/bin:/usr/local/bin" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_path_STRIP="$ac_dir/$ac_word" ! break ! fi ! done ! IFS="$ac_save_ifs" test -z "$ac_cv_path_STRIP" && ac_cv_path_STRIP="/usr/bin/strip" ;; esac fi ! STRIP="$ac_cv_path_STRIP" if test -n "$STRIP"; then ! echo "$ac_t""$STRIP" 1>&6 else ! echo "$ac_t""no" 1>&6 fi # Extract the first word of "chmod", so it can be a program name with args. set dummy chmod; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1194: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_path_CHMOD'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! case "$CHMOD" in ! /*) ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a dos path. - ;; *) ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH:/bin:/usr/bin:/usr/local/bin" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_path_CHMOD="$ac_dir/$ac_word" ! break ! fi ! done ! IFS="$ac_save_ifs" test -z "$ac_cv_path_CHMOD" && ac_cv_path_CHMOD="/bin/chmod" ;; esac fi ! CHMOD="$ac_cv_path_CHMOD" ! if test -n "$CHMOD"; then ! echo "$ac_t""$CHMOD" 1>&6 ! else ! echo "$ac_t""no" 1>&6 ! fi ! ! echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 ! echo "configure:1228: checking for Cygwin environment" >&5 ! if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* ! ac_cv_cygwin=yes ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! ac_cv_cygwin=no ! fi ! rm -f conftest* ! rm -f conftest* ! fi ! ! echo "$ac_t""$ac_cv_cygwin" 1>&6 ! CYGWIN= ! test "$ac_cv_cygwin" = yes && CYGWIN=yes ! echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 ! echo "configure:1261: checking for mingw32 environment" >&5 ! if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* ! ac_cv_mingw32=yes ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! ac_cv_mingw32=no ! fi ! rm -f conftest* ! rm -f conftest* ! fi ! ! echo "$ac_t""$ac_cv_mingw32" 1>&6 ! MINGW32= ! test "$ac_cv_mingw32" = yes && MINGW32=yes ! ! echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 ! echo "configure:1292: checking for executable suffix" >&5 ! if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! if test "$CYGWIN" = yes || test "$MINGW32" = yes; then ! ac_cv_exeext=.exe else ! rm -f conftest* ! echo 'int main () { return 0; }' > conftest.$ac_ext ! ac_cv_exeext= ! if { (eval echo configure:1302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then ! for file in conftest.*; do ! case $file in ! *.c | *.o | *.obj | *.ilk | *.pdb) ;; ! *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; ! esac ! done ! else ! { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } ! fi ! rm -f conftest* ! test x"${ac_cv_exeext}" = x && ac_cv_exeext=no ! fi fi - EXEEXT="" - test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} - echo "$ac_t""${ac_cv_exeext}" 1>&6 - ac_exeext=$EXEEXT ! echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 ! echo "configure:1324: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no ! fi - echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 - if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= --- 2717,2970 ---- # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install + # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. ! echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 ! echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then ! if test "${ac_cv_path_install+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! # Account for people who put trailing slashes in PATH elements. ! case $as_dir/ in ! ./ | .// | /cC/* | \ ! /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ! /usr/ucb/* ) ;; ! *) ! # OSF1 and SCO ODT 3.0 have their own names for install. ! # Don't use installbsd from OSF since it installs stuff as root ! # by default. ! for ac_prog in ginstall scoinst install; do ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then ! if test $ac_prog = install && ! grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then ! # AIX install. It has an incompatible calling convention. ! : ! elif test $ac_prog = install && ! grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then ! # program-specific install script used by HP pwplus--don't use. ! : ! else ! ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" ! break 3 ! fi ! fi done ! done ! ;; ! esac ! done ! fi if test "${ac_cv_path_install+set}" = set; then ! INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. ! INSTALL=$ac_install_sh fi fi ! echo "$as_me:$LINENO: result: $INSTALL" >&5 ! echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' ! test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_path_RM+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! case $RM in ! [\\/]* | ?:[\\/]*) ac_cv_path_RM="$RM" # Let the user override the test with a path. ;; *) ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! as_dummy="$PATH:/bin:/usr/bin:/usr/local/bin" ! for as_dir in $as_dummy ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! test -z "$ac_cv_path_RM" && ac_cv_path_RM="/bin/rm" ;; esac fi ! RM=$ac_cv_path_RM ! if test -n "$RM"; then ! echo "$as_me:$LINENO: result: $RM" >&5 ! echo "${ECHO_T}$RM" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi # Extract the first word of "cp", so it can be a program name with args. set dummy cp; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_path_CP+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! case $CP in ! [\\/]* | ?:[\\/]*) ac_cv_path_CP="$CP" # Let the user override the test with a path. ;; *) ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! as_dummy="$PATH:/bin:/usr/bin:/usr/local/bin" ! for as_dir in $as_dummy ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! test -z "$ac_cv_path_CP" && ac_cv_path_CP="/bin/cp" ;; esac fi ! CP=$ac_cv_path_CP ! if test -n "$CP"; then ! echo "$as_me:$LINENO: result: $CP" >&5 ! echo "${ECHO_T}$CP" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_path_STRIP+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! case $STRIP in ! [\\/]* | ?:[\\/]*) ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path. ;; *) ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! as_dummy="$PATH:/bin:/usr/bin:/usr/local/bin" ! for as_dir in $as_dummy ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! test -z "$ac_cv_path_STRIP" && ac_cv_path_STRIP="/usr/bin/strip" ;; esac fi ! STRIP=$ac_cv_path_STRIP ! if test -n "$STRIP"; then ! echo "$as_me:$LINENO: result: $STRIP" >&5 ! echo "${ECHO_T}$STRIP" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi # Extract the first word of "chmod", so it can be a program name with args. set dummy chmod; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_path_CHMOD+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! case $CHMOD in ! [\\/]* | ?:[\\/]*) ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path. ;; *) ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! as_dummy="$PATH:/bin:/usr/bin:/usr/local/bin" ! for as_dir in $as_dummy ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! test -z "$ac_cv_path_CHMOD" && ac_cv_path_CHMOD="/bin/chmod" ;; esac fi ! CHMOD=$ac_cv_path_CHMOD ! if test -n "$CHMOD"; then ! echo "$as_me:$LINENO: result: $CHMOD" >&5 ! echo "${ECHO_T}$CHMOD" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi ! echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 ! echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no ! fi; ! echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 ! echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6 if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= *************** else *** 1339,1346 **** MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE ! if test "$GCC" = yes; then --- 2973,2981 ---- MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi + MAINT=$MAINTAINER_MODE_TRUE ! if test "$GCC" = yes; then *************** if test "$GCC" = yes; then *** 1348,1598 **** fi ac_header_dirent=no ! for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h ! do ! ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ! echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 ! echo "configure:1357: checking for $ac_hdr that defines DIR" >&5 ! if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < #include <$ac_hdr> ! int main() { ! DIR *dirp = 0; ! ; return 0; } ! EOF ! if { (eval echo configure:1370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* ! eval "ac_cv_header_dirent_$ac_safe=yes" else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_header_dirent_$ac_safe=no" fi ! rm -f conftest* fi ! if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ! ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` ! cat >> confdefs.h <&6 fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then ! echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 ! echo "configure:1395: checking for opendir in -ldir" >&5 ! ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` ! if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! ac_save_LIBS="$LIBS" ! LIBS="-ldir $LIBS" ! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=yes" else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=no" ! fi ! rm -f conftest* ! LIBS="$ac_save_LIBS" fi ! if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ! LIBS="$LIBS -ldir" else ! echo "$ac_t""no" 1>&6 fi else ! echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 ! echo "configure:1436: checking for opendir in -lx" >&5 ! ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` ! if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! ac_save_LIBS="$LIBS" ! LIBS="-lx $LIBS" ! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=yes" else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=no" ! fi ! rm -f conftest* ! LIBS="$ac_save_LIBS" fi ! if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ! LIBS="$LIBS -lx" else ! echo "$ac_t""no" 1>&6 fi fi ! echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 ! echo "configure:1478: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then ! if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! # This must be in double quotes, not single quotes, because CPP may get ! # substituted into the Makefile and "${CC-cc}" will confuse make. ! CPP="${CC-cc} -E" # On the NeXT, cc -E runs the code through the compiler's parser, ! # not just through cpp. ! cat > conftest.$ac_ext < ! Syntax Error ! EOF ! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ! if test -z "$ac_err"; then ! : else ! echo "$ac_err" >&5 ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! CPP="${CC-cc} -E -traditional-cpp" ! cat > conftest.$ac_ext < ! Syntax Error ! EOF ! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ! if test -z "$ac_err"; then : else ! echo "$ac_err" >&5 ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! CPP="${CC-cc} -nologo -E" ! cat > conftest.$ac_ext < ! Syntax Error ! EOF ! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ! if test -z "$ac_err"; then : else ! echo "$ac_err" >&5 ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! CPP=/lib/cpp fi ! rm -f conftest* fi ! rm -f conftest* fi ! rm -f conftest* ! ac_cv_prog_CPP="$CPP" fi ! CPP="$ac_cv_prog_CPP" else ! ac_cv_prog_CPP="$CPP" fi ! echo "$ac_t""$CPP" 1>&6 ! echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 ! echo "configure:1558: checking for ANSI C header files" >&5 ! if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < #include #include #include ! EOF ! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ! if test -z "$ac_err"; then ! rm -rf conftest* ac_cv_header_stdc=yes else ! echo "$ac_err" >&5 ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! ac_cv_header_stdc=no fi ! rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. ! cat > conftest.$ac_ext < ! EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "memchr" >/dev/null 2>&1; then : else - rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* --- 2983,3582 ---- fi + + + + + + ac_header_dirent=no ! for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do ! as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` ! echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 ! echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 ! if eval "test \"\${$as_ac_Header+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ #include #include <$ac_hdr> ! ! int ! main () ! { ! if ((DIR *) 0) ! return 0; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! eval "$as_ac_Header=yes" else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! eval "$as_ac_Header=no" fi ! rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ! if test `eval echo '${'$as_ac_Header'}'` = yes; then ! cat >>confdefs.h <<_ACEOF ! #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 ! _ACEOF ! ! ac_header_dirent=$ac_hdr; break fi + done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then ! echo "$as_me:$LINENO: checking for library containing opendir" >&5 ! echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 ! if test "${ac_cv_search_opendir+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! ac_func_search_save_LIBS=$LIBS ! ac_cv_search_opendir=no ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! /* Override any gcc2 internal prototype to avoid an error. */ + #ifdef __cplusplus + extern "C" + #endif /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char opendir (); ! int ! main () ! { ! opendir (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_search_opendir="none required" else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! if test "$ac_cv_search_opendir" = no; then ! for ac_lib in dir; do ! LIBS="-l$ac_lib $ac_func_search_save_LIBS" ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! /* Override any gcc2 internal prototype to avoid an error. */ ! #ifdef __cplusplus ! extern "C" ! #endif ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char opendir (); ! int ! main () ! { ! opendir (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_search_opendir="-l$ac_lib" ! break else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! done ! fi ! LIBS=$ac_func_search_save_LIBS ! fi ! echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 ! echo "${ECHO_T}$ac_cv_search_opendir" >&6 ! if test "$ac_cv_search_opendir" != no; then ! test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" ! fi else ! echo "$as_me:$LINENO: checking for library containing opendir" >&5 ! echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 ! if test "${ac_cv_search_opendir+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! ac_func_search_save_LIBS=$LIBS ! ac_cv_search_opendir=no ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! /* Override any gcc2 internal prototype to avoid an error. */ + #ifdef __cplusplus + extern "C" + #endif /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char opendir (); ! int ! main () ! { ! opendir (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_search_opendir="none required" else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! if test "$ac_cv_search_opendir" = no; then ! for ac_lib in x; do ! LIBS="-l$ac_lib $ac_func_search_save_LIBS" ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! /* Override any gcc2 internal prototype to avoid an error. */ ! #ifdef __cplusplus ! extern "C" ! #endif ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char opendir (); ! int ! main () ! { ! opendir (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_search_opendir="-l$ac_lib" ! break else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! done ! fi ! LIBS=$ac_func_search_save_LIBS fi + echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 + echo "${ECHO_T}$ac_cv_search_opendir" >&6 + if test "$ac_cv_search_opendir" != no; then + test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" fi ! fi ! ! ac_ext=c ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ! ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_c_compiler_gnu ! echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 ! echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then ! if test "${ac_cv_prog_CPP+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! # Double quotes because CPP needs to be expanded ! for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" ! do ! ac_preproc_ok=false ! for ac_c_preproc_warn_flag in '' yes ! do ! # Use a header file that comes with gcc, so configuring glibc ! # with a fresh cross-compiler works. ! # Prefer to if __STDC__ is defined, since ! # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, ! # not just through cpp. "Syntax error" is here to catch this case. ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #ifdef __STDC__ ! # include ! #else ! # include ! #endif ! Syntax error ! _ACEOF ! if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } >/dev/null; then ! if test -s conftest.err; then ! ac_cpp_err=$ac_c_preproc_warn_flag ! else ! ac_cpp_err= ! fi else ! ac_cpp_err=yes ! fi ! if test -z "$ac_cpp_err"; then : else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! # Broken: fails on valid input. ! continue ! fi ! rm -f conftest.err conftest.$ac_ext ! ! # OK, works on sane cases. Now check whether non-existent headers ! # can be detected and how. ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #include ! _ACEOF ! if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } >/dev/null; then ! if test -s conftest.err; then ! ac_cpp_err=$ac_c_preproc_warn_flag ! else ! ac_cpp_err= ! fi ! else ! ac_cpp_err=yes ! fi ! if test -z "$ac_cpp_err"; then ! # Broken: success on invalid input. ! continue ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! # Passes both tests. ! ac_preproc_ok=: ! break ! fi ! rm -f conftest.err conftest.$ac_ext ! ! done ! # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. ! rm -f conftest.err conftest.$ac_ext ! if $ac_preproc_ok; then ! break ! fi ! ! done ! ac_cv_prog_CPP=$CPP ! ! fi ! CPP=$ac_cv_prog_CPP ! else ! ac_cv_prog_CPP=$CPP ! fi ! echo "$as_me:$LINENO: result: $CPP" >&5 ! echo "${ECHO_T}$CPP" >&6 ! ac_preproc_ok=false ! for ac_c_preproc_warn_flag in '' yes ! do ! # Use a header file that comes with gcc, so configuring glibc ! # with a fresh cross-compiler works. ! # Prefer to if __STDC__ is defined, since ! # exists even on freestanding compilers. ! # On the NeXT, cc -E runs the code through the compiler's parser, ! # not just through cpp. "Syntax error" is here to catch this case. ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #ifdef __STDC__ ! # include ! #else ! # include ! #endif ! Syntax error ! _ACEOF ! if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } >/dev/null; then ! if test -s conftest.err; then ! ac_cpp_err=$ac_c_preproc_warn_flag ! else ! ac_cpp_err= ! fi ! else ! ac_cpp_err=yes ! fi ! if test -z "$ac_cpp_err"; then : else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! # Broken: fails on valid input. ! continue fi ! rm -f conftest.err conftest.$ac_ext ! ! # OK, works on sane cases. Now check whether non-existent headers ! # can be detected and how. ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #include ! _ACEOF ! if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } >/dev/null; then ! if test -s conftest.err; then ! ac_cpp_err=$ac_c_preproc_warn_flag ! else ! ac_cpp_err= ! fi ! else ! ac_cpp_err=yes fi ! if test -z "$ac_cpp_err"; then ! # Broken: success on invalid input. ! continue ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! # Passes both tests. ! ac_preproc_ok=: ! break fi ! rm -f conftest.err conftest.$ac_ext ! ! done ! # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. ! rm -f conftest.err conftest.$ac_ext ! if $ac_preproc_ok; then ! : ! else ! { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check ! See \`config.log' for more details." >&5 ! echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } fi ! ! ac_ext=c ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ! ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_c_compiler_gnu ! ! ! echo "$as_me:$LINENO: checking for egrep" >&5 ! echo $ECHO_N "checking for egrep... $ECHO_C" >&6 ! if test "${ac_cv_prog_egrep+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! if echo a | (grep -E '(a|b)') >/dev/null 2>&1 ! then ac_cv_prog_egrep='grep -E' ! else ac_cv_prog_egrep='egrep' ! fi fi ! echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 ! echo "${ECHO_T}$ac_cv_prog_egrep" >&6 ! EGREP=$ac_cv_prog_egrep ! ! echo "$as_me:$LINENO: checking for ANSI C header files" >&5 ! echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 ! if test "${ac_cv_header_stdc+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ #include #include #include #include ! ! int ! main () ! { ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ac_cv_header_stdc=yes else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_header_stdc=no fi ! rm -f conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ #include ! ! _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* *************** fi *** 1601,1616 **** if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. ! cat > conftest.$ac_ext < ! EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "free" >/dev/null 2>&1; then : else - rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* --- 3585,3604 ---- if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ #include ! ! _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* *************** fi *** 1619,1814 **** if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. ! if test "$cross_compiling" = yes; then : else ! cat > conftest.$ac_ext < ! #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') ! #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) ! #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) ! int main () { int i; for (i = 0; i < 256; i++) ! if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); ! exit (0); } ! EOF ! if { (eval echo configure:1638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ! then : else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -fr conftest* ! ac_cv_header_stdc=no fi ! rm -fr conftest* fi - fi fi ! ! echo "$ac_t""$ac_cv_header_stdc" 1>&6 if test $ac_cv_header_stdc = yes; then ! cat >> confdefs.h <<\EOF #define STDC_HEADERS 1 ! EOF fi ! echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 ! echo "configure:1662: checking whether struct tm is in sys/time.h or time.h" >&5 ! if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < #include ! int main() { struct tm *tp; tp->tm_sec; ! ; return 0; } ! EOF ! if { (eval echo configure:1675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* ac_cv_struct_tm=time.h else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! ac_cv_struct_tm=sys/time.h fi ! rm -f conftest* fi ! ! echo "$ac_t""$ac_cv_struct_tm" 1>&6 if test $ac_cv_struct_tm = sys/time.h; then ! cat >> confdefs.h <<\EOF #define TM_IN_SYS_TIME 1 ! EOF fi ! for ac_hdr in fcntl.h unistd.h sys/param.h stdlib.h limits.h do ! ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ! echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:1699: checking for $ac_hdr" >&5 ! if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < ! EOF ! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ! if test -z "$ac_err"; then ! rm -rf conftest* ! eval "ac_cv_header_$ac_safe=yes" else ! echo "$ac_err" >&5 ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_header_$ac_safe=no" fi ! rm -f conftest* fi ! if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ! ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` ! cat >> confdefs.h <&6 fi done ! echo $ac_n "checking for off_t""... $ac_c" 1>&6 ! echo "configure:1737: checking for off_t" >&5 ! if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < ! #if STDC_HEADERS ! #include ! #include ! #endif ! EOF ! if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then ! rm -rf conftest* ac_cv_type_off_t=yes else ! rm -rf conftest* ! ac_cv_type_off_t=no ! fi ! rm -f conftest* fi ! echo "$ac_t""$ac_cv_type_off_t" 1>&6 ! if test $ac_cv_type_off_t = no; then ! cat >> confdefs.h <<\EOF #define off_t long ! EOF fi ! echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 ! echo "configure:1770: checking whether struct tm is in sys/time.h or time.h" >&5 ! if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < #include ! int main() { struct tm *tp; tp->tm_sec; ! ; return 0; } ! EOF ! if { (eval echo configure:1783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* ac_cv_struct_tm=time.h else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! ac_cv_struct_tm=sys/time.h fi ! rm -f conftest* fi ! ! echo "$ac_t""$ac_cv_struct_tm" 1>&6 if test $ac_cv_struct_tm = sys/time.h; then ! cat >> confdefs.h <<\EOF #define TM_IN_SYS_TIME 1 ! EOF fi # mkdir takes a single argument on some systems. ! echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6 ! echo "configure:1806: checking if mkdir takes one argument" >&5 ! if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < #ifdef HAVE_SYS_STAT_H --- 3607,4069 ---- if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. ! if test "$cross_compiling" = yes; then : else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ #include ! #if ((' ' & 0x0FF) == 0x020) ! # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') ! # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) ! #else ! # define ISLOWER(c) \ ! (('a' <= (c) && (c) <= 'i') \ ! || ('j' <= (c) && (c) <= 'r') \ ! || ('s' <= (c) && (c) <= 'z')) ! # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) ! #endif ! #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) ! int ! main () ! { ! int i; ! for (i = 0; i < 256; i++) ! if (XOR (islower (i), ISLOWER (i)) ! || toupper (i) != TOUPPER (i)) ! exit(2); ! exit (0); ! } ! _ACEOF ! rm -f conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then : else ! echo "$as_me: program exited with status $ac_status" >&5 ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ( exit $ac_status ) ! ac_cv_header_stdc=no fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi ! echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 ! echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then ! ! cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 ! _ACEOF fi ! echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 ! echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 ! if test "${ac_cv_struct_tm+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ #include #include ! ! int ! main () ! { struct tm *tp; tp->tm_sec; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ac_cv_struct_tm=time.h else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_struct_tm=sys/time.h fi ! rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 ! echo "${ECHO_T}$ac_cv_struct_tm" >&6 if test $ac_cv_struct_tm = sys/time.h; then ! ! cat >>confdefs.h <<\_ACEOF #define TM_IN_SYS_TIME 1 ! _ACEOF fi ! # On IRIX 5.3, sys/types and inttypes.h are conflicting. ! ! ! ! ! ! ! ! ! ! for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ ! inttypes.h stdint.h unistd.h do ! as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` ! echo "$as_me:$LINENO: checking for $ac_header" >&5 ! echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 ! if eval "test \"\${$as_ac_Header+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! $ac_includes_default ! ! #include <$ac_header> ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! eval "$as_ac_Header=yes" else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! eval "$as_ac_Header=no" fi ! rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ! if test `eval echo '${'$as_ac_Header'}'` = yes; then ! cat >>confdefs.h <<_ACEOF ! #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 ! _ACEOF ! ! fi ! ! done ! ! ! ! ! ! ! ! for ac_header in fcntl.h unistd.h sys/param.h stdlib.h limits.h ! do ! as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` ! if eval "test \"\${$as_ac_Header+set}\" = set"; then ! echo "$as_me:$LINENO: checking for $ac_header" >&5 ! echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 ! if eval "test \"\${$as_ac_Header+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! fi ! echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else ! # Is the header compilable? ! echo "$as_me:$LINENO: checking $ac_header usability" >&5 ! echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! $ac_includes_default ! #include <$ac_header> ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_header_compiler=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_header_compiler=no ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 ! echo "${ECHO_T}$ac_header_compiler" >&6 ! ! # Is the header present? ! echo "$as_me:$LINENO: checking $ac_header presence" >&5 ! echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #include <$ac_header> ! _ACEOF ! if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } >/dev/null; then ! if test -s conftest.err; then ! ac_cpp_err=$ac_c_preproc_warn_flag ! else ! ac_cpp_err= ! fi ! else ! ac_cpp_err=yes ! fi ! if test -z "$ac_cpp_err"; then ! ac_header_preproc=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_header_preproc=no ! fi ! rm -f conftest.err conftest.$ac_ext ! echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 ! echo "${ECHO_T}$ac_header_preproc" >&6 ! ! # So? What about this header? ! case $ac_header_compiler:$ac_header_preproc in ! yes:no ) ! { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 ! echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} ! { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 ! echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ! ( ! cat <<\_ASBOX ! ## ------------------------------------ ## ! ## Report this to bug-autoconf@gnu.org. ## ! ## ------------------------------------ ## ! _ASBOX ! ) | ! sed "s/^/$as_me: WARNING: /" >&2 ! ;; ! no:yes ) ! { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 ! echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} ! { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 ! echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} ! { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 ! echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ! ( ! cat <<\_ASBOX ! ## ------------------------------------ ## ! ## Report this to bug-autoconf@gnu.org. ## ! ## ------------------------------------ ## ! _ASBOX ! ) | ! sed "s/^/$as_me: WARNING: /" >&2 ! ;; ! esac ! echo "$as_me:$LINENO: checking for $ac_header" >&5 ! echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 ! if eval "test \"\${$as_ac_Header+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! eval "$as_ac_Header=$ac_header_preproc" fi + echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 + echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + + fi + if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF + + fi + done ! echo "$as_me:$LINENO: checking for off_t" >&5 ! echo $ECHO_N "checking for off_t... $ECHO_C" >&6 ! if test "${ac_cv_type_off_t+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! $ac_includes_default ! int ! main () ! { ! if ((off_t *) 0) ! return 0; ! if (sizeof (off_t)) ! return 0; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ac_cv_type_off_t=yes else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_off_t=no fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 ! echo "${ECHO_T}$ac_cv_type_off_t" >&6 ! if test $ac_cv_type_off_t = yes; then ! : ! else ! ! cat >>confdefs.h <<_ACEOF #define off_t long ! _ACEOF fi ! echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 ! echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 ! if test "${ac_cv_struct_tm+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ #include #include ! ! int ! main () ! { struct tm *tp; tp->tm_sec; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ac_cv_struct_tm=time.h else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_struct_tm=sys/time.h fi ! rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 ! echo "${ECHO_T}$ac_cv_struct_tm" >&6 if test $ac_cv_struct_tm = sys/time.h; then ! ! cat >>confdefs.h <<\_ACEOF #define TM_IN_SYS_TIME 1 ! _ACEOF fi # mkdir takes a single argument on some systems. ! echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5 ! echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6 ! if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ #include #ifdef HAVE_SYS_STAT_H *************** else *** 1820,2171 **** #ifdef HAVE_DIRECT_H # include #endif ! int main() { mkdir ("foo", 0); ! ; return 0; } ! EOF ! if { (eval echo configure:1828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* gcc_cv_mkdir_takes_one_arg=no else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! gcc_cv_mkdir_takes_one_arg=yes fi ! rm -f conftest* fi ! ! echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6 if test $gcc_cv_mkdir_takes_one_arg = yes ; then ! cat >> confdefs.h <<\EOF #define MKDIR_TAKES_ONE_ARG 1 ! EOF fi ! echo $ac_n "checking size of char""... $ac_c" 1>&6 ! echo "configure:1850: checking size of char" >&5 ! if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. ! cat > conftest.$ac_ext < ! int main() { switch (0) case 0: case (sizeof (char) == $ac_size):; ! ; return 0; } ! EOF ! if { (eval echo configure:1866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* ac_cv_sizeof_char=$ac_size else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 fi ! rm -f conftest* if test x$ac_cv_sizeof_char != x ; then break; fi done fi if test x$ac_cv_sizeof_char = x ; then ! { echo "configure: error: cannot determine a size for char" 1>&2; exit 1; } fi ! echo "$ac_t""$ac_cv_sizeof_char" 1>&6 ! cat >> confdefs.h <&6 ! echo "configure:1889: checking size of short" >&5 ! if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. ! cat > conftest.$ac_ext < ! int main() { switch (0) case 0: case (sizeof (short) == $ac_size):; ! ; return 0; } ! EOF ! if { (eval echo configure:1905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* ac_cv_sizeof_short=$ac_size else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 fi ! rm -f conftest* if test x$ac_cv_sizeof_short != x ; then break; fi done fi if test x$ac_cv_sizeof_short = x ; then ! { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } fi ! echo "$ac_t""$ac_cv_sizeof_short" 1>&6 ! cat >> confdefs.h <&6 ! echo "configure:1928: checking size of int" >&5 ! if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. ! cat > conftest.$ac_ext < ! int main() { switch (0) case 0: case (sizeof (int) == $ac_size):; ! ; return 0; } ! EOF ! if { (eval echo configure:1944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* ac_cv_sizeof_int=$ac_size else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 fi ! rm -f conftest* if test x$ac_cv_sizeof_int != x ; then break; fi done fi if test x$ac_cv_sizeof_int = x ; then ! { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } fi ! echo "$ac_t""$ac_cv_sizeof_int" 1>&6 ! cat >> confdefs.h <&6 ! echo "configure:1967: checking size of long" >&5 ! if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. ! cat > conftest.$ac_ext < ! int main() { switch (0) case 0: case (sizeof (long) == $ac_size):; ! ; return 0; } ! EOF ! if { (eval echo configure:1983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* ac_cv_sizeof_long=$ac_size else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 fi ! rm -f conftest* if test x$ac_cv_sizeof_long != x ; then break; fi done fi if test x$ac_cv_sizeof_long = x ; then ! { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } fi ! echo "$ac_t""$ac_cv_sizeof_long" 1>&6 ! cat >> confdefs.h <&6 ! echo "configure:2006: checking size of long long" >&5 ! if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. ! cat > conftest.$ac_ext < ! int main() { switch (0) case 0: case (sizeof (long long) == $ac_size):; ! ; return 0; } ! EOF ! if { (eval echo configure:2022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* ac_cv_sizeof_long_long=$ac_size else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 fi ! rm -f conftest* if test x$ac_cv_sizeof_long_long != x ; then break; fi done fi if test x$ac_cv_sizeof_long_long = x ; then ! { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; } fi ! echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 ! cat >> confdefs.h <&6 ! echo "configure:2046: checking byte ordering" >&5 ! if eval "test \"`echo '$''{'ac_cv_c_compile_endian'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! ac_cv_c_compile_endian=unknown ! ! ac_ext=c ! # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ! cross_compiling=$ac_cv_prog_cc_cross ! ! cat > conftest.$ac_ext < #endif ! /* This structure must have no internal padding. */ ! struct { ! char prefix[sizeof "\nendian:" - 1]; ! short word; ! char postfix[2]; ! } tester = { ! "\nendian:", ! #if SIZEOF_SHORT == 4 ! ('A' << (CHAR_BIT * 3)) | ('B' << (CHAR_BIT * 2)) | #endif ! ('A' << CHAR_BIT) | 'B', ! 'X', '\n' ! }; EOF ! if { (eval echo configure:2080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! od -c conftest.o | ! sed 's/^[0-7]*[ ]*/ / ! s/\*/./g ! s/ \\n/*/g ! s/ [0-9][0-9][0-9]/./g ! s/ \\[^ ]/./g' | ! tr -d ' ! ' | tr -s '*' ' ! ' | fold | sed '$a\ ! ' > conftest.dmp ! if grep 'endian:AB' conftest.dmp >/dev/null 2>&1; then ! ac_cv_c_compile_endian=big-endian ! elif grep 'endian:BA' conftest.dmp >/dev/null 2>&1; then ! ac_cv_c_compile_endian=little-endian fi fi ! rm -rf conftest* ! ac_ext=c ! # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ! cross_compiling=$ac_cv_prog_cc_cross fi ! echo "$ac_t""$ac_cv_c_compile_endian" 1>&6 ! if test $ac_cv_c_compile_endian = unknown; then ! { echo "configure: error: *** unable to determine endianness" 1>&2; exit 1; } ! elif test $ac_cv_c_compile_endian = big-endian; then ! cat >> confdefs.h <<\EOF ! #define WORDS_BIG_ENDIAN 1 ! EOF fi # Check whether --with-system-zlib or --without-system-zlib was given. if test "${with_system_zlib+set}" = set; then withval="$with_system_zlib" - : - fi ZLIBS= ZDEPS= ZINCS= use_zlib=maybe if test "$with_system_zlib" = yes; then ! echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6 ! echo "configure:2132: checking for deflate in -lz" >&5 ! ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'` ! if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! ac_save_LIBS="$LIBS" LIBS="-lz $LIBS" ! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=yes" else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=no" ! fi ! rm -f conftest* ! LIBS="$ac_save_LIBS" fi ! if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ZLIBS=-lz else ! echo "$ac_t""no" 1>&6 ! use_zlib=no fi else --- 4075,4695 ---- #ifdef HAVE_DIRECT_H # include #endif ! int ! main () ! { mkdir ("foo", 0); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then gcc_cv_mkdir_takes_one_arg=no else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! gcc_cv_mkdir_takes_one_arg=yes fi ! rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5 ! echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6 if test $gcc_cv_mkdir_takes_one_arg = yes ; then ! ! cat >>confdefs.h <<\_ACEOF #define MKDIR_TAKES_ONE_ARG 1 ! _ACEOF fi ! echo "$as_me:$LINENO: checking size of char" >&5 ! echo $ECHO_N "checking size of char... $ECHO_C" >&6 ! if test "${ac_cv_sizeof_char+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ #include "confdefs.h" #include ! int ! main () ! { switch (0) case 0: case (sizeof (char) == $ac_size):; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ac_cv_sizeof_char=$ac_size else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext if test x$ac_cv_sizeof_char != x ; then break; fi done fi if test x$ac_cv_sizeof_char = x ; then ! { { echo "$as_me:$LINENO: error: cannot determine a size for char" >&5 ! echo "$as_me: error: cannot determine a size for char" >&2;} ! { (exit 1); exit 1; }; } fi ! echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5 ! echo "${ECHO_T}$ac_cv_sizeof_char" >&6 ! ! cat >>confdefs.h <<_ACEOF #define SIZEOF_CHAR $ac_cv_sizeof_char ! _ACEOF ! echo "$as_me:$LINENO: checking size of short" >&5 ! echo $ECHO_N "checking size of short... $ECHO_C" >&6 ! if test "${ac_cv_sizeof_short+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ #include "confdefs.h" #include ! int ! main () ! { switch (0) case 0: case (sizeof (short) == $ac_size):; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ac_cv_sizeof_short=$ac_size else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext if test x$ac_cv_sizeof_short != x ; then break; fi done fi if test x$ac_cv_sizeof_short = x ; then ! { { echo "$as_me:$LINENO: error: cannot determine a size for short" >&5 ! echo "$as_me: error: cannot determine a size for short" >&2;} ! { (exit 1); exit 1; }; } fi ! echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 ! echo "${ECHO_T}$ac_cv_sizeof_short" >&6 ! ! cat >>confdefs.h <<_ACEOF #define SIZEOF_SHORT $ac_cv_sizeof_short ! _ACEOF ! echo "$as_me:$LINENO: checking size of int" >&5 ! echo $ECHO_N "checking size of int... $ECHO_C" >&6 ! if test "${ac_cv_sizeof_int+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ #include "confdefs.h" #include ! int ! main () ! { switch (0) case 0: case (sizeof (int) == $ac_size):; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ac_cv_sizeof_int=$ac_size else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext if test x$ac_cv_sizeof_int != x ; then break; fi done fi if test x$ac_cv_sizeof_int = x ; then ! { { echo "$as_me:$LINENO: error: cannot determine a size for int" >&5 ! echo "$as_me: error: cannot determine a size for int" >&2;} ! { (exit 1); exit 1; }; } fi ! echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 ! echo "${ECHO_T}$ac_cv_sizeof_int" >&6 ! ! cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int ! _ACEOF ! echo "$as_me:$LINENO: checking size of long" >&5 ! echo $ECHO_N "checking size of long... $ECHO_C" >&6 ! if test "${ac_cv_sizeof_long+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ #include "confdefs.h" #include ! int ! main () ! { switch (0) case 0: case (sizeof (long) == $ac_size):; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ac_cv_sizeof_long=$ac_size else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext if test x$ac_cv_sizeof_long != x ; then break; fi done fi if test x$ac_cv_sizeof_long = x ; then ! { { echo "$as_me:$LINENO: error: cannot determine a size for long" >&5 ! echo "$as_me: error: cannot determine a size for long" >&2;} ! { (exit 1); exit 1; }; } fi ! echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 ! echo "${ECHO_T}$ac_cv_sizeof_long" >&6 ! ! cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long ! _ACEOF ! echo "$as_me:$LINENO: checking size of long long" >&5 ! echo $ECHO_N "checking size of long long... $ECHO_C" >&6 ! if test "${ac_cv_sizeof_long_long+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ #include "confdefs.h" #include ! int ! main () ! { switch (0) case 0: case (sizeof (long long) == $ac_size):; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ac_cv_sizeof_long_long=$ac_size else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext if test x$ac_cv_sizeof_long_long != x ; then break; fi done fi if test x$ac_cv_sizeof_long_long = x ; then ! { { echo "$as_me:$LINENO: error: cannot determine a size for long long" >&5 ! echo "$as_me: error: cannot determine a size for long long" >&2;} ! { (exit 1); exit 1; }; } fi ! echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 ! echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6 ! ! cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long ! _ACEOF ! echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 ! echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 ! if test "${ac_cv_c_bigendian+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! ac_cv_c_bigendian=unknown ! # See if sys/param.h defines the BYTE_ORDER macro. ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #include ! #include ! int ! main () ! { ! #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN ! bogus endian macros #endif ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! # It does; now see whether it defined to BIG_ENDIAN or not. ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #include ! #include ! int ! main () ! { ! ! #if BYTE_ORDER != BIG_ENDIAN ! not big endian #endif ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_c_bigendian=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_c_bigendian=no ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! if test $ac_cv_c_bigendian = unknown; then ! if test "$cross_compiling" = yes; then ! echo $ac_n "cross-compiling... " 2>&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! main () { ! /* Are we little or big endian? From Harbison&Steele. */ ! union ! { ! long l; ! char c[sizeof (long)]; ! } u; ! u.l = 1; ! exit (u.c[sizeof (long) - 1] == 1); ! } ! _ACEOF ! rm -f conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_c_bigendian=no ! else ! echo "$as_me: program exited with status $ac_status" >&5 ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ( exit $ac_status ) ! ac_cv_c_bigendian=yes ! fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ! fi ! fi ! fi ! echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 ! echo "${ECHO_T}$ac_cv_c_bigendian" >&6 ! if test $ac_cv_c_bigendian = unknown; then ! echo "$as_me:$LINENO: checking to probe for byte ordering" >&5 ! echo $ECHO_N "checking to probe for byte ordering... $ECHO_C" >&6 ! ! cat >conftest.c <&6 ! ac_cv_c_bigendian=yes ! fi ! if test `grep -l LiTTleEnDian conftest.o` ; then ! echo $ac_n ' little endian probe OK, ' 1>&6 ! if test $ac_cv_c_bigendian = yes ; then ! ac_cv_c_bigendian=unknown; ! else ! ac_cv_c_bigendian=no ! fi ! fi ! echo $ac_n 'guessing bigendian ... ' >&6 ! fi fi + echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 + echo "${ECHO_T}$ac_cv_c_bigendian" >&6 fi ! if test $ac_cv_c_bigendian = yes; then + cat >>confdefs.h <<\_ACEOF + #define WORDS_BIGENDIAN 1 + _ACEOF + + + cat >>confdefs.h <<\_ACEOF + #define HOST_WORDS_BIG_ENDIAN 1 + _ACEOF + BYTEORDER=4321 + else + BYTEORDER=1234 fi ! cat >>confdefs.h <<_ACEOF ! #define BYTEORDER $BYTEORDER ! _ACEOF + if test $ac_cv_c_bigendian = unknown; then + { { echo "$as_me:$LINENO: error: unknown endianess - sorry" >&5 + echo "$as_me: error: unknown endianess - sorry" >&2;} + { (exit please pre-set ac_cv_c_bigendian); exit please pre-set ac_cv_c_bigendian; }; } fi + # Check whether --with-system-zlib or --without-system-zlib was given. if test "${with_system_zlib+set}" = set; then withval="$with_system_zlib" + fi; ZLIBS= ZDEPS= ZINCS= use_zlib=maybe if test "$with_system_zlib" = yes; then ! echo "$as_me:$LINENO: checking for deflate in -lz" >&5 ! echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6 ! if test "${ac_cv_lib_z_deflate+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! /* Override any gcc2 internal prototype to avoid an error. */ + #ifdef __cplusplus + extern "C" + #endif /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char deflate (); ! int ! main () ! { ! deflate (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_lib_z_deflate=yes else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_z_deflate=no fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! LIBS=$ac_check_lib_save_LIBS ! fi ! echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5 ! echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6 ! if test $ac_cv_lib_z_deflate = yes; then ZLIBS=-lz else ! use_zlib=no fi else *************** fi *** 2182,2187 **** --- 4706,4741 ---- + # GCC LOCAL CHANGE + # We would like to our source tree to be readonly. However when releases or + # pre-releases are generated, the man pages need to be included as they are + # converted from the texi files via perl which we don't require end users to + # have installed. + # Therefore we have --enable-generated-files-in-srcdir to do just that. + + echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5 + echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6 + # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given. + if test "${enable_generated_files_in_srcdir+set}" = set; then + enableval="$enable_generated_files_in_srcdir" + generated_files_in_srcdir=$enableval + else + generated_files_in_srcdir=no + fi; + + echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5 + echo "${ECHO_T}$generated_files_in_srcdir" >&6 + + + if test x$generated_files_in_srcdir = xyes; then + GENINSRC_TRUE= + GENINSRC_FALSE='#' + else + GENINSRC_TRUE='#' + GENINSRC_FALSE= + fi + + # Get the version trigger filename from the toplevel if test "${with_gcc_version_trigger+set}" = set; then gcc_version_trigger=$with_gcc_version_trigger *************** gcc_version_full=`grep version_string ${ *** 2192,2574 **** gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` ! trap '' 1 2 15 ! cat > confcache <<\EOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure ! # scripts and configure runs. It is not useful on other systems. ! # If it contains results you don't want to keep, you may remove or edit it. # ! # By default, configure uses ./config.cache as the cache file, ! # creating it if it does not exist already. You can give configure ! # the --cache-file=FILE option to use a different cache file; that is ! # what configure does when it calls configure scripts in ! # subdirectories, so they share the cache. ! # Giving --cache-file=/dev/null disables caching, for debugging configure. ! # config.status only pays attention to the cache file if you give it the ! # --recheck option to rerun configure. # ! EOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ! (set) 2>&1 | ! case `(ac_space=' '; set | grep ac_space) 2>&1` in ! *ac_space=\ *) ! # `set' does not quote correctly, so add quotes (double-quote substitution ! # turns \\\\ into \\, and sed turns \\ into \). ! sed -n \ ! -e "s/'/'\\\\''/g" \ ! -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ! ;; ! *) ! # `set' quotes correctly as required by POSIX, so do not add quotes. ! sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ! ;; ! esac >> confcache ! if cmp -s $cache_file confcache; then ! : ! else if test -w $cache_file; then ! echo "updating cache $cache_file" ! cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache - trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' ! # Any assignment to VPATH causes Sun make to only execute ! # the first set of double-colon rules, so remove it if not needed. ! # If there is a colon in the path, we need to keep it. if test "x$srcdir" = x.; then ! ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' fi - trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - DEFS=-DHAVE_CONFIG_H ! # Without the "./", some shells look in PATH for config.status. ! : ${CONFIG_STATUS=./config.status} ! echo creating $CONFIG_STATUS ! rm -f $CONFIG_STATUS ! cat > $CONFIG_STATUS </dev/null | sed 1q`: - # - # $0 $ac_configure_args - # # Compiler output produced by configure, useful for debugging ! # configure, is in ./config.log if it exists. ! ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" ! for ac_option do ! case "\$ac_option" in ! -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ! echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" ! exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; ! -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ! echo "$CONFIG_STATUS generated by autoconf version 2.13" ! exit 0 ;; ! -help | --help | --hel | --he | --h) ! echo "\$ac_cs_usage"; exit 0 ;; ! *) echo "\$ac_cs_usage"; exit 1 ;; ! esac done ! ac_given_srcdir=$srcdir ! ac_given_INSTALL="$INSTALL" ! trap 'rm -fr `echo "Makefile install-defs.sh config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 ! EOF ! cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF - $ac_vpsub - $extrasub - s%@SHELL@%$SHELL%g - s%@CFLAGS@%$CFLAGS%g - s%@CPPFLAGS@%$CPPFLAGS%g - s%@CXXFLAGS@%$CXXFLAGS%g - s%@FFLAGS@%$FFLAGS%g - s%@DEFS@%$DEFS%g - s%@LDFLAGS@%$LDFLAGS%g - s%@LIBS@%$LIBS%g - s%@exec_prefix@%$exec_prefix%g - s%@prefix@%$prefix%g - s%@program_transform_name@%$program_transform_name%g - s%@bindir@%$bindir%g - s%@sbindir@%$sbindir%g - s%@libexecdir@%$libexecdir%g - s%@datadir@%$datadir%g - s%@sysconfdir@%$sysconfdir%g - s%@sharedstatedir@%$sharedstatedir%g - s%@localstatedir@%$localstatedir%g - s%@libdir@%$libdir%g - s%@includedir@%$includedir%g - s%@oldincludedir@%$oldincludedir%g - s%@infodir@%$infodir%g - s%@mandir@%$mandir%g - s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g - s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g - s%@INSTALL_DATA@%$INSTALL_DATA%g - s%@PACKAGE@%$PACKAGE%g - s%@VERSION@%$VERSION%g - s%@ACLOCAL@%$ACLOCAL%g - s%@AUTOCONF@%$AUTOCONF%g - s%@AUTOMAKE@%$AUTOMAKE%g - s%@AUTOHEADER@%$AUTOHEADER%g - s%@MAKEINFO@%$MAKEINFO%g - s%@SET_MAKE@%$SET_MAKE%g - s%@CC@%$CC%g - s%@RM@%$RM%g - s%@CP@%$CP%g - s%@STRIP@%$STRIP%g - s%@CHMOD@%$CHMOD%g - s%@EXEEXT@%$EXEEXT%g - s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g - s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g - s%@MAINT@%$MAINT%g - s%@fastjar_warn_cflags@%$fastjar_warn_cflags%g - s%@CPP@%$CPP%g - s%@ZLIBS@%$ZLIBS%g - s%@ZDEPS@%$ZDEPS%g - s%@ZINCS@%$ZINCS%g - s%@gcc_version@%$gcc_version%g ! CEOF ! EOF - cat >> $CONFIG_STATUS <<\EOF ! # Split the substitutions into bite-sized pieces for seds with ! # small command number limits, like on Digital OSF/1 and HP-UX. ! ac_max_sed_cmds=60 # Maximum number of lines to put in a sed script. ! ac_file=1 # Number of current file. ! ac_beg=1 # First line for current file. ! ac_end=$ac_max_sed_cmds # Line after last line for current file. ! ac_more_lines=: ! ac_sed_cmds="" ! while $ac_more_lines; do ! if test $ac_beg -gt 1; then ! sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file else ! sed "${ac_end}q" conftest.subs > conftest.s$ac_file fi ! if test ! -s conftest.s$ac_file; then ! ac_more_lines=false ! rm -f conftest.s$ac_file else ! if test -z "$ac_sed_cmds"; then ! ac_sed_cmds="sed -f conftest.s$ac_file" ! else ! ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" ! fi ! ac_file=`expr $ac_file + 1` ! ac_beg=$ac_end ! ac_end=`expr $ac_end + $ac_max_sed_cmds` fi done ! if test -z "$ac_sed_cmds"; then ! ac_sed_cmds=cat fi - EOF ! cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF ! for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then ! # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". ! case "$ac_file" in ! *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ! ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; ! *) ac_file_in="${ac_file}.in" ;; esac ! # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. ! # Remove last slash and all that follows it. Not all systems have dirname. ! ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` ! if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then ! # The file is in a subdirectory. ! test ! -d "$ac_dir" && mkdir "$ac_dir" ! ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" ! # A "../" for each directory in $ac_dir_suffix. ! ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` ! else ! ac_dir_suffix= ac_dots= fi ! case "$ac_given_srcdir" in ! .) srcdir=. ! if test -z "$ac_dots"; then top_srcdir=. ! else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; ! /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; ! *) # Relative path. ! srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" ! top_srcdir="$ac_dots$ac_given_srcdir" ;; esac ! case "$ac_given_INSTALL" in ! [/$]*) INSTALL="$ac_given_INSTALL" ;; ! *) INSTALL="$ac_dots$ac_given_INSTALL" ;; ! esac ! echo creating "$ac_file" ! rm -f "$ac_file" ! configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." ! case "$ac_file" in ! *Makefile*) ac_comsub="1i\\ ! # $configure_input" ;; ! *) ac_comsub= ;; esac ! ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` ! sed -e "$ac_comsub ! s%@configure_input@%$configure_input%g ! s%@srcdir@%$srcdir%g ! s%@top_srcdir@%$top_srcdir%g ! s%@INSTALL@%$INSTALL%g ! " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file ! fi; done ! rm -f conftest.s* # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ! ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' ! ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' ! ac_dC='\3' ! ac_dD='%g' ! # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". ! ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ! ac_uB='\([ ]\)%\1#\2define\3' ac_uC=' ' ! ac_uD='\4%g' ! # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ! ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ! ac_eB='$%\1#\2define\3' ! ac_eC=' ' ! ac_eD='%g' ! if test "${CONFIG_HEADERS+set}" != set; then ! EOF ! cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF ! fi ! for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". ! case "$ac_file" in ! *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ! ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; ! *) ac_file_in="${ac_file}.in" ;; esac ! echo creating $ac_file ! rm -f conftest.frag conftest.in conftest.out ! ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` ! cat $ac_file_inputs > conftest.in ! EOF ! # Transform confdefs.h into a sed script conftest.vals that substitutes ! # the proper values into config.h.in to produce config.h. And first: ! # Protect against being on the right side of a sed subst in config.status. ! # Protect against being in an unquoted here document in config.status. ! rm -f conftest.vals ! cat > conftest.hdr <<\EOF ! s/[\\&%]/\\&/g ! s%[\\$`]%\\&%g ! s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp ! s%ac_d%ac_u%gp ! s%ac_u%ac_e%gp ! EOF ! sed -n -f conftest.hdr confdefs.h > conftest.vals ! rm -f conftest.hdr # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. ! cat >> conftest.vals <<\EOF ! s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% ! EOF ! # Break up conftest.vals because some shells have a limit on ! # the size of here documents, and old seds have small limits too. rm -f conftest.tail ! while : do ! ac_lines=`grep -c . conftest.vals` ! # grep -c gives empty output for an empty file on some AIX systems. ! if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi ! # Write a limited-size here document to conftest.frag. ! echo ' cat > conftest.frag <> $CONFIG_STATUS ! sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS echo 'CEOF ! sed -f conftest.frag conftest.in > conftest.out ! rm -f conftest.in ! mv conftest.out conftest.in ! ' >> $CONFIG_STATUS ! sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail ! rm -f conftest.vals ! mv conftest.tail conftest.vals done ! rm -f conftest.vals ! cat >> $CONFIG_STATUS <<\EOF ! rm -f conftest.frag conftest.h ! echo "/* $ac_file. Generated automatically by configure. */" > conftest.h ! cat conftest.in >> conftest.h ! rm -f conftest.in ! if cmp -s $ac_file conftest.h 2>/dev/null; then ! echo "$ac_file is unchanged" ! rm -f conftest.h else ! # Remove last slash and all that follows it. Not all systems have dirname. ! ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` ! if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then ! # The file is in a subdirectory. ! test ! -d "$ac_dir" && mkdir "$ac_dir" fi ! rm -f $ac_file ! mv conftest.h $ac_file fi ! fi; done ! EOF ! cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF ! test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h ! exit 0 ! EOF chmod +x $CONFIG_STATUS ! rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 --- 4746,6081 ---- gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` ! ac_config_files="$ac_config_files Makefile install-defs.sh" ! cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure ! # scripts and configure runs, see configure's option --config-cache. ! # It is not useful on other systems. If it contains results you don't ! # want to keep, you may remove or edit it. # ! # config.status only pays attention to the cache file if you give it ! # the --recheck option to rerun configure. # ! # `ac_cv_env_foo' variables (set or unset) will be overridden when ! # loading this file, other *unset* `ac_cv_foo' will be assigned the ! # following values. ! ! _ACEOF ! # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ! { ! (set) 2>&1 | ! case `(ac_space=' '; set | grep ac_space) 2>&1` in ! *ac_space=\ *) ! # `set' does not quote correctly, so add quotes (double-quote ! # substitution turns \\\\ into \\, and sed turns \\ into \). ! sed -n \ ! "s/'/'\\\\''/g; ! s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ! ;; ! *) ! # `set' quotes correctly as required by POSIX, so do not add quotes. ! sed -n \ ! "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ! ;; ! esac; ! } | ! sed ' ! t clear ! : clear ! s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ ! t end ! /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ ! : end' >>confcache ! if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then ! test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" ! cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' ! # VPATH may cause trouble with some makes, so we remove $(srcdir), ! # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and ! # trailing colons and then remove the whole line if VPATH becomes empty ! # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ! ac_vpsub='/^[ ]*VPATH[ ]*=/{ ! s/:*\$(srcdir):*/:/; ! s/:*\${srcdir}:*/:/; ! s/:*@srcdir@:*/:/; ! s/^\([^=]*=[ ]*\):*/\1/; ! s/:*$//; ! s/^[^=]*=[ ]*$//; ! }' fi DEFS=-DHAVE_CONFIG_H ! ac_libobjs= ! ac_ltlibobjs= ! for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue ! # 1. Remove the extension, and $U if already installed. ! ac_i=`echo "$ac_i" | ! sed 's/\$U\././;s/\.o$//;s/\.obj$//'` ! # 2. Add them. ! ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ! ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' ! done ! LIBOBJS=$ac_libobjs ! LTLIBOBJS=$ac_ltlibobjs ! ! ! if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then ! { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. ! Usually this means the macro was only invoked conditionally." >&5 ! echo "$as_me: error: conditional \"AMDEP\" was never defined. ! Usually this means the macro was only invoked conditionally." >&2;} ! { (exit 1); exit 1; }; } ! fi ! if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then ! { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. ! Usually this means the macro was only invoked conditionally." >&5 ! echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. ! Usually this means the macro was only invoked conditionally." >&2;} ! { (exit 1); exit 1; }; } ! fi ! if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then ! { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. ! Usually this means the macro was only invoked conditionally." >&5 ! echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. ! Usually this means the macro was only invoked conditionally." >&2;} ! { (exit 1); exit 1; }; } ! fi ! if test -z "${GENINSRC_TRUE}" && test -z "${GENINSRC_FALSE}"; then ! { { echo "$as_me:$LINENO: error: conditional \"GENINSRC\" was never defined. ! Usually this means the macro was only invoked conditionally." >&5 ! echo "$as_me: error: conditional \"GENINSRC\" was never defined. ! Usually this means the macro was only invoked conditionally." >&2;} ! { (exit 1); exit 1; }; } ! fi ! ! : ${CONFIG_STATUS=./config.status} ! ac_clean_files_save=$ac_clean_files ! ac_clean_files="$ac_clean_files $CONFIG_STATUS" ! { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 ! echo "$as_me: creating $CONFIG_STATUS" >&6;} ! cat >$CONFIG_STATUS <<_ACEOF ! #! $SHELL ! # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging ! # configure, is in config.log if it exists. ! debug=false ! ac_cs_recheck=false ! ac_cs_silent=false ! SHELL=\${CONFIG_SHELL-$SHELL} ! _ACEOF ! ! cat >>$CONFIG_STATUS <<\_ACEOF ! ## --------------------- ## ! ## M4sh Initialization. ## ! ## --------------------- ## ! ! # Be Bourne compatible ! if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then ! emulate sh ! NULLCMD=: ! # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which ! # is contrary to our usage. Disable this feature. ! alias -g '${1+"$@"}'='"$@"' ! elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then ! set -o posix ! fi ! ! # Support unset when possible. ! if (FOO=FOO; unset FOO) >/dev/null 2>&1; then ! as_unset=unset ! else ! as_unset=false ! fi ! ! ! # Work around bugs in pre-3.0 UWIN ksh. ! $as_unset ENV MAIL MAILPATH ! PS1='$ ' ! PS2='> ' ! PS4='+ ' ! ! # NLS nuisances. ! for as_var in \ ! LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ ! LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ ! LC_TELEPHONE LC_TIME do ! if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then ! eval $as_var=C; export $as_var ! else ! $as_unset $as_var ! fi done ! # Required to use basename. ! if expr a : '\(a\)' >/dev/null 2>&1; then ! as_expr=expr ! else ! as_expr=false ! fi ! if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then ! as_basename=basename ! else ! as_basename=false ! fi ! # Name of the executable. ! as_me=`$as_basename "$0" || ! $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ ! X"$0" : 'X\(//\)$' \| \ ! X"$0" : 'X\(/\)$' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X/"$0" | ! sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } ! /^X\/\(\/\/\)$/{ s//\1/; q; } ! /^X\/\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! # PATH needs CR, and LINENO needs CR and PATH. ! # Avoid depending upon Character Ranges. ! as_cr_letters='abcdefghijklmnopqrstuvwxyz' ! as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' ! as_cr_Letters=$as_cr_letters$as_cr_LETTERS ! as_cr_digits='0123456789' ! as_cr_alnum=$as_cr_Letters$as_cr_digits ! ! # The user is always right. ! if test "${PATH_SEPARATOR+set}" != set; then ! echo "#! /bin/sh" >conf$$.sh ! echo "exit 0" >>conf$$.sh ! chmod +x conf$$.sh ! if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then ! PATH_SEPARATOR=';' else ! PATH_SEPARATOR=: fi ! rm -f conf$$.sh ! fi ! ! ! as_lineno_1=$LINENO ! as_lineno_2=$LINENO ! as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` ! test "x$as_lineno_1" != "x$as_lineno_2" && ! test "x$as_lineno_3" = "x$as_lineno_2" || { ! # Find who we are. Look in the path if we contain no path at all ! # relative or not. ! case $0 in ! *[\\/]* ) as_myself=$0 ;; ! *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break ! done ! ! ;; ! esac ! # We did not find ourselves, most probably we were run as `sh COMMAND' ! # in which case we are not to be found in the path. ! if test "x$as_myself" = x; then ! as_myself=$0 ! fi ! if test ! -f "$as_myself"; then ! { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 ! echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} ! { (exit 1); exit 1; }; } ! fi ! case $CONFIG_SHELL in ! '') ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for as_base in sh bash ksh sh5; do ! case $as_dir in ! /*) ! if ("$as_dir/$as_base" -c ' ! as_lineno_1=$LINENO ! as_lineno_2=$LINENO ! as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` ! test "x$as_lineno_1" != "x$as_lineno_2" && ! test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then ! $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } ! $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } ! CONFIG_SHELL=$as_dir/$as_base ! export CONFIG_SHELL ! exec "$CONFIG_SHELL" "$0" ${1+"$@"} ! fi;; ! esac ! done ! done ! ;; ! esac ! ! # Create $as_me.lineno as a copy of $as_myself, but with $LINENO ! # uniformly replaced by the line number. The first 'sed' inserts a ! # line-number line before each line; the second 'sed' does the real ! # work. The second script uses 'N' to pair each line-number line ! # with the numbered line, and appends trailing '-' during ! # substitution so that $LINENO is not a special case at line end. ! # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the ! # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) ! sed '=' <$as_myself | ! sed ' ! N ! s,$,-, ! : loop ! s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, ! t loop ! s,-$,, ! s,^['$as_cr_digits']*\n,, ! ' >$as_me.lineno && ! chmod +x $as_me.lineno || ! { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 ! echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} ! { (exit 1); exit 1; }; } ! ! # Don't try to exec as it changes $[0], causing all sort of problems ! # (the dirname of $[0] is not the place where we might find the ! # original and so on. Autoconf is especially sensible to this). ! . ./$as_me.lineno ! # Exit status is that of the last command. ! exit ! } ! ! ! case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in ! *c*,-n*) ECHO_N= ECHO_C=' ! ' ECHO_T=' ' ;; ! *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; ! *) ECHO_N= ECHO_C='\c' ECHO_T= ;; ! esac ! ! if expr a : '\(a\)' >/dev/null 2>&1; then ! as_expr=expr ! else ! as_expr=false ! fi ! ! rm -f conf$$ conf$$.exe conf$$.file ! echo >conf$$.file ! if ln -s conf$$.file conf$$ 2>/dev/null; then ! # We could just check for DJGPP; but this test a) works b) is more generic ! # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). ! if test -f conf$$.exe; then ! # Don't use ln at all; we don't have any links ! as_ln_s='cp -p' else ! as_ln_s='ln -s' fi + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi + rm -f conf$$ conf$$.exe conf$$.file + + if mkdir -p . 2>/dev/null; then + as_mkdir_p=: + else + as_mkdir_p=false + fi + + as_executable_p="test -f" + + # Sed expression to map a string onto a valid CPP name. + as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + + # Sed expression to map a string onto a valid variable name. + as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + + + # IFS + # We need space, tab and new line, in precisely that order. + as_nl=' + ' + IFS=" $as_nl" + + # CDPATH. + $as_unset CDPATH + + exec 6>&1 + + # Open the log real soon, to keep \$[0] and so on meaningful, and to + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. Logging --version etc. is OK. + exec 5>>config.log + { + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX + ## Running $as_me. ## + _ASBOX + } >&5 + cat >&5 <<_CSEOF + + This file was extended by $as_me, which was + generated by GNU Autoconf 2.57. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + + _CSEOF + echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 + echo >&5 + _ACEOF + + # Files that config.status was made for. + if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS + fi + + if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS + fi + + if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS + fi + + if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS + fi + + cat >>$CONFIG_STATUS <<\_ACEOF + + ac_cs_usage="\ + \`$as_me' instantiates files from templates according to the + current configuration. + + Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + + Configuration files: + $config_files + + Configuration headers: + $config_headers + + Configuration commands: + $config_commands + + Report bugs to ." + _ACEOF + + cat >>$CONFIG_STATUS <<_ACEOF + ac_cs_version="\\ + config.status + configured by $0, generated by GNU Autoconf 2.57, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + + Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 + Free Software Foundation, Inc. + This config.status script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it." + srcdir=$srcdir + INSTALL="$INSTALL" + _ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # If no file are specified by the user, then we need to provide default + # value. By we need to know if files were specified by the user. + ac_need_defaults=: + while test $# != 0 + do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. + _ACEOF + cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 + Try \`$0 --help' for more information." >&5 + echo "$as_me: error: ambiguous option: $1 + Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 + Try \`$0 --help' for more information." >&5 + echo "$as_me: error: unrecognized option: $1 + Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + + esac + shift done ! ! ac_configure_extra_args= ! ! if $ac_cs_silent; then ! exec 6>/dev/null ! ac_configure_extra_args="$ac_configure_extra_args --silent" fi ! _ACEOF ! cat >>$CONFIG_STATUS <<_ACEOF ! if \$ac_cs_recheck; then ! echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 ! exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion ! fi ! _ACEOF ! ! cat >>$CONFIG_STATUS <<_ACEOF ! # ! # INIT-COMMANDS section. ! # ! ! AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" ! ! _ACEOF ! ! ! ! cat >>$CONFIG_STATUS <<\_ACEOF ! for ac_config_target in $ac_config_targets ! do ! case "$ac_config_target" in ! # Handling of arguments. ! "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; ! "install-defs.sh" ) CONFIG_FILES="$CONFIG_FILES install-defs.sh" ;; ! "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; ! "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; ! *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 ! echo "$as_me: error: invalid argument: $ac_config_target" >&2;} ! { (exit 1); exit 1; }; };; esac + done ! # If the user did not use the arguments to specify the items to instantiate, ! # then the envvar interface is used. Set only those that are not. ! # We use the long form for the default assignment because of an extremely ! # bizarre bug on SunOS 4.1.3. ! if $ac_need_defaults; then ! test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files ! test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers ! test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands ! fi ! # Have a temporary directory for convenience. Make it in the build tree ! # simply because there is no reason to put it here, and in addition, ! # creating and moving files from /tmp can sometimes cause problems. ! # Create a temporary directory, and hook for its removal unless debugging. ! $debug || ! { ! trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 ! trap '{ (exit 1); exit 1; }' 1 2 13 15 ! } ! ! # Create a (secure) tmp directory for tmp files. ! ! { ! tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && ! test -n "$tmp" && test -d "$tmp" ! } || ! { ! tmp=./confstat$$-$RANDOM ! (umask 077 && mkdir $tmp) ! } || ! { ! echo "$me: cannot create a temporary directory in ." >&2 ! { (exit 1); exit 1; } ! } ! ! _ACEOF ! ! cat >>$CONFIG_STATUS <<_ACEOF ! ! # ! # CONFIG_FILES section. ! # ! ! # No need to generate the scripts if there are no CONFIG_FILES. ! # This happens for instance when ./config.status config.h ! if test -n "\$CONFIG_FILES"; then ! # Protect against being on the right side of a sed subst in config.status. ! sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; ! s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF ! s,@SHELL@,$SHELL,;t t ! s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t ! s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t ! s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t ! s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t ! s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t ! s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t ! s,@exec_prefix@,$exec_prefix,;t t ! s,@prefix@,$prefix,;t t ! s,@program_transform_name@,$program_transform_name,;t t ! s,@bindir@,$bindir,;t t ! s,@sbindir@,$sbindir,;t t ! s,@libexecdir@,$libexecdir,;t t ! s,@datadir@,$datadir,;t t ! s,@sysconfdir@,$sysconfdir,;t t ! s,@sharedstatedir@,$sharedstatedir,;t t ! s,@localstatedir@,$localstatedir,;t t ! s,@libdir@,$libdir,;t t ! s,@includedir@,$includedir,;t t ! s,@oldincludedir@,$oldincludedir,;t t ! s,@infodir@,$infodir,;t t ! s,@mandir@,$mandir,;t t ! s,@build_alias@,$build_alias,;t t ! s,@host_alias@,$host_alias,;t t ! s,@target_alias@,$target_alias,;t t ! s,@DEFS@,$DEFS,;t t ! s,@ECHO_C@,$ECHO_C,;t t ! s,@ECHO_N@,$ECHO_N,;t t ! s,@ECHO_T@,$ECHO_T,;t t ! s,@LIBS@,$LIBS,;t t ! s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t ! s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t ! s,@INSTALL_DATA@,$INSTALL_DATA,;t t ! s,@CYGPATH_W@,$CYGPATH_W,;t t ! s,@PACKAGE@,$PACKAGE,;t t ! s,@VERSION@,$VERSION,;t t ! s,@ACLOCAL@,$ACLOCAL,;t t ! s,@AUTOCONF@,$AUTOCONF,;t t ! s,@AUTOMAKE@,$AUTOMAKE,;t t ! s,@AUTOHEADER@,$AUTOHEADER,;t t ! s,@MAKEINFO@,$MAKEINFO,;t t ! s,@AMTAR@,$AMTAR,;t t ! s,@install_sh@,$install_sh,;t t ! s,@STRIP@,$STRIP,;t t ! s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t ! s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t ! s,@AWK@,$AWK,;t t ! s,@SET_MAKE@,$SET_MAKE,;t t ! s,@am__leading_dot@,$am__leading_dot,;t t ! s,@CC@,$CC,;t t ! s,@CFLAGS@,$CFLAGS,;t t ! s,@LDFLAGS@,$LDFLAGS,;t t ! s,@CPPFLAGS@,$CPPFLAGS,;t t ! s,@ac_ct_CC@,$ac_ct_CC,;t t ! s,@EXEEXT@,$EXEEXT,;t t ! s,@OBJEXT@,$OBJEXT,;t t ! s,@DEPDIR@,$DEPDIR,;t t ! s,@am__include@,$am__include,;t t ! s,@am__quote@,$am__quote,;t t ! s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t ! s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t ! s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t ! s,@CCDEPMODE@,$CCDEPMODE,;t t ! s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t ! s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t ! s,@RM@,$RM,;t t ! s,@CP@,$CP,;t t ! s,@CHMOD@,$CHMOD,;t t ! s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t ! s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t ! s,@MAINT@,$MAINT,;t t ! s,@fastjar_warn_cflags@,$fastjar_warn_cflags,;t t ! s,@CPP@,$CPP,;t t ! s,@EGREP@,$EGREP,;t t ! s,@ZLIBS@,$ZLIBS,;t t ! s,@ZDEPS@,$ZDEPS,;t t ! s,@ZINCS@,$ZINCS,;t t ! s,@GENINSRC_TRUE@,$GENINSRC_TRUE,;t t ! s,@GENINSRC_FALSE@,$GENINSRC_FALSE,;t t ! s,@gcc_version@,$gcc_version,;t t ! s,@LIBOBJS@,$LIBOBJS,;t t ! s,@LTLIBOBJS@,$LTLIBOBJS,;t t ! CEOF ! ! _ACEOF ! ! cat >>$CONFIG_STATUS <<\_ACEOF ! # Split the substitutions into bite-sized pieces for seds with ! # small command number limits, like on Digital OSF/1 and HP-UX. ! ac_max_sed_lines=48 ! ac_sed_frag=1 # Number of current file. ! ac_beg=1 # First line for current file. ! ac_end=$ac_max_sed_lines # Line after last line for current file. ! ac_more_lines=: ! ac_sed_cmds= ! while $ac_more_lines; do ! if test $ac_beg -gt 1; then ! sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag ! else ! sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag ! fi ! if test ! -s $tmp/subs.frag; then ! ac_more_lines=false ! else ! # The purpose of the label and of the branching condition is to ! # speed up the sed processing (if there are no `@' at all, there ! # is no need to browse any of the substitutions). ! # These are the two extra sed commands mentioned above. ! (echo ':t ! /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed ! if test -z "$ac_sed_cmds"; then ! ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" ! else ! ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" ! fi ! ac_sed_frag=`expr $ac_sed_frag + 1` ! ac_beg=$ac_end ! ac_end=`expr $ac_end + $ac_max_sed_lines` ! fi ! done ! if test -z "$ac_sed_cmds"; then ! ac_sed_cmds=cat fi + fi # test -n "$CONFIG_FILES" ! _ACEOF ! cat >>$CONFIG_STATUS <<\_ACEOF ! for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue ! # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". ! case $ac_file in ! - | *:- | *:-:* ) # input from stdin ! cat >$tmp/stdin ! ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ! ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; ! *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ! ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; ! * ) ac_file_in=$ac_file.in ;; esac ! # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ! ac_dir=`(dirname "$ac_file") 2>/dev/null || ! $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X"$ac_file" : 'X\(//\)[^/]' \| \ ! X"$ac_file" : 'X\(//\)$' \| \ ! X"$ac_file" : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X"$ac_file" | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! { if $as_mkdir_p; then ! mkdir -p "$ac_dir" ! else ! as_dir="$ac_dir" ! as_dirs= ! while test ! -d "$as_dir"; do ! as_dirs="$as_dir $as_dirs" ! as_dir=`(dirname "$as_dir") 2>/dev/null || ! $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X"$as_dir" : 'X\(//\)[^/]' \| \ ! X"$as_dir" : 'X\(//\)$' \| \ ! X"$as_dir" : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X"$as_dir" | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! done ! test ! -n "$as_dirs" || mkdir $as_dirs ! fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 ! echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} ! { (exit 1); exit 1; }; }; } ! ac_builddir=. ! ! if test "$ac_dir" != .; then ! ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` ! # A "../" for each directory in $ac_dir_suffix. ! ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` ! else ! ac_dir_suffix= ac_top_builddir= ! fi ! ! case $srcdir in ! .) # No --srcdir option. We are building in place. ! ac_srcdir=. ! if test -z "$ac_top_builddir"; then ! ac_top_srcdir=. ! else ! ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` ! fi ;; ! [\\/]* | ?:[\\/]* ) # Absolute path. ! ac_srcdir=$srcdir$ac_dir_suffix; ! ac_top_srcdir=$srcdir ;; ! *) # Relative path. ! ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ! ac_top_srcdir=$ac_top_builddir$srcdir ;; ! esac ! # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be ! # absolute. ! ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ! ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ! ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ! ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` ! ! ! case $INSTALL in ! [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; ! *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac ! if test x"$ac_file" != x-; then ! { echo "$as_me:$LINENO: creating $ac_file" >&5 ! echo "$as_me: creating $ac_file" >&6;} ! rm -f "$ac_file" ! fi ! # Let's still pretend it is `configure' which instantiates (i.e., don't ! # use $as_me), people would be surprised to read: ! # /* config.h. Generated by config.status. */ ! if test x"$ac_file" = x-; then ! configure_input= ! else ! configure_input="$ac_file. " ! fi ! configure_input=$configure_input"Generated from `echo $ac_file_in | ! sed 's,.*/,,'` by configure." ! ! # First look for the input files in the build tree, otherwise in the ! # src tree. ! ac_file_inputs=`IFS=: ! for f in $ac_file_in; do ! case $f in ! -) echo $tmp/stdin ;; ! [\\/$]*) ! # Absolute (can't be DOS-style, as IFS=:) ! test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 ! echo "$as_me: error: cannot find input file: $f" >&2;} ! { (exit 1); exit 1; }; } ! echo $f;; ! *) # Relative ! if test -f "$f"; then ! # Build tree ! echo $f ! elif test -f "$srcdir/$f"; then ! # Source tree ! echo $srcdir/$f ! else ! # /dev/null tree ! { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 ! echo "$as_me: error: cannot find input file: $f" >&2;} ! { (exit 1); exit 1; }; } ! fi;; ! esac ! done` || { (exit 1); exit 1; } ! _ACEOF ! cat >>$CONFIG_STATUS <<_ACEOF ! sed "$ac_vpsub ! $extrasub ! _ACEOF ! cat >>$CONFIG_STATUS <<\_ACEOF ! :t ! /@[a-zA-Z_][a-zA-Z_0-9]*@/!b ! s,@configure_input@,$configure_input,;t t ! s,@srcdir@,$ac_srcdir,;t t ! s,@abs_srcdir@,$ac_abs_srcdir,;t t ! s,@top_srcdir@,$ac_top_srcdir,;t t ! s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t ! s,@builddir@,$ac_builddir,;t t ! s,@abs_builddir@,$ac_abs_builddir,;t t ! s,@top_builddir@,$ac_top_builddir,;t t ! s,@abs_top_builddir@,$ac_abs_top_builddir,;t t ! s,@INSTALL@,$ac_INSTALL,;t t ! " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out ! rm -f $tmp/stdin ! if test x"$ac_file" != x-; then ! mv $tmp/out $ac_file ! else ! cat $tmp/out ! rm -f $tmp/out ! fi ! ! done ! _ACEOF ! cat >>$CONFIG_STATUS <<\_ACEOF ! ! # ! # CONFIG_HEADER section. ! # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ! ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ! ac_dB='[ ].*$,\1#\2' ! ac_dC=' ' ! ac_dD=',;t' ! # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ! ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ! ac_uB='$,\1#\2define\3' ac_uC=' ' ! ac_uD=',;t' ! for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". ! case $ac_file in ! - | *:- | *:-:* ) # input from stdin ! cat >$tmp/stdin ! ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ! ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; ! *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ! ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; ! * ) ac_file_in=$ac_file.in ;; esac ! test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 ! echo "$as_me: creating $ac_file" >&6;} ! # First look for the input files in the build tree, otherwise in the ! # src tree. ! ac_file_inputs=`IFS=: ! for f in $ac_file_in; do ! case $f in ! -) echo $tmp/stdin ;; ! [\\/$]*) ! # Absolute (can't be DOS-style, as IFS=:) ! test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 ! echo "$as_me: error: cannot find input file: $f" >&2;} ! { (exit 1); exit 1; }; } ! echo $f;; ! *) # Relative ! if test -f "$f"; then ! # Build tree ! echo $f ! elif test -f "$srcdir/$f"; then ! # Source tree ! echo $srcdir/$f ! else ! # /dev/null tree ! { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 ! echo "$as_me: error: cannot find input file: $f" >&2;} ! { (exit 1); exit 1; }; } ! fi;; ! esac ! done` || { (exit 1); exit 1; } ! # Remove the trailing spaces. ! sed 's/[ ]*$//' $ac_file_inputs >$tmp/in ! _ACEOF ! # Transform confdefs.h into two sed scripts, `conftest.defines' and ! # `conftest.undefs', that substitutes the proper values into ! # config.h.in to produce config.h. The first handles `#define' ! # templates, and the second `#undef' templates. ! # And first: Protect against being on the right side of a sed subst in ! # config.status. Protect against being in an unquoted here document ! # in config.status. ! rm -f conftest.defines conftest.undefs ! # Using a here document instead of a string reduces the quoting nightmare. ! # Putting comments in sed scripts is not portable. ! # ! # `end' is used to avoid that the second main sed command (meant for ! # 0-ary CPP macros) applies to n-ary macro definitions. ! # See the Autoconf documentation for `clear'. ! cat >confdef2sed.sed <<\_ACEOF ! s/[\\&,]/\\&/g ! s,[\\$`],\\&,g ! t clear ! : clear ! s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp ! t end ! s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp ! : end ! _ACEOF ! # If some macros were called several times there might be several times ! # the same #defines, which is useless. Nevertheless, we may not want to ! # sort them, since we want the *last* AC-DEFINE to be honored. ! uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines ! sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs ! rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. ! cat >>conftest.undefs <<\_ACEOF ! s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, ! _ACEOF ! # Break up conftest.defines because some shells have a limit on the size ! # of here documents, and old seds have small limits too (100 cmds). ! echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS ! echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS ! echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS ! echo ' :' >>$CONFIG_STATUS ! rm -f conftest.tail ! while grep . conftest.defines >/dev/null ! do ! # Write a limited-size here document to $tmp/defines.sed. ! echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS ! # Speed up: don't consider the non `#define' lines. ! echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS ! # Work around the forget-to-reset-the-flag bug. ! echo 't clr' >>$CONFIG_STATUS ! echo ': clr' >>$CONFIG_STATUS ! sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS ! echo 'CEOF ! sed -f $tmp/defines.sed $tmp/in >$tmp/out ! rm -f $tmp/in ! mv $tmp/out $tmp/in ! ' >>$CONFIG_STATUS ! sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail ! rm -f conftest.defines ! mv conftest.tail conftest.defines ! done ! rm -f conftest.defines ! echo ' fi # grep' >>$CONFIG_STATUS ! echo >>$CONFIG_STATUS + # Break up conftest.undefs because some shells have a limit on the size + # of here documents, and old seds have small limits too (100 cmds). + echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail ! while grep . conftest.undefs >/dev/null do ! # Write a limited-size here document to $tmp/undefs.sed. ! echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS ! # Speed up: don't consider the non `#undef' ! echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS ! # Work around the forget-to-reset-the-flag bug. ! echo 't clr' >>$CONFIG_STATUS ! echo ': clr' >>$CONFIG_STATUS ! sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF ! sed -f $tmp/undefs.sed $tmp/in >$tmp/out ! rm -f $tmp/in ! mv $tmp/out $tmp/in ! ' >>$CONFIG_STATUS ! sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail ! rm -f conftest.undefs ! mv conftest.tail conftest.undefs done ! rm -f conftest.undefs ! cat >>$CONFIG_STATUS <<\_ACEOF ! # Let's still pretend it is `configure' which instantiates (i.e., don't ! # use $as_me), people would be surprised to read: ! # /* config.h. Generated by config.status. */ ! if test x"$ac_file" = x-; then ! echo "/* Generated by configure. */" >$tmp/config.h else ! echo "/* $ac_file. Generated by configure. */" >$tmp/config.h ! fi ! cat $tmp/in >>$tmp/config.h ! rm -f $tmp/in ! if test x"$ac_file" != x-; then ! if diff $ac_file $tmp/config.h >/dev/null 2>&1; then ! { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 ! echo "$as_me: $ac_file is unchanged" >&6;} ! else ! ac_dir=`(dirname "$ac_file") 2>/dev/null || ! $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X"$ac_file" : 'X\(//\)[^/]' \| \ ! X"$ac_file" : 'X\(//\)$' \| \ ! X"$ac_file" : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X"$ac_file" | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! { if $as_mkdir_p; then ! mkdir -p "$ac_dir" ! else ! as_dir="$ac_dir" ! as_dirs= ! while test ! -d "$as_dir"; do ! as_dirs="$as_dir $as_dirs" ! as_dir=`(dirname "$as_dir") 2>/dev/null || ! $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X"$as_dir" : 'X\(//\)[^/]' \| \ ! X"$as_dir" : 'X\(//\)$' \| \ ! X"$as_dir" : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X"$as_dir" | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! done ! test ! -n "$as_dirs" || mkdir $as_dirs ! fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 ! echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} ! { (exit 1); exit 1; }; }; } ! ! rm -f $ac_file ! mv $tmp/config.h $ac_file fi ! else ! cat $tmp/config.h ! rm -f $tmp/config.h fi ! # Compute $ac_file's index in $config_headers. ! _am_stamp_count=1 ! for _am_header in $config_headers :; do ! case $_am_header in ! $ac_file | $ac_file:* ) ! break ;; ! * ) ! _am_stamp_count=`expr $_am_stamp_count + 1` ;; ! esac ! done ! echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || ! $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X$ac_file : 'X\(//\)[^/]' \| \ ! X$ac_file : 'X\(//\)$' \| \ ! X$ac_file : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X$ac_file | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'`/stamp-h$_am_stamp_count ! done ! _ACEOF ! cat >>$CONFIG_STATUS <<\_ACEOF ! # ! # CONFIG_COMMANDS section. ! # ! for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ! ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ! ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ! ac_dir=`(dirname "$ac_dest") 2>/dev/null || ! $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X"$ac_dest" : 'X\(//\)[^/]' \| \ ! X"$ac_dest" : 'X\(//\)$' \| \ ! X"$ac_dest" : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X"$ac_dest" | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! ac_builddir=. + if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` + else + ac_dir_suffix= ac_top_builddir= + fi ! case $srcdir in ! .) # No --srcdir option. We are building in place. ! ac_srcdir=. ! if test -z "$ac_top_builddir"; then ! ac_top_srcdir=. ! else ! ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` ! fi ;; ! [\\/]* | ?:[\\/]* ) # Absolute path. ! ac_srcdir=$srcdir$ac_dir_suffix; ! ac_top_srcdir=$srcdir ;; ! *) # Relative path. ! ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ! ac_top_srcdir=$ac_top_builddir$srcdir ;; ! esac ! # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be ! # absolute. ! ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ! ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ! ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ! ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` ! ! { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 ! echo "$as_me: executing $ac_dest commands" >&6;} ! case $ac_dest in ! depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do ! # Strip MF so we end up with the name of the file. ! mf=`echo "$mf" | sed -e 's/:.*$//'` ! # Check whether this is an Automake generated Makefile or not. ! # We used to match only the files named `Makefile.in', but ! # some people rename them; so instead we look at the file content. ! # Grep'ing the first line is not enough: some people post-process ! # each Makefile.in and add a new line on top of each file to say so. ! # So let's grep whole file. ! if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then ! dirpart=`(dirname "$mf") 2>/dev/null || ! $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X"$mf" : 'X\(//\)[^/]' \| \ ! X"$mf" : 'X\(//\)$' \| \ ! X"$mf" : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X"$mf" | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! else ! continue ! fi ! grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue ! # Extract the definition of DEP_FILES from the Makefile without ! # running `make'. ! DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` ! test -z "$DEPDIR" && continue ! # When using ansi2knr, U may be empty or an underscore; expand it ! U=`sed -n -e '/^U = / s///p' < "$mf"` ! test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" ! # We invoke sed twice because it is the simplest approach to ! # changing $(DEPDIR) to its actual value in the expansion. ! for file in `sed -n -e ' ! /^DEP_FILES = .*\\\\$/ { ! s/^DEP_FILES = // ! :loop ! s/\\\\$// ! p ! n ! /\\\\$/ b loop ! p ! } ! /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ ! sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do ! # Make sure the directory exists. ! test -f "$dirpart/$file" && continue ! fdir=`(dirname "$file") 2>/dev/null || ! $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X"$file" : 'X\(//\)[^/]' \| \ ! X"$file" : 'X\(//\)$' \| \ ! X"$file" : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X"$file" | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! { if $as_mkdir_p; then ! mkdir -p $dirpart/$fdir ! else ! as_dir=$dirpart/$fdir ! as_dirs= ! while test ! -d "$as_dir"; do ! as_dirs="$as_dir $as_dirs" ! as_dir=`(dirname "$as_dir") 2>/dev/null || ! $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X"$as_dir" : 'X\(//\)[^/]' \| \ ! X"$as_dir" : 'X\(//\)$' \| \ ! X"$as_dir" : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X"$as_dir" | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! done ! test ! -n "$as_dirs" || mkdir $as_dirs ! fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 ! echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} ! { (exit 1); exit 1; }; }; } ! ! # echo "creating $dirpart/$file" ! echo '# dummy' > "$dirpart/$file" ! done ! done ! ;; ! esac ! done ! _ACEOF ! ! cat >>$CONFIG_STATUS <<\_ACEOF ! ! { (exit 0); exit 0; } ! _ACEOF chmod +x $CONFIG_STATUS ! ac_clean_files=$ac_clean_files_save ! ! ! # configure is writing to config.log, and then calls config.status. ! # config.status does its own redirection, appending to config.log. ! # Unfortunately, on DOS this fails, as config.log is still kept open ! # by configure, so config.status won't be able to write to it; its ! # output is simply discarded. So we exec the FD to /dev/null, ! # effectively closing config.log, so it can be properly (re)opened and ! # appended to by config.status. When coming back to configure, we ! # need to make the FD available again. ! if test "$no_create" != yes; then ! ac_cs_success=: ! ac_config_status_args= ! test "$silent" = yes && ! ac_config_status_args="$ac_config_status_args --quiet" ! exec 5>/dev/null ! $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false ! exec 5>>config.log ! # Use ||, not &&, to avoid exiting from the if with $? = 1, which ! # would make configure fail if this is the last instruction. ! $ac_cs_success || { (exit 1); exit 1; } ! fi diff -Nrc3pad gcc-3.3.3/fastjar/configure.ac gcc-3.4.0/fastjar/configure.ac *** gcc-3.3.3/fastjar/configure.ac 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/fastjar/configure.ac 2004-04-14 23:49:37.000000000 +0000 *************** *** 0 **** --- 1,102 ---- + dnl Process this file with autoconf to produce a configure script. + AC_PREREQ(2.57) + AC_INIT(jartool.h) + AM_INIT_AUTOMAKE(fastjar, 0.92-gcc) + AM_CONFIG_HEADER(config.h) + + dnl Checks for programs. + AC_PROG_CC + AC_PROG_INSTALL + AC_PATH_PROG(RM, rm, /bin/rm, $PATH:/bin:/usr/bin:/usr/local/bin) + AC_PATH_PROG(CP, cp, /bin/cp, $PATH:/bin:/usr/bin:/usr/local/bin) + AC_PATH_PROG(STRIP, strip, /usr/bin/strip, $PATH:/bin:/usr/bin:/usr/local/bin) + AC_PATH_PROG(CHMOD, chmod, /bin/chmod, $PATH:/bin:/usr/bin:/usr/local/bin) + AC_EXEEXT + + AM_MAINTAINER_MODE + + dnl Add warning flags if we are using gcc. + if test "$GCC" = yes; then + fastjar_warn_cflags='-W -Wall -pedantic -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings' + fi + AC_SUBST(fastjar_warn_cflags) + + dnl Checks for header files. + AC_HEADER_DIRENT + AC_HEADER_STDC + AC_STRUCT_TM + AC_CHECK_HEADERS(fcntl.h unistd.h sys/param.h stdlib.h limits.h) + + dnl Checks for typedefs, structures, and compiler characteristics. + AC_TYPE_OFF_T + AC_STRUCT_TM + + # mkdir takes a single argument on some systems. + gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG + + dnl Check for type-widths + AC_COMPILE_CHECK_SIZEOF(char) + AC_COMPILE_CHECK_SIZEOF(short) + AC_COMPILE_CHECK_SIZEOF(int) + AC_COMPILE_CHECK_SIZEOF(long) + AC_COMPILE_CHECK_SIZEOF(long long) + + dnl Check byte order + AC_C_BIGENDIAN_CROSS + + AC_ARG_WITH(system-zlib, + [ --with-system-zlib use installed libz]) + + ZLIBS= + ZDEPS= + ZINCS= + use_zlib=maybe + if test "$with_system_zlib" = yes; then + AC_CHECK_LIB(z, deflate, ZLIBS=-lz, use_zlib=no) + else + use_zlib=no + fi + + if test "$use_zlib" = no; then + # Brain dead way to find tree's zlib. + ZDEPS='$(top_builddir)/../zlib/libz.a' + ZLIBS="$ZDEPS -L\$(here)/../zlib/$libsubdir" + ZINCS='-I$(top_srcdir)/../zlib' + fi + AC_SUBST(ZLIBS) + AC_SUBST(ZDEPS) + AC_SUBST(ZINCS) + + # GCC LOCAL CHANGE + # We would like to our source tree to be readonly. However when releases or + # pre-releases are generated, the man pages need to be included as they are + # converted from the texi files via perl which we don't require end users to + # have installed. + # Therefore we have --enable-generated-files-in-srcdir to do just that. + + AC_MSG_CHECKING([whether to place generated files in the source directory]) + dnl generated-files-in-srcdir is disabled by default + AC_ARG_ENABLE(generated-files-in-srcdir, + [ --enable-generated-files-in-srcdir + put copies of generated files in source dir + intended for creating source tarballs for users + without texinfo, perl, bison or flex.], + generated_files_in_srcdir=$enableval, + generated_files_in_srcdir=no) + + AC_MSG_RESULT($generated_files_in_srcdir) + AM_CONDITIONAL(GENINSRC, test x$generated_files_in_srcdir = xyes) + + # Get the version trigger filename from the toplevel + if test "${with_gcc_version_trigger+set}" = set; then + gcc_version_trigger=$with_gcc_version_trigger + else + gcc_version_trigger=${srcdir}/version.c + fi + changequote(,)dnl + gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'` + gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` + changequote([,])dnl + AC_SUBST(gcc_version) + + AC_OUTPUT(Makefile install-defs.sh) diff -Nrc3pad gcc-3.3.3/fastjar/configure.in gcc-3.4.0/fastjar/configure.in *** gcc-3.3.3/fastjar/configure.in 2002-11-10 21:04:24.000000000 +0000 --- gcc-3.4.0/fastjar/configure.in 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,81 **** - dnl Process this file with autoconf to produce a configure script. - AC_INIT(jartool.h) - AM_INIT_AUTOMAKE(fastjar, 0.92-gcc) - AM_CONFIG_HEADER(config.h) - - dnl Checks for programs. - AC_PROG_CC - AC_PROG_INSTALL - AC_PATH_PROG(RM, rm, /bin/rm, $PATH:/bin:/usr/bin:/usr/local/bin) - AC_PATH_PROG(CP, cp, /bin/cp, $PATH:/bin:/usr/bin:/usr/local/bin) - AC_PATH_PROG(STRIP, strip, /usr/bin/strip, $PATH:/bin:/usr/bin:/usr/local/bin) - AC_PATH_PROG(CHMOD, chmod, /bin/chmod, $PATH:/bin:/usr/bin:/usr/local/bin) - AC_EXEEXT - - AM_MAINTAINER_MODE - - dnl Add warning flags if we are using gcc. - if test "$GCC" = yes; then - fastjar_warn_cflags='-W -Wall -pedantic -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings' - fi - AC_SUBST(fastjar_warn_cflags) - - dnl Checks for header files. - AC_HEADER_DIRENT - AC_HEADER_STDC - AC_STRUCT_TM - AC_CHECK_HEADERS(fcntl.h unistd.h sys/param.h stdlib.h limits.h) - - dnl Checks for typedefs, structures, and compiler characteristics. - AC_TYPE_OFF_T - AC_STRUCT_TM - - # mkdir takes a single argument on some systems. - gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG - - dnl Check for type-widths - gcc_AC_COMPILE_CHECK_SIZEOF(char) - gcc_AC_COMPILE_CHECK_SIZEOF(short) - gcc_AC_COMPILE_CHECK_SIZEOF(int) - gcc_AC_COMPILE_CHECK_SIZEOF(long) - gcc_AC_COMPILE_CHECK_SIZEOF(long long) - - dnl Check byte order - fastjar_AC_COMPILE_C_BIGENDIAN - - AC_ARG_WITH(system-zlib, - [ --with-system-zlib use installed libz]) - - ZLIBS= - ZDEPS= - ZINCS= - use_zlib=maybe - if test "$with_system_zlib" = yes; then - AC_CHECK_LIB(z, deflate, ZLIBS=-lz, use_zlib=no) - else - use_zlib=no - fi - - if test "$use_zlib" = no; then - # Brain dead way to find tree's zlib. - ZDEPS='$(top_builddir)/../zlib/libz.a' - ZLIBS="$ZDEPS -L\$(here)/../zlib/$libsubdir" - ZINCS='-I$(top_srcdir)/../zlib' - fi - AC_SUBST(ZLIBS) - AC_SUBST(ZDEPS) - AC_SUBST(ZINCS) - - # Get the version trigger filename from the toplevel - if test "${with_gcc_version_trigger+set}" = set; then - gcc_version_trigger=$with_gcc_version_trigger - else - gcc_version_trigger=${srcdir}/version.c - fi - changequote(,)dnl - gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'` - gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` - changequote([,])dnl - AC_SUBST(gcc_version) - - AC_OUTPUT(Makefile install-defs.sh) --- 0 ---- diff -Nrc3pad gcc-3.3.3/fastjar/.cvsignore gcc-3.4.0/fastjar/.cvsignore *** gcc-3.3.3/fastjar/.cvsignore 2002-09-12 00:40:12.000000000 +0000 --- gcc-3.4.0/fastjar/.cvsignore 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,3 **** - fastjar.info - grepjar.1 - jar.1 --- 0 ---- diff -Nrc3pad gcc-3.3.3/fastjar/fastjar.info gcc-3.4.0/fastjar/fastjar.info *** gcc-3.3.3/fastjar/fastjar.info 2004-02-14 20:54:38.000000000 +0000 --- gcc-3.4.0/fastjar/fastjar.info 2004-04-19 02:41:45.000000000 +0000 *************** *** 1,5 **** ! Ceci est le fichier Info fastjar.info, produit par Makeinfo version 4.6 ! à partir fastjar.texi. INFO-DIR-SECTION Programming START-INFO-DIR-ENTRY --- 1,5 ---- ! This is fastjar.info, produced by makeinfo version 4.2 from ! /home/mitchell/gcc-3.4.0/gcc-3.4.0/fastjar/fastjar.texi. INFO-DIR-SECTION Programming START-INFO-DIR-ENTRY *************** File: fastjar.info, Node: Top, Next: I *** 28,34 **** Introduction ************ ! This manual describes how to use `jar' and `grepjar'. * Menu: --- 28,34 ---- Introduction ************ ! This manual describes how to use `jar' and `grepjar'. * Menu: *************** File: fastjar.info, Node: Invoking jar, *** 42,49 **** Invoking jar ************ ! `fastjar' is an implementation of Sun's jar utility that comes with the ! JDK, written entirely in C, and runs in a fraction of the time while being feature compatible. If any file is a directory then it is processed recursively. The --- 42,49 ---- Invoking jar ************ ! `fastjar' is an implementation of Sun's jar utility that comes with ! the JDK, written entirely in C, and runs in a fraction of the time while being feature compatible. If any file is a directory then it is processed recursively. The *************** the same order the `-m' and `-f' flags a *** 65,71 **** Update existing archive. This option is disabled due to bugs (currently fails with exit status 1 and does nothing). - The following parameters are optional: `-@' --- 65,70 ---- *************** the same order the `-m' and `-f' flags a *** 101,107 **** `-v' Generate verbose output on standard output. - All remaining options are considered to be names of files.  --- 100,105 ---- *************** File: fastjar.info, Node: Invoking grep *** 110,117 **** Invoking grepjar **************** ! The `grepjar' program can be used to search files in a jar file for a ! pattern. `-b' Print byte offset of match. --- 108,115 ---- Invoking grepjar **************** ! The `grepjar' program can be used to search files in a jar file for ! a pattern. `-b' Print byte offset of match. *************** GNU GENERAL PUBLIC LICENSE *** 157,165 **** Preamble ======== ! The licenses for most software are designed to take away your freedom ! to share and change it. By contrast, the GNU General Public License is ! intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to --- 155,163 ---- Preamble ======== ! The licenses for most software are designed to take away your ! freedom to share and change it. By contrast, the GNU General Public ! License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to *************** modification follow. *** 440,446 **** How to Apply These Terms to Your New Programs ============================================= ! If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. --- 438,444 ---- How to Apply These Terms to Your New Programs ============================================= ! If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. *************** GNU Library General Public License inste *** 504,512 ****  Tag Table: ! Node: Top843 ! Node: Invoking jar1145 ! Node: Invoking grepjar2925 ! Node: Copying3528  End Tag Table --- 502,510 ----  Tag Table: ! Node: Top865 ! Node: Invoking jar1170 ! Node: Invoking grepjar2951 ! Node: Copying3557  End Tag Table diff -Nrc3pad gcc-3.3.3/fastjar/grepjar.1 gcc-3.4.0/fastjar/grepjar.1 *** gcc-3.3.3/fastjar/grepjar.1 2004-02-14 20:54:40.000000000 +0000 --- gcc-3.4.0/fastjar/grepjar.1 2004-04-19 02:41:47.000000000 +0000 *************** *** 1,8 **** ! .\" Automatically generated by Pod::Man version 1.15 ! .\" Sat Feb 14 20:54:40 2004 .\" .\" Standard preamble: ! .\" ====================================================================== .de Sh \" Subsection heading .br .if t .Sp --- 1,7 ---- ! .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 .\" .\" Standard preamble: ! .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp *************** *** 15,26 **** .if t .sp .5v .if n .sp .. - .de Ip \" List item - .br - .ie \\n(.$>=3 .ne \\$3 - .el .ne 3 - .IP "\\$1" \\$2 - .. .de Vb \" Begin verbatim text .ft CW .nf --- 14,19 ---- *************** *** 28,42 **** .. .de Ve \" End verbatim text .ft R - .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a ! .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used ! .\" to do unbreakable dashes and therefore won't be available. \*(C` and ! .\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ --- 21,34 ---- .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a ! .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to ! .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' ! .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ *************** *** 56,65 **** . ds R" '' 'br\} .\" ! .\" If the F register is turned on, we'll generate index entries on stderr ! .\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and ! .\" index entries marked with X<> in POD. Of course, you'll have to process ! .\" the output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" --- 48,57 ---- . ds R" '' 'br\} .\" ! .\" If the F register is turned on, we'll generate index entries on stderr for ! .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index ! .\" entries marked with X<> in POD. Of course, you'll have to process the ! .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" *************** *** 68,81 **** . rr F .\} .\" ! .\" For nroff, turn off justification. Always turn off hyphenation; it ! .\" makes way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. - .bd B 3 . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 --- 60,72 ---- . rr F .\} .\" ! .\" For nroff, turn off justification. Always turn off hyphenation; it makes ! .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 *************** *** 135,145 **** . ds Ae AE .\} .rm #[ #] #H #V #F C ! .\" ====================================================================== .\" .IX Title "GREPJAR 1" ! .TH GREPJAR 1 "gcc-3.3.3" "2004-02-14" "GNU" ! .UC .SH "NAME" grepjar \- search files in a jar file for a pattern .SH "SYNOPSIS" --- 126,135 ---- . ds Ae AE .\} .rm #[ #] #H #V #F C ! .\" ======================================================================== .\" .IX Title "GREPJAR 1" ! .TH GREPJAR 1 "2004-04-19" "gcc-3.4.0" "GNU" .SH "NAME" grepjar \- search files in a jar file for a pattern .SH "SYNOPSIS" *************** The \f(CW\*(C`grepjar\*(C'\fR program ca *** 151,185 **** a pattern. .SH "OPTIONS" .IX Header "OPTIONS" ! .Ip "\fB\-b\fR" 4 .IX Item "-b" Print byte offset of match. ! .Ip "\fB\-c\fR" 4 .IX Item "-c" Print number of matches. ! .Ip "\fB\-i\fR" 4 .IX Item "-i" ! Compare case-insensitively. ! .Ip "\fB\-n\fR" 4 .IX Item "-n" Print line number of each match. ! .Ip "\fB\-s\fR" 4 .IX Item "-s" Suppress error messages. ! .Ip "\fB\-w\fR" 4 .IX Item "-w" Force \fI\s-1PATTERN\s0\fR to match only whole words. ! .Ip "\fB\-e\fR \fI\s-1PATTERN\s0\fR" 4 .IX Item "-e PATTERN" Use \fI\s-1PATTERN\s0\fR as regular expression. ! .Ip "\fB\*(--help\fR" 4 ! .IX Item "help" Print help, then exit. ! .Ip "\fB\-V\fR" 4 .IX Item "-V" .PD 0 ! .Ip "\fB\*(--version\fR" 4 ! .IX Item "version" .PD Print version number, then exit. .SH "SEE ALSO" --- 141,175 ---- a pattern. .SH "OPTIONS" .IX Header "OPTIONS" ! .IP "\fB\-b\fR" 4 .IX Item "-b" Print byte offset of match. ! .IP "\fB\-c\fR" 4 .IX Item "-c" Print number of matches. ! .IP "\fB\-i\fR" 4 .IX Item "-i" ! Compare case\-insensitively. ! .IP "\fB\-n\fR" 4 .IX Item "-n" Print line number of each match. ! .IP "\fB\-s\fR" 4 .IX Item "-s" Suppress error messages. ! .IP "\fB\-w\fR" 4 .IX Item "-w" Force \fI\s-1PATTERN\s0\fR to match only whole words. ! .IP "\fB\-e\fR \fI\s-1PATTERN\s0\fR" 4 .IX Item "-e PATTERN" Use \fI\s-1PATTERN\s0\fR as regular expression. ! .IP "\fB\-\-help\fR" 4 ! .IX Item "--help" Print help, then exit. ! .IP "\fB\-V\fR" 4 .IX Item "-V" .PD 0 ! .IP "\fB\-\-version\fR" 4 ! .IX Item "--version" .PD Print version number, then exit. .SH "SEE ALSO" diff -Nrc3pad gcc-3.3.3/fastjar/install-sh gcc-3.4.0/fastjar/install-sh *** gcc-3.3.3/fastjar/install-sh 2000-12-09 03:08:23.000000000 +0000 --- gcc-3.4.0/fastjar/install-sh 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,8 **** - #! /bin/bash - - . install-defs.sh - - $CP fastjar ${BINDIR} - $STRIP ${BINDIR}/fastjar - $CHMOD 755 ${BINDIR}/fastjar - --- 0 ---- diff -Nrc3pad gcc-3.3.3/fastjar/jar.1 gcc-3.4.0/fastjar/jar.1 *** gcc-3.3.3/fastjar/jar.1 2004-02-14 20:54:40.000000000 +0000 --- gcc-3.4.0/fastjar/jar.1 2004-04-19 02:41:47.000000000 +0000 *************** *** 1,8 **** ! .\" Automatically generated by Pod::Man version 1.15 ! .\" Sat Feb 14 20:54:40 2004 .\" .\" Standard preamble: ! .\" ====================================================================== .de Sh \" Subsection heading .br .if t .Sp --- 1,7 ---- ! .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 .\" .\" Standard preamble: ! .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp *************** *** 15,26 **** .if t .sp .5v .if n .sp .. - .de Ip \" List item - .br - .ie \\n(.$>=3 .ne \\$3 - .el .ne 3 - .IP "\\$1" \\$2 - .. .de Vb \" Begin verbatim text .ft CW .nf --- 14,19 ---- *************** *** 28,42 **** .. .de Ve \" End verbatim text .ft R - .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a ! .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used ! .\" to do unbreakable dashes and therefore won't be available. \*(C` and ! .\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ --- 21,34 ---- .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a ! .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to ! .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' ! .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ *************** *** 56,65 **** . ds R" '' 'br\} .\" ! .\" If the F register is turned on, we'll generate index entries on stderr ! .\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and ! .\" index entries marked with X<> in POD. Of course, you'll have to process ! .\" the output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" --- 48,57 ---- . ds R" '' 'br\} .\" ! .\" If the F register is turned on, we'll generate index entries on stderr for ! .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index ! .\" entries marked with X<> in POD. Of course, you'll have to process the ! .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" *************** *** 68,81 **** . rr F .\} .\" ! .\" For nroff, turn off justification. Always turn off hyphenation; it ! .\" makes way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. - .bd B 3 . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 --- 60,72 ---- . rr F .\} .\" ! .\" For nroff, turn off justification. Always turn off hyphenation; it makes ! .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 *************** *** 135,145 **** . ds Ae AE .\} .rm #[ #] #H #V #F C ! .\" ====================================================================== .\" ! .IX Title "FASTJAR 1" ! .TH FASTJAR 1 "gcc-3.3.3" "2004-02-14" "GNU" ! .UC .SH "NAME" jar \- archive tool for Java archives .SH "SYNOPSIS" --- 126,135 ---- . ds Ae AE .\} .rm #[ #] #H #V #F C ! .\" ======================================================================== .\" ! .IX Title "JAR 1" ! .TH JAR 1 "2004-04-19" "gcc-3.4.0" "GNU" .SH "NAME" jar \- archive tool for Java archives .SH "SYNOPSIS" *************** the same order the \fB\-m\fR and \fB\-f\ *** 157,211 **** .SH "OPTIONS" .IX Header "OPTIONS" Exactly one of the following actions must be specified: ! .Ip "\fB\-c\fR" 4 .IX Item "-c" Create new archive. ! .Ip "\fB\-t\fR" 4 .IX Item "-t" List table of contents for archive. ! .Ip "\fB\-x\fR" 4 .IX Item "-x" Extract named (or all) files from archive. ! .Ip "\fB\-u\fR" 4 .IX Item "-u" Update existing archive. This option is disabled due to bugs (currently fails with exit status 1 and does nothing). .PP The following parameters are optional: ! .Ip "\fB\-@\fR" 4 .IX Item "-@" Read the names of the files to add to the archive from stdin. This option is supported only in combination with \fB\-c\fR or \fB\-u\fR. Non standard option added in the \s-1GCC\s0 version. ! .Ip "\fB\-C\fR \fIdirectory\fR" 4 .IX Item "-C directory" Change to the \fIdirectory\fR and include the following file. ! .Ip "\fB\-E\fR" 4 .IX Item "-E" Prevent fastjar from reading the content of a directory when specifying one (and instead relying on the provided list of files to populate the archive with regard to the directory entry). Non standard option added in the \s-1GCC\s0 version. ! .Ip "\fB\-M\fR" 4 .IX Item "-M" Do not create a manifest file for the entries. ! .Ip "\fB\-0\fR" 4 .IX Item "-0" Store only; use no \s-1ZIP\s0 compression. ! .Ip "\fB\-V\fR" 4 .IX Item "-V" .PD 0 ! .Ip "\fB\*(--version\fR" 4 ! .IX Item "version" .PD Display version information. ! .Ip "\fB\-f\fR \fIarchive\fR" 4 .IX Item "-f archive" Specify archive file name. ! .Ip "\fB\-m\fR \fImanifest\fR" 4 .IX Item "-m manifest" Include manifest information from specified \fImanifest\fR file. ! .Ip "\fB\-v\fR" 4 .IX Item "-v" Generate verbose output on standard output. .PP --- 147,201 ---- .SH "OPTIONS" .IX Header "OPTIONS" Exactly one of the following actions must be specified: ! .IP "\fB\-c\fR" 4 .IX Item "-c" Create new archive. ! .IP "\fB\-t\fR" 4 .IX Item "-t" List table of contents for archive. ! .IP "\fB\-x\fR" 4 .IX Item "-x" Extract named (or all) files from archive. ! .IP "\fB\-u\fR" 4 .IX Item "-u" Update existing archive. This option is disabled due to bugs (currently fails with exit status 1 and does nothing). .PP The following parameters are optional: ! .IP "\fB\-@\fR" 4 .IX Item "-@" Read the names of the files to add to the archive from stdin. This option is supported only in combination with \fB\-c\fR or \fB\-u\fR. Non standard option added in the \s-1GCC\s0 version. ! .IP "\fB\-C\fR \fIdirectory\fR" 4 .IX Item "-C directory" Change to the \fIdirectory\fR and include the following file. ! .IP "\fB\-E\fR" 4 .IX Item "-E" Prevent fastjar from reading the content of a directory when specifying one (and instead relying on the provided list of files to populate the archive with regard to the directory entry). Non standard option added in the \s-1GCC\s0 version. ! .IP "\fB\-M\fR" 4 .IX Item "-M" Do not create a manifest file for the entries. ! .IP "\fB\-0\fR" 4 .IX Item "-0" Store only; use no \s-1ZIP\s0 compression. ! .IP "\fB\-V\fR" 4 .IX Item "-V" .PD 0 ! .IP "\fB\-\-version\fR" 4 ! .IX Item "--version" .PD Display version information. ! .IP "\fB\-f\fR \fIarchive\fR" 4 .IX Item "-f archive" Specify archive file name. ! .IP "\fB\-m\fR \fImanifest\fR" 4 .IX Item "-m manifest" Include manifest information from specified \fImanifest\fR file. ! .IP "\fB\-v\fR" 4 .IX Item "-v" Generate verbose output on standard output. .PP diff -Nrc3pad gcc-3.3.3/fastjar/jargrep.c gcc-3.4.0/fastjar/jargrep.c *** gcc-3.3.3/fastjar/jargrep.c 2003-01-28 22:25:27.000000000 +0000 --- gcc-3.4.0/fastjar/jargrep.c 2003-01-28 22:25:47.000000000 +0000 *************** returns: TRUE if it is a word, FALSE of *** 375,381 **** static int chk_wrd(regex_t *exp, const char *str) { int wrd_fnd = FALSE; - int regflag; int frnt_ok; int bck_ok; const char *str2; --- 375,380 ---- *************** static int chk_wrd(regex_t *exp, const c *** 383,389 **** str2 = str; frnt_ok = bck_ok = FALSE; ! while(!wrd_fnd && !(regflag = regexec(exp, str2, 1, &match, 0))) { if(!match.rm_so && (str2 == str)) frnt_ok = TRUE; else if(!isalnum((unsigned char)str2[match.rm_so - 1]) && str2[match.rm_so - 1] != '_') --- 382,388 ---- str2 = str; frnt_ok = bck_ok = FALSE; ! while(!wrd_fnd && !regexec(exp, str2, 1, &match, 0)) { if(!match.rm_so && (str2 == str)) frnt_ok = TRUE; else if(!isalnum((unsigned char)str2[match.rm_so - 1]) && str2[match.rm_so - 1] != '_') diff -Nrc3pad gcc-3.3.3/fastjar/jartool.c gcc-3.4.0/fastjar/jartool.c *** gcc-3.3.3/fastjar/jartool.c 2003-01-31 22:48:13.000000000 +0000 --- gcc-3.4.0/fastjar/jartool.c 2004-01-07 18:46:04.000000000 +0000 *************** int consume(pb_file *, int); *** 274,280 **** int list_jar(int, char**, int); int extract_jar(int, char**, int); int add_file_to_jar(int, int, const char*, struct stat*); ! int add_to_jar(int, const char*, const char*); int create_central_header(int); int make_manifest(int, const char*); static void init_args(char **, int); --- 274,281 ---- int list_jar(int, char**, int); int extract_jar(int, char**, int); int add_file_to_jar(int, int, const char*, struct stat*); ! int add_to_jar(int, const char*); ! int add_to_jar_with_dir(int, const char*, const char*); int create_central_header(int); int make_manifest(int, const char*); static void init_args(char **, int); *************** int number_of_entries; /* number of entr *** 312,317 **** --- 313,323 ---- /* This holds all options. */ #define OPTION_STRING "-ctxuvVf:m:C:0ME@" + /* Define the MANIFEST content here to have it easier with calculations + below. This is for the case we create an empty MANIFEST.MF. */ + #define MANIFEST_STR "Manifest-Version: 1.0\nCreated-By: " + #define MANIFEST_END "\n\n" + static const struct option options[] = { { "help", no_argument, NULL, OPT_HELP }, *************** int main(int argc, char **argv){ *** 327,333 **** int manifest = TRUE; int opt; - int j; int jarfd = -1; /* These are used to collect file names and `-C' options for the --- 333,338 ---- *************** int main(int argc, char **argv){ *** 345,352 **** if(argc < 2) usage(argv[0]); - j = strlen(argv[1]); - new_argc = 0; new_argv = (char **) malloc (argc * sizeof (char *)); --- 350,355 ---- *************** int main(int argc, char **argv){ *** 510,524 **** if(!strcmp(arg, "-C")){ const char *dir_to_change = get_next_arg (); const char *file_to_add = get_next_arg (); ! if(!dir_to_change ! || !file_to_add ! || add_to_jar(jarfd, dir_to_change, file_to_add)){ ! printf("Error adding %s to jar archive!\n", arg); exit(1); } } else { ! if(add_to_jar(jarfd, NULL, arg)){ ! printf("Error adding %s to jar archive!\n", arg); exit(1); } } --- 513,531 ---- if(!strcmp(arg, "-C")){ const char *dir_to_change = get_next_arg (); const char *file_to_add = get_next_arg (); ! if (!dir_to_change || !file_to_add) { ! fprintf(stderr, "Error: missing argument for -C.\n"); ! exit(1); ! } ! if (add_to_jar_with_dir(jarfd, dir_to_change, file_to_add)) { ! fprintf(stderr, ! "Error adding %s (in directory %s) to jar archive!\n", ! file_to_add, dir_to_change); exit(1); } } else { ! if(add_to_jar(jarfd, arg)){ ! fprintf(stderr, "Error adding %s to jar archive!\n", arg); exit(1); } } *************** int make_manifest(int jfd, const char *m *** 730,742 **** /* if the user didn't specify an external manifest file... */ if(mf_name == NULL){ ! int mf_len = 37 + strlen(VERSION); char *mf; if((mf = (char *) malloc(mf_len + 1))) { uLong crc; ! sprintf(mf, "Manifest-Version: 1.0\nCreated-By: %s\n\n", VERSION); crc = crc32(0L, Z_NULL, 0); --- 737,750 ---- /* if the user didn't specify an external manifest file... */ if(mf_name == NULL){ ! ! int mf_len = strlen(MANIFEST_STR) + strlen(VERSION) + strlen(MANIFEST_END); char *mf; if((mf = (char *) malloc(mf_len + 1))) { uLong crc; ! sprintf(mf, "%s%s%s", MANIFEST_STR, VERSION, MANIFEST_END); crc = crc32(0L, Z_NULL, 0); *************** int make_manifest(int jfd, const char *m *** 814,827 **** return 0; } ! int add_to_jar(int fd, const char *new_dir, const char *file){ struct stat statbuf; DIR *dir; struct dirent *de; zipentry *ze; int stat_return; ! char *old_dir = NULL; ! /* This is a quick compatibility fix -- Simon Weijgers * It fixes this: * "normal" jar : org/apache/java/io/LogRecord.class --- 822,858 ---- return 0; } ! /* Implements -C by wrapping add_to_jar. new_dir is the directory ! to switch to. */ ! int ! add_to_jar_with_dir (int fd, const char* new_dir, const char* file) ! { ! int retval; ! char old_dir[MAXPATHLEN]; ! if (getcwd(old_dir, MAXPATHLEN) == NULL) { ! perror("getcwd"); ! return 1; ! } ! if (chdir(new_dir) == -1) { ! perror(new_dir); ! return 1; ! } ! retval=add_to_jar(fd, file); ! if (chdir(old_dir) == -1) { ! perror(old_dir); ! return 1; ! } ! return retval; ! } ! ! int ! add_to_jar (int fd, const char *file) { struct stat statbuf; DIR *dir; struct dirent *de; zipentry *ze; int stat_return; ! /* This is a quick compatibility fix -- Simon Weijgers * It fixes this: * "normal" jar : org/apache/java/io/LogRecord.class *************** int add_to_jar(int fd, const char *new_d *** 832,848 **** while (*file=='.' && *(file+1)=='/') file+=2; - /* If new_dir isn't null, we need to change to that directory. However, - we also need to return to the old directory when we're done */ - if(new_dir != NULL){ - old_dir = getcwd(NULL, 0); - - if(chdir(new_dir) == -1){ - perror(new_dir); - return 1; - } - } - if(jarfile && !strcmp(file, jarfile)){ if(verbose) printf("skipping: %s\n", file); --- 863,868 ---- *************** int add_to_jar(int fd, const char *new_d *** 933,939 **** strcpy(t_ptr, de->d_name); ! if(add_to_jar(fd, NULL, fullname)){ fprintf(stderr, "Error adding file to jar!\n"); return 1; } --- 953,959 ---- strcpy(t_ptr, de->d_name); ! if (add_to_jar(fd, fullname)) { fprintf(stderr, "Error adding file to jar!\n"); return 1; } *************** int add_to_jar(int fd, const char *new_d *** 948,954 **** add_fd = open(file, O_RDONLY | O_BINARY); if(add_fd < 0){ fprintf(stderr, "Error opening %s.\n", file); ! return 0; } if(add_file_to_jar(fd, add_fd, file, &statbuf)){ --- 968,974 ---- add_fd = open(file, O_RDONLY | O_BINARY); if(add_fd < 0){ fprintf(stderr, "Error opening %s.\n", file); ! return 1; } if(add_file_to_jar(fd, add_fd, file, &statbuf)){ *************** int add_to_jar(int fd, const char *new_d *** 959,972 **** } else { fprintf(stderr, "Illegal file specified: %s\n", file); } - - if(old_dir != NULL){ - if(chdir(old_dir)) - perror(old_dir); - - free(old_dir); - } - return 0; } --- 979,984 ---- *************** int create_central_header(int fd){ *** 1121,1133 **** ub1 end_header[22]; int start_offset; int dir_size; - int *iheader; int total_in = 0, total_out = 22; zipentry *ze; - iheader = (int*)header; - /* magic number */ header[0] = 'P'; header[1] = 'K'; --- 1133,1142 ---- *************** int extract_jar(int fd, char **files, in *** 1545,1551 **** } int list_jar(int fd, char **files, int file_num){ - int rdamt; ub4 signature; ub4 csize; ub4 usize; --- 1554,1559 ---- *************** int list_jar(int fd, char **files, int f *** 1708,1714 **** init_inflation(); for(;;){ ! if((rdamt = pb_read(&pbf, scratch, 4)) != 4){ perror("read"); break; } --- 1716,1722 ---- init_inflation(); for(;;){ ! if(pb_read(&pbf, scratch, 4) != 4){ perror("read"); break; } *************** int list_jar(int fd, char **files, int f *** 1737,1743 **** break; } ! if((rdamt = pb_read(&pbf, (file_header + 4), 26)) != 26){ perror("read"); break; } --- 1745,1751 ---- break; } ! if(pb_read(&pbf, (file_header + 4), 26) != 26){ perror("read"); break; } *************** int list_jar(int fd, char **files, int f *** 1776,1782 **** tdate = dos2unixtime(mdate); s_tm = localtime(&tdate); strftime(ascii_date, 30, "%a %b %d %H:%M:%S %Z %Y", s_tm); - ascii_date[30] = '\0'; } if(filename_len < fnlen + 1){ --- 1784,1789 ---- *************** int list_jar(int fd, char **files, int f *** 1784,1789 **** --- 1791,1797 ---- free(filename); filename = malloc(sizeof(ub1) * (fnlen + 1)); + ascii_date[30] = '\0'; filename_len = fnlen + 1; } diff -Nrc3pad gcc-3.3.3/fastjar/jartool.h gcc-3.4.0/fastjar/jartool.h *** gcc-3.3.3/fastjar/jartool.h 2000-12-09 03:08:23.000000000 +0000 --- gcc-3.4.0/fastjar/jartool.h 2000-12-09 03:08:23.000000000 +0000 *************** *** 1,11 **** ! /* $Id: jartool.h,v 1.1 2000/12/09 03:08:23 apbianco Exp $ $Log: jartool.h,v $ - Revision 1.1 2000/12/09 03:08:23 apbianco - 2000-12-08 Alexandre Petit-Bianco - - * fastjar: Imported. - Revision 1.4 2000/08/24 15:23:35 cory Set version number since I think we can let this one out. --- 1,6 ---- ! /* $Id: jartool.h,v 1.4 2000/08/24 15:23:35 cory Exp $ $Log: jartool.h,v $ Revision 1.4 2000/08/24 15:23:35 cory Set version number since I think we can let this one out. diff -Nrc3pad gcc-3.3.3/fastjar/Makefile.am gcc-3.4.0/fastjar/Makefile.am *** gcc-3.3.3/fastjar/Makefile.am 2003-08-14 05:48:44.000000000 +0000 --- gcc-3.4.0/fastjar/Makefile.am 2004-04-14 23:49:37.000000000 +0000 *************** grepjar_LDADD = $(ZLIBS) $(LIBIBERTY) *** 57,62 **** --- 57,63 ---- grepjar_DEPENDENCIES = $(ZDEPS) $(LIBIBERTY) AM_CFLAGS = @fastjar_warn_cflags@ + AM_MAKEINFOFLAGS = -I $(srcdir)/../gcc/doc/include TEXINFO_TEX = ../gcc/doc/include/texinfo.tex info_TEXINFOS = fastjar.texi *************** fastjar_TEXINFOS = \ *** 66,97 **** man_MANS = jar.1 grepjar.1 EXTRA_DIST = $(man_MANS) - ## This is a hack. We can't set AM_MAKEINFOFLAGS, since that isn't - ## available in 1.4. Nor can we override or append to MAKEINFO or - ## MAKEINFOFLAGS, since these are overridden by the top-level - ## Makefile. So, we just duplicate the rules. FIXME: remove this - ## when we upgrade automake. Note that we don't include $(srcdir) in - ## my_makei_flags; makeinfo is run in srcdir. - my_makei_flags += -I ../gcc/doc/include - fastjar.info: fastjar.texi $(fastjar_TEXINFOS) - @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] - cd $(srcdir) \ - && $(MAKEINFO) $(my_makei_flags) `echo $< | sed 's,.*/,,'` - - TEXI2POD = perl $(srcdir)/../contrib/texi2pod.pl POD2MAN = pod2man --center="GNU" --release="gcc-@gcc_version@" ! $(srcdir)/jar.1: $(srcdir)/fastjar.texi ! -$(TEXI2POD) -D jar < $(srcdir)/fastjar.texi > fastjar.pod ! -($(POD2MAN) --section=1 fastjar.pod > jar.1.T$$$$ && \ ! mv -f jar.1.T$$$$ $(srcdir)/jar.1) || \ ! (rm -f jar.1.T$$$$ && exit 1) ! -rm -f fastjar.pod ! $(srcdir)/grepjar.1: $(srcdir)/fastjar.texi ! -$(TEXI2POD) -D grepjar < $(srcdir)/fastjar.texi > grepjar.pod ! -($(POD2MAN) --section=1 grepjar.pod > grepjar.1.T$$$$ && \ ! mv -f grepjar.1.T$$$$ $(srcdir)/grepjar.1) || \ ! (rm -f grepjar.1.T$$$$ && exit 1) ! -rm -f grepjar.pod --- 67,108 ---- man_MANS = jar.1 grepjar.1 EXTRA_DIST = $(man_MANS) TEXI2POD = perl $(srcdir)/../contrib/texi2pod.pl POD2MAN = pod2man --center="GNU" --release="gcc-@gcc_version@" ! %.1: %.pod ! -($(POD2MAN) --section=1 $< > $(@).T$$$$ && \ ! mv -f $(@).T$$$$ $@) || \ ! (rm -f $(@).T$$$$ && exit 1) ! .INTERMEDIATE: jar.pod grepjar.pod ! ! jar.pod: $(srcdir)/fastjar.texi ! -$(TEXI2POD) -D jar $< > $@ ! ! grepjar.pod: $(srcdir)/fastjar.texi ! -$(TEXI2POD) -D grepjar $< > $@ ! ! # GCC LOCAL CHANGE ! # The following commands allow us to release tarballs with the man pages ! # and info documentation prebuilt. This feature is enabled via ! # --enable-generated-files-in-srcdir in the configure script. ! ! if GENINSRC ! STAMP_GENINSRC = stamp-geninsrc ! else ! STAMP_GENINSRC = ! endif ! ! all-local: $(STAMP_GENINSRC) ! ! stamp-geninsrc: jar.1 grepjar.1 fastjar.info ! -cp -p $(top_builddir)/jar.1 $(srcdir)/jar.1 ! -cp -p $(top_builddir)/grepjar.1 $(srcdir)/grepjar.1 ! -cp -p $(top_builddir)/fastjar.info $(srcdir)/fastjar.info ! touch $@ ! ! CLEANFILES = stamp-geninsrc ! MAINTAINERCLEANFILES = $(srcdir)/jar.1 \ ! $(srcdir)/grepjar.1 \ ! $(srcdir)/fastjar.info diff -Nrc3pad gcc-3.3.3/fastjar/Makefile.in gcc-3.4.0/fastjar/Makefile.in *** gcc-3.3.3/fastjar/Makefile.in 2004-02-14 20:34:20.000000000 +0000 --- gcc-3.4.0/fastjar/Makefile.in 2004-04-19 02:23:04.000000000 +0000 *************** *** 1,6 **** ! # Makefile.in generated automatically by automake 1.4-p6 from Makefile.am ! # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. --- 1,8 ---- ! # Makefile.in generated by automake 1.7.9 from Makefile.am. ! # @configure_input@ ! # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 ! # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. *************** *** 10,86 **** # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. ! # Process this with automake to create Makefile.in ! ! SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ - prefix = @prefix@ - exec_prefix = @exec_prefix@ - - bindir = @bindir@ - sbindir = @sbindir@ - libexecdir = @libexecdir@ - datadir = @datadir@ - sysconfdir = @sysconfdir@ - sharedstatedir = @sharedstatedir@ - localstatedir = @localstatedir@ - libdir = @libdir@ - infodir = @infodir@ - mandir = @mandir@ - includedir = @includedir@ - oldincludedir = /usr/include - - DESTDIR = - pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ - top_builddir = . ! ACLOCAL = @ACLOCAL@ ! AUTOCONF = @AUTOCONF@ ! AUTOMAKE = @AUTOMAKE@ ! AUTOHEADER = @AUTOHEADER@ ! INSTALL = @INSTALL@ ! INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) ! INSTALL_DATA = @INSTALL_DATA@ ! INSTALL_SCRIPT = @INSTALL_SCRIPT@ ! transform = @program_transform_name@ ! NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : CC = @CC@ CHMOD = @CHMOD@ CP = @CP@ EXEEXT = @EXEEXT@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ RM = @RM@ STRIP = @STRIP@ VERSION = @VERSION@ ZDEPS = @ZDEPS@ ZINCS = @ZINCS@ ZLIBS = @ZLIBS@ fastjar_warn_cflags = @fastjar_warn_cflags@ gcc_version = @gcc_version@ AUTOMAKE_OPTIONS = no-dependencies # Work around what appears to be a GNU make bug handling MAKEFLAGS # values defined in terms of make variables, as is the case for CC and # friends when we are called from the top level Makefile. ! AM_MAKEFLAGS = "AR_FLAGS=$(AR_FLAGS)" "CC_FOR_BUILD=$(CC_FOR_BUILD)" "CFLAGS=$(CFLAGS)" "CXXFLAGS=$(CXXFLAGS)" "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" "INSTALL=$(INSTALL)" "INSTALL_DATA=$(INSTALL_DATA)" "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" "JC1FLAGS=$(JC1FLAGS)" "LDFLAGS=$(LDFLAGS)" "LIBCFLAGS=$(LIBCFLAGS)" "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" "MAKE=$(MAKE)" "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" "PICFLAG=$(PICFLAG)" "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" "SHELL=$(SHELL)" "exec_prefix=$(exec_prefix)" "infodir=$(infodir)" "libdir=$(libdir)" "prefix=$(prefix)" "AR=$(AR)" "AS=$(AS)" "CC=$(CC)" "CXX=$(CXX)" "LD=$(LD)" "LIBCFLAGS=$(LIBCFLAGS)" "NM=$(NM)" "PICFLAG=$(PICFLAG)" "RANLIB=$(RANLIB)" "DESTDIR=$(DESTDIR)" INCLUDES = -I. -I$(top_srcdir) $(ZINCS) -I$(top_srcdir)/../include --- 12,163 ---- # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. ! @SET_MAKE@ ! # Process this with automake to create Makefile.in srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . ! am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ ! install_sh_DATA = $(install_sh) -c -m 644 ! install_sh_PROGRAM = $(install_sh) -c ! install_sh_SCRIPT = $(install_sh) -c ! INSTALL_HEADER = $(INSTALL_DATA) ! transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : + ACLOCAL = @ACLOCAL@ + AMDEP_FALSE = @AMDEP_FALSE@ + AMDEP_TRUE = @AMDEP_TRUE@ + AMTAR = @AMTAR@ + AUTOCONF = @AUTOCONF@ + AUTOHEADER = @AUTOHEADER@ + AUTOMAKE = @AUTOMAKE@ + AWK = @AWK@ CC = @CC@ + CCDEPMODE = @CCDEPMODE@ + CFLAGS = @CFLAGS@ CHMOD = @CHMOD@ CP = @CP@ + CPP = @CPP@ + CPPFLAGS = @CPPFLAGS@ + CYGPATH_W = @CYGPATH_W@ + DEFS = @DEFS@ + DEPDIR = @DEPDIR@ + ECHO_C = @ECHO_C@ + ECHO_N = @ECHO_N@ + ECHO_T = @ECHO_T@ + EGREP = @EGREP@ EXEEXT = @EXEEXT@ + GENINSRC_FALSE = @GENINSRC_FALSE@ + GENINSRC_TRUE = @GENINSRC_TRUE@ + INSTALL_DATA = @INSTALL_DATA@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ + MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ + MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ + OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ + PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ RM = @RM@ + SET_MAKE = @SET_MAKE@ + SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ZDEPS = @ZDEPS@ ZINCS = @ZINCS@ ZLIBS = @ZLIBS@ + ac_ct_CC = @ac_ct_CC@ + ac_ct_STRIP = @ac_ct_STRIP@ + am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ + am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ + am__include = @am__include@ + am__leading_dot = @am__leading_dot@ + am__quote = @am__quote@ + bindir = @bindir@ + build_alias = @build_alias@ + datadir = @datadir@ + exec_prefix = @exec_prefix@ fastjar_warn_cflags = @fastjar_warn_cflags@ gcc_version = @gcc_version@ + host_alias = @host_alias@ + includedir = @includedir@ + infodir = @infodir@ + install_sh = @install_sh@ + libdir = @libdir@ + libexecdir = @libexecdir@ + localstatedir = @localstatedir@ + mandir = @mandir@ + oldincludedir = @oldincludedir@ + prefix = @prefix@ + program_transform_name = @program_transform_name@ + sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ AUTOMAKE_OPTIONS = no-dependencies # Work around what appears to be a GNU make bug handling MAKEFLAGS # values defined in terms of make variables, as is the case for CC and # friends when we are called from the top level Makefile. ! AM_MAKEFLAGS = \ ! "AR_FLAGS=$(AR_FLAGS)" \ ! "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ ! "CFLAGS=$(CFLAGS)" \ ! "CXXFLAGS=$(CXXFLAGS)" \ ! "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ ! "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ ! "INSTALL=$(INSTALL)" \ ! "INSTALL_DATA=$(INSTALL_DATA)" \ ! "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ ! "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ ! "JC1FLAGS=$(JC1FLAGS)" \ ! "LDFLAGS=$(LDFLAGS)" \ ! "LIBCFLAGS=$(LIBCFLAGS)" \ ! "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ ! "MAKE=$(MAKE)" \ ! "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ ! "PICFLAG=$(PICFLAG)" \ ! "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \ ! "SHELL=$(SHELL)" \ ! "exec_prefix=$(exec_prefix)" \ ! "infodir=$(infodir)" \ ! "libdir=$(libdir)" \ ! "prefix=$(prefix)" \ ! "AR=$(AR)" \ ! "AS=$(AS)" \ ! "CC=$(CC)" \ ! "CXX=$(CXX)" \ ! "LD=$(LD)" \ ! "LIBCFLAGS=$(LIBCFLAGS)" \ ! "NM=$(NM)" \ ! "PICFLAG=$(PICFLAG)" \ ! "RANLIB=$(RANLIB)" \ ! "DESTDIR=$(DESTDIR)" INCLUDES = -I. -I$(top_srcdir) $(ZINCS) -I$(top_srcdir)/../include *************** INCLUDES = -I. -I$(top_srcdir) $(ZINCS) *** 88,378 **** LIBIBERTY = ../libiberty/libiberty.a bin_PROGRAMS = jar grepjar ! jar_SOURCES = jartool.c dostime.c compress.c pushback.c jartool.h zipfile.h dostime.h compress.h pushback.h jar_LDADD = $(ZLIBS) $(LIBIBERTY) jar_DEPENDENCIES = $(ZDEPS) $(LIBIBERTY) ! grepjar_SOURCES = jargrep.c dostime.c compress.c pushback.c jartool.h zipfile.h dostime.h compress.h pushback.h grepjar_LDADD = $(ZLIBS) $(LIBIBERTY) grepjar_DEPENDENCIES = $(ZDEPS) $(LIBIBERTY) AM_CFLAGS = @fastjar_warn_cflags@ TEXINFO_TEX = ../gcc/doc/include/texinfo.tex info_TEXINFOS = fastjar.texi ! fastjar_TEXINFOS = ../gcc/doc/include/gcc-common.texi ../gcc/doc/include/gpl.texi man_MANS = jar.1 grepjar.1 EXTRA_DIST = $(man_MANS) - my_makei_flags = -I ../gcc/doc/include - TEXI2POD = perl $(srcdir)/../contrib/texi2pod.pl POD2MAN = pod2man --center="GNU" --release="gcc-@gcc_version@" ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ! mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h ! CONFIG_CLEAN_FILES = install-defs.sh ! bin_PROGRAMS = jar$(EXEEXT) grepjar$(EXEEXT) ! PROGRAMS = $(bin_PROGRAMS) ! DEFS = @DEFS@ -I. -I$(srcdir) -I. ! CPPFLAGS = @CPPFLAGS@ ! LDFLAGS = @LDFLAGS@ ! LIBS = @LIBS@ ! jar_OBJECTS = jartool.o dostime.o compress.o pushback.o ! jar_LDFLAGS = ! grepjar_OBJECTS = jargrep.o dostime.o compress.o pushback.o ! grepjar_LDFLAGS = ! CFLAGS = @CFLAGS@ ! COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) ! LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ ! TEXI2DVI = texi2dvi INFO_DEPS = fastjar.info DVIS = fastjar.dvi TEXINFOS = fastjar.texi - man1dir = $(mandir)/man1 - MANS = $(man_MANS) NROFF = nroff ! DIST_COMMON = README $(fastjar_TEXINFOS) ./stamp-h.in AUTHORS COPYING \ ! ChangeLog INSTALL Makefile.am Makefile.in NEWS acinclude.m4 aclocal.m4 \ ! config.h.in configure configure.in install-defs.sh.in install-sh \ ! missing mkinstalldirs ! ! ! DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) ! TAR = tar ! GZIP_ENV = --best ! SOURCES = $(jar_SOURCES) $(grepjar_SOURCES) ! OBJECTS = $(jar_OBJECTS) $(grepjar_OBJECTS) - all: all-redirect .SUFFIXES: ! .SUFFIXES: .S .c .dvi .info .o .ps .s .texi .texinfo .txi ! $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ! cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile ! ! Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ! cd $(top_builddir) \ ! && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status ! $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4 ! cd $(srcdir) && $(ACLOCAL) ! config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck ! $(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) ! config.h: stamp-h ! @if test ! -f $@; then \ ! rm -f stamp-h; \ ! $(MAKE) stamp-h; \ ! else :; fi ! stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status ! cd $(top_builddir) \ ! && CONFIG_FILES= CONFIG_HEADERS=config.h \ ! $(SHELL) ./config.status ! @echo timestamp > stamp-h 2> /dev/null ! $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in @if test ! -f $@; then \ ! rm -f $(srcdir)/stamp-h.in; \ ! $(MAKE) $(srcdir)/stamp-h.in; \ else :; fi - $(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOHEADER) - @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null ! mostlyclean-hdr: ! clean-hdr: distclean-hdr: ! -rm -f config.h ! ! maintainer-clean-hdr: install-defs.sh: $(top_builddir)/config.status install-defs.sh.in ! cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status ! ! mostlyclean-binPROGRAMS: ! ! clean-binPROGRAMS: ! -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) ! ! distclean-binPROGRAMS: ! ! maintainer-clean-binPROGRAMS: ! install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ ! if test -f $$p; then \ ! echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ ! $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) ! list='$(bin_PROGRAMS)'; for p in $$list; do \ ! rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ done ! .c.o: ! $(COMPILE) -c $< ! ! .s.o: ! $(COMPILE) -c $< ! ! .S.o: ! $(COMPILE) -c $< mostlyclean-compile: ! -rm -f *.o core *.core ! ! clean-compile: distclean-compile: -rm -f *.tab.c ! maintainer-clean-compile: ! ! jar$(EXEEXT): $(jar_OBJECTS) $(jar_DEPENDENCIES) ! @rm -f jar$(EXEEXT) ! $(LINK) $(jar_LDFLAGS) $(jar_OBJECTS) $(jar_LDADD) $(LIBS) ! ! grepjar$(EXEEXT): $(grepjar_OBJECTS) $(grepjar_DEPENDENCIES) ! @rm -f grepjar$(EXEEXT) ! $(LINK) $(grepjar_LDFLAGS) $(grepjar_OBJECTS) $(grepjar_LDADD) $(LIBS) ! ! fastjar.info: fastjar.texi $(fastjar_TEXINFOS) ! fastjar.dvi: fastjar.texi $(fastjar_TEXINFOS) ! ! DVIPS = dvips .texi.info: ! @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] ! cd $(srcdir) \ ! && $(MAKEINFO) `echo $< | sed 's,.*/,,'` .texi.dvi: ! TEXINPUTS=$(srcdir)/../gcc/doc/include:$$TEXINPUTS \ ! MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< ! ! .texi: ! @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] ! cd $(srcdir) \ ! && $(MAKEINFO) `echo $< | sed 's,.*/,,'` ! ! .texinfo.info: ! @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] ! cd $(srcdir) \ ! && $(MAKEINFO) `echo $< | sed 's,.*/,,'` ! ! .texinfo: ! @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] ! cd $(srcdir) \ ! && $(MAKEINFO) `echo $< | sed 's,.*/,,'` ! ! .texinfo.dvi: ! TEXINPUTS=$(srcdir)/../gcc/doc/include:$$TEXINPUTS \ ! MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< ! ! .txi.info: ! @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] ! cd $(srcdir) \ ! && $(MAKEINFO) `echo $< | sed 's,.*/,,'` ! .txi.dvi: ! TEXINPUTS=$(srcdir)/../gcc/doc/include:$$TEXINPUTS \ ! MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< ! .txi: ! @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] ! cd $(srcdir) \ ! && $(MAKEINFO) `echo $< | sed 's,.*/,,'` .dvi.ps: ! $(DVIPS) $< -o $@ ! install-info-am: $(INFO_DEPS) ! @$(NORMAL_INSTALL) ! $(mkinstalldirs) $(DESTDIR)$(infodir) ! @list='$(INFO_DEPS)'; \ ! for file in $$list; do \ ! d=$(srcdir); \ ! for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \ ! if test -f $$d/$$ifile; then \ ! echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \ ! $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \ ! else : ; fi; \ ! done; \ ! done ! @$(POST_INSTALL) ! @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ ! echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\ ! install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\ done; \ ! else : ; fi ! ! uninstall-info: ! $(PRE_UNINSTALL) ! @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ ! ii=yes; \ ! else ii=; fi; \ ! list='$(INFO_DEPS)'; \ ! for file in $$list; do \ ! test -z "$$ii" \ ! || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \ ! done @$(NORMAL_UNINSTALL) ! list='$(INFO_DEPS)'; \ for file in $$list; do \ ! (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \ done dist-info: $(INFO_DEPS) list='$(INFO_DEPS)'; \ for base in $$list; do \ ! d=$(srcdir); \ ! for file in `cd $$d && eval echo $$base*`; do \ ! test -f $(distdir)/$$file \ ! || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ ! || cp -p $$d/$$file $(distdir)/$$file; \ done; \ done mostlyclean-aminfo: ! -rm -f fastjar.aux fastjar.cp fastjar.cps fastjar.dvi fastjar.fn \ ! fastjar.fns fastjar.ky fastjar.kys fastjar.ps fastjar.log \ ! fastjar.pg fastjar.toc fastjar.tp fastjar.tps fastjar.vr \ ! fastjar.vrs fastjar.op fastjar.tr fastjar.cv fastjar.cn ! ! clean-aminfo: ! ! distclean-aminfo: maintainer-clean-aminfo: ! cd $(srcdir) && for i in $(INFO_DEPS); do \ ! rm -f $$i; \ ! if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \ ! rm -f $$i-[0-9]*; \ ! fi; \ done ! install-man1: $(mkinstalldirs) $(DESTDIR)$(man1dir) ! @list='$(man1_MANS)'; \ ! l2='$(man_MANS)'; for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ --- 165,411 ---- LIBIBERTY = ../libiberty/libiberty.a bin_PROGRAMS = jar grepjar ! jar_SOURCES = jartool.c dostime.c compress.c pushback.c jartool.h \ ! zipfile.h dostime.h compress.h pushback.h jar_LDADD = $(ZLIBS) $(LIBIBERTY) jar_DEPENDENCIES = $(ZDEPS) $(LIBIBERTY) ! grepjar_SOURCES = jargrep.c dostime.c compress.c pushback.c jartool.h \ ! zipfile.h dostime.h compress.h pushback.h grepjar_LDADD = $(ZLIBS) $(LIBIBERTY) grepjar_DEPENDENCIES = $(ZDEPS) $(LIBIBERTY) AM_CFLAGS = @fastjar_warn_cflags@ + AM_MAKEINFOFLAGS = -I $(srcdir)/../gcc/doc/include TEXINFO_TEX = ../gcc/doc/include/texinfo.tex info_TEXINFOS = fastjar.texi ! fastjar_TEXINFOS = \ ! ../gcc/doc/include/gcc-common.texi \ ! ../gcc/doc/include/gpl.texi man_MANS = jar.1 grepjar.1 EXTRA_DIST = $(man_MANS) TEXI2POD = perl $(srcdir)/../contrib/texi2pod.pl POD2MAN = pod2man --center="GNU" --release="gcc-@gcc_version@" + @GENINSRC_FALSE@STAMP_GENINSRC = + + + # GCC LOCAL CHANGE + # The following commands allow us to release tarballs with the man pages + # and info documentation prebuilt. This feature is enabled via + # --enable-generated-files-in-srcdir in the configure script. + @GENINSRC_TRUE@STAMP_GENINSRC = stamp-geninsrc + + CLEANFILES = stamp-geninsrc + MAINTAINERCLEANFILES = $(srcdir)/jar.1 \ + $(srcdir)/grepjar.1 \ + $(srcdir)/fastjar.info + + subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ! mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs CONFIG_HEADER = config.h ! CONFIG_CLEAN_FILES = install-defs.sh ! bin_PROGRAMS = jar$(EXEEXT) grepjar$(EXEEXT) ! PROGRAMS = $(bin_PROGRAMS) + am_grepjar_OBJECTS = jargrep.$(OBJEXT) dostime.$(OBJEXT) \ + compress.$(OBJEXT) pushback.$(OBJEXT) + grepjar_OBJECTS = $(am_grepjar_OBJECTS) + grepjar_LDFLAGS = + am_jar_OBJECTS = jartool.$(OBJEXT) dostime.$(OBJEXT) compress.$(OBJEXT) \ + pushback.$(OBJEXT) + jar_OBJECTS = $(am_jar_OBJECTS) + jar_LDFLAGS = ! DEFAULT_INCLUDES = -I. -I$(srcdir) -I. ! depcomp = ! am__depfiles_maybe = ! COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ ! $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) ! LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ ! DIST_SOURCES = $(grepjar_SOURCES) $(jar_SOURCES) ! am__TEXINFO_TEX_DIR = $(srcdir)/../gcc/doc/include INFO_DEPS = fastjar.info DVIS = fastjar.dvi + PDFS = fastjar.pdf + PSS = fastjar.ps TEXINFOS = fastjar.texi NROFF = nroff ! MANS = $(man_MANS) ! DIST_COMMON = README $(fastjar_TEXINFOS) $(srcdir)/Makefile.in \ ! $(srcdir)/configure ../install-sh ../missing ../mkinstalldirs \ ! AUTHORS COPYING ChangeLog INSTALL Makefile.am NEWS acinclude.m4 \ ! aclocal.m4 config.h.in configure configure.ac \ ! install-defs.sh.in ! SOURCES = $(grepjar_SOURCES) $(jar_SOURCES) ! all: config.h ! $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: ! .SUFFIXES: .c .dvi .info .o .obj .pdf .ps .texi ! am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ ! configure.lineno ! $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) ! cd $(top_srcdir) && \ ! $(AUTOMAKE) --gnu Makefile ! Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status ! cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe) ! $(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck ! $(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) ! $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.ac acinclude.m4 ! cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) ! ! config.h: stamp-h1 @if test ! -f $@; then \ ! rm -f stamp-h1; \ ! $(MAKE) stamp-h1; \ else :; fi ! stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status ! @rm -f stamp-h1 ! cd $(top_builddir) && $(SHELL) ./config.status config.h ! $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(top_srcdir)/configure.ac $(ACLOCAL_M4) ! cd $(top_srcdir) && $(AUTOHEADER) ! touch $(srcdir)/config.h.in distclean-hdr: ! -rm -f config.h stamp-h1 install-defs.sh: $(top_builddir)/config.status install-defs.sh.in ! cd $(top_builddir) && $(SHELL) ./config.status $@ ! binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ ! p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ ! if test -f $$p \ ! ; then \ ! f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ ! echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \ ! $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) ! @list='$(bin_PROGRAMS)'; for p in $$list; do \ ! f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ ! echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ ! rm -f $(DESTDIR)$(bindir)/$$f; \ done ! clean-binPROGRAMS: ! -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) ! grepjar$(EXEEXT): $(grepjar_OBJECTS) $(grepjar_DEPENDENCIES) ! @rm -f grepjar$(EXEEXT) ! $(LINK) $(grepjar_LDFLAGS) $(grepjar_OBJECTS) $(grepjar_LDADD) $(LIBS) ! jar$(EXEEXT): $(jar_OBJECTS) $(jar_DEPENDENCIES) ! @rm -f jar$(EXEEXT) ! $(LINK) $(jar_LDFLAGS) $(jar_OBJECTS) $(jar_LDADD) $(LIBS) mostlyclean-compile: ! -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c ! .c.o: ! $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< ! .c.obj: ! $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` .texi.info: ! @rm -f $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9] ! $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ ! -o $@ `test -f '$<' || echo '$(srcdir)/'`$< .texi.dvi: ! TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ ! MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ ! $(TEXI2DVI) `test -f '$<' || echo '$(srcdir)/'`$< ! .texi.pdf: ! TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ ! MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ ! $(TEXI2PDF) `test -f '$<' || echo '$(srcdir)/'`$< ! fastjar.info: fastjar.texi $(fastjar_TEXINFOS) ! fastjar.dvi: fastjar.texi $(fastjar_TEXINFOS) ! fastjar.pdf: fastjar.texi $(fastjar_TEXINFOS) ! TEXI2DVI = texi2dvi ! TEXI2PDF = $(TEXI2DVI) --pdf --batch ! DVIPS = dvips .dvi.ps: ! $(DVIPS) -o $@ $< ! uninstall-info-am: ! $(PRE_UNINSTALL) ! @if (install-info --version && \ ! install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ ! relfile=`echo "$$file" | sed 's|^.*/||'`; \ ! echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$relfile"; \ ! install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$relfile; \ done; \ ! else :; fi @$(NORMAL_UNINSTALL) ! @list='$(INFO_DEPS)'; \ for file in $$list; do \ ! relfile=`echo "$$file" | sed 's|^.*/||'`; \ ! relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ ! (if cd $(DESTDIR)$(infodir); then \ ! echo " rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9])"; \ ! rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ ! else :; fi); \ done dist-info: $(INFO_DEPS) list='$(INFO_DEPS)'; \ for base in $$list; do \ ! if test -f $$base; then d=.; else d=$(srcdir); fi; \ ! for file in $$d/$$base*; do \ ! relfile=`expr "$$file" : "$$d/\(.*\)"`; \ ! test -f $(distdir)/$$relfile || \ ! cp -p $$file $(distdir)/$$relfile; \ done; \ done mostlyclean-aminfo: ! -rm -f fastjar.aux fastjar.cp fastjar.cps fastjar.fn fastjar.fns fastjar.ky \ ! fastjar.kys fastjar.log fastjar.pg fastjar.pgs fastjar.tmp \ ! fastjar.toc fastjar.tp fastjar.tps fastjar.vr fastjar.vrs \ ! fastjar.dvi fastjar.pdf fastjar.ps maintainer-clean-aminfo: ! @list='$(INFO_DEPS)'; for i in $$list; do \ ! i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ ! echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ ! rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ done ! man1dir = $(mandir)/man1 ! install-man1: $(man1_MANS) $(man_MANS) ! @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(man1dir) ! @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ ! l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ ! for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ *************** install-man1: *** 381,593 **** if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ done - uninstall-man1: ! @list='$(man1_MANS)'; \ ! l2='$(man_MANS)'; for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ rm -f $(DESTDIR)$(man1dir)/$$inst; \ done ! install-man: $(MANS) ! @$(NORMAL_INSTALL) ! $(MAKE) $(AM_MAKEFLAGS) install-man1 ! uninstall-man: ! @$(NORMAL_UNINSTALL) ! $(MAKE) $(AM_MAKEFLAGS) uninstall-man1 tags: TAGS ! ID: $(HEADERS) $(SOURCES) $(LISP) ! list='$(SOURCES) $(HEADERS)'; \ ! unique=`for i in $$list; do echo $$i; done | \ ! awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ ! here=`pwd` && cd $(srcdir) \ ! && mkid -f$$here/ID $$unique $(LISP) ! TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ ! list='$(SOURCES) $(HEADERS)'; \ ! unique=`for i in $$list; do echo $$i; done | \ ! awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ ! test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \ ! || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP)) ! mostlyclean-tags: ! clean-tags: distclean-tags: ! -rm -f TAGS ID ! ! maintainer-clean-tags: distdir = $(PACKAGE)-$(VERSION) ! top_distdir = $(distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist ! -rm -rf $(distdir) ! GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz ! mkdir $(distdir)/=build ! mkdir $(distdir)/=inst ! dc_install_base=`cd $(distdir)/=inst && pwd`; \ ! cd $(distdir)/=build \ ! && ../configure --srcdir=.. --prefix=$$dc_install_base \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ ! && $(MAKE) $(AM_MAKEFLAGS) dist ! -rm -rf $(distdir) ! @banner="$(distdir).tar.gz is ready for distribution"; \ ! dashes=`echo "$$banner" | sed s/./=/g`; \ ! echo "$$dashes"; \ ! echo "$$banner"; \ ! echo "$$dashes" ! dist: distdir ! -chmod -R a+r $(distdir) ! GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) ! -rm -rf $(distdir) ! dist-all: distdir ! -chmod -R a+r $(distdir) ! GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) ! -rm -rf $(distdir) ! distdir: $(DISTFILES) ! -rm -rf $(distdir) ! mkdir $(distdir) ! -chmod 777 $(distdir) ! @for file in $(DISTFILES); do \ ! d=$(srcdir); \ ! if test -d $$d/$$file; then \ ! cp -pr $$d/$$file $(distdir)/$$file; \ ! else \ ! test -f $(distdir)/$$file \ ! || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ ! || cp -p $$d/$$file $(distdir)/$$file || :; \ ! fi; \ ! done ! $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info ! info-am: $(INFO_DEPS) ! info: info-am ! dvi-am: $(DVIS) ! dvi: dvi-am check-am: all-am check: check-am ! installcheck-am: ! installcheck: installcheck-am ! all-recursive-am: config.h ! $(MAKE) $(AM_MAKEFLAGS) all-recursive ! install-exec-am: install-binPROGRAMS install-exec: install-exec-am - - install-data-am: install-info-am install-man install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - install: install-am - uninstall-am: uninstall-binPROGRAMS uninstall-info uninstall-man - uninstall: uninstall-am - all-am: Makefile $(INFO_DEPS) $(PROGRAMS) $(MANS) config.h - all-redirect: all-am - install-strip: - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install - installdirs: - $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(infodir) \ - $(DESTDIR)$(mandir)/man1 - mostlyclean-generic: clean-generic: distclean-generic: ! -rm -f Makefile $(CONFIG_CLEAN_FILES) ! -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: ! mostlyclean-am: mostlyclean-hdr mostlyclean-binPROGRAMS \ ! mostlyclean-compile mostlyclean-aminfo mostlyclean-tags \ ! mostlyclean-generic ! mostlyclean: mostlyclean-am ! clean-am: clean-hdr clean-binPROGRAMS clean-compile clean-aminfo \ ! clean-tags clean-generic mostlyclean-am ! clean: clean-am ! distclean-am: distclean-hdr distclean-binPROGRAMS distclean-compile \ ! distclean-aminfo distclean-tags distclean-generic \ ! clean-am ! distclean: distclean-am ! -rm -f config.status ! maintainer-clean-am: maintainer-clean-hdr maintainer-clean-binPROGRAMS \ ! maintainer-clean-compile maintainer-clean-aminfo \ ! maintainer-clean-tags maintainer-clean-generic \ ! distclean-am ! @echo "This command is intended for maintainers to use;" ! @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-am ! -rm -f config.status ! .PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ ! mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ ! maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ ! mostlyclean-compile distclean-compile clean-compile \ ! maintainer-clean-compile install-info-am uninstall-info \ ! mostlyclean-aminfo distclean-aminfo clean-aminfo \ ! maintainer-clean-aminfo install-man1 uninstall-man1 install-man \ ! uninstall-man tags mostlyclean-tags distclean-tags clean-tags \ ! maintainer-clean-tags distdir info-am info dvi-am dvi check check-am \ ! installcheck-am installcheck all-recursive-am install-exec-am \ ! install-exec install-data-am install-data install-am install \ ! uninstall-am uninstall all-redirect all-am all installdirs \ ! mostlyclean-generic distclean-generic clean-generic \ ! maintainer-clean-generic clean mostlyclean distclean maintainer-clean ! fastjar.info: fastjar.texi $(fastjar_TEXINFOS) ! @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] ! cd $(srcdir) \ ! && $(MAKEINFO) $(my_makei_flags) `echo $< | sed 's,.*/,,'` ! $(srcdir)/jar.1: $(srcdir)/fastjar.texi ! -$(TEXI2POD) -D jar < $(srcdir)/fastjar.texi > fastjar.pod ! -($(POD2MAN) --section=1 fastjar.pod > jar.1.T$$$$ && \ ! mv -f jar.1.T$$$$ $(srcdir)/jar.1) || \ ! (rm -f jar.1.T$$$$ && exit 1) ! -rm -f fastjar.pod ! $(srcdir)/grepjar.1: $(srcdir)/fastjar.texi ! -$(TEXI2POD) -D grepjar < $(srcdir)/fastjar.texi > grepjar.pod ! -($(POD2MAN) --section=1 grepjar.pod > grepjar.1.T$$$$ && \ ! mv -f grepjar.1.T$$$$ $(srcdir)/grepjar.1) || \ ! (rm -f grepjar.1.T$$$$ && exit 1) ! -rm -f grepjar.pod # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: --- 414,766 ---- if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ + *) ext='1' ;; \ + esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ done uninstall-man1: ! @$(NORMAL_UNINSTALL) ! @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ ! l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ ! for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ + *) ext='1' ;; \ + esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ rm -f $(DESTDIR)$(man1dir)/$$inst; \ done ! ! ETAGS = etags ! ETAGSFLAGS = ! ! CTAGS = ctags ! CTAGSFLAGS = tags: TAGS ! ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ! list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ ! unique=`for i in $$list; do \ ! if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ! done | \ ! $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ ! mkid -fID $$unique ! TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ ! $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ ! list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ ! unique=`for i in $$list; do \ ! if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ! done | \ ! $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ ! test -z "$(ETAGS_ARGS)$$tags$$unique" \ ! || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ ! $$tags $$unique ! ctags: CTAGS ! CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ ! $(TAGS_FILES) $(LISP) ! tags=; \ ! here=`pwd`; \ ! list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ ! unique=`for i in $$list; do \ ! if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ! done | \ ! $(AWK) ' { files[$$0] = 1; } \ ! END { for (i in files) print i; }'`; \ ! test -z "$(CTAGS_ARGS)$$tags$$unique" \ ! || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ ! $$tags $$unique ! GTAGS: ! here=`$(am__cd) $(top_builddir) && pwd` \ ! && cd $(top_srcdir) \ ! && gtags -i $(GTAGS_ARGS) $$here distclean-tags: ! -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags ! DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + top_distdir = . distdir = $(PACKAGE)-$(VERSION) ! ! am__remove_distdir = \ ! { test ! -d $(distdir) \ ! || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ ! && rm -fr $(distdir); }; } ! ! GZIP_ENV = --best ! distuninstallcheck_listfiles = find . -type f -print ! distcleancheck_listfiles = find . -type f -print ! ! distdir: $(DISTFILES) ! $(am__remove_distdir) ! mkdir $(distdir) ! $(mkinstalldirs) $(distdir)/. $(distdir)/.. $(distdir)/../gcc/doc/include ! @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ ! topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ ! list='$(DISTFILES)'; for file in $$list; do \ ! case $$file in \ ! $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ ! $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ ! esac; \ ! if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ ! dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ ! if test "$$dir" != "$$file" && test "$$dir" != "."; then \ ! dir="/$$dir"; \ ! $(mkinstalldirs) "$(distdir)$$dir"; \ ! else \ ! dir=''; \ ! fi; \ ! if test -d $$d/$$file; then \ ! if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ ! cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ ! fi; \ ! cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ ! else \ ! test -f $(distdir)/$$file \ ! || cp -p $$d/$$file $(distdir)/$$file \ ! || exit 1; \ ! fi; \ ! done ! $(MAKE) $(AM_MAKEFLAGS) \ ! top_distdir="$(top_distdir)" distdir="$(distdir)" \ ! dist-info ! -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ ! || chmod -R a+r $(distdir) ! dist-gzip: distdir ! $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz ! $(am__remove_distdir) ! ! dist dist-all: distdir ! $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz ! $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist ! $(am__remove_distdir) ! GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ! chmod -R a-w $(distdir); chmod a+w $(distdir) ! mkdir $(distdir)/_build ! mkdir $(distdir)/_inst ! chmod a-w $(distdir) ! dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ ! && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ ! && cd $(distdir)/_build \ ! && ../configure --srcdir=.. --prefix="$$dc_install_base" \ ! $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ ! && $(MAKE) $(AM_MAKEFLAGS) uninstall \ ! && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ ! distuninstallcheck \ ! && chmod -R a-w "$$dc_install_base" \ ! && ({ \ ! (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \ ! && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ ! && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ ! && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ ! distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ ! } || { rm -rf "$$dc_destdir"; exit 1; }) \ ! && rm -rf "$$dc_destdir" \ ! && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \ ! && rm -f $(distdir).tar.gz \ ! && $(MAKE) $(AM_MAKEFLAGS) distcleancheck ! $(am__remove_distdir) ! @echo "$(distdir).tar.gz is ready for distribution" | \ ! sed 'h;s/./=/g;p;x;p;x' ! distuninstallcheck: ! @cd $(distuninstallcheck_dir) \ ! && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ ! || { echo "ERROR: files left after uninstall:" ; \ ! if test -n "$(DESTDIR)"; then \ ! echo " (check DESTDIR support)"; \ ! fi ; \ ! $(distuninstallcheck_listfiles) ; \ ! exit 1; } >&2 ! distcleancheck: distclean ! @if test '$(srcdir)' = . ; then \ ! echo "ERROR: distcleancheck can only run from a VPATH build" ; \ ! exit 1 ; \ ! fi ! @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ ! || { echo "ERROR: files left in build directory after distclean:" ; \ ! $(distcleancheck_listfiles) ; \ ! exit 1; } >&2 check-am: all-am check: check-am ! all-am: Makefile $(INFO_DEPS) $(PROGRAMS) $(MANS) config.h all-local ! installdirs: ! $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(infodir) $(DESTDIR)$(man1dir) ! install: install-am install-exec: install-exec-am install-data: install-data-am + uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + installcheck: installcheck-am + install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: ! -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: ! @echo "This command is intended for maintainers to use" ! @echo "it deletes files that may require special tools to rebuild." ! -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) ! clean: clean-am ! clean-am: clean-binPROGRAMS clean-generic mostlyclean-am ! distclean: distclean-am ! -rm -f $(am__CONFIG_DISTCLEAN_FILES) ! -rm -f Makefile ! distclean-am: clean-am distclean-compile distclean-generic distclean-hdr \ ! distclean-tags ! dvi: dvi-am ! dvi-am: $(DVIS) ! info: info-am ! info-am: $(INFO_DEPS) ! ! install-data-am: install-info-am install-man ! ! install-exec-am: install-binPROGRAMS ! ! install-info: install-info-am ! ! install-info-am: $(INFO_DEPS) ! @$(NORMAL_INSTALL) ! $(mkinstalldirs) $(DESTDIR)$(infodir) ! @list='$(INFO_DEPS)'; \ ! for file in $$list; do \ ! if test -f $$file; then d=.; else d=$(srcdir); fi; \ ! file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ ! for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ ! $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ ! if test -f $$ifile; then \ ! relfile=`echo "$$ifile" | sed 's|^.*/||'`; \ ! echo " $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile"; \ ! $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile; \ ! else : ; fi; \ ! done; \ ! done ! @$(POST_INSTALL) ! @if (install-info --version && \ ! install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ ! list='$(INFO_DEPS)'; \ ! for file in $$list; do \ ! relfile=`echo "$$file" | sed 's|^.*/||'`; \ ! echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$relfile";\ ! install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$relfile || :;\ ! done; \ ! else : ; fi ! install-man: install-man1 ! ! installcheck-am: maintainer-clean: maintainer-clean-am ! -rm -f $(am__CONFIG_DISTCLEAN_FILES) ! -rm -rf $(top_srcdir)/autom4te.cache ! -rm -f Makefile ! maintainer-clean-am: distclean-am maintainer-clean-aminfo \ ! maintainer-clean-generic ! mostlyclean: mostlyclean-am ! mostlyclean-am: mostlyclean-aminfo mostlyclean-compile \ ! mostlyclean-generic ! pdf: pdf-am ! pdf-am: $(PDFS) ! ! ps: ps-am ! ! ps-am: $(PSS) ! ! uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-man ! ! uninstall-man: uninstall-man1 ! ! .PHONY: CTAGS GTAGS all all-am all-local check check-am clean \ ! clean-binPROGRAMS clean-generic ctags dist dist-all dist-gzip \ ! dist-info distcheck distclean distclean-compile \ ! distclean-generic distclean-hdr distclean-tags distcleancheck \ ! distdir distuninstallcheck dvi dvi-am info info-am install \ ! install-am install-binPROGRAMS install-data install-data-am \ ! install-exec install-exec-am install-info install-info-am \ ! install-man install-man1 install-strip installcheck \ ! installcheck-am installdirs maintainer-clean \ ! maintainer-clean-aminfo maintainer-clean-generic mostlyclean \ ! mostlyclean-aminfo mostlyclean-compile mostlyclean-generic pdf \ ! pdf-am ps ps-am tags uninstall uninstall-am \ ! uninstall-binPROGRAMS uninstall-info-am uninstall-man \ ! uninstall-man1 ! ! ! %.1: %.pod ! -($(POD2MAN) --section=1 $< > $(@).T$$$$ && \ ! mv -f $(@).T$$$$ $@) || \ ! (rm -f $(@).T$$$$ && exit 1) ! ! .INTERMEDIATE: jar.pod grepjar.pod ! ! jar.pod: $(srcdir)/fastjar.texi ! -$(TEXI2POD) -D jar $< > $@ ! ! grepjar.pod: $(srcdir)/fastjar.texi ! -$(TEXI2POD) -D grepjar $< > $@ + all-local: $(STAMP_GENINSRC) + + stamp-geninsrc: jar.1 grepjar.1 fastjar.info + -cp -p $(top_builddir)/jar.1 $(srcdir)/jar.1 + -cp -p $(top_builddir)/grepjar.1 $(srcdir)/grepjar.1 + -cp -p $(top_builddir)/fastjar.info $(srcdir)/fastjar.info + touch $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -Nrc3pad gcc-3.3.3/fastjar/missing gcc-3.4.0/fastjar/missing *** gcc-3.3.3/fastjar/missing 2000-12-09 03:08:23.000000000 +0000 --- gcc-3.4.0/fastjar/missing 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,190 **** - #! /bin/sh - # Common stub for a few missing GNU programs while installing. - # Copyright (C) 1996, 1997 Free Software Foundation, Inc. - # Franc,ois Pinard , 1996. - - # This program is free software; you can redistribute it and/or modify - # it under the terms of the GNU General Public License as published by - # the Free Software Foundation; either version 2, or (at your option) - # any later version. - - # This program is distributed in the hope that it will be useful, - # but WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - # GNU General Public License for more details. - - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software - # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - # 02111-1307, USA. - - if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - fi - - case "$1" in - - -h|--h|--he|--hel|--help) - echo "\ - $0 [OPTION]... PROGRAM [ARGUMENT]... - - Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an - error status if there is no known handling for PROGRAM. - - Options: - -h, --help display this help and exit - -v, --version output version information and exit - - Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - yacc create \`y.tab.[ch]', if possible, from existing .[ch]" - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing - GNU libit 0.0" - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - - aclocal) - echo 1>&2 "\ - WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acinclude.m4' or \`configure.in'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf) - echo 1>&2 "\ - WARNING: \`$1' is missing on your system. You should only need it if - you modified \`configure.in'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader) - echo 1>&2 "\ - WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acconfig.h' or \`configure.in'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case "$f" in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake) - echo 1>&2 "\ - WARNING: \`$1' is missing on your system. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - bison|yacc) - echo 1>&2 "\ - WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if [ ! -f y.tab.h ]; then - echo >y.tab.h - fi - if [ ! -f y.tab.c ]; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ - WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if [ ! -f lex.yy.c ]; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - makeinfo) - echo 1>&2 "\ - WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` - fi - touch $file - ;; - - *) - echo 1>&2 "\ - WARNING: \`$1' is needed, and you do not seem to have it handy on your - system. You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequirements for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; - esac - - exit 0 --- 0 ---- diff -Nrc3pad gcc-3.3.3/fastjar/mkinstalldirs gcc-3.4.0/fastjar/mkinstalldirs *** gcc-3.3.3/fastjar/mkinstalldirs 2000-12-09 03:08:23.000000000 +0000 --- gcc-3.4.0/fastjar/mkinstalldirs 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,40 **** - #! /bin/sh - # mkinstalldirs --- make directory hierarchy - # Author: Noah Friedman - # Created: 1993-05-16 - # Public domain - - # $Id: mkinstalldirs,v 1.1 2000/12/09 03:08:23 apbianco Exp $ - - errstatus=0 - - for file - do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` - shift - - pathcomp= - for d - do - pathcomp="$pathcomp$d" - case "$pathcomp" in - -* ) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" - - mkdir "$pathcomp" || lasterr=$? - - if test ! -d "$pathcomp"; then - errstatus=$lasterr - fi - fi - - pathcomp="$pathcomp/" - done - done - - exit $errstatus - - # mkinstalldirs ends here --- 0 ---- diff -Nrc3pad gcc-3.3.3/fastjar/pushback.c gcc-3.4.0/fastjar/pushback.c *** gcc-3.3.3/fastjar/pushback.c 2002-01-03 04:57:56.000000000 +0000 --- gcc-3.4.0/fastjar/pushback.c 2002-01-03 04:57:56.000000000 +0000 *************** *** 1,21 **** ! /* $Id: pushback.c,v 1.3 2002/01/03 04:57:56 rodrigc Exp $ $Log: pushback.c,v $ - Revision 1.3 2002/01/03 04:57:56 rodrigc - 2001-01-02 Craig Rodrigues - - PR bootstrap/5117 - * configure.in (AC_CHECK_HEADERS): Check for stdlib.h. - * Makefile.am: Move grepjar to bin_PROGRAMS. - * config.h.in: Regenerated. - * Makefile.in: Regenerated. - * aclocal.m4: Regenerated. - * jargrep.c: Eliminate some signed/unsigned and default - uninitialized warnings. Use HAVE_STDLIB_H instead of - STDC_HEADERS macro. - * jartool.c: Likewise. - * compress.c: Likewise. - Revision 1.2 2000/12/14 18:45:35 ghazi Warning fixes: --- 1,6 ---- ! /* $Id: pushback.c,v 1.2 2000/12/14 18:45:35 ghazi Exp $ $Log: pushback.c,v $ Revision 1.2 2000/12/14 18:45:35 ghazi Warning fixes: diff -Nrc3pad gcc-3.3.3/fastjar/stamp-h.in gcc-3.4.0/fastjar/stamp-h.in *** gcc-3.3.3/fastjar/stamp-h.in 2004-02-14 20:34:20.000000000 +0000 --- gcc-3.4.0/fastjar/stamp-h.in 1970-01-01 00:00:00.000000000 +0000 *************** *** 1 **** - timestamp --- 0 ---- diff -Nrc3pad gcc-3.3.3/fastjar/zipfile.h gcc-3.4.0/fastjar/zipfile.h *** gcc-3.3.3/fastjar/zipfile.h 2000-12-09 03:08:23.000000000 +0000 --- gcc-3.4.0/fastjar/zipfile.h 2000-12-09 03:08:23.000000000 +0000 *************** *** 1,11 **** ! /* $Id: zipfile.h,v 1.1 2000/12/09 03:08:23 apbianco Exp $ $Log: zipfile.h,v $ - Revision 1.1 2000/12/09 03:08:23 apbianco - 2000-12-08 Alexandre Petit-Bianco - - * fastjar: Imported. - Revision 1.1.1.1 1999/12/06 03:09:11 toast initial checkin.. --- 1,6 ---- ! /* $Id: zipfile.h,v 1.1.1.1 1999/12/06 03:09:11 toast Exp $ $Log: zipfile.h,v $ Revision 1.1.1.1 1999/12/06 03:09:11 toast initial checkin.. diff -Nrc3pad gcc-3.3.3/gcc/java/boehm.c gcc-3.4.0/gcc/java/boehm.c *** gcc-3.3.3/gcc/java/boehm.c 2002-03-29 21:46:26.000000000 +0000 --- gcc-3.4.0/gcc/java/boehm.c 2003-01-12 02:14:55.000000000 +0000 *************** *** 1,20 **** /* Functions related to the Boehm garbage collector. ! Copyright (C) 2000 Free Software Foundation, Inc. ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,20 ---- /* Functions related to the Boehm garbage collector. ! Copyright (C) 2000, 2003 Free Software Foundation, Inc. ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 27,54 **** #include #include "system.h" #include "tree.h" #include "java-tree.h" #include "parse.h" #include "toplev.h" ! static void mark_reference_fields PARAMS ((tree, ! unsigned HOST_WIDE_INT *, ! unsigned HOST_WIDE_INT *, ! unsigned int, ! int *, int *, ! int *, ! HOST_WIDE_INT *)); ! static void set_bit PARAMS ((unsigned HOST_WIDE_INT *, ! unsigned HOST_WIDE_INT *, ! unsigned int)); /* Treat two HOST_WIDE_INT's as a contiguous bitmap, with bit 0 being the least significant. This function sets bit N in the bitmap. */ static void ! set_bit (low, high, n) ! unsigned HOST_WIDE_INT *low, *high; ! unsigned int n; { HOST_WIDE_INT *which; --- 27,50 ---- #include #include "system.h" + #include "coretypes.h" + #include "tm.h" #include "tree.h" #include "java-tree.h" #include "parse.h" #include "toplev.h" ! static void mark_reference_fields (tree, unsigned HOST_WIDE_INT *, ! unsigned HOST_WIDE_INT *, unsigned int, ! int *, int *, int *, HOST_WIDE_INT *); ! static void set_bit (unsigned HOST_WIDE_INT *, unsigned HOST_WIDE_INT *, ! unsigned int); /* Treat two HOST_WIDE_INT's as a contiguous bitmap, with bit 0 being the least significant. This function sets bit N in the bitmap. */ static void ! set_bit (unsigned HOST_WIDE_INT *low, unsigned HOST_WIDE_INT *high, ! unsigned int n) { HOST_WIDE_INT *which; *************** set_bit (low, high, n) *** 65,79 **** /* Recursively mark reference fields. */ static void ! mark_reference_fields (field, low, high, ubit, ! pointer_after_end, all_bits_set, ! last_set_index, last_view_index) ! tree field; ! unsigned HOST_WIDE_INT *low, *high; ! unsigned int ubit; ! int *pointer_after_end, *all_bits_set; ! int *last_set_index; ! HOST_WIDE_INT *last_view_index; { /* See if we have fields from our superclass. */ if (DECL_NAME (field) == NULL_TREE) --- 61,74 ---- /* Recursively mark reference fields. */ static void ! mark_reference_fields (tree field, ! unsigned HOST_WIDE_INT *low, ! unsigned HOST_WIDE_INT *high, ! unsigned int ubit, ! int *pointer_after_end, ! int *all_bits_set, ! int *last_set_index, ! HOST_WIDE_INT *last_view_index) { /* See if we have fields from our superclass. */ if (DECL_NAME (field) == NULL_TREE) diff -Nrc3pad gcc-3.3.3/gcc/java/buffer.c gcc-3.4.0/gcc/java/buffer.c *** gcc-3.3.3/gcc/java/buffer.c 2002-11-18 15:46:31.000000000 +0000 --- gcc-3.4.0/gcc/java/buffer.c 2003-01-12 02:14:55.000000000 +0000 *************** *** 1,20 **** /* A "buffer" utility type. ! Copyright (C) 1998 Free Software Foundation, Inc. ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ --- 1,20 ---- /* A "buffer" utility type. ! Copyright (C) 1998, 2003 Free Software Foundation, Inc. ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ *************** Boston, MA 02111-1307, USA. */ *** 22,35 **** #include "config.h" #include "system.h" #include "buffer.h" /* Grow BUFP so there is room for at least SIZE more bytes. */ void ! buffer_grow (bufp, size) ! struct buffer *bufp; ! int size; { if (bufp->limit - bufp->ptr >= size) return; --- 22,35 ---- #include "config.h" #include "system.h" + #include "coretypes.h" + #include "tm.h" #include "buffer.h" /* Grow BUFP so there is room for at least SIZE more bytes. */ void ! buffer_grow (struct buffer *bufp, int size) { if (bufp->limit - bufp->ptr >= size) return; diff -Nrc3pad gcc-3.3.3/gcc/java/buffer.h gcc-3.4.0/gcc/java/buffer.h *** gcc-3.3.3/gcc/java/buffer.h 2000-01-21 20:57:00.000000000 +0000 --- gcc-3.4.0/gcc/java/buffer.h 2003-01-09 23:16:48.000000000 +0000 *************** *** 1,20 **** /* A "buffer" utility type. ! Copyright (C) 1998, 2000 Free Software Foundation, Inc. ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ --- 1,20 ---- /* A "buffer" utility type. ! Copyright (C) 1998, 2000, 2003 Free Software Foundation, Inc. ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ *************** struct buffer *** 43,46 **** #define BUFFER_RESET(BUFP) ((BUFP)->ptr = (BUFP)->data) ! extern void buffer_grow PARAMS ((struct buffer*, int)); --- 43,46 ---- #define BUFFER_RESET(BUFP) ((BUFP)->ptr = (BUFP)->data) ! extern void buffer_grow (struct buffer*, int); diff -Nrc3pad gcc-3.3.3/gcc/java/builtins.c gcc-3.4.0/gcc/java/builtins.c *** gcc-3.3.3/gcc/java/builtins.c 2003-03-04 14:37:22.000000000 +0000 --- gcc-3.4.0/gcc/java/builtins.c 2003-10-05 02:52:33.000000000 +0000 *************** *** 1,21 **** /* Built-in and inline functions for gcj ! Copyright (C) 2001 Free Software Foundation, Inc. ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,21 ---- /* Built-in and inline functions for gcj ! Copyright (C) 2001, 2003 Free Software Foundation, Inc. ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 27,79 **** #include "config.h" #include "system.h" #include "tree.h" #include "ggc.h" #include "flags.h" #include "langhooks.h" #include "java-tree.h" - enum builtin_type - { - #define DEF_PRIMITIVE_TYPE(NAME, VALUE) NAME, - #define DEF_FUNCTION_TYPE_0(NAME, RETURN) NAME, - #define DEF_FUNCTION_TYPE_1(NAME, RETURN, ARG1) NAME, - #define DEF_FUNCTION_TYPE_2(NAME, RETURN, ARG1, ARG2) NAME, - #define DEF_FUNCTION_TYPE_3(NAME, RETURN, ARG1, ARG2, ARG3) NAME, - #define DEF_FUNCTION_TYPE_4(NAME, RETURN, ARG1, ARG2, ARG3, ARG4) NAME, - #define DEF_FUNCTION_TYPE_VAR_0(NAME, RETURN) NAME, - #define DEF_FUNCTION_TYPE_VAR_1(NAME, RETURN, ARG1) NAME, - #define DEF_FUNCTION_TYPE_VAR_2(NAME, RETURN, ARG1, ARG2) NAME, - #define DEF_FUNCTION_TYPE_VAR_3(NAME, RETURN, ARG1, ARG2, ARG3) NAME, - #define DEF_POINTER_TYPE(NAME, TYPE) NAME, - #include "builtin-types.def" - #undef DEF_PRIMITIVE_TYPE - #undef DEF_FUNCTION_TYPE_0 - #undef DEF_FUNCTION_TYPE_1 - #undef DEF_FUNCTION_TYPE_2 - #undef DEF_FUNCTION_TYPE_3 - #undef DEF_FUNCTION_TYPE_4 - #undef DEF_FUNCTION_TYPE_VAR_0 - #undef DEF_FUNCTION_TYPE_VAR_1 - #undef DEF_FUNCTION_TYPE_VAR_2 - #undef DEF_FUNCTION_TYPE_VAR_3 - #undef DEF_POINTER_TYPE - BT_LAST - }; ! static tree max_builtin PARAMS ((tree, tree)); ! static tree min_builtin PARAMS ((tree, tree)); ! static tree abs_builtin PARAMS ((tree, tree)); ! static tree cos_builtin PARAMS ((tree, tree)); ! static tree sin_builtin PARAMS ((tree, tree)); ! static tree sqrt_builtin PARAMS ((tree, tree)); ! static tree build_function_call_expr PARAMS ((tree, tree)); ! static void define_builtin PARAMS ((enum built_in_function, ! const char *, ! enum built_in_class, ! tree, int)); ! static tree define_builtin_type PARAMS ((int, int, int, int, int)); --- 27,48 ---- #include "config.h" #include "system.h" + #include "coretypes.h" + #include "tm.h" #include "tree.h" #include "ggc.h" #include "flags.h" #include "langhooks.h" #include "java-tree.h" ! static tree max_builtin (tree, tree); ! static tree min_builtin (tree, tree); ! static tree abs_builtin (tree, tree); ! static tree java_build_function_call_expr (tree, tree); ! static void define_builtin (enum built_in_function, const char *, ! tree, const char *); *************** static tree define_builtin_type PARAMS ( *** 81,87 **** function should either return an expression, if the call is to be inlined, or NULL_TREE if a real call should be emitted. Arguments are method return type and arguments to call. */ ! typedef tree builtin_creator_function PARAMS ((tree, tree)); /* Hold a char*, before initialization, or a tree, after initialization. */ --- 50,56 ---- function should either return an expression, if the call is to be inlined, or NULL_TREE if a real call should be emitted. Arguments are method return type and arguments to call. */ ! typedef tree builtin_creator_function (tree, tree); /* Hold a char*, before initialization, or a tree, after initialization. */ *************** struct builtin_record GTY(()) *** 97,151 **** union string_or_tree GTY ((desc ("1"))) class_name; union string_or_tree GTY ((desc ("1"))) method_name; builtin_creator_function * GTY((skip (""))) creator; }; static GTY(()) struct builtin_record java_builtins[] = { ! { { "java.lang.Math" }, { "min" }, min_builtin }, ! { { "java.lang.Math" }, { "max" }, max_builtin }, ! { { "java.lang.Math" }, { "abs" }, abs_builtin }, ! { { "java.lang.Math" }, { "cos" }, cos_builtin }, ! { { "java.lang.Math" }, { "sin" }, sin_builtin }, ! { { "java.lang.Math" }, { "sqrt" }, sqrt_builtin }, ! { { NULL }, { NULL }, NULL } }; - /* This is only used transiently, so we don't mark it as roots for the - GC. */ - static tree builtin_types[(int) BT_LAST]; - /* Internal functions which implement various builtin conversions. */ static tree ! max_builtin (method_return_type, method_arguments) ! tree method_return_type, method_arguments; { ! return build (MAX_EXPR, method_return_type, ! TREE_VALUE (method_arguments), ! TREE_VALUE (TREE_CHAIN (method_arguments))); } static tree ! min_builtin (method_return_type, method_arguments) ! tree method_return_type, method_arguments; { ! return build (MIN_EXPR, method_return_type, ! TREE_VALUE (method_arguments), ! TREE_VALUE (TREE_CHAIN (method_arguments))); } static tree ! abs_builtin (method_return_type, method_arguments) ! tree method_return_type, method_arguments; { ! return build1 (ABS_EXPR, method_return_type, ! TREE_VALUE (method_arguments)); } /* Mostly copied from ../builtins.c. */ static tree ! build_function_call_expr (tree fn, tree arglist) { tree call_expr; --- 66,120 ---- union string_or_tree GTY ((desc ("1"))) class_name; union string_or_tree GTY ((desc ("1"))) method_name; builtin_creator_function * GTY((skip (""))) creator; + enum built_in_function builtin_code; }; static GTY(()) struct builtin_record java_builtins[] = { ! { { "java.lang.Math" }, { "min" }, min_builtin, 0 }, ! { { "java.lang.Math" }, { "max" }, max_builtin, 0 }, ! { { "java.lang.Math" }, { "abs" }, abs_builtin, 0 }, ! { { "java.lang.Math" }, { "atan" }, NULL, BUILT_IN_ATAN }, ! { { "java.lang.Math" }, { "atan2" }, NULL, BUILT_IN_ATAN2 }, ! { { "java.lang.Math" }, { "cos" }, NULL, BUILT_IN_COS }, ! { { "java.lang.Math" }, { "exp" }, NULL, BUILT_IN_EXP }, ! { { "java.lang.Math" }, { "log" }, NULL, BUILT_IN_LOG }, ! { { "java.lang.Math" }, { "pow" }, NULL, BUILT_IN_POW }, ! { { "java.lang.Math" }, { "sin" }, NULL, BUILT_IN_SIN }, ! { { "java.lang.Math" }, { "sqrt" }, NULL, BUILT_IN_SQRT }, ! { { "java.lang.Math" }, { "tan" }, NULL, BUILT_IN_TAN }, ! { { NULL }, { NULL }, NULL, END_BUILTINS } }; /* Internal functions which implement various builtin conversions. */ static tree ! max_builtin (tree method_return_type, tree method_arguments) { ! return fold (build (MAX_EXPR, method_return_type, ! TREE_VALUE (method_arguments), ! TREE_VALUE (TREE_CHAIN (method_arguments)))); } static tree ! min_builtin (tree method_return_type, tree method_arguments) { ! return fold (build (MIN_EXPR, method_return_type, ! TREE_VALUE (method_arguments), ! TREE_VALUE (TREE_CHAIN (method_arguments)))); } static tree ! abs_builtin (tree method_return_type, tree method_arguments) { ! return fold (build1 (ABS_EXPR, method_return_type, ! TREE_VALUE (method_arguments))); } /* Mostly copied from ../builtins.c. */ static tree ! java_build_function_call_expr (tree fn, tree arglist) { tree call_expr; *************** build_function_call_expr (tree fn, tree *** 153,274 **** call_expr = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fn)), call_expr, arglist); TREE_SIDE_EFFECTS (call_expr) = 1; ! return call_expr; ! } ! ! static tree ! cos_builtin (method_return_type, method_arguments) ! tree method_return_type ATTRIBUTE_UNUSED, method_arguments; ! { ! /* FIXME: this assumes that jdouble and double are the same. */ ! tree fn = built_in_decls[BUILT_IN_COS]; ! if (fn == NULL_TREE) ! return NULL_TREE; ! return build_function_call_expr (fn, method_arguments); ! } ! ! static tree ! sin_builtin (method_return_type, method_arguments) ! tree method_return_type ATTRIBUTE_UNUSED, method_arguments; ! { ! /* FIXME: this assumes that jdouble and double are the same. */ ! tree fn = built_in_decls[BUILT_IN_SIN]; ! if (fn == NULL_TREE) ! return NULL_TREE; ! return build_function_call_expr (fn, method_arguments); ! } ! ! static tree ! sqrt_builtin (method_return_type, method_arguments) ! tree method_return_type ATTRIBUTE_UNUSED, method_arguments; ! { ! /* FIXME: this assumes that jdouble and double are the same. */ ! tree fn = built_in_decls[BUILT_IN_SQRT]; ! if (fn == NULL_TREE) ! return NULL_TREE; ! return build_function_call_expr (fn, method_arguments); } /* Define a single builtin. */ static void ! define_builtin (val, name, class, type, fallback_p) ! enum built_in_function val; ! const char *name; ! enum built_in_class class; ! tree type; ! int fallback_p; { tree decl; - if (! name || ! type) - return; - - if (strncmp (name, "__builtin_", strlen ("__builtin_")) != 0) - abort (); decl = build_decl (FUNCTION_DECL, get_identifier (name), type); DECL_EXTERNAL (decl) = 1; TREE_PUBLIC (decl) = 1; ! if (fallback_p) ! SET_DECL_ASSEMBLER_NAME (decl, ! get_identifier (name + strlen ("__builtin_"))); make_decl_rtl (decl, NULL); pushdecl (decl); ! DECL_BUILT_IN_CLASS (decl) = class; DECL_FUNCTION_CODE (decl) = val; - built_in_decls[val] = decl; - } - - /* Compute the type for a builtin. */ - static tree - define_builtin_type (ret, arg1, arg2, arg3, arg4) - int ret, arg1, arg2, arg3, arg4; - { - tree args; ! if (builtin_types[ret] == NULL_TREE) ! return NULL_TREE; ! ! args = void_list_node; ! ! if (arg4 != -1) ! { ! if (builtin_types[arg4] == NULL_TREE) ! return NULL_TREE; ! args = tree_cons (NULL_TREE, builtin_types[arg4], args); ! } ! if (arg3 != -1) ! { ! if (builtin_types[arg3] == NULL_TREE) ! return NULL_TREE; ! args = tree_cons (NULL_TREE, builtin_types[arg3], args); ! } ! if (arg2 != -1) ! { ! if (builtin_types[arg2] == NULL_TREE) ! return NULL_TREE; ! args = tree_cons (NULL_TREE, builtin_types[arg2], args); ! } ! if (arg1 != -1) ! { ! if (builtin_types[arg1] == NULL_TREE) ! return NULL_TREE; ! args = tree_cons (NULL_TREE, builtin_types[arg1], args); ! } ! ! return build_function_type (builtin_types[ret], args); } /* Initialize the builtins. */ void ! initialize_builtins () { int i; ! for (i = 0; java_builtins[i].creator != NULL; ++i) { tree klass_id = get_identifier (java_builtins[i].class_name.s); tree m = get_identifier (java_builtins[i].method_name.s); --- 122,166 ---- call_expr = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fn)), call_expr, arglist); TREE_SIDE_EFFECTS (call_expr) = 1; ! return fold (call_expr); } /* Define a single builtin. */ static void ! define_builtin (enum built_in_function val, ! const char *name, ! tree type, ! const char *libname) { tree decl; decl = build_decl (FUNCTION_DECL, get_identifier (name), type); DECL_EXTERNAL (decl) = 1; TREE_PUBLIC (decl) = 1; ! SET_DECL_ASSEMBLER_NAME (decl, get_identifier (libname)); make_decl_rtl (decl, NULL); pushdecl (decl); ! DECL_BUILT_IN_CLASS (decl) = BUILT_IN_NORMAL; DECL_FUNCTION_CODE (decl) = val; ! implicit_built_in_decls[val] = decl; ! built_in_decls[val] = decl; } /* Initialize the builtins. */ void ! initialize_builtins (void) { + tree double_ftype_double, double_ftype_double_double; + tree float_ftype_float, float_ftype_float_float; + tree t; int i; ! for (i = 0; java_builtins[i].builtin_code != END_BUILTINS; ++i) { tree klass_id = get_identifier (java_builtins[i].class_name.s); tree m = get_identifier (java_builtins[i].method_name.s); *************** initialize_builtins () *** 279,334 **** void_list_node = end_params_node; ! /* Work around C-specific junk in builtin-types.def. */ ! #define intmax_type_node NULL_TREE ! #define c_size_type_node NULL_TREE ! #define const_string_type_node NULL_TREE ! #define va_list_ref_type_node NULL_TREE ! #define va_list_arg_type_node NULL_TREE ! #define flag_isoc99 0 ! #define DEF_PRIMITIVE_TYPE(ENUM, VALUE) \ ! builtin_types[(int) ENUM] = VALUE; ! #define DEF_FUNCTION_TYPE_0(ENUM, RETURN) \ ! builtin_types[(int) ENUM] \ ! = define_builtin_type (RETURN, -1, -1, -1, -1); ! #define DEF_FUNCTION_TYPE_1(ENUM, RETURN, ARG1) \ ! builtin_types[(int) ENUM] \ ! = define_builtin_type (RETURN, ARG1, -1, -1, -1); ! #define DEF_FUNCTION_TYPE_2(ENUM, RETURN, ARG1, ARG2) \ ! builtin_types[(int) ENUM] \ ! = define_builtin_type (RETURN, ARG1, ARG2, -1, -1); ! #define DEF_FUNCTION_TYPE_3(ENUM, RETURN, ARG1, ARG2, ARG3) \ ! builtin_types[(int) ENUM] \ ! = define_builtin_type (RETURN, ARG1, ARG2, ARG3, -1); ! #define DEF_FUNCTION_TYPE_4(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4) \ ! builtin_types[(int) ENUM] \ ! = define_builtin_type (RETURN, ARG1, ARG2, ARG3, ARG4); ! #define DEF_FUNCTION_TYPE_VAR_0(ENUM, RETURN) \ ! builtin_types[(int) ENUM] = NULL_TREE; ! #define DEF_FUNCTION_TYPE_VAR_1(ENUM, RETURN, ARG1) \ ! builtin_types[(int) ENUM] = NULL_TREE; ! #define DEF_FUNCTION_TYPE_VAR_2(ENUM, RETURN, ARG1, ARG2) \ ! builtin_types[(int) ENUM] = NULL_TREE; ! #define DEF_FUNCTION_TYPE_VAR_3(ENUM, RETURN, ARG1, ARG2, ARG3) \ ! builtin_types[(int) ENUM] = NULL_TREE; ! #define DEF_POINTER_TYPE(ENUM, TYPE) \ ! builtin_types[(int) ENUM] = NULL_TREE; ! #include "builtin-types.def" ! #define DEF_BUILTIN(ENUM, NAME, CLASS, TYPE, LIBTYPE, BOTH_P, \ ! FALLBACK_P, NONANSI_P, ATTRS) \ ! define_builtin (ENUM, NAME, CLASS, builtin_types[TYPE], FALLBACK_P); ! #include "builtins.def" } /* If the call matches a builtin, return the appropriate builtin expression instead. */ tree ! check_for_builtin (method, call) ! tree method; ! tree call; { if (! flag_emit_class_files && optimize && TREE_CODE (call) == CALL_EXPR) { --- 171,215 ---- void_list_node = end_params_node; ! t = tree_cons (NULL_TREE, float_type_node, end_params_node); ! float_ftype_float = build_function_type (float_type_node, t); ! t = tree_cons (NULL_TREE, float_type_node, t); ! float_ftype_float_float = build_function_type (float_type_node, t); ! t = tree_cons (NULL_TREE, double_type_node, end_params_node); ! double_ftype_double = build_function_type (double_type_node, t); ! t = tree_cons (NULL_TREE, double_type_node, t); ! double_ftype_double_double = build_function_type (double_type_node, t); ! define_builtin (BUILT_IN_FMOD, "__builtin_fmod", ! double_ftype_double_double, "fmod"); ! define_builtin (BUILT_IN_FMODF, "__builtin_fmodf", ! float_ftype_float_float, "fmodf"); ! define_builtin (BUILT_IN_ATAN, "__builtin_atan", ! double_ftype_double, "_ZN4java4lang4Math4atanEd"); ! define_builtin (BUILT_IN_ATAN2, "__builtin_atan2", ! double_ftype_double_double, "_ZN4java4lang4Math5atan2Edd"); ! define_builtin (BUILT_IN_COS, "__builtin_cos", ! double_ftype_double, "_ZN4java4lang4Math3cosEd"); ! define_builtin (BUILT_IN_EXP, "__builtin_exp", ! double_ftype_double, "_ZN4java4lang4Math3expEd"); ! define_builtin (BUILT_IN_LOG, "__builtin_log", ! double_ftype_double, "_ZN4java4lang4Math3logEd"); ! define_builtin (BUILT_IN_POW, "__builtin_pow", ! double_ftype_double_double, "_ZN4java4lang4Math3powEdd"); ! define_builtin (BUILT_IN_SIN, "__builtin_sin", ! double_ftype_double, "_ZN4java4lang4Math3sinEd"); ! define_builtin (BUILT_IN_SQRT, "__builtin_sqrt", ! double_ftype_double, "_ZN4java4lang4Math4sqrtEd"); ! define_builtin (BUILT_IN_TAN, "__builtin_tan", ! double_ftype_double, "_ZN4java4lang4Math3tanEd"); } /* If the call matches a builtin, return the appropriate builtin expression instead. */ tree ! check_for_builtin (tree method, tree call) { if (! flag_emit_class_files && optimize && TREE_CODE (call) == CALL_EXPR) { *************** check_for_builtin (method, call) *** 338,350 **** tree method_name = DECL_NAME (method); tree method_return_type = TREE_TYPE (TREE_TYPE (method)); ! for (i = 0; java_builtins[i].creator != NULL; ++i) { if (method_class == java_builtins[i].class_name.t && method_name == java_builtins[i].method_name.t) { ! return (*java_builtins[i].creator) (method_return_type, ! method_arguments); } } } --- 219,238 ---- tree method_name = DECL_NAME (method); tree method_return_type = TREE_TYPE (TREE_TYPE (method)); ! for (i = 0; java_builtins[i].builtin_code != END_BUILTINS; ++i) { if (method_class == java_builtins[i].class_name.t && method_name == java_builtins[i].method_name.t) { ! tree fn; ! ! if (java_builtins[i].creator != NULL) ! return (*java_builtins[i].creator) (method_return_type, ! method_arguments); ! fn = built_in_decls[java_builtins[i].builtin_code]; ! if (fn == NULL_TREE) ! return NULL_TREE; ! return java_build_function_call_expr (fn, method_arguments); } } } diff -Nrc3pad gcc-3.3.3/gcc/java/ChangeLog gcc-3.4.0/gcc/java/ChangeLog *** gcc-3.3.3/gcc/java/ChangeLog 2004-02-14 20:18:46.000000000 +0000 --- gcc-3.4.0/gcc/java/ChangeLog 2004-04-19 01:58:50.000000000 +0000 *************** *** 1,52 **** ! 2004-02-14 Release Manager ! * GCC 3.3.3 Released. ! 2003-10-16 Release Manager ! * GCC 3.3.2 Released. ! 2003-08-04 Release Manager ! * GCC 3.3.1 Released. ! 2003-08-04 Release Manager ! * GCC 3.3.1 Released. ! 2003-07-08 Andreas Schwab ! * Make-lang.in (java/gcj.dvi): Replace PWD with PWD_COMMAND. 2003-06-10 Andrew Haley * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New. (java_decl_ok_for_sibcall): New. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. 2003-05-02 Tom Tromey PR java/10459: * parse.y (finish_for_loop): Do nothing if update expression is a EXPR_WFL_NODE wrapping nothing. (java_complete_lhs) : Likewise. 2003-04-20 Mohan Embar * jcf-io.c (find_class): use DIR_SEPARATOR instead of '/' when computing java source filename 2003-04-10 Eric Blake PR java/10253: --- 1,1115 ---- ! 2004-04-18 Release Manager ! * GCC 3.4.0 released. ! 2004-04-12 Michael Chastain ! PR bootstrap/14893: ! * Make-lang.in (java.install-man): Install from either build ! tree or source tree, whichever has the file first. ! 2004-03-23 Tom Tromey ! * gcj.texi (Extensions): Document GCJ_PROPERTIES. ! 2004-03-06 Roger Sayle ! * jcf-parse.c (java_parse_file): Handle the case that input_filename ! is NULL. ! 2004-02-26 Andrew Haley ! * parse.y (check_interface_throws_clauses): Check for ! !METHOD_INVISIBLE (iface_method). ! * class.c (layout_class_methods): Check for CLASS_INTERFACE as ! well as CLASS_ABSTRACT. ! ! 2004-02-22 Matthias Klose ! ! Taken from mainline: ! ! 2004-02-13 Geoffrey Keating ! ! * Make-lang.in: Install man pages under the same names ! (possibly transformed) as the program they document. ! ! 2004-02-16 Geoffrey Keating ! ! * Make-lang.in (java.install-man): Add extra dependencies. ! ! 2004-02-07 Kazu Hirata ! ! * typeck.c: Update copyright. ! ! 2004-02-05 Kelley Cook ! ! Make-lang.in (po-generated): Delete. ! ! 2004-01-30 Kelley Cook ! ! * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir). ! ! 2004-01-28 Andrew Pinski ! ! * expr.c (build_field_ref): Move variable ! definition up. ! ! 2004-01-28 Andrew Haley ! ! * expr.c (build_field_ref): Widen field offset. ! ! 2004-01-27 Andrew Haley ! ! java/13273 ! * parse.y (check_interface_throws_clauses): Make sure class_decl ! has been loaded. ! ! 2004-01-20 Kelley Cook ! ! * Make-lang.in: Replace $(docdir) with doc. ! (java.info, java.srcinfo, java.man, java.srcman): New rules. ! (java.install-man): Revamp rule. ! ! 2004-01-19 Kelley Cook ! ! * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME, ! GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell) ! instead of deferred backquote. ! ! 2004-01-16 Andrew Pinski ! ! * typeck.c (find_method_in_interfaces): Move variable ! definition up. ! ! 2004-01-16 Andrew Haley ! ! PR java/13273: ! * typeck.c (shallow_find_method): New. ! (find_method_in_superclasses): New. ! (find_method_in_interfaces): New. ! (lookup_do): Rewrite. ! * java-tree.h (SEARCH_ONLY_INTERFACE): Delete. ! ! * jcf-parse.c (read_class): Save and restore output_class. ! * decl.c (java_expand_body): Set output_class from fndecl. ! ! 2004-01-15 Michael Chastain ! ! * class.c (gen_indirect_dispatch_tables): Fix string length ! calculations. ! ! 2004-01-15 Kelley Cook ! ! * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory. ! (java.srcextra): Copy above back to source directory if requested. ! (po-generated): Delete reference to $(parsedir). ! (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir). ! Use implicit rule. ! ! 2004-01-14 Jan Hubicka ! ! * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost ! estimation. ! ! 2004-01-09 Mark Mitchell ! ! * java-tree.h (java_expand_expr): Change prototype. ! * expr.c (java_expand_expr): Add alt_rtl parameter. ! ! 2004-01-09 Andrew Haley ! ! PR java/12755: ! * parse.y (java_fix_constructors): Set output_class. ! (java_reorder_fields): Likewise. ! (java_layout_classes): Likewise. ! (java_expand_classes): Generate indirect dispatch tables. ! (java_expand_classes): Set output_class. ! (java_finish_classes): Likewise. ! * lang.c (java_init): Turn on always_initialize_class_p if we're ! using indirect dis[atch. ! (java_decl_ok_for_sibcall): Use output_class, not current_class. ! (java_get_callee_fndecl): Use class local atable. ! * jcf-parse.c ! (always_initialize_class_p): Decl moved to java-tree.h. ! (HANDLE_CLASS_INFO): Set output_class. ! (read_class): Likewise. ! (parse_class_file): Call gen_indirect_dispatch_tables. ! (parse_zip_file_entries): Set output_class. ! (java_parse_file): Set output_class. Don't emit symbol tables. ! * java-tree.h (output_class): New. ! Remove global declarations for otable, atable, and ctable. ! (always_initialize_class_p): moved here from decl.c. ! (DECL_OWNER): New. ! (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL, ! TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL, ! TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New. ! (struct lang_type): Add otable_methods, otable_decl, ! otable_syms_decl, atable_methods, atable_decl, atable_syms_decl, ! ctable_decl, catch_classes, type_to_runtime_map. ! * expr.c (build_field_ref): Make otable, atable, and ctable class ! local rather than global. ! (build_known_method_ref): Likewise. ! (build_invokeinterface): Likewise. ! (java_expand_expr): Pass runtime type (rather than actual type) to ! expand_start_catch. ! * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for ! this class. Look up each class in that map to delete duplicates. ! (expand_end_java_handler): Pass runtime type (rather than actual ! type) to expand_start_catch. ! * decl.c: (always_initialize_class_p): Decl moved to java-tree.h. ! (do_nothing): New. ! (java_init_decl_processing): Rearrange things. Remove global ! declarations of otable, atable, and ctable. ! (java_init_decl_processing): Make lang_eh_runtime_type do_nothing. ! (java_expand_body): Set output_class. ! * constants.c (build_constant_data_ref): Use output_class, not ! current_class. ! (alloc_name_constant): Likewise. ! * class.c (gen_indirect_dispatch_tables): New. ! (build_class_ref): Generate hard reference to superclass, even if ! using indirect dispatch. ! (build_static_field_ref): Use class local atable. ! (make_class_data): Generate hard reference to superclass, even if ! using indirect dispatch. ! Generate symbolic references to interfaces when using indirect ! dispatch. ! (make_class_data): Emit otable, atable, and ctable. ! Make otable, atable, and ctable class local rather than global. ! (emit_catch_table): Make otable, atable, and ctable class local ! rather than global. ! ! 2003-12-25 Andrew Pinski ! ! * parse.y (catch_clause_parameter): Fix typo. ! ! PR java/13404 ! * parse.y: (catch_clause_parameter): Return early if $3, aka ! formal_parameter, is null. ! ! 2003-12-20 Kazu Hirata ! ! * class.c: Remove uses of "register" specifier in ! declarations of arguments and local variables. ! * decl.c: Likewise. ! * expr.c: Likewise. ! * gjavah.c: Likewise. ! * jcf-dump.c: Likewise. ! * jcf-io.c: Likewise. ! * jcf-parse.c: Likewise. ! * jcf-write.c: Likewise. ! * keyword.h: Likewise. ! * parse.y: Likewise. ! * typeck.c: Likewise. ! * verify.c: Likewise. ! ! 2003-12-06 Kelley Cook ! ! * Make-lang.in (GCJ_CROSS_NAME): Delete. ! (java.install_common, java.install-man): Adjust for above. ! (java.uninstall): Likewise. ! ! 2003-12-03 Michael Koch ! ! * class.c (make_class_data): ! Push field value to 'hack_signers' instead of 'signers'. ! * decl.c (java_init_decl_processing): ! Push field 'hack_signers' instead of 'signers'. ! ! 2003-12-03 Zack Weinberg ! ! * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before ! including iconv.h. ! ! 2003-12-03 Ralph Loader ! ! PR java/12374: ! * parse.y (qualify_ambiguous_name): Remove lots of broken ! field access processing - there's no need to do that here, ! because we have resolve_field_access. Remove ! RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else. ! * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't ! used. ! ! 2003-12-01 Jeff Sturm ! ! Fix PR java/13237 ! * parse.y (java_complete_lhs): Save location prior to patching ! CALL_EXPR. ! ! 2003-11-25 Mohan Embar ! ! PR java/12548 ! * resource.c (write_resource_constructor): Append ! "_resource" to constructor identifier name. ! ! 2003-11-25 Jeff Sturm ! ! Fix PR java/13183. ! * constants.c (cpool_for_class): New function. ! (outgoing_cpool): Remove global variable. ! (alloc_name_constant): Use cpool_for_class. ! (build_constants_constructor): Likewise. ! * decl.c (java_expand_body): Set current_class. ! * java-tree.h (outgoing_cpool) Remove declaration. ! (init_outgoing_cpool): Likewise. ! * jcf-parse.c (init_outgoing_cpool): Remove function. ! (parse_class_file): Don't call init_outgoing_cpool. ! * parse.y (java_complete_expand_methods): Don't call ! init_outgoing_cpool. Don't save outgoing_cpool. ! (java_expand_classes): Don't restore outgoing_cpool. ! (java_finish_classes): Likewise. ! ! 2003-11-24 Mohan Embar ! ! * Make-lang.in: (java.install-common) Add ! symlink for $(target_noncanonical)-gcjh for ! native builds. ! ! 2003-11-20 Joseph S. Myers ! ! * Make-lang.in (java.extraclean): Delete. ! ! 2003-11-20 Joseph S. Myers ! ! * Make-lang.in (check-java): Add. ! ! 2003-11-19 Jeff Sturm ! ! Fix PR java/13024. ! * except.c (prepare_eh_table_type): Allocate variable-sized ! buffer `buf' with alloca. ! ! 2003-11-17 Jeff Sturm ! ! Fix PR java/12857. ! ! decl.c (java_init_decl_processing): Don't initialize ! class_not_found_type_node, no_class_def_found_type_node. ! ! java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE, ! JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index. ! (class_not_found_type_node, no_class_def_found_type_node): ! Don't define. ! ! parse.y (build_dot_class_method_invocation): Add this_class ! argument. Qualify method invocations to a different class. ! (create_new_parser_context): Initialize saved_data_ctx to 0. ! (java_parser_context_save_global): Initialize saved_data_ctx to 1. ! (build_dot_class_method): Don't load classes. Register ! incomplete types. ! (build_incomplete_class_ref): Special cases for interfaces ! and inner classes. Move build_dot_class_method call to here... ! (patch_incomplete_class_ref): ...from here. Pass current_class ! to build_dot_class_method_invocation. ! (build_assertion): Pass class_type to ! build_dot_class_method_invocation. ! (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node. ! ! 2003-11-17 Jeff Sturm ! ! Fix PR java/12739. ! * java-tree.h (BLOCK_EMPTY_P): Define. ! * parse.y (java_complete_lhs): Check for empty blocks ! in TRY_FINALLY_EXPR case. ! ! 2003-11-17 Andrew Haley ! ! * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New. ! (struct lang_decl_var:freed): New variable. ! * decl.c (poplevel): Mark local vars that have gone out of scope. ! (push_jvm_slot): Don't use the RTL of a var that has gone out of ! scope. ! ! 2003-11-16 Jason Merrill ! ! * Make-lang.in (java.tags): Create TAGS.sub files in each directory ! and TAGS files that include them for each front end. ! ! 2003-11-15 Tom Tromey ! ! * gjavah.c (print_stub_or_jni): Pass `env' to FatalError. ! ! 2003-11-12 Jason Merrill ! ! PR optimization/12547 ! * lang.c (java_tree_inlining_walk_subtrees): Just walk ! BLOCK_EXPR_BODY directly. ! ! 2003-11-12 Andrew Haley ! ! PR java/11045 ! * parse.y (fold_constant_for_init): Check that we really do have a ! constant. ! ! PR java/11533 ! * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for ! init_test_decls being inlined. ! ! PR java/12890: ! * parse.y (do_resolve_class): Check return value from ! breakdown_qualified(). ! ! 2003-11-11 Tom Tromey ! ! PR java/12915: ! * parse.y (merge_string_cste): Handle case where we have a ! pointer that happens to be zero, not null_pointer_node. ! ! 2003-11-10 Tom Tromey ! ! * jcf-parse.c (classify_zip_file): Correctly compare ! filename_length against length of manifest file's name. ! ! 2003-11-08 Tom Tromey ! ! PR java/12894: ! * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file. ! ! 2003-11-06 Andrew Haley ! ! * expr.c (java_stack_swap): Make sure destination stack slots are ! of the correct type. ! ! 2003-11-03 Kelley Cook ! ! * Make-lang.in (dvi): Move targets to $(docobjdir). ! (gcj.dvi): Simplify rule and adjust target. ! (gcj.info): Simplify rule. ! (gcj.pod): New intermediate rule. ! (gcjh.pod): Likewise. ! (jv-scan.pod): Likewise. ! (jcf-dump.pod): Likewise. ! (gij.pod): Likewise. ! (jv-convert.pod): Likewise. ! (rmic.pod): Likewise. ! (rmiregistry.pod): Likewise. ! (gcj.1): Delete. ! (gcjh.1): Delete. ! (jv-scan.1): Delete. ! (jcf-dump.1): Delete. ! (gij.1): Delete. ! (jv-convert.1): Delete. ! (rmic.1): Delete. ! (rmiregistry.1): Delete. ! ! 2003-11-02 Jeff Sturm ! ! Fixes PR java/12866. ! * parse.y (resolve_qualified_expression_name): Move test ! for outer field access methods from here... ! (check_thrown_exceptions) ...to here. ! ! 2003-11-01 Kelley Cook ! ! * .cvsignore: Delete. ! ! 2003-10-28 Frank Ch. Eigler ! ! * verify.c (verify_jvm_instructions): Don't warn about legal ! eh binding regions generated for example by jdk 1.4.1. ! ! 2003-10-24 David S. Miller ! ! * jcf-parse.c (jcf_parse): Fix args to fatal_error(). ! ! 2003-10-22 Andrew Haley ! ! * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New. ! (java_get_callee_fndecl): New. ! ! * jcf-parse.c (java_parse_file): Call emit_catch_table(). ! ! * java-tree.h (ctable_decl): New. ! (catch_classes): New. ! (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES. ! ! * decl.c (java_init_decl_processing): Add catch_class_type. ! Add ctable_decl. ! Add catch_classes field. ! ! * class.c (build_indirect_class_ref): Break out from ! build_class_ref. ! (make_field_value): Check flag_indirect_dispatch. ! (make_class_data): Ditto. ! Tidy uses of PUSH_FIELD_VALUE. ! Add field catch_classes. ! (make_catch_class_record): New. ! ! * java-tree.h (PUSH_FIELD_VALUE): Tidy. ! ! 2003-10-22 Kazu Hirata ! ! * jcf-write.c: Follow spelling conventions. ! * parse.y: Likewise. ! ! 2003-10-22 Kazu Hirata ! ! * ChangeLog: Fix typos. ! * expr.c: Fix comment typos. ! * jcf-write.c: Likewise. ! * lang.c: Likewise. ! * lex.c: Likewise. ! * mangle.c: Likewise. ! * parse-scan.y: Likewise. ! * parse.y: Likewise. ! ! 2003-10-22 Tom Tromey ! ! * expr.c (expand_byte_code): Only warn about dead bytecode when ! extra_warnings is set. ! ! 2003-10-22 Bryce McKinlay ! ! Fix for PR java/12586. ! * mangle.c (find_compression_record_match): Don't iterate through ! package namespace elements unless they all match compression_table ! entries. ! ! 2003-10-20 Kelley Cook ! ! * Make-lang.in (info): Honor $(parsedir) and $(docobjdir). ! (generate-manpages): Likewise. ! (java.maintainer-clean): Likewise. ! (gcj.info): Likewise. ! (gcj.1): Likewise. ! (gcjh.1): Likewise. ! (jv-scan.1): Likewise. ! (jcf-dump.1): Likewise. ! (gij.1): Likewise. ! (jv-convert.1): Likewise. ! (rmic.1): Likewise. ! (rmiregistry.1): Likewise. ! (java.install-man): Likewise. ! (parse-scan.o): Move and define complete compile line. ! (parse.o): Likewise. ! (jcf-tree-inline.o): Move. ! ! 2003-10-20 Mark Mitchell ! ! * Make-lang.in (info): Update dependencies. ! (java.install-info): Remove. ! ($(srcdir)/java/gcj.info): Replace with ... ! ($(docobjdir)/gcj.info): ... this. ! ! 2003-10-14 Nathanael Nerode ! ! * Make-lang.in: Replace uses of $(target_alias) with ! $(target_noncanonical). ! ! 2003-10-09 Tom Tromey ! ! * decl.c (java_init_decl_processing): Declare signers field. ! * class.c (make_class_data): Set signers field. ! ! 2003-10-09 Jason Merrill ! ! * parse.y (patch_assignment): Use make_node to create a BLOCK. ! * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a ! POINTER_TYPE. ! ! 2003-10-06 Mark Mitchell ! ! * Make-lang.in (java.info): Replace with ... ! (info): ... this. ! (java.dvi): Replace with ... ! (dvi): ... this. ! (java.generated-manpages): Replace with ... ! ! 2003-10-03 Kelley Cook ! ! * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros. ! ! 2003-10-01 Andrew Haley ! ! * jcf-parse.c (java_parse_file): Write otable and atable. ! * java-tree.h (atable_methods): New. ! (atable_decl): New. ! (atable_syms_decl): New. ! (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL, ! JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*. ! (symbol_*type): Rename method_symbol* to symbol*type. ! (emit_offset_symbol_table): Delete. ! (emit_symbol_table): New. ! (get_symbol_table_index): New. ! (atable_type): New. ! * expr.c (build_field_ref): Handle flag_indirect_dispatch. ! (build_known_method_ref): Likewise. ! (get_symbol_table_index): Rename from get_offset_table_index. ! Parameterize to allow re-use by differing types of symbol table. ! (build_invokevirtual): Pass table to get_offset_table_index. ! * decl.c (java_init_decl_processing): Push types and decls for ! atable and atable_syyms. ! * class.c (build_static_field_ref): Handle flag_indirect_dispatch. ! (make_class_data): Add new fields atable and atable_syms. ! (emit_symbol_table): Rename from emit_offset_symbol_table. ! Parameterize to allow re-use by different types of symbol table. ! (build_symbol_entry): Renamed from build_method_symbols_entry. ! ! 2003-09-30 Roger Sayle ! ! * jcf-write.c (generate_bytecode_insns): Implement evaluate-once ! semantics for SAVE_EXPR, by caching the result in a temporary. ! ! 2003-09-28 Richard Henderson ! ! * check-init.c (check_init): Save and restore input_location ! instead of file and line separately. ! * decl.c (java_expand_body): Likewise. ! * jcf-write.c (generate_bytecode_insns): Likewise. ! * parse.y (safe_layout_class): Likewise. ! * jcf-parse.c (read_class, parse_class_file): Likewise. ! (java_parse_file): Use %H for warning locator. ! ! 2003-09-28 Roger Sayle ! ! * expr.c (java_check_reference): Use the semantics of COND_EXPRs ! with void-type branches instead of using a COMPOUND_EXPR. ! ! 2003-09-28 Jeff Sturm ! ! * decl.c (java_optimize_inline, dump_function): Remove. ! * java-tree.h (java_optimize_inline): Remove declaration. ! * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set. ! * parse.y (source_end_java_method, java_expand_classes): ! Likewise. Remove dead code. ! ! 2003-09-27 Roger Sayle ! ! * lang.c (java_init_options): Set flag_evaluation_order. ! * expr.c (force_evaluation_order): Don't attempt to force ! evaluation order of binary operations using save_expr. ! * parse.y (java_complete_lhs): No longer need to call ! force_evaluation_order when constructing binary operators. ! ! 2003-09-27 Alexandre Petit-Bianco ! Bryce McKinlay ! ! PR java/1333: ! * parse.y (not_accessible_field_error): New function. ! (resolve_expression_name): Check field access permissions. ! (resolve_qualified_expression_name): Use ! not_accessible_field_error. ! (resolve_qualified_expression_name): Likewise. ! ! 2003-09-24 Rainer Orth ! ! * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value. ! ! 2003-09-23 Roger Sayle ! ! * jcf-write.c (generate_bytecode_insns): Optimize binary operations ! with equal operands without side-effects. ! ! 2003-09-22 Jeff Sturm ! ! * decl.c (java_init_decl_processing): Don't emit otable decls ! if flag_indirect_dispatch is not set. ! ! 2003-09-21 Richard Henderson ! ! * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y, ! resource.c: Revert. ! ! 2003-09-21 Richard Henderson ! ! * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y, ! resource.c: Update for DECL_SOURCE_LOCATION rename and change to const. ! ! 2003-09-20 Richard Henderson ! ! * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics. ! ! 2003-09-18 Roger Sayle ! ! * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case. ! * check-init.c (check_init): Likewise. ! ! 2003-09-18 Roger Sayle ! ! * jcf-write.c (generate_bytecode_insns): Add support for fconst_2. ! ! 2003-09-16 Andrew Haley ! ! * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR. ! ! 2003-09-17 Ranjit Mathew ! ! Fixes PR java/9577 ! * mangle.c (find_compression_record_match): Skip ! over a "6JArray" (the array template mangled string) ! IDENTIFIER_NODE. ! (mangle_array_type): Correct minor typo. ! (atms): Move definition to the beginning. ! ! 2003-09-16 Bryce McKinlay ! ! * class.c (add_miranda_methods): Ensure super-interfaces are laid ! out. Fix for PR java/12254. ! ! 2003-09-11 Richard Henderson ! ! * parse.y (source_end_java_method): Update for new ! cgraph_finalize_function argument. ! ! 2003-09-09 Richard Henderson ! ! * parse.y (source_end_java_method): Update call to ! cgraph_finalize_function. ! ! 2003-09-03 Jeff Sturm ! ! * decl.c (java_expand_body): New function. ! * expr.c (build_class_init): Set DECL_IGNORED_P. ! * java-tree.h (start_complete_expand_method, ! java_expand_body): Declare. ! * jcf-parse.c (cgraph.h): Include. ! (java_parse_file): Handle flag_unit_at_a_time. ! * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING, ! LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define. ! (java_estimate_num_insns): Use walk_tree_without_duplicates. ! (java_start_inlining): New function. ! * parse.h (java_finish_classes): Declare. ! * parse.y: Include cgraph.h. ! (block): Don't special-case empty block production. ! (craft_constructor): Set DECL_INLINE. ! (source_end_java_method): Handle flag_unit_at_a_time. ! Replace inline code with call to java_expand_body. ! (start_complete_expand_method): Remove static modifier. ! (java_expand_method_bodies): Patch function tree for ! class initialization and/or synchronization as needed. ! Don't begin RTL expansion yet. ! (java_expand_classes): Check flag_unit_at_a_time before ! calling finish_class. ! (java_finish_classes): New function. ! (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type. ! (patch_assignment): Set DECL_CONTEXT on temporary variable. ! (emit_test_initialization): Set DECL_IGNORED_P. ! ! 2003-09-03 Roger Sayle ! ! * builtins.c (enum builtin_type): Delete unused enumeration. ! * Make-lang.in (java/builtins.o): Remove built-types.def dependency. ! ! 2003-08-28 Tom Tromey ! ! * gcj.texi (Extensions): Document gcjlib URLs. ! ! 2003-08-20 Tom Tromey ! ! * gcj.texi (Extensions): Added xref. ! (libgcj Runtime Properties): Document ! gnu.gcj.runtime.VMClassLoader.library_control. ! ! 2003-08-20 Andrew Haley ! ! * except.c (prepare_eh_table_type): Use new encoding for exception ! handlers when using -fno-assume-compiled. ! ! 2003-08-13 Tom Tromey ! ! * gcj.texi (Invoking gij): Document -X and -?. ! ! 2003-08-13 Mohan Embar ! ! * Make-lang.in: Added missing win32-host.o to JAVA_OBJS, ! GCJH_OBJS, JCFDUMP_OBJS ! * win32-host.c: Removed the unnecessary and broken dependency ! on jcf.h ! ! 2003-08-11 Tom Tromey ! ! * parse.y (java_check_regular_methods): Typo fixes. Call ! check_interface_throws_clauses. Use ! check_concrete_throws_clauses. ! (check_interface_throws_clauses): New function. ! (check_concrete_throws_clauses): New function. ! (hack_is_accessible_p): New function. ! (find_most_specific_methods_list): Added FIXME. ! * typeck.c (lookup_do): Use `flags' argument to decide what to ! do. Reimplemented. ! (lookup_argument_method_generic): New function. ! (lookup_argument_method2): Removed. ! * jcf.h (ACC_INVISIBLE): New define. ! * jcf-write.c (generate_classfile): Skip invisible methods. ! * class.c (add_miranda_methods): New function. ! (layout_class_methods): Use it. ! (get_access_flags_from_decl): Use ACC_INVISIBLE. ! * java-tree.h (METHOD_INVISIBLE): New define. ! (lang_decl_func) [invisible]: New field. ! (lookup_argument_method_generic): Declare. ! (SEARCH_INTERFACE): New define. ! (SEARCH_SUPER): Likewise. ! (SEARCH_ONLY_INTERFACE): Likewise. ! (SEARCH_VISIBLE): Likewise. ! (lookup_argument_method2): Removed declaration. ! ! 2003-08-05 Tom Tromey ! ! Fix for PR java/11600: ! * parse.y (java_complete_lhs): See whether we're calling a method ! on an array. ! (check_thrown_exceptions): Added `is_array_call' argument; ! fixed `clone' checking; updated all callers. ! ! 2003-08-05 Steven Bosscher ! ! * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h). ! ! 2003-08-03 Tom Tromey ! ! * java-tree.h (METHOD_TRANSIENT): Removed. ! * decl.c (pushdecl): Removed some dead code. ! * class.c (get_access_flags_from_decl): Can't have transient ! method. ! (add_method_1): Can't have a transient method. ! ! 2003-07-28 Andreas Jaeger ! ! * jvspec.c: Convert to ISO C90 prototypes. ! ! 2003-07-25 Nathan Sidwell ! ! * decl.c (force_poplevels): Fix warning call. ! ! 2003-07-25 Gabriel Dos Reis ! ! * expr.c (expand_java_field_op): Don't use xxx_with_decl ! (expand_java_field_op): Likewise. ! * class.c (layout_class_method): Likewise ! (emit_register_classes): Likewise. ! * decl.c (pushdecl): Likewise. ! (poplevel): Likewise. ! (force_poplevels): Likewise. ! (give_name_to_locals): Likewise. ! * check-init.c (check_for_initialization): Likewise. ! ! 2003-07-24 Jason Merrill ! ! * java-tree.h: Move boolean_type_node et al to the back end. ! ! 2003-07-19 Kaveh R. Ghazi ! ! * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary ! casts. ! ! 2003-07-19 Neil Booth ! ! * lang.opt: Don't show -MD_ and -MDD_. ! ! 2003-07-18 Neil Booth ! ! * lang-options.h: Remove. ! * lang.opt: Add help text. ! ! 2003-07-15 Kazu Hirata ! ! * expr.c: Remove the last argument to expand_assignment(). ! ! 2003-07-09 Jan Hubicka ! ! * java-tree.h (DECL_NUM_STMTS): Rename to... ! (DECL_ESTIMATED_INSNS): ... this. ! * lang.c (java_estimate_num_insns, java_estimate_num_insns_1): ! New static functions. ! (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define. ! * parser.y (add_stmt_to_compound): Do not account statements. ! ! 2003-07-08 Mark Wielaard ! ! * gcj.texi: CNI now expands to Compiled Native Interface. ! ! 2003-07-08 Rainer Orth ! ! * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND. ! ! 2003-07-07 Nathan Sidwell ! ! * expr.c (expand_byte_code): Adjist emit_line_note call. ! ! 2003-07-06 Neil Booth ! ! * lang.c (java_handle_option): Don't handle filenames. ! ! 2003-07-02 Zack Weinberg ! ! * jcf-path.c: Don't default-define PATH_SEPARATOR nor ! DIR_SEPARATOR. ! Use FILENAME_CMP. ! * jcf-write.c: Don't default-define DIR_SEPARATOR. ! * jcf.h: Delete COMPARE_FILENAMES definition. ! ! 2003-07-02 Neil Booth ! ! * lang.c (java_init_options): Update prototype. ! ! 2003-07-01 Nathan Sidwell ! ! * decl.c (poplevel): Adjust define_label call. ! ! 2003-06-27 Zack Weinberg ! ! * gjavah.c (flag_jni): Make non-static. ! * parse-scan.y (ctxp): Make non-static. ! ! * class.c (build_method_symbols_entry) ! * expr.c (get_offset_table_index) ! * jcf-parse.c (jcf_parse): ! Mark the definition static, matching the forward declaration. ! ! 2003-06-26 Neil Booth ! ! * lang.c (java_handle_option): Don't check for missing arguments. ! ! 2003-06-20 Nathan Sidwell ! ! * class.c (push_class): Use a location_t to save place. ! (emit_register_classes): Set input_location. Adjust ! expand_function_end call. ! * resource.c (write_resource_constructor): Likewise. ! * decl.c (end_java_method): Adjust expand_function_end call. ! * parse.y (source_end_java_method): Likewise. ! ! 2003-06-17 Robert Abeles ! ! * lang.c (java_handle_option): Likewise. ! ! 2003-06-16 Neil Booth ! ! * lang.c (java_handle_option): Special-casing of optional ! joined arguments no longer needed. ! * lang.opt: Update switches that take optional argument. ! ! 2003-06-15 Neil Booth ! ! * lang.opt: Declare Java. ! * lang.c (java_init_options): Update. ! ! 2003-06-15 Neil Booth ! ! * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h. ! ! 2003-06-14 Neil Booth ! ! * lang-specs.h: Rewrite -MD and -MMD to append an underscore. ! * lang.c (java_handle_option): -MD and -MMD have an underscore. ! * lang.opt: -MD and -MMD have an underscore. ! ! 2003-06-14 Nathan Sidwell ! ! * class.c (emit_register_classes): Adjust init_function_start ! call. ! * decl.c (complete_start_java_method): Likewise. ! * resource.c (write_resource_constructor): Likewise. ! ! 2003-06-14 Neil Booth ! ! * Make-lang.in: Update to use options.c and options.h. ! * lang.c: Include options.h not j-options.h. ! (java_handle_option): Abort on unrecognized option. ! (java_init_options): Request Java switches. ! ! 2003-06-11 Neil Booth ! ! * Make-lang.in: Handle mostlyclean. ! ! 2003-06-11 Tom Tromey ! ! * lang.c (java_handle_option): Update dependency_tracking for ! OPT_MF case. ! ! * lang.c (java_handle_option): OPT_fbootclasspath_ can take an ! empty argument. ! ! 2003-06-10 Andrew Haley ! ! * resource.c (write_resource_constructor): Use expand_expr to ! generate the address of the label attached to a resource. ! * Make-lang.in (java/resource.o): Add expr.h 2003-06-10 Andrew Haley * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New. (java_decl_ok_for_sibcall): New. ! 2003-06-09 Neil Booth ! * Make-lang.in (JAVA_OBJS, java/lang.o): Update. ! (java/j-options.c, java/j-options.h): New. ! * java-tree.h (resource_name, compile_resource_file, ! compile_resource_data): Constify. ! * jcf-write.c (jcf_write_base_directory): Similarly. ! * jcf.h (jcf_write_base_directory): Similarly. ! * lang.c: Include j-options.h. ! (cl_options_count, cl_options, string_option, java_decode_option, ! lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION, ! process_option_with_no): Remove. ! (resource_name): Constify. ! (LANG_HOOKS_HANDLE_OPTION): Override. ! (java_handle_option): New. ! (java_init): Don't call jcf_path_init. ! (java_init_options): Call jcf_path_init. ! * lang.opt: New. ! * resource.c (compile_resource_data, compile_resource_file): Constify. ! 2003-06-09 Nathan Sidwell ! * java-tree.h (DECL_FUNCTION_LAST_LINE): New. ! (struct lang_decl_func): Add last_line field. ! * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST, ! DECL_SOURCE_LINE_LAST): Remove. ! * parse.y (missing_return_error, finish_method_declaration, ! lookup_cl, start_artificial_method_body, source_end_java_method, ! start_complete_expand_method): Adjust. ! 2003-06-08 Tom Tromey ! * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and ! fno-assume-compiled. ! ! 2003-06-08 Roger Sayle ! ! * builtins.c (define_builtin_type, builtin_types): Delete. ! (define_builtin): Rewritten to take just the built-in code, ! the function's name, type and fallback library function name. ! All built-ins used by Java are implicit and BUILT_IN_NORMAL. ! (initialize_builtins): Overhaul to define the GCC builtins ! used by gcj manually, providing the Java run-time's ! implementations as the fallback library function. ! ! 2003-06-08 Anthony Green ! ! * parse.y (patch_cast): Fix conversions from floating-point to ! integral types. ! ! 2003-06-08 Neil Booth ! ! * Make-lang.in: Update. ! * lang.c: Include opts.h. Define cl_options_count and cl_options. ! ! 2003-06-07 Neil Booth ! ! * lang.c (java_init_options): Update. ! ! 2003-06-05 Jan Hubicka ! ! * Make-lang.in: Add support for stageprofile and stagefeedback ! ! 2003-05-31 Roger Sayle ! ! * lang.c (java_init_options): Prescribe wrap-around two's ! complement arithmetic overflow by setting flag_wrapv. ! ! 2003-05-29 Roger Sayle ! ! * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete. ! (builtin_record): Add an additional builtin_code field to ! record which GCC built-in corresponds to the Java function. ! (java_builtins): Add new entries for atan, atan2, exp, log, ! pow and tan. ! (max_builtin, min_builtin, abs_builtin): Perform constant ! folding on the resulting tree. ! (java_build_function_call_expr): Likewise, perform constant ! folding on the resulting tree. ! (initialize_builtins): The NULL creators are now allowed in ! the java_builtins table, which is now terminated by an entry ! with builtin_code == END_BUILTINS. ! (check_for_builtin): Likewise. If the matching creator is ! NULL, construct the call using java_build_function_call_expr ! directly with the decl for the corresponding builtin_code. ! ! 2003-05-23 Nathanael Nerode ! ! * win32-host.c: Normalize copyright boilerplate. ! ! 2003-05-16 Kaveh R. Ghazi ! ! * parse.y (print_int_node): Use string concatentation on ! HOST_WIDE_INT_PRINT_* format specifier to collapse multiple ! function calls into one. ! ! 2003-05-13 Zack Weinberg ! ! * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to ! fatal_io_error with calls to fatal_error; add ": %m" to the end of ! all the affected error messages. ! ! 2003-05-13 Richard Henderson ! ! * class.c (layout_class_method): Set DECL_EXTERNAL. ! * decl.c (java_mark_decl_local, java_mark_class_local): New. ! * java-tree.h (java_mark_class_local): Declare. ! * jcf-parse.c (parse_class_file): Use it. ! * parse.y (java_expand_classes): Likewise. ! ! 2003-05-04 Nathan Sidwell ! ! * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h. ! * lex.h: #include input.h. ! * jv-scan.c (input_filename): Remove. 2003-05-02 Tom Tromey + PR java/10491: + * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro. + (handle_inner_classes): New function. + + 2003-05-01 Tom Tromey + PR java/10459: * parse.y (finish_for_loop): Do nothing if update expression is a EXPR_WFL_NODE wrapping nothing. (java_complete_lhs) : Likewise. + 2003-05-02 Nathan Sidwell + + * lex.h (input_lineno): Remove declaration. + * parse-scan.y: #include input.h. + (input_filename): Remove declaration. + (input_location): Add definition. + (input_line): Remove definition. + + 2003-05-01 Nathan Sidwell + + * lex.h (lineno): Rename to ... + (input_line): ... here + * parse-scan.y (lineno): Rename to ... + (input_line): ... here. + (reset_report): Rename lineno to input_line. + * check-init.c (check_init): Likewise. + * class.c (push_class): Likewise. + * decl.c (complete_start_java_method, end_java_method): Likewise. + * expr.c (expand_byte_code): Likewise. + * jcf-parse.c (give_name_to_class, parse_class_file): Likewise. + * jcf-write.c (generate_bytecode_insns): Likewise. + * lex.c (java_init_lex, java_allocate_new_line, + do_java_lex): Likewise. + * parse.h (YYNOT_TWICE): Likewise. + * parse.y (empty_statement, expression_statement, + java_pop_parser_context, java_parser_context_save_global, + yyerror, register_fields, method_header, safe_layout_class, + find_in_imports_on_demand, create_artificial_method, + source_end_java_method, start_complete_expand_method, + build_thisn_assign, java_complete_lhs, + maybe_absorb_scoping_block): Likewise. + 2003-04-20 Mohan Embar * jcf-io.c (find_class): use DIR_SEPARATOR instead of '/' when computing java source filename + 2003-04-13 Tom Tromey + + * gjavah.c (print_c_decl): Indentation fix. + + 2003-04-12 Zack Weinberg + + * class.c (make_field_value, make_method_value, get_dispatch_table) + (make_class_data, emit_offset_symbol_table) + * constants.c (build_constants_constructor) + * java-tree.h (START_RECORD_CONSTRUCTOR) + * parse.y (maybe_build_array_element_wfl): + Use build_constructor. + 2003-04-10 Eric Blake PR java/10253: *************** *** 74,114 **** Only free local vars if no jsr insns have been emittted. Call maybe_free_localvar, not localvar_free. 2003-03-23 Zack Weinberg - PR bootstrap/10216 * Make-lang.in: Link jcf-dump against $(LDEXP_LIB). ! 2003-03-30 Joseph S. Myers ! * gcj.texi: Remove @ at start of file. ! 2003-03-28 Zack Weinberg ! PR bootstrap/10216 ! * javaop.h (jfloat, jdouble): Make them structures mirroring ! the bit fields of IEEE float and double respectively. ! (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS, ! JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New. ! (union Word, union DWord): Delete. ! (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match. ! * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK, ! D_NAN_MASK): Delete. ! (jni_print_float, jni_print_double): New. Generate ! hexadecimal floating constants. ! (print_field_info): Use jni_print_float/double. ! * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble ! finite floating point numbers for output; special case ! non-finite floats. ! 2003-03-12 Andrew Haley * gjavah.c (is_first_data_member): New global variable. ! (print_c_decl): If it's the first data member, align it as the ! superclass. ! (process_file): Set is_first_data_member. 2003-03-11 Tom Tromey --- 1137,1195 ---- Only free local vars if no jsr insns have been emittted. Call maybe_free_localvar, not localvar_free. + 2003-03-30 Joseph S. Myers + + * gcj.texi: Remove @ at start of file. + + 2003-03-25 Tom Tromey + + * parse.y (create_interface): Call CHECK_DEPRECATED. + 2003-03-23 Zack Weinberg * Make-lang.in: Link jcf-dump against $(LDEXP_LIB). ! 2003-03-21 Zack Weinberg ! * javaop.h (jfloat, jdouble): Make them structures mirroring ! the bit fields of IEEE float and double respectively. ! (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS, ! JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New. ! (union Word, union DWord): Delete. ! (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match. ! * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK, ! D_NAN_MASK): Delete. ! (jni_print_float, jni_print_double): New. Generate ! hexadecimal floating constants. ! (print_field_info): Use jni_print_float/double. ! * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble ! finite floating point numbers for output; special case ! non-finite floats. ! 2003-03-19 Nathanael Nerode ! * lang.c (java_dump_tree): Change return type from 'int' to 'bool'. ! Replace 0 and 1 with true and false in return statements. ! 2003-03-19 Tom Tromey ! ! * lex.c (do_java_lex): Renamed from java_lex. ! (java_lex): New function. ! Include timevar.h. ! ! 2003-03-13 Tom Tromey ! ! * parse.y (resolve_inner_class): Error if qualifier is a primitive ! type. ! ! 2003-03-04 Andrew Haley * gjavah.c (is_first_data_member): New global variable. ! (print_c_decl): If it's the first data member, align it as the ! superclass. ! (process_file): Set is_first_data_member. 2003-03-11 Tom Tromey *************** *** 117,122 **** --- 1198,1208 ---- * expr.c (build_class_init): Don't optimize out initialization of implemented interface. + 2003-03-11 Andrew Haley + + * jcf-io.c (caching_stat): Initialize origsep to remove compiler + warning. + 2003-03-10 Ranjit Mathew * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR *************** *** 126,131 **** --- 1212,1222 ---- * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR and DIR_SEPARATOR_2 for a target into account. + 2003-03-08 Neil Booth + + * lang.c (java_init): Update prototype, move code to java_post_options. + (java_post_options): Similarly. + 2003-03-05 Ranjit Mathew * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to *************** *** 136,149 **** "strcmp" to compare file name components. Use IS_DIR_SEPARATOR instead of comparing directly against DIR_SEPARATOR. ! (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of comparing directly against DIR_SEPARATOR. ! 2003-03-04 Roger Sayle ! * builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3. (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3. 2003-02-28 Tom Tromey PR java/9695: --- 1227,1249 ---- "strcmp" to compare file name components. Use IS_DIR_SEPARATOR instead of comparing directly against DIR_SEPARATOR. ! (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of comparing directly against DIR_SEPARATOR. ! 2003-03-04 Tom Tromey ! * Make-lang.in (java.tags): New target. ! ! 2003-03-01 Roger Sayle ! ! * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3. (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3. + 2003-03-01 Tom Tromey + + * parse.y (jdep_resolve_class): Only check deprecation if we found + a decl. + 2003-02-28 Tom Tromey PR java/9695: *************** *** 152,167 **** * parse.y (do_resolve_class): Updated comment to explain parameters. 2003-02-12 Ranjit Mathew ! * decl.c (java_init_decl_processing): Change soft_lookupjnimethod_node to reflect the change in signature of _Jv_LookupJNIMethod in libjava/jni.cc * expr.c (build_jni_stub): Calculate and pass the size on the stack of the arguments to a JNI function. Use ! new target macro MODIFY_JNI_METHOD_CALL to allow a target to modify the call to a JNI method. 2003-02-04 Joseph S. Myers * gcj.texi: Update to GFDL 1.2. --- 1252,1321 ---- * parse.y (do_resolve_class): Updated comment to explain parameters. + 2003-02-26 Tom Tromey + + * jcf-write.c (generate_classfile): Check whether class is + deprecated before writing attribute count. + + 2003-02-25 Roger Sayle + + * java/decl.c (java_init_decl_processing): Get soft_fmod_node from + built_in_decls[BUILT_IN_FMOD] rather than define it ourselves. + + 2003-02-23 Tom Tromey + + * lang-options.h: Added -Wdeprecated. + * gcj.texi (Warnings): Document -Wdeprecated. + * java-tree.h (flag_deprecated): Declare. + * lang.c (lang_W_options): Added deprecated. + (flag_deprecated): New global. + * chartables.h: Rebuilt. + * gen-table.pl (process_one): Look at whitespace. + (print_tables): Define LETTER_SPACE, LETTER_MASK. + * parse.h (CLEAR_DEPRECATED): New macro. + (CHECK_DEPRECATED_NO_RESET): New macro. + * jcf-parse.c (handle_deprecated): New function. + (HANDLE_DEPRECATED_ATTRIBUTE): New define. + * jcf-reader.c (get_attribute): Handle Deprecated attribute. + * parse.y (resolve_type_during_patch): Check deprecation. + (jdep_resolve_class): Likewise. + (process_imports): Likewise. + (resolve_expression_name): Likewise. + (check_deprecation): Strip arrays from decl. Check + flag_deprecated. + (patch_method_invocation): Also check the particular constructor + for deprecation. + (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop. + * jcf-write.c (append_deprecated_attribute): New function. + (generate_classfile): Generate deprecated attribute when + appropriate. + * lex.c (java_parse_doc_section): Return type now void. Rewrote. + (java_lex) [case '*']: Simplify logic. + (java_start_char_p): Use LETTER_MASK. + (java_part_char_p): Likewise. + (java_space_char_p): New function. + + 2003-02-20 Nathan Sidwell + + Change base class access representation. + * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC. + (add_interface_do): Likewise. + 2003-02-12 Ranjit Mathew ! * decl.c (java_init_decl_processing): Change soft_lookupjnimethod_node to reflect the change in signature of _Jv_LookupJNIMethod in libjava/jni.cc * expr.c (build_jni_stub): Calculate and pass the size on the stack of the arguments to a JNI function. Use ! new target macro MODIFY_JNI_METHOD_CALL to allow a target to modify the call to a JNI method. + 2003-02-08 Roger Sayle + + * jcf-io.c (java_or_class_file): Use libiberty's lbasename + instead of basename to avoid compiler warnings on Tru64. + 2003-02-04 Joseph S. Myers * gcj.texi: Update to GFDL 1.2. *************** *** 183,193 **** --- 1337,1360 ---- * gjavah.c (throwable_p): Allocate 1 more byte for string. + 2003-01-31 Nathan Sidwell + + * class.c (make_class): Use BINFO_ELTS. + (set_super_info): Likewse. + (add_interface_do): Likewise. + 2003-01-30 Tom Tromey * jcf-parse.c (read_class): Update identifier's class value if it changed during parsing. + 2003-01-30 Loren James Rittle + + * Make-lang.in (po-generated): Find the targets in $(parsedir). + Propagate change to all other rules as required. + (java/parse-scan.o): Add explicit dependency on + $(parsedir)/java/parse-scan.c . + 2003-01-29 Tom Tromey * parse.y (patch_assignment): Only transform the rhs of an *************** *** 195,200 **** --- 1362,1371 ---- 2003-01-28 Tom Tromey + * jcf-write.c (generate_bytecode_conditional): Typo fixes. + + 2003-01-28 Tom Tromey + * lex.c (java_lex): Don't include UEOF as part of token. (java_read_unicode): Error if \u sequence prematurely terminated. *************** *** 203,227 **** * parse.y (java_check_regular_methods): Check for construct after checking types in throws clause. ! 2003-01-26 Christian Cornelssen ! * Make-lang.in (java.install-common, java.uninstall) ! (java.install-info, java.install-man): Prepend $(DESTDIR) ! to destination paths in all (un)installation commands. ! (java.install-common): Rewrite $(LN) command to support ! DESTDIR with "ln" as well as with "ln -s". ! 2003-01-24 Kaveh R. Ghazi ! * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*. ! * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned warning. 2003-01-21 Tom Tromey * parse.y (method_header): Native method can't be strictfp. No method can be transient or volatile. 2003-01-14 Andrew Haley * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a --- 1374,1505 ---- * parse.y (java_check_regular_methods): Check for construct after checking types in throws clause. ! 2003-01-24 Tom Tromey ! * class.c (build_static_field_ref): Only a String or numeric field ! can fold to a constant. ! 2003-01-23 Tom Tromey ! * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of ! file name in resource buffer. ! ! 2003-01-23 Tom Tromey ! ! * expr.c (build_known_method_ref): Use method's context to find ! method table index. ! ! 2003-01-23 Tom Tromey ! ! * constants.c (set_constant_entry): Allocated cleared memory. ! ! 2003-01-22 Tom Tromey ! ! * java-tree.h: Don't use PARAMS. ! * resource.c: Add prototypes for all functions. ! (write_resource_constructor): Use `const char *' to avoid warning. + 2003-01-22 Nathanael Nerode + + * jcf-parse.c (process_zip_dir): Remove unused variable. + + 2003-01-22 Tom Tromey + + * expr.c (build_invokeinterface): Abort if method's context is not + an interface. + + 2003-01-22 Tom Tromey + + * gcj.texi (Input and output files): Mention non-class entries. + * decl.c (java_init_decl_processing): Call + init_resource_processing. + * java-tree.h (compile_resource_data, write_resource_constructor, + compile_resource_file, init_resource_processing): Declare. + * config-lang.in (gtfiles): Added resource.c. + * Make-lang.in (gt-java-resource.h): New target. + (JAVA_OBJS): Added resource.o. + (java/resource.o): New target. + * resource.c: New file. + * class.c (compile_resource_file): Moved to resource.c. + (registerResource_libfunc): Likewise. + (utf8_decl_list): Mark with GTY; now static. + * jcf-parse.c (classify_zip_file): New function. + (parse_zip_file_entries): Use it; compile .properties files. + (process_zip_dir): Use classify_zip_file and compute_class_name. + Don't write class name into zip directory. + (java_parse_file): Call write_resource_constructor. + (compute_class_name): New function. + * jcf-io.c (read_zip_member): Reindented. + + 2003-01-21 Tom Tromey + + * class.c (supers_all_compiled): New function. + (make_class_data): Use it. + 2003-01-21 Tom Tromey * parse.y (method_header): Native method can't be strictfp. No method can be transient or volatile. + 2003-01-21 Kaveh R. Ghazi + + Make-lang.in (jvspec.o-warn): Add -Wno-error. + + 2003-01-18 Kazu Hirata + + * check-init.c: Fix comment typos. + * class.c: Likewise. + * constants.c: Likewise. + * decl.c: Likewise. + * except.c: Likewise. + * expr.c: Likewise. + * java-except.h: Likewise. + * java-tree.h: Likewise. + * javaop.h: Likewise. + * jcf-dump.c: Likewise. + * jcf-io.c: Likewise. + * jcf-parse.c: Likewise. + * jcf-write.c: Likewise. + * lang.c: Likewise. + * mangle.c: Likewise. + * typeck.c: Likewise. + * verify.c: Likewise. + + 2003-01-18 Kaveh R. Ghazi + + * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H). + * jcf-write.c: Include "tm_p.h". + + 2003-01-17 Kaveh R. Ghazi + + * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*. + + 2003-01-16 Kaveh R. Ghazi + + * builtins.c (java_build_function_call_expr): Renamed from + build_function_call_expr. All callers changed. + + * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H). + * jcf-parse.c: Include tm_p.h. + + * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned + warning. + + 2003-01-14 Tom Tromey + + * class.c (make_class_data): Check that super is compiled before + building class reference to it. + + 2003-01-14 Andrew Haley + + * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a + varargs function -- correct. + + 2003-01-14 Andrew Haley + + * decl.c (java_init_decl_processing): Temporarily back out previous patch. + 2003-01-14 Andrew Haley * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a *************** *** 230,235 **** --- 1508,1633 ---- * parse.y (patch_assignment): Copy the rhs of an assignment into a temporary if the RHS is a reference. + 2003-01-11 Kaveh R. Ghazi + + * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf. + * keyword.h: Regenerated. + + * All Files: Convert to ISO C style function definitions. + + 2003-01-09 Nathanael Nerode + + * parse.y (check_pkg_class_access): ANSIfy definition. + + 2003-01-09 Kaveh R. Ghazi + + * decl.c, parse-scan.y, parse.y: Don't cast return value of + xmalloc et al. + + * class.c, gjavah.c, parse.y, verify.c: Don't use PTR. + + 2003-01-09 Geoffrey Keating + + Merge from pch-branch: + + 2002-12-02 Geoffrey Keating + + * Make-lang.in (java/gjavah.o): Update dependencies. + * gjavah.c: Include ggc.h. + + 2002-08-16 Geoffrey Keating + + * Make-lang.in (GCJH_OBJS): Add ggc-none.o. + (JCFDUMP_OBJS): Add ggc-none.o. + (java/jcf-dump.o): Depend on GGC_H. + * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate + CPool substructures. + * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs. + * jcf-dump.c: Include ggc.h. + + 2002-08-08 Geoffrey Keating + + * jcf.h (union cpool_entry): New. + (struct CPool): Use gengtype to mark. Change field 'data' to be + an array of unions. + (struct JCF): Use gengtype to mark. + (CPOOL_UINT): Update for new cpool_entry type. + (CPOOL_USHORT1): Likewise. + (CPOOL_USHORT2): Likewise. + (CPOOL_FINISH): Use GC to free cpool subfields. + * parse.h (struct parser_ctxt): Mark field current_jcf. + * lex.c (java_init_lex): Use GC to allocate struct JCF. + * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type. + (main_jcf): Use gengtype to mark. + (ggc_mark_jcf): Delete. + (get_constant): Update for new cpool_entry type. + (give_name_to_class): Likewise. + (get_class_constant): Likewise. + (init_outgoing_cpool): Use GGC to allocate struct CPool. + (java_parse_file): Use GGC to allocate struct JCF. + (init_jcf_parse): Don't call ggc_add_root. + * jcf-reader.c (jcf_parse_constant_pool): Update for new + cpool_entry type. + * java-tree.h (current_jcf): Use gengtype to mark. + (CPOOL_UTF): Update for new cpool_entry type. + (outgoing_cpool): Use gengtype to mark. + (struct lang_type): GC struct JCF and struct CPool. + * config-lang.in (gtfiles): Add jcf.h. + * constants.c (find_tree_constant): New. + (set_constant_entry): Allocate cpool subfields using GGC. Update + for new cpool_entry type. + (find_constant1): Update for new cpool_entry type. + (find_constant2): Likewise. + (find_utf8_constant): Use find_tree_constant. + (find_class_or_string_constant): Remove unnecessary cast to jword. + Update for new cpool_entry type. + (count_constant_pool_bytes): Update for new cpool_entry type. + (write_constant_pool): Likewise. + (alloc_name_constant): Use find_tree_constant. + (build_constants_constructor): Update for new cpool_entry type. + + 2002-08-08 Geoffrey Keating + + * parse.y (mark_parser_ctxt): Delete. + (goal): Don't use ggc_add_root. + (create_new_parser_context): Use GC to allocate struct parser_ctxt. + (java_pop_parser_context): Let GC free parser_ctxt. + (java_parser_context_resume): Likewise. + * parse.h (struct parser_ctxt): Use gengtype to mark. + (ctxp): Likewise. + (ctxp_for_generation): Likewise. + * lex.h (struct java_lc_s): Mark for gengtype. + (java_lexer): Rearrange for gengtype. + * config-lang.in (gtfiles): Add lex.h, parse.h. + + 2003-01-09 Kaveh R. Ghazi + + * All Files: Remove PARAMS macro. + + * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c, + jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or + `__STDC__' macros. + + * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and + VA_CLOSE. + + 2003-01-09 Christian Cornelssen + + * Make-lang.in (java.install-common, java.uninstall, + java.install-info, java.install-man): Prepend $(DESTDIR) + to destination paths in all (un)installation commands. + (java.install-common): Rewrite $(LN) command to support + DESTDIR with "ln" as well as with "ln -s". + + 2003-01-08 Nathanael Nerode + + * java-tree.h: Protect against multiple inclusion. + + 2003-01-07 Tom Tromey + + * class.c (add_assume_compiled): Don't adjust parent if we're + already at the root of tree. + 2003-01-05 Kaveh R. Ghazi * lang.c (dump_compound_expr): Prototype. *************** *** 245,254 **** * gcj.texi (Standard Properties): Document http.proxyHost and http.proxyPort. - 2003-01-03 Tom Tromey - * gcj.texi (GNU Classpath Properties): Document new properties. 2002-12-30 DJ Delorie * Make-lang.in: Protect against texi2pod/pod2man failing. --- 1643,1681 ---- * gcj.texi (Standard Properties): Document http.proxyHost and http.proxyPort. * gcj.texi (GNU Classpath Properties): Document new properties. + 2003-01-02 Steven Bosscher + + * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf, + java/lang-options.h, java/mangle.c, java/mangle_name.c, + java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years. + + 2003-01-01 Steven Bosscher + + * Make-lang.in, boehm.c, buffer.c, + buffer.h, builtins.c, class.c, + config-lang.in, constants.c, + convert.h, decl.c, except.c, + expr.c, java-except.h, + java-tree.h, javaop.def, + jcf-parse.c, jcf-write.c, + jv-scan.c, jvgenmain.c, + jvspec.c, keyword.gperf, + keyword.h, lang-options.h, + lang-specs.h, lang.c, lex.c, + lex.h, mangle.c, mangle_name.c, + parse-scan.y, parse.h, parse.y, + typeck.c, verify.c, xref.c, + xref.h: Replace "GNU CC" with + "GCC" in the copyright header. + + * check-init.c, gjavah.c, javaop.h, + jcf-depend.c, jcf-dump.c, jcf-io.c, + jcf-path.c, jcf-reader.c, jcf.h, + zextract.c, zipfile.h: These files are + "part of GCC". Also say "GCC" not "GNU CC". + 2002-12-30 DJ Delorie * Make-lang.in: Protect against texi2pod/pod2man failing. *************** *** 257,266 **** --- 1684,1719 ---- * gcj.texi: Use @copying. + 2002-12-27 Mark Mitchell + + * gjavah.c (print_name_for_stub_or_jni): Adjust call to + print_cxx_classname. + (print_cxx_classname): Add add_scope parameter. + (print_class_decls): Do not emit a semicolon after the extern + "Java" block. + (process_file): Adjust calls to print_cxx_classname. + 2002-12-23 Joseph S. Myers * gcj.texi: Include Cover Texts in man page. + 2002-12-23 Jeff Sturm + + * class.c (build_static_field_ref): Check FIELD_FINAL. + + * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF + instead of current_constant_pool_data_ref. + * java-tree.h (current_constant_pool_data_ref): Undefine. + (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove. + * jcf-parse.c (init_outgoing_cpool): Don't initialize + current_constant_pool_data_ref. + + * except.c (prepare_eh_table_type ): Use DECL_NAME of class type, + not build_internal_class_name. + + * parse.y (patch_incomplete_class_ref): Always emit `class$' method. + Use it when class ref isn't certain to be compiled. + 2002-12-23 Joseph S. Myers * gcj.texi: Include gcc-common.texi. *************** *** 283,290 **** * parse.y (patch_invoke): Force evaluation order when `check' is set. For PR libgcj/8945. 2002-12-05 Ranjit Mathew ! Andrew Haley * parse.y (source_end_java_method): Remove custom encoding of line numbers for a function decl before passing it to the back end. --- 1736,1747 ---- * parse.y (patch_invoke): Force evaluation order when `check' is set. For PR libgcj/8945. + 2002-12-16 Mark Mitchell + + * gcj.texi: Change version number to 3.4. + 2002-12-05 Ranjit Mathew ! Andrew Haley * parse.y (source_end_java_method): Remove custom encoding of line numbers for a function decl before passing it to the back end. *************** *** 300,305 **** --- 1757,1772 ---- * parse.y (do_resolve_class): Handle qualified name via recursion. + 2002-11-30 Zack Weinberg + + * boehm.c, buffer.c, builtins.c, check-init.c, class.c, + constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c, + jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c, + jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c, + parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c: + Include coretypes.h and tm.h. + * Make-lang.in: Update dependencies. + 2002-11-27 Kaveh R. Ghazi * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant. *************** *** 309,314 **** --- 1776,1786 ---- * jcf-reader.c: Don't expand JCF_readu4 inside the expansion of JCF_SKIP. + 2002-11-25 Diego Novillo + + * jcf-reader.c: Don't expand JCF_readu4 inside the + expansion of JCF_SKIP. + 2002-11-22 Tom Tromey * parse.y (patch_binop): Cast right hand side of shift expression *************** *** 526,531 **** --- 1998,2007 ---- * lex.c (java_read_unicode_collapsing_terminators): Handle case where \r appears at EOF. Fixes PR java/7950. + 2002-09-16 Volker Reichelt + + * jvspec.c (lang_specific_driver): Remove unused variable. + 2002-09-16 Geoffrey Keating * java-tree.h (union lang_tree_node): Add chain_next option. *************** *** 1182,1188 **** (read_class): Call it. (java_parse_file): Likewise. ! Thu Mar 28 13:22:22 CET 2002 Jan Hubicka * java/lang.c (java_init_options): Set flag_trapping_math to 0. --- 2658,2664 ---- (read_class): Call it. (java_parse_file): Likewise. ! 2002-03-28 Jan Hubicka * java/lang.c (java_init_options): Set flag_trapping_math to 0. *************** Thu Mar 28 13:22:22 CET 2002 Jan Hubick *** 1896,1902 **** * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT. ! Mon Dec 10 06:09:57 2001 Douglas B. Rupp * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION). --- 3372,3378 ---- * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT. ! 2001-12-10 Douglas B. Rupp * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION). *************** Mon Dec 10 06:09:57 2001 Douglas B. Rup *** 2217,2223 **** into for loop, restore TREE_CHAIN on local `tem' before the next iteration. ! Tue Oct 23 14:02:17 2001 Richard Kenner * lang.c (lang_get_alias_set): Deleted. --- 3693,3699 ---- into for loop, restore TREE_CHAIN on local `tem' before the next iteration. ! 2001-10-23 Richard Kenner * lang.c (lang_get_alias_set): Deleted. *************** Tue Oct 23 14:02:17 2001 Richard Kenner *** 2437,2443 **** 2001-08-31 Per Bothner ! * class.c (set_constant_value): When not emiting class files, then a String ConstantValue is a utf8const_ptr_type. 2001-08-30 Per Bothner --- 3913,3919 ---- 2001-08-31 Per Bothner ! * class.c (set_constant_value): When not emitting class files, then a String ConstantValue is a utf8const_ptr_type. 2001-08-30 Per Bothner *************** Tue Oct 23 14:02:17 2001 Richard Kenner *** 2705,2711 **** `finish_class' when compiling to native. (resolve_expression_name): Use `orig' after building outer class field access. ! (patch_invoke): Remember static method invokations. 2001-08-06 Richard Henderson --- 4181,4187 ---- `finish_class' when compiling to native. (resolve_expression_name): Use `orig' after building outer class field access. ! (patch_invoke): Remember static method invocations. 2001-08-06 Richard Henderson *************** Tue Oct 23 14:02:17 2001 Richard Kenner *** 3165,3171 **** (add_instance_initializer): Use it. (java_fix_constructors): Set `current_class' before fix pass. (fix_constructors): Just return if already fixed. Move `super()' ! invokation ahead. Use `build_instance_initializer.' Fixes PR java/1315. 2001-04-04 Alexandre Petit-Bianco --- 4641,4647 ---- (add_instance_initializer): Use it. (java_fix_constructors): Set `current_class' before fix pass. (fix_constructors): Just return if already fixed. Move `super()' ! invocation ahead. Use `build_instance_initializer.' Fixes PR java/1315. 2001-04-04 Alexandre Petit-Bianco *************** Tue Oct 23 14:02:17 2001 Richard Kenner *** 3173,3179 **** * parse.y (resolve_qualified_expression_name): Pass field's DECL_CONTEXT to `not_accessible_p.' (not_accessible_p): Changed parameters order in `inherits_from_p' ! invokation. 2001-03-27 Andrew Haley --- 4649,4655 ---- * parse.y (resolve_qualified_expression_name): Pass field's DECL_CONTEXT to `not_accessible_p.' (not_accessible_p): Changed parameters order in `inherits_from_p' ! invocation. 2001-03-27 Andrew Haley *************** Tue Oct 23 14:02:17 2001 Richard Kenner *** 3599,3605 **** instead of parse_ctxt fields - the lists are global. (init_src_parse): New function. ! Fri Feb 23 15:28:39 2001 Richard Kenner * decl.c (set_block): Set NAMES and BLOCKS from BLOCK. --- 5075,5081 ---- instead of parse_ctxt fields - the lists are global. (init_src_parse): New function. ! 2001-02-23 Richard Kenner * decl.c (set_block): Set NAMES and BLOCKS from BLOCK. *************** Fri Feb 23 15:28:39 2001 Richard Kenner *** 3780,3786 **** * jvspec.c (lang_specific_driver): Link with the shared libgcc by default. ! Sun Feb 4 15:52:44 2001 Richard Kenner * check-init.c (check_init): Call internal_error instead of fatal. * expr.c (java_lang_expand_expr): Likewise. --- 5256,5262 ---- * jvspec.c (lang_specific_driver): Link with the shared libgcc by default. ! 2001-02-04 Richard Kenner * check-init.c (check_init): Call internal_error instead of fatal. * expr.c (java_lang_expand_expr): Likewise. *************** Sun Feb 4 15:52:44 2001 Richard Kenner *** 4333,4339 **** necessary. Fixes gcj/367. ! Thu Nov 23 02:19:14 2000 J"orn Rennecke * Make-lang.in (jvspec.o): Depend on $(CONFIG_H). --- 5809,5815 ---- necessary. Fixes gcj/367. ! 2000-11-23 J"orn Rennecke * Make-lang.in (jvspec.o): Depend on $(CONFIG_H). *************** Thu Nov 23 02:19:14 2000 J"orn Rennecke *** 4831,4842 **** `class$'. (mangle_static_field): Use mangle_field. ! Tue Oct 3 13:44:37 2000 Alexandre Petit-Bianco * decl.c (find_local_variable): Removed uncessary type check and fixed range check typo. From Corey Minyard. ! Wed Sep 13 16:06:52 2000 Alexandre Petit-Bianco * decl.c (give_name_to_locals): New local `code_offset'. Call `maybe_adjust_start_pc'. --- 6307,6318 ---- `class$'. (mangle_static_field): Use mangle_field. ! 2000-10-03 Alexandre Petit-Bianco * decl.c (find_local_variable): Removed uncessary type check and fixed range check typo. From Corey Minyard. ! 2000-09-13 Alexandre Petit-Bianco * decl.c (give_name_to_locals): New local `code_offset'. Call `maybe_adjust_start_pc'. *************** Wed Sep 13 16:06:52 2000 Alexandre Peti *** 4848,4854 **** (note_instructions): Likewise. * jcf-parse.c (parse_class_file): Call `note_instructions'. ! Wed Sep 13 11:50:35 2000 Alexandre Petit-Bianco * parse.y (field_access:): Fixed indentation. (qualify_ambiguous_name): Properly qualify `this.a[b].c'. --- 6324,6330 ---- (note_instructions): Likewise. * jcf-parse.c (parse_class_file): Call `note_instructions'. ! 2000-09-13 Alexandre Petit-Bianco * parse.y (field_access:): Fixed indentation. (qualify_ambiguous_name): Properly qualify `this.a[b].c'. *************** Wed Sep 13 11:50:35 2000 Alexandre Peti *** 5154,5160 **** * ChangeLog: Fixed typo in some jcf-write.c entries mentioning generate_bytecode_{conditional,insns}. ! Sun Aug 13 09:41:49 2000 Anthony Green * check-init.c (check_init): Add case for BIT_FIELD_REF (required for -pg builds). --- 6630,6636 ---- * ChangeLog: Fixed typo in some jcf-write.c entries mentioning generate_bytecode_{conditional,insns}. ! 2000-08-13 Anthony Green * check-init.c (check_init): Add case for BIT_FIELD_REF (required for -pg builds). *************** Sun Aug 13 09:41:49 2000 Anthony Green *** 5212,5218 **** (patch_incomplete_class_ref): `build_dot_class_method_invocation' to use `ref_type' directly. ! Sun Aug 6 00:47:24 2000 Ovidiu Predescu * lang-options.h: Added a comma after the last element to avoid syntax errors when other languages define additional options. --- 6688,6694 ---- (patch_incomplete_class_ref): `build_dot_class_method_invocation' to use `ref_type' directly. ! 2000-08-06 Ovidiu Predescu * lang-options.h: Added a comma after the last element to avoid syntax errors when other languages define additional options. *************** Sun Aug 6 00:47:24 2000 Ovidiu Predesc *** 5654,5660 **** (find_most_specific_methods_list): New local variables `abstract' and `candidates'. Use them to pick the right method. ! Tue Jun 6 11:39:05 2000 Tom Tromey * parse.y (check_modifiers_consistency): Don't subtract out `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY. --- 7130,7136 ---- (find_most_specific_methods_list): New local variables `abstract' and `candidates'. Use them to pick the right method. ! 2000-06-06 Tom Tromey * parse.y (check_modifiers_consistency): Don't subtract out `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY. *************** Tue Jun 6 11:39:05 2000 Tom Tromey * class.c (get_dispatch_table): Build the vtable dummy entry list element with a null purpose. Fixed leading comment. --- 7141,7147 ---- (LIBS): Add above. (DEPLIBS): Ditto. ! 2000-06-02 Alexandre Petit-Bianco * class.c (get_dispatch_table): Build the vtable dummy entry list element with a null purpose. Fixed leading comment. *************** Fri Jun 2 16:48:55 2000 Alexandre Peti *** 5729,5740 **** one.) (resolve_qualified_expression_name): Fixed comment. ! Thu Apr 27 17:47:34 2000 Alexandre Petit-Bianco * jcf-parse.c (jcf_parse_source): Reset current_class and current_function_decl to NULL before parsing a new file. ! Thu Apr 27 17:25:33 2000 Alexandre Petit-Bianco * parse.y (block_end:): If the collected block doesn't feature a statement, insert an empty statement. --- 7205,7216 ---- one.) (resolve_qualified_expression_name): Fixed comment. ! 2000-04-27 Alexandre Petit-Bianco * jcf-parse.c (jcf_parse_source): Reset current_class and current_function_decl to NULL before parsing a new file. ! 2000-04-27 Alexandre Petit-Bianco * parse.y (block_end:): If the collected block doesn't feature a statement, insert an empty statement. *************** Thu Apr 27 17:25:33 2000 Alexandre Peti *** 5773,5779 **** * jcf-write.c (generate_classfile): Scan the source_file for slashes with the right pointer variable. ! Wed May 17 17:27:44 2000 Andrew Cagney * lang.c (lang_decode_option): Update -Wunused flags by calling set_Wunused. --- 7249,7255 ---- * jcf-write.c (generate_classfile): Scan the source_file for slashes with the right pointer variable. ! 2000-05-17 Andrew Cagney * lang.c (lang_decode_option): Update -Wunused flags by calling set_Wunused. *************** Wed May 17 17:27:44 2000 Andrew Cagney *** 5880,5886 **** or `private' methods. (patch_invoke): Handle INVOKE_NONVIRTUAL case. ! Wed Apr 26 14:29:33 2000 Alexandre Petit-Bianco * decl.c (complete_start_java_method): Don't call _Jv_InitClass from --- 7356,7362 ---- or `private' methods. (patch_invoke): Handle INVOKE_NONVIRTUAL case. ! 2000-04-26 Alexandre Petit-Bianco * decl.c (complete_start_java_method): Don't call _Jv_InitClass from *************** Wed Apr 26 14:29:33 2000 Alexandre Peti *** 5906,5912 **** (patch_method_invocation): Insert proper context as second parameter to pure inner class constructor super invocations. ! Mon Apr 24 14:59:36 2000 Alexandre Petit-Bianco * parse.y (end_class_declaration): Reset the interface number counter. --- 7382,7388 ---- (patch_method_invocation): Insert proper context as second parameter to pure inner class constructor super invocations. ! 2000-04-24 Alexandre Petit-Bianco * parse.y (end_class_declaration): Reset the interface number counter. *************** Mon Apr 24 14:59:36 2000 Alexandre Peti *** 5934,5940 **** * boehm.c (mark_reference_fields): Added `last_view_index' argument. Use DECL_FIELD_OFFSET to determine field's offset. ! Thu Apr 20 17:41:28 2000 Mo DeJong * parse.h (INTERFACE_INNER_MODIFIERS): New macro. * parse.y (check_class_interface_creation): Fixed comments. Select --- 7410,7416 ---- * boehm.c (mark_reference_fields): Added `last_view_index' argument. Use DECL_FIELD_OFFSET to determine field's offset. ! 2000-04-20 Mo DeJong * parse.h (INTERFACE_INNER_MODIFIERS): New macro. * parse.y (check_class_interface_creation): Fixed comments. Select *************** Thu Apr 20 17:41:28 2000 Mo DeJong * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction. --- 7430,7436 ---- class, when doing inheritance check for protected reference. Fixes PR gcj/124. ! 2000-04-20 Jason Schroeder * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction. *************** Thu Apr 20 18:20:58 2000 Jason Schroede *** 6012,6018 **** 2000-04-05 Alexandre Petit-Bianco ! * jcf-write.c (generate_bytecode_insns): At invokation time, always relate an interface method to the type of its selector. 2000-04-05 Tom Tromey --- 7488,7494 ---- 2000-04-05 Alexandre Petit-Bianco ! * jcf-write.c (generate_bytecode_insns): At invocation time, always relate an interface method to the type of its selector. 2000-04-05 Tom Tromey *************** Thu Apr 20 18:20:58 2000 Jason Schroede *** 6076,6082 **** * parse.y (create_new_parser_context): Likewise. ! Thu Mar 30 15:26:56 2000 Alexandre Petit-Bianco * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000 patch missing hunk. Fixed indentation. --- 7552,7558 ---- * parse.y (create_new_parser_context): Likewise. ! 2000-03-30 Alexandre Petit-Bianco * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000 patch missing hunk. Fixed indentation. *************** Thu Mar 30 15:26:56 2000 Alexandre Peti *** 6112,6124 **** * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each Java-specific `-f' option. ! Sun Mar 26 11:37:55 2000 Richard Kenner * decl.c (init_decl_processing): Only call initialize_sizetypes once. Adjust order of making types. Make bitsize_*_node values. ! Sat Mar 25 09:12:10 2000 Richard Kenner * class.c (make_field_value): Use byte_position. * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position. --- 7588,7600 ---- * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each Java-specific `-f' option. ! 2000-03-26 Richard Kenner * decl.c (init_decl_processing): Only call initialize_sizetypes once. Adjust order of making types. Make bitsize_*_node values. ! 2000-03-25 Richard Kenner * class.c (make_field_value): Use byte_position. * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position. *************** Sat Mar 25 09:12:10 2000 Richard Kenner *** 6141,6147 **** (find_most_specific_methods_list): Pick the closest candidate when they're all abstract. ! Mon Mar 20 08:58:51 2000 Alexandre Petit-Bianco * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR: properly initialize `finished_label'. Don't emit gotos for empty --- 7617,7623 ---- (find_most_specific_methods_list): Pick the closest candidate when they're all abstract. ! 2000-03-20 Alexandre Petit-Bianco * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR: properly initialize `finished_label'. Don't emit gotos for empty *************** Mon Mar 20 08:58:51 2000 Alexandre Peti *** 6176,6182 **** (patch_incomplete_class_ref): Invoke synthetic method if necessary. (build_try_statement): Fixed leading comment. ! Fri Mar 17 08:09:14 2000 Richard Kenner * class.c (make_field_value): Properly handle sizes. (get_dispatch_vector): Use tree_low_cst and host_integerp. --- 7652,7658 ---- (patch_incomplete_class_ref): Invoke synthetic method if necessary. (build_try_statement): Fixed leading comment. ! 2000-03-17 Richard Kenner * class.c (make_field_value): Properly handle sizes. (get_dispatch_vector): Use tree_low_cst and host_integerp. *************** Fri Mar 17 08:09:14 2000 Richard Kenner *** 6234,6240 **** mark_reference_fields. (mark_reference_fields): New function. ! Tue Mar 14 17:15:41 2000 Alexandre Petit-Bianco * parse.y (register_incomplete_type): Fixed initialization of JDEP_ENCLOSING. --- 7710,7716 ---- mark_reference_fields. (mark_reference_fields): New function. ! 2000-03-14 Alexandre Petit-Bianco * parse.y (register_incomplete_type): Fixed initialization of JDEP_ENCLOSING. *************** Tue Mar 14 17:15:41 2000 Alexandre Peti *** 6266,6272 **** Section dealing with qualified expression rewritten to use resolve_field_access. ! Mon Mar 13 12:21:13 2000 Alexandre Petit-Bianco * parse.h (PUSH_CPC): Fixed indentation. (DEBUG_CPC): New macro. --- 7742,7748 ---- Section dealing with qualified expression rewritten to use resolve_field_access. ! 2000-03-13 Alexandre Petit-Bianco * parse.h (PUSH_CPC): Fixed indentation. (DEBUG_CPC): New macro. *************** Mon Mar 13 12:21:13 2000 Alexandre Peti *** 6289,6295 **** (resolve_qualified_expression_name): Handle situation where `this' is implied. ! Mon Mar 13 11:36:51 2000 Hans Boehm * typeck.c (build_prim_array_type): Correctly set the high word too. --- 7765,7771 ---- (resolve_qualified_expression_name): Handle situation where `this' is implied. ! 2000-03-13 Hans Boehm * typeck.c (build_prim_array_type): Correctly set the high word too. *************** Mon Mar 13 11:36:51 2000 Hans Boehm * decl.c (emit_init_test_initialization): Mark KEY as unused. * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT. --- 7796,7802 ---- * expr.c (force_evaluation_order): Call force_evaluation_order on function's arguments too. ! 2000-03-06 Richard Kenner * decl.c (emit_init_test_initialization): Mark KEY as unused. * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT. *************** Mon Mar 6 18:07:07 2000 Richard Kenner *** 6368,6374 **** (lookup_java_method): Re-written by calling lookup_do. (lookup_do): New function. ! Thu Mar 2 15:18:33 2000 Alexandre Petit-Bianco * check-init.c (check_init): Removed dead code. Handle (blank) final variables. --- 7844,7850 ---- (lookup_java_method): Re-written by calling lookup_do. (lookup_do): New function. ! 2000-03-02 Alexandre Petit-Bianco * check-init.c (check_init): Removed dead code. Handle (blank) final variables. *************** Thu Mar 2 15:18:33 2000 Alexandre Peti *** 6429,6441 **** * decl.c (current_function_decl): Move to toplev.c. ! Mon Feb 28 08:20:42 2000 Richard Kenner * java-tree.h (LABEL_PC): Relect name changes in ../tree.h. (DECL_BIT_INDEX): Use underlying representation. * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise. ! Sun Feb 27 16:40:33 2000 Richard Kenner * expr.c (build_java_ret): Pass proper type to size_binop. --- 7905,7917 ---- * decl.c (current_function_decl): Move to toplev.c. ! 2000-02-28 Richard Kenner * java-tree.h (LABEL_PC): Relect name changes in ../tree.h. (DECL_BIT_INDEX): Use underlying representation. * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise. ! 2000-02-27 Richard Kenner * expr.c (build_java_ret): Pass proper type to size_binop. *************** Sun Feb 27 16:40:33 2000 Richard Kenner *** 6462,6486 **** (struct lang_decl): Add init_test_table field. (init_test_hash_entry): Define. ! Fri Feb 25 18:41:31 2000 Alexandre Petit-Bianco * gjavah.c (main): Avoid using `argi' to report unimplemented options. ! Fri Feb 25 18:47:25 2000 Alexandre Petit-Bianco * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR: initialize locals to avoid warnings. Local `exception_type' moved into if statement. ! Fri Feb 25 18:00:37 2000 Alexandre Petit-Bianco * parse.y (resolve_expression_name): Use `orig' as a second argument to resolve_field_access. (resolve_field_access): Removed unnecessary code when dealing with static fields. ! Wed Feb 23 17:41:50 2000 Alexandre Petit-Bianco * class.c (push_super_field): Don't push the field twice. * jcf-parse.c (parse_source_file): Call java_reorder_fields. --- 7938,7962 ---- (struct lang_decl): Add init_test_table field. (init_test_hash_entry): Define. ! 2000-02-25 Alexandre Petit-Bianco * gjavah.c (main): Avoid using `argi' to report unimplemented options. ! 2000-02-25 Alexandre Petit-Bianco * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR: initialize locals to avoid warnings. Local `exception_type' moved into if statement. ! 2000-02-25 Alexandre Petit-Bianco * parse.y (resolve_expression_name): Use `orig' as a second argument to resolve_field_access. (resolve_field_access): Removed unnecessary code when dealing with static fields. ! 2000-02-23 Alexandre Petit-Bianco * class.c (push_super_field): Don't push the field twice. * jcf-parse.c (parse_source_file): Call java_reorder_fields. *************** Wed Feb 23 17:41:50 2000 Alexandre Peti *** 6498,6504 **** * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned value type set to `boolean_type_node'. ! Mon Jan 18 14:30:09 2000 Joerg Brunsmann * jcf-dump.c (main): Test for correct condition after output file creation. --- 7974,7980 ---- * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned value type set to `boolean_type_node'. ! 2000-01-18 Joerg Brunsmann * jcf-dump.c (main): Test for correct condition after output file creation. *************** Mon Jan 18 14:30:09 2000 Joerg Brunsman *** 6507,6513 **** * jcf-depend.c (add_entry): Fix test for first list entry. ! Sat Feb 19 18:43:13 2000 Richard Kenner * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT. * constants.c (build_constants_constructor): Likewise. --- 7983,7989 ---- * jcf-depend.c (add_entry): Fix test for first list entry. ! 2000-02-19 Richard Kenner * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT. * constants.c (build_constants_constructor): Likewise. *************** Sat Feb 19 18:43:13 2000 Richard Kenner *** 6516,6522 **** * jcf-depend.c (add_entry): Add entries to the end of the list. ! Wed Nov 03 02:16:00 PST 1999 Pekka Nikander * decl.c (INT_TYPE_SIZE): Define if necessary. (expand_java_return): Handle the case of a native integer smaller --- 7992,7998 ---- * jcf-depend.c (add_entry): Add entries to the end of the list. ! 1999-11-03 Pekka Nikander * decl.c (INT_TYPE_SIZE): Define if necessary. (expand_java_return): Handle the case of a native integer smaller *************** Wed Nov 03 02:16:00 PST 1999 Pekka Nika *** 6528,6539 **** * jv-scan.c (help): Likewise. * jcf-dump.c (help): Likewise. ! Thu Feb 17 14:30:37 2000 Alexandre Petit-Bianco * jcf-write.c (generate_bytecode_insns): Don't generate empty `finally' clauses. ! Thu Feb 17 13:20:58 2000 Alexandre Petit-Bianco * jcf-parse.c (load_class): Call `fatal' if no file containing the target class are found. --- 8004,8015 ---- * jv-scan.c (help): Likewise. * jcf-dump.c (help): Likewise. ! 2000-02-17 Alexandre Petit-Bianco * jcf-write.c (generate_bytecode_insns): Don't generate empty `finally' clauses. ! 2000-02-17 Alexandre Petit-Bianco * jcf-parse.c (load_class): Call `fatal' if no file containing the target class are found. *************** Thu Feb 17 13:20:58 2000 Alexandre Peti *** 6580,6589 **** * jv-scan.c: Likewise. ! Sat Feb 12 04:34:04 2000 Alexandre Petit-Bianco * parse.y (outer_field_access_fix): First parameter now a tree ! node. Check for assignement to final. First argument to build_outer_field_access_fix modified to accommodate prototype. (build_outer_field_access): Don't check for assignment to final here. --- 8056,8065 ---- * jv-scan.c: Likewise. ! 2000-02-12 Alexandre Petit-Bianco * parse.y (outer_field_access_fix): First parameter now a tree ! node. Check for assignment to final. First argument to build_outer_field_access_fix modified to accommodate prototype. (build_outer_field_access): Don't check for assignment to final here. *************** Sat Feb 12 04:34:04 2000 Alexandre Peti *** 6594,6600 **** (patch_unaryop): Use node instead of its line/column value when calling outer_field_access_fix. ! Fri Feb 11 17:38:26 2000 Alexandre Petit-Bianco * parse.y (interface_declaration:): No longer tagged . Re-installed default action. --- 8070,8076 ---- (patch_unaryop): Use node instead of its line/column value when calling outer_field_access_fix. ! 2000-02-11 Alexandre Petit-Bianco * parse.y (interface_declaration:): No longer tagged . Re-installed default action. *************** Fri Feb 11 17:38:26 2000 Alexandre Peti *** 6606,6629 **** (register_fields): Inner class static field limitations not to apply to inner interfaces. ! Thu Feb 10 22:07:35 2000 Alexandre Petit-Bianco * jcf-parse.c (load_class): Update `java_error_count' when a class' file can't be found. (parse.y): Avoid (byte)code generation when errors seen. ! Thu Feb 10 20:10:43 2000 Alexandre Petit-Bianco * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal' decodes a valid node. (patch_binop): Handle TRUNC_DIV_EXPR. ! Thu Feb 10 16:04:26 2000 Alexandre Petit-Bianco * parse.y (resolve_package): New local `acc'. Try to progressively build and guess a package and type name. ! Thu Feb 10 12:52:09 2000 Alexandre Petit-Bianco * parse.y (find_applicable_accessible_methods_list): Load and layout the search class if necessary. --- 8082,8105 ---- (register_fields): Inner class static field limitations not to apply to inner interfaces. ! 2000-02-10 Alexandre Petit-Bianco * jcf-parse.c (load_class): Update `java_error_count' when a class' file can't be found. (parse.y): Avoid (byte)code generation when errors seen. ! 2000-02-10 Alexandre Petit-Bianco * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal' decodes a valid node. (patch_binop): Handle TRUNC_DIV_EXPR. ! 2000-02-10 Alexandre Petit-Bianco * parse.y (resolve_package): New local `acc'. Try to progressively build and guess a package and type name. ! 2000-02-10 Alexandre Petit-Bianco * parse.y (find_applicable_accessible_methods_list): Load and layout the search class if necessary. *************** Thu Feb 10 12:52:09 2000 Alexandre Peti *** 6686,6692 **** (patch_unaryop): Handle outer field access when generating bytecode. ! Thu Feb 3 20:23:19 2000 Alexandre Petit-Bianco * java-tree.h (FIELD_THISN): New macro. * jcf-write.c (append_synthetic_attribute): New function. --- 8162,8168 ---- (patch_unaryop): Handle outer field access when generating bytecode. ! 2000-02-03 Alexandre Petit-Bianco * java-tree.h (FIELD_THISN): New macro. * jcf-write.c (append_synthetic_attribute): New function. *************** Thu Feb 3 20:23:19 2000 Alexandre Peti *** 6753,6759 **** assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1. ! Wed Feb 2 18:43:37 2000 Alexandre Petit-Bianco * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code. * java-tree.h (TYPE_II_STMT_LIST): New macro. --- 8229,8235 ---- assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1. ! 2000-02-02 Alexandre Petit-Bianco * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code. * java-tree.h (TYPE_II_STMT_LIST): New macro. *************** Wed Feb 2 18:43:37 2000 Alexandre Peti *** 6846,6852 **** (main): Use getopt_long_only to parse command line. (usage): Changed message. ! Tue Feb 1 22:23:41 2000 Alexandre Petit-Bianco * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code. * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG, --- 8322,8328 ---- (main): Use getopt_long_only to parse command line. (usage): Changed message. ! 2000-02-01 Alexandre Petit-Bianco * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code. * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG, *************** Tue Feb 1 22:23:41 2000 Alexandre Peti *** 6857,6863 **** (qualify_ambiguous_name): Likewise. (java_complete_expand_class): Likewise. ! Tue Feb 1 14:59:35 2000 Alexandre Petit-Bianco * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo. * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro. --- 8333,8339 ---- (qualify_ambiguous_name): Likewise. (java_complete_expand_class): Likewise. ! 2000-02-01 Alexandre Petit-Bianco * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo. * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro. *************** Tue Feb 1 14:59:35 2000 Alexandre Peti *** 6903,6909 **** error handling/recovery. * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment. ! Fri Jan 28 20:10:57 2000 Alexandre Petit-Bianco * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS, FIELD_LOCAL_ALIAS_USED): New macros. --- 8379,8385 ---- error handling/recovery. * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment. ! 2000-01-28 Alexandre Petit-Bianco * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS, FIELD_LOCAL_ALIAS_USED): New macros. *************** Fri Jan 28 20:10:57 2000 Alexandre Peti *** 7080,7086 **** MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC. (set_java_signature): Likewise. ! Mon Jan 18 14:30:09 2000 Joerg Brunsmann * gjavah.c: Delete ACC_VISIBILITY define. * jcf.h: Add ACC_VISIBILITY define. --- 8556,8562 ---- MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC. (set_java_signature): Likewise. ! 2000-01-18 Joerg Brunsmann * gjavah.c: Delete ACC_VISIBILITY define. * jcf.h: Add ACC_VISIBILITY define. *************** Mon Jan 18 14:30:09 2000 Joerg Brunsman *** 7089,7095 **** default package access check. (local_variable_declaration_statement): Use final: rule. ! Mon Jan 17 11:58:17 2000 Joerg Brunsmann * parse.y (format_parameter:): Use final: rule instead of modifiers:. (final:): New rule. --- 8565,8571 ---- default package access check. (local_variable_declaration_statement): Use final: rule. ! 2000-01-17 Joerg Brunsmann * parse.y (format_parameter:): Use final: rule instead of modifiers:. (final:): New rule. *************** Mon Jan 17 11:58:17 2000 Joerg Brunsman *** 7098,7104 **** * gjavah.c (print_field_info): Allow non-static final fields. ! Fri Jan 14 18:03:41 2000 Alexandre Petit-Bianco * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'. * parse.y (patch_anonymous_class): New function. --- 8574,8580 ---- * gjavah.c (print_field_info): Allow non-static final fields. ! 2000-01-14 Alexandre Petit-Bianco * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'. * parse.y (patch_anonymous_class): New function. *************** Fri Jan 14 18:03:41 2000 Alexandre Peti *** 7107,7113 **** (parser_check_super_interface): Simplify argument to CLASS_INTERFACE. (verify_constructor_super): Tuned error message. ! Fri Jan 14 00:14:24 2000 Alexandre Petit-Bianco * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P. (ANONYMOUS_CLASS_P): New macro. --- 8583,8589 ---- (parser_check_super_interface): Simplify argument to CLASS_INTERFACE. (verify_constructor_super): Tuned error message. ! 2000-01-14 Alexandre Petit-Bianco * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P. (ANONYMOUS_CLASS_P): New macro. *************** Fri Jan 14 00:14:24 2000 Alexandre Peti *** 7151,7157 **** (search_loop): Use FOR_LOOP_P. (labeled_block_contains_loop_p): Likewise. ! Wed Jan 12 00:38:47 2000 Alexandre Petit-Bianco * class.c (set_super_info): Set CLASS_STATIC when appropriate. (enclosing_context_p): New function. --- 8627,8633 ---- (search_loop): Use FOR_LOOP_P. (labeled_block_contains_loop_p): Likewise. ! 2000-01-12 Alexandre Petit-Bianco * class.c (set_super_info): Set CLASS_STATIC when appropriate. (enclosing_context_p): New function. *************** Wed Jan 12 00:38:47 2000 Alexandre Peti *** 7332,7338 **** * parse.y (build_string_concatenation): Only use StringBuffer(String) shortcut if String arg is constant. ! Wed Jan 12 20:20:11 2000 Alexandre Petit-Bianco * jcf-write.c (generate_bytecode_insns): binop: Change the type of the shift value to int. Fixed typo in comment. --- 8808,8814 ---- * parse.y (build_string_concatenation): Only use StringBuffer(String) shortcut if String arg is constant. ! 2000-01-12 Alexandre Petit-Bianco * jcf-write.c (generate_bytecode_insns): binop: Change the type of the shift value to int. Fixed typo in comment. *************** Wed Jan 12 20:20:11 2000 Alexandre Peti *** 7353,7364 **** * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS). ! Thu Jan 6 16:31:28 2000 Anthony Green * expr.c (java_lang_expand_expr): Switch to permanent obstack before building constant array decl. ! Thu Jan 6 00:54:10 2000 Alexandre Petit-Bianco * jcf-write.c (generate_bytecode_conditional): Fixed indentation in method invocation and typo in conditional expression. --- 8829,8840 ---- * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS). ! 2000-01-06 Anthony Green * expr.c (java_lang_expand_expr): Switch to permanent obstack before building constant array decl. ! 2000-01-06 Alexandre Petit-Bianco * jcf-write.c (generate_bytecode_conditional): Fixed indentation in method invocation and typo in conditional expression. *************** Thu Jan 6 00:54:10 2000 Alexandre Peti *** 7417,7423 **** patch_throw_statement, check_thrown_exceptions, patch_conditional_expr): Likewise. ! Fri Dec 24 00:25:29 1999 Alexandre Petit-Bianco * Makefile.in (LIBDEPS): Added gcc's errors.o (../jcf-dump$(exeext):): Link with gcc's errors.o --- 8893,8899 ---- patch_throw_statement, check_thrown_exceptions, patch_conditional_expr): Likewise. ! 1999-12-24 Alexandre Petit-Bianco * Makefile.in (LIBDEPS): Added gcc's errors.o (../jcf-dump$(exeext):): Link with gcc's errors.o *************** Fri Dec 24 00:25:29 1999 Alexandre Peti *** 7456,7462 **** fixes PR gcj/119. (process_file): Use `\n\' at end of each line in string. ! Thu Dec 16 00:09:45 1999 Alexandre Petit-Bianco * expr.c (expand_invoke): Layout the loaded class before attempting to use it. --- 8932,8938 ---- fixes PR gcj/119. (process_file): Use `\n\' at end of each line in string. ! 1999-12-16 Alexandre Petit-Bianco * expr.c (expand_invoke): Layout the loaded class before attempting to use it. *************** Thu Dec 16 00:09:45 1999 Alexandre Peti *** 7489,7495 **** * typeck.c (lookup_java_method): Take WFLs in method names into account. ! Tue Dec 14 14:20:16 1999 Per Bothner * class.c (make_class_data): flag_keep_inline_functions to keep private methods in the method array. --- 8965,8971 ---- * typeck.c (lookup_java_method): Take WFLs in method names into account. ! 1999-12-14 Per Bothner * class.c (make_class_data): flag_keep_inline_functions to keep private methods in the method array. *************** Tue Dec 14 14:20:16 1999 Per Bothner < *** 7499,7510 **** * check-init.c (check_init): Take into account both types of `throw's when checking for uninitialized variables. ! Fri Dec 10 21:53:45 1999 Alexandre Petit-Bianco ! * parse.y (java_complete_lhs): Force convertion of array dimensions to int_type_node, that's what runtime's ABI expects. ! Fri Dec 10 16:13:48 1999 Alexandre Petit-Bianco * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third operand of a WFL, until the Java front-end gets fixed with regard --- 8975,8986 ---- * check-init.c (check_init): Take into account both types of `throw's when checking for uninitialized variables. ! 1999-12-10 Alexandre Petit-Bianco ! * parse.y (java_complete_lhs): Force conversion of array dimensions to int_type_node, that's what runtime's ABI expects. ! 1999-12-10 Alexandre Petit-Bianco * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third operand of a WFL, until the Java front-end gets fixed with regard *************** Fri Dec 10 16:13:48 1999 Alexandre Peti *** 7518,7524 **** java-tree.h: Ditto. jcf-write.c: Ditto. ! Wed Dec 8 15:33:26 1999 Alexandre Petit-Bianco * expr.c (java_lang_expand_expr): Switch to permanent obstack before calling expand_eh_region_start and expand_start_all_catch. --- 8994,9000 ---- java-tree.h: Ditto. jcf-write.c: Ditto. ! 1999-12-08 Alexandre Petit-Bianco * expr.c (java_lang_expand_expr): Switch to permanent obstack before calling expand_eh_region_start and expand_start_all_catch. *************** Wed Dec 8 15:33:26 1999 Alexandre Peti *** 7534,7551 **** (init_decl_processing): Mark all memory allocating DECLs with DECL_IS_MALLOC. ! Wed Dec 1 04:25:06 1999 Alexandre Petit-Bianco * except.c (expand_end_java_handler): Call expand_resume_after_catch and end_catch_handler. ! Tue Nov 30 12:36:15 1999 Anthony Green * verify.c (verify_jvm_instructions): Create new return label chain if non existent (don't rely on the verified state of the jsr target.) ! Tue Nov 30 12:28:34 1999 Alexandre Petit-Bianco * jcf-write.c (generate_bytecode_insns): Fixed indentation for COMPOUND_EXPR and FIX_TRUNC_EXPR cases. --- 9010,9027 ---- (init_decl_processing): Mark all memory allocating DECLs with DECL_IS_MALLOC. ! 1999-12-01 Alexandre Petit-Bianco * except.c (expand_end_java_handler): Call expand_resume_after_catch and end_catch_handler. ! 1999-11-30 Anthony Green * verify.c (verify_jvm_instructions): Create new return label chain if non existent (don't rely on the verified state of the jsr target.) ! 1999-11-30 Alexandre Petit-Bianco * jcf-write.c (generate_bytecode_insns): Fixed indentation for COMPOUND_EXPR and FIX_TRUNC_EXPR cases. *************** Tue Nov 30 12:28:34 1999 Alexandre Peti *** 7560,7566 **** * decl.c (find_local_variable): Reuse single slot decls when appropriate. ! Wed Nov 24 17:33:26 1999 Alexandre Petit-Bianco * jcf-parse.c (saw_java_source): Global variable removed. (read_class): Don't use `saw_java_source'. Added extra braces. --- 9036,9042 ---- * decl.c (find_local_variable): Reuse single slot decls when appropriate. ! 1999-11-24 Alexandre Petit-Bianco * jcf-parse.c (saw_java_source): Global variable removed. (read_class): Don't use `saw_java_source'. Added extra braces. *************** Wed Nov 24 17:33:26 1999 Alexandre Peti *** 7570,7581 **** * except.c (emit_handlers): Zero catch_clauses after emitting them. ! Tue Nov 23 17:29:40 1999 Alexandre Petit-Bianco * verify.c (merge_type_state): Non verified subroutines being considered more than once to trigger passive type merge. ! Tue Nov 23 10:55:18 1999 Alexandre Petit-Bianco * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE in case of error. Error message tuned. --- 9046,9057 ---- * except.c (emit_handlers): Zero catch_clauses after emitting them. ! 1999-11-23 Alexandre Petit-Bianco * verify.c (merge_type_state): Non verified subroutines being considered more than once to trigger passive type merge. ! 1999-11-23 Alexandre Petit-Bianco * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE in case of error. Error message tuned. *************** Tue Nov 23 10:55:18 1999 Alexandre Peti *** 7599,7610 **** * lang.c (lang_decode_option): Parse new options. ! Wed Nov 17 21:09:28 1999 Alexandre Petit-Bianco * class.c (layout_class): Always convert TYPE_SIZE_UNIT to int_type_node: that's what `_Jv_AllocObject' expects. ! Thu Nov 11 01:57:14 1999 Alexandre Petit-Bianco * parse.y (lookup_method_invoke): Use lang_printable_name to reliably build the type name during error report. Fixes PR gcj/97. --- 9075,9086 ---- * lang.c (lang_decode_option): Parse new options. ! 1999-11-17 Alexandre Petit-Bianco * class.c (layout_class): Always convert TYPE_SIZE_UNIT to int_type_node: that's what `_Jv_AllocObject' expects. ! 1999-11-11 Alexandre Petit-Bianco * parse.y (lookup_method_invoke): Use lang_printable_name to reliably build the type name during error report. Fixes PR gcj/97. *************** Thu Nov 11 01:57:14 1999 Alexandre Peti *** 7615,7621 **** (jcf_path_init): Search for libjava.zip. Fixes PR gcj/84. (DIR_UP): New macro. ! Tue Nov 9 12:12:38 1999 Alexandre Petit-Bianco * parse.y (source_end_java_method): Resume permanent allocation, reversing Apr 27 1998 patch. --- 9091,9097 ---- (jcf_path_init): Search for libjava.zip. Fixes PR gcj/84. (DIR_UP): New macro. ! 1999-11-09 Alexandre Petit-Bianco * parse.y (source_end_java_method): Resume permanent allocation, reversing Apr 27 1998 patch. *************** Tue Nov 9 12:12:38 1999 Alexandre Peti *** 7627,7665 **** * class.c (finish_class): Emit inlined methods if any native methods exist in the class. Fixes PR gcj/85. ! Thu Nov 4 16:27:01 1999 Alexandre Petit-Bianco * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR. (qualify_ambiguous_name): Likewise. ! Wed Nov 3 15:20:02 MST 1999 Godmar Back * typeck.c: (lookup_java_method): search all inherited interfaces when looking up interface method. ! Mon Nov 1 23:42:00 1999 Alexandre Petit-Bianco * parse.y (method_header:): Issue error message for rule `type error'. (synchronized:): Error report when not using synchronized. ! Mon Nov 1 01:32:48 1999 Alexandre Petit-Bianco * parse.y (resolve_qualified_expression_name): Prevent `this' from being used before the superclass constructor has been called. (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P instead of `CALL_THIS_CONSTRUCTOR_P'. ! Sat Oct 30 21:35:13 1999 Todd T. Fries * check-init.c: Fix typo in comment. ! Fri Oct 29 14:35:18 1999 Alexandre Petit-Bianco * class.c (add_method_1): Set DECL_INLINE to 1 for private, static and final method. ! Fri Oct 29 14:23:32 1999 Alexandre Petit-Bianco * parse.y (expression_statement:): Call function to report improper invocation of a constructor. --- 9103,9141 ---- * class.c (finish_class): Emit inlined methods if any native methods exist in the class. Fixes PR gcj/85. ! 1999-11-04 Alexandre Petit-Bianco * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR. (qualify_ambiguous_name): Likewise. ! 1999-11-03 Godmar Back * typeck.c: (lookup_java_method): search all inherited interfaces when looking up interface method. ! 1999-11-01 Alexandre Petit-Bianco * parse.y (method_header:): Issue error message for rule `type error'. (synchronized:): Error report when not using synchronized. ! 1999-11-01 Alexandre Petit-Bianco * parse.y (resolve_qualified_expression_name): Prevent `this' from being used before the superclass constructor has been called. (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P instead of `CALL_THIS_CONSTRUCTOR_P'. ! 1999-10-30 Todd T. Fries * check-init.c: Fix typo in comment. ! 1999-10-29 Alexandre Petit-Bianco * class.c (add_method_1): Set DECL_INLINE to 1 for private, static and final method. ! 1999-10-29 Alexandre Petit-Bianco * parse.y (expression_statement:): Call function to report improper invocation of a constructor. *************** Fri Oct 29 14:23:32 1999 Alexandre Peti *** 7675,7686 **** * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set in generated `main'. ! Thu Oct 21 01:27:31 1999 Alexandre Petit-Bianco * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR. (qualify_ambiguous_name): Likewise. ! Wed Oct 20 01:41:47 1999 Alexandre Petit-Bianco * parse.y (java_complete_tree): fold_constant_for_init to work on permanent_obstack. --- 9151,9162 ---- * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set in generated `main'. ! 1999-10-21 Alexandre Petit-Bianco * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR. (qualify_ambiguous_name): Likewise. ! 1999-10-20 Alexandre Petit-Bianco * parse.y (java_complete_tree): fold_constant_for_init to work on permanent_obstack. *************** Wed Oct 20 01:41:47 1999 Alexandre Peti *** 7725,7731 **** * verify.c (verify_jvm_instructions): Likewise. ! Tue Oct 12 22:28:10 1999 Alexandre Petit-Bianco * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1. --- 9201,9207 ---- * verify.c (verify_jvm_instructions): Likewise. ! 1999-10-12 Alexandre Petit-Bianco * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1. *************** Tue Oct 12 22:28:10 1999 Alexandre Peti *** 7743,7753 **** well. Fixes Java PR gcj/59. * parse-scan.y (yyerror): Report errors. ! Fri Sep 24 12:23:05 1999 Glenn Chambers * decl.c (insert_block): Remove unconditional `abort'. ! Fri Sep 24 10:48:10 1999 Bernd Schmidt * decl.c (builtin_function): No longer static. New arg CLASS. Arg FUNCTION_CODE now of type int. All callers changed. --- 9219,9229 ---- well. Fixes Java PR gcj/59. * parse-scan.y (yyerror): Report errors. ! 1999-09-24 Glenn Chambers * decl.c (insert_block): Remove unconditional `abort'. ! 1999-09-24 Bernd Schmidt * decl.c (builtin_function): No longer static. New arg CLASS. Arg FUNCTION_CODE now of type int. All callers changed. *************** Fri Sep 24 10:48:10 1999 Bernd Schmidt *** 7766,7772 **** (WORDS_TO_LONG): Likewise. (WORDS_TO_DOUBLE): Likewise. ! Tue Sep 14 16:24:19 1999 Alexandre Petit-Bianco * jcf-write.c (RELOCATION_VALUE_0): New macro. (RELOCATION_VALUE_1): Likewise. --- 9242,9248 ---- (WORDS_TO_LONG): Likewise. (WORDS_TO_DOUBLE): Likewise. ! 1999-09-14 Alexandre Petit-Bianco * jcf-write.c (RELOCATION_VALUE_0): New macro. (RELOCATION_VALUE_1): Likewise. *************** Tue Sep 14 16:24:19 1999 Alexandre Peti *** 7795,7801 **** * lang.c (lang_decode_option): Extend comment. ! Thu Sep 16 15:42:39 1999 Alexandre Petit-Bianco * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK instead of fndecl. --- 9271,9277 ---- * lang.c (lang_decode_option): Extend comment. ! 1999-09-16 Alexandre Petit-Bianco * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK instead of fndecl. *************** Thu Sep 16 15:42:39 1999 Alexandre Peti *** 7840,7846 **** * zextract.c (ALLOC): Use xmalloc, not malloc. ! Sun Sep 12 23:30:09 1999 Kaveh R. Ghazi * Make-lang.in (jvspec.o): Depend on system.h and gcc.h. --- 9316,9322 ---- * zextract.c (ALLOC): Use xmalloc, not malloc. ! 1999-09-12 Kaveh R. Ghazi * Make-lang.in (jvspec.o): Depend on system.h and gcc.h. *************** Sun Sep 12 23:30:09 1999 Kaveh R. Ghazi *** 7852,7863 **** (lang_specific_driver): All calls to the function pointer parameter now explicitly call `fatal'. ! Sat Sep 11 16:46:44 1999 Alexandre Petit-Bianco * parse.y (find_applicable_accessible_methods_list): Search abstract classes as interfaces. ! Thu Sep 9 17:33:28 1999 Alexandre Petit-Bianco * class.c (finish_class): We're now outside a valid method declaration. Tell the rest of gcc so. --- 9328,9339 ---- (lang_specific_driver): All calls to the function pointer parameter now explicitly call `fatal'. ! 1999-09-11 Alexandre Petit-Bianco * parse.y (find_applicable_accessible_methods_list): Search abstract classes as interfaces. ! 1999-09-09 Alexandre Petit-Bianco * class.c (finish_class): We're now outside a valid method declaration. Tell the rest of gcc so. *************** Thu Sep 9 17:33:28 1999 Alexandre Peti *** 7873,7879 **** (decode_signature_piece): Don't emit "::" in JArray<>. (print_namelet): Only print trailing `;' when printing a class. ! Fri Sep 10 10:32:32 1999 Bernd Schmidt * java-tree.h: Delete declarations for all tree nodes now moved to global_trees. --- 9349,9355 ---- (decode_signature_piece): Don't emit "::" in JArray<>. (print_namelet): Only print trailing `;' when printing a class. ! 1999-09-10 Bernd Schmidt * java-tree.h: Delete declarations for all tree nodes now moved to global_trees. *************** Fri Sep 10 10:32:32 1999 Bernd Schmidt *** 7933,7939 **** * Make-lang.in: Likewise. ! Mon Aug 30 16:41:41 1999 Hans-Peter Nilsson * Makefile.in (xref.o): Depend on xref.c explicitly. --- 9409,9415 ---- * Make-lang.in: Likewise. ! 1999-08-30 Hans-Peter Nilsson * Makefile.in (xref.o): Depend on xref.c explicitly. *************** Mon Aug 30 16:41:41 1999 Hans-Peter Nil *** 7943,7949 **** * lang.c (lang_printable_name): Likewise. ! Fri Aug 27 23:31:57 1999 Jeffrey A Law (law@cygnus.com) * gjavah.c, jcf-write.c, verify.c: Do not use C++ style comments in C code. --- 9419,9425 ---- * lang.c (lang_printable_name): Likewise. ! 1999-08-27 Jeffrey A Law (law@cygnus.com) * gjavah.c, jcf-write.c, verify.c: Do not use C++ style comments in C code. *************** Fri Aug 27 23:31:57 1999 Jeffrey A Law *** 7953,7965 **** * gjavah.c (print_cxx_classname): Print "::" before qualified name. ! Thu Aug 26 09:10:58 1999 Alexandre Petit-Bianco * parse.y (lookup_cl): Changed leading comment. Now does its best to set the column number. (qualify_ambiguous_name): Take WFL wrappers into account. ! Wed Aug 25 15:37:15 1999 Gregg Townsend * verify.c (verify_jvm_instructions): Don't check instruction validity beyond end of method. --- 9429,9441 ---- * gjavah.c (print_cxx_classname): Print "::" before qualified name. ! 1999-08-26 Alexandre Petit-Bianco * parse.y (lookup_cl): Changed leading comment. Now does its best to set the column number. (qualify_ambiguous_name): Take WFL wrappers into account. ! 1999-08-25 Gregg Townsend * verify.c (verify_jvm_instructions): Don't check instruction validity beyond end of method. *************** Wed Aug 25 15:37:15 1999 Gregg Townsend *** 8022,8028 **** * verify.c (start_pc_cmp): Don't needlessly cast away const. ! Sun Aug 22 11:07:41 1999 Alexandre Petit-Bianco * parse.y (check_method_redefinition): Changed leading comment. (check_abstract_method_definitions): New function. --- 9498,9504 ---- * verify.c (start_pc_cmp): Don't needlessly cast away const. ! 1999-08-22 Alexandre Petit-Bianco * parse.y (check_method_redefinition): Changed leading comment. (check_abstract_method_definitions): New function. *************** Sun Aug 22 11:07:41 1999 Alexandre Peti *** 8031,8037 **** (verify_constructor_super): Fixed indentation. (lookup_method_invoke): Likewise. ! Thu Aug 19 10:26:18 1999 Alexandre Petit-Bianco * parse.y (method_header): Return a null pointer if the current class node is null. --- 9507,9513 ---- (verify_constructor_super): Fixed indentation. (lookup_method_invoke): Likewise. ! 1999-08-19 Alexandre Petit-Bianco * parse.y (method_header): Return a null pointer if the current class node is null. *************** Thu Aug 19 10:26:18 1999 Alexandre Peti *** 8040,8057 **** (source_start_java_method): Likewise. (java_method_add_stmt): Likewise. ! Wed Aug 18 13:17:15 1999 Alexandre Petit-Bianco * class.c (emit_register_class): Removed unnecessary call to start_sequence. * parse.y (labeled_block_contains_loop_p): Removed unused local variable. ! Tue Aug 17 22:51:44 1999 Alexandre Petit-Bianco * parse.y (java_refold): Added prototype. ! Tue Aug 17 21:48:41 1999 Alexandre Petit-Bianco * parse.y (BINOP_COMPOUND_CANDIDATES): New macro. (java_stabilize_reference): Removed unnecessary `else'. --- 9516,9533 ---- (source_start_java_method): Likewise. (java_method_add_stmt): Likewise. ! 1999-08-18 Alexandre Petit-Bianco * class.c (emit_register_class): Removed unnecessary call to start_sequence. * parse.y (labeled_block_contains_loop_p): Removed unused local variable. ! 1999-08-17 Alexandre Petit-Bianco * parse.y (java_refold): Added prototype. ! 1999-08-17 Alexandre Petit-Bianco * parse.y (BINOP_COMPOUND_CANDIDATES): New macro. (java_stabilize_reference): Removed unnecessary `else'. *************** Tue Aug 17 21:48:41 1999 Alexandre Peti *** 8073,8079 **** * expr.c (java_lang_expand_expr): Mark static array data as referenced. ! Tue Aug 10 00:28:31 1999 Rainer Orth * jvgenmain.c (main): NUL-terminate name_obstack. --- 9549,9555 ---- * expr.c (java_lang_expand_expr): Mark static array data as referenced. ! 1999-08-10 Rainer Orth * jvgenmain.c (main): NUL-terminate name_obstack. *************** Tue Aug 10 00:28:31 1999 Rainer Orth < *** 8225,8231 **** (java_complete_expand_methods, java_expand_finals): Make static. (convert_narrow): Remove static prototype. ! Tue Aug 3 20:21:20 1999 J"orn Rennecke * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h. --- 9701,9707 ---- (java_complete_expand_methods, java_expand_finals): Make static. (convert_narrow): Remove static prototype. ! 1999-08-03 J"orn Rennecke * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h. *************** Tue Aug 3 20:21:20 1999 J"orn Rennecke *** 8297,8303 **** (print_full_cxx_name): New function. (print_c_decl): Use print_full_cxx_name. ! Thu Jul 22 12:41:12 1999 Alexandre Petit-Bianco * check-init.c (check_init): Handle MAX_EXPR. --- 9773,9779 ---- (print_full_cxx_name): New function. (print_c_decl): Use print_full_cxx_name. ! 1999-07-22 Alexandre Petit-Bianco * check-init.c (check_init): Handle MAX_EXPR. *************** Thu Jul 22 12:41:12 1999 Alexandre Peti *** 8327,8333 **** * lang-options.h (DEFINE_LANG_NAME ("Java")): Add -fuse-divide-subroutine ! Tue Jul 20 13:20:05 1999 Alexandre Petit-Bianco * parse.y (resolve_and_layout): Check methods only once. (resolve_qualified_expression_name): Verify thrown exceptions --- 9803,9809 ---- * lang-options.h (DEFINE_LANG_NAME ("Java")): Add -fuse-divide-subroutine ! 1999-07-20 Alexandre Petit-Bianco * parse.y (resolve_and_layout): Check methods only once. (resolve_qualified_expression_name): Verify thrown exceptions *************** Tue Jul 20 13:20:05 1999 Alexandre Peti *** 8340,8356 **** * expr.c (expand_expr): Do not return the last statement in a block as the block's value. ! Sat Jul 3 22:26:32 1999 Alexandre Petit-Bianco * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed CALL_EXPR, to avoid order of evaluation changes. ! Fri Jul 2 17:44:08 1999 Alexandre Petit-Bianco * parse.y (qualify_ambiguous_name): Do not use IDENTIFIER_LOCAL_VALUE when name is a STRING_CST. ! Thu Jul 1 23:31:16 1999 Alexandre Petit-Bianco * check-init.c (check_init): Handle MAX_EXPR. * expr.c (force_evaluation_order): Force method call arguments to --- 9816,9832 ---- * expr.c (expand_expr): Do not return the last statement in a block as the block's value. ! 1999-07-03 Alexandre Petit-Bianco * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed CALL_EXPR, to avoid order of evaluation changes. ! 1999-07-02 Alexandre Petit-Bianco * parse.y (qualify_ambiguous_name): Do not use IDENTIFIER_LOCAL_VALUE when name is a STRING_CST. ! 1999-07-01 Alexandre Petit-Bianco * check-init.c (check_init): Handle MAX_EXPR. * expr.c (force_evaluation_order): Force method call arguments to *************** Thu Jul 1 23:31:16 1999 Alexandre Peti *** 8358,8364 **** * parse.y (qualify_ambiguous_name): Loop again to qualify NEW_ARRAY_EXPR properly. ! Wed Jun 30 17:27:58 1999 Alexandre Petit-Bianco * parse.y (patch_invoke): Resolve unresolved invoked method returned type. --- 9834,9840 ---- * parse.y (qualify_ambiguous_name): Loop again to qualify NEW_ARRAY_EXPR properly. ! 1999-06-30 Alexandre Petit-Bianco * parse.y (patch_invoke): Resolve unresolved invoked method returned type. *************** Wed Jun 30 17:27:58 1999 Alexandre Peti *** 8375,8381 **** * jvspec.c (lang_specific_driver): Recognize --help. ! Fri Jun 25 13:35:19 1999 Alexandre Petit-Bianco * parse.y (resolve_package): Fixed bogus return statement. (patch_method_invocation): Resolve method invocation beginning with --- 9851,9857 ---- * jvspec.c (lang_specific_driver): Recognize --help. ! 1999-06-25 Alexandre Petit-Bianco * parse.y (resolve_package): Fixed bogus return statement. (patch_method_invocation): Resolve method invocation beginning with *************** Fri Jun 25 13:35:19 1999 Alexandre Peti *** 8388,8406 **** (java.stage3): Likewise for stage3-start. (java.stage4): Likewise for stage4-start. ! Thu Jun 24 13:12:15 1999 Alexandre Petit-Bianco * parse.y (java_complete_lhs): When doing cross referencing, don't try to keep file location on a WFL expanded as a CALL_EXPR. ! Wed Jun 23 14:37:15 1999 Alexandre Petit-Bianco * parse.y (finish_method_declaration): Insert a RETURN_EXPR when compiling to class file a void method with an empty method body. As a side effect, the bytecode backend will generate the appropriate `return' instruction. ! Tue Jun 22 20:43:49 1999 Alexandre Petit-Bianco * parse.y (lookup_package_type_and_set_next): New function prototype. (resolve_package): Search current and imported packages. --- 9864,9882 ---- (java.stage3): Likewise for stage3-start. (java.stage4): Likewise for stage4-start. ! 1999-06-24 Alexandre Petit-Bianco * parse.y (java_complete_lhs): When doing cross referencing, don't try to keep file location on a WFL expanded as a CALL_EXPR. ! 1999-06-23 Alexandre Petit-Bianco * parse.y (finish_method_declaration): Insert a RETURN_EXPR when compiling to class file a void method with an empty method body. As a side effect, the bytecode backend will generate the appropriate `return' instruction. ! 1999-06-22 Alexandre Petit-Bianco * parse.y (lookup_package_type_and_set_next): New function prototype. (resolve_package): Search current and imported packages. *************** Tue Jun 22 20:43:49 1999 Alexandre Peti *** 8425,8446 **** instruction. With some control flows it is possible that the last block ends with an `athrow'. ! Mon Jun 14 13:13:39 1999 Alexandre Petit-Bianco * parse.y (qualify_ambiguous_name): Reorganized the post evaluation of non WFL leading expression nodes. ! Fri Jun 11 21:37:18 1999 Alexandre Petit-Bianco * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after CONVERT_EXPR. ! Thu Jun 10 22:26:17 1999 Alexandre Petit-Bianco * parse.y (qualify_ambiguous_name): Handle qualified expression beginning with a STRING_CST. ! Thu Jun 10 20:27:25 1999 Alexandre Petit-Bianco * parse.y (register_fields): Set DECL_INITIAL on both pre-initialized static and public fields. --- 9901,9922 ---- instruction. With some control flows it is possible that the last block ends with an `athrow'. ! 1999-06-14 Alexandre Petit-Bianco * parse.y (qualify_ambiguous_name): Reorganized the post evaluation of non WFL leading expression nodes. ! 1999-06-11 Alexandre Petit-Bianco * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after CONVERT_EXPR. ! 1999-06-10 Alexandre Petit-Bianco * parse.y (qualify_ambiguous_name): Handle qualified expression beginning with a STRING_CST. ! 1999-06-10 Alexandre Petit-Bianco * parse.y (register_fields): Set DECL_INITIAL on both pre-initialized static and public fields. *************** Thu Jun 10 20:27:25 1999 Alexandre Peti *** 8453,8464 **** (fold_constant_for_init): Pre-initialized field decl constant to be folded. ! Mon Jun 7 16:09:51 1999 Alexandre Petit-Bianco * parse.y (note_possible_classname): Mark returned node with QUALIFIED_P only if the original class name contained a '/'. ! Sat Jun 5 11:46:59 1999 Anthony Green * Make-lang.in (gcjh): More parallel build fixes. --- 9929,9940 ---- (fold_constant_for_init): Pre-initialized field decl constant to be folded. ! 1999-06-07 Alexandre Petit-Bianco * parse.y (note_possible_classname): Mark returned node with QUALIFIED_P only if the original class name contained a '/'. ! 1999-06-05 Anthony Green * Make-lang.in (gcjh): More parallel build fixes. *************** Sat Jun 5 11:46:59 1999 Anthony Green *** 8466,8503 **** * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds. ! Wed Jun 2 10:44:38 1999 Anthony Green * except.c (link_handler): Chain exception handlers in order. ! Wed Jun 2 10:41:24 1999 Anthony Green * expr.c (expand_byte_code): Fill unreachable bytecode regions with nops and process as usual in order to always set correct EH ranges. Emit detailed warnings about unreachable bytecodes. ! Wed Jun 2 10:35:13 1999 Anthony Green * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as constant. ! Fri May 28 18:22:45 1999 Alexandre Petit-Bianco * parse.y (lookup_field_wrapper): Unified returned value to NULL or the searched field decl. ! Fri May 28 11:34:05 1999 Alexandre Petit-Bianco * parse.y (fold_constant_for_init): Convert numerical constant values to the type of the assigned field. ! Thu May 27 19:57:40 1999 Alexandre Petit-Bianco * expr.c (lookup_field): Relaxed the test on class loading error detection. * parse.y (fold_constant_for_init): Enabeled old code. ! Wed May 26 18:06:02 1999 Alexandre Petit-Bianco * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast' decide the validity of the cast of a java.lang.Cloneable reference --- 9942,9979 ---- * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds. ! 1999-06-02 Anthony Green * except.c (link_handler): Chain exception handlers in order. ! 1999-06-02 Anthony Green * expr.c (expand_byte_code): Fill unreachable bytecode regions with nops and process as usual in order to always set correct EH ranges. Emit detailed warnings about unreachable bytecodes. ! 1999-06-02 Anthony Green * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as constant. ! 1999-05-28 Alexandre Petit-Bianco * parse.y (lookup_field_wrapper): Unified returned value to NULL or the searched field decl. ! 1999-05-28 Alexandre Petit-Bianco * parse.y (fold_constant_for_init): Convert numerical constant values to the type of the assigned field. ! 1999-05-27 Alexandre Petit-Bianco * expr.c (lookup_field): Relaxed the test on class loading error detection. * parse.y (fold_constant_for_init): Enabeled old code. ! 1999-05-26 Alexandre Petit-Bianco * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast' decide the validity of the cast of a java.lang.Cloneable reference *************** Wed May 26 18:06:02 1999 Alexandre Peti *** 8505,8536 **** (patch_conditional_expr): Fixed first argument passed to binary_numeric_promotion. ! Wed May 26 15:33:06 1999 Alexandre Petit-Bianco * parse.y (qualify_ambiguous_name): Take into account that a CONVERT_EXPR might specify a type as a WFL. ! Tue May 25 15:06:13 1999 Alexandre Petit-Bianco * parse.y (patch_assignment): Save the rhs before using it as an argument to _Jv_CheckArrayStore. ! Tue May 25 11:23:59 1999 Alexandre Petit-Bianco * lex.c (java_parse_doc_section): Fixed `tag' buffer size. ! Mon May 24 13:26:00 1999 Alexandre Petit-Bianco * lex.c (java_lex): Accepts `+' or `-' after the beginning of a ! floating point litteral only when the exponent indicator has been parsed. ! Sat May 22 13:54:41 1999 Alexandre Petit-Bianco * parse.y (formal_parameter:): Construct argument tree list element even if a yet unsupported final parameter was encountered. ! Tue May 18 00:28:58 1999 Alexandre Petit-Bianco * parse.y (finish_method_declaration): Issue errors for native or abstract methods declared with a method body, as well as for non --- 9981,10012 ---- (patch_conditional_expr): Fixed first argument passed to binary_numeric_promotion. ! 1999-05-26 Alexandre Petit-Bianco * parse.y (qualify_ambiguous_name): Take into account that a CONVERT_EXPR might specify a type as a WFL. ! 1999-05-25 Alexandre Petit-Bianco * parse.y (patch_assignment): Save the rhs before using it as an argument to _Jv_CheckArrayStore. ! 1999-05-25 Alexandre Petit-Bianco * lex.c (java_parse_doc_section): Fixed `tag' buffer size. ! 1999-05-24 Alexandre Petit-Bianco * lex.c (java_lex): Accepts `+' or `-' after the beginning of a ! floating point literal only when the exponent indicator has been parsed. ! 1999-05-22 Alexandre Petit-Bianco * parse.y (formal_parameter:): Construct argument tree list element even if a yet unsupported final parameter was encountered. ! 1999-05-18 Alexandre Petit-Bianco * parse.y (finish_method_declaration): Issue errors for native or abstract methods declared with a method body, as well as for non *************** Tue May 18 00:28:58 1999 Alexandre Peti *** 8576,8604 **** (link_handler): Changed interface to allow merging of eh_ranges. Split overlapping ranges. Return `void'. ! Mon May 17 19:20:24 1999 Alexandre Petit-Bianco * parse.y (constructor_block_end:): New rule, tagged . (constructor_body:): Use `constructor_block_end' instead of `block_end'. ! Mon May 17 18:01:40 1999 Alexandre Petit-Bianco * parse.y (statement_nsi:): Pop `for' statement block. (java_complete_lhs): Labeled blocks containing no statement are marked as completing normally. ! Fri May 14 12:31:08 1999 Alexandre Petit-Bianco * xref.c (xref_set_current_fp): New function, defined. * xref.h (xref_set_current_fp): New function, prototyped. ! Fri May 14 11:57:54 1999 Alexandre Petit-Bianco * check-init.c (check_init): Take into account that LABELED_BLOCK_STMT can be empty. ! Thu May 13 18:30:48 1999 Alexandre Petit-Bianco * parse.y (java_check_regular_methods): Warning check on not overriding methods with default access in other packages does not --- 10052,10080 ---- (link_handler): Changed interface to allow merging of eh_ranges. Split overlapping ranges. Return `void'. ! 1999-05-17 Alexandre Petit-Bianco * parse.y (constructor_block_end:): New rule, tagged . (constructor_body:): Use `constructor_block_end' instead of `block_end'. ! 1999-05-17 Alexandre Petit-Bianco * parse.y (statement_nsi:): Pop `for' statement block. (java_complete_lhs): Labeled blocks containing no statement are marked as completing normally. ! 1999-05-14 Alexandre Petit-Bianco * xref.c (xref_set_current_fp): New function, defined. * xref.h (xref_set_current_fp): New function, prototyped. ! 1999-05-14 Alexandre Petit-Bianco * check-init.c (check_init): Take into account that LABELED_BLOCK_STMT can be empty. ! 1999-05-13 Alexandre Petit-Bianco * parse.y (java_check_regular_methods): Warning check on not overriding methods with default access in other packages does not *************** Thu May 13 18:30:48 1999 Alexandre Peti *** 8607,8613 **** it by NULL_TREE. This prevents gcc from generating an irrelevant warning. ! Thu May 13 13:23:38 1999 Alexandre Petit-Bianco * check-init.c (check_init): Removed code accepting to see things falling through default:, when doing xrefs. --- 10083,10089 ---- it by NULL_TREE. This prevents gcc from generating an irrelevant warning. ! 1999-05-13 Alexandre Petit-Bianco * check-init.c (check_init): Removed code accepting to see things falling through default:, when doing xrefs. *************** Thu May 13 13:23:38 1999 Alexandre Peti *** 8678,8684 **** (find_spec_file): New function. (SPEC_FILE): New define. ! Tue May 11 11:46:36 1999 Dave Brolley * lang-options.h: -MD, -MMD, -M and -MM not needed here for cpplib-enabled build. --- 10154,10160 ---- (find_spec_file): New function. (SPEC_FILE): New define. ! 1999-05-11 Dave Brolley * lang-options.h: -MD, -MMD, -M and -MM not needed here for cpplib-enabled build. *************** Tue May 11 11:46:36 1999 Dave Brolley *** 8719,8725 **** * Makefile.in: Remove -v from bison command lines. ! Fri Apr 30 17:54:40 1999 Alexandre Petit-Bianco * check-init.c (check_init): Exclude a case of error when doing xrefs. --- 10195,10201 ---- * Makefile.in: Remove -v from bison command lines. ! 1999-04-30 Alexandre Petit-Bianco * check-init.c (check_init): Exclude a case of error when doing xrefs. *************** Fri Apr 30 17:54:40 1999 Alexandre Peti *** 8768,8774 **** create internal labels. (lookup_label): Ditto. ! Sat Apr 24 16:50:19 1999 Alexandre Petit-Bianco * class.c (layout_class_method): Generate 's rtl for interfaces. --- 10244,10250 ---- create internal labels. (lookup_label): Ditto. ! 1999-04-24 Alexandre Petit-Bianco * class.c (layout_class_method): Generate 's rtl for interfaces. *************** Sat Apr 24 16:50:19 1999 Alexandre Peti *** 8801,8807 **** * Make-lang.in (JAVA_SRCS): Added check-init.c. ! Wed Apr 21 11:13:36 1999 Alexandre Petit-Bianco * decl.c (predef_filenames, predef_filenames_size): New globals (init_decl_processing): predef_filenames and predef_filenames_size --- 10277,10283 ---- * Make-lang.in (JAVA_SRCS): Added check-init.c. ! 1999-04-21 Alexandre Petit-Bianco * decl.c (predef_filenames, predef_filenames_size): New globals (init_decl_processing): predef_filenames and predef_filenames_size *************** Wed Apr 21 11:13:36 1999 Alexandre Peti *** 8818,8824 **** (java_complete_lhs): If the cross reference flag is set, wrap field DECL node around a WFL when resolving expression name. ! Mon Apr 19 14:44:48 1999 Alexandre Petit-Bianco * lang.c (lang_decode_option): Fixed returned value when parsing `-fxref=...' and `-Wall'. --- 10294,10300 ---- (java_complete_lhs): If the cross reference flag is set, wrap field DECL node around a WFL when resolving expression name. ! 1999-04-19 Alexandre Petit-Bianco * lang.c (lang_decode_option): Fixed returned value when parsing `-fxref=...' and `-Wall'. *************** Mon Apr 19 14:44:48 1999 Alexandre Peti *** 8847,8868 **** * parse.y (resolve_qualified_expression_name): Added missing `break'. ! Thu Apr 15 13:08:03 1999 Anthony Green * gjavah.c: New prototypes for java_float_finite and java_double_finite. ! Mon Apr 12 18:27:32 1999 Alexandre Petit-Bianco * parse.y (patch_unaryop): Fixed ++/-- operator check on array references. ! Tue Apr 6 23:15:52 1999 Jeffrey A Law (law@cygnus.com) * Makefile.in (TREE_H): Add tree-check.h. (RTL_H): Add genrtl.h. ! Tue Apr 6 15:15:51 1999 Alexandre Petit-Bianco * parse.y (patch_assignment): Added ArrayStoreException runtime check. --- 10323,10344 ---- * parse.y (resolve_qualified_expression_name): Added missing `break'. ! 1999-04-15 Anthony Green * gjavah.c: New prototypes for java_float_finite and java_double_finite. ! 1999-04-12 Alexandre Petit-Bianco * parse.y (patch_unaryop): Fixed ++/-- operator check on array references. ! 1999-04-06 Jeffrey A Law (law@cygnus.com) * Makefile.in (TREE_H): Add tree-check.h. (RTL_H): Add genrtl.h. ! 1999-04-06 Alexandre Petit-Bianco * parse.y (patch_assignment): Added ArrayStoreException runtime check. *************** Tue Apr 6 15:15:51 1999 Alexandre Peti *** 8877,8883 **** * parse.y (patch_binop): Don't fold if non-constant and emiting class files. ! Mon Apr 5 16:06:09 1999 Kaveh R. Ghazi * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H). --- 10353,10359 ---- * parse.y (patch_binop): Don't fold if non-constant and emiting class files. ! 1999-04-05 Kaveh R. Ghazi * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H). *************** Mon Apr 5 16:06:09 1999 Kaveh R. Ghazi *** 8891,8897 **** * lang.c (main_jcf): Don't define. ! Mon Apr 5 15:43:51 1999 Kaveh R. Ghazi * class.c (add_method_1): Cast the argument of `bzero' to PTR. --- 10367,10373 ---- * lang.c (main_jcf): Don't define. ! 1999-04-05 Kaveh R. Ghazi * class.c (add_method_1): Cast the argument of `bzero' to PTR. *************** Mon Apr 5 15:43:51 1999 Kaveh R. Ghazi *** 8914,8920 **** * xref.c: Don't include . ! Mon Apr 5 11:24:19 1999 Alexandre Petit-Bianco * parse.y (struct parser_ctxt *ctxp): Now global. (declare_local_variables): Use WFL compound value for the --- 10390,10396 ---- * xref.c: Don't include . ! 1999-04-05 Alexandre Petit-Bianco * parse.y (struct parser_ctxt *ctxp): Now global. (declare_local_variables): Use WFL compound value for the *************** Mon Apr 5 11:24:19 1999 Alexandre Peti *** 8932,8955 **** (get_field_name): New function. (print_field_info): Use get_field_name and print_field_name. ! Wed Mar 31 11:00:32 1999 Kaveh R. Ghazi * Makefile.in (keyword.h): Generate using gperf language 'C', not 'KR-C', so gperf uses the `const' keyword on strings. * keyword.gperf (java_keyword): Const-ify a char*. ! Tue Mar 30 11:31:53 1999 Alexandre Petit-Bianco * parse.y (patch_bc_statement): Fixed identation and a bogus `printf' format. ! Tue Mar 30 11:29:29 1999 Alexandre Petit-Bianco * parse.y (patch_assignment): Allow static variables in other classes to be assigned. ! Sun Mar 28 22:12:10 1999 Kaveh R. Ghazi * class.c (maybe_add_interface): Remove unused variable `interface_binfo'. --- 10408,10431 ---- (get_field_name): New function. (print_field_info): Use get_field_name and print_field_name. ! 1999-03-31 Kaveh R. Ghazi * Makefile.in (keyword.h): Generate using gperf language 'C', not 'KR-C', so gperf uses the `const' keyword on strings. * keyword.gperf (java_keyword): Const-ify a char*. ! 1999-03-30 Alexandre Petit-Bianco * parse.y (patch_bc_statement): Fixed identation and a bogus `printf' format. ! 1999-03-30 Alexandre Petit-Bianco * parse.y (patch_assignment): Allow static variables in other classes to be assigned. ! 1999-03-28 Kaveh R. Ghazi * class.c (maybe_add_interface): Remove unused variable `interface_binfo'. *************** Sun Mar 28 22:12:10 1999 Kaveh R. Ghazi *** 8961,8967 **** * verify.c (verify_jvm_instructions): Remove unused variable `self_type'. ! Sat Mar 27 15:49:18 1999 Per Bothner * parse.y (complete_loop_body): Rename to finish_loop_body. (complete_labeled_statement): Rename to finish_labeled_statement. --- 10437,10443 ---- * verify.c (verify_jvm_instructions): Remove unused variable `self_type'. ! 1999-03-27 Per Bothner * parse.y (complete_loop_body): Rename to finish_loop_body. (complete_labeled_statement): Rename to finish_labeled_statement. *************** Sat Mar 27 15:49:18 1999 Per Bothner < *** 8978,8984 **** (patch_loop_statement): Re-organize. (patch_bc_statement): Re-write. ! Sat Mar 27 15:13:21 1999 Alexandre Petit-Bianco * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count using a WFL compound value. --- 10454,10460 ---- (patch_loop_statement): Re-organize. (patch_bc_statement): Re-write. ! 1999-03-27 Alexandre Petit-Bianco * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count using a WFL compound value. *************** Sat Mar 27 15:13:21 1999 Alexandre Peti *** 8992,8998 **** * xref.c (system.h, jcf.h, parse.h, obstack.h): Include. * xref.h (expand_xref): Prototype renamed from xref_generate. ! Sat Mar 27 14:16:32 1999 Alexandre Petit-Bianco * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK. (GET_CURRENT_BLOCK): New macro. --- 10468,10474 ---- * xref.c (system.h, jcf.h, parse.h, obstack.h): Include. * xref.h (expand_xref): Prototype renamed from xref_generate. ! 1999-03-27 Alexandre Petit-Bianco * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK. (GET_CURRENT_BLOCK): New macro. *************** Sat Mar 27 14:16:32 1999 Alexandre Peti *** 9019,9031 **** * java/Make-lang.in: Remove all references to gcj.o/gcj.c. Link gcj from gcc.o. ! Tue Mar 23 10:48:24 1999 Alexandre Petit-Bianco * parse.y (find_applicable_accessible_methods_list): When dealing with interface: ensure that a given interface or java.lang.Object are searched only once. ! Tue Mar 23 10:05:27 1999 Kaveh R. Ghazi * gjavah.c (print_c_decl): Remove unused argument `flags'. --- 10495,10507 ---- * java/Make-lang.in: Remove all references to gcj.o/gcj.c. Link gcj from gcc.o. ! 1999-03-23 Alexandre Petit-Bianco * parse.y (find_applicable_accessible_methods_list): When dealing with interface: ensure that a given interface or java.lang.Object are searched only once. ! 1999-03-23 Kaveh R. Ghazi * gjavah.c (print_c_decl): Remove unused argument `flags'. *************** Tue Mar 23 10:05:27 1999 Kaveh R. Ghazi *** 9043,9049 **** (create_class): Remove unused variable `super_decl'. (get_printable_method_name): Initialize variable `name'. ! Mon Mar 22 20:14:26 1999 Alexandre Petit-Bianco * Changelog: Fixed 1999-03-22 typos. * lang.c (lang_decode_option): Fixed typo in error string in the --- 10519,10525 ---- (create_class): Remove unused variable `super_decl'. (get_printable_method_name): Initialize variable `name'. ! 1999-03-22 Alexandre Petit-Bianco * Changelog: Fixed 1999-03-22 typos. * lang.c (lang_decode_option): Fixed typo in error string in the *************** Mon Mar 22 20:14:26 1999 Alexandre Peti *** 9065,9071 **** * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be linked with. ! Sun Mar 21 08:30:30 1999 Kaveh R. Ghazi * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H) $(srcdir)/../system.h and $(JAVA_TREE_H). --- 10541,10547 ---- * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be linked with. ! 1999-03-21 Kaveh R. Ghazi * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H) $(srcdir)/../system.h and $(JAVA_TREE_H). *************** Sun Mar 21 08:30:30 1999 Kaveh R. Ghazi *** 9185,9191 **** * class.c (unmangle_classname): Implemented stricter testing before setting the QUALIFIED_P flag on an identifier. ! Tue Mar 16 15:15:41 1999 Per Bothner * parse.y (java_complete_lhs): Call force_evaluation_order after patch_newarray. --- 10661,10667 ---- * class.c (unmangle_classname): Implemented stricter testing before setting the QUALIFIED_P flag on an identifier. ! 1999-03-16 Per Bothner * parse.y (java_complete_lhs): Call force_evaluation_order after patch_newarray. *************** Tue Mar 16 15:15:41 1999 Per Bothner < *** 9199,9205 **** operator (if necessary) and complete the RHS after having built the cast. ! Mon Mar 15 12:18:29 1999 Per Bothner * class.c (make_class): Don't set CLASS_P here (because this function is also called by build_java_array_type). --- 10675,10681 ---- operator (if necessary) and complete the RHS after having built the cast. ! 1999-03-15 Per Bothner * class.c (make_class): Don't set CLASS_P here (because this function is also called by build_java_array_type). *************** Mon Mar 15 12:18:29 1999 Per Bothner < *** 9216,9222 **** * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to match what JDK 1.2 does), but don't set ACC_PUBLIC. ! Sat Mar 13 18:16:34 1999 Per Bothner * lex.c (java_read_char): UNGET invalid non-initial utf8 character. * lex.h (UNGETC): Change misleading macro. --- 10692,10698 ---- * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to match what JDK 1.2 does), but don't set ACC_PUBLIC. ! 1999-03-13 Per Bothner * lex.c (java_read_char): UNGET invalid non-initial utf8 character. * lex.h (UNGETC): Change misleading macro. *************** Sat Mar 13 18:16:34 1999 Per Bothner < *** 9244,9254 **** non accessible fields. (java_stabilize_reference): New function. (java_complete_lhs): Fixed indentation. Use ! java_stabilize_reference in compound assignement. Insert the cast. If not processing `+' fix string constants before processing binop. ! Fri Mar 12 19:42:55 1999 Kaveh R. Ghazi * constants.c (find_class_or_string_constant): Cast variable `j' to a `jword' when comparing against one. --- 10720,10730 ---- non accessible fields. (java_stabilize_reference): New function. (java_complete_lhs): Fixed indentation. Use ! java_stabilize_reference in compound assignment. Insert the cast. If not processing `+' fix string constants before processing binop. ! 1999-03-12 Kaveh R. Ghazi * constants.c (find_class_or_string_constant): Cast variable `j' to a `jword' when comparing against one. *************** Fri Mar 12 19:42:55 1999 Kaveh R. Ghazi *** 9283,9289 **** * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes; we'll need a directory separator and a null character. ! Wed Mar 10 23:20:11 1999 Per Bothner * jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %. --- 10759,10765 ---- * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes; we'll need a directory separator and a null character. ! 1999-03-10 Per Bothner * jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %. *************** Wed Mar 10 23:20:11 1999 Per Bothner < *** 9292,9298 **** * parse.y (method_header): Don't set ACC_ABSTRACT flags on interfaces. ! Fri Mar 5 15:17:29 1999 Per Bothner * lex.c (java_parse_end_comment): Take extra parameter (next char). --- 10768,10774 ---- * parse.y (method_header): Don't set ACC_ABSTRACT flags on interfaces. ! 1999-03-05 Per Bothner * lex.c (java_parse_end_comment): Take extra parameter (next char). *************** Fri Mar 5 15:17:29 1999 Per Bothner < *** 9312,9318 **** * parse.y (java_complete_lhs): Don't call patch_assignment if rhs is error_mark (it might catch more errors, but it is more likely to lose). ! Sat Mar 6 11:17:16 1999 Kaveh R. Ghazi * Makefile.in (jcf-parse.o): Depend on $(PARSE_H). (parse-scan.o): Depend on toplev.h. --- 10788,10794 ---- * parse.y (java_complete_lhs): Don't call patch_assignment if rhs is error_mark (it might catch more errors, but it is more likely to lose). ! 1999-03-06 Kaveh R. Ghazi * Makefile.in (jcf-parse.o): Depend on $(PARSE_H). (parse-scan.o): Depend on toplev.h. *************** Sat Mar 6 11:17:16 1999 Kaveh R. Ghazi *** 9362,9377 **** * typeck.c (convert_ieee_real_to_integer): Remove unused variable `node'. ! Wed Feb 24 16:13:59 1999 Per Bothner * check-init.c (check_init): COPYN takes word count, not bit count. ! Fri Feb 26 14:06:21 1999 Per Bothner * typeck.c (convert_ieee_real_to_integer): Use save_expr instead of explicit build_decl. (Avoids crash in reload when optimizing.) ! Thu Feb 25 21:05:04 1999 Per Bothner * decl.c (complete_start_java_method): Handle synchronized method even when compiling from bytecode. --- 10838,10853 ---- * typeck.c (convert_ieee_real_to_integer): Remove unused variable `node'. ! 1999-02-24 Per Bothner * check-init.c (check_init): COPYN takes word count, not bit count. ! 1999-02-26 Per Bothner * typeck.c (convert_ieee_real_to_integer): Use save_expr instead of explicit build_decl. (Avoids crash in reload when optimizing.) ! 1999-02-25 Per Bothner * decl.c (complete_start_java_method): Handle synchronized method even when compiling from bytecode. *************** Thu Feb 25 21:05:04 1999 Per Bothner < *** 9435,9441 **** * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f, not 0x1f. ! Sun Feb 21 14:56:11 1999 Per Bothner * decl.c (build_result_decl), java-tree.h: New method. (complete_start_java_method): Handle synchronized methods. --- 10911,10917 ---- * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f, not 0x1f. ! 1999-02-21 Per Bothner * decl.c (build_result_decl), java-tree.h: New method. (complete_start_java_method): Handle synchronized methods. *************** Sun Feb 21 14:56:11 1999 Per Bothner < *** 9454,9460 **** * jcf-write.c (generate_classfile): Emit "Exceptions" attribute. ! Fri Feb 19 15:35:01 1999 Per Bothner Force left-to-right evaluation of binary operations etc. * expr.c (force_evaluation_order), java-tree.h: New function. --- 10930,10936 ---- * jcf-write.c (generate_classfile): Emit "Exceptions" attribute. ! 1999-02-19 Per Bothner Force left-to-right evaluation of binary operations etc. * expr.c (force_evaluation_order), java-tree.h: New function. *************** Fri Feb 19 15:35:01 1999 Per Bothner < *** 9472,9478 **** * parse.y (java_complete_lhs): Ignore an empty statement in a COMPOUND_EXPR. Don't complain about empty statement after return. ! Fri Feb 19 13:00:56 1999 Per Bothner * parse.y (obtain_incomplete_type): Don't wrap unknown types in TREE_LIST - just chain the POINTER_TYPEs together. --- 10948,10954 ---- * parse.y (java_complete_lhs): Ignore an empty statement in a COMPOUND_EXPR. Don't complain about empty statement after return. ! 1999-02-19 Per Bothner * parse.y (obtain_incomplete_type): Don't wrap unknown types in TREE_LIST - just chain the POINTER_TYPEs together. *************** Fri Feb 19 13:00:56 1999 Per Bothner < *** 9486,9492 **** JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention. * typeck.c (build_java_array_type): Don't call layout_class. ! Wed Feb 17 15:47:20 1999 Alexandre Petit-Bianco * parse.y (check_pkg_class_access): Allow private class access within the same package. --- 10962,10968 ---- JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention. * typeck.c (build_java_array_type): Don't call layout_class. ! 1999-02-17 Alexandre Petit-Bianco * parse.y (check_pkg_class_access): Allow private class access within the same package. *************** Wed Feb 17 15:47:20 1999 Alexandre Peti *** 9494,9500 **** (patch_unaryop): Call strip_out_static_field_access_decl on ++/-- operator argument before testing its nature. ! Wed Feb 3 12:38:43 1999 Per Bothner * java-tree.def (FINALLY_EXPR): Removed. (Now uses TRY_FINALLY_EXPR.) (TRY_EXPR): Simplify - it no longer has a finally clause. --- 10970,10976 ---- (patch_unaryop): Call strip_out_static_field_access_decl on ++/-- operator argument before testing its nature. ! 1999-02-03 Per Bothner * java-tree.def (FINALLY_EXPR): Removed. (Now uses TRY_FINALLY_EXPR.) (TRY_EXPR): Simplify - it no longer has a finally clause. *************** Wed Feb 3 12:38:43 1999 Per Bothner < *** 9529,9540 **** * constants.c (alloc_class_constant): Likewise. * expr.c (build_invokeinterface): Likewise. ! Thu Feb 11 21:25:51 1999 Alexandre Petit-Bianco * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid of an ancient workaround. ! Wed Feb 10 23:27:33 1999 Jeffrey A Law (law@cygnus.com) * jvspec.c (xmalloc): Kill the prototype. It does not belong here anymore. --- 11005,11016 ---- * constants.c (alloc_class_constant): Likewise. * expr.c (build_invokeinterface): Likewise. ! 1999-02-11 Alexandre Petit-Bianco * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid of an ancient workaround. ! 1999-02-10 Jeffrey A Law (law@cygnus.com) * jvspec.c (xmalloc): Kill the prototype. It does not belong here anymore. *************** Wed Feb 10 23:27:33 1999 Jeffrey A Law *** 9555,9561 **** * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop. (GC_NAME): Renamed -lgc to -lgcjgc. ! Tue Feb 9 19:31:09 1999 Alexandre Petit-Bianco * lex.c (java_lang_cloneable): Initialize. * parse.y (java_lang_cloneable): New static variable. --- 11031,11037 ---- * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop. (GC_NAME): Renamed -lgc to -lgcjgc. ! 1999-02-09 Alexandre Petit-Bianco * lex.c (java_lang_cloneable): Initialize. * parse.y (java_lang_cloneable): New static variable. *************** Tue Feb 9 19:31:09 1999 Alexandre Peti *** 9566,9572 **** (patch_cast): Swapped two first arguments to first call to valid_ref_assignconv_cast_p. ! Mon Feb 8 11:50:50 1999 Alexandre Petit-Bianco * parse.h: DECL_P renamed JDECL_P. * parse.y: DECL_P replaced by JDECL_P. --- 11042,11048 ---- (patch_cast): Swapped two first arguments to first call to valid_ref_assignconv_cast_p. ! 1999-02-08 Alexandre Petit-Bianco * parse.h: DECL_P renamed JDECL_P. * parse.y: DECL_P replaced by JDECL_P. *************** Mon Feb 8 11:50:50 1999 Alexandre Peti *** 9588,9608 **** separator, rather than '/'. (make_class_data): Likewise. ! Wed Feb 3 22:50:17 1999 Marc Espie * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and mkstemp.o. Get them from libiberty now. ! Tue Feb 2 19:49:12 1999 Jeffrey A Law (law@cygnus.com) * jcf-io.c: Do not include sys/stat.h or sys/wait.h ! Tue Feb 2 20:04:50 1999 Kaveh R. Ghazi * jvspec.c (xmalloc): Fix the prototype to match the one obtained from libiberty.h ! Tue Feb 2 10:39:47 1999 Per Bothner Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'. * jcf-write.c (generate_bytecode_return): New function. --- 11064,11084 ---- separator, rather than '/'. (make_class_data): Likewise. ! 1999-02-03 Marc Espie * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and mkstemp.o. Get them from libiberty now. ! 1999-02-02 Jeffrey A Law (law@cygnus.com) * jcf-io.c: Do not include sys/stat.h or sys/wait.h ! 1999-02-02 Kaveh R. Ghazi * jvspec.c (xmalloc): Fix the prototype to match the one obtained from libiberty.h ! 1999-02-02 Per Bothner Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'. * jcf-write.c (generate_bytecode_return): New function. *************** Tue Feb 2 10:39:47 1999 Per Bothner < *** 9616,9622 **** * verify.c (verify_jvm_instructions): Do INVALIDATE_PC after handling OPCODE_lookupswitch or OPCODE_tableswitch. ! Mon Feb 1 20:44:47 1999 Per Bothner * parse.y (patch_method_invocation): Handle calling static methods, even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS). --- 11092,11098 ---- * verify.c (verify_jvm_instructions): Do INVALIDATE_PC after handling OPCODE_lookupswitch or OPCODE_tableswitch. ! 1999-02-01 Per Bothner * parse.y (patch_method_invocation): Handle calling static methods, even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS). *************** Mon Feb 1 20:44:47 1999 Per Bothner < *** 9624,9630 **** * parse.y (java_complete_lhs): Don't complain about unreachable exit condition in a do-while statement. ! Fri Jan 29 18:19:02 1999 Alexandre Petit-Bianco * lex.c (java_read_char): Fixed utf8 decoding. (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff --- 11100,11106 ---- * parse.y (java_complete_lhs): Don't complain about unreachable exit condition in a do-while statement. ! 1999-01-29 Alexandre Petit-Bianco * lex.c (java_read_char): Fixed utf8 decoding. (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff *************** Fri Jan 29 18:19:02 1999 Alexandre Peti *** 9638,9644 **** (build_string_concatenation): Optimize out left or right empty string constants. ! Thu Jan 28 18:51:26 1999 Per Bothner * jcf-write.c (localvar_alloc): Only emit entry for LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE. --- 11114,11120 ---- (build_string_concatenation): Optimize out left or right empty string constants. ! 1999-01-28 Per Bothner * jcf-write.c (localvar_alloc): Only emit entry for LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE. *************** Thu Jan 28 18:51:26 1999 Per Bothner < *** 9647,9658 **** * jvspec.c (lang_specific_driver): If no -O* or -g* option is specified, add -g1 (for compatibility wih javac). ! Thu Jan 28 09:17:51 1999 Hans-Peter Nilsson * java/Makefile.in: Add missing dependencies for jcf-dump.o, gjavah.o, check-init.o, jv-scan.o ! Mon Feb 1 09:50:48 1999 Kaveh R. Ghazi * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h. --- 11123,11134 ---- * jvspec.c (lang_specific_driver): If no -O* or -g* option is specified, add -g1 (for compatibility wih javac). ! 1999-01-28 Hans-Peter Nilsson * java/Makefile.in: Add missing dependencies for jcf-dump.o, gjavah.o, check-init.o, jv-scan.o ! 1999-02-01 Kaveh R. Ghazi * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h. *************** Mon Feb 1 09:50:48 1999 Kaveh R. Ghazi *** 9666,9676 **** * lex.c (inline): Likewise. ! Sun Jan 31 20:34:29 1999 Zack Weinberg * lang-specs.h: Map -Qn to -fno-ident. ! Fri Jan 29 16:51:56 1999 Richard Henderson * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo. --- 11142,11152 ---- * lex.c (inline): Likewise. ! 1999-01-31 Zack Weinberg * lang-specs.h: Map -Qn to -fno-ident. ! 1999-01-29 Richard Henderson * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo. *************** Fri Jan 29 16:51:56 1999 Richard Hender *** 9679,9697 **** * parse.h (BUILD_APPEND): If ARG is a non-String object reference, then cast it to Object before calling `append' method. ! Thu Jan 28 14:45:39 1999 Per Bothner * check-init.c (check_bool2_init, check_bool_init, check_init): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR. * jcf-write.c (generate_bytecode_insns): Likewise. ! Thu Jan 28 11:50:11 1999 Alexandre Petit-Bianco * jcf-parse.c (jcf_parse): Don't parse the same class file twice. * parse.y (patch_cast): Allow a boolean to be cast into a boolean. ! Wed Jan 27 10:19:29 1999 Alexandre Petit-Bianco * parse.y: (class_declaration:): Fixed indentation. (class_member_declaration:): Extra `;' after field declaration now --- 11155,11173 ---- * parse.h (BUILD_APPEND): If ARG is a non-String object reference, then cast it to Object before calling `append' method. ! 1999-01-28 Per Bothner * check-init.c (check_bool2_init, check_bool_init, check_init): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR. * jcf-write.c (generate_bytecode_insns): Likewise. ! 1999-01-28 Alexandre Petit-Bianco * jcf-parse.c (jcf_parse): Don't parse the same class file twice. * parse.y (patch_cast): Allow a boolean to be cast into a boolean. ! 1999-01-27 Alexandre Petit-Bianco * parse.y: (class_declaration:): Fixed indentation. (class_member_declaration:): Extra `;' after field declaration now *************** Wed Jan 27 10:19:29 1999 Alexandre Peti *** 9701,9714 **** node's COMPOUND_ASSIGN_P flag value. (patch_cast): Fix cast from char to floating point. ! Mon Jan 25 17:39:19 1999 Andrew Haley * except.c, java-except.h (expand_resume_after_catch): new function. * expr.c (java_lang_expand_expr): call expand_resume_after_catch to branch back to main flow of control after a catch block. ! Sat Jan 23 23:02:43 1999 Kaveh R. Ghazi * Makefile.in (parse.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h. --- 11177,11190 ---- node's COMPOUND_ASSIGN_P flag value. (patch_cast): Fix cast from char to floating point. ! 1999-01-25 Andrew Haley * except.c, java-except.h (expand_resume_after_catch): new function. * expr.c (java_lang_expand_expr): call expand_resume_after_catch to branch back to main flow of control after a catch block. ! 1999-01-23 Kaveh R. Ghazi * Makefile.in (parse.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h. *************** Sat Jan 23 23:02:43 1999 Kaveh R. Ghazi *** 9816,9827 **** * zipfile.h: Prototype `read_zip_archive'. ! Thu Jan 21 16:00:06 1999 Andrew Haley * typeck.c (convert): Allow conversions to void type: some optimizations in gcc do this. ! Thu Jan 21 15:21:49 1999 Andrew Haley * typeck.c (convert_ieee_real_to_integer): New function. (convert): When not using fast-math and using hardware fp, convert --- 11292,11303 ---- * zipfile.h: Prototype `read_zip_archive'. ! 1999-01-21 Andrew Haley * typeck.c (convert): Allow conversions to void type: some optimizations in gcc do this. ! 1999-01-21 Andrew Haley * typeck.c (convert_ieee_real_to_integer): New function. (convert): When not using fast-math and using hardware fp, convert *************** Thu Jan 21 15:21:49 1999 Andrew Haley *** 9832,9838 **** * parse.y (patch_binop): Do a type conversion from signed to unsigned and then back to signed when a ">>>" is found. ! Sun Jan 17 22:34:22 1999 Alexandre Petit-Bianco * java-tree.h: (check_for_initialization): Added prototype. * lex.c (java_parse_doc_section): `\n' breaks the `*/' string. --- 11308,11314 ---- * parse.y (patch_binop): Do a type conversion from signed to unsigned and then back to signed when a ">>>" is found. ! 1999-01-17 Alexandre Petit-Bianco * java-tree.h: (check_for_initialization): Added prototype. * lex.c (java_parse_doc_section): `\n' breaks the `*/' string. *************** Sun Jan 17 22:34:22 1999 Alexandre Peti *** 9843,9855 **** (qualify_ambiguous_name): Likewise. (patch_synchronized_statement): Removed unused local. ! Sun Jan 17 21:55:42 1999 Jeffrey A Law (law@cygnus.com) * Makefile.in (zextract.o): Add dependencies. * Makefile.in: Do not put ^Ls at the start of a line. ! Fri Jan 15 20:16:20 1999 Per Bothner * expr.c (process_jvm_instruction): Coerce to correct Throwable sub-type the result of the call that gets the exception value. --- 11319,11331 ---- (qualify_ambiguous_name): Likewise. (patch_synchronized_statement): Removed unused local. ! 1999-01-17 Jeffrey A Law (law@cygnus.com) * Makefile.in (zextract.o): Add dependencies. * Makefile.in: Do not put ^Ls at the start of a line. ! 1999-01-15 Per Bothner * expr.c (process_jvm_instruction): Coerce to correct Throwable sub-type the result of the call that gets the exception value. *************** Fri Jan 15 20:16:20 1999 Per Bothner < *** 9872,9882 **** with assembler temp labels. * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on ! MODIFY_EXPR. Without this, code for the assignement may not be generated at all and the synchronized statement will read an uninitialized variable. ! Wed Jan 13 01:24:54 1999 Alexandre Petit-Bianco * class.c (maybe_layout_super_class): Fixed returned value. * lex.c: Added 1999 to the copyright. --- 11348,11358 ---- with assembler temp labels. * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on ! MODIFY_EXPR. Without this, code for the assignment may not be generated at all and the synchronized statement will read an uninitialized variable. ! 1999-01-13 Alexandre Petit-Bianco * class.c (maybe_layout_super_class): Fixed returned value. * lex.c: Added 1999 to the copyright. *************** Wed Jan 13 01:24:54 1999 Alexandre Peti *** 9898,9909 **** (java_check_regular_methods): Set saved found wfl to NULL after having reinstalled it in the previously found DECL_NAME. ! Sun Jan 10 13:36:14 1999 Richard Henderson * gjavah.c (java_float_finite): Use a union to do type punning. (java_double_finite): Likewise. ! Sat Jan 9 11:25:00 1999 Per Bothner * parse.y (build_new_array_init): Don't set EXPR_WFL_LINECOL on CONSTRUCTOR (since that trashes TREE_CST_RTL). --- 11374,11385 ---- (java_check_regular_methods): Set saved found wfl to NULL after having reinstalled it in the previously found DECL_NAME. ! 1999-01-10 Richard Henderson * gjavah.c (java_float_finite): Use a union to do type punning. (java_double_finite): Likewise. ! 1999-01-09 Per Bothner * parse.y (build_new_array_init): Don't set EXPR_WFL_LINECOL on CONSTRUCTOR (since that trashes TREE_CST_RTL). *************** Sat Jan 9 11:25:00 1999 Per Bothner < *** 9912,9918 **** CONSTRUCTOR (which causes expand_expr to call output_constant_def). * expr.c (java_lang_expand_expr): Check TREE_STATIC of NEW_ARRAY_INIT. ! Fri Jan 8 15:48:03 1999 Per Bothner * check-init.c (check_init): If compiling to native, we don't see THROW_EXPR. Instead, look for a call to throw_node (_Jv_Throw). --- 11388,11394 ---- CONSTRUCTOR (which causes expand_expr to call output_constant_def). * expr.c (java_lang_expand_expr): Check TREE_STATIC of NEW_ARRAY_INIT. ! 1999-01-08 Per Bothner * check-init.c (check_init): If compiling to native, we don't see THROW_EXPR. Instead, look for a call to throw_node (_Jv_Throw). *************** Fri Jan 8 15:48:03 1999 Per Bothner < *** 9930,9936 **** * jcf-parse.c (yyparse): variable len changed from a char to an int to prevent overflow. ! Wed Jan 6 17:19:46 1999 Per Bothner * java-tree.h: Declare read_class. * jcf-parse.c (read_class): New function. --- 11406,11412 ---- * jcf-parse.c (yyparse): variable len changed from a char to an int to prevent overflow. ! 1999-01-06 Per Bothner * java-tree.h: Declare read_class. * jcf-parse.c (read_class): New function. *************** Wed Jan 6 17:19:46 1999 Per Bothner < *** 9953,9975 **** * parse.y (java_complete_expand_method): Call check_for_initialization. * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY): Moved to java-tree.h. ! Wed Jan 6 14:53:10 1999 Graham * parse.y : include system.h instead of including standard headers directly with the exception of . ! Wed Jan 6 16:20:06 1999 Per Bothner * lex.h: Moved static function declarations to lex.c, to shut up some -Wall warnings. * lex.c: Static function declarations moved here. * jcf-dump.c: Small fixes to shut up -Wall warnings. ! Tue Jan 5 22:15:40 1999 Kaveh R. Ghazi * Make-lang.in ($(GCJ).o): Depend on prefix.h. ! Tue Dec 22 11:25:19 1998 Per Bothner * expr.c (process_jvm_instruction): Do load_type_state after JSR. * verify.c (verify_jvm_instructions): Fix off-by-one error. --- 11429,11451 ---- * parse.y (java_complete_expand_method): Call check_for_initialization. * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY): Moved to java-tree.h. ! 1999-01-06 Graham * parse.y : include system.h instead of including standard headers directly with the exception of . ! 1999-01-06 Per Bothner * lex.h: Moved static function declarations to lex.c, to shut up some -Wall warnings. * lex.c: Static function declarations moved here. * jcf-dump.c: Small fixes to shut up -Wall warnings. ! 1999-01-05 Kaveh R. Ghazi * Make-lang.in ($(GCJ).o): Depend on prefix.h. ! 1998-12-22 Per Bothner * expr.c (process_jvm_instruction): Do load_type_state after JSR. * verify.c (verify_jvm_instructions): Fix off-by-one error. *************** Tue Dec 22 11:25:19 1998 Per Bothner < *** 9991,9997 **** (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR instead of TRY_EXPR. ! Sun Dec 20 16:15:44 1998 John F. Carr * Make-lang.in: Comment out control-Ls; they upset some makes. --- 11467,11473 ---- (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR instead of TRY_EXPR. ! 1998-12-20 John F. Carr * Make-lang.in: Comment out control-Ls; they upset some makes. *************** Sun Dec 20 16:15:44 1998 John F. Carr *** 10008,10018 **** * parse-scan.y (report_main_declaration): Recognize `java.lang.String' in argument to main. ! Wed Dec 16 16:18:59 1998 Per Bothner * parse.y (create_interface): Remove bogus test. ! Wed Dec 16 14:42:19 1998 Per Bothner * jcf-parse.c (get_constant): Set TREE_TYPE for string constants. (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant. --- 11484,11494 ---- * parse-scan.y (report_main_declaration): Recognize `java.lang.String' in argument to main. ! 1998-12-16 Per Bothner * parse.y (create_interface): Remove bogus test. ! 1998-12-16 Per Bothner * jcf-parse.c (get_constant): Set TREE_TYPE for string constants. (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant. *************** Wed Dec 16 14:42:19 1998 Per Bothner < *** 10026,10032 **** * gjavah.c (print_field_info): Changed how most negative number is printed. ! Mon Dec 14 18:49:29 1998 Per Bothner * parse.y (fold_constant_for_init): New function. (resolve_expression_name): Don't replace static final --- 11502,11508 ---- * gjavah.c (print_field_info): Changed how most negative number is printed. ! 1998-12-14 Per Bothner * parse.y (fold_constant_for_init): New function. (resolve_expression_name): Don't replace static final *************** Mon Dec 14 18:49:29 1998 Per Bothner < *** 10061,10067 **** (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set. (print_method_info): Handle abstract methods. ! Sun Dec 13 17:31:40 1998 Per Bothner * parse.y (patch_method_invocation): If class_decl is null (e.g. an array type), use original type. --- 11537,11543 ---- (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set. (print_method_info): Handle abstract methods. ! 1998-12-13 Per Bothner * parse.y (patch_method_invocation): If class_decl is null (e.g. an array type), use original type. *************** Sun Dec 13 17:31:40 1998 Per Bothner < *** 10088,10094 **** Include java-opcodes.h. (decompiled): New global. ! Sat Dec 12 20:13:19 1998 Per Bothner * class.c (build_class_ref): Handle PRIMTYPE.class if flag_emit_class_files. --- 11564,11570 ---- Include java-opcodes.h. (decompiled): New global. ! 1998-12-12 Per Bothner * class.c (build_class_ref): Handle PRIMTYPE.class if flag_emit_class_files. *************** Sat Dec 12 20:13:19 1998 Per Bothner < *** 10135,10141 **** * parse.y (java_complete_expand_methods): Call write_classfile here, and not in java_expand_classes (which only gets first class). ! Sat Dec 12 19:46:04 1998 Alexandre Petit-Bianco * parse.y (): Do maybe_generate_clinit last. (register_fields): If a static fields has an initializer, just --- 11611,11617 ---- * parse.y (java_complete_expand_methods): Call write_classfile here, and not in java_expand_classes (which only gets first class). ! 1998-12-12 Alexandre Petit-Bianco * parse.y (): Do maybe_generate_clinit last. (register_fields): If a static fields has an initializer, just *************** Sat Dec 12 19:46:04 1998 Alexandre Peti *** 10146,10152 **** (patch_initialized_static_field): New function. (java_complete_field): Call it. ! Sat Dec 12 19:21:11 1998 Per Bothner * expr.c (encode_newarray_type, build_new_array): New functions. * java-tree.h: Declare build_new_array. --- 11622,11628 ---- (patch_initialized_static_field): New function. (java_complete_field): Call it. ! 1998-12-12 Per Bothner * expr.c (encode_newarray_type, build_new_array): New functions. * java-tree.h: Declare build_new_array. *************** Sat Dec 12 19:21:11 1998 Per Bothner < *** 10172,10178 **** * class.c (make_class_data): Renamed dtable -> vtable, and dtable_method_count -> vtable_method_count. ! Thu Dec 10 20:00:54 1998 Alexandre Petit-Bianco * decl.c (long_zero_node, float_zero_node, double_zero_node): New global variables, initialized. --- 11648,11654 ---- * class.c (make_class_data): Renamed dtable -> vtable, and dtable_method_count -> vtable_method_count. ! 1998-12-10 Alexandre Petit-Bianco * decl.c (long_zero_node, float_zero_node, double_zero_node): New global variables, initialized. *************** Thu Dec 10 20:00:54 1998 Alexandre Peti *** 10191,10197 **** increment/decrement node into its original type after binary numeric promotion on its operands. ! Thu Dec 10 11:02:49 1998 Alexandre Petit-Bianco * parse.y (array_initializer:): Array init operand is NULL_TREE instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is --- 11667,11673 ---- increment/decrement node into its original type after binary numeric promotion on its operands. ! 1998-12-10 Alexandre Petit-Bianco * parse.y (array_initializer:): Array init operand is NULL_TREE instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is *************** Thu Dec 10 11:02:49 1998 Alexandre Peti *** 10201,10207 **** (array_constructor_check_entry): Removed check on null wfl_value. Return an error if wfl_value's walk returns an error. ! Wed Dec 9 15:37:05 1998 Alexandre Petit-Bianco * java-tree.def (NEW_ARRAY_INIT): New Java tree code. * lex.c (java_lex): Remember column position before advancing one --- 11677,11683 ---- (array_constructor_check_entry): Removed check on null wfl_value. Return an error if wfl_value's walk returns an error. ! 1998-12-09 Alexandre Petit-Bianco * java-tree.def (NEW_ARRAY_INIT): New Java tree code. * lex.c (java_lex): Remember column position before advancing one *************** Wed Dec 9 15:37:05 1998 Alexandre Peti *** 10225,10231 **** patch_new_array_init, patch_array_constructor, array_constructor_check_entry): New functions. ! Mon Dec 7 15:13:52 1998 Alexandre Petit-Bianco * parse.y (array_initializer): Tagged . (variable_initializer:): Use default rule. --- 11701,11707 ---- patch_new_array_init, patch_array_constructor, array_constructor_check_entry): New functions. ! 1998-12-07 Alexandre Petit-Bianco * parse.y (array_initializer): Tagged . (variable_initializer:): Use default rule. *************** Mon Dec 7 15:13:52 1998 Alexandre Peti *** 10240,10246 **** (patch_conditional_expr): Patch results of string concatenation operations. ! Sun Dec 6 13:45:00 1998 Per Bothner * constants.c (find_methodref_index): When the class is an interface, generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef. --- 11716,11722 ---- (patch_conditional_expr): Patch results of string concatenation operations. ! 1998-12-06 Per Bothner * constants.c (find_methodref_index): When the class is an interface, generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef. *************** Sun Dec 6 13:45:00 1998 Per Bothner < *** 10274,10284 **** * jcf-write.c (generate_classfile): Emit ConstantValue attributes. ! Sun Dec 6 13:21:18 1998 Per Bothner * jcf-dump.c (INVOKE): If invokeinterface, print number of args. ! Thu Dec 3 17:11:12 1998 Alexandre Petit-Bianco * java-tree.h (java_layout_seen_class_methods): New function prototype. --- 11750,11760 ---- * jcf-write.c (generate_classfile): Emit ConstantValue attributes. ! 1998-12-06 Per Bothner * jcf-dump.c (INVOKE): If invokeinterface, print number of args. ! 1998-12-03 Alexandre Petit-Bianco * java-tree.h (java_layout_seen_class_methods): New function prototype. *************** Thu Dec 3 17:11:12 1998 Alexandre Peti *** 10298,10313 **** (java_layout_seen_class_methods): New function. (java_layout_classes): Call java_layout_seen_class_methods. ! Thu Dec 3 15:56:50 1998 Per Bothner * parse,y (patch_synchronized_statement): Set CAN_COMPLETE_NORMALLY. ! Thu Dec 3 15:08:30 1998 Per Bothner * jcf-dump.c (main): Fix error message. * jcf-path.c (add_entry): Style fix. ! Wed Dec 2 15:52:25 1998 Alexandre Petit-Bianco * class.c (layout_class_method): Call build_java_argument_signature on constructors too. --- 11774,11789 ---- (java_layout_seen_class_methods): New function. (java_layout_classes): Call java_layout_seen_class_methods. ! 1998-12-03 Per Bothner * parse,y (patch_synchronized_statement): Set CAN_COMPLETE_NORMALLY. ! 1998-12-03 Per Bothner * jcf-dump.c (main): Fix error message. * jcf-path.c (add_entry): Style fix. ! 1998-12-02 Alexandre Petit-Bianco * class.c (layout_class_method): Call build_java_argument_signature on constructors too. *************** Wed Dec 2 15:52:25 1998 Alexandre Peti *** 10316,10322 **** expression name. Augmented comment on code checking illegal `this' usage. Loosened it test by accepting NEW_CLASS_EXPR. ! Tue Dec 1 13:53:24 1998 Alexandre Petit-Bianco * class.c (layout_class_method): Don't report error on non-static overriding static if the method is private. --- 11792,11798 ---- expression name. Augmented comment on code checking illegal `this' usage. Loosened it test by accepting NEW_CLASS_EXPR. ! 1998-12-01 Alexandre Petit-Bianco * class.c (layout_class_method): Don't report error on non-static overriding static if the method is private. *************** Tue Dec 1 13:53:24 1998 Alexandre Peti *** 10340,10346 **** (+tmake_file): Likewise. (.NOEXPORT): Removed duplicate. ! Fri Nov 27 13:20:51 1998 Kaveh R. Ghazi * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK). --- 11816,11822 ---- (+tmake_file): Likewise. (.NOEXPORT): Removed duplicate. ! 1998-11-27 Kaveh R. Ghazi * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK). *************** Fri Nov 27 13:20:51 1998 Kaveh R. Ghazi *** 10355,10366 **** OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup. Provide an xstrdup definition. ! Thu Nov 26 22:03:58 1998 Alexandre Oliva * jcf-path.c (add_entry): Recognize ".jar" too. * lang-specs.h: Likewise. ! Thu Nov 26 12:44:07 1998 Per Bothner * jcf-write.c (generate_bytecode_insns): In Call_EXPR, handle soft_monitorenter_node, soft_monitorexit_node, throw_node. --- 11831,11842 ---- OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup. Provide an xstrdup definition. ! 1998-11-26 Alexandre Oliva * jcf-path.c (add_entry): Recognize ".jar" too. * lang-specs.h: Likewise. ! 1998-11-26 Per Bothner * jcf-write.c (generate_bytecode_insns): In Call_EXPR, handle soft_monitorenter_node, soft_monitorexit_node, throw_node. *************** Thu Nov 26 12:44:07 1998 Per Bothner < *** 10371,10377 **** * jcf-write.c (generate_bytecode_insns): Handle missing exception handler (finally for synchronized). ! Wed Nov 25 09:47:15 1998 Per Bothner * java-tree.h (end_params_node): Declare global. * decl.c (end_params_node): New global. --- 11847,11853 ---- * jcf-write.c (generate_bytecode_insns): Handle missing exception handler (finally for synchronized). ! 1998-11-25 Per Bothner * java-tree.h (end_params_node): Declare global. * decl.c (end_params_node): New global. *************** Wed Nov 25 09:47:15 1998 Per Bothner < *** 10403,10418 **** * expr.c (CHECK_PC_IN_RANGE): Add void cast to kill warnings. ! Wed Nov 25 00:50:58 1998 Marc Espie * jcf-write.c (generate_bytecode_conditional): Fix typo. ! Tue Nov 24 17:06:38 1998 Per Bothner * (generate_classfile): Always write class access flag with ACC_SUPER set. ! Tue Nov 24 16:34:33 1998 Alexandre Petit-Bianco * class.c (maybe_layout_super_class): New function. (layout_class): Reorganized. Loop on class methods dispatched into --- 11879,11894 ---- * expr.c (CHECK_PC_IN_RANGE): Add void cast to kill warnings. ! 1998-11-25 Marc Espie * jcf-write.c (generate_bytecode_conditional): Fix typo. ! 1998-11-24 Per Bothner * (generate_classfile): Always write class access flag with ACC_SUPER set. ! 1998-11-24 Alexandre Petit-Bianco * class.c (maybe_layout_super_class): New function. (layout_class): Reorganized. Loop on class methods dispatched into *************** Tue Nov 24 16:34:33 1998 Alexandre Peti *** 10476,10482 **** (patch_method_invocation): Class to search is resolved and laid out. ! Tue Nov 24 12:57:13 1998 Per Bothner * expr.c (java_lang_expand_expr): Add missing emit_queue. --- 11952,11958 ---- (patch_method_invocation): Class to search is resolved and laid out. ! 1998-11-24 Per Bothner * expr.c (java_lang_expand_expr): Add missing emit_queue. *************** Tue Nov 24 12:57:13 1998 Per Bothner < *** 10492,10498 **** * parse.y (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them). ! Thu Nov 19 11:16:55 1998 Alexandre Petit-Bianco * jcf-parse.c (jcf_parse_source): Function returned type is void. Added prototype. --- 11968,11974 ---- * parse.y (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them). ! 1998-11-19 Alexandre Petit-Bianco * jcf-parse.c (jcf_parse_source): Function returned type is void. Added prototype. *************** Thu Nov 19 11:16:55 1998 Alexandre Peti *** 10501,10507 **** * java-tree.h (jcf_parse): Changed jcf_parse prototype. ! Wed Nov 18 23:54:53 1998 Alexandre Petit-Bianco * class.c (unmangle_classname): Set QUALIFIED_P when appropriate. (layout_class): Cope with methods featuring WFL in decl names. --- 11977,11983 ---- * java-tree.h (jcf_parse): Changed jcf_parse prototype. ! 1998-11-18 Alexandre Petit-Bianco * class.c (unmangle_classname): Set QUALIFIED_P when appropriate. (layout_class): Cope with methods featuring WFL in decl names. *************** Wed Nov 18 23:54:53 1998 Alexandre Peti *** 10618,10640 **** (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead of IS_UNCHECKED_EXPRESSION_P. ! Wed Nov 18 14:21:48 1998 Anthony Green * jcf-parse.c (yyparse): Open class file in binary mode. ! Sun Nov 15 17:14:17 1998 Per Bothner * jvgenmain.c: Need to #include "gansidecl.h" (to get PROTO). * jcf-write.c (perform_relocations): Move check out one loop. ! Sun Nov 15 15:09:56 1998 Anthony Green * Make-lang.in: Fix reference to srcdir. * jv-scan.c: Add missing xmalloc prototype. * jvgenmain.c: Ditto. ! Sun Nov 15 14:36:29 1998 Per Bothner * decl.c (error_mark_node), java-tree.h: New global. * parse.y: Use empty_stmt_node instead of size_zero_node. --- 12094,12116 ---- (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead of IS_UNCHECKED_EXPRESSION_P. ! 1998-11-18 Anthony Green * jcf-parse.c (yyparse): Open class file in binary mode. ! 1998-11-15 Per Bothner * jvgenmain.c: Need to #include "gansidecl.h" (to get PROTO). * jcf-write.c (perform_relocations): Move check out one loop. ! 1998-11-15 Anthony Green * Make-lang.in: Fix reference to srcdir. * jv-scan.c: Add missing xmalloc prototype. * jvgenmain.c: Ditto. ! 1998-11-15 Per Bothner * decl.c (error_mark_node), java-tree.h: New global. * parse.y: Use empty_stmt_node instead of size_zero_node. *************** Sun Nov 15 14:36:29 1998 Per Bothner < *** 10658,10664 **** (- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH. (generate_classfile): More robust for abstract methods. ! Sun Nov 15 13:52:39 1998 Anthony Green * Makefile.in: jv-scan and jvgenmain all require libiberty. * Make-lang.in: Ditto. --- 12134,12140 ---- (- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH. (generate_classfile): More robust for abstract methods. ! 1998-11-15 Anthony Green * Makefile.in: jv-scan and jvgenmain all require libiberty. * Make-lang.in: Ditto. *************** Sun Nov 15 13:52:39 1998 Anthony Green *** 10666,10678 **** * jv-scan.c: Remove xmalloc and xstrdup definitions. * jvgenmain: Ditto. ! Sun Nov 15 14:10:56 1998 Per Bothner * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro. * jcf-io.c (find_class): Simpler/cleaner structure fixes a bug. ! Sat Nov 14 17:19:18 1998 Per Bothner Allow uses of interface types to verify. This is not really type-safe, but it matches what Sun does, and is OK as long as --- 12142,12154 ---- * jv-scan.c: Remove xmalloc and xstrdup definitions. * jvgenmain: Ditto. ! 1998-11-15 Per Bothner * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro. * jcf-io.c (find_class): Simpler/cleaner structure fixes a bug. ! 1998-11-14 Per Bothner Allow uses of interface types to verify. This is not really type-safe, but it matches what Sun does, and is OK as long as *************** Sat Nov 14 17:19:18 1998 Per Bothner < *** 10700,10706 **** * Makefile.in (prefix): New macro. ! Thu Nov 12 14:15:07 1998 Per Bothner * parse.y (patch_invoke): Do less if flag_emit_class_files. * expr.c (build_known_method_ref): Don't check flag_emit_class_files --- 12176,12182 ---- * Makefile.in (prefix): New macro. ! 1998-11-12 Per Bothner * parse.y (patch_invoke): Do less if flag_emit_class_files. * expr.c (build_known_method_ref): Don't check flag_emit_class_files *************** Thu Nov 12 14:15:07 1998 Per Bothner < *** 10772,10778 **** if required. * Make-lang.in (jvspec.o): Define WITH_GC_. ! Wed Nov 11 19:08:52 1998 Per Bothner * jcf-dump.c (TABLE_SWITCH): Fix typos. --- 12248,12254 ---- if required. * Make-lang.in (jvspec.o): Define WITH_GC_. ! 1998-11-11 Per Bothner * jcf-dump.c (TABLE_SWITCH): Fix typos. *************** Wed Nov 11 19:08:52 1998 Per Bothner < *** 10780,10786 **** * jcf-dump.c (main): Correctly recognize `--'-style long options. ! Tue Nov 10 12:34:03 1998 Alexandre Petit-Bianco * class.c (is_compiled_class): Call safe_layout_class for class compiled from source. --- 12256,12262 ---- * jcf-dump.c (main): Correctly recognize `--'-style long options. ! 1998-11-10 Alexandre Petit-Bianco * class.c (is_compiled_class): Call safe_layout_class for class compiled from source. *************** Tue Nov 10 12:34:03 1998 Alexandre Peti *** 10962,10968 **** `state' field to 0. * decl.c (init_decl_processing): Likewise. ! Wed Oct 28 08:03:31 1998 Alexandre Petit-Bianco * class.c (layout_class): Don't mangle , produce __finit instead. Don't verify artificial methods. --- 12438,12444 ---- `state' field to 0. * decl.c (init_decl_processing): Likewise. ! 1998-10-28 Alexandre Petit-Bianco * class.c (layout_class): Don't mangle , produce __finit instead. Don't verify artificial methods. *************** Wed Oct 28 08:03:31 1998 Alexandre Peti *** 11105,11111 **** (patch_conditional_expr): New function. * typeck.c (build_java_signature): Removed unnecessary empty line. ! Wed Oct 28 00:46:15 1998 Jeffrey A Law (law@cygnus.com) * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too. --- 12581,12587 ---- (patch_conditional_expr): New function. * typeck.c (build_java_signature): Removed unnecessary empty line. ! 1998-10-28 Jeffrey A Law (law@cygnus.com) * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too. *************** Wed Oct 28 00:46:15 1998 Jeffrey A Law *** 11120,11136 **** * decl.c (init_decl_processing): Removed subclass_head and subclass_next fields. ! Wed Oct 28 00:46:15 1998 Jeffrey A Law (law@cygnus.com) * jcf-write.c (emit_load_or_store): Avoid implicit int arguments. * mangle.c (emit_unicode_mangled_name): Similarly. ! Mon Oct 26 12:17:23 1998 Nick Clifton * jcf-parse.c (get_constant): Place braces around code to compute 'd' when REAL_ARITHMETIC is not defined. ! Sun Oct 25 14:58:05 1998 H.J. Lu (hjl@gnu.org) * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to dependency. --- 12596,12612 ---- * decl.c (init_decl_processing): Removed subclass_head and subclass_next fields. ! 1998-10-28 Jeffrey A Law (law@cygnus.com) * jcf-write.c (emit_load_or_store): Avoid implicit int arguments. * mangle.c (emit_unicode_mangled_name): Similarly. ! 1998-10-26 Nick Clifton * jcf-parse.c (get_constant): Place braces around code to compute 'd' when REAL_ARITHMETIC is not defined. ! 1998-10-25 H.J. Lu (hjl@gnu.org) * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to dependency. *************** Sun Oct 25 14:58:05 1998 H.J. Lu (hjl@ *** 11139,11145 **** * lang-specs.h: `.zip' files are input to jc1. ! Thu Oct 22 23:01:54 1998 Per Bothner * jvspecs.c: Add (but don't enable) support for combining multiple .class and .java input filenames to a single jc1 invocation. --- 12615,12621 ---- * lang-specs.h: `.zip' files are input to jc1. ! 1998-10-22 Per Bothner * jvspecs.c: Add (but don't enable) support for combining multiple .class and .java input filenames to a single jc1 invocation. *************** Thu Oct 22 23:01:54 1998 Per Bothner < *** 11165,11171 **** * config-lang.in (stagestuff): Added jcf-dump and jv-scan. ! Sun Oct 11 10:31:52 1998 Anthony Green * Make-lang.in (java): Depend on jcf-dump and jv-scan. (JV_SCAN_SOURCES): New macro. --- 12641,12647 ---- * config-lang.in (stagestuff): Added jcf-dump and jv-scan. ! 1998-10-11 Anthony Green * Make-lang.in (java): Depend on jcf-dump and jv-scan. (JV_SCAN_SOURCES): New macro. *************** Sun Oct 11 10:31:52 1998 Anthony Green *** 11235,11241 **** * lang.c (OBJECT_SUFFIX): Define if not already defined. (init_parse): Use OBJECT_SUFFIX, not ".o". ! Wed Oct 21 07:54:11 1998 Alexandre Petit-Bianco * class.c (emit_register_classes): Renamed from emit_register_class. --- 12711,12717 ---- * lang.c (OBJECT_SUFFIX): Define if not already defined. (init_parse): Use OBJECT_SUFFIX, not ".o". ! 1998-10-21 Alexandre Petit-Bianco * class.c (emit_register_classes): Renamed from emit_register_class. *************** Wed Oct 21 07:54:11 1998 Alexandre Peti *** 11245,11251 **** returning. * parse.y (java_expand_classes): No longer register classes. ! Tue Oct 20 09:15:38 1998 Alexandre Petit-Bianco * class.c (is_compiled_class): New local variable seen_in_zip. Identify classes found in currently compiled source --- 12721,12727 ---- returning. * parse.y (java_expand_classes): No longer register classes. ! 1998-10-20 Alexandre Petit-Bianco * class.c (is_compiled_class): New local variable seen_in_zip. Identify classes found in currently compiled source *************** Tue Oct 20 09:15:38 1998 Alexandre Peti *** 11273,11283 **** (java_complete_expand_methods): Fixed indentation. (java_expand_classes): New function. ! Sat Oct 17 11:25:21 1998 Per Bothner * Makefile.in: Link with libiberty.a instead of memmove.o. ! Fri Oct 16 10:59:01 1998 Alexandre Petit-Bianco * lex.c (setjmp.h): No longer included. * lex.h (setjmp.h): Included. --- 12749,12759 ---- (java_complete_expand_methods): Fixed indentation. (java_expand_classes): New function. ! 1998-10-17 Per Bothner * Makefile.in: Link with libiberty.a instead of memmove.o. ! 1998-10-16 Alexandre Petit-Bianco * lex.c (setjmp.h): No longer included. * lex.h (setjmp.h): Included. *************** Fri Oct 16 10:59:01 1998 Alexandre Peti *** 11306,11312 **** (qualify_ambiguous_name): Sweep through all successive array dimensions. ! Wed Oct 14 18:21:29 1998 Alexandre Petit-Bianco * java-tree.h (pop_labeled_block, lang_printable_name, maybe_add_interface, set_super_info, get_access_flags_from_decl, --- 12782,12788 ---- (qualify_ambiguous_name): Sweep through all successive array dimensions. ! 1998-10-14 Alexandre Petit-Bianco * java-tree.h (pop_labeled_block, lang_printable_name, maybe_add_interface, set_super_info, get_access_flags_from_decl, *************** Wed Oct 14 18:21:29 1998 Alexandre Peti *** 11453,11459 **** (HANDLE_METHOD): Likewise. * jcf-depend.c: New file. ! Tue Oct 13 23:34:12 1998 Jeffrey A Law (law@cygnus.com) * java-tree.def: Add missing newline at EOF. --- 12929,12935 ---- (HANDLE_METHOD): Likewise. * jcf-depend.c: New file. ! 1998-10-13 Jeffrey A Law (law@cygnus.com) * java-tree.def: Add missing newline at EOF. *************** Tue Oct 13 23:34:12 1998 Jeffrey A Law *** 11466,11472 **** (disassemble_method): Undefine RET to avoid clash with config/i386/i386.h. ! Tue Oct 13 03:50:28 1998 Alexandre Petit-Bianco * decl.c (runtime_exception_type_node, error_exception_type_node): New global variables. --- 12942,12948 ---- (disassemble_method): Undefine RET to avoid clash with config/i386/i386.h. ! 1998-10-13 Alexandre Petit-Bianco * decl.c (runtime_exception_type_node, error_exception_type_node): New global variables. *************** Tue Oct 13 03:50:28 1998 Alexandre Peti *** 11560,11575 **** (field_pass): New global. (HANDLE_END_FIELD): Take field_pass into account. ! Wed Oct 7 12:10:48 1998 Kaveh R. Ghazi * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf. (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs). ! Sat Oct 3 13:29:46 1998 Anthony Green * jvspec.c: Fix bug in jvgenmain_spec patch. ! Fri Oct 2 17:22:52 1998 Alexandre Petit-Bianco * Makefile.in (lang.o:): Install dependency on java-tree.def. * decl.c (soft_exceptioninfo_call_node): New global variable. --- 13036,13051 ---- (field_pass): New global. (HANDLE_END_FIELD): Take field_pass into account. ! 1998-10-07 Kaveh R. Ghazi * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf. (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs). ! 1998-10-03 Anthony Green * jvspec.c: Fix bug in jvgenmain_spec patch. ! 1998-10-02 Alexandre Petit-Bianco * Makefile.in (lang.o:): Install dependency on java-tree.def. * decl.c (soft_exceptioninfo_call_node): New global variable. *************** Fri Oct 2 17:22:52 1998 Alexandre Peti *** 11666,11681 **** patch_try_statement): New functions. * typeck.c (match_java_method): Function deleted. ! Fri Oct 2 13:48:36 1998 Anthony Green * jvspec.c: jvgenmain_spec uses different temporary file names. ! Fri Oct 2 12:50:19 1998 Anthony Green * jvspec.c (lang_specific_driver): Fail if user specifies --main= when not linking. ! Mon Sep 28 13:48:33 1998 Tom Tromey * class.c (make_class_data): Push value for `thread' field. * decl.c (init_decl_processing): Added `thread' field to class. --- 13142,13157 ---- patch_try_statement): New functions. * typeck.c (match_java_method): Function deleted. ! 1998-10-02 Anthony Green * jvspec.c: jvgenmain_spec uses different temporary file names. ! 1998-10-02 Anthony Green * jvspec.c (lang_specific_driver): Fail if user specifies --main= when not linking. ! 1998-09-28 Tom Tromey * class.c (make_class_data): Push value for `thread' field. * decl.c (init_decl_processing): Added `thread' field to class. *************** Mon Sep 28 13:48:33 1998 Tom Tromey * expr.c (build_java_athrow, build_java_throw_out_of_bounds_exception, expand_invoke, build_newarray, expand_java_multianewarray, build_java_monitor): Update comments to reflect _Jv_* function names. ! Fri Sep 25 16:03:02 1998 Per Bothner * decl.c (complete_start_java_method): DECL_RESULT is always promoted. * decl.c (start_java_method): Handle PROMOTE_PROTOTYPES target macro. * parse.y (expand_start_java_method): Likewise. ! Thu Sep 24 12:20:35 1998 Per Bothner * expr.c (pop_arguments): Handle PROMOTE_PROTOTYPES target macro. --- 13159,13178 ---- * class.c (add_field): Always make static fields externally visible. ! 1998-09-26 Anthony Green * expr.c (build_java_athrow, build_java_throw_out_of_bounds_exception, expand_invoke, build_newarray, expand_java_multianewarray, build_java_monitor): Update comments to reflect _Jv_* function names. ! 1998-09-25 Per Bothner * decl.c (complete_start_java_method): DECL_RESULT is always promoted. * decl.c (start_java_method): Handle PROMOTE_PROTOTYPES target macro. * parse.y (expand_start_java_method): Likewise. ! 1998-09-24 Per Bothner * expr.c (pop_arguments): Handle PROMOTE_PROTOTYPES target macro. *************** Thu Sep 24 12:20:35 1998 Per Bothner < *** 11712,11723 **** * lex.c (java_lex): Fix (from Alex) for JC1_LITE problem. ! Wed Sep 23 14:49:35 1998 Tom Tromey * class.c (init_class_processing): libjava function renamed to _Jv_RegisterClass. ! Tue Sep 22 12:00:02 1998 Alexandre Petit-Bianco * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR. * java-tree.def: Fixed DEFTREECODE third argument. --- 13188,13199 ---- * lex.c (java_lex): Fix (from Alex) for JC1_LITE problem. ! 1998-09-23 Tom Tromey * class.c (init_class_processing): libjava function renamed to _Jv_RegisterClass. ! 1998-09-22 Alexandre Petit-Bianco * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR. * java-tree.def: Fixed DEFTREECODE third argument. *************** Tue Sep 22 12:00:02 1998 Alexandre Peti *** 11799,11805 **** (patch_switch_statement, case_identity, java_expand_switch): New functions. ! Mon Sep 21 13:21:35 1998 Per Bothner * buffer.h (BUFFER_INIT): New macro. * jcf-write.c (struct jcf_partial): New type. Put global stuff here. --- 13275,13281 ---- (patch_switch_statement, case_identity, java_expand_switch): New functions. ! 1998-09-21 Per Bothner * buffer.h (BUFFER_INIT): New macro. * jcf-write.c (struct jcf_partial): New type. Put global stuff here. *************** Mon Sep 21 13:21:35 1998 Per Bothner < *** 11807,11817 **** (jcf_block, jcf_relocation): New types. Support labels, branches, conditionals, loops. ! Mon Sep 21 15:08:48 1998 Tom Tromey * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined. ! Mon Sep 21 13:21:35 1998 Per Bothner * decl.c (integer_type_node): Make it have INT_TYPE_SIZE. * verify.c (verify_jvm_instructions): Use int_type_not (32 bits), --- 13283,13293 ---- (jcf_block, jcf_relocation): New types. Support labels, branches, conditionals, loops. ! 1998-09-21 Tom Tromey * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined. ! 1998-09-21 Per Bothner * decl.c (integer_type_node): Make it have INT_TYPE_SIZE. * verify.c (verify_jvm_instructions): Use int_type_not (32 bits), *************** Mon Sep 21 13:21:35 1998 Per Bothner < *** 11824,11853 **** (disassemble_method): Better handling of wide instructions. Make more robust for bad input. ! Wed Sep 30 20:53:51 1998 Jeffrey A Law (law@cygnus.com) * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on FreeBSD. ! Thu Sep 17 19:45:01 1998 Jeffrey A Law (law@cygnus.com) * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too. ! Thu Sep 17 16:21:52 1998 Tom Tromey * Makefile.in ($(PARSE_H)): Removed target. ! Thu Sep 17 01:57:07 1998 Jeffrey A Law (law@cygnus.com) * Makefile.in (JAVA_OBJS): Add memmove.o (memmove.o): New target & rules. ! Tue Sep 15 23:21:55 1998 Tom Tromey * expr.c (expand_invoke): Don't generate a call to the class init code. ! Mon Sep 14 10:14:47 1998 Jeffrey A Law (law@cygnus.com) * Makefile.in: Add many missing dependencies. * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h --- 13300,13329 ---- (disassemble_method): Better handling of wide instructions. Make more robust for bad input. ! 1998-09-30 Jeffrey A Law (law@cygnus.com) * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on FreeBSD. ! 1998-09-17 Jeffrey A Law (law@cygnus.com) * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too. ! 1998-09-17 Tom Tromey * Makefile.in ($(PARSE_H)): Removed target. ! 1998-09-17 Jeffrey A Law (law@cygnus.com) * Makefile.in (JAVA_OBJS): Add memmove.o (memmove.o): New target & rules. ! 1998-09-15 Tom Tromey * expr.c (expand_invoke): Don't generate a call to the class init code. ! 1998-09-14 Jeffrey A Law (law@cygnus.com) * Makefile.in: Add many missing dependencies. * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h *************** Mon Sep 14 10:14:47 1998 Jeffrey A Law *** 11855,11861 **** * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise. * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise. ! Fri Sep 11 14:05:21 1998 Per Bothner * decl.c (complete_start_java_method): If method is static (and not private) call _Jv_InitClass. --- 13331,13337 ---- * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise. * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise. ! 1998-09-11 Per Bothner * decl.c (complete_start_java_method): If method is static (and not private) call _Jv_InitClass. *************** Fri Sep 11 14:05:21 1998 Per Bothner < *** 11863,11893 **** * jvspec.c (jvgenmain_spec): Fix spec for generated .o file. ! Thu Sep 10 10:33:31 1998 Jeffrey A Law (law@cygnus.com) * Make-lang.in (GCJ): Define before using. ! Wed Sep 9 21:23:10 1998 Jeffrey A Law (law@cygnus.com) * gjavah.c (java_no_argument): Renamed from no_argument to avoid losing due to namespace pollution in GNU getopt.h ! Wed Sep 9 13:33:39 1998 Tom Tromey * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh. (java.all.cross): Likewise. (java.rest.encap): Likewise. ! Tue Sep 8 10:34:05 1998 Jeffrey A Law (law@cygnus.com) * gjavah.c (print_class_decls): Fix thinko in arglist * jcv-io.c (find_classfile): Similarly. ! Mon Sep 7 13:59:49 1998 Jeffrey A Law (law@cygnus.com) * Makefile.in (INCLUDES): Update for recent toplevel gcc changes. ! Sat Sep 5 16:08:01 1998 Tom Tromey * Make-lang.in (java.maintainer-clean): Don't remove parse.h. (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h. --- 13339,13369 ---- * jvspec.c (jvgenmain_spec): Fix spec for generated .o file. ! 1998-09-10 Jeffrey A Law (law@cygnus.com) * Make-lang.in (GCJ): Define before using. ! 1998-09-09 Jeffrey A Law (law@cygnus.com) * gjavah.c (java_no_argument): Renamed from no_argument to avoid losing due to namespace pollution in GNU getopt.h ! 1998-09-09 Tom Tromey * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh. (java.all.cross): Likewise. (java.rest.encap): Likewise. ! 1998-09-08 Jeffrey A Law (law@cygnus.com) * gjavah.c (print_class_decls): Fix thinko in arglist * jcv-io.c (find_classfile): Similarly. ! 1998-09-07 Jeffrey A Law (law@cygnus.com) * Makefile.in (INCLUDES): Update for recent toplevel gcc changes. ! 1998-09-05 Tom Tromey * Make-lang.in (java.maintainer-clean): Don't remove parse.h. (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h. *************** Sat Sep 5 16:08:01 1998 Tom Tromey * README, license.terms: Removed. --- 13375,13381 ---- (clean): Remove parse-scan.c as well. (parse.o): Depend on $(PARSE_C). ! 1998-09-05 Anthony Green * README, license.terms: Removed. *************** Sat Sep 5 08:48:40 1998 Anthony Green *** 11912,11929 **** verify.c, zextract.c, zipfile.h: Fixed copyright assignment, and Java trademark attribution. ! Fri Sep 4 10:42:05 1998 Tom Tromey * Makefile.in: Use gcjh, not gjavah. * config-lang.in (stagestuff): Use gcjh, not gjavah. * Make-lang.in: Changed gjavah to gcjh everywhere. ! Thu Sep 3 18:04:09 1998 Per Bothner * gjavah.c: Support new -prepend -add -append flags. (print_method_info): Method is not virtual if class is final. ! Thu Sep 3 12:03:53 1998 Alexandre Petit-Bianco * jv-scan.c: Fixed copyright assignment. * keyword.gperf: Likewise. --- 13388,13405 ---- verify.c, zextract.c, zipfile.h: Fixed copyright assignment, and Java trademark attribution. ! 1998-09-04 Tom Tromey * Makefile.in: Use gcjh, not gjavah. * config-lang.in (stagestuff): Use gcjh, not gjavah. * Make-lang.in: Changed gjavah to gcjh everywhere. ! 1998-09-03 Per Bothner * gjavah.c: Support new -prepend -add -append flags. (print_method_info): Method is not virtual if class is final. ! 1998-09-03 Alexandre Petit-Bianco * jv-scan.c: Fixed copyright assignment. * keyword.gperf: Likewise. *************** Thu Sep 3 12:03:53 1998 Alexandre Peti *** 11948,11954 **** (complete_loop_body): New function. (patch_exit_expr): Fixed condition inversion. ! Wed Sep 2 11:53:58 1998 Tom Tromey * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct name of thread define. --- 13424,13430 ---- (complete_loop_body): New function. (patch_exit_expr): Fixed condition inversion. ! 1998-09-02 Tom Tromey * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct name of thread define. *************** Wed Sep 2 11:53:58 1998 Tom Tromey * parse-scan.y (report_main_declaration): Name of the class containing `main' can be a qualified name. ! Mon Aug 31 13:25:58 1998 Tom Tromey * config-lang.in: Changed gjavac to gjc everywhere. * Make-lang.in: Changed gjavac to gjc everywhere. ! Thu Aug 27 02:28:27 1998 Alexandre Petit-Bianco * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable. (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS --- 13435,13451 ---- library or gc library. Recognize -ljava on command line so it isn't linked against more than once. ! 1998-09-02 Alexandre Petit-Bianco * parse-scan.y (report_main_declaration): Name of the class containing `main' can be a qualified name. ! 1998-08-31 Tom Tromey * config-lang.in: Changed gjavac to gjc everywhere. * Make-lang.in: Changed gjavac to gjc everywhere. ! 1998-08-27 Alexandre Petit-Bianco * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable. (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS *************** Thu Aug 27 02:28:27 1998 Alexandre Peti *** 12023,12029 **** * parse-scan.y: New file. * jv-scan.c: New file. ! Tue Aug 25 10:17:54 1998 Tom Tromey * gjavah.c (main): Handle -friend option. (friend_specs): New global. --- 13499,13505 ---- * parse-scan.y: New file. * jv-scan.c: New file. ! 1998-08-25 Tom Tromey * gjavah.c (main): Handle -friend option. (friend_specs): New global. *************** Tue Aug 25 10:17:54 1998 Tom Tromey * jcf-dump.c (process_class): Move JCF_FINISH use to main, (main): Handle processing all the entries of a named .zip archive. * jcf-io.c (jcf_trim_old_input): New function. * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le): New macros. ! Mon Aug 24 07:35:13 1998 Per Bothner * lang.c (flag_assume_compiled): Make default be on. ! Fri Aug 21 17:29:04 1998 Per Bothner * jcf-dump.c: Add bunches of flags to control output more. (process_class): New function; support printing more than one class. --- 13510,13527 ---- (print_cxx_classname): Added `prefix' argument. Ignore arrays. Changed all callers. ! 1998-08-24 Per Bothner * jcf-dump.c (process_class): Move JCF_FINISH use to main, (main): Handle processing all the entries of a named .zip archive. * jcf-io.c (jcf_trim_old_input): New function. * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le): New macros. ! 1998-08-24 Per Bothner * lang.c (flag_assume_compiled): Make default be on. ! 1998-08-21 Per Bothner * jcf-dump.c: Add bunches of flags to control output more. (process_class): New function; support printing more than one class. *************** Fri Aug 21 17:29:04 1998 Per Bothner < *** 12053,12073 **** * jcf-reader.c (IGNORE_ATTRIBUTE): New hook. * jcf.h (CPOOL_INDEX_IN_RANGE): New macro. ! Thu Aug 20 14:24:47 1998 Per Bothner Change mangling of dispatch table to match C++ vtable (w/thunks). * class.c (build_dtable_decl), java-tree.h: New function. (make_class_data): Call it. * decl.c (init_decl_processing): Likewise. ! Wed Aug 19 17:57:07 1998 Warren Levy * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not soft_anewarray; adjust args passed. * expr.c (build_anewarray): Adjust args for soft_anewarray_node to match _Jv_NewObjectArray. ! Wed Aug 19 09:33:23 1998 Alexandre Petit-Bianco * decl.c (push_labeled_block, pop_labeled_block): New functions. * expr.c (loopup_label): Call create_label_decl. --- 13529,13549 ---- * jcf-reader.c (IGNORE_ATTRIBUTE): New hook. * jcf.h (CPOOL_INDEX_IN_RANGE): New macro. ! 1998-08-20 Per Bothner Change mangling of dispatch table to match C++ vtable (w/thunks). * class.c (build_dtable_decl), java-tree.h: New function. (make_class_data): Call it. * decl.c (init_decl_processing): Likewise. ! 1998-08-19 Warren Levy * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not soft_anewarray; adjust args passed. * expr.c (build_anewarray): Adjust args for soft_anewarray_node to match _Jv_NewObjectArray. ! 1998-08-19 Alexandre Petit-Bianco * decl.c (push_labeled_block, pop_labeled_block): New functions. * expr.c (loopup_label): Call create_label_decl. *************** Wed Aug 19 09:33:23 1998 Alexandre Peti *** 12144,12160 **** * typeck.c (build_java_signature): Build argument signature before enclosing it in between parenthesis. ! Mon Aug 17 17:44:24 1998 Warren Levy * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in (JAVA_OBJS): Added reminder comment ! Thu Aug 13 10:01:45 1998 Nick Clifton * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to be interpreted as a long long. ! Thu Aug 13 14:34:07 1998 Warren Levy * decl.c (init_decl_processing): Use _Jv_InitClass, not soft_initialise_class. Use _Jv_NewMultiArray, not --- 13620,13636 ---- * typeck.c (build_java_signature): Build argument signature before enclosing it in between parenthesis. ! 1998-08-17 Warren Levy * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in (JAVA_OBJS): Added reminder comment ! 1998-08-13 Nick Clifton * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to be interpreted as a long long. ! 1998-08-13 Warren Levy * decl.c (init_decl_processing): Use _Jv_InitClass, not soft_initialise_class. Use _Jv_NewMultiArray, not *************** Thu Aug 13 14:34:07 1998 Warren Levy < *** 12163,12169 **** _Jv_CheckArrayStore, not soft_checkarraystore. Use _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod. ! Wed Aug 12 14:23:13 1998 Per Bothner * decl.c, java-tree.h (this_identifier_node, super_identifier_node, length_identifier_node): New global tree node constants. --- 13639,13645 ---- _Jv_CheckArrayStore, not soft_checkarraystore. Use _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod. ! 1998-08-12 Per Bothner * decl.c, java-tree.h (this_identifier_node, super_identifier_node, length_identifier_node): New global tree node constants. *************** Wed Aug 12 14:23:13 1998 Per Bothner < *** 12177,12183 **** * jcf-write.c (generate_bytecode_insns): Handle ARRAY_REF opcode and ARRAY.length. ! Tue Aug 11 11:31:55 1998 Per Bothner * decl.c (init_decl_processing): Remove unused method_type_node fields. * class.c (make_method_value): Remove init for removed fields. --- 13653,13659 ---- * jcf-write.c (generate_bytecode_insns): Handle ARRAY_REF opcode and ARRAY.length. ! 1998-08-11 Per Bothner * decl.c (init_decl_processing): Remove unused method_type_node fields. * class.c (make_method_value): Remove init for removed fields. *************** Tue Aug 11 11:31:55 1998 Per Bothner < *** 12198,12204 **** * jcf-write.c (generate_bytecode_insns): Handle RETURN_EXPR, MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR. ! Mon Aug 10 09:57:15 1998 Tom Tromey * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or c-pragma.o. --- 13674,13680 ---- * jcf-write.c (generate_bytecode_insns): Handle RETURN_EXPR, MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR. ! 1998-08-10 Tom Tromey * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or c-pragma.o. *************** Mon Aug 10 09:57:15 1998 Tom Tromey * class.c (get_dispatch_table): Add extra dummy vtable entry, for compatibility for G++ (with -fvtable-thunks). --- 13685,13691 ---- (last_access_generated): Removed. (process_file): Only make a single pass over the .class file. ! 1998-07-29 Per Bothner * class.c (get_dispatch_table): Add extra dummy vtable entry, for compatibility for G++ (with -fvtable-thunks). *************** Wed Jul 29 17:50:23 1998 Per Bothner < *** 12217,12223 **** * gjavah.c (process_file): Use public inheritance for super-class. ! Wed Jul 29 13:19:03 1998 Alexandre Petit-Bianco * lex.c (java_init_lex): Initialize ctxp->package. * parse.h (struct parser_ctxt): package and package_len replaced --- 13693,13699 ---- * gjavah.c (process_file): Use public inheritance for super-class. ! 1998-07-29 Alexandre Petit-Bianco * lex.c (java_init_lex): Initialize ctxp->package. * parse.h (struct parser_ctxt): package and package_len replaced *************** Wed Jul 29 13:19:03 1998 Alexandre Peti *** 12265,12275 **** (java_complete_class): Sanity check on stabilize_ref gone. * zextract.c (read_zip_archive): Cast lseek second argument to long. ! Tue Jul 28 21:39:22 1998 Per Bothner * class.c (hashUtf8String): Fix - use new JavaSoft specification. ! Fri Jul 24 10:43:25 1998 Tom Tromey * gjavah.c (F_NAN): Removed. (F_NAN_MASK): New macro. --- 13741,13751 ---- (java_complete_class): Sanity check on stabilize_ref gone. * zextract.c (read_zip_archive): Cast lseek second argument to long. ! 1998-07-28 Per Bothner * class.c (hashUtf8String): Fix - use new JavaSoft specification. ! 1998-07-24 Tom Tromey * gjavah.c (F_NAN): Removed. (F_NAN_MASK): New macro. *************** Fri Jul 24 10:43:25 1998 Tom Tromey * buffer.h, buffer.c: New files. * Makefile.in (JAVA_OBJS): Add buffer.o. --- 13760,13766 ---- * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float] If verbose, print underlying representation of value in hex. ! 1998-07-24 Per Bothner * buffer.h, buffer.c: New files. * Makefile.in (JAVA_OBJS): Add buffer.o. *************** Fri Jul 24 14:14:32 1998 Per Bothner < *** 12298,12309 **** (generate_bytecode_insns): Handle local variables. (generate_classfile): Write LocalVariableTable attribute. ! Fri Jul 24 13:46:59 1998 Alexandre Petit-Bianco * jcf-io.c (open_in_zip): Check the zipfile magic number. * zipfile.h (ZIPMAGIC): New macro. ! Fri Jul 24 10:43:25 1998 Tom Tromey * Makefile.in (gjavah.o): Updated dependencies. (jcf-dump.o): Likewise. --- 13774,13785 ---- (generate_bytecode_insns): Handle local variables. (generate_classfile): Write LocalVariableTable attribute. ! 1998-07-24 Alexandre Petit-Bianco * jcf-io.c (open_in_zip): Check the zipfile magic number. * zipfile.h (ZIPMAGIC): New macro. ! 1998-07-24 Tom Tromey * Makefile.in (gjavah.o): Updated dependencies. (jcf-dump.o): Likewise. *************** Fri Jul 24 10:43:25 1998 Tom Tromey * gjavah.c (java_float_finite): New function. (java_double_finite): Likewise. --- 13795,13801 ---- (java.rest.encap): Likewise. * config-lang.in (compilers, stagestuff): Added gjavah. ! 1998-07-23 Tom Tromey * gjavah.c (java_float_finite): New function. (java_double_finite): Likewise. *************** Thu Jul 23 18:33:56 1998 Tom Tromey * parse.y (method_header): Name "this" implicit argument. ! Wed Jul 22 15:47:30 1998 Per Bothner * jcf-write.c: Write out LineNumberTable attribute in .class file. (linenumber_buffer, linenumber_ptr, linenumber_limit): New statics. (put_linenumber): New function. (generate_bytecode_insns, generate_classfile): Write line numbers. ! Wed Jul 22 14:39:00 1998 Alexandre Petit-Bianco * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P. (lookup_name, build_known_method_ref, build_class_init, --- 13807,13824 ---- (D_NAN): Likewise. (print_field_info): Use java_float_finite and java_double_finite. ! 1998-07-23 Per Bothner * parse.y (method_header): Name "this" implicit argument. ! 1998-07-22 Per Bothner * jcf-write.c: Write out LineNumberTable attribute in .class file. (linenumber_buffer, linenumber_ptr, linenumber_limit): New statics. (put_linenumber): New function. (generate_bytecode_insns, generate_classfile): Write line numbers. ! 1998-07-22 Alexandre Petit-Bianco * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P. (lookup_name, build_known_method_ref, build_class_init, *************** Wed Jul 22 14:39:00 1998 Alexandre Peti *** 12431,12437 **** (build_return, patch_return): New functions. * typeck.c (lookup_java_constructor): Fixed typo in comment. ! Tue Jul 21 12:10:04 1998 Per Bothner * constants.c (find_name_and_type_constant, find_fieldref_index, find_methodref_index): New methods. --- 13907,13913 ---- (build_return, patch_return): New functions. * typeck.c (lookup_java_constructor): Fixed typo in comment. ! 1998-07-21 Per Bothner * constants.c (find_name_and_type_constant, find_fieldref_index, find_methodref_index): New methods. *************** Tue Jul 21 12:10:04 1998 Per Bothner < *** 12456,12462 **** * parse.y: Use build_java_argument_signature instead of fiddling with signature_include_return. ! Fri Jul 17 09:48:51 1998 Tom Tromey * gjavah.c (print_c_decl): Always generate JArray<>* for array types. --- 13932,13938 ---- * parse.y: Use build_java_argument_signature instead of fiddling with signature_include_return. ! 1998-07-17 Tom Tromey * gjavah.c (print_c_decl): Always generate JArray<>* for array types. *************** Fri Jul 17 09:48:51 1998 Tom Tromey * class.c (layout_class): Call to java_layout_parsed_class replace by safe_layout_class. --- 13941,13947 ---- (gjavah$(exeext)): Added $(exeext). (clean): Likewise. ! 1998-07-16 Alexandre Petit-Bianco * class.c (layout_class): Call to java_layout_parsed_class replace by safe_layout_class. *************** Thu Jul 16 15:29:20 1998 Alexandre Peti *** 12584,12590 **** builtin types. (build_newarray_node, patch_newarray, build_this): New functions. ! Thu Jul 16 10:46:47 1998 Tom Tromey * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't increment it in `for' statement. --- 14060,14066 ---- builtin types. (build_newarray_node, patch_newarray, build_this): New functions. ! 1998-07-16 Tom Tromey * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't increment it in `for' statement. *************** Thu Jul 16 10:46:47 1998 Tom Tromey * gjavah.c (print_c_decl): Don't print "," when examining field. Skip type name when looking at "[L" types. --- 14079,14085 ---- (generate_access): Set found_error. (print_c_decl): Likewise. ! 1998-07-15 Tom Tromey * gjavah.c (print_c_decl): Don't print "," when examining field. Skip type name when looking at "[L" types. *************** Wed Jul 15 10:36:27 1998 Tom Tromey * lang-options.h: Format changed to match changes in gcc/toplev.c to implement a --help option. --- 14100,14106 ---- (process_file): Use it. (utf8_cmp): New function. ! 1998-07-13 Nick Clifton * lang-options.h: Format changed to match changes in gcc/toplev.c to implement a --help option. *************** Mon Jul 13 14:21:47 1998 Nick Clifton *** 12633,12639 **** * decl.c (init_decl_processing): Revert change to dtable_type. ! Thu Jul 9 18:22:12 1998 Per Bothner * java-tree.h (CLASS_P): Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4. --- 14109,14115 ---- * decl.c (init_decl_processing): Revert change to dtable_type. ! 1998-07-09 Per Bothner * java-tree.h (CLASS_P): Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4. *************** Thu Jul 9 18:22:12 1998 Per Bothner < *** 12644,12657 **** * lang.c (lang_init): Default flag_exceptions to 1, without checking to see if it's 2 first. ! Wed Jul 8 03:01:32 1998 Jeffrey A Law (law@cygnus.com) * constants.c: Include "system.h". * decl.c: Likewise. * lang.c (flag_new_exceptions): Get via extern now. (lang_init_options): New functions. Turn on flag_new_exceptions. ! Tue Jul 7 12:56:48 1998 Alexandre Petit-Bianco * lex.c (java_lex): Return 0 when we see an invalid character in the input. --- 14120,14133 ---- * lang.c (lang_init): Default flag_exceptions to 1, without checking to see if it's 2 first. ! 1998-07-08 Jeffrey A Law (law@cygnus.com) * constants.c: Include "system.h". * decl.c: Likewise. * lang.c (flag_new_exceptions): Get via extern now. (lang_init_options): New functions. Turn on flag_new_exceptions. ! 1998-07-07 Alexandre Petit-Bianco * lex.c (java_lex): Return 0 when we see an invalid character in the input. *************** Tue Jul 7 12:56:48 1998 Alexandre Peti *** 12673,12679 **** * jcf-io.c (find_class): Zero out BUFFER before we use it, since we don't explicitly put a null pointer when we're copying it. ! Tue Jul 7 09:38:38 1998 Tom Tromey * gjavah.c (print_cxx_classname): New function. (super_class_name): Likewise. --- 14149,14155 ---- * jcf-io.c (find_class): Zero out BUFFER before we use it, since we don't explicitly put a null pointer when we're copying it. ! 1998-07-07 Tom Tromey * gjavah.c (print_cxx_classname): New function. (super_class_name): Likewise. *************** Tue Jul 7 09:38:38 1998 Tom Tromey * Makefile.in (JAVABISONFLAGS): Specific flag for bison when processing the jc1 grammar file. Prefix bison functions and --- 14174,14180 ---- (print_c_decl): Return void. (print_field_info): Return void. ! 1998-07-02 Alexandre Petit-Bianco * Makefile.in (JAVABISONFLAGS): Specific flag for bison when processing the jc1 grammar file. Prefix bison functions and *************** Thu Jul 2 16:53:16 1998 Alexandre Peti *** 12833,12858 **** (patch_unary_op): Extract location information from the node. (build_array_ref, patch_array_ref): New functions. ! Wed Jul 1 13:11:36 1998 Tom Tromey * expr.c (expand_java_INSTANCEOF): Changed calling convention to match _Jv_IsInstanceOf. * decl.c (init_decl_processing): Use _Jv_NewArray, not soft_newarray. Use _Jv_IsInstanceOf, not soft_instanceof. ! Tue Jun 30 14:12:54 1998 Tom Tromey * decl.c (init_decl_processing): Functions are now named _Jv_MonitorEnter and _Jv_MonitorExit, and return jint. ! Mon Jun 29 14:47:10 1998 Per Bothner * java-tree.h (load_class): Add prototype. * class.c (is_compiled_class): Add missing arg to load_class. * expr.c (expand_java_NEW): Call load_class. * parse.y (process_import): Removed bogus use of void return value. ! Thu Jun 25 11:50:48 1998 Per Bothner * decl.c, java-tree.h (soft_athrow_node): Renamed to soft_node. Function name is "_Jv_Throw" instead of "soft_athrow". --- 14309,14334 ---- (patch_unary_op): Extract location information from the node. (build_array_ref, patch_array_ref): New functions. ! 1998-07-01 Tom Tromey * expr.c (expand_java_INSTANCEOF): Changed calling convention to match _Jv_IsInstanceOf. * decl.c (init_decl_processing): Use _Jv_NewArray, not soft_newarray. Use _Jv_IsInstanceOf, not soft_instanceof. ! 1998-06-30 Tom Tromey * decl.c (init_decl_processing): Functions are now named _Jv_MonitorEnter and _Jv_MonitorExit, and return jint. ! 1998-06-29 Per Bothner * java-tree.h (load_class): Add prototype. * class.c (is_compiled_class): Add missing arg to load_class. * expr.c (expand_java_NEW): Call load_class. * parse.y (process_import): Removed bogus use of void return value. ! 1998-06-25 Per Bothner * decl.c, java-tree.h (soft_athrow_node): Renamed to soft_node. Function name is "_Jv_Throw" instead of "soft_athrow". *************** Thu Jun 25 11:50:48 1998 Per Bothner < *** 12861,12878 **** Takes an extra parameter (object size). * expr.c: Update calls. ! Wed Jun 24 13:59:02 1998 Per Bothner * lex.c (java_get_line_col): Handle end-of-file. * except.c (expand_end_java_handler): Handle null type (i.e. finally). ! Wed Jun 24 09:22:34 EDT 1998 Andrew MacLeod * lang.c (lang_init): Make -fexceptions the default. * except.c (maybe_start_try, maybe_end_try): Don't do anything if exception handling is not turned on. ! Tue Jun 23 10:17:09 EDT 1998 Andrew MacLeod * lang.c (flag_new_exceptions): Make this this default. * decl.c (end_java_method): Call emit_handlers. --- 14337,14354 ---- Takes an extra parameter (object size). * expr.c: Update calls. ! 1998-06-24 Per Bothner * lex.c (java_get_line_col): Handle end-of-file. * except.c (expand_end_java_handler): Handle null type (i.e. finally). ! 1998-06-24 Andrew MacLeod * lang.c (lang_init): Make -fexceptions the default. * except.c (maybe_start_try, maybe_end_try): Don't do anything if exception handling is not turned on. ! 1998-06-23 Andrew MacLeod * lang.c (flag_new_exceptions): Make this this default. * decl.c (end_java_method): Call emit_handlers. *************** Tue Jun 23 10:17:09 EDT 1998 Andrew Mac *** 12883,12889 **** (emit_handlers): New routine to generate the saved handlers. * java-except.h (emit_handlers): Add prototype. ! Fri Jun 12 11:31:24 1998 Per Bothner We used to have three different representations of the constant pool: the CPool structure, the tree_constant_pool, and the constructures --- 14359,14365 ---- (emit_handlers): New routine to generate the saved handlers. * java-except.h (emit_handlers): Add prototype. ! 1998-06-12 Per Bothner We used to have three different representations of the constant pool: the CPool structure, the tree_constant_pool, and the constructures *************** Fri Jun 12 11:31:24 1998 Per Bothner < *** 12942,12948 **** * expr.c (expand_invoke): Re-arrange error checks to make more robust. ! Wed Jun 10 17:34:42 1998 Alexandre Petit-Bianco * parse.h: New comment on the handling of unresolved type identifiers. JDEPs are now part of the jdep_code enum. --- 14418,14424 ---- * expr.c (expand_invoke): Re-arrange error checks to make more robust. ! 1998-06-10 Alexandre Petit-Bianco * parse.h: New comment on the handling of unresolved type identifiers. JDEPs are now part of the jdep_code enum. *************** Wed Jun 10 17:34:42 1998 Alexandre Peti *** 12950,12956 **** availability. Both are narrowed down to an 8 bits bitfield. (CALL_EXPR_PRIMARY): Fixed comment. ! Wed Jun 10 10:54:39 1998 Tom Tromey * Make-lang.in (java): Added gjavac and jvgenmain. (java.start.encap): Depend on gjavac. --- 14426,14432 ---- availability. Both are narrowed down to an 8 bits bitfield. (CALL_EXPR_PRIMARY): Fixed comment. ! 1998-06-10 Tom Tromey * Make-lang.in (java): Added gjavac and jvgenmain. (java.start.encap): Depend on gjavac. *************** Wed Jun 10 10:54:39 1998 Tom Tromey * lang.c (lang_decode_option): New argc/argv interface. ! Tue Jun 9 18:12:46 1998 Alexandre Petit-Bianco * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard. * decl.c (build_decl_no_layout): New function. --- 14441,14451 ---- * config-lang.in (compilers, stagestuff): Added gjavac and jvgenmain. ! 1998-06-10 Dave Brolley * lang.c (lang_decode_option): New argc/argv interface. ! 1998-06-09 Alexandre Petit-Bianco * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard. * decl.c (build_decl_no_layout): New function. *************** Tue Jun 9 18:12:46 1998 Alexandre Peti *** 13042,13075 **** (build_unaryop, build_incdec, build_cast, patch_unaryop, patch_cast): New functions. ! Fri Jun 5 18:03:07 1998 Per Bothner * jvspec.c: New file. * Make-lang.in: New rules to build gjavac from jvspec.c and ../gcc.c. * java-tree.h (identifier_subst): Add declaration. ! Thu Jun 4 13:44:23 1998 Tom Tromey * jvgenmain.c (main): Generate call to JvRunMain. * class.c (make_class_data): Push value for "sync_info" field. * decl.c (init_decl_processing): Push "sync_info" field. ! Wed Jun 3 20:39:14 1998 Per Bothner * typeck.c (build_java_array_type): Set TYPE_NAME to actual Java (source) name, not signature. Set TYPE_ALIGN to (at least) that of element_type. ! Tue Jun 2 15:19:19 1998 Per Bothner * class.c: Moved classname-mangling-rekated code to ... * mangle.c: ... this new file. * jvgenmain.c: New program (needs mangle.c) to generate main program. * Makefile.in: Update for above changes. ! Mon Jun 1 09:58:36 1998 Alexandre Petit-Bianco * expr.c (truthvalue_conversion): Convert integer and floating point value to their truth value. --- 14518,14551 ---- (build_unaryop, build_incdec, build_cast, patch_unaryop, patch_cast): New functions. ! 1998-06-05 Per Bothner * jvspec.c: New file. * Make-lang.in: New rules to build gjavac from jvspec.c and ../gcc.c. * java-tree.h (identifier_subst): Add declaration. ! 1998-06-04 Tom Tromey * jvgenmain.c (main): Generate call to JvRunMain. * class.c (make_class_data): Push value for "sync_info" field. * decl.c (init_decl_processing): Push "sync_info" field. ! 1998-06-03 Per Bothner * typeck.c (build_java_array_type): Set TYPE_NAME to actual Java (source) name, not signature. Set TYPE_ALIGN to (at least) that of element_type. ! 1998-06-02 Per Bothner * class.c: Moved classname-mangling-rekated code to ... * mangle.c: ... this new file. * jvgenmain.c: New program (needs mangle.c) to generate main program. * Makefile.in: Update for above changes. ! 1998-06-01 Alexandre Petit-Bianco * expr.c (truthvalue_conversion): Convert integer and floating point value to their truth value. *************** Mon Jun 1 09:58:36 1998 Alexandre Peti *** 13100,13106 **** different. Force fixed type into node. Handle all binary operators. ! Wed May 27 10:30:31 1998 Alexandre Petit-Bianco * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros. * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to --- 14576,14582 ---- different. Force fixed type into node. Handle all binary operators. ! 1998-05-27 Alexandre Petit-Bianco * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros. * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to *************** Wed May 27 10:30:31 1998 Alexandre Peti *** 13158,13164 **** build_binop, operator_string, patch_binop): New functions. * typeck.c (binary_numeric_promotion): New function. ! Thu May 21 12:01:04 1998 Per Bothner * class.c (identifier_subst): New convenience wrapper for ident_subst. Replace most uses of ident_subst by identifier_subst. --- 14634,14640 ---- build_binop, operator_string, patch_binop): New functions. * typeck.c (binary_numeric_promotion): New function. ! 1998-05-21 Per Bothner * class.c (identifier_subst): New convenience wrapper for ident_subst. Replace most uses of ident_subst by identifier_subst. *************** Thu May 21 12:01:04 1998 Per Bothner < *** 13172,13185 **** Do nreverse 0 times (instead of twice) for Object and Class. * parse.y (java_layout_parsed_class): No push_class_static_dummy_field. ! Wed May 20 16:35:04 1998 Per Bothner * jcf-parse.c (parse_class-file): Set lino to smallest line number, while initializing linenumber_count and linenumber_table. Do it before init_function_start (which calls emit_line_note). * expr.c (expand_byte_code): Don't need to clear lineno here. ! Mon May 18 16:23:32 1998 Tom Tromey * class.c (append_gpp_mangled_type): If `qualifications' is >=9, then mangle number as _N_. --- 14648,14661 ---- Do nreverse 0 times (instead of twice) for Object and Class. * parse.y (java_layout_parsed_class): No push_class_static_dummy_field. ! 1998-05-20 Per Bothner * jcf-parse.c (parse_class-file): Set lino to smallest line number, while initializing linenumber_count and linenumber_table. Do it before init_function_start (which calls emit_line_note). * expr.c (expand_byte_code): Don't need to clear lineno here. ! 1998-05-18 Tom Tromey * class.c (append_gpp_mangled_type): If `qualifications' is >=9, then mangle number as _N_. *************** Mon May 18 16:23:32 1998 Tom Tromey * parse.y (source_start_java_method): Use TREE_SET_CODE instead of assigning to TREE_CODE. The latter method exploits a feature of GCC that is not ANSI compliant. ! Thu May 12 13:44:27 1998 Alexandre Petit-Bianco * decl.c (pushdecl_force_head): New function. (pushlevel): Removed conditional printf. --- 14665,14677 ---- mangle_class_field. (push_class_static_dummy_field): Likewise. ! 1998-05-17 Michael Tiemann * parse.y (source_start_java_method): Use TREE_SET_CODE instead of assigning to TREE_CODE. The latter method exploits a feature of GCC that is not ANSI compliant. ! 1998-05-12 Alexandre Petit-Bianco * decl.c (pushdecl_force_head): New function. (pushlevel): Removed conditional printf. *************** Thu May 12 13:44:27 1998 Alexandre Peti *** 13308,13314 **** (build_expr_block, enter_block, exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks): New functions. ! Mon Apr 27 10:50:05 1998 Alexandre Petit-Bianco * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if previously set. --- 14784,14790 ---- (build_expr_block, enter_block, exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks): New functions. ! 1998-04-27 Alexandre Petit-Bianco * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if previously set. *************** Mon Apr 27 10:50:05 1998 Alexandre Peti *** 13445,13451 **** tree argument. (patch_argument, java_complete_tree): New functions. ! Mon Apr 20 18:26:57 1998 Per Bothner Recover from missing fields and methods (i.e. error instead of fatal). * decl.c, java-tree.h (TYPE_identifier_node): New global constant. --- 14921,14927 ---- tree argument. (patch_argument, java_complete_tree): New functions. ! 1998-04-20 Per Bothner Recover from missing fields and methods (i.e. error instead of fatal). * decl.c, java-tree.h (TYPE_identifier_node): New global constant. *************** Mon Apr 20 18:26:57 1998 Per Bothner < *** 13465,13471 **** * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME. ! Tue Apr 14 15:59:54 1998 Alexandre Petit-Bianco * jcf-parse.c (load_class): Don't change input_filename before calling jcf_parse_source (but still do it before calling --- 14941,14947 ---- * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME. ! 1998-04-14 Alexandre Petit-Bianco * jcf-parse.c (load_class): Don't change input_filename before calling jcf_parse_source (but still do it before calling *************** Tue Apr 14 15:59:54 1998 Alexandre Peti *** 13575,13585 **** (lookup_method_invoke): cl is now a WFL node. Added missing IDENTIFIER_POINTER to class type decl name. ! Tue Apr 14 15:23:29 1998 Dave Brolley * lang.c (init_parse): Now returns char* containing the filename. ! Fri Apr 10 11:36:04 1998 Per Bothner * class.c (layout_class): Mangle repeated arg types to match cc1plus. --- 15051,15061 ---- (lookup_method_invoke): cl is now a WFL node. Added missing IDENTIFIER_POINTER to class type decl name. ! 1998-04-14 Dave Brolley * lang.c (init_parse): Now returns char* containing the filename. ! 1998-04-10 Per Bothner * class.c (layout_class): Mangle repeated arg types to match cc1plus. *************** Fri Apr 10 11:36:04 1998 Per Bothner < *** 13588,13601 **** state is CSTATE_PREPARED; make superclass and interfaces direct references, rather than constant pool indexes. ! Thu Apr 9 16:10:56 1998 Alexandre Petit-Bianco * parser.y: Include flags.h. Removed debug variable pl. (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl. (block:): Likewise. (labeled_statement_nsi:): Generate debug info when reducing expression_statement:. ! (check_pkg_class_access): get_access_flags_from_decl invokation fixed for new CLASS_* flags location. (source_end_java_method): Save/restore parser context when entering/leaving this routine. Restore lineno to its right value --- 15064,15077 ---- state is CSTATE_PREPARED; make superclass and interfaces direct references, rather than constant pool indexes. ! 1998-04-09 Alexandre Petit-Bianco * parser.y: Include flags.h. Removed debug variable pl. (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl. (block:): Likewise. (labeled_statement_nsi:): Generate debug info when reducing expression_statement:. ! (check_pkg_class_access): get_access_flags_from_decl invocation fixed for new CLASS_* flags location. (source_end_java_method): Save/restore parser context when entering/leaving this routine. Restore lineno to its right value *************** Thu Apr 9 16:10:56 1998 Alexandre Peti *** 13621,13631 **** * lang.c (init_parse): Expose for non USE_CPPLIB builds. (finish_parse): Expose for non USE_CPPLIB builds. ! Wed Apr 8 13:06:23 1998 Jeffrey A Law (law@cygnus.com) * lang.c (lang_print_xnode): New function. ! Fri Apr 3 13:22:41 1998 Per Bothner * decl.c (class_dtable_decl), java-tree.h: New tree node. * class.c (get_dispatch_vector, get_dispatch_table): New functions --- 15097,15107 ---- * lang.c (init_parse): Expose for non USE_CPPLIB builds. (finish_parse): Expose for non USE_CPPLIB builds. ! 1998-04-08 Jeffrey A Law (law@cygnus.com) * lang.c (lang_print_xnode): New function. ! 1998-04-03 Per Bothner * decl.c (class_dtable_decl), java-tree.h: New tree node. * class.c (get_dispatch_vector, get_dispatch_table): New functions *************** Fri Apr 3 13:22:41 1998 Per Bothner < *** 13646,13657 **** * Makefile.in, Make-lang.in: Add missing $(exeext)s. ! Thu Mar 19 16:59:16 1998 Alexandre Petit-Bianco * parse.y (build_method_invocation_stmt): Removed extra argument to build_invoke. ! Mon Mar 16 17:25:19 1998 Alexandre Petit-Bianco * expr.c (dtable_indent): Now static global. (expand_invoke): Now call invoke_build_dtable and --- 15122,15133 ---- * Makefile.in, Make-lang.in: Add missing $(exeext)s. ! 1998-03-19 Alexandre Petit-Bianco * parse.y (build_method_invocation_stmt): Removed extra argument to build_invoke. ! 1998-03-16 Alexandre Petit-Bianco * expr.c (dtable_indent): Now static global. (expand_invoke): Now call invoke_build_dtable and *************** Mon Mar 16 17:25:19 1998 Alexandre Peti *** 13726,13736 **** if return type skipped. (match_java_method): New function. ! Mon Mar 16 10:40:47 1998 Per Bothner * jcf-io.c (find_classfile): If USE_JCF_STDIO, fopen in binary mode. ! Wed Feb 25 08:55:49 1998 Alexandre Petit-Bianco * expr.c (build_invoke_non_interface): New function. (methods_ident, ncode_ident): Now static globals. --- 15202,15212 ---- if return type skipped. (match_java_method): New function. ! 1998-03-16 Per Bothner * jcf-io.c (find_classfile): If USE_JCF_STDIO, fopen in binary mode. ! 1998-02-25 Alexandre Petit-Bianco * expr.c (build_invoke_non_interface): New function. (methods_ident, ncode_ident): Now static globals. *************** Wed Feb 25 08:55:49 1998 Alexandre Peti *** 13778,13784 **** (java_layout_parsed_class, java_register_parsed_class): New functions. (resolve_expression_name): New function. ! Thu Feb 12 11:54:28 1998 Alexandre Petit-Bianco * jcf-parse.c: (parse_source_file): Check on errors after init lex. * lex.c: (java_init_lex): Defer ctxp->java_pass initialization --- 15254,15260 ---- (java_layout_parsed_class, java_register_parsed_class): New functions. (resolve_expression_name): New function. ! 1998-02-12 Alexandre Petit-Bianco * jcf-parse.c: (parse_source_file): Check on errors after init lex. * lex.c: (java_init_lex): Defer ctxp->java_pass initialization *************** Thu Feb 12 11:54:28 1998 Alexandre Peti *** 13805,13811 **** * lang.c (lang_f_options): Add the flag. (flag_assume_compiled): Add decl, default to 0. ! Wed Feb 11 11:27:59 1998 Alexandre Petit-Bianco * class.c (class_depth): Call to load_class uses extra VERBOSE arg. (is_compiled_class): Likewise. --- 15281,15287 ---- * lang.c (lang_f_options): Add the flag. (flag_assume_compiled): Add decl, default to 0. ! 1998-02-11 Alexandre Petit-Bianco * class.c (class_depth): Call to load_class uses extra VERBOSE arg. (is_compiled_class): Likewise. *************** Wed Feb 11 11:27:59 1998 Alexandre Peti *** 13934,13940 **** * jcf-io.c (open_in_zip): Use strncmp and LEN. ! Thu Jan 29 16:12:13 1998 Dave Brolley * Make-lang.in (java.info): Added. (java.install-info): Added --- 15410,15416 ---- * jcf-io.c (open_in_zip): Use strncmp and LEN. ! 1998-01-29 Dave Brolley * Make-lang.in (java.info): Added. (java.install-info): Added *************** Thu Jan 29 16:12:13 1998 Dave Brolley *** 13955,13966 **** of a static macro value. (JAVA_ARRAY_EXCEPTION): Delete macro. ! Fri Jan 23 14:19:47 1998 Per Bothner * typeck.c (build_java_array_type): Fix two bugs in previous change. * expr.c (build_anewarray): Add missing promote_type. ! Thu Jan 22 17:43:45 1998 Per Bothner Add array types with known length to optimize bounds checking. * typeck.c (build_java_array_type): Take length parameter. --- 15431,15442 ---- of a static macro value. (JAVA_ARRAY_EXCEPTION): Delete macro. ! 1998-01-23 Per Bothner * typeck.c (build_java_array_type): Fix two bugs in previous change. * expr.c (build_anewarray): Add missing promote_type. ! 1998-01-22 Per Bothner Add array types with known length to optimize bounds checking. * typeck.c (build_java_array_type): Take length parameter. *************** Thu Jan 22 17:43:45 1998 Per Bothner < *** 13980,13991 **** (ARRAY_NEW_NUM, ARRAY_NEW_PTR): Use build_{a,}newarray. * verify.c (merge_types): Handle known-lengh array types. ! Mon Jan 19 13:09:25 1998 Per Bothner * expr.c (expand_byte_code): Fix performace bug, which caused searching linenumber_table to be linear rather than constant. ! Fri Dec 12 19:18:42 1997 Per Bothner * Makefile.in (BISON, BISONFLAGS): Add missing macros. --- 15456,15467 ---- (ARRAY_NEW_NUM, ARRAY_NEW_PTR): Use build_{a,}newarray. * verify.c (merge_types): Handle known-lengh array types. ! 1998-01-19 Per Bothner * expr.c (expand_byte_code): Fix performace bug, which caused searching linenumber_table to be linear rather than constant. ! 1997-12-12 Per Bothner * Makefile.in (BISON, BISONFLAGS): Add missing macros. *************** Fri Dec 12 19:18:42 1997 Per Bothner < *** 13994,14000 **** * expr.c (build_java_binop): Implement TRUNC_MOD_EXPR for REAL_TYPE using __builtin_fmod. ! Thu Dec 4 13:22:59 1997 Alexandre Petit-Bianco * keyword.h: New file, output of keyword.gperf as processed by gperf. --- 15470,15476 ---- * expr.c (build_java_binop): Implement TRUNC_MOD_EXPR for REAL_TYPE using __builtin_fmod. ! 1997-12-04 Alexandre Petit-Bianco * keyword.h: New file, output of keyword.gperf as processed by gperf. *************** Thu Dec 4 13:22:59 1997 Alexandre Peti *** 14009,14015 **** * Makefile.in (parse.c): Use $(srcdir) for parse.y. ! Wed Dec 3 18:37:42 1997 Alexandre Petit-Bianco * Makefile.in: (JAVA_OBJS): New object jcf-parse.o. (parse.c, lex.c, keyword.h): New rules for Java source code --- 15485,15491 ---- * Makefile.in (parse.c): Use $(srcdir) for parse.y. ! 1997-12-03 Alexandre Petit-Bianco * Makefile.in: (JAVA_OBJS): New object jcf-parse.o. (parse.c, lex.c, keyword.h): New rules for Java source code *************** Wed Dec 3 18:37:42 1997 Alexandre Peti *** 14022,14028 **** * lex.c: New file, Java language lexer. * lex.h: New file, Java language lexer definitions. ! Wed Dec 3 17:00:17 1997 Per Bothner * decl.c (clinit_identifier_node), java-tree.h: New global. * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P): Removed. --- 15498,15504 ---- * lex.c: New file, Java language lexer. * lex.h: New file, Java language lexer definitions. ! 1997-12-03 Per Bothner * decl.c (clinit_identifier_node), java-tree.h: New global. * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P): Removed. *************** Wed Dec 3 17:00:17 1997 Per Bothner < *** 14032,14044 **** * jcf-reader.c (get_attribute): Test for wrong attribute length. ! Mon Oct 27 17:46:36 1997 Per Bothner * verify.c (verify_jvm_instructions): When processing a handler, attempt to set the current_subr to the right value. (More complicated code combines Sep 17 and Oct 22 versions.) ! Fri Oct 24 11:36:54 1997 Per Bothner * class.c (push_class): Figure out (guess) name of source file. * parse.c (set_source_filename): Set DECL_SOURCE_FILE of class decl. --- 15508,15520 ---- * jcf-reader.c (get_attribute): Test for wrong attribute length. ! 1997-10-27 Per Bothner * verify.c (verify_jvm_instructions): When processing a handler, attempt to set the current_subr to the right value. (More complicated code combines Sep 17 and Oct 22 versions.) ! 1997-10-24 Per Bothner * class.c (push_class): Figure out (guess) name of source file. * parse.c (set_source_filename): Set DECL_SOURCE_FILE of class decl. *************** Fri Oct 24 11:36:54 1997 Per Bothner < *** 14049,14067 **** * expr.c (build_java_binop): Fix masking 2nd operand. * decl.c (init_decl_processing): Set sizetype first. ! Wed Oct 22 19:39:05 1997 Per Bothner * verify.c (verify_jvm_instructions): Don't set current_subr to NULL. (Revert Sep 17 change.) ! Tue Oct 21 15:09:02 1997 Alexandre Petit-Bianco * parse.c (process_zip_dir): Skip ZIP entries not bearing the .class extension in their name and fix thing so we don't process them parse_zip_file_entries(). (parse_zip_file_entries): Cleaned unused local variables. ! Mon Oct 20 14:52:42 1997 Per Bothner * expr.c (can_widen_reference_to): Allows equal array element types. (expand_byte_code): PRE_RET must expand OPERAND_VALUE (to get index). --- 15525,15543 ---- * expr.c (build_java_binop): Fix masking 2nd operand. * decl.c (init_decl_processing): Set sizetype first. ! 1997-10-22 Per Bothner * verify.c (verify_jvm_instructions): Don't set current_subr to NULL. (Revert Sep 17 change.) ! 1997-10-21 Alexandre Petit-Bianco * parse.c (process_zip_dir): Skip ZIP entries not bearing the .class extension in their name and fix thing so we don't process them parse_zip_file_entries(). (parse_zip_file_entries): Cleaned unused local variables. ! 1997-10-20 Per Bothner * expr.c (can_widen_reference_to): Allows equal array element types. (expand_byte_code): PRE_RET must expand OPERAND_VALUE (to get index). *************** Mon Oct 20 14:52:42 1997 Per Bothner < *** 14070,14076 **** * verify.c (verify_jvm_instructions case OPCODE_anewarray): Promote element type to POINTER_TYPE. ! Mon Oct 20 13:40:41 1997 Alexandre Petit-Bianco * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir, find_in_current_zip, jcf_figure_file_type): Moved from --- 15546,15552 ---- * verify.c (verify_jvm_instructions case OPCODE_anewarray): Promote element type to POINTER_TYPE. ! 1997-10-20 Alexandre Petit-Bianco * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir, find_in_current_zip, jcf_figure_file_type): Moved from *************** Mon Oct 20 13:40:41 1997 Alexandre Peti *** 14078,14090 **** * zextract.c: (read_zip_archive): takes file_comment_length possible field into account. ! Mon Oct 20 11:45:06 1997 Per Bothner * verify.c (verify_jvm_instructions): Var can also be promoted to int. * verify.c (merge_types): Handle array types even better ... ! Fri Oct 17 15:56:37 1997 Per Bothner * expr.c (java_stack_pop): Fix use of NULL_TREE for TYPE_SECOND. --- 15554,15566 ---- * zextract.c: (read_zip_archive): takes file_comment_length possible field into account. ! 1997-10-20 Per Bothner * verify.c (verify_jvm_instructions): Var can also be promoted to int. * verify.c (merge_types): Handle array types even better ... ! 1997-10-17 Per Bothner * expr.c (java_stack_pop): Fix use of NULL_TREE for TYPE_SECOND. *************** Fri Oct 17 15:56:37 1997 Per Bothner < *** 14095,14101 **** * expr.c (java_stack_swap): Update stack_type_map. * verify.c (merge_types): Handle array types better. ! Wed Oct 15 18:09:45 1997 Per Bothner * class.c (add_field): Don't promote short integral fields to int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't. --- 15571,15577 ---- * expr.c (java_stack_swap): Update stack_type_map. * verify.c (merge_types): Handle array types better. ! 1997-10-15 Per Bothner * class.c (add_field): Don't promote short integral fields to int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't. *************** Wed Oct 15 18:09:45 1997 Per Bothner < *** 14104,14115 **** * decl.c, java-tree.h (integer_two_node): New constant node. * verify.c (merge_types): Check for TYPE_RETURN_ADDR. ! Wed Oct 15 17:04:50 1997 Alexandre Petit-Bianco * class.c (append_gpp_mangled_type): Use function argument unpromoted type to generate mangled name. ! Mon Oct 13 16:52:55 1997 Alexandre Petit-Bianco * constants.c (build_constant_data_ref): Now uses current_class instead of main_class. --- 15580,15591 ---- * decl.c, java-tree.h (integer_two_node): New constant node. * verify.c (merge_types): Check for TYPE_RETURN_ADDR. ! 1997-10-15 Alexandre Petit-Bianco * class.c (append_gpp_mangled_type): Use function argument unpromoted type to generate mangled name. ! 1997-10-13 Alexandre Petit-Bianco * constants.c (build_constant_data_ref): Now uses current_class instead of main_class. *************** Mon Oct 13 16:52:55 1997 Alexandre Peti *** 14177,14183 **** main_class (is_compiled_class): Now take into account class seen in the archive. ! Mon Oct 6 12:03:23 1997 Per Bothner * except.h: Renamed to: java-except.h. * parse.c, except.c, expr.c, verify.c: Update #include accordingly. --- 15653,15659 ---- main_class (is_compiled_class): Now take into account class seen in the archive. ! 1997-10-06 Per Bothner * except.h: Renamed to: java-except.h. * parse.c, except.c, expr.c, verify.c: Update #include accordingly. *************** Mon Oct 6 12:03:23 1997 Per Bothner < *** 14189,14208 **** * jcf-io.c (find_class): Don't look first in ".". ! Wed Oct 1 11:26:10 1997 Alexandre Petit-Bianco * zextract.c (read_zip_archive): Now takes into account the extra_field field. * expr.c (can_widen_reference_to): Modified to handle sub-interfaces. ! Sat Sep 20 12:44:28 1997 Per Bothner * constants.c, java-tree.h (build_internal_class_name): New function. (alloc_class_constant): Re-implement using build_internal_class_name. * class.c (make_class_data): Likewise. * class.c (hashUtf8String): Make hash algorithm match String.hashCode. ! Wed Sep 17 13:15:23 1997 Per Bothner * verify.c (verify_jvm_instructions): Temporarily set current_subr to NULL before pushing an exception handler target. --- 15665,15684 ---- * jcf-io.c (find_class): Don't look first in ".". ! 1997-10-01 Alexandre Petit-Bianco * zextract.c (read_zip_archive): Now takes into account the extra_field field. * expr.c (can_widen_reference_to): Modified to handle sub-interfaces. ! 1997-09-20 Per Bothner * constants.c, java-tree.h (build_internal_class_name): New function. (alloc_class_constant): Re-implement using build_internal_class_name. * class.c (make_class_data): Likewise. * class.c (hashUtf8String): Make hash algorithm match String.hashCode. ! 1997-09-17 Per Bothner * verify.c (verify_jvm_instructions): Temporarily set current_subr to NULL before pushing an exception handler target. *************** Wed Sep 17 13:15:23 1997 Per Bothner < *** 14212,14218 **** clobbering registers. (build_class_init): New function. ! Wed Sep 17 11:02:41 1997 Alexandre Petit-Bianco * typeck.c (build_java_array_type): Temporary use permanent_obstack to create the array 'length' field. --- 15688,15694 ---- clobbering registers. (build_class_init): New function. ! 1997-09-17 Alexandre Petit-Bianco * typeck.c (build_java_array_type): Temporary use permanent_obstack to create the array 'length' field. *************** Wed Sep 17 11:02:41 1997 Alexandre Peti *** 14220,14226 **** label if not found. * class.c (push_super_field): Tempory use permanent_obstack. ! Mon Sep 15 11:33:31 1997 Alexandre Petit-Bianco * typeck.c (type_for_mode): Now handles double_type_node and float_type_node. --- 15696,15702 ---- label if not found. * class.c (push_super_field): Tempory use permanent_obstack. ! 1997-09-15 Alexandre Petit-Bianco * typeck.c (type_for_mode): Now handles double_type_node and float_type_node. *************** Mon Sep 15 11:33:31 1997 Alexandre Peti *** 14228,14234 **** the wide bytecode is checked. OPCODE_ret added to the list of wide. ! Thu Sep 11 19:45:18 1997 Alexandre Petit-Bianco * class.c (make_class): Temporary use permanent_obstack. Set the class CLASS_P field to 1. --- 15704,15710 ---- the wide bytecode is checked. OPCODE_ret added to the list of wide. ! 1997-09-11 Alexandre Petit-Bianco * class.c (make_class): Temporary use permanent_obstack. Set the class CLASS_P field to 1. *************** Thu Sep 11 19:45:18 1997 Alexandre Peti *** 14273,14279 **** (FIELD_VOLATILE, FIELD_TRANSIENT): Defined. (CLASS_P): Defined ! Thu Sep 11 11:57:32 1997 Per Bothner * class.c (append_gpp_mangled_type): Fix typo. (emit_register_class): Use main_class to get class object, rather --- 15749,15755 ---- (FIELD_VOLATILE, FIELD_TRANSIENT): Defined. (CLASS_P): Defined ! 1997-09-11 Per Bothner * class.c (append_gpp_mangled_type): Fix typo. (emit_register_class): Use main_class to get class object, rather *************** Thu Sep 11 11:57:32 1997 Per Bothner < *** 14281,14287 **** * typeck.c (parse_signature_type): Promote array element type if it is a RECORD_TYPE. ! Wed Sep 10 16:09:23 1997 Per Bothner * class.c (push_class_static_dummy_field): New function. (mangle_static_field): New. Do G++-style mangling of static fields. --- 15757,15763 ---- * typeck.c (parse_signature_type): Promote array element type if it is a RECORD_TYPE. ! 1997-09-10 Per Bothner * class.c (push_class_static_dummy_field): New function. (mangle_static_field): New. Do G++-style mangling of static fields. *************** Wed Sep 10 16:09:23 1997 Per Bothner < *** 14305,14311 **** * class.c: Include stdio.h. ! Thu Sep 4 21:30:55 1997 Per Bothner * expr.c (expand_invoke): Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS) to make sure class is initialized before static/special invoke. --- 15781,15787 ---- * class.c: Include stdio.h. ! 1997-09-04 Per Bothner * expr.c (expand_invoke): Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS) to make sure class is initialized before static/special invoke. *************** Thu Sep 4 21:30:55 1997 Per Bothner < *** 14314,14320 **** call find_local_variable to force pre-allocation of decl and rtx. * decl.c (push_jvm_slot): Set DECL_REGISTER on stack slots. ! Wed Sep 3 16:13:23 1997 Per Bothner * class.c (build_class_ref): Strip off "promoted_" if need be. (make_field_value): Call build_java_signature when needed. --- 15790,15796 ---- call find_local_variable to force pre-allocation of decl and rtx. * decl.c (push_jvm_slot): Set DECL_REGISTER on stack slots. ! 1997-09-03 Per Bothner * class.c (build_class_ref): Strip off "promoted_" if need be. (make_field_value): Call build_java_signature when needed. *************** Wed Sep 3 16:13:23 1997 Per Bothner < *** 14331,14341 **** * javaop.def (lload): Fix typo. * jcf-dump.c (main): Clear filename to prevent possibly-bad free. ! Tue Sep 2 17:37:25 1997 Brendan Kehoe * parse.c: Don't include function.h. ! Wed Aug 27 18:33:04 1997 Per Bothner * except.[ch]: New files. * Makefile.in (JAVA_OBJS): Add except.o --- 15807,15817 ---- * javaop.def (lload): Fix typo. * jcf-dump.c (main): Clear filename to prevent possibly-bad free. ! 1997-09-02 Brendan Kehoe * parse.c: Don't include function.h. ! 1997-08-27 Per Bothner * except.[ch]: New files. * Makefile.in (JAVA_OBJS): Add except.o *************** Wed Aug 27 18:33:04 1997 Per Bothner < *** 14344,14350 **** * jcf-dump.c (disassemble_method): Print exception table. ! Wed Aug 27 13:26:58 1997 Alexandre Petit-Bianco * expr.c (verify_jvm_instructions): Started a thorough verification of invoke* bytecodes. --- 15820,15826 ---- * jcf-dump.c (disassemble_method): Print exception table. ! 1997-08-27 Alexandre Petit-Bianco * expr.c (verify_jvm_instructions): Started a thorough verification of invoke* bytecodes. *************** Wed Aug 27 13:26:58 1997 Alexandre Peti *** 14366,14372 **** access_flags. (get_access_flags_from_decl): Handles all class flags. ! Tue Aug 26 18:54:34 1997 Per Bothner * class.c (add_method): Zero out newly-allocated DECL_LANG_SPECIFIC. * parse.c (yyparse): Check for abstract method, and missing code. --- 15842,15848 ---- access_flags. (get_access_flags_from_decl): Handles all class flags. ! 1997-08-26 Per Bothner * class.c (add_method): Zero out newly-allocated DECL_LANG_SPECIFIC. * parse.c (yyparse): Check for abstract method, and missing code. *************** Tue Aug 26 18:54:34 1997 Per Bothner < *** 14376,14382 **** Partial support for scanning exception table. For load instructions, handle promoted integral types. ! Thu Aug 21 13:48:01 1997 Per Bothner * verify.c: New file, with contents moved from expr.c. * expr.c: Bunch of stuff (mostly verification) moved to verify.c. --- 15852,15858 ---- Partial support for scanning exception table. For load instructions, handle promoted integral types. ! 1997-08-21 Per Bothner * verify.c: New file, with contents moved from expr.c. * expr.c: Bunch of stuff (mostly verification) moved to verify.c. *************** Thu Aug 21 13:48:01 1997 Per Bothner < *** 14384,14390 **** * java-tree.h: Add some now-needed function declarations. * Makefile.in (JAVA_OBJS): Added verify.o. ! Wed Aug 20 14:34:34 1997 Alexandre Petit-Bianco * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the METHOD_ABSTRACT flag. --- 15860,15866 ---- * java-tree.h: Add some now-needed function declarations. * Makefile.in (JAVA_OBJS): Added verify.o. ! 1997-08-20 Alexandre Petit-Bianco * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the METHOD_ABSTRACT flag. *************** Wed Aug 20 14:34:34 1997 Alexandre Peti *** 14408,14414 **** (verify_jvm_instructions): Started a thorough verification of invoke* bytecodes. ! Tue Aug 19 13:35:49 1997 Per Bothner Support verification of jsr/ret subroutines (used for try/finally). * decl.c (return_address_type_node): New type node. --- 15884,15890 ---- (verify_jvm_instructions): Started a thorough verification of invoke* bytecodes. ! 1997-08-19 Per Bothner Support verification of jsr/ret subroutines (used for try/finally). * decl.c (return_address_type_node): New type node. *************** Tue Aug 19 13:35:49 1997 Per Bothner < *** 14431,14446 **** (verify_jvm_instructions): Handle errors from push_poending_block. Support jsr and ret instructions. ! Tue Aug 19 13:33:36 1997 Per Bothner * jcf-io.c (find_classfile): Fix thinko. * jcf-dump.c: Add CONVERT2 (to match changed javaop.def). ! Tue Aug 12 20:14:45 1997 Jason Merrill * Makefile.in (BISON): Remove. ! Thu Aug 7 23:08:24 1997 Per Bothner * Makefile.in: Convert to autoconf. * config-lang.in (outputs): Added java/Makefile. --- 15907,15922 ---- (verify_jvm_instructions): Handle errors from push_poending_block. Support jsr and ret instructions. ! 1997-08-19 Per Bothner * jcf-io.c (find_classfile): Fix thinko. * jcf-dump.c: Add CONVERT2 (to match changed javaop.def). ! 1997-08-12 Jason Merrill * Makefile.in (BISON): Remove. ! 1997-08-07 Per Bothner * Makefile.in: Convert to autoconf. * config-lang.in (outputs): Added java/Makefile. *************** Thu Aug 7 23:08:24 1997 Per Bothner < *** 14478,14484 **** Improve newarray, anewarray, ?aload, athrow, * java-tree.h (LABEL_CHANGED): New macro. ! Tue Aug 5 12:21:27 1997 Alexandre Petit-Bianco * decl.c (soft_athrow_node): New global variable initialized. * javaop.def (i2b, i2c, i2s): Invoke CONVERT2 --- 15954,15960 ---- Improve newarray, anewarray, ?aload, athrow, * java-tree.h (LABEL_CHANGED): New macro. ! 1997-08-05 Alexandre Petit-Bianco * decl.c (soft_athrow_node): New global variable initialized. * javaop.def (i2b, i2c, i2s): Invoke CONVERT2 *************** Tue Aug 5 12:21:27 1997 Alexandre Peti *** 14501,14507 **** OPCODE_ifnonnull): Now supported. (build_java_athrow): New function. ! Mon Aug 4 15:46:45 1997 Per Bothner Rename method name to match G++ (and fix mangling). * class.c (layout_class): Replace method name of by class name. --- 15977,15983 ---- OPCODE_ifnonnull): Now supported. (build_java_athrow): New function. ! 1997-08-04 Per Bothner Rename method name to match G++ (and fix mangling). * class.c (layout_class): Replace method name of by class name. *************** Mon Aug 4 15:46:45 1997 Per Bothner < *** 14513,14519 **** * parse.c (get_constant): Handle CONSTANT_Float and CONSTANT_Double. ! Fri Aug 1 11:37:09 1997 Alexandre Petit-Bianco * parse.c (get_class_constant): Modified to handle array "classes" * typeck.c (set_local_type): Bug fixed when filling type_map[] with --- 15989,15995 ---- * parse.c (get_constant): Handle CONSTANT_Float and CONSTANT_Double. ! 1997-08-01 Alexandre Petit-Bianco * parse.c (get_class_constant): Modified to handle array "classes" * typeck.c (set_local_type): Bug fixed when filling type_map[] with *************** Fri Aug 1 11:37:09 1997 Alexandre Peti *** 14541,14554 **** (CONVERT): Modified to invoke convert(). (case OPCODE_aload2): Fixed index typo from 2 to 1. ! Thu Jul 31 12:48:18 1997 Per Bothner * class.c (push_class): Set DECL_ARTIFICIAL (for dbxout.c). (build_class_ref, is_compiled_class): Handle pointer-to-record types. (make_class_data): Field name needs '/' as package prefix. * expr.c (type_stack_dup, java_stack_dup): Fix fencepost errors. ! Fri Jul 25 11:44:21 1997 Per Bothner Implement debug information for local variables. * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT, --- 16017,16030 ---- (CONVERT): Modified to invoke convert(). (case OPCODE_aload2): Fixed index typo from 2 to 1. ! 1997-07-31 Per Bothner * class.c (push_class): Set DECL_ARTIFICIAL (for dbxout.c). (build_class_ref, is_compiled_class): Handle pointer-to-record types. (make_class_data): Field name needs '/' as package prefix. * expr.c (type_stack_dup, java_stack_dup): Fix fencepost errors. ! 1997-07-25 Per Bothner Implement debug information for local variables. * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT, *************** Fri Jul 25 11:44:21 1997 Per Bothner < *** 14570,14576 **** * class.c (make_method_value, make_class_data): Update initializations to match. ! Wed Jul 16 17:17:50 1997 Per Bothner * class.c (unicode_mangling_length, emit_unicode_mangled_name, append_gpp_mangled_name, append_gpp_mangled_type): New functions. --- 16046,16052 ---- * class.c (make_method_value, make_class_data): Update initializations to match. ! 1997-07-16 Per Bothner * class.c (unicode_mangling_length, emit_unicode_mangled_name, append_gpp_mangled_name, append_gpp_mangled_type): New functions. *************** Wed Jul 16 17:17:50 1997 Per Bothner < *** 14587,14593 **** * parse.c (yyparse): Don't call layout_class here. * typeck.c (build_java_array_type): Set TYPE_ARRAY_ELEMENT. ! Sat Jun 14 12:06:57 1997 Per Bothner * decl.c, class.c: Update method type to match latest Kaffe snapshot. * constants.c (lookup_name_constant): Renamed to alloc_name_constant. --- 16063,16069 ---- * parse.c (yyparse): Don't call layout_class here. * typeck.c (build_java_array_type): Set TYPE_ARRAY_ELEMENT. ! 1997-06-14 Per Bothner * decl.c, class.c: Update method type to match latest Kaffe snapshot. * constants.c (lookup_name_constant): Renamed to alloc_name_constant. *************** Sat Jun 14 12:06:57 1997 Per Bothner < *** 14596,14602 **** * class.c (interits_from_p, emit_register_class): New functions. * parse.c (yyparse): Call emit_register_class. ! Mon Jun 9 18:08:06 1997 Per Bothner * constants.c: New file, to handle constant pool. * Makefile.in (JAVA_OBJS): Add constants.o. --- 16072,16078 ---- * class.c (interits_from_p, emit_register_class): New functions. * parse.c (yyparse): Call emit_register_class. ! 1997-06-09 Per Bothner * constants.c: New file, to handle constant pool. * Makefile.in (JAVA_OBJS): Add constants.o. *************** Mon Jun 9 18:08:06 1997 Per Bothner < *** 14607,14613 **** * class.c (build_class_ref): Make work fully (make_class_data): Emit super-class, constant pool, interface vector. ! Tue Jun 3 10:14:31 1997 Per Bothner java-tree.h (DECL_SIGNATURE, BCODE_EMITTED): Remove. (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P): New. --- 16083,16089 ---- * class.c (build_class_ref): Make work fully (make_class_data): Emit super-class, constant pool, interface vector. ! 1997-06-03 Per Bothner java-tree.h (DECL_SIGNATURE, BCODE_EMITTED): Remove. (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P): New. *************** Tue Jun 3 10:14:31 1997 Per Bothner < *** 14630,14636 **** (set_java_signature): New function - cache signature with type. (lookup_java_method): New function. ! Tue May 6 22:08:24 1997 Per Bothner * class.c (ident_subst): Take extra SUFFIX parameter. (add_field): Set DECL_ASSEMBLER_NAME of static fields; more. --- 16106,16112 ---- (set_java_signature): New function - cache signature with type. (lookup_java_method): New function. ! 1997-05-06 Per Bothner * class.c (ident_subst): Take extra SUFFIX parameter. (add_field): Set DECL_ASSEMBLER_NAME of static fields; more. *************** Tue May 6 22:08:24 1997 Per Bothner < *** 14651,14668 **** * parse.c: Add support for ConstantValue attribute. Handle nested loading of a class. (JPOOL_UTF): New. ! Tue Mar 11 20:11:05 1997 Per Bothner * expr.c (expand_java_pushc): Support #ifndef REAL_ARITHMETIC case. ! Thu Feb 27 14:24:29 1997 Per Bothner * Make-lang.in (java.install-man): New empty rule. * typeck.c (set_local_type): New function. * expr.c (STORE_INTERNAL): Call find_local_variable, not find_stack_slot. Call set_local_type. ! Wed Feb 12 16:11:05 1997 Per Bothner * java-tree.h: Various new macros for constructing RECORD_TYPEs, and building RECORD_TYPE CONSTRUCTORs. --- 16127,16144 ---- * parse.c: Add support for ConstantValue attribute. Handle nested loading of a class. (JPOOL_UTF): New. ! 1997-03-11 Per Bothner * expr.c (expand_java_pushc): Support #ifndef REAL_ARITHMETIC case. ! 1997-02-27 Per Bothner * Make-lang.in (java.install-man): New empty rule. * typeck.c (set_local_type): New function. * expr.c (STORE_INTERNAL): Call find_local_variable, not find_stack_slot. Call set_local_type. ! 1997-02-12 Per Bothner * java-tree.h: Various new macros for constructing RECORD_TYPEs, and building RECORD_TYPE CONSTRUCTORs. *************** Wed Feb 12 16:11:05 1997 Per Bothner < *** 14680,14686 **** * jcf-dump.c: Support reading classfile from explicitly-named class file (without CLASSPATH searching). ! Thu Oct 24 14:10:16 1996 Per Bothner * jcf-reader.c: Add parameter list to HANDLE_CONSTANT_Utf8. * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8): --- 16156,16162 ---- * jcf-dump.c: Support reading classfile from explicitly-named class file (without CLASSPATH searching). ! 1996-10-24 Per Bothner * jcf-reader.c: Add parameter list to HANDLE_CONSTANT_Utf8. * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8): *************** Thu Oct 24 14:10:16 1996 Per Bothner < *** 14690,14695 **** * jcf.h: Make NEW_CPOOL the default. * jcf.h, jcf-reader.c, parse.c: Remove support for !NEW_CPOOL. ! Thu Oct 24 13:52:45 1996 Per Bothner New directory. --- 16166,16171 ---- * jcf.h: Make NEW_CPOOL the default. * jcf.h, jcf-reader.c, parse.c: Remove support for !NEW_CPOOL. ! 1996-10-24 Per Bothner New directory. diff -Nrc3pad gcc-3.3.3/gcc/java/chartables.h gcc-3.4.0/gcc/java/chartables.h *** gcc-3.3.3/gcc/java/chartables.h 2001-12-28 22:27:29.000000000 +0000 --- gcc-3.4.0/gcc/java/chartables.h 2003-02-24 02:14:48.000000000 +0000 *************** *** 6,180 **** #define LETTER_START 1 #define LETTER_PART 2 static const char page0[256] = { (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, ! (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), - (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, - 0, 0, 0, (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! 0, 0, 0, 0, 0, 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, (LETTER_PART | LETTER_START), 0, ! 0, 0, 0, 0, (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START) }; static const char page2[256] = { ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; --- 6,185 ---- #define LETTER_START 1 #define LETTER_PART 2 + #define LETTER_SPACE 4 + + #define LETTER_MASK 7 static const char page0[256] = { (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, ! (LETTER_SPACE), 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), + (LETTER_PART), (LETTER_SPACE), (LETTER_SPACE), (LETTER_SPACE), + (LETTER_SPACE), (LETTER_SPACE), 0, 0, 0, (LETTER_START | LETTER_PART), 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! (LETTER_PART), 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, (LETTER_START | LETTER_PART), 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_START | LETTER_PART), 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART) }; static const char page2[256] = { ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; *************** static const char page3[256] = { *** 197,420 **** (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; static const char page4[256] = { ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0 }; static const char page5[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), --- 202,425 ---- (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; static const char page4[256] = { ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0 }; static const char page5[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), *************** static const char page5[256] = { *** 425,551 **** (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; static const char page6[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, (LETTER_PART), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! (LETTER_PART), (LETTER_PART), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0 }; static const char page7[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), --- 430,556 ---- (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; static const char page6[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, (LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! (LETTER_PART), (LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0 }; static const char page7[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), *************** static const char page7[256] = { *** 553,578 **** (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, --- 558,583 ---- (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, *************** static const char page7[256] = { *** 582,727 **** static const char page9[256] = { 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, (LETTER_PART), ! (LETTER_PART | LETTER_START), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! (LETTER_PART), 0, 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART), (LETTER_PART), 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), ! (LETTER_PART), (LETTER_PART), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), 0, 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, (LETTER_PART), (LETTER_PART), 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), 0, ! 0, 0, 0, (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART), (LETTER_PART), 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; static const char page10[256] = { ! 0, 0, (LETTER_PART), 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! (LETTER_PART), (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, (LETTER_PART), ! (LETTER_PART | LETTER_START), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), ! (LETTER_PART), (LETTER_PART), 0, 0, (LETTER_PART | LETTER_START), 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 --- 587,732 ---- static const char page9[256] = { 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, (LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! (LETTER_PART), 0, 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), ! (LETTER_PART), (LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), 0, 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, (LETTER_PART), (LETTER_PART), 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), 0, ! 0, 0, 0, (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; static const char page10[256] = { ! 0, 0, (LETTER_PART), 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! (LETTER_PART), (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, (LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), ! (LETTER_PART), (LETTER_PART), 0, 0, (LETTER_START | LETTER_PART), 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 *************** static const char page10[256] = { *** 729,784 **** static const char page11[256] = { 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, (LETTER_PART), ! (LETTER_PART | LETTER_START), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, (LETTER_PART), (LETTER_PART), 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, --- 734,789 ---- static const char page11[256] = { 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, (LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, (LETTER_PART), (LETTER_PART), 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, *************** static const char page11[256] = { *** 790,929 **** static const char page12[256] = { 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), ! (LETTER_PART), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), 0, 0, 0, ! 0, 0, 0, 0, (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; static const char page13[256] = { ! 0, 0, (LETTER_PART), (LETTER_PART), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, (LETTER_PART), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), --- 795,934 ---- static const char page12[256] = { 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), ! (LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), 0, 0, 0, ! 0, 0, 0, 0, (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; static const char page13[256] = { ! 0, 0, (LETTER_PART), (LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, (LETTER_PART), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), *************** static const char page13[256] = { *** 932,1037 **** }; static const char page14[256] = { ! 0, (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), (LETTER_PART), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! (LETTER_PART), 0, 0, 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), 0, 0, ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), (LETTER_PART), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! 0, (LETTER_PART), (LETTER_PART), (LETTER_PART | LETTER_START), 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! (LETTER_PART), (LETTER_PART), 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; static const char page15[256] = { ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), 0, (LETTER_PART), 0, (LETTER_PART), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), --- 937,1042 ---- }; static const char page14[256] = { ! 0, (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), (LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! (LETTER_PART), 0, 0, 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), 0, 0, ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), (LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! 0, (LETTER_PART), (LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! (LETTER_PART), (LETTER_PART), 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; static const char page15[256] = { ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), 0, (LETTER_PART), 0, (LETTER_PART), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), *************** static const char page15[256] = { *** 1047,1703 **** }; static const char page16[256] = { ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! (LETTER_PART), 0, 0, 0, 0, 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0 }; static const char page17[256] = { ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0 }; static const char page18[256] = { ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START) }; static const char page19[256] = { ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; static const char page20[256] = { ! 0, (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START) }; static const char page22[256] = { ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; --- 1052,1708 ---- }; static const char page16[256] = { ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! (LETTER_PART), 0, 0, 0, 0, 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0 }; static const char page17[256] = { ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0 }; static const char page18[256] = { ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART) }; static const char page19[256] = { ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; static const char page20[256] = { ! 0, (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART) }; static const char page22[256] = { ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_SPACE), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; *************** static const char page23[256] = { *** 1707,1745 **** 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, (LETTER_PART | LETTER_START), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, --- 1712,1750 ---- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, (LETTER_START | LETTER_PART), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, *************** static const char page24[256] = { *** 1750,1820 **** 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, ! 0, (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, ! 0, 0, 0, (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, --- 1755,1825 ---- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, ! 0, (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, ! 0, 0, 0, (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, *************** static const char page24[256] = { *** 1822,2085 **** }; static const char page30[256] = { ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0 }; static const char page31[256] = { ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), 0, 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0 }; static const char page32[256] = { ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), ! (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), --- 1827,2092 ---- }; static const char page30[256] = { ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0 }; static const char page31[256] = { ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), 0, 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0 }; static const char page32[256] = { ! (LETTER_SPACE), (LETTER_SPACE), (LETTER_SPACE), (LETTER_SPACE), ! (LETTER_SPACE), (LETTER_SPACE), (LETTER_SPACE), 0, (LETTER_SPACE), ! (LETTER_SPACE), (LETTER_SPACE), (LETTER_SPACE), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_SPACE), (LETTER_SPACE), ! (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), ! (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), *************** static const char page32[256] = { *** 2089,2113 **** }; static const char page33[256] = { ! 0, 0, (LETTER_PART | LETTER_START), 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), --- 2096,2120 ---- }; static const char page33[256] = { ! 0, 0, (LETTER_START | LETTER_PART), 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), *************** static const char page33[256] = { *** 2125,2320 **** }; static const char page48[256] = { ! 0, 0, 0, 0, 0, (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! (LETTER_PART), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, ! (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0, ! (LETTER_PART), (LETTER_PART), 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0 }; static const char page49[256] = { ! 0, 0, 0, 0, 0, (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; static const char page52[256] = { ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, --- 2132,2327 ---- }; static const char page48[256] = { ! (LETTER_SPACE), 0, 0, 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, (LETTER_PART), (LETTER_PART), ! (LETTER_PART), 0, 0, 0, 0, 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), 0, ! 0, (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0 }; static const char page49[256] = { ! 0, 0, 0, 0, 0, (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; static const char page52[256] = { ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, *************** static const char page77[256] = { *** 2335,2382 **** 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START) }; static const char page78[256] = { ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, --- 2342,2389 ---- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART) }; static const char page78[256] = { ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, *************** static const char page159[256] = { *** 2396,2402 **** 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, --- 2403,2409 ---- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, *************** static const char page159[256] = { *** 2404,2515 **** }; static const char page164[256] = { ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START) }; static const char page172[256] = { ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, --- 2411,2522 ---- }; static const char page164[256] = { ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART) }; static const char page172[256] = { ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, *************** static const char page215[256] = { *** 2529,2535 **** 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, --- 2536,2542 ---- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, *************** static const char page215[256] = { *** 2537,2565 **** }; static const char page250[256] = { ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, --- 2544,2572 ---- }; static const char page250[256] = { ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, *************** static const char page250[256] = { *** 2572,2958 **** }; static const char page251[256] = { ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART), (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START) }; static const char page253[256] = { ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0 }; static const char page254[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, ! 0, (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, (LETTER_PART) }; static const char page255[256] = { ! 0, 0, 0, 0, (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! 0, 0, 0, 0, 0, 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, (LETTER_PART | LETTER_START), 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, ! (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, (LETTER_PART | LETTER_START), ! (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; static const char *const type_table[256] = { page0, ! (char *) (LETTER_PART | LETTER_START), page2, page3, page4, --- 2579,2965 ---- }; static const char page251[256] = { ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_PART), (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART) }; static const char page253[256] = { ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, 0 }; static const char page254[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, ! 0, (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, (LETTER_PART) }; static const char page255[256] = { ! 0, 0, 0, 0, (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), ! 0, 0, 0, 0, 0, 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, (LETTER_START | LETTER_PART), 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), 0, 0, ! (LETTER_START | LETTER_PART), (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, (LETTER_START | LETTER_PART), ! (LETTER_START | LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; static const char *const type_table[256] = { page0, ! (char *) (LETTER_START | LETTER_PART), page2, page3, page4, *************** static const char *const type_table[256] *** 2972,2978 **** page18, page19, page20, ! (char *) (LETTER_PART | LETTER_START), page22, page23, page24, --- 2979,2985 ---- page18, page19, page20, ! (char *) (LETTER_START | LETTER_PART), page22, page23, page24, *************** static const char *const type_table[256] *** 3111,3128 **** (char *) 0, (char *) 0, page159, ! (char *) (LETTER_PART | LETTER_START), ! (char *) (LETTER_PART | LETTER_START), ! (char *) (LETTER_PART | LETTER_START), ! (char *) (LETTER_PART | LETTER_START), page164, ! (char *) (LETTER_PART | LETTER_START), ! (char *) (LETTER_PART | LETTER_START), ! (char *) (LETTER_PART | LETTER_START), ! (char *) (LETTER_PART | LETTER_START), ! (char *) (LETTER_PART | LETTER_START), ! (char *) (LETTER_PART | LETTER_START), ! (char *) (LETTER_PART | LETTER_START), page172, (char *) 0, (char *) 0, --- 3118,3135 ---- (char *) 0, (char *) 0, page159, ! (char *) (LETTER_START | LETTER_PART), ! (char *) (LETTER_START | LETTER_PART), ! (char *) (LETTER_START | LETTER_PART), ! (char *) (LETTER_START | LETTER_PART), page164, ! (char *) (LETTER_START | LETTER_PART), ! (char *) (LETTER_START | LETTER_PART), ! (char *) (LETTER_START | LETTER_PART), ! (char *) (LETTER_START | LETTER_PART), ! (char *) (LETTER_START | LETTER_PART), ! (char *) (LETTER_START | LETTER_PART), ! (char *) (LETTER_START | LETTER_PART), page172, (char *) 0, (char *) 0, *************** static const char *const type_table[256] *** 3200,3209 **** (char *) 0, (char *) 0, (char *) 0, ! (char *) (LETTER_PART | LETTER_START), page250, page251, ! (char *) (LETTER_PART | LETTER_START), page253, page254, page255 --- 3207,3216 ---- (char *) 0, (char *) 0, (char *) 0, ! (char *) (LETTER_START | LETTER_PART), page250, page251, ! (char *) (LETTER_START | LETTER_PART), page253, page254, page255 diff -Nrc3pad gcc-3.3.3/gcc/java/check-init.c gcc-3.4.0/gcc/java/check-init.c *** gcc-3.3.3/gcc/java/check-init.c 2002-11-18 15:46:31.000000000 +0000 --- gcc-3.4.0/gcc/java/check-init.c 2003-09-28 22:18:32.000000000 +0000 *************** *** 1,18 **** /* Code to test for "definitive [un]assignment". ! Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. ! This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,20 ---- /* Code to test for "definitive [un]assignment". ! Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc. ! This file is part of GCC. ! ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 24,29 **** --- 26,33 ---- #include "config.h" #include "system.h" + #include "coretypes.h" + #include "tm.h" #include "tree.h" #include "flags.h" /* Needed for optimize. */ #include "java-tree.h" *************** static tree wfl; *** 98,112 **** #define WORD_SIZE ((unsigned int)(sizeof(word) * BITS_PER_UNIT)) ! static void check_bool_init PARAMS ((tree, words, words, words)); ! static void check_init PARAMS ((tree, words)); ! static void check_cond_init PARAMS ((tree, tree, tree, words, words, words)); ! static void check_bool2_init PARAMS ((enum tree_code, tree, tree, words, words, words)); struct alternatives; ! static void done_alternative PARAMS ((words, struct alternatives *)); ! static tree get_variable_decl PARAMS ((tree)); ! static void final_assign_error PARAMS ((tree)); ! static void check_final_reassigned PARAMS ((tree, words)); #define ALLOC_WORDS(NUM) (xmalloc ((NUM) * sizeof (word))) #define FREE_WORDS(PTR) (free (PTR)) --- 102,116 ---- #define WORD_SIZE ((unsigned int)(sizeof(word) * BITS_PER_UNIT)) ! static void check_bool_init (tree, words, words, words); ! static void check_init (tree, words); ! static void check_cond_init (tree, tree, tree, words, words, words); ! static void check_bool2_init (enum tree_code, tree, tree, words, words, words); struct alternatives; ! static void done_alternative (words, struct alternatives *); ! static tree get_variable_decl (tree); ! static void final_assign_error (tree); ! static void check_final_reassigned (tree, words); #define ALLOC_WORDS(NUM) (xmalloc ((NUM) * sizeof (word))) #define FREE_WORDS(PTR) (free (PTR)) *************** static void check_final_reassigned PARAM *** 158,165 **** Return the declaration or NULL_TREE if no interesting declaration. */ static tree ! get_variable_decl (exp) ! tree exp; { if (TREE_CODE (exp) == VAR_DECL) { --- 162,168 ---- Return the declaration or NULL_TREE if no interesting declaration. */ static tree ! get_variable_decl (tree exp) { if (TREE_CODE (exp) == VAR_DECL) { *************** get_variable_decl (exp) *** 192,199 **** } static void ! final_assign_error (name) ! tree name; { static const char format[] = "can't reassign a value to the final variable '%s'"; --- 195,201 ---- } static void ! final_assign_error (tree name) { static const char format[] = "can't reassign a value to the final variable '%s'"; *************** final_assign_error (name) *** 201,209 **** } static void ! check_final_reassigned (decl, before) ! tree decl; ! words before; { int index = DECL_BIT_INDEX (decl); /* A final local already assigned or a final parameter --- 203,209 ---- } static void ! check_final_reassigned (tree decl, words before) { int index = DECL_BIT_INDEX (decl); /* A final local already assigned or a final parameter *************** check_final_reassigned (decl, before) *** 221,230 **** BEFORE, WHEN_FALSE, and WHEN_TRUE are as in check_bool_init. */ static void ! check_cond_init (test_exp, then_exp, else_exp, ! before, when_false, when_true) ! tree test_exp, then_exp, else_exp; ! words before, when_false, when_true; { int save_start_current_locals = start_current_locals; DECLARE_BUFFERS(test_false, 6); --- 221,228 ---- BEFORE, WHEN_FALSE, and WHEN_TRUE are as in check_bool_init. */ static void ! check_cond_init (tree test_exp, tree then_exp, tree else_exp, ! words before, words when_false, words when_true) { int save_start_current_locals = start_current_locals; DECLARE_BUFFERS(test_false, 6); *************** check_cond_init (test_exp, then_exp, els *** 249,257 **** BEFORE, WHEN_FALSE, and WHEN_TRUE are as in check_bool_init. */ static void ! check_bool2_init (code, exp0, exp1, before, when_false, when_true) ! enum tree_code code; tree exp0, exp1; ! words before, when_false, when_true; { word buf[2*4]; words tmp = num_current_words <= 2 ? buf --- 247,254 ---- BEFORE, WHEN_FALSE, and WHEN_TRUE are as in check_bool_init. */ static void ! check_bool2_init (enum tree_code code, tree exp0, tree exp1, ! words before, words when_false, words when_true) { word buf[2*4]; words tmp = num_current_words <= 2 ? buf *************** check_bool2_init (code, exp0, exp1, befo *** 317,325 **** be used as temporary working areas. */ static void ! check_bool_init (exp, before, when_false, when_true) ! tree exp; ! words before, when_false, when_true; { switch (TREE_CODE (exp)) { --- 314,320 ---- be used as temporary working areas. */ static void ! check_bool_init (tree exp, words before, words when_false, words when_true) { switch (TREE_CODE (exp)) { *************** struct alternatives *** 412,418 **** /* The value of num_current_locals at the start of this compound. */ int num_locals; ! /* The value of the "before" set at the start of the control stucture. Used for SWITCH_EXPR but not set for LABELED_BLOCK_EXPR. */ words saved; --- 407,413 ---- /* The value of num_current_locals at the start of this compound. */ int num_locals; ! /* The value of the "before" set at the start of the control structure. Used for SWITCH_EXPR but not set for LABELED_BLOCK_EXPR. */ words saved; *************** struct alternatives * alternatives = NUL *** 451,459 **** of previous alternative branches. */ static void ! done_alternative (after, current) ! words after; ! struct alternatives *current; { INTERSECTN (current->combined, current->combined, after, WORDS_NEEDED (2 * current->num_locals)); --- 446,452 ---- of previous alternative branches. */ static void ! done_alternative (words after, struct alternatives *current) { INTERSECTN (current->combined, current->combined, after, WORDS_NEEDED (2 * current->num_locals)); *************** done_alternative (after, current) *** 475,483 **** /* Check for (un)initialized local variables in EXP. */ static void ! check_init (exp, before) ! tree exp; ! words before; { tree tmp; again: --- 468,474 ---- /* Check for (un)initialized local variables in EXP. */ static void ! check_init (tree exp, words before) { tree tmp; again: *************** check_init (exp, before) *** 801,807 **** case FIX_FLOOR_EXPR: case FIX_ROUND_EXPR: case ABS_EXPR: - case FFS_EXPR: /* Avoid needless recursion. */ exp = TREE_OPERAND (exp, 0); goto again; --- 792,797 ---- *************** check_init (exp, before) *** 896,913 **** case EXPR_WITH_FILE_LOCATION: { ! const char *saved_input_filename = input_filename; tree saved_wfl = wfl; tree body = EXPR_WFL_NODE (exp); - int saved_lineno = lineno; if (body == empty_stmt_node) break; wfl = exp; input_filename = EXPR_WFL_FILENAME (exp); ! lineno = EXPR_WFL_LINENO (exp); check_init (body, before); ! input_filename = saved_input_filename; ! lineno = saved_lineno; wfl = saved_wfl; } break; --- 886,901 ---- case EXPR_WITH_FILE_LOCATION: { ! location_t saved_location = input_location; tree saved_wfl = wfl; tree body = EXPR_WFL_NODE (exp); if (body == empty_stmt_node) break; wfl = exp; input_filename = EXPR_WFL_FILENAME (exp); ! input_line = EXPR_WFL_LINENO (exp); check_init (body, before); ! input_location = saved_location; wfl = saved_wfl; } break; *************** check_init (exp, before) *** 920,927 **** } void ! check_for_initialization (body, mdecl) ! tree body, mdecl; { tree decl; word buf[2]; --- 908,914 ---- } void ! check_for_initialization (tree body, tree mdecl) { tree decl; word buf[2]; *************** check_for_initialization (body, mdecl) *** 987,993 **** if (index >= 0 && ! ASSIGNED_P (before, index)) { if (! is_finit_method) ! error_with_decl (decl, "final field '%s' may not have been initialized"); } else if (is_finit_method) DECL_FIELD_FINAL_IUD (decl) = 1; --- 974,981 ---- if (index >= 0 && ! ASSIGNED_P (before, index)) { if (! is_finit_method) ! error ("%Jfinal field '%D' may not have been initialized", ! decl, decl); } else if (is_finit_method) DECL_FIELD_FINAL_IUD (decl) = 1; diff -Nrc3pad gcc-3.3.3/gcc/java/class.c gcc-3.4.0/gcc/java/class.c *** gcc-3.3.3/gcc/java/class.c 2003-02-28 20:53:07.000000000 +0000 --- gcc-3.4.0/gcc/java/class.c 2004-02-26 14:12:20.000000000 +0000 *************** *** 1,21 **** /* Functions related to building classes and their related objects. ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,21 ---- /* Functions related to building classes and their related objects. ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 27,32 **** --- 27,34 ---- #include "config.h" #include "system.h" + #include "coretypes.h" + #include "tm.h" #include "tree.h" #include "rtl.h" #include "flags.h" *************** The Free Software Foundation is independ *** 40,64 **** #include "ggc.h" #include "stdio.h" #include "target.h" /* DOS brain-damage */ #ifndef O_BINARY #define O_BINARY 0 /* MS-DOS brain-damage */ #endif ! static tree make_method_value PARAMS ((tree)); ! static tree build_java_method_type PARAMS ((tree, tree, int)); ! static int32 hashUtf8String PARAMS ((const char *, int)); ! static tree make_field_value PARAMS ((tree)); ! static tree get_dispatch_vector PARAMS ((tree)); ! static tree get_dispatch_table PARAMS ((tree, tree)); ! static void add_interface_do PARAMS ((tree, tree, int)); ! static tree maybe_layout_super_class PARAMS ((tree, tree)); ! static int assume_compiled PARAMS ((const char *)); ! static tree build_method_symbols_entry PARAMS ((tree)); static GTY(()) rtx registerClass_libfunc; - static GTY(()) rtx registerResource_libfunc; struct obstack temporary_obstack; --- 42,68 ---- #include "ggc.h" #include "stdio.h" #include "target.h" + #include "except.h" /* DOS brain-damage */ #ifndef O_BINARY #define O_BINARY 0 /* MS-DOS brain-damage */ #endif ! static tree make_method_value (tree); ! static tree build_java_method_type (tree, tree, int); ! static int32 hashUtf8String (const char *, int); ! static tree make_field_value (tree); ! static tree get_dispatch_vector (tree); ! static tree get_dispatch_table (tree, tree); ! static int supers_all_compiled (tree type); ! static void add_interface_do (tree, tree, int); ! static tree maybe_layout_super_class (tree, tree); ! static void add_miranda_methods (tree, tree); ! static int assume_compiled (const char *); ! static tree build_symbol_entry (tree); static GTY(()) rtx registerClass_libfunc; struct obstack temporary_obstack; *************** typedef struct assume_compiled_node_stru *** 84,91 **** struct assume_compiled_node_struct *child; } assume_compiled_node; ! static assume_compiled_node *find_assume_compiled_node ! PARAMS ((assume_compiled_node *, const char *)); /* This is the root of the include/exclude tree. */ --- 88,95 ---- struct assume_compiled_node_struct *child; } assume_compiled_node; ! static assume_compiled_node *find_assume_compiled_node (assume_compiled_node *, ! const char *); /* This is the root of the include/exclude tree. */ *************** static GTY(()) tree class_roots[5]; *** 103,111 **** appropriate node does not exist. */ static assume_compiled_node * ! find_assume_compiled_node (node, ident) ! assume_compiled_node *node; ! const char *ident; { while (node) { --- 107,113 ---- appropriate node does not exist. */ static assume_compiled_node * ! find_assume_compiled_node (assume_compiled_node *node, const char *ident) { while (node) { *************** find_assume_compiled_node (node, ident) *** 144,156 **** if EXCLUDEP is nonzero. */ void ! add_assume_compiled (ident, excludep) ! const char *ident; ! int excludep; { assume_compiled_node *parent; ! assume_compiled_node *node = ! xmalloc (sizeof (assume_compiled_node)); node->ident = xstrdup (ident); node->excludep = excludep; --- 146,156 ---- if EXCLUDEP is nonzero. */ void ! add_assume_compiled (const char *ident, int excludep) { + int len; assume_compiled_node *parent; ! assume_compiled_node *node = xmalloc (sizeof (assume_compiled_node)); node->ident = xstrdup (ident); node->excludep = excludep; *************** add_assume_compiled (ident, excludep) *** 181,187 **** class or a package name. Adjust PARENT accordingly. */ parent = find_assume_compiled_node (assume_compiled_tree, ident); ! if (ident[strlen (parent->ident)] != '.') parent = parent->parent; /* Insert NODE into the tree. */ --- 181,188 ---- class or a package name. Adjust PARENT accordingly. */ parent = find_assume_compiled_node (assume_compiled_tree, ident); ! len = strlen (parent->ident); ! if (parent->ident[len] && parent->ident[len] != '.') parent = parent->parent; /* Insert NODE into the tree. */ *************** add_assume_compiled (ident, excludep) *** 192,202 **** } /* Returns nonzero if IDENT is the name of a class that the compiler ! should assume has been compiled to FIXME */ static int ! assume_compiled (ident) ! const char *ident; { assume_compiled_node *i; int result; --- 193,202 ---- } /* Returns nonzero if IDENT is the name of a class that the compiler ! should assume has been compiled to object code. */ static int ! assume_compiled (const char *ident) { assume_compiled_node *i; int result; *************** assume_compiled (ident) *** 217,229 **** Also, PREFIX is prepended, and SUFFIX is appended. */ tree ! ident_subst (old_name, old_length, prefix, old_char, new_char, suffix) ! const char* old_name; ! int old_length; ! const char *prefix; ! int old_char; ! int new_char; ! const char *suffix; { int prefix_len = strlen (prefix); int suffix_len = strlen (suffix); --- 217,228 ---- Also, PREFIX is prepended, and SUFFIX is appended. */ tree ! ident_subst (const char* old_name, ! int old_length, ! const char *prefix, ! int old_char, ! int new_char, ! const char *suffix) { int prefix_len = strlen (prefix); int suffix_len = strlen (suffix); *************** ident_subst (old_name, old_length, prefi *** 250,261 **** Also, PREFIX is prepended, and SUFFIX is appended. */ tree ! identifier_subst (old_id, prefix, old_char, new_char, suffix) ! const tree old_id; ! const char *prefix; ! int old_char; ! int new_char; ! const char *suffix; { return ident_subst (IDENTIFIER_POINTER (old_id), IDENTIFIER_LENGTH (old_id), prefix, old_char, new_char, suffix); --- 249,259 ---- Also, PREFIX is prepended, and SUFFIX is appended. */ tree ! identifier_subst (const tree old_id, ! const char *prefix, ! int old_char, ! int new_char, ! const char *suffix) { return ident_subst (IDENTIFIER_POINTER (old_id), IDENTIFIER_LENGTH (old_id), prefix, old_char, new_char, suffix); *************** identifier_subst (old_id, prefix, old_ch *** 265,273 **** prefixed by PREFIX. */ tree ! mangled_classname (prefix, type) ! const char *prefix; ! tree type; { tree ident = TYPE_NAME (type); if (TREE_CODE (ident) != IDENTIFIER_NODE) --- 263,269 ---- prefixed by PREFIX. */ tree ! mangled_classname (const char *prefix, tree type) { tree ident = TYPE_NAME (type); if (TREE_CODE (ident) != IDENTIFIER_NODE) *************** mangled_classname (prefix, type) *** 276,286 **** } tree ! make_class () { tree type; type = make_node (RECORD_TYPE); ! TYPE_BINFO (type) = make_tree_vec (6); MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC (type); return type; --- 272,282 ---- } tree ! make_class (void) { tree type; type = make_node (RECORD_TYPE); ! TYPE_BINFO (type) = make_tree_vec (BINFO_ELTS); MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC (type); return type; *************** make_class () *** 291,298 **** return a corresponding IDENTIFIER_NODE, except using '.' as separator. */ tree ! unmangle_classname (name, name_length) ! const char *name; int name_length; { tree to_return = ident_subst (name, name_length, "", '/', '.', ""); /* It's not sufficient to compare to_return and get_identifier --- 287,293 ---- return a corresponding IDENTIFIER_NODE, except using '.' as separator. */ tree ! unmangle_classname (const char *name, int name_length) { tree to_return = ident_subst (name, name_length, "", '/', '.', ""); /* It's not sufficient to compare to_return and get_identifier *************** unmangle_classname (name, name_length) *** 310,333 **** return to_return; } tree ! push_class (class_type, class_name) ! tree class_type, class_name; { tree decl, signature; ! const char *save_input_filename = input_filename; ! int save_lineno = lineno; tree source_name = identifier_subst (class_name, "", '.', '/', ".java"); CLASS_P (class_type) = 1; input_filename = IDENTIFIER_POINTER (source_name); ! lineno = 0; decl = build_decl (TYPE_DECL, class_name, class_type); /* dbxout needs a DECL_SIZE if in gstabs mode */ DECL_SIZE (decl) = integer_zero_node; ! input_filename = save_input_filename; ! lineno = save_lineno; signature = identifier_subst (class_name, "L", '.', '/', ";"); IDENTIFIER_SIGNATURE_TYPE (signature) = build_pointer_type (class_type); --- 305,402 ---- return to_return; } + + /* Given a class, create the DECLs for all its associated indirect dispatch tables. */ + void + gen_indirect_dispatch_tables (tree type) + { + const char *typename = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type))); + { + tree field = NULL; + char *buf = alloca (strlen (typename) + strlen ("_catch_classes_") + 1); + tree catch_class_type = make_node (RECORD_TYPE); + + sprintf (buf, "_catch_classes_%s", typename); + PUSH_FIELD (catch_class_type, field, "address", utf8const_ptr_type); + PUSH_FIELD (catch_class_type, field, "classname", ptr_type_node); + FINISH_RECORD (catch_class_type); + + TYPE_CTABLE_DECL (type) + = build_decl (VAR_DECL, get_identifier (buf), + build_array_type (catch_class_type, 0)); + DECL_EXTERNAL (TYPE_CTABLE_DECL (type)) = 1; + TREE_STATIC (TYPE_CTABLE_DECL (type)) = 1; + TREE_READONLY (TYPE_CTABLE_DECL (type)) = 1; + TREE_CONSTANT (TYPE_CTABLE_DECL (type)) = 1; + DECL_IGNORED_P (TYPE_CTABLE_DECL (type)) = 1; + pushdecl (TYPE_CTABLE_DECL (type)); + } + + if (flag_indirect_dispatch) + { + { + char *buf = alloca (strlen (typename) + strlen ("_otable_syms_") + 1); + + sprintf (buf, "_otable_%s", typename); + TYPE_OTABLE_DECL (type) = + build_decl (VAR_DECL, get_identifier (buf), otable_type); + DECL_EXTERNAL (TYPE_OTABLE_DECL (type)) = 1; + TREE_STATIC (TYPE_OTABLE_DECL (type)) = 1; + TREE_READONLY (TYPE_OTABLE_DECL (type)) = 1; + TREE_CONSTANT (TYPE_OTABLE_DECL (type)) = 1; + DECL_IGNORED_P (TYPE_OTABLE_DECL (type)) = 1; + pushdecl (TYPE_OTABLE_DECL (type)); + sprintf (buf, "_otable_syms_%s", typename); + TYPE_OTABLE_SYMS_DECL (type) = + build_decl (VAR_DECL, get_identifier (buf), symbols_array_type); + TREE_STATIC (TYPE_OTABLE_SYMS_DECL (type)) = 1; + TREE_CONSTANT (TYPE_OTABLE_SYMS_DECL (type)) = 1; + DECL_IGNORED_P(TYPE_OTABLE_SYMS_DECL (type)) = 1; + pushdecl (TYPE_OTABLE_SYMS_DECL (type)); + } + + { + char *buf = alloca (strlen (typename) + strlen ("_atable_syms_") + 1); + tree decl; + + sprintf (buf, "_atable_%s", typename); + TYPE_ATABLE_DECL (type) = decl = + build_decl (VAR_DECL, get_identifier (buf), atable_type); + DECL_EXTERNAL (decl) = 1; + TREE_STATIC (decl) = 1; + TREE_READONLY (decl) = 1; + TREE_CONSTANT (decl) = 1; + DECL_IGNORED_P (decl) = 1; + /* Mark the atable as belonging to this class. */ + pushdecl (decl); + MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (decl); + DECL_OWNER (decl) = type; + sprintf (buf, "_atable_syms_%s", typename); + TYPE_ATABLE_SYMS_DECL (type) = + build_decl (VAR_DECL, get_identifier (buf), symbols_array_type); + TREE_STATIC (TYPE_ATABLE_SYMS_DECL (type)) = 1; + TREE_CONSTANT (TYPE_ATABLE_SYMS_DECL (type)) = 1; + DECL_IGNORED_P (TYPE_ATABLE_SYMS_DECL (type)) = 1; + pushdecl (TYPE_ATABLE_SYMS_DECL (type)); + } + } + } + tree ! push_class (tree class_type, tree class_name) { tree decl, signature; ! location_t saved_loc = input_location; tree source_name = identifier_subst (class_name, "", '.', '/', ".java"); CLASS_P (class_type) = 1; input_filename = IDENTIFIER_POINTER (source_name); ! input_line = 0; decl = build_decl (TYPE_DECL, class_name, class_type); /* dbxout needs a DECL_SIZE if in gstabs mode */ DECL_SIZE (decl) = integer_zero_node; ! input_location = saved_loc; signature = identifier_subst (class_name, "L", '.', '/', ";"); IDENTIFIER_SIGNATURE_TYPE (signature) = build_pointer_type (class_type); *************** push_class (class_type, class_name) *** 347,354 **** fill in field or methods, or do layout_type. */ tree ! lookup_class (name) ! tree name; { tree decl = IDENTIFIER_CLASS_VALUE (name); if (decl == NULL_TREE) --- 416,422 ---- fill in field or methods, or do layout_type. */ tree ! lookup_class (tree name) { tree decl = IDENTIFIER_CLASS_VALUE (name); if (decl == NULL_TREE) *************** lookup_class (name) *** 357,367 **** } void ! set_super_info (access_flags, this_class, super_class, interfaces_count) ! int access_flags; ! tree this_class; ! tree super_class; ! int interfaces_count; { int total_supers = interfaces_count; tree class_decl = TYPE_NAME (this_class); --- 425,432 ---- } void ! set_super_info (int access_flags, tree this_class, ! tree super_class, int interfaces_count) { int total_supers = interfaces_count; tree class_decl = TYPE_NAME (this_class); *************** set_super_info (access_flags, this_class *** 371,380 **** TYPE_BINFO_BASETYPES (this_class) = make_tree_vec (total_supers); if (super_class) { ! tree super_binfo = make_tree_vec (6); BINFO_TYPE (super_binfo) = super_class; BINFO_OFFSET (super_binfo) = integer_zero_node; - TREE_VIA_PUBLIC (super_binfo) = 1; TREE_VEC_ELT (BINFO_BASETYPES (TYPE_BINFO (this_class)), 0) = super_binfo; CLASS_HAS_SUPER (this_class) = 1; --- 436,444 ---- TYPE_BINFO_BASETYPES (this_class) = make_tree_vec (total_supers); if (super_class) { ! tree super_binfo = make_tree_vec (BINFO_ELTS); BINFO_TYPE (super_binfo) = super_class; BINFO_OFFSET (super_binfo) = integer_zero_node; TREE_VEC_ELT (BINFO_BASETYPES (TYPE_BINFO (this_class)), 0) = super_binfo; CLASS_HAS_SUPER (this_class) = 1; *************** set_super_info (access_flags, this_class *** 384,392 **** } void ! set_class_decl_access_flags (access_flags, class_decl) ! int access_flags; ! tree class_decl; { if (access_flags & ACC_PUBLIC) CLASS_PUBLIC (class_decl) = 1; if (access_flags & ACC_FINAL) CLASS_FINAL (class_decl) = 1; --- 448,454 ---- } void ! set_class_decl_access_flags (int access_flags, tree class_decl) { if (access_flags & ACC_PUBLIC) CLASS_PUBLIC (class_decl) = 1; if (access_flags & ACC_FINAL) CLASS_FINAL (class_decl) = 1; *************** set_class_decl_access_flags (access_flag *** 403,410 **** direct sub-classes of Object are 1, and so on. */ int ! class_depth (clas) ! tree clas; { int depth = 0; if (! CLASS_LOADED_P (clas)) --- 465,471 ---- direct sub-classes of Object are 1, and so on. */ int ! class_depth (tree clas) { int depth = 0; if (! CLASS_LOADED_P (clas)) *************** class_depth (clas) *** 422,429 **** /* Return true iff TYPE2 is an interface that extends interface TYPE1 */ int ! interface_of_p (type1, type2) ! tree type1, type2; { int n, i; tree basetype_vec; --- 483,489 ---- /* Return true iff TYPE2 is an interface that extends interface TYPE1 */ int ! interface_of_p (tree type1, tree type2) { int n, i; tree basetype_vec; *************** interface_of_p (type1, type2) *** 450,457 **** /* Return true iff TYPE1 inherits from TYPE2. */ int ! inherits_from_p (type1, type2) ! tree type1, type2; { while (type1 != NULL_TREE && TREE_CODE (type1) == RECORD_TYPE) { --- 510,516 ---- /* Return true iff TYPE1 inherits from TYPE2. */ int ! inherits_from_p (tree type1, tree type2) { while (type1 != NULL_TREE && TREE_CODE (type1) == RECORD_TYPE) { *************** inherits_from_p (type1, type2) *** 465,472 **** /* Return a 1 iff TYPE1 is an enclosing context for TYPE2 */ int ! enclosing_context_p (type1, type2) ! tree type1, type2; { if (!INNER_CLASS_TYPE_P (type2)) return 0; --- 524,530 ---- /* Return a 1 iff TYPE1 is an enclosing context for TYPE2 */ int ! enclosing_context_p (tree type1, tree type2) { if (!INNER_CLASS_TYPE_P (type2)) return 0; *************** enclosing_context_p (type1, type2) *** 486,493 **** /* Return 1 iff there exists a common enclosing context between TYPE1 and TYPE2. */ ! int common_enclosing_context_p (type1, type2) ! tree type1, type2; { if (!PURE_INNER_CLASS_TYPE_P (type1) || !PURE_INNER_CLASS_TYPE_P (type2)) return 0; --- 544,550 ---- /* Return 1 iff there exists a common enclosing context between TYPE1 and TYPE2. */ ! int common_enclosing_context_p (tree type1, tree type2) { if (!PURE_INNER_CLASS_TYPE_P (type1) || !PURE_INNER_CLASS_TYPE_P (type2)) return 0; *************** int common_enclosing_context_p (type1, t *** 508,523 **** } static void ! add_interface_do (basetype_vec, interface_class, i) ! tree basetype_vec, interface_class; ! int i; { ! tree interface_binfo = make_tree_vec (6); BINFO_TYPE (interface_binfo) = interface_class; BINFO_OFFSET (interface_binfo) = integer_zero_node; BINFO_VPTR_FIELD (interface_binfo) = integer_zero_node; TREE_VIA_VIRTUAL (interface_binfo) = 1; - TREE_VIA_PUBLIC (interface_binfo) = 1; TREE_VEC_ELT (basetype_vec, i) = interface_binfo; } --- 565,577 ---- } static void ! add_interface_do (tree basetype_vec, tree interface_class, int i) { ! tree interface_binfo = make_tree_vec (BINFO_ELTS); BINFO_TYPE (interface_binfo) = interface_class; BINFO_OFFSET (interface_binfo) = integer_zero_node; BINFO_VPTR_FIELD (interface_binfo) = integer_zero_node; TREE_VIA_VIRTUAL (interface_binfo) = 1; TREE_VEC_ELT (basetype_vec, i) = interface_binfo; } *************** add_interface_do (basetype_vec, interfac *** 526,533 **** if attempt is made to add it twice. */ tree ! maybe_add_interface (this_class, interface_class) ! tree this_class, interface_class; { tree basetype_vec = TYPE_BINFO_BASETYPES (this_class); int i; --- 580,586 ---- if attempt is made to add it twice. */ tree ! maybe_add_interface (tree this_class, tree interface_class) { tree basetype_vec = TYPE_BINFO_BASETYPES (this_class); int i; *************** maybe_add_interface (this_class, interfa *** 551,558 **** /* Add the INTERFACE_CLASS as one of the interfaces of THIS_CLASS. */ void ! add_interface (this_class, interface_class) ! tree this_class, interface_class; { tree basetype_vec = TYPE_BINFO_BASETYPES (this_class); int i; --- 604,610 ---- /* Add the INTERFACE_CLASS as one of the interfaces of THIS_CLASS. */ void ! add_interface (tree this_class, tree interface_class) { tree basetype_vec = TYPE_BINFO_BASETYPES (this_class); int i; *************** add_interface (this_class, interface_cla *** 575,583 **** in the list (*LIST) whose DECL_NAME is NAME. */ static tree * ! find_named_method (list, name) ! tree *list; ! tree name; { while (*list && DECL_NAME (*list) != name) list = &TREE_CHAIN (*list); --- 627,633 ---- in the list (*LIST) whose DECL_NAME is NAME. */ static tree * ! find_named_method (tree *list, tree name) { while (*list && DECL_NAME (*list) != name) list = &TREE_CHAIN (*list); *************** find_named_method (list, name) *** 586,595 **** #endif static tree ! build_java_method_type (fntype, this_class, access_flags) ! tree fntype; ! tree this_class; ! int access_flags; { if (access_flags & ACC_STATIC) return fntype; --- 636,642 ---- #endif static tree ! build_java_method_type (tree fntype, tree this_class, int access_flags) { if (access_flags & ACC_STATIC) return fntype; *************** build_java_method_type (fntype, this_cla *** 597,607 **** } tree ! add_method_1 (this_class, access_flags, name, function_type) ! tree this_class; ! int access_flags; ! tree name; ! tree function_type; { tree method_type, fndecl; --- 644,650 ---- } tree ! add_method_1 (tree this_class, int access_flags, tree name, tree function_type) { tree method_type, fndecl; *************** add_method_1 (this_class, access_flags, *** 653,659 **** METHOD_FINAL (fndecl) = DECL_INLINE (fndecl) = 1; if (access_flags & ACC_SYNCHRONIZED) METHOD_SYNCHRONIZED (fndecl) = 1; if (access_flags & ACC_ABSTRACT) METHOD_ABSTRACT (fndecl) = 1; - if (access_flags & ACC_TRANSIENT) METHOD_TRANSIENT (fndecl) = 1; if (access_flags & ACC_STRICT) METHOD_STRICTFP (fndecl) = 1; return fndecl; } --- 696,701 ---- *************** add_method_1 (this_class, access_flags, *** 663,673 **** Its signature (mangled type) is METHOD_SIG (an IDENTIFIER_NODE). */ tree ! add_method (this_class, access_flags, name, method_sig) ! tree this_class; ! int access_flags; ! tree name; ! tree method_sig; { tree function_type, fndecl; const unsigned char *sig --- 705,711 ---- Its signature (mangled type) is METHOD_SIG (an IDENTIFIER_NODE). */ tree ! add_method (tree this_class, int access_flags, tree name, tree method_sig) { tree function_type, fndecl; const unsigned char *sig *************** add_method (this_class, access_flags, na *** 683,693 **** } tree ! add_field (class, name, field_type, flags) ! tree class; ! tree name; ! tree field_type; ! int flags; { int is_static = (flags & ACC_STATIC) != 0; tree field; --- 721,727 ---- } tree ! add_field (tree class, tree name, tree field_type, int flags) { int is_static = (flags & ACC_STATIC) != 0; tree field; *************** add_field (class, name, field_type, flag *** 719,726 **** /* Associate a constant value CONSTANT with VAR_DECL FIELD. */ void ! set_constant_value (field, constant) ! tree field, constant; { if (field == NULL_TREE) warning ("misplaced ConstantValue attribute (not in any field)"); --- 753,759 ---- /* Associate a constant value CONSTANT with VAR_DECL FIELD. */ void ! set_constant_value (tree field, tree constant) { if (field == NULL_TREE) warning ("misplaced ConstantValue attribute (not in any field)"); *************** set_constant_value (field, constant) *** 747,755 **** #if 0 int ! strLengthUtf8 (str, len) ! char *str; ! int len; { register unsigned char* ptr = (unsigned char*) str; register unsigned char *limit = ptr + len; --- 780,786 ---- #if 0 int ! strLengthUtf8 (char *str, int len) { register unsigned char* ptr = (unsigned char*) str; register unsigned char *limit = ptr + len; *************** strLengthUtf8 (str, len) *** 768,779 **** */ static int32 ! hashUtf8String (str, len) ! const char *str; ! int len; { ! register const unsigned char* ptr = (const unsigned char*) str; ! register const unsigned char *limit = ptr + len; int32 hash = 0; for (; ptr < limit;) { --- 799,808 ---- */ static int32 ! hashUtf8String (const char *str, int len) { ! const unsigned char* ptr = (const unsigned char*) str; ! const unsigned char *limit = ptr + len; int32 hash = 0; for (; ptr < limit;) { *************** hashUtf8String (str, len) *** 785,901 **** return hash; } ! /* Generate a byte array representing the contents of FILENAME. The ! array is assigned a unique local symbol. The array represents a ! compiled Java resource, which is accessed by the runtime using ! NAME. */ ! void ! compile_resource_file (name, filename) ! char *name; ! const char *filename; ! { ! struct stat stat_buf; ! int fd; ! char *buffer; ! char buf[60]; ! tree rtype, field = NULL_TREE, data_type, rinit, data, decl; ! static int Jr_count = 0; ! ! fd = open (filename, O_RDONLY | O_BINARY); ! if (fd < 0) ! { ! perror ("Failed to read resource file"); ! return; ! } ! if (fstat (fd, &stat_buf) != 0 ! || ! S_ISREG (stat_buf.st_mode)) ! { ! perror ("Could not figure length of resource file"); ! return; ! } ! buffer = xmalloc (strlen (name) + stat_buf.st_size); ! strcpy (buffer, name); ! read (fd, buffer + strlen (name), stat_buf.st_size); ! close (fd); ! data_type = build_prim_array_type (unsigned_byte_type_node, ! strlen (name) + stat_buf.st_size); ! rtype = make_node (RECORD_TYPE); ! PUSH_FIELD (rtype, field, "name_length", unsigned_int_type_node); ! PUSH_FIELD (rtype, field, "resource_length", unsigned_int_type_node); ! PUSH_FIELD (rtype, field, "data", data_type); ! FINISH_RECORD (rtype); ! START_RECORD_CONSTRUCTOR (rinit, rtype); ! PUSH_FIELD_VALUE (rinit, "name_length", ! build_int_2 (strlen (name), 0)); ! PUSH_FIELD_VALUE (rinit, "resource_length", ! build_int_2 (stat_buf.st_size, 0)); ! data = build_string (strlen(name) + stat_buf.st_size, buffer); ! TREE_TYPE (data) = data_type; ! PUSH_FIELD_VALUE (rinit, "data", data); ! FINISH_RECORD_CONSTRUCTOR (rinit); ! TREE_CONSTANT (rinit) = 1; ! ! /* Generate a unique-enough identifier. */ ! sprintf(buf, "_Jr%d", ++Jr_count); ! ! decl = build_decl (VAR_DECL, get_identifier (buf), rtype); ! TREE_STATIC (decl) = 1; ! DECL_ARTIFICIAL (decl) = 1; ! DECL_IGNORED_P (decl) = 1; ! TREE_READONLY (decl) = 1; ! TREE_THIS_VOLATILE (decl) = 0; ! DECL_INITIAL (decl) = rinit; ! layout_decl (decl, 0); ! pushdecl (decl); ! rest_of_decl_compilation (decl, (char*) 0, global_bindings_p (), 0); ! make_decl_rtl (decl, (char*) 0); ! assemble_variable (decl, 1, 0, 0); ! ! { ! tree init_name = get_file_function_name ('I'); ! tree init_type = build_function_type (void_type_node, end_params_node); ! tree init_decl; ! ! init_decl = build_decl (FUNCTION_DECL, init_name, init_type); ! SET_DECL_ASSEMBLER_NAME (init_decl, init_name); ! TREE_STATIC (init_decl) = 1; ! current_function_decl = init_decl; ! DECL_RESULT (init_decl) = build_decl (RESULT_DECL, ! NULL_TREE, void_type_node); ! ! /* It can be a static function as long as collect2 does not have ! to scan the object file to find its ctor/dtor routine. */ ! TREE_PUBLIC (init_decl) = ! targetm.have_ctors_dtors; ! ! pushlevel (0); ! make_decl_rtl (init_decl, NULL); ! init_function_start (init_decl, input_filename, 0); ! expand_function_start (init_decl, 0); ! ! emit_library_call (registerResource_libfunc, 0, VOIDmode, 1, ! gen_rtx (SYMBOL_REF, Pmode, buf), ! Pmode); ! ! expand_function_end (input_filename, 0, 0); ! poplevel (1, 0, 1); ! { ! /* Force generation, even with -O3 or deeper. Gross hack. FIXME */ ! int saved_flag = flag_inline_functions; ! flag_inline_functions = 0; ! rest_of_compilation (init_decl); ! flag_inline_functions = saved_flag; ! } ! current_function_decl = NULL_TREE; ! (* targetm.asm_out.constructor) (XEXP (DECL_RTL (init_decl), 0), ! DEFAULT_INIT_PRIORITY); ! } ! } ! ! tree utf8_decl_list = NULL_TREE; tree ! build_utf8_ref (name) ! tree name; { const char * name_ptr = IDENTIFIER_POINTER(name); int name_len = IDENTIFIER_LENGTH(name); --- 814,823 ---- return hash; } ! static GTY(()) tree utf8_decl_list = NULL_TREE; tree ! build_utf8_ref (tree name) { const char * name_ptr = IDENTIFIER_POINTER(name); int name_len = IDENTIFIER_LENGTH(name); *************** build_utf8_ref (name) *** 935,957 **** TREE_READONLY (decl) = 1; TREE_THIS_VOLATILE (decl) = 0; DECL_INITIAL (decl) = cinit; ! #ifdef HAVE_GAS_SHF_MERGE ! { ! int decl_size; ! /* Ensure decl_size is a multiple of utf8const_type's alignment. */ ! decl_size = (name_len + 5 + TYPE_ALIGN_UNIT (utf8const_type) - 1) ! & ~(TYPE_ALIGN_UNIT (utf8const_type) - 1); ! if (flag_merge_constants && decl_size < 256) ! { ! char buf[32]; ! int flags = (SECTION_OVERRIDE ! | SECTION_MERGE | (SECTION_ENTSIZE & decl_size)); ! sprintf (buf, ".rodata.jutf8.%d", decl_size); ! named_section_flags (buf, flags); ! DECL_SECTION_NAME (decl) = build_string (strlen (buf), buf); ! } ! } ! #endif TREE_CHAIN (decl) = utf8_decl_list; layout_decl (decl, 0); pushdecl (decl); --- 857,880 ---- TREE_READONLY (decl) = 1; TREE_THIS_VOLATILE (decl) = 0; DECL_INITIAL (decl) = cinit; ! ! if (HAVE_GAS_SHF_MERGE) ! { ! int decl_size; ! /* Ensure decl_size is a multiple of utf8const_type's alignment. */ ! decl_size = (name_len + 5 + TYPE_ALIGN_UNIT (utf8const_type) - 1) ! & ~(TYPE_ALIGN_UNIT (utf8const_type) - 1); ! if (flag_merge_constants && decl_size < 256) ! { ! char buf[32]; ! int flags = (SECTION_OVERRIDE ! | SECTION_MERGE | (SECTION_ENTSIZE & decl_size)); ! sprintf (buf, ".rodata.jutf8.%d", decl_size); ! named_section_flags (buf, flags); ! DECL_SECTION_NAME (decl) = build_string (strlen (buf), buf); ! } ! } ! TREE_CHAIN (decl) = utf8_decl_list; layout_decl (decl, 0); pushdecl (decl); *************** build_utf8_ref (name) *** 963,974 **** return ref; } /* Build a reference to the class TYPE. Also handles primitive types and array types. */ tree ! build_class_ref (type) ! tree type; { int is_compiled = is_compiled_class (type); if (is_compiled) --- 886,910 ---- return ref; } + /* Like build_class_ref, but instead of a direct reference generate a + pointer into the constant pool. */ + + static tree + build_indirect_class_ref (tree type) + { + int index; + tree cl; + index = alloc_class_constant (type); + cl = build_ref_from_constant_pool (index); + TREE_TYPE (cl) = promote_type (class_ptr_type); + return cl; + } + /* Build a reference to the class TYPE. Also handles primitive types and array types. */ tree ! build_class_ref (tree type) { int is_compiled = is_compiled_class (type); if (is_compiled) *************** build_class_ref (type) *** 976,981 **** --- 912,928 ---- tree ref, decl_name, decl; if (TREE_CODE (type) == POINTER_TYPE) type = TREE_TYPE (type); + + /* FIXME: we really want an indirect reference to our + superclass. However, libgcj assumes that a superclass + pointer always points directly to a class. As a workaround + we always emit this hard superclass reference. */ + if (flag_indirect_dispatch + && type != output_class + && type != CLASSTYPE_SUPER (output_class) + && TREE_CODE (type) == RECORD_TYPE) + return build_indirect_class_ref (type); + if (TREE_CODE (type) == RECORD_TYPE) { if (TYPE_SIZE (type) == error_mark_node) *************** build_class_ref (type) *** 1058,1080 **** return ref; } else ! { ! int index; ! tree cl; ! index = alloc_class_constant (type); ! cl = build_ref_from_constant_pool (index); ! TREE_TYPE (cl) = promote_type (class_ptr_type); ! return cl; ! } } tree ! build_static_field_ref (fdecl) ! tree fdecl; { tree fclass = DECL_CONTEXT (fdecl); int is_compiled = is_compiled_class (fclass); ! if (is_compiled) { if (!DECL_RTL_SET_P (fdecl)) { --- 1005,1032 ---- return ref; } else ! return build_indirect_class_ref (type); } tree ! build_static_field_ref (tree fdecl) { tree fclass = DECL_CONTEXT (fdecl); int is_compiled = is_compiled_class (fclass); ! ! /* Allow static final fields to fold to a constant. When using ! -fno-assume-compiled, gcj will sometimes try to fold a field from ! an uncompiled class. This is required when the field in question ! meets the appropriate criteria for a compile-time constant. ! However, currently sometimes gcj is too eager and will end up ! returning the field itself, leading to an incorrect external ! reference being generated. */ ! if ((is_compiled ! && (! flag_indirect_dispatch || current_class == fclass)) ! || (FIELD_FINAL (fdecl) && DECL_INITIAL (fdecl) != NULL_TREE ! && (JSTRING_TYPE_P (TREE_TYPE (fdecl)) ! || JNUMERIC_TYPE_P (TREE_TYPE (fdecl))) ! && TREE_CONSTANT (DECL_INITIAL (fdecl)))) { if (!DECL_RTL_SET_P (fdecl)) { *************** build_static_field_ref (fdecl) *** 1084,1090 **** } return fdecl; } ! else { /* Compile as: * *(FTYPE*)build_class_ref(FCLASS)->fields[INDEX].info.addr */ --- 1036,1054 ---- } return fdecl; } ! ! if (flag_indirect_dispatch) ! { ! tree table_index ! = build_int_2 (get_symbol_table_index ! (fdecl, &TYPE_ATABLE_METHODS (output_class)), 0); ! tree field_address ! = build (ARRAY_REF, build_pointer_type (TREE_TYPE (fdecl)), ! TYPE_ATABLE_DECL (output_class), table_index); ! return fold (build1 (INDIRECT_REF, TREE_TYPE (fdecl), ! field_address)); ! } ! else { /* Compile as: * *(FTYPE*)build_class_ref(FCLASS)->fields[INDEX].info.addr */ *************** build_static_field_ref (fdecl) *** 1118,1125 **** } int ! get_access_flags_from_decl (decl) ! tree decl; { int access_flags = 0; if (TREE_CODE (decl) == FIELD_DECL || TREE_CODE (decl) == VAR_DECL) --- 1082,1088 ---- } int ! get_access_flags_from_decl (tree decl) { int access_flags = 0; if (TREE_CODE (decl) == FIELD_DECL || TREE_CODE (decl) == VAR_DECL) *************** get_access_flags_from_decl (decl) *** 1180,1202 **** access_flags |= ACC_NATIVE; if (METHOD_ABSTRACT (decl)) access_flags |= ACC_ABSTRACT; - if (METHOD_TRANSIENT (decl)) - access_flags |= ACC_TRANSIENT; if (METHOD_STRICTFP (decl)) access_flags |= ACC_STRICT; return access_flags; } abort (); } static tree ! make_field_value (fdecl) ! tree fdecl; { tree finit; int flags; tree type = TREE_TYPE (fdecl); ! int resolved = is_compiled_class (type); START_RECORD_CONSTRUCTOR (finit, field_type_node); PUSH_FIELD_VALUE (finit, "name", build_utf8_ref (DECL_NAME (fdecl))); --- 1143,1164 ---- access_flags |= ACC_NATIVE; if (METHOD_ABSTRACT (decl)) access_flags |= ACC_ABSTRACT; if (METHOD_STRICTFP (decl)) access_flags |= ACC_STRICT; + if (METHOD_INVISIBLE (decl)) + access_flags |= ACC_INVISIBLE; return access_flags; } abort (); } static tree ! make_field_value (tree fdecl) { tree finit; int flags; tree type = TREE_TYPE (fdecl); ! int resolved = is_compiled_class (type) && ! flag_indirect_dispatch; START_RECORD_CONSTRUCTOR (finit, field_type_node); PUSH_FIELD_VALUE (finit, "name", build_utf8_ref (DECL_NAME (fdecl))); *************** make_field_value (fdecl) *** 1221,1227 **** PUSH_FIELD_VALUE (finit, "info", ! build (CONSTRUCTOR, field_info_union_node, NULL_TREE, build_tree_list ((FIELD_STATIC (fdecl) ? TREE_CHAIN (TYPE_FIELDS (field_info_union_node)) --- 1183,1189 ---- PUSH_FIELD_VALUE (finit, "info", ! build_constructor (field_info_union_node, build_tree_list ((FIELD_STATIC (fdecl) ? TREE_CHAIN (TYPE_FIELDS (field_info_union_node)) *************** make_field_value (fdecl) *** 1235,1242 **** } static tree ! make_method_value (mdecl) ! tree mdecl; { static int method_name_count = 0; tree minit; --- 1197,1203 ---- } static tree ! make_method_value (tree mdecl) { static int method_name_count = 0; tree minit; *************** make_method_value (mdecl) *** 1291,1297 **** table = tree_cons (NULL_TREE, utf8, table); } type = build_prim_array_type (ptr_type_node, length); ! table = build (CONSTRUCTOR, type, NULL_TREE, table); /* Compute something unique enough. */ sprintf (buf, "_methods%d", method_name_count++); array = build_decl (VAR_DECL, get_identifier (buf), type); --- 1252,1258 ---- table = tree_cons (NULL_TREE, utf8, table); } type = build_prim_array_type (ptr_type_node, length); ! table = build_constructor (type, table); /* Compute something unique enough. */ sprintf (buf, "_methods%d", method_name_count++); array = build_decl (VAR_DECL, get_identifier (buf), type); *************** make_method_value (mdecl) *** 1312,1322 **** } static tree ! get_dispatch_vector (type) ! tree type; { tree vtable = TYPE_VTABLE (type); ! if (vtable == NULL) { HOST_WIDE_INT i; tree method; --- 1273,1283 ---- } static tree ! get_dispatch_vector (tree type) { tree vtable = TYPE_VTABLE (type); ! ! if (vtable == NULL_TREE) { HOST_WIDE_INT i; tree method; *************** get_dispatch_vector (type) *** 1344,1351 **** } static tree ! get_dispatch_table (type, this_class_addr) ! tree type, this_class_addr; { int abstract_p = CLASS_ABSTRACT (TYPE_NAME (type)); tree vtable = get_dispatch_vector (type); --- 1305,1311 ---- } static tree ! get_dispatch_table (tree type, tree this_class_addr) { int abstract_p = CLASS_ABSTRACT (TYPE_NAME (type)); tree vtable = get_dispatch_vector (type); *************** get_dispatch_table (type, this_class_add *** 1361,1368 **** if (METHOD_ABSTRACT (method)) { if (! abstract_p) ! warning_with_decl (method, ! "abstract method in non-abstract class"); if (TARGET_VTABLE_USES_DESCRIPTORS) for (j = 0; j < TARGET_VTABLE_USES_DESCRIPTORS; ++j) --- 1321,1327 ---- if (METHOD_ABSTRACT (method)) { if (! abstract_p) ! warning ("%Jabstract method in non-abstract class", method); if (TARGET_VTABLE_USES_DESCRIPTORS) for (j = 0; j < TARGET_VTABLE_USES_DESCRIPTORS; ++j) *************** get_dispatch_table (type, this_class_add *** 1414,1427 **** if (TARGET_VTABLE_USES_DESCRIPTORS) arraysize *= TARGET_VTABLE_USES_DESCRIPTORS; arraysize += 2; ! return build (CONSTRUCTOR, ! build_prim_array_type (nativecode_ptr_type_node, arraysize), ! NULL_TREE, list); } void ! make_class_data (type) ! tree type; { tree decl, cons, temp; tree field, fields_decl; --- 1373,1396 ---- if (TARGET_VTABLE_USES_DESCRIPTORS) arraysize *= TARGET_VTABLE_USES_DESCRIPTORS; arraysize += 2; ! return build_constructor (build_prim_array_type (nativecode_ptr_type_node, ! arraysize), list); ! } ! ! static int ! supers_all_compiled (tree type) ! { ! while (type != NULL_TREE) ! { ! if (!assume_compiled (IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type))))) ! return 0; ! type = CLASSTYPE_SUPER (type); ! } ! return 1; } void ! make_class_data (tree type) { tree decl, cons, temp; tree field, fields_decl; *************** make_class_data (type) *** 1488,1495 **** field_array_type = build_prim_array_type (field_type_node, field_count); fields_decl = build_decl (VAR_DECL, mangled_classname ("_FL_", type), field_array_type); ! DECL_INITIAL (fields_decl) = build (CONSTRUCTOR, field_array_type, ! NULL_TREE, static_fields); TREE_STATIC (fields_decl) = 1; DECL_ARTIFICIAL (fields_decl) = 1; DECL_IGNORED_P (fields_decl) = 1; --- 1457,1464 ---- field_array_type = build_prim_array_type (field_type_node, field_count); fields_decl = build_decl (VAR_DECL, mangled_classname ("_FL_", type), field_array_type); ! DECL_INITIAL (fields_decl) = build_constructor (field_array_type, ! static_fields); TREE_STATIC (fields_decl) = 1; DECL_ARTIFICIAL (fields_decl) = 1; DECL_IGNORED_P (fields_decl) = 1; *************** make_class_data (type) *** 1514,1528 **** method_array_type = build_prim_array_type (method_type_node, method_count); methods_decl = build_decl (VAR_DECL, mangled_classname ("_MT_", type), method_array_type); ! DECL_INITIAL (methods_decl) = build (CONSTRUCTOR, method_array_type, ! NULL_TREE, nreverse (methods)); TREE_STATIC (methods_decl) = 1; DECL_ARTIFICIAL (methods_decl) = 1; DECL_IGNORED_P (methods_decl) = 1; rest_of_decl_compilation (methods_decl, (char*) 0, 1, 0); ! if (assume_compiled (IDENTIFIER_POINTER (DECL_NAME (type_decl))) ! && ! CLASS_INTERFACE (type_decl) && !flag_indirect_dispatch) { tree dtable = get_dispatch_table (type, this_class_addr); dtable_decl = build_dtable_decl (type); --- 1483,1497 ---- method_array_type = build_prim_array_type (method_type_node, method_count); methods_decl = build_decl (VAR_DECL, mangled_classname ("_MT_", type), method_array_type); ! DECL_INITIAL (methods_decl) = build_constructor (method_array_type, ! nreverse (methods)); TREE_STATIC (methods_decl) = 1; DECL_ARTIFICIAL (methods_decl) = 1; DECL_IGNORED_P (methods_decl) = 1; rest_of_decl_compilation (methods_decl, (char*) 0, 1, 0); ! if (supers_all_compiled (type) && ! CLASS_INTERFACE (type_decl) ! && !flag_indirect_dispatch) { tree dtable = get_dispatch_table (type, this_class_addr); dtable_decl = build_dtable_decl (type); *************** make_class_data (type) *** 1550,1556 **** super = CLASSTYPE_SUPER (type); if (super == NULL_TREE) super = null_pointer_node; ! else if (assume_compiled (IDENTIFIER_POINTER (DECL_NAME (type_decl)))) super = build_class_ref (super); else { --- 1519,1529 ---- super = CLASSTYPE_SUPER (type); if (super == NULL_TREE) super = null_pointer_node; ! else if (/* FIXME: we should also test for (! ! flag_indirect_dispatch) here, but libgcj can't cope with ! a symbolic reference a superclass in the class data. */ ! assume_compiled (IDENTIFIER_POINTER (DECL_NAME (type_decl))) ! && assume_compiled (IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (super))))) super = build_class_ref (super); else { *************** make_class_data (type) *** 1576,1593 **** tree child = TREE_VEC_ELT (TYPE_BINFO_BASETYPES (type), i); tree iclass = BINFO_TYPE (child); tree index; ! if (assume_compiled (IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (iclass))))) index = build_class_ref (iclass); else { ! int int_index = alloc_class_constant (iclass); ! index = build_int_2 (int_index, 0); ! TREE_TYPE (index) = ptr_type_node; } init = tree_cons (NULL_TREE, index, init); } ! DECL_INITIAL (idecl) = build (CONSTRUCTOR, interface_array_type, ! NULL_TREE, init); TREE_STATIC (idecl) = 1; DECL_ARTIFICIAL (idecl) = 1; DECL_IGNORED_P (idecl) = 1; --- 1549,1567 ---- tree child = TREE_VEC_ELT (TYPE_BINFO_BASETYPES (type), i); tree iclass = BINFO_TYPE (child); tree index; ! if (! flag_indirect_dispatch ! && (assume_compiled ! (IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (iclass)))))) index = build_class_ref (iclass); else { ! int int_index = alloc_class_constant (iclass); ! index = build_int_2 (int_index, 0); ! TREE_TYPE (index) = ptr_type_node; } init = tree_cons (NULL_TREE, index, init); } ! DECL_INITIAL (idecl) = build_constructor (interface_array_type, init); TREE_STATIC (idecl) = 1; DECL_ARTIFICIAL (idecl) = 1; DECL_IGNORED_P (idecl) = 1; *************** make_class_data (type) *** 1597,1602 **** --- 1571,1593 ---- constant_pool_constructor = build_constants_constructor (); + if (flag_indirect_dispatch) + { + TYPE_OTABLE_DECL (type) + = emit_symbol_table + (DECL_NAME (TYPE_OTABLE_DECL (type)), + TYPE_OTABLE_DECL (type), TYPE_OTABLE_METHODS (type), + TYPE_OTABLE_SYMS_DECL (type), integer_type_node); + + TYPE_ATABLE_DECL (type) + = emit_symbol_table + (DECL_NAME (TYPE_ATABLE_DECL (type)), + TYPE_ATABLE_DECL (type), TYPE_ATABLE_METHODS (type), + TYPE_ATABLE_SYMS_DECL (type), ptr_type_node); + } + + TYPE_CTABLE_DECL (type) = emit_catch_table (type); + START_RECORD_CONSTRUCTOR (temp, object_type_node); PUSH_FIELD_VALUE (temp, "vtable", build (PLUS_EXPR, dtable_ptr_type, *************** make_class_data (type) *** 1620,1626 **** PUSH_FIELD_VALUE (cons, "method_count", build_int_2 (method_count, 0)); if (flag_indirect_dispatch) ! PUSH_FIELD_VALUE (cons, "vtable_method_count", integer_minus_one_node) else PUSH_FIELD_VALUE (cons, "vtable_method_count", TYPE_NVIRTUALS (type)); --- 1611,1617 ---- PUSH_FIELD_VALUE (cons, "method_count", build_int_2 (method_count, 0)); if (flag_indirect_dispatch) ! PUSH_FIELD_VALUE (cons, "vtable_method_count", integer_minus_one_node); else PUSH_FIELD_VALUE (cons, "vtable_method_count", TYPE_NVIRTUALS (type)); *************** make_class_data (type) *** 1633,1647 **** build_int_2 (static_field_count, 0)); if (flag_indirect_dispatch) ! PUSH_FIELD_VALUE (cons, "vtable", null_pointer_node) else PUSH_FIELD_VALUE (cons, "vtable", dtable_decl == NULL_TREE ? null_pointer_node : build (PLUS_EXPR, dtable_ptr_type, build1 (ADDR_EXPR, dtable_ptr_type, dtable_decl), dtable_start_offset)); ! ! if (otable_methods == NULL_TREE) { PUSH_FIELD_VALUE (cons, "otable", null_pointer_node); PUSH_FIELD_VALUE (cons, "otable_syms", null_pointer_node); --- 1624,1637 ---- build_int_2 (static_field_count, 0)); if (flag_indirect_dispatch) ! PUSH_FIELD_VALUE (cons, "vtable", null_pointer_node); else PUSH_FIELD_VALUE (cons, "vtable", dtable_decl == NULL_TREE ? null_pointer_node : build (PLUS_EXPR, dtable_ptr_type, build1 (ADDR_EXPR, dtable_ptr_type, dtable_decl), dtable_start_offset)); ! if (TYPE_OTABLE_METHODS (type) == NULL_TREE) { PUSH_FIELD_VALUE (cons, "otable", null_pointer_node); PUSH_FIELD_VALUE (cons, "otable_syms", null_pointer_node); *************** make_class_data (type) *** 1649,1659 **** else { PUSH_FIELD_VALUE (cons, "otable", ! build1 (ADDR_EXPR, otable_ptr_type, otable_decl)); PUSH_FIELD_VALUE (cons, "otable_syms", ! build1 (ADDR_EXPR, method_symbols_array_ptr_type, ! otable_syms_decl)); } PUSH_FIELD_VALUE (cons, "interfaces", interfaces); PUSH_FIELD_VALUE (cons, "loader", null_pointer_node); PUSH_FIELD_VALUE (cons, "interface_count", build_int_2 (interface_len, 0)); --- 1639,1667 ---- else { PUSH_FIELD_VALUE (cons, "otable", ! build1 (ADDR_EXPR, otable_ptr_type, TYPE_OTABLE_DECL (type))); PUSH_FIELD_VALUE (cons, "otable_syms", ! build1 (ADDR_EXPR, symbols_array_ptr_type, ! TYPE_OTABLE_SYMS_DECL (type))); ! TREE_CONSTANT (TYPE_OTABLE_DECL (type)) = 1; ! } ! if (TYPE_ATABLE_METHODS(type) == NULL_TREE) ! { ! PUSH_FIELD_VALUE (cons, "atable", null_pointer_node); ! PUSH_FIELD_VALUE (cons, "atable_syms", null_pointer_node); ! } ! else ! { ! PUSH_FIELD_VALUE (cons, "atable", ! build1 (ADDR_EXPR, atable_ptr_type, TYPE_ATABLE_DECL (type))); ! PUSH_FIELD_VALUE (cons, "atable_syms", ! build1 (ADDR_EXPR, symbols_array_ptr_type, ! TYPE_ATABLE_SYMS_DECL (type))); ! TREE_CONSTANT (TYPE_ATABLE_DECL (type)) = 1; } + + PUSH_FIELD_VALUE (cons, "catch_classes", + build1 (ADDR_EXPR, ptr_type_node, TYPE_CTABLE_DECL (type))); PUSH_FIELD_VALUE (cons, "interfaces", interfaces); PUSH_FIELD_VALUE (cons, "loader", null_pointer_node); PUSH_FIELD_VALUE (cons, "interface_count", build_int_2 (interface_len, 0)); *************** make_class_data (type) *** 1665,1670 **** --- 1673,1679 ---- PUSH_FIELD_VALUE (cons, "idt", null_pointer_node); PUSH_FIELD_VALUE (cons, "arrayclass", null_pointer_node); PUSH_FIELD_VALUE (cons, "protectionDomain", null_pointer_node); + PUSH_FIELD_VALUE (cons, "hack_signers", null_pointer_node); PUSH_FIELD_VALUE (cons, "chain", null_pointer_node); FINISH_RECORD_CONSTRUCTOR (cons); *************** make_class_data (type) *** 1679,1685 **** } void ! finish_class () { tree method; tree type_methods = TYPE_METHODS (current_class); --- 1688,1694 ---- } void ! finish_class (void) { tree method; tree type_methods = TYPE_METHODS (current_class); *************** finish_class () *** 1712,1717 **** --- 1721,1728 ---- method = TREE_CHAIN (method); } + java_expand_catch_classes (current_class); + current_function_decl = NULL_TREE; make_class_data (current_class); register_class (); *************** finish_class () *** 1723,1730 **** return 0 if we cannot assume that CLASS is compiled. Returns 1 for primitive and 0 for array types. */ int ! is_compiled_class (class) ! tree class; { int seen_in_zip; if (TREE_CODE (class) == POINTER_TYPE) --- 1734,1740 ---- return 0 if we cannot assume that CLASS is compiled. Returns 1 for primitive and 0 for array types. */ int ! is_compiled_class (tree class) { int seen_in_zip; if (TREE_CODE (class) == POINTER_TYPE) *************** is_compiled_class (class) *** 1770,1777 **** /* Build a VAR_DECL for the dispatch table (vtable) for class TYPE. */ tree ! build_dtable_decl (type) ! tree type; { tree dtype; --- 1780,1786 ---- /* Build a VAR_DECL for the dispatch table (vtable) for class TYPE. */ tree ! build_dtable_decl (tree type) { tree dtype; *************** build_dtable_decl (type) *** 1829,1836 **** fields inherited from SUPER_CLASS. */ void ! push_super_field (this_class, super_class) ! tree this_class, super_class; { tree base_decl; /* Don't insert the field if we're just re-laying the class out. */ --- 1838,1844 ---- fields inherited from SUPER_CLASS. */ void ! push_super_field (tree this_class, tree super_class) { tree base_decl; /* Don't insert the field if we're just re-laying the class out. */ *************** push_super_field (this_class, super_clas *** 1847,1855 **** /* Handle the different manners we may have to lay out a super class. */ static tree ! maybe_layout_super_class (super_class, this_class) ! tree super_class; ! tree this_class; { if (TREE_CODE (super_class) == RECORD_TYPE) { --- 1855,1861 ---- /* Handle the different manners we may have to lay out a super class. */ static tree ! maybe_layout_super_class (tree super_class, tree this_class) { if (TREE_CODE (super_class) == RECORD_TYPE) { *************** maybe_layout_super_class (super_class, t *** 1891,1909 **** } void ! layout_class (this_class) ! tree this_class; { tree super_class = CLASSTYPE_SUPER (this_class); tree field; ! class_list = tree_cons (this_class, NULL_TREE, class_list); if (CLASS_BEING_LAIDOUT (this_class)) { char buffer [1024]; char *report; tree current; ! sprintf (buffer, " with `%s'", IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (this_class)))); obstack_grow (&temporary_obstack, buffer, strlen (buffer)); --- 1897,1914 ---- } void ! layout_class (tree this_class) { tree super_class = CLASSTYPE_SUPER (this_class); tree field; ! class_list = tree_cons (this_class, NULL_TREE, class_list); if (CLASS_BEING_LAIDOUT (this_class)) { char buffer [1024]; char *report; tree current; ! sprintf (buffer, " with `%s'", IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (this_class)))); obstack_grow (&temporary_obstack, buffer, strlen (buffer)); *************** layout_class (this_class) *** 1957,1964 **** layout_type (this_class); ! /* Also recursively load/layout any superinterfaces, but only if class was ! loaded from bytecode. The source parser will take care of this itself. */ if (!CLASS_FROM_SOURCE_P (this_class)) { tree basetype_vec = TYPE_BINFO_BASETYPES (this_class); --- 1962,1970 ---- layout_type (this_class); ! /* Also recursively load/layout any superinterfaces, but only if ! class was loaded from bytecode. The source parser will take care ! of this itself. */ if (!CLASS_FROM_SOURCE_P (this_class)) { tree basetype_vec = TYPE_BINFO_BASETYPES (this_class); *************** layout_class (this_class) *** 1986,2005 **** } } ! /* Convert the size back to an SI integer value */ ! TYPE_SIZE_UNIT (this_class) = fold (convert (int_type_node, TYPE_SIZE_UNIT (this_class))); CLASS_BEING_LAIDOUT (this_class) = 0; class_list = TREE_CHAIN (class_list); } void ! layout_class_methods (this_class) ! tree this_class; { tree method_decl, dtable_count; ! tree super_class; if (TYPE_NVIRTUALS (this_class)) return; --- 1992,2059 ---- } } ! /* Convert the size back to an SI integer value. */ ! TYPE_SIZE_UNIT (this_class) = fold (convert (int_type_node, TYPE_SIZE_UNIT (this_class))); CLASS_BEING_LAIDOUT (this_class) = 0; class_list = TREE_CHAIN (class_list); } + static void + add_miranda_methods (tree base_class, tree search_class) + { + tree basetype_vec = TYPE_BINFO_BASETYPES (search_class); + int i, n = TREE_VEC_LENGTH (basetype_vec); + for (i = 1; i < n; ++i) + { + tree method_decl; + tree elt = TREE_VEC_ELT (basetype_vec, i); + if (elt == NULL_TREE) + break; + elt = BINFO_TYPE (elt); + + /* Ensure that interface methods are seen in declared order. */ + layout_class_methods (elt); + + /* All base classes will have been laid out at this point, so the order + will be correct. This code must match similar layout code in the + runtime. */ + for (method_decl = TYPE_METHODS (elt); + method_decl; method_decl = TREE_CHAIN (method_decl)) + { + tree sig, override; + + /* An interface can have . */ + if (ID_CLINIT_P (DECL_NAME (method_decl))) + continue; + + sig = build_java_argument_signature (TREE_TYPE (method_decl)); + override = lookup_argument_method (base_class, + DECL_NAME (method_decl), sig); + if (override == NULL_TREE) + { + /* Found a Miranda method. Add it. */ + tree new_method; + sig = build_java_signature (TREE_TYPE (method_decl)); + new_method + = add_method (base_class, + get_access_flags_from_decl (method_decl), + DECL_NAME (method_decl), sig); + METHOD_INVISIBLE (new_method) = 1; + } + } + + /* Try superinterfaces. */ + add_miranda_methods (base_class, elt); + } + } + void ! layout_class_methods (tree this_class) { tree method_decl, dtable_count; ! tree super_class, type_name; if (TYPE_NVIRTUALS (this_class)) return; *************** layout_class_methods (this_class) *** 2016,2044 **** else dtable_count = integer_zero_node; TYPE_METHODS (this_class) = nreverse (TYPE_METHODS (this_class)); for (method_decl = TYPE_METHODS (this_class); method_decl; method_decl = TREE_CHAIN (method_decl)) ! dtable_count = layout_class_method (this_class, super_class, method_decl, dtable_count); TYPE_NVIRTUALS (this_class) = dtable_count; } - /* Return 0 if NAME is equal to STR, -1 if STR is "less" than NAME, - and 1 if STR is "greater" than NAME. */ - /* Lay METHOD_DECL out, returning a possibly new value of DTABLE_COUNT. Also mangle the method's name. */ tree ! layout_class_method (this_class, super_class, method_decl, dtable_count) ! tree this_class, super_class, method_decl, dtable_count; { tree method_name = DECL_NAME (method_decl); TREE_PUBLIC (method_decl) = 1; /* This is a good occasion to mangle the method's name */ SET_DECL_ASSEMBLER_NAME (method_decl, --- 2070,2108 ---- else dtable_count = integer_zero_node; + type_name = TYPE_NAME (this_class); + if (CLASS_ABSTRACT (type_name) || CLASS_INTERFACE (type_name)) + { + /* An abstract class can have methods which are declared only in + an implemented interface. These are called "Miranda + methods". We make a dummy method entry for such methods + here. */ + add_miranda_methods (this_class, this_class); + } + TYPE_METHODS (this_class) = nreverse (TYPE_METHODS (this_class)); for (method_decl = TYPE_METHODS (this_class); method_decl; method_decl = TREE_CHAIN (method_decl)) ! dtable_count = layout_class_method (this_class, super_class, method_decl, dtable_count); TYPE_NVIRTUALS (this_class) = dtable_count; } /* Lay METHOD_DECL out, returning a possibly new value of DTABLE_COUNT. Also mangle the method's name. */ tree ! layout_class_method (tree this_class, tree super_class, ! tree method_decl, tree dtable_count) { tree method_name = DECL_NAME (method_decl); TREE_PUBLIC (method_decl) = 1; + /* Considered external until we know what classes are being + compiled into this object file. */ + DECL_EXTERNAL (method_decl) = 1; /* This is a good occasion to mangle the method's name */ SET_DECL_ASSEMBLER_NAME (method_decl, *************** layout_class_method (this_class, super_c *** 2065,2071 **** } else if (! METHOD_STATIC (method_decl) && !DECL_ARTIFICIAL (method_decl)) { ! tree method_sig = build_java_argument_signature (TREE_TYPE (method_decl)); tree super_method = lookup_argument_method (super_class, method_name, method_sig); --- 2129,2135 ---- } else if (! METHOD_STATIC (method_decl) && !DECL_ARTIFICIAL (method_decl)) { ! tree method_sig = build_java_argument_signature (TREE_TYPE (method_decl)); tree super_method = lookup_argument_method (super_class, method_name, method_sig); *************** layout_class_method (this_class, super_c *** 2074,2081 **** DECL_VINDEX (method_decl) = DECL_VINDEX (super_method); if (DECL_VINDEX (method_decl) == NULL_TREE && !CLASS_FROM_SOURCE_P (this_class)) ! error_with_decl (method_decl, ! "non-static method '%s' overrides static method"); } else if (! METHOD_FINAL (method_decl) && ! METHOD_PRIVATE (method_decl) --- 2138,2145 ---- DECL_VINDEX (method_decl) = DECL_VINDEX (super_method); if (DECL_VINDEX (method_decl) == NULL_TREE && !CLASS_FROM_SOURCE_P (this_class)) ! error ("%Jnon-static method '%D' overrides static method", ! method_decl, method_decl); } else if (! METHOD_FINAL (method_decl) && ! METHOD_PRIVATE (method_decl) *************** layout_class_method (this_class, super_c *** 2092,2098 **** } void ! register_class () { /* END does not need to be registered with the garbage collector because it always points into the list given by REGISTERED_CLASS, --- 2156,2162 ---- } void ! register_class (void) { /* END does not need to be registered with the garbage collector because it always points into the list given by REGISTERED_CLASS, *************** register_class () *** 2114,2125 **** The preferred mechanism is through the .jcr section, which contain a list of pointers to classes which get registered during ! constructor invoction time. The fallback mechanism is to generate a `constructor' function which calls _Jv_RegisterClass for each class in this file. */ void ! emit_register_classes () { /* ??? This isn't quite the correct test. We also have to know that the target is using gcc's crtbegin/crtend objects rather --- 2178,2189 ---- The preferred mechanism is through the .jcr section, which contain a list of pointers to classes which get registered during ! constructor invocation time. The fallback mechanism is to generate a `constructor' function which calls _Jv_RegisterClass for each class in this file. */ void ! emit_register_classes (void) { /* ??? This isn't quite the correct test. We also have to know that the target is using gcc's crtbegin/crtend objects rather *************** emit_register_classes () *** 2139,2152 **** } else { ! extern tree get_file_function_name PARAMS ((int)); tree init_name = get_file_function_name ('I'); tree init_type = build_function_type (void_type_node, end_params_node); tree init_decl; tree t; init_decl = build_decl (FUNCTION_DECL, init_name, init_type); SET_DECL_ASSEMBLER_NAME (init_decl, init_name); TREE_STATIC (init_decl) = 1; current_function_decl = init_decl; DECL_RESULT (init_decl) = build_decl (RESULT_DECL, NULL_TREE, --- 2203,2218 ---- } else { ! extern tree get_file_function_name (int); tree init_name = get_file_function_name ('I'); tree init_type = build_function_type (void_type_node, end_params_node); tree init_decl; tree t; + location_t saved_loc = input_location; init_decl = build_decl (FUNCTION_DECL, init_name, init_type); SET_DECL_ASSEMBLER_NAME (init_decl, init_name); + DECL_SOURCE_LINE (init_decl) = 0; TREE_STATIC (init_decl) = 1; current_function_decl = init_decl; DECL_RESULT (init_decl) = build_decl (RESULT_DECL, NULL_TREE, *************** emit_register_classes () *** 2161,2167 **** pushlevel (0); make_decl_rtl (init_decl, NULL); ! init_function_start (init_decl, input_filename, 0); expand_function_start (init_decl, 0); /* Do not allow the function to be deferred. */ --- 2227,2233 ---- pushlevel (0); make_decl_rtl (init_decl, NULL); ! init_function_start (init_decl); expand_function_start (init_decl, 0); /* Do not allow the function to be deferred. */ *************** emit_register_classes () *** 2171,2178 **** for ( t = registered_class; t; t = TREE_CHAIN (t)) emit_library_call (registerClass_libfunc, 0, VOIDmode, 1, XEXP (DECL_RTL (t), 0), Pmode); ! ! expand_function_end (input_filename, 0, 0); poplevel (1, 0, 1); rest_of_compilation (init_decl); current_function_decl = NULL_TREE; --- 2237,2244 ---- for ( t = registered_class; t; t = TREE_CHAIN (t)) emit_library_call (registerClass_libfunc, 0, VOIDmode, 1, XEXP (DECL_RTL (t), 0), Pmode); ! input_location = DECL_SOURCE_LOCATION (init_decl); ! expand_function_end (); poplevel (1, 0, 1); rest_of_compilation (init_decl); current_function_decl = NULL_TREE; *************** emit_register_classes () *** 2180,2240 **** if (targetm.have_ctors_dtors) (* targetm.asm_out.constructor) (XEXP (DECL_RTL (init_decl), 0), DEFAULT_INIT_PRIORITY); } } ! /* Make a method_symbol_type (_Jv_MethodSymbol) node for METHOD. */ ! tree ! build_method_symbols_entry (tree method) { ! tree clname, name, signature, method_symbol; ! clname = build_utf8_ref (DECL_NAME (TYPE_NAME (DECL_CONTEXT (method)))); ! name = build_utf8_ref (DECL_NAME (method)); ! signature = build_java_signature (TREE_TYPE (method)); signature = build_utf8_ref (unmangle_classname (IDENTIFIER_POINTER (signature), IDENTIFIER_LENGTH (signature))); ! START_RECORD_CONSTRUCTOR (method_symbol, method_symbol_type); ! PUSH_FIELD_VALUE (method_symbol, "clname", clname); ! PUSH_FIELD_VALUE (method_symbol, "name", name); ! PUSH_FIELD_VALUE (method_symbol, "signature", signature); ! FINISH_RECORD_CONSTRUCTOR (method_symbol); ! TREE_CONSTANT (method_symbol) = 1; ! return method_symbol; } ! /* Emit the offset symbols table for indirect virtual dispatch. */ ! void ! emit_offset_symbol_table () { tree method_list, method, table, list, null_symbol; ! tree otable_bound, otable_array_type; int index; ! /* Only emit an offset table if this translation unit actually made virtual ! calls. */ ! if (otable_methods == NULL_TREE) ! return; /* Build a list of _Jv_MethodSymbols for each entry in otable_methods. */ index = 0; ! method_list = otable_methods; list = NULL_TREE; while (method_list != NULL_TREE) { method = TREE_VALUE (method_list); ! list = tree_cons (NULL_TREE, build_method_symbols_entry (method), list); method_list = TREE_CHAIN (method_list); index++; } /* Terminate the list with a "null" entry. */ ! START_RECORD_CONSTRUCTOR (null_symbol, method_symbol_type); PUSH_FIELD_VALUE (null_symbol, "clname", null_pointer_node); PUSH_FIELD_VALUE (null_symbol, "name", null_pointer_node); PUSH_FIELD_VALUE (null_symbol, "signature", null_pointer_node); --- 2246,2308 ---- if (targetm.have_ctors_dtors) (* targetm.asm_out.constructor) (XEXP (DECL_RTL (init_decl), 0), DEFAULT_INIT_PRIORITY); + input_location = saved_loc; } } ! /* Make a symbol_type (_Jv_MethodSymbol) node for DECL. */ ! static tree ! build_symbol_entry (tree decl) { ! tree clname, name, signature, sym; ! clname = build_utf8_ref (DECL_NAME (TYPE_NAME (DECL_CONTEXT (decl)))); ! name = build_utf8_ref (DECL_NAME (decl)); ! signature = build_java_signature (TREE_TYPE (decl)); signature = build_utf8_ref (unmangle_classname (IDENTIFIER_POINTER (signature), IDENTIFIER_LENGTH (signature))); ! START_RECORD_CONSTRUCTOR (sym, symbol_type); ! PUSH_FIELD_VALUE (sym, "clname", clname); ! PUSH_FIELD_VALUE (sym, "name", name); ! PUSH_FIELD_VALUE (sym, "signature", signature); ! FINISH_RECORD_CONSTRUCTOR (sym); ! TREE_CONSTANT (sym) = 1; ! return sym; } ! /* Emit a symbol table: used by -findirect-dispatch. */ ! tree ! emit_symbol_table (tree name, tree the_table, tree decl_list, tree the_syms_decl, ! tree the_array_element_type) { tree method_list, method, table, list, null_symbol; ! tree table_size, the_array_type; int index; ! /* Only emit a table if this translation unit actually made any ! references via it. */ ! if (decl_list == NULL_TREE) ! return the_table; /* Build a list of _Jv_MethodSymbols for each entry in otable_methods. */ index = 0; ! method_list = decl_list; list = NULL_TREE; while (method_list != NULL_TREE) { method = TREE_VALUE (method_list); ! list = tree_cons (NULL_TREE, build_symbol_entry (method), list); method_list = TREE_CHAIN (method_list); index++; } /* Terminate the list with a "null" entry. */ ! START_RECORD_CONSTRUCTOR (null_symbol, symbol_type); PUSH_FIELD_VALUE (null_symbol, "clname", null_pointer_node); PUSH_FIELD_VALUE (null_symbol, "name", null_pointer_node); PUSH_FIELD_VALUE (null_symbol, "signature", null_pointer_node); *************** emit_offset_symbol_table () *** 2244,2299 **** /* Put the list in the right order and make it a constructor. */ list = nreverse (list); ! table = build (CONSTRUCTOR, method_symbols_array_type, NULL_TREE, list); /* Make it the initial value for otable_syms and emit the decl. */ ! DECL_INITIAL (otable_syms_decl) = table; ! DECL_ARTIFICIAL (otable_syms_decl) = 1; ! DECL_IGNORED_P (otable_syms_decl) = 1; ! rest_of_decl_compilation (otable_syms_decl, NULL, 1, 0); ! /* Now that its size is known, redefine otable as an uninitialized static ! array of INDEX + 1 integers. The extra entry is used by the runtime ! to track whether the otable has been initialized. */ ! otable_bound = build_index_type (build_int_2 (index, 0)); ! otable_array_type = build_array_type (integer_type_node, otable_bound); ! otable_decl = build_decl (VAR_DECL, get_identifier ("otable"), ! otable_array_type); ! TREE_STATIC (otable_decl) = 1; ! TREE_READONLY (otable_decl) = 1; ! rest_of_decl_compilation (otable_decl, NULL, 1, 0); } void ! init_class_processing () { registerClass_libfunc = gen_rtx_SYMBOL_REF (Pmode, "_Jv_RegisterClass"); - registerResource_libfunc = - gen_rtx_SYMBOL_REF (Pmode, "_Jv_RegisterResource"); fields_ident = get_identifier ("fields"); info_ident = get_identifier ("info"); gcc_obstack_init (&temporary_obstack); } ! static hashval_t java_treetreehash_hash PARAMS ((const void *)); ! static int java_treetreehash_compare PARAMS ((const void *, const void *)); /* A hash table mapping trees to trees. Used generally. */ #define JAVA_TREEHASHHASH_H(t) (htab_hash_pointer (t)) static hashval_t ! java_treetreehash_hash (k_p) ! const void *k_p; { struct treetreehash_entry *k = (struct treetreehash_entry *) k_p; return JAVA_TREEHASHHASH_H (k->key); } static int ! java_treetreehash_compare (k1_p, k2_p) ! const void * k1_p; ! const void * k2_p; { struct treetreehash_entry * k1 = (struct treetreehash_entry *) k1_p; tree k2 = (tree) k2_p; --- 2312,2411 ---- /* Put the list in the right order and make it a constructor. */ list = nreverse (list); ! table = build_constructor (symbols_array_type, list); /* Make it the initial value for otable_syms and emit the decl. */ ! DECL_INITIAL (the_syms_decl) = table; ! DECL_ARTIFICIAL (the_syms_decl) = 1; ! DECL_IGNORED_P (the_syms_decl) = 1; ! rest_of_decl_compilation (the_syms_decl, NULL, 1, 0); ! /* Now that its size is known, redefine the table as an ! uninitialized static array of INDEX + 1 elements. The extra entry ! is used by the runtime to track whether the table has been ! initialized. */ ! table_size = build_index_type (build_int_2 (index, 0)); ! the_array_type = build_array_type (the_array_element_type, table_size); ! the_table = build_decl (VAR_DECL, name, the_array_type); ! TREE_STATIC (the_table) = 1; ! TREE_READONLY (the_table) = 1; ! rest_of_decl_compilation (the_table, NULL, 1, 0); ! ! return the_table; ! } ! ! /* make an entry for the catch_classes list. */ ! tree ! make_catch_class_record (tree catch_class, tree classname) ! { ! tree entry; ! tree type = TREE_TYPE (TREE_TYPE (TYPE_CTABLE_DECL (output_class))); ! START_RECORD_CONSTRUCTOR (entry, type); ! PUSH_FIELD_VALUE (entry, "address", catch_class); ! PUSH_FIELD_VALUE (entry, "classname", classname); ! FINISH_RECORD_CONSTRUCTOR (entry); ! return entry; ! } ! ! ! /* Generate the list of Throwable classes that are caught by exception ! handlers in this class. */ ! tree ! emit_catch_table (tree this_class) ! { ! tree table, table_size, array_type; ! TYPE_CATCH_CLASSES (this_class) = ! tree_cons (NULL, ! make_catch_class_record (null_pointer_node, null_pointer_node), ! TYPE_CATCH_CLASSES (this_class)); ! TYPE_CATCH_CLASSES (this_class) = nreverse (TYPE_CATCH_CLASSES (this_class)); ! TYPE_CATCH_CLASSES (this_class) = ! tree_cons (NULL, ! make_catch_class_record (null_pointer_node, null_pointer_node), ! TYPE_CATCH_CLASSES (this_class)); ! table_size = ! build_index_type (build_int_2 ! (list_length (TYPE_CATCH_CLASSES (this_class)), 0)); ! array_type ! = build_array_type (TREE_TYPE (TREE_TYPE (TYPE_CTABLE_DECL (this_class))), ! table_size); ! table = ! build_decl (VAR_DECL, DECL_NAME (TYPE_CTABLE_DECL (this_class)), array_type); ! DECL_INITIAL (table) = ! build_constructor (array_type, TYPE_CATCH_CLASSES (this_class)); ! TREE_STATIC (table) = 1; ! TREE_READONLY (table) = 1; ! DECL_IGNORED_P (table) = 1; ! rest_of_decl_compilation (table, NULL, 1, 0); ! return table; } + void ! init_class_processing (void) { registerClass_libfunc = gen_rtx_SYMBOL_REF (Pmode, "_Jv_RegisterClass"); fields_ident = get_identifier ("fields"); info_ident = get_identifier ("info"); gcc_obstack_init (&temporary_obstack); } ! static hashval_t java_treetreehash_hash (const void *); ! static int java_treetreehash_compare (const void *, const void *); /* A hash table mapping trees to trees. Used generally. */ #define JAVA_TREEHASHHASH_H(t) (htab_hash_pointer (t)) static hashval_t ! java_treetreehash_hash (const void *k_p) { struct treetreehash_entry *k = (struct treetreehash_entry *) k_p; return JAVA_TREEHASHHASH_H (k->key); } static int ! java_treetreehash_compare (const void * k1_p, const void * k2_p) { struct treetreehash_entry * k1 = (struct treetreehash_entry *) k1_p; tree k2 = (tree) k2_p; *************** java_treetreehash_compare (k1_p, k2_p) *** 2301,2313 **** } tree ! java_treetreehash_find (ht, t) ! htab_t ht; ! tree t; { struct treetreehash_entry *e; hashval_t hv = JAVA_TREEHASHHASH_H (t); ! e = (struct treetreehash_entry *) htab_find_with_hash (ht, t, hv); if (e == NULL) return NULL; else --- 2413,2423 ---- } tree ! java_treetreehash_find (htab_t ht, tree t) { struct treetreehash_entry *e; hashval_t hv = JAVA_TREEHASHHASH_H (t); ! e = htab_find_with_hash (ht, t, hv); if (e == NULL) return NULL; else *************** java_treetreehash_find (ht, t) *** 2315,2325 **** } tree * ! java_treetreehash_new (ht, t) ! htab_t ht; ! tree t; { ! PTR *e; struct treetreehash_entry *tthe; hashval_t hv = JAVA_TREEHASHHASH_H (t); --- 2425,2433 ---- } tree * ! java_treetreehash_new (htab_t ht, tree t) { ! void **e; struct treetreehash_entry *tthe; hashval_t hv = JAVA_TREEHASHHASH_H (t); *************** java_treetreehash_new (ht, t) *** 2328,2334 **** { tthe = (*ht->alloc_f) (1, sizeof (*tthe)); tthe->key = t; ! *e = (PTR) tthe; } else tthe = (struct treetreehash_entry *) *e; --- 2436,2442 ---- { tthe = (*ht->alloc_f) (1, sizeof (*tthe)); tthe->key = t; ! *e = tthe; } else tthe = (struct treetreehash_entry *) *e; *************** java_treetreehash_new (ht, t) *** 2336,2344 **** } htab_t ! java_treetreehash_create (size, gc) ! size_t size; ! int gc; { if (gc) return htab_create_ggc (size, java_treetreehash_hash, --- 2444,2450 ---- } htab_t ! java_treetreehash_create (size_t size, int gc) { if (gc) return htab_create_ggc (size, java_treetreehash_hash, diff -Nrc3pad gcc-3.3.3/gcc/java/config-lang.in gcc-3.4.0/gcc/java/config-lang.in *** gcc-3.3.3/gcc/java/config-lang.in 2002-06-04 07:10:47.000000000 +0000 --- gcc-3.4.0/gcc/java/config-lang.in 2003-01-22 20:51:55.000000000 +0000 *************** *** 1,21 **** # Top level configure fragment for the GNU compiler for the Java(TM) # language. ! # Copyright (C) 1994, 1995, 2000, 2001 Free Software Foundation, Inc. ! #This file is part of GNU CC. ! #GNU CC is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation; either version 2, or (at your option) #any later version. ! #GNU CC is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. #You should have received a copy of the GNU General Public License ! #along with GNU CC; see the file COPYING. If not, write to #the Free Software Foundation, 59 Temple Place - Suite 330, #Boston, MA 02111-1307, USA. --- 1,21 ---- # Top level configure fragment for the GNU compiler for the Java(TM) # language. ! # Copyright (C) 1994, 1995, 2000, 2001, 2003 Free Software Foundation, Inc. ! #This file is part of GCC. ! #GCC is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation; either version 2, or (at your option) #any later version. ! #GCC is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. #You should have received a copy of the GNU General Public License ! #along with GCC; see the file COPYING. If not, write to #the Free Software Foundation, 59 Temple Place - Suite 330, #Boston, MA 02111-1307, USA. *************** compilers="jc1\$(exeext) jvgenmain\$(exe *** 36,42 **** stagestuff="jc1\$(exeext) gcj\$(exeext) jvgenmain\$(exeext) gcjh\$(exeext) jv-scan\$(exeext) jcf-dump\$(exeext)" ! gtfiles="\$(srcdir)/java/java-tree.h \$(srcdir)/java/builtins.c \$(srcdir)/java/class.c \$(srcdir)/java/constants.c \$(srcdir)/java/decl.c \$(srcdir)/java/expr.c \$(srcdir)/java/jcf-parse.c \$(srcdir)/java/jcf-write.c \$(srcdir)/java/lang.c \$(srcdir)/java/mangle.c \$(srcdir)/java/parse.y" target_libs=${libgcj_saved} lang_dirs="zlib fastjar" --- 36,42 ---- stagestuff="jc1\$(exeext) gcj\$(exeext) jvgenmain\$(exeext) gcjh\$(exeext) jv-scan\$(exeext) jcf-dump\$(exeext)" ! gtfiles="\$(srcdir)/java/java-tree.h \$(srcdir)/java/jcf.h \$(srcdir)/java/lex.h \$(srcdir)/java/parse.h \$(srcdir)/java/builtins.c \$(srcdir)/java/class.c \$(srcdir)/java/constants.c \$(srcdir)/java/decl.c \$(srcdir)/java/expr.c \$(srcdir)/java/jcf-parse.c \$(srcdir)/java/jcf-write.c \$(srcdir)/java/lang.c \$(srcdir)/java/mangle.c \$(srcdir)/java/parse.y \$(srcdir)/java/resource.c" target_libs=${libgcj_saved} lang_dirs="zlib fastjar" diff -Nrc3pad gcc-3.3.3/gcc/java/constants.c gcc-3.4.0/gcc/java/constants.c *** gcc-3.3.3/gcc/java/constants.c 2002-11-18 15:46:32.000000000 +0000 --- gcc-3.4.0/gcc/java/constants.c 2004-01-09 17:08:43.000000000 +0000 *************** *** 1,19 **** /* Handle the constant pool of the Java(TM) Virtual Machine. ! Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,19 ---- /* Handle the constant pool of the Java(TM) Virtual Machine. ! Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 23,82 **** #include "config.h" #include "system.h" #include "jcf.h" #include "tree.h" #include "java-tree.h" #include "toplev.h" #include "ggc.h" ! static void set_constant_entry PARAMS ((CPool *, int, int, jword)); ! static int find_class_or_string_constant PARAMS ((CPool *, int, tree)); ! static int find_name_and_type_constant PARAMS ((CPool *, tree, tree)); ! static tree get_tag_node PARAMS ((int)); ! static tree build_constant_data_ref PARAMS ((void)); /* Set the INDEX'th constant in CPOOL to have the given TAG and VALUE. */ static void ! set_constant_entry (cpool, index, tag, value) ! CPool *cpool; ! int index; ! int tag; ! jword value; { if (cpool->data == NULL) { cpool->capacity = 100; ! cpool->tags = xmalloc (sizeof(uint8) * cpool->capacity); ! cpool->data = xmalloc (sizeof(jword) * cpool->capacity); cpool->count = 1; } if (index >= cpool->capacity) { cpool->capacity *= 2; if (index >= cpool->capacity) cpool->capacity = index + 10; ! cpool->tags = xrealloc (cpool->tags, sizeof(uint8) * cpool->capacity); ! cpool->data = xrealloc (cpool->data, sizeof(jword) * cpool->capacity); } if (index >= cpool->count) cpool->count = index + 1; cpool->tags[index] = tag; ! cpool->data[index] = value; } /* Find (or create) a constant pool entry matching TAG and VALUE. */ int ! find_constant1 (cpool, tag, value) ! CPool *cpool; ! int tag; ! jword value; { int i; for (i = cpool->count; --i > 0; ) { ! if (cpool->tags[i] == tag && cpool->data[i] == value) return i; } i = cpool->count == 0 ? 1 : cpool->count; --- 23,88 ---- #include "config.h" #include "system.h" + #include "coretypes.h" + #include "tm.h" #include "jcf.h" #include "tree.h" #include "java-tree.h" #include "toplev.h" #include "ggc.h" ! static void set_constant_entry (CPool *, int, int, jword); ! static int find_tree_constant (CPool *, int, tree); ! static int find_class_or_string_constant (CPool *, int, tree); ! static int find_name_and_type_constant (CPool *, tree, tree); ! static tree get_tag_node (int); ! static tree build_constant_data_ref (void); ! static CPool *cpool_for_class (tree); /* Set the INDEX'th constant in CPOOL to have the given TAG and VALUE. */ static void ! set_constant_entry (CPool *cpool, int index, int tag, jword value) { if (cpool->data == NULL) { cpool->capacity = 100; ! cpool->tags = ggc_alloc_cleared (sizeof(uint8) * cpool->capacity); ! cpool->data = ggc_alloc_cleared (sizeof(union cpool_entry) ! * cpool->capacity); cpool->count = 1; } if (index >= cpool->capacity) { + int old_cap = cpool->capacity; cpool->capacity *= 2; if (index >= cpool->capacity) cpool->capacity = index + 10; ! cpool->tags = ggc_realloc (cpool->tags, ! sizeof(uint8) * cpool->capacity); ! cpool->data = ggc_realloc (cpool->data, ! sizeof(union cpool_entry) * cpool->capacity); ! ! /* Make sure GC never sees uninitialized tag values. */ ! memset (cpool->tags + old_cap, 0, cpool->capacity - old_cap); ! memset (cpool->data + old_cap, 0, ! (cpool->capacity - old_cap) * sizeof (union cpool_entry)); } if (index >= cpool->count) cpool->count = index + 1; cpool->tags[index] = tag; ! cpool->data[index].w = value; } /* Find (or create) a constant pool entry matching TAG and VALUE. */ int ! find_constant1 (CPool *cpool, int tag, jword value) { int i; for (i = cpool->count; --i > 0; ) { ! if (cpool->tags[i] == tag && cpool->data[i].w == value) return i; } i = cpool->count == 0 ? 1 : cpool->count; *************** find_constant1 (cpool, tag, value) *** 87,103 **** /* Find a double-word constant pool entry matching TAG and WORD1/WORD2. */ int ! find_constant2 (cpool, tag, word1, word2) ! CPool *cpool; ! int tag; ! jword word1, word2; { int i; for (i = cpool->count - 1; --i > 0; ) { if (cpool->tags[i] == tag ! && cpool->data[i] == word1 ! && cpool->data[i+1] == word2) return i; } i = cpool->count == 0 ? 1 : cpool->count; --- 93,106 ---- /* Find a double-word constant pool entry matching TAG and WORD1/WORD2. */ int ! find_constant2 (CPool *cpool, int tag, jword word1, jword word2) { int i; for (i = cpool->count - 1; --i > 0; ) { if (cpool->tags[i] == tag ! && cpool->data[i].w == word1 ! && cpool->data[i+1].w == word2) return i; } i = cpool->count == 0 ? 1 : cpool->count; *************** find_constant2 (cpool, tag, word1, word2 *** 106,143 **** return i; } int ! find_utf8_constant (cpool, name) ! CPool *cpool; ! tree name; { if (name == NULL_TREE) return 0; ! return find_constant1 (cpool, CONSTANT_Utf8, (jword) name); } static int ! find_class_or_string_constant (cpool, tag, name) ! CPool *cpool; ! int tag; ! tree name; { ! int j = find_utf8_constant (cpool, name); int i; for (i = cpool->count; --i > 0; ) { ! if (cpool->tags[i] == tag && cpool->data[i] == (jword) j) return i; } i = cpool->count; ! set_constant_entry (cpool, i, tag, (jword) j); return i; } int ! find_class_constant (cpool, type) ! CPool *cpool; ! tree type; { return find_class_or_string_constant (cpool, CONSTANT_Class, build_internal_class_name (type)); --- 109,155 ---- return i; } + static int + find_tree_constant (CPool *cpool, int tag, tree value) + { + int i; + for (i = cpool->count; --i > 0; ) + { + if (cpool->tags[i] == tag && cpool->data[i].t == value) + return i; + } + i = cpool->count == 0 ? 1 : cpool->count; + set_constant_entry (cpool, i, tag, 0); + cpool->data[i].t = value; + return i; + } + + int ! find_utf8_constant (CPool *cpool, tree name) { if (name == NULL_TREE) return 0; ! return find_tree_constant (cpool, CONSTANT_Utf8, name); } static int ! find_class_or_string_constant (CPool *cpool, int tag, tree name) { ! jword j = find_utf8_constant (cpool, name); int i; for (i = cpool->count; --i > 0; ) { ! if (cpool->tags[i] == tag && cpool->data[i].w == j) return i; } i = cpool->count; ! set_constant_entry (cpool, i, tag, j); return i; } int ! find_class_constant (CPool *cpool, tree type) { return find_class_or_string_constant (cpool, CONSTANT_Class, build_internal_class_name (type)); *************** find_class_constant (cpool, type) *** 146,154 **** /* Allocate a CONSTANT_string entry given a STRING_CST. */ int ! find_string_constant (cpool, string) ! CPool *cpool; ! tree string; { string = get_identifier (TREE_STRING_POINTER (string)); return find_class_or_string_constant (cpool, CONSTANT_String, string); --- 158,164 ---- /* Allocate a CONSTANT_string entry given a STRING_CST. */ int ! find_string_constant (CPool *cpool, tree string) { string = get_identifier (TREE_STRING_POINTER (string)); return find_class_or_string_constant (cpool, CONSTANT_String, string); *************** find_string_constant (cpool, string) *** 159,168 **** Return its index in the constant pool CPOOL. */ static int ! find_name_and_type_constant (cpool, name, type) ! CPool *cpool; ! tree name; ! tree type; { int name_index = find_utf8_constant (cpool, name); int type_index = find_utf8_constant (cpool, build_java_signature (type)); --- 169,175 ---- Return its index in the constant pool CPOOL. */ static int ! find_name_and_type_constant (CPool *cpool, tree name, tree type) { int name_index = find_utf8_constant (cpool, name); int type_index = find_utf8_constant (cpool, build_java_signature (type)); *************** find_name_and_type_constant (cpool, name *** 174,182 **** Return its index in the constant pool CPOOL. */ int ! find_fieldref_index (cpool, decl) ! CPool *cpool; ! tree decl; { int class_index = find_class_constant (cpool, DECL_CONTEXT (decl)); int name_type_index --- 181,187 ---- Return its index in the constant pool CPOOL. */ int ! find_fieldref_index (CPool *cpool, tree decl) { int class_index = find_class_constant (cpool, DECL_CONTEXT (decl)); int name_type_index *************** find_fieldref_index (cpool, decl) *** 189,206 **** Return its index in the constant pool CPOOL. */ int ! find_methodref_index (cpool, decl) ! CPool *cpool; ! tree decl; { return find_methodref_with_class_index (cpool, decl, DECL_CONTEXT (decl)); } int ! find_methodref_with_class_index (cpool, decl, mclass) ! CPool *cpool; ! tree decl; ! tree mclass; { int class_index = find_class_constant (cpool, mclass); tree name = DECL_CONSTRUCTOR_P (decl) ? init_identifier_node --- 194,206 ---- Return its index in the constant pool CPOOL. */ int ! find_methodref_index (CPool *cpool, tree decl) { return find_methodref_with_class_index (cpool, decl, DECL_CONTEXT (decl)); } int ! find_methodref_with_class_index (CPool *cpool, tree decl, tree mclass) { int class_index = find_class_constant (cpool, mclass); tree name = DECL_CONSTRUCTOR_P (decl) ? init_identifier_node *************** find_methodref_with_class_index (cpool, *** 224,231 **** constant pool. Includes the 2-byte constant_pool_count. */ int ! count_constant_pool_bytes (cpool) ! CPool *cpool; { int size = 2; int i = 1; --- 224,230 ---- constant pool. Includes the 2-byte constant_pool_count. */ int ! count_constant_pool_bytes (CPool *cpool) { int size = 2; int i = 1; *************** count_constant_pool_bytes (cpool) *** 253,259 **** break; case CONSTANT_Utf8: { ! tree t = (tree) cpool->data[i]; int len = IDENTIFIER_LENGTH (t); size += len + 2; } --- 252,258 ---- break; case CONSTANT_Utf8: { ! tree t = cpool->data[i].t; int len = IDENTIFIER_LENGTH (t); size += len + 2; } *************** count_constant_pool_bytes (cpool) *** 270,283 **** The length of BUFFER is LENGTH, which must match the needed length. */ void ! write_constant_pool (cpool, buffer, length) ! CPool *cpool; ! unsigned char *buffer; ! int length; { unsigned char *ptr = buffer; int i = 1; ! jword *datap = &cpool->data[1]; PUT2 (cpool->count); for ( ; i < cpool->count; i++, datap++) { --- 269,279 ---- The length of BUFFER is LENGTH, which must match the needed length. */ void ! write_constant_pool (CPool *cpool, unsigned char *buffer, int length) { unsigned char *ptr = buffer; int i = 1; ! union cpool_entry *datap = &cpool->data[1]; PUT2 (cpool->count); for ( ; i < cpool->count; i++, datap++) { *************** write_constant_pool (cpool, buffer, leng *** 291,313 **** case CONSTANT_InterfaceMethodref: case CONSTANT_Float: case CONSTANT_Integer: ! PUT4 (*datap); break; case CONSTANT_Class: case CONSTANT_String: ! PUT2 (*datap); break; break; case CONSTANT_Long: case CONSTANT_Double: ! PUT4(*datap); i++; datap++; ! PUT4 (*datap); break; case CONSTANT_Utf8: { ! tree t = (tree) *datap; int len = IDENTIFIER_LENGTH (t); PUT2 (len); PUTN (IDENTIFIER_POINTER (t), len); --- 287,309 ---- case CONSTANT_InterfaceMethodref: case CONSTANT_Float: case CONSTANT_Integer: ! PUT4 (datap->w); break; case CONSTANT_Class: case CONSTANT_String: ! PUT2 (datap->w); break; break; case CONSTANT_Long: case CONSTANT_Double: ! PUT4(datap->w); i++; datap++; ! PUT4 (datap->w); break; case CONSTANT_Utf8: { ! tree t = datap->t; int len = IDENTIFIER_LENGTH (t); PUT2 (len); PUTN (IDENTIFIER_POINTER (t), len); *************** write_constant_pool (cpool, buffer, leng *** 320,331 **** abort (); } - CPool *outgoing_cpool; - static GTY(()) tree tag_nodes[13]; static tree ! get_tag_node (tag) ! int tag; { /* A Cache for build_int_2 (CONSTANT_XXX, 0). */ --- 316,324 ---- abort (); } static GTY(()) tree tag_nodes[13]; static tree ! get_tag_node (int tag) { /* A Cache for build_int_2 (CONSTANT_XXX, 0). */ *************** get_tag_node (tag) *** 334,339 **** --- 327,347 ---- return tag_nodes[tag]; } + /* Given a class, return its constant pool, creating one if necessary. */ + + static CPool * + cpool_for_class (tree class) + { + CPool *cpool = TYPE_CPOOL (class); + + if (cpool == NULL) + { + cpool = ggc_alloc_cleared (sizeof (struct CPool)); + TYPE_CPOOL (class) = cpool; + } + return cpool; + } + /* Look for a constant pool entry that matches TAG and NAME. Creates a new entry if not found. TAG is one of CONSTANT_Utf8, CONSTANT_String or CONSTANT_Class. *************** get_tag_node (tag) *** 341,358 **** Returns the index of the entry. */ int ! alloc_name_constant (tag, name) ! int tag; ! tree name; { ! return find_constant1 (outgoing_cpool, tag, (jword) name); } /* Build an identifier for the internal name of reference type TYPE. */ tree ! build_internal_class_name (type) ! tree type; { tree name; if (TYPE_ARRAY_P (type)) --- 349,364 ---- Returns the index of the entry. */ int ! alloc_name_constant (int tag, tree name) { ! CPool *outgoing_cpool = cpool_for_class (output_class); ! return find_tree_constant (outgoing_cpool, tag, name); } /* Build an identifier for the internal name of reference type TYPE. */ tree ! build_internal_class_name (tree type) { tree name; if (TYPE_ARRAY_P (type)) *************** build_internal_class_name (type) *** 370,377 **** /* Look for a CONSTANT_Class entry for CLAS, creating a new one if needed. */ int ! alloc_class_constant (clas) ! tree clas; { tree class_name = build_internal_class_name (clas); --- 376,382 ---- /* Look for a CONSTANT_Class entry for CLAS, creating a new one if needed. */ int ! alloc_class_constant (tree clas) { tree class_name = build_internal_class_name (clas); *************** alloc_class_constant (clas) *** 384,414 **** /* Return a reference to the data array of the current constant pool. */ static tree ! build_constant_data_ref () { ! if (TYPE_CPOOL_DATA_REF (current_class)) ! current_constant_pool_data_ref = TYPE_CPOOL_DATA_REF (current_class); ! else if (current_constant_pool_data_ref == NULL_TREE) { tree decl; ! tree decl_name = mangled_classname ("_CD_", current_class); decl = build_decl (VAR_DECL, decl_name, build_array_type (ptr_type_node, one_elt_array_domain_type)); TREE_STATIC (decl) = 1; make_decl_rtl (decl, NULL); ! TYPE_CPOOL_DATA_REF (current_class) = current_constant_pool_data_ref = build1 (ADDR_EXPR, ptr_type_node, decl); } ! return current_constant_pool_data_ref; } /* Get the pointer value at the INDEX'th element of the constant pool. */ tree ! build_ref_from_constant_pool (index) ! int index; { tree t = build_constant_data_ref (); index *= int_size_in_bytes (ptr_type_node); --- 389,420 ---- /* Return a reference to the data array of the current constant pool. */ static tree ! build_constant_data_ref (void) { ! tree cpool_data_ref = NULL_TREE; ! if (TYPE_CPOOL_DATA_REF (output_class)) ! cpool_data_ref = TYPE_CPOOL_DATA_REF (output_class); ! ! if (cpool_data_ref == NULL_TREE) { tree decl; ! tree decl_name = mangled_classname ("_CD_", output_class); decl = build_decl (VAR_DECL, decl_name, build_array_type (ptr_type_node, one_elt_array_domain_type)); TREE_STATIC (decl) = 1; make_decl_rtl (decl, NULL); ! TYPE_CPOOL_DATA_REF (output_class) = cpool_data_ref = build1 (ADDR_EXPR, ptr_type_node, decl); } ! return cpool_data_ref; } /* Get the pointer value at the INDEX'th element of the constant pool. */ tree ! build_ref_from_constant_pool (int index) { tree t = build_constant_data_ref (); index *= int_size_in_bytes (ptr_type_node); *************** build_ref_from_constant_pool (index) *** 417,428 **** return build1 (INDIRECT_REF, ptr_type_node, t); } ! /* Build an initializer for the constants field of the current constal pool. Should only be called at top-level, since it may emit declarations. */ tree ! build_constants_constructor () { tree tags_value, data_value; tree cons; tree tags_list = NULL_TREE; --- 423,435 ---- return build1 (INDIRECT_REF, ptr_type_node, t); } ! /* Build an initializer for the constants field of the current constant pool. Should only be called at top-level, since it may emit declarations. */ tree ! build_constants_constructor (void) { + CPool *outgoing_cpool = cpool_for_class (current_class); tree tags_value, data_value; tree cons; tree tags_list = NULL_TREE; *************** build_constants_constructor () *** 434,440 **** = tree_cons (NULL_TREE, get_tag_node (outgoing_cpool->tags[i]), tags_list); data_list ! = tree_cons (NULL_TREE, build_utf8_ref ((tree)outgoing_cpool->data[i]), data_list); } if (outgoing_cpool->count > 0) --- 441,447 ---- = tree_cons (NULL_TREE, get_tag_node (outgoing_cpool->tags[i]), tags_list); data_list ! = tree_cons (NULL_TREE, build_utf8_ref (outgoing_cpool->data[i].t), data_list); } if (outgoing_cpool->count > 0) *************** build_constants_constructor () *** 451,458 **** data_decl = TREE_OPERAND (build_constant_data_ref (), 0); TREE_TYPE (data_decl) = build_array_type (ptr_type_node, index_type), ! DECL_INITIAL (data_decl) = build (CONSTRUCTOR, TREE_TYPE (data_decl), ! NULL_TREE, data_list); DECL_SIZE (data_decl) = TYPE_SIZE (TREE_TYPE (data_decl)); DECL_SIZE_UNIT (data_decl) = TYPE_SIZE_UNIT (TREE_TYPE (data_decl)); rest_of_decl_compilation (data_decl, (char *) 0, 1, 0); --- 458,465 ---- data_decl = TREE_OPERAND (build_constant_data_ref (), 0); TREE_TYPE (data_decl) = build_array_type (ptr_type_node, index_type), ! DECL_INITIAL (data_decl) = build_constructor (TREE_TYPE (data_decl), ! data_list); DECL_SIZE (data_decl) = TYPE_SIZE (TREE_TYPE (data_decl)); DECL_SIZE_UNIT (data_decl) = TYPE_SIZE_UNIT (TREE_TYPE (data_decl)); rest_of_decl_compilation (data_decl, (char *) 0, 1, 0); *************** build_constants_constructor () *** 463,470 **** current_class), tags_type); TREE_STATIC (tags_decl) = 1; ! DECL_INITIAL (tags_decl) = build (CONSTRUCTOR, tags_type, ! NULL_TREE, tags_list); rest_of_decl_compilation (tags_decl, (char*) 0, 1, 0); tags_value = build_address_of (tags_decl); } --- 470,476 ---- current_class), tags_type); TREE_STATIC (tags_decl) = 1; ! DECL_INITIAL (tags_decl) = build_constructor (tags_type, tags_list); rest_of_decl_compilation (tags_decl, (char*) 0, 1, 0); tags_value = build_address_of (tags_decl); } diff -Nrc3pad gcc-3.3.3/gcc/java/convert.h gcc-3.4.0/gcc/java/convert.h *** gcc-3.3.3/gcc/java/convert.h 2000-01-21 20:57:00.000000000 +0000 --- gcc-3.4.0/gcc/java/convert.h 2003-01-09 23:16:50.000000000 +0000 *************** *** 1,28 **** - /* Definition of conversion functions. ! Copyright (C) 1993, 1998, 2000 Free Software Foundation, Inc. ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Written by Jeffrey Hsu */ ! extern tree convert_to_boolean PARAMS ((tree, tree)); ! extern tree convert_to_char PARAMS ((tree, tree)); ! extern tree convert_to_integer PARAMS ((tree type, tree expr)); ! extern tree convert_to_real PARAMS ((tree type, tree expr)); ! extern tree convert_to_pointer PARAMS ((tree type, tree expr)); --- 1,27 ---- /* Definition of conversion functions. ! Copyright (C) 1993, 1998, 2000, 2003 Free Software Foundation, Inc. ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Written by Jeffrey Hsu */ ! extern tree convert_to_boolean (tree, tree); ! extern tree convert_to_char (tree, tree); ! extern tree convert_to_integer (tree type, tree expr); ! extern tree convert_to_real (tree type, tree expr); ! extern tree convert_to_pointer (tree type, tree expr); diff -Nrc3pad gcc-3.3.3/gcc/java/.cvsignore gcc-3.4.0/gcc/java/.cvsignore *** gcc-3.3.3/gcc/java/.cvsignore 2002-04-08 18:32:20.000000000 +0000 --- gcc-3.4.0/gcc/java/.cvsignore 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,10 **** - parse.c - parse-scan.c - gcj.info* - gcj.1 - gcjh.1 - jv-scan.1 - jcf-dump.1 - gij.1 - jv-convert.1 - rmic.1 rmiregistry.1 --- 0 ---- diff -Nrc3pad gcc-3.3.3/gcc/java/decl.c gcc-3.4.0/gcc/java/decl.c *** gcc-3.3.3/gcc/java/decl.c 2003-02-12 23:38:02.000000000 +0000 --- gcc-3.4.0/gcc/java/decl.c 2004-01-16 17:11:08.000000000 +0000 *************** *** 1,22 **** /* Process declarations and variables for the GNU compiler for the Java(TM) language. ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,22 ---- /* Process declarations and variables for the GNU compiler for the Java(TM) language. ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 28,33 **** --- 28,35 ---- #include "config.h" #include "system.h" + #include "coretypes.h" + #include "tm.h" #include "tree.h" #include "rtl.h" #include "real.h" *************** The Free Software Foundation is independ *** 45,61 **** #include "tree-inline.h" #if defined (DEBUG_JAVA_BINDING_LEVELS) ! extern void indent PARAMS ((void)); #endif ! static tree push_jvm_slot PARAMS ((int, tree)); ! static tree lookup_name_current_level PARAMS ((tree)); ! static tree push_promoted_type PARAMS ((const char *, tree)); ! static struct binding_level *make_binding_level PARAMS ((void)); ! static tree create_primitive_vtable PARAMS ((const char *)); ! static tree check_local_named_variable PARAMS ((tree, tree, int, int *)); ! static tree check_local_unnamed_variable PARAMS ((tree, tree, tree)); ! static void dump_function PARAMS ((enum tree_dump_index, tree)); /* Name of the Cloneable class. */ tree java_lang_cloneable_identifier_node; --- 47,62 ---- #include "tree-inline.h" #if defined (DEBUG_JAVA_BINDING_LEVELS) ! extern void indent (void); #endif ! static tree push_jvm_slot (int, tree); ! static tree lookup_name_current_level (tree); ! static tree push_promoted_type (const char *, tree); ! static struct binding_level *make_binding_level (void); ! static tree create_primitive_vtable (const char *); ! static tree check_local_named_variable (tree, tree, int, int *); ! static tree check_local_unnamed_variable (tree, tree, tree); /* Name of the Cloneable class. */ tree java_lang_cloneable_identifier_node; *************** tree java_lang_cloneable_identifier_node *** 63,72 **** /* Name of the Serializable class. */ tree java_io_serializable_identifier_node; - /* Set to nonzero value in order to emit class initilization code - before static field references. */ - extern int always_initialize_class_p; - /* The DECL_MAP is a mapping from (index, type) to a decl node. If index < max_locals, it is the index of a local variable. if index >= max_locals, then index-max_locals is a stack slot. --- 64,69 ---- *************** int is_class_level = 0; *** 91,99 **** int current_pc; void ! indent () { ! register unsigned i; for (i = 0; i < binding_depth*2; i++) putc (' ', stderr); --- 88,96 ---- int current_pc; void ! indent (void) { ! unsigned i; for (i = 0; i < binding_depth*2; i++) putc (' ', stderr); *************** indent () *** 101,109 **** #endif /* defined(DEBUG_JAVA_BINDING_LEVELS) */ static tree ! push_jvm_slot (index, decl) ! int index; ! tree decl; { struct rtx_def *rtl = NULL; tree type = TREE_TYPE (decl); --- 98,104 ---- #endif /* defined(DEBUG_JAVA_BINDING_LEVELS) */ static tree ! push_jvm_slot (int index, tree decl) { struct rtx_def *rtl = NULL; tree type = TREE_TYPE (decl); *************** push_jvm_slot (index, decl) *** 117,123 **** tmp = TREE_VEC_ELT (decl_map, index); while (tmp != NULL_TREE) { ! if (TYPE_MODE (type) == TYPE_MODE (TREE_TYPE (tmp))) rtl = DECL_RTL_IF_SET (tmp); if (rtl != NULL) break; --- 112,119 ---- tmp = TREE_VEC_ELT (decl_map, index); while (tmp != NULL_TREE) { ! if (TYPE_MODE (type) == TYPE_MODE (TREE_TYPE (tmp)) ! && ! LOCAL_VAR_OUT_OF_SCOPE_P (tmp)) rtl = DECL_RTL_IF_SET (tmp); if (rtl != NULL) break; *************** push_jvm_slot (index, decl) *** 150,160 **** is returned, then updated is set to true. */ static tree ! check_local_named_variable (best, decl, pc, updated) ! tree best; ! tree decl; ! int pc; ! int *updated; { if (pc >= DECL_LOCAL_START_PC (decl) && pc < DECL_LOCAL_END_PC (decl)) --- 146,152 ---- is returned, then updated is set to true. */ static tree ! check_local_named_variable (tree best, tree decl, int pc, int *updated) { if (pc >= DECL_LOCAL_START_PC (decl) && pc < DECL_LOCAL_END_PC (decl)) *************** check_local_named_variable (best, decl, *** 175,184 **** than 'best', return 'decl'. Otherwise return 'best'. */ static tree ! check_local_unnamed_variable (best, decl, type) ! tree best; ! tree decl; ! tree type; { if (TREE_TYPE (decl) == type || (TREE_CODE (TREE_TYPE (decl)) == TREE_CODE (type) --- 167,173 ---- than 'best', return 'decl'. Otherwise return 'best'. */ static tree ! check_local_unnamed_variable (tree best, tree decl, tree type) { if (TREE_TYPE (decl) == type || (TREE_CODE (TREE_TYPE (decl)) == TREE_CODE (type) *************** check_local_unnamed_variable (best, decl *** 202,211 **** If there is no existing matching decl, allocate one. */ tree ! find_local_variable (index, type, pc) ! int index; ! tree type; ! int pc; { tree decl = TREE_VEC_ELT (decl_map, index); tree best = NULL_TREE; --- 191,197 ---- If there is no existing matching decl, allocate one. */ tree ! find_local_variable (int index, tree type, int pc) { tree decl = TREE_VEC_ELT (decl_map, index); tree best = NULL_TREE; *************** find_local_variable (index, type, pc) *** 251,259 **** /* Same as find_local_index, except that INDEX is a stack index. */ tree ! find_stack_slot (index, type) ! int index; ! tree type; { return find_local_variable (index + DECL_MAX_LOCALS (current_function_decl), type, -1); --- 237,243 ---- /* Same as find_local_index, except that INDEX is a stack index. */ tree ! find_stack_slot (int index, tree type) { return find_local_variable (index + DECL_MAX_LOCALS (current_function_decl), type, -1); *************** tree java_global_trees[JTI_MAX]; *** 339,347 **** types shorter than int. */ static tree ! push_promoted_type (name, actual_type) ! const char *name; ! tree actual_type; { tree type = make_node (TREE_CODE (actual_type)); #if 1 --- 323,329 ---- types shorter than int. */ static tree ! push_promoted_type (const char *name, tree actual_type) { tree type = make_node (TREE_CODE (actual_type)); #if 1 *************** push_promoted_type (name, actual_type) *** 371,383 **** ATTRS is nonzero, use that for the function's attribute list. */ tree ! builtin_function (name, type, function_code, class, library_name, attrs) ! const char *name; ! tree type; ! int function_code; ! enum built_in_class class; ! const char *library_name; ! tree attrs ATTRIBUTE_UNUSED; { tree decl = build_decl (FUNCTION_DECL, get_identifier (name), type); DECL_EXTERNAL (decl) = 1; --- 353,364 ---- ATTRS is nonzero, use that for the function's attribute list. */ tree ! builtin_function (const char *name, ! tree type, ! int function_code, ! enum built_in_class class, ! const char *library_name, ! tree attrs ATTRIBUTE_UNUSED) { tree decl = build_decl (FUNCTION_DECL, get_identifier (name), type); DECL_EXTERNAL (decl) = 1; *************** builtin_function (name, type, function_c *** 393,400 **** /* Return tree that represents a vtable for a primitive array. */ static tree ! create_primitive_vtable (name) ! const char *name; { tree r; char buf[50]; --- 374,380 ---- /* Return tree that represents a vtable for a primitive array. */ static tree ! create_primitive_vtable (const char *name) { tree r; char buf[50]; *************** create_primitive_vtable (name) *** 405,418 **** return r; } void ! java_init_decl_processing () { ! register tree endlink; tree field = NULL_TREE; tree t; init_class_processing (); current_function_decl = NULL; current_binding_level = NULL_BINDING_LEVEL; --- 385,406 ---- return r; } + static tree + do_nothing (tree t) + { + return t; + } + + void ! java_init_decl_processing (void) { ! tree endlink; tree field = NULL_TREE; tree t; init_class_processing (); + init_resource_processing (); current_function_decl = NULL; current_binding_level = NULL_BINDING_LEVEL; *************** java_init_decl_processing () *** 553,558 **** --- 541,568 ---- float_array_vtable = create_primitive_vtable ("float"); double_array_vtable = create_primitive_vtable ("double"); + one_elt_array_domain_type = build_index_type (integer_one_node); + utf8const_type = make_node (RECORD_TYPE); + PUSH_FIELD (utf8const_type, field, "hash", unsigned_short_type_node); + PUSH_FIELD (utf8const_type, field, "length", unsigned_short_type_node); + FINISH_RECORD (utf8const_type); + utf8const_ptr_type = build_pointer_type (utf8const_type); + + atable_type = build_array_type (ptr_type_node, + one_elt_array_domain_type); + TYPE_NONALIASED_COMPONENT (atable_type) = 1; + atable_ptr_type = build_pointer_type (atable_type); + + symbol_type = make_node (RECORD_TYPE); + PUSH_FIELD (symbol_type, field, "clname", utf8const_ptr_type); + PUSH_FIELD (symbol_type, field, "name", utf8const_ptr_type); + PUSH_FIELD (symbol_type, field, "signature", utf8const_ptr_type); + FINISH_RECORD (symbol_type); + + symbols_array_type = build_array_type (symbol_type, + one_elt_array_domain_type); + symbols_array_ptr_type = build_pointer_type (symbols_array_type); + /* As you're adding items here, please update the code right after this section, so that the filename containing the source code of the pre-defined class gets registered correctly. */ *************** java_init_decl_processing () *** 568,577 **** lookup_class (get_identifier ("java.lang.RuntimeException")); error_exception_type_node = lookup_class (get_identifier ("java.lang.Error")); - class_not_found_type_node = - lookup_class (get_identifier ("java.lang.ClassNotFoundException")); - no_class_def_found_type_node = - lookup_class (get_identifier ("java.lang.NoClassDefFoundError")); rawdata_ptr_type_node = promote_type (lookup_class (get_identifier ("gnu.gcj.RawData"))); --- 578,583 ---- *************** java_init_decl_processing () *** 614,625 **** /* for lack of a better place to put this stub call */ init_expr_processing(); - utf8const_type = make_node (RECORD_TYPE); - PUSH_FIELD (utf8const_type, field, "hash", unsigned_short_type_node); - PUSH_FIELD (utf8const_type, field, "length", unsigned_short_type_node); - FINISH_RECORD (utf8const_type); - utf8const_ptr_type = build_pointer_type (utf8const_type); - constants_type_node = make_node (RECORD_TYPE); PUSH_FIELD (constants_type_node, field, "size", unsigned_int_type_node); PUSH_FIELD (constants_type_node, field, "tags", ptr_type_node); --- 620,625 ---- *************** java_init_decl_processing () *** 632,666 **** dtable_type = make_node (RECORD_TYPE); dtable_ptr_type = build_pointer_type (dtable_type); - one_elt_array_domain_type = build_index_type (integer_one_node); otable_type = build_array_type (integer_type_node, one_elt_array_domain_type); TYPE_NONALIASED_COMPONENT (otable_type) = 1; otable_ptr_type = build_pointer_type (otable_type); - method_symbol_type = make_node (RECORD_TYPE); - PUSH_FIELD (method_symbol_type, field, "clname", utf8const_ptr_type); - PUSH_FIELD (method_symbol_type, field, "name", utf8const_ptr_type); - PUSH_FIELD (method_symbol_type, field, "signature", utf8const_ptr_type); - FINISH_RECORD (method_symbol_type); - - method_symbols_array_type = build_array_type (method_symbol_type, - one_elt_array_domain_type); - method_symbols_array_ptr_type = build_pointer_type - (method_symbols_array_type); - - otable_decl = build_decl (VAR_DECL, get_identifier ("otable"), otable_type); - DECL_EXTERNAL (otable_decl) = 1; - TREE_STATIC (otable_decl) = 1; - TREE_READONLY (otable_decl) = 1; - pushdecl (otable_decl); - - otable_syms_decl = build_decl (VAR_DECL, get_identifier ("otable_syms"), - method_symbols_array_type); - TREE_STATIC (otable_syms_decl) = 1; - TREE_CONSTANT (otable_syms_decl) = 1; - pushdecl (otable_syms_decl); - PUSH_FIELD (object_type_node, field, "vtable", dtable_ptr_type); /* This isn't exactly true, but it is what we have in the source. There is an unresolved issue here, which is whether the vtable --- 632,642 ---- *************** java_init_decl_processing () *** 696,702 **** PUSH_FIELD (class_type_node, field, "vtable", dtable_ptr_type); PUSH_FIELD (class_type_node, field, "otable", otable_ptr_type); PUSH_FIELD (class_type_node, field, "otable_syms", ! method_symbols_array_ptr_type); PUSH_FIELD (class_type_node, field, "interfaces", build_pointer_type (class_ptr_type)); PUSH_FIELD (class_type_node, field, "loader", ptr_type_node); --- 672,682 ---- PUSH_FIELD (class_type_node, field, "vtable", dtable_ptr_type); PUSH_FIELD (class_type_node, field, "otable", otable_ptr_type); PUSH_FIELD (class_type_node, field, "otable_syms", ! symbols_array_ptr_type); ! PUSH_FIELD (class_type_node, field, "atable", atable_ptr_type); ! PUSH_FIELD (class_type_node, field, "atable_syms", ! symbols_array_ptr_type); ! PUSH_FIELD (class_type_node, field, "catch_classes", ptr_type_node); PUSH_FIELD (class_type_node, field, "interfaces", build_pointer_type (class_ptr_type)); PUSH_FIELD (class_type_node, field, "loader", ptr_type_node); *************** java_init_decl_processing () *** 708,713 **** --- 688,694 ---- PUSH_FIELD (class_type_node, field, "idt", ptr_type_node); PUSH_FIELD (class_type_node, field, "arrayclass", ptr_type_node); PUSH_FIELD (class_type_node, field, "protectionDomain", ptr_type_node); + PUSH_FIELD (class_type_node, field, "hack_signers", ptr_type_node); PUSH_FIELD (class_type_node, field, "chain", ptr_type_node); for (t = TYPE_FIELDS (class_type_node); t != NULL_TREE; t = TREE_CHAIN (t)) FIELD_PRIVATE (t) = 1; *************** java_init_decl_processing () *** 900,921 **** build_function_type (ptr_type_node, t), 0, NOT_BUILT_IN, NULL, NULL_TREE); - t = tree_cons (NULL_TREE, double_type_node, - tree_cons (NULL_TREE, double_type_node, endlink)); - soft_fmod_node - = builtin_function ("__builtin_fmod", - build_function_type (double_type_node, t), - BUILT_IN_FMOD, BUILT_IN_NORMAL, "fmod", NULL_TREE); - - #if 0 - t = tree_cons (NULL_TREE, float_type_node, - tree_cons (NULL_TREE, float_type_node, endlink)); - soft_fmodf_node - = builtin_function ("__builtin_fmodf", - build_function_type (float_type_node, t), - BUILT_IN_FMOD, BUILT_IN_NORMAL, "fmodf", NULL_TREE); - #endif - soft_idiv_node = builtin_function ("_Jv_divI", build_function_type (int_type_node, t), --- 881,886 ---- *************** java_init_decl_processing () *** 940,950 **** eh_personality_libfunc = init_one_libfunc (USING_SJLJ_EXCEPTIONS ? "__gcj_personality_sj0" : "__gcj_personality_v0"); - lang_eh_runtime_type = prepare_eh_table_type; ! init_jcf_parse (); initialize_builtins (); } --- 905,920 ---- eh_personality_libfunc = init_one_libfunc (USING_SJLJ_EXCEPTIONS ? "__gcj_personality_sj0" : "__gcj_personality_v0"); ! lang_eh_runtime_type = do_nothing; + init_jcf_parse (); + initialize_builtins (); + soft_fmod_node = built_in_decls[BUILT_IN_FMOD]; + #if 0 + soft_fmodf_node = built_in_decls[BUILT_IN_FMODF]; + #endif } *************** java_init_decl_processing () *** 954,963 **** or return 0 if it is undefined. */ tree ! lookup_name (name) ! tree name; { ! register tree val; if (current_binding_level != global_binding_level && IDENTIFIER_LOCAL_VALUE (name)) val = IDENTIFIER_LOCAL_VALUE (name); --- 924,932 ---- or return 0 if it is undefined. */ tree ! lookup_name (tree name) { ! tree val; if (current_binding_level != global_binding_level && IDENTIFIER_LOCAL_VALUE (name)) val = IDENTIFIER_LOCAL_VALUE (name); *************** lookup_name (name) *** 970,979 **** the previous one if its the parameter level. */ static tree ! lookup_name_current_level (name) ! tree name; { ! register tree t; if (current_binding_level == global_binding_level) return IDENTIFIER_GLOBAL_VALUE (name); --- 939,947 ---- the previous one if its the parameter level. */ static tree ! lookup_name_current_level (tree name) { ! tree t; if (current_binding_level == global_binding_level) return IDENTIFIER_GLOBAL_VALUE (name); *************** lookup_name_current_level (name) *** 991,1001 **** /* Use a binding level to record a labeled block declaration */ void ! push_labeled_block (lb) ! tree lb; { ! register tree name = DECL_NAME (LABELED_BLOCK_LABEL (lb)); ! register struct binding_level *b = current_binding_level; tree oldlocal = IDENTIFIER_LOCAL_VALUE (name); if (oldlocal != 0) b->shadowed = tree_cons (name, oldlocal, b->shadowed); --- 959,968 ---- /* Use a binding level to record a labeled block declaration */ void ! push_labeled_block (tree lb) { ! tree name = DECL_NAME (LABELED_BLOCK_LABEL (lb)); ! struct binding_level *b = current_binding_level; tree oldlocal = IDENTIFIER_LOCAL_VALUE (name); if (oldlocal != 0) b->shadowed = tree_cons (name, oldlocal, b->shadowed); *************** push_labeled_block (lb) *** 1008,1014 **** labeled block */ void ! pop_labeled_block () { struct binding_level *b = current_binding_level; tree label = b->names; --- 975,981 ---- labeled block */ void ! pop_labeled_block (void) { struct binding_level *b = current_binding_level; tree label = b->names; *************** pop_labeled_block () *** 1033,1064 **** to agree with what X says. */ tree ! pushdecl (x) ! tree x; { ! register tree t; ! register tree name = DECL_NAME (x); ! register struct binding_level *b = current_binding_level; if (TREE_CODE (x) != TYPE_DECL) DECL_CONTEXT (x) = current_function_decl; if (name) { - const char *file; - int line; - t = lookup_name_current_level (name); if (t != 0 && t == error_mark_node) /* error_mark_node is 0 for a while during initialization! */ { t = 0; ! error_with_decl (x, "`%s' used prior to declaration"); ! } ! ! if (t != 0) ! { ! file = DECL_SOURCE_FILE (t); ! line = DECL_SOURCE_LINE (t); } /* If we're naming a hitherto-unnamed type, set its TYPE_NAME --- 1000,1021 ---- to agree with what X says. */ tree ! pushdecl (tree x) { ! tree t; ! tree name = DECL_NAME (x); ! struct binding_level *b = current_binding_level; if (TREE_CODE (x) != TYPE_DECL) DECL_CONTEXT (x) = current_function_decl; if (name) { t = lookup_name_current_level (name); if (t != 0 && t == error_mark_node) /* error_mark_node is 0 for a while during initialization! */ { t = 0; ! error ("%J'%D' used prior to declaration", x, x); } /* If we're naming a hitherto-unnamed type, set its TYPE_NAME *************** pushdecl (x) *** 1152,1159 **** } void ! pushdecl_force_head (x) ! tree x; { current_binding_level->names = x; } --- 1109,1115 ---- } void ! pushdecl_force_head (tree x) { current_binding_level->names = x; } *************** pushdecl_force_head (x) *** 1161,1171 **** /* Like pushdecl, only it places X in GLOBAL_BINDING_LEVEL, if appropriate. */ tree ! pushdecl_top_level (x) ! tree x; { ! register tree t; ! register struct binding_level *b = current_binding_level; current_binding_level = global_binding_level; t = pushdecl (x); --- 1117,1126 ---- /* Like pushdecl, only it places X in GLOBAL_BINDING_LEVEL, if appropriate. */ tree ! pushdecl_top_level (tree x) { ! tree t; ! struct binding_level *b = current_binding_level; current_binding_level = global_binding_level; t = pushdecl (x); *************** pushdecl_top_level (x) *** 1176,1182 **** /* Nonzero if we are currently in the global binding level. */ int ! global_bindings_p () { return current_binding_level == global_binding_level; } --- 1131,1137 ---- /* Nonzero if we are currently in the global binding level. */ int ! global_bindings_p (void) { return current_binding_level == global_binding_level; } *************** global_bindings_p () *** 1187,1193 **** store the result back using `storedecls' or you will lose. */ tree ! getdecls () { return current_binding_level->names; } --- 1142,1148 ---- store the result back using `storedecls' or you will lose. */ tree ! getdecls (void) { return current_binding_level->names; } *************** getdecls () *** 1195,1211 **** /* Create a new `struct binding_level'. */ static struct binding_level * ! make_binding_level () { /* NOSTRICT */ return xmalloc (sizeof (struct binding_level)); } void ! pushlevel (unused) ! int unused ATTRIBUTE_UNUSED; { ! register struct binding_level *newlevel = NULL_BINDING_LEVEL; #if 0 /* If this is the top level of a function, --- 1150,1165 ---- /* Create a new `struct binding_level'. */ static struct binding_level * ! make_binding_level (void) { /* NOSTRICT */ return xmalloc (sizeof (struct binding_level)); } void ! pushlevel (int unused ATTRIBUTE_UNUSED) { ! struct binding_level *newlevel = NULL_BINDING_LEVEL; #if 0 /* If this is the top level of a function, *************** pushlevel (unused) *** 1259,1270 **** them into the BLOCK. */ tree ! poplevel (keep, reverse, functionbody) ! int keep; ! int reverse; ! int functionbody; { ! register tree link; /* The chain of decls was accumulated in reverse order. Put it into forward order, just for cleanliness. */ tree decls; --- 1213,1221 ---- them into the BLOCK. */ tree ! poplevel (int keep, int reverse, int functionbody) { ! tree link; /* The chain of decls was accumulated in reverse order. Put it into forward order, just for cleanliness. */ tree decls; *************** poplevel (keep, reverse, functionbody) *** 1272,1277 **** --- 1223,1229 ---- tree block = 0; tree decl; int block_previously_created; + { #if defined(DEBUG_JAVA_BINDING_LEVELS) binding_depth--; *************** poplevel (keep, reverse, functionbody) *** 1312,1323 **** && DECL_INITIAL (decl) != 0 && TREE_ADDRESSABLE (decl)) { ! /* If this decl was copied from a file-scope decl ! on account of a block-scope extern decl, ! propagate TREE_ADDRESSABLE to the file-scope decl. ! ! DECL_ABSTRACT_ORIGIN can be set to itself if warn_return_type is ! true, since then the decl goes through save_for_inline_copying. */ if (DECL_ABSTRACT_ORIGIN (decl) != 0 && DECL_ABSTRACT_ORIGIN (decl) != decl) TREE_ADDRESSABLE (DECL_ABSTRACT_ORIGIN (decl)) = 1; --- 1264,1276 ---- && DECL_INITIAL (decl) != 0 && TREE_ADDRESSABLE (decl)) { ! /* If this decl was copied from a file-scope decl on account ! of a block-scope extern decl, propagate TREE_ADDRESSABLE ! to the file-scope decl. ! ! DECL_ABSTRACT_ORIGIN can be set to itself if ! warn_return_type is true, since then the decl goes ! through save_for_inline_copying. */ if (DECL_ABSTRACT_ORIGIN (decl) != 0 && DECL_ABSTRACT_ORIGIN (decl) != decl) TREE_ADDRESSABLE (DECL_ABSTRACT_ORIGIN (decl)) = 1; *************** poplevel (keep, reverse, functionbody) *** 1328,1333 **** --- 1281,1291 ---- pop_function_context (); } } + else if (TREE_CODE (decl) == VAR_DECL + && DECL_LANG_SPECIFIC (decl) != NULL + && DECL_LOCAL_SLOT_NUMBER (decl)) + LOCAL_VAR_OUT_OF_SCOPE_P (decl) = 1; + } /* If there were any declarations in that level, or if this level is a function body, *************** poplevel (keep, reverse, functionbody) *** 1396,1412 **** #if 0 for (link = named_labels; link; link = TREE_CHAIN (link)) { ! register tree label = TREE_VALUE (link); if (DECL_INITIAL (label) == 0) { ! error_with_decl (label, "label `%s' used but not defined"); /* Avoid crashing later. */ ! define_label (input_filename, lineno, ! DECL_NAME (label)); } else if (warn_unused[UNUSED_LABEL] && !TREE_USED (label)) ! warning_with_decl (label, "label `%s' defined but not used"); IDENTIFIER_LABEL_VALUE (DECL_NAME (label)) = 0; /* Put the labels into the "variables" of the --- 1354,1369 ---- #if 0 for (link = named_labels; link; link = TREE_CHAIN (link)) { ! tree label = TREE_VALUE (link); if (DECL_INITIAL (label) == 0) { ! error ("%Jlabel '%D' used but not defined", label, label); /* Avoid crashing later. */ ! define_label (input_location, DECL_NAME (label)); } else if (warn_unused[UNUSED_LABEL] && !TREE_USED (label)) ! warning ("%Jlabel '%D' defined but not used", label, label); IDENTIFIER_LABEL_VALUE (DECL_NAME (label)) = 0; /* Put the labels into the "variables" of the *************** poplevel (keep, reverse, functionbody) *** 1420,1426 **** /* Pop the current level, and free the structure for reuse. */ { ! register struct binding_level *level = current_binding_level; current_binding_level = current_binding_level->level_chain; level->level_chain = free_binding_level; --- 1377,1383 ---- /* Pop the current level, and free the structure for reuse. */ { ! struct binding_level *level = current_binding_level; current_binding_level = current_binding_level->level_chain; level->level_chain = free_binding_level; *************** poplevel (keep, reverse, functionbody) *** 1466,1473 **** } void ! maybe_pushlevels (pc) ! int pc; { #if defined(DEBUG_JAVA_BINDING_LEVELS) current_pc = pc; --- 1423,1429 ---- } void ! maybe_pushlevels (int pc) { #if defined(DEBUG_JAVA_BINDING_LEVELS) current_pc = pc; *************** maybe_pushlevels (pc) *** 1509,1516 **** } void ! maybe_poplevels (pc) ! int pc; { #if defined(DEBUG_JAVA_BINDING_LEVELS) current_pc = pc; --- 1465,1471 ---- } void ! maybe_poplevels (int pc) { #if defined(DEBUG_JAVA_BINDING_LEVELS) current_pc = pc; *************** maybe_poplevels (pc) *** 1531,1545 **** range is forcibly terminated when that exception ends. */ void ! force_poplevels (start_pc) ! int start_pc; { while (current_binding_level->start_pc > start_pc) { if (pedantic && current_binding_level->start_pc > start_pc) ! warning_with_decl (current_function_decl, ! "In %s: overlapped variable and exception ranges at %d", ! current_binding_level->start_pc); expand_end_bindings (getdecls (), 1, 0); poplevel (1, 0, 0); } --- 1486,1499 ---- range is forcibly terminated when that exception ends. */ void ! force_poplevels (int start_pc) { while (current_binding_level->start_pc > start_pc) { if (pedantic && current_binding_level->start_pc > start_pc) ! warning ("%JIn %D: overlapped variable and exception ranges at %d", ! current_function_decl, current_function_decl, ! current_binding_level->start_pc); expand_end_bindings (getdecls (), 1, 0); poplevel (1, 0, 0); } *************** force_poplevels (start_pc) *** 1550,1557 **** to handle the BLOCK node inside the BIND_EXPR. */ void ! insert_block (block) ! tree block; { TREE_USED (block) = 1; current_binding_level->blocks --- 1504,1510 ---- to handle the BLOCK node inside the BIND_EXPR. */ void ! insert_block (tree block) { TREE_USED (block) = 1; current_binding_level->blocks *************** insert_block (block) *** 1562,1569 **** (the one we are currently in). */ void ! set_block (block) ! register tree block; { current_binding_level->this_block = block; current_binding_level->names = chainon (current_binding_level->names, --- 1515,1521 ---- (the one we are currently in). */ void ! set_block (tree block) { current_binding_level->this_block = block; current_binding_level->names = chainon (current_binding_level->names, *************** set_block (block) *** 1575,1582 **** /* integrate_decl_tree calls this function. */ void ! java_dup_lang_specific_decl (node) ! tree node; { int lang_decl_size; struct lang_decl *x; --- 1527,1533 ---- /* integrate_decl_tree calls this function. */ void ! java_dup_lang_specific_decl (tree node) { int lang_decl_size; struct lang_decl *x; *************** java_dup_lang_specific_decl (node) *** 1585,1598 **** return; lang_decl_size = sizeof (struct lang_decl); ! x = (struct lang_decl *) ggc_alloc (lang_decl_size); memcpy (x, DECL_LANG_SPECIFIC (node), lang_decl_size); DECL_LANG_SPECIFIC (node) = x; } void ! give_name_to_locals (jcf) ! JCF *jcf; { int i, n = DECL_LOCALVARIABLES_OFFSET (current_function_decl); int code_offset = DECL_CODE_OFFSET (current_function_decl); --- 1536,1548 ---- return; lang_decl_size = sizeof (struct lang_decl); ! x = ggc_alloc (lang_decl_size); memcpy (x, DECL_LANG_SPECIFIC (node), lang_decl_size); DECL_LANG_SPECIFIC (node) = x; } void ! give_name_to_locals (JCF *jcf) { int i, n = DECL_LOCALVARIABLES_OFFSET (current_function_decl); int code_offset = DECL_CODE_OFFSET (current_function_decl); *************** give_name_to_locals (jcf) *** 1628,1635 **** tree decl = build_decl (VAR_DECL, name, type); if (end_pc > DECL_CODE_LENGTH (current_function_decl)) { ! warning_with_decl (decl, ! "bad PC range for debug info for local `%s'"); end_pc = DECL_CODE_LENGTH (current_function_decl); } --- 1578,1585 ---- tree decl = build_decl (VAR_DECL, name, type); if (end_pc > DECL_CODE_LENGTH (current_function_decl)) { ! warning ("%Jbad PC range for debug info for local '%D'", ! decl, decl); end_pc = DECL_CODE_LENGTH (current_function_decl); } *************** give_name_to_locals (jcf) *** 1690,1697 **** } tree ! build_result_decl (fndecl) ! tree fndecl; { tree restype = TREE_TYPE (TREE_TYPE (fndecl)); tree result = DECL_RESULT (fndecl); --- 1640,1646 ---- } tree ! build_result_decl (tree fndecl) { tree restype = TREE_TYPE (TREE_TYPE (fndecl)); tree result = DECL_RESULT (fndecl); *************** build_result_decl (fndecl) *** 1709,1721 **** } void ! complete_start_java_method (fndecl) ! tree fndecl; { if (! flag_emit_class_files) { /* Initialize the RTL code for the function. */ ! init_function_start (fndecl, input_filename, lineno); /* Set up parameters and prepare for return, for the function. */ expand_function_start (fndecl, 0); --- 1658,1669 ---- } void ! complete_start_java_method (tree fndecl) { if (! flag_emit_class_files) { /* Initialize the RTL code for the function. */ ! init_function_start (fndecl); /* Set up parameters and prepare for return, for the function. */ expand_function_start (fndecl, 0); *************** complete_start_java_method (fndecl) *** 1782,1789 **** } void ! start_java_method (fndecl) ! tree fndecl; { tree tem, *ptr; int i; --- 1730,1736 ---- } void ! start_java_method (tree fndecl) { tree tem, *ptr; int i; *************** start_java_method (fndecl) *** 1842,1848 **** } void ! end_java_method () { tree fndecl = current_function_decl; --- 1789,1795 ---- } void ! end_java_method (void) { tree fndecl = current_function_decl; *************** end_java_method () *** 1856,1862 **** BLOCK_SUPERCONTEXT (DECL_INITIAL (fndecl)) = fndecl; /* Generate rtl for function exit. */ ! expand_function_end (input_filename, lineno, 0); /* Run the optimizers and output assembler code for this function. */ rest_of_compilation (fndecl); --- 1803,1809 ---- BLOCK_SUPERCONTEXT (DECL_INITIAL (fndecl)) = fndecl; /* Generate rtl for function exit. */ ! expand_function_end (); /* Run the optimizers and output assembler code for this function. */ rest_of_compilation (fndecl); *************** end_java_method () *** 1864,1897 **** current_function_decl = NULL_TREE; } ! /* Dump FUNCTION_DECL FN as tree dump PHASE. */ ! static void ! dump_function (phase, fn) ! enum tree_dump_index phase; ! tree fn; { ! FILE *stream; ! int flags; ! stream = dump_begin (phase, &flags); ! if (stream) { ! dump_node (fn, TDF_SLIM | flags, stream); ! dump_end (phase, stream); } ! } ! ! void java_optimize_inline (fndecl) ! tree fndecl; ! { ! if (flag_inline_trees) { ! timevar_push (TV_INTEGRATION); ! optimize_inline_calls (fndecl); ! timevar_pop (TV_INTEGRATION); ! dump_function (TDI_inlined, fndecl); } } #include "gt-java-decl.h" --- 1811,1894 ---- current_function_decl = NULL_TREE; } ! /* Expand a function's body. */ ! void ! java_expand_body (tree fndecl) { ! location_t saved_location = input_location; ! current_function_decl = fndecl; ! input_location = DECL_SOURCE_LOCATION (fndecl); ! output_class = current_class = DECL_CONTEXT (fndecl); ! ! timevar_push (TV_EXPAND); ! ! /* Prepare the function for tree completion. */ ! start_complete_expand_method (fndecl); ! ! if (! flag_emit_class_files && ! flag_emit_xref) { ! /* Initialize the RTL code for the function. */ ! init_function_start (fndecl); ! ! /* Set up parameters and prepare for return, for the function. */ ! expand_function_start (fndecl, 0); ! ! /* Generate the RTL for this function. */ ! expand_expr_stmt_value (DECL_SAVED_TREE (fndecl), 0, 1); } ! ! /* Pop out of its parameters. */ ! pushdecl_force_head (DECL_ARGUMENTS (fndecl)); ! poplevel (1, 0, 1); ! BLOCK_SUPERCONTEXT (DECL_INITIAL (fndecl)) = fndecl; ! ! if (! flag_emit_class_files && ! flag_emit_xref) { ! /* Generate RTL for function exit. */ ! input_line = DECL_FUNCTION_LAST_LINE (fndecl); ! expand_function_end (); ! ! /* Run the optimizers and output the assembler code ! for this function. */ ! rest_of_compilation (fndecl); } + + timevar_pop (TV_EXPAND); + + input_location = saved_location; + + current_function_decl = NULL_TREE; + } + + /* We pessimistically marked all methods and fields external until we + knew what set of classes we were planning to compile. Now mark those + associated with CLASS to be generated locally as not external. */ + + static void + java_mark_decl_local (tree decl) + { + DECL_EXTERNAL (decl) = 0; + + /* If we've already constructed DECL_RTL, give encode_section_info + a second chance, now that we've changed the flags. */ + if (DECL_RTL_SET_P (decl)) + make_decl_rtl (decl, NULL); + } + + void + java_mark_class_local (tree class) + { + tree t; + + for (t = TYPE_FIELDS (class); t ; t = TREE_CHAIN (t)) + if (FIELD_STATIC (t)) + java_mark_decl_local (t); + + for (t = TYPE_METHODS (class); t ; t = TREE_CHAIN (t)) + if (!METHOD_ABSTRACT (t) && (!METHOD_NATIVE (t) || flag_jni)) + java_mark_decl_local (t); } #include "gt-java-decl.h" diff -Nrc3pad gcc-3.3.3/gcc/java/except.c gcc-3.4.0/gcc/java/except.c *** gcc-3.3.3/gcc/java/except.c 2002-11-18 15:46:32.000000000 +0000 --- gcc-3.4.0/gcc/java/except.c 2004-01-09 17:08:43.000000000 +0000 *************** *** 1,20 **** /* Handle exceptions for GNU compiler for the Java(TM) language. ! Copyright (C) 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc. ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,21 ---- /* Handle exceptions for GNU compiler for the Java(TM) language. ! Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004 ! Free Software Foundation, Inc. ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 24,29 **** --- 25,32 ---- #include "config.h" #include "system.h" + #include "coretypes.h" + #include "tm.h" #include "tree.h" #include "real.h" #include "rtl.h" *************** The Free Software Foundation is independ *** 36,48 **** #include "java-except.h" #include "toplev.h" ! static void expand_start_java_handler PARAMS ((struct eh_range *)); ! static void expand_end_java_handler PARAMS ((struct eh_range *)); ! static struct eh_range *find_handler_in_range PARAMS ((int, struct eh_range *, ! struct eh_range *)); ! static void link_handler PARAMS ((struct eh_range *, struct eh_range *)); ! static void check_start_handlers PARAMS ((struct eh_range *, int)); ! static void free_eh_ranges PARAMS ((struct eh_range *range)); struct eh_range *current_method_handlers; --- 39,51 ---- #include "java-except.h" #include "toplev.h" ! static void expand_start_java_handler (struct eh_range *); ! static void expand_end_java_handler (struct eh_range *); ! static struct eh_range *find_handler_in_range (int, struct eh_range *, ! struct eh_range *); ! static void link_handler (struct eh_range *, struct eh_range *); ! static void check_start_handlers (struct eh_range *, int); ! static void free_eh_ranges (struct eh_range *range); struct eh_range *current_method_handlers; *************** extern void indent (); *** 74,83 **** previous children have end_pc values that are too low. */ static struct eh_range * ! find_handler_in_range (pc, range, child) ! int pc; ! struct eh_range *range; ! register struct eh_range *child; { for (; child != NULL; child = child->next_sibling) { --- 77,83 ---- previous children have end_pc values that are too low. */ static struct eh_range * ! find_handler_in_range (int pc, struct eh_range *range, struct eh_range *child) { for (; child != NULL; child = child->next_sibling) { *************** find_handler_in_range (pc, range, child) *** 96,103 **** /* Find the inner-most handler that contains PC. */ struct eh_range * ! find_handler (pc) ! int pc; { struct eh_range *h; if (pc >= cache_range_start) --- 96,102 ---- /* Find the inner-most handler that contains PC. */ struct eh_range * ! find_handler (int pc) { struct eh_range *h; if (pc >= cache_range_start) *************** find_handler (pc) *** 122,129 **** /* Recursive helper routine for check_nested_ranges. */ static void ! link_handler (range, outer) ! struct eh_range *range, *outer; { struct eh_range **ptr; --- 121,127 ---- /* Recursive helper routine for check_nested_ranges. */ static void ! link_handler (struct eh_range *range, struct eh_range *outer) { struct eh_range **ptr; *************** link_handler (range, outer) *** 205,211 **** ensure that exception ranges are properly nested. */ void ! handle_nested_ranges () { struct eh_range *ptr, *next; --- 203,209 ---- ensure that exception ranges are properly nested. */ void ! handle_nested_ranges (void) { struct eh_range *ptr, *next; *************** handle_nested_ranges () *** 222,229 **** /* Free RANGE as well as its children and siblings. */ static void ! free_eh_ranges (range) ! struct eh_range *range; { while (range) { --- 220,226 ---- /* Free RANGE as well as its children and siblings. */ static void ! free_eh_ranges (struct eh_range *range) { while (range) { *************** free_eh_ranges (range) *** 238,244 **** /* Called to re-initialize the exception machinery for a new method. */ void ! method_init_exceptions () { free_eh_ranges (&whole_range); whole_range.start_pc = 0; --- 235,241 ---- /* Called to re-initialize the exception machinery for a new method. */ void ! method_init_exceptions (void) { free_eh_ranges (&whole_range); whole_range.start_pc = 0; *************** method_init_exceptions () *** 264,273 **** what the sorting counteracts. */ void ! add_handler (start_pc, end_pc, handler, type) ! int start_pc, end_pc; ! tree handler; ! tree type; { struct eh_range *ptr, *prev = NULL, *h; --- 261,267 ---- what the sorting counteracts. */ void ! add_handler (int start_pc, int end_pc, tree handler, tree type) { struct eh_range *ptr, *prev = NULL, *h; *************** add_handler (start_pc, end_pc, handler, *** 303,310 **** /* if there are any handlers for this range, issue start of region */ static void ! expand_start_java_handler (range) ! struct eh_range *range; { #if defined(DEBUG_JAVA_BINDING_LEVELS) indent (); --- 297,303 ---- /* if there are any handlers for this range, issue start of region */ static void ! expand_start_java_handler (struct eh_range *range) { #if defined(DEBUG_JAVA_BINDING_LEVELS) indent (); *************** expand_start_java_handler (range) *** 316,351 **** } tree ! prepare_eh_table_type (type) ! tree type; { tree exp; ! /* The "type" (metch_info) in a (Java) exception table is one: * a) NULL - meaning match any type in a try-finally. ! * b) a pointer to a (ccmpiled) class (low-order bit 0). ! * c) a pointer to the Utf8Const name of the class, plus one ! * (which yields a value with low-order bit 1). */ if (type == NULL_TREE) ! exp = NULL_TREE; ! else if (is_compiled_class (type)) ! exp = build_class_ref (type); else ! exp = fold (build ! (PLUS_EXPR, ptr_type_node, ! build_utf8_ref (build_internal_class_name (type)), ! size_one_node)); return exp; } /* Build a reference to the jthrowable object being carried in the exception header. */ tree ! build_exception_object_ref (type) ! tree type; { tree obj; --- 309,406 ---- } tree ! prepare_eh_table_type (tree type) { tree exp; + tree *slot; + const char *name; + char *buf; + tree decl; + tree utf8_ref; ! /* The "type" (match_info) in a (Java) exception table is a pointer to: * a) NULL - meaning match any type in a try-finally. ! * b) a pointer to a pointer to a class. ! * c) a pointer to a pointer to a utf8_ref. The pointer is ! * rewritten to point to the appropriate class. */ if (type == NULL_TREE) ! return NULL_TREE; ! ! if (TYPE_TO_RUNTIME_MAP (output_class) == NULL) ! TYPE_TO_RUNTIME_MAP (output_class) = java_treetreehash_create (10, 1); ! ! slot = java_treetreehash_new (TYPE_TO_RUNTIME_MAP (output_class), type); ! if (*slot != NULL) ! return TREE_VALUE (*slot); ! ! if (is_compiled_class (type) && !flag_indirect_dispatch) ! { ! name = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type))); ! buf = alloca (strlen (name) + 5); ! sprintf (buf, "%s_ref", name); ! decl = build_decl (VAR_DECL, get_identifier (buf), ptr_type_node); ! TREE_STATIC (decl) = 1; ! DECL_ARTIFICIAL (decl) = 1; ! DECL_IGNORED_P (decl) = 1; ! TREE_READONLY (decl) = 1; ! TREE_THIS_VOLATILE (decl) = 0; ! DECL_INITIAL (decl) = build_class_ref (type); ! layout_decl (decl, 0); ! pushdecl (decl); ! exp = build1 (ADDR_EXPR, ptr_type_node, decl); ! } else ! { ! utf8_ref = build_utf8_ref (DECL_NAME (TYPE_NAME (type))); ! name = IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (utf8_ref, 0))); ! buf = alloca (strlen (name) + 5); ! sprintf (buf, "%s_ref", name); ! decl = build_decl (VAR_DECL, get_identifier (buf), utf8const_ptr_type); ! TREE_STATIC (decl) = 1; ! DECL_ARTIFICIAL (decl) = 1; ! DECL_IGNORED_P (decl) = 1; ! TREE_READONLY (decl) = 1; ! TREE_THIS_VOLATILE (decl) = 0; ! layout_decl (decl, 0); ! pushdecl (decl); ! exp = build1 (ADDR_EXPR, build_pointer_type (utf8const_ptr_type), decl); ! TYPE_CATCH_CLASSES (output_class) = ! tree_cons (NULL, make_catch_class_record (exp, utf8_ref), ! TYPE_CATCH_CLASSES (output_class)); ! } ! ! *slot = tree_cons (type, exp, NULL_TREE); ! return exp; } + static int + expand_catch_class (void **entry, void *x ATTRIBUTE_UNUSED) + { + struct treetreehash_entry *ite = (struct treetreehash_entry *) *entry; + tree decl = TREE_OPERAND (TREE_VALUE ((tree)ite->value), 0); + rest_of_decl_compilation (decl, (char*) 0, global_bindings_p (), 0); + return true; + } + + /* For every class in the TYPE_TO_RUNTIME_MAP, expand the + corresponding object that is used by the runtime type matcher. */ + + void + java_expand_catch_classes (tree this_class) + { + if (TYPE_TO_RUNTIME_MAP (this_class)) + htab_traverse + (TYPE_TO_RUNTIME_MAP (this_class), + expand_catch_class, NULL); + } /* Build a reference to the jthrowable object being carried in the exception header. */ tree ! build_exception_object_ref (tree type) { tree obj; *************** build_exception_object_ref (type) *** 362,369 **** /* If there are any handlers for this range, isssue end of range, and then all handler blocks */ static void ! expand_end_java_handler (range) ! struct eh_range *range; { tree handler = range->handlers; force_poplevels (range->start_pc); --- 417,423 ---- /* If there are any handlers for this range, isssue end of range, and then all handler blocks */ static void ! expand_end_java_handler (struct eh_range *range) { tree handler = range->handlers; force_poplevels (range->start_pc); *************** expand_end_java_handler (range) *** 380,386 **** if (type == NULL) type = throwable_type_node; ! expand_start_catch (type); expand_goto (TREE_VALUE (handler)); expand_end_catch (); } --- 434,440 ---- if (type == NULL) type = throwable_type_node; ! expand_start_catch (prepare_eh_table_type (type)); expand_goto (TREE_VALUE (handler)); expand_end_catch (); } *************** expand_end_java_handler (range) *** 395,403 **** /* Recursive helper routine for maybe_start_handlers. */ static void ! check_start_handlers (range, pc) ! struct eh_range *range; ! int pc; { if (range != NULL_EH_RANGE && range->start_pc == pc) { --- 449,455 ---- /* Recursive helper routine for maybe_start_handlers. */ static void ! check_start_handlers (struct eh_range *range, int pc) { if (range != NULL_EH_RANGE && range->start_pc == pc) { *************** static struct eh_range *current_range; *** 414,422 **** end_pc. */ void ! maybe_start_try (start_pc, end_pc) ! int start_pc; ! int end_pc; { struct eh_range *range; if (! doing_eh (1)) --- 466,472 ---- end_pc. */ void ! maybe_start_try (int start_pc, int end_pc) { struct eh_range *range; if (! doing_eh (1)) *************** maybe_start_try (start_pc, end_pc) *** 435,443 **** start_pc. */ void ! maybe_end_try (start_pc, end_pc) ! int start_pc; ! int end_pc; { if (! doing_eh (1)) return; --- 485,491 ---- start_pc. */ void ! maybe_end_try (int start_pc, int end_pc) { if (! doing_eh (1)) return; diff -Nrc3pad gcc-3.3.3/gcc/java/expr.c gcc-3.4.0/gcc/java/expr.c *** gcc-3.3.3/gcc/java/expr.c 2003-03-11 20:34:40.000000000 +0000 --- gcc-3.4.0/gcc/java/expr.c 2004-01-30 01:31:32.000000000 +0000 *************** *** 1,21 **** /* Process expressions for the GNU compiler for the Java(TM) language. ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,21 ---- /* Process expressions for the GNU compiler for the Java(TM) language. ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 27,32 **** --- 27,34 ---- #include "config.h" #include "system.h" + #include "coretypes.h" + #include "tm.h" #include "tree.h" #include "real.h" #include "rtl.h" *************** The Free Software Foundation is independ *** 42,89 **** #include "except.h" #include "ggc.h" ! static void flush_quick_stack PARAMS ((void)); ! static void push_value PARAMS ((tree)); ! static tree pop_value PARAMS ((tree)); ! static void java_stack_swap PARAMS ((void)); ! static void java_stack_dup PARAMS ((int, int)); ! static void build_java_athrow PARAMS ((tree)); ! static void build_java_jsr PARAMS ((int, int)); ! static void build_java_ret PARAMS ((tree)); ! static void expand_java_multianewarray PARAMS ((tree, int)); ! static void expand_java_arraystore PARAMS ((tree)); ! static void expand_java_arrayload PARAMS ((tree)); ! static void expand_java_array_length PARAMS ((void)); ! static tree build_java_monitor PARAMS ((tree, tree)); ! static void expand_java_pushc PARAMS ((int, tree)); ! static void expand_java_return PARAMS ((tree)); ! static void expand_load_internal PARAMS ((int, tree, int)); ! static void expand_java_NEW PARAMS ((tree)); ! static void expand_java_INSTANCEOF PARAMS ((tree)); ! static void expand_java_CHECKCAST PARAMS ((tree)); ! static void expand_iinc PARAMS ((unsigned int, int, int)); ! static void expand_java_binop PARAMS ((tree, enum tree_code)); ! static void note_label PARAMS ((int, int)); ! static void expand_compare PARAMS ((enum tree_code, tree, tree, int)); ! static void expand_test PARAMS ((enum tree_code, tree, int)); ! static void expand_cond PARAMS ((enum tree_code, tree, int)); ! static void expand_java_goto PARAMS ((int)); #if 0 ! static void expand_java_call PARAMS ((int, int)); ! static void expand_java_ret PARAMS ((tree)); #endif ! static tree pop_arguments PARAMS ((tree)); ! static void expand_invoke PARAMS ((int, int, int)); ! static void expand_java_field_op PARAMS ((int, int, int)); ! static void java_push_constant_from_pool PARAMS ((struct JCF *, int)); ! static void java_stack_pop PARAMS ((int)); ! static tree build_java_throw_out_of_bounds_exception PARAMS ((tree)); ! static tree build_java_check_indexed_type PARAMS ((tree, tree)); ! static tree case_identity PARAMS ((tree, tree)); ! static unsigned char peek_opcode_at_pc PARAMS ((struct JCF *, int, int)); ! static int emit_init_test_initialization PARAMS ((void **entry, ! void * ptr)); ! static int get_offset_table_index PARAMS ((tree)); static GTY(()) tree operand_type[59]; --- 44,89 ---- #include "except.h" #include "ggc.h" ! static void flush_quick_stack (void); ! static void push_value (tree); ! static tree pop_value (tree); ! static void java_stack_swap (void); ! static void java_stack_dup (int, int); ! static void build_java_athrow (tree); ! static void build_java_jsr (int, int); ! static void build_java_ret (tree); ! static void expand_java_multianewarray (tree, int); ! static void expand_java_arraystore (tree); ! static void expand_java_arrayload (tree); ! static void expand_java_array_length (void); ! static tree build_java_monitor (tree, tree); ! static void expand_java_pushc (int, tree); ! static void expand_java_return (tree); ! static void expand_load_internal (int, tree, int); ! static void expand_java_NEW (tree); ! static void expand_java_INSTANCEOF (tree); ! static void expand_java_CHECKCAST (tree); ! static void expand_iinc (unsigned int, int, int); ! static void expand_java_binop (tree, enum tree_code); ! static void note_label (int, int); ! static void expand_compare (enum tree_code, tree, tree, int); ! static void expand_test (enum tree_code, tree, int); ! static void expand_cond (enum tree_code, tree, int); ! static void expand_java_goto (int); #if 0 ! static void expand_java_call (int, int); ! static void expand_java_ret (tree); #endif ! static tree pop_arguments (tree); ! static void expand_invoke (int, int, int); ! static void expand_java_field_op (int, int, int); ! static void java_push_constant_from_pool (struct JCF *, int); ! static void java_stack_pop (int); ! static tree build_java_throw_out_of_bounds_exception (tree); ! static tree build_java_check_indexed_type (tree, tree); ! static tree case_identity (tree, tree); ! static unsigned char peek_opcode_at_pc (struct JCF *, int, int); ! static int emit_init_test_initialization (void **entry, void * ptr); static GTY(()) tree operand_type[59]; *************** static GTY(()) tree methods_ident; *** 91,97 **** static GTY(()) tree ncode_ident; tree dtable_ident = NULL_TREE; ! /* Set to nonzero value in order to emit class initilization code before static field references. */ int always_initialize_class_p; --- 91,97 ---- static GTY(()) tree ncode_ident; tree dtable_ident = NULL_TREE; ! /* Set to nonzero value in order to emit class initialization code before static field references. */ int always_initialize_class_p; *************** int always_initialize_class_p; *** 107,113 **** If a variable is on the quick stack, it means the value of variable when the quick stack was last flushed. Conceptually, flush_quick_stack ! saves all the the quick_stack elements in parellel. However, that is complicated, so it actually saves them (i.e. copies each stack value to is home virtual register) from low indexes. This allows a quick_stack element at index i (counting from the bottom of stack the) to references --- 107,113 ---- If a variable is on the quick stack, it means the value of variable when the quick stack was last flushed. Conceptually, flush_quick_stack ! saves all the the quick_stack elements in parallel. However, that is complicated, so it actually saves them (i.e. copies each stack value to is home virtual register) from low indexes. This allows a quick_stack element at index i (counting from the bottom of stack the) to references *************** int always_initialize_class_p; *** 124,130 **** static GTY(()) tree quick_stack; ! /* A free-list of unused permamnet TREE_LIST nodes. */ static GTY((deletable (""))) tree tree_list_free_list; /* The stack pointer of the Java virtual machine. --- 124,130 ---- static GTY(()) tree quick_stack; ! /* A free-list of unused permanent TREE_LIST nodes. */ static GTY((deletable (""))) tree tree_list_free_list; /* The stack pointer of the Java virtual machine. *************** const unsigned char *linenumber_table; *** 136,142 **** int linenumber_count; void ! init_expr_processing() { operand_type[21] = operand_type[54] = int_type_node; operand_type[22] = operand_type[55] = long_type_node; --- 136,142 ---- int linenumber_count; void ! init_expr_processing (void) { operand_type[21] = operand_type[54] = int_type_node; operand_type[22] = operand_type[55] = long_type_node; *************** init_expr_processing() *** 146,153 **** } tree ! java_truthvalue_conversion (expr) ! tree expr; { /* It is simpler and generates better code to have only TRUTH_*_EXPR or comparison expressions as truth values at this level. --- 146,152 ---- } tree ! java_truthvalue_conversion (tree expr) { /* It is simpler and generates better code to have only TRUTH_*_EXPR or comparison expressions as truth values at this level. *************** java_truthvalue_conversion (expr) *** 175,181 **** case NEGATE_EXPR: case ABS_EXPR: case FLOAT_EXPR: - case FFS_EXPR: /* These don't change whether an object is nonzero or zero. */ return java_truthvalue_conversion (TREE_OPERAND (expr, 0)); --- 174,179 ---- *************** java_truthvalue_conversion (expr) *** 205,214 **** higher (or the same) index, but not lower. */ static void ! flush_quick_stack () { int stack_index = stack_pointer; ! register tree prev, cur, next; /* First reverse the quick_stack, and count the number of slots it has. */ for (cur = quick_stack, prev = NULL_TREE; cur != NULL_TREE; cur = next) --- 203,212 ---- higher (or the same) index, but not lower. */ static void ! flush_quick_stack (void) { int stack_index = stack_pointer; ! tree prev, cur, next; /* First reverse the quick_stack, and count the number of slots it has. */ for (cur = quick_stack, prev = NULL_TREE; cur != NULL_TREE; cur = next) *************** flush_quick_stack () *** 232,238 **** decl = find_stack_slot (stack_index, type); if (decl != node) ! expand_assignment (decl, node, 0, 0); stack_index += 1 + TYPE_IS_WIDE (type); } } --- 230,236 ---- decl = find_stack_slot (stack_index, type); if (decl != node) ! expand_assignment (decl, node, 0); stack_index += 1 + TYPE_IS_WIDE (type); } } *************** flush_quick_stack () *** 241,248 **** Return true on success, 0 on overflow. */ int ! push_type_0 (type) ! tree type; { int n_words; type = promote_type (type); --- 239,245 ---- Return true on success, 0 on overflow. */ int ! push_type_0 (tree type) { int n_words; type = promote_type (type); *************** push_type_0 (type) *** 257,272 **** } void ! push_type (type) ! tree type; { if (! push_type_0 (type)) abort (); } static void ! push_value (value) ! tree value; { tree type = TREE_TYPE (value); if (TYPE_PRECISION (type) < 32 && INTEGRAL_TYPE_P (type)) --- 254,267 ---- } void ! push_type (tree type) { if (! push_type_0 (type)) abort (); } static void ! push_value (tree value) { tree type = TREE_TYPE (value); if (TYPE_PRECISION (type) < 32 && INTEGRAL_TYPE_P (type)) *************** push_value (value) *** 293,301 **** On an error, *MESSAGEP is set to a freshly malloc'd error message. */ tree ! pop_type_0 (type, messagep) ! tree type; ! char **messagep; { int n_words; tree t; --- 288,294 ---- On an error, *MESSAGEP is set to a freshly malloc'd error message. */ tree ! pop_type_0 (tree type, char **messagep) { int n_words; tree t; *************** pop_type_0 (type, messagep) *** 354,361 **** convertible to TYPE, otherwise call error. */ tree ! pop_type (type) ! tree type; { char *message = NULL; type = pop_type_0 (type, &message); --- 347,353 ---- convertible to TYPE, otherwise call error. */ tree ! pop_type (tree type) { char *message = NULL; type = pop_type_0 (type, &message); *************** pop_type (type) *** 371,378 **** Handles array types and interfaces. */ int ! can_widen_reference_to (source_type, target_type) ! tree source_type, target_type; { if (source_type == ptr_type_node || target_type == object_ptr_type_node) return 1; --- 363,369 ---- Handles array types and interfaces. */ int ! can_widen_reference_to (tree source_type, tree target_type) { if (source_type == ptr_type_node || target_type == object_ptr_type_node) return 1; *************** can_widen_reference_to (source_type, tar *** 448,455 **** } static tree ! pop_value (type) ! tree type; { type = pop_type (type); if (quick_stack) --- 439,445 ---- } static tree ! pop_value (tree type) { type = pop_type (type); if (quick_stack) *************** pop_value (type) *** 466,476 **** } ! /* Pop and discrad the top COUNT stack slots. */ static void ! java_stack_pop (count) ! int count; { while (count > 0) { --- 456,465 ---- } ! /* Pop and discard the top COUNT stack slots. */ static void ! java_stack_pop (int count) { while (count > 0) { *************** java_stack_pop (count) *** 496,502 **** /* Implement the 'swap' operator (to swap two top stack slots). */ static void ! java_stack_swap () { tree type1, type2; rtx temp; --- 485,491 ---- /* Implement the 'swap' operator (to swap two top stack slots). */ static void ! java_stack_swap (void) { tree type1, type2; rtx temp; *************** java_stack_swap () *** 514,528 **** decl1 = find_stack_slot (stack_pointer - 1, type1); decl2 = find_stack_slot (stack_pointer - 2, type2); temp = copy_to_reg (DECL_RTL (decl1)); ! emit_move_insn (DECL_RTL (decl1), DECL_RTL (decl2)); ! emit_move_insn (DECL_RTL (decl2), temp); stack_type_map[stack_pointer - 1] = type2; stack_type_map[stack_pointer - 2] = type1; } static void ! java_stack_dup (size, offset) ! int size, offset; { int low_index = stack_pointer - size - offset; int dst_index; --- 503,517 ---- decl1 = find_stack_slot (stack_pointer - 1, type1); decl2 = find_stack_slot (stack_pointer - 2, type2); temp = copy_to_reg (DECL_RTL (decl1)); ! emit_move_insn (DECL_RTL (find_stack_slot (stack_pointer - 1, type2)), ! DECL_RTL (decl2)); ! emit_move_insn (DECL_RTL (find_stack_slot (stack_pointer - 2, type1)), temp); stack_type_map[stack_pointer - 1] = type2; stack_type_map[stack_pointer - 2] = type1; } static void ! java_stack_dup (int size, int offset) { int low_index = stack_pointer - size - offset; int dst_index; *************** java_stack_dup (size, offset) *** 570,577 **** value stack. */ static void ! build_java_athrow (node) ! tree node; { tree call; --- 559,565 ---- value stack. */ static void ! build_java_athrow (tree node) { tree call; *************** build_java_athrow (node) *** 588,595 **** /* Implementation for jsr/ret */ static void ! build_java_jsr (target_pc, return_pc) ! int target_pc, return_pc; { tree where = lookup_label (target_pc); tree ret = lookup_label (return_pc); --- 576,582 ---- /* Implementation for jsr/ret */ static void ! build_java_jsr (int target_pc, int return_pc) { tree where = lookup_label (target_pc); tree ret = lookup_label (return_pc); *************** build_java_jsr (target_pc, return_pc) *** 603,610 **** } static void ! build_java_ret (location) ! tree location; { expand_computed_goto (location); } --- 590,596 ---- } static void ! build_java_ret (tree location) { expand_computed_goto (location); } *************** build_java_ret (location) *** 612,619 **** /* Implementation of operations on array: new, load, store, length */ tree ! decode_newarray_type (atype) ! int atype; { switch (atype) { --- 598,604 ---- /* Implementation of operations on array: new, load, store, length */ tree ! decode_newarray_type (int atype) { switch (atype) { *************** decode_newarray_type (atype) *** 632,639 **** /* Map primitive type to the code used by OPCODE_newarray. */ int ! encode_newarray_type (type) ! tree type; { if (type == boolean_type_node) return 4; --- 617,623 ---- /* Map primitive type to the code used by OPCODE_newarray. */ int ! encode_newarray_type (tree type) { if (type == boolean_type_node) return 4; *************** encode_newarray_type (type) *** 659,666 **** ArrayIndexOfBoundsException exception handler. */ static tree ! build_java_throw_out_of_bounds_exception (index) ! tree index; { tree node = build (CALL_EXPR, int_type_node, build_address_of (soft_badarrayindex_node), --- 643,649 ---- ArrayIndexOfBoundsException exception handler. */ static tree ! build_java_throw_out_of_bounds_exception (tree index) { tree node = build (CALL_EXPR, int_type_node, build_address_of (soft_badarrayindex_node), *************** build_java_throw_out_of_bounds_exception *** 673,680 **** or value of the array NODE. May be used to implement some bytecodes. */ tree ! build_java_array_length_access (node) ! tree node; { tree type = TREE_TYPE (node); tree array_type = TREE_TYPE (type); --- 656,662 ---- or value of the array NODE. May be used to implement some bytecodes. */ tree ! build_java_array_length_access (tree node) { tree type = TREE_TYPE (node); tree array_type = TREE_TYPE (type); *************** build_java_array_length_access (node) *** 709,729 **** checks if we're not generating code. */ tree ! java_check_reference (expr, check) ! tree expr; ! int check; { if (!flag_syntax_only && check) { - tree cond; expr = save_expr (expr); ! cond = build (COND_EXPR, void_type_node, build (EQ_EXPR, boolean_type_node, expr, null_pointer_node), build (CALL_EXPR, void_type_node, build_address_of (soft_nullpointer_node), NULL_TREE, NULL_TREE), ! empty_stmt_node); ! expr = build (COMPOUND_EXPR, TREE_TYPE (expr), cond, expr); } return expr; --- 691,707 ---- checks if we're not generating code. */ tree ! java_check_reference (tree expr, int check) { if (!flag_syntax_only && check) { expr = save_expr (expr); ! expr = build (COND_EXPR, TREE_TYPE (expr), build (EQ_EXPR, boolean_type_node, expr, null_pointer_node), build (CALL_EXPR, void_type_node, build_address_of (soft_nullpointer_node), NULL_TREE, NULL_TREE), ! expr); } return expr; *************** java_check_reference (expr, check) *** 732,741 **** /* Reference an object: just like an INDIRECT_REF, but with checking. */ tree ! build_java_indirect_ref (type, expr, check) ! tree type; ! tree expr; ! int check; { return build1 (INDIRECT_REF, type, java_check_reference (expr, check)); } --- 710,716 ---- /* Reference an object: just like an INDIRECT_REF, but with checking. */ tree ! build_java_indirect_ref (tree type, tree expr, int check) { return build1 (INDIRECT_REF, type, java_check_reference (expr, check)); } *************** build_java_indirect_ref (type, expr, che *** 746,753 **** At this point, ARRAY should have been verified as an array. */ tree ! build_java_arrayaccess (array, type, index) ! tree array, type, index; { tree node, throw = NULL_TREE; tree data_field; --- 721,727 ---- At this point, ARRAY should have been verified as an array. */ tree ! build_java_arrayaccess (tree array, tree type, tree index) { tree node, throw = NULL_TREE; tree data_field; *************** build_java_arrayaccess (array, type, ind *** 797,805 **** determine that no check is required. */ tree ! build_java_arraystore_check (array, object) ! tree array; ! tree object; { tree check, element_type, source; tree array_type_p = TREE_TYPE (array); --- 771,777 ---- determine that no check is required. */ tree ! build_java_arraystore_check (tree array, tree object) { tree check, element_type, source; tree array_type_p = TREE_TYPE (array); *************** build_java_arraystore_check (array, obje *** 820,826 **** /* No check is needed if the element type is final or is itself an array. Also check that element_type matches object_type, since in the bytecode ! compilation case element_type may be the actual element type of the arra rather than its declared type. */ if (element_type == object_type && (TYPE_ARRAY_P (TREE_TYPE (element_type)) --- 792,798 ---- /* No check is needed if the element type is final or is itself an array. Also check that element_type matches object_type, since in the bytecode ! compilation case element_type may be the actual element type of the array rather than its declared type. */ if (element_type == object_type && (TYPE_ARRAY_P (TREE_TYPE (element_type)) *************** build_java_arraystore_check (array, obje *** 870,878 **** As a side effect, it also makes sure that ARRAY_NODE is an array. */ static tree ! build_java_check_indexed_type (array_node, indexed_type) ! tree array_node; ! tree indexed_type; { tree elt_type; --- 842,848 ---- As a side effect, it also makes sure that ARRAY_NODE is an array. */ static tree ! build_java_check_indexed_type (tree array_node, tree indexed_type) { tree elt_type; *************** build_java_check_indexed_type (array_nod *** 899,907 **** of the array to create. */ tree ! build_newarray (atype_value, length) ! int atype_value; ! tree length; { tree type_arg; --- 869,875 ---- of the array to create. */ tree ! build_newarray (int atype_value, tree length) { tree type_arg; *************** build_newarray (atype_value, length) *** 931,939 **** of the dimension. */ tree ! build_anewarray (class_type, length) ! tree class_type; ! tree length; { tree type = build_java_array_type (class_type, --- 899,905 ---- of the dimension. */ tree ! build_anewarray (tree class_type, tree length) { tree type = build_java_array_type (class_type, *************** build_anewarray (class_type, length) *** 952,960 **** /* Return a node the evaluates 'new TYPE[LENGTH]'. */ tree ! build_new_array (type, length) ! tree type; ! tree length; { if (JPRIMITIVE_TYPE_P (type)) return build_newarray (encode_newarray_type (type), length); --- 918,924 ---- /* Return a node the evaluates 'new TYPE[LENGTH]'. */ tree ! build_new_array (tree type, tree length) { if (JPRIMITIVE_TYPE_P (type)) return build_newarray (encode_newarray_type (type), length); *************** build_new_array (type, length) *** 967,975 **** dimensions. The argument list is NULL terminated. */ static void ! expand_java_multianewarray (class_type, ndim) ! tree class_type; ! int ndim; { int i; tree args = build_tree_list( NULL_TREE, null_pointer_node ); --- 931,937 ---- dimensions. The argument list is NULL terminated. */ static void ! expand_java_multianewarray (tree class_type, int ndim) { int i; tree args = build_tree_list( NULL_TREE, null_pointer_node ); *************** expand_java_multianewarray (class_type, *** 990,1004 **** ARRAY is an array type. May expand some bound checking and NULL pointer checking. RHS_TYPE_NODE we are going to store. In the case of the CHAR/BYTE/BOOLEAN SHORT, the type popped of the stack is an ! INT. In those cases, we make the convertion. if ARRAy is a reference type, the assignment is checked at run-time to make sure that the RHS can be assigned to the array element type. It is not necessary to generate this code if ARRAY is final. */ static void ! expand_java_arraystore (rhs_type_node) ! tree rhs_type_node; { tree rhs_node = pop_value ((INTEGRAL_TYPE_P (rhs_type_node) && TYPE_PRECISION (rhs_type_node) <= 32) ? --- 952,965 ---- ARRAY is an array type. May expand some bound checking and NULL pointer checking. RHS_TYPE_NODE we are going to store. In the case of the CHAR/BYTE/BOOLEAN SHORT, the type popped of the stack is an ! INT. In those cases, we make the conversion. if ARRAy is a reference type, the assignment is checked at run-time to make sure that the RHS can be assigned to the array element type. It is not necessary to generate this code if ARRAY is final. */ static void ! expand_java_arraystore (tree rhs_type_node) { tree rhs_node = pop_value ((INTEGRAL_TYPE_P (rhs_type_node) && TYPE_PRECISION (rhs_type_node) <= 32) ? *************** expand_java_arraystore (rhs_type_node) *** 1022,1028 **** expand_assignment (build_java_arrayaccess (array, rhs_type_node, index), ! rhs_node, 0, 0); } /* Expand the evaluation of ARRAY[INDEX]. build_java_check_indexed_type makes --- 983,989 ---- expand_assignment (build_java_arrayaccess (array, rhs_type_node, index), ! rhs_node, 0); } /* Expand the evaluation of ARRAY[INDEX]. build_java_check_indexed_type makes *************** expand_java_arraystore (rhs_type_node) *** 1033,1040 **** */ static void ! expand_java_arrayload (lhs_type_node ) ! tree lhs_type_node; { tree load_node; tree index_node = pop_value (int_type_node); --- 994,1000 ---- */ static void ! expand_java_arrayload (tree lhs_type_node ) { tree load_node; tree index_node = pop_value (int_type_node); *************** expand_java_arrayload (lhs_type_node ) *** 1066,1072 **** a NULL check on the array object. */ static void ! expand_java_array_length () { tree array = pop_value (ptr_type_node); tree length = build_java_array_length_access (array); --- 1026,1032 ---- a NULL check on the array object. */ static void ! expand_java_array_length (void) { tree array = pop_value (ptr_type_node); tree length = build_java_array_length_access (array); *************** expand_java_array_length () *** 1078,1086 **** either soft_monitorenter_node or soft_monitorexit_node. */ static tree ! build_java_monitor (call, object) ! tree call; ! tree object; { return (build (CALL_EXPR, void_type_node, --- 1038,1044 ---- either soft_monitorenter_node or soft_monitorexit_node. */ static tree ! build_java_monitor (tree call, tree object) { return (build (CALL_EXPR, void_type_node, *************** build_java_monitor (call, object) *** 1092,1100 **** /* Emit code for one of the PUSHC instructions. */ static void ! expand_java_pushc (ival, type) ! int ival; ! tree type; { tree value; if (type == ptr_type_node && ival == 0) --- 1050,1056 ---- /* Emit code for one of the PUSHC instructions. */ static void ! expand_java_pushc (int ival, tree type) { tree value; if (type == ptr_type_node && ival == 0) *************** expand_java_pushc (ival, type) *** 1117,1124 **** } static void ! expand_java_return (type) ! tree type; { if (type == void_type_node) expand_null_return (); --- 1073,1079 ---- } static void ! expand_java_return (tree type) { if (type == void_type_node) expand_null_return (); *************** expand_java_return (type) *** 1143,1152 **** } static void ! expand_load_internal (index, type, pc) ! int index; ! tree type; ! int pc; { tree copy; tree var = find_local_variable (index, type, pc); --- 1098,1104 ---- } static void ! expand_load_internal (int index, tree type, int pc) { tree copy; tree var = find_local_variable (index, type, pc); *************** expand_load_internal (index, type, pc) *** 1169,1182 **** } tree ! build_address_of (value) ! tree value; { return build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (value)), value); } ! bool class_has_finalize_method (type) ! tree type; { tree super = CLASSTYPE_SUPER (type); --- 1121,1132 ---- } tree ! build_address_of (tree value) { return build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (value)), value); } ! bool class_has_finalize_method (tree type) { tree super = CLASSTYPE_SUPER (type); *************** bool class_has_finalize_method (type) *** 1188,1195 **** } static void ! expand_java_NEW (type) ! tree type; { tree alloc_node; --- 1138,1144 ---- } static void ! expand_java_NEW (tree type) { tree alloc_node; *************** expand_java_NEW (type) *** 1210,1217 **** object. */ tree ! build_get_class (value) ! tree value; { tree class_field = lookup_field (&dtable_type, get_identifier ("class")); tree vtable_field = lookup_field (&object_type_node, --- 1159,1165 ---- object. */ tree ! build_get_class (tree value) { tree class_field = lookup_field (&dtable_type, get_identifier ("class")); tree vtable_field = lookup_field (&object_type_node, *************** build_get_class (value) *** 1230,1237 **** known. */ tree ! build_instanceof (value, type) ! tree value, type; { tree expr; tree itype = TREE_TYPE (TREE_TYPE (soft_instanceof_node)); --- 1178,1184 ---- known. */ tree ! build_instanceof (tree value, tree type) { tree expr; tree itype = TREE_TYPE (TREE_TYPE (soft_instanceof_node)); *************** build_instanceof (value, type) *** 1294,1301 **** } static void ! expand_java_INSTANCEOF (type) ! tree type; { tree value = pop_value (object_ptr_type_node); value = build_instanceof (value, type); --- 1241,1247 ---- } static void ! expand_java_INSTANCEOF (tree type) { tree value = pop_value (object_ptr_type_node); value = build_instanceof (value, type); *************** expand_java_INSTANCEOF (type) *** 1303,1310 **** } static void ! expand_java_CHECKCAST (type) ! tree type; { tree value = pop_value (ptr_type_node); value = build (CALL_EXPR, promote_type (type), --- 1249,1255 ---- } static void ! expand_java_CHECKCAST (tree type) { tree value = pop_value (ptr_type_node); value = build (CALL_EXPR, promote_type (type), *************** expand_java_CHECKCAST (type) *** 1316,1325 **** } static void ! expand_iinc (local_var_index, ival, pc) ! unsigned int local_var_index; ! int ival; ! int pc; { tree local_var, res; tree constant_value; --- 1261,1267 ---- } static void ! expand_iinc (unsigned int local_var_index, int ival, int pc) { tree local_var, res; tree constant_value; *************** expand_iinc (local_var_index, ival, pc) *** 1328,1341 **** local_var = find_local_variable (local_var_index, int_type_node, pc); constant_value = build_int_2 (ival, ival < 0 ? -1 : 0); res = fold (build (PLUS_EXPR, int_type_node, local_var, constant_value)); ! expand_assignment (local_var, res, 0, 0); } tree ! build_java_soft_divmod (op, type, op1, op2) ! enum tree_code op; ! tree type, op1, op2; { tree call = NULL; tree arg1 = convert (type, op1); --- 1270,1281 ---- local_var = find_local_variable (local_var_index, int_type_node, pc); constant_value = build_int_2 (ival, ival < 0 ? -1 : 0); res = fold (build (PLUS_EXPR, int_type_node, local_var, constant_value)); ! expand_assignment (local_var, res, 0); } tree ! build_java_soft_divmod (enum tree_code op, tree type, tree op1, tree op2) { tree call = NULL; tree arg1 = convert (type, op1); *************** build_java_soft_divmod (op, type, op1, o *** 1383,1391 **** } tree ! build_java_binop (op, type, arg1, arg2) ! enum tree_code op; ! tree type, arg1, arg2; { tree mask; switch (op) --- 1323,1329 ---- } tree ! build_java_binop (enum tree_code op, tree type, tree arg1, tree arg2) { tree mask; switch (op) *************** build_java_binop (op, type, arg1, arg2) *** 1464,1471 **** } static void ! expand_java_binop (type, op) ! tree type; enum tree_code op; { tree larg, rarg; tree ltype = type; --- 1402,1408 ---- } static void ! expand_java_binop (tree type, enum tree_code op) { tree larg, rarg; tree ltype = type; *************** expand_java_binop (type, op) *** 1493,1501 **** class containing the field. */ tree ! lookup_field (typep, name) ! tree *typep; ! tree name; { if (CLASS_P (*typep) && !CLASS_LOADED_P (*typep)) { --- 1430,1436 ---- class containing the field. */ tree ! lookup_field (tree *typep, tree name) { if (CLASS_P (*typep) && !CLASS_LOADED_P (*typep)) { *************** lookup_field (typep, name) *** 1553,1560 **** SELF_VALUE is NULL_TREE if looking for a static field. */ tree ! build_field_ref (self_value, self_class, name) ! tree self_value, self_class, name; { tree base_class = self_class; tree field_decl = lookup_field (&base_class, name); --- 1488,1494 ---- SELF_VALUE is NULL_TREE if looking for a static field. */ tree ! build_field_ref (tree self_value, tree self_class, tree name) { tree base_class = self_class; tree field_decl = lookup_field (&base_class, name); *************** build_field_ref (self_value, self_class, *** 1576,1581 **** --- 1510,1537 ---- tree base_type = promote_type (base_class); if (base_type != TREE_TYPE (self_value)) self_value = fold (build1 (NOP_EXPR, base_type, self_value)); + if (flag_indirect_dispatch + && output_class != self_class) + /* FIXME: output_class != self_class is not exactly the right + test. What we really want to know is whether self_class is + in the same translation unit as output_class. If it is, + we can make a direct reference. */ + { + tree otable_index = + build_int_2 (get_symbol_table_index + (field_decl, &TYPE_OTABLE_METHODS (output_class)), 0); + tree field_offset = + build (ARRAY_REF, integer_type_node, TYPE_OTABLE_DECL (output_class), + otable_index); + tree address; + field_offset = fold (convert (sizetype, field_offset)); + address + = fold (build (PLUS_EXPR, + build_pointer_type (TREE_TYPE (field_decl)), + self_value, field_offset)); + return fold (build1 (INDIRECT_REF, TREE_TYPE (field_decl), address)); + } + self_value = build_java_indirect_ref (TREE_TYPE (TREE_TYPE (self_value)), self_value, check); return fold (build (COMPONENT_REF, TREE_TYPE (field_decl), *************** build_field_ref (self_value, self_class, *** 1584,1591 **** } tree ! lookup_label (pc) ! int pc; { tree name; char buf[32]; --- 1540,1546 ---- } tree ! lookup_label (int pc) { tree name; char buf[32]; *************** lookup_label (pc) *** 1607,1613 **** labels, and try-catch-finally blocks label or temporary variables. */ tree ! generate_name () { static int l_number = 0; char buff [32]; --- 1562,1568 ---- labels, and try-catch-finally blocks label or temporary variables. */ tree ! generate_name (void) { static int l_number = 0; char buff [32]; *************** generate_name () *** 1617,1624 **** } tree ! create_label_decl (name) ! tree name; { tree decl; decl = build_decl (LABEL_DECL, name, --- 1572,1578 ---- } tree ! create_label_decl (tree name) { tree decl; decl = build_decl (LABEL_DECL, name, *************** create_label_decl (name) *** 1632,1639 **** char *instruction_bits; static void ! note_label (current_pc, target_pc) ! int current_pc ATTRIBUTE_UNUSED, target_pc; { lookup_label (target_pc); instruction_bits [target_pc] |= BCODE_JUMP_TARGET; --- 1586,1592 ---- char *instruction_bits; static void ! note_label (int current_pc ATTRIBUTE_UNUSED, int target_pc) { lookup_label (target_pc); instruction_bits [target_pc] |= BCODE_JUMP_TARGET; *************** note_label (current_pc, target_pc) *** 1643,1652 **** where CONDITION is one of one the compare operators. */ static void ! expand_compare (condition, value1, value2, target_pc) ! enum tree_code condition; ! tree value1, value2; ! int target_pc; { tree target = lookup_label (target_pc); tree cond = fold (build (condition, boolean_type_node, value1, value2)); --- 1596,1603 ---- where CONDITION is one of one the compare operators. */ static void ! expand_compare (enum tree_code condition, tree value1, tree value2, ! int target_pc) { tree target = lookup_label (target_pc); tree cond = fold (build (condition, boolean_type_node, value1, value2)); *************** expand_compare (condition, value1, value *** 1658,1667 **** /* Emit code for a TEST-type opcode. */ static void ! expand_test (condition, type, target_pc) ! enum tree_code condition; ! tree type; ! int target_pc; { tree value1, value2; flush_quick_stack (); --- 1609,1615 ---- /* Emit code for a TEST-type opcode. */ static void ! expand_test (enum tree_code condition, tree type, int target_pc) { tree value1, value2; flush_quick_stack (); *************** expand_test (condition, type, target_pc) *** 1673,1682 **** /* Emit code for a COND-type opcode. */ static void ! expand_cond (condition, type, target_pc) ! enum tree_code condition; ! tree type; ! int target_pc; { tree value1, value2; flush_quick_stack (); --- 1621,1627 ---- /* Emit code for a COND-type opcode. */ static void ! expand_cond (enum tree_code condition, tree type, int target_pc) { tree value1, value2; flush_quick_stack (); *************** expand_cond (condition, type, target_pc) *** 1688,1695 **** } static void ! expand_java_goto (target_pc) ! int target_pc; { tree target_label = lookup_label (target_pc); flush_quick_stack (); --- 1633,1639 ---- } static void ! expand_java_goto (int target_pc) { tree target_label = lookup_label (target_pc); flush_quick_stack (); *************** expand_java_goto (target_pc) *** 1698,1704 **** #if 0 static void ! expand_java_call (target_pc, return_address) int target_pc, return_address; { tree target_label = lookup_label (target_pc); --- 1642,1648 ---- #if 0 static void ! expand_java_call (int target_pc, int return_address) int target_pc, return_address; { tree target_label = lookup_label (target_pc); *************** expand_java_call (target_pc, return_addr *** 1709,1716 **** } static void ! expand_java_ret (return_address) ! tree return_address ATTRIBUTE_UNUSED; { warning ("ret instruction not implemented"); #if 0 --- 1653,1659 ---- } static void ! expand_java_ret (tree return_address ATTRIBUTE_UNUSED) { warning ("ret instruction not implemented"); #if 0 *************** expand_java_ret (return_address) *** 1722,1729 **** #endif static tree ! pop_arguments (arg_types) ! tree arg_types; { if (arg_types == end_params_node) return NULL_TREE; --- 1665,1671 ---- #endif static tree ! pop_arguments (tree arg_types) { if (arg_types == end_params_node) return NULL_TREE; *************** pop_arguments (arg_types) *** 1746,1753 **** (if it is needed) and then calls EXPR. */ tree ! build_class_init (clas, expr) ! tree clas, expr; { tree init; --- 1688,1694 ---- (if it is needed) and then calls EXPR. */ tree ! build_class_init (tree clas, tree expr) { tree init; *************** build_class_init (clas, expr) *** 1788,1793 **** --- 1729,1736 ---- optimizing class initialization. */ if (!STATIC_CLASS_INIT_OPT_P ()) DECL_BIT_INDEX(*init_test_decl) = -1; + /* Don't emit any symbolic debugging info for this decl. */ + DECL_IGNORED_P (*init_test_decl) = 1; } init = build (CALL_EXPR, void_type_node, *************** build_class_init (clas, expr) *** 1816,1831 **** } tree ! build_known_method_ref (method, method_type, self_type, ! method_signature, arg_list) ! tree method, method_type ATTRIBUTE_UNUSED, self_type, ! method_signature ATTRIBUTE_UNUSED, arg_list ATTRIBUTE_UNUSED; { tree func; if (is_compiled_class (self_type)) { ! make_decl_rtl (method, NULL); ! func = build1 (ADDR_EXPR, method_ptr_type_node, method); } else { --- 1759,1786 ---- } tree ! build_known_method_ref (tree method, tree method_type ATTRIBUTE_UNUSED, ! tree self_type, tree method_signature ATTRIBUTE_UNUSED, ! tree arg_list ATTRIBUTE_UNUSED) { tree func; if (is_compiled_class (self_type)) { ! if (!flag_indirect_dispatch ! || (!TREE_PUBLIC (method) && DECL_CONTEXT (method))) ! { ! make_decl_rtl (method, NULL); ! func = build1 (ADDR_EXPR, method_ptr_type_node, method); ! } ! else ! { ! tree table_index = ! build_int_2 (get_symbol_table_index ! (method, &TYPE_ATABLE_METHODS (output_class)), 0); ! func = ! build (ARRAY_REF, method_ptr_type_node, ! TYPE_ATABLE_DECL (output_class), table_index); ! } } else { *************** build_known_method_ref (method, method_t *** 1834,1846 **** SELF_TYPE->methods[METHOD_INDEX].ncode ! This is guaranteed to work (assuming SELF_TYPE has ! been initialized), since if the method is not compiled yet, ! its ncode points to a trampoline that forces compilation. */ int method_index = 0; ! tree meth; ! tree ref = build_class_ref (self_type); ref = build1 (INDIRECT_REF, class_type_node, ref); if (ncode_ident == NULL_TREE) ncode_ident = get_identifier ("ncode"); --- 1789,1804 ---- SELF_TYPE->methods[METHOD_INDEX].ncode ! */ int method_index = 0; ! tree meth, ref; ! ! /* The method might actually be declared in some superclass, so ! we have to use its class context, not the caller's notion of ! where the method is. */ ! self_type = DECL_CONTEXT (method); ! ref = build_class_ref (self_type); ref = build1 (INDIRECT_REF, class_type_node, ref); if (ncode_ident == NULL_TREE) ncode_ident = get_identifier ("ncode"); *************** build_known_method_ref (method, method_t *** 1870,1878 **** } tree ! invoke_build_dtable (is_invoke_interface, arg_list) ! int is_invoke_interface; ! tree arg_list; { tree dtable, objectref; --- 1828,1834 ---- } tree ! invoke_build_dtable (int is_invoke_interface, tree arg_list) { tree dtable, objectref; *************** invoke_build_dtable (is_invoke_interface *** 1895,1922 **** return dtable; } ! /* Determine the index in the virtual offset table (otable) for a call to ! METHOD. If this method has not been seen before, it will be added to the ! otable_methods. If it has, the existing otable slot will be reused. */ int ! get_offset_table_index (method) ! tree method; { int i = 1; tree method_list; ! ! if (otable_methods == NULL_TREE) { ! otable_methods = build_tree_list (method, method); return 1; } ! method_list = otable_methods; while (1) { ! if (TREE_VALUE (method_list) == method) return i; i++; if (TREE_CHAIN (method_list) == NULL_TREE) --- 1851,1879 ---- return dtable; } ! /* Determine the index in SYMBOL_TABLE for a reference to the decl ! T. If this decl has not been seen before, it will be added to the ! otable_methods. If it has, the existing table slot will be ! reused. */ int ! get_symbol_table_index (tree t, tree *symbol_table) { int i = 1; tree method_list; ! ! if (*symbol_table == NULL_TREE) { ! *symbol_table = build_tree_list (t, t); return 1; } ! method_list = *symbol_table; while (1) { ! tree value = TREE_VALUE (method_list); ! if (value == t) return i; i++; if (TREE_CHAIN (method_list) == NULL_TREE) *************** get_offset_table_index (method) *** 1925,1937 **** method_list = TREE_CHAIN (method_list); } ! TREE_CHAIN (method_list) = build_tree_list (method, method); return i; } tree ! build_invokevirtual (dtable, method) ! tree dtable, method; { tree func; tree nativecode_ptr_ptr_type_node --- 1882,1893 ---- method_list = TREE_CHAIN (method_list); } ! TREE_CHAIN (method_list) = build_tree_list (t, t); return i; } tree ! build_invokevirtual (tree dtable, tree method) { tree func; tree nativecode_ptr_ptr_type_node *************** build_invokevirtual (dtable, method) *** 1941,1948 **** if (flag_indirect_dispatch) { ! otable_index = build_int_2 (get_offset_table_index (method), 0); ! method_index = build (ARRAY_REF, integer_type_node, otable_decl, otable_index); } else --- 1897,1907 ---- if (flag_indirect_dispatch) { ! otable_index ! = build_int_2 (get_symbol_table_index ! (method, &TYPE_OTABLE_METHODS (output_class)), 0); ! method_index = build (ARRAY_REF, integer_type_node, ! TYPE_OTABLE_DECL (output_class), otable_index); } else *************** build_invokevirtual (dtable, method) *** 1977,1984 **** static GTY(()) tree class_ident; tree ! build_invokeinterface (dtable, method) ! tree dtable, method; { tree lookup_arg; tree interface; --- 1936,1942 ---- static GTY(()) tree class_ident; tree ! build_invokeinterface (tree dtable, tree method) { tree lookup_arg; tree interface; *************** build_invokeinterface (dtable, method) *** 1992,2012 **** abstract nor static. */ if (class_ident == NULL_TREE) ! { ! class_ident = get_identifier ("class"); ! } ! dtable = build_java_indirect_ref (dtable_type, dtable, flag_check_references); dtable = build (COMPONENT_REF, class_ptr_type, dtable, lookup_field (&dtable_type, class_ident)); interface = DECL_CONTEXT (method); layout_class_methods (interface); if (flag_indirect_dispatch) { ! otable_index = build_int_2 (get_offset_table_index (method), 0); ! idx = build (ARRAY_REF, integer_type_node, otable_decl, otable_index); } else { --- 1950,1975 ---- abstract nor static. */ if (class_ident == NULL_TREE) ! class_ident = get_identifier ("class"); ! dtable = build_java_indirect_ref (dtable_type, dtable, ! flag_check_references); dtable = build (COMPONENT_REF, class_ptr_type, dtable, lookup_field (&dtable_type, class_ident)); interface = DECL_CONTEXT (method); + if (! CLASS_INTERFACE (TYPE_NAME (interface))) + abort (); layout_class_methods (interface); if (flag_indirect_dispatch) { ! otable_index = ! build_int_2 (get_symbol_table_index ! (method, &TYPE_OTABLE_METHODS (output_class)), 0); ! idx = ! build (ARRAY_REF, integer_type_node, TYPE_OTABLE_DECL (output_class), ! otable_index); } else { *************** build_invokeinterface (dtable, method) *** 2038,2047 **** NARGS is the number of arguments, or -1 if not specified. */ static void ! expand_invoke (opcode, method_ref_index, nargs) ! int opcode; ! int method_ref_index; ! int nargs ATTRIBUTE_UNUSED; { tree method_signature = COMPONENT_REF_SIGNATURE(¤t_jcf->cpool, method_ref_index); tree method_name = COMPONENT_REF_NAME (¤t_jcf->cpool, method_ref_index); --- 2001,2007 ---- NARGS is the number of arguments, or -1 if not specified. */ static void ! expand_invoke (int opcode, int method_ref_index, int nargs ATTRIBUTE_UNUSED) { tree method_signature = COMPONENT_REF_SIGNATURE(¤t_jcf->cpool, method_ref_index); tree method_name = COMPONENT_REF_NAME (¤t_jcf->cpool, method_ref_index); *************** expand_invoke (opcode, method_ref_index, *** 2169,2176 **** a JNI function. */ tree ! build_jni_stub (method) ! tree method; { tree jnifunc, call, args, body, lookup_arg, method_sig, arg_types; tree jni_func_type, tem; --- 2129,2135 ---- a JNI function. */ tree ! build_jni_stub (tree method) { tree jnifunc, call, args, body, lookup_arg, method_sig, arg_types; tree jni_func_type, tem; *************** build_jni_stub (method) *** 2369,2378 **** FIELD_REF_INDEX is an index into the constant pool. */ static void ! expand_java_field_op (is_static, is_putting, field_ref_index) ! int is_static; ! int is_putting; ! int field_ref_index; { tree self_type = get_class_constant (current_jcf, --- 2328,2334 ---- FIELD_REF_INDEX is an index into the constant pool. */ static void ! expand_java_field_op (int is_static, int is_putting, int field_ref_index) { tree self_type = get_class_constant (current_jcf, *************** expand_java_field_op (is_static, is_putt *** 2421,2451 **** if (FIELD_FINAL (field_decl)) { if (DECL_CONTEXT (field_decl) != current_class) ! error_with_decl (field_decl, ! "assignment to final field `%s' not in field's class"); else if (FIELD_STATIC (field_decl)) { if (!DECL_CLINIT_P (current_function_decl)) ! warning_with_decl (field_decl, ! "assignment to final static field `%s' not in class initializer"); } else { tree cfndecl_name = DECL_NAME (current_function_decl); if (! DECL_CONSTRUCTOR_P (current_function_decl) && !ID_FINIT_P (cfndecl_name)) ! warning_with_decl (field_decl, "assignment to final field `%s' not in constructor"); } } ! expand_assignment (field_ref, new_value, 0, 0); } else push_value (field_ref); } void ! load_type_state (label) ! tree label; { int i; tree vec = LABEL_TYPE_STATE (label); --- 2377,2407 ---- if (FIELD_FINAL (field_decl)) { if (DECL_CONTEXT (field_decl) != current_class) ! error ("%Jassignment to final field '%D' not in field's class", ! field_decl, field_decl); else if (FIELD_STATIC (field_decl)) { if (!DECL_CLINIT_P (current_function_decl)) ! warning ("%Jassignment to final static field `%D' not in " ! "class initializer", field_decl, field_decl); } else { tree cfndecl_name = DECL_NAME (current_function_decl); if (! DECL_CONSTRUCTOR_P (current_function_decl) && !ID_FINIT_P (cfndecl_name)) ! warning ("%Jassignment to final field '%D' not in constructor", ! field_decl, field_decl); } } ! expand_assignment (field_ref, new_value, 0); } else push_value (field_ref); } void ! load_type_state (tree label) { int i; tree vec = LABEL_TYPE_STATE (label); *************** load_type_state (label) *** 2460,2468 **** placed here because it uses things defined locally in parse.y. */ static tree ! case_identity (t, v) ! tree t __attribute__ ((__unused__)); ! tree v; { return v; } --- 2416,2422 ---- placed here because it uses things defined locally in parse.y. */ static tree ! case_identity (tree t __attribute__ ((__unused__)), tree v) { return v; } *************** get_primitive_array_vtable (tree elt) *** 2495,2505 **** } struct rtx_def * ! java_expand_expr (exp, target, tmode, modifier) ! register tree exp; ! rtx target; ! enum machine_mode tmode; ! int modifier; /* Actually an enum expand_modifier. */ { tree current; --- 2449,2457 ---- } struct rtx_def * ! java_expand_expr (tree exp, rtx target, enum machine_mode tmode, ! int modifier /* Actually an enum expand_modifier. */, ! rtx *alt_rtl ATTRIBUTE_UNUSED) { tree current; *************** java_expand_expr (exp, target, tmode, mo *** 2554,2560 **** expand_decl (array_decl); tmp = expand_assignment (array_decl, build_new_array (element_type, length), ! 1, 0); if (TREE_CONSTANT (init) && ilength >= 10 && JPRIMITIVE_TYPE_P (element_type)) { --- 2506,2512 ---- expand_decl (array_decl); tmp = expand_assignment (array_decl, build_new_array (element_type, length), ! 1); if (TREE_CONSTANT (init) && ilength >= 10 && JPRIMITIVE_TYPE_P (element_type)) { *************** java_expand_expr (exp, target, tmode, mo *** 2573,2579 **** expand_assignment (build (COMPONENT_REF, TREE_TYPE (data_fld), build_java_indirect_ref (array_type, array_decl, flag_check_references), ! data_fld), init, 0, 0); return tmp; } case BLOCK: --- 2525,2531 ---- expand_assignment (build (COMPONENT_REF, TREE_TYPE (data_fld), build_java_indirect_ref (array_type, array_decl, flag_check_references), ! data_fld), init, 0); return tmp; } case BLOCK: *************** java_expand_expr (exp, target, tmode, mo *** 2664,2670 **** tree decl = BLOCK_EXPR_DECLS (catch); tree type = (decl ? TREE_TYPE (TREE_TYPE (decl)) : NULL_TREE); ! expand_start_catch (type); expand_expr_stmt (TREE_OPERAND (current, 0)); expand_end_catch (); } --- 2616,2622 ---- tree decl = BLOCK_EXPR_DECLS (catch); tree type = (decl ? TREE_TYPE (TREE_TYPE (decl)) : NULL_TREE); ! expand_start_catch (prepare_eh_table_type (type)); expand_expr_stmt (TREE_OPERAND (current, 0)); expand_end_catch (); } *************** java_expand_expr (exp, target, tmode, mo *** 2689,2697 **** instruction_bits[]. */ void ! note_instructions (jcf, method) ! JCF *jcf; ! tree method; { int PC; unsigned char* byte_ops; --- 2641,2647 ---- instruction_bits[]. */ void ! note_instructions (JCF *jcf, tree method) { int PC; unsigned char* byte_ops; *************** note_instructions (jcf, method) *** 2701,2707 **** jint INT_temp; #undef RET /* Defined by config/i386/i386.h */ - #undef AND /* Causes problems with opcodes for iand and land. */ #undef PTR #define BCODE byte_ops #define BYTE_type_node byte_type_node --- 2651,2656 ---- *************** note_instructions (jcf, method) *** 2835,2843 **** } void ! expand_byte_code (jcf, method) ! JCF *jcf; ! tree method; { int PC; int i; --- 2784,2790 ---- } void ! expand_byte_code (JCF *jcf, tree method) { int PC; int i; *************** expand_byte_code (jcf, method) *** 2903,2910 **** if (dead_code_index != -1) { /* We've just reached the end of a region of dead code. */ ! warning ("unreachable bytecode from %d to before %d", ! dead_code_index, PC); dead_code_index = -1; } } --- 2850,2858 ---- if (dead_code_index != -1) { /* We've just reached the end of a region of dead code. */ ! if (extra_warnings) ! warning ("unreachable bytecode from %d to before %d", ! dead_code_index, PC); dead_code_index = -1; } } *************** expand_byte_code (jcf, method) *** 2925,2932 **** linenumber_pointer += 4; if (pc == PC) { ! lineno = GET_u2 (linenumber_pointer - 2); ! emit_line_note (input_filename, lineno); if (!(instruction_bits[PC] & BCODE_HAS_MULTI_LINENUMBERS)) break; } --- 2873,2880 ---- linenumber_pointer += 4; if (pc == PC) { ! input_line = GET_u2 (linenumber_pointer - 2); ! emit_line_note (input_location); if (!(instruction_bits[PC] & BCODE_HAS_MULTI_LINENUMBERS)) break; } *************** expand_byte_code (jcf, method) *** 2940,2954 **** if (dead_code_index != -1) { /* We've just reached the end of a region of dead code. */ ! warning ("unreachable bytecode from %d to the end of the method", ! dead_code_index); } } static void ! java_push_constant_from_pool (jcf, index) ! JCF *jcf; ! int index; { tree c; if (JPOOL_TAG (jcf, index) == CONSTANT_String) --- 2888,2901 ---- if (dead_code_index != -1) { /* We've just reached the end of a region of dead code. */ ! if (extra_warnings) ! warning ("unreachable bytecode from %d to the end of the method", ! dead_code_index); } } static void ! java_push_constant_from_pool (JCF *jcf, int index) { tree c; if (JPOOL_TAG (jcf, index) == CONSTANT_String) *************** java_push_constant_from_pool (jcf, index *** 2965,2974 **** } int ! process_jvm_instruction (PC, byte_ops, length) ! int PC; ! const unsigned char* byte_ops; ! long length ATTRIBUTE_UNUSED; { const char *opname; /* Temporary ??? */ int oldpc = PC; /* PC at instruction start. */ --- 2912,2919 ---- } int ! process_jvm_instruction (int PC, const unsigned char* byte_ops, ! long length ATTRIBUTE_UNUSED) { const char *opname; /* Temporary ??? */ int oldpc = PC; /* PC at instruction start. */ *************** process_jvm_instruction (PC, byte_ops, l *** 3193,3199 **** type = TREE_TYPE (value); \ decl = find_local_variable (var, type, oldpc); \ set_local_type (var, type ); \ ! expand_assignment (decl, value, 0, 0); \ } #define STORE(OPERAND_TYPE, OPERAND_VALUE) \ --- 3138,3144 ---- type = TREE_TYPE (value); \ decl = find_local_variable (var, type, oldpc); \ set_local_type (var, type ); \ ! expand_assignment (decl, value, 0); \ } #define STORE(OPERAND_TYPE, OPERAND_VALUE) \ *************** process_jvm_instruction (PC, byte_ops, l *** 3280,3288 **** CODE_OFFSET. */ static unsigned char ! peek_opcode_at_pc (jcf, code_offset, pc) ! JCF *jcf; ! int code_offset, pc; { unsigned char opcode; long absolute_offset = (long)JCF_TELL (jcf); --- 3225,3231 ---- CODE_OFFSET. */ static unsigned char ! peek_opcode_at_pc (JCF *jcf, int code_offset, int pc) { unsigned char opcode; long absolute_offset = (long)JCF_TELL (jcf); *************** peek_opcode_at_pc (jcf, code_offset, pc) *** 3318,3326 **** have allocated and filled properly. */ int ! maybe_adjust_start_pc (jcf, code_offset, start_pc, slot) ! struct JCF *jcf; ! int code_offset, start_pc, slot; { int first, index, opcode; int pc, insn_pc; --- 3261,3268 ---- have allocated and filled properly. */ int ! maybe_adjust_start_pc (struct JCF *jcf, int code_offset, ! int start_pc, int slot) { int first, index, opcode; int pc, insn_pc; *************** maybe_adjust_start_pc (jcf, code_offset, *** 3423,3443 **** */ tree ! force_evaluation_order (node) ! tree node; { if (flag_syntax_only) return node; ! if (TREE_CODE_CLASS (TREE_CODE (node)) == '2') ! { ! if (TREE_SIDE_EFFECTS (TREE_OPERAND (node, 1))) ! TREE_OPERAND (node, 0) = save_expr (TREE_OPERAND (node, 0)); ! } ! else if (TREE_CODE (node) == CALL_EXPR ! || TREE_CODE (node) == NEW_CLASS_EXPR ! || (TREE_CODE (node) == COMPOUND_EXPR ! && TREE_CODE (TREE_OPERAND (node, 0)) == CALL_EXPR ! && TREE_CODE (TREE_OPERAND (node, 1)) == SAVE_EXPR)) { tree arg, cmp; --- 3365,3379 ---- */ tree ! force_evaluation_order (tree node) { if (flag_syntax_only) return node; ! if (TREE_CODE (node) == CALL_EXPR ! || TREE_CODE (node) == NEW_CLASS_EXPR ! || (TREE_CODE (node) == COMPOUND_EXPR ! && TREE_CODE (TREE_OPERAND (node, 0)) == CALL_EXPR ! && TREE_CODE (TREE_OPERAND (node, 1)) == SAVE_EXPR)) { tree arg, cmp; *************** force_evaluation_order (node) *** 3483,3491 **** method in order to emit initialization code for each test flag. */ static int ! emit_init_test_initialization (entry, x) ! void * * entry; ! void * x ATTRIBUTE_UNUSED; { struct treetreehash_entry *ite = (struct treetreehash_entry *) *entry; tree klass = build_class_ref (ite->key); --- 3419,3425 ---- method in order to emit initialization code for each test flag. */ static int ! emit_init_test_initialization (void **entry, void *x ATTRIBUTE_UNUSED) { struct treetreehash_entry *ite = (struct treetreehash_entry *) *entry; tree klass = build_class_ref (ite->key); diff -Nrc3pad gcc-3.3.3/gcc/java/gcj.1 gcc-3.4.0/gcc/java/gcj.1 *** gcc-3.3.3/gcc/java/gcj.1 2004-02-14 20:38:16.000000000 +0000 --- gcc-3.4.0/gcc/java/gcj.1 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,463 **** - .\" Automatically generated by Pod::Man version 1.15 - .\" Sat Feb 14 20:38:16 2004 - .\" - .\" Standard preamble: - .\" ====================================================================== - .de Sh \" Subsection heading - .br - .if t .Sp - .ne 5 - .PP - \fB\\$1\fR - .PP - .. - .de Sp \" Vertical space (when we can't use .PP) - .if t .sp .5v - .if n .sp - .. - .de Ip \" List item - .br - .ie \\n(.$>=3 .ne \\$3 - .el .ne 3 - .IP "\\$1" \\$2 - .. - .de Vb \" Begin verbatim text - .ft CW - .nf - .ne \\$1 - .. - .de Ve \" End verbatim text - .ft R - - .fi - .. - .\" Set up some character translations and predefined strings. \*(-- will - .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left - .\" double quote, and \*(R" will give a right double quote. | will give a - .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used - .\" to do unbreakable dashes and therefore won't be available. \*(C` and - .\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> - .tr \(*W-|\(bv\*(Tr - .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' - .ie n \{\ - . ds -- \(*W- - . ds PI pi - . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch - . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch - . ds L" "" - . ds R" "" - . ds C` "" - . ds C' "" - 'br\} - .el\{\ - . ds -- \|\(em\| - . ds PI \(*p - . ds L" `` - . ds R" '' - 'br\} - .\" - .\" If the F register is turned on, we'll generate index entries on stderr - .\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and - .\" index entries marked with X<> in POD. Of course, you'll have to process - .\" the output yourself in some meaningful fashion. - .if \nF \{\ - . de IX - . tm Index:\\$1\t\\n%\t"\\$2" - .. - . nr % 0 - . rr F - .\} - .\" - .\" For nroff, turn off justification. Always turn off hyphenation; it - .\" makes way too many mistakes in technical documents. - .hy 0 - .if n .na - .\" - .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). - .\" Fear. Run. Save yourself. No user-serviceable parts. - .bd B 3 - . \" fudge factors for nroff and troff - .if n \{\ - . ds #H 0 - . ds #V .8m - . ds #F .3m - . ds #[ \f1 - . ds #] \fP - .\} - .if t \{\ - . ds #H ((1u-(\\\\n(.fu%2u))*.13m) - . ds #V .6m - . ds #F 0 - . ds #[ \& - . ds #] \& - .\} - . \" simple accents for nroff and troff - .if n \{\ - . ds ' \& - . ds ` \& - . ds ^ \& - . ds , \& - . ds ~ ~ - . ds / - .\} - .if t \{\ - . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" - . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' - . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' - . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' - . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' - . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' - .\} - . \" troff and (daisy-wheel) nroff accents - .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' - .ds 8 \h'\*(#H'\(*b\h'-\*(#H' - .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] - .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' - .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' - .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] - .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] - .ds ae a\h'-(\w'a'u*4/10)'e - .ds Ae A\h'-(\w'A'u*4/10)'E - . \" corrections for vroff - .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' - .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' - . \" for low resolution devices (crt and lpr) - .if \n(.H>23 .if \n(.V>19 \ - \{\ - . ds : e - . ds 8 ss - . ds o a - . ds d- d\h'-1'\(ga - . ds D- D\h'-1'\(hy - . ds th \o'bp' - . ds Th \o'LP' - . ds ae ae - . ds Ae AE - .\} - .rm #[ #] #H #V #F C - .\" ====================================================================== - .\" - .IX Title "GCJ 1" - .TH GCJ 1 "gcc-3.3.3" "2004-02-14" "GNU" - .UC - .SH "NAME" - gcj \- Ahead-of-time compiler for the Java language - .SH "SYNOPSIS" - .IX Header "SYNOPSIS" - gcj [\fB\-I\fR\fIdir\fR...] [\fB\-d\fR \fIdir\fR...] - [\fB\*(--CLASSPATH\fR=\fIpath\fR] [\fB\*(--classpath\fR=\fIpath\fR] - [\fB\-f\fR\fIoption\fR...] [\fB\*(--encoding\fR=\fIname\fR] - [\fB\*(--main\fR=\fIclassname\fR] [\fB\-D\fR\fIname\fR[=\fIvalue\fR]...] - [\fB\-C\fR] [\fB\*(--resource\fR \fIresource-name\fR] [\fB\-d\fR \fIdirectory\fR] - [\fB\-W\fR\fIwarn\fR...] - \fIsourcefile\fR... - .SH "DESCRIPTION" - .IX Header "DESCRIPTION" - As \fBgcj\fR is just another front end to \fBgcc\fR, it supports many - of the same options as gcc. This manual only documents the - options specific to \fBgcj\fR. - .SH "OPTIONS" - .IX Header "OPTIONS" - .Sh "Input and output files" - .IX Subsection "Input and output files" - A \fBgcj\fR command is like a \fBgcc\fR command, in that it - consists of a number of options and file names. The following kinds - of input file names are supported: - .Ip "\fIfile\fR\fB.java\fR" 4 - .IX Item "file.java" - Java source files. - .Ip "\fIfile\fR\fB.class\fR" 4 - .IX Item "file.class" - Java bytecode files. - .Ip "\fIfile\fR\fB.zip\fR" 4 - .IX Item "file.zip" - .PD 0 - .Ip "\fIfile\fR\fB.jar\fR" 4 - .IX Item "file.jar" - .PD - An archive containing one or more \f(CW\*(C`.class\*(C'\fR files, all of - which are compiled. The archive may be compressed. - .Ip "\fB@\fR\fIfile\fR" 4 - .IX Item "@file" - A file containing a whitespace-separated list of input file names. - (Currently, these must all be \f(CW\*(C`.java\*(C'\fR source files, but that - may change.) - Each named file is compiled, just as if it had been on the command line. - .Ip "\fIlibrary\fR\fB.a\fR" 4 - .IX Item "library.a" - .PD 0 - .Ip "\fIlibrary\fR\fB.so\fR" 4 - .IX Item "library.so" - .Ip "\fB\-l\fR\fIlibname\fR" 4 - .IX Item "-llibname" - .PD - Libraries to use when linking. See the \fBgcc\fR manual. - .PP - You can specify more than one input file on the \fBgcj\fR command line, - in which case they will all be compiled. If you specify a - \&\f(CW\*(C`\-o \f(CI\s-1FILENAME\s0\f(CW\*(C'\fR - option, all the input files will be compiled together, producing a - single output file, named \fI\s-1FILENAME\s0\fR. - This is allowed even when using \f(CW\*(C`\-S\*(C'\fR or \f(CW\*(C`\-c\*(C'\fR, - but not when using \f(CW\*(C`\-C\*(C'\fR or \f(CW\*(C`\-\-resource\*(C'\fR. - (This is an extension beyond the what plain \fBgcc\fR allows.) - (If more than one input file is specified, all must currently - be \f(CW\*(C`.java\*(C'\fR files, though we hope to fix this.) - .Sh "Input Options" - .IX Subsection "Input Options" - \&\fBgcj\fR has options to control where it looks to find files it needs. - For instance, \fBgcj\fR might need to load a class that is referenced - by the file it has been asked to compile. Like other compilers for the - Java language, \fBgcj\fR has a notion of a \fIclass path\fR. There are - several options and environment variables which can be used to - manipulate the class path. When \fBgcj\fR looks for a given class, it - searches the class path looking for matching \fI.class\fR or - \&\fI.java\fR file. \fBgcj\fR comes with a built-in class path which - points at the installed \fIlibgcj.jar\fR, a file which contains all the - standard classes. - .PP - In the below, a directory or path component can refer either to an - actual directory on the filesystem, or to a \fI.zip\fR or \fI.jar\fR - file, which \fBgcj\fR will search as if it is a directory. - .Ip "\fB\-I\fR\fIdir\fR" 4 - .IX Item "-Idir" - All directories specified by \f(CW\*(C`\-I\*(C'\fR are kept in order and prepended - to the class path constructed from all the other options. Unless - compatibility with tools like \f(CW\*(C`javac\*(C'\fR is important, we recommend - always using \f(CW\*(C`\-I\*(C'\fR instead of the other options for manipulating the - class path. - .Ip "\fB\*(--classpath=\fR\fIpath\fR" 4 - .IX Item "classpath=path" - This sets the class path to \fIpath\fR, a colon-separated list of paths - (on Windows-based systems, a semicolon-separate list of paths). - This does not override the builtin (``boot'') search path. - .Ip "\fB\*(--CLASSPATH=\fR\fIpath\fR" 4 - .IX Item "CLASSPATH=path" - Deprecated synonym for \f(CW\*(C`\-\-classpath\*(C'\fR. - .Ip "\fB\*(--bootclasspath=\fR\fIpath\fR" 4 - .IX Item "bootclasspath=path" - Where to find the standard builtin classes, such as \f(CW\*(C`java.lang.String\*(C'\fR. - .Ip "\fB\*(--extdirs=\fR\fIpath\fR" 4 - .IX Item "extdirs=path" - For each directory in the \fIpath\fR, place the contents of that - directory at the end of the class path. - .Ip "\fB\s-1CLASSPATH\s0\fR" 4 - .IX Item "CLASSPATH" - This is an environment variable which holds a list of paths. - .PP - The final class path is constructed like so: - .Ip "\(bu" 4 - First come all directories specified via \f(CW\*(C`\-I\*(C'\fR. - .Ip "\(bu" 4 - If \fB\*(--classpath\fR is specified, its value is appended. - Otherwise, if the \f(CW\*(C`CLASSPATH\*(C'\fR environment variable is specified, - then its value is appended. - Otherwise, the current directory (\f(CW\*(C`"."\*(C'\fR) is appended. - .Ip "\(bu" 4 - If \f(CW\*(C`\-\-bootclasspath\*(C'\fR was specified, append its value. - Otherwise, append the built-in system directory, \fIlibgcj.jar\fR. - .Ip "\(bu" 4 - Finally, if \f(CW\*(C`\-\-extdirs\*(C'\fR was specified, append the contents of the - specified directories at the end of the class path. Otherwise, append - the contents of the built-in extdirs at \f(CW\*(C`$(prefix)/share/java/ext\*(C'\fR. - .PP - The classfile built by \fBgcj\fR for the class \f(CW\*(C`java.lang.Object\*(C'\fR - (and placed in \f(CW\*(C`libgcj.jar\*(C'\fR) contains a special zero length - attribute \f(CW\*(C`gnu.gcj.gcj\-compiled\*(C'\fR. The compiler looks for this - attribute when loading \f(CW\*(C`java.lang.Object\*(C'\fR and will report an error - if it isn't found, unless it compiles to bytecode (the option - \&\f(CW\*(C`\-fforce\-classes\-archive\-check\*(C'\fR can be used to override this - behavior in this particular case.) - .Ip "\fB\-fforce-classes-archive-check\fR" 4 - .IX Item "-fforce-classes-archive-check" - This forces the compiler to always check for the special zero length - attribute \f(CW\*(C`gnu.gcj.gcj\-compiled\*(C'\fR in \f(CW\*(C`java.lang.Object\*(C'\fR and - issue an error if it isn't found. - .Sh "Encodings" - .IX Subsection "Encodings" - The Java programming language uses Unicode throughout. In an effort to - integrate well with other locales, \fBgcj\fR allows \fI.java\fR files - to be written using almost any encoding. \fBgcj\fR knows how to - convert these encodings into its internal encoding at compile time. - .PP - You can use the \f(CW\*(C`\-\-encoding=\f(CI\s-1NAME\s0\f(CW\*(C'\fR option to specify an - encoding (of a particular character set) to use for source files. If - this is not specified, the default encoding comes from your current - locale. If your host system has insufficient locale support, then - \&\fBgcj\fR assumes the default encoding to be the \fB\s-1UTF-8\s0\fR encoding - of Unicode. - .PP - To implement \f(CW\*(C`\-\-encoding\*(C'\fR, \fBgcj\fR simply uses the host - platform's \f(CW\*(C`iconv\*(C'\fR conversion routine. This means that in practice - \&\fBgcj\fR is limited by the capabilities of the host platform. - .PP - The names allowed for the argument \f(CW\*(C`\-\-encoding\*(C'\fR vary from platform - to platform (since they are not standardized anywhere). However, - \&\fBgcj\fR implements the encoding named \fB\s-1UTF-8\s0\fR internally, so if - you choose to use this for your source files you can be assured that it - will work on every host. - .Sh "Warnings" - .IX Subsection "Warnings" - \&\fBgcj\fR implements several warnings. As with other generic - \&\fBgcc\fR warnings, if an option of the form \f(CW\*(C`\-Wfoo\*(C'\fR enables a - warning, then \f(CW\*(C`\-Wno\-foo\*(C'\fR will disable it. Here we've chosen to - document the form of the warning which will have an effect \*(-- the - default being the opposite of what is listed. - .Ip "\fB\-Wredundant-modifiers\fR" 4 - .IX Item "-Wredundant-modifiers" - With this flag, \fBgcj\fR will warn about redundant modifiers. For - instance, it will warn if an interface method is declared \f(CW\*(C`public\*(C'\fR. - .Ip "\fB\-Wextraneous-semicolon\fR" 4 - .IX Item "-Wextraneous-semicolon" - This causes \fBgcj\fR to warn about empty statements. Empty statements - have been deprecated. - .Ip "\fB\-Wno-out-of-date\fR" 4 - .IX Item "-Wno-out-of-date" - This option will cause \fBgcj\fR not to warn when a source file is - newer than its matching class file. By default \fBgcj\fR will warn - about this. - .Ip "\fB\-Wunused\fR" 4 - .IX Item "-Wunused" - This is the same as \fBgcc\fR's \f(CW\*(C`\-Wunused\*(C'\fR. - .Ip "\fB\-Wall\fR" 4 - .IX Item "-Wall" - This is the same as \f(CW\*(C`\-Wredundant\-modifiers \-Wextraneous\-semicolon - \&\-Wunused\*(C'\fR. - .Sh "Code Generation" - .IX Subsection "Code Generation" - In addition to the many \fBgcc\fR options controlling code generation, - \&\fBgcj\fR has several options specific to itself. - .Ip "\fB\*(--main=\fR\fI\s-1CLASSNAME\s0\fR" 4 - .IX Item "main=CLASSNAME" - This option is used when linking to specify the name of the class whose - \&\f(CW\*(C`main\*(C'\fR method should be invoked when the resulting executable is - run. [1] - .Ip "\fB\-D\fR\fIname\fR\fB[=\fR\fIvalue\fR\fB]\fR" 4 - .IX Item "-Dname[=value]" - This option can only be used with \f(CW\*(C`\-\-main\*(C'\fR. It defines a system - property named \fIname\fR with value \fIvalue\fR. If \fIvalue\fR is not - specified then it defaults to the empty string. These system properties - are initialized at the program's startup and can be retrieved at runtime - using the \f(CW\*(C`java.lang.System.getProperty\*(C'\fR method. - .Ip "\fB\-C\fR" 4 - .IX Item "-C" - This option is used to tell \fBgcj\fR to generate bytecode - (\fI.class\fR files) rather than object code. - .Ip "\fB\*(--resource\fR \fIresource-name\fR" 4 - .IX Item "resource resource-name" - This option is used to tell \fBgcj\fR to compile the contents of a - given file to object code so it may be accessed at runtime with the core - protocol handler as \fBcore:/\fR\fIresource-name\fR. Note that - \&\fIresource-name\fR is the name of the resource as found at runtime; for - instance, it could be used in a call to \f(CW\*(C`ResourceBundle.getBundle\*(C'\fR. - The actual file name to be compiled this way must be specified - separately. - .Ip "\fB\-d\fR \fIdirectory\fR" 4 - .IX Item "-d directory" - When used with \f(CW\*(C`\-C\*(C'\fR, this causes all generated \fI.class\fR files - to be put in the appropriate subdirectory of \fIdirectory\fR. By - default they will be put in subdirectories of the current working - directory. - .Ip "\fB\-fno-bounds-check\fR" 4 - .IX Item "-fno-bounds-check" - By default, \fBgcj\fR generates code which checks the bounds of all - array indexing operations. With this option, these checks are omitted, which - can improve performance for code that uses arrays extensively. Note that this - can result in unpredictable behavior if the code in question actually does - violate array bounds constraints. It is safe to use this option if you are - sure that your code will never throw an \f(CW\*(C`ArrayIndexOutOfBoundsException\*(C'\fR. - .Ip "\fB\-fno-store-check\fR" 4 - .IX Item "-fno-store-check" - Don't generate array store checks. When storing objects into arrays, a runtime - check is normally generated in order to ensure that the object is assignment - compatible with the component type of the array (which may not be known - at compile-time). With this option, these checks are omitted. This can - improve performance for code which stores objects into arrays frequently. - It is safe to use this option if you are sure your code will never throw an - \&\f(CW\*(C`ArrayStoreException\*(C'\fR. - .Ip "\fB\-fjni\fR" 4 - .IX Item "-fjni" - With \fBgcj\fR there are two options for writing native methods: \s-1CNI\s0 - and \s-1JNI\s0. By default \fBgcj\fR assumes you are using \s-1CNI\s0. If you are - compiling a class with native methods, and these methods are implemented - using \s-1JNI\s0, then you must use \f(CW\*(C`\-fjni\*(C'\fR. This option causes - \&\fBgcj\fR to generate stubs which will invoke the underlying \s-1JNI\s0 - methods. - .Ip "\fB\-fno-assert\fR" 4 - .IX Item "-fno-assert" - Don't recognize the \f(CW\*(C`assert\*(C'\fR keyword. This is for compatibility - with older versions of the language specification. - .Ip "\fB\-fno-optimize-static-class-initialization\fR" 4 - .IX Item "-fno-optimize-static-class-initialization" - When the optimization level is greater or equal to \f(CW\*(C`\-O2\*(C'\fR, - \&\fBgcj\fR will try to optimize the way calls into the runtime are made - to initialize static classes upon their first use (this optimization - isn't carried out if \f(CW\*(C`\-C\*(C'\fR was specified.) When compiling to native - code, \f(CW\*(C`\-fno\-optimize\-static\-class\-initialization\*(C'\fR will turn this - optimization off, regardless of the optimization level in use. - .Sh "Configure-time Options" - .IX Subsection "Configure-time Options" - Some \fBgcj\fR code generations options affect the resulting \s-1ABI\s0, and - so can only be meaningfully given when \f(CW\*(C`libgcj\*(C'\fR, the runtime - package, is configured. \f(CW\*(C`libgcj\*(C'\fR puts the appropriate options from - this group into a \fBspec\fR file which is read by \fBgcj\fR. These - options are listed here for completeness; if you are using \f(CW\*(C`libgcj\*(C'\fR - then you won't want to touch these options. - .Ip "\fB\-fuse-boehm-gc\fR" 4 - .IX Item "-fuse-boehm-gc" - This enables the use of the Boehm \s-1GC\s0 bitmap marking code. In particular - this causes \fBgcj\fR to put an object marking descriptor into each - vtable. - .Ip "\fB\-fhash-synchronization\fR" 4 - .IX Item "-fhash-synchronization" - By default, synchronization data (the data used for \f(CW\*(C`synchronize\*(C'\fR, - \&\f(CW\*(C`wait\*(C'\fR, and \f(CW\*(C`notify\*(C'\fR) is pointed to by a word in each object. - With this option \fBgcj\fR assumes that this information is stored in a - hash table and not in the object itself. - .Ip "\fB\-fuse-divide-subroutine\fR" 4 - .IX Item "-fuse-divide-subroutine" - On some systems, a library routine is called to perform integer - division. This is required to get exception handling correct when - dividing by zero. - .Ip "\fB\-fcheck-references\fR" 4 - .IX Item "-fcheck-references" - On some systems it's necessary to insert inline checks whenever - accessing an object via a reference. On other systems you won't need - this because null pointer accesses are caught automatically by the - processor. - .SH "FOOTNOTES" - .IX Header "FOOTNOTES" - .Ip "1." 4 - The linker by default looks for a global function named - \&\f(CW\*(C`main\*(C'\fR. Since Java does not have global functions, and a - collection of Java classes may have more than one class with a - \&\f(CW\*(C`main\*(C'\fR method, you need to let the linker know which of those - \&\f(CW\*(C`main\*(C'\fR methods it should invoke when starting the application. - .SH "SEE ALSO" - .IX Header "SEE ALSO" - \&\fIgcc\fR\|(1), \fIgcjh\fR\|(1), \fIgij\fR\|(1), \fIjv-scan\fR\|(1), \fIjcf-dump\fR\|(1), \fIgfdl\fR\|(7), - and the Info entries for \fIgcj\fR and \fIgcc\fR. - .SH "COPYRIGHT" - .IX Header "COPYRIGHT" - Copyright (c) 2001, 2002 Free Software Foundation, Inc. - .PP - Permission is granted to copy, distribute and/or modify this document - under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.2 or - any later version published by the Free Software Foundation; with the - Invariant Sections being ``\s-1GNU\s0 General Public License'', the Front-Cover - texts being (a) (see below), and with the Back-Cover Texts being (b) - (see below). A copy of the license is included in the - man page \fIgfdl\fR\|(7). - .PP - (a) The \s-1FSF\s0's Front-Cover Text is: - .PP - .Vb 1 - \& A GNU Manual - .Ve - (b) The \s-1FSF\s0's Back-Cover Text is: - .PP - .Vb 3 - \& You have freedom to copy and modify this GNU Manual, like GNU - \& software. Copies published by the Free Software Foundation raise - \& funds for GNU development. - .Ve --- 0 ---- diff -Nrc3pad gcc-3.3.3/gcc/java/gcjh.1 gcc-3.4.0/gcc/java/gcjh.1 *** gcc-3.3.3/gcc/java/gcjh.1 2004-02-14 20:38:16.000000000 +0000 --- gcc-3.4.0/gcc/java/gcjh.1 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,260 **** - .\" Automatically generated by Pod::Man version 1.15 - .\" Sat Feb 14 20:38:16 2004 - .\" - .\" Standard preamble: - .\" ====================================================================== - .de Sh \" Subsection heading - .br - .if t .Sp - .ne 5 - .PP - \fB\\$1\fR - .PP - .. - .de Sp \" Vertical space (when we can't use .PP) - .if t .sp .5v - .if n .sp - .. - .de Ip \" List item - .br - .ie \\n(.$>=3 .ne \\$3 - .el .ne 3 - .IP "\\$1" \\$2 - .. - .de Vb \" Begin verbatim text - .ft CW - .nf - .ne \\$1 - .. - .de Ve \" End verbatim text - .ft R - - .fi - .. - .\" Set up some character translations and predefined strings. \*(-- will - .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left - .\" double quote, and \*(R" will give a right double quote. | will give a - .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used - .\" to do unbreakable dashes and therefore won't be available. \*(C` and - .\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> - .tr \(*W-|\(bv\*(Tr - .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' - .ie n \{\ - . ds -- \(*W- - . ds PI pi - . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch - . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch - . ds L" "" - . ds R" "" - . ds C` "" - . ds C' "" - 'br\} - .el\{\ - . ds -- \|\(em\| - . ds PI \(*p - . ds L" `` - . ds R" '' - 'br\} - .\" - .\" If the F register is turned on, we'll generate index entries on stderr - .\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and - .\" index entries marked with X<> in POD. Of course, you'll have to process - .\" the output yourself in some meaningful fashion. - .if \nF \{\ - . de IX - . tm Index:\\$1\t\\n%\t"\\$2" - .. - . nr % 0 - . rr F - .\} - .\" - .\" For nroff, turn off justification. Always turn off hyphenation; it - .\" makes way too many mistakes in technical documents. - .hy 0 - .if n .na - .\" - .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). - .\" Fear. Run. Save yourself. No user-serviceable parts. - .bd B 3 - . \" fudge factors for nroff and troff - .if n \{\ - . ds #H 0 - . ds #V .8m - . ds #F .3m - . ds #[ \f1 - . ds #] \fP - .\} - .if t \{\ - . ds #H ((1u-(\\\\n(.fu%2u))*.13m) - . ds #V .6m - . ds #F 0 - . ds #[ \& - . ds #] \& - .\} - . \" simple accents for nroff and troff - .if n \{\ - . ds ' \& - . ds ` \& - . ds ^ \& - . ds , \& - . ds ~ ~ - . ds / - .\} - .if t \{\ - . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" - . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' - . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' - . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' - . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' - . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' - .\} - . \" troff and (daisy-wheel) nroff accents - .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' - .ds 8 \h'\*(#H'\(*b\h'-\*(#H' - .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] - .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' - .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' - .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] - .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] - .ds ae a\h'-(\w'a'u*4/10)'e - .ds Ae A\h'-(\w'A'u*4/10)'E - . \" corrections for vroff - .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' - .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' - . \" for low resolution devices (crt and lpr) - .if \n(.H>23 .if \n(.V>19 \ - \{\ - . ds : e - . ds 8 ss - . ds o a - . ds d- d\h'-1'\(ga - . ds D- D\h'-1'\(hy - . ds th \o'bp' - . ds Th \o'LP' - . ds ae ae - . ds Ae AE - .\} - .rm #[ #] #H #V #F C - .\" ====================================================================== - .\" - .IX Title "GCJH 1" - .TH GCJH 1 "gcc-3.3.3" "2004-02-14" "GNU" - .UC - .SH "NAME" - gcjh \- generate header files from Java class files - .SH "SYNOPSIS" - .IX Header "SYNOPSIS" - gcjh [\fB\-stubs\fR] [\fB\-jni\fR] - [\fB\-add\fR \fItext\fR] [\fB\-append\fR \fItext\fR] [\fB\-friend\fR \fItext\fR] - [\fB\-preprend\fR \fItext\fR] - [\fB\*(--classpath\fR=\fIpath\fR] [\fB\*(--CLASSPATH\fR=\fIpath\fR] - [\fB\-I\fR\fIdir\fR...] [\fB\-d\fR \fIdir\fR...] - [\fB\-o\fR \fIfile\fR] [\fB\-td\fR \fIdir\fR] - [\fB\-M\fR] [\fB\-MM\fR] [\fB\-MD\fR] [\fB\-MMD\fR] - [\fB\*(--version\fR] [\fB\*(--help\fR] [\fB\-v\fR] [\fB\*(--verbose\fR] - \fIclassname\fR... - .SH "DESCRIPTION" - .IX Header "DESCRIPTION" - The \f(CW\*(C`gcjh\*(C'\fR program is used to generate header files from class - files. It can generate both \s-1CNI\s0 and \s-1JNI\s0 header files, as well as stub - implementation files which can be used as a basis for implementing the - required native methods. - .SH "OPTIONS" - .IX Header "OPTIONS" - .Ip "\fB\-stubs\fR" 4 - .IX Item "-stubs" - This causes \f(CW\*(C`gcjh\*(C'\fR to generate stub files instead of header files. - By default the stub file will be named after the class, with a suffix of - \&\fB.cc\fR. In \s-1JNI\s0 mode, the default output file will have the suffix - \&\fB.c\fR. - .Ip "\fB\-jni\fR" 4 - .IX Item "-jni" - This tells \f(CW\*(C`gcjh\*(C'\fR to generate a \s-1JNI\s0 header or stub. By default, - \&\s-1CNI\s0 headers are generated. - .Ip "\fB\-add\fR \fItext\fR" 4 - .IX Item "-add text" - Inserts \fItext\fR into the class body. This is ignored in \s-1JNI\s0 mode. - .Ip "\fB\-append\fR \fItext\fR" 4 - .IX Item "-append text" - Inserts \fItext\fR into the header file after the class declaration. - This is ignored in \s-1JNI\s0 mode. - .Ip "\fB\-friend\fR \fItext\fR" 4 - .IX Item "-friend text" - Inserts \fItext\fR into the class as a \f(CW\*(C`friend\*(C'\fR declaration. - This is ignored in \s-1JNI\s0 mode. - .Ip "\fB\-prepend\fR \fItext\fR" 4 - .IX Item "-prepend text" - Inserts \fItext\fR into the header file before the class declaration. - This is ignored in \s-1JNI\s0 mode. - .Ip "\fB\*(--classpath=\fR\fIpath\fR" 4 - .IX Item "classpath=path" - .PD 0 - .Ip "\fB\*(--CLASSPATH=\fR\fIpath\fR" 4 - .IX Item "CLASSPATH=path" - .Ip "\fB\-I\fR\fIdirectory\fR" 4 - .IX Item "-Idirectory" - .Ip "\fB\-d\fR \fIdirectory\fR" 4 - .IX Item "-d directory" - .Ip "\fB\-o\fR \fIfile\fR" 4 - .IX Item "-o file" - .PD - These options are all identical to the corresponding \fBgcj\fR options. - .Ip "\fB\-o\fR \fIfile\fR" 4 - .IX Item "-o file" - Sets the output file name. This cannot be used if there is more than - one class on the command line. - .Ip "\fB\-td\fR \fIdirectory\fR" 4 - .IX Item "-td directory" - Sets the name of the directory to use for temporary files. - .Ip "\fB\-M\fR" 4 - .IX Item "-M" - Print all dependencies to stdout; suppress ordinary output. - .Ip "\fB\-MM\fR" 4 - .IX Item "-MM" - Print non-system dependencies to stdout; suppress ordinary output. - .Ip "\fB\-MD\fR" 4 - .IX Item "-MD" - Print all dependencies to stdout. - .Ip "\fB\-MMD\fR" 4 - .IX Item "-MMD" - Print non-system dependencies to stdout. - .Ip "\fB\*(--help\fR" 4 - .IX Item "help" - Print help about \f(CW\*(C`gcjh\*(C'\fR and exit. No further processing is done. - .Ip "\fB\*(--version\fR" 4 - .IX Item "version" - Print version information for \f(CW\*(C`gcjh\*(C'\fR and exit. No further - processing is done. - .Ip "\fB\-v, \-\-verbose\fR" 4 - .IX Item "-v, --verbose" - Print extra information while running. - .PP - All remaining options are considered to be names of classes. - .SH "SEE ALSO" - .IX Header "SEE ALSO" - \&\fIgcc\fR\|(1), \fIgcj\fR\|(1), \fIgij\fR\|(1), \fIjv-scan\fR\|(1), \fIjcf-dump\fR\|(1), \fIgfdl\fR\|(7), - and the Info entries for \fIgcj\fR and \fIgcc\fR. - .SH "COPYRIGHT" - .IX Header "COPYRIGHT" - Copyright (c) 2001, 2002 Free Software Foundation, Inc. - .PP - Permission is granted to copy, distribute and/or modify this document - under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.2 or - any later version published by the Free Software Foundation; with the - Invariant Sections being ``\s-1GNU\s0 General Public License'', the Front-Cover - texts being (a) (see below), and with the Back-Cover Texts being (b) - (see below). A copy of the license is included in the - man page \fIgfdl\fR\|(7). - .PP - (a) The \s-1FSF\s0's Front-Cover Text is: - .PP - .Vb 1 - \& A GNU Manual - .Ve - (b) The \s-1FSF\s0's Back-Cover Text is: - .PP - .Vb 3 - \& You have freedom to copy and modify this GNU Manual, like GNU - \& software. Copies published by the Free Software Foundation raise - \& funds for GNU development. - .Ve --- 0 ---- diff -Nrc3pad gcc-3.3.3/gcc/java/gcj.info gcc-3.4.0/gcc/java/gcj.info *** gcc-3.3.3/gcc/java/gcj.info 2004-02-14 20:38:10.000000000 +0000 --- gcc-3.4.0/gcc/java/gcj.info 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,2815 **** - Ceci est le fichier Info gcj.info, produit par Makeinfo version 4.6 à - partir gcj.texi. - - Copyright (C) 2001, 2002 Free Software Foundation, Inc. - - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.2 or - any later version published by the Free Software Foundation; with the - Invariant Sections being "GNU General Public License", the Front-Cover - texts being (a) (see below), and with the Back-Cover Texts being (b) - (see below). A copy of the license is included in the section entitled - "GNU Free Documentation License". - - (a) The FSF's Front-Cover Text is: - - A GNU Manual - - (b) The FSF's Back-Cover Text is: - - You have freedom to copy and modify this GNU Manual, like GNU - software. Copies published by the Free Software Foundation raise - funds for GNU development. - INFO-DIR-SECTION Programming - START-INFO-DIR-ENTRY - * Gcj: (gcj). Ahead-of-time compiler for the Java language - END-INFO-DIR-ENTRY - - INFO-DIR-SECTION Individual utilities - START-INFO-DIR-ENTRY - * gcjh: (gcj)Invoking gcjh. - Generate header files from Java class files - * jv-scan: (gcj)Invoking jv-scan. - Print information about Java source files - * jcf-dump: (gcj)Invoking jcf-dump. - Print information about Java class files - * gij: (gcj)Invoking gij. GNU interpreter for Java bytecode - * jv-convert: (gcj)Invoking jv-convert. - Convert file from one encoding to another - * rmic: (gcj)Invoking rmic. - Generate stubs for Remote Method Invocation. - * rmiregistry: (gcj)Invoking rmiregistry. - The remote object registry. - END-INFO-DIR-ENTRY - - Copyright (C) 2001, 2002 Free Software Foundation, Inc. - - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.2 or - any later version published by the Free Software Foundation; with the - Invariant Sections being "GNU General Public License", the Front-Cover - texts being (a) (see below), and with the Back-Cover Texts being (b) - (see below). A copy of the license is included in the section entitled - "GNU Free Documentation License". - - (a) The FSF's Front-Cover Text is: - - A GNU Manual - - (b) The FSF's Back-Cover Text is: - - You have freedom to copy and modify this GNU Manual, like GNU - software. Copies published by the Free Software Foundation raise - funds for GNU development. -  - File: gcj.info, Node: Top, Next: Copying, Up: (dir) - - Introduction - ************ - - This manual describes how to use `gcj', the GNU compiler for the Java - programming language. `gcj' can generate both `.class' files and - object files, and it can read both Java source code and `.class' files. - - * Menu: - - * Copying:: The GNU General Public License - * GNU Free Documentation License:: - How you can share and copy this manual - * Invoking gcj:: Compiler options supported by `gcj' - * Compatibility:: Compatibility between gcj and other tools for Java - * Invoking gcjh:: Generate header files from class files - * Invoking jv-scan:: Print information about source files - * Invoking jcf-dump:: Print information about class files - * Invoking gij:: Interpreting Java bytecodes - * Invoking jv-convert:: Converting from one encoding to another - * Invoking rmic:: Generate stubs for Remote Method Invocation. - * Invoking rmiregistry:: The remote object registry. - * About CNI:: Description of the Cygnus Native Interface - * System properties:: Modifying runtime behavior of the libgcj library - * Resources:: Where to look for more information - -  - File: gcj.info, Node: Copying, Next: GNU Free Documentation License, Prev: Top, Up: Top - - GNU GENERAL PUBLIC LICENSE - ************************** - - Version 2, June 1991 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - ======== - - The licenses for most software are designed to take away your freedom - to share and change it. By contrast, the GNU General Public License is - intended to guarantee your freedom to share and change free - software--to make sure the software is free for all its users. This - General Public License applies to most of the Free Software - Foundation's software and to any other program whose authors commit to - using it. (Some other Free Software Foundation software is covered by - the GNU Library General Public License instead.) You can apply it to - your programs, too. - - When we speak of free software, we are referring to freedom, not - price. Our General Public Licenses are designed to make sure that you - have the freedom to distribute copies of free software (and charge for - this service if you wish), that you receive source code or can get it - if you want it, that you can change the software or use pieces of it in - new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid - anyone to deny you these rights or to ask you to surrender the rights. - These restrictions translate to certain responsibilities for you if you - distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether - gratis or for a fee, you must give the recipients all the rights that - you have. You must make sure that they, too, receive or can get the - source code. And you must show them these terms so they know their - rights. - - We protect your rights with two steps: (1) copyright the software, - and (2) offer you this license which gives you legal permission to copy, - distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain - that everyone understands that there is no warranty for this free - software. If the software is modified by someone else and passed on, we - want its recipients to know that what they have is not the original, so - that any problems introduced by others will not reflect on the original - authors' reputations. - - Finally, any free program is threatened constantly by software - patents. We wish to avoid the danger that redistributors of a free - program will individually obtain patent licenses, in effect making the - program proprietary. To prevent this, we have made it clear that any - patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and - modification follow. - - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which contains a - notice placed by the copyright holder saying it may be distributed - under the terms of this General Public License. The "Program", - below, refers to any such program or work, and a "work based on - the Program" means either the Program or any derivative work under - copyright law: that is to say, a work containing the Program or a - portion of it, either verbatim or with modifications and/or - translated into another language. (Hereinafter, translation is - included without limitation in the term "modification".) Each - licensee is addressed as "you". - - Activities other than copying, distribution and modification are - not covered by this License; they are outside its scope. The act - of running the Program is not restricted, and the output from the - Program is covered only if its contents constitute a work based on - the Program (independent of having been made by running the - Program). Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's - source code as you receive it, in any medium, provided that you - conspicuously and appropriately publish on each copy an appropriate - copyright notice and disclaimer of warranty; keep intact all the - notices that refer to this License and to the absence of any - warranty; and give any other recipients of the Program a copy of - this License along with the Program. - - You may charge a fee for the physical act of transferring a copy, - and you may at your option offer warranty protection in exchange - for a fee. - - 2. You may modify your copy or copies of the Program or any portion - of it, thus forming a work based on the Program, and copy and - distribute such modifications or work under the terms of Section 1 - above, provided that you also meet all of these conditions: - - a. You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b. You must cause any work that you distribute or publish, that - in whole or in part contains or is derived from the Program - or any part thereof, to be licensed as a whole at no charge - to all third parties under the terms of this License. - - c. If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display - an announcement including an appropriate copyright notice and - a notice that there is no warranty (or else, saying that you - provide a warranty) and that users may redistribute the - program under these conditions, and telling the user how to - view a copy of this License. (Exception: if the Program - itself is interactive but does not normally print such an - announcement, your work based on the Program is not required - to print an announcement.) - - These requirements apply to the modified work as a whole. If - identifiable sections of that work are not derived from the - Program, and can be reasonably considered independent and separate - works in themselves, then this License, and its terms, do not - apply to those sections when you distribute them as separate - works. But when you distribute the same sections as part of a - whole which is a work based on the Program, the distribution of - the whole must be on the terms of this License, whose permissions - for other licensees extend to the entire whole, and thus to each - and every part regardless of who wrote it. - - Thus, it is not the intent of this section to claim rights or - contest your rights to work written entirely by you; rather, the - intent is to exercise the right to control the distribution of - derivative or collective works based on the Program. - - In addition, mere aggregation of another work not based on the - Program with the Program (or with a work based on the Program) on - a volume of a storage or distribution medium does not bring the - other work under the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, - under Section 2) in object code or executable form under the terms - of Sections 1 and 2 above provided that you also do one of the - following: - - a. Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of - Sections 1 and 2 above on a medium customarily used for - software interchange; or, - - b. Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a - medium customarily used for software interchange; or, - - c. Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with - such an offer, in accord with Subsection b above.) - - The source code for a work means the preferred form of the work for - making modifications to it. For an executable work, complete - source code means all the source code for all modules it contains, - plus any associated interface definition files, plus the scripts - used to control compilation and installation of the executable. - However, as a special exception, the source code distributed need - not include anything that is normally distributed (in either - source or binary form) with the major components (compiler, - kernel, and so on) of the operating system on which the executable - runs, unless that component itself accompanies the executable. - - If distribution of executable or object code is made by offering - access to copy from a designated place, then offering equivalent - access to copy the source code from the same place counts as - distribution of the source code, even though third parties are not - compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program - except as expressly provided under this License. Any attempt - otherwise to copy, modify, sublicense or distribute the Program is - void, and will automatically terminate your rights under this - License. However, parties who have received copies, or rights, - from you under this License will not have their licenses - terminated so long as such parties remain in full compliance. - - 5. You are not required to accept this License, since you have not - signed it. However, nothing else grants you permission to modify - or distribute the Program or its derivative works. These actions - are prohibited by law if you do not accept this License. - Therefore, by modifying or distributing the Program (or any work - based on the Program), you indicate your acceptance of this - License to do so, and all its terms and conditions for copying, - distributing or modifying the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the - Program), the recipient automatically receives a license from the - original licensor to copy, distribute or modify the Program - subject to these terms and conditions. You may not impose any - further restrictions on the recipients' exercise of the rights - granted herein. You are not responsible for enforcing compliance - by third parties to this License. - - 7. If, as a consequence of a court judgment or allegation of patent - infringement or for any other reason (not limited to patent - issues), conditions are imposed on you (whether by court order, - agreement or otherwise) that contradict the conditions of this - License, they do not excuse you from the conditions of this - License. If you cannot distribute so as to satisfy simultaneously - your obligations under this License and any other pertinent - obligations, then as a consequence you may not distribute the - Program at all. For example, if a patent license would not permit - royalty-free redistribution of the Program by all those who - receive copies directly or indirectly through you, then the only - way you could satisfy both it and this License would be to refrain - entirely from distribution of the Program. - - If any portion of this section is held invalid or unenforceable - under any particular circumstance, the balance of the section is - intended to apply and the section as a whole is intended to apply - in other circumstances. - - It is not the purpose of this section to induce you to infringe any - patents or other property right claims or to contest validity of - any such claims; this section has the sole purpose of protecting - the integrity of the free software distribution system, which is - implemented by public license practices. Many people have made - generous contributions to the wide range of software distributed - through that system in reliance on consistent application of that - system; it is up to the author/donor to decide if he or she is - willing to distribute software through any other system and a - licensee cannot impose that choice. - - This section is intended to make thoroughly clear what is believed - to be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in - certain countries either by patents or by copyrighted interfaces, - the original copyright holder who places the Program under this - License may add an explicit geographical distribution limitation - excluding those countries, so that distribution is permitted only - in or among countries not thus excluded. In such case, this - License incorporates the limitation as if written in the body of - this License. - - 9. The Free Software Foundation may publish revised and/or new - versions of the General Public License from time to time. Such - new versions will be similar in spirit to the present version, but - may differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the - Program specifies a version number of this License which applies - to it and "any later version", you have the option of following - the terms and conditions either of that version or of any later - version published by the Free Software Foundation. If the Program - does not specify a version number of this License, you may choose - any version ever published by the Free Software Foundation. - - 10. If you wish to incorporate parts of the Program into other free - programs whose distribution conditions are different, write to the - author to ask for permission. For software which is copyrighted - by the Free Software Foundation, write to the Free Software - Foundation; we sometimes make exceptions for this. Our decision - will be guided by the two goals of preserving the free status of - all derivatives of our free software and of promoting the sharing - and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO - WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE - LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT - HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT - WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT - NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE - QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE - PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY - SERVICING, REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN - WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY - MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE - LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, - INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR - INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF - DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU - OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY - OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - ============================================= - - If you develop a new program, and you want it to be of the greatest - possible use to the public, the best way to achieve this is to make it - free software which everyone can redistribute and change under these - terms. - - To do so, attach the following notices to the program. It is safest - to attach them to the start of each source file to most effectively - convey the exclusion of warranty; and each file should have at least - the "copyright" line and a pointer to where the full notice is found. - - ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES. - Copyright (C) YEAR NAME OF AUTHOR - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - Also add information on how to contact you by electronic and paper - mail. - - If the program is interactive, make it output a short notice like - this when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) YEAR NAME OF AUTHOR - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details - type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - - The hypothetical commands `show w' and `show c' should show the - appropriate parts of the General Public License. Of course, the - commands you use may be called something other than `show w' and `show - c'; they could even be mouse-clicks or menu items--whatever suits your - program. - - You should also get your employer (if you work as a programmer) or - your school, if any, to sign a "copyright disclaimer" for the program, - if necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - SIGNATURE OF TY COON, 1 April 1989 - Ty Coon, President of Vice - - This General Public License does not permit incorporating your - program into proprietary programs. If your program is a subroutine - library, you may consider it more useful to permit linking proprietary - applications with the library. If this is what you want to do, use the - GNU Library General Public License instead of this License. - -  - File: gcj.info, Node: GNU Free Documentation License, Next: Invoking gcj, Prev: Copying, Up: Top - - GNU Free Documentation License - ****************************** - - Version 1.2, November 2002 - Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - 0. PREAMBLE - - The purpose of this License is to make a manual, textbook, or other - functional and useful document "free" in the sense of freedom: to - assure everyone the effective freedom to copy and redistribute it, - with or without modifying it, either commercially or - noncommercially. Secondarily, this License preserves for the - author and publisher a way to get credit for their work, while not - being considered responsible for modifications made by others. - - This License is a kind of "copyleft", which means that derivative - works of the document must themselves be free in the same sense. - It complements the GNU General Public License, which is a copyleft - license designed for free software. - - We have designed this License in order to use it for manuals for - free software, because free software needs free documentation: a - free program should come with manuals providing the same freedoms - that the software does. But this License is not limited to - software manuals; it can be used for any textual work, regardless - of subject matter or whether it is published as a printed book. - We recommend this License principally for works whose purpose is - instruction or reference. - - 1. APPLICABILITY AND DEFINITIONS - - This License applies to any manual or other work, in any medium, - that contains a notice placed by the copyright holder saying it - can be distributed under the terms of this License. Such a notice - grants a world-wide, royalty-free license, unlimited in duration, - to use that work under the conditions stated herein. The - "Document", below, refers to any such manual or work. Any member - of the public is a licensee, and is addressed as "you". You - accept the license if you copy, modify or distribute the work in a - way requiring permission under copyright law. - - A "Modified Version" of the Document means any work containing the - Document or a portion of it, either copied verbatim, or with - modifications and/or translated into another language. - - A "Secondary Section" is a named appendix or a front-matter section - of the Document that deals exclusively with the relationship of the - publishers or authors of the Document to the Document's overall - subject (or to related matters) and contains nothing that could - fall directly within that overall subject. (Thus, if the Document - is in part a textbook of mathematics, a Secondary Section may not - explain any mathematics.) The relationship could be a matter of - historical connection with the subject or with related matters, or - of legal, commercial, philosophical, ethical or political position - regarding them. - - The "Invariant Sections" are certain Secondary Sections whose - titles are designated, as being those of Invariant Sections, in - the notice that says that the Document is released under this - License. If a section does not fit the above definition of - Secondary then it is not allowed to be designated as Invariant. - The Document may contain zero Invariant Sections. If the Document - does not identify any Invariant Sections then there are none. - - The "Cover Texts" are certain short passages of text that are - listed, as Front-Cover Texts or Back-Cover Texts, in the notice - that says that the Document is released under this License. A - Front-Cover Text may be at most 5 words, and a Back-Cover Text may - be at most 25 words. - - A "Transparent" copy of the Document means a machine-readable copy, - represented in a format whose specification is available to the - general public, that is suitable for revising the document - straightforwardly with generic text editors or (for images - composed of pixels) generic paint programs or (for drawings) some - widely available drawing editor, and that is suitable for input to - text formatters or for automatic translation to a variety of - formats suitable for input to text formatters. A copy made in an - otherwise Transparent file format whose markup, or absence of - markup, has been arranged to thwart or discourage subsequent - modification by readers is not Transparent. An image format is - not Transparent if used for any substantial amount of text. A - copy that is not "Transparent" is called "Opaque". - - Examples of suitable formats for Transparent copies include plain - ASCII without markup, Texinfo input format, LaTeX input format, - SGML or XML using a publicly available DTD, and - standard-conforming simple HTML, PostScript or PDF designed for - human modification. Examples of transparent image formats include - PNG, XCF and JPG. Opaque formats include proprietary formats that - can be read and edited only by proprietary word processors, SGML or - XML for which the DTD and/or processing tools are not generally - available, and the machine-generated HTML, PostScript or PDF - produced by some word processors for output purposes only. - - The "Title Page" means, for a printed book, the title page itself, - plus such following pages as are needed to hold, legibly, the - material this License requires to appear in the title page. For - works in formats which do not have any title page as such, "Title - Page" means the text near the most prominent appearance of the - work's title, preceding the beginning of the body of the text. - - A section "Entitled XYZ" means a named subunit of the Document - whose title either is precisely XYZ or contains XYZ in parentheses - following text that translates XYZ in another language. (Here XYZ - stands for a specific section name mentioned below, such as - "Acknowledgements", "Dedications", "Endorsements", or "History".) - To "Preserve the Title" of such a section when you modify the - Document means that it remains a section "Entitled XYZ" according - to this definition. - - The Document may include Warranty Disclaimers next to the notice - which states that this License applies to the Document. These - Warranty Disclaimers are considered to be included by reference in - this License, but only as regards disclaiming warranties: any other - implication that these Warranty Disclaimers may have is void and - has no effect on the meaning of this License. - - 2. VERBATIM COPYING - - You may copy and distribute the Document in any medium, either - commercially or noncommercially, provided that this License, the - copyright notices, and the license notice saying this License - applies to the Document are reproduced in all copies, and that you - add no other conditions whatsoever to those of this License. You - may not use technical measures to obstruct or control the reading - or further copying of the copies you make or distribute. However, - you may accept compensation in exchange for copies. If you - distribute a large enough number of copies you must also follow - the conditions in section 3. - - You may also lend copies, under the same conditions stated above, - and you may publicly display copies. - - 3. COPYING IN QUANTITY - - If you publish printed copies (or copies in media that commonly - have printed covers) of the Document, numbering more than 100, and - the Document's license notice requires Cover Texts, you must - enclose the copies in covers that carry, clearly and legibly, all - these Cover Texts: Front-Cover Texts on the front cover, and - Back-Cover Texts on the back cover. Both covers must also clearly - and legibly identify you as the publisher of these copies. The - front cover must present the full title with all words of the - title equally prominent and visible. You may add other material - on the covers in addition. Copying with changes limited to the - covers, as long as they preserve the title of the Document and - satisfy these conditions, can be treated as verbatim copying in - other respects. - - If the required texts for either cover are too voluminous to fit - legibly, you should put the first ones listed (as many as fit - reasonably) on the actual cover, and continue the rest onto - adjacent pages. - - If you publish or distribute Opaque copies of the Document - numbering more than 100, you must either include a - machine-readable Transparent copy along with each Opaque copy, or - state in or with each Opaque copy a computer-network location from - which the general network-using public has access to download - using public-standard network protocols a complete Transparent - copy of the Document, free of added material. If you use the - latter option, you must take reasonably prudent steps, when you - begin distribution of Opaque copies in quantity, to ensure that - this Transparent copy will remain thus accessible at the stated - location until at least one year after the last time you - distribute an Opaque copy (directly or through your agents or - retailers) of that edition to the public. - - It is requested, but not required, that you contact the authors of - the Document well before redistributing any large number of - copies, to give them a chance to provide you with an updated - version of the Document. - - 4. MODIFICATIONS - - You may copy and distribute a Modified Version of the Document - under the conditions of sections 2 and 3 above, provided that you - release the Modified Version under precisely this License, with - the Modified Version filling the role of the Document, thus - licensing distribution and modification of the Modified Version to - whoever possesses a copy of it. In addition, you must do these - things in the Modified Version: - - A. Use in the Title Page (and on the covers, if any) a title - distinct from that of the Document, and from those of - previous versions (which should, if there were any, be listed - in the History section of the Document). You may use the - same title as a previous version if the original publisher of - that version gives permission. - - B. List on the Title Page, as authors, one or more persons or - entities responsible for authorship of the modifications in - the Modified Version, together with at least five of the - principal authors of the Document (all of its principal - authors, if it has fewer than five), unless they release you - from this requirement. - - C. State on the Title page the name of the publisher of the - Modified Version, as the publisher. - - D. Preserve all the copyright notices of the Document. - - E. Add an appropriate copyright notice for your modifications - adjacent to the other copyright notices. - - F. Include, immediately after the copyright notices, a license - notice giving the public permission to use the Modified - Version under the terms of this License, in the form shown in - the Addendum below. - - G. Preserve in that license notice the full lists of Invariant - Sections and required Cover Texts given in the Document's - license notice. - - H. Include an unaltered copy of this License. - - I. Preserve the section Entitled "History", Preserve its Title, - and add to it an item stating at least the title, year, new - authors, and publisher of the Modified Version as given on - the Title Page. If there is no section Entitled "History" in - the Document, create one stating the title, year, authors, - and publisher of the Document as given on its Title Page, - then add an item describing the Modified Version as stated in - the previous sentence. - - J. Preserve the network location, if any, given in the Document - for public access to a Transparent copy of the Document, and - likewise the network locations given in the Document for - previous versions it was based on. These may be placed in - the "History" section. You may omit a network location for a - work that was published at least four years before the - Document itself, or if the original publisher of the version - it refers to gives permission. - - K. For any section Entitled "Acknowledgements" or "Dedications", - Preserve the Title of the section, and preserve in the - section all the substance and tone of each of the contributor - acknowledgements and/or dedications given therein. - - L. Preserve all the Invariant Sections of the Document, - unaltered in their text and in their titles. Section numbers - or the equivalent are not considered part of the section - titles. - - M. Delete any section Entitled "Endorsements". Such a section - may not be included in the Modified Version. - - N. Do not retitle any existing section to be Entitled - "Endorsements" or to conflict in title with any Invariant - Section. - - O. Preserve any Warranty Disclaimers. - - If the Modified Version includes new front-matter sections or - appendices that qualify as Secondary Sections and contain no - material copied from the Document, you may at your option - designate some or all of these sections as invariant. To do this, - add their titles to the list of Invariant Sections in the Modified - Version's license notice. These titles must be distinct from any - other section titles. - - You may add a section Entitled "Endorsements", provided it contains - nothing but endorsements of your Modified Version by various - parties--for example, statements of peer review or that the text - has been approved by an organization as the authoritative - definition of a standard. - - You may add a passage of up to five words as a Front-Cover Text, - and a passage of up to 25 words as a Back-Cover Text, to the end - of the list of Cover Texts in the Modified Version. Only one - passage of Front-Cover Text and one of Back-Cover Text may be - added by (or through arrangements made by) any one entity. If the - Document already includes a cover text for the same cover, - previously added by you or by arrangement made by the same entity - you are acting on behalf of, you may not add another; but you may - replace the old one, on explicit permission from the previous - publisher that added the old one. - - The author(s) and publisher(s) of the Document do not by this - License give permission to use their names for publicity for or to - assert or imply endorsement of any Modified Version. - - 5. COMBINING DOCUMENTS - - You may combine the Document with other documents released under - this License, under the terms defined in section 4 above for - modified versions, provided that you include in the combination - all of the Invariant Sections of all of the original documents, - unmodified, and list them all as Invariant Sections of your - combined work in its license notice, and that you preserve all - their Warranty Disclaimers. - - The combined work need only contain one copy of this License, and - multiple identical Invariant Sections may be replaced with a single - copy. If there are multiple Invariant Sections with the same name - but different contents, make the title of each such section unique - by adding at the end of it, in parentheses, the name of the - original author or publisher of that section if known, or else a - unique number. Make the same adjustment to the section titles in - the list of Invariant Sections in the license notice of the - combined work. - - In the combination, you must combine any sections Entitled - "History" in the various original documents, forming one section - Entitled "History"; likewise combine any sections Entitled - "Acknowledgements", and any sections Entitled "Dedications". You - must delete all sections Entitled "Endorsements." - - 6. COLLECTIONS OF DOCUMENTS - - You may make a collection consisting of the Document and other - documents released under this License, and replace the individual - copies of this License in the various documents with a single copy - that is included in the collection, provided that you follow the - rules of this License for verbatim copying of each of the - documents in all other respects. - - You may extract a single document from such a collection, and - distribute it individually under this License, provided you insert - a copy of this License into the extracted document, and follow - this License in all other respects regarding verbatim copying of - that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - - A compilation of the Document or its derivatives with other - separate and independent documents or works, in or on a volume of - a storage or distribution medium, is called an "aggregate" if the - copyright resulting from the compilation is not used to limit the - legal rights of the compilation's users beyond what the individual - works permit. When the Document is included an aggregate, this - License does not apply to the other works in the aggregate which - are not themselves derivative works of the Document. - - If the Cover Text requirement of section 3 is applicable to these - copies of the Document, then if the Document is less than one half - of the entire aggregate, the Document's Cover Texts may be placed - on covers that bracket the Document within the aggregate, or the - electronic equivalent of covers if the Document is in electronic - form. Otherwise they must appear on printed covers that bracket - the whole aggregate. - - 8. TRANSLATION - - Translation is considered a kind of modification, so you may - distribute translations of the Document under the terms of section - 4. Replacing Invariant Sections with translations requires special - permission from their copyright holders, but you may include - translations of some or all Invariant Sections in addition to the - original versions of these Invariant Sections. You may include a - translation of this License, and all the license notices in the - Document, and any Warrany Disclaimers, provided that you also - include the original English version of this License and the - original versions of those notices and disclaimers. In case of a - disagreement between the translation and the original version of - this License or a notice or disclaimer, the original version will - prevail. - - If a section in the Document is Entitled "Acknowledgements", - "Dedications", or "History", the requirement (section 4) to - Preserve its Title (section 1) will typically require changing the - actual title. - - 9. TERMINATION - - You may not copy, modify, sublicense, or distribute the Document - except as expressly provided for under this License. Any other - attempt to copy, modify, sublicense or distribute the Document is - void, and will automatically terminate your rights under this - License. However, parties who have received copies, or rights, - from you under this License will not have their licenses - terminated so long as such parties remain in full compliance. - - 10. FUTURE REVISIONS OF THIS LICENSE - - The Free Software Foundation may publish new, revised versions of - the GNU Free Documentation License from time to time. Such new - versions will be similar in spirit to the present version, but may - differ in detail to address new problems or concerns. See - `http://www.gnu.org/copyleft/'. - - Each version of the License is given a distinguishing version - number. If the Document specifies that a particular numbered - version of this License "or any later version" applies to it, you - have the option of following the terms and conditions either of - that specified version or of any later version that has been - published (not as a draft) by the Free Software Foundation. If - the Document does not specify a version number of this License, - you may choose any version ever published (not as a draft) by the - Free Software Foundation. - - ADDENDUM: How to use this License for your documents - ==================================================== - - To use this License in a document you have written, include a copy of - the License in the document and put the following copyright and license - notices just after the title page: - - Copyright (C) YEAR YOUR NAME. - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.2 - or any later version published by the Free Software Foundation; - with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. - A copy of the license is included in the section entitled ``GNU - Free Documentation License''. - - If you have Invariant Sections, Front-Cover Texts and Back-Cover - Texts, replace the "with...Texts." line with this: - - with the Invariant Sections being LIST THEIR TITLES, with - the Front-Cover Texts being LIST, and with the Back-Cover Texts - being LIST. - - If you have Invariant Sections without Cover Texts, or some other - combination of the three, merge those two alternatives to suit the - situation. - - If your document contains nontrivial examples of program code, we - recommend releasing these examples in parallel under your choice of - free software license, such as the GNU General Public License, to - permit their use in free software. - -  - File: gcj.info, Node: Invoking gcj, Next: Compatibility, Prev: GNU Free Documentation License, Up: Top - - Invoking gcj - ************ - - As `gcj' is just another front end to `gcc', it supports many of the - same options as gcc. *Note Option Summary: (gcc)Option Summary. This - manual only documents the options specific to `gcj'. - - * Menu: - - * Input and output files:: - * Input Options:: How gcj finds files - * Encodings:: Options controlling source file encoding - * Warnings:: Options controlling warnings specific to gcj - * Code Generation:: Options controlling the output of gcj - * Configure-time Options:: Options you won't use - -  - File: gcj.info, Node: Input and output files, Next: Input Options, Up: Invoking gcj - - Input and output files - ====================== - - A `gcj' command is like a `gcc' command, in that it consists of a - number of options and file names. The following kinds of input file - names are supported: - - `FILE.java' - Java source files. - - `FILE.class' - Java bytecode files. - - `FILE.zip' - `FILE.jar' - An archive containing one or more `.class' files, all of which are - compiled. The archive may be compressed. - - `@FILE' - A file containing a whitespace-separated list of input file names. - (Currently, these must all be `.java' source files, but that may - change.) Each named file is compiled, just as if it had been on - the command line. - - `LIBRARY.a' - `LIBRARY.so' - `-lLIBNAME' - Libraries to use when linking. See the `gcc' manual. - - You can specify more than one input file on the `gcj' command line, - in which case they will all be compiled. If you specify a `-o FILENAME' - option, all the input files will be compiled together, producing a - single output file, named FILENAME. This is allowed even when using - `-S' or `-c', but not when using `-C' or `--resource'. (This is an - extension beyond the what plain `gcc' allows.) (If more than one input - file is specified, all must currently be `.java' files, though we hope - to fix this.) - -  - File: gcj.info, Node: Input Options, Next: Encodings, Prev: Input and output files, Up: Invoking gcj - - Input Options - ============= - - `gcj' has options to control where it looks to find files it needs. - For instance, `gcj' might need to load a class that is referenced by - the file it has been asked to compile. Like other compilers for the - Java language, `gcj' has a notion of a "class path". There are several - options and environment variables which can be used to manipulate the - class path. When `gcj' looks for a given class, it searches the class - path looking for matching `.class' or `.java' file. `gcj' comes with a - built-in class path which points at the installed `libgcj.jar', a file - which contains all the standard classes. - - In the below, a directory or path component can refer either to an - actual directory on the filesystem, or to a `.zip' or `.jar' file, - which `gcj' will search as if it is a directory. - - `-IDIR' - All directories specified by `-I' are kept in order and prepended - to the class path constructed from all the other options. Unless - compatibility with tools like `javac' is important, we recommend - always using `-I' instead of the other options for manipulating the - class path. - - `--classpath=PATH' - This sets the class path to PATH, a colon-separated list of paths - (on Windows-based systems, a semicolon-separate list of paths). - This does not override the builtin ("boot") search path. - - `--CLASSPATH=PATH' - Deprecated synonym for `--classpath'. - - `--bootclasspath=PATH' - Where to find the standard builtin classes, such as - `java.lang.String'. - - `--extdirs=PATH' - For each directory in the PATH, place the contents of that - directory at the end of the class path. - - `CLASSPATH' - This is an environment variable which holds a list of paths. - - The final class path is constructed like so: - - * First come all directories specified via `-I'. - - * If `--classpath' is specified, its value is appended. Otherwise, - if the `CLASSPATH' environment variable is specified, then its - value is appended. Otherwise, the current directory (`"."') is - appended. - - * If `--bootclasspath' was specified, append its value. Otherwise, - append the built-in system directory, `libgcj.jar'. - - * Finally, if `--extdirs' was specified, append the contents of the - specified directories at the end of the class path. Otherwise, - append the contents of the built-in extdirs at - `$(prefix)/share/java/ext'. - - The classfile built by `gcj' for the class `java.lang.Object' (and - placed in `libgcj.jar') contains a special zero length attribute - `gnu.gcj.gcj-compiled'. The compiler looks for this attribute when - loading `java.lang.Object' and will report an error if it isn't found, - unless it compiles to bytecode (the option - `-fforce-classes-archive-check' can be used to override this behavior - in this particular case.) - - `-fforce-classes-archive-check' - This forces the compiler to always check for the special zero - length attribute `gnu.gcj.gcj-compiled' in `java.lang.Object' and - issue an error if it isn't found. - -  - File: gcj.info, Node: Encodings, Next: Warnings, Prev: Input Options, Up: Invoking gcj - - Encodings - ========= - - The Java programming language uses Unicode throughout. In an effort to - integrate well with other locales, `gcj' allows `.java' files to be - written using almost any encoding. `gcj' knows how to convert these - encodings into its internal encoding at compile time. - - You can use the `--encoding=NAME' option to specify an encoding (of - a particular character set) to use for source files. If this is not - specified, the default encoding comes from your current locale. If - your host system has insufficient locale support, then `gcj' assumes - the default encoding to be the `UTF-8' encoding of Unicode. - - To implement `--encoding', `gcj' simply uses the host platform's - `iconv' conversion routine. This means that in practice `gcj' is - limited by the capabilities of the host platform. - - The names allowed for the argument `--encoding' vary from platform - to platform (since they are not standardized anywhere). However, `gcj' - implements the encoding named `UTF-8' internally, so if you choose to - use this for your source files you can be assured that it will work on - every host. - -  - File: gcj.info, Node: Warnings, Next: Code Generation, Prev: Encodings, Up: Invoking gcj - - Warnings - ======== - - `gcj' implements several warnings. As with other generic `gcc' - warnings, if an option of the form `-Wfoo' enables a warning, then - `-Wno-foo' will disable it. Here we've chosen to document the form of - the warning which will have an effect - the default being the opposite - of what is listed. - - `-Wredundant-modifiers' - With this flag, `gcj' will warn about redundant modifiers. For - instance, it will warn if an interface method is declared `public'. - - `-Wextraneous-semicolon' - This causes `gcj' to warn about empty statements. Empty statements - have been deprecated. - - `-Wno-out-of-date' - This option will cause `gcj' not to warn when a source file is - newer than its matching class file. By default `gcj' will warn - about this. - - `-Wunused' - This is the same as `gcc''s `-Wunused'. - - `-Wall' - This is the same as `-Wredundant-modifiers -Wextraneous-semicolon - -Wunused'. - -  - File: gcj.info, Node: Code Generation, Next: Configure-time Options, Prev: Warnings, Up: Invoking gcj - - Code Generation - =============== - - In addition to the many `gcc' options controlling code generation, - `gcj' has several options specific to itself. - - `--main=CLASSNAME' - This option is used when linking to specify the name of the class - whose `main' method should be invoked when the resulting - executable is run. (1) - - `-DNAME[=VALUE]' - This option can only be used with `--main'. It defines a system - property named NAME with value VALUE. If VALUE is not specified - then it defaults to the empty string. These system properties are - initialized at the program's startup and can be retrieved at - runtime using the `java.lang.System.getProperty' method. - - `-C' - This option is used to tell `gcj' to generate bytecode (`.class' - files) rather than object code. - - `--resource RESOURCE-NAME' - This option is used to tell `gcj' to compile the contents of a - given file to object code so it may be accessed at runtime with - the core protocol handler as `core:/RESOURCE-NAME'. Note that - RESOURCE-NAME is the name of the resource as found at runtime; for - instance, it could be used in a call to `ResourceBundle.getBundle'. - The actual file name to be compiled this way must be specified - separately. - - `-d DIRECTORY' - When used with `-C', this causes all generated `.class' files to - be put in the appropriate subdirectory of DIRECTORY. By default - they will be put in subdirectories of the current working - directory. - - `-fno-bounds-check' - By default, `gcj' generates code which checks the bounds of all - array indexing operations. With this option, these checks are - omitted, which can improve performance for code that uses arrays - extensively. Note that this can result in unpredictable behavior - if the code in question actually does violate array bounds - constraints. It is safe to use this option if you are sure that - your code will never throw an `ArrayIndexOutOfBoundsException'. - - `-fno-store-check' - Don't generate array store checks. When storing objects into - arrays, a runtime check is normally generated in order to ensure - that the object is assignment compatible with the component type - of the array (which may not be known at compile-time). With this - option, these checks are omitted. This can improve performance - for code which stores objects into arrays frequently. It is safe - to use this option if you are sure your code will never throw an - `ArrayStoreException'. - - `-fjni' - With `gcj' there are two options for writing native methods: CNI - and JNI. By default `gcj' assumes you are using CNI. If you are - compiling a class with native methods, and these methods are - implemented using JNI, then you must use `-fjni'. This option - causes `gcj' to generate stubs which will invoke the underlying JNI - methods. - - `-fno-assert' - Don't recognize the `assert' keyword. This is for compatibility - with older versions of the language specification. - - `-fno-optimize-static-class-initialization' - When the optimization level is greater or equal to `-O2', `gcj' - will try to optimize the way calls into the runtime are made to - initialize static classes upon their first use (this optimization - isn't carried out if `-C' was specified.) When compiling to native - code, `-fno-optimize-static-class-initialization' will turn this - optimization off, regardless of the optimization level in use. - - ---------- Footnotes ---------- - - (1) The linker by default looks for a global function named `main'. - Since Java does not have global functions, and a collection of Java - classes may have more than one class with a `main' method, you need to - let the linker know which of those `main' methods it should invoke when - starting the application. - -  - File: gcj.info, Node: Configure-time Options, Prev: Code Generation, Up: Invoking gcj - - Configure-time Options - ====================== - - Some `gcj' code generations options affect the resulting ABI, and so - can only be meaningfully given when `libgcj', the runtime package, is - configured. `libgcj' puts the appropriate options from this group into - a `spec' file which is read by `gcj'. These options are listed here - for completeness; if you are using `libgcj' then you won't want to - touch these options. - - `-fuse-boehm-gc' - This enables the use of the Boehm GC bitmap marking code. In - particular this causes `gcj' to put an object marking descriptor - into each vtable. - - `-fhash-synchronization' - By default, synchronization data (the data used for `synchronize', - `wait', and `notify') is pointed to by a word in each object. - With this option `gcj' assumes that this information is stored in a - hash table and not in the object itself. - - `-fuse-divide-subroutine' - On some systems, a library routine is called to perform integer - division. This is required to get exception handling correct when - dividing by zero. - - `-fcheck-references' - On some systems it's necessary to insert inline checks whenever - accessing an object via a reference. On other systems you won't - need this because null pointer accesses are caught automatically - by the processor. - -  - File: gcj.info, Node: Compatibility, Next: Invoking gcjh, Prev: Invoking gcj, Up: Top - - Compatibility with the Java Platform - ************************************ - - As we believe it is important that the Java platform not be fragmented, - `gcj' and `libgcj' try to conform to the relevant Java specifications. - However, limited manpower and incomplete and unclear documentation work - against us. So, there are caveats to using `gcj'. - - * Menu: - - * Limitations:: - * Extensions:: - -  - File: gcj.info, Node: Limitations, Next: Extensions, Up: Compatibility - - Standard features not yet supported - =================================== - - This list of compatibility issues is by no means complete. - - * `gcj' implements the JDK 1.2 language. It supports inner classes - and the new 1.4 `assert' keyword. It does not yet support the - Java 2 `strictfp' keyword (it recognizes the keyword but ignores - it). - - * `libgcj' is largely compatible with the JDK 1.2 libraries. - However, `libgcj' is missing many packages, most notably - `java.awt'. There are also individual missing classes and methods. - We currently do not have a list showing differences between - `libgcj' and the Java 2 platform. - - * Sometimes the `libgcj' implementation of a method or class differs - from the JDK implementation. This is not always a bug. Still, if - it affects you, it probably makes sense to report it so that we - can discuss the appropriate response. - - * `gcj' does not currently allow for piecemeal replacement of - components within `libgcj'. Unfortunately, programmers often want - to use newer versions of certain packages, such as those provided - by the Apache Software Foundation's Jakarta project. This has - forced us to place the `org.w3c.dom' and `org.xml.sax' packages - into their own libraries, separate from `libgcj'. If you intend to - use these classes, you must link them explicitly with - `-l-org-w3c-dom' and `-l-org-xml-sax'. Future versions of `gcj' - may not have this restriction. - -  - File: gcj.info, Node: Extensions, Prev: Limitations, Up: Compatibility - - Extra features unique to gcj - ============================ - - The main feature of `gcj' is that it can compile programs written in - the Java programming language to native code. Most extensions that - have been added are to facilitate this functionality. - - * `gcj' makes it easy and efficient to mix code written in Java and - C++. *Note About CNI::, for more info on how to use this in your - programs. - - * When you compile your classes into a shared library they can be - automatically loaded by the `libgcj' system classloader. When - trying to load a class `gnu.pkg.SomeClass' the system classloader - will first try to load the shared library - `lib-gnu-pkg-SomeClass.so', if that fails to load the class then - it will try to load `lib-gnu-pkg.so' and finally when the class is - still not loaded it will try to load `lib-gnu.so'. Note that all - `.'s will be transformed into `-'s and that searching for inner - classes starts with their outermost outer class. If the class - cannot be found this way the system classloader tries to use the - `libgcj' bytecode interpreter to load the class from the standard - classpath. - -  - File: gcj.info, Node: Invoking gcjh, Next: Invoking jv-scan, Prev: Compatibility, Up: Top - - Invoking gcjh - ************* - - The `gcjh' program is used to generate header files from class files. - It can generate both CNI and JNI header files, as well as stub - implementation files which can be used as a basis for implementing the - required native methods. - - `-stubs' - This causes `gcjh' to generate stub files instead of header files. - By default the stub file will be named after the class, with a - suffix of `.cc'. In JNI mode, the default output file will have - the suffix `.c'. - - `-jni' - This tells `gcjh' to generate a JNI header or stub. By default, - CNI headers are generated. - - `-add TEXT' - Inserts TEXT into the class body. This is ignored in JNI mode. - - `-append TEXT' - Inserts TEXT into the header file after the class declaration. - This is ignored in JNI mode. - - `-friend TEXT' - Inserts TEXT into the class as a `friend' declaration. This is - ignored in JNI mode. - - `-prepend TEXT' - Inserts TEXT into the header file before the class declaration. - This is ignored in JNI mode. - - `--classpath=PATH' - `--CLASSPATH=PATH' - `-IDIRECTORY' - `-d DIRECTORY' - `-o FILE' - These options are all identical to the corresponding `gcj' options. - - `-o FILE' - Sets the output file name. This cannot be used if there is more - than one class on the command line. - - `-td DIRECTORY' - Sets the name of the directory to use for temporary files. - - `-M' - Print all dependencies to stdout; suppress ordinary output. - - `-MM' - Print non-system dependencies to stdout; suppress ordinary output. - - `-MD' - Print all dependencies to stdout. - - `-MMD' - Print non-system dependencies to stdout. - - `--help' - Print help about `gcjh' and exit. No further processing is done. - - `--version' - Print version information for `gcjh' and exit. No further - processing is done. - - `-v, --verbose' - Print extra information while running. - - All remaining options are considered to be names of classes. - -  - File: gcj.info, Node: Invoking jv-scan, Next: Invoking jcf-dump, Prev: Invoking gcjh, Up: Top - - Invoking jv-scan - **************** - - The `jv-scan' program can be used to print information about a Java - source file (`.java' file). - - `--no-assert' - Don't recognize the `assert' keyword, for backwards compatibility - with older versions of the language specification. - - `--complexity' - This prints a complexity measure, related to cyclomatic - complexity, for each input file. - - `--encoding=NAME' - This works like the corresponding `gcj' option. - - `--print-main' - This prints the name of the class in this file containing a `main' - method. - - `--list-class' - This lists the names of all classes defined in the input files. - - `--list-filename' - If `--list-class' is given, this option causes `jv-scan' to also - print the name of the file in which each class was found. - - `-o FILE' - Print output to the named file. - - `--help' - Print help, then exit. - - `--version' - Print version number, then exit. - -  - File: gcj.info, Node: Invoking jcf-dump, Next: Invoking gij, Prev: Invoking jv-scan, Up: Top - - Invoking jcf-dump - ***************** - - This is a class file examiner, similar to `javap'. It will print - information about a number of classes, which are specified by class name - or file name. - - `-c' - Disassemble method bodies. By default method bodies are not - printed. - - `--javap' - Generate output in `javap' format. The implementation of this - feature is very incomplete. - - `--classpath=PATH' - `--CLASSPATH=PATH' - `-IDIRECTORY' - `-o FILE' - These options as the same as the corresponding `gcj' options. - - `--help' - Print help, then exit. - - `--version' - Print version number, then exit. - - `-v, --verbose' - Print extra information while running. - -  - File: gcj.info, Node: Invoking gij, Next: Invoking jv-convert, Prev: Invoking jcf-dump, Up: Top - - Invoking gij - ************ - - `gij' is a Java bytecode interpreter included with `libgcj'. `gij' is - not available on every platform; porting it requires a small amount of - assembly programming which has not been done for all the targets - supported by `gcj'. - - The primary argument to `gij' is the name of a class or, with - `-jar', a jar file. Options before this argument are interpreted by - `gij'; remaining options are passed to the interpreted program. - - If a class name is specified and this class does not have a `main' - method with the appropriate signature (a `static void' method with a - `String[]' as its sole argument), then `gij' will print an error and - exit. - - If a jar file is specified then `gij' will use information in it to - determine which class' `main' method will be invoked. - - `gij' will invoke the `main' method with all the remaining - command-line options. - - Note that `gij' is not limited to interpreting code. Because - `libgcj' includes a class loader which can dynamically load shared - objects, it is possible to give `gij' the name of a class which has - been compiled and put into a shared library on the class path. - - `-cp PATH' - `-classpath PATH' - Set the initial class path. The class path is used for finding - class and resource files. If specified, this option overrides the - `CLASSPATH' environment variable. Note that this option is - ignored if `-jar' is used. - - `-DNAME[=VALUE]' - This defines a system property named NAME with value VALUE. If - VALUE is not specified then it defaults to the empty string. - These system properties are initialized at the program's startup - and can be retrieved at runtime using the - `java.lang.System.getProperty' method. - - `-ms=NUMBER' - This sets the initial heap size. - - `-mx=NUMBER' - This sets the maximum heap size. - - `-jar' - This indicates that the name passed to `gij' should be interpreted - as the name of a jar file, not a class. - - `--help' - Print help, then exit. - - `--showversion' - Print version number and continue. - - `--version' - Print version number, then exit. - -  - File: gcj.info, Node: Invoking jv-convert, Next: Invoking rmic, Prev: Invoking gij, Up: Top - - Invoking jv-convert - ******************* - - `jv-convert' [`OPTION'] ... [INPUTFILE [OUTPUTFILE]] - - `jv-convert' is a utility included with `libgcj' which converts a - file from one encoding to another. It is similar to the Unix `iconv' - utility. - - The encodings supported by `jv-convert' are platform-dependent. - Currently there is no way to get a list of all supported encodings. - - `--encoding NAME' - `--from NAME' - Use NAME as the input encoding. The default is the current - locale's encoding. - - `--to NAME' - Use NAME as the output encoding. The default is the `JavaSrc' - encoding; this is ASCII with `\u' escapes for non-ASCII characters. - - `-i FILE' - Read from FILE. The default is to read from standard input. - - `-o FILE' - Write to FILE. The default is to write to standard output. - - `--reverse' - Swap the input and output encodings. - - `--help' - Print a help message, then exit. - - `--version' - Print version information, then exit. - -  - File: gcj.info, Node: Invoking rmic, Next: Invoking rmiregistry, Prev: Invoking jv-convert, Up: Top - - Invoking rmic - ************* - - `rmic' [`OPTION'] ... CLASS ... - - `rmic' is a utility included with `libgcj' which generates stubs for - remote objects. - - Note that this program isn't yet fully compatible with the JDK - `rmic'. Some options, such as `-classpath', are recognized but - currently ignored. We have left these options undocumented for now. - - Long options can also be given with a GNU-style leading `--'. For - instance, `--help' is accepted. - - `-keep' - `-keepgenerated' - By default, `rmic' deletes intermediate files. Either of these - options causes it not to delete such files. - - `-v1.1' - Cause `rmic' to create stubs and skeletons for the 1.1 protocol - version. - - `-vcompat' - Cause `rmic' to create stubs and skeletons compatible with both - the 1.1 and 1.2 protocol versions. This is the default. - - `-v1.2' - Cause `rmic' to create stubs and skeletons for the 1.2 protocol - version. - - `-nocompile' - Don't compile the generated files. - - `-verbose' - Print information about what `rmic' is doing. - - `-d DIRECTORY' - Put output files in DIRECTORY. By default the files are put in - the current working directory. - - `-help' - Print a help message, then exit. - - `-version' - Print version information, then exit. - -  - File: gcj.info, Node: Invoking rmiregistry, Next: About CNI, Prev: Invoking rmic, Up: Top - - Invoking rmiregistry - ******************** - - `rmic' [`OPTION'] ... [PORT] - - `rmiregistry' starts a remote object registry on the current host. - If no port number is specified, then port 1099 is used. - - `--help' - Print a help message, then exit. - - `--version' - Print version information, then exit. - -  - File: gcj.info, Node: About CNI, Next: System properties, Prev: Invoking rmiregistry, Up: Top - - About CNI - ********* - - This documents CNI, the Cygnus Native Interface, which is is a - convenient way to write Java native methods using C++. This is a more - efficient, more convenient, but less portable alternative to the - standard JNI (Java Native Interface). - - * Menu: - - * Basic concepts:: Introduction to using CNI. - * Packages:: How packages are mapped to C++. - * Primitive types:: Handling Java types in C++. - * Interfaces:: How Java interfaces map to C++. - * Objects and Classes:: C++ and Java classes. - * Class Initialization:: How objects are initialized. - * Object allocation:: How to create Java objects in C++. - * Arrays:: Dealing with Java arrays in C++. - * Methods:: Java methods in C++. - * Strings:: Information about Java Strings. - * Mixing with C++:: How CNI can interoperate with C++. - * Exception Handling:: How exceptions are handled. - * Synchronization:: Synchronizing between Java and C++. - * Invocation:: Starting the Java runtime from C++. - * Reflection:: Using reflection from C++. - -  - File: gcj.info, Node: Basic concepts, Next: Packages, Up: About CNI - - Basic concepts - ============== - - In terms of languages features, Java is mostly a subset of C++. Java - has a few important extensions, plus a powerful standard class library, - but on the whole that does not change the basic similarity. Java is a - hybrid object-oriented language, with a few native types, in addition - to class types. It is class-based, where a class may have static as - well as per-object fields, and static as well as instance methods. - Non-static methods may be virtual, and may be overloaded. Overloading - is resolved at compile time by matching the actual argument types - against the parameter types. Virtual methods are implemented using - indirect calls through a dispatch table (virtual function table). - Objects are allocated on the heap, and initialized using a constructor - method. Classes are organized in a package hierarchy. - - All of the listed attributes are also true of C++, though C++ has - extra features (for example in C++ objects may be allocated not just on - the heap, but also statically or in a local stack frame). Because - `gcj' uses the same compiler technology as G++ (the GNU C++ compiler), - it is possible to make the intersection of the two languages use the - same ABI (object representation and calling conventions). The key idea - in CNI is that Java objects are C++ objects, and all Java classes are - C++ classes (but not the other way around). So the most important task - in integrating Java and C++ is to remove gratuitous incompatibilities. - - You write CNI code as a regular C++ source file. (You do have to use - a Java/CNI-aware C++ compiler, specifically a recent version of G++.) - - A CNI C++ source file must have: - - #include - - and then must include one header file for each Java class it uses, e.g.: - - #include - #include - #include - - These header files are automatically generated by `gcjh'. - - CNI provides some functions and macros to make using Java objects and - primitive types from C++ easier. In general, these CNI functions and - macros start with the `Jv' prefix, for example the function - `JvNewObjectArray'. This convention is used to avoid conflicts with - other libraries. Internal functions in CNI start with the prefix - `_Jv_'. You should not call these; if you find a need to, let us know - and we will try to come up with an alternate solution. (This manual - lists `_Jv_AllocBytes' as an example; CNI should instead provide a - `JvAllocBytes' function.) - - Limitations - ----------- - - Whilst a Java class is just a C++ class that doesn't mean that you are - freed from the shackles of Java, a CNI C++ class must adhere to the - rules of the Java programming language. - - For example: it is not possible to declare a method in a CNI class - that will take a C string (`char*') as an argument, or to declare a - member variable of some non-Java datatype. - -  - File: gcj.info, Node: Packages, Next: Primitive types, Prev: Basic concepts, Up: About CNI - - Packages - ======== - - The only global names in Java are class names, and packages. A - "package" can contain zero or more classes, and also zero or more - sub-packages. Every class belongs to either an unnamed package or a - package that has a hierarchical and globally unique name. - - A Java package is mapped to a C++ "namespace". The Java class - `java.lang.String' is in the package `java.lang', which is a - sub-package of `java'. The C++ equivalent is the class - `java::lang::String', which is in the namespace `java::lang' which is - in the namespace `java'. - - Here is how you could express this: - - (// Declare the class(es), possibly in a header file: - namespace java { - namespace lang { - class Object; - class String; - ... - } - } - - class java::lang::String : public java::lang::Object - { - ... - }; - - The `gcjh' tool automatically generates the necessary namespace - declarations. - - Leaving out package names - ------------------------- - - Always using the fully-qualified name of a java class can be tiresomely - verbose. Using the full qualified name also ties the code to a single - package making code changes necessary should the class move from one - package to another. The Java `package' declaration specifies that the - following class declarations are in the named package, without having - to explicitly name the full package qualifiers. The `package' - declaration can be followed by zero or more `import' declarations, which - allows either a single class or all the classes in a package to be - named by a simple identifier. C++ provides something similar with the - `using' declaration and directive. - - In Java: - - import PACKAGE-NAME.CLASS-NAME; - - allows the program text to refer to CLASS-NAME as a shorthand for the - fully qualified name: `PACKAGE-NAME.CLASS-NAME'. - - To achieve the same effect C++, you have to do this: - - using PACKAGE-NAME::CLASS-NAME; - - Java can also cause imports on demand, like this: - - import PACKAGE-NAME.*; - - Doing this allows any class from the package PACKAGE-NAME to be - referred to only by its class-name within the program text. - - The same effect can be achieved in C++ like this: - - using namespace PACKAGE-NAME; - -  - File: gcj.info, Node: Primitive types, Next: Interfaces, Prev: Packages, Up: About CNI - - Primitive types - =============== - - Java provides 8 "primitives" types which represent integers, floats, - characters and booleans (and also the void type). C++ has its own very - similar concrete types. Such types in C++ however are not always - implemented in the same way (an int might be 16, 32 or 64 bits for - example) so CNI provides a special C++ type for each primitive Java - type: - - *Java type* *C/C++ typename* *Description* - `char' `jchar' 16 bit Unicode character - `boolean' `jboolean' logical (true or false) values - `byte' `jbyte' 8-bit signed integer - `short' `jshort' 16 bit signed integer - `int' `jint' 32 bit signed integer - `long' `jlong' 64 bit signed integer - `float' `jfloat' 32 bit IEEE floating point number - `double' `jdouble' 64 bit IEEE floating point number - `void' `void' no value - - When referring to a Java type You should always use these C++ - typenames (e.g.: `jint') to avoid disappointment. - - Reference types associated with primitive types - ----------------------------------------------- - - In Java each primitive type has an associated reference type, e.g.: - `boolean' has an associated `java.lang.Boolean' class. In order to - make working with such classes easier GCJ provides the macro - `JvPrimClass': - - - macro: JvPrimClass type - Return a pointer to the `Class' object corresponding to the type - supplied. - - JvPrimClass(void) => java.lang.Void.TYPE - - -  - File: gcj.info, Node: Interfaces, Next: Objects and Classes, Prev: Primitive types, Up: About CNI - - Interfaces - ========== - - A Java class can "implement" zero or more "interfaces", in addition to - inheriting from a single base class. - - CNI allows CNI code to implement methods of interfaces. You can - also call methods through interface references, with some limitations. - - CNI doesn't understand interface inheritance at all yet. So, you - can only call an interface method when the declared type of the field - being called matches the interface which declares that method. The - workaround is to cast the interface reference to the right - superinterface. - - For example if you have: - - interface A - { - void a(); - } - - interface B extends A - { - void b(); - } - - and declare a variable of type `B' in C++, you can't call `a()' - unless you cast it to an `A' first. - -  - File: gcj.info, Node: Objects and Classes, Next: Class Initialization, Prev: Interfaces, Up: About CNI - - Objects and Classes - =================== - - Classes - ------- - - All Java classes are derived from `java.lang.Object'. C++ does not - have a unique root class, but we use the C++ class `java::lang::Object' - as the C++ version of the `java.lang.Object' Java class. All other - Java classes are mapped into corresponding C++ classes derived from - `java::lang::Object'. - - Interface inheritance (the `implements' keyword) is currently not - reflected in the C++ mapping. - - Object fields - ------------- - - Each object contains an object header, followed by the instance fields - of the class, in order. The object header consists of a single pointer - to a dispatch or virtual function table. (There may be extra fields - _in front of_ the object, for example for memory management, but this - is invisible to the application, and the reference to the object points - to the dispatch table pointer.) - - The fields are laid out in the same order, alignment, and size as in - C++. Specifically, 8-bite and 16-bit native types (`byte', `short', - `char', and `boolean') are _not_ widened to 32 bits. Note that the - Java VM does extend 8-bit and 16-bit types to 32 bits when on the VM - stack or temporary registers. - - If you include the `gcjh'-generated header for a class, you can - access fields of Java classes in the _natural_ way. For example, given - the following Java class: - - public class Int - { - public int i; - public Integer (int i) { this.i = i; } - public static zero = new Integer(0); - } - - you can write: - - #include ; - #include ; - - Int* - mult (Int *p, jint k) - { - if (k == 0) - return Int::zero; // Static member access. - return new Int(p->i * k); - } - - Access specifiers - ----------------- - - CNI does not strictly enforce the Java access specifiers, because Java - permissions cannot be directly mapped into C++ permission. Private - Java fields and methods are mapped to private C++ fields and methods, - but other fields and methods are mapped to public fields and methods. - -  - File: gcj.info, Node: Class Initialization, Next: Object allocation, Prev: Objects and Classes, Up: About CNI - - Class Initialization - ==================== - - Java requires that each class be automatically initialized at the time - of the first active use. Initializing a class involves initializing - the static fields, running code in class initializer methods, and - initializing base classes. There may also be some implementation - specific actions, such as allocating `String' objects corresponding to - string literals in the code. - - The GCJ compiler inserts calls to `JvInitClass' at appropriate - places to ensure that a class is initialized when required. The C++ - compiler does not insert these calls automatically--it is the - programmer's responsibility to make sure classes are initialized. - However, this is fairly painless because of the conventions assumed by - the Java system. - - First, `libgcj' will make sure a class is initialized before an - instance of that object is created. This is one of the - responsibilities of the `new' operation. This is taken care of both in - Java code, and in C++ code. When G++ sees a `new' of a Java class, it - will call a routine in `libgcj' to allocate the object, and that - routine will take care of initializing the class. Note however that - this does not happen for Java arrays; you must allocate those using the - appropriate CNI function. It follows that you can access an instance - field, or call an instance (non-static) method and be safe in the - knowledge that the class and all of its base classes have been - initialized. - - Invoking a static method is also safe. This is because the Java - compiler adds code to the start of a static method to make sure the - class is initialized. However, the C++ compiler does not add this - extra code. Hence, if you write a native static method using CNI, you - are responsible for calling `JvInitClass' before doing anything else in - the method (unless you are sure it is safe to leave it out). - - Accessing a static field also requires the class of the field to be - initialized. The Java compiler will generate code to call - `Jv_InitClass' before getting or setting the field. However, the C++ - compiler will not generate this extra code, so it is your - responsibility to make sure the class is initialized before you access - a static field from C++. - -  - File: gcj.info, Node: Object allocation, Next: Arrays, Prev: Class Initialization, Up: About CNI - - Object allocation - ================= - - New Java objects are allocated using a "class instance creation - expression", e.g.: - - new TYPE ( ... ) - - The same syntax is used in C++. The main difference is that C++ - objects have to be explicitly deleted; in Java they are automatically - deleted by the garbage collector. Using CNI, you can allocate a new - Java object using standard C++ syntax and the C++ compiler will allocate - memory from the garbage collector. If you have overloaded - constructors, the compiler will choose the correct one using standard - C++ overload resolution rules. - - For example: - - java::util::Hashtable *ht = new java::util::Hashtable(120); - - - Fonction: void* _Jv_AllocBytes (jsize SIZE) - Allocates SIZE bytes from the heap. The memory is not scanned by - the garbage collector but it freed if no references to it are - discovered. - -  - File: gcj.info, Node: Arrays, Next: Methods, Prev: Object allocation, Up: About CNI - - Arrays - ====== - - While in many ways Java is similar to C and C++, it is quite different - in its treatment of arrays. C arrays are based on the idea of pointer - arithmetic, which would be incompatible with Java's security - requirements. Java arrays are true objects (array types inherit from - `java.lang.Object'). An array-valued variable is one that contains a - reference (pointer) to an array object. - - Referencing a Java array in C++ code is done using the `JArray' - template, which as defined as follows: - - class __JArray : public java::lang::Object - { - public: - int length; - }; - - template - class JArray : public __JArray - { - T data[0]; - public: - T& operator[](jint i) { return data[i]; } - }; - - There are a number of `typedef's which correspond to `typedef's from - the JNI. Each is the type of an array holding objects of the relevant - type: - - typedef __JArray *jarray; - typedef JArray *jobjectArray; - typedef JArray *jbooleanArray; - typedef JArray *jbyteArray; - typedef JArray *jcharArray; - typedef JArray *jshortArray; - typedef JArray *jintArray; - typedef JArray *jlongArray; - typedef JArray *jfloatArray; - typedef JArray *jdoubleArray; - - - Méthode sur template: T* elements (JArray ARRAY) - This template function can be used to get a pointer to the - elements of the `array'. For instance, you can fetch a pointer to - the integers that make up an `int[]' like so: - - extern jintArray foo; - jint *intp = elements (foo); - - The name of this function may change in the future. - - - Fonction: jobjectArray JvNewObjectArray (jsize LENGTH, jclass KLASS, - jobject INIT) - Here `klass' is the type of elements of the array and `init' is - the initial value put into every slot in the array. - - Creating arrays - --------------- - - For each primitive type there is a function which can be used to create - a new array of that type. The name of the function is of the form: - - JvNewTYPEArray - - For example: - - JvNewBooleanArray - - can be used to create an array of Java primitive boolean types. - - The following function definition is the template for all such - functions: - - - Fonction: jbooleanArray JvNewBooleanArray (jint LENGTH) - Create's an array LENGTH indices long. - - - Fonction: jsize JvGetArrayLength (jarray ARRAY) - Returns the length of the ARRAY. - -  - File: gcj.info, Node: Methods, Next: Strings, Prev: Arrays, Up: About CNI - - Methods - ======= - - Java methods are mapped directly into C++ methods. The header files - generated by `gcjh' include the appropriate method definitions. - Basically, the generated methods have the same names and - _corresponding_ types as the Java methods, and are called in the - natural manner. - - Overloading - ----------- - - Both Java and C++ provide method overloading, where multiple methods in - a class have the same name, and the correct one is chosen (at compile - time) depending on the argument types. The rules for choosing the - correct method are (as expected) more complicated in C++ than in Java, - but given a set of overloaded methods generated by `gcjh' the C++ - compiler will choose the expected one. - - Common assemblers and linkers are not aware of C++ overloading, so - the standard implementation strategy is to encode the parameter types - of a method into its assembly-level name. This encoding is called - "mangling", and the encoded name is the "mangled name". The same - mechanism is used to implement Java overloading. For C++/Java - interoperability, it is important that both the Java and C++ compilers - use the _same_ encoding scheme. - - Static methods - -------------- - - Static Java methods are invoked in CNI using the standard C++ syntax, - using the `::' operator rather than the `.' operator. - - For example: - - jint i = java::lang::Math::round((jfloat) 2.3); - - C++ method definition syntax is used to define a static native method. - For example: - - #include - java::lang::Integer* - java::lang::Integer::getInteger(jstring str) - { - ... - } - - Object Constructors - ------------------- - - Constructors are called implicitly as part of object allocation using - the `new' operator. - - For example: - - java::lang::Integer *x = new java::lang::Integer(234); - - Java does not allow a constructor to be a native method. This - limitation can be coded round however because a constructor can _call_ - a native method. - - Instance methods - ---------------- - - Calling a Java instance method from a C++ CNI method is done using the - standard C++ syntax, e.g.: - - // First create the Java object. - java::lang::Integer *x = new java::lang::Integer(234); - // Now call a method. - jint prim_value = x->intValue(); - if (x->longValue == 0) - ... - - Defining a Java native instance method is also done the natural way: - - #include - - jdouble - java::lang:Integer::doubleValue() - { - return (jdouble) value; - } - - Interface methods - ----------------- - - In Java you can call a method using an interface reference. This is - supported, but not completely. *Note Interfaces::. - -  - File: gcj.info, Node: Strings, Next: Mixing with C++, Prev: Methods, Up: About CNI - - Strings - ======= - - CNI provides a number of utility functions for working with Java Java - `String' objects. The names and interfaces are analogous to those of - JNI. - - - Fonction: jstring JvNewString (const char* CHARS, jsize LEN) - Returns a Java `String' object with characters from the C string - CHARS up to the index LEN in that array. - - - Fonction: jstring JvNewStringLatin1 (const char* BYTES, jsize LEN) - Returns a Java `String' made up of LEN bytes from BYTES. - - - Fonction: jstring JvNewStringLatin1 (const char* BYTES) - As above but the length of the `String' is `strlen(BYTES)'. - - - Fonction: jstring JvNewStringUTF (const char* BYTES) - Returns a `String' which is made up of the UTF encoded characters - present in the C string BYTES. - - - Fonction: jchar* JvGetStringChars (jstring STR) - Returns a pointer to an array of characters making up the `String' - STR. - - - Fonction: int JvGetStringUTFLength (jstring STR) - Returns the number of bytes required to encode the contents of the - `String' STR in UTF-8. - - - Fonction: jsize JvGetStringUTFRegion (jstring STR, jsize START, - jsize LEN, char* BUF) - Puts the UTF-8 encoding of a region of the `String' STR into the - buffer `buf'. The region to fetch is marked by START and LEN. - - Note that BUF is a buffer, not a C string. It is _not_ null - terminated. - -  - File: gcj.info, Node: Mixing with C++, Next: Exception Handling, Prev: Strings, Up: About CNI - - Interoperating with C/C++ - ========================= - - Because CNI is designed to represent Java classes and methods it cannot - be mixed readily with C/C++ types. - - One important restriction is that Java classes cannot have non-Java - type instance or static variables and cannot have methods which take - non-Java types as arguments or return non-Java types. - - None of the following is possible with CNI: - - - class ::MyClass : public java::lang::Object - { - char* variable; // char* is not a valid Java type. - } - - - uint - ::SomeClass::someMethod (char *arg) - { - . - . - . - } // `uint' is not a valid Java type, neither is `char*' - - Of course, it is ok to use C/C++ types within the scope of a method: - - jint - ::SomeClass::otherMethod (jstring str) - { - char *arg = ... - . - . - . - } - - But this restriction can cause a problem so CNI includes the - `gnu.gcj.RawData' class. The `RawData' class is a "non-scanned - reference" type. In other words variables declared of type `RawData' - can contain any data and are not checked by the compiler in any way. - - This means that you can put C/C++ data structures (including classes) - in your CNI classes, as long as you use the appropriate cast. - - Here are some examples: - - - class ::MyClass : public java::lang::Object - { - gnu.gcj.RawData string; - - MyClass (); - gnu.gcj.RawData getText (); - void printText (); - } - - ::MyClass::MyClass () - { - char* text = ... - string = text; - } - - gnu.gcj.RawData - ::MyClass::getText () - { - return string; - } - - void - ::MyClass::printText () - { - printf("%s\n", (char*) string); - } - -  - File: gcj.info, Node: Exception Handling, Next: Synchronization, Prev: Mixing with C++, Up: About CNI - - Exception Handling - ================== - - While C++ and Java share a common exception handling framework, things - are not yet perfectly integrated. The main issue is that the run-time - type information facilities of the two languages are not integrated. - - Still, things work fairly well. You can throw a Java exception from - C++ using the ordinary `throw' construct, and this exception can be - caught by Java code. Similarly, you can catch an exception thrown from - Java using the C++ `catch' construct. - - Here is an example: - - if (i >= count) - throw new java::lang::IndexOutOfBoundsException(); - - Normally, G++ will automatically detect when you are writing C++ - code that uses Java exceptions, and handle them appropriately. - However, if C++ code only needs to execute destructors when Java - exceptions are thrown through it, GCC will guess incorrectly. Sample - problematic code: - - struct S { ~S(); }; - - extern void bar(); // Is implemented in Java and may throw exceptions. - - void foo() - { - S s; - bar(); - } - - The usual effect of an incorrect guess is a link failure, - complaining of a missing routine called `__gxx_personality_v0'. - - You can inform the compiler that Java exceptions are to be used in a - translation unit, irrespective of what it might think, by writing - `#pragma GCC java_exceptions' at the head of the file. This `#pragma' - must appear before any functions that throw or catch exceptions, or run - destructors when exceptions are thrown through them. - -  - File: gcj.info, Node: Synchronization, Next: Invocation, Prev: Exception Handling, Up: About CNI - - Synchronization - =============== - - Each Java object has an implicit monitor. The Java VM uses the - instruction `monitorenter' to acquire and lock a monitor, and - `monitorexit' to release it. - - The corresponding CNI macros are `JvMonitorEnter' and - `JvMonitorExit' (JNI has similar methods `MonitorEnter' and - `MonitorExit'). - - The Java source language does not provide direct access to these - primitives. Instead, there is a `synchronized' statement that does an - implicit `monitorenter' before entry to the block, and does a - `monitorexit' on exit from the block. Note that the lock has to be - released even when the block is abnormally terminated by an exception, - which means there is an implicit `try finally' surrounding - synchronization locks. - - From C++, it makes sense to use a destructor to release a lock. CNI - defines the following utility class: - - class JvSynchronize() { - jobject obj; - JvSynchronize(jobject o) { obj = o; JvMonitorEnter(o); } - ~JvSynchronize() { JvMonitorExit(obj); } - }; - - So this Java code: - - synchronized (OBJ) - { - CODE - } - - might become this C++ code: - - { - JvSynchronize dummy (OBJ); - CODE; - } - - Java also has methods with the `synchronized' attribute. This is - equivalent to wrapping the entire method body in a `synchronized' - statement. (Alternatively, an implementation could require the caller - to do the synchronization. This is not practical for a compiler, - because each virtual method call would have to test at run-time if - synchronization is needed.) Since in `gcj' the `synchronized' - attribute is handled by the method implementation, it is up to the - programmer of a synchronized native method to handle the synchronization - (in the C++ implementation of the method). In other words, you need to - manually add `JvSynchronize' in a `native synchronized' method. - -  - File: gcj.info, Node: Invocation, Next: Reflection, Prev: Synchronization, Up: About CNI - - Invocation - ========== - - CNI permits C++ applications to make calls into Java classes, in - addition to allowing Java code to call into C++. Several functions, - known as the "invocation API", are provided to support this. - - - Fonction: jint JvCreateJavaVM (void* VM_ARGS) - Initializes the Java runtime. This function performs essential - initialization of the threads interface, garbage collector, - exception handling and other key aspects of the runtime. It must - be called once by an application with a non-Java `main()' - function, before any other Java or CNI calls are made. It is - safe, but not recommended, to call `JvCreateJavaVM()' more than - once provided it is only called from a single thread. The VMARGS - parameter can be used to specify initialization parameters for the - Java runtime. It may be `NULL'. This function returns `0' upon - success, or `-1' if the runtime is already initialized. - - _Note:_ In GCJ 3.1, the `vm_args' parameter is ignored. It may be - used in a future release. - - - Fonction: java::lang::Thread* JvAttachCurrentThread (jstring NAME, - java::lang::ThreadGroup* GROUP) - Registers an existing thread with the Java runtime. This must be - called once from each thread, before that thread makes any other - Java or CNI calls. It must be called after `JvCreateJavaVM'. NAME - specifies a name for the thread. It may be `NULL', in which case a - name will be generated. GROUP is the ThreadGroup in which this - thread will be a member. If it is `NULL', the thread will be a - member of the main thread group. The return value is the Java - `Thread' object that represents the thread. It is safe to call - `JvAttachCurrentThread()' more than once from the same thread. If - the thread is already attached, the call is ignored and the current - thread object is returned. - - - Fonction: jint JvDetachCurrentThread () - Unregisters a thread from the Java runtime. This should be called - by threads that were attached using `JvAttachCurrentThread()', - after they have finished making calls to Java code. This ensures - that any resources associated with the thread become eligible for - garbage collection. This function returns `0' upon success, or - `-1' if the current thread is not attached. - - Handling uncaught exceptions - ---------------------------- - - If an exception is thrown from Java code called using the invocation - API, and no handler for the exception can be found, the runtime will - abort the application. In order to make the application more robust, it - is recommended that code which uses the invocation API be wrapped by a - top-level try/catch block that catches all Java exceptions. - - Example - ------- - - The following code demonstrates the use of the invocation API. In this - example, the C++ application initializes the Java runtime and attaches - itself. The `java.lang.System' class is initialized in order to access - its `out' field, and a Java string is printed. Finally, the thread is - detached from the runtime once it has finished making Java calls. - Everything is wrapped with a try/catch block to provide a default - handler for any uncaught exceptions. - - The example can be compiled with `c++ test.cc -lgcj'. - - // test.cc - #include - #include - #include - #include - - int main(int argc, char *argv) - { - using namespace java::lang; - - try - { - JvCreateJavaVM(NULL); - JvAttachCurrentThread(NULL, NULL); - - String *message = JvNewStringLatin1("Hello from C++"); - JvInitClass(&System::class$); - System::out->println(message); - - JvDetachCurrentThread(); - } - catch (Throwable *t) - { - System::err->println(JvNewStringLatin1("Unhandled Java exception:")); - t->printStackTrace(); - } - } - -  - File: gcj.info, Node: Reflection, Prev: Invocation, Up: About CNI - - Reflection - ========== - - Reflection is possible with CNI code, it functions similarly to how it - functions with JNI. - - The types `jfieldID' and `jmethodID' are as in JNI. - - The functions: - - * `JvFromReflectedField', - - * `JvFromReflectedMethod', - - * `JvToReflectedField' - - * `JvToFromReflectedMethod' - - will be added shortly, as will other functions corresponding to JNI. - -  - File: gcj.info, Node: System properties, Next: Resources, Prev: About CNI, Up: Top - - System properties - ***************** - - The runtime behavior of the `libgcj' library can be modified by setting - certain system properties. These properties can be compiled into the - program using the `-DNAME[=VALUE]' option to `gcj' or by setting them - explicitly in the program by calling the - `java.lang.System.setProperty()' method. Some system properties are - only used for informational purposes (like giving a version number or a - user name). A program can inspect the current value of a property by - calling the `java.lang.System.getProperty()' method. - - * Menu: - - * Standard Properties:: Standard properties supported by `libgcj' - * GNU Classpath Properties:: Properties found in Classpath based libraries - * libgcj Runtime Properties:: Properties specific to `libgcj' - -  - File: gcj.info, Node: Standard Properties, Next: GNU Classpath Properties, Up: System properties - - Standard Properties - =================== - - The following properties are normally found in all implementations of - the core libraries for the Java language. - - `java.version' - The `libgcj' version number. - - `java.vendor' - Set to `The Free Software Foundation, Inc.' - - `java.vendor.url' - Set to `http://gcc.gnu.org/java/'. - - `java.home' - The directory where `gcj' was installed. Taken from the `--prefix' - option given to `configure'. - - `java.class.version' - The class format version number supported by the libgcj byte code - interpreter. (Currently `46.0') - - `java.vm.specification.version' - The Virtual Machine Specification version implemented by `libgcj'. - (Currently `1.0') - - `java.vm.specification.vendor' - The name of the Virtual Machine specification designer. - - `java.vm.specification.name' - The name of the Virtual Machine specification (Set to `Java - Virtual Machine Specification'). - - `java.vm.version' - The `gcj' version number. - - `java.vm.vendor' - Set to `The Free Software Foundation, Inc.' - - `java.vm.name' - Set to `GNU libgcj'. - - `java.specification.version' - The Runtime Environment specification version implemented by - `libgcj'. (Currently set to `1.3') - - `java.specification.vendor' - The Runtime Environment specification designer. - - `java.specification.name' - The name of the Runtime Environment specification (Set to `Java - Platform API Specification'). - - `java.class.path' - The paths (jar files, zip files and directories) used for finding - class files. - - `java.library.path' - Directory path used for finding native libraries. - - `java.io.tmpdir' - The directory used to put temporary files in. - - `java.compiler' - Name of the Just In Time compiler to use by the byte code - interpreter. Currently not used in `libgcj'. - - `java.ext.dirs' - Directories containing jar files with extra libraries. Will be - used when resolving classes. Currently not used in `libgcj'. - - `java.protocol.handler.pkgs' - A `|' separated list of package names that is used to find classes - that implement handlers for `java.net.URL'. - - `java.rmi.server.codebase' - A list of URLs that is used by the `java.rmi.server.RMIClassLoader' - to load classes from. - - `jdbc.drivers' - A list of class names that will be loaded by the - `java.sql.DriverManager' when it starts up. - - `file.separator' - The separator used in when directories are included in a filename - (normally `/' or `\' ). - - `file.encoding' - The default character encoding used when converting platform - native files to Unicode (usually set to `8859_1'). - - `path.separator' - The standard separator used when a string contains multiple paths - (normally `:' or `;'), the string is usually not a valid character - to use in normal directory names.) - - `line.separator' - The default line separator used on the platform (normally `\n', - `\r' or a combination of those two characters). - - `policy.provider' - The class name used for the default policy provider returned by - `java.security.Policy.getPolicy'. - - `user.name' - The name of the user running the program. Can be the full name, - the login name or empty if unknown. - - `user.home' - The default directory to put user specific files in. - - `user.dir' - The current working directory from which the program was started. - - `user.language' - The default language as used by the `java.util.Locale' class. - - `user.region' - The default region as used by the `java.util.Local' class. - - `user.variant' - The default variant of the language and region local used. - - `user.timezone' - The default timezone as used by the `java.util.TimeZone' class. - - `os.name' - The operating system/kernel name that the program runs on. - - `os.arch' - The hardware that we are running on. - - `os.version' - The version number of the operating system/kernel. - - `awt.appletWarning' - The string to display when an untrusted applet is displayed. - Returned by `java.awt.Window.getWarningString()' when the window is - "insecure". - - `awt.toolkit' - The class name used for initializing the default - `java.awt.Toolkit'. Defaults to `gnu.awt.gtk.GtkToolkit'. - - `http.proxyHost' - Name of proxy host for http connections. - - `http.proxyPort' - Port number to use when a proxy host is in use. - - -  - File: gcj.info, Node: GNU Classpath Properties, Next: libgcj Runtime Properties, Prev: Standard Properties, Up: System properties - - GNU Classpath Properties - ======================== - - `libgcj' is based on the GNU Classpath (Essential Libraries for Java) a - GNU project to create free core class libraries for use with virtual - machines and compilers for the Java language. The following properties - are common to libraries based on GNU Classpath. - - `gcj.dumpobject' - Enables printing serialization debugging by the - `java.io.ObjectInput' and `java.io.ObjectOutput' classes when set - to something else then the empty string. Only used when running a - debug build of the library. - - `gnu.classpath.vm.shortname' - This is a succint name of the virtual machine. For `libgcj', this - will always be `libgcj'. - - `gnu.classpath.home.url' - A base URL used for finding system property files (e.g., - `classpath.security'). By default this is a `file:' URL pointing - to the `lib' directory under `java.home'. - - -  - File: gcj.info, Node: libgcj Runtime Properties, Prev: GNU Classpath Properties, Up: System properties - - libgcj Runtime Properties - ========================= - - The following properties are specific to the `libgcj' runtime and will - normally not be found in other core libraries for the java language. - - `java.fullversion' - The combination of `java.vm.name' and `java.vm.version'. - - `java.vm.info' - Same as `java.fullversion'. - - `impl.prefix' - Used by the `java.net.DatagramSocket' class when set to something - else then the empty string. When set all newly created - `DatagramSocket's will try to load a class - `java.net.[impl.prefix]DatagramSocketImpl' instead of the normal - `java.net.PlainDatagramSocketImpl'. - - `gnu.gcj.progname' - The name that was used to invoked the program. - - `gnu.gcj.runtime.NameFinder.demangle' - Whether names in a stack trace should be demangled. Defaults to - `true'. - - `gnu.gcj.runtime.NameFinder.sanitize' - Whether calls to initialize exceptions and starting the runtime - system should be removed from the stack trace. Only done when - names are demangled. Defaults to `true'. - - `gnu.gcj.runtime.NameFinder.remove_unknown' - Whether calls to unknown functions (class and method names are - unknown) should be removed from the stack trace. Only done when - the stack is sanitized. Ignored if this means no stack trace - information would be available anymore. Defaults to `true'. - - `gnu.gcj.runtime.NameFinder.remove_interpreter' - Whether runtime interpreter calls (methods in the - `_Jv_InterpMethod' class and functions starting with `ffi_') - should be removed from the stack trace. Only done when the stack - is sanitized. Defaults to `true'. - - `gnu.gcj.runtime.NameFinder.use_addr2line' - Whether an external process (`addr2line' or `addr2name.awk') - should be used as fallback to convert the addresses to function - names when the runtime is unable to do it through `dladdr'. - - -  - File: gcj.info, Node: Resources, Prev: System properties, Up: Top - - Resources - ********* - - While writing `gcj' and `libgcj' we have, of course, relied heavily on - documentation from Sun Microsystems. In particular we have used The - Java Language Specification (both first and second editions), the Java - Class Libraries (volumes one and two), and the Java Virtual Machine - Specification. In addition we've used the online documentation at - `http://java.sun.com/'. - - The current `gcj' home page is `http://gcc.gnu.org/java/'. - - For more information on gcc, see `http://gcc.gnu.org/'. - - Some `libgcj' testing is done using the Mauve test suite. This is a - free software Java class library test suite which is being written - because the JCK is not free. See `http://sources.redhat.com/mauve/' - for more information. - - -  - Tag Table: - Node: Top2532 - Node: Copying3686 - Node: GNU Free Documentation License22880 - Node: Invoking gcj45286 - Node: Input and output files45934 - Node: Input Options47294 - Node: Encodings50434 - Node: Warnings51632 - Node: Code Generation52660 - Ref: Code Generation-Footnote-156317 - Node: Configure-time Options56626 - Node: Compatibility58041 - Node: Limitations58517 - Node: Extensions60091 - Node: Invoking gcjh61340 - Node: Invoking jv-scan63392 - Node: Invoking jcf-dump64429 - Node: Invoking gij65198 - Node: Invoking jv-convert67402 - Node: Invoking rmic68469 - Node: Invoking rmiregistry69841 - Node: About CNI70242 - Node: Basic concepts71530 - Node: Packages74509 - Node: Primitive types76818 - Node: Interfaces78461 - Node: Objects and Classes79367 - Node: Class Initialization81520 - Node: Object allocation83853 - Node: Arrays84825 - Node: Methods87408 - Node: Strings90142 - Node: Mixing with C++91607 - Node: Exception Handling93487 - Node: Synchronization95119 - Node: Invocation97097 - Node: Reflection101158 - Node: System properties101607 - Node: Standard Properties102478 - Node: GNU Classpath Properties106933 - Node: libgcj Runtime Properties107969 - Node: Resources109968 -  - End Tag Table --- 0 ---- diff -Nrc3pad gcc-3.3.3/gcc/java/gcj.texi gcc-3.4.0/gcc/java/gcj.texi *** gcc-3.3.3/gcc/java/gcj.texi 2003-03-30 17:01:58.000000000 +0000 --- gcc-3.4.0/gcc/java/gcj.texi 2004-03-23 17:48:38.000000000 +0000 *************** files and object files, and it can read *** 115,121 **** * Invoking jv-convert:: Converting from one encoding to another * Invoking rmic:: Generate stubs for Remote Method Invocation. * Invoking rmiregistry:: The remote object registry. ! * About CNI:: Description of the Cygnus Native Interface * System properties:: Modifying runtime behavior of the libgcj library * Resources:: Where to look for more information @end menu --- 115,121 ---- * Invoking jv-convert:: Converting from one encoding to another * Invoking rmic:: Generate stubs for Remote Method Invocation. * Invoking rmiregistry:: The remote object registry. ! * About CNI:: Description of the Compiled Native Interface * System properties:: Modifying runtime behavior of the libgcj library * Resources:: Where to look for more information @end menu *************** Java bytecode files. *** 182,188 **** @item @var{file}.zip @itemx @var{file}.jar An archive containing one or more @code{.class} files, all of ! which are compiled. The archive may be compressed. @item @@@var{file} A file containing a whitespace-separated list of input file names. (Currently, these must all be @code{.java} source files, but that --- 182,191 ---- @item @var{file}.zip @itemx @var{file}.jar An archive containing one or more @code{.class} files, all of ! which are compiled. The archive may be compressed. Files in ! an archive which don't end with @samp{.class} are treated as ! resource files; they are copmiled into the resulting object file ! as @samp{core:} URLs. @item @@@var{file} A file containing a whitespace-separated list of input file names. (Currently, these must all be @code{.java} source files, but that *************** This option will cause @command{gcj} not *** 338,343 **** --- 341,349 ---- newer than its matching class file. By default @command{gcj} will warn about this. + @item -Wno-deprecated + Warn if a deprecated class, method, or field is referred to. + @item -Wunused This is the same as @command{gcc}'s @code{-Wunused}. *************** use these classes, you must link them ex *** 517,525 **** @node Extensions @section Extra features unique to gcj ! The main feature of @command{gcj} is that it can compile programs ! written in the Java programming language to native code. Most ! extensions that have been added are to facilitate this functionality. @itemize @bullet @item --- 523,531 ---- @node Extensions @section Extra features unique to gcj ! The main feature of @command{gcj} is that it can compile programs written in ! the Java programming language to native code. Most extensions that have been ! added are to facilitate this functionality. @itemize @bullet @item *************** all @samp{.}s will be transformed into @ *** 537,545 **** for inner classes starts with their outermost outer class. If the class cannot be found this way the system classloader tries to use the @code{libgcj} bytecode interpreter to load the class from the standard ! classpath. @end itemize @node Invoking gcjh @chapter Invoking gcjh --- 543,580 ---- for inner classes starts with their outermost outer class. If the class cannot be found this way the system classloader tries to use the @code{libgcj} bytecode interpreter to load the class from the standard ! classpath. This process can be controlled to some degree via the ! @code{gnu.gcj.runtime.VMClassLoader.library_control} property; ! @xref{libgcj Runtime Properties}. ! ! @item ! @code{libgcj} includes a special @samp{gcjlib} URL type. A URL of ! this form is like a @code{jar} URL, and looks like ! @samp{gcjlib:/path/to/shared/library.so!/path/to/resource}. An access ! to one of these URLs causes the shared library to be @code{dlopen()}d, ! and then the resource is looked for in that library. These URLs are ! most useful when used in conjunction with @code{java.net.URLClassLoader}. ! Note that, due to implementation limitations, currently any such URL ! can be accessed by only one class loader, and libraries are never ! unloaded. This means some care must be exercised to make sure that ! a @code{gcjlib} URL is not accessed by more than one class loader at once. ! In a future release this limitation will be lifted, and such ! libraries will be mapped privately. ! ! @item ! A program compiled by @command{gcj} will examine the ! @env{GCJ_PROPERTIES} environment variable and change its behavior in ! some ways. In particular @env{GCJ_PROPERTIES} holds a list of ! assignments to global properties, such as would be set with the ! @option{-D} option to @command{java}. For instance, ! @samp{java.compiler=gcj} is a valid (but currently meaningless) ! setting. ! @cindex GCJ_PROPERTIES ! @vindex GCJ_PROPERTIES ! @end itemize + @node Invoking gcjh @chapter Invoking gcjh *************** gij [@option{-jar}] [@option{OPTION}] @d *** 772,778 **** [@option{-cp} @var{path}] [@option{-classpath} @var{path}] [@option{-D}@var{name}[=@var{value}]@dots{}] [@option{-ms=}@var{number}] [@option{-mx=}@var{number}] ! [@option{--showversion}] [@option{--version}] [@option{--help}] @c man end @c man begin SEEALSO gij gcc(1), gcj(1), gcjh(1), jv-scan(1), jcf-dump(1), gfdl(7), --- 807,814 ---- [@option{-cp} @var{path}] [@option{-classpath} @var{path}] [@option{-D}@var{name}[=@var{value}]@dots{}] [@option{-ms=}@var{number}] [@option{-mx=}@var{number}] ! [@option{-X@var{argument}] ! [@option{--showversion}] [@option{--version}] [@option{--help}][@option{-?}] @c man end @c man begin SEEALSO gij gcc(1), gcj(1), gcjh(1), jv-scan(1), jcf-dump(1), gfdl(7), *************** This sets the initial heap size. *** 832,842 **** --- 868,885 ---- @item -mx=@var{number} This sets the maximum heap size. + @item -X + @itemx -X@var{argument} + Supplying @code{-X} by itself will cause @code{gij} to list all the + supported @code{-X} options. Currently there are none. Unrecognized + @code{-X} options are ignored, for compatibility with other runtimes. + @item -jar This indicates that the name passed to @code{gij} should be interpreted as the name of a jar file, not a class. @item --help + @itemx -? Print help, then exit. @item --showversion *************** Print version information, then exit. *** 1025,1031 **** @node About CNI @chapter About CNI ! This documents CNI, the Cygnus Native Interface, which is is a convenient way to write Java native methods using C++. This is a more efficient, more convenient, but less portable alternative to the standard JNI (Java Native Interface). --- 1068,1074 ---- @node About CNI @chapter About CNI ! This documents CNI, the Compiled Native Interface, which is is a convenient way to write Java native methods using C++. This is a more efficient, more convenient, but less portable alternative to the standard JNI (Java Native Interface). *************** Whether an external process (@command{ad *** 2233,2238 **** --- 2276,2289 ---- should be used as fallback to convert the addresses to function names when the runtime is unable to do it through @code{dladdr}. + @item gnu.gcj.runtime.VMClassLoader.library_control + This controls how shared libraries are automatically loaded by the + built-in class loader. By default, or if this property is set to + @samp{full}, a full search is done for each requested class. If this + property is set to @samp{cache}, then any failed lookups are cached + and not tried again. If this property is set to @samp{never}, then + lookups are never done. For more information, @xref{Extensions}. + @end table diff -Nrc3pad gcc-3.3.3/gcc/java/gen-table.pl gcc-3.4.0/gcc/java/gen-table.pl *** gcc-3.3.3/gcc/java/gen-table.pl 2001-12-29 04:31:10.000000000 +0000 --- gcc-3.4.0/gcc/java/gen-table.pl 2003-02-24 02:14:48.000000000 +0000 *************** *** 1,6 **** #! /usr/bin/perl ! # Copyright (C) 2000, 2001 Free Software Foundation # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by --- 1,6 ---- #! /usr/bin/perl ! # Copyright (C) 2000, 2001, 2003 Free Software Foundation # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by *************** sub process_one *** 130,136 **** { my ($code, @fields) = @_; ! my $value = ''; my $type = $fields[$CATEGORY]; # See if the character is a valid identifier start. --- 130,136 ---- { my ($code, @fields) = @_; ! my @value = (); my $type = $fields[$CATEGORY]; # See if the character is a valid identifier start. *************** sub process_one *** 138,144 **** || $type eq 'Pc' # Connecting punctuation || $type eq 'Sc') # Currency symbol { ! $value = 'LETTER_START'; } # See if the character is a valid identifier member. --- 138,144 ---- || $type eq 'Pc' # Connecting punctuation || $type eq 'Sc') # Currency symbol { ! push (@value, 'LETTER_START'); } # See if the character is a valid identifier member. *************** sub process_one *** 159,181 **** && $code <= 0x206f) || $code == 0xfeff) # ZWNBSP { ! if ($value eq '') ! { ! $value = 'LETTER_PART'; ! } ! else ! { ! $value = 'LETTER_PART | ' . $value; ! } } ! if ($value eq '') { $value = '0'; } else { ! $value = '(' . $value . ')'; } $map[$code] = $value; --- 159,187 ---- && $code <= 0x206f) || $code == 0xfeff) # ZWNBSP { ! push (@value, 'LETTER_PART'); } ! if (($type =~ /Z./ ! # Java treats some values specially as non-spaces. ! && $code != 0x00a0 ! && $code != 0x2007 ! && $code != 0x202f) ! # And for our purposes there are some that should be specially ! # treated as spaces. ! || $code == 0x000b ! || ($code >= 0x001c && $code <= 0x001f)) ! { ! push (@value, 'LETTER_SPACE'); ! } ! ! if (! @value) { $value = '0'; } else { ! $value = '(' . join (' | ', @value) . ')'; } $map[$code] = $value; *************** sub print_tables *** 196,202 **** print OUT "#define GCC_CHARTABLES_H\n\n"; print OUT "#define LETTER_START 1\n"; ! print OUT "#define LETTER_PART 2\n\n"; for ($count = 0; $count <= $last; $count += 256) { --- 202,210 ---- print OUT "#define GCC_CHARTABLES_H\n\n"; print OUT "#define LETTER_START 1\n"; ! print OUT "#define LETTER_PART 2\n"; ! print OUT "#define LETTER_SPACE 4\n\n"; ! print OUT "#define LETTER_MASK 7\n\n"; for ($count = 0; $count <= $last; $count += 256) { diff -Nrc3pad gcc-3.3.3/gcc/java/gij.1 gcc-3.4.0/gcc/java/gij.1 *** gcc-3.3.3/gcc/java/gij.1 2004-02-14 20:38:16.000000000 +0000 --- gcc-3.4.0/gcc/java/gij.1 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,245 **** - .\" Automatically generated by Pod::Man version 1.15 - .\" Sat Feb 14 20:38:16 2004 - .\" - .\" Standard preamble: - .\" ====================================================================== - .de Sh \" Subsection heading - .br - .if t .Sp - .ne 5 - .PP - \fB\\$1\fR - .PP - .. - .de Sp \" Vertical space (when we can't use .PP) - .if t .sp .5v - .if n .sp - .. - .de Ip \" List item - .br - .ie \\n(.$>=3 .ne \\$3 - .el .ne 3 - .IP "\\$1" \\$2 - .. - .de Vb \" Begin verbatim text - .ft CW - .nf - .ne \\$1 - .. - .de Ve \" End verbatim text - .ft R - - .fi - .. - .\" Set up some character translations and predefined strings. \*(-- will - .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left - .\" double quote, and \*(R" will give a right double quote. | will give a - .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used - .\" to do unbreakable dashes and therefore won't be available. \*(C` and - .\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> - .tr \(*W-|\(bv\*(Tr - .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' - .ie n \{\ - . ds -- \(*W- - . ds PI pi - . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch - . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch - . ds L" "" - . ds R" "" - . ds C` "" - . ds C' "" - 'br\} - .el\{\ - . ds -- \|\(em\| - . ds PI \(*p - . ds L" `` - . ds R" '' - 'br\} - .\" - .\" If the F register is turned on, we'll generate index entries on stderr - .\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and - .\" index entries marked with X<> in POD. Of course, you'll have to process - .\" the output yourself in some meaningful fashion. - .if \nF \{\ - . de IX - . tm Index:\\$1\t\\n%\t"\\$2" - .. - . nr % 0 - . rr F - .\} - .\" - .\" For nroff, turn off justification. Always turn off hyphenation; it - .\" makes way too many mistakes in technical documents. - .hy 0 - .if n .na - .\" - .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). - .\" Fear. Run. Save yourself. No user-serviceable parts. - .bd B 3 - . \" fudge factors for nroff and troff - .if n \{\ - . ds #H 0 - . ds #V .8m - . ds #F .3m - . ds #[ \f1 - . ds #] \fP - .\} - .if t \{\ - . ds #H ((1u-(\\\\n(.fu%2u))*.13m) - . ds #V .6m - . ds #F 0 - . ds #[ \& - . ds #] \& - .\} - . \" simple accents for nroff and troff - .if n \{\ - . ds ' \& - . ds ` \& - . ds ^ \& - . ds , \& - . ds ~ ~ - . ds / - .\} - .if t \{\ - . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" - . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' - . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' - . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' - . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' - . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' - .\} - . \" troff and (daisy-wheel) nroff accents - .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' - .ds 8 \h'\*(#H'\(*b\h'-\*(#H' - .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] - .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' - .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' - .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] - .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] - .ds ae a\h'-(\w'a'u*4/10)'e - .ds Ae A\h'-(\w'A'u*4/10)'E - . \" corrections for vroff - .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' - .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' - . \" for low resolution devices (crt and lpr) - .if \n(.H>23 .if \n(.V>19 \ - \{\ - . ds : e - . ds 8 ss - . ds o a - . ds d- d\h'-1'\(ga - . ds D- D\h'-1'\(hy - . ds th \o'bp' - . ds Th \o'LP' - . ds ae ae - . ds Ae AE - .\} - .rm #[ #] #H #V #F C - .\" ====================================================================== - .\" - .IX Title "GIJ 1" - .TH GIJ 1 "gcc-3.3.3" "2004-02-14" "GNU" - .UC - .SH "NAME" - gij \- \s-1GNU\s0 interpreter for Java bytecode - .SH "SYNOPSIS" - .IX Header "SYNOPSIS" - gij [\fB\s-1OPTION\s0\fR] ... \fI\s-1JARFILE\s0\fR [\fI\s-1ARGS\s0\fR...] - .PP - gij [\fB\-jar\fR] [\fB\s-1OPTION\s0\fR] ... \fI\s-1CLASS\s0\fR [\fI\s-1ARGS\s0\fR...] - [\fB\-cp\fR \fIpath\fR] [\fB\-classpath\fR \fIpath\fR] - [\fB\-D\fR\fIname\fR[=\fIvalue\fR]...] - [\fB\-ms=\fR\fInumber\fR] [\fB\-mx=\fR\fInumber\fR] - [\fB\*(--showversion\fR] [\fB\*(--version\fR] [\fB\*(--help\fR] - .SH "DESCRIPTION" - .IX Header "DESCRIPTION" - \&\f(CW\*(C`gij\*(C'\fR is a Java bytecode interpreter included with \f(CW\*(C`libgcj\*(C'\fR. - \&\f(CW\*(C`gij\*(C'\fR is not available on every platform; porting it requires a - small amount of assembly programming which has not been done for all the - targets supported by \fBgcj\fR. - .PP - The primary argument to \f(CW\*(C`gij\*(C'\fR is the name of a class or, with - \&\f(CW\*(C`\-jar\*(C'\fR, a jar file. Options before this argument are interpreted - by \f(CW\*(C`gij\*(C'\fR; remaining options are passed to the interpreted program. - .PP - If a class name is specified and this class does not have a \f(CW\*(C`main\*(C'\fR - method with the appropriate signature (a \f(CW\*(C`static void\*(C'\fR method with - a \f(CW\*(C`String[]\*(C'\fR as its sole argument), then \f(CW\*(C`gij\*(C'\fR will print an - error and exit. - .PP - If a jar file is specified then \f(CW\*(C`gij\*(C'\fR will use information in it to - determine which class' \f(CW\*(C`main\*(C'\fR method will be invoked. - .PP - \&\f(CW\*(C`gij\*(C'\fR will invoke the \f(CW\*(C`main\*(C'\fR method with all the remaining - command-line options. - .PP - Note that \f(CW\*(C`gij\*(C'\fR is not limited to interpreting code. Because - \&\f(CW\*(C`libgcj\*(C'\fR includes a class loader which can dynamically load shared - objects, it is possible to give \f(CW\*(C`gij\*(C'\fR the name of a class which has - been compiled and put into a shared library on the class path. - .SH "OPTIONS" - .IX Header "OPTIONS" - .Ip "\fB\-cp\fR \fIpath\fR" 4 - .IX Item "-cp path" - .PD 0 - .Ip "\fB\-classpath\fR \fIpath\fR" 4 - .IX Item "-classpath path" - .PD - Set the initial class path. The class path is used for finding - class and resource files. If specified, this option overrides the - \&\f(CW\*(C`CLASSPATH\*(C'\fR environment variable. Note that this option is - ignored if \f(CW\*(C`\-jar\*(C'\fR is used. - .Ip "\fB\-D\fR\fIname\fR\fB[=\fR\fIvalue\fR\fB]\fR" 4 - .IX Item "-Dname[=value]" - This defines a system property named \fIname\fR with value \fIvalue\fR. - If \fIvalue\fR is not specified then it defaults to the empty string. - These system properties are initialized at the program's startup and can - be retrieved at runtime using the \f(CW\*(C`java.lang.System.getProperty\*(C'\fR - method. - .Ip "\fB\-ms=\fR\fInumber\fR" 4 - .IX Item "-ms=number" - This sets the initial heap size. - .Ip "\fB\-mx=\fR\fInumber\fR" 4 - .IX Item "-mx=number" - This sets the maximum heap size. - .Ip "\fB\-jar\fR" 4 - .IX Item "-jar" - This indicates that the name passed to \f(CW\*(C`gij\*(C'\fR should be interpreted - as the name of a jar file, not a class. - .Ip "\fB\*(--help\fR" 4 - .IX Item "help" - Print help, then exit. - .Ip "\fB\*(--showversion\fR" 4 - .IX Item "showversion" - Print version number and continue. - .Ip "\fB\*(--version\fR" 4 - .IX Item "version" - Print version number, then exit. - .SH "SEE ALSO" - .IX Header "SEE ALSO" - \&\fIgcc\fR\|(1), \fIgcj\fR\|(1), \fIgcjh\fR\|(1), \fIjv-scan\fR\|(1), \fIjcf-dump\fR\|(1), \fIgfdl\fR\|(7), - and the Info entries for \fIgcj\fR and \fIgcc\fR. - .SH "COPYRIGHT" - .IX Header "COPYRIGHT" - Copyright (c) 2001, 2002 Free Software Foundation, Inc. - .PP - Permission is granted to copy, distribute and/or modify this document - under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.2 or - any later version published by the Free Software Foundation; with the - Invariant Sections being ``\s-1GNU\s0 General Public License'', the Front-Cover - texts being (a) (see below), and with the Back-Cover Texts being (b) - (see below). A copy of the license is included in the - man page \fIgfdl\fR\|(7). - .PP - (a) The \s-1FSF\s0's Front-Cover Text is: - .PP - .Vb 1 - \& A GNU Manual - .Ve - (b) The \s-1FSF\s0's Back-Cover Text is: - .PP - .Vb 3 - \& You have freedom to copy and modify this GNU Manual, like GNU - \& software. Copies published by the Free Software Foundation raise - \& funds for GNU development. - .Ve --- 0 ---- diff -Nrc3pad gcc-3.3.3/gcc/java/gjavah.c gcc-3.4.0/gcc/java/gjavah.c *** gcc-3.3.3/gcc/java/gjavah.c 2003-03-28 22:18:48.000000000 +0000 --- gcc-3.4.0/gcc/java/gjavah.c 2003-12-20 15:38:27.000000000 +0000 *************** *** 1,20 **** /* Program to write C++-suitable header files from a Java(TM) .class file. This is similar to SUN's javah. ! Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. ! This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,23 ---- /* Program to write C++-suitable header files from a Java(TM) .class file. This is similar to SUN's javah. ! Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003 ! Free Software Foundation, Inc. ! This file is part of GCC. ! ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 26,31 **** --- 29,36 ---- #include "config.h" #include "system.h" + #include "coretypes.h" + #include "tm.h" #include #include "jcf.h" *************** The Free Software Foundation is independ *** 33,38 **** --- 38,44 ---- #include "javaop.h" #include "java-tree.h" #include "java-opcodes.h" + #include "ggc.h" #include "hashtab.h" #include *************** FILE *out = NULL; *** 46,52 **** static int found_error = 0; /* Nonzero if we're generating JNI output. */ ! static int flag_jni = 0; /* When nonzero, warn when source file is newer than matching class file. */ --- 52,58 ---- static int found_error = 0; /* Nonzero if we're generating JNI output. */ ! int flag_jni = 0; /* When nonzero, warn when source file is newer than matching class file. */ *************** struct method_name *** 118,161 **** /* List of method names we've seen. */ static struct method_name *method_name_list; ! static void print_field_info PARAMS ((FILE*, JCF*, int, int, JCF_u2)); ! static void print_mangled_classname PARAMS ((FILE*, JCF*, const char*, int)); ! static int print_cxx_classname PARAMS ((FILE*, const char*, JCF*, int)); ! static void print_method_info PARAMS ((FILE*, JCF*, int, int, JCF_u2)); ! static void print_c_decl PARAMS ((FILE*, JCF*, int, int, int, const char *, ! int)); ! static void print_stub_or_jni PARAMS ((FILE*, JCF*, int, int, int, ! const char *, int)); ! static void print_full_cxx_name PARAMS ((FILE*, JCF*, int, int, int, ! const char *, int)); ! static void decompile_method PARAMS ((FILE*, JCF*, int)); ! static void add_class_decl PARAMS ((FILE*, JCF*, JCF_u2)); ! static void jni_print_float PARAMS ((FILE *, jfloat)); ! static void jni_print_double PARAMS ((FILE *, jdouble)); ! static void print_name PARAMS ((FILE *, JCF *, int)); ! static void print_base_classname PARAMS ((FILE *, JCF *, int)); ! static int utf8_cmp PARAMS ((const unsigned char *, int, const char *)); ! static char *cxx_keyword_subst PARAMS ((const unsigned char *, int)); ! static void generate_access PARAMS ((FILE *, JCF_u2)); ! static int name_is_method_p PARAMS ((const unsigned char *, int)); ! static char *get_field_name PARAMS ((JCF *, int, JCF_u2)); ! static void print_field_name PARAMS ((FILE *, JCF *, int, JCF_u2)); ! static const unsigned char *super_class_name PARAMS ((JCF *, int *)); ! static void print_include PARAMS ((FILE *, const unsigned char *, int)); ! static int gcjh_streq PARAMS ((const void *p1, const void *p2)); ! static int throwable_p PARAMS ((const unsigned char *signature)); ! static const unsigned char *decode_signature_piece ! PARAMS ((FILE *, const unsigned char *, const unsigned char *, int *)); ! static void print_class_decls PARAMS ((FILE *, JCF *, int)); ! static void usage PARAMS ((void)) ATTRIBUTE_NORETURN; ! static void help PARAMS ((void)) ATTRIBUTE_NORETURN; ! static void version PARAMS ((void)) ATTRIBUTE_NORETURN; ! static int overloaded_jni_method_exists_p PARAMS ((const unsigned char *, int, ! const char *, int)); ! static void jni_print_char PARAMS ((FILE *, int)); ! static void decompile_return_statement PARAMS ((FILE *, JCF *, int, int, int)); JCF_u2 current_field_name; JCF_u2 current_field_value; --- 124,166 ---- /* List of method names we've seen. */ static struct method_name *method_name_list; ! static void print_field_info (FILE*, JCF*, int, int, JCF_u2); ! static void print_mangled_classname (FILE*, JCF*, const char*, int); ! static int print_cxx_classname (FILE*, const char*, JCF*, int, int); ! static void print_method_info (FILE*, JCF*, int, int, JCF_u2); ! static void print_c_decl (FILE*, JCF*, int, int, int, const char *, int); ! static void print_stub_or_jni (FILE*, JCF*, int, int, int, const char *, int); ! static void print_full_cxx_name (FILE*, JCF*, int, int, int, const char *, int); ! static void decompile_method (FILE*, JCF*, int); ! static void add_class_decl (FILE*, JCF*, JCF_u2); ! static void print_name (FILE *, JCF *, int); ! static void print_base_classname (FILE *, JCF *, int); ! static int utf8_cmp (const unsigned char *, int, const char *); ! static char *cxx_keyword_subst (const unsigned char *, int); ! static void generate_access (FILE *, JCF_u2); ! static int name_is_method_p (const unsigned char *, int); ! static char *get_field_name (JCF *, int, JCF_u2); ! static void print_field_name (FILE *, JCF *, int, JCF_u2); ! static const unsigned char *super_class_name (JCF *, int *); ! static void print_include (FILE *, const unsigned char *, int); ! static int gcjh_streq (const void *p1, const void *p2); ! static int throwable_p (const unsigned char *signature); ! static const unsigned char * ! decode_signature_piece (FILE *, const unsigned char *, ! const unsigned char *, int *); ! static void print_class_decls (FILE *, JCF *, int); ! static void usage (void) ATTRIBUTE_NORETURN; ! static void help (void) ATTRIBUTE_NORETURN; ! static void version (void) ATTRIBUTE_NORETURN; ! static int overloaded_jni_method_exists_p (const unsigned char *, int, ! const char *, int); ! static void jni_print_char (FILE *, int); ! static void jni_print_float (FILE *, jfloat); ! static void jni_print_double (FILE *, jdouble); ! static void decompile_return_statement (FILE *, JCF *, int, int, int); ! static void handle_inner_classes (int); JCF_u2 current_field_name; JCF_u2 current_field_value; *************** static int decompiled = 0; *** 238,243 **** --- 243,250 ---- if (out && method_printed && !method_synthetic) \ fputs (decompiled || stubs ? "\n" : ";\n", out); + #define HANDLE_INNERCLASSES_ATTRIBUTE(COUNT) handle_inner_classes (COUNT) + /* We're going to need {peek,skip}_attribute, enable their definition. */ #define NEED_PEEK_ATTRIBUTE #define NEED_SKIP_ATTRIBUTE *************** jni_print_double (FILE *stream, jdouble *** 297,305 **** /* Print a character, appropriately mangled for JNI. */ static void ! jni_print_char (stream, ch) ! FILE *stream; ! int ch; { if (! flag_jni) jcf_print_char (stream, ch); --- 304,310 ---- /* Print a character, appropriately mangled for JNI. */ static void ! jni_print_char (FILE *stream, int ch) { if (! flag_jni) jcf_print_char (stream, ch); *************** jni_print_char (stream, ch) *** 328,335 **** string, an error results. */ static void ! DEFUN(print_name, (stream, jcf, name_index), ! FILE* stream AND JCF* jcf AND int name_index) { if (JPOOL_TAG (jcf, name_index) != CONSTANT_Utf8) { --- 333,339 ---- string, an error results. */ static void ! print_name (FILE* stream, JCF* jcf, int name_index) { if (JPOOL_TAG (jcf, name_index) != CONSTANT_Utf8) { *************** DEFUN(print_name, (stream, jcf, name_ind *** 362,371 **** final separator. */ static void ! print_base_classname (stream, jcf, index) ! FILE *stream; ! JCF *jcf; ! int index; { int name_index = JPOOL_USHORT1 (jcf, index); int len; --- 366,372 ---- final separator. */ static void ! print_base_classname (FILE *stream, JCF *jcf, int index) { int name_index = JPOOL_USHORT1 (jcf, index); int len; *************** print_base_classname (stream, jcf, index *** 396,405 **** and 1 if STR is "greater" than NAME. */ static int ! utf8_cmp (str, length, name) ! const unsigned char *str; ! int length; ! const char *name; { const unsigned char *limit = str + length; int i; --- 397,403 ---- and 1 if STR is "greater" than NAME. */ static int ! utf8_cmp (const unsigned char *str, int length, const char *name) { const unsigned char *limit = str + length; int i; *************** static const char *const cxx_keywords[] *** 530,538 **** Otherwise, return NULL. The return value is malloc()d. */ static char * ! cxx_keyword_subst (str, length) ! const unsigned char *str; ! int length; { int last = ARRAY_SIZE (cxx_keywords); int first = 0; --- 528,534 ---- Otherwise, return NULL. The return value is malloc()d. */ static char * ! cxx_keyword_subst (const unsigned char *str, int length) { int last = ARRAY_SIZE (cxx_keywords); int first = 0; *************** cxx_keyword_subst (str, length) *** 579,587 **** /* Generate an access control keyword based on FLAGS. */ static void ! generate_access (stream, flags) ! FILE *stream; ! JCF_u2 flags; { if ((flags & ACC_VISIBILITY) == last_access) return; --- 575,581 ---- /* Generate an access control keyword based on FLAGS. */ static void ! generate_access (FILE *stream, JCF_u2 flags) { if ((flags & ACC_VISIBILITY) == last_access) return; *************** generate_access (stream, flags) *** 611,619 **** /* See if NAME is already the name of a method. */ static int ! name_is_method_p (name, length) ! const unsigned char *name; ! int length; { struct method_name *p; --- 605,611 ---- /* See if NAME is already the name of a method. */ static int ! name_is_method_p (const unsigned char *name, int length) { struct method_name *p; *************** name_is_method_p (name, length) *** 628,638 **** /* If there is already a method named NAME, whose signature is not SIGNATURE, then return true. Otherwise return false. */ static int ! overloaded_jni_method_exists_p (name, length, signature, sig_length) ! const unsigned char *name; ! int length; ! const char *signature; ! int sig_length; { struct method_name *p; --- 620,627 ---- /* If there is already a method named NAME, whose signature is not SIGNATURE, then return true. Otherwise return false. */ static int ! overloaded_jni_method_exists_p (const unsigned char *name, int length, ! const char *signature, int sig_length) { struct method_name *p; *************** overloaded_jni_method_exists_p (name, le *** 649,658 **** /* Get name of a field. This handles renamings due to C++ clash. */ static char * ! get_field_name (jcf, name_index, flags) ! JCF *jcf; ! int name_index; ! JCF_u2 flags; { unsigned char *name = JPOOL_UTF_DATA (jcf, name_index); int length = JPOOL_UTF_LENGTH (jcf, name_index); --- 638,644 ---- /* Get name of a field. This handles renamings due to C++ clash. */ static char * ! get_field_name (JCF *jcf, int name_index, JCF_u2 flags) { unsigned char *name = JPOOL_UTF_DATA (jcf, name_index); int length = JPOOL_UTF_LENGTH (jcf, name_index); *************** get_field_name (jcf, name_index, flags) *** 684,694 **** /* Print a field name. Convenience function for use with get_field_name. */ static void ! print_field_name (stream, jcf, name_index, flags) ! FILE *stream; ! JCF *jcf; ! int name_index; ! JCF_u2 flags; { char *override = get_field_name (jcf, name_index, flags); --- 670,676 ---- /* Print a field name. Convenience function for use with get_field_name. */ static void ! print_field_name (FILE *stream, JCF *jcf, int name_index, JCF_u2 flags) { char *override = get_field_name (jcf, name_index, flags); *************** print_field_name (stream, jcf, name_inde *** 703,711 **** } static void ! DEFUN(print_field_info, (stream, jcf, name_index, sig_index, flags), ! FILE *stream AND JCF* jcf ! AND int name_index AND int sig_index AND JCF_u2 flags) { char *override = NULL; --- 685,692 ---- } static void ! print_field_info (FILE *stream, JCF* jcf, int name_index, int sig_index, ! JCF_u2 flags) { char *override = NULL; *************** DEFUN(print_field_info, (stream, jcf, na *** 806,814 **** static void ! DEFUN(print_method_info, (stream, jcf, name_index, sig_index, flags), ! FILE *stream AND JCF* jcf ! AND int name_index AND int sig_index AND JCF_u2 flags) { const unsigned char *str; int length, is_init = 0; --- 787,794 ---- static void ! print_method_info (FILE *stream, JCF* jcf, int name_index, int sig_index, ! JCF_u2 flags) { const unsigned char *str; int length, is_init = 0; *************** DEFUN(print_method_info, (stream, jcf, n *** 918,927 **** signature. NAMEINDEX is the index of the field name; -1 for `this'. OBJECTTYPE is the index of the object's type. */ static void ! decompile_return_statement (out, jcf, methodtype, nameindex, objecttype) ! FILE *out; ! JCF *jcf; ! int methodtype, nameindex, objecttype; { int cast = 0; int obj_name_len, method_name_len; --- 898,905 ---- signature. NAMEINDEX is the index of the field name; -1 for `this'. OBJECTTYPE is the index of the object's type. */ static void ! decompile_return_statement (FILE *out, JCF *jcf, int methodtype, ! int nameindex, int objecttype) { int cast = 0; int obj_name_len, method_name_len; *************** decompile_return_statement (out, jcf, me *** 1040,1049 **** /* Try to decompile a method body. Right now we just try to handle a simple case that we can do. Expand as desired. */ static void ! decompile_method (out, jcf, code_len) ! FILE *out; ! JCF *jcf; ! int code_len; { const unsigned char *codes = jcf->read_ptr; int index; --- 1018,1024 ---- /* Try to decompile a method body. Right now we just try to handle a simple case that we can do. Expand as desired. */ static void ! decompile_method (FILE *out, JCF *jcf, int code_len) { const unsigned char *codes = jcf->read_ptr; int index; *************** decompile_method (out, jcf, code_len) *** 1112,1119 **** should probably be in hashtab.c to complement the existing string hash function. */ static int ! gcjh_streq (p1, p2) ! const void *p1, *p2; { return ! strcmp ((char *) p1, (char *) p2); } --- 1087,1093 ---- should probably be in hashtab.c to complement the existing string hash function. */ static int ! gcjh_streq (const void *p1, const void *p2) { return ! strcmp ((char *) p1, (char *) p2); } *************** gcjh_streq (p1, p2) *** 1122,1129 **** or 0 if not. CLNAME may be extracted from a signature, and can be terminated with either `;' or NULL. */ static int ! throwable_p (clname) ! const unsigned char *clname; { int length; unsigned char *current; --- 1096,1102 ---- or 0 if not. CLNAME may be extracted from a signature, and can be terminated with either `;' or NULL. */ static int ! throwable_p (const unsigned char *clname) { int length; unsigned char *current; *************** throwable_p (clname) *** 1141,1148 **** if (! init_done) { ! PTR *slot; ! const unsigned char *str; /* Self-initializing. The cost of this really doesn't matter. We also don't care about freeing these, either. */ --- 1114,1121 ---- if (! init_done) { ! void **slot; ! unsigned char *str; /* Self-initializing. The cost of this really doesn't matter. We also don't care about freeing these, either. */ *************** throwable_p (clname) *** 1154,1164 **** /* Make sure the root classes show up in the tables. */ str = xstrdup ("java.lang.Throwable"); slot = htab_find_slot (throw_hash, str, INSERT); ! *slot = (PTR) str; str = xstrdup ("java.lang.Object"); slot = htab_find_slot (non_throw_hash, str, INSERT); ! *slot = (PTR) str; init_done = 1; } --- 1127,1137 ---- /* Make sure the root classes show up in the tables. */ str = xstrdup ("java.lang.Throwable"); slot = htab_find_slot (throw_hash, str, INSERT); ! *slot = str; str = xstrdup ("java.lang.Object"); slot = htab_find_slot (non_throw_hash, str, INSERT); ! *slot = str; init_done = 1; } *************** throwable_p (clname) *** 1180,1186 **** else { JCF jcf; ! PTR *slot; unsigned char *super, *tmp; int super_length = -1; const char *classfile_name = find_class (current, strlen (current), --- 1153,1159 ---- else { JCF jcf; ! void **slot; unsigned char *super, *tmp; int super_length = -1; const char *classfile_name = find_class (current, strlen (current), *************** throwable_p (clname) *** 1222,1231 **** /* Print one piece of a signature. Returns pointer to next parseable character on success, NULL on error. */ static const unsigned char * ! decode_signature_piece (stream, signature, limit, need_space) ! FILE *stream; ! const unsigned char *signature, *limit; ! int *need_space; { const char *ctype; int array_depth = 0; --- 1195,1202 ---- /* Print one piece of a signature. Returns pointer to next parseable character on success, NULL on error. */ static const unsigned char * ! decode_signature_piece (FILE *stream, const unsigned char *signature, ! const unsigned char *limit, int *need_space) { const char *ctype; int array_depth = 0; *************** decode_signature_piece (stream, signatur *** 1387,1397 **** } static void ! DEFUN(print_c_decl, (stream, jcf, name_index, signature_index, is_init, ! name_override, flags), ! FILE* stream AND JCF* jcf ! AND int name_index AND int signature_index ! AND int is_init AND const char *name_override AND int flags) { if (JPOOL_TAG (jcf, signature_index) != CONSTANT_Utf8) { --- 1358,1365 ---- } static void ! print_c_decl (FILE* stream, JCF* jcf, int name_index, int signature_index, ! int is_init, const char *name_override, int flags) { if (JPOOL_TAG (jcf, signature_index) != CONSTANT_Utf8) { *************** DEFUN(print_c_decl, (stream, jcf, name_i *** 1402,1408 **** { int length = JPOOL_UTF_LENGTH (jcf, signature_index); const unsigned char *str0 = JPOOL_UTF_DATA (jcf, signature_index); ! register const unsigned char *str = str0; const unsigned char *limit = str + length; int need_space = 0; int is_method = str[0] == '('; --- 1370,1376 ---- { int length = JPOOL_UTF_LENGTH (jcf, signature_index); const unsigned char *str0 = JPOOL_UTF_DATA (jcf, signature_index); ! const unsigned char *str = str0; const unsigned char *limit = str + length; int need_space = 0; int is_method = str[0] == '('; *************** DEFUN(print_c_decl, (stream, jcf, name_i *** 1438,1449 **** because the "new" C++ ABI changed the alignemnt of non-POD classes. gcj, however, still uses the "old" alignment. */ if (is_first_data_member && ! (flags & ACC_STATIC) && ! is_method) ! { ! is_first_data_member = 0; ! print_cxx_classname (out, " __attribute__((aligned(__alignof__( ", ! jcf, jcf->super_class); ! fputs (" )))) ", stream); ! } /* Now print the name of the thing. */ if (need_space) --- 1406,1417 ---- because the "new" C++ ABI changed the alignemnt of non-POD classes. gcj, however, still uses the "old" alignment. */ if (is_first_data_member && ! (flags & ACC_STATIC) && ! is_method) ! { ! is_first_data_member = 0; ! print_cxx_classname (out, " __attribute__((aligned(__alignof__( ", ! jcf, jcf->super_class, 1); ! fputs (" )))) ", stream); ! } /* Now print the name of the thing. */ if (need_space) *************** DEFUN(print_c_decl, (stream, jcf, name_i *** 1456,1470 **** /* Print the unqualified method name followed by the signature. */ static void ! DEFUN(print_full_cxx_name, (stream, jcf, name_index, signature_index, ! is_init, name_override, flags), ! FILE* stream AND JCF* jcf ! AND int name_index AND int signature_index AND int is_init ! AND const char *name_override AND int flags) { int length = JPOOL_UTF_LENGTH (jcf, signature_index); const unsigned char *str0 = JPOOL_UTF_DATA (jcf, signature_index); ! register const unsigned char *str = str0; const unsigned char *limit = str + length; int need_space = 0; int is_method = str[0] == '('; --- 1424,1436 ---- /* Print the unqualified method name followed by the signature. */ static void ! print_full_cxx_name (FILE* stream, JCF* jcf, int name_index, ! int signature_index, int is_init, ! const char *name_override, int flags) { int length = JPOOL_UTF_LENGTH (jcf, signature_index); const unsigned char *str0 = JPOOL_UTF_DATA (jcf, signature_index); ! const unsigned char *str = str0; const unsigned char *limit = str + length; int need_space = 0; int is_method = str[0] == '('; *************** DEFUN(print_full_cxx_name, (stream, jcf, *** 1549,1562 **** /* This is a helper for print_stub_or_jni. */ static void ! DEFUN (print_name_for_stub_or_jni, (stream, jcf, name_index, signature_index, ! is_init, name_override, flags), ! FILE *stream AND JCF *jcf ! AND int name_index AND int signature_index ! AND int is_init AND const char *name_override AND int flags) { const char *const prefix = flag_jni ? "Java_" : ""; ! print_cxx_classname (stream, prefix, jcf, jcf->this_class); fputs (flag_jni ? "_" : "::", stream); print_full_cxx_name (stream, jcf, name_index, signature_index, is_init, name_override, --- 1515,1526 ---- /* This is a helper for print_stub_or_jni. */ static void ! print_name_for_stub_or_jni (FILE *stream, JCF *jcf, int name_index, ! int signature_index, int is_init, ! const char *name_override, int flags) { const char *const prefix = flag_jni ? "Java_" : ""; ! print_cxx_classname (stream, prefix, jcf, jcf->this_class, 1); fputs (flag_jni ? "_" : "::", stream); print_full_cxx_name (stream, jcf, name_index, signature_index, is_init, name_override, *************** DEFUN (print_name_for_stub_or_jni, (stre *** 1564,1574 **** } static void ! DEFUN(print_stub_or_jni, (stream, jcf, name_index, signature_index, is_init, ! name_override, flags), ! FILE* stream AND JCF* jcf ! AND int name_index AND int signature_index ! AND int is_init AND const char *name_override AND int flags) { if (JPOOL_TAG (jcf, signature_index) != CONSTANT_Utf8) { --- 1528,1536 ---- } static void ! print_stub_or_jni (FILE* stream, JCF* jcf, int name_index, ! int signature_index, int is_init, ! const char *name_override, int flags) { if (JPOOL_TAG (jcf, signature_index) != CONSTANT_Utf8) { *************** DEFUN(print_stub_or_jni, (stream, jcf, n *** 1579,1585 **** { int length = JPOOL_UTF_LENGTH (jcf, signature_index); const unsigned char *str0 = JPOOL_UTF_DATA (jcf, signature_index); ! register const unsigned char *str = str0; const unsigned char *limit = str + length; int need_space = 0; int is_method = str[0] == '('; --- 1541,1547 ---- { int length = JPOOL_UTF_LENGTH (jcf, signature_index); const unsigned char *str0 = JPOOL_UTF_DATA (jcf, signature_index); ! const unsigned char *str = str0; const unsigned char *limit = str + length; int need_space = 0; int is_method = str[0] == '('; *************** DEFUN(print_stub_or_jni, (stream, jcf, n *** 1635,1641 **** if (stubs) { if (flag_jni) ! fputs ("\n{\n (*env)->FatalError (\"", stream); else fputs ("\n{\n throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 (\"", stream); print_name_for_stub_or_jni (stream, jcf, name_index, --- 1597,1603 ---- if (stubs) { if (flag_jni) ! fputs ("\n{\n (*env)->FatalError (env, \"", stream); else fputs ("\n{\n throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 (\"", stream); print_name_for_stub_or_jni (stream, jcf, name_index, *************** DEFUN(print_stub_or_jni, (stream, jcf, n *** 1649,1656 **** } static void ! DEFUN(print_mangled_classname, (stream, jcf, prefix, index), ! FILE *stream AND JCF *jcf AND const char *prefix AND int index) { int name_index = JPOOL_USHORT1 (jcf, index); fputs (prefix, stream); --- 1611,1617 ---- } static void ! print_mangled_classname (FILE *stream, JCF *jcf, const char *prefix, int index) { int name_index = JPOOL_USHORT1 (jcf, index); fputs (prefix, stream); *************** DEFUN(print_mangled_classname, (stream, *** 1664,1674 **** to an array, ignore it and don't print PREFIX. Returns 1 if something was printed, 0 otherwise. */ static int ! print_cxx_classname (stream, prefix, jcf, index) ! FILE *stream; ! const char *prefix; ! JCF *jcf; ! int index; { int name_index = JPOOL_USHORT1 (jcf, index); int len, c; --- 1625,1632 ---- to an array, ignore it and don't print PREFIX. Returns 1 if something was printed, 0 otherwise. */ static int ! print_cxx_classname (FILE *stream, const char *prefix, ! JCF *jcf, int index, int add_scope) { int name_index = JPOOL_USHORT1 (jcf, index); int len, c; *************** print_cxx_classname (stream, prefix, jcf *** 1687,1693 **** fputs (prefix, stream); /* Print a leading "::" so we look in the right namespace. */ ! if (! flag_jni && ! stubs) fputs ("::", stream); while (s < limit) --- 1645,1651 ---- fputs (prefix, stream); /* Print a leading "::" so we look in the right namespace. */ ! if (! flag_jni && ! stubs && add_scope) fputs ("::", stream); while (s < limit) *************** int written_class_count = 0; *** 1707,1715 **** /* Return name of superclass. If LEN is not NULL, fill it with length of name. */ static const unsigned char * ! super_class_name (derived_jcf, len) ! JCF *derived_jcf; ! int *len; { int supername_index = JPOOL_USHORT1 (derived_jcf, derived_jcf->super_class); int supername_length = JPOOL_UTF_LENGTH (derived_jcf, supername_index); --- 1665,1671 ---- /* Return name of superclass. If LEN is not NULL, fill it with length of name. */ static const unsigned char * ! super_class_name (JCF *derived_jcf, int *len) { int supername_index = JPOOL_USHORT1 (derived_jcf, derived_jcf->super_class); int supername_length = JPOOL_UTF_LENGTH (derived_jcf, supername_index); *************** super_class_name (derived_jcf, len) *** 1722,1727 **** --- 1678,1711 ---- return supername; } + static void + handle_inner_classes (int count) + { + int i; + + if (out && ! flag_jni && ! stubs && count > 0) + fprintf (out, "\n"); + + for (i = 0; i < count; ++i) + { + JCF_u2 inner_info_index = JCF_readu2 (current_jcf); + + /* There are a few more values here, but we don't care about + them. The (void) cast is apparently the only way to avoid a + warning here. */ + (void) JCF_readu2 (current_jcf); + (void) JCF_readu2 (current_jcf); + (void) JCF_readu2 (current_jcf); + + if (out && ! flag_jni && ! stubs) + { + print_mangled_classname (out, current_jcf, " friend class ", + inner_info_index); + fprintf (out, ";\n"); + } + } + } + /* We keep track of all the `#include's we generate, so we can avoid *************** static struct include *all_includes = NU *** 1737,1746 **** /* Generate a #include. */ static void ! print_include (out, utf8, len) ! FILE *out; ! const unsigned char *utf8; ! int len; { struct include *incl; --- 1721,1727 ---- /* Generate a #include. */ static void ! print_include (FILE *out, const unsigned char *utf8, int len) { struct include *incl; *************** struct namelet *** 1787,1795 **** struct namelet *next; }; ! static void add_namelet PARAMS ((const unsigned char *, ! const unsigned char *, struct namelet *)); ! static void print_namelet PARAMS ((FILE *, struct namelet *, int)); /* The special root namelet. */ static struct namelet root = --- 1768,1776 ---- struct namelet *next; }; ! static void add_namelet (const unsigned char *, const unsigned char *, ! struct namelet *); ! static void print_namelet (FILE *, struct namelet *, int); /* The special root namelet. */ static struct namelet root = *************** static struct namelet root = *** 1804,1812 **** package or class name and links it into the tree. It does this recursively. */ static void ! add_namelet (name, name_limit, parent) ! const unsigned char *name, *name_limit; ! struct namelet *parent; { const unsigned char *p; struct namelet *n = NULL, *np; --- 1785,1792 ---- package or class name and links it into the tree. It does this recursively. */ static void ! add_namelet (const unsigned char *name, const unsigned char *name_limit, ! struct namelet *parent) { const unsigned char *p; struct namelet *n = NULL, *np; *************** add_namelet (name, name_limit, parent) *** 1863,1872 **** /* Print a single namelet. Destroys namelets while printing. */ static void ! print_namelet (out, name, depth) ! FILE *out; ! struct namelet *name; ! int depth; { int i, term = 0; struct namelet *c; --- 1843,1849 ---- /* Print a single namelet. Destroys namelets while printing. */ static void ! print_namelet (FILE *out, struct namelet *name, int depth) { int i, term = 0; struct namelet *c; *************** print_namelet (out, name, depth) *** 1919,1928 **** we need decls. The signature argument can be a function signature. */ static void ! add_class_decl (out, jcf, signature) ! FILE *out; ! JCF *jcf; ! JCF_u2 signature; { const unsigned char *s = JPOOL_UTF_DATA (jcf, signature); int len = JPOOL_UTF_LENGTH (jcf, signature); --- 1896,1902 ---- we need decls. The signature argument can be a function signature. */ static void ! add_class_decl (FILE *out, JCF *jcf, JCF_u2 signature) { const unsigned char *s = JPOOL_UTF_DATA (jcf, signature); int len = JPOOL_UTF_LENGTH (jcf, signature); *************** add_class_decl (out, jcf, signature) *** 1956,1965 **** statically in libjava; we don't generate declarations for these. This makes the generated headers a bit easier to read. */ static void ! print_class_decls (out, jcf, self) ! FILE *out; ! JCF *jcf; ! int self; { /* Make sure to always add the current class to the list of things that should be declared. */ --- 1930,1936 ---- statically in libjava; we don't generate declarations for these. This makes the generated headers a bit easier to read. */ static void ! print_class_decls (FILE *out, JCF *jcf, int self) { /* Make sure to always add the current class to the list of things that should be declared. */ *************** print_class_decls (out, jcf, self) *** 1977,1991 **** /* We use an initial offset of 0 because the root namelet doesn't cause anything to print. */ print_namelet (out, &root, 0); ! fputs ("};\n\n", out); } } static void ! DEFUN(process_file, (jcf, out), ! JCF *jcf AND FILE *out) { int code, i; uint32 field_start, method_end, method_start; --- 1948,1961 ---- /* We use an initial offset of 0 because the root namelet doesn't cause anything to print. */ print_namelet (out, &root, 0); ! fputs ("}\n\n", out); } } static void ! process_file (JCF *jcf, FILE *out) { int code, i; uint32 field_start, method_end, method_start; *************** DEFUN(process_file, (jcf, out), *** 2153,2159 **** if (! stubs) { ! if (! print_cxx_classname (out, "class ", jcf, jcf->this_class)) { fprintf (stderr, "class is of array type\n"); found_error = 1; --- 2123,2130 ---- if (! stubs) { ! if (! print_cxx_classname (out, "class ", jcf, ! jcf->this_class, 0)) { fprintf (stderr, "class is of array type\n"); found_error = 1; *************** DEFUN(process_file, (jcf, out), *** 2162,2168 **** if (jcf->super_class) { if (! print_cxx_classname (out, " : public ", ! jcf, jcf->super_class)) { fprintf (stderr, "base class is of array type\n"); found_error = 1; --- 2133,2139 ---- if (jcf->super_class) { if (! print_cxx_classname (out, " : public ", ! jcf, jcf->super_class, 1)) { fprintf (stderr, "base class is of array type\n"); found_error = 1; *************** static const struct option options[] = *** 2279,2292 **** }; static void ! usage () { fprintf (stderr, "Try `gcjh --help' for more information.\n"); exit (1); } static void ! help () { printf ("Usage: gcjh [OPTION]... CLASS...\n\n"); printf ("Generate C++ header files from .class files\n\n"); --- 2250,2263 ---- }; static void ! usage (void) { fprintf (stderr, "Try `gcjh --help' for more information.\n"); exit (1); } static void ! help (void) { printf ("Usage: gcjh [OPTION]... CLASS...\n\n"); printf ("Generate C++ header files from .class files\n\n"); *************** help () *** 2324,2330 **** } static void ! version () { printf ("gcjh (GCC) %s\n\n", version_string); printf ("Copyright (C) 2002 Free Software Foundation, Inc.\n"); --- 2295,2301 ---- } static void ! version (void) { printf ("gcjh (GCC) %s\n\n", version_string); printf ("Copyright (C) 2002 Free Software Foundation, Inc.\n"); *************** version () *** 2334,2341 **** } int ! DEFUN(main, (argc, argv), ! int argc AND char** argv) { JCF jcf; int argi; --- 2305,2311 ---- } int ! main (int argc, char** argv) { JCF jcf; int argi; diff -Nrc3pad gcc-3.3.3/gcc/java/java-except.h gcc-3.4.0/gcc/java/java-except.h *** gcc-3.3.3/gcc/java/java-except.h 2000-02-26 19:56:23.000000000 +0000 --- gcc-3.4.0/gcc/java/java-except.h 2003-01-18 22:15:51.000000000 +0000 *************** *** 1,21 **** /* Definitions for exception handling for use by the GNU compiler for the Java(TM) language compiler. ! Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,21 ---- /* Definitions for exception handling for use by the GNU compiler for the Java(TM) language compiler. ! Copyright (C) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** struct eh_range *** 34,40 **** and the TREE_VALUE is the LABEL_DECL of the handler. */ tree handlers; ! /* Surrunding handler, if any. */ struct eh_range *outer; /* The first child range. It is is nested inside this range --- 34,40 ---- and the TREE_VALUE is the LABEL_DECL of the handler. */ tree handlers; ! /* Surrounding handler, if any. */ struct eh_range *outer; /* The first child range. It is is nested inside this range *************** extern struct eh_range whole_range; *** 57,74 **** #define NULL_EH_RANGE (&whole_range) ! extern struct eh_range * find_handler PARAMS ((int)); ! ! extern void method_init_exceptions PARAMS ((void)); ! ! extern void emit_handlers PARAMS ((void)); ! ! extern void maybe_start_try PARAMS ((int, int)); ! ! extern void maybe_end_try PARAMS ((int, int)); ! ! extern void add_handler PARAMS ((int, int, tree, tree)); ! ! extern void handle_nested_ranges PARAMS ((void)); ! ! extern void expand_resume_after_catch PARAMS ((void)); --- 57,67 ---- #define NULL_EH_RANGE (&whole_range) ! extern struct eh_range * find_handler (int); ! extern void method_init_exceptions (void); ! extern void emit_handlers (void); ! extern void maybe_start_try (int, int); ! extern void maybe_end_try (int, int); ! extern void add_handler (int, int, tree, tree); ! extern void handle_nested_ranges (void); ! extern void expand_resume_after_catch (void); diff -Nrc3pad gcc-3.3.3/gcc/java/javaop.def gcc-3.4.0/gcc/java/javaop.def *** gcc-3.3.3/gcc/java/javaop.def 1998-12-16 21:20:37.000000000 +0000 --- gcc-3.4.0/gcc/java/javaop.def 2003-01-01 15:10:01.000000000 +0000 *************** *** 1,21 **** /* Table of opcodes for byte codes defined by the Java(TM) virtual machine specification. ! Copyright (C) 1998 Free Software Foundation, Inc. ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,21 ---- /* Table of opcodes for byte codes defined by the Java(TM) virtual machine specification. ! Copyright (C) 1998, 2003 Free Software Foundation, Inc. ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff -Nrc3pad gcc-3.3.3/gcc/java/javaop.h gcc-3.4.0/gcc/java/javaop.h *** gcc-3.3.3/gcc/java/javaop.h 2003-03-28 22:18:48.000000000 +0000 --- gcc-3.4.0/gcc/java/javaop.h 2003-03-21 17:10:02.000000000 +0000 *************** *** 1,19 **** /* Utility macros to handle Java(TM) byte codes. ! Copyright (C) 1996, 1998, 1999 Free Software Foundation, Inc. ! This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,21 ---- /* Utility macros to handle Java(TM) byte codes. ! Copyright (C) 1996, 1998, 1999, 2003 Free Software Foundation, Inc. ! This file is part of GCC. ! ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** typedef unsigned int16 uint16; *** 37,43 **** #endif typedef unsigned int32 uint32; ! /* A signed 64-bit (or more) integral type, suiteable for Java's 'long'. */ #ifndef int64 #define int64 long long #endif --- 39,45 ---- #endif typedef unsigned int32 uint32; ! /* A signed 64-bit (or more) integral type, suitable for Java's 'long'. */ #ifndef int64 #define int64 long long #endif *************** typedef unsigned int32 uint32; *** 47,57 **** #endif typedef uint16 jchar; - #ifdef __STDC__ typedef signed char jbyte; - #else - typedef char jbyte; - #endif typedef int16 jshort; typedef int32 jint; typedef int64 jlong; --- 49,55 ---- diff -Nrc3pad gcc-3.3.3/gcc/java/java-tree.h gcc-3.4.0/gcc/java/java-tree.h *** gcc-3.3.3/gcc/java/java-tree.h 2002-11-18 18:13:35.000000000 +0000 --- gcc-3.4.0/gcc/java/java-tree.h 2004-01-16 17:11:08.000000000 +0000 *************** *** 1,22 **** /* Definitions for parsing and type checking for the GNU compiler for the Java(TM) language. ! Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,22 ---- /* Definitions for parsing and type checking for the GNU compiler for the Java(TM) language. ! Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 26,31 **** --- 26,34 ---- /* Hacked by Per Bothner February 1996. */ + #ifndef GCC_JAVA_TREE_H + #define GCC_JAVA_TREE_H + #include "hashtab.h" /* Java language-specific tree codes. */ *************** struct JCF; *** 41,47 **** /* Usage of TREE_LANG_FLAG_?: 0: IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P (in IDENTIFIER_NODE) - RESOLVE_EXPRESSION_NAME_P (in EXPR_WITH_FILE_LOCATION) FOR_LOOP_P (in LOOP_EXPR) SUPPRESS_UNREACHABLE_ERROR (for other _EXPR nodes) ANONYMOUS_CLASS_P (in RECORD_TYPE) --- 44,49 ---- *************** struct JCF; *** 106,113 **** LABEL_IS_SUBR_START (in LABEL_DECL) CLASS_ABSTRACT (in TYPE_DECL) FIELD_TRANSIENT (in FIELD_DECL) ! 6: METHOD_TRANSIENT (in FUNCTION_DECL) ! LABEL_CHANGED (in LABEL_DECL) CLASS_SUPER (in TYPE_DECL, ACC_SUPER flag) FIELD_LOCAL_ALIAS (in FIELD_DECL) 7: DECL_CONSTRUCTOR_P (in FUNCTION_DECL). --- 108,114 ---- LABEL_IS_SUBR_START (in LABEL_DECL) CLASS_ABSTRACT (in TYPE_DECL) FIELD_TRANSIENT (in FIELD_DECL) ! 6: LABEL_CHANGED (in LABEL_DECL) CLASS_SUPER (in TYPE_DECL, ACC_SUPER flag) FIELD_LOCAL_ALIAS (in FIELD_DECL) 7: DECL_CONSTRUCTOR_P (in FUNCTION_DECL). *************** extern int compiling_from_source; *** 133,142 **** #define main_class \ java_global_trees[JTI_MAIN_CLASS] ! /* The class we are currently processing. */ #define current_class \ java_global_trees[JTI_CURRENT_CLASS] /* List of all class DECLs seen so far. */ #define all_class_list \ java_global_trees[JTI_ALL_CLASS_LIST] --- 134,150 ---- #define main_class \ java_global_trees[JTI_MAIN_CLASS] ! /* The class we use as the base for name resolution. It's usually the ! class we're generating code for but sometimes it points to an inner ! class. If you really want to know the class we're currently ! generating code for, use output_class instead. */ #define current_class \ java_global_trees[JTI_CURRENT_CLASS] + /* The class we are currently generating. Really. */ + #define output_class \ + java_global_trees[JTI_OUTPUT_CLASS] + /* List of all class DECLs seen so far. */ #define all_class_list \ java_global_trees[JTI_ALL_CLASS_LIST] *************** extern int compiling_from_source; *** 144,160 **** /* List of all class filenames seen so far. */ #define all_class_filename java_global_trees [JTI_ALL_CLASS_FILENAME] ! /* List of virtual method decls called in this translation unit, used to ! generate virtual method offset symbol table. */ ! #define otable_methods java_global_trees [JTI_OTABLE_METHODS] ! /* The virtual method offset table. This is emitted as uninitialized data of ! the required length, and filled out at run time during class linking. */ ! #define otable_decl java_global_trees [JTI_OTABLE_DECL] ! /* The virtual method offset symbol table. Used by the runtime to fill out the ! otable. */ ! #define otable_syms_decl java_global_trees [JTI_OTABLE_SYMS_DECL] extern int flag_emit_class_files; --- 152,166 ---- /* List of all class filenames seen so far. */ #define all_class_filename java_global_trees [JTI_ALL_CLASS_FILENAME] ! /* List of virtual decls referred to by this translation unit, used to ! generate virtual method offset symbol table. */ ! /* The virtual offset table. This is emitted as uninitialized data of ! the required length, and filled out at run time during class ! linking. */ ! /* The virtual offset symbol table. Used by the runtime to fill out ! the otable. */ extern int flag_emit_class_files; *************** extern int flag_jni; *** 173,178 **** --- 179,187 ---- extern int flag_extraneous_semicolon; + /* When nonzero, report use of deprecated classes, methods, or fields. */ + extern int flag_deprecated; + /* When nonzero, always check for a non gcj generated classes archive. */ extern int flag_force_classes_archive_check; *************** extern int flag_emit_xref; *** 186,192 **** extern int do_not_fold; /* Resource name. */ ! extern char * resource_name; /* Turned to 1 if -Wall was encountered. See lang.c for their meanings. */ extern int flag_wall; --- 195,201 ---- extern int do_not_fold; /* Resource name. */ ! extern const char *resource_name; /* Turned to 1 if -Wall was encountered. See lang.c for their meanings. */ extern int flag_wall; *************** extern int flag_store_check; *** 226,232 **** extern const char *current_encoding; /* The Java .class file that provides main_class; the main input file. */ ! extern struct JCF *current_jcf; typedef struct CPool constant_pool; --- 235,245 ---- extern const char *current_encoding; /* The Java .class file that provides main_class; the main input file. */ ! extern GTY(()) struct JCF * current_jcf; ! ! /* Set to nonzero value in order to emit class initialization code ! before static field references. */ ! extern int always_initialize_class_p; typedef struct CPool constant_pool; *************** typedef struct CPool constant_pool; *** 238,244 **** /* The cpool->data[i] for a ResolvedClass points to a RECORD_TYPE. */ #define CONSTANT_ResolvedClass (CONSTANT_Class+CONSTANT_ResolvedFlag) ! #define CPOOL_UTF(CPOOL, INDEX) ((tree) (CPOOL)->data[INDEX]) /* A NameAndType constant is represented as a TREE_LIST. The type is the signature string (as an IDENTIFIER_NODE). */ --- 251,257 ---- /* The cpool->data[i] for a ResolvedClass points to a RECORD_TYPE. */ #define CONSTANT_ResolvedClass (CONSTANT_Class+CONSTANT_ResolvedFlag) ! #define CPOOL_UTF(CPOOL, INDEX) ((CPOOL)->data[INDEX].t) /* A NameAndType constant is represented as a TREE_LIST. The type is the signature string (as an IDENTIFIER_NODE). */ *************** enum java_tree_index *** 281,288 **** JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE, - JTI_BOOLEAN_TYPE_NODE, - JTI_OBJECT_TYPE_NODE, JTI_UNQUALIFIED_OBJECT_ID_NODE, JTI_OBJECT_PTR_TYPE_NODE, --- 294,299 ---- *************** enum java_tree_index *** 293,300 **** JTI_RUNTIME_EXCEPTION_TYPE_NODE, JTI_ERROR_EXCEPTION_TYPE_NODE, JTI_RAWDATA_PTR_TYPE_NODE, - JTI_CLASS_NOT_FOUND_TYPE_NODE, - JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_BYTE_ARRAY_TYPE_NODE, JTI_SHORT_ARRAY_TYPE_NODE, --- 304,309 ---- *************** enum java_tree_index *** 332,340 **** JTI_RETURN_ADDRESS_TYPE_NODE, - JTI_BOOLEAN_TRUE_NODE, - JTI_BOOLEAN_FALSE_NODE, - JTI_LONG_ZERO_NODE, JTI_FLOAT_ZERO_NODE, JTI_DOUBLE_ZERO_NODE, --- 341,346 ---- *************** enum java_tree_index *** 364,372 **** JTI_METHOD_PTR_TYPE_NODE, JTI_OTABLE_TYPE, JTI_OTABLE_PTR_TYPE, ! JTI_METHOD_SYMBOL_TYPE, ! JTI_METHOD_SYMBOLS_ARRAY_TYPE, ! JTI_METHOD_SYMBOLS_ARRAY_PTR_TYPE, JTI_END_PARAMS_NODE, --- 370,380 ---- JTI_METHOD_PTR_TYPE_NODE, JTI_OTABLE_TYPE, JTI_OTABLE_PTR_TYPE, ! JTI_ATABLE_TYPE, ! JTI_ATABLE_PTR_TYPE, ! JTI_SYMBOL_TYPE, ! JTI_SYMBOLS_ARRAY_TYPE, ! JTI_SYMBOLS_ARRAY_PTR_TYPE, JTI_END_PARAMS_NODE, *************** enum java_tree_index *** 399,415 **** JTI_NATIVECODE_PTR_ARRAY_TYPE_NODE, JTI_WFL_OPERATOR, - JTI_CURRENT_CONSTANT_POOL_DATA_REF, JTI_MAIN_CLASS, JTI_CURRENT_CLASS, JTI_ALL_CLASS_LIST, JTI_ALL_CLASS_FILENAME, - JTI_OTABLE_METHODS, - JTI_OTABLE_DECL, - JTI_OTABLE_SYMS_DECL, - JTI_PREDEF_FILENAMES, JTI_MAX --- 407,419 ---- JTI_NATIVECODE_PTR_ARRAY_TYPE_NODE, JTI_WFL_OPERATOR, JTI_MAIN_CLASS, JTI_CURRENT_CLASS, + JTI_OUTPUT_CLASS, JTI_ALL_CLASS_LIST, JTI_ALL_CLASS_FILENAME, JTI_PREDEF_FILENAMES, JTI_MAX *************** extern GTY(()) tree java_global_trees[JT *** 452,460 **** #define decimal_long_max \ java_global_trees[JTI_DECIMAL_LONG_MAX_NODE] - #define boolean_type_node \ - java_global_trees[JTI_BOOLEAN_TYPE_NODE] - #define object_type_node \ java_global_trees[JTI_OBJECT_TYPE_NODE] #define unqualified_object_id_node \ --- 456,461 ---- *************** extern GTY(()) tree java_global_trees[JT *** 475,484 **** java_global_trees[JTI_ERROR_EXCEPTION_TYPE_NODE] #define rawdata_ptr_type_node \ java_global_trees[JTI_RAWDATA_PTR_TYPE_NODE] - #define class_not_found_type_node \ - java_global_trees[JTI_CLASS_NOT_FOUND_TYPE_NODE] - #define no_class_def_found_type_node \ - java_global_trees[JTI_NO_CLASS_DEF_FOUND_TYPE_NODE] #define byte_array_type_node \ java_global_trees[JTI_BYTE_ARRAY_TYPE_NODE] --- 476,481 ---- *************** extern GTY(()) tree java_global_trees[JT *** 551,562 **** #define return_address_type_node \ java_global_trees[JTI_RETURN_ADDRESS_TYPE_NODE] - /* Nodes for boolean constants TRUE and FALSE. */ - #define boolean_true_node \ - java_global_trees[JTI_BOOLEAN_TRUE_NODE] - #define boolean_false_node \ - java_global_trees[JTI_BOOLEAN_FALSE_NODE] - /* Integer constants not declared in tree.h. */ #define long_zero_node \ java_global_trees[JTI_LONG_ZERO_NODE] --- 548,553 ---- *************** extern GTY(()) tree java_global_trees[JT *** 612,625 **** java_global_trees[JTI_METHOD_PTR_TYPE_NODE] #define otable_type \ java_global_trees[JTI_OTABLE_TYPE] #define otable_ptr_type \ java_global_trees[JTI_OTABLE_PTR_TYPE] ! #define method_symbol_type \ ! java_global_trees[JTI_METHOD_SYMBOL_TYPE] ! #define method_symbols_array_type \ ! java_global_trees[JTI_METHOD_SYMBOLS_ARRAY_TYPE] ! #define method_symbols_array_ptr_type \ ! java_global_trees[JTI_METHOD_SYMBOLS_ARRAY_PTR_TYPE] #define end_params_node \ java_global_trees[JTI_END_PARAMS_NODE] --- 603,622 ---- java_global_trees[JTI_METHOD_PTR_TYPE_NODE] #define otable_type \ java_global_trees[JTI_OTABLE_TYPE] + #define atable_type \ + java_global_trees[JTI_ATABLE_TYPE] #define otable_ptr_type \ java_global_trees[JTI_OTABLE_PTR_TYPE] ! #define atable_ptr_type \ ! java_global_trees[JTI_ATABLE_PTR_TYPE] ! #define symbol_type \ ! java_global_trees[JTI_SYMBOL_TYPE] ! #define symbols_array_type \ ! java_global_trees[JTI_SYMBOLS_ARRAY_TYPE] ! #define symbols_array_ptr_type \ ! java_global_trees[JTI_SYMBOLS_ARRAY_PTR_TYPE] ! #define class_refs_decl \ ! Jjava_global_trees[TI_CLASS_REFS_DECL] #define end_params_node \ java_global_trees[JTI_END_PARAMS_NODE] *************** extern GTY(()) tree java_global_trees[JT *** 683,695 **** #define nativecode_ptr_type_node ptr_type_node - /* They need to be reset before processing each class */ - extern struct CPool *outgoing_cpool; - /* If non-NULL, an ADDR_EXPR referencing a VAR_DECL containing - the constant data array for the current class. */ - #define current_constant_pool_data_ref \ - java_global_trees[JTI_CURRENT_CONSTANT_POOL_DATA_REF] - #define wfl_operator \ java_global_trees[JTI_WFL_OPERATOR] --- 680,685 ---- *************** union lang_tree_node *** 772,777 **** --- 762,769 ---- /* Number of local variable slots needed for the arguments of this function. */ #define DECL_ARG_SLOT_COUNT(DECL) \ (DECL_LANG_SPECIFIC(DECL)->u.f.arg_slot_count) + /* Line number of end of function. */ + #define DECL_FUNCTION_LAST_LINE(DECL) (DECL_LANG_SPECIFIC(DECL)->u.f.last_line) /* Information on declaration location */ #define DECL_FUNCTION_WFL(DECL) (DECL_LANG_SPECIFIC(DECL)->u.f.wfl) /* List of checked thrown exceptions, as specified with the `throws' *************** union lang_tree_node *** 812,818 **** (DECL_LANG_SPECIFIC(DECL)->u.f.ict) /* A list of all the static method calls in the method DECL (if optimizing). Actually each TREE_VALUE points to a COMPONT_EXPR that wraps the ! invoation so we can later patch it. */ #define DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND(DECL) \ (DECL_LANG_SPECIFIC(DECL)->u.f.smic) /* The Number of Artificial Parameters (NAP) DECL contains. this$ --- 804,810 ---- (DECL_LANG_SPECIFIC(DECL)->u.f.ict) /* A list of all the static method calls in the method DECL (if optimizing). Actually each TREE_VALUE points to a COMPONT_EXPR that wraps the ! invocation so we can later patch it. */ #define DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND(DECL) \ (DECL_LANG_SPECIFIC(DECL)->u.f.smic) /* The Number of Artificial Parameters (NAP) DECL contains. this$ *************** union lang_tree_node *** 840,846 **** #define FIELD_LOCAL_ALIAS_USED(DECL) DECL_LANG_FLAG_7 (DECL) /* True when DECL is a this$ field. Note that ! FIELD_LOCAL_ALIAS_USED can be differenciated when tested against FIELD_LOCAL_ALIAS. */ #define FIELD_THISN(DECL) DECL_LANG_FLAG_7 (DECL) --- 832,838 ---- #define FIELD_LOCAL_ALIAS_USED(DECL) DECL_LANG_FLAG_7 (DECL) /* True when DECL is a this$ field. Note that ! FIELD_LOCAL_ALIAS_USED can be differentiated when tested against FIELD_LOCAL_ALIAS. */ #define FIELD_THISN(DECL) DECL_LANG_FLAG_7 (DECL) *************** union lang_tree_node *** 918,929 **** /* The original WFL of a final variable. */ #define DECL_FIELD_FINAL_WFL(NODE) \ (DECL_LANG_SPECIFIC(NODE)->u.v.wfl) ! /* In a FUNCTION_DECL for which DECL_BUILT_IN does not hold, this is ! the approximate number of statements in this function. There is ! no need for this number to be exact; it is only used in various ! heuristics regarding optimization. */ ! #define DECL_NUM_STMTS(NODE) \ ! (FUNCTION_DECL_CHECK (NODE)->decl.u1.i) /* True if NODE is a local variable final. */ #define LOCAL_FINAL_P(NODE) (DECL_LANG_SPECIFIC (NODE) && DECL_FINAL (NODE)) /* True if NODE is a final field. */ --- 910,918 ---- /* The original WFL of a final variable. */ #define DECL_FIELD_FINAL_WFL(NODE) \ (DECL_LANG_SPECIFIC(NODE)->u.v.wfl) ! /* The class that's the owner of a dynamic binding table. */ ! #define DECL_OWNER(NODE) \ ! (DECL_LANG_SPECIFIC(NODE)->u.v.owner) /* True if NODE is a local variable final. */ #define LOCAL_FINAL_P(NODE) (DECL_LANG_SPECIFIC (NODE) && DECL_FINAL (NODE)) /* True if NODE is a final field. */ *************** union lang_tree_node *** 938,950 **** /* True if NODE is a class initialization flag. */ #define LOCAL_CLASS_INITIALIZATION_FLAG_P(NODE) \ (DECL_LANG_SPECIFIC (NODE) && LOCAL_CLASS_INITIALIZATION_FLAG(NODE)) /* Create a DECL_LANG_SPECIFIC if necessary. */ #define MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC(T) \ if (DECL_LANG_SPECIFIC (T) == NULL) \ { \ DECL_LANG_SPECIFIC ((T)) \ ! = ((struct lang_decl *) \ ! ggc_alloc_cleared (sizeof (struct lang_decl))); \ DECL_LANG_SPECIFIC (T)->desc = LANG_DECL_VAR; \ } --- 927,941 ---- /* True if NODE is a class initialization flag. */ #define LOCAL_CLASS_INITIALIZATION_FLAG_P(NODE) \ (DECL_LANG_SPECIFIC (NODE) && LOCAL_CLASS_INITIALIZATION_FLAG(NODE)) + /* True if NODE is a variable that is out of scope. */ + #define LOCAL_VAR_OUT_OF_SCOPE_P(NODE) \ + (DECL_LANG_SPECIFIC(NODE)->u.v.freed) /* Create a DECL_LANG_SPECIFIC if necessary. */ #define MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC(T) \ if (DECL_LANG_SPECIFIC (T) == NULL) \ { \ DECL_LANG_SPECIFIC ((T)) \ ! = ggc_alloc_cleared (sizeof (struct lang_decl)); \ DECL_LANG_SPECIFIC (T)->desc = LANG_DECL_VAR; \ } *************** struct lang_decl_func GTY(()) *** 973,978 **** --- 964,970 ---- int max_locals; int max_stack; int arg_slot_count; + int last_line; /* End line number for a function decl */ tree wfl; /* Information on the original location */ tree throws_list; /* Exception specified by `throws' */ tree function_decl_body; /* Hold all function's statements */ *************** struct lang_decl_func GTY(()) *** 995,1000 **** --- 987,995 ---- unsigned int fixed_ctor : 1; unsigned int init_calls_this : 1; unsigned int strictfp : 1; + unsigned int invisible : 1; /* Set for methods we generate + internally but which shouldn't be + written to the .class file. */ }; struct treetreehash_entry GTY(()) *************** struct treetreehash_entry GTY(()) *** 1003,1011 **** tree value; }; ! extern tree java_treetreehash_find PARAMS ((htab_t, tree)); ! extern tree * java_treetreehash_new PARAMS ((htab_t, tree)); ! extern htab_t java_treetreehash_create PARAMS ((size_t size, int ggc)); /* DECL_LANG_SPECIFIC for VAR_DECL, PARM_DECL and sometimes FIELD_DECL (access methods on outer class fields) and final fields. */ --- 998,1006 ---- tree value; }; ! extern tree java_treetreehash_find (htab_t, tree); ! extern tree * java_treetreehash_new (htab_t, tree); ! extern htab_t java_treetreehash_create (size_t size, int ggc); /* DECL_LANG_SPECIFIC for VAR_DECL, PARM_DECL and sometimes FIELD_DECL (access methods on outer class fields) and final fields. */ *************** struct lang_decl_var GTY(()) *** 1017,1024 **** --- 1012,1021 ---- tree slot_chain; tree am; /* Access method for this field (1.1) */ tree wfl; /* Original wfl */ + tree owner; unsigned int final_iud : 1; /* Final initialized upon declaration */ unsigned int cif : 1; /* True: decl is a class initialization flag */ + unsigned int freed; /* Decl is no longer in scope. */ }; /* This is what 'lang_decl' really points to. */ *************** struct lang_decl GTY(()) *** 1046,1054 **** #define MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC(T) \ if (TYPE_LANG_SPECIFIC ((T)) == NULL) \ { \ ! TYPE_LANG_SPECIFIC ((T)) = \ ! ((struct lang_type *) \ ! ggc_alloc_cleared (sizeof (struct lang_type))); \ } #define TYPE_FINIT_STMT_LIST(T) (TYPE_LANG_SPECIFIC(T)->finit_stmt_list) --- 1043,1050 ---- #define MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC(T) \ if (TYPE_LANG_SPECIFIC ((T)) == NULL) \ { \ ! TYPE_LANG_SPECIFIC ((T)) \ ! = ggc_alloc_cleared (sizeof (struct lang_type)); \ } #define TYPE_FINIT_STMT_LIST(T) (TYPE_LANG_SPECIFIC(T)->finit_stmt_list) *************** struct lang_decl GTY(()) *** 1065,1075 **** #define TYPE_STRICTFP(T) (TYPE_LANG_SPECIFIC(T)->strictfp) #define TYPE_USES_ASSERTIONS(T) (TYPE_LANG_SPECIFIC(T)->assertions) struct lang_type GTY(()) { tree signature; ! struct JCF * GTY ((skip (""))) jcf; ! struct CPool * GTY ((skip (""))) cpool; tree cpool_data_ref; /* Cached */ tree finit_stmt_list; /* List of statements finit$ will use */ tree clinit_stmt_list; /* List of statements will use */ --- 1061,1084 ---- #define TYPE_STRICTFP(T) (TYPE_LANG_SPECIFIC(T)->strictfp) #define TYPE_USES_ASSERTIONS(T) (TYPE_LANG_SPECIFIC(T)->assertions) + #define TYPE_ATABLE_METHODS(T) (TYPE_LANG_SPECIFIC(T)->atable_methods) + #define TYPE_ATABLE_SYMS_DECL(T) (TYPE_LANG_SPECIFIC(T)->atable_syms_decl) + #define TYPE_ATABLE_DECL(T) (TYPE_LANG_SPECIFIC(T)->atable_decl) + + #define TYPE_OTABLE_METHODS(T) (TYPE_LANG_SPECIFIC(T)->otable_methods) + #define TYPE_OTABLE_SYMS_DECL(T) (TYPE_LANG_SPECIFIC(T)->otable_syms_decl) + #define TYPE_OTABLE_DECL(T) (TYPE_LANG_SPECIFIC(T)->otable_decl) + + #define TYPE_CTABLE_DECL(T) (TYPE_LANG_SPECIFIC(T)->ctable_decl) + #define TYPE_CATCH_CLASSES(T) (TYPE_LANG_SPECIFIC(T)->catch_classes) + + #define TYPE_TO_RUNTIME_MAP(T) (TYPE_LANG_SPECIFIC(T)->type_to_runtime_map) + struct lang_type GTY(()) { tree signature; ! struct JCF * jcf; ! struct CPool * cpool; tree cpool_data_ref; /* Cached */ tree finit_stmt_list; /* List of statements finit$ will use */ tree clinit_stmt_list; /* List of statements will use */ *************** struct lang_type GTY(()) *** 1081,1086 **** --- 1090,1110 ---- tree package_list; /* List of package names, progressive */ tree import_list; /* Imported types, in the CU of this class */ tree import_demand_list; /* Imported types, in the CU of this class */ + + tree otable_methods; /* List of static decls referred to by this class. */ + tree otable_decl; /* The static address table. */ + tree otable_syms_decl; + + tree atable_methods; /* List of static decls referred to by this class. */ + tree atable_decl; /* The static address table. */ + tree atable_syms_decl; + + tree ctable_decl; /* The table of classes for the runtime type matcher. */ + tree catch_classes; + + htab_t GTY ((param_is (struct treetreehash_entry))) type_to_runtime_map; + /* The mapping of classes to exception region markers. */ + unsigned pic:1; /* Private Inner Class. */ unsigned poic:1; /* Protected Inner Class. */ unsigned strictfp:1; /* `strictfp' class. */ *************** struct lang_type GTY(()) *** 1090,1310 **** #define JCF_u4 unsigned long #define JCF_u2 unsigned short ! extern void java_parse_file PARAMS ((int)); ! extern bool java_mark_addressable PARAMS ((tree)); ! extern tree java_type_for_mode PARAMS ((enum machine_mode, int)); ! extern tree java_type_for_size PARAMS ((unsigned int, int)); ! extern tree java_unsigned_type PARAMS ((tree)); ! extern tree java_signed_type PARAMS ((tree)); ! extern tree java_signed_or_unsigned_type PARAMS ((int, tree)); ! extern tree java_truthvalue_conversion PARAMS ((tree)); ! extern void add_assume_compiled PARAMS ((const char *, int)); ! extern tree lookup_class PARAMS ((tree)); ! extern tree lookup_java_constructor PARAMS ((tree, tree)); ! extern tree lookup_java_method PARAMS ((tree, tree, tree)); ! extern tree lookup_argument_method PARAMS ((tree, tree, tree)); ! extern tree lookup_argument_method2 PARAMS ((tree, tree, tree)); ! extern int has_method PARAMS ((tree, tree)); ! extern tree promote_type PARAMS ((tree)); ! extern tree get_constant PARAMS ((struct JCF*, int)); ! extern tree get_name_constant PARAMS ((struct JCF*, int)); ! extern tree get_class_constant PARAMS ((struct JCF*, int)); ! extern tree parse_signature PARAMS ((struct JCF *jcf, int sig_index)); ! extern tree add_field PARAMS ((tree, tree, tree, int)); ! extern tree add_method PARAMS ((tree, int, tree, tree)); ! extern tree add_method_1 PARAMS ((tree, int, tree, tree)); ! extern tree make_class PARAMS ((void)); ! extern tree push_class PARAMS ((tree, tree)); ! extern tree unmangle_classname PARAMS ((const char *name, int name_length)); ! extern tree parse_signature_string PARAMS ((const unsigned char *, int)); ! extern tree get_type_from_signature PARAMS ((tree)); ! extern void layout_class PARAMS ((tree)); ! extern tree layout_class_method PARAMS ((tree, tree, tree, tree)); ! extern void layout_class_methods PARAMS ((tree)); ! extern tree build_class_ref PARAMS ((tree)); ! extern tree build_dtable_decl PARAMS ((tree)); ! extern tree build_internal_class_name PARAMS ((tree)); ! extern tree build_constants_constructor PARAMS ((void)); ! extern tree build_ref_from_constant_pool PARAMS ((int)); ! extern void compile_resource_file PARAMS ((char *, const char *)); ! extern tree build_utf8_ref PARAMS ((tree)); ! extern tree ident_subst PARAMS ((const char*, int, ! const char*, int, int, const char*)); ! extern tree identifier_subst PARAMS ((const tree, ! const char *, int, int, const char *)); ! extern int global_bindings_p PARAMS ((void)); ! extern int kept_level_p PARAMS ((void)); ! extern tree getdecls PARAMS ((void)); ! extern void pushlevel PARAMS ((int)); ! extern tree poplevel PARAMS ((int,int, int)); ! extern void insert_block PARAMS ((tree)); ! extern void set_block PARAMS ((tree)); ! extern tree pushdecl PARAMS ((tree)); ! extern void java_init_decl_processing PARAMS ((void)); ! extern void java_dup_lang_specific_decl PARAMS ((tree)); ! extern tree build_java_signature PARAMS ((tree)); ! extern tree build_java_argument_signature PARAMS ((tree)); ! extern void set_java_signature PARAMS ((tree, tree)); ! extern tree build_static_field_ref PARAMS ((tree)); ! extern tree build_address_of PARAMS ((tree)); ! extern tree find_local_variable PARAMS ((int index, tree type, int pc)); ! extern tree find_stack_slot PARAMS ((int index, tree type)); ! extern tree build_prim_array_type PARAMS ((tree, HOST_WIDE_INT)); ! extern tree build_java_array_type PARAMS ((tree, HOST_WIDE_INT)); ! extern int is_compiled_class PARAMS ((tree)); ! extern tree mangled_classname PARAMS ((const char*, tree)); ! extern tree lookup_label PARAMS ((int)); ! extern tree pop_type_0 PARAMS ((tree, char**)); ! extern tree pop_type PARAMS ((tree)); ! extern tree decode_newarray_type PARAMS ((int)); ! extern tree lookup_field PARAMS ((tree*, tree)); ! extern int is_array_type_p PARAMS ((tree)); ! extern HOST_WIDE_INT java_array_type_length PARAMS ((tree)); ! extern int read_class PARAMS ((tree)); ! extern void load_class PARAMS ((tree, int)); ! extern tree check_for_builtin PARAMS ((tree, tree)); ! extern void initialize_builtins PARAMS ((void)); ! extern tree lookup_name PARAMS ((tree)); ! extern tree build_known_method_ref PARAMS ((tree, tree, tree, tree, tree)); ! extern tree build_class_init PARAMS ((tree, tree)); ! extern tree build_invokevirtual PARAMS ((tree, tree)); ! extern tree build_invokeinterface PARAMS ((tree, tree)); ! extern tree build_jni_stub PARAMS ((tree)); ! extern tree invoke_build_dtable PARAMS ((int, tree)); ! extern tree build_field_ref PARAMS ((tree, tree, tree)); ! extern void pushdecl_force_head PARAMS ((tree)); ! extern tree build_java_binop PARAMS ((enum tree_code, tree, tree, tree)); ! extern tree build_java_soft_divmod PARAMS ((enum tree_code, tree, tree, tree)); ! extern tree binary_numeric_promotion PARAMS ((tree, tree, tree *, tree *)); ! extern tree build_java_arrayaccess PARAMS ((tree, tree, tree)); ! extern tree build_java_arraystore_check PARAMS ((tree, tree)); ! extern tree build_newarray PARAMS ((int, tree)); ! extern tree build_anewarray PARAMS ((tree, tree)); ! extern tree build_new_array PARAMS ((tree, tree)); ! extern tree build_java_array_length_access PARAMS ((tree)); ! extern tree build_java_arraynull_check PARAMS ((tree, tree, tree)); ! extern tree build_java_indirect_ref PARAMS ((tree, tree, int)); ! extern tree java_check_reference PARAMS ((tree, int)); ! extern tree build_get_class PARAMS ((tree)); ! extern tree build_instanceof PARAMS ((tree, tree)); ! extern tree create_label_decl PARAMS ((tree)); ! extern void push_labeled_block PARAMS ((tree)); ! extern tree prepare_eh_table_type PARAMS ((tree)); ! extern tree build_exception_object_ref PARAMS ((tree)); ! extern tree generate_name PARAMS ((void)); ! extern void pop_labeled_block PARAMS ((void)); ! extern const char *lang_printable_name PARAMS ((tree, int)); ! extern tree maybe_add_interface PARAMS ((tree, tree)); ! extern void set_super_info PARAMS ((int, tree, tree, int)); ! extern void set_class_decl_access_flags PARAMS ((int, tree)); ! extern int get_access_flags_from_decl PARAMS ((tree)); ! extern int interface_of_p PARAMS ((tree, tree)); ! extern int inherits_from_p PARAMS ((tree, tree)); ! extern int common_enclosing_context_p PARAMS ((tree, tree)); ! extern int enclosing_context_p PARAMS ((tree, tree)); ! extern void complete_start_java_method PARAMS ((tree)); ! extern tree build_result_decl PARAMS ((tree)); ! extern void emit_handlers PARAMS ((void)); ! extern void init_outgoing_cpool PARAMS ((void)); ! extern void make_class_data PARAMS ((tree)); ! extern void register_class PARAMS ((void)); ! extern int alloc_name_constant PARAMS ((int, tree)); ! extern void emit_register_classes PARAMS ((void)); ! extern void emit_offset_symbol_table PARAMS ((void)); ! extern void lang_init_source PARAMS ((int)); ! extern void write_classfile PARAMS ((tree)); ! extern char *print_int_node PARAMS ((tree)); ! extern void parse_error_context PARAMS ((tree cl, const char *, ...)) ATTRIBUTE_PRINTF_2; ! extern void finish_class PARAMS ((void)); ! extern void java_layout_seen_class_methods PARAMS ((void)); ! extern void check_for_initialization PARAMS ((tree, tree)); ! extern tree pushdecl_top_level PARAMS ((tree)); ! extern int alloc_class_constant PARAMS ((tree)); ! extern void init_expr_processing PARAMS ((void)); ! extern void push_super_field PARAMS ((tree, tree)); ! extern void init_class_processing PARAMS ((void)); ! extern int can_widen_reference_to PARAMS ((tree, tree)); ! extern int class_depth PARAMS ((tree)); ! extern int verify_jvm_instructions PARAMS ((struct JCF *, const unsigned char *, long)); ! extern void maybe_pushlevels PARAMS ((int)); ! extern void maybe_poplevels PARAMS ((int)); ! extern void force_poplevels PARAMS ((int)); ! extern int process_jvm_instruction PARAMS ((int, const unsigned char *, long)); ! extern int maybe_adjust_start_pc PARAMS ((struct JCF *, int, int, int)); ! extern void set_local_type PARAMS ((int, tree)); ! extern int merge_type_state PARAMS ((tree)); ! extern int push_type_0 PARAMS ((tree)); ! extern void push_type PARAMS ((tree)); ! extern void load_type_state PARAMS ((tree)); ! extern void add_interface PARAMS ((tree, tree)); ! extern tree force_evaluation_order PARAMS ((tree)); ! extern int verify_constant_pool PARAMS ((struct JCF *)); ! extern void start_java_method PARAMS ((tree)); ! extern void end_java_method PARAMS ((void)); ! extern void give_name_to_locals PARAMS ((struct JCF *)); ! extern void note_instructions PARAMS ((struct JCF *, tree)); ! extern void expand_byte_code PARAMS ((struct JCF *, tree)); ! extern int open_in_zip PARAMS ((struct JCF *, const char *, const char *, int)); ! extern void set_constant_value PARAMS ((tree, tree)); #ifdef jword ! extern int find_constant1 PARAMS ((struct CPool *, int, jword)); ! extern int find_constant2 PARAMS ((struct CPool *, int, jword, jword)); #endif ! extern int find_utf8_constant PARAMS ((struct CPool *, tree)); ! extern int find_string_constant PARAMS ((struct CPool *, tree)); ! extern int find_class_constant PARAMS ((struct CPool *, tree)); ! extern int find_fieldref_index PARAMS ((struct CPool *, tree)); ! extern int find_methodref_index PARAMS ((struct CPool *, tree)); ! extern int find_methodref_with_class_index PARAMS ((struct CPool *, tree, tree)); ! extern void write_constant_pool PARAMS ((struct CPool *, unsigned char *, int)); ! extern int count_constant_pool_bytes PARAMS ((struct CPool *)); ! extern int encode_newarray_type PARAMS ((tree)); #ifdef uint64 ! extern void format_int PARAMS ((char *, jlong, int)); ! extern void format_uint PARAMS ((char *, uint64, int)); #endif ! extern void jcf_trim_old_input PARAMS ((struct JCF *)); #ifdef BUFSIZ ! extern void jcf_print_utf8 PARAMS ((FILE *, const unsigned char *, int)); ! extern void jcf_print_char PARAMS ((FILE *, int)); ! extern void jcf_print_utf8_replace PARAMS ((FILE *, const unsigned char *, ! int, int, int)); ! extern const char* open_class PARAMS ((const char *, struct JCF *, ! int, const char *)); #endif ! extern void java_debug_context PARAMS ((void)); ! extern void safe_layout_class PARAMS ((tree)); ! extern tree get_boehm_type_descriptor PARAMS ((tree)); ! extern bool class_has_finalize_method PARAMS ((tree)); ! extern void java_check_methods PARAMS ((tree)); ! extern void init_jcf_parse PARAMS((void)); ! extern void init_src_parse PARAMS((void)); ! extern int cxx_keyword_p PARAMS ((const char *, int)); ! extern tree java_mangle_decl PARAMS ((struct obstack *, tree)); ! extern tree java_mangle_class_field PARAMS ((struct obstack *, tree)); ! extern tree java_mangle_class_field_from_string PARAMS ((struct obstack *, char *)); ! extern tree java_mangle_vtable PARAMS ((struct obstack *, tree)); ! extern const char *lang_printable_name_wls PARAMS ((tree, int)); ! extern void append_gpp_mangled_name PARAMS ((const char *, int)); ! extern void add_predefined_file PARAMS ((tree)); ! extern int predefined_filename_p PARAMS ((tree)); ! extern void java_optimize_inline PARAMS ((tree)); ! extern tree decl_constant_value PARAMS ((tree)); #if defined(RTX_CODE) && defined (HAVE_MACHINE_MODES) ! struct rtx_def * java_expand_expr PARAMS ((tree, rtx, enum machine_mode, ! int)); #endif ! extern void java_inlining_merge_static_initializers PARAMS ((tree, void *)); ! extern void java_inlining_map_static_initializers PARAMS ((tree, void *)); #define DECL_FINAL(DECL) DECL_LANG_FLAG_3 (DECL) --- 1114,1349 ---- #define JCF_u4 unsigned long #define JCF_u2 unsigned short ! /* Possible values to pass to lookup_argument_method_generic. */ ! #define SEARCH_INTERFACE 1 ! #define SEARCH_SUPER 2 ! #define SEARCH_VISIBLE 4 ! extern void java_parse_file (int); ! extern bool java_mark_addressable (tree); ! extern tree java_type_for_mode (enum machine_mode, int); ! extern tree java_type_for_size (unsigned int, int); ! extern tree java_unsigned_type (tree); ! extern tree java_signed_type (tree); ! extern tree java_signed_or_unsigned_type (int, tree); ! extern tree java_truthvalue_conversion (tree); ! extern void add_assume_compiled (const char *, int); ! extern tree lookup_class (tree); ! extern tree lookup_java_constructor (tree, tree); ! extern tree lookup_java_method (tree, tree, tree); ! extern tree lookup_argument_method (tree, tree, tree); ! extern tree lookup_argument_method_generic (tree, tree, tree, int); ! extern int has_method (tree, tree); ! extern tree promote_type (tree); ! extern tree get_constant (struct JCF*, int); ! extern tree get_name_constant (struct JCF*, int); ! extern tree get_class_constant (struct JCF*, int); ! extern tree parse_signature (struct JCF *jcf, int sig_index); ! extern tree add_field (tree, tree, tree, int); ! extern tree add_method (tree, int, tree, tree); ! extern tree add_method_1 (tree, int, tree, tree); ! extern tree make_class (void); ! extern tree push_class (tree, tree); ! extern tree unmangle_classname (const char *name, int name_length); ! extern tree parse_signature_string (const unsigned char *, int); ! extern tree get_type_from_signature (tree); ! extern void layout_class (tree); ! extern tree layout_class_method (tree, tree, tree, tree); ! extern void layout_class_methods (tree); ! extern tree build_class_ref (tree); ! extern tree build_dtable_decl (tree); ! extern tree build_internal_class_name (tree); ! extern tree build_constants_constructor (void); ! extern tree build_ref_from_constant_pool (int); ! extern tree build_utf8_ref (tree); ! extern tree ident_subst (const char*, int, const char*, int, int, const char*); ! extern tree identifier_subst (const tree, const char *, int, int, const char *); ! extern int global_bindings_p (void); ! extern int kept_level_p (void); ! extern tree getdecls (void); ! extern void pushlevel (int); ! extern tree poplevel (int,int, int); ! extern void insert_block (tree); ! extern void set_block (tree); ! extern tree pushdecl (tree); ! extern void java_init_decl_processing (void); ! extern void java_dup_lang_specific_decl (tree); ! extern tree build_java_signature (tree); ! extern tree build_java_argument_signature (tree); ! extern void set_java_signature (tree, tree); ! extern tree build_static_field_ref (tree); ! extern tree build_address_of (tree); ! extern tree find_local_variable (int index, tree type, int pc); ! extern tree find_stack_slot (int index, tree type); ! extern tree build_prim_array_type (tree, HOST_WIDE_INT); ! extern tree build_java_array_type (tree, HOST_WIDE_INT); ! extern int is_compiled_class (tree); ! extern tree mangled_classname (const char*, tree); ! extern tree lookup_label (int); ! extern tree pop_type_0 (tree, char**); ! extern tree pop_type (tree); ! extern tree decode_newarray_type (int); ! extern tree lookup_field (tree*, tree); ! extern int is_array_type_p (tree); ! extern HOST_WIDE_INT java_array_type_length (tree); ! extern int read_class (tree); ! extern void load_class (tree, int); ! extern tree check_for_builtin (tree, tree); ! extern void initialize_builtins (void); ! ! extern tree lookup_name (tree); ! extern tree build_known_method_ref (tree, tree, tree, tree, tree); ! extern tree build_class_init (tree, tree); ! extern tree build_invokevirtual (tree, tree); ! extern tree build_invokeinterface (tree, tree); ! extern tree build_jni_stub (tree); ! extern tree invoke_build_dtable (int, tree); ! extern tree build_field_ref (tree, tree, tree); ! extern void pushdecl_force_head (tree); ! extern tree build_java_binop (enum tree_code, tree, tree, tree); ! extern tree build_java_soft_divmod (enum tree_code, tree, tree, tree); ! extern tree binary_numeric_promotion (tree, tree, tree *, tree *); ! extern tree build_java_arrayaccess (tree, tree, tree); ! extern tree build_java_arraystore_check (tree, tree); ! extern tree build_newarray (int, tree); ! extern tree build_anewarray (tree, tree); ! extern tree build_new_array (tree, tree); ! extern tree build_java_array_length_access (tree); ! extern tree build_java_arraynull_check (tree, tree, tree); ! extern tree build_java_indirect_ref (tree, tree, int); ! extern tree java_check_reference (tree, int); ! extern tree build_get_class (tree); ! extern tree build_instanceof (tree, tree); ! extern tree create_label_decl (tree); ! extern void push_labeled_block (tree); ! extern tree prepare_eh_table_type (tree); ! extern void java_expand_catch_classes (tree); ! extern tree build_exception_object_ref (tree); ! extern tree generate_name (void); ! extern void pop_labeled_block (void); ! extern const char *lang_printable_name (tree, int); ! extern tree maybe_add_interface (tree, tree); ! extern void set_super_info (int, tree, tree, int); ! extern void set_class_decl_access_flags (int, tree); ! extern int get_access_flags_from_decl (tree); ! extern int interface_of_p (tree, tree); ! extern int inherits_from_p (tree, tree); ! extern int common_enclosing_context_p (tree, tree); ! extern int enclosing_context_p (tree, tree); ! extern void complete_start_java_method (tree); ! extern tree build_result_decl (tree); ! extern void emit_handlers (void); ! extern void make_class_data (tree); ! extern void register_class (void); ! extern int alloc_name_constant (int, tree); ! extern void emit_register_classes (void); ! extern tree emit_symbol_table (tree, tree, tree, tree, tree); ! extern void lang_init_source (int); ! extern void write_classfile (tree); ! extern char *print_int_node (tree); ! extern void parse_error_context (tree cl, const char *, ...) ATTRIBUTE_PRINTF_2; ! extern void finish_class (void); ! extern void java_layout_seen_class_methods (void); ! extern void check_for_initialization (tree, tree); ! extern tree pushdecl_top_level (tree); ! extern int alloc_class_constant (tree); ! extern void init_expr_processing (void); ! extern void push_super_field (tree, tree); ! extern void init_class_processing (void); ! extern int can_widen_reference_to (tree, tree); ! extern int class_depth (tree); ! extern int verify_jvm_instructions (struct JCF *, const unsigned char *, long); ! extern void maybe_pushlevels (int); ! extern void maybe_poplevels (int); ! extern void force_poplevels (int); ! extern int process_jvm_instruction (int, const unsigned char *, long); ! extern int maybe_adjust_start_pc (struct JCF *, int, int, int); ! extern void set_local_type (int, tree); ! extern int merge_type_state (tree); ! extern int push_type_0 (tree); ! extern void push_type (tree); ! extern void load_type_state (tree); ! extern void add_interface (tree, tree); ! extern tree force_evaluation_order (tree); ! extern int verify_constant_pool (struct JCF *); ! extern void start_java_method (tree); ! extern void end_java_method (void); ! extern void give_name_to_locals (struct JCF *); ! extern void note_instructions (struct JCF *, tree); ! extern void expand_byte_code (struct JCF *, tree); ! extern int open_in_zip (struct JCF *, const char *, const char *, int); ! extern void set_constant_value (tree, tree); #ifdef jword ! extern int find_constant1 (struct CPool *, int, jword); ! extern int find_constant2 (struct CPool *, int, jword, jword); #endif ! extern int find_utf8_constant (struct CPool *, tree); ! extern int find_string_constant (struct CPool *, tree); ! extern int find_class_constant (struct CPool *, tree); ! extern int find_fieldref_index (struct CPool *, tree); ! extern int find_methodref_index (struct CPool *, tree); ! extern int find_methodref_with_class_index (struct CPool *, tree, tree); ! extern void write_constant_pool (struct CPool *, unsigned char *, int); ! extern int count_constant_pool_bytes (struct CPool *); ! extern int encode_newarray_type (tree); #ifdef uint64 ! extern void format_int (char *, jlong, int); ! extern void format_uint (char *, uint64, int); #endif ! extern void jcf_trim_old_input (struct JCF *); #ifdef BUFSIZ ! extern void jcf_print_utf8 (FILE *, const unsigned char *, int); ! extern void jcf_print_char (FILE *, int); ! extern void jcf_print_utf8_replace (FILE *, const unsigned char *, int, int, int); ! extern const char* open_class (const char *, struct JCF *, int, const char *); #endif ! extern void java_debug_context (void); ! extern void safe_layout_class (tree); ! extern tree get_boehm_type_descriptor (tree); ! extern bool class_has_finalize_method (tree); ! extern void java_check_methods (tree); ! extern void init_jcf_parse (void); ! extern void init_src_parse (void); ! extern int cxx_keyword_p (const char *, int); ! extern tree java_mangle_decl (struct obstack *, tree); ! extern tree java_mangle_class_field (struct obstack *, tree); ! extern tree java_mangle_class_field_from_string (struct obstack *, char *); ! extern tree java_mangle_vtable (struct obstack *, tree); ! extern const char *lang_printable_name_wls (tree, int); ! extern void append_gpp_mangled_name (const char *, int); ! extern void add_predefined_file (tree); ! extern int predefined_filename_p (tree); ! extern tree decl_constant_value (tree); ! ! extern void java_mark_class_local (tree); #if defined(RTX_CODE) && defined (HAVE_MACHINE_MODES) ! struct rtx_def * java_expand_expr (tree, rtx, enum machine_mode, int, rtx *); #endif ! extern void java_inlining_merge_static_initializers (tree, void *); ! extern void java_inlining_map_static_initializers (tree, void *); ! ! extern void compile_resource_data (const char *name, const char *buffer, int); ! extern void compile_resource_file (const char *, const char *); ! extern void write_resource_constructor (void); ! extern void init_resource_processing (void); ! ! extern void start_complete_expand_method (tree); ! extern void java_expand_body (tree); ! ! extern int get_symbol_table_index (tree, tree *); ! ! extern tree make_catch_class_record (tree, tree); ! extern tree emit_catch_table (tree); ! ! extern void gen_indirect_dispatch_tables (tree type); #define DECL_FINAL(DECL) DECL_LANG_FLAG_3 (DECL) *************** extern void java_inlining_map_static_ini *** 1318,1325 **** #define METHOD_SYNCHRONIZED(DECL) DECL_LANG_FLAG_4 (DECL) #define METHOD_NATIVE(DECL) (DECL_LANG_SPECIFIC(DECL)->u.f.native) #define METHOD_ABSTRACT(DECL) DECL_LANG_FLAG_5 (DECL) - #define METHOD_TRANSIENT(DECL) DECL_LANG_FLAG_6 (DECL) #define METHOD_STRICTFP(DECL) (DECL_LANG_SPECIFIC (DECL)->u.f.strictfp) #define JAVA_FILE_P(NODE) TREE_LANG_FLAG_2 (NODE) #define CLASS_FILE_P(NODE) TREE_LANG_FLAG_3 (NODE) --- 1357,1364 ---- #define METHOD_SYNCHRONIZED(DECL) DECL_LANG_FLAG_4 (DECL) #define METHOD_NATIVE(DECL) (DECL_LANG_SPECIFIC(DECL)->u.f.native) #define METHOD_ABSTRACT(DECL) DECL_LANG_FLAG_5 (DECL) #define METHOD_STRICTFP(DECL) (DECL_LANG_SPECIFIC (DECL)->u.f.strictfp) + #define METHOD_INVISIBLE(DECL) (DECL_LANG_SPECIFIC (DECL)->u.f.invisible) #define JAVA_FILE_P(NODE) TREE_LANG_FLAG_2 (NODE) #define CLASS_FILE_P(NODE) TREE_LANG_FLAG_3 (NODE) *************** extern tree *type_map; *** 1524,1539 **** #define MODIFY_EXPR_FROM_INITIALIZATION_P(EXPR) TREE_LANG_FLAG_2 (EXPR) /* True if EXPR (a TREE_TYPE denoting a class type) has its methods ! already checked (for redifitions, etc, see java_check_regular_methods.) */ #define CLASS_METHOD_CHECKED_P(EXPR) TREE_LANG_FLAG_2 (EXPR) /* True if TYPE (a TREE_TYPE denoting a class type) was found to feature a finalizer method. */ #define HAS_FINALIZER_P(EXPR) TREE_LANG_FLAG_3 (EXPR) - /* True if EXPR (a WFL in that case) resolves into an expression name */ - #define RESOLVE_EXPRESSION_NAME_P(WFL) TREE_LANG_FLAG_0 (WFL) - /* True if EXPR (a LOOP_EXPR in that case) is part of a for statement */ #define FOR_LOOP_P(EXPR) TREE_LANG_FLAG_0 (EXPR) --- 1563,1575 ---- #define MODIFY_EXPR_FROM_INITIALIZATION_P(EXPR) TREE_LANG_FLAG_2 (EXPR) /* True if EXPR (a TREE_TYPE denoting a class type) has its methods ! already checked (for redefinitions, etc, see java_check_regular_methods.) */ #define CLASS_METHOD_CHECKED_P(EXPR) TREE_LANG_FLAG_2 (EXPR) /* True if TYPE (a TREE_TYPE denoting a class type) was found to feature a finalizer method. */ #define HAS_FINALIZER_P(EXPR) TREE_LANG_FLAG_3 (EXPR) /* True if EXPR (a LOOP_EXPR in that case) is part of a for statement */ #define FOR_LOOP_P(EXPR) TREE_LANG_FLAG_0 (EXPR) *************** extern tree *type_map; *** 1648,1654 **** /* Start building a RECORD_TYPE constructor with a given TYPE in CONS. */ #define START_RECORD_CONSTRUCTOR(CONS, CTYPE) { \ ! CONS = build (CONSTRUCTOR, CTYPE, NULL_TREE, NULL_TREE);\ TREE_CHAIN(CONS) = TYPE_FIELDS (CTYPE); } /* Append a field initializer to CONS for the dummy field for the inherited --- 1684,1690 ---- /* Start building a RECORD_TYPE constructor with a given TYPE in CONS. */ #define START_RECORD_CONSTRUCTOR(CONS, CTYPE) { \ ! CONS = build_constructor (CTYPE, NULL_TREE);\ TREE_CHAIN(CONS) = TYPE_FIELDS (CTYPE); } /* Append a field initializer to CONS for the dummy field for the inherited *************** extern tree *type_map; *** 1664,1674 **** /* Append a field initializer to CONS for a field with the given VALUE. NAME is a char* string used for error checking; the initializer must be specified in order. */ ! #define PUSH_FIELD_VALUE(CONS, NAME, VALUE) {\ ! tree field = TREE_CHAIN(CONS);\ ! if (strcmp (IDENTIFIER_POINTER (DECL_NAME (field)), NAME) != 0) abort();\ ! CONSTRUCTOR_ELTS(CONS) = tree_cons (field, VALUE, CONSTRUCTOR_ELTS(CONS));\ ! TREE_CHAIN(CONS) = TREE_CHAIN (field); } /* Finish creating a record CONSTRUCTOR CONS. */ #define FINISH_RECORD_CONSTRUCTOR(CONS) \ --- 1700,1715 ---- /* Append a field initializer to CONS for a field with the given VALUE. NAME is a char* string used for error checking; the initializer must be specified in order. */ ! #define PUSH_FIELD_VALUE(CONS, NAME, VALUE) \ ! do \ ! { \ ! tree field = TREE_CHAIN(CONS); \ ! if (strcmp (IDENTIFIER_POINTER (DECL_NAME (field)), NAME) != 0) \ ! abort(); \ ! CONSTRUCTOR_ELTS(CONS) = tree_cons (field, VALUE, CONSTRUCTOR_ELTS(CONS)); \ ! TREE_CHAIN(CONS) = TREE_CHAIN (field); \ ! } \ ! while (0) /* Finish creating a record CONSTRUCTOR CONS. */ #define FINISH_RECORD_CONSTRUCTOR(CONS) \ *************** extern tree *type_map; *** 1697,1702 **** --- 1738,1745 ---- #define BLOCK_EXPR_BODY(NODE) BLOCK_SUBBLOCKS(NODE) /* True for an implicit block surrounding declaration not at start of {...}. */ #define BLOCK_IS_IMPLICIT(NODE) TREE_LANG_FLAG_1 (NODE) + #define BLOCK_EMPTY_P(NODE) \ + (TREE_CODE (NODE) == BLOCK && BLOCK_EXPR_BODY (NODE) == empty_stmt_node) #define BUILD_MONITOR_ENTER(WHERE, ARG) \ { \ *************** enum *** 1758,1760 **** --- 1801,1804 ---- }; #undef DEBUG_JAVA_BINDING_LEVELS + #endif /* ! GCC_JAVA_TREE_H */ diff -Nrc3pad gcc-3.3.3/gcc/java/jcf-depend.c gcc-3.4.0/gcc/java/jcf-depend.c *** gcc-3.3.3/gcc/java/jcf-depend.c 2001-01-05 07:50:24.000000000 +0000 --- gcc-3.4.0/gcc/java/jcf-depend.c 2003-01-12 02:14:55.000000000 +0000 *************** *** 1,19 **** /* Functions for handling dependency tracking when reading .class files. ! Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. ! This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,21 ---- /* Functions for handling dependency tracking when reading .class files. ! Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. ! This file is part of GCC. ! ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 25,30 **** --- 27,34 ---- #include "config.h" #include "system.h" + #include "coretypes.h" + #include "tm.h" #include "mkdeps.h" #include *************** static int print_dummies; *** 52,58 **** invocation. FIXME: we should change our API or just completely use the one in mkdeps.h. */ void ! jcf_dependency_reset () { if (dep_out != NULL) { --- 56,62 ---- invocation. FIXME: we should change our API or just completely use the one in mkdeps.h. */ void ! jcf_dependency_reset (void) { if (dep_out != NULL) { *************** jcf_dependency_reset () *** 69,76 **** } void ! jcf_dependency_set_target (name) ! const char *name; { /* We just handle this the same as an `add_target'. */ if (dependencies != NULL && name != NULL) --- 73,79 ---- } void ! jcf_dependency_set_target (const char *name) { /* We just handle this the same as an `add_target'. */ if (dependencies != NULL && name != NULL) *************** jcf_dependency_set_target (name) *** 78,93 **** } void ! jcf_dependency_add_target (name) ! const char *name; { if (dependencies != NULL) deps_add_target (dependencies, name, 1); } void ! jcf_dependency_set_dep_file (name) ! const char *name; { assert (dep_out != stdout); if (dep_out) --- 81,94 ---- } void ! jcf_dependency_add_target (const char *name) { if (dependencies != NULL) deps_add_target (dependencies, name, 1); } void ! jcf_dependency_set_dep_file (const char *name) { assert (dep_out != stdout); if (dep_out) *************** jcf_dependency_set_dep_file (name) *** 99,107 **** } void ! jcf_dependency_add_file (filename, system_p) ! const char *filename; ! int system_p; { if (! dependencies) return; --- 100,106 ---- } void ! jcf_dependency_add_file (const char *filename, int system_p) { if (! dependencies) return; *************** jcf_dependency_add_file (filename, syste *** 114,121 **** } void ! jcf_dependency_init (system_p) ! int system_p; { assert (! dependencies); system_files = system_p; --- 113,119 ---- } void ! jcf_dependency_init (int system_p) { assert (! dependencies); system_files = system_p; *************** jcf_dependency_init (system_p) *** 123,135 **** } void ! jcf_dependency_print_dummies () { print_dummies = 1; } void ! jcf_dependency_write () { if (! dep_out) return; --- 121,133 ---- } void ! jcf_dependency_print_dummies (void) { print_dummies = 1; } void ! jcf_dependency_write (void) { if (! dep_out) return; diff -Nrc3pad gcc-3.3.3/gcc/java/jcf-dump.1 gcc-3.4.0/gcc/java/jcf-dump.1 *** gcc-3.3.3/gcc/java/jcf-dump.1 2004-02-14 20:38:16.000000000 +0000 --- gcc-3.4.0/gcc/java/jcf-dump.1 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,213 **** - .\" Automatically generated by Pod::Man version 1.15 - .\" Sat Feb 14 20:38:16 2004 - .\" - .\" Standard preamble: - .\" ====================================================================== - .de Sh \" Subsection heading - .br - .if t .Sp - .ne 5 - .PP - \fB\\$1\fR - .PP - .. - .de Sp \" Vertical space (when we can't use .PP) - .if t .sp .5v - .if n .sp - .. - .de Ip \" List item - .br - .ie \\n(.$>=3 .ne \\$3 - .el .ne 3 - .IP "\\$1" \\$2 - .. - .de Vb \" Begin verbatim text - .ft CW - .nf - .ne \\$1 - .. - .de Ve \" End verbatim text - .ft R - - .fi - .. - .\" Set up some character translations and predefined strings. \*(-- will - .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left - .\" double quote, and \*(R" will give a right double quote. | will give a - .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used - .\" to do unbreakable dashes and therefore won't be available. \*(C` and - .\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> - .tr \(*W-|\(bv\*(Tr - .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' - .ie n \{\ - . ds -- \(*W- - . ds PI pi - . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch - . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch - . ds L" "" - . ds R" "" - . ds C` "" - . ds C' "" - 'br\} - .el\{\ - . ds -- \|\(em\| - . ds PI \(*p - . ds L" `` - . ds R" '' - 'br\} - .\" - .\" If the F register is turned on, we'll generate index entries on stderr - .\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and - .\" index entries marked with X<> in POD. Of course, you'll have to process - .\" the output yourself in some meaningful fashion. - .if \nF \{\ - . de IX - . tm Index:\\$1\t\\n%\t"\\$2" - .. - . nr % 0 - . rr F - .\} - .\" - .\" For nroff, turn off justification. Always turn off hyphenation; it - .\" makes way too many mistakes in technical documents. - .hy 0 - .if n .na - .\" - .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). - .\" Fear. Run. Save yourself. No user-serviceable parts. - .bd B 3 - . \" fudge factors for nroff and troff - .if n \{\ - . ds #H 0 - . ds #V .8m - . ds #F .3m - . ds #[ \f1 - . ds #] \fP - .\} - .if t \{\ - . ds #H ((1u-(\\\\n(.fu%2u))*.13m) - . ds #V .6m - . ds #F 0 - . ds #[ \& - . ds #] \& - .\} - . \" simple accents for nroff and troff - .if n \{\ - . ds ' \& - . ds ` \& - . ds ^ \& - . ds , \& - . ds ~ ~ - . ds / - .\} - .if t \{\ - . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" - . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' - . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' - . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' - . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' - . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' - .\} - . \" troff and (daisy-wheel) nroff accents - .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' - .ds 8 \h'\*(#H'\(*b\h'-\*(#H' - .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] - .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' - .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' - .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] - .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] - .ds ae a\h'-(\w'a'u*4/10)'e - .ds Ae A\h'-(\w'A'u*4/10)'E - . \" corrections for vroff - .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' - .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' - . \" for low resolution devices (crt and lpr) - .if \n(.H>23 .if \n(.V>19 \ - \{\ - . ds : e - . ds 8 ss - . ds o a - . ds d- d\h'-1'\(ga - . ds D- D\h'-1'\(hy - . ds th \o'bp' - . ds Th \o'LP' - . ds ae ae - . ds Ae AE - .\} - .rm #[ #] #H #V #F C - .\" ====================================================================== - .\" - .IX Title "JCF-DUMP 1" - .TH JCF-DUMP 1 "gcc-3.3.3" "2004-02-14" "GNU" - .UC - .SH "NAME" - jcf-dump \- print information about Java class files - .SH "SYNOPSIS" - .IX Header "SYNOPSIS" - jcf-dump [\fB\-c\fR] [\fB\*(--javap\fR] - [\fB\*(--classpath\fR=\fIpath\fR] [\fB\*(--CLASSPATH\fR=\fIpath\fR] - [\fB\-I\fR\fIdir\fR...] [\fB\-o\fR \fIfile\fR] - [\fB\*(--version\fR] [\fB\*(--help\fR] [\fB\-v\fR] [\fB\*(--verbose\fR] - \fIclassname\fR... - .SH "DESCRIPTION" - .IX Header "DESCRIPTION" - This is a class file examiner, similar to \f(CW\*(C`javap\*(C'\fR. It will print - information about a number of classes, which are specified by class name - or file name. - .SH "OPTIONS" - .IX Header "OPTIONS" - .Ip "\fB\-c\fR" 4 - .IX Item "-c" - Disassemble method bodies. By default method bodies are not printed. - .Ip "\fB\*(--javap\fR" 4 - .IX Item "javap" - Generate output in \f(CW\*(C`javap\*(C'\fR format. The implementation of this - feature is very incomplete. - .Ip "\fB\*(--classpath=\fR\fIpath\fR" 4 - .IX Item "classpath=path" - .PD 0 - .Ip "\fB\*(--CLASSPATH=\fR\fIpath\fR" 4 - .IX Item "CLASSPATH=path" - .Ip "\fB\-I\fR\fIdirectory\fR" 4 - .IX Item "-Idirectory" - .Ip "\fB\-o\fR \fIfile\fR" 4 - .IX Item "-o file" - .PD - These options as the same as the corresponding \fBgcj\fR options. - .Ip "\fB\*(--help\fR" 4 - .IX Item "help" - Print help, then exit. - .Ip "\fB\*(--version\fR" 4 - .IX Item "version" - Print version number, then exit. - .Ip "\fB\-v, \-\-verbose\fR" 4 - .IX Item "-v, --verbose" - Print extra information while running. - .SH "SEE ALSO" - .IX Header "SEE ALSO" - \&\fIgcc\fR\|(1), \fIgcj\fR\|(1), \fIgcjh\fR\|(1), \fIgij\fR\|(1), \fIjcf-dump\fR\|(1), \fIgfdl\fR\|(7), - and the Info entries for \fIgcj\fR and \fIgcc\fR. - .SH "COPYRIGHT" - .IX Header "COPYRIGHT" - Copyright (c) 2001, 2002 Free Software Foundation, Inc. - .PP - Permission is granted to copy, distribute and/or modify this document - under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.2 or - any later version published by the Free Software Foundation; with the - Invariant Sections being ``\s-1GNU\s0 General Public License'', the Front-Cover - texts being (a) (see below), and with the Back-Cover Texts being (b) - (see below). A copy of the license is included in the - man page \fIgfdl\fR\|(7). - .PP - (a) The \s-1FSF\s0's Front-Cover Text is: - .PP - .Vb 1 - \& A GNU Manual - .Ve - (b) The \s-1FSF\s0's Back-Cover Text is: - .PP - .Vb 3 - \& You have freedom to copy and modify this GNU Manual, like GNU - \& software. Copies published by the Free Software Foundation raise - \& funds for GNU development. - .Ve --- 0 ---- diff -Nrc3pad gcc-3.3.3/gcc/java/jcf-dump.c gcc-3.4.0/gcc/java/jcf-dump.c *** gcc-3.3.3/gcc/java/jcf-dump.c 2003-03-28 22:18:48.000000000 +0000 --- gcc-3.4.0/gcc/java/jcf-dump.c 2003-12-20 15:38:27.000000000 +0000 *************** *** 1,20 **** /* Program to dump out a Java(TM) .class file. Functionally similar to Sun's javap. ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. ! This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,23 ---- /* Program to dump out a Java(TM) .class file. Functionally similar to Sun's javap. ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 ! Free Software Foundation, Inc. ! This file is part of GCC. ! ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 48,53 **** --- 51,59 ---- #include "config.h" #include "system.h" + #include "coretypes.h" + #include "tm.h" + #include "ggc.h" #include "jcf.h" #include "tree.h" *************** int class_access_flags = 0; *** 87,114 **** /* Print in format similar to javap. VERY IMCOMPLETE. */ int flag_javap_compatible = 0; ! static void print_access_flags PARAMS ((FILE *, uint16, char)); ! static void print_constant_terse PARAMS ((FILE*, JCF*, int, int)); ! static void print_constant PARAMS ((FILE *, JCF *, int, int)); ! static void print_constant_ref PARAMS ((FILE *, JCF *, int)); ! static void disassemble_method PARAMS ((JCF*, const unsigned char *, int)); ! static void print_name PARAMS ((FILE*, JCF*, int)); ! static void print_signature PARAMS ((FILE*, JCF*, int, int)); ! static int utf8_equal_string PARAMS ((struct JCF*, int, const char *)); ! static void usage PARAMS ((void)) ATTRIBUTE_NORETURN; ! static void help PARAMS ((void)) ATTRIBUTE_NORETURN; ! static void version PARAMS ((void)) ATTRIBUTE_NORETURN; ! static void process_class PARAMS ((struct JCF *)); ! static void print_constant_pool PARAMS ((struct JCF *)); ! static void print_exception_table PARAMS ((struct JCF *, ! const unsigned char *entries, int)); #define PRINT_SIGNATURE_RESULT_ONLY 1 #define PRINT_SIGNATURE_ARGS_ONLY 2 static int ! DEFUN(utf8_equal_string, (jcf, index, value), ! JCF *jcf AND int index AND const char * value) { if (CPOOL_INDEX_IN_RANGE (&jcf->cpool, index) && JPOOL_TAG (jcf, index) == CONSTANT_Utf8) --- 93,119 ---- /* Print in format similar to javap. VERY IMCOMPLETE. */ int flag_javap_compatible = 0; ! static void print_access_flags (FILE *, uint16, char); ! static void print_constant_terse (FILE*, JCF*, int, int); ! static void print_constant (FILE *, JCF *, int, int); ! static void print_constant_ref (FILE *, JCF *, int); ! static void disassemble_method (JCF*, const unsigned char *, int); ! static void print_name (FILE*, JCF*, int); ! static void print_signature (FILE*, JCF*, int, int); ! static int utf8_equal_string (struct JCF*, int, const char *); ! static void usage (void) ATTRIBUTE_NORETURN; ! static void help (void) ATTRIBUTE_NORETURN; ! static void version (void) ATTRIBUTE_NORETURN; ! static void process_class (struct JCF *); ! static void print_constant_pool (struct JCF *); ! static void print_exception_table (struct JCF *, const unsigned char *entries, ! int); #define PRINT_SIGNATURE_RESULT_ONLY 1 #define PRINT_SIGNATURE_ARGS_ONLY 2 static int ! utf8_equal_string (JCF *jcf, int index, const char * value) { if (CPOOL_INDEX_IN_RANGE (&jcf->cpool, index) && JPOOL_TAG (jcf, index) == CONSTANT_Utf8) *************** DEFUN(utf8_equal_string, (jcf, index, va *** 342,349 **** #include "javaop.h" static void ! DEFUN(print_constant_ref, (stream, jcf, index), ! FILE *stream AND JCF *jcf AND int index) { fprintf (stream, "#%d=<", index); if (index <= 0 || index >= JPOOL_SIZE(jcf)) --- 347,353 ---- #include "javaop.h" static void ! print_constant_ref (FILE *stream, JCF *jcf, int index) { fprintf (stream, "#%d=<", index); if (index <= 0 || index >= JPOOL_SIZE(jcf)) *************** DEFUN(print_constant_ref, (stream, jcf, *** 358,365 **** or 'm' (method flags). */ static void ! DEFUN (print_access_flags, (stream, flags, context), ! FILE *stream AND uint16 flags AND char context) { if (flags & ACC_PUBLIC) fprintf (stream, " public"); if (flags & ACC_PRIVATE) fprintf (stream, " private"); --- 362,368 ---- or 'm' (method flags). */ static void ! print_access_flags (FILE *stream, uint16 flags, char context) { if (flags & ACC_PUBLIC) fprintf (stream, " public"); if (flags & ACC_PRIVATE) fprintf (stream, " private"); *************** DEFUN (print_access_flags, (stream, flag *** 383,390 **** static void ! DEFUN(print_name, (stream, jcf, name_index), ! FILE* stream AND JCF* jcf AND int name_index) { if (JPOOL_TAG (jcf, name_index) != CONSTANT_Utf8) fprintf (stream, ""); --- 386,392 ---- static void ! print_name (FILE* stream, JCF* jcf, int name_index) { if (JPOOL_TAG (jcf, name_index) != CONSTANT_Utf8) fprintf (stream, ""); *************** DEFUN(print_name, (stream, jcf, name_ind *** 397,404 **** print it tersely, otherwise more verbosely. */ static void ! DEFUN(print_constant_terse, (out, jcf, index, expected), ! FILE *out AND JCF *jcf AND int index AND int expected) { if (! CPOOL_INDEX_IN_RANGE (&jcf->cpool, index)) fprintf (out, "", index); --- 399,405 ---- print it tersely, otherwise more verbosely. */ static void ! print_constant_terse (FILE *out, JCF *jcf, int index, int expected) { if (! CPOOL_INDEX_IN_RANGE (&jcf->cpool, index)) fprintf (out, "", index); *************** DEFUN(print_constant_terse, (out, jcf, i *** 418,425 **** If verbosity==2, add more descriptive text. */ static void ! DEFUN(print_constant, (out, jcf, index, verbosity), ! FILE *out AND JCF *jcf AND int index AND int verbosity) { int j, n; jlong num; --- 419,425 ---- If verbosity==2, add more descriptive text. */ static void ! print_constant (FILE *out, JCF *jcf, int index, int verbosity) { int j, n; jlong num; *************** DEFUN(print_constant, (out, jcf, index, *** 615,621 **** break; case CONSTANT_Utf8: { ! register const unsigned char *str = JPOOL_UTF_DATA (jcf, index); int length = JPOOL_UTF_LENGTH (jcf, index); if (verbosity > 0) { /* Print as 8-bit bytes. */ --- 615,621 ---- break; case CONSTANT_Utf8: { ! const unsigned char *str = JPOOL_UTF_DATA (jcf, index); int length = JPOOL_UTF_LENGTH (jcf, index); if (verbosity > 0) { /* Print as 8-bit bytes. */ *************** DEFUN(print_constant, (out, jcf, index, *** 637,644 **** } static void ! DEFUN(print_constant_pool, (jcf), ! JCF *jcf) { int i; for (i = 1; i < JPOOL_SIZE(jcf); i++) --- 637,643 ---- } static void ! print_constant_pool (JCF *jcf) { int i; for (i = 1; i < JPOOL_SIZE(jcf); i++) *************** DEFUN(print_constant_pool, (jcf), *** 653,660 **** } static void ! DEFUN(print_signature_type, (stream, ptr, limit), ! FILE* stream AND const unsigned char **ptr AND const unsigned char *limit) { int array_size; if ((*ptr) >= limit) --- 652,659 ---- } static void ! print_signature_type (FILE* stream, const unsigned char **ptr, ! const unsigned char *limit) { int array_size; if ((*ptr) >= limit) *************** DEFUN(print_signature_type, (stream, ptr *** 715,722 **** } static void ! DEFUN(print_signature, (stream, jcf, signature_index, int options), ! FILE* stream AND JCF *jcf AND int signature_index AND int options) { if (JPOOL_TAG (jcf, signature_index) != CONSTANT_Utf8) print_constant_terse (out, jcf, signature_index, CONSTANT_Utf8); --- 714,720 ---- } static void ! print_signature (FILE* stream, JCF *jcf, int signature_index, int options) { if (JPOOL_TAG (jcf, signature_index) != CONSTANT_Utf8) print_constant_terse (out, jcf, signature_index, CONSTANT_Utf8); *************** DEFUN(print_signature, (stream, jcf, sig *** 762,769 **** static void ! DEFUN(print_exception_table, (jcf, entries, count), ! JCF *jcf AND const unsigned char *entries AND int count) { /* Print exception table. */ int i = count; --- 760,766 ---- static void ! print_exception_table (JCF *jcf, const unsigned char *entries, int count) { /* Print exception table. */ int i = count; *************** DEFUN(print_exception_table, (jcf, entri *** 794,801 **** #include "jcf-reader.c" static void ! DEFUN(process_class, (jcf), ! JCF *jcf) { int code; if (jcf_parse_preamble (jcf) != 0) --- 791,797 ---- #include "jcf-reader.c" static void ! process_class (JCF *jcf) { int code; if (jcf_parse_preamble (jcf) != 0) *************** static const struct option options[] = *** 867,880 **** }; static void ! usage () { fprintf (stderr, "Try `jcf-dump --help' for more information.\n"); exit (1); } static void ! help () { printf ("Usage: jcf-dump [OPTION]... CLASS...\n\n"); printf ("Display contents of a class file in readable form.\n\n"); --- 863,876 ---- }; static void ! usage (void) { fprintf (stderr, "Try `jcf-dump --help' for more information.\n"); exit (1); } static void ! help (void) { printf ("Usage: jcf-dump [OPTION]... CLASS...\n\n"); printf ("Display contents of a class file in readable form.\n\n"); *************** help () *** 897,903 **** } static void ! version () { printf ("jcf-dump (GCC) %s\n\n", version_string); printf ("Copyright (C) 2002 Free Software Foundation, Inc.\n"); --- 893,899 ---- } static void ! version (void) { printf ("jcf-dump (GCC) %s\n\n", version_string); printf ("Copyright (C) 2002 Free Software Foundation, Inc.\n"); *************** version () *** 907,914 **** } int ! DEFUN(main, (argc, argv), ! int argc AND char** argv) { JCF jcf[1]; int argi, opt; --- 903,909 ---- } int ! main (int argc, char** argv) { JCF jcf[1]; int argi, opt; *************** DEFUN(main, (argc, argv), *** 1127,1136 **** static void ! DEFUN(disassemble_method, (jcf, byte_ops, len), ! JCF* jcf AND const unsigned char *byte_ops AND int len) { - #undef AND /* Causes problems with opcodes for iand and land. */ #undef PTR int PC; int i; --- 1122,1129 ---- static void ! disassemble_method (JCF* jcf, const unsigned char *byte_ops, int len) { #undef PTR int PC; int i; *************** DEFUN(disassemble_method, (jcf, byte_ops *** 1149,1155 **** /* This is the actual code emitted for each of opcodes in javaops.def. The actual opcode-specific stuff is handled by the OPKIND macro. I.e. for an opcode whose OPKIND is BINOP, the BINOP will be called. ! Those macros are defiend below. The OPKINDs that do not have any inline parameters (such as BINOP) and therefore do mot need anything else to me printed out just use an empty body. */ --- 1142,1148 ---- /* This is the actual code emitted for each of opcodes in javaops.def. The actual opcode-specific stuff is handled by the OPKIND macro. I.e. for an opcode whose OPKIND is BINOP, the BINOP will be called. ! Those macros are defined below. The OPKINDs that do not have any inline parameters (such as BINOP) and therefore do mot need anything else to me printed out just use an empty body. */ diff -Nrc3pad gcc-3.3.3/gcc/java/jcf.h gcc-3.4.0/gcc/java/jcf.h *** gcc-3.3.3/gcc/java/jcf.h 2003-04-10 14:54:08.000000000 +0000 --- gcc-3.4.0/gcc/java/jcf.h 2003-10-05 02:52:33.000000000 +0000 *************** *** 1,20 **** /* Utility macros to read Java(TM) .class files and byte codes. - Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. ! This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,21 ---- /* Utility macros to read Java(TM) .class files and byte codes. Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. ! This file is part of GCC. ! ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 27,51 **** #ifndef GCC_JCF_H #define GCC_JCF_H #include "javaop.h" - #ifndef DEFUN - #if defined (__STDC__) - #define AND , - #define PTR void * - #define DEFUN(name, arglist, args) name(args) - #else - #define PTR char * - #define AND ; - #define DEFUN(name, arglist, args) name arglist args; - #endif - #endif /* !DEFUN */ - - #ifndef PARAMS - #if defined (__STDC__) - #define PARAMS (paramlist) paramlist - #else - #define PARAMS (paramlist) () - #endif - #endif #ifndef JCF_u4 #define JCF_u4 unsigned long --- 28,33 ---- *************** The Free Software Foundation is independ *** 72,86 **** #define JCF_USE_SCANDIR 0 #endif - /* On case-insensitive file systems, file name components must be - compared using "strcasecmp", if available, instead of "strcmp". - Assumes "config.h" has already been included. */ - #if defined (HAVE_DOS_BASED_FILE_SYSTEM) && defined (HAVE_STRCASECMP) - #define COMPARE_FILENAMES(X, Y) strcasecmp ((X), (Y)) - #else - #define COMPARE_FILENAMES(X, Y) strcmp ((X), (Y)) - #endif - /* On case-insensitive file systems, we need to ensure that a request to open a .java or .class file is honored only if the file to be opened is of the exact case we are asking for. In other words, we --- 54,59 ---- *************** jcf_open_exact_case (const char* filenam *** 100,108 **** #endif /* WIN32 */ struct JCF; ! typedef int (*jcf_filbuf_t) PARAMS ((struct JCF*, int needed)); ! typedef struct CPool { /* Available number of elements in the constants array, before it must be re-allocated. */ int capacity; --- 73,89 ---- #endif /* WIN32 */ struct JCF; ! typedef int (*jcf_filbuf_t) (struct JCF*, int needed); ! union cpool_entry GTY(()) { ! jword GTY ((tag ("0"))) w; ! tree GTY ((tag ("1"))) t; ! }; ! ! #define cpool_entry_is_tree(tag) \ ! (tag & CONSTANT_ResolvedFlag) || tag == CONSTANT_Utf8 ! ! typedef struct CPool GTY(()) { /* Available number of elements in the constants array, before it must be re-allocated. */ int capacity; *************** typedef struct CPool { *** 110,138 **** /* The constant_pool_count. */ int count; ! uint8* tags; ! jword* data; } CPool; struct ZipDirectory; /* JCF encapsulates the state of reading a Java Class File. */ ! typedef struct JCF { ! unsigned char *buffer; ! unsigned char *buffer_end; ! unsigned char *read_ptr; ! unsigned char *read_end; int java_source : 1; int right_zip : 1; int finished : 1; jcf_filbuf_t filbuf; ! void *read_state; const char *filename; const char *classname; ! struct ZipDirectory *zipd; /* Directory entry where it was found */ ! JCF_u2 access_flags, this_class, super_class; CPool cpool; } JCF; /*typedef JCF* JCF_FILE;*/ --- 91,123 ---- /* The constant_pool_count. */ int count; ! uint8* GTY((length ("%h.count"))) tags; ! union cpool_entry * GTY((length ("%h.count"), ! desc ("cpool_entry_is_tree (%1.tags%a)"))) data; } CPool; struct ZipDirectory; /* JCF encapsulates the state of reading a Java Class File. */ ! typedef struct JCF GTY(()) { ! unsigned char * GTY ((skip (""))) buffer; ! unsigned char * GTY ((skip (""))) buffer_end; ! unsigned char * GTY ((skip (""))) read_ptr; ! unsigned char * GTY ((skip (""))) read_end; int java_source : 1; int right_zip : 1; int finished : 1; jcf_filbuf_t filbuf; ! PTR GTY ((skip (""))) read_state; const char *filename; const char *classname; ! /* Directory entry where it was found. */ ! struct ZipDirectory * GTY ((skip (""))) zipd; ! JCF_u2 access_flags; ! JCF_u2 this_class; ! JCF_u2 super_class; CPool cpool; } JCF; /*typedef JCF* JCF_FILE;*/ *************** typedef struct JCF { *** 147,159 **** #define JPOOL_SIZE(JCF) CPOOL_COUNT(&(JCF)->cpool) #define JPOOL_TAG(JCF, INDEX) ((JCF)->cpool.tags[INDEX]) /* The INDEX'th constant pool entry as a JCF_u4. */ ! #define CPOOL_UINT(CPOOL, INDEX) ((CPOOL)->data[INDEX]) #define JPOOL_UINT(JCF, INDEX) CPOOL_UINT(&(JCF)->cpool, INDEX) /*deprecated*/ /* The first uint16 of the INDEX'th constant pool entry. */ ! #define CPOOL_USHORT1(CPOOL, INDEX) ((CPOOL)->data[INDEX] & 0xFFFF) #define JPOOL_USHORT1(JCF, INDEX) CPOOL_USHORT1(&(JCF)->cpool, INDEX) /* The second uint16 of the INDEX'th constant pool entry. */ ! #define CPOOL_USHORT2(CPOOL, INDEX) ((CPOOL)->data[INDEX] >> 16) #define JPOOL_USHORT2(JCF, INDEX) CPOOL_USHORT2(&(JCF)->cpool, INDEX) #define JPOOL_LONG(JCF, INDEX) \ WORDS_TO_LONG (JPOOL_UINT(JCF, INDEX), JPOOL_UINT(JCF, (INDEX)+1)) --- 132,144 ---- #define JPOOL_SIZE(JCF) CPOOL_COUNT(&(JCF)->cpool) #define JPOOL_TAG(JCF, INDEX) ((JCF)->cpool.tags[INDEX]) /* The INDEX'th constant pool entry as a JCF_u4. */ ! #define CPOOL_UINT(CPOOL, INDEX) ((CPOOL)->data[INDEX].w) #define JPOOL_UINT(JCF, INDEX) CPOOL_UINT(&(JCF)->cpool, INDEX) /*deprecated*/ /* The first uint16 of the INDEX'th constant pool entry. */ ! #define CPOOL_USHORT1(CPOOL, INDEX) ((CPOOL)->data[INDEX].w & 0xFFFF) #define JPOOL_USHORT1(JCF, INDEX) CPOOL_USHORT1(&(JCF)->cpool, INDEX) /* The second uint16 of the INDEX'th constant pool entry. */ ! #define CPOOL_USHORT2(CPOOL, INDEX) ((CPOOL)->data[INDEX].w >> 16) #define JPOOL_USHORT2(JCF, INDEX) CPOOL_USHORT2(&(JCF)->cpool, INDEX) #define JPOOL_LONG(JCF, INDEX) \ WORDS_TO_LONG (JPOOL_UINT(JCF, INDEX), JPOOL_UINT(JCF, (INDEX)+1)) *************** typedef struct JCF { *** 173,181 **** #define CPOOL_INDEX_IN_RANGE(CPOOL, INDEX) \ ((INDEX) > 0 && (INDEX) < CPOOL_COUNT(CPOOL)) ! #define CPOOL_FINISH(CPOOL) { \ ! if ((CPOOL)->tags) FREE ((CPOOL)->tags); \ ! if ((CPOOL)->data) FREE ((CPOOL)->data); } #define JCF_FINISH(JCF) { \ CPOOL_FINISH(&(JCF)->cpool); \ --- 158,167 ---- #define CPOOL_INDEX_IN_RANGE(CPOOL, INDEX) \ ((INDEX) > 0 && (INDEX) < CPOOL_COUNT(CPOOL)) ! #define CPOOL_FINISH(CPOOL) { \ ! (CPOOL)->tags = 0; \ ! (CPOOL)->data = 0; \ ! } #define JCF_FINISH(JCF) { \ CPOOL_FINISH(&(JCF)->cpool); \ *************** typedef struct JCF { *** 244,249 **** --- 230,238 ---- #define ACC_INTERFACE 0x0200 #define ACC_ABSTRACT 0x0400 #define ACC_STRICT 0x0800 + /* "Invisible" refers to Miranda methods inserted into an abstract + #class. It is also used in the runtime. */ + #define ACC_INVISIBLE 0x1000 #define ACC_VISIBILITY (ACC_PUBLIC | ACC_PRIVATE | ACC_PROTECTED) *************** typedef struct JCF { *** 262,271 **** #define DEFAULT_CLASS_PATH "." ! extern const char *find_class PARAMS ((const char *, int, JCF*, int)); ! extern const char *find_classfile PARAMS ((char *, JCF*, const char *)); ! extern int jcf_filbuf_from_stdio PARAMS ((JCF *jcf, int count)); ! extern int jcf_unexpected_eof PARAMS ((JCF*, int)) ATTRIBUTE_NORETURN; /* Extract a character from a Java-style Utf8 string. * PTR points to the current character. --- 251,260 ---- #define DEFAULT_CLASS_PATH "." ! extern const char *find_class (const char *, int, JCF*, int); ! extern const char *find_classfile (char *, JCF*, const char *); ! extern int jcf_filbuf_from_stdio (JCF *jcf, int count); ! extern int jcf_unexpected_eof (JCF*, int) ATTRIBUTE_NORETURN; /* Extract a character from a Java-style Utf8 string. * PTR points to the current character. *************** extern int jcf_unexpected_eof PARAMS ((J *** 282,288 **** ? (((PTR)[-3]&0x0F) << 12) + (((PTR)[-2]&0x3F) << 6) + ((PTR)[-1]&0x3F) \ : ((PTR)++, -1)) ! extern char *jcf_write_base_directory; /* Debug macros, for the front end */ --- 271,277 ---- ? (((PTR)[-3]&0x0F) << 12) + (((PTR)[-2]&0x3F) << 6) + ((PTR)[-1]&0x3F) \ : ((PTR)++, -1)) ! extern const char *jcf_write_base_directory; /* Debug macros, for the front end */ *************** extern int quiet_flag; *** 296,322 **** #endif /* Declarations for dependency code. */ ! extern void jcf_dependency_reset PARAMS ((void)); ! extern void jcf_dependency_set_target PARAMS ((const char *)); ! extern void jcf_dependency_add_target PARAMS ((const char *)); ! extern void jcf_dependency_set_dep_file PARAMS ((const char *)); ! extern void jcf_dependency_add_file PARAMS ((const char *, int)); ! extern void jcf_dependency_write PARAMS ((void)); ! extern void jcf_dependency_init PARAMS ((int)); ! extern void jcf_dependency_print_dummies PARAMS ((void)); /* Declarations for path handling code. */ ! extern void jcf_path_init PARAMS ((void)); ! extern void jcf_path_classpath_arg PARAMS ((const char *)); ! extern void jcf_path_bootclasspath_arg PARAMS ((const char *)); ! extern void jcf_path_extdirs_arg PARAMS ((const char *)); ! extern void jcf_path_include_arg PARAMS ((const char *)); ! extern void jcf_path_seal PARAMS ((int)); ! extern void *jcf_path_start PARAMS ((void)); ! extern void *jcf_path_next PARAMS ((void *)); ! extern char *jcf_path_name PARAMS ((void *)); ! extern int jcf_path_is_zipfile PARAMS ((void *)); ! extern int jcf_path_is_system PARAMS ((void *)); ! extern int jcf_path_max_len PARAMS ((void)); #endif /* ! GCC_JCF_H */ --- 285,311 ---- #endif /* Declarations for dependency code. */ ! extern void jcf_dependency_reset (void); ! extern void jcf_dependency_set_target (const char *); ! extern void jcf_dependency_add_target (const char *); ! extern void jcf_dependency_set_dep_file (const char *); ! extern void jcf_dependency_add_file (const char *, int); ! extern void jcf_dependency_write (void); ! extern void jcf_dependency_init (int); ! extern void jcf_dependency_print_dummies (void); /* Declarations for path handling code. */ ! extern void jcf_path_init (void); ! extern void jcf_path_classpath_arg (const char *); ! extern void jcf_path_bootclasspath_arg (const char *); ! extern void jcf_path_extdirs_arg (const char *); ! extern void jcf_path_include_arg (const char *); ! extern void jcf_path_seal (int); ! extern void *jcf_path_start (void); ! extern void *jcf_path_next (void *); ! extern char *jcf_path_name (void *); ! extern int jcf_path_is_zipfile (void *); ! extern int jcf_path_is_system (void *); ! extern int jcf_path_max_len (void); #endif /* ! GCC_JCF_H */ diff -Nrc3pad gcc-3.3.3/gcc/java/jcf-io.c gcc-3.4.0/gcc/java/jcf-io.c *** gcc-3.3.3/gcc/java/jcf-io.c 2003-04-20 22:44:04.000000000 +0000 --- gcc-3.4.0/gcc/java/jcf-io.c 2003-12-20 15:38:27.000000000 +0000 *************** *** 1,18 **** /* Utility routines for finding and reading Java(TM) .class files. ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc. ! This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,21 ---- /* Utility routines for finding and reading Java(TM) .class files. ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2003 ! Free Software Foundation, Inc. ! This file is part of GCC. ! ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 24,29 **** --- 27,34 ---- #include "config.h" #include "system.h" + #include "coretypes.h" + #include "tm.h" #include "jcf.h" #include "tree.h" *************** The Free Software Foundation is independ *** 43,50 **** #endif int ! DEFUN(jcf_unexpected_eof, (jcf, count), ! JCF *jcf AND int count ATTRIBUTE_UNUSED) { if (jcf->filename) fprintf (stderr, "Premature end of .class file %s.\n", jcf->filename); --- 48,54 ---- #endif int ! jcf_unexpected_eof (JCF *jcf, int count ATTRIBUTE_UNUSED) { if (jcf->filename) fprintf (stderr, "Premature end of .class file %s.\n", jcf->filename); *************** DEFUN(jcf_unexpected_eof, (jcf, count), *** 54,61 **** } void ! DEFUN(jcf_trim_old_input, (jcf), ! JCF *jcf) { int count = jcf->read_ptr - jcf->buffer; if (count > 0) --- 58,64 ---- } void ! jcf_trim_old_input (JCF *jcf) { int count = jcf->read_ptr - jcf->buffer; if (count > 0) *************** DEFUN(jcf_trim_old_input, (jcf), *** 67,74 **** } int ! DEFUN(jcf_filbuf_from_stdio, (jcf, count), ! JCF *jcf AND int count) { FILE *file = (FILE*) (jcf->read_state); if (count > jcf->buffer_end - jcf->read_ptr) --- 70,76 ---- } int ! jcf_filbuf_from_stdio (JCF *jcf, int count) { FILE *file = (FILE*) (jcf->read_state); if (count > jcf->buffer_end - jcf->read_ptr) *************** struct ZipFile *SeenZipFiles = NULL; *** 103,110 **** */ ZipFile * ! DEFUN(opendir_in_zip, (zipfile, is_system), ! const char *zipfile AND int is_system) { struct ZipFile* zipf; char magic [4]; --- 105,111 ---- */ ZipFile * ! opendir_in_zip (const char *zipfile, int is_system) { struct ZipFile* zipf; char magic [4]; *************** DEFUN(opendir_in_zip, (zipfile, is_syste *** 149,157 **** */ int ! DEFUN(open_in_zip, (jcf, zipfile, zipmember, is_system), ! JCF *jcf AND const char *zipfile AND const char *zipmember ! AND int is_system) { ZipDirectory *zipd; int i, len; --- 150,157 ---- */ int ! open_in_zip (JCF *jcf, const char *zipfile, const char *zipmember, ! int is_system) { ZipDirectory *zipd; int i, len; *************** DEFUN(open_in_zip, (jcf, zipfile, zipmem *** 184,239 **** /* Read data from zip archive member. */ int ! DEFUN(read_zip_member, (jcf, zipd, zipf), ! JCF *jcf AND ZipDirectory *zipd AND ZipFile *zipf) { ! jcf->filbuf = jcf_unexpected_eof; ! jcf->zipd = (void *)zipd; ! if (zipd->compression_method == Z_NO_COMPRESSION) ! { ! jcf->buffer = ALLOC (zipd->size); ! jcf->buffer_end = jcf->buffer + zipd->size; ! jcf->read_ptr = jcf->buffer; ! jcf->read_end = jcf->buffer_end; ! if (lseek (zipf->fd, zipd->filestart, 0) < 0 ! || read (zipf->fd, jcf->buffer, zipd->size) != (long) zipd->size) ! return -2; ! } ! else ! { ! char *buffer; ! z_stream d_stream; /* decompression stream */ ! d_stream.zalloc = (alloc_func) 0; ! d_stream.zfree = (free_func) 0; ! d_stream.opaque = (voidpf) 0; ! jcf->buffer = ALLOC (zipd->uncompressed_size); ! d_stream.next_out = jcf->buffer; ! d_stream.avail_out = zipd->uncompressed_size; ! jcf->buffer_end = jcf->buffer + zipd->uncompressed_size; ! jcf->read_ptr = jcf->buffer; ! jcf->read_end = jcf->buffer_end; ! buffer = ALLOC (zipd->size); ! d_stream.next_in = buffer; ! d_stream.avail_in = zipd->size; ! if (lseek (zipf->fd, zipd->filestart, 0) < 0 ! || read (zipf->fd, buffer, zipd->size) != (long) zipd->size) ! return -2; ! /* Handle NO_HEADER using undocumented zlib feature. ! This is a very common hack. */ ! inflateInit2 (&d_stream, -MAX_WBITS); ! inflate (&d_stream, Z_NO_FLUSH); ! inflateEnd (&d_stream); ! FREE (buffer); ! } ! return 0; } const char * ! DEFUN(open_class, (filename, jcf, fd, dep_name), ! const char *filename AND JCF *jcf AND int fd AND const char *dep_name) { if (jcf) { --- 184,237 ---- /* Read data from zip archive member. */ int ! read_zip_member (JCF *jcf, ZipDirectory *zipd, ZipFile *zipf) { ! jcf->filbuf = jcf_unexpected_eof; ! jcf->zipd = (void *)zipd; ! if (zipd->compression_method == Z_NO_COMPRESSION) ! { ! jcf->buffer = ALLOC (zipd->size); ! jcf->buffer_end = jcf->buffer + zipd->size; ! jcf->read_ptr = jcf->buffer; ! jcf->read_end = jcf->buffer_end; ! if (lseek (zipf->fd, zipd->filestart, 0) < 0 ! || read (zipf->fd, jcf->buffer, zipd->size) != (long) zipd->size) ! return -2; ! } ! else ! { ! char *buffer; ! z_stream d_stream; /* decompression stream */ ! d_stream.zalloc = (alloc_func) 0; ! d_stream.zfree = (free_func) 0; ! d_stream.opaque = (voidpf) 0; ! jcf->buffer = ALLOC (zipd->uncompressed_size); ! d_stream.next_out = jcf->buffer; ! d_stream.avail_out = zipd->uncompressed_size; ! jcf->buffer_end = jcf->buffer + zipd->uncompressed_size; ! jcf->read_ptr = jcf->buffer; ! jcf->read_end = jcf->buffer_end; ! buffer = ALLOC (zipd->size); ! d_stream.next_in = buffer; ! d_stream.avail_in = zipd->size; ! if (lseek (zipf->fd, zipd->filestart, 0) < 0 ! || read (zipf->fd, buffer, zipd->size) != (long) zipd->size) ! return -2; ! /* Handle NO_HEADER using undocumented zlib feature. ! This is a very common hack. */ ! inflateInit2 (&d_stream, -MAX_WBITS); ! inflate (&d_stream, Z_NO_FLUSH); ! inflateEnd (&d_stream); ! FREE (buffer); ! } ! return 0; } const char * ! open_class (const char *filename, JCF *jcf, int fd, const char *dep_name) { if (jcf) { *************** DEFUN(open_class, (filename, jcf, fd, de *** 268,275 **** const char * ! DEFUN(find_classfile, (filename, jcf, dep_name), ! char *filename AND JCF *jcf AND const char *dep_name) { int fd = open (filename, O_RDONLY | O_BINARY); if (fd < 0) --- 266,272 ---- const char * ! find_classfile (char *filename, JCF *jcf, const char *dep_name) { int fd = open (filename, O_RDONLY | O_BINARY); if (fd < 0) *************** DEFUN(find_classfile, (filename, jcf, de *** 284,291 **** dirent **). */ static int ! DEFUN(compare_path, (key, entry), ! const void *key AND const void *entry) { return strcmp ((const char *) key, (*((const struct dirent **) entry))->d_name); --- 281,287 ---- dirent **). */ static int ! compare_path (const void *key, const void *entry) { return strcmp ((const char *) key, (*((const struct dirent **) entry))->d_name); *************** DEFUN(compare_path, (key, entry), *** 294,303 **** /* Returns nonzero if ENTRY names a .java or .class file. */ static int ! DEFUN(java_or_class_file, (entry), ! const struct dirent *entry) { ! const char *base = basename (entry->d_name); return (fnmatch ("*.java", base, 0) == 0 || fnmatch ("*.class", base, 0) == 0); } --- 290,298 ---- /* Returns nonzero if ENTRY names a .java or .class file. */ static int ! java_or_class_file (const struct dirent *entry) { ! const char *base = lbasename (entry->d_name); return (fnmatch ("*.java", base, 0) == 0 || fnmatch ("*.class", base, 0) == 0); } *************** typedef struct memoized_dirlist_entry *** 315,327 **** struct dirent **files; } memoized_dirlist_entry; ! /* Returns true if ENTRY (a memoized_dirlist_entry *) correponds to the directory given by KEY (a char *) giving the directory name. */ static int ! DEFUN(memoized_dirlist_lookup_eq, (entry, key), ! const void *entry AND const void *key) { return strcmp ((const char *) key, ((const memoized_dirlist_entry *) entry)->dir) == 0; --- 310,321 ---- struct dirent **files; } memoized_dirlist_entry; ! /* Returns true if ENTRY (a memoized_dirlist_entry *) corresponds to the directory given by KEY (a char *) giving the directory name. */ static int ! memoized_dirlist_lookup_eq (const void *entry, const void *key) { return strcmp ((const char *) key, ((const memoized_dirlist_entry *) entry)->dir) == 0; *************** static htab_t memoized_dirlists; *** 338,345 **** know that it cannot succeed. FILENAME and BUF are as for stat. */ static int ! DEFUN(caching_stat, (filename, buf), ! char *filename AND struct stat *buf) { #if JCF_USE_SCANDIR char *sep; --- 332,338 ---- know that it cannot succeed. FILENAME and BUF are as for stat. */ static int ! caching_stat (char *filename, struct stat *buf) { #if JCF_USE_SCANDIR char *sep; *************** DEFUN(caching_stat, (filename, buf), *** 410,417 **** stored in TABLE_ENTRY (also a char *). */ static int ! DEFUN(memoized_class_lookup_eq, (table_entry, classname), ! const void *table_entry AND const void *classname) { return strcmp ((const char *)classname, (const char *)table_entry) == 0; } --- 403,409 ---- stored in TABLE_ENTRY (also a char *). */ static int ! memoized_class_lookup_eq (const void *table_entry, const void *classname) { return strcmp ((const char *)classname, (const char *)table_entry) == 0; } *************** static htab_t memoized_class_lookups; *** 430,438 **** file. */ const char * ! DEFUN(find_class, (classname, classname_length, jcf, source_ok), ! const char *classname AND int classname_length AND JCF *jcf AND int source_ok) ! { int fd; int i, k, java = -1, class = -1; --- 422,429 ---- file. */ const char * ! find_class (const char *classname, int classname_length, JCF *jcf, ! int source_ok) { int fd; int i, k, java = -1, class = -1; *************** DEFUN(find_class, (classname, classname_ *** 597,604 **** } void ! DEFUN(jcf_print_char, (stream, ch), ! FILE *stream AND int ch) { switch (ch) { --- 588,594 ---- } void ! jcf_print_char (FILE *stream, int ch) { switch (ch) { *************** DEFUN(jcf_print_char, (stream, ch), *** 629,636 **** /* Print UTF8 string at STR of length LENGTH bytes to STREAM. */ void ! DEFUN(jcf_print_utf8, (stream, str, length), ! FILE *stream AND register const unsigned char *str AND int length) { const unsigned char * limit = str + length; while (str < limit) --- 619,625 ---- /* Print UTF8 string at STR of length LENGTH bytes to STREAM. */ void ! jcf_print_utf8 (FILE *stream, const unsigned char *str, int length) { const unsigned char * limit = str + length; while (str < limit) *************** DEFUN(jcf_print_utf8, (stream, str, leng *** 648,656 **** /* Same as jcf_print_utf8, but print IN_CHAR as OUT_CHAR. */ void ! DEFUN(jcf_print_utf8_replace, (stream, str, length, in_char, out_char), ! FILE *stream AND const unsigned char *str AND int length ! AND int in_char AND int out_char) { const unsigned char *limit = str + length; while (str < limit) --- 637,644 ---- /* Same as jcf_print_utf8, but print IN_CHAR as OUT_CHAR. */ void ! jcf_print_utf8_replace (FILE *stream, const unsigned char *str, int length, ! int in_char, int out_char) { const unsigned char *limit = str + length; while (str < limit) *************** DEFUN(jcf_print_utf8_replace, (stream, s *** 672,679 **** any classes, fields, or methods are valid.*/ int ! DEFUN(verify_constant_pool, (jcf), ! JCF *jcf) { int i, n; for (i = 1; i < JPOOL_SIZE (jcf); i++) --- 660,666 ---- any classes, fields, or methods are valid.*/ int ! verify_constant_pool (JCF *jcf) { int i, n; for (i = 1; i < JPOOL_SIZE (jcf); i++) *************** DEFUN(verify_constant_pool, (jcf), *** 722,733 **** } void ! DEFUN(format_uint, (buffer, value, base), ! char *buffer AND uint64 value AND int base) { #define WRITE_BUF_SIZE (4 + sizeof(uint64) * 8) char buf[WRITE_BUF_SIZE]; ! register char *buf_ptr = buf+WRITE_BUF_SIZE; /* End of buf. */ int chars_written; int i; --- 709,719 ---- } void ! format_uint (char *buffer, uint64 value, int base) { #define WRITE_BUF_SIZE (4 + sizeof(uint64) * 8) char buf[WRITE_BUF_SIZE]; ! char *buf_ptr = buf+WRITE_BUF_SIZE; /* End of buf. */ int chars_written; int i; *************** DEFUN(format_uint, (buffer, value, base) *** 747,754 **** } void ! DEFUN(format_int, (buffer, value, base), ! char *buffer AND jlong value AND int base) { uint64 abs_value; if (value < 0) --- 733,739 ---- } void ! format_int (char *buffer, jlong value, int base) { uint64 abs_value; if (value < 0) diff -Nrc3pad gcc-3.3.3/gcc/java/jcf-parse.c gcc-3.4.0/gcc/java/jcf-parse.c *** gcc-3.3.3/gcc/java/jcf-parse.c 2003-02-03 14:06:32.000000000 +0000 --- gcc-3.4.0/gcc/java/jcf-parse.c 2004-03-06 15:36:16.000000000 +0000 *************** *** 1,21 **** /* Parser for Java(TM) .class files. ! Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,21 ---- /* Parser for Java(TM) .class files. ! Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 27,32 **** --- 27,34 ---- #include "config.h" #include "system.h" + #include "coretypes.h" + #include "tm.h" #include "tree.h" #include "real.h" #include "obstack.h" *************** The Free Software Foundation is independ *** 39,44 **** --- 41,48 ---- #include "ggc.h" #include "debug.h" #include "assert.h" + #include "tm_p.h" + #include "cgraph.h" #ifdef HAVE_LOCALE_H #include *************** The Free Software Foundation is independ *** 60,66 **** text = (JCF)->read_ptr; \ save = text[LENGTH]; \ text[LENGTH] = 0; \ ! (JCF)->cpool.data[INDEX] = (jword) get_identifier (text); \ text[LENGTH] = save; \ JCF_SKIP (JCF, LENGTH); } while (0) --- 64,70 ---- text = (JCF)->read_ptr; \ save = text[LENGTH]; \ text[LENGTH] = 0; \ ! (JCF)->cpool.data[INDEX].t = get_identifier (text); \ text[LENGTH] = save; \ JCF_SKIP (JCF, LENGTH); } while (0) *************** The Free Software Foundation is independ *** 68,77 **** extern struct obstack temporary_obstack; - /* Set to nonzero value in order to emit class initilization code - before static field references. */ - extern int always_initialize_class_p; - static GTY(()) tree parse_roots[3]; /* The FIELD_DECL for the current field. */ --- 72,77 ---- *************** static GTY(()) tree parse_roots[3]; *** 84,136 **** #define current_file_list parse_roots[2] /* The Java archive that provides main_class; the main input file. */ ! static struct JCF main_jcf[1]; static struct ZipFile *localToFile; /* Declarations of some functions used here. */ ! static void handle_innerclass_attribute PARAMS ((int count, JCF *)); ! static tree give_name_to_class PARAMS ((JCF *jcf, int index)); ! static void parse_zip_file_entries PARAMS ((void)); ! static void process_zip_dir PARAMS ((FILE *)); ! static void parse_source_file_1 PARAMS ((tree, FILE *)); ! static void parse_source_file_2 PARAMS ((void)); ! static void parse_source_file_3 PARAMS ((void)); ! static void parse_class_file PARAMS ((void)); ! static void set_source_filename PARAMS ((JCF *, int)); ! static void ggc_mark_jcf PARAMS ((void**)); ! static void jcf_parse PARAMS ((struct JCF*)); ! static void load_inner_classes PARAMS ((tree)); ! ! /* Mark (for garbage collection) all the tree nodes that are ! referenced from JCF's constant pool table. Do that only if the JCF ! hasn't been marked finished. */ static void ! ggc_mark_jcf (elt) ! void **elt; { ! JCF *jcf = *(JCF**) elt; ! if (jcf != NULL && !jcf->finished) { ! CPool *cpool = &jcf->cpool; ! int size = CPOOL_COUNT(cpool); ! int index; ! for (index = 1; index < size; index++) ! { ! int tag = JPOOL_TAG (jcf, index); ! if ((tag & CONSTANT_ResolvedFlag) || tag == CONSTANT_Utf8) ! ggc_mark_tree ((tree) cpool->data[index]); ! } } } /* Handle "SourceFile" attribute. */ static void ! set_source_filename (jcf, index) ! JCF *jcf; ! int index; { tree sfname_id = get_name_constant (jcf, index); const char *sfname = IDENTIFIER_POINTER (sfname_id); --- 84,130 ---- #define current_file_list parse_roots[2] /* The Java archive that provides main_class; the main input file. */ ! static GTY(()) struct JCF * main_jcf; static struct ZipFile *localToFile; /* Declarations of some functions used here. */ ! static void handle_innerclass_attribute (int count, JCF *); ! static tree give_name_to_class (JCF *jcf, int index); ! static char *compute_class_name (struct ZipDirectory *zdir); ! static int classify_zip_file (struct ZipDirectory *zdir); ! static void parse_zip_file_entries (void); ! static void process_zip_dir (FILE *); ! static void parse_source_file_1 (tree, FILE *); ! static void parse_source_file_2 (void); ! static void parse_source_file_3 (void); ! static void parse_class_file (void); ! static void handle_deprecated (void); ! static void set_source_filename (JCF *, int); ! static void jcf_parse (struct JCF*); ! static void load_inner_classes (tree); + /* Handle "Deprecated" attribute. */ static void ! handle_deprecated (void) { ! if (current_field != NULL_TREE) ! FIELD_DEPRECATED (current_field) = 1; ! else if (current_method != NULL_TREE) ! METHOD_DEPRECATED (current_method) = 1; ! else if (current_class != NULL_TREE) ! CLASS_DEPRECATED (TYPE_NAME (current_class)) = 1; ! else { ! /* Shouldn't happen. */ ! abort (); } } /* Handle "SourceFile" attribute. */ static void ! set_source_filename (JCF *jcf, int index) { tree sfname_id = get_name_constant (jcf, index); const char *sfname = IDENTIFIER_POINTER (sfname_id); *************** set_source_filename (jcf, index) *** 155,161 **** #define HANDLE_CLASS_INFO(ACCESS_FLAGS, THIS, SUPER, INTERFACES_COUNT) \ { tree super_class = SUPER==0 ? NULL_TREE : get_class_constant (jcf, SUPER); \ ! current_class = give_name_to_class (jcf, THIS); \ set_super_info (ACCESS_FLAGS, current_class, super_class, INTERFACES_COUNT);} #define HANDLE_CLASS_INTERFACE(INDEX) \ --- 149,155 ---- #define HANDLE_CLASS_INFO(ACCESS_FLAGS, THIS, SUPER, INTERFACES_COUNT) \ { tree super_class = SUPER==0 ? NULL_TREE : get_class_constant (jcf, SUPER); \ ! output_class = current_class = give_name_to_class (jcf, THIS); \ set_super_info (ACCESS_FLAGS, current_class, super_class, INTERFACES_COUNT);} #define HANDLE_CLASS_INTERFACE(INDEX) \ *************** set_source_filename (jcf, index) *** 221,226 **** --- 215,222 ---- DECL_FUNCTION_THROWS (current_method) = nreverse (list); \ } + #define HANDLE_DEPRECATED_ATTRIBUTE() handle_deprecated () + /* Link seen inner classes to their outer context and register the inner class to its outer context. They will be later loaded. */ #define HANDLE_INNERCLASSES_ATTRIBUTE(COUNT) \ *************** set_source_filename (jcf, index) *** 245,253 **** #include "jcf-reader.c" tree ! parse_signature (jcf, sig_index) ! JCF *jcf; ! int sig_index; { if (sig_index <= 0 || sig_index >= JPOOL_SIZE (jcf) || JPOOL_TAG (jcf, sig_index) != CONSTANT_Utf8) --- 241,247 ---- #include "jcf-reader.c" tree ! parse_signature (JCF *jcf, int sig_index) { if (sig_index <= 0 || sig_index >= JPOOL_SIZE (jcf) || JPOOL_TAG (jcf, sig_index) != CONSTANT_Utf8) *************** parse_signature (jcf, sig_index) *** 258,266 **** } tree ! get_constant (jcf, index) ! JCF *jcf; ! int index; { tree value; int tag; --- 252,258 ---- } tree ! get_constant (JCF *jcf, int index) { tree value; int tag; *************** get_constant (jcf, index) *** 268,274 **** goto bad; tag = JPOOL_TAG (jcf, index); if ((tag & CONSTANT_ResolvedFlag) || tag == CONSTANT_Utf8) ! return (tree) jcf->cpool.data[index]; switch (tag) { case CONSTANT_Integer: --- 260,266 ---- goto bad; tag = JPOOL_TAG (jcf, index); if ((tag & CONSTANT_ResolvedFlag) || tag == CONSTANT_Utf8) ! return jcf->cpool.data[index].t; switch (tag) { case CONSTANT_Integer: *************** get_constant (jcf, index) *** 350,356 **** goto bad; } JPOOL_TAG (jcf, index) = tag | CONSTANT_ResolvedFlag; ! jcf->cpool.data [index] = (jword) value; return value; bad: internal_error ("bad value constant type %d, index %d", --- 342,348 ---- goto bad; } JPOOL_TAG (jcf, index) = tag | CONSTANT_ResolvedFlag; ! jcf->cpool.data[index].t = value; return value; bad: internal_error ("bad value constant type %d, index %d", *************** get_constant (jcf, index) *** 358,366 **** } tree ! get_name_constant (jcf, index) ! JCF *jcf; ! int index; { tree name = get_constant (jcf, index); --- 350,356 ---- } tree ! get_name_constant (JCF *jcf, int index) { tree name = get_constant (jcf, index); *************** get_name_constant (jcf, index) *** 375,383 **** the outer context with the newly resolved innerclass. */ static void ! handle_innerclass_attribute (count, jcf) ! int count; ! JCF *jcf; { int c = (count); while (c--) --- 365,371 ---- the outer context with the newly resolved innerclass. */ static void ! handle_innerclass_attribute (int count, JCF *jcf) { int c = (count); while (c--) *************** handle_innerclass_attribute (count, jcf) *** 388,394 **** entry isn't a member (like an inner class) the value is 0. */ int ocii = JCF_readu2 (jcf); /* Read inner_name_index. If the class we're dealing with is ! an annonymous class, it must be 0. */ int ini = JCF_readu2 (jcf); /* Read the access flag. */ int acc = JCF_readu2 (jcf); --- 376,382 ---- entry isn't a member (like an inner class) the value is 0. */ int ocii = JCF_readu2 (jcf); /* Read inner_name_index. If the class we're dealing with is ! an anonymous class, it must be 0. */ int ini = JCF_readu2 (jcf); /* Read the access flag. */ int acc = JCF_readu2 (jcf); *************** handle_innerclass_attribute (count, jcf) *** 413,421 **** } static tree ! give_name_to_class (jcf, i) ! JCF *jcf; ! int i; { if (i <= 0 || i >= JPOOL_SIZE (jcf) || JPOOL_TAG (jcf, i) != CONSTANT_Class) --- 401,407 ---- } static tree ! give_name_to_class (JCF *jcf, int i) { if (i <= 0 || i >= JPOOL_SIZE (jcf) || JPOOL_TAG (jcf, i) != CONSTANT_Class) *************** give_name_to_class (jcf, i) *** 429,439 **** JPOOL_UTF_LENGTH (jcf, j)); this_class = lookup_class (class_name); input_filename = DECL_SOURCE_FILE (TYPE_NAME (this_class)); ! lineno = 0; if (main_input_filename == NULL && jcf == main_jcf) main_input_filename = input_filename; ! jcf->cpool.data[i] = (jword) this_class; JPOOL_TAG (jcf, i) = CONSTANT_ResolvedClass; return this_class; } --- 415,425 ---- JPOOL_UTF_LENGTH (jcf, j)); this_class = lookup_class (class_name); input_filename = DECL_SOURCE_FILE (TYPE_NAME (this_class)); ! input_line = 0; if (main_input_filename == NULL && jcf == main_jcf) main_input_filename = input_filename; ! jcf->cpool.data[i].t = this_class; JPOOL_TAG (jcf, i) = CONSTANT_ResolvedClass; return this_class; } *************** give_name_to_class (jcf, i) *** 442,448 **** /* Get the class of the CONSTANT_Class whose constant pool index is I. */ tree ! get_class_constant (JCF *jcf , int i) { tree type; if (i <= 0 || i >= JPOOL_SIZE (jcf) --- 428,434 ---- /* Get the class of the CONSTANT_Class whose constant pool index is I. */ tree ! get_class_constant (JCF *jcf, int i) { tree type; if (i <= 0 || i >= JPOOL_SIZE (jcf) *************** get_class_constant (JCF *jcf , int i) *** 463,473 **** tree cname = unmangle_classname (name, nlength); type = lookup_class (cname); } ! jcf->cpool.data[i] = (jword) type; JPOOL_TAG (jcf, i) = CONSTANT_ResolvedClass; } else ! type = (tree) jcf->cpool.data[i]; return type; } --- 449,459 ---- tree cname = unmangle_classname (name, nlength); type = lookup_class (cname); } ! jcf->cpool.data[i].t = type; JPOOL_TAG (jcf, i) = CONSTANT_ResolvedClass; } else ! type = jcf->cpool.data[i].t; return type; } *************** get_class_constant (JCF *jcf , int i) *** 477,489 **** define the class it is supposed to.) */ int ! read_class (name) ! tree name; { JCF this_jcf, *jcf; tree icv, class = NULL_TREE; tree save_current_class = current_class; ! const char *save_input_filename = input_filename; JCF *save_current_jcf = current_jcf; if ((icv = IDENTIFIER_CLASS_VALUE (name)) != NULL_TREE) --- 463,475 ---- define the class it is supposed to.) */ int ! read_class (tree name) { JCF this_jcf, *jcf; tree icv, class = NULL_TREE; tree save_current_class = current_class; ! tree save_output_class = output_class; ! location_t save_location = input_location; JCF *save_current_jcf = current_jcf; if ((icv = IDENTIFIER_CLASS_VALUE (name)) != NULL_TREE) *************** read_class (name) *** 520,536 **** wfl_operator = build_expr_wfl (NULL_TREE, NULL, 0, 0); EXPR_WFL_FILENAME_NODE (wfl_operator) = file; input_filename = ggc_strdup (filename); ! current_class = NULL_TREE; current_function_decl = NULL_TREE; if (!HAS_BEEN_ALREADY_PARSED_P (file)) { if (!(finput = fopen (input_filename, "r"))) ! fatal_io_error ("can't reopen %s", input_filename); parse_source_file_1 (file, finput); parse_source_file_2 (); parse_source_file_3 (); if (fclose (finput)) ! fatal_io_error ("can't close %s", input_filename); } JCF_FINISH (current_jcf); java_pop_parser_context (generate); --- 506,522 ---- wfl_operator = build_expr_wfl (NULL_TREE, NULL, 0, 0); EXPR_WFL_FILENAME_NODE (wfl_operator) = file; input_filename = ggc_strdup (filename); ! output_class = current_class = NULL_TREE; current_function_decl = NULL_TREE; if (!HAS_BEEN_ALREADY_PARSED_P (file)) { if (!(finput = fopen (input_filename, "r"))) ! fatal_error ("can't reopen %s: %m", input_filename); parse_source_file_1 (file, finput); parse_source_file_2 (); parse_source_file_3 (); if (fclose (finput)) ! fatal_error ("can't close %s: %m", input_filename); } JCF_FINISH (current_jcf); java_pop_parser_context (generate); *************** read_class (name) *** 542,548 **** { java_parser_context_save_global (); java_push_parser_context (); ! current_class = class; input_filename = current_jcf->filename; if (JCF_SEEN_IN_ZIP (current_jcf)) read_zip_member(current_jcf, --- 528,534 ---- { java_parser_context_save_global (); java_push_parser_context (); ! output_class = current_class = class; input_filename = current_jcf->filename; if (JCF_SEEN_IN_ZIP (current_jcf)) read_zip_member(current_jcf, *************** read_class (name) *** 560,567 **** load_inner_classes (class); } current_class = save_current_class; ! input_filename = save_input_filename; current_jcf = save_current_jcf; return 1; } --- 546,554 ---- load_inner_classes (class); } + output_class = save_output_class; current_class = save_current_class; ! input_location = save_location; current_jcf = save_current_jcf; return 1; } *************** read_class (name) *** 574,582 **** - and then perhaps rename read_class to load_class. FIXME */ void ! load_class (class_or_name, verbose) ! tree class_or_name; ! int verbose; { tree name, saved; int class_loaded; --- 561,567 ---- - and then perhaps rename read_class to load_class. FIXME */ void ! load_class (tree class_or_name, int verbose) { tree name, saved; int class_loaded; *************** load_class (class_or_name, verbose) *** 621,629 **** /* Parse the .class file JCF. */ ! void ! jcf_parse (jcf) ! JCF* jcf; { int i, code; --- 606,613 ---- /* Parse the .class file JCF. */ ! static void ! jcf_parse (JCF* jcf) { int i, code; *************** jcf_parse (jcf) *** 693,700 **** /* If we came across inner classes, load them now. */ static void ! load_inner_classes (cur_class) ! tree cur_class; { tree current; for (current = DECL_INNER_CLASS_LIST (TYPE_NAME (cur_class)); current; --- 677,683 ---- /* If we came across inner classes, load them now. */ static void ! load_inner_classes (tree cur_class) { tree current; for (current = DECL_INNER_CLASS_LIST (TYPE_NAME (cur_class)); current; *************** load_inner_classes (cur_class) *** 708,743 **** } } - void - init_outgoing_cpool () - { - current_constant_pool_data_ref = NULL_TREE; - outgoing_cpool = xmalloc (sizeof (struct CPool)); - memset (outgoing_cpool, 0, sizeof (struct CPool)); - } - static void ! parse_class_file () { ! tree method, field; ! const char *save_input_filename = input_filename; ! int save_lineno = lineno; java_layout_seen_class_methods (); input_filename = DECL_SOURCE_FILE (TYPE_NAME (current_class)); ! lineno = 0; ! (*debug_hooks->start_source_file) (lineno, input_filename); ! init_outgoing_cpool (); /* Currently we always have to emit calls to _Jv_InitClass when compiling from class files. */ always_initialize_class_p = 1; ! for (field = TYPE_FIELDS (current_class); ! field != NULL_TREE; field = TREE_CHAIN (field)) ! if (FIELD_STATIC (field)) ! DECL_EXTERNAL (field) = 0; for (method = TYPE_METHODS (current_class); method != NULL_TREE; method = TREE_CHAIN (method)) --- 691,715 ---- } } static void ! parse_class_file (void) { ! tree method; ! location_t save_location = input_location; java_layout_seen_class_methods (); input_filename = DECL_SOURCE_FILE (TYPE_NAME (current_class)); ! input_line = 0; ! (*debug_hooks->start_source_file) (input_line, input_filename); /* Currently we always have to emit calls to _Jv_InitClass when compiling from class files. */ always_initialize_class_p = 1; ! gen_indirect_dispatch_tables (current_class); ! ! java_mark_class_local (current_class); for (method = TYPE_METHODS (current_class); method != NULL_TREE; method = TREE_CHAIN (method)) *************** parse_class_file () *** 778,788 **** continue; } ! lineno = 0; if (DECL_LINENUMBERS_OFFSET (method)) { ! register int i; ! register unsigned char *ptr; JCF_SEEK (jcf, DECL_LINENUMBERS_OFFSET (method)); linenumber_count = i = JCF_readu2 (jcf); linenumber_table = ptr = jcf->read_ptr; --- 750,760 ---- continue; } ! input_line = 0; if (DECL_LINENUMBERS_OFFSET (method)) { ! int i; ! unsigned char *ptr; JCF_SEEK (jcf, DECL_LINENUMBERS_OFFSET (method)); linenumber_count = i = JCF_readu2 (jcf); linenumber_table = ptr = jcf->read_ptr; *************** parse_class_file () *** 792,799 **** int line = GET_u2 (ptr); /* Set initial lineno lineno to smallest linenumber. * Needs to be set before init_function_start. */ ! if (lineno == 0 || line < lineno) ! lineno = line; } } else --- 764,771 ---- int line = GET_u2 (ptr); /* Set initial lineno lineno to smallest linenumber. * Needs to be set before init_function_start. */ ! if (input_line == 0 || line < input_line) ! input_line = line; } } else *************** parse_class_file () *** 819,835 **** finish_class (); ! (*debug_hooks->end_source_file) (save_lineno); ! input_filename = save_input_filename; ! lineno = save_lineno; } /* Parse a source file, as pointed by the current value of INPUT_FILENAME. */ static void ! parse_source_file_1 (file, finput) ! tree file; ! FILE *finput; { int save_error_count = java_error_count; /* Mark the file as parsed */ --- 791,804 ---- finish_class (); ! (*debug_hooks->end_source_file) (save_location.line); ! input_location = save_location; } /* Parse a source file, as pointed by the current value of INPUT_FILENAME. */ static void ! parse_source_file_1 (tree file, FILE *finput) { int save_error_count = java_error_count; /* Mark the file as parsed */ *************** parse_source_file_1 (file, finput) *** 861,867 **** /* Process a parsed source file, resolving names etc. */ static void ! parse_source_file_2 () { int save_error_count = java_error_count; java_complete_class (); /* Parse unsatisfied class decl. */ --- 830,836 ---- /* Process a parsed source file, resolving names etc. */ static void ! parse_source_file_2 (void) { int save_error_count = java_error_count; java_complete_class (); /* Parse unsatisfied class decl. */ *************** parse_source_file_2 () *** 869,875 **** } static void ! parse_source_file_3 () { int save_error_count = java_error_count; java_check_circular_reference (); /* Check on circular references */ --- 838,844 ---- } static void ! parse_source_file_3 (void) { int save_error_count = java_error_count; java_check_circular_reference (); /* Check on circular references */ *************** parse_source_file_3 () *** 880,894 **** } void ! add_predefined_file (name) ! tree name; { predef_filenames = tree_cons (NULL_TREE, name, predef_filenames); } int ! predefined_filename_p (node) ! tree node; { tree iter; --- 849,861 ---- } void ! add_predefined_file (tree name) { predef_filenames = tree_cons (NULL_TREE, name, predef_filenames); } int ! predefined_filename_p (tree node) { tree iter; *************** predefined_filename_p (node) *** 901,908 **** } void ! java_parse_file (set_yydebug) ! int set_yydebug ATTRIBUTE_UNUSED; { int filename_count = 0; char *list, *next; --- 868,874 ---- } void ! java_parse_file (int set_yydebug ATTRIBUTE_UNUSED) { int filename_count = 0; char *list, *next; *************** java_parse_file (set_yydebug) *** 914,920 **** int avail = 2000; finput = fopen (input_filename, "r"); if (finput == NULL) ! fatal_io_error ("can't open %s", input_filename); list = xmalloc(avail); next = list; for (;;) --- 880,886 ---- int avail = 2000; finput = fopen (input_filename, "r"); if (finput == NULL) ! fatal_error ("can't open %s: %m", input_filename); list = xmalloc(avail); next = list; for (;;) *************** java_parse_file (set_yydebug) *** 933,939 **** if (count == 0) { if (! feof (finput)) ! fatal_io_error ("error closing %s", input_filename); *next = '\0'; break; } --- 899,905 ---- if (count == 0) { if (! feof (finput)) ! fatal_error ("error closing %s: %m", input_filename); *next = '\0'; break; } *************** java_parse_file (set_yydebug) *** 944,952 **** finput = NULL; } else ! list = xstrdup (input_filename); ! do { for (next = list; ; ) { --- 910,918 ---- finput = NULL; } else ! list = input_filename ? xstrdup (input_filename) : 0; ! while (list) { for (next = list; ; ) { *************** java_parse_file (set_yydebug) *** 1009,1018 **** if (twice) { ! const char *saved_input_filename = input_filename; ! input_filename = value; ! warning ("source file seen twice on command line and will be compiled only once"); ! input_filename = saved_input_filename; } else { --- 975,985 ---- if (twice) { ! location_t warn_loc; ! warn_loc.file = value; ! warn_loc.line = 0; ! warning ("%Hsource file seen twice on command line and " ! "will be compiled only once", &warn_loc); } else { *************** java_parse_file (set_yydebug) *** 1024,1030 **** } list = next; } - while (next); if (filename_count == 0) warning ("no input file specified"); --- 991,996 ---- *************** java_parse_file (set_yydebug) *** 1056,1067 **** /* Close previous descriptor, if any */ if (finput && fclose (finput)) ! fatal_io_error ("can't close input file %s", main_input_filename); finput = fopen (IDENTIFIER_POINTER (name), "rb"); if (finput == NULL) ! fatal_io_error ("can't open %s", IDENTIFIER_POINTER (name)); ! #ifdef IO_BUFFER_SIZE setvbuf (finput, xmalloc (IO_BUFFER_SIZE), _IOFBF, IO_BUFFER_SIZE); --- 1022,1033 ---- /* Close previous descriptor, if any */ if (finput && fclose (finput)) ! fatal_error ("can't close input file %s: %m", main_input_filename); finput = fopen (IDENTIFIER_POINTER (name), "rb"); if (finput == NULL) ! fatal_error ("can't open %s: %m", IDENTIFIER_POINTER (name)); ! #ifdef IO_BUFFER_SIZE setvbuf (finput, xmalloc (IO_BUFFER_SIZE), _IOFBF, IO_BUFFER_SIZE); *************** java_parse_file (set_yydebug) *** 1077,1083 **** if (magic == 0xcafebabe) { CLASS_FILE_P (node) = 1; ! current_jcf = ALLOC (sizeof (JCF)); JCF_ZERO (current_jcf); current_jcf->read_state = finput; current_jcf->filbuf = jcf_filbuf_from_stdio; --- 1043,1049 ---- if (magic == 0xcafebabe) { CLASS_FILE_P (node) = 1; ! current_jcf = ggc_alloc (sizeof (JCF)); JCF_ZERO (current_jcf); current_jcf->read_state = finput; current_jcf->filbuf = jcf_filbuf_from_stdio; *************** java_parse_file (set_yydebug) *** 1089,1101 **** else if (magic == (JCF_u4)ZIPMAGIC) { ZIP_FILE_P (node) = 1; JCF_ZERO (main_jcf); main_jcf->read_state = finput; main_jcf->filbuf = jcf_filbuf_from_stdio; if (open_in_zip (main_jcf, input_filename, NULL, 0) < 0) fatal_error ("bad zip/jar file %s", IDENTIFIER_POINTER (name)); localToFile = SeenZipFiles; ! /* Register all the class defined there. */ process_zip_dir (main_jcf->read_state); parse_zip_file_entries (); /* --- 1055,1068 ---- else if (magic == (JCF_u4)ZIPMAGIC) { ZIP_FILE_P (node) = 1; + main_jcf = ggc_alloc (sizeof (JCF)); JCF_ZERO (main_jcf); main_jcf->read_state = finput; main_jcf->filbuf = jcf_filbuf_from_stdio; if (open_in_zip (main_jcf, input_filename, NULL, 0) < 0) fatal_error ("bad zip/jar file %s", IDENTIFIER_POINTER (name)); localToFile = SeenZipFiles; ! /* Register all the classes defined there. */ process_zip_dir (main_jcf->read_state); parse_zip_file_entries (); /* *************** java_parse_file (set_yydebug) *** 1131,1137 **** input_filename = IDENTIFIER_POINTER (TREE_VALUE (node)); if (CLASS_FILE_P (node)) { ! current_class = TREE_PURPOSE (node); current_jcf = TYPE_JCF (current_class); layout_class (current_class); load_inner_classes (current_class); --- 1098,1104 ---- input_filename = IDENTIFIER_POINTER (TREE_VALUE (node)); if (CLASS_FILE_P (node)) { ! output_class = current_class = TREE_PURPOSE (node); current_jcf = TYPE_JCF (current_class); layout_class (current_class); load_inner_classes (current_class); *************** java_parse_file (set_yydebug) *** 1144,1153 **** java_expand_classes (); if (!java_report_errors () && !flag_syntax_only) { emit_register_classes (); - if (flag_indirect_dispatch) - emit_offset_symbol_table (); } } /* Process all class entries found in the zip file. */ --- 1111,1168 ---- java_expand_classes (); if (!java_report_errors () && !flag_syntax_only) { + /* Optimize and expand all classes compiled from source. */ + cgraph_finalize_compilation_unit (); + cgraph_optimize (); + java_finish_classes (); + + /* Emit the .jcf section. */ emit_register_classes (); } + + write_resource_constructor (); + } + + /* Return the name of the class corresponding to the name of the file + in this zip entry. The result is newly allocated using ALLOC. */ + static char * + compute_class_name (struct ZipDirectory *zdir) + { + char *class_name_in_zip_dir = ZIPDIR_FILENAME (zdir); + char *class_name; + int j; + + class_name = ALLOC (zdir->filename_length + 1 - 6); + strncpy (class_name, class_name_in_zip_dir, zdir->filename_length - 6); + class_name [zdir->filename_length - 6] = '\0'; + for (j = 0; class_name[j]; ++j) + class_name[j] = class_name[j] == '/' ? '.' : class_name[j]; + return class_name; + } + + /* Return 0 if we should skip this entry, 1 if it is a .class file, 2 + if it is a property file of some sort. */ + static int + classify_zip_file (struct ZipDirectory *zdir) + { + char *class_name_in_zip_dir = ZIPDIR_FILENAME (zdir); + + if (zdir->filename_length > 6 + && !strncmp (&class_name_in_zip_dir[zdir->filename_length - 6], + ".class", 6)) + return 1; + + /* For now we drop the manifest, but not other information. */ + if (zdir->filename_length == 20 + && !strncmp (class_name_in_zip_dir, "META-INF/MANIFEST.MF", 20)) + return 0; + + /* Drop directory entries. */ + if (zdir->filename_length > 0 + && class_name_in_zip_dir[zdir->filename_length - 1] == '/') + return 0; + + return 2; } /* Process all class entries found in the zip file. */ *************** parse_zip_file_entries (void) *** 1161,1195 **** i < localToFile->count; i++, zdir = ZIPDIR_NEXT (zdir)) { tree class; - - /* We don't need to consider those files. */ - if (!zdir->size || !zdir->filename_offset) - continue; ! class = lookup_class (get_identifier (ZIPDIR_FILENAME (zdir))); ! current_jcf = TYPE_JCF (class); ! current_class = class; ! ! if ( !CLASS_LOADED_P (class)) { ! if (! CLASS_PARSED_P (class)) ! { ! read_zip_member(current_jcf, zdir, localToFile); ! jcf_parse (current_jcf); ! } ! layout_class (current_class); ! load_inner_classes (current_class); ! } ! if (TYPE_SIZE (current_class) != error_mark_node) ! { ! input_filename = current_jcf->filename; ! parse_class_file (); ! FREE (current_jcf->buffer); /* No longer necessary */ ! /* Note: there is a way to free this buffer right after a ! class seen in a zip file has been parsed. The idea is the ! set its jcf in such a way that buffer will be reallocated ! the time the code for the class will be generated. FIXME. */ } } } --- 1176,1257 ---- i < localToFile->count; i++, zdir = ZIPDIR_NEXT (zdir)) { tree class; ! switch (classify_zip_file (zdir)) { ! case 0: ! continue; ! case 1: ! { ! char *class_name = compute_class_name (zdir); ! class = lookup_class (get_identifier (class_name)); ! FREE (class_name); ! current_jcf = TYPE_JCF (class); ! output_class = current_class = class; ! ! if (! CLASS_LOADED_P (class)) ! { ! if (! CLASS_PARSED_P (class)) ! { ! read_zip_member (current_jcf, zdir, localToFile); ! jcf_parse (current_jcf); ! } ! layout_class (current_class); ! load_inner_classes (current_class); ! } ! ! if (TYPE_SIZE (current_class) != error_mark_node) ! { ! input_filename = current_jcf->filename; ! parse_class_file (); ! FREE (current_jcf->buffer); /* No longer necessary */ ! /* Note: there is a way to free this buffer right after a ! class seen in a zip file has been parsed. The idea is the ! set its jcf in such a way that buffer will be reallocated ! the time the code for the class will be generated. FIXME. */ ! } ! } ! break; ! ! case 2: ! { ! char *file_name, *class_name_in_zip_dir, *buffer; ! JCF *jcf; ! file_name = ALLOC (zdir->filename_length + 1); ! class_name_in_zip_dir = ZIPDIR_FILENAME (zdir); ! strncpy (file_name, class_name_in_zip_dir, zdir->filename_length); ! file_name[zdir->filename_length] = '\0'; ! jcf = ALLOC (sizeof (JCF)); ! JCF_ZERO (jcf); ! jcf->read_state = finput; ! jcf->filbuf = jcf_filbuf_from_stdio; ! jcf->java_source = 0; ! jcf->classname = NULL; ! jcf->filename = file_name; ! jcf->zipd = zdir; ! ! if (read_zip_member (jcf, zdir, localToFile) < 0) ! fatal_error ("error while reading %s from zip file", file_name); ! ! buffer = ALLOC (zdir->filename_length + 1 + ! (jcf->buffer_end - jcf->buffer)); ! strcpy (buffer, file_name); ! /* This is not a typo: we overwrite the trailing \0 of the ! file name; this is just how the data is laid out. */ ! memcpy (buffer + zdir->filename_length, ! jcf->buffer, jcf->buffer_end - jcf->buffer); ! ! compile_resource_data (file_name, buffer, ! jcf->buffer_end - jcf->buffer); ! JCF_FINISH (jcf); ! FREE (jcf); ! FREE (buffer); ! } ! break; ! ! default: ! abort (); } } } *************** process_zip_dir (FILE *finput) *** 1209,1245 **** char *class_name, *file_name, *class_name_in_zip_dir; tree class; JCF *jcf; - int j; class_name_in_zip_dir = ZIPDIR_FILENAME (zdir); ! /* We choose to not to process entries with a zero size or entries ! not bearing the .class extension. */ ! if (!zdir->size || !zdir->filename_offset || ! strncmp (&class_name_in_zip_dir[zdir->filename_length-6], ! ".class", 6)) ! { ! /* So it will be skipped in parse_zip_file_entries */ ! zdir->size = 0; ! continue; ! } ! class_name = ALLOC (zdir->filename_length+1-6); file_name = ALLOC (zdir->filename_length+1); ! jcf = ALLOC (sizeof (JCF)); JCF_ZERO (jcf); - strncpy (class_name, class_name_in_zip_dir, zdir->filename_length-6); - class_name [zdir->filename_length-6] = '\0'; strncpy (file_name, class_name_in_zip_dir, zdir->filename_length); file_name [zdir->filename_length] = '\0'; - for (j=0; class_name[j]; j++) - class_name [j] = (class_name [j] == '/' ? '.' : class_name [j]); - - /* Yes, we write back the true class name into the zip directory. */ - strcpy (class_name_in_zip_dir, class_name); - zdir->filename_length = j; class = lookup_class (get_identifier (class_name)); jcf->read_state = finput; --- 1271,1291 ---- char *class_name, *file_name, *class_name_in_zip_dir; tree class; JCF *jcf; class_name_in_zip_dir = ZIPDIR_FILENAME (zdir); ! /* Here we skip non-class files; we handle them later. */ ! if (classify_zip_file (zdir) != 1) ! continue; ! class_name = compute_class_name (zdir); file_name = ALLOC (zdir->filename_length+1); ! jcf = ggc_alloc (sizeof (JCF)); JCF_ZERO (jcf); strncpy (file_name, class_name_in_zip_dir, zdir->filename_length); file_name [zdir->filename_length] = '\0'; class = lookup_class (get_identifier (class_name)); jcf->read_state = finput; *************** process_zip_dir (FILE *finput) *** 1256,1266 **** /* Initialization. */ void ! init_jcf_parse () { - /* Register roots with the garbage collector. */ - ggc_add_root (¤t_jcf, 1, sizeof (JCF), (void (*)(void *))ggc_mark_jcf); - init_src_parse (); } --- 1302,1309 ---- /* Initialization. */ void ! init_jcf_parse (void) { init_src_parse (); } diff -Nrc3pad gcc-3.3.3/gcc/java/jcf-path.c gcc-3.4.0/gcc/java/jcf-path.c *** gcc-3.3.3/gcc/java/jcf-path.c 2003-03-07 04:39:46.000000000 +0000 --- gcc-3.4.0/gcc/java/jcf-path.c 2003-07-03 04:24:01.000000000 +0000 *************** *** 1,20 **** /* Handle CLASSPATH, -classpath, and path searching. ! Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software ! Foundation, Inc. ! This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,21 ---- /* Handle CLASSPATH, -classpath, and path searching. + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 + Free Software Foundation, Inc. ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 26,45 **** #include "config.h" #include "system.h" #include #include "jcf.h" - /* By default, colon separates directories in a path. */ - #ifndef PATH_SEPARATOR - #define PATH_SEPARATOR ':' - #endif - - #ifndef DIR_SEPARATOR - #define DIR_SEPARATOR '/' - #endif - #ifndef DIR_UP #define DIR_UP ".." #endif --- 27,39 ---- #include "config.h" #include "system.h" + #include "coretypes.h" + #include "tm.h" #include #include "jcf.h" #ifndef DIR_UP #define DIR_UP ".." #endif *************** struct entry *** 59,68 **** struct entry *next; }; ! static void free_entry PARAMS ((struct entry **)); ! static void append_entry PARAMS ((struct entry **, struct entry *)); ! static void add_entry PARAMS ((struct entry **, const char *, int)); ! static void add_path PARAMS ((struct entry **, const char *, int)); /* We support several different ways to set the class path. --- 53,62 ---- struct entry *next; }; ! static void free_entry (struct entry **); ! static void append_entry (struct entry **, struct entry *); ! static void add_entry (struct entry **, const char *, int); ! static void add_path (struct entry **, const char *, int); /* We support several different ways to set the class path. *************** static int longest_path = 0; *** 102,109 **** static void ! free_entry (entp) ! struct entry **entp; { struct entry *e, *n; --- 96,102 ---- static void ! free_entry (struct entry **entp) { struct entry *e, *n; *************** free_entry (entp) *** 117,125 **** } static void ! append_entry (entp, ent) ! struct entry **entp; ! struct entry *ent; { /* It doesn't matter if this is slow, since it is run only at startup, and then infrequently. */ --- 110,116 ---- } static void ! append_entry (struct entry **entp, struct entry *ent) { /* It doesn't matter if this is slow, since it is run only at startup, and then infrequently. */ *************** append_entry (entp, ent) *** 136,145 **** } static void ! add_entry (entp, filename, is_system) ! struct entry **entp; ! const char *filename; ! int is_system; { int len; struct entry *n; --- 127,133 ---- } static void ! add_entry (struct entry **entp, const char *filename, int is_system) { int len; struct entry *n; *************** add_entry (entp, filename, is_system) *** 150,164 **** len = strlen (filename); ! if (len > 4 && (COMPARE_FILENAMES (filename + len - 4, ".zip") == 0 ! || COMPARE_FILENAMES (filename + len - 4, ".jar") == 0)) { n->flags |= FLAG_ZIP; /* If the user uses -classpath then he'll have to include libgcj.jar in the value. We check for this in a simplistic way. Symlinks will fool this test. This is only used for -MM and -MMD, so it probably isn't terribly important. */ ! if (! COMPARE_FILENAMES (filename, LIBGCJ_ZIP_FILE)) n->flags |= FLAG_SYSTEM; } --- 138,152 ---- len = strlen (filename); ! if (len > 4 && (FILENAME_CMP (filename + len - 4, ".zip") == 0 ! || FILENAME_CMP (filename + len - 4, ".jar") == 0)) { n->flags |= FLAG_ZIP; /* If the user uses -classpath then he'll have to include libgcj.jar in the value. We check for this in a simplistic way. Symlinks will fool this test. This is only used for -MM and -MMD, so it probably isn't terribly important. */ ! if (! FILENAME_CMP (filename, LIBGCJ_ZIP_FILE)) n->flags |= FLAG_SYSTEM; } *************** add_entry (entp, filename, is_system) *** 184,193 **** } static void ! add_path (entp, cp, is_system) ! struct entry **entp; ! const char *cp; ! int is_system; { const char *startp, *endp; --- 172,178 ---- } static void ! add_path (struct entry **entp, const char *cp, int is_system) { const char *startp, *endp; *************** static int init_done = 0; *** 226,232 **** /* Initialize the path module. */ void ! jcf_path_init () { char *cp; char *try, sep[2]; --- 211,217 ---- /* Initialize the path module. */ void ! jcf_path_init (void) { char *cp; char *try, sep[2]; *************** jcf_path_init () *** 319,326 **** This overrides only the $CLASSPATH environment variable. */ void ! jcf_path_classpath_arg (path) ! const char *path; { free_entry (&classpath_user); add_path (&classpath_user, path, 0); --- 304,310 ---- This overrides only the $CLASSPATH environment variable. */ void ! jcf_path_classpath_arg (const char *path) { free_entry (&classpath_user); add_path (&classpath_user, path, 0); *************** jcf_path_classpath_arg (path) *** 329,336 **** /* Call this when -bootclasspath is seen on the command line. */ void ! jcf_path_bootclasspath_arg (path) ! const char *path; { free_entry (&sys_dirs); add_path (&sys_dirs, path, 1); --- 313,319 ---- /* Call this when -bootclasspath is seen on the command line. */ void ! jcf_path_bootclasspath_arg (const char *path) { free_entry (&sys_dirs); add_path (&sys_dirs, path, 1); *************** jcf_path_bootclasspath_arg (path) *** 339,346 **** /* Call this when -extdirs is seen on the command line. */ void ! jcf_path_extdirs_arg (cp) ! const char *cp; { const char *startp, *endp; --- 322,328 ---- /* Call this when -extdirs is seen on the command line. */ void ! jcf_path_extdirs_arg (const char *cp) { const char *startp, *endp; *************** jcf_path_extdirs_arg (cp) *** 404,411 **** /* Call this when -I is seen on the command line. */ void ! jcf_path_include_arg (path) ! const char *path; { add_entry (&include_dirs, path, 0); } --- 386,392 ---- /* Call this when -I is seen on the command line. */ void ! jcf_path_include_arg (const char *path) { add_entry (&include_dirs, path, 0); } *************** jcf_path_include_arg (path) *** 414,421 **** we provide a way to iterate through the sealed list. If PRINT is true then we print the final class path to stderr. */ void ! jcf_path_seal (print) ! int print; { struct entry *secondary; --- 395,401 ---- we provide a way to iterate through the sealed list. If PRINT is true then we print the final class path to stderr. */ void ! jcf_path_seal (int print) { struct entry *secondary; *************** jcf_path_seal (print) *** 463,476 **** } void * ! jcf_path_start () { return (void *) sealed; } void * ! jcf_path_next (x) ! void *x; { struct entry *ent = (struct entry *) x; return (void *) ent->next; --- 443,455 ---- } void * ! jcf_path_start (void) { return (void *) sealed; } void * ! jcf_path_next (void *x) { struct entry *ent = (struct entry *) x; return (void *) ent->next; *************** jcf_path_next (x) *** 479,509 **** /* We guarantee that the return path will either be a zip file, or it will end with a directory separator. */ char * ! jcf_path_name (x) ! void *x; { struct entry *ent = (struct entry *) x; return ent->name; } int ! jcf_path_is_zipfile (x) ! void *x; { struct entry *ent = (struct entry *) x; return (ent->flags & FLAG_ZIP); } int ! jcf_path_is_system (x) ! void *x; { struct entry *ent = (struct entry *) x; return (ent->flags & FLAG_SYSTEM); } int ! jcf_path_max_len () { return longest_path; } --- 458,485 ---- /* We guarantee that the return path will either be a zip file, or it will end with a directory separator. */ char * ! jcf_path_name (void *x) { struct entry *ent = (struct entry *) x; return ent->name; } int ! jcf_path_is_zipfile (void *x) { struct entry *ent = (struct entry *) x; return (ent->flags & FLAG_ZIP); } int ! jcf_path_is_system (void *x) { struct entry *ent = (struct entry *) x; return (ent->flags & FLAG_SYSTEM); } int ! jcf_path_max_len (void) { return longest_path; } diff -Nrc3pad gcc-3.3.3/gcc/java/jcf-reader.c gcc-3.4.0/gcc/java/jcf-reader.c *** gcc-3.3.3/gcc/java/jcf-reader.c 2002-11-25 14:22:06.000000000 +0000 --- gcc-3.4.0/gcc/java/jcf-reader.c 2003-02-24 02:14:49.000000000 +0000 *************** *** 1,21 **** /* This file read a Java(TM) .class file. It is not stand-alone: It depends on tons of macros, and the intent is you #include this file after you've defined the macros. ! Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. ! This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,23 ---- /* This file read a Java(TM) .class file. It is not stand-alone: It depends on tons of macros, and the intent is you #include this file after you've defined the macros. + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 + Free Software Foundation, Inc. ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 26,44 **** #include "jcf.h" #include "zipfile.h" ! static int get_attribute PARAMS ((JCF *)); ! static int jcf_parse_preamble PARAMS ((JCF *)); ! static int jcf_parse_constant_pool PARAMS ((JCF *)); ! static void jcf_parse_class PARAMS ((JCF *)); ! static int jcf_parse_fields PARAMS ((JCF *)); ! static int jcf_parse_one_method PARAMS ((JCF *)); ! static int jcf_parse_methods PARAMS ((JCF *)); ! static int jcf_parse_final_attributes PARAMS ((JCF *)); #ifdef NEED_PEEK_ATTRIBUTE ! static int peek_attribute PARAMS ((JCF *, int, const char *, int)); #endif #ifdef NEED_SKIP_ATTRIBUTE ! static void skip_attribute PARAMS ((JCF *, int)); #endif /* Go through all available attribute (ATTRIBUTE_NUMER) and try to --- 28,46 ---- #include "jcf.h" #include "zipfile.h" ! static int get_attribute (JCF *); ! static int jcf_parse_preamble (JCF *); ! static int jcf_parse_constant_pool (JCF *); ! static void jcf_parse_class (JCF *); ! static int jcf_parse_fields (JCF *); ! static int jcf_parse_one_method (JCF *); ! static int jcf_parse_methods (JCF *); ! static int jcf_parse_final_attributes (JCF *); #ifdef NEED_PEEK_ATTRIBUTE ! static int peek_attribute (JCF *, int, const char *, int); #endif #ifdef NEED_SKIP_ATTRIBUTE ! static void skip_attribute (JCF *, int); #endif /* Go through all available attribute (ATTRIBUTE_NUMER) and try to *************** static void skip_attribute PARAMS ((JCF *** 48,58 **** #ifdef NEED_PEEK_ATTRIBUTE /* Not everyone uses this function */ static int ! peek_attribute (jcf, attribute_number, peeked_name, peeked_name_length) ! JCF *jcf; ! int attribute_number; ! const char *peeked_name; ! int peeked_name_length; { int to_return = 0; long absolute_offset = (long)JCF_TELL (jcf); --- 50,57 ---- #ifdef NEED_PEEK_ATTRIBUTE /* Not everyone uses this function */ static int ! peek_attribute (JCF *jcf, int attribute_number, const char *peeked_name, ! int peeked_name_length) { int to_return = 0; long absolute_offset = (long)JCF_TELL (jcf); *************** peek_attribute (jcf, attribute_number, p *** 90,98 **** #ifdef NEED_SKIP_ATTRIBUTE /* Not everyone uses this function */ static void ! skip_attribute (jcf, number_of_attribute) ! JCF *jcf; ! int number_of_attribute; { while (number_of_attribute--) { --- 89,95 ---- #ifdef NEED_SKIP_ATTRIBUTE /* Not everyone uses this function */ static void ! skip_attribute (JCF *jcf, int number_of_attribute) { while (number_of_attribute--) { *************** skip_attribute (jcf, number_of_attribute *** 106,113 **** #endif static int ! DEFUN(get_attribute, (jcf), ! JCF *jcf) { uint16 attribute_name = (JCF_FILL (jcf, 6), JCF_readu2 (jcf)); uint32 attribute_length = JCF_readu4 (jcf); --- 103,109 ---- #endif static int ! get_attribute (JCF *jcf) { uint16 attribute_name = (JCF_FILL (jcf, 6), JCF_readu2 (jcf)); uint32 attribute_length = JCF_readu4 (jcf); *************** DEFUN(get_attribute, (jcf), *** 225,230 **** --- 221,233 ---- } else #endif + #ifdef HANDLE_DEPRECATED_ATTRIBUTE + if (MATCH_ATTRIBUTE ("Deprecated")) + { + HANDLE_DEPRECATED_ATTRIBUTE (); + } + else + #endif { #ifdef PROCESS_OTHER_ATTRIBUTE PROCESS_OTHER_ATTRIBUTE(jcf, attribute_name, attribute_length); *************** DEFUN(get_attribute, (jcf), *** 239,246 **** /* Read and handle the pre-amble. */ static int ! DEFUN(jcf_parse_preamble, (jcf), ! JCF* jcf) { uint32 magic = (JCF_FILL (jcf, 8), JCF_readu4 (jcf)); uint16 minor_version ATTRIBUTE_UNUSED = JCF_readu2 (jcf); --- 242,248 ---- /* Read and handle the pre-amble. */ static int ! jcf_parse_preamble (JCF* jcf) { uint32 magic = (JCF_FILL (jcf, 8), JCF_readu4 (jcf)); uint16 minor_version ATTRIBUTE_UNUSED = JCF_readu2 (jcf); *************** DEFUN(jcf_parse_preamble, (jcf), *** 260,272 **** Return -2 if a bad cross-reference (index of other constant) was seen. */ static int ! DEFUN(jcf_parse_constant_pool, (jcf), ! JCF* jcf) { int i, n; JPOOL_SIZE (jcf) = (JCF_FILL (jcf, 2), JCF_readu2 (jcf)); ! jcf->cpool.tags = ALLOC (JPOOL_SIZE (jcf)); ! jcf->cpool.data = ALLOC (sizeof (jword) * JPOOL_SIZE (jcf)); jcf->cpool.tags[0] = 0; #ifdef HANDLE_START_CONSTANT_POOL HANDLE_START_CONSTANT_POOL (JPOOL_SIZE (jcf)); --- 262,273 ---- Return -2 if a bad cross-reference (index of other constant) was seen. */ static int ! jcf_parse_constant_pool (JCF* jcf) { int i, n; JPOOL_SIZE (jcf) = (JCF_FILL (jcf, 2), JCF_readu2 (jcf)); ! jcf->cpool.tags = ggc_alloc (JPOOL_SIZE (jcf)); ! jcf->cpool.data = ggc_alloc (sizeof (jword) * JPOOL_SIZE (jcf)); jcf->cpool.tags[0] = 0; #ifdef HANDLE_START_CONSTANT_POOL HANDLE_START_CONSTANT_POOL (JPOOL_SIZE (jcf)); *************** DEFUN(jcf_parse_constant_pool, (jcf), *** 286,310 **** { case CONSTANT_String: case CONSTANT_Class: ! jcf->cpool.data[i] = JCF_readu2 (jcf); break; case CONSTANT_Fieldref: case CONSTANT_Methodref: case CONSTANT_InterfaceMethodref: case CONSTANT_NameAndType: ! jcf->cpool.data[i] = JCF_readu2 (jcf); ! jcf->cpool.data[i] |= JCF_readu2 (jcf) << 16; break; case CONSTANT_Integer: case CONSTANT_Float: ! jcf->cpool.data[i] = JCF_readu4 (jcf); break; case CONSTANT_Long: case CONSTANT_Double: ! jcf->cpool.data[i] = JCF_readu4 (jcf); i++; /* These take up two spots in the constant pool */ jcf->cpool.tags[i] = 0; ! jcf->cpool.data[i] = JCF_readu4 (jcf); break; case CONSTANT_Utf8: n = JCF_readu2 (jcf); --- 287,311 ---- { case CONSTANT_String: case CONSTANT_Class: ! jcf->cpool.data[i].w = JCF_readu2 (jcf); break; case CONSTANT_Fieldref: case CONSTANT_Methodref: case CONSTANT_InterfaceMethodref: case CONSTANT_NameAndType: ! jcf->cpool.data[i].w = JCF_readu2 (jcf); ! jcf->cpool.data[i].w |= JCF_readu2 (jcf) << 16; break; case CONSTANT_Integer: case CONSTANT_Float: ! jcf->cpool.data[i].w = JCF_readu4 (jcf); break; case CONSTANT_Long: case CONSTANT_Double: ! jcf->cpool.data[i].w = JCF_readu4 (jcf); i++; /* These take up two spots in the constant pool */ jcf->cpool.tags[i] = 0; ! jcf->cpool.data[i].w = JCF_readu4 (jcf); break; case CONSTANT_Utf8: n = JCF_readu2 (jcf); *************** DEFUN(jcf_parse_constant_pool, (jcf), *** 312,318 **** #ifdef HANDLE_CONSTANT_Utf8 HANDLE_CONSTANT_Utf8(jcf, i, n); #else ! jcf->cpool.data[i] = JCF_TELL(jcf) - 2; JCF_SKIP (jcf, n); #endif break; --- 313,319 ---- #ifdef HANDLE_CONSTANT_Utf8 HANDLE_CONSTANT_Utf8(jcf, i, n); #else ! jcf->cpool.data[i].w = JCF_TELL(jcf) - 2; JCF_SKIP (jcf, n); #endif break; *************** DEFUN(jcf_parse_constant_pool, (jcf), *** 326,333 **** /* Read various class flags and numbers. */ static void ! DEFUN(jcf_parse_class, (jcf), ! JCF* jcf) { int i; uint16 interfaces_count; --- 327,333 ---- /* Read various class flags and numbers. */ static void ! jcf_parse_class (JCF* jcf) { int i; uint16 interfaces_count; *************** DEFUN(jcf_parse_class, (jcf), *** 355,362 **** /* Read fields. */ static int ! DEFUN(jcf_parse_fields, (jcf), ! JCF* jcf) { int i, j; uint16 fields_count; --- 355,361 ---- /* Read fields. */ static int ! jcf_parse_fields (JCF* jcf) { int i, j; uint16 fields_count; *************** DEFUN(jcf_parse_fields, (jcf), *** 395,402 **** /* Read methods. */ static int ! DEFUN(jcf_parse_one_method, (jcf), ! JCF* jcf) { int i; uint16 access_flags = (JCF_FILL (jcf, 8), JCF_readu2 (jcf)); --- 394,400 ---- /* Read methods. */ static int ! jcf_parse_one_method (JCF* jcf) { int i; uint16 access_flags = (JCF_FILL (jcf, 8), JCF_readu2 (jcf)); *************** DEFUN(jcf_parse_one_method, (jcf), *** 419,426 **** } static int ! DEFUN(jcf_parse_methods, (jcf), ! JCF* jcf) { int i; uint16 methods_count; --- 417,423 ---- } static int ! jcf_parse_methods (JCF* jcf) { int i; uint16 methods_count; *************** DEFUN(jcf_parse_methods, (jcf), *** 443,450 **** /* Read attributes. */ static int ! DEFUN(jcf_parse_final_attributes, (jcf), ! JCF *jcf) { int i; uint16 attributes_count = (JCF_FILL (jcf, 2), JCF_readu2 (jcf)); --- 440,446 ---- /* Read attributes. */ static int ! jcf_parse_final_attributes (JCF *jcf) { int i; uint16 attributes_count = (JCF_FILL (jcf, 2), JCF_readu2 (jcf)); diff -Nrc3pad gcc-3.3.3/gcc/java/jcf-write.c gcc-3.4.0/gcc/java/jcf-write.c *** gcc-3.3.3/gcc/java/jcf-write.c 2003-04-10 14:54:08.000000000 +0000 --- gcc-3.4.0/gcc/java/jcf-write.c 2003-12-20 15:38:27.000000000 +0000 *************** *** 1,19 **** /* Write out a Java(TM) class file. ! Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,20 ---- /* Write out a Java(TM) class file. ! Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ! Free Software Foundation, Inc. ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 23,34 **** #include "config.h" #include "system.h" #include "jcf.h" #include "tree.h" #include "real.h" #include "java-tree.h" #include "obstack.h" - #undef AND #include "rtl.h" #include "flags.h" #include "java-opcodes.h" --- 24,36 ---- #include "config.h" #include "system.h" + #include "coretypes.h" + #include "tm.h" #include "jcf.h" #include "tree.h" #include "real.h" #include "java-tree.h" #include "obstack.h" #include "rtl.h" #include "flags.h" #include "java-opcodes.h" *************** The Free Software Foundation is independ *** 36,52 **** #include "buffer.h" #include "toplev.h" #include "ggc.h" ! ! #ifndef DIR_SEPARATOR ! #define DIR_SEPARATOR '/' ! #endif extern struct obstack temporary_obstack; /* Base directory in which `.class' files should be written. NULL means to put the file into the same directory as the corresponding .java file. */ ! char *jcf_write_base_directory = NULL; /* Make sure bytecode.data is big enough for at least N more bytes. */ --- 38,51 ---- #include "buffer.h" #include "toplev.h" #include "ggc.h" ! #include "tm_p.h" extern struct obstack temporary_obstack; /* Base directory in which `.class' files should be written. NULL means to put the file into the same directory as the corresponding .java file. */ ! const char *jcf_write_base_directory = NULL; /* Make sure bytecode.data is big enough for at least N more bytes. */ *************** struct jcf_block *** 126,132 **** If the label has been defined: Until perform_relocations is finished, this is the maximum possible ! value of the bytecode offset at the begnning of this block. After perform_relocations, it is the actual offset (pc). */ int pc; --- 125,131 ---- If the label has been defined: Until perform_relocations is finished, this is the maximum possible ! value of the bytecode offset at the beginning of this block. After perform_relocations, it is the actual offset (pc). */ int pc; *************** struct jcf_partial *** 277,367 **** /* Information about the current switch statement. */ struct jcf_switch_state *sw_state; ! /* The count of jsr instructions that have been emmitted. */ long num_jsrs; }; ! static void generate_bytecode_insns PARAMS ((tree, int, struct jcf_partial *)); ! static struct chunk * alloc_chunk PARAMS ((struct chunk *, unsigned char *, ! int, struct obstack *)); ! static unsigned char * append_chunk PARAMS ((unsigned char *, int, ! struct jcf_partial *)); ! static void append_chunk_copy PARAMS ((unsigned char *, int, ! struct jcf_partial *)); ! static struct jcf_block * gen_jcf_label PARAMS ((struct jcf_partial *)); ! static void finish_jcf_block PARAMS ((struct jcf_partial *)); ! static void define_jcf_label PARAMS ((struct jcf_block *, ! struct jcf_partial *)); ! static struct jcf_block * get_jcf_label_here PARAMS ((struct jcf_partial *)); ! static void put_linenumber PARAMS ((int, struct jcf_partial *)); ! static void localvar_alloc PARAMS ((tree, struct jcf_partial *)); ! static void maybe_free_localvar PARAMS ((tree, struct jcf_partial *, int)); ! static int get_access_flags PARAMS ((tree)); ! static void write_chunks PARAMS ((FILE *, struct chunk *)); ! static int adjust_typed_op PARAMS ((tree, int)); ! static void generate_bytecode_conditional PARAMS ((tree, struct jcf_block *, ! struct jcf_block *, int, ! struct jcf_partial *)); ! static void generate_bytecode_return PARAMS ((tree, struct jcf_partial *)); ! static void perform_relocations PARAMS ((struct jcf_partial *)); ! static void init_jcf_state PARAMS ((struct jcf_partial *, struct obstack *)); ! static void init_jcf_method PARAMS ((struct jcf_partial *, tree)); ! static void release_jcf_state PARAMS ((struct jcf_partial *)); ! static struct chunk * generate_classfile PARAMS ((tree, struct jcf_partial *)); ! static struct jcf_handler *alloc_handler PARAMS ((struct jcf_block *, ! struct jcf_block *, ! struct jcf_partial *)); ! static void emit_iinc PARAMS ((tree, HOST_WIDE_INT, struct jcf_partial *)); ! static void emit_reloc PARAMS ((HOST_WIDE_INT, int, struct jcf_block *, ! struct jcf_partial *)); ! static void push_constant1 PARAMS ((HOST_WIDE_INT, struct jcf_partial *)); ! static void push_constant2 PARAMS ((HOST_WIDE_INT, struct jcf_partial *)); ! static void push_int_const PARAMS ((HOST_WIDE_INT, struct jcf_partial *)); ! static int find_constant_wide PARAMS ((HOST_WIDE_INT, HOST_WIDE_INT, ! struct jcf_partial *)); ! static void push_long_const PARAMS ((HOST_WIDE_INT, HOST_WIDE_INT, ! struct jcf_partial *)); ! static int find_constant_index PARAMS ((tree, struct jcf_partial *)); ! static void push_long_const PARAMS ((HOST_WIDE_INT, HOST_WIDE_INT, ! struct jcf_partial *)); ! static void field_op PARAMS ((tree, int, struct jcf_partial *)); ! static void maybe_wide PARAMS ((int, int, struct jcf_partial *)); ! static void emit_dup PARAMS ((int, int, struct jcf_partial *)); ! static void emit_pop PARAMS ((int, struct jcf_partial *)); ! static void emit_load_or_store PARAMS ((tree, int, struct jcf_partial *)); ! static void emit_load PARAMS ((tree, struct jcf_partial *)); ! static void emit_store PARAMS ((tree, struct jcf_partial *)); ! static void emit_unop PARAMS ((enum java_opcode, tree, struct jcf_partial *)); ! static void emit_binop PARAMS ((enum java_opcode, tree, struct jcf_partial *)); ! static void emit_reloc PARAMS ((HOST_WIDE_INT, int, struct jcf_block *, ! struct jcf_partial *)); ! static void emit_switch_reloc PARAMS ((struct jcf_block *, ! struct jcf_partial *)); ! static void emit_case_reloc PARAMS ((struct jcf_relocation *, ! struct jcf_partial *)); ! static void emit_if PARAMS ((struct jcf_block *, int, int, ! struct jcf_partial *)); ! static void emit_goto PARAMS ((struct jcf_block *, struct jcf_partial *)); ! static void emit_jsr PARAMS ((struct jcf_block *, struct jcf_partial *)); ! static void call_cleanups PARAMS ((struct jcf_block *, struct jcf_partial *)); ! static char *make_class_file_name PARAMS ((tree)); ! static unsigned char *append_synthetic_attribute PARAMS ((struct jcf_partial *)); ! static void append_innerclasses_attribute PARAMS ((struct jcf_partial *, tree)); ! static void append_innerclasses_attribute_entry PARAMS ((struct jcf_partial *, tree, tree)); ! static void append_gcj_attribute PARAMS ((struct jcf_partial *, tree)); /* Utility macros for appending (big-endian) data to a buffer. We assume a local variable 'ptr' points into where we want to write next, and we assume enough space has been allocated. */ #ifdef ENABLE_JC1_CHECKING ! static int CHECK_PUT PARAMS ((void *, struct jcf_partial *, int)); static int ! CHECK_PUT (ptr, state, i) ! void *ptr; ! struct jcf_partial *state; ! int i; { if ((unsigned char *) ptr < state->chunk->data || (unsigned char *) ptr + i > state->chunk->data + state->chunk->size) --- 276,359 ---- /* Information about the current switch statement. */ struct jcf_switch_state *sw_state; ! /* The count of jsr instructions that have been emitted. */ long num_jsrs; }; ! static void generate_bytecode_insns (tree, int, struct jcf_partial *); ! static struct chunk * alloc_chunk (struct chunk *, unsigned char *, ! int, struct obstack *); ! static unsigned char * append_chunk (unsigned char *, int, ! struct jcf_partial *); ! static void append_chunk_copy (unsigned char *, int, struct jcf_partial *); ! static struct jcf_block * gen_jcf_label (struct jcf_partial *); ! static void finish_jcf_block (struct jcf_partial *); ! static void define_jcf_label (struct jcf_block *, struct jcf_partial *); ! static struct jcf_block * get_jcf_label_here (struct jcf_partial *); ! static void put_linenumber (int, struct jcf_partial *); ! static void localvar_alloc (tree, struct jcf_partial *); ! static void maybe_free_localvar (tree, struct jcf_partial *, int); ! static int get_access_flags (tree); ! static void write_chunks (FILE *, struct chunk *); ! static int adjust_typed_op (tree, int); ! static void generate_bytecode_conditional (tree, struct jcf_block *, ! struct jcf_block *, int, ! struct jcf_partial *); ! static void generate_bytecode_return (tree, struct jcf_partial *); ! static void perform_relocations (struct jcf_partial *); ! static void init_jcf_state (struct jcf_partial *, struct obstack *); ! static void init_jcf_method (struct jcf_partial *, tree); ! static void release_jcf_state (struct jcf_partial *); ! static struct chunk * generate_classfile (tree, struct jcf_partial *); ! static struct jcf_handler *alloc_handler (struct jcf_block *, ! struct jcf_block *, ! struct jcf_partial *); ! static void emit_iinc (tree, HOST_WIDE_INT, struct jcf_partial *); ! static void emit_reloc (HOST_WIDE_INT, int, struct jcf_block *, ! struct jcf_partial *); ! static void push_constant1 (HOST_WIDE_INT, struct jcf_partial *); ! static void push_constant2 (HOST_WIDE_INT, struct jcf_partial *); ! static void push_int_const (HOST_WIDE_INT, struct jcf_partial *); ! static int find_constant_wide (HOST_WIDE_INT, HOST_WIDE_INT, ! struct jcf_partial *); ! static void push_long_const (HOST_WIDE_INT, HOST_WIDE_INT, ! struct jcf_partial *); ! static int find_constant_index (tree, struct jcf_partial *); ! static void push_long_const (HOST_WIDE_INT, HOST_WIDE_INT, ! struct jcf_partial *); ! static void field_op (tree, int, struct jcf_partial *); ! static void maybe_wide (int, int, struct jcf_partial *); ! static void emit_dup (int, int, struct jcf_partial *); ! static void emit_pop (int, struct jcf_partial *); ! static void emit_load_or_store (tree, int, struct jcf_partial *); ! static void emit_load (tree, struct jcf_partial *); ! static void emit_store (tree, struct jcf_partial *); ! static void emit_unop (enum java_opcode, tree, struct jcf_partial *); ! static void emit_binop (enum java_opcode, tree, struct jcf_partial *); ! static void emit_reloc (HOST_WIDE_INT, int, struct jcf_block *, ! struct jcf_partial *); ! static void emit_switch_reloc (struct jcf_block *, struct jcf_partial *); ! static void emit_case_reloc (struct jcf_relocation *, struct jcf_partial *); ! static void emit_if (struct jcf_block *, int, int, struct jcf_partial *); ! static void emit_goto (struct jcf_block *, struct jcf_partial *); ! static void emit_jsr (struct jcf_block *, struct jcf_partial *); ! static void call_cleanups (struct jcf_block *, struct jcf_partial *); ! static char *make_class_file_name (tree); ! static unsigned char *append_synthetic_attribute (struct jcf_partial *); ! static void append_deprecated_attribute (struct jcf_partial *); ! static void append_innerclasses_attribute (struct jcf_partial *, tree); ! static void append_innerclasses_attribute_entry (struct jcf_partial *, tree, tree); ! static void append_gcj_attribute (struct jcf_partial *, tree); /* Utility macros for appending (big-endian) data to a buffer. We assume a local variable 'ptr' points into where we want to write next, and we assume enough space has been allocated. */ #ifdef ENABLE_JC1_CHECKING ! static int CHECK_PUT (void *, struct jcf_partial *, int); static int ! CHECK_PUT (void *ptr, struct jcf_partial *state, int i) { if ((unsigned char *) ptr < state->chunk->data || (unsigned char *) ptr + i > state->chunk->data + state->chunk->size) *************** CHECK_PUT (ptr, state, i) *** 391,404 **** However, if DATA is NULL and SIZE>0, allocate a buffer as well. */ static struct chunk * ! alloc_chunk (last, data, size, work) ! struct chunk *last; ! unsigned char *data; ! int size; ! struct obstack *work; { ! struct chunk *chunk = (struct chunk *) ! obstack_alloc (work, sizeof(struct chunk)); if (data == NULL && size > 0) data = obstack_alloc (work, size); --- 383,392 ---- However, if DATA is NULL and SIZE>0, allocate a buffer as well. */ static struct chunk * ! alloc_chunk (struct chunk *last, unsigned char *data, ! int size, struct obstack *work) { ! struct chunk *chunk = obstack_alloc (work, sizeof(struct chunk)); if (data == NULL && size > 0) data = obstack_alloc (work, size); *************** alloc_chunk (last, data, size, work) *** 412,422 **** } #ifdef ENABLE_JC1_CHECKING ! static int CHECK_OP PARAMS ((struct jcf_partial *)); static int ! CHECK_OP (state) ! struct jcf_partial *state; { if (state->bytecode.ptr > state->bytecode.limit) abort (); --- 400,409 ---- } #ifdef ENABLE_JC1_CHECKING ! static int CHECK_OP (struct jcf_partial *); static int ! CHECK_OP (struct jcf_partial *state) { if (state->bytecode.ptr > state->bytecode.limit) abort (); *************** CHECK_OP (state) *** 428,437 **** #endif static unsigned char * ! append_chunk (data, size, state) ! unsigned char *data; ! int size; ! struct jcf_partial *state; { state->chunk = alloc_chunk (state->chunk, data, size, state->chunk_obstack); if (state->first == NULL) --- 415,421 ---- #endif static unsigned char * ! append_chunk (unsigned char *data, int size, struct jcf_partial *state) { state->chunk = alloc_chunk (state->chunk, data, size, state->chunk_obstack); if (state->first == NULL) *************** append_chunk (data, size, state) *** 440,460 **** } static void ! append_chunk_copy (data, size, state) ! unsigned char *data; ! int size; ! struct jcf_partial *state; { unsigned char *ptr = append_chunk (NULL, size, state); memcpy (ptr, data, size); } static struct jcf_block * ! gen_jcf_label (state) ! struct jcf_partial *state; { ! struct jcf_block *block = (struct jcf_block *) ! obstack_alloc (state->chunk_obstack, sizeof (struct jcf_block)); block->next = NULL; block->linenumber = -1; block->pc = UNDEFINED_PC; --- 424,440 ---- } static void ! append_chunk_copy (unsigned char *data, int size, struct jcf_partial *state) { unsigned char *ptr = append_chunk (NULL, size, state); memcpy (ptr, data, size); } static struct jcf_block * ! gen_jcf_label (struct jcf_partial *state) { ! struct jcf_block *block ! = obstack_alloc (state->chunk_obstack, sizeof (struct jcf_block)); block->next = NULL; block->linenumber = -1; block->pc = UNDEFINED_PC; *************** gen_jcf_label (state) *** 462,469 **** } static void ! finish_jcf_block (state) ! struct jcf_partial *state; { struct jcf_block *block = state->last_block; struct jcf_relocation *reloc; --- 442,448 ---- } static void ! finish_jcf_block (struct jcf_partial *state) { struct jcf_block *block = state->last_block; struct jcf_relocation *reloc; *************** finish_jcf_block (state) *** 489,497 **** } static void ! define_jcf_label (label, state) ! struct jcf_block *label; ! struct jcf_partial *state; { if (state->last_block != NULL) finish_jcf_block (state); --- 468,474 ---- } static void ! define_jcf_label (struct jcf_block *label, struct jcf_partial *state) { if (state->last_block != NULL) finish_jcf_block (state); *************** define_jcf_label (label, state) *** 506,513 **** } static struct jcf_block * ! get_jcf_label_here (state) ! struct jcf_partial *state; { if (state->last_block != NULL && BUFFER_LENGTH (&state->bytecode) == 0) return state->last_block; --- 483,489 ---- } static struct jcf_block * ! get_jcf_label_here (struct jcf_partial *state) { if (state->last_block != NULL && BUFFER_LENGTH (&state->bytecode) == 0) return state->last_block; *************** get_jcf_label_here (state) *** 522,530 **** /* Note a line number entry for the current PC and given LINE. */ static void ! put_linenumber (line, state) ! int line; ! struct jcf_partial *state; { struct jcf_block *label = get_jcf_label_here (state); if (label->linenumber > 0) --- 498,504 ---- /* Note a line number entry for the current PC and given LINE. */ static void ! put_linenumber (int line, struct jcf_partial *state) { struct jcf_block *label = get_jcf_label_here (state); if (label->linenumber > 0) *************** put_linenumber (line, state) *** 540,552 **** in the range (START_LABEL, END_LABEL). */ static struct jcf_handler * ! alloc_handler (start_label, end_label, state) ! struct jcf_block *start_label; ! struct jcf_block *end_label; ! struct jcf_partial *state; { ! struct jcf_handler *handler = (struct jcf_handler *) ! obstack_alloc (state->chunk_obstack, sizeof (struct jcf_handler)); handler->start_label = start_label; handler->end_label = end_label; handler->handler_label = get_jcf_label_here (state); --- 514,524 ---- in the range (START_LABEL, END_LABEL). */ static struct jcf_handler * ! alloc_handler (struct jcf_block *start_label, struct jcf_block *end_label, ! struct jcf_partial *state) { ! struct jcf_handler *handler ! = obstack_alloc (state->chunk_obstack, sizeof (struct jcf_handler)); handler->start_label = start_label; handler->end_label = end_label; handler->handler_label = get_jcf_label_here (state); *************** alloc_handler (start_label, end_label, s *** 564,570 **** /* The index of jvm local variable allocated for this DECL. This is assigned when generating .class files; contrast DECL_LOCAL_SLOT_NUMBER which is set when *reading* a .class file. ! (We don't allocate DECL_LANG_SPECIFIC for locals from Java sourc code.) */ #define DECL_LOCAL_INDEX(DECL) DECL_ALIGN(DECL) --- 536,542 ---- /* The index of jvm local variable allocated for this DECL. This is assigned when generating .class files; contrast DECL_LOCAL_SLOT_NUMBER which is set when *reading* a .class file. ! (We don't allocate DECL_LANG_SPECIFIC for locals from Java source code.) */ #define DECL_LOCAL_INDEX(DECL) DECL_ALIGN(DECL) *************** struct localvar_info *** 582,597 **** ((struct localvar_info**) state->localvars.ptr - localvar_buffer) static void ! localvar_alloc (decl, state) ! tree decl; ! struct jcf_partial *state; { struct jcf_block *start_label = get_jcf_label_here (state); int wide = TYPE_IS_WIDE (TREE_TYPE (decl)); int index; ! register struct localvar_info *info; ! register struct localvar_info **ptr = localvar_buffer; ! register struct localvar_info **limit = (struct localvar_info**) state->localvars.ptr; for (index = 0; ptr < limit; index++, ptr++) { --- 554,567 ---- ((struct localvar_info**) state->localvars.ptr - localvar_buffer) static void ! localvar_alloc (tree decl, struct jcf_partial *state) { struct jcf_block *start_label = get_jcf_label_here (state); int wide = TYPE_IS_WIDE (TREE_TYPE (decl)); int index; ! struct localvar_info *info; ! struct localvar_info **ptr = localvar_buffer; ! struct localvar_info **limit = (struct localvar_info**) state->localvars.ptr; for (index = 0; ptr < limit; index++, ptr++) { *************** localvar_alloc (decl, state) *** 605,612 **** ptr = (struct localvar_info**) state->localvars.data + index; state->localvars.ptr = (unsigned char *) (ptr + 1 + wide); } ! info = (struct localvar_info *) ! obstack_alloc (state->chunk_obstack, sizeof (struct localvar_info)); ptr[0] = info; if (wide) ptr[1] = (struct localvar_info *)(~0); --- 575,581 ---- ptr = (struct localvar_info**) state->localvars.data + index; state->localvars.ptr = (unsigned char *) (ptr + 1 + wide); } ! info = obstack_alloc (state->chunk_obstack, sizeof (struct localvar_info)); ptr[0] = info; if (wide) ptr[1] = (struct localvar_info *)(~0); *************** localvar_alloc (decl, state) *** 629,643 **** } static void ! maybe_free_localvar (decl, state, really) ! tree decl; ! struct jcf_partial *state; ! int really; { struct jcf_block *end_label = get_jcf_label_here (state); int index = DECL_LOCAL_INDEX (decl); ! register struct localvar_info **ptr = &localvar_buffer [index]; ! register struct localvar_info *info = *ptr; int wide = TYPE_IS_WIDE (TREE_TYPE (decl)); info->end_label = end_label; --- 598,609 ---- } static void ! maybe_free_localvar (tree decl, struct jcf_partial *state, int really) { struct jcf_block *end_label = get_jcf_label_here (state); int index = DECL_LOCAL_INDEX (decl); ! struct localvar_info **ptr = &localvar_buffer [index]; ! struct localvar_info *info = *ptr; int wide = TYPE_IS_WIDE (TREE_TYPE (decl)); info->end_label = end_label; *************** maybe_free_localvar (decl, state, really *** 663,670 **** a field (FIELD_DECL or VAR_DECL, if static), as encoded in a .class file. */ static int ! get_access_flags (decl) ! tree decl; { int flags = 0; int isfield = TREE_CODE (decl) == FIELD_DECL || TREE_CODE (decl) == VAR_DECL; --- 629,635 ---- a field (FIELD_DECL or VAR_DECL, if static), as encoded in a .class file. */ static int ! get_access_flags (tree decl) { int flags = 0; int isfield = TREE_CODE (decl) == FIELD_DECL || TREE_CODE (decl) == VAR_DECL; *************** get_access_flags (decl) *** 730,738 **** /* Write the list of segments starting at CHUNKS to STREAM. */ static void ! write_chunks (stream, chunks) ! FILE* stream; ! struct chunk *chunks; { for (; chunks != NULL; chunks = chunks->next) fwrite (chunks->data, chunks->size, 1, stream); --- 695,701 ---- /* Write the list of segments starting at CHUNKS to STREAM. */ static void ! write_chunks (FILE* stream, struct chunk *chunks) { for (; chunks != NULL; chunks = chunks->next) fwrite (chunks->data, chunks->size, 1, stream); *************** write_chunks (stream, chunks) *** 742,750 **** (Caller is responsible for doing NOTE_PUSH.) */ static void ! push_constant1 (index, state) ! HOST_WIDE_INT index; ! struct jcf_partial *state; { RESERVE (3); if (index < 256) --- 705,711 ---- (Caller is responsible for doing NOTE_PUSH.) */ static void ! push_constant1 (HOST_WIDE_INT index, struct jcf_partial *state) { RESERVE (3); if (index < 256) *************** push_constant1 (index, state) *** 763,771 **** (Caller is responsible for doing NOTE_PUSH.) */ static void ! push_constant2 (index, state) ! HOST_WIDE_INT index; ! struct jcf_partial *state; { RESERVE (3); OP1 (OPCODE_ldc2_w); --- 724,730 ---- (Caller is responsible for doing NOTE_PUSH.) */ static void ! push_constant2 (HOST_WIDE_INT index, struct jcf_partial *state) { RESERVE (3); OP1 (OPCODE_ldc2_w); *************** push_constant2 (index, state) *** 776,784 **** Caller is responsible for doing NOTE_PUSH. */ static void ! push_int_const (i, state) ! HOST_WIDE_INT i; ! struct jcf_partial *state; { RESERVE(3); if (i >= -1 && i <= 5) --- 735,741 ---- Caller is responsible for doing NOTE_PUSH. */ static void ! push_int_const (HOST_WIDE_INT i, struct jcf_partial *state) { RESERVE(3); if (i >= -1 && i <= 5) *************** push_int_const (i, state) *** 802,810 **** } static int ! find_constant_wide (lo, hi, state) ! HOST_WIDE_INT lo, hi; ! struct jcf_partial *state; { HOST_WIDE_INT w1, w2; lshift_double (lo, hi, -32, 64, &w1, &w2, 1); --- 759,766 ---- } static int ! find_constant_wide (HOST_WIDE_INT lo, HOST_WIDE_INT hi, ! struct jcf_partial *state) { HOST_WIDE_INT w1, w2; lshift_double (lo, hi, -32, 64, &w1, &w2, 1); *************** find_constant_wide (lo, hi, state) *** 816,824 **** Return the index in the constant pool. */ static int ! find_constant_index (value, state) ! tree value; ! struct jcf_partial *state; { if (TREE_CODE (value) == INTEGER_CST) { --- 772,778 ---- Return the index in the constant pool. */ static int ! find_constant_index (tree value, struct jcf_partial *state) { if (TREE_CODE (value) == INTEGER_CST) { *************** find_constant_index (value, state) *** 856,864 **** Caller is responsible for doing NOTE_PUSH. */ static void ! push_long_const (lo, hi, state) ! HOST_WIDE_INT lo, hi; ! struct jcf_partial *state; { HOST_WIDE_INT highpart, dummy; jint lowpart = WORD_TO_INT (lo); --- 810,816 ---- Caller is responsible for doing NOTE_PUSH. */ static void ! push_long_const (HOST_WIDE_INT lo, HOST_WIDE_INT hi, struct jcf_partial *state) { HOST_WIDE_INT highpart, dummy; jint lowpart = WORD_TO_INT (lo); *************** push_long_const (lo, hi, state) *** 882,891 **** } static void ! field_op (field, opcode, state) ! tree field; ! int opcode; ! struct jcf_partial *state; { int index = find_fieldref_index (&state->cpool, field); RESERVE (3); --- 834,840 ---- } static void ! field_op (tree field, int opcode, struct jcf_partial *state) { int index = find_fieldref_index (&state->cpool, field); RESERVE (3); *************** field_op (field, opcode, state) *** 898,906 **** opcodes typically depend on the operand type. */ static int ! adjust_typed_op (type, max) ! tree type; ! int max; { switch (TREE_CODE (type)) { --- 847,853 ---- opcodes typically depend on the operand type. */ static int ! adjust_typed_op (tree type, int max) { switch (TREE_CODE (type)) { *************** adjust_typed_op (type, max) *** 933,941 **** } static void ! maybe_wide (opcode, index, state) ! int opcode, index; ! struct jcf_partial *state; { if (index >= 256) { --- 880,886 ---- } static void ! maybe_wide (int opcode, int index, struct jcf_partial *state) { if (index >= 256) { *************** maybe_wide (opcode, index, state) *** 958,966 **** (The new words get inserted at stack[SP-size-offset].) */ static void ! emit_dup (size, offset, state) ! int size, offset; ! struct jcf_partial *state; { int kind; if (size == 0) --- 903,909 ---- (The new words get inserted at stack[SP-size-offset].) */ static void ! emit_dup (int size, int offset, struct jcf_partial *state) { int kind; if (size == 0) *************** emit_dup (size, offset, state) *** 979,997 **** } static void ! emit_pop (size, state) ! int size; ! struct jcf_partial *state; { RESERVE (1); OP1 (OPCODE_pop - 1 + size); } static void ! emit_iinc (var, value, state) ! tree var; ! HOST_WIDE_INT value; ! struct jcf_partial *state; { int slot = DECL_LOCAL_INDEX (var); --- 922,935 ---- } static void ! emit_pop (int size, struct jcf_partial *state) { RESERVE (1); OP1 (OPCODE_pop - 1 + size); } static void ! emit_iinc (tree var, HOST_WIDE_INT value, struct jcf_partial *state) { int slot = DECL_LOCAL_INDEX (var); *************** emit_iinc (var, value, state) *** 1013,1022 **** } static void ! emit_load_or_store (var, opcode, state) ! tree var; /* Variable to load from or store into. */ ! int opcode; /* Either OPCODE_iload or OPCODE_istore. */ ! struct jcf_partial *state; { tree type = TREE_TYPE (var); int kind = adjust_typed_op (type, 4); --- 951,959 ---- } static void ! emit_load_or_store (tree var, /* Variable to load from or store into. */ ! int opcode, /* Either OPCODE_iload or OPCODE_istore. */ ! struct jcf_partial *state) { tree type = TREE_TYPE (var); int kind = adjust_typed_op (type, 4); *************** emit_load_or_store (var, opcode, state) *** 1031,1068 **** } static void ! emit_load (var, state) ! tree var; ! struct jcf_partial *state; { emit_load_or_store (var, OPCODE_iload, state); NOTE_PUSH (TYPE_IS_WIDE (TREE_TYPE (var)) ? 2 : 1); } static void ! emit_store (var, state) ! tree var; ! struct jcf_partial *state; { emit_load_or_store (var, OPCODE_istore, state); NOTE_POP (TYPE_IS_WIDE (TREE_TYPE (var)) ? 2 : 1); } static void ! emit_unop (opcode, type, state) ! enum java_opcode opcode; ! tree type ATTRIBUTE_UNUSED; ! struct jcf_partial *state; { RESERVE(1); OP1 (opcode); } static void ! emit_binop (opcode, type, state) ! enum java_opcode opcode; ! tree type; ! struct jcf_partial *state; { int size = TYPE_IS_WIDE (type) ? 2 : 1; RESERVE(1); --- 968,996 ---- } static void ! emit_load (tree var, struct jcf_partial *state) { emit_load_or_store (var, OPCODE_iload, state); NOTE_PUSH (TYPE_IS_WIDE (TREE_TYPE (var)) ? 2 : 1); } static void ! emit_store (tree var, struct jcf_partial *state) { emit_load_or_store (var, OPCODE_istore, state); NOTE_POP (TYPE_IS_WIDE (TREE_TYPE (var)) ? 2 : 1); } static void ! emit_unop (enum java_opcode opcode, tree type ATTRIBUTE_UNUSED, ! struct jcf_partial *state) { RESERVE(1); OP1 (opcode); } static void ! emit_binop (enum java_opcode opcode, tree type, struct jcf_partial *state) { int size = TYPE_IS_WIDE (type) ? 2 : 1; RESERVE(1); *************** emit_binop (opcode, type, state) *** 1071,1084 **** } static void ! emit_reloc (value, kind, target, state) ! HOST_WIDE_INT value; ! int kind; ! struct jcf_block *target; ! struct jcf_partial *state; { ! struct jcf_relocation *reloc = (struct jcf_relocation *) ! obstack_alloc (state->chunk_obstack, sizeof (struct jcf_relocation)); struct jcf_block *block = state->last_block; reloc->next = block->u.relocations; block->u.relocations = reloc; --- 999,1009 ---- } static void ! emit_reloc (HOST_WIDE_INT value, int kind, ! struct jcf_block *target, struct jcf_partial *state) { ! struct jcf_relocation *reloc ! = obstack_alloc (state->chunk_obstack, sizeof (struct jcf_relocation)); struct jcf_block *block = state->last_block; reloc->next = block->u.relocations; block->u.relocations = reloc; *************** emit_reloc (value, kind, target, state) *** 1092,1100 **** } static void ! emit_switch_reloc (label, state) ! struct jcf_block *label; ! struct jcf_partial *state; { emit_reloc (RELOCATION_VALUE_0, BLOCK_START_RELOC, label, state); } --- 1017,1023 ---- } static void ! emit_switch_reloc (struct jcf_block *label, struct jcf_partial *state) { emit_reloc (RELOCATION_VALUE_0, BLOCK_START_RELOC, label, state); } *************** emit_switch_reloc (label, state) *** 1103,1111 **** but re-uses an existing case reloc. */ static void ! emit_case_reloc (reloc, state) ! struct jcf_relocation *reloc; ! struct jcf_partial *state; { struct jcf_block *block = state->last_block; reloc->next = block->u.relocations; --- 1026,1032 ---- but re-uses an existing case reloc. */ static void ! emit_case_reloc (struct jcf_relocation *reloc, struct jcf_partial *state) { struct jcf_block *block = state->last_block; reloc->next = block->u.relocations; *************** emit_case_reloc (reloc, state) *** 1119,1128 **** The opcode is OPCODE, the inverted opcode is INV_OPCODE. */ static void ! emit_if (target, opcode, inv_opcode, state) ! struct jcf_block *target; ! int opcode, inv_opcode; ! struct jcf_partial *state; { RESERVE(3); OP1 (opcode); --- 1040,1047 ---- The opcode is OPCODE, the inverted opcode is INV_OPCODE. */ static void ! emit_if (struct jcf_block *target, int opcode, int inv_opcode, ! struct jcf_partial *state) { RESERVE(3); OP1 (opcode); *************** emit_if (target, opcode, inv_opcode, sta *** 1131,1139 **** } static void ! emit_goto (target, state) ! struct jcf_block *target; ! struct jcf_partial *state; { RESERVE(3); OP1 (OPCODE_goto); --- 1050,1056 ---- } static void ! emit_goto (struct jcf_block *target, struct jcf_partial *state) { RESERVE(3); OP1 (OPCODE_goto); *************** emit_goto (target, state) *** 1142,1150 **** } static void ! emit_jsr (target, state) ! struct jcf_block *target; ! struct jcf_partial *state; { RESERVE(3); OP1 (OPCODE_jsr); --- 1059,1065 ---- } static void ! emit_jsr (struct jcf_block *target, struct jcf_partial *state) { RESERVE(3); OP1 (OPCODE_jsr); *************** emit_jsr (target, state) *** 1155,1172 **** /* Generate code to evaluate EXP. If the result is true, branch to TRUE_LABEL; otherwise, branch to FALSE_LABEL. ! TRUE_BRANCH_FIRST is a code geneation hint that the TRUE_LABEL may follow right after this. (The idea is that we may be able to optimize away GOTO TRUE_LABEL; TRUE_LABEL:) */ static void ! generate_bytecode_conditional (exp, true_label, false_label, ! true_branch_first, state) ! tree exp; ! struct jcf_block *true_label; ! struct jcf_block *false_label; ! int true_branch_first; ! struct jcf_partial *state; { tree exp0, exp1, type; int save_SP = state->code_SP; --- 1070,1085 ---- /* Generate code to evaluate EXP. If the result is true, branch to TRUE_LABEL; otherwise, branch to FALSE_LABEL. ! TRUE_BRANCH_FIRST is a code generation hint that the TRUE_LABEL may follow right after this. (The idea is that we may be able to optimize away GOTO TRUE_LABEL; TRUE_LABEL:) */ static void ! generate_bytecode_conditional (tree exp, ! struct jcf_block *true_label, ! struct jcf_block *false_label, ! int true_branch_first, ! struct jcf_partial *state) { tree exp0, exp1, type; int save_SP = state->code_SP; *************** generate_bytecode_conditional (exp, true *** 1314,1320 **** OP1 (OPCODE_lcmp); goto compare_1; } ! /* FALLTHOUGH */ default: if (integer_zerop (exp1)) { --- 1227,1233 ---- OP1 (OPCODE_lcmp); goto compare_1; } ! /* FALLTHROUGH */ default: if (integer_zerop (exp1)) { *************** generate_bytecode_conditional (exp, true *** 1371,1379 **** emit label that is LIMIT). */ static void ! call_cleanups (limit, state) ! struct jcf_block *limit; ! struct jcf_partial *state; { struct jcf_block *block = state->labeled_blocks; for (; block != limit; block = block->next) --- 1284,1290 ---- emit label that is LIMIT). */ static void ! call_cleanups (struct jcf_block *limit, struct jcf_partial *state) { struct jcf_block *block = state->labeled_blocks; for (; block != limit; block = block->next) *************** call_cleanups (limit, state) *** 1384,1392 **** } static void ! generate_bytecode_return (exp, state) ! tree exp; ! struct jcf_partial *state; { tree return_type = TREE_TYPE (TREE_TYPE (state->current_method)); int returns_void = TREE_CODE (return_type) == VOID_TYPE; --- 1295,1301 ---- } static void ! generate_bytecode_return (tree exp, struct jcf_partial *state) { tree return_type = TREE_TYPE (TREE_TYPE (state->current_method)); int returns_void = TREE_CODE (return_type) == VOID_TYPE; *************** generate_bytecode_return (exp, state) *** 1453,1462 **** TARGET is one of STACK_TARGET or IGNORE_TARGET. */ static void ! generate_bytecode_insns (exp, target, state) ! tree exp; ! int target; ! struct jcf_partial *state; { tree type, arg; enum java_opcode jopcode; --- 1362,1368 ---- TARGET is one of STACK_TARGET or IGNORE_TARGET. */ static void ! generate_bytecode_insns (tree exp, int target, struct jcf_partial *state) { tree type, arg; enum java_opcode jopcode; *************** generate_bytecode_insns (exp, target, st *** 1511,1529 **** break; case EXPR_WITH_FILE_LOCATION: { ! const char *saved_input_filename = input_filename; tree body = EXPR_WFL_NODE (exp); - int saved_lineno = lineno; if (body == empty_stmt_node) break; input_filename = EXPR_WFL_FILENAME (exp); ! lineno = EXPR_WFL_LINENO (exp); ! if (EXPR_WFL_EMIT_LINE_NOTE (exp) && lineno > 0 && debug_info_level > DINFO_LEVEL_NONE) ! put_linenumber (lineno, state); generate_bytecode_insns (body, target, state); ! input_filename = saved_input_filename; ! lineno = saved_lineno; } break; case INTEGER_CST: --- 1417,1433 ---- break; case EXPR_WITH_FILE_LOCATION: { ! location_t saved_location = input_location; tree body = EXPR_WFL_NODE (exp); if (body == empty_stmt_node) break; input_filename = EXPR_WFL_FILENAME (exp); ! input_line = EXPR_WFL_LINENO (exp); ! if (EXPR_WFL_EMIT_LINE_NOTE (exp) && input_line > 0 && debug_info_level > DINFO_LEVEL_NONE) ! put_linenumber (input_line, state); generate_bytecode_insns (body, target, state); ! input_location = saved_location; } break; case INTEGER_CST: *************** generate_bytecode_insns (exp, target, st *** 1556,1563 **** OP1 (prec == 1 ? OPCODE_fconst_0 : OPCODE_dconst_0); else if (real_onep (exp)) OP1 (prec == 1 ? OPCODE_fconst_1 : OPCODE_dconst_1); ! /* FIXME Should also use fconst_2 for 2.0f. ! Also, should use iconst_2/ldc followed by i2f/i2d for other float/double when the value is a small integer. */ else { --- 1460,1468 ---- OP1 (prec == 1 ? OPCODE_fconst_0 : OPCODE_dconst_0); else if (real_onep (exp)) OP1 (prec == 1 ? OPCODE_fconst_1 : OPCODE_dconst_1); ! else if (prec == 1 && real_twop (exp)) ! OP1 (OPCODE_fconst_2); ! /* ??? We could also use iconst_3/ldc followed by i2f/i2d for other float/double when the value is a small integer. */ else { *************** generate_bytecode_insns (exp, target, st *** 1674,1681 **** case CASE_EXPR: { struct jcf_switch_state *sw_state = state->sw_state; ! struct jcf_relocation *reloc = (struct jcf_relocation *) ! obstack_alloc (state->chunk_obstack, sizeof (struct jcf_relocation)); HOST_WIDE_INT case_value = TREE_INT_CST_LOW (TREE_OPERAND (exp, 0)); reloc->kind = 0; reloc->label = get_jcf_label_here (state); --- 1579,1586 ---- case CASE_EXPR: { struct jcf_switch_state *sw_state = state->sw_state; ! struct jcf_relocation *reloc ! = obstack_alloc (state->chunk_obstack, sizeof (struct jcf_relocation)); HOST_WIDE_INT case_value = TREE_INT_CST_LOW (TREE_OPERAND (exp, 0)); reloc->kind = 0; reloc->label = get_jcf_label_here (state); *************** generate_bytecode_insns (exp, target, st *** 1755,1762 **** HOST_WIDE_INT i; unsigned HOST_WIDE_INT delta; /* Copy the chain of relocs into a sorted array. */ ! struct jcf_relocation **relocs = (struct jcf_relocation **) ! xmalloc (sw_state.num_cases * sizeof (struct jcf_relocation *)); /* The relocs arrays is a buffer with a gap. The assumption is that cases will normally come in "runs". */ int gap_start = 0; --- 1660,1667 ---- HOST_WIDE_INT i; unsigned HOST_WIDE_INT delta; /* Copy the chain of relocs into a sorted array. */ ! struct jcf_relocation **relocs ! = xmalloc (sw_state.num_cases * sizeof (struct jcf_relocation *)); /* The relocs arrays is a buffer with a gap. The assumption is that cases will normally come in "runs". */ int gap_start = 0; *************** generate_bytecode_insns (exp, target, st *** 2123,2129 **** emit_dup (TYPE_IS_WIDE (type) ? 2 : 1 , offset, state); exp = lhs; } ! /* FALLTHOUGH */ finish_assignment: if (TREE_CODE (exp) == COMPONENT_REF) --- 2028,2034 ---- emit_dup (TYPE_IS_WIDE (type) ? 2 : 1 , offset, state); exp = lhs; } ! /* FALLTHROUGH */ finish_assignment: if (TREE_CODE (exp) == COMPONENT_REF) *************** generate_bytecode_insns (exp, target, st *** 2188,2197 **** tree arg0 = TREE_OPERAND (exp, 0); tree arg1 = TREE_OPERAND (exp, 1); jopcode += adjust_typed_op (type, 3); ! if (arg0 == arg1 && TREE_CODE (arg0) == SAVE_EXPR) { /* fold may (e.g) convert 2*x to x+x. */ ! generate_bytecode_insns (TREE_OPERAND (arg0, 0), target, state); emit_dup (TYPE_PRECISION (TREE_TYPE (arg0)) > 32 ? 2 : 1, 0, state); } else --- 2093,2102 ---- tree arg0 = TREE_OPERAND (exp, 0); tree arg1 = TREE_OPERAND (exp, 1); jopcode += adjust_typed_op (type, 3); ! if (arg0 != NULL_TREE && operand_equal_p (arg0, arg1, 0)) { /* fold may (e.g) convert 2*x to x+x. */ ! generate_bytecode_insns (arg0, target, state); emit_dup (TYPE_PRECISION (TREE_TYPE (arg0)) > 32 ? 2 : 1, 0, state); } else *************** generate_bytecode_insns (exp, target, st *** 2244,2250 **** } break; case SAVE_EXPR: ! generate_bytecode_insns (TREE_OPERAND (exp, 0), STACK_TARGET, state); break; case CONVERT_EXPR: case NOP_EXPR: --- 2149,2185 ---- } break; case SAVE_EXPR: ! /* Because the state associated with a SAVE_EXPR tree node must ! be a RTL expression, we use it to store the DECL_LOCAL_INDEX ! of a temporary variable in a CONST_INT. */ ! if (! SAVE_EXPR_RTL (exp)) ! { ! tree type = TREE_TYPE (exp); ! tree decl = build_decl (VAR_DECL, NULL_TREE, type); ! generate_bytecode_insns (TREE_OPERAND (exp, 0), ! STACK_TARGET, state); ! localvar_alloc (decl, state); ! SAVE_EXPR_RTL (exp) = GEN_INT (DECL_LOCAL_INDEX (decl)); ! emit_dup (TYPE_IS_WIDE (type) ? 2 : 1, 0, state); ! emit_store (decl, state); ! } ! else ! { ! /* The following code avoids creating a temporary DECL just ! to pass to emit_load. This code could be factored with ! the similar implementation in emit_load_or_store. */ ! tree type = TREE_TYPE (exp); ! int kind = adjust_typed_op (type, 4); ! int index = (int) INTVAL (SAVE_EXPR_RTL (exp)); ! if (index <= 3) ! { ! RESERVE (1); /* [ilfda]load_[0123] */ ! OP1 (OPCODE_iload + 5 + 4*kind + index); ! } ! else /* [ilfda]load */ ! maybe_wide (OPCODE_iload + kind, index, state); ! NOTE_PUSH (TYPE_IS_WIDE (type) ? 2 : 1); ! } break; case CONVERT_EXPR: case NOP_EXPR: *************** generate_bytecode_insns (exp, target, st *** 2507,2512 **** --- 2442,2464 ---- case JAVA_EXC_OBJ_EXPR: NOTE_PUSH (1); /* Pushed by exception system. */ break; + case MIN_EXPR: + case MAX_EXPR: + { + /* This copes with cases where fold() has created MIN or MAX + from a conditional expression. */ + enum tree_code code = TREE_CODE (exp) == MIN_EXPR ? LT_EXPR : GT_EXPR; + tree op0 = TREE_OPERAND (exp, 0); + tree op1 = TREE_OPERAND (exp, 1); + tree x; + if (TREE_SIDE_EFFECTS (op0) || TREE_SIDE_EFFECTS (op1)) + abort (); + x = build (COND_EXPR, TREE_TYPE (exp), + build (code, boolean_type_node, op0, op1), + op0, op1); + generate_bytecode_insns (x, target, state); + break; + } case NEW_CLASS_EXPR: { tree class = TREE_TYPE (TREE_TYPE (exp)); *************** generate_bytecode_insns (exp, target, st *** 2653,2660 **** } static void ! perform_relocations (state) ! struct jcf_partial *state; { struct jcf_block *block; struct jcf_relocation *reloc; --- 2605,2611 ---- } static void ! perform_relocations (struct jcf_partial *state) { struct jcf_block *block; struct jcf_relocation *reloc; *************** perform_relocations (state) *** 2762,2769 **** unsigned char *old_ptr = old_buffer + old_size; if (new_size != old_size) { ! chunk->data = (unsigned char *) ! obstack_alloc (state->chunk_obstack, new_size); chunk->size = new_size; } new_ptr = chunk->data + new_size; --- 2713,2719 ---- unsigned char *old_ptr = old_buffer + old_size; if (new_size != old_size) { ! chunk->data = obstack_alloc (state->chunk_obstack, new_size); chunk->size = new_size; } new_ptr = chunk->data + new_size; *************** perform_relocations (state) *** 2852,2860 **** } static void ! init_jcf_state (state, work) ! struct jcf_partial *state; ! struct obstack *work; { state->chunk_obstack = work; state->first = state->chunk = NULL; --- 2802,2808 ---- } static void ! init_jcf_state (struct jcf_partial *state, struct obstack *work) { state->chunk_obstack = work; state->first = state->chunk = NULL; *************** init_jcf_state (state, work) *** 2864,2872 **** } static void ! init_jcf_method (state, method) ! struct jcf_partial *state; ! tree method; { state->current_method = method; state->blocks = state->last_block = NULL; --- 2812,2818 ---- } static void ! init_jcf_method (struct jcf_partial *state, tree method) { state->current_method = method; state->blocks = state->last_block = NULL; *************** init_jcf_method (state, method) *** 2887,2894 **** } static void ! release_jcf_state (state) ! struct jcf_partial *state; { CPOOL_FINISH (&state->cpool); obstack_free (state->chunk_obstack, state->first); --- 2833,2839 ---- } static void ! release_jcf_state (struct jcf_partial *state) { CPOOL_FINISH (&state->cpool); obstack_free (state->chunk_obstack, state->first); *************** release_jcf_state (state) *** 2900,2908 **** static GTY(()) tree SourceFile_node; static struct chunk * ! generate_classfile (clas, state) ! tree clas; ! struct jcf_partial *state; { struct chunk *cpool_chunk; const char *source_file, *s; --- 2845,2851 ---- static GTY(()) tree SourceFile_node; static struct chunk * ! generate_classfile (tree clas, struct jcf_partial *state) { struct chunk *cpool_chunk; const char *source_file, *s; *************** generate_classfile (clas, state) *** 2925,2931 **** append_chunk (NULL, 0, state); cpool_chunk = state->chunk; ! /* Next allocate the chunk containing acces_flags through fields_counr. */ if (clas == object_type_node) i = 10; else --- 2868,2874 ---- append_chunk (NULL, 0, state); cpool_chunk = state->chunk; ! /* Next allocate the chunk containing access_flags through fields_count. */ if (clas == object_type_node) i = 10; else *************** generate_classfile (clas, state) *** 2934,2940 **** i = get_access_flags (TYPE_NAME (clas)); if (! (i & ACC_INTERFACE)) i |= ACC_SUPER; ! PUT2 (i); /* acces_flags */ i = find_class_constant (&state->cpool, clas); PUT2 (i); /* this_class */ if (clas == object_type_node) { --- 2877,2883 ---- i = get_access_flags (TYPE_NAME (clas)); if (! (i & ACC_INTERFACE)) i |= ACC_SUPER; ! PUT2 (i); /* access_flags */ i = find_class_constant (&state->cpool, clas); PUT2 (i); /* this_class */ if (clas == object_type_node) { *************** generate_classfile (clas, state) *** 2976,2983 **** if (have_value) attr_count++; ! if (FIELD_THISN (part) || FIELD_LOCAL_ALIAS (part) || FIELD_SYNTHETIC (part)) attr_count++; PUT2 (attr_count); /* attributes_count */ if (have_value) --- 2919,2929 ---- if (have_value) attr_count++; ! if (FIELD_THISN (part) || FIELD_LOCAL_ALIAS (part) ! || FIELD_SYNTHETIC (part)) attr_count++; + if (FIELD_DEPRECATED (part)) + attr_count++; PUT2 (attr_count); /* attributes_count */ if (have_value) *************** generate_classfile (clas, state) *** 2999,3004 **** --- 2945,2952 ---- if (FIELD_THISN (part) || FIELD_LOCAL_ALIAS (part) || FIELD_SYNTHETIC (part)) ptr = append_synthetic_attribute (state); + if (FIELD_DEPRECATED (part)) + append_deprecated_attribute (state); fields_count++; } ptr = fields_count_ptr; UNSAFE_PUT2 (fields_count); *************** generate_classfile (clas, state) *** 3017,3022 **** --- 2965,2976 ---- tree type = TREE_TYPE (part); tree save_function = current_function_decl; int synthetic_p = 0; + + /* Invisible Miranda methods shouldn't end up in the .class + file. */ + if (METHOD_INVISIBLE (part)) + continue; + current_function_decl = part; ptr = append_chunk (NULL, 8, state); i = get_access_flags (part); PUT2 (i); *************** generate_classfile (clas, state) *** 3034,3039 **** --- 2988,2996 ---- i++; synthetic_p = 1; } + /* Make room for Deprecated attribute. */ + if (METHOD_DEPRECATED (part)) + i++; PUT2 (i); /* attributes_count */ *************** generate_classfile (clas, state) *** 3175,3180 **** --- 3132,3141 ---- PUT2 (i); } } + + if (METHOD_DEPRECATED (part)) + append_deprecated_attribute (state); + methods_count++; current_function_decl = save_function; } *************** generate_classfile (clas, state) *** 3196,3201 **** --- 3157,3165 ---- i++; if (clas == object_type_node) i++; + if (CLASS_DEPRECATED (TYPE_NAME (clas))) + i++; + PUT2 (i); /* attributes_count */ /* generate the SourceFile attribute. */ *************** generate_classfile (clas, state) *** 3211,3216 **** --- 3175,3182 ---- PUT2 (i); append_gcj_attribute (state, clas); append_innerclasses_attribute (state, clas); + if (CLASS_DEPRECATED (TYPE_NAME (clas))) + append_deprecated_attribute (state); /* New finally generate the contents of the constant pool chunk. */ i = count_constant_pool_bytes (&state->cpool); *************** generate_classfile (clas, state) *** 3223,3230 **** static GTY(()) tree Synthetic_node; static unsigned char * ! append_synthetic_attribute (state) ! struct jcf_partial *state; { unsigned char *ptr = append_chunk (NULL, 6, state); int i; --- 3189,3195 ---- static GTY(()) tree Synthetic_node; static unsigned char * ! append_synthetic_attribute (struct jcf_partial *state) { unsigned char *ptr = append_chunk (NULL, 6, state); int i; *************** append_synthetic_attribute (state) *** 3241,3249 **** } static void ! append_gcj_attribute (state, class) ! struct jcf_partial *state; ! tree class; { unsigned char *ptr; int i; --- 3206,3223 ---- } static void ! append_deprecated_attribute (struct jcf_partial *state) ! { ! unsigned char *ptr = append_chunk (NULL, 6, state); ! int i; ! ! i = find_utf8_constant (&state->cpool, get_identifier ("Deprecated")); ! PUT2 (i); /* Attribute string index */ ! PUT4 (0); /* Attribute length */ ! } ! ! static void ! append_gcj_attribute (struct jcf_partial *state, tree class) { unsigned char *ptr; int i; *************** append_gcj_attribute (state, class) *** 3260,3268 **** static tree InnerClasses_node; static void ! append_innerclasses_attribute (state, class) ! struct jcf_partial *state; ! tree class; { tree orig_decl = TYPE_NAME (class); tree current, decl; --- 3234,3240 ---- static tree InnerClasses_node; static void ! append_innerclasses_attribute (struct jcf_partial *state, tree class) { tree orig_decl = TYPE_NAME (class); tree current, decl; *************** append_innerclasses_attribute (state, cl *** 3315,3323 **** } static void ! append_innerclasses_attribute_entry (state, decl, name) ! struct jcf_partial *state; ! tree decl, name; { int icii, icaf; int ocii = 0, ini = 0; --- 3287,3294 ---- } static void ! append_innerclasses_attribute_entry (struct jcf_partial *state, ! tree decl, tree name) { int icii, icaf; int ocii = 0, ini = 0; *************** append_innerclasses_attribute_entry (sta *** 3341,3348 **** } static char * ! make_class_file_name (clas) ! tree clas; { const char *dname, *cname, *slash; char *r; --- 3312,3318 ---- } static char * ! make_class_file_name (tree clas) { const char *dname, *cname, *slash; char *r; *************** make_class_file_name (clas) *** 3416,3422 **** if (stat (r, &sb) == -1 /* Try to make it. */ && mkdir (r, 0755) == -1) ! fatal_io_error ("can't create directory %s", r); *s = sep; /* Skip consecutive separators. */ --- 3386,3392 ---- if (stat (r, &sb) == -1 /* Try to make it. */ && mkdir (r, 0755) == -1) ! fatal_error ("can't create directory %s: %m", r); *s = sep; /* Skip consecutive separators. */ *************** make_class_file_name (clas) *** 3427,3438 **** return r; } ! /* Write out the contens of a class (RECORD_TYPE) CLAS, as a .class file. The output .class file name is make_class_file_name(CLAS). */ void ! write_classfile (clas) ! tree clas; { struct obstack *work = &temporary_obstack; struct jcf_partial state[1]; --- 3397,3407 ---- return r; } ! /* Write out the contents of a class (RECORD_TYPE) CLAS, as a .class file. The output .class file name is make_class_file_name(CLAS). */ void ! write_classfile (tree clas) { struct obstack *work = &temporary_obstack; struct jcf_partial state[1]; *************** write_classfile (clas) *** 3450,3466 **** temporary_file_name = concat (class_file_name, ".tmp", NULL); stream = fopen (temporary_file_name, "wb"); if (stream == NULL) ! fatal_io_error ("can't open %s for writing", temporary_file_name); jcf_dependency_add_target (class_file_name); init_jcf_state (state, work); chunks = generate_classfile (clas, state); write_chunks (stream, chunks); if (fclose (stream)) ! fatal_io_error ("error closing %s", temporary_file_name); /* If a file named by the string pointed to by `new' exists ! prior to the call to the `rename' function, the bahaviour is implementation-defined. ISO 9899-1990 7.9.4.2. For example, on Win32 with MSVCRT, it is an error. */ --- 3419,3435 ---- temporary_file_name = concat (class_file_name, ".tmp", NULL); stream = fopen (temporary_file_name, "wb"); if (stream == NULL) ! fatal_error ("can't open %s for writing: %m", temporary_file_name); jcf_dependency_add_target (class_file_name); init_jcf_state (state, work); chunks = generate_classfile (clas, state); write_chunks (stream, chunks); if (fclose (stream)) ! fatal_error ("error closing %s: %m", temporary_file_name); /* If a file named by the string pointed to by `new' exists ! prior to the call to the `rename' function, the behavior is implementation-defined. ISO 9899-1990 7.9.4.2. For example, on Win32 with MSVCRT, it is an error. */ *************** write_classfile (clas) *** 3470,3476 **** if (rename (temporary_file_name, class_file_name) == -1) { remove (temporary_file_name); ! fatal_io_error ("can't create %s", class_file_name); } free (temporary_file_name); free (class_file_name); --- 3439,3445 ---- if (rename (temporary_file_name, class_file_name) == -1) { remove (temporary_file_name); ! fatal_error ("can't create %s: %m", class_file_name); } free (temporary_file_name); free (class_file_name); diff -Nrc3pad gcc-3.3.3/gcc/java/jv-convert.1 gcc-3.4.0/gcc/java/jv-convert.1 *** gcc-3.3.3/gcc/java/jv-convert.1 2004-02-14 20:38:16.000000000 +0000 --- gcc-3.4.0/gcc/java/jv-convert.1 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,211 **** - .\" Automatically generated by Pod::Man version 1.15 - .\" Sat Feb 14 20:38:16 2004 - .\" - .\" Standard preamble: - .\" ====================================================================== - .de Sh \" Subsection heading - .br - .if t .Sp - .ne 5 - .PP - \fB\\$1\fR - .PP - .. - .de Sp \" Vertical space (when we can't use .PP) - .if t .sp .5v - .if n .sp - .. - .de Ip \" List item - .br - .ie \\n(.$>=3 .ne \\$3 - .el .ne 3 - .IP "\\$1" \\$2 - .. - .de Vb \" Begin verbatim text - .ft CW - .nf - .ne \\$1 - .. - .de Ve \" End verbatim text - .ft R - - .fi - .. - .\" Set up some character translations and predefined strings. \*(-- will - .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left - .\" double quote, and \*(R" will give a right double quote. | will give a - .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used - .\" to do unbreakable dashes and therefore won't be available. \*(C` and - .\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> - .tr \(*W-|\(bv\*(Tr - .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' - .ie n \{\ - . ds -- \(*W- - . ds PI pi - . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch - . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch - . ds L" "" - . ds R" "" - . ds C` "" - . ds C' "" - 'br\} - .el\{\ - . ds -- \|\(em\| - . ds PI \(*p - . ds L" `` - . ds R" '' - 'br\} - .\" - .\" If the F register is turned on, we'll generate index entries on stderr - .\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and - .\" index entries marked with X<> in POD. Of course, you'll have to process - .\" the output yourself in some meaningful fashion. - .if \nF \{\ - . de IX - . tm Index:\\$1\t\\n%\t"\\$2" - .. - . nr % 0 - . rr F - .\} - .\" - .\" For nroff, turn off justification. Always turn off hyphenation; it - .\" makes way too many mistakes in technical documents. - .hy 0 - .if n .na - .\" - .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). - .\" Fear. Run. Save yourself. No user-serviceable parts. - .bd B 3 - . \" fudge factors for nroff and troff - .if n \{\ - . ds #H 0 - . ds #V .8m - . ds #F .3m - . ds #[ \f1 - . ds #] \fP - .\} - .if t \{\ - . ds #H ((1u-(\\\\n(.fu%2u))*.13m) - . ds #V .6m - . ds #F 0 - . ds #[ \& - . ds #] \& - .\} - . \" simple accents for nroff and troff - .if n \{\ - . ds ' \& - . ds ` \& - . ds ^ \& - . ds , \& - . ds ~ ~ - . ds / - .\} - .if t \{\ - . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" - . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' - . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' - . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' - . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' - . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' - .\} - . \" troff and (daisy-wheel) nroff accents - .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' - .ds 8 \h'\*(#H'\(*b\h'-\*(#H' - .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] - .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' - .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' - .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] - .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] - .ds ae a\h'-(\w'a'u*4/10)'e - .ds Ae A\h'-(\w'A'u*4/10)'E - . \" corrections for vroff - .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' - .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' - . \" for low resolution devices (crt and lpr) - .if \n(.H>23 .if \n(.V>19 \ - \{\ - . ds : e - . ds 8 ss - . ds o a - . ds d- d\h'-1'\(ga - . ds D- D\h'-1'\(hy - . ds th \o'bp' - . ds Th \o'LP' - . ds ae ae - . ds Ae AE - .\} - .rm #[ #] #H #V #F C - .\" ====================================================================== - .\" - .IX Title "JV-CONVERT 1" - .TH JV-CONVERT 1 "gcc-3.3.3" "2004-02-14" "GNU" - .UC - .SH "NAME" - jv-convert \- Convert file from one encoding to another - .SH "SYNOPSIS" - .IX Header "SYNOPSIS" - \&\fBjv-convert\fR [\fB\s-1OPTION\s0\fR] ... [\fI\s-1INPUTFILE\s0\fR [\fI\s-1OUTPUTFILE\s0\fR]] - .SH "DESCRIPTION" - .IX Header "DESCRIPTION" - \&\fBjv-convert\fR is a utility included with \f(CW\*(C`libgcj\*(C'\fR which - converts a file from one encoding to another. It is similar to the Unix - \&\fBiconv\fR utility. - .PP - The encodings supported by \fBjv-convert\fR are platform-dependent. - Currently there is no way to get a list of all supported encodings. - .SH "OPTIONS" - .IX Header "OPTIONS" - .Ip "\fB\*(--encoding\fR \fIname\fR" 4 - .IX Item "encoding name" - .PD 0 - .Ip "\fB\*(--from\fR \fIname\fR" 4 - .IX Item "from name" - .PD - Use \fIname\fR as the input encoding. The default is the current - locale's encoding. - .Ip "\fB\*(--to\fR \fIname\fR" 4 - .IX Item "to name" - Use \fIname\fR as the output encoding. The default is the - \&\f(CW\*(C`JavaSrc\*(C'\fR encoding; this is \s-1ASCII\s0 with \fB\eu\fR escapes for - non-ASCII characters. - .Ip "\fB\-i\fR \fIfile\fR" 4 - .IX Item "-i file" - Read from \fIfile\fR. The default is to read from standard input. - .Ip "\fB\-o\fR \fIfile\fR" 4 - .IX Item "-o file" - Write to \fIfile\fR. The default is to write to standard output. - .Ip "\fB\*(--reverse\fR" 4 - .IX Item "reverse" - Swap the input and output encodings. - .Ip "\fB\*(--help\fR" 4 - .IX Item "help" - Print a help message, then exit. - .Ip "\fB\*(--version\fR" 4 - .IX Item "version" - Print version information, then exit. - .SH "SEE ALSO" - .IX Header "SEE ALSO" - .SH "COPYRIGHT" - .IX Header "COPYRIGHT" - Copyright (c) 2001, 2002 Free Software Foundation, Inc. - .PP - Permission is granted to copy, distribute and/or modify this document - under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.2 or - any later version published by the Free Software Foundation; with the - Invariant Sections being ``\s-1GNU\s0 General Public License'', the Front-Cover - texts being (a) (see below), and with the Back-Cover Texts being (b) - (see below). A copy of the license is included in the - man page \fIgfdl\fR\|(7). - .PP - (a) The \s-1FSF\s0's Front-Cover Text is: - .PP - .Vb 1 - \& A GNU Manual - .Ve - (b) The \s-1FSF\s0's Back-Cover Text is: - .PP - .Vb 3 - \& You have freedom to copy and modify this GNU Manual, like GNU - \& software. Copies published by the Free Software Foundation raise - \& funds for GNU development. - .Ve --- 0 ---- diff -Nrc3pad gcc-3.3.3/gcc/java/jvgenmain.c gcc-3.4.0/gcc/java/jvgenmain.c *** gcc-3.3.3/gcc/java/jvgenmain.c 2001-11-27 17:31:38.000000000 +0000 --- gcc-3.4.0/gcc/java/jvgenmain.c 2003-04-06 21:44:09.000000000 +0000 *************** *** 1,20 **** /* Program to generate "main" a Java(TM) class containing a main method. ! Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,21 ---- /* Program to generate "main" a Java(TM) class containing a main method. ! Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ! Free Software Foundation, Inc. ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 26,61 **** #include "config.h" #include "system.h" #include "obstack.h" #include "jcf.h" #include "tree.h" #include "java-tree.h" ! static char * do_mangle_classname PARAMS ((const char *string)); struct obstack name_obstack; struct obstack *mangle_obstack = &name_obstack; - void - gcc_obstack_init (obstack) - struct obstack *obstack; - { - /* Let particular systems override the size of a chunk. */ - #ifndef OBSTACK_CHUNK_SIZE - #define OBSTACK_CHUNK_SIZE 0 - #endif - /* Let them override the alloc and free routines too. */ - #ifndef OBSTACK_CHUNK_ALLOC - #define OBSTACK_CHUNK_ALLOC xmalloc - #endif - #ifndef OBSTACK_CHUNK_FREE - #define OBSTACK_CHUNK_FREE free - #endif - _obstack_begin (obstack, OBSTACK_CHUNK_SIZE, 0, - (void *(*) PARAMS ((long))) OBSTACK_CHUNK_ALLOC, - (void (*) PARAMS ((void *))) OBSTACK_CHUNK_FREE); - } - static void usage (const char *) ATTRIBUTE_NORETURN; static void --- 27,44 ---- #include "config.h" #include "system.h" + #include "coretypes.h" + #include "tm.h" #include "obstack.h" #include "jcf.h" #include "tree.h" #include "java-tree.h" ! static char * do_mangle_classname (const char *string); struct obstack name_obstack; struct obstack *mangle_obstack = &name_obstack; static void usage (const char *) ATTRIBUTE_NORETURN; static void *************** main (int argc, char **argv) *** 154,161 **** static char * ! do_mangle_classname (string) ! const char *string; { const char *ptr; int count = 0; --- 137,143 ---- static char * ! do_mangle_classname (const char *string) { const char *ptr; int count = 0; diff -Nrc3pad gcc-3.3.3/gcc/java/jv-scan.1 gcc-3.4.0/gcc/java/jv-scan.1 *** gcc-3.3.3/gcc/java/jv-scan.1 2004-02-14 20:38:16.000000000 +0000 --- gcc-3.4.0/gcc/java/jv-scan.1 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,216 **** - .\" Automatically generated by Pod::Man version 1.15 - .\" Sat Feb 14 20:38:16 2004 - .\" - .\" Standard preamble: - .\" ====================================================================== - .de Sh \" Subsection heading - .br - .if t .Sp - .ne 5 - .PP - \fB\\$1\fR - .PP - .. - .de Sp \" Vertical space (when we can't use .PP) - .if t .sp .5v - .if n .sp - .. - .de Ip \" List item - .br - .ie \\n(.$>=3 .ne \\$3 - .el .ne 3 - .IP "\\$1" \\$2 - .. - .de Vb \" Begin verbatim text - .ft CW - .nf - .ne \\$1 - .. - .de Ve \" End verbatim text - .ft R - - .fi - .. - .\" Set up some character translations and predefined strings. \*(-- will - .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left - .\" double quote, and \*(R" will give a right double quote. | will give a - .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used - .\" to do unbreakable dashes and therefore won't be available. \*(C` and - .\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> - .tr \(*W-|\(bv\*(Tr - .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' - .ie n \{\ - . ds -- \(*W- - . ds PI pi - . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch - . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch - . ds L" "" - . ds R" "" - . ds C` "" - . ds C' "" - 'br\} - .el\{\ - . ds -- \|\(em\| - . ds PI \(*p - . ds L" `` - . ds R" '' - 'br\} - .\" - .\" If the F register is turned on, we'll generate index entries on stderr - .\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and - .\" index entries marked with X<> in POD. Of course, you'll have to process - .\" the output yourself in some meaningful fashion. - .if \nF \{\ - . de IX - . tm Index:\\$1\t\\n%\t"\\$2" - .. - . nr % 0 - . rr F - .\} - .\" - .\" For nroff, turn off justification. Always turn off hyphenation; it - .\" makes way too many mistakes in technical documents. - .hy 0 - .if n .na - .\" - .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). - .\" Fear. Run. Save yourself. No user-serviceable parts. - .bd B 3 - . \" fudge factors for nroff and troff - .if n \{\ - . ds #H 0 - . ds #V .8m - . ds #F .3m - . ds #[ \f1 - . ds #] \fP - .\} - .if t \{\ - . ds #H ((1u-(\\\\n(.fu%2u))*.13m) - . ds #V .6m - . ds #F 0 - . ds #[ \& - . ds #] \& - .\} - . \" simple accents for nroff and troff - .if n \{\ - . ds ' \& - . ds ` \& - . ds ^ \& - . ds , \& - . ds ~ ~ - . ds / - .\} - .if t \{\ - . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" - . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' - . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' - . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' - . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' - . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' - .\} - . \" troff and (daisy-wheel) nroff accents - .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' - .ds 8 \h'\*(#H'\(*b\h'-\*(#H' - .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] - .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' - .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' - .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] - .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] - .ds ae a\h'-(\w'a'u*4/10)'e - .ds Ae A\h'-(\w'A'u*4/10)'E - . \" corrections for vroff - .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' - .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' - . \" for low resolution devices (crt and lpr) - .if \n(.H>23 .if \n(.V>19 \ - \{\ - . ds : e - . ds 8 ss - . ds o a - . ds d- d\h'-1'\(ga - . ds D- D\h'-1'\(hy - . ds th \o'bp' - . ds Th \o'LP' - . ds ae ae - . ds Ae AE - .\} - .rm #[ #] #H #V #F C - .\" ====================================================================== - .\" - .IX Title "JV-SCAN 1" - .TH JV-SCAN 1 "gcc-3.3.3" "2004-02-14" "GNU" - .UC - .SH "NAME" - jv-scan \- print information about Java source file - .SH "SYNOPSIS" - .IX Header "SYNOPSIS" - jv-scan [\fB\*(--no-assert\fR] [\fB\*(--complexity\fR] - [\fB\*(--encoding\fR=\fIname\fR] [\fB\*(--print-main\fR] - [\fB\*(--list-class\fR] [\fB\*(--list-filename\fR] - [\fB\*(--version\fR] [\fB\*(--help\fR] - [\fB\-o\fR \fIfile\fR] \fIinputfile\fR... - .SH "DESCRIPTION" - .IX Header "DESCRIPTION" - The \f(CW\*(C`jv\-scan\*(C'\fR program can be used to print information about a Java - source file (\fI.java\fR file). - .SH "OPTIONS" - .IX Header "OPTIONS" - .Ip "\fB\*(--no-assert\fR" 4 - .IX Item "no-assert" - Don't recognize the \f(CW\*(C`assert\*(C'\fR keyword, for backwards compatibility - with older versions of the language specification. - .Ip "\fB\*(--complexity\fR" 4 - .IX Item "complexity" - This prints a complexity measure, related to cyclomatic complexity, for - each input file. - .Ip "\fB\*(--encoding=\fR\fIname\fR" 4 - .IX Item "encoding=name" - This works like the corresponding \fBgcj\fR option. - .Ip "\fB\*(--print-main\fR" 4 - .IX Item "print-main" - This prints the name of the class in this file containing a \f(CW\*(C`main\*(C'\fR - method. - .Ip "\fB\*(--list-class\fR" 4 - .IX Item "list-class" - This lists the names of all classes defined in the input files. - .Ip "\fB\*(--list-filename\fR" 4 - .IX Item "list-filename" - If \f(CW\*(C`\-\-list\-class\*(C'\fR is given, this option causes \f(CW\*(C`jv\-scan\*(C'\fR to - also print the name of the file in which each class was found. - .Ip "\fB\-o\fR \fIfile\fR" 4 - .IX Item "-o file" - Print output to the named file. - .Ip "\fB\*(--help\fR" 4 - .IX Item "help" - Print help, then exit. - .Ip "\fB\*(--version\fR" 4 - .IX Item "version" - Print version number, then exit. - .SH "SEE ALSO" - .IX Header "SEE ALSO" - \&\fIgcc\fR\|(1), \fIgcj\fR\|(1), \fIgcjh\fR\|(1), \fIgij\fR\|(1), \fIjcf-dump\fR\|(1), \fIgfdl\fR\|(7), - and the Info entries for \fIgcj\fR and \fIgcc\fR. - .SH "COPYRIGHT" - .IX Header "COPYRIGHT" - Copyright (c) 2001, 2002 Free Software Foundation, Inc. - .PP - Permission is granted to copy, distribute and/or modify this document - under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.2 or - any later version published by the Free Software Foundation; with the - Invariant Sections being ``\s-1GNU\s0 General Public License'', the Front-Cover - texts being (a) (see below), and with the Back-Cover Texts being (b) - (see below). A copy of the license is included in the - man page \fIgfdl\fR\|(7). - .PP - (a) The \s-1FSF\s0's Front-Cover Text is: - .PP - .Vb 1 - \& A GNU Manual - .Ve - (b) The \s-1FSF\s0's Back-Cover Text is: - .PP - .Vb 3 - \& You have freedom to copy and modify this GNU Manual, like GNU - \& software. Copies published by the Free Software Foundation raise - \& funds for GNU development. - .Ve --- 0 ---- diff -Nrc3pad gcc-3.3.3/gcc/java/jv-scan.c gcc-3.4.0/gcc/java/jv-scan.c *** gcc-3.3.3/gcc/java/jv-scan.c 2003-02-03 14:06:32.000000000 +0000 --- gcc-3.4.0/gcc/java/jv-scan.c 2003-05-04 14:05:15.000000000 +0000 *************** *** 1,26 **** /* Main for jv-scan ! Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "config.h" #include "system.h" #include "obstack.h" /* We use obstacks in lex.c */ --- 1,29 ---- /* Main for jv-scan ! Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ! Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "config.h" #include "system.h" + #include "coretypes.h" + #include "tm.h" #include "obstack.h" /* We use obstacks in lex.c */ *************** Boston, MA 02111-1307, USA. */ *** 36,50 **** #include ! extern void fatal_error PARAMS ((const char *s, ...)) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN; ! void warning PARAMS ((const char *s, ...)) ATTRIBUTE_PRINTF_1; ! void gcc_obstack_init PARAMS ((struct obstack *obstack)); ! void report PARAMS ((void)); ! static void usage PARAMS ((void)) ATTRIBUTE_NORETURN; ! static void help PARAMS ((void)) ATTRIBUTE_NORETURN; ! static void version PARAMS ((void)) ATTRIBUTE_NORETURN; #define JC1_LITE #include "jcf.h" --- 39,52 ---- #include ! extern void fatal_error (const char *s, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN; ! void warning (const char *s, ...) ATTRIBUTE_PRINTF_1; ! void report (void); ! static void usage (void) ATTRIBUTE_NORETURN; ! static void help (void) ATTRIBUTE_NORETURN; ! static void version (void) ATTRIBUTE_NORETURN; #define JC1_LITE #include "jcf.h" *************** static void version PARAMS ((void)) ATTR *** 53,61 **** /* Current input file and output file IO streams. */ FILE *finput, *out; - /* Current input filename. */ - char *input_filename; - /* Executable name. */ char *exec_name; --- 55,60 ---- *************** static const struct option options[] = *** 92,105 **** }; static void ! usage () { fprintf (stderr, "Try `jv-scan --help' for more information.\n"); exit (1); } static void ! help () { printf ("Usage: jv-scan [OPTION]... FILE...\n\n"); printf ("Print useful information read from Java source files.\n\n"); --- 91,104 ---- }; static void ! usage (void) { fprintf (stderr, "Try `jv-scan --help' for more information.\n"); exit (1); } static void ! help (void) { printf ("Usage: jv-scan [OPTION]... FILE...\n\n"); printf ("Print useful information read from Java source files.\n\n"); *************** help () *** 120,126 **** } static void ! version () { printf ("jv-scan (GCC) %s\n\n", version_string); printf ("Copyright (C) 2002 Free Software Foundation, Inc.\n"); --- 119,125 ---- } static void ! version (void) { printf ("jv-scan (GCC) %s\n\n", version_string); printf ("Copyright (C) 2002 Free Software Foundation, Inc.\n"); *************** version () *** 131,138 **** /* jc1-lite main entry point */ int ! DEFUN (main, (argc, argv), ! int argc AND char **argv) { int i = 1; const char *output_file = NULL; --- 130,136 ---- /* jc1-lite main entry point */ int ! main (int argc, char **argv) { int i = 1; const char *output_file = NULL; *************** DEFUN (main, (argc, argv), *** 239,284 **** functions */ void ! fatal_error VPARAMS ((const char *s, ...)) { ! VA_OPEN (ap, s); ! VA_FIXEDARG (ap, const char *, s); ! fprintf (stderr, "%s: error: ", exec_name); vfprintf (stderr, s, ap); fputc ('\n', stderr); ! VA_CLOSE (ap); exit (1); } void ! warning VPARAMS ((const char *s, ...)) { ! VA_OPEN (ap, s); ! VA_FIXEDARG (ap, const char *, s); ! fprintf (stderr, "%s: warning: ", exec_name); vfprintf (stderr, s, ap); fputc ('\n', stderr); ! VA_CLOSE (ap); ! } ! ! void ! gcc_obstack_init (obstack) ! struct obstack *obstack; ! { ! /* Let particular systems override the size of a chunk. */ ! #ifndef OBSTACK_CHUNK_SIZE ! #define OBSTACK_CHUNK_SIZE 0 ! #endif ! /* Let them override the alloc and free routines too. */ ! #ifndef OBSTACK_CHUNK_ALLOC ! #define OBSTACK_CHUNK_ALLOC xmalloc ! #endif ! #ifndef OBSTACK_CHUNK_FREE ! #define OBSTACK_CHUNK_FREE free ! #endif ! _obstack_begin (obstack, OBSTACK_CHUNK_SIZE, 0, ! (void *(*) (long)) OBSTACK_CHUNK_ALLOC, ! (void (*) (void *)) OBSTACK_CHUNK_FREE); } --- 237,260 ---- functions */ void ! fatal_error (const char *s, ...) { ! va_list ap; ! va_start (ap, s); fprintf (stderr, "%s: error: ", exec_name); vfprintf (stderr, s, ap); fputc ('\n', stderr); ! va_end (ap); exit (1); } void ! warning (const char *s, ...) { ! va_list ap; ! va_start (ap, s); fprintf (stderr, "%s: warning: ", exec_name); vfprintf (stderr, s, ap); fputc ('\n', stderr); ! va_end (ap); } diff -Nrc3pad gcc-3.3.3/gcc/java/jvspec.c gcc-3.4.0/gcc/java/jvspec.c *** gcc-3.3.3/gcc/java/jvspec.c 2002-11-19 04:37:50.000000000 +0000 --- gcc-3.4.0/gcc/java/jvspec.c 2003-10-05 02:52:33.000000000 +0000 *************** *** 1,21 **** /* Specific flags and argument handling of the front-end of the GNU compiler for the Java(TM) language. ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,22 ---- /* Specific flags and argument handling of the front-end of the GNU compiler for the Java(TM) language. ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 ! Free Software Foundation, Inc. ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 25,30 **** --- 26,33 ---- #include "config.h" #include "system.h" + #include "coretypes.h" + #include "tm.h" #include "gcc.h" /* Name of spec file. */ *************** The Free Software Foundation is independ *** 45,52 **** /* True if this arg is a resource file. */ #define RESOURCE_FILE_ARG (1<<7) ! static char *find_spec_file PARAMS ((const char *)); ! static int verify_class_name PARAMS ((const char *)); static const char *main_class_name = NULL; int lang_specific_extra_outfiles = 0; --- 48,55 ---- /* True if this arg is a resource file. */ #define RESOURCE_FILE_ARG (1<<7) ! static char *find_spec_file (const char *); ! static int verify_class_name (const char *); static const char *main_class_name = NULL; int lang_specific_extra_outfiles = 0; *************** int lang_specific_extra_outfiles = 0; *** 55,88 **** int shared_libgcc = 1; static const char jvgenmain_spec[] = ! "jvgenmain %{D*} %b %{!pipe:%u.i} |\n\ ! cc1 %{!pipe:%U.i} %1 \ %{!Q:-quiet} -dumpbase %b.c %{d*} %{m*} %{a*}\ %{g*} %{O*} \ %{v:-version} %{pg:-p} %{p}\ ! %{ 6 && strcmp (argv[i] + len - 6, ".class") == 0) { args[i] |= CLASS_FILE_ARG; class_files_count++; - last_input_index = i; } if (len > 4 && (strcmp (argv[i] + len - 4, ".zip") == 0 --- 395,405 ---- *************** lang_specific_driver (in_argc, in_argv, *** 414,420 **** { args[i] |= ZIP_FILE_ARG; zip_files_count++; - last_input_index = i; } } } --- 407,412 ---- *************** lang_specific_driver (in_argc, in_argv, *** 604,610 **** } int ! lang_specific_pre_link () { int err; if (main_class_name == NULL) --- 596,602 ---- } int ! lang_specific_pre_link (void) { int err; if (main_class_name == NULL) diff -Nrc3pad gcc-3.3.3/gcc/java/keyword.gperf gcc-3.4.0/gcc/java/keyword.gperf *** gcc-3.3.3/gcc/java/keyword.gperf 2002-06-11 17:31:11.000000000 +0000 --- gcc-3.4.0/gcc/java/keyword.gperf 2003-01-09 23:16:54.000000000 +0000 *************** *** 1,22 **** %{ /* Keyword definition for the GNU compiler for the Java(TM) language. ! Copyright (C) 1997, 1998 Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,23 ---- %{ /* Keyword definition for the GNU compiler for the Java(TM) language. ! Copyright (C) 1997, 1998, 2001, 2002, 2003 ! Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** struct java_keyword { const char *const *** 29,39 **** #ifdef __GNUC__ __inline #endif ! static unsigned int hash PARAMS ((const char *, unsigned int)); #ifdef __GNUC__ __inline #endif ! const struct java_keyword *java_keyword PARAMS ((const char *, unsigned int)); %% abstract, ABSTRACT_TK default, DEFAULT_TK --- 30,40 ---- #ifdef __GNUC__ __inline #endif ! static unsigned int hash (const char *, unsigned int); #ifdef __GNUC__ __inline #endif ! const struct java_keyword *java_keyword (const char *, unsigned int); %% abstract, ABSTRACT_TK default, DEFAULT_TK diff -Nrc3pad gcc-3.3.3/gcc/java/keyword.h gcc-3.4.0/gcc/java/keyword.h *** gcc-3.3.3/gcc/java/keyword.h 2002-06-11 17:31:11.000000000 +0000 --- gcc-3.4.0/gcc/java/keyword.h 2003-12-20 15:38:27.000000000 +0000 *************** *** 1,23 **** ! /* C code produced by gperf version 2.7 */ ! /* Command-line: gperf -L C -C -F , 0 -p -t -j1 -i 1 -g -o -N java_keyword -k1,4,$ keyword.gperf */ /* Keyword definition for the GNU compiler for the Java(TM) language. ! Copyright (C) 1997, 1998 Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,24 ---- ! /* ANSI-C code produced by gperf version 2.7.2 */ ! /* Command-line: gperf -L ANSI-C -C -F ', 0' -p -t -j1 -i 1 -g -o -N java_keyword -k'1,4,$' keyword.gperf */ /* Keyword definition for the GNU compiler for the Java(TM) language. ! Copyright (C) 1997, 1998, 2001, 2002, 2003 ! Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** struct java_keyword { const char *const *** 29,39 **** #ifdef __GNUC__ __inline #endif ! static unsigned int hash PARAMS ((const char *, unsigned int)); #ifdef __GNUC__ __inline #endif ! const struct java_keyword *java_keyword PARAMS ((const char *, unsigned int)); #define TOTAL_KEYWORDS 52 #define MIN_WORD_LENGTH 2 --- 30,40 ---- #ifdef __GNUC__ __inline #endif ! static unsigned int hash (const char *, unsigned int); #ifdef __GNUC__ __inline #endif ! const struct java_keyword *java_keyword (const char *, unsigned int); #define TOTAL_KEYWORDS 52 #define MIN_WORD_LENGTH 2 *************** const struct java_keyword *java_keyword *** 44,54 **** #ifdef __GNUC__ __inline #endif static unsigned int ! hash (str, len) ! register const char *str; ! register unsigned int len; { static const unsigned char asso_values[] = { --- 45,57 ---- #ifdef __GNUC__ __inline + #else + #ifdef __cplusplus + inline + #endif #endif static unsigned int ! hash (const char *str, unsigned int len) { static const unsigned char asso_values[] = { *************** hash (str, len) *** 79,85 **** 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86 }; ! register int hval = len; switch (hval) { --- 82,88 ---- 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86 }; ! int hval = len; switch (hval) { *************** hash (str, len) *** 99,111 **** __inline #endif const struct java_keyword * ! java_keyword (str, len) ! register const char *str; ! register unsigned int len; { static const struct java_keyword wordlist[] = { ! {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"else", ELSE_TK}, {"true", TRUE_TK}, {"case", CASE_TK}, --- 102,113 ---- __inline #endif const struct java_keyword * ! java_keyword (const char *str, unsigned int len) { static const struct java_keyword wordlist[] = { ! {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, ! {"", 0}, {"else", ELSE_TK}, {"true", TRUE_TK}, {"case", CASE_TK}, *************** java_keyword (str, len) *** 163,170 **** {"", 0}, {"finally", FINALLY_TK}, {"throw", THROW_TK}, - {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"strictfp", STRICT_TK}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"private", PRIVATE_TK} --- 165,173 ---- {"", 0}, {"finally", FINALLY_TK}, {"throw", THROW_TK}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, + {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, + {"", 0}, {"", 0}, {"", 0}, {"strictfp", STRICT_TK}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"private", PRIVATE_TK} *************** java_keyword (str, len) *** 172,182 **** if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) { ! register int key = hash (str, len); if (key <= MAX_HASH_VALUE && key >= 0) { ! register const char *s = wordlist[key].name; if (*str == *s && !strcmp (str + 1, s + 1)) return &wordlist[key]; --- 175,185 ---- if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) { ! int key = hash (str, len); if (key <= MAX_HASH_VALUE && key >= 0) { ! const char *s = wordlist[key].name; if (*str == *s && !strcmp (str + 1, s + 1)) return &wordlist[key]; diff -Nrc3pad gcc-3.3.3/gcc/java/lang.c gcc-3.4.0/gcc/java/lang.c *** gcc-3.3.3/gcc/java/lang.c 2003-06-10 18:34:11.000000000 +0000 --- gcc-3.4.0/gcc/java/lang.c 2004-01-13 23:14:04.000000000 +0000 *************** *** 1,21 **** /* Java(TM) language-specific utility routines. ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,21 ---- /* Java(TM) language-specific utility routines. ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 27,32 **** --- 27,34 ---- #include "config.h" #include "system.h" + #include "coretypes.h" + #include "tm.h" #include "tree.h" #include "input.h" #include "rtl.h" *************** The Free Software Foundation is independ *** 43,83 **** #include "tree-inline.h" #include "splay-tree.h" #include "tree-dump.h" ! struct string_option ! { ! const char *const string; ! int *const variable; ! const int on_value; ! }; ! ! static const char *java_init PARAMS ((const char *)); ! static void java_finish PARAMS ((void)); ! static void java_init_options PARAMS ((void)); ! static bool java_post_options PARAMS ((void)); ! static int java_decode_option PARAMS ((int, char **)); ! static void put_decl_string PARAMS ((const char *, int)); ! static void put_decl_node PARAMS ((tree)); ! static void java_print_error_function PARAMS ((diagnostic_context *, ! const char *)); ! static int process_option_with_no PARAMS ((const char *, ! const struct string_option *, ! int)); ! static tree java_tree_inlining_walk_subtrees PARAMS ((tree *, ! int *, ! walk_tree_fn, ! void *, ! void *)); ! static int java_unsafe_for_reeval PARAMS ((tree)); ! static int merge_init_test_initialization PARAMS ((void * *, ! void *)); ! static int inline_init_test_initialization PARAMS ((void * *, ! void *)); ! static bool java_can_use_bit_fields_p PARAMS ((void)); static bool java_decl_ok_for_sibcall (tree); ! static int java_dump_tree PARAMS ((void *, tree)); ! static void dump_compound_expr PARAMS ((dump_info_p, tree)); #ifndef TARGET_OBJECT_SUFFIX # define TARGET_OBJECT_SUFFIX ".o" --- 45,74 ---- #include "tree-inline.h" #include "splay-tree.h" #include "tree-dump.h" + #include "opts.h" + #include "options.h" ! static bool java_init (void); ! static void java_finish (void); ! static unsigned int java_init_options (unsigned int, const char **); ! static bool java_post_options (const char **); ! static int java_handle_option (size_t scode, const char *arg, int value); ! static void put_decl_string (const char *, int); ! static void put_decl_node (tree); ! static void java_print_error_function (diagnostic_context *, const char *); ! static tree java_tree_inlining_walk_subtrees (tree *, int *, walk_tree_fn, ! void *, void *); ! static int java_unsafe_for_reeval (tree); ! static int merge_init_test_initialization (void * *, void *); ! static int inline_init_test_initialization (void * *, void *); ! static bool java_can_use_bit_fields_p (void); ! static bool java_dump_tree (void *, tree); ! static void dump_compound_expr (dump_info_p, tree); static bool java_decl_ok_for_sibcall (tree); ! static int java_estimate_num_insns (tree); ! static int java_start_inlining (tree); ! static tree java_get_callee_fndecl (tree); #ifndef TARGET_OBJECT_SUFFIX # define TARGET_OBJECT_SUFFIX ".o" *************** static bool inhibit_error_function_print *** 126,132 **** int compiling_from_source; ! char * resource_name; int flag_emit_class_files = 0; --- 117,123 ---- int compiling_from_source; ! const char *resource_name; int flag_emit_class_files = 0; *************** const char *current_encoding = NULL; *** 175,180 **** --- 166,174 ---- /* When nonzero, report the now deprecated empty statements. */ int flag_extraneous_semicolon; + /* When nonzero, report use of deprecated classes, methods, or fields. */ + int flag_deprecated = 1; + /* When nonzero, always check for a non gcj generated classes archive. */ int flag_force_classes_archive_check; *************** int flag_indirect_dispatch = 0; *** 190,233 **** int flag_store_check = 1; /* When nonzero, print extra version information. */ ! static int version_flag = 0; /* Set nonzero if the user specified -finline-functions on the command line. */ int flag_really_inline = 0; - /* Table of language-dependent -f options. - STRING is the option name. VARIABLE is the address of the variable. - ON_VALUE is the value to store in VARIABLE - if `-fSTRING' is seen as an option. - (If `-fno-STRING' is seen as an option, the opposite value is stored.) */ - - static const struct string_option - lang_f_options[] = - { - {"emit-class-file", &flag_emit_class_files, 1}, - {"emit-class-files", &flag_emit_class_files, 1}, - {"filelist-file", &flag_filelist_file, 1}, - {"use-divide-subroutine", &flag_use_divide_subroutine, 1}, - {"use-boehm-gc", &flag_use_boehm_gc, 1}, - {"hash-synchronization", &flag_hash_synchronization, 1}, - {"jni", &flag_jni, 1}, - {"check-references", &flag_check_references, 1}, - {"force-classes-archive-check", &flag_force_classes_archive_check, 1}, - {"optimize-static-class-initialization", &flag_optimize_sci, 1 }, - {"indirect-dispatch", &flag_indirect_dispatch, 1}, - {"store-check", &flag_store_check, 1}, - {"assert", &flag_assert, 1} - }; - - static const struct string_option - lang_W_options[] = - { - { "redundant-modifiers", &flag_redundant, 1 }, - { "extraneous-semicolon", &flag_extraneous_semicolon, 1 }, - { "out-of-date", &flag_newer, 1 } - }; - JCF *current_jcf; /* Variable controlling how dependency tracking is enabled in --- 184,195 ---- int flag_store_check = 1; /* When nonzero, print extra version information. */ ! static int v_flag = 0; /* Set nonzero if the user specified -finline-functions on the command line. */ int flag_really_inline = 0; JCF *current_jcf; /* Variable controlling how dependency tracking is enabled in *************** struct language_function GTY(()) *** 253,260 **** #define LANG_HOOKS_FINISH java_finish #undef LANG_HOOKS_INIT_OPTIONS #define LANG_HOOKS_INIT_OPTIONS java_init_options ! #undef LANG_HOOKS_DECODE_OPTION ! #define LANG_HOOKS_DECODE_OPTION java_decode_option #undef LANG_HOOKS_POST_OPTIONS #define LANG_HOOKS_POST_OPTIONS java_post_options #undef LANG_HOOKS_PARSE_FILE --- 215,222 ---- #define LANG_HOOKS_FINISH java_finish #undef LANG_HOOKS_INIT_OPTIONS #define LANG_HOOKS_INIT_OPTIONS java_init_options ! #undef LANG_HOOKS_HANDLE_OPTION ! #define LANG_HOOKS_HANDLE_OPTION java_handle_option #undef LANG_HOOKS_POST_OPTIONS #define LANG_HOOKS_POST_OPTIONS java_post_options #undef LANG_HOOKS_PARSE_FILE *************** struct language_function GTY(()) *** 290,526 **** #undef LANG_HOOKS_TREE_INLINING_WALK_SUBTREES #define LANG_HOOKS_TREE_INLINING_WALK_SUBTREES java_tree_inlining_walk_subtrees #undef LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN #define LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN java_dump_tree #undef LANG_HOOKS_DECL_OK_FOR_SIBCALL #define LANG_HOOKS_DECL_OK_FOR_SIBCALL java_decl_ok_for_sibcall ! /* Each front end provides its own. */ ! const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; ! ! /* Process an option that can accept a `no-' form. ! Return 1 if option found, 0 otherwise. */ ! static int ! process_option_with_no (p, table, table_size) ! const char *p; ! const struct string_option *table; ! int table_size; ! { ! int j; ! for (j = 0; j < table_size; j++) ! { ! if (!strcmp (p, table[j].string)) ! { ! *table[j].variable = table[j].on_value; ! return 1; ! } ! if (p[0] == 'n' && p[1] == 'o' && p[2] == '-' ! && ! strcmp (p+3, table[j].string)) ! { ! *table[j].variable = ! table[j].on_value; ! return 1; ! } ! } ! return 0; ! } /* * process java-specific compiler command-line options * return 0, but do not complain if the option is not recognized. */ static int ! java_decode_option (argc, argv) ! int argc __attribute__ ((__unused__)); ! char **argv; { ! char *p = argv[0]; ! ! jcf_path_init (); ! ! if (strcmp (p, "-version") == 0) ! { ! version_flag = 1; ! /* We return 0 so that the caller can process this. */ ! return 0; ! } ! ! #define CLARG "-fcompile-resource=" ! if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0) ! { ! resource_name = p + sizeof (CLARG) - 1; ! return 1; ! } ! #undef CLARG ! #define CLARG "-fassume-compiled=" ! if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0) ! { ! add_assume_compiled (p + sizeof (CLARG) - 1, 0); ! return 1; ! } ! #undef CLARG ! #define CLARG "-fno-assume-compiled=" ! if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0) ! { ! add_assume_compiled (p + sizeof (CLARG) - 1, 1); ! return 1; ! } ! #undef CLARG ! #define CLARG "-fassume-compiled" ! if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0) ! { ! add_assume_compiled ("", 0); ! return 1; ! } ! #undef CLARG ! #define CLARG "-fno-assume-compiled" ! if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0) ! { ! add_assume_compiled ("", 1); ! return 1; ! } ! #undef CLARG ! #define CLARG "-fCLASSPATH=" ! if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0) ! { ! jcf_path_classpath_arg (p + sizeof (CLARG) - 1); ! return 1; ! } ! #undef CLARG ! #define CLARG "-fclasspath=" ! if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0) ! { ! jcf_path_classpath_arg (p + sizeof (CLARG) - 1); ! return 1; ! } ! #undef CLARG ! #define CLARG "-fbootclasspath=" ! if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0) ! { ! jcf_path_bootclasspath_arg (p + sizeof (CLARG) - 1); ! return 1; ! } ! #undef CLARG ! #define CLARG "-fextdirs=" ! if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0) ! { ! jcf_path_extdirs_arg (p + sizeof (CLARG) - 1); ! return 1; ! } ! #undef CLARG ! else if (strncmp (p, "-I", 2) == 0) ! { ! jcf_path_include_arg (p + 2); ! return 1; ! } ! ! #define ARG "-foutput-class-dir=" ! if (strncmp (p, ARG, sizeof (ARG) - 1) == 0) ! { ! jcf_write_base_directory = p + sizeof (ARG) - 1; ! return 1; ! } ! #undef ARG ! #define ARG "-fencoding=" ! if (strncmp (p, ARG, sizeof (ARG) - 1) == 0) ! { ! current_encoding = p + sizeof (ARG) - 1; ! return 1; ! } ! #undef ARG ! #define ARG "-finline-functions" ! if (strncmp (p, ARG, sizeof (ARG) - 1) == 0) ! { ! flag_inline_functions = 1; ! flag_really_inline = 1; ! return 1; ! } ! #undef ARG ! if (p[0] == '-' && p[1] == 'f') { ! /* Some kind of -f option. ! P's value is the option sans `-f'. ! Search for it in the table of options. */ ! p += 2; ! if (process_option_with_no (p, lang_f_options, ! ARRAY_SIZE (lang_f_options))) ! return 1; ! return dump_switch_p (p); ! } ! if (strcmp (p, "-Wall") == 0) ! { ! flag_wall = 1; ! flag_redundant = 1; ! flag_extraneous_semicolon = 1; ! /* When -Wall given, enable -Wunused. We do this because the C ! compiler does it, and people expect it. */ ! set_Wunused (1); ! return 1; ! } ! if (p[0] == '-' && p[1] == 'W') ! { ! /* Skip `-W' and see if we accept the option or its `no-' form. */ ! p += 2; ! return process_option_with_no (p, lang_W_options, ! ARRAY_SIZE (lang_W_options)); ! } ! if (strcmp (p, "-MD") == 0) ! { jcf_dependency_init (1); dependency_tracking |= DEPEND_SET_FILE | DEPEND_ENABLE; ! return 1; ! } ! else if (strcmp (p, "-MMD") == 0) ! { jcf_dependency_init (0); - dependency_tracking |= DEPEND_SET_FILE | DEPEND_ENABLE; - return 1; - } - else if (strcmp (p, "-M") == 0) - { - jcf_dependency_init (1); dependency_tracking |= DEPEND_ENABLE; ! return 1; ! } ! else if (strcmp (p, "-MM") == 0) ! { jcf_dependency_init (0); ! dependency_tracking |= DEPEND_ENABLE; ! return 1; ! } ! else if (strcmp (p, "-MP") == 0) ! { jcf_dependency_print_dummies (); ! return 1; ! } ! else if (strcmp (p, "-MT") == 0) ! { ! jcf_dependency_set_target (argv[1]); dependency_tracking |= DEPEND_TARGET_SET; ! return 2; ! } ! else if (strcmp (p, "-MF") == 0) ! { ! jcf_dependency_set_dep_file (argv[1]); ! dependency_tracking |= DEPEND_FILE_ALREADY_SET; ! return 2; } ! return 0; } /* Global open file. */ FILE *finput; ! static const char * ! java_init (filename) ! const char *filename; { #if 0 extern int flag_minimal_debug; --- 252,460 ---- #undef LANG_HOOKS_TREE_INLINING_WALK_SUBTREES #define LANG_HOOKS_TREE_INLINING_WALK_SUBTREES java_tree_inlining_walk_subtrees + #undef LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS + #define LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS java_estimate_num_insns + + #undef LANG_HOOKS_TREE_INLINING_START_INLINING + #define LANG_HOOKS_TREE_INLINING_START_INLINING java_start_inlining + #undef LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN #define LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN java_dump_tree #undef LANG_HOOKS_DECL_OK_FOR_SIBCALL #define LANG_HOOKS_DECL_OK_FOR_SIBCALL java_decl_ok_for_sibcall ! #undef LANG_HOOKS_GET_CALLEE_FNDECL ! #define LANG_HOOKS_GET_CALLEE_FNDECL java_get_callee_fndecl ! #undef LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION ! #define LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION java_expand_body ! /* Each front end provides its own. */ ! const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; /* * process java-specific compiler command-line options * return 0, but do not complain if the option is not recognized. */ static int ! java_handle_option (size_t scode, const char *arg, int value) { ! enum opt_code code = (enum opt_code) scode; ! switch (code) { ! default: ! abort(); ! case OPT_I: ! jcf_path_include_arg (arg); ! break; ! case OPT_M: ! jcf_dependency_init (1); ! dependency_tracking |= DEPEND_ENABLE; ! break; ! case OPT_MD_: jcf_dependency_init (1); dependency_tracking |= DEPEND_SET_FILE | DEPEND_ENABLE; ! break; ! ! case OPT_MF: ! jcf_dependency_set_dep_file (arg); ! dependency_tracking |= DEPEND_FILE_ALREADY_SET; ! break; ! ! case OPT_MM: jcf_dependency_init (0); dependency_tracking |= DEPEND_ENABLE; ! break; ! ! case OPT_MMD_: jcf_dependency_init (0); ! dependency_tracking |= DEPEND_SET_FILE | DEPEND_ENABLE; ! break; ! ! case OPT_MP: jcf_dependency_print_dummies (); ! break; ! ! case OPT_MT: ! jcf_dependency_set_target (arg); dependency_tracking |= DEPEND_TARGET_SET; ! break; ! ! case OPT_Wall: ! flag_wall = value; ! flag_redundant = value; ! flag_extraneous_semicolon = value; ! /* When -Wall given, enable -Wunused. We do this because the C ! compiler does it, and people expect it. */ ! set_Wunused (value); ! break; ! ! case OPT_Wdeprecated: ! flag_deprecated = value; ! break; ! ! case OPT_Wextraneous_semicolon: ! flag_extraneous_semicolon = value; ! break; ! ! case OPT_Wout_of_date: ! flag_newer = value; ! break; ! ! case OPT_Wredundant_modifiers: ! flag_redundant = value; ! break; ! ! case OPT_fassert: ! flag_assert = value; ! break; ! ! case OPT_fassume_compiled_: ! add_assume_compiled (arg, !value); ! break; ! ! case OPT_fassume_compiled: ! add_assume_compiled ("", !value); ! break; ! ! case OPT_fbootclasspath_: ! jcf_path_bootclasspath_arg (arg); ! break; ! ! case OPT_fcheck_references: ! flag_check_references = value; ! break; ! ! case OPT_fclasspath_: ! case OPT_fCLASSPATH_: ! jcf_path_classpath_arg (arg); ! break; ! ! case OPT_fcompile_resource_: ! resource_name = arg; ! break; ! ! case OPT_fdump_: ! if (!dump_switch_p (arg)) ! return 0; ! break; ! ! case OPT_femit_class_file: ! case OPT_femit_class_files: ! flag_emit_class_files = value; ! break; ! ! case OPT_fencoding_: ! current_encoding = arg; ! break; ! ! case OPT_fextdirs_: ! jcf_path_extdirs_arg (arg); ! break; ! ! case OPT_ffilelist_file: ! flag_filelist_file = value; ! break; ! ! case OPT_fforce_classes_archive_check: ! flag_force_classes_archive_check = value; ! break; ! ! case OPT_fhash_synchronization: ! flag_hash_synchronization = value; ! break; ! ! case OPT_findirect_dispatch: ! flag_indirect_dispatch = value; ! break; ! ! case OPT_finline_functions: ! flag_inline_functions = value; ! flag_really_inline = value; ! break; ! ! case OPT_fjni: ! flag_jni = value; ! break; ! ! case OPT_foptimize_static_class_initialization: ! flag_optimize_sci = value; ! break; ! ! case OPT_foutput_class_dir_: ! jcf_write_base_directory = arg; ! break; ! ! case OPT_fstore_check: ! flag_store_check = value; ! break; ! ! case OPT_fuse_boehm_gc: ! flag_use_boehm_gc = value; ! break; ! ! case OPT_fuse_divide_subroutine: ! flag_use_divide_subroutine = value; ! break; ! ! case OPT_version: ! v_flag = 1; ! break; } ! return 1; } /* Global open file. */ FILE *finput; ! static bool ! java_init (void) { #if 0 extern int flag_minimal_debug; *************** java_init (filename) *** 530,535 **** --- 464,474 ---- if (flag_inline_functions) flag_inline_trees = 1; + /* FIXME: Indirect dispatch isn't yet compatible with static class + init optimization. */ + if (flag_indirect_dispatch) + always_initialize_class_p = true; + /* Force minimum function alignment if g++ uses the least significant bit of function pointers to store the virtual bit. This is required to keep vtables compatible. */ *************** java_init (filename) *** 537,615 **** && force_align_functions_log < 1) force_align_functions_log = 1; ! /* Open input file. */ ! ! if (filename == 0 || !strcmp (filename, "-")) ! { ! finput = stdin; ! filename = "stdin"; ! ! if (dependency_tracking) ! error ("can't do dependency tracking with input from stdin"); ! } ! else ! { ! if (dependency_tracking) ! { ! char *dot; ! ! /* If the target is set and the output filename is set, then ! there's no processing to do here. Otherwise we must ! compute one or the other. */ ! if (! ((dependency_tracking & DEPEND_TARGET_SET) ! && (dependency_tracking & DEPEND_FILE_ALREADY_SET))) ! { ! dot = strrchr (filename, '.'); ! if (dot == NULL) ! error ("couldn't determine target name for dependency tracking"); ! else ! { ! char *buf = xmalloc (dot - filename + ! 3 + sizeof (TARGET_OBJECT_SUFFIX)); ! strncpy (buf, filename, dot - filename); ! ! /* If emitting class files, we might have multiple ! targets. The class generation code takes care of ! registering them. Otherwise we compute the ! target name here. */ ! if ((dependency_tracking & DEPEND_TARGET_SET)) ! ; /* Nothing. */ ! else if (flag_emit_class_files) ! jcf_dependency_set_target (NULL); ! else ! { ! strcpy (buf + (dot - filename), TARGET_OBJECT_SUFFIX); ! jcf_dependency_set_target (buf); ! } ! ! if ((dependency_tracking & DEPEND_FILE_ALREADY_SET)) ! ; /* Nothing. */ ! else if ((dependency_tracking & DEPEND_SET_FILE)) ! { ! strcpy (buf + (dot - filename), ".d"); ! jcf_dependency_set_dep_file (buf); ! } ! else ! jcf_dependency_set_dep_file ("-"); ! ! free (buf); ! } ! } ! } ! } ! ! jcf_path_init (); ! jcf_path_seal (version_flag); java_init_decl_processing (); using_eh_for_cleanups (); ! return filename; } static void ! java_finish () { jcf_dependency_write (); } --- 476,492 ---- && force_align_functions_log < 1) force_align_functions_log = 1; ! jcf_path_seal (v_flag); java_init_decl_processing (); using_eh_for_cleanups (); ! return true; } static void ! java_finish (void) { jcf_dependency_write (); } *************** static int decl_bufpos = 0; *** 627,635 **** It length is given by LEN; -1 means the string is nul-terminated. */ static void ! put_decl_string (str, len) ! const char *str; ! int len; { if (len < 0) len = strlen (str); --- 504,510 ---- It length is given by LEN; -1 means the string is nul-terminated. */ static void ! put_decl_string (const char *str, int len) { if (len < 0) len = strlen (str); *************** put_decl_string (str, len) *** 653,660 **** /* Append to decl_buf a printable name for NODE. */ static void ! put_decl_node (node) ! tree node; { int was_pointer = 0; if (TREE_CODE (node) == POINTER_TYPE) --- 528,534 ---- /* Append to decl_buf a printable name for NODE. */ static void ! put_decl_node (tree node) { int was_pointer = 0; if (TREE_CODE (node) == POINTER_TYPE) *************** put_decl_node (node) *** 729,737 **** which is also called directly by java_print_error_function. */ const char * ! lang_printable_name (decl, v) ! tree decl; ! int v __attribute__ ((__unused__)); { decl_bufpos = 0; put_decl_node (decl); --- 603,609 ---- which is also called directly by java_print_error_function. */ const char * ! lang_printable_name (tree decl, int v __attribute__ ((__unused__))) { decl_bufpos = 0; put_decl_node (decl); *************** lang_printable_name (decl, v) *** 743,751 **** space to the DECL name string -- With Leading Space. */ const char * ! lang_printable_name_wls (decl, v) ! tree decl; ! int v __attribute__ ((__unused__)); { decl_bufpos = 1; put_decl_node (decl); --- 615,621 ---- space to the DECL name string -- With Leading Space. */ const char * ! lang_printable_name_wls (tree decl, int v __attribute__ ((__unused__))) { decl_bufpos = 1; put_decl_node (decl); *************** lang_printable_name_wls (decl, v) *** 760,768 **** static GTY(()) tree last_error_function_context; static GTY(()) tree last_error_function; static void ! java_print_error_function (context, file) ! diagnostic_context *context __attribute__((__unused__)); ! const char *file; { /* Don't print error messages with bogus function prototypes. */ if (inhibit_error_function_printing) --- 630,637 ---- static GTY(()) tree last_error_function_context; static GTY(()) tree last_error_function; static void ! java_print_error_function (diagnostic_context *context ATTRIBUTE_UNUSED, ! const char *file) { /* Don't print error messages with bogus function prototypes. */ if (inhibit_error_function_printing) *************** java_print_error_function (context, file *** 806,819 **** 2, function prototypes are fully resolved and can be printed when reporting errors. */ ! void lang_init_source (level) ! int level; { inhibit_error_function_printing = (level == 1); } ! static void ! java_init_options () { flag_bounds_check = 1; flag_exceptions = 1; --- 675,688 ---- 2, function prototypes are fully resolved and can be printed when reporting errors. */ ! void lang_init_source (int level) { inhibit_error_function_printing = (level == 1); } ! static unsigned int ! java_init_options (unsigned int argc ATTRIBUTE_UNUSED, ! const char **argv ATTRIBUTE_UNUSED) { flag_bounds_check = 1; flag_exceptions = 1; *************** java_init_options () *** 821,830 **** /* In Java floating point operations never trap. */ flag_trapping_math = 0; } static bool ! java_can_use_bit_fields_p () { /* The bit-field optimizations cause problems when generating class files. */ --- 690,709 ---- /* In Java floating point operations never trap. */ flag_trapping_math = 0; + + /* In Java arithmetic overflow always wraps around. */ + flag_wrapv = 1; + + /* Java requires left-to-right evaluation of subexpressions. */ + flag_evaluation_order = 1; + + jcf_path_init (); + + return CL_Java; } static bool ! java_can_use_bit_fields_p (void) { /* The bit-field optimizations cause problems when generating class files. */ *************** java_can_use_bit_fields_p () *** 833,840 **** /* Post-switch processing. */ static bool ! java_post_options () { /* Use tree inlining if possible. Function instrumentation is only done in the RTL level, so we disable tree inlining. */ if (! flag_instrument_function_entry_exit) --- 712,721 ---- /* Post-switch processing. */ static bool ! java_post_options (const char **pfilename) { + const char *filename = *pfilename; + /* Use tree inlining if possible. Function instrumentation is only done in the RTL level, so we disable tree inlining. */ if (! flag_instrument_function_entry_exit) *************** java_post_options () *** 848,853 **** --- 729,795 ---- } } + /* Open input file. */ + + if (filename == 0 || !strcmp (filename, "-")) + { + finput = stdin; + filename = "stdin"; + + if (dependency_tracking) + error ("can't do dependency tracking with input from stdin"); + } + else + { + if (dependency_tracking) + { + char *dot; + + /* If the target is set and the output filename is set, then + there's no processing to do here. Otherwise we must + compute one or the other. */ + if (! ((dependency_tracking & DEPEND_TARGET_SET) + && (dependency_tracking & DEPEND_FILE_ALREADY_SET))) + { + dot = strrchr (filename, '.'); + if (dot == NULL) + error ("couldn't determine target name for dependency tracking"); + else + { + char *buf = xmalloc (dot - filename + + 3 + sizeof (TARGET_OBJECT_SUFFIX)); + strncpy (buf, filename, dot - filename); + + /* If emitting class files, we might have multiple + targets. The class generation code takes care of + registering them. Otherwise we compute the + target name here. */ + if ((dependency_tracking & DEPEND_TARGET_SET)) + ; /* Nothing. */ + else if (flag_emit_class_files) + jcf_dependency_set_target (NULL); + else + { + strcpy (buf + (dot - filename), TARGET_OBJECT_SUFFIX); + jcf_dependency_set_target (buf); + } + + if ((dependency_tracking & DEPEND_FILE_ALREADY_SET)) + ; /* Nothing. */ + else if ((dependency_tracking & DEPEND_SET_FILE)) + { + strcpy (buf + (dot - filename), ".d"); + jcf_dependency_set_dep_file (buf); + } + else + jcf_dependency_set_dep_file ("-"); + + free (buf); + } + } + } + } + /* Initialize the compiler back end. */ return false; } *************** java_post_options () *** 855,862 **** /* Return either DECL or its known constant value (if it has one). */ tree ! decl_constant_value (decl) ! tree decl; { if (/* Don't change a variable array bound or initial value to a constant in a place where a variable is invalid. */ --- 797,803 ---- /* Return either DECL or its known constant value (if it has one). */ tree ! decl_constant_value (tree decl) { if (/* Don't change a variable array bound or initial value to a constant in a place where a variable is invalid. */ *************** decl_constant_value (decl) *** 878,889 **** /* Walk the language specific tree nodes during inlining. */ static tree ! java_tree_inlining_walk_subtrees (tp,subtrees,func,data,htab) ! tree *tp ATTRIBUTE_UNUSED; ! int *subtrees ATTRIBUTE_UNUSED; ! walk_tree_fn func ATTRIBUTE_UNUSED; ! void *data ATTRIBUTE_UNUSED; ! void *htab ATTRIBUTE_UNUSED; { enum tree_code code; tree result; --- 819,829 ---- /* Walk the language specific tree nodes during inlining. */ static tree ! java_tree_inlining_walk_subtrees (tree *tp ATTRIBUTE_UNUSED, ! int *subtrees ATTRIBUTE_UNUSED, ! walk_tree_fn func ATTRIBUTE_UNUSED, ! void *data ATTRIBUTE_UNUSED, ! void *htab ATTRIBUTE_UNUSED) { enum tree_code code; tree result; *************** java_tree_inlining_walk_subtrees (tp,sub *** 905,931 **** switch (code) { case BLOCK: ! if (BLOCK_EXPR_BODY (t)) ! { ! tree *prev = &BLOCK_EXPR_BODY (*tp); ! while (*prev) ! { ! WALK_SUBTREE (*prev); ! prev = &TREE_CHAIN (*prev); ! } ! } return NULL_TREE; - break; default: return NULL_TREE; } } /* Called from unsafe_for_reeval. */ static int ! java_unsafe_for_reeval (t) ! tree t; { switch (TREE_CODE (t)) { --- 845,863 ---- switch (code) { case BLOCK: ! WALK_SUBTREE (BLOCK_EXPR_BODY (t)); return NULL_TREE; default: return NULL_TREE; } + + #undef WALK_SUBTREE } /* Called from unsafe_for_reeval. */ static int ! java_unsafe_for_reeval (tree t) { switch (TREE_CODE (t)) { *************** java_unsafe_for_reeval (t) *** 947,953 **** This variable is used to avoid multiple calls to the static constructor for each class. ! It looks somthing like this: foo () { --- 879,885 ---- This variable is used to avoid multiple calls to the static constructor for each class. ! It looks something like this: foo () { *************** java_unsafe_for_reeval (t) *** 964,979 **** Each of these boolean variables has an entry in the DECL_FUNCTION_INIT_TEST_TABLE of a method. When inlining a method we must merge the DECL_FUNCTION_INIT_TEST_TABLE from the function ! being linlined and create the boolean variables in the outermost scope of the method being inlined into. */ /* Create a mapping from a boolean variable in a method being inlined to one in the scope of the method being inlined into. */ static int ! merge_init_test_initialization (entry, x) ! void * * entry; ! void * x; { struct treetreehash_entry *ite = (struct treetreehash_entry *) *entry; splay_tree decl_map = (splay_tree)x; --- 896,909 ---- Each of these boolean variables has an entry in the DECL_FUNCTION_INIT_TEST_TABLE of a method. When inlining a method we must merge the DECL_FUNCTION_INIT_TEST_TABLE from the function ! being inlined and create the boolean variables in the outermost scope of the method being inlined into. */ /* Create a mapping from a boolean variable in a method being inlined to one in the scope of the method being inlined into. */ static int ! merge_init_test_initialization (void **entry, void *x) { struct treetreehash_entry *ite = (struct treetreehash_entry *) *entry; splay_tree decl_map = (splay_tree)x; *************** merge_init_test_initialization (entry, x *** 994,999 **** --- 924,947 ---- if (!*init_test_decl) *init_test_decl = (tree)n->value; + /* This fixes a weird case. + + The front end assumes that once we have called a method that + initializes some class, we can assume the class is initialized. It + does this by setting the DECL_INITIAL of the init_test_decl for that + class, and no initializations are emitted for that class. + + However, what if the method that is suppoed to do the initialization + is itself inlined in the caller? When expanding the called method + we'll assume that the class initalization has already been done, + because the DECL_INITIAL of the init_test_decl is set. + + To fix this we remove the DECL_INITIAL (in the caller scope) of all + the init_test_decls corresponding to classes initialized by the + inlined method. This makes the caller no longer assume that the + method being inlined does any class initializations. */ + DECL_INITIAL (*init_test_decl) = NULL; + return true; } *************** merge_init_test_initialization (entry, x *** 1001,1009 **** inlining. */ void ! java_inlining_merge_static_initializers (fn, decl_map) ! tree fn; ! void *decl_map; { htab_traverse (DECL_FUNCTION_INIT_TEST_TABLE (fn), --- 949,955 ---- inlining. */ void ! java_inlining_merge_static_initializers (tree fn, void *decl_map) { htab_traverse (DECL_FUNCTION_INIT_TEST_TABLE (fn), *************** java_inlining_merge_static_initializers *** 1017,1025 **** pre-existing one. */ static int ! inline_init_test_initialization (entry, x) ! void * * entry; ! void * x; { struct treetreehash_entry *ite = (struct treetreehash_entry *) *entry; splay_tree decl_map = (splay_tree)x; --- 963,969 ---- pre-existing one. */ static int ! inline_init_test_initialization (void **entry, void *x) { struct treetreehash_entry *ite = (struct treetreehash_entry *) *entry; splay_tree decl_map = (splay_tree)x; *************** inline_init_test_initialization (entry, *** 1028,1038 **** (DECL_FUNCTION_INIT_TEST_TABLE (current_function_decl), ite->key); if (! h) return true; - splay_tree_insert (decl_map, (splay_tree_key) ite->value, (splay_tree_value) h); - return true; } --- 972,980 ---- *************** inline_init_test_initialization (entry, *** 1042,1050 **** into, create a new mapping for it. */ void ! java_inlining_map_static_initializers (fn, decl_map) ! tree fn; ! void *decl_map; { htab_traverse (DECL_FUNCTION_INIT_TEST_TABLE (fn), --- 984,990 ---- into, create a new mapping for it. */ void ! java_inlining_map_static_initializers (tree fn, void *decl_map) { htab_traverse (DECL_FUNCTION_INIT_TEST_TABLE (fn), *************** java_inlining_map_static_initializers (f *** 1054,1062 **** /* Avoid voluminous output for deep recursion of compound exprs. */ static void ! dump_compound_expr (di, t) ! dump_info_p di; ! tree t; { int i; --- 994,1000 ---- /* Avoid voluminous output for deep recursion of compound exprs. */ static void ! dump_compound_expr (dump_info_p di, tree t) { int i; *************** dump_compound_expr (di, t) *** 1081,1090 **** } } ! static int ! java_dump_tree (dump_info, t) ! void *dump_info; ! tree t; { enum tree_code code; dump_info_p di = (dump_info_p) dump_info; --- 1019,1026 ---- } } ! static bool ! java_dump_tree (void *dump_info, tree t) { enum tree_code code; dump_info_p di = (dump_info_p) dump_info; *************** java_dump_tree (dump_info, t) *** 1106,1134 **** dump_child ("body", DECL_FUNCTION_BODY (t)); if (DECL_LANG_SPECIFIC (t) && !dump_flag (di, TDF_SLIM, t)) dump_child ("inline body", DECL_SAVED_TREE (t)); ! return 1; case RETURN_EXPR: dump_child ("expr", TREE_OPERAND (t, 0)); ! return 1; case GOTO_EXPR: dump_child ("goto", TREE_OPERAND (t, 0)); ! return 1; case LABEL_EXPR: dump_child ("label", TREE_OPERAND (t, 0)); ! return 1; case LABELED_BLOCK_EXPR: dump_child ("label", TREE_OPERAND (t, 0)); dump_child ("block", TREE_OPERAND (t, 1)); ! return 1; case EXIT_BLOCK_EXPR: dump_child ("block", TREE_OPERAND (t, 0)); dump_child ("val", TREE_OPERAND (t, 1)); ! return 1; case BLOCK: if (BLOCK_EXPR_BODY (t)) --- 1042,1070 ---- dump_child ("body", DECL_FUNCTION_BODY (t)); if (DECL_LANG_SPECIFIC (t) && !dump_flag (di, TDF_SLIM, t)) dump_child ("inline body", DECL_SAVED_TREE (t)); ! return true; case RETURN_EXPR: dump_child ("expr", TREE_OPERAND (t, 0)); ! return true; case GOTO_EXPR: dump_child ("goto", TREE_OPERAND (t, 0)); ! return true; case LABEL_EXPR: dump_child ("label", TREE_OPERAND (t, 0)); ! return true; case LABELED_BLOCK_EXPR: dump_child ("label", TREE_OPERAND (t, 0)); dump_child ("block", TREE_OPERAND (t, 1)); ! return true; case EXIT_BLOCK_EXPR: dump_child ("block", TREE_OPERAND (t, 0)); dump_child ("val", TREE_OPERAND (t, 1)); ! return true; case BLOCK: if (BLOCK_EXPR_BODY (t)) *************** java_dump_tree (dump_info, t) *** 1147,1164 **** block = TREE_CHAIN (block); } } ! return 1; case COMPOUND_EXPR: if (!dump_flag (di, TDF_SLIM, t)) ! return 0; dump_compound_expr (di, t); ! return 1; default: break; } ! return 0; } /* Java calls can't, in general, be sibcalls because we need an --- 1083,1100 ---- block = TREE_CHAIN (block); } } ! return true; case COMPOUND_EXPR: if (!dump_flag (di, TDF_SLIM, t)) ! return false; dump_compound_expr (di, t); ! return true; default: break; } ! return false; } /* Java calls can't, in general, be sibcalls because we need an *************** java_dump_tree (dump_info, t) *** 1169,1175 **** static bool java_decl_ok_for_sibcall (tree decl) { ! return decl != NULL && DECL_CONTEXT (decl) == current_class; } #include "gt-java-lang.h" --- 1105,1272 ---- static bool java_decl_ok_for_sibcall (tree decl) { ! return decl != NULL && DECL_CONTEXT (decl) == output_class; ! } ! ! /* Used by estimate_num_insns. Estimate number of instructions seen ! by given statement. */ ! static tree ! java_estimate_num_insns_1 (tree *tp, int *walk_subtrees, void *data) ! { ! int *count = data; ! tree x = *tp; ! ! if (TYPE_P (x) || DECL_P (x)) ! { ! *walk_subtrees = 0; ! return NULL; ! } ! /* Assume that constants and references counts nothing. These should ! be majorized by amount of operations among them we count later ! and are common target of CSE and similar optimizations. */ ! if (TREE_CODE_CLASS (TREE_CODE (x)) == 'c' ! || TREE_CODE_CLASS (TREE_CODE (x)) == 'r') ! return NULL; ! switch (TREE_CODE (x)) ! { ! /* Recognize assignments of large structures and constructors of ! big arrays. */ ! case MODIFY_EXPR: ! case CONSTRUCTOR: ! { ! HOST_WIDE_INT size; ! ! size = int_size_in_bytes (TREE_TYPE (x)); ! ! if (size < 0 || size > MOVE_MAX_PIECES * MOVE_RATIO) ! *count += 10; ! else ! *count += ((size + MOVE_MAX_PIECES - 1) / MOVE_MAX_PIECES); ! } ! break; ! /* Few special cases of expensive operations. This is usefull ! to avoid inlining on functions having too many of these. */ ! case TRUNC_DIV_EXPR: ! case CEIL_DIV_EXPR: ! case FLOOR_DIV_EXPR: ! case ROUND_DIV_EXPR: ! case TRUNC_MOD_EXPR: ! case CEIL_MOD_EXPR: ! case FLOOR_MOD_EXPR: ! case ROUND_MOD_EXPR: ! case RDIV_EXPR: ! case CALL_EXPR: ! ! case NEW_ARRAY_EXPR: ! case NEW_ANONYMOUS_ARRAY_EXPR: ! case NEW_CLASS_EXPR: ! *count += 10; ! break; ! /* Various containers that will produce no code themselves. */ ! case INIT_EXPR: ! case TARGET_EXPR: ! case BIND_EXPR: ! case BLOCK: ! case TREE_LIST: ! case TREE_VEC: ! case IDENTIFIER_NODE: ! case PLACEHOLDER_EXPR: ! case WITH_CLEANUP_EXPR: ! case CLEANUP_POINT_EXPR: ! case NOP_EXPR: ! case VIEW_CONVERT_EXPR: ! case SAVE_EXPR: ! case UNSAVE_EXPR: ! case COMPLEX_EXPR: ! case REALPART_EXPR: ! case IMAGPART_EXPR: ! case TRY_CATCH_EXPR: ! case TRY_FINALLY_EXPR: ! case LABEL_EXPR: ! case EXIT_EXPR: ! case LABELED_BLOCK_EXPR: ! case EXIT_BLOCK_EXPR: ! case EXPR_WITH_FILE_LOCATION: ! case UNARY_PLUS_EXPR: ! case THIS_EXPR: ! case DEFAULT_EXPR: ! case TRY_EXPR: ! ! break; ! case CLASS_LITERAL: ! *walk_subtrees = 0; ! break; ! default: ! (*count)++; ! } ! return NULL; ! } ! ! /* Estimate number of instructions that will be created by expanding the body. */ ! static int ! java_estimate_num_insns (tree decl) ! { ! int num = 0; ! walk_tree_without_duplicates (&DECL_SAVED_TREE (decl), ! java_estimate_num_insns_1, &num); ! return num; ! } ! ! /* Start inlining fn. Called by the tree inliner via ! lang_hooks.tree_inlining.cannot_inline_tree_fn. */ ! ! static int ! java_start_inlining (tree fn) ! { ! /* A java function's body doesn't have a BLOCK structure suitable ! for debug output until it is expanded. Prevent inlining functions ! that are not yet expanded. */ ! return TREE_ASM_WRITTEN (fn) ? 1 : 0; ! } ! ! /* Given a call_expr, try to figure out what its target might be. In ! the case of an indirection via the atable, search for the decl. If ! the decl is external, we return NULL. If we don't, the optimizer ! will replace the indirection with a direct call, which undoes the ! purpose of the atable indirection. */ ! static tree ! java_get_callee_fndecl (tree call_expr) ! { ! tree method, table, element, atable_methods; ! ! HOST_WIDE_INT index; ! ! if (TREE_CODE (call_expr) != CALL_EXPR) ! return NULL; ! method = TREE_OPERAND (call_expr, 0); ! STRIP_NOPS (method); ! if (TREE_CODE (method) != ARRAY_REF) ! return NULL; ! table = TREE_OPERAND (method, 0); ! if (! DECL_LANG_SPECIFIC(table) ! || !DECL_OWNER (table) ! || TYPE_ATABLE_DECL (DECL_OWNER (table)) != table) ! return NULL; ! ! atable_methods = TYPE_ATABLE_METHODS (DECL_OWNER (table)); ! index = TREE_INT_CST_LOW (TREE_OPERAND (method, 1)); ! ! /* FIXME: Replace this for loop with a hash table lookup. */ ! for (element = atable_methods; element; element = TREE_CHAIN (element)) ! { ! if (index == 1) ! { ! tree purpose = TREE_PURPOSE (element); ! if (TREE_CODE (purpose) == FUNCTION_DECL ! && ! DECL_EXTERNAL (purpose)) ! return purpose; ! else ! return NULL; ! } ! --index; ! } ! ! return NULL; } #include "gt-java-lang.h" diff -Nrc3pad gcc-3.3.3/gcc/java/lang.opt gcc-3.4.0/gcc/java/lang.opt *** gcc-3.3.3/gcc/java/lang.opt 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/gcc/java/lang.opt 2003-07-19 08:13:58.000000000 +0000 *************** *** 0 **** --- 1,164 ---- + ; Options for the Java front end. + ; Copyright (C) 2003 Free Software Foundation, Inc. + ; + ; This file is part of GCC. + ; + ; GCC is free software; you can redistribute it and/or modify it under + ; the terms of the GNU General Public License as published by the Free + ; Software Foundation; either version 2, or (at your option) any later + ; version. + ; + ; GCC is distributed in the hope that it will be useful, but WITHOUT ANY + ; WARRANTY; without even the implied warranty of MERCHANTABILITY or + ; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + ; for more details. + ; + ; You should have received a copy of the GNU General Public License + ; along with GCC; see the file COPYING. If not, write to the Free + ; Software Foundation, 59 Temple Place - Suite 330, Boston, MA + ; 02111-1307, USA. + + ; See c.opt for a description of this file's format. + + ; Please try to keep this file in ASCII collating order. + + Language + Java + + I + Java Joined + ; Documented for C + + M + Java + ; Documented for C + + MD_ + Java Undocumented + ; Documented for C + + MF + Java Separate + ; Documented for C + + MM + Java + ; Documented for C + + MMD_ + Java Undocumented + ; Documented for C + + MP + Java + ; Documented for C + + MT + Java Separate + ; Documented for C + + Wall + Java + ; Documented for C + + Wdeprecated + Java + Warn if deprecated class, method, or field is used + + Wextraneous-semicolon + Java + Warn if deprecated empty statements are found + + Wout-of-date + Java + Warn if .class files are out of date + + Wredundant-modifiers + Java + Warn if modifiers are specified when not necessary + + fCLASSPATH= + Java JoinedOrMissing RejectNegative + --CLASSPATH Deprecated; use --classpath instead + + fassert + Java + + fassume-compiled + Java + + fassume-compiled= + Java JoinedOrMissing + + fbootclasspath= + Java JoinedOrMissing RejectNegative + --bootclasspath= Replace system path + + fcheck-references + Java + + fclasspath= + Java JoinedOrMissing RejectNegative + --classpath= Set class path + + fcompile-resource= + Java Joined RejectNegative + + fdump- + Java Joined RejectNegative + + femit-class-file + Java + + femit-class-files + Java + + fencoding= + Java Joined RejectNegative + --encoding= Choose input encoding (defaults from your locale) + + fextdirs= + Java Joined RejectNegative + + ffilelist-file + Java + + fforce-classes-archive-check + Java + Always check for non gcj generated classes archives + + fhash-synchronization + Java + + findirect-dispatch + Java + Use offset tables for virtual method calls + + finline-functions + Java + + fjni + Java + Assume native functions are implemented using JNI + + foptimize-static-class-initialization + Java + Enable optimization of static class initialization code + + foutput-class-dir= + Java Joined RejectNegative + + fstore-check + Java + Enable assignability checks for stores into object arrays + + fuse-boehm-gc + Java + + fuse-divide-subroutine + Java + + version + Java + + ; This comment is to ensure we retain the blank line above. diff -Nrc3pad gcc-3.3.3/gcc/java/lang-options.h gcc-3.4.0/gcc/java/lang-options.h *** gcc-3.3.3/gcc/java/lang-options.h 2002-03-03 08:35:11.000000000 +0000 --- gcc-3.4.0/gcc/java/lang-options.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,62 **** - /* Switch definitions for the GNU compiler for the Java(TM) language. - Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU CC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. - - Java and all Java-based marks are trademarks or registered trademarks - of Sun Microsystems, Inc. in the United States and other countries. - The Free Software Foundation is independent of Sun Microsystems, Inc. */ - - /* This is the contribution to the `documented_lang_options' array in - toplev.c for java. */ - - DEFINE_LANG_NAME ("Java") - - { "-fbounds-check", "" }, - { "-fno-bounds-check", - N_("Disable automatic array bounds checking") }, - { "-fno-store-check", - N_("Disable assignability checks for stores into object arrays") }, - { "-fjni", - N_("Assume native functions are implemented using JNI") }, - { "--bootclasspath", - N_("Replace system path") }, - { "--classpath", - N_("Set class path") }, - { "--CLASSPATH", - N_("Set class path (deprecated: use --classpath instead)") }, - { "--main", - N_("Choose class whose main method should be used") }, - { "--encoding", - N_("Choose input encoding (default comes from locale)") }, - { "-I", - N_("Add directory to class path") }, - { "-d", - N_("Directory where class files should be written") }, - { "-Wredundant-modifiers", - N_("Warn if modifiers are specified when not necessary") }, - { "-Wextraneous-semicolon", - N_("Warn if deprecated empty statements are found") }, - { "-Wout-of-date", - N_("Warn if .class files are out of date") }, - { "-fforce-classes-archive-check", - N_("Always check for non gcj generated classes archives") }, - { "-fno-optimize-static-class-initialization", - N_("Never optimize static class initialization code") }, - { "-findirect-dispatch", - N_("Use offset tables for virtual method calls") }, --- 0 ---- diff -Nrc3pad gcc-3.3.3/gcc/java/lang-specs.h gcc-3.4.0/gcc/java/lang-specs.h *** gcc-3.3.3/gcc/java/lang-specs.h 2001-07-11 07:33:43.000000000 +0000 --- gcc-3.4.0/gcc/java/lang-specs.h 2003-06-14 22:25:50.000000000 +0000 *************** *** 1,20 **** /* Definitions for specs for the GNU compiler for the Java(TM) language. ! Copyright (C) 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,21 ---- /* Definitions for specs for the GNU compiler for the Java(TM) language. ! Copyright (C) 1996, 1998, 1999, 2000, 2001, 2003 ! Free Software Foundation, Inc. ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 35,40 **** %{femit-class-file:%{!fsyntax-only:%e-femit-class-file should used along with -fsyntax-only}}\ %{femit-class-files:%{!fsyntax-only:%e-femit-class-file should used along with -fsyntax-only}}\ %{!E:jc1 %i %(jc1) %(cc1_options) %{+e*} %{I*}\ ! %{MD} %{MMD} %{M} %{MM} %{MA} %{MT*} %{MF*}\ %{!fsyntax-only:%(invoke_as)}}", 0}, --- 36,41 ---- %{femit-class-file:%{!fsyntax-only:%e-femit-class-file should used along with -fsyntax-only}}\ %{femit-class-files:%{!fsyntax-only:%e-femit-class-file should used along with -fsyntax-only}}\ %{!E:jc1 %i %(jc1) %(cc1_options) %{+e*} %{I*}\ ! %{MD:-MD_} %{MMD:-MMD_} %{M} %{MM} %{MA} %{MT*} %{MF*}\ %{!fsyntax-only:%(invoke_as)}}", 0}, diff -Nrc3pad gcc-3.3.3/gcc/java/lex.c gcc-3.4.0/gcc/java/lex.c *** gcc-3.3.3/gcc/java/lex.c 2003-01-28 18:48:16.000000000 +0000 --- gcc-3.4.0/gcc/java/lex.c 2003-10-22 18:00:06.000000000 +0000 *************** *** 1,21 **** /* Language lexer for the GNU compiler for the Java(TM) language. ! Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,22 ---- /* Language lexer for the GNU compiler for the Java(TM) language. ! Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 ! Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 37,73 **** #include "keyword.h" #include "flags.h" #include "chartables.h" /* Function declarations. */ ! static char *java_sprint_unicode PARAMS ((struct java_line *, int)); ! static void java_unicode_2_utf8 PARAMS ((unicode_t)); ! static void java_lex_error PARAMS ((const char *, int)); #ifndef JC1_LITE ! static int java_is_eol PARAMS ((FILE *, int)); ! static tree build_wfl_node PARAMS ((tree)); #endif ! static void java_store_unicode PARAMS ((struct java_line *, unicode_t, int)); ! static int java_parse_escape_sequence PARAMS ((void)); ! static int java_start_char_p PARAMS ((unicode_t)); ! static int java_part_char_p PARAMS ((unicode_t)); ! static int java_parse_doc_section PARAMS ((int)); ! static void java_parse_end_comment PARAMS ((int)); ! static int java_get_unicode PARAMS ((void)); ! static int java_read_unicode PARAMS ((java_lexer *, int *)); ! static int java_read_unicode_collapsing_terminators PARAMS ((java_lexer *, ! int *)); ! static void java_store_unicode PARAMS ((struct java_line *, unicode_t, int)); ! static int java_read_char PARAMS ((java_lexer *)); ! static void java_allocate_new_line PARAMS ((void)); ! static void java_unget_unicode PARAMS ((void)); ! static unicode_t java_sneak_unicode PARAMS ((void)); #ifndef JC1_LITE ! static int utf8_cmp PARAMS ((const unsigned char *, int, const char *)); #endif ! java_lexer *java_new_lexer PARAMS ((FILE *, const char *)); #ifndef JC1_LITE ! static void error_if_numeric_overflow PARAMS ((tree)); #endif #ifdef HAVE_ICONV --- 38,79 ---- #include "keyword.h" #include "flags.h" #include "chartables.h" + #ifndef JC1_LITE + #include "timevar.h" + #endif /* Function declarations. */ ! static char *java_sprint_unicode (struct java_line *, int); ! static void java_unicode_2_utf8 (unicode_t); ! static void java_lex_error (const char *, int); #ifndef JC1_LITE ! static int do_java_lex (YYSTYPE *); ! static int java_lex (YYSTYPE *); ! static int java_is_eol (FILE *, int); ! static tree build_wfl_node (tree); #endif ! static void java_store_unicode (struct java_line *, unicode_t, int); ! static int java_parse_escape_sequence (void); ! static int java_start_char_p (unicode_t); ! static int java_part_char_p (unicode_t); ! static int java_space_char_p (unicode_t); ! static void java_parse_doc_section (int); ! static void java_parse_end_comment (int); ! static int java_get_unicode (void); ! static int java_read_unicode (java_lexer *, int *); ! static int java_read_unicode_collapsing_terminators (java_lexer *, int *); ! static void java_store_unicode (struct java_line *, unicode_t, int); ! static int java_read_char (java_lexer *); ! static void java_allocate_new_line (void); ! static void java_unget_unicode (void); ! static unicode_t java_sneak_unicode (void); #ifndef JC1_LITE ! static int utf8_cmp (const unsigned char *, int, const char *); #endif ! java_lexer *java_new_lexer (FILE *, const char *); #ifndef JC1_LITE ! static void error_if_numeric_overflow (tree); #endif #ifdef HAVE_ICONV *************** static int need_byteswap = 0; *** 82,90 **** #endif void ! java_init_lex (finput, encoding) ! FILE *finput; ! const char *encoding; { #ifndef JC1_LITE int java_lang_imported = 0; --- 88,94 ---- #endif void ! java_init_lex (FILE *finput, const char *encoding) { #ifndef JC1_LITE int java_lang_imported = 0; *************** java_init_lex (finput, encoding) *** 125,137 **** CPC_INSTANCE_INITIALIZER_LIST (ctxp) = NULL_TREE; memset (ctxp->modifier_ctx, 0, sizeof (ctxp->modifier_ctx)); ! memset (current_jcf, 0, sizeof (JCF)); ctxp->current_parsed_class = NULL; ctxp->package = NULL_TREE; #endif ctxp->filename = input_filename; ! ctxp->lineno = lineno = 0; ctxp->p_line = NULL; ctxp->c_line = NULL; ctxp->java_error_flag = 0; --- 129,141 ---- CPC_INSTANCE_INITIALIZER_LIST (ctxp) = NULL_TREE; memset (ctxp->modifier_ctx, 0, sizeof (ctxp->modifier_ctx)); ! current_jcf = ggc_alloc_cleared (sizeof (JCF)); ctxp->current_parsed_class = NULL; ctxp->package = NULL_TREE; #endif ctxp->filename = input_filename; ! ctxp->lineno = input_line = 0; ctxp->p_line = NULL; ctxp->c_line = NULL; ctxp->java_error_flag = 0; *************** java_init_lex (finput, encoding) *** 139,147 **** } static char * ! java_sprint_unicode (line, i) ! struct java_line *line; ! int i; { static char buffer [10]; if (line->unicode_escape_p [i] || line->line [i] > 128) --- 143,149 ---- } static char * ! java_sprint_unicode (struct java_line *line, int i) { static char buffer [10]; if (line->unicode_escape_p [i] || line->line [i] > 128) *************** java_sprint_unicode (line, i) *** 155,167 **** } static unicode_t ! java_sneak_unicode () { return (ctxp->c_line->line [ctxp->c_line->current]); } static void ! java_unget_unicode () { if (!ctxp->c_line->current) /* Can't unget unicode. */ --- 157,169 ---- } static unicode_t ! java_sneak_unicode (void) { return (ctxp->c_line->line [ctxp->c_line->current]); } static void ! java_unget_unicode (void) { if (!ctxp->c_line->current) /* Can't unget unicode. */ *************** java_unget_unicode () *** 172,178 **** } static void ! java_allocate_new_line () { unicode_t ahead = (ctxp->c_line ? ctxp->c_line->ahead[0] : '\0'); char ahead_escape_p = (ctxp->c_line ? --- 174,180 ---- } static void ! java_allocate_new_line (void) { unicode_t ahead = (ctxp->c_line ? ctxp->c_line->ahead[0] : '\0'); char ahead_escape_p = (ctxp->c_line ? *************** java_allocate_new_line () *** 210,225 **** } ctxp->c_line->ahead [0] = 0; ctxp->c_line->unicode_escape_ahead_p = 0; ! ctxp->c_line->lineno = ++lineno; ctxp->c_line->white_space_only = 1; } /* Create a new lexer object. */ java_lexer * ! java_new_lexer (finput, encoding) ! FILE *finput; ! const char *encoding; { java_lexer *lex = xmalloc (sizeof (java_lexer)); int enc_error = 0; --- 212,225 ---- } ctxp->c_line->ahead [0] = 0; ctxp->c_line->unicode_escape_ahead_p = 0; ! ctxp->c_line->lineno = ++input_line; ctxp->c_line->white_space_only = 1; } /* Create a new lexer object. */ java_lexer * ! java_new_lexer (FILE *finput, const char *encoding) { java_lexer *lex = xmalloc (sizeof (java_lexer)); int enc_error = 0; *************** java_new_lexer (finput, encoding) *** 306,313 **** } void ! java_destroy_lexer (lex) ! java_lexer *lex; { #ifdef HAVE_ICONV if (! lex->use_fallback) --- 306,312 ---- } void ! java_destroy_lexer (java_lexer *lex) { #ifdef HAVE_ICONV if (! lex->use_fallback) *************** java_destroy_lexer (lex) *** 317,324 **** } static int ! java_read_char (lex) ! java_lexer *lex; { if (lex->unget_value) { --- 316,322 ---- } static int ! java_read_char (java_lexer *lex) { if (lex->unget_value) { *************** java_read_char (lex) *** 509,518 **** } static void ! java_store_unicode (l, c, unicode_escape_p) ! struct java_line *l; ! unicode_t c; ! int unicode_escape_p; { if (l->size == l->max) { --- 507,513 ---- } static void ! java_store_unicode (struct java_line *l, unicode_t c, int unicode_escape_p) { if (l->size == l->max) { *************** java_store_unicode (l, c, unicode_escape *** 526,534 **** } static int ! java_read_unicode (lex, unicode_escape_p) ! java_lexer *lex; ! int *unicode_escape_p; { int c; --- 521,527 ---- } static int ! java_read_unicode (java_lexer *lex, int *unicode_escape_p) { int c; *************** java_read_unicode (lex, unicode_escape_p *** 590,598 **** } static int ! java_read_unicode_collapsing_terminators (lex, unicode_escape_p) ! java_lexer *lex; ! int *unicode_escape_p; { int c = java_read_unicode (lex, unicode_escape_p); --- 583,590 ---- } static int ! java_read_unicode_collapsing_terminators (java_lexer *lex, ! int *unicode_escape_p) { int c = java_read_unicode (lex, unicode_escape_p); *************** java_read_unicode_collapsing_terminators *** 612,618 **** } static int ! java_get_unicode () { /* It's time to read a line when... */ if (!ctxp->c_line || ctxp->c_line->current == ctxp->c_line->size) --- 604,610 ---- } static int ! java_get_unicode (void) { /* It's time to read a line when... */ if (!ctxp->c_line || ctxp->c_line->current == ctxp->c_line->size) *************** java_get_unicode () *** 659,666 **** /* Parse the end of a C style comment. * C is the first character following the '/' and '*'. */ static void ! java_parse_end_comment (c) ! int c; { for ( ;; c = java_get_unicode ()) { --- 651,657 ---- /* Parse the end of a C style comment. * C is the first character following the '/' and '*'. */ static void ! java_parse_end_comment (int c) { for ( ;; c = java_get_unicode ()) { *************** java_parse_end_comment (c) *** 688,756 **** of a documentation comment line (ignoring white space and any `*' character). Parsed keyword(s): @DEPRECATED. */ ! static int ! java_parse_doc_section (c) ! int c; { ! int valid_tag = 0, seen_star = 0; ! while (JAVA_WHITE_SPACE_P (c) || (c == '*') || c == '\n') { ! switch (c) { ! case '*': ! seen_star = 1; ! break; ! case '\n': /* ULT */ ! valid_tag = 1; ! default: ! seen_star = 0; ! } ! c = java_get_unicode(); ! } ! if (c == UEOF) ! java_lex_error ("Comment not terminated at end of input", 0); ! if (seen_star && (c == '/')) ! return 1; /* Goto step1 in caller. */ ! /* We're parsing `@deprecated'. */ ! if (valid_tag && (c == '@')) ! { ! char tag [11]; ! int tag_index = 0; ! while (tag_index < 10 && c != UEOF && c != ' ' && c != '\n') { c = java_get_unicode (); ! tag [tag_index++] = c; } if (c == UEOF) ! java_lex_error ("Comment not terminated at end of input", 0); ! tag [tag_index] = '\0'; ! ! if (!strcmp (tag, "deprecated")) ! ctxp->deprecated = 1; } ! java_unget_unicode (); ! return 0; } /* Return true if C is a valid start character for a Java identifier. This is only called if C >= 128 -- smaller values are handled inline. However, this function handles all values anyway. */ static int ! java_start_char_p (c) ! unicode_t c; { unsigned int hi = c / 256; const char *const page = type_table[hi]; unsigned long val = (unsigned long) page; int flags; ! if ((val & ~ (LETTER_PART | LETTER_START)) != 0) flags = page[c & 255]; else flags = val; --- 679,784 ---- of a documentation comment line (ignoring white space and any `*' character). Parsed keyword(s): @DEPRECATED. */ ! static void ! java_parse_doc_section (int c) { ! int last_was_star; ! /* We reset this here, because only the most recent doc comment ! applies to the following declaration. */ ! ctxp->deprecated = 0; ! ! /* We loop over all the lines of the comment. We'll eventually exit ! if we hit EOF prematurely, or when we see the comment ! terminator. */ ! while (1) { ! /* These first steps need only be done if we're still looking ! for the deprecated tag. If we've already seen it, we might ! as well skip looking for it again. */ ! if (! ctxp->deprecated) { ! /* Skip whitespace and '*'s. We must also check for the end ! of the comment here. */ ! while (JAVA_WHITE_SPACE_P (c) || c == '*') ! { ! last_was_star = (c == '*'); ! c = java_get_unicode (); ! if (last_was_star && c == '/') ! { ! /* We just saw the comment terminator. */ ! return; ! } ! } ! if (c == UEOF) ! goto eof; ! if (c == '@') ! { ! const char *deprecated = "@deprecated"; ! int i; ! for (i = 0; deprecated[i]; ++i) ! { ! if (c != deprecated[i]) ! break; ! /* We write the code in this way, with the ! update at the end, so that after the loop ! we're left with the next character in C. */ ! c = java_get_unicode (); ! } ! if (c == UEOF) ! goto eof; ! ! /* @deprecated must be followed by a space or newline. ! We also allow a '*' in case it appears just before ! the end of a comment. In this position only we also ! must allow any Unicode space character. */ ! if (c == ' ' || c == '\n' || c == '*' || java_space_char_p (c)) ! { ! if (! deprecated[i]) ! ctxp->deprecated = 1; ! } ! } ! } ! ! /* We've examined the relevant content from this line. Now we ! skip the remaining characters and start over with the next ! line. We also check for end of comment here. */ ! while (c != '\n' && c != UEOF) { + last_was_star = (c == '*'); c = java_get_unicode (); ! if (last_was_star && c == '/') ! return; } if (c == UEOF) ! goto eof; ! /* We have to advance past the \n. */ ! c = java_get_unicode (); ! if (c == UEOF) ! goto eof; } ! ! eof: ! java_lex_error ("Comment not terminated at end of input", 0); } /* Return true if C is a valid start character for a Java identifier. This is only called if C >= 128 -- smaller values are handled inline. However, this function handles all values anyway. */ static int ! java_start_char_p (unicode_t c) { unsigned int hi = c / 256; const char *const page = type_table[hi]; unsigned long val = (unsigned long) page; int flags; ! if ((val & ~ LETTER_MASK) != 0) flags = page[c & 255]; else flags = val; *************** java_start_char_p (c) *** 762,776 **** This is only called if C >= 128 -- smaller values are handled inline. However, this function handles all values anyway. */ static int ! java_part_char_p (c) ! unicode_t c; { unsigned int hi = c / 256; const char *const page = type_table[hi]; unsigned long val = (unsigned long) page; int flags; ! if ((val & ~ (LETTER_PART | LETTER_START)) != 0) flags = page[c & 255]; else flags = val; --- 790,803 ---- This is only called if C >= 128 -- smaller values are handled inline. However, this function handles all values anyway. */ static int ! java_part_char_p (unicode_t c) { unsigned int hi = c / 256; const char *const page = type_table[hi]; unsigned long val = (unsigned long) page; int flags; ! if ((val & ~ LETTER_MASK) != 0) flags = page[c & 255]; else flags = val; *************** java_part_char_p (c) *** 778,785 **** return flags & LETTER_PART; } static int ! java_parse_escape_sequence () { unicode_t char_lit; int c; --- 805,829 ---- return flags & LETTER_PART; } + /* Return true if C is whitespace. */ static int ! java_space_char_p (unicode_t c) ! { ! unsigned int hi = c / 256; ! const char *const page = type_table[hi]; ! unsigned long val = (unsigned long) page; ! int flags; ! ! if ((val & ~ LETTER_MASK) != 0) ! flags = page[c & 255]; ! else ! flags = val; ! ! return flags & LETTER_SPACE; ! } ! ! static int ! java_parse_escape_sequence (void) { unicode_t char_lit; int c; *************** java_parse_escape_sequence () *** 845,858 **** with an 'f', indicating it is of type 'float'; NUMBER_BEGINNING is the line number on which to report any error. */ ! static void java_perform_atof PARAMS ((YYSTYPE *, char *, int, int)); static void ! java_perform_atof (java_lval, literal_token, fflag, number_beginning) ! YYSTYPE *java_lval; ! char *literal_token; ! int fflag; ! int number_beginning; { REAL_VALUE_TYPE value; tree type = (fflag ? FLOAT_TYPE_NODE : DOUBLE_TYPE_NODE); --- 889,899 ---- with an 'f', indicating it is of type 'float'; NUMBER_BEGINNING is the line number on which to report any error. */ ! static void java_perform_atof (YYSTYPE *, char *, int, int); static void ! java_perform_atof (YYSTYPE *java_lval, char *literal_token, int fflag, ! int number_beginning) { REAL_VALUE_TYPE value; tree type = (fflag ? FLOAT_TYPE_NODE : DOUBLE_TYPE_NODE); *************** java_perform_atof (java_lval, literal_to *** 895,909 **** } #endif ! static int yylex PARAMS ((YYSTYPE *)); static int #ifdef JC1_LITE ! yylex (java_lval) #else ! java_lex (java_lval) #endif - YYSTYPE *java_lval; { int c; unicode_t first_unicode; --- 936,949 ---- } #endif ! static int yylex (YYSTYPE *); static int #ifdef JC1_LITE ! yylex (YYSTYPE *java_lval) #else ! do_java_lex (YYSTYPE *java_lval) #endif { int c; unicode_t first_unicode; *************** java_lex (java_lval) *** 962,974 **** case '*': if ((c = java_get_unicode ()) == '*') { ! if ((c = java_get_unicode ()) == '/') ! goto step1; /* Empty documentation comment. */ ! else if (java_parse_doc_section (c)) ! goto step1; } ! ! java_parse_end_comment ((c = java_get_unicode ())); goto step1; break; default: --- 1002,1020 ---- case '*': if ((c = java_get_unicode ()) == '*') { ! c = java_get_unicode (); ! if (c == '/') ! { ! /* Empty documentation comment. We have to reset ! the deprecation marker as only the most recent ! doc comment applies. */ ! ctxp->deprecated = 0; ! } ! else ! java_parse_doc_section (c); } ! else ! java_parse_end_comment ((c = java_get_unicode ())); goto step1; break; default: *************** java_lex (java_lval) *** 1305,1320 **** } if (c == '\n' || c == UEOF) /* ULT. */ { ! lineno--; /* Refer to the line where the terminator was seen. */ java_lex_error ("String not terminated at end of line", 0); ! lineno++; } obstack_1grow (&temporary_obstack, '\0'); string = obstack_finish (&temporary_obstack); #ifndef JC1_LITE if (!no_error || (c != '"')) ! java_lval->node = error_mark_node; /* FIXME: Requires futher testing. */ else java_lval->node = build_string (strlen (string), string); --- 1351,1366 ---- } if (c == '\n' || c == UEOF) /* ULT. */ { ! input_line--; /* Refer to the line where the terminator was seen. */ java_lex_error ("String not terminated at end of line", 0); ! input_line++; } obstack_1grow (&temporary_obstack, '\0'); string = obstack_finish (&temporary_obstack); #ifndef JC1_LITE if (!no_error || (c != '"')) ! java_lval->node = error_mark_node; /* FIXME: Requires further testing. */ else java_lval->node = build_string (strlen (string), string); *************** java_lex (java_lval) *** 1335,1348 **** case '{': JAVA_LEX_SEP (c); if (ctxp->ccb_indent == 1) ! ctxp->first_ccb_indent1 = lineno; ctxp->ccb_indent++; BUILD_OPERATOR (OCB_TK); case '}': JAVA_LEX_SEP (c); ctxp->ccb_indent--; if (ctxp->ccb_indent == 1) ! ctxp->last_ccb_indent1 = lineno; BUILD_OPERATOR (CCB_TK); case '[': JAVA_LEX_SEP (c); --- 1381,1394 ---- case '{': JAVA_LEX_SEP (c); if (ctxp->ccb_indent == 1) ! ctxp->first_ccb_indent1 = input_line; ctxp->ccb_indent++; BUILD_OPERATOR (OCB_TK); case '}': JAVA_LEX_SEP (c); ctxp->ccb_indent--; if (ctxp->ccb_indent == 1) ! ctxp->last_ccb_indent1 = input_line; BUILD_OPERATOR (CCB_TK); case '[': JAVA_LEX_SEP (c); *************** java_lex (java_lval) *** 1658,1670 **** } #ifndef JC1_LITE /* This is called by the parser to see if an error should be generated due to numeric overflow. This function only handles the particular case of the largest negative value, and is only called in the case where this value is not preceded by `-'. */ static void ! error_if_numeric_overflow (value) ! tree value; { if (TREE_CODE (value) == INTEGER_CST && JAVA_RADIX10_FLAG (value) --- 1704,1728 ---- } #ifndef JC1_LITE + + /* The exported interface to the lexer. */ + static int + java_lex (YYSTYPE *java_lval) + { + int r; + + timevar_push (TV_LEX); + r = do_java_lex (java_lval); + timevar_pop (TV_LEX); + return r; + } + /* This is called by the parser to see if an error should be generated due to numeric overflow. This function only handles the particular case of the largest negative value, and is only called in the case where this value is not preceded by `-'. */ static void ! error_if_numeric_overflow (tree value) { if (TREE_CODE (value) == INTEGER_CST && JAVA_RADIX10_FLAG (value) *************** error_if_numeric_overflow (value) *** 1676,1686 **** java_lex_error ("Numeric overflow for `int' literal", 0); } } #endif /* JC1_LITE */ static void ! java_unicode_2_utf8 (unicode) ! unicode_t unicode; { if (RANGE (unicode, 0x01, 0x7f)) obstack_1grow (&temporary_obstack, (char)unicode); --- 1734,1744 ---- java_lex_error ("Numeric overflow for `int' literal", 0); } } + #endif /* JC1_LITE */ static void ! java_unicode_2_utf8 (unicode_t unicode) { if (RANGE (unicode, 0x01, 0x7f)) obstack_1grow (&temporary_obstack, (char)unicode); *************** java_unicode_2_utf8 (unicode) *** 1704,1711 **** #ifndef JC1_LITE static tree ! build_wfl_node (node) ! tree node; { node = build_expr_wfl (node, ctxp->filename, ctxp->elc.line, ctxp->elc.col); /* Prevent java_complete_lhs from short-circuiting node (if constant). */ --- 1762,1768 ---- #ifndef JC1_LITE static tree ! build_wfl_node (tree node) { node = build_expr_wfl (node, ctxp->filename, ctxp->elc.line, ctxp->elc.col); /* Prevent java_complete_lhs from short-circuiting node (if constant). */ *************** build_wfl_node (node) *** 1715,1723 **** #endif static void ! java_lex_error (msg, forward) ! const char *msg ATTRIBUTE_UNUSED; ! int forward ATTRIBUTE_UNUSED; { #ifndef JC1_LITE ctxp->elc.line = ctxp->c_line->lineno; --- 1772,1778 ---- #endif static void ! java_lex_error (const char *msg ATTRIBUTE_UNUSED, int forward ATTRIBUTE_UNUSED) { #ifndef JC1_LITE ctxp->elc.line = ctxp->c_line->lineno; *************** java_lex_error (msg, forward) *** 1732,1740 **** #ifndef JC1_LITE static int ! java_is_eol (fp, c) ! FILE *fp; ! int c; { int next; switch (c) --- 1787,1793 ---- #ifndef JC1_LITE static int ! java_is_eol (FILE *fp, int c) { int next; switch (c) *************** java_is_eol (fp, c) *** 1753,1761 **** #endif char * ! java_get_line_col (filename, line, col) ! const char *filename ATTRIBUTE_UNUSED; ! int line ATTRIBUTE_UNUSED, col ATTRIBUTE_UNUSED; { #ifdef JC1_LITE return 0; --- 1806,1813 ---- #endif char * ! java_get_line_col (const char *filename ATTRIBUTE_UNUSED, ! int line ATTRIBUTE_UNUSED, int col ATTRIBUTE_UNUSED) { #ifdef JC1_LITE return 0; *************** java_get_line_col (filename, line, col) *** 1773,1779 **** char *base; if (!(fp = fopen (filename, "r"))) ! fatal_io_error ("can't open %s", filename); while (cline != line) { --- 1825,1831 ---- char *base; if (!(fp = fopen (filename, "r"))) ! fatal_error ("can't open %s: %m", filename); while (cline != line) { *************** java_get_line_col (filename, line, col) *** 1831,1840 **** #ifndef JC1_LITE static int ! utf8_cmp (str, length, name) ! const unsigned char *str; ! int length; ! const char *name; { const unsigned char *limit = str + length; int i; --- 1883,1889 ---- #ifndef JC1_LITE static int ! utf8_cmp (const unsigned char *str, int length, const char *name) { const unsigned char *limit = str + length; int i; *************** static const char *const cxx_keywords[] *** 1962,1970 **** /* Return true if NAME is a C++ keyword. */ int ! cxx_keyword_p (name, length) ! const char *name; ! int length; { int last = ARRAY_SIZE (cxx_keywords); int first = 0; --- 2011,2017 ---- /* Return true if NAME is a C++ keyword. */ int ! cxx_keyword_p (const char *name, int length) { int last = ARRAY_SIZE (cxx_keywords); int first = 0; diff -Nrc3pad gcc-3.3.3/gcc/java/lex.h gcc-3.4.0/gcc/java/lex.h *** gcc-3.3.3/gcc/java/lex.h 2002-11-06 00:01:01.000000000 +0000 --- gcc-3.4.0/gcc/java/lex.h 2003-12-03 16:48:20.000000000 +0000 *************** *** 1,21 **** /* Language lexer definitions for the GNU compiler for the Java(TM) language. ! Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,22 ---- /* Language lexer definitions for the GNU compiler for the Java(TM) language. ! Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 ! Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 26,39 **** #ifndef GCC_JAVA_LEX_H #define GCC_JAVA_LEX_H /* Extern global variables declarations */ extern FILE *finput; - extern int lineno; /* A Unicode character, as read from the input file */ typedef unsigned short unicode_t; ! #ifdef HAVE_ICONV #include #endif /* HAVE_ICONV */ --- 27,41 ---- #ifndef GCC_JAVA_LEX_H #define GCC_JAVA_LEX_H + #include "input.h" + /* Extern global variables declarations */ extern FILE *finput; /* A Unicode character, as read from the input file */ typedef unsigned short unicode_t; ! #if defined HAVE_ICONV_H && defined HAVE_ICONV #include #endif /* HAVE_ICONV */ *************** struct java_error { *** 95,107 **** int error; }; ! typedef struct _java_lc { int line; int prev_col; int col; } java_lc; ! typedef struct java_lexer { /* The file from which we're reading. */ FILE *finput; --- 97,109 ---- int error; }; ! typedef struct java_lc_s GTY(()) { int line; int prev_col; int col; } java_lc; ! struct java_lexer { /* The file from which we're reading. */ FILE *finput; *************** typedef struct java_lexer *** 154,163 **** int out_last; #endif /* HAVE_ICONV */ ! } java_lexer; /* Destroy a lexer object. */ ! extern void java_destroy_lexer PARAMS ((java_lexer *)); #define JAVA_LINE_MAX 80 --- 156,166 ---- int out_last; #endif /* HAVE_ICONV */ ! }; ! typedef struct java_lexer java_lexer; /* Destroy a lexer object. */ ! extern void java_destroy_lexer (java_lexer *); #define JAVA_LINE_MAX 80 diff -Nrc3pad gcc-3.3.3/gcc/java/Make-lang.in gcc-3.4.0/gcc/java/Make-lang.in *** gcc-3.3.3/gcc/java/Make-lang.in 2003-07-08 13:28:41.000000000 +0000 --- gcc-3.4.0/gcc/java/Make-lang.in 2004-04-14 19:45:18.000000000 +0000 *************** *** 1,21 **** ! # Top level makefile fragment for the GNU compiler for the Java(TM) # language. ! # Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. ! #This file is part of GNU CC. ! #GNU CC is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation; either version 2, or (at your option) #any later version. ! #GNU CC is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. #You should have received a copy of the GNU General Public License ! #along with GNU CC; see the file COPYING. If not, write to #the Free Software Foundation, 59 Temple Place - Suite 330, #Boston, MA 02111-1307, USA. --- 1,22 ---- ! # Top level -*- makefile -*- fragment for the GNU compiler for the Java(TM) # language. ! # Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004 ! # Free Software Foundation, Inc. ! #This file is part of GCC. ! #GCC is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation; either version 2, or (at your option) #any later version. ! #GCC is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. #You should have received a copy of the GNU General Public License ! #along with GCC; see the file COPYING. If not, write to #the Free Software Foundation, 59 Temple Place - Suite 330, #Boston, MA 02111-1307, USA. *************** *** 27,36 **** # Each language makefile fragment must provide the following targets: # # foo.all.build, foo.all.cross, foo.start.encap, foo.rest.encap, ! # foo.info, foo.dvi, ! # foo.install-normal, foo.install-common, foo.install-info, foo.install-man, # foo.uninstall, ! # foo.mostlyclean, foo.clean, foo.distclean, foo.extraclean, # foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4 # # where `foo' is the name of the language. --- 28,36 ---- # Each language makefile fragment must provide the following targets: # # foo.all.build, foo.all.cross, foo.start.encap, foo.rest.encap, ! # foo.install-normal, foo.install-common, foo.install-man, # foo.uninstall, ! # foo.mostlyclean, foo.clean, foo.distclean, # foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4 # # where `foo' is the name of the language. *************** *** 42,52 **** # - define the names for selecting the language in LANGUAGES. # Actual names to use when installing a native compiler. ! JAVA_INSTALL_NAME = `echo gcj|sed '$(program_transform_name)'` ! JAVA_TARGET_INSTALL_NAME = $(target_alias)-`echo gcj|sed '$(program_transform_name)'` ! ! # Actual names to use when installing a cross-compiler. ! JAVA_CROSS_NAME = `echo gcj|sed '$(program_transform_cross_name)'` GCJ = gcj --- 42,50 ---- # - define the names for selecting the language in LANGUAGES. # Actual names to use when installing a native compiler. ! JAVA_INSTALL_NAME := $(shell echo gcj|sed '$(program_transform_name)') ! JAVA_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo gcj|sed '$(program_transform_name)') ! GCJH_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo gcjh|sed '$(program_transform_name)') GCJ = gcj *************** JAVA_TARGET_INDEPENDENT_BIN_TOOLS = gcjh *** 61,67 **** # Tell GNU make to ignore these if they exist. .PHONY: java ! jvspec.o: $(srcdir)/java/jvspec.c $(SYSTEM_H) $(GCC_H) $(CONFIG_H) (SHLIB_LINK='$(SHLIB_LINK)' \ SHLIB_MULTILIB='$(SHLIB_MULTILIB)'; \ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \ --- 59,66 ---- # Tell GNU make to ignore these if they exist. .PHONY: java ! jvspec.o: $(srcdir)/java/jvspec.c $(SYSTEM_H) coretypes.h $(TM_H) \ ! $(GCC_H) $(CONFIG_H) (SHLIB_LINK='$(SHLIB_LINK)' \ SHLIB_MULTILIB='$(SHLIB_MULTILIB)'; \ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \ *************** $(GCJ)-cross$(exeext): $(GCJ)$(exeext) *** 78,97 **** -rm -f $(GCJ)-cross$(exeext) cp $(GCJ)$(exeext) $(GCJ)-cross$(exeext) ! po-generated: $(srcdir)/java/parse.c $(srcdir)/java/parse-scan.c ! $(srcdir)/java/parse.c: $(srcdir)/java/parse.y ! $(BISON) -t --name-prefix=java_ $(BISONFLAGS) \ ! -o p$$$$.c $(srcdir)/java/parse.y && \ ! mv -f p$$$$.c $(srcdir)/java/parse.c ! $(srcdir)/java/parse-scan.c: $(srcdir)/java/parse-scan.y ! $(BISON) -t $(BISONFLAGS) -o ps$$$$.c $(srcdir)/java/parse-scan.y && \ ! mv -f ps$$$$.c $(srcdir)/java/parse-scan.c $(srcdir)/java/keyword.h: $(srcdir)/java/keyword.gperf (cd $(srcdir)/java || exit 1; \ ! gperf -L C -C -F ', 0' -p -t -j1 -i 1 -g -o -N java_keyword -k1,4,$$ \ keyword.gperf > k$$$$.h || { \ echo "Please update gperf from ftp://ftp.gnu.org/pub/gnu/gperf/" >&2; \ rm -f k$$$$.h; \ --- 77,94 ---- -rm -f $(GCJ)-cross$(exeext) cp $(GCJ)$(exeext) $(GCJ)-cross$(exeext) ! java.srcextra: java/parse.c java/parse-scan.c ! -cp -p $^ $(srcdir)/java ! java/parse.c: java/parse.y ! -$(BISON) -t --name-prefix=java_ $(BISONFLAGS) -o $@ $< ! java/parse-scan.c: java/parse-scan.y ! -$(BISON) -t $(BISONFLAGS) -o $@ $< $(srcdir)/java/keyword.h: $(srcdir)/java/keyword.gperf (cd $(srcdir)/java || exit 1; \ ! gperf -L ANSI-C -C -F ', 0' -p -t -j1 -i 1 -g -o -N java_keyword -k1,4,$$ \ keyword.gperf > k$$$$.h || { \ echo "Please update gperf from ftp://ftp.gnu.org/pub/gnu/gperf/" >&2; \ rm -f k$$$$.h; \ *************** $(srcdir)/java/keyword.h: $(srcdir)/java *** 101,128 **** gt-java-class.h gt-java-constants.h gt-java-decl.h : s-gtype ; @true gt-java-expr.h gt-java-jcf-parse.h gt-java-jcf-write.h : s-gtype ; @true gt-java-lang.h gt-java-mangle.h gt-java-parse.h : s-gtype ; @true ! gt-java-builtins.h gtype-java.h : s-gtype ; @true # Executables built by this Makefile: JAVA_OBJS = java/parse.o java/class.o java/decl.o java/expr.o \ java/constants.o java/lang.o java/typeck.o java/except.o java/verify.o \ ! java/zextract.o java/jcf-io.o java/win32-host.o java/jcf-parse.o \ ! java/mangle.o java/mangle_name.o java/builtins.o \ java/jcf-write.o java/buffer.o java/check-init.o java/jcf-depend.o \ java/jcf-path.o java/xref.o java/boehm.o java/java-tree-inline.o mkdeps.o ! GCJH_OBJS = java/gjavah.o java/jcf-io.o java/win32-host.o java/jcf-depend.o \ ! java/jcf-path.o java/zextract.o version.o mkdeps.o errors.o JVSCAN_OBJS = java/parse-scan.o java/jv-scan.o version.o ! JCFDUMP_OBJS = java/jcf-dump.o java/jcf-io.o java/win32-host.o java/jcf-depend.o \ ! java/jcf-path.o java/zextract.o errors.o version.o mkdeps.o JVGENMAIN_OBJS = java/jvgenmain.o java/mangle_name.o errors.o # Use loose warnings for this front end. ! java-warn = jc1$(exeext): $(JAVA_OBJS) $(BACKEND) $(LIBDEPS) rm -f $@ --- 98,127 ---- gt-java-class.h gt-java-constants.h gt-java-decl.h : s-gtype ; @true gt-java-expr.h gt-java-jcf-parse.h gt-java-jcf-write.h : s-gtype ; @true gt-java-lang.h gt-java-mangle.h gt-java-parse.h : s-gtype ; @true ! gt-java-builtins.h gtype-java.h gt-java-resource.h : s-gtype ; @true # Executables built by this Makefile: JAVA_OBJS = java/parse.o java/class.o java/decl.o java/expr.o \ java/constants.o java/lang.o java/typeck.o java/except.o java/verify.o \ ! java/zextract.o java/jcf-io.o java/win32-host.o java/jcf-parse.o java/mangle.o \ ! java/mangle_name.o java/builtins.o java/resource.o \ java/jcf-write.o java/buffer.o java/check-init.o java/jcf-depend.o \ java/jcf-path.o java/xref.o java/boehm.o java/java-tree-inline.o mkdeps.o ! GCJH_OBJS = java/gjavah.o java/jcf-io.o java/jcf-depend.o java/jcf-path.o \ ! java/win32-host.o java/zextract.o version.o mkdeps.o errors.o ggc-none.o JVSCAN_OBJS = java/parse-scan.o java/jv-scan.o version.o ! JCFDUMP_OBJS = java/jcf-dump.o java/jcf-io.o java/jcf-depend.o java/jcf-path.o \ ! java/win32-host.o java/zextract.o errors.o version.o mkdeps.o ggc-none.o JVGENMAIN_OBJS = java/jvgenmain.o java/mangle_name.o errors.o # Use loose warnings for this front end. ! java-warn = $(WERROR) ! # String length warnings ! jvspec.o-warn = -Wno-error jc1$(exeext): $(JAVA_OBJS) $(BACKEND) $(LIBDEPS) rm -f $@ *************** java.all.cross: $(GCJ)-cross$(exeext) *** 154,165 **** java.start.encap: $(GCJ)$(exeext) java.rest.encap: ! java.info: $(srcdir)/java/gcj.info ! java.dvi: java/gcj.dvi ! java.generated-manpages: $(srcdir)/java/gcj.1 $(srcdir)/java/gcjh.1 \ ! $(srcdir)/java/jv-scan.1 $(srcdir)/java/jcf-dump.1 \ ! $(srcdir)/java/gij.1 $(srcdir)/java/jv-convert.1 \ ! $(srcdir)/java/rmic.1 $(srcdir)/java/rmiregistry.1 # Install hooks: # jc1, gcj, jvgenmain, and gcjh are installed elsewhere as part --- 153,180 ---- java.start.encap: $(GCJ)$(exeext) java.rest.encap: ! ! java.tags: force ! cd $(srcdir)/java; etags -o TAGS.sub *.y *.c *.h --language=none \ ! --regex='/DEFTREECODE [(]\([A-Z_]+\)/\1/' java-tree.def; \ ! etags --include TAGS.sub --include ../TAGS.sub ! ! ! java.info: doc/gcj.info ! ! java.srcinfo: doc/gcj.info ! -cp -p $^ $(srcdir)/doc ! ! dvi:: doc/gcj.dvi ! JAVA_MANFILES = doc/gcj.1 doc/gcjh.1 doc/jv-scan.1 doc/jcf-dump.1 doc/gij.1 \ ! doc/jv-convert.1 doc/rmic.1 doc/rmiregistry.1 ! ! java.man: $(JAVA_MANFILES) ! ! java.srcman: $(JAVA_MANFILES) ! -cp -p $^ $(srcdir)/doc ! ! check-java : # Install hooks: # jc1, gcj, jvgenmain, and gcjh are installed elsewhere as part *************** java.generated-manpages: $(srcdir)/java/ *** 168,183 **** # Nothing to do here. java.install-normal: java.install-common: installdirs -if [ -f $(GCJ)$(exeext) ]; then \ if [ -f $(GCJ)-cross$(exeext) ]; then \ ! rm -f $(DESTDIR)$(bindir)/$(JAVA_CROSS_NAME)$(exeext); \ ! $(INSTALL_PROGRAM) $(GCJ)-cross$(exeext) $(DESTDIR)$(bindir)/$(JAVA_CROSS_NAME)$(exeext); \ ! chmod a+x $(DESTDIR)$(bindir)/$(JAVA_CROSS_NAME)$(exeext); \ else \ - rm -f $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \ - $(INSTALL_PROGRAM) $(GCJ)$(exeext) $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \ - chmod a+x $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \ rm -f $(DESTDIR)$(bindir)/$(JAVA_TARGET_INSTALL_NAME)$(exeext); \ ( cd $(DESTDIR)$(bindir) && \ $(LN) $(JAVA_INSTALL_NAME)$(exeext) $(JAVA_TARGET_INSTALL_NAME)$(exeext) ); \ --- 183,201 ---- # Nothing to do here. java.install-normal: + # Install gcj as well as the target-independent tools. + # For a native build, we special-case gcjh and also install + # its explicitly-prefixed variant. This allows us to write + # portable makefiles for both cross builds (where gcjh *must* + # be explicitly prefixed) and native builds. java.install-common: installdirs -if [ -f $(GCJ)$(exeext) ]; then \ + rm -f $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \ + $(INSTALL_PROGRAM) $(GCJ)$(exeext) $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \ + chmod a+x $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \ if [ -f $(GCJ)-cross$(exeext) ]; then \ ! true; \ else \ rm -f $(DESTDIR)$(bindir)/$(JAVA_TARGET_INSTALL_NAME)$(exeext); \ ( cd $(DESTDIR)$(bindir) && \ $(LN) $(JAVA_INSTALL_NAME)$(exeext) $(JAVA_TARGET_INSTALL_NAME)$(exeext) ); \ *************** java.install-common: installdirs *** 189,194 **** --- 207,217 ---- rm -f $(DESTDIR)$(bindir)/$$tool_transformed_name$(exeext); \ $(INSTALL_PROGRAM) $$tool$(exeext) $(DESTDIR)$(bindir)/$$tool_transformed_name$(exeext); \ chmod a+x $(DESTDIR)$(bindir)/$$tool_transformed_name$(exeext); \ + if [ $$tool = gcjh ]; then \ + rm -f $(DESTDIR)$(bindir)/$(GCJH_TARGET_INSTALL_NAME)$(exeext); \ + ( cd $(DESTDIR)$(bindir) && \ + $(LN) $$tool_transformed_name$(exeext) $(GCJH_TARGET_INSTALL_NAME)$(exeext) ); \ + fi; \ fi ; \ done *************** java.install-man: *** 196,226 **** java.uninstall: -rm -rf $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext) - -rm -rf $(DESTDIR)$(bindir)/$(JAVA_CROSS_NAME)$(exeext) -rm -rf $(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext) - -rm -rf $(DESTDIR)$(man1dir)/$(JAVA_CROSS_NAME)$(man1ext) -rm -rf $(DESTDIR)$(man1dir)/gcjh$(man1ext) -rm -rf $(DESTDIR)$(man1dir)/jv-scan$(man1ext) -rm -rf $(DESTDIR)$(man1dir)/jcf-dump$(man1ext) -rm -rf $(DESTDIR)$(man1dir)/gij$(man1ext) -rm -rf $(DESTDIR)$(man1dir)/jv-convert$(man1ext) ! java.install-info: installdirs ! if [ -f jc1$(exeext) ] ; then \ ! if [ -f $(srcdir)/java/gcj.info ]; then \ ! rm -f $(DESTDIR)$(infodir)/gcj.info*; \ ! for f in $(srcdir)/java/gcj.info*; do \ ! realfile=`echo $$f | sed -e 's|.*/\([^/]*\)$$|\1|'`; \ ! $(INSTALL_DATA) $$f $(DESTDIR)$(infodir)/$$realfile; \ ! done; \ ! chmod a-x $(DESTDIR)$(infodir)/gcj.info*; \ ! else true; fi; \ ! else true; fi ! -if [ -f jc1$(exeext) ] && [ -f $(DESTDIR)$(infodir)/gcj.info ]; then \ ! if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ ! install-info --dir-file=$(DESTDIR)$(infodir)/dir $(DESTDIR)$(infodir)/gcj.info; \ ! else true; fi; \ ! else true; fi # # Clean hooks: --- 219,232 ---- java.uninstall: -rm -rf $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext) -rm -rf $(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext) -rm -rf $(DESTDIR)$(man1dir)/gcjh$(man1ext) -rm -rf $(DESTDIR)$(man1dir)/jv-scan$(man1ext) -rm -rf $(DESTDIR)$(man1dir)/jcf-dump$(man1ext) -rm -rf $(DESTDIR)$(man1dir)/gij$(man1ext) -rm -rf $(DESTDIR)$(man1dir)/jv-convert$(man1ext) ! install-info:: $(DESTDIR)$(infodir)/gcj.info # # Clean hooks: *************** java.install-info: installdirs *** 228,249 **** # We just have to delete files specific to us. java.mostlyclean: -rm -f java/*$(objext) $(DEMANGLER_PROG) -rm -f java/*$(coverageexts) -rm -f jc1$(exeext) $(GCJ)$(exeext) jvgenmain$(exeext) gcjh$(exeext) jv-scan$(exeext) jcf-dump$(exeext) s-java java.clean: java.distclean: -rm -f java/config.status java/Makefile ! -rm -f java/parse.output ! java.extraclean: java.maintainer-clean: ! -rm -f java/parse.c java/parse-scan.c java/parse.output java/y.tab.c ! -rm -f $(srcdir)/java/gcj.1 $(srcdir)/java/gcjh.1 ! -rm -f $(srcdir)/java/jv-scan.1 $(srcdir)/java/jcf-dump.1 ! -rm -f $(srcdir)/java/gij.1 ! -rm -f $(srcdir)/java/jv-convert.1 ! -rm -f $(srcdir)/java/rmic.1 ! -rm -f $(srcdir)/java/rmiregistry.1 # # Stage hooks: # The main makefile has already created stage?/java. --- 234,254 ---- # We just have to delete files specific to us. java.mostlyclean: + -rm -f java/parse.c java/parse-scan.c -rm -f java/*$(objext) $(DEMANGLER_PROG) -rm -f java/*$(coverageexts) -rm -f jc1$(exeext) $(GCJ)$(exeext) jvgenmain$(exeext) gcjh$(exeext) jv-scan$(exeext) jcf-dump$(exeext) s-java java.clean: java.distclean: -rm -f java/config.status java/Makefile ! -rm -f java/parse.output java/y.tab.c java.maintainer-clean: ! -rm -f $(docobjdir)/gcj.1 $(docobjdir)/gcjh.1 ! -rm -f $(docobjdir)/jv-scan.1 $(docobjdir)/jcf-dump.1 ! -rm -f $(docobjdir)/gij.1 ! -rm -f $(docobjdir)/jv-convert.1 ! -rm -f $(docobjdir)/rmic.1 ! -rm -f $(docobjdir)/rmiregistry.1 # # Stage hooks: # The main makefile has already created stage?/java. *************** java.stage3: stage3-start *** 256,443 **** -mv java/*$(objext) stage3/java java.stage4: stage4-start -mv java/*$(objext) stage4/java # # .o:.h dependencies. JAVA_TREE_H = $(TREE_H) $(HASHTAB_H) java/java-tree.h java/java-tree.def JAVA_LEX_C = java/lex.c java/keyword.h java/chartables.h ! java/parse.o: java/parse.c java/jcf-reader.c $(CONFIG_H) $(SYSTEM_H) \ ! function.h $(JAVA_TREE_H) $(JAVA_LEX_C) java/parse.h java/lex.h $(GGC_H) \ ! debug.h gt-java-parse.h gtype-java.h ! java/jcf-dump.o: $(CONFIG_H) $(SYSTEM_H) $(JAVA_TREE_H) java/jcf-dump.c \ ! java/jcf-reader.c java/jcf.h java/javaop.h java/javaop.def version.h ! java/gjavah.o: $(CONFIG_H) $(SYSTEM_H) $(JAVA_TREE_H) java/gjavah.c \ ! java/jcf-reader.c java/jcf.h java/javaop.h version.h ! java/boehm.o: java/boehm.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(JAVA_TREE_H) \ ! java/parse.h toplev.h ! java/buffer.o: java/buffer.c $(CONFIG_H) java/buffer.h $(SYSTEM_H) toplev.h ! java/builtins.o: java/builtins.c $(CONFIG_H) $(SYSTEM_H) $(JAVA_TREE_H) \ ! $(GGC_H) flags.h builtin-types.def langhooks.h gt-java-builtins.h ! java/check-init.o: java/check-init.c $(CONFIG_H) \ ! $(JAVA_TREE_H) $(SYSTEM_H) toplev.h ! java/class.o: java/class.c $(CONFIG_H) $(JAVA_TREE_H) $(RTL_H) java/jcf.h \ ! java/parse.h toplev.h $(SYSTEM_H) output.h $(GGC_H) $(TARGET_H) function.h \ ! gt-java-class.h java/constants.o: java/constants.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \ ! toplev.h $(SYSTEM_H) $(GGC_H) gt-java-constants.h java/decl.o: java/decl.c $(CONFIG_H) $(JAVA_TREE_H) $(RTL_H) java/jcf.h \ ! toplev.h flags.h $(SYSTEM_H) function.h expr.h libfuncs.h except.h \ ! java/java-except.h $(GGC_H) real.h gt-java-decl.h java/except.o: java/except.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h real.h \ $(RTL_H) java/javaop.h java/java-opcodes.h except.h java/java-except.h \ ! toplev.h $(SYSTEM_H) function.h java/expr.o: java/expr.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h real.h \ $(RTL_H) $(EXPR_H) java/javaop.h java/java-opcodes.h except.h \ java/java-except.h java/java-except.h java/parse.h toplev.h \ ! $(SYSTEM_H) $(GGC_H) gt-java-expr.h ! java/java-tree-inline.o: tree-inline.c $(CONFIG_H) $(SYSTEM_H) \ ! $(TREE_H) $(RTL_H) expr.h flags.h params.h input.h insn-config.h \ ! $(INTEGRATE_H) $(VARRAY_H) $(HASHTAB_H) $(SPLAY_TREE_H) toplev.h \ ! langhooks.h $(C_COMMON_H) $(srcdir)/tree-inline.h ! $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ ! -DINLINER_FOR_JAVA=1 \ ! $(srcdir)/tree-inline.c -o $@ ! java/jcf-depend.o: java/jcf-depend.c $(CONFIG_H) $(SYSTEM_H) java/jcf.h java/jcf-parse.o: java/jcf-parse.c $(CONFIG_H) $(JAVA_TREE_H) flags.h \ ! input.h java/java-except.h $(SYSTEM_H) toplev.h java/parse.h $(GGC_H) \ ! debug.h real.h gt-java-jcf-parse.h ! java/win32-host.o: java/win32-host.c $(CONFIG_H) $(SYSTEM_H) java/jcf.h java/jcf-write.o: java/jcf-write.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \ $(RTL_H) java/java-opcodes.h java/parse.h java/buffer.h $(SYSTEM_H) \ ! toplev.h $(GGC_H) gt-java-jcf-write.h ! java/jv-scan.o: java/jv-scan.c $(CONFIG_H) $(SYSTEM_H) version.h ! java/jvgenmain.o: java/jvgenmain.c $(CONFIG_H) $(JAVA_TREE_H) $(SYSTEM_H) java/lang.o: java/lang.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h input.h \ ! toplev.h $(SYSTEM_H) $(RTL_H) $(EXPR_H) diagnostic.h langhooks.h \ ! $(LANGHOOKS_DEF_H) gt-java-lang.h java/mangle.o: java/mangle.c $(CONFIG_H) java/jcf.h $(JAVA_TREE_H) $(SYSTEM_H) \ ! toplev.h $(GGC_H) gt-java-mangle.h java/mangle_name.o: java/mangle_name.c $(CONFIG_H) java/jcf.h $(JAVA_TREE_H) \ ! $(SYSTEM_H) toplev.h $(GGC_H) ! java/parse-scan.o: $(CONFIG_H) $(SYSTEM_H) toplev.h $(JAVA_LEX_C) java/parse.h \ ! java/lex.h java/typeck.o: java/typeck.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \ ! java/convert.h toplev.h $(SYSTEM_H) $(GGC_H) real.h java/verify.o: java/verify.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \ ! java/javaop.h java/java-opcodes.h java/java-except.h toplev.h $(SYSTEM_H) java/xref.o: java/xref.c java/xref.h $(CONFIG_H) $(JAVA_TREE_H) toplev.h \ ! $(SYSTEM_H) ! java/zextract.o: java/zextract.c $(CONFIG_H) $(SYSTEM_H) java/zipfile.h # jcf-io.o needs $(ZLIBINC) added to cflags. ! java/jcf-io.o: java/jcf-io.c $(CONFIG_H) $(SYSTEM_H) $(JAVA_TREE_H) $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(ZLIBINC) \ $(srcdir)/java/jcf-io.c $(OUTPUT_OPTION) # jcf-path.o needs a -D. ! java/jcf-path.o: java/jcf-path.c $(CONFIG_H) $(SYSTEM_H) java/jcf.h $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ -DLIBGCJ_ZIP_FILE='"$(datadir)/java/libgcj-$(version).jar"' \ -DDEFAULT_TARGET_VERSION=\"$(version)\" \ $(srcdir)/java/jcf-path.c $(OUTPUT_OPTION) # Documentation ! $(srcdir)/java/gcj.info: $(srcdir)/java/gcj.texi \ ! $(srcdir)/doc/include/fdl.texi $(srcdir)/doc/include/gpl.texi \ ! $(srcdir)/doc/include/gcc-common.texi if test "x$(BUILD_INFO)" = xinfo; then \ ! rm -f $(srcdir)/java/gcc.info*; \ ! cd $(srcdir)/java && $(MAKEINFO) -I../doc/include -o gcj.info gcj.texi; \ else true; fi ! java/gcj.dvi: $(srcdir)/java/gcj.texi $(srcdir)/doc/include/fdl.texi \ ! $(srcdir)/doc/include/gpl.texi $(srcdir)/doc/include/gcc-common.texi ! s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ ! cd java && $(TEXI2DVI) -I $$s/doc/include $$s/java/gcj.texi ! ! $(srcdir)/java/gcj.1: $(srcdir)/java/gcj.texi ! -$(TEXI2POD) -D gcj < $(srcdir)/java/gcj.texi > java/gcj.pod ! -($(POD2MAN) --section=1 java/gcj.pod > java/gcj.1.T$$$$ && \ ! mv -f java/gcj.1.T$$$$ $(srcdir)/java/gcj.1) || \ ! (rm -f java/gcj.1.T$$$$ && exit 1) ! -rm -f java/gcj.pod ! ! $(srcdir)/java/gcjh.1: $(srcdir)/java/gcj.texi ! -$(TEXI2POD) -D gcjh < $(srcdir)/java/gcj.texi > java/gcjh.pod ! -($(POD2MAN) --section=1 java/gcjh.pod > java/gcjh.1.T$$$$ && \ ! mv -f java/gcjh.1.T$$$$ $(srcdir)/java/gcjh.1) || \ ! (rm -f java/gcjh.1.T$$$$ && exit 1) ! -rm -f java/gcjh.pod ! ! $(srcdir)/java/jv-scan.1: $(srcdir)/java/gcj.texi ! -$(TEXI2POD) -D jv-scan < $(srcdir)/java/gcj.texi > java/jv-scan.pod ! -($(POD2MAN) --section=1 java/jv-scan.pod > java/jv-scan.1.T$$$$ && \ ! mv -f java/jv-scan.1.T$$$$ $(srcdir)/java/jv-scan.1) || \ ! (rm -f java/jv-scan.1.T$$$$ && exit 1) ! -rm -f java/jv-scan.pod ! ! $(srcdir)/java/jcf-dump.1: $(srcdir)/java/gcj.texi ! -$(TEXI2POD) -D jcf-dump < $(srcdir)/java/gcj.texi > java/jcf-dump.pod ! -($(POD2MAN) --section=1 java/jcf-dump.pod > java/jcf-dump.1.T$$$$ && \ ! mv -f java/jcf-dump.1.T$$$$ $(srcdir)/java/jcf-dump.1) || \ ! (rm -f java/jcf-dump.1.T$$$$ && exit 1) ! -rm -f java/jcf-dump.pod ! ! $(srcdir)/java/gij.1: $(srcdir)/java/gcj.texi ! -$(TEXI2POD) -D gij < $(srcdir)/java/gcj.texi > java/gij.pod ! -($(POD2MAN) --section=1 java/gij.pod > java/gij.1.T$$$$ && \ ! mv -f java/gij.1.T$$$$ $(srcdir)/java/gij.1) || \ ! (rm -f java/gij.1.T$$$$ && exit 1) ! -rm -f java/gij.pod ! ! $(srcdir)/java/jv-convert.1: $(srcdir)/java/gcj.texi ! -$(TEXI2POD) -D jv-convert < $(srcdir)/java/gcj.texi > java/jv-convert.pod ! -($(POD2MAN) --section=1 java/jv-convert.pod > java/jv-convert.1.T$$$$ && \ ! mv -f java/jv-convert.1.T$$$$ $(srcdir)/java/jv-convert.1) || \ ! (rm -f java/jv-convert.1.T$$$$ && exit 1) ! -rm -f java/jv-convert.pod ! $(srcdir)/java/rmic.1: $(srcdir)/java/gcj.texi ! -$(TEXI2POD) -D rmic < $(srcdir)/java/gcj.texi > java/rmic.pod ! -($(POD2MAN) --section=1 java/rmic.pod > java/rmic.1.T$$$$ && \ ! mv -f java/rmic.1.T$$$$ $(srcdir)/java/rmic.1) || \ ! (rm -f java/rmic.1.T$$$$ && exit 1) ! -rm -f java/rmic.pod ! $(srcdir)/java/rmiregistry.1: $(srcdir)/java/gcj.texi ! -$(TEXI2POD) -D rmiregistry < $(srcdir)/java/gcj.texi > java/rmiregistry.pod ! -($(POD2MAN) --section=1 java/rmiregistry.pod > java/rmiregistry.1.T$$$$ && \ ! mv -f java/rmiregistry.1.T$$$$ $(srcdir)/java/rmiregistry.1) || \ ! (rm -f java/rmiregistry.1.T$$$$ && exit 1) ! -rm -f java/rmiregistry.pod # Install the man pages. ! java.install-man: installdirs $(GENERATED_JAVA_MANPAGES) ! -if [ -f $(GCJ)$(exeext) ]; then \ ! if [ -f $(GCJ)-cross$(exeext) ]; then \ ! rm -f $(DESTDIR)$(man1dir)/$(JAVA_CROSS_NAME)$(man1ext); \ ! $(INSTALL_DATA) $(srcdir)/java/gcj.1 $(DESTDIR)$(man1dir)/$(JAVA_CROSS_NAME)$(man1ext); \ ! chmod a-x $(DESTDIR)$(man1dir)/$(JAVA_CROSS_NAME)$(man1ext); \ ! else \ ! rm -f $(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext); \ ! $(INSTALL_DATA) $(srcdir)/java/gcj.1 $(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext); \ ! chmod a-x $(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext); \ ! fi ; \ ! fi ! -rm -f $(DESTDIR)$(man1dir)/gcjh$(man1ext) ! -$(INSTALL_DATA) $(srcdir)/java/gcjh.1 $(DESTDIR)$(man1dir)/gcjh$(man1ext) ! -chmod a-x $(DESTDIR)$(man1dir)/gcjh$(man1ext) ! -rm -f $(DESTDIR)$(man1dir)/jv-scan$(man1ext) ! -$(INSTALL_DATA) $(srcdir)/java/jv-scan.1 $(DESTDIR)$(man1dir)/jv-scan$(man1ext) ! -chmod a-x $(DESTDIR)$(man1dir)/jv-scan$(man1ext) ! -rm -f $(DESTDIR)$(man1dir)/jcf-dump$(man1ext) ! -$(INSTALL_DATA) $(srcdir)/java/jcf-dump.1 $(DESTDIR)$(man1dir)/jcf-dump$(man1ext) ! -chmod a-x $(DESTDIR)$(man1dir)/jcf-dump$(man1ext) ! -rm -f $(DESTDIR)$(man1dir)/gij$(man1ext) ! -$(INSTALL_DATA) $(srcdir)/java/gij.1 $(DESTDIR)$(man1dir)/gij$(man1ext) ! -chmod a-x $(DESTDIR)$(man1dir)/gij$(man1ext) ! -rm -f $(DESTDIR)$(man1dir)/jv-convert$(man1ext) ! -$(INSTALL_DATA) $(srcdir)/java/jv-convert.1 $(DESTDIR)$(man1dir)/jv-convert$(man1ext) ! -chmod a-x $(DESTDIR)$(man1dir)/jv-convert$(man1ext) ! -rm -f $(DESTDIR)$(man1dir)/rmic$(man1ext) ! -$(INSTALL_DATA) $(srcdir)/java/rmic.1 $(DESTDIR)$(man1dir)/rmic$(man1ext) ! -chmod a-x $(DESTDIR)$(man1dir)/rmic$(man1ext) ! -rm -f $(DESTDIR)$(man1dir)/rmiregistry$(man1ext) ! -$(INSTALL_DATA) $(srcdir)/java/rmiregistry.1 $(DESTDIR)$(man1dir)/rmiregistry$(man1ext) ! -chmod a-x $(DESTDIR)$(man1dir)/rmiregistry$(man1ext) --- 261,417 ---- -mv java/*$(objext) stage3/java java.stage4: stage4-start -mv java/*$(objext) stage4/java + java.stageprofile: stageprofile-start + -mv java/*$(objext) stageprofile/java + java.stagefeedback: stageprofile-start + -mv java/*$(objext) stagefeedback/java # # .o:.h dependencies. JAVA_TREE_H = $(TREE_H) $(HASHTAB_H) java/java-tree.h java/java-tree.def JAVA_LEX_C = java/lex.c java/keyword.h java/chartables.h ! java/jcf-dump.o: $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(JAVA_TREE_H) \ ! java/jcf-dump.c java/jcf-reader.c java/jcf.h java/javaop.h java/javaop.def \ ! version.h $(GGC_H) ! java/gjavah.o: $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(JAVA_TREE_H) \ ! java/gjavah.c java/jcf-reader.c java/jcf.h java/javaop.h version.h $(GGC_H) ! java/boehm.o: java/boehm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ ! $(TREE_H) $(JAVA_TREE_H) java/parse.h toplev.h ! java/buffer.o: java/buffer.c $(CONFIG_H) java/buffer.h $(SYSTEM_H) coretypes.h \ ! $(TM_H) toplev.h ! java/builtins.o: java/builtins.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ ! $(JAVA_TREE_H) $(GGC_H) flags.h langhooks.h gt-java-builtins.h ! java/check-init.o: java/check-init.c $(CONFIG_H) $(JAVA_TREE_H) $(SYSTEM_H) \ ! coretypes.h $(TM_H) toplev.h ! java/class.o: java/class.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ ! $(JAVA_TREE_H) $(RTL_H) java/jcf.h java/parse.h toplev.h output.h $(GGC_H) \ ! $(TARGET_H) function.h gt-java-class.h java/constants.o: java/constants.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \ ! toplev.h $(SYSTEM_H) coretypes.h $(TM_H) $(GGC_H) gt-java-constants.h java/decl.o: java/decl.c $(CONFIG_H) $(JAVA_TREE_H) $(RTL_H) java/jcf.h \ ! toplev.h flags.h $(SYSTEM_H) coretypes.h $(TM_H) function.h expr.h \ ! libfuncs.h except.h java/java-except.h $(GGC_H) real.h gt-java-decl.h java/except.o: java/except.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h real.h \ $(RTL_H) java/javaop.h java/java-opcodes.h except.h java/java-except.h \ ! toplev.h $(SYSTEM_H) coretypes.h $(TM_H) function.h java/expr.o: java/expr.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h real.h \ $(RTL_H) $(EXPR_H) java/javaop.h java/java-opcodes.h except.h \ java/java-except.h java/java-except.h java/parse.h toplev.h \ ! $(SYSTEM_H) coretypes.h $(TM_H) $(GGC_H) gt-java-expr.h ! java/jcf-depend.o: java/jcf-depend.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ ! $(TM_H) java/jcf.h java/jcf-parse.o: java/jcf-parse.c $(CONFIG_H) $(JAVA_TREE_H) flags.h \ ! input.h java/java-except.h $(SYSTEM_H) coretypes.h $(TM_H) toplev.h \ ! java/parse.h $(GGC_H) debug.h real.h gt-java-jcf-parse.h $(TM_P_H) java/jcf-write.o: java/jcf-write.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \ $(RTL_H) java/java-opcodes.h java/parse.h java/buffer.h $(SYSTEM_H) \ ! coretypes.h $(TM_H) toplev.h $(GGC_H) gt-java-jcf-write.h $(TM_P_H) ! java/jv-scan.o: java/jv-scan.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ ! version.h ! java/jvgenmain.o: java/jvgenmain.c $(CONFIG_H) $(JAVA_TREE_H) $(SYSTEM_H) \ ! coretypes.h $(TM_H) java/lang.o: java/lang.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h input.h \ ! toplev.h $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(EXPR_H) diagnostic.h \ ! langhooks.h $(LANGHOOKS_DEF_H) gt-java-lang.h opts.h options.h java/mangle.o: java/mangle.c $(CONFIG_H) java/jcf.h $(JAVA_TREE_H) $(SYSTEM_H) \ ! coretypes.h $(TM_H) toplev.h $(GGC_H) gt-java-mangle.h java/mangle_name.o: java/mangle_name.c $(CONFIG_H) java/jcf.h $(JAVA_TREE_H) \ ! $(SYSTEM_H) coretypes.h $(TM_H) toplev.h $(GGC_H) ! java/resource.o: java/resource.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ ! $(JAVA_TREE_H) $(RTL_H) java/jcf.h java/parse.h toplev.h output.h $(GGC_H) \ ! $(TARGET_H) function.h gt-java-resource.h expr.h java/typeck.o: java/typeck.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \ ! java/convert.h toplev.h $(SYSTEM_H) coretypes.h $(TM_H) $(GGC_H) real.h ! java/win32-host.o: java/win32-host.c $(CONFIG_H) $(SYSTEM_H) java/jcf.h java/verify.o: java/verify.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \ ! java/javaop.h java/java-opcodes.h java/java-except.h toplev.h $(SYSTEM_H) \ ! coretypes.h $(TM_H) java/xref.o: java/xref.c java/xref.h $(CONFIG_H) $(JAVA_TREE_H) toplev.h \ ! $(SYSTEM_H) coretypes.h $(TM_H) ! java/zextract.o: java/zextract.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ ! java/zipfile.h ! java/parse-scan.o: java/parse-scan.c $(CONFIG_H) $(SYSTEM_H) \ ! coretypes.h $(TM_H) toplev.h $(JAVA_LEX_C) java/parse.h java/lex.h input.h ! java/parse.o: java/parse.c java/jcf-reader.c $(CONFIG_H) $(SYSTEM_H) \ ! coretypes.h $(TM_H) function.h $(JAVA_TREE_H) $(JAVA_LEX_C) java/parse.h \ ! java/lex.h input.h $(GGC_H) debug.h gt-java-parse.h gtype-java.h # jcf-io.o needs $(ZLIBINC) added to cflags. ! java/jcf-io.o: java/jcf-io.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ ! $(JAVA_TREE_H) $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(ZLIBINC) \ $(srcdir)/java/jcf-io.c $(OUTPUT_OPTION) # jcf-path.o needs a -D. ! java/jcf-path.o: java/jcf-path.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ ! java/jcf.h $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ -DLIBGCJ_ZIP_FILE='"$(datadir)/java/libgcj-$(version).jar"' \ -DDEFAULT_TARGET_VERSION=\"$(version)\" \ $(srcdir)/java/jcf-path.c $(OUTPUT_OPTION) + # jcf-tree-inline.o needs a -D. + java/java-tree-inline.o: tree-inline.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ + $(TM_H) $(TREE_H) $(RTL_H) expr.h flags.h params.h input.h insn-config.h \ + $(INTEGRATE_H) $(VARRAY_H) $(HASHTAB_H) $(SPLAY_TREE_H) toplev.h \ + langhooks.h $(C_COMMON_H) $(srcdir)/tree-inline.h + $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ + -DINLINER_FOR_JAVA=1 \ + $(srcdir)/tree-inline.c -o $@ + # Documentation ! doc/gcj.info: java/gcj.texi $(docdir)/include/fdl.texi \ ! $(docdir)/include/gpl.texi $(docdir)/include/gcc-common.texi if test "x$(BUILD_INFO)" = xinfo; then \ ! rm -f doc/gcj.info*; \ ! $(MAKEINFO) $(MAKEINFOFLAGS) -I $(docdir)/include -o $@ $<; \ else true; fi ! doc/gcj.dvi: java/gcj.texi $(docdir)/include/fdl.texi \ ! $(docdir)/include/gpl.texi $(docdir)/include/gcc-common.texi ! $(TEXI2DVI) -I $(abs_docdir)/include -o $@ $< ! .INTERMEDIATE: gcj.pod gcjh.pod jv-scan.pod jcf-dump.pod gij.pod \ ! jv-convert.pod rmic.pod rmiregistry.pod ! gcj.pod: java/gcj.texi ! -$(TEXI2POD) -D gcj < $< > $@ ! gcjh.pod: java/gcj.texi ! -$(TEXI2POD) -D gcjh < $< > $@ ! jv-scan.pod: java/gcj.texi ! -$(TEXI2POD) -D jv-scan < $< > $@ ! jcf-dump.pod: java/gcj.texi ! -$(TEXI2POD) -D jcf-dump < $< > $@ ! gij.pod: java/gcj.texi ! -$(TEXI2POD) -D gij < $< > $@ ! jv-convert.pod: java/gcj.texi ! -$(TEXI2POD) -D jv-convert < $< > $@ ! rmic.pod: java/gcj.texi ! -$(TEXI2POD) -D rmic < $< > $@ ! rmiregistry.pod: java/gcj.texi ! -$(TEXI2POD) -D rmiregistry < $< > $@ # Install the man pages. ! java.install-man: installdirs \ ! $(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext) \ ! $(JAVA_TARGET_INDEPENDENT_BIN_TOOLS:%=doc/%.1) \ ! doc/gij.1 doc/jv-convert.1 doc/rmic.1 doc/rmiregistry.1 ! for tool in $(JAVA_TARGET_INDEPENDENT_BIN_TOOLS) \ ! gij jv-convert rmic rmiregistry ; do \ ! tool_transformed_name=`echo $$tool|sed '$(program_transform_name)'`; \ ! man_name=$(DESTDIR)$(man1dir)/$${tool_transformed_name}$(man1ext); \ ! rm -f $$man_name ; \ ! for source_name in doc/$${tool}.1 $(srcdir)/doc/$${tool}.1 ; do \ ! if test -f $$source_name; then \ ! $(INSTALL_DATA) $$source_name $$man_name; \ ! break; \ ! fi; \ ! done ; \ ! chmod a-x $$man_name ; \ ! done ! ! $(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext): doc/gcj.1 ! -rm -f $@ ! -$(INSTALL_DATA) $< $@ ! -chmod a-x $@ diff -Nrc3pad gcc-3.3.3/gcc/java/mangle.c gcc-3.4.0/gcc/java/mangle.c *** gcc-3.3.3/gcc/java/mangle.c 2002-09-21 02:19:44.000000000 +0000 --- gcc-3.4.0/gcc/java/mangle.c 2003-10-22 18:00:06.000000000 +0000 *************** *** 1,21 **** /* Functions related to mangling class names for the GNU compiler for the Java(TM) language. ! Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,22 ---- /* Functions related to mangling class names for the GNU compiler for the Java(TM) language. ! Copyright (C) 1998, 1999, 2001, 2002, 2003 ! Free Software Foundation, Inc. ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 27,32 **** --- 28,35 ---- #include "config.h" #include "system.h" + #include "coretypes.h" + #include "tm.h" #include "jcf.h" #include "tree.h" #include "java-tree.h" *************** The Free Software Foundation is independ *** 35,62 **** #include "obstack.h" #include "ggc.h" ! static void mangle_field_decl PARAMS ((tree)); ! static void mangle_method_decl PARAMS ((tree)); ! static void mangle_type PARAMS ((tree)); ! static void mangle_pointer_type PARAMS ((tree)); ! static void mangle_array_type PARAMS ((tree)); ! static int mangle_record_type PARAMS ((tree, int)); ! static int find_compression_pointer_match PARAMS ((tree)); ! static int find_compression_array_match PARAMS ((tree)); ! static int find_compression_record_match PARAMS ((tree, tree *)); ! static int find_compression_array_template_match PARAMS ((tree)); ! static void set_type_package_list PARAMS ((tree)); ! static int entry_match_pointer_p PARAMS ((tree, int)); ! static void emit_compression_string PARAMS ((int)); ! static void init_mangling PARAMS ((struct obstack *)); ! static tree finish_mangling PARAMS ((void)); ! static void compression_table_add PARAMS ((tree)); ! static void mangle_member_name PARAMS ((tree)); /* We use an incoming obstack, always to be provided to the interface functions. */ --- 38,65 ---- #include "obstack.h" #include "ggc.h" ! static void mangle_field_decl (tree); ! static void mangle_method_decl (tree); ! static void mangle_type (tree); ! static void mangle_pointer_type (tree); ! static void mangle_array_type (tree); ! static int mangle_record_type (tree, int); ! static int find_compression_pointer_match (tree); ! static int find_compression_array_match (tree); ! static int find_compression_record_match (tree, tree *); ! static int find_compression_array_template_match (tree); ! static void set_type_package_list (tree); ! static int entry_match_pointer_p (tree, int); ! static void emit_compression_string (int); ! static void init_mangling (struct obstack *); ! static tree finish_mangling (void); ! static void compression_table_add (tree); ! static void mangle_member_name (tree); /* We use an incoming obstack, always to be provided to the interface functions. */ *************** struct obstack *mangle_obstack; *** 64,76 **** #define MANGLE_RAW_STRING(S) \ obstack_grow (mangle_obstack, (S), sizeof (S)-1) /* This is the mangling interface: a decl, a class field (.class) and the vtable. */ tree ! java_mangle_decl (obstack, decl) ! struct obstack *obstack; ! tree decl; { init_mangling (obstack); switch (TREE_CODE (decl)) --- 67,80 ---- #define MANGLE_RAW_STRING(S) \ obstack_grow (mangle_obstack, (S), sizeof (S)-1) + /* atms: array template mangled string. */ + static GTY(()) tree atms; + /* This is the mangling interface: a decl, a class field (.class) and the vtable. */ tree ! java_mangle_decl (struct obstack *obstack, tree decl) { init_mangling (obstack); switch (TREE_CODE (decl)) *************** java_mangle_decl (obstack, decl) *** 88,96 **** } tree ! java_mangle_class_field (obstack, type) ! struct obstack *obstack; ! tree type; { init_mangling (obstack); mangle_record_type (type, /* for_pointer = */ 0); --- 92,98 ---- } tree ! java_mangle_class_field (struct obstack *obstack, tree type) { init_mangling (obstack); mangle_record_type (type, /* for_pointer = */ 0); *************** java_mangle_class_field (obstack, type) *** 100,108 **** } tree ! java_mangle_vtable (obstack, type) ! struct obstack *obstack; ! tree type; { init_mangling (obstack); MANGLE_RAW_STRING ("TV"); --- 102,108 ---- } tree ! java_mangle_vtable (struct obstack *obstack, tree type) { init_mangling (obstack); MANGLE_RAW_STRING ("TV"); *************** java_mangle_vtable (obstack, type) *** 116,123 **** /* This mangles a field decl */ static void ! mangle_field_decl (decl) ! tree decl; { /* Mangle the name of the this the field belongs to */ mangle_record_type (DECL_CONTEXT (decl), /* for_pointer = */ 0); --- 116,122 ---- /* This mangles a field decl */ static void ! mangle_field_decl (tree decl) { /* Mangle the name of the this the field belongs to */ mangle_record_type (DECL_CONTEXT (decl), /* for_pointer = */ 0); *************** mangle_field_decl (decl) *** 133,140 **** its arguments. */ static void ! mangle_method_decl (mdecl) ! tree mdecl; { tree method_name = DECL_NAME (mdecl); tree arglist; --- 132,138 ---- its arguments. */ static void ! mangle_method_decl (tree mdecl) { tree method_name = DECL_NAME (mdecl); tree arglist; *************** mangle_method_decl (mdecl) *** 174,181 **** value if unicode encoding was required. */ static void ! mangle_member_name (name) ! tree name; { append_gpp_mangled_name (IDENTIFIER_POINTER (name), IDENTIFIER_LENGTH (name)); --- 172,178 ---- value if unicode encoding was required. */ static void ! mangle_member_name (tree name) { append_gpp_mangled_name (IDENTIFIER_POINTER (name), IDENTIFIER_LENGTH (name)); *************** mangle_member_name (name) *** 188,195 **** /* Append the mangled name of TYPE onto OBSTACK. */ static void ! mangle_type (type) ! tree type; { switch (TREE_CODE (type)) { --- 185,191 ---- /* Append the mangled name of TYPE onto OBSTACK. */ static void ! mangle_type (tree type) { switch (TREE_CODE (type)) { *************** mangle_type (type) *** 240,246 **** already seen, so they can be reused. For example, java.lang.Object would generate three entries: two package names and a type. If java.lang.String is presented next, the java.lang will be matched ! against the first two entries (and kept for compression as S_0), and type String would be added to the table. See mangle_record_type. COMPRESSION_NEXT is the index to the location of the next insertion of an element. */ --- 236,242 ---- already seen, so they can be reused. For example, java.lang.Object would generate three entries: two package names and a type. If java.lang.String is presented next, the java.lang will be matched ! against the first two entries (and kept for compression as S0_), and type String would be added to the table. See mangle_record_type. COMPRESSION_NEXT is the index to the location of the next insertion of an element. */ *************** static int compression_next; *** 252,259 **** function to match pointer entries and start from the end */ static int ! find_compression_pointer_match (type) ! tree type; { int i; --- 248,254 ---- function to match pointer entries and start from the end */ static int ! find_compression_pointer_match (tree type) { int i; *************** find_compression_pointer_match (type) *** 267,274 **** associated with it. */ static int ! find_compression_array_match (type) ! tree type; { return find_compression_pointer_match (type); } --- 262,268 ---- associated with it. */ static int ! find_compression_array_match (tree type) { return find_compression_pointer_match (type); } *************** find_compression_array_match (type) *** 276,283 **** /* Match the table of type against STRING. */ static int ! find_compression_array_template_match (string) ! tree string; { int i; for (i = 0; i < compression_next; i++) --- 270,276 ---- /* Match the table of type against STRING. */ static int ! find_compression_array_template_match (tree string) { int i; for (i = 0; i < compression_next; i++) *************** find_compression_array_template_match (s *** 288,329 **** /* We go through the compression table and try to find a complete or partial match. The function returns the compression table entry ! that (evenutally partially) matches TYPE. *NEXT_CURRENT can be set to the rest of TYPE to be mangled. */ static int ! find_compression_record_match (type, next_current) ! tree type; ! tree *next_current; { ! int i, match; tree current, saved_current = NULL_TREE; ! /* Search from the beginning for something that matches TYPE, even ! partially. */ ! for (current = TYPE_PACKAGE_LIST (type), i = 0, match = -1; current; ! current = TREE_CHAIN (current)) { ! int j; ! for (j = i; j < compression_next; j++) ! if (TREE_VEC_ELT (compression_table, j) == TREE_PURPOSE (current)) ! { ! match = i = j; ! saved_current = current; ! i++; ! break; ! } ! else ! { ! /* We don't want to match an element that appears in the middle ! of a package name, so skip forward to the next complete type name. ! IDENTIFIER_NODEs are partial package names while RECORD_TYPEs ! represent complete type names. */ ! while (j < compression_next ! && TREE_CODE (TREE_VEC_ELT (compression_table, j)) == ! IDENTIFIER_NODE) ! j++; ! } } if (!next_current) --- 281,315 ---- /* We go through the compression table and try to find a complete or partial match. The function returns the compression table entry ! that (eventually partially) matches TYPE. *NEXT_CURRENT can be set to the rest of TYPE to be mangled. */ static int ! find_compression_record_match (tree type, tree *next_current) { ! int i, match = -1; tree current, saved_current = NULL_TREE; ! current = TYPE_PACKAGE_LIST (type); ! ! for (i = 0; i < compression_next; i++) { ! tree compression_entry = TREE_VEC_ELT (compression_table, i); ! if (current && compression_entry == TREE_PURPOSE (current)) ! { ! match = i; ! saved_current = current; ! current = TREE_CHAIN (current); ! } ! else ! /* We don't want to match an element that appears in the middle ! of a package name, so skip forward to the next complete type name. ! IDENTIFIER_NODEs (except for a "6JArray") are partial package ! names while RECORD_TYPEs represent complete type names. */ ! while (i < compression_next ! && TREE_CODE (compression_entry) == IDENTIFIER_NODE ! && compression_entry != atms) ! compression_entry = TREE_VEC_ELT (compression_table, ++i); } if (!next_current) *************** find_compression_record_match (type, nex *** 346,354 **** symbol, meaning it was preceded by a 'P'. */ static int ! mangle_record_type (type, for_pointer) ! tree type; ! int for_pointer; { tree current; int match; --- 332,338 ---- symbol, meaning it was preceded by a 'P'. */ static int ! mangle_record_type (tree type, int for_pointer) { tree current; int match; *************** mangle_record_type (type, for_pointer) *** 394,406 **** } /* Mangle a pointer type. There are two cases: the pointer is already ! in the compression table: the compression is emited sans 'P' indicator. Otherwise, a 'P' is emitted and, depending on the type, a partial compression or/plus the rest of the mangling. */ static void ! mangle_pointer_type (type) ! tree type; { int match; tree pointer_type; --- 378,389 ---- } /* Mangle a pointer type. There are two cases: the pointer is already ! in the compression table: the compression is emitted sans 'P' indicator. Otherwise, a 'P' is emitted and, depending on the type, a partial compression or/plus the rest of the mangling. */ static void ! mangle_pointer_type (tree type) { int match; tree pointer_type; *************** mangle_pointer_type (type) *** 428,441 **** /* Mangle an array type. Search for an easy solution first, then go through the process of finding out whether the bare array type or even ! the template indicator where already used an compress appropriately. It handles pointers. */ - /* atms: array template mangled string. */ - static GTY(()) tree atms; static void ! mangle_array_type (p_type) ! tree p_type; { tree type, elt_type; int match; --- 411,421 ---- /* Mangle an array type. Search for an easy solution first, then go through the process of finding out whether the bare array type or even ! the template indicator were already used and compressed appropriately. It handles pointers. */ static void ! mangle_array_type (tree p_type) { tree type, elt_type; int match; *************** mangle_array_type (p_type) *** 452,458 **** atms = get_identifier ("6JArray"); } ! /* Maybe we have what we're looking in the compression table. */ if ((match = find_compression_array_match (p_type)) >= 0) { emit_compression_string (match); --- 432,438 ---- atms = get_identifier ("6JArray"); } ! /* Maybe we have what we're looking for in the compression table. */ if ((match = find_compression_array_match (p_type)) >= 0) { emit_compression_string (match); *************** mangle_array_type (p_type) *** 490,497 **** compression_table_add (p_type); } ! /* Write a substition string for entry I. Substitution string starts a ! -1 (encoded S_.) The base is 36, and the code shamlessly taken from cp/mangle.c. */ static void --- 470,477 ---- compression_table_add (p_type); } ! /* Write a substitution string for entry I. Substitution string starts a ! -1 (encoded S_.) The base is 36, and the code shamelessly taken from cp/mangle.c. */ static void *************** emit_compression_string (int i) *** 523,531 **** might all be unique, we find the same RECORD_TYPE.) */ static int ! entry_match_pointer_p (type, i) ! tree type; ! int i; { tree t = TREE_VEC_ELT (compression_table, i); --- 503,509 ---- might all be unique, we find the same RECORD_TYPE.) */ static int ! entry_match_pointer_p (tree type, int i) { tree t = TREE_VEC_ELT (compression_table, i); *************** entry_match_pointer_p (type, i) *** 546,553 **** part. The result is stored in TYPE_PACKAGE_LIST to be reused. */ static void ! set_type_package_list (type) ! tree type; { int i; const char *type_string = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type))); --- 524,530 ---- part. The result is stored in TYPE_PACKAGE_LIST to be reused. */ static void ! set_type_package_list (tree type) { int i; const char *type_string = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type))); *************** set_type_package_list (type) *** 590,597 **** compression table if necessary. */ static void ! compression_table_add (type) ! tree type; { if (compression_next == TREE_VEC_LENGTH (compression_table)) { --- 567,573 ---- compression table if necessary. */ static void ! compression_table_add (tree type) { if (compression_next == TREE_VEC_LENGTH (compression_table)) { *************** compression_table_add (type) *** 609,616 **** /* Mangling initialization routine. */ static void ! init_mangling (obstack) ! struct obstack *obstack; { mangle_obstack = obstack; if (!compression_table) --- 585,591 ---- /* Mangling initialization routine. */ static void ! init_mangling (struct obstack *obstack) { mangle_obstack = obstack; if (!compression_table) *************** init_mangling (obstack) *** 627,633 **** IDENTIFIER_NODE. */ static tree ! finish_mangling () { tree result; --- 602,608 ---- IDENTIFIER_NODE. */ static tree ! finish_mangling (void) { tree result; diff -Nrc3pad gcc-3.3.3/gcc/java/mangle_name.c gcc-3.4.0/gcc/java/mangle_name.c *** gcc-3.3.3/gcc/java/mangle_name.c 2002-08-05 18:46:37.000000000 +0000 --- gcc-3.4.0/gcc/java/mangle_name.c 2003-01-12 02:14:55.000000000 +0000 *************** *** 1,21 **** /* Shared functions related to mangling names for the GNU compiler for the Java(TM) language. ! Copyright (C) 2001 Free Software Foundation, Inc. ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,21 ---- /* Shared functions related to mangling names for the GNU compiler for the Java(TM) language. ! Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 27,41 **** #include "config.h" #include "system.h" #include "jcf.h" #include "tree.h" #include "java-tree.h" #include "obstack.h" #include "toplev.h" ! static void append_unicode_mangled_name PARAMS ((const char *, int)); #ifndef HAVE_AS_UTF8 ! static int unicode_mangling_length PARAMS ((const char *, int)); #endif extern struct obstack *mangle_obstack; --- 27,43 ---- #include "config.h" #include "system.h" + #include "coretypes.h" + #include "tm.h" #include "jcf.h" #include "tree.h" #include "java-tree.h" #include "obstack.h" #include "toplev.h" ! static void append_unicode_mangled_name (const char *, int); #ifndef HAVE_AS_UTF8 ! static int unicode_mangling_length (const char *, int); #endif extern struct obstack *mangle_obstack; *************** extern struct obstack *mangle_obstack; *** 51,59 **** frequently that they could be cached. */ void ! append_gpp_mangled_name (name, len) ! const char *name; ! int len; { int encoded_len = unicode_mangling_length (name, len); int needs_escapes = encoded_len > 0; --- 53,59 ---- frequently that they could be cached. */ void ! append_gpp_mangled_name (const char *name, int len) { int encoded_len = unicode_mangling_length (name, len); int needs_escapes = encoded_len > 0; *************** append_gpp_mangled_name (name, len) *** 74,82 **** which case `__U' will be mangled `__U_'. */ static void ! append_unicode_mangled_name (name, len) ! const char *name; ! int len; { const unsigned char *ptr; const unsigned char *limit = (const unsigned char *)name + len; --- 74,80 ---- which case `__U' will be mangled `__U_'. */ static void ! append_unicode_mangled_name (const char *name, int len) { const unsigned char *ptr; const unsigned char *limit = (const unsigned char *)name + len; *************** append_unicode_mangled_name (name, len) *** 127,135 **** escapes. If no escapes are needed, return 0. */ static int ! unicode_mangling_length (name, len) ! const char *name; ! int len; { const unsigned char *ptr; const unsigned char *limit = (const unsigned char *)name + len; --- 125,131 ---- escapes. If no escapes are needed, return 0. */ static int ! unicode_mangling_length (const char *name, int len) { const unsigned char *ptr; const unsigned char *limit = (const unsigned char *)name + len; *************** unicode_mangling_length (name, len) *** 197,205 **** so frequently that they could be cached. */ void ! append_gpp_mangled_name (name, len) ! const char *name; ! int len; { const unsigned char *ptr; const unsigned char *limit = (const unsigned char *)name + len; --- 193,199 ---- so frequently that they could be cached. */ void ! append_gpp_mangled_name (const char *name, int len) { const unsigned char *ptr; const unsigned char *limit = (const unsigned char *)name + len; diff -Nrc3pad gcc-3.3.3/gcc/java/parse.c gcc-3.4.0/gcc/java/parse.c *** gcc-3.3.3/gcc/java/parse.c 2004-02-14 20:45:59.000000000 +0000 --- gcc-3.4.0/gcc/java/parse.c 2004-04-19 02:26:21.000000000 +0000 *************** *** 1,5 **** ! /* A Bison parser, made from /home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y ! by GNU bison 1.33. */ #define YYBISON 1 /* Identify Bison output. */ --- 1,5 ---- ! /* A Bison parser, made from /home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y ! by GNU bison 1.35. */ #define YYBISON 1 /* Identify Bison output. */ *************** *** 120,129 **** # define BOOL_LIT_TK 364 # define NULL_TK 365 ! #line 48 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" #include "config.h" #include "system.h" #include #include "tree.h" #include "rtl.h" --- 120,131 ---- # define BOOL_LIT_TK 364 # define NULL_TK 365 ! #line 49 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" #include "config.h" #include "system.h" + #include "coretypes.h" + #include "tm.h" #include #include "tree.h" #include "rtl.h" *************** *** 144,417 **** #include "ggc.h" #include "debug.h" #include "tree-inline.h" /* Local function prototypes */ ! static char *java_accstring_lookup PARAMS ((int)); ! static void classitf_redefinition_error PARAMS ((const char *,tree, tree, tree)); ! static void variable_redefinition_error PARAMS ((tree, tree, tree, int)); ! static tree create_class PARAMS ((int, tree, tree, tree)); ! static tree create_interface PARAMS ((int, tree, tree)); ! static void end_class_declaration PARAMS ((int)); ! static tree find_field PARAMS ((tree, tree)); ! static tree lookup_field_wrapper PARAMS ((tree, tree)); ! static int duplicate_declaration_error_p PARAMS ((tree, tree, tree)); ! static void register_fields PARAMS ((int, tree, tree)); ! static tree parser_qualified_classname PARAMS ((tree)); ! static int parser_check_super PARAMS ((tree, tree, tree)); ! static int parser_check_super_interface PARAMS ((tree, tree, tree)); ! static void check_modifiers_consistency PARAMS ((int)); ! static tree lookup_cl PARAMS ((tree)); ! static tree lookup_java_method2 PARAMS ((tree, tree, int)); ! static tree method_header PARAMS ((int, tree, tree, tree)); ! static void fix_method_argument_names PARAMS ((tree ,tree)); ! static tree method_declarator PARAMS ((tree, tree)); ! static void parse_warning_context PARAMS ((tree cl, const char *msg, ...)) ATTRIBUTE_PRINTF_2; ! static void issue_warning_error_from_context PARAMS ((tree, const char *msg, va_list)) ATTRIBUTE_PRINTF (2, 0); ! static void parse_ctor_invocation_error PARAMS ((void)); ! static tree parse_jdk1_1_error PARAMS ((const char *)); ! static void complete_class_report_errors PARAMS ((jdep *)); ! static int process_imports PARAMS ((void)); ! static void read_import_dir PARAMS ((tree)); ! static int find_in_imports_on_demand PARAMS ((tree, tree)); ! static void find_in_imports PARAMS ((tree, tree)); ! static void check_inner_class_access PARAMS ((tree, tree, tree)); ! static int check_pkg_class_access PARAMS ((tree, tree, bool)); ! static void register_package PARAMS ((tree)); ! static tree resolve_package PARAMS ((tree, tree *, tree *)); ! static tree resolve_class PARAMS ((tree, tree, tree, tree)); ! static void declare_local_variables PARAMS ((int, tree, tree)); ! static void dump_java_tree PARAMS ((enum tree_dump_index, tree)); ! static void source_start_java_method PARAMS ((tree)); ! static void source_end_java_method PARAMS ((void)); ! static tree find_name_in_single_imports PARAMS ((tree)); ! static void check_abstract_method_header PARAMS ((tree)); ! static tree lookup_java_interface_method2 PARAMS ((tree, tree)); ! static tree resolve_expression_name PARAMS ((tree, tree *)); ! static tree maybe_create_class_interface_decl PARAMS ((tree, tree, tree, tree)); ! static int check_class_interface_creation PARAMS ((int, int, tree, ! tree, tree, tree)); ! static tree patch_method_invocation PARAMS ((tree, tree, tree, int, ! int *, tree *)); ! static int breakdown_qualified PARAMS ((tree *, tree *, tree)); ! static int in_same_package PARAMS ((tree, tree)); ! static tree resolve_and_layout PARAMS ((tree, tree)); ! static tree qualify_and_find PARAMS ((tree, tree, tree)); ! static tree resolve_no_layout PARAMS ((tree, tree)); ! static int invocation_mode PARAMS ((tree, int)); ! static tree find_applicable_accessible_methods_list PARAMS ((int, tree, ! tree, tree)); ! static void search_applicable_methods_list PARAMS ((int, tree, tree, tree, ! tree *, tree *)); ! static tree find_most_specific_methods_list PARAMS ((tree)); ! static int argument_types_convertible PARAMS ((tree, tree)); ! static tree patch_invoke PARAMS ((tree, tree, tree)); ! static int maybe_use_access_method PARAMS ((int, tree *, tree *)); ! static tree lookup_method_invoke PARAMS ((int, tree, tree, tree, tree)); ! static tree register_incomplete_type PARAMS ((int, tree, tree, tree)); ! static tree check_inner_circular_reference PARAMS ((tree, tree)); ! static tree check_circular_reference PARAMS ((tree)); ! static tree obtain_incomplete_type PARAMS ((tree)); ! static tree java_complete_lhs PARAMS ((tree)); ! static tree java_complete_tree PARAMS ((tree)); ! static tree maybe_generate_pre_expand_clinit PARAMS ((tree)); ! static int analyze_clinit_body PARAMS ((tree, tree)); ! static int maybe_yank_clinit PARAMS ((tree)); ! static void start_complete_expand_method PARAMS ((tree)); ! static void java_complete_expand_method PARAMS ((tree)); ! static void java_expand_method_bodies PARAMS ((tree)); ! static int unresolved_type_p PARAMS ((tree, tree *)); ! static void create_jdep_list PARAMS ((struct parser_ctxt *)); ! static tree build_expr_block PARAMS ((tree, tree)); ! static tree enter_block PARAMS ((void)); ! static tree exit_block PARAMS ((void)); ! static tree lookup_name_in_blocks PARAMS ((tree)); ! static void maybe_absorb_scoping_blocks PARAMS ((void)); ! static tree build_method_invocation PARAMS ((tree, tree)); ! static tree build_new_invocation PARAMS ((tree, tree)); ! static tree build_assignment PARAMS ((int, int, tree, tree)); ! static tree build_binop PARAMS ((enum tree_code, int, tree, tree)); ! static tree patch_assignment PARAMS ((tree, tree)); ! static tree patch_binop PARAMS ((tree, tree, tree)); ! static tree build_unaryop PARAMS ((int, int, tree)); ! static tree build_incdec PARAMS ((int, int, tree, int)); ! static tree patch_unaryop PARAMS ((tree, tree)); ! static tree build_cast PARAMS ((int, tree, tree)); ! static tree build_null_of_type PARAMS ((tree)); ! static tree patch_cast PARAMS ((tree, tree)); ! static int valid_ref_assignconv_cast_p PARAMS ((tree, tree, int)); ! static int valid_builtin_assignconv_identity_widening_p PARAMS ((tree, tree)); ! static int valid_cast_to_p PARAMS ((tree, tree)); ! static int valid_method_invocation_conversion_p PARAMS ((tree, tree)); ! static tree try_builtin_assignconv PARAMS ((tree, tree, tree)); ! static tree try_reference_assignconv PARAMS ((tree, tree)); ! static tree build_unresolved_array_type PARAMS ((tree)); ! static int build_type_name_from_array_name PARAMS ((tree, tree *)); ! static tree build_array_from_name PARAMS ((tree, tree, tree, tree *)); ! static tree build_array_ref PARAMS ((int, tree, tree)); ! static tree patch_array_ref PARAMS ((tree)); ! static tree make_qualified_name PARAMS ((tree, tree, int)); ! static tree merge_qualified_name PARAMS ((tree, tree)); ! static tree make_qualified_primary PARAMS ((tree, tree, int)); ! static int resolve_qualified_expression_name PARAMS ((tree, tree *, ! tree *, tree *)); ! static void qualify_ambiguous_name PARAMS ((tree)); ! static tree resolve_field_access PARAMS ((tree, tree *, tree *)); ! static tree build_newarray_node PARAMS ((tree, tree, int)); ! static tree patch_newarray PARAMS ((tree)); ! static tree resolve_type_during_patch PARAMS ((tree)); ! static tree build_this PARAMS ((int)); ! static tree build_wfl_wrap PARAMS ((tree, int)); ! static tree build_return PARAMS ((int, tree)); ! static tree patch_return PARAMS ((tree)); ! static tree maybe_access_field PARAMS ((tree, tree, tree)); ! static int complete_function_arguments PARAMS ((tree)); ! static int check_for_static_method_reference PARAMS ((tree, tree, tree, ! tree, tree)); ! static int not_accessible_p PARAMS ((tree, tree, tree, int)); ! static void check_deprecation PARAMS ((tree, tree)); ! static int class_in_current_package PARAMS ((tree)); ! static tree build_if_else_statement PARAMS ((int, tree, tree, tree)); ! static tree patch_if_else_statement PARAMS ((tree)); ! static tree add_stmt_to_compound PARAMS ((tree, tree, tree)); ! static tree add_stmt_to_block PARAMS ((tree, tree, tree)); ! static tree patch_exit_expr PARAMS ((tree)); ! static tree build_labeled_block PARAMS ((int, tree)); ! static tree finish_labeled_statement PARAMS ((tree, tree)); ! static tree build_bc_statement PARAMS ((int, int, tree)); ! static tree patch_bc_statement PARAMS ((tree)); ! static tree patch_loop_statement PARAMS ((tree)); ! static tree build_new_loop PARAMS ((tree)); ! static tree build_loop_body PARAMS ((int, tree, int)); ! static tree finish_loop_body PARAMS ((int, tree, tree, int)); ! static tree build_debugable_stmt PARAMS ((int, tree)); ! static tree finish_for_loop PARAMS ((int, tree, tree, tree)); ! static tree patch_switch_statement PARAMS ((tree)); ! static tree string_constant_concatenation PARAMS ((tree, tree)); ! static tree build_string_concatenation PARAMS ((tree, tree)); ! static tree patch_string_cst PARAMS ((tree)); ! static tree patch_string PARAMS ((tree)); ! static tree encapsulate_with_try_catch PARAMS ((int, tree, tree, tree)); ! static tree build_assertion PARAMS ((int, tree, tree)); ! static tree build_try_statement PARAMS ((int, tree, tree)); ! static tree build_try_finally_statement PARAMS ((int, tree, tree)); ! static tree patch_try_statement PARAMS ((tree)); ! static tree patch_synchronized_statement PARAMS ((tree, tree)); ! static tree patch_throw_statement PARAMS ((tree, tree)); ! static void check_thrown_exceptions PARAMS ((int, tree)); ! static int check_thrown_exceptions_do PARAMS ((tree)); ! static void purge_unchecked_exceptions PARAMS ((tree)); ! static bool ctors_unchecked_throws_clause_p PARAMS ((tree)); ! static void check_throws_clauses PARAMS ((tree, tree, tree)); ! static void finish_method_declaration PARAMS ((tree)); ! static tree build_super_invocation PARAMS ((tree)); ! static int verify_constructor_circularity PARAMS ((tree, tree)); ! static char *constructor_circularity_msg PARAMS ((tree, tree)); ! static tree build_this_super_qualified_invocation PARAMS ((int, tree, tree, ! int, int)); ! static const char *get_printable_method_name PARAMS ((tree)); ! static tree patch_conditional_expr PARAMS ((tree, tree, tree)); ! static tree generate_finit PARAMS ((tree)); ! static tree generate_instinit PARAMS ((tree)); ! static tree build_instinit_invocation PARAMS ((tree)); ! static void fix_constructors PARAMS ((tree)); ! static tree build_alias_initializer_parameter_list PARAMS ((int, tree, ! tree, int *)); ! static tree craft_constructor PARAMS ((tree, tree)); ! static int verify_constructor_super PARAMS ((tree)); ! static tree create_artificial_method PARAMS ((tree, int, tree, tree, tree)); ! static void start_artificial_method_body PARAMS ((tree)); ! static void end_artificial_method_body PARAMS ((tree)); ! static int check_method_redefinition PARAMS ((tree, tree)); ! static int check_method_types_complete PARAMS ((tree)); ! static void java_check_regular_methods PARAMS ((tree)); ! static void java_check_abstract_methods PARAMS ((tree)); ! static void unreachable_stmt_error PARAMS ((tree)); ! static tree find_expr_with_wfl PARAMS ((tree)); ! static void missing_return_error PARAMS ((tree)); ! static tree build_new_array_init PARAMS ((int, tree)); ! static tree patch_new_array_init PARAMS ((tree, tree)); ! static tree maybe_build_array_element_wfl PARAMS ((tree)); ! static int array_constructor_check_entry PARAMS ((tree, tree)); ! static const char *purify_type_name PARAMS ((const char *)); ! static tree fold_constant_for_init PARAMS ((tree, tree)); ! static tree strip_out_static_field_access_decl PARAMS ((tree)); ! static jdeplist *reverse_jdep_list PARAMS ((struct parser_ctxt *)); ! static void static_ref_err PARAMS ((tree, tree, tree)); ! static void parser_add_interface PARAMS ((tree, tree, tree)); ! static void add_superinterfaces PARAMS ((tree, tree)); ! static tree jdep_resolve_class PARAMS ((jdep *)); ! static int note_possible_classname PARAMS ((const char *, int)); ! static void java_complete_expand_classes PARAMS ((void)); ! static void java_complete_expand_class PARAMS ((tree)); ! static void java_complete_expand_methods PARAMS ((tree)); ! static tree cut_identifier_in_qualified PARAMS ((tree)); ! static tree java_stabilize_reference PARAMS ((tree)); ! static tree do_unary_numeric_promotion PARAMS ((tree)); ! static char * operator_string PARAMS ((tree)); ! static tree do_merge_string_cste PARAMS ((tree, const char *, int, int)); ! static tree merge_string_cste PARAMS ((tree, tree, int)); ! static tree java_refold PARAMS ((tree)); ! static int java_decl_equiv PARAMS ((tree, tree)); ! static int binop_compound_p PARAMS ((enum tree_code)); ! static tree search_loop PARAMS ((tree)); ! static int labeled_block_contains_loop_p PARAMS ((tree, tree)); ! static int check_abstract_method_definitions PARAMS ((int, tree, tree)); ! static void java_check_abstract_method_definitions PARAMS ((tree)); ! static void java_debug_context_do PARAMS ((int)); ! static void java_parser_context_push_initialized_field PARAMS ((void)); ! static void java_parser_context_pop_initialized_field PARAMS ((void)); ! static tree reorder_static_initialized PARAMS ((tree)); ! static void java_parser_context_suspend PARAMS ((void)); ! static void java_parser_context_resume PARAMS ((void)); ! static int pop_current_osb PARAMS ((struct parser_ctxt *)); /* JDK 1.1 work. FIXME */ ! static tree maybe_make_nested_class_name PARAMS ((tree)); ! static int make_nested_class_name PARAMS ((tree)); ! static void set_nested_class_simple_name_value PARAMS ((tree, int)); ! static void link_nested_class_to_enclosing PARAMS ((void)); ! static tree resolve_inner_class PARAMS ((htab_t, tree, tree *, tree *, tree)); ! static tree find_as_inner_class PARAMS ((tree, tree, tree)); ! static tree find_as_inner_class_do PARAMS ((tree, tree)); ! static int check_inner_class_redefinition PARAMS ((tree, tree)); ! static tree build_thisn_assign PARAMS ((void)); ! static tree build_current_thisn PARAMS ((tree)); ! static tree build_access_to_thisn PARAMS ((tree, tree, int)); ! static tree maybe_build_thisn_access_method PARAMS ((tree)); ! static tree build_outer_field_access PARAMS ((tree, tree)); ! static tree build_outer_field_access_methods PARAMS ((tree)); ! static tree build_outer_field_access_expr PARAMS ((int, tree, tree, ! tree, tree)); ! static tree build_outer_method_access_method PARAMS ((tree)); ! static tree build_new_access_id PARAMS ((void)); ! static tree build_outer_field_access_method PARAMS ((tree, tree, tree, ! tree, tree)); ! static int outer_field_access_p PARAMS ((tree, tree)); ! static int outer_field_expanded_access_p PARAMS ((tree, tree *, ! tree *, tree *)); ! static tree outer_field_access_fix PARAMS ((tree, tree, tree)); ! static tree build_incomplete_class_ref PARAMS ((int, tree)); ! static tree patch_incomplete_class_ref PARAMS ((tree)); ! static tree create_anonymous_class PARAMS ((int, tree)); ! static void patch_anonymous_class PARAMS ((tree, tree, tree)); ! static void add_inner_class_fields PARAMS ((tree, tree)); ! static tree build_dot_class_method PARAMS ((tree)); ! static tree build_dot_class_method_invocation PARAMS ((tree)); ! static void create_new_parser_context PARAMS ((int)); ! static void mark_parser_ctxt PARAMS ((void *)); ! static tree maybe_build_class_init_for_field PARAMS ((tree, tree)); ! static int attach_init_test_initialization_flags PARAMS ((PTR *, PTR)); ! static int emit_test_initialization PARAMS ((PTR *, PTR)); ! static char *string_convert_int_cst PARAMS ((tree)); /* Number of error found so far. */ int java_error_count; --- 146,414 ---- #include "ggc.h" #include "debug.h" #include "tree-inline.h" + #include "cgraph.h" /* Local function prototypes */ ! static char *java_accstring_lookup (int); ! static void classitf_redefinition_error (const char *,tree, tree, tree); ! static void variable_redefinition_error (tree, tree, tree, int); ! static tree create_class (int, tree, tree, tree); ! static tree create_interface (int, tree, tree); ! static void end_class_declaration (int); ! static tree find_field (tree, tree); ! static tree lookup_field_wrapper (tree, tree); ! static int duplicate_declaration_error_p (tree, tree, tree); ! static void register_fields (int, tree, tree); ! static tree parser_qualified_classname (tree); ! static int parser_check_super (tree, tree, tree); ! static int parser_check_super_interface (tree, tree, tree); ! static void check_modifiers_consistency (int); ! static tree lookup_cl (tree); ! static tree lookup_java_method2 (tree, tree, int); ! static tree method_header (int, tree, tree, tree); ! static void fix_method_argument_names (tree ,tree); ! static tree method_declarator (tree, tree); ! static void parse_warning_context (tree cl, const char *msg, ...) ATTRIBUTE_PRINTF_2; ! static void issue_warning_error_from_context (tree, const char *msg, va_list) ATTRIBUTE_PRINTF (2, 0); ! static void parse_ctor_invocation_error (void); ! static tree parse_jdk1_1_error (const char *); ! static void complete_class_report_errors (jdep *); ! static int process_imports (void); ! static void read_import_dir (tree); ! static int find_in_imports_on_demand (tree, tree); ! static void find_in_imports (tree, tree); ! static void check_inner_class_access (tree, tree, tree); ! static int check_pkg_class_access (tree, tree, bool); ! static void register_package (tree); ! static tree resolve_package (tree, tree *, tree *); ! static tree resolve_class (tree, tree, tree, tree); ! static void declare_local_variables (int, tree, tree); ! static void dump_java_tree (enum tree_dump_index, tree); ! static void source_start_java_method (tree); ! static void source_end_java_method (void); ! static tree find_name_in_single_imports (tree); ! static void check_abstract_method_header (tree); ! static tree lookup_java_interface_method2 (tree, tree); ! static tree resolve_expression_name (tree, tree *); ! static tree maybe_create_class_interface_decl (tree, tree, tree, tree); ! static int check_class_interface_creation (int, int, tree, tree, tree, tree); ! static tree patch_method_invocation (tree, tree, tree, int, int *, tree *); ! static int breakdown_qualified (tree *, tree *, tree); ! static int in_same_package (tree, tree); ! static tree resolve_and_layout (tree, tree); ! static tree qualify_and_find (tree, tree, tree); ! static tree resolve_no_layout (tree, tree); ! static int invocation_mode (tree, int); ! static tree find_applicable_accessible_methods_list (int, tree, tree, tree); ! static void search_applicable_methods_list (int, tree, tree, tree, tree *, tree *); ! static tree find_most_specific_methods_list (tree); ! static int argument_types_convertible (tree, tree); ! static tree patch_invoke (tree, tree, tree); ! static int maybe_use_access_method (int, tree *, tree *); ! static tree lookup_method_invoke (int, tree, tree, tree, tree); ! static tree register_incomplete_type (int, tree, tree, tree); ! static tree check_inner_circular_reference (tree, tree); ! static tree check_circular_reference (tree); ! static tree obtain_incomplete_type (tree); ! static tree java_complete_lhs (tree); ! static tree java_complete_tree (tree); ! static tree maybe_generate_pre_expand_clinit (tree); ! static int analyze_clinit_body (tree, tree); ! static int maybe_yank_clinit (tree); ! static void java_complete_expand_method (tree); ! static void java_expand_method_bodies (tree); ! static int unresolved_type_p (tree, tree *); ! static void create_jdep_list (struct parser_ctxt *); ! static tree build_expr_block (tree, tree); ! static tree enter_block (void); ! static tree exit_block (void); ! static tree lookup_name_in_blocks (tree); ! static void maybe_absorb_scoping_blocks (void); ! static tree build_method_invocation (tree, tree); ! static tree build_new_invocation (tree, tree); ! static tree build_assignment (int, int, tree, tree); ! static tree build_binop (enum tree_code, int, tree, tree); ! static tree patch_assignment (tree, tree); ! static tree patch_binop (tree, tree, tree); ! static tree build_unaryop (int, int, tree); ! static tree build_incdec (int, int, tree, int); ! static tree patch_unaryop (tree, tree); ! static tree build_cast (int, tree, tree); ! static tree build_null_of_type (tree); ! static tree patch_cast (tree, tree); ! static int valid_ref_assignconv_cast_p (tree, tree, int); ! static int valid_builtin_assignconv_identity_widening_p (tree, tree); ! static int valid_cast_to_p (tree, tree); ! static int valid_method_invocation_conversion_p (tree, tree); ! static tree try_builtin_assignconv (tree, tree, tree); ! static tree try_reference_assignconv (tree, tree); ! static tree build_unresolved_array_type (tree); ! static int build_type_name_from_array_name (tree, tree *); ! static tree build_array_from_name (tree, tree, tree, tree *); ! static tree build_array_ref (int, tree, tree); ! static tree patch_array_ref (tree); ! static tree make_qualified_name (tree, tree, int); ! static tree merge_qualified_name (tree, tree); ! static tree make_qualified_primary (tree, tree, int); ! static int resolve_qualified_expression_name (tree, tree *, tree *, tree *); ! static void qualify_ambiguous_name (tree); ! static tree resolve_field_access (tree, tree *, tree *); ! static tree build_newarray_node (tree, tree, int); ! static tree patch_newarray (tree); ! static tree resolve_type_during_patch (tree); ! static tree build_this (int); ! static tree build_wfl_wrap (tree, int); ! static tree build_return (int, tree); ! static tree patch_return (tree); ! static tree maybe_access_field (tree, tree, tree); ! static int complete_function_arguments (tree); ! static int check_for_static_method_reference (tree, tree, tree, tree, tree); ! static int not_accessible_p (tree, tree, tree, int); ! static void check_deprecation (tree, tree); ! static int class_in_current_package (tree); ! static tree build_if_else_statement (int, tree, tree, tree); ! static tree patch_if_else_statement (tree); ! static tree add_stmt_to_compound (tree, tree, tree); ! static tree add_stmt_to_block (tree, tree, tree); ! static tree patch_exit_expr (tree); ! static tree build_labeled_block (int, tree); ! static tree finish_labeled_statement (tree, tree); ! static tree build_bc_statement (int, int, tree); ! static tree patch_bc_statement (tree); ! static tree patch_loop_statement (tree); ! static tree build_new_loop (tree); ! static tree build_loop_body (int, tree, int); ! static tree finish_loop_body (int, tree, tree, int); ! static tree build_debugable_stmt (int, tree); ! static tree finish_for_loop (int, tree, tree, tree); ! static tree patch_switch_statement (tree); ! static tree string_constant_concatenation (tree, tree); ! static tree build_string_concatenation (tree, tree); ! static tree patch_string_cst (tree); ! static tree patch_string (tree); ! static tree encapsulate_with_try_catch (int, tree, tree, tree); ! static tree build_assertion (int, tree, tree); ! static tree build_try_statement (int, tree, tree); ! static tree build_try_finally_statement (int, tree, tree); ! static tree patch_try_statement (tree); ! static tree patch_synchronized_statement (tree, tree); ! static tree patch_throw_statement (tree, tree); ! static void check_thrown_exceptions (int, tree, tree); ! static int check_thrown_exceptions_do (tree); ! static void purge_unchecked_exceptions (tree); ! static bool ctors_unchecked_throws_clause_p (tree); ! static void check_concrete_throws_clauses (tree, tree, tree, tree); ! static void check_throws_clauses (tree, tree, tree); ! static void finish_method_declaration (tree); ! static tree build_super_invocation (tree); ! static int verify_constructor_circularity (tree, tree); ! static char *constructor_circularity_msg (tree, tree); ! static tree build_this_super_qualified_invocation (int, tree, tree, int, int); ! static const char *get_printable_method_name (tree); ! static tree patch_conditional_expr (tree, tree, tree); ! static tree generate_finit (tree); ! static tree generate_instinit (tree); ! static tree build_instinit_invocation (tree); ! static void fix_constructors (tree); ! static tree build_alias_initializer_parameter_list (int, tree, tree, int *); ! static tree craft_constructor (tree, tree); ! static int verify_constructor_super (tree); ! static tree create_artificial_method (tree, int, tree, tree, tree); ! static void start_artificial_method_body (tree); ! static void end_artificial_method_body (tree); ! static int check_method_redefinition (tree, tree); ! static int check_method_types_complete (tree); ! static bool hack_is_accessible_p (tree, tree); ! static void java_check_regular_methods (tree); ! static void check_interface_throws_clauses (tree, tree); ! static void java_check_abstract_methods (tree); ! static void unreachable_stmt_error (tree); ! static int not_accessible_field_error (tree, tree); ! static tree find_expr_with_wfl (tree); ! static void missing_return_error (tree); ! static tree build_new_array_init (int, tree); ! static tree patch_new_array_init (tree, tree); ! static tree maybe_build_array_element_wfl (tree); ! static int array_constructor_check_entry (tree, tree); ! static const char *purify_type_name (const char *); ! static tree fold_constant_for_init (tree, tree); ! static tree strip_out_static_field_access_decl (tree); ! static jdeplist *reverse_jdep_list (struct parser_ctxt *); ! static void static_ref_err (tree, tree, tree); ! static void parser_add_interface (tree, tree, tree); ! static void add_superinterfaces (tree, tree); ! static tree jdep_resolve_class (jdep *); ! static int note_possible_classname (const char *, int); ! static void java_complete_expand_classes (void); ! static void java_complete_expand_class (tree); ! static void java_complete_expand_methods (tree); ! static tree cut_identifier_in_qualified (tree); ! static tree java_stabilize_reference (tree); ! static tree do_unary_numeric_promotion (tree); ! static char * operator_string (tree); ! static tree do_merge_string_cste (tree, const char *, int, int); ! static tree merge_string_cste (tree, tree, int); ! static tree java_refold (tree); ! static int java_decl_equiv (tree, tree); ! static int binop_compound_p (enum tree_code); ! static tree search_loop (tree); ! static int labeled_block_contains_loop_p (tree, tree); ! static int check_abstract_method_definitions (int, tree, tree); ! static void java_check_abstract_method_definitions (tree); ! static void java_debug_context_do (int); ! static void java_parser_context_push_initialized_field (void); ! static void java_parser_context_pop_initialized_field (void); ! static tree reorder_static_initialized (tree); ! static void java_parser_context_suspend (void); ! static void java_parser_context_resume (void); ! static int pop_current_osb (struct parser_ctxt *); /* JDK 1.1 work. FIXME */ ! static tree maybe_make_nested_class_name (tree); ! static int make_nested_class_name (tree); ! static void set_nested_class_simple_name_value (tree, int); ! static void link_nested_class_to_enclosing (void); ! static tree resolve_inner_class (htab_t, tree, tree *, tree *, tree); ! static tree find_as_inner_class (tree, tree, tree); ! static tree find_as_inner_class_do (tree, tree); ! static int check_inner_class_redefinition (tree, tree); ! static tree build_thisn_assign (void); ! static tree build_current_thisn (tree); ! static tree build_access_to_thisn (tree, tree, int); ! static tree maybe_build_thisn_access_method (tree); ! static tree build_outer_field_access (tree, tree); ! static tree build_outer_field_access_methods (tree); ! static tree build_outer_field_access_expr (int, tree, tree, ! tree, tree); ! static tree build_outer_method_access_method (tree); ! static tree build_new_access_id (void); ! static tree build_outer_field_access_method (tree, tree, tree, ! tree, tree); ! static int outer_field_access_p (tree, tree); ! static int outer_field_expanded_access_p (tree, tree *, ! tree *, tree *); ! static tree outer_field_access_fix (tree, tree, tree); ! static tree build_incomplete_class_ref (int, tree); ! static tree patch_incomplete_class_ref (tree); ! static tree create_anonymous_class (int, tree); ! static void patch_anonymous_class (tree, tree, tree); ! static void add_inner_class_fields (tree, tree); ! static tree build_dot_class_method (tree); ! static tree build_dot_class_method_invocation (tree, tree); ! static void create_new_parser_context (int); ! static tree maybe_build_class_init_for_field (tree, tree); ! static int attach_init_test_initialization_flags (void **, void *); ! static int emit_test_initialization (void **, void *); ! static char *string_convert_int_cst (tree); /* Number of error found so far. */ int java_error_count; *************** static const enum tree_code binop_lookup *** 445,451 **** binop_lookup [((VALUE) - PLUS_TK) % ARRAY_SIZE (binop_lookup)] /* This is the end index for binary operators that can also be used ! in compound assignements. */ #define BINOP_COMPOUND_CANDIDATES 11 /* The "$L" identifier we use to create labels. */ --- 442,448 ---- binop_lookup [((VALUE) - PLUS_TK) % ARRAY_SIZE (binop_lookup)] /* This is the end index for binary operators that can also be used ! in compound assignments. */ #define BINOP_COMPOUND_CANDIDATES 11 /* The "$L" identifier we use to create labels. */ *************** static GTY(()) tree package_list; *** 480,486 **** static GTY(()) tree current_this; /* Hold a list of catch clauses list. The first element of this list is ! the list of the catch clauses of the currently analysed try block. */ static GTY(()) tree currently_caught_type_list; /* This holds a linked list of all the case labels for the current --- 477,483 ---- static GTY(()) tree current_this; /* Hold a list of catch clauses list. The first element of this list is ! the list of the catch clauses of the currently analyzed try block. */ static GTY(()) tree currently_caught_type_list; /* This holds a linked list of all the case labels for the current *************** static GTY(()) tree src_parse_roots[1]; *** 516,522 **** } while (0) ! #line 444 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" #ifndef YYSTYPE typedef union { tree node; --- 513,519 ---- } while (0) ! #line 442 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" #ifndef YYSTYPE typedef union { tree node; *************** typedef union { *** 528,535 **** int value; } yystype; # define YYSTYPE yystype #endif ! #line 454 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" #include "lex.c" #ifndef YYDEBUG --- 525,533 ---- int value; } yystype; # define YYSTYPE yystype + # define YYSTYPE_IS_TRIVIAL 1 #endif ! #line 452 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" #include "lex.c" #ifndef YYDEBUG *************** typedef union { *** 538,549 **** ! #define YYFINAL 787 #define YYFLAG -32768 #define YYNTBASE 112 /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ ! #define YYTRANSLATE(x) ((unsigned)(x) <= 365 ? yytranslate[x] : 276) /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ static const char yytranslate[] = --- 536,547 ---- ! #define YYFINAL 785 #define YYFLAG -32768 #define YYNTBASE 112 /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ ! #define YYTRANSLATE(x) ((unsigned)(x) <= 365 ? yytranslate[x] : 275) /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ static const char yytranslate[] = *************** static const char yytranslate[] = *** 590,825 **** #if YYDEBUG static const short yyprhs[] = { ! 0, 0, 1, 4, 6, 8, 10, 12, 14, 16, ! 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, ! 39, 42, 44, 46, 48, 52, 54, 55, 57, 59, ! 61, 64, 67, 70, 74, 76, 79, 81, 84, 88, ! 91, 95, 97, 99, 103, 106, 110, 116, 121, 127, ! 129, 131, 133, 135, 137, 140, 141, 149, 150, 157, ! 161, 164, 168, 173, 174, 177, 181, 184, 185, 188, ! 191, 193, 197, 201, 204, 208, 210, 213, 215, 217, ! 219, 221, 223, 225, 227, 229, 231, 235, 240, 242, ! 246, 250, 252, 256, 260, 265, 267, 271, 274, 278, ! 282, 284, 286, 287, 291, 294, 298, 302, 307, 312, ! 315, 319, 322, 326, 329, 333, 338, 342, 346, 350, ! 352, 356, 360, 363, 367, 370, 374, 376, 377, 380, ! 383, 385, 389, 393, 395, 397, 400, 402, 403, 407, ! 410, 414, 418, 423, 426, 430, 434, 439, 441, 446, ! 452, 460, 467, 469, 471, 472, 477, 478, 484, 485, ! 491, 492, 499, 503, 508, 511, 515, 518, 522, 525, ! 529, 531, 534, 536, 538, 540, 542, 544, 547, 550, ! 553, 557, 561, 566, 568, 572, 576, 579, 583, 585, ! 587, 589, 592, 594, 596, 598, 601, 604, 608, 610, 612, 614, 616, 618, 620, 622, 624, 626, 628, 630, 632, 634, 636, 638, 640, 642, 644, 646, 648, 650, ! 652, 654, 656, 659, 662, 665, 668, 671, 674, 677, ! 680, 684, 689, 694, 700, 705, 711, 718, 726, 733, ! 735, 737, 739, 741, 743, 745, 747, 753, 756, 760, ! 765, 773, 781, 782, 786, 791, 794, 798, 804, 807, ! 811, 815, 820, 822, 825, 828, 830, 833, 837, 840, ! 843, 847, 850, 855, 858, 861, 865, 870, 873, 875, ! 883, 891, 898, 902, 908, 913, 921, 928, 931, 934, ! 938, 941, 942, 944, 946, 949, 950, 952, 954, 958, ! 962, 965, 969, 972, 976, 979, 983, 986, 990, 993, ! 997, 1000, 1004, 1008, 1011, 1015, 1021, 1025, 1028, 1032, ! 1038, 1044, 1047, 1052, 1056, 1058, 1062, 1066, 1071, 1074, ! 1076, 1079, 1082, 1087, 1090, 1094, 1099, 1102, 1105, 1107, ! 1109, 1111, 1113, 1117, 1119, 1121, 1123, 1125, 1127, 1131, ! 1135, 1139, 1143, 1147, 1151, 1155, 1159, 1163, 1169, 1174, ! 1176, 1181, 1187, 1193, 1200, 1204, 1208, 1213, 1219, 1222, ! 1226, 1227, 1235, 1236, 1243, 1247, 1251, 1253, 1257, 1261, ! 1265, 1269, 1274, 1279, 1284, 1289, 1293, 1297, 1299, 1302, ! 1306, 1310, 1313, 1316, 1320, 1324, 1328, 1332, 1335, 1339, ! 1344, 1350, 1357, 1363, 1370, 1375, 1380, 1385, 1390, 1394, ! 1399, 1403, 1408, 1410, 1412, 1414, 1416, 1419, 1422, 1424, ! 1426, 1429, 1431, 1434, 1436, 1439, 1442, 1445, 1448, 1451, ! 1454, 1456, 1459, 1462, 1464, 1467, 1470, 1476, 1481, 1486, ! 1492, 1497, 1500, 1506, 1511, 1517, 1519, 1523, 1527, 1531, ! 1535, 1539, 1543, 1545, 1549, 1553, 1557, 1561, 1563, 1567, ! 1571, 1575, 1579, 1583, 1587, 1589, 1593, 1597, 1601, 1605, ! 1609, 1613, 1617, 1621, 1625, 1629, 1631, 1635, 1639, 1643, ! 1647, 1649, 1653, 1657, 1659, 1663, 1667, 1669, 1673, 1677, ! 1679, 1683, 1687, 1689, 1693, 1697, 1699, 1705, 1710, 1714, ! 1720, 1722, 1724, 1728, 1732, 1734, 1736, 1738, 1740, 1742, ! 1744 }; static const short yyrhs[] = { ! -1, 113, 126, 0, 106, 0, 107, 0, 110, 0, ! 105, 0, 104, 0, 111, 0, 116, 0, 117, 0, ! 84, 0, 87, 0, 51, 0, 118, 0, 121, 0, ! 122, 0, 118, 0, 118, 0, 116, 246, 0, 122, ! 246, 0, 123, 0, 124, 0, 125, 0, 122, 103, ! 125, 0, 88, 0, 0, 129, 0, 127, 0, 128, ! 0, 129, 127, 0, 129, 128, 0, 127, 128, 0, ! 129, 127, 128, 0, 130, 0, 127, 130, 0, 133, ! 0, 128, 133, 0, 76, 122, 101, 0, 76, 1, ! 0, 76, 122, 1, 0, 131, 0, 132, 0, 56, ! 122, 101, 0, 56, 1, 0, 56, 122, 1, 0, ! 56, 122, 103, 5, 101, 0, 56, 122, 103, 1, ! 0, 56, 122, 103, 5, 1, 0, 135, 0, 170, ! 0, 193, 0, 1, 0, 45, 0, 134, 45, 0, ! 0, 134, 68, 125, 138, 139, 136, 141, 0, 0, ! 68, 125, 138, 139, 137, 141, 0, 134, 68, 1, ! 0, 68, 1, 0, 68, 125, 1, 0, 134, 68, ! 125, 1, 0, 0, 64, 119, 0, 64, 119, 1, ! 0, 64, 1, 0, 0, 53, 140, 0, 53, 1, ! 0, 120, 0, 140, 102, 120, 0, 140, 102, 1, ! 0, 97, 98, 0, 97, 142, 98, 0, 143, 0, ! 142, 143, 0, 144, 0, 160, 0, 162, 0, 183, ! 0, 145, 0, 150, 0, 135, 0, 170, 0, 193, ! 0, 115, 146, 101, 0, 134, 115, 146, 101, 0, ! 147, 0, 146, 102, 147, 0, 146, 102, 1, 0, ! 148, 0, 148, 94, 149, 0, 148, 94, 1, 0, ! 148, 94, 149, 1, 0, 125, 0, 148, 99, 100, ! 0, 125, 1, 0, 148, 99, 1, 0, 148, 100, ! 1, 0, 274, 0, 181, 0, 0, 152, 151, 159, ! 0, 152, 1, 0, 115, 153, 157, 0, 60, 153, ! 157, 0, 134, 115, 153, 157, 0, 134, 60, 153, ! 157, 0, 115, 1, 0, 134, 115, 1, 0, 60, ! 1, 0, 134, 60, 1, 0, 134, 1, 0, 125, ! 95, 96, 0, 125, 95, 154, 96, 0, 153, 99, ! 100, 0, 125, 95, 1, 0, 153, 99, 1, 0, ! 155, 0, 154, 102, 155, 0, 154, 102, 1, 0, ! 115, 148, 0, 156, 115, 148, 0, 115, 1, 0, ! 156, 115, 1, 0, 134, 0, 0, 54, 158, 0, ! 54, 1, 0, 119, 0, 158, 102, 119, 0, 158, ! 102, 1, 0, 183, 0, 101, 0, 161, 183, 0, ! 134, 0, 0, 164, 163, 166, 0, 165, 157, 0, ! 134, 165, 157, 0, 123, 95, 96, 0, 123, 95, ! 154, 96, 0, 184, 167, 0, 184, 168, 167, 0, ! 184, 186, 167, 0, 184, 168, 186, 167, 0, 185, ! 0, 169, 95, 96, 101, 0, 169, 95, 242, 96, ! 101, 0, 122, 103, 66, 95, 242, 96, 101, 0, ! 122, 103, 66, 95, 96, 101, 0, 77, 0, 66, ! 0, 0, 62, 125, 171, 176, 0, 0, 134, 62, ! 125, 172, 176, 0, 0, 62, 125, 175, 173, 176, ! 0, 0, 134, 62, 125, 175, 174, 176, 0, 62, ! 125, 1, 0, 134, 62, 125, 1, 0, 64, 120, ! 0, 175, 102, 120, 0, 64, 1, 0, 175, 102, ! 1, 0, 97, 98, 0, 97, 177, 98, 0, 178, ! 0, 177, 178, 0, 179, 0, 180, 0, 135, 0, ! 170, 0, 145, 0, 152, 101, 0, 152, 1, 0, ! 97, 98, 0, 97, 102, 98, 0, 97, 182, 98, ! 0, 97, 182, 102, 98, 0, 149, 0, 182, 102, ! 149, 0, 182, 102, 1, 0, 97, 98, 0, 184, ! 186, 185, 0, 97, 0, 98, 0, 187, 0, 186, ! 187, 0, 188, 0, 190, 0, 135, 0, 189, 101, ! 0, 115, 146, 0, 156, 115, 146, 0, 192, 0, ! 195, 0, 199, 0, 200, 0, 211, 0, 215, 0, ! 192, 0, 196, 0, 201, 0, 212, 0, 216, 0, ! 183, 0, 193, 0, 197, 0, 202, 0, 214, 0, ! 222, 0, 223, 0, 224, 0, 227, 0, 225, 0, ! 229, 0, 226, 0, 101, 0, 125, 90, 0, 194, ! 190, 0, 125, 1, 0, 194, 191, 0, 198, 101, ! 0, 1, 101, 0, 1, 97, 0, 1, 98, 0, ! 169, 95, 1, 0, 169, 95, 96, 1, 0, 169, ! 95, 242, 1, 0, 169, 95, 242, 96, 1, 0, ! 122, 103, 66, 1, 0, 122, 103, 66, 95, 1, ! 0, 122, 103, 66, 95, 242, 1, 0, 122, 103, ! 66, 95, 242, 96, 1, 0, 122, 103, 66, 95, ! 96, 1, 0, 271, 0, 255, 0, 256, 0, 251, ! 0, 252, 0, 248, 0, 237, 0, 49, 95, 274, ! 96, 190, 0, 49, 1, 0, 49, 95, 1, 0, ! 49, 95, 274, 1, 0, 49, 95, 274, 96, 191, ! 57, 190, 0, 49, 95, 274, 96, 191, 57, 191, ! 0, 0, 204, 203, 205, 0, 69, 95, 274, 96, ! 0, 69, 1, 0, 69, 95, 1, 0, 69, 95, ! 274, 96, 1, 0, 97, 98, 0, 97, 208, 98, ! 0, 97, 206, 98, 0, 97, 206, 208, 98, 0, ! 207, 0, 206, 207, 0, 208, 186, 0, 209, 0, ! 208, 209, 0, 63, 275, 90, 0, 48, 90, 0, ! 63, 1, 0, 63, 275, 1, 0, 48, 1, 0, ! 67, 95, 274, 96, 0, 210, 190, 0, 67, 1, ! 0, 67, 95, 1, 0, 67, 95, 274, 1, 0, ! 210, 191, 0, 52, 0, 213, 190, 67, 95, 274, ! 96, 101, 0, 218, 101, 274, 101, 220, 96, 190, ! 0, 218, 101, 101, 220, 96, 190, 0, 218, 101, ! 1, 0, 218, 101, 274, 101, 1, 0, 218, 101, ! 101, 1, 0, 218, 101, 274, 101, 220, 96, 191, ! 0, 218, 101, 101, 220, 96, 191, 0, 72, 95, ! 0, 72, 1, 0, 72, 95, 1, 0, 217, 219, ! 0, 0, 221, 0, 189, 0, 221, 1, 0, 0, ! 221, 0, 198, 0, 221, 102, 198, 0, 221, 102, ! 1, 0, 55, 101, 0, 55, 125, 101, 0, 55, ! 1, 0, 55, 125, 1, 0, 74, 101, 0, 74, ! 125, 101, 0, 74, 1, 0, 74, 125, 1, 0, ! 59, 101, 0, 59, 274, 101, 0, 59, 1, 0, ! 59, 274, 1, 0, 50, 274, 101, 0, 50, 1, ! 0, 50, 274, 1, 0, 78, 274, 90, 274, 101, ! 0, 78, 274, 101, 0, 78, 1, 0, 78, 274, ! 1, 0, 228, 95, 274, 96, 183, 0, 228, 95, ! 274, 96, 1, 0, 228, 1, 0, 228, 95, 1, ! 96, 0, 228, 95, 1, 0, 134, 0, 71, 183, ! 230, 0, 71, 183, 233, 0, 71, 183, 230, 233, ! 0, 71, 1, 0, 231, 0, 230, 231, 0, 232, ! 183, 0, 61, 95, 155, 96, 0, 61, 1, 0, ! 61, 95, 1, 0, 61, 95, 1, 96, 0, 65, ! 183, 0, 65, 1, 0, 235, 0, 243, 0, 114, ! 0, 77, 0, 95, 274, 96, 0, 237, 0, 247, ! 0, 248, 0, 249, 0, 236, 0, 122, 103, 77, ! 0, 95, 274, 1, 0, 122, 103, 1, 0, 116, ! 103, 1, 0, 60, 103, 1, 0, 122, 103, 68, ! 0, 121, 103, 68, 0, 116, 103, 68, 0, 60, ! 103, 68, 0, 73, 119, 95, 242, 96, 0, 73, ! 119, 95, 96, 0, 238, 0, 241, 125, 95, 96, ! 0, 241, 125, 95, 96, 141, 0, 241, 125, 95, ! 242, 96, 0, 241, 125, 95, 242, 96, 141, 0, ! 73, 1, 101, 0, 73, 119, 1, 0, 73, 119, ! 95, 1, 0, 73, 119, 95, 242, 1, 0, 241, ! 1, 0, 241, 125, 1, 0, 0, 73, 119, 95, ! 242, 96, 239, 141, 0, 0, 73, 119, 95, 96, ! 240, 141, 0, 122, 103, 73, 0, 234, 103, 73, ! 0, 274, 0, 242, 102, 274, 0, 242, 102, 1, ! 0, 73, 116, 244, 0, 73, 118, 244, 0, 73, ! 116, 244, 246, 0, 73, 118, 244, 246, 0, 73, ! 118, 246, 181, 0, 73, 116, 246, 181, 0, 73, ! 1, 100, 0, 73, 1, 99, 0, 245, 0, 244, ! 245, 0, 99, 274, 100, 0, 99, 274, 1, 0, ! 99, 1, 0, 99, 100, 0, 246, 99, 100, 0, ! 246, 99, 1, 0, 234, 103, 125, 0, 66, 103, ! 125, 0, 66, 1, 0, 122, 95, 96, 0, 122, ! 95, 242, 96, 0, 234, 103, 125, 95, 96, 0, ! 234, 103, 125, 95, 242, 96, 0, 66, 103, 125, ! 95, 96, 0, 66, 103, 125, 95, 242, 96, 0, ! 66, 103, 1, 96, 0, 66, 103, 1, 103, 0, ! 122, 99, 274, 100, 0, 235, 99, 274, 100, 0, ! 122, 99, 1, 0, 122, 99, 274, 1, 0, 235, ! 99, 1, 0, 235, 99, 274, 1, 0, 234, 0, ! 122, 0, 251, 0, 252, 0, 250, 47, 0, 250, ! 46, 0, 255, 0, 256, 0, 3, 254, 0, 257, ! 0, 3, 1, 0, 253, 0, 4, 253, 0, 4, ! 1, 0, 47, 254, 0, 47, 1, 0, 46, 254, ! 0, 46, 1, 0, 250, 0, 91, 254, 0, 92, ! 254, 0, 258, 0, 91, 1, 0, 92, 1, 0, ! 95, 116, 246, 96, 254, 0, 95, 116, 96, 254, ! 0, 95, 274, 96, 257, 0, 95, 122, 246, 96, ! 257, 0, 95, 116, 99, 1, 0, 95, 1, 0, ! 95, 116, 246, 96, 1, 0, 95, 116, 96, 1, ! 0, 95, 122, 246, 96, 1, 0, 254, 0, 259, ! 5, 254, 0, 259, 6, 254, 0, 259, 7, 254, ! 0, 259, 5, 1, 0, 259, 6, 1, 0, 259, ! 7, 1, 0, 259, 0, 260, 3, 259, 0, 260, ! 4, 259, 0, 260, 3, 1, 0, 260, 4, 1, ! 0, 260, 0, 261, 8, 260, 0, 261, 9, 260, ! 0, 261, 10, 260, 0, 261, 8, 1, 0, 261, ! 9, 1, 0, 261, 10, 1, 0, 261, 0, 262, ! 20, 261, 0, 262, 18, 261, 0, 262, 21, 261, ! 0, 262, 19, 261, 0, 262, 58, 117, 0, 262, ! 20, 1, 0, 262, 18, 1, 0, 262, 21, 1, ! 0, 262, 19, 1, 0, 262, 58, 1, 0, 262, ! 0, 263, 16, 262, 0, 263, 17, 262, 0, 263, ! 16, 1, 0, 263, 17, 1, 0, 263, 0, 264, ! 11, 263, 0, 264, 11, 1, 0, 264, 0, 265, ! 12, 264, 0, 265, 12, 1, 0, 265, 0, 266, ! 13, 265, 0, 266, 13, 1, 0, 266, 0, 267, ! 14, 266, 0, 267, 14, 1, 0, 267, 0, 268, ! 15, 267, 0, 268, 15, 1, 0, 268, 0, 268, ! 89, 274, 90, 269, 0, 268, 89, 90, 1, 0, ! 268, 89, 1, 0, 268, 89, 274, 90, 1, 0, ! 269, 0, 271, 0, 272, 273, 270, 0, 272, 273, ! 1, 0, 122, 0, 247, 0, 249, 0, 93, 0, ! 94, 0, 270, 0, 274, 0 }; #endif --- 588,822 ---- #if YYDEBUG static const short yyprhs[] = { ! 0, 0, 2, 4, 6, 8, 10, 12, 14, 16, ! 18, 20, 22, 24, 26, 28, 30, 32, 34, 37, ! 40, 42, 44, 46, 50, 52, 53, 55, 57, 59, ! 62, 65, 68, 72, 74, 77, 79, 82, 86, 89, ! 93, 95, 97, 101, 104, 108, 114, 119, 125, 127, ! 129, 131, 133, 135, 138, 139, 147, 148, 155, 159, ! 162, 166, 171, 172, 175, 179, 182, 183, 186, 189, ! 191, 195, 199, 202, 206, 208, 211, 213, 215, 217, ! 219, 221, 223, 225, 227, 229, 233, 238, 240, 244, ! 248, 250, 254, 258, 263, 265, 269, 272, 276, 280, ! 282, 284, 285, 289, 292, 296, 300, 305, 310, 313, ! 317, 320, 324, 327, 331, 336, 340, 344, 348, 350, ! 354, 358, 361, 365, 368, 372, 374, 375, 378, 381, ! 383, 387, 391, 393, 395, 398, 400, 401, 405, 408, ! 412, 416, 421, 424, 428, 432, 437, 439, 444, 450, ! 458, 465, 467, 469, 470, 475, 476, 482, 483, 489, ! 490, 497, 501, 506, 509, 513, 516, 520, 523, 527, ! 529, 532, 534, 536, 538, 540, 542, 545, 548, 551, ! 555, 559, 564, 566, 570, 574, 577, 581, 583, 585, ! 587, 590, 592, 594, 596, 599, 602, 606, 608, 610, 612, 614, 616, 618, 620, 622, 624, 626, 628, 630, 632, 634, 636, 638, 640, 642, 644, 646, 648, 650, ! 652, 654, 657, 660, 663, 666, 669, 672, 675, 678, ! 682, 687, 692, 698, 703, 709, 716, 724, 731, 733, ! 735, 737, 739, 741, 743, 745, 751, 754, 758, 763, ! 771, 779, 780, 784, 789, 792, 796, 802, 805, 809, ! 813, 818, 820, 823, 826, 828, 831, 835, 838, 841, ! 845, 848, 853, 856, 859, 863, 868, 871, 873, 881, ! 889, 896, 900, 906, 911, 919, 926, 929, 932, 936, ! 939, 940, 942, 944, 947, 948, 950, 952, 956, 960, ! 963, 967, 970, 974, 977, 981, 984, 988, 991, 995, ! 998, 1002, 1006, 1009, 1013, 1019, 1023, 1026, 1030, 1036, ! 1042, 1045, 1050, 1054, 1056, 1060, 1064, 1069, 1072, 1074, ! 1077, 1080, 1085, 1088, 1092, 1097, 1100, 1103, 1105, 1107, ! 1109, 1111, 1115, 1117, 1119, 1121, 1123, 1125, 1129, 1133, ! 1137, 1141, 1145, 1149, 1153, 1157, 1161, 1167, 1172, 1174, ! 1179, 1185, 1191, 1198, 1202, 1206, 1211, 1217, 1220, 1224, ! 1225, 1233, 1234, 1241, 1245, 1249, 1251, 1255, 1259, 1263, ! 1267, 1272, 1277, 1282, 1287, 1291, 1295, 1297, 1300, 1304, ! 1308, 1311, 1314, 1318, 1322, 1326, 1330, 1333, 1337, 1342, ! 1348, 1355, 1361, 1368, 1373, 1378, 1383, 1388, 1392, 1397, ! 1401, 1406, 1408, 1410, 1412, 1414, 1417, 1420, 1422, 1424, ! 1427, 1429, 1432, 1434, 1437, 1440, 1443, 1446, 1449, 1452, ! 1454, 1457, 1460, 1462, 1465, 1468, 1474, 1479, 1484, 1490, ! 1495, 1498, 1504, 1509, 1515, 1517, 1521, 1525, 1529, 1533, ! 1537, 1541, 1543, 1547, 1551, 1555, 1559, 1561, 1565, 1569, ! 1573, 1577, 1581, 1585, 1587, 1591, 1595, 1599, 1603, 1607, ! 1611, 1615, 1619, 1623, 1627, 1629, 1633, 1637, 1641, 1645, ! 1647, 1651, 1655, 1657, 1661, 1665, 1667, 1671, 1675, 1677, ! 1681, 1685, 1687, 1691, 1695, 1697, 1703, 1708, 1712, 1718, ! 1720, 1722, 1726, 1730, 1732, 1734, 1736, 1738, 1740, 1742 }; static const short yyrhs[] = { ! 125, 0, 106, 0, 107, 0, 110, 0, 105, 0, ! 104, 0, 111, 0, 115, 0, 116, 0, 84, 0, ! 87, 0, 51, 0, 117, 0, 120, 0, 121, 0, ! 117, 0, 117, 0, 115, 245, 0, 121, 245, 0, ! 122, 0, 123, 0, 124, 0, 121, 103, 124, 0, ! 88, 0, 0, 128, 0, 126, 0, 127, 0, 128, ! 126, 0, 128, 127, 0, 126, 127, 0, 128, 126, ! 127, 0, 129, 0, 126, 129, 0, 132, 0, 127, ! 132, 0, 76, 121, 101, 0, 76, 1, 0, 76, ! 121, 1, 0, 130, 0, 131, 0, 56, 121, 101, ! 0, 56, 1, 0, 56, 121, 1, 0, 56, 121, ! 103, 5, 101, 0, 56, 121, 103, 1, 0, 56, ! 121, 103, 5, 1, 0, 134, 0, 169, 0, 192, ! 0, 1, 0, 45, 0, 133, 45, 0, 0, 133, ! 68, 124, 137, 138, 135, 140, 0, 0, 68, 124, ! 137, 138, 136, 140, 0, 133, 68, 1, 0, 68, ! 1, 0, 68, 124, 1, 0, 133, 68, 124, 1, ! 0, 0, 64, 118, 0, 64, 118, 1, 0, 64, ! 1, 0, 0, 53, 139, 0, 53, 1, 0, 119, ! 0, 139, 102, 119, 0, 139, 102, 1, 0, 97, ! 98, 0, 97, 141, 98, 0, 142, 0, 141, 142, ! 0, 143, 0, 159, 0, 161, 0, 182, 0, 144, ! 0, 149, 0, 134, 0, 169, 0, 192, 0, 114, ! 145, 101, 0, 133, 114, 145, 101, 0, 146, 0, ! 145, 102, 146, 0, 145, 102, 1, 0, 147, 0, ! 147, 94, 148, 0, 147, 94, 1, 0, 147, 94, ! 148, 1, 0, 124, 0, 147, 99, 100, 0, 124, ! 1, 0, 147, 99, 1, 0, 147, 100, 1, 0, ! 273, 0, 180, 0, 0, 151, 150, 158, 0, 151, ! 1, 0, 114, 152, 156, 0, 60, 152, 156, 0, ! 133, 114, 152, 156, 0, 133, 60, 152, 156, 0, ! 114, 1, 0, 133, 114, 1, 0, 60, 1, 0, ! 133, 60, 1, 0, 133, 1, 0, 124, 95, 96, ! 0, 124, 95, 153, 96, 0, 152, 99, 100, 0, ! 124, 95, 1, 0, 152, 99, 1, 0, 154, 0, ! 153, 102, 154, 0, 153, 102, 1, 0, 114, 147, ! 0, 155, 114, 147, 0, 114, 1, 0, 155, 114, ! 1, 0, 133, 0, 0, 54, 157, 0, 54, 1, ! 0, 118, 0, 157, 102, 118, 0, 157, 102, 1, ! 0, 182, 0, 101, 0, 160, 182, 0, 133, 0, ! 0, 163, 162, 165, 0, 164, 156, 0, 133, 164, ! 156, 0, 122, 95, 96, 0, 122, 95, 153, 96, ! 0, 183, 166, 0, 183, 167, 166, 0, 183, 185, ! 166, 0, 183, 167, 185, 166, 0, 184, 0, 168, ! 95, 96, 101, 0, 168, 95, 241, 96, 101, 0, ! 121, 103, 66, 95, 241, 96, 101, 0, 121, 103, ! 66, 95, 96, 101, 0, 77, 0, 66, 0, 0, ! 62, 124, 170, 175, 0, 0, 133, 62, 124, 171, ! 175, 0, 0, 62, 124, 174, 172, 175, 0, 0, ! 133, 62, 124, 174, 173, 175, 0, 62, 124, 1, ! 0, 133, 62, 124, 1, 0, 64, 119, 0, 174, ! 102, 119, 0, 64, 1, 0, 174, 102, 1, 0, ! 97, 98, 0, 97, 176, 98, 0, 177, 0, 176, ! 177, 0, 178, 0, 179, 0, 134, 0, 169, 0, ! 144, 0, 151, 101, 0, 151, 1, 0, 97, 98, ! 0, 97, 102, 98, 0, 97, 181, 98, 0, 97, ! 181, 102, 98, 0, 148, 0, 181, 102, 148, 0, ! 181, 102, 1, 0, 183, 184, 0, 183, 185, 184, ! 0, 97, 0, 98, 0, 186, 0, 185, 186, 0, ! 187, 0, 189, 0, 134, 0, 188, 101, 0, 114, ! 145, 0, 155, 114, 145, 0, 191, 0, 194, 0, ! 198, 0, 199, 0, 210, 0, 214, 0, 191, 0, ! 195, 0, 200, 0, 211, 0, 215, 0, 182, 0, ! 192, 0, 196, 0, 201, 0, 213, 0, 221, 0, ! 222, 0, 223, 0, 226, 0, 224, 0, 228, 0, ! 225, 0, 101, 0, 124, 90, 0, 193, 189, 0, ! 124, 1, 0, 193, 190, 0, 197, 101, 0, 1, ! 101, 0, 1, 97, 0, 1, 98, 0, 168, 95, ! 1, 0, 168, 95, 96, 1, 0, 168, 95, 241, ! 1, 0, 168, 95, 241, 96, 1, 0, 121, 103, ! 66, 1, 0, 121, 103, 66, 95, 1, 0, 121, ! 103, 66, 95, 241, 1, 0, 121, 103, 66, 95, ! 241, 96, 1, 0, 121, 103, 66, 95, 96, 1, ! 0, 270, 0, 254, 0, 255, 0, 250, 0, 251, ! 0, 247, 0, 236, 0, 49, 95, 273, 96, 189, ! 0, 49, 1, 0, 49, 95, 1, 0, 49, 95, ! 273, 1, 0, 49, 95, 273, 96, 190, 57, 189, ! 0, 49, 95, 273, 96, 190, 57, 190, 0, 0, ! 203, 202, 204, 0, 69, 95, 273, 96, 0, 69, ! 1, 0, 69, 95, 1, 0, 69, 95, 273, 96, ! 1, 0, 97, 98, 0, 97, 207, 98, 0, 97, ! 205, 98, 0, 97, 205, 207, 98, 0, 206, 0, ! 205, 206, 0, 207, 185, 0, 208, 0, 207, 208, ! 0, 63, 274, 90, 0, 48, 90, 0, 63, 1, ! 0, 63, 274, 1, 0, 48, 1, 0, 67, 95, ! 273, 96, 0, 209, 189, 0, 67, 1, 0, 67, ! 95, 1, 0, 67, 95, 273, 1, 0, 209, 190, ! 0, 52, 0, 212, 189, 67, 95, 273, 96, 101, ! 0, 217, 101, 273, 101, 219, 96, 189, 0, 217, ! 101, 101, 219, 96, 189, 0, 217, 101, 1, 0, ! 217, 101, 273, 101, 1, 0, 217, 101, 101, 1, ! 0, 217, 101, 273, 101, 219, 96, 190, 0, 217, ! 101, 101, 219, 96, 190, 0, 72, 95, 0, 72, ! 1, 0, 72, 95, 1, 0, 216, 218, 0, 0, ! 220, 0, 188, 0, 220, 1, 0, 0, 220, 0, ! 197, 0, 220, 102, 197, 0, 220, 102, 1, 0, ! 55, 101, 0, 55, 124, 101, 0, 55, 1, 0, ! 55, 124, 1, 0, 74, 101, 0, 74, 124, 101, ! 0, 74, 1, 0, 74, 124, 1, 0, 59, 101, ! 0, 59, 273, 101, 0, 59, 1, 0, 59, 273, ! 1, 0, 50, 273, 101, 0, 50, 1, 0, 50, ! 273, 1, 0, 78, 273, 90, 273, 101, 0, 78, ! 273, 101, 0, 78, 1, 0, 78, 273, 1, 0, ! 227, 95, 273, 96, 182, 0, 227, 95, 273, 96, ! 1, 0, 227, 1, 0, 227, 95, 1, 96, 0, ! 227, 95, 1, 0, 133, 0, 71, 182, 229, 0, ! 71, 182, 232, 0, 71, 182, 229, 232, 0, 71, ! 1, 0, 230, 0, 229, 230, 0, 231, 182, 0, ! 61, 95, 154, 96, 0, 61, 1, 0, 61, 95, ! 1, 0, 61, 95, 1, 96, 0, 65, 182, 0, ! 65, 1, 0, 234, 0, 242, 0, 113, 0, 77, ! 0, 95, 273, 96, 0, 236, 0, 246, 0, 247, ! 0, 248, 0, 235, 0, 121, 103, 77, 0, 95, ! 273, 1, 0, 121, 103, 1, 0, 115, 103, 1, ! 0, 60, 103, 1, 0, 121, 103, 68, 0, 120, ! 103, 68, 0, 115, 103, 68, 0, 60, 103, 68, ! 0, 73, 118, 95, 241, 96, 0, 73, 118, 95, ! 96, 0, 237, 0, 240, 124, 95, 96, 0, 240, ! 124, 95, 96, 140, 0, 240, 124, 95, 241, 96, ! 0, 240, 124, 95, 241, 96, 140, 0, 73, 1, ! 101, 0, 73, 118, 1, 0, 73, 118, 95, 1, ! 0, 73, 118, 95, 241, 1, 0, 240, 1, 0, ! 240, 124, 1, 0, 0, 73, 118, 95, 241, 96, ! 238, 140, 0, 0, 73, 118, 95, 96, 239, 140, ! 0, 121, 103, 73, 0, 233, 103, 73, 0, 273, ! 0, 241, 102, 273, 0, 241, 102, 1, 0, 73, ! 115, 243, 0, 73, 117, 243, 0, 73, 115, 243, ! 245, 0, 73, 117, 243, 245, 0, 73, 117, 245, ! 180, 0, 73, 115, 245, 180, 0, 73, 1, 100, ! 0, 73, 1, 99, 0, 244, 0, 243, 244, 0, ! 99, 273, 100, 0, 99, 273, 1, 0, 99, 1, ! 0, 99, 100, 0, 245, 99, 100, 0, 245, 99, ! 1, 0, 233, 103, 124, 0, 66, 103, 124, 0, ! 66, 1, 0, 121, 95, 96, 0, 121, 95, 241, ! 96, 0, 233, 103, 124, 95, 96, 0, 233, 103, ! 124, 95, 241, 96, 0, 66, 103, 124, 95, 96, ! 0, 66, 103, 124, 95, 241, 96, 0, 66, 103, ! 1, 96, 0, 66, 103, 1, 103, 0, 121, 99, ! 273, 100, 0, 234, 99, 273, 100, 0, 121, 99, ! 1, 0, 121, 99, 273, 1, 0, 234, 99, 1, ! 0, 234, 99, 273, 1, 0, 233, 0, 121, 0, ! 250, 0, 251, 0, 249, 47, 0, 249, 46, 0, ! 254, 0, 255, 0, 3, 253, 0, 256, 0, 3, ! 1, 0, 252, 0, 4, 252, 0, 4, 1, 0, ! 47, 253, 0, 47, 1, 0, 46, 253, 0, 46, ! 1, 0, 249, 0, 91, 253, 0, 92, 253, 0, ! 257, 0, 91, 1, 0, 92, 1, 0, 95, 115, ! 245, 96, 253, 0, 95, 115, 96, 253, 0, 95, ! 273, 96, 256, 0, 95, 121, 245, 96, 256, 0, ! 95, 115, 99, 1, 0, 95, 1, 0, 95, 115, ! 245, 96, 1, 0, 95, 115, 96, 1, 0, 95, ! 121, 245, 96, 1, 0, 253, 0, 258, 5, 253, ! 0, 258, 6, 253, 0, 258, 7, 253, 0, 258, ! 5, 1, 0, 258, 6, 1, 0, 258, 7, 1, ! 0, 258, 0, 259, 3, 258, 0, 259, 4, 258, ! 0, 259, 3, 1, 0, 259, 4, 1, 0, 259, ! 0, 260, 8, 259, 0, 260, 9, 259, 0, 260, ! 10, 259, 0, 260, 8, 1, 0, 260, 9, 1, ! 0, 260, 10, 1, 0, 260, 0, 261, 20, 260, ! 0, 261, 18, 260, 0, 261, 21, 260, 0, 261, ! 19, 260, 0, 261, 58, 116, 0, 261, 20, 1, ! 0, 261, 18, 1, 0, 261, 21, 1, 0, 261, ! 19, 1, 0, 261, 58, 1, 0, 261, 0, 262, ! 16, 261, 0, 262, 17, 261, 0, 262, 16, 1, ! 0, 262, 17, 1, 0, 262, 0, 263, 11, 262, ! 0, 263, 11, 1, 0, 263, 0, 264, 12, 263, ! 0, 264, 12, 1, 0, 264, 0, 265, 13, 264, ! 0, 265, 13, 1, 0, 265, 0, 266, 14, 265, ! 0, 266, 14, 1, 0, 266, 0, 267, 15, 266, ! 0, 267, 15, 1, 0, 267, 0, 267, 89, 273, ! 90, 268, 0, 267, 89, 90, 1, 0, 267, 89, ! 1, 0, 267, 89, 273, 90, 1, 0, 268, 0, ! 270, 0, 271, 272, 269, 0, 271, 272, 1, 0, ! 121, 0, 246, 0, 248, 0, 93, 0, 94, 0, ! 269, 0, 273, 0 }; #endif *************** static const short yyrhs[] = *** 828,885 **** /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const short yyrline[] = { ! 0, 605, 605, 621, 623, 624, 625, 626, 627, 631, ! 633, 636, 638, 639, 642, 644, 647, 651, 655, 659, ! 668, 679, 681, 684, 688, 693, 698, 700, 701, 702, ! 703, 704, 705, 706, 709, 714, 720, 722, 725, 731, ! 733, 737, 739, 742, 769, 771, 775, 794, 796, 800, ! 803, 805, 806, 816, 821, 836, 836, 841, 841, 845, ! 847, 849, 854, 858, 860, 862, 864, 868, 870, 872, ! 879, 885, 890, 894, 903, 913, 915, 918, 920, 921, ! 922, 932, 934, 935, 937, 939, 943, 946, 956, 959, ! 961, 965, 968, 975, 981, 989, 991, 993, 995, 1000, ! 1004, 1006, 1010, 1010, 1022, 1026, 1029, 1031, 1033, 1035, ! 1040, 1045, 1050, 1055, 1062, 1068, 1070, 1079, 1081, 1085, ! 1090, 1095, 1099, 1104, 1109, 1114, 1121, 1131, 1133, 1135, ! 1139, 1142, 1144, 1148, 1150, 1154, 1163, 1179, 1179, 1189, ! 1192, 1196, 1202, 1206, 1215, 1217, 1219, 1223, 1228, 1235, ! 1243, 1245, 1249, 1256, 1266, 1266, 1271, 1271, 1275, 1275, ! 1279, 1279, 1283, 1285, 1289, 1295, 1300, 1302, 1306, 1309, ! 1313, 1315, 1318, 1320, 1321, 1323, 1327, 1331, 1337, 1342, ! 1345, 1347, 1349, 1353, 1359, 1363, 1368, 1377, 1381, 1386, ! 1400, 1402, 1405, 1407, 1409, 1416, 1420, 1423, 1427, 1429, ! 1430, 1431, 1432, 1433, 1437, 1439, 1440, 1441, 1442, 1446, ! 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, ! 1458, 1461, 1479, 1490, 1493, 1497, 1504, 1514, 1519, 1524, ! 1529, 1531, 1536, 1538, 1543, 1545, 1547, 1549, 1551, 1555, ! 1557, 1558, 1559, 1560, 1561, 1562, 1565, 1571, 1573, 1575, ! 1579, 1584, 1589, 1589, 1605, 1611, 1613, 1615, 1622, 1625, ! 1627, 1629, 1633, 1635, 1638, 1642, 1644, 1647, 1654, 1660, ! 1662, 1664, 1668, 1676, 1679, 1681, 1683, 1687, 1692, 1701, ! 1706, 1713, 1720, 1722, 1724, 1728, 1731, 1740, 1747, 1749, ! 1753, 1766, 1768, 1774, 1780, 1784, 1786, 1790, 1793, 1795, ! 1799, 1802, 1804, 1806, 1810, 1813, 1815, 1817, 1821, 1824, ! 1826, 1828, 1832, 1838, 1840, 1844, 1849, 1853, 1855, 1859, ! 1866, 1868, 1870, 1872, 1876, 1888, 1891, 1893, 1898, 1902, ! 1904, 1911, 1920, 1937, 1939, 1944, 1948, 1951, 1956, 1958, ! 1961, 1963, 1965, 1967, 1968, 1969, 1970, 1971, 1975, 1980, ! 1982, 1984, 1986, 1990, 1993, 1995, 1997, 2004, 2007, 2009, ! 2013, 2019, 2020, 2026, 2027, 2029, 2031, 2033, 2035, 2037, ! 2046, 2046, 2080, 2080, 2097, 2100, 2104, 2110, 2115, 2119, ! 2122, 2124, 2126, 2130, 2141, 2150, 2152, 2156, 2159, 2163, ! 2174, 2176, 2184, 2211, 2213, 2217, 2222, 2228, 2232, 2235, ! 2237, 2248, 2259, 2264, 2273, 2275, 2279, 2282, 2284, 2289, ! 2294, 2299, 2306, 2308, 2309, 2310, 2313, 2318, 2323, 2325, ! 2326, 2328, 2329, 2333, 2339, 2341, 2345, 2348, 2352, 2355, ! 2359, 2361, 2363, 2365, 2366, 2368, 2372, 2381, 2383, 2385, ! 2399, 2401, 2406, 2408, 2410, 2414, 2416, 2421, 2426, 2431, ! 2433, 2435, 2439, 2441, 2446, 2451, 2453, 2457, 2459, 2464, ! 2469, 2474, 2476, 2478, 2482, 2484, 2489, 2494, 2499, 2504, ! 2506, 2508, 2510, 2512, 2514, 2518, 2520, 2525, 2530, 2532, ! 2536, 2538, 2543, 2547, 2549, 2554, 2558, 2560, 2565, 2569, ! 2571, 2576, 2580, 2582, 2587, 2591, 2593, 2598, 2604, 2606, ! 2610, 2612, 2615, 2618, 2625, 2627, 2628, 2631, 2633, 2636, ! 2640 }; #endif --- 825,881 ---- /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const short yyrline[] = { ! 0, 603, 608, 610, 611, 612, 613, 614, 618, 620, ! 623, 625, 626, 629, 631, 634, 638, 642, 646, 655, ! 666, 668, 671, 675, 680, 685, 687, 688, 689, 690, ! 691, 692, 693, 696, 701, 707, 709, 712, 718, 720, ! 724, 726, 729, 756, 758, 762, 781, 783, 787, 790, ! 792, 793, 803, 808, 823, 823, 828, 828, 832, 834, ! 836, 841, 845, 847, 849, 851, 855, 857, 859, 866, ! 872, 877, 881, 890, 900, 902, 905, 907, 908, 909, ! 919, 921, 922, 924, 926, 930, 933, 943, 946, 948, ! 952, 955, 962, 968, 976, 978, 980, 982, 987, 991, ! 993, 997, 997, 1009, 1013, 1016, 1018, 1020, 1022, 1027, ! 1032, 1037, 1042, 1049, 1055, 1057, 1066, 1068, 1072, 1077, ! 1082, 1086, 1091, 1096, 1101, 1108, 1118, 1120, 1122, 1126, ! 1129, 1131, 1135, 1137, 1141, 1150, 1166, 1166, 1176, 1179, ! 1183, 1189, 1193, 1202, 1204, 1206, 1210, 1215, 1222, 1230, ! 1232, 1236, 1243, 1253, 1253, 1258, 1258, 1262, 1262, 1266, ! 1266, 1270, 1272, 1276, 1282, 1287, 1289, 1293, 1296, 1300, ! 1302, 1305, 1307, 1308, 1310, 1314, 1318, 1324, 1329, 1332, ! 1334, 1336, 1340, 1346, 1350, 1355, 1358, 1362, 1367, 1381, ! 1383, 1386, 1388, 1390, 1397, 1401, 1404, 1408, 1410, 1411, ! 1412, 1413, 1414, 1418, 1420, 1421, 1422, 1423, 1427, 1429, ! 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, ! 1442, 1460, 1471, 1474, 1478, 1485, 1495, 1500, 1505, 1510, ! 1512, 1517, 1519, 1524, 1526, 1528, 1530, 1532, 1536, 1538, ! 1539, 1540, 1541, 1542, 1543, 1546, 1552, 1554, 1556, 1560, ! 1565, 1570, 1570, 1586, 1592, 1594, 1596, 1603, 1606, 1608, ! 1610, 1614, 1616, 1619, 1623, 1625, 1628, 1635, 1641, 1643, ! 1645, 1649, 1657, 1660, 1662, 1664, 1668, 1673, 1682, 1687, ! 1694, 1701, 1703, 1705, 1709, 1712, 1721, 1728, 1730, 1734, ! 1747, 1749, 1755, 1761, 1765, 1767, 1771, 1774, 1776, 1780, ! 1783, 1785, 1787, 1791, 1794, 1796, 1798, 1802, 1805, 1807, ! 1809, 1813, 1819, 1821, 1825, 1830, 1834, 1836, 1840, 1847, ! 1849, 1851, 1853, 1857, 1869, 1872, 1874, 1879, 1883, 1885, ! 1892, 1901, 1927, 1929, 1934, 1938, 1941, 1946, 1948, 1951, ! 1953, 1955, 1957, 1958, 1959, 1960, 1961, 1965, 1970, 1972, ! 1974, 1976, 1980, 1983, 1985, 1987, 1994, 1997, 1999, 2003, ! 2009, 2010, 2016, 2017, 2019, 2021, 2023, 2025, 2027, 2036, ! 2036, 2070, 2070, 2087, 2090, 2094, 2100, 2105, 2109, 2112, ! 2114, 2116, 2120, 2131, 2140, 2142, 2146, 2149, 2153, 2164, ! 2166, 2174, 2201, 2203, 2207, 2212, 2218, 2222, 2225, 2227, ! 2238, 2249, 2254, 2263, 2265, 2269, 2272, 2274, 2279, 2284, ! 2289, 2296, 2298, 2299, 2300, 2303, 2308, 2313, 2315, 2316, ! 2318, 2319, 2323, 2329, 2331, 2335, 2338, 2342, 2345, 2349, ! 2351, 2353, 2355, 2356, 2358, 2362, 2371, 2373, 2375, 2389, ! 2391, 2396, 2398, 2400, 2404, 2406, 2411, 2416, 2421, 2423, ! 2425, 2429, 2431, 2436, 2441, 2443, 2447, 2449, 2454, 2459, ! 2464, 2466, 2468, 2472, 2474, 2479, 2484, 2489, 2494, 2496, ! 2498, 2500, 2502, 2504, 2508, 2510, 2515, 2520, 2522, 2526, ! 2528, 2533, 2537, 2539, 2544, 2548, 2550, 2555, 2559, 2561, ! 2566, 2570, 2572, 2577, 2581, 2583, 2588, 2594, 2596, 2600, ! 2602, 2605, 2608, 2615, 2617, 2618, 2621, 2623, 2626, 2630 }; #endif *************** static const char *const yytname[] = *** 909,934 **** "REL_CL_TK", "NOT_TK", "NEG_TK", "ASSIGN_ANY_TK", "ASSIGN_TK", "OP_TK", "CP_TK", "OCB_TK", "CCB_TK", "OSB_TK", "CSB_TK", "SC_TK", "C_TK", "DOT_TK", "STRING_LIT_TK", "CHAR_LIT_TK", "INT_LIT_TK", "FP_LIT_TK", ! "TRUE_TK", "FALSE_TK", "BOOL_LIT_TK", "NULL_TK", "goal", "@1", ! "literal", "type", "primitive_type", "reference_type", ! "class_or_interface_type", "class_type", "interface_type", "array_type", ! "name", "simple_name", "qualified_name", "identifier", ! "compilation_unit", "import_declarations", "type_declarations", ! "package_declaration", "import_declaration", ! "single_type_import_declaration", "type_import_on_demand_declaration", ! "type_declaration", "modifiers", "class_declaration", "@2", "@3", ! "super", "interfaces", "interface_type_list", "class_body", ! "class_body_declarations", "class_body_declaration", ! "class_member_declaration", "field_declaration", "variable_declarators", ! "variable_declarator", "variable_declarator_id", "variable_initializer", ! "method_declaration", "@4", "method_header", "method_declarator", ! "formal_parameter_list", "formal_parameter", "final", "throws", ! "class_type_list", "method_body", "static_initializer", "static", ! "constructor_declaration", "@5", "constructor_header", ! "constructor_declarator", "constructor_body", "constructor_block_end", ! "explicit_constructor_invocation", "this_or_super", ! "interface_declaration", "@6", "@7", "@8", "@9", "extends_interfaces", ! "interface_body", "interface_member_declarations", "interface_member_declaration", "constant_declaration", "abstract_method_declaration", "array_initializer", "variable_initializers", "block", "block_begin", "block_end", --- 905,929 ---- "REL_CL_TK", "NOT_TK", "NEG_TK", "ASSIGN_ANY_TK", "ASSIGN_TK", "OP_TK", "CP_TK", "OCB_TK", "CCB_TK", "OSB_TK", "CSB_TK", "SC_TK", "C_TK", "DOT_TK", "STRING_LIT_TK", "CHAR_LIT_TK", "INT_LIT_TK", "FP_LIT_TK", ! "TRUE_TK", "FALSE_TK", "BOOL_LIT_TK", "NULL_TK", "goal", "literal", ! "type", "primitive_type", "reference_type", "class_or_interface_type", ! "class_type", "interface_type", "array_type", "name", "simple_name", ! "qualified_name", "identifier", "compilation_unit", ! "import_declarations", "type_declarations", "package_declaration", ! "import_declaration", "single_type_import_declaration", ! "type_import_on_demand_declaration", "type_declaration", "modifiers", ! "class_declaration", "@1", "@2", "super", "interfaces", ! "interface_type_list", "class_body", "class_body_declarations", ! "class_body_declaration", "class_member_declaration", ! "field_declaration", "variable_declarators", "variable_declarator", ! "variable_declarator_id", "variable_initializer", "method_declaration", ! "@3", "method_header", "method_declarator", "formal_parameter_list", ! "formal_parameter", "final", "throws", "class_type_list", "method_body", ! "static_initializer", "static", "constructor_declaration", "@4", ! "constructor_header", "constructor_declarator", "constructor_body", ! "constructor_block_end", "explicit_constructor_invocation", ! "this_or_super", "interface_declaration", "@5", "@6", "@7", "@8", ! "extends_interfaces", "interface_body", "interface_member_declarations", "interface_member_declaration", "constant_declaration", "abstract_method_declaration", "array_initializer", "variable_initializers", "block", "block_begin", "block_end", *************** static const char *const yytname[] = *** 938,944 **** "empty_statement", "label_decl", "labeled_statement", "labeled_statement_nsi", "expression_statement", "statement_expression", "if_then_statement", "if_then_else_statement", ! "if_then_else_statement_nsi", "switch_statement", "@10", "switch_expression", "switch_block", "switch_block_statement_groups", "switch_block_statement_group", "switch_labels", "switch_label", "while_expression", "while_statement", "while_statement_nsi", --- 933,939 ---- "empty_statement", "label_decl", "labeled_statement", "labeled_statement_nsi", "expression_statement", "statement_expression", "if_then_statement", "if_then_else_statement", ! "if_then_else_statement_nsi", "switch_statement", "@9", "switch_expression", "switch_block", "switch_block_statement_groups", "switch_block_statement_group", "switch_labels", "switch_label", "while_expression", "while_statement", "while_statement_nsi", *************** static const char *const yytname[] = *** 949,956 **** "assert_statement", "synchronized_statement", "synchronized", "try_statement", "catches", "catch_clause", "catch_clause_parameter", "finally", "primary", "primary_no_new_array", "type_literals", ! "class_instance_creation_expression", "anonymous_class_creation", "@11", ! "@12", "something_dot_new", "argument_list", "array_creation_expression", "dim_exprs", "dim_expr", "dims", "field_access", "method_invocation", "array_access", "postfix_expression", "post_increment_expression", --- 944,951 ---- "assert_statement", "synchronized_statement", "synchronized", "try_statement", "catches", "catch_clause", "catch_clause_parameter", "finally", "primary", "primary_no_new_array", "type_literals", ! "class_instance_creation_expression", "anonymous_class_creation", "@10", ! "@11", "something_dot_new", "argument_list", "array_creation_expression", "dim_exprs", "dim_expr", "dims", "field_access", "method_invocation", "array_access", "postfix_expression", "post_increment_expression", *************** static const char *const yytname[] = *** 970,1084 **** /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const short yyr1[] = { ! 0, 113, 112, 114, 114, 114, 114, 114, 114, 115, ! 115, 116, 116, 116, 117, 117, 118, 119, 120, 121, ! 121, 122, 122, 123, 124, 125, 126, 126, 126, 126, ! 126, 126, 126, 126, 127, 127, 128, 128, 129, 129, ! 129, 130, 130, 131, 131, 131, 132, 132, 132, 133, ! 133, 133, 133, 134, 134, 136, 135, 137, 135, 135, ! 135, 135, 135, 138, 138, 138, 138, 139, 139, 139, ! 140, 140, 140, 141, 141, 142, 142, 143, 143, 143, ! 143, 144, 144, 144, 144, 144, 145, 145, 146, 146, ! 146, 147, 147, 147, 147, 148, 148, 148, 148, 148, ! 149, 149, 151, 150, 150, 152, 152, 152, 152, 152, ! 152, 152, 152, 152, 153, 153, 153, 153, 153, 154, ! 154, 154, 155, 155, 155, 155, 156, 157, 157, 157, ! 158, 158, 158, 159, 159, 160, 161, 163, 162, 164, ! 164, 165, 165, 166, 166, 166, 166, 167, 168, 168, ! 168, 168, 169, 169, 171, 170, 172, 170, 173, 170, ! 174, 170, 170, 170, 175, 175, 175, 175, 176, 176, ! 177, 177, 178, 178, 178, 178, 179, 180, 180, 181, ! 181, 181, 181, 182, 182, 182, 183, 183, 184, 185, ! 186, 186, 187, 187, 187, 188, 189, 189, 190, 190, ! 190, 190, 190, 190, 191, 191, 191, 191, 191, 192, ! 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, ! 192, 193, 194, 195, 195, 196, 197, 197, 197, 197, ! 197, 197, 197, 197, 197, 197, 197, 197, 197, 198, ! 198, 198, 198, 198, 198, 198, 199, 199, 199, 199, ! 200, 201, 203, 202, 204, 204, 204, 204, 205, 205, ! 205, 205, 206, 206, 207, 208, 208, 209, 209, 209, ! 209, 209, 210, 211, 211, 211, 211, 212, 213, 214, ! 215, 215, 215, 215, 215, 216, 216, 217, 217, 217, ! 218, 219, 219, 219, 219, 220, 220, 221, 221, 221, ! 222, 222, 222, 222, 223, 223, 223, 223, 224, 224, ! 224, 224, 225, 225, 225, 226, 226, 226, 226, 227, ! 227, 227, 227, 227, 228, 229, 229, 229, 229, 230, ! 230, 231, 232, 232, 232, 232, 233, 233, 234, 234, ! 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, ! 235, 235, 235, 236, 236, 236, 236, 237, 237, 237, ! 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, ! 239, 238, 240, 238, 241, 241, 242, 242, 242, 243, ! 243, 243, 243, 243, 243, 243, 243, 244, 244, 245, ! 245, 245, 246, 246, 246, 247, 247, 247, 248, 248, ! 248, 248, 248, 248, 248, 248, 249, 249, 249, 249, ! 249, 249, 250, 250, 250, 250, 251, 252, 253, 253, ! 253, 253, 253, 254, 254, 254, 255, 255, 256, 256, ! 257, 257, 257, 257, 257, 257, 258, 258, 258, 258, ! 258, 258, 258, 258, 258, 259, 259, 259, 259, 259, ! 259, 259, 260, 260, 260, 260, 260, 261, 261, 261, ! 261, 261, 261, 261, 262, 262, 262, 262, 262, 262, ! 262, 262, 262, 262, 262, 263, 263, 263, 263, 263, ! 264, 264, 264, 265, 265, 265, 266, 266, 266, 267, ! 267, 267, 268, 268, 268, 269, 269, 269, 269, 269, ! 270, 270, 271, 271, 272, 272, 272, 273, 273, 274, ! 275 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const short yyr2[] = { ! 0, 0, 2, 1, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, ! 2, 1, 1, 1, 3, 1, 0, 1, 1, 1, ! 2, 2, 2, 3, 1, 2, 1, 2, 3, 2, ! 3, 1, 1, 3, 2, 3, 5, 4, 5, 1, ! 1, 1, 1, 1, 2, 0, 7, 0, 6, 3, ! 2, 3, 4, 0, 2, 3, 2, 0, 2, 2, ! 1, 3, 3, 2, 3, 1, 2, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 3, 4, 1, 3, ! 3, 1, 3, 3, 4, 1, 3, 2, 3, 3, ! 1, 1, 0, 3, 2, 3, 3, 4, 4, 2, ! 3, 2, 3, 2, 3, 4, 3, 3, 3, 1, ! 3, 3, 2, 3, 2, 3, 1, 0, 2, 2, ! 1, 3, 3, 1, 1, 2, 1, 0, 3, 2, ! 3, 3, 4, 2, 3, 3, 4, 1, 4, 5, ! 7, 6, 1, 1, 0, 4, 0, 5, 0, 5, ! 0, 6, 3, 4, 2, 3, 2, 3, 2, 3, ! 1, 2, 1, 1, 1, 1, 1, 2, 2, 2, ! 3, 3, 4, 1, 3, 3, 2, 3, 1, 1, ! 1, 2, 1, 1, 1, 2, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, ! 3, 4, 4, 5, 4, 5, 6, 7, 6, 1, ! 1, 1, 1, 1, 1, 1, 5, 2, 3, 4, ! 7, 7, 0, 3, 4, 2, 3, 5, 2, 3, ! 3, 4, 1, 2, 2, 1, 2, 3, 2, 2, ! 3, 2, 4, 2, 2, 3, 4, 2, 1, 7, ! 7, 6, 3, 5, 4, 7, 6, 2, 2, 3, ! 2, 0, 1, 1, 2, 0, 1, 1, 3, 3, ! 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, ! 2, 3, 3, 2, 3, 5, 3, 2, 3, 5, ! 5, 2, 4, 3, 1, 3, 3, 4, 2, 1, ! 2, 2, 4, 2, 3, 4, 2, 2, 1, 1, ! 1, 1, 3, 1, 1, 1, 1, 1, 3, 3, ! 3, 3, 3, 3, 3, 3, 3, 5, 4, 1, ! 4, 5, 5, 6, 3, 3, 4, 5, 2, 3, ! 0, 7, 0, 6, 3, 3, 1, 3, 3, 3, ! 3, 4, 4, 4, 4, 3, 3, 1, 2, 3, ! 3, 2, 2, 3, 3, 3, 3, 2, 3, 4, ! 5, 6, 5, 6, 4, 4, 4, 4, 3, 4, ! 3, 4, 1, 1, 1, 1, 2, 2, 1, 1, ! 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, ! 1, 2, 2, 1, 2, 2, 5, 4, 4, 5, ! 4, 2, 5, 4, 5, 1, 3, 3, 3, 3, ! 3, 3, 1, 3, 3, 3, 3, 1, 3, 3, ! 3, 3, 3, 3, 1, 3, 3, 3, 3, 3, ! 3, 3, 3, 3, 3, 1, 3, 3, 3, 3, ! 1, 3, 3, 1, 3, 3, 1, 3, 3, 1, ! 3, 3, 1, 3, 3, 1, 5, 4, 3, 5, ! 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, ! 1 }; /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE --- 965,1077 ---- /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const short yyr1[] = { ! 0, 112, 113, 113, 113, 113, 113, 113, 114, 114, ! 115, 115, 115, 116, 116, 117, 118, 119, 120, 120, ! 121, 121, 122, 123, 124, 125, 125, 125, 125, 125, ! 125, 125, 125, 126, 126, 127, 127, 128, 128, 128, ! 129, 129, 130, 130, 130, 131, 131, 131, 132, 132, ! 132, 132, 133, 133, 135, 134, 136, 134, 134, 134, ! 134, 134, 137, 137, 137, 137, 138, 138, 138, 139, ! 139, 139, 140, 140, 141, 141, 142, 142, 142, 142, ! 143, 143, 143, 143, 143, 144, 144, 145, 145, 145, ! 146, 146, 146, 146, 147, 147, 147, 147, 147, 148, ! 148, 150, 149, 149, 151, 151, 151, 151, 151, 151, ! 151, 151, 151, 152, 152, 152, 152, 152, 153, 153, ! 153, 154, 154, 154, 154, 155, 156, 156, 156, 157, ! 157, 157, 158, 158, 159, 160, 162, 161, 163, 163, ! 164, 164, 165, 165, 165, 165, 166, 167, 167, 167, ! 167, 168, 168, 170, 169, 171, 169, 172, 169, 173, ! 169, 169, 169, 174, 174, 174, 174, 175, 175, 176, ! 176, 177, 177, 177, 177, 178, 179, 179, 180, 180, ! 180, 180, 181, 181, 181, 182, 182, 183, 184, 185, ! 185, 186, 186, 186, 187, 188, 188, 189, 189, 189, ! 189, 189, 189, 190, 190, 190, 190, 190, 191, 191, ! 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, ! 192, 193, 194, 194, 195, 196, 196, 196, 196, 196, ! 196, 196, 196, 196, 196, 196, 196, 196, 197, 197, ! 197, 197, 197, 197, 197, 198, 198, 198, 198, 199, ! 200, 202, 201, 203, 203, 203, 203, 204, 204, 204, ! 204, 205, 205, 206, 207, 207, 208, 208, 208, 208, ! 208, 209, 210, 210, 210, 210, 211, 212, 213, 214, ! 214, 214, 214, 214, 215, 215, 216, 216, 216, 217, ! 218, 218, 218, 218, 219, 219, 220, 220, 220, 221, ! 221, 221, 221, 222, 222, 222, 222, 223, 223, 223, ! 223, 224, 224, 224, 225, 225, 225, 225, 226, 226, ! 226, 226, 226, 227, 228, 228, 228, 228, 229, 229, ! 230, 231, 231, 231, 231, 232, 232, 233, 233, 234, ! 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, ! 234, 234, 235, 235, 235, 235, 236, 236, 236, 236, ! 236, 236, 236, 236, 236, 236, 236, 236, 236, 238, ! 237, 239, 237, 240, 240, 241, 241, 241, 242, 242, ! 242, 242, 242, 242, 242, 242, 243, 243, 244, 244, ! 244, 245, 245, 245, 246, 246, 246, 247, 247, 247, ! 247, 247, 247, 247, 247, 248, 248, 248, 248, 248, ! 248, 249, 249, 249, 249, 250, 251, 252, 252, 252, ! 252, 252, 253, 253, 253, 254, 254, 255, 255, 256, ! 256, 256, 256, 256, 256, 257, 257, 257, 257, 257, ! 257, 257, 257, 257, 258, 258, 258, 258, 258, 258, ! 258, 259, 259, 259, 259, 259, 260, 260, 260, 260, ! 260, 260, 260, 261, 261, 261, 261, 261, 261, 261, ! 261, 261, 261, 261, 262, 262, 262, 262, 262, 263, ! 263, 263, 264, 264, 264, 265, 265, 265, 266, 266, ! 266, 267, 267, 267, 268, 268, 268, 268, 268, 269, ! 269, 270, 270, 271, 271, 271, 272, 272, 273, 274 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const short yyr2[] = { ! 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, ! 1, 1, 1, 3, 1, 0, 1, 1, 1, 2, ! 2, 2, 3, 1, 2, 1, 2, 3, 2, 3, ! 1, 1, 3, 2, 3, 5, 4, 5, 1, 1, ! 1, 1, 1, 2, 0, 7, 0, 6, 3, 2, ! 3, 4, 0, 2, 3, 2, 0, 2, 2, 1, ! 3, 3, 2, 3, 1, 2, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 3, 4, 1, 3, 3, ! 1, 3, 3, 4, 1, 3, 2, 3, 3, 1, ! 1, 0, 3, 2, 3, 3, 4, 4, 2, 3, ! 2, 3, 2, 3, 4, 3, 3, 3, 1, 3, ! 3, 2, 3, 2, 3, 1, 0, 2, 2, 1, ! 3, 3, 1, 1, 2, 1, 0, 3, 2, 3, ! 3, 4, 2, 3, 3, 4, 1, 4, 5, 7, ! 6, 1, 1, 0, 4, 0, 5, 0, 5, 0, ! 6, 3, 4, 2, 3, 2, 3, 2, 3, 1, ! 2, 1, 1, 1, 1, 1, 2, 2, 2, 3, ! 3, 4, 1, 3, 3, 2, 3, 1, 1, 1, ! 2, 1, 1, 1, 2, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, ! 4, 4, 5, 4, 5, 6, 7, 6, 1, 1, ! 1, 1, 1, 1, 1, 5, 2, 3, 4, 7, ! 7, 0, 3, 4, 2, 3, 5, 2, 3, 3, ! 4, 1, 2, 2, 1, 2, 3, 2, 2, 3, ! 2, 4, 2, 2, 3, 4, 2, 1, 7, 7, ! 6, 3, 5, 4, 7, 6, 2, 2, 3, 2, ! 0, 1, 1, 2, 0, 1, 1, 3, 3, 2, ! 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, ! 3, 3, 2, 3, 5, 3, 2, 3, 5, 5, ! 2, 4, 3, 1, 3, 3, 4, 2, 1, 2, ! 2, 4, 2, 3, 4, 2, 2, 1, 1, 1, ! 1, 3, 1, 1, 1, 1, 1, 3, 3, 3, ! 3, 3, 3, 3, 3, 3, 5, 4, 1, 4, ! 5, 5, 6, 3, 3, 4, 5, 2, 3, 0, ! 7, 0, 6, 3, 3, 1, 3, 3, 3, 3, ! 4, 4, 4, 4, 3, 3, 1, 2, 3, 3, ! 2, 2, 3, 3, 3, 3, 2, 3, 4, 5, ! 6, 5, 6, 4, 4, 4, 4, 3, 4, 3, ! 4, 1, 1, 1, 1, 2, 2, 1, 1, 2, ! 1, 2, 1, 2, 2, 2, 2, 2, 2, 1, ! 2, 2, 1, 2, 2, 5, 4, 4, 5, 4, ! 2, 5, 4, 5, 1, 3, 3, 3, 3, 3, ! 3, 1, 3, 3, 3, 3, 1, 3, 3, 3, ! 3, 3, 3, 1, 3, 3, 3, 3, 3, 3, ! 3, 3, 3, 3, 1, 3, 3, 3, 3, 1, ! 3, 3, 1, 3, 3, 1, 3, 3, 1, 3, ! 3, 1, 3, 3, 1, 5, 4, 3, 5, 1, ! 1, 3, 3, 1, 1, 1, 1, 1, 1, 1 }; /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE *************** static const short yyr2[] = *** 1086,2127 **** error. */ static const short yydefact[] = { ! 1, 0, 52, 53, 0, 0, 0, 0, 221, 2, ! 0, 0, 0, 34, 41, 42, 36, 0, 49, 50, ! 51, 44, 25, 0, 21, 22, 23, 0, 60, 0, ! 39, 0, 0, 35, 37, 0, 0, 54, 0, 0, ! 45, 43, 0, 162, 0, 0, 158, 61, 0, 67, ! 40, 38, 0, 0, 0, 59, 0, 47, 0, 24, ! 166, 18, 164, 16, 0, 155, 0, 0, 66, 17, ! 0, 0, 57, 163, 0, 160, 62, 67, 48, 46, ! 13, 0, 11, 12, 168, 0, 9, 10, 14, 15, ! 16, 0, 174, 176, 0, 175, 0, 170, 172, 173, ! 167, 165, 159, 65, 69, 70, 68, 0, 157, 0, ! 55, 111, 0, 127, 109, 0, 0, 88, 91, 127, ! 0, 19, 20, 113, 0, 0, 178, 177, 169, 171, ! 0, 0, 58, 161, 0, 0, 0, 0, 106, 97, ! 86, 0, 0, 0, 0, 105, 392, 0, 112, 127, ! 110, 0, 127, 72, 71, 188, 73, 21, 0, 83, ! 0, 75, 77, 81, 82, 0, 78, 0, 79, 137, ! 127, 84, 80, 0, 85, 56, 117, 114, 0, 126, ! 0, 119, 0, 129, 130, 128, 118, 116, 90, 0, ! 89, 93, 0, 0, 0, 0, 0, 0, 0, 341, ! 0, 0, 0, 0, 7, 6, 3, 4, 5, 8, ! 340, 0, 0, 413, 0, 101, 412, 338, 347, 343, ! 359, 0, 339, 344, 345, 346, 430, 414, 415, 423, ! 445, 418, 419, 421, 433, 452, 457, 464, 475, 480, ! 483, 486, 489, 492, 495, 500, 509, 501, 0, 100, ! 98, 96, 99, 394, 393, 108, 87, 107, 186, 0, ! 127, 74, 76, 104, 0, 135, 0, 139, 0, 0, ! 0, 278, 0, 0, 0, 0, 0, 0, 0, 0, ! 341, 0, 0, 0, 9, 15, 413, 0, 126, 194, ! 0, 0, 209, 0, 190, 192, 0, 193, 198, 210, ! 0, 199, 211, 0, 200, 201, 212, 252, 0, 202, ! 0, 213, 203, 291, 0, 214, 215, 216, 218, 220, ! 217, 0, 219, 245, 244, 0, 242, 243, 240, 241, ! 239, 124, 122, 115, 0, 0, 0, 422, 413, 344, ! 346, 420, 425, 424, 429, 428, 427, 426, 0, 397, ! 0, 0, 0, 17, 0, 434, 431, 435, 432, 441, ! 0, 413, 0, 179, 0, 183, 0, 0, 0, 0, ! 0, 0, 94, 0, 0, 368, 0, 417, 416, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 507, 508, 0, 141, 0, 140, 134, 103, 133, 188, ! 138, 0, 228, 229, 227, 247, 0, 313, 0, 302, ! 300, 0, 310, 308, 0, 274, 0, 255, 0, 328, ! 0, 288, 0, 306, 304, 0, 317, 0, 0, 196, ! 0, 224, 222, 0, 0, 189, 187, 191, 195, 413, ! 324, 223, 226, 0, 273, 0, 413, 293, 297, 290, ! 0, 0, 321, 0, 121, 120, 125, 123, 132, 131, ! 352, 356, 0, 396, 386, 385, 364, 0, 379, 387, ! 0, 380, 0, 365, 0, 0, 0, 19, 20, 349, ! 342, 180, 181, 0, 351, 355, 354, 398, 0, 376, ! 408, 0, 350, 353, 374, 348, 375, 395, 410, 0, ! 369, 0, 449, 446, 450, 447, 451, 448, 455, 453, ! 456, 454, 461, 458, 462, 459, 463, 460, 471, 466, ! 473, 468, 470, 465, 472, 467, 474, 0, 469, 478, ! 476, 479, 477, 482, 481, 485, 484, 488, 487, 491, ! 490, 494, 493, 498, 0, 0, 503, 502, 142, 413, ! 143, 0, 0, 147, 0, 248, 0, 314, 312, 303, ! 301, 311, 309, 275, 0, 256, 0, 0, 0, 325, ! 329, 0, 326, 289, 307, 305, 318, 0, 316, 342, ! 0, 197, 230, 0, 0, 0, 253, 0, 294, 0, ! 282, 0, 0, 323, 0, 404, 405, 0, 391, 0, ! 388, 381, 384, 382, 383, 366, 358, 0, 443, 437, ! 440, 0, 0, 438, 185, 182, 184, 399, 0, 409, ! 406, 0, 411, 407, 360, 0, 497, 0, 0, 144, ! 0, 0, 145, 249, 0, 276, 272, 0, 333, 0, ! 337, 336, 330, 327, 331, 0, 234, 0, 231, 232, ! 0, 0, 0, 258, 0, 262, 0, 265, 0, 299, ! 298, 284, 0, 296, 0, 322, 0, 402, 0, 390, ! 389, 0, 367, 357, 442, 436, 444, 439, 378, 377, ! 400, 0, 361, 362, 499, 496, 0, 146, 0, 0, ! 0, 246, 0, 198, 0, 205, 206, 0, 207, 208, ! 0, 257, 334, 0, 315, 235, 0, 0, 233, 271, ! 268, 269, 510, 0, 260, 263, 0, 259, 0, 266, ! 0, 0, 283, 0, 320, 319, 403, 373, 0, 401, ! 363, 0, 148, 0, 0, 0, 225, 277, 0, 335, ! 332, 238, 236, 0, 270, 267, 261, 0, 281, 0, ! 371, 0, 0, 149, 0, 250, 0, 0, 237, 279, ! 280, 151, 0, 0, 0, 0, 150, 0, 0, 0, ! 0, 286, 0, 251, 285, 0, 0, 0 }; static const short yydefgoto[] = { ! 785, 1, 210, 283, 211, 87, 88, 70, 62, 212, ! 213, 24, 25, 26, 9, 10, 11, 12, 13, 14, ! 15, 16, 450, 289, 134, 107, 49, 72, 106, 132, ! 160, 161, 162, 93, 116, 117, 118, 214, 164, 264, ! 94, 113, 180, 181, 290, 138, 185, 407, 166, 167, ! 168, 266, 169, 170, 410, 560, 561, 291, 19, 45, ! 74, 67, 109, 46, 65, 96, 97, 98, 99, 215, ! 366, 292, 173, 563, 728, 294, 295, 296, 297, 702, ! 298, 299, 300, 301, 705, 302, 303, 304, 305, 706, ! 306, 453, 307, 596, 664, 665, 666, 667, 308, 309, ! 708, 310, 311, 312, 709, 313, 314, 459, 672, 673, ! 315, 316, 317, 318, 319, 320, 321, 322, 579, 580, ! 581, 582, 216, 217, 218, 219, 220, 738, 681, 221, ! 498, 222, 478, 479, 122, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, ! 248, 402, 499, 723 }; static const short yypact[] = { ! -32768, 421,-32768,-32768, 525, -19, 526, 532,-32768,-32768, ! 472, 401, 605,-32768,-32768,-32768,-32768, 473,-32768,-32768, ! -32768,-32768,-32768, 22,-32768,-32768,-32768, 309,-32768, 479, ! -32768, 40, 681,-32768,-32768, 629, 683,-32768, -19, 553, ! -32768,-32768, 570,-32768, 576, -9, -1,-32768, 607, 53, ! -32768,-32768, -19, 692, 334,-32768, 510,-32768, 44,-32768, ! -32768,-32768,-32768, 143, 1008,-32768, 611, -9,-32768,-32768, ! 58, 633,-32768,-32768, -9, -1,-32768, 53,-32768,-32768, ! -32768, 662,-32768,-32768,-32768, 677, -6,-32768,-32768,-32768, ! 134, 1155,-32768,-32768, 71,-32768, 1370,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768, 205, 263,-32768, -9, ! -32768,-32768, 340, -5,-32768, 239, 326,-32768, 658, -5, ! 303, 344, 344,-32768, 679, 689,-32768,-32768,-32768,-32768, ! 695, 1201,-32768,-32768, 263, 887, 706, 12,-32768,-32768, ! -32768, 711, 1293, 38, 464,-32768,-32768, 60,-32768, -5, ! -32768, 757, -5,-32768,-32768, 390,-32768, 418, 765,-32768, ! 1264,-32768,-32768,-32768,-32768, 47,-32768, 426,-32768,-32768, ! 442,-32768,-32768, 2020,-32768,-32768,-32768,-32768, 714, 533, ! -17,-32768, 954,-32768,-32768, 495,-32768,-32768,-32768, 160, ! -32768,-32768, 2824, 5062, 2876, 2942, 499, 25, 626,-32768, ! 2994, 3060, 3112, 5259,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768, 200, 534, 962, 28,-32768, 556, 580,-32768,-32768, ! -32768, 716,-32768, 791,-32768, 796, 850,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768, 1020, 930, 1026, 932, 931, ! 687, 707, 743, 733, 15,-32768,-32768,-32768, 892,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 820, ! 442,-32768,-32768,-32768, 378,-32768, 665,-32768, 875, 185, ! 3178,-32768, 33, 1518, 56, 242, 266, 67, 366, 180, ! 669, 3230, 5561, -19, 200, 534, 905, 492, 414,-32768, ! 954, 673,-32768, 1951,-32768,-32768, 672,-32768,-32768,-32768, ! 2089,-32768,-32768, 710,-32768,-32768,-32768,-32768, 2089,-32768, ! 2089,-32768,-32768, 5613, 719,-32768,-32768,-32768,-32768,-32768, ! -32768, 404,-32768, 725, 795, 850, 960, 1005,-32768,-32768, ! -32768,-32768, 972,-32768, 873, 724, 731,-32768, 784,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 31,-32768, ! 734, 1003, 691, 691, 413,-32768,-32768,-32768,-32768,-32768, ! 747, 962, 300,-32768, 688,-32768, 517, 41, 735, 5325, ! 2234, 515,-32768, -10, 3296,-32768, 424,-32768,-32768, 3348, ! 3414, 3466, 3532, 3584, 3650, 3702, 3768, 3820, 3886, 3938, ! 4004, 708, 4056, 4122, 4174, 4240, 4292, 4358, 4410, 2286, ! -32768,-32768, 4476,-32768, 188,-32768,-32768,-32768,-32768,-32768, ! -32768, 1951,-32768,-32768,-32768,-32768, 4528,-32768, 73,-32768, ! -32768, 81,-32768,-32768, 83,-32768, 4594,-32768, 4646,-32768, ! 574,-32768, 5114,-32768,-32768, 123,-32768, 102, 348, 686, ! 555,-32768,-32768, -19, 2352,-32768,-32768,-32768,-32768, 1076, ! 533,-32768,-32768, 712,-32768, 750, 951,-32768,-32768,-32768, ! 51, 2404,-32768, 4712,-32768,-32768,-32768, 972,-32768,-32768, ! -32768,-32768, -23, 728,-32768,-32768,-32768, 2470, 691,-32768, ! 126, 691, 126,-32768, 2522, 4764, 95, 192, 468,-32768, ! 5638,-32768,-32768, 1028,-32768,-32768,-32768,-32768, 272,-32768, ! -32768, 231,-32768,-32768,-32768,-32768,-32768, 736,-32768, 243, ! -32768, 5377,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 1020, ! -32768, 1020,-32768, 930,-32768, 930,-32768, 930,-32768, 1026, ! -32768, 1026,-32768, 1026,-32768, 1026,-32768, -6,-32768,-32768, ! 932,-32768, 932,-32768, 931,-32768, 687,-32768, 707,-32768, ! 743,-32768, 733,-32768, 825, 739,-32768,-32768,-32768, 1064, ! -32768, 1951, 744,-32768, 1951,-32768, 354,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768, 358,-32768, 748, 425, 116, 574, ! -32768, 426,-32768,-32768,-32768,-32768,-32768, 5561,-32768,-32768, ! 477, 686,-32768, 855, 69, 360,-32768, 768,-32768, 5207, ! -32768, 5139, 781, 803, 805,-32768,-32768, 5443,-32768, 257, ! -32768, 344,-32768, 344,-32768,-32768, 818, 227,-32768,-32768, ! -32768, 4830, 565,-32768,-32768,-32768,-32768,-32768, 4882,-32768, ! -32768, 5495,-32768,-32768, 263, 316,-32768, 4948, 578,-32768, ! 1951, 2588,-32768,-32768, 2156,-32768,-32768, 268,-32768, 904, ! -32768,-32768,-32768,-32768,-32768, 816,-32768, 2640,-32768,-32768, ! 925, 256, 5000,-32768, 389,-32768, 1696,-32768, 5561,-32768, ! -32768,-32768, 832, 829, 5182,-32768, 269,-32768, 446,-32768, ! -32768, 263,-32768, 839,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768, 459,-32768, 263,-32768,-32768, 503,-32768, 201, 240, ! 509,-32768, 885, 888, 2156,-32768,-32768, 2156,-32768,-32768, ! 853,-32768, 860, 863,-32768,-32768, 965, 251,-32768,-32768, ! -32768,-32768,-32768, 410,-32768,-32768, 1787,-32768, 1882,-32768, ! 893, 2089,-32768, 898,-32768,-32768,-32768,-32768, 263,-32768, ! -32768, 2706,-32768, 204, 4528, 2089,-32768,-32768, 2758,-32768, ! -32768,-32768,-32768, 996,-32768,-32768,-32768, 900,-32768, 2089, ! -32768, 217, 262,-32768, 399,-32768, 5139, 920,-32768,-32768, ! -32768,-32768, 220, 2156, 947, 5182,-32768, 966, 2156, 964, ! 2156,-32768, 2156,-32768,-32768, 1047, 1058,-32768 }; static const short yypgoto[] = { ! -32768,-32768,-32768, -60, -40, 671, -28, -121, 163, 140, ! -4, 603,-32768, 141,-32768, 1052, 589,-32768, 48,-32768, ! -32768, 859, 104, 558,-32768,-32768, 1013, 1010,-32768, -128, ! -32768, 922,-32768, -84, -117, 939, -168, -201,-32768,-32768, ! 184, 690, 831, -322, -124, 68,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768, 933,-32768, 178,-32768, 682, 308,-32768, ! -32768,-32768,-32768, 1044, 620,-32768, 1011,-32768,-32768, 258, ! -32768, -114, 833, 817, -166, -292,-32768, 800, -275, 157, ! -531, 54, -495,-32768,-32768,-32768, -304,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768, 445, 450, -629, -428,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768, -288,-32768, -656, 804, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 539, ! -32768, 542,-32768,-32768,-32768, 147,-32768,-32768,-32768,-32768, ! -430,-32768, 769, 327, -36, 1281, 236, 1341, 237, 423, ! 547, 935, -173, 720, 773, -485,-32768, 702, 758, 590, ! 685, 730, 741, 749, 732, 742,-32768, 513, 745, 927, ! -32768,-32768, 767,-32768 }; ! #define YYLAST 5749 static const short yytable[] = { ! 23, 447, 365, 31, 85, 623, 175, 293, 151, 458, ! 332, 182, 465, 186, 594, 184, 61, 172, 733, 341, ! 69, 345, 347, 40, 86, 451, 349, 356, 358, 372, ! 398, 125, 470, 454, 419, 455, 85, 729, 61, 250, ! 63, 50, 494, 61, 63, 78, 172, 163, 263, 136, ! 121, 86, 598, 265, 617, 20, 86, 349, 33, 103, ! 90, 253, 63, 506, 20, 20, 20, 63, 429, 22, ! 659, 85, 126, 605, 567, 178, 163, 354, 22, 333, ! 606, 635, 569, 33, 571, 334, 20, 90, 64, 20, ! 20, 86, 90, 120, 137, 86, 620, 729, 125, 471, ! 85, 66, 61, 586, 399, 17, 71, 20, 69, 495, ! 774, -64, 187, 703, 17, 17, 17, 650, 86, 779, ! 86, 22, 335, 41, 584, 42, 63, 90, 350, -92, ! -92, 90, 63, 284, 420, 182, 17, 687, 251, 17, ! 17, 51, 86, 52, -102, 79, 27, 29, -102, 704, ! 408, -153, -292, 599, 90, -64, 90, 17, 352, 350, ! 254, 139, 360, 430, 155, 660, 439, 467, 91, 286, ! 353, 628, 127, 703, 568, 121, 703, 678, 90, 54, ! 56, 433, 570, 59, 572, 174, 415, 145, 338, 338, ! 338, 338, 587, 59, 63, 146, 338, 338, 361, 178, ! 91, 691, 658, 588, 89, 718, 513, 515, 517, 704, ! 182, 699, 704, 155, 174, 469, 707, 255, 751, 86, ! 257, 768, 112, 203, 585, 147, 115, 717, 682, 101, ! 443, 89, 629, 120, 105, 158, 89, 52, 267, 179, ! 139, 659, 703, 425, 632, 564, 52, 703, 121, 703, ! 86, 703, 752, 284, -95, 90, -95, 719, 679, -95, ! -95, -95, -95, 752, 158, 112, 115, 427, 22, 711, ! 734, 89, 447, 284, 178, 89, 707, 288, 704, 707, ! 416, 434, 189, 704, 558, 704, 90, 704, 621, 286, ! 334, 147, 626, 154, 86, 670, 449, 458, 89, 120, ! 89, 489, 742, 367, 449, 763, 449, 130, 69, 456, ! 43, 762, 619, 285, 287, 165, 480, 482, 771, 189, ! 323, 776, 89, 683, 487, 488, 591, 713, 405, 628, ! 90, 630, 63, -95, 135, 73, 743, 426, -95, -95, ! -95, -95, 628, 633, 165, 707, 720, 753, 447, 489, ! 707, 537, 707, 628, 707, 643, 710, 680, 772, 645, ! 131, 428, 376, 179, 628, -254, 155, 431, 627, 701, ! 458, 284, 95, 44, 628, 338, 338, 338, 338, 338, ! 338, 338, 338, 338, 338, 338, 338, 90, 338, 338, ! 338, 338, 338, 338, 338, 640, 490, 288, 44, 89, ! 643, -29, 2, 146, 95, 462, -154, 559, 661, 324, ! 325, 754, 693, 421, 483, -324, 710, 179, 628, 710, ! 435, -26, 2, 662, 189, 510, 648, 140, 141, 451, ! 89, -156, 454, 285, 287, 135, 447, 661, 179, 171, ! 323, 287, 611, 147, 589, 613, 3, 323, 685, 287, ! 644, 287, 662, 285, 646, 323, 758, 323, 663, 37, ! 323, 432, 458, 5, 651, 252, 3, 654, 171, 6, ! 765, 458, -28, 2, 89, 155, 189, 4, 656, 406, ! 47, 338, 39, 5, 770, 710, 338, 724, 258, 6, ! 710, 473, 710, 441, 710, 773, 136, 7, 701, 463, ! 755, 121, 8, 758, 656, 765, 692, 770, 484, -324, ! 415, 76, 59, 259, 507, 288, 502, 3, 37, 511, ! 649, 284, 8, 155, 284, 182, 21, 28, 4, 324, ! 325, 89, -63, 30, 5, 38, 324, 325, -23, -23, ! 6, 39, 736, 48, 324, 325, 324, 325, 628, 324, ! 325, 285, 287, 737, 55, 739, 502, 286, 323, 18, ! 286, 628, 735, -63, 622, 740, 686, 147, 18, 18, ! 18, 57, 657, 8, 48, 58, -63, 60, 37, 502, ! -23, 59, 442, 503, 189, -23, -23, -23, 504, 178, ! 18, -23, 505, 18, 18, -23, 326, 336, 741, 32, ! 284, 36, 348, 22, 744, -27, 2, -63, 68, 86, ! 760, 18, 100, 22, 22, 492, 80, 338, 338, 493, ! 22, 590, 92, 503, 53, 196, 284, 351, 504, -30, ! 2, 197, 505, 338, 104, 577, 286, 368, 198, 578, ! 449, 22, 199, 22, 696, 90, 503, 324, 325, 82, ! 3, 504, 83, 22, 92, 505, 200, 201, 22, 373, ! 202, 4, 286, 111, 22, 288, 22, 5, 288, 204, ! 205, 206, 207, 6, 3, 208, 209, 80, 114, 374, ! 148, -32, 2, -31, 2, 4, 284, 102, 284, 159, ! 150, 5, -33, 2, 108, 22, 153, 6, 394, 22, ! 449, 285, 287, 449, 285, 287, 8, 183, 323, 536, ! 82, 323, 188, 83, 22, 331, 326, 375, 159, 395, ! 327, 22, 286, 326, 286, 466, 3, 449, 3, 133, ! 8, 326, 468, 326, 157, 472, 326, 3, 612, 639, ! 614, 449, 642, 5, 288, 5, 323, 397, 323, 6, ! 22, 6, 142, 179, 5, 449, 396, 143, 144, 80, ! 6, 157, 409, 157, -152, 22, 123, 22, 444, 449, ! 288, -343, -343, 448, 449, 119, 449, 22, 449, 59, ! 285, 287, 8, 22, 8, 287, 491, 323, 141, 89, ! 477, 323, 82, 8, 22, 83, 22, 324, 325, 22, ! 324, 325, 22, 496, 22, 610, 285, 287, 610, 595, ! 37, 452, 22, 323, 149, 152, 80, 597, 697, 22, ! 461, 323, 22, 607, -343, 124, 636, 38, -343, 637, ! 288, 631, 288, 39, 326, 324, 325, 324, 325, 641, ! 327, -345, -345, 485, 647, 287, 486, 327, 287, 82, ! 367, 323, 83, 22, 323, 327, 658, 327, 256, 141, ! 327, 746, -136, 668, 747, 3, 285, 287, 285, 287, ! 34, 80, 287, 323, 464, 323, 324, 325, 323, 369, ! 324, 325, 674, 370, -505, -505, 287, 371, 176, -506, ! -506, 34, 323, 328, -345, 34, 377, 378, -345, 675, ! 287, 676, 324, 325, 82, 712, 323, 83, 22, 249, ! 324, 325, 34, 323, 287, -372, 403, 714, 3, 287, ! 323, 287, 323, 287, 80, 323, 718, 323, 731, 323, ! 777, 599, 3, 382, 383, 781, -370, 783, 80, 784, ! 324, 325, 745, 324, 325, -204, 329, 392, 393, 3, ! 387, 388, 389, 390, 748, 80, 749, 82, 327, 750, ! 83, 22, 324, 325, 324, 325, 751, 324, 325, 362, ! 249, 82, 412, 413, 83, 22, 414, 529, 531, 533, ! 535, 324, 325, 177, 326, 400, 401, 326, 82, 757, ! 391, 83, 22, -16, 759, 324, 325, 768, -504, -504, ! 369, 769, 324, 325, 370, 80, -414, -414, 440, 324, ! 325, 324, 325, 328, 324, 325, 324, 325, 324, 325, ! 328, 775, 326, 780, 326, 379, 380, 381, 328, 624, ! 328, 192, 193, 328, 384, 385, 386, 418, 82, -16, ! 424, 83, 22, 778, -504, -504, 369, 786, 437, 438, ! 370, -415, -415, 3, 371, -504, -504, 369, 787, 80, ! 782, 370, 538, 326, 35, 371, 329, 326, 81, 77, ! 5, 143, 144, 329, 194, 195, 6, 540, 542, 80, ! 190, 329, 262, 329, 519, 521, 329, 110, 196, 326, ! 404, 260, 82, 562, 197, 83, 22, 326, 75, 411, ! 330, 198, 474, 475, 476, 199, 84, 129, 327, 725, ! 446, 327, 82, 457, 726, 83, 22, 460, 652, 200, ! 201, 653, 481, 202, 544, 203, 625, 326, 343, 550, ! 326, 328, 204, 205, 206, 207, 546, 501, 208, 209, ! 552, 509, 523, 525, 527, 548, 327, 557, 327, 326, ! 695, 326, -16, 0, 326, 0, 123, -504, -504, 369, ! 0, 0, 0, 370, 0, 0, 555, 638, 326, -504, ! -504, 369, 0, 0, 0, 370, 0, 0, 0, 440, ! 0, 0, 326, 566, 329, 0, 0, 327, 0, 326, ! 0, 327, 0, 574, 0, 576, 326, 0, 326, 0, ! 37, 326, 0, 326, 0, 326, 80, 0, 0, 0, ! 0, 0, 0, 327, 0, 124, 0, 38, 0, 0, ! 330, 327, 0, 39, 0, 0, 0, 330, 602, 0, ! 604, 0, 0, 0, 0, 330, 0, 330, 0, 82, ! 330, 0, 83, 22, 609, 0, 3, 0, 0, 0, ! 0, 327, 80, 0, 327, 0, 0, 0, 0, 0, ! 249, 81, 0, 5, 0, 0, 0, 0, 0, 6, ! 0, 0, 0, 327, 0, 327, 0, 0, 327, 0, ! 0, 328, 0, 0, 328, 82, 0, 0, 83, 22, ! 0, 0, 327, 0, 191, 0, 192, 193, 155, 156, ! 0, 0, 8, 0, 0, 0, 327, 0, 0, 3, ! 0, 0, 0, 327, 0, 80, 0, 0, 0, 328, ! 327, 328, 327, 0, 81, 327, 5, 327, 0, 327, ! 0, 0, 6, 0, 329, 0, 0, 329, 330, 194, ! 195, 0, 0, 0, 80, 0, 0, 0, 82, 0, ! 0, 83, 22, 196, 655, 0, 0, 0, 0, 197, ! 328, 155, 261, 0, 328, 8, 198, 0, 0, 0, ! 199, 0, 329, 0, 329, 0, 0, 82, 0, 0, ! 83, 22, 0, 0, 200, 201, 328, 0, 202, 0, ! 203, 0, 0, 0, 328, 689, 0, 204, 205, 206, ! 207, 0, 0, 208, 209, 0, 0, 0, 0, 0, ! 0, 0, 0, 329, 0, 3, 0, 329, 0, 0, ! 0, 80, 0, 0, 328, 0, 0, 328, 0, 722, ! 81, 0, 5, 0, 0, 730, 0, 0, 6, 329, ! 0, 0, 0, 0, 0, 0, 328, 329, 328, 0, ! 0, 328, 0, 0, 82, 0, 0, 83, 22, 0, ! 0, 0, 0, 0, 0, 328, 0, 0, 128, 0, ! 0, 0, 0, 339, 339, 339, 339, 329, 0, 328, ! 329, 339, 339, 0, 0, 0, 328, 0, 330, 0, ! 0, 330, 0, 328, 0, 328, 0, 0, 328, 329, ! 328, 329, 328, 0, 329, 0, 0, 0, 0, 0, ! 0, 764, 0, 0, 0, 767, 0, 0, 329, 422, ! 0, 192, 193, 0, 0, 0, 330, 0, 330, 0, ! 0, 0, 329, 340, 340, 340, 340, 0, 0, 329, ! 0, 340, 340, 0, 0, 0, 329, 0, 329, 0, ! 0, 329, 0, 329, 0, 329, 0, 0, 0, 0, ! 0, 0, 0, 0, 194, 195, 0, 330, 0, 80, ! 0, 330, 0, 0, 0, 0, 0, 0, 196, 0, ! 0, 0, 0, 0, 197, 0, 0, 0, 0, 0, ! 0, 198, 0, 330, 0, 199, 0, 0, 0, 0, ! 0, 330, 82, 0, 0, 83, 22, 0, 0, 200, ! 201, 0, 0, 202, 0, 0, 0, 0, 0, 423, ! 0, 0, 204, 205, 206, 207, 0, 0, 208, 209, ! 0, 330, 0, 0, 330, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 330, 0, 330, 0, 0, 330, 0, ! 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, ! 339, 339, 330, 339, 339, 339, 339, 339, 339, 339, ! 0, 0, 0, 0, 0, 0, 330, 0, 0, 0, ! 0, 0, 0, 330, 0, 0, 0, 268, 0, 0, ! 330, 0, 330, 0, 0, 330, 0, 330, 0, 330, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, ! 340, 340, 0, 340, 340, 340, 340, 340, 340, 340, ! 0, 3, 194, 195, 661, 269, 270, 80, 271, 0, ! 0, 272, 0, 0, 0, 273, 196, 0, 0, 662, ! 0, 0, 274, 275, 6, 276, 339, 277, 278, 198, ! 279, 339, 0, 280, 281, 0, 0, 0, 0, 0, ! 82, 0, 0, 83, 22, 0, 0, 0, 268, 0, ! 0, 282, 0, 155, 727, 0, 0, 8, 0, 0, ! 204, 205, 206, 207, 0, 0, 208, 209, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 340, 0, 0, 0, ! 0, 340, 3, 194, 195, 661, 269, 270, 80, 271, ! 0, 0, 272, 0, 0, 0, 273, 196, 0, 0, ! 662, 0, 0, 274, 275, 6, 276, 0, 277, 278, ! 198, 279, 0, 0, 280, 281, 0, 0, 0, 0, ! 0, 82, 0, 0, 83, 22, 0, 0, 0, 0, ! 0, 0, 282, 268, 155, 756, 0, 0, 8, 0, ! 0, 204, 205, 206, 207, 0, 0, 208, 209, 0, ! 0, 0, 339, 339, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 339, 0, ! 0, 0, 0, 0, 0, 0, 0, 3, 194, 195, ! -264, 269, 270, 80, 271, 0, 0, 272, 0, 0, ! 0, 273, 196, 0, 0, -264, 0, 0, 274, 275, ! 6, 276, 268, 277, 278, 198, 279, 0, 0, 280, ! 281, 0, 340, 340, 0, 0, 82, 0, 0, 83, ! 22, 0, 0, 0, 0, 0, 0, 282, 340, 155, ! -264, 0, 0, 8, 0, 0, 204, 205, 206, 207, ! 0, 0, 208, 209, 0, 0, 3, 194, 195, 0, ! 269, 270, 80, 271, 0, 0, 272, 0, 0, 0, ! 273, 196, 0, 0, 0, 0, 0, 274, 275, 6, ! 276, 268, 277, 278, 198, 279, 0, 0, 280, 281, ! 0, 0, 0, 0, 0, 82, 0, 0, 83, 22, ! 0, 0, 0, 0, 0, 0, 282, 0, 155, 445, ! 0, 0, 8, 0, 0, 204, 205, 206, 207, 0, ! 0, 208, 209, 0, 0, 3, 194, 195, 0, 269, ! 270, 80, 271, 0, 0, 272, 0, 0, 0, 273, ! 196, 0, 0, 0, 0, 0, 274, 275, 6, 276, ! 268, 277, 278, 198, 279, 0, 0, 280, 281, 0, ! 0, 0, 0, 0, 82, 0, 0, 83, 22, 0, ! 0, 0, 0, 0, 0, 282, 0, 155, 0, 0, ! 0, 8, 0, 0, 204, 205, 206, 207, 0, 0, ! 208, 209, 0, 0, 3, 194, 195, 0, 269, 270, ! 80, 271, 0, 0, 272, 0, 0, 0, 273, 196, ! 0, 0, 0, 0, 0, 274, 275, 268, 276, 0, ! 277, 278, 198, 279, 0, 0, 280, 281, 0, 0, ! 0, 0, 0, 82, 0, 0, 83, 22, 0, 0, ! 0, 0, 0, 0, 282, 0, 155, 0, 0, 0, ! 8, 0, 0, 204, 205, 206, 207, 0, 0, 208, ! 209, 3, 194, 195, 0, 700, 270, 80, 271, 0, ! 0, 272, 0, 0, 0, 273, 196, 0, 0, 0, ! 0, 0, 274, 275, 0, 276, 0, 277, 278, 198, ! 279, 0, 0, 280, 281, 500, 0, 192, 193, 0, ! 82, 0, 0, 83, 22, 0, 0, 0, 0, 0, ! 0, 282, 0, 155, 0, 0, 0, 8, 0, 0, ! 204, 205, 206, 207, 0, 0, 208, 209, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 194, 195, 0, 0, 0, 80, 0, 553, 0, 192, ! 193, 0, 0, 0, 196, 0, 0, 0, 0, 0, ! 197, 0, 0, 0, 0, 0, 0, 198, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 0, 82, 0, ! 0, 83, 22, 0, 0, 200, 201, 0, 0, 202, ! 0, 0, 194, 195, 146, 0, 0, 80, 204, 205, ! 206, 207, 0, 0, 208, 209, 196, 0, 0, 0, ! 0, 0, 197, 592, 0, 192, 193, 0, 0, 198, ! 0, 0, 0, 199, 0, 0, 0, 0, 0, 0, ! 82, 0, 0, 83, 22, 0, 554, 200, 201, 0, ! 0, 202, 0, 0, 0, 0, 0, 0, 0, 0, ! 204, 205, 206, 207, 0, 0, 208, 209, 194, 195, ! 0, 0, 0, 80, 0, 600, 0, 192, 193, 0, ! 0, 0, 196, 0, 0, 0, 0, 0, 197, 0, ! 0, 0, 0, 0, 0, 198, 0, 0, 0, 199, ! 0, 0, 0, 0, 0, 0, 82, 0, 0, 83, ! 22, 0, 0, 200, 201, 0, 0, 202, 593, 0, ! 194, 195, 0, 0, 0, 80, 204, 205, 206, 207, ! 0, 0, 208, 209, 196, 0, 0, 0, 0, 0, ! 197, 608, 0, 192, 193, 0, 0, 198, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 0, 82, 0, ! 0, 83, 22, 0, 0, 200, 201, 0, 0, 202, ! 0, 0, 0, 0, 0, 601, 0, 0, 204, 205, ! 206, 207, 0, 0, 208, 209, 194, 195, 0, 0, ! 0, 80, 0, 615, 0, 192, 193, 0, 0, 0, ! 196, 0, 0, 0, 0, 0, 197, 0, 0, 0, ! 0, 0, 0, 198, 0, 0, 0, 199, 0, 0, ! 0, 0, 0, 0, 82, 0, 0, 83, 22, 0, ! 0, 200, 201, 0, 0, 202, 0, 0, 194, 195, ! 146, 0, 0, 80, 204, 205, 206, 207, 0, 0, ! 208, 209, 196, 0, 0, 0, 0, 0, 197, 592, ! 0, 192, 193, 0, 0, 198, 0, 0, 0, 199, ! 0, 0, 0, 0, 0, 0, 82, 0, 0, 83, ! 22, 0, 0, 200, 201, 0, 0, 202, 616, 0, ! 0, 0, 0, 0, 0, 0, 204, 205, 206, 207, ! 0, 0, 208, 209, 194, 195, 0, 0, 0, 80, ! 0, 715, 0, 192, 193, 0, 0, 0, 196, 0, ! 0, 0, 0, 0, 197, 0, 0, 0, 0, 0, ! 0, 198, 0, 0, 0, 199, 0, 0, 0, 0, ! 0, 0, 82, 0, 0, 83, 22, 0, 0, 200, ! 201, 0, 0, 202, 698, 0, 194, 195, 0, 0, ! 0, 80, 204, 205, 206, 207, 0, 0, 208, 209, ! 196, 0, 0, 0, 0, 0, 197, 715, 0, 192, ! 193, 0, 0, 198, 0, 0, 0, 199, 0, 0, ! 0, 0, 0, 0, 82, 0, 0, 83, 22, 0, ! 0, 200, 201, 0, 0, 202, 716, 0, 0, 0, ! 0, 0, 0, 0, 204, 205, 206, 207, 0, 0, ! 208, 209, 194, 195, 0, 0, 0, 80, 0, 600, ! 0, 192, 193, 0, 0, 0, 196, 0, 0, 0, ! 0, 0, 197, 0, 0, 0, 0, 0, 0, 198, ! 0, 0, 0, 199, 0, 0, 0, 0, 0, 0, ! 82, 0, 0, 83, 22, 0, 0, 200, 201, 0, ! 0, 202, 761, 0, 194, 195, 0, 0, 0, 80, ! 204, 205, 206, 207, 0, 0, 208, 209, 196, 0, ! 0, 0, 0, 0, 197, 337, 0, 192, 193, 0, ! 0, 198, 0, 0, 0, 199, 0, 0, 0, 0, ! 0, 0, 82, 0, 0, 83, 22, 0, 0, 200, ! 201, 0, 0, 202, 0, 0, 0, 0, 0, 766, ! 0, 0, 204, 205, 206, 207, 0, 0, 208, 209, ! 194, 195, 0, 0, 0, 80, 0, 344, 0, 192, ! 193, 0, 0, 0, 196, 0, 0, 0, 0, 0, ! 197, 0, 0, 0, 0, 0, 0, 198, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 0, 82, 0, ! 0, 83, 22, 0, 0, 200, 201, 0, 0, 202, ! 0, 0, 194, 195, 0, 0, 0, 80, 204, 205, ! 206, 207, 0, 0, 208, 209, 196, 0, 0, 0, ! 0, 0, 197, 346, 0, 192, 193, 0, 0, 198, ! 0, 0, 0, 199, 0, 0, 0, 0, 0, 0, ! 82, 0, 0, 83, 22, 0, 0, 200, 201, 0, ! 0, 202, 0, 0, 0, 0, 0, 0, 0, 0, ! 204, 205, 206, 207, 0, 0, 208, 209, 194, 195, ! 0, 0, 0, 80, 0, 355, 0, 192, 193, 0, ! 0, 0, 196, 0, 0, 0, 0, 0, 197, 0, ! 0, 0, 0, 0, 0, 198, 0, 0, 0, 199, ! 0, 0, 0, 0, 0, 0, 82, 0, 0, 83, ! 22, 0, 0, 200, 201, 0, 0, 202, 0, 0, ! 194, 195, 0, 0, 0, 80, 204, 205, 206, 207, ! 0, 0, 208, 209, 196, 0, 0, 0, 0, 0, ! 197, 357, 0, 192, 193, 0, 0, 198, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 0, 82, 0, ! 0, 83, 22, 0, 0, 200, 201, 0, 0, 202, ! 0, 0, 0, 0, 0, 0, 0, 0, 204, 205, ! 206, 207, 0, 0, 208, 209, 194, 195, 0, 0, ! 0, 80, 0, 359, 0, 192, 193, 0, 0, 0, ! 196, 0, 0, 0, 0, 0, 197, 0, 0, 0, ! 0, 0, 0, 198, 0, 0, 0, 199, 0, 0, ! 0, 0, 0, 0, 82, 0, 0, 83, 22, 0, ! 0, 200, 201, 0, 0, 202, 0, 0, 194, 195, ! 0, 0, 0, 80, 204, 205, 206, 207, 0, 0, ! 208, 209, 196, 0, 0, 0, 0, 0, 197, 417, ! 0, 192, 193, 0, 0, 198, 0, 0, 0, 199, ! 0, 0, 0, 0, 0, 0, 82, 0, 0, 83, ! 22, 0, 0, 200, 201, 0, 0, 202, 0, 0, ! 0, 0, 0, 0, 0, 0, 204, 205, 206, 207, ! 0, 0, 208, 209, 194, 195, 0, 0, 0, 80, ! 0, 436, 0, 192, 193, 0, 0, 0, 196, 0, ! 0, 0, 0, 0, 197, 0, 0, 0, 0, 0, ! 0, 198, 0, 0, 0, 199, 0, 0, 0, 0, ! 0, 0, 82, 0, 0, 83, 22, 0, 0, 200, ! 201, 0, 0, 202, 0, 0, 194, 195, 0, 0, ! 0, 80, 204, 205, 206, 207, 0, 0, 208, 209, ! 196, 0, 0, 0, 0, 0, 197, 508, 0, 192, ! 193, 0, 0, 198, 0, 0, 0, 199, 0, 0, ! 0, 0, 0, 0, 82, 0, 0, 83, 22, 0, ! 0, 200, 201, 0, 0, 202, 0, 0, 0, 0, ! 0, 0, 0, 0, 204, 205, 206, 207, 0, 0, ! 208, 209, 194, 195, 0, 0, 0, 80, 0, 512, ! 0, 192, 193, 0, 0, 0, 196, 0, 0, 0, ! 0, 0, 197, 0, 0, 0, 0, 0, 0, 198, ! 0, 0, 0, 199, 0, 0, 0, 0, 0, 0, ! 82, 0, 0, 83, 22, 0, 0, 200, 201, 0, ! 0, 202, 0, 0, 194, 195, 0, 0, 0, 80, ! 204, 205, 206, 207, 0, 0, 208, 209, 196, 0, ! 0, 0, 0, 0, 197, 514, 0, 192, 193, 0, ! 0, 198, 0, 0, 0, 199, 0, 0, 0, 0, ! 0, 0, 82, 0, 0, 83, 22, 0, 0, 200, ! 201, 0, 0, 202, 0, 0, 0, 0, 0, 0, ! 0, 0, 204, 205, 206, 207, 0, 0, 208, 209, ! 194, 195, 0, 0, 0, 80, 0, 516, 0, 192, ! 193, 0, 0, 0, 196, 0, 0, 0, 0, 0, ! 197, 0, 0, 0, 0, 0, 0, 198, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 0, 82, 0, ! 0, 83, 22, 0, 0, 200, 201, 0, 0, 202, ! 0, 0, 194, 195, 0, 0, 0, 80, 204, 205, ! 206, 207, 0, 0, 208, 209, 196, 0, 0, 0, ! 0, 0, 197, 518, 0, 192, 193, 0, 0, 198, ! 0, 0, 0, 199, 0, 0, 0, 0, 0, 0, ! 82, 0, 0, 83, 22, 0, 0, 200, 201, 0, ! 0, 202, 0, 0, 0, 0, 0, 0, 0, 0, ! 204, 205, 206, 207, 0, 0, 208, 209, 194, 195, ! 0, 0, 0, 80, 0, 520, 0, 192, 193, 0, ! 0, 0, 196, 0, 0, 0, 0, 0, 197, 0, ! 0, 0, 0, 0, 0, 198, 0, 0, 0, 199, ! 0, 0, 0, 0, 0, 0, 82, 0, 0, 83, ! 22, 0, 0, 200, 201, 0, 0, 202, 0, 0, ! 194, 195, 0, 0, 0, 80, 204, 205, 206, 207, ! 0, 0, 208, 209, 196, 0, 0, 0, 0, 0, ! 197, 522, 0, 192, 193, 0, 0, 198, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 0, 82, 0, ! 0, 83, 22, 0, 0, 200, 201, 0, 0, 202, ! 0, 0, 0, 0, 0, 0, 0, 0, 204, 205, ! 206, 207, 0, 0, 208, 209, 194, 195, 0, 0, ! 0, 80, 0, 524, 0, 192, 193, 0, 0, 0, ! 196, 0, 0, 0, 0, 0, 197, 0, 0, 0, ! 0, 0, 0, 198, 0, 0, 0, 199, 0, 0, ! 0, 0, 0, 0, 82, 0, 0, 83, 22, 0, ! 0, 200, 201, 0, 0, 202, 0, 0, 194, 195, ! 0, 0, 0, 80, 204, 205, 206, 207, 0, 0, ! 208, 209, 196, 0, 0, 0, 0, 0, 197, 526, ! 0, 192, 193, 0, 0, 198, 0, 0, 0, 199, ! 0, 0, 0, 0, 0, 0, 82, 0, 0, 83, ! 22, 0, 0, 200, 201, 0, 0, 202, 0, 0, ! 0, 0, 0, 0, 0, 0, 204, 205, 206, 207, ! 0, 0, 208, 209, 194, 195, 0, 0, 0, 80, ! 0, 528, 0, 192, 193, 0, 0, 0, 196, 0, ! 0, 0, 0, 0, 197, 0, 0, 0, 0, 0, ! 0, 198, 0, 0, 0, 199, 0, 0, 0, 0, ! 0, 0, 82, 0, 0, 83, 22, 0, 0, 200, ! 201, 0, 0, 202, 0, 0, 194, 195, 0, 0, ! 0, 80, 204, 205, 206, 207, 0, 0, 208, 209, ! 196, 0, 0, 0, 0, 0, 197, 530, 0, 192, ! 193, 0, 0, 198, 0, 0, 0, 199, 0, 0, ! 0, 0, 0, 0, 82, 0, 0, 83, 22, 0, ! 0, 200, 201, 0, 0, 202, 0, 0, 0, 0, ! 0, 0, 0, 0, 204, 205, 206, 207, 0, 0, ! 208, 209, 194, 195, 0, 0, 0, 80, 0, 532, ! 0, 192, 193, 0, 0, 0, 196, 0, 0, 0, ! 0, 0, 197, 0, 0, 0, 0, 0, 0, 198, ! 0, 0, 0, 199, 0, 0, 0, 0, 0, 0, ! 82, 0, 0, 83, 22, 0, 0, 200, 201, 0, ! 0, 202, 0, 0, 194, 195, 0, 0, 0, 80, ! 204, 205, 206, 207, 0, 0, 208, 209, 196, 0, ! 0, 0, 0, 0, 197, 534, 0, 192, 193, 0, ! 0, 198, 0, 0, 0, 199, 0, 0, 0, 0, ! 0, 0, 82, 0, 0, 83, 22, 0, 0, 200, ! 201, 0, 0, 202, 0, 0, 0, 0, 0, 0, ! 0, 0, 204, 205, 206, 207, 0, 0, 208, 209, ! 194, 195, 0, 0, 0, 80, 0, 539, 0, 192, ! 193, 0, 0, 0, 196, 0, 0, 0, 0, 0, ! 197, 0, 0, 0, 0, 0, 0, 198, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 0, 82, 0, ! 0, 83, 22, 0, 0, 200, 201, 0, 0, 202, ! 0, 0, 194, 195, 0, 0, 0, 80, 204, 205, ! 206, 207, 0, 0, 208, 209, 196, 0, 0, 0, ! 0, 0, 197, 541, 0, 192, 193, 0, 0, 198, ! 0, 0, 0, 199, 0, 0, 0, 0, 0, 0, ! 82, 0, 0, 83, 22, 0, 0, 200, 201, 0, ! 0, 202, 0, 0, 0, 0, 0, 0, 0, 0, ! 204, 205, 206, 207, 0, 0, 208, 209, 194, 195, ! 0, 0, 0, 80, 0, 543, 0, 192, 193, 0, ! 0, 0, 196, 0, 0, 0, 0, 0, 197, 0, ! 0, 0, 0, 0, 0, 198, 0, 0, 0, 199, ! 0, 0, 0, 0, 0, 0, 82, 0, 0, 83, ! 22, 0, 0, 200, 201, 0, 0, 202, 0, 0, ! 194, 195, 0, 0, 0, 80, 204, 205, 206, 207, ! 0, 0, 208, 209, 196, 0, 0, 0, 0, 0, ! 197, 545, 0, 192, 193, 0, 0, 198, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 0, 82, 0, ! 0, 83, 22, 0, 0, 200, 201, 0, 0, 202, ! 0, 0, 0, 0, 0, 0, 0, 0, 204, 205, ! 206, 207, 0, 0, 208, 209, 194, 195, 0, 0, ! 0, 80, 0, 547, 0, 192, 193, 0, 0, 0, ! 196, 0, 0, 0, 0, 0, 197, 0, 0, 0, ! 0, 0, 0, 198, 0, 0, 0, 199, 0, 0, ! 0, 0, 0, 0, 82, 0, 0, 83, 22, 0, ! 0, 200, 201, 0, 0, 202, 0, 0, 194, 195, ! 0, 0, 0, 80, 204, 205, 206, 207, 0, 0, ! 208, 209, 196, 0, 0, 0, 0, 0, 197, 549, ! 0, 192, 193, 0, 0, 198, 0, 0, 0, 199, ! 0, 0, 0, 0, 0, 0, 82, 0, 0, 83, ! 22, 0, 0, 200, 201, 0, 0, 202, 0, 0, ! 0, 0, 0, 0, 0, 0, 204, 205, 206, 207, ! 0, 0, 208, 209, 194, 195, 0, 0, 0, 80, ! 0, 551, 0, 192, 193, 0, 0, 0, 196, 0, ! 0, 0, 0, 0, 197, 0, 0, 0, 0, 0, ! 0, 198, 0, 0, 0, 199, 0, 0, 0, 0, ! 0, 0, 82, 0, 0, 83, 22, 0, 0, 200, ! 201, 0, 0, 202, 0, 0, 194, 195, 0, 0, ! 0, 80, 204, 205, 206, 207, 0, 0, 208, 209, ! 196, 0, 0, 0, 0, 0, 197, 556, 0, 192, ! 193, 0, 0, 198, 0, 0, 0, 199, 0, 0, ! 0, 0, 0, 0, 82, 0, 0, 83, 22, 0, ! 0, 200, 201, 0, 0, 202, 0, 0, 0, 0, ! 0, 0, 0, 0, 204, 205, 206, 207, 0, 0, ! 208, 209, 194, 195, 0, 0, 0, 80, 0, 565, ! 0, 192, 193, 0, 0, 0, 196, 0, 0, 0, ! 0, 0, 197, 0, 0, 0, 0, 0, 0, 198, ! 0, 0, 0, 199, 0, 0, 0, 0, 0, 0, ! 82, 0, 0, 83, 22, 0, 0, 200, 201, 0, ! 0, 202, 0, 0, 194, 195, 0, 0, 0, 80, ! 204, 205, 206, 207, 0, 0, 208, 209, 196, 0, ! 0, 0, 0, 0, 197, 573, 0, 192, 193, 0, ! 0, 198, 0, 0, 0, 199, 0, 0, 0, 0, ! 0, 0, 82, 0, 0, 83, 22, 0, 0, 200, ! 201, 0, 0, 202, 0, 0, 0, 0, 0, 0, ! 0, 0, 204, 205, 206, 207, 0, 0, 208, 209, ! 194, 195, 0, 0, 0, 80, 0, 575, 0, 192, ! 193, 0, 0, 0, 196, 0, 0, 0, 0, 0, ! 197, 0, 0, 0, 0, 0, 0, 198, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 0, 82, 0, ! 0, 83, 22, 0, 0, 200, 201, 0, 0, 202, ! 0, 0, 194, 195, 0, 0, 0, 80, 204, 205, ! 206, 207, 0, 0, 208, 209, 196, 0, 0, 0, ! 0, 0, 197, 603, 0, 192, 193, 0, 0, 198, ! 0, 0, 0, 199, 0, 0, 0, 0, 0, 0, ! 82, 0, 0, 83, 22, 0, 0, 200, 201, 0, ! 0, 202, 0, 0, 0, 0, 0, 0, 0, 0, ! 204, 205, 206, 207, 0, 0, 208, 209, 194, 195, ! 0, 0, 0, 80, 0, 618, 0, 192, 193, 0, ! 0, 0, 196, 0, 0, 0, 0, 0, 197, 0, ! 0, 0, 0, 0, 0, 198, 0, 0, 0, 199, ! 0, 0, 0, 0, 0, 0, 82, 0, 0, 83, ! 22, 0, 0, 200, 201, 0, 0, 202, 0, 0, ! 194, 195, 0, 0, 0, 80, 204, 205, 206, 207, ! 0, 0, 208, 209, 196, 0, 0, 0, 0, 0, ! 197, 684, 0, 192, 193, 0, 0, 198, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 0, 82, 0, ! 0, 83, 22, 0, 0, 200, 201, 0, 0, 202, ! 0, 0, 0, 0, 0, 0, 0, 0, 204, 205, ! 206, 207, 0, 0, 208, 209, 194, 195, 0, 0, ! 0, 80, 0, 688, 0, 192, 193, 0, 0, 0, ! 196, 0, 0, 0, 0, 0, 197, 0, 0, 0, ! 0, 0, 0, 198, 0, 0, 0, 199, 0, 0, ! 0, 0, 0, 0, 82, 0, 0, 83, 22, 0, ! 0, 200, 201, 0, 0, 202, 0, 0, 194, 195, ! 0, 0, 0, 80, 204, 205, 206, 207, 0, 0, ! 208, 209, 196, 0, 0, 0, 0, 0, 197, 694, ! 0, 192, 193, 0, 0, 198, 0, 0, 0, 199, ! 0, 0, 0, 0, 0, 0, 82, 0, 0, 83, ! 22, 0, 0, 200, 201, 0, 0, 202, 0, 0, ! 0, 0, 0, 0, 0, 0, 204, 205, 206, 207, ! 0, 0, 208, 209, 194, 195, 0, 0, 0, 80, ! 0, 721, 0, 192, 193, 0, 0, 0, 196, 0, ! 0, 0, 0, 0, 197, 0, 0, 0, 0, 0, ! 0, 198, 0, 0, 0, 199, 0, 0, 0, 0, ! 0, 0, 82, 0, 0, 83, 22, 0, 0, 200, ! 201, 0, 0, 202, 0, 0, 194, 195, 0, 0, ! 0, 80, 204, 205, 206, 207, 0, 0, 208, 209, ! 196, 0, 0, 342, 0, 192, 197, 0, 0, 0, ! 0, 0, 0, 198, 0, 0, 0, 199, 0, 0, ! 0, 0, 0, 0, 82, 0, 0, 83, 22, 0, ! 0, 200, 201, 0, 0, 202, 0, 0, 0, 0, ! 0, 0, 0, 0, 204, 205, 206, 207, 194, 195, ! 208, 209, 0, 80, 0, 583, 0, 0, 0, 0, ! 0, 0, 196, 0, 0, 0, 0, 0, 197, 0, ! 0, 0, 0, 0, 0, 198, 0, 0, 0, 199, ! 671, 0, 0, 0, 0, 0, 82, 0, 0, 83, ! 22, 0, 0, 200, 201, 0, 0, 202, 0, -287, ! -287, -287, 0, 0, 0, -287, 204, 205, 206, 207, ! 0, 0, 208, 209, -287, 0, 0, 0, 0, 0, ! -287, 0, 0, 732, 0, 194, 195, -287, 0, 0, ! 80, -287, 0, 0, 0, 0, 0, 0, -287, 196, ! 0, -287, -287, 0, 0, 197, 0, 0, 669, -287, ! 0, 0, 198, 0, 0, -287, 199, 0, -287, -287, ! -287, -287, 0, 82, -287, -287, 83, 22, 194, 195, ! 0, 0, 0, 80, 282, -295, 0, 0, 0, 0, ! 0, 0, 196, 204, 205, 206, 207, 0, 197, 208, ! 209, 0, 0, 194, 195, 198, 0, 0, 80, 199, ! 0, 0, 192, 193, 0, 0, 82, 196, 0, 83, ! 22, 0, 0, 197, 0, 0, 0, 282, -295, 0, ! 198, 0, 0, 0, 199, 0, 204, 205, 206, 207, ! 0, 82, 208, 209, 83, 22, 0, 0, 0, 0, ! 0, 0, 282, 0, 0, 194, 195, 0, 0, 0, ! 80, 204, 205, 206, 207, 0, 0, 208, 209, 196, ! 0, 0, 0, 0, 0, 197, 0, 0, 192, 193, ! 0, 0, 198, 0, 0, 0, 199, 0, 0, 0, ! 0, 0, 0, 82, 0, 0, 83, 22, 0, 0, ! 200, 201, 0, 0, 202, 0, 203, 363, 0, 0, ! 0, 364, 0, 204, 205, 206, 207, 0, 0, 208, ! 209, 194, 195, 0, 0, 0, 80, 0, 0, 0, ! 192, 193, 0, 0, 0, 196, 0, 0, 0, 0, ! 0, 197, 0, 0, 0, 0, 0, 0, 198, 0, ! 0, 0, 199, 0, 0, 0, 0, 0, 0, 82, ! 0, 0, 83, 22, 0, 0, 200, 201, 0, 0, ! 202, 497, 0, 194, 195, 0, 0, 0, 80, 204, ! 205, 206, 207, 0, 0, 208, 209, 196, 0, 0, ! 0, 0, 0, 197, 0, 0, 192, 193, 0, 0, ! 198, 0, 0, 0, 199, 0, 0, 0, 0, 0, ! 0, 82, 0, 0, 83, 22, 0, 0, 200, 201, ! 0, 0, 202, 634, 0, 0, 0, 0, 0, 0, ! 0, 204, 205, 206, 207, 0, 0, 208, 209, 194, ! 195, 0, 0, 0, 80, 0, 0, 0, 192, 193, ! 0, 0, 0, 196, 0, 0, 0, 0, 0, 197, ! 0, 0, 0, 0, 0, 0, 198, 0, 0, 0, ! 199, 0, 0, 0, 0, 0, 0, 82, 0, 0, ! 83, 22, 0, 0, 200, 201, 0, 0, 202, 677, ! 0, 194, 195, 0, 0, 0, 80, 204, 205, 206, ! 207, 0, 0, 208, 209, 196, 0, 0, 0, 0, ! 0, 197, 0, 0, 192, 193, 0, 0, 198, 0, ! 0, 0, 199, 0, 0, 0, 0, 0, 0, 82, ! 0, 0, 83, 22, 0, 0, 200, 201, 0, 0, ! 202, 690, 0, 0, 0, 0, 0, 0, 0, 204, ! 205, 206, 207, 0, 0, 208, 209, 194, 195, 0, ! 0, 0, 80, 0, 0, 0, 0, 0, 0, 0, ! 0, 196, 0, 0, 0, 0, 0, 197, 0, 0, ! 0, 0, 0, 0, 198, 0, 0, 0, 199, 0, ! 0, 0, 0, 0, 0, 82, 0, 0, 83, 22, ! 0, 0, 200, 201, 0, 0, 202, 0, 3, 194, ! 195, 0, 0, 0, 80, 204, 205, 206, 207, 0, ! 0, 208, 209, 196, 0, 0, 0, 0, 0, 197, ! 0, 0, 0, 0, 0, 0, 198, 0, 0, 80, ! 199, 0, 0, 0, 0, 0, 0, 82, 196, 0, ! 83, 22, 0, 0, 197, 0, 0, 0, 282, 0, ! 0, 198, 0, 0, 0, 199, 0, 204, 205, 206, ! 207, 0, 82, 208, 209, 83, 22, 0, 0, 200, ! 201, 0, 0, 202, 0, 0, 0, 0, 0, 0, ! 0, 0, 204, 205, 206, 207, 0, 0, 208, 209 }; static const short yycheck[] = { ! 4, 293, 203, 7, 64, 490, 134, 173, 125, 313, ! 178, 135, 334, 1, 444, 136, 44, 131, 674, 192, ! 48, 194, 195, 1, 64, 300, 1, 200, 201, 1, ! 15, 91, 1, 308, 1, 310, 96, 666, 66, 1, ! 44, 1, 1, 71, 48, 1, 160, 131, 1, 54, ! 86, 91, 1, 167, 484, 1, 96, 1, 10, 1, ! 64, 1, 66, 73, 10, 11, 12, 71, 1, 88, ! 1, 131, 1, 96, 1, 135, 160, 198, 88, 96, ! 103, 511, 1, 35, 1, 102, 32, 91, 97, 35, ! 36, 131, 96, 99, 99, 135, 1, 726, 158, 68, ! 160, 102, 130, 1, 89, 1, 53, 53, 136, 68, ! 766, 53, 100, 644, 10, 11, 12, 1, 158, 775, ! 160, 88, 182, 101, 1, 103, 130, 131, 103, 101, ! 102, 135, 136, 173, 101, 259, 32, 622, 100, 35, ! 36, 101, 182, 103, 97, 101, 5, 6, 101, 644, ! 264, 95, 101, 102, 158, 97, 160, 53, 198, 103, ! 100, 1, 202, 277, 97, 96, 283, 335, 64, 173, ! 198, 102, 101, 704, 101, 211, 707, 607, 182, 38, ! 39, 1, 101, 42, 101, 131, 1, 119, 192, 193, ! 194, 195, 90, 52, 198, 100, 200, 201, 202, 259, ! 96, 631, 1, 101, 64, 1, 379, 380, 381, 704, ! 334, 641, 707, 97, 160, 336, 644, 149, 1, 259, ! 152, 1, 81, 97, 101, 99, 85, 657, 1, 66, ! 290, 91, 1, 99, 71, 131, 96, 103, 170, 135, ! 1, 1, 773, 1, 1, 411, 103, 778, 284, 780, ! 290, 782, 1, 293, 94, 259, 96, 1, 1, 99, ! 100, 101, 102, 1, 160, 124, 125, 1, 88, 1, ! 1, 131, 564, 313, 334, 135, 704, 173, 773, 707, ! 95, 101, 141, 778, 96, 780, 290, 782, 96, 293, ! 102, 99, 493, 130, 334, 599, 300, 601, 158, 99, ! 160, 1, 101, 103, 308, 101, 310, 102, 336, 313, ! 1, 741, 485, 173, 173, 131, 352, 353, 101, 178, ! 173, 101, 182, 96, 360, 361, 443, 649, 260, 102, ! 334, 100, 336, 94, 95, 1, 96, 95, 99, 100, ! 101, 102, 102, 100, 160, 773, 90, 96, 640, 1, ! 778, 391, 780, 102, 782, 1, 644, 100, 96, 1, ! 97, 95, 221, 259, 102, 97, 97, 1, 96, 644, ! 674, 411, 64, 64, 102, 379, 380, 381, 382, 383, ! 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, ! 394, 395, 396, 397, 398, 561, 96, 293, 64, 259, ! 1, 0, 1, 100, 96, 1, 97, 411, 48, 173, ! 173, 1, 96, 272, 1, 1, 704, 313, 102, 707, ! 279, 0, 1, 63, 283, 1, 1, 101, 102, 704, ! 290, 97, 707, 293, 293, 95, 728, 48, 334, 131, ! 293, 300, 478, 99, 96, 481, 45, 300, 621, 308, ! 96, 310, 63, 313, 96, 308, 731, 310, 98, 45, ! 313, 95, 766, 62, 578, 1, 45, 581, 160, 68, ! 745, 775, 0, 1, 334, 97, 335, 56, 1, 101, ! 1, 485, 68, 62, 759, 773, 490, 98, 98, 68, ! 778, 350, 780, 1, 782, 96, 54, 76, 773, 95, ! 90, 537, 101, 778, 1, 780, 634, 782, 95, 95, ! 1, 1, 371, 95, 373, 411, 1, 45, 45, 95, ! 95, 561, 101, 97, 564, 649, 1, 1, 56, 293, ! 293, 391, 53, 1, 62, 62, 300, 300, 46, 47, ! 68, 68, 96, 64, 308, 308, 310, 310, 102, 313, ! 313, 411, 411, 681, 1, 96, 1, 561, 411, 1, ! 564, 102, 676, 53, 96, 693, 1, 99, 10, 11, ! 12, 1, 95, 101, 64, 5, 97, 1, 45, 1, ! 88, 440, 90, 68, 443, 93, 94, 95, 73, 649, ! 32, 99, 77, 35, 36, 103, 173, 102, 95, 10, ! 640, 12, 103, 88, 95, 0, 1, 97, 1, 649, ! 738, 53, 1, 88, 88, 98, 51, 621, 622, 102, ! 88, 66, 64, 68, 35, 60, 666, 1, 73, 0, ! 1, 66, 77, 637, 1, 61, 640, 103, 73, 65, ! 644, 88, 77, 88, 66, 649, 68, 411, 411, 84, ! 45, 73, 87, 88, 96, 77, 91, 92, 88, 103, ! 95, 56, 666, 1, 88, 561, 88, 62, 564, 104, ! 105, 106, 107, 68, 45, 110, 111, 51, 1, 99, ! 1, 0, 1, 0, 1, 56, 726, 67, 728, 131, ! 1, 62, 0, 1, 74, 88, 1, 68, 11, 88, ! 704, 561, 561, 707, 564, 564, 101, 1, 561, 1, ! 84, 564, 1, 87, 88, 1, 293, 1, 160, 12, ! 173, 88, 726, 300, 728, 1, 45, 731, 45, 109, ! 101, 308, 1, 310, 131, 1, 313, 45, 480, 561, ! 482, 745, 564, 62, 640, 62, 599, 14, 601, 68, ! 88, 68, 94, 649, 62, 759, 13, 99, 100, 51, ! 68, 158, 97, 160, 95, 88, 1, 88, 95, 773, ! 666, 46, 47, 101, 778, 85, 780, 88, 782, 638, ! 640, 640, 101, 88, 101, 644, 98, 640, 102, 649, ! 99, 644, 84, 101, 88, 87, 88, 561, 561, 88, ! 564, 564, 88, 68, 88, 478, 666, 666, 481, 97, ! 45, 101, 88, 666, 124, 125, 51, 67, 640, 88, ! 101, 674, 88, 95, 99, 60, 1, 62, 103, 90, ! 726, 95, 728, 68, 411, 599, 599, 601, 601, 95, ! 293, 46, 47, 96, 96, 704, 99, 300, 707, 84, ! 103, 704, 87, 88, 707, 308, 1, 310, 101, 102, ! 313, 704, 97, 95, 707, 45, 726, 726, 728, 728, ! 11, 51, 731, 726, 1, 728, 640, 640, 731, 95, ! 644, 644, 101, 99, 93, 94, 745, 103, 1, 93, ! 94, 32, 745, 173, 99, 36, 46, 47, 103, 96, ! 759, 96, 666, 666, 84, 1, 759, 87, 88, 142, ! 674, 674, 53, 766, 773, 97, 96, 101, 45, 778, ! 773, 780, 775, 782, 51, 778, 1, 780, 96, 782, ! 773, 102, 45, 3, 4, 778, 97, 780, 51, 782, ! 704, 704, 57, 707, 707, 57, 173, 16, 17, 45, ! 18, 19, 20, 21, 101, 51, 96, 84, 411, 96, ! 87, 88, 726, 726, 728, 728, 1, 731, 731, 202, ! 203, 84, 97, 98, 87, 88, 101, 387, 388, 389, ! 390, 745, 745, 96, 561, 93, 94, 564, 84, 96, ! 58, 87, 88, 88, 96, 759, 759, 1, 93, 94, ! 95, 101, 766, 766, 99, 51, 46, 47, 103, 773, ! 773, 775, 775, 293, 778, 778, 780, 780, 782, 782, ! 300, 101, 599, 57, 601, 5, 6, 7, 308, 1, ! 310, 3, 4, 313, 8, 9, 10, 270, 84, 88, ! 273, 87, 88, 96, 93, 94, 95, 0, 281, 282, ! 99, 46, 47, 45, 103, 93, 94, 95, 0, 51, ! 96, 99, 391, 640, 12, 103, 293, 644, 60, 56, ! 62, 99, 100, 300, 46, 47, 68, 392, 393, 51, ! 141, 308, 160, 310, 382, 383, 313, 77, 60, 666, ! 259, 158, 84, 411, 66, 87, 88, 674, 54, 266, ! 173, 73, 99, 100, 101, 77, 98, 96, 561, 664, ! 293, 564, 84, 313, 664, 87, 88, 313, 579, 91, ! 92, 579, 353, 95, 394, 97, 98, 704, 193, 397, ! 707, 411, 104, 105, 106, 107, 395, 370, 110, 111, ! 398, 374, 384, 385, 386, 396, 599, 402, 601, 726, ! 637, 728, 88, -1, 731, -1, 1, 93, 94, 95, ! -1, -1, -1, 99, -1, -1, 399, 103, 745, 93, ! 94, 95, -1, -1, -1, 99, -1, -1, -1, 103, ! -1, -1, 759, 416, 411, -1, -1, 640, -1, 766, ! -1, 644, -1, 426, -1, 428, 773, -1, 775, -1, ! 45, 778, -1, 780, -1, 782, 51, -1, -1, -1, ! -1, -1, -1, 666, -1, 60, -1, 62, -1, -1, ! 293, 674, -1, 68, -1, -1, -1, 300, 461, -1, ! 463, -1, -1, -1, -1, 308, -1, 310, -1, 84, ! 313, -1, 87, 88, 477, -1, 45, -1, -1, -1, ! -1, 704, 51, -1, 707, -1, -1, -1, -1, -1, ! 493, 60, -1, 62, -1, -1, -1, -1, -1, 68, ! -1, -1, -1, 726, -1, 728, -1, -1, 731, -1, ! -1, 561, -1, -1, 564, 84, -1, -1, 87, 88, ! -1, -1, 745, -1, 1, -1, 3, 4, 97, 98, ! -1, -1, 101, -1, -1, -1, 759, -1, -1, 45, ! -1, -1, -1, 766, -1, 51, -1, -1, -1, 599, ! 773, 601, 775, -1, 60, 778, 62, 780, -1, 782, ! -1, -1, 68, -1, 561, -1, -1, 564, 411, 46, ! 47, -1, -1, -1, 51, -1, -1, -1, 84, -1, ! -1, 87, 88, 60, 587, -1, -1, -1, -1, 66, ! 640, 97, 98, -1, 644, 101, 73, -1, -1, -1, ! 77, -1, 599, -1, 601, -1, -1, 84, -1, -1, ! 87, 88, -1, -1, 91, 92, 666, -1, 95, -1, ! 97, -1, -1, -1, 674, 628, -1, 104, 105, 106, ! 107, -1, -1, 110, 111, -1, -1, -1, -1, -1, ! -1, -1, -1, 640, -1, 45, -1, 644, -1, -1, ! -1, 51, -1, -1, 704, -1, -1, 707, -1, 662, ! 60, -1, 62, -1, -1, 668, -1, -1, 68, 666, ! -1, -1, -1, -1, -1, -1, 726, 674, 728, -1, ! -1, 731, -1, -1, 84, -1, -1, 87, 88, -1, ! -1, -1, -1, -1, -1, 745, -1, -1, 98, -1, ! -1, -1, -1, 192, 193, 194, 195, 704, -1, 759, ! 707, 200, 201, -1, -1, -1, 766, -1, 561, -1, ! -1, 564, -1, 773, -1, 775, -1, -1, 778, 726, ! 780, 728, 782, -1, 731, -1, -1, -1, -1, -1, ! -1, 744, -1, -1, -1, 748, -1, -1, 745, 1, ! -1, 3, 4, -1, -1, -1, 599, -1, 601, -1, ! -1, -1, 759, 192, 193, 194, 195, -1, -1, 766, ! -1, 200, 201, -1, -1, -1, 773, -1, 775, -1, ! -1, 778, -1, 780, -1, 782, -1, -1, -1, -1, ! -1, -1, -1, -1, 46, 47, -1, 640, -1, 51, ! -1, 644, -1, -1, -1, -1, -1, -1, 60, -1, ! -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, ! -1, 73, -1, 666, -1, 77, -1, -1, -1, -1, ! -1, 674, 84, -1, -1, 87, 88, -1, -1, 91, ! 92, -1, -1, 95, -1, -1, -1, -1, -1, 101, ! -1, -1, 104, 105, 106, 107, -1, -1, 110, 111, ! -1, 704, -1, -1, 707, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, 726, -1, 728, -1, -1, 731, -1, ! 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, ! 389, 390, 745, 392, 393, 394, 395, 396, 397, 398, ! -1, -1, -1, -1, -1, -1, 759, -1, -1, -1, ! -1, -1, -1, 766, -1, -1, -1, 1, -1, -1, ! 773, -1, 775, -1, -1, 778, -1, 780, -1, 782, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, ! 389, 390, -1, 392, 393, 394, 395, 396, 397, 398, ! -1, 45, 46, 47, 48, 49, 50, 51, 52, -1, ! -1, 55, -1, -1, -1, 59, 60, -1, -1, 63, ! -1, -1, 66, 67, 68, 69, 485, 71, 72, 73, ! 74, 490, -1, 77, 78, -1, -1, -1, -1, -1, ! 84, -1, -1, 87, 88, -1, -1, -1, 1, -1, ! -1, 95, -1, 97, 98, -1, -1, 101, -1, -1, ! 104, 105, 106, 107, -1, -1, 110, 111, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 485, -1, -1, -1, - -1, 490, 45, 46, 47, 48, 49, 50, 51, 52, - -1, -1, 55, -1, -1, -1, 59, 60, -1, -1, - 63, -1, -1, 66, 67, 68, 69, -1, 71, 72, - 73, 74, -1, -1, 77, 78, -1, -1, -1, -1, - -1, 84, -1, -1, 87, 88, -1, -1, -1, -1, - -1, -1, 95, 1, 97, 98, -1, -1, 101, -1, - -1, 104, 105, 106, 107, -1, -1, 110, 111, -1, - -1, -1, 621, 622, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 637, -1, -1, -1, -1, -1, -1, -1, -1, 45, 46, 47, 48, 49, 50, 51, 52, -1, -1, 55, -1, -1, -1, 59, 60, -1, -1, 63, -1, -1, 66, 67, 68, 69, 1, 71, 72, 73, 74, -1, -1, 77, ! 78, -1, 621, 622, -1, -1, 84, -1, -1, 87, ! 88, -1, -1, -1, -1, -1, -1, 95, 637, 97, 98, -1, -1, 101, -1, -1, 104, 105, 106, 107, -1, -1, 110, 111, -1, -1, 45, 46, 47, -1, 49, 50, 51, 52, -1, -1, 55, -1, -1, -1, ! 59, 60, -1, -1, -1, -1, -1, 66, 67, 68, ! 69, 1, 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, -1, -1, -1, 84, -1, -1, 87, 88, ! -1, -1, -1, -1, -1, -1, 95, -1, 97, 98, -1, -1, 101, -1, -1, 104, 105, 106, 107, -1, ! -1, 110, 111, -1, -1, 45, 46, 47, -1, 49, ! 50, 51, 52, -1, -1, 55, -1, -1, -1, 59, ! 60, -1, -1, -1, -1, -1, 66, 67, 68, 69, ! 1, 71, 72, 73, 74, -1, -1, 77, 78, -1, ! -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, ! -1, -1, -1, -1, -1, 95, -1, 97, -1, -1, ! -1, 101, -1, -1, 104, 105, 106, 107, -1, -1, ! 110, 111, -1, -1, 45, 46, 47, -1, 49, 50, ! 51, 52, -1, -1, 55, -1, -1, -1, 59, 60, ! -1, -1, -1, -1, -1, 66, 67, 1, 69, -1, ! 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, ! -1, -1, -1, 84, -1, -1, 87, 88, -1, -1, ! -1, -1, -1, -1, 95, -1, 97, -1, -1, -1, ! 101, -1, -1, 104, 105, 106, 107, -1, -1, 110, ! 111, 45, 46, 47, -1, 49, 50, 51, 52, -1, ! -1, 55, -1, -1, -1, 59, 60, -1, -1, -1, ! -1, -1, 66, 67, -1, 69, -1, 71, 72, 73, ! 74, -1, -1, 77, 78, 1, -1, 3, 4, -1, ! 84, -1, -1, 87, 88, -1, -1, -1, -1, -1, ! -1, 95, -1, 97, -1, -1, -1, 101, -1, -1, ! 104, 105, 106, 107, -1, -1, 110, 111, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! 46, 47, -1, -1, -1, 51, -1, 1, -1, 3, ! 4, -1, -1, -1, 60, -1, -1, -1, -1, -1, ! 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, ! -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, ! -1, 87, 88, -1, -1, 91, 92, -1, -1, 95, ! -1, -1, 46, 47, 100, -1, -1, 51, 104, 105, ! 106, 107, -1, -1, 110, 111, 60, -1, -1, -1, -1, -1, 66, 1, -1, 3, 4, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, ! 84, -1, -1, 87, 88, -1, 90, 91, 92, -1, ! -1, 95, -1, -1, -1, -1, -1, -1, -1, -1, 104, 105, 106, 107, -1, -1, 110, 111, 46, 47, -1, -1, -1, 51, -1, 1, -1, 3, 4, -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, ! 88, -1, -1, 91, 92, -1, -1, 95, 96, -1, 46, 47, -1, -1, -1, 51, 104, 105, 106, 107, -1, -1, 110, 111, 60, -1, -1, -1, -1, -1, 66, 1, -1, 3, 4, -1, -1, 73, -1, -1, --- 1079,2099 ---- error. */ static const short yydefact[] = { ! 0, 51, 52, 0, 0, 0, 0, 220, 1, 0, ! 0, 0, 33, 40, 41, 35, 0, 48, 49, 50, ! 43, 24, 0, 20, 21, 22, 0, 59, 0, 38, ! 0, 0, 34, 36, 0, 0, 53, 0, 0, 44, ! 42, 0, 161, 0, 0, 157, 60, 0, 66, 39, ! 37, 0, 0, 0, 58, 0, 46, 0, 23, 165, ! 17, 163, 15, 0, 154, 0, 0, 65, 16, 0, ! 0, 56, 162, 0, 159, 61, 66, 47, 45, 12, ! 0, 10, 11, 167, 0, 8, 9, 13, 14, 15, ! 0, 173, 175, 0, 174, 0, 169, 171, 172, 166, ! 164, 158, 64, 68, 69, 67, 0, 156, 0, 54, ! 110, 0, 126, 108, 0, 0, 87, 90, 126, 0, ! 18, 19, 112, 0, 0, 177, 176, 168, 170, 0, ! 0, 57, 160, 0, 0, 0, 0, 105, 96, 85, ! 0, 0, 0, 0, 104, 391, 0, 111, 126, 109, ! 0, 126, 71, 70, 187, 72, 20, 0, 82, 0, ! 74, 76, 80, 81, 0, 77, 0, 78, 136, 126, ! 83, 79, 0, 84, 55, 116, 113, 0, 125, 0, ! 118, 0, 128, 129, 127, 117, 115, 89, 0, 88, ! 92, 0, 0, 0, 0, 0, 0, 0, 340, 0, ! 0, 0, 0, 6, 5, 2, 3, 4, 7, 339, ! 0, 0, 412, 0, 100, 411, 337, 346, 342, 358, ! 0, 338, 343, 344, 345, 429, 413, 414, 422, 444, ! 417, 418, 420, 432, 451, 456, 463, 474, 479, 482, ! 485, 488, 491, 494, 499, 508, 500, 0, 99, 97, ! 95, 98, 393, 392, 107, 86, 106, 0, 126, 73, ! 75, 103, 0, 134, 0, 138, 0, 0, 0, 277, ! 0, 0, 0, 0, 0, 0, 0, 0, 340, 0, ! 0, 188, 0, 8, 14, 412, 0, 125, 193, 0, ! 0, 208, 185, 0, 189, 191, 0, 192, 197, 209, ! 0, 198, 210, 0, 199, 200, 211, 251, 0, 201, ! 0, 212, 202, 290, 0, 213, 214, 215, 217, 219, ! 216, 0, 218, 244, 243, 0, 241, 242, 239, 240, ! 238, 123, 121, 114, 0, 0, 0, 421, 412, 343, ! 345, 419, 424, 423, 428, 427, 426, 425, 0, 396, ! 0, 0, 0, 16, 0, 433, 430, 434, 431, 440, ! 0, 412, 0, 178, 0, 182, 0, 0, 0, 0, ! 0, 0, 93, 0, 0, 367, 0, 416, 415, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 506, 507, 0, 140, 0, 139, 133, 102, 132, 137, ! 0, 227, 228, 226, 246, 0, 312, 0, 301, 299, ! 0, 309, 307, 0, 273, 0, 254, 0, 327, 0, ! 287, 0, 305, 303, 0, 316, 0, 0, 195, 0, ! 223, 221, 0, 0, 186, 190, 194, 412, 323, 222, ! 225, 0, 272, 0, 412, 292, 296, 289, 0, 0, ! 320, 0, 120, 119, 124, 122, 131, 130, 351, 355, ! 0, 395, 385, 384, 363, 0, 378, 386, 0, 379, ! 0, 364, 0, 0, 0, 18, 19, 348, 341, 179, ! 180, 0, 350, 354, 353, 397, 0, 375, 407, 0, ! 349, 352, 373, 347, 374, 394, 409, 0, 368, 0, ! 448, 445, 449, 446, 450, 447, 454, 452, 455, 453, ! 460, 457, 461, 458, 462, 459, 470, 465, 472, 467, ! 469, 464, 471, 466, 473, 0, 468, 477, 475, 478, ! 476, 481, 480, 484, 483, 487, 486, 490, 489, 493, ! 492, 497, 0, 0, 502, 501, 141, 412, 142, 0, ! 0, 146, 0, 247, 0, 313, 311, 302, 300, 310, ! 308, 274, 0, 255, 0, 0, 0, 324, 328, 0, ! 325, 288, 306, 304, 317, 0, 315, 341, 0, 196, ! 229, 0, 0, 0, 252, 0, 293, 0, 281, 0, ! 0, 322, 0, 403, 404, 0, 390, 0, 387, 380, ! 383, 381, 382, 365, 357, 0, 442, 436, 439, 0, ! 0, 437, 184, 181, 183, 398, 0, 408, 405, 0, ! 410, 406, 359, 0, 496, 0, 0, 143, 0, 0, ! 144, 248, 0, 275, 271, 0, 332, 0, 336, 335, ! 329, 326, 330, 0, 233, 0, 230, 231, 0, 0, ! 0, 257, 0, 261, 0, 264, 0, 298, 297, 283, ! 0, 295, 0, 321, 0, 401, 0, 389, 388, 0, ! 366, 356, 441, 435, 443, 438, 377, 376, 399, 0, ! 360, 361, 498, 495, 0, 145, 0, 0, 0, 245, ! 0, 197, 0, 204, 205, 0, 206, 207, 0, 256, ! 333, 0, 314, 234, 0, 0, 232, 270, 267, 268, ! 509, 0, 259, 262, 0, 258, 0, 265, 0, 0, ! 282, 0, 319, 318, 402, 372, 0, 400, 362, 0, ! 147, 0, 0, 0, 224, 276, 0, 334, 331, 237, ! 235, 0, 269, 266, 260, 0, 280, 0, 370, 0, ! 0, 148, 0, 249, 0, 0, 236, 278, 279, 150, ! 0, 0, 0, 0, 149, 0, 0, 0, 0, 285, ! 0, 250, 284, 0, 0, 0 }; static const short yydefgoto[] = { ! 783, 209, 282, 210, 86, 87, 69, 61, 211, 212, ! 23, 24, 25, 8, 9, 10, 11, 12, 13, 14, ! 15, 448, 288, 133, 106, 48, 71, 105, 131, 159, ! 160, 161, 92, 115, 116, 117, 213, 163, 262, 93, ! 112, 179, 180, 289, 137, 184, 407, 165, 166, 167, ! 264, 168, 169, 409, 558, 559, 290, 18, 44, 73, ! 66, 108, 45, 64, 95, 96, 97, 98, 214, 366, ! 291, 172, 561, 726, 294, 295, 296, 297, 700, 298, ! 299, 300, 301, 703, 302, 303, 304, 305, 704, 306, ! 451, 307, 594, 662, 663, 664, 665, 308, 309, 706, ! 310, 311, 312, 707, 313, 314, 457, 670, 671, 315, ! 316, 317, 318, 319, 320, 321, 322, 577, 578, 579, ! 580, 215, 216, 217, 218, 219, 736, 679, 220, 496, ! 221, 476, 477, 121, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, ! 402, 497, 721 }; static const short yypact[] = { ! 756,-32768,-32768, 269, -45, 482, 498,-32768,-32768, 874, ! 408, 945,-32768,-32768,-32768,-32768, 556,-32768,-32768,-32768, ! -32768,-32768, 17,-32768,-32768,-32768, 191,-32768, 307,-32768, ! 34, 426,-32768,-32768, 965, 433,-32768, -45, 511,-32768, ! -32768, 476,-32768, 516, -22, -13,-32768, 522, 43,-32768, ! -32768, -45, 592, 411,-32768, 350,-32768, 29,-32768,-32768, ! -32768,-32768, 118, 1118,-32768, 532, -22,-32768,-32768, 186, ! 557,-32768,-32768, -22, -13,-32768, 43,-32768,-32768,-32768, ! 562,-32768,-32768,-32768, 564, 144,-32768,-32768,-32768, 210, ! 992,-32768,-32768, 41,-32768, 1255,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768, 250, 276,-32768, -22,-32768, ! -32768, 245, 475,-32768, 224, 612,-32768, 691, 475, 266, ! 373, 373,-32768, 575, 576,-32768,-32768,-32768,-32768, 595, ! 1045,-32768,-32768, 276, 674, 597, 93,-32768,-32768,-32768, ! 601, 2142, 103, 400,-32768,-32768, 227,-32768, 475,-32768, ! 680, 475,-32768,-32768,-32768,-32768, 389, 794,-32768, 1186, ! -32768,-32768,-32768,-32768, 16,-32768, 347,-32768,-32768, 450, ! -32768,-32768, 1862,-32768,-32768,-32768,-32768, 606, 490, 202, ! -32768, 776,-32768,-32768, 428,-32768,-32768,-32768, 243,-32768, ! -32768, 2850, 5088, 2902, 2968, 531, 26, 496,-32768, 3020, ! 3086, 3138, 5285,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! 321, 570, 727, 82,-32768, 619, 441,-32768,-32768,-32768, ! 618,-32768, 572,-32768, 723, 804,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768, 797, 837, 1055, 659, 853, 670, ! 716, 731, 733, 21,-32768,-32768,-32768, 810,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768, 890, 450,-32768, ! -32768,-32768, 460,-32768, 347,-32768, 751, 280, 3204,-32768, ! 214, 2194, 11, 371, 401, 225, 416, 260, 665, 3256, ! 5587,-32768, -45, 321, 570, 937, 548, 448,-32768, 776, ! 668,-32768,-32768, 1862,-32768,-32768, 673,-32768,-32768,-32768, ! 1931,-32768,-32768, 709,-32768,-32768,-32768,-32768, 1931,-32768, ! 1931,-32768,-32768, 1406, 712,-32768,-32768,-32768,-32768,-32768, ! -32768, 418,-32768, 689, 706, 804, 865, 908,-32768,-32768, ! -32768,-32768, 858,-32768, 658, 624, 627,-32768, 135,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 430,-32768, ! 632, 987, 730, 730, 420,-32768,-32768,-32768,-32768,-32768, ! 271, 727, 171,-32768, 671,-32768, 555, 485, 765, 5351, ! 2260, 710,-32768, -19, 3322,-32768, 429,-32768,-32768, 3374, ! 3440, 3492, 3558, 3610, 3676, 3728, 3794, 3846, 3912, 3964, ! 4030, 900, 4082, 4148, 4200, 4266, 4318, 4384, 4436, 2312, ! -32768,-32768, 4502,-32768, 479,-32768,-32768,-32768,-32768,-32768, ! 1862,-32768,-32768,-32768,-32768, 4554,-32768, 56,-32768,-32768, ! 72,-32768,-32768, 76,-32768, 4620,-32768, 4672,-32768, 635, ! -32768, 5140,-32768,-32768, 107,-32768, 78, 340, 717, 661, ! -32768,-32768, -45, 2378,-32768,-32768,-32768, 795, 490,-32768, ! -32768, 746,-32768, 779, 1042,-32768,-32768,-32768, 84, 2430, ! -32768, 4738,-32768,-32768,-32768, 858,-32768,-32768,-32768,-32768, ! -32, 764,-32768,-32768,-32768, 2496, 730,-32768, 197, 730, ! 197,-32768, 2548, 4790, 228, 3, 507,-32768, 5629,-32768, ! -32768, 2076,-32768,-32768,-32768,-32768, 519,-32768,-32768, 230, ! -32768,-32768,-32768,-32768,-32768, 770,-32768, 247,-32768, 5403, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768, 797,-32768, 797, ! -32768, 837,-32768, 837,-32768, 837,-32768, 1055,-32768, 1055, ! -32768, 1055,-32768, 1055,-32768, 144,-32768,-32768, 659,-32768, ! 659,-32768, 853,-32768, 670,-32768, 716,-32768, 731,-32768, ! 733,-32768, 866, 783,-32768,-32768,-32768, 1101,-32768, 1862, ! 782,-32768, 1862,-32768, 345,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768, 349,-32768, 788, 437, 235, 635,-32768, 347, ! -32768,-32768,-32768,-32768,-32768, 5587,-32768,-32768, 447, 717, ! -32768, 878, 48, 0,-32768, 792,-32768, 5233,-32768, 5165, ! 796, 812, 818,-32768,-32768, 5469,-32768, 264,-32768, 373, ! -32768, 373,-32768,-32768, 819, 108,-32768,-32768,-32768, 4856, ! 1241,-32768,-32768,-32768,-32768,-32768, 4908,-32768,-32768, 5521, ! -32768,-32768, 276, 527,-32768, 4974, 860,-32768, 1862, 2614, ! -32768,-32768, 1998,-32768,-32768, 261,-32768, 1005,-32768,-32768, ! -32768,-32768,-32768, 820,-32768, 2666,-32768,-32768, 892, 25, ! 5026,-32768, 2,-32768, 1612,-32768, 5587,-32768,-32768,-32768, ! 828, 825, 5208,-32768, 265,-32768, 553,-32768,-32768, 276, ! -32768, 832,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 590, ! -32768, 276,-32768,-32768, 455,-32768, 123, 139, 472,-32768, ! 881, 887, 1998,-32768,-32768, 1998,-32768,-32768, 830,-32768, ! 867, 876,-32768,-32768, 972, 154,-32768,-32768,-32768,-32768, ! -32768, 273,-32768,-32768, 1686,-32768, 1793,-32768, 880, 1931, ! -32768, 883,-32768,-32768,-32768,-32768, 276,-32768,-32768, 2732, ! -32768, 158, 4554, 1931,-32768,-32768, 2784,-32768,-32768,-32768, ! -32768, 981,-32768,-32768,-32768, 882,-32768, 1931,-32768, 175, ! 162,-32768, 355,-32768, 5165, 884,-32768,-32768,-32768,-32768, ! 211, 1998, 893, 5208,-32768, 934, 1998, 896, 1998,-32768, ! 1998,-32768,-32768, 998, 1000,-32768 }; static const short yypgoto[] = { ! -32768,-32768, -62, -56, 613, 23, -113, -24, 333, -3, ! -77,-32768, 129,-32768, 994, 755,-32768, 47,-32768,-32768, ! 720, 112, 510,-32768,-32768, 953, 936,-32768, -125,-32768, ! 856,-32768, 152, -122, 877, -154, -188,-32768,-32768, 396, ! -33, 766, -330, -129, -93,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768, 863,-32768, 38,-32768, 628, 302,-32768,-32768, ! -32768,-32768, 969, 506,-32768, 939,-32768,-32768, 253,-32768, ! -114, 777, -157, -159, -283,-32768, 729, -289, 248, -531, ! 578, -503,-32768,-32768,-32768, -304,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768, 367, 382, -617, -491,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768, -442,-32768, -611, 734,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 474,-32768, ! 481,-32768,-32768,-32768, 142,-32768,-32768,-32768,-32768, -423, ! -32768, 700, 219, -61, 1214, 238, 1238, 397, 486, 515, ! 875, -162, 639, 762, -482,-32768, 586, 763, 728, 568, ! 677, 678, 672, 681, 683,-32768, 449, 692, 798,-32768, ! -32768, 257,-32768 }; ! #define YYLAST 5740 static const short yytable[] = { ! 22, 84, 150, 30, 463, 181, 621, 85, 174, 456, ! 445, 449, 349, 293, 365, 292, 171, 261, 39, 452, ! 592, 453, 183, 332, 120, 144, 717, 349, 124, 341, ! 77, 345, 347, 84, 85, 49, 398, 356, 358, 85, ! 62, 100, 125, 21, 62, 171, 104, 727, 659, 657, ! 659, 118, 263, 156, 504, 254, 32, 565, 256, 615, ! 89, 731, 62, 660, 603, 660, 60, 62, 84, 21, ! 68, 604, 177, 567, 85, 63, 265, 569, 85, 584, ! 156, 32, 156, 372, 354, 596, 633, 89, 60, 65, ! 148, 151, 89, 60, 185, 124, 70, 84, 661, 619, ! 722, 85, 146, 85, 249, 153, -152, 727, 582, 680, ! 399, 701, 16, -101, 350, 718, 283, -101, 40, 335, ! 41, 16, 16, 16, 656, 85, 62, 89, 181, 350, ! 78, 89, 62, 26, 28, 50, 444, 51, 685, 702, ! 657, 352, 126, 16, 658, 360, 16, 16, 408, 120, ! 626, 705, 60, 772, 89, 750, 89, 566, 68, 716, ! 438, 429, 777, 750, 16, 405, 53, 55, 585, 285, ! 58, 701, 487, 568, 701, 90, 749, 570, 89, 586, ! 58, 465, 676, -91, -91, -291, 597, 102, 338, 338, ! 338, 338, 42, 186, 62, 177, 338, 338, 361, 702, ! 708, 85, 702, 250, 681, 181, 689, 90, 583, 111, ! 626, 705, 766, 114, 705, 418, 697, 511, 513, 515, ! 353, 51, 120, 467, 740, 138, 428, 442, 252, 618, ! 369, 627, 715, 85, 370, 741, 648, 283, 371, -63, ! 701, 626, 157, 119, 138, 701, 178, 701, 630, 701, ! 751, 562, 111, 114, 89, 43, 626, 283, 770, 761, ! 708, 432, 709, 708, 626, 677, 732, 488, 702, 188, ! 20, 157, 177, 702, 752, 702, 769, 702, 85, 445, ! 705, 414, 162, -63, 287, 705, 89, 705, -153, 705, ! 285, 478, 480, 668, 202, 456, 146, 447, 333, 485, ! 486, 286, 21, 624, 334, 447, 188, 447, 46, 119, ! 454, 162, 774, 51, 323, 419, 760, 711, -94, 134, ! 589, 617, 154, -94, -94, -94, -94, 253, 145, 708, ! 628, 89, 154, 62, 708, 535, 708, -94, 708, -94, ! 134, 487, -94, -94, -94, -94, 641, 631, 21, 376, ! 643, 75, 129, 699, 283, 445, 641, 21, -253, 68, ! -62, 433, 154, 753, 678, 94, 145, 483, 456, 178, ! 484, 47, 424, 130, 367, 415, 338, 338, 338, 338, ! 338, 338, 338, 338, 338, 338, 338, 338, 89, 338, ! 338, 338, 338, 338, 338, 338, 88, 94, 248, 420, ! 638, 251, 426, -62, -62, 287, 434, 557, -28, 1, ! 324, 188, 72, 449, 47, 609, 452, 430, 611, 460, ! 119, 481, 286, 88, 367, 178, -31, 1, 88, 286, ! 508, 468, 170, -30, 1, 323, 587, 286, 646, 286, ! 756, 642, 323, 445, 154, 644, 178, -62, 654, -323, ! 323, 771, 323, 2, 763, 323, 654, 683, 362, 248, ! 456, 170, 649, 88, 188, 652, 425, 88, 768, 456, ! 4, 2, 146, 414, 120, 43, 5, 56, 2, 471, ! 338, 57, 699, 27, 257, 338, 492, 756, 4, 763, ! 88, 768, 88, 36, 5, 4, 427, 351, 469, 29, ! 58, 5, 505, 283, 135, 284, 283, 690, -155, 7, ! 17, 431, 54, 461, 88, 482, 38, 59, 181, 17, ! 17, 17, 287, 67, 509, 417, 164, 7, 423, 135, ! 336, 324, 647, 99, 7, 36, 436, 437, 324, 286, ! 374, 17, 655, -323, 17, 17, 324, 79, 324, 440, ! 739, 324, 323, 493, 735, 164, 285, 154, 103, 285, ! 733, 406, 17, 110, 21, 113, 738, 742, 58, 325, ! 21, 188, 101, 91, 136, 556, 147, 149, 19, 107, ! 81, 334, 283, 82, 21, 177, 21, 19, 19, 19, ! 88, 85, -32, 1, -22, -22, 152, 637, 182, 21, ! 640, 36, 187, 620, 21, 91, 146, 331, 283, 19, ! 21, 758, 19, 19, 132, 625, 338, 338, 37, 375, ! 21, 626, 88, 691, 38, 464, 284, 499, 466, 626, ! 19, 507, 338, 470, 348, 285, -22, 2, 441, 447, ! 158, -22, -22, -22, 89, 21, 284, -22, 324, 734, ! 21, -22, 21, 490, 4, 626, 553, 491, 326, 462, ! 5, 285, 500, 21, 21, -504, -504, 88, 283, 158, ! 283, 287, 564, 368, 287, 175, 695, 387, 388, 389, ! 390, 394, 572, 21, 574, 21, 737, 327, 286, 21, ! 325, 286, 626, 7, 21, 608, 575, 325, 608, 447, ! 576, 323, 447, 2, 323, 325, 21, 325, 173, 79, ! 325, 500, 21, 139, 140, 21, 600, 391, 602, 2, ! 21, 285, 373, 285, 88, 79, 447, 588, 395, 501, ! 33, 610, 607, 612, 502, -342, -342, 173, 503, 323, ! 447, 323, 81, 284, 396, 82, 21, 397, 248, 21, ! 287, 33, -344, -344, 447, 33, -25, 1, 81, 178, ! -151, 82, 21, 443, 31, 58, 35, 286, 447, 489, ! 176, 286, 33, 447, 446, 447, 287, 447, 501, 326, ! 323, 255, 140, 502, 323, 141, 326, 503, -342, 52, ! 142, 143, -342, 286, 326, 122, 326, 324, 21, 326, ! 324, 2, 379, 380, 381, -344, 323, 325, 327, -344, ! 450, 328, 3, 459, 323, 327, -505, -505, 4, 140, ! -503, -503, 369, 327, 5, 327, 370, 79, 327, 475, ! 371, 286, 6, 494, 286, 324, 287, 324, 287, 36, ! 382, 383, 653, 593, 323, 79, 595, 323, 411, 412, ! 377, 378, 413, 286, 123, 286, 37, 7, 286, 605, ! 81, 500, 38, 82, 21, 629, 323, 634, 323, 392, ! 393, 323, 286, 635, -27, 1, 324, 639, 81, 656, ! 324, 82, 21, 687, 645, 323, 286, 666, -503, -503, ! 369, -135, 284, 716, 370, 284, 326, 672, 439, 323, ! 286, 534, 324, 400, 401, 286, 323, 286, 673, 286, ! 324, -413, -413, 323, 674, 323, -371, 720, 323, 2, ! 323, 712, 323, 728, 729, 327, 694, 597, 501, -369, ! 3, 746, 328, 502, 329, 2, 4, 503, 743, 328, ! 324, 79, 5, 324, -203, -26, 1, 328, 21, 328, ! 744, 79, 328, 745, -414, -414, 325, 142, 143, 325, ! 538, 540, 324, 747, 324, -29, 1, 324, 517, 519, ! 330, 284, 748, 749, 81, 7, 755, 82, 21, 757, ! 88, 324, 766, 767, 81, 773, 403, 82, 21, 776, ! 2, 778, 780, 122, 325, 324, 325, 284, 784, 762, ! 785, 3, 324, 765, 536, 34, 710, 4, 76, 324, ! 2, 324, 109, 5, 324, 260, 324, 189, 324, 775, ! 258, 3, 74, 404, 779, -15, 781, 4, 782, 723, ! -503, -503, 369, 5, 128, 325, 370, 36, 560, 325, ! 439, 410, 455, 79, 724, 326, 7, 458, 326, 328, ! 2, 650, 123, 479, 37, 329, 79, 284, 651, 284, ! 38, 325, 329, 384, 385, 386, 7, 343, 546, 325, ! 329, 542, 329, 544, 327, 329, 81, 327, 548, 82, ! 21, 550, 0, 326, 693, 326, 472, 473, 474, 81, ! 2, 330, 82, 21, 555, 0, 79, 0, 330, 325, ! 0, 0, 325, 0, 0, 80, 330, 4, 330, 0, ! 0, 330, 327, 5, 327, 527, 529, 531, 533, 0, ! 0, 325, 0, 325, 326, 0, 325, 0, 326, 81, ! -15, 0, 82, 21, 0, -503, -503, 369, 0, 0, ! 325, 370, 154, 155, 0, 371, 7, 521, 523, 525, ! 326, 0, 0, 327, 325, 0, 0, 327, 326, 0, ! 0, 325, 0, 2, 0, 0, 0, 0, 325, 79, ! 325, 0, 329, 325, 0, 325, 0, 325, 80, 327, ! 4, 0, 0, 0, 0, 0, 5, 327, 326, -15, ! 0, 326, 0, 0, -503, -503, 369, 0, 328, 0, ! 370, 328, 81, 0, 636, 82, 21, 0, 330, 0, ! 326, 0, 326, 0, 0, 326, 83, 327, 0, 0, ! 327, 0, 0, 0, 0, 0, 0, 0, 0, 326, ! 0, 2, 0, 0, 0, 0, 328, 79, 328, 327, ! 0, 327, 684, 326, 327, 0, 80, 0, 4, 0, ! 326, 0, 0, 0, 5, 0, 0, 326, 327, 326, ! 0, 0, 326, 0, 326, 0, 326, 0, 0, 0, ! 81, 0, 327, 82, 21, 0, 0, 328, 0, 327, ! 0, 328, 0, 154, 259, 0, 327, 7, 327, 0, ! 0, 327, 79, 327, 0, 327, 0, 0, 0, 0, ! 2, 195, 0, 328, 0, 0, 79, 196, 0, 0, ! 0, 328, 0, 0, 197, 80, 0, 4, 198, 0, ! 0, 329, 0, 5, 329, 81, 0, 0, 82, 21, ! 0, 0, 199, 200, 0, 0, 201, 0, 0, 81, ! 0, 328, 82, 21, 328, 203, 204, 205, 206, 0, ! 0, 207, 208, 127, 0, 0, 0, 330, 0, 329, ! 330, 329, 0, 328, 0, 328, 0, 0, 328, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 328, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 330, 328, 330, 0, 0, ! 329, 0, 0, 328, 329, 339, 339, 339, 339, 0, ! 328, 0, 328, 339, 339, 328, 0, 328, 0, 328, ! 0, 0, 0, 0, 0, 0, 329, 0, 0, 340, ! 340, 340, 340, 0, 329, 0, 330, 340, 340, 0, ! 330, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 2, 193, 194, 0, 0, 0, 79, 0, 0, ! 0, 0, 330, 0, 329, 0, 195, 329, 0, 0, ! 330, 0, 196, 0, 0, 0, 0, 0, 0, 197, ! 0, 0, 0, 198, 0, 0, 329, 0, 329, 0, ! 81, 329, 0, 82, 21, 0, 0, 0, 0, 0, ! 330, 280, 0, 330, 0, 329, 0, 0, 0, 0, ! 203, 204, 205, 206, 0, 0, 207, 208, 0, 329, ! 0, 0, 330, 0, 330, 0, 329, 330, 0, 0, ! 0, 0, 0, 329, 0, 329, 0, 0, 329, 0, ! 329, 330, 329, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 330, 0, 0, 0, 0, ! 0, 0, 330, 0, 0, 0, 0, 0, 0, 330, ! 0, 330, 0, 0, 330, 0, 330, 0, 330, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 339, 339, 339, 339, 339, 339, 339, ! 339, 339, 339, 339, 339, 0, 339, 339, 339, 339, ! 339, 339, 339, 266, 0, 0, 0, 340, 340, 340, ! 340, 340, 340, 340, 340, 340, 340, 340, 340, 0, ! 340, 340, 340, 340, 340, 340, 340, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 2, 193, 194, ! 659, 267, 268, 79, 269, 0, 0, 270, 0, 0, ! 0, 271, 195, 0, 0, 660, 0, 0, 272, 273, ! 5, 274, 0, 275, 276, 197, 277, 266, 0, 278, ! 279, 0, 0, 0, 0, 0, 81, 339, 0, 82, ! 21, 0, 339, 0, 0, 0, 0, 280, 0, 154, ! 725, 0, 0, 7, 0, 0, 203, 204, 205, 206, ! 0, 340, 207, 208, 0, 0, 340, 0, 0, 0, ! 0, 2, 193, 194, 659, 267, 268, 79, 269, 0, ! 0, 270, 0, 0, 0, 271, 195, 0, 0, 660, ! 0, 0, 272, 273, 5, 274, 0, 275, 276, 197, ! 277, 0, 0, 278, 279, 0, 0, 0, 0, 0, ! 81, 0, 0, 82, 21, 0, 0, 0, 0, 0, ! 0, 280, 0, 154, 754, 0, 0, 7, 0, 0, ! 203, 204, 205, 206, 266, 0, 207, 208, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 339, 339, 0, 0, 0, 2, 193, ! 194, -263, 267, 268, 79, 269, 0, 0, 270, 339, ! 0, 0, 271, 195, 0, 0, -263, 340, 340, 272, ! 273, 5, 274, 266, 275, 276, 197, 277, 0, 0, ! 278, 279, 0, 340, 0, 0, 0, 81, 0, 0, ! 82, 21, 0, 0, 0, 0, 0, 0, 280, 0, ! 154, -263, 0, 0, 7, 0, 0, 203, 204, 205, ! 206, 0, 0, 207, 208, 0, 0, 2, 193, 194, ! 0, 267, 268, 79, 269, 0, 0, 270, 0, 0, ! 0, 271, 195, 0, 0, 0, 0, 0, 272, 273, ! 5, 274, 266, 275, 276, 197, 277, 0, 0, 278, ! 279, 0, 0, 0, 0, 0, 81, 0, 0, 82, ! 21, 0, 0, 0, 0, 0, 0, 280, 0, 154, ! 281, 0, 0, 7, 0, 0, 203, 204, 205, 206, ! 0, 0, 207, 208, 0, 0, 2, 193, 194, 0, ! 267, 268, 79, 269, 0, 0, 270, 0, 0, 0, ! 271, 195, 0, 0, 0, 0, 0, 272, 273, 266, ! 274, 0, 275, 276, 197, 277, 0, 0, 278, 279, ! 0, 0, 0, 0, 0, 81, 0, 0, 82, 21, ! 0, 0, 0, 0, 0, 0, 280, 0, 154, 0, ! 0, 0, 7, 0, 0, 203, 204, 205, 206, 0, ! 0, 207, 208, 2, 193, 194, 0, 698, 268, 79, ! 269, 0, 0, 270, 0, 0, 0, 271, 195, 0, ! 0, 0, 0, 0, 272, 273, 0, 274, 0, 275, ! 276, 197, 277, 0, 0, 278, 279, 622, 0, 191, ! 192, 0, 81, 0, 0, 82, 21, 0, 0, 0, ! 0, 0, 0, 280, 0, 154, 0, 0, 0, 7, ! 0, 0, 203, 204, 205, 206, 0, 0, 207, 208, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 193, 194, 0, 0, 0, 79, 0, 0, ! 0, 0, 0, 0, 0, 0, 195, 0, 0, 0, ! 0, 0, 196, 190, 0, 191, 192, 0, 0, 197, ! 0, 0, 0, 198, 0, 0, 0, 0, 0, 0, ! 81, 0, 0, 82, 21, 0, 0, 199, 200, 0, ! 0, 201, 0, 202, 623, 0, 0, 0, 0, 0, ! 203, 204, 205, 206, 0, 0, 207, 208, 193, 194, ! 0, 0, 0, 79, 0, 421, 0, 191, 192, 0, ! 0, 0, 195, 0, 0, 0, 0, 0, 196, 0, ! 0, 0, 0, 0, 0, 197, 0, 0, 0, 198, ! 0, 0, 0, 0, 0, 0, 81, 0, 0, 82, ! 21, 0, 0, 199, 200, 0, 0, 201, 0, 202, ! 193, 194, 0, 0, 0, 79, 203, 204, 205, 206, ! 0, 0, 207, 208, 195, 0, 0, 0, 0, 0, ! 196, 498, 0, 191, 192, 0, 0, 197, 0, 0, ! 0, 198, 0, 0, 0, 0, 0, 0, 81, 0, ! 0, 82, 21, 0, 0, 199, 200, 0, 0, 201, ! 0, 0, 0, 0, 0, 422, 0, 0, 203, 204, ! 205, 206, 0, 0, 207, 208, 193, 194, 0, 0, ! 0, 79, 0, 551, 0, 191, 192, 0, 0, 0, ! 195, 0, 0, 0, 0, 0, 196, 0, 0, 0, ! 0, 0, 0, 197, 0, 0, 0, 198, 0, 0, ! 0, 0, 0, 0, 81, 0, 0, 82, 21, 0, ! 0, 199, 200, 0, 0, 201, 0, 0, 193, 194, ! 145, 0, 0, 79, 203, 204, 205, 206, 0, 0, ! 207, 208, 195, 0, 0, 0, 0, 0, 196, 590, ! 0, 191, 192, 0, 0, 197, 0, 0, 0, 198, ! 0, 0, 0, 0, 0, 0, 81, 0, 0, 82, ! 21, 0, 552, 199, 200, 0, 0, 201, 0, 0, ! 0, 0, 0, 0, 0, 0, 203, 204, 205, 206, ! 0, 0, 207, 208, 193, 194, 0, 0, 0, 79, ! 0, 598, 0, 191, 192, 0, 0, 0, 195, 0, ! 0, 0, 0, 0, 196, 0, 0, 0, 0, 0, ! 0, 197, 0, 0, 0, 198, 0, 0, 0, 0, ! 0, 0, 81, 0, 0, 82, 21, 0, 0, 199, ! 200, 0, 0, 201, 591, 0, 193, 194, 0, 0, ! 0, 79, 203, 204, 205, 206, 0, 0, 207, 208, ! 195, 0, 0, 0, 0, 0, 196, 606, 0, 191, ! 192, 0, 0, 197, 0, 0, 0, 198, 0, 0, ! 0, 0, 0, 0, 81, 0, 0, 82, 21, 0, ! 0, 199, 200, 0, 0, 201, 0, 0, 0, 0, ! 0, 599, 0, 0, 203, 204, 205, 206, 0, 0, ! 207, 208, 193, 194, 0, 0, 0, 79, 0, 613, ! 0, 191, 192, 0, 0, 0, 195, 0, 0, 0, ! 0, 0, 196, 0, 0, 0, 0, 0, 0, 197, ! 0, 0, 0, 198, 0, 0, 0, 0, 0, 0, ! 81, 0, 0, 82, 21, 0, 0, 199, 200, 0, ! 0, 201, 0, 0, 193, 194, 145, 0, 0, 79, ! 203, 204, 205, 206, 0, 0, 207, 208, 195, 0, ! 0, 0, 0, 0, 196, 590, 0, 191, 192, 0, ! 0, 197, 0, 0, 0, 198, 0, 0, 0, 0, ! 0, 0, 81, 0, 0, 82, 21, 0, 0, 199, ! 200, 0, 0, 201, 614, 0, 0, 0, 0, 0, ! 0, 0, 203, 204, 205, 206, 0, 0, 207, 208, ! 193, 194, 0, 0, 0, 79, 0, 713, 0, 191, ! 192, 0, 0, 0, 195, 0, 0, 0, 0, 0, ! 196, 0, 0, 0, 0, 0, 0, 197, 0, 0, ! 0, 198, 0, 0, 0, 0, 0, 0, 81, 0, ! 0, 82, 21, 0, 0, 199, 200, 0, 0, 201, ! 696, 0, 193, 194, 0, 0, 0, 79, 203, 204, ! 205, 206, 0, 0, 207, 208, 195, 0, 0, 0, ! 0, 0, 196, 713, 0, 191, 192, 0, 0, 197, ! 0, 0, 0, 198, 0, 0, 0, 0, 0, 0, ! 81, 0, 0, 82, 21, 0, 0, 199, 200, 0, ! 0, 201, 714, 0, 0, 0, 0, 0, 0, 0, ! 203, 204, 205, 206, 0, 0, 207, 208, 193, 194, ! 0, 0, 0, 79, 0, 598, 0, 191, 192, 0, ! 0, 0, 195, 0, 0, 0, 0, 0, 196, 0, ! 0, 0, 0, 0, 0, 197, 0, 0, 0, 198, ! 0, 0, 0, 0, 0, 0, 81, 0, 0, 82, ! 21, 0, 0, 199, 200, 0, 0, 201, 759, 0, ! 193, 194, 0, 0, 0, 79, 203, 204, 205, 206, ! 0, 0, 207, 208, 195, 0, 0, 0, 0, 0, ! 196, 337, 0, 191, 192, 0, 0, 197, 0, 0, ! 0, 198, 0, 0, 0, 0, 0, 0, 81, 0, ! 0, 82, 21, 0, 0, 199, 200, 0, 0, 201, ! 0, 0, 0, 0, 0, 764, 0, 0, 203, 204, ! 205, 206, 0, 0, 207, 208, 193, 194, 0, 0, ! 0, 79, 0, 344, 0, 191, 192, 0, 0, 0, ! 195, 0, 0, 0, 0, 0, 196, 0, 0, 0, ! 0, 0, 0, 197, 0, 0, 0, 198, 0, 0, ! 0, 0, 0, 0, 81, 0, 0, 82, 21, 0, ! 0, 199, 200, 0, 0, 201, 0, 0, 193, 194, ! 0, 0, 0, 79, 203, 204, 205, 206, 0, 0, ! 207, 208, 195, 0, 0, 0, 0, 0, 196, 346, ! 0, 191, 192, 0, 0, 197, 0, 0, 0, 198, ! 0, 0, 0, 0, 0, 0, 81, 0, 0, 82, ! 21, 0, 0, 199, 200, 0, 0, 201, 0, 0, ! 0, 0, 0, 0, 0, 0, 203, 204, 205, 206, ! 0, 0, 207, 208, 193, 194, 0, 0, 0, 79, ! 0, 355, 0, 191, 192, 0, 0, 0, 195, 0, ! 0, 0, 0, 0, 196, 0, 0, 0, 0, 0, ! 0, 197, 0, 0, 0, 198, 0, 0, 0, 0, ! 0, 0, 81, 0, 0, 82, 21, 0, 0, 199, ! 200, 0, 0, 201, 0, 0, 193, 194, 0, 0, ! 0, 79, 203, 204, 205, 206, 0, 0, 207, 208, ! 195, 0, 0, 0, 0, 0, 196, 357, 0, 191, ! 192, 0, 0, 197, 0, 0, 0, 198, 0, 0, ! 0, 0, 0, 0, 81, 0, 0, 82, 21, 0, ! 0, 199, 200, 0, 0, 201, 0, 0, 0, 0, ! 0, 0, 0, 0, 203, 204, 205, 206, 0, 0, ! 207, 208, 193, 194, 0, 0, 0, 79, 0, 359, ! 0, 191, 192, 0, 0, 0, 195, 0, 0, 0, ! 0, 0, 196, 0, 0, 0, 0, 0, 0, 197, ! 0, 0, 0, 198, 0, 0, 0, 0, 0, 0, ! 81, 0, 0, 82, 21, 0, 0, 199, 200, 0, ! 0, 201, 0, 0, 193, 194, 0, 0, 0, 79, ! 203, 204, 205, 206, 0, 0, 207, 208, 195, 0, ! 0, 0, 0, 0, 196, 416, 0, 191, 192, 0, ! 0, 197, 0, 0, 0, 198, 0, 0, 0, 0, ! 0, 0, 81, 0, 0, 82, 21, 0, 0, 199, ! 200, 0, 0, 201, 0, 0, 0, 0, 0, 0, ! 0, 0, 203, 204, 205, 206, 0, 0, 207, 208, ! 193, 194, 0, 0, 0, 79, 0, 435, 0, 191, ! 192, 0, 0, 0, 195, 0, 0, 0, 0, 0, ! 196, 0, 0, 0, 0, 0, 0, 197, 0, 0, ! 0, 198, 0, 0, 0, 0, 0, 0, 81, 0, ! 0, 82, 21, 0, 0, 199, 200, 0, 0, 201, ! 0, 0, 193, 194, 0, 0, 0, 79, 203, 204, ! 205, 206, 0, 0, 207, 208, 195, 0, 0, 0, ! 0, 0, 196, 506, 0, 191, 192, 0, 0, 197, ! 0, 0, 0, 198, 0, 0, 0, 0, 0, 0, ! 81, 0, 0, 82, 21, 0, 0, 199, 200, 0, ! 0, 201, 0, 0, 0, 0, 0, 0, 0, 0, ! 203, 204, 205, 206, 0, 0, 207, 208, 193, 194, ! 0, 0, 0, 79, 0, 510, 0, 191, 192, 0, ! 0, 0, 195, 0, 0, 0, 0, 0, 196, 0, ! 0, 0, 0, 0, 0, 197, 0, 0, 0, 198, ! 0, 0, 0, 0, 0, 0, 81, 0, 0, 82, ! 21, 0, 0, 199, 200, 0, 0, 201, 0, 0, ! 193, 194, 0, 0, 0, 79, 203, 204, 205, 206, ! 0, 0, 207, 208, 195, 0, 0, 0, 0, 0, ! 196, 512, 0, 191, 192, 0, 0, 197, 0, 0, ! 0, 198, 0, 0, 0, 0, 0, 0, 81, 0, ! 0, 82, 21, 0, 0, 199, 200, 0, 0, 201, ! 0, 0, 0, 0, 0, 0, 0, 0, 203, 204, ! 205, 206, 0, 0, 207, 208, 193, 194, 0, 0, ! 0, 79, 0, 514, 0, 191, 192, 0, 0, 0, ! 195, 0, 0, 0, 0, 0, 196, 0, 0, 0, ! 0, 0, 0, 197, 0, 0, 0, 198, 0, 0, ! 0, 0, 0, 0, 81, 0, 0, 82, 21, 0, ! 0, 199, 200, 0, 0, 201, 0, 0, 193, 194, ! 0, 0, 0, 79, 203, 204, 205, 206, 0, 0, ! 207, 208, 195, 0, 0, 0, 0, 0, 196, 516, ! 0, 191, 192, 0, 0, 197, 0, 0, 0, 198, ! 0, 0, 0, 0, 0, 0, 81, 0, 0, 82, ! 21, 0, 0, 199, 200, 0, 0, 201, 0, 0, ! 0, 0, 0, 0, 0, 0, 203, 204, 205, 206, ! 0, 0, 207, 208, 193, 194, 0, 0, 0, 79, ! 0, 518, 0, 191, 192, 0, 0, 0, 195, 0, ! 0, 0, 0, 0, 196, 0, 0, 0, 0, 0, ! 0, 197, 0, 0, 0, 198, 0, 0, 0, 0, ! 0, 0, 81, 0, 0, 82, 21, 0, 0, 199, ! 200, 0, 0, 201, 0, 0, 193, 194, 0, 0, ! 0, 79, 203, 204, 205, 206, 0, 0, 207, 208, ! 195, 0, 0, 0, 0, 0, 196, 520, 0, 191, ! 192, 0, 0, 197, 0, 0, 0, 198, 0, 0, ! 0, 0, 0, 0, 81, 0, 0, 82, 21, 0, ! 0, 199, 200, 0, 0, 201, 0, 0, 0, 0, ! 0, 0, 0, 0, 203, 204, 205, 206, 0, 0, ! 207, 208, 193, 194, 0, 0, 0, 79, 0, 522, ! 0, 191, 192, 0, 0, 0, 195, 0, 0, 0, ! 0, 0, 196, 0, 0, 0, 0, 0, 0, 197, ! 0, 0, 0, 198, 0, 0, 0, 0, 0, 0, ! 81, 0, 0, 82, 21, 0, 0, 199, 200, 0, ! 0, 201, 0, 0, 193, 194, 0, 0, 0, 79, ! 203, 204, 205, 206, 0, 0, 207, 208, 195, 0, ! 0, 0, 0, 0, 196, 524, 0, 191, 192, 0, ! 0, 197, 0, 0, 0, 198, 0, 0, 0, 0, ! 0, 0, 81, 0, 0, 82, 21, 0, 0, 199, ! 200, 0, 0, 201, 0, 0, 0, 0, 0, 0, ! 0, 0, 203, 204, 205, 206, 0, 0, 207, 208, ! 193, 194, 0, 0, 0, 79, 0, 526, 0, 191, ! 192, 0, 0, 0, 195, 0, 0, 0, 0, 0, ! 196, 0, 0, 0, 0, 0, 0, 197, 0, 0, ! 0, 198, 0, 0, 0, 0, 0, 0, 81, 0, ! 0, 82, 21, 0, 0, 199, 200, 0, 0, 201, ! 0, 0, 193, 194, 0, 0, 0, 79, 203, 204, ! 205, 206, 0, 0, 207, 208, 195, 0, 0, 0, ! 0, 0, 196, 528, 0, 191, 192, 0, 0, 197, ! 0, 0, 0, 198, 0, 0, 0, 0, 0, 0, ! 81, 0, 0, 82, 21, 0, 0, 199, 200, 0, ! 0, 201, 0, 0, 0, 0, 0, 0, 0, 0, ! 203, 204, 205, 206, 0, 0, 207, 208, 193, 194, ! 0, 0, 0, 79, 0, 530, 0, 191, 192, 0, ! 0, 0, 195, 0, 0, 0, 0, 0, 196, 0, ! 0, 0, 0, 0, 0, 197, 0, 0, 0, 198, ! 0, 0, 0, 0, 0, 0, 81, 0, 0, 82, ! 21, 0, 0, 199, 200, 0, 0, 201, 0, 0, ! 193, 194, 0, 0, 0, 79, 203, 204, 205, 206, ! 0, 0, 207, 208, 195, 0, 0, 0, 0, 0, ! 196, 532, 0, 191, 192, 0, 0, 197, 0, 0, ! 0, 198, 0, 0, 0, 0, 0, 0, 81, 0, ! 0, 82, 21, 0, 0, 199, 200, 0, 0, 201, ! 0, 0, 0, 0, 0, 0, 0, 0, 203, 204, ! 205, 206, 0, 0, 207, 208, 193, 194, 0, 0, ! 0, 79, 0, 537, 0, 191, 192, 0, 0, 0, ! 195, 0, 0, 0, 0, 0, 196, 0, 0, 0, ! 0, 0, 0, 197, 0, 0, 0, 198, 0, 0, ! 0, 0, 0, 0, 81, 0, 0, 82, 21, 0, ! 0, 199, 200, 0, 0, 201, 0, 0, 193, 194, ! 0, 0, 0, 79, 203, 204, 205, 206, 0, 0, ! 207, 208, 195, 0, 0, 0, 0, 0, 196, 539, ! 0, 191, 192, 0, 0, 197, 0, 0, 0, 198, ! 0, 0, 0, 0, 0, 0, 81, 0, 0, 82, ! 21, 0, 0, 199, 200, 0, 0, 201, 0, 0, ! 0, 0, 0, 0, 0, 0, 203, 204, 205, 206, ! 0, 0, 207, 208, 193, 194, 0, 0, 0, 79, ! 0, 541, 0, 191, 192, 0, 0, 0, 195, 0, ! 0, 0, 0, 0, 196, 0, 0, 0, 0, 0, ! 0, 197, 0, 0, 0, 198, 0, 0, 0, 0, ! 0, 0, 81, 0, 0, 82, 21, 0, 0, 199, ! 200, 0, 0, 201, 0, 0, 193, 194, 0, 0, ! 0, 79, 203, 204, 205, 206, 0, 0, 207, 208, ! 195, 0, 0, 0, 0, 0, 196, 543, 0, 191, ! 192, 0, 0, 197, 0, 0, 0, 198, 0, 0, ! 0, 0, 0, 0, 81, 0, 0, 82, 21, 0, ! 0, 199, 200, 0, 0, 201, 0, 0, 0, 0, ! 0, 0, 0, 0, 203, 204, 205, 206, 0, 0, ! 207, 208, 193, 194, 0, 0, 0, 79, 0, 545, ! 0, 191, 192, 0, 0, 0, 195, 0, 0, 0, ! 0, 0, 196, 0, 0, 0, 0, 0, 0, 197, ! 0, 0, 0, 198, 0, 0, 0, 0, 0, 0, ! 81, 0, 0, 82, 21, 0, 0, 199, 200, 0, ! 0, 201, 0, 0, 193, 194, 0, 0, 0, 79, ! 203, 204, 205, 206, 0, 0, 207, 208, 195, 0, ! 0, 0, 0, 0, 196, 547, 0, 191, 192, 0, ! 0, 197, 0, 0, 0, 198, 0, 0, 0, 0, ! 0, 0, 81, 0, 0, 82, 21, 0, 0, 199, ! 200, 0, 0, 201, 0, 0, 0, 0, 0, 0, ! 0, 0, 203, 204, 205, 206, 0, 0, 207, 208, ! 193, 194, 0, 0, 0, 79, 0, 549, 0, 191, ! 192, 0, 0, 0, 195, 0, 0, 0, 0, 0, ! 196, 0, 0, 0, 0, 0, 0, 197, 0, 0, ! 0, 198, 0, 0, 0, 0, 0, 0, 81, 0, ! 0, 82, 21, 0, 0, 199, 200, 0, 0, 201, ! 0, 0, 193, 194, 0, 0, 0, 79, 203, 204, ! 205, 206, 0, 0, 207, 208, 195, 0, 0, 0, ! 0, 0, 196, 554, 0, 191, 192, 0, 0, 197, ! 0, 0, 0, 198, 0, 0, 0, 0, 0, 0, ! 81, 0, 0, 82, 21, 0, 0, 199, 200, 0, ! 0, 201, 0, 0, 0, 0, 0, 0, 0, 0, ! 203, 204, 205, 206, 0, 0, 207, 208, 193, 194, ! 0, 0, 0, 79, 0, 563, 0, 191, 192, 0, ! 0, 0, 195, 0, 0, 0, 0, 0, 196, 0, ! 0, 0, 0, 0, 0, 197, 0, 0, 0, 198, ! 0, 0, 0, 0, 0, 0, 81, 0, 0, 82, ! 21, 0, 0, 199, 200, 0, 0, 201, 0, 0, ! 193, 194, 0, 0, 0, 79, 203, 204, 205, 206, ! 0, 0, 207, 208, 195, 0, 0, 0, 0, 0, ! 196, 571, 0, 191, 192, 0, 0, 197, 0, 0, ! 0, 198, 0, 0, 0, 0, 0, 0, 81, 0, ! 0, 82, 21, 0, 0, 199, 200, 0, 0, 201, ! 0, 0, 0, 0, 0, 0, 0, 0, 203, 204, ! 205, 206, 0, 0, 207, 208, 193, 194, 0, 0, ! 0, 79, 0, 573, 0, 191, 192, 0, 0, 0, ! 195, 0, 0, 0, 0, 0, 196, 0, 0, 0, ! 0, 0, 0, 197, 0, 0, 0, 198, 0, 0, ! 0, 0, 0, 0, 81, 0, 0, 82, 21, 0, ! 0, 199, 200, 0, 0, 201, 0, 0, 193, 194, ! 0, 0, 0, 79, 203, 204, 205, 206, 0, 0, ! 207, 208, 195, 0, 0, 0, 0, 0, 196, 601, ! 0, 191, 192, 0, 0, 197, 0, 0, 0, 198, ! 0, 0, 0, 0, 0, 0, 81, 0, 0, 82, ! 21, 0, 0, 199, 200, 0, 0, 201, 0, 0, ! 0, 0, 0, 0, 0, 0, 203, 204, 205, 206, ! 0, 0, 207, 208, 193, 194, 0, 0, 0, 79, ! 0, 616, 0, 191, 192, 0, 0, 0, 195, 0, ! 0, 0, 0, 0, 196, 0, 0, 0, 0, 0, ! 0, 197, 0, 0, 0, 198, 0, 0, 0, 0, ! 0, 0, 81, 0, 0, 82, 21, 0, 0, 199, ! 200, 0, 0, 201, 0, 0, 193, 194, 0, 0, ! 0, 79, 203, 204, 205, 206, 0, 0, 207, 208, ! 195, 0, 0, 0, 0, 0, 196, 682, 0, 191, ! 192, 0, 0, 197, 0, 0, 0, 198, 0, 0, ! 0, 0, 0, 0, 81, 0, 0, 82, 21, 0, ! 0, 199, 200, 0, 0, 201, 0, 0, 0, 0, ! 0, 0, 0, 0, 203, 204, 205, 206, 0, 0, ! 207, 208, 193, 194, 0, 0, 0, 79, 0, 686, ! 0, 191, 192, 0, 0, 0, 195, 0, 0, 0, ! 0, 0, 196, 0, 0, 0, 0, 0, 0, 197, ! 0, 0, 0, 198, 0, 0, 0, 0, 0, 0, ! 81, 0, 0, 82, 21, 0, 0, 199, 200, 0, ! 0, 201, 0, 0, 193, 194, 0, 0, 0, 79, ! 203, 204, 205, 206, 0, 0, 207, 208, 195, 0, ! 0, 0, 0, 0, 196, 692, 0, 191, 192, 0, ! 0, 197, 0, 0, 0, 198, 0, 0, 0, 0, ! 0, 0, 81, 0, 0, 82, 21, 0, 0, 199, ! 200, 0, 0, 201, 0, 0, 0, 0, 0, 0, ! 0, 0, 203, 204, 205, 206, 0, 0, 207, 208, ! 193, 194, 0, 0, 0, 79, 0, 719, 0, 191, ! 192, 0, 0, 0, 195, 0, 0, 0, 0, 0, ! 196, 0, 0, 0, 0, 0, 0, 197, 0, 0, ! 0, 198, 0, 0, 0, 0, 0, 0, 81, 0, ! 0, 82, 21, 0, 0, 199, 200, 0, 0, 201, ! 0, 0, 193, 194, 0, 0, 0, 79, 203, 204, ! 205, 206, 0, 0, 207, 208, 195, 0, 0, 342, ! 0, 191, 196, 0, 0, 0, 0, 0, 0, 197, ! 0, 0, 0, 198, 0, 0, 0, 0, 0, 0, ! 81, 0, 0, 82, 21, 0, 0, 199, 200, 0, ! 0, 201, 0, 0, 0, 0, 0, 0, 0, 0, ! 203, 204, 205, 206, 193, 194, 207, 208, 0, 79, ! 0, 581, 0, 0, 0, 0, 0, 0, 195, 0, ! 0, 0, 0, 0, 196, 0, 0, 0, 0, 0, ! 0, 197, 0, 0, 0, 198, 669, 0, 0, 0, ! 0, 0, 81, 0, 0, 82, 21, 0, 0, 199, ! 200, 0, 0, 201, 0, -286, -286, -286, 0, 0, ! 0, -286, 203, 204, 205, 206, 0, 0, 207, 208, ! -286, 0, 0, 0, 0, 0, -286, 0, 0, 730, ! 0, 193, 194, -286, 0, 0, 79, -286, 0, 0, ! 0, 0, 0, 0, -286, 195, 0, -286, -286, 0, ! 0, 196, 0, 0, 667, -286, 0, 0, 197, 0, ! 0, -286, 198, 0, -286, -286, -286, -286, 0, 81, ! -286, -286, 82, 21, 193, 194, 0, 0, 0, 79, ! 280, -294, 0, 0, 0, 0, 0, 0, 195, 203, ! 204, 205, 206, 0, 196, 207, 208, 0, 0, 193, ! 194, 197, 0, 0, 79, 198, 0, 0, 191, 192, ! 0, 0, 81, 195, 0, 82, 21, 0, 0, 196, ! 0, 0, 0, 280, -294, 0, 197, 0, 0, 0, ! 198, 0, 203, 204, 205, 206, 0, 81, 207, 208, ! 82, 21, 0, 0, 0, 0, 0, 0, 280, 0, ! 0, 193, 194, 0, 0, 0, 79, 203, 204, 205, ! 206, 0, 0, 207, 208, 195, 0, 0, 0, 0, ! 0, 196, 0, 0, 191, 192, 0, 0, 197, 0, ! 0, 0, 198, 0, 0, 0, 0, 0, 0, 81, ! 0, 0, 82, 21, 0, 0, 199, 200, 0, 0, ! 201, 0, 202, 363, 0, 0, 0, 364, 0, 203, ! 204, 205, 206, 0, 0, 207, 208, 193, 194, 0, ! 0, 0, 79, 0, 0, 0, 191, 192, 0, 0, ! 0, 195, 0, 0, 0, 0, 0, 196, 0, 0, ! 0, 0, 0, 0, 197, 0, 0, 0, 198, 0, ! 0, 0, 0, 0, 0, 81, 0, 0, 82, 21, ! 0, 0, 199, 200, 0, 0, 201, 495, 0, 193, ! 194, 0, 0, 0, 79, 203, 204, 205, 206, 0, ! 0, 207, 208, 195, 0, 0, 0, 0, 0, 196, ! 0, 0, 191, 192, 0, 0, 197, 0, 0, 0, ! 198, 0, 0, 0, 0, 0, 0, 81, 0, 0, ! 82, 21, 0, 0, 199, 200, 0, 0, 201, 632, ! 0, 0, 0, 0, 0, 0, 0, 203, 204, 205, ! 206, 0, 0, 207, 208, 193, 194, 0, 0, 0, ! 79, 0, 0, 0, 191, 192, 0, 0, 0, 195, ! 0, 0, 0, 0, 0, 196, 0, 0, 0, 0, ! 0, 0, 197, 0, 0, 0, 198, 0, 0, 0, ! 0, 0, 0, 81, 0, 0, 82, 21, 0, 0, ! 199, 200, 0, 0, 201, 675, 0, 193, 194, 0, ! 0, 0, 79, 203, 204, 205, 206, 0, 0, 207, ! 208, 195, 0, 0, 0, 0, 0, 196, 0, 0, ! 191, 192, 0, 0, 197, 0, 0, 0, 198, 0, ! 0, 0, 0, 0, 0, 81, 0, 0, 82, 21, ! 0, 0, 199, 200, 0, 0, 201, 688, 0, 0, ! 0, 0, 0, 0, 0, 203, 204, 205, 206, 0, ! 0, 207, 208, 193, 194, 0, 0, 0, 79, 0, ! 0, 0, 0, 0, 0, 0, 0, 195, 0, 0, ! 0, 0, 0, 196, 0, 0, 0, 0, 0, 0, ! 197, 0, 0, 0, 198, 0, 0, 0, 0, 0, ! 0, 81, 0, 0, 82, 21, 0, 0, 199, 200, ! 79, 0, 201, 0, 0, 0, 0, 0, 0, 195, ! 0, 203, 204, 205, 206, 196, 0, 207, 208, 0, ! 0, 0, 197, 0, 0, 0, 198, 0, 0, 0, ! 0, 0, 0, 81, 0, 0, 82, 21, 0, 0, ! 199, 200, 0, 0, 201, 0, 0, 0, 0, 0, ! 0, 0, 0, 203, 204, 205, 206, 0, 0, 207, ! 208 }; static const short yycheck[] = { ! 3, 63, 124, 6, 334, 134, 488, 63, 133, 313, ! 293, 300, 1, 172, 202, 172, 130, 1, 1, 308, ! 443, 310, 135, 177, 85, 118, 1, 1, 90, 191, ! 1, 193, 194, 95, 90, 1, 15, 199, 200, 95, ! 43, 65, 1, 88, 47, 159, 70, 664, 48, 1, ! 48, 84, 166, 130, 73, 148, 9, 1, 151, 482, ! 63, 672, 65, 63, 96, 63, 43, 70, 130, 88, ! 47, 103, 134, 1, 130, 97, 169, 1, 134, 1, ! 157, 34, 159, 1, 197, 1, 509, 90, 65, 102, ! 123, 124, 95, 70, 1, 157, 53, 159, 98, 96, ! 98, 157, 99, 159, 1, 129, 95, 724, 1, 1, ! 89, 642, 0, 97, 103, 90, 172, 101, 101, 181, ! 103, 9, 10, 11, 1, 181, 129, 130, 257, 103, ! 101, 134, 135, 4, 5, 101, 293, 103, 620, 642, ! 1, 197, 101, 31, 96, 201, 34, 35, 262, 210, ! 102, 642, 129, 764, 157, 1, 159, 101, 135, 1, ! 282, 275, 773, 1, 52, 258, 37, 38, 90, 172, ! 41, 702, 1, 101, 705, 63, 1, 101, 181, 101, ! 51, 335, 605, 101, 102, 101, 102, 1, 191, 192, ! 193, 194, 1, 100, 197, 257, 199, 200, 201, 702, ! 642, 257, 705, 100, 96, 334, 629, 95, 101, 80, ! 102, 702, 1, 84, 705, 1, 639, 379, 380, 381, ! 197, 103, 283, 336, 101, 1, 1, 289, 1, 1, ! 95, 1, 655, 289, 99, 96, 1, 293, 103, 53, ! 771, 102, 130, 99, 1, 776, 134, 778, 1, 780, ! 96, 410, 123, 124, 257, 64, 102, 313, 96, 101, ! 702, 1, 1, 705, 102, 1, 1, 96, 771, 140, ! 1, 159, 334, 776, 1, 778, 101, 780, 334, 562, ! 771, 1, 130, 97, 172, 776, 289, 778, 97, 780, ! 293, 352, 353, 597, 97, 599, 99, 300, 96, 360, ! 361, 172, 88, 491, 102, 308, 177, 310, 1, 99, ! 313, 159, 101, 103, 172, 101, 739, 647, 94, 95, ! 442, 483, 97, 99, 100, 101, 102, 100, 100, 771, ! 100, 334, 97, 336, 776, 391, 778, 94, 780, 96, ! 95, 1, 99, 100, 101, 102, 1, 100, 88, 220, ! 1, 1, 102, 642, 410, 638, 1, 88, 97, 336, ! 53, 101, 97, 90, 100, 63, 100, 96, 672, 257, ! 99, 64, 1, 97, 103, 95, 379, 380, 381, 382, ! 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, ! 393, 394, 395, 396, 397, 398, 63, 95, 141, 270, ! 559, 1, 1, 53, 97, 293, 277, 410, 0, 1, ! 172, 282, 1, 702, 64, 476, 705, 1, 479, 1, ! 99, 1, 293, 90, 103, 313, 0, 1, 95, 300, ! 1, 1, 130, 0, 1, 293, 96, 308, 1, 310, ! 729, 96, 300, 726, 97, 96, 334, 97, 1, 1, ! 308, 96, 310, 45, 743, 313, 1, 619, 201, 202, ! 764, 159, 576, 130, 335, 579, 95, 134, 757, 773, ! 62, 45, 99, 1, 535, 64, 68, 1, 45, 350, ! 483, 5, 771, 1, 95, 488, 1, 776, 62, 778, ! 157, 780, 159, 45, 68, 62, 95, 1, 68, 1, ! 371, 68, 373, 559, 54, 172, 562, 632, 97, 101, ! 0, 95, 1, 95, 181, 95, 68, 1, 647, 9, ! 10, 11, 410, 1, 95, 268, 130, 101, 271, 54, ! 102, 293, 95, 1, 101, 45, 279, 280, 300, 410, ! 99, 31, 95, 95, 34, 35, 308, 51, 310, 1, ! 95, 313, 410, 68, 679, 159, 559, 97, 1, 562, ! 674, 101, 52, 1, 88, 1, 691, 95, 439, 172, ! 88, 442, 66, 63, 99, 96, 1, 1, 0, 73, ! 84, 102, 638, 87, 88, 647, 88, 9, 10, 11, ! 257, 647, 0, 1, 46, 47, 1, 559, 1, 88, ! 562, 45, 1, 96, 88, 95, 99, 1, 664, 31, ! 88, 736, 34, 35, 108, 96, 619, 620, 62, 1, ! 88, 102, 289, 96, 68, 1, 293, 370, 1, 102, ! 52, 374, 635, 1, 103, 638, 88, 45, 90, 642, ! 130, 93, 94, 95, 647, 88, 313, 99, 410, 96, ! 88, 103, 88, 98, 62, 102, 399, 102, 172, 1, ! 68, 664, 1, 88, 88, 93, 94, 334, 724, 159, ! 726, 559, 415, 103, 562, 1, 638, 18, 19, 20, ! 21, 11, 425, 88, 427, 88, 96, 172, 559, 88, ! 293, 562, 102, 101, 88, 476, 61, 300, 479, 702, ! 65, 559, 705, 45, 562, 308, 88, 310, 130, 51, ! 313, 1, 88, 101, 102, 88, 459, 58, 461, 45, ! 88, 724, 103, 726, 391, 51, 729, 66, 12, 68, ! 10, 478, 475, 480, 73, 46, 47, 159, 77, 597, ! 743, 599, 84, 410, 13, 87, 88, 14, 491, 88, ! 638, 31, 46, 47, 757, 35, 0, 1, 84, 647, ! 95, 87, 88, 95, 9, 636, 11, 638, 771, 98, ! 96, 642, 52, 776, 101, 778, 664, 780, 68, 293, ! 638, 101, 102, 73, 642, 94, 300, 77, 99, 34, ! 99, 100, 103, 664, 308, 1, 310, 559, 88, 313, ! 562, 45, 5, 6, 7, 99, 664, 410, 293, 103, ! 101, 172, 56, 101, 672, 300, 93, 94, 62, 102, ! 93, 94, 95, 308, 68, 310, 99, 51, 313, 99, ! 103, 702, 76, 68, 705, 597, 724, 599, 726, 45, ! 3, 4, 585, 97, 702, 51, 67, 705, 97, 98, ! 46, 47, 101, 724, 60, 726, 62, 101, 729, 95, ! 84, 1, 68, 87, 88, 95, 724, 1, 726, 16, ! 17, 729, 743, 90, 0, 1, 638, 95, 84, 1, ! 642, 87, 88, 626, 96, 743, 757, 95, 93, 94, ! 95, 97, 559, 1, 99, 562, 410, 101, 103, 757, ! 771, 1, 664, 93, 94, 776, 764, 778, 96, 780, ! 672, 46, 47, 771, 96, 773, 97, 660, 776, 45, ! 778, 101, 780, 666, 96, 410, 66, 102, 68, 97, ! 56, 101, 293, 73, 172, 45, 62, 77, 57, 300, ! 702, 51, 68, 705, 57, 0, 1, 308, 88, 310, ! 702, 51, 313, 705, 46, 47, 559, 99, 100, 562, ! 392, 393, 724, 96, 726, 0, 1, 729, 382, 383, ! 172, 638, 96, 1, 84, 101, 96, 87, 88, 96, ! 647, 743, 1, 101, 84, 101, 96, 87, 88, 96, ! 45, 57, 96, 1, 597, 757, 599, 664, 0, 742, ! 0, 56, 764, 746, 391, 11, 1, 62, 55, 771, ! 45, 773, 76, 68, 776, 159, 778, 140, 780, 771, ! 157, 56, 53, 257, 776, 88, 778, 62, 780, 662, ! 93, 94, 95, 68, 95, 638, 99, 45, 410, 642, ! 103, 264, 313, 51, 662, 559, 101, 313, 562, 410, ! 45, 577, 60, 353, 62, 293, 51, 724, 577, 726, ! 68, 664, 300, 8, 9, 10, 101, 192, 396, 672, ! 308, 394, 310, 395, 559, 313, 84, 562, 397, 87, ! 88, 398, -1, 597, 635, 599, 99, 100, 101, 84, ! 45, 293, 87, 88, 402, -1, 51, -1, 300, 702, ! -1, -1, 705, -1, -1, 60, 308, 62, 310, -1, ! -1, 313, 597, 68, 599, 387, 388, 389, 390, -1, ! -1, 724, -1, 726, 638, -1, 729, -1, 642, 84, ! 88, -1, 87, 88, -1, 93, 94, 95, -1, -1, ! 743, 99, 97, 98, -1, 103, 101, 384, 385, 386, ! 664, -1, -1, 638, 757, -1, -1, 642, 672, -1, ! -1, 764, -1, 45, -1, -1, -1, -1, 771, 51, ! 773, -1, 410, 776, -1, 778, -1, 780, 60, 664, ! 62, -1, -1, -1, -1, -1, 68, 672, 702, 88, ! -1, 705, -1, -1, 93, 94, 95, -1, 559, -1, ! 99, 562, 84, -1, 103, 87, 88, -1, 410, -1, ! 724, -1, 726, -1, -1, 729, 98, 702, -1, -1, ! 705, -1, -1, -1, -1, -1, -1, -1, -1, 743, ! -1, 45, -1, -1, -1, -1, 597, 51, 599, 724, ! -1, 726, 1, 757, 729, -1, 60, -1, 62, -1, ! 764, -1, -1, -1, 68, -1, -1, 771, 743, 773, ! -1, -1, 776, -1, 778, -1, 780, -1, -1, -1, ! 84, -1, 757, 87, 88, -1, -1, 638, -1, 764, ! -1, 642, -1, 97, 98, -1, 771, 101, 773, -1, ! -1, 776, 51, 778, -1, 780, -1, -1, -1, -1, ! 45, 60, -1, 664, -1, -1, 51, 66, -1, -1, ! -1, 672, -1, -1, 73, 60, -1, 62, 77, -1, ! -1, 559, -1, 68, 562, 84, -1, -1, 87, 88, ! -1, -1, 91, 92, -1, -1, 95, -1, -1, 84, ! -1, 702, 87, 88, 705, 104, 105, 106, 107, -1, ! -1, 110, 111, 98, -1, -1, -1, 559, -1, 597, ! 562, 599, -1, 724, -1, 726, -1, -1, 729, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, 743, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, 597, 757, 599, -1, -1, ! 638, -1, -1, 764, 642, 191, 192, 193, 194, -1, ! 771, -1, 773, 199, 200, 776, -1, 778, -1, 780, ! -1, -1, -1, -1, -1, -1, 664, -1, -1, 191, ! 192, 193, 194, -1, 672, -1, 638, 199, 200, -1, ! 642, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, 45, 46, 47, -1, -1, -1, 51, -1, -1, ! -1, -1, 664, -1, 702, -1, 60, 705, -1, -1, ! 672, -1, 66, -1, -1, -1, -1, -1, -1, 73, ! -1, -1, -1, 77, -1, -1, 724, -1, 726, -1, ! 84, 729, -1, 87, 88, -1, -1, -1, -1, -1, ! 702, 95, -1, 705, -1, 743, -1, -1, -1, -1, ! 104, 105, 106, 107, -1, -1, 110, 111, -1, 757, ! -1, -1, 724, -1, 726, -1, 764, 729, -1, -1, ! -1, -1, -1, 771, -1, 773, -1, -1, 776, -1, ! 778, 743, 780, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, 757, -1, -1, -1, -1, ! -1, -1, 764, -1, -1, -1, -1, -1, -1, 771, ! -1, 773, -1, -1, 776, -1, 778, -1, 780, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, 379, 380, 381, 382, 383, 384, 385, ! 386, 387, 388, 389, 390, -1, 392, 393, 394, 395, ! 396, 397, 398, 1, -1, -1, -1, 379, 380, 381, ! 382, 383, 384, 385, 386, 387, 388, 389, 390, -1, ! 392, 393, 394, 395, 396, 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 45, 46, 47, 48, 49, 50, 51, 52, -1, -1, 55, -1, -1, -1, 59, 60, -1, -1, 63, -1, -1, 66, 67, + 68, 69, -1, 71, 72, 73, 74, 1, -1, 77, + 78, -1, -1, -1, -1, -1, 84, 483, -1, 87, + 88, -1, 488, -1, -1, -1, -1, 95, -1, 97, + 98, -1, -1, 101, -1, -1, 104, 105, 106, 107, + -1, 483, 110, 111, -1, -1, 488, -1, -1, -1, + -1, 45, 46, 47, 48, 49, 50, 51, 52, -1, + -1, 55, -1, -1, -1, 59, 60, -1, -1, 63, + -1, -1, 66, 67, 68, 69, -1, 71, 72, 73, + 74, -1, -1, 77, 78, -1, -1, -1, -1, -1, + 84, -1, -1, 87, 88, -1, -1, -1, -1, -1, + -1, 95, -1, 97, 98, -1, -1, 101, -1, -1, + 104, 105, 106, 107, 1, -1, 110, 111, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 619, 620, -1, -1, -1, 45, 46, + 47, 48, 49, 50, 51, 52, -1, -1, 55, 635, + -1, -1, 59, 60, -1, -1, 63, 619, 620, 66, + 67, 68, 69, 1, 71, 72, 73, 74, -1, -1, + 77, 78, -1, 635, -1, -1, -1, 84, -1, -1, + 87, 88, -1, -1, -1, -1, -1, -1, 95, -1, + 97, 98, -1, -1, 101, -1, -1, 104, 105, 106, + 107, -1, -1, 110, 111, -1, -1, 45, 46, 47, + -1, 49, 50, 51, 52, -1, -1, 55, -1, -1, + -1, 59, 60, -1, -1, -1, -1, -1, 66, 67, 68, 69, 1, 71, 72, 73, 74, -1, -1, 77, ! 78, -1, -1, -1, -1, -1, 84, -1, -1, 87, ! 88, -1, -1, -1, -1, -1, -1, 95, -1, 97, 98, -1, -1, 101, -1, -1, 104, 105, 106, 107, -1, -1, 110, 111, -1, -1, 45, 46, 47, -1, 49, 50, 51, 52, -1, -1, 55, -1, -1, -1, ! 59, 60, -1, -1, -1, -1, -1, 66, 67, 1, ! 69, -1, 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, -1, -1, -1, 84, -1, -1, 87, 88, ! -1, -1, -1, -1, -1, -1, 95, -1, 97, -1, -1, -1, 101, -1, -1, 104, 105, 106, 107, -1, ! -1, 110, 111, 45, 46, 47, -1, 49, 50, 51, ! 52, -1, -1, 55, -1, -1, -1, 59, 60, -1, ! -1, -1, -1, -1, 66, 67, -1, 69, -1, 71, ! 72, 73, 74, -1, -1, 77, 78, 1, -1, 3, ! 4, -1, 84, -1, -1, 87, 88, -1, -1, -1, ! -1, -1, -1, 95, -1, 97, -1, -1, -1, 101, ! -1, -1, 104, 105, 106, 107, -1, -1, 110, 111, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, 46, 47, -1, -1, -1, 51, -1, -1, ! -1, -1, -1, -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, 1, -1, 3, 4, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, ! 84, -1, -1, 87, 88, -1, -1, 91, 92, -1, ! -1, 95, -1, 97, 98, -1, -1, -1, -1, -1, 104, 105, 106, 107, -1, -1, 110, 111, 46, 47, -1, -1, -1, 51, -1, 1, -1, 3, 4, -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, ! 88, -1, -1, 91, 92, -1, -1, 95, -1, 97, 46, 47, -1, -1, -1, 51, 104, 105, 106, 107, -1, -1, 110, 111, 60, -1, -1, -1, -1, -1, 66, 1, -1, 3, 4, -1, -1, 73, -1, -1, *************** static const short yycheck[] = *** 2138,2144 **** 110, 111, 60, -1, -1, -1, -1, -1, 66, 1, -1, 3, 4, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, ! 88, -1, -1, 91, 92, -1, -1, 95, 96, -1, -1, -1, -1, -1, -1, -1, 104, 105, 106, 107, -1, -1, 110, 111, 46, 47, -1, -1, -1, 51, -1, 1, -1, 3, 4, -1, -1, -1, 60, -1, --- 2110,2116 ---- 110, 111, 60, -1, -1, -1, -1, -1, 66, 1, -1, 3, 4, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, ! 88, -1, 90, 91, 92, -1, -1, 95, -1, -1, -1, -1, -1, -1, -1, -1, 104, 105, 106, 107, -1, -1, 110, 111, 46, 47, -1, -1, -1, 51, -1, 1, -1, 3, 4, -1, -1, -1, 60, -1, *************** static const short yycheck[] = *** 2150,2192 **** 60, -1, -1, -1, -1, -1, 66, 1, -1, 3, 4, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, ! -1, 91, 92, -1, -1, 95, 96, -1, -1, -1, ! -1, -1, -1, -1, 104, 105, 106, 107, -1, -1, 110, 111, 46, 47, -1, -1, -1, 51, -1, 1, -1, 3, 4, -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, 92, -1, ! -1, 95, 96, -1, 46, 47, -1, -1, -1, 51, 104, 105, 106, 107, -1, -1, 110, 111, 60, -1, -1, -1, -1, -1, 66, 1, -1, 3, 4, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, ! 92, -1, -1, 95, -1, -1, -1, -1, -1, 101, -1, -1, 104, 105, 106, 107, -1, -1, 110, 111, 46, 47, -1, -1, -1, 51, -1, 1, -1, 3, 4, -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, 92, -1, -1, 95, ! -1, -1, 46, 47, -1, -1, -1, 51, 104, 105, 106, 107, -1, -1, 110, 111, 60, -1, -1, -1, -1, -1, 66, 1, -1, 3, 4, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, 92, -1, ! -1, 95, -1, -1, -1, -1, -1, -1, -1, -1, 104, 105, 106, 107, -1, -1, 110, 111, 46, 47, -1, -1, -1, 51, -1, 1, -1, 3, 4, -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, ! 88, -1, -1, 91, 92, -1, -1, 95, -1, -1, 46, 47, -1, -1, -1, 51, 104, 105, 106, 107, -1, -1, 110, 111, 60, -1, -1, -1, -1, -1, 66, 1, -1, 3, 4, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, 92, -1, -1, 95, ! -1, -1, -1, -1, -1, -1, -1, -1, 104, 105, 106, 107, -1, -1, 110, 111, 46, 47, -1, -1, -1, 51, -1, 1, -1, 3, 4, -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, --- 2122,2164 ---- 60, -1, -1, -1, -1, -1, 66, 1, -1, 3, 4, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, ! -1, 91, 92, -1, -1, 95, -1, -1, -1, -1, ! -1, 101, -1, -1, 104, 105, 106, 107, -1, -1, 110, 111, 46, 47, -1, -1, -1, 51, -1, 1, -1, 3, 4, -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, 92, -1, ! -1, 95, -1, -1, 46, 47, 100, -1, -1, 51, 104, 105, 106, 107, -1, -1, 110, 111, 60, -1, -1, -1, -1, -1, 66, 1, -1, 3, 4, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, ! 92, -1, -1, 95, 96, -1, -1, -1, -1, -1, -1, -1, 104, 105, 106, 107, -1, -1, 110, 111, 46, 47, -1, -1, -1, 51, -1, 1, -1, 3, 4, -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, 92, -1, -1, 95, ! 96, -1, 46, 47, -1, -1, -1, 51, 104, 105, 106, 107, -1, -1, 110, 111, 60, -1, -1, -1, -1, -1, 66, 1, -1, 3, 4, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, 92, -1, ! -1, 95, 96, -1, -1, -1, -1, -1, -1, -1, 104, 105, 106, 107, -1, -1, 110, 111, 46, 47, -1, -1, -1, 51, -1, 1, -1, 3, 4, -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, ! 88, -1, -1, 91, 92, -1, -1, 95, 96, -1, 46, 47, -1, -1, -1, 51, 104, 105, 106, 107, -1, -1, 110, 111, 60, -1, -1, -1, -1, -1, 66, 1, -1, 3, 4, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, 92, -1, -1, 95, ! -1, -1, -1, -1, -1, 101, -1, -1, 104, 105, 106, 107, -1, -1, 110, 111, 46, 47, -1, -1, -1, 51, -1, 1, -1, 3, 4, -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, *************** static const short yycheck[] = *** 2383,2457 **** -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, 92, -1, -1, 95, -1, -1, 46, 47, -1, -1, -1, 51, 104, 105, 106, 107, -1, -1, 110, 111, ! 60, -1, -1, 1, -1, 3, 66, -1, -1, -1, ! -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, 92, -1, -1, 95, -1, -1, -1, -1, ! -1, -1, -1, -1, 104, 105, 106, 107, 46, 47, ! 110, 111, -1, 51, -1, 1, -1, -1, -1, -1, ! -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, ! -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, ! 1, -1, -1, -1, -1, -1, 84, -1, -1, 87, ! 88, -1, -1, 91, 92, -1, -1, 95, -1, 45, ! 46, 47, -1, -1, -1, 51, 104, 105, 106, 107, ! -1, -1, 110, 111, 60, -1, -1, -1, -1, -1, ! 66, -1, -1, 1, -1, 46, 47, 73, -1, -1, ! 51, 77, -1, -1, -1, -1, -1, -1, 84, 60, ! -1, 87, 88, -1, -1, 66, -1, -1, 1, 95, ! -1, -1, 73, -1, -1, 101, 77, -1, 104, 105, ! 106, 107, -1, 84, 110, 111, 87, 88, 46, 47, ! -1, -1, -1, 51, 95, 96, -1, -1, -1, -1, ! -1, -1, 60, 104, 105, 106, 107, -1, 66, 110, ! 111, -1, -1, 46, 47, 73, -1, -1, 51, 77, ! -1, -1, 3, 4, -1, -1, 84, 60, -1, 87, ! 88, -1, -1, 66, -1, -1, -1, 95, 96, -1, ! 73, -1, -1, -1, 77, -1, 104, 105, 106, 107, ! -1, 84, 110, 111, 87, 88, -1, -1, -1, -1, ! -1, -1, 95, -1, -1, 46, 47, -1, -1, -1, ! 51, 104, 105, 106, 107, -1, -1, 110, 111, 60, ! -1, -1, -1, -1, -1, 66, -1, -1, 3, 4, ! -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, ! -1, -1, -1, 84, -1, -1, 87, 88, -1, -1, ! 91, 92, -1, -1, 95, -1, 97, 98, -1, -1, ! -1, 102, -1, 104, 105, 106, 107, -1, -1, 110, ! 111, 46, 47, -1, -1, -1, 51, -1, -1, -1, ! 3, 4, -1, -1, -1, 60, -1, -1, -1, -1, ! -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, ! -1, -1, 77, -1, -1, -1, -1, -1, -1, 84, ! -1, -1, 87, 88, -1, -1, 91, 92, -1, -1, ! 95, 96, -1, 46, 47, -1, -1, -1, 51, 104, ! 105, 106, 107, -1, -1, 110, 111, 60, -1, -1, ! -1, -1, -1, 66, -1, -1, 3, 4, -1, -1, ! 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, ! -1, 84, -1, -1, 87, 88, -1, -1, 91, 92, ! -1, -1, 95, 96, -1, -1, -1, -1, -1, -1, ! -1, 104, 105, 106, 107, -1, -1, 110, 111, 46, ! 47, -1, -1, -1, 51, -1, -1, -1, 3, 4, ! -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, ! -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, ! 77, -1, -1, -1, -1, -1, -1, 84, -1, -1, ! 87, 88, -1, -1, 91, 92, -1, -1, 95, 96, -1, 46, 47, -1, -1, -1, 51, 104, 105, 106, 107, -1, -1, 110, 111, 60, -1, -1, -1, -1, -1, 66, -1, -1, 3, 4, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, 92, -1, -1, ! 95, 96, -1, -1, -1, -1, -1, -1, -1, 104, 105, 106, 107, -1, -1, 110, 111, 46, 47, -1, ! -1, -1, 51, -1, -1, -1, -1, -1, -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, 88, ! -1, -1, 91, 92, -1, -1, 95, -1, 45, 46, 47, -1, -1, -1, 51, 104, 105, 106, 107, -1, -1, 110, 111, 60, -1, -1, -1, -1, -1, 66, ! -1, -1, -1, -1, -1, -1, 73, -1, -1, 51, ! 77, -1, -1, -1, -1, -1, -1, 84, 60, -1, ! 87, 88, -1, -1, 66, -1, -1, -1, 95, -1, ! -1, 73, -1, -1, -1, 77, -1, 104, 105, 106, ! 107, -1, 84, 110, 111, 87, 88, -1, -1, 91, ! 92, -1, -1, 95, -1, -1, -1, -1, -1, -1, ! -1, -1, 104, 105, 106, 107, -1, -1, 110, 111 }; #define YYPURE 1 --- 2355,2450 ---- -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, 92, -1, -1, 95, -1, -1, 46, 47, -1, -1, -1, 51, 104, 105, 106, 107, -1, -1, 110, 111, ! 60, -1, -1, -1, -1, -1, 66, 1, -1, 3, ! 4, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, 92, -1, -1, 95, -1, -1, -1, -1, ! -1, -1, -1, -1, 104, 105, 106, 107, -1, -1, ! 110, 111, 46, 47, -1, -1, -1, 51, -1, 1, ! -1, 3, 4, -1, -1, -1, 60, -1, -1, -1, ! -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, ! -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, ! 84, -1, -1, 87, 88, -1, -1, 91, 92, -1, ! -1, 95, -1, -1, 46, 47, -1, -1, -1, 51, ! 104, 105, 106, 107, -1, -1, 110, 111, 60, -1, ! -1, -1, -1, -1, 66, 1, -1, 3, 4, -1, ! -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, ! -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, ! 92, -1, -1, 95, -1, -1, -1, -1, -1, -1, ! -1, -1, 104, 105, 106, 107, -1, -1, 110, 111, ! 46, 47, -1, -1, -1, 51, -1, 1, -1, 3, ! 4, -1, -1, -1, 60, -1, -1, -1, -1, -1, ! 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, ! -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, ! -1, 87, 88, -1, -1, 91, 92, -1, -1, 95, ! -1, -1, 46, 47, -1, -1, -1, 51, 104, 105, ! 106, 107, -1, -1, 110, 111, 60, -1, -1, 1, ! -1, 3, 66, -1, -1, -1, -1, -1, -1, 73, ! -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, ! 84, -1, -1, 87, 88, -1, -1, 91, 92, -1, ! -1, 95, -1, -1, -1, -1, -1, -1, -1, -1, ! 104, 105, 106, 107, 46, 47, 110, 111, -1, 51, ! -1, 1, -1, -1, -1, -1, -1, -1, 60, -1, ! -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, ! -1, 73, -1, -1, -1, 77, 1, -1, -1, -1, ! -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, ! 92, -1, -1, 95, -1, 45, 46, 47, -1, -1, ! -1, 51, 104, 105, 106, 107, -1, -1, 110, 111, ! 60, -1, -1, -1, -1, -1, 66, -1, -1, 1, ! -1, 46, 47, 73, -1, -1, 51, 77, -1, -1, ! -1, -1, -1, -1, 84, 60, -1, 87, 88, -1, ! -1, 66, -1, -1, 1, 95, -1, -1, 73, -1, ! -1, 101, 77, -1, 104, 105, 106, 107, -1, 84, ! 110, 111, 87, 88, 46, 47, -1, -1, -1, 51, ! 95, 96, -1, -1, -1, -1, -1, -1, 60, 104, ! 105, 106, 107, -1, 66, 110, 111, -1, -1, 46, ! 47, 73, -1, -1, 51, 77, -1, -1, 3, 4, ! -1, -1, 84, 60, -1, 87, 88, -1, -1, 66, ! -1, -1, -1, 95, 96, -1, 73, -1, -1, -1, ! 77, -1, 104, 105, 106, 107, -1, 84, 110, 111, ! 87, 88, -1, -1, -1, -1, -1, -1, 95, -1, -1, 46, 47, -1, -1, -1, 51, 104, 105, 106, 107, -1, -1, 110, 111, 60, -1, -1, -1, -1, -1, 66, -1, -1, 3, 4, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, 92, -1, -1, ! 95, -1, 97, 98, -1, -1, -1, 102, -1, 104, 105, 106, 107, -1, -1, 110, 111, 46, 47, -1, ! -1, -1, 51, -1, -1, -1, 3, 4, -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, 88, ! -1, -1, 91, 92, -1, -1, 95, 96, -1, 46, 47, -1, -1, -1, 51, 104, 105, 106, 107, -1, -1, 110, 111, 60, -1, -1, -1, -1, -1, 66, ! -1, -1, 3, 4, -1, -1, 73, -1, -1, -1, ! 77, -1, -1, -1, -1, -1, -1, 84, -1, -1, ! 87, 88, -1, -1, 91, 92, -1, -1, 95, 96, ! -1, -1, -1, -1, -1, -1, -1, 104, 105, 106, ! 107, -1, -1, 110, 111, 46, 47, -1, -1, -1, ! 51, -1, -1, -1, 3, 4, -1, -1, -1, 60, ! -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, ! -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, ! -1, -1, -1, 84, -1, -1, 87, 88, -1, -1, ! 91, 92, -1, -1, 95, 96, -1, 46, 47, -1, ! -1, -1, 51, 104, 105, 106, 107, -1, -1, 110, ! 111, 60, -1, -1, -1, -1, -1, 66, -1, -1, ! 3, 4, -1, -1, 73, -1, -1, -1, 77, -1, ! -1, -1, -1, -1, -1, 84, -1, -1, 87, 88, ! -1, -1, 91, 92, -1, -1, 95, 96, -1, -1, ! -1, -1, -1, -1, -1, 104, 105, 106, 107, -1, ! -1, 110, 111, 46, 47, -1, -1, -1, 51, -1, ! -1, -1, -1, -1, -1, -1, -1, 60, -1, -1, ! -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, ! 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, ! -1, 84, -1, -1, 87, 88, -1, -1, 91, 92, ! 51, -1, 95, -1, -1, -1, -1, -1, -1, 60, ! -1, 104, 105, 106, 107, 66, -1, 110, 111, -1, ! -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, ! -1, -1, -1, 84, -1, -1, 87, 88, -1, -1, ! 91, 92, -1, -1, 95, -1, -1, -1, -1, -1, ! -1, -1, -1, 104, 105, 106, 107, -1, -1, 110, ! 111 }; #define YYPURE 1 *************** static const short yycheck[] = *** 2495,2510 **** define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ - #ifdef __cplusplus - # define YYSTD(x) std::x - #else - # define YYSTD(x) x - #endif - - #ifndef YYPARSE_RETURN_TYPE - #define YYPARSE_RETURN_TYPE int - #endif - #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE) /* The parser invokes alloca or malloc; define the necessary symbols. */ --- 2488,2493 ---- *************** static const short yycheck[] = *** 2527,2544 **** /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # else ! # ifdef __cplusplus ! # include /* INFRINGES ON USER NAME SPACE */ ! # define YYSIZE_T std::size_t ! # else ! # ifdef __STDC__ ! # include /* INFRINGES ON USER NAME SPACE */ ! # define YYSIZE_T size_t ! # endif # endif ! # define YYSTACK_ALLOC YYSTD (malloc) ! # define YYSTACK_FREE YYSTD (free) # endif /* A type that is properly aligned for any stack member. */ union yyalloc --- 2510,2528 ---- /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # else ! # if defined (__STDC__) || defined (__cplusplus) ! # include /* INFRINGES ON USER NAME SPACE */ ! # define YYSIZE_T size_t # endif ! # define YYSTACK_ALLOC malloc ! # define YYSTACK_FREE free # endif + #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ + + + #if (! defined (yyoverflow) \ + && (! defined (__cplusplus) \ + || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc *************** union yyalloc *** 2565,2588 **** + YYSTACK_GAP_MAX) # endif ! /* Relocate the TYPE STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ ! # define YYSTACK_RELOCATE(Type, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ ! yymemcpy ((char *) yyptr, (char *) (Stack), \ ! yysize * (YYSIZE_T) sizeof (Type)); \ Stack = &yyptr->Stack; \ ! yynewbytes = yystacksize * sizeof (Type) + YYSTACK_GAP_MAX; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (0) ! #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) --- 2549,2589 ---- + YYSTACK_GAP_MAX) # endif ! /* Copy COUNT objects from FROM to TO. The source and destination do ! not overlap. */ ! # ifndef YYCOPY ! # if 1 < __GNUC__ ! # define YYCOPY(To, From, Count) \ ! __builtin_memcpy (To, From, (Count) * sizeof (*(From))) ! # else ! # define YYCOPY(To, From, Count) \ ! do \ ! { \ ! register YYSIZE_T yyi; \ ! for (yyi = 0; yyi < (Count); yyi++) \ ! (To)[yyi] = (From)[yyi]; \ ! } \ ! while (0) ! # endif ! # endif ! ! /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ ! # define YYSTACK_RELOCATE(Stack) \ do \ { \ YYSIZE_T yynewbytes; \ ! YYCOPY (&yyptr->Stack, Stack, yysize); \ Stack = &yyptr->Stack; \ ! yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (0) ! #endif #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) *************** union yyalloc *** 2592,2605 **** # define YYSIZE_T size_t #endif #if ! defined (YYSIZE_T) ! # ifdef __cplusplus ! # include /* INFRINGES ON USER NAME SPACE */ ! # define YYSIZE_T std::size_t ! # else ! # ifdef __STDC__ ! # include /* INFRINGES ON USER NAME SPACE */ ! # define YYSIZE_T size_t ! # endif # endif #endif #if ! defined (YYSIZE_T) --- 2593,2601 ---- # define YYSIZE_T size_t #endif #if ! defined (YYSIZE_T) ! # if defined (__STDC__) || defined (__cplusplus) ! # include /* INFRINGES ON USER NAME SPACE */ ! # define YYSIZE_T size_t # endif #endif #if ! defined (YYSIZE_T) *************** while (0) *** 2678,2689 **** #if YYDEBUG # ifndef YYFPRINTF ! # ifdef __cplusplus ! # include /* INFRINGES ON USER NAME SPACE */ ! # else ! # include /* INFRINGES ON USER NAME SPACE */ ! # endif ! # define YYFPRINTF YYSTD (fprintf) # endif # define YYDPRINTF(Args) \ --- 2674,2681 ---- #if YYDEBUG # ifndef YYFPRINTF ! # include /* INFRINGES ON USER NAME SPACE */ ! # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ *************** do { \ *** 2691,2700 **** if (yydebug) \ YYFPRINTF Args; \ } while (0) ! /* Nonzero means print parse trace. [The following comment makes no ! sense to me. Could someone clarify it? --akim] Since this is ! uninitialized, it does not stop multiple parsers from coexisting. ! */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) --- 2683,2690 ---- if (yydebug) \ YYFPRINTF Args; \ } while (0) ! /* Nonzero means print parse trace. It is left uninitialized so that ! multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) *************** int yydebug; *** 2720,2752 **** # define YYMAXDEPTH 10000 #endif - #if ! defined (yyoverflow) && ! defined (yymemcpy) - # if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ - # define yymemcpy __builtin_memcpy - # else /* not GNU C or C++ */ - - /* This is the most reliable way to avoid incompatibilities - in available built-in functions on various systems. */ - static void - # if defined (__STDC__) || defined (__cplusplus) - yymemcpy (char *yyto, const char *yyfrom, YYSIZE_T yycount) - # else - yymemcpy (yyto, yyfrom, yycount) - char *yyto; - const char *yyfrom; - YYSIZE_T yycount; - # endif - { - register const char *yyf = yyfrom; - register char *yyt = yyto; - register YYSIZE_T yyi = yycount; - - while (yyi-- != 0) - *yyt++ = *yyf++; - } - # endif - #endif - #ifdef YYERROR_VERBOSE # ifndef yystrlen --- 2710,2715 ---- *************** yystpcpy (yydest, yysrc) *** 2799,2805 **** # endif #endif ! #line 345 "/usr/share/bison/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed --- 2762,2768 ---- # endif #endif ! #line 315 "/usr/share/bison/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed *************** yystpcpy (yydest, yysrc) *** 2809,2821 **** to the proper pointer type. */ #ifdef YYPARSE_PARAM ! # ifdef __cplusplus # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM # define YYPARSE_PARAM_DECL ! # else /* !__cplusplus */ # define YYPARSE_PARAM_ARG YYPARSE_PARAM # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; ! # endif /* !__cplusplus */ #else /* !YYPARSE_PARAM */ # define YYPARSE_PARAM_ARG # define YYPARSE_PARAM_DECL --- 2772,2784 ---- to the proper pointer type. */ #ifdef YYPARSE_PARAM ! # if defined (__STDC__) || defined (__cplusplus) # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM # define YYPARSE_PARAM_DECL ! # else # define YYPARSE_PARAM_ARG YYPARSE_PARAM # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; ! # endif #else /* !YYPARSE_PARAM */ # define YYPARSE_PARAM_ARG # define YYPARSE_PARAM_DECL *************** yystpcpy (yydest, yysrc) *** 2824,2832 **** /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ # ifdef YYPARSE_PARAM ! YYPARSE_RETURN_TYPE yyparse (void *); # else ! YYPARSE_RETURN_TYPE yyparse (void); # endif #endif --- 2787,2795 ---- /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ # ifdef YYPARSE_PARAM ! int yyparse (void *); # else ! int yyparse (void); # endif #endif *************** YY_DECL_NON_LSP_VARIABLES *** 2861,2867 **** YY_DECL_VARIABLES #endif /* !YYPURE */ ! YYPARSE_RETURN_TYPE yyparse (YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL { --- 2824,2830 ---- YY_DECL_VARIABLES #endif /* !YYPURE */ ! int yyparse (YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL { *************** yyparse (YYPARSE_PARAM_ARG) *** 2989,2994 **** --- 2952,2960 ---- yyvs = yyvs1; } #else /* no yyoverflow */ + # ifndef YYSTACK_RELOCATE + goto yyoverflowlab; + # else /* Extend the stack our own way. */ if (yystacksize >= YYMAXDEPTH) goto yyoverflowlab; *************** yyparse (YYPARSE_PARAM_ARG) *** 3002,3016 **** (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyoverflowlab; ! YYSTACK_RELOCATE (short, yyss); ! YYSTACK_RELOCATE (YYSTYPE, yyvs); # if YYLSP_NEEDED ! YYSTACK_RELOCATE (YYLTYPE, yyls); # endif # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; --- 2968,2983 ---- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyoverflowlab; ! YYSTACK_RELOCATE (yyss); ! YYSTACK_RELOCATE (yyvs); # if YYLSP_NEEDED ! YYSTACK_RELOCATE (yyls); # endif # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } + # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; *************** yyreduce: *** 3189,3212 **** switch (yyn) { case 1: ! #line 606 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" ! { ! /* Register static variables with the garbage ! collector. */ ! ggc_add_root (&ctxp, 1, ! sizeof (struct parser_ctxt *), ! mark_parser_ctxt); ! ggc_add_root (&ctxp_for_generation, 1, ! sizeof (struct parser_ctxt *), ! mark_parser_ctxt); ! ; ! break;} ! case 2: ! #line 617 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {; break;} ! case 19: ! #line 661 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { int osb = pop_current_osb (ctxp); tree t = build_java_array_type ((yyvsp[-1].node), -1); --- 3156,3166 ---- switch (yyn) { case 1: ! #line 604 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {; break;} ! case 18: ! #line 648 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { int osb = pop_current_osb (ctxp); tree t = build_java_array_type ((yyvsp[-1].node), -1); *************** case 19: *** 3215,3222 **** yyval.node = t; ; break;} ! case 20: ! #line 669 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { int osb = pop_current_osb (ctxp); tree t = yyvsp[-1].node; --- 3169,3176 ---- yyval.node = t; ; break;} ! case 19: ! #line 656 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { int osb = pop_current_osb (ctxp); tree t = yyvsp[-1].node; *************** case 20: *** 3225,3267 **** yyval.node = t; ; break;} ! case 24: ! #line 690 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = make_qualified_name (yyvsp[-2].node, yyvsp[0].node, yyvsp[-1].operator.location); ; break;} ! case 26: ! #line 699 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyval.node = NULL;; break;} ! case 34: ! #line 711 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = NULL; ; break;} ! case 35: ! #line 715 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = NULL; ; break;} ! case 38: ! #line 727 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { ctxp->package = EXPR_WFL_NODE (yyvsp[-1].node); register_package (ctxp->package); ; break;} ! case 39: ! #line 732 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing name"); RECOVER;; break;} ! case 40: ! #line 734 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("';' expected"); RECOVER;; break;} ! case 43: ! #line 744 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { tree name = EXPR_WFL_NODE (yyvsp[-1].node), last_name; int i = IDENTIFIER_LENGTH (name)-1; --- 3179,3221 ---- yyval.node = t; ; break;} ! case 23: ! #line 677 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = make_qualified_name (yyvsp[-2].node, yyvsp[0].node, yyvsp[-1].operator.location); ; break;} ! case 25: ! #line 686 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyval.node = NULL;; break;} ! case 33: ! #line 698 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = NULL; ; break;} ! case 34: ! #line 702 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = NULL; ; break;} ! case 37: ! #line 714 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { ctxp->package = EXPR_WFL_NODE (yyvsp[-1].node); register_package (ctxp->package); ; break;} ! case 38: ! #line 719 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing name"); RECOVER;; break;} ! case 39: ! #line 721 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("';' expected"); RECOVER;; break;} ! case 42: ! #line 731 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { tree name = EXPR_WFL_NODE (yyvsp[-1].node), last_name; int i = IDENTIFIER_LENGTH (name)-1; *************** case 43: *** 3288,3303 **** REGISTER_IMPORT (yyvsp[-1].node, last_name); ; break;} ! case 44: ! #line 770 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing name"); RECOVER;; break;} ! case 45: ! #line 772 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("';' expected"); RECOVER;; break;} ! case 46: ! #line 777 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { tree name = EXPR_WFL_NODE (yyvsp[-3].node); tree it; --- 3242,3257 ---- REGISTER_IMPORT (yyvsp[-1].node, last_name); ; break;} ! case 43: ! #line 757 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing name"); RECOVER;; break;} ! case 44: ! #line 759 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("';' expected"); RECOVER;; break;} ! case 45: ! #line 764 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { tree name = EXPR_WFL_NODE (yyvsp[-3].node); tree it; *************** case 46: *** 3316,3352 **** } ; break;} ! case 47: ! #line 795 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("'*' expected"); RECOVER;; break;} ! case 48: ! #line 797 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("';' expected"); RECOVER;; break;} ! case 49: ! #line 802 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { end_class_declaration (0); ; break;} ! case 50: ! #line 804 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { end_class_declaration (0); ; break;} ! case 52: ! #line 807 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { YYERROR_NOW; yyerror ("Class or interface declaration expected"); ; break;} ! case 53: ! #line 818 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.value = (1 << yyvsp[0].value); ; break;} ! case 54: ! #line 822 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { int acc = (1 << yyvsp[0].value); if (yyval.value & acc) --- 3270,3306 ---- } ; break;} ! case 46: ! #line 782 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("'*' expected"); RECOVER;; break;} ! case 47: ! #line 784 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("';' expected"); RECOVER;; break;} ! case 48: ! #line 789 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { end_class_declaration (0); ; break;} ! case 49: ! #line 791 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { end_class_declaration (0); ; break;} ! case 51: ! #line 794 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { YYERROR_NOW; yyerror ("Class or interface declaration expected"); ; break;} ! case 52: ! #line 805 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.value = (1 << yyvsp[0].value); ; break;} ! case 53: ! #line 809 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { int acc = (1 << yyvsp[0].value); if (yyval.value & acc) *************** case 54: *** 3359,3450 **** } ; break;} ! case 55: ! #line 838 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { create_class (yyvsp[-4].value, yyvsp[-2].node, yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 56: ! #line 840 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {;; break;} ! case 57: ! #line 842 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { create_class (0, yyvsp[-2].node, yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 58: ! #line 844 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {;; break;} ! case 59: ! #line 846 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyerror ("Missing class name"); RECOVER; ; break;} ! case 60: ! #line 848 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyerror ("Missing class name"); RECOVER; ; break;} ! case 61: ! #line 850 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { if (!ctxp->class_err) yyerror ("'{' expected"); DRECOVER(class1); ; break;} ! case 62: ! #line 855 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { if (!ctxp->class_err) yyerror ("'{' expected"); RECOVER; ; break;} ! case 63: ! #line 859 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = NULL; ; break;} ! case 64: ! #line 861 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = yyvsp[0].node; ; break;} ! case 65: ! #line 863 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("'{' expected"); ctxp->class_err=1;; break;} ! case 66: ! #line 865 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing super class name"); ctxp->class_err=1;; break;} ! case 67: ! #line 869 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = NULL_TREE; ; break;} ! case 68: ! #line 871 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = yyvsp[0].node; ; break;} ! case 69: ! #line 873 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { ctxp->class_err=1; yyerror ("Missing interface name"); ; break;} ! case 70: ! #line 881 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { ctxp->interface_number = 1; yyval.node = build_tree_list (yyvsp[0].node, NULL_TREE); ; break;} ! case 71: ! #line 886 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { ctxp->interface_number++; yyval.node = chainon (yyvsp[-2].node, build_tree_list (yyvsp[0].node, NULL_TREE)); ; break;} ! case 72: ! #line 891 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing interface name"); RECOVER;; break;} ! case 73: ! #line 896 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { /* Store the location of the `}' when doing xrefs */ if (flag_emit_xref) --- 3313,3404 ---- } ; break;} ! case 54: ! #line 825 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { create_class (yyvsp[-4].value, yyvsp[-2].node, yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 55: ! #line 827 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {;; break;} ! case 56: ! #line 829 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { create_class (0, yyvsp[-2].node, yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 57: ! #line 831 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {;; break;} ! case 58: ! #line 833 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyerror ("Missing class name"); RECOVER; ; break;} ! case 59: ! #line 835 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyerror ("Missing class name"); RECOVER; ; break;} ! case 60: ! #line 837 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { if (!ctxp->class_err) yyerror ("'{' expected"); DRECOVER(class1); ; break;} ! case 61: ! #line 842 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { if (!ctxp->class_err) yyerror ("'{' expected"); RECOVER; ; break;} ! case 62: ! #line 846 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = NULL; ; break;} ! case 63: ! #line 848 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = yyvsp[0].node; ; break;} ! case 64: ! #line 850 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("'{' expected"); ctxp->class_err=1;; break;} ! case 65: ! #line 852 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing super class name"); ctxp->class_err=1;; break;} ! case 66: ! #line 856 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = NULL_TREE; ; break;} ! case 67: ! #line 858 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = yyvsp[0].node; ; break;} ! case 68: ! #line 860 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { ctxp->class_err=1; yyerror ("Missing interface name"); ; break;} ! case 69: ! #line 868 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { ctxp->interface_number = 1; yyval.node = build_tree_list (yyvsp[0].node, NULL_TREE); ; break;} ! case 70: ! #line 873 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { ctxp->interface_number++; yyval.node = chainon (yyvsp[-2].node, build_tree_list (yyvsp[0].node, NULL_TREE)); ; break;} ! case 71: ! #line 878 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing interface name"); RECOVER;; break;} ! case 72: ! #line 883 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { /* Store the location of the `}' when doing xrefs */ if (flag_emit_xref) *************** case 73: *** 3453,3460 **** yyval.node = GET_CPC (); ; break;} ! case 74: ! #line 904 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { /* Store the location of the `}' when doing xrefs */ if (flag_emit_xref) --- 3407,3414 ---- yyval.node = GET_CPC (); ; break;} ! case 73: ! #line 891 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { /* Store the location of the `}' when doing xrefs */ if (flag_emit_xref) *************** case 74: *** 3463,3470 **** yyval.node = GET_CPC (); ; break;} ! case 80: ! #line 923 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { if (yyvsp[0].node != empty_stmt_node) { --- 3417,3424 ---- yyval.node = GET_CPC (); ; break;} ! case 79: ! #line 910 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { if (yyvsp[0].node != empty_stmt_node) { *************** case 80: *** 3473,3492 **** } ; break;} ! case 83: ! #line 936 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { end_class_declaration (1); ; break;} ! case 84: ! #line 938 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { end_class_declaration (1); ; break;} ! case 86: ! #line 945 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { register_fields (0, yyvsp[-2].node, yyvsp[-1].node); ; break;} ! case 87: ! #line 947 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { check_modifiers ("Illegal modifier `%s' for field declaration", --- 3427,3446 ---- } ; break;} ! case 82: ! #line 923 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { end_class_declaration (1); ; break;} ! case 83: ! #line 925 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { end_class_declaration (1); ; break;} ! case 85: ! #line 932 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { register_fields (0, yyvsp[-2].node, yyvsp[-1].node); ; break;} ! case 86: ! #line 934 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { check_modifiers ("Illegal modifier `%s' for field declaration", *************** case 87: *** 3495,3514 **** register_fields (yyvsp[-3].value, yyvsp[-2].node, yyvsp[-1].node); ; break;} ! case 89: ! #line 960 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = chainon (yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 90: ! #line 962 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 91: ! #line 967 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_tree_list (yyvsp[0].node, NULL_TREE); ; break;} ! case 92: ! #line 969 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { if (java_error_count) yyvsp[0].node = NULL_TREE; --- 3449,3468 ---- register_fields (yyvsp[-3].value, yyvsp[-2].node, yyvsp[-1].node); ; break;} ! case 88: ! #line 947 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = chainon (yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 89: ! #line 949 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 90: ! #line 954 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_tree_list (yyvsp[0].node, NULL_TREE); ; break;} ! case 91: ! #line 956 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { if (java_error_count) yyvsp[0].node = NULL_TREE; *************** case 92: *** 3516,3558 **** (yyvsp[-2].node, build_assignment (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node)); ; break;} ! case 93: ! #line 976 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyerror ("Missing variable initializer"); yyval.node = build_tree_list (yyvsp[-2].node, NULL_TREE); RECOVER; ; break;} ! case 94: ! #line 982 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyerror ("';' expected"); yyval.node = build_tree_list (yyvsp[-3].node, NULL_TREE); RECOVER; ; break;} ! case 96: ! #line 992 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_unresolved_array_type (yyvsp[-2].node); ; break;} ! case 97: ! #line 994 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Invalid declaration"); DRECOVER(vdi);; break;} ! case 98: ! #line 996 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyerror ("']' expected"); DRECOVER(vdi); ; break;} ! case 99: ! #line 1001 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Unbalanced ']'"); DRECOVER(vdi);; break;} ! case 102: ! #line 1012 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { current_function_decl = yyvsp[0].node; if (current_function_decl --- 3470,3512 ---- (yyvsp[-2].node, build_assignment (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node)); ; break;} ! case 92: ! #line 963 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyerror ("Missing variable initializer"); yyval.node = build_tree_list (yyvsp[-2].node, NULL_TREE); RECOVER; ; break;} ! case 93: ! #line 969 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyerror ("';' expected"); yyval.node = build_tree_list (yyvsp[-3].node, NULL_TREE); RECOVER; ; break;} ! case 95: ! #line 979 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_unresolved_array_type (yyvsp[-2].node); ; break;} ! case 96: ! #line 981 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Invalid declaration"); DRECOVER(vdi);; break;} ! case 97: ! #line 983 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyerror ("']' expected"); DRECOVER(vdi); ; break;} ! case 98: ! #line 988 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Unbalanced ']'"); DRECOVER(vdi);; break;} ! case 101: ! #line 999 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { current_function_decl = yyvsp[0].node; if (current_function_decl *************** case 102: *** 3562,3639 **** current_function_decl = NULL_TREE; ; break;} ! case 103: ! #line 1021 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { finish_method_declaration (yyvsp[0].node); ; break;} ! case 104: ! #line 1023 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {YYNOT_TWICE yyerror ("'{' expected"); RECOVER;; break;} ! case 105: ! #line 1028 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = method_header (0, yyvsp[-2].node, yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 106: ! #line 1030 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = method_header (0, void_type_node, yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 107: ! #line 1032 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = method_header (yyvsp[-3].value, yyvsp[-2].node, yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 108: ! #line 1034 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = method_header (yyvsp[-3].value, void_type_node, yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 109: ! #line 1036 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyerror ("Invalid method declaration, method name required"); RECOVER; ; break;} ! case 110: ! #line 1041 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyerror ("Identifier expected"); RECOVER; ; break;} ! case 111: ! #line 1046 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyerror ("Identifier expected"); RECOVER; ; break;} ! case 112: ! #line 1051 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyerror ("Identifier expected"); RECOVER; ; break;} ! case 113: ! #line 1056 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyerror ("Invalid method declaration, return type required"); RECOVER; ; break;} ! case 114: ! #line 1064 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { ctxp->formal_parameter_number = 0; yyval.node = method_declarator (yyvsp[-2].node, NULL_TREE); ; break;} ! case 115: ! #line 1069 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = method_declarator (yyvsp[-3].node, yyvsp[-1].node); ; break;} ! case 116: ! #line 1071 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { EXPR_WFL_LINECOL (wfl_operator) = yyvsp[-1].operator.location; TREE_PURPOSE (yyvsp[-2].node) = --- 3516,3593 ---- current_function_decl = NULL_TREE; ; break;} ! case 102: ! #line 1008 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { finish_method_declaration (yyvsp[0].node); ; break;} ! case 103: ! #line 1010 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {YYNOT_TWICE yyerror ("'{' expected"); RECOVER;; break;} ! case 104: ! #line 1015 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = method_header (0, yyvsp[-2].node, yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 105: ! #line 1017 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = method_header (0, void_type_node, yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 106: ! #line 1019 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = method_header (yyvsp[-3].value, yyvsp[-2].node, yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 107: ! #line 1021 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = method_header (yyvsp[-3].value, void_type_node, yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 108: ! #line 1023 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyerror ("Invalid method declaration, method name required"); RECOVER; ; break;} ! case 109: ! #line 1028 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyerror ("Identifier expected"); RECOVER; ; break;} ! case 110: ! #line 1033 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyerror ("Identifier expected"); RECOVER; ; break;} ! case 111: ! #line 1038 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyerror ("Identifier expected"); RECOVER; ; break;} ! case 112: ! #line 1043 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyerror ("Invalid method declaration, return type required"); RECOVER; ; break;} ! case 113: ! #line 1051 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { ctxp->formal_parameter_number = 0; yyval.node = method_declarator (yyvsp[-2].node, NULL_TREE); ; break;} ! case 114: ! #line 1056 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = method_declarator (yyvsp[-3].node, yyvsp[-1].node); ; break;} ! case 115: ! #line 1058 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { EXPR_WFL_LINECOL (wfl_operator) = yyvsp[-1].operator.location; TREE_PURPOSE (yyvsp[-2].node) = *************** case 116: *** 3643,3702 **** "Discouraged form of returned type specification"); ; break;} ! case 117: ! #line 1080 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("')' expected"); DRECOVER(method_declarator);; break;} ! case 118: ! #line 1082 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("']' expected"); RECOVER;; break;} ! case 119: ! #line 1087 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { ctxp->formal_parameter_number = 1; ; break;} ! case 120: ! #line 1091 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { ctxp->formal_parameter_number += 1; yyval.node = chainon (yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 121: ! #line 1096 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyerror ("Missing formal parameter term"); RECOVER; ; break;} ! case 122: ! #line 1101 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_tree_list (yyvsp[0].node, yyvsp[-1].node); ; break;} ! case 123: ! #line 1105 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_tree_list (yyvsp[0].node, yyvsp[-1].node); ARG_FINAL_P (yyval.node) = 1; ; break;} ! case 124: ! #line 1110 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyerror ("Missing identifier"); RECOVER; yyval.node = NULL_TREE; ; break;} ! case 125: ! #line 1115 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyerror ("Missing identifier"); RECOVER; yyval.node = NULL_TREE; ; break;} ! case 126: ! #line 1123 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { check_modifiers ("Illegal modifier `%s'. Only `final' was expected here", yyvsp[0].value, ACC_FINAL); --- 3597,3656 ---- "Discouraged form of returned type specification"); ; break;} ! case 116: ! #line 1067 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("')' expected"); DRECOVER(method_declarator);; break;} ! case 117: ! #line 1069 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("']' expected"); RECOVER;; break;} ! case 118: ! #line 1074 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { ctxp->formal_parameter_number = 1; ; break;} ! case 119: ! #line 1078 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { ctxp->formal_parameter_number += 1; yyval.node = chainon (yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 120: ! #line 1083 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyerror ("Missing formal parameter term"); RECOVER; ; break;} ! case 121: ! #line 1088 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_tree_list (yyvsp[0].node, yyvsp[-1].node); ; break;} ! case 122: ! #line 1092 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_tree_list (yyvsp[0].node, yyvsp[-1].node); ARG_FINAL_P (yyval.node) = 1; ; break;} ! case 123: ! #line 1097 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyerror ("Missing identifier"); RECOVER; yyval.node = NULL_TREE; ; break;} ! case 124: ! #line 1102 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyerror ("Missing identifier"); RECOVER; yyval.node = NULL_TREE; ; break;} ! case 125: ! #line 1110 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { check_modifiers ("Illegal modifier `%s'. Only `final' was expected here", yyvsp[0].value, ACC_FINAL); *************** case 126: *** 3704,3747 **** MODIFIER_WFL (FINAL_TK) = build_wfl_node (NULL_TREE); ; break;} ! case 127: ! #line 1132 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = NULL_TREE; ; break;} ! case 128: ! #line 1134 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = yyvsp[0].node; ; break;} ! case 129: ! #line 1136 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing class type term"); RECOVER;; break;} ! case 130: ! #line 1141 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_tree_list (yyvsp[0].node, yyvsp[0].node); ; break;} ! case 131: ! #line 1143 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = tree_cons (yyvsp[0].node, yyvsp[0].node, yyvsp[-2].node); ; break;} ! case 132: ! #line 1145 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing class type term"); RECOVER;; break;} ! case 134: ! #line 1150 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = NULL_TREE; ; break;} ! case 135: ! #line 1156 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { TREE_CHAIN (yyvsp[0].node) = CPC_STATIC_INITIALIZER_STMT (ctxp); SET_CPC_STATIC_INITIALIZER_STMT (ctxp, yyvsp[0].node); current_static_block = NULL_TREE; ; break;} ! case 136: ! #line 1165 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { check_modifiers ("Illegal modifier `%s' for static initializer", yyvsp[0].value, ACC_STATIC); /* Can't have a static initializer in an innerclass */ --- 3658,3701 ---- MODIFIER_WFL (FINAL_TK) = build_wfl_node (NULL_TREE); ; break;} ! case 126: ! #line 1119 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = NULL_TREE; ; break;} ! case 127: ! #line 1121 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = yyvsp[0].node; ; break;} ! case 128: ! #line 1123 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing class type term"); RECOVER;; break;} ! case 129: ! #line 1128 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_tree_list (yyvsp[0].node, yyvsp[0].node); ; break;} ! case 130: ! #line 1130 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = tree_cons (yyvsp[0].node, yyvsp[0].node, yyvsp[-2].node); ; break;} ! case 131: ! #line 1132 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing class type term"); RECOVER;; break;} ! case 133: ! #line 1137 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = NULL_TREE; ; break;} ! case 134: ! #line 1143 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { TREE_CHAIN (yyvsp[0].node) = CPC_STATIC_INITIALIZER_STMT (ctxp); SET_CPC_STATIC_INITIALIZER_STMT (ctxp, yyvsp[0].node); current_static_block = NULL_TREE; ; break;} ! case 135: ! #line 1152 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { check_modifiers ("Illegal modifier `%s' for static initializer", yyvsp[0].value, ACC_STATIC); /* Can't have a static initializer in an innerclass */ *************** case 136: *** 3754,3990 **** SOURCE_FRONTEND_DEBUG (("Modifiers: %d", yyvsp[0].value)); ; break;} ! case 137: ! #line 1181 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { current_function_decl = yyvsp[0].node; source_start_java_method (current_function_decl); ; break;} ! case 138: ! #line 1186 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { finish_method_declaration (yyvsp[0].node); ; break;} ! case 139: ! #line 1191 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = method_header (0, NULL_TREE, yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 140: ! #line 1193 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = method_header (yyvsp[-2].value, NULL_TREE, yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 141: ! #line 1198 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { ctxp->formal_parameter_number = 0; yyval.node = method_declarator (yyvsp[-2].node, NULL_TREE); ; break;} ! case 142: ! #line 1203 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = method_declarator (yyvsp[-3].node, yyvsp[-1].node); ; break;} ! case 143: ! #line 1211 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { BLOCK_EXPR_BODY (yyvsp[0].node) = empty_stmt_node; yyval.node = yyvsp[0].node; ; break;} ! case 144: ! #line 1216 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = yyvsp[0].node; ; break;} ! case 145: ! #line 1218 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = yyvsp[0].node; ; break;} ! case 146: ! #line 1220 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = yyvsp[0].node; ; break;} ! case 148: ! #line 1230 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_method_invocation (yyvsp[-3].node, NULL_TREE); yyval.node = build_debugable_stmt (EXPR_WFL_LINECOL (yyvsp[-3].node), yyval.node); yyval.node = java_method_add_stmt (current_function_decl, yyval.node); ; break;} ! case 149: ! #line 1236 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_method_invocation (yyvsp[-4].node, yyvsp[-2].node); yyval.node = build_debugable_stmt (EXPR_WFL_LINECOL (yyvsp[-4].node), yyval.node); yyval.node = java_method_add_stmt (current_function_decl, yyval.node); ; break;} ! case 150: ! #line 1244 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyval.node = parse_jdk1_1_error ("explicit constructor invocation"); ; break;} ! case 151: ! #line 1246 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyval.node = parse_jdk1_1_error ("explicit constructor invocation"); ; break;} ! case 152: ! #line 1251 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { tree wfl = build_wfl_node (this_identifier_node); EXPR_WFL_LINECOL (wfl) = yyvsp[0].operator.location; yyval.node = wfl; ; break;} ! case 153: ! #line 1257 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { tree wfl = build_wfl_node (super_identifier_node); EXPR_WFL_LINECOL (wfl) = yyvsp[0].operator.location; yyval.node = wfl; ; break;} ! case 154: ! #line 1268 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { create_interface (0, yyvsp[0].node, NULL_TREE); ; break;} ! case 155: ! #line 1270 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { ; ; break;} ! case 156: ! #line 1272 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { create_interface (yyvsp[-2].value, yyvsp[0].node, NULL_TREE); ; break;} ! case 157: ! #line 1274 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { ; ; break;} ! case 158: ! #line 1276 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { create_interface (0, yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 159: ! #line 1278 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { ; ; break;} ! case 160: ! #line 1280 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { create_interface (yyvsp[-3].value, yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 161: ! #line 1282 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { ; ; break;} ! case 162: ! #line 1284 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyerror ("'{' expected"); RECOVER; ; break;} ! case 163: ! #line 1286 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyerror ("'{' expected"); RECOVER; ; break;} ! case 164: ! #line 1291 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { ctxp->interface_number = 1; yyval.node = build_tree_list (yyvsp[0].node, NULL_TREE); ; break;} ! case 165: ! #line 1296 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { ctxp->interface_number++; yyval.node = chainon (yyvsp[-2].node, build_tree_list (yyvsp[0].node, NULL_TREE)); ; break;} ! case 166: ! #line 1301 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Invalid interface type"); RECOVER;; break;} ! case 167: ! #line 1303 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 168: ! #line 1308 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = NULL_TREE; ; break;} ! case 169: ! #line 1310 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = NULL_TREE; ; break;} ! case 174: ! #line 1322 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { end_class_declaration (1); ; break;} ! case 175: ! #line 1324 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { end_class_declaration (1); ; break;} ! case 177: ! #line 1333 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { check_abstract_method_header (yyvsp[-1].node); current_function_decl = NULL_TREE; /* FIXME ? */ ; break;} ! case 178: ! #line 1338 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("';' expected"); RECOVER;; break;} ! case 179: ! #line 1344 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_new_array_init (yyvsp[-1].operator.location, NULL_TREE); ; break;} ! case 180: ! #line 1346 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_new_array_init (yyvsp[-2].operator.location, NULL_TREE); ; break;} ! case 181: ! #line 1348 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_new_array_init (yyvsp[-2].operator.location, yyvsp[-1].node); ; break;} ! case 182: ! #line 1350 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_new_array_init (yyvsp[-3].operator.location, yyvsp[-2].node); ; break;} ! case 183: ! #line 1355 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = tree_cons (maybe_build_array_element_wfl (yyvsp[0].node), yyvsp[0].node, NULL_TREE); ; break;} ! case 184: ! #line 1360 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = tree_cons (maybe_build_array_element_wfl (yyvsp[0].node), yyvsp[0].node, yyvsp[-2].node); ; break;} ! case 185: ! #line 1364 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 186: ! #line 1370 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" ! { ! /* Store the location of the `}' when doing xrefs */ ! if (current_function_decl && flag_emit_xref) ! DECL_END_SOURCE_LINE (current_function_decl) = ! EXPR_WFL_ADD_COL (yyvsp[0].operator.location, 1); ! yyval.node = empty_stmt_node; ! ; break;} ! case 187: ! #line 1378 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = yyvsp[0].node; ; break;} ! case 188: ! #line 1383 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { enter_block (); ; break;} ! case 189: ! #line 1388 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { maybe_absorb_scoping_blocks (); /* Store the location of the `}' when doing xrefs */ --- 3708,3938 ---- SOURCE_FRONTEND_DEBUG (("Modifiers: %d", yyvsp[0].value)); ; break;} ! case 136: ! #line 1168 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { current_function_decl = yyvsp[0].node; source_start_java_method (current_function_decl); ; break;} ! case 137: ! #line 1173 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { finish_method_declaration (yyvsp[0].node); ; break;} ! case 138: ! #line 1178 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = method_header (0, NULL_TREE, yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 139: ! #line 1180 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = method_header (yyvsp[-2].value, NULL_TREE, yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 140: ! #line 1185 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { ctxp->formal_parameter_number = 0; yyval.node = method_declarator (yyvsp[-2].node, NULL_TREE); ; break;} ! case 141: ! #line 1190 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = method_declarator (yyvsp[-3].node, yyvsp[-1].node); ; break;} ! case 142: ! #line 1198 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { BLOCK_EXPR_BODY (yyvsp[0].node) = empty_stmt_node; yyval.node = yyvsp[0].node; ; break;} ! case 143: ! #line 1203 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = yyvsp[0].node; ; break;} ! case 144: ! #line 1205 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = yyvsp[0].node; ; break;} ! case 145: ! #line 1207 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = yyvsp[0].node; ; break;} ! case 147: ! #line 1217 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_method_invocation (yyvsp[-3].node, NULL_TREE); yyval.node = build_debugable_stmt (EXPR_WFL_LINECOL (yyvsp[-3].node), yyval.node); yyval.node = java_method_add_stmt (current_function_decl, yyval.node); ; break;} ! case 148: ! #line 1223 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_method_invocation (yyvsp[-4].node, yyvsp[-2].node); yyval.node = build_debugable_stmt (EXPR_WFL_LINECOL (yyvsp[-4].node), yyval.node); yyval.node = java_method_add_stmt (current_function_decl, yyval.node); ; break;} ! case 149: ! #line 1231 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyval.node = parse_jdk1_1_error ("explicit constructor invocation"); ; break;} ! case 150: ! #line 1233 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyval.node = parse_jdk1_1_error ("explicit constructor invocation"); ; break;} ! case 151: ! #line 1238 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { tree wfl = build_wfl_node (this_identifier_node); EXPR_WFL_LINECOL (wfl) = yyvsp[0].operator.location; yyval.node = wfl; ; break;} ! case 152: ! #line 1244 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { tree wfl = build_wfl_node (super_identifier_node); EXPR_WFL_LINECOL (wfl) = yyvsp[0].operator.location; yyval.node = wfl; ; break;} ! case 153: ! #line 1255 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { create_interface (0, yyvsp[0].node, NULL_TREE); ; break;} ! case 154: ! #line 1257 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { ; ; break;} ! case 155: ! #line 1259 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { create_interface (yyvsp[-2].value, yyvsp[0].node, NULL_TREE); ; break;} ! case 156: ! #line 1261 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { ; ; break;} ! case 157: ! #line 1263 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { create_interface (0, yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 158: ! #line 1265 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { ; ; break;} ! case 159: ! #line 1267 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { create_interface (yyvsp[-3].value, yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 160: ! #line 1269 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { ; ; break;} ! case 161: ! #line 1271 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyerror ("'{' expected"); RECOVER; ; break;} ! case 162: ! #line 1273 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyerror ("'{' expected"); RECOVER; ; break;} ! case 163: ! #line 1278 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { ctxp->interface_number = 1; yyval.node = build_tree_list (yyvsp[0].node, NULL_TREE); ; break;} ! case 164: ! #line 1283 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { ctxp->interface_number++; yyval.node = chainon (yyvsp[-2].node, build_tree_list (yyvsp[0].node, NULL_TREE)); ; break;} ! case 165: ! #line 1288 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Invalid interface type"); RECOVER;; break;} ! case 166: ! #line 1290 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 167: ! #line 1295 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = NULL_TREE; ; break;} ! case 168: ! #line 1297 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = NULL_TREE; ; break;} ! case 173: ! #line 1309 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { end_class_declaration (1); ; break;} ! case 174: ! #line 1311 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { end_class_declaration (1); ; break;} ! case 176: ! #line 1320 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { check_abstract_method_header (yyvsp[-1].node); current_function_decl = NULL_TREE; /* FIXME ? */ ; break;} ! case 177: ! #line 1325 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("';' expected"); RECOVER;; break;} ! case 178: ! #line 1331 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_new_array_init (yyvsp[-1].operator.location, NULL_TREE); ; break;} ! case 179: ! #line 1333 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_new_array_init (yyvsp[-2].operator.location, NULL_TREE); ; break;} ! case 180: ! #line 1335 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_new_array_init (yyvsp[-2].operator.location, yyvsp[-1].node); ; break;} ! case 181: ! #line 1337 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_new_array_init (yyvsp[-3].operator.location, yyvsp[-2].node); ; break;} ! case 182: ! #line 1342 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = tree_cons (maybe_build_array_element_wfl (yyvsp[0].node), yyvsp[0].node, NULL_TREE); ; break;} ! case 183: ! #line 1347 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = tree_cons (maybe_build_array_element_wfl (yyvsp[0].node), yyvsp[0].node, yyvsp[-2].node); ; break;} ! case 184: ! #line 1351 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 185: ! #line 1357 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" ! { yyval.node = yyvsp[0].node; ; break;} ! case 186: ! #line 1359 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = yyvsp[0].node; ; break;} ! case 187: ! #line 1364 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { enter_block (); ; break;} ! case 188: ! #line 1369 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { maybe_absorb_scoping_blocks (); /* Store the location of the `}' when doing xrefs */ *************** case 189: *** 3996,4030 **** BLOCK_SUBBLOCKS (yyval.node) = empty_stmt_node; ; break;} ! case 193: ! #line 1408 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { java_method_add_stmt (current_function_decl, yyvsp[0].node); ; break;} ! case 194: ! #line 1410 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { LOCAL_CLASS_P (TREE_TYPE (GET_CPC ())) = 1; end_class_declaration (1); ; break;} ! case 196: ! #line 1422 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { declare_local_variables (0, yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 197: ! #line 1424 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { declare_local_variables (yyvsp[-2].value, yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 203: ! #line 1434 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = exit_block (); ; break;} ! case 208: ! #line 1443 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = exit_block (); ; break;} ! case 221: ! #line 1463 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { if (flag_extraneous_semicolon && ! current_static_block --- 3944,3978 ---- BLOCK_SUBBLOCKS (yyval.node) = empty_stmt_node; ; break;} ! case 192: ! #line 1389 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { java_method_add_stmt (current_function_decl, yyvsp[0].node); ; break;} ! case 193: ! #line 1391 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { LOCAL_CLASS_P (TREE_TYPE (GET_CPC ())) = 1; end_class_declaration (1); ; break;} ! case 195: ! #line 1403 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { declare_local_variables (0, yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 196: ! #line 1405 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { declare_local_variables (yyvsp[-2].value, yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 202: ! #line 1415 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = exit_block (); ; break;} ! case 207: ! #line 1424 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = exit_block (); ; break;} ! case 220: ! #line 1444 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { if (flag_extraneous_semicolon && ! current_static_block *************** case 221: *** 4034,4047 **** (DECL_CONTEXT (current_function_decl))))) { ! EXPR_WFL_SET_LINECOL (wfl_operator, lineno, -1); parse_warning_context (wfl_operator, "An empty declaration is a deprecated feature that should not be used"); } yyval.node = empty_stmt_node; ; break;} ! case 222: ! #line 1481 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_labeled_block (EXPR_WFL_LINECOL (yyvsp[-1].node), EXPR_WFL_NODE (yyvsp[-1].node)); --- 3982,3995 ---- (DECL_CONTEXT (current_function_decl))))) { ! EXPR_WFL_SET_LINECOL (wfl_operator, input_line, -1); parse_warning_context (wfl_operator, "An empty declaration is a deprecated feature that should not be used"); } yyval.node = empty_stmt_node; ; break;} ! case 221: ! #line 1462 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_labeled_block (EXPR_WFL_LINECOL (yyvsp[-1].node), EXPR_WFL_NODE (yyvsp[-1].node)); *************** case 222: *** 4050,4176 **** PUSH_LABELED_BLOCK (yyval.node); ; break;} ! case 223: ! #line 1492 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = finish_labeled_statement (yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 224: ! #line 1494 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("':' expected"); RECOVER;; break;} ! case 225: ! #line 1499 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = finish_labeled_statement (yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 226: ! #line 1506 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { /* We have a statement. Generate a WFL around it so we can debug it */ ! yyval.node = build_expr_wfl (yyvsp[-1].node, input_filename, lineno, 0); /* We know we have a statement, so set the debug info to be eventually generate here. */ yyval.node = JAVA_MAYBE_GENERATE_DEBUG_INFO (yyval.node); ; break;} ! case 227: ! #line 1515 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { YYNOT_TWICE yyerror ("Invalid expression statement"); DRECOVER (expr_stmt); ; break;} ! case 228: ! #line 1520 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { YYNOT_TWICE yyerror ("Invalid expression statement"); DRECOVER (expr_stmt); ; break;} ! case 229: ! #line 1525 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { YYNOT_TWICE yyerror ("Invalid expression statement"); DRECOVER (expr_stmt); ; break;} ! case 230: ! #line 1530 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("')' expected"); RECOVER;; break;} ! case 231: ! #line 1532 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { parse_ctor_invocation_error (); RECOVER; ; break;} ! case 232: ! #line 1537 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("')' expected"); RECOVER;; break;} ! case 233: ! #line 1539 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { parse_ctor_invocation_error (); RECOVER; ; break;} ! case 234: ! #line 1544 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("'(' expected"); RECOVER;; break;} ! case 235: ! #line 1546 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("')' expected"); RECOVER;; break;} ! case 236: ! #line 1548 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("')' expected"); RECOVER;; break;} ! case 237: ! #line 1550 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("';' expected"); RECOVER;; break;} ! case 238: ! #line 1552 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("';' expected"); RECOVER;; break;} ! case 246: ! #line 1567 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_if_else_statement (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[0].node, NULL_TREE); ; break;} ! case 247: ! #line 1572 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("'(' expected"); RECOVER;; break;} ! case 248: ! #line 1574 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 249: ! #line 1576 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("')' expected"); RECOVER;; break;} ! case 250: ! #line 1581 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_if_else_statement (yyvsp[-5].operator.location, yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 251: ! #line 1586 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_if_else_statement (yyvsp[-5].operator.location, yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 252: ! #line 1591 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { enter_block (); ; break;} ! case 253: ! #line 1595 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { /* Make into "proper list" of COMPOUND_EXPRs. I.e. make the last statement also have its own --- 3998,4124 ---- PUSH_LABELED_BLOCK (yyval.node); ; break;} ! case 222: ! #line 1473 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = finish_labeled_statement (yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 223: ! #line 1475 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("':' expected"); RECOVER;; break;} ! case 224: ! #line 1480 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = finish_labeled_statement (yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 225: ! #line 1487 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { /* We have a statement. Generate a WFL around it so we can debug it */ ! yyval.node = build_expr_wfl (yyvsp[-1].node, input_filename, input_line, 0); /* We know we have a statement, so set the debug info to be eventually generate here. */ yyval.node = JAVA_MAYBE_GENERATE_DEBUG_INFO (yyval.node); ; break;} ! case 226: ! #line 1496 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { YYNOT_TWICE yyerror ("Invalid expression statement"); DRECOVER (expr_stmt); ; break;} ! case 227: ! #line 1501 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { YYNOT_TWICE yyerror ("Invalid expression statement"); DRECOVER (expr_stmt); ; break;} ! case 228: ! #line 1506 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { YYNOT_TWICE yyerror ("Invalid expression statement"); DRECOVER (expr_stmt); ; break;} ! case 229: ! #line 1511 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("')' expected"); RECOVER;; break;} ! case 230: ! #line 1513 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { parse_ctor_invocation_error (); RECOVER; ; break;} ! case 231: ! #line 1518 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("')' expected"); RECOVER;; break;} ! case 232: ! #line 1520 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { parse_ctor_invocation_error (); RECOVER; ; break;} ! case 233: ! #line 1525 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("'(' expected"); RECOVER;; break;} ! case 234: ! #line 1527 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("')' expected"); RECOVER;; break;} ! case 235: ! #line 1529 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("')' expected"); RECOVER;; break;} ! case 236: ! #line 1531 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("';' expected"); RECOVER;; break;} ! case 237: ! #line 1533 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("';' expected"); RECOVER;; break;} ! case 245: ! #line 1548 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_if_else_statement (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[0].node, NULL_TREE); ; break;} ! case 246: ! #line 1553 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("'(' expected"); RECOVER;; break;} ! case 247: ! #line 1555 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 248: ! #line 1557 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("')' expected"); RECOVER;; break;} ! case 249: ! #line 1562 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_if_else_statement (yyvsp[-5].operator.location, yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 250: ! #line 1567 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_if_else_statement (yyvsp[-5].operator.location, yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 251: ! #line 1572 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { enter_block (); ; break;} ! case 252: ! #line 1576 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { /* Make into "proper list" of COMPOUND_EXPRs. I.e. make the last statement also have its own *************** case 253: *** 4180,4296 **** yyval.node = build_debugable_stmt (EXPR_WFL_LINECOL (yyvsp[-2].node), yyvsp[-2].node); ; break;} ! case 254: ! #line 1607 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build (SWITCH_EXPR, NULL_TREE, yyvsp[-1].node, NULL_TREE); EXPR_WFL_LINECOL (yyval.node) = yyvsp[-2].operator.location; ; break;} ! case 255: ! #line 1612 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("'(' expected"); RECOVER;; break;} ! case 256: ! #line 1614 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term or ')'"); DRECOVER(switch_statement);; break;} ! case 257: ! #line 1616 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("'{' expected"); RECOVER;; break;} case 258: ! #line 1624 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = NULL_TREE; ; break;} case 259: ! #line 1626 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = NULL_TREE; ; break;} case 260: ! #line 1628 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" ! { yyval.node = NULL_TREE; ; ! break;} ! case 261: ! #line 1630 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = NULL_TREE; ; break;} ! case 267: ! #line 1649 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { tree lab = build1 (CASE_EXPR, NULL_TREE, yyvsp[-1].node); EXPR_WFL_LINECOL (lab) = yyvsp[-2].operator.location; java_method_add_stmt (current_function_decl, lab); ; break;} ! case 268: ! #line 1655 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { tree lab = build (DEFAULT_EXPR, NULL_TREE, NULL_TREE); EXPR_WFL_LINECOL (lab) = yyvsp[-1].operator.location; java_method_add_stmt (current_function_decl, lab); ; break;} ! case 269: ! #line 1661 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing or invalid constant expression"); RECOVER;; break;} ! case 270: ! #line 1663 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("':' expected"); RECOVER;; break;} ! case 271: ! #line 1665 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("':' expected"); RECOVER;; break;} ! case 272: ! #line 1670 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { tree body = build_loop_body (yyvsp[-2].operator.location, yyvsp[-1].node, 0); yyval.node = build_new_loop (body); ; break;} ! case 273: ! #line 1678 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = finish_loop_body (0, NULL_TREE, yyvsp[0].node, 0); ; break;} ! case 274: ! #line 1680 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {YYERROR_NOW; yyerror ("'(' expected"); RECOVER;; break;} ! case 275: ! #line 1682 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term and ')' expected"); RECOVER;; break;} ! case 276: ! #line 1684 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("')' expected"); RECOVER;; break;} ! case 277: ! #line 1689 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = finish_loop_body (0, NULL_TREE, yyvsp[0].node, 0); ; break;} ! case 278: ! #line 1694 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { tree body = build_loop_body (0, NULL_TREE, 1); yyval.node = build_new_loop (body); ; break;} ! case 279: ! #line 1703 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = finish_loop_body (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[-5].node, 1); ; break;} ! case 280: ! #line 1708 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { if (TREE_CODE_CLASS (TREE_CODE (yyvsp[-4].node)) == 'c') yyvsp[-4].node = build_wfl_node (yyvsp[-4].node); yyval.node = finish_for_loop (EXPR_WFL_LINECOL (yyvsp[-4].node), yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 281: ! #line 1714 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = finish_for_loop (0, NULL_TREE, yyvsp[-2].node, yyvsp[0].node); /* We have not condition, so we get rid of the EXIT_EXPR */ --- 4128,4244 ---- yyval.node = build_debugable_stmt (EXPR_WFL_LINECOL (yyvsp[-2].node), yyvsp[-2].node); ; break;} ! case 253: ! #line 1588 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build (SWITCH_EXPR, NULL_TREE, yyvsp[-1].node, NULL_TREE); EXPR_WFL_LINECOL (yyval.node) = yyvsp[-2].operator.location; ; break;} ! case 254: ! #line 1593 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("'(' expected"); RECOVER;; break;} ! case 255: ! #line 1595 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term or ')'"); DRECOVER(switch_statement);; break;} ! case 256: ! #line 1597 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("'{' expected"); RECOVER;; break;} + case 257: + #line 1605 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" + { yyval.node = NULL_TREE; ; + break;} case 258: ! #line 1607 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = NULL_TREE; ; break;} case 259: ! #line 1609 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = NULL_TREE; ; break;} case 260: ! #line 1611 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = NULL_TREE; ; break;} ! case 266: ! #line 1630 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { tree lab = build1 (CASE_EXPR, NULL_TREE, yyvsp[-1].node); EXPR_WFL_LINECOL (lab) = yyvsp[-2].operator.location; java_method_add_stmt (current_function_decl, lab); ; break;} ! case 267: ! #line 1636 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { tree lab = build (DEFAULT_EXPR, NULL_TREE, NULL_TREE); EXPR_WFL_LINECOL (lab) = yyvsp[-1].operator.location; java_method_add_stmt (current_function_decl, lab); ; break;} ! case 268: ! #line 1642 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing or invalid constant expression"); RECOVER;; break;} ! case 269: ! #line 1644 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("':' expected"); RECOVER;; break;} ! case 270: ! #line 1646 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("':' expected"); RECOVER;; break;} ! case 271: ! #line 1651 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { tree body = build_loop_body (yyvsp[-2].operator.location, yyvsp[-1].node, 0); yyval.node = build_new_loop (body); ; break;} ! case 272: ! #line 1659 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = finish_loop_body (0, NULL_TREE, yyvsp[0].node, 0); ; break;} ! case 273: ! #line 1661 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {YYERROR_NOW; yyerror ("'(' expected"); RECOVER;; break;} ! case 274: ! #line 1663 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term and ')' expected"); RECOVER;; break;} ! case 275: ! #line 1665 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("')' expected"); RECOVER;; break;} ! case 276: ! #line 1670 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = finish_loop_body (0, NULL_TREE, yyvsp[0].node, 0); ; break;} ! case 277: ! #line 1675 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { tree body = build_loop_body (0, NULL_TREE, 1); yyval.node = build_new_loop (body); ; break;} ! case 278: ! #line 1684 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = finish_loop_body (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[-5].node, 1); ; break;} ! case 279: ! #line 1689 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { if (TREE_CODE_CLASS (TREE_CODE (yyvsp[-4].node)) == 'c') yyvsp[-4].node = build_wfl_node (yyvsp[-4].node); yyval.node = finish_for_loop (EXPR_WFL_LINECOL (yyvsp[-4].node), yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 280: ! #line 1695 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = finish_for_loop (0, NULL_TREE, yyvsp[-2].node, yyvsp[0].node); /* We have not condition, so we get rid of the EXIT_EXPR */ *************** case 281: *** 4298,4321 **** empty_stmt_node; ; break;} ! case 282: ! #line 1721 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Invalid control expression"); RECOVER;; break;} ! case 283: ! #line 1723 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Invalid update expression"); RECOVER;; break;} ! case 284: ! #line 1725 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Invalid update expression"); RECOVER;; break;} ! case 285: ! #line 1730 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = finish_for_loop (EXPR_WFL_LINECOL (yyvsp[-4].node), yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node);; break;} ! case 286: ! #line 1732 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = finish_for_loop (0, NULL_TREE, yyvsp[-2].node, yyvsp[0].node); /* We have not condition, so we get rid of the EXIT_EXPR */ --- 4246,4269 ---- empty_stmt_node; ; break;} ! case 281: ! #line 1702 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Invalid control expression"); RECOVER;; break;} ! case 282: ! #line 1704 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Invalid update expression"); RECOVER;; break;} ! case 283: ! #line 1706 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Invalid update expression"); RECOVER;; break;} ! case 284: ! #line 1711 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = finish_for_loop (EXPR_WFL_LINECOL (yyvsp[-4].node), yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node);; break;} ! case 285: ! #line 1713 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = finish_for_loop (0, NULL_TREE, yyvsp[-2].node, yyvsp[0].node); /* We have not condition, so we get rid of the EXIT_EXPR */ *************** case 286: *** 4323,4346 **** empty_stmt_node; ; break;} ! case 287: ! #line 1742 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { /* This scope defined for local variable that may be defined within the scope of the for loop */ enter_block (); ; break;} ! case 288: ! #line 1748 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("'(' expected"); DRECOVER(for_1);; break;} ! case 289: ! #line 1750 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Invalid init statement"); RECOVER;; break;} ! case 290: ! #line 1755 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { /* We now declare the loop body. The loop is declared as a for loop. */ --- 4271,4294 ---- empty_stmt_node; ; break;} ! case 286: ! #line 1723 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { /* This scope defined for local variable that may be defined within the scope of the for loop */ enter_block (); ; break;} ! case 287: ! #line 1729 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("'(' expected"); DRECOVER(for_1);; break;} ! case 288: ! #line 1731 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Invalid init statement"); RECOVER;; break;} ! case 289: ! #line 1736 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { /* We now declare the loop body. The loop is declared as a for loop. */ *************** case 290: *** 4352,4510 **** java_method_add_stmt (current_function_decl, yyval.node); ; break;} ! case 291: ! #line 1767 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = empty_stmt_node; ; break;} ! case 292: ! #line 1769 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { /* Init statement recorded within the previously defined block scope */ yyval.node = java_method_add_stmt (current_function_decl, yyvsp[0].node); ; break;} ! case 293: ! #line 1775 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { /* Local variable are recorded within the previously defined block scope */ yyval.node = NULL_TREE; ; break;} ! case 294: ! #line 1781 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("';' expected"); DRECOVER(for_init_1);; break;} ! case 295: ! #line 1785 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyval.node = empty_stmt_node;; break;} ! case 296: ! #line 1787 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_debugable_stmt (BUILD_LOCATION (), yyvsp[0].node); ; break;} ! case 297: ! #line 1792 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = add_stmt_to_compound (NULL_TREE, NULL_TREE, yyvsp[0].node); ; break;} ! case 298: ! #line 1794 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = add_stmt_to_compound (yyvsp[-2].node, NULL_TREE, yyvsp[0].node); ; break;} ! case 299: ! #line 1796 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 300: ! #line 1801 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_bc_statement (yyvsp[-1].operator.location, 1, NULL_TREE); ; break;} ! case 301: ! #line 1803 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_bc_statement (yyvsp[-2].operator.location, 1, yyvsp[-1].node); ; break;} ! case 302: ! #line 1805 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 303: ! #line 1807 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("';' expected"); RECOVER;; break;} ! case 304: ! #line 1812 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_bc_statement (yyvsp[-1].operator.location, 0, NULL_TREE); ; break;} ! case 305: ! #line 1814 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_bc_statement (yyvsp[-2].operator.location, 0, yyvsp[-1].node); ; break;} ! case 306: ! #line 1816 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 307: ! #line 1818 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("';' expected"); RECOVER;; break;} ! case 308: ! #line 1823 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_return (yyvsp[-1].operator.location, NULL_TREE); ; break;} ! case 309: ! #line 1825 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_return (yyvsp[-2].operator.location, yyvsp[-1].node); ; break;} ! case 310: ! #line 1827 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 311: ! #line 1829 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("';' expected"); RECOVER;; break;} ! case 312: ! #line 1834 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build1 (THROW_EXPR, NULL_TREE, yyvsp[-1].node); EXPR_WFL_LINECOL (yyval.node) = yyvsp[-2].operator.location; ; break;} ! case 313: ! #line 1839 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 314: ! #line 1841 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("';' expected"); RECOVER;; break;} ! case 315: ! #line 1846 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_assertion (yyvsp[-4].operator.location, yyvsp[-3].node, yyvsp[-1].node); ; break;} ! case 316: ! #line 1850 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_assertion (yyvsp[-2].operator.location, yyvsp[-1].node, NULL_TREE); ; break;} ! case 317: ! #line 1854 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 318: ! #line 1856 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("';' expected"); RECOVER;; break;} ! case 319: ! #line 1861 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build (SYNCHRONIZED_EXPR, NULL_TREE, yyvsp[-2].node, yyvsp[0].node); EXPR_WFL_LINECOL (yyval.node) = EXPR_WFL_LINECOL (MODIFIER_WFL (SYNCHRONIZED_TK)); ; break;} ! case 320: ! #line 1867 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("'{' expected"); RECOVER;; break;} ! case 321: ! #line 1869 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("'(' expected"); RECOVER;; break;} ! case 322: ! #line 1871 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 323: ! #line 1873 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 324: ! #line 1878 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { check_modifiers ( "Illegal modifier `%s'. Only `synchronized' was expected here", --- 4300,4458 ---- java_method_add_stmt (current_function_decl, yyval.node); ; break;} ! case 290: ! #line 1748 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = empty_stmt_node; ; break;} ! case 291: ! #line 1750 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { /* Init statement recorded within the previously defined block scope */ yyval.node = java_method_add_stmt (current_function_decl, yyvsp[0].node); ; break;} ! case 292: ! #line 1756 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { /* Local variable are recorded within the previously defined block scope */ yyval.node = NULL_TREE; ; break;} ! case 293: ! #line 1762 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("';' expected"); DRECOVER(for_init_1);; break;} ! case 294: ! #line 1766 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyval.node = empty_stmt_node;; break;} ! case 295: ! #line 1768 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_debugable_stmt (BUILD_LOCATION (), yyvsp[0].node); ; break;} ! case 296: ! #line 1773 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = add_stmt_to_compound (NULL_TREE, NULL_TREE, yyvsp[0].node); ; break;} ! case 297: ! #line 1775 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = add_stmt_to_compound (yyvsp[-2].node, NULL_TREE, yyvsp[0].node); ; break;} ! case 298: ! #line 1777 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 299: ! #line 1782 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_bc_statement (yyvsp[-1].operator.location, 1, NULL_TREE); ; break;} ! case 300: ! #line 1784 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_bc_statement (yyvsp[-2].operator.location, 1, yyvsp[-1].node); ; break;} ! case 301: ! #line 1786 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 302: ! #line 1788 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("';' expected"); RECOVER;; break;} ! case 303: ! #line 1793 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_bc_statement (yyvsp[-1].operator.location, 0, NULL_TREE); ; break;} ! case 304: ! #line 1795 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_bc_statement (yyvsp[-2].operator.location, 0, yyvsp[-1].node); ; break;} ! case 305: ! #line 1797 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 306: ! #line 1799 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("';' expected"); RECOVER;; break;} ! case 307: ! #line 1804 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_return (yyvsp[-1].operator.location, NULL_TREE); ; break;} ! case 308: ! #line 1806 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_return (yyvsp[-2].operator.location, yyvsp[-1].node); ; break;} ! case 309: ! #line 1808 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 310: ! #line 1810 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("';' expected"); RECOVER;; break;} ! case 311: ! #line 1815 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build1 (THROW_EXPR, NULL_TREE, yyvsp[-1].node); EXPR_WFL_LINECOL (yyval.node) = yyvsp[-2].operator.location; ; break;} ! case 312: ! #line 1820 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 313: ! #line 1822 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("';' expected"); RECOVER;; break;} ! case 314: ! #line 1827 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_assertion (yyvsp[-4].operator.location, yyvsp[-3].node, yyvsp[-1].node); ; break;} ! case 315: ! #line 1831 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_assertion (yyvsp[-2].operator.location, yyvsp[-1].node, NULL_TREE); ; break;} ! case 316: ! #line 1835 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 317: ! #line 1837 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("';' expected"); RECOVER;; break;} ! case 318: ! #line 1842 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build (SYNCHRONIZED_EXPR, NULL_TREE, yyvsp[-2].node, yyvsp[0].node); EXPR_WFL_LINECOL (yyval.node) = EXPR_WFL_LINECOL (MODIFIER_WFL (SYNCHRONIZED_TK)); ; break;} ! case 319: ! #line 1848 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("'{' expected"); RECOVER;; break;} ! case 320: ! #line 1850 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("'(' expected"); RECOVER;; break;} ! case 321: ! #line 1852 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 322: ! #line 1854 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 323: ! #line 1859 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { check_modifiers ( "Illegal modifier `%s'. Only `synchronized' was expected here", *************** case 324: *** 4514,4698 **** build_wfl_node (NULL_TREE); ; break;} ! case 325: ! #line 1890 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_try_statement (yyvsp[-2].operator.location, yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 326: ! #line 1892 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_try_finally_statement (yyvsp[-2].operator.location, yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 327: ! #line 1894 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_try_finally_statement (yyvsp[-3].operator.location, build_try_statement (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[-1].node), yyvsp[0].node); ; break;} ! case 328: ! #line 1899 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("'{' expected"); DRECOVER (try_statement);; break;} ! case 330: ! #line 1905 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { TREE_CHAIN (yyvsp[0].node) = yyvsp[-1].node; yyval.node = yyvsp[0].node; ; break;} ! case 331: ! #line 1913 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { java_method_add_stmt (current_function_decl, yyvsp[0].node); exit_block (); yyval.node = yyvsp[-1].node; ; break;} ! case 332: ! #line 1922 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { /* We add a block to define a scope for formal_parameter (CCBP). The formal parameter is declared initialized by the appropriate function call */ ! tree ccpb = enter_block (); ! tree init = build_assignment ! (ASSIGN_TK, yyvsp[-2].operator.location, TREE_PURPOSE (yyvsp[-1].node), ! build (JAVA_EXC_OBJ_EXPR, ptr_type_node)); ! declare_local_variables (0, TREE_VALUE (yyvsp[-1].node), ! build_tree_list (TREE_PURPOSE (yyvsp[-1].node), ! init)); ! yyval.node = build1 (CATCH_EXPR, NULL_TREE, ccpb); ! EXPR_WFL_LINECOL (yyval.node) = yyvsp[-3].operator.location; ; break;} ! case 333: ! #line 1938 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("'(' expected"); RECOVER; yyval.node = NULL_TREE;; break;} ! case 334: ! #line 1940 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyerror ("Missing term or ')' expected"); RECOVER; yyval.node = NULL_TREE; ; break;} ! case 335: ! #line 1945 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER; yyval.node = NULL_TREE;; break;} ! case 336: ! #line 1950 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = yyvsp[0].node; ; break;} ! case 337: ! #line 1952 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("'{' expected"); RECOVER; ; break;} ! case 341: ! #line 1964 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_this (yyvsp[0].operator.location); ; break;} ! case 342: ! #line 1966 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyval.node = yyvsp[-1].node;; break;} ! case 348: ! #line 1976 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { tree wfl = build_wfl_node (this_identifier_node); yyval.node = make_qualified_primary (yyvsp[-2].node, wfl, EXPR_WFL_LINECOL (yyvsp[-2].node)); ; break;} ! case 349: ! #line 1981 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("')' expected"); RECOVER;; break;} ! case 350: ! #line 1983 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("'class' or 'this' expected" ); RECOVER;; break;} case 351: ! #line 1985 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("'class' expected" ); RECOVER;; break;} case 352: ! #line 1987 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" ! {yyerror ("'class' expected" ); RECOVER;; break;} case 353: ! #line 1992 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_incomplete_class_ref (yyvsp[-1].operator.location, yyvsp[-2].node); ; break;} case 354: ! #line 1994 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_incomplete_class_ref (yyvsp[-1].operator.location, yyvsp[-2].node); ; break;} case 355: ! #line 1996 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" ! { yyval.node = build_incomplete_class_ref (yyvsp[-1].operator.location, yyvsp[-2].node); ; ! break;} ! case 356: ! #line 1998 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_incomplete_class_ref (yyvsp[-1].operator.location, void_type_node); ; break;} ! case 357: ! #line 2006 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_new_invocation (yyvsp[-3].node, yyvsp[-1].node); ; break;} ! case 358: ! #line 2008 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_new_invocation (yyvsp[-2].node, NULL_TREE); ; break;} ! case 360: ! #line 2014 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { tree ctor = build_new_invocation (yyvsp[-2].node, NULL_TREE); yyval.node = make_qualified_primary (yyvsp[-3].node, ctor, EXPR_WFL_LINECOL (yyvsp[-3].node)); ; break;} ! case 362: ! #line 2021 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { tree ctor = build_new_invocation (yyvsp[-3].node, yyvsp[-1].node); yyval.node = make_qualified_primary (yyvsp[-4].node, ctor, EXPR_WFL_LINECOL (yyvsp[-4].node)); ; break;} ! case 364: ! #line 2028 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("'(' expected"); DRECOVER(new_1);; break;} ! case 365: ! #line 2030 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("'(' expected"); RECOVER;; break;} ! case 366: ! #line 2032 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("')' or term expected"); RECOVER;; break;} ! case 367: ! #line 2034 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("')' expected"); RECOVER;; break;} ! case 368: ! #line 2036 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {YYERROR_NOW; yyerror ("Identifier expected"); RECOVER;; break;} ! case 369: ! #line 2038 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("'(' expected"); RECOVER;; break;} ! case 370: ! #line 2048 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { create_anonymous_class (yyvsp[-4].operator.location, yyvsp[-3].node); ; break;} ! case 371: ! #line 2050 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { tree id = build_wfl_node (DECL_NAME (GET_CPC ())); EXPR_WFL_LINECOL (id) = EXPR_WFL_LINECOL (yyvsp[-5].node); --- 4462,4655 ---- build_wfl_node (NULL_TREE); ; break;} ! case 324: ! #line 1871 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_try_statement (yyvsp[-2].operator.location, yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 325: ! #line 1873 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_try_finally_statement (yyvsp[-2].operator.location, yyvsp[-1].node, yyvsp[0].node); ; break;} ! case 326: ! #line 1875 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_try_finally_statement (yyvsp[-3].operator.location, build_try_statement (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[-1].node), yyvsp[0].node); ; break;} ! case 327: ! #line 1880 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("'{' expected"); DRECOVER (try_statement);; break;} ! case 329: ! #line 1886 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { TREE_CHAIN (yyvsp[0].node) = yyvsp[-1].node; yyval.node = yyvsp[0].node; ; break;} ! case 330: ! #line 1894 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { java_method_add_stmt (current_function_decl, yyvsp[0].node); exit_block (); yyval.node = yyvsp[-1].node; ; break;} ! case 331: ! #line 1903 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { /* We add a block to define a scope for formal_parameter (CCBP). The formal parameter is declared initialized by the appropriate function call */ ! tree ccpb; ! tree init; ! if (yyvsp[-1].node) ! { ! ccpb = enter_block (); ! init = build_assignment ! (ASSIGN_TK, yyvsp[-2].operator.location, TREE_PURPOSE (yyvsp[-1].node), ! build (JAVA_EXC_OBJ_EXPR, ptr_type_node)); ! declare_local_variables (0, TREE_VALUE (yyvsp[-1].node), ! build_tree_list ! (TREE_PURPOSE (yyvsp[-1].node), init)); ! yyval.node = build1 (CATCH_EXPR, NULL_TREE, ccpb); ! EXPR_WFL_LINECOL (yyval.node) = yyvsp[-3].operator.location; ! } ! else ! { ! yyval.node = error_mark_node; ! } ; break;} ! case 332: ! #line 1928 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("'(' expected"); RECOVER; yyval.node = NULL_TREE;; break;} ! case 333: ! #line 1930 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyerror ("Missing term or ')' expected"); RECOVER; yyval.node = NULL_TREE; ; break;} ! case 334: ! #line 1935 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER; yyval.node = NULL_TREE;; break;} ! case 335: ! #line 1940 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = yyvsp[0].node; ; break;} ! case 336: ! #line 1942 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("'{' expected"); RECOVER; ; break;} ! case 340: ! #line 1954 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_this (yyvsp[0].operator.location); ; break;} ! case 341: ! #line 1956 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyval.node = yyvsp[-1].node;; break;} ! case 347: ! #line 1966 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { tree wfl = build_wfl_node (this_identifier_node); yyval.node = make_qualified_primary (yyvsp[-2].node, wfl, EXPR_WFL_LINECOL (yyvsp[-2].node)); ; break;} ! case 348: ! #line 1971 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("')' expected"); RECOVER;; break;} ! case 349: ! #line 1973 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("'class' or 'this' expected" ); RECOVER;; break;} + case 350: + #line 1975 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" + {yyerror ("'class' expected" ); RECOVER;; + break;} case 351: ! #line 1977 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("'class' expected" ); RECOVER;; break;} case 352: ! #line 1982 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" ! { yyval.node = build_incomplete_class_ref (yyvsp[-1].operator.location, yyvsp[-2].node); ; break;} case 353: ! #line 1984 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_incomplete_class_ref (yyvsp[-1].operator.location, yyvsp[-2].node); ; break;} case 354: ! #line 1986 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_incomplete_class_ref (yyvsp[-1].operator.location, yyvsp[-2].node); ; break;} case 355: ! #line 1988 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_incomplete_class_ref (yyvsp[-1].operator.location, void_type_node); ; break;} ! case 356: ! #line 1996 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_new_invocation (yyvsp[-3].node, yyvsp[-1].node); ; break;} ! case 357: ! #line 1998 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_new_invocation (yyvsp[-2].node, NULL_TREE); ; break;} ! case 359: ! #line 2004 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { tree ctor = build_new_invocation (yyvsp[-2].node, NULL_TREE); yyval.node = make_qualified_primary (yyvsp[-3].node, ctor, EXPR_WFL_LINECOL (yyvsp[-3].node)); ; break;} ! case 361: ! #line 2011 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { tree ctor = build_new_invocation (yyvsp[-3].node, yyvsp[-1].node); yyval.node = make_qualified_primary (yyvsp[-4].node, ctor, EXPR_WFL_LINECOL (yyvsp[-4].node)); ; break;} ! case 363: ! #line 2018 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("'(' expected"); DRECOVER(new_1);; break;} ! case 364: ! #line 2020 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("'(' expected"); RECOVER;; break;} ! case 365: ! #line 2022 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("')' or term expected"); RECOVER;; break;} ! case 366: ! #line 2024 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("')' expected"); RECOVER;; break;} ! case 367: ! #line 2026 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {YYERROR_NOW; yyerror ("Identifier expected"); RECOVER;; break;} ! case 368: ! #line 2028 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("'(' expected"); RECOVER;; break;} ! case 369: ! #line 2038 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { create_anonymous_class (yyvsp[-4].operator.location, yyvsp[-3].node); ; break;} ! case 370: ! #line 2040 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { tree id = build_wfl_node (DECL_NAME (GET_CPC ())); EXPR_WFL_LINECOL (id) = EXPR_WFL_LINECOL (yyvsp[-5].node); *************** case 371: *** 4724,4735 **** ; break;} ! case 372: ! #line 2081 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { create_anonymous_class (yyvsp[-3].operator.location, yyvsp[-2].node); ; break;} ! case 373: ! #line 2083 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { tree id = build_wfl_node (DECL_NAME (GET_CPC ())); EXPR_WFL_LINECOL (id) = EXPR_WFL_LINECOL (yyvsp[-4].node); --- 4681,4692 ---- ; break;} ! case 371: ! #line 2071 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { create_anonymous_class (yyvsp[-3].operator.location, yyvsp[-2].node); ; break;} ! case 372: ! #line 2073 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { tree id = build_wfl_node (DECL_NAME (GET_CPC ())); EXPR_WFL_LINECOL (id) = EXPR_WFL_LINECOL (yyvsp[-4].node); *************** case 373: *** 4743,4792 **** yyval.node = build_new_invocation (id, NULL_TREE); ; break;} ! case 374: ! #line 2099 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = yyvsp[-2].node; ; break;} ! case 375: ! #line 2101 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = yyvsp[-2].node; ; break;} ! case 376: ! #line 2106 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = tree_cons (NULL_TREE, yyvsp[0].node, NULL_TREE); ctxp->formal_parameter_number = 1; ; break;} ! case 377: ! #line 2111 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { ctxp->formal_parameter_number += 1; yyval.node = tree_cons (NULL_TREE, yyvsp[0].node, yyvsp[-2].node); ; break;} ! case 378: ! #line 2116 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} case 379: ! #line 2121 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_newarray_node (yyvsp[-1].node, yyvsp[0].node, 0); ; break;} case 380: ! #line 2123 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" ! { yyval.node = build_newarray_node (yyvsp[-1].node, yyvsp[0].node, 0); ; break;} case 381: ! #line 2125 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_newarray_node (yyvsp[-2].node, yyvsp[-1].node, pop_current_osb (ctxp));; break;} case 382: ! #line 2127 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" ! { yyval.node = build_newarray_node (yyvsp[-2].node, yyvsp[-1].node, pop_current_osb (ctxp));; ! break;} ! case 383: ! #line 2131 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { char *sig; int osb = pop_current_osb (ctxp); --- 4700,4749 ---- yyval.node = build_new_invocation (id, NULL_TREE); ; break;} ! case 373: ! #line 2089 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = yyvsp[-2].node; ; break;} ! case 374: ! #line 2091 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = yyvsp[-2].node; ; break;} ! case 375: ! #line 2096 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = tree_cons (NULL_TREE, yyvsp[0].node, NULL_TREE); ctxp->formal_parameter_number = 1; ; break;} ! case 376: ! #line 2101 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { ctxp->formal_parameter_number += 1; yyval.node = tree_cons (NULL_TREE, yyvsp[0].node, yyvsp[-2].node); ; break;} ! case 377: ! #line 2106 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} + case 378: + #line 2111 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" + { yyval.node = build_newarray_node (yyvsp[-1].node, yyvsp[0].node, 0); ; + break;} case 379: ! #line 2113 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_newarray_node (yyvsp[-1].node, yyvsp[0].node, 0); ; break;} case 380: ! #line 2115 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" ! { yyval.node = build_newarray_node (yyvsp[-2].node, yyvsp[-1].node, pop_current_osb (ctxp));; break;} case 381: ! #line 2117 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_newarray_node (yyvsp[-2].node, yyvsp[-1].node, pop_current_osb (ctxp));; break;} case 382: ! #line 2121 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { char *sig; int osb = pop_current_osb (ctxp); *************** case 383: *** 4798,4805 **** yyvsp[-2].node, get_identifier (sig), yyvsp[0].node); ; break;} ! case 384: ! #line 2142 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { int osb = pop_current_osb (ctxp); tree type = yyvsp[-2].node; --- 4755,4762 ---- yyvsp[-2].node, get_identifier (sig), yyvsp[0].node); ; break;} ! case 383: ! #line 2132 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { int osb = pop_current_osb (ctxp); tree type = yyvsp[-2].node; *************** case 384: *** 4809,4832 **** build_pointer_type (type), NULL_TREE, yyvsp[0].node); ; break;} ! case 385: ! #line 2151 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("'[' expected"); DRECOVER ("]");; break;} ! case 386: ! #line 2153 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("']' expected"); RECOVER;; break;} ! case 387: ! #line 2158 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_tree_list (NULL_TREE, yyvsp[0].node); ; break;} ! case 388: ! #line 2160 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = tree_cons (NULL_TREE, yyvsp[0].node, yyval.node); ; break;} ! case 389: ! #line 2165 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { if (JNUMERIC_TYPE_P (TREE_TYPE (yyvsp[-1].node))) { --- 4766,4789 ---- build_pointer_type (type), NULL_TREE, yyvsp[0].node); ; break;} ! case 384: ! #line 2141 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("'[' expected"); DRECOVER ("]");; break;} ! case 385: ! #line 2143 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("']' expected"); RECOVER;; break;} ! case 386: ! #line 2148 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_tree_list (NULL_TREE, yyvsp[0].node); ; break;} ! case 387: ! #line 2150 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = tree_cons (NULL_TREE, yyvsp[0].node, yyval.node); ; break;} ! case 388: ! #line 2155 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { if (JNUMERIC_TYPE_P (TREE_TYPE (yyvsp[-1].node))) { *************** case 389: *** 4837,4856 **** yyval.node = yyvsp[-1].node; ; break;} ! case 390: ! #line 2175 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("']' expected"); RECOVER;; break;} ! case 391: ! #line 2177 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyerror ("Missing term"); yyerror ("']' expected"); RECOVER; ; break;} ! case 392: ! #line 2186 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { int allocate = 0; /* If not initialized, allocate memory for the osb --- 4794,4813 ---- yyval.node = yyvsp[-1].node; ; break;} ! case 389: ! #line 2165 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("']' expected"); RECOVER;; break;} ! case 390: ! #line 2167 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyerror ("Missing term"); yyerror ("']' expected"); RECOVER; ; break;} ! case 391: ! #line 2176 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { int allocate = 0; /* If not initialized, allocate memory for the osb *************** case 392: *** 4868,4916 **** { allocate *= sizeof (int); if (ctxp->osb_number) ! ctxp->osb_number = (int *)xrealloc (ctxp->osb_number, ! allocate); else ! ctxp->osb_number = (int *)xmalloc (allocate); } ctxp->osb_depth++; CURRENT_OSB (ctxp) = 1; ; break;} ! case 393: ! #line 2212 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { CURRENT_OSB (ctxp)++; ; break;} ! case 394: ! #line 2214 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyerror ("']' expected"); RECOVER;; break;} ! case 395: ! #line 2219 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = make_qualified_primary (yyvsp[-2].node, yyvsp[0].node, yyvsp[-1].operator.location); ; break;} ! case 396: ! #line 2223 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { tree super_wfl = build_wfl_node (super_identifier_node); EXPR_WFL_LINECOL (super_wfl) = yyvsp[-2].operator.location; yyval.node = make_qualified_name (super_wfl, yyvsp[0].node, yyvsp[-1].operator.location); ; break;} ! case 397: ! #line 2229 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Field expected"); DRECOVER (super_field_acces);; break;} ! case 398: ! #line 2234 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_method_invocation (yyvsp[-2].node, NULL_TREE); ; break;} ! case 399: ! #line 2236 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_method_invocation (yyvsp[-3].node, yyvsp[-1].node); ; break;} ! case 400: ! #line 2238 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { if (TREE_CODE (yyvsp[-4].node) == THIS_EXPR) yyval.node = build_this_super_qualified_invocation --- 4825,4873 ---- { allocate *= sizeof (int); if (ctxp->osb_number) ! ctxp->osb_number = xrealloc (ctxp->osb_number, ! allocate); else ! ctxp->osb_number = xmalloc (allocate); } ctxp->osb_depth++; CURRENT_OSB (ctxp) = 1; ; break;} ! case 392: ! #line 2202 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { CURRENT_OSB (ctxp)++; ; break;} ! case 393: ! #line 2204 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyerror ("']' expected"); RECOVER;; break;} ! case 394: ! #line 2209 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = make_qualified_primary (yyvsp[-2].node, yyvsp[0].node, yyvsp[-1].operator.location); ; break;} ! case 395: ! #line 2213 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { tree super_wfl = build_wfl_node (super_identifier_node); EXPR_WFL_LINECOL (super_wfl) = yyvsp[-2].operator.location; yyval.node = make_qualified_name (super_wfl, yyvsp[0].node, yyvsp[-1].operator.location); ; break;} ! case 396: ! #line 2219 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Field expected"); DRECOVER (super_field_acces);; break;} ! case 397: ! #line 2224 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_method_invocation (yyvsp[-2].node, NULL_TREE); ; break;} ! case 398: ! #line 2226 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_method_invocation (yyvsp[-3].node, yyvsp[-1].node); ; break;} ! case 399: ! #line 2228 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { if (TREE_CODE (yyvsp[-4].node) == THIS_EXPR) yyval.node = build_this_super_qualified_invocation *************** case 400: *** 4922,4929 **** } ; break;} ! case 401: ! #line 2249 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { if (TREE_CODE (yyvsp[-5].node) == THIS_EXPR) yyval.node = build_this_super_qualified_invocation --- 4879,4886 ---- } ; break;} ! case 400: ! #line 2239 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { if (TREE_CODE (yyvsp[-5].node) == THIS_EXPR) yyval.node = build_this_super_qualified_invocation *************** case 401: *** 4935,5063 **** } ; break;} ! case 402: ! #line 2260 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_this_super_qualified_invocation (0, yyvsp[-2].node, NULL_TREE, yyvsp[-4].operator.location, yyvsp[-3].operator.location); ; break;} ! case 403: ! #line 2265 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_this_super_qualified_invocation (0, yyvsp[-3].node, yyvsp[-1].node, yyvsp[-5].operator.location, yyvsp[-4].operator.location); ; break;} case 404: ! #line 2274 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyerror ("'(' expected"); DRECOVER (method_invocation); ; break;} case 405: ! #line 2276 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" ! { yyerror ("'(' expected"); DRECOVER (method_invocation); ; break;} case 406: ! #line 2281 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_array_ref (yyvsp[-2].operator.location, yyvsp[-3].node, yyvsp[-1].node); ; break;} case 407: ! #line 2283 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" ! { yyval.node = build_array_ref (yyvsp[-2].operator.location, yyvsp[-3].node, yyvsp[-1].node); ; ! break;} ! case 408: ! #line 2285 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyerror ("Missing term and ']' expected"); DRECOVER(array_access); ; break;} ! case 409: ! #line 2290 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyerror ("']' expected"); DRECOVER(array_access); ; break;} ! case 410: ! #line 2295 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyerror ("Missing term and ']' expected"); DRECOVER(array_access); ; break;} ! case 411: ! #line 2300 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyerror ("']' expected"); DRECOVER(array_access); ; break;} ! case 416: ! #line 2315 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_incdec (yyvsp[0].operator.token, yyvsp[0].operator.location, yyvsp[-1].node, 1); ; break;} ! case 417: ! #line 2320 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_incdec (yyvsp[0].operator.token, yyvsp[0].operator.location, yyvsp[-1].node, 1); ; break;} ! case 420: ! #line 2327 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyval.node = build_unaryop (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node); ; break;} ! case 422: ! #line 2330 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER; break;} ! case 423: ! #line 2335 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { error_if_numeric_overflow (yyvsp[0].node); yyval.node = yyvsp[0].node; ; break;} ! case 424: ! #line 2340 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyval.node = build_unaryop (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node); ; break;} ! case 425: ! #line 2342 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER; break;} ! case 426: ! #line 2347 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyval.node = build_incdec (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node, 0); ; break;} ! case 427: ! #line 2349 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER; break;} ! case 428: ! #line 2354 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyval.node = build_incdec (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node, 0); ; break;} ! case 429: ! #line 2356 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER; break;} ! case 431: ! #line 2362 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyval.node = build_unaryop (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node); ; break;} ! case 432: ! #line 2364 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyval.node = build_unaryop (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node); ; break;} ! case 434: ! #line 2367 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER; break;} ! case 435: ! #line 2369 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER; break;} ! case 436: ! #line 2374 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { tree type = yyvsp[-3].node; int osb = pop_current_osb (ctxp); --- 4892,5020 ---- } ; break;} ! case 401: ! #line 2250 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_this_super_qualified_invocation (0, yyvsp[-2].node, NULL_TREE, yyvsp[-4].operator.location, yyvsp[-3].operator.location); ; break;} ! case 402: ! #line 2255 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_this_super_qualified_invocation (0, yyvsp[-3].node, yyvsp[-1].node, yyvsp[-5].operator.location, yyvsp[-4].operator.location); ; break;} + case 403: + #line 2264 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" + { yyerror ("'(' expected"); DRECOVER (method_invocation); ; + break;} case 404: ! #line 2266 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyerror ("'(' expected"); DRECOVER (method_invocation); ; break;} case 405: ! #line 2271 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" ! { yyval.node = build_array_ref (yyvsp[-2].operator.location, yyvsp[-3].node, yyvsp[-1].node); ; break;} case 406: ! #line 2273 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_array_ref (yyvsp[-2].operator.location, yyvsp[-3].node, yyvsp[-1].node); ; break;} case 407: ! #line 2275 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyerror ("Missing term and ']' expected"); DRECOVER(array_access); ; break;} ! case 408: ! #line 2280 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyerror ("']' expected"); DRECOVER(array_access); ; break;} ! case 409: ! #line 2285 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyerror ("Missing term and ']' expected"); DRECOVER(array_access); ; break;} ! case 410: ! #line 2290 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyerror ("']' expected"); DRECOVER(array_access); ; break;} ! case 415: ! #line 2305 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_incdec (yyvsp[0].operator.token, yyvsp[0].operator.location, yyvsp[-1].node, 1); ; break;} ! case 416: ! #line 2310 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_incdec (yyvsp[0].operator.token, yyvsp[0].operator.location, yyvsp[-1].node, 1); ; break;} ! case 419: ! #line 2317 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyval.node = build_unaryop (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node); ; break;} ! case 421: ! #line 2320 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER; break;} ! case 422: ! #line 2325 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { error_if_numeric_overflow (yyvsp[0].node); yyval.node = yyvsp[0].node; ; break;} ! case 423: ! #line 2330 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyval.node = build_unaryop (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node); ; break;} ! case 424: ! #line 2332 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER; break;} ! case 425: ! #line 2337 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyval.node = build_incdec (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node, 0); ; break;} ! case 426: ! #line 2339 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER; break;} ! case 427: ! #line 2344 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyval.node = build_incdec (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node, 0); ; break;} ! case 428: ! #line 2346 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER; break;} ! case 430: ! #line 2352 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyval.node = build_unaryop (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node); ; break;} ! case 431: ! #line 2354 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyval.node = build_unaryop (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node); ; break;} ! case 433: ! #line 2357 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER; break;} ! case 434: ! #line 2359 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER; break;} ! case 435: ! #line 2364 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { tree type = yyvsp[-3].node; int osb = pop_current_osb (ctxp); *************** case 436: *** 5066,5081 **** yyval.node = build_cast (yyvsp[-4].operator.location, type, yyvsp[0].node); ; break;} ! case 437: ! #line 2382 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_cast (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 438: ! #line 2384 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_cast (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 439: ! #line 2386 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { const char *ptr; int osb = pop_current_osb (ctxp); --- 5023,5038 ---- yyval.node = build_cast (yyvsp[-4].operator.location, type, yyvsp[0].node); ; break;} ! case 436: ! #line 2372 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_cast (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 437: ! #line 2374 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_cast (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 438: ! #line 2376 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { const char *ptr; int osb = pop_current_osb (ctxp); *************** case 439: *** 5090,5364 **** yyval.node = build_cast (yyvsp[-4].operator.location, yyvsp[-3].node, yyvsp[0].node); ; break;} ! case 440: ! #line 2400 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("']' expected, invalid type expression");; break;} ! case 441: ! #line 2402 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { YYNOT_TWICE yyerror ("Invalid type expression"); RECOVER; RECOVER; ; break;} ! case 442: ! #line 2407 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 443: ! #line 2409 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 444: ! #line 2411 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 446: ! #line 2417 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 447: ! #line 2422 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 448: ! #line 2427 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 449: ! #line 2432 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 450: ! #line 2434 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 451: ! #line 2436 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 453: ! #line 2442 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 454: ! #line 2447 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 455: ! #line 2452 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 456: ! #line 2454 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 458: ! #line 2460 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 459: ! #line 2465 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 460: ! #line 2470 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} case 461: ! #line 2475 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} case 462: ! #line 2477 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 463: ! #line 2479 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; break;} case 465: ! #line 2485 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} case 466: ! #line 2490 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} case 467: ! #line 2495 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} case 468: ! #line 2500 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" ! { ! yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ; break;} case 469: ! #line 2505 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" ! { yyval.node = build_binop (INSTANCEOF_EXPR, yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} case 470: ! #line 2507 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} case 471: ! #line 2509 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} case 472: ! #line 2511 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} case 473: ! #line 2513 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 474: ! #line 2515 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Invalid reference type"); RECOVER;; break;} ! case 476: ! #line 2521 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 477: ! #line 2526 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 478: ! #line 2531 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 479: ! #line 2533 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 481: ! #line 2539 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 482: ! #line 2544 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 484: ! #line 2550 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 485: ! #line 2555 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 487: ! #line 2561 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 488: ! #line 2566 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 490: ! #line 2572 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 491: ! #line 2577 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 493: ! #line 2583 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 494: ! #line 2588 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 496: ! #line 2594 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build (CONDITIONAL_EXPR, NULL_TREE, yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); EXPR_WFL_LINECOL (yyval.node) = yyvsp[-3].operator.location; ; break;} ! case 497: ! #line 2599 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { YYERROR_NOW; yyerror ("Missing term"); DRECOVER (1); ; break;} ! case 498: ! #line 2605 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); DRECOVER (2);; break;} ! case 499: ! #line 2607 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" {yyerror ("Missing term"); DRECOVER (3);; break;} ! case 502: ! #line 2617 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { yyval.node = build_assignment (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 503: ! #line 2619 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" { YYNOT_TWICE yyerror ("Missing term"); DRECOVER (assign); --- 5047,5321 ---- yyval.node = build_cast (yyvsp[-4].operator.location, yyvsp[-3].node, yyvsp[0].node); ; break;} ! case 439: ! #line 2390 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("']' expected, invalid type expression");; break;} ! case 440: ! #line 2392 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { YYNOT_TWICE yyerror ("Invalid type expression"); RECOVER; RECOVER; ; break;} ! case 441: ! #line 2397 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 442: ! #line 2399 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 443: ! #line 2401 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 445: ! #line 2407 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 446: ! #line 2412 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 447: ! #line 2417 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 448: ! #line 2422 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 449: ! #line 2424 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 450: ! #line 2426 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 452: ! #line 2432 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 453: ! #line 2437 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 454: ! #line 2442 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 455: ! #line 2444 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 457: ! #line 2450 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 458: ! #line 2455 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 459: ! #line 2460 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} + case 460: + #line 2465 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" + {yyerror ("Missing term"); RECOVER;; + break;} case 461: ! #line 2467 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} case 462: ! #line 2469 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 464: ! #line 2475 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" ! { ! yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ; break;} case 465: ! #line 2480 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} case 466: ! #line 2485 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} case 467: ! #line 2490 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} case 468: ! #line 2495 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" ! { yyval.node = build_binop (INSTANCEOF_EXPR, yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} case 469: ! #line 2497 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; break;} case 470: ! #line 2499 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} case 471: ! #line 2501 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} case 472: ! #line 2503 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} case 473: ! #line 2505 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Invalid reference type"); RECOVER;; break;} ! case 475: ! #line 2511 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 476: ! #line 2516 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 477: ! #line 2521 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 478: ! #line 2523 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 480: ! #line 2529 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 481: ! #line 2534 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 483: ! #line 2540 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 484: ! #line 2545 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 486: ! #line 2551 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 487: ! #line 2556 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 489: ! #line 2562 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 490: ! #line 2567 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 492: ! #line 2573 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 493: ! #line 2578 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); RECOVER;; break;} ! case 495: ! #line 2584 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build (CONDITIONAL_EXPR, NULL_TREE, yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); EXPR_WFL_LINECOL (yyval.node) = yyvsp[-3].operator.location; ; break;} ! case 496: ! #line 2589 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { YYERROR_NOW; yyerror ("Missing term"); DRECOVER (1); ; break;} ! case 497: ! #line 2595 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); DRECOVER (2);; break;} ! case 498: ! #line 2597 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" {yyerror ("Missing term"); DRECOVER (3);; break;} ! case 501: ! #line 2607 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { yyval.node = build_assignment (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; break;} ! case 502: ! #line 2609 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" { YYNOT_TWICE yyerror ("Missing term"); DRECOVER (assign); *************** case 503: *** 5366,5372 **** break;} } ! #line 731 "/usr/share/bison/bison.simple" yyvsp -= yylen; --- 5323,5329 ---- break;} } ! #line 705 "/usr/share/bison/bison.simple" yyvsp -= yylen; *************** yyreturn: *** 5597,5611 **** #endif return yyresult; } ! #line 2644 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse.y" /* Helper function to retrieve an OSB count. Should be used when the `dims:' rule is being used. */ static int ! pop_current_osb (ctxp) ! struct parser_ctxt *ctxp; { int to_return; --- 5554,5567 ---- #endif return yyresult; } ! #line 2634 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse.y" /* Helper function to retrieve an OSB count. Should be used when the `dims:' rule is being used. */ static int ! pop_current_osb (struct parser_ctxt *ctxp) { int to_return; *************** pop_current_osb (ctxp) *** 5629,5647 **** created context becomes the current one. */ static void ! create_new_parser_context (copy_from_previous) ! int copy_from_previous; { struct parser_ctxt *new; ! new = (struct parser_ctxt *)xmalloc(sizeof (struct parser_ctxt)); if (copy_from_previous) { ! memcpy ((PTR)new, (PTR)ctxp, sizeof (struct parser_ctxt)); ! new->saved_data_ctx = 1; } else ! memset ((PTR) new, 0, sizeof (struct parser_ctxt)); new->next = ctxp; ctxp = new; --- 5585,5604 ---- created context becomes the current one. */ static void ! create_new_parser_context (int copy_from_previous) { struct parser_ctxt *new; ! new = ggc_alloc (sizeof (struct parser_ctxt)); if (copy_from_previous) { ! memcpy (new, ctxp, sizeof (struct parser_ctxt)); ! /* This flag, indicating the context saves global values, ! should only be set by java_parser_context_save_global. */ ! new->saved_data_ctx = 0; } else ! memset (new, 0, sizeof (struct parser_ctxt)); new->next = ctxp; ctxp = new; *************** create_new_parser_context (copy_from_pre *** 5650,5663 **** /* Create a new parser context and make it the current one. */ void ! java_push_parser_context () { create_new_parser_context (0); } void ! java_pop_parser_context (generate) ! int generate; { tree current; struct parser_ctxt *toFree, *next; --- 5607,5619 ---- /* Create a new parser context and make it the current one. */ void ! java_push_parser_context (void) { create_new_parser_context (0); } void ! java_pop_parser_context (int generate) { tree current; struct parser_ctxt *toFree, *next; *************** java_pop_parser_context (generate) *** 5669,5675 **** next = ctxp->next; if (next) { ! lineno = ctxp->lineno; current_class = ctxp->class_type; } --- 5625,5631 ---- next = ctxp->next; if (next) { ! input_line = ctxp->lineno; current_class = ctxp->class_type; } *************** java_pop_parser_context (generate) *** 5695,5709 **** toFree->next = ctxp_for_generation; ctxp_for_generation = toFree; } - else - free (toFree); } /* Create a parser context for the use of saving some global variables. */ void ! java_parser_context_save_global () { if (!ctxp) { --- 5651,5663 ---- toFree->next = ctxp_for_generation; ctxp_for_generation = toFree; } } /* Create a parser context for the use of saving some global variables. */ void ! java_parser_context_save_global (void) { if (!ctxp) { *************** java_parser_context_save_global () *** 5714,5722 **** /* If this context already stores data, create a new one suitable for data storage. */ else if (ctxp->saved_data) ! create_new_parser_context (1); ! ctxp->lineno = lineno; ctxp->class_type = current_class; ctxp->filename = input_filename; ctxp->function_decl = current_function_decl; --- 5668,5679 ---- /* If this context already stores data, create a new one suitable for data storage. */ else if (ctxp->saved_data) ! { ! create_new_parser_context (1); ! ctxp->saved_data_ctx = 1; ! } ! ctxp->lineno = input_line; ctxp->class_type = current_class; ctxp->filename = input_filename; ctxp->function_decl = current_function_decl; *************** java_parser_context_save_global () *** 5727,5735 **** previous context the current one. */ void ! java_parser_context_restore_global () { ! lineno = ctxp->lineno; current_class = ctxp->class_type; input_filename = ctxp->filename; if (wfl_operator) --- 5684,5692 ---- previous context the current one. */ void ! java_parser_context_restore_global (void) { ! input_line = ctxp->lineno; current_class = ctxp->class_type; input_filename = ctxp->filename; if (wfl_operator) *************** java_parser_context_restore_global () *** 5749,5755 **** classes be parsed. */ static void ! java_parser_context_suspend () { /* This makes debugging through java_debug_context easier */ static const char *const name = ""; --- 5706,5712 ---- classes be parsed. */ static void ! java_parser_context_suspend (void) { /* This makes debugging through java_debug_context easier */ static const char *const name = ""; *************** java_parser_context_suspend () *** 5775,5781 **** can resume as if no context was ever saved. */ static void ! java_parser_context_resume () { struct parser_ctxt *old = ctxp; /* This one is to be discarded */ struct parser_ctxt *saver = old->next; /* This one contain saved info */ --- 5732,5738 ---- can resume as if no context was ever saved. */ static void ! java_parser_context_resume (void) { struct parser_ctxt *old = ctxp; /* This one is to be discarded */ struct parser_ctxt *saver = old->next; /* This one contain saved info */ *************** java_parser_context_resume () *** 5789,5804 **** current_class = saver->class_type; current_function_decl = saver->function_decl; ! /* Retrive the restored context */ ctxp = restored; /* Re-installed the data for the parsing to carry on */ memcpy (&ctxp->marker_begining, &old->marker_begining, (size_t)(&ctxp->marker_end - &ctxp->marker_begining)); - - /* Buffer context can now be discarded */ - free (saver); - free (old); } /* Add a new anchor node to which all statement(s) initializing static --- 5746,5757 ---- current_class = saver->class_type; current_function_decl = saver->function_decl; ! /* Retrieve the restored context */ ctxp = restored; /* Re-installed the data for the parsing to carry on */ memcpy (&ctxp->marker_begining, &old->marker_begining, (size_t)(&ctxp->marker_end - &ctxp->marker_begining)); } /* Add a new anchor node to which all statement(s) initializing static *************** java_parser_context_resume () *** 5806,5812 **** linked. */ static void ! java_parser_context_push_initialized_field () { tree node; --- 5759,5765 ---- linked. */ static void ! java_parser_context_push_initialized_field (void) { tree node; *************** java_parser_context_push_initialized_fie *** 5828,5834 **** or functions. */ static void ! java_parser_context_pop_initialized_field () { tree stmts; tree class_type = TREE_TYPE (GET_CPC ()); --- 5781,5787 ---- or functions. */ static void ! java_parser_context_pop_initialized_field (void) { tree stmts; tree class_type = TREE_TYPE (GET_CPC ()); *************** java_parser_context_pop_initialized_fiel *** 5863,5870 **** } static tree ! reorder_static_initialized (list) ! tree list; { /* We have to keep things in order. The alias initializer have to come first, then the initialized regular field, in reverse to --- 5816,5822 ---- } static tree ! reorder_static_initialized (tree list) { /* We have to keep things in order. The alias initializer have to come first, then the initialized regular field, in reverse to *************** reorder_static_initialized (list) *** 5900,5907 **** {int i; for (i = 0; i < (C); i++) fputc (' ', stderr);} static void ! java_debug_context_do (tab) ! int tab; { struct parser_ctxt *copy = ctxp; while (copy) --- 5852,5858 ---- {int i; for (i = 0; i < (C); i++) fputc (' ', stderr);} static void ! java_debug_context_do (int tab) { struct parser_ctxt *copy = ctxp; while (copy) *************** java_debug_context_do (tab) *** 5929,5935 **** debugger. */ void ! java_debug_context () { java_debug_context_do (0); } --- 5880,5886 ---- debugger. */ void ! java_debug_context (void) { java_debug_context_do (0); } *************** static int force_error = 0; *** 5944,5950 **** /* Reporting an constructor invocation error. */ static void ! parse_ctor_invocation_error () { if (DECL_CONSTRUCTOR_P (current_function_decl)) yyerror ("Constructor invocation must be first thing in a constructor"); --- 5895,5901 ---- /* Reporting an constructor invocation error. */ static void ! parse_ctor_invocation_error (void) { if (DECL_CONSTRUCTOR_P (current_function_decl)) yyerror ("Constructor invocation must be first thing in a constructor"); *************** parse_ctor_invocation_error () *** 5955,5962 **** /* Reporting JDK1.1 features not implemented. */ static tree ! parse_jdk1_1_error (msg) ! const char *msg; { sorry (": `%s' JDK1.1(TM) feature", msg); java_error_count++; --- 5906,5912 ---- /* Reporting JDK1.1 features not implemented. */ static tree ! parse_jdk1_1_error (const char *msg) { sorry (": `%s' JDK1.1(TM) feature", msg); java_error_count++; *************** parse_jdk1_1_error (msg) *** 5966,5973 **** static int do_warning = 0; void ! yyerror (msg) ! const char *msg; { static java_lc elc; static int prev_lineno; --- 5916,5922 ---- static int do_warning = 0; void ! yyerror (const char *msg) { static java_lc elc; static int prev_lineno; *************** yyerror (msg) *** 5976,5982 **** int save_lineno; char *remainder, *code_from_source; ! if (!force_error && prev_lineno == lineno) return; /* Save current error location but report latter, when the context is --- 5925,5931 ---- int save_lineno; char *remainder, *code_from_source; ! if (!force_error && prev_lineno == input_line) return; /* Save current error location but report latter, when the context is *************** yyerror (msg) *** 6009,6016 **** elc.line = ctxp->p_line->lineno; } ! save_lineno = lineno; ! prev_lineno = lineno = elc.line; prev_msg = msg; code_from_source = java_get_line_col (ctxp->filename, elc.line, elc.col); --- 5958,5965 ---- elc.line = ctxp->p_line->lineno; } ! save_lineno = input_line; ! prev_lineno = input_line = elc.line; prev_msg = msg; code_from_source = java_get_line_col (ctxp->filename, elc.line, elc.col); *************** yyerror (msg) *** 6027,6040 **** the same line. This occurs when we report an error but don't have a synchronization point other than ';', which expression_statement is the only one to take care of. */ ! ctxp->prevent_ese = lineno = save_lineno; } static void ! issue_warning_error_from_context (cl, msg, ap) ! tree cl; ! const char *msg; ! va_list ap; { const char *saved, *saved_input_filename; char buffer [4096]; --- 5976,5986 ---- the same line. This occurs when we report an error but don't have a synchronization point other than ';', which expression_statement is the only one to take care of. */ ! ctxp->prevent_ese = input_line = save_lineno; } static void ! issue_warning_error_from_context (tree cl, const char *msg, va_list ap) { const char *saved, *saved_input_filename; char buffer [4096]; *************** issue_warning_error_from_context (cl, ms *** 6061,6093 **** /* Issue an error message at a current source line CL */ void ! parse_error_context VPARAMS ((tree cl, const char *msg, ...)) { ! VA_OPEN (ap, msg); ! VA_FIXEDARG (ap, tree, cl); ! VA_FIXEDARG (ap, const char *, msg); issue_warning_error_from_context (cl, msg, ap); ! VA_CLOSE (ap); } /* Issue a warning at a current source line CL */ static void ! parse_warning_context VPARAMS ((tree cl, const char *msg, ...)) { ! VA_OPEN (ap, msg); ! VA_FIXEDARG (ap, tree, cl); ! VA_FIXEDARG (ap, const char *, msg); force_error = do_warning = 1; issue_warning_error_from_context (cl, msg, ap); do_warning = force_error = 0; ! VA_CLOSE (ap); } static tree ! find_expr_with_wfl (node) ! tree node; { while (node) { --- 6007,6036 ---- /* Issue an error message at a current source line CL */ void ! parse_error_context (tree cl, const char *msg, ...) { ! va_list ap; ! va_start (ap, msg); issue_warning_error_from_context (cl, msg, ap); ! va_end (ap); } /* Issue a warning at a current source line CL */ static void ! parse_warning_context (tree cl, const char *msg, ...) { ! va_list ap; ! va_start (ap, msg); force_error = do_warning = 1; issue_warning_error_from_context (cl, msg, ap); do_warning = force_error = 0; ! va_end (ap); } static tree ! find_expr_with_wfl (tree node) { while (node) { *************** find_expr_with_wfl (node) *** 6130,6147 **** last line of the method the error occurs in. */ static void ! missing_return_error (method) ! tree method; { ! EXPR_WFL_SET_LINECOL (wfl_operator, DECL_SOURCE_LINE_LAST (method), -2); parse_error_context (wfl_operator, "Missing return statement"); } /* Issue an unreachable statement error. From NODE, find the next statement to report appropriately. */ static void ! unreachable_stmt_error (node) ! tree node; { /* Browse node to find the next expression node that has a WFL. Use the location to report the error */ --- 6073,6088 ---- last line of the method the error occurs in. */ static void ! missing_return_error (tree method) { ! EXPR_WFL_SET_LINECOL (wfl_operator, DECL_FUNCTION_LAST_LINE (method), -2); parse_error_context (wfl_operator, "Missing return statement"); } /* Issue an unreachable statement error. From NODE, find the next statement to report appropriately. */ static void ! unreachable_stmt_error (tree node) { /* Browse node to find the next expression node that has a WFL. Use the location to report the error */ *************** unreachable_stmt_error (node) *** 6159,6166 **** abort (); } int ! java_report_errors () { if (java_error_count) fprintf (stderr, "%d error%s", --- 6100,6119 ---- abort (); } + static int + not_accessible_field_error (tree wfl, tree decl) + { + parse_error_context + (wfl, "Can't access %s field `%s.%s' from `%s'", + java_accstring_lookup (get_access_flags_from_decl (decl)), + GET_TYPE_NAME (DECL_CONTEXT (decl)), + IDENTIFIER_POINTER (DECL_NAME (decl)), + IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (current_class)))); + return 1; + } + int ! java_report_errors (void) { if (java_error_count) fprintf (stderr, "%d error%s", *************** java_report_errors () *** 6174,6181 **** } static char * ! java_accstring_lookup (flags) ! int flags; { static char buffer [80]; #define COPY_RETURN(S) {strcpy (buffer, S); return buffer;} --- 6127,6133 ---- } static char * ! java_accstring_lookup (int flags) { static char buffer [80]; #define COPY_RETURN(S) {strcpy (buffer, S); return buffer;} *************** java_accstring_lookup (flags) *** 6203,6211 **** variables. */ static void ! classitf_redefinition_error (context, id, decl, cl) ! const char *context; ! tree id, decl, cl; { parse_error_context (cl, "%s `%s' already defined in %s:%d", context, IDENTIFIER_POINTER (id), --- 6155,6161 ---- variables. */ static void ! classitf_redefinition_error (const char *context, tree id, tree decl, tree cl) { parse_error_context (cl, "%s `%s' already defined in %s:%d", context, IDENTIFIER_POINTER (id), *************** classitf_redefinition_error (context, id *** 6214,6222 **** } static void ! variable_redefinition_error (context, name, type, line) ! tree context, name, type; ! int line; { const char *type_name; --- 6164,6170 ---- } static void ! variable_redefinition_error (tree context, tree name, tree type, int line) { const char *type_name; *************** variable_redefinition_error (context, na *** 6238,6246 **** the node pointed to by TRIMMED unless TRIMMED is null. */ static int ! build_type_name_from_array_name (aname, trimmed) ! tree aname; ! tree *trimmed; { const char *name = IDENTIFIER_POINTER (aname); int len = IDENTIFIER_LENGTH (aname); --- 6186,6192 ---- the node pointed to by TRIMMED unless TRIMMED is null. */ static int ! build_type_name_from_array_name (tree aname, tree *trimmed) { const char *name = IDENTIFIER_POINTER (aname); int len = IDENTIFIER_LENGTH (aname); *************** build_type_name_from_array_name (aname, *** 6255,6262 **** } static tree ! build_array_from_name (type, type_wfl, name, ret_name) ! tree type, type_wfl, name, *ret_name; { int more_dims = 0; --- 6201,6207 ---- } static tree ! build_array_from_name (tree type, tree type_wfl, tree name, tree *ret_name) { int more_dims = 0; *************** build_array_from_name (type, type_wfl, n *** 6308,6315 **** identifier. */ static tree ! build_unresolved_array_type (type_or_wfl) ! tree type_or_wfl; { const char *ptr; tree wfl; --- 6253,6259 ---- identifier. */ static tree ! build_unresolved_array_type (tree type_or_wfl) { const char *ptr; tree wfl; *************** build_unresolved_array_type (type_or_wfl *** 6335,6342 **** } static void ! parser_add_interface (class_decl, interface_decl, wfl) ! tree class_decl, interface_decl, wfl; { if (maybe_add_interface (TREE_TYPE (class_decl), TREE_TYPE (interface_decl))) parse_error_context (wfl, "Interface `%s' repeated", --- 6279,6285 ---- } static void ! parser_add_interface (tree class_decl, tree interface_decl, tree wfl) { if (maybe_add_interface (TREE_TYPE (class_decl), TREE_TYPE (interface_decl))) parse_error_context (wfl, "Interface `%s' repeated", *************** parser_add_interface (class_decl, interf *** 6347,6355 **** encountered. TAG is 0 for a class, 1 for an interface. */ static int ! check_class_interface_creation (is_interface, flags, raw_name, qualified_name, decl, cl) ! int is_interface, flags; ! tree raw_name, qualified_name, decl, cl; { tree node; int sca = 0; /* Static class allowed */ --- 6290,6297 ---- encountered. TAG is 0 for a class, 1 for an interface. */ static int ! check_class_interface_creation (int is_interface, int flags, tree raw_name, ! tree qualified_name, tree decl, tree cl) { tree node; int sca = 0; /* Static class allowed */ *************** check_class_interface_creation (is_inter *** 6465,6472 **** /* Construct a nested class name. If the final component starts with a digit, return true. Otherwise return false. */ static int ! make_nested_class_name (cpc_list) ! tree cpc_list; { tree name; --- 6407,6413 ---- /* Construct a nested class name. If the final component starts with a digit, return true. Otherwise return false. */ static int ! make_nested_class_name (tree cpc_list) { tree name; *************** make_nested_class_name (cpc_list) *** 6489,6496 **** /* Can't redefine a class already defined in an earlier scope. */ static int ! check_inner_class_redefinition (raw_name, cl) ! tree raw_name, cl; { tree scope_list; --- 6430,6436 ---- /* Can't redefine a class already defined in an earlier scope. */ static int ! check_inner_class_redefinition (tree raw_name, tree cl) { tree scope_list; *************** check_inner_class_redefinition (raw_name *** 6510,6518 **** we remember ENCLOSING and SUPER. */ static tree ! resolve_inner_class (circularity_hash, cl, enclosing, super, class_type) ! htab_t circularity_hash; ! tree cl, *enclosing, *super, class_type; { tree local_enclosing = *enclosing; tree local_super = NULL_TREE; --- 6450,6457 ---- we remember ENCLOSING and SUPER. */ static tree ! resolve_inner_class (htab_t circularity_hash, tree cl, tree *enclosing, ! tree *super, tree class_type) { tree local_enclosing = *enclosing; tree local_super = NULL_TREE; *************** resolve_inner_class (circularity_hash, c *** 6536,6544 **** return decl; } ! /* Now go to the upper classes, bail out if necessary. We will analyze the returned SUPER and act accordingly (see ! do_resolve_class.) */ local_super = CLASSTYPE_SUPER (TREE_TYPE (local_enclosing)); if (!local_super || local_super == object_type_node) break; --- 6475,6490 ---- return decl; } ! /* Now go to the upper classes, bail out if necessary. We will analyze the returned SUPER and act accordingly (see ! do_resolve_class). */ ! if (JPRIMITIVE_TYPE_P (TREE_TYPE (local_enclosing)) ! || TREE_TYPE (local_enclosing) == void_type_node) ! { ! parse_error_context (cl, "Qualifier must be a reference"); ! local_enclosing = NULL_TREE; ! break; ! } local_super = CLASSTYPE_SUPER (TREE_TYPE (local_enclosing)); if (!local_super || local_super == object_type_node) break; *************** resolve_inner_class (circularity_hash, c *** 6575,6582 **** qualified. */ static tree ! find_as_inner_class (enclosing, name, cl) ! tree enclosing, name, cl; { tree qual, to_return; if (!enclosing) --- 6521,6527 ---- qualified. */ static tree ! find_as_inner_class (tree enclosing, tree name, tree cl) { tree qual, to_return; if (!enclosing) *************** find_as_inner_class (enclosing, name, cl *** 6629,6636 **** through. */ static tree ! find_as_inner_class_do (qual, enclosing) ! tree qual, enclosing; { if (!qual) return NULL_TREE; --- 6574,6580 ---- through. */ static tree ! find_as_inner_class_do (tree qual, tree enclosing) { if (!qual) return NULL_TREE; *************** find_as_inner_class_do (qual, enclosing) *** 6660,6668 **** DECL. */ static void ! set_nested_class_simple_name_value (outer, set) ! tree outer; ! int set; { tree l; --- 6604,6610 ---- DECL. */ static void ! set_nested_class_simple_name_value (tree outer, int set) { tree l; *************** set_nested_class_simple_name_value (oute *** 6672,6678 **** } static void ! link_nested_class_to_enclosing () { if (GET_ENCLOSING_CPC ()) { --- 6614,6620 ---- } static void ! link_nested_class_to_enclosing (void) { if (GET_ENCLOSING_CPC ()) { *************** link_nested_class_to_enclosing () *** 6684,6691 **** } static tree ! maybe_make_nested_class_name (name) ! tree name; { tree id = NULL_TREE; --- 6626,6632 ---- } static tree ! maybe_make_nested_class_name (tree name) { tree id = NULL_TREE; *************** maybe_make_nested_class_name (name) *** 6719,6733 **** line CL and do other maintenance things. */ static tree ! maybe_create_class_interface_decl (decl, raw_name, qualified_name, cl) ! tree decl, raw_name, qualified_name, cl; { if (!decl) decl = push_class (make_class (), qualified_name); /* Take care of the file and line business */ DECL_SOURCE_FILE (decl) = EXPR_WFL_FILENAME (cl); ! /* If we're emiting xrefs, store the line/col number information */ if (flag_emit_xref) DECL_SOURCE_LINE (decl) = EXPR_WFL_LINECOL (cl); else --- 6660,6674 ---- line CL and do other maintenance things. */ static tree ! maybe_create_class_interface_decl (tree decl, tree raw_name, ! tree qualified_name, tree cl) { if (!decl) decl = push_class (make_class (), qualified_name); /* Take care of the file and line business */ DECL_SOURCE_FILE (decl) = EXPR_WFL_FILENAME (cl); ! /* If we're emitting xrefs, store the line/col number information */ if (flag_emit_xref) DECL_SOURCE_LINE (decl) = EXPR_WFL_LINECOL (cl); else *************** maybe_create_class_interface_decl (decl, *** 6757,6764 **** } static void ! add_superinterfaces (decl, interface_list) ! tree decl, interface_list; { tree node; /* Superinterface(s): if present and defined, parser_check_super_interface () --- 6698,6704 ---- } static void ! add_superinterfaces (tree decl, tree interface_list) { tree node; /* Superinterface(s): if present and defined, parser_check_super_interface () *************** add_superinterfaces (decl, interface_lis *** 6787,6795 **** interface's decl in pass 2. */ static tree ! create_interface (flags, id, super) ! int flags; ! tree id, super; { tree raw_name = EXPR_WFL_NODE (id); tree q_name = parser_qualified_classname (raw_name); --- 6727,6733 ---- interface's decl in pass 2. */ static tree ! create_interface (int flags, tree id, tree super) { tree raw_name = EXPR_WFL_NODE (id); tree q_name = parser_qualified_classname (raw_name); *************** create_interface (flags, id, super) *** 6841,6846 **** --- 6779,6787 ---- CLASS_COMPLETE_P (decl) = 1; add_superinterfaces (decl, super); + /* Eventually sets the @deprecated tag flag */ + CHECK_DEPRECATED (decl); + return decl; } *************** create_interface (flags, id, super) *** 6848,6855 **** DEP. */ static void ! patch_anonymous_class (type_decl, class_decl, wfl) ! tree type_decl, class_decl, wfl; { tree class = TREE_TYPE (class_decl); tree type = TREE_TYPE (type_decl); --- 6789,6795 ---- DEP. */ static void ! patch_anonymous_class (tree type_decl, tree class_decl, tree wfl) { tree class = TREE_TYPE (class_decl); tree type = TREE_TYPE (type_decl); *************** patch_anonymous_class (type_decl, class_ *** 6881,6889 **** } static tree ! create_anonymous_class (location, type_name) ! int location; ! tree type_name; { char buffer [80]; tree super = NULL_TREE, itf = NULL_TREE; --- 6821,6827 ---- } static tree ! create_anonymous_class (int location, tree type_name) { char buffer [80]; tree super = NULL_TREE, itf = NULL_TREE; *************** create_anonymous_class (location, type_n *** 6898,6904 **** if ((type_decl = IDENTIFIER_CLASS_VALUE (EXPR_WFL_NODE (type_name)))) { /* Create a class which either implements on extends the designated ! class. The class bears an innacessible name. */ if (CLASS_INTERFACE (type_decl)) { /* It's OK to modify it here. It's been already used and --- 6836,6842 ---- if ((type_decl = IDENTIFIER_CLASS_VALUE (EXPR_WFL_NODE (type_name)))) { /* Create a class which either implements on extends the designated ! class. The class bears an inaccessible name. */ if (CLASS_INTERFACE (type_decl)) { /* It's OK to modify it here. It's been already used and *************** create_anonymous_class (location, type_n *** 6925,6933 **** interface's decl in pass 2. */ static tree ! create_class (flags, id, super, interfaces) ! int flags; ! tree id, super, interfaces; { tree raw_name = EXPR_WFL_NODE (id); tree class_id, decl; --- 6863,6869 ---- interface's decl in pass 2. */ static tree ! create_class (int flags, tree id, tree super, tree interfaces) { tree raw_name = EXPR_WFL_NODE (id); tree class_id, decl; *************** create_class (flags, id, super, interfac *** 7033,7040 **** parser context if necessary. */ static void ! end_class_declaration (resume) ! int resume; { /* If an error occurred, context weren't pushed and won't need to be popped by a resume. */ --- 6969,6975 ---- parser context if necessary. */ static void ! end_class_declaration (int resume) { /* If an error occurred, context weren't pushed and won't need to be popped by a resume. */ *************** end_class_declaration (resume) *** 7057,7065 **** } static void ! add_inner_class_fields (class_decl, fct_decl) ! tree class_decl; ! tree fct_decl; { tree block, marker, f; --- 6992,6998 ---- } static void ! add_inner_class_fields (tree class_decl, tree fct_decl) { tree block, marker, f; *************** add_inner_class_fields (class_decl, fct_ *** 7104,7110 **** methods first, then finit$ to get a picture of what's used. It works with the exception that we would have to go back on all constructor invoked in regular methods to ! have their invokation reworked (to include the right amount of alias initializer parameters.) The only real way around, I think, is a first pass to --- 7037,7043 ---- methods first, then finit$ to get a picture of what's used. It works with the exception that we would have to go back on all constructor invoked in regular methods to ! have their invocation reworked (to include the right amount of alias initializer parameters.) The only real way around, I think, is a first pass to *************** add_inner_class_fields (class_decl, fct_ *** 7114,7123 **** On the other hand, it only affect local inner classes, whose constructors (and finit$ call) will be featuring ! unecessary arguments. It's easy for a developper to keep this number of parameter down by using the `final' keyword only when necessary. For the time being, we can ! issue a warning on unecessary finals. FIXME */ init = build_assignment (ASSIGN_TK, EXPR_WFL_LINECOL (wfl), wfl, init); --- 7047,7056 ---- On the other hand, it only affect local inner classes, whose constructors (and finit$ call) will be featuring ! unnecessary arguments. It's easy for a developer to keep this number of parameter down by using the `final' keyword only when necessary. For the time being, we can ! issue a warning on unnecessary finals. FIXME */ init = build_assignment (ASSIGN_TK, EXPR_WFL_LINECOL (wfl), wfl, init); *************** add_inner_class_fields (class_decl, fct_ *** 7135,7141 **** return; /* If we ever registered an alias field, insert and marker to ! remeber where the list ends. The second part of the list (the one featuring initialized fields) so it can be later reversed to enforce 8.5. The marker will be removed during that operation. */ marker = build_tree_list (NULL_TREE, NULL_TREE); --- 7068,7074 ---- return; /* If we ever registered an alias field, insert and marker to ! remember where the list ends. The second part of the list (the one featuring initialized fields) so it can be later reversed to enforce 8.5. The marker will be removed during that operation. */ marker = build_tree_list (NULL_TREE, NULL_TREE); *************** add_inner_class_fields (class_decl, fct_ *** 7147,7155 **** can't set the CLASS_LOADED_P flag */ static tree ! find_field (class, name) ! tree class; ! tree name; { tree decl; for (decl = TYPE_FIELDS (class); decl; decl = TREE_CHAIN (decl)) --- 7080,7086 ---- can't set the CLASS_LOADED_P flag */ static tree ! find_field (tree class, tree name) { tree decl; for (decl = TYPE_FIELDS (class); decl; decl = TREE_CHAIN (decl)) *************** find_field (class, name) *** 7164,7171 **** of CLASS */ static tree ! lookup_field_wrapper (class, name) ! tree class, name; { tree type = class; tree decl = NULL_TREE; --- 7095,7101 ---- of CLASS */ static tree ! lookup_field_wrapper (tree class, tree name) { tree type = class; tree decl = NULL_TREE; *************** lookup_field_wrapper (class, name) *** 7204,7211 **** otherwise. */ static int ! duplicate_declaration_error_p (new_field_name, new_type, cl) ! tree new_field_name, new_type, cl; { /* This might be modified to work with method decl as well */ tree decl = find_field (TREE_TYPE (GET_CPC ()), new_field_name); --- 7134,7140 ---- otherwise. */ static int ! duplicate_declaration_error_p (tree new_field_name, tree new_type, tree cl) { /* This might be modified to work with method decl as well */ tree decl = find_field (TREE_TYPE (GET_CPC ()), new_field_name); *************** duplicate_declaration_error_p (new_field *** 7240,7252 **** be later resolved in java_complete_class () */ static void ! register_fields (flags, type, variable_list) ! int flags; ! tree type, variable_list; { tree current, saved_type; tree class_type = NULL_TREE; ! int saved_lineno = lineno; int must_chain = 0; tree wfl = NULL_TREE; --- 7169,7179 ---- be later resolved in java_complete_class () */ static void ! register_fields (int flags, tree type, tree variable_list) { tree current, saved_type; tree class_type = NULL_TREE; ! int saved_lineno = input_line; int must_chain = 0; tree wfl = NULL_TREE; *************** register_fields (flags, type, variable_l *** 7316,7326 **** /* Set lineno to the line the field was found and create a declaration for it. Eventually sets the @deprecated tag flag. */ if (flag_emit_xref) ! lineno = EXPR_WFL_LINECOL (cl); else ! lineno = EXPR_WFL_LINENO (cl); field_decl = add_field (class_type, current_name, real_type, flags); ! CHECK_DEPRECATED (field_decl); /* If the field denotes a final instance variable, then we allocate a LANG_DECL_SPECIFIC part to keep track of its --- 7243,7253 ---- /* Set lineno to the line the field was found and create a declaration for it. Eventually sets the @deprecated tag flag. */ if (flag_emit_xref) ! input_line = EXPR_WFL_LINECOL (cl); else ! input_line = EXPR_WFL_LINENO (cl); field_decl = add_field (class_type, current_name, real_type, flags); ! CHECK_DEPRECATED_NO_RESET (field_decl); /* If the field denotes a final instance variable, then we allocate a LANG_DECL_SPECIFIC part to keep track of its *************** register_fields (flags, type, variable_l *** 7378,7384 **** DECL_INITIAL (field_decl) = TREE_OPERAND (init, 1); } } ! lineno = saved_lineno; } /* Generate finit$, using the list of initialized fields to populate --- 7305,7313 ---- DECL_INITIAL (field_decl) = TREE_OPERAND (init, 1); } } ! ! CLEAR_DEPRECATED; ! input_line = saved_lineno; } /* Generate finit$, using the list of initialized fields to populate *************** register_fields (flags, type, variable_l *** 7387,7394 **** local(s). */ static tree ! generate_finit (class_type) ! tree class_type; { int count = 0; tree list = TYPE_FINIT_STMT_LIST (class_type); --- 7316,7322 ---- local(s). */ static tree ! generate_finit (tree class_type) { int count = 0; tree list = TYPE_FINIT_STMT_LIST (class_type); *************** generate_finit (class_type) *** 7422,7429 **** statements in a try/catch/rethrow sequence. */ static tree ! generate_instinit (class_type) ! tree class_type; { tree current; tree compound = NULL_TREE; --- 7350,7356 ---- statements in a try/catch/rethrow sequence. */ static tree ! generate_instinit (tree class_type) { tree current; tree compound = NULL_TREE; *************** generate_instinit (class_type) *** 7465,7472 **** /* FIXME */ static tree ! build_instinit_invocation (class_type) ! tree class_type; { tree to_return = NULL_TREE; --- 7392,7398 ---- /* FIXME */ static tree ! build_instinit_invocation (tree class_type) { tree to_return = NULL_TREE; *************** build_instinit_invocation (class_type) *** 7481,7487 **** return to_return; } ! /* Shared accros method_declarator and method_header to remember the patch stage that was reached during the declaration of the method. A method DECL is built differently is there is no patch (JDEP_NO_PATCH) or a patch (JDEP_METHOD or JDEP_METHOD_RETURN) --- 7407,7413 ---- return to_return; } ! /* Shared across method_declarator and method_header to remember the patch stage that was reached during the declaration of the method. A method DECL is built differently is there is no patch (JDEP_NO_PATCH) or a patch (JDEP_METHOD or JDEP_METHOD_RETURN) *************** static int patch_stage; *** 7496,7504 **** with a constructor. */ static tree ! method_header (flags, type, mdecl, throws) ! int flags; ! tree type, mdecl, throws; { tree type_wfl = NULL_TREE; tree meth_name = NULL_TREE; --- 7422,7428 ---- with a constructor. */ static tree ! method_header (int flags, tree type, tree mdecl, tree throws) { tree type_wfl = NULL_TREE; tree meth_name = NULL_TREE; *************** method_header (flags, type, mdecl, throw *** 7635,7645 **** else TREE_TYPE (meth) = type; ! saved_lineno = lineno; /* When defining an abstract or interface method, the curly bracket at level 1 doesn't exist because there is no function body */ ! lineno = (ctxp->first_ccb_indent1 ? ctxp->first_ccb_indent1 : EXPR_WFL_LINENO (id)); /* Remember the original argument list */ --- 7559,7569 ---- else TREE_TYPE (meth) = type; ! saved_lineno = input_line; /* When defining an abstract or interface method, the curly bracket at level 1 doesn't exist because there is no function body */ ! input_line = (ctxp->first_ccb_indent1 ? ctxp->first_ccb_indent1 : EXPR_WFL_LINENO (id)); /* Remember the original argument list */ *************** method_header (flags, type, mdecl, throw *** 7673,7679 **** /* Register the parameter number and re-install the current line number */ DECL_MAX_LOCALS (meth) = ctxp->formal_parameter_number+1; ! lineno = saved_lineno; /* Register exception specified by the `throws' keyword for resolution and set the method decl appropriate field to the list. --- 7597,7603 ---- /* Register the parameter number and re-install the current line number */ DECL_MAX_LOCALS (meth) = ctxp->formal_parameter_number+1; ! input_line = saved_lineno; /* Register exception specified by the `throws' keyword for resolution and set the method decl appropriate field to the list. *************** method_header (flags, type, mdecl, throw *** 7720,7727 **** } static void ! fix_method_argument_names (orig_arg, meth) ! tree orig_arg, meth; { tree arg = TYPE_ARG_TYPES (TREE_TYPE (meth)); if (TREE_CODE (TREE_TYPE (meth)) == METHOD_TYPE) --- 7644,7650 ---- } static void ! fix_method_argument_names (tree orig_arg, tree meth) { tree arg = TYPE_ARG_TYPES (TREE_TYPE (meth)); if (TREE_CODE (TREE_TYPE (meth)) == METHOD_TYPE) *************** fix_method_argument_names (orig_arg, met *** 7740,7747 **** /* Complete the method declaration with METHOD_BODY. */ static void ! finish_method_declaration (method_body) ! tree method_body; { int flags; --- 7663,7669 ---- /* Complete the method declaration with METHOD_BODY. */ static void ! finish_method_declaration (tree method_body) { int flags; *************** finish_method_declaration (method_body) *** 7784,7790 **** /* Merge last line of the function with first line, directly in the function decl. It will be used to emit correct debug info. */ if (!flag_emit_xref) ! DECL_SOURCE_LINE_MERGE (current_function_decl, ctxp->last_ccb_indent1); /* Since function's argument's list are shared, reset the ARG_FINAL_P parameter that might have been set on some of this --- 7706,7712 ---- /* Merge last line of the function with first line, directly in the function decl. It will be used to emit correct debug info. */ if (!flag_emit_xref) ! DECL_FUNCTION_LAST_LINE (current_function_decl) = ctxp->last_ccb_indent1; /* Since function's argument's list are shared, reset the ARG_FINAL_P parameter that might have been set on some of this *************** finish_method_declaration (method_body) *** 7799,7806 **** /* Build a an error message for constructor circularity errors. */ static char * ! constructor_circularity_msg (from, to) ! tree from, to; { static char string [4096]; char *t = xstrdup (lang_printable_name (from, 0)); --- 7721,7727 ---- /* Build a an error message for constructor circularity errors. */ static char * ! constructor_circularity_msg (tree from, tree to) { static char string [4096]; char *t = xstrdup (lang_printable_name (from, 0)); *************** constructor_circularity_msg (from, to) *** 7814,7821 **** static GTY(()) tree vcc_list; static int ! verify_constructor_circularity (meth, current) ! tree meth, current; { tree c; --- 7735,7741 ---- static GTY(()) tree vcc_list; static int ! verify_constructor_circularity (tree meth, tree current) { tree c; *************** verify_constructor_circularity (meth, cu *** 7859,7866 **** /* Check modifiers that can be declared but exclusively */ static void ! check_modifiers_consistency (flags) ! int flags; { int acc_count = 0; tree cl = NULL_TREE; --- 7779,7785 ---- /* Check modifiers that can be declared but exclusively */ static void ! check_modifiers_consistency (int flags) { int acc_count = 0; tree cl = NULL_TREE; *************** check_modifiers_consistency (flags) *** 7884,7891 **** /* Check the methode header METH for abstract specifics features */ static void ! check_abstract_method_header (meth) ! tree meth; { int flags = get_access_flags_from_decl (meth); --- 7803,7809 ---- /* Check the methode header METH for abstract specifics features */ static void ! check_abstract_method_header (tree meth) { int flags = get_access_flags_from_decl (meth); *************** check_abstract_method_header (meth) *** 7906,7913 **** incomplete types. */ static tree ! method_declarator (id, list) ! tree id, list; { tree arg_types = NULL_TREE, current, node; tree meth = make_node (FUNCTION_TYPE); --- 7824,7830 ---- incomplete types. */ static tree ! method_declarator (tree id, tree list) { tree arg_types = NULL_TREE, current, node; tree meth = make_node (FUNCTION_TYPE); *************** method_declarator (id, list) *** 7990,7996 **** /* The argument node: a name and a (possibly) incomplete type. */ arg_node = build_tree_list (name, real_type); ! /* Remeber arguments declared final. */ ARG_FINAL_P (arg_node) = ARG_FINAL_P (current); if (jdep) --- 7907,7913 ---- /* The argument node: a name and a (possibly) incomplete type. */ arg_node = build_tree_list (name, real_type); ! /* Remember arguments declared final. */ ARG_FINAL_P (arg_node) = ARG_FINAL_P (current); if (jdep) *************** method_declarator (id, list) *** 8004,8012 **** } static int ! unresolved_type_p (wfl, returned) ! tree wfl; ! tree *returned; { if (TREE_CODE (wfl) == EXPR_WITH_FILE_LOCATION) --- 7921,7927 ---- } static int ! unresolved_type_p (tree wfl, tree *returned) { if (TREE_CODE (wfl) == EXPR_WITH_FILE_LOCATION) *************** unresolved_type_p (wfl, returned) *** 8032,8039 **** qualification from the current package definition. */ static tree ! parser_qualified_classname (name) ! tree name; { tree nested_class_name; --- 7947,7953 ---- qualification from the current package definition. */ static tree ! parser_qualified_classname (tree name) { tree nested_class_name; *************** parser_qualified_classname (name) *** 8050,8057 **** everything is OK. */ static int ! parser_check_super_interface (super_decl, this_decl, this_wfl) ! tree super_decl, this_decl, this_wfl; { tree super_type = TREE_TYPE (super_decl); --- 7964,7970 ---- everything is OK. */ static int ! parser_check_super_interface (tree super_decl, tree this_decl, tree this_wfl) { tree super_type = TREE_TYPE (super_decl); *************** parser_check_super_interface (super_decl *** 8082,8092 **** } /* Makes sure that SUPER_DECL is suitable to extend THIS_DECL. Returns ! 0 if everthing is OK. */ static int ! parser_check_super (super_decl, this_decl, wfl) ! tree super_decl, this_decl, wfl; { tree super_type = TREE_TYPE (super_decl); --- 7995,8004 ---- } /* Makes sure that SUPER_DECL is suitable to extend THIS_DECL. Returns ! 0 if everything is OK. */ static int ! parser_check_super (tree super_decl, tree this_decl, tree wfl) { tree super_type = TREE_TYPE (super_decl); *************** parser_check_super (super_decl, this_dec *** 8124,8143 **** CTXP list of type dependency list. */ static void ! create_jdep_list (ctxp) ! struct parser_ctxt *ctxp; { ! jdeplist *new = (jdeplist *)xmalloc (sizeof (jdeplist)); new->first = new->last = NULL; new->next = ctxp->classd_list; ctxp->classd_list = new; } static jdeplist * ! reverse_jdep_list (ctxp) ! struct parser_ctxt *ctxp; { ! register jdeplist *prev = NULL, *current, *next; for (current = ctxp->classd_list; current; current = next) { next = current->next; --- 8036,8053 ---- CTXP list of type dependency list. */ static void ! create_jdep_list (struct parser_ctxt *ctxp) { ! jdeplist *new = xmalloc (sizeof (jdeplist)); new->first = new->last = NULL; new->next = ctxp->classd_list; ctxp->classd_list = new; } static jdeplist * ! reverse_jdep_list (struct parser_ctxt *ctxp) { ! jdeplist *prev = NULL, *current, *next; for (current = ctxp->classd_list; current; current = next) { next = current->next; *************** reverse_jdep_list (ctxp) *** 8152,8159 **** registered again. */ static tree ! obtain_incomplete_type (type_name) ! tree type_name; { tree ptr = NULL_TREE, name; --- 8062,8068 ---- registered again. */ static tree ! obtain_incomplete_type (tree type_name) { tree ptr = NULL_TREE, name; *************** obtain_incomplete_type (type_name) *** 8164,8170 **** --- 8073,8081 ---- else abort (); + /* Workaround from build_pointer_type for incomplete types. */ BUILD_PTR_FROM_NAME (ptr, name); + TYPE_MODE (ptr) = ptr_mode; layout_type (ptr); return ptr; *************** obtain_incomplete_type (type_name) *** 8176,8186 **** manner. */ static tree ! register_incomplete_type (kind, wfl, decl, ptr) ! int kind; ! tree wfl, decl, ptr; { ! jdep *new = (jdep *)xmalloc (sizeof (jdep)); if (!ptr && kind != JDEP_METHOD_END) /* JDEP_METHOD_END is a mere marker */ ptr = obtain_incomplete_type (wfl); --- 8087,8095 ---- manner. */ static tree ! register_incomplete_type (int kind, tree wfl, tree decl, tree ptr) { ! jdep *new = xmalloc (sizeof (jdep)); if (!ptr && kind != JDEP_METHOD_END) /* JDEP_METHOD_END is a mere marker */ ptr = obtain_incomplete_type (wfl); *************** register_incomplete_type (kind, wfl, dec *** 8217,8225 **** otherwise. */ static tree ! check_inner_circular_reference (source, target) ! tree source; ! tree target; { tree basetype_vec = TYPE_BINFO_BASETYPES (source); tree ctx, cl; --- 8126,8132 ---- otherwise. */ static tree ! check_inner_circular_reference (tree source, tree target) { tree basetype_vec = TYPE_BINFO_BASETYPES (source); tree ctx, cl; *************** check_inner_circular_reference (source, *** 8265,8272 **** otherwise. TYPE can be an interface or a class. */ static tree ! check_circular_reference (type) ! tree type; { tree basetype_vec = TYPE_BINFO_BASETYPES (type); int i; --- 8172,8178 ---- otherwise. TYPE can be an interface or a class. */ static tree ! check_circular_reference (tree type) { tree basetype_vec = TYPE_BINFO_BASETYPES (type); int i; *************** check_circular_reference (type) *** 8292,8298 **** } void ! java_check_circular_reference () { tree current; for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) --- 8198,8204 ---- } void ! java_check_circular_reference (void) { tree current; for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) *************** java_check_circular_reference () *** 8318,8327 **** finit$. */ static tree ! build_alias_initializer_parameter_list (mode, class_type, parm, artificial) ! int mode; ! tree class_type, parm; ! int *artificial; { tree field; tree additional_parms = NULL_TREE; --- 8224,8231 ---- finit$. */ static tree ! build_alias_initializer_parameter_list (int mode, tree class_type, tree parm, ! int *artificial) { tree field; tree additional_parms = NULL_TREE; *************** build_alias_initializer_parameter_list ( *** 8365,8371 **** break; case AIPL_FUNCTION_CTOR_INVOCATION: ! /* There are two case: the constructor invokation happends outside the local inner, in which case, locales from the outer context are directly used. --- 8269,8275 ---- break; case AIPL_FUNCTION_CTOR_INVOCATION: ! /* There are two case: the constructor invocation happens outside the local inner, in which case, locales from the outer context are directly used. *************** build_alias_initializer_parameter_list ( *** 8399,8406 **** enforced. This is the case for anonymous classes. */ static tree ! craft_constructor (class_decl, args) ! tree class_decl, args; { tree class_type = TREE_TYPE (class_decl); tree parm = NULL_TREE; --- 8303,8309 ---- enforced. This is the case for anonymous classes. */ static tree ! craft_constructor (tree class_decl, tree args) { tree class_type = TREE_TYPE (class_decl); tree parm = NULL_TREE; *************** craft_constructor (class_decl, args) *** 8447,8452 **** --- 8350,8356 ---- /* Now, mark the artificial parameters. */ DECL_FUNCTION_NAP (decl) = artificial; DECL_FUNCTION_SYNTHETIC_CTOR (decl) = DECL_CONSTRUCTOR_P (decl) = 1; + DECL_INLINE (decl) = 1; return decl; } *************** craft_constructor (class_decl, args) *** 8458,8464 **** compilation triggered this one to be simply loaded. */ void ! java_fix_constructors () { tree current; --- 8362,8368 ---- compilation triggered this one to be simply loaded. */ void ! java_fix_constructors (void) { tree current; *************** java_fix_constructors () *** 8471,8477 **** if (CLASS_INTERFACE (TYPE_NAME (class_type))) continue; ! current_class = class_type; for (decl = TYPE_METHODS (class_type); decl; decl = TREE_CHAIN (decl)) { if (DECL_CONSTRUCTOR_P (decl)) --- 8375,8381 ---- if (CLASS_INTERFACE (TYPE_NAME (class_type))) continue; ! output_class = current_class = class_type; for (decl = TYPE_METHODS (class_type); decl; decl = TREE_CHAIN (decl)) { if (DECL_CONSTRUCTOR_P (decl)) *************** java_fix_constructors () *** 8492,8514 **** about the class processed currently. */ void ! safe_layout_class (class) ! tree class; { tree save_current_class = current_class; ! const char *save_input_filename = input_filename; ! int save_lineno = lineno; layout_class (class); current_class = save_current_class; ! input_filename = save_input_filename; ! lineno = save_lineno; } static tree ! jdep_resolve_class (dep) ! jdep *dep; { tree decl; --- 8396,8414 ---- about the class processed currently. */ void ! safe_layout_class (tree class) { tree save_current_class = current_class; ! location_t save_location = input_location; layout_class (class); current_class = save_current_class; ! input_location = save_location; } static tree ! jdep_resolve_class (jdep *dep) { tree decl; *************** jdep_resolve_class (dep) *** 8519,8524 **** --- 8419,8428 ---- decl = resolve_class (JDEP_ENCLOSING (dep), JDEP_TO_RESOLVE (dep), JDEP_DECL (dep), JDEP_WFL (dep)); JDEP_RESOLVED (dep, decl); + /* If there is no WFL, that's ok. We generate this warning + elsewhere. */ + if (decl && JDEP_WFL (dep) != NULL_TREE) + check_deprecation (JDEP_WFL (dep), decl); } if (!decl) *************** jdep_resolve_class (dep) *** 8540,8546 **** /* Complete unsatisfied class declaration and their dependencies */ void ! java_complete_class () { tree cclass; jdeplist *cclassd; --- 8444,8450 ---- /* Complete unsatisfied class declaration and their dependencies */ void ! java_complete_class (void) { tree cclass; jdeplist *cclassd; *************** java_complete_class () *** 8688,8695 **** array. */ static tree ! resolve_class (enclosing, class_type, decl, cl) ! tree enclosing, class_type, decl, cl; { tree tname = TYPE_NAME (class_type); tree resolved_type = TREE_TYPE (class_type); --- 8592,8598 ---- array. */ static tree ! resolve_class (tree enclosing, tree class_type, tree decl, tree cl) { tree tname = TYPE_NAME (class_type); tree resolved_type = TREE_TYPE (class_type); *************** resolve_class (enclosing, class_type, de *** 8739,8746 **** and (but it doesn't really matter) qualify_and_find. */ tree ! do_resolve_class (enclosing, class_type, decl, cl) ! tree enclosing, class_type, decl, cl; { tree new_class_decl = NULL_TREE, super = NULL_TREE; tree saved_enclosing_type = enclosing ? TREE_TYPE (enclosing) : NULL_TREE; --- 8642,8648 ---- and (but it doesn't really matter) qualify_and_find. */ tree ! do_resolve_class (tree enclosing, tree class_type, tree decl, tree cl) { tree new_class_decl = NULL_TREE, super = NULL_TREE; tree saved_enclosing_type = enclosing ? TREE_TYPE (enclosing) : NULL_TREE; *************** do_resolve_class (enclosing, class_type, *** 8754,8767 **** class and then treat Id as a member type. If we can't find Q as a class then we fall through. */ tree q, left, left_type, right; ! breakdown_qualified (&left, &right, TYPE_NAME (class_type)); ! BUILD_PTR_FROM_NAME (left_type, left); ! q = do_resolve_class (enclosing, left_type, decl, cl); ! if (q) { ! enclosing = q; ! saved_enclosing_type = TREE_TYPE (q); ! BUILD_PTR_FROM_NAME (class_type, right); } } --- 8656,8671 ---- class and then treat Id as a member type. If we can't find Q as a class then we fall through. */ tree q, left, left_type, right; ! if (breakdown_qualified (&left, &right, TYPE_NAME (class_type)) == 0) { ! BUILD_PTR_FROM_NAME (left_type, left); ! q = do_resolve_class (enclosing, left_type, decl, cl); ! if (q) ! { ! enclosing = q; ! saved_enclosing_type = TREE_TYPE (q); ! BUILD_PTR_FROM_NAME (class_type, right); ! } } } *************** do_resolve_class (enclosing, class_type, *** 8893,8900 **** } static tree ! qualify_and_find (class_type, package, name) ! tree class_type, package, name; { tree new_qualified = merge_qualified_name (package, name); tree new_class_decl; --- 8797,8803 ---- } static tree ! qualify_and_find (tree class_type, tree package, tree name) { tree new_qualified = merge_qualified_name (package, name); tree new_class_decl; *************** qualify_and_find (class_type, package, n *** 8917,8925 **** called when type resolution is necessary during the walk pass. */ static tree ! resolve_and_layout (something, cl) ! tree something; ! tree cl; { tree decl, decl_type; --- 8820,8826 ---- called when type resolution is necessary during the walk pass. */ static tree ! resolve_and_layout (tree something, tree cl) { tree decl, decl_type; *************** resolve_and_layout (something, cl) *** 8980,8987 **** layout. The current parsing context is saved and restored */ static tree ! resolve_no_layout (name, cl) ! tree name, cl; { tree ptr, decl; BUILD_PTR_FROM_NAME (ptr, name); --- 8881,8887 ---- layout. The current parsing context is saved and restored */ static tree ! resolve_no_layout (tree name, tree cl) { tree ptr, decl; BUILD_PTR_FROM_NAME (ptr, name); *************** resolve_no_layout (name, cl) *** 8997,9004 **** use an identifier tree. */ static const char * ! purify_type_name (name) ! const char *name; { int len = strlen (name); int bracket_found; --- 8897,8903 ---- use an identifier tree. */ static const char * ! purify_type_name (const char *name) { int len = strlen (name); int bracket_found; *************** purify_type_name (name) *** 9016,9023 **** /* The type CURRENT refers to can't be found. We print error messages. */ static void ! complete_class_report_errors (dep) ! jdep *dep; { const char *name; --- 8915,8921 ---- /* The type CURRENT refers to can't be found. We print error messages. */ static void ! complete_class_report_errors (jdep *dep) { const char *name; *************** complete_class_report_errors (dep) *** 9083,9090 **** */ static const char * ! get_printable_method_name (decl) ! tree decl; { const char *to_return; tree name = NULL_TREE; --- 8981,8987 ---- */ static const char * ! get_printable_method_name (tree decl) { const char *to_return; tree name = NULL_TREE; *************** get_printable_method_name (decl) *** 9107,9114 **** function it's a FWL, so we can track errors more accurately.) */ static int ! check_method_redefinition (class, method) ! tree class, method; { tree redef, sig; --- 9004,9010 ---- function it's a FWL, so we can track errors more accurately.) */ static int ! check_method_redefinition (tree class, tree method) { tree redef, sig; *************** check_method_redefinition (class, method *** 9138,9146 **** /* Return 1 if check went ok, 0 otherwise. */ static int ! check_abstract_method_definitions (do_interface, class_decl, type) ! int do_interface; ! tree class_decl, type; { tree class = TREE_TYPE (class_decl); tree method, end_type; --- 9034,9041 ---- /* Return 1 if check went ok, 0 otherwise. */ static int ! check_abstract_method_definitions (int do_interface, tree class_decl, ! tree type) { tree class = TREE_TYPE (class_decl); tree method, end_type; *************** check_abstract_method_definitions (do_in *** 9234,9241 **** methods. */ static void ! java_check_abstract_method_definitions (class_decl) ! tree class_decl; { tree class = TREE_TYPE (class_decl); tree super, vector; --- 9129,9135 ---- methods. */ static void ! java_check_abstract_method_definitions (tree class_decl) { tree class = TREE_TYPE (class_decl); tree super, vector; *************** java_check_abstract_method_definitions ( *** 9265,9272 **** safe to build a method signature or not. */ static int ! check_method_types_complete (decl) ! tree decl; { tree type = TREE_TYPE (decl); tree args; --- 9159,9165 ---- safe to build a method signature or not. */ static int ! check_method_types_complete (tree decl) { tree type = TREE_TYPE (decl); tree args; *************** check_method_types_complete (decl) *** 9287,9294 **** /* Visible interface to check methods contained in CLASS_DECL */ void ! java_check_methods (class_decl) ! tree class_decl; { if (CLASS_METHOD_CHECKED_P (TREE_TYPE (class_decl))) return; --- 9180,9186 ---- /* Visible interface to check methods contained in CLASS_DECL */ void ! java_check_methods (tree class_decl) { if (CLASS_METHOD_CHECKED_P (TREE_TYPE (class_decl))) return; *************** java_check_methods (class_decl) *** 9301,9314 **** CLASS_METHOD_CHECKED_P (TREE_TYPE (class_decl)) = 1; } /* Check all the methods of CLASS_DECL. Methods are first completed then checked according to regular method existence rules. If no constructor for CLASS_DECL were encountered, then build its declaration. */ - static void ! java_check_regular_methods (class_decl) ! tree class_decl; { int saw_constructor = ANONYMOUS_CLASS_P (TREE_TYPE (class_decl)); tree method; --- 9193,9229 ---- CLASS_METHOD_CHECKED_P (TREE_TYPE (class_decl)) = 1; } + /* Like not_accessible_p, but doesn't refer to the current class at + all. */ + static bool + hack_is_accessible_p (tree member, tree from_where) + { + int flags = get_access_flags_from_decl (member); + + if (from_where == DECL_CONTEXT (member) + || (flags & ACC_PUBLIC)) + return true; + + if ((flags & ACC_PROTECTED)) + { + if (inherits_from_p (from_where, DECL_CONTEXT (member))) + return true; + } + + if ((flags & ACC_PRIVATE)) + return false; + + /* Package private, or protected. */ + return in_same_package (TYPE_NAME (from_where), + TYPE_NAME (DECL_CONTEXT (member))); + } + /* Check all the methods of CLASS_DECL. Methods are first completed then checked according to regular method existence rules. If no constructor for CLASS_DECL were encountered, then build its declaration. */ static void ! java_check_regular_methods (tree class_decl) { int saw_constructor = ANONYMOUS_CLASS_P (TREE_TYPE (class_decl)); tree method; *************** java_check_regular_methods (class_decl) *** 9356,9362 **** } sig = build_java_argument_signature (TREE_TYPE (method)); ! found = lookup_argument_method2 (class, DECL_NAME (method), sig); /* Inner class can't declare static methods */ if (METHOD_STATIC (method) && !TOPLEVEL_CLASS_DECL_P (class_decl)) --- 9271,9278 ---- } sig = build_java_argument_signature (TREE_TYPE (method)); ! found = lookup_argument_method_generic (class, DECL_NAME (method), sig, ! SEARCH_SUPER | SEARCH_INTERFACE); /* Inner class can't declare static methods */ if (METHOD_STATIC (method) && !TOPLEVEL_CLASS_DECL_P (class_decl)) *************** java_check_regular_methods (class_decl) *** 9415,9421 **** continue; parse_error_context (method_wfl, ! "%s methods can't be overriden. Method `%s' is %s in class `%s'", (METHOD_FINAL (found) ? "Final" : "Static"), lang_printable_name (found, 0), (METHOD_FINAL (found) ? "final" : "static"), --- 9331,9337 ---- continue; parse_error_context (method_wfl, ! "%s methods can't be overridden. Method `%s' is %s in class `%s'", (METHOD_FINAL (found) ? "Final" : "Static"), lang_printable_name (found, 0), (METHOD_FINAL (found) ? "final" : "static"), *************** java_check_regular_methods (class_decl) *** 9429,9435 **** { parse_error_context (method_wfl, ! "Instance methods can't be overriden by a static method. Method `%s' is an instance method in class `%s'", lang_printable_name (found, 0), IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); --- 9345,9351 ---- { parse_error_context (method_wfl, ! "Instance methods can't be overridden by a static method. Method `%s' is an instance method in class `%s'", lang_printable_name (found, 0), IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); *************** java_check_regular_methods (class_decl) *** 9438,9444 **** /* - Overriding/hiding public must be public - Overriding/hiding protected must be protected or public ! - If the overriden or hidden method has default (package) access, then the overriding or hiding method must not be private; otherwise, a compile-time error occurs. If `found' belongs to an interface, things have been already --- 9354,9360 ---- /* - Overriding/hiding public must be public - Overriding/hiding protected must be protected or public ! - If the overridden or hidden method has default (package) access, then the overriding or hiding method must not be private; otherwise, a compile-time error occurs. If `found' belongs to an interface, things have been already *************** java_check_regular_methods (class_decl) *** 9460,9472 **** continue; } ! /* Overriding methods must have compatible `throws' clauses on checked ! exceptions, if any */ ! check_throws_clauses (method, method_wfl, found); ! ! /* Inheriting multiple methods with the same signature. FIXME */ } if (!TYPE_NVIRTUALS (class)) TYPE_METHODS (class) = nreverse (TYPE_METHODS (class)); --- 9376,9395 ---- continue; } ! /* Check this method against all the other implementations it ! overrides. Here we only check the class hierarchy; the rest ! of the checking is done later. If this method is just a ! Miranda method, we can skip the check. */ ! if (! METHOD_INVISIBLE (method)) ! check_concrete_throws_clauses (class, method, DECL_NAME (method), sig); } + /* The above throws clause check only looked at superclasses. Now + we must also make sure that all methods declared in interfaces + have compatible throws clauses. FIXME: there are more efficient + ways to organize this checking; we should implement one. */ + check_interface_throws_clauses (class, class); + if (!TYPE_NVIRTUALS (class)) TYPE_METHODS (class) = nreverse (TYPE_METHODS (class)); *************** java_check_regular_methods (class_decl) *** 9478,9491 **** abort (); } ! /* Return a nonzero value if the `throws' clause of METHOD (if any) ! is incompatible with the `throws' clause of FOUND (if any). */ static void ! check_throws_clauses (method, method_wfl, found) ! tree method, method_wfl, found; { ! tree mthrows, fthrows; /* Can't check these things with class loaded from bytecode. FIXME */ if (!CLASS_FROM_SOURCE_P (DECL_CONTEXT (found))) --- 9401,9494 ---- abort (); } ! /* Check to make sure that all the methods in all the interfaces ! implemented by CLASS_DECL are compatible with the concrete ! implementations available in CHECK_CLASS_DECL. */ ! static void ! check_interface_throws_clauses (tree check_class_decl, tree class_decl) ! { ! for (; class_decl != NULL_TREE; class_decl = CLASSTYPE_SUPER (class_decl)) ! { ! tree bases; ! int iface_len; ! int i; ! ! if (! CLASS_LOADED_P (class_decl)) ! { ! if (CLASS_FROM_SOURCE_P (class_decl)) ! safe_layout_class (class_decl); ! else ! load_class (class_decl, 1); ! } ! ! bases = TYPE_BINFO_BASETYPES (class_decl); ! iface_len = TREE_VEC_LENGTH (bases) - 1; ! for (i = iface_len; i > 0; --i) ! { ! tree interface = BINFO_TYPE (TREE_VEC_ELT (bases, i)); ! tree iface_method; ! ! for (iface_method = TYPE_METHODS (interface); ! iface_method != NULL_TREE; ! iface_method = TREE_CHAIN (iface_method)) ! { ! tree sig, method; ! ! /* First look for a concrete method implemented or ! inherited by this class. No need to search ! interfaces here, since we're already looking through ! all of them. */ ! sig = build_java_argument_signature (TREE_TYPE (iface_method)); ! method ! = lookup_argument_method_generic (check_class_decl, ! DECL_NAME (iface_method), ! sig, SEARCH_VISIBLE); ! /* If we don't find an implementation, that is ok. Any ! potential errors from that are diagnosed elsewhere. ! Also, multiple inheritance with conflicting throws ! clauses is fine in the absence of a concrete ! implementation. */ ! if (method != NULL_TREE && !METHOD_ABSTRACT (method) ! && !METHOD_INVISIBLE (iface_method)) ! { ! tree method_wfl = DECL_FUNCTION_WFL (method); ! check_throws_clauses (method, method_wfl, iface_method); ! } ! } ! ! /* Now check superinterfaces. */ ! check_interface_throws_clauses (check_class_decl, interface); ! } ! } ! } + /* Check throws clauses of a method against the clauses of all the + methods it overrides. We do this by searching up the class + hierarchy, examining all matching accessible methods. */ static void ! check_concrete_throws_clauses (tree class, tree self_method, ! tree name, tree signature) { ! tree method = lookup_argument_method_generic (class, name, signature, ! SEARCH_SUPER | SEARCH_VISIBLE); ! while (method != NULL_TREE) ! { ! if (! METHOD_INVISIBLE (method) && hack_is_accessible_p (method, class)) ! check_throws_clauses (self_method, DECL_FUNCTION_WFL (self_method), ! method); ! ! method = lookup_argument_method_generic (DECL_CONTEXT (method), ! name, signature, ! SEARCH_SUPER | SEARCH_VISIBLE); ! } ! } ! ! /* Generate an error if the `throws' clause of METHOD (if any) is ! incompatible with the `throws' clause of FOUND (if any). */ ! static void ! check_throws_clauses (tree method, tree method_wfl, tree found) ! { ! tree mthrows; /* Can't check these things with class loaded from bytecode. FIXME */ if (!CLASS_FROM_SOURCE_P (DECL_CONTEXT (found))) *************** check_throws_clauses (method, method_wfl *** 9494,9524 **** for (mthrows = DECL_FUNCTION_THROWS (method); mthrows; mthrows = TREE_CHAIN (mthrows)) { /* We don't verify unchecked expressions */ if (IS_UNCHECKED_EXCEPTION_P (TREE_VALUE (mthrows))) continue; /* Checked expression must be compatible */ for (fthrows = DECL_FUNCTION_THROWS (found); fthrows; fthrows = TREE_CHAIN (fthrows)) ! if (inherits_from_p (TREE_VALUE (mthrows), TREE_VALUE (fthrows))) ! break; if (!fthrows) { parse_error_context ! (method_wfl, "Invalid checked exception class `%s' in `throws' clause. The exception must be a subclass of an exception thrown by `%s' from class `%s'", IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (TREE_VALUE (mthrows)))), lang_printable_name (found, 0), IDENTIFIER_POINTER ! (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); } } } /* Check abstract method of interface INTERFACE */ - static void ! java_check_abstract_methods (interface_decl) ! tree interface_decl; { int i, n; tree method, basetype_vec, found; --- 9497,9529 ---- for (mthrows = DECL_FUNCTION_THROWS (method); mthrows; mthrows = TREE_CHAIN (mthrows)) { + tree fthrows; + /* We don't verify unchecked expressions */ if (IS_UNCHECKED_EXCEPTION_P (TREE_VALUE (mthrows))) continue; /* Checked expression must be compatible */ for (fthrows = DECL_FUNCTION_THROWS (found); fthrows; fthrows = TREE_CHAIN (fthrows)) ! { ! if (inherits_from_p (TREE_VALUE (mthrows), TREE_VALUE (fthrows))) ! break; ! } if (!fthrows) { parse_error_context ! (method_wfl, "Invalid checked exception class `%s' in `throws' clause. The exception must be a subclass of an exception thrown by `%s' from class `%s'", IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (TREE_VALUE (mthrows)))), lang_printable_name (found, 0), IDENTIFIER_POINTER ! (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); } } } /* Check abstract method of interface INTERFACE */ static void ! java_check_abstract_methods (tree interface_decl) { int i, n; tree method, basetype_vec, found; *************** java_check_abstract_methods (interface_d *** 9530,9537 **** if (check_method_redefinition (interface, method)) continue; ! /* 3- Overriding is OK as far as we preserve the return type and ! the thrown exceptions (FIXME) */ found = lookup_java_interface_method2 (interface, method); if (found) { --- 9535,9541 ---- if (check_method_redefinition (interface, method)) continue; ! /* 3- Overriding is OK as far as we preserve the return type. */ found = lookup_java_interface_method2 (interface, method); if (found) { *************** java_check_abstract_methods (interface_d *** 9586,9593 **** signature. Return a matching method only if their types differ. */ static tree ! lookup_java_interface_method2 (class, method_decl) ! tree class, method_decl; { int i, n; tree basetype_vec = TYPE_BINFO_BASETYPES (class), to_return; --- 9590,9596 ---- signature. Return a matching method only if their types differ. */ static tree ! lookup_java_interface_method2 (tree class, tree method_decl) { int i, n; tree basetype_vec = TYPE_BINFO_BASETYPES (class), to_return; *************** lookup_java_interface_method2 (class, me *** 9619,9627 **** matching method only if their types differ. */ static tree ! lookup_java_method2 (clas, method_decl, do_interface) ! tree clas, method_decl; ! int do_interface; { tree method, method_signature, method_name, method_type, name; --- 9622,9628 ---- matching method only if their types differ. */ static tree ! lookup_java_method2 (tree clas, tree method_decl, int do_interface) { tree method, method_signature, method_name, method_type, name; *************** lookup_java_method2 (clas, method_decl, *** 9654,9661 **** static GTY(()) tree cl_v; static tree ! lookup_cl (decl) ! tree decl; { char *line, *found; --- 9655,9661 ---- static GTY(()) tree cl_v; static tree ! lookup_cl (tree decl) { char *line, *found; *************** lookup_cl (decl) *** 9668,9674 **** } EXPR_WFL_FILENAME_NODE (cl_v) = get_identifier (DECL_SOURCE_FILE (decl)); ! EXPR_WFL_SET_LINECOL (cl_v, DECL_SOURCE_LINE_FIRST (decl), -1); line = java_get_line_col (EXPR_WFL_FILENAME (cl_v), EXPR_WFL_LINENO (cl_v), EXPR_WFL_COLNO (cl_v)); --- 9668,9674 ---- } EXPR_WFL_FILENAME_NODE (cl_v) = get_identifier (DECL_SOURCE_FILE (decl)); ! EXPR_WFL_SET_LINECOL (cl_v, DECL_SOURCE_LINE (decl), -1); line = java_get_line_col (EXPR_WFL_FILENAME (cl_v), EXPR_WFL_LINENO (cl_v), EXPR_WFL_COLNO (cl_v)); *************** lookup_cl (decl) *** 9684,9691 **** /* Look for a simple name in the single-type import list */ static tree ! find_name_in_single_imports (name) ! tree name; { tree node; --- 9684,9690 ---- /* Look for a simple name in the single-type import list */ static tree ! find_name_in_single_imports (tree name) { tree node; *************** find_name_in_single_imports (name) *** 9699,9705 **** /* Process all single-type import. */ static int ! process_imports () { tree import; int error_found; --- 9698,9704 ---- /* Process all single-type import. */ static int ! process_imports (void) { tree import; int error_found; *************** process_imports () *** 9709,9718 **** tree to_be_found = EXPR_WFL_NODE (TREE_PURPOSE (import)); char *original_name; ! obstack_grow0 (&temporary_obstack, ! IDENTIFIER_POINTER (to_be_found), ! IDENTIFIER_LENGTH (to_be_found)); ! original_name = obstack_finish (&temporary_obstack); /* Don't load twice something already defined. */ if (IDENTIFIER_CLASS_VALUE (to_be_found)) --- 9708,9716 ---- tree to_be_found = EXPR_WFL_NODE (TREE_PURPOSE (import)); char *original_name; ! original_name = xmemdup (IDENTIFIER_POINTER (to_be_found), ! IDENTIFIER_LENGTH (to_be_found), ! IDENTIFIER_LENGTH (to_be_found) + 1); /* Don't load twice something already defined. */ if (IDENTIFIER_CLASS_VALUE (to_be_found)) *************** process_imports () *** 9729,9735 **** /* We found it, we can bail out */ if (IDENTIFIER_CLASS_VALUE (to_be_found)) ! break; /* We haven't found it. Maybe we're trying to access an inner class. The only way for us to know is to try again --- 9727,9737 ---- /* We found it, we can bail out */ if (IDENTIFIER_CLASS_VALUE (to_be_found)) ! { ! check_deprecation (TREE_PURPOSE (import), ! IDENTIFIER_CLASS_VALUE (to_be_found)); ! break; ! } /* We haven't found it. Maybe we're trying to access an inner class. The only way for us to know is to try again *************** process_imports () *** 9748,9754 **** error_found = 1; } ! obstack_free (&temporary_obstack, original_name); if (error_found) return 1; } --- 9750,9756 ---- error_found = 1; } ! free (original_name); if (error_found) return 1; } *************** process_imports () *** 9759,9767 **** statement. */ static void ! find_in_imports (enclosing_type, class_type) ! tree enclosing_type; ! tree class_type; { tree import = (enclosing_type ? TYPE_IMPORT_LIST (enclosing_type) : ctxp->import_list); --- 9761,9767 ---- statement. */ static void ! find_in_imports (tree enclosing_type, tree class_type) { tree import = (enclosing_type ? TYPE_IMPORT_LIST (enclosing_type) : ctxp->import_list); *************** find_in_imports (enclosing_type, class_t *** 9778,9786 **** } static int ! note_possible_classname (name, len) ! const char *name; ! int len; { tree node; if (len > 5 && strncmp (&name [len-5], ".java", 5) == 0) --- 9778,9784 ---- } static int ! note_possible_classname (const char *name, int len) { tree node; if (len > 5 && strncmp (&name [len-5], ".java", 5) == 0) *************** note_possible_classname (name, len) *** 9800,9807 **** directory. */ static void ! read_import_dir (wfl) ! tree wfl; { tree package_id = EXPR_WFL_NODE (wfl); const char *package_name = IDENTIFIER_POINTER (package_id); --- 9798,9804 ---- directory. */ static void ! read_import_dir (tree wfl) { tree package_id = EXPR_WFL_NODE (wfl); const char *package_name = IDENTIFIER_POINTER (package_id); *************** read_import_dir (wfl) *** 9922,9930 **** entire list, to detected potential double definitions. */ static int ! find_in_imports_on_demand (enclosing_type, class_type) ! tree enclosing_type; ! tree class_type; { tree class_type_name = TYPE_NAME (class_type); tree import = (enclosing_type ? TYPE_IMPORT_DEMAND_LIST (enclosing_type) : --- 9919,9925 ---- entire list, to detected potential double definitions. */ static int ! find_in_imports_on_demand (tree enclosing_type, tree class_type) { tree class_type_name = TYPE_NAME (class_type); tree import = (enclosing_type ? TYPE_IMPORT_DEMAND_LIST (enclosing_type) : *************** find_in_imports_on_demand (enclosing_typ *** 9936,9942 **** for (; import; import = TREE_CHAIN (import)) { ! int saved_lineno = lineno; int access_check; const char *id_name; tree decl, type_name_copy; --- 9931,9937 ---- for (; import; import = TREE_CHAIN (import)) { ! int saved_lineno = input_line; int access_check; const char *id_name; tree decl, type_name_copy; *************** find_in_imports_on_demand (enclosing_typ *** 9955,9961 **** /* Setup lineno so that it refers to the line of the import (in case we parse a class file and encounter errors */ ! lineno = EXPR_WFL_LINENO (TREE_PURPOSE (import)); type_name_copy = TYPE_NAME (class_type); TYPE_NAME (class_type) = node; --- 9950,9956 ---- /* Setup lineno so that it refers to the line of the import (in case we parse a class file and encounter errors */ ! input_line = EXPR_WFL_LINENO (TREE_PURPOSE (import)); type_name_copy = TYPE_NAME (class_type); TYPE_NAME (class_type) = node; *************** find_in_imports_on_demand (enclosing_typ *** 9977,9983 **** /* 6.6.1: Inner classes are subject to member access rules. */ access_check = 0; ! lineno = saved_lineno; /* If the loaded class is not accessible or couldn't be loaded, we restore the original TYPE_NAME and process the next --- 9972,9978 ---- /* 6.6.1: Inner classes are subject to member access rules. */ access_check = 0; ! input_line = saved_lineno; /* If the loaded class is not accessible or couldn't be loaded, we restore the original TYPE_NAME and process the next *************** find_in_imports_on_demand (enclosing_typ *** 10024,10034 **** particular package is added only once. */ static void ! register_package (name) ! tree name; { static htab_t pht; ! PTR *e; if (pht == NULL) pht = htab_create (50, htab_hash_pointer, htab_eq_pointer, NULL); --- 10019,10028 ---- particular package is added only once. */ static void ! register_package (tree name) { static htab_t pht; ! void **e; if (pht == NULL) pht = htab_create (50, htab_hash_pointer, htab_eq_pointer, NULL); *************** register_package (name) *** 10042,10049 **** } static tree ! resolve_package (pkg, next, type_name) ! tree pkg, *next, *type_name; { tree current; tree decl = NULL_TREE; --- 10036,10042 ---- } static tree ! resolve_package (tree pkg, tree *next, tree *type_name) { tree current; tree decl = NULL_TREE; *************** resolve_package (pkg, next, type_name) *** 10084,10091 **** access is being attempted. */ static void ! check_inner_class_access (decl, enclosing_decl, cl) ! tree decl, enclosing_decl, cl; { const char *access; tree enclosing_decl_type; --- 10077,10083 ---- access is being attempted. */ static void ! check_inner_class_access (tree decl, tree enclosing_decl, tree cl) { const char *access; tree enclosing_decl_type; *************** check_inner_class_access (decl, enclosin *** 10164,10173 **** was found, it is reported and accounted for. */ static int ! check_pkg_class_access (class_name, cl, verbose) ! tree class_name; ! tree cl; ! bool verbose; { tree type; --- 10156,10162 ---- was found, it is reported and accounted for. */ static int ! check_pkg_class_access (tree class_name, tree cl, bool verbose) { tree type; *************** check_pkg_class_access (class_name, cl, *** 10203,10212 **** /* Local variable declaration. */ static void ! declare_local_variables (modifier, type, vlist) ! int modifier; ! tree type; ! tree vlist; { tree decl, current, saved_type; tree type_wfl = NULL_TREE; --- 10192,10198 ---- /* Local variable declaration. */ static void ! declare_local_variables (int modifier, tree type, tree vlist) { tree decl, current, saved_type; tree type_wfl = NULL_TREE; *************** declare_local_variables (modifier, type, *** 10314,10321 **** /* Called during parsing. Build decls from argument list. */ static void ! source_start_java_method (fndecl) ! tree fndecl; { tree tem; tree parm_decl; --- 10300,10306 ---- /* Called during parsing. Build decls from argument list. */ static void ! source_start_java_method (tree fndecl) { tree tem; tree parm_decl; *************** source_start_java_method (fndecl) *** 10370,10384 **** /* Called during parsing. Creates an artificial method declaration. */ static tree ! create_artificial_method (class, flags, type, name, args) ! tree class; ! int flags; ! tree type, name, args; { tree mdecl; java_parser_context_save_global (); ! lineno = 0; mdecl = make_node (FUNCTION_TYPE); TREE_TYPE (mdecl) = type; TYPE_ARG_TYPES (mdecl) = args; --- 10355,10367 ---- /* Called during parsing. Creates an artificial method declaration. */ static tree ! create_artificial_method (tree class, int flags, tree type, ! tree name, tree args) { tree mdecl; java_parser_context_save_global (); ! input_line = 0; mdecl = make_node (FUNCTION_TYPE); TREE_TYPE (mdecl) = type; TYPE_ARG_TYPES (mdecl) = args; *************** create_artificial_method (class, flags, *** 10391,10408 **** /* Starts the body if an artificial method. */ static void ! start_artificial_method_body (mdecl) ! tree mdecl; { DECL_SOURCE_LINE (mdecl) = 1; ! DECL_SOURCE_LINE_MERGE (mdecl, 1); source_start_java_method (mdecl); enter_block (); } static void ! end_artificial_method_body (mdecl) ! tree mdecl; { /* exit_block modifies DECL_FUNCTION_BODY (current_function_decl). It has to be evaluated first. (if mdecl is current_function_decl, --- 10374,10389 ---- /* Starts the body if an artificial method. */ static void ! start_artificial_method_body (tree mdecl) { DECL_SOURCE_LINE (mdecl) = 1; ! DECL_FUNCTION_LAST_LINE (mdecl) = 1; source_start_java_method (mdecl); enter_block (); } static void ! end_artificial_method_body (tree mdecl) { /* exit_block modifies DECL_FUNCTION_BODY (current_function_decl). It has to be evaluated first. (if mdecl is current_function_decl, *************** end_artificial_method_body (mdecl) *** 10415,10423 **** /* Dump a tree of some kind. This is a convenience wrapper for the dump_* functions in tree-dump.c. */ static void ! dump_java_tree (phase, t) ! enum tree_dump_index phase; ! tree t; { FILE *stream; int flags; --- 10396,10402 ---- /* Dump a tree of some kind. This is a convenience wrapper for the dump_* functions in tree-dump.c. */ static void ! dump_java_tree (enum tree_dump_index phase, tree t) { FILE *stream; int flags; *************** dump_java_tree (phase, t) *** 10434,10440 **** /* Terminate a function and expand its body. */ static void ! source_end_java_method () { tree fndecl = current_function_decl; --- 10413,10419 ---- /* Terminate a function and expand its body. */ static void ! source_end_java_method (void) { tree fndecl = current_function_decl; *************** source_end_java_method () *** 10442,10448 **** return; java_parser_context_save_global (); ! lineno = ctxp->last_ccb_indent1; /* Turn function bodies with only a NOP expr null, so they don't get generated at all and we won't get warnings when using the -W --- 10421,10427 ---- return; java_parser_context_save_global (); ! input_line = ctxp->last_ccb_indent1; /* Turn function bodies with only a NOP expr null, so they don't get generated at all and we won't get warnings when using the -W *************** source_end_java_method () *** 10454,10483 **** patched. Dump it to a file if the user requested it. */ dump_java_tree (TDI_original, fndecl); ! java_optimize_inline (fndecl); ! ! /* Generate function's code */ ! if (BLOCK_EXPR_BODY (DECL_FUNCTION_BODY (fndecl)) ! && ! flag_emit_class_files ! && ! flag_emit_xref) ! expand_expr_stmt (BLOCK_EXPR_BODY (DECL_FUNCTION_BODY (fndecl))); ! ! /* pop out of its parameters */ ! pushdecl_force_head (DECL_ARGUMENTS (fndecl)); ! poplevel (1, 0, 1); ! BLOCK_SUPERCONTEXT (DECL_INITIAL (fndecl)) = fndecl; ! ! /* Generate rtl for function exit. */ ! if (! flag_emit_class_files && ! flag_emit_xref) ! { ! lineno = DECL_SOURCE_LINE_LAST (fndecl); ! expand_function_end (input_filename, lineno, 0); ! ! DECL_SOURCE_LINE (fndecl) = DECL_SOURCE_LINE_FIRST (fndecl); ! ! /* Run the optimizers and output assembler code for this function. */ ! rest_of_compilation (fndecl); ! } current_function_decl = NULL_TREE; java_parser_context_restore_global (); --- 10433,10441 ---- patched. Dump it to a file if the user requested it. */ dump_java_tree (TDI_original, fndecl); ! /* Defer expanding the method until cgraph analysis is complete. */ ! if (DECL_SAVED_TREE (fndecl)) ! cgraph_finalize_function (fndecl, false); current_function_decl = NULL_TREE; java_parser_context_restore_global (); *************** source_end_java_method () *** 10487,10494 **** expression second operand if necessary. */ tree ! java_method_add_stmt (fndecl, expr) ! tree fndecl, expr; { if (!GET_CURRENT_BLOCK (fndecl)) return NULL_TREE; --- 10445,10451 ---- expression second operand if necessary. */ tree ! java_method_add_stmt (tree fndecl, tree expr) { if (!GET_CURRENT_BLOCK (fndecl)) return NULL_TREE; *************** java_method_add_stmt (fndecl, expr) *** 10496,10503 **** } static tree ! add_stmt_to_block (b, type, stmt) ! tree b, type, stmt; { tree body = BLOCK_EXPR_BODY (b), c; --- 10453,10459 ---- } static tree ! add_stmt_to_block (tree b, tree type, tree stmt) { tree body = BLOCK_EXPR_BODY (b), c; *************** add_stmt_to_block (b, type, stmt) *** 10516,10535 **** COMPOUND_EXPR and add STMT to it. */ static tree ! add_stmt_to_compound (existing, type, stmt) ! tree existing, type, stmt; { - /* Keep track of this for inlining. */ - if (current_function_decl) - ++DECL_NUM_STMTS (current_function_decl); - if (existing) return build (COMPOUND_EXPR, type, existing, stmt); else return stmt; } ! void java_layout_seen_class_methods () { tree previous_list = all_class_list; tree end = NULL_TREE; --- 10472,10486 ---- COMPOUND_EXPR and add STMT to it. */ static tree ! add_stmt_to_compound (tree existing, tree type, tree stmt) { if (existing) return build (COMPOUND_EXPR, type, existing, stmt); else return stmt; } ! void java_layout_seen_class_methods (void) { tree previous_list = all_class_list; tree end = NULL_TREE; *************** void java_layout_seen_class_methods () *** 10553,10565 **** static GTY(()) tree stop_reordering; void ! java_reorder_fields () { tree current; for (current = gclass_list; current; current = TREE_CHAIN (current)) { ! current_class = TREE_TYPE (TREE_VALUE (current)); if (current_class == stop_reordering) break; --- 10504,10516 ---- static GTY(()) tree stop_reordering; void ! java_reorder_fields (void) { tree current; for (current = gclass_list; current; current = TREE_CHAIN (current)) { ! output_class = current_class = TREE_TYPE (TREE_VALUE (current)); if (current_class == stop_reordering) break; *************** java_reorder_fields () *** 10598,10604 **** classes */ void ! java_layout_classes () { tree current; int save_error_count = java_error_count; --- 10549,10555 ---- classes */ void ! java_layout_classes (void) { tree current; int save_error_count = java_error_count; *************** java_layout_classes () *** 10616,10622 **** for (current = gclass_list; current; current = TREE_CHAIN (current)) { ! current_class = TREE_TYPE (TREE_VALUE (current)); layout_class (current_class); /* Error reported by the caller */ --- 10567,10573 ---- for (current = gclass_list; current; current = TREE_CHAIN (current)) { ! output_class = current_class = TREE_TYPE (TREE_VALUE (current)); layout_class (current_class); /* Error reported by the caller */ *************** java_layout_classes () *** 10631,10641 **** java_parse_abort_on_error (); } ! /* Expand methods in the current set of classes rememebered for generation. */ static void ! java_complete_expand_classes () { tree current; --- 10582,10592 ---- java_parse_abort_on_error (); } ! /* Expand methods in the current set of classes remembered for generation. */ static void ! java_complete_expand_classes (void) { tree current; *************** java_complete_expand_classes () *** 10650,10657 **** classes, if any. */ static void ! java_complete_expand_class (outer) ! tree outer; { tree inner_list; --- 10601,10607 ---- classes, if any. */ static void ! java_complete_expand_class (tree outer) { tree inner_list; *************** java_complete_expand_class (outer) *** 10677,10691 **** constructors and then . */ static void ! java_complete_expand_methods (class_decl) ! tree class_decl; { tree clinit, decl, first_decl; ! current_class = TREE_TYPE (class_decl); ! ! /* Initialize a new constant pool */ ! init_outgoing_cpool (); /* Pre-expand to figure whether we really need it or not. If we do need it, we pre-expand the static fields so they're --- 10627,10637 ---- constructors and then . */ static void ! java_complete_expand_methods (tree class_decl) { tree clinit, decl, first_decl; ! output_class = current_class = TREE_TYPE (class_decl); /* Pre-expand to figure whether we really need it or not. If we do need it, we pre-expand the static fields so they're *************** java_complete_expand_methods (class_decl *** 10770,10786 **** if (DECL_CONSTRUCTOR_P (decl) && verify_constructor_circularity (decl, decl)) break; - - /* Save the constant pool. We'll need to restore it later. */ - TYPE_CPOOL (current_class) = outgoing_cpool; } /* Attempt to create . Pre-expand static fields so they can be safely used in some other methods/constructors. */ static tree ! maybe_generate_pre_expand_clinit (class_type) ! tree class_type; { tree current, mdecl; --- 10716,10728 ---- if (DECL_CONSTRUCTOR_P (decl) && verify_constructor_circularity (decl, decl)) break; } /* Attempt to create . Pre-expand static fields so they can be safely used in some other methods/constructors. */ static tree ! maybe_generate_pre_expand_clinit (tree class_type) { tree current, mdecl; *************** maybe_generate_pre_expand_clinit (class_ *** 10839,10846 **** MODIFY_EXPR with a constant value. */ static int ! analyze_clinit_body (this_class, bbody) ! tree this_class, bbody; { while (bbody) switch (TREE_CODE (bbody)) --- 10781,10787 ---- MODIFY_EXPR with a constant value. */ static int ! analyze_clinit_body (tree this_class, tree bbody) { while (bbody) switch (TREE_CODE (bbody)) *************** analyze_clinit_body (this_class, bbody) *** 10888,10895 **** is empty. Return 1 if was discarded, 0 otherwise. */ static int ! maybe_yank_clinit (mdecl) ! tree mdecl; { tree type, current; tree fbody, bbody; --- 10829,10835 ---- is empty. Return 1 if was discarded, 0 otherwise. */ static int ! maybe_yank_clinit (tree mdecl) { tree type, current; tree fbody, bbody; *************** maybe_yank_clinit (mdecl) *** 10961,10969 **** /* Install the argument from MDECL. Suitable to completion and expansion of mdecl's body. */ ! static void ! start_complete_expand_method (mdecl) ! tree mdecl; { tree tem; --- 10901,10908 ---- /* Install the argument from MDECL. Suitable to completion and expansion of mdecl's body. */ ! void ! start_complete_expand_method (tree mdecl) { tree tem; *************** start_complete_expand_method (mdecl) *** 10988,10994 **** TREE_CHAIN (tem) = next; } pushdecl_force_head (DECL_ARGUMENTS (mdecl)); ! lineno = DECL_SOURCE_LINE_FIRST (mdecl); build_result_decl (mdecl); } --- 10927,10933 ---- TREE_CHAIN (tem) = next; } pushdecl_force_head (DECL_ARGUMENTS (mdecl)); ! input_line = DECL_SOURCE_LINE (mdecl); build_result_decl (mdecl); } *************** start_complete_expand_method (mdecl) *** 10996,11003 **** /* Complete and expand a method. */ static void ! java_complete_expand_method (mdecl) ! tree mdecl; { tree fbody, block_body, exception_copy; --- 10935,10941 ---- /* Complete and expand a method. */ static void ! java_complete_expand_method (tree mdecl) { tree fbody, block_body, exception_copy; *************** java_complete_expand_method (mdecl) *** 11101,11122 **** /* For with each class for which there's code to generate. */ static void ! java_expand_method_bodies (class) ! tree class; { tree decl; for (decl = TYPE_METHODS (class); decl; decl = TREE_CHAIN (decl)) { ! if (!DECL_FUNCTION_BODY (decl)) continue; current_function_decl = decl; ! /* Save the function for inlining. */ ! if (flag_inline_trees) ! DECL_SAVED_TREE (decl) = ! BLOCK_EXPR_BODY (DECL_FUNCTION_BODY (decl)); ! /* It's time to assign the variable flagging static class initialization based on which classes invoked static methods are definitely initializing. This should be flagged. */ --- 11039,11070 ---- /* For with each class for which there's code to generate. */ static void ! java_expand_method_bodies (tree class) { tree decl; for (decl = TYPE_METHODS (class); decl; decl = TREE_CHAIN (decl)) { ! tree block; ! tree body; ! ! if (! DECL_FUNCTION_BODY (decl)) continue; current_function_decl = decl; ! block = BLOCK_EXPR_BODY (DECL_FUNCTION_BODY (decl)); ! ! if (TREE_CODE (block) != BLOCK) ! abort (); ! ! /* Save the function body for inlining. */ ! DECL_SAVED_TREE (decl) = block; ! ! body = BLOCK_EXPR_BODY (block); ! ! if (TREE_TYPE (body) == NULL_TREE) ! abort (); ! /* It's time to assign the variable flagging static class initialization based on which classes invoked static methods are definitely initializing. This should be flagged. */ *************** java_expand_method_bodies (class) *** 11148,11162 **** } } ! /* Prepare the function for RTL expansion */ ! start_complete_expand_method (decl); ! /* Expand function start, generate initialization flag ! assignment, and handle synchronized methods. */ ! complete_start_java_method (decl); ! /* Expand the rest of the function body and terminate ! expansion. */ source_end_java_method (); } } --- 11096,11136 ---- } } ! /* Prepend class initialization to static methods. */ ! if (METHOD_STATIC (decl) && ! METHOD_PRIVATE (decl) ! && ! flag_emit_class_files ! && ! DECL_CLINIT_P (decl) ! && ! CLASS_INTERFACE (TYPE_NAME (class))) ! { ! tree init = build (CALL_EXPR, void_type_node, ! build_address_of (soft_initclass_node), ! build_tree_list (NULL_TREE, ! build_class_ref (class)), ! NULL_TREE); ! TREE_SIDE_EFFECTS (init) = 1; ! body = build (COMPOUND_EXPR, TREE_TYPE (body), init, body); ! BLOCK_EXPR_BODY (block) = body; ! } ! /* Wrap synchronized method bodies in a monitorenter ! plus monitorexit cleanup. */ ! if (METHOD_SYNCHRONIZED (decl) && ! flag_emit_class_files) ! { ! tree enter, exit, lock; ! if (METHOD_STATIC (decl)) ! lock = build_class_ref (class); ! else ! lock = DECL_ARGUMENTS (decl); ! BUILD_MONITOR_ENTER (enter, lock); ! BUILD_MONITOR_EXIT (exit, lock); ! body = build (COMPOUND_EXPR, void_type_node, ! enter, ! build (TRY_FINALLY_EXPR, void_type_node, body, exit)); ! BLOCK_EXPR_BODY (block) = body; ! } ! ! /* Expand the the function body. */ source_end_java_method (); } } *************** java_expand_method_bodies (class) *** 11174,11181 **** be later turned into a write by calling outer_field_access_fix. */ static tree ! build_outer_field_access (id, decl) ! tree id, decl; { tree access = NULL_TREE; tree ctx = TREE_TYPE (DECL_CONTEXT (TYPE_NAME (current_class))); --- 11148,11154 ---- be later turned into a write by calling outer_field_access_fix. */ static tree ! build_outer_field_access (tree id, tree decl) { tree access = NULL_TREE; tree ctx = TREE_TYPE (DECL_CONTEXT (TYPE_NAME (current_class))); *************** build_outer_field_access (id, decl) *** 11224,11231 **** access. */ static int ! outer_field_access_p (type, decl) ! tree type, decl; { if (!INNER_CLASS_TYPE_P (type) || TREE_CODE (decl) != FIELD_DECL --- 11197,11203 ---- access. */ static int ! outer_field_access_p (tree type, tree decl) { if (!INNER_CLASS_TYPE_P (type) || TREE_CODE (decl) != FIELD_DECL *************** outer_field_access_p (type, decl) *** 11233,11239 **** return 0; /* If the inner class extends the declaration context of the field ! we're try to acces, then this isn't an outer field access */ if (inherits_from_p (type, DECL_CONTEXT (decl))) return 0; --- 11205,11211 ---- return 0; /* If the inner class extends the declaration context of the field ! we're trying to access, then this isn't an outer field access */ if (inherits_from_p (type, DECL_CONTEXT (decl))) return 0; *************** outer_field_access_p (type, decl) *** 11263,11270 **** call if necessary. */ static int ! outer_field_expanded_access_p (node, name, arg_type, arg) ! tree node, *name, *arg_type, *arg; { int identified = 0; --- 11235,11242 ---- call if necessary. */ static int ! outer_field_expanded_access_p (tree node, tree *name, tree *arg_type, ! tree *arg) { int identified = 0; *************** outer_field_expanded_access_p (node, nam *** 11310,11317 **** be identified. */ static tree ! outer_field_access_fix (wfl, node, rhs) ! tree wfl, node, rhs; { tree name, arg_type, arg; --- 11282,11288 ---- be identified. */ static tree ! outer_field_access_fix (tree wfl, tree node, tree rhs) { tree name, arg_type, arg; *************** outer_field_access_fix (wfl, node, rhs) *** 11331,11339 **** read access. */ static tree ! build_outer_field_access_expr (lc, type, access_method_name, arg1, arg2) ! int lc; ! tree type, access_method_name, arg1, arg2; { tree args, cn, access; --- 11302,11309 ---- read access. */ static tree ! build_outer_field_access_expr (int lc, tree type, tree access_method_name, ! tree arg1, tree arg2) { tree args, cn, access; *************** build_outer_field_access_expr (lc, type, *** 11350,11356 **** } static tree ! build_new_access_id () { static int access_n_counter = 1; char buffer [128]; --- 11320,11326 ---- } static tree ! build_new_access_id (void) { static int access_n_counter = 1; char buffer [128]; *************** build_new_access_id () *** 11374,11381 **** */ static tree ! build_outer_field_access_methods (decl) ! tree decl; { tree id, args, stmt, mdecl; --- 11344,11350 ---- */ static tree ! build_outer_field_access_methods (tree decl) { tree id, args, stmt, mdecl; *************** build_outer_field_access_methods (decl) *** 11425,11432 **** /* Build an field access method NAME. */ static tree ! build_outer_field_access_method (class, type, name, args, body) ! tree class, type, name, args, body; { tree saved_current_function_decl, mdecl; --- 11394,11401 ---- /* Build an field access method NAME. */ static tree ! build_outer_field_access_method (tree class, tree type, tree name, ! tree args, tree body) { tree saved_current_function_decl, mdecl; *************** build_outer_field_access_method (class, *** 11450,11457 **** certain kinds of method invocation from inner classes. */ static tree ! build_outer_method_access_method (decl) ! tree decl; { tree saved_current_function_decl, mdecl; tree args = NULL_TREE, call_args = NULL_TREE; --- 11419,11425 ---- certain kinds of method invocation from inner classes. */ static tree ! build_outer_method_access_method (tree decl) { tree saved_current_function_decl, mdecl; tree args = NULL_TREE, call_args = NULL_TREE; *************** build_outer_method_access_method (decl) *** 11491,11497 **** /* There is a potential bug here. We should be able to use fix_method_argument_names, but then arg names get mixed up and eventually a constructor will have its this$0 altered and the ! outer context won't be assignment properly. The test case is stub.java FIXME */ TYPE_ARG_TYPES (TREE_TYPE (mdecl)) = args; --- 11459,11465 ---- /* There is a potential bug here. We should be able to use fix_method_argument_names, but then arg names get mixed up and eventually a constructor will have its this$0 altered and the ! outer context won't be assignment properly. The testcase is stub.java FIXME */ TYPE_ARG_TYPES (TREE_TYPE (mdecl)) = args; *************** build_outer_method_access_method (decl) *** 11540,11548 **** for example build_outer_field_access). */ static tree ! build_access_to_thisn (from, to, lc) ! tree from, to; ! int lc; { tree access = NULL_TREE; --- 11508,11514 ---- for example build_outer_field_access). */ static tree ! build_access_to_thisn (tree from, tree to, int lc) { tree access = NULL_TREE; *************** build_access_to_thisn (from, to, lc) *** 11584,11591 **** attribute so that they can't be referred to directly. */ static tree ! maybe_build_thisn_access_method (type) ! tree type; { tree mdecl, args, stmt, rtype; tree saved_current_function_decl; --- 11550,11556 ---- attribute so that they can't be referred to directly. */ static tree ! maybe_build_thisn_access_method (tree type) { tree mdecl, args, stmt, rtype; tree saved_current_function_decl; *************** static GTY(()) tree saved_thisn; *** 11630,11637 **** static GTY(()) tree saved_type; static tree ! build_current_thisn (type) ! tree type; { static int saved_i = -1; static int saved_type_i = 0; --- 11595,11601 ---- static GTY(()) tree saved_type; static tree ! build_current_thisn (tree type) { static int saved_i = -1; static int saved_type_i = 0; *************** build_current_thisn (type) *** 11665,11676 **** return saved_thisn; } ! /* Return the assignement to the hidden enclosing context `this$' by the second incoming parameter to the innerclass constructor. The form used is `this.this$ = this$;'. */ static tree ! build_thisn_assign () { if (current_class && PURE_INNER_CLASS_TYPE_P (current_class)) { --- 11629,11640 ---- return saved_thisn; } ! /* Return the assignment to the hidden enclosing context `this$' by the second incoming parameter to the innerclass constructor. The form used is `this.this$ = this$;'. */ static tree ! build_thisn_assign (void) { if (current_class && PURE_INNER_CLASS_TYPE_P (current_class)) { *************** build_thisn_assign () *** 11678,11684 **** tree lhs = make_qualified_primary (build_wfl_node (this_identifier_node), build_wfl_node (thisn), 0); tree rhs = build_wfl_node (thisn); ! EXPR_WFL_SET_LINECOL (lhs, lineno, 0); return build_assignment (ASSIGN_TK, EXPR_WFL_LINECOL (lhs), lhs, rhs); } return NULL_TREE; --- 11642,11648 ---- tree lhs = make_qualified_primary (build_wfl_node (this_identifier_node), build_wfl_node (thisn), 0); tree rhs = build_wfl_node (thisn); ! EXPR_WFL_SET_LINECOL (lhs, input_line, 0); return build_assignment (ASSIGN_TK, EXPR_WFL_LINECOL (lhs), lhs, rhs); } return NULL_TREE; *************** static GTY(()) tree get_message_wfl; *** 11699,11710 **** static GTY(()) tree type_parm_wfl; static tree ! build_dot_class_method (class) ! tree class; { #define BWF(S) build_wfl_node (get_identifier ((S))) #define MQN(X,Y) make_qualified_name ((X), (Y), 0) ! tree args, tmp, saved_current_function_decl, mdecl; tree stmt, throw_stmt; if (!get_message_wfl) --- 11663,11673 ---- static GTY(()) tree type_parm_wfl; static tree ! build_dot_class_method (tree class) { #define BWF(S) build_wfl_node (get_identifier ((S))) #define MQN(X,Y) make_qualified_name ((X), (Y), 0) ! tree args, tmp, saved_current_function_decl, mdecl, qual_name; tree stmt, throw_stmt; if (!get_message_wfl) *************** build_dot_class_method (class) *** 11721,11735 **** /* Build the qualified name java.lang.Class.forName */ tmp = MQN (MQN (MQN (BWF ("java"), BWF ("lang")), BWF ("Class")), BWF ("forName")); - load_class (class_not_found_type_node, 1); - load_class (no_class_def_found_type_node, 1); /* Create the "class$" function */ mdecl = create_artificial_method (class, ACC_STATIC, build_pointer_type (class_type_node), classdollar_identifier_node, args); ! DECL_FUNCTION_THROWS (mdecl) = ! build_tree_list (NULL_TREE, no_class_def_found_type_node); /* We start by building the try block. We need to build: return (java.lang.Class.forName (type)); */ --- 11684,11700 ---- /* Build the qualified name java.lang.Class.forName */ tmp = MQN (MQN (MQN (BWF ("java"), BWF ("lang")), BWF ("Class")), BWF ("forName")); /* Create the "class$" function */ mdecl = create_artificial_method (class, ACC_STATIC, build_pointer_type (class_type_node), classdollar_identifier_node, args); ! qual_name = MQN (MQN (BWF ("java"), BWF ("lang")), ! BWF ("NoClassDefFoundError")); ! DECL_FUNCTION_THROWS (mdecl) = build_tree_list (NULL_TREE, qual_name); ! register_incomplete_type (JDEP_EXCEPTION, qual_name, NULL_TREE, NULL_TREE); ! JDEP_GET_PATCH (CLASSD_LAST (ctxp->classd_list)) = ! &TREE_VALUE (DECL_FUNCTION_THROWS (mdecl)); /* We start by building the try block. We need to build: return (java.lang.Class.forName (type)); */ *************** build_dot_class_method (class) *** 11752,11759 **** throw_stmt = build1 (THROW_EXPR, NULL_TREE, throw_stmt); /* Encapsulate STMT in a try block. The catch clause executes THROW_STMT */ ! stmt = encapsulate_with_try_catch (0, class_not_found_type_node, ! stmt, throw_stmt); fix_method_argument_names (args, mdecl); layout_class_method (class, NULL_TREE, mdecl, NULL_TREE); --- 11717,11725 ---- throw_stmt = build1 (THROW_EXPR, NULL_TREE, throw_stmt); /* Encapsulate STMT in a try block. The catch clause executes THROW_STMT */ ! qual_name = MQN (MQN (BWF ("java"), BWF ("lang")), ! BWF ("ClassNotFoundException")); ! stmt = encapsulate_with_try_catch (0, qual_name, stmt, throw_stmt); fix_method_argument_names (args, mdecl); layout_class_method (class, NULL_TREE, mdecl, NULL_TREE); *************** build_dot_class_method (class) *** 11768,11777 **** } static tree ! build_dot_class_method_invocation (type) ! tree type; { ! tree sig_id, s; if (TYPE_ARRAY_P (type)) sig_id = build_java_signature (type); --- 11734,11743 ---- } static tree ! build_dot_class_method_invocation (tree this_class, tree type) { ! tree dot_class_method = TYPE_DOT_CLASS (this_class); ! tree sig_id, s, t; if (TYPE_ARRAY_P (type)) sig_id = build_java_signature (type); *************** build_dot_class_method_invocation (type) *** 11784,11791 **** s = build_string (IDENTIFIER_LENGTH (sig_id), IDENTIFIER_POINTER (sig_id)); ! return build_method_invocation (build_wfl_node (classdollar_identifier_node), ! build_tree_list (NULL_TREE, s)); } /* This section of the code deals with constructor. */ --- 11750,11763 ---- s = build_string (IDENTIFIER_LENGTH (sig_id), IDENTIFIER_POINTER (sig_id)); ! t = build_method_invocation (build_wfl_node (DECL_NAME (dot_class_method)), ! build_tree_list (NULL_TREE, s)); ! if (DECL_CONTEXT (dot_class_method) != this_class) ! { ! tree class_name = DECL_NAME (TYPE_NAME (DECL_CONTEXT (dot_class_method))); ! t = make_qualified_primary (build_wfl_node (class_name), t, 0); ! } ! return t; } /* This section of the code deals with constructor. */ *************** build_dot_class_method_invocation (type) *** 11795,11802 **** necessary. */ static void ! fix_constructors (mdecl) ! tree mdecl; { tree iii; /* Instance Initializer Invocation */ tree body = DECL_FUNCTION_BODY (mdecl); --- 11767,11773 ---- necessary. */ static void ! fix_constructors (tree mdecl) { tree iii; /* Instance Initializer Invocation */ tree body = DECL_FUNCTION_BODY (mdecl); *************** fix_constructors (mdecl) *** 11885,11891 **** if (!found) compound = add_stmt_to_compound (compound, NULL_TREE, build_super_invocation (mdecl)); ! /* Explicit super() invokation should take place before the instance initializer blocks. */ else { --- 11856,11862 ---- if (!found) compound = add_stmt_to_compound (compound, NULL_TREE, build_super_invocation (mdecl)); ! /* Explicit super() invocation should take place before the instance initializer blocks. */ else { *************** fix_constructors (mdecl) *** 11916,11923 **** for something that has the same signature. */ static int ! verify_constructor_super (mdecl) ! tree mdecl; { tree class = CLASSTYPE_SUPER (current_class); int super_inner = PURE_INNER_CLASS_TYPE_P (class); --- 11887,11893 ---- for something that has the same signature. */ static int ! verify_constructor_super (tree mdecl) { tree class = CLASSTYPE_SUPER (current_class); int super_inner = PURE_INNER_CLASS_TYPE_P (class); *************** verify_constructor_super (mdecl) *** 11969,11975 **** static GTY(()) tree reversed_class_list; void ! java_expand_classes () { int save_error_count = 0; static struct parser_ctxt *cur_ctxp = NULL; --- 11939,11945 ---- static GTY(()) tree reversed_class_list; void ! java_expand_classes (void) { int save_error_count = 0; static struct parser_ctxt *cur_ctxp = NULL; *************** java_expand_classes () *** 11982,11987 **** --- 11952,11966 ---- for (cur_ctxp = ctxp_for_generation; cur_ctxp; cur_ctxp = cur_ctxp->next) { + tree current; + for (current = cur_ctxp->class_list; + current; + current = TREE_CHAIN (current)) + gen_indirect_dispatch_tables (TREE_TYPE (current)); + } + + for (cur_ctxp = ctxp_for_generation; cur_ctxp; cur_ctxp = cur_ctxp->next) + { ctxp = cur_ctxp; input_filename = ctxp->filename; lang_init_source (2); /* Error msgs have method prototypes */ *************** java_expand_classes () *** 11990,11998 **** } input_filename = main_input_filename; - /* Find anonymous classes and expand their constructor. This extra pass is ! neccessary because the constructor itself is only generated when the method in which it is defined is expanded. */ for (cur_ctxp = ctxp_for_generation; cur_ctxp; cur_ctxp = cur_ctxp->next) { --- 11969,11976 ---- } input_filename = main_input_filename; /* Find anonymous classes and expand their constructor. This extra pass is ! necessary because the constructor itself is only generated when the method in which it is defined is expanded. */ for (cur_ctxp = ctxp_for_generation; cur_ctxp; cur_ctxp = cur_ctxp->next) { *************** java_expand_classes () *** 12000,12006 **** ctxp = cur_ctxp; for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) { ! current_class = TREE_TYPE (current); if (ANONYMOUS_CLASS_P (current_class)) { tree d; --- 11978,11984 ---- ctxp = cur_ctxp; for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) { ! output_class = current_class = TREE_TYPE (current); if (ANONYMOUS_CLASS_P (current_class)) { tree d; *************** java_expand_classes () *** 12028,12034 **** for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) { tree d; ! current_class = TREE_TYPE (current); for (d = TYPE_METHODS (current_class); d; d = TREE_CHAIN (d)) { if (DECL_RESULT (d) == NULL_TREE) --- 12006,12012 ---- for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) { tree d; ! output_class = current_class = TREE_TYPE (current); for (d = TYPE_METHODS (current_class); d; d = TREE_CHAIN (d)) { if (DECL_RESULT (d) == NULL_TREE) *************** java_expand_classes () *** 12059,12065 **** for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) { tree d; ! current_class = TREE_TYPE (current); for (d = TYPE_METHODS (current_class); d; d = TREE_CHAIN (d)) { if (DECL_RESULT (d) == NULL_TREE) --- 12037,12043 ---- for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) { tree d; ! output_class = current_class = TREE_TYPE (current); for (d = TYPE_METHODS (current_class); d; d = TREE_CHAIN (d)) { if (DECL_RESULT (d) == NULL_TREE) *************** java_expand_classes () *** 12087,12107 **** /* Now things are stable, go for generation of the class data. */ ! /* We pessimistically marked all fields external until we knew ! what set of classes we were planning to compile. Now mark those that will be generated locally as not external. */ for (cur_ctxp = ctxp_for_generation; cur_ctxp; cur_ctxp = cur_ctxp->next) { tree current; ctxp = cur_ctxp; for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) ! { ! tree class = TREE_TYPE (current); ! tree field; ! for (field = TYPE_FIELDS (class); field ; field = TREE_CHAIN (field)) ! if (FIELD_STATIC (field)) ! DECL_EXTERNAL (field) = 0; ! } } /* Compile the classes. */ --- 12065,12079 ---- /* Now things are stable, go for generation of the class data. */ ! /* We pessimistically marked all methods and fields external until ! we knew what set of classes we were planning to compile. Now mark those that will be generated locally as not external. */ for (cur_ctxp = ctxp_for_generation; cur_ctxp; cur_ctxp = cur_ctxp->next) { tree current; ctxp = cur_ctxp; for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) ! java_mark_class_local (TREE_TYPE (current)); } /* Compile the classes. */ *************** java_expand_classes () *** 12130,12146 **** current; current = TREE_CHAIN (current)) { ! current_class = TREE_TYPE (TREE_VALUE (current)); ! outgoing_cpool = TYPE_CPOOL (current_class); if (flag_emit_class_files) write_classfile (current_class); if (flag_emit_xref) expand_xref (current_class); else if (! flag_syntax_only) ! { ! java_expand_method_bodies (current_class); ! finish_class (); ! } } } } --- 12102,12130 ---- current; current = TREE_CHAIN (current)) { ! output_class = current_class = TREE_TYPE (TREE_VALUE (current)); if (flag_emit_class_files) write_classfile (current_class); if (flag_emit_xref) expand_xref (current_class); else if (! flag_syntax_only) ! java_expand_method_bodies (current_class); ! } ! } ! } ! ! void ! java_finish_classes (void) ! { ! static struct parser_ctxt *cur_ctxp = NULL; ! for (cur_ctxp = ctxp_for_generation; cur_ctxp; cur_ctxp = cur_ctxp->next) ! { ! tree current; ! ctxp = cur_ctxp; ! for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) ! { ! output_class = current_class = TREE_TYPE (current); ! finish_class (); } } } *************** java_expand_classes () *** 12151,12159 **** separating `.' operator. */ static tree ! make_qualified_primary (primary, right, location) ! tree primary, right; ! int location; { tree wfl; --- 12135,12141 ---- separating `.' operator. */ static tree ! make_qualified_primary (tree primary, tree right, int location) { tree wfl; *************** make_qualified_primary (primary, right, *** 12177,12184 **** /* Simple merge of two name separated by a `.' */ static tree ! merge_qualified_name (left, right) ! tree left, right; { tree node; if (!left && !right) --- 12159,12165 ---- /* Simple merge of two name separated by a `.' */ static tree ! merge_qualified_name (tree left, tree right) { tree node; if (!left && !right) *************** merge_qualified_name (left, right) *** 12206,12214 **** inherited from the location information of the `.' operator. */ static tree ! make_qualified_name (left, right, location) ! tree left, right; ! int location; { #ifdef USE_COMPONENT_REF tree node = build (COMPONENT_REF, NULL_TREE, left, right); --- 12187,12193 ---- inherited from the location information of the `.' operator. */ static tree ! make_qualified_name (tree left, tree right, int location) { #ifdef USE_COMPONENT_REF tree node = build (COMPONENT_REF, NULL_TREE, left, right); *************** make_qualified_name (left, right, locati *** 12242,12249 **** last identifier is removed from the linked list */ static tree ! cut_identifier_in_qualified (wfl) ! tree wfl; { tree q; tree previous = NULL_TREE; --- 12221,12227 ---- last identifier is removed from the linked list */ static tree ! cut_identifier_in_qualified (tree wfl) { tree q; tree previous = NULL_TREE; *************** cut_identifier_in_qualified (wfl) *** 12262,12270 **** /* Resolve the expression name NAME. Return its decl. */ static tree ! resolve_expression_name (id, orig) ! tree id; ! tree *orig; { tree name = EXPR_WFL_NODE (id); tree decl; --- 12240,12246 ---- /* Resolve the expression name NAME. Return its decl. */ static tree ! resolve_expression_name (tree id, tree *orig) { tree name = EXPR_WFL_NODE (id); tree decl; *************** resolve_expression_name (id, orig) *** 12292,12297 **** --- 12268,12275 ---- if (FIELD_LOCAL_ALIAS_USED (decl)) name = DECL_NAME (decl); + check_deprecation (id, decl); + /* Instance variable (8.3.1.1) can't appear within static method, static initializer or initializer for a static variable. */ *************** resolve_expression_name (id, orig) *** 12334,12339 **** --- 12312,12323 ---- /* We may be asked to save the real field access node */ if (orig) *orig = access; + /* Last check: can we access the field? */ + if (not_accessible_p (current_class, decl, NULL_TREE, 0)) + { + not_accessible_field_error (id, decl); + return error_mark_node; + } /* And we return what we got */ return access; } *************** resolve_expression_name (id, orig) *** 12366,12373 **** } static void ! static_ref_err (wfl, field_id, class_type) ! tree wfl, field_id, class_type; { parse_error_context (wfl, --- 12350,12356 ---- } static void ! static_ref_err (tree wfl, tree field_id, tree class_type) { parse_error_context (wfl, *************** static_ref_err (wfl, field_id, class_typ *** 12382,12390 **** recipient's address can be null. */ static tree ! resolve_field_access (qual_wfl, field_decl, field_type) ! tree qual_wfl; ! tree *field_decl, *field_type; { int is_static = 0; tree field_ref; --- 12365,12371 ---- recipient's address can be null. */ static tree ! resolve_field_access (tree qual_wfl, tree *field_decl, tree *field_type) { int is_static = 0; tree field_ref; *************** resolve_field_access (qual_wfl, field_de *** 12460,12467 **** NODE. */ static tree ! strip_out_static_field_access_decl (node) ! tree node; { if (TREE_CODE (node) == COMPOUND_EXPR) { --- 12441,12447 ---- NODE. */ static tree ! strip_out_static_field_access_decl (tree node) { if (TREE_CODE (node) == COMPOUND_EXPR) { *************** strip_out_static_field_access_decl (node *** 12484,12492 **** /* 6.5.5.2: Qualified Expression Names */ static int ! resolve_qualified_expression_name (wfl, found_decl, where_found, type_found) ! tree wfl; ! tree *found_decl, *type_found, *where_found; { int from_type = 0; /* Field search initiated from a type */ int from_super = 0, from_cast = 0, from_qualified_this = 0; --- 12464,12471 ---- /* 6.5.5.2: Qualified Expression Names */ static int ! resolve_qualified_expression_name (tree wfl, tree *found_decl, ! tree *where_found, tree *type_found) { int from_type = 0; /* Field search initiated from a type */ int from_super = 0, from_cast = 0, from_qualified_this = 0; *************** resolve_qualified_expression_name (wfl, *** 12583,12593 **** instantiation using a primary qualified by a `new' */ RESTORE_THIS_AND_CURRENT_CLASS; ! /* EH check. No check on access$ functions */ ! if (location ! && !OUTER_FIELD_ACCESS_IDENTIFIER_P ! (DECL_NAME (current_function_decl))) ! check_thrown_exceptions (location, ret_decl); /* If the previous call was static and this one is too, build a compound expression to hold the two (because in --- 12562,12575 ---- instantiation using a primary qualified by a `new' */ RESTORE_THIS_AND_CURRENT_CLASS; ! if (location) ! { ! tree arguments = NULL_TREE; ! if (TREE_CODE (qual_wfl) == CALL_EXPR ! && TREE_OPERAND (qual_wfl, 1) != NULL_TREE) ! arguments = TREE_VALUE (TREE_OPERAND (qual_wfl, 1)); ! check_thrown_exceptions (location, ret_decl, arguments); ! } /* If the previous call was static and this one is too, build a compound expression to hold the two (because in *************** resolve_qualified_expression_name (wfl, *** 12772,12778 **** list = TREE_CHAIN (q); while (list) { - RESOLVE_EXPRESSION_NAME_P (QUAL_WFL (list)) = 1; RESOLVE_PACKAGE_NAME_P (QUAL_WFL (list)) = 0; list = TREE_CHAIN (list); } --- 12754,12759 ---- *************** resolve_qualified_expression_name (wfl, *** 12812,12826 **** } if (not_accessible_p (TREE_TYPE (decl), decl, type, 0)) ! { ! parse_error_context ! (qual_wfl, "Can't access %s field `%s.%s' from `%s'", ! java_accstring_lookup (get_access_flags_from_decl (decl)), ! GET_TYPE_NAME (type), ! IDENTIFIER_POINTER (DECL_NAME (decl)), ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (current_class)))); ! return 1; ! } check_deprecation (qual_wfl, decl); type = TREE_TYPE (decl); --- 12793,12799 ---- } if (not_accessible_p (TREE_TYPE (decl), decl, type, 0)) ! return not_accessible_field_error (qual_wfl, decl); check_deprecation (qual_wfl, decl); type = TREE_TYPE (decl); *************** resolve_qualified_expression_name (wfl, *** 12862,12868 **** } } ! /* Report and error if we're using a numerical litteral as a qualifier. It can only be an INTEGER_CST. */ else if (TREE_CODE (qual_wfl) == INTEGER_CST) { --- 12835,12841 ---- } } ! /* Report and error if we're using a numerical literal as a qualifier. It can only be an INTEGER_CST. */ else if (TREE_CODE (qual_wfl) == INTEGER_CST) { *************** resolve_qualified_expression_name (wfl, *** 12941,12958 **** /* Check on accessibility here */ if (not_accessible_p (current_class, field_decl, DECL_CONTEXT (field_decl), from_super)) ! { ! parse_error_context ! (qual_wfl, ! "Can't access %s field `%s.%s' from `%s'", ! java_accstring_lookup ! (get_access_flags_from_decl (field_decl)), ! GET_TYPE_NAME (type), ! IDENTIFIER_POINTER (DECL_NAME (field_decl)), ! IDENTIFIER_POINTER ! (DECL_NAME (TYPE_NAME (current_class)))); ! return 1; ! } check_deprecation (qual_wfl, field_decl); /* There are things to check when fields are accessed --- 12914,12920 ---- /* Check on accessibility here */ if (not_accessible_p (current_class, field_decl, DECL_CONTEXT (field_decl), from_super)) ! return not_accessible_field_error (qual_wfl,field_decl); check_deprecation (qual_wfl, field_decl); /* There are things to check when fields are accessed *************** resolve_qualified_expression_name (wfl, *** 13034,13043 **** method. */ static int ! not_accessible_p (reference, member, where, from_super) ! tree reference, member; ! tree where; ! int from_super; { int access_flag = get_access_flags_from_decl (member); --- 12996,13002 ---- method. */ static int ! not_accessible_p (tree reference, tree member, tree where, int from_super) { int access_flag = get_access_flags_from_decl (member); *************** not_accessible_p (reference, member, whe *** 13109,13133 **** /* Test deprecated decl access. */ static void ! check_deprecation (wfl, decl) ! tree wfl, decl; { ! const char *file = DECL_SOURCE_FILE (decl); /* Complain if the field is deprecated and the file it was defined in isn't compiled at the same time the file which contains its use is */ if (DECL_DEPRECATED (decl) && !IS_A_COMMAND_LINE_FILENAME_P (get_identifier (file))) { ! char the [20]; switch (TREE_CODE (decl)) { case FUNCTION_DECL: ! strcpy (the, "method"); break; case FIELD_DECL: case VAR_DECL: ! strcpy (the, "field"); break; case TYPE_DECL: parse_warning_context (wfl, "The class `%s' has been deprecated", --- 13068,13109 ---- /* Test deprecated decl access. */ static void ! check_deprecation (tree wfl, tree decl) { ! const char *file; ! tree elt; ! ! if (! flag_deprecated) ! return; ! ! /* We want to look at the element type of arrays here, so we strip ! all surrounding array types. */ ! if (TYPE_ARRAY_P (TREE_TYPE (decl))) ! { ! elt = TREE_TYPE (decl); ! while (TYPE_ARRAY_P (elt)) ! elt = TYPE_ARRAY_ELEMENT (elt); ! /* We'll end up with a pointer type, so we use TREE_TYPE to go ! to the record. */ ! decl = TYPE_NAME (TREE_TYPE (elt)); ! } ! file = DECL_SOURCE_FILE (decl); ! /* Complain if the field is deprecated and the file it was defined in isn't compiled at the same time the file which contains its use is */ if (DECL_DEPRECATED (decl) && !IS_A_COMMAND_LINE_FILENAME_P (get_identifier (file))) { ! const char *the; switch (TREE_CODE (decl)) { case FUNCTION_DECL: ! the = "method"; break; case FIELD_DECL: case VAR_DECL: ! the = "field"; break; case TYPE_DECL: parse_warning_context (wfl, "The class `%s' has been deprecated", *************** check_deprecation (wfl, decl) *** 13150,13157 **** static GTY(()) tree cicp_cache; static int ! class_in_current_package (class) ! tree class; { int qualified_flag; tree left; --- 13126,13132 ---- static GTY(()) tree cicp_cache; static int ! class_in_current_package (tree class) { int qualified_flag; tree left; *************** class_in_current_package (class) *** 13187,13194 **** done only if certain conditions meet. */ static tree ! maybe_access_field (decl, where, type) ! tree decl, where, type; { if (TREE_CODE (decl) == FIELD_DECL && decl != current_this && !FIELD_STATIC (decl)) --- 13162,13168 ---- done only if certain conditions meet. */ static tree ! maybe_access_field (tree decl, tree where, tree type) { if (TREE_CODE (decl) == FIELD_DECL && decl != current_this && !FIELD_STATIC (decl)) *************** maybe_access_field (decl, where, type) *** 13203,13214 **** used. IS_STATIC is set to 1 if the invoked function is static. */ static tree ! patch_method_invocation (patch, primary, where, from_super, ! is_static, ret_decl) ! tree patch, primary, where; ! int from_super; ! int *is_static; ! tree *ret_decl; { tree wfl = TREE_OPERAND (patch, 0); tree args = TREE_OPERAND (patch, 1); --- 13177,13184 ---- used. IS_STATIC is set to 1 if the invoked function is static. */ static tree ! patch_method_invocation (tree patch, tree primary, tree where, int from_super, ! int *is_static, tree *ret_decl) { tree wfl = TREE_OPERAND (patch, 0); tree args = TREE_OPERAND (patch, 1); *************** patch_method_invocation (patch, primary, *** 13219,13225 **** tree this_arg = NULL_TREE; int is_array_clone_call = 0; ! /* Should be overriden if everything goes well. Otherwise, if something fails, it should keep this value. It stop the evaluation of a bogus assignment. See java_complete_tree, MODIFY_EXPR: for the reasons why we sometimes want to keep on --- 13189,13195 ---- tree this_arg = NULL_TREE; int is_array_clone_call = 0; ! /* Should be overridden if everything goes well. Otherwise, if something fails, it should keep this value. It stop the evaluation of a bogus assignment. See java_complete_tree, MODIFY_EXPR: for the reasons why we sometimes want to keep on *************** patch_method_invocation (patch, primary, *** 13438,13444 **** this_arg = primary ? primary : current_this; /* If we're using an access method, things are different. ! There are two familly of cases: 1) We're not generating bytecodes: --- 13408,13414 ---- this_arg = primary ? primary : current_this; /* If we're using an access method, things are different. ! There are two family of cases: 1) We're not generating bytecodes: *************** patch_method_invocation (patch, primary, *** 13454,13460 **** - LIST is static. It's invocation is transformed from x(a1,....,an) into TYPE_OF(this$).x(a1,....an). ! Of course, this$ can be abitrary complex, ranging from this$0 (the immediate outer context) to access$0(access$0(...(this$0))). --- 13424,13430 ---- - LIST is static. It's invocation is transformed from x(a1,....,an) into TYPE_OF(this$).x(a1,....an). ! Of course, this$ can be arbitrarily complex, ranging from this$0 (the immediate outer context) to access$0(access$0(...(this$0))). *************** patch_method_invocation (patch, primary, *** 13502,13512 **** } /* Deprecation check: check whether the method being invoked or the ! instance-being-created's type are deprecated. */ if (TREE_CODE (patch) == NEW_CLASS_EXPR) check_deprecation (wfl, TYPE_NAME (DECL_CONTEXT (list))); ! else ! check_deprecation (wfl, list); /* If invoking a innerclass constructor, there are hidden parameters to pass */ --- 13472,13481 ---- } /* Deprecation check: check whether the method being invoked or the ! instance-being-created's type are deprecated. */ if (TREE_CODE (patch) == NEW_CLASS_EXPR) check_deprecation (wfl, TYPE_NAME (DECL_CONTEXT (list))); ! check_deprecation (wfl, list); /* If invoking a innerclass constructor, there are hidden parameters to pass */ *************** patch_method_invocation (patch, primary, *** 13617,13624 **** non static method. Return 1 if it's the case, 0 otherwise. */ static int ! check_for_static_method_reference (wfl, node, method, where, primary) ! tree wfl, node, method, where, primary; { if (METHOD_STATIC (current_function_decl) && !METHOD_STATIC (method) && !primary && !CALL_CONSTRUCTOR_P (node)) --- 13586,13593 ---- non static method. Return 1 if it's the case, 0 otherwise. */ static int ! check_for_static_method_reference (tree wfl, tree node, tree method, ! tree where, tree primary) { if (METHOD_STATIC (current_function_decl) && !METHOD_STATIC (method) && !primary && !CALL_CONSTRUCTOR_P (node)) *************** check_for_static_method_reference (wfl, *** 13640,13648 **** returned. */ static int ! maybe_use_access_method (is_super_init, mdecl, this_arg) ! int is_super_init; ! tree *mdecl, *this_arg; { tree ctx; tree md = *mdecl, ta = *this_arg; --- 13609,13615 ---- returned. */ static int ! maybe_use_access_method (int is_super_init, tree *mdecl, tree *this_arg) { tree ctx; tree md = *mdecl, ta = *this_arg; *************** maybe_use_access_method (is_super_init, *** 13699,13706 **** *mdecl = md; *this_arg = ta; ! /* Returnin a nonzero value indicates we were doing a non static ! method invokation that is now a static invocation. It will have callee displace `this' to insert it in the regular argument list. */ return (non_static_context && to_return); --- 13666,13673 ---- *mdecl = md; *this_arg = ta; ! /* Returning a nonzero value indicates we were doing a non static ! method invocation that is now a static invocation. It will have callee displace `this' to insert it in the regular argument list. */ return (non_static_context && to_return); *************** maybe_use_access_method (is_super_init, *** 13710,13717 **** mode. */ static tree ! patch_invoke (patch, method, args) ! tree patch, method, args; { tree dtable, func; tree original_call, t, ta; --- 13677,13683 ---- mode. */ static tree ! patch_invoke (tree patch, tree method, tree args) { tree dtable, func; tree original_call, t, ta; *************** patch_invoke (patch, method, args) *** 13730,13736 **** TREE_TYPE (TREE_VALUE (ta)) != TREE_VALUE (t)) TREE_VALUE (ta) = convert (TREE_VALUE (t), TREE_VALUE (ta)); ! /* Resolve unresolved returned type isses */ t = TREE_TYPE (TREE_TYPE (method)); if (TREE_CODE (t) == POINTER_TYPE && !CLASS_LOADED_P (TREE_TYPE (t))) resolve_and_layout (TREE_TYPE (t), NULL); --- 13696,13702 ---- TREE_TYPE (TREE_VALUE (ta)) != TREE_VALUE (t)) TREE_VALUE (ta) = convert (TREE_VALUE (t), TREE_VALUE (ta)); ! /* Resolve unresolved returned type issues */ t = TREE_TYPE (TREE_TYPE (method)); if (TREE_CODE (t) == POINTER_TYPE && !CLASS_LOADED_P (TREE_TYPE (t))) resolve_and_layout (TREE_TYPE (t), NULL); *************** patch_invoke (patch, method, args) *** 13869,13877 **** } static int ! invocation_mode (method, super) ! tree method; ! int super; { int access = get_access_flags_from_decl (method); --- 13835,13841 ---- } static int ! invocation_mode (tree method, int super) { int access = get_access_flags_from_decl (method); *************** invocation_mode (method, super) *** 13902,13911 **** 15.11.2 (Compile-Time Step 2) */ static tree ! lookup_method_invoke (lc, cl, class, name, arg_list) ! int lc; ! tree cl; ! tree class, name, arg_list; { tree atl = end_params_node; /* Arg Type List */ tree method, signature, list, node; --- 13866,13872 ---- 15.11.2 (Compile-Time Step 2) */ static tree ! lookup_method_invoke (int lc, tree cl, tree class, tree name, tree arg_list) { tree atl = end_params_node; /* Arg Type List */ tree method, signature, list, node; *************** lookup_method_invoke (lc, cl, class, nam *** 13988,13996 **** when we're looking for a constructor. */ static tree ! find_applicable_accessible_methods_list (lc, class, name, arglist) ! int lc; ! tree class, name, arglist; { static htab_t searched_classes; static int search_not_done = 0; --- 13949,13956 ---- when we're looking for a constructor. */ static tree ! find_applicable_accessible_methods_list (int lc, tree class, tree name, ! tree arglist) { static htab_t searched_classes; static int search_not_done = 0; *************** find_applicable_accessible_methods_list *** 14108,14117 **** /* Effectively search for the appropriate method in method */ static void ! search_applicable_methods_list (lc, method, name, arglist, list, all_list) ! int lc; ! tree method, name, arglist; ! tree *list, *all_list; { for (; method; method = TREE_CHAIN (method)) { --- 14068,14075 ---- /* Effectively search for the appropriate method in method */ static void ! search_applicable_methods_list (int lc, tree method, tree name, tree arglist, ! tree *list, tree *all_list) { for (; method; method = TREE_CHAIN (method)) { *************** search_applicable_methods_list (lc, meth *** 14139,14146 **** /* 15.11.2.2 Choose the Most Specific Method */ static tree ! find_most_specific_methods_list (list) ! tree list; { int max = 0; int abstract, candidates; --- 14097,14103 ---- /* 15.11.2.2 Choose the Most Specific Method */ static tree ! find_most_specific_methods_list (tree list) { int max = 0; int abstract, candidates; *************** find_most_specific_methods_list (list) *** 14189,14198 **** /* If we have several and they're all abstract, just pick the closest one. */ ! if (candidates > 0 && (candidates == abstract)) { new_list = nreverse (new_list); TREE_CHAIN (new_list) = NULL_TREE; } /* We have several (we couldn't find a most specific), all but one --- 14146,14160 ---- /* If we have several and they're all abstract, just pick the closest one. */ ! if (candidates > 0 && candidates == abstract) { + /* FIXME: merge the throws clauses. There is no convenient way + to do this in gcj right now, since ideally we'd like to + introduce a new METHOD_DECL here, but that is really not + possible. */ new_list = nreverse (new_list); TREE_CHAIN (new_list) = NULL_TREE; + return new_list; } /* We have several (we couldn't find a most specific), all but one *************** static GTY(()) tree m2_arg_value; *** 14230,14239 **** static GTY(()) tree m2_arg_cache; static int ! argument_types_convertible (m1, m2_or_arglist) ! tree m1, m2_or_arglist; { ! register tree m1_arg, m2_arg; SKIP_THIS_AND_ARTIFICIAL_PARMS (m1_arg, m1) --- 14192,14200 ---- static GTY(()) tree m2_arg_cache; static int ! argument_types_convertible (tree m1, tree m2_or_arglist) { ! tree m1_arg, m2_arg; SKIP_THIS_AND_ARTIFICIAL_PARMS (m1_arg, m1) *************** argument_types_convertible (m1, m2_or_ar *** 14270,14511 **** /* Qualification routines */ static void ! qualify_ambiguous_name (id) ! tree id; { ! tree qual, qual_wfl, name = NULL_TREE, decl, ptr_type = NULL_TREE, ! saved_current_class; ! int again, super_found = 0, this_found = 0, new_array_found = 0; ! int code; ! ! /* We first qualify the first element, then derive qualification of ! others based on the first one. If the first element is qualified ! by a resolution (field or type), this resolution is stored in the ! QUAL_RESOLUTION of the qual element being examined. We need to ! save the current_class since the use of SUPER might change the ! its value. */ ! saved_current_class = current_class; ! qual = EXPR_WFL_QUALIFICATION (id); ! do { ! ! /* Simple qualified expression feature a qual_wfl that is a ! WFL. Expression derived from a primary feature more complicated ! things like a CALL_EXPR. Expression from primary need to be ! worked out to extract the part on which the qualification will ! take place. */ ! qual_wfl = QUAL_WFL (qual); ! switch (TREE_CODE (qual_wfl)) ! { ! case CALL_EXPR: ! qual_wfl = TREE_OPERAND (qual_wfl, 0); ! if (TREE_CODE (qual_wfl) != EXPR_WITH_FILE_LOCATION ! || (EXPR_WFL_QUALIFICATION (qual_wfl) ! && TREE_CODE (EXPR_WFL_QUALIFICATION (qual_wfl)) == TREE_LIST)) ! { ! qual = EXPR_WFL_QUALIFICATION (qual_wfl); ! qual_wfl = QUAL_WFL (qual); ! } ! break; ! case NEW_ARRAY_EXPR: ! case NEW_ANONYMOUS_ARRAY_EXPR: ! qual = TREE_CHAIN (qual); ! again = new_array_found = 1; ! continue; ! case CONVERT_EXPR: ! break; ! case NEW_CLASS_EXPR: ! qual_wfl = TREE_OPERAND (qual_wfl, 0); ! break; ! case ARRAY_REF: ! while (TREE_CODE (qual_wfl) == ARRAY_REF) ! qual_wfl = TREE_OPERAND (qual_wfl, 0); ! break; ! case STRING_CST: ! qual = TREE_CHAIN (qual); ! qual_wfl = QUAL_WFL (qual); ! break; ! case CLASS_LITERAL: ! qual = TREE_CHAIN (qual); ! qual_wfl = QUAL_WFL (qual); ! break; ! default: ! /* Fix for -Wall. Just break doing nothing */ ! break; ! } ! ! ptr_type = current_class; ! again = 0; ! code = TREE_CODE (qual_wfl); ! ! /* Pos evaluation: non WFL leading expression nodes */ ! if (code == CONVERT_EXPR ! && TREE_CODE (TREE_TYPE (qual_wfl)) == EXPR_WITH_FILE_LOCATION) ! name = EXPR_WFL_NODE (TREE_TYPE (qual_wfl)); ! ! else if (code == INTEGER_CST) ! name = qual_wfl; ! ! else if (code == CONVERT_EXPR && ! TREE_CODE (TREE_OPERAND (qual_wfl, 0)) == EXPR_WITH_FILE_LOCATION) ! name = TREE_OPERAND (qual_wfl, 0); ! ! else if (code == CONVERT_EXPR ! && TREE_CODE (TREE_OPERAND (qual_wfl, 0)) == CALL_EXPR ! && (TREE_CODE (TREE_OPERAND (TREE_OPERAND (qual_wfl, 0), 0)) ! == EXPR_WITH_FILE_LOCATION)) ! name = TREE_OPERAND (TREE_OPERAND (qual_wfl, 0), 0); ! else if ((code == ARRAY_REF || code == CALL_EXPR || code == MODIFY_EXPR) && ! TREE_CODE (TREE_OPERAND (qual_wfl, 0)) == EXPR_WITH_FILE_LOCATION) ! name = EXPR_WFL_NODE (TREE_OPERAND (qual_wfl, 0)); ! else if (code == TREE_LIST) ! name = EXPR_WFL_NODE (TREE_PURPOSE (qual_wfl)); ! else if (code == STRING_CST || code == CONDITIONAL_EXPR ! || code == PLUS_EXPR) ! { ! qual = TREE_CHAIN (qual); ! qual_wfl = QUAL_WFL (qual); ! again = 1; ! } ! else ! { ! name = EXPR_WFL_NODE (qual_wfl); ! if (!name) ! { ! qual = EXPR_WFL_QUALIFICATION (qual_wfl); ! again = 1; ! } ! } ! /* If we have a THIS (from a primary), we set the context accordingly */ ! if (name == this_identifier_node) ! { ! /* This isn't really elegant. One more added irregularity ! before I start using COMPONENT_REF (hopefully very soon.) */ ! if (TREE_CODE (TREE_PURPOSE (qual)) == ARRAY_REF ! && TREE_CODE (TREE_OPERAND (TREE_PURPOSE (qual), 0)) == ! EXPR_WITH_FILE_LOCATION ! && EXPR_WFL_NODE (TREE_OPERAND (TREE_PURPOSE (qual), 0)) == ! this_identifier_node) ! { ! qual = TREE_OPERAND (TREE_PURPOSE (qual), 0); ! qual = EXPR_WFL_QUALIFICATION (qual); ! } ! qual = TREE_CHAIN (qual); ! qual_wfl = QUAL_WFL (qual); ! if (TREE_CODE (qual_wfl) == CALL_EXPR) ! again = 1; ! else if (TREE_CODE (qual_wfl) == EXPR_WITH_FILE_LOCATION) ! name = EXPR_WFL_NODE (qual_wfl); ! else if (TREE_CODE (qual_wfl) == NEW_CLASS_EXPR) ! name = TREE_OPERAND (qual_wfl, 0); ! this_found = 1; ! } ! /* If we have a SUPER, we set the context accordingly */ ! if (name == super_identifier_node) ! { ! current_class = CLASSTYPE_SUPER (ptr_type); ! /* Check that there is such a thing as a super class. If not, ! return. The error will be caught later on, during the ! resolution */ ! if (!current_class) ! { ! current_class = saved_current_class; ! return; ! } ! qual = TREE_CHAIN (qual); ! /* Do one more interation to set things up */ ! super_found = again = 1; ! } ! } while (again); /* If name appears within the scope of a local variable declaration ! or parameter declaration, then it is an expression name. We don't ! carry this test out if we're in the context of the use of SUPER ! or THIS */ ! if (!this_found && !super_found ! && TREE_CODE (name) != STRING_CST && TREE_CODE (name) != INTEGER_CST ! && (decl = IDENTIFIER_LOCAL_VALUE (name))) { - RESOLVE_EXPRESSION_NAME_P (qual_wfl) = 1; QUAL_RESOLUTION (qual) = decl; } ! /* If within the class/interface NAME was found to be used there ! exists a (possibly inherited) field named NAME, then this is an ! expression name. If we saw a NEW_ARRAY_EXPR before and want to ! address length, it is OK. */ ! else if ((decl = lookup_field_wrapper (ptr_type, name)) ! || name == length_identifier_node) ! { ! RESOLVE_EXPRESSION_NAME_P (qual_wfl) = 1; ! QUAL_RESOLUTION (qual) = (new_array_found ? NULL_TREE : decl); ! } ! ! /* We reclassify NAME as yielding to a type name resolution if: ! - NAME is a class/interface declared within the compilation ! unit containing NAME, ! - NAME is imported via a single-type-import declaration, ! - NAME is declared in an another compilation unit of the package ! of the compilation unit containing NAME, ! - NAME is declared by exactly on type-import-on-demand declaration ! of the compilation unit containing NAME. ! - NAME is actually a STRING_CST. ! This can't happen if the expression was qualified by `this.' */ ! else if (! this_found && ! (TREE_CODE (name) == STRING_CST || ! TREE_CODE (name) == INTEGER_CST || ! (decl = resolve_and_layout (name, NULL_TREE)))) { RESOLVE_TYPE_NAME_P (qual_wfl) = 1; QUAL_RESOLUTION (qual) = decl; } - /* Method call, array references and cast are expression name */ - else if (TREE_CODE (QUAL_WFL (qual)) == CALL_EXPR - || TREE_CODE (QUAL_WFL (qual)) == ARRAY_REF - || TREE_CODE (QUAL_WFL (qual)) == CONVERT_EXPR - || TREE_CODE (QUAL_WFL (qual)) == MODIFY_EXPR) - RESOLVE_EXPRESSION_NAME_P (qual_wfl) = 1; - /* Check here that NAME isn't declared by more than one type-import-on-demand declaration of the compilation unit containing NAME. FIXME */ ! /* Otherwise, NAME is reclassified as a package name */ else RESOLVE_PACKAGE_NAME_P (qual_wfl) = 1; ! /* Propagate the qualification accross other components of the qualified name */ for (qual = TREE_CHAIN (qual); qual; qual_wfl = QUAL_WFL (qual), qual = TREE_CHAIN (qual)) { if (RESOLVE_PACKAGE_NAME_P (qual_wfl)) RESOLVE_PACKAGE_NAME_P (QUAL_WFL (qual)) = 1; - else - RESOLVE_EXPRESSION_NAME_P (QUAL_WFL (qual)) = 1; } /* Store the global qualification for the ambiguous part of ID back into ID fields */ ! if (RESOLVE_EXPRESSION_NAME_P (qual_wfl)) ! RESOLVE_EXPRESSION_NAME_P (id) = 1; ! else if (RESOLVE_TYPE_NAME_P (qual_wfl)) RESOLVE_TYPE_NAME_P (id) = 1; else if (RESOLVE_PACKAGE_NAME_P (qual_wfl)) RESOLVE_PACKAGE_NAME_P (id) = 1; - - /* Restore the current class */ - current_class = saved_current_class; } static int ! breakdown_qualified (left, right, source) ! tree *left, *right, source; { char *p, *base; int l = IDENTIFIER_LENGTH (source); --- 14231,14310 ---- /* Qualification routines */ + /* Given a name x.y.z, look up x locally. If it's found, save the + decl. If it's not found, mark the name as RESOLVE_PACKAGE_NAME_P, + so that we later try and load the appropriate classes. */ static void ! qualify_ambiguous_name (tree id) { ! tree name, decl; ! /* We inspect the first item of the qualification list. As a sanity ! check, make sure that it is an identfier node. */ ! tree qual = EXPR_WFL_QUALIFICATION (id); ! tree qual_wfl = QUAL_WFL (qual); ! if (TREE_CODE (qual_wfl) != EXPR_WITH_FILE_LOCATION) ! return; ! name = EXPR_WFL_NODE (qual_wfl); ! /* If we don't have an identifier, or we have a 'this' or 'super', ! then field access processing is all we need : there is nothing ! for us to do. */ ! if (!name || TREE_CODE (name) != IDENTIFIER_NODE || ! name == this_identifier_node || ! name == super_identifier_node) ! return; /* If name appears within the scope of a local variable declaration ! or parameter declaration, or is a field within an enclosing ! class, then it is an expression name. Save the decl and let ! resolve_field_access do it's work. */ ! if ((decl = IDENTIFIER_LOCAL_VALUE (name)) || ! (decl = lookup_field_wrapper (current_class, name))) { QUAL_RESOLUTION (qual) = decl; + return; } ! /* If name is a known class name (either declared or imported), mark ! us as a type name. */ ! if ((decl = resolve_and_layout (name, NULL_TREE))) { RESOLVE_TYPE_NAME_P (qual_wfl) = 1; QUAL_RESOLUTION (qual) = decl; } /* Check here that NAME isn't declared by more than one type-import-on-demand declaration of the compilation unit containing NAME. FIXME */ ! /* We couldn't find a declaration for the name. Assume for now that ! we have a qualified class name that needs to be loaded from an ! external class file. */ else RESOLVE_PACKAGE_NAME_P (qual_wfl) = 1; ! /* Propagate the qualification across other components of the qualified name */ for (qual = TREE_CHAIN (qual); qual; qual_wfl = QUAL_WFL (qual), qual = TREE_CHAIN (qual)) { if (RESOLVE_PACKAGE_NAME_P (qual_wfl)) RESOLVE_PACKAGE_NAME_P (QUAL_WFL (qual)) = 1; } /* Store the global qualification for the ambiguous part of ID back into ID fields */ ! if (RESOLVE_TYPE_NAME_P (qual_wfl)) RESOLVE_TYPE_NAME_P (id) = 1; else if (RESOLVE_PACKAGE_NAME_P (qual_wfl)) RESOLVE_PACKAGE_NAME_P (id) = 1; } static int ! breakdown_qualified (tree *left, tree *right, tree source) { char *p, *base; int l = IDENTIFIER_LENGTH (source); *************** breakdown_qualified (left, right, source *** 14533,14540 **** /* Return TRUE if two classes are from the same package. */ static int ! in_same_package (name1, name2) ! tree name1, name2; { tree tmp; tree pkg1; --- 14332,14338 ---- /* Return TRUE if two classes are from the same package. */ static int ! in_same_package (tree name1, tree name2) { tree tmp; tree pkg1; *************** in_same_package (name1, name2) *** 14564,14571 **** Same as java_complete_lhs, but does resolve static finals to values. */ static tree ! java_complete_tree (node) ! tree node; { node = java_complete_lhs (node); if (JDECL_P (node) && CLASS_FINAL_VARIABLE_P (node) --- 14362,14368 ---- Same as java_complete_lhs, but does resolve static finals to values. */ static tree ! java_complete_tree (tree node) { node = java_complete_lhs (node); if (JDECL_P (node) && CLASS_FINAL_VARIABLE_P (node) *************** java_complete_tree (node) *** 14580,14587 **** } static tree ! java_stabilize_reference (node) ! tree node; { if (TREE_CODE (node) == COMPOUND_EXPR) { --- 14377,14383 ---- } static tree ! java_stabilize_reference (tree node) { if (TREE_CODE (node) == COMPOUND_EXPR) { *************** java_stabilize_reference (node) *** 14599,14606 **** Same as java_complete_tree, but does not resolve static finals to values. */ static tree ! java_complete_lhs (node) ! tree node; { tree nn, cn, wfl_op1, wfl_op2, wfl_op3; int flag; --- 14395,14401 ---- Same as java_complete_tree, but does not resolve static finals to values. */ static tree ! java_complete_lhs (tree node) { tree nn, cn, wfl_op1, wfl_op2, wfl_op3; int flag; *************** java_complete_lhs (node) *** 14686,14691 **** --- 14481,14488 ---- && TREE_CODE (wfl_op2) != DEFAULT_EXPR) unreachable_stmt_error (*ptr); } + if (TREE_TYPE (*ptr) == NULL_TREE) + TREE_TYPE (*ptr) = void_type_node; ptr = next; } *ptr = java_complete_tree (*ptr); *************** java_complete_lhs (node) *** 14720,14728 **** case TRY_FINALLY_EXPR: COMPLETE_CHECK_OP_0 (node); COMPLETE_CHECK_OP_1 (node); ! if (TREE_OPERAND (node, 0) == empty_stmt_node) return TREE_OPERAND (node, 1); ! if (TREE_OPERAND (node, 1) == empty_stmt_node) return TREE_OPERAND (node, 0); CAN_COMPLETE_NORMALLY (node) = (CAN_COMPLETE_NORMALLY (TREE_OPERAND (node, 0)) --- 14517,14529 ---- case TRY_FINALLY_EXPR: COMPLETE_CHECK_OP_0 (node); COMPLETE_CHECK_OP_1 (node); ! /* Reduce try/finally nodes with an empty try block. */ ! if (TREE_OPERAND (node, 0) == empty_stmt_node ! || BLOCK_EMPTY_P (TREE_OPERAND (node, 0))) return TREE_OPERAND (node, 1); ! /* Likewise for an empty finally block. */ ! if (TREE_OPERAND (node, 1) == empty_stmt_node ! || BLOCK_EMPTY_P (TREE_OPERAND (node, 1))) return TREE_OPERAND (node, 0); CAN_COMPLETE_NORMALLY (node) = (CAN_COMPLETE_NORMALLY (TREE_OPERAND (node, 0)) *************** java_complete_lhs (node) *** 14959,14968 **** else { tree body; ! int save_lineno = lineno; ! lineno = EXPR_WFL_LINENO (node); body = java_complete_tree (EXPR_WFL_NODE (node)); ! lineno = save_lineno; EXPR_WFL_NODE (node) = body; TREE_SIDE_EFFECTS (node) = TREE_SIDE_EFFECTS (body); CAN_COMPLETE_NORMALLY (node) = CAN_COMPLETE_NORMALLY (body); --- 14760,14769 ---- else { tree body; ! int save_lineno = input_line; ! input_line = EXPR_WFL_LINENO (node); body = java_complete_tree (EXPR_WFL_NODE (node)); ! input_line = save_lineno; EXPR_WFL_NODE (node) = body; TREE_SIDE_EFFECTS (node) = TREE_SIDE_EFFECTS (body); CAN_COMPLETE_NORMALLY (node) = CAN_COMPLETE_NORMALLY (body); *************** java_complete_lhs (node) *** 15042,15054 **** int in_this = CALL_THIS_CONSTRUCTOR_P (node); int from_super = (EXPR_WFL_NODE (TREE_OPERAND (node, 0)) == super_identifier_node); node = patch_method_invocation (node, NULL_TREE, NULL_TREE, from_super, 0, &decl); if (node == error_mark_node) return error_mark_node; ! check_thrown_exceptions (EXPR_WFL_LINECOL (node), decl); /* If we call this(...), register signature and positions */ if (in_this) DECL_CONSTRUCTOR_CALLS (current_function_decl) = --- 14843,14862 ---- int in_this = CALL_THIS_CONSTRUCTOR_P (node); int from_super = (EXPR_WFL_NODE (TREE_OPERAND (node, 0)) == super_identifier_node); + tree arguments; + int location = EXPR_WFL_LINECOL (node); node = patch_method_invocation (node, NULL_TREE, NULL_TREE, from_super, 0, &decl); if (node == error_mark_node) return error_mark_node; ! if (TREE_CODE (node) == CALL_EXPR ! && TREE_OPERAND (node, 1) != NULL_TREE) ! arguments = TREE_VALUE (TREE_OPERAND (node, 1)); ! else ! arguments = NULL_TREE; ! check_thrown_exceptions (location, decl, arguments); /* If we call this(...), register signature and positions */ if (in_this) DECL_CONSTRUCTOR_CALLS (current_function_decl) = *************** java_complete_lhs (node) *** 15074,15081 **** /* When we have a primitype type, or a string and we're not emitting a class file, we actually don't want to generate anything for the assignment. */ ! if (value != NULL_TREE && ! (JPRIMITIVE_TYPE_P (TREE_TYPE (value)) || (TREE_TYPE (value) == string_ptr_type_node && ! flag_emit_class_files))) { --- 14882,14889 ---- /* When we have a primitype type, or a string and we're not emitting a class file, we actually don't want to generate anything for the assignment. */ ! if (value != NULL_TREE && ! (JPRIMITIVE_TYPE_P (TREE_TYPE (value)) || (TREE_TYPE (value) == string_ptr_type_node && ! flag_emit_class_files))) { *************** java_complete_lhs (node) *** 15243,15249 **** TREE_OPERAND (node, 1) = nn; } ! return force_evaluation_order (patch_binop (node, wfl_op1, wfl_op2)); case INSTANCEOF_EXPR: wfl_op1 = TREE_OPERAND (node, 0); --- 15051,15057 ---- TREE_OPERAND (node, 1) = nn; } ! return patch_binop (node, wfl_op1, wfl_op2); case INSTANCEOF_EXPR: wfl_op1 = TREE_OPERAND (node, 0); *************** java_complete_lhs (node) *** 15363,15370 **** error was found. */ static int ! complete_function_arguments (node) ! tree node; { int flag = 0; tree cn; --- 15171,15177 ---- error was found. */ static int ! complete_function_arguments (tree node) { int flag = 0; tree cn; *************** complete_function_arguments (node) *** 15397,15405 **** debugable. */ static tree ! build_debugable_stmt (location, stmt) ! int location; ! tree stmt; { if (TREE_CODE (stmt) != EXPR_WITH_FILE_LOCATION) { --- 15204,15210 ---- debugable. */ static tree ! build_debugable_stmt (int location, tree stmt) { if (TREE_CODE (stmt) != EXPR_WITH_FILE_LOCATION) { *************** build_debugable_stmt (location, stmt) *** 15411,15418 **** } static tree ! build_expr_block (body, decls) ! tree body, decls; { tree node = make_node (BLOCK); BLOCK_EXPR_DECLS (node) = decls; --- 15216,15223 ---- } static tree ! build_expr_block (tree body, tree decls) ! { tree node = make_node (BLOCK); BLOCK_EXPR_DECLS (node) = decls; *************** build_expr_block (body, decls) *** 15427,15433 **** function block chain */ static tree ! enter_block () { tree b = build_expr_block (NULL_TREE, NULL_TREE); --- 15232,15238 ---- function block chain */ static tree ! enter_block (void) { tree b = build_expr_block (NULL_TREE, NULL_TREE); *************** enter_block () *** 15461,15467 **** the block being exited isn't the method's top level one. */ static tree ! exit_block () { tree b; if (current_function_decl) --- 15266,15272 ---- the block being exited isn't the method's top level one. */ static tree ! exit_block (void) { tree b; if (current_function_decl) *************** exit_block () *** 15485,15492 **** scoping rules. */ static tree ! lookup_name_in_blocks (name) ! tree name; { tree b = GET_CURRENT_BLOCK (current_function_decl); --- 15290,15296 ---- scoping rules. */ static tree ! lookup_name_in_blocks (tree name) { tree b = GET_CURRENT_BLOCK (current_function_decl); *************** lookup_name_in_blocks (name) *** 15508,15520 **** } static void ! maybe_absorb_scoping_blocks () { while (BLOCK_IS_IMPLICIT (GET_CURRENT_BLOCK (current_function_decl))) { tree b = exit_block (); java_method_add_stmt (current_function_decl, b); ! SOURCE_FRONTEND_DEBUG (("Absorbing scoping block at line %d", lineno)); } } --- 15312,15324 ---- } static void ! maybe_absorb_scoping_blocks (void) { while (BLOCK_IS_IMPLICIT (GET_CURRENT_BLOCK (current_function_decl))) { tree b = exit_block (); java_method_add_stmt (current_function_decl, b); ! SOURCE_FRONTEND_DEBUG (("Absorbing scoping block at line %d", input_line)); } } *************** maybe_absorb_scoping_blocks () *** 15526,15538 **** /* Wrap a non WFL node around a WFL. */ static tree ! build_wfl_wrap (node, location) ! tree node; ! int location; { tree wfl, node_to_insert = node; ! /* We want to process THIS . xxx symbolicaly, to keep it consistent with the way we're processing SUPER. A THIS from a primary as a different form than a SUPER. Turn THIS into something symbolic */ if (TREE_CODE (node) == THIS_EXPR) --- 15330,15340 ---- /* Wrap a non WFL node around a WFL. */ static tree ! build_wfl_wrap (tree node, int location) { tree wfl, node_to_insert = node; ! /* We want to process THIS . xxx symbolically, to keep it consistent with the way we're processing SUPER. A THIS from a primary as a different form than a SUPER. Turn THIS into something symbolic */ if (TREE_CODE (node) == THIS_EXPR) *************** build_wfl_wrap (node, location) *** 15549,15556 **** we're currently dealing with the class java.lang.Object. */ static tree ! build_super_invocation (mdecl) ! tree mdecl; { if (DECL_CONTEXT (mdecl) == object_type_node) return empty_stmt_node; --- 15351,15357 ---- we're currently dealing with the class java.lang.Object. */ static tree ! build_super_invocation (tree mdecl) { if (DECL_CONTEXT (mdecl) == object_type_node) return empty_stmt_node; *************** build_super_invocation (mdecl) *** 15573,15582 **** /* Build a SUPER/THIS qualified method invocation. */ static tree ! build_this_super_qualified_invocation (use_this, name, args, lloc, rloc) ! int use_this; ! tree name, args; ! int lloc, rloc; { tree invok; tree wfl = --- 15374,15381 ---- /* Build a SUPER/THIS qualified method invocation. */ static tree ! build_this_super_qualified_invocation (int use_this, tree name, tree args, ! int lloc, int rloc) { tree invok; tree wfl = *************** build_this_super_qualified_invocation (u *** 15589,15597 **** /* Build an incomplete CALL_EXPR node. */ static tree ! build_method_invocation (name, args) ! tree name; ! tree args; { tree call = build (CALL_EXPR, NULL_TREE, name, args, NULL_TREE); TREE_SIDE_EFFECTS (call) = 1; --- 15388,15394 ---- /* Build an incomplete CALL_EXPR node. */ static tree ! build_method_invocation (tree name, tree args) { tree call = build (CALL_EXPR, NULL_TREE, name, args, NULL_TREE); TREE_SIDE_EFFECTS (call) = 1; *************** build_method_invocation (name, args) *** 15602,15609 **** /* Build an incomplete new xxx(...) node. */ static tree ! build_new_invocation (name, args) ! tree name, args; { tree call = build (NEW_CLASS_EXPR, NULL_TREE, name, args, NULL_TREE); TREE_SIDE_EFFECTS (call) = 1; --- 15399,15405 ---- /* Build an incomplete new xxx(...) node. */ static tree ! build_new_invocation (tree name, tree args) { tree call = build (NEW_CLASS_EXPR, NULL_TREE, name, args, NULL_TREE); TREE_SIDE_EFFECTS (call) = 1; *************** build_new_invocation (name, args) *** 15614,15622 **** /* Build an incomplete assignment expression. */ static tree ! build_assignment (op, op_location, lhs, rhs) ! int op, op_location; ! tree lhs, rhs; { tree assignment; /* Build the corresponding binop if we deal with a Compound --- 15410,15416 ---- /* Build an incomplete assignment expression. */ static tree ! build_assignment (int op, int op_location, tree lhs, tree rhs) { tree assignment; /* Build the corresponding binop if we deal with a Compound *************** build_assignment (op, op_location, lhs, *** 15636,15643 **** /* Print an INTEGER_CST node as decimal in a static buffer, and return the buffer. This is used only for string conversion. */ static char * ! string_convert_int_cst (node) ! tree node; { /* Long.MIN_VALUE is -9223372036854775808, 20 characters. */ static char buffer[21]; --- 15430,15436 ---- /* Print an INTEGER_CST node as decimal in a static buffer, and return the buffer. This is used only for string conversion. */ static char * ! string_convert_int_cst (tree node) { /* Long.MIN_VALUE is -9223372036854775808, 20 characters. */ static char buffer[21]; *************** string_convert_int_cst (node) *** 15712,15719 **** /* Print an INTEGER_CST node in a static buffer, and return the buffer. This is used only for error handling. */ char * ! print_int_node (node) ! tree node; { static char buffer [80]; if (TREE_CONSTANT_OVERFLOW (node)) --- 15505,15511 ---- /* Print an INTEGER_CST node in a static buffer, and return the buffer. This is used only for error handling. */ char * ! print_int_node (tree node) { static char buffer [80]; if (TREE_CONSTANT_OVERFLOW (node)) *************** print_int_node (node) *** 15724,15734 **** TREE_INT_CST_LOW (node)); else if (TREE_INT_CST_HIGH (node) == -1 && TREE_INT_CST_LOW (node) != 0) ! { ! buffer [0] = '-'; ! sprintf (&buffer [1], HOST_WIDE_INT_PRINT_UNSIGNED, ! -TREE_INT_CST_LOW (node)); ! } else sprintf (buffer, HOST_WIDE_INT_PRINT_DOUBLE_HEX, TREE_INT_CST_HIGH (node), TREE_INT_CST_LOW (node)); --- 15516,15523 ---- TREE_INT_CST_LOW (node)); else if (TREE_INT_CST_HIGH (node) == -1 && TREE_INT_CST_LOW (node) != 0) ! sprintf (buffer, "-" HOST_WIDE_INT_PRINT_UNSIGNED, ! -TREE_INT_CST_LOW (node)); else sprintf (buffer, HOST_WIDE_INT_PRINT_DOUBLE_HEX, TREE_INT_CST_HIGH (node), TREE_INT_CST_LOW (node)); *************** print_int_node (node) *** 15743,15751 **** /* 15.25 Assignment operators. */ static tree ! patch_assignment (node, wfl_op1) ! tree node; ! tree wfl_op1; { tree rhs = TREE_OPERAND (node, 1); tree lvalue = TREE_OPERAND (node, 0), llvalue; --- 15532,15538 ---- /* 15.25 Assignment operators. */ static tree ! patch_assignment (tree node, tree wfl_op1) { tree rhs = TREE_OPERAND (node, 1); tree lvalue = TREE_OPERAND (node, 0), llvalue; *************** patch_assignment (node, wfl_op1) *** 15927,15935 **** { tree tmp = build_decl (VAR_DECL, get_identifier (""), TREE_TYPE (new_rhs)); ! tree block = build (BLOCK, TREE_TYPE (new_rhs), NULL); tree assignment = build (MODIFY_EXPR, TREE_TYPE (new_rhs), tmp, fold (new_rhs)); BLOCK_VARS (block) = tmp; BLOCK_EXPR_BODY (block) = build (COMPOUND_EXPR, TREE_TYPE (new_rhs), assignment, tmp); --- 15714,15724 ---- { tree tmp = build_decl (VAR_DECL, get_identifier (""), TREE_TYPE (new_rhs)); ! tree block = make_node (BLOCK); tree assignment = build (MODIFY_EXPR, TREE_TYPE (new_rhs), tmp, fold (new_rhs)); + DECL_CONTEXT (tmp) = current_function_decl; + TREE_TYPE (block) = TREE_TYPE (new_rhs); BLOCK_VARS (block) = tmp; BLOCK_EXPR_BODY (block) = build (COMPOUND_EXPR, TREE_TYPE (new_rhs), assignment, tmp); *************** patch_assignment (node, wfl_op1) *** 15953,15960 **** modified rhs. */ static tree ! try_reference_assignconv (lhs_type, rhs) ! tree lhs_type, rhs; { tree new_rhs = NULL_TREE; tree rhs_type = TREE_TYPE (rhs); --- 15742,15748 ---- modified rhs. */ static tree ! try_reference_assignconv (tree lhs_type, tree rhs) { tree new_rhs = NULL_TREE; tree rhs_type = TREE_TYPE (rhs); *************** try_reference_assignconv (lhs_type, rhs) *** 15980,15987 **** builtin type. Return a converted RHS if the conversion is possible. */ static tree ! try_builtin_assignconv (wfl_op1, lhs_type, rhs) ! tree wfl_op1, lhs_type, rhs; { tree new_rhs = NULL_TREE; tree rhs_type = TREE_TYPE (rhs); --- 15768,15774 ---- builtin type. Return a converted RHS if the conversion is possible. */ static tree ! try_builtin_assignconv (tree wfl_op1, tree lhs_type, tree rhs) { tree new_rhs = NULL_TREE; tree rhs_type = TREE_TYPE (rhs); *************** try_builtin_assignconv (wfl_op1, lhs_typ *** 16028,16038 **** /* Return 1 if RHS_TYPE can be converted to LHS_TYPE by identity conversion (5.1.1) or widening primitive conversion (5.1.2). Return 0 is the conversion test fails. This implements parts the method ! invocation convertion (5.3). */ static int ! valid_builtin_assignconv_identity_widening_p (lhs_type, rhs_type) ! tree lhs_type, rhs_type; { /* 5.1.1: This is the identity conversion part. */ if (lhs_type == rhs_type) --- 15815,15824 ---- /* Return 1 if RHS_TYPE can be converted to LHS_TYPE by identity conversion (5.1.1) or widening primitive conversion (5.1.2). Return 0 is the conversion test fails. This implements parts the method ! invocation conversion (5.3). */ static int ! valid_builtin_assignconv_identity_widening_p (tree lhs_type, tree rhs_type) { /* 5.1.1: This is the identity conversion part. */ if (lhs_type == rhs_type) *************** valid_builtin_assignconv_identity_wideni *** 16077,16086 **** assignment check. */ static int ! valid_ref_assignconv_cast_p (source, dest, cast) ! tree source; ! tree dest; ! int cast; { /* SOURCE or DEST might be null if not from a declared entity. */ if (!source || !dest) --- 15863,15869 ---- assignment check. */ static int ! valid_ref_assignconv_cast_p (tree source, tree dest, int cast) { /* SOURCE or DEST might be null if not from a declared entity. */ if (!source || !dest) *************** valid_ref_assignconv_cast_p (source, des *** 16122,16128 **** /* Otherwise, SOURCE must implement DEST */ return interface_of_p (dest, source); } ! /* DEST is an array, cast permited if SOURCE is of Object type */ return (cast && source == object_type_node ? 1 : 0); } if (TYPE_INTERFACE_P (source)) --- 15905,15911 ---- /* Otherwise, SOURCE must implement DEST */ return interface_of_p (dest, source); } ! /* DEST is an array, cast permitted if SOURCE is of Object type */ return (cast && source == object_type_node ? 1 : 0); } if (TYPE_INTERFACE_P (source)) *************** valid_ref_assignconv_cast_p (source, des *** 16210,16218 **** } static int ! valid_cast_to_p (source, dest) ! tree source; ! tree dest; { if (TREE_CODE (source) == POINTER_TYPE) source = TREE_TYPE (source); --- 15993,15999 ---- } static int ! valid_cast_to_p (tree source, tree dest) { if (TREE_CODE (source) == POINTER_TYPE) source = TREE_TYPE (source); *************** valid_cast_to_p (source, dest) *** 16233,16240 **** } static tree ! do_unary_numeric_promotion (arg) ! tree arg; { tree type = TREE_TYPE (arg); if ((TREE_CODE (type) == INTEGER_TYPE && TYPE_PRECISION (type) < 32) --- 16014,16020 ---- } static tree ! do_unary_numeric_promotion (tree arg) { tree type = TREE_TYPE (arg); if ((TREE_CODE (type) == INTEGER_TYPE && TYPE_PRECISION (type) < 32) *************** do_unary_numeric_promotion (arg) *** 16246,16253 **** /* Return a nonzero value if SOURCE can be converted into DEST using the method invocation conversion rule (5.3). */ static int ! valid_method_invocation_conversion_p (dest, source) ! tree dest, source; { return ((JPRIMITIVE_TYPE_P (source) && JPRIMITIVE_TYPE_P (dest) && valid_builtin_assignconv_identity_widening_p (dest, source)) --- 16026,16032 ---- /* Return a nonzero value if SOURCE can be converted into DEST using the method invocation conversion rule (5.3). */ static int ! valid_method_invocation_conversion_p (tree dest, tree source) { return ((JPRIMITIVE_TYPE_P (source) && JPRIMITIVE_TYPE_P (dest) && valid_builtin_assignconv_identity_widening_p (dest, source)) *************** valid_method_invocation_conversion_p (de *** 16259,16268 **** /* Build an incomplete binop expression. */ static tree ! build_binop (op, op_location, op1, op2) ! enum tree_code op; ! int op_location; ! tree op1, op2; { tree binop = build (op, NULL_TREE, op1, op2); TREE_SIDE_EFFECTS (binop) = 1; --- 16038,16044 ---- /* Build an incomplete binop expression. */ static tree ! build_binop (enum tree_code op, int op_location, tree op1, tree op2) { tree binop = build (op, NULL_TREE, op1, op2); TREE_SIDE_EFFECTS (binop) = 1; *************** build_binop (op, op_location, op1, op2) *** 16279,16286 **** buffer. */ static char * ! operator_string (node) ! tree node; { #define BUILD_OPERATOR_STRING(S) \ { \ --- 16055,16061 ---- buffer. */ static char * ! operator_string (tree node) { #define BUILD_OPERATOR_STRING(S) \ { \ *************** operator_string (node) *** 16329,16336 **** /* Return 1 if VAR_ACCESS1 is equivalent to VAR_ACCESS2. */ static int ! java_decl_equiv (var_acc1, var_acc2) ! tree var_acc1, var_acc2; { if (JDECL_P (var_acc1)) return (var_acc1 == var_acc2); --- 16104,16110 ---- /* Return 1 if VAR_ACCESS1 is equivalent to VAR_ACCESS2. */ static int ! java_decl_equiv (tree var_acc1, tree var_acc2) { if (JDECL_P (var_acc1)) return (var_acc1 == var_acc2); *************** java_decl_equiv (var_acc1, var_acc2) *** 16346,16353 **** used in conjunction with the `=' operator in a compound assignment. */ static int ! binop_compound_p (code) ! enum tree_code code; { int i; for (i = 0; i < BINOP_COMPOUND_CANDIDATES; i++) --- 16120,16126 ---- used in conjunction with the `=' operator in a compound assignment. */ static int ! binop_compound_p (enum tree_code code) { int i; for (i = 0; i < BINOP_COMPOUND_CANDIDATES; i++) *************** binop_compound_p (code) *** 16360,16367 **** /* Reorganize after a fold to get SAVE_EXPR to generate what we want. */ static tree ! java_refold (t) ! tree t; { tree c, b, ns, decl; --- 16133,16139 ---- /* Reorganize after a fold to get SAVE_EXPR to generate what we want. */ static tree ! java_refold (tree t) { tree c, b, ns, decl; *************** java_refold (t) *** 16408,16417 **** of remaining nodes and detects more errors in certain cases. */ static tree ! patch_binop (node, wfl_op1, wfl_op2) ! tree node; ! tree wfl_op1; ! tree wfl_op2; { tree op1 = TREE_OPERAND (node, 0); tree op2 = TREE_OPERAND (node, 1); --- 16180,16186 ---- of remaining nodes and detects more errors in certain cases. */ static tree ! patch_binop (tree node, tree wfl_op1, tree wfl_op2) { tree op1 = TREE_OPERAND (node, 0); tree op2 = TREE_OPERAND (node, 1); *************** patch_binop (node, wfl_op1, wfl_op2) *** 16480,16486 **** if (code == RDIV_EXPR && TREE_CODE (prom_type) == INTEGER_TYPE) TREE_SET_CODE (node, TRUNC_DIV_EXPR); ! /* Before divisions as is disapear, try to simplify and bail if applicable, otherwise we won't perform even simple simplifications like (1-1)/3. We can't do that with floating point number, folds can't handle them at this stage. */ --- 16249,16255 ---- if (code == RDIV_EXPR && TREE_CODE (prom_type) == INTEGER_TYPE) TREE_SET_CODE (node, TRUNC_DIV_EXPR); ! /* Before divisions as is disappear, try to simplify and bail if applicable, otherwise we won't perform even simple simplifications like (1-1)/3. We can't do that with floating point number, folds can't handle them at this stage. */ *************** patch_binop (node, wfl_op1, wfl_op2) *** 16610,16616 **** } break; ! /* 15.19.1 Type Comparison Operator instaceof */ case INSTANCEOF_EXPR: TREE_TYPE (node) = boolean_type_node; --- 16379,16385 ---- } break; ! /* 15.19.1 Type Comparison Operator instanceof */ case INSTANCEOF_EXPR: TREE_TYPE (node) = boolean_type_node; *************** patch_binop (node, wfl_op1, wfl_op2) *** 16831,16840 **** zero value, the value of CSTE comes after the valude of STRING */ static tree ! do_merge_string_cste (cste, string, string_len, after) ! tree cste; ! const char *string; ! int string_len, after; { const char *old = TREE_STRING_POINTER (cste); int old_len = TREE_STRING_LENGTH (cste); --- 16600,16606 ---- zero value, the value of CSTE comes after the valude of STRING */ static tree ! do_merge_string_cste (tree cste, const char *string, int string_len, int after) { const char *old = TREE_STRING_POINTER (cste); int old_len = TREE_STRING_LENGTH (cste); *************** do_merge_string_cste (cste, string, stri *** 16859,16867 **** new STRING_CST on success, NULL_TREE on failure. */ static tree ! merge_string_cste (op1, op2, after) ! tree op1, op2; ! int after; { /* Handle two string constants right away. */ if (TREE_CODE (op2) == STRING_CST) --- 16625,16631 ---- new STRING_CST on success, NULL_TREE on failure. */ static tree ! merge_string_cste (tree op1, tree op2, int after) { /* Handle two string constants right away. */ if (TREE_CODE (op2) == STRING_CST) *************** merge_string_cste (op1, op2, after) *** 16881,16887 **** string = boolean_true; else if (op2 == boolean_false_node) string = boolean_false; ! else if (op2 == null_pointer_node) /* FIXME: null is not a compile-time constant, so it is only safe to merge if the overall expression is non-constant. However, this code always merges without checking the overall expression. */ --- 16645,16653 ---- string = boolean_true; else if (op2 == boolean_false_node) string = boolean_false; ! else if (op2 == null_pointer_node ! || (integer_zerop (op2) ! && TREE_CODE (TREE_TYPE (op2)) == POINTER_TYPE)) /* FIXME: null is not a compile-time constant, so it is only safe to merge if the overall expression is non-constant. However, this code always merges without checking the overall expression. */ *************** merge_string_cste (op1, op2, after) *** 16925,16932 **** NULL_TREE for each invocation of this routine. FIXME */ static tree ! string_constant_concatenation (op1, op2) ! tree op1, op2; { if (TREE_CODE (op1) == STRING_CST || (TREE_CODE (op2) == STRING_CST)) { --- 16691,16697 ---- NULL_TREE for each invocation of this routine. FIXME */ static tree ! string_constant_concatenation (tree op1, tree op2) { if (TREE_CODE (op1) == STRING_CST || (TREE_CODE (op2) == STRING_CST)) { *************** string_constant_concatenation (op1, op2) *** 16960,16967 **** called on it to turn it into a String object. */ static tree ! build_string_concatenation (op1, op2) ! tree op1, op2; { tree result; int side_effects = TREE_SIDE_EFFECTS (op1) | TREE_SIDE_EFFECTS (op2); --- 16725,16731 ---- called on it to turn it into a String object. */ static tree ! build_string_concatenation (tree op1, tree op2) { tree result; int side_effects = TREE_SIDE_EFFECTS (op1) | TREE_SIDE_EFFECTS (op2); *************** build_string_concatenation (op1, op2) *** 17030,17037 **** NULL. */ static tree ! patch_string (node) ! tree node; { if (node == error_mark_node) return error_mark_node; --- 16794,16800 ---- NULL. */ static tree ! patch_string (tree node) { if (node == error_mark_node) return error_mark_node; *************** patch_string (node) *** 17057,17064 **** /* Build the internal representation of a string constant. */ static tree ! patch_string_cst (node) ! tree node; { int location; if (! flag_emit_class_files) --- 16820,16826 ---- /* Build the internal representation of a string constant. */ static tree ! patch_string_cst (tree node) { int location; if (! flag_emit_class_files) *************** patch_string_cst (node) *** 17075,17083 **** /* Build an incomplete unary operator expression. */ static tree ! build_unaryop (op_token, op_location, op1) ! int op_token, op_location; ! tree op1; { enum tree_code op; tree unaryop; --- 16837,16843 ---- /* Build an incomplete unary operator expression. */ static tree ! build_unaryop (int op_token, int op_location, tree op1) { enum tree_code op; tree unaryop; *************** build_unaryop (op_token, op_location, op *** 17103,17112 **** later. IS_POST_P is 1 if the operator, 0 otherwise. */ static tree ! build_incdec (op_token, op_location, op1, is_post_p) ! int op_token, op_location; ! tree op1; ! int is_post_p; { static const enum tree_code lookup [2][2] = { --- 16863,16869 ---- later. IS_POST_P is 1 if the operator, 0 otherwise. */ static tree ! build_incdec (int op_token, int op_location, tree op1, int is_post_p) { static const enum tree_code lookup [2][2] = { *************** build_incdec (op_token, op_location, op1 *** 17128,17136 **** though its type is already set. */ static tree ! build_cast (location, type, exp) ! int location; ! tree type, exp; { tree node = build1 (CONVERT_EXPR, type, exp); EXPR_WFL_LINECOL (node) = location; --- 16885,16891 ---- though its type is already set. */ static tree ! build_cast (int location, tree type, tree exp) { tree node = build1 (CONVERT_EXPR, type, exp); EXPR_WFL_LINECOL (node) = location; *************** build_cast (location, type, exp) *** 17139,17157 **** /* Build an incomplete class reference operator. */ static tree ! build_incomplete_class_ref (location, class_name) ! int location; ! tree class_name; { tree node = build1 (CLASS_LITERAL, NULL_TREE, class_name); EXPR_WFL_LINECOL (node) = location; return node; } /* Complete an incomplete class reference operator. */ static tree ! patch_incomplete_class_ref (node) ! tree node; { tree type = TREE_OPERAND (node, 0); tree ref_type; --- 16894,16947 ---- /* Build an incomplete class reference operator. */ static tree ! build_incomplete_class_ref (int location, tree class_name) { tree node = build1 (CLASS_LITERAL, NULL_TREE, class_name); + tree class_decl = GET_CPC (); + tree this_class = TREE_TYPE (class_decl); + + /* Generate the synthetic static method `class$'. (Previously we + deferred this, causing different method tables to be emitted + for native code and bytecode.) */ + if (!TYPE_DOT_CLASS (this_class) + && !JPRIMITIVE_TYPE_P (class_name) + && !(TREE_CODE (class_name) == VOID_TYPE)) + { + tree target_class; + + if (CLASS_INTERFACE (TYPE_NAME (this_class))) + { + /* For interfaces, adding a static 'class$' method directly + is illegal. So create an inner class to contain the new + method. Empirically this matches the behavior of javac. */ + tree t = build_wfl_node (DECL_NAME (TYPE_NAME (object_type_node))); + tree inner = create_anonymous_class (0, t); + target_class = TREE_TYPE (inner); + end_class_declaration (1); + } + else + { + /* For inner classes, add a 'class$' method to their outermost + context, creating it if necessary. */ + while (INNER_CLASS_DECL_P (class_decl)) + class_decl = DECL_CONTEXT (class_decl); + target_class = TREE_TYPE (class_decl); + } + + if (TYPE_DOT_CLASS (target_class) == NULL_TREE) + build_dot_class_method (target_class); + + if (this_class != target_class) + TYPE_DOT_CLASS (this_class) = TYPE_DOT_CLASS (target_class); + } + EXPR_WFL_LINECOL (node) = location; return node; } /* Complete an incomplete class reference operator. */ static tree ! patch_incomplete_class_ref (tree node) { tree type = TREE_OPERAND (node, 0); tree ref_type; *************** patch_incomplete_class_ref (node) *** 17159,17165 **** if (!(ref_type = resolve_type_during_patch (type))) return error_mark_node; ! if (!flag_emit_class_files || JPRIMITIVE_TYPE_P (ref_type) || TREE_CODE (ref_type) == VOID_TYPE) { tree dot = build_class_ref (ref_type); --- 16949,16958 ---- if (!(ref_type = resolve_type_during_patch (type))) return error_mark_node; ! /* If we're not emitting class files and we know ref_type is a ! compiled class, build a direct reference. */ ! if ((! flag_emit_class_files && is_compiled_class (ref_type)) ! || JPRIMITIVE_TYPE_P (ref_type) || TREE_CODE (ref_type) == VOID_TYPE) { tree dot = build_class_ref (ref_type); *************** patch_incomplete_class_ref (node) *** 17170,17180 **** } /* If we're emitting class files and we have to deal with non ! primitive types, we invoke (and consider generating) the ! synthetic static method `class$'. */ ! if (!TYPE_DOT_CLASS (current_class)) ! build_dot_class_method (current_class); ! ref_type = build_dot_class_method_invocation (ref_type); return java_complete_tree (ref_type); } --- 16963,16970 ---- } /* If we're emitting class files and we have to deal with non ! primitive types, we invoke the synthetic static method `class$'. */ ! ref_type = build_dot_class_method_invocation (current_class, ref_type); return java_complete_tree (ref_type); } *************** patch_incomplete_class_ref (node) *** 17182,17190 **** but preserve the type of NODE if the type is fixed. */ static tree ! patch_unaryop (node, wfl_op) ! tree node; ! tree wfl_op; { tree op = TREE_OPERAND (node, 0); tree op_type = TREE_TYPE (op); --- 16972,16978 ---- but preserve the type of NODE if the type is fixed. */ static tree ! patch_unaryop (tree node, tree wfl_op) { tree op = TREE_OPERAND (node, 0); tree op_type = TREE_TYPE (op); *************** patch_unaryop (node, wfl_op) *** 17372,17379 **** message. Return the resolved type or NULL_TREE. */ static tree ! resolve_type_during_patch (type) ! tree type; { if (unresolved_type_p (type, NULL)) { --- 17160,17166 ---- message. Return the resolved type or NULL_TREE. */ static tree ! resolve_type_during_patch (tree type) { if (unresolved_type_p (type, NULL)) { *************** resolve_type_during_patch (type) *** 17385,17401 **** IDENTIFIER_POINTER (EXPR_WFL_NODE (type))); return NULL_TREE; } return TREE_TYPE (type_decl); } return type; } /* 5.5 Casting Conversion. error_mark_node is returned if an error is found. Otherwise NODE or something meant to replace it is returned. */ static tree ! patch_cast (node, wfl_op) ! tree node; ! tree wfl_op; { tree op = TREE_OPERAND (node, 0); tree cast_type = TREE_TYPE (node); --- 17172,17190 ---- IDENTIFIER_POINTER (EXPR_WFL_NODE (type))); return NULL_TREE; } + + check_deprecation (type, type_decl); + return TREE_TYPE (type_decl); } return type; } + /* 5.5 Casting Conversion. error_mark_node is returned if an error is found. Otherwise NODE or something meant to replace it is returned. */ static tree ! patch_cast (tree node, tree wfl_op) { tree op = TREE_OPERAND (node, 0); tree cast_type = TREE_TYPE (node); *************** patch_cast (node, wfl_op) *** 17418,17431 **** if (cast_type == op_type) return node; ! /* float and double type are converted to the original type main ! variant and then to the target type. */ ! if (JFLOAT_TYPE_P (op_type) && TREE_CODE (cast_type) == CHAR_TYPE) ! op = convert (integer_type_node, op); ! /* Try widening/narowwing convertion. Potentially, things need to be worked out in gcc so we implement the extreme cases ! correctly. fold_convert() needs to be fixed. */ return convert (cast_type, op); } --- 17207,17221 ---- if (cast_type == op_type) return node; ! /* A narrowing conversion from a floating-point number to an ! integral type requires special handling (5.1.3). */ ! if (JFLOAT_TYPE_P (op_type) && JINTEGRAL_TYPE_P (cast_type)) ! if (cast_type != long_type_node) ! op = convert (integer_type_node, op); ! /* Try widening/narrowing conversion. Potentially, things need to be worked out in gcc so we implement the extreme cases ! correctly. fold_convert() needs to be fixed. */ return convert (cast_type, op); } *************** patch_cast (node, wfl_op) *** 17478,17485 **** /* Build a null constant and give it the type TYPE. */ static tree ! build_null_of_type (type) ! tree type; { tree node = build_int_2 (0, 0); TREE_TYPE (node) = promote_type (type); --- 17268,17274 ---- /* Build a null constant and give it the type TYPE. */ static tree ! build_null_of_type (tree type) { tree node = build_int_2 (0, 0); TREE_TYPE (node) = promote_type (type); *************** build_null_of_type (type) *** 17489,17497 **** /* Build an ARRAY_REF incomplete tree node. Note that operand 1 isn't a list of indices. */ static tree ! build_array_ref (location, array, index) ! int location; ! tree array, index; { tree node = build (ARRAY_REF, NULL_TREE, array, index); EXPR_WFL_LINECOL (node) = location; --- 17278,17284 ---- /* Build an ARRAY_REF incomplete tree node. Note that operand 1 isn't a list of indices. */ static tree ! build_array_ref (int location, tree array, tree index) { tree node = build (ARRAY_REF, NULL_TREE, array, index); EXPR_WFL_LINECOL (node) = location; *************** build_array_ref (location, array, index) *** 17501,17508 **** /* 15.12 Array Access Expression */ static tree ! patch_array_ref (node) ! tree node; { tree array = TREE_OPERAND (node, 0); tree array_type = TREE_TYPE (array); --- 17288,17294 ---- /* 15.12 Array Access Expression */ static tree ! patch_array_ref (tree node) { tree array = TREE_OPERAND (node, 0); tree array_type = TREE_TYPE (array); *************** patch_array_ref (node) *** 17562,17571 **** /* 15.9 Array Creation Expressions */ static tree ! build_newarray_node (type, dims, extra_dims) ! tree type; ! tree dims; ! int extra_dims; { tree node = build (NEW_ARRAY_EXPR, NULL_TREE, type, nreverse (dims), --- 17348,17354 ---- /* 15.9 Array Creation Expressions */ static tree ! build_newarray_node (tree type, tree dims, int extra_dims) { tree node = build (NEW_ARRAY_EXPR, NULL_TREE, type, nreverse (dims), *************** build_newarray_node (type, dims, extra_d *** 17574,17581 **** } static tree ! patch_newarray (node) ! tree node; { tree type = TREE_OPERAND (node, 0); tree dims = TREE_OPERAND (node, 1); --- 17357,17363 ---- } static tree ! patch_newarray (tree node) { tree type = TREE_OPERAND (node, 0); tree dims = TREE_OPERAND (node, 1); *************** patch_newarray (node) *** 17678,17685 **** pin-point errors. */ static tree ! maybe_build_array_element_wfl (node) ! tree node; { if (TREE_CODE (node) != EXPR_WITH_FILE_LOCATION) return build_expr_wfl (NULL_TREE, ctxp->filename, --- 17460,17466 ---- pin-point errors. */ static tree ! maybe_build_array_element_wfl (tree node) { if (TREE_CODE (node) != EXPR_WITH_FILE_LOCATION) return build_expr_wfl (NULL_TREE, ctxp->filename, *************** maybe_build_array_element_wfl (node) *** 17693,17703 **** and expansion. */ static tree ! build_new_array_init (location, values) ! int location; ! tree values; { ! tree constructor = build (CONSTRUCTOR, NULL_TREE, NULL_TREE, values); tree to_return = build1 (NEW_ARRAY_INIT, NULL_TREE, constructor); EXPR_WFL_LINECOL (to_return) = location; return to_return; --- 17474,17482 ---- and expansion. */ static tree ! build_new_array_init (int location, tree values) { ! tree constructor = build_constructor (NULL_TREE, values); tree to_return = build1 (NEW_ARRAY_INIT, NULL_TREE, constructor); EXPR_WFL_LINECOL (to_return) = location; return to_return; *************** build_new_array_init (location, values) *** 17708,17715 **** appropriately. */ static tree ! patch_new_array_init (type, node) ! tree type, node; { int error_seen = 0; tree current, element_type; --- 17487,17493 ---- appropriately. */ static tree ! patch_new_array_init (tree type, tree node) { int error_seen = 0; tree current, element_type; *************** patch_new_array_init (type, node) *** 17772,17779 **** otherwise. */ static int ! array_constructor_check_entry (type, entry) ! tree type, entry; { char *array_type_string = NULL; /* For error reports */ tree value, type_value, new_value, wfl_value, patched; --- 17550,17556 ---- otherwise. */ static int ! array_constructor_check_entry (tree type, tree entry) { char *array_type_string = NULL; /* For error reports */ tree value, type_value, new_value, wfl_value, patched; *************** array_constructor_check_entry (type, ent *** 17822,17829 **** } static tree ! build_this (location) ! int location; { tree node = build_wfl_node (this_identifier_node); TREE_SET_CODE (node, THIS_EXPR); --- 17599,17605 ---- } static tree ! build_this (int location) { tree node = build_wfl_node (this_identifier_node); TREE_SET_CODE (node, THIS_EXPR); *************** build_this (location) *** 17836,17844 **** to be returned. */ static tree ! build_return (location, op) ! int location; ! tree op; { tree node = build1 (RETURN_EXPR, NULL_TREE, op); EXPR_WFL_LINECOL (node) = location; --- 17612,17618 ---- to be returned. */ static tree ! build_return (int location, tree op) { tree node = build1 (RETURN_EXPR, NULL_TREE, op); EXPR_WFL_LINECOL (node) = location; *************** build_return (location, op) *** 17847,17854 **** } static tree ! patch_return (node) ! tree node; { tree return_exp = TREE_OPERAND (node, 0); tree meth = current_function_decl; --- 17621,17627 ---- } static tree ! patch_return (tree node) { tree return_exp = TREE_OPERAND (node, 0); tree meth = current_function_decl; *************** patch_return (node) *** 17932,17940 **** /* 14.8 The if Statement */ static tree ! build_if_else_statement (location, expression, if_body, else_body) ! int location; ! tree expression, if_body, else_body; { tree node; if (!else_body) --- 17705,17712 ---- /* 14.8 The if Statement */ static tree ! build_if_else_statement (int location, tree expression, tree if_body, ! tree else_body) { tree node; if (!else_body) *************** build_if_else_statement (location, expre *** 17946,17953 **** } static tree ! patch_if_else_statement (node) ! tree node; { tree expression = TREE_OPERAND (node, 0); int can_complete_normally --- 17718,17724 ---- } static tree ! patch_if_else_statement (tree node) { tree expression = TREE_OPERAND (node, 0); int can_complete_normally *************** patch_if_else_statement (node) *** 17989,18002 **** /* 14.6 Labeled Statements */ ! /* Action taken when a lableled statement is parsed. a new LABELED_BLOCK_EXPR is created. No statement is attached to the label, yet. LABEL can be NULL_TREE for artificially-generated blocks. */ static tree ! build_labeled_block (location, label) ! int location; ! tree label; { tree label_name ; tree label_decl, node; --- 17760,17771 ---- /* 14.6 Labeled Statements */ ! /* Action taken when a labeled statement is parsed. a new LABELED_BLOCK_EXPR is created. No statement is attached to the label, yet. LABEL can be NULL_TREE for artificially-generated blocks. */ static tree ! build_labeled_block (int location, tree label) { tree label_name ; tree label_decl, node; *************** build_labeled_block (location, label) *** 18032,18040 **** /* A labeled statement LBE is attached a statement. */ static tree ! finish_labeled_statement (lbe, statement) ! tree lbe; /* Labeled block expr */ ! tree statement; { /* In anyways, tie the loop to its statement */ LABELED_BLOCK_BODY (lbe) = statement; --- 17801,17808 ---- /* A labeled statement LBE is attached a statement. */ static tree ! finish_labeled_statement (tree lbe, /* Labeled block expr */ ! tree statement) { /* In anyways, tie the loop to its statement */ LABELED_BLOCK_BODY (lbe) = statement; *************** finish_labeled_statement (lbe, statement *** 18049,18056 **** list. */ static tree ! build_new_loop (loop_body) ! tree loop_body; { tree loop = build (LOOP_EXPR, NULL_TREE, loop_body); TREE_SIDE_EFFECTS (loop) = 1; --- 17817,17823 ---- list. */ static tree ! build_new_loop (tree loop_body) { tree loop = build (LOOP_EXPR, NULL_TREE, loop_body); TREE_SIDE_EFFECTS (loop) = 1; *************** build_new_loop (loop_body) *** 18079,18088 **** */ static tree ! build_loop_body (location, condition, reversed) ! int location; ! tree condition; ! int reversed; { tree first, second, body; --- 17846,17852 ---- */ static tree ! build_loop_body (int location, tree condition, int reversed) { tree first, second, body; *************** build_loop_body (location, condition, re *** 18104,18113 **** loop list. */ static tree ! finish_loop_body (location, condition, body, reversed) ! int location; ! tree condition, body; ! int reversed; { tree to_return = ctxp->current_loop; tree loop_body = LOOP_EXPR_BODY (to_return); --- 17868,17874 ---- loop list. */ static tree ! finish_loop_body (int location, tree condition, tree body, int reversed) { tree to_return = ctxp->current_loop; tree loop_body = LOOP_EXPR_BODY (to_return); *************** finish_loop_body (location, condition, b *** 18130,18138 **** loops feature the condition part */ static tree ! finish_for_loop (location, condition, update, body) ! int location; ! tree condition, update, body; { /* Put the condition and the loop body in place */ tree loop = finish_loop_body (location, condition, body, 0); --- 17891,17897 ---- loops feature the condition part */ static tree ! finish_for_loop (int location, tree condition, tree update, tree body) { /* Put the condition and the loop body in place */ tree loop = finish_loop_body (location, condition, body, 0); *************** finish_for_loop (location, condition, up *** 18171,18178 **** LABELED_BLOCK_EXPR's block. */ static tree ! search_loop (statement) ! tree statement; { if (TREE_CODE (statement) == LOOP_EXPR) return statement; --- 17930,17936 ---- LABELED_BLOCK_EXPR's block. */ static tree ! search_loop (tree statement) { if (TREE_CODE (statement) == LOOP_EXPR) return statement; *************** search_loop (statement) *** 18194,18201 **** returned otherwise. */ static int ! labeled_block_contains_loop_p (block, loop) ! tree block, loop; { if (!block) return 0; --- 17952,17958 ---- returned otherwise. */ static int ! labeled_block_contains_loop_p (tree block, tree loop) { if (!block) return 0; *************** labeled_block_contains_loop_p (block, lo *** 18213,18220 **** insert LOOP as its body. */ static tree ! patch_loop_statement (loop) ! tree loop; { tree loop_label; --- 17970,17976 ---- insert LOOP as its body. */ static tree ! patch_loop_statement (tree loop) { tree loop_label; *************** patch_loop_statement (loop) *** 18236,18244 **** unlabeled break/continue statement. */ static tree ! build_bc_statement (location, is_break, name) ! int location, is_break; ! tree name; { tree break_continue, label_block_expr = NULL_TREE; --- 17992,17998 ---- unlabeled break/continue statement. */ static tree ! build_bc_statement (int location, int is_break, tree name) { tree break_continue, label_block_expr = NULL_TREE; *************** build_bc_statement (location, is_break, *** 18248,18254 **** (merge_qualified_name (label_id, EXPR_WFL_NODE (name))))) /* Null means that we don't have a target for this named break/continue. In this case, we make the target to be the ! label name, so that the error can be reported accuratly in patch_bc_statement. */ label_block_expr = EXPR_WFL_NODE (name); } --- 18002,18008 ---- (merge_qualified_name (label_id, EXPR_WFL_NODE (name))))) /* Null means that we don't have a target for this named break/continue. In this case, we make the target to be the ! label name, so that the error can be reported accurately in patch_bc_statement. */ label_block_expr = EXPR_WFL_NODE (name); } *************** build_bc_statement (location, is_break, *** 18267,18274 **** /* Verification of a break/continue statement. */ static tree ! patch_bc_statement (node) ! tree node; { tree bc_label = EXIT_BLOCK_LABELED_BLOCK (node), target_stmt; tree labeled_block = ctxp->current_labeled_block; --- 18021,18027 ---- /* Verification of a break/continue statement. */ static tree ! patch_bc_statement (tree node) { tree bc_label = EXIT_BLOCK_LABELED_BLOCK (node), target_stmt; tree labeled_block = ctxp->current_labeled_block; *************** patch_bc_statement (node) *** 18344,18351 **** boolean. */ static tree ! patch_exit_expr (node) ! tree node; { tree expression = TREE_OPERAND (node, 0); TREE_TYPE (node) = error_mark_node; --- 18097,18103 ---- boolean. */ static tree ! patch_exit_expr (tree node) { tree expression = TREE_OPERAND (node, 0); TREE_TYPE (node) = error_mark_node; *************** patch_exit_expr (node) *** 18380,18387 **** /* 14.9 Switch statement */ static tree ! patch_switch_statement (node) ! tree node; { tree se = TREE_OPERAND (node, 0), se_type; tree save, iter; --- 18132,18138 ---- /* 14.9 Switch statement */ static tree ! patch_switch_statement (tree node) { tree se = TREE_OPERAND (node, 0), se_type; tree save, iter; *************** patch_switch_statement (node) *** 18458,18466 **** /* Build an assertion expression for `assert CONDITION : VALUE'; VALUE might be NULL_TREE. */ static tree ! build_assertion (location, condition, value) ! int location; ! tree condition, value; { tree node; tree klass = GET_CPC (); --- 18209,18215 ---- /* Build an assertion expression for `assert CONDITION : VALUE'; VALUE might be NULL_TREE. */ static tree ! build_assertion (int location, tree condition, tree value) { tree node; tree klass = GET_CPC (); *************** build_assertion (location, condition, va *** 18479,18485 **** if (!TYPE_DOT_CLASS (class_type)) build_dot_class_method (class_type); ! classdollar = build_dot_class_method_invocation (class_type); /* Call CLASS.desiredAssertionStatus(). */ id = build_wfl_node (get_identifier ("desiredAssertionStatus")); --- 18228,18234 ---- if (!TYPE_DOT_CLASS (class_type)) build_dot_class_method (class_type); ! classdollar = build_dot_class_method_invocation (class_type, class_type); /* Call CLASS.desiredAssertionStatus(). */ id = build_wfl_node (get_identifier ("desiredAssertionStatus")); *************** build_assertion (location, condition, va *** 18537,18545 **** catches TYPE and executes CATCH_STMTS. */ static tree ! encapsulate_with_try_catch (location, type, try_stmts, catch_stmts) ! int location; ! tree type, try_stmts, catch_stmts; { tree try_block, catch_clause_param, catch_block, catch; --- 18286,18293 ---- catches TYPE and executes CATCH_STMTS. */ static tree ! encapsulate_with_try_catch (int location, tree type_or_name, tree try_stmts, ! tree catch_stmts) { tree try_block, catch_clause_param, catch_block, catch; *************** encapsulate_with_try_catch (location, ty *** 18547,18554 **** try_block = build_expr_block (try_stmts, NULL_TREE); /* Build a catch block: we need a catch clause parameter */ ! catch_clause_param = build_decl (VAR_DECL, ! wpv_id, build_pointer_type (type)); /* And a block */ catch_block = build_expr_block (NULL_TREE, catch_clause_param); --- 18295,18314 ---- try_block = build_expr_block (try_stmts, NULL_TREE); /* Build a catch block: we need a catch clause parameter */ ! if (TREE_CODE (type_or_name) == EXPR_WITH_FILE_LOCATION) ! { ! tree catch_type = obtain_incomplete_type (type_or_name); ! jdep *dep; ! catch_clause_param = build_decl (VAR_DECL, wpv_id, catch_type); ! register_incomplete_type (JDEP_VARIABLE, type_or_name, ! catch_clause_param, catch_type); ! dep = CLASSD_LAST (ctxp->classd_list); ! JDEP_GET_PATCH (dep) = &TREE_TYPE (catch_clause_param); ! } ! else ! catch_clause_param = build_decl (VAR_DECL, wpv_id, ! build_pointer_type (type_or_name)); ! /* And a block */ catch_block = build_expr_block (NULL_TREE, catch_clause_param); *************** encapsulate_with_try_catch (location, ty *** 18567,18575 **** } static tree ! build_try_statement (location, try_block, catches) ! int location; ! tree try_block, catches; { tree node = build (TRY_EXPR, NULL_TREE, try_block, catches); EXPR_WFL_LINECOL (node) = location; --- 18327,18333 ---- } static tree ! build_try_statement (int location, tree try_block, tree catches) { tree node = build (TRY_EXPR, NULL_TREE, try_block, catches); EXPR_WFL_LINECOL (node) = location; *************** build_try_statement (location, try_block *** 18577,18585 **** } static tree ! build_try_finally_statement (location, try_block, finally) ! int location; ! tree try_block, finally; { tree node = build (TRY_FINALLY_EXPR, NULL_TREE, try_block, finally); EXPR_WFL_LINECOL (node) = location; --- 18335,18341 ---- } static tree ! build_try_finally_statement (int location, tree try_block, tree finally) { tree node = build (TRY_FINALLY_EXPR, NULL_TREE, try_block, finally); EXPR_WFL_LINECOL (node) = location; *************** build_try_finally_statement (location, t *** 18587,18594 **** } static tree ! patch_try_statement (node) ! tree node; { int error_found = 0; tree try = TREE_OPERAND (node, 0); --- 18343,18349 ---- } static tree ! patch_try_statement (tree node) { int error_found = 0; tree try = TREE_OPERAND (node, 0); *************** patch_try_statement (node) *** 18699,18706 **** /* 14.17 The synchronized Statement */ static tree ! patch_synchronized_statement (node, wfl_op1) ! tree node, wfl_op1; { tree expr = java_complete_tree (TREE_OPERAND (node, 0)); tree block = TREE_OPERAND (node, 1); --- 18454,18460 ---- /* 14.17 The synchronized Statement */ static tree ! patch_synchronized_statement (tree node, tree wfl_op1) { tree expr = java_complete_tree (TREE_OPERAND (node, 0)); tree block = TREE_OPERAND (node, 1); *************** patch_synchronized_statement (node, wfl_ *** 18769,18776 **** /* 14.16 The throw Statement */ static tree ! patch_throw_statement (node, wfl_op1) ! tree node, wfl_op1; { tree expr = TREE_OPERAND (node, 0); tree type = TREE_TYPE (expr); --- 18523,18529 ---- /* 14.16 The throw Statement */ static tree ! patch_throw_statement (tree node, tree wfl_op1) { tree expr = TREE_OPERAND (node, 0); tree type = TREE_TYPE (expr); *************** patch_throw_statement (node, wfl_op1) *** 18869,18892 **** } /* Check that exception said to be thrown by method DECL can be ! effectively caught from where DECL is invoked. */ ! static void ! check_thrown_exceptions (location, decl) ! int location; ! tree decl; { tree throws; ! /* For all the unchecked exceptions thrown by DECL */ for (throws = DECL_FUNCTION_THROWS (decl); throws; throws = TREE_CHAIN (throws)) if (!check_thrown_exceptions_do (TREE_VALUE (throws))) { ! #if 1 ! /* Temporary hack to suppresses errors about cloning arrays. FIXME */ ! if (DECL_NAME (decl) == get_identifier ("clone")) continue; ! #endif EXPR_WFL_LINECOL (wfl_operator) = location; if (DECL_FINIT_P (current_function_decl)) parse_error_context --- 18622,18653 ---- } /* Check that exception said to be thrown by method DECL can be ! effectively caught from where DECL is invoked. THIS_EXPR is the ! expression that computes `this' for the method call. */ static void ! check_thrown_exceptions (int location, tree decl, tree this_expr) { tree throws; ! int is_array_call = 0; ! ! /* Skip check within generated methods, such as access$. */ ! if (OUTER_FIELD_ACCESS_IDENTIFIER_P (DECL_NAME (current_function_decl))) ! return; ! ! if (this_expr != NULL_TREE ! && TREE_CODE (TREE_TYPE (this_expr)) == POINTER_TYPE ! && TYPE_ARRAY_P (TREE_TYPE (TREE_TYPE (this_expr)))) ! is_array_call = 1; ! ! /* For all the unchecked exceptions thrown by DECL. */ for (throws = DECL_FUNCTION_THROWS (decl); throws; throws = TREE_CHAIN (throws)) if (!check_thrown_exceptions_do (TREE_VALUE (throws))) { ! /* Suppress errors about cloning arrays. */ ! if (is_array_call && DECL_NAME (decl) == get_identifier ("clone")) continue; ! EXPR_WFL_LINECOL (wfl_operator) = location; if (DECL_FINIT_P (current_function_decl)) parse_error_context *************** check_thrown_exceptions (location, decl) *** 18909,18916 **** current method. */ static int ! check_thrown_exceptions_do (exception) ! tree exception; { tree list = currently_caught_type_list; resolve_and_layout (exception, NULL_TREE); --- 18670,18676 ---- current method. */ static int ! check_thrown_exceptions_do (tree exception) { tree list = currently_caught_type_list; resolve_and_layout (exception, NULL_TREE); *************** check_thrown_exceptions_do (exception) *** 18930,18937 **** } static void ! purge_unchecked_exceptions (mdecl) ! tree mdecl; { tree throws = DECL_FUNCTION_THROWS (mdecl); tree new = NULL_TREE; --- 18690,18696 ---- } static void ! purge_unchecked_exceptions (tree mdecl) { tree throws = DECL_FUNCTION_THROWS (mdecl); tree new = NULL_TREE; *************** purge_unchecked_exceptions (mdecl) *** 18956,18963 **** otherwise. */ static bool ! ctors_unchecked_throws_clause_p (class_type) ! tree class_type; { tree current; --- 18715,18721 ---- otherwise. */ static bool ! ctors_unchecked_throws_clause_p (tree class_type) { tree current; *************** ctors_unchecked_throws_clause_p (class_t *** 18985,18992 **** /* 15.24 Conditional Operator ?: */ static tree ! patch_conditional_expr (node, wfl_cond, wfl_op1) ! tree node, wfl_cond, wfl_op1; { tree cond = TREE_OPERAND (node, 0); tree op1 = TREE_OPERAND (node, 1); --- 18743,18749 ---- /* 15.24 Conditional Operator ?: */ static tree ! patch_conditional_expr (tree node, tree wfl_cond, tree wfl_op1) { tree cond = TREE_OPERAND (node, 0); tree op1 = TREE_OPERAND (node, 1); *************** patch_conditional_expr (node, wfl_cond, *** 19099,19106 **** /* Wrap EXPR with code to initialize DECL's class, if appropriate. */ static tree ! maybe_build_class_init_for_field (decl, expr) ! tree decl, expr; { tree clas = DECL_CONTEXT (decl); if (flag_emit_class_files || flag_emit_xref) --- 18856,18862 ---- /* Wrap EXPR with code to initialize DECL's class, if appropriate. */ static tree ! maybe_build_class_init_for_field (tree decl, tree expr) { tree clas = DECL_CONTEXT (decl); if (flag_emit_class_files || flag_emit_xref) *************** maybe_build_class_init_for_field (decl, *** 19124,19132 **** CONTEXT is a static final VAR_DECL whose initializer we are folding. */ static tree ! fold_constant_for_init (node, context) ! tree node; ! tree context; { tree op0, op1, val; enum tree_code code = TREE_CODE (node); --- 18880,18886 ---- CONTEXT is a static final VAR_DECL whose initializer we are folding. */ static tree ! fold_constant_for_init (tree node, tree context) { tree op0, op1, val; enum tree_code code = TREE_CODE (node); *************** fold_constant_for_init (node, context) *** 19181,19187 **** if (val == NULL_TREE || ! TREE_CONSTANT (val)) return NULL_TREE; TREE_OPERAND (node, 0) = val; ! return patch_unaryop (node, op0); break; case COND_EXPR: --- 18935,18945 ---- if (val == NULL_TREE || ! TREE_CONSTANT (val)) return NULL_TREE; TREE_OPERAND (node, 0) = val; ! val = patch_unaryop (node, op0); ! if (! TREE_CONSTANT (val)) ! return NULL_TREE; ! return val; ! break; case COND_EXPR: *************** fold_constant_for_init (node, context) *** 19273,19330 **** 'M' for MethodName, 'E' for ExpressionName, and 'A' for AmbiguousName. */ tree ! resolve_simple_name (name, context) ! tree name; ! int context; { } tree ! resolve_qualified_name (name, context) ! tree name; ! int context; { } #endif - /* Mark P, which is really a `struct parser_ctxt **' for GC. */ - - static void - mark_parser_ctxt (p) - void *p; - { - struct parser_ctxt *pc = *((struct parser_ctxt **) p); - #ifndef JC1_LITE - size_t i; - #endif - - if (!pc) - return; - - #ifndef JC1_LITE - for (i = 0; i < ARRAY_SIZE (pc->modifier_ctx); ++i) - ggc_mark_tree (pc->modifier_ctx[i]); - ggc_mark_tree (pc->class_type); - ggc_mark_tree (pc->function_decl); - ggc_mark_tree (pc->package); - ggc_mark_tree (pc->class_list); - ggc_mark_tree (pc->current_parsed_class); - ggc_mark_tree (pc->current_parsed_class_un); - ggc_mark_tree (pc->non_static_initialized); - ggc_mark_tree (pc->static_initialized); - ggc_mark_tree (pc->instance_initializers); - ggc_mark_tree (pc->import_list); - ggc_mark_tree (pc->import_demand_list); - ggc_mark_tree (pc->current_loop); - ggc_mark_tree (pc->current_labeled_block); - #endif /* JC1_LITE */ - - if (pc->next) - mark_parser_ctxt (&pc->next); - } - void ! init_src_parse () { /* Sanity check; we've been bit by this before. */ if (ARRAY_SIZE (ctxp->modifier_ctx) != MODIFIER_TK - PUBLIC_TK) --- 19031,19048 ---- 'M' for MethodName, 'E' for ExpressionName, and 'A' for AmbiguousName. */ tree ! resolve_simple_name (tree name, int context) { } tree ! resolve_qualified_name (tree name, int context) { } #endif void ! init_src_parse (void) { /* Sanity check; we've been bit by this before. */ if (ARRAY_SIZE (ctxp->modifier_ctx) != MODIFIER_TK - PUBLIC_TK) *************** init_src_parse () *** 19339,19347 **** /* Attach to PTR (a block) the declaration found in ENTRY. */ static int ! attach_init_test_initialization_flags (entry, ptr) ! PTR *entry; ! PTR ptr; { tree block = (tree)ptr; struct treetreehash_entry *ite = (struct treetreehash_entry *) *entry; --- 19057,19063 ---- /* Attach to PTR (a block) the declaration found in ENTRY. */ static int ! attach_init_test_initialization_flags (void **entry, void *ptr) { tree block = (tree)ptr; struct treetreehash_entry *ite = (struct treetreehash_entry *) *entry; *************** attach_init_test_initialization_flags (e *** 19354,19369 **** return true; } ! /* This function is called for each classes that is known definitely ! assigned when a given static method was called. This function augments a compound expression (INFO) storing all assignment to initialized static class flags if a flag already existed, otherwise a new one is created. */ static int ! emit_test_initialization (entry_p, info) ! PTR *entry_p; ! PTR info; { tree l = (tree) info; tree decl, init; --- 19070,19083 ---- return true; } ! /* This function is called for each class that is known definitely ! initialized when a given static method was called. This function augments a compound expression (INFO) storing all assignment to initialized static class flags if a flag already existed, otherwise a new one is created. */ static int ! emit_test_initialization (void **entry_p, void *info) { tree l = (tree) info; tree decl, init; *************** emit_test_initialization (entry_p, info) *** 19391,19396 **** --- 19105,19112 ---- LOCAL_CLASS_INITIALIZATION_FLAG (decl) = 1; DECL_CONTEXT (decl) = current_function_decl; DECL_INITIAL (decl) = boolean_true_node; + /* Don't emit any symbolic debugging info for this decl. */ + DECL_IGNORED_P (decl) = 1; /* The trick is to find the right context for it. */ block = BLOCK_SUBBLOCKS (GET_CURRENT_BLOCK (current_function_decl)); diff -Nrc3pad gcc-3.3.3/gcc/java/parse.h gcc-3.4.0/gcc/java/parse.h *** gcc-3.3.3/gcc/java/parse.h 2002-08-04 22:45:31.000000000 +0000 --- gcc-3.4.0/gcc/java/parse.h 2003-10-09 05:44:57.000000000 +0000 *************** *** 1,21 **** /* Language parser definitions for the GNU compiler for the Java(TM) language. ! Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,22 ---- /* Language parser definitions for the GNU compiler for the Java(TM) language. ! Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 ! Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** extern int quiet_flag; *** 35,42 **** #ifndef JC1_LITE /* Function extern to java/ */ ! extern int int_fits_type_p PARAMS ((tree, tree)); ! extern tree stabilize_reference PARAMS ((tree)); #endif /* Macros for verbose debug info */ --- 36,43 ---- #ifndef JC1_LITE /* Function extern to java/ */ ! extern int int_fits_type_p (tree, tree); ! extern tree stabilize_reference (tree); #endif /* Macros for verbose debug info */ *************** extern tree stabilize_reference PARAMS ( *** 69,75 **** #define RECOVER {yyerrok; RECOVERED;} #define YYERROR_NOW ctxp->java_error_flag = 1 ! #define YYNOT_TWICE if (ctxp->prevent_ese != lineno) /* Accepted modifiers */ #define CLASS_MODIFIERS ACC_PUBLIC|ACC_ABSTRACT|ACC_FINAL|ACC_STRICT --- 70,76 ---- #define RECOVER {yyerrok; RECOVERED;} #define YYERROR_NOW ctxp->java_error_flag = 1 ! #define YYNOT_TWICE if (ctxp->prevent_ese != input_line) /* Accepted modifiers */ #define CLASS_MODIFIERS ACC_PUBLIC|ACC_ABSTRACT|ACC_FINAL|ACC_STRICT *************** extern tree stabilize_reference PARAMS ( *** 153,159 **** /* Quickly build a temporary pointer on hypothetical type NAME. */ #define BUILD_PTR_FROM_NAME(ptr, name) \ do { \ ! ptr = build (POINTER_TYPE, NULL_TREE); \ TYPE_NAME (ptr) = name; \ } while (0) --- 154,160 ---- /* Quickly build a temporary pointer on hypothetical type NAME. */ #define BUILD_PTR_FROM_NAME(ptr, name) \ do { \ ! ptr = make_node (POINTER_TYPE); \ TYPE_NAME (ptr) = name; \ } while (0) *************** enum { *** 426,434 **** INVOKE_VIRTUAL }; - /* We need the resolution stuff only if we compile jc1 */ - #ifndef JC1_LITE - /* Unresolved type identifiers handling. When we process the source code, we blindly accept an unknown type identifier and try to resolve it later. When an unknown type identifier is encountered --- 427,432 ---- *************** typedef struct _jdep { *** 508,520 **** #define JDEP_RESOLVED_P(J) \ (!(J)->solv || TREE_CODE ((J)->solv) != POINTER_TYPE) ! typedef struct _jdeplist { jdep *first; jdep *last; ! struct _jdeplist *next; ! } jdeplist; ! ! #endif /* JC1_LITE */ #define CLASSD_FIRST(CD) ((CD)->first) #define CLASSD_LAST(CD) ((CD)->last) --- 506,517 ---- #define JDEP_RESOLVED_P(J) \ (!(J)->solv || TREE_CODE ((J)->solv) != POINTER_TYPE) ! struct jdeplist_s { jdep *first; jdep *last; ! struct jdeplist_s *next; ! }; ! typedef struct jdeplist_s jdeplist; #define CLASSD_FIRST(CD) ((CD)->first) #define CLASSD_LAST(CD) ((CD)->last) *************** typedef struct _jdeplist { *** 613,626 **** #define GET_CURRENT_BLOCK(F) ((F) ? DECL_FUNCTION_BODY ((F)) : \ current_static_block) - /* Merge an other line to the source line number of a decl. Used to - remember function's end. */ - #define DECL_SOURCE_LINE_MERGE(DECL,NO) DECL_SOURCE_LINE(DECL) |= (NO << 16) - - /* Retrieve those two info separately. */ - #define DECL_SOURCE_LINE_FIRST(DECL) (DECL_SOURCE_LINE(DECL) & 0x0000ffff) - #define DECL_SOURCE_LINE_LAST(DECL) (DECL_SOURCE_LINE(DECL) >> 16) - /* Retrieve line/column from a WFL. */ #define EXPR_WFL_GET_LINECOL(V,LINE,COL) \ { \ --- 610,615 ---- *************** typedef struct _jdeplist { *** 703,708 **** --- 692,705 ---- java_check_regular_methods ((CLASS)); \ } + #define CLEAR_DEPRECATED ctxp->deprecated = 0 + + #define CHECK_DEPRECATED_NO_RESET(DECL) \ + { \ + if (ctxp->deprecated) \ + DECL_DEPRECATED (DECL) = 1; \ + } + /* Using and reseting the @deprecated tag flag */ #define CHECK_DEPRECATED(DECL) \ { \ *************** typedef struct _jdeplist { *** 726,739 **** #define DECL_INHERITED_SOURCE_LINE(DECL) (DECL_CHECK (DECL)->decl.u2.i) /* Parser context data structure. */ ! struct parser_ctxt { const char *filename; /* Current filename */ struct parser_ctxt *next; ! java_lexer *lexer; /* Current lexer state */ char marker_begining; /* Marker. Should be a sub-struct */ ! struct java_line *p_line, *c_line; /* Previous and current line */ java_lc elc; /* Error's line column info */ int ccb_indent; /* Keep track of {} indent, lexer */ int first_ccb_indent1; /* First { at ident level 1 */ --- 723,737 ---- #define DECL_INHERITED_SOURCE_LINE(DECL) (DECL_CHECK (DECL)->decl.u2.i) /* Parser context data structure. */ ! struct parser_ctxt GTY(()) { const char *filename; /* Current filename */ struct parser_ctxt *next; ! java_lexer * GTY((skip (""))) lexer; /* Current lexer state */ char marker_begining; /* Marker. Should be a sub-struct */ ! struct java_line * GTY ((skip (""))) p_line; /* Previous line */ ! struct java_line * GTY ((skip (""))) c_line; /* Current line */ java_lc elc; /* Error's line column info */ int ccb_indent; /* Keep track of {} indent, lexer */ int first_ccb_indent1; /* First { at ident level 1 */ *************** struct parser_ctxt { *** 741,747 **** int parser_ccb_indent; /* Keep track of {} indent, parser */ int osb_depth; /* Current depth of [ in an expression */ int osb_limit; /* Limit of this depth */ ! int *osb_number; /* Keep track of ['s */ int lineno; /* Current lineno */ char marker_end; /* End marker. Should be a sub-struct */ --- 739,745 ---- int parser_ccb_indent; /* Keep track of {} indent, parser */ int osb_depth; /* Current depth of [ in an expression */ int osb_limit; /* Limit of this depth */ ! int * GTY ((skip (""))) osb_number; /* Keep track of ['s */ int lineno; /* Current lineno */ char marker_end; /* End marker. Should be a sub-struct */ *************** struct parser_ctxt { *** 760,772 **** /* Flag to report certain errors (fix this documentation. FIXME) */ unsigned class_err:1; ! /* This section is defined only if we compile jc1 */ ! #ifndef JC1_LITE tree modifier_ctx [12]; /* WFL of modifiers */ tree class_type; /* Current class */ tree function_decl; /* Current function decl, save/restore */ ! struct JCF *current_jcf; /* CU jcf */ int prevent_ese; /* Prevent expression statement error */ --- 758,769 ---- /* Flag to report certain errors (fix this documentation. FIXME) */ unsigned class_err:1; ! /* This section is used only if we compile jc1 */ tree modifier_ctx [12]; /* WFL of modifiers */ tree class_type; /* Current class */ tree function_decl; /* Current function decl, save/restore */ ! struct JCF * current_jcf; /* CU jcf */ int prevent_ese; /* Prevent expression statement error */ *************** struct parser_ctxt { *** 777,783 **** /* These two lists won't survive file traversal */ tree class_list; /* List of classes in a CU */ ! jdeplist *classd_list; /* Classe dependencies in a CU */ tree current_parsed_class; /* Class currently parsed */ tree current_parsed_class_un; /* Curr. parsed class unqualified name */ --- 774,780 ---- /* These two lists won't survive file traversal */ tree class_list; /* List of classes in a CU */ ! jdeplist * GTY((skip (""))) classd_list; /* Classe dependencies in a CU */ tree current_parsed_class; /* Class currently parsed */ tree current_parsed_class_un; /* Curr. parsed class unqualified name */ *************** struct parser_ctxt { *** 800,806 **** constructor. This flag is used to trap illegal argument usage during an explicit constructor invocation. */ - #endif /* JC1_LITE */ }; /* A set of macros to push/pop/access the currently parsed class. */ --- 797,802 ---- *************** struct parser_ctxt { *** 919,952 **** #define JAVA_RADIX10_FLAG(NODE) TREE_LANG_FLAG_0(NODE) #ifndef JC1_LITE ! void java_complete_class PARAMS ((void)); ! void java_check_circular_reference PARAMS ((void)); ! void java_fix_constructors PARAMS ((void)); ! void java_layout_classes PARAMS ((void)); ! void java_reorder_fields PARAMS ((void)); ! tree java_method_add_stmt PARAMS ((tree, tree)); ! int java_report_errors PARAMS ((void)); ! extern tree do_resolve_class PARAMS ((tree, tree, tree, tree)); #endif ! char *java_get_line_col PARAMS ((const char *, int, int)); ! extern void reset_report PARAMS ((void)); /* Always in use, no matter what you compile */ ! void java_push_parser_context PARAMS ((void)); ! void java_pop_parser_context PARAMS ((int)); ! void java_init_lex PARAMS ((FILE *, const char *)); ! extern void java_parser_context_save_global PARAMS ((void)); ! extern void java_parser_context_restore_global PARAMS ((void)); ! int yyparse PARAMS ((void)); ! extern int java_parse PARAMS ((void)); ! extern void yyerror PARAMS ((const char *)) #ifdef JC1_LITE ATTRIBUTE_NORETURN #endif ; ! extern void java_expand_classes PARAMS ((void)); ! extern struct parser_ctxt *ctxp; ! extern struct parser_ctxt *ctxp_for_generation; #endif /* ! GCC_JAVA_PARSE_H */ --- 915,949 ---- #define JAVA_RADIX10_FLAG(NODE) TREE_LANG_FLAG_0(NODE) #ifndef JC1_LITE ! void java_complete_class (void); ! void java_check_circular_reference (void); ! void java_fix_constructors (void); ! void java_layout_classes (void); ! void java_reorder_fields (void); ! tree java_method_add_stmt (tree, tree); ! int java_report_errors (void); ! extern tree do_resolve_class (tree, tree, tree, tree); #endif ! char *java_get_line_col (const char *, int, int); ! extern void reset_report (void); /* Always in use, no matter what you compile */ ! void java_push_parser_context (void); ! void java_pop_parser_context (int); ! void java_init_lex (FILE *, const char *); ! extern void java_parser_context_save_global (void); ! extern void java_parser_context_restore_global (void); ! int yyparse (void); ! extern int java_parse (void); ! extern void yyerror (const char *) #ifdef JC1_LITE ATTRIBUTE_NORETURN #endif ; ! extern void java_expand_classes (void); ! extern void java_finish_classes (void); ! extern GTY(()) struct parser_ctxt *ctxp; ! extern GTY(()) struct parser_ctxt *ctxp_for_generation; #endif /* ! GCC_JAVA_PARSE_H */ diff -Nrc3pad gcc-3.3.3/gcc/java/parse-scan.c gcc-3.4.0/gcc/java/parse-scan.c *** gcc-3.3.3/gcc/java/parse-scan.c 2004-02-14 20:46:49.000000000 +0000 --- gcc-3.4.0/gcc/java/parse-scan.c 2004-04-19 02:26:21.000000000 +0000 *************** *** 1,5 **** ! /* A Bison parser, made from /home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y ! by GNU bison 1.33. */ #define YYBISON 1 /* Identify Bison output. */ --- 1,5 ---- ! /* A Bison parser, made from /home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y ! by GNU bison 1.35. */ #define YYBISON 1 /* Identify Bison output. */ *************** *** 113,145 **** # define BOOL_LIT_TK 364 # define NULL_TK 365 ! #line 37 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" #define JC1_LITE #include "config.h" #include "system.h" ! #include "obstack.h" #include "toplev.h" - #define obstack_chunk_alloc xmalloc - #define obstack_chunk_free free - - extern char *input_filename; extern FILE *finput, *out; /* Obstack for the lexer. */ struct obstack temporary_obstack; /* The current parser context. */ ! static struct parser_ctxt *ctxp; ! /* Error and warning counts, current line number, because they're used ! elsewhere */ int java_error_count; int java_warning_count; - int lineno; /* Tweak default rules when necessary. */ static int absorber; --- 113,145 ---- # define BOOL_LIT_TK 364 # define NULL_TK 365 ! #line 37 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" #define JC1_LITE #include "config.h" #include "system.h" ! #include "coretypes.h" ! #include "tm.h" ! #include "input.h" #include "obstack.h" #include "toplev.h" extern FILE *finput, *out; + + /* Current position in real source file. */ + + location_t input_location; /* Obstack for the lexer. */ struct obstack temporary_obstack; /* The current parser context. */ ! struct parser_ctxt *ctxp; ! /* Error and warning counts, because they're used elsewhere */ int java_error_count; int java_warning_count; /* Tweak default rules when necessary. */ static int absorber; *************** struct method_declarator { *** 187,213 **** }; #define NEW_METHOD_DECLARATOR(D,N,A) \ { \ ! (D) = \ ! (struct method_declarator *)xmalloc (sizeof (struct method_declarator)); \ (D)->method_name = (N); \ (D)->args = (A); \ } /* Two actions for this grammar */ ! static int make_class_name_recursive PARAMS ((struct obstack *stack, ! struct class_context *ctx)); ! static char *get_class_name PARAMS ((void)); ! static void report_class_declaration PARAMS ((const char *)); ! static void report_main_declaration PARAMS ((struct method_declarator *)); ! static void push_class_context PARAMS ((const char *)); ! static void pop_class_context PARAMS ((void)); ! void report PARAMS ((void)); #include "lex.h" #include "parse.h" ! #line 131 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" #ifndef YYSTYPE typedef union { char *node; --- 187,212 ---- }; #define NEW_METHOD_DECLARATOR(D,N,A) \ { \ ! (D) = xmalloc (sizeof (struct method_declarator)); \ (D)->method_name = (N); \ (D)->args = (A); \ } /* Two actions for this grammar */ ! static int make_class_name_recursive (struct obstack *stack, ! struct class_context *ctx); ! static char *get_class_name (void); ! static void report_class_declaration (const char *); ! static void report_main_declaration (struct method_declarator *); ! static void push_class_context (const char *); ! static void pop_class_context (void); ! void report (void); #include "lex.h" #include "parse.h" ! #line 130 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" #ifndef YYSTYPE typedef union { char *node; *************** typedef union { *** 215,222 **** int value; /* For modifiers */ } yystype; # define YYSTYPE yystype #endif ! #line 137 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" extern int flag_assert; --- 214,222 ---- int value; /* For modifiers */ } yystype; # define YYSTYPE yystype + # define YYSTYPE_IS_TRIVIAL 1 #endif ! #line 136 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" extern int flag_assert; *************** static const short yyrhs[] = *** 442,483 **** /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const short yyrline[] = { ! 0, 210, 215, 217, 218, 219, 220, 221, 225, 227, ! 230, 236, 241, 248, 250, 253, 257, 261, 265, 271, ! 279, 281, 284, 288, 295, 300, 301, 302, 303, 304, ! 305, 306, 307, 310, 312, 315, 317, 320, 325, 327, ! 330, 334, 338, 340, 341, 347, 356, 367, 367, 374, ! 374, 379, 380, 383, 384, 387, 390, 394, 397, 401, ! 403, 406, 408, 409, 410, 413, 415, 416, 417, 418, ! 422, 425, 429, 432, 435, 437, 440, 443, 447, 449, ! 453, 453, 460, 463, 464, 466, 473, 480, 486, 489, ! 491, 497, 513, 529, 530, 533, 536, 540, 542, 546, ! 550, 560, 562, 565, 567, 573, 576, 580, 582, 583, ! 584, 588, 590, 593, 595, 599, 601, 606, 606, 610, ! 610, 613, 613, 616, 616, 621, 623, 626, 629, 633, ! 635, 638, 640, 641, 642, 645, 649, 654, 656, 657, ! 658, 661, 663, 667, 669, 672, 674, 677, 679, 680, ! 683, 687, 690, 694, 696, 697, 698, 699, 700, 703, ! 705, 706, 707, 708, 711, 713, 714, 715, 716, 717, ! 718, 719, 720, 721, 722, 723, 726, 730, 735, 739, ! 745, 749, 751, 752, 753, 754, 755, 756, 759, 763, ! 768, 773, 777, 779, 780, 781, 784, 786, 789, 794, ! 796, 799, 801, 804, 808, 812, 816, 820, 825, 827, ! 830, 832, 835, 839, 842, 843, 844, 847, 848, 851, ! 853, 856, 858, 863, 865, 868, 870, 873, 877, 879, ! 880, 882, 885, 887, 890, 895, 897, 898, 901, 903, ! 906, 910, 915, 917, 920, 922, 923, 924, 925, 926, ! 927, 928, 932, 936, 939, 941, 943, 947, 949, 950, ! 951, 952, 953, 954, 957, 957, 961, 961, 966, 969, ! 972, 974, 975, 978, 980, 981, 982, 985, 986, 989, ! 991, 994, 998, 1001, 1005, 1007, 1013, 1016, 1018, 1019, ! 1020, 1021, 1024, 1027, 1030, 1032, 1034, 1035, 1038, 1042, ! 1046, 1048, 1049, 1050, 1051, 1054, 1058, 1062, 1064, 1065, ! 1066, 1069, 1071, 1072, 1073, 1076, 1078, 1079, 1080, 1083, ! 1085, 1086, 1089, 1091, 1092, 1093, 1096, 1098, 1099, 1100, ! 1101, 1102, 1105, 1107, 1108, 1111, 1113, 1116, 1118, 1121, ! 1123, 1126, 1128, 1132, 1134, 1138, 1140, 1144, 1146, 1149, ! 1153, 1156, 1157, 1160, 1162, 1165, 1169 }; #endif --- 442,483 ---- /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const short yyrline[] = { ! 0, 209, 214, 216, 217, 218, 219, 220, 224, 226, ! 229, 235, 240, 247, 249, 252, 256, 260, 264, 270, ! 278, 280, 283, 287, 294, 299, 300, 301, 302, 303, ! 304, 305, 306, 309, 311, 314, 316, 319, 324, 326, ! 329, 333, 337, 339, 340, 346, 355, 366, 366, 373, ! 373, 378, 379, 382, 383, 386, 389, 393, 396, 400, ! 402, 405, 407, 408, 409, 412, 414, 415, 416, 417, ! 421, 424, 428, 431, 434, 436, 439, 442, 446, 448, ! 452, 452, 459, 462, 463, 465, 472, 479, 485, 488, ! 490, 496, 512, 528, 529, 532, 535, 539, 541, 545, ! 549, 559, 561, 564, 566, 572, 575, 579, 581, 582, ! 583, 587, 589, 592, 594, 598, 600, 605, 605, 609, ! 609, 612, 612, 615, 615, 620, 622, 625, 628, 632, ! 634, 637, 639, 640, 641, 644, 648, 653, 655, 656, ! 657, 660, 662, 666, 668, 671, 673, 676, 678, 679, ! 682, 686, 689, 693, 695, 696, 697, 698, 699, 702, ! 704, 705, 706, 707, 710, 712, 713, 714, 715, 716, ! 717, 718, 719, 720, 721, 722, 725, 729, 734, 738, ! 744, 748, 750, 751, 752, 753, 754, 755, 758, 762, ! 767, 772, 776, 778, 779, 780, 783, 785, 788, 793, ! 795, 798, 800, 803, 807, 811, 815, 819, 824, 826, ! 829, 831, 834, 838, 841, 842, 843, 846, 847, 850, ! 852, 855, 857, 862, 864, 867, 869, 872, 876, 878, ! 879, 881, 884, 886, 889, 894, 896, 897, 900, 902, ! 905, 909, 914, 916, 919, 921, 922, 923, 924, 925, ! 926, 927, 931, 935, 938, 940, 942, 946, 948, 949, ! 950, 951, 952, 953, 956, 956, 960, 960, 965, 968, ! 971, 973, 974, 977, 979, 980, 981, 984, 985, 988, ! 990, 993, 997, 1000, 1004, 1006, 1012, 1015, 1017, 1018, ! 1019, 1020, 1023, 1026, 1029, 1031, 1033, 1034, 1037, 1041, ! 1045, 1047, 1048, 1049, 1050, 1053, 1057, 1061, 1063, 1064, ! 1065, 1068, 1070, 1071, 1072, 1075, 1077, 1078, 1079, 1082, ! 1084, 1085, 1088, 1090, 1091, 1092, 1095, 1097, 1098, 1099, ! 1100, 1101, 1104, 1106, 1107, 1110, 1112, 1115, 1117, 1120, ! 1122, 1125, 1127, 1131, 1133, 1137, 1139, 1143, 1145, 1148, ! 1152, 1155, 1156, 1159, 1161, 1164, 1168 }; #endif *************** static const short yycheck[] = *** 1531,1546 **** define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ - #ifdef __cplusplus - # define YYSTD(x) std::x - #else - # define YYSTD(x) x - #endif - - #ifndef YYPARSE_RETURN_TYPE - #define YYPARSE_RETURN_TYPE int - #endif - #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE) /* The parser invokes alloca or malloc; define the necessary symbols. */ --- 1531,1536 ---- *************** static const short yycheck[] = *** 1563,1580 **** /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # else ! # ifdef __cplusplus ! # include /* INFRINGES ON USER NAME SPACE */ ! # define YYSIZE_T std::size_t ! # else ! # ifdef __STDC__ ! # include /* INFRINGES ON USER NAME SPACE */ ! # define YYSIZE_T size_t ! # endif # endif ! # define YYSTACK_ALLOC YYSTD (malloc) ! # define YYSTACK_FREE YYSTD (free) # endif /* A type that is properly aligned for any stack member. */ union yyalloc --- 1553,1571 ---- /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # else ! # if defined (__STDC__) || defined (__cplusplus) ! # include /* INFRINGES ON USER NAME SPACE */ ! # define YYSIZE_T size_t # endif ! # define YYSTACK_ALLOC malloc ! # define YYSTACK_FREE free # endif + #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ + + + #if (! defined (yyoverflow) \ + && (! defined (__cplusplus) \ + || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc *************** union yyalloc *** 1601,1624 **** + YYSTACK_GAP_MAX) # endif ! /* Relocate the TYPE STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ ! # define YYSTACK_RELOCATE(Type, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ ! yymemcpy ((char *) yyptr, (char *) (Stack), \ ! yysize * (YYSIZE_T) sizeof (Type)); \ Stack = &yyptr->Stack; \ ! yynewbytes = yystacksize * sizeof (Type) + YYSTACK_GAP_MAX; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (0) ! #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) --- 1592,1632 ---- + YYSTACK_GAP_MAX) # endif ! /* Copy COUNT objects from FROM to TO. The source and destination do ! not overlap. */ ! # ifndef YYCOPY ! # if 1 < __GNUC__ ! # define YYCOPY(To, From, Count) \ ! __builtin_memcpy (To, From, (Count) * sizeof (*(From))) ! # else ! # define YYCOPY(To, From, Count) \ ! do \ ! { \ ! register YYSIZE_T yyi; \ ! for (yyi = 0; yyi < (Count); yyi++) \ ! (To)[yyi] = (From)[yyi]; \ ! } \ ! while (0) ! # endif ! # endif ! ! /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ ! # define YYSTACK_RELOCATE(Stack) \ do \ { \ YYSIZE_T yynewbytes; \ ! YYCOPY (&yyptr->Stack, Stack, yysize); \ Stack = &yyptr->Stack; \ ! yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (0) ! #endif #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) *************** union yyalloc *** 1628,1641 **** # define YYSIZE_T size_t #endif #if ! defined (YYSIZE_T) ! # ifdef __cplusplus ! # include /* INFRINGES ON USER NAME SPACE */ ! # define YYSIZE_T std::size_t ! # else ! # ifdef __STDC__ ! # include /* INFRINGES ON USER NAME SPACE */ ! # define YYSIZE_T size_t ! # endif # endif #endif #if ! defined (YYSIZE_T) --- 1636,1644 ---- # define YYSIZE_T size_t #endif #if ! defined (YYSIZE_T) ! # if defined (__STDC__) || defined (__cplusplus) ! # include /* INFRINGES ON USER NAME SPACE */ ! # define YYSIZE_T size_t # endif #endif #if ! defined (YYSIZE_T) *************** while (0) *** 1714,1725 **** #if YYDEBUG # ifndef YYFPRINTF ! # ifdef __cplusplus ! # include /* INFRINGES ON USER NAME SPACE */ ! # else ! # include /* INFRINGES ON USER NAME SPACE */ ! # endif ! # define YYFPRINTF YYSTD (fprintf) # endif # define YYDPRINTF(Args) \ --- 1717,1724 ---- #if YYDEBUG # ifndef YYFPRINTF ! # include /* INFRINGES ON USER NAME SPACE */ ! # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ *************** do { \ *** 1727,1736 **** if (yydebug) \ YYFPRINTF Args; \ } while (0) ! /* Nonzero means print parse trace. [The following comment makes no ! sense to me. Could someone clarify it? --akim] Since this is ! uninitialized, it does not stop multiple parsers from coexisting. ! */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) --- 1726,1733 ---- if (yydebug) \ YYFPRINTF Args; \ } while (0) ! /* Nonzero means print parse trace. It is left uninitialized so that ! multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) *************** int yydebug; *** 1756,1788 **** # define YYMAXDEPTH 10000 #endif - #if ! defined (yyoverflow) && ! defined (yymemcpy) - # if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ - # define yymemcpy __builtin_memcpy - # else /* not GNU C or C++ */ - - /* This is the most reliable way to avoid incompatibilities - in available built-in functions on various systems. */ - static void - # if defined (__STDC__) || defined (__cplusplus) - yymemcpy (char *yyto, const char *yyfrom, YYSIZE_T yycount) - # else - yymemcpy (yyto, yyfrom, yycount) - char *yyto; - const char *yyfrom; - YYSIZE_T yycount; - # endif - { - register const char *yyf = yyfrom; - register char *yyt = yyto; - register YYSIZE_T yyi = yycount; - - while (yyi-- != 0) - *yyt++ = *yyf++; - } - # endif - #endif - #ifdef YYERROR_VERBOSE # ifndef yystrlen --- 1753,1758 ---- *************** yystpcpy (yydest, yysrc) *** 1835,1841 **** # endif #endif ! #line 345 "/usr/share/bison/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed --- 1805,1811 ---- # endif #endif ! #line 315 "/usr/share/bison/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed *************** yystpcpy (yydest, yysrc) *** 1845,1857 **** to the proper pointer type. */ #ifdef YYPARSE_PARAM ! # ifdef __cplusplus # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM # define YYPARSE_PARAM_DECL ! # else /* !__cplusplus */ # define YYPARSE_PARAM_ARG YYPARSE_PARAM # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; ! # endif /* !__cplusplus */ #else /* !YYPARSE_PARAM */ # define YYPARSE_PARAM_ARG # define YYPARSE_PARAM_DECL --- 1815,1827 ---- to the proper pointer type. */ #ifdef YYPARSE_PARAM ! # if defined (__STDC__) || defined (__cplusplus) # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM # define YYPARSE_PARAM_DECL ! # else # define YYPARSE_PARAM_ARG YYPARSE_PARAM # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; ! # endif #else /* !YYPARSE_PARAM */ # define YYPARSE_PARAM_ARG # define YYPARSE_PARAM_DECL *************** yystpcpy (yydest, yysrc) *** 1860,1868 **** /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ # ifdef YYPARSE_PARAM ! YYPARSE_RETURN_TYPE yyparse (void *); # else ! YYPARSE_RETURN_TYPE yyparse (void); # endif #endif --- 1830,1838 ---- /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ # ifdef YYPARSE_PARAM ! int yyparse (void *); # else ! int yyparse (void); # endif #endif *************** YY_DECL_NON_LSP_VARIABLES *** 1897,1903 **** YY_DECL_VARIABLES #endif /* !YYPURE */ ! YYPARSE_RETURN_TYPE yyparse (YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL { --- 1867,1873 ---- YY_DECL_VARIABLES #endif /* !YYPURE */ ! int yyparse (YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL { *************** yyparse (YYPARSE_PARAM_ARG) *** 2025,2030 **** --- 1995,2003 ---- yyvs = yyvs1; } #else /* no yyoverflow */ + # ifndef YYSTACK_RELOCATE + goto yyoverflowlab; + # else /* Extend the stack our own way. */ if (yystacksize >= YYMAXDEPTH) goto yyoverflowlab; *************** yyparse (YYPARSE_PARAM_ARG) *** 2038,2052 **** (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyoverflowlab; ! YYSTACK_RELOCATE (short, yyss); ! YYSTACK_RELOCATE (YYSTYPE, yyvs); # if YYLSP_NEEDED ! YYSTACK_RELOCATE (YYLTYPE, yyls); # endif # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; --- 2011,2026 ---- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyoverflowlab; ! YYSTACK_RELOCATE (yyss); ! YYSTACK_RELOCATE (yyvs); # if YYLSP_NEEDED ! YYSTACK_RELOCATE (yyls); # endif # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } + # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; *************** yyreduce: *** 2225,2276 **** switch (yyn) { case 10: ! #line 232 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { /* use preset global here. FIXME */ yyval.node = xstrdup ("int"); ; break;} case 11: ! #line 237 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { /* use preset global here. FIXME */ yyval.node = xstrdup ("double"); ; break;} case 12: ! #line 242 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { /* use preset global here. FIXME */ yyval.node = xstrdup ("boolean"); ; break;} case 18: ! #line 267 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { while (bracket_count-- > 0) yyval.node = concat ("[", yyvsp[-1].node, NULL); ; break;} case 19: ! #line 272 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { while (bracket_count-- > 0) yyval.node = concat ("[", yyvsp[-1].node, NULL); ; break;} case 23: ! #line 290 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { yyval.node = concat (yyvsp[-2].node, ".", yyvsp[0].node, NULL); ; break;} case 37: ! #line 322 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { package_name = yyvsp[-1].node; ; break;} case 45: ! #line 349 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { if (yyvsp[0].value == PUBLIC_TK) modifier_value++; --- 2199,2250 ---- switch (yyn) { case 10: ! #line 231 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { /* use preset global here. FIXME */ yyval.node = xstrdup ("int"); ; break;} case 11: ! #line 236 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { /* use preset global here. FIXME */ yyval.node = xstrdup ("double"); ; break;} case 12: ! #line 241 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { /* use preset global here. FIXME */ yyval.node = xstrdup ("boolean"); ; break;} case 18: ! #line 266 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { while (bracket_count-- > 0) yyval.node = concat ("[", yyvsp[-1].node, NULL); ; break;} case 19: ! #line 271 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { while (bracket_count-- > 0) yyval.node = concat ("[", yyvsp[-1].node, NULL); ; break;} case 23: ! #line 289 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { yyval.node = concat (yyvsp[-2].node, ".", yyvsp[0].node, NULL); ; break;} case 37: ! #line 321 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { package_name = yyvsp[-1].node; ; break;} case 45: ! #line 348 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { if (yyvsp[0].value == PUBLIC_TK) modifier_value++; *************** case 45: *** 2280,2286 **** ; break;} case 46: ! #line 357 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { if (yyvsp[0].value == PUBLIC_TK) modifier_value++; --- 2254,2260 ---- ; break;} case 46: ! #line 356 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { if (yyvsp[0].value == PUBLIC_TK) modifier_value++; *************** case 46: *** 2290,2362 **** ; break;} case 47: ! #line 369 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { report_class_declaration(yyvsp[-2].node); modifier_value = 0; ; break;} case 49: ! #line 375 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { report_class_declaration(yyvsp[-2].node); ; break;} case 55: ! #line 389 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 56: ! #line 391 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 57: ! #line 396 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { pop_class_context (); ; break;} case 58: ! #line 398 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { pop_class_context (); ; break;} case 70: ! #line 424 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 71: ! #line 426 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { modifier_value = 0; ; break;} case 76: ! #line 442 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { bracket_count = 0; USE_ABSORBER; ; break;} case 77: ! #line 444 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { ++bracket_count; ; break;} case 80: ! #line 455 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { ++method_depth; ; break;} case 81: ! #line 457 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { --method_depth; ; break;} case 82: ! #line 462 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 84: ! #line 465 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { modifier_value = 0; ; break;} case 85: ! #line 467 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { report_main_declaration (yyvsp[-1].declarator); modifier_value = 0; ; break;} case 86: ! #line 475 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { struct method_declarator *d; NEW_METHOD_DECLARATOR (d, yyvsp[-2].node, NULL); --- 2264,2336 ---- ; break;} case 47: ! #line 368 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { report_class_declaration(yyvsp[-2].node); modifier_value = 0; ; break;} case 49: ! #line 374 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { report_class_declaration(yyvsp[-2].node); ; break;} case 55: ! #line 388 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 56: ! #line 390 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 57: ! #line 395 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { pop_class_context (); ; break;} case 58: ! #line 397 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { pop_class_context (); ; break;} case 70: ! #line 423 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 71: ! #line 425 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { modifier_value = 0; ; break;} case 76: ! #line 441 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { bracket_count = 0; USE_ABSORBER; ; break;} case 77: ! #line 443 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { ++bracket_count; ; break;} case 80: ! #line 454 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { ++method_depth; ; break;} case 81: ! #line 456 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { --method_depth; ; break;} case 82: ! #line 461 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 84: ! #line 464 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { modifier_value = 0; ; break;} case 85: ! #line 466 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { report_main_declaration (yyvsp[-1].declarator); modifier_value = 0; ; break;} case 86: ! #line 474 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { struct method_declarator *d; NEW_METHOD_DECLARATOR (d, yyvsp[-2].node, NULL); *************** case 86: *** 2364,2370 **** ; break;} case 87: ! #line 481 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { struct method_declarator *d; NEW_METHOD_DECLARATOR (d, yyvsp[-3].node, yyvsp[-1].node); --- 2338,2344 ---- ; break;} case 87: ! #line 480 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { struct method_declarator *d; NEW_METHOD_DECLARATOR (d, yyvsp[-3].node, yyvsp[-1].node); *************** case 87: *** 2372,2384 **** ; break;} case 90: ! #line 492 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { yyval.node = concat (yyvsp[-2].node, ",", yyvsp[0].node, NULL); ; break;} case 91: ! #line 499 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { USE_ABSORBER; if (bracket_count) --- 2346,2358 ---- ; break;} case 90: ! #line 491 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { yyval.node = concat (yyvsp[-2].node, ",", yyvsp[0].node, NULL); ; break;} case 91: ! #line 498 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { USE_ABSORBER; if (bracket_count) *************** case 91: *** 2395,2401 **** ; break;} case 92: ! #line 514 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { if (bracket_count) { --- 2369,2375 ---- ; break;} case 92: ! #line 513 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { if (bracket_count) { *************** case 92: *** 2411,2634 **** ; break;} case 95: ! #line 535 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 96: ! #line 537 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 100: ! #line 552 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 102: ! #line 563 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { modifier_value = 0; ; break;} case 104: ! #line 568 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { modifier_value = 0; ; break;} case 105: ! #line 575 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 106: ! #line 577 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 113: ! #line 594 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 114: ! #line 596 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 117: ! #line 608 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { report_class_declaration (yyvsp[0].node); modifier_value = 0; ; break;} case 119: ! #line 611 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { report_class_declaration (yyvsp[0].node); modifier_value = 0; ; break;} case 121: ! #line 614 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { report_class_declaration (yyvsp[-1].node); modifier_value = 0; ; break;} case 123: ! #line 617 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { report_class_declaration (yyvsp[-1].node); modifier_value = 0; ; break;} case 127: ! #line 628 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { pop_class_context (); ; break;} case 128: ! #line 630 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { pop_class_context (); ; break;} case 151: ! #line 689 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 152: ! #line 691 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { modifier_value = 0; ; break;} case 177: ! #line 732 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 188: ! #line 760 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { ++complexity; ; break;} case 189: ! #line 765 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { ++complexity; ; break;} case 190: ! #line 770 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { ++complexity; ; break;} case 198: ! #line 790 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { ++complexity; ; break;} case 203: ! #line 805 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { ++complexity; ; break;} case 207: ! #line 822 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { ++complexity; ; break;} case 213: ! #line 840 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { ++complexity; ; break;} case 224: ! #line 865 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { ++complexity; ; break;} case 227: ! #line 874 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { ++complexity; ; break;} case 230: ! #line 881 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" {yyerror ("Missing term"); RECOVER;; break;} case 231: ! #line 883 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" {yyerror ("';' expected"); RECOVER;; break;} case 234: ! #line 892 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 240: ! #line 907 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { ++complexity; ; break;} case 241: ! #line 911 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { ++complexity; ; break;} case 252: ! #line 933 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 253: ! #line 938 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 254: ! #line 940 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 255: ! #line 942 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 256: ! #line 944 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 264: ! #line 959 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { report_class_declaration (anonymous_context); ; break;} case 266: ! #line 962 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { report_class_declaration (anonymous_context); ; break;} case 268: ! #line 968 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 282: ! #line 1000 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { bracket_count = 1; ; break;} case 283: ! #line 1002 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { bracket_count++; ; break;} case 286: ! #line 1015 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { USE_ABSORBER; ++complexity; ; break;} case 287: ! #line 1017 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { USE_ABSORBER; ++complexity; ; break;} case 288: ! #line 1018 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { ++complexity; ; break;} case 289: ! #line 1019 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { ++complexity; ; break;} case 290: ! #line 1020 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { ++complexity; ; break;} case 291: ! #line 1021 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { ++complexity; ; break;} case 292: ! #line 1026 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 295: ! #line 1033 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 342: ! #line 1129 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { ++complexity; ; break;} case 344: ! #line 1135 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { ++complexity; ; break;} case 346: ! #line 1141 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { ++complexity; ; break;} case 350: ! #line 1155 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} } ! #line 731 "/usr/share/bison/bison.simple" yyvsp -= yylen; --- 2385,2608 ---- ; break;} case 95: ! #line 534 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 96: ! #line 536 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 100: ! #line 551 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 102: ! #line 562 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { modifier_value = 0; ; break;} case 104: ! #line 567 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { modifier_value = 0; ; break;} case 105: ! #line 574 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 106: ! #line 576 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 113: ! #line 593 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 114: ! #line 595 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 117: ! #line 607 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { report_class_declaration (yyvsp[0].node); modifier_value = 0; ; break;} case 119: ! #line 610 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { report_class_declaration (yyvsp[0].node); modifier_value = 0; ; break;} case 121: ! #line 613 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { report_class_declaration (yyvsp[-1].node); modifier_value = 0; ; break;} case 123: ! #line 616 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { report_class_declaration (yyvsp[-1].node); modifier_value = 0; ; break;} case 127: ! #line 627 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { pop_class_context (); ; break;} case 128: ! #line 629 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { pop_class_context (); ; break;} case 151: ! #line 688 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 152: ! #line 690 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { modifier_value = 0; ; break;} case 177: ! #line 731 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 188: ! #line 759 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { ++complexity; ; break;} case 189: ! #line 764 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { ++complexity; ; break;} case 190: ! #line 769 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { ++complexity; ; break;} case 198: ! #line 789 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { ++complexity; ; break;} case 203: ! #line 804 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { ++complexity; ; break;} case 207: ! #line 821 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { ++complexity; ; break;} case 213: ! #line 839 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { ++complexity; ; break;} case 224: ! #line 864 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { ++complexity; ; break;} case 227: ! #line 873 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { ++complexity; ; break;} case 230: ! #line 880 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" {yyerror ("Missing term"); RECOVER;; break;} case 231: ! #line 882 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" {yyerror ("';' expected"); RECOVER;; break;} case 234: ! #line 891 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 240: ! #line 906 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { ++complexity; ; break;} case 241: ! #line 910 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { ++complexity; ; break;} case 252: ! #line 932 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 253: ! #line 937 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 254: ! #line 939 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 255: ! #line 941 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 256: ! #line 943 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 264: ! #line 958 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { report_class_declaration (anonymous_context); ; break;} case 266: ! #line 961 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { report_class_declaration (anonymous_context); ; break;} case 268: ! #line 967 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 282: ! #line 999 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { bracket_count = 1; ; break;} case 283: ! #line 1001 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { bracket_count++; ; break;} case 286: ! #line 1014 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { USE_ABSORBER; ++complexity; ; break;} case 287: ! #line 1016 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { USE_ABSORBER; ++complexity; ; break;} case 288: ! #line 1017 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { ++complexity; ; break;} case 289: ! #line 1018 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { ++complexity; ; break;} case 290: ! #line 1019 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { ++complexity; ; break;} case 291: ! #line 1020 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { ++complexity; ; break;} case 292: ! #line 1025 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 295: ! #line 1032 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} case 342: ! #line 1128 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { ++complexity; ; break;} case 344: ! #line 1134 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { ++complexity; ; break;} case 346: ! #line 1140 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { ++complexity; ; break;} case 350: ! #line 1154 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" { USE_ABSORBER; ; break;} } ! #line 705 "/usr/share/bison/bison.simple" yyvsp -= yylen; *************** yyreturn: *** 2859,2893 **** #endif return yyresult; } ! #line 1173 "/home/gcc/gcc-3.3.3/gcc-3.3.3/gcc/java/parse-scan.y" /* Create a new parser context */ void ! java_push_parser_context () { ! struct parser_ctxt *new = ! (struct parser_ctxt *) xcalloc (1, sizeof (struct parser_ctxt)); new->next = ctxp; ctxp = new; } static void ! push_class_context (name) ! const char *name; { struct class_context *ctx; ! ctx = (struct class_context *) xmalloc (sizeof (struct class_context)); ctx->name = (char *) name; ctx->next = current_class_context; current_class_context = ctx; } static void ! pop_class_context () { struct class_context *ctx; --- 2833,2865 ---- #endif return yyresult; } ! #line 1172 "/home/mitchell/gcc-3.4.0/gcc-3.4.0/gcc/java/parse-scan.y" /* Create a new parser context */ void ! java_push_parser_context (void) { ! struct parser_ctxt *new = xcalloc (1, sizeof (struct parser_ctxt)); new->next = ctxp; ctxp = new; } static void ! push_class_context (const char *name) { struct class_context *ctx; ! ctx = xmalloc (sizeof (struct class_context)); ctx->name = (char *) name; ctx->next = current_class_context; current_class_context = ctx; } static void ! pop_class_context (void) { struct class_context *ctx; *************** pop_class_context () *** 2907,2915 **** /* Recursively construct the class name. This is just a helper function for get_class_name(). */ static int ! make_class_name_recursive (stack, ctx) ! struct obstack *stack; ! struct class_context *ctx; { if (! ctx) return 0; --- 2879,2885 ---- /* Recursively construct the class name. This is just a helper function for get_class_name(). */ static int ! make_class_name_recursive (struct obstack *stack, struct class_context *ctx) { if (! ctx) return 0; *************** make_class_name_recursive (stack, ctx) *** 2933,2939 **** /* Return a newly allocated string holding the name of the class. */ static char * ! get_class_name () { char *result; int last_was_digit; --- 2903,2909 ---- /* Return a newly allocated string holding the name of the class. */ static char * ! get_class_name (void) { char *result; int last_was_digit; *************** get_class_name () *** 2977,2984 **** /* Actions defined here */ static void ! report_class_declaration (name) ! const char * name; { extern int flag_dump_class, flag_list_filename; --- 2947,2953 ---- /* Actions defined here */ static void ! report_class_declaration (const char * name) { extern int flag_dump_class, flag_list_filename; *************** report_class_declaration (name) *** 3004,3011 **** } static void ! report_main_declaration (declarator) ! struct method_declarator *declarator; { extern int flag_find_main; --- 2973,2979 ---- } static void ! report_main_declaration (struct method_declarator *declarator) { extern int flag_find_main; *************** report_main_declaration (declarator) *** 3032,3038 **** } void ! report () { extern int flag_complexity; if (flag_complexity) --- 3000,3006 ---- } void ! report (void) { extern int flag_complexity; if (flag_complexity) *************** report () *** 3041,3047 **** /* Reset global status used by the report functions. */ ! void reset_report () { previous_output = 0; package_name = NULL; --- 3009,3015 ---- /* Reset global status used by the report functions. */ ! void reset_report (void) { previous_output = 0; package_name = NULL; *************** void reset_report () *** 3050,3058 **** } void ! yyerror (msg) ! const char *msg ATTRIBUTE_UNUSED; { ! fprintf (stderr, "%s: %d: %s\n", input_filename, lineno, msg); exit (1); } --- 3018,3025 ---- } void ! yyerror (const char *msg ATTRIBUTE_UNUSED) { ! fprintf (stderr, "%s: %d: %s\n", input_filename, input_line, msg); exit (1); } diff -Nrc3pad gcc-3.3.3/gcc/java/parse-scan.y gcc-3.4.0/gcc/java/parse-scan.y *** gcc-3.3.3/gcc/java/parse-scan.y 2002-09-30 14:57:43.000000000 +0000 --- gcc-3.4.0/gcc/java/parse-scan.y 2003-10-22 18:00:06.000000000 +0000 *************** *** 1,21 **** /* Parser grammar for quick source code scan of Java(TM) language programs. ! Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,21 ---- /* Parser grammar for quick source code scan of Java(TM) language programs. ! Copyright (C) 1998, 1999, 2000, 2002, 2003 Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** definitions and other extensions. */ *** 39,65 **** #include "config.h" #include "system.h" ! #include "obstack.h" #include "toplev.h" - #define obstack_chunk_alloc xmalloc - #define obstack_chunk_free free - - extern char *input_filename; extern FILE *finput, *out; /* Obstack for the lexer. */ struct obstack temporary_obstack; /* The current parser context. */ ! static struct parser_ctxt *ctxp; ! /* Error and warning counts, current line number, because they're used ! elsewhere */ int java_error_count; int java_warning_count; - int lineno; /* Tweak default rules when necessary. */ static int absorber; --- 39,65 ---- #include "config.h" #include "system.h" ! #include "coretypes.h" ! #include "tm.h" ! #include "input.h" #include "obstack.h" #include "toplev.h" extern FILE *finput, *out; + + /* Current position in real source file. */ + + location_t input_location; /* Obstack for the lexer. */ struct obstack temporary_obstack; /* The current parser context. */ ! struct parser_ctxt *ctxp; ! /* Error and warning counts, because they're used elsewhere */ int java_error_count; int java_warning_count; /* Tweak default rules when necessary. */ static int absorber; *************** struct method_declarator { *** 107,128 **** }; #define NEW_METHOD_DECLARATOR(D,N,A) \ { \ ! (D) = \ ! (struct method_declarator *)xmalloc (sizeof (struct method_declarator)); \ (D)->method_name = (N); \ (D)->args = (A); \ } /* Two actions for this grammar */ ! static int make_class_name_recursive PARAMS ((struct obstack *stack, ! struct class_context *ctx)); ! static char *get_class_name PARAMS ((void)); ! static void report_class_declaration PARAMS ((const char *)); ! static void report_main_declaration PARAMS ((struct method_declarator *)); ! static void push_class_context PARAMS ((const char *)); ! static void pop_class_context PARAMS ((void)); ! void report PARAMS ((void)); #include "lex.h" #include "parse.h" --- 107,127 ---- }; #define NEW_METHOD_DECLARATOR(D,N,A) \ { \ ! (D) = xmalloc (sizeof (struct method_declarator)); \ (D)->method_name = (N); \ (D)->args = (A); \ } /* Two actions for this grammar */ ! static int make_class_name_recursive (struct obstack *stack, ! struct class_context *ctx); ! static char *get_class_name (void); ! static void report_class_declaration (const char *); ! static void report_main_declaration (struct method_declarator *); ! static void push_class_context (const char *); ! static void pop_class_context (void); ! void report (void); #include "lex.h" #include "parse.h" *************** constructor_declaration: *** 566,572 **** /* extra SC_TK, FIXME */ | modifiers constructor_declarator throws constructor_body SC_TK { modifier_value = 0; } ! /* I'm not happy with the SC_TK addition. It isn't in the grammer and should probably be matched by and empty statement. But it doesn't work. FIXME */ ; --- 565,571 ---- /* extra SC_TK, FIXME */ | modifiers constructor_declarator throws constructor_body SC_TK { modifier_value = 0; } ! /* I'm not happy with the SC_TK addition. It isn't in the grammar and should probably be matched by and empty statement. But it doesn't work. FIXME */ ; *************** constant_expression: *** 1175,1203 **** /* Create a new parser context */ void ! java_push_parser_context () { ! struct parser_ctxt *new = ! (struct parser_ctxt *) xcalloc (1, sizeof (struct parser_ctxt)); new->next = ctxp; ctxp = new; } static void ! push_class_context (name) ! const char *name; { struct class_context *ctx; ! ctx = (struct class_context *) xmalloc (sizeof (struct class_context)); ctx->name = (char *) name; ctx->next = current_class_context; current_class_context = ctx; } static void ! pop_class_context () { struct class_context *ctx; --- 1174,1200 ---- /* Create a new parser context */ void ! java_push_parser_context (void) { ! struct parser_ctxt *new = xcalloc (1, sizeof (struct parser_ctxt)); new->next = ctxp; ctxp = new; } static void ! push_class_context (const char *name) { struct class_context *ctx; ! ctx = xmalloc (sizeof (struct class_context)); ctx->name = (char *) name; ctx->next = current_class_context; current_class_context = ctx; } static void ! pop_class_context (void) { struct class_context *ctx; *************** pop_class_context () *** 1217,1225 **** /* Recursively construct the class name. This is just a helper function for get_class_name(). */ static int ! make_class_name_recursive (stack, ctx) ! struct obstack *stack; ! struct class_context *ctx; { if (! ctx) return 0; --- 1214,1220 ---- /* Recursively construct the class name. This is just a helper function for get_class_name(). */ static int ! make_class_name_recursive (struct obstack *stack, struct class_context *ctx) { if (! ctx) return 0; *************** make_class_name_recursive (stack, ctx) *** 1243,1249 **** /* Return a newly allocated string holding the name of the class. */ static char * ! get_class_name () { char *result; int last_was_digit; --- 1238,1244 ---- /* Return a newly allocated string holding the name of the class. */ static char * ! get_class_name (void) { char *result; int last_was_digit; *************** get_class_name () *** 1287,1294 **** /* Actions defined here */ static void ! report_class_declaration (name) ! const char * name; { extern int flag_dump_class, flag_list_filename; --- 1282,1288 ---- /* Actions defined here */ static void ! report_class_declaration (const char * name) { extern int flag_dump_class, flag_list_filename; *************** report_class_declaration (name) *** 1314,1321 **** } static void ! report_main_declaration (declarator) ! struct method_declarator *declarator; { extern int flag_find_main; --- 1308,1314 ---- } static void ! report_main_declaration (struct method_declarator *declarator) { extern int flag_find_main; *************** report_main_declaration (declarator) *** 1342,1348 **** } void ! report () { extern int flag_complexity; if (flag_complexity) --- 1335,1341 ---- } void ! report (void) { extern int flag_complexity; if (flag_complexity) *************** report () *** 1351,1357 **** /* Reset global status used by the report functions. */ ! void reset_report () { previous_output = 0; package_name = NULL; --- 1344,1350 ---- /* Reset global status used by the report functions. */ ! void reset_report (void) { previous_output = 0; package_name = NULL; *************** void reset_report () *** 1360,1368 **** } void ! yyerror (msg) ! const char *msg ATTRIBUTE_UNUSED; { ! fprintf (stderr, "%s: %d: %s\n", input_filename, lineno, msg); exit (1); } --- 1353,1360 ---- } void ! yyerror (const char *msg ATTRIBUTE_UNUSED) { ! fprintf (stderr, "%s: %d: %s\n", input_filename, input_line, msg); exit (1); } diff -Nrc3pad gcc-3.3.3/gcc/java/parse.y gcc-3.4.0/gcc/java/parse.y *** gcc-3.3.3/gcc/java/parse.y 2003-05-03 00:36:56.000000000 +0000 --- gcc-3.4.0/gcc/java/parse.y 2004-02-26 14:12:19.000000000 +0000 *************** *** 1,22 **** /* Source code parsing and tree node generation for the GNU compiler for the Java(TM) language. ! Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,23 ---- /* Source code parsing and tree node generation for the GNU compiler for the Java(TM) language. ! Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 ! Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** definitions and other extensions. */ *** 48,53 **** --- 49,56 ---- %{ #include "config.h" #include "system.h" + #include "coretypes.h" + #include "tm.h" #include #include "tree.h" #include "rtl.h" *************** definitions and other extensions. */ *** 68,341 **** #include "ggc.h" #include "debug.h" #include "tree-inline.h" /* Local function prototypes */ ! static char *java_accstring_lookup PARAMS ((int)); ! static void classitf_redefinition_error PARAMS ((const char *,tree, tree, tree)); ! static void variable_redefinition_error PARAMS ((tree, tree, tree, int)); ! static tree create_class PARAMS ((int, tree, tree, tree)); ! static tree create_interface PARAMS ((int, tree, tree)); ! static void end_class_declaration PARAMS ((int)); ! static tree find_field PARAMS ((tree, tree)); ! static tree lookup_field_wrapper PARAMS ((tree, tree)); ! static int duplicate_declaration_error_p PARAMS ((tree, tree, tree)); ! static void register_fields PARAMS ((int, tree, tree)); ! static tree parser_qualified_classname PARAMS ((tree)); ! static int parser_check_super PARAMS ((tree, tree, tree)); ! static int parser_check_super_interface PARAMS ((tree, tree, tree)); ! static void check_modifiers_consistency PARAMS ((int)); ! static tree lookup_cl PARAMS ((tree)); ! static tree lookup_java_method2 PARAMS ((tree, tree, int)); ! static tree method_header PARAMS ((int, tree, tree, tree)); ! static void fix_method_argument_names PARAMS ((tree ,tree)); ! static tree method_declarator PARAMS ((tree, tree)); ! static void parse_warning_context PARAMS ((tree cl, const char *msg, ...)) ATTRIBUTE_PRINTF_2; ! static void issue_warning_error_from_context PARAMS ((tree, const char *msg, va_list)) ATTRIBUTE_PRINTF (2, 0); ! static void parse_ctor_invocation_error PARAMS ((void)); ! static tree parse_jdk1_1_error PARAMS ((const char *)); ! static void complete_class_report_errors PARAMS ((jdep *)); ! static int process_imports PARAMS ((void)); ! static void read_import_dir PARAMS ((tree)); ! static int find_in_imports_on_demand PARAMS ((tree, tree)); ! static void find_in_imports PARAMS ((tree, tree)); ! static void check_inner_class_access PARAMS ((tree, tree, tree)); ! static int check_pkg_class_access PARAMS ((tree, tree, bool)); ! static void register_package PARAMS ((tree)); ! static tree resolve_package PARAMS ((tree, tree *, tree *)); ! static tree resolve_class PARAMS ((tree, tree, tree, tree)); ! static void declare_local_variables PARAMS ((int, tree, tree)); ! static void dump_java_tree PARAMS ((enum tree_dump_index, tree)); ! static void source_start_java_method PARAMS ((tree)); ! static void source_end_java_method PARAMS ((void)); ! static tree find_name_in_single_imports PARAMS ((tree)); ! static void check_abstract_method_header PARAMS ((tree)); ! static tree lookup_java_interface_method2 PARAMS ((tree, tree)); ! static tree resolve_expression_name PARAMS ((tree, tree *)); ! static tree maybe_create_class_interface_decl PARAMS ((tree, tree, tree, tree)); ! static int check_class_interface_creation PARAMS ((int, int, tree, ! tree, tree, tree)); ! static tree patch_method_invocation PARAMS ((tree, tree, tree, int, ! int *, tree *)); ! static int breakdown_qualified PARAMS ((tree *, tree *, tree)); ! static int in_same_package PARAMS ((tree, tree)); ! static tree resolve_and_layout PARAMS ((tree, tree)); ! static tree qualify_and_find PARAMS ((tree, tree, tree)); ! static tree resolve_no_layout PARAMS ((tree, tree)); ! static int invocation_mode PARAMS ((tree, int)); ! static tree find_applicable_accessible_methods_list PARAMS ((int, tree, ! tree, tree)); ! static void search_applicable_methods_list PARAMS ((int, tree, tree, tree, ! tree *, tree *)); ! static tree find_most_specific_methods_list PARAMS ((tree)); ! static int argument_types_convertible PARAMS ((tree, tree)); ! static tree patch_invoke PARAMS ((tree, tree, tree)); ! static int maybe_use_access_method PARAMS ((int, tree *, tree *)); ! static tree lookup_method_invoke PARAMS ((int, tree, tree, tree, tree)); ! static tree register_incomplete_type PARAMS ((int, tree, tree, tree)); ! static tree check_inner_circular_reference PARAMS ((tree, tree)); ! static tree check_circular_reference PARAMS ((tree)); ! static tree obtain_incomplete_type PARAMS ((tree)); ! static tree java_complete_lhs PARAMS ((tree)); ! static tree java_complete_tree PARAMS ((tree)); ! static tree maybe_generate_pre_expand_clinit PARAMS ((tree)); ! static int analyze_clinit_body PARAMS ((tree, tree)); ! static int maybe_yank_clinit PARAMS ((tree)); ! static void start_complete_expand_method PARAMS ((tree)); ! static void java_complete_expand_method PARAMS ((tree)); ! static void java_expand_method_bodies PARAMS ((tree)); ! static int unresolved_type_p PARAMS ((tree, tree *)); ! static void create_jdep_list PARAMS ((struct parser_ctxt *)); ! static tree build_expr_block PARAMS ((tree, tree)); ! static tree enter_block PARAMS ((void)); ! static tree exit_block PARAMS ((void)); ! static tree lookup_name_in_blocks PARAMS ((tree)); ! static void maybe_absorb_scoping_blocks PARAMS ((void)); ! static tree build_method_invocation PARAMS ((tree, tree)); ! static tree build_new_invocation PARAMS ((tree, tree)); ! static tree build_assignment PARAMS ((int, int, tree, tree)); ! static tree build_binop PARAMS ((enum tree_code, int, tree, tree)); ! static tree patch_assignment PARAMS ((tree, tree)); ! static tree patch_binop PARAMS ((tree, tree, tree)); ! static tree build_unaryop PARAMS ((int, int, tree)); ! static tree build_incdec PARAMS ((int, int, tree, int)); ! static tree patch_unaryop PARAMS ((tree, tree)); ! static tree build_cast PARAMS ((int, tree, tree)); ! static tree build_null_of_type PARAMS ((tree)); ! static tree patch_cast PARAMS ((tree, tree)); ! static int valid_ref_assignconv_cast_p PARAMS ((tree, tree, int)); ! static int valid_builtin_assignconv_identity_widening_p PARAMS ((tree, tree)); ! static int valid_cast_to_p PARAMS ((tree, tree)); ! static int valid_method_invocation_conversion_p PARAMS ((tree, tree)); ! static tree try_builtin_assignconv PARAMS ((tree, tree, tree)); ! static tree try_reference_assignconv PARAMS ((tree, tree)); ! static tree build_unresolved_array_type PARAMS ((tree)); ! static int build_type_name_from_array_name PARAMS ((tree, tree *)); ! static tree build_array_from_name PARAMS ((tree, tree, tree, tree *)); ! static tree build_array_ref PARAMS ((int, tree, tree)); ! static tree patch_array_ref PARAMS ((tree)); ! static tree make_qualified_name PARAMS ((tree, tree, int)); ! static tree merge_qualified_name PARAMS ((tree, tree)); ! static tree make_qualified_primary PARAMS ((tree, tree, int)); ! static int resolve_qualified_expression_name PARAMS ((tree, tree *, ! tree *, tree *)); ! static void qualify_ambiguous_name PARAMS ((tree)); ! static tree resolve_field_access PARAMS ((tree, tree *, tree *)); ! static tree build_newarray_node PARAMS ((tree, tree, int)); ! static tree patch_newarray PARAMS ((tree)); ! static tree resolve_type_during_patch PARAMS ((tree)); ! static tree build_this PARAMS ((int)); ! static tree build_wfl_wrap PARAMS ((tree, int)); ! static tree build_return PARAMS ((int, tree)); ! static tree patch_return PARAMS ((tree)); ! static tree maybe_access_field PARAMS ((tree, tree, tree)); ! static int complete_function_arguments PARAMS ((tree)); ! static int check_for_static_method_reference PARAMS ((tree, tree, tree, ! tree, tree)); ! static int not_accessible_p PARAMS ((tree, tree, tree, int)); ! static void check_deprecation PARAMS ((tree, tree)); ! static int class_in_current_package PARAMS ((tree)); ! static tree build_if_else_statement PARAMS ((int, tree, tree, tree)); ! static tree patch_if_else_statement PARAMS ((tree)); ! static tree add_stmt_to_compound PARAMS ((tree, tree, tree)); ! static tree add_stmt_to_block PARAMS ((tree, tree, tree)); ! static tree patch_exit_expr PARAMS ((tree)); ! static tree build_labeled_block PARAMS ((int, tree)); ! static tree finish_labeled_statement PARAMS ((tree, tree)); ! static tree build_bc_statement PARAMS ((int, int, tree)); ! static tree patch_bc_statement PARAMS ((tree)); ! static tree patch_loop_statement PARAMS ((tree)); ! static tree build_new_loop PARAMS ((tree)); ! static tree build_loop_body PARAMS ((int, tree, int)); ! static tree finish_loop_body PARAMS ((int, tree, tree, int)); ! static tree build_debugable_stmt PARAMS ((int, tree)); ! static tree finish_for_loop PARAMS ((int, tree, tree, tree)); ! static tree patch_switch_statement PARAMS ((tree)); ! static tree string_constant_concatenation PARAMS ((tree, tree)); ! static tree build_string_concatenation PARAMS ((tree, tree)); ! static tree patch_string_cst PARAMS ((tree)); ! static tree patch_string PARAMS ((tree)); ! static tree encapsulate_with_try_catch PARAMS ((int, tree, tree, tree)); ! static tree build_assertion PARAMS ((int, tree, tree)); ! static tree build_try_statement PARAMS ((int, tree, tree)); ! static tree build_try_finally_statement PARAMS ((int, tree, tree)); ! static tree patch_try_statement PARAMS ((tree)); ! static tree patch_synchronized_statement PARAMS ((tree, tree)); ! static tree patch_throw_statement PARAMS ((tree, tree)); ! static void check_thrown_exceptions PARAMS ((int, tree)); ! static int check_thrown_exceptions_do PARAMS ((tree)); ! static void purge_unchecked_exceptions PARAMS ((tree)); ! static bool ctors_unchecked_throws_clause_p PARAMS ((tree)); ! static void check_throws_clauses PARAMS ((tree, tree, tree)); ! static void finish_method_declaration PARAMS ((tree)); ! static tree build_super_invocation PARAMS ((tree)); ! static int verify_constructor_circularity PARAMS ((tree, tree)); ! static char *constructor_circularity_msg PARAMS ((tree, tree)); ! static tree build_this_super_qualified_invocation PARAMS ((int, tree, tree, ! int, int)); ! static const char *get_printable_method_name PARAMS ((tree)); ! static tree patch_conditional_expr PARAMS ((tree, tree, tree)); ! static tree generate_finit PARAMS ((tree)); ! static tree generate_instinit PARAMS ((tree)); ! static tree build_instinit_invocation PARAMS ((tree)); ! static void fix_constructors PARAMS ((tree)); ! static tree build_alias_initializer_parameter_list PARAMS ((int, tree, ! tree, int *)); ! static tree craft_constructor PARAMS ((tree, tree)); ! static int verify_constructor_super PARAMS ((tree)); ! static tree create_artificial_method PARAMS ((tree, int, tree, tree, tree)); ! static void start_artificial_method_body PARAMS ((tree)); ! static void end_artificial_method_body PARAMS ((tree)); ! static int check_method_redefinition PARAMS ((tree, tree)); ! static int check_method_types_complete PARAMS ((tree)); ! static void java_check_regular_methods PARAMS ((tree)); ! static void java_check_abstract_methods PARAMS ((tree)); ! static void unreachable_stmt_error PARAMS ((tree)); ! static tree find_expr_with_wfl PARAMS ((tree)); ! static void missing_return_error PARAMS ((tree)); ! static tree build_new_array_init PARAMS ((int, tree)); ! static tree patch_new_array_init PARAMS ((tree, tree)); ! static tree maybe_build_array_element_wfl PARAMS ((tree)); ! static int array_constructor_check_entry PARAMS ((tree, tree)); ! static const char *purify_type_name PARAMS ((const char *)); ! static tree fold_constant_for_init PARAMS ((tree, tree)); ! static tree strip_out_static_field_access_decl PARAMS ((tree)); ! static jdeplist *reverse_jdep_list PARAMS ((struct parser_ctxt *)); ! static void static_ref_err PARAMS ((tree, tree, tree)); ! static void parser_add_interface PARAMS ((tree, tree, tree)); ! static void add_superinterfaces PARAMS ((tree, tree)); ! static tree jdep_resolve_class PARAMS ((jdep *)); ! static int note_possible_classname PARAMS ((const char *, int)); ! static void java_complete_expand_classes PARAMS ((void)); ! static void java_complete_expand_class PARAMS ((tree)); ! static void java_complete_expand_methods PARAMS ((tree)); ! static tree cut_identifier_in_qualified PARAMS ((tree)); ! static tree java_stabilize_reference PARAMS ((tree)); ! static tree do_unary_numeric_promotion PARAMS ((tree)); ! static char * operator_string PARAMS ((tree)); ! static tree do_merge_string_cste PARAMS ((tree, const char *, int, int)); ! static tree merge_string_cste PARAMS ((tree, tree, int)); ! static tree java_refold PARAMS ((tree)); ! static int java_decl_equiv PARAMS ((tree, tree)); ! static int binop_compound_p PARAMS ((enum tree_code)); ! static tree search_loop PARAMS ((tree)); ! static int labeled_block_contains_loop_p PARAMS ((tree, tree)); ! static int check_abstract_method_definitions PARAMS ((int, tree, tree)); ! static void java_check_abstract_method_definitions PARAMS ((tree)); ! static void java_debug_context_do PARAMS ((int)); ! static void java_parser_context_push_initialized_field PARAMS ((void)); ! static void java_parser_context_pop_initialized_field PARAMS ((void)); ! static tree reorder_static_initialized PARAMS ((tree)); ! static void java_parser_context_suspend PARAMS ((void)); ! static void java_parser_context_resume PARAMS ((void)); ! static int pop_current_osb PARAMS ((struct parser_ctxt *)); /* JDK 1.1 work. FIXME */ ! static tree maybe_make_nested_class_name PARAMS ((tree)); ! static int make_nested_class_name PARAMS ((tree)); ! static void set_nested_class_simple_name_value PARAMS ((tree, int)); ! static void link_nested_class_to_enclosing PARAMS ((void)); ! static tree resolve_inner_class PARAMS ((htab_t, tree, tree *, tree *, tree)); ! static tree find_as_inner_class PARAMS ((tree, tree, tree)); ! static tree find_as_inner_class_do PARAMS ((tree, tree)); ! static int check_inner_class_redefinition PARAMS ((tree, tree)); ! static tree build_thisn_assign PARAMS ((void)); ! static tree build_current_thisn PARAMS ((tree)); ! static tree build_access_to_thisn PARAMS ((tree, tree, int)); ! static tree maybe_build_thisn_access_method PARAMS ((tree)); ! static tree build_outer_field_access PARAMS ((tree, tree)); ! static tree build_outer_field_access_methods PARAMS ((tree)); ! static tree build_outer_field_access_expr PARAMS ((int, tree, tree, ! tree, tree)); ! static tree build_outer_method_access_method PARAMS ((tree)); ! static tree build_new_access_id PARAMS ((void)); ! static tree build_outer_field_access_method PARAMS ((tree, tree, tree, ! tree, tree)); ! static int outer_field_access_p PARAMS ((tree, tree)); ! static int outer_field_expanded_access_p PARAMS ((tree, tree *, ! tree *, tree *)); ! static tree outer_field_access_fix PARAMS ((tree, tree, tree)); ! static tree build_incomplete_class_ref PARAMS ((int, tree)); ! static tree patch_incomplete_class_ref PARAMS ((tree)); ! static tree create_anonymous_class PARAMS ((int, tree)); ! static void patch_anonymous_class PARAMS ((tree, tree, tree)); ! static void add_inner_class_fields PARAMS ((tree, tree)); ! static tree build_dot_class_method PARAMS ((tree)); ! static tree build_dot_class_method_invocation PARAMS ((tree)); ! static void create_new_parser_context PARAMS ((int)); ! static void mark_parser_ctxt PARAMS ((void *)); ! static tree maybe_build_class_init_for_field PARAMS ((tree, tree)); ! static int attach_init_test_initialization_flags PARAMS ((PTR *, PTR)); ! static int emit_test_initialization PARAMS ((PTR *, PTR)); ! static char *string_convert_int_cst PARAMS ((tree)); /* Number of error found so far. */ int java_error_count; --- 71,339 ---- #include "ggc.h" #include "debug.h" #include "tree-inline.h" + #include "cgraph.h" /* Local function prototypes */ ! static char *java_accstring_lookup (int); ! static void classitf_redefinition_error (const char *,tree, tree, tree); ! static void variable_redefinition_error (tree, tree, tree, int); ! static tree create_class (int, tree, tree, tree); ! static tree create_interface (int, tree, tree); ! static void end_class_declaration (int); ! static tree find_field (tree, tree); ! static tree lookup_field_wrapper (tree, tree); ! static int duplicate_declaration_error_p (tree, tree, tree); ! static void register_fields (int, tree, tree); ! static tree parser_qualified_classname (tree); ! static int parser_check_super (tree, tree, tree); ! static int parser_check_super_interface (tree, tree, tree); ! static void check_modifiers_consistency (int); ! static tree lookup_cl (tree); ! static tree lookup_java_method2 (tree, tree, int); ! static tree method_header (int, tree, tree, tree); ! static void fix_method_argument_names (tree ,tree); ! static tree method_declarator (tree, tree); ! static void parse_warning_context (tree cl, const char *msg, ...) ATTRIBUTE_PRINTF_2; ! static void issue_warning_error_from_context (tree, const char *msg, va_list) ATTRIBUTE_PRINTF (2, 0); ! static void parse_ctor_invocation_error (void); ! static tree parse_jdk1_1_error (const char *); ! static void complete_class_report_errors (jdep *); ! static int process_imports (void); ! static void read_import_dir (tree); ! static int find_in_imports_on_demand (tree, tree); ! static void find_in_imports (tree, tree); ! static void check_inner_class_access (tree, tree, tree); ! static int check_pkg_class_access (tree, tree, bool); ! static void register_package (tree); ! static tree resolve_package (tree, tree *, tree *); ! static tree resolve_class (tree, tree, tree, tree); ! static void declare_local_variables (int, tree, tree); ! static void dump_java_tree (enum tree_dump_index, tree); ! static void source_start_java_method (tree); ! static void source_end_java_method (void); ! static tree find_name_in_single_imports (tree); ! static void check_abstract_method_header (tree); ! static tree lookup_java_interface_method2 (tree, tree); ! static tree resolve_expression_name (tree, tree *); ! static tree maybe_create_class_interface_decl (tree, tree, tree, tree); ! static int check_class_interface_creation (int, int, tree, tree, tree, tree); ! static tree patch_method_invocation (tree, tree, tree, int, int *, tree *); ! static int breakdown_qualified (tree *, tree *, tree); ! static int in_same_package (tree, tree); ! static tree resolve_and_layout (tree, tree); ! static tree qualify_and_find (tree, tree, tree); ! static tree resolve_no_layout (tree, tree); ! static int invocation_mode (tree, int); ! static tree find_applicable_accessible_methods_list (int, tree, tree, tree); ! static void search_applicable_methods_list (int, tree, tree, tree, tree *, tree *); ! static tree find_most_specific_methods_list (tree); ! static int argument_types_convertible (tree, tree); ! static tree patch_invoke (tree, tree, tree); ! static int maybe_use_access_method (int, tree *, tree *); ! static tree lookup_method_invoke (int, tree, tree, tree, tree); ! static tree register_incomplete_type (int, tree, tree, tree); ! static tree check_inner_circular_reference (tree, tree); ! static tree check_circular_reference (tree); ! static tree obtain_incomplete_type (tree); ! static tree java_complete_lhs (tree); ! static tree java_complete_tree (tree); ! static tree maybe_generate_pre_expand_clinit (tree); ! static int analyze_clinit_body (tree, tree); ! static int maybe_yank_clinit (tree); ! static void java_complete_expand_method (tree); ! static void java_expand_method_bodies (tree); ! static int unresolved_type_p (tree, tree *); ! static void create_jdep_list (struct parser_ctxt *); ! static tree build_expr_block (tree, tree); ! static tree enter_block (void); ! static tree exit_block (void); ! static tree lookup_name_in_blocks (tree); ! static void maybe_absorb_scoping_blocks (void); ! static tree build_method_invocation (tree, tree); ! static tree build_new_invocation (tree, tree); ! static tree build_assignment (int, int, tree, tree); ! static tree build_binop (enum tree_code, int, tree, tree); ! static tree patch_assignment (tree, tree); ! static tree patch_binop (tree, tree, tree); ! static tree build_unaryop (int, int, tree); ! static tree build_incdec (int, int, tree, int); ! static tree patch_unaryop (tree, tree); ! static tree build_cast (int, tree, tree); ! static tree build_null_of_type (tree); ! static tree patch_cast (tree, tree); ! static int valid_ref_assignconv_cast_p (tree, tree, int); ! static int valid_builtin_assignconv_identity_widening_p (tree, tree); ! static int valid_cast_to_p (tree, tree); ! static int valid_method_invocation_conversion_p (tree, tree); ! static tree try_builtin_assignconv (tree, tree, tree); ! static tree try_reference_assignconv (tree, tree); ! static tree build_unresolved_array_type (tree); ! static int build_type_name_from_array_name (tree, tree *); ! static tree build_array_from_name (tree, tree, tree, tree *); ! static tree build_array_ref (int, tree, tree); ! static tree patch_array_ref (tree); ! static tree make_qualified_name (tree, tree, int); ! static tree merge_qualified_name (tree, tree); ! static tree make_qualified_primary (tree, tree, int); ! static int resolve_qualified_expression_name (tree, tree *, tree *, tree *); ! static void qualify_ambiguous_name (tree); ! static tree resolve_field_access (tree, tree *, tree *); ! static tree build_newarray_node (tree, tree, int); ! static tree patch_newarray (tree); ! static tree resolve_type_during_patch (tree); ! static tree build_this (int); ! static tree build_wfl_wrap (tree, int); ! static tree build_return (int, tree); ! static tree patch_return (tree); ! static tree maybe_access_field (tree, tree, tree); ! static int complete_function_arguments (tree); ! static int check_for_static_method_reference (tree, tree, tree, tree, tree); ! static int not_accessible_p (tree, tree, tree, int); ! static void check_deprecation (tree, tree); ! static int class_in_current_package (tree); ! static tree build_if_else_statement (int, tree, tree, tree); ! static tree patch_if_else_statement (tree); ! static tree add_stmt_to_compound (tree, tree, tree); ! static tree add_stmt_to_block (tree, tree, tree); ! static tree patch_exit_expr (tree); ! static tree build_labeled_block (int, tree); ! static tree finish_labeled_statement (tree, tree); ! static tree build_bc_statement (int, int, tree); ! static tree patch_bc_statement (tree); ! static tree patch_loop_statement (tree); ! static tree build_new_loop (tree); ! static tree build_loop_body (int, tree, int); ! static tree finish_loop_body (int, tree, tree, int); ! static tree build_debugable_stmt (int, tree); ! static tree finish_for_loop (int, tree, tree, tree); ! static tree patch_switch_statement (tree); ! static tree string_constant_concatenation (tree, tree); ! static tree build_string_concatenation (tree, tree); ! static tree patch_string_cst (tree); ! static tree patch_string (tree); ! static tree encapsulate_with_try_catch (int, tree, tree, tree); ! static tree build_assertion (int, tree, tree); ! static tree build_try_statement (int, tree, tree); ! static tree build_try_finally_statement (int, tree, tree); ! static tree patch_try_statement (tree); ! static tree patch_synchronized_statement (tree, tree); ! static tree patch_throw_statement (tree, tree); ! static void check_thrown_exceptions (int, tree, tree); ! static int check_thrown_exceptions_do (tree); ! static void purge_unchecked_exceptions (tree); ! static bool ctors_unchecked_throws_clause_p (tree); ! static void check_concrete_throws_clauses (tree, tree, tree, tree); ! static void check_throws_clauses (tree, tree, tree); ! static void finish_method_declaration (tree); ! static tree build_super_invocation (tree); ! static int verify_constructor_circularity (tree, tree); ! static char *constructor_circularity_msg (tree, tree); ! static tree build_this_super_qualified_invocation (int, tree, tree, int, int); ! static const char *get_printable_method_name (tree); ! static tree patch_conditional_expr (tree, tree, tree); ! static tree generate_finit (tree); ! static tree generate_instinit (tree); ! static tree build_instinit_invocation (tree); ! static void fix_constructors (tree); ! static tree build_alias_initializer_parameter_list (int, tree, tree, int *); ! static tree craft_constructor (tree, tree); ! static int verify_constructor_super (tree); ! static tree create_artificial_method (tree, int, tree, tree, tree); ! static void start_artificial_method_body (tree); ! static void end_artificial_method_body (tree); ! static int check_method_redefinition (tree, tree); ! static int check_method_types_complete (tree); ! static bool hack_is_accessible_p (tree, tree); ! static void java_check_regular_methods (tree); ! static void check_interface_throws_clauses (tree, tree); ! static void java_check_abstract_methods (tree); ! static void unreachable_stmt_error (tree); ! static int not_accessible_field_error (tree, tree); ! static tree find_expr_with_wfl (tree); ! static void missing_return_error (tree); ! static tree build_new_array_init (int, tree); ! static tree patch_new_array_init (tree, tree); ! static tree maybe_build_array_element_wfl (tree); ! static int array_constructor_check_entry (tree, tree); ! static const char *purify_type_name (const char *); ! static tree fold_constant_for_init (tree, tree); ! static tree strip_out_static_field_access_decl (tree); ! static jdeplist *reverse_jdep_list (struct parser_ctxt *); ! static void static_ref_err (tree, tree, tree); ! static void parser_add_interface (tree, tree, tree); ! static void add_superinterfaces (tree, tree); ! static tree jdep_resolve_class (jdep *); ! static int note_possible_classname (const char *, int); ! static void java_complete_expand_classes (void); ! static void java_complete_expand_class (tree); ! static void java_complete_expand_methods (tree); ! static tree cut_identifier_in_qualified (tree); ! static tree java_stabilize_reference (tree); ! static tree do_unary_numeric_promotion (tree); ! static char * operator_string (tree); ! static tree do_merge_string_cste (tree, const char *, int, int); ! static tree merge_string_cste (tree, tree, int); ! static tree java_refold (tree); ! static int java_decl_equiv (tree, tree); ! static int binop_compound_p (enum tree_code); ! static tree search_loop (tree); ! static int labeled_block_contains_loop_p (tree, tree); ! static int check_abstract_method_definitions (int, tree, tree); ! static void java_check_abstract_method_definitions (tree); ! static void java_debug_context_do (int); ! static void java_parser_context_push_initialized_field (void); ! static void java_parser_context_pop_initialized_field (void); ! static tree reorder_static_initialized (tree); ! static void java_parser_context_suspend (void); ! static void java_parser_context_resume (void); ! static int pop_current_osb (struct parser_ctxt *); /* JDK 1.1 work. FIXME */ ! static tree maybe_make_nested_class_name (tree); ! static int make_nested_class_name (tree); ! static void set_nested_class_simple_name_value (tree, int); ! static void link_nested_class_to_enclosing (void); ! static tree resolve_inner_class (htab_t, tree, tree *, tree *, tree); ! static tree find_as_inner_class (tree, tree, tree); ! static tree find_as_inner_class_do (tree, tree); ! static int check_inner_class_redefinition (tree, tree); ! static tree build_thisn_assign (void); ! static tree build_current_thisn (tree); ! static tree build_access_to_thisn (tree, tree, int); ! static tree maybe_build_thisn_access_method (tree); ! static tree build_outer_field_access (tree, tree); ! static tree build_outer_field_access_methods (tree); ! static tree build_outer_field_access_expr (int, tree, tree, ! tree, tree); ! static tree build_outer_method_access_method (tree); ! static tree build_new_access_id (void); ! static tree build_outer_field_access_method (tree, tree, tree, ! tree, tree); ! static int outer_field_access_p (tree, tree); ! static int outer_field_expanded_access_p (tree, tree *, ! tree *, tree *); ! static tree outer_field_access_fix (tree, tree, tree); ! static tree build_incomplete_class_ref (int, tree); ! static tree patch_incomplete_class_ref (tree); ! static tree create_anonymous_class (int, tree); ! static void patch_anonymous_class (tree, tree, tree); ! static void add_inner_class_fields (tree, tree); ! static tree build_dot_class_method (tree); ! static tree build_dot_class_method_invocation (tree, tree); ! static void create_new_parser_context (int); ! static tree maybe_build_class_init_for_field (tree, tree); ! static int attach_init_test_initialization_flags (void **, void *); ! static int emit_test_initialization (void **, void *); ! static char *string_convert_int_cst (tree); /* Number of error found so far. */ int java_error_count; *************** static const enum tree_code binop_lookup *** 369,375 **** binop_lookup [((VALUE) - PLUS_TK) % ARRAY_SIZE (binop_lookup)] /* This is the end index for binary operators that can also be used ! in compound assignements. */ #define BINOP_COMPOUND_CANDIDATES 11 /* The "$L" identifier we use to create labels. */ --- 367,373 ---- binop_lookup [((VALUE) - PLUS_TK) % ARRAY_SIZE (binop_lookup)] /* This is the end index for binary operators that can also be used ! in compound assignments. */ #define BINOP_COMPOUND_CANDIDATES 11 /* The "$L" identifier we use to create labels. */ *************** static GTY(()) tree package_list; *** 404,410 **** static GTY(()) tree current_this; /* Hold a list of catch clauses list. The first element of this list is ! the list of the catch clauses of the currently analysed try block. */ static GTY(()) tree currently_caught_type_list; /* This holds a linked list of all the case labels for the current --- 402,408 ---- static GTY(()) tree current_this; /* Hold a list of catch clauses list. The first element of this list is ! the list of the catch clauses of the currently analyzed try block. */ static GTY(()) tree currently_caught_type_list; /* This holds a linked list of all the case labels for the current *************** static GTY(()) tree src_parse_roots[1]; *** 602,619 **** %% /* 19.2 Production from 2.3: The Syntactic Grammar */ ! goal: ! { ! /* Register static variables with the garbage ! collector. */ ! ggc_add_root (&ctxp, 1, ! sizeof (struct parser_ctxt *), ! mark_parser_ctxt); ! ggc_add_root (&ctxp_for_generation, 1, ! sizeof (struct parser_ctxt *), ! mark_parser_ctxt); ! } ! compilation_unit {} ; --- 600,606 ---- %% /* 19.2 Production from 2.3: The Syntactic Grammar */ ! goal: compilation_unit {} ; *************** variable_initializers: *** 1366,1379 **** /* 19.11 Production from 14: Blocks and Statements */ block: ! OCB_TK CCB_TK ! { ! /* Store the location of the `}' when doing xrefs */ ! if (current_function_decl && flag_emit_xref) ! DECL_END_SOURCE_LINE (current_function_decl) = ! EXPR_WFL_ADD_COL ($2.location, 1); ! $$ = empty_stmt_node; ! } | block_begin block_statements block_end { $$ = $3; } ; --- 1353,1360 ---- /* 19.11 Production from 14: Blocks and Statements */ block: ! block_begin block_end ! { $$ = $2; } | block_begin block_statements block_end { $$ = $3; } ; *************** empty_statement: *** 1469,1475 **** (DECL_CONTEXT (current_function_decl))))) { ! EXPR_WFL_SET_LINECOL (wfl_operator, lineno, -1); parse_warning_context (wfl_operator, "An empty declaration is a deprecated feature that should not be used"); } $$ = empty_stmt_node; --- 1450,1456 ---- (DECL_CONTEXT (current_function_decl))))) { ! EXPR_WFL_SET_LINECOL (wfl_operator, input_line, -1); parse_warning_context (wfl_operator, "An empty declaration is a deprecated feature that should not be used"); } $$ = empty_stmt_node; *************** expression_statement: *** 1506,1512 **** { /* We have a statement. Generate a WFL around it so we can debug it */ ! $$ = build_expr_wfl ($1, input_filename, lineno, 0); /* We know we have a statement, so set the debug info to be eventually generate here. */ $$ = JAVA_MAYBE_GENERATE_DEBUG_INFO ($$); --- 1487,1493 ---- { /* We have a statement. Generate a WFL around it so we can debug it */ ! $$ = build_expr_wfl ($1, input_filename, input_line, 0); /* We know we have a statement, so set the debug info to be eventually generate here. */ $$ = JAVA_MAYBE_GENERATE_DEBUG_INFO ($$); *************** catch_clause_parameter: *** 1924,1938 **** formal_parameter (CCBP). The formal parameter is declared initialized by the appropriate function call */ ! tree ccpb = enter_block (); ! tree init = build_assignment ! (ASSIGN_TK, $2.location, TREE_PURPOSE ($3), ! build (JAVA_EXC_OBJ_EXPR, ptr_type_node)); ! declare_local_variables (0, TREE_VALUE ($3), ! build_tree_list (TREE_PURPOSE ($3), ! init)); ! $$ = build1 (CATCH_EXPR, NULL_TREE, ccpb); ! EXPR_WFL_LINECOL ($$) = $1.location; } | CATCH_TK error {yyerror ("'(' expected"); RECOVER; $$ = NULL_TREE;} --- 1905,1928 ---- formal_parameter (CCBP). The formal parameter is declared initialized by the appropriate function call */ ! tree ccpb; ! tree init; ! if ($3) ! { ! ccpb = enter_block (); ! init = build_assignment ! (ASSIGN_TK, $2.location, TREE_PURPOSE ($3), ! build (JAVA_EXC_OBJ_EXPR, ptr_type_node)); ! declare_local_variables (0, TREE_VALUE ($3), ! build_tree_list ! (TREE_PURPOSE ($3), init)); ! $$ = build1 (CATCH_EXPR, NULL_TREE, ccpb); ! EXPR_WFL_LINECOL ($$) = $1.location; ! } ! else ! { ! $$ = error_mark_node; ! } } | CATCH_TK error {yyerror ("'(' expected"); RECOVER; $$ = NULL_TREE;} *************** class_instance_creation_expression: *** 2040,2046 **** /* Created after JDK1.1 rules originally added to class_instance_creation_expression, but modified to use ! 'class_type' instead of 'TypeName' (type_name) which is mentionned in the documentation but doesn't exist. */ anonymous_class_creation: --- 2030,2036 ---- /* Created after JDK1.1 rules originally added to class_instance_creation_expression, but modified to use ! 'class_type' instead of 'TypeName' (type_name) which is mentioned in the documentation but doesn't exist. */ anonymous_class_creation: *************** dims: *** 2200,2209 **** { allocate *= sizeof (int); if (ctxp->osb_number) ! ctxp->osb_number = (int *)xrealloc (ctxp->osb_number, ! allocate); else ! ctxp->osb_number = (int *)xmalloc (allocate); } ctxp->osb_depth++; CURRENT_OSB (ctxp) = 1; --- 2190,2199 ---- { allocate *= sizeof (int); if (ctxp->osb_number) ! ctxp->osb_number = xrealloc (ctxp->osb_number, ! allocate); else ! ctxp->osb_number = xmalloc (allocate); } ctxp->osb_depth++; CURRENT_OSB (ctxp) = 1; *************** constant_expression: *** 2647,2654 **** `dims:' rule is being used. */ static int ! pop_current_osb (ctxp) ! struct parser_ctxt *ctxp; { int to_return; --- 2637,2643 ---- `dims:' rule is being used. */ static int ! pop_current_osb (struct parser_ctxt *ctxp) { int to_return; *************** pop_current_osb (ctxp) *** 2672,2690 **** created context becomes the current one. */ static void ! create_new_parser_context (copy_from_previous) ! int copy_from_previous; { struct parser_ctxt *new; ! new = (struct parser_ctxt *)xmalloc(sizeof (struct parser_ctxt)); if (copy_from_previous) { ! memcpy ((PTR)new, (PTR)ctxp, sizeof (struct parser_ctxt)); ! new->saved_data_ctx = 1; } else ! memset ((PTR) new, 0, sizeof (struct parser_ctxt)); new->next = ctxp; ctxp = new; --- 2661,2680 ---- created context becomes the current one. */ static void ! create_new_parser_context (int copy_from_previous) { struct parser_ctxt *new; ! new = ggc_alloc (sizeof (struct parser_ctxt)); if (copy_from_previous) { ! memcpy (new, ctxp, sizeof (struct parser_ctxt)); ! /* This flag, indicating the context saves global values, ! should only be set by java_parser_context_save_global. */ ! new->saved_data_ctx = 0; } else ! memset (new, 0, sizeof (struct parser_ctxt)); new->next = ctxp; ctxp = new; *************** create_new_parser_context (copy_from_pre *** 2693,2706 **** /* Create a new parser context and make it the current one. */ void ! java_push_parser_context () { create_new_parser_context (0); } void ! java_pop_parser_context (generate) ! int generate; { tree current; struct parser_ctxt *toFree, *next; --- 2683,2695 ---- /* Create a new parser context and make it the current one. */ void ! java_push_parser_context (void) { create_new_parser_context (0); } void ! java_pop_parser_context (int generate) { tree current; struct parser_ctxt *toFree, *next; *************** java_pop_parser_context (generate) *** 2712,2718 **** next = ctxp->next; if (next) { ! lineno = ctxp->lineno; current_class = ctxp->class_type; } --- 2701,2707 ---- next = ctxp->next; if (next) { ! input_line = ctxp->lineno; current_class = ctxp->class_type; } *************** java_pop_parser_context (generate) *** 2738,2752 **** toFree->next = ctxp_for_generation; ctxp_for_generation = toFree; } - else - free (toFree); } /* Create a parser context for the use of saving some global variables. */ void ! java_parser_context_save_global () { if (!ctxp) { --- 2727,2739 ---- toFree->next = ctxp_for_generation; ctxp_for_generation = toFree; } } /* Create a parser context for the use of saving some global variables. */ void ! java_parser_context_save_global (void) { if (!ctxp) { *************** java_parser_context_save_global () *** 2757,2765 **** /* If this context already stores data, create a new one suitable for data storage. */ else if (ctxp->saved_data) ! create_new_parser_context (1); ! ctxp->lineno = lineno; ctxp->class_type = current_class; ctxp->filename = input_filename; ctxp->function_decl = current_function_decl; --- 2744,2755 ---- /* If this context already stores data, create a new one suitable for data storage. */ else if (ctxp->saved_data) ! { ! create_new_parser_context (1); ! ctxp->saved_data_ctx = 1; ! } ! ctxp->lineno = input_line; ctxp->class_type = current_class; ctxp->filename = input_filename; ctxp->function_decl = current_function_decl; *************** java_parser_context_save_global () *** 2770,2778 **** previous context the current one. */ void ! java_parser_context_restore_global () { ! lineno = ctxp->lineno; current_class = ctxp->class_type; input_filename = ctxp->filename; if (wfl_operator) --- 2760,2768 ---- previous context the current one. */ void ! java_parser_context_restore_global (void) { ! input_line = ctxp->lineno; current_class = ctxp->class_type; input_filename = ctxp->filename; if (wfl_operator) *************** java_parser_context_restore_global () *** 2792,2798 **** classes be parsed. */ static void ! java_parser_context_suspend () { /* This makes debugging through java_debug_context easier */ static const char *const name = ""; --- 2782,2788 ---- classes be parsed. */ static void ! java_parser_context_suspend (void) { /* This makes debugging through java_debug_context easier */ static const char *const name = ""; *************** java_parser_context_suspend () *** 2818,2824 **** can resume as if no context was ever saved. */ static void ! java_parser_context_resume () { struct parser_ctxt *old = ctxp; /* This one is to be discarded */ struct parser_ctxt *saver = old->next; /* This one contain saved info */ --- 2808,2814 ---- can resume as if no context was ever saved. */ static void ! java_parser_context_resume (void) { struct parser_ctxt *old = ctxp; /* This one is to be discarded */ struct parser_ctxt *saver = old->next; /* This one contain saved info */ *************** java_parser_context_resume () *** 2832,2847 **** current_class = saver->class_type; current_function_decl = saver->function_decl; ! /* Retrive the restored context */ ctxp = restored; /* Re-installed the data for the parsing to carry on */ memcpy (&ctxp->marker_begining, &old->marker_begining, (size_t)(&ctxp->marker_end - &ctxp->marker_begining)); - - /* Buffer context can now be discarded */ - free (saver); - free (old); } /* Add a new anchor node to which all statement(s) initializing static --- 2822,2833 ---- current_class = saver->class_type; current_function_decl = saver->function_decl; ! /* Retrieve the restored context */ ctxp = restored; /* Re-installed the data for the parsing to carry on */ memcpy (&ctxp->marker_begining, &old->marker_begining, (size_t)(&ctxp->marker_end - &ctxp->marker_begining)); } /* Add a new anchor node to which all statement(s) initializing static *************** java_parser_context_resume () *** 2849,2855 **** linked. */ static void ! java_parser_context_push_initialized_field () { tree node; --- 2835,2841 ---- linked. */ static void ! java_parser_context_push_initialized_field (void) { tree node; *************** java_parser_context_push_initialized_fie *** 2871,2877 **** or functions. */ static void ! java_parser_context_pop_initialized_field () { tree stmts; tree class_type = TREE_TYPE (GET_CPC ()); --- 2857,2863 ---- or functions. */ static void ! java_parser_context_pop_initialized_field (void) { tree stmts; tree class_type = TREE_TYPE (GET_CPC ()); *************** java_parser_context_pop_initialized_fiel *** 2906,2913 **** } static tree ! reorder_static_initialized (list) ! tree list; { /* We have to keep things in order. The alias initializer have to come first, then the initialized regular field, in reverse to --- 2892,2898 ---- } static tree ! reorder_static_initialized (tree list) { /* We have to keep things in order. The alias initializer have to come first, then the initialized regular field, in reverse to *************** reorder_static_initialized (list) *** 2943,2950 **** {int i; for (i = 0; i < (C); i++) fputc (' ', stderr);} static void ! java_debug_context_do (tab) ! int tab; { struct parser_ctxt *copy = ctxp; while (copy) --- 2928,2934 ---- {int i; for (i = 0; i < (C); i++) fputc (' ', stderr);} static void ! java_debug_context_do (int tab) { struct parser_ctxt *copy = ctxp; while (copy) *************** java_debug_context_do (tab) *** 2972,2978 **** debugger. */ void ! java_debug_context () { java_debug_context_do (0); } --- 2956,2962 ---- debugger. */ void ! java_debug_context (void) { java_debug_context_do (0); } *************** static int force_error = 0; *** 2987,2993 **** /* Reporting an constructor invocation error. */ static void ! parse_ctor_invocation_error () { if (DECL_CONSTRUCTOR_P (current_function_decl)) yyerror ("Constructor invocation must be first thing in a constructor"); --- 2971,2977 ---- /* Reporting an constructor invocation error. */ static void ! parse_ctor_invocation_error (void) { if (DECL_CONSTRUCTOR_P (current_function_decl)) yyerror ("Constructor invocation must be first thing in a constructor"); *************** parse_ctor_invocation_error () *** 2998,3005 **** /* Reporting JDK1.1 features not implemented. */ static tree ! parse_jdk1_1_error (msg) ! const char *msg; { sorry (": `%s' JDK1.1(TM) feature", msg); java_error_count++; --- 2982,2988 ---- /* Reporting JDK1.1 features not implemented. */ static tree ! parse_jdk1_1_error (const char *msg) { sorry (": `%s' JDK1.1(TM) feature", msg); java_error_count++; *************** parse_jdk1_1_error (msg) *** 3009,3016 **** static int do_warning = 0; void ! yyerror (msg) ! const char *msg; { static java_lc elc; static int prev_lineno; --- 2992,2998 ---- static int do_warning = 0; void ! yyerror (const char *msg) { static java_lc elc; static int prev_lineno; *************** yyerror (msg) *** 3019,3025 **** int save_lineno; char *remainder, *code_from_source; ! if (!force_error && prev_lineno == lineno) return; /* Save current error location but report latter, when the context is --- 3001,3007 ---- int save_lineno; char *remainder, *code_from_source; ! if (!force_error && prev_lineno == input_line) return; /* Save current error location but report latter, when the context is *************** yyerror (msg) *** 3052,3059 **** elc.line = ctxp->p_line->lineno; } ! save_lineno = lineno; ! prev_lineno = lineno = elc.line; prev_msg = msg; code_from_source = java_get_line_col (ctxp->filename, elc.line, elc.col); --- 3034,3041 ---- elc.line = ctxp->p_line->lineno; } ! save_lineno = input_line; ! prev_lineno = input_line = elc.line; prev_msg = msg; code_from_source = java_get_line_col (ctxp->filename, elc.line, elc.col); *************** yyerror (msg) *** 3070,3083 **** the same line. This occurs when we report an error but don't have a synchronization point other than ';', which expression_statement is the only one to take care of. */ ! ctxp->prevent_ese = lineno = save_lineno; } static void ! issue_warning_error_from_context (cl, msg, ap) ! tree cl; ! const char *msg; ! va_list ap; { const char *saved, *saved_input_filename; char buffer [4096]; --- 3052,3062 ---- the same line. This occurs when we report an error but don't have a synchronization point other than ';', which expression_statement is the only one to take care of. */ ! ctxp->prevent_ese = input_line = save_lineno; } static void ! issue_warning_error_from_context (tree cl, const char *msg, va_list ap) { const char *saved, *saved_input_filename; char buffer [4096]; *************** issue_warning_error_from_context (cl, ms *** 3104,3136 **** /* Issue an error message at a current source line CL */ void ! parse_error_context VPARAMS ((tree cl, const char *msg, ...)) { ! VA_OPEN (ap, msg); ! VA_FIXEDARG (ap, tree, cl); ! VA_FIXEDARG (ap, const char *, msg); issue_warning_error_from_context (cl, msg, ap); ! VA_CLOSE (ap); } /* Issue a warning at a current source line CL */ static void ! parse_warning_context VPARAMS ((tree cl, const char *msg, ...)) { ! VA_OPEN (ap, msg); ! VA_FIXEDARG (ap, tree, cl); ! VA_FIXEDARG (ap, const char *, msg); force_error = do_warning = 1; issue_warning_error_from_context (cl, msg, ap); do_warning = force_error = 0; ! VA_CLOSE (ap); } static tree ! find_expr_with_wfl (node) ! tree node; { while (node) { --- 3083,3112 ---- /* Issue an error message at a current source line CL */ void ! parse_error_context (tree cl, const char *msg, ...) { ! va_list ap; ! va_start (ap, msg); issue_warning_error_from_context (cl, msg, ap); ! va_end (ap); } /* Issue a warning at a current source line CL */ static void ! parse_warning_context (tree cl, const char *msg, ...) { ! va_list ap; ! va_start (ap, msg); force_error = do_warning = 1; issue_warning_error_from_context (cl, msg, ap); do_warning = force_error = 0; ! va_end (ap); } static tree ! find_expr_with_wfl (tree node) { while (node) { *************** find_expr_with_wfl (node) *** 3173,3190 **** last line of the method the error occurs in. */ static void ! missing_return_error (method) ! tree method; { ! EXPR_WFL_SET_LINECOL (wfl_operator, DECL_SOURCE_LINE_LAST (method), -2); parse_error_context (wfl_operator, "Missing return statement"); } /* Issue an unreachable statement error. From NODE, find the next statement to report appropriately. */ static void ! unreachable_stmt_error (node) ! tree node; { /* Browse node to find the next expression node that has a WFL. Use the location to report the error */ --- 3149,3164 ---- last line of the method the error occurs in. */ static void ! missing_return_error (tree method) { ! EXPR_WFL_SET_LINECOL (wfl_operator, DECL_FUNCTION_LAST_LINE (method), -2); parse_error_context (wfl_operator, "Missing return statement"); } /* Issue an unreachable statement error. From NODE, find the next statement to report appropriately. */ static void ! unreachable_stmt_error (tree node) { /* Browse node to find the next expression node that has a WFL. Use the location to report the error */ *************** unreachable_stmt_error (node) *** 3202,3209 **** abort (); } int ! java_report_errors () { if (java_error_count) fprintf (stderr, "%d error%s", --- 3176,3195 ---- abort (); } + static int + not_accessible_field_error (tree wfl, tree decl) + { + parse_error_context + (wfl, "Can't access %s field `%s.%s' from `%s'", + java_accstring_lookup (get_access_flags_from_decl (decl)), + GET_TYPE_NAME (DECL_CONTEXT (decl)), + IDENTIFIER_POINTER (DECL_NAME (decl)), + IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (current_class)))); + return 1; + } + int ! java_report_errors (void) { if (java_error_count) fprintf (stderr, "%d error%s", *************** java_report_errors () *** 3217,3224 **** } static char * ! java_accstring_lookup (flags) ! int flags; { static char buffer [80]; #define COPY_RETURN(S) {strcpy (buffer, S); return buffer;} --- 3203,3209 ---- } static char * ! java_accstring_lookup (int flags) { static char buffer [80]; #define COPY_RETURN(S) {strcpy (buffer, S); return buffer;} *************** java_accstring_lookup (flags) *** 3246,3254 **** variables. */ static void ! classitf_redefinition_error (context, id, decl, cl) ! const char *context; ! tree id, decl, cl; { parse_error_context (cl, "%s `%s' already defined in %s:%d", context, IDENTIFIER_POINTER (id), --- 3231,3237 ---- variables. */ static void ! classitf_redefinition_error (const char *context, tree id, tree decl, tree cl) { parse_error_context (cl, "%s `%s' already defined in %s:%d", context, IDENTIFIER_POINTER (id), *************** classitf_redefinition_error (context, id *** 3257,3265 **** } static void ! variable_redefinition_error (context, name, type, line) ! tree context, name, type; ! int line; { const char *type_name; --- 3240,3246 ---- } static void ! variable_redefinition_error (tree context, tree name, tree type, int line) { const char *type_name; *************** variable_redefinition_error (context, na *** 3281,3289 **** the node pointed to by TRIMMED unless TRIMMED is null. */ static int ! build_type_name_from_array_name (aname, trimmed) ! tree aname; ! tree *trimmed; { const char *name = IDENTIFIER_POINTER (aname); int len = IDENTIFIER_LENGTH (aname); --- 3262,3268 ---- the node pointed to by TRIMMED unless TRIMMED is null. */ static int ! build_type_name_from_array_name (tree aname, tree *trimmed) { const char *name = IDENTIFIER_POINTER (aname); int len = IDENTIFIER_LENGTH (aname); *************** build_type_name_from_array_name (aname, *** 3298,3305 **** } static tree ! build_array_from_name (type, type_wfl, name, ret_name) ! tree type, type_wfl, name, *ret_name; { int more_dims = 0; --- 3277,3283 ---- } static tree ! build_array_from_name (tree type, tree type_wfl, tree name, tree *ret_name) { int more_dims = 0; *************** build_array_from_name (type, type_wfl, n *** 3351,3358 **** identifier. */ static tree ! build_unresolved_array_type (type_or_wfl) ! tree type_or_wfl; { const char *ptr; tree wfl; --- 3329,3335 ---- identifier. */ static tree ! build_unresolved_array_type (tree type_or_wfl) { const char *ptr; tree wfl; *************** build_unresolved_array_type (type_or_wfl *** 3378,3385 **** } static void ! parser_add_interface (class_decl, interface_decl, wfl) ! tree class_decl, interface_decl, wfl; { if (maybe_add_interface (TREE_TYPE (class_decl), TREE_TYPE (interface_decl))) parse_error_context (wfl, "Interface `%s' repeated", --- 3355,3361 ---- } static void ! parser_add_interface (tree class_decl, tree interface_decl, tree wfl) { if (maybe_add_interface (TREE_TYPE (class_decl), TREE_TYPE (interface_decl))) parse_error_context (wfl, "Interface `%s' repeated", *************** parser_add_interface (class_decl, interf *** 3390,3398 **** encountered. TAG is 0 for a class, 1 for an interface. */ static int ! check_class_interface_creation (is_interface, flags, raw_name, qualified_name, decl, cl) ! int is_interface, flags; ! tree raw_name, qualified_name, decl, cl; { tree node; int sca = 0; /* Static class allowed */ --- 3366,3373 ---- encountered. TAG is 0 for a class, 1 for an interface. */ static int ! check_class_interface_creation (int is_interface, int flags, tree raw_name, ! tree qualified_name, tree decl, tree cl) { tree node; int sca = 0; /* Static class allowed */ *************** check_class_interface_creation (is_inter *** 3508,3515 **** /* Construct a nested class name. If the final component starts with a digit, return true. Otherwise return false. */ static int ! make_nested_class_name (cpc_list) ! tree cpc_list; { tree name; --- 3483,3489 ---- /* Construct a nested class name. If the final component starts with a digit, return true. Otherwise return false. */ static int ! make_nested_class_name (tree cpc_list) { tree name; *************** make_nested_class_name (cpc_list) *** 3532,3539 **** /* Can't redefine a class already defined in an earlier scope. */ static int ! check_inner_class_redefinition (raw_name, cl) ! tree raw_name, cl; { tree scope_list; --- 3506,3512 ---- /* Can't redefine a class already defined in an earlier scope. */ static int ! check_inner_class_redefinition (tree raw_name, tree cl) { tree scope_list; *************** check_inner_class_redefinition (raw_name *** 3553,3561 **** we remember ENCLOSING and SUPER. */ static tree ! resolve_inner_class (circularity_hash, cl, enclosing, super, class_type) ! htab_t circularity_hash; ! tree cl, *enclosing, *super, class_type; { tree local_enclosing = *enclosing; tree local_super = NULL_TREE; --- 3526,3533 ---- we remember ENCLOSING and SUPER. */ static tree ! resolve_inner_class (htab_t circularity_hash, tree cl, tree *enclosing, ! tree *super, tree class_type) { tree local_enclosing = *enclosing; tree local_super = NULL_TREE; *************** resolve_inner_class (circularity_hash, c *** 3579,3587 **** return decl; } ! /* Now go to the upper classes, bail out if necessary. We will analyze the returned SUPER and act accordingly (see ! do_resolve_class.) */ local_super = CLASSTYPE_SUPER (TREE_TYPE (local_enclosing)); if (!local_super || local_super == object_type_node) break; --- 3551,3566 ---- return decl; } ! /* Now go to the upper classes, bail out if necessary. We will analyze the returned SUPER and act accordingly (see ! do_resolve_class). */ ! if (JPRIMITIVE_TYPE_P (TREE_TYPE (local_enclosing)) ! || TREE_TYPE (local_enclosing) == void_type_node) ! { ! parse_error_context (cl, "Qualifier must be a reference"); ! local_enclosing = NULL_TREE; ! break; ! } local_super = CLASSTYPE_SUPER (TREE_TYPE (local_enclosing)); if (!local_super || local_super == object_type_node) break; *************** resolve_inner_class (circularity_hash, c *** 3618,3625 **** qualified. */ static tree ! find_as_inner_class (enclosing, name, cl) ! tree enclosing, name, cl; { tree qual, to_return; if (!enclosing) --- 3597,3603 ---- qualified. */ static tree ! find_as_inner_class (tree enclosing, tree name, tree cl) { tree qual, to_return; if (!enclosing) *************** find_as_inner_class (enclosing, name, cl *** 3672,3679 **** through. */ static tree ! find_as_inner_class_do (qual, enclosing) ! tree qual, enclosing; { if (!qual) return NULL_TREE; --- 3650,3656 ---- through. */ static tree ! find_as_inner_class_do (tree qual, tree enclosing) { if (!qual) return NULL_TREE; *************** find_as_inner_class_do (qual, enclosing) *** 3703,3711 **** DECL. */ static void ! set_nested_class_simple_name_value (outer, set) ! tree outer; ! int set; { tree l; --- 3680,3686 ---- DECL. */ static void ! set_nested_class_simple_name_value (tree outer, int set) { tree l; *************** set_nested_class_simple_name_value (oute *** 3715,3721 **** } static void ! link_nested_class_to_enclosing () { if (GET_ENCLOSING_CPC ()) { --- 3690,3696 ---- } static void ! link_nested_class_to_enclosing (void) { if (GET_ENCLOSING_CPC ()) { *************** link_nested_class_to_enclosing () *** 3727,3734 **** } static tree ! maybe_make_nested_class_name (name) ! tree name; { tree id = NULL_TREE; --- 3702,3708 ---- } static tree ! maybe_make_nested_class_name (tree name) { tree id = NULL_TREE; *************** maybe_make_nested_class_name (name) *** 3762,3776 **** line CL and do other maintenance things. */ static tree ! maybe_create_class_interface_decl (decl, raw_name, qualified_name, cl) ! tree decl, raw_name, qualified_name, cl; { if (!decl) decl = push_class (make_class (), qualified_name); /* Take care of the file and line business */ DECL_SOURCE_FILE (decl) = EXPR_WFL_FILENAME (cl); ! /* If we're emiting xrefs, store the line/col number information */ if (flag_emit_xref) DECL_SOURCE_LINE (decl) = EXPR_WFL_LINECOL (cl); else --- 3736,3750 ---- line CL and do other maintenance things. */ static tree ! maybe_create_class_interface_decl (tree decl, tree raw_name, ! tree qualified_name, tree cl) { if (!decl) decl = push_class (make_class (), qualified_name); /* Take care of the file and line business */ DECL_SOURCE_FILE (decl) = EXPR_WFL_FILENAME (cl); ! /* If we're emitting xrefs, store the line/col number information */ if (flag_emit_xref) DECL_SOURCE_LINE (decl) = EXPR_WFL_LINECOL (cl); else *************** maybe_create_class_interface_decl (decl, *** 3800,3807 **** } static void ! add_superinterfaces (decl, interface_list) ! tree decl, interface_list; { tree node; /* Superinterface(s): if present and defined, parser_check_super_interface () --- 3774,3780 ---- } static void ! add_superinterfaces (tree decl, tree interface_list) { tree node; /* Superinterface(s): if present and defined, parser_check_super_interface () *************** add_superinterfaces (decl, interface_lis *** 3830,3838 **** interface's decl in pass 2. */ static tree ! create_interface (flags, id, super) ! int flags; ! tree id, super; { tree raw_name = EXPR_WFL_NODE (id); tree q_name = parser_qualified_classname (raw_name); --- 3803,3809 ---- interface's decl in pass 2. */ static tree ! create_interface (int flags, tree id, tree super) { tree raw_name = EXPR_WFL_NODE (id); tree q_name = parser_qualified_classname (raw_name); *************** create_interface (flags, id, super) *** 3884,3889 **** --- 3855,3863 ---- CLASS_COMPLETE_P (decl) = 1; add_superinterfaces (decl, super); + /* Eventually sets the @deprecated tag flag */ + CHECK_DEPRECATED (decl); + return decl; } *************** create_interface (flags, id, super) *** 3891,3898 **** DEP. */ static void ! patch_anonymous_class (type_decl, class_decl, wfl) ! tree type_decl, class_decl, wfl; { tree class = TREE_TYPE (class_decl); tree type = TREE_TYPE (type_decl); --- 3865,3871 ---- DEP. */ static void ! patch_anonymous_class (tree type_decl, tree class_decl, tree wfl) { tree class = TREE_TYPE (class_decl); tree type = TREE_TYPE (type_decl); *************** patch_anonymous_class (type_decl, class_ *** 3924,3932 **** } static tree ! create_anonymous_class (location, type_name) ! int location; ! tree type_name; { char buffer [80]; tree super = NULL_TREE, itf = NULL_TREE; --- 3897,3903 ---- } static tree ! create_anonymous_class (int location, tree type_name) { char buffer [80]; tree super = NULL_TREE, itf = NULL_TREE; *************** create_anonymous_class (location, type_n *** 3941,3947 **** if ((type_decl = IDENTIFIER_CLASS_VALUE (EXPR_WFL_NODE (type_name)))) { /* Create a class which either implements on extends the designated ! class. The class bears an innacessible name. */ if (CLASS_INTERFACE (type_decl)) { /* It's OK to modify it here. It's been already used and --- 3912,3918 ---- if ((type_decl = IDENTIFIER_CLASS_VALUE (EXPR_WFL_NODE (type_name)))) { /* Create a class which either implements on extends the designated ! class. The class bears an inaccessible name. */ if (CLASS_INTERFACE (type_decl)) { /* It's OK to modify it here. It's been already used and *************** create_anonymous_class (location, type_n *** 3968,3976 **** interface's decl in pass 2. */ static tree ! create_class (flags, id, super, interfaces) ! int flags; ! tree id, super, interfaces; { tree raw_name = EXPR_WFL_NODE (id); tree class_id, decl; --- 3939,3945 ---- interface's decl in pass 2. */ static tree ! create_class (int flags, tree id, tree super, tree interfaces) { tree raw_name = EXPR_WFL_NODE (id); tree class_id, decl; *************** create_class (flags, id, super, interfac *** 4076,4083 **** parser context if necessary. */ static void ! end_class_declaration (resume) ! int resume; { /* If an error occurred, context weren't pushed and won't need to be popped by a resume. */ --- 4045,4051 ---- parser context if necessary. */ static void ! end_class_declaration (int resume) { /* If an error occurred, context weren't pushed and won't need to be popped by a resume. */ *************** end_class_declaration (resume) *** 4100,4108 **** } static void ! add_inner_class_fields (class_decl, fct_decl) ! tree class_decl; ! tree fct_decl; { tree block, marker, f; --- 4068,4074 ---- } static void ! add_inner_class_fields (tree class_decl, tree fct_decl) { tree block, marker, f; *************** add_inner_class_fields (class_decl, fct_ *** 4147,4153 **** methods first, then finit$ to get a picture of what's used. It works with the exception that we would have to go back on all constructor invoked in regular methods to ! have their invokation reworked (to include the right amount of alias initializer parameters.) The only real way around, I think, is a first pass to --- 4113,4119 ---- methods first, then finit$ to get a picture of what's used. It works with the exception that we would have to go back on all constructor invoked in regular methods to ! have their invocation reworked (to include the right amount of alias initializer parameters.) The only real way around, I think, is a first pass to *************** add_inner_class_fields (class_decl, fct_ *** 4157,4166 **** On the other hand, it only affect local inner classes, whose constructors (and finit$ call) will be featuring ! unecessary arguments. It's easy for a developper to keep this number of parameter down by using the `final' keyword only when necessary. For the time being, we can ! issue a warning on unecessary finals. FIXME */ init = build_assignment (ASSIGN_TK, EXPR_WFL_LINECOL (wfl), wfl, init); --- 4123,4132 ---- On the other hand, it only affect local inner classes, whose constructors (and finit$ call) will be featuring ! unnecessary arguments. It's easy for a developer to keep this number of parameter down by using the `final' keyword only when necessary. For the time being, we can ! issue a warning on unnecessary finals. FIXME */ init = build_assignment (ASSIGN_TK, EXPR_WFL_LINECOL (wfl), wfl, init); *************** add_inner_class_fields (class_decl, fct_ *** 4178,4184 **** return; /* If we ever registered an alias field, insert and marker to ! remeber where the list ends. The second part of the list (the one featuring initialized fields) so it can be later reversed to enforce 8.5. The marker will be removed during that operation. */ marker = build_tree_list (NULL_TREE, NULL_TREE); --- 4144,4150 ---- return; /* If we ever registered an alias field, insert and marker to ! remember where the list ends. The second part of the list (the one featuring initialized fields) so it can be later reversed to enforce 8.5. The marker will be removed during that operation. */ marker = build_tree_list (NULL_TREE, NULL_TREE); *************** add_inner_class_fields (class_decl, fct_ *** 4190,4198 **** can't set the CLASS_LOADED_P flag */ static tree ! find_field (class, name) ! tree class; ! tree name; { tree decl; for (decl = TYPE_FIELDS (class); decl; decl = TREE_CHAIN (decl)) --- 4156,4162 ---- can't set the CLASS_LOADED_P flag */ static tree ! find_field (tree class, tree name) { tree decl; for (decl = TYPE_FIELDS (class); decl; decl = TREE_CHAIN (decl)) *************** find_field (class, name) *** 4207,4214 **** of CLASS */ static tree ! lookup_field_wrapper (class, name) ! tree class, name; { tree type = class; tree decl = NULL_TREE; --- 4171,4177 ---- of CLASS */ static tree ! lookup_field_wrapper (tree class, tree name) { tree type = class; tree decl = NULL_TREE; *************** lookup_field_wrapper (class, name) *** 4247,4254 **** otherwise. */ static int ! duplicate_declaration_error_p (new_field_name, new_type, cl) ! tree new_field_name, new_type, cl; { /* This might be modified to work with method decl as well */ tree decl = find_field (TREE_TYPE (GET_CPC ()), new_field_name); --- 4210,4216 ---- otherwise. */ static int ! duplicate_declaration_error_p (tree new_field_name, tree new_type, tree cl) { /* This might be modified to work with method decl as well */ tree decl = find_field (TREE_TYPE (GET_CPC ()), new_field_name); *************** duplicate_declaration_error_p (new_field *** 4283,4295 **** be later resolved in java_complete_class () */ static void ! register_fields (flags, type, variable_list) ! int flags; ! tree type, variable_list; { tree current, saved_type; tree class_type = NULL_TREE; ! int saved_lineno = lineno; int must_chain = 0; tree wfl = NULL_TREE; --- 4245,4255 ---- be later resolved in java_complete_class () */ static void ! register_fields (int flags, tree type, tree variable_list) { tree current, saved_type; tree class_type = NULL_TREE; ! int saved_lineno = input_line; int must_chain = 0; tree wfl = NULL_TREE; *************** register_fields (flags, type, variable_l *** 4359,4369 **** /* Set lineno to the line the field was found and create a declaration for it. Eventually sets the @deprecated tag flag. */ if (flag_emit_xref) ! lineno = EXPR_WFL_LINECOL (cl); else ! lineno = EXPR_WFL_LINENO (cl); field_decl = add_field (class_type, current_name, real_type, flags); ! CHECK_DEPRECATED (field_decl); /* If the field denotes a final instance variable, then we allocate a LANG_DECL_SPECIFIC part to keep track of its --- 4319,4329 ---- /* Set lineno to the line the field was found and create a declaration for it. Eventually sets the @deprecated tag flag. */ if (flag_emit_xref) ! input_line = EXPR_WFL_LINECOL (cl); else ! input_line = EXPR_WFL_LINENO (cl); field_decl = add_field (class_type, current_name, real_type, flags); ! CHECK_DEPRECATED_NO_RESET (field_decl); /* If the field denotes a final instance variable, then we allocate a LANG_DECL_SPECIFIC part to keep track of its *************** register_fields (flags, type, variable_l *** 4421,4427 **** DECL_INITIAL (field_decl) = TREE_OPERAND (init, 1); } } ! lineno = saved_lineno; } /* Generate finit$, using the list of initialized fields to populate --- 4381,4389 ---- DECL_INITIAL (field_decl) = TREE_OPERAND (init, 1); } } ! ! CLEAR_DEPRECATED; ! input_line = saved_lineno; } /* Generate finit$, using the list of initialized fields to populate *************** register_fields (flags, type, variable_l *** 4430,4437 **** local(s). */ static tree ! generate_finit (class_type) ! tree class_type; { int count = 0; tree list = TYPE_FINIT_STMT_LIST (class_type); --- 4392,4398 ---- local(s). */ static tree ! generate_finit (tree class_type) { int count = 0; tree list = TYPE_FINIT_STMT_LIST (class_type); *************** generate_finit (class_type) *** 4465,4472 **** statements in a try/catch/rethrow sequence. */ static tree ! generate_instinit (class_type) ! tree class_type; { tree current; tree compound = NULL_TREE; --- 4426,4432 ---- statements in a try/catch/rethrow sequence. */ static tree ! generate_instinit (tree class_type) { tree current; tree compound = NULL_TREE; *************** generate_instinit (class_type) *** 4508,4515 **** /* FIXME */ static tree ! build_instinit_invocation (class_type) ! tree class_type; { tree to_return = NULL_TREE; --- 4468,4474 ---- /* FIXME */ static tree ! build_instinit_invocation (tree class_type) { tree to_return = NULL_TREE; *************** build_instinit_invocation (class_type) *** 4524,4530 **** return to_return; } ! /* Shared accros method_declarator and method_header to remember the patch stage that was reached during the declaration of the method. A method DECL is built differently is there is no patch (JDEP_NO_PATCH) or a patch (JDEP_METHOD or JDEP_METHOD_RETURN) --- 4483,4489 ---- return to_return; } ! /* Shared across method_declarator and method_header to remember the patch stage that was reached during the declaration of the method. A method DECL is built differently is there is no patch (JDEP_NO_PATCH) or a patch (JDEP_METHOD or JDEP_METHOD_RETURN) *************** static int patch_stage; *** 4539,4547 **** with a constructor. */ static tree ! method_header (flags, type, mdecl, throws) ! int flags; ! tree type, mdecl, throws; { tree type_wfl = NULL_TREE; tree meth_name = NULL_TREE; --- 4498,4504 ---- with a constructor. */ static tree ! method_header (int flags, tree type, tree mdecl, tree throws) { tree type_wfl = NULL_TREE; tree meth_name = NULL_TREE; *************** method_header (flags, type, mdecl, throw *** 4678,4688 **** else TREE_TYPE (meth) = type; ! saved_lineno = lineno; /* When defining an abstract or interface method, the curly bracket at level 1 doesn't exist because there is no function body */ ! lineno = (ctxp->first_ccb_indent1 ? ctxp->first_ccb_indent1 : EXPR_WFL_LINENO (id)); /* Remember the original argument list */ --- 4635,4645 ---- else TREE_TYPE (meth) = type; ! saved_lineno = input_line; /* When defining an abstract or interface method, the curly bracket at level 1 doesn't exist because there is no function body */ ! input_line = (ctxp->first_ccb_indent1 ? ctxp->first_ccb_indent1 : EXPR_WFL_LINENO (id)); /* Remember the original argument list */ *************** method_header (flags, type, mdecl, throw *** 4716,4722 **** /* Register the parameter number and re-install the current line number */ DECL_MAX_LOCALS (meth) = ctxp->formal_parameter_number+1; ! lineno = saved_lineno; /* Register exception specified by the `throws' keyword for resolution and set the method decl appropriate field to the list. --- 4673,4679 ---- /* Register the parameter number and re-install the current line number */ DECL_MAX_LOCALS (meth) = ctxp->formal_parameter_number+1; ! input_line = saved_lineno; /* Register exception specified by the `throws' keyword for resolution and set the method decl appropriate field to the list. *************** method_header (flags, type, mdecl, throw *** 4763,4770 **** } static void ! fix_method_argument_names (orig_arg, meth) ! tree orig_arg, meth; { tree arg = TYPE_ARG_TYPES (TREE_TYPE (meth)); if (TREE_CODE (TREE_TYPE (meth)) == METHOD_TYPE) --- 4720,4726 ---- } static void ! fix_method_argument_names (tree orig_arg, tree meth) { tree arg = TYPE_ARG_TYPES (TREE_TYPE (meth)); if (TREE_CODE (TREE_TYPE (meth)) == METHOD_TYPE) *************** fix_method_argument_names (orig_arg, met *** 4783,4790 **** /* Complete the method declaration with METHOD_BODY. */ static void ! finish_method_declaration (method_body) ! tree method_body; { int flags; --- 4739,4745 ---- /* Complete the method declaration with METHOD_BODY. */ static void ! finish_method_declaration (tree method_body) { int flags; *************** finish_method_declaration (method_body) *** 4827,4833 **** /* Merge last line of the function with first line, directly in the function decl. It will be used to emit correct debug info. */ if (!flag_emit_xref) ! DECL_SOURCE_LINE_MERGE (current_function_decl, ctxp->last_ccb_indent1); /* Since function's argument's list are shared, reset the ARG_FINAL_P parameter that might have been set on some of this --- 4782,4788 ---- /* Merge last line of the function with first line, directly in the function decl. It will be used to emit correct debug info. */ if (!flag_emit_xref) ! DECL_FUNCTION_LAST_LINE (current_function_decl) = ctxp->last_ccb_indent1; /* Since function's argument's list are shared, reset the ARG_FINAL_P parameter that might have been set on some of this *************** finish_method_declaration (method_body) *** 4842,4849 **** /* Build a an error message for constructor circularity errors. */ static char * ! constructor_circularity_msg (from, to) ! tree from, to; { static char string [4096]; char *t = xstrdup (lang_printable_name (from, 0)); --- 4797,4803 ---- /* Build a an error message for constructor circularity errors. */ static char * ! constructor_circularity_msg (tree from, tree to) { static char string [4096]; char *t = xstrdup (lang_printable_name (from, 0)); *************** constructor_circularity_msg (from, to) *** 4857,4864 **** static GTY(()) tree vcc_list; static int ! verify_constructor_circularity (meth, current) ! tree meth, current; { tree c; --- 4811,4817 ---- static GTY(()) tree vcc_list; static int ! verify_constructor_circularity (tree meth, tree current) { tree c; *************** verify_constructor_circularity (meth, cu *** 4902,4909 **** /* Check modifiers that can be declared but exclusively */ static void ! check_modifiers_consistency (flags) ! int flags; { int acc_count = 0; tree cl = NULL_TREE; --- 4855,4861 ---- /* Check modifiers that can be declared but exclusively */ static void ! check_modifiers_consistency (int flags) { int acc_count = 0; tree cl = NULL_TREE; *************** check_modifiers_consistency (flags) *** 4927,4934 **** /* Check the methode header METH for abstract specifics features */ static void ! check_abstract_method_header (meth) ! tree meth; { int flags = get_access_flags_from_decl (meth); --- 4879,4885 ---- /* Check the methode header METH for abstract specifics features */ static void ! check_abstract_method_header (tree meth) { int flags = get_access_flags_from_decl (meth); *************** check_abstract_method_header (meth) *** 4949,4956 **** incomplete types. */ static tree ! method_declarator (id, list) ! tree id, list; { tree arg_types = NULL_TREE, current, node; tree meth = make_node (FUNCTION_TYPE); --- 4900,4906 ---- incomplete types. */ static tree ! method_declarator (tree id, tree list) { tree arg_types = NULL_TREE, current, node; tree meth = make_node (FUNCTION_TYPE); *************** method_declarator (id, list) *** 5033,5039 **** /* The argument node: a name and a (possibly) incomplete type. */ arg_node = build_tree_list (name, real_type); ! /* Remeber arguments declared final. */ ARG_FINAL_P (arg_node) = ARG_FINAL_P (current); if (jdep) --- 4983,4989 ---- /* The argument node: a name and a (possibly) incomplete type. */ arg_node = build_tree_list (name, real_type); ! /* Remember arguments declared final. */ ARG_FINAL_P (arg_node) = ARG_FINAL_P (current); if (jdep) *************** method_declarator (id, list) *** 5047,5055 **** } static int ! unresolved_type_p (wfl, returned) ! tree wfl; ! tree *returned; { if (TREE_CODE (wfl) == EXPR_WITH_FILE_LOCATION) --- 4997,5003 ---- } static int ! unresolved_type_p (tree wfl, tree *returned) { if (TREE_CODE (wfl) == EXPR_WITH_FILE_LOCATION) *************** unresolved_type_p (wfl, returned) *** 5075,5082 **** qualification from the current package definition. */ static tree ! parser_qualified_classname (name) ! tree name; { tree nested_class_name; --- 5023,5029 ---- qualification from the current package definition. */ static tree ! parser_qualified_classname (tree name) { tree nested_class_name; *************** parser_qualified_classname (name) *** 5093,5100 **** everything is OK. */ static int ! parser_check_super_interface (super_decl, this_decl, this_wfl) ! tree super_decl, this_decl, this_wfl; { tree super_type = TREE_TYPE (super_decl); --- 5040,5046 ---- everything is OK. */ static int ! parser_check_super_interface (tree super_decl, tree this_decl, tree this_wfl) { tree super_type = TREE_TYPE (super_decl); *************** parser_check_super_interface (super_decl *** 5125,5135 **** } /* Makes sure that SUPER_DECL is suitable to extend THIS_DECL. Returns ! 0 if everthing is OK. */ static int ! parser_check_super (super_decl, this_decl, wfl) ! tree super_decl, this_decl, wfl; { tree super_type = TREE_TYPE (super_decl); --- 5071,5080 ---- } /* Makes sure that SUPER_DECL is suitable to extend THIS_DECL. Returns ! 0 if everything is OK. */ static int ! parser_check_super (tree super_decl, tree this_decl, tree wfl) { tree super_type = TREE_TYPE (super_decl); *************** parser_check_super (super_decl, this_dec *** 5167,5186 **** CTXP list of type dependency list. */ static void ! create_jdep_list (ctxp) ! struct parser_ctxt *ctxp; { ! jdeplist *new = (jdeplist *)xmalloc (sizeof (jdeplist)); new->first = new->last = NULL; new->next = ctxp->classd_list; ctxp->classd_list = new; } static jdeplist * ! reverse_jdep_list (ctxp) ! struct parser_ctxt *ctxp; { ! register jdeplist *prev = NULL, *current, *next; for (current = ctxp->classd_list; current; current = next) { next = current->next; --- 5112,5129 ---- CTXP list of type dependency list. */ static void ! create_jdep_list (struct parser_ctxt *ctxp) { ! jdeplist *new = xmalloc (sizeof (jdeplist)); new->first = new->last = NULL; new->next = ctxp->classd_list; ctxp->classd_list = new; } static jdeplist * ! reverse_jdep_list (struct parser_ctxt *ctxp) { ! jdeplist *prev = NULL, *current, *next; for (current = ctxp->classd_list; current; current = next) { next = current->next; *************** reverse_jdep_list (ctxp) *** 5195,5202 **** registered again. */ static tree ! obtain_incomplete_type (type_name) ! tree type_name; { tree ptr = NULL_TREE, name; --- 5138,5144 ---- registered again. */ static tree ! obtain_incomplete_type (tree type_name) { tree ptr = NULL_TREE, name; *************** obtain_incomplete_type (type_name) *** 5207,5213 **** --- 5149,5157 ---- else abort (); + /* Workaround from build_pointer_type for incomplete types. */ BUILD_PTR_FROM_NAME (ptr, name); + TYPE_MODE (ptr) = ptr_mode; layout_type (ptr); return ptr; *************** obtain_incomplete_type (type_name) *** 5219,5229 **** manner. */ static tree ! register_incomplete_type (kind, wfl, decl, ptr) ! int kind; ! tree wfl, decl, ptr; { ! jdep *new = (jdep *)xmalloc (sizeof (jdep)); if (!ptr && kind != JDEP_METHOD_END) /* JDEP_METHOD_END is a mere marker */ ptr = obtain_incomplete_type (wfl); --- 5163,5171 ---- manner. */ static tree ! register_incomplete_type (int kind, tree wfl, tree decl, tree ptr) { ! jdep *new = xmalloc (sizeof (jdep)); if (!ptr && kind != JDEP_METHOD_END) /* JDEP_METHOD_END is a mere marker */ ptr = obtain_incomplete_type (wfl); *************** register_incomplete_type (kind, wfl, dec *** 5260,5268 **** otherwise. */ static tree ! check_inner_circular_reference (source, target) ! tree source; ! tree target; { tree basetype_vec = TYPE_BINFO_BASETYPES (source); tree ctx, cl; --- 5202,5208 ---- otherwise. */ static tree ! check_inner_circular_reference (tree source, tree target) { tree basetype_vec = TYPE_BINFO_BASETYPES (source); tree ctx, cl; *************** check_inner_circular_reference (source, *** 5308,5315 **** otherwise. TYPE can be an interface or a class. */ static tree ! check_circular_reference (type) ! tree type; { tree basetype_vec = TYPE_BINFO_BASETYPES (type); int i; --- 5248,5254 ---- otherwise. TYPE can be an interface or a class. */ static tree ! check_circular_reference (tree type) { tree basetype_vec = TYPE_BINFO_BASETYPES (type); int i; *************** check_circular_reference (type) *** 5335,5341 **** } void ! java_check_circular_reference () { tree current; for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) --- 5274,5280 ---- } void ! java_check_circular_reference (void) { tree current; for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) *************** java_check_circular_reference () *** 5361,5370 **** finit$. */ static tree ! build_alias_initializer_parameter_list (mode, class_type, parm, artificial) ! int mode; ! tree class_type, parm; ! int *artificial; { tree field; tree additional_parms = NULL_TREE; --- 5300,5307 ---- finit$. */ static tree ! build_alias_initializer_parameter_list (int mode, tree class_type, tree parm, ! int *artificial) { tree field; tree additional_parms = NULL_TREE; *************** build_alias_initializer_parameter_list ( *** 5408,5414 **** break; case AIPL_FUNCTION_CTOR_INVOCATION: ! /* There are two case: the constructor invokation happends outside the local inner, in which case, locales from the outer context are directly used. --- 5345,5351 ---- break; case AIPL_FUNCTION_CTOR_INVOCATION: ! /* There are two case: the constructor invocation happens outside the local inner, in which case, locales from the outer context are directly used. *************** build_alias_initializer_parameter_list ( *** 5442,5449 **** enforced. This is the case for anonymous classes. */ static tree ! craft_constructor (class_decl, args) ! tree class_decl, args; { tree class_type = TREE_TYPE (class_decl); tree parm = NULL_TREE; --- 5379,5385 ---- enforced. This is the case for anonymous classes. */ static tree ! craft_constructor (tree class_decl, tree args) { tree class_type = TREE_TYPE (class_decl); tree parm = NULL_TREE; *************** craft_constructor (class_decl, args) *** 5490,5495 **** --- 5426,5432 ---- /* Now, mark the artificial parameters. */ DECL_FUNCTION_NAP (decl) = artificial; DECL_FUNCTION_SYNTHETIC_CTOR (decl) = DECL_CONSTRUCTOR_P (decl) = 1; + DECL_INLINE (decl) = 1; return decl; } *************** craft_constructor (class_decl, args) *** 5501,5507 **** compilation triggered this one to be simply loaded. */ void ! java_fix_constructors () { tree current; --- 5438,5444 ---- compilation triggered this one to be simply loaded. */ void ! java_fix_constructors (void) { tree current; *************** java_fix_constructors () *** 5514,5520 **** if (CLASS_INTERFACE (TYPE_NAME (class_type))) continue; ! current_class = class_type; for (decl = TYPE_METHODS (class_type); decl; decl = TREE_CHAIN (decl)) { if (DECL_CONSTRUCTOR_P (decl)) --- 5451,5457 ---- if (CLASS_INTERFACE (TYPE_NAME (class_type))) continue; ! output_class = current_class = class_type; for (decl = TYPE_METHODS (class_type); decl; decl = TREE_CHAIN (decl)) { if (DECL_CONSTRUCTOR_P (decl)) *************** java_fix_constructors () *** 5535,5557 **** about the class processed currently. */ void ! safe_layout_class (class) ! tree class; { tree save_current_class = current_class; ! const char *save_input_filename = input_filename; ! int save_lineno = lineno; layout_class (class); current_class = save_current_class; ! input_filename = save_input_filename; ! lineno = save_lineno; } static tree ! jdep_resolve_class (dep) ! jdep *dep; { tree decl; --- 5472,5490 ---- about the class processed currently. */ void ! safe_layout_class (tree class) { tree save_current_class = current_class; ! location_t save_location = input_location; layout_class (class); current_class = save_current_class; ! input_location = save_location; } static tree ! jdep_resolve_class (jdep *dep) { tree decl; *************** jdep_resolve_class (dep) *** 5562,5567 **** --- 5495,5504 ---- decl = resolve_class (JDEP_ENCLOSING (dep), JDEP_TO_RESOLVE (dep), JDEP_DECL (dep), JDEP_WFL (dep)); JDEP_RESOLVED (dep, decl); + /* If there is no WFL, that's ok. We generate this warning + elsewhere. */ + if (decl && JDEP_WFL (dep) != NULL_TREE) + check_deprecation (JDEP_WFL (dep), decl); } if (!decl) *************** jdep_resolve_class (dep) *** 5583,5589 **** /* Complete unsatisfied class declaration and their dependencies */ void ! java_complete_class () { tree cclass; jdeplist *cclassd; --- 5520,5526 ---- /* Complete unsatisfied class declaration and their dependencies */ void ! java_complete_class (void) { tree cclass; jdeplist *cclassd; *************** java_complete_class () *** 5731,5738 **** array. */ static tree ! resolve_class (enclosing, class_type, decl, cl) ! tree enclosing, class_type, decl, cl; { tree tname = TYPE_NAME (class_type); tree resolved_type = TREE_TYPE (class_type); --- 5668,5674 ---- array. */ static tree ! resolve_class (tree enclosing, tree class_type, tree decl, tree cl) { tree tname = TYPE_NAME (class_type); tree resolved_type = TREE_TYPE (class_type); *************** resolve_class (enclosing, class_type, de *** 5782,5789 **** and (but it doesn't really matter) qualify_and_find. */ tree ! do_resolve_class (enclosing, class_type, decl, cl) ! tree enclosing, class_type, decl, cl; { tree new_class_decl = NULL_TREE, super = NULL_TREE; tree saved_enclosing_type = enclosing ? TREE_TYPE (enclosing) : NULL_TREE; --- 5718,5724 ---- and (but it doesn't really matter) qualify_and_find. */ tree ! do_resolve_class (tree enclosing, tree class_type, tree decl, tree cl) { tree new_class_decl = NULL_TREE, super = NULL_TREE; tree saved_enclosing_type = enclosing ? TREE_TYPE (enclosing) : NULL_TREE; *************** do_resolve_class (enclosing, class_type, *** 5797,5810 **** class and then treat Id as a member type. If we can't find Q as a class then we fall through. */ tree q, left, left_type, right; ! breakdown_qualified (&left, &right, TYPE_NAME (class_type)); ! BUILD_PTR_FROM_NAME (left_type, left); ! q = do_resolve_class (enclosing, left_type, decl, cl); ! if (q) { ! enclosing = q; ! saved_enclosing_type = TREE_TYPE (q); ! BUILD_PTR_FROM_NAME (class_type, right); } } --- 5732,5747 ---- class and then treat Id as a member type. If we can't find Q as a class then we fall through. */ tree q, left, left_type, right; ! if (breakdown_qualified (&left, &right, TYPE_NAME (class_type)) == 0) { ! BUILD_PTR_FROM_NAME (left_type, left); ! q = do_resolve_class (enclosing, left_type, decl, cl); ! if (q) ! { ! enclosing = q; ! saved_enclosing_type = TREE_TYPE (q); ! BUILD_PTR_FROM_NAME (class_type, right); ! } } } *************** do_resolve_class (enclosing, class_type, *** 5936,5943 **** } static tree ! qualify_and_find (class_type, package, name) ! tree class_type, package, name; { tree new_qualified = merge_qualified_name (package, name); tree new_class_decl; --- 5873,5879 ---- } static tree ! qualify_and_find (tree class_type, tree package, tree name) { tree new_qualified = merge_qualified_name (package, name); tree new_class_decl; *************** qualify_and_find (class_type, package, n *** 5960,5968 **** called when type resolution is necessary during the walk pass. */ static tree ! resolve_and_layout (something, cl) ! tree something; ! tree cl; { tree decl, decl_type; --- 5896,5902 ---- called when type resolution is necessary during the walk pass. */ static tree ! resolve_and_layout (tree something, tree cl) { tree decl, decl_type; *************** resolve_and_layout (something, cl) *** 6023,6030 **** layout. The current parsing context is saved and restored */ static tree ! resolve_no_layout (name, cl) ! tree name, cl; { tree ptr, decl; BUILD_PTR_FROM_NAME (ptr, name); --- 5957,5963 ---- layout. The current parsing context is saved and restored */ static tree ! resolve_no_layout (tree name, tree cl) { tree ptr, decl; BUILD_PTR_FROM_NAME (ptr, name); *************** resolve_no_layout (name, cl) *** 6040,6047 **** use an identifier tree. */ static const char * ! purify_type_name (name) ! const char *name; { int len = strlen (name); int bracket_found; --- 5973,5979 ---- use an identifier tree. */ static const char * ! purify_type_name (const char *name) { int len = strlen (name); int bracket_found; *************** purify_type_name (name) *** 6059,6066 **** /* The type CURRENT refers to can't be found. We print error messages. */ static void ! complete_class_report_errors (dep) ! jdep *dep; { const char *name; --- 5991,5997 ---- /* The type CURRENT refers to can't be found. We print error messages. */ static void ! complete_class_report_errors (jdep *dep) { const char *name; *************** complete_class_report_errors (dep) *** 6126,6133 **** */ static const char * ! get_printable_method_name (decl) ! tree decl; { const char *to_return; tree name = NULL_TREE; --- 6057,6063 ---- */ static const char * ! get_printable_method_name (tree decl) { const char *to_return; tree name = NULL_TREE; *************** get_printable_method_name (decl) *** 6150,6157 **** function it's a FWL, so we can track errors more accurately.) */ static int ! check_method_redefinition (class, method) ! tree class, method; { tree redef, sig; --- 6080,6086 ---- function it's a FWL, so we can track errors more accurately.) */ static int ! check_method_redefinition (tree class, tree method) { tree redef, sig; *************** check_method_redefinition (class, method *** 6181,6189 **** /* Return 1 if check went ok, 0 otherwise. */ static int ! check_abstract_method_definitions (do_interface, class_decl, type) ! int do_interface; ! tree class_decl, type; { tree class = TREE_TYPE (class_decl); tree method, end_type; --- 6110,6117 ---- /* Return 1 if check went ok, 0 otherwise. */ static int ! check_abstract_method_definitions (int do_interface, tree class_decl, ! tree type) { tree class = TREE_TYPE (class_decl); tree method, end_type; *************** check_abstract_method_definitions (do_in *** 6277,6284 **** methods. */ static void ! java_check_abstract_method_definitions (class_decl) ! tree class_decl; { tree class = TREE_TYPE (class_decl); tree super, vector; --- 6205,6211 ---- methods. */ static void ! java_check_abstract_method_definitions (tree class_decl) { tree class = TREE_TYPE (class_decl); tree super, vector; *************** java_check_abstract_method_definitions ( *** 6308,6315 **** safe to build a method signature or not. */ static int ! check_method_types_complete (decl) ! tree decl; { tree type = TREE_TYPE (decl); tree args; --- 6235,6241 ---- safe to build a method signature or not. */ static int ! check_method_types_complete (tree decl) { tree type = TREE_TYPE (decl); tree args; *************** check_method_types_complete (decl) *** 6330,6337 **** /* Visible interface to check methods contained in CLASS_DECL */ void ! java_check_methods (class_decl) ! tree class_decl; { if (CLASS_METHOD_CHECKED_P (TREE_TYPE (class_decl))) return; --- 6256,6262 ---- /* Visible interface to check methods contained in CLASS_DECL */ void ! java_check_methods (tree class_decl) { if (CLASS_METHOD_CHECKED_P (TREE_TYPE (class_decl))) return; *************** java_check_methods (class_decl) *** 6344,6357 **** CLASS_METHOD_CHECKED_P (TREE_TYPE (class_decl)) = 1; } /* Check all the methods of CLASS_DECL. Methods are first completed then checked according to regular method existence rules. If no constructor for CLASS_DECL were encountered, then build its declaration. */ - static void ! java_check_regular_methods (class_decl) ! tree class_decl; { int saw_constructor = ANONYMOUS_CLASS_P (TREE_TYPE (class_decl)); tree method; --- 6269,6305 ---- CLASS_METHOD_CHECKED_P (TREE_TYPE (class_decl)) = 1; } + /* Like not_accessible_p, but doesn't refer to the current class at + all. */ + static bool + hack_is_accessible_p (tree member, tree from_where) + { + int flags = get_access_flags_from_decl (member); + + if (from_where == DECL_CONTEXT (member) + || (flags & ACC_PUBLIC)) + return true; + + if ((flags & ACC_PROTECTED)) + { + if (inherits_from_p (from_where, DECL_CONTEXT (member))) + return true; + } + + if ((flags & ACC_PRIVATE)) + return false; + + /* Package private, or protected. */ + return in_same_package (TYPE_NAME (from_where), + TYPE_NAME (DECL_CONTEXT (member))); + } + /* Check all the methods of CLASS_DECL. Methods are first completed then checked according to regular method existence rules. If no constructor for CLASS_DECL were encountered, then build its declaration. */ static void ! java_check_regular_methods (tree class_decl) { int saw_constructor = ANONYMOUS_CLASS_P (TREE_TYPE (class_decl)); tree method; *************** java_check_regular_methods (class_decl) *** 6399,6405 **** } sig = build_java_argument_signature (TREE_TYPE (method)); ! found = lookup_argument_method2 (class, DECL_NAME (method), sig); /* Inner class can't declare static methods */ if (METHOD_STATIC (method) && !TOPLEVEL_CLASS_DECL_P (class_decl)) --- 6347,6354 ---- } sig = build_java_argument_signature (TREE_TYPE (method)); ! found = lookup_argument_method_generic (class, DECL_NAME (method), sig, ! SEARCH_SUPER | SEARCH_INTERFACE); /* Inner class can't declare static methods */ if (METHOD_STATIC (method) && !TOPLEVEL_CLASS_DECL_P (class_decl)) *************** java_check_regular_methods (class_decl) *** 6458,6464 **** continue; parse_error_context (method_wfl, ! "%s methods can't be overriden. Method `%s' is %s in class `%s'", (METHOD_FINAL (found) ? "Final" : "Static"), lang_printable_name (found, 0), (METHOD_FINAL (found) ? "final" : "static"), --- 6407,6413 ---- continue; parse_error_context (method_wfl, ! "%s methods can't be overridden. Method `%s' is %s in class `%s'", (METHOD_FINAL (found) ? "Final" : "Static"), lang_printable_name (found, 0), (METHOD_FINAL (found) ? "final" : "static"), *************** java_check_regular_methods (class_decl) *** 6472,6478 **** { parse_error_context (method_wfl, ! "Instance methods can't be overriden by a static method. Method `%s' is an instance method in class `%s'", lang_printable_name (found, 0), IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); --- 6421,6427 ---- { parse_error_context (method_wfl, ! "Instance methods can't be overridden by a static method. Method `%s' is an instance method in class `%s'", lang_printable_name (found, 0), IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); *************** java_check_regular_methods (class_decl) *** 6481,6487 **** /* - Overriding/hiding public must be public - Overriding/hiding protected must be protected or public ! - If the overriden or hidden method has default (package) access, then the overriding or hiding method must not be private; otherwise, a compile-time error occurs. If `found' belongs to an interface, things have been already --- 6430,6436 ---- /* - Overriding/hiding public must be public - Overriding/hiding protected must be protected or public ! - If the overridden or hidden method has default (package) access, then the overriding or hiding method must not be private; otherwise, a compile-time error occurs. If `found' belongs to an interface, things have been already *************** java_check_regular_methods (class_decl) *** 6503,6515 **** continue; } ! /* Overriding methods must have compatible `throws' clauses on checked ! exceptions, if any */ ! check_throws_clauses (method, method_wfl, found); ! ! /* Inheriting multiple methods with the same signature. FIXME */ } if (!TYPE_NVIRTUALS (class)) TYPE_METHODS (class) = nreverse (TYPE_METHODS (class)); --- 6452,6471 ---- continue; } ! /* Check this method against all the other implementations it ! overrides. Here we only check the class hierarchy; the rest ! of the checking is done later. If this method is just a ! Miranda method, we can skip the check. */ ! if (! METHOD_INVISIBLE (method)) ! check_concrete_throws_clauses (class, method, DECL_NAME (method), sig); } + /* The above throws clause check only looked at superclasses. Now + we must also make sure that all methods declared in interfaces + have compatible throws clauses. FIXME: there are more efficient + ways to organize this checking; we should implement one. */ + check_interface_throws_clauses (class, class); + if (!TYPE_NVIRTUALS (class)) TYPE_METHODS (class) = nreverse (TYPE_METHODS (class)); *************** java_check_regular_methods (class_decl) *** 6521,6534 **** abort (); } ! /* Return a nonzero value if the `throws' clause of METHOD (if any) ! is incompatible with the `throws' clause of FOUND (if any). */ static void ! check_throws_clauses (method, method_wfl, found) ! tree method, method_wfl, found; { ! tree mthrows, fthrows; /* Can't check these things with class loaded from bytecode. FIXME */ if (!CLASS_FROM_SOURCE_P (DECL_CONTEXT (found))) --- 6477,6570 ---- abort (); } ! /* Check to make sure that all the methods in all the interfaces ! implemented by CLASS_DECL are compatible with the concrete ! implementations available in CHECK_CLASS_DECL. */ ! static void ! check_interface_throws_clauses (tree check_class_decl, tree class_decl) ! { ! for (; class_decl != NULL_TREE; class_decl = CLASSTYPE_SUPER (class_decl)) ! { ! tree bases; ! int iface_len; ! int i; ! ! if (! CLASS_LOADED_P (class_decl)) ! { ! if (CLASS_FROM_SOURCE_P (class_decl)) ! safe_layout_class (class_decl); ! else ! load_class (class_decl, 1); ! } ! ! bases = TYPE_BINFO_BASETYPES (class_decl); ! iface_len = TREE_VEC_LENGTH (bases) - 1; ! for (i = iface_len; i > 0; --i) ! { ! tree interface = BINFO_TYPE (TREE_VEC_ELT (bases, i)); ! tree iface_method; ! ! for (iface_method = TYPE_METHODS (interface); ! iface_method != NULL_TREE; ! iface_method = TREE_CHAIN (iface_method)) ! { ! tree sig, method; ! ! /* First look for a concrete method implemented or ! inherited by this class. No need to search ! interfaces here, since we're already looking through ! all of them. */ ! sig = build_java_argument_signature (TREE_TYPE (iface_method)); ! method ! = lookup_argument_method_generic (check_class_decl, ! DECL_NAME (iface_method), ! sig, SEARCH_VISIBLE); ! /* If we don't find an implementation, that is ok. Any ! potential errors from that are diagnosed elsewhere. ! Also, multiple inheritance with conflicting throws ! clauses is fine in the absence of a concrete ! implementation. */ ! if (method != NULL_TREE && !METHOD_ABSTRACT (method) ! && !METHOD_INVISIBLE (iface_method)) ! { ! tree method_wfl = DECL_FUNCTION_WFL (method); ! check_throws_clauses (method, method_wfl, iface_method); ! } ! } ! ! /* Now check superinterfaces. */ ! check_interface_throws_clauses (check_class_decl, interface); ! } ! } ! } + /* Check throws clauses of a method against the clauses of all the + methods it overrides. We do this by searching up the class + hierarchy, examining all matching accessible methods. */ static void ! check_concrete_throws_clauses (tree class, tree self_method, ! tree name, tree signature) { ! tree method = lookup_argument_method_generic (class, name, signature, ! SEARCH_SUPER | SEARCH_VISIBLE); ! while (method != NULL_TREE) ! { ! if (! METHOD_INVISIBLE (method) && hack_is_accessible_p (method, class)) ! check_throws_clauses (self_method, DECL_FUNCTION_WFL (self_method), ! method); ! ! method = lookup_argument_method_generic (DECL_CONTEXT (method), ! name, signature, ! SEARCH_SUPER | SEARCH_VISIBLE); ! } ! } ! ! /* Generate an error if the `throws' clause of METHOD (if any) is ! incompatible with the `throws' clause of FOUND (if any). */ ! static void ! check_throws_clauses (tree method, tree method_wfl, tree found) ! { ! tree mthrows; /* Can't check these things with class loaded from bytecode. FIXME */ if (!CLASS_FROM_SOURCE_P (DECL_CONTEXT (found))) *************** check_throws_clauses (method, method_wfl *** 6537,6567 **** for (mthrows = DECL_FUNCTION_THROWS (method); mthrows; mthrows = TREE_CHAIN (mthrows)) { /* We don't verify unchecked expressions */ if (IS_UNCHECKED_EXCEPTION_P (TREE_VALUE (mthrows))) continue; /* Checked expression must be compatible */ for (fthrows = DECL_FUNCTION_THROWS (found); fthrows; fthrows = TREE_CHAIN (fthrows)) ! if (inherits_from_p (TREE_VALUE (mthrows), TREE_VALUE (fthrows))) ! break; if (!fthrows) { parse_error_context ! (method_wfl, "Invalid checked exception class `%s' in `throws' clause. The exception must be a subclass of an exception thrown by `%s' from class `%s'", IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (TREE_VALUE (mthrows)))), lang_printable_name (found, 0), IDENTIFIER_POINTER ! (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); } } } /* Check abstract method of interface INTERFACE */ - static void ! java_check_abstract_methods (interface_decl) ! tree interface_decl; { int i, n; tree method, basetype_vec, found; --- 6573,6605 ---- for (mthrows = DECL_FUNCTION_THROWS (method); mthrows; mthrows = TREE_CHAIN (mthrows)) { + tree fthrows; + /* We don't verify unchecked expressions */ if (IS_UNCHECKED_EXCEPTION_P (TREE_VALUE (mthrows))) continue; /* Checked expression must be compatible */ for (fthrows = DECL_FUNCTION_THROWS (found); fthrows; fthrows = TREE_CHAIN (fthrows)) ! { ! if (inherits_from_p (TREE_VALUE (mthrows), TREE_VALUE (fthrows))) ! break; ! } if (!fthrows) { parse_error_context ! (method_wfl, "Invalid checked exception class `%s' in `throws' clause. The exception must be a subclass of an exception thrown by `%s' from class `%s'", IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (TREE_VALUE (mthrows)))), lang_printable_name (found, 0), IDENTIFIER_POINTER ! (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); } } } /* Check abstract method of interface INTERFACE */ static void ! java_check_abstract_methods (tree interface_decl) { int i, n; tree method, basetype_vec, found; *************** java_check_abstract_methods (interface_d *** 6573,6580 **** if (check_method_redefinition (interface, method)) continue; ! /* 3- Overriding is OK as far as we preserve the return type and ! the thrown exceptions (FIXME) */ found = lookup_java_interface_method2 (interface, method); if (found) { --- 6611,6617 ---- if (check_method_redefinition (interface, method)) continue; ! /* 3- Overriding is OK as far as we preserve the return type. */ found = lookup_java_interface_method2 (interface, method); if (found) { *************** java_check_abstract_methods (interface_d *** 6629,6636 **** signature. Return a matching method only if their types differ. */ static tree ! lookup_java_interface_method2 (class, method_decl) ! tree class, method_decl; { int i, n; tree basetype_vec = TYPE_BINFO_BASETYPES (class), to_return; --- 6666,6672 ---- signature. Return a matching method only if their types differ. */ static tree ! lookup_java_interface_method2 (tree class, tree method_decl) { int i, n; tree basetype_vec = TYPE_BINFO_BASETYPES (class), to_return; *************** lookup_java_interface_method2 (class, me *** 6662,6670 **** matching method only if their types differ. */ static tree ! lookup_java_method2 (clas, method_decl, do_interface) ! tree clas, method_decl; ! int do_interface; { tree method, method_signature, method_name, method_type, name; --- 6698,6704 ---- matching method only if their types differ. */ static tree ! lookup_java_method2 (tree clas, tree method_decl, int do_interface) { tree method, method_signature, method_name, method_type, name; *************** lookup_java_method2 (clas, method_decl, *** 6697,6704 **** static GTY(()) tree cl_v; static tree ! lookup_cl (decl) ! tree decl; { char *line, *found; --- 6731,6737 ---- static GTY(()) tree cl_v; static tree ! lookup_cl (tree decl) { char *line, *found; *************** lookup_cl (decl) *** 6711,6717 **** } EXPR_WFL_FILENAME_NODE (cl_v) = get_identifier (DECL_SOURCE_FILE (decl)); ! EXPR_WFL_SET_LINECOL (cl_v, DECL_SOURCE_LINE_FIRST (decl), -1); line = java_get_line_col (EXPR_WFL_FILENAME (cl_v), EXPR_WFL_LINENO (cl_v), EXPR_WFL_COLNO (cl_v)); --- 6744,6750 ---- } EXPR_WFL_FILENAME_NODE (cl_v) = get_identifier (DECL_SOURCE_FILE (decl)); ! EXPR_WFL_SET_LINECOL (cl_v, DECL_SOURCE_LINE (decl), -1); line = java_get_line_col (EXPR_WFL_FILENAME (cl_v), EXPR_WFL_LINENO (cl_v), EXPR_WFL_COLNO (cl_v)); *************** lookup_cl (decl) *** 6727,6734 **** /* Look for a simple name in the single-type import list */ static tree ! find_name_in_single_imports (name) ! tree name; { tree node; --- 6760,6766 ---- /* Look for a simple name in the single-type import list */ static tree ! find_name_in_single_imports (tree name) { tree node; *************** find_name_in_single_imports (name) *** 6742,6748 **** /* Process all single-type import. */ static int ! process_imports () { tree import; int error_found; --- 6774,6780 ---- /* Process all single-type import. */ static int ! process_imports (void) { tree import; int error_found; *************** process_imports () *** 6752,6761 **** tree to_be_found = EXPR_WFL_NODE (TREE_PURPOSE (import)); char *original_name; ! obstack_grow0 (&temporary_obstack, ! IDENTIFIER_POINTER (to_be_found), ! IDENTIFIER_LENGTH (to_be_found)); ! original_name = obstack_finish (&temporary_obstack); /* Don't load twice something already defined. */ if (IDENTIFIER_CLASS_VALUE (to_be_found)) --- 6784,6792 ---- tree to_be_found = EXPR_WFL_NODE (TREE_PURPOSE (import)); char *original_name; ! original_name = xmemdup (IDENTIFIER_POINTER (to_be_found), ! IDENTIFIER_LENGTH (to_be_found), ! IDENTIFIER_LENGTH (to_be_found) + 1); /* Don't load twice something already defined. */ if (IDENTIFIER_CLASS_VALUE (to_be_found)) *************** process_imports () *** 6772,6778 **** /* We found it, we can bail out */ if (IDENTIFIER_CLASS_VALUE (to_be_found)) ! break; /* We haven't found it. Maybe we're trying to access an inner class. The only way for us to know is to try again --- 6803,6813 ---- /* We found it, we can bail out */ if (IDENTIFIER_CLASS_VALUE (to_be_found)) ! { ! check_deprecation (TREE_PURPOSE (import), ! IDENTIFIER_CLASS_VALUE (to_be_found)); ! break; ! } /* We haven't found it. Maybe we're trying to access an inner class. The only way for us to know is to try again *************** process_imports () *** 6791,6797 **** error_found = 1; } ! obstack_free (&temporary_obstack, original_name); if (error_found) return 1; } --- 6826,6832 ---- error_found = 1; } ! free (original_name); if (error_found) return 1; } *************** process_imports () *** 6802,6810 **** statement. */ static void ! find_in_imports (enclosing_type, class_type) ! tree enclosing_type; ! tree class_type; { tree import = (enclosing_type ? TYPE_IMPORT_LIST (enclosing_type) : ctxp->import_list); --- 6837,6843 ---- statement. */ static void ! find_in_imports (tree enclosing_type, tree class_type) { tree import = (enclosing_type ? TYPE_IMPORT_LIST (enclosing_type) : ctxp->import_list); *************** find_in_imports (enclosing_type, class_t *** 6821,6829 **** } static int ! note_possible_classname (name, len) ! const char *name; ! int len; { tree node; if (len > 5 && strncmp (&name [len-5], ".java", 5) == 0) --- 6854,6860 ---- } static int ! note_possible_classname (const char *name, int len) { tree node; if (len > 5 && strncmp (&name [len-5], ".java", 5) == 0) *************** note_possible_classname (name, len) *** 6843,6850 **** directory. */ static void ! read_import_dir (wfl) ! tree wfl; { tree package_id = EXPR_WFL_NODE (wfl); const char *package_name = IDENTIFIER_POINTER (package_id); --- 6874,6880 ---- directory. */ static void ! read_import_dir (tree wfl) { tree package_id = EXPR_WFL_NODE (wfl); const char *package_name = IDENTIFIER_POINTER (package_id); *************** read_import_dir (wfl) *** 6965,6973 **** entire list, to detected potential double definitions. */ static int ! find_in_imports_on_demand (enclosing_type, class_type) ! tree enclosing_type; ! tree class_type; { tree class_type_name = TYPE_NAME (class_type); tree import = (enclosing_type ? TYPE_IMPORT_DEMAND_LIST (enclosing_type) : --- 6995,7001 ---- entire list, to detected potential double definitions. */ static int ! find_in_imports_on_demand (tree enclosing_type, tree class_type) { tree class_type_name = TYPE_NAME (class_type); tree import = (enclosing_type ? TYPE_IMPORT_DEMAND_LIST (enclosing_type) : *************** find_in_imports_on_demand (enclosing_typ *** 6979,6985 **** for (; import; import = TREE_CHAIN (import)) { ! int saved_lineno = lineno; int access_check; const char *id_name; tree decl, type_name_copy; --- 7007,7013 ---- for (; import; import = TREE_CHAIN (import)) { ! int saved_lineno = input_line; int access_check; const char *id_name; tree decl, type_name_copy; *************** find_in_imports_on_demand (enclosing_typ *** 6998,7004 **** /* Setup lineno so that it refers to the line of the import (in case we parse a class file and encounter errors */ ! lineno = EXPR_WFL_LINENO (TREE_PURPOSE (import)); type_name_copy = TYPE_NAME (class_type); TYPE_NAME (class_type) = node; --- 7026,7032 ---- /* Setup lineno so that it refers to the line of the import (in case we parse a class file and encounter errors */ ! input_line = EXPR_WFL_LINENO (TREE_PURPOSE (import)); type_name_copy = TYPE_NAME (class_type); TYPE_NAME (class_type) = node; *************** find_in_imports_on_demand (enclosing_typ *** 7020,7026 **** /* 6.6.1: Inner classes are subject to member access rules. */ access_check = 0; ! lineno = saved_lineno; /* If the loaded class is not accessible or couldn't be loaded, we restore the original TYPE_NAME and process the next --- 7048,7054 ---- /* 6.6.1: Inner classes are subject to member access rules. */ access_check = 0; ! input_line = saved_lineno; /* If the loaded class is not accessible or couldn't be loaded, we restore the original TYPE_NAME and process the next *************** find_in_imports_on_demand (enclosing_typ *** 7067,7077 **** particular package is added only once. */ static void ! register_package (name) ! tree name; { static htab_t pht; ! PTR *e; if (pht == NULL) pht = htab_create (50, htab_hash_pointer, htab_eq_pointer, NULL); --- 7095,7104 ---- particular package is added only once. */ static void ! register_package (tree name) { static htab_t pht; ! void **e; if (pht == NULL) pht = htab_create (50, htab_hash_pointer, htab_eq_pointer, NULL); *************** register_package (name) *** 7085,7092 **** } static tree ! resolve_package (pkg, next, type_name) ! tree pkg, *next, *type_name; { tree current; tree decl = NULL_TREE; --- 7112,7118 ---- } static tree ! resolve_package (tree pkg, tree *next, tree *type_name) { tree current; tree decl = NULL_TREE; *************** resolve_package (pkg, next, type_name) *** 7127,7134 **** access is being attempted. */ static void ! check_inner_class_access (decl, enclosing_decl, cl) ! tree decl, enclosing_decl, cl; { const char *access; tree enclosing_decl_type; --- 7153,7159 ---- access is being attempted. */ static void ! check_inner_class_access (tree decl, tree enclosing_decl, tree cl) { const char *access; tree enclosing_decl_type; *************** check_inner_class_access (decl, enclosin *** 7207,7216 **** was found, it is reported and accounted for. */ static int ! check_pkg_class_access (class_name, cl, verbose) ! tree class_name; ! tree cl; ! bool verbose; { tree type; --- 7232,7238 ---- was found, it is reported and accounted for. */ static int ! check_pkg_class_access (tree class_name, tree cl, bool verbose) { tree type; *************** check_pkg_class_access (class_name, cl, *** 7246,7255 **** /* Local variable declaration. */ static void ! declare_local_variables (modifier, type, vlist) ! int modifier; ! tree type; ! tree vlist; { tree decl, current, saved_type; tree type_wfl = NULL_TREE; --- 7268,7274 ---- /* Local variable declaration. */ static void ! declare_local_variables (int modifier, tree type, tree vlist) { tree decl, current, saved_type; tree type_wfl = NULL_TREE; *************** declare_local_variables (modifier, type, *** 7357,7364 **** /* Called during parsing. Build decls from argument list. */ static void ! source_start_java_method (fndecl) ! tree fndecl; { tree tem; tree parm_decl; --- 7376,7382 ---- /* Called during parsing. Build decls from argument list. */ static void ! source_start_java_method (tree fndecl) { tree tem; tree parm_decl; *************** source_start_java_method (fndecl) *** 7413,7427 **** /* Called during parsing. Creates an artificial method declaration. */ static tree ! create_artificial_method (class, flags, type, name, args) ! tree class; ! int flags; ! tree type, name, args; { tree mdecl; java_parser_context_save_global (); ! lineno = 0; mdecl = make_node (FUNCTION_TYPE); TREE_TYPE (mdecl) = type; TYPE_ARG_TYPES (mdecl) = args; --- 7431,7443 ---- /* Called during parsing. Creates an artificial method declaration. */ static tree ! create_artificial_method (tree class, int flags, tree type, ! tree name, tree args) { tree mdecl; java_parser_context_save_global (); ! input_line = 0; mdecl = make_node (FUNCTION_TYPE); TREE_TYPE (mdecl) = type; TYPE_ARG_TYPES (mdecl) = args; *************** create_artificial_method (class, flags, *** 7434,7451 **** /* Starts the body if an artificial method. */ static void ! start_artificial_method_body (mdecl) ! tree mdecl; { DECL_SOURCE_LINE (mdecl) = 1; ! DECL_SOURCE_LINE_MERGE (mdecl, 1); source_start_java_method (mdecl); enter_block (); } static void ! end_artificial_method_body (mdecl) ! tree mdecl; { /* exit_block modifies DECL_FUNCTION_BODY (current_function_decl). It has to be evaluated first. (if mdecl is current_function_decl, --- 7450,7465 ---- /* Starts the body if an artificial method. */ static void ! start_artificial_method_body (tree mdecl) { DECL_SOURCE_LINE (mdecl) = 1; ! DECL_FUNCTION_LAST_LINE (mdecl) = 1; source_start_java_method (mdecl); enter_block (); } static void ! end_artificial_method_body (tree mdecl) { /* exit_block modifies DECL_FUNCTION_BODY (current_function_decl). It has to be evaluated first. (if mdecl is current_function_decl, *************** end_artificial_method_body (mdecl) *** 7458,7466 **** /* Dump a tree of some kind. This is a convenience wrapper for the dump_* functions in tree-dump.c. */ static void ! dump_java_tree (phase, t) ! enum tree_dump_index phase; ! tree t; { FILE *stream; int flags; --- 7472,7478 ---- /* Dump a tree of some kind. This is a convenience wrapper for the dump_* functions in tree-dump.c. */ static void ! dump_java_tree (enum tree_dump_index phase, tree t) { FILE *stream; int flags; *************** dump_java_tree (phase, t) *** 7477,7483 **** /* Terminate a function and expand its body. */ static void ! source_end_java_method () { tree fndecl = current_function_decl; --- 7489,7495 ---- /* Terminate a function and expand its body. */ static void ! source_end_java_method (void) { tree fndecl = current_function_decl; *************** source_end_java_method () *** 7485,7491 **** return; java_parser_context_save_global (); ! lineno = ctxp->last_ccb_indent1; /* Turn function bodies with only a NOP expr null, so they don't get generated at all and we won't get warnings when using the -W --- 7497,7503 ---- return; java_parser_context_save_global (); ! input_line = ctxp->last_ccb_indent1; /* Turn function bodies with only a NOP expr null, so they don't get generated at all and we won't get warnings when using the -W *************** source_end_java_method () *** 7497,7526 **** patched. Dump it to a file if the user requested it. */ dump_java_tree (TDI_original, fndecl); ! java_optimize_inline (fndecl); ! ! /* Generate function's code */ ! if (BLOCK_EXPR_BODY (DECL_FUNCTION_BODY (fndecl)) ! && ! flag_emit_class_files ! && ! flag_emit_xref) ! expand_expr_stmt (BLOCK_EXPR_BODY (DECL_FUNCTION_BODY (fndecl))); ! ! /* pop out of its parameters */ ! pushdecl_force_head (DECL_ARGUMENTS (fndecl)); ! poplevel (1, 0, 1); ! BLOCK_SUPERCONTEXT (DECL_INITIAL (fndecl)) = fndecl; ! ! /* Generate rtl for function exit. */ ! if (! flag_emit_class_files && ! flag_emit_xref) ! { ! lineno = DECL_SOURCE_LINE_LAST (fndecl); ! expand_function_end (input_filename, lineno, 0); ! ! DECL_SOURCE_LINE (fndecl) = DECL_SOURCE_LINE_FIRST (fndecl); ! ! /* Run the optimizers and output assembler code for this function. */ ! rest_of_compilation (fndecl); ! } current_function_decl = NULL_TREE; java_parser_context_restore_global (); --- 7509,7517 ---- patched. Dump it to a file if the user requested it. */ dump_java_tree (TDI_original, fndecl); ! /* Defer expanding the method until cgraph analysis is complete. */ ! if (DECL_SAVED_TREE (fndecl)) ! cgraph_finalize_function (fndecl, false); current_function_decl = NULL_TREE; java_parser_context_restore_global (); *************** source_end_java_method () *** 7530,7537 **** expression second operand if necessary. */ tree ! java_method_add_stmt (fndecl, expr) ! tree fndecl, expr; { if (!GET_CURRENT_BLOCK (fndecl)) return NULL_TREE; --- 7521,7527 ---- expression second operand if necessary. */ tree ! java_method_add_stmt (tree fndecl, tree expr) { if (!GET_CURRENT_BLOCK (fndecl)) return NULL_TREE; *************** java_method_add_stmt (fndecl, expr) *** 7539,7546 **** } static tree ! add_stmt_to_block (b, type, stmt) ! tree b, type, stmt; { tree body = BLOCK_EXPR_BODY (b), c; --- 7529,7535 ---- } static tree ! add_stmt_to_block (tree b, tree type, tree stmt) { tree body = BLOCK_EXPR_BODY (b), c; *************** add_stmt_to_block (b, type, stmt) *** 7559,7578 **** COMPOUND_EXPR and add STMT to it. */ static tree ! add_stmt_to_compound (existing, type, stmt) ! tree existing, type, stmt; { - /* Keep track of this for inlining. */ - if (current_function_decl) - ++DECL_NUM_STMTS (current_function_decl); - if (existing) return build (COMPOUND_EXPR, type, existing, stmt); else return stmt; } ! void java_layout_seen_class_methods () { tree previous_list = all_class_list; tree end = NULL_TREE; --- 7548,7562 ---- COMPOUND_EXPR and add STMT to it. */ static tree ! add_stmt_to_compound (tree existing, tree type, tree stmt) { if (existing) return build (COMPOUND_EXPR, type, existing, stmt); else return stmt; } ! void java_layout_seen_class_methods (void) { tree previous_list = all_class_list; tree end = NULL_TREE; *************** void java_layout_seen_class_methods () *** 7596,7608 **** static GTY(()) tree stop_reordering; void ! java_reorder_fields () { tree current; for (current = gclass_list; current; current = TREE_CHAIN (current)) { ! current_class = TREE_TYPE (TREE_VALUE (current)); if (current_class == stop_reordering) break; --- 7580,7592 ---- static GTY(()) tree stop_reordering; void ! java_reorder_fields (void) { tree current; for (current = gclass_list; current; current = TREE_CHAIN (current)) { ! output_class = current_class = TREE_TYPE (TREE_VALUE (current)); if (current_class == stop_reordering) break; *************** java_reorder_fields () *** 7641,7647 **** classes */ void ! java_layout_classes () { tree current; int save_error_count = java_error_count; --- 7625,7631 ---- classes */ void ! java_layout_classes (void) { tree current; int save_error_count = java_error_count; *************** java_layout_classes () *** 7659,7665 **** for (current = gclass_list; current; current = TREE_CHAIN (current)) { ! current_class = TREE_TYPE (TREE_VALUE (current)); layout_class (current_class); /* Error reported by the caller */ --- 7643,7649 ---- for (current = gclass_list; current; current = TREE_CHAIN (current)) { ! output_class = current_class = TREE_TYPE (TREE_VALUE (current)); layout_class (current_class); /* Error reported by the caller */ *************** java_layout_classes () *** 7674,7684 **** java_parse_abort_on_error (); } ! /* Expand methods in the current set of classes rememebered for generation. */ static void ! java_complete_expand_classes () { tree current; --- 7658,7668 ---- java_parse_abort_on_error (); } ! /* Expand methods in the current set of classes remembered for generation. */ static void ! java_complete_expand_classes (void) { tree current; *************** java_complete_expand_classes () *** 7693,7700 **** classes, if any. */ static void ! java_complete_expand_class (outer) ! tree outer; { tree inner_list; --- 7677,7683 ---- classes, if any. */ static void ! java_complete_expand_class (tree outer) { tree inner_list; *************** java_complete_expand_class (outer) *** 7720,7734 **** constructors and then . */ static void ! java_complete_expand_methods (class_decl) ! tree class_decl; { tree clinit, decl, first_decl; ! current_class = TREE_TYPE (class_decl); ! ! /* Initialize a new constant pool */ ! init_outgoing_cpool (); /* Pre-expand to figure whether we really need it or not. If we do need it, we pre-expand the static fields so they're --- 7703,7713 ---- constructors and then . */ static void ! java_complete_expand_methods (tree class_decl) { tree clinit, decl, first_decl; ! output_class = current_class = TREE_TYPE (class_decl); /* Pre-expand to figure whether we really need it or not. If we do need it, we pre-expand the static fields so they're *************** java_complete_expand_methods (class_decl *** 7813,7829 **** if (DECL_CONSTRUCTOR_P (decl) && verify_constructor_circularity (decl, decl)) break; - - /* Save the constant pool. We'll need to restore it later. */ - TYPE_CPOOL (current_class) = outgoing_cpool; } /* Attempt to create . Pre-expand static fields so they can be safely used in some other methods/constructors. */ static tree ! maybe_generate_pre_expand_clinit (class_type) ! tree class_type; { tree current, mdecl; --- 7792,7804 ---- if (DECL_CONSTRUCTOR_P (decl) && verify_constructor_circularity (decl, decl)) break; } /* Attempt to create . Pre-expand static fields so they can be safely used in some other methods/constructors. */ static tree ! maybe_generate_pre_expand_clinit (tree class_type) { tree current, mdecl; *************** maybe_generate_pre_expand_clinit (class_ *** 7882,7889 **** MODIFY_EXPR with a constant value. */ static int ! analyze_clinit_body (this_class, bbody) ! tree this_class, bbody; { while (bbody) switch (TREE_CODE (bbody)) --- 7857,7863 ---- MODIFY_EXPR with a constant value. */ static int ! analyze_clinit_body (tree this_class, tree bbody) { while (bbody) switch (TREE_CODE (bbody)) *************** analyze_clinit_body (this_class, bbody) *** 7931,7938 **** is empty. Return 1 if was discarded, 0 otherwise. */ static int ! maybe_yank_clinit (mdecl) ! tree mdecl; { tree type, current; tree fbody, bbody; --- 7905,7911 ---- is empty. Return 1 if was discarded, 0 otherwise. */ static int ! maybe_yank_clinit (tree mdecl) { tree type, current; tree fbody, bbody; *************** maybe_yank_clinit (mdecl) *** 8004,8012 **** /* Install the argument from MDECL. Suitable to completion and expansion of mdecl's body. */ ! static void ! start_complete_expand_method (mdecl) ! tree mdecl; { tree tem; --- 7977,7984 ---- /* Install the argument from MDECL. Suitable to completion and expansion of mdecl's body. */ ! void ! start_complete_expand_method (tree mdecl) { tree tem; *************** start_complete_expand_method (mdecl) *** 8031,8037 **** TREE_CHAIN (tem) = next; } pushdecl_force_head (DECL_ARGUMENTS (mdecl)); ! lineno = DECL_SOURCE_LINE_FIRST (mdecl); build_result_decl (mdecl); } --- 8003,8009 ---- TREE_CHAIN (tem) = next; } pushdecl_force_head (DECL_ARGUMENTS (mdecl)); ! input_line = DECL_SOURCE_LINE (mdecl); build_result_decl (mdecl); } *************** start_complete_expand_method (mdecl) *** 8039,8046 **** /* Complete and expand a method. */ static void ! java_complete_expand_method (mdecl) ! tree mdecl; { tree fbody, block_body, exception_copy; --- 8011,8017 ---- /* Complete and expand a method. */ static void ! java_complete_expand_method (tree mdecl) { tree fbody, block_body, exception_copy; *************** java_complete_expand_method (mdecl) *** 8144,8165 **** /* For with each class for which there's code to generate. */ static void ! java_expand_method_bodies (class) ! tree class; { tree decl; for (decl = TYPE_METHODS (class); decl; decl = TREE_CHAIN (decl)) { ! if (!DECL_FUNCTION_BODY (decl)) continue; current_function_decl = decl; ! /* Save the function for inlining. */ ! if (flag_inline_trees) ! DECL_SAVED_TREE (decl) = ! BLOCK_EXPR_BODY (DECL_FUNCTION_BODY (decl)); ! /* It's time to assign the variable flagging static class initialization based on which classes invoked static methods are definitely initializing. This should be flagged. */ --- 8115,8146 ---- /* For with each class for which there's code to generate. */ static void ! java_expand_method_bodies (tree class) { tree decl; for (decl = TYPE_METHODS (class); decl; decl = TREE_CHAIN (decl)) { ! tree block; ! tree body; ! ! if (! DECL_FUNCTION_BODY (decl)) continue; current_function_decl = decl; ! block = BLOCK_EXPR_BODY (DECL_FUNCTION_BODY (decl)); ! ! if (TREE_CODE (block) != BLOCK) ! abort (); ! ! /* Save the function body for inlining. */ ! DECL_SAVED_TREE (decl) = block; ! ! body = BLOCK_EXPR_BODY (block); ! ! if (TREE_TYPE (body) == NULL_TREE) ! abort (); ! /* It's time to assign the variable flagging static class initialization based on which classes invoked static methods are definitely initializing. This should be flagged. */ *************** java_expand_method_bodies (class) *** 8191,8205 **** } } ! /* Prepare the function for RTL expansion */ ! start_complete_expand_method (decl); ! /* Expand function start, generate initialization flag ! assignment, and handle synchronized methods. */ ! complete_start_java_method (decl); ! /* Expand the rest of the function body and terminate ! expansion. */ source_end_java_method (); } } --- 8172,8212 ---- } } ! /* Prepend class initialization to static methods. */ ! if (METHOD_STATIC (decl) && ! METHOD_PRIVATE (decl) ! && ! flag_emit_class_files ! && ! DECL_CLINIT_P (decl) ! && ! CLASS_INTERFACE (TYPE_NAME (class))) ! { ! tree init = build (CALL_EXPR, void_type_node, ! build_address_of (soft_initclass_node), ! build_tree_list (NULL_TREE, ! build_class_ref (class)), ! NULL_TREE); ! TREE_SIDE_EFFECTS (init) = 1; ! body = build (COMPOUND_EXPR, TREE_TYPE (body), init, body); ! BLOCK_EXPR_BODY (block) = body; ! } ! /* Wrap synchronized method bodies in a monitorenter ! plus monitorexit cleanup. */ ! if (METHOD_SYNCHRONIZED (decl) && ! flag_emit_class_files) ! { ! tree enter, exit, lock; ! if (METHOD_STATIC (decl)) ! lock = build_class_ref (class); ! else ! lock = DECL_ARGUMENTS (decl); ! BUILD_MONITOR_ENTER (enter, lock); ! BUILD_MONITOR_EXIT (exit, lock); ! body = build (COMPOUND_EXPR, void_type_node, ! enter, ! build (TRY_FINALLY_EXPR, void_type_node, body, exit)); ! BLOCK_EXPR_BODY (block) = body; ! } ! ! /* Expand the the function body. */ source_end_java_method (); } } *************** java_expand_method_bodies (class) *** 8217,8224 **** be later turned into a write by calling outer_field_access_fix. */ static tree ! build_outer_field_access (id, decl) ! tree id, decl; { tree access = NULL_TREE; tree ctx = TREE_TYPE (DECL_CONTEXT (TYPE_NAME (current_class))); --- 8224,8230 ---- be later turned into a write by calling outer_field_access_fix. */ static tree ! build_outer_field_access (tree id, tree decl) { tree access = NULL_TREE; tree ctx = TREE_TYPE (DECL_CONTEXT (TYPE_NAME (current_class))); *************** build_outer_field_access (id, decl) *** 8267,8274 **** access. */ static int ! outer_field_access_p (type, decl) ! tree type, decl; { if (!INNER_CLASS_TYPE_P (type) || TREE_CODE (decl) != FIELD_DECL --- 8273,8279 ---- access. */ static int ! outer_field_access_p (tree type, tree decl) { if (!INNER_CLASS_TYPE_P (type) || TREE_CODE (decl) != FIELD_DECL *************** outer_field_access_p (type, decl) *** 8276,8282 **** return 0; /* If the inner class extends the declaration context of the field ! we're try to acces, then this isn't an outer field access */ if (inherits_from_p (type, DECL_CONTEXT (decl))) return 0; --- 8281,8287 ---- return 0; /* If the inner class extends the declaration context of the field ! we're trying to access, then this isn't an outer field access */ if (inherits_from_p (type, DECL_CONTEXT (decl))) return 0; *************** outer_field_access_p (type, decl) *** 8306,8313 **** call if necessary. */ static int ! outer_field_expanded_access_p (node, name, arg_type, arg) ! tree node, *name, *arg_type, *arg; { int identified = 0; --- 8311,8318 ---- call if necessary. */ static int ! outer_field_expanded_access_p (tree node, tree *name, tree *arg_type, ! tree *arg) { int identified = 0; *************** outer_field_expanded_access_p (node, nam *** 8353,8360 **** be identified. */ static tree ! outer_field_access_fix (wfl, node, rhs) ! tree wfl, node, rhs; { tree name, arg_type, arg; --- 8358,8364 ---- be identified. */ static tree ! outer_field_access_fix (tree wfl, tree node, tree rhs) { tree name, arg_type, arg; *************** outer_field_access_fix (wfl, node, rhs) *** 8374,8382 **** read access. */ static tree ! build_outer_field_access_expr (lc, type, access_method_name, arg1, arg2) ! int lc; ! tree type, access_method_name, arg1, arg2; { tree args, cn, access; --- 8378,8385 ---- read access. */ static tree ! build_outer_field_access_expr (int lc, tree type, tree access_method_name, ! tree arg1, tree arg2) { tree args, cn, access; *************** build_outer_field_access_expr (lc, type, *** 8393,8399 **** } static tree ! build_new_access_id () { static int access_n_counter = 1; char buffer [128]; --- 8396,8402 ---- } static tree ! build_new_access_id (void) { static int access_n_counter = 1; char buffer [128]; *************** build_new_access_id () *** 8417,8424 **** */ static tree ! build_outer_field_access_methods (decl) ! tree decl; { tree id, args, stmt, mdecl; --- 8420,8426 ---- */ static tree ! build_outer_field_access_methods (tree decl) { tree id, args, stmt, mdecl; *************** build_outer_field_access_methods (decl) *** 8468,8475 **** /* Build an field access method NAME. */ static tree ! build_outer_field_access_method (class, type, name, args, body) ! tree class, type, name, args, body; { tree saved_current_function_decl, mdecl; --- 8470,8477 ---- /* Build an field access method NAME. */ static tree ! build_outer_field_access_method (tree class, tree type, tree name, ! tree args, tree body) { tree saved_current_function_decl, mdecl; *************** build_outer_field_access_method (class, *** 8493,8500 **** certain kinds of method invocation from inner classes. */ static tree ! build_outer_method_access_method (decl) ! tree decl; { tree saved_current_function_decl, mdecl; tree args = NULL_TREE, call_args = NULL_TREE; --- 8495,8501 ---- certain kinds of method invocation from inner classes. */ static tree ! build_outer_method_access_method (tree decl) { tree saved_current_function_decl, mdecl; tree args = NULL_TREE, call_args = NULL_TREE; *************** build_outer_method_access_method (decl) *** 8534,8540 **** /* There is a potential bug here. We should be able to use fix_method_argument_names, but then arg names get mixed up and eventually a constructor will have its this$0 altered and the ! outer context won't be assignment properly. The test case is stub.java FIXME */ TYPE_ARG_TYPES (TREE_TYPE (mdecl)) = args; --- 8535,8541 ---- /* There is a potential bug here. We should be able to use fix_method_argument_names, but then arg names get mixed up and eventually a constructor will have its this$0 altered and the ! outer context won't be assignment properly. The testcase is stub.java FIXME */ TYPE_ARG_TYPES (TREE_TYPE (mdecl)) = args; *************** build_outer_method_access_method (decl) *** 8583,8591 **** for example build_outer_field_access). */ static tree ! build_access_to_thisn (from, to, lc) ! tree from, to; ! int lc; { tree access = NULL_TREE; --- 8584,8590 ---- for example build_outer_field_access). */ static tree ! build_access_to_thisn (tree from, tree to, int lc) { tree access = NULL_TREE; *************** build_access_to_thisn (from, to, lc) *** 8627,8634 **** attribute so that they can't be referred to directly. */ static tree ! maybe_build_thisn_access_method (type) ! tree type; { tree mdecl, args, stmt, rtype; tree saved_current_function_decl; --- 8626,8632 ---- attribute so that they can't be referred to directly. */ static tree ! maybe_build_thisn_access_method (tree type) { tree mdecl, args, stmt, rtype; tree saved_current_function_decl; *************** static GTY(()) tree saved_thisn; *** 8673,8680 **** static GTY(()) tree saved_type; static tree ! build_current_thisn (type) ! tree type; { static int saved_i = -1; static int saved_type_i = 0; --- 8671,8677 ---- static GTY(()) tree saved_type; static tree ! build_current_thisn (tree type) { static int saved_i = -1; static int saved_type_i = 0; *************** build_current_thisn (type) *** 8708,8719 **** return saved_thisn; } ! /* Return the assignement to the hidden enclosing context `this$' by the second incoming parameter to the innerclass constructor. The form used is `this.this$ = this$;'. */ static tree ! build_thisn_assign () { if (current_class && PURE_INNER_CLASS_TYPE_P (current_class)) { --- 8705,8716 ---- return saved_thisn; } ! /* Return the assignment to the hidden enclosing context `this$' by the second incoming parameter to the innerclass constructor. The form used is `this.this$ = this$;'. */ static tree ! build_thisn_assign (void) { if (current_class && PURE_INNER_CLASS_TYPE_P (current_class)) { *************** build_thisn_assign () *** 8721,8727 **** tree lhs = make_qualified_primary (build_wfl_node (this_identifier_node), build_wfl_node (thisn), 0); tree rhs = build_wfl_node (thisn); ! EXPR_WFL_SET_LINECOL (lhs, lineno, 0); return build_assignment (ASSIGN_TK, EXPR_WFL_LINECOL (lhs), lhs, rhs); } return NULL_TREE; --- 8718,8724 ---- tree lhs = make_qualified_primary (build_wfl_node (this_identifier_node), build_wfl_node (thisn), 0); tree rhs = build_wfl_node (thisn); ! EXPR_WFL_SET_LINECOL (lhs, input_line, 0); return build_assignment (ASSIGN_TK, EXPR_WFL_LINECOL (lhs), lhs, rhs); } return NULL_TREE; *************** static GTY(()) tree get_message_wfl; *** 8742,8753 **** static GTY(()) tree type_parm_wfl; static tree ! build_dot_class_method (class) ! tree class; { #define BWF(S) build_wfl_node (get_identifier ((S))) #define MQN(X,Y) make_qualified_name ((X), (Y), 0) ! tree args, tmp, saved_current_function_decl, mdecl; tree stmt, throw_stmt; if (!get_message_wfl) --- 8739,8749 ---- static GTY(()) tree type_parm_wfl; static tree ! build_dot_class_method (tree class) { #define BWF(S) build_wfl_node (get_identifier ((S))) #define MQN(X,Y) make_qualified_name ((X), (Y), 0) ! tree args, tmp, saved_current_function_decl, mdecl, qual_name; tree stmt, throw_stmt; if (!get_message_wfl) *************** build_dot_class_method (class) *** 8764,8778 **** /* Build the qualified name java.lang.Class.forName */ tmp = MQN (MQN (MQN (BWF ("java"), BWF ("lang")), BWF ("Class")), BWF ("forName")); - load_class (class_not_found_type_node, 1); - load_class (no_class_def_found_type_node, 1); /* Create the "class$" function */ mdecl = create_artificial_method (class, ACC_STATIC, build_pointer_type (class_type_node), classdollar_identifier_node, args); ! DECL_FUNCTION_THROWS (mdecl) = ! build_tree_list (NULL_TREE, no_class_def_found_type_node); /* We start by building the try block. We need to build: return (java.lang.Class.forName (type)); */ --- 8760,8776 ---- /* Build the qualified name java.lang.Class.forName */ tmp = MQN (MQN (MQN (BWF ("java"), BWF ("lang")), BWF ("Class")), BWF ("forName")); /* Create the "class$" function */ mdecl = create_artificial_method (class, ACC_STATIC, build_pointer_type (class_type_node), classdollar_identifier_node, args); ! qual_name = MQN (MQN (BWF ("java"), BWF ("lang")), ! BWF ("NoClassDefFoundError")); ! DECL_FUNCTION_THROWS (mdecl) = build_tree_list (NULL_TREE, qual_name); ! register_incomplete_type (JDEP_EXCEPTION, qual_name, NULL_TREE, NULL_TREE); ! JDEP_GET_PATCH (CLASSD_LAST (ctxp->classd_list)) = ! &TREE_VALUE (DECL_FUNCTION_THROWS (mdecl)); /* We start by building the try block. We need to build: return (java.lang.Class.forName (type)); */ *************** build_dot_class_method (class) *** 8795,8802 **** throw_stmt = build1 (THROW_EXPR, NULL_TREE, throw_stmt); /* Encapsulate STMT in a try block. The catch clause executes THROW_STMT */ ! stmt = encapsulate_with_try_catch (0, class_not_found_type_node, ! stmt, throw_stmt); fix_method_argument_names (args, mdecl); layout_class_method (class, NULL_TREE, mdecl, NULL_TREE); --- 8793,8801 ---- throw_stmt = build1 (THROW_EXPR, NULL_TREE, throw_stmt); /* Encapsulate STMT in a try block. The catch clause executes THROW_STMT */ ! qual_name = MQN (MQN (BWF ("java"), BWF ("lang")), ! BWF ("ClassNotFoundException")); ! stmt = encapsulate_with_try_catch (0, qual_name, stmt, throw_stmt); fix_method_argument_names (args, mdecl); layout_class_method (class, NULL_TREE, mdecl, NULL_TREE); *************** build_dot_class_method (class) *** 8811,8820 **** } static tree ! build_dot_class_method_invocation (type) ! tree type; { ! tree sig_id, s; if (TYPE_ARRAY_P (type)) sig_id = build_java_signature (type); --- 8810,8819 ---- } static tree ! build_dot_class_method_invocation (tree this_class, tree type) { ! tree dot_class_method = TYPE_DOT_CLASS (this_class); ! tree sig_id, s, t; if (TYPE_ARRAY_P (type)) sig_id = build_java_signature (type); *************** build_dot_class_method_invocation (type) *** 8827,8834 **** s = build_string (IDENTIFIER_LENGTH (sig_id), IDENTIFIER_POINTER (sig_id)); ! return build_method_invocation (build_wfl_node (classdollar_identifier_node), ! build_tree_list (NULL_TREE, s)); } /* This section of the code deals with constructor. */ --- 8826,8839 ---- s = build_string (IDENTIFIER_LENGTH (sig_id), IDENTIFIER_POINTER (sig_id)); ! t = build_method_invocation (build_wfl_node (DECL_NAME (dot_class_method)), ! build_tree_list (NULL_TREE, s)); ! if (DECL_CONTEXT (dot_class_method) != this_class) ! { ! tree class_name = DECL_NAME (TYPE_NAME (DECL_CONTEXT (dot_class_method))); ! t = make_qualified_primary (build_wfl_node (class_name), t, 0); ! } ! return t; } /* This section of the code deals with constructor. */ *************** build_dot_class_method_invocation (type) *** 8838,8845 **** necessary. */ static void ! fix_constructors (mdecl) ! tree mdecl; { tree iii; /* Instance Initializer Invocation */ tree body = DECL_FUNCTION_BODY (mdecl); --- 8843,8849 ---- necessary. */ static void ! fix_constructors (tree mdecl) { tree iii; /* Instance Initializer Invocation */ tree body = DECL_FUNCTION_BODY (mdecl); *************** fix_constructors (mdecl) *** 8928,8934 **** if (!found) compound = add_stmt_to_compound (compound, NULL_TREE, build_super_invocation (mdecl)); ! /* Explicit super() invokation should take place before the instance initializer blocks. */ else { --- 8932,8938 ---- if (!found) compound = add_stmt_to_compound (compound, NULL_TREE, build_super_invocation (mdecl)); ! /* Explicit super() invocation should take place before the instance initializer blocks. */ else { *************** fix_constructors (mdecl) *** 8959,8966 **** for something that has the same signature. */ static int ! verify_constructor_super (mdecl) ! tree mdecl; { tree class = CLASSTYPE_SUPER (current_class); int super_inner = PURE_INNER_CLASS_TYPE_P (class); --- 8963,8969 ---- for something that has the same signature. */ static int ! verify_constructor_super (tree mdecl) { tree class = CLASSTYPE_SUPER (current_class); int super_inner = PURE_INNER_CLASS_TYPE_P (class); *************** verify_constructor_super (mdecl) *** 9012,9018 **** static GTY(()) tree reversed_class_list; void ! java_expand_classes () { int save_error_count = 0; static struct parser_ctxt *cur_ctxp = NULL; --- 9015,9021 ---- static GTY(()) tree reversed_class_list; void ! java_expand_classes (void) { int save_error_count = 0; static struct parser_ctxt *cur_ctxp = NULL; *************** java_expand_classes () *** 9025,9030 **** --- 9028,9042 ---- for (cur_ctxp = ctxp_for_generation; cur_ctxp; cur_ctxp = cur_ctxp->next) { + tree current; + for (current = cur_ctxp->class_list; + current; + current = TREE_CHAIN (current)) + gen_indirect_dispatch_tables (TREE_TYPE (current)); + } + + for (cur_ctxp = ctxp_for_generation; cur_ctxp; cur_ctxp = cur_ctxp->next) + { ctxp = cur_ctxp; input_filename = ctxp->filename; lang_init_source (2); /* Error msgs have method prototypes */ *************** java_expand_classes () *** 9033,9041 **** } input_filename = main_input_filename; - /* Find anonymous classes and expand their constructor. This extra pass is ! neccessary because the constructor itself is only generated when the method in which it is defined is expanded. */ for (cur_ctxp = ctxp_for_generation; cur_ctxp; cur_ctxp = cur_ctxp->next) { --- 9045,9052 ---- } input_filename = main_input_filename; /* Find anonymous classes and expand their constructor. This extra pass is ! necessary because the constructor itself is only generated when the method in which it is defined is expanded. */ for (cur_ctxp = ctxp_for_generation; cur_ctxp; cur_ctxp = cur_ctxp->next) { *************** java_expand_classes () *** 9043,9049 **** ctxp = cur_ctxp; for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) { ! current_class = TREE_TYPE (current); if (ANONYMOUS_CLASS_P (current_class)) { tree d; --- 9054,9060 ---- ctxp = cur_ctxp; for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) { ! output_class = current_class = TREE_TYPE (current); if (ANONYMOUS_CLASS_P (current_class)) { tree d; *************** java_expand_classes () *** 9071,9077 **** for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) { tree d; ! current_class = TREE_TYPE (current); for (d = TYPE_METHODS (current_class); d; d = TREE_CHAIN (d)) { if (DECL_RESULT (d) == NULL_TREE) --- 9082,9088 ---- for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) { tree d; ! output_class = current_class = TREE_TYPE (current); for (d = TYPE_METHODS (current_class); d; d = TREE_CHAIN (d)) { if (DECL_RESULT (d) == NULL_TREE) *************** java_expand_classes () *** 9102,9108 **** for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) { tree d; ! current_class = TREE_TYPE (current); for (d = TYPE_METHODS (current_class); d; d = TREE_CHAIN (d)) { if (DECL_RESULT (d) == NULL_TREE) --- 9113,9119 ---- for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) { tree d; ! output_class = current_class = TREE_TYPE (current); for (d = TYPE_METHODS (current_class); d; d = TREE_CHAIN (d)) { if (DECL_RESULT (d) == NULL_TREE) *************** java_expand_classes () *** 9130,9150 **** /* Now things are stable, go for generation of the class data. */ ! /* We pessimistically marked all fields external until we knew ! what set of classes we were planning to compile. Now mark those that will be generated locally as not external. */ for (cur_ctxp = ctxp_for_generation; cur_ctxp; cur_ctxp = cur_ctxp->next) { tree current; ctxp = cur_ctxp; for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) ! { ! tree class = TREE_TYPE (current); ! tree field; ! for (field = TYPE_FIELDS (class); field ; field = TREE_CHAIN (field)) ! if (FIELD_STATIC (field)) ! DECL_EXTERNAL (field) = 0; ! } } /* Compile the classes. */ --- 9141,9155 ---- /* Now things are stable, go for generation of the class data. */ ! /* We pessimistically marked all methods and fields external until ! we knew what set of classes we were planning to compile. Now mark those that will be generated locally as not external. */ for (cur_ctxp = ctxp_for_generation; cur_ctxp; cur_ctxp = cur_ctxp->next) { tree current; ctxp = cur_ctxp; for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) ! java_mark_class_local (TREE_TYPE (current)); } /* Compile the classes. */ *************** java_expand_classes () *** 9173,9189 **** current; current = TREE_CHAIN (current)) { ! current_class = TREE_TYPE (TREE_VALUE (current)); ! outgoing_cpool = TYPE_CPOOL (current_class); if (flag_emit_class_files) write_classfile (current_class); if (flag_emit_xref) expand_xref (current_class); else if (! flag_syntax_only) ! { ! java_expand_method_bodies (current_class); ! finish_class (); ! } } } } --- 9178,9206 ---- current; current = TREE_CHAIN (current)) { ! output_class = current_class = TREE_TYPE (TREE_VALUE (current)); if (flag_emit_class_files) write_classfile (current_class); if (flag_emit_xref) expand_xref (current_class); else if (! flag_syntax_only) ! java_expand_method_bodies (current_class); ! } ! } ! } ! ! void ! java_finish_classes (void) ! { ! static struct parser_ctxt *cur_ctxp = NULL; ! for (cur_ctxp = ctxp_for_generation; cur_ctxp; cur_ctxp = cur_ctxp->next) ! { ! tree current; ! ctxp = cur_ctxp; ! for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) ! { ! output_class = current_class = TREE_TYPE (current); ! finish_class (); } } } *************** java_expand_classes () *** 9194,9202 **** separating `.' operator. */ static tree ! make_qualified_primary (primary, right, location) ! tree primary, right; ! int location; { tree wfl; --- 9211,9217 ---- separating `.' operator. */ static tree ! make_qualified_primary (tree primary, tree right, int location) { tree wfl; *************** make_qualified_primary (primary, right, *** 9220,9227 **** /* Simple merge of two name separated by a `.' */ static tree ! merge_qualified_name (left, right) ! tree left, right; { tree node; if (!left && !right) --- 9235,9241 ---- /* Simple merge of two name separated by a `.' */ static tree ! merge_qualified_name (tree left, tree right) { tree node; if (!left && !right) *************** merge_qualified_name (left, right) *** 9249,9257 **** inherited from the location information of the `.' operator. */ static tree ! make_qualified_name (left, right, location) ! tree left, right; ! int location; { #ifdef USE_COMPONENT_REF tree node = build (COMPONENT_REF, NULL_TREE, left, right); --- 9263,9269 ---- inherited from the location information of the `.' operator. */ static tree ! make_qualified_name (tree left, tree right, int location) { #ifdef USE_COMPONENT_REF tree node = build (COMPONENT_REF, NULL_TREE, left, right); *************** make_qualified_name (left, right, locati *** 9285,9292 **** last identifier is removed from the linked list */ static tree ! cut_identifier_in_qualified (wfl) ! tree wfl; { tree q; tree previous = NULL_TREE; --- 9297,9303 ---- last identifier is removed from the linked list */ static tree ! cut_identifier_in_qualified (tree wfl) { tree q; tree previous = NULL_TREE; *************** cut_identifier_in_qualified (wfl) *** 9305,9313 **** /* Resolve the expression name NAME. Return its decl. */ static tree ! resolve_expression_name (id, orig) ! tree id; ! tree *orig; { tree name = EXPR_WFL_NODE (id); tree decl; --- 9316,9322 ---- /* Resolve the expression name NAME. Return its decl. */ static tree ! resolve_expression_name (tree id, tree *orig) { tree name = EXPR_WFL_NODE (id); tree decl; *************** resolve_expression_name (id, orig) *** 9335,9340 **** --- 9344,9351 ---- if (FIELD_LOCAL_ALIAS_USED (decl)) name = DECL_NAME (decl); + check_deprecation (id, decl); + /* Instance variable (8.3.1.1) can't appear within static method, static initializer or initializer for a static variable. */ *************** resolve_expression_name (id, orig) *** 9377,9382 **** --- 9388,9399 ---- /* We may be asked to save the real field access node */ if (orig) *orig = access; + /* Last check: can we access the field? */ + if (not_accessible_p (current_class, decl, NULL_TREE, 0)) + { + not_accessible_field_error (id, decl); + return error_mark_node; + } /* And we return what we got */ return access; } *************** resolve_expression_name (id, orig) *** 9409,9416 **** } static void ! static_ref_err (wfl, field_id, class_type) ! tree wfl, field_id, class_type; { parse_error_context (wfl, --- 9426,9432 ---- } static void ! static_ref_err (tree wfl, tree field_id, tree class_type) { parse_error_context (wfl, *************** static_ref_err (wfl, field_id, class_typ *** 9425,9433 **** recipient's address can be null. */ static tree ! resolve_field_access (qual_wfl, field_decl, field_type) ! tree qual_wfl; ! tree *field_decl, *field_type; { int is_static = 0; tree field_ref; --- 9441,9447 ---- recipient's address can be null. */ static tree ! resolve_field_access (tree qual_wfl, tree *field_decl, tree *field_type) { int is_static = 0; tree field_ref; *************** resolve_field_access (qual_wfl, field_de *** 9503,9510 **** NODE. */ static tree ! strip_out_static_field_access_decl (node) ! tree node; { if (TREE_CODE (node) == COMPOUND_EXPR) { --- 9517,9523 ---- NODE. */ static tree ! strip_out_static_field_access_decl (tree node) { if (TREE_CODE (node) == COMPOUND_EXPR) { *************** strip_out_static_field_access_decl (node *** 9527,9535 **** /* 6.5.5.2: Qualified Expression Names */ static int ! resolve_qualified_expression_name (wfl, found_decl, where_found, type_found) ! tree wfl; ! tree *found_decl, *type_found, *where_found; { int from_type = 0; /* Field search initiated from a type */ int from_super = 0, from_cast = 0, from_qualified_this = 0; --- 9540,9547 ---- /* 6.5.5.2: Qualified Expression Names */ static int ! resolve_qualified_expression_name (tree wfl, tree *found_decl, ! tree *where_found, tree *type_found) { int from_type = 0; /* Field search initiated from a type */ int from_super = 0, from_cast = 0, from_qualified_this = 0; *************** resolve_qualified_expression_name (wfl, *** 9626,9636 **** instantiation using a primary qualified by a `new' */ RESTORE_THIS_AND_CURRENT_CLASS; ! /* EH check. No check on access$ functions */ ! if (location ! && !OUTER_FIELD_ACCESS_IDENTIFIER_P ! (DECL_NAME (current_function_decl))) ! check_thrown_exceptions (location, ret_decl); /* If the previous call was static and this one is too, build a compound expression to hold the two (because in --- 9638,9651 ---- instantiation using a primary qualified by a `new' */ RESTORE_THIS_AND_CURRENT_CLASS; ! if (location) ! { ! tree arguments = NULL_TREE; ! if (TREE_CODE (qual_wfl) == CALL_EXPR ! && TREE_OPERAND (qual_wfl, 1) != NULL_TREE) ! arguments = TREE_VALUE (TREE_OPERAND (qual_wfl, 1)); ! check_thrown_exceptions (location, ret_decl, arguments); ! } /* If the previous call was static and this one is too, build a compound expression to hold the two (because in *************** resolve_qualified_expression_name (wfl, *** 9815,9821 **** list = TREE_CHAIN (q); while (list) { - RESOLVE_EXPRESSION_NAME_P (QUAL_WFL (list)) = 1; RESOLVE_PACKAGE_NAME_P (QUAL_WFL (list)) = 0; list = TREE_CHAIN (list); } --- 9830,9835 ---- *************** resolve_qualified_expression_name (wfl, *** 9855,9869 **** } if (not_accessible_p (TREE_TYPE (decl), decl, type, 0)) ! { ! parse_error_context ! (qual_wfl, "Can't access %s field `%s.%s' from `%s'", ! java_accstring_lookup (get_access_flags_from_decl (decl)), ! GET_TYPE_NAME (type), ! IDENTIFIER_POINTER (DECL_NAME (decl)), ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (current_class)))); ! return 1; ! } check_deprecation (qual_wfl, decl); type = TREE_TYPE (decl); --- 9869,9875 ---- } if (not_accessible_p (TREE_TYPE (decl), decl, type, 0)) ! return not_accessible_field_error (qual_wfl, decl); check_deprecation (qual_wfl, decl); type = TREE_TYPE (decl); *************** resolve_qualified_expression_name (wfl, *** 9905,9911 **** } } ! /* Report and error if we're using a numerical litteral as a qualifier. It can only be an INTEGER_CST. */ else if (TREE_CODE (qual_wfl) == INTEGER_CST) { --- 9911,9917 ---- } } ! /* Report and error if we're using a numerical literal as a qualifier. It can only be an INTEGER_CST. */ else if (TREE_CODE (qual_wfl) == INTEGER_CST) { *************** resolve_qualified_expression_name (wfl, *** 9984,10001 **** /* Check on accessibility here */ if (not_accessible_p (current_class, field_decl, DECL_CONTEXT (field_decl), from_super)) ! { ! parse_error_context ! (qual_wfl, ! "Can't access %s field `%s.%s' from `%s'", ! java_accstring_lookup ! (get_access_flags_from_decl (field_decl)), ! GET_TYPE_NAME (type), ! IDENTIFIER_POINTER (DECL_NAME (field_decl)), ! IDENTIFIER_POINTER ! (DECL_NAME (TYPE_NAME (current_class)))); ! return 1; ! } check_deprecation (qual_wfl, field_decl); /* There are things to check when fields are accessed --- 9990,9996 ---- /* Check on accessibility here */ if (not_accessible_p (current_class, field_decl, DECL_CONTEXT (field_decl), from_super)) ! return not_accessible_field_error (qual_wfl,field_decl); check_deprecation (qual_wfl, field_decl); /* There are things to check when fields are accessed *************** resolve_qualified_expression_name (wfl, *** 10077,10086 **** method. */ static int ! not_accessible_p (reference, member, where, from_super) ! tree reference, member; ! tree where; ! int from_super; { int access_flag = get_access_flags_from_decl (member); --- 10072,10078 ---- method. */ static int ! not_accessible_p (tree reference, tree member, tree where, int from_super) { int access_flag = get_access_flags_from_decl (member); *************** not_accessible_p (reference, member, whe *** 10152,10176 **** /* Test deprecated decl access. */ static void ! check_deprecation (wfl, decl) ! tree wfl, decl; { ! const char *file = DECL_SOURCE_FILE (decl); /* Complain if the field is deprecated and the file it was defined in isn't compiled at the same time the file which contains its use is */ if (DECL_DEPRECATED (decl) && !IS_A_COMMAND_LINE_FILENAME_P (get_identifier (file))) { ! char the [20]; switch (TREE_CODE (decl)) { case FUNCTION_DECL: ! strcpy (the, "method"); break; case FIELD_DECL: case VAR_DECL: ! strcpy (the, "field"); break; case TYPE_DECL: parse_warning_context (wfl, "The class `%s' has been deprecated", --- 10144,10185 ---- /* Test deprecated decl access. */ static void ! check_deprecation (tree wfl, tree decl) { ! const char *file; ! tree elt; ! ! if (! flag_deprecated) ! return; ! ! /* We want to look at the element type of arrays here, so we strip ! all surrounding array types. */ ! if (TYPE_ARRAY_P (TREE_TYPE (decl))) ! { ! elt = TREE_TYPE (decl); ! while (TYPE_ARRAY_P (elt)) ! elt = TYPE_ARRAY_ELEMENT (elt); ! /* We'll end up with a pointer type, so we use TREE_TYPE to go ! to the record. */ ! decl = TYPE_NAME (TREE_TYPE (elt)); ! } ! file = DECL_SOURCE_FILE (decl); ! /* Complain if the field is deprecated and the file it was defined in isn't compiled at the same time the file which contains its use is */ if (DECL_DEPRECATED (decl) && !IS_A_COMMAND_LINE_FILENAME_P (get_identifier (file))) { ! const char *the; switch (TREE_CODE (decl)) { case FUNCTION_DECL: ! the = "method"; break; case FIELD_DECL: case VAR_DECL: ! the = "field"; break; case TYPE_DECL: parse_warning_context (wfl, "The class `%s' has been deprecated", *************** check_deprecation (wfl, decl) *** 10193,10200 **** static GTY(()) tree cicp_cache; static int ! class_in_current_package (class) ! tree class; { int qualified_flag; tree left; --- 10202,10208 ---- static GTY(()) tree cicp_cache; static int ! class_in_current_package (tree class) { int qualified_flag; tree left; *************** class_in_current_package (class) *** 10230,10237 **** done only if certain conditions meet. */ static tree ! maybe_access_field (decl, where, type) ! tree decl, where, type; { if (TREE_CODE (decl) == FIELD_DECL && decl != current_this && !FIELD_STATIC (decl)) --- 10238,10244 ---- done only if certain conditions meet. */ static tree ! maybe_access_field (tree decl, tree where, tree type) { if (TREE_CODE (decl) == FIELD_DECL && decl != current_this && !FIELD_STATIC (decl)) *************** maybe_access_field (decl, where, type) *** 10246,10257 **** used. IS_STATIC is set to 1 if the invoked function is static. */ static tree ! patch_method_invocation (patch, primary, where, from_super, ! is_static, ret_decl) ! tree patch, primary, where; ! int from_super; ! int *is_static; ! tree *ret_decl; { tree wfl = TREE_OPERAND (patch, 0); tree args = TREE_OPERAND (patch, 1); --- 10253,10260 ---- used. IS_STATIC is set to 1 if the invoked function is static. */ static tree ! patch_method_invocation (tree patch, tree primary, tree where, int from_super, ! int *is_static, tree *ret_decl) { tree wfl = TREE_OPERAND (patch, 0); tree args = TREE_OPERAND (patch, 1); *************** patch_method_invocation (patch, primary, *** 10262,10268 **** tree this_arg = NULL_TREE; int is_array_clone_call = 0; ! /* Should be overriden if everything goes well. Otherwise, if something fails, it should keep this value. It stop the evaluation of a bogus assignment. See java_complete_tree, MODIFY_EXPR: for the reasons why we sometimes want to keep on --- 10265,10271 ---- tree this_arg = NULL_TREE; int is_array_clone_call = 0; ! /* Should be overridden if everything goes well. Otherwise, if something fails, it should keep this value. It stop the evaluation of a bogus assignment. See java_complete_tree, MODIFY_EXPR: for the reasons why we sometimes want to keep on *************** patch_method_invocation (patch, primary, *** 10481,10487 **** this_arg = primary ? primary : current_this; /* If we're using an access method, things are different. ! There are two familly of cases: 1) We're not generating bytecodes: --- 10484,10490 ---- this_arg = primary ? primary : current_this; /* If we're using an access method, things are different. ! There are two family of cases: 1) We're not generating bytecodes: *************** patch_method_invocation (patch, primary, *** 10497,10503 **** - LIST is static. It's invocation is transformed from x(a1,....,an) into TYPE_OF(this$).x(a1,....an). ! Of course, this$ can be abitrary complex, ranging from this$0 (the immediate outer context) to access$0(access$0(...(this$0))). --- 10500,10506 ---- - LIST is static. It's invocation is transformed from x(a1,....,an) into TYPE_OF(this$).x(a1,....an). ! Of course, this$ can be arbitrarily complex, ranging from this$0 (the immediate outer context) to access$0(access$0(...(this$0))). *************** patch_method_invocation (patch, primary, *** 10545,10555 **** } /* Deprecation check: check whether the method being invoked or the ! instance-being-created's type are deprecated. */ if (TREE_CODE (patch) == NEW_CLASS_EXPR) check_deprecation (wfl, TYPE_NAME (DECL_CONTEXT (list))); ! else ! check_deprecation (wfl, list); /* If invoking a innerclass constructor, there are hidden parameters to pass */ --- 10548,10557 ---- } /* Deprecation check: check whether the method being invoked or the ! instance-being-created's type are deprecated. */ if (TREE_CODE (patch) == NEW_CLASS_EXPR) check_deprecation (wfl, TYPE_NAME (DECL_CONTEXT (list))); ! check_deprecation (wfl, list); /* If invoking a innerclass constructor, there are hidden parameters to pass */ *************** patch_method_invocation (patch, primary, *** 10660,10667 **** non static method. Return 1 if it's the case, 0 otherwise. */ static int ! check_for_static_method_reference (wfl, node, method, where, primary) ! tree wfl, node, method, where, primary; { if (METHOD_STATIC (current_function_decl) && !METHOD_STATIC (method) && !primary && !CALL_CONSTRUCTOR_P (node)) --- 10662,10669 ---- non static method. Return 1 if it's the case, 0 otherwise. */ static int ! check_for_static_method_reference (tree wfl, tree node, tree method, ! tree where, tree primary) { if (METHOD_STATIC (current_function_decl) && !METHOD_STATIC (method) && !primary && !CALL_CONSTRUCTOR_P (node)) *************** check_for_static_method_reference (wfl, *** 10683,10691 **** returned. */ static int ! maybe_use_access_method (is_super_init, mdecl, this_arg) ! int is_super_init; ! tree *mdecl, *this_arg; { tree ctx; tree md = *mdecl, ta = *this_arg; --- 10685,10691 ---- returned. */ static int ! maybe_use_access_method (int is_super_init, tree *mdecl, tree *this_arg) { tree ctx; tree md = *mdecl, ta = *this_arg; *************** maybe_use_access_method (is_super_init, *** 10742,10749 **** *mdecl = md; *this_arg = ta; ! /* Returnin a nonzero value indicates we were doing a non static ! method invokation that is now a static invocation. It will have callee displace `this' to insert it in the regular argument list. */ return (non_static_context && to_return); --- 10742,10749 ---- *mdecl = md; *this_arg = ta; ! /* Returning a nonzero value indicates we were doing a non static ! method invocation that is now a static invocation. It will have callee displace `this' to insert it in the regular argument list. */ return (non_static_context && to_return); *************** maybe_use_access_method (is_super_init, *** 10753,10760 **** mode. */ static tree ! patch_invoke (patch, method, args) ! tree patch, method, args; { tree dtable, func; tree original_call, t, ta; --- 10753,10759 ---- mode. */ static tree ! patch_invoke (tree patch, tree method, tree args) { tree dtable, func; tree original_call, t, ta; *************** patch_invoke (patch, method, args) *** 10773,10779 **** TREE_TYPE (TREE_VALUE (ta)) != TREE_VALUE (t)) TREE_VALUE (ta) = convert (TREE_VALUE (t), TREE_VALUE (ta)); ! /* Resolve unresolved returned type isses */ t = TREE_TYPE (TREE_TYPE (method)); if (TREE_CODE (t) == POINTER_TYPE && !CLASS_LOADED_P (TREE_TYPE (t))) resolve_and_layout (TREE_TYPE (t), NULL); --- 10772,10778 ---- TREE_TYPE (TREE_VALUE (ta)) != TREE_VALUE (t)) TREE_VALUE (ta) = convert (TREE_VALUE (t), TREE_VALUE (ta)); ! /* Resolve unresolved returned type issues */ t = TREE_TYPE (TREE_TYPE (method)); if (TREE_CODE (t) == POINTER_TYPE && !CLASS_LOADED_P (TREE_TYPE (t))) resolve_and_layout (TREE_TYPE (t), NULL); *************** patch_invoke (patch, method, args) *** 10912,10920 **** } static int ! invocation_mode (method, super) ! tree method; ! int super; { int access = get_access_flags_from_decl (method); --- 10911,10917 ---- } static int ! invocation_mode (tree method, int super) { int access = get_access_flags_from_decl (method); *************** invocation_mode (method, super) *** 10945,10954 **** 15.11.2 (Compile-Time Step 2) */ static tree ! lookup_method_invoke (lc, cl, class, name, arg_list) ! int lc; ! tree cl; ! tree class, name, arg_list; { tree atl = end_params_node; /* Arg Type List */ tree method, signature, list, node; --- 10942,10948 ---- 15.11.2 (Compile-Time Step 2) */ static tree ! lookup_method_invoke (int lc, tree cl, tree class, tree name, tree arg_list) { tree atl = end_params_node; /* Arg Type List */ tree method, signature, list, node; *************** lookup_method_invoke (lc, cl, class, nam *** 11031,11039 **** when we're looking for a constructor. */ static tree ! find_applicable_accessible_methods_list (lc, class, name, arglist) ! int lc; ! tree class, name, arglist; { static htab_t searched_classes; static int search_not_done = 0; --- 11025,11032 ---- when we're looking for a constructor. */ static tree ! find_applicable_accessible_methods_list (int lc, tree class, tree name, ! tree arglist) { static htab_t searched_classes; static int search_not_done = 0; *************** find_applicable_accessible_methods_list *** 11151,11160 **** /* Effectively search for the appropriate method in method */ static void ! search_applicable_methods_list (lc, method, name, arglist, list, all_list) ! int lc; ! tree method, name, arglist; ! tree *list, *all_list; { for (; method; method = TREE_CHAIN (method)) { --- 11144,11151 ---- /* Effectively search for the appropriate method in method */ static void ! search_applicable_methods_list (int lc, tree method, tree name, tree arglist, ! tree *list, tree *all_list) { for (; method; method = TREE_CHAIN (method)) { *************** search_applicable_methods_list (lc, meth *** 11182,11189 **** /* 15.11.2.2 Choose the Most Specific Method */ static tree ! find_most_specific_methods_list (list) ! tree list; { int max = 0; int abstract, candidates; --- 11173,11179 ---- /* 15.11.2.2 Choose the Most Specific Method */ static tree ! find_most_specific_methods_list (tree list) { int max = 0; int abstract, candidates; *************** find_most_specific_methods_list (list) *** 11232,11241 **** /* If we have several and they're all abstract, just pick the closest one. */ ! if (candidates > 0 && (candidates == abstract)) { new_list = nreverse (new_list); TREE_CHAIN (new_list) = NULL_TREE; } /* We have several (we couldn't find a most specific), all but one --- 11222,11236 ---- /* If we have several and they're all abstract, just pick the closest one. */ ! if (candidates > 0 && candidates == abstract) { + /* FIXME: merge the throws clauses. There is no convenient way + to do this in gcj right now, since ideally we'd like to + introduce a new METHOD_DECL here, but that is really not + possible. */ new_list = nreverse (new_list); TREE_CHAIN (new_list) = NULL_TREE; + return new_list; } /* We have several (we couldn't find a most specific), all but one *************** static GTY(()) tree m2_arg_value; *** 11273,11282 **** static GTY(()) tree m2_arg_cache; static int ! argument_types_convertible (m1, m2_or_arglist) ! tree m1, m2_or_arglist; { ! register tree m1_arg, m2_arg; SKIP_THIS_AND_ARTIFICIAL_PARMS (m1_arg, m1) --- 11268,11276 ---- static GTY(()) tree m2_arg_cache; static int ! argument_types_convertible (tree m1, tree m2_or_arglist) { ! tree m1_arg, m2_arg; SKIP_THIS_AND_ARTIFICIAL_PARMS (m1_arg, m1) *************** argument_types_convertible (m1, m2_or_ar *** 11313,11554 **** /* Qualification routines */ static void ! qualify_ambiguous_name (id) ! tree id; { ! tree qual, qual_wfl, name = NULL_TREE, decl, ptr_type = NULL_TREE, ! saved_current_class; ! int again, super_found = 0, this_found = 0, new_array_found = 0; ! int code; ! ! /* We first qualify the first element, then derive qualification of ! others based on the first one. If the first element is qualified ! by a resolution (field or type), this resolution is stored in the ! QUAL_RESOLUTION of the qual element being examined. We need to ! save the current_class since the use of SUPER might change the ! its value. */ ! saved_current_class = current_class; ! qual = EXPR_WFL_QUALIFICATION (id); ! do { ! ! /* Simple qualified expression feature a qual_wfl that is a ! WFL. Expression derived from a primary feature more complicated ! things like a CALL_EXPR. Expression from primary need to be ! worked out to extract the part on which the qualification will ! take place. */ ! qual_wfl = QUAL_WFL (qual); ! switch (TREE_CODE (qual_wfl)) ! { ! case CALL_EXPR: ! qual_wfl = TREE_OPERAND (qual_wfl, 0); ! if (TREE_CODE (qual_wfl) != EXPR_WITH_FILE_LOCATION ! || (EXPR_WFL_QUALIFICATION (qual_wfl) ! && TREE_CODE (EXPR_WFL_QUALIFICATION (qual_wfl)) == TREE_LIST)) ! { ! qual = EXPR_WFL_QUALIFICATION (qual_wfl); ! qual_wfl = QUAL_WFL (qual); ! } ! break; ! case NEW_ARRAY_EXPR: ! case NEW_ANONYMOUS_ARRAY_EXPR: ! qual = TREE_CHAIN (qual); ! again = new_array_found = 1; ! continue; ! case CONVERT_EXPR: ! break; ! case NEW_CLASS_EXPR: ! qual_wfl = TREE_OPERAND (qual_wfl, 0); ! break; ! case ARRAY_REF: ! while (TREE_CODE (qual_wfl) == ARRAY_REF) ! qual_wfl = TREE_OPERAND (qual_wfl, 0); ! break; ! case STRING_CST: ! qual = TREE_CHAIN (qual); ! qual_wfl = QUAL_WFL (qual); ! break; ! case CLASS_LITERAL: ! qual = TREE_CHAIN (qual); ! qual_wfl = QUAL_WFL (qual); ! break; ! default: ! /* Fix for -Wall. Just break doing nothing */ ! break; ! } ! ! ptr_type = current_class; ! again = 0; ! code = TREE_CODE (qual_wfl); ! ! /* Pos evaluation: non WFL leading expression nodes */ ! if (code == CONVERT_EXPR ! && TREE_CODE (TREE_TYPE (qual_wfl)) == EXPR_WITH_FILE_LOCATION) ! name = EXPR_WFL_NODE (TREE_TYPE (qual_wfl)); ! ! else if (code == INTEGER_CST) ! name = qual_wfl; ! ! else if (code == CONVERT_EXPR && ! TREE_CODE (TREE_OPERAND (qual_wfl, 0)) == EXPR_WITH_FILE_LOCATION) ! name = TREE_OPERAND (qual_wfl, 0); ! ! else if (code == CONVERT_EXPR ! && TREE_CODE (TREE_OPERAND (qual_wfl, 0)) == CALL_EXPR ! && (TREE_CODE (TREE_OPERAND (TREE_OPERAND (qual_wfl, 0), 0)) ! == EXPR_WITH_FILE_LOCATION)) ! name = TREE_OPERAND (TREE_OPERAND (qual_wfl, 0), 0); ! else if ((code == ARRAY_REF || code == CALL_EXPR || code == MODIFY_EXPR) && ! TREE_CODE (TREE_OPERAND (qual_wfl, 0)) == EXPR_WITH_FILE_LOCATION) ! name = EXPR_WFL_NODE (TREE_OPERAND (qual_wfl, 0)); ! else if (code == TREE_LIST) ! name = EXPR_WFL_NODE (TREE_PURPOSE (qual_wfl)); ! else if (code == STRING_CST || code == CONDITIONAL_EXPR ! || code == PLUS_EXPR) ! { ! qual = TREE_CHAIN (qual); ! qual_wfl = QUAL_WFL (qual); ! again = 1; ! } ! else ! { ! name = EXPR_WFL_NODE (qual_wfl); ! if (!name) ! { ! qual = EXPR_WFL_QUALIFICATION (qual_wfl); ! again = 1; ! } ! } ! /* If we have a THIS (from a primary), we set the context accordingly */ ! if (name == this_identifier_node) ! { ! /* This isn't really elegant. One more added irregularity ! before I start using COMPONENT_REF (hopefully very soon.) */ ! if (TREE_CODE (TREE_PURPOSE (qual)) == ARRAY_REF ! && TREE_CODE (TREE_OPERAND (TREE_PURPOSE (qual), 0)) == ! EXPR_WITH_FILE_LOCATION ! && EXPR_WFL_NODE (TREE_OPERAND (TREE_PURPOSE (qual), 0)) == ! this_identifier_node) ! { ! qual = TREE_OPERAND (TREE_PURPOSE (qual), 0); ! qual = EXPR_WFL_QUALIFICATION (qual); ! } ! qual = TREE_CHAIN (qual); ! qual_wfl = QUAL_WFL (qual); ! if (TREE_CODE (qual_wfl) == CALL_EXPR) ! again = 1; ! else if (TREE_CODE (qual_wfl) == EXPR_WITH_FILE_LOCATION) ! name = EXPR_WFL_NODE (qual_wfl); ! else if (TREE_CODE (qual_wfl) == NEW_CLASS_EXPR) ! name = TREE_OPERAND (qual_wfl, 0); ! this_found = 1; ! } ! /* If we have a SUPER, we set the context accordingly */ ! if (name == super_identifier_node) ! { ! current_class = CLASSTYPE_SUPER (ptr_type); ! /* Check that there is such a thing as a super class. If not, ! return. The error will be caught later on, during the ! resolution */ ! if (!current_class) ! { ! current_class = saved_current_class; ! return; ! } ! qual = TREE_CHAIN (qual); ! /* Do one more interation to set things up */ ! super_found = again = 1; ! } ! } while (again); /* If name appears within the scope of a local variable declaration ! or parameter declaration, then it is an expression name. We don't ! carry this test out if we're in the context of the use of SUPER ! or THIS */ ! if (!this_found && !super_found ! && TREE_CODE (name) != STRING_CST && TREE_CODE (name) != INTEGER_CST ! && (decl = IDENTIFIER_LOCAL_VALUE (name))) { - RESOLVE_EXPRESSION_NAME_P (qual_wfl) = 1; QUAL_RESOLUTION (qual) = decl; } ! /* If within the class/interface NAME was found to be used there ! exists a (possibly inherited) field named NAME, then this is an ! expression name. If we saw a NEW_ARRAY_EXPR before and want to ! address length, it is OK. */ ! else if ((decl = lookup_field_wrapper (ptr_type, name)) ! || name == length_identifier_node) ! { ! RESOLVE_EXPRESSION_NAME_P (qual_wfl) = 1; ! QUAL_RESOLUTION (qual) = (new_array_found ? NULL_TREE : decl); ! } ! ! /* We reclassify NAME as yielding to a type name resolution if: ! - NAME is a class/interface declared within the compilation ! unit containing NAME, ! - NAME is imported via a single-type-import declaration, ! - NAME is declared in an another compilation unit of the package ! of the compilation unit containing NAME, ! - NAME is declared by exactly on type-import-on-demand declaration ! of the compilation unit containing NAME. ! - NAME is actually a STRING_CST. ! This can't happen if the expression was qualified by `this.' */ ! else if (! this_found && ! (TREE_CODE (name) == STRING_CST || ! TREE_CODE (name) == INTEGER_CST || ! (decl = resolve_and_layout (name, NULL_TREE)))) { RESOLVE_TYPE_NAME_P (qual_wfl) = 1; QUAL_RESOLUTION (qual) = decl; } - /* Method call, array references and cast are expression name */ - else if (TREE_CODE (QUAL_WFL (qual)) == CALL_EXPR - || TREE_CODE (QUAL_WFL (qual)) == ARRAY_REF - || TREE_CODE (QUAL_WFL (qual)) == CONVERT_EXPR - || TREE_CODE (QUAL_WFL (qual)) == MODIFY_EXPR) - RESOLVE_EXPRESSION_NAME_P (qual_wfl) = 1; - /* Check here that NAME isn't declared by more than one type-import-on-demand declaration of the compilation unit containing NAME. FIXME */ ! /* Otherwise, NAME is reclassified as a package name */ else RESOLVE_PACKAGE_NAME_P (qual_wfl) = 1; ! /* Propagate the qualification accross other components of the qualified name */ for (qual = TREE_CHAIN (qual); qual; qual_wfl = QUAL_WFL (qual), qual = TREE_CHAIN (qual)) { if (RESOLVE_PACKAGE_NAME_P (qual_wfl)) RESOLVE_PACKAGE_NAME_P (QUAL_WFL (qual)) = 1; - else - RESOLVE_EXPRESSION_NAME_P (QUAL_WFL (qual)) = 1; } /* Store the global qualification for the ambiguous part of ID back into ID fields */ ! if (RESOLVE_EXPRESSION_NAME_P (qual_wfl)) ! RESOLVE_EXPRESSION_NAME_P (id) = 1; ! else if (RESOLVE_TYPE_NAME_P (qual_wfl)) RESOLVE_TYPE_NAME_P (id) = 1; else if (RESOLVE_PACKAGE_NAME_P (qual_wfl)) RESOLVE_PACKAGE_NAME_P (id) = 1; - - /* Restore the current class */ - current_class = saved_current_class; } static int ! breakdown_qualified (left, right, source) ! tree *left, *right, source; { char *p, *base; int l = IDENTIFIER_LENGTH (source); --- 11307,11386 ---- /* Qualification routines */ + /* Given a name x.y.z, look up x locally. If it's found, save the + decl. If it's not found, mark the name as RESOLVE_PACKAGE_NAME_P, + so that we later try and load the appropriate classes. */ static void ! qualify_ambiguous_name (tree id) { ! tree name, decl; ! /* We inspect the first item of the qualification list. As a sanity ! check, make sure that it is an identfier node. */ ! tree qual = EXPR_WFL_QUALIFICATION (id); ! tree qual_wfl = QUAL_WFL (qual); ! if (TREE_CODE (qual_wfl) != EXPR_WITH_FILE_LOCATION) ! return; ! name = EXPR_WFL_NODE (qual_wfl); ! /* If we don't have an identifier, or we have a 'this' or 'super', ! then field access processing is all we need : there is nothing ! for us to do. */ ! if (!name || TREE_CODE (name) != IDENTIFIER_NODE || ! name == this_identifier_node || ! name == super_identifier_node) ! return; /* If name appears within the scope of a local variable declaration ! or parameter declaration, or is a field within an enclosing ! class, then it is an expression name. Save the decl and let ! resolve_field_access do it's work. */ ! if ((decl = IDENTIFIER_LOCAL_VALUE (name)) || ! (decl = lookup_field_wrapper (current_class, name))) { QUAL_RESOLUTION (qual) = decl; + return; } ! /* If name is a known class name (either declared or imported), mark ! us as a type name. */ ! if ((decl = resolve_and_layout (name, NULL_TREE))) { RESOLVE_TYPE_NAME_P (qual_wfl) = 1; QUAL_RESOLUTION (qual) = decl; } /* Check here that NAME isn't declared by more than one type-import-on-demand declaration of the compilation unit containing NAME. FIXME */ ! /* We couldn't find a declaration for the name. Assume for now that ! we have a qualified class name that needs to be loaded from an ! external class file. */ else RESOLVE_PACKAGE_NAME_P (qual_wfl) = 1; ! /* Propagate the qualification across other components of the qualified name */ for (qual = TREE_CHAIN (qual); qual; qual_wfl = QUAL_WFL (qual), qual = TREE_CHAIN (qual)) { if (RESOLVE_PACKAGE_NAME_P (qual_wfl)) RESOLVE_PACKAGE_NAME_P (QUAL_WFL (qual)) = 1; } /* Store the global qualification for the ambiguous part of ID back into ID fields */ ! if (RESOLVE_TYPE_NAME_P (qual_wfl)) RESOLVE_TYPE_NAME_P (id) = 1; else if (RESOLVE_PACKAGE_NAME_P (qual_wfl)) RESOLVE_PACKAGE_NAME_P (id) = 1; } static int ! breakdown_qualified (tree *left, tree *right, tree source) { char *p, *base; int l = IDENTIFIER_LENGTH (source); *************** breakdown_qualified (left, right, source *** 11576,11583 **** /* Return TRUE if two classes are from the same package. */ static int ! in_same_package (name1, name2) ! tree name1, name2; { tree tmp; tree pkg1; --- 11408,11414 ---- /* Return TRUE if two classes are from the same package. */ static int ! in_same_package (tree name1, tree name2) { tree tmp; tree pkg1; *************** in_same_package (name1, name2) *** 11607,11614 **** Same as java_complete_lhs, but does resolve static finals to values. */ static tree ! java_complete_tree (node) ! tree node; { node = java_complete_lhs (node); if (JDECL_P (node) && CLASS_FINAL_VARIABLE_P (node) --- 11438,11444 ---- Same as java_complete_lhs, but does resolve static finals to values. */ static tree ! java_complete_tree (tree node) { node = java_complete_lhs (node); if (JDECL_P (node) && CLASS_FINAL_VARIABLE_P (node) *************** java_complete_tree (node) *** 11623,11630 **** } static tree ! java_stabilize_reference (node) ! tree node; { if (TREE_CODE (node) == COMPOUND_EXPR) { --- 11453,11459 ---- } static tree ! java_stabilize_reference (tree node) { if (TREE_CODE (node) == COMPOUND_EXPR) { *************** java_stabilize_reference (node) *** 11642,11649 **** Same as java_complete_tree, but does not resolve static finals to values. */ static tree ! java_complete_lhs (node) ! tree node; { tree nn, cn, wfl_op1, wfl_op2, wfl_op3; int flag; --- 11471,11477 ---- Same as java_complete_tree, but does not resolve static finals to values. */ static tree ! java_complete_lhs (tree node) { tree nn, cn, wfl_op1, wfl_op2, wfl_op3; int flag; *************** java_complete_lhs (node) *** 11729,11734 **** --- 11557,11564 ---- && TREE_CODE (wfl_op2) != DEFAULT_EXPR) unreachable_stmt_error (*ptr); } + if (TREE_TYPE (*ptr) == NULL_TREE) + TREE_TYPE (*ptr) = void_type_node; ptr = next; } *ptr = java_complete_tree (*ptr); *************** java_complete_lhs (node) *** 11763,11771 **** case TRY_FINALLY_EXPR: COMPLETE_CHECK_OP_0 (node); COMPLETE_CHECK_OP_1 (node); ! if (TREE_OPERAND (node, 0) == empty_stmt_node) return TREE_OPERAND (node, 1); ! if (TREE_OPERAND (node, 1) == empty_stmt_node) return TREE_OPERAND (node, 0); CAN_COMPLETE_NORMALLY (node) = (CAN_COMPLETE_NORMALLY (TREE_OPERAND (node, 0)) --- 11593,11605 ---- case TRY_FINALLY_EXPR: COMPLETE_CHECK_OP_0 (node); COMPLETE_CHECK_OP_1 (node); ! /* Reduce try/finally nodes with an empty try block. */ ! if (TREE_OPERAND (node, 0) == empty_stmt_node ! || BLOCK_EMPTY_P (TREE_OPERAND (node, 0))) return TREE_OPERAND (node, 1); ! /* Likewise for an empty finally block. */ ! if (TREE_OPERAND (node, 1) == empty_stmt_node ! || BLOCK_EMPTY_P (TREE_OPERAND (node, 1))) return TREE_OPERAND (node, 0); CAN_COMPLETE_NORMALLY (node) = (CAN_COMPLETE_NORMALLY (TREE_OPERAND (node, 0)) *************** java_complete_lhs (node) *** 12002,12011 **** else { tree body; ! int save_lineno = lineno; ! lineno = EXPR_WFL_LINENO (node); body = java_complete_tree (EXPR_WFL_NODE (node)); ! lineno = save_lineno; EXPR_WFL_NODE (node) = body; TREE_SIDE_EFFECTS (node) = TREE_SIDE_EFFECTS (body); CAN_COMPLETE_NORMALLY (node) = CAN_COMPLETE_NORMALLY (body); --- 11836,11845 ---- else { tree body; ! int save_lineno = input_line; ! input_line = EXPR_WFL_LINENO (node); body = java_complete_tree (EXPR_WFL_NODE (node)); ! input_line = save_lineno; EXPR_WFL_NODE (node) = body; TREE_SIDE_EFFECTS (node) = TREE_SIDE_EFFECTS (body); CAN_COMPLETE_NORMALLY (node) = CAN_COMPLETE_NORMALLY (body); *************** java_complete_lhs (node) *** 12085,12097 **** int in_this = CALL_THIS_CONSTRUCTOR_P (node); int from_super = (EXPR_WFL_NODE (TREE_OPERAND (node, 0)) == super_identifier_node); node = patch_method_invocation (node, NULL_TREE, NULL_TREE, from_super, 0, &decl); if (node == error_mark_node) return error_mark_node; ! check_thrown_exceptions (EXPR_WFL_LINECOL (node), decl); /* If we call this(...), register signature and positions */ if (in_this) DECL_CONSTRUCTOR_CALLS (current_function_decl) = --- 11919,11938 ---- int in_this = CALL_THIS_CONSTRUCTOR_P (node); int from_super = (EXPR_WFL_NODE (TREE_OPERAND (node, 0)) == super_identifier_node); + tree arguments; + int location = EXPR_WFL_LINECOL (node); node = patch_method_invocation (node, NULL_TREE, NULL_TREE, from_super, 0, &decl); if (node == error_mark_node) return error_mark_node; ! if (TREE_CODE (node) == CALL_EXPR ! && TREE_OPERAND (node, 1) != NULL_TREE) ! arguments = TREE_VALUE (TREE_OPERAND (node, 1)); ! else ! arguments = NULL_TREE; ! check_thrown_exceptions (location, decl, arguments); /* If we call this(...), register signature and positions */ if (in_this) DECL_CONSTRUCTOR_CALLS (current_function_decl) = *************** java_complete_lhs (node) *** 12117,12124 **** /* When we have a primitype type, or a string and we're not emitting a class file, we actually don't want to generate anything for the assignment. */ ! if (value != NULL_TREE && ! (JPRIMITIVE_TYPE_P (TREE_TYPE (value)) || (TREE_TYPE (value) == string_ptr_type_node && ! flag_emit_class_files))) { --- 11958,11965 ---- /* When we have a primitype type, or a string and we're not emitting a class file, we actually don't want to generate anything for the assignment. */ ! if (value != NULL_TREE && ! (JPRIMITIVE_TYPE_P (TREE_TYPE (value)) || (TREE_TYPE (value) == string_ptr_type_node && ! flag_emit_class_files))) { *************** java_complete_lhs (node) *** 12286,12292 **** TREE_OPERAND (node, 1) = nn; } ! return force_evaluation_order (patch_binop (node, wfl_op1, wfl_op2)); case INSTANCEOF_EXPR: wfl_op1 = TREE_OPERAND (node, 0); --- 12127,12133 ---- TREE_OPERAND (node, 1) = nn; } ! return patch_binop (node, wfl_op1, wfl_op2); case INSTANCEOF_EXPR: wfl_op1 = TREE_OPERAND (node, 0); *************** java_complete_lhs (node) *** 12406,12413 **** error was found. */ static int ! complete_function_arguments (node) ! tree node; { int flag = 0; tree cn; --- 12247,12253 ---- error was found. */ static int ! complete_function_arguments (tree node) { int flag = 0; tree cn; *************** complete_function_arguments (node) *** 12440,12448 **** debugable. */ static tree ! build_debugable_stmt (location, stmt) ! int location; ! tree stmt; { if (TREE_CODE (stmt) != EXPR_WITH_FILE_LOCATION) { --- 12280,12286 ---- debugable. */ static tree ! build_debugable_stmt (int location, tree stmt) { if (TREE_CODE (stmt) != EXPR_WITH_FILE_LOCATION) { *************** build_debugable_stmt (location, stmt) *** 12454,12461 **** } static tree ! build_expr_block (body, decls) ! tree body, decls; { tree node = make_node (BLOCK); BLOCK_EXPR_DECLS (node) = decls; --- 12292,12299 ---- } static tree ! build_expr_block (tree body, tree decls) ! { tree node = make_node (BLOCK); BLOCK_EXPR_DECLS (node) = decls; *************** build_expr_block (body, decls) *** 12470,12476 **** function block chain */ static tree ! enter_block () { tree b = build_expr_block (NULL_TREE, NULL_TREE); --- 12308,12314 ---- function block chain */ static tree ! enter_block (void) { tree b = build_expr_block (NULL_TREE, NULL_TREE); *************** enter_block () *** 12504,12510 **** the block being exited isn't the method's top level one. */ static tree ! exit_block () { tree b; if (current_function_decl) --- 12342,12348 ---- the block being exited isn't the method's top level one. */ static tree ! exit_block (void) { tree b; if (current_function_decl) *************** exit_block () *** 12528,12535 **** scoping rules. */ static tree ! lookup_name_in_blocks (name) ! tree name; { tree b = GET_CURRENT_BLOCK (current_function_decl); --- 12366,12372 ---- scoping rules. */ static tree ! lookup_name_in_blocks (tree name) { tree b = GET_CURRENT_BLOCK (current_function_decl); *************** lookup_name_in_blocks (name) *** 12551,12563 **** } static void ! maybe_absorb_scoping_blocks () { while (BLOCK_IS_IMPLICIT (GET_CURRENT_BLOCK (current_function_decl))) { tree b = exit_block (); java_method_add_stmt (current_function_decl, b); ! SOURCE_FRONTEND_DEBUG (("Absorbing scoping block at line %d", lineno)); } } --- 12388,12400 ---- } static void ! maybe_absorb_scoping_blocks (void) { while (BLOCK_IS_IMPLICIT (GET_CURRENT_BLOCK (current_function_decl))) { tree b = exit_block (); java_method_add_stmt (current_function_decl, b); ! SOURCE_FRONTEND_DEBUG (("Absorbing scoping block at line %d", input_line)); } } *************** maybe_absorb_scoping_blocks () *** 12569,12581 **** /* Wrap a non WFL node around a WFL. */ static tree ! build_wfl_wrap (node, location) ! tree node; ! int location; { tree wfl, node_to_insert = node; ! /* We want to process THIS . xxx symbolicaly, to keep it consistent with the way we're processing SUPER. A THIS from a primary as a different form than a SUPER. Turn THIS into something symbolic */ if (TREE_CODE (node) == THIS_EXPR) --- 12406,12416 ---- /* Wrap a non WFL node around a WFL. */ static tree ! build_wfl_wrap (tree node, int location) { tree wfl, node_to_insert = node; ! /* We want to process THIS . xxx symbolically, to keep it consistent with the way we're processing SUPER. A THIS from a primary as a different form than a SUPER. Turn THIS into something symbolic */ if (TREE_CODE (node) == THIS_EXPR) *************** build_wfl_wrap (node, location) *** 12592,12599 **** we're currently dealing with the class java.lang.Object. */ static tree ! build_super_invocation (mdecl) ! tree mdecl; { if (DECL_CONTEXT (mdecl) == object_type_node) return empty_stmt_node; --- 12427,12433 ---- we're currently dealing with the class java.lang.Object. */ static tree ! build_super_invocation (tree mdecl) { if (DECL_CONTEXT (mdecl) == object_type_node) return empty_stmt_node; *************** build_super_invocation (mdecl) *** 12616,12625 **** /* Build a SUPER/THIS qualified method invocation. */ static tree ! build_this_super_qualified_invocation (use_this, name, args, lloc, rloc) ! int use_this; ! tree name, args; ! int lloc, rloc; { tree invok; tree wfl = --- 12450,12457 ---- /* Build a SUPER/THIS qualified method invocation. */ static tree ! build_this_super_qualified_invocation (int use_this, tree name, tree args, ! int lloc, int rloc) { tree invok; tree wfl = *************** build_this_super_qualified_invocation (u *** 12632,12640 **** /* Build an incomplete CALL_EXPR node. */ static tree ! build_method_invocation (name, args) ! tree name; ! tree args; { tree call = build (CALL_EXPR, NULL_TREE, name, args, NULL_TREE); TREE_SIDE_EFFECTS (call) = 1; --- 12464,12470 ---- /* Build an incomplete CALL_EXPR node. */ static tree ! build_method_invocation (tree name, tree args) { tree call = build (CALL_EXPR, NULL_TREE, name, args, NULL_TREE); TREE_SIDE_EFFECTS (call) = 1; *************** build_method_invocation (name, args) *** 12645,12652 **** /* Build an incomplete new xxx(...) node. */ static tree ! build_new_invocation (name, args) ! tree name, args; { tree call = build (NEW_CLASS_EXPR, NULL_TREE, name, args, NULL_TREE); TREE_SIDE_EFFECTS (call) = 1; --- 12475,12481 ---- /* Build an incomplete new xxx(...) node. */ static tree ! build_new_invocation (tree name, tree args) { tree call = build (NEW_CLASS_EXPR, NULL_TREE, name, args, NULL_TREE); TREE_SIDE_EFFECTS (call) = 1; *************** build_new_invocation (name, args) *** 12657,12665 **** /* Build an incomplete assignment expression. */ static tree ! build_assignment (op, op_location, lhs, rhs) ! int op, op_location; ! tree lhs, rhs; { tree assignment; /* Build the corresponding binop if we deal with a Compound --- 12486,12492 ---- /* Build an incomplete assignment expression. */ static tree ! build_assignment (int op, int op_location, tree lhs, tree rhs) { tree assignment; /* Build the corresponding binop if we deal with a Compound *************** build_assignment (op, op_location, lhs, *** 12679,12686 **** /* Print an INTEGER_CST node as decimal in a static buffer, and return the buffer. This is used only for string conversion. */ static char * ! string_convert_int_cst (node) ! tree node; { /* Long.MIN_VALUE is -9223372036854775808, 20 characters. */ static char buffer[21]; --- 12506,12512 ---- /* Print an INTEGER_CST node as decimal in a static buffer, and return the buffer. This is used only for string conversion. */ static char * ! string_convert_int_cst (tree node) { /* Long.MIN_VALUE is -9223372036854775808, 20 characters. */ static char buffer[21]; *************** string_convert_int_cst (node) *** 12755,12762 **** /* Print an INTEGER_CST node in a static buffer, and return the buffer. This is used only for error handling. */ char * ! print_int_node (node) ! tree node; { static char buffer [80]; if (TREE_CONSTANT_OVERFLOW (node)) --- 12581,12587 ---- /* Print an INTEGER_CST node in a static buffer, and return the buffer. This is used only for error handling. */ char * ! print_int_node (tree node) { static char buffer [80]; if (TREE_CONSTANT_OVERFLOW (node)) *************** print_int_node (node) *** 12767,12777 **** TREE_INT_CST_LOW (node)); else if (TREE_INT_CST_HIGH (node) == -1 && TREE_INT_CST_LOW (node) != 0) ! { ! buffer [0] = '-'; ! sprintf (&buffer [1], HOST_WIDE_INT_PRINT_UNSIGNED, ! -TREE_INT_CST_LOW (node)); ! } else sprintf (buffer, HOST_WIDE_INT_PRINT_DOUBLE_HEX, TREE_INT_CST_HIGH (node), TREE_INT_CST_LOW (node)); --- 12592,12599 ---- TREE_INT_CST_LOW (node)); else if (TREE_INT_CST_HIGH (node) == -1 && TREE_INT_CST_LOW (node) != 0) ! sprintf (buffer, "-" HOST_WIDE_INT_PRINT_UNSIGNED, ! -TREE_INT_CST_LOW (node)); else sprintf (buffer, HOST_WIDE_INT_PRINT_DOUBLE_HEX, TREE_INT_CST_HIGH (node), TREE_INT_CST_LOW (node)); *************** print_int_node (node) *** 12786,12794 **** /* 15.25 Assignment operators. */ static tree ! patch_assignment (node, wfl_op1) ! tree node; ! tree wfl_op1; { tree rhs = TREE_OPERAND (node, 1); tree lvalue = TREE_OPERAND (node, 0), llvalue; --- 12608,12614 ---- /* 15.25 Assignment operators. */ static tree ! patch_assignment (tree node, tree wfl_op1) { tree rhs = TREE_OPERAND (node, 1); tree lvalue = TREE_OPERAND (node, 0), llvalue; *************** patch_assignment (node, wfl_op1) *** 12970,12978 **** { tree tmp = build_decl (VAR_DECL, get_identifier (""), TREE_TYPE (new_rhs)); ! tree block = build (BLOCK, TREE_TYPE (new_rhs), NULL); tree assignment = build (MODIFY_EXPR, TREE_TYPE (new_rhs), tmp, fold (new_rhs)); BLOCK_VARS (block) = tmp; BLOCK_EXPR_BODY (block) = build (COMPOUND_EXPR, TREE_TYPE (new_rhs), assignment, tmp); --- 12790,12800 ---- { tree tmp = build_decl (VAR_DECL, get_identifier (""), TREE_TYPE (new_rhs)); ! tree block = make_node (BLOCK); tree assignment = build (MODIFY_EXPR, TREE_TYPE (new_rhs), tmp, fold (new_rhs)); + DECL_CONTEXT (tmp) = current_function_decl; + TREE_TYPE (block) = TREE_TYPE (new_rhs); BLOCK_VARS (block) = tmp; BLOCK_EXPR_BODY (block) = build (COMPOUND_EXPR, TREE_TYPE (new_rhs), assignment, tmp); *************** patch_assignment (node, wfl_op1) *** 12996,13003 **** modified rhs. */ static tree ! try_reference_assignconv (lhs_type, rhs) ! tree lhs_type, rhs; { tree new_rhs = NULL_TREE; tree rhs_type = TREE_TYPE (rhs); --- 12818,12824 ---- modified rhs. */ static tree ! try_reference_assignconv (tree lhs_type, tree rhs) { tree new_rhs = NULL_TREE; tree rhs_type = TREE_TYPE (rhs); *************** try_reference_assignconv (lhs_type, rhs) *** 13023,13030 **** builtin type. Return a converted RHS if the conversion is possible. */ static tree ! try_builtin_assignconv (wfl_op1, lhs_type, rhs) ! tree wfl_op1, lhs_type, rhs; { tree new_rhs = NULL_TREE; tree rhs_type = TREE_TYPE (rhs); --- 12844,12850 ---- builtin type. Return a converted RHS if the conversion is possible. */ static tree ! try_builtin_assignconv (tree wfl_op1, tree lhs_type, tree rhs) { tree new_rhs = NULL_TREE; tree rhs_type = TREE_TYPE (rhs); *************** try_builtin_assignconv (wfl_op1, lhs_typ *** 13071,13081 **** /* Return 1 if RHS_TYPE can be converted to LHS_TYPE by identity conversion (5.1.1) or widening primitive conversion (5.1.2). Return 0 is the conversion test fails. This implements parts the method ! invocation convertion (5.3). */ static int ! valid_builtin_assignconv_identity_widening_p (lhs_type, rhs_type) ! tree lhs_type, rhs_type; { /* 5.1.1: This is the identity conversion part. */ if (lhs_type == rhs_type) --- 12891,12900 ---- /* Return 1 if RHS_TYPE can be converted to LHS_TYPE by identity conversion (5.1.1) or widening primitive conversion (5.1.2). Return 0 is the conversion test fails. This implements parts the method ! invocation conversion (5.3). */ static int ! valid_builtin_assignconv_identity_widening_p (tree lhs_type, tree rhs_type) { /* 5.1.1: This is the identity conversion part. */ if (lhs_type == rhs_type) *************** valid_builtin_assignconv_identity_wideni *** 13120,13129 **** assignment check. */ static int ! valid_ref_assignconv_cast_p (source, dest, cast) ! tree source; ! tree dest; ! int cast; { /* SOURCE or DEST might be null if not from a declared entity. */ if (!source || !dest) --- 12939,12945 ---- assignment check. */ static int ! valid_ref_assignconv_cast_p (tree source, tree dest, int cast) { /* SOURCE or DEST might be null if not from a declared entity. */ if (!source || !dest) *************** valid_ref_assignconv_cast_p (source, des *** 13165,13171 **** /* Otherwise, SOURCE must implement DEST */ return interface_of_p (dest, source); } ! /* DEST is an array, cast permited if SOURCE is of Object type */ return (cast && source == object_type_node ? 1 : 0); } if (TYPE_INTERFACE_P (source)) --- 12981,12987 ---- /* Otherwise, SOURCE must implement DEST */ return interface_of_p (dest, source); } ! /* DEST is an array, cast permitted if SOURCE is of Object type */ return (cast && source == object_type_node ? 1 : 0); } if (TYPE_INTERFACE_P (source)) *************** valid_ref_assignconv_cast_p (source, des *** 13253,13261 **** } static int ! valid_cast_to_p (source, dest) ! tree source; ! tree dest; { if (TREE_CODE (source) == POINTER_TYPE) source = TREE_TYPE (source); --- 13069,13075 ---- } static int ! valid_cast_to_p (tree source, tree dest) { if (TREE_CODE (source) == POINTER_TYPE) source = TREE_TYPE (source); *************** valid_cast_to_p (source, dest) *** 13276,13283 **** } static tree ! do_unary_numeric_promotion (arg) ! tree arg; { tree type = TREE_TYPE (arg); if ((TREE_CODE (type) == INTEGER_TYPE && TYPE_PRECISION (type) < 32) --- 13090,13096 ---- } static tree ! do_unary_numeric_promotion (tree arg) { tree type = TREE_TYPE (arg); if ((TREE_CODE (type) == INTEGER_TYPE && TYPE_PRECISION (type) < 32) *************** do_unary_numeric_promotion (arg) *** 13289,13296 **** /* Return a nonzero value if SOURCE can be converted into DEST using the method invocation conversion rule (5.3). */ static int ! valid_method_invocation_conversion_p (dest, source) ! tree dest, source; { return ((JPRIMITIVE_TYPE_P (source) && JPRIMITIVE_TYPE_P (dest) && valid_builtin_assignconv_identity_widening_p (dest, source)) --- 13102,13108 ---- /* Return a nonzero value if SOURCE can be converted into DEST using the method invocation conversion rule (5.3). */ static int ! valid_method_invocation_conversion_p (tree dest, tree source) { return ((JPRIMITIVE_TYPE_P (source) && JPRIMITIVE_TYPE_P (dest) && valid_builtin_assignconv_identity_widening_p (dest, source)) *************** valid_method_invocation_conversion_p (de *** 13302,13311 **** /* Build an incomplete binop expression. */ static tree ! build_binop (op, op_location, op1, op2) ! enum tree_code op; ! int op_location; ! tree op1, op2; { tree binop = build (op, NULL_TREE, op1, op2); TREE_SIDE_EFFECTS (binop) = 1; --- 13114,13120 ---- /* Build an incomplete binop expression. */ static tree ! build_binop (enum tree_code op, int op_location, tree op1, tree op2) { tree binop = build (op, NULL_TREE, op1, op2); TREE_SIDE_EFFECTS (binop) = 1; *************** build_binop (op, op_location, op1, op2) *** 13322,13329 **** buffer. */ static char * ! operator_string (node) ! tree node; { #define BUILD_OPERATOR_STRING(S) \ { \ --- 13131,13137 ---- buffer. */ static char * ! operator_string (tree node) { #define BUILD_OPERATOR_STRING(S) \ { \ *************** operator_string (node) *** 13372,13379 **** /* Return 1 if VAR_ACCESS1 is equivalent to VAR_ACCESS2. */ static int ! java_decl_equiv (var_acc1, var_acc2) ! tree var_acc1, var_acc2; { if (JDECL_P (var_acc1)) return (var_acc1 == var_acc2); --- 13180,13186 ---- /* Return 1 if VAR_ACCESS1 is equivalent to VAR_ACCESS2. */ static int ! java_decl_equiv (tree var_acc1, tree var_acc2) { if (JDECL_P (var_acc1)) return (var_acc1 == var_acc2); *************** java_decl_equiv (var_acc1, var_acc2) *** 13389,13396 **** used in conjunction with the `=' operator in a compound assignment. */ static int ! binop_compound_p (code) ! enum tree_code code; { int i; for (i = 0; i < BINOP_COMPOUND_CANDIDATES; i++) --- 13196,13202 ---- used in conjunction with the `=' operator in a compound assignment. */ static int ! binop_compound_p (enum tree_code code) { int i; for (i = 0; i < BINOP_COMPOUND_CANDIDATES; i++) *************** binop_compound_p (code) *** 13403,13410 **** /* Reorganize after a fold to get SAVE_EXPR to generate what we want. */ static tree ! java_refold (t) ! tree t; { tree c, b, ns, decl; --- 13209,13215 ---- /* Reorganize after a fold to get SAVE_EXPR to generate what we want. */ static tree ! java_refold (tree t) { tree c, b, ns, decl; *************** java_refold (t) *** 13451,13460 **** of remaining nodes and detects more errors in certain cases. */ static tree ! patch_binop (node, wfl_op1, wfl_op2) ! tree node; ! tree wfl_op1; ! tree wfl_op2; { tree op1 = TREE_OPERAND (node, 0); tree op2 = TREE_OPERAND (node, 1); --- 13256,13262 ---- of remaining nodes and detects more errors in certain cases. */ static tree ! patch_binop (tree node, tree wfl_op1, tree wfl_op2) { tree op1 = TREE_OPERAND (node, 0); tree op2 = TREE_OPERAND (node, 1); *************** patch_binop (node, wfl_op1, wfl_op2) *** 13523,13529 **** if (code == RDIV_EXPR && TREE_CODE (prom_type) == INTEGER_TYPE) TREE_SET_CODE (node, TRUNC_DIV_EXPR); ! /* Before divisions as is disapear, try to simplify and bail if applicable, otherwise we won't perform even simple simplifications like (1-1)/3. We can't do that with floating point number, folds can't handle them at this stage. */ --- 13325,13331 ---- if (code == RDIV_EXPR && TREE_CODE (prom_type) == INTEGER_TYPE) TREE_SET_CODE (node, TRUNC_DIV_EXPR); ! /* Before divisions as is disappear, try to simplify and bail if applicable, otherwise we won't perform even simple simplifications like (1-1)/3. We can't do that with floating point number, folds can't handle them at this stage. */ *************** patch_binop (node, wfl_op1, wfl_op2) *** 13653,13659 **** } break; ! /* 15.19.1 Type Comparison Operator instaceof */ case INSTANCEOF_EXPR: TREE_TYPE (node) = boolean_type_node; --- 13455,13461 ---- } break; ! /* 15.19.1 Type Comparison Operator instanceof */ case INSTANCEOF_EXPR: TREE_TYPE (node) = boolean_type_node; *************** patch_binop (node, wfl_op1, wfl_op2) *** 13874,13883 **** zero value, the value of CSTE comes after the valude of STRING */ static tree ! do_merge_string_cste (cste, string, string_len, after) ! tree cste; ! const char *string; ! int string_len, after; { const char *old = TREE_STRING_POINTER (cste); int old_len = TREE_STRING_LENGTH (cste); --- 13676,13682 ---- zero value, the value of CSTE comes after the valude of STRING */ static tree ! do_merge_string_cste (tree cste, const char *string, int string_len, int after) { const char *old = TREE_STRING_POINTER (cste); int old_len = TREE_STRING_LENGTH (cste); *************** do_merge_string_cste (cste, string, stri *** 13902,13910 **** new STRING_CST on success, NULL_TREE on failure. */ static tree ! merge_string_cste (op1, op2, after) ! tree op1, op2; ! int after; { /* Handle two string constants right away. */ if (TREE_CODE (op2) == STRING_CST) --- 13701,13707 ---- new STRING_CST on success, NULL_TREE on failure. */ static tree ! merge_string_cste (tree op1, tree op2, int after) { /* Handle two string constants right away. */ if (TREE_CODE (op2) == STRING_CST) *************** merge_string_cste (op1, op2, after) *** 13924,13930 **** string = boolean_true; else if (op2 == boolean_false_node) string = boolean_false; ! else if (op2 == null_pointer_node) /* FIXME: null is not a compile-time constant, so it is only safe to merge if the overall expression is non-constant. However, this code always merges without checking the overall expression. */ --- 13721,13729 ---- string = boolean_true; else if (op2 == boolean_false_node) string = boolean_false; ! else if (op2 == null_pointer_node ! || (integer_zerop (op2) ! && TREE_CODE (TREE_TYPE (op2)) == POINTER_TYPE)) /* FIXME: null is not a compile-time constant, so it is only safe to merge if the overall expression is non-constant. However, this code always merges without checking the overall expression. */ *************** merge_string_cste (op1, op2, after) *** 13968,13975 **** NULL_TREE for each invocation of this routine. FIXME */ static tree ! string_constant_concatenation (op1, op2) ! tree op1, op2; { if (TREE_CODE (op1) == STRING_CST || (TREE_CODE (op2) == STRING_CST)) { --- 13767,13773 ---- NULL_TREE for each invocation of this routine. FIXME */ static tree ! string_constant_concatenation (tree op1, tree op2) { if (TREE_CODE (op1) == STRING_CST || (TREE_CODE (op2) == STRING_CST)) { *************** string_constant_concatenation (op1, op2) *** 14003,14010 **** called on it to turn it into a String object. */ static tree ! build_string_concatenation (op1, op2) ! tree op1, op2; { tree result; int side_effects = TREE_SIDE_EFFECTS (op1) | TREE_SIDE_EFFECTS (op2); --- 13801,13807 ---- called on it to turn it into a String object. */ static tree ! build_string_concatenation (tree op1, tree op2) { tree result; int side_effects = TREE_SIDE_EFFECTS (op1) | TREE_SIDE_EFFECTS (op2); *************** build_string_concatenation (op1, op2) *** 14073,14080 **** NULL. */ static tree ! patch_string (node) ! tree node; { if (node == error_mark_node) return error_mark_node; --- 13870,13876 ---- NULL. */ static tree ! patch_string (tree node) { if (node == error_mark_node) return error_mark_node; *************** patch_string (node) *** 14100,14107 **** /* Build the internal representation of a string constant. */ static tree ! patch_string_cst (node) ! tree node; { int location; if (! flag_emit_class_files) --- 13896,13902 ---- /* Build the internal representation of a string constant. */ static tree ! patch_string_cst (tree node) { int location; if (! flag_emit_class_files) *************** patch_string_cst (node) *** 14118,14126 **** /* Build an incomplete unary operator expression. */ static tree ! build_unaryop (op_token, op_location, op1) ! int op_token, op_location; ! tree op1; { enum tree_code op; tree unaryop; --- 13913,13919 ---- /* Build an incomplete unary operator expression. */ static tree ! build_unaryop (int op_token, int op_location, tree op1) { enum tree_code op; tree unaryop; *************** build_unaryop (op_token, op_location, op *** 14146,14155 **** later. IS_POST_P is 1 if the operator, 0 otherwise. */ static tree ! build_incdec (op_token, op_location, op1, is_post_p) ! int op_token, op_location; ! tree op1; ! int is_post_p; { static const enum tree_code lookup [2][2] = { --- 13939,13945 ---- later. IS_POST_P is 1 if the operator, 0 otherwise. */ static tree ! build_incdec (int op_token, int op_location, tree op1, int is_post_p) { static const enum tree_code lookup [2][2] = { *************** build_incdec (op_token, op_location, op1 *** 14171,14179 **** though its type is already set. */ static tree ! build_cast (location, type, exp) ! int location; ! tree type, exp; { tree node = build1 (CONVERT_EXPR, type, exp); EXPR_WFL_LINECOL (node) = location; --- 13961,13967 ---- though its type is already set. */ static tree ! build_cast (int location, tree type, tree exp) { tree node = build1 (CONVERT_EXPR, type, exp); EXPR_WFL_LINECOL (node) = location; *************** build_cast (location, type, exp) *** 14182,14200 **** /* Build an incomplete class reference operator. */ static tree ! build_incomplete_class_ref (location, class_name) ! int location; ! tree class_name; { tree node = build1 (CLASS_LITERAL, NULL_TREE, class_name); EXPR_WFL_LINECOL (node) = location; return node; } /* Complete an incomplete class reference operator. */ static tree ! patch_incomplete_class_ref (node) ! tree node; { tree type = TREE_OPERAND (node, 0); tree ref_type; --- 13970,14023 ---- /* Build an incomplete class reference operator. */ static tree ! build_incomplete_class_ref (int location, tree class_name) { tree node = build1 (CLASS_LITERAL, NULL_TREE, class_name); + tree class_decl = GET_CPC (); + tree this_class = TREE_TYPE (class_decl); + + /* Generate the synthetic static method `class$'. (Previously we + deferred this, causing different method tables to be emitted + for native code and bytecode.) */ + if (!TYPE_DOT_CLASS (this_class) + && !JPRIMITIVE_TYPE_P (class_name) + && !(TREE_CODE (class_name) == VOID_TYPE)) + { + tree target_class; + + if (CLASS_INTERFACE (TYPE_NAME (this_class))) + { + /* For interfaces, adding a static 'class$' method directly + is illegal. So create an inner class to contain the new + method. Empirically this matches the behavior of javac. */ + tree t = build_wfl_node (DECL_NAME (TYPE_NAME (object_type_node))); + tree inner = create_anonymous_class (0, t); + target_class = TREE_TYPE (inner); + end_class_declaration (1); + } + else + { + /* For inner classes, add a 'class$' method to their outermost + context, creating it if necessary. */ + while (INNER_CLASS_DECL_P (class_decl)) + class_decl = DECL_CONTEXT (class_decl); + target_class = TREE_TYPE (class_decl); + } + + if (TYPE_DOT_CLASS (target_class) == NULL_TREE) + build_dot_class_method (target_class); + + if (this_class != target_class) + TYPE_DOT_CLASS (this_class) = TYPE_DOT_CLASS (target_class); + } + EXPR_WFL_LINECOL (node) = location; return node; } /* Complete an incomplete class reference operator. */ static tree ! patch_incomplete_class_ref (tree node) { tree type = TREE_OPERAND (node, 0); tree ref_type; *************** patch_incomplete_class_ref (node) *** 14202,14208 **** if (!(ref_type = resolve_type_during_patch (type))) return error_mark_node; ! if (!flag_emit_class_files || JPRIMITIVE_TYPE_P (ref_type) || TREE_CODE (ref_type) == VOID_TYPE) { tree dot = build_class_ref (ref_type); --- 14025,14034 ---- if (!(ref_type = resolve_type_during_patch (type))) return error_mark_node; ! /* If we're not emitting class files and we know ref_type is a ! compiled class, build a direct reference. */ ! if ((! flag_emit_class_files && is_compiled_class (ref_type)) ! || JPRIMITIVE_TYPE_P (ref_type) || TREE_CODE (ref_type) == VOID_TYPE) { tree dot = build_class_ref (ref_type); *************** patch_incomplete_class_ref (node) *** 14213,14223 **** } /* If we're emitting class files and we have to deal with non ! primitive types, we invoke (and consider generating) the ! synthetic static method `class$'. */ ! if (!TYPE_DOT_CLASS (current_class)) ! build_dot_class_method (current_class); ! ref_type = build_dot_class_method_invocation (ref_type); return java_complete_tree (ref_type); } --- 14039,14046 ---- } /* If we're emitting class files and we have to deal with non ! primitive types, we invoke the synthetic static method `class$'. */ ! ref_type = build_dot_class_method_invocation (current_class, ref_type); return java_complete_tree (ref_type); } *************** patch_incomplete_class_ref (node) *** 14225,14233 **** but preserve the type of NODE if the type is fixed. */ static tree ! patch_unaryop (node, wfl_op) ! tree node; ! tree wfl_op; { tree op = TREE_OPERAND (node, 0); tree op_type = TREE_TYPE (op); --- 14048,14054 ---- but preserve the type of NODE if the type is fixed. */ static tree ! patch_unaryop (tree node, tree wfl_op) { tree op = TREE_OPERAND (node, 0); tree op_type = TREE_TYPE (op); *************** patch_unaryop (node, wfl_op) *** 14415,14422 **** message. Return the resolved type or NULL_TREE. */ static tree ! resolve_type_during_patch (type) ! tree type; { if (unresolved_type_p (type, NULL)) { --- 14236,14242 ---- message. Return the resolved type or NULL_TREE. */ static tree ! resolve_type_during_patch (tree type) { if (unresolved_type_p (type, NULL)) { *************** resolve_type_during_patch (type) *** 14428,14444 **** IDENTIFIER_POINTER (EXPR_WFL_NODE (type))); return NULL_TREE; } return TREE_TYPE (type_decl); } return type; } /* 5.5 Casting Conversion. error_mark_node is returned if an error is found. Otherwise NODE or something meant to replace it is returned. */ static tree ! patch_cast (node, wfl_op) ! tree node; ! tree wfl_op; { tree op = TREE_OPERAND (node, 0); tree cast_type = TREE_TYPE (node); --- 14248,14266 ---- IDENTIFIER_POINTER (EXPR_WFL_NODE (type))); return NULL_TREE; } + + check_deprecation (type, type_decl); + return TREE_TYPE (type_decl); } return type; } + /* 5.5 Casting Conversion. error_mark_node is returned if an error is found. Otherwise NODE or something meant to replace it is returned. */ static tree ! patch_cast (tree node, tree wfl_op) { tree op = TREE_OPERAND (node, 0); tree cast_type = TREE_TYPE (node); *************** patch_cast (node, wfl_op) *** 14461,14474 **** if (cast_type == op_type) return node; ! /* float and double type are converted to the original type main ! variant and then to the target type. */ ! if (JFLOAT_TYPE_P (op_type) && TREE_CODE (cast_type) == CHAR_TYPE) ! op = convert (integer_type_node, op); ! /* Try widening/narowwing convertion. Potentially, things need to be worked out in gcc so we implement the extreme cases ! correctly. fold_convert() needs to be fixed. */ return convert (cast_type, op); } --- 14283,14297 ---- if (cast_type == op_type) return node; ! /* A narrowing conversion from a floating-point number to an ! integral type requires special handling (5.1.3). */ ! if (JFLOAT_TYPE_P (op_type) && JINTEGRAL_TYPE_P (cast_type)) ! if (cast_type != long_type_node) ! op = convert (integer_type_node, op); ! /* Try widening/narrowing conversion. Potentially, things need to be worked out in gcc so we implement the extreme cases ! correctly. fold_convert() needs to be fixed. */ return convert (cast_type, op); } *************** patch_cast (node, wfl_op) *** 14521,14528 **** /* Build a null constant and give it the type TYPE. */ static tree ! build_null_of_type (type) ! tree type; { tree node = build_int_2 (0, 0); TREE_TYPE (node) = promote_type (type); --- 14344,14350 ---- /* Build a null constant and give it the type TYPE. */ static tree ! build_null_of_type (tree type) { tree node = build_int_2 (0, 0); TREE_TYPE (node) = promote_type (type); *************** build_null_of_type (type) *** 14532,14540 **** /* Build an ARRAY_REF incomplete tree node. Note that operand 1 isn't a list of indices. */ static tree ! build_array_ref (location, array, index) ! int location; ! tree array, index; { tree node = build (ARRAY_REF, NULL_TREE, array, index); EXPR_WFL_LINECOL (node) = location; --- 14354,14360 ---- /* Build an ARRAY_REF incomplete tree node. Note that operand 1 isn't a list of indices. */ static tree ! build_array_ref (int location, tree array, tree index) { tree node = build (ARRAY_REF, NULL_TREE, array, index); EXPR_WFL_LINECOL (node) = location; *************** build_array_ref (location, array, index) *** 14544,14551 **** /* 15.12 Array Access Expression */ static tree ! patch_array_ref (node) ! tree node; { tree array = TREE_OPERAND (node, 0); tree array_type = TREE_TYPE (array); --- 14364,14370 ---- /* 15.12 Array Access Expression */ static tree ! patch_array_ref (tree node) { tree array = TREE_OPERAND (node, 0); tree array_type = TREE_TYPE (array); *************** patch_array_ref (node) *** 14605,14614 **** /* 15.9 Array Creation Expressions */ static tree ! build_newarray_node (type, dims, extra_dims) ! tree type; ! tree dims; ! int extra_dims; { tree node = build (NEW_ARRAY_EXPR, NULL_TREE, type, nreverse (dims), --- 14424,14430 ---- /* 15.9 Array Creation Expressions */ static tree ! build_newarray_node (tree type, tree dims, int extra_dims) { tree node = build (NEW_ARRAY_EXPR, NULL_TREE, type, nreverse (dims), *************** build_newarray_node (type, dims, extra_d *** 14617,14624 **** } static tree ! patch_newarray (node) ! tree node; { tree type = TREE_OPERAND (node, 0); tree dims = TREE_OPERAND (node, 1); --- 14433,14439 ---- } static tree ! patch_newarray (tree node) { tree type = TREE_OPERAND (node, 0); tree dims = TREE_OPERAND (node, 1); *************** patch_newarray (node) *** 14721,14728 **** pin-point errors. */ static tree ! maybe_build_array_element_wfl (node) ! tree node; { if (TREE_CODE (node) != EXPR_WITH_FILE_LOCATION) return build_expr_wfl (NULL_TREE, ctxp->filename, --- 14536,14542 ---- pin-point errors. */ static tree ! maybe_build_array_element_wfl (tree node) { if (TREE_CODE (node) != EXPR_WITH_FILE_LOCATION) return build_expr_wfl (NULL_TREE, ctxp->filename, *************** maybe_build_array_element_wfl (node) *** 14736,14746 **** and expansion. */ static tree ! build_new_array_init (location, values) ! int location; ! tree values; { ! tree constructor = build (CONSTRUCTOR, NULL_TREE, NULL_TREE, values); tree to_return = build1 (NEW_ARRAY_INIT, NULL_TREE, constructor); EXPR_WFL_LINECOL (to_return) = location; return to_return; --- 14550,14558 ---- and expansion. */ static tree ! build_new_array_init (int location, tree values) { ! tree constructor = build_constructor (NULL_TREE, values); tree to_return = build1 (NEW_ARRAY_INIT, NULL_TREE, constructor); EXPR_WFL_LINECOL (to_return) = location; return to_return; *************** build_new_array_init (location, values) *** 14751,14758 **** appropriately. */ static tree ! patch_new_array_init (type, node) ! tree type, node; { int error_seen = 0; tree current, element_type; --- 14563,14569 ---- appropriately. */ static tree ! patch_new_array_init (tree type, tree node) { int error_seen = 0; tree current, element_type; *************** patch_new_array_init (type, node) *** 14815,14822 **** otherwise. */ static int ! array_constructor_check_entry (type, entry) ! tree type, entry; { char *array_type_string = NULL; /* For error reports */ tree value, type_value, new_value, wfl_value, patched; --- 14626,14632 ---- otherwise. */ static int ! array_constructor_check_entry (tree type, tree entry) { char *array_type_string = NULL; /* For error reports */ tree value, type_value, new_value, wfl_value, patched; *************** array_constructor_check_entry (type, ent *** 14865,14872 **** } static tree ! build_this (location) ! int location; { tree node = build_wfl_node (this_identifier_node); TREE_SET_CODE (node, THIS_EXPR); --- 14675,14681 ---- } static tree ! build_this (int location) { tree node = build_wfl_node (this_identifier_node); TREE_SET_CODE (node, THIS_EXPR); *************** build_this (location) *** 14879,14887 **** to be returned. */ static tree ! build_return (location, op) ! int location; ! tree op; { tree node = build1 (RETURN_EXPR, NULL_TREE, op); EXPR_WFL_LINECOL (node) = location; --- 14688,14694 ---- to be returned. */ static tree ! build_return (int location, tree op) { tree node = build1 (RETURN_EXPR, NULL_TREE, op); EXPR_WFL_LINECOL (node) = location; *************** build_return (location, op) *** 14890,14897 **** } static tree ! patch_return (node) ! tree node; { tree return_exp = TREE_OPERAND (node, 0); tree meth = current_function_decl; --- 14697,14703 ---- } static tree ! patch_return (tree node) { tree return_exp = TREE_OPERAND (node, 0); tree meth = current_function_decl; *************** patch_return (node) *** 14975,14983 **** /* 14.8 The if Statement */ static tree ! build_if_else_statement (location, expression, if_body, else_body) ! int location; ! tree expression, if_body, else_body; { tree node; if (!else_body) --- 14781,14788 ---- /* 14.8 The if Statement */ static tree ! build_if_else_statement (int location, tree expression, tree if_body, ! tree else_body) { tree node; if (!else_body) *************** build_if_else_statement (location, expre *** 14989,14996 **** } static tree ! patch_if_else_statement (node) ! tree node; { tree expression = TREE_OPERAND (node, 0); int can_complete_normally --- 14794,14800 ---- } static tree ! patch_if_else_statement (tree node) { tree expression = TREE_OPERAND (node, 0); int can_complete_normally *************** patch_if_else_statement (node) *** 15032,15045 **** /* 14.6 Labeled Statements */ ! /* Action taken when a lableled statement is parsed. a new LABELED_BLOCK_EXPR is created. No statement is attached to the label, yet. LABEL can be NULL_TREE for artificially-generated blocks. */ static tree ! build_labeled_block (location, label) ! int location; ! tree label; { tree label_name ; tree label_decl, node; --- 14836,14847 ---- /* 14.6 Labeled Statements */ ! /* Action taken when a labeled statement is parsed. a new LABELED_BLOCK_EXPR is created. No statement is attached to the label, yet. LABEL can be NULL_TREE for artificially-generated blocks. */ static tree ! build_labeled_block (int location, tree label) { tree label_name ; tree label_decl, node; *************** build_labeled_block (location, label) *** 15075,15083 **** /* A labeled statement LBE is attached a statement. */ static tree ! finish_labeled_statement (lbe, statement) ! tree lbe; /* Labeled block expr */ ! tree statement; { /* In anyways, tie the loop to its statement */ LABELED_BLOCK_BODY (lbe) = statement; --- 14877,14884 ---- /* A labeled statement LBE is attached a statement. */ static tree ! finish_labeled_statement (tree lbe, /* Labeled block expr */ ! tree statement) { /* In anyways, tie the loop to its statement */ LABELED_BLOCK_BODY (lbe) = statement; *************** finish_labeled_statement (lbe, statement *** 15092,15099 **** list. */ static tree ! build_new_loop (loop_body) ! tree loop_body; { tree loop = build (LOOP_EXPR, NULL_TREE, loop_body); TREE_SIDE_EFFECTS (loop) = 1; --- 14893,14899 ---- list. */ static tree ! build_new_loop (tree loop_body) { tree loop = build (LOOP_EXPR, NULL_TREE, loop_body); TREE_SIDE_EFFECTS (loop) = 1; *************** build_new_loop (loop_body) *** 15122,15131 **** */ static tree ! build_loop_body (location, condition, reversed) ! int location; ! tree condition; ! int reversed; { tree first, second, body; --- 14922,14928 ---- */ static tree ! build_loop_body (int location, tree condition, int reversed) { tree first, second, body; *************** build_loop_body (location, condition, re *** 15147,15156 **** loop list. */ static tree ! finish_loop_body (location, condition, body, reversed) ! int location; ! tree condition, body; ! int reversed; { tree to_return = ctxp->current_loop; tree loop_body = LOOP_EXPR_BODY (to_return); --- 14944,14950 ---- loop list. */ static tree ! finish_loop_body (int location, tree condition, tree body, int reversed) { tree to_return = ctxp->current_loop; tree loop_body = LOOP_EXPR_BODY (to_return); *************** finish_loop_body (location, condition, b *** 15173,15181 **** loops feature the condition part */ static tree ! finish_for_loop (location, condition, update, body) ! int location; ! tree condition, update, body; { /* Put the condition and the loop body in place */ tree loop = finish_loop_body (location, condition, body, 0); --- 14967,14973 ---- loops feature the condition part */ static tree ! finish_for_loop (int location, tree condition, tree update, tree body) { /* Put the condition and the loop body in place */ tree loop = finish_loop_body (location, condition, body, 0); *************** finish_for_loop (location, condition, up *** 15214,15221 **** LABELED_BLOCK_EXPR's block. */ static tree ! search_loop (statement) ! tree statement; { if (TREE_CODE (statement) == LOOP_EXPR) return statement; --- 15006,15012 ---- LABELED_BLOCK_EXPR's block. */ static tree ! search_loop (tree statement) { if (TREE_CODE (statement) == LOOP_EXPR) return statement; *************** search_loop (statement) *** 15237,15244 **** returned otherwise. */ static int ! labeled_block_contains_loop_p (block, loop) ! tree block, loop; { if (!block) return 0; --- 15028,15034 ---- returned otherwise. */ static int ! labeled_block_contains_loop_p (tree block, tree loop) { if (!block) return 0; *************** labeled_block_contains_loop_p (block, lo *** 15256,15263 **** insert LOOP as its body. */ static tree ! patch_loop_statement (loop) ! tree loop; { tree loop_label; --- 15046,15052 ---- insert LOOP as its body. */ static tree ! patch_loop_statement (tree loop) { tree loop_label; *************** patch_loop_statement (loop) *** 15279,15287 **** unlabeled break/continue statement. */ static tree ! build_bc_statement (location, is_break, name) ! int location, is_break; ! tree name; { tree break_continue, label_block_expr = NULL_TREE; --- 15068,15074 ---- unlabeled break/continue statement. */ static tree ! build_bc_statement (int location, int is_break, tree name) { tree break_continue, label_block_expr = NULL_TREE; *************** build_bc_statement (location, is_break, *** 15291,15297 **** (merge_qualified_name (label_id, EXPR_WFL_NODE (name))))) /* Null means that we don't have a target for this named break/continue. In this case, we make the target to be the ! label name, so that the error can be reported accuratly in patch_bc_statement. */ label_block_expr = EXPR_WFL_NODE (name); } --- 15078,15084 ---- (merge_qualified_name (label_id, EXPR_WFL_NODE (name))))) /* Null means that we don't have a target for this named break/continue. In this case, we make the target to be the ! label name, so that the error can be reported accurately in patch_bc_statement. */ label_block_expr = EXPR_WFL_NODE (name); } *************** build_bc_statement (location, is_break, *** 15310,15317 **** /* Verification of a break/continue statement. */ static tree ! patch_bc_statement (node) ! tree node; { tree bc_label = EXIT_BLOCK_LABELED_BLOCK (node), target_stmt; tree labeled_block = ctxp->current_labeled_block; --- 15097,15103 ---- /* Verification of a break/continue statement. */ static tree ! patch_bc_statement (tree node) { tree bc_label = EXIT_BLOCK_LABELED_BLOCK (node), target_stmt; tree labeled_block = ctxp->current_labeled_block; *************** patch_bc_statement (node) *** 15387,15394 **** boolean. */ static tree ! patch_exit_expr (node) ! tree node; { tree expression = TREE_OPERAND (node, 0); TREE_TYPE (node) = error_mark_node; --- 15173,15179 ---- boolean. */ static tree ! patch_exit_expr (tree node) { tree expression = TREE_OPERAND (node, 0); TREE_TYPE (node) = error_mark_node; *************** patch_exit_expr (node) *** 15423,15430 **** /* 14.9 Switch statement */ static tree ! patch_switch_statement (node) ! tree node; { tree se = TREE_OPERAND (node, 0), se_type; tree save, iter; --- 15208,15214 ---- /* 14.9 Switch statement */ static tree ! patch_switch_statement (tree node) { tree se = TREE_OPERAND (node, 0), se_type; tree save, iter; *************** patch_switch_statement (node) *** 15501,15509 **** /* Build an assertion expression for `assert CONDITION : VALUE'; VALUE might be NULL_TREE. */ static tree ! build_assertion (location, condition, value) ! int location; ! tree condition, value; { tree node; tree klass = GET_CPC (); --- 15285,15291 ---- /* Build an assertion expression for `assert CONDITION : VALUE'; VALUE might be NULL_TREE. */ static tree ! build_assertion (int location, tree condition, tree value) { tree node; tree klass = GET_CPC (); *************** build_assertion (location, condition, va *** 15522,15528 **** if (!TYPE_DOT_CLASS (class_type)) build_dot_class_method (class_type); ! classdollar = build_dot_class_method_invocation (class_type); /* Call CLASS.desiredAssertionStatus(). */ id = build_wfl_node (get_identifier ("desiredAssertionStatus")); --- 15304,15310 ---- if (!TYPE_DOT_CLASS (class_type)) build_dot_class_method (class_type); ! classdollar = build_dot_class_method_invocation (class_type, class_type); /* Call CLASS.desiredAssertionStatus(). */ id = build_wfl_node (get_identifier ("desiredAssertionStatus")); *************** build_assertion (location, condition, va *** 15580,15588 **** catches TYPE and executes CATCH_STMTS. */ static tree ! encapsulate_with_try_catch (location, type, try_stmts, catch_stmts) ! int location; ! tree type, try_stmts, catch_stmts; { tree try_block, catch_clause_param, catch_block, catch; --- 15362,15369 ---- catches TYPE and executes CATCH_STMTS. */ static tree ! encapsulate_with_try_catch (int location, tree type_or_name, tree try_stmts, ! tree catch_stmts) { tree try_block, catch_clause_param, catch_block, catch; *************** encapsulate_with_try_catch (location, ty *** 15590,15597 **** try_block = build_expr_block (try_stmts, NULL_TREE); /* Build a catch block: we need a catch clause parameter */ ! catch_clause_param = build_decl (VAR_DECL, ! wpv_id, build_pointer_type (type)); /* And a block */ catch_block = build_expr_block (NULL_TREE, catch_clause_param); --- 15371,15390 ---- try_block = build_expr_block (try_stmts, NULL_TREE); /* Build a catch block: we need a catch clause parameter */ ! if (TREE_CODE (type_or_name) == EXPR_WITH_FILE_LOCATION) ! { ! tree catch_type = obtain_incomplete_type (type_or_name); ! jdep *dep; ! catch_clause_param = build_decl (VAR_DECL, wpv_id, catch_type); ! register_incomplete_type (JDEP_VARIABLE, type_or_name, ! catch_clause_param, catch_type); ! dep = CLASSD_LAST (ctxp->classd_list); ! JDEP_GET_PATCH (dep) = &TREE_TYPE (catch_clause_param); ! } ! else ! catch_clause_param = build_decl (VAR_DECL, wpv_id, ! build_pointer_type (type_or_name)); ! /* And a block */ catch_block = build_expr_block (NULL_TREE, catch_clause_param); *************** encapsulate_with_try_catch (location, ty *** 15610,15618 **** } static tree ! build_try_statement (location, try_block, catches) ! int location; ! tree try_block, catches; { tree node = build (TRY_EXPR, NULL_TREE, try_block, catches); EXPR_WFL_LINECOL (node) = location; --- 15403,15409 ---- } static tree ! build_try_statement (int location, tree try_block, tree catches) { tree node = build (TRY_EXPR, NULL_TREE, try_block, catches); EXPR_WFL_LINECOL (node) = location; *************** build_try_statement (location, try_block *** 15620,15628 **** } static tree ! build_try_finally_statement (location, try_block, finally) ! int location; ! tree try_block, finally; { tree node = build (TRY_FINALLY_EXPR, NULL_TREE, try_block, finally); EXPR_WFL_LINECOL (node) = location; --- 15411,15417 ---- } static tree ! build_try_finally_statement (int location, tree try_block, tree finally) { tree node = build (TRY_FINALLY_EXPR, NULL_TREE, try_block, finally); EXPR_WFL_LINECOL (node) = location; *************** build_try_finally_statement (location, t *** 15630,15637 **** } static tree ! patch_try_statement (node) ! tree node; { int error_found = 0; tree try = TREE_OPERAND (node, 0); --- 15419,15425 ---- } static tree ! patch_try_statement (tree node) { int error_found = 0; tree try = TREE_OPERAND (node, 0); *************** patch_try_statement (node) *** 15742,15749 **** /* 14.17 The synchronized Statement */ static tree ! patch_synchronized_statement (node, wfl_op1) ! tree node, wfl_op1; { tree expr = java_complete_tree (TREE_OPERAND (node, 0)); tree block = TREE_OPERAND (node, 1); --- 15530,15536 ---- /* 14.17 The synchronized Statement */ static tree ! patch_synchronized_statement (tree node, tree wfl_op1) { tree expr = java_complete_tree (TREE_OPERAND (node, 0)); tree block = TREE_OPERAND (node, 1); *************** patch_synchronized_statement (node, wfl_ *** 15812,15819 **** /* 14.16 The throw Statement */ static tree ! patch_throw_statement (node, wfl_op1) ! tree node, wfl_op1; { tree expr = TREE_OPERAND (node, 0); tree type = TREE_TYPE (expr); --- 15599,15605 ---- /* 14.16 The throw Statement */ static tree ! patch_throw_statement (tree node, tree wfl_op1) { tree expr = TREE_OPERAND (node, 0); tree type = TREE_TYPE (expr); *************** patch_throw_statement (node, wfl_op1) *** 15912,15935 **** } /* Check that exception said to be thrown by method DECL can be ! effectively caught from where DECL is invoked. */ ! static void ! check_thrown_exceptions (location, decl) ! int location; ! tree decl; { tree throws; ! /* For all the unchecked exceptions thrown by DECL */ for (throws = DECL_FUNCTION_THROWS (decl); throws; throws = TREE_CHAIN (throws)) if (!check_thrown_exceptions_do (TREE_VALUE (throws))) { ! #if 1 ! /* Temporary hack to suppresses errors about cloning arrays. FIXME */ ! if (DECL_NAME (decl) == get_identifier ("clone")) continue; ! #endif EXPR_WFL_LINECOL (wfl_operator) = location; if (DECL_FINIT_P (current_function_decl)) parse_error_context --- 15698,15729 ---- } /* Check that exception said to be thrown by method DECL can be ! effectively caught from where DECL is invoked. THIS_EXPR is the ! expression that computes `this' for the method call. */ static void ! check_thrown_exceptions (int location, tree decl, tree this_expr) { tree throws; ! int is_array_call = 0; ! ! /* Skip check within generated methods, such as access$. */ ! if (OUTER_FIELD_ACCESS_IDENTIFIER_P (DECL_NAME (current_function_decl))) ! return; ! ! if (this_expr != NULL_TREE ! && TREE_CODE (TREE_TYPE (this_expr)) == POINTER_TYPE ! && TYPE_ARRAY_P (TREE_TYPE (TREE_TYPE (this_expr)))) ! is_array_call = 1; ! ! /* For all the unchecked exceptions thrown by DECL. */ for (throws = DECL_FUNCTION_THROWS (decl); throws; throws = TREE_CHAIN (throws)) if (!check_thrown_exceptions_do (TREE_VALUE (throws))) { ! /* Suppress errors about cloning arrays. */ ! if (is_array_call && DECL_NAME (decl) == get_identifier ("clone")) continue; ! EXPR_WFL_LINECOL (wfl_operator) = location; if (DECL_FINIT_P (current_function_decl)) parse_error_context *************** check_thrown_exceptions (location, decl) *** 15952,15959 **** current method. */ static int ! check_thrown_exceptions_do (exception) ! tree exception; { tree list = currently_caught_type_list; resolve_and_layout (exception, NULL_TREE); --- 15746,15752 ---- current method. */ static int ! check_thrown_exceptions_do (tree exception) { tree list = currently_caught_type_list; resolve_and_layout (exception, NULL_TREE); *************** check_thrown_exceptions_do (exception) *** 15973,15980 **** } static void ! purge_unchecked_exceptions (mdecl) ! tree mdecl; { tree throws = DECL_FUNCTION_THROWS (mdecl); tree new = NULL_TREE; --- 15766,15772 ---- } static void ! purge_unchecked_exceptions (tree mdecl) { tree throws = DECL_FUNCTION_THROWS (mdecl); tree new = NULL_TREE; *************** purge_unchecked_exceptions (mdecl) *** 15999,16006 **** otherwise. */ static bool ! ctors_unchecked_throws_clause_p (class_type) ! tree class_type; { tree current; --- 15791,15797 ---- otherwise. */ static bool ! ctors_unchecked_throws_clause_p (tree class_type) { tree current; *************** ctors_unchecked_throws_clause_p (class_t *** 16028,16035 **** /* 15.24 Conditional Operator ?: */ static tree ! patch_conditional_expr (node, wfl_cond, wfl_op1) ! tree node, wfl_cond, wfl_op1; { tree cond = TREE_OPERAND (node, 0); tree op1 = TREE_OPERAND (node, 1); --- 15819,15825 ---- /* 15.24 Conditional Operator ?: */ static tree ! patch_conditional_expr (tree node, tree wfl_cond, tree wfl_op1) { tree cond = TREE_OPERAND (node, 0); tree op1 = TREE_OPERAND (node, 1); *************** patch_conditional_expr (node, wfl_cond, *** 16142,16149 **** /* Wrap EXPR with code to initialize DECL's class, if appropriate. */ static tree ! maybe_build_class_init_for_field (decl, expr) ! tree decl, expr; { tree clas = DECL_CONTEXT (decl); if (flag_emit_class_files || flag_emit_xref) --- 15932,15938 ---- /* Wrap EXPR with code to initialize DECL's class, if appropriate. */ static tree ! maybe_build_class_init_for_field (tree decl, tree expr) { tree clas = DECL_CONTEXT (decl); if (flag_emit_class_files || flag_emit_xref) *************** maybe_build_class_init_for_field (decl, *** 16167,16175 **** CONTEXT is a static final VAR_DECL whose initializer we are folding. */ static tree ! fold_constant_for_init (node, context) ! tree node; ! tree context; { tree op0, op1, val; enum tree_code code = TREE_CODE (node); --- 15956,15962 ---- CONTEXT is a static final VAR_DECL whose initializer we are folding. */ static tree ! fold_constant_for_init (tree node, tree context) { tree op0, op1, val; enum tree_code code = TREE_CODE (node); *************** fold_constant_for_init (node, context) *** 16224,16230 **** if (val == NULL_TREE || ! TREE_CONSTANT (val)) return NULL_TREE; TREE_OPERAND (node, 0) = val; ! return patch_unaryop (node, op0); break; case COND_EXPR: --- 16011,16021 ---- if (val == NULL_TREE || ! TREE_CONSTANT (val)) return NULL_TREE; TREE_OPERAND (node, 0) = val; ! val = patch_unaryop (node, op0); ! if (! TREE_CONSTANT (val)) ! return NULL_TREE; ! return val; ! break; case COND_EXPR: *************** fold_constant_for_init (node, context) *** 16316,16373 **** 'M' for MethodName, 'E' for ExpressionName, and 'A' for AmbiguousName. */ tree ! resolve_simple_name (name, context) ! tree name; ! int context; { } tree ! resolve_qualified_name (name, context) ! tree name; ! int context; { } #endif - /* Mark P, which is really a `struct parser_ctxt **' for GC. */ - - static void - mark_parser_ctxt (p) - void *p; - { - struct parser_ctxt *pc = *((struct parser_ctxt **) p); - #ifndef JC1_LITE - size_t i; - #endif - - if (!pc) - return; - - #ifndef JC1_LITE - for (i = 0; i < ARRAY_SIZE (pc->modifier_ctx); ++i) - ggc_mark_tree (pc->modifier_ctx[i]); - ggc_mark_tree (pc->class_type); - ggc_mark_tree (pc->function_decl); - ggc_mark_tree (pc->package); - ggc_mark_tree (pc->class_list); - ggc_mark_tree (pc->current_parsed_class); - ggc_mark_tree (pc->current_parsed_class_un); - ggc_mark_tree (pc->non_static_initialized); - ggc_mark_tree (pc->static_initialized); - ggc_mark_tree (pc->instance_initializers); - ggc_mark_tree (pc->import_list); - ggc_mark_tree (pc->import_demand_list); - ggc_mark_tree (pc->current_loop); - ggc_mark_tree (pc->current_labeled_block); - #endif /* JC1_LITE */ - - if (pc->next) - mark_parser_ctxt (&pc->next); - } - void ! init_src_parse () { /* Sanity check; we've been bit by this before. */ if (ARRAY_SIZE (ctxp->modifier_ctx) != MODIFIER_TK - PUBLIC_TK) --- 16107,16124 ---- 'M' for MethodName, 'E' for ExpressionName, and 'A' for AmbiguousName. */ tree ! resolve_simple_name (tree name, int context) { } tree ! resolve_qualified_name (tree name, int context) { } #endif void ! init_src_parse (void) { /* Sanity check; we've been bit by this before. */ if (ARRAY_SIZE (ctxp->modifier_ctx) != MODIFIER_TK - PUBLIC_TK) *************** init_src_parse () *** 16382,16390 **** /* Attach to PTR (a block) the declaration found in ENTRY. */ static int ! attach_init_test_initialization_flags (entry, ptr) ! PTR *entry; ! PTR ptr; { tree block = (tree)ptr; struct treetreehash_entry *ite = (struct treetreehash_entry *) *entry; --- 16133,16139 ---- /* Attach to PTR (a block) the declaration found in ENTRY. */ static int ! attach_init_test_initialization_flags (void **entry, void *ptr) { tree block = (tree)ptr; struct treetreehash_entry *ite = (struct treetreehash_entry *) *entry; *************** attach_init_test_initialization_flags (e *** 16397,16412 **** return true; } ! /* This function is called for each classes that is known definitely ! assigned when a given static method was called. This function augments a compound expression (INFO) storing all assignment to initialized static class flags if a flag already existed, otherwise a new one is created. */ static int ! emit_test_initialization (entry_p, info) ! PTR *entry_p; ! PTR info; { tree l = (tree) info; tree decl, init; --- 16146,16159 ---- return true; } ! /* This function is called for each class that is known definitely ! initialized when a given static method was called. This function augments a compound expression (INFO) storing all assignment to initialized static class flags if a flag already existed, otherwise a new one is created. */ static int ! emit_test_initialization (void **entry_p, void *info) { tree l = (tree) info; tree decl, init; *************** emit_test_initialization (entry_p, info) *** 16434,16439 **** --- 16181,16188 ---- LOCAL_CLASS_INITIALIZATION_FLAG (decl) = 1; DECL_CONTEXT (decl) = current_function_decl; DECL_INITIAL (decl) = boolean_true_node; + /* Don't emit any symbolic debugging info for this decl. */ + DECL_IGNORED_P (decl) = 1; /* The trick is to find the right context for it. */ block = BLOCK_SUBBLOCKS (GET_CURRENT_BLOCK (current_function_decl)); diff -Nrc3pad gcc-3.3.3/gcc/java/resource.c gcc-3.4.0/gcc/java/resource.c *** gcc-3.3.3/gcc/java/resource.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/gcc/java/resource.c 2003-11-26 01:34:32.000000000 +0000 *************** *** 0 **** --- 1,203 ---- + /* Functions related to building resource files. + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 + Free Software Foundation, Inc. + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GCC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + + Java and all Java-based marks are trademarks or registered trademarks + of Sun Microsystems, Inc. in the United States and other countries. + The Free Software Foundation is independent of Sun Microsystems, Inc. */ + + #include "config.h" + #include "system.h" + #include "coretypes.h" + #include "tm.h" + #include "tree.h" + #include "rtl.h" + #include "flags.h" + #include "java-tree.h" + #include "jcf.h" + #include "obstack.h" + #include "toplev.h" + #include "output.h" + #include "parse.h" + #include "function.h" + #include "ggc.h" + #include "stdio.h" + #include "target.h" + #include "expr.h" + + /* DOS brain-damage */ + #ifndef O_BINARY + #define O_BINARY 0 /* MS-DOS brain-damage */ + #endif + + /* A list of all the resources files. */ + static GTY(()) tree resources = NULL; + + /* Function used to register resources. */ + static GTY(()) rtx registerResource_libfunc; + + /* Count of all the resources compiled in this invocation. */ + static int Jr_count = 0; + + void + compile_resource_data (const char *name, const char *buffer, int length) + { + tree rtype, field = NULL_TREE, data_type, rinit, data, decl; + char buf[60]; + + data_type = build_prim_array_type (unsigned_byte_type_node, + strlen (name) + length); + rtype = make_node (RECORD_TYPE); + PUSH_FIELD (rtype, field, "name_length", unsigned_int_type_node); + PUSH_FIELD (rtype, field, "resource_length", unsigned_int_type_node); + PUSH_FIELD (rtype, field, "data", data_type); + FINISH_RECORD (rtype); + START_RECORD_CONSTRUCTOR (rinit, rtype); + PUSH_FIELD_VALUE (rinit, "name_length", + build_int_2 (strlen (name), 0)); + PUSH_FIELD_VALUE (rinit, "resource_length", + build_int_2 (length, 0)); + data = build_string (strlen(name) + length, buffer); + TREE_TYPE (data) = data_type; + PUSH_FIELD_VALUE (rinit, "data", data); + FINISH_RECORD_CONSTRUCTOR (rinit); + TREE_CONSTANT (rinit) = 1; + + /* Generate a unique-enough identifier. */ + sprintf (buf, "_Jr%d", ++Jr_count); + + decl = build_decl (VAR_DECL, get_identifier (buf), rtype); + TREE_STATIC (decl) = 1; + DECL_ARTIFICIAL (decl) = 1; + DECL_IGNORED_P (decl) = 1; + TREE_READONLY (decl) = 1; + TREE_THIS_VOLATILE (decl) = 0; + DECL_INITIAL (decl) = rinit; + layout_decl (decl, 0); + pushdecl (decl); + rest_of_decl_compilation (decl, (char*) 0, global_bindings_p (), 0); + make_decl_rtl (decl, (char*) 0); + assemble_variable (decl, 1, 0, 0); + + resources = tree_cons (NULL_TREE, decl, resources); + } + + void + write_resource_constructor (void) + { + tree init_name, init_type, init_decl; + tree iter; + location_t saved_loc = input_location; + char *resource_ctor_name; + + /* Only do work if required. */ + if (resources == NULL_TREE) + return; + + resource_ctor_name = concat (IDENTIFIER_POINTER (get_file_function_name ('I')), + "_resource", NULL); + init_name = get_identifier (resource_ctor_name); + free (resource_ctor_name); + init_type = build_function_type (void_type_node, end_params_node); + + init_decl = build_decl (FUNCTION_DECL, init_name, init_type); + DECL_SOURCE_LINE (init_decl) = 0; + SET_DECL_ASSEMBLER_NAME (init_decl, init_name); + TREE_STATIC (init_decl) = 1; + current_function_decl = init_decl; + DECL_RESULT (init_decl) = build_decl (RESULT_DECL, + NULL_TREE, void_type_node); + + /* It can be a static function as long as collect2 does not have + to scan the object file to find its ctor/dtor routine. */ + TREE_PUBLIC (init_decl) = ! targetm.have_ctors_dtors; + + pushlevel (0); + make_decl_rtl (init_decl, NULL); + init_function_start (init_decl); + expand_function_start (init_decl, 0); + + /* Write out entries in the same order in which they were defined. */ + for (iter = nreverse (resources); iter != NULL_TREE; + iter = TREE_CHAIN (iter)) + { + emit_library_call (registerResource_libfunc, 0, VOIDmode, 1, + expand_expr (build_address_of (TREE_VALUE (iter)), + 0, Pmode, 0), + Pmode); + } + + input_location = DECL_SOURCE_LOCATION (init_decl); + expand_function_end (); + poplevel (1, 0, 1); + { + /* Force generation, even with -O3 or deeper. Gross hack. + FIXME. */ + int saved_flag = flag_inline_functions; + flag_inline_functions = 0; + rest_of_compilation (init_decl); + flag_inline_functions = saved_flag; + } + current_function_decl = NULL_TREE; + (* targetm.asm_out.constructor) (XEXP (DECL_RTL (init_decl), 0), + DEFAULT_INIT_PRIORITY); + input_location = saved_loc; + } + + /* Generate a byte array representing the contents of FILENAME. The + array is assigned a unique local symbol. The array represents a + compiled Java resource, which is accessed by the runtime using + NAME. */ + void + compile_resource_file (const char *name, const char *filename) + { + struct stat stat_buf; + int fd; + char *buffer; + + fd = open (filename, O_RDONLY | O_BINARY); + if (fd < 0) + { + perror ("Failed to read resource file"); + return; + } + if (fstat (fd, &stat_buf) != 0 + || ! S_ISREG (stat_buf.st_mode)) + { + perror ("Could not figure length of resource file"); + return; + } + buffer = xmalloc (strlen (name) + stat_buf.st_size); + strcpy (buffer, name); + read (fd, buffer + strlen (name), stat_buf.st_size); + close (fd); + + compile_resource_data (name, buffer, stat_buf.st_size); + write_resource_constructor (); + } + + void + init_resource_processing (void) + { + registerResource_libfunc = + gen_rtx_SYMBOL_REF (Pmode, "_Jv_RegisterResource"); + } + + #include "gt-java-resource.h" diff -Nrc3pad gcc-3.3.3/gcc/java/rmic.1 gcc-3.4.0/gcc/java/rmic.1 *** gcc-3.3.3/gcc/java/rmic.1 2004-02-14 20:38:17.000000000 +0000 --- gcc-3.4.0/gcc/java/rmic.1 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,223 **** - .\" Automatically generated by Pod::Man version 1.15 - .\" Sat Feb 14 20:38:17 2004 - .\" - .\" Standard preamble: - .\" ====================================================================== - .de Sh \" Subsection heading - .br - .if t .Sp - .ne 5 - .PP - \fB\\$1\fR - .PP - .. - .de Sp \" Vertical space (when we can't use .PP) - .if t .sp .5v - .if n .sp - .. - .de Ip \" List item - .br - .ie \\n(.$>=3 .ne \\$3 - .el .ne 3 - .IP "\\$1" \\$2 - .. - .de Vb \" Begin verbatim text - .ft CW - .nf - .ne \\$1 - .. - .de Ve \" End verbatim text - .ft R - - .fi - .. - .\" Set up some character translations and predefined strings. \*(-- will - .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left - .\" double quote, and \*(R" will give a right double quote. | will give a - .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used - .\" to do unbreakable dashes and therefore won't be available. \*(C` and - .\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> - .tr \(*W-|\(bv\*(Tr - .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' - .ie n \{\ - . ds -- \(*W- - . ds PI pi - . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch - . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch - . ds L" "" - . ds R" "" - . ds C` "" - . ds C' "" - 'br\} - .el\{\ - . ds -- \|\(em\| - . ds PI \(*p - . ds L" `` - . ds R" '' - 'br\} - .\" - .\" If the F register is turned on, we'll generate index entries on stderr - .\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and - .\" index entries marked with X<> in POD. Of course, you'll have to process - .\" the output yourself in some meaningful fashion. - .if \nF \{\ - . de IX - . tm Index:\\$1\t\\n%\t"\\$2" - .. - . nr % 0 - . rr F - .\} - .\" - .\" For nroff, turn off justification. Always turn off hyphenation; it - .\" makes way too many mistakes in technical documents. - .hy 0 - .if n .na - .\" - .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). - .\" Fear. Run. Save yourself. No user-serviceable parts. - .bd B 3 - . \" fudge factors for nroff and troff - .if n \{\ - . ds #H 0 - . ds #V .8m - . ds #F .3m - . ds #[ \f1 - . ds #] \fP - .\} - .if t \{\ - . ds #H ((1u-(\\\\n(.fu%2u))*.13m) - . ds #V .6m - . ds #F 0 - . ds #[ \& - . ds #] \& - .\} - . \" simple accents for nroff and troff - .if n \{\ - . ds ' \& - . ds ` \& - . ds ^ \& - . ds , \& - . ds ~ ~ - . ds / - .\} - .if t \{\ - . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" - . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' - . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' - . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' - . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' - . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' - .\} - . \" troff and (daisy-wheel) nroff accents - .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' - .ds 8 \h'\*(#H'\(*b\h'-\*(#H' - .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] - .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' - .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' - .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] - .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] - .ds ae a\h'-(\w'a'u*4/10)'e - .ds Ae A\h'-(\w'A'u*4/10)'E - . \" corrections for vroff - .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' - .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' - . \" for low resolution devices (crt and lpr) - .if \n(.H>23 .if \n(.V>19 \ - \{\ - . ds : e - . ds 8 ss - . ds o a - . ds d- d\h'-1'\(ga - . ds D- D\h'-1'\(hy - . ds th \o'bp' - . ds Th \o'LP' - . ds ae ae - . ds Ae AE - .\} - .rm #[ #] #H #V #F C - .\" ====================================================================== - .\" - .IX Title "RMIC 1" - .TH RMIC 1 "gcc-3.3.3" "2004-02-14" "GNU" - .UC - .SH "NAME" - rmic \- Generate stubs for Remote Method Invocation - .SH "SYNOPSIS" - .IX Header "SYNOPSIS" - \&\fBrmic\fR [\fB\s-1OPTION\s0\fR] ... \fIclass\fR ... - .SH "DESCRIPTION" - .IX Header "DESCRIPTION" - \&\fBrmic\fR is a utility included with \f(CW\*(C`libgcj\*(C'\fR which generates - stubs for remote objects. - .PP - Note that this program isn't yet fully compatible with the \s-1JDK\s0 - \&\fBrmic\fR. Some options, such as \fB\-classpath\fR, are - recognized but currently ignored. We have left these options - undocumented for now. - .PP - Long options can also be given with a GNU-style leading \fB\--\fR. For - instance, \fB\*(--help\fR is accepted. - .SH "OPTIONS" - .IX Header "OPTIONS" - .Ip "\fB\-keep\fR" 4 - .IX Item "-keep" - .PD 0 - .Ip "\fB\-keepgenerated\fR" 4 - .IX Item "-keepgenerated" - .PD - By default, \fBrmic\fR deletes intermediate files. Either of these - options causes it not to delete such files. - .Ip "\fB\-v1.1\fR" 4 - .IX Item "-v1.1" - Cause \fBrmic\fR to create stubs and skeletons for the 1.1 - protocol version. - .Ip "\fB\-vcompat\fR" 4 - .IX Item "-vcompat" - Cause \fBrmic\fR to create stubs and skeletons compatible with both - the 1.1 and 1.2 protocol versions. This is the default. - .Ip "\fB\-v1.2\fR" 4 - .IX Item "-v1.2" - Cause \fBrmic\fR to create stubs and skeletons for the 1.2 - protocol version. - .Ip "\fB\-nocompile\fR" 4 - .IX Item "-nocompile" - Don't compile the generated files. - .Ip "\fB\-verbose\fR" 4 - .IX Item "-verbose" - Print information about what \fBrmic\fR is doing. - .Ip "\fB\-d\fR \fIdirectory\fR" 4 - .IX Item "-d directory" - Put output files in \fIdirectory\fR. By default the files are put in - the current working directory. - .Ip "\fB\-help\fR" 4 - .IX Item "-help" - Print a help message, then exit. - .Ip "\fB\-version\fR" 4 - .IX Item "-version" - Print version information, then exit. - .SH "SEE ALSO" - .IX Header "SEE ALSO" - .SH "COPYRIGHT" - .IX Header "COPYRIGHT" - Copyright (c) 2001, 2002 Free Software Foundation, Inc. - .PP - Permission is granted to copy, distribute and/or modify this document - under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.2 or - any later version published by the Free Software Foundation; with the - Invariant Sections being ``\s-1GNU\s0 General Public License'', the Front-Cover - texts being (a) (see below), and with the Back-Cover Texts being (b) - (see below). A copy of the license is included in the - man page \fIgfdl\fR\|(7). - .PP - (a) The \s-1FSF\s0's Front-Cover Text is: - .PP - .Vb 1 - \& A GNU Manual - .Ve - (b) The \s-1FSF\s0's Back-Cover Text is: - .PP - .Vb 3 - \& You have freedom to copy and modify this GNU Manual, like GNU - \& software. Copies published by the Free Software Foundation raise - \& funds for GNU development. - .Ve --- 0 ---- diff -Nrc3pad gcc-3.3.3/gcc/java/rmiregistry.1 gcc-3.4.0/gcc/java/rmiregistry.1 *** gcc-3.3.3/gcc/java/rmiregistry.1 2004-02-14 20:38:17.000000000 +0000 --- gcc-3.4.0/gcc/java/rmiregistry.1 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,185 **** - .\" Automatically generated by Pod::Man version 1.15 - .\" Sat Feb 14 20:38:17 2004 - .\" - .\" Standard preamble: - .\" ====================================================================== - .de Sh \" Subsection heading - .br - .if t .Sp - .ne 5 - .PP - \fB\\$1\fR - .PP - .. - .de Sp \" Vertical space (when we can't use .PP) - .if t .sp .5v - .if n .sp - .. - .de Ip \" List item - .br - .ie \\n(.$>=3 .ne \\$3 - .el .ne 3 - .IP "\\$1" \\$2 - .. - .de Vb \" Begin verbatim text - .ft CW - .nf - .ne \\$1 - .. - .de Ve \" End verbatim text - .ft R - - .fi - .. - .\" Set up some character translations and predefined strings. \*(-- will - .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left - .\" double quote, and \*(R" will give a right double quote. | will give a - .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used - .\" to do unbreakable dashes and therefore won't be available. \*(C` and - .\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> - .tr \(*W-|\(bv\*(Tr - .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' - .ie n \{\ - . ds -- \(*W- - . ds PI pi - . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch - . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch - . ds L" "" - . ds R" "" - . ds C` "" - . ds C' "" - 'br\} - .el\{\ - . ds -- \|\(em\| - . ds PI \(*p - . ds L" `` - . ds R" '' - 'br\} - .\" - .\" If the F register is turned on, we'll generate index entries on stderr - .\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and - .\" index entries marked with X<> in POD. Of course, you'll have to process - .\" the output yourself in some meaningful fashion. - .if \nF \{\ - . de IX - . tm Index:\\$1\t\\n%\t"\\$2" - .. - . nr % 0 - . rr F - .\} - .\" - .\" For nroff, turn off justification. Always turn off hyphenation; it - .\" makes way too many mistakes in technical documents. - .hy 0 - .if n .na - .\" - .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). - .\" Fear. Run. Save yourself. No user-serviceable parts. - .bd B 3 - . \" fudge factors for nroff and troff - .if n \{\ - . ds #H 0 - . ds #V .8m - . ds #F .3m - . ds #[ \f1 - . ds #] \fP - .\} - .if t \{\ - . ds #H ((1u-(\\\\n(.fu%2u))*.13m) - . ds #V .6m - . ds #F 0 - . ds #[ \& - . ds #] \& - .\} - . \" simple accents for nroff and troff - .if n \{\ - . ds ' \& - . ds ` \& - . ds ^ \& - . ds , \& - . ds ~ ~ - . ds / - .\} - .if t \{\ - . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" - . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' - . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' - . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' - . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' - . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' - .\} - . \" troff and (daisy-wheel) nroff accents - .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' - .ds 8 \h'\*(#H'\(*b\h'-\*(#H' - .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] - .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' - .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' - .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] - .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] - .ds ae a\h'-(\w'a'u*4/10)'e - .ds Ae A\h'-(\w'A'u*4/10)'E - . \" corrections for vroff - .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' - .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' - . \" for low resolution devices (crt and lpr) - .if \n(.H>23 .if \n(.V>19 \ - \{\ - . ds : e - . ds 8 ss - . ds o a - . ds d- d\h'-1'\(ga - . ds D- D\h'-1'\(hy - . ds th \o'bp' - . ds Th \o'LP' - . ds ae ae - . ds Ae AE - .\} - .rm #[ #] #H #V #F C - .\" ====================================================================== - .\" - .IX Title "RMIREGISTRY 1" - .TH RMIREGISTRY 1 "gcc-3.3.3" "2004-02-14" "GNU" - .UC - .SH "NAME" - rmiregistry \- Remote object registry - .SH "SYNOPSIS" - .IX Header "SYNOPSIS" - \&\fBrmic\fR [\fB\s-1OPTION\s0\fR] ... [\fIport\fR] - .SH "DESCRIPTION" - .IX Header "DESCRIPTION" - \&\fBrmiregistry\fR starts a remote object registry on the current - host. If no port number is specified, then port 1099 is used. - .SH "OPTIONS" - .IX Header "OPTIONS" - .Ip "\fB\*(--help\fR" 4 - .IX Item "help" - Print a help message, then exit. - .Ip "\fB\*(--version\fR" 4 - .IX Item "version" - Print version information, then exit. - .SH "SEE ALSO" - .IX Header "SEE ALSO" - .SH "COPYRIGHT" - .IX Header "COPYRIGHT" - Copyright (c) 2001, 2002 Free Software Foundation, Inc. - .PP - Permission is granted to copy, distribute and/or modify this document - under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.2 or - any later version published by the Free Software Foundation; with the - Invariant Sections being ``\s-1GNU\s0 General Public License'', the Front-Cover - texts being (a) (see below), and with the Back-Cover Texts being (b) - (see below). A copy of the license is included in the - man page \fIgfdl\fR\|(7). - .PP - (a) The \s-1FSF\s0's Front-Cover Text is: - .PP - .Vb 1 - \& A GNU Manual - .Ve - (b) The \s-1FSF\s0's Back-Cover Text is: - .PP - .Vb 3 - \& You have freedom to copy and modify this GNU Manual, like GNU - \& software. Copies published by the Free Software Foundation raise - \& funds for GNU development. - .Ve --- 0 ---- diff -Nrc3pad gcc-3.3.3/gcc/java/typeck.c gcc-3.4.0/gcc/java/typeck.c *** gcc-3.3.3/gcc/java/typeck.c 2002-08-04 22:45:31.000000000 +0000 --- gcc-3.4.0/gcc/java/typeck.c 2004-02-07 14:33:18.000000000 +0000 *************** *** 1,21 **** /* Handle types for the GNU compiler for the Java(TM) language. ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,21 ---- /* Handle types for the GNU compiler for the Java(TM) language. ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 27,32 **** --- 27,34 ---- #include "config.h" #include "system.h" + #include "coretypes.h" + #include "tm.h" #include "tree.h" #include "real.h" #include "obstack.h" *************** The Free Software Foundation is independ *** 37,56 **** #include "toplev.h" #include "ggc.h" ! static tree convert_ieee_real_to_integer PARAMS ((tree, tree)); ! static tree parse_signature_type PARAMS ((const unsigned char **, ! const unsigned char *)); ! static tree lookup_do PARAMS ((tree, tree, tree, tree, tree (*)(tree))); ! static tree build_null_signature PARAMS ((tree)); tree * type_map; /* Set the type of the local variable with index SLOT to TYPE. */ void ! set_local_type (slot, type) ! int slot; ! tree type; { int max_locals = DECL_MAX_LOCALS(current_function_decl); int nslots = TYPE_IS_WIDE (type) ? 2 : 1; --- 39,56 ---- #include "toplev.h" #include "ggc.h" ! static tree convert_ieee_real_to_integer (tree, tree); ! static tree parse_signature_type (const unsigned char **, ! const unsigned char *); ! static tree lookup_do (tree, int, tree, tree, tree (*)(tree)); ! static tree build_null_signature (tree); tree * type_map; /* Set the type of the local variable with index SLOT to TYPE. */ void ! set_local_type (int slot, tree type) { int max_locals = DECL_MAX_LOCALS(current_function_decl); int nslots = TYPE_IS_WIDE (type) ? 2 : 1; *************** set_local_type (slot, type) *** 78,85 **** : (int)expr))) */ static tree ! convert_ieee_real_to_integer (type, expr) ! tree type, expr; { tree result; expr = save_expr (expr); --- 78,84 ---- : (int)expr))) */ static tree ! convert_ieee_real_to_integer (tree type, tree expr) { tree result; expr = save_expr (expr); *************** convert_ieee_real_to_integer (type, expr *** 111,120 **** not permitted by the language being compiled. */ tree ! convert (type, expr) ! tree type, expr; { ! register enum tree_code code = TREE_CODE (type); if (!expr) return error_mark_node; --- 110,118 ---- not permitted by the language being compiled. */ tree ! convert (tree type, tree expr) { ! enum tree_code code = TREE_CODE (type); if (!expr) return error_mark_node; *************** convert (type, expr) *** 153,167 **** tree ! convert_to_char (type, expr) ! tree type, expr; { return build1 (NOP_EXPR, type, expr); } tree ! convert_to_boolean (type, expr) ! tree type, expr; { return build1 (NOP_EXPR, type, expr); } --- 151,163 ---- tree ! convert_to_char (tree type, tree expr) { return build1 (NOP_EXPR, type, expr); } tree ! convert_to_boolean (tree type, tree expr) { return build1 (NOP_EXPR, type, expr); } *************** convert_to_boolean (type, expr) *** 171,179 **** then UNSIGNEDP selects between signed and unsigned types. */ tree ! java_type_for_mode (mode, unsignedp) ! enum machine_mode mode; ! int unsignedp; { if (mode == TYPE_MODE (int_type_node)) return unsignedp ? unsigned_int_type_node : int_type_node; --- 167,173 ---- then UNSIGNEDP selects between signed and unsigned types. */ tree ! java_type_for_mode (enum machine_mode mode, int unsignedp) { if (mode == TYPE_MODE (int_type_node)) return unsignedp ? unsigned_int_type_node : int_type_node; *************** java_type_for_mode (mode, unsignedp) *** 195,203 **** that is unsigned if UNSIGNEDP is nonzero, otherwise signed. */ tree ! java_type_for_size (bits, unsignedp) ! unsigned bits; ! int unsignedp; { if (bits <= TYPE_PRECISION (byte_type_node)) return unsignedp ? unsigned_byte_type_node : byte_type_node; --- 189,195 ---- that is unsigned if UNSIGNEDP is nonzero, otherwise signed. */ tree ! java_type_for_size (unsigned bits, int unsignedp) { if (bits <= TYPE_PRECISION (byte_type_node)) return unsignedp ? unsigned_byte_type_node : byte_type_node; *************** java_type_for_size (bits, unsignedp) *** 214,222 **** signed according to UNSIGNEDP. */ tree ! java_signed_or_unsigned_type (unsignedp, type) ! int unsignedp; ! tree type; { if (! INTEGRAL_TYPE_P (type)) return type; --- 206,212 ---- signed according to UNSIGNEDP. */ tree ! java_signed_or_unsigned_type (int unsignedp, tree type) { if (! INTEGRAL_TYPE_P (type)) return type; *************** java_signed_or_unsigned_type (unsignedp, *** 234,241 **** /* Return a signed type the same as TYPE in other respects. */ tree ! java_signed_type (type) ! tree type; { return java_signed_or_unsigned_type (0, type); } --- 224,230 ---- /* Return a signed type the same as TYPE in other respects. */ tree ! java_signed_type (tree type) { return java_signed_or_unsigned_type (0, type); } *************** java_signed_type (type) *** 243,250 **** /* Return an unsigned type the same as TYPE in other respects. */ tree ! java_unsigned_type (type) ! tree type; { return java_signed_or_unsigned_type (1, type); } --- 232,238 ---- /* Return an unsigned type the same as TYPE in other respects. */ tree ! java_unsigned_type (tree type) { return java_signed_or_unsigned_type (1, type); } *************** java_unsigned_type (type) *** 254,263 **** Value is true if successful. */ bool ! java_mark_addressable (exp) ! tree exp; { ! register tree x = exp; while (1) switch (TREE_CODE (x)) { --- 242,250 ---- Value is true if successful. */ bool ! java_mark_addressable (tree exp) { ! tree x = exp; while (1) switch (TREE_CODE (x)) { *************** java_mark_addressable (exp) *** 318,325 **** /* Thorough checking of the arrayness of TYPE. */ int ! is_array_type_p (type) ! tree type; { return TREE_CODE (type) == POINTER_TYPE && TREE_CODE (TREE_TYPE (type)) == RECORD_TYPE --- 305,311 ---- /* Thorough checking of the arrayness of TYPE. */ int ! is_array_type_p (tree type) { return TREE_CODE (type) == POINTER_TYPE && TREE_CODE (TREE_TYPE (type)) == RECORD_TYPE *************** is_array_type_p (type) *** 330,337 **** Return -1 if the length is unknown or non-constant. */ HOST_WIDE_INT ! java_array_type_length (array_type) ! tree array_type; { tree arfld; if (TREE_CODE (array_type) == POINTER_TYPE) --- 316,322 ---- Return -1 if the length is unknown or non-constant. */ HOST_WIDE_INT ! java_array_type_length (tree array_type) { tree arfld; if (TREE_CODE (array_type) == POINTER_TYPE) *************** java_array_type_length (array_type) *** 352,364 **** /* An array of unknown length will be ultimately given an length of -2, so that we can still have `length' producing a negative value ! even if found. This was part of an optimization amaing at removing `length' from static arrays. We could restore it, FIXME. */ tree ! build_prim_array_type (element_type, length) ! tree element_type; ! HOST_WIDE_INT length; { tree index = NULL; --- 337,347 ---- /* An array of unknown length will be ultimately given an length of -2, so that we can still have `length' producing a negative value ! even if found. This was part of an optimization aiming at removing `length' from static arrays. We could restore it, FIXME. */ tree ! build_prim_array_type (tree element_type, HOST_WIDE_INT length) { tree index = NULL; *************** build_prim_array_type (element_type, len *** 376,384 **** The LENGTH is -1 if the length is unknown. */ tree ! build_java_array_type (element_type, length) ! tree element_type; ! HOST_WIDE_INT length; { tree sig, t, fld, atype, arfld; char buf[12]; --- 359,365 ---- The LENGTH is -1 if the length is unknown. */ tree ! build_java_array_type (tree element_type, HOST_WIDE_INT length) { tree sig, t, fld, atype, arfld; char buf[12]; *************** build_java_array_type (element_type, len *** 439,446 **** /* Promote TYPE to the type actually used for fields and parameters. */ tree ! promote_type (type) ! tree type; { switch (TREE_CODE (type)) { --- 420,426 ---- /* Promote TYPE to the type actually used for fields and parameters. */ tree ! promote_type (tree type) { switch (TREE_CODE (type)) { *************** promote_type (type) *** 474,481 **** Return the seen TREE_TYPE, updating *PTR. */ static tree ! parse_signature_type (ptr, limit) ! const unsigned char **ptr, *limit; { tree type; --- 454,460 ---- Return the seen TREE_TYPE, updating *PTR. */ static tree ! parse_signature_type (const unsigned char **ptr, const unsigned char *limit) { tree type; *************** parse_signature_type (ptr, limit) *** 501,507 **** case 'L': { const unsigned char *start = ++(*ptr); ! register const unsigned char *str = start; for ( ; ; str++) { if (str >= limit) --- 480,486 ---- case 'L': { const unsigned char *start = ++(*ptr); ! const unsigned char *str = start; for ( ; ; str++) { if (str >= limit) *************** parse_signature_type (ptr, limit) *** 524,532 **** Return a gcc type node. */ tree ! parse_signature_string (sig_string, sig_length) ! const unsigned char *sig_string; ! int sig_length; { tree result_type; const unsigned char *str = sig_string; --- 503,509 ---- Return a gcc type node. */ tree ! parse_signature_string (const unsigned char *sig_string, int sig_length) { tree result_type; const unsigned char *str = sig_string; *************** get_type_from_signature (tree signature) *** 579,586 **** /* Ignore signature and always return null. Used by has_method. */ static tree ! build_null_signature (type) ! tree type ATTRIBUTE_UNUSED; { return NULL_TREE; } --- 556,562 ---- /* Ignore signature and always return null. Used by has_method. */ static tree ! build_null_signature (tree type ATTRIBUTE_UNUSED) { return NULL_TREE; } *************** build_null_signature (type) *** 588,595 **** /* Return the signature string for the arguments of method type TYPE. */ tree ! build_java_argument_signature (type) ! tree type; { extern struct obstack temporary_obstack; tree sig = TYPE_ARGUMENT_SIGNATURE (type); --- 564,570 ---- /* Return the signature string for the arguments of method type TYPE. */ tree ! build_java_argument_signature (tree type) { extern struct obstack temporary_obstack; tree sig = TYPE_ARGUMENT_SIGNATURE (type); *************** build_java_argument_signature (type) *** 616,623 **** /* Return the signature of the given TYPE. */ tree ! build_java_signature (type) ! tree type; { tree sig, t; while (TREE_CODE (type) == POINTER_TYPE) --- 591,597 ---- /* Return the signature of the given TYPE. */ tree ! build_java_signature (tree type) { tree sig, t; while (TREE_CODE (type) == POINTER_TYPE) *************** build_java_signature (type) *** 697,705 **** /* Save signature string SIG (an IDENTIFIER_NODE) in TYPE for future use. */ void ! set_java_signature (type, sig) ! tree type; ! tree sig; { tree old_sig; while (TREE_CODE (type) == POINTER_TYPE) --- 671,677 ---- /* Save signature string SIG (an IDENTIFIER_NODE) in TYPE for future use. */ void ! set_java_signature (tree type, tree sig) { tree old_sig; while (TREE_CODE (type) == POINTER_TYPE) *************** set_java_signature (type, sig) *** 715,856 **** #endif } ! /* Search in class SEARCHED_CLASS (and its superclasses) for a method ! matching METHOD_NAME and signature SIGNATURE. If SEARCHED_INTERFACE is ! not NULL_TREE then first search its superinterfaces for a similar match. ! Return the matched method DECL or NULL_TREE. SIGNATURE_BUILDER is ! used on method candidates to build their (sometimes partial) ! signature. */ ! tree ! lookup_argument_method (searched_class, method_name, method_signature) ! tree searched_class, method_name, method_signature; { ! return lookup_do (searched_class, NULL_TREE, method_name, method_signature, build_java_argument_signature); } ! /* Search in class SEARCHED_CLASS (and its superclasses and ! implemented interfaces) for a method matching METHOD_NAME and ! argument signature METHOD_SIGNATURE. Return a FUNCTION_DECL on ! success, or NULL_TREE if none found. (Contrast lookup_java_method, ! which takes into account return type.) */ ! tree ! lookup_argument_method2 (searched_class, method_name, method_signature) ! tree searched_class, method_name, method_signature; { ! return lookup_do (CLASSTYPE_SUPER (searched_class), searched_class, method_name, method_signature, build_java_argument_signature); } /* Search in class SEARCHED_CLASS (and its superclasses) for a method matching METHOD_NAME and signature METHOD_SIGNATURE. Return a FUNCTION_DECL on success, or NULL_TREE if none found. (Contrast ! lookup_argument_method, which ignores return type.) If SEARCHED_CLASS is an interface, search it too. */ - tree ! lookup_java_method (searched_class, method_name, method_signature) ! tree searched_class, method_name, method_signature; { ! tree searched_interface; ! ! /* If this class is an interface class, search its superinterfaces ! * first. A superinterface is not an interface's superclass: a super ! * interface is implemented by the interface. */ ! ! searched_interface = (CLASS_INTERFACE (TYPE_NAME (searched_class)) ? ! searched_class : NULL_TREE); ! return lookup_do (searched_class, searched_interface, method_name, method_signature, build_java_signature); } ! /* Return true iff CLASS (or its ancestors) has a method METHOD_NAME. */ ! int ! has_method (class, method_name) ! tree class; ! tree method_name; { ! return lookup_do (class, class, method_name, ! NULL_TREE, build_null_signature) != NULL_TREE; } ! /* Search in class SEARCHED_CLASS (and its superclasses) for a method ! matching METHOD_NAME and signature SIGNATURE. Also search in ! SEARCHED_INTERFACE (and its superinterfaces) for a similar match. ! Return the matched method DECL or NULL_TREE. SIGNATURE_BUILDER is ! used on method candidates to build their (sometimes partial) ! signature. */ ! static tree ! lookup_do (searched_class, searched_interface, method_name, signature, signature_builder) ! tree searched_class, searched_interface, method_name, signature; ! tree (*signature_builder) PARAMS ((tree)); { tree method; ! ! if (searched_interface) { ! int i; ! int interface_len = ! TREE_VEC_LENGTH (TYPE_BINFO_BASETYPES (searched_interface)) - 1; ! ! for (i = interface_len; i > 0; i--) ! { ! tree child = ! TREE_VEC_ELT (TYPE_BINFO_BASETYPES (searched_interface), i); ! tree iclass = BINFO_TYPE (child); ! /* If the superinterface hasn't been loaded yet, do so now. */ ! if (CLASS_FROM_SOURCE_P (iclass)) ! safe_layout_class (iclass); ! else if (!CLASS_LOADED_P (iclass)) ! load_class (iclass, 1); ! for (method = TYPE_METHODS (iclass); ! method != NULL_TREE; method = TREE_CHAIN (method)) ! { ! tree method_sig = (*signature_builder) (TREE_TYPE (method)); ! if (DECL_NAME (method) == method_name && method_sig == signature) ! return method; ! } ! /* it could be defined in a supersuperinterface */ ! if (CLASS_INTERFACE (TYPE_NAME (iclass))) ! { ! method = lookup_do (iclass, iclass, method_name, ! signature, signature_builder); ! if (method != NULL_TREE) ! return method; ! } ! } } ! while (searched_class != NULL_TREE) { - for (method = TYPE_METHODS (searched_class); - method != NULL_TREE; method = TREE_CHAIN (method)) - { - tree method_sig = (*signature_builder) (TREE_TYPE (method)); - if (DECL_NAME (method) == method_name && method_sig == signature) - return method; - } searched_class = CLASSTYPE_SUPER (searched_class); } ! return NULL_TREE; } /* Search in class CLAS for a constructor matching METHOD_SIGNATURE. Return a FUNCTION_DECL on success, or NULL_TREE if none found. */ tree ! lookup_java_constructor (clas, method_signature) ! tree clas, method_signature; { tree method = TYPE_METHODS (clas); for ( ; method != NULL_TREE; method = TREE_CHAIN (method)) --- 687,885 ---- #endif } ! /* Search in SEARCHED_CLASS and its superclasses for a method matching ! METHOD_NAME and signature METHOD_SIGNATURE. This function will ! only search for methods declared in the class hierarchy; interfaces ! will not be considered. Returns NULL_TREE if the method is not ! found. */ tree ! lookup_argument_method (tree searched_class, tree method_name, ! tree method_signature) { ! return lookup_do (searched_class, 0, ! method_name, method_signature, build_java_argument_signature); } ! /* Like lookup_argument_method, but lets the caller set any flags ! desired. */ tree ! lookup_argument_method_generic (tree searched_class, tree method_name, ! tree method_signature, int flags) { ! return lookup_do (searched_class, flags, method_name, method_signature, build_java_argument_signature); } + /* Search in class SEARCHED_CLASS (and its superclasses) for a method matching METHOD_NAME and signature METHOD_SIGNATURE. Return a FUNCTION_DECL on success, or NULL_TREE if none found. (Contrast ! lookup_argument_method, which ignores return type.) If SEARCHED_CLASS is an interface, search it too. */ tree ! lookup_java_method (tree searched_class, tree method_name, ! tree method_signature) { ! return lookup_do (searched_class, SEARCH_INTERFACE, method_name, method_signature, build_java_signature); } ! /* Return true iff CLASS (or its ancestors) has a method METHOD_NAME.  */ int ! has_method (tree class, tree method_name) { ! return lookup_do (class, SEARCH_INTERFACE, ! method_name, NULL_TREE, ! build_null_signature) != NULL_TREE; } ! /* Search in class SEARCHED_CLASS, but not its superclasses, for a ! method matching METHOD_NAME and signature SIGNATURE. A private ! helper for lookup_do. */ static tree ! shallow_find_method (tree searched_class, int flags, tree method_name, ! tree signature, tree (*signature_builder) (tree)) { tree method; ! for (method = TYPE_METHODS (searched_class); ! method != NULL_TREE; method = TREE_CHAIN (method)) { ! tree method_sig = (*signature_builder) (TREE_TYPE (method)); ! if (DECL_NAME (method) == method_name && method_sig == signature) ! { ! /* If the caller requires a visible method, then we ! skip invisible methods here. */ ! if (! (flags & SEARCH_VISIBLE) ! || ! METHOD_INVISIBLE (method)) ! return method; ! } ! } ! return NULL_TREE; ! } ! /* Search in the superclasses of SEARCHED_CLASS for a method matching ! METHOD_NAME and signature SIGNATURE. A private helper for ! lookup_do. */ ! static tree ! find_method_in_superclasses (tree searched_class, int flags, ! tree method_name, ! tree signature, tree (*signature_builder) (tree)) ! { ! tree klass; ! for (klass = CLASSTYPE_SUPER (searched_class); klass != NULL_TREE; ! klass = CLASSTYPE_SUPER (klass)) ! { ! tree method; ! method = shallow_find_method (klass, flags, method_name, ! signature, signature_builder); ! if (method != NULL_TREE) ! return method; ! } ! return NULL_TREE; ! } ! /* Search in the interfaces of SEARCHED_CLASS and its superinterfaces ! for a method matching METHOD_NAME and signature SIGNATURE. A ! private helper for lookup_do. */ ! static tree ! find_method_in_interfaces (tree searched_class, int flags, tree method_name, ! tree signature, tree (*signature_builder) (tree)) ! { ! int i; ! int interface_len = ! TREE_VEC_LENGTH (TYPE_BINFO_BASETYPES (searched_class)) - 1; ! for (i = interface_len; i > 0; i--) ! { ! tree child = ! TREE_VEC_ELT (TYPE_BINFO_BASETYPES (searched_class), i); ! tree iclass = BINFO_TYPE (child); ! tree method; ! ! /* If the superinterface hasn't been loaded yet, do so now. */ ! if (CLASS_FROM_SOURCE_P (iclass)) ! safe_layout_class (iclass); ! else if (!CLASS_LOADED_P (iclass)) ! load_class (iclass, 1); ! ! /* First, we look in ICLASS. If that doesn't work we'll ! recursively look through all its superinterfaces. */ ! method = shallow_find_method (iclass, flags, method_name, ! signature, signature_builder); ! if (method != NULL_TREE) ! return method; ! ! method = find_method_in_interfaces ! (iclass, flags, method_name, signature, signature_builder); ! if (method != NULL_TREE) ! return method; } + + return NULL_TREE; + } ! ! /* Search in class SEARCHED_CLASS (and its superclasses) for a method ! matching METHOD_NAME and signature SIGNATURE. FLAGS control some ! parameters of the search. ! ! SEARCH_INTERFACE means also search interfaces and superinterfaces ! of SEARCHED_CLASS. ! ! SEARCH_SUPER means skip SEARCHED_CLASS and start with its ! superclass. ! ! SEARCH_VISIBLE means skip methods for which METHOD_INVISIBLE is ! set. ! ! Return the matched method DECL or NULL_TREE. SIGNATURE_BUILDER is ! used on method candidates to build their (sometimes partial) ! signature. */ ! static tree ! lookup_do (tree searched_class, int flags, tree method_name, ! tree signature, tree (*signature_builder) (tree)) ! { ! tree method; ! ! if (searched_class == NULL_TREE) ! return NULL_TREE; ! ! if (flags & SEARCH_SUPER) { searched_class = CLASSTYPE_SUPER (searched_class); + if (searched_class == NULL_TREE) + return NULL_TREE; } ! /* First look in our own methods. */ ! method = shallow_find_method (searched_class, flags, method_name, ! signature, signature_builder); ! if (method) ! return method; ! ! /* Then look in our superclasses. */ ! if (! CLASS_INTERFACE (TYPE_NAME (searched_class))) ! method = find_method_in_superclasses (searched_class, flags, method_name, ! signature, signature_builder); ! if (method) ! return method; ! ! /* If that doesn't work, look in our interfaces. */ ! if (flags & SEARCH_INTERFACE) ! method = find_method_in_interfaces (searched_class, flags, method_name, ! signature, signature_builder); ! ! return method; } /* Search in class CLAS for a constructor matching METHOD_SIGNATURE. Return a FUNCTION_DECL on success, or NULL_TREE if none found. */ tree ! lookup_java_constructor (tree clas, tree method_signature) { tree method = TYPE_METHODS (clas); for ( ; method != NULL_TREE; method = TREE_CHAIN (method)) *************** lookup_java_constructor (clas, method_si *** 867,877 **** Promotion. It assumes that both T1 and T2 are eligible to BNP. */ tree ! binary_numeric_promotion (t1, t2, exp1, exp2) ! tree t1; ! tree t2; ! tree *exp1; ! tree *exp2; { if (t1 == double_type_node || t2 == double_type_node) { --- 896,902 ---- Promotion. It assumes that both T1 and T2 are eligible to BNP. */ tree ! binary_numeric_promotion (tree t1, tree t2, tree *exp1, tree *exp2) { if (t1 == double_type_node || t2 == double_type_node) { diff -Nrc3pad gcc-3.3.3/gcc/java/verify.c gcc-3.4.0/gcc/java/verify.c *** gcc-3.3.3/gcc/java/verify.c 2002-11-18 15:46:34.000000000 +0000 --- gcc-3.4.0/gcc/java/verify.c 2003-12-20 15:38:28.000000000 +0000 *************** *** 1,21 **** /* Handle verification of bytecoded methods for the GNU compiler for the Java(TM) language. ! Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,22 ---- /* Handle verification of bytecoded methods for the GNU compiler for the Java(TM) language. ! Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 ! Free Software Foundation, Inc. ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 25,30 **** --- 26,33 ---- #include "config.h" #include "system.h" + #include "coretypes.h" + #include "tm.h" #include "tree.h" #include "java-tree.h" #include "javaop.h" *************** The Free Software Foundation is independ *** 33,44 **** #include "java-except.h" #include "toplev.h" ! static void push_pending_label PARAMS ((tree)); ! static tree merge_types PARAMS ((tree, tree)); ! static const char *check_pending_block PARAMS ((tree)); ! static void type_stack_dup PARAMS ((int, int)); ! static int start_pc_cmp PARAMS ((const PTR, const PTR)); ! static char *pop_argument_types PARAMS ((tree)); extern int stack_pointer; --- 36,47 ---- #include "java-except.h" #include "toplev.h" ! static void push_pending_label (tree); ! static tree merge_types (tree, tree); ! static const char *check_pending_block (tree); ! static void type_stack_dup (int, int); ! static int start_pc_cmp (const void *, const void *); ! static char *pop_argument_types (tree); extern int stack_pointer; *************** tree pending_blocks; *** 53,60 **** /* Append TARGET_LABEL to the pending_block stack unless already in it. */ static void ! push_pending_label (target_label) ! tree target_label; { if (! LABEL_CHANGED (target_label)) { --- 56,62 ---- /* Append TARGET_LABEL to the pending_block stack unless already in it. */ static void ! push_pending_label (tree target_label) { if (! LABEL_CHANGED (target_label)) { *************** push_pending_label (target_label) *** 69,76 **** Return NULL on success, or an error message on failure. */ static const char * ! check_pending_block (target_label) ! tree target_label; { int changed = merge_type_state (target_label); --- 71,77 ---- Return NULL on success, or an error message on failure. */ static const char * ! check_pending_block (tree target_label) { int changed = merge_type_state (target_label); *************** subroutine_nesting (tree label) *** 126,133 **** Return TYPE_UNKNOWN if the types cannot be merged. */ static tree ! merge_types (type1, type2) ! tree type1, type2; { if (type1 == type2) return type1; --- 127,133 ---- Return TYPE_UNKNOWN if the types cannot be merged. */ static tree ! merge_types (tree type1, tree type2) { if (type1 == type2) return type1; *************** merge_types (type1, type2) *** 242,249 **** 0 if there was no change, and 1 if there was a change. */ int ! merge_type_state (label) ! tree label; { int nlocals = DECL_MAX_LOCALS (current_function_decl); int cur_length = stack_pointer + nlocals; --- 242,248 ---- 0 if there was no change, and 1 if there was a change. */ int ! merge_type_state (tree label) { int nlocals = DECL_MAX_LOCALS (current_function_decl); int cur_length = stack_pointer + nlocals; *************** merge_type_state (label) *** 305,312 **** /* Handle dup-like operations. */ static void ! type_stack_dup (size, offset) ! int size, offset; { tree type[4]; int index; --- 304,310 ---- /* Handle dup-like operations. */ static void ! type_stack_dup (int size, int offset) { tree type[4]; int index; *************** struct pc_index *** 347,355 **** /* A helper that is used when sorting exception ranges. */ static int ! start_pc_cmp (xp, yp) ! const PTR xp; ! const PTR yp; { const struct pc_index *x = (const struct pc_index *) xp; const struct pc_index *y = (const struct pc_index *) yp; --- 345,351 ---- /* A helper that is used when sorting exception ranges. */ static int ! start_pc_cmp (const void *xp, const void *yp) { const struct pc_index *x = (const struct pc_index *) xp; const struct pc_index *y = (const struct pc_index *) yp; *************** start_pc_cmp (xp, yp) *** 367,379 **** #define VERIFICATION_ERROR_WITH_INDEX(MESSAGE) \ do { message = MESSAGE; goto error_with_index; } while (0) ! /* Recursive helper function to pop argument types during verifiation. ARG_TYPES is the list of formal parameter types. Return NULL on success and a freshly malloc'd error message on failure. */ static char * ! pop_argument_types (arg_types) ! tree arg_types; { if (arg_types == end_params_node) return NULL; --- 363,374 ---- #define VERIFICATION_ERROR_WITH_INDEX(MESSAGE) \ do { message = MESSAGE; goto error_with_index; } while (0) ! /* Recursive helper function to pop argument types during verification. ARG_TYPES is the list of formal parameter types. Return NULL on success and a freshly malloc'd error message on failure. */ static char * ! pop_argument_types (tree arg_types) { if (arg_types == end_params_node) return NULL; *************** pop_argument_types (arg_types) *** 416,425 **** /* Verify the bytecodes of the current method. Return 1 on success, 0 on failure. */ int ! verify_jvm_instructions (jcf, byte_ops, length) ! JCF* jcf; ! const unsigned char *byte_ops; ! long length; { tree label; int wide = 0; --- 411,417 ---- /* Verify the bytecodes of the current method. Return 1 on success, 0 on failure. */ int ! verify_jvm_instructions (JCF* jcf, const unsigned char *byte_ops, long length) { tree label; int wide = 0; *************** verify_jvm_instructions (jcf, byte_ops, *** 431,437 **** char *pmessage; int i; int index; ! register unsigned char *p; struct eh_range *prev_eh_ranges = NULL_EH_RANGE; struct eh_range *eh_ranges; tree return_type = TREE_TYPE (TREE_TYPE (current_function_decl)); --- 423,429 ---- char *pmessage; int i; int index; ! unsigned char *p; struct eh_range *prev_eh_ranges = NULL_EH_RANGE; struct eh_range *eh_ranges; tree return_type = TREE_TYPE (TREE_TYPE (current_function_decl)); *************** verify_jvm_instructions (jcf, byte_ops, *** 481,489 **** return 0; } - if (handler_pc >= start_pc && handler_pc < end_pc) - warning ("exception handler inside code that is being protected"); - add_handler (start_pc, end_pc, lookup_label (handler_pc), catch_type == 0 ? NULL_TREE --- 473,478 ---- *************** verify_jvm_instructions (jcf, byte_ops, *** 721,727 **** prev_eh_ranges = NULL_EH_RANGE; /* Allocate decl and rtx for this variable now, so if we're not ! optmizing, we get a temporary that survives the whole method. */ find_local_variable (index, type, oldpc); if (TYPE_IS_WIDE (type)) --- 710,716 ---- prev_eh_ranges = NULL_EH_RANGE; /* Allocate decl and rtx for this variable now, so if we're not ! optimizing, we get a temporary that survives the whole method. */ find_local_variable (index, type, oldpc); if (TYPE_IS_WIDE (type)) diff -Nrc3pad gcc-3.3.3/gcc/java/win32-host.c gcc-3.4.0/gcc/java/win32-host.c *** gcc-3.3.3/gcc/java/win32-host.c 2003-04-10 14:54:08.000000000 +0000 --- gcc-3.4.0/gcc/java/win32-host.c 2003-08-13 07:08:29.000000000 +0000 *************** *** 1,18 **** /* Platform-Specific Win32 Functions Copyright (C) 2003 Free Software Foundation, Inc. ! This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,20 ---- /* Platform-Specific Win32 Functions Copyright (C) 2003 Free Software Foundation, Inc. ! This file is part of GCC. ! ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 27,34 **** #include "config.h" #include "system.h" - #include "jcf.h" - #define WIN32_LEAN_AND_MEAN #include #undef WIN32_LEAN_AND_MEAN --- 29,34 ---- diff -Nrc3pad gcc-3.3.3/gcc/java/xref.c gcc-3.4.0/gcc/java/xref.c *** gcc-3.3.3/gcc/java/xref.c 2002-08-05 18:46:37.000000000 +0000 --- gcc-3.4.0/gcc/java/xref.c 2003-01-12 02:14:56.000000000 +0000 *************** *** 1,22 **** /* Write cross reference information extracted from Java(TM) source and bytecode files, in one of formats documented below. ! Copyright (C) 1999, 2000 Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,22 ---- /* Write cross reference information extracted from Java(TM) source and bytecode files, in one of formats documented below. ! Copyright (C) 1999, 2000, 2002, 2003 Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 26,31 **** --- 26,33 ---- #include "config.h" #include "system.h" + #include "coretypes.h" + #include "tm.h" #include "tree.h" #include "java-tree.h" #include "xref.h" *************** static xref_flag_table xref_table [] = { *** 39,46 **** /* Decode an xref flag value. Return 0 if the flag wasn't found. */ int ! xref_flag_value (flag) ! const char *flag; { int i; for (i = 0; xref_table [i].key; i++) --- 41,47 ---- /* Decode an xref flag value. Return 0 if the flag wasn't found. */ int ! xref_flag_value (const char *flag) { int i; for (i = 0; xref_table [i].key; i++) *************** xref_flag_value (flag) *** 50,72 **** } void ! xref_set_data (flag, data) ! int flag; ! void *data; { xref_table [flag-1].data = data; } void * ! xref_get_data (flag) ! int flag; { return xref_table [flag-1].data; } void ! xref_set_current_fp (fp) ! FILE *fp; { xref_table [flag_emit_xref-1].fp = fp; } --- 51,69 ---- } void ! xref_set_data (int flag, void *data) { xref_table [flag-1].data = data; } void * ! xref_get_data (int flag) { return xref_table [flag-1].data; } void ! xref_set_current_fp (FILE *fp) { xref_table [flag_emit_xref-1].fp = fp; } *************** xref_set_current_fp (fp) *** 74,85 **** /* Branch to the right xref "back-end". */ void ! expand_xref (node) ! tree node; { /* Maintain these two cached. */ static FILE *fp = NULL; ! static void (*current_expand) PARAMS ((FILE *, tree)) = NULL; if ( !flag_emit_xref ) return; --- 71,81 ---- /* Branch to the right xref "back-end". */ void ! expand_xref (tree node) { /* Maintain these two cached. */ static FILE *fp = NULL; ! static void (*current_expand) (FILE *, tree) = NULL; if ( !flag_emit_xref ) return; diff -Nrc3pad gcc-3.3.3/gcc/java/xref.h gcc-3.4.0/gcc/java/xref.h *** gcc-3.3.3/gcc/java/xref.h 2000-01-21 20:57:00.000000000 +0000 --- gcc-3.4.0/gcc/java/xref.h 2003-01-09 23:16:56.000000000 +0000 *************** *** 1,21 **** /* Definitions for the cross reference backend xref.c ! Copyright (C) 1999, 2000 Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) ! This file is part of GNU CC. ! GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,21 ---- /* Definitions for the cross reference backend xref.c ! Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** of Sun Microsystems, Inc. in the United *** 24,34 **** The Free Software Foundation is independent of Sun Microsystems, Inc. */ /* Exported functions. */ ! int xref_flag_value PARAMS ((const char *)); ! void expand_xref PARAMS ((tree)); ! void xref_set_data PARAMS ((int, void *)); ! void *xref_get_data PARAMS ((int)); ! void xref_set_current_fp PARAMS ((FILE *)); /* flag_emit_xref range of possible values. */ --- 24,34 ---- The Free Software Foundation is independent of Sun Microsystems, Inc. */ /* Exported functions. */ ! int xref_flag_value (const char *); ! void expand_xref (tree); ! void xref_set_data (int, void *); ! void *xref_get_data (int); ! void xref_set_current_fp (FILE *); /* flag_emit_xref range of possible values. */ *************** enum { *** 40,46 **** typedef struct { char *key; /* Activator in -fxref= */ ! void (*expand) PARAMS ((FILE *, tree)); /* Function to write xrefs out */ FILE *fp; /* fp to use during the call. */ void *data; /* Placeholder for additional data */ } xref_flag_table; --- 40,46 ---- typedef struct { char *key; /* Activator in -fxref= */ ! void (*expand) (FILE *, tree); /* Function to write xrefs out */ FILE *fp; /* fp to use during the call. */ void *data; /* Placeholder for additional data */ } xref_flag_table; diff -Nrc3pad gcc-3.3.3/gcc/java/zextract.c gcc-3.4.0/gcc/java/zextract.c *** gcc-3.3.3/gcc/java/zextract.c 2001-01-29 08:43:46.000000000 +0000 --- gcc-3.4.0/gcc/java/zextract.c 2003-01-12 02:14:56.000000000 +0000 *************** *** 1,21 **** /* Handle a .class file embedded in a .zip archive. This extracts a member from a .zip file, but does not handle uncompression (since that is not needed for classes.zip). ! Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. ! This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,23 ---- /* Handle a .class file embedded in a .zip archive. This extracts a member from a .zip file, but does not handle uncompression (since that is not needed for classes.zip). + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003 + Free Software Foundation, Inc. ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** The Free Software Foundation is independ *** 27,32 **** --- 29,36 ---- #include "config.h" #include "system.h" + #include "coretypes.h" + #include "tm.h" #include "zipfile.h" /* This stuff is partly based on the 28 August 1994 public release of the *************** typedef unsigned long ulg; /* pred *** 210,225 **** /* Prototypes */ /***********************/ ! static ush makeword PARAMS ((const uch *)); ! static ulg makelong PARAMS ((const uch *)); ! static long find_zip_file_start PARAMS ((int fd, long offset)); /***********************/ /* Function makeword() */ /***********************/ ! static ush makeword(b) ! const uch *b; { /* * Convert Intel style 'short' integer to non-Intel non-16-bit --- 214,228 ---- /* Prototypes */ /***********************/ ! static ush makeword (const uch *); ! static ulg makelong (const uch *); ! static long find_zip_file_start (int fd, long offset); /***********************/ /* Function makeword() */ /***********************/ ! static ush makeword(const uch *b) { /* * Convert Intel style 'short' integer to non-Intel non-16-bit *************** static ush makeword(b) *** 233,240 **** /* Function makelong() */ /***********************/ ! static ulg makelong(sig) ! const uch *sig; { /* * Convert intel style 'long' variable to non-Intel non-16-bit --- 236,242 ---- /* Function makelong() */ /***********************/ ! static ulg makelong(const uch *sig) { /* * Convert intel style 'long' variable to non-Intel non-16-bit *************** static ulg makelong(sig) *** 250,258 **** start of the actual data. Return -1 on error. OFFSET is the offset from the beginning of the zip file of the file's header. */ static long ! find_zip_file_start (fd, offset) ! int fd; ! long offset; { int filename_length, extra_field_length; unsigned char buffer[LREC_SIZE + 4]; --- 252,258 ---- start of the actual data. Return -1 on error. OFFSET is the offset from the beginning of the zip file of the file's header. */ static long ! find_zip_file_start (int fd, long offset) { int filename_length, extra_field_length; unsigned char buffer[LREC_SIZE + 4]; *************** find_zip_file_start (fd, offset) *** 273,280 **** } int ! read_zip_archive (zipf) ! register ZipFile *zipf; { int i; int dir_last_pad; --- 273,279 ---- } int ! read_zip_archive (ZipFile *zipf) { int i; int dir_last_pad; *************** read_zip_archive (zipf) *** 352,358 **** } #ifdef TEST ! main () { ZipFile zipf[1]; ZipDirectory *zipd; --- 351,357 ---- } #ifdef TEST ! main (void) { ZipFile zipf[1]; ZipDirectory *zipd; diff -Nrc3pad gcc-3.3.3/gcc/java/zipfile.h gcc-3.4.0/gcc/java/zipfile.h *** gcc-3.3.3/gcc/java/zipfile.h 2001-06-23 16:22:20.000000000 +0000 --- gcc-3.4.0/gcc/java/zipfile.h 2003-01-09 23:16:56.000000000 +0000 *************** *** 1,19 **** /* Definitions for using a zipped' archive. ! Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. ! This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- 1,21 ---- /* Definitions for using a zipped' archive. + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003 + Free Software Foundation, Inc. ! This file is part of GCC. ! GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License ! along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************** extern struct ZipFile *SeenZipFiles; *** 58,67 **** ((ZipDirectory*)((char*)(ZIPD)+(ZIPD)->direntry_size)) #define ZIPMAGIC 0x504b0304 ! extern ZipFile * opendir_in_zip PARAMS ((const char *, int)); ! extern int read_zip_archive PARAMS ((ZipFile *)); #ifdef GCC_JCF_H ! extern int read_zip_member PARAMS ((JCF*, ZipDirectory*, ZipFile *)); ! extern int open_in_zip PARAMS ((struct JCF *, const char *, ! const char *, int)); #endif --- 60,68 ---- ((ZipDirectory*)((char*)(ZIPD)+(ZIPD)->direntry_size)) #define ZIPMAGIC 0x504b0304 ! extern ZipFile * opendir_in_zip (const char *, int); ! extern int read_zip_archive (ZipFile *); #ifdef GCC_JCF_H ! extern int read_zip_member (JCF*, ZipDirectory*, ZipFile *); ! extern int open_in_zip (struct JCF *, const char *, const char *, int); #endif diff -Nrc3pad gcc-3.3.3/libffi/acconfig.h gcc-3.4.0/libffi/acconfig.h *** gcc-3.3.3/libffi/acconfig.h 1999-09-01 23:16:33.000000000 +0000 --- gcc-3.4.0/libffi/acconfig.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,12 **** - /* Define this if you want extra debugging */ - #undef FFI_DEBUG - - /* Define this if you are using Purify and want to suppress - spurious messages. */ - #undef USING_PURIFY - - /* Define this is you do not want support for aggregate types. */ - #undef FFI_NO_STRUCTS - - /* Define this is you do not want support for the raw API. */ - #undef FFI_NO_RAW_API --- 0 ---- diff -Nrc3pad gcc-3.3.3/libffi/acinclude.m4 gcc-3.4.0/libffi/acinclude.m4 *** gcc-3.3.3/libffi/acinclude.m4 2000-09-10 07:43:14.000000000 +0000 --- gcc-3.4.0/libffi/acinclude.m4 2003-11-21 11:24:08.000000000 +0000 *************** dnl AC_PROG_LIBTOOL into aclocal.m4, whi *** 4,8 **** --- 4,100 ---- dnl to add a definition of LIBTOOL to Makefile.in. ifelse(yes,no,[ AC_DEFUN([AC_PROG_LIBTOOL],) + AC_DEFUN([AM_PROG_LIBTOOL],) AC_SUBST(LIBTOOL) ]) + + # mmap(2) blacklisting. Some platforms provide the mmap library routine + # but don't support all of the features we need from it. + AC_DEFUN([AC_FUNC_MMAP_BLACKLIST], + [if test $ac_cv_header_sys_mman_h != yes \ + || test $ac_cv_func_mmap != yes; then + ac_cv_func_mmap_file=no + ac_cv_func_mmap_dev_zero=no + ac_cv_func_mmap_anon=no + else + AC_CACHE_CHECK([whether read-only mmap of a plain file works], + ac_cv_func_mmap_file, + [# Add a system to this blacklist if + # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a + # memory area containing the same data that you'd get if you applied + # read() to the same fd. The only system known to have a problem here + # is VMS, where text files have record structure. + case "$host_os" in + vms* | ultrix*) + ac_cv_func_mmap_file=no ;; + *) + ac_cv_func_mmap_file=yes;; + esac]) + AC_CACHE_CHECK([whether mmap from /dev/zero works], + ac_cv_func_mmap_dev_zero, + [# Add a system to this blacklist if it has mmap() but /dev/zero + # does not exist, or if mmapping /dev/zero does not give anonymous + # zeroed pages with both the following properties: + # 1. If you map N consecutive pages in with one call, and then + # unmap any subset of those pages, the pages that were not + # explicitly unmapped remain accessible. + # 2. If you map two adjacent blocks of memory and then unmap them + # both at once, they must both go away. + # Systems known to be in this category are Windows (all variants), + # VMS, and Darwin. + case "$host_os" in + vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00) + ac_cv_func_mmap_dev_zero=no ;; + *) + ac_cv_func_mmap_dev_zero=yes;; + esac]) + + # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. + AC_CACHE_CHECK([for MAP_ANON(YMOUS)], ac_cv_decl_map_anon, + [AC_TRY_COMPILE( + [#include + #include + #include + + #ifndef MAP_ANONYMOUS + #define MAP_ANONYMOUS MAP_ANON + #endif + ], + [int n = MAP_ANONYMOUS;], + ac_cv_decl_map_anon=yes, + ac_cv_decl_map_anon=no)]) + + if test $ac_cv_decl_map_anon = no; then + ac_cv_func_mmap_anon=no + else + AC_CACHE_CHECK([whether mmap with MAP_ANON(YMOUS) works], + ac_cv_func_mmap_anon, + [# Add a system to this blacklist if it has mmap() and MAP_ANON or + # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) + # doesn't give anonymous zeroed pages with the same properties listed + # above for use of /dev/zero. + # Systems known to be in this category are Windows, VMS, and SCO Unix. + case "$host_os" in + vms* | cygwin* | pe | mingw* | sco* | udk* ) + ac_cv_func_mmap_anon=no ;; + *) + ac_cv_func_mmap_anon=yes;; + esac]) + fi + fi + + if test $ac_cv_func_mmap_file = yes; then + AC_DEFINE(HAVE_MMAP_FILE, 1, + [Define if read-only mmap of a plain file works.]) + fi + if test $ac_cv_func_mmap_dev_zero = yes; then + AC_DEFINE(HAVE_MMAP_DEV_ZERO, 1, + [Define if mmap of /dev/zero works.]) + fi + if test $ac_cv_func_mmap_anon = yes; then + AC_DEFINE(HAVE_MMAP_ANON, 1, + [Define if mmap with MAP_ANON(YMOUS) works.]) + fi + ]) + + sinclude(../config/accross.m4) diff -Nrc3pad gcc-3.3.3/libffi/aclocal.m4 gcc-3.4.0/libffi/aclocal.m4 *** gcc-3.3.3/libffi/aclocal.m4 2002-01-31 22:25:31.000000000 +0000 --- gcc-3.4.0/libffi/aclocal.m4 2003-11-21 11:24:08.000000000 +0000 *************** dnl AC_PROG_LIBTOOL into aclocal.m4, whi *** 16,120 **** dnl to add a definition of LIBTOOL to Makefile.in. ifelse(yes,no,[ AC_DEFUN([AC_PROG_LIBTOOL],) AC_SUBST(LIBTOOL) ]) ! AC_DEFUN([AC_COMPILE_CHECK_SIZEOF], ! [changequote(<<, >>)dnl ! dnl The name to #define. ! define(<>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl ! dnl The cache variable name. ! define(<>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl ! changequote([, ])dnl ! AC_MSG_CHECKING(size of $1) ! AC_CACHE_VAL(AC_CV_NAME, ! [for ac_size in 4 8 1 2 16 12 $2 ; do # List sizes in rough order of prevalence. ! AC_TRY_COMPILE([#include "confdefs.h" ! #include ! $2 ! ], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size) ! if test x$AC_CV_NAME != x ; then break; fi ! done ! ]) ! if test x$AC_CV_NAME = x ; then ! AC_MSG_ERROR([cannot determine a size for $1]) fi - AC_MSG_RESULT($AC_CV_NAME) - AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1]) - undefine([AC_TYPE_NAME])dnl - undefine([AC_CV_NAME])dnl - ]) ! AC_DEFUN([AC_C_BIGENDIAN_CROSS], ! [AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian, ! [ac_cv_c_bigendian=unknown ! # See if sys/param.h defines the BYTE_ORDER macro. ! AC_TRY_COMPILE([#include ! #include ], [ ! #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN ! bogus endian macros ! #endif], [# It does; now see whether it defined to BIG_ENDIAN or not. ! AC_TRY_COMPILE([#include ! #include ], [ ! #if BYTE_ORDER != BIG_ENDIAN ! not big endian ! #endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)]) ! if test $ac_cv_c_bigendian = unknown; then ! AC_TRY_RUN([main () { ! /* Are we little or big endian? From Harbison&Steele. */ ! union ! { ! long l; ! char c[sizeof (long)]; ! } u; ! u.l = 1; ! exit (u.c[sizeof (long) - 1] == 1); ! }], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes, ! [ echo $ac_n "cross-compiling... " 2>&AC_FD_MSG ]) ! fi]) ! if test $ac_cv_c_bigendian = unknown; then ! AC_MSG_CHECKING(to probe for byte ordering) ! [ ! cat >conftest.c <&AC_FD_MSG ! ac_cv_c_bigendian=yes ! fi ! if test `grep -l LiTTleEnDian conftest.o` ; then ! echo $ac_n ' little endian probe OK, ' 1>&AC_FD_MSG ! if test $ac_cv_c_bigendian = yes ; then ! ac_cv_c_bigendian=unknown; ! else ! ac_cv_c_bigendian=no ! fi ! fi ! echo $ac_n 'guessing bigendian ... ' >&AC_FD_MSG ! fi ! fi ! AC_MSG_RESULT($ac_cv_c_bigendian) fi ! if test $ac_cv_c_bigendian = yes; then ! AC_DEFINE(WORDS_BIGENDIAN, 1, [whether byteorder is bigendian]) ! BYTEORDER=4321 ! else ! BYTEORDER=1234 fi ! AC_DEFINE_UNQUOTED(BYTEORDER, $BYTEORDER, [1234 = LIL_ENDIAN, 4321 = BIGENDIAN]) ! if test $ac_cv_c_bigendian = unknown; then ! AC_MSG_ERROR(unknown endianess - sorry, please pre-set ac_cv_c_bigendian) fi ]) # Like AC_CONFIG_HEADER, but automatically create stamp file. AC_DEFUN(AM_CONFIG_HEADER, --- 16,116 ---- dnl to add a definition of LIBTOOL to Makefile.in. ifelse(yes,no,[ AC_DEFUN([AC_PROG_LIBTOOL],) + AC_DEFUN([AM_PROG_LIBTOOL],) AC_SUBST(LIBTOOL) ]) ! # mmap(2) blacklisting. Some platforms provide the mmap library routine ! # but don't support all of the features we need from it. ! AC_DEFUN([AC_FUNC_MMAP_BLACKLIST], ! [if test $ac_cv_header_sys_mman_h != yes \ ! || test $ac_cv_func_mmap != yes; then ! ac_cv_func_mmap_file=no ! ac_cv_func_mmap_dev_zero=no ! ac_cv_func_mmap_anon=no ! else ! AC_CACHE_CHECK([whether read-only mmap of a plain file works], ! ac_cv_func_mmap_file, ! [# Add a system to this blacklist if ! # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a ! # memory area containing the same data that you'd get if you applied ! # read() to the same fd. The only system known to have a problem here ! # is VMS, where text files have record structure. ! case "$host_os" in ! vms* | ultrix*) ! ac_cv_func_mmap_file=no ;; ! *) ! ac_cv_func_mmap_file=yes;; ! esac]) ! AC_CACHE_CHECK([whether mmap from /dev/zero works], ! ac_cv_func_mmap_dev_zero, ! [# Add a system to this blacklist if it has mmap() but /dev/zero ! # does not exist, or if mmapping /dev/zero does not give anonymous ! # zeroed pages with both the following properties: ! # 1. If you map N consecutive pages in with one call, and then ! # unmap any subset of those pages, the pages that were not ! # explicitly unmapped remain accessible. ! # 2. If you map two adjacent blocks of memory and then unmap them ! # both at once, they must both go away. ! # Systems known to be in this category are Windows (all variants), ! # VMS, and Darwin. ! case "$host_os" in ! vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00) ! ac_cv_func_mmap_dev_zero=no ;; ! *) ! ac_cv_func_mmap_dev_zero=yes;; ! esac]) ! ! # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. ! AC_CACHE_CHECK([for MAP_ANON(YMOUS)], ac_cv_decl_map_anon, ! [AC_TRY_COMPILE( ! [#include ! #include ! #include ! ! #ifndef MAP_ANONYMOUS ! #define MAP_ANONYMOUS MAP_ANON ! #endif ! ], ! [int n = MAP_ANONYMOUS;], ! ac_cv_decl_map_anon=yes, ! ac_cv_decl_map_anon=no)]) ! ! if test $ac_cv_decl_map_anon = no; then ! ac_cv_func_mmap_anon=no ! else ! AC_CACHE_CHECK([whether mmap with MAP_ANON(YMOUS) works], ! ac_cv_func_mmap_anon, ! [# Add a system to this blacklist if it has mmap() and MAP_ANON or ! # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) ! # doesn't give anonymous zeroed pages with the same properties listed ! # above for use of /dev/zero. ! # Systems known to be in this category are Windows, VMS, and SCO Unix. ! case "$host_os" in ! vms* | cygwin* | pe | mingw* | sco* | udk* ) ! ac_cv_func_mmap_anon=no ;; ! *) ! ac_cv_func_mmap_anon=yes;; ! esac]) ! fi fi ! if test $ac_cv_func_mmap_file = yes; then ! AC_DEFINE(HAVE_MMAP_FILE, 1, ! [Define if read-only mmap of a plain file works.]) fi ! if test $ac_cv_func_mmap_dev_zero = yes; then ! AC_DEFINE(HAVE_MMAP_DEV_ZERO, 1, ! [Define if mmap of /dev/zero works.]) fi ! if test $ac_cv_func_mmap_anon = yes; then ! AC_DEFINE(HAVE_MMAP_ANON, 1, ! [Define if mmap with MAP_ANON(YMOUS) works.]) fi ]) + sinclude(../config/accross.m4) + # Like AC_CONFIG_HEADER, but automatically create stamp file. AC_DEFUN(AM_CONFIG_HEADER, diff -Nrc3pad gcc-3.3.3/libffi/ChangeLog gcc-3.4.0/libffi/ChangeLog *** gcc-3.3.3/libffi/ChangeLog 2004-02-14 20:19:51.000000000 +0000 --- gcc-3.4.0/libffi/ChangeLog 2004-04-19 01:59:29.000000000 +0000 *************** *** 1,44 **** ! 2004-02-14 Release Manager ! * GCC 3.3.3 Released. ! 2003-10-16 Release Manager ! * GCC 3.3.2 Released. 2003-09-09 Alan Modra * configure: Regenerate. ! 2003-08-08 Kean Johnston ! * configure.in: Add support for sco3.2v5.0* ! * configure: Regenerated ! 2003-08-04 Release Manager ! * GCC 3.3.1 Released. ! 2003-08-04 Release Manager ! * GCC 3.3.1 Released. 2003-07-11 Gerald Pfeifer * README: Note that libffi is not part of GCC. Update the project URL and status. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. 2003-05-07 Jeff Sturm --- 1,636 ---- ! 2004-04-18 Release Manager ! * GCC 3.4.0 released. ! 2004-03-12 Alan Modra ! * src/powerpc/ffi.c (ffi_prep_args64): Correct long double handling. ! (ffi_prep_cif_machdep ): Correct long double function ! return and long double arg handling. ! (ffi_closure_helper_LINUX64): Formatting. Delete unused "ng" var. ! Use "end_pfr" instead of "nf". Correct long double handling. ! Localise "temp". ! * src/powerpc/linux64.S (ffi_call_LINUX64): Save f2 long double ! return value. ! * src/powerpc/linux64_closure.S (ffi_closure_LINUX64): Allocate ! space for long double return value. Adjust stack frame and offsets. ! Load f2 long double return. ! * testsuite/libffi.call/cls_align_longdouble.c: Pass -mlong-double-128 ! for powerpc64-*-*. ! * testsuite/libffi.call/float.c: Likewise. ! * testsuite/libffi.call/float2.c: Likewise. ! ! * src/types.c: Use 16 byte long double for POWERPC64. ! (pointer): POWERPC64 has 8 byte pointers. ! ! 2004-01-25 Eric Botcazou ! ! * src/sparc/ffi.c (ffi_prep_args_v9): Shift the parameter array ! when the structure return address is passed in %o0. ! (ffi_V9_return_struct): Rename into ffi_v9_layout_struct. ! (ffi_v9_layout_struct): Align the field following a nested structure ! on a word boundary. Use memmove instead of memcpy. ! (ffi_call): Update call to ffi_V9_return_struct. ! (ffi_prep_closure): Define 'ctx' only for V8. ! (ffi_closure_sparc_inner): Clone into ffi_closure_sparc_inner_v8 ! and ffi_closure_sparc_inner_v9. ! (ffi_closure_sparc_inner_v8): Return long doubles by reference. ! Always skip the structure return address. For structures and long ! doubles, copy the argument directly. ! (ffi_closure_sparc_inner_v9): Skip the structure return address only ! if required. Shift the maximum floating-point slot accordingly. For ! big structures, copy the argument directly; otherwise, left-justify the ! argument and call ffi_v9_layout_struct to lay out the structure on ! the stack. ! * src/sparc/v8.S: Undef STACKFRAME before defining it. ! (ffi_closure_v8): Pass the structure return address. Update call to ! ffi_closure_sparc_inner_v8. Short-circuit FFI_TYPE_INT handling. ! Skip the 'unimp' insn when returning long doubles and structures. ! * src/sparc/v9.S: Undef STACKFRAME before defining it. ! (ffi_closure_v9): Increase the frame size by 2 words. Short-circuit ! FFI_TYPE_INT handling. Load structures both in integers and ! floating-point registers on return. ! * README: Update status of the SPARC port. ! ! 2004-01-24 Andreas Tobler ! ! * testsuite/libffi.call/pyobjc-tc.c (main): Treat result value ! as of type ffi_arg. ! * testsuite/libffi.call/struct3.c (main): Fix CHECK. ! ! 2004-01-22 Ulrich Weigand ! ! * testsuite/libffi.call/cls_uint.c (cls_ret_uint_fn): Treat result ! value as of type ffi_arg, not unsigned int. ! ! 2004-01-12 Andreas Tobler ! ! * testsuite/lib/libffi-dg.exp: Set LD_LIBRARY_PATH_32 for ! Solaris. ! ! 2004-01-08 Rainer Orth ! ! * testsuite/libffi.call/ffitest.h (allocate_mmap): Cast MAP_FAILED ! to void *. ! ! 2003-12-10 Richard Henderson ! ! * testsuite/libffi.call/cls_align_pointer.c: Cast pointers to ! size_t instead of int. ! ! 2003-12-04 Hosaka Yuji ! ! * testsuite/libffi.call/many_win32.c: Include . ! * testsuite/libffi.call/many_win32.c (main): Replace variable ! int i with unsigned long ul. ! ! * testsuite/libffi.call/cls_align_uint64.c: New test case. ! * testsuite/libffi.call/cls_align_sint64.c: Likewise. ! * testsuite/libffi.call/cls_align_uint32.c: Likewise. ! * testsuite/libffi.call/cls_align_sint32.c: Likewise. ! * testsuite/libffi.call/cls_align_uint16.c: Likewise. ! * testsuite/libffi.call/cls_align_sint16.c: Likewise. ! * testsuite/libffi.call/cls_align_float.c: Likewise. ! * testsuite/libffi.call/cls_align_double.c: Likewise. ! * testsuite/libffi.call/cls_align_longdouble.c: Likewise. ! * testsuite/libffi.call/cls_align_pointer.c: Likewise. ! ! 2003-12-02 Hosaka Yuji ! ! PR other/13221 ! * src/x86/ffi.c (ffi_prep_args, ffi_prep_incoming_args_SYSV): ! Align arguments to 32 bits. ! ! 2003-12-01 Andreas Tobler ! ! PR other/13221 ! * testsuite/libffi.call/cls_multi_sshort.c: New test case. ! * testsuite/libffi.call/cls_multi_sshortchar.c: Likewise. ! * testsuite/libffi.call/cls_multi_uchar.c: Likewise. ! * testsuite/libffi.call/cls_multi_schar.c: Likewise. ! * testsuite/libffi.call/cls_multi_ushortchar.c: Likewise. ! * testsuite/libffi.call/cls_multi_ushort.c: Likewise. ! ! * testsuite/libffi.special/unwindtest.cc: Cosmetics. ! ! 2003-11-26 Kaveh R. Ghazi ! ! * testsuite/libffi.call/ffitest.h: Include . ! * testsuite/libffi.special/ffitestcxx.h: Likewise. ! ! 2003-11-22 Andreas Tobler ! ! * Makefile.in: Rebuilt. ! * configure: Likewise. ! * testsuite/libffi.special/unwindtest.cc: Convert the mmap to ! the right type. ! ! 2003-11-21 Andreas Jaeger ! Andreas Tobler ! ! * acinclude.m4: Add AC_FUNC_MMAP_BLACKLIST. ! * configure.in: Call AC_FUNC_MMAP_BLACKLIST. ! * Makefile.in: Rebuilt. ! * aclocal.m4: Likewise. ! * configure: Likewise. ! * fficonfig.h.in: Likewise. ! * testsuite/lib/libffi-dg.exp: Add include dir. ! * testsuite/libffi.call/ffitest.h: Add MMAP definitions. ! * testsuite/libffi.special/ffitestcxx.h: Likewise. ! * testsuite/libffi.call/closure_fn0.c: Use MMAP functionality ! for ffi_closure if available. ! * testsuite/libffi.call/closure_fn1.c: Likewise. ! * testsuite/libffi.call/closure_fn2.c: Likewise. ! * testsuite/libffi.call/closure_fn3.c: Likewise. ! * testsuite/libffi.call/closure_fn4.c: Likewise. ! * testsuite/libffi.call/closure_fn5.c: Likewise. ! * testsuite/libffi.call/cls_12byte.c: Likewise. ! * testsuite/libffi.call/cls_16byte.c: Likewise. ! * testsuite/libffi.call/cls_18byte.c: Likewise. ! * testsuite/libffi.call/cls_19byte.c: Likewise. ! * testsuite/libffi.call/cls_1_1byte.c: Likewise. ! * testsuite/libffi.call/cls_20byte.c: Likewise. ! * testsuite/libffi.call/cls_20byte1.c: Likewise. ! * testsuite/libffi.call/cls_24byte.c: Likewise. ! * testsuite/libffi.call/cls_2byte.c: Likewise. ! * testsuite/libffi.call/cls_3_1byte.c: Likewise. ! * testsuite/libffi.call/cls_3byte1.c: Likewise. ! * testsuite/libffi.call/cls_3byte2.c: Likewise. ! * testsuite/libffi.call/cls_4_1byte.c: Likewise. ! * testsuite/libffi.call/cls_4byte.c: Likewise. ! * testsuite/libffi.call/cls_5byte.c: Likewise. ! * testsuite/libffi.call/cls_64byte.c: Likewise. ! * testsuite/libffi.call/cls_6byte.c: Likewise. ! * testsuite/libffi.call/cls_7byte.c: Likewise. ! * testsuite/libffi.call/cls_8byte.c: Likewise. ! * testsuite/libffi.call/cls_9byte1.c: Likewise. ! * testsuite/libffi.call/cls_9byte2.c: Likewise. ! * testsuite/libffi.call/cls_double.c: Likewise. ! * testsuite/libffi.call/cls_float.c: Likewise. ! * testsuite/libffi.call/cls_schar.c: Likewise. ! * testsuite/libffi.call/cls_sint.c: Likewise. ! * testsuite/libffi.call/cls_sshort.c: Likewise. ! * testsuite/libffi.call/cls_uchar.c: Likewise. ! * testsuite/libffi.call/cls_uint.c: Likewise. ! * testsuite/libffi.call/cls_ulonglong.c: Likewise. ! * testsuite/libffi.call/cls_ushort.c: Likewise. ! * testsuite/libffi.call/nested_struct.c: Likewise. ! * testsuite/libffi.call/nested_struct1.c: Likewise. ! * testsuite/libffi.call/nested_struct2.c: Likewise. ! * testsuite/libffi.call/nested_struct3.c: Likewise. ! * testsuite/libffi.call/problem1.c: Likewise. ! * testsuite/libffi.special/unwindtest.cc: Likewise. ! ! 2003-11-20 Andreas Tobler ! ! * testsuite/lib/libffi-dg.exp: Make the -lgcc_s conditional. ! ! 2003-11-19 Andreas Tobler ! ! * testsuite/lib/libffi-dg.exp: Add DYLD_LIBRARY_PATH for darwin. ! Add -lgcc_s to additional flags. ! ! 2003-11-12 Andreas Tobler ! ! * configure.in, include/Makefile.am: PR libgcj/11147, install ! the ffitarget.h header file in a gcc versioned and target ! dependent place. ! * configure: Regenerated. ! * Makefile.in, include/Makefile.in: Likewise. ! * testsuite/Makefile.in: Likewise. ! ! 2003-11-09 Andreas Tobler ! ! * testsuite/libffi.call/closure_fn0.c: Print result and check ! with dg-output to make debugging easier. ! * testsuite/libffi.call/closure_fn1.c: Likewise. ! * testsuite/libffi.call/closure_fn2.c: Likewise. ! * testsuite/libffi.call/closure_fn3.c: Likewise. ! * testsuite/libffi.call/closure_fn4.c: Likewise. ! * testsuite/libffi.call/closure_fn5.c: Likewise. ! * testsuite/libffi.call/cls_12byte.c: Likewise. ! * testsuite/libffi.call/cls_16byte.c: Likewise. ! * testsuite/libffi.call/cls_18byte.c: Likewise. ! * testsuite/libffi.call/cls_19byte.c: Likewise. ! * testsuite/libffi.call/cls_1_1byte.c: Likewise. ! * testsuite/libffi.call/cls_20byte.c: Likewise. ! * testsuite/libffi.call/cls_20byte1.c: Likewise. ! * testsuite/libffi.call/cls_24byte.c: Likewise. ! * testsuite/libffi.call/cls_2byte.c: Likewise. ! * testsuite/libffi.call/cls_3_1byte.c: Likewise. ! * testsuite/libffi.call/cls_3byte1.c: Likewise. ! * testsuite/libffi.call/cls_3byte2.c: Likewise. ! * testsuite/libffi.call/cls_4_1byte.c: Likewise. ! * testsuite/libffi.call/cls_4byte.c: Likewise. ! * testsuite/libffi.call/cls_5byte.c: Likewise. ! * testsuite/libffi.call/cls_64byte.c: Likewise. ! * testsuite/libffi.call/cls_6byte.c: Likewise. ! * testsuite/libffi.call/cls_7byte.c: Likewise. ! * testsuite/libffi.call/cls_8byte.c: Likewise. ! * testsuite/libffi.call/cls_9byte1.c: Likewise. ! * testsuite/libffi.call/cls_9byte2.c: Likewise. ! * testsuite/libffi.call/cls_double.c: Likewise. ! * testsuite/libffi.call/cls_float.c: Likewise. ! * testsuite/libffi.call/cls_schar.c: Likewise. ! * testsuite/libffi.call/cls_sint.c: Likewise. ! * testsuite/libffi.call/cls_sshort.c: Likewise. ! * testsuite/libffi.call/cls_uchar.c: Likewise. ! * testsuite/libffi.call/cls_uint.c: Likewise. ! * testsuite/libffi.call/cls_ulonglong.c: Likewise. ! * testsuite/libffi.call/cls_ushort.c: Likewise. ! * testsuite/libffi.call/problem1.c: Likewise. ! ! * testsuite/libffi.special/unwindtest.cc: Make ffi_closure ! static. ! ! 2003-11-08 Andreas Tobler ! ! * testsuite/libffi.call/cls_9byte2.c: New test case. ! * testsuite/libffi.call/cls_9byte1.c: Likewise. ! * testsuite/libffi.call/cls_64byte.c: Likewise. ! * testsuite/libffi.call/cls_20byte1.c: Likewise. ! * testsuite/libffi.call/cls_19byte.c: Likewise. ! * testsuite/libffi.call/cls_18byte.c: Likewise. ! * testsuite/libffi.call/closure_fn4.c: Likewise. ! * testsuite/libffi.call/closure_fn5.c: Likewise. ! * testsuite/libffi.call/cls_schar.c: Likewise. ! * testsuite/libffi.call/cls_sint.c: Likewise. ! * testsuite/libffi.call/cls_sshort.c: Likewise. ! * testsuite/libffi.call/nested_struct2.c: Likewise. ! * testsuite/libffi.call/nested_struct3.c: Likewise. ! ! 2003-11-08 Andreas Tobler ! ! * testsuite/libffi.call/cls_double.c: Do a check on the result. ! * testsuite/libffi.call/cls_uchar.c: Likewise. ! * testsuite/libffi.call/cls_uint.c: Likewise. ! * testsuite/libffi.call/cls_ulonglong.c: Likewise. ! * testsuite/libffi.call/cls_ushort.c: Likewise. ! * testsuite/libffi.call/return_sc.c: Cleanup whitespaces. ! ! 2003-11-06 Andreas Tobler ! ! * src/prep_cif.c (ffi_prep_cif): Move the validity check after ! the initialization. ! ! 2003-10-23 Andreas Tobler ! ! * src/java_raw_api.c (ffi_java_ptrarray_to_raw): Replace ! FFI_ASSERT(FALSE) with FFI_ASSERT(0). ! ! 2003-10-22 David Daney ! ! * src/mips/ffitarget.h: Replace undefined UINT32 and friends with ! __attribute__((__mode__(__SI__))) and friends. ! ! 2003-10-22 Andreas Schwab ! ! * src/ia64/ffi.c: Replace FALSE/TRUE with false/true. ! ! 2003-10-21 Andreas Tobler ! ! * configure.in: AC_LINK_FILES(ffitarget.h). ! * configure: Regenerate. ! * Makefile.in: Likewise. ! * include/Makefile.in: Likewise. ! * testsuite/Makefile.in: Likewise. ! * fficonfig.h.in: Likewise. ! ! 2003-10-21 Paolo Bonzini ! Richard Henderson ! ! Avoid that ffi.h includes fficonfig.h. ! ! * Makefile.am (EXTRA_DIST): Include ffitarget.h files ! (TARGET_SRC_MIPS_GCC): Renamed to TARGET_SRC_MIPS_IRIX. ! (TARGET_SRC_MIPS_SGI): Removed. ! (MIPS_GCC): Renamed to TARGET_SRC_MIPS_IRIX. ! (MIPS_SGI): Removed. ! (CLEANFILES): Removed. ! (mostlyclean-am, clean-am, mostlyclean-sub, clean-sub): New ! targets. ! * acconfig.h: Removed. ! * configure.in: Compute sizeofs only for double and long double. ! Use them to define and subst HAVE_LONG_DOUBLE. Include comments ! into AC_DEFINE instead of using acconfig.h. Create ! include/ffitarget.h instead of include/fficonfig.h. Rename ! MIPS_GCC to MIPS_IRIX, drop MIPS_SGI since we are in gcc's tree. ! AC_DEFINE EH_FRAME_FLAGS. ! * include/Makefile.am (DISTCLEANFILES): New automake macro. ! (hack_DATA): Add ffitarget.h. ! * include/ffi.h.in: Remove all system specific definitions. ! Declare raw API even if it is not installed, why bother? ! Use limits.h instead of SIZEOF_* to define ffi_type_*. Do ! not define EH_FRAME_FLAGS, it is in fficonfig.h now. Include ! ffitarget.h instead of fficonfig.h. Remove ALIGN macro. ! (UINT_ARG, INT_ARG): Removed, use ffi_arg and ffi_sarg instead. ! * include/ffi_common.h (bool): Do not define. ! (ffi_assert): Accept failed assertion. ! (ffi_type_test): Return void and accept file/line. ! (FFI_ASSERT): Pass stringized failed assertion. ! (FFI_ASSERT_AT): New macro. ! (FFI_ASSERT_VALID_TYPE): New macro. ! (UINT8, SINT8, UINT16, SINT16, UINT32, SINT32, ! UINT64, SINT64): Define here with gcc's __attribute__ macro ! instead of in ffi.h ! (FLOAT32, ALIGN): Define here instead of in ffi.h ! * include/ffi-mips.h: Removed. Its content moved to ! src/mips/ffitarget.h after separating assembly and C sections. ! * src/alpha/ffi.c, src/alpha/ffi.c, src/java_raw_api.c ! src/prep_cif.c, src/raw_api.c, src/ia64/ffi.c, ! src/mips/ffi.c, src/mips/n32.S, src/mips/o32.S, ! src/mips/ffitarget.h, src/sparc/ffi.c, src/x86/ffi64.c: ! SIZEOF_ARG -> FFI_SIZEOF_ARG. ! * src/ia64/ffi.c: Include stdbool.h (provided by GCC 2.95+). ! * src/debug.c (ffi_assert): Accept stringized failed assertion. ! (ffi_type_test): Rewritten. ! * src/prep-cif.c (initialize_aggregate, ffi_prep_cif): Call ! FFI_ASSERT_VALID_TYPE. ! * src/alpha/ffitarget.h, src/arm/ffitarget.h, ! src/ia64/ffitarget.h, src/m68k/ffitarget.h, ! src/mips/ffitarget.h, src/powerpc/ffitarget.h, ! src/s390/ffitarget.h, src/sh/ffitarget.h, ! src/sh64/ffitarget.h, src/sparc/ffitarget.h, ! src/x86/ffitarget.h: New files. ! * src/alpha/osf.S, src/arm/sysv.S, src/ia64/unix.S, ! src/m68k/sysv.S, src/mips/n32.S, src/mips/o32.S, ! src/powerpc/aix.S, src/powerpc/darwin.S, ! src/powerpc/ffi_darwin.c, src/powerpc/linux64.S, ! src/powerpc/linux64_closure.S, src/powerpc/ppc_closure.S, ! src/powerpc/sysv.S, src/s390/sysv.S, src/sh/sysv.S, ! src/sh64/sysv.S, src/sparc/v8.S, src/sparc/v9.S, ! src/x86/sysv.S, src/x86/unix64.S, src/x86/win32.S: ! include fficonfig.h ! ! 2003-10-20 Rainer Orth ! ! * src/mips/ffi.c: Use _ABIN32, _ABIO32 instead of external ! _MIPS_SIM_NABI32, _MIPS_SIM_ABI32. ! ! 2003-10-19 Andreas Tobler ! ! * src/powerpc/ffi_darwin.c (ffi_prep_args): Declare bytes again. ! Used when FFI_DEBUG = 1. ! ! 2003-10-14 Alan Modra ! ! * src/types.c (double, longdouble): Default POWERPC64 to 8 byte size ! and align. ! ! 2003-10-06 Rainer Orth ! ! * include/ffi_mips.h: Define FFI_MIPS_N32 for N32/N64 ABIs, ! FFI_MIPS_O32 for O32 ABI. ! ! 2003-10-01 Andreas Tobler ! ! * testsuite/lib/libffi-dg.exp: Set LD_LIBRARY_PATH_64 for ! SPARC64. Cleanup whitespaces. ! ! 2003-09-19 Andreas Tobler ! ! * testsuite/libffi.call/closure_fn0.c: Xfail mips, arm, ! strongarm, xscale. Cleanup whitespaces. ! * testsuite/libffi.call/closure_fn1.c: Likewise. ! * testsuite/libffi.call/closure_fn2.c: Likewise. ! * testsuite/libffi.call/closure_fn3.c: Likewise. ! * testsuite/libffi.call/cls_12byte.c: Likewise. ! * testsuite/libffi.call/cls_16byte.c: Likewise. ! * testsuite/libffi.call/cls_1_1byte.c: Likewise. ! * testsuite/libffi.call/cls_20byte.c: Likewise. ! * testsuite/libffi.call/cls_24byte.c: Likewise. ! * testsuite/libffi.call/cls_2byte.c: Likewise. ! * testsuite/libffi.call/cls_3_1byte.c: Likewise. ! * testsuite/libffi.call/cls_3byte1.c: Likewise. ! * testsuite/libffi.call/cls_3byte2.c: Likewise. ! * testsuite/libffi.call/cls_4_1byte.c: Likewise. ! * testsuite/libffi.call/cls_4byte.c: Likewise. ! * testsuite/libffi.call/cls_5byte.c: Likewise. ! * testsuite/libffi.call/cls_6byte.c: Likewise. ! * testsuite/libffi.call/cls_7byte.c: Likewise. ! * testsuite/libffi.call/cls_8byte.c: Likewise. ! * testsuite/libffi.call/cls_double.c: Likewise. ! * testsuite/libffi.call/cls_float.c: Likewise. ! * testsuite/libffi.call/cls_uchar.c: Likewise. ! * testsuite/libffi.call/cls_uint.c: Likewise. ! * testsuite/libffi.call/cls_ulonglong.c: Likewise. ! * testsuite/libffi.call/cls_ushort.c: Likewise. ! * testsuite/libffi.call/nested_struct.c: Likewise. ! * testsuite/libffi.call/nested_struct1.c: Likewise. ! * testsuite/libffi.call/problem1.c: Likewise. ! * testsuite/libffi.special/unwindtest.cc: Likewise. ! * testsuite/libffi.call/pyobjc-tc.c: Cleanup whitespaces. ! ! 2003-09-18 David Edelsohn ! ! * src/powerpc/aix.S: Cleanup whitespaces. ! * src/powerpc/aix_closure.S: Likewise. ! ! 2003-09-18 Andreas Tobler ! ! * src/powerpc/darwin.S: Cleanup whitespaces, comment formatting. ! * src/powerpc/darwin_closure.S: Likewise. ! * src/powerpc/ffi_darwin.c: Likewise. ! ! 2003-09-18 Andreas Tobler ! David Edelsohn ! ! * src/types.c (double): Add AIX and Darwin to the right TYPEDEF. ! * src/powerpc/aix_closure.S: Remove the pointer to the outgoing ! parameter stack. ! * src/powerpc/darwin_closure.S: Likewise. ! * src/powerpc/ffi_darwin.c (ffi_prep_args): Handle structures ! according to the Darwin/AIX ABI. ! (ffi_prep_cif_machdep): Likewise. ! (ffi_closure_helper_DARWIN): Likewise. ! Remove the outgoing parameter stack logic. Simplify the evaluation ! of the different CASE types. ! (ffi_prep_clousure): Avoid the casts on lvalues. Change the branch ! statement in the trampoline code. ! ! 2003-09-18 Kaz Kojima ! ! * src/sh/ffi.c (ffi_prep_args): Take account into the alignement ! for the register size. ! (ffi_closure_helper_SYSV): Handle the structure return value ! address correctly. ! (ffi_closure_helper_SYSV): Return the appropriate type when ! the registers are used for the structure return value. ! * src/sh/sysv.S (ffi_closure_SYSV): Fix the stack layout for ! the 64-bit return value. Update copyright years. ! ! 2003-09-17 Rainer Orth ! ! * testsuite/lib/libffi-dg.exp (libffi_target_compile): Search in ! srcdir for ffi_mips.h. ! ! 2003-09-12 Alan Modra ! ! * src/prep_cif.c (initialize_aggregate): Include tail padding in ! structure size. ! * src/powerpc/linux64_closure.S (ffi_closure_LINUX64): Correct ! placement of float result. ! * testsuite/libffi.special/unwindtest.cc (closure_test_fn1): Correct ! cast of "resp" for big-endian 64 bit machines. + 2003-09-11 Alan Modra + + * src/types.c (double, longdouble): Merge identical SH and ARM + typedefs, and add POWERPC64. + * src/powerpc/ffi.c (ffi_prep_args64): Correct next_arg calc for + struct split over gpr and rest. + (ffi_prep_cif_machdep): Correct intarg_count for structures. + * src/powerpc/linux64.S (ffi_call_LINUX64): Fix gpr offsets. + + 2003-09-09 Andreas Tobler + + * src/powerpc/ffi.c (ffi_closure_helper_SYSV) Handle struct + passing correctly. + 2003-09-09 Alan Modra * configure: Regenerate. ! 2003-09-04 Andreas Tobler ! * Makefile.am: Remove build rules for ffitest. ! * Makefile.in: Rebuilt. ! ! 2003-09-04 Andreas Tobler ! * src/java_raw_api.c: Include to fix compiler warning ! about implicit declaration of abort(). ! 2003-09-04 Andreas Tobler ! * Makefile.am: Add dejagnu test framework. Fixes PR other/11411. ! * Makefile.in: Rebuilt. ! * configure.in: Add dejagnu test framework. ! * configure: Rebuilt. ! * testsuite/Makefile.am: New file. ! * testsuite/Makefile.in: Built ! * testsuite/lib/libffi-dg.exp: New file. ! * testsuite/config/default.exp: Likewise. ! * testsuite/libffi.call/call.exp: Likewise. ! * testsuite/libffi.call/ffitest.h: Likewise. ! * testsuite/libffi.call/closure_fn0.c: Likewise. ! * testsuite/libffi.call/closure_fn1.c: Likewise. ! * testsuite/libffi.call/closure_fn2.c: Likewise. ! * testsuite/libffi.call/closure_fn3.c: Likewise. ! * testsuite/libffi.call/cls_1_1byte.c: Likewise. ! * testsuite/libffi.call/cls_3_1byte.c: Likewise. ! * testsuite/libffi.call/cls_4_1byte.c: Likewise. ! * testsuite/libffi.call/cls_2byte.c: Likewise. ! * testsuite/libffi.call/cls_3byte1.c: Likewise. ! * testsuite/libffi.call/cls_3byte2.c: Likewise. ! * testsuite/libffi.call/cls_4byte.c: Likewise. ! * testsuite/libffi.call/cls_5byte.c: Likewise. ! * testsuite/libffi.call/cls_6byte.c: Likewise. ! * testsuite/libffi.call/cls_7byte.c: Likewise. ! * testsuite/libffi.call/cls_8byte.c: Likewise. ! * testsuite/libffi.call/cls_12byte.c: Likewise. ! * testsuite/libffi.call/cls_16byte.c: Likewise. ! * testsuite/libffi.call/cls_20byte.c: Likewise. ! * testsuite/libffi.call/cls_24byte.c: Likewise. ! * testsuite/libffi.call/cls_double.c: Likewise. ! * testsuite/libffi.call/cls_float.c: Likewise. ! * testsuite/libffi.call/cls_uchar.c: Likewise. ! * testsuite/libffi.call/cls_uint.c: Likewise. ! * testsuite/libffi.call/cls_ulonglong.c: Likewise. ! * testsuite/libffi.call/cls_ushort.c: Likewise. ! * testsuite/libffi.call/float.c: Likewise. ! * testsuite/libffi.call/float1.c: Likewise. ! * testsuite/libffi.call/float2.c: Likewise. ! * testsuite/libffi.call/many.c: Likewise. ! * testsuite/libffi.call/many_win32.c: Likewise. ! * testsuite/libffi.call/nested_struct.c: Likewise. ! * testsuite/libffi.call/nested_struct1.c: Likewise. ! * testsuite/libffi.call/pyobjc-tc.c: Likewise. ! * testsuite/libffi.call/problem1.c: Likewise. ! * testsuite/libffi.call/promotion.c: Likewise. ! * testsuite/libffi.call/return_ll.c: Likewise. ! * testsuite/libffi.call/return_sc.c: Likewise. ! * testsuite/libffi.call/return_uc.c: Likewise. ! * testsuite/libffi.call/strlen.c: Likewise. ! * testsuite/libffi.call/strlen_win32.c: Likewise. ! * testsuite/libffi.call/struct1.c: Likewise. ! * testsuite/libffi.call/struct2.c: Likewise. ! * testsuite/libffi.call/struct3.c: Likewise. ! * testsuite/libffi.call/struct4.c: Likewise. ! * testsuite/libffi.call/struct5.c: Likewise. ! * testsuite/libffi.call/struct6.c: Likewise. ! * testsuite/libffi.call/struct7.c: Likewise. ! * testsuite/libffi.call/struct8.c: Likewise. ! * testsuite/libffi.call/struct9.c: Likewise. ! * testsuite/libffi.special/special.exp: New file. ! * testsuite/libffi.special/ffitestcxx.h: Likewise. ! * testsuite/libffi.special/unwindtest.cc: Likewise. ! ! ! 2003-08-13 Kaz Kojima ! ! * src/sh/ffi.c (OFS_INT16): Set 0 for little endian case. Update ! copyright years. ! ! 2003-08-02 Alan Modra ! ! * src/powerpc/ffi.c (ffi_prep_args64): Modify for changed gcc ! structure passing. ! (ffi_closure_helper_LINUX64): Likewise. ! * src/powerpc/linux64.S: Remove code writing to parm save area. ! * src/powerpc/linux64_closure.S (ffi_closure_LINUX64): Use return ! address in lr from ffi_closure_helper_LINUX64 call to calculate ! table address. Optimize function tail. ! ! 2003-07-28 Andreas Tobler ! ! * src/sparc/ffi.c: Handle all floating point registers. ! * src/sparc/v9.S: Likewise. Fixes second part of PR target/11410. 2003-07-11 Gerald Pfeifer * README: Note that libffi is not part of GCC. Update the project URL and status. ! 2003-06-19 Franz Sirl ! * src/powerpc/ppc_closure.S: Include ffi.h. ! 2003-06-13 Rainer Orth ! * src/x86/sysv.S: Avoid gas-only .uleb128/.sleb128 directives. ! Use C style comments. ! 2003-06-13 Kaz Kojima ! * Makefile.am: Add SHmedia support. Fix a typo of SH support. ! * Makefile.in: Regenerate. ! * configure.in (sh64-*-linux*, sh5*-*-linux*): Add target. ! * configure: Regenerate. ! * include/ffi.h.in: Add SHmedia support. ! * src/sh64/ffi.c: New file. ! * src/sh64/sysv.S: New file. ! ! 2003-05-16 Jakub Jelinek ! ! * configure.in (HAVE_RO_EH_FRAME): Check whether .eh_frame section ! should be read-only. ! * configure: Rebuilt. ! * fficonfig.h.in: Rebuilt. ! * include/ffi.h.in (EH_FRAME_FLAGS): Define. ! * src/alpha/osf.S: Use EH_FRAME_FLAGS. ! * src/powerpc/linux64.S: Likewise. ! * src/powerpc/linux64_closure.S: Likewise. Include ffi.h. ! * src/powerpc/sysv.S: Use EH_FRAME_FLAGS. Use pcrel encoding ! if -fpic/-fPIC/-mrelocatable. ! * src/powerpc/powerpc_closure.S: Likewise. ! * src/sparc/v8.S: If HAVE_RO_EH_FRAME is defined, don't include ! #write in .eh_frame flags. ! * src/sparc/v9.S: Likewise. ! * src/x86/unix64.S: Use EH_FRAME_FLAGS. ! * src/x86/sysv.S: Likewise. Use pcrel encoding if -fpic/-fPIC. ! * src/s390/sysv.S: Use EH_FRAME_FLAGS. Include ffi.h. 2003-05-07 Jeff Sturm *************** *** 49,59 **** * fficonfig.h.in: Rebuilt. * configure: Rebuilt. 2003-04-04 Loren J. Rittle * include/Makefile.in: Regenerate. ! 2003-03-22 Zdenek Dvorak * libffi/include/ffi.h.in: Define X86 instead of X86_64 in 32 bit mode. --- 641,695 ---- * fficonfig.h.in: Rebuilt. * configure: Rebuilt. + 2003-04-18 Jakub Jelinek + + * include/ffi.h.in (POWERPC64): Define if 64-bit. + (enum ffi_abi): Add FFI_LINUX64 on POWERPC. + Make it the default on POWERPC64. + (FFI_TRAMPOLINE_SIZE): Define to 24 on POWERPC64. + * configure.in: Change powerpc-*-linux* into powerpc*-*-linux*. + * configure: Rebuilt. + * src/powerpc/ffi.c (hidden): Define. + (ffi_prep_args_SYSV): Renamed from + ffi_prep_args. Cast pointers to unsigned long to shut up warnings. + (NUM_GPR_ARG_REGISTERS64, NUM_FPR_ARG_REGISTERS64, + ASM_NEEDS_REGISTERS64): New. + (ffi_prep_args64): New function. + (ffi_prep_cif_machdep): Handle FFI_LINUX64 ABI. + (ffi_call): Likewise. + (ffi_prep_closure): Likewise. + (flush_icache): Surround by #ifndef POWERPC64. + (ffi_dblfl): New union type. + (ffi_closure_helper_SYSV): Use it to avoid aliasing problems. + (ffi_closure_helper_LINUX64): New function. + * src/powerpc/ppc_closure.S: Surround whole file by #ifndef + __powerpc64__. + * src/powerpc/sysv.S: Likewise. + (ffi_call_SYSV): Rename ffi_prep_args to ffi_prep_args_SYSV. + * src/powerpc/linux64.S: New file. + * src/powerpc/linux64_closure.S: New file. + * Makefile.am (EXTRA_DIST): Add src/powerpc/linux64.S and + src/powerpc/linux64_closure.S. + (TARGET_SRC_POWERPC): Likewise. + + * src/ffitest.c (closure_test_fn, closure_test_fn1, closure_test_fn2, + closure_test_fn3): Fix result printing on big-endian 64-bit + machines. + (main): Print tst2_arg instead of uninitialized tst2_result. + + * src/ffitest.c (main): Hide what closure pointer really points to + from the compiler. + + 2003-04-16 Richard Earnshaw + + * configure.in (arm-*-netbsdelf*): Add configuration. + (configure): Regenerated. + 2003-04-04 Loren J. Rittle * include/Makefile.in: Regenerate. ! 2003-03-21 Zdenek Dvorak * libffi/include/ffi.h.in: Define X86 instead of X86_64 in 32 bit mode. *************** *** 62,84 **** __builtin_dwarf_cfa. (FFI_INIT_TRAMPOLINE): Send closure reference through eax. 2003-02-06 Andreas Tobler * libffi/src/powerpc/darwin_closure.S: Fix alignement bug, allocate 8 bytes for the result. ! * libffi/src/powerpc/aix_closure.S: Likewise. * libffi/src/powerpc/ffi_darwin.c: Update stackframe description for aix/darwin_closure.S. 2003-01-31 Christian Cornelssen , ! Andreas Schwab * configure.in: Adjust command to source config-ml.in to account ! for changes to the libffi_basedir definition. ! (libffi_basedir): Remove ${srcdir} from value and include trailing ! slash if nonempty. ! * configure: Regenerate. 2003-01-29 Franz Sirl --- 698,734 ---- __builtin_dwarf_cfa. (FFI_INIT_TRAMPOLINE): Send closure reference through eax. + 2003-03-12 Andreas Schwab + + * configure.in: Avoid trailing /. in toolexeclibdir. + * configure: Rebuilt. + + 2003-03-03 Andreas Tobler + + * src/powerpc/darwin_closure.S: Recode to fit dynamic libraries. + 2003-02-06 Andreas Tobler * libffi/src/powerpc/darwin_closure.S: Fix alignement bug, allocate 8 bytes for the result. ! * libffi/src/powerpc/aix_closure.S: Likewise. * libffi/src/powerpc/ffi_darwin.c: Update stackframe description for aix/darwin_closure.S. + + 2003-02-06 Jakub Jelinek + + * src/s390/ffi.c (ffi_closure_helper_SYSV): Add hidden visibility + attribute. 2003-01-31 Christian Cornelssen , ! Andreas Schwab * configure.in: Adjust command to source config-ml.in to account ! for changes to the libffi_basedir definition. ! (libffi_basedir): Remove ${srcdir} from value and include trailing ! slash if nonempty. ! * configure: Regenerate. 2003-01-29 Franz Sirl *************** *** 87,96 **** 2003-01-28 Andrew Haley ! * include/ffi.h.in: Enable FFI_CLOSURES for x86_64. ! * src/x86/ffi64.c (ffi_prep_closure): New. ! (ffi_closure_UNIX64_inner): New. ! * src/x86/unix64.S (ffi_closure_UNIX64): New. 2003-01-22 Andrew Haley --- 737,758 ---- 2003-01-28 Andrew Haley ! * include/ffi.h.in: Enable FFI_CLOSURES for x86_64. ! * src/x86/ffi64.c (ffi_prep_closure): New. ! (ffi_closure_UNIX64_inner): New. ! * src/x86/unix64.S (ffi_closure_UNIX64): New. ! ! 2003-01-27 Alexandre Oliva ! ! * configure.in (toolexecdir, toolexeclibdir): Set and AC_SUBST. ! Remove USE_LIBDIR conditional. ! * Makefile.am (toolexecdir, toolexeclibdir): Don't override. ! * Makefile.in, configure: Rebuilt. ! ! 2003-01027 David Edelsohn ! ! * Makefile.am (TARGET_SRC_POWERPC_AIX): Fix typo. ! * Makefile.in: Regenerate. 2003-01-22 Andrew Haley *************** *** 113,127 **** * src/ffitest.c (main): Only use ffi_closures if those are supported. ! 2003-01-13 Andreas Tobler * libffi/src/ffitest.c ! add closure testcases 2003-01-13 Kevin B. Hendricks * libffi/src/powerpc/ffi.c ! fix alignment bug for float (4 byte aligned iso 8 byte) 2003-01-03 Jeff Sturm --- 775,794 ---- * src/ffitest.c (main): Only use ffi_closures if those are supported. ! 2003-01-13 Andreas Tobler * libffi/src/ffitest.c ! add closure testcases 2003-01-13 Kevin B. Hendricks * libffi/src/powerpc/ffi.c ! fix alignment bug for float (4 byte aligned iso 8 byte) ! ! 2003-01-09 Geoffrey Keating ! ! * src/powerpc/ffi_darwin.c: Remove RCS version string. ! * src/powerpc/darwin.S: Remove RCS version string. 2003-01-03 Jeff Sturm *************** *** 146,151 **** --- 813,822 ---- Added test cases to test stdcall invocation using these functions. + 2002-12-02 Kaz Kojima + + * src/sh/sysv.S: Add DWARF2 unwind info. + 2002-11-27 Ulrich Weigand * src/s390/sysv.S (.eh_frame section): Make section read-only. *************** *** 154,159 **** --- 825,837 ---- * src/types.c (FFI_TYPE_POINTER): Has size 8 on IA64. + 2002-11-23 H.J. Lu + + * acinclude.m4: Add dummy AM_PROG_LIBTOOL. + Include ../config/accross.m4. + * aclocal.m4; Rebuild. + * configure: Likewise. + 2002-11-15 Ulrich Weigand * src/s390/sysv.S (.eh_frame section): Adapt to pcrel FDE encoding. *************** *** 196,202 **** (FFI_NATIVE_RAW_API): Likewise. * src/prep_cif.c (ffi_prep_cif): Do not compute stack space for s390. * src/types.c (FFI_TYPE_POINTER): Use 8-byte pointers on s390x. ! * src/s390/ffi.c: Major rework of existing code. Add support for s390x targets. Add closure support. * src/s390/sysv.S: Likewise. --- 874,880 ---- (FFI_NATIVE_RAW_API): Likewise. * src/prep_cif.c (ffi_prep_cif): Do not compute stack space for s390. * src/types.c (FFI_TYPE_POINTER): Use 8-byte pointers on s390x. ! * src/s390/ffi.c: Major rework of existing code. Add support for s390x targets. Add closure support. * src/s390/sysv.S: Likewise. *************** *** 364,370 **** * configure.in: Enable i*86-*-netbsdelf*. * configure: Rebuilt. ! 2002-03-29 David Billinghurst PR other/2620 --- 1042,1048 ---- * configure.in: Enable i*86-*-netbsdelf*. * configure: Rebuilt. ! 2002-03-29 David Billinghurst PR other/2620 *************** *** 380,386 **** * Makefile.am: libfficonvenience -> libffi_convenience. * Makefile.in: Rebuilt. ! * Makefile.am: Define ffitest_OBJECTS. * Makefile.in: Rebuilt. --- 1058,1064 ---- * Makefile.am: libfficonvenience -> libffi_convenience. * Makefile.in: Rebuilt. ! * Makefile.am: Define ffitest_OBJECTS. * Makefile.in: Rebuilt. *************** *** 397,408 **** (ffi_closure_helper_DARWIN): New function. * src/powerpc/aix_closure.S: New file. * src/powerpc/darwin_closure.S: New file. ! 2002-02-24 Jeff Sturm * include/ffi.h.in: Add typedef for ffi_arg. * src/ffitest.c (main): Declare rint with ffi_arg. ! 2002-02-21 Andreas Tobler * src/powerpc/ffi_darwin.c (ffi_prep_args): Skip appropriate --- 1075,1086 ---- (ffi_closure_helper_DARWIN): New function. * src/powerpc/aix_closure.S: New file. * src/powerpc/darwin_closure.S: New file. ! 2002-02-24 Jeff Sturm * include/ffi.h.in: Add typedef for ffi_arg. * src/ffitest.c (main): Declare rint with ffi_arg. ! 2002-02-21 Andreas Tobler * src/powerpc/ffi_darwin.c (ffi_prep_args): Skip appropriate *************** *** 469,475 **** * configure.in: Recognize sparc*-sun-* host. * configure: Regenerate. ! 2001-06-06 Andrew Haley * src/alpha/osf.S (__FRAME_BEGIN__): Conditionalize for ELF. --- 1147,1153 ---- * configure.in: Recognize sparc*-sun-* host. * configure: Regenerate. ! 2001-06-06 Andrew Haley * src/alpha/osf.S (__FRAME_BEGIN__): Conditionalize for ELF. *************** *** 620,627 **** 2000-05-11 Scott Bambrough ! * libffi/src/arm/sysv.S (ffi_call_SYSV): Doubles are not saved to ! memory correctly. Use conditional instructions, not branches where possible. 2000-05-04 Tom Tromey --- 1298,1305 ---- 2000-05-11 Scott Bambrough ! * libffi/src/arm/sysv.S (ffi_call_SYSV): Doubles are not saved to ! memory correctly. Use conditional instructions, not branches where possible. 2000-05-04 Tom Tromey *************** *** 780,786 **** * include/ffi.h.in: Add definitions for closure and raw API. * src/x86/ffi.c (ffi_prep_cif_machdep): Added case for ! FFI_TYPE_UINT64. * Makefile.am (libffi_la_common_SOURCES): Added raw_api.c --- 1458,1464 ---- * include/ffi.h.in: Add definitions for closure and raw API. * src/x86/ffi.c (ffi_prep_cif_machdep): Added case for ! FFI_TYPE_UINT64. * Makefile.am (libffi_la_common_SOURCES): Added raw_api.c *************** *** 790,796 **** (UINT_ARG, SINT_ARG): New defines. (ffi_closure, ffi_raw_closure): New types. (ffi_prep_closure, ffi_prep_raw_closure): New declarations. ! * configure.in: Add check for endianness and sizeof void*. * src/x86/sysv.S (ffi_call_SYSV): Call fixup routine via argument, --- 1468,1474 ---- (UINT_ARG, SINT_ARG): New defines. (ffi_closure, ffi_raw_closure): New types. (ffi_prep_closure, ffi_prep_raw_closure): New declarations. ! * configure.in: Add check for endianness and sizeof void*. * src/x86/sysv.S (ffi_call_SYSV): Call fixup routine via argument, diff -Nrc3pad gcc-3.3.3/libffi/ChangeLog.libgcj gcc-3.4.0/libffi/ChangeLog.libgcj *** gcc-3.3.3/libffi/ChangeLog.libgcj 2003-02-20 09:12:03.000000000 +0000 --- gcc-3.4.0/libffi/ChangeLog.libgcj 2004-01-15 03:41:46.000000000 +0000 *************** *** 1,3 **** --- 1,7 ---- + 2004-01-14 Kelley Cook + + * configure.in: Add in AC_PREREQ(2.13) + 2003-02-20 Alexandre Oliva * configure.in: Propagate ORIGINAL_LD_FOR_MULTILIBS to diff -Nrc3pad gcc-3.3.3/libffi/configure gcc-3.4.0/libffi/configure *** gcc-3.3.3/libffi/configure 2003-09-09 08:04:18.000000000 +0000 --- gcc-3.4.0/libffi/configure 2003-11-22 13:41:32.000000000 +0000 *************** ac_configure=$ac_aux_dir/configure # Thi *** 662,674 **** # Make sure we can run config.sub. if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 ! echo "configure:672: checking host system type" >&5 host_alias=$host case "$host_alias" in --- 662,695 ---- + # Do some error checking and defaulting for the host and target type. + # The inputs are: + # configure --host=HOST --target=TARGET --build=BUILD NONOPT + # + # The rules are: + # 1. You are not allowed to specify --host, --target, and nonopt at the + # same time. + # 2. Host defaults to nonopt. + # 3. If nonopt is not specified, then host defaults to the current host, + # as determined by config.guess. + # 4. Target and build default to nonopt. + # 5. If nonopt is not specified, then target and build default to host. + + # The aliases save the names the user supplied, while $host etc. + # will get canonicalized. + case $host---$target---$nonopt in + NONE---*---* | *---NONE---* | *---*---NONE) ;; + *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; + esac + + # Make sure we can run config.sub. if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 ! echo "configure:693: checking host system type" >&5 host_alias=$host case "$host_alias" in *************** host_vendor=`echo $host | sed 's/^\([^-] *** 688,693 **** --- 709,756 ---- host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 + echo $ac_n "checking target system type""... $ac_c" 1>&6 + echo "configure:714: checking target system type" >&5 + + target_alias=$target + case "$target_alias" in + NONE) + case $nonopt in + NONE) target_alias=$host_alias ;; + *) target_alias=$nonopt ;; + esac ;; + esac + + target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` + target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + echo "$ac_t""$target" 1>&6 + + echo $ac_n "checking build system type""... $ac_c" 1>&6 + echo "configure:732: checking build system type" >&5 + + build_alias=$build + case "$build_alias" in + NONE) + case $nonopt in + NONE) build_alias=$host_alias ;; + *) build_alias=$nonopt ;; + esac ;; + esac + + build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` + build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + echo "$ac_t""$build" 1>&6 + + test "$host_alias" != "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- + + target_alias=${target_alias-$host_alias} # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then *************** else *** 758,785 **** enable_fast_install=yes fi - echo $ac_n "checking build system type""... $ac_c" 1>&6 - echo "configure:763: checking build system type" >&5 - - build_alias=$build - case "$build_alias" in - NONE) - case $nonopt in - NONE) build_alias=$host_alias ;; - *) build_alias=$nonopt ;; - esac ;; - esac - - build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` - build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` - build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` - build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - echo "$ac_t""$build" 1>&6 - # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:783: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 821,830 ---- enable_fast_install=yes fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:828: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** if test -z "$CC"; then *** 809,815 **** # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:813: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 854,860 ---- # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:858: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 860,866 **** # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:864: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 905,911 ---- # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:909: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 892,898 **** fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ! echo "configure:896: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. --- 937,943 ---- fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ! echo "configure:941: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. *************** cross_compiling=$ac_cv_prog_cc_cross *** 903,914 **** cat > conftest.$ac_ext << EOF ! #line 907 "configure" #include "confdefs.h" main(){return(0);} EOF ! if { (eval echo configure:912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then --- 948,959 ---- cat > conftest.$ac_ext << EOF ! #line 952 "configure" #include "confdefs.h" main(){return(0);} EOF ! if { (eval echo configure:957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then *************** if test $ac_cv_prog_cc_works = no; then *** 934,945 **** { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ! echo "configure:938: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:943: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 979,990 ---- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ! echo "configure:983: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:988: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 948,954 **** yes; #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:952: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no --- 993,999 ---- yes; #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no *************** ac_test_CFLAGS="${CFLAGS+set}" *** 967,973 **** ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:971: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1012,1018 ---- ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:1016: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** ac_prog=ld *** 1010,1016 **** if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 ! echo "configure:1014: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw --- 1055,1061 ---- if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 ! echo "configure:1059: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw *************** echo "configure:1014: checking for ld us *** 1040,1049 **** esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 ! echo "configure:1044: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 ! echo "configure:1047: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1085,1094 ---- esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 ! echo "configure:1089: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 ! echo "configure:1092: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** else *** 1078,1084 **** fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 ! echo "configure:1082: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1123,1129 ---- fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 ! echo "configure:1127: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** with_gnu_ld=$lt_cv_prog_gnu_ld *** 1095,1101 **** echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 ! echo "configure:1099: checking for $LD option to reload object files" >&5 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1140,1146 ---- echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 ! echo "configure:1144: checking for $LD option to reload object files" >&5 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** reload_flag=$lt_cv_ld_reload_flag *** 1107,1113 **** test -n "$reload_flag" && reload_flag=" $reload_flag" echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 ! echo "configure:1111: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1152,1158 ---- test -n "$reload_flag" && reload_flag=" $reload_flag" echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 ! echo "configure:1156: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** NM="$lt_cv_path_NM" *** 1145,1151 **** echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 ! echo "configure:1149: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1190,1196 ---- echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 ! echo "configure:1194: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 1166,1172 **** fi echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 ! echo "configure:1170: checking how to recognise dependant libraries" >&5 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1211,1217 ---- fi echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 ! echo "configure:1215: checking how to recognise dependant libraries" >&5 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** cygwin* | mingw* |pw32*) *** 1205,1210 **** --- 1250,1256 ---- ;; darwin* | rhapsody*) + # this will be overwritten by pass_all, but leave it in just in case lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' lt_cv_file_magic_cmd='/usr/bin/file -L' case "$host_os" in *************** darwin* | rhapsody*) *** 1215,1220 **** --- 1261,1267 ---- lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' ;; esac + lt_cv_deplibs_check_method=pass_all ;; freebsd* ) *************** irix5* | irix6*) *** 1276,1282 **** # This must be Linux ELF. linux-gnu*) case $host_cpu in ! alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* ) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM --- 1323,1329 ---- # This must be Linux ELF. linux-gnu*) case $host_cpu in ! alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* ) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM *************** file_magic_cmd=$lt_cv_file_magic_cmd *** 1339,1351 **** deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 ! echo "configure:1343: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext ! if { (eval echo configure:1349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; --- 1386,1398 ---- deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 ! echo "configure:1390: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext ! if { (eval echo configure:1396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; *************** ac_objext=$ac_cv_objext *** 1365,1371 **** echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 ! echo "configure:1369: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1412,1418 ---- echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 ! echo "configure:1416: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 1375,1381 **** rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= ! if { (eval echo configure:1379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; --- 1422,1428 ---- rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= ! if { (eval echo configure:1426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; *************** case $deplibs_check_method in *** 1408,1414 **** file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 ! echo "configure:1412: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1455,1461 ---- file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 ! echo "configure:1459: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 1470,1476 **** if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 ! echo "configure:1474: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1517,1523 ---- if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 ! echo "configure:1521: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** esac *** 1541,1547 **** # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1545: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1588,1594 ---- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1592: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** if test -n "$ac_tool_prefix"; then *** 1573,1579 **** # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1577: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1620,1626 ---- # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1624: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 1608,1614 **** # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1612: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1655,1661 ---- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1659: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** if test -n "$ac_tool_prefix"; then *** 1640,1646 **** # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1644: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1687,1693 ---- # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1691: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** test x"$pic_mode" = xno && libtool_flags *** 1707,1714 **** case $host in *-*-irix6*) # Find out which ABI we are using. ! echo '#line 1711 "configure"' > conftest.$ac_ext ! if { (eval echo configure:1712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) --- 1754,1761 ---- case $host in *-*-irix6*) # Find out which ABI we are using. ! echo '#line 1758 "configure"' > conftest.$ac_ext ! if { (eval echo configure:1759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) *************** case $host in *** 1741,1747 **** ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext ! if { (eval echo configure:1745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *ELF-32*) HPUX_IA64_MODE="32" --- 1788,1794 ---- ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext ! if { (eval echo configure:1792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *ELF-32*) HPUX_IA64_MODE="32" *************** ia64-*-hpux*) *** 1757,1763 **** x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext ! if { (eval echo configure:1761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) case $host in --- 1804,1810 ---- x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext ! if { (eval echo configure:1808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) case $host in *************** x86_64-*linux*|ppc*-*linux*|powerpc*-*li *** 1801,1807 **** SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 ! echo "configure:1805: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1848,1854 ---- SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 ! echo "configure:1852: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** ac_link='${CC-cc} -o conftest${ac_exeext *** 1814,1827 **** cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else --- 1861,1874 ---- cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else *************** exec 5>>./config.log *** 1949,1955 **** # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:1953: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1996,2002 ---- # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:2000: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** test -z "$INSTALL_SCRIPT" && INSTALL_SCR *** 2002,2008 **** test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 ! echo "configure:2006: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile --- 2049,2055 ---- test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 ! echo "configure:2053: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile *************** test "$program_suffix" != NONE && *** 2059,2065 **** test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:2063: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2106,2112 ---- test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:2110: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** fi *** 2098,2104 **** missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 ! echo "configure:2102: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. --- 2145,2151 ---- missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 ! echo "configure:2149: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. *************** else *** 2111,2117 **** fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 ! echo "configure:2115: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. --- 2158,2164 ---- fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 ! echo "configure:2162: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. *************** else *** 2124,2130 **** fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 ! echo "configure:2128: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. --- 2171,2177 ---- fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 ! echo "configure:2175: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. *************** else *** 2137,2143 **** fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 ! echo "configure:2141: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. --- 2184,2190 ---- fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 ! echo "configure:2188: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. *************** else *** 2150,2156 **** fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 ! echo "configure:2154: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. --- 2197,2203 ---- fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 ! echo "configure:2201: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. *************** fi *** 2167,2173 **** echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 ! echo "configure:2171: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2214,2220 ---- echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 ! echo "configure:2218: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 2177,2183 **** rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= ! if { (eval echo configure:2181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; --- 2224,2230 ---- rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= ! if { (eval echo configure:2228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; *************** echo "$ac_t""${ac_cv_exeext}" 1>&6 *** 2198,2204 **** ac_exeext=$EXEEXT echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 ! echo "configure:2202: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" --- 2245,2251 ---- ac_exeext=$EXEEXT echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 ! echo "configure:2249: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" *************** fi *** 2224,2230 **** # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2228: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2271,2277 ---- # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2275: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** if test -z "$CC"; then *** 2254,2260 **** # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2258: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2301,2307 ---- # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2305: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 2305,2311 **** # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2309: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2352,2358 ---- # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2356: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 2337,2343 **** fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ! echo "configure:2341: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. --- 2384,2390 ---- fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ! echo "configure:2388: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. *************** cross_compiling=$ac_cv_prog_cc_cross *** 2348,2359 **** cat > conftest.$ac_ext << EOF ! #line 2352 "configure" #include "confdefs.h" main(){return(0);} EOF ! if { (eval echo configure:2357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then --- 2395,2406 ---- cat > conftest.$ac_ext << EOF ! #line 2399 "configure" #include "confdefs.h" main(){return(0);} EOF ! if { (eval echo configure:2404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then *************** if test $ac_cv_prog_cc_works = no; then *** 2379,2390 **** { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ! echo "configure:2383: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:2388: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2426,2437 ---- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ! echo "configure:2430: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:2435: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 2393,2399 **** yes; #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no --- 2440,2446 ---- yes; #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no *************** ac_test_CFLAGS="${CFLAGS+set}" *** 2412,2418 **** ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:2416: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2459,2465 ---- ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:2463: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 2443,2459 **** fi fi TARGETDIR="unknown" case "$host" in - mips-sgi-irix5.* | mips-sgi-irix6.*) TARGET=MIPS; TARGETDIR=mips;; i*86-*-linux*) TARGET=X86; TARGETDIR=x86;; - i*86-*-sco3.2v5*) TARGET=X86; TARGETDIR=x86;; i*86-*-solaris*) TARGET=X86; TARGETDIR=x86;; i*86-*-beos*) TARGET=X86; TARGETDIR=x86;; i*86-*-freebsd*) TARGET=X86; TARGETDIR=x86;; --- 2490,2646 ---- fi fi + + if test $ac_cv_header_sys_mman_h != yes \ + || test $ac_cv_func_mmap != yes; then + ac_cv_func_mmap_file=no + ac_cv_func_mmap_dev_zero=no + ac_cv_func_mmap_anon=no + else + echo $ac_n "checking whether read-only mmap of a plain file works""... $ac_c" 1>&6 + echo "configure:2508: checking whether read-only mmap of a plain file works" >&5 + if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + # Add a system to this blacklist if + # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a + # memory area containing the same data that you'd get if you applied + # read() to the same fd. The only system known to have a problem here + # is VMS, where text files have record structure. + case "$host_os" in + vms* | ultrix*) + ac_cv_func_mmap_file=no ;; + *) + ac_cv_func_mmap_file=yes;; + esac + fi + + echo "$ac_t""$ac_cv_func_mmap_file" 1>&6 + echo $ac_n "checking whether mmap from /dev/zero works""... $ac_c" 1>&6 + echo "configure:2527: checking whether mmap from /dev/zero works" >&5 + if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + # Add a system to this blacklist if it has mmap() but /dev/zero + # does not exist, or if mmapping /dev/zero does not give anonymous + # zeroed pages with both the following properties: + # 1. If you map N consecutive pages in with one call, and then + # unmap any subset of those pages, the pages that were not + # explicitly unmapped remain accessible. + # 2. If you map two adjacent blocks of memory and then unmap them + # both at once, they must both go away. + # Systems known to be in this category are Windows (all variants), + # VMS, and Darwin. + case "$host_os" in + vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00) + ac_cv_func_mmap_dev_zero=no ;; + *) + ac_cv_func_mmap_dev_zero=yes;; + esac + fi + + echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6 + + # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. + echo $ac_n "checking for MAP_ANON(YMOUS)""... $ac_c" 1>&6 + echo "configure:2553: checking for MAP_ANON(YMOUS)" >&5 + if eval "test \"`echo '$''{'ac_cv_decl_map_anon'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include + #include + + #ifndef MAP_ANONYMOUS + #define MAP_ANONYMOUS MAP_ANON + #endif + + int main() { + int n = MAP_ANONYMOUS; + ; return 0; } + EOF + if { (eval echo configure:2572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_decl_map_anon=yes + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_decl_map_anon=no + fi + rm -f conftest* + fi + + echo "$ac_t""$ac_cv_decl_map_anon" 1>&6 + + if test $ac_cv_decl_map_anon = no; then + ac_cv_func_mmap_anon=no + else + echo $ac_n "checking whether mmap with MAP_ANON(YMOUS) works""... $ac_c" 1>&6 + echo "configure:2590: checking whether mmap with MAP_ANON(YMOUS) works" >&5 + if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + # Add a system to this blacklist if it has mmap() and MAP_ANON or + # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) + # doesn't give anonymous zeroed pages with the same properties listed + # above for use of /dev/zero. + # Systems known to be in this category are Windows, VMS, and SCO Unix. + case "$host_os" in + vms* | cygwin* | pe | mingw* | sco* | udk* ) + ac_cv_func_mmap_anon=no ;; + *) + ac_cv_func_mmap_anon=yes;; + esac + fi + + echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6 + fi + fi + + if test $ac_cv_func_mmap_file = yes; then + cat >> confdefs.h <<\EOF + #define HAVE_MMAP_FILE 1 + EOF + + fi + if test $ac_cv_func_mmap_dev_zero = yes; then + cat >> confdefs.h <<\EOF + #define HAVE_MMAP_DEV_ZERO 1 + EOF + + fi + if test $ac_cv_func_mmap_anon = yes; then + cat >> confdefs.h <<\EOF + #define HAVE_MMAP_ANON 1 + EOF + + fi + + + + + if test -d $srcdir/testsuite; then + TESTSUBDIR_TRUE= + TESTSUBDIR_FALSE='#' + else + TESTSUBDIR_TRUE='#' + TESTSUBDIR_FALSE= + fi + + TARGETDIR="unknown" case "$host" in i*86-*-linux*) TARGET=X86; TARGETDIR=x86;; i*86-*-solaris*) TARGET=X86; TARGETDIR=x86;; i*86-*-beos*) TARGET=X86; TARGETDIR=x86;; i*86-*-freebsd*) TARGET=X86; TARGETDIR=x86;; *************** alpha*-*-linux* | alpha*-*-osf* | alpha* *** 2469,2508 **** ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;; m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;; mips64*-*);; mips*-*-linux*) TARGET=MIPS_LINUX; TARGETDIR=mips;; ! powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;; powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;; powerpc-*-darwin*) TARGET=POWERPC_DARWIN; TARGETDIR=powerpc;; powerpc-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;; rs6000-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;; arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;; s390-*-linux-*) TARGET=S390; TARGETDIR=s390;; s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;; x86_64-*-linux*) TARGET=X86_64; TARGETDIR=x86;; sh-*-linux* | sh[34]*-*-linux*) TARGET=SH; TARGETDIR=sh;; esac if test $TARGETDIR = unknown; then { echo "configure: error: "libffi has not been ported to $host."" 1>&2; exit 1; } fi ! if test ${TARGET}${ac_cv_prog_gcc} = MIPSyes; then ! MIPS_GCC_TRUE= ! MIPS_GCC_FALSE='#' ! else ! MIPS_GCC_TRUE='#' ! MIPS_GCC_FALSE= ! fi ! ! ! if test ${TARGET}${ac_cv_prog_gcc} = MIPSno; then ! MIPS_SGI_TRUE= ! MIPS_SGI_FALSE='#' else ! MIPS_SGI_TRUE='#' ! MIPS_SGI_FALSE= fi --- 2656,2691 ---- ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;; m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;; mips64*-*);; + mips-sgi-irix5.* | mips-sgi-irix6.*) TARGET=MIPS_IRIX; TARGETDIR=mips;; mips*-*-linux*) TARGET=MIPS_LINUX; TARGETDIR=mips;; ! powerpc*-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;; powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;; powerpc-*-darwin*) TARGET=POWERPC_DARWIN; TARGETDIR=powerpc;; powerpc-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;; rs6000-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;; arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;; + arm*-*-netbsdelf*) TARGET=ARM; TARGETDIR=arm;; s390-*-linux-*) TARGET=S390; TARGETDIR=s390;; s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;; x86_64-*-linux*) TARGET=X86_64; TARGETDIR=x86;; sh-*-linux* | sh[34]*-*-linux*) TARGET=SH; TARGETDIR=sh;; + sh64-*-linux* | sh5*-*-linux*) TARGET=SH64; TARGETDIR=sh64;; esac + + if test $TARGETDIR = unknown; then { echo "configure: error: "libffi has not been ported to $host."" 1>&2; exit 1; } fi ! if test x$TARGET = xMIPS_IRIX; then ! MIPS_IRIX_TRUE= ! MIPS_IRIX_FALSE='#' else ! MIPS_IRIX_TRUE='#' ! MIPS_IRIX_FALSE= fi *************** else *** 2631,2642 **** SH_FALSE= fi ! if test x$TARGET = xMIPS_LINUX; then ! TARGET=MIPS fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 ! echo "configure:2640: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= --- 2814,2835 ---- SH_FALSE= fi ! ! if test x$TARGET = xSH64; then ! SH64_TRUE= ! SH64_FALSE='#' ! else ! SH64_TRUE='#' ! SH64_FALSE= fi + case x$TARGET in + xMIPS*) TARGET=MIPS ;; + *) ;; + esac + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 ! echo "configure:2833: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= *************** else *** 2651,2663 **** # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : --- 2844,2856 ---- # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : *************** else *** 2668,2680 **** rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : --- 2861,2873 ---- rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : *************** else *** 2685,2697 **** rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : --- 2878,2890 ---- rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : *************** fi *** 2716,2727 **** echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 ! echo "configure:2720: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include --- 2909,2920 ---- echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 ! echo "configure:2913: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include *************** else *** 2729,2735 **** #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* --- 2922,2928 ---- #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* *************** rm -f conftest* *** 2746,2752 **** if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF --- 2939,2945 ---- if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF *************** fi *** 2764,2770 **** if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF --- 2957,2963 ---- if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF *************** if test "$cross_compiling" = yes; then *** 2785,2791 **** : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') --- 2978,2984 ---- : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') *************** if (XOR (islower (i), ISLOWER (i)) || to *** 2796,2802 **** exit (0); } EOF ! if { (eval echo configure:2800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else --- 2989,2995 ---- exit (0); } EOF ! if { (eval echo configure:2993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else *************** fi *** 2822,2833 **** for ac_func in memcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:2826: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:3019: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 3043,3049 ---- ; return 0; } EOF ! if { (eval echo configure:3047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** done *** 2877,2895 **** # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 ! echo "configure:2881: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF ! if { (eval echo configure:2893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else --- 3070,3088 ---- # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 ! echo "configure:3074: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF ! if { (eval echo configure:3086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else *************** EOF *** 2910,2921 **** fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 ! echo "configure:2914: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:3107: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else --- 3136,3142 ---- char *p = (char *) alloca(1); ; return 0; } EOF ! if { (eval echo configure:3140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else *************** EOF *** 2975,2986 **** echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 ! echo "configure:2979: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:3172: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 *** 3005,3016 **** if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:3009: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:3202: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 3226,3232 ---- ; return 0; } EOF ! if { (eval echo configure:3230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** done *** 3060,3066 **** fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 ! echo "configure:3064: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 3253,3259 ---- fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 ! echo "configure:3257: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 3068,3074 **** ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else --- 3280,3286 ---- exit (find_stack_direction() < 0); } EOF ! if { (eval echo configure:3284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else *************** EOF *** 3109,3317 **** fi - echo $ac_n "checking size of short""... $ac_c" 1>&6 - echo "configure:3114: checking size of short" >&5 - if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. - cat > conftest.$ac_ext < - - - int main() { - switch (0) case 0: case (sizeof (short) == $ac_size):; - ; return 0; } - EOF - if { (eval echo configure:3130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_sizeof_short=$ac_size - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -f conftest* - if test x$ac_cv_sizeof_short != x ; then break; fi - done - - fi - - if test x$ac_cv_sizeof_short = x ; then - { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } - fi - echo "$ac_t""$ac_cv_sizeof_short" 1>&6 - cat >> confdefs.h <&6 - echo "configure:3153: checking size of int" >&5 - if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. - cat > conftest.$ac_ext < - - - int main() { - switch (0) case 0: case (sizeof (int) == $ac_size):; - ; return 0; } - EOF - if { (eval echo configure:3169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_sizeof_int=$ac_size - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -f conftest* - if test x$ac_cv_sizeof_int != x ; then break; fi - done - - fi - - if test x$ac_cv_sizeof_int = x ; then - { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } - fi - echo "$ac_t""$ac_cv_sizeof_int" 1>&6 - cat >> confdefs.h <&6 - echo "configure:3192: checking size of long" >&5 - if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. - cat > conftest.$ac_ext < - - - int main() { - switch (0) case 0: case (sizeof (long) == $ac_size):; - ; return 0; } - EOF - if { (eval echo configure:3208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_sizeof_long=$ac_size - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -f conftest* - if test x$ac_cv_sizeof_long != x ; then break; fi - done - - fi - - if test x$ac_cv_sizeof_long = x ; then - { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } - fi - echo "$ac_t""$ac_cv_sizeof_long" 1>&6 - cat >> confdefs.h <&6 - echo "configure:3231: checking size of long long" >&5 - if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. - cat > conftest.$ac_ext < - - - int main() { - switch (0) case 0: case (sizeof (long long) == $ac_size):; - ; return 0; } - EOF - if { (eval echo configure:3247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_sizeof_long_long=$ac_size - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -f conftest* - if test x$ac_cv_sizeof_long_long != x ; then break; fi - done - - fi - - if test x$ac_cv_sizeof_long_long = x ; then - { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; } - fi - echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 - cat >> confdefs.h <&6 - echo "configure:3270: checking size of float" >&5 - if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. - cat > conftest.$ac_ext < - - - int main() { - switch (0) case 0: case (sizeof (float) == $ac_size):; - ; return 0; } - EOF - if { (eval echo configure:3286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_sizeof_float=$ac_size - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -f conftest* - if test x$ac_cv_sizeof_float != x ; then break; fi - done - - fi - - if test x$ac_cv_sizeof_float = x ; then - { echo "configure: error: cannot determine a size for float" 1>&2; exit 1; } - fi - echo "$ac_t""$ac_cv_sizeof_float" 1>&6 - cat >> confdefs.h <&6 ! echo "configure:3309: checking size of double" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < --- 3302,3315 ---- fi echo $ac_n "checking size of double""... $ac_c" 1>&6 ! echo "configure:3307: checking size of double" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < *************** int main() { *** 3321,3327 **** switch (0) case 0: case (sizeof (double) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:3325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_double=$ac_size else --- 3319,3325 ---- switch (0) case 0: case (sizeof (double) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:3323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_double=$ac_size else *************** EOF *** 3344,3356 **** echo $ac_n "checking size of long double""... $ac_c" 1>&6 ! echo "configure:3348: checking size of long double" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < --- 3342,3354 ---- echo $ac_n "checking size of long double""... $ac_c" 1>&6 ! echo "configure:3346: checking size of long double" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < *************** int main() { *** 3360,3366 **** switch (0) case 0: case (sizeof (long double) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:3364: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_long_double=$ac_size else --- 3358,3364 ---- switch (0) case 0: case (sizeof (long double) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:3362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_long_double=$ac_size else *************** EOF *** 3383,3436 **** ! echo $ac_n "checking size of void *""... $ac_c" 1>&6 ! echo "configure:3388: checking size of void *" >&5 ! if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. ! cat > conftest.$ac_ext < ! ! ! int main() { ! switch (0) case 0: case (sizeof (void *) == $ac_size):; ! ; return 0; } EOF - if { (eval echo configure:3404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_sizeof_void_p=$ac_size - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -f conftest* - if test x$ac_cv_sizeof_void_p != x ; then break; fi - done fi - if test x$ac_cv_sizeof_void_p = x ; then - { echo "configure: error: cannot determine a size for void *" 1>&2; exit 1; } - fi - echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6 - cat >> confdefs.h <&6 ! echo "configure:3427: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include --- 3381,3408 ---- ! # Also AC_SUBST this variable for ffi.h. ! HAVE_LONG_DOUBLE=0 ! if test $ac_cv_sizeof_double != $ac_cv_sizeof_long_double; then ! if test $ac_cv_sizeof_long_double != 0; then ! HAVE_LONG_DOUBLE=1 ! cat >> confdefs.h <<\EOF ! #define HAVE_LONG_DOUBLE 1 EOF + fi fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 ! echo "configure:3399: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include *************** int main() { *** 3441,3451 **** #endif ; return 0; } EOF ! if { (eval echo configure:3445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include --- 3413,3423 ---- #endif ; return 0; } EOF ! if { (eval echo configure:3417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include *************** int main() { *** 3456,3462 **** #endif ; return 0; } EOF ! if { (eval echo configure:3460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else --- 3428,3434 ---- #endif ; return 0; } EOF ! if { (eval echo configure:3432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else *************** if test "$cross_compiling" = yes; then *** 3476,3482 **** echo $ac_n "cross-compiling... " 2>&6 else cat > conftest.$ac_ext <&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else --- 3461,3467 ---- exit (u.c[sizeof (long) - 1] == 1); } EOF ! if { (eval echo configure:3465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else *************** fi *** 3507,3513 **** echo "$ac_t""$ac_cv_c_bigendian" 1>&6 if test $ac_cv_c_bigendian = unknown; then echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6 ! echo "configure:3511: checking to probe for byte ordering" >&5 cat >conftest.c <&6 if test $ac_cv_c_bigendian = unknown; then echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6 ! echo "configure:3483: checking to probe for byte ordering" >&5 cat >conftest.c <> confdefs.h <<\EOF + #define HOST_WORDS_BIG_ENDIAN 1 + EOF + BYTEORDER=4321 else BYTEORDER=1234 *************** fi *** 3557,3563 **** if test x$TARGET = xSPARC; then echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6 ! echo "configure:3561: checking assembler and linker support unaligned pc related relocs" >&5 if eval "test \"`echo '$''{'libffi_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 3533,3539 ---- if test x$TARGET = xSPARC; then echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6 ! echo "configure:3537: checking assembler and linker support unaligned pc related relocs" >&5 if eval "test \"`echo '$''{'libffi_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 3567,3580 **** CFLAGS="$CFLAGS -fpic" LDFLAGS="$LDFLAGS -shared" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* libffi_cv_as_sparc_ua_pcrel=yes else --- 3543,3556 ---- CFLAGS="$CFLAGS -fpic" LDFLAGS="$LDFLAGS -shared" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* libffi_cv_as_sparc_ua_pcrel=yes else *************** EOF *** 3597,3603 **** fi echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6 ! echo "configure:3601: checking assembler .register pseudo-op support" >&5 if eval "test \"`echo '$''{'libffi_cv_as_register_pseudo_op'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 3573,3579 ---- fi echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6 ! echo "configure:3577: checking assembler .register pseudo-op support" >&5 if eval "test \"`echo '$''{'libffi_cv_as_register_pseudo_op'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 3605,3618 **** libffi_cv_as_register_pseudo_op=unknown # Check if we have .register cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libffi_cv_as_register_pseudo_op=yes else --- 3581,3594 ---- libffi_cv_as_register_pseudo_op=unknown # Check if we have .register cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libffi_cv_as_register_pseudo_op=yes else *************** EOF *** 3634,3639 **** --- 3610,3652 ---- fi fi + echo $ac_n "checking whether .eh_frame section should be read-only""... $ac_c" 1>&6 + echo "configure:3615: checking whether .eh_frame section should be read-only" >&5 + if eval "test \"`echo '$''{'libffi_cv_ro_eh_frame'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + libffi_cv_ro_eh_frame=no + echo 'extern void foo (void); void bar (void) { foo (); foo (); }' > conftest.c + if $CC $CFLAGS -S -fpic -fexceptions -o conftest.s conftest.c > /dev/null 2>&1; then + if grep '.section.*eh_frame.*"a"' conftest.s > /dev/null; then + libffi_cv_ro_eh_frame=yes + elif grep '.section.*eh_frame.*#alloc' conftest.c \ + | grep -v '#write' > /dev/null; then + libffi_cv_ro_eh_frame=yes + fi + fi + rm -f conftest.* + + fi + + echo "$ac_t""$libffi_cv_ro_eh_frame" 1>&6 + if test "x$libffi_cv_ro_eh_frame" = xyes; then + cat >> confdefs.h <<\EOF + #define HAVE_RO_EH_FRAME 1 + EOF + + cat >> confdefs.h <<\EOF + #define EH_FRAME_FLAGS "a" + EOF + + else + cat >> confdefs.h <<\EOF + #define EH_FRAME_FLAGS "aw" + EOF + + fi + *************** else *** 3695,3701 **** toolexecdir='$(libdir)/gcc-lib/$(target_alias)' toolexeclibdir='$(libdir)' fi ! toolexeclibdir=$toolexeclibdir/`$CC -print-multi-os-directory` --- 3708,3727 ---- toolexecdir='$(libdir)/gcc-lib/$(target_alias)' toolexeclibdir='$(libdir)' fi ! multi_os_directory=`$CC -print-multi-os-directory` ! case $multi_os_directory in ! .) ;; # Avoid trailing /. ! *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; ! esac ! ! ! ! #Figure out where generated headers like ffitarget.h get installed. ! gcc_version_trigger=${srcdir}/../gcc/version.c ! gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'` ! gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` ! tool_include_dir='$(libdir)/gcc/$(target_alias)/'${gcc_version}/include ! *************** done *** 3806,3812 **** ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" ! trap 'rm -fr `echo "include/Makefile include/ffi.h Makefile fficonfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then --- 3986,3992 ---- cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then *************** cat >> $CONFIG_STATUS <<\EOF *** 4116,4121 **** --- 4153,4203 ---- fi; done EOF + + cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF + srcdir=$ac_given_srcdir + while test -n "$ac_sources"; do + set $ac_dests; ac_dest=$1; shift; ac_dests=$* + set $ac_sources; ac_source=$1; shift; ac_sources=$* + + echo "linking $srcdir/$ac_source to $ac_dest" + + if test ! -r $srcdir/$ac_source; then + { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } + fi + rm -f $ac_dest + + # Make relative symlinks. + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` + if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then + # The dest file is in a subdirectory. + test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" + ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dest_dir_suffix. + ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dest_dir_suffix= ac_dots= + fi + + case "$srcdir" in + [/$]*) ac_rel_source="$srcdir/$ac_source" ;; + *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; + esac + + # Make a symlink if possible; otherwise try a hard link. + if ln -s $ac_rel_source $ac_dest 2>/dev/null || + ln $srcdir/$ac_source $ac_dest; then : + else + { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } + fi + done + EOF cat >> $CONFIG_STATUS </dev/null; then ! echo fficonfig.h unchanged ! else ! echo Moving fficonfig.h to include/fficonfig.h ! cp fficonfig.h include/fficonfig.h ! fi EOF cat >> $CONFIG_STATUS <<\EOF --- 4210,4222 ---- CC="${CC}" DEFS="$DEFS" ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}" ! ! # Make target subdirectories if required. ! test -d src || mkdir src ! test -d src/${TARGETDIR} || mkdir src/${TARGETDIR} ! test -d include || mkdir include ! ! EOF cat >> $CONFIG_STATUS <<\EOF *************** chmod +x $CONFIG_STATUS *** 4152,4158 **** rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - - # Make target subdirectories if required. - test -d src || mkdir src - test -d src/${TARGETDIR} || mkdir src/${TARGETDIR} --- 4233,4235 ---- diff -Nrc3pad gcc-3.3.3/libffi/configure.in gcc-3.4.0/libffi/configure.in *** gcc-3.3.3/libffi/configure.in 2003-08-09 06:59:00.000000000 +0000 --- gcc-3.4.0/libffi/configure.in 2004-01-15 03:41:46.000000000 +0000 *************** *** 1,4 **** --- 1,5 ---- dnl Process this with autoconf to create configure + AC_PREREQ(2.13) AC_INIT(fficonfig.h.in) AM_CONFIG_HEADER(fficonfig.h) *************** fi *** 32,38 **** AC_SUBST(libffi_basedir) AC_CONFIG_AUX_DIR(${libffi_basedir}..) ! AC_CANONICAL_HOST AM_PROG_LIBTOOL --- 33,40 ---- AC_SUBST(libffi_basedir) AC_CONFIG_AUX_DIR(${libffi_basedir}..) ! AC_CANONICAL_SYSTEM ! target_alias=${target_alias-$host_alias} AM_PROG_LIBTOOL *************** AC_EXEEXT *** 42,54 **** AM_MAINTAINER_MODE AC_PROG_CC AC_PROG_LIBTOOL TARGETDIR="unknown" case "$host" in - mips-sgi-irix5.* | mips-sgi-irix6.*) TARGET=MIPS; TARGETDIR=mips;; i*86-*-linux*) TARGET=X86; TARGETDIR=x86;; - i*86-*-sco3.2v5*) TARGET=X86; TARGETDIR=x86;; i*86-*-solaris*) TARGET=X86; TARGETDIR=x86;; i*86-*-beos*) TARGET=X86; TARGETDIR=x86;; i*86-*-freebsd*) TARGET=X86; TARGETDIR=x86;; --- 44,61 ---- AM_MAINTAINER_MODE AC_PROG_CC + AC_PROG_LIBTOOL + AC_FUNC_MMAP_BLACKLIST + + dnl The -no-testsuite modules omit the test subdir. + AM_CONDITIONAL(TESTSUBDIR, test -d $srcdir/testsuite) + + TARGETDIR="unknown" case "$host" in i*86-*-linux*) TARGET=X86; TARGETDIR=x86;; i*86-*-solaris*) TARGET=X86; TARGETDIR=x86;; i*86-*-beos*) TARGET=X86; TARGETDIR=x86;; i*86-*-freebsd*) TARGET=X86; TARGETDIR=x86;; *************** alpha*-*-linux* | alpha*-*-osf* | alpha* *** 64,88 **** ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;; m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;; mips64*-*);; mips*-*-linux*) TARGET=MIPS_LINUX; TARGETDIR=mips;; ! powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;; powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;; powerpc-*-darwin*) TARGET=POWERPC_DARWIN; TARGETDIR=powerpc;; powerpc-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;; rs6000-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;; arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;; s390-*-linux-*) TARGET=S390; TARGETDIR=s390;; s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;; x86_64-*-linux*) TARGET=X86_64; TARGETDIR=x86;; sh-*-linux* | sh[[34]]*-*-linux*) TARGET=SH; TARGETDIR=sh;; esac if test $TARGETDIR = unknown; then AC_ERROR("libffi has not been ported to $host.") fi ! AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes) ! AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno) AM_CONDITIONAL(MIPS_LINUX, test x$TARGET = xMIPS_LINUX) AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC) AM_CONDITIONAL(X86, test x$TARGET = xX86) --- 71,99 ---- ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;; m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;; mips64*-*);; + mips-sgi-irix5.* | mips-sgi-irix6.*) TARGET=MIPS_IRIX; TARGETDIR=mips;; mips*-*-linux*) TARGET=MIPS_LINUX; TARGETDIR=mips;; ! powerpc*-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;; powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;; powerpc-*-darwin*) TARGET=POWERPC_DARWIN; TARGETDIR=powerpc;; powerpc-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;; rs6000-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;; arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;; + arm*-*-netbsdelf*) TARGET=ARM; TARGETDIR=arm;; s390-*-linux-*) TARGET=S390; TARGETDIR=s390;; s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;; x86_64-*-linux*) TARGET=X86_64; TARGETDIR=x86;; sh-*-linux* | sh[[34]]*-*-linux*) TARGET=SH; TARGETDIR=sh;; + sh64-*-linux* | sh5*-*-linux*) TARGET=SH64; TARGETDIR=sh64;; esac + AC_SUBST(AM_RUNTESTFLAGS) + if test $TARGETDIR = unknown; then AC_ERROR("libffi has not been ported to $host.") fi ! AM_CONDITIONAL(MIPS_IRIX, test x$TARGET = xMIPS_IRIX) AM_CONDITIONAL(MIPS_LINUX, test x$TARGET = xMIPS_LINUX) AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC) AM_CONDITIONAL(X86, test x$TARGET = xX86) *************** AM_CONDITIONAL(ARM, test x$TARGET = xARM *** 97,121 **** AM_CONDITIONAL(S390, test x$TARGET = xS390) AM_CONDITIONAL(X86_64, test x$TARGET = xX86_64) AM_CONDITIONAL(SH, test x$TARGET = xSH) ! if test x$TARGET = xMIPS_LINUX; then ! TARGET=MIPS ! fi AC_HEADER_STDC AC_CHECK_FUNCS(memcpy) AC_FUNC_ALLOCA - dnl AC_CHECK_SIZEOF(char) - AC_COMPILE_CHECK_SIZEOF(short) - AC_COMPILE_CHECK_SIZEOF(int) - AC_COMPILE_CHECK_SIZEOF(long) - AC_COMPILE_CHECK_SIZEOF(long long) - AC_COMPILE_CHECK_SIZEOF(float) AC_COMPILE_CHECK_SIZEOF(double) AC_COMPILE_CHECK_SIZEOF(long double) ! AC_COMPILE_CHECK_SIZEOF(void *) AC_C_BIGENDIAN_CROSS if test x$TARGET = xSPARC; then --- 108,137 ---- AM_CONDITIONAL(S390, test x$TARGET = xS390) AM_CONDITIONAL(X86_64, test x$TARGET = xX86_64) AM_CONDITIONAL(SH, test x$TARGET = xSH) + AM_CONDITIONAL(SH64, test x$TARGET = xSH64) ! case x$TARGET in ! xMIPS*) TARGET=MIPS ;; ! *) ;; ! esac AC_HEADER_STDC AC_CHECK_FUNCS(memcpy) AC_FUNC_ALLOCA AC_COMPILE_CHECK_SIZEOF(double) AC_COMPILE_CHECK_SIZEOF(long double) ! # Also AC_SUBST this variable for ffi.h. ! HAVE_LONG_DOUBLE=0 ! if test $ac_cv_sizeof_double != $ac_cv_sizeof_long_double; then ! if test $ac_cv_sizeof_long_double != 0; then ! HAVE_LONG_DOUBLE=1 ! AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the long double type and it is bigger than a double]) ! fi ! fi ! AC_SUBST(HAVE_LONG_DOUBLE) ! AC_C_BIGENDIAN_CROSS if test x$TARGET = xSPARC; then *************** if test x$TARGET = xSPARC; then *** 149,154 **** --- 165,194 ---- fi fi + AC_CACHE_CHECK([whether .eh_frame section should be read-only], + libffi_cv_ro_eh_frame, [ + libffi_cv_ro_eh_frame=no + echo 'extern void foo (void); void bar (void) { foo (); foo (); }' > conftest.c + if $CC $CFLAGS -S -fpic -fexceptions -o conftest.s conftest.c > /dev/null 2>&1; then + if grep '.section.*eh_frame.*"a"' conftest.s > /dev/null; then + libffi_cv_ro_eh_frame=yes + elif grep '.section.*eh_frame.*#alloc' conftest.c \ + | grep -v '#write' > /dev/null; then + libffi_cv_ro_eh_frame=yes + fi + fi + rm -f conftest.* + ]) + if test "x$libffi_cv_ro_eh_frame" = xyes; then + AC_DEFINE(HAVE_RO_EH_FRAME, 1, + [Define if .eh_frame sections should be read-only.]) + AC_DEFINE(EH_FRAME_FLAGS, "a", + [Define to the flags needed for the .section .eh_frame directive.]) + else + AC_DEFINE(EH_FRAME_FLAGS, "aw", + [Define to the flags needed for the .section .eh_frame directive.]) + fi + AC_SUBST(TARGET) AC_SUBST(TARGETDIR) *************** AC_SUBST(SHELL) *** 157,181 **** AC_ARG_ENABLE(debug, [ --enable-debug debugging mode], if test "$enable_debug" = "yes"; then ! AC_DEFINE(FFI_DEBUG) fi) AC_ARG_ENABLE(structs, [ --disable-structs omit code for struct support], if test "$enable_structs" = "no"; then ! AC_DEFINE(FFI_NO_STRUCTS) fi) AC_ARG_ENABLE(raw-api, [ --disable-raw-api make the raw api unavailable], if test "$enable_raw_api" = "no"; then ! AC_DEFINE(FFI_NO_RAW_API) fi) AC_ARG_ENABLE(purify-safety, [ --enable-purify-safety purify-safe mode], if test "$enable_purify_safety" = "yes"; then ! AC_DEFINE(USING_PURIFY) fi) if test -n "$with_cross_host" && --- 197,221 ---- AC_ARG_ENABLE(debug, [ --enable-debug debugging mode], if test "$enable_debug" = "yes"; then ! AC_DEFINE(FFI_DEBUG, 1, [Define this if you want extra debugging.]) fi) AC_ARG_ENABLE(structs, [ --disable-structs omit code for struct support], if test "$enable_structs" = "no"; then ! AC_DEFINE(FFI_NO_STRUCTS, 1, [Define this is you do not want support for aggregate types.]) fi) AC_ARG_ENABLE(raw-api, [ --disable-raw-api make the raw api unavailable], if test "$enable_raw_api" = "no"; then ! AC_DEFINE(FFI_NO_RAW_API, 1, [Define this is you do not want support for the raw API.]) fi) AC_ARG_ENABLE(purify-safety, [ --enable-purify-safety purify-safe mode], if test "$enable_purify_safety" = "yes"; then ! AC_DEFINE(USING_PURIFY, 1, [Define this if you are using Purify and want to suppress spurious messages.]) fi) if test -n "$with_cross_host" && *************** else *** 186,202 **** toolexecdir='$(libdir)/gcc-lib/$(target_alias)' toolexeclibdir='$(libdir)' fi ! toolexeclibdir=$toolexeclibdir/`$CC -print-multi-os-directory` AC_SUBST(toolexecdir) AC_SUBST(toolexeclibdir) if test "${multilib}" = "yes"; then multilib_arg="--enable-multilib" else multilib_arg= fi ! AC_OUTPUT(include/Makefile include/ffi.h Makefile, [ if test -n "$CONFIG_FILES"; then LD="${ORIGINAL_LD_FOR_MULTILIBS}" --- 226,257 ---- toolexecdir='$(libdir)/gcc-lib/$(target_alias)' toolexeclibdir='$(libdir)' fi ! multi_os_directory=`$CC -print-multi-os-directory` ! case $multi_os_directory in ! .) ;; # Avoid trailing /. ! *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; ! esac AC_SUBST(toolexecdir) AC_SUBST(toolexeclibdir) + #Figure out where generated headers like ffitarget.h get installed. + changequote(,)dnl + gcc_version_trigger=${srcdir}/../gcc/version.c + gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'` + gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` + tool_include_dir='$(libdir)/gcc/$(target_alias)/'${gcc_version}/include + changequote([,])dnl + AC_SUBST(tool_include_dir) + AC_SUBST(gcc_version) + + if test "${multilib}" = "yes"; then multilib_arg="--enable-multilib" else multilib_arg= fi ! AC_OUTPUT(include/Makefile testsuite/Makefile include/ffi.h Makefile, [ if test -n "$CONFIG_FILES"; then LD="${ORIGINAL_LD_FOR_MULTILIBS}" *************** libffi_basedir=${libffi_basedir} *** 213,228 **** CC="${CC}" DEFS="$DEFS" ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}" - test ! -d include && mkdir include - test ! -f include/fficonfig.h && cp fficonfig.h include/fficonfig.h - if cmp -s fficonfig.h include/fficonfig.h 2>/dev/null; then - echo fficonfig.h unchanged - else - echo Moving fficonfig.h to include/fficonfig.h - cp fficonfig.h include/fficonfig.h - fi - ) # Make target subdirectories if required. test -d src || mkdir src test -d src/${TARGETDIR} || mkdir src/${TARGETDIR} --- 268,278 ---- CC="${CC}" DEFS="$DEFS" ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}" # Make target subdirectories if required. test -d src || mkdir src test -d src/${TARGETDIR} || mkdir src/${TARGETDIR} + test -d include || mkdir include + + AC_LINK_FILES(src/$TARGETDIR/ffitarget.h, include/ffitarget.h) + ) diff -Nrc3pad gcc-3.3.3/libffi/fficonfig.h.in gcc-3.4.0/libffi/fficonfig.h.in *** gcc-3.3.3/libffi/fficonfig.h.in 2003-05-08 20:37:57.000000000 +0000 --- gcc-3.4.0/libffi/fficonfig.h.in 2003-11-21 11:24:08.000000000 +0000 *************** *** 25,60 **** /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS - /* Define this if you want extra debugging */ - #undef FFI_DEBUG - - /* Define this if you are using Purify and want to suppress - spurious messages. */ - #undef USING_PURIFY - - /* Define this is you do not want support for aggregate types. */ - #undef FFI_NO_STRUCTS - - /* Define this is you do not want support for the raw API. */ - #undef FFI_NO_RAW_API - /* Define if you have the memcpy function. */ #undef HAVE_MEMCPY ! /* The number of bytes in type short */ ! #undef SIZEOF_SHORT ! ! /* The number of bytes in type int */ ! #undef SIZEOF_INT ! ! /* The number of bytes in type long */ ! #undef SIZEOF_LONG ! /* The number of bytes in type long long */ ! #undef SIZEOF_LONG_LONG ! /* The number of bytes in type float */ ! #undef SIZEOF_FLOAT /* The number of bytes in type double */ #undef SIZEOF_DOUBLE --- 25,41 ---- /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define if you have the memcpy function. */ #undef HAVE_MEMCPY ! /* Define if read-only mmap of a plain file works. */ ! #undef HAVE_MMAP_FILE ! /* Define if mmap of /dev/zero works. */ ! #undef HAVE_MMAP_DEV_ZERO ! /* Define if mmap with MAP_ANON(YMOUS) works. */ ! #undef HAVE_MMAP_ANON /* The number of bytes in type double */ #undef SIZEOF_DOUBLE *************** *** 62,73 **** /* The number of bytes in type long double */ #undef SIZEOF_LONG_DOUBLE ! /* The number of bytes in type void * */ ! #undef SIZEOF_VOID_P /* whether byteorder is bigendian */ #undef WORDS_BIGENDIAN /* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ #undef BYTEORDER --- 43,58 ---- /* The number of bytes in type long double */ #undef SIZEOF_LONG_DOUBLE ! /* Define if you have the long double type and it is bigger than a double */ ! #undef HAVE_LONG_DOUBLE /* whether byteorder is bigendian */ #undef WORDS_BIGENDIAN + /* Define if the host machine stores words of multi-word integers in + big-endian order. */ + #undef HOST_WORDS_BIG_ENDIAN + /* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ #undef BYTEORDER *************** *** 77,79 **** --- 62,85 ---- /* Define if your assembler supports .register. */ #undef HAVE_AS_REGISTER_PSEUDO_OP + /* Define if .eh_frame sections should be read-only. */ + #undef HAVE_RO_EH_FRAME + + /* Define to the flags needed for the .section .eh_frame directive. */ + #undef EH_FRAME_FLAGS + + /* Define to the flags needed for the .section .eh_frame directive. */ + #undef EH_FRAME_FLAGS + + /* Define this if you want extra debugging. */ + #undef FFI_DEBUG + + /* Define this is you do not want support for aggregate types. */ + #undef FFI_NO_STRUCTS + + /* Define this is you do not want support for the raw API. */ + #undef FFI_NO_RAW_API + + /* Define this if you are using Purify and want to suppress spurious messages. */ + #undef USING_PURIFY + diff -Nrc3pad gcc-3.3.3/libffi/include/ffi_common.h gcc-3.4.0/libffi/include/ffi_common.h *** gcc-3.3.3/libffi/include/ffi_common.h 1999-08-08 22:58:30.000000000 +0000 --- gcc-3.4.0/libffi/include/ffi_common.h 2003-10-21 19:01:53.000000000 +0000 *************** *** 1,7 **** /* ----------------------------------------------------------------------- ! ffi_common.h - Copyright (c) 1996 Cygnus Solutions ! ! $Id: ffi_common.h,v 1.1 1999/08/08 22:58:30 green Exp $ Common internal definitions and macros. Only necessary for building libffi. --- 1,5 ---- /* ----------------------------------------------------------------------- ! ffi_common.h - Copyright (c) 1996 Red Hat, Inc. Common internal definitions and macros. Only necessary for building libffi. *************** *** 14,19 **** --- 12,19 ---- extern "C" { #endif + #include + /* Do not move this. Some versions of AIX are very picky about where this is positioned. */ #ifdef __GNUC__ *************** char *alloca (); *** 41,76 **** # endif #endif ! #ifndef FALSE ! #define FALSE 0 ! #endif ! ! #ifndef TRUE ! #define TRUE (!FALSE) ! #endif ! ! #ifndef __cplusplus ! /* bool is a keyword in C++ */ ! /*@-cppnames@*/ ! typedef int bool; ! /*@=cppnames@*/ #endif #ifdef FFI_DEBUG ! ! /* Debugging functions */ ! /*@exits@*/ int ffi_assert(/*@temp@*/ char *file, int line); void ffi_stop_here(void); ! bool ffi_type_test(/*@temp@*/ /*@out@*/ ffi_type *a); ! ! #define FFI_ASSERT(x) ((x) ? 0 : ffi_assert(__FILE__,__LINE__)) #else - #define FFI_ASSERT(x) ! #endif /* Perform machine dependent cif processing */ ffi_status ffi_prep_cif_machdep(ffi_cif *cif); --- 41,66 ---- # endif #endif ! #if defined(FFI_DEBUG) ! #include #endif #ifdef FFI_DEBUG ! /*@exits@*/ void ffi_assert(/*@temp@*/ char *expr, /*@temp@*/ char *file, int line); void ffi_stop_here(void); ! void ffi_type_test(/*@temp@*/ /*@out@*/ ffi_type *a, /*@temp@*/ char *file, int line); + #define FFI_ASSERT(x) ((x) ? (void)0 : ffi_assert(#x, __FILE__,__LINE__)) + #define FFI_ASSERT_AT(x, f, l) ((x) ? 0 : ffi_assert(#x, (f), (l))) + #define FFI_ASSERT_VALID_TYPE(x) ffi_type_test (x, __FILE__, __LINE__) #else #define FFI_ASSERT(x) ! #define FFI_ASSERT_AT(x, f, l) ! #define FFI_ASSERT_VALID_TYPE(x) #endif + #define ALIGN(v, a) (((((size_t) (v))-1) | ((a)-1))+1) + /* Perform machine dependent cif processing */ ffi_status ffi_prep_cif_machdep(ffi_cif *cif); *************** typedef struct *** 82,87 **** --- 72,90 ---- /*@dependent@*/ void **avalue; } extended_cif; + /* Terse sized type definitions. */ + typedef unsigned int UINT8 __attribute__((__mode__(__QI__))); + typedef signed int SINT8 __attribute__((__mode__(__QI__))); + typedef unsigned int UINT16 __attribute__((__mode__(__HI__))); + typedef signed int SINT16 __attribute__((__mode__(__HI__))); + typedef unsigned int UINT32 __attribute__((__mode__(__SI__))); + typedef signed int SINT32 __attribute__((__mode__(__SI__))); + typedef unsigned int UINT64 __attribute__((__mode__(__DI__))); + typedef signed int SINT64 __attribute__((__mode__(__DI__))); + + typedef float FLOAT32; + + #ifdef __cplusplus } #endif diff -Nrc3pad gcc-3.3.3/libffi/include/ffi.h.in gcc-3.4.0/libffi/include/ffi.h.in *** gcc-3.3.3/libffi/include/ffi.h.in 2003-03-22 11:57:33.000000000 +0000 --- gcc-3.4.0/libffi/include/ffi.h.in 2003-10-21 19:01:53.000000000 +0000 *************** *** 1,5 **** /* -----------------------------------------------------------------*-C-*- ! libffi @VERSION@ - Copyright (c) 1996-2003 Cygnus Solutions Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the --- 1,5 ---- /* -----------------------------------------------------------------*-C-*- ! libffi @VERSION@ - Copyright (c) 1996-2003 Red Hat, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the *************** extern "C" { *** 60,293 **** /* ---- System configuration information --------------------------------- */ ! #include ! ! #if !defined(LIBFFI_ASM) ! #include ! #if defined(FFI_DEBUG) ! #include ! #endif ! #endif ! ! /* ---- Generic type definitions ----------------------------------------- */ ! ! #define FLOAT32 float ! #define FLOAT64 double ! #define FLOAT80 long double ! ! #define UINT8 unsigned char ! #define SINT8 signed char ! ! #if SIZEOF_INT == 2 ! ! #define UINT16 unsigned int ! #define SINT16 int ! #define ffi_type_uint ffi_type_uint16 ! #define ffi_type_sint ffi_type_sint16 ! ! #else ! #if SIZEOF_SHORT == 2 ! ! #define UINT16 unsigned short ! #define SINT16 short ! #define ffi_type_ushort ffi_type_uint16 ! #define ffi_type_sshort ffi_type_sint16 ! ! #endif ! #endif ! ! #if SIZEOF_INT == 4 ! ! #define UINT32 unsigned int ! #define SINT32 int ! #define ffi_type_uint ffi_type_uint32 ! #define ffi_type_sint ffi_type_sint32 ! #else ! #if SIZEOF_SHORT == 4 ! #define UINT32 unsigned short ! #define SINT32 short ! #define ffi_type_ushort ffi_type_uint32 ! #define ffi_type_sshort ffi_type_sint32 #else ! #if SIZEOF_LONG == 4 ! ! #define UINT32 unsigned long ! #define SINT32 long ! #define ffi_type_ulong ffi_type_uint32 ! #define ffi_type_slong ffi_type_sint32 ! ! #endif ! #endif #endif ! #if SIZEOF_INT == 8 ! ! #define UINT64 unsigned int ! #define SINT64 int ! #define ffi_type_uint ffi_type_uint64 ! #define ffi_type_sint ffi_type_sint64 ! ! #else ! #if SIZEOF_LONG == 8 ! ! #define UINT64 unsigned long ! #define SINT64 long ! #define ffi_type_ulong ffi_type_uint64 ! #define ffi_type_slong ffi_type_sint64 ! #else ! #if SIZEOF_LONG_LONG == 8 ! ! #define UINT64 unsigned long long ! #define SINT64 long long ! #define ffi_type_ulong ffi_type_uint64 ! #define ffi_type_slong ffi_type_sint64 ! ! #endif ! #endif #endif ! /* ---- System specific configurations ----------------------------------- */ ! ! #ifdef MIPS ! #include #else ! #define SIZEOF_ARG SIZEOF_VOID_P ! #endif ! ! #ifdef SPARC ! #if defined(__arch64__) || defined(__sparcv9) ! #define SPARC64 ! #endif #endif ! #ifdef S390 ! #if defined (__s390x__) ! #define S390X ! #endif #endif ! #ifdef X86_64 ! #if defined (__i386__) ! #undef X86_64 ! #define X86 ! #endif #endif - #ifndef LIBFFI_ASM - - /* ---- Generic type definitions ----------------------------------------- */ - - #define ALIGN(v, a) (((((size_t) (v))-1) | ((a)-1))+1) /* The closure code assumes that this works on pointers, i.e. a size_t */ /* can hold a pointer. */ - typedef enum ffi_abi { - - /* Leave this for debugging purposes */ - FFI_FIRST_ABI = 0, - - /* ---- Sparc -------------------- */ - #ifdef SPARC - FFI_V8, - FFI_V8PLUS, - FFI_V9, - #ifdef SPARC64 - FFI_DEFAULT_ABI = FFI_V9, - #else - FFI_DEFAULT_ABI = FFI_V8, - #endif - #endif - - /* ---- Intel x86 Win32 ---------- */ - #ifdef X86_WIN32 - FFI_SYSV, - FFI_STDCALL, - /* TODO: Add fastcall support for the sake of completeness */ - FFI_DEFAULT_ABI = FFI_SYSV, - #endif - - /* ---- Intel x86 and AMD x86-64 - */ - #if !defined(X86_WIN32) && (defined(__i386__) || defined(__x86_64__)) - FFI_SYSV, - FFI_UNIX64, /* Unix variants all use the same ABI for x86-64 */ - #ifdef __i386__ - FFI_DEFAULT_ABI = FFI_SYSV, - #else - FFI_DEFAULT_ABI = FFI_UNIX64, - #endif - #endif - - /* ---- Intel ia64 ---------------- */ - #ifdef IA64 - FFI_UNIX, /* Linux and all Unix variants use the same conventions */ - FFI_DEFAULT_ABI = FFI_UNIX, - #endif - - /* ---- Mips --------------------- */ - #ifdef MIPS - FFI_O32, - FFI_N32, - FFI_N64, - #endif - - /* ---- Alpha -------------------- */ - #ifdef ALPHA - FFI_OSF, - FFI_DEFAULT_ABI = FFI_OSF, - #endif - - /* ---- Motorola m68k ------------ */ - #ifdef M68K - FFI_SYSV, - FFI_DEFAULT_ABI = FFI_SYSV, - #endif - - /* ---- PowerPC ------------------ */ - #ifdef POWERPC - FFI_SYSV, - FFI_GCC_SYSV, - FFI_DEFAULT_ABI = FFI_GCC_SYSV, - #endif - - #ifdef POWERPC_AIX - FFI_AIX, - FFI_DARWIN, - FFI_DEFAULT_ABI = FFI_AIX, - #endif - - #ifdef POWERPC_DARWIN - FFI_AIX, - FFI_DARWIN, - FFI_DEFAULT_ABI = FFI_DARWIN, - #endif - - /* ---- ARM --------------------- */ - #ifdef ARM - FFI_SYSV, - FFI_DEFAULT_ABI = FFI_SYSV, - #endif - - /* ---- S390 --------------------- */ - #ifdef S390 - FFI_SYSV, - FFI_DEFAULT_ABI = FFI_SYSV, - #endif - - /* ---- SuperH ------------------- */ - #ifdef SH - FFI_SYSV, - FFI_DEFAULT_ABI = FFI_SYSV, - #endif - - /* Leave this for debugging purposes */ - FFI_LAST_ABI - - } ffi_abi; - typedef struct _ffi_type { size_t size; --- 60,130 ---- /* ---- System configuration information --------------------------------- */ ! #include ! #ifndef LIBFFI_ASM ! #include ! #include + /* LONG_LONG_MAX is not always defined (not if STRICT_ANSI, for example). + But we can find it either under the correct ANSI name, or under GNU + C's internal name. */ + #ifdef LONG_LONG_MAX + # define FFI_LONG_LONG_MAX LONG_LONG_MAX #else ! # ifdef LLONG_MAX ! # define FFI_LONG_LONG_MAX LLONG_MAX ! # else ! # ifdef __GNUC__ ! # define FFI_LONG_LONG_MAX __LONG_LONG_MAX__ ! # endif ! # endif #endif ! #if SCHAR_MAX == 127 ! # define ffi_type_uchar ffi_type_uint8 ! # define ffi_type_schar ffi_type_sint8 #else ! #error "char size not supported" #endif ! #if SHRT_MAX == 32767 ! # define ffi_type_ushort ffi_type_uint16 ! # define ffi_type_sshort ffi_type_sint16 ! #elif SHRT_MAX == 2147483647 ! # define ffi_type_ushort ffi_type_uint32 ! # define ffi_type_sshort ffi_type_sint32 #else ! #error "short size not supported" #endif ! #if INT_MAX == 32767 ! # define ffi_type_uint ffi_type_uint16 ! # define ffi_type_sint ffi_type_sint16 ! #elif INT_MAX == 2147483647 ! # define ffi_type_uint ffi_type_uint32 ! # define ffi_type_sint ffi_type_sint32 ! #elif INT_MAX == 9223372036854775807 ! # define ffi_type_uint ffi_type_uint64 ! # define ffi_type_sint ffi_type_sint64 ! #else ! #error "int size not supported" #endif ! #define ffi_type_ulong ffi_type_uint64 ! #define ffi_type_slong ffi_type_sint64 ! #if LONG_MAX == 2147483647 ! # if FFI_LONG_LONG_MAX != 9223372036854775807 ! #error "no 64-bit data type supported" ! # endif ! #elif LONG_MAX != 9223372036854775807 ! #error "long size not supported" #endif /* The closure code assumes that this works on pointers, i.e. a size_t */ /* can hold a pointer. */ typedef struct _ffi_type { size_t size; *************** extern ffi_type ffi_type_double; *** 311,319 **** extern ffi_type ffi_type_longdouble; extern ffi_type ffi_type_pointer; - /* Characters are 8 bit integral types */ - #define ffi_type_schar ffi_type_sint8 - #define ffi_type_uchar ffi_type_uint8 typedef enum { FFI_OK = 0, --- 148,153 ---- *************** typedef struct { *** 330,378 **** /*@dependent@*/ ffi_type *rtype; unsigned bytes; unsigned flags; ! ! #ifdef MIPS ! #if _MIPS_SIM == _ABIN32 ! unsigned rstruct_flag; ! #endif #endif - } ffi_cif; - #if SIZEOF_ARG == 4 - typedef UINT32 ffi_arg; - #else - #if SIZEOF_ARG == 8 - typedef UINT64 ffi_arg; - #else - -- unsupported configuration - #endif - #endif - /* ---- Definitions for the raw API -------------------------------------- */ ! #if !FFI_NO_RAW_API ! ! #if SIZEOF_ARG == 4 ! ! #define UINT_ARG UINT32 ! #define SINT_ARG SINT32 ! ! #endif ! ! #if SIZEOF_ARG == 8 ! ! #define UINT_ARG UINT64 ! #define SINT_ARG SINT64 ! #endif typedef union { ! SINT_ARG sint; ! UINT_ARG uint; ! float flt; ! char data[SIZEOF_ARG]; ! void* ptr; } ffi_raw; void ffi_raw_call (/*@dependent@*/ ffi_cif *cif, --- 164,190 ---- /*@dependent@*/ ffi_type *rtype; unsigned bytes; unsigned flags; ! #ifdef FFI_EXTRA_CIF_FIELDS ! FFI_EXTRA_CIF_FIELDS; #endif } ffi_cif; /* ---- Definitions for the raw API -------------------------------------- */ ! #ifndef FFI_SIZEOF_ARG ! # if LONG_MAX == 2147483647 ! # define FFI_SIZEOF_ARG 4 ! # elif LONG_MAX == 9223372036854775807 ! # define FFI_SIZEOF_ARG 8 ! # endif #endif typedef union { ! ffi_sarg sint; ! ffi_arg uint; ! float flt; ! char data[FFI_SIZEOF_ARG]; ! void* ptr; } ffi_raw; void ffi_raw_call (/*@dependent@*/ ffi_cif *cif, *************** void ffi_ptrarray_to_raw (ffi_cif *cif, *** 384,391 **** void ffi_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args); size_t ffi_raw_size (ffi_cif *cif); - #if !NO_JAVA_RAW_API - /* This is analogous to the raw API, except it uses Java parameter */ /* packing, even on 64-bit machines. I.e. on 64-bit machines */ /* longs and doubles are followed by an empty 64-bit word. */ --- 196,201 ---- *************** void ffi_java_ptrarray_to_raw (ffi_cif * *** 399,508 **** void ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args); size_t ffi_java_raw_size (ffi_cif *cif); - #endif /* !NO_JAVA_RAW_API */ - - #endif /* !FFI_NO_RAW_API */ - /* ---- Definitions for closures ----------------------------------------- */ - #ifdef __i386__ - - #define FFI_CLOSURES 1 /* x86 supports closures */ - #define FFI_TRAMPOLINE_SIZE 10 - #define FFI_NATIVE_RAW_API 1 /* and has native raw api support */ - - #elif defined(IA64) - - #define FFI_CLOSURES 1 - #define FFI_TRAMPOLINE_SIZE 24 /* Really the following struct, which */ - /* can be interpreted as a C function */ - /* decriptor: */ - - struct ffi_ia64_trampoline_struct { - void * code_pointer; /* Pointer to ffi_closure_UNIX */ - void * fake_gp; /* Pointer to closure, installed as gp */ - void * real_gp; /* Real gp value, reinstalled by */ - /* ffi_closure_UNIX. */ - }; - #define FFI_NATIVE_RAW_API 0 - - #elif defined(ALPHA) - - #define FFI_CLOSURES 1 - #define FFI_TRAMPOLINE_SIZE 24 - #define FFI_NATIVE_RAW_API 0 - - #elif defined(POWERPC) - - #define FFI_CLOSURES 1 - #define FFI_TRAMPOLINE_SIZE 40 - #define FFI_NATIVE_RAW_API 0 - - #elif defined(POWERPC_DARWIN) - - #define FFI_CLOSURES 1 - #define FFI_TRAMPOLINE_SIZE 40 - #define FFI_NATIVE_RAW_API 0 - - #elif defined(POWERPC_AIX) - - #define FFI_CLOSURES 1 - #define FFI_TRAMPOLINE_SIZE 24 /* see struct below */ - #define FFI_NATIVE_RAW_API 0 - - #elif defined(SPARC64) - - #define FFI_CLOSURES 1 - #define FFI_TRAMPOLINE_SIZE 24 - #define FFI_NATIVE_RAW_API 0 - - #elif defined(SPARC) - - #define FFI_CLOSURES 1 - #define FFI_TRAMPOLINE_SIZE 16 - #define FFI_NATIVE_RAW_API 0 - - #elif defined(S390) - - #define FFI_CLOSURES 1 - #ifdef S390X - #define FFI_TRAMPOLINE_SIZE 32 - #else - #define FFI_TRAMPOLINE_SIZE 16 - #endif - #define FFI_NATIVE_RAW_API 0 - - #elif defined(SH) - - #define FFI_CLOSURES 1 - #define FFI_TRAMPOLINE_SIZE 16 - #define FFI_NATIVE_RAW_API 0 - - #elif defined(__x86_64__) - - #define FFI_CLOSURES 1 - #define FFI_TRAMPOLINE_SIZE 24 - #define FFI_NATIVE_RAW_API 0 - - #else - - #define FFI_CLOSURES 0 - #define FFI_NATIVE_RAW_API 0 - - #endif - - #if defined(POWERPC_DARWIN) || defined(POWERPC_AIX) - - struct ffi_aix_trampoline_struct { - void * code_pointer; /* Pointer to ffi_closure_ASM */ - void * toc; /* TOC */ - void * static_chain; /* Pointer to closure */ - }; - - #endif - - - #if FFI_CLOSURES typedef struct { --- 209,216 ---- *************** ffi_prep_closure (ffi_closure*, *** 518,525 **** void (*fun)(ffi_cif*,void*,void**,void*), void *user_data); - #if !FFI_NO_RAW_API - typedef struct { char tramp[FFI_TRAMPOLINE_SIZE]; --- 226,231 ---- *************** ffi_prep_raw_closure (ffi_raw_closure*, *** 547,561 **** void (*fun)(ffi_cif*,void*,ffi_raw*,void*), void *user_data); - #ifndef NO_JAVA_RAW_API ffi_status ffi_prep_java_raw_closure (ffi_raw_closure*, ffi_cif *cif, void (*fun)(ffi_cif*,void*,ffi_raw*,void*), void *user_data); - #endif - #endif /* !FFI_NO_RAW_API */ #endif /* FFI_CLOSURES */ /* ---- Public interface definition -------------------------------------- */ --- 253,264 ---- *************** void ffi_call(/*@dependent@*/ ffi_cif *c *** 578,602 **** #endif #define FFI_TYPE_VOID 0 #define FFI_TYPE_INT 1 #define FFI_TYPE_FLOAT 2 #define FFI_TYPE_DOUBLE 3 ! #if SIZEOF_LONG_DOUBLE == SIZEOF_DOUBLE ! #define FFI_TYPE_LONGDOUBLE FFI_TYPE_DOUBLE ! #else #define FFI_TYPE_LONGDOUBLE 4 #endif ! ! #define FFI_TYPE_UINT8 5 /* If this changes, update ffi_mips.h. */ ! #define FFI_TYPE_SINT8 6 /* If this changes, update ffi_mips.h. */ #define FFI_TYPE_UINT16 7 #define FFI_TYPE_SINT16 8 #define FFI_TYPE_UINT32 9 #define FFI_TYPE_SINT32 10 #define FFI_TYPE_UINT64 11 #define FFI_TYPE_SINT64 12 ! #define FFI_TYPE_STRUCT 13 /* If this changes, update ffi_mips.h. */ #define FFI_TYPE_POINTER 14 /* This should always refer to the last type code (for sanity checks) */ --- 281,305 ---- #endif + /* If these change, update src/mips/ffitarget.h. */ #define FFI_TYPE_VOID 0 #define FFI_TYPE_INT 1 #define FFI_TYPE_FLOAT 2 #define FFI_TYPE_DOUBLE 3 ! #if @HAVE_LONG_DOUBLE@ #define FFI_TYPE_LONGDOUBLE 4 + #else + #define FFI_TYPE_LONGDOUBLE FFI_TYPE_DOUBLE #endif ! #define FFI_TYPE_UINT8 5 ! #define FFI_TYPE_SINT8 6 #define FFI_TYPE_UINT16 7 #define FFI_TYPE_SINT16 8 #define FFI_TYPE_UINT32 9 #define FFI_TYPE_SINT32 10 #define FFI_TYPE_UINT64 11 #define FFI_TYPE_SINT64 12 ! #define FFI_TYPE_STRUCT 13 #define FFI_TYPE_POINTER 14 /* This should always refer to the last type code (for sanity checks) */ diff -Nrc3pad gcc-3.3.3/libffi/include/ffi_mips.h gcc-3.4.0/libffi/include/ffi_mips.h *** gcc-3.3.3/libffi/include/ffi_mips.h 2001-03-02 22:21:22.000000000 +0000 --- gcc-3.4.0/libffi/include/ffi_mips.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,141 **** - /* ----------------------------------------------------------------------- - ffi-mips.h - Copyright (c) 1996 Cygnus Support - - MIPS FFI Definitions - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - ``Software''), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL CYGNUS SUPPORT BE LIABLE FOR ANY CLAIM, DAMAGES OR - OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - OTHER DEALINGS IN THE SOFTWARE. - ----------------------------------------------------------------------- */ - - #ifndef FFI_MIPS_H - - #include - - #if !defined(_MIPS_SIM) - -- something is very wrong -- - #else - # if _MIPS_SIM==_ABIN32 && defined(_ABIN32) - # define FFI_MIPS_N32 - # else - # if defined(__GNUC__) - # define FFI_MIPS_O32 - # else - # if _MIPS_SIM==_ABIO32 - # define FFI_MIPS_O32 - # else - -- this is an unsupported platform -- - # endif - # endif - # endif - #endif - - #define v0 $2 - #define v1 $3 - #define a0 $4 - #define a1 $5 - #define a2 $6 - #define a3 $7 - #define a4 $8 - #define a5 $9 - #define a6 $10 - #define a7 $11 - #define t0 $8 - #define t1 $9 - #define t2 $10 - #define t3 $11 - #define t4 $12 - #define t5 $13 - #define t6 $14 - #define t7 $15 - #define t8 $24 - #define t9 $25 - #define ra $31 - - #if defined(FFI_MIPS_O32) - - #define FFI_DEFAULT_ABI FFI_O32 - - /* O32 stack frames have 32bit integer args */ - #define SLOT_TYPE_UNSIGNED UINT32 - #define SLOT_TYPE_SIGNED SINT32 - #define SIZEOF_ARG 4 - - #define REG_L lw - #define REG_S sw - #define SUBU subu - #define ADDU addu - #define SRL srl - #define LI li - - #else - - #define FFI_DEFAULT_ABI FFI_N32 - - /* N32 and N64 frames have 64bit integer args */ - #define SLOT_TYPE_UNSIGNED UINT64 - #define SLOT_TYPE_SIGNED SINT64 - #define SIZEOF_ARG 8 - - #define REG_L ld - #define REG_S sd - #define SUBU dsubu - #define ADDU daddu - #define SRL dsrl - #define LI dli - - #endif - - #define FFI_FLAG_BITS 2 - - /* SGI's strange assembler requires that we multiply by 4 rather - than shift left by FFI_FLAG_BITS */ - - #define FFI_ARGS_D FFI_TYPE_DOUBLE - #define FFI_ARGS_F FFI_TYPE_FLOAT - #define FFI_ARGS_DD FFI_TYPE_DOUBLE * 4 + FFI_TYPE_DOUBLE - #define FFI_ARGS_FF FFI_TYPE_FLOAT * 4 + FFI_TYPE_FLOAT - #define FFI_ARGS_FD FFI_TYPE_DOUBLE * 4 + FFI_TYPE_FLOAT - #define FFI_ARGS_DF FFI_TYPE_FLOAT * 4 + FFI_TYPE_DOUBLE - - /* Needed for N32 structure returns */ - #define FFI_TYPE_SMALLSTRUCT FFI_TYPE_UINT8 - #define FFI_TYPE_SMALLSTRUCT2 FFI_TYPE_SINT8 - - #if 0 - - /* The SGI assembler can't handle this.. */ - - #define FFI_TYPE_STRUCT_DD (( FFI_ARGS_DD ) << 4) + FFI_TYPE_STRUCT - - #else - - /* ...so we calculate these by hand! */ - - #define FFI_TYPE_STRUCT_D 61 - #define FFI_TYPE_STRUCT_F 45 - #define FFI_TYPE_STRUCT_DD 253 - #define FFI_TYPE_STRUCT_FF 173 - #define FFI_TYPE_STRUCT_FD 237 - #define FFI_TYPE_STRUCT_DF 189 - #define FFI_TYPE_STRUCT_SMALL 93 - #define FFI_TYPE_STRUCT_SMALL2 109 - - #endif - - #endif --- 0 ---- diff -Nrc3pad gcc-3.3.3/libffi/include/Makefile.am gcc-3.4.0/libffi/include/Makefile.am *** gcc-3.3.3/libffi/include/Makefile.am 1999-08-08 22:58:30.000000000 +0000 --- gcc-3.4.0/libffi/include/Makefile.am 2003-11-12 18:18:30.000000000 +0000 *************** *** 1,9 **** ## Process this with automake to create Makefile.in ! AUTOMAKE_OPTIONS = foreign ! EXTRA_DIST = ffi.h.in ffi_common.h ffi_mips.h hackdir=$(includedir) ! hack_DATA=fficonfig.h ffi.h ffi_mips.h \ No newline at end of file --- 1,13 ---- ## Process this with automake to create Makefile.in ! AUTOMAKE_OPTIONS=foreign ! DISTCLEANFILES=ffitarget.h ! EXTRA_DIST=ffi.h.in ffi_common.h hackdir=$(includedir) ! hack_DATA= ffi.h ! ! toollibffidir = @tool_include_dir@/libffi ! toollibffi_HEADERS = ffitarget.h diff -Nrc3pad gcc-3.3.3/libffi/include/Makefile.in gcc-3.4.0/libffi/include/Makefile.in *** gcc-3.3.3/libffi/include/Makefile.in 2003-04-05 01:46:50.000000000 +0000 --- gcc-3.4.0/libffi/include/Makefile.in 2003-11-12 18:18:30.000000000 +0000 *************** *** 1,6 **** ! # Makefile.in generated automatically by automake 1.4-p5 from Makefile.am ! # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. --- 1,6 ---- ! # Makefile.in generated automatically by automake 1.4 from Makefile.am ! # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. *************** POST_INSTALL = : *** 57,64 **** --- 57,69 ---- NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : + build_alias = @build_alias@ + build_triplet = @build@ host_alias = @host_alias@ host_triplet = @host@ + target_alias = @target_alias@ + target_triplet = @target@ + AM_RUNTESTFLAGS = @AM_RUNTESTFLAGS@ AS = @AS@ CC = @CC@ CXX = @CXX@ *************** DLLTOOL = @DLLTOOL@ *** 67,72 **** --- 72,78 ---- EXEEXT = @EXEEXT@ GCJ = @GCJ@ GCJFLAGS = @GCJFLAGS@ + HAVE_LONG_DOUBLE = @HAVE_LONG_DOUBLE@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ MAINT = @MAINT@ *************** STRIP = @STRIP@ *** 80,107 **** TARGET = @TARGET@ TARGETDIR = @TARGETDIR@ VERSION = @VERSION@ libffi_basedir = @libffi_basedir@ toolexecdir = @toolexecdir@ toolexeclibdir = @toolexeclibdir@ AUTOMAKE_OPTIONS = foreign ! EXTRA_DIST = ffi.h.in ffi_common.h ffi_mips.h hackdir = $(includedir) ! hack_DATA = fficonfig.h ffi.h ffi_mips.h mkinstalldirs = $(SHELL) $(top_srcdir)/${libffi_basedir}../mkinstalldirs CONFIG_HEADER = ../fficonfig.h CONFIG_CLEAN_FILES = ffi.h DATA = $(hack_DATA) DIST_COMMON = Makefile.am Makefile.in ffi.h.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) ! TAR = gtar GZIP_ENV = --best all: all-redirect .SUFFIXES: --- 86,121 ---- TARGET = @TARGET@ TARGETDIR = @TARGETDIR@ VERSION = @VERSION@ + gcc_version = @gcc_version@ libffi_basedir = @libffi_basedir@ + tool_include_dir = @tool_include_dir@ toolexecdir = @toolexecdir@ toolexeclibdir = @toolexeclibdir@ AUTOMAKE_OPTIONS = foreign ! DISTCLEANFILES = ffitarget.h ! EXTRA_DIST = ffi.h.in ffi_common.h hackdir = $(includedir) ! hack_DATA = ffi.h ! ! toollibffidir = @tool_include_dir@/libffi ! toollibffi_HEADERS = ffitarget.h mkinstalldirs = $(SHELL) $(top_srcdir)/${libffi_basedir}../mkinstalldirs CONFIG_HEADER = ../fficonfig.h CONFIG_CLEAN_FILES = ffi.h DATA = $(hack_DATA) + HEADERS = $(toollibffi_HEADERS) + DIST_COMMON = Makefile.am Makefile.in ffi.h.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) ! TAR = gnutar GZIP_ENV = --best all: all-redirect .SUFFIXES: *************** uninstall-hackDATA: *** 133,141 **** list='$(hack_DATA)'; for p in $$list; do \ rm -f $(DESTDIR)$(hackdir)/$$p; \ done tags: TAGS - TAGS: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) --- 147,196 ---- list='$(hack_DATA)'; for p in $$list; do \ rm -f $(DESTDIR)$(hackdir)/$$p; \ done + + install-toollibffiHEADERS: $(toollibffi_HEADERS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(toollibffidir) + @list='$(toollibffi_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ + echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(toollibffidir)/$$p"; \ + $(INSTALL_DATA) $$d$$p $(DESTDIR)$(toollibffidir)/$$p; \ + done + + uninstall-toollibffiHEADERS: + @$(NORMAL_UNINSTALL) + list='$(toollibffi_HEADERS)'; for p in $$list; do \ + rm -f $(DESTDIR)$(toollibffidir)/$$p; \ + done + tags: TAGS + ID: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $$unique $(LISP) + + TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) + + mostlyclean-tags: + + clean-tags: + + distclean-tags: + -rm -f TAGS ID + + maintainer-clean-tags: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) *************** installcheck: installcheck-am *** 168,187 **** install-exec-am: install-exec: install-exec-am ! install-data-am: install-hackDATA install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am ! uninstall-am: uninstall-hackDATA uninstall: uninstall-am ! all-am: Makefile $(DATA) all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: ! $(mkinstalldirs) $(DESTDIR)$(hackdir) mostlyclean-generic: --- 223,242 ---- install-exec-am: install-exec: install-exec-am ! install-data-am: install-hackDATA install-toollibffiHEADERS install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am ! uninstall-am: uninstall-hackDATA uninstall-toollibffiHEADERS uninstall: uninstall-am ! all-am: Makefile $(DATA) $(HEADERS) all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: ! $(mkinstalldirs) $(DESTDIR)$(hackdir) $(DESTDIR)$(toollibffidir) mostlyclean-generic: *************** clean-generic: *** 191,223 **** distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: ! mostlyclean-am: mostlyclean-generic mostlyclean: mostlyclean-am ! clean-am: clean-generic mostlyclean-am clean: clean-am ! distclean-am: distclean-generic clean-am -rm -f libtool distclean: distclean-am ! maintainer-clean-am: maintainer-clean-generic distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-am ! .PHONY: uninstall-hackDATA install-hackDATA tags distdir info-am info \ ! dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ ! install-exec install-data-am install-data install-am install \ ! uninstall-am uninstall all-redirect all-am all installdirs \ ! mostlyclean-generic distclean-generic clean-generic \ ! maintainer-clean-generic clean mostlyclean distclean maintainer-clean # Tell versions [3.59,3.63) of GNU make to not export all variables. --- 246,282 ---- distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: ! mostlyclean-am: mostlyclean-tags mostlyclean-generic mostlyclean: mostlyclean-am ! clean-am: clean-tags clean-generic mostlyclean-am clean: clean-am ! distclean-am: distclean-tags distclean-generic clean-am -rm -f libtool distclean: distclean-am ! maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \ ! distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-am ! .PHONY: uninstall-hackDATA install-hackDATA uninstall-toollibffiHEADERS \ ! install-toollibffiHEADERS tags mostlyclean-tags distclean-tags \ ! clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \ ! check-am installcheck-am installcheck install-exec-am install-exec \ ! install-data-am install-data install-am install uninstall-am uninstall \ ! all-redirect all-am all installdirs mostlyclean-generic \ ! distclean-generic clean-generic maintainer-clean-generic clean \ ! mostlyclean distclean maintainer-clean # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nrc3pad gcc-3.3.3/libffi/LICENSE gcc-3.4.0/libffi/LICENSE *** gcc-3.3.3/libffi/LICENSE 1999-08-08 13:27:19.000000000 +0000 --- gcc-3.4.0/libffi/LICENSE 2003-10-21 19:01:53.000000000 +0000 *************** *** 1,4 **** ! libffi - Copyright (c) 1996-1999 Cygnus Solutions Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the --- 1,4 ---- ! libffi - Copyright (c) 1996-2003 Red Hat, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff -Nrc3pad gcc-3.3.3/libffi/Makefile.am gcc-3.4.0/libffi/Makefile.am *** gcc-3.3.3/libffi/Makefile.am 2003-01-28 01:44:57.000000000 +0000 --- gcc-3.4.0/libffi/Makefile.am 2003-10-21 19:01:53.000000000 +0000 *************** *** 2,24 **** AUTOMAKE_OPTIONS = cygnus ! SUBDIRS = include - EXTRA_DIST = LICENSE ChangeLog.v1 src/mips/ffi.c src/mips/n32.S \ - src/mips/n32.s src/mips/o32.S src/mips/o32.s \ - src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S \ - src/x86/ffi.c src/x86/sysv.S src/x86/win32.S \ - src/x86/ffi64.c src/x86/unix64.S \ - src/alpha/ffi.c src/alpha/osf.S \ - src/m68k/ffi.c src/m68k/sysv.S \ - src/powerpc/ffi.c src/powerpc/sysv.S \ - src/powerpc/ppc_closure.S src/powerpc/asm.h \ - src/powerpc/ffi_darwin.c \ - src/powerpc/darwin.S src/powerpc/aix.S \ - src/powerpc/darwin_closure.S src/powerpc/aix_closures.S \ - src/arm/ffi.c src/arm/sysv.S \ - src/s390/ffi.c src/s390/sysv.S \ - src/sh/ffi.c src/sh/sysv.S VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@ --- 2,29 ---- AUTOMAKE_OPTIONS = cygnus ! SUBDIRS = include testsuite ! ! EXTRA_DIST = LICENSE ChangeLog.v1 \ ! src/alpha/ffi.c src/alpha/osf.S src/alpha/ffitarget.h \ ! src/arm/ffi.c src/arm/sysv.S src/arm/ffitarget.h \ ! src/mips/ffi.c src/mips/n32.S src/mips/o32.S \ ! src/mips/ffitarget.h \ ! src/m68k/ffi.c src/m68k/sysv.S src/m68k/ffitarget.h \ ! src/powerpc/ffi.c src/powerpc/sysv.S \ ! src/powerpc/linux64.S src/powerpc/linux64_closure.S \ ! src/powerpc/ppc_closure.S src/powerpc/asm.h \ ! src/powerpc/aix.S src/powerpc/darwin.S \ ! src/powerpc/aix_closure.S src/powerpc/darwin_closure.S \ ! src/powerpc/ffi_darwin.c src/powerpc/ffitarget.h \ ! src/s390/ffi.c src/s390/sysv.S src/s390/ffitarget.h \ ! src/sh/ffi.c src/sh/sysv.S src/sh/ffitarget.h \ ! src/sh64/ffi.c src/sh64/sysv.S src/sh64/ffitarget.h \ ! src/sparc/v8.S src/sparc/v9.S src/sparc/ffitarget.h \ ! src/sparc/ffi.c \ ! src/x86/ffi.c src/x86/sysv.S src/x86/win32.S \ ! src/x86/ffi64.c src/x86/unix64.S src/x86/ffitarget.h VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@ *************** AM_MAKEFLAGS = \ *** 50,55 **** --- 55,61 ---- "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ "PICFLAG=$(PICFLAG)" \ "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \ + "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ "SHELL=$(SHELL)" \ "exec_prefix=$(exec_prefix)" \ "infodir=$(infodir)" \ *************** MULTICLEAN = true *** 79,123 **** toolexeclib_LTLIBRARIES = libffi.la noinst_LTLIBRARIES = libffi_convenience.la - noinst_PROGRAMS = ffitest - ffitest_OBJECTS = ffitest.lo - ffitest_LDADD = libffi.la - ffitest_LDFLAGS = -shared-libgcc ! TARGET_SRC_MIPS_GCC = src/mips/ffi.c src/mips/o32.S src/mips/n32.S TARGET_SRC_MIPS_LINUX = src/mips/ffi.c src/mips/o32.S - TARGET_SRC_MIPS_SGI = src/mips/ffi.c src/mips/o32.s src/mips/n32.s TARGET_SRC_X86 = src/x86/ffi.c src/x86/sysv.S TARGET_SRC_X86_WIN32 = src/x86/ffi.c src/x86/win32.S TARGET_SRC_SPARC = src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S TARGET_SRC_ALPHA = src/alpha/ffi.c src/alpha/osf.S TARGET_SRC_IA64 = src/ia64/ffi.c src/ia64/unix.S TARGET_SRC_M68K = src/m68k/ffi.c src/m68k/sysv.S ! TARGET_SRC_POWERPC = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S ! TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closures.S TARGET_SRC_POWERPC_DARWIN = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S TARGET_SRC_ARM = src/arm/sysv.S src/arm/ffi.c TARGET_SRC_S390 = src/s390/sysv.S src/s390/ffi.c TARGET_SRC_X86_64 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S TARGET_SRC_SH = src/sh/sysv.S src/sh/ffi.c ##libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c $(TARGET_SRC_@TARGET@) ## Work around automake deficiency libffi_la_common_SOURCES = src/debug.c src/prep_cif.c src/types.c \ src/raw_api.c src/java_raw_api.c ! if MIPS_GCC ! libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC) ! libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC) endif if MIPS_LINUX libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX) libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX) endif - if MIPS_SGI - libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI) - libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI) - endif if X86 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86) libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86) --- 85,121 ---- toolexeclib_LTLIBRARIES = libffi.la noinst_LTLIBRARIES = libffi_convenience.la ! TARGET_SRC_MIPS_IRIX = src/mips/ffi.c src/mips/o32.S src/mips/n32.S TARGET_SRC_MIPS_LINUX = src/mips/ffi.c src/mips/o32.S TARGET_SRC_X86 = src/x86/ffi.c src/x86/sysv.S TARGET_SRC_X86_WIN32 = src/x86/ffi.c src/x86/win32.S TARGET_SRC_SPARC = src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S TARGET_SRC_ALPHA = src/alpha/ffi.c src/alpha/osf.S TARGET_SRC_IA64 = src/ia64/ffi.c src/ia64/unix.S TARGET_SRC_M68K = src/m68k/ffi.c src/m68k/sysv.S ! TARGET_SRC_POWERPC = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S src/powerpc/linux64.S src/powerpc/linux64_closure.S ! TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S TARGET_SRC_POWERPC_DARWIN = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S TARGET_SRC_ARM = src/arm/sysv.S src/arm/ffi.c TARGET_SRC_S390 = src/s390/sysv.S src/s390/ffi.c TARGET_SRC_X86_64 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S TARGET_SRC_SH = src/sh/sysv.S src/sh/ffi.c + TARGET_SRC_SH64 = src/sh64/sysv.S src/sh64/ffi.c ##libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c $(TARGET_SRC_@TARGET@) ## Work around automake deficiency libffi_la_common_SOURCES = src/debug.c src/prep_cif.c src/types.c \ src/raw_api.c src/java_raw_api.c ! if MIPS_IRIX ! libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_IRIX) ! libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_IRIX) endif if MIPS_LINUX libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX) libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX) endif if X86 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86) libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86) *************** libffi_convenience_la_SOURCES = $(libffi *** 168,181 **** endif if SH libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH) ! libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH) endif ! AM_CFLAGS = -fexceptions libffi_la_LDFLAGS = -release $(VERSION) ! INCLUDES = -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src # Override these rules so that object files get put in the correct # subdirectories. --- 166,183 ---- endif if SH libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH) ! libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH) ! endif ! if SH64 ! libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH64) ! libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH64) endif ! AM_CFLAGS = -Wall -g -fexceptions libffi_la_LDFLAGS = -release $(VERSION) ! INCLUDES = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src # Override these rules so that object files get put in the correct # subdirectories. *************** maintainer-clean-multi: *** 224,226 **** --- 226,240 ---- ## ################################################################ + # Our hacked automake doesn't clean subdirectories properly. + mostlyclean-am: mostlyclean-sub + mostlyclean-sub: + -rm -f src/*.o src/*.lo + -rm -f src/@TARGETDIR@/*.o src/@TARGETDIR@/*.lo + + clean-am: clean-sub + clean-sub: + -rm -rf src/.libs src/_libs + -rm -rf src/@TARGETDIR@/.libs src/@TARGETDIR@/_libs + + diff -Nrc3pad gcc-3.3.3/libffi/Makefile.in gcc-3.4.0/libffi/Makefile.in *** gcc-3.3.3/libffi/Makefile.in 2003-01-28 01:44:57.000000000 +0000 --- gcc-3.4.0/libffi/Makefile.in 2003-11-22 13:41:32.000000000 +0000 *************** POST_INSTALL = : *** 56,63 **** --- 56,68 ---- NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : + build_alias = @build_alias@ + build_triplet = @build@ host_alias = @host_alias@ host_triplet = @host@ + target_alias = @target_alias@ + target_triplet = @target@ + AM_RUNTESTFLAGS = @AM_RUNTESTFLAGS@ AS = @AS@ CC = @CC@ CXX = @CXX@ *************** DLLTOOL = @DLLTOOL@ *** 66,71 **** --- 71,77 ---- EXEEXT = @EXEEXT@ GCJ = @GCJ@ GCJFLAGS = @GCJFLAGS@ + HAVE_LONG_DOUBLE = @HAVE_LONG_DOUBLE@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ MAINT = @MAINT@ *************** STRIP = @STRIP@ *** 79,107 **** TARGET = @TARGET@ TARGETDIR = @TARGETDIR@ VERSION = @VERSION@ libffi_basedir = @libffi_basedir@ toolexecdir = @toolexecdir@ toolexeclibdir = @toolexeclibdir@ AUTOMAKE_OPTIONS = cygnus ! SUBDIRS = include ! EXTRA_DIST = LICENSE ChangeLog.v1 src/mips/ffi.c src/mips/n32.S \ ! src/mips/n32.s src/mips/o32.S src/mips/o32.s \ ! src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S \ ! src/x86/ffi.c src/x86/sysv.S src/x86/win32.S \ ! src/x86/ffi64.c src/x86/unix64.S \ ! src/alpha/ffi.c src/alpha/osf.S \ ! src/m68k/ffi.c src/m68k/sysv.S \ ! src/powerpc/ffi.c src/powerpc/sysv.S \ ! src/powerpc/ppc_closure.S src/powerpc/asm.h \ ! src/powerpc/ffi_darwin.c \ ! src/powerpc/darwin.S src/powerpc/aix.S \ ! src/powerpc/darwin_closure.S src/powerpc/aix_closures.S \ ! src/arm/ffi.c src/arm/sysv.S \ ! src/s390/ffi.c src/s390/sysv.S \ ! src/sh/ffi.c src/sh/sysv.S VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@ --- 85,119 ---- TARGET = @TARGET@ TARGETDIR = @TARGETDIR@ VERSION = @VERSION@ + gcc_version = @gcc_version@ libffi_basedir = @libffi_basedir@ + tool_include_dir = @tool_include_dir@ toolexecdir = @toolexecdir@ toolexeclibdir = @toolexeclibdir@ AUTOMAKE_OPTIONS = cygnus ! SUBDIRS = include testsuite ! EXTRA_DIST = LICENSE ChangeLog.v1 \ ! src/alpha/ffi.c src/alpha/osf.S src/alpha/ffitarget.h \ ! src/arm/ffi.c src/arm/sysv.S src/arm/ffitarget.h \ ! src/mips/ffi.c src/mips/n32.S src/mips/o32.S \ ! src/mips/ffitarget.h \ ! src/m68k/ffi.c src/m68k/sysv.S src/m68k/ffitarget.h \ ! src/powerpc/ffi.c src/powerpc/sysv.S \ ! src/powerpc/linux64.S src/powerpc/linux64_closure.S \ ! src/powerpc/ppc_closure.S src/powerpc/asm.h \ ! src/powerpc/aix.S src/powerpc/darwin.S \ ! src/powerpc/aix_closure.S src/powerpc/darwin_closure.S \ ! src/powerpc/ffi_darwin.c src/powerpc/ffitarget.h \ ! src/s390/ffi.c src/s390/sysv.S src/s390/ffitarget.h \ ! src/sh/ffi.c src/sh/sysv.S src/sh/ffitarget.h \ ! src/sh64/ffi.c src/sh64/sysv.S src/sh64/ffitarget.h \ ! src/sparc/v8.S src/sparc/v9.S src/sparc/ffitarget.h \ ! src/sparc/ffi.c \ ! src/x86/ffi.c src/x86/sysv.S src/x86/win32.S \ ! src/x86/ffi64.c src/x86/unix64.S src/x86/ffitarget.h VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@ *************** AM_MAKEFLAGS = \ *** 128,133 **** --- 140,146 ---- "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ "PICFLAG=$(PICFLAG)" \ "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \ + "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ "SHELL=$(SHELL)" \ "exec_prefix=$(exec_prefix)" \ "infodir=$(infodir)" \ *************** MULTICLEAN = true *** 158,192 **** toolexeclib_LTLIBRARIES = libffi.la noinst_LTLIBRARIES = libffi_convenience.la ! noinst_PROGRAMS = ffitest ! ! ffitest_OBJECTS = ffitest.lo ! ffitest_LDADD = libffi.la ! ffitest_LDFLAGS = -shared-libgcc ! ! TARGET_SRC_MIPS_GCC = src/mips/ffi.c src/mips/o32.S src/mips/n32.S TARGET_SRC_MIPS_LINUX = src/mips/ffi.c src/mips/o32.S - TARGET_SRC_MIPS_SGI = src/mips/ffi.c src/mips/o32.s src/mips/n32.s TARGET_SRC_X86 = src/x86/ffi.c src/x86/sysv.S TARGET_SRC_X86_WIN32 = src/x86/ffi.c src/x86/win32.S TARGET_SRC_SPARC = src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S TARGET_SRC_ALPHA = src/alpha/ffi.c src/alpha/osf.S TARGET_SRC_IA64 = src/ia64/ffi.c src/ia64/unix.S TARGET_SRC_M68K = src/m68k/ffi.c src/m68k/sysv.S ! TARGET_SRC_POWERPC = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S ! TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closures.S TARGET_SRC_POWERPC_DARWIN = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S TARGET_SRC_ARM = src/arm/sysv.S src/arm/ffi.c TARGET_SRC_S390 = src/s390/sysv.S src/s390/ffi.c TARGET_SRC_X86_64 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S TARGET_SRC_SH = src/sh/sysv.S src/sh/ffi.c libffi_la_common_SOURCES = src/debug.c src/prep_cif.c src/types.c \ src/raw_api.c src/java_raw_api.c ! @MIPS_GCC_TRUE@libffi_la_SOURCES = @MIPS_GCC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC) @MIPS_LINUX_TRUE@libffi_la_SOURCES = @MIPS_LINUX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX) - @MIPS_SGI_TRUE@libffi_la_SOURCES = @MIPS_SGI_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI) @X86_TRUE@libffi_la_SOURCES = @X86_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86) @X86_WIN32_TRUE@libffi_la_SOURCES = @X86_WIN32_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32) @SPARC_TRUE@libffi_la_SOURCES = @SPARC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_SPARC) --- 171,198 ---- toolexeclib_LTLIBRARIES = libffi.la noinst_LTLIBRARIES = libffi_convenience.la ! TARGET_SRC_MIPS_IRIX = src/mips/ffi.c src/mips/o32.S src/mips/n32.S TARGET_SRC_MIPS_LINUX = src/mips/ffi.c src/mips/o32.S TARGET_SRC_X86 = src/x86/ffi.c src/x86/sysv.S TARGET_SRC_X86_WIN32 = src/x86/ffi.c src/x86/win32.S TARGET_SRC_SPARC = src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S TARGET_SRC_ALPHA = src/alpha/ffi.c src/alpha/osf.S TARGET_SRC_IA64 = src/ia64/ffi.c src/ia64/unix.S TARGET_SRC_M68K = src/m68k/ffi.c src/m68k/sysv.S ! TARGET_SRC_POWERPC = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S src/powerpc/linux64.S src/powerpc/linux64_closure.S ! TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S TARGET_SRC_POWERPC_DARWIN = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S TARGET_SRC_ARM = src/arm/sysv.S src/arm/ffi.c TARGET_SRC_S390 = src/s390/sysv.S src/s390/ffi.c TARGET_SRC_X86_64 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S TARGET_SRC_SH = src/sh/sysv.S src/sh/ffi.c + TARGET_SRC_SH64 = src/sh64/sysv.S src/sh64/ffi.c libffi_la_common_SOURCES = src/debug.c src/prep_cif.c src/types.c \ src/raw_api.c src/java_raw_api.c ! @MIPS_IRIX_TRUE@libffi_la_SOURCES = @MIPS_IRIX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_IRIX) @MIPS_LINUX_TRUE@libffi_la_SOURCES = @MIPS_LINUX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX) @X86_TRUE@libffi_la_SOURCES = @X86_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86) @X86_WIN32_TRUE@libffi_la_SOURCES = @X86_WIN32_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32) @SPARC_TRUE@libffi_la_SOURCES = @SPARC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_SPARC) *************** libffi_la_common_SOURCES = src/debug.c s *** 200,208 **** @S390_TRUE@libffi_la_SOURCES = @S390_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_S390) @X86_64_TRUE@libffi_la_SOURCES = @X86_64_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64) @SH_TRUE@libffi_la_SOURCES = @SH_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_SH) ! @MIPS_GCC_TRUE@libffi_convenience_la_SOURCES = @MIPS_GCC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC) @MIPS_LINUX_TRUE@libffi_convenience_la_SOURCES = @MIPS_LINUX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX) - @MIPS_SGI_TRUE@libffi_convenience_la_SOURCES = @MIPS_SGI_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI) @X86_TRUE@libffi_convenience_la_SOURCES = @X86_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86) @X86_WIN32_TRUE@libffi_convenience_la_SOURCES = @X86_WIN32_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32) @SPARC_TRUE@libffi_convenience_la_SOURCES = @SPARC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_SPARC) --- 206,214 ---- @S390_TRUE@libffi_la_SOURCES = @S390_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_S390) @X86_64_TRUE@libffi_la_SOURCES = @X86_64_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64) @SH_TRUE@libffi_la_SOURCES = @SH_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_SH) ! @SH64_TRUE@libffi_la_SOURCES = @SH64_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_SH64) ! @MIPS_IRIX_TRUE@libffi_convenience_la_SOURCES = @MIPS_IRIX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_IRIX) @MIPS_LINUX_TRUE@libffi_convenience_la_SOURCES = @MIPS_LINUX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX) @X86_TRUE@libffi_convenience_la_SOURCES = @X86_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86) @X86_WIN32_TRUE@libffi_convenience_la_SOURCES = @X86_WIN32_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32) @SPARC_TRUE@libffi_convenience_la_SOURCES = @SPARC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_SPARC) *************** libffi_la_common_SOURCES = src/debug.c s *** 215,229 **** @ARM_TRUE@libffi_convenience_la_SOURCES = @ARM_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_ARM) @S390_TRUE@libffi_convenience_la_SOURCES = @S390_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_S390) @X86_64_TRUE@libffi_convenience_la_SOURCES = @X86_64_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64) ! @SH_TRUE@libfficonvenience_la_SOURCES = @SH_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_SH) ! AM_CFLAGS = -fexceptions libffi_la_LDFLAGS = -release $(VERSION) ! INCLUDES = -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ! mkinstalldirs = $(SHELL) $(top_srcdir)/${libffi_basedir}/../mkinstalldirs CONFIG_HEADER = fficonfig.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) $(toolexeclib_LTLIBRARIES) --- 221,236 ---- @ARM_TRUE@libffi_convenience_la_SOURCES = @ARM_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_ARM) @S390_TRUE@libffi_convenience_la_SOURCES = @S390_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_S390) @X86_64_TRUE@libffi_convenience_la_SOURCES = @X86_64_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64) ! @SH_TRUE@libffi_convenience_la_SOURCES = @SH_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_SH) ! @SH64_TRUE@libffi_convenience_la_SOURCES = @SH64_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_SH64) ! AM_CFLAGS = -Wall -g -fexceptions libffi_la_LDFLAGS = -release $(VERSION) ! INCLUDES = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ! mkinstalldirs = $(SHELL) $(top_srcdir)/${libffi_basedir}../mkinstalldirs CONFIG_HEADER = fficonfig.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) $(toolexeclib_LTLIBRARIES) *************** LDFLAGS = @LDFLAGS@ *** 235,363 **** LIBS = @LIBS@ libffi_convenience_la_LDFLAGS = libffi_convenience_la_LIBADD = ! @ALPHA_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ ! @ALPHA_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ ! @ALPHA_TRUE@src/java_raw_api.lo src/alpha/ffi.lo src/alpha/osf.lo ! @IA64_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @IA64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @IA64_TRUE@src/ia64/ffi.lo src/ia64/unix.lo ! @MIPS_GCC_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ ! @MIPS_GCC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ ! @MIPS_GCC_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \ ! @MIPS_GCC_TRUE@src/mips/n32.lo ! @S390_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @S390_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @S390_TRUE@src/s390/sysv.lo src/s390/ffi.lo @M68K_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \ @M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ @M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo ! @X86_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @X86_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @X86_TRUE@src/x86/ffi.lo src/x86/sysv.lo @POWERPC_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ @POWERPC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ @POWERPC_TRUE@src/java_raw_api.lo src/powerpc/ffi.lo \ ! @POWERPC_TRUE@src/powerpc/sysv.lo src/powerpc/ppc_closure.lo @MIPS_LINUX_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ @MIPS_LINUX_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ @MIPS_LINUX_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo @X86_WIN32_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ @X86_WIN32_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ @X86_WIN32_TRUE@src/java_raw_api.lo src/x86/ffi.lo src/x86/win32.lo - @X86_64_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ - @X86_64_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ - @X86_64_TRUE@src/java_raw_api.lo src/x86/ffi64.lo src/x86/unix64.lo \ - @X86_64_TRUE@src/x86/ffi.lo src/x86/sysv.lo @SPARC_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ @SPARC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ @SPARC_TRUE@src/java_raw_api.lo src/sparc/ffi.lo src/sparc/v8.lo \ @SPARC_TRUE@src/sparc/v9.lo ! @POWERPC_AIX_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ ! @POWERPC_AIX_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ ! @POWERPC_AIX_TRUE@src/java_raw_api.lo src/powerpc/ffi_darwin.lo \ ! @POWERPC_AIX_TRUE@src/powerpc/aix.lo src/powerpc/aix_closures.lo ! @MIPS_SGI_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ ! @MIPS_SGI_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ ! @MIPS_SGI_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \ ! @MIPS_SGI_TRUE@src/mips/n32.lo ! @POWERPC_DARWIN_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ ! @POWERPC_DARWIN_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ ! @POWERPC_DARWIN_TRUE@src/java_raw_api.lo src/powerpc/ffi_darwin.lo \ ! @POWERPC_DARWIN_TRUE@src/powerpc/darwin.lo \ ! @POWERPC_DARWIN_TRUE@src/powerpc/darwin_closure.lo ! @ARM_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @ARM_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @ARM_TRUE@src/arm/sysv.lo src/arm/ffi.lo ! libffi_la_LIBADD = ! @SH_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \ ! @SH_TRUE@src/raw_api.lo src/java_raw_api.lo src/sh/sysv.lo \ ! @SH_TRUE@src/sh/ffi.lo ! @IA64_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ @IA64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ @IA64_TRUE@src/ia64/ffi.lo src/ia64/unix.lo ! @X86_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \ ! @X86_TRUE@src/raw_api.lo src/java_raw_api.lo src/x86/ffi.lo \ ! @X86_TRUE@src/x86/sysv.lo @POWERPC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ @POWERPC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ @POWERPC_TRUE@src/powerpc/ffi.lo src/powerpc/sysv.lo \ ! @POWERPC_TRUE@src/powerpc/ppc_closure.lo @MIPS_LINUX_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ @MIPS_LINUX_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ @MIPS_LINUX_TRUE@src/mips/ffi.lo src/mips/o32.lo @SPARC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ @SPARC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ @SPARC_TRUE@src/sparc/ffi.lo src/sparc/v8.lo src/sparc/v9.lo ! @POWERPC_AIX_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @POWERPC_AIX_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @POWERPC_AIX_TRUE@src/powerpc/ffi_darwin.lo src/powerpc/aix.lo \ ! @POWERPC_AIX_TRUE@src/powerpc/aix_closures.lo ! @MIPS_SGI_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @MIPS_SGI_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @MIPS_SGI_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo ! @ARM_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \ ! @ARM_TRUE@src/raw_api.lo src/java_raw_api.lo src/arm/sysv.lo \ ! @ARM_TRUE@src/arm/ffi.lo ! @ALPHA_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @ALPHA_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @ALPHA_TRUE@src/alpha/ffi.lo src/alpha/osf.lo ! @MIPS_GCC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @MIPS_GCC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @MIPS_GCC_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo @S390_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ @S390_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ @S390_TRUE@src/s390/sysv.lo src/s390/ffi.lo ! @M68K_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo ! @X86_WIN32_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @X86_WIN32_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @X86_WIN32_TRUE@src/x86/ffi.lo src/x86/win32.lo ! @X86_64_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @X86_64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @X86_64_TRUE@src/x86/ffi64.lo src/x86/unix64.lo src/x86/ffi.lo \ ! @X86_64_TRUE@src/x86/sysv.lo ! @POWERPC_DARWIN_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @POWERPC_DARWIN_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @POWERPC_DARWIN_TRUE@src/powerpc/ffi_darwin.lo src/powerpc/darwin.lo \ ! @POWERPC_DARWIN_TRUE@src/powerpc/darwin_closure.lo ! noinst_PROGRAMS = ffitest$(EXEEXT) ! PROGRAMS = $(noinst_PROGRAMS) ! ! ffitest_DEPENDENCIES = libffi.la CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ DIST_COMMON = README ./stamp-h.in ChangeLog Makefile.am Makefile.in \ ! acconfig.h acinclude.m4 aclocal.m4 configure configure.in \ ! fficonfig.h.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) ! TAR = gtar GZIP_ENV = --best SOURCES = $(libffi_convenience_la_SOURCES) $(libffi_la_SOURCES) OBJECTS = $(libffi_convenience_la_OBJECTS) $(libffi_la_OBJECTS) --- 242,369 ---- LIBS = @LIBS@ libffi_convenience_la_LDFLAGS = libffi_convenience_la_LIBADD = ! @X86_64_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ ! @X86_64_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ ! @X86_64_TRUE@src/java_raw_api.lo src/x86/ffi64.lo src/x86/unix64.lo \ ! @X86_64_TRUE@src/x86/ffi.lo src/x86/sysv.lo @M68K_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \ @M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ @M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo ! @POWERPC_DARWIN_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ ! @POWERPC_DARWIN_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ ! @POWERPC_DARWIN_TRUE@src/java_raw_api.lo src/powerpc/ffi_darwin.lo \ ! @POWERPC_DARWIN_TRUE@src/powerpc/darwin.lo \ ! @POWERPC_DARWIN_TRUE@src/powerpc/darwin_closure.lo ! @ALPHA_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ ! @ALPHA_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ ! @ALPHA_TRUE@src/java_raw_api.lo src/alpha/ffi.lo src/alpha/osf.lo ! @ARM_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @ARM_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @ARM_TRUE@src/arm/sysv.lo src/arm/ffi.lo ! @POWERPC_AIX_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ ! @POWERPC_AIX_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ ! @POWERPC_AIX_TRUE@src/java_raw_api.lo src/powerpc/ffi_darwin.lo \ ! @POWERPC_AIX_TRUE@src/powerpc/aix.lo src/powerpc/aix_closure.lo @POWERPC_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ @POWERPC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ @POWERPC_TRUE@src/java_raw_api.lo src/powerpc/ffi.lo \ ! @POWERPC_TRUE@src/powerpc/sysv.lo src/powerpc/ppc_closure.lo \ ! @POWERPC_TRUE@src/powerpc/linux64.lo src/powerpc/linux64_closure.lo @MIPS_LINUX_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ @MIPS_LINUX_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ @MIPS_LINUX_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo + @SH_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \ + @SH_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo src/sh/sysv.lo \ + @SH_TRUE@src/sh/ffi.lo @X86_WIN32_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ @X86_WIN32_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ @X86_WIN32_TRUE@src/java_raw_api.lo src/x86/ffi.lo src/x86/win32.lo @SPARC_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ @SPARC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ @SPARC_TRUE@src/java_raw_api.lo src/sparc/ffi.lo src/sparc/v8.lo \ @SPARC_TRUE@src/sparc/v9.lo ! @SH64_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @SH64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @SH64_TRUE@src/sh64/sysv.lo src/sh64/ffi.lo ! @S390_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @S390_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @S390_TRUE@src/s390/sysv.lo src/s390/ffi.lo ! @MIPS_IRIX_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ ! @MIPS_IRIX_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ ! @MIPS_IRIX_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \ ! @MIPS_IRIX_TRUE@src/mips/n32.lo ! @X86_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @X86_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @X86_TRUE@src/x86/ffi.lo src/x86/sysv.lo ! @IA64_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \ @IA64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ @IA64_TRUE@src/ia64/ffi.lo src/ia64/unix.lo ! libffi_la_LIBADD = ! @X86_64_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @X86_64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @X86_64_TRUE@src/x86/ffi64.lo src/x86/unix64.lo src/x86/ffi.lo \ ! @X86_64_TRUE@src/x86/sysv.lo ! @M68K_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo ! @POWERPC_DARWIN_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @POWERPC_DARWIN_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @POWERPC_DARWIN_TRUE@src/powerpc/ffi_darwin.lo src/powerpc/darwin.lo \ ! @POWERPC_DARWIN_TRUE@src/powerpc/darwin_closure.lo ! @ALPHA_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @ALPHA_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @ALPHA_TRUE@src/alpha/ffi.lo src/alpha/osf.lo ! @ARM_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \ ! @ARM_TRUE@src/raw_api.lo src/java_raw_api.lo src/arm/sysv.lo \ ! @ARM_TRUE@src/arm/ffi.lo ! @POWERPC_AIX_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @POWERPC_AIX_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @POWERPC_AIX_TRUE@src/powerpc/ffi_darwin.lo src/powerpc/aix.lo \ ! @POWERPC_AIX_TRUE@src/powerpc/aix_closure.lo @POWERPC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ @POWERPC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ @POWERPC_TRUE@src/powerpc/ffi.lo src/powerpc/sysv.lo \ ! @POWERPC_TRUE@src/powerpc/ppc_closure.lo src/powerpc/linux64.lo \ ! @POWERPC_TRUE@src/powerpc/linux64_closure.lo @MIPS_LINUX_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ @MIPS_LINUX_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ @MIPS_LINUX_TRUE@src/mips/ffi.lo src/mips/o32.lo + @SH_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \ + @SH_TRUE@src/raw_api.lo src/java_raw_api.lo src/sh/sysv.lo \ + @SH_TRUE@src/sh/ffi.lo + @X86_WIN32_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ + @X86_WIN32_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ + @X86_WIN32_TRUE@src/x86/ffi.lo src/x86/win32.lo @SPARC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ @SPARC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ @SPARC_TRUE@src/sparc/ffi.lo src/sparc/v8.lo src/sparc/v9.lo ! @SH64_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @SH64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @SH64_TRUE@src/sh64/sysv.lo src/sh64/ffi.lo @S390_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ @S390_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ @S390_TRUE@src/s390/sysv.lo src/s390/ffi.lo ! @MIPS_IRIX_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @MIPS_IRIX_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @MIPS_IRIX_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo ! @X86_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \ ! @X86_TRUE@src/raw_api.lo src/java_raw_api.lo src/x86/ffi.lo \ ! @X86_TRUE@src/x86/sysv.lo ! @IA64_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @IA64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @IA64_TRUE@src/ia64/ffi.lo src/ia64/unix.lo CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ DIST_COMMON = README ./stamp-h.in ChangeLog Makefile.am Makefile.in \ ! acinclude.m4 aclocal.m4 configure configure.in fficonfig.h.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) ! TAR = gnutar GZIP_ENV = --best SOURCES = $(libffi_convenience_la_SOURCES) $(libffi_la_SOURCES) OBJECTS = $(libffi_convenience_la_OBJECTS) $(libffi_la_OBJECTS) *************** $(srcdir)/fficonfig.h.in: @MAINTAINER_MO *** 395,401 **** rm -f $(srcdir)/stamp-h.in; \ $(MAKE) $(srcdir)/stamp-h.in; \ else :; fi ! $(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h cd $(top_srcdir) && $(AUTOHEADER) @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null --- 401,407 ---- rm -f $(srcdir)/stamp-h.in; \ $(MAKE) $(srcdir)/stamp-h.in; \ else :; fi ! $(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOHEADER) @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null *************** libffi_convenience.la: $(libffi_convenie *** 474,492 **** libffi.la: $(libffi_la_OBJECTS) $(libffi_la_DEPENDENCIES) $(LINK) -rpath $(toolexeclibdir) $(libffi_la_LDFLAGS) $(libffi_la_OBJECTS) $(libffi_la_LIBADD) $(LIBS) - mostlyclean-noinstPROGRAMS: - - clean-noinstPROGRAMS: - -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) - - distclean-noinstPROGRAMS: - - maintainer-clean-noinstPROGRAMS: - - ffitest$(EXEEXT): $(ffitest_OBJECTS) $(ffitest_DEPENDENCIES) - @rm -f ffitest$(EXEEXT) - $(LINK) $(ffitest_LDFLAGS) $(ffitest_OBJECTS) $(ffitest_LDADD) $(LIBS) - # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, --- 480,485 ---- *************** distdir: $(DISTFILES) *** 617,623 **** $(mkinstalldirs) $(distdir)/src/alpha $(distdir)/src/arm \ $(distdir)/src/m68k $(distdir)/src/mips \ $(distdir)/src/powerpc $(distdir)/src/s390 $(distdir)/src/sh \ ! $(distdir)/src/sparc $(distdir)/src/x86 @for file in $(DISTFILES); do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ --- 610,616 ---- $(mkinstalldirs) $(distdir)/src/alpha $(distdir)/src/arm \ $(distdir)/src/m68k $(distdir)/src/mips \ $(distdir)/src/powerpc $(distdir)/src/s390 $(distdir)/src/sh \ ! $(distdir)/src/sh64 $(distdir)/src/sparc $(distdir)/src/x86 @for file in $(DISTFILES); do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ *************** install-am: all-am *** 662,668 **** install: install-recursive uninstall-am: uninstall-toolexeclibLTLIBRARIES uninstall: uninstall-recursive ! all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) fficonfig.h all-redirect: all-recursive-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install --- 655,661 ---- install: install-recursive uninstall-am: uninstall-toolexeclibLTLIBRARIES uninstall: uninstall-recursive ! all-am: Makefile $(LTLIBRARIES) fficonfig.h all-redirect: all-recursive-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install *************** distclean-generic: *** 682,703 **** maintainer-clean-generic: mostlyclean-am: mostlyclean-hdr mostlyclean-noinstLTLIBRARIES \ mostlyclean-toolexeclibLTLIBRARIES mostlyclean-compile \ ! mostlyclean-libtool mostlyclean-noinstPROGRAMS \ ! mostlyclean-tags mostlyclean-generic mostlyclean: mostlyclean-recursive clean-am: clean-hdr clean-noinstLTLIBRARIES \ clean-toolexeclibLTLIBRARIES clean-compile \ ! clean-libtool clean-noinstPROGRAMS clean-tags \ ! clean-generic mostlyclean-am clean: clean-recursive distclean-am: distclean-hdr distclean-noinstLTLIBRARIES \ distclean-toolexeclibLTLIBRARIES distclean-compile \ ! distclean-libtool distclean-noinstPROGRAMS \ ! distclean-tags distclean-generic clean-am -rm -f libtool distclean: distclean-recursive --- 675,695 ---- maintainer-clean-generic: mostlyclean-am: mostlyclean-hdr mostlyclean-noinstLTLIBRARIES \ mostlyclean-toolexeclibLTLIBRARIES mostlyclean-compile \ ! mostlyclean-libtool mostlyclean-tags \ ! mostlyclean-generic mostlyclean: mostlyclean-recursive clean-am: clean-hdr clean-noinstLTLIBRARIES \ clean-toolexeclibLTLIBRARIES clean-compile \ ! clean-libtool clean-tags clean-generic mostlyclean-am clean: clean-recursive distclean-am: distclean-hdr distclean-noinstLTLIBRARIES \ distclean-toolexeclibLTLIBRARIES distclean-compile \ ! distclean-libtool distclean-tags distclean-generic \ ! clean-am -rm -f libtool distclean: distclean-recursive *************** maintainer-clean-am: maintainer-clean-h *** 707,714 **** maintainer-clean-noinstLTLIBRARIES \ maintainer-clean-toolexeclibLTLIBRARIES \ maintainer-clean-compile maintainer-clean-libtool \ ! maintainer-clean-noinstPROGRAMS maintainer-clean-tags \ ! maintainer-clean-generic distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." --- 699,706 ---- maintainer-clean-noinstLTLIBRARIES \ maintainer-clean-toolexeclibLTLIBRARIES \ maintainer-clean-compile maintainer-clean-libtool \ ! maintainer-clean-tags maintainer-clean-generic \ ! distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." *************** clean-toolexeclibLTLIBRARIES maintainer- *** 723,731 **** uninstall-toolexeclibLTLIBRARIES install-toolexeclibLTLIBRARIES \ mostlyclean-compile distclean-compile clean-compile \ maintainer-clean-compile mostlyclean-libtool distclean-libtool \ ! clean-libtool maintainer-clean-libtool mostlyclean-noinstPROGRAMS \ ! distclean-noinstPROGRAMS clean-noinstPROGRAMS \ ! maintainer-clean-noinstPROGRAMS install-data-recursive \ uninstall-data-recursive install-exec-recursive \ uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ all-recursive check-recursive installcheck-recursive info-recursive \ --- 715,721 ---- uninstall-toolexeclibLTLIBRARIES install-toolexeclibLTLIBRARIES \ mostlyclean-compile distclean-compile clean-compile \ maintainer-clean-compile mostlyclean-libtool distclean-libtool \ ! clean-libtool maintainer-clean-libtool install-data-recursive \ uninstall-data-recursive install-exec-recursive \ uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ all-recursive check-recursive installcheck-recursive info-recursive \ *************** distclean-multi: *** 784,789 **** --- 774,790 ---- maintainer-clean-multi: $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean + # Our hacked automake doesn't clean subdirectories properly. + mostlyclean-am: mostlyclean-sub + mostlyclean-sub: + -rm -f src/*.o src/*.lo + -rm -f src/@TARGETDIR@/*.o src/@TARGETDIR@/*.lo + + clean-am: clean-sub + clean-sub: + -rm -rf src/.libs src/_libs + -rm -rf src/@TARGETDIR@/.libs src/@TARGETDIR@/_libs + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -Nrc3pad gcc-3.3.3/libffi/README gcc-3.4.0/libffi/README *** gcc-3.3.3/libffi/README 2003-07-11 22:13:48.000000000 +0000 --- gcc-3.4.0/libffi/README 2004-01-25 07:01:05.000000000 +0000 *************** Supported Platforms and Prerequisites *** 46,52 **** Libffi has been ported to: ! SunOS 4.1.3 & Solaris 2.x (Sparc v8) Irix 5.3 & 6.2 (System V/o32 & n32) --- 46,52 ---- Libffi has been ported to: ! SunOS 4.1.3 & Solaris 2.x (SPARC-V8, SPARC-V9) Irix 5.3 & 6.2 (System V/o32 & n32) *************** Platform Specific Notes *** 306,320 **** There are no known problems with the x86 port. ! Sun Sparc - SunOS 4.1.3 & Solaris 2.x ------------------------------------- - There's a bug in the structure passing code for sparc processors. - Struct arguments that are passed in value actually end up being passed - by reference. This will be fixed Real Soon Now. - - "long long" values are not supported yet. - You must use GNU Make to build libffi on Sun platforms. MIPS - Irix 5.3 & 6.x --- 306,314 ---- There are no known problems with the x86 port. ! Sun SPARC - SunOS 4.1.3 & Solaris 2.x ------------------------------------- You must use GNU Make to build libffi on Sun platforms. MIPS - Irix 5.3 & 6.x diff -Nrc3pad gcc-3.3.3/libffi/src/alpha/ffi.c gcc-3.4.0/libffi/src/alpha/ffi.c *** gcc-3.3.3/libffi/src/alpha/ffi.c 2001-07-16 16:53:43.000000000 +0000 --- gcc-3.4.0/libffi/src/alpha/ffi.c 2003-10-21 19:01:55.000000000 +0000 *************** *** 1,5 **** /* ----------------------------------------------------------------------- ! ffi.c - Copyright (c) 1998, 2001 Cygnus Solutions Alpha Foreign Function Interface --- 1,5 ---- /* ----------------------------------------------------------------------- ! ffi.c - Copyright (c) 1998, 2001 Red Hat, Inc. Alpha Foreign Function Interface *************** ffi_prep_cif_machdep(ffi_cif *cif) *** 37,44 **** { /* Adjust cif->bytes to represent a minimum 6 words for the temporary register argument loading area. */ ! if (cif->bytes < 6*SIZEOF_ARG) ! cif->bytes = 6*SIZEOF_ARG; /* Set the return type flag */ switch (cif->rtype->type) --- 37,44 ---- { /* Adjust cif->bytes to represent a minimum 6 words for the temporary register argument loading area. */ ! if (cif->bytes < 6*FFI_SIZEOF_ARG) ! cif->bytes = 6*FFI_SIZEOF_ARG; /* Set the return type flag */ switch (cif->rtype->type) *************** ffi_call(ffi_cif *cif, void (*fn)(), voi *** 73,79 **** /* Allocate the space for the arguments, plus 4 words of temp space for ffi_call_osf. */ ! argp = stack = alloca(cif->bytes + 4*SIZEOF_ARG); if (cif->flags == FFI_TYPE_STRUCT) *(void **) argp++ = rvalue; --- 73,79 ---- /* Allocate the space for the arguments, plus 4 words of temp space for ffi_call_osf. */ ! argp = stack = alloca(cif->bytes + 4*FFI_SIZEOF_ARG); if (cif->flags == FFI_TYPE_STRUCT) *(void **) argp++ = rvalue; *************** ffi_call(ffi_cif *cif, void (*fn)(), voi *** 137,143 **** FFI_ASSERT(0); } ! argp += ALIGN((*arg_types)->size, SIZEOF_ARG) / SIZEOF_ARG; i++, arg_types++, avalue++; } --- 137,143 ---- FFI_ASSERT(0); } ! argp += ALIGN((*arg_types)->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG; i++, arg_types++, avalue++; } *************** ffi_closure_osf_inner(ffi_closure *closu *** 240,246 **** FFI_ASSERT(0); } ! argn += ALIGN(arg_types[i]->size, SIZEOF_ARG) / SIZEOF_ARG; i++; } --- 240,246 ---- FFI_ASSERT(0); } ! argn += ALIGN(arg_types[i]->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG; i++; } diff -Nrc3pad gcc-3.3.3/libffi/src/alpha/ffitarget.h gcc-3.4.0/libffi/src/alpha/ffitarget.h *** gcc-3.3.3/libffi/src/alpha/ffitarget.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/src/alpha/ffitarget.h 2003-10-21 19:07:50.000000000 +0000 *************** *** 0 **** --- 1,48 ---- + /* -----------------------------------------------------------------*-C-*- + ffitarget.h - Copyright (c) 1996-2003 Red Hat, Inc. + Target configuration macros for Alpha. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + ``Software''), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + ----------------------------------------------------------------------- */ + + #ifndef LIBFFI_TARGET_H + #define LIBFFI_TARGET_H + + #ifndef LIBFFI_ASM + typedef unsigned long ffi_arg; + typedef signed long ffi_sarg; + + typedef enum ffi_abi { + FFI_FIRST_ABI = 0, + FFI_OSF, + FFI_DEFAULT_ABI = FFI_OSF, + FFI_LAST_ABI = FFI_DEFAULT_ABI + 1 + } ffi_abi; + #endif + + /* ---- Definitions for closures ----------------------------------------- */ + + #define FFI_CLOSURES 1 + #define FFI_TRAMPOLINE_SIZE 24 + #define FFI_NATIVE_RAW_API 0 + + #endif + diff -Nrc3pad gcc-3.3.3/libffi/src/alpha/osf.S gcc-3.4.0/libffi/src/alpha/osf.S *** gcc-3.3.3/libffi/src/alpha/osf.S 2001-06-26 12:04:29.000000000 +0000 --- gcc-3.4.0/libffi/src/alpha/osf.S 2003-10-21 19:01:55.000000000 +0000 *************** *** 26,31 **** --- 26,32 ---- ----------------------------------------------------------------------- */ #define LIBFFI_ASM + #include #include .arch ev6 *************** $load_table: *** 292,298 **** #endif #ifdef __ELF__ ! .section .eh_frame,"aw",@progbits __FRAME_BEGIN__: .4byte $LECIE1-$LSCIE1 # Length of Common Information Entry $LSCIE1: --- 293,299 ---- #endif #ifdef __ELF__ ! .section .eh_frame,EH_FRAME_FLAGS,@progbits __FRAME_BEGIN__: .4byte $LECIE1-$LSCIE1 # Length of Common Information Entry $LSCIE1: diff -Nrc3pad gcc-3.3.3/libffi/src/arm/ffi.c gcc-3.4.0/libffi/src/arm/ffi.c *** gcc-3.3.3/libffi/src/arm/ffi.c 2002-07-18 23:08:30.000000000 +0000 --- gcc-3.4.0/libffi/src/arm/ffi.c 2003-10-21 19:01:55.000000000 +0000 *************** *** 1,5 **** /* ----------------------------------------------------------------------- ! ffi.c - Copyright (c) 1998 Cygnus Solutions ARM Foreign Function Interface --- 1,5 ---- /* ----------------------------------------------------------------------- ! ffi.c - Copyright (c) 1998 Red Hat, Inc. ARM Foreign Function Interface diff -Nrc3pad gcc-3.3.3/libffi/src/arm/ffitarget.h gcc-3.4.0/libffi/src/arm/ffitarget.h *** gcc-3.3.3/libffi/src/arm/ffitarget.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/src/arm/ffitarget.h 2003-10-21 19:07:50.000000000 +0000 *************** *** 0 **** --- 1,47 ---- + /* -----------------------------------------------------------------*-C-*- + ffitarget.h - Copyright (c) 1996-2003 Red Hat, Inc. + Target configuration macros for ARM. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + ``Software''), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + ----------------------------------------------------------------------- */ + + #ifndef LIBFFI_TARGET_H + #define LIBFFI_TARGET_H + + #ifndef LIBFFI_ASM + typedef unsigned long ffi_arg; + typedef signed long ffi_sarg; + + typedef enum ffi_abi { + FFI_FIRST_ABI = 0, + FFI_SYSV, + FFI_DEFAULT_ABI = FFI_SYSV, + FFI_LAST_ABI = FFI_DEFAULT_ABI + 1 + } ffi_abi; + #endif + + /* ---- Definitions for closures ----------------------------------------- */ + + #define FFI_CLOSURES 0 + #define FFI_NATIVE_RAW_API 0 + + #endif + diff -Nrc3pad gcc-3.3.3/libffi/src/arm/sysv.S gcc-3.4.0/libffi/src/arm/sysv.S *** gcc-3.3.3/libffi/src/arm/sysv.S 2002-09-29 18:08:58.000000000 +0000 --- gcc-3.4.0/libffi/src/arm/sysv.S 2003-10-21 19:01:55.000000000 +0000 *************** *** 1,5 **** /* ----------------------------------------------------------------------- ! sysv.S - Copyright (c) 1998 Cygnus Solutions ARM Foreign Function Interface --- 1,5 ---- /* ----------------------------------------------------------------------- ! sysv.S - Copyright (c) 1998 Red Hat, Inc. ARM Foreign Function Interface *************** *** 24,29 **** --- 24,30 ---- ----------------------------------------------------------------------- */ #define LIBFFI_ASM + #include #include #ifdef HAVE_MACHINE_ASM_H #include diff -Nrc3pad gcc-3.3.3/libffi/src/debug.c gcc-3.4.0/libffi/src/debug.c *** gcc-3.3.3/libffi/src/debug.c 2001-03-02 22:21:22.000000000 +0000 --- gcc-3.4.0/libffi/src/debug.c 2003-10-21 19:01:54.000000000 +0000 *************** *** 1,5 **** /* ----------------------------------------------------------------------- ! debug.c - Copyright (c) 1996 Cygnus Solutions Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the --- 1,5 ---- /* ----------------------------------------------------------------------- ! debug.c - Copyright (c) 1996 Red Hat, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the *************** void ffi_stop_here(void) *** 37,65 **** /* This function should only be called via the FFI_ASSERT() macro */ ! int ffi_assert(char *file, int line) { ! fprintf(stderr, "ASSERTION FAILURE: %s line %d\n", file, line); ffi_stop_here(); abort(); - - /* This has to return something for the compiler not to complain */ - /*@notreached@*/ - return 0; } /* Perform a sanity check on an ffi_type structure */ ! bool ffi_type_test(ffi_type *a) { /*@-usedef@*/ ! FFI_ASSERT(a->type <= FFI_TYPE_LAST); ! FFI_ASSERT(a->type > FFI_TYPE_VOID ? a->size > 0 : 1); ! FFI_ASSERT(a->type > FFI_TYPE_VOID ? a->alignment > 0 : 1); ! FFI_ASSERT(a->type == FFI_TYPE_STRUCT ? a->elements != NULL : 1); /*@=usedef@*/ - - /* This is a silly thing to return, but it keeps the compiler from - issuing warnings about "a" not being used in non-debug builds. */ - return (a != NULL); } --- 37,59 ---- /* This function should only be called via the FFI_ASSERT() macro */ ! void ffi_assert(char *expr, char *file, int line) { ! fprintf(stderr, "ASSERTION FAILURE: %s at %s:%d\n", expr, file, line); ffi_stop_here(); abort(); } /* Perform a sanity check on an ffi_type structure */ ! void ffi_type_test(ffi_type *a, char *file, int line) { + FFI_ASSERT_AT(a != NULL, file, line); + /*@-usedef@*/ ! FFI_ASSERT_AT(a->type <= FFI_TYPE_LAST, file, line); ! FFI_ASSERT_AT(a->type == FFI_TYPE_VOID || a->size > 0, file, line); ! FFI_ASSERT_AT(a->type == FFI_TYPE_VOID || a->alignment > 0, file, line); ! FFI_ASSERT_AT(a->type != FFI_TYPE_STRUCT || a->elements != NULL, file, line); /*@=usedef@*/ } diff -Nrc3pad gcc-3.3.3/libffi/src/ffitest.c gcc-3.4.0/libffi/src/ffitest.c *** gcc-3.3.3/libffi/src/ffitest.c 2003-01-14 11:11:35.000000000 +0000 --- gcc-3.4.0/libffi/src/ffitest.c 2003-04-18 12:32:36.000000000 +0000 *************** closure_test_fn(ffi_cif* cif,void* resp, *** 309,315 **** (int)(*(int *)args[10]), (int)(*(float *)args[11]), (int)*(int *)args[12], (int)(*(int *)args[13]), (int)(*(int *)args[14]),*(int *)args[15], ! (int)(long)userdata, *(int*)resp); } typedef int (*closure_test_type)(unsigned long long, int, unsigned long long, --- 309,315 ---- (int)(*(int *)args[10]), (int)(*(float *)args[11]), (int)*(int *)args[12], (int)(*(int *)args[13]), (int)(*(int *)args[14]),*(int *)args[15], ! (int)(long)userdata, (int)*(ffi_arg *)resp); } typedef int (*closure_test_type)(unsigned long long, int, unsigned long long, *************** static void closure_test_fn1(ffi_cif* ci *** 339,345 **** (int)(*(int *)args[10]), (int)(*(float *)args[11]), (int)*(int *)args[12], (int)(*(int *)args[13]), (int)(*(int *)args[14]), *(int *)args[15], ! (int)(long)userdata, *(int*)resp); } typedef int (*closure_test_type1)(float, float, float, float, signed short, --- 339,345 ---- (int)(*(int *)args[10]), (int)(*(float *)args[11]), (int)*(int *)args[12], (int)(*(int *)args[13]), (int)(*(int *)args[14]), *(int *)args[15], ! (int)(long)userdata, (int)*(ffi_arg *)resp); } typedef int (*closure_test_type1)(float, float, float, float, signed short, *************** static void closure_test_fn2(ffi_cif* ci *** 368,374 **** (int)(*(int *)args[10]), (int)(*(float *)args[11]), (int)*(int *)args[12], (int)(*(float *)args[13]), (int)(*(int *)args[14]), *(int *)args[15], (int)(long)userdata, ! *(int*)resp); } typedef int (*closure_test_type2)(double, double, double, double, signed short, --- 368,374 ---- (int)(*(int *)args[10]), (int)(*(float *)args[11]), (int)*(int *)args[12], (int)(*(float *)args[13]), (int)(*(int *)args[14]), *(int *)args[15], (int)(long)userdata, ! (int)*(ffi_arg *)resp); } typedef int (*closure_test_type2)(double, double, double, double, signed short, *************** static void closure_test_fn3(ffi_cif* ci *** 397,403 **** (int)(*(float *)args[10]), (int)(*(float *)args[11]), (int)*(int *)args[12], (int)(*(float *)args[13]), (int)(*(float *)args[14]), *(int *)args[15], (int)(long)userdata, ! *(int*)resp); } typedef int (*closure_test_type3)(float, float, float, float, float, float, --- 397,403 ---- (int)(*(float *)args[10]), (int)(*(float *)args[11]), (int)*(int *)args[12], (int)(*(float *)args[13]), (int)(*(float *)args[14]), *(int *)args[15], (int)(long)userdata, ! (int)*(ffi_arg *)resp); } typedef int (*closure_test_type3)(float, float, float, float, float, float, *************** int main(/*@unused@*/ int argc, /*@unuse *** 430,435 **** --- 430,436 ---- /* The closure must not be an automatic variable on platforms (Solaris) that forbid stack execution by default. */ static ffi_closure cl; + ffi_closure *pcl = &cl; #endif ffi_type * cl_arg_types[17]; *************** int main(/*@unused@*/ int argc, /*@unuse *** 841,848 **** ts2_arg.d1 = 5.55; ts2_arg.d2 = 6.66; ! printf ("%g\n", ts2_result->d1); ! printf ("%g\n", ts2_result->d2); ffi_call(&cif, FFI_FN(struct2), ts2_result, values); --- 842,849 ---- ts2_arg.d1 = 5.55; ts2_arg.d2 = 6.66; ! printf ("%g\n", ts2_arg.d1); ! printf ("%g\n", ts2_arg.d2); ffi_call(&cif, FFI_FN(struct2), ts2_result, values); *************** int main(/*@unused@*/ int argc, /*@unuse *** 1161,1166 **** --- 1162,1174 ---- #endif /* X86_WIN32 */ # if FFI_CLOSURES + # if __GNUC__ >= 2 + /* Hide before the compiler that pcl is &cl, since on + some architectures it is not possible to call a data + object using direct function call. */ + asm ("" : "=g" (pcl) : "0" (pcl)); + # endif + /* A simple closure test */ { (void) puts("\nEnter FFI_CLOSURES\n"); *************** int main(/*@unused@*/ int argc, /*@unuse *** 1187,1196 **** CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 16, &ffi_type_sint, cl_arg_types) == FFI_OK); ! CHECK(ffi_prep_closure(&cl, &cif, closure_test_fn, (void *) 3 /* userdata */) == FFI_OK); ! CHECK((*((closure_test_type)(&cl))) (1LL, 2, 3LL, 4, 127, 429LL, 7, 8, 9.5, 10, 11, 12, 13, 19, 21, 1) == 680); } --- 1195,1204 ---- CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 16, &ffi_type_sint, cl_arg_types) == FFI_OK); ! CHECK(ffi_prep_closure(pcl, &cif, closure_test_fn, (void *) 3 /* userdata */) == FFI_OK); ! CHECK((*((closure_test_type)pcl)) (1LL, 2, 3LL, 4, 127, 429LL, 7, 8, 9.5, 10, 11, 12, 13, 19, 21, 1) == 680); } *************** int main(/*@unused@*/ int argc, /*@unuse *** 1219,1228 **** CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 16, &ffi_type_sint, cl_arg_types) == FFI_OK); ! CHECK(ffi_prep_closure(&cl, &cif, closure_test_fn1, (void *) 3 /* userdata */) == FFI_OK); ! CHECK((*((closure_test_type1)(&cl))) (1.1, 2.2, 3.3, 4.4, 127, 5.5, 6.6, 8, 9, 10, 11, 12.0, 13, 19, 21, 1) == 255); } --- 1227,1236 ---- CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 16, &ffi_type_sint, cl_arg_types) == FFI_OK); ! CHECK(ffi_prep_closure(pcl, &cif, closure_test_fn1, (void *) 3 /* userdata */) == FFI_OK); ! CHECK((*((closure_test_type1)pcl)) (1.1, 2.2, 3.3, 4.4, 127, 5.5, 6.6, 8, 9, 10, 11, 12.0, 13, 19, 21, 1) == 255); } *************** int main(/*@unused@*/ int argc, /*@unuse *** 1251,1260 **** CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 16, &ffi_type_sint, cl_arg_types) == FFI_OK); ! CHECK(ffi_prep_closure(&cl, &cif, closure_test_fn2, (void *) 3 /* userdata */) == FFI_OK); ! CHECK((*((closure_test_type2)(&cl))) (1, 2, 3, 4, 127, 5, 6, 8, 9, 10, 11, 12.0, 13, 19.0, 21, 1) == 255); --- 1259,1268 ---- CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 16, &ffi_type_sint, cl_arg_types) == FFI_OK); ! CHECK(ffi_prep_closure(pcl, &cif, closure_test_fn2, (void *) 3 /* userdata */) == FFI_OK); ! CHECK((*((closure_test_type2)pcl)) (1, 2, 3, 4, 127, 5, 6, 8, 9, 10, 11, 12.0, 13, 19.0, 21, 1) == 255); *************** int main(/*@unused@*/ int argc, /*@unuse *** 1284,1293 **** CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 16, &ffi_type_sint, cl_arg_types) == FFI_OK); ! CHECK(ffi_prep_closure(&cl, &cif, closure_test_fn3, (void *) 3 /* userdata */) == FFI_OK); ! CHECK((*((closure_test_type3)(&cl))) (1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9, 10, 11.11, 12.0, 13, 19.19, 21.21, 1) == 135); } --- 1292,1301 ---- CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 16, &ffi_type_sint, cl_arg_types) == FFI_OK); ! CHECK(ffi_prep_closure(pcl, &cif, closure_test_fn3, (void *) 3 /* userdata */) == FFI_OK); ! CHECK((*((closure_test_type3)pcl)) (1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9, 10, 11.11, 12.0, 13, 19.19, 21.21, 1) == 135); } diff -Nrc3pad gcc-3.3.3/libffi/src/ia64/ffi.c gcc-3.4.0/libffi/src/ia64/ffi.c *** gcc-3.3.3/libffi/src/ia64/ffi.c 2002-04-08 23:59:13.000000000 +0000 --- gcc-3.4.0/libffi/src/ia64/ffi.c 2003-10-22 13:57:12.000000000 +0000 *************** *** 1,5 **** /* ----------------------------------------------------------------------- ! ffi.c - Copyright (c) 1998 Cygnus Solutions Copyright (c) 2000 Hewlett Packard Company IA64 Foreign Function Interface --- 1,5 ---- /* ----------------------------------------------------------------------- ! ffi.c - Copyright (c) 1998 Red Hat, Inc. Copyright (c) 2000 Hewlett Packard Company IA64 Foreign Function Interface *************** *** 28,33 **** --- 28,34 ---- #include #include + #include #include "ia64_flags.h" *************** static bool is_homogeneous_fp_aggregate( *** 92,124 **** switch((*ptr) -> type) { case FFI_TYPE_FLOAT: if (type_set && element != FFI_TYPE_FLOAT) return 0; ! if (--n < 0) return FALSE; type_set = 1; element = FFI_TYPE_FLOAT; break; case FFI_TYPE_DOUBLE: if (type_set && element != FFI_TYPE_DOUBLE) return 0; ! if (--n < 0) return FALSE; type_set = 1; element = FFI_TYPE_DOUBLE; break; case FFI_TYPE_STRUCT: if (!is_homogeneous_fp_aggregate(type, n, &struct_element)) ! return FALSE; ! if (type_set && struct_element != element) return FALSE; n -= (type -> size)/float_type_size(element); element = struct_element; ! if (n < 0) return FALSE; break; /* case FFI_TYPE_LONGDOUBLE: Not yet implemented. */ default: ! return FALSE; } ptr++; } *element_type = element; ! return TRUE; } --- 93,125 ---- switch((*ptr) -> type) { case FFI_TYPE_FLOAT: if (type_set && element != FFI_TYPE_FLOAT) return 0; ! if (--n < 0) return false; type_set = 1; element = FFI_TYPE_FLOAT; break; case FFI_TYPE_DOUBLE: if (type_set && element != FFI_TYPE_DOUBLE) return 0; ! if (--n < 0) return false; type_set = 1; element = FFI_TYPE_DOUBLE; break; case FFI_TYPE_STRUCT: if (!is_homogeneous_fp_aggregate(type, n, &struct_element)) ! return false; ! if (type_set && struct_element != element) return false; n -= (type -> size)/float_type_size(element); element = struct_element; ! if (n < 0) return false; break; /* case FFI_TYPE_LONGDOUBLE: Not yet implemented. */ default: ! return false; } ptr++; } *element_type = element; ! return true; } *************** ffi_prep_args(struct ia64_args *stack, e *** 210,216 **** { size_t sz = (*p_arg)->size; unsigned short element_type; ! z = ((*p_arg)->size + SIZEOF_ARG - 1)/SIZEOF_ARG; if (is_homogeneous_fp_aggregate(*p_arg, 8, &element_type)) { int i; int nelements = sz/float_type_size(element_type); --- 211,217 ---- { size_t sz = (*p_arg)->size; unsigned short element_type; ! z = ((*p_arg)->size + FFI_SIZEOF_ARG - 1)/FFI_SIZEOF_ARG; if (is_homogeneous_fp_aggregate(*p_arg, 8, &element_type)) { int i; int nelements = sz/float_type_size(element_type); *************** ffi_status *** 251,257 **** ffi_prep_cif_machdep(ffi_cif *cif) { long i, avn; ! bool is_simple = TRUE; long simple_flag = FFI_SIMPLE_V; /* Adjust cif->bytes to include space for the 2 scratch words, r8 register contents, spare word, --- 252,258 ---- ffi_prep_cif_machdep(ffi_cif *cif) { long i, avn; ! bool is_simple = true; long simple_flag = FFI_SIMPLE_V; /* Adjust cif->bytes to include space for the 2 scratch words, r8 register contents, spare word, *************** ffi_prep_cif_machdep(ffi_cif *cif) *** 281,291 **** simple_flag = FFI_ADD_LONG_ARG(simple_flag); break; default: ! is_simple = FALSE; } } } else { ! is_simple = FALSE; } /* Set the return type flag */ --- 282,292 ---- simple_flag = FFI_ADD_LONG_ARG(simple_flag); break; default: ! is_simple = false; } } } else { ! is_simple = false; } /* Set the return type flag */ *************** ffi_prep_cif_machdep(ffi_cif *cif) *** 300,306 **** size_t sz = cif -> rtype -> size; unsigned short element_type; ! is_simple = FALSE; if (is_homogeneous_fp_aggregate(cif -> rtype, 8, &element_type)) { int nelements = sz/float_type_size(element_type); if (nelements <= 1) { --- 301,307 ---- size_t sz = cif -> rtype -> size; unsigned short element_type; ! is_simple = false; if (is_homogeneous_fp_aggregate(cif -> rtype, 8, &element_type)) { int nelements = sz/float_type_size(element_type); if (nelements <= 1) { *************** ffi_prep_cif_machdep(ffi_cif *cif) *** 341,352 **** break; case FFI_TYPE_FLOAT: ! is_simple = FALSE; cif->flags = FFI_TYPE_FLOAT; break; case FFI_TYPE_DOUBLE: ! is_simple = FALSE; cif->flags = FFI_TYPE_DOUBLE; break; --- 342,353 ---- break; case FFI_TYPE_FLOAT: ! is_simple = false; cif->flags = FFI_TYPE_FLOAT; break; case FFI_TYPE_DOUBLE: ! is_simple = false; cif->flags = FFI_TYPE_DOUBLE; break; *************** ffi_prep_incoming_args_UNIX(struct ia64_ *** 596,602 **** { size_t sz = (*p_arg)->size; unsigned short element_type; ! z = ((*p_arg)->size + SIZEOF_ARG - 1)/SIZEOF_ARG; if (is_homogeneous_fp_aggregate(*p_arg, 8, &element_type)) { int nelements = sz/float_type_size(element_type); if (nelements + fp_reg_num >= 8) { --- 597,603 ---- { size_t sz = (*p_arg)->size; unsigned short element_type; ! z = ((*p_arg)->size + FFI_SIZEOF_ARG - 1)/FFI_SIZEOF_ARG; if (is_homogeneous_fp_aggregate(*p_arg, 8, &element_type)) { int nelements = sz/float_type_size(element_type); if (nelements + fp_reg_num >= 8) { diff -Nrc3pad gcc-3.3.3/libffi/src/ia64/ffitarget.h gcc-3.4.0/libffi/src/ia64/ffitarget.h *** gcc-3.3.3/libffi/src/ia64/ffitarget.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/src/ia64/ffitarget.h 2003-10-21 19:07:50.000000000 +0000 *************** *** 0 **** --- 1,58 ---- + /* -----------------------------------------------------------------*-C-*- + ffitarget.h - Copyright (c) 1996-2003 Red Hat, Inc. + Target configuration macros for IA-64. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + ``Software''), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + ----------------------------------------------------------------------- */ + + #ifndef LIBFFI_TARGET_H + #define LIBFFI_TARGET_H + + #ifndef LIBFFI_ASM + typedef unsigned long ffi_arg; + typedef signed long ffi_sarg; + + typedef enum ffi_abi { + FFI_FIRST_ABI = 0, + FFI_UNIX, /* Linux and all Unix variants use the same conventions */ + FFI_DEFAULT_ABI = FFI_UNIX, + FFI_LAST_ABI = FFI_DEFAULT_ABI + 1 + } ffi_abi; + #endif + + /* ---- Definitions for closures ----------------------------------------- */ + + #define FFI_CLOSURES 1 + #define FFI_TRAMPOLINE_SIZE 24 /* Really the following struct, which */ + /* can be interpreted as a C function */ + /* descriptor: */ + + #ifndef LIBFFI_ASM + struct ffi_ia64_trampoline_struct { + void * code_pointer; /* Pointer to ffi_closure_UNIX */ + void * fake_gp; /* Pointer to closure, installed as gp */ + void * real_gp; /* Real gp value, reinstalled by */ + /* ffi_closure_UNIX. */ + }; + #endif + + #endif + diff -Nrc3pad gcc-3.3.3/libffi/src/ia64/unix.S gcc-3.4.0/libffi/src/ia64/unix.S *** gcc-3.3.3/libffi/src/ia64/unix.S 2002-04-08 23:59:13.000000000 +0000 --- gcc-3.4.0/libffi/src/ia64/unix.S 2003-10-21 19:01:55.000000000 +0000 *************** *** 1,5 **** /* ----------------------------------------------------------------------- ! unix.S - Copyright (c) 1998 Cygnus Solutions Copyright (c) 2000 Hewlett Packard Company IA64/unix Foreign Function Interface --- 1,5 ---- /* ----------------------------------------------------------------------- ! unix.S - Copyright (c) 1998 Red Hat, Inc. Copyright (c) 2000 Hewlett Packard Company IA64/unix Foreign Function Interface *************** *** 29,34 **** --- 29,35 ---- ----------------------------------------------------------------------- */ #define LIBFFI_ASM + #include #include #include "ia64_flags.h" diff -Nrc3pad gcc-3.3.3/libffi/src/java_raw_api.c gcc-3.4.0/libffi/src/java_raw_api.c *** gcc-3.3.3/libffi/src/java_raw_api.c 2002-10-08 14:55:02.000000000 +0000 --- gcc-3.4.0/libffi/src/java_raw_api.c 2003-10-23 20:24:20.000000000 +0000 *************** *** 1,5 **** /* ----------------------------------------------------------------------- ! java_raw_api.c - Copyright (c) 1999 Cygnus Solutions Cloned from raw_api.c --- 1,5 ---- /* ----------------------------------------------------------------------- ! java_raw_api.c - Copyright (c) 1999 Red Hat, Inc. Cloned from raw_api.c *************** *** 36,41 **** --- 36,42 ---- #include #include + #include #if !defined(NO_JAVA_RAW_API) && !defined(FFI_NO_RAW_API) *************** ffi_java_raw_size (ffi_cif *cif) *** 53,65 **** case FFI_TYPE_UINT64: case FFI_TYPE_SINT64: case FFI_TYPE_DOUBLE: ! result += 2 * SIZEOF_ARG; break; case FFI_TYPE_STRUCT: /* No structure parameters in Java. */ abort(); default: ! result += SIZEOF_ARG; } } --- 54,66 ---- case FFI_TYPE_UINT64: case FFI_TYPE_SINT64: case FFI_TYPE_DOUBLE: ! result += 2 * FFI_SIZEOF_ARG; break; case FFI_TYPE_STRUCT: /* No structure parameters in Java. */ abort(); default: ! result += FFI_SIZEOF_ARG; } } *************** ffi_java_raw_to_ptrarray (ffi_cif *cif, *** 89,95 **** *args = (void*) ((char*)(raw++) + 2); break; ! #if SIZEOF_ARG == 8 case FFI_TYPE_UINT64: case FFI_TYPE_SINT64: case FFI_TYPE_DOUBLE: --- 90,96 ---- *args = (void*) ((char*)(raw++) + 2); break; ! #if FFI_SIZEOF_ARG == 8 case FFI_TYPE_UINT64: case FFI_TYPE_SINT64: case FFI_TYPE_DOUBLE: *************** ffi_java_raw_to_ptrarray (ffi_cif *cif, *** 104,110 **** default: *args = raw; ! raw += ALIGN ((*tp)->size, SIZEOF_ARG) / SIZEOF_ARG; } } --- 105,111 ---- default: *args = raw; ! raw += ALIGN ((*tp)->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG; } } *************** ffi_java_raw_to_ptrarray (ffi_cif *cif, *** 115,121 **** /* then assume little endian */ for (i = 0; i < cif->nargs; i++, tp++, args++) { ! #if SIZEOF_ARG == 8 switch((*tp)->type) { case FFI_TYPE_UINT64: case FFI_TYPE_SINT64: --- 116,122 ---- /* then assume little endian */ for (i = 0; i < cif->nargs; i++, tp++, args++) { ! #if FFI_SIZEOF_ARG == 8 switch((*tp)->type) { case FFI_TYPE_UINT64: case FFI_TYPE_SINT64: *************** ffi_java_raw_to_ptrarray (ffi_cif *cif, *** 126,135 **** default: *args = (void*) raw++; } ! #else /* SIZEOF_ARG != 8 */ *args = (void*) raw; raw += ALIGN ((*tp)->size, sizeof (void*)) / sizeof (void*); ! #endif /* SIZEOF_ARG == 8 */ } #else --- 127,136 ---- default: *args = (void*) raw++; } ! #else /* FFI_SIZEOF_ARG != 8 */ *args = (void*) raw; raw += ALIGN ((*tp)->size, sizeof (void*)) / sizeof (void*); ! #endif /* FFI_SIZEOF_ARG == 8 */ } #else *************** ffi_java_ptrarray_to_raw (ffi_cif *cif, *** 201,207 **** (raw++)->flt = *(FLOAT32*) (*args); break; ! #if SIZEOF_ARG == 8 case FFI_TYPE_UINT64: case FFI_TYPE_SINT64: case FFI_TYPE_DOUBLE: --- 202,208 ---- (raw++)->flt = *(FLOAT32*) (*args); break; ! #if FFI_SIZEOF_ARG == 8 case FFI_TYPE_UINT64: case FFI_TYPE_SINT64: case FFI_TYPE_DOUBLE: *************** ffi_java_ptrarray_to_raw (ffi_cif *cif, *** 215,225 **** break; default: ! #if SIZEOF_ARG == 8 ! FFI_ASSERT(FALSE); /* Should have covered all cases */ #else memcpy ((void*) raw->data, (void*)*args, (*tp)->size); ! raw += ALIGN ((*tp)->size, SIZEOF_ARG) / SIZEOF_ARG; #endif } } --- 216,226 ---- break; default: ! #if FFI_SIZEOF_ARG == 8 ! FFI_ASSERT(0); /* Should have covered all cases */ #else memcpy ((void*) raw->data, (void*)*args, (*tp)->size); ! raw += ALIGN ((*tp)->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG; #endif } } *************** ffi_java_ptrarray_to_raw (ffi_cif *cif, *** 230,236 **** static void ffi_java_rvalue_to_raw (ffi_cif *cif, void *rvalue) { ! #if WORDS_BIGENDIAN && SIZEOF_ARG == 8 switch (cif->rtype->type) { case FFI_TYPE_UINT8: --- 231,237 ---- static void ffi_java_rvalue_to_raw (ffi_cif *cif, void *rvalue) { ! #if WORDS_BIGENDIAN && FFI_SIZEOF_ARG == 8 switch (cif->rtype->type) { case FFI_TYPE_UINT8: *************** ffi_java_rvalue_to_raw (ffi_cif *cif, vo *** 255,261 **** static void ffi_java_raw_to_rvalue (ffi_cif *cif, void *rvalue) { ! #if WORDS_BIGENDIAN && SIZEOF_ARG == 8 switch (cif->rtype->type) { case FFI_TYPE_UINT8: --- 256,262 ---- static void ffi_java_raw_to_rvalue (ffi_cif *cif, void *rvalue) { ! #if WORDS_BIGENDIAN && FFI_SIZEOF_ARG == 8 switch (cif->rtype->type) { case FFI_TYPE_UINT8: diff -Nrc3pad gcc-3.3.3/libffi/src/m68k/ffitarget.h gcc-3.4.0/libffi/src/m68k/ffitarget.h *** gcc-3.3.3/libffi/src/m68k/ffitarget.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/src/m68k/ffitarget.h 2003-10-21 19:07:50.000000000 +0000 *************** *** 0 **** --- 1,47 ---- + /* -----------------------------------------------------------------*-C-*- + ffitarget.h - Copyright (c) 1996-2003 Red Hat, Inc. + Target configuration macros for Motorola 68K. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + ``Software''), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + ----------------------------------------------------------------------- */ + + #ifndef LIBFFI_TARGET_H + #define LIBFFI_TARGET_H + + #ifndef LIBFFI_ASM + typedef unsigned long ffi_arg; + typedef signed long ffi_sarg; + + typedef enum ffi_abi { + FFI_FIRST_ABI = 0, + FFI_SYSV, + FFI_DEFAULT_ABI = FFI_SYSV, + FFI_LAST_ABI = FFI_DEFAULT_ABI + 1 + } ffi_abi; + #endif + + /* ---- Definitions for closures ----------------------------------------- */ + + #define FFI_CLOSURES 0 + #define FFI_NATIVE_RAW_API 0 + + #endif + diff -Nrc3pad gcc-3.3.3/libffi/src/m68k/sysv.S gcc-3.4.0/libffi/src/m68k/sysv.S *** gcc-3.3.3/libffi/src/m68k/sysv.S 1999-08-08 13:27:19.000000000 +0000 --- gcc-3.4.0/libffi/src/m68k/sysv.S 2003-10-21 19:01:56.000000000 +0000 *************** *** 5,10 **** --- 5,11 ---- ----------------------------------------------------------------------- */ #define LIBFFI_ASM + #include #include .text diff -Nrc3pad gcc-3.3.3/libffi/src/mips/ffi.c gcc-3.4.0/libffi/src/mips/ffi.c *** gcc-3.3.3/libffi/src/mips/ffi.c 2002-07-18 23:08:31.000000000 +0000 --- gcc-3.4.0/libffi/src/mips/ffi.c 2003-10-21 19:01:56.000000000 +0000 *************** *** 1,5 **** /* ----------------------------------------------------------------------- ! ffi.c - Copyright (c) 1996 Cygnus Solutions MIPS Foreign Function Interface --- 1,5 ---- /* ----------------------------------------------------------------------- ! ffi.c - Copyright (c) 1996 Red Hat, Inc. MIPS Foreign Function Interface *************** *** 23,35 **** OTHER DEALINGS IN THE SOFTWARE. ----------------------------------------------------------------------- */ - #include #include #include #include ! #if _MIPS_SIM == _MIPS_SIM_NABI32 #define FIX_ARGP \ FFI_ASSERT(argp <= &stack[bytes]); \ if (argp == &stack[bytes]) \ --- 23,34 ---- OTHER DEALINGS IN THE SOFTWARE. ----------------------------------------------------------------------- */ #include #include #include ! #if _MIPS_SIM == _ABIN32 #define FIX_ARGP \ FFI_ASSERT(argp <= &stack[bytes]); \ if (argp == &stack[bytes]) \ *************** static void ffi_prep_args(char *stack, *** 55,66 **** register char *argp; register ffi_type **p_arg; ! #if _MIPS_SIM == _MIPS_SIM_NABI32 /* If more than 8 double words are used, the remainder go on the stack. We reorder stuff on the stack here to support this easily. */ ! if (bytes > 8 * SIZEOF_ARG) ! argp = &stack[bytes - (8 * SIZEOF_ARG)]; else argp = stack; #else --- 54,65 ---- register char *argp; register ffi_type **p_arg; ! #if _MIPS_SIM == _ABIN32 /* If more than 8 double words are used, the remainder go on the stack. We reorder stuff on the stack here to support this easily. */ ! if (bytes > 8 * FFI_SIZEOF_ARG) ! argp = &stack[bytes - (8 * FFI_SIZEOF_ARG)]; else argp = stack; #else *************** static void ffi_prep_args(char *stack, *** 69,82 **** memset(stack, 0, bytes); ! #if _MIPS_SIM == _MIPS_SIM_NABI32 if ( ecif->cif->rstruct_flag != 0 ) #else if ( ecif->cif->rtype->type == FFI_TYPE_STRUCT ) #endif { ! *(SLOT_TYPE_UNSIGNED *) argp = (SLOT_TYPE_UNSIGNED) ecif->rvalue; ! argp += sizeof(SLOT_TYPE_UNSIGNED); FIX_ARGP; } --- 68,81 ---- memset(stack, 0, bytes); ! #if _MIPS_SIM == _ABIN32 if ( ecif->cif->rstruct_flag != 0 ) #else if ( ecif->cif->rtype->type == FFI_TYPE_STRUCT ) #endif { ! *(ffi_arg *) argp = (ffi_arg) ecif->rvalue; ! argp += sizeof(ffi_arg); FIX_ARGP; } *************** static void ffi_prep_args(char *stack, *** 92,107 **** FIX_ARGP; } ! #if _MIPS_SIM == _MIPS_SIM_ABI32 #define OFFSET 0 #else #define OFFSET sizeof(int) #endif z = (*p_arg)->size; ! if (z < sizeof(SLOT_TYPE_UNSIGNED)) { ! z = sizeof(SLOT_TYPE_UNSIGNED); switch ((*p_arg)->type) { --- 91,106 ---- FIX_ARGP; } ! #if _MIPS_SIM == _ABIO32 #define OFFSET 0 #else #define OFFSET sizeof(int) #endif z = (*p_arg)->size; ! if (z < sizeof(ffi_arg)) { ! z = sizeof(ffi_arg); switch ((*p_arg)->type) { *************** static void ffi_prep_args(char *stack, *** 146,152 **** } else { ! #if _MIPS_SIM == _MIPS_SIM_ABI32 memcpy(argp, *p_argv, z); #else { --- 145,151 ---- } else { ! #if _MIPS_SIM == _ABIO32 memcpy(argp, *p_argv, z); #else { *************** static void ffi_prep_args(char *stack, *** 178,184 **** return; } ! #if _MIPS_SIM == _MIPS_SIM_NABI32 /* The n32 spec says that if "a chunk consists solely of a double float field (but not a double, which is part of a union), it --- 177,183 ---- return; } ! #if _MIPS_SIM == _ABIN32 /* The n32 spec says that if "a chunk consists solely of a double float field (but not a double, which is part of a union), it *************** ffi_status ffi_prep_cif_machdep(ffi_cif *** 267,273 **** { cif->flags = 0; ! #if _MIPS_SIM == _MIPS_SIM_ABI32 /* Set the flags necessary for O32 processing */ if (cif->rtype->type != FFI_TYPE_STRUCT) --- 266,272 ---- { cif->flags = 0; ! #if _MIPS_SIM == _ABIO32 /* Set the flags necessary for O32 processing */ if (cif->rtype->type != FFI_TYPE_STRUCT) *************** ffi_status ffi_prep_cif_machdep(ffi_cif *** 322,328 **** } #endif ! #if _MIPS_SIM == _MIPS_SIM_NABI32 /* Set the flags necessary for N32 processing */ { unsigned shift = 0; --- 321,327 ---- } #endif ! #if _MIPS_SIM == _ABIN32 /* Set the flags necessary for N32 processing */ { unsigned shift = 0; *************** void ffi_call(ffi_cif *cif, void (*fn)() *** 441,454 **** switch (cif->abi) { ! #if _MIPS_SIM == _MIPS_SIM_ABI32 case FFI_O32: ffi_call_O32(ffi_prep_args, &ecif, cif->bytes, cif->flags, ecif.rvalue, fn); break; #endif ! #if _MIPS_SIM == _MIPS_SIM_NABI32 case FFI_N32: ffi_call_N32(ffi_prep_args, &ecif, cif->bytes, cif->flags, ecif.rvalue, fn); --- 440,453 ---- switch (cif->abi) { ! #if _MIPS_SIM == _ABIO32 case FFI_O32: ffi_call_O32(ffi_prep_args, &ecif, cif->bytes, cif->flags, ecif.rvalue, fn); break; #endif ! #if _MIPS_SIM == _ABIN32 case FFI_N32: ffi_call_N32(ffi_prep_args, &ecif, cif->bytes, cif->flags, ecif.rvalue, fn); diff -Nrc3pad gcc-3.3.3/libffi/src/mips/ffitarget.h gcc-3.4.0/libffi/src/mips/ffitarget.h *** gcc-3.3.3/libffi/src/mips/ffitarget.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/src/mips/ffitarget.h 2003-10-22 15:32:13.000000000 +0000 *************** *** 0 **** --- 1,160 ---- + /* -----------------------------------------------------------------*-C-*- + ffitarget.h - Copyright (c) 1996-2003 Red Hat, Inc. + Target configuration macros for MIPS. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + ``Software''), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + ----------------------------------------------------------------------- */ + + #ifndef LIBFFI_TARGET_H + #define LIBFFI_TARGET_H + + #ifndef LIBFFI_ASM + #include + #endif + + #if !defined(_MIPS_SIM) + -- something is very wrong -- + #else + # if (_MIPS_SIM==_ABIN32 && defined(_ABIN32)) || (_MIPS_SIM==_ABI64 && defined(_ABI64)) + # define FFI_MIPS_N32 + # else + # if _MIPS_SIM==_ABIO32 && defined(_ABIO32) + # define FFI_MIPS_O32 + # else + -- this is an unsupported platform -- + # endif + # endif + #endif + + #ifdef FFI_MIPS_O32 + /* O32 stack frames have 32bit integer args */ + #define FFI_SIZEOF_ARG 4 + #else + /* N32 and N64 frames have 64bit integer args */ + #define FFI_SIZEOF_ARG 8 + #endif + + #define FFI_FLAG_BITS 2 + + /* SGI's strange assembler requires that we multiply by 4 rather + than shift left by FFI_FLAG_BITS */ + + #define FFI_ARGS_D FFI_TYPE_DOUBLE + #define FFI_ARGS_F FFI_TYPE_FLOAT + #define FFI_ARGS_DD FFI_TYPE_DOUBLE * 4 + FFI_TYPE_DOUBLE + #define FFI_ARGS_FF FFI_TYPE_FLOAT * 4 + FFI_TYPE_FLOAT + #define FFI_ARGS_FD FFI_TYPE_DOUBLE * 4 + FFI_TYPE_FLOAT + #define FFI_ARGS_DF FFI_TYPE_FLOAT * 4 + FFI_TYPE_DOUBLE + + /* Needed for N32 structure returns */ + #define FFI_TYPE_SMALLSTRUCT FFI_TYPE_UINT8 + #define FFI_TYPE_SMALLSTRUCT2 FFI_TYPE_SINT8 + + #if 0 + /* The SGI assembler can't handle this.. */ + #define FFI_TYPE_STRUCT_DD (( FFI_ARGS_DD ) << 4) + FFI_TYPE_STRUCT + /* (and so on) */ + #else + /* ...so we calculate these by hand! */ + #define FFI_TYPE_STRUCT_D 61 + #define FFI_TYPE_STRUCT_F 45 + #define FFI_TYPE_STRUCT_DD 253 + #define FFI_TYPE_STRUCT_FF 173 + #define FFI_TYPE_STRUCT_FD 237 + #define FFI_TYPE_STRUCT_DF 189 + #define FFI_TYPE_STRUCT_SMALL 93 + #define FFI_TYPE_STRUCT_SMALL2 109 + #endif + + #ifdef LIBFFI_ASM + #define v0 $2 + #define v1 $3 + #define a0 $4 + #define a1 $5 + #define a2 $6 + #define a3 $7 + #define a4 $8 + #define a5 $9 + #define a6 $10 + #define a7 $11 + #define t0 $8 + #define t1 $9 + #define t2 $10 + #define t3 $11 + #define t4 $12 + #define t5 $13 + #define t6 $14 + #define t7 $15 + #define t8 $24 + #define t9 $25 + #define ra $31 + + #ifdef FFI_MIPS_O32 + #define REG_L lw + #define REG_S sw + #define SUBU subu + #define ADDU addu + #define SRL srl + #define LI li + #else /* !FFI_MIPS_O32 */ + #define REG_L ld + #define REG_S sd + #define SUBU dsubu + #define ADDU daddu + #define SRL dsrl + #define LI dli + #endif /* !FFI_MIPS_O32 */ + #else /* !LIBFFI_ASM */ + #ifdef FFI_MIPS_O32 + /* O32 stack frames have 32bit integer args */ + typedef unsigned int ffi_arg __attribute__((__mode__(__SI__))); + typedef signed int ffi_sarg __attribute__((__mode__(__SI__))); + #else + /* N32 and N64 frames have 64bit integer args */ + typedef unsigned int ffi_arg __attribute__((__mode__(__DI__))); + typedef signed int ffi_sarg __attribute__((__mode__(__DI__))); + #endif + + typedef enum ffi_abi { + FFI_FIRST_ABI = 0, + FFI_O32, + FFI_N32, + FFI_N64, + + #ifdef FFI_MIPS_O32 + FFI_DEFAULT_ABI = FFI_O32, + #else + FFI_DEFAULT_ABI = FFI_N32, + #endif + + FFI_LAST_ABI = FFI_DEFAULT_ABI + 1 + } ffi_abi; + + #define FFI_EXTRA_CIF_FIELDS unsigned rstruct_flag + #endif /* !LIBFFI_ASM */ + + /* ---- Definitions for closures ----------------------------------------- */ + + #define FFI_CLOSURES 0 + #define FFI_NATIVE_RAW_API 0 + + #endif + diff -Nrc3pad gcc-3.3.3/libffi/src/mips/n32.S gcc-3.4.0/libffi/src/mips/n32.S *** gcc-3.3.3/libffi/src/mips/n32.S 2001-03-02 22:21:23.000000000 +0000 --- gcc-3.4.0/libffi/src/mips/n32.S 2003-10-21 19:01:56.000000000 +0000 *************** *** 1,5 **** /* ----------------------------------------------------------------------- ! n32.S - Copyright (c) 1996, 1998 Cygnus Solutions MIPS Foreign Function Interface --- 1,5 ---- /* ----------------------------------------------------------------------- ! n32.S - Copyright (c) 1996, 1998 Red Hat, Inc. MIPS Foreign Function Interface *************** *** 24,29 **** --- 24,30 ---- ----------------------------------------------------------------------- */ #define LIBFFI_ASM + #include #include /* Only build this code if we are compiling for n32 */ *************** *** 36,42 **** #define raddr a4 #define fn a5 ! #define SIZEOF_FRAME ( 8 * SIZEOF_ARG ) .text .align 2 --- 37,43 ---- #define raddr a4 #define fn a5 ! #define SIZEOF_FRAME ( 8 * FFI_SIZEOF_ARG ) .text .align 2 *************** ffi_call_N32: *** 46,82 **** # Prologue SUBU $sp, SIZEOF_FRAME # Frame size ! REG_S $fp, SIZEOF_FRAME - 2*SIZEOF_ARG($sp) # Save frame pointer ! REG_S ra, SIZEOF_FRAME - 1*SIZEOF_ARG($sp) # Save return address move $fp, $sp move t9, callback # callback function pointer ! REG_S bytes, 2*SIZEOF_ARG($fp) # bytes ! REG_S flags, 3*SIZEOF_ARG($fp) # flags ! REG_S raddr, 4*SIZEOF_ARG($fp) # raddr ! REG_S fn, 5*SIZEOF_ARG($fp) # fn # Allocate at least 4 words in the argstack move v0, bytes ! bge bytes, 4 * SIZEOF_ARG, bigger ! LI v0, 4 * SIZEOF_ARG b sixteen bigger: ! ADDU t4, v0, 2 * SIZEOF_ARG -1 # make sure it is aligned ! and v0, t4, -2 * SIZEOF_ARG # to a proper boundry. sixteen: SUBU $sp, $sp, v0 # move the stack pointer to reflect the # arg space ! ADDU a0, $sp, 0 # 4 * SIZEOF_ARG ! ADDU a3, $fp, 3 * SIZEOF_ARG # Call ffi_prep_args jal t9 ! # ADDU $sp, $sp, 4 * SIZEOF_ARG # adjust $sp to new args # Copy the stack pointer to t9 move t9, $sp --- 47,83 ---- # Prologue SUBU $sp, SIZEOF_FRAME # Frame size ! REG_S $fp, SIZEOF_FRAME - 2*FFI_SIZEOF_ARG($sp) # Save frame pointer ! REG_S ra, SIZEOF_FRAME - 1*FFI_SIZEOF_ARG($sp) # Save return address move $fp, $sp move t9, callback # callback function pointer ! REG_S bytes, 2*FFI_SIZEOF_ARG($fp) # bytes ! REG_S flags, 3*FFI_SIZEOF_ARG($fp) # flags ! REG_S raddr, 4*FFI_SIZEOF_ARG($fp) # raddr ! REG_S fn, 5*FFI_SIZEOF_ARG($fp) # fn # Allocate at least 4 words in the argstack move v0, bytes ! bge bytes, 4 * FFI_SIZEOF_ARG, bigger ! LI v0, 4 * FFI_SIZEOF_ARG b sixteen bigger: ! ADDU t4, v0, 2 * FFI_SIZEOF_ARG -1 # make sure it is aligned ! and v0, t4, -2 * FFI_SIZEOF_ARG # to a proper boundry. sixteen: SUBU $sp, $sp, v0 # move the stack pointer to reflect the # arg space ! ADDU a0, $sp, 0 # 4 * FFI_SIZEOF_ARG ! ADDU a3, $fp, 3 * FFI_SIZEOF_ARG # Call ffi_prep_args jal t9 ! # ADDU $sp, $sp, 4 * FFI_SIZEOF_ARG # adjust $sp to new args # Copy the stack pointer to t9 move t9, $sp *************** sixteen: *** 85,94 **** # of arguments. # Load the number of bytes ! REG_L t6, 2*SIZEOF_ARG($fp) ! # Is it bigger than 8 * SIZEOF_ARG? ! dadd t7, $0, 8 * SIZEOF_ARG dsub t8, t6, t7 bltz t8, loadregs --- 86,95 ---- # of arguments. # Load the number of bytes ! REG_L t6, 2*FFI_SIZEOF_ARG($fp) ! # Is it bigger than 8 * FFI_SIZEOF_ARG? ! dadd t7, $0, 8 * FFI_SIZEOF_ARG dsub t8, t6, t7 bltz t8, loadregs *************** sixteen: *** 96,220 **** loadregs: ! REG_L t4, 3*SIZEOF_ARG($fp) # load the flags word add t6, t4, 0 # and copy it into t6 and t4, ((1< #include /* Only build this code if we are compiling for o32 */ *************** *** 34,40 **** #define bytes a2 #define flags a3 ! #define SIZEOF_FRAME ( 4 * SIZEOF_ARG + 2 * SIZEOF_ARG ) .text .align 2 --- 35,41 ---- #define bytes a2 #define flags a3 ! #define SIZEOF_FRAME ( 4 * FFI_SIZEOF_ARG + 2 * FFI_SIZEOF_ARG ) .text .align 2 *************** ffi_call_O32: *** 44,157 **** # Prologue SUBU $sp, SIZEOF_FRAME # Frame size ! REG_S $fp, SIZEOF_FRAME - 2*SIZEOF_ARG($sp) # Save frame pointer ! REG_S ra, SIZEOF_FRAME - 1*SIZEOF_ARG($sp) # Save return address move $fp, $sp move t9, callback # callback function pointer ! REG_S flags, SIZEOF_FRAME + 3*SIZEOF_ARG($fp) # flags # Allocate at least 4 words in the argstack move v0, bytes ! bge bytes, 4 * SIZEOF_ARG, bigger ! LI v0, 4 * SIZEOF_ARG b sixteen bigger: ! ADDU t0, v0, 2 * SIZEOF_ARG -1 # make sure it is aligned ! and v0, t0, -2 * SIZEOF_ARG # to an 8 byte boundry sixteen: SUBU $sp, $sp, v0 # move the stack pointer to reflect the # arg space ! ADDU a0, $sp, 4 * SIZEOF_ARG ! ADDU a3, $fp, SIZEOF_FRAME + 3*SIZEOF_ARG jal t9 ! REG_L t0, SIZEOF_FRAME + 3*SIZEOF_ARG($fp) # load the flags word add t2, t0, 0 # and copy it into t2 and t0, ((1<<4)-1) # mask out the return type SRL t2, 4 # shift our arg info ! ADDU $sp, $sp, 4 * SIZEOF_ARG # adjust $sp to new args bnez t0, pass_d # make it quick for int ! REG_L a0, 0*SIZEOF_ARG($sp) # just go ahead and load the ! REG_L a1, 1*SIZEOF_ARG($sp) # four regs. ! REG_L a2, 2*SIZEOF_ARG($sp) ! REG_L a3, 3*SIZEOF_ARG($sp) b call_it pass_d: bne t0, FFI_ARGS_D, pass_f ! l.d $f12, 0*SIZEOF_ARG($sp) # load $fp regs from args ! REG_L a2, 2*SIZEOF_ARG($sp) # passing a double ! REG_L a3, 3*SIZEOF_ARG($sp) b call_it pass_f: bne t0, FFI_ARGS_F, pass_d_d ! l.s $f12, 0*SIZEOF_ARG($sp) # load $fp regs from args ! REG_L a1, 1*SIZEOF_ARG($sp) # passing a float ! REG_L a2, 2*SIZEOF_ARG($sp) ! REG_L a3, 3*SIZEOF_ARG($sp) b call_it pass_d_d: bne t0, FFI_ARGS_DD, pass_f_f ! l.d $f12, 0*SIZEOF_ARG($sp) # load $fp regs from args ! l.d $f14, 2*SIZEOF_ARG($sp) # passing two doubles b call_it pass_f_f: bne t0, FFI_ARGS_FF, pass_d_f ! l.s $f12, 0*SIZEOF_ARG($sp) # load $fp regs from args ! l.s $f14, 1*SIZEOF_ARG($sp) # passing two floats ! REG_L a2, 2*SIZEOF_ARG($sp) ! REG_L a3, 3*SIZEOF_ARG($sp) b call_it pass_d_f: bne t0, FFI_ARGS_DF, pass_f_d ! l.d $f12, 0*SIZEOF_ARG($sp) # load $fp regs from args ! l.s $f14, 2*SIZEOF_ARG($sp) # passing double and float ! REG_L a3, 3*SIZEOF_ARG($sp) b call_it pass_f_d: # assume that the only other combination must be float then double # bne t0, FFI_ARGS_F_D, call_it ! l.s $f12, 0*SIZEOF_ARG($sp) # load $fp regs from args ! l.d $f14, 2*SIZEOF_ARG($sp) # passing double and float call_it: # Load the function pointer ! REG_L t9, SIZEOF_FRAME + 5*SIZEOF_ARG($fp) # If the return value pointer is NULL, assume no return value. ! REG_L t1, SIZEOF_FRAME + 4*SIZEOF_ARG($fp) beqz t1, noretval bne t2, FFI_TYPE_INT, retfloat jal t9 ! REG_L t0, SIZEOF_FRAME + 4*SIZEOF_ARG($fp) REG_S v0, 0(t0) b epilogue retfloat: bne t2, FFI_TYPE_FLOAT, retdouble jal t9 ! REG_L t0, SIZEOF_FRAME + 4*SIZEOF_ARG($fp) s.s $f0, 0(t0) b epilogue retdouble: bne t2, FFI_TYPE_DOUBLE, noretval jal t9 ! REG_L t0, SIZEOF_FRAME + 4*SIZEOF_ARG($fp) s.d $f0, 0(t0) b epilogue --- 45,158 ---- # Prologue SUBU $sp, SIZEOF_FRAME # Frame size ! REG_S $fp, SIZEOF_FRAME - 2*FFI_SIZEOF_ARG($sp) # Save frame pointer ! REG_S ra, SIZEOF_FRAME - 1*FFI_SIZEOF_ARG($sp) # Save return address move $fp, $sp move t9, callback # callback function pointer ! REG_S flags, SIZEOF_FRAME + 3*FFI_SIZEOF_ARG($fp) # flags # Allocate at least 4 words in the argstack move v0, bytes ! bge bytes, 4 * FFI_SIZEOF_ARG, bigger ! LI v0, 4 * FFI_SIZEOF_ARG b sixteen bigger: ! ADDU t0, v0, 2 * FFI_SIZEOF_ARG -1 # make sure it is aligned ! and v0, t0, -2 * FFI_SIZEOF_ARG # to an 8 byte boundry sixteen: SUBU $sp, $sp, v0 # move the stack pointer to reflect the # arg space ! ADDU a0, $sp, 4 * FFI_SIZEOF_ARG ! ADDU a3, $fp, SIZEOF_FRAME + 3*FFI_SIZEOF_ARG jal t9 ! REG_L t0, SIZEOF_FRAME + 3*FFI_SIZEOF_ARG($fp) # load the flags word add t2, t0, 0 # and copy it into t2 and t0, ((1<<4)-1) # mask out the return type SRL t2, 4 # shift our arg info ! ADDU $sp, $sp, 4 * FFI_SIZEOF_ARG # adjust $sp to new args bnez t0, pass_d # make it quick for int ! REG_L a0, 0*FFI_SIZEOF_ARG($sp) # just go ahead and load the ! REG_L a1, 1*FFI_SIZEOF_ARG($sp) # four regs. ! REG_L a2, 2*FFI_SIZEOF_ARG($sp) ! REG_L a3, 3*FFI_SIZEOF_ARG($sp) b call_it pass_d: bne t0, FFI_ARGS_D, pass_f ! l.d $f12, 0*FFI_SIZEOF_ARG($sp) # load $fp regs from args ! REG_L a2, 2*FFI_SIZEOF_ARG($sp) # passing a double ! REG_L a3, 3*FFI_SIZEOF_ARG($sp) b call_it pass_f: bne t0, FFI_ARGS_F, pass_d_d ! l.s $f12, 0*FFI_SIZEOF_ARG($sp) # load $fp regs from args ! REG_L a1, 1*FFI_SIZEOF_ARG($sp) # passing a float ! REG_L a2, 2*FFI_SIZEOF_ARG($sp) ! REG_L a3, 3*FFI_SIZEOF_ARG($sp) b call_it pass_d_d: bne t0, FFI_ARGS_DD, pass_f_f ! l.d $f12, 0*FFI_SIZEOF_ARG($sp) # load $fp regs from args ! l.d $f14, 2*FFI_SIZEOF_ARG($sp) # passing two doubles b call_it pass_f_f: bne t0, FFI_ARGS_FF, pass_d_f ! l.s $f12, 0*FFI_SIZEOF_ARG($sp) # load $fp regs from args ! l.s $f14, 1*FFI_SIZEOF_ARG($sp) # passing two floats ! REG_L a2, 2*FFI_SIZEOF_ARG($sp) ! REG_L a3, 3*FFI_SIZEOF_ARG($sp) b call_it pass_d_f: bne t0, FFI_ARGS_DF, pass_f_d ! l.d $f12, 0*FFI_SIZEOF_ARG($sp) # load $fp regs from args ! l.s $f14, 2*FFI_SIZEOF_ARG($sp) # passing double and float ! REG_L a3, 3*FFI_SIZEOF_ARG($sp) b call_it pass_f_d: # assume that the only other combination must be float then double # bne t0, FFI_ARGS_F_D, call_it ! l.s $f12, 0*FFI_SIZEOF_ARG($sp) # load $fp regs from args ! l.d $f14, 2*FFI_SIZEOF_ARG($sp) # passing double and float call_it: # Load the function pointer ! REG_L t9, SIZEOF_FRAME + 5*FFI_SIZEOF_ARG($fp) # If the return value pointer is NULL, assume no return value. ! REG_L t1, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp) beqz t1, noretval bne t2, FFI_TYPE_INT, retfloat jal t9 ! REG_L t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp) REG_S v0, 0(t0) b epilogue retfloat: bne t2, FFI_TYPE_FLOAT, retdouble jal t9 ! REG_L t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp) s.s $f0, 0(t0) b epilogue retdouble: bne t2, FFI_TYPE_DOUBLE, noretval jal t9 ! REG_L t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp) s.d $f0, 0(t0) b epilogue *************** noretval: *** 161,168 **** # Epilogue epilogue: move $sp, $fp ! REG_L $fp, SIZEOF_FRAME - 2*SIZEOF_ARG($sp) # Restore frame pointer ! REG_L ra, SIZEOF_FRAME - 1*SIZEOF_ARG($sp) # Restore return address ADDU $sp, SIZEOF_FRAME # Fix stack pointer j ra --- 162,169 ---- # Epilogue epilogue: move $sp, $fp ! REG_L $fp, SIZEOF_FRAME - 2*FFI_SIZEOF_ARG($sp) # Restore frame pointer ! REG_L ra, SIZEOF_FRAME - 1*FFI_SIZEOF_ARG($sp) # Restore return address ADDU $sp, SIZEOF_FRAME # Fix stack pointer j ra diff -Nrc3pad gcc-3.3.3/libffi/src/powerpc/aix_closure.S gcc-3.4.0/libffi/src/powerpc/aix_closure.S *** gcc-3.3.3/libffi/src/powerpc/aix_closure.S 2003-02-07 04:33:43.000000000 +0000 --- gcc-3.4.0/libffi/src/powerpc/aix_closure.S 2003-09-18 20:53:19.000000000 +0000 *************** *** 1,7 **** /* ----------------------------------------------------------------------- aix_closure.S - Copyright (c) 2002 2003 Free Software Foundation, Inc. based on darwin_closure.S ! PowerPC Assembly glue. Permission is hereby granted, free of charge, to any person obtaining --- 1,7 ---- /* ----------------------------------------------------------------------- aix_closure.S - Copyright (c) 2002 2003 Free Software Foundation, Inc. based on darwin_closure.S ! PowerPC Assembly glue. Permission is hereby granted, free of charge, to any person obtaining *************** ffi_closure_ASM: *** 102,120 **** mflr r0 /* extract return address */ stw r0, 8(r1) /* save the return address */ ! /* 24 Bytes (Linkage Area) */ /* 32 Bytes (params) */ ! /* 104 Bytes (13*8 from FPR) */ ! /* 8 Bytes (result) /* 168 Bytes */ ! stwu r1,-176(r1) /* skip over caller save area keep stack aligned to 16 */ /* we want to build up an area for the parameters passed */ /* in registers (both floating point and integer) */ ! /* we store gpr 3 to gpr 10 (aligned to 4) in the parents outgoing area */ stw r3, 200(r1) --- 102,120 ---- mflr r0 /* extract return address */ stw r0, 8(r1) /* save the return address */ ! /* 24 Bytes (Linkage Area) */ /* 32 Bytes (params) */ ! /* 104 Bytes (13*8 from FPR) */ ! /* 8 Bytes (result) */ /* 168 Bytes */ ! stwu r1,-176(r1) /* skip over caller save area keep stack aligned to 16 */ /* we want to build up an area for the parameters passed */ /* in registers (both floating point and integer) */ ! /* we store gpr 3 to gpr 10 (aligned to 4) in the parents outgoing area */ stw r3, 200(r1) *************** ffi_closure_ASM: *** 144,163 **** /* set up registers for the routine that actually does the work */ /* get the context pointer from the trampoline */ mr r3,r11 ! /* now load up the pointer to the result storage */ addi r4,r1,160 ! /* now load up the pointer to the saved gpr registers */ addi r5,r1,200 /* now load up the pointer to the saved fpr registers */ addi r6,r1,56 - /* now load up the pointer to the outgoing parameter */ - /* stack in the previous frame */ - addi r7,r1,232 - /* make the call */ bl .ffi_closure_helper_DARWIN nop --- 144,159 ---- /* set up registers for the routine that actually does the work */ /* get the context pointer from the trampoline */ mr r3,r11 ! /* now load up the pointer to the result storage */ addi r4,r1,160 ! /* now load up the pointer to the saved gpr registers */ addi r5,r1,200 /* now load up the pointer to the saved fpr registers */ addi r6,r1,56 /* make the call */ bl .ffi_closure_helper_DARWIN nop *************** L..46: *** 203,220 **** L..47: lfs f1,0(r5) b L..44 ! /* case long long */ L..48: lwz r3,0(r5) lwz r4,4(r5) b L..44 ! /* case default / int32 / pointer */ L..50: lwz r3,0(r5) b L..44 ! /* case signed int8 */ L..55: addi r5,r5,3 --- 199,216 ---- L..47: lfs f1,0(r5) b L..44 ! /* case long long */ L..48: lwz r3,0(r5) lwz r4,4(r5) b L..44 ! /* case default / int32 / pointer */ L..50: lwz r3,0(r5) b L..44 ! /* case signed int8 */ L..55: addi r5,r5,3 *************** L..58: *** 243,252 **** /* case void / done */ L..44: - addi r1,r1,176 /* restore stack pointer */ lwz r0,8(r1) /* get return address */ mtlr r0 /* reset link register */ blr ! /* END(ffi_closure_ASM) */ --- 239,247 ---- /* case void / done */ L..44: addi r1,r1,176 /* restore stack pointer */ lwz r0,8(r1) /* get return address */ mtlr r0 /* reset link register */ blr ! /* END(ffi_closure_ASM) */ diff -Nrc3pad gcc-3.3.3/libffi/src/powerpc/aix.S gcc-3.4.0/libffi/src/powerpc/aix.S *** gcc-3.3.3/libffi/src/powerpc/aix.S 2002-01-18 18:41:11.000000000 +0000 --- gcc-3.4.0/libffi/src/powerpc/aix.S 2003-10-21 19:01:56.000000000 +0000 *************** *** 1,7 **** /* ----------------------------------------------------------------------- aix.S - Copyright (c) 2002 Free Software Foundation, Inc. based on darwin.S by John Hornkvist ! PowerPC Assembly glue. Permission is hereby granted, free of charge, to any person obtaining --- 1,7 ---- /* ----------------------------------------------------------------------- aix.S - Copyright (c) 2002 Free Software Foundation, Inc. based on darwin.S by John Hornkvist ! PowerPC Assembly glue. Permission is hereby granted, free of charge, to any person obtaining *************** *** 80,85 **** --- 80,86 ---- .set f21,21 #define LIBFFI_ASM + #include #include #define JUMPTARGET(name) name #define L(x) x *************** ffi_call_AIX: *** 121,127 **** mr r30,r6 /* rvalue, */ mr r29,r7 /* function address, */ mr r28,r8 /* our AP. */ ! /* Call ffi_prep_args. */ mr r4,r1 li r9,0 --- 122,128 ---- mr r30,r6 /* rvalue, */ mr r29,r7 /* function address, */ mr r28,r8 /* our AP. */ ! /* Call ffi_prep_args. */ mr r4,r1 li r9,0 *************** ffi_call_AIX: *** 140,155 **** mtctr r12 lwz r2,4(r29) /* Load all those argument registers. */ ! // We have set up a nice stack frame, just load it into registers. ! lwz r3, 20+(1*4)(r1) ! lwz r4, 20+(2*4)(r1) ! lwz r5, 20+(3*4)(r1) ! lwz r6, 20+(4*4)(r1) ! nop lwz r7, 20+(5*4)(r1) ! lwz r8, 20+(6*4)(r1) ! lwz r9, 20+(7*4)(r1) ! lwz r10,20+(8*4)(r1) L1: /* Load all the FP registers. */ --- 141,156 ---- mtctr r12 lwz r2,4(r29) /* Load all those argument registers. */ ! // We have set up a nice stack frame, just load it into registers. ! lwz r3, 20+(1*4)(r1) ! lwz r4, 20+(2*4)(r1) ! lwz r5, 20+(3*4)(r1) ! lwz r6, 20+(4*4)(r1) ! nop lwz r7, 20+(5*4)(r1) ! lwz r8, 20+(6*4)(r1) ! lwz r9, 20+(7*4)(r1) ! lwz r10,20+(8*4)(r1) L1: /* Load all the FP registers. */ *************** L1: *** 165,181 **** lfd f8,-16-(6*8)(r28) nop lfd f9,-16-(5*8)(r28) ! lfd f10,-16-(4*8)(r28) lfd f11,-16-(3*8)(r28) lfd f12,-16-(2*8)(r28) nop lfd f13,-16-(1*8)(r28) ! L2: /* Make the call. */ bctrl lwz r2,20(r1) ! /* Now, deal with the return value. */ mtcrf 0x01,r31 --- 166,182 ---- lfd f8,-16-(6*8)(r28) nop lfd f9,-16-(5*8)(r28) ! lfd f10,-16-(4*8)(r28) lfd f11,-16-(3*8)(r28) lfd f12,-16-(2*8)(r28) nop lfd f13,-16-(1*8)(r28) ! L2: /* Make the call. */ bctrl lwz r2,20(r1) ! /* Now, deal with the return value. */ mtcrf 0x01,r31 diff -Nrc3pad gcc-3.3.3/libffi/src/powerpc/darwin_closure.S gcc-3.4.0/libffi/src/powerpc/darwin_closure.S *** gcc-3.3.3/libffi/src/powerpc/darwin_closure.S 2003-02-07 04:33:43.000000000 +0000 --- gcc-3.4.0/libffi/src/powerpc/darwin_closure.S 2003-09-18 19:35:46.000000000 +0000 *************** *** 1,7 **** /* ----------------------------------------------------------------------- ! darwin_closure.S - Copyright (c) 2002 2003 Free Software Foundation, Inc. based on ppc_closure.S ! PowerPC Assembly glue. Permission is hereby granted, free of charge, to any person obtaining --- 1,7 ---- /* ----------------------------------------------------------------------- ! darwin_closure.S - Copyright (c) 2002 2003 Free Software Foundation, Inc. based on ppc_closure.S ! PowerPC Assembly glue. Permission is hereby granted, free of charge, to any person obtaining *************** *** 25,35 **** ----------------------------------------------------------------------- */ #define LIBFFI_ASM - #define JUMPTARGET(name) name #define L(x) x - .text - .globl _ffi_closure_helper_DARWIN .text .align 2 .globl _ffi_closure_ASM --- 25,33 ---- ----------------------------------------------------------------------- */ #define LIBFFI_ASM #define L(x) x + .file "darwin_closure.S" .text .align 2 .globl _ffi_closure_ASM *************** *** 37,70 **** .text .align 2 _ffi_closure_ASM: ! LFB1: ! mflr r0 /* extract return address */ ! stw r0, 8(r1) /* save the return address */ ! LCFI0: /* 24 Bytes (Linkage Area) 32 Bytes (outgoing parameter area, always reserved) ! 104 Bytes (13*8 from FPR) 8 Bytes (result) 168 Bytes */ ! ! stwu r1,-176(r1) /* skip over caller save area ! keep stack aligned to 16 */ ! LCFI1: ! /* we want to build up an area for the parameters passed ! in registers (both floating point and integer) */ ! ! /* we store gpr 3 to gpr 10 (aligned to 4) ! in the parents outgoing area */ stw r3, 200(r1) stw r4, 204(r1) ! stw r5, 208(r1) stw r6, 212(r1) stw r7, 216(r1) ! stw r8, 220(r1) stw r9, 224(r1) stw r10, 228(r1) ! /* we save fpr 1 to fpr 13 (aligned to 8) */ stfd f1, 56(r1) stfd f2, 64(r1) stfd f3, 72(r1) --- 35,68 ---- .text .align 2 _ffi_closure_ASM: ! LFB1: ! mflr r0 /* extract return address */ ! stw r0, 8(r1) /* save the return address */ ! LCFI0: /* 24 Bytes (Linkage Area) 32 Bytes (outgoing parameter area, always reserved) ! 104 Bytes (13*8 from FPR) 8 Bytes (result) 168 Bytes */ ! ! stwu r1,-176(r1) /* skip over caller save area ! keep stack aligned to 16. */ ! LCFI1: ! /* We want to build up an area for the parameters passed ! in registers. (both floating point and integer) */ ! ! /* We store gpr 3 to gpr 10 (aligned to 4) ! in the parents outgoing area. */ stw r3, 200(r1) stw r4, 204(r1) ! stw r5, 208(r1) stw r6, 212(r1) stw r7, 216(r1) ! stw r8, 220(r1) stw r9, 224(r1) stw r10, 228(r1) ! /* We save fpr 1 to fpr 13. (aligned to 8) */ stfd f1, 56(r1) stfd f2, 64(r1) stfd f3, 72(r1) *************** LCFI1: *** 73,193 **** stfd f6, 96(r1) stfd f7, 104(r1) stfd f8, 112(r1) ! stfd f9, 120(r1) ! stfd f10, 128(r1) ! stfd f11, 136(r1) ! stfd f12, 144(r1) ! stfd f13, 152(r1) ! /* set up registers for the routine that actually does the work */ ! /* get the context pointer from the trampoline */ mr r3,r11 ! ! /* now load up the pointer to the result storage */ addi r4,r1,160 ! ! /* now load up the pointer to the saved gpr registers */ addi r5,r1,200 ! /* now load up the pointer to the saved fpr registers */ addi r6,r1,56 ! /* now load up the pointer to the outgoing parameter ! stack in the previous frame */ ! addi r7,r1,232 ! ! /* make the call */ ! bl L(_ffi_closure_helper_DARWIN) ! /* now r3 contains the return type */ ! /* so use it to look up in a table */ ! /* so we know how to deal with each type */ ! /* look up the proper starting point in table */ ! /* by using return type as offset */ ! addi r5,r1,160 /* get pointer to results area */ ! addis r4,0,ha16(.L60) /* get address of jump table */ ! addi r4,r4,lo16(.L60) ! slwi r3,r3,2 /* now multiply return type by 4 */ ! lwzx r3,r4,r3 /* get the contents of that table value */ ! add r3,r3,r4 /* add contents of table to table address */ mtctr r3 ! bctr /* jump to it */ LFE1: ! .align 2 ! .L60: ! .long .L44-.L60 /* FFI_TYPE_VOID */ ! .long .L50-.L60 /* FFI_TYPE_INT */ ! .long .L47-.L60 /* FFI_TYPE_FLOAT */ ! .long .L46-.L60 /* FFI_TYPE_DOUBLE */ ! .long .L46-.L60 /* FFI_TYPE_LONGDOUBLE */ ! .long .L56-.L60 /* FFI_TYPE_UINT8 */ ! .long .L55-.L60 /* FFI_TYPE_SINT8 */ ! .long .L58-.L60 /* FFI_TYPE_UINT16 */ ! .long .L57-.L60 /* FFI_TYPE_SINT16 */ ! .long .L50-.L60 /* FFI_TYPE_UINT32 */ ! .long .L50-.L60 /* FFI_TYPE_SINT32 */ ! .long .L48-.L60 /* FFI_TYPE_UINT64 */ ! .long .L48-.L60 /* FFI_TYPE_SINT64 */ ! .long .L44-.L60 /* FFI_TYPE_STRUCT */ ! .long .L50-.L60 /* FFI_TYPE_POINTER */ ! /* case double */ ! .L46: ! lfd f1,0(r5) ! b .L44 ! /* case float */ ! .L47: ! lfs f1,0(r5) ! b .L44 ! ! /* case long long */ ! .L48: ! lwz r3,0(r5) ! lwz r4,4(r5) ! b .L44 ! ! /* case default / int32 / pointer */ ! .L50: ! lwz r3,0(r5) ! b .L44 ! ! /* case signed int8 */ ! .L55: ! addi r5,r5,3 ! lbz r3,0(r5) ! extsb r3,r3 ! b .L44 ! /* case unsigned int8 */ ! .L56: ! addi r5,r5,3 ! lbz r3,0(r5) ! b .L44 ! /* case signed int16 */ ! .L57: ! addi r5,r5,2 ! lhz r3,0(r5) ! extsh r3,r3 ! b .L44 ! /* case unsigned int16 */ ! .L58: ! addi r5,r5,2 ! lhz r3,0(r5) ! /* case void / done */ ! .L44: ! ! addi r1,r1,176 /* restore stack pointer */ ! lwz r0,8(r1) /* get return address */ ! mtlr r0 /* reset link register */ blr ! /* END(ffi_closure_ASM) */ .data --- 71,236 ---- stfd f6, 96(r1) stfd f7, 104(r1) stfd f8, 112(r1) ! stfd f9, 120(r1) ! stfd f10, 128(r1) ! stfd f11, 136(r1) ! stfd f12, 144(r1) ! stfd f13, 152(r1) ! /* Set up registers for the routine that actually does the work ! get the context pointer from the trampoline. */ mr r3,r11 ! ! /* Now load up the pointer to the result storage. */ addi r4,r1,160 ! ! /* Now load up the pointer to the saved gpr registers. */ addi r5,r1,200 ! /* Now load up the pointer to the saved fpr registers. */ addi r6,r1,56 ! /* Make the call. */ ! bl Lffi_closure_helper_DARWIN$stub ! /* Now r3 contains the return type ! so use it to look up in a table ! so we know how to deal with each type. */ ! /* Look up the proper starting point in table ! by using return type as offset. */ ! addi r5,r1,160 /* Get pointer to results area. */ ! bl Lget_ret_type0_addr /* Get pointer to Lret_type0 into LR. */ ! mflr r4 /* Move to r4. */ ! slwi r3,r3,4 /* Now multiply return type by 16. */ ! add r3,r3,r4 /* Add contents of table to table address. */ mtctr r3 ! bctr /* Jump to it. */ LFE1: ! /* Each of the ret_typeX code fragments has to be exactly 16 bytes long ! (4 instructions). For cache effectiveness we align to a 16 byte boundary ! first. */ ! .align 4 + nop + nop + nop + Lget_ret_type0_addr: + blrl ! /* case FFI_TYPE_VOID */ ! Lret_type0: ! b Lfinish ! nop ! nop ! nop ! /* case FFI_TYPE_INT */ ! Lret_type1: ! lwz r3,0(r5) ! b Lfinish ! nop ! nop ! /* case FFI_TYPE_FLOAT */ ! Lret_type2: ! lfs f1,0(r5) ! b Lfinish ! nop ! nop ! /* case FFI_TYPE_DOUBLE */ ! Lret_type3: ! lfd f1,0(r5) ! b Lfinish ! nop ! nop ! /* case FFI_TYPE_LONGDOUBLE */ ! Lret_type4: ! lfd f1,0(r5) ! b Lfinish ! nop ! nop ! /* case FFI_TYPE_UINT8 */ ! Lret_type5: ! lbz r3,3(r5) ! b Lfinish ! nop ! nop ! ! /* case FFI_TYPE_SINT8 */ ! Lret_type6: ! lbz r3,3(r5) ! extsb r3,r3 ! b Lfinish ! nop ! ! /* case FFI_TYPE_UINT16 */ ! Lret_type7: ! lhz r3,2(r5) ! b Lfinish ! nop ! nop ! ! /* case FFI_TYPE_SINT16 */ ! Lret_type8: ! lha r3,2(r5) ! b Lfinish ! nop ! nop ! ! /* case FFI_TYPE_UINT32 */ ! Lret_type9: ! lwz r3,0(r5) ! b Lfinish ! nop ! nop ! ! /* case FFI_TYPE_SINT32 */ ! Lret_type10: ! lwz r3,0(r5) ! b Lfinish ! nop ! nop ! ! /* case FFI_TYPE_UINT64 */ ! Lret_type11: ! lwz r3,0(r5) ! lwz r4,4(r5) ! b Lfinish ! nop ! ! /* case FFI_TYPE_SINT64 */ ! Lret_type12: ! lwz r3,0(r5) ! lwz r4,4(r5) ! b Lfinish ! nop ! ! /* case FFI_TYPE_STRUCT */ ! Lret_type13: ! b Lfinish ! nop ! nop ! nop ! ! /* case FFI_TYPE_POINTER */ ! Lret_type14: ! lwz r3,0(r5) ! b Lfinish ! nop ! nop ! ! /* case done */ ! Lfinish: ! addi r1,r1,176 /* Restore stack pointer. */ ! lwz r0,8(r1) /* Get return address. */ ! mtlr r0 /* Reset link register. */ blr ! /* END(ffi_closure_ASM) */ .data *************** LASFDE1: *** 224,230 **** .set L$set$3,LCFI1-LCFI0 .long L$set$3 .byte 0xe ; DW_CFA_def_cfa_offset ! .byte 176,1 ; uleb128 176 .byte 0x4 ; DW_CFA_advance_loc4 .set L$set$4,LCFI0-LFB1 .long L$set$4 --- 267,273 ---- .set L$set$3,LCFI1-LCFI0 .long L$set$3 .byte 0xe ; DW_CFA_def_cfa_offset ! .byte 176,1 ; uleb128 176 .byte 0x4 ; DW_CFA_advance_loc4 .set L$set$4,LCFI0-LFB1 .long L$set$4 *************** LASFDE1: *** 233,236 **** .byte 0x7e ; sleb128 -2 .align 2 LEFDE1: ! --- 276,299 ---- .byte 0x7e ; sleb128 -2 .align 2 LEFDE1: ! .data ! .align 2 ! LDFCM0: ! .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32 ! .align 2 ! Lffi_closure_helper_DARWIN$stub: ! .indirect_symbol _ffi_closure_helper_DARWIN ! mflr r0 ! bcl 20,31,LO$ffi_closure_helper_DARWIN ! LO$ffi_closure_helper_DARWIN: ! mflr r11 ! addis r11,r11,ha16(L_ffi_closure_helper_DARWIN$lazy_ptr - LO$ffi_closure_helper_DARWIN) ! mtlr r0 ! lwzu r12,lo16(L_ffi_closure_helper_DARWIN$lazy_ptr - LO$ffi_closure_helper_DARWIN)(r11) ! mtctr r12 ! bctr ! .data ! .lazy_symbol_pointer ! L_ffi_closure_helper_DARWIN$lazy_ptr: ! .indirect_symbol _ffi_closure_helper_DARWIN ! .long dyld_stub_binding_helper diff -Nrc3pad gcc-3.3.3/libffi/src/powerpc/darwin.S gcc-3.4.0/libffi/src/powerpc/darwin.S *** gcc-3.3.3/libffi/src/powerpc/darwin.S 2003-01-22 20:17:49.000000000 +0000 --- gcc-3.4.0/libffi/src/powerpc/darwin.S 2003-10-21 19:01:56.000000000 +0000 *************** *** 1,6 **** /* ----------------------------------------------------------------------- darwin.S - Copyright (c) 2000 John Hornkvist ! PowerPC Assembly glue. Permission is hereby granted, free of charge, to any person obtaining --- 1,6 ---- /* ----------------------------------------------------------------------- darwin.S - Copyright (c) 2000 John Hornkvist ! PowerPC Assembly glue. Permission is hereby granted, free of charge, to any person obtaining *************** *** 23,29 **** OTHER DEALINGS IN THE SOFTWARE. ----------------------------------------------------------------------- */ ! #define LIBFFI_ASM #include #define JUMPTARGET(name) name #define L(x) x --- 23,30 ---- OTHER DEALINGS IN THE SOFTWARE. ----------------------------------------------------------------------- */ ! #define LIBFFI_ASM ! #include #include #define JUMPTARGET(name) name #define L(x) x *************** *** 37,95 **** .text .align 2 _ffi_call_DARWIN: ! LFB0: mr r12,r8 /* We only need r12 until the call, ! so it doesn't have to be saved... */ ! LFB1: /* Save the old stack pointer as AP. */ mr r8,r1 ! LCFI0: /* Allocate the stack space we need. */ ! stwux r1,r1,r4 ! /* Save registers we use. */ mflr r9 ! stw r28,-16(r8) stw r29,-12(r8) stw r30, -8(r8) stw r31, -4(r8) ! stw r9, 8(r8) stw r2, 20(r1) ! LCFI1: /* Save arguments over call... */ mr r31,r5 /* flags, */ mr r30,r6 /* rvalue, */ mr r29,r7 /* function address, */ mr r28,r8 /* our AP. */ ! LCFI2: /* Call ffi_prep_args. */ mr r4,r1 li r9,0 ! mtctr r12 // r12 holds address of _ffi_prep_args ! bctrl lwz r2,20(r1) ! /* Now do the call. */ ! /* Set up cr1 with bits 4-7 of the flags. */ mtcrf 0x40,r31 /* Get the address to call into CTR. */ mtctr r29 ! /* Load all those argument registers. */ ! // We have set up a nice stack frame, just load it into registers. ! lwz r3, 20+(1*4)(r1) ! lwz r4, 20+(2*4)(r1) ! lwz r5, 20+(3*4)(r1) ! lwz r6, 20+(4*4)(r1) ! nop lwz r7, 20+(5*4)(r1) ! lwz r8, 20+(6*4)(r1) ! lwz r9, 20+(7*4)(r1) ! lwz r10,20+(8*4)(r1) ! L1: /* Load all the FP registers. */ bf 6,L2 // 2f + 0x18 --- 38,96 ---- .text .align 2 _ffi_call_DARWIN: ! LFB0: mr r12,r8 /* We only need r12 until the call, ! so it doesn't have to be saved... */ ! LFB1: /* Save the old stack pointer as AP. */ mr r8,r1 ! LCFI0: /* Allocate the stack space we need. */ ! stwux r1,r1,r4 ! /* Save registers we use. */ mflr r9 ! stw r28,-16(r8) stw r29,-12(r8) stw r30, -8(r8) stw r31, -4(r8) ! stw r9, 8(r8) stw r2, 20(r1) ! LCFI1: /* Save arguments over call... */ mr r31,r5 /* flags, */ mr r30,r6 /* rvalue, */ mr r29,r7 /* function address, */ mr r28,r8 /* our AP. */ ! LCFI2: /* Call ffi_prep_args. */ mr r4,r1 li r9,0 ! mtctr r12 // r12 holds address of _ffi_prep_args ! bctrl lwz r2,20(r1) ! /* Now do the call. ! Set up cr1 with bits 4-7 of the flags. */ mtcrf 0x40,r31 /* Get the address to call into CTR. */ mtctr r29 ! /* Load all those argument registers. ! We have set up a nice stack frame, just load it into registers. */ ! lwz r3, 20+(1*4)(r1) ! lwz r4, 20+(2*4)(r1) ! lwz r5, 20+(3*4)(r1) ! lwz r6, 20+(4*4)(r1) ! nop lwz r7, 20+(5*4)(r1) ! lwz r8, 20+(6*4)(r1) ! lwz r9, 20+(7*4)(r1) ! lwz r10,20+(8*4)(r1) ! L1: /* Load all the FP registers. */ bf 6,L2 // 2f + 0x18 *************** L1: *** 104,123 **** lfd f8,-16-(6*8)(r28) nop lfd f9,-16-(5*8)(r28) ! lfd f10,-16-(4*8)(r28) lfd f11,-16-(3*8)(r28) lfd f12,-16-(2*8)(r28) nop lfd f13,-16-(1*8)(r28) ! L2: ! mr r12,r29 // Put the target address in r12 as specified. mtctr r12 nop nop /* Make the call. */ bctrl ! /* Now, deal with the return value. */ mtcrf 0x01,r31 --- 105,124 ---- lfd f8,-16-(6*8)(r28) nop lfd f9,-16-(5*8)(r28) ! lfd f10,-16-(4*8)(r28) lfd f11,-16-(3*8)(r28) lfd f12,-16-(2*8)(r28) nop lfd f13,-16-(1*8)(r28) ! L2: ! mr r12,r29 /* Put the target address in r12 as specified. */ mtctr r12 nop nop /* Make the call. */ bctrl ! /* Now, deal with the return value. */ mtcrf 0x01,r31 *************** L(fp_return_value): *** 147,153 **** L(float_return_value): stfs f1,0(r30) b L(done_return_value) ! LFE1: /* END(_ffi_call_DARWIN) */ /* Provide a null definition of _ffi_call_AIX. */ --- 148,154 ---- L(float_return_value): stfs f1,0(r30) b L(done_return_value) ! LFE1: /* END(_ffi_call_DARWIN) */ /* Provide a null definition of _ffi_call_AIX. */ *************** LASFDE1: *** 193,218 **** .set L$set$4,LCFI0-LFB1 .long L$set$4 .byte 0xd ; DW_CFA_def_cfa_register ! .byte 0x08 ; uleb128 0x08 .byte 0x4 ; DW_CFA_advance_loc4 .set L$set$5,LCFI1-LCFI0 .long L$set$5 .byte 0x11 ; DW_CFA_offset_extended_sf .byte 0x41 ; uleb128 0x41 .byte 0x7e ; sleb128 -2 ! .byte 0x9f ; DW_CFA_offset, column 0x1f ! .byte 0x1 ; uleb128 0x1 .byte 0x9e ; DW_CFA_offset, column 0x1e .byte 0x2 ; uleb128 0x2 ! .byte 0x9d ; DW_CFA_offset, column 0x1d ! .byte 0x3 ; uleb128 0x3 ! .byte 0x9c ; DW_CFA_offset, column 0x1c .byte 0x4 ; uleb128 0x4 ! .byte 0x4 ; DW_CFA_advance_loc4 .set L$set$6,LCFI2-LCFI1 .long L$set$6 ! .byte 0xd ; DW_CFA_def_cfa_register ! .byte 0x1c ; uleb128 0x1c .align 2 LEFDE1: - --- 194,218 ---- .set L$set$4,LCFI0-LFB1 .long L$set$4 .byte 0xd ; DW_CFA_def_cfa_register ! .byte 0x08 ; uleb128 0x08 .byte 0x4 ; DW_CFA_advance_loc4 .set L$set$5,LCFI1-LCFI0 .long L$set$5 .byte 0x11 ; DW_CFA_offset_extended_sf .byte 0x41 ; uleb128 0x41 .byte 0x7e ; sleb128 -2 ! .byte 0x9f ; DW_CFA_offset, column 0x1f ! .byte 0x1 ; uleb128 0x1 .byte 0x9e ; DW_CFA_offset, column 0x1e .byte 0x2 ; uleb128 0x2 ! .byte 0x9d ; DW_CFA_offset, column 0x1d ! .byte 0x3 ; uleb128 0x3 ! .byte 0x9c ; DW_CFA_offset, column 0x1c .byte 0x4 ; uleb128 0x4 ! .byte 0x4 ; DW_CFA_advance_loc4 .set L$set$6,LCFI2-LCFI1 .long L$set$6 ! .byte 0xd ; DW_CFA_def_cfa_register ! .byte 0x1c ; uleb128 0x1c .align 2 LEFDE1: diff -Nrc3pad gcc-3.3.3/libffi/src/powerpc/ffi.c gcc-3.4.0/libffi/src/powerpc/ffi.c *** gcc-3.3.3/libffi/src/powerpc/ffi.c 2003-01-14 05:15:02.000000000 +0000 --- gcc-3.4.0/libffi/src/powerpc/ffi.c 2004-03-12 01:35:32.000000000 +0000 *************** *** 31,37 **** --- 31,45 ---- #include #include + #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 1) + # define hidden __attribute__ ((visibility ("hidden"))) + #else + # define hidden + #endif + + extern void ffi_closure_SYSV(void); + extern void hidden ffi_closure_LINUX64(void); enum { /* The assembly depends on these exact flags. */ *************** enum { *** 52,58 **** }; enum { ASM_NEEDS_REGISTERS = 4 }; ! /* ffi_prep_args is called by the assembly routine once stack space has been allocated for the function's arguments. The stack layout we want looks like this: --- 60,66 ---- }; enum { ASM_NEEDS_REGISTERS = 4 }; ! /* ffi_prep_args_SYSV is called by the assembly routine once stack space has been allocated for the function's arguments. The stack layout we want looks like this: *************** enum { ASM_NEEDS_REGISTERS = 4 }; *** 79,85 **** */ /*@-exportheader@*/ ! void ffi_prep_args(extended_cif *ecif, unsigned *const stack) /*@=exportheader@*/ { const unsigned bytes = ecif->cif->bytes; --- 87,93 ---- */ /*@-exportheader@*/ ! void ffi_prep_args_SYSV(extended_cif *ecif, unsigned *const stack) /*@=exportheader@*/ { const unsigned bytes = ecif->cif->bytes; *************** void ffi_prep_args(extended_cif *ecif, u *** 124,130 **** /* Deal with return values that are actually pass-by-reference. */ if (flags & FLAG_RETVAL_REFERENCE) { ! *gpr_base++ = (unsigned)(char *)ecif->rvalue; intarg_count++; } --- 132,138 ---- /* Deal with return values that are actually pass-by-reference. */ if (flags & FLAG_RETVAL_REFERENCE) { ! *gpr_base++ = (unsigned long)(char *)ecif->rvalue; intarg_count++; } *************** void ffi_prep_args(extended_cif *ecif, u *** 210,216 **** copy_space -= struct_copy_size; memcpy(copy_space, (char *)*p_argv, (*ptr)->size); ! gprvalue = (unsigned)copy_space; FFI_ASSERT(copy_space > (char *)next_arg); FFI_ASSERT(flags & FLAG_ARG_NEEDS_COPY); --- 218,224 ---- copy_space -= struct_copy_size; memcpy(copy_space, (char *)*p_argv, (*ptr)->size); ! gprvalue = (unsigned long)copy_space; FFI_ASSERT(copy_space > (char *)next_arg); FFI_ASSERT(flags & FLAG_ARG_NEEDS_COPY); *************** void ffi_prep_args(extended_cif *ecif, u *** 252,286 **** FFI_ASSERT(flags & FLAG_4_GPR_ARGUMENTS || intarg_count <= 4); } /* Perform machine dependent cif processing */ ffi_status ffi_prep_cif_machdep(ffi_cif *cif) { ! /* All this is for the SYSV ABI. */ int i; ffi_type **ptr; unsigned bytes; int fparg_count = 0, intarg_count = 0; unsigned flags = 0; unsigned struct_copy_size = 0; ! ! /* All the machine-independent calculation of cif->bytes will be wrong. ! Redo the calculation for SYSV. */ ! /* Space for the frame pointer, callee's LR, and the asm's temp regs. */ ! bytes = (2 + ASM_NEEDS_REGISTERS) * sizeof(int); ! /* Space for the GPR registers. */ ! bytes += NUM_GPR_ARG_REGISTERS * sizeof(int); ! /* Return value handling. The rules are as follows: - 32-bit (or less) integer values are returned in gpr3; - Structures of size <= 4 bytes also returned in gpr3; - 64-bit integer values and structures between 5 and 8 bytes are returned in gpr3 and gpr4; - Single/double FP values are returned in fpr1; - Larger structures and long double (if not equivalent to double) values ! are allocated space and a pointer is passed as the first argument. */ ! switch (cif->rtype->type) { case FFI_TYPE_DOUBLE: flags |= FLAG_RETURNS_64BITS; --- 260,511 ---- FFI_ASSERT(flags & FLAG_4_GPR_ARGUMENTS || intarg_count <= 4); } + /* About the LINUX64 ABI. */ + enum { + NUM_GPR_ARG_REGISTERS64 = 8, + NUM_FPR_ARG_REGISTERS64 = 13 + }; + enum { ASM_NEEDS_REGISTERS64 = 4 }; + + /* ffi_prep_args64 is called by the assembly routine once stack space + has been allocated for the function's arguments. + + The stack layout we want looks like this: + + | Ret addr from ffi_call_LINUX64 8bytes | higher addresses + |--------------------------------------------| + | CR save area 8bytes | + |--------------------------------------------| + | Previous backchain pointer 8 | stack pointer here + |--------------------------------------------|<+ <<< on entry to + | Saved r28-r31 4*8 | | ffi_call_LINUX64 + |--------------------------------------------| | + | GPR registers r3-r10 8*8 | | + |--------------------------------------------| | + | FPR registers f1-f13 (optional) 13*8 | | + |--------------------------------------------| | + | Parameter save area | | + |--------------------------------------------| | + | TOC save area 8 | | + |--------------------------------------------| | stack | + | Linker doubleword 8 | | grows | + |--------------------------------------------| | down V + | Compiler doubleword 8 | | + |--------------------------------------------| | lower addresses + | Space for callee's LR 8 | | + |--------------------------------------------| | + | CR save area 8 | | + |--------------------------------------------| | stack pointer here + | Current backchain pointer 8 |-/ during + |--------------------------------------------| <<< ffi_call_LINUX64 + + */ + + /*@-exportheader@*/ + void hidden ffi_prep_args64(extended_cif *ecif, unsigned long *const stack) + /*@=exportheader@*/ + { + const unsigned long bytes = ecif->cif->bytes; + const unsigned long flags = ecif->cif->flags; + + /* 'stacktop' points at the previous backchain pointer. */ + unsigned long *const stacktop = stack + (bytes / sizeof(unsigned long)); + + /* 'next_arg' points at the space for gpr3, and grows upwards as + we use GPR registers, then continues at rest. */ + unsigned long *const gpr_base = stacktop - ASM_NEEDS_REGISTERS64 + - NUM_GPR_ARG_REGISTERS64; + unsigned long *const gpr_end = gpr_base + NUM_GPR_ARG_REGISTERS64; + unsigned long *const rest = stack + 6 + NUM_GPR_ARG_REGISTERS64; + unsigned long *next_arg = gpr_base; + + /* 'fpr_base' points at the space for fpr3, and grows upwards as + we use FPR registers. */ + double *fpr_base = (double *)gpr_base - NUM_FPR_ARG_REGISTERS64; + int fparg_count = 0; + + int i, words; + ffi_type **ptr; + double double_tmp; + void **p_argv; + unsigned long gprvalue; + + /* Check that everything starts aligned properly. */ + FFI_ASSERT(((unsigned long)(char *)stack & 0xF) == 0); + FFI_ASSERT(((unsigned long)(char *)stacktop & 0xF) == 0); + FFI_ASSERT((bytes & 0xF) == 0); + + /* Deal with return values that are actually pass-by-reference. */ + if (flags & FLAG_RETVAL_REFERENCE) + *next_arg++ = (unsigned long)(char *)ecif->rvalue; + + /* Now for the arguments. */ + p_argv = ecif->avalue; + for (ptr = ecif->cif->arg_types, i = ecif->cif->nargs; + i > 0; + i--, ptr++, p_argv++) + { + switch ((*ptr)->type) + { + case FFI_TYPE_FLOAT: + double_tmp = *(float *)*p_argv; + *(float *)next_arg = (float)double_tmp; + if (++next_arg == gpr_end) + next_arg = rest; + if (fparg_count < NUM_FPR_ARG_REGISTERS64) + *fpr_base++ = double_tmp; + fparg_count++; + FFI_ASSERT(flags & FLAG_FP_ARGUMENTS); + break; + + case FFI_TYPE_DOUBLE: + double_tmp = *(double *)*p_argv; + *(double *)next_arg = double_tmp; + if (++next_arg == gpr_end) + next_arg = rest; + if (fparg_count < NUM_FPR_ARG_REGISTERS64) + *fpr_base++ = double_tmp; + fparg_count++; + FFI_ASSERT(flags & FLAG_FP_ARGUMENTS); + break; + + #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE + case FFI_TYPE_LONGDOUBLE: + double_tmp = ((double *) *p_argv)[0]; + *(double *) next_arg = double_tmp; + if (++next_arg == gpr_end) + next_arg = rest; + if (fparg_count < NUM_FPR_ARG_REGISTERS64) + *fpr_base++ = double_tmp; + fparg_count++; + double_tmp = ((double *) *p_argv)[1]; + *(double *) next_arg = double_tmp; + if (++next_arg == gpr_end) + next_arg = rest; + if (fparg_count < NUM_FPR_ARG_REGISTERS64) + *fpr_base++ = double_tmp; + fparg_count++; + FFI_ASSERT(flags & FLAG_FP_ARGUMENTS); + break; + #endif + + case FFI_TYPE_STRUCT: + words = ((*ptr)->size + 7) / 8; + if (next_arg >= gpr_base && next_arg + words > gpr_end) + { + size_t first = (char *) gpr_end - (char *) next_arg; + memcpy((char *) next_arg, (char *) *p_argv, first); + memcpy((char *) rest, (char *) *p_argv + first, + (*ptr)->size - first); + next_arg = (unsigned long *) ((char *) rest + words * 8 - first); + } + else + { + char *where = (char *) next_arg; + + /* Structures with size less than eight bytes are passed + left-padded. */ + if ((*ptr)->size < 8) + where += 8 - (*ptr)->size; + + memcpy (where, (char *) *p_argv, (*ptr)->size); + next_arg += words; + if (next_arg == gpr_end) + next_arg = rest; + } + break; + + case FFI_TYPE_UINT8: + gprvalue = *(unsigned char *)*p_argv; + goto putgpr; + case FFI_TYPE_SINT8: + gprvalue = *(signed char *)*p_argv; + goto putgpr; + case FFI_TYPE_UINT16: + gprvalue = *(unsigned short *)*p_argv; + goto putgpr; + case FFI_TYPE_SINT16: + gprvalue = *(signed short *)*p_argv; + goto putgpr; + case FFI_TYPE_UINT32: + gprvalue = *(unsigned int *)*p_argv; + goto putgpr; + case FFI_TYPE_INT: + case FFI_TYPE_SINT32: + gprvalue = *(signed int *)*p_argv; + goto putgpr; + + case FFI_TYPE_UINT64: + case FFI_TYPE_SINT64: + case FFI_TYPE_POINTER: + gprvalue = *(unsigned long *)*p_argv; + putgpr: + *next_arg++ = gprvalue; + if (next_arg == gpr_end) + next_arg = rest; + break; + } + } + + FFI_ASSERT(flags & FLAG_4_GPR_ARGUMENTS + || (next_arg >= gpr_base && next_arg <= gpr_base + 4)); + } + + + /* Perform machine dependent cif processing */ ffi_status ffi_prep_cif_machdep(ffi_cif *cif) { ! /* All this is for the SYSV and LINUX64 ABI. */ int i; ffi_type **ptr; unsigned bytes; int fparg_count = 0, intarg_count = 0; unsigned flags = 0; unsigned struct_copy_size = 0; ! unsigned type = cif->rtype->type; ! if (cif->abi != FFI_LINUX64) ! { ! /* All the machine-independent calculation of cif->bytes will be wrong. ! Redo the calculation for SYSV. */ ! /* Space for the frame pointer, callee's LR, and the asm's temp regs. */ ! bytes = (2 + ASM_NEEDS_REGISTERS) * sizeof(int); ! /* Space for the GPR registers. */ ! bytes += NUM_GPR_ARG_REGISTERS * sizeof(int); ! } ! else ! { ! /* 64-bit ABI. */ ! ! /* Space for backchain, CR, LR, cc/ld doubleword, TOC and the asm's temp ! regs. */ ! bytes = (6 + ASM_NEEDS_REGISTERS64) * sizeof(long); ! ! /* Space for the mandatory parm save area and general registers. */ ! bytes += 2 * NUM_GPR_ARG_REGISTERS64 * sizeof(long); ! ! #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE ! if (type == FFI_TYPE_LONGDOUBLE) ! type = FFI_TYPE_DOUBLE; ! #endif ! } ! ! /* Return value handling. The rules for SYSV are as follows: - 32-bit (or less) integer values are returned in gpr3; - Structures of size <= 4 bytes also returned in gpr3; - 64-bit integer values and structures between 5 and 8 bytes are returned in gpr3 and gpr4; - Single/double FP values are returned in fpr1; - Larger structures and long double (if not equivalent to double) values ! are allocated space and a pointer is passed as the first argument. ! For LINUX64: ! - integer values in gpr3; ! - Structures/Unions by reference; ! - Single/double FP values in fpr1, long double in fpr1,fpr2. */ ! switch (type) { case FFI_TYPE_DOUBLE: flags |= FLAG_RETURNS_64BITS; *************** ffi_status ffi_prep_cif_machdep(ffi_cif *** 295,301 **** break; case FFI_TYPE_STRUCT: ! if (cif->abi != FFI_GCC_SYSV) if (cif->rtype->size <= 4) break; else if (cif->rtype->size <= 8) --- 520,526 ---- break; case FFI_TYPE_STRUCT: ! if (cif->abi != FFI_GCC_SYSV && cif->abi != FFI_LINUX64) if (cif->rtype->size <= 4) break; else if (cif->rtype->size <= 8) *************** ffi_status ffi_prep_cif_machdep(ffi_cif *** 319,377 **** break; } ! /* The first NUM_GPR_ARG_REGISTERS words of integer arguments, and the ! first NUM_FPR_ARG_REGISTERS fp arguments, go in registers; the rest ! goes on the stack. Structures and long doubles (if not equivalent ! to double) are passed as a pointer to a copy of the structure. ! Stuff on the stack needs to keep proper alignment. */ ! for (ptr = cif->arg_types, i = cif->nargs; i > 0; i--, ptr++) ! { ! switch ((*ptr)->type) ! { ! case FFI_TYPE_FLOAT: ! fparg_count++; ! /* floating singles are not 8-aligned on stack */ ! break; ! case FFI_TYPE_DOUBLE: ! fparg_count++; ! /* If this FP arg is going on the stack, it must be ! 8-byte-aligned. */ ! if (fparg_count > NUM_FPR_ARG_REGISTERS ! && intarg_count%2 != 0) ! intarg_count++; ! break; ! case FFI_TYPE_UINT64: ! case FFI_TYPE_SINT64: ! /* 'long long' arguments are passed as two words, but ! either both words must fit in registers or both go ! on the stack. If they go on the stack, they must ! be 8-byte-aligned. */ ! if (intarg_count == NUM_GPR_ARG_REGISTERS-1 ! || intarg_count >= NUM_GPR_ARG_REGISTERS && intarg_count%2 != 0) ! intarg_count++; ! intarg_count += 2; ! break; ! case FFI_TYPE_STRUCT: #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE ! case FFI_TYPE_LONGDOUBLE: #endif ! /* We must allocate space for a copy of these to enforce ! pass-by-value. Pad the space up to a multiple of 16 ! bytes (the maximum alignment required for anything under ! the SYSV ABI). */ ! struct_copy_size += ((*ptr)->size + 15) & ~0xF; ! /* Fall through (allocate space for the pointer). */ ! default: ! /* Everything else is passed as a 4-byte word in a GPR, either ! the object itself or a pointer to it. */ ! intarg_count++; ! break; ! } ! } if (fparg_count != 0) flags |= FLAG_FP_ARGUMENTS; --- 544,632 ---- break; } ! if (cif->abi != FFI_LINUX64) ! /* The first NUM_GPR_ARG_REGISTERS words of integer arguments, and the ! first NUM_FPR_ARG_REGISTERS fp arguments, go in registers; the rest ! goes on the stack. Structures and long doubles (if not equivalent ! to double) are passed as a pointer to a copy of the structure. ! Stuff on the stack needs to keep proper alignment. */ ! for (ptr = cif->arg_types, i = cif->nargs; i > 0; i--, ptr++) ! { ! switch ((*ptr)->type) ! { ! case FFI_TYPE_FLOAT: ! fparg_count++; ! /* floating singles are not 8-aligned on stack */ ! break; ! case FFI_TYPE_DOUBLE: ! fparg_count++; ! /* If this FP arg is going on the stack, it must be ! 8-byte-aligned. */ ! if (fparg_count > NUM_FPR_ARG_REGISTERS ! && intarg_count%2 != 0) ! intarg_count++; ! break; ! case FFI_TYPE_UINT64: ! case FFI_TYPE_SINT64: ! /* 'long long' arguments are passed as two words, but ! either both words must fit in registers or both go ! on the stack. If they go on the stack, they must ! be 8-byte-aligned. */ ! if (intarg_count == NUM_GPR_ARG_REGISTERS-1 ! || (intarg_count >= NUM_GPR_ARG_REGISTERS ! && intarg_count%2 != 0)) ! intarg_count++; ! intarg_count += 2; ! break; ! case FFI_TYPE_STRUCT: #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE ! case FFI_TYPE_LONGDOUBLE: #endif ! /* We must allocate space for a copy of these to enforce ! pass-by-value. Pad the space up to a multiple of 16 ! bytes (the maximum alignment required for anything under ! the SYSV ABI). */ ! struct_copy_size += ((*ptr)->size + 15) & ~0xF; ! /* Fall through (allocate space for the pointer). */ ! default: ! /* Everything else is passed as a 4-byte word in a GPR, either ! the object itself or a pointer to it. */ ! intarg_count++; ! break; ! } ! } ! else ! for (ptr = cif->arg_types, i = cif->nargs; i > 0; i--, ptr++) ! { ! switch ((*ptr)->type) ! { ! #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE ! case FFI_TYPE_LONGDOUBLE: ! fparg_count += 2; ! intarg_count += 2; ! break; ! #endif ! case FFI_TYPE_FLOAT: ! case FFI_TYPE_DOUBLE: ! fparg_count++; ! intarg_count++; ! break; ! ! case FFI_TYPE_STRUCT: ! intarg_count += ((*ptr)->size + 7) / 8; ! break; ! ! default: ! /* Everything else is passed as a 8-byte word in a GPR, either ! the object itself or a pointer to it. */ ! intarg_count++; ! break; ! } ! } if (fparg_count != 0) flags |= FLAG_FP_ARGUMENTS; *************** ffi_status ffi_prep_cif_machdep(ffi_cif *** 379,394 **** flags |= FLAG_4_GPR_ARGUMENTS; if (struct_copy_size != 0) flags |= FLAG_ARG_NEEDS_COPY; - - /* Space for the FPR registers, if needed. */ - if (fparg_count != 0) - bytes += NUM_FPR_ARG_REGISTERS * sizeof(double); ! /* Stack space. */ ! if (intarg_count > NUM_GPR_ARG_REGISTERS) ! bytes += (intarg_count - NUM_GPR_ARG_REGISTERS) * sizeof(int); ! if (fparg_count > NUM_FPR_ARG_REGISTERS) ! bytes += (fparg_count - NUM_FPR_ARG_REGISTERS) * sizeof(double); /* The stack space allocated needs to be a multiple of 16 bytes. */ bytes = (bytes + 15) & ~0xF; --- 634,662 ---- flags |= FLAG_4_GPR_ARGUMENTS; if (struct_copy_size != 0) flags |= FLAG_ARG_NEEDS_COPY; ! if (cif->abi != FFI_LINUX64) ! { ! /* Space for the FPR registers, if needed. */ ! if (fparg_count != 0) ! bytes += NUM_FPR_ARG_REGISTERS * sizeof(double); ! ! /* Stack space. */ ! if (intarg_count > NUM_GPR_ARG_REGISTERS) ! bytes += (intarg_count - NUM_GPR_ARG_REGISTERS) * sizeof(int); ! if (fparg_count > NUM_FPR_ARG_REGISTERS) ! bytes += (fparg_count - NUM_FPR_ARG_REGISTERS) * sizeof(double); ! } ! else ! { ! /* Space for the FPR registers, if needed. */ ! if (fparg_count != 0) ! bytes += NUM_FPR_ARG_REGISTERS64 * sizeof(double); ! ! /* Stack space. */ ! if (intarg_count > NUM_GPR_ARG_REGISTERS64) ! bytes += (intarg_count - NUM_GPR_ARG_REGISTERS64) * sizeof(long); ! } /* The stack space allocated needs to be a multiple of 16 bytes. */ bytes = (bytes + 15) & ~0xF; *************** extern void ffi_call_SYSV(/*@out@*/ exte *** 408,413 **** --- 676,685 ---- unsigned, unsigned, /*@out@*/ unsigned *, void (*fn)()); + extern void hidden ffi_call_LINUX64(/*@out@*/ extended_cif *, + unsigned long, unsigned long, + /*@out@*/ unsigned long *, + void (*fn)()); /*@=declundef@*/ /*@=exportheader@*/ *************** void ffi_call(/*@dependent@*/ ffi_cif *c *** 437,442 **** --- 709,715 ---- switch (cif->abi) { + #ifndef POWERPC64 case FFI_SYSV: case FFI_GCC_SYSV: /*@-usedef@*/ *************** void ffi_call(/*@dependent@*/ ffi_cif *c *** 444,449 **** --- 717,730 ---- cif->flags, ecif.rvalue, fn); /*@=usedef@*/ break; + #else + case FFI_LINUX64: + /*@-usedef@*/ + ffi_call_LINUX64(&ecif, -(long) cif->bytes, + cif->flags, ecif.rvalue, fn); + /*@=usedef@*/ + break; + #endif default: FFI_ASSERT(0); break; *************** void ffi_call(/*@dependent@*/ ffi_cif *c *** 451,464 **** --- 732,769 ---- } + #ifndef POWERPC64 static void flush_icache(char *, int); + #define MIN_CACHE_LINE_SIZE 8 + + static void flush_icache(char * addr1, int size) + { + int i; + char * addr; + for (i = 0; i < size; i += MIN_CACHE_LINE_SIZE) { + addr = addr1 + i; + __asm__ volatile ("icbi 0,%0;" "dcbf 0,%0;" : : "r"(addr) : "memory"); + } + addr = addr1 + size - 1; + __asm__ volatile ("icbi 0,%0;" "dcbf 0,%0;" "sync;" "isync;" : : "r"(addr) : "memory"); + } + #endif + ffi_status ffi_prep_closure (ffi_closure* closure, ffi_cif* cif, void (*fun)(ffi_cif*, void*, void**, void*), void *user_data) { + #ifdef POWERPC64 + void **tramp = (void **) &closure->tramp[0]; + + FFI_ASSERT (cif->abi == FFI_LINUX64); + /* Copy function address and TOC from ffi_closure_LINUX64. */ + memcpy (tramp, (char *) ffi_closure_LINUX64, 16); + tramp[2] = (void *) closure; + #else unsigned int *tramp; FFI_ASSERT (cif->abi == FFI_GCC_SYSV); *************** ffi_prep_closure (ffi_closure* closure, *** 475,508 **** *(void **) &tramp[2] = (void *)ffi_closure_SYSV; /* function */ *(void **) &tramp[3] = (void *)closure; /* context */ closure->cif = cif; closure->fun = fun; closure->user_data = user_data; - /* Flush the icache. */ - flush_icache(&closure->tramp[0],FFI_TRAMPOLINE_SIZE); - return FFI_OK; } ! ! #define MIN_CACHE_LINE_SIZE 8 ! ! static void flush_icache(char * addr1, int size) { ! int i; ! char * addr; ! for (i = 0; i < size; i += MIN_CACHE_LINE_SIZE) { ! addr = addr1 + i; ! __asm__ volatile ("icbi 0,%0;" "dcbf 0,%0;" : : "r"(addr) : "memory"); ! } ! addr = addr1 + size - 1; ! __asm__ volatile ("icbi 0,%0;" "dcbf 0,%0;" "sync;" "isync;" : : "r"(addr) : "memory"); ! } ! int ffi_closure_helper_SYSV (ffi_closure*, void*, unsigned long*, ! unsigned long*, unsigned long*); /* Basically the trampoline invokes ffi_closure_SYSV, and on * entry, r11 holds the address of the closure. --- 780,804 ---- *(void **) &tramp[2] = (void *)ffi_closure_SYSV; /* function */ *(void **) &tramp[3] = (void *)closure; /* context */ + /* Flush the icache. */ + flush_icache(&closure->tramp[0],FFI_TRAMPOLINE_SIZE); + #endif + closure->cif = cif; closure->fun = fun; closure->user_data = user_data; return FFI_OK; } ! typedef union { ! float f; ! double d; ! } ffi_dblfl; int ffi_closure_helper_SYSV (ffi_closure*, void*, unsigned long*, ! ffi_dblfl*, unsigned long*); /* Basically the trampoline invokes ffi_closure_SYSV, and on * entry, r11 holds the address of the closure. *************** int ffi_closure_helper_SYSV (ffi_closure *** 514,520 **** int ffi_closure_helper_SYSV (ffi_closure* closure, void * rvalue, ! unsigned long * pgr, unsigned long * pfr, unsigned long * pst) { /* rvalue is the pointer to space for return value in closure assembly */ --- 810,816 ---- int ffi_closure_helper_SYSV (ffi_closure* closure, void * rvalue, ! unsigned long * pgr, ffi_dblfl * pfr, unsigned long * pst) { /* rvalue is the pointer to space for return value in closure assembly */ *************** ffi_closure_helper_SYSV (ffi_closure* cl *** 540,546 **** returns the data directly to the caller. */ if (cif->rtype->type == FFI_TYPE_STRUCT) { ! rvalue = *pgr; ng++; pgr++; } --- 836,842 ---- returns the data directly to the caller. */ if (cif->rtype->type == FFI_TYPE_STRUCT) { ! rvalue = (void *) *pgr; ng++; pgr++; } *************** ffi_closure_helper_SYSV (ffi_closure* cl *** 583,590 **** case FFI_TYPE_SINT32: case FFI_TYPE_UINT32: case FFI_TYPE_POINTER: ! case FFI_TYPE_STRUCT: ! /* there are 8 gpr registers used to pass values */ if (ng < 8) { avalue[i] = pgr; ng++; --- 879,885 ---- case FFI_TYPE_SINT32: case FFI_TYPE_UINT32: case FFI_TYPE_POINTER: ! /* there are 8 gpr registers used to pass values */ if (ng < 8) { avalue[i] = pgr; ng++; *************** ffi_closure_helper_SYSV (ffi_closure* cl *** 595,600 **** --- 890,908 ---- } break; + case FFI_TYPE_STRUCT: + /* Structs are passed by reference. The address will appear in a + gpr if it is one of the first 8 arguments. */ + if (ng < 8) { + avalue[i] = (void *) *pgr; + ng++; + pgr++; + } else { + avalue[i] = (void *) *pst; + pst++; + } + break; + case FFI_TYPE_SINT64: case FFI_TYPE_UINT64: /* passing long long ints are complex, they must *************** ffi_closure_helper_SYSV (ffi_closure* cl *** 631,641 **** /* there are 8 64bit floating point registers */ if (nf < 8) { ! temp = *(double*)pfr; ! *(float*)pfr = (float)temp; avalue[i] = pfr; nf++; ! pfr+=2; } else { /* FIXME? here we are really changing the values * stored in the original calling routines outgoing --- 939,949 ---- /* there are 8 64bit floating point registers */ if (nf < 8) { ! temp = pfr->d; ! pfr->f = (float)temp; avalue[i] = pfr; nf++; ! pfr++; } else { /* FIXME? here we are really changing the values * stored in the original calling routines outgoing *************** ffi_closure_helper_SYSV (ffi_closure* cl *** 655,661 **** if (nf < 8) { avalue[i] = pfr; nf++; ! pfr+=2; } else { if (((long)pst) & 4) pst++; avalue[i] = pst; --- 963,969 ---- if (nf < 8) { avalue[i] = pfr; nf++; ! pfr++; } else { if (((long)pst) & 4) pst++; avalue[i] = pst; *************** ffi_closure_helper_SYSV (ffi_closure* cl *** 674,685 **** (closure->fun) (cif, rvalue, avalue, closure->user_data); ! /* Tell ffi_closure_osf how to perform return type promotions. */ return cif->rtype->type; } --- 982,1131 ---- (closure->fun) (cif, rvalue, avalue, closure->user_data); ! /* Tell ffi_closure_SYSV how to perform return type promotions. */ return cif->rtype->type; } + int hidden ffi_closure_helper_LINUX64 (ffi_closure*, void*, unsigned long*, + ffi_dblfl*); + int hidden + ffi_closure_helper_LINUX64 (ffi_closure *closure, void *rvalue, + unsigned long *pst, ffi_dblfl *pfr) + { + /* rvalue is the pointer to space for return value in closure assembly */ + /* pst is the pointer to parameter save area + (r3-r10 are stored into its first 8 slots by ffi_closure_LINUX64) */ + /* pfr is the pointer to where f1-f13 are stored in ffi_closure_LINUX64 */ + void **avalue; + ffi_type **arg_types; + long i, avn; + ffi_cif *cif; + ffi_dblfl *end_pfr = pfr + NUM_FPR_ARG_REGISTERS64; + cif = closure->cif; + avalue = alloca (cif->nargs * sizeof (void *)); + /* Copy the caller's structure return value address so that the closure + returns the data directly to the caller. */ + if (cif->rtype->type == FFI_TYPE_STRUCT) + { + rvalue = (void *) *pst; + pst++; + } + + i = 0; + avn = cif->nargs; + arg_types = cif->arg_types; + + /* Grab the addresses of the arguments from the stack frame. */ + while (i < avn) + { + switch (arg_types[i]->type) + { + case FFI_TYPE_SINT8: + case FFI_TYPE_UINT8: + avalue[i] = (char *) pst + 7; + pst++; + break; + + case FFI_TYPE_SINT16: + case FFI_TYPE_UINT16: + avalue[i] = (char *) pst + 6; + pst++; + break; + + case FFI_TYPE_SINT32: + case FFI_TYPE_UINT32: + avalue[i] = (char *) pst + 4; + pst++; + break; + + case FFI_TYPE_SINT64: + case FFI_TYPE_UINT64: + case FFI_TYPE_POINTER: + avalue[i] = pst; + pst++; + break; + + case FFI_TYPE_STRUCT: + /* Structures with size less than eight bytes are passed + left-padded. */ + if (arg_types[i]->size < 8) + avalue[i] = (char *) pst + 8 - arg_types[i]->size; + else + avalue[i] = pst; + pst += (arg_types[i]->size + 7) / 8; + break; + + case FFI_TYPE_FLOAT: + /* unfortunately float values are stored as doubles + * in the ffi_closure_LINUX64 code (since we don't check + * the type in that routine). + */ + + /* there are 13 64bit floating point registers */ + + if (pfr < end_pfr) + { + double temp = pfr->d; + pfr->f = (float) temp; + avalue[i] = pfr; + pfr++; + } + else + avalue[i] = pst; + pst++; + break; + + case FFI_TYPE_DOUBLE: + /* On the outgoing stack all values are aligned to 8 */ + /* there are 13 64bit floating point registers */ + + if (pfr < end_pfr) + { + avalue[i] = pfr; + pfr++; + } + else + avalue[i] = pst; + pst++; + break; + + #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE + case FFI_TYPE_LONGDOUBLE: + if (pfr + 1 < end_pfr) + { + avalue[i] = pfr; + pfr += 2; + } + else + { + if (pfr < end_pfr) + { + /* Passed partly in f13 and partly on the stack. + Move it all to the stack. */ + *pst = *(unsigned long *) pfr; + pfr++; + } + avalue[i] = pst; + } + pst += 2; + break; + #endif + + default: + FFI_ASSERT(0); + } + + i++; + } + + + (closure->fun) (cif, rvalue, avalue, closure->user_data); + + /* Tell ffi_closure_LINUX64 how to perform return type promotions. */ + return cif->rtype->type; + } diff -Nrc3pad gcc-3.3.3/libffi/src/powerpc/ffi_darwin.c gcc-3.4.0/libffi/src/powerpc/ffi_darwin.c *** gcc-3.3.3/libffi/src/powerpc/ffi_darwin.c 2003-02-07 04:33:43.000000000 +0000 --- gcc-3.4.0/libffi/src/powerpc/ffi_darwin.c 2003-10-21 19:01:56.000000000 +0000 *************** *** 1,7 **** /* ----------------------------------------------------------------------- ffi.c - Copyright (c) 1998 Geoffrey Keating ! ! PowerPC Foreign Function Interface Darwin ABI support (c) 2001 John Hornkvist AIX ABI support (c) 2002 Free Software Foundation, Inc. --- 1,7 ---- /* ----------------------------------------------------------------------- ffi.c - Copyright (c) 1998 Geoffrey Keating ! ! PowerPC Foreign Function Interface Darwin ABI support (c) 2001 John Hornkvist AIX ABI support (c) 2002 Free Software Foundation, Inc. *************** *** 25,45 **** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----------------------------------------------------------------------- */ #include #include #include ! extern void ffi_closure_ASM(void); enum { /* The assembly depends on these exact flags. */ ! FLAG_RETURNS_NOTHING = 1 << (31-30), /* These go in cr7 */ FLAG_RETURNS_FP = 1 << (31-29), FLAG_RETURNS_64BITS = 1 << (31-28), FLAG_ARG_NEEDS_COPY = 1 << (31- 7), ! FLAG_FP_ARGUMENTS = 1 << (31- 6), /* cr1.eq; specified by ABI */ FLAG_4_GPR_ARGUMENTS = 1 << (31- 5), FLAG_RETVAL_REFERENCE = 1 << (31- 4) }; --- 25,46 ---- ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----------------------------------------------------------------------- */ + #include #include #include ! extern void ffi_closure_ASM(void); enum { /* The assembly depends on these exact flags. */ ! FLAG_RETURNS_NOTHING = 1 << (31-30), /* These go in cr7 */ FLAG_RETURNS_FP = 1 << (31-29), FLAG_RETURNS_64BITS = 1 << (31-28), FLAG_ARG_NEEDS_COPY = 1 << (31- 7), ! FLAG_FP_ARGUMENTS = 1 << (31- 6), /* cr1.eq; specified by ABI */ FLAG_4_GPR_ARGUMENTS = 1 << (31- 5), FLAG_RETVAL_REFERENCE = 1 << (31- 4) }; *************** enum { ASM_NEEDS_REGISTERS = 4 }; *** 58,64 **** | Return address from ffi_call_DARWIN | higher addresses |--------------------------------------------| ! | Previous backchain pointer 4 | stack pointer here |--------------------------------------------|<+ <<< on entry to | Saved r28-r31 4*4 | | ffi_call_DARWIN |--------------------------------------------| | --- 59,65 ---- | Return address from ffi_call_DARWIN | higher addresses |--------------------------------------------| ! | Previous backchain pointer 4 | stack pointer here |--------------------------------------------|<+ <<< on entry to | Saved r28-r31 4*4 | | ffi_call_DARWIN |--------------------------------------------| | *************** enum { ASM_NEEDS_REGISTERS = 4 }; *** 69,75 **** | Reserved 2*4 | | grows | |--------------------------------------------| | down V | Space for callee's LR 4 | | ! |--------------------------------------------| | lower addresses | Saved CR 4 | | |--------------------------------------------| | stack pointer here | Current backchain pointer 4 |-/ during --- 70,76 ---- | Reserved 2*4 | | grows | |--------------------------------------------| | down V | Space for callee's LR 4 | | ! |--------------------------------------------| | lower addresses | Saved CR 4 | | |--------------------------------------------| | stack pointer here | Current backchain pointer 4 |-/ during *************** void ffi_prep_args(extended_cif *ecif, u *** 82,88 **** /*@=exportheader@*/ { const unsigned bytes = ecif->cif->bytes; ! const unsigned flags = ecif->cif->flags; /* 'stacktop' points at the previous backchain pointer. */ unsigned *const stacktop = stack + (ecif->cif->bytes / sizeof(unsigned)); --- 83,89 ---- /*@=exportheader@*/ { const unsigned bytes = ecif->cif->bytes; ! const unsigned flags = ecif->cif->flags; /* 'stacktop' points at the previous backchain pointer. */ unsigned *const stacktop = stack + (ecif->cif->bytes / sizeof(unsigned)); *************** void ffi_prep_args(extended_cif *ecif, u *** 94,116 **** /* 'next_arg' grows up as we put parameters in it. */ ! unsigned *next_arg = stack + 6; // 6 reserved posistions. ! int i=ecif->cif->nargs; double double_tmp; - float float_tmp; void **p_argv = ecif->avalue; unsigned gprvalue; ffi_type** ptr = ecif->cif->arg_types; /* Check that everything starts aligned properly. */ FFI_ASSERT(((unsigned)(char *)stack & 0xF) == 0); FFI_ASSERT(((unsigned)(char *)stacktop & 0xF) == 0); FFI_ASSERT((bytes & 0xF) == 0); ! /* Deal with return values that are actually pass-by-reference. */ ! // Rule: ! // Return values are referenced by r3, so r4 is the first parameter. if (flags & FLAG_RETVAL_REFERENCE) *next_arg++ = (unsigned)(char *)ecif->rvalue; --- 95,119 ---- /* 'next_arg' grows up as we put parameters in it. */ ! unsigned *next_arg = stack + 6; /* 6 reserved posistions. */ ! int i = ecif->cif->nargs; double double_tmp; void **p_argv = ecif->avalue; unsigned gprvalue; ffi_type** ptr = ecif->cif->arg_types; + char *dest_cpy; + unsigned size_al = 0; /* Check that everything starts aligned properly. */ FFI_ASSERT(((unsigned)(char *)stack & 0xF) == 0); FFI_ASSERT(((unsigned)(char *)stacktop & 0xF) == 0); FFI_ASSERT((bytes & 0xF) == 0); ! /* Deal with return values that are actually pass-by-reference. ! Rule: ! Return values are referenced by r3, so r4 is the first parameter. */ ! if (flags & FLAG_RETVAL_REFERENCE) *next_arg++ = (unsigned)(char *)ecif->rvalue; *************** void ffi_prep_args(extended_cif *ecif, u *** 127,154 **** case FFI_TYPE_FLOAT: double_tmp = *(float *)*p_argv; if (fparg_count >= NUM_FPR_ARG_REGISTERS) ! *(double *)next_arg = double_tmp; else ! *fpr_base++ = double_tmp; ! next_arg++; fparg_count++; FFI_ASSERT(flags & FLAG_FP_ARGUMENTS); break; case FFI_TYPE_DOUBLE: double_tmp = *(double *)*p_argv; if (fparg_count >= NUM_FPR_ARG_REGISTERS) ! *(double *)next_arg = double_tmp; else ! *fpr_base++ = double_tmp; ! next_arg += 2; fparg_count++; FFI_ASSERT(flags & FLAG_FP_ARGUMENTS); break; case FFI_TYPE_UINT64: case FFI_TYPE_SINT64: ! *(long long *)next_arg = *(long long *)*p_argv; ! next_arg+=2; break; case FFI_TYPE_UINT8: gprvalue = *(unsigned char *)*p_argv; --- 130,157 ---- case FFI_TYPE_FLOAT: double_tmp = *(float *)*p_argv; if (fparg_count >= NUM_FPR_ARG_REGISTERS) ! *(double *)next_arg = double_tmp; else ! *fpr_base++ = double_tmp; ! next_arg++; fparg_count++; FFI_ASSERT(flags & FLAG_FP_ARGUMENTS); break; case FFI_TYPE_DOUBLE: double_tmp = *(double *)*p_argv; if (fparg_count >= NUM_FPR_ARG_REGISTERS) ! *(double *)next_arg = double_tmp; else ! *fpr_base++ = double_tmp; ! next_arg += 2; fparg_count++; FFI_ASSERT(flags & FLAG_FP_ARGUMENTS); break; case FFI_TYPE_UINT64: case FFI_TYPE_SINT64: ! *(long long *)next_arg = *(long long *)*p_argv; ! next_arg+=2; break; case FFI_TYPE_UINT8: gprvalue = *(unsigned char *)*p_argv; *************** void ffi_prep_args(extended_cif *ecif, u *** 163,180 **** gprvalue = *(signed short *)*p_argv; goto putgpr; ! case FFI_TYPE_STRUCT: #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE ! case FFI_TYPE_LONGDOUBLE: #endif ! ! memcpy((char*)next_arg, (char *)*p_argv, (*ptr)->size); ! next_arg+=(((((*ptr)->size) + 3) & ~0x3)/4); ! break; ! case FFI_TYPE_INT: ! case FFI_TYPE_UINT32: case FFI_TYPE_SINT32: case FFI_TYPE_POINTER: gprvalue = *(unsigned *)*p_argv; --- 166,196 ---- gprvalue = *(signed short *)*p_argv; goto putgpr; ! case FFI_TYPE_STRUCT: #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE ! case FFI_TYPE_LONGDOUBLE: #endif ! dest_cpy = (char *) next_arg; ! ! /* Structures that match the basic modes (QI 1 byte, HI 2 bytes, ! SI 4 bytes) are aligned as if they were those modes. ! Structures with 3 byte in size are padded upwards. */ ! size_al = (*ptr)->size; ! /* If the first member of the struct is a double, then align ! the struct to double-word. ! Type 3 is defined in include/ffi.h. #define FFI_TYPE_DOUBLE 3. */ ! if ((*ptr)->elements[0]->type == 3) ! size_al = ALIGN((*ptr)->size, 8); ! if (size_al < 3 && ecif->cif->abi == FFI_DARWIN) ! dest_cpy += 4 - size_al; ! ! memcpy((char *)dest_cpy, (char *)*p_argv, size_al); ! next_arg += (size_al + 3) / 4; ! break; ! case FFI_TYPE_INT: ! case FFI_TYPE_UINT32: case FFI_TYPE_SINT32: case FFI_TYPE_POINTER: gprvalue = *(unsigned *)*p_argv; *************** void ffi_prep_args(extended_cif *ecif, u *** 187,200 **** } /* Check that we didn't overrun the stack... */ - //FFI_ASSERT(copy_space >= (char *)next_arg); //FFI_ASSERT(gpr_base <= stacktop - ASM_NEEDS_REGISTERS); //FFI_ASSERT((unsigned *)fpr_base // <= stacktop - ASM_NEEDS_REGISTERS - NUM_GPR_ARG_REGISTERS); //FFI_ASSERT(flags & FLAG_4_GPR_ARGUMENTS || intarg_count <= 4); } ! /* Perform machine dependent cif processing */ ffi_status ffi_prep_cif_machdep(ffi_cif *cif) { /* All this is for the DARWIN ABI. */ --- 203,215 ---- } /* Check that we didn't overrun the stack... */ //FFI_ASSERT(gpr_base <= stacktop - ASM_NEEDS_REGISTERS); //FFI_ASSERT((unsigned *)fpr_base // <= stacktop - ASM_NEEDS_REGISTERS - NUM_GPR_ARG_REGISTERS); //FFI_ASSERT(flags & FLAG_4_GPR_ARGUMENTS || intarg_count <= 4); } ! /* Perform machine dependent cif processing. */ ffi_status ffi_prep_cif_machdep(ffi_cif *cif) { /* All this is for the DARWIN ABI. */ *************** ffi_status ffi_prep_cif_machdep(ffi_cif *** 203,214 **** unsigned bytes; int fparg_count = 0, intarg_count = 0; unsigned flags = 0; ! unsigned struct_copy_size = 0; /* All the machine-independent calculation of cif->bytes will be wrong. Redo the calculation for DARWIN. */ ! /* Space for the frame pointer, callee's LR, CR, etc, and for the asm's temp regs. */ bytes = (6 + ASM_NEEDS_REGISTERS) * sizeof(long); --- 218,229 ---- unsigned bytes; int fparg_count = 0, intarg_count = 0; unsigned flags = 0; ! unsigned size_al = 0; /* All the machine-independent calculation of cif->bytes will be wrong. Redo the calculation for DARWIN. */ ! /* Space for the frame pointer, callee's LR, CR, etc, and for the asm's temp regs. */ bytes = (6 + ASM_NEEDS_REGISTERS) * sizeof(long); *************** ffi_status ffi_prep_cif_machdep(ffi_cif *** 281,287 **** on the stack. If they go on the stack, they must be 8-byte-aligned. */ if (intarg_count == NUM_GPR_ARG_REGISTERS-1 ! || intarg_count >= NUM_GPR_ARG_REGISTERS && intarg_count%2 != 0) intarg_count++; intarg_count += 2; break; --- 296,302 ---- on the stack. If they go on the stack, they must be 8-byte-aligned. */ if (intarg_count == NUM_GPR_ARG_REGISTERS-1 ! || (intarg_count >= NUM_GPR_ARG_REGISTERS && intarg_count%2 != 0)) intarg_count++; intarg_count += 2; break; *************** ffi_status ffi_prep_cif_machdep(ffi_cif *** 290,296 **** #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE case FFI_TYPE_LONGDOUBLE: #endif ! intarg_count+=(((*ptr)->size + 3) & ~0x3)/4; break; default: --- 305,317 ---- #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE case FFI_TYPE_LONGDOUBLE: #endif ! size_al = (*ptr)->size; ! /* If the first member of the struct is a double, then align ! the struct to double-word. ! Type 3 is defined in include/ffi.h. #define FFI_TYPE_DOUBLE 3. */ ! if ((*ptr)->elements[0]->type == 3) ! size_al = ALIGN((*ptr)->size, 8); ! intarg_count += (size_al + 3) / 4; break; default: *************** ffi_status ffi_prep_cif_machdep(ffi_cif *** 303,311 **** if (fparg_count != 0) flags |= FLAG_FP_ARGUMENTS; ! if (struct_copy_size != 0) ! flags |= FLAG_ARG_NEEDS_COPY; ! /* Space for the FPR registers, if needed. */ if (fparg_count != 0) bytes += NUM_FPR_ARG_REGISTERS * sizeof(double); --- 324,330 ---- if (fparg_count != 0) flags |= FLAG_FP_ARGUMENTS; ! /* Space for the FPR registers, if needed. */ if (fparg_count != 0) bytes += NUM_FPR_ARG_REGISTERS * sizeof(double); *************** ffi_status ffi_prep_cif_machdep(ffi_cif *** 321,359 **** cif->flags = flags; cif->bytes = bytes; ! return FFI_OK; } /*@-declundef@*/ /*@-exportheader@*/ ! extern void ffi_call_AIX(/*@out@*/ extended_cif *, ! unsigned, unsigned, ! /*@out@*/ unsigned *, void (*fn)(), void (*fn2)()); ! extern void ffi_call_DARWIN(/*@out@*/ extended_cif *, ! unsigned, unsigned, ! /*@out@*/ unsigned *, void (*fn)(), void (*fn2)()); /*@=declundef@*/ /*@=exportheader@*/ ! void ffi_call(/*@dependent@*/ ffi_cif *cif, ! void (*fn)(), ! /*@out@*/ void *rvalue, /*@dependent@*/ void **avalue) { extended_cif ecif; ecif.cif = cif; ecif.avalue = avalue; - - /* If the return value is a struct and we don't have a return */ - /* value address then we need to make one */ ! if ((rvalue == NULL) && (cif->rtype->type == FFI_TYPE_STRUCT)) { /*@-sysunrecog@*/ --- 340,378 ---- cif->flags = flags; cif->bytes = bytes; ! return FFI_OK; } /*@-declundef@*/ /*@-exportheader@*/ ! extern void ffi_call_AIX(/*@out@*/ extended_cif *, ! unsigned, unsigned, ! /*@out@*/ unsigned *, void (*fn)(), void (*fn2)()); ! extern void ffi_call_DARWIN(/*@out@*/ extended_cif *, ! unsigned, unsigned, ! /*@out@*/ unsigned *, void (*fn)(), void (*fn2)()); /*@=declundef@*/ /*@=exportheader@*/ ! void ffi_call(/*@dependent@*/ ffi_cif *cif, ! void (*fn)(), ! /*@out@*/ void *rvalue, /*@dependent@*/ void **avalue) { extended_cif ecif; ecif.cif = cif; ecif.avalue = avalue; ! /* If the return value is a struct and we don't have a return ! value address then we need to make one. */ ! ! if ((rvalue == NULL) && (cif->rtype->type == FFI_TYPE_STRUCT)) { /*@-sysunrecog@*/ *************** void ffi_call(/*@dependent@*/ ffi_cif *c *** 362,379 **** } else ecif.rvalue = rvalue; ! ! switch (cif->abi) { case FFI_AIX: /*@-usedef@*/ ! ffi_call_AIX(&ecif, -cif->bytes, cif->flags, ecif.rvalue, fn, ffi_prep_args); /*@=usedef@*/ break; case FFI_DARWIN: /*@-usedef@*/ ! ffi_call_DARWIN(&ecif, -cif->bytes, cif->flags, ecif.rvalue, fn, ffi_prep_args); /*@=usedef@*/ break; --- 381,398 ---- } else ecif.rvalue = rvalue; ! ! switch (cif->abi) { case FFI_AIX: /*@-usedef@*/ ! ffi_call_AIX(&ecif, -cif->bytes, cif->flags, ecif.rvalue, fn, ffi_prep_args); /*@=usedef@*/ break; case FFI_DARWIN: /*@-usedef@*/ ! ffi_call_DARWIN(&ecif, -cif->bytes, cif->flags, ecif.rvalue, fn, ffi_prep_args); /*@=usedef@*/ break; *************** void ffi_call(/*@dependent@*/ ffi_cif *c *** 385,393 **** static void flush_icache(char *); static void flush_range(char *, int); ! ! /* The layout of a function descriptor. A C function pointer really */ ! /* points to one of these. */ typedef struct aix_fd_struct { void *code_pointer; --- 404,412 ---- static void flush_icache(char *); static void flush_range(char *, int); ! ! /* The layout of a function descriptor. A C function pointer really ! points to one of these. */ typedef struct aix_fd_struct { void *code_pointer; *************** typedef struct aix_fd_struct { *** 395,487 **** } aix_fd; /* here I'd like to add the stack frame layout we use in darwin_closure.S ! * and aix_clsoure.S ! * ! /* SP previous -> +---------------------------------------+ <--- child frame ! | back chain to caller 4 | ! +---------------------------------------+ 4 ! | saved CR 4 | ! +---------------------------------------+ 8 ! | saved LR 4 | ! +---------------------------------------+ 12 ! | reserved for compilers 4 | ! +---------------------------------------+ 16 ! | reserved for binders 4 | ! +---------------------------------------+ 20 ! | saved TOC pointer 4 | ! +---------------------------------------+ 24 ! | always reserved 8*4=32 (previous GPRs)| ! | according to the linkage convention | ! | from AIX | ! +---------------------------------------+ 56 ! | our FPR area 13*8=104 | ! | f1 | ! | . | ! | f13 | ! +---------------------------------------+ 160 ! | result area 8 | ! +---------------------------------------+ 168 ! | alignement to the next multiple of 16 | SP current --> +---------------------------------------+ 176 <- parent frame ! | back chain to caller 4 | ! +---------------------------------------+ 180 ! | saved CR 4 | ! +---------------------------------------+ 184 ! | saved LR 4 | ! +---------------------------------------+ 188 ! | reserved for compilers 4 | ! +---------------------------------------+ 192 ! | reserved for binders 4 | ! +---------------------------------------+ 196 ! | saved TOC pointer 4 | ! +---------------------------------------+ 200 ! | always reserved 8*4=32 we store our | ! | GPRs here | ! | r3 | ! | . | ! | r10 | ! +---------------------------------------+ 232 ! | PST area, overflow part | ! +---------------------------------------+ xxx ! | ???? | ! +---------------------------------------+ xxx */ ffi_status ! ffi_prep_closure (ffi_closure* closure, ! ffi_cif* cif, ! void (*fun)(ffi_cif*, void*, void**, void*), ! void *user_data) { unsigned int *tramp; struct ffi_aix_trampoline_struct *tramp_aix; aix_fd *fd; ! switch (cif->abi) ! { case FFI_DARWIN: FFI_ASSERT (cif->abi == FFI_DARWIN); tramp = (unsigned int *) &closure->tramp[0]; ! tramp[0] = 0x7c0802a6; /* mflr r0 */ ! tramp[1] = 0x4800000d; /* bl 10 */ ! tramp[4] = 0x7d6802a6; /* mflr r11 */ ! tramp[5] = 0x818b0000; /* lwz r12,0(r11) /* function address */ ! tramp[6] = 0x7c0803a6; /* mtlr r0 */ ! tramp[7] = 0x7d8903a6; /* mtctr r12 */ ! tramp[8] = 0x816b0004; /* lwz r11,4(r11) /* static chain */ ! tramp[9] = 0x4e800420; /* bctr */ ! *(void **) &tramp[2] = (void *)ffi_closure_ASM; /* function */ ! *(void **) &tramp[3] = (void *)closure; /* context */ closure->cif = cif; closure->fun = fun; closure->user_data = user_data; ! /* Flush the icache. Only necessary on Darwin */ flush_range(&closure->tramp[0],FFI_TRAMPOLINE_SIZE); ! break; case FFI_AIX: --- 414,506 ---- } aix_fd; /* here I'd like to add the stack frame layout we use in darwin_closure.S ! and aix_clsoure.S ! ! SP previous -> +---------------------------------------+ <--- child frame ! | back chain to caller 4 | ! +---------------------------------------+ 4 ! | saved CR 4 | ! +---------------------------------------+ 8 ! | saved LR 4 | ! +---------------------------------------+ 12 ! | reserved for compilers 4 | ! +---------------------------------------+ 16 ! | reserved for binders 4 | ! +---------------------------------------+ 20 ! | saved TOC pointer 4 | ! +---------------------------------------+ 24 ! | always reserved 8*4=32 (previous GPRs)| ! | according to the linkage convention | ! | from AIX | ! +---------------------------------------+ 56 ! | our FPR area 13*8=104 | ! | f1 | ! | . | ! | f13 | ! +---------------------------------------+ 160 ! | result area 8 | ! +---------------------------------------+ 168 ! | alignement to the next multiple of 16 | SP current --> +---------------------------------------+ 176 <- parent frame ! | back chain to caller 4 | ! +---------------------------------------+ 180 ! | saved CR 4 | ! +---------------------------------------+ 184 ! | saved LR 4 | ! +---------------------------------------+ 188 ! | reserved for compilers 4 | ! +---------------------------------------+ 192 ! | reserved for binders 4 | ! +---------------------------------------+ 196 ! | saved TOC pointer 4 | ! +---------------------------------------+ 200 ! | always reserved 8*4=32 we store our | ! | GPRs here | ! | r3 | ! | . | ! | r10 | ! +---------------------------------------+ 232 ! | overflow part | ! +---------------------------------------+ xxx ! | ???? | ! +---------------------------------------+ xxx */ ffi_status ! ffi_prep_closure (ffi_closure* closure, ! ffi_cif* cif, ! void (*fun)(ffi_cif*, void*, void**, void*), ! void *user_data) { unsigned int *tramp; struct ffi_aix_trampoline_struct *tramp_aix; aix_fd *fd; ! switch (cif->abi) ! { case FFI_DARWIN: FFI_ASSERT (cif->abi == FFI_DARWIN); tramp = (unsigned int *) &closure->tramp[0]; ! tramp[0] = 0x7c0802a6; /* mflr r0 */ ! tramp[1] = 0x429f000d; /* bcl- 20,4*cr7+so,0x10 */ ! tramp[4] = 0x7d6802a6; /* mflr r11 */ ! tramp[5] = 0x818b0000; /* lwz r12,0(r11) function address */ ! tramp[6] = 0x7c0803a6; /* mtlr r0 */ ! tramp[7] = 0x7d8903a6; /* mtctr r12 */ ! tramp[8] = 0x816b0004; /* lwz r11,4(r11) static chain */ ! tramp[9] = 0x4e800420; /* bctr */ ! tramp[2] = (unsigned long) ffi_closure_ASM; /* function */ ! tramp[3] = (unsigned long) closure; /* context */ closure->cif = cif; closure->fun = fun; closure->user_data = user_data; ! /* Flush the icache. Only necessary on Darwin. */ flush_range(&closure->tramp[0],FFI_TRAMPOLINE_SIZE); ! break; case FFI_AIX: *************** flush_icache(char *addr) *** 511,522 **** { #ifndef _AIX __asm__ volatile ( ! "dcbf 0,%0;" ! "sync;" ! "icbi 0,%0;" ! "sync;" ! "isync;" ! : : "r"(addr) : "memory"); #endif } --- 530,541 ---- { #ifndef _AIX __asm__ volatile ( ! "dcbf 0,%0;" ! "sync;" ! "icbi 0,%0;" ! "sync;" ! "isync;" ! : : "r"(addr) : "memory"); #endif } *************** flush_range(char * addr1, int size) *** 530,563 **** flush_icache(addr1+size-1); } ! int ffi_closure_helper_DARWIN (ffi_closure*, void*, unsigned long*, ! unsigned long*, unsigned long*); /* Basically the trampoline invokes ffi_closure_ASM, and on ! * entry, r11 holds the address of the closure. ! * After storing the registers that could possibly contain ! * parameters to be passed into the stack frame and setting ! * up space for a return value, ffi_closure_ASM invokes the ! * following helper function to do most of the work ! */ ! int ! ffi_closure_helper_DARWIN (ffi_closure* closure, void * rvalue, ! unsigned long * pgr, unsigned long * pfr, ! unsigned long * pst) { ! /* rvalue is the pointer to space for return value in closure assembly */ ! /* pgr is the pointer to where r3-r10 are stored in ffi_closure_ASM */ ! /* pfr is the pointer to where f1-f13 are stored in ffi_closure_ASM */ ! /* pst is the pointer to outgoing parameter stack in original caller */ void ** avalue; ffi_type ** arg_types; long i, avn; ! long nf; /* number of floating registers already used */ ! long ng; /* number of general registers already used */ ffi_cif * cif; double temp; cif = closure->cif; avalue = alloca(cif->nargs * sizeof(void *)); --- 549,586 ---- flush_icache(addr1+size-1); } ! typedef union ! { ! float f; ! double d; ! } ffi_dblfl; ! ! int ffi_closure_helper_DARWIN (ffi_closure*, void*, ! unsigned long*, ffi_dblfl*); /* Basically the trampoline invokes ffi_closure_ASM, and on ! entry, r11 holds the address of the closure. ! After storing the registers that could possibly contain ! parameters to be passed into the stack frame and setting ! up space for a return value, ffi_closure_ASM invokes the ! following helper function to do most of the work. */ ! int ffi_closure_helper_DARWIN (ffi_closure* closure, void * rvalue, ! unsigned long * pgr, ffi_dblfl * pfr) { ! /* rvalue is the pointer to space for return value in closure assembly ! pgr is the pointer to where r3-r10 are stored in ffi_closure_ASM ! pfr is the pointer to where f1-f13 are stored in ffi_closure_ASM. */ ! void ** avalue; ffi_type ** arg_types; long i, avn; ! long nf; /* number of floating registers already used. */ ! long ng; /* number of general registers already used. */ ffi_cif * cif; double temp; + unsigned size_al; cif = closure->cif; avalue = alloca(cif->nargs * sizeof(void *)); *************** ffi_closure_helper_DARWIN (ffi_closure* *** 569,577 **** returns the data directly to the caller. */ if (cif->rtype->type == FFI_TYPE_STRUCT) { ! rvalue = (void *)pgr; ! ng++; pgr++; } i = 0; --- 592,600 ---- returns the data directly to the caller. */ if (cif->rtype->type == FFI_TYPE_STRUCT) { ! rvalue = (void *) *pgr; pgr++; + ng++; } i = 0; *************** ffi_closure_helper_DARWIN (ffi_closure* *** 582,706 **** while (i < avn) { switch (arg_types[i]->type) ! { ! case FFI_TYPE_SINT8: ! case FFI_TYPE_UINT8: ! /* there are 8 gpr registers used to pass values */ ! if (ng < 8) { ! avalue[i] = (((char *)pgr)+3); ! ng++; ! pgr++; ! } else { ! avalue[i] = (((char *)pst)+3); ! pst++; ! } ! break; ! ! case FFI_TYPE_SINT16: ! case FFI_TYPE_UINT16: ! /* there are 8 gpr registers used to pass values */ ! if (ng < 8) { ! avalue[i] = (((char *)pgr)+2); ! ng++; ! pgr++; ! } else { ! avalue[i] = (((char *)pst)+2); ! pst++; ! } ! break; ! ! case FFI_TYPE_SINT32: ! case FFI_TYPE_UINT32: ! case FFI_TYPE_POINTER: ! case FFI_TYPE_STRUCT: ! /* there are 8 gpr registers used to pass values */ ! if (ng < 8) { ! avalue[i] = pgr; ! ng++; ! pgr++; ! } else { ! avalue[i] = pst; ! pst++; ! } ! break; ! case FFI_TYPE_SINT64: ! case FFI_TYPE_UINT64: ! /* long long ints are passed in two gpr's if available or in ! * the pst, one place is a bit odd, when a long long passes ! * the boundary between gpr and pst area we have to increment ! * the pst by one. ! */ ! if (ng < 7) { ! avalue[i] = pgr; ! ng+=2; ! pgr+=2; ! } else if (ng == 7) { ! avalue[i] = pgr; ! ng++; ! pgr++; ! pst++; ! } else { ! avalue[i] = pst; ! pst+=2; ! } ! break; ! case FFI_TYPE_FLOAT: ! /* a float value consumes a GPR ! * ! * there are 13 64bit floating point registers ! */ ! ! if ((ng > 7) && (nf < 13)) { ! pst++; ! } ! if (nf < 13) { ! temp = *(double*)pfr; ! *(float*)pfr = (float)temp; ! avalue[i] = pfr; ! nf++; ! pfr+=2; ! ng++; ! pgr++; ! ! } else { ! avalue[i] = pst; ! nf++; ! pst++; ! } ! break; ! case FFI_TYPE_DOUBLE: ! /* a double value consumes two GPRs ! * ! * there are 13 64bit floating point registers ! */ ! if ((ng == 7) && (nf < 13)) { ! pst++; /* if only one gpr is left the double steals it */ ! } else if ((ng > 7) && (nf < 13)) { ! pst+=2; /* a double consumes two GPRs in Darwin/AIX */ ! } ! if (nf < 13) { ! avalue[i] = pfr; ! nf++; ! pfr+=2; ! ng+=2; ! pgr+=2; ! } else { ! avalue[i] = pst; ! nf++; ! pst+=2; ! } ! break; ! default: ! FFI_ASSERT(0); ! ! } i++; } --- 605,697 ---- while (i < avn) { switch (arg_types[i]->type) ! { ! case FFI_TYPE_SINT8: ! case FFI_TYPE_UINT8: ! avalue[i] = (char *) pgr + 3; ! ng++; ! pgr++; ! break; ! case FFI_TYPE_SINT16: ! case FFI_TYPE_UINT16: ! avalue[i] = (char *) pgr + 2; ! ng++; ! pgr++; ! break; ! case FFI_TYPE_SINT32: ! case FFI_TYPE_UINT32: ! case FFI_TYPE_POINTER: ! avalue[i] = pgr; ! ng++; ! pgr++; ! break; ! case FFI_TYPE_STRUCT: ! /* Structures that match the basic modes (QI 1 byte, HI 2 bytes, ! SI 4 bytes) are aligned as if they were those modes. */ ! size_al = arg_types[i]->size; ! /* If the first member of the struct is a double, then align ! the struct to double-word. ! Type 3 is defined in include/ffi.h. #define FFI_TYPE_DOUBLE 3. */ ! if (arg_types[i]->elements[0]->type == 3) ! size_al = ALIGN(arg_types[i]->size, 8); ! if (size_al < 3 && cif->abi == FFI_DARWIN) ! avalue[i] = (void*) pgr + 4 - size_al; ! else ! avalue[i] = (void*) pgr; ! ng += (size_al + 3) / 4; ! pgr += (size_al + 3) / 4; ! break; ! case FFI_TYPE_SINT64: ! case FFI_TYPE_UINT64: ! /* Long long ints are passed in two gpr's. */ ! avalue[i] = pgr; ! ng += 2; ! pgr += 2; ! break; ! case FFI_TYPE_FLOAT: ! /* A float value consumes a GPR. ! There are 13 64bit floating point registers. */ ! if (nf < NUM_FPR_ARG_REGISTERS) ! { ! temp = pfr->d; ! pfr->f = (float)temp; ! avalue[i] = pfr; ! pfr++; ! } ! else ! { ! avalue[i] = pgr; ! } ! nf++; ! ng++; ! pgr++; ! break; ! case FFI_TYPE_DOUBLE: ! /* A double value consumes two GPRs. ! There are 13 64bit floating point registers. */ ! if (nf < NUM_FPR_ARG_REGISTERS) ! { ! avalue[i] = pfr; ! pfr++; ! } ! else ! { ! avalue[i] = pgr; ! } ! nf++; ! ng += 2; ! pgr += 2; ! break; + default: + FFI_ASSERT(0); + } i++; } *************** ffi_closure_helper_DARWIN (ffi_closure* *** 708,712 **** /* Tell ffi_closure_ASM to perform return type promotions. */ return cif->rtype->type; - } --- 699,702 ---- diff -Nrc3pad gcc-3.3.3/libffi/src/powerpc/ffitarget.h gcc-3.4.0/libffi/src/powerpc/ffitarget.h *** gcc-3.3.3/libffi/src/powerpc/ffitarget.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/src/powerpc/ffitarget.h 2003-10-21 19:07:51.000000000 +0000 *************** *** 0 **** --- 1,91 ---- + /* -----------------------------------------------------------------*-C-*- + ffitarget.h - Copyright (c) 1996-2003 Red Hat, Inc. + Target configuration macros for PowerPC. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + ``Software''), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + ----------------------------------------------------------------------- */ + + #ifndef LIBFFI_TARGET_H + #define LIBFFI_TARGET_H + + /* ---- System specific configurations ----------------------------------- */ + + #if defined (POWERPC) && defined (__powerpc64__) + #define POWERPC64 + #endif + + #ifndef LIBFFI_ASM + typedef unsigned long ffi_arg; + typedef signed long ffi_sarg; + + typedef enum ffi_abi { + FFI_FIRST_ABI = 0, + + #ifdef POWERPC + FFI_SYSV, + FFI_GCC_SYSV, + FFI_LINUX64, + # ifdef POWERPC64 + FFI_DEFAULT_ABI = FFI_LINUX64, + # else + FFI_DEFAULT_ABI = FFI_GCC_SYSV, + # endif + #endif + + #ifdef POWERPC_AIX + FFI_AIX, + FFI_DARWIN, + FFI_DEFAULT_ABI = FFI_AIX, + #endif + + #ifdef POWERPC_DARWIN + FFI_AIX, + FFI_DARWIN, + FFI_DEFAULT_ABI = FFI_DARWIN, + #endif + + FFI_LAST_ABI = FFI_DEFAULT_ABI + 1 + } ffi_abi; + #endif + + /* ---- Definitions for closures ----------------------------------------- */ + + #define FFI_CLOSURES 1 + #define FFI_NATIVE_RAW_API 0 + + #if defined(POWERPC64) || defined(POWERPC_AIX) + #define FFI_TRAMPOLINE_SIZE 24 + #else /* POWERPC || POWERPC_AIX */ + #define FFI_TRAMPOLINE_SIZE 40 + #endif + + #ifndef LIBFFI_ASM + #if defined(POWERPC_DARWIN) || defined(POWERPC_AIX) + struct ffi_aix_trampoline_struct { + void * code_pointer; /* Pointer to ffi_closure_ASM */ + void * toc; /* TOC */ + void * static_chain; /* Pointer to closure */ + }; + #endif + #endif + + #endif + diff -Nrc3pad gcc-3.3.3/libffi/src/powerpc/linux64_closure.S gcc-3.4.0/libffi/src/powerpc/linux64_closure.S *** gcc-3.3.3/libffi/src/powerpc/linux64_closure.S 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/src/powerpc/linux64_closure.S 2004-03-12 01:35:32.000000000 +0000 *************** *** 0 **** --- 1,205 ---- + #define LIBFFI_ASM + #include + #include + + .file "linux64_closure.S" + + #ifdef __powerpc64__ + .hidden ffi_closure_LINUX64, .ffi_closure_LINUX64 + .globl ffi_closure_LINUX64, .ffi_closure_LINUX64 + .section ".opd","aw" + .align 3 + ffi_closure_LINUX64: + .quad .ffi_closure_LINUX64,.TOC.@tocbase,0 + .size ffi_closure_LINUX64,24 + .type .ffi_closure_LINUX64,@function + .text + .ffi_closure_LINUX64: + .LFB1: + # save general regs into parm save area + std %r3, 48(%r1) + std %r4, 56(%r1) + std %r5, 64(%r1) + std %r6, 72(%r1) + mflr %r0 + + std %r7, 80(%r1) + std %r8, 88(%r1) + std %r9, 96(%r1) + std %r10, 104(%r1) + std %r0, 16(%r1) + + # mandatory 48 bytes special reg save area + 64 bytes parm save area + # + 16 bytes retval area + 13*8 bytes fpr save area + round to 16 + stdu %r1, -240(%r1) + .LCFI0: + + # next save fpr 1 to fpr 13 + stfd %f1, 128+(0*8)(%r1) + stfd %f2, 128+(1*8)(%r1) + stfd %f3, 128+(2*8)(%r1) + stfd %f4, 128+(3*8)(%r1) + stfd %f5, 128+(4*8)(%r1) + stfd %f6, 128+(5*8)(%r1) + stfd %f7, 128+(6*8)(%r1) + stfd %f8, 128+(7*8)(%r1) + stfd %f9, 128+(8*8)(%r1) + stfd %f10, 128+(9*8)(%r1) + stfd %f11, 128+(10*8)(%r1) + stfd %f12, 128+(11*8)(%r1) + stfd %f13, 128+(12*8)(%r1) + + # set up registers for the routine that actually does the work + # get the context pointer from the trampoline + mr %r3, %r11 + + # now load up the pointer to the result storage + addi %r4, %r1, 112 + + # now load up the pointer to the parameter save area + # in the previous frame + addi %r5, %r1, 240 + 48 + + # now load up the pointer to the saved fpr registers */ + addi %r6, %r1, 128 + + # make the call + bl .ffi_closure_helper_LINUX64 + .Lret: + + # now r3 contains the return type + # so use it to look up in a table + # so we know how to deal with each type + + # look up the proper starting point in table + # by using return type as offset + mflr %r4 # move address of .Lret to r4 + sldi %r3, %r3, 4 # now multiply return type by 16 + addi %r4, %r4, .Lret_type0 - .Lret + ld %r0, 240+16(%r1) + add %r3, %r3, %r4 # add contents of table to table address + mtctr %r3 + bctr # jump to it + + # Each of the ret_typeX code fragments has to be exactly 16 bytes long + # (4 instructions). For cache effectiveness we align to a 16 byte boundary + # first. + .align 4 + + .Lret_type0: + # case FFI_TYPE_VOID + mtlr %r0 + addi %r1, %r1, 240 + blr + nop + # case FFI_TYPE_INT + lwa %r3, 112+4(%r1) + mtlr %r0 + addi %r1, %r1, 240 + blr + # case FFI_TYPE_FLOAT + lfs %f1, 112+0(%r1) + mtlr %r0 + addi %r1, %r1, 240 + blr + # case FFI_TYPE_DOUBLE + lfd %f1, 112+0(%r1) + mtlr %r0 + addi %r1, %r1, 240 + blr + # case FFI_TYPE_LONGDOUBLE + lfd %f1, 112+0(%r1) + mtlr %r0 + lfd %f2, 112+8(%r1) + b .Lfinish + # case FFI_TYPE_UINT8 + lbz %r3, 112+7(%r1) + mtlr %r0 + addi %r1, %r1, 240 + blr + # case FFI_TYPE_SINT8 + lbz %r3, 112+7(%r1) + extsb %r3,%r3 + mtlr %r0 + b .Lfinish + # case FFI_TYPE_UINT16 + lhz %r3, 112+6(%r1) + mtlr %r0 + .Lfinish: + addi %r1, %r1, 240 + blr + # case FFI_TYPE_SINT16 + lha %r3, 112+6(%r1) + mtlr %r0 + addi %r1, %r1, 240 + blr + # case FFI_TYPE_UINT32 + lwz %r3, 112+4(%r1) + mtlr %r0 + addi %r1, %r1, 240 + blr + # case FFI_TYPE_SINT32 + lwa %r3, 112+4(%r1) + mtlr %r0 + addi %r1, %r1, 240 + blr + # case FFI_TYPE_UINT64 + ld %r3, 112+0(%r1) + mtlr %r0 + addi %r1, %r1, 240 + blr + # case FFI_TYPE_SINT64 + ld %r3, 112+0(%r1) + mtlr %r0 + addi %r1, %r1, 240 + blr + # case FFI_TYPE_STRUCT + mtlr %r0 + addi %r1, %r1, 240 + blr + nop + # case FFI_TYPE_POINTER + ld %r3, 112+0(%r1) + mtlr %r0 + addi %r1, %r1, 240 + blr + # esac + .LFE1: + .long 0 + .byte 0,12,0,1,128,0,0,0 + .size .ffi_closure_LINUX64,.-.ffi_closure_LINUX64 + + .section .eh_frame,EH_FRAME_FLAGS,@progbits + .Lframe1: + .4byte .LECIE1-.LSCIE1 # Length of Common Information Entry + .LSCIE1: + .4byte 0x0 # CIE Identifier Tag + .byte 0x1 # CIE Version + .ascii "zR\0" # CIE Augmentation + .uleb128 0x1 # CIE Code Alignment Factor + .sleb128 -8 # CIE Data Alignment Factor + .byte 0x41 # CIE RA Column + .uleb128 0x1 # Augmentation size + .byte 0x14 # FDE Encoding (pcrel udata8) + .byte 0xc # DW_CFA_def_cfa + .uleb128 0x1 + .uleb128 0x0 + .align 3 + .LECIE1: + .LSFDE1: + .4byte .LEFDE1-.LASFDE1 # FDE Length + .LASFDE1: + .4byte .LASFDE1-.Lframe1 # FDE CIE offset + .8byte .LFB1-. # FDE initial location + .8byte .LFE1-.LFB1 # FDE address range + .uleb128 0x0 # Augmentation size + .byte 0x2 # DW_CFA_advance_loc1 + .byte .LCFI0-.LFB1 + .byte 0xe # DW_CFA_def_cfa_offset + .uleb128 240 + .byte 0x11 # DW_CFA_offset_extended_sf + .uleb128 0x41 + .sleb128 -2 + .align 3 + .LEFDE1: + #endif diff -Nrc3pad gcc-3.3.3/libffi/src/powerpc/linux64.S gcc-3.4.0/libffi/src/powerpc/linux64.S *** gcc-3.3.3/libffi/src/powerpc/linux64.S 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/src/powerpc/linux64.S 2004-03-12 01:35:32.000000000 +0000 *************** *** 0 **** --- 1,176 ---- + /* ----------------------------------------------------------------------- + sysv.h - Copyright (c) 2003 Jakub Jelinek + + PowerPC64 Assembly glue. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + ``Software''), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + ----------------------------------------------------------------------- */ + + #define LIBFFI_ASM + #include + #include + + #ifdef __powerpc64__ + .hidden ffi_call_LINUX64, .ffi_call_LINUX64 + .globl ffi_call_LINUX64, .ffi_call_LINUX64 + .section ".opd","aw" + .align 3 + ffi_call_LINUX64: + .quad .ffi_call_LINUX64,.TOC.@tocbase,0 + .size ffi_call_LINUX64,24 + .type .ffi_call_LINUX64,@function + .text + .ffi_call_LINUX64: + .LFB1: + mflr %r0 + std %r28, -32(%r1) + std %r29, -24(%r1) + std %r30, -16(%r1) + std %r31, -8(%r1) + std %r0, 16(%r1) + + mr %r28, %r1 /* our AP. */ + stdux %r1, %r1, %r4 + .LCFI0: + mr %r31, %r5 /* flags, */ + mr %r30, %r6 /* rvalue, */ + mr %r29, %r7 /* function address. */ + std %r2, 40(%r1) + + /* Call ffi_prep_args64. */ + mr %r4, %r1 + bl .ffi_prep_args64 + + ld %r0, 0(%r29) + ld %r2, 8(%r29) + ld %r11, 16(%r29) + + /* Now do the call. */ + /* Set up cr1 with bits 4-7 of the flags. */ + mtcrf 0x40, %r31 + + /* Get the address to call into CTR. */ + mtctr %r0 + /* Load all those argument registers. */ + ld %r3, -32-(8*8)(%r28) + ld %r4, -32-(7*8)(%r28) + ld %r5, -32-(6*8)(%r28) + ld %r6, -32-(5*8)(%r28) + bf- 5, 1f + ld %r7, -32-(4*8)(%r28) + ld %r8, -32-(3*8)(%r28) + ld %r9, -32-(2*8)(%r28) + ld %r10, -32-(1*8)(%r28) + 1: + + /* Load all the FP registers. */ + bf- 6, 2f + lfd %f1, -32-(21*8)(%r28) + lfd %f2, -32-(20*8)(%r28) + lfd %f3, -32-(19*8)(%r28) + lfd %f4, -32-(18*8)(%r28) + lfd %f5, -32-(17*8)(%r28) + lfd %f6, -32-(16*8)(%r28) + lfd %f7, -32-(15*8)(%r28) + lfd %f8, -32-(14*8)(%r28) + lfd %f9, -32-(13*8)(%r28) + lfd %f10, -32-(12*8)(%r28) + lfd %f11, -32-(11*8)(%r28) + lfd %f12, -32-(10*8)(%r28) + lfd %f13, -32-(9*8)(%r28) + 2: + + /* Make the call. */ + bctrl + + /* Now, deal with the return value. */ + mtcrf 0x01, %r31 + bt- 30, .Ldone_return_value + bt- 29, .Lfp_return_value + std %r3, 0(%r30) + /* Fall through... */ + + .Ldone_return_value: + /* Restore the registers we used and return. */ + ld %r2, 40(%r1) + mr %r1, %r28 + ld %r0, 16(%r28) + ld %r28, -32(%r1) + mtlr %r0 + ld %r29, -24(%r1) + ld %r30, -16(%r1) + ld %r31, -8(%r1) + blr + + .Lfp_return_value: + bf 28, .Lfloat_return_value + stfd %f1, 0(%r30) + stfd %f2, 8(%r30) /* It might be a long double */ + b .Ldone_return_value + .Lfloat_return_value: + stfs %f1, 0(%r30) + b .Ldone_return_value + .LFE1: + .long 0 + .byte 0,12,0,1,128,4,0,0 + .size .ffi_call_LINUX64,.-.ffi_call_LINUX64 + + .section .eh_frame,EH_FRAME_FLAGS,@progbits + .Lframe1: + .4byte .LECIE1-.LSCIE1 # Length of Common Information Entry + .LSCIE1: + .4byte 0x0 # CIE Identifier Tag + .byte 0x1 # CIE Version + .ascii "zR\0" # CIE Augmentation + .uleb128 0x1 # CIE Code Alignment Factor + .sleb128 -8 # CIE Data Alignment Factor + .byte 0x41 # CIE RA Column + .uleb128 0x1 # Augmentation size + .byte 0x14 # FDE Encoding (pcrel udata8) + .byte 0xc # DW_CFA_def_cfa + .uleb128 0x1 + .uleb128 0x0 + .align 3 + .LECIE1: + .LSFDE1: + .4byte .LEFDE1-.LASFDE1 # FDE Length + .LASFDE1: + .4byte .LASFDE1-.Lframe1 # FDE CIE offset + .8byte .LFB1-. # FDE initial location + .8byte .LFE1-.LFB1 # FDE address range + .uleb128 0x0 # Augmentation size + .byte 0x2 # DW_CFA_advance_loc1 + .byte .LCFI0-.LFB1 + .byte 0xd # DW_CFA_def_cfa_register + .uleb128 0x1c + .byte 0x11 # DW_CFA_offset_extended_sf + .uleb128 0x41 + .sleb128 -2 + .byte 0x9f # DW_CFA_offset, column 0x1f + .uleb128 0x1 + .byte 0x9e # DW_CFA_offset, column 0x1e + .uleb128 0x2 + .byte 0x9d # DW_CFA_offset, column 0x1d + .uleb128 0x3 + .byte 0x9c # DW_CFA_offset, column 0x1c + .uleb128 0x4 + .align 3 + .LEFDE1: + #endif diff -Nrc3pad gcc-3.3.3/libffi/src/powerpc/ppc_closure.S gcc-3.4.0/libffi/src/powerpc/ppc_closure.S *** gcc-3.3.3/libffi/src/powerpc/ppc_closure.S 2003-01-29 23:55:15.000000000 +0000 --- gcc-3.4.0/libffi/src/powerpc/ppc_closure.S 2003-10-21 19:01:56.000000000 +0000 *************** *** 1,8 **** --- 1,12 ---- #define LIBFFI_ASM + #include + #include #include .file "ppc_closure.S" + #ifndef __powerpc64__ + ENTRY(ffi_closure_SYSV) .LFB1: stwu %r1,-144(%r1) *************** ENTRY(ffi_closure_SYSV) *** 195,229 **** blr END(ffi_closure_SYSV) ! .section ".eh_frame","aw" ! __FRAME_BEGIN__: .4byte .LECIE1-.LSCIE1 # Length of Common Information Entry .LSCIE1: .4byte 0x0 # CIE Identifier Tag .byte 0x1 # CIE Version .ascii "\0" # CIE Augmentation ! .byte 0x1 # uleb128 0x1; CIE Code Alignment Factor ! .byte 0x7c # sleb128 -4; CIE Data Alignment Factor .byte 0x41 # CIE RA Column .byte 0xc # DW_CFA_def_cfa ! .byte 0x1 # uleb128 0x1 ! .byte 0x0 # uleb128 0x0 .align 2 .LECIE1: .LSFDE1: .4byte .LEFDE1-.LASFDE1 # FDE Length .LASFDE1: ! .4byte .LASFDE1-__FRAME_BEGIN__ # FDE CIE offset .4byte .LFB1 # FDE initial location .4byte .LFE1-.LFB1 # FDE address range .byte 0x4 # DW_CFA_advance_loc4 .4byte .LCFI0-.LFB1 .byte 0xe # DW_CFA_def_cfa_offset ! .byte 144,1 # uleb128 144 .byte 0x4 # DW_CFA_advance_loc4 .4byte .LCFI1-.LCFI0 .byte 0x2f # DW_CFA_GNU_negative_offset_extended ! .byte 0x41 # uleb128 0x41 ! .byte 0x1 # uleb128 0x1 .align 2 .LEFDE1: --- 199,250 ---- blr END(ffi_closure_SYSV) ! .section ".eh_frame",EH_FRAME_FLAGS,@progbits ! .Lframe1: .4byte .LECIE1-.LSCIE1 # Length of Common Information Entry .LSCIE1: .4byte 0x0 # CIE Identifier Tag .byte 0x1 # CIE Version + #if defined _RELOCATABLE || defined __PIC__ + .ascii "zR\0" # CIE Augmentation + #else .ascii "\0" # CIE Augmentation ! #endif ! .uleb128 0x1 # CIE Code Alignment Factor ! .sleb128 -4 # CIE Data Alignment Factor .byte 0x41 # CIE RA Column + #if defined _RELOCATABLE || defined __PIC__ + .uleb128 0x1 # Augmentation size + .byte 0x1b # FDE Encoding (pcrel sdata4) + #endif .byte 0xc # DW_CFA_def_cfa ! .uleb128 0x1 ! .uleb128 0x0 .align 2 .LECIE1: .LSFDE1: .4byte .LEFDE1-.LASFDE1 # FDE Length .LASFDE1: ! .4byte .LASFDE1-.Lframe1 # FDE CIE offset ! #if defined _RELOCATABLE || defined __PIC__ ! .4byte .LFB1-. # FDE initial location ! #else .4byte .LFB1 # FDE initial location + #endif .4byte .LFE1-.LFB1 # FDE address range + #if defined _RELOCATABLE || defined __PIC__ + .uleb128 0x0 # Augmentation size + #endif .byte 0x4 # DW_CFA_advance_loc4 .4byte .LCFI0-.LFB1 .byte 0xe # DW_CFA_def_cfa_offset ! .uleb128 144 .byte 0x4 # DW_CFA_advance_loc4 .4byte .LCFI1-.LCFI0 .byte 0x2f # DW_CFA_GNU_negative_offset_extended ! .uleb128 0x41 ! .uleb128 0x1 .align 2 .LEFDE1: + + #endif diff -Nrc3pad gcc-3.3.3/libffi/src/powerpc/sysv.S gcc-3.4.0/libffi/src/powerpc/sysv.S *** gcc-3.3.3/libffi/src/powerpc/sysv.S 2001-06-03 14:05:38.000000000 +0000 --- gcc-3.4.0/libffi/src/powerpc/sysv.S 2003-10-21 19:01:56.000000000 +0000 *************** *** 26,35 **** ----------------------------------------------------------------------- */ #define LIBFFI_ASM #include #include ! .globl ffi_prep_args ENTRY(ffi_call_SYSV) .LFB1: /* Save the old stack pointer as AP. */ --- 26,37 ---- ----------------------------------------------------------------------- */ #define LIBFFI_ASM + #include #include #include ! #ifndef __powerpc64__ ! .globl ffi_prep_args_SYSV ENTRY(ffi_call_SYSV) .LFB1: /* Save the old stack pointer as AP. */ *************** ENTRY(ffi_call_SYSV) *** 58,66 **** mr %r28,%r8 /* our AP. */ .LCFI6: ! /* Call ffi_prep_args. */ mr %r4,%r1 ! bl JUMPTARGET(ffi_prep_args) /* Now do the call. */ /* Set up cr1 with bits 4-7 of the flags. */ --- 60,68 ---- mr %r28,%r8 /* our AP. */ .LCFI6: ! /* Call ffi_prep_args_SYSV. */ mr %r4,%r1 ! bl JUMPTARGET(ffi_prep_args_SYSV) /* Now do the call. */ /* Set up cr1 with bits 4-7 of the flags. */ *************** L(float_return_value): *** 127,173 **** .LFE1: END(ffi_call_SYSV) ! .section ".eh_frame","aw" ! __FRAME_BEGIN__: .4byte .LECIE1-.LSCIE1 /* Length of Common Information Entry */ .LSCIE1: .4byte 0x0 /* CIE Identifier Tag */ .byte 0x1 /* CIE Version */ ! .ascii "\0" /* CIE Augmentation */ ! .byte 0x1 /* uleb128 0x1; CIE Code Alignment Factor */ ! .byte 0x7c /* sleb128 -4; CIE Data Alignment Factor */ .byte 0x41 /* CIE RA Column */ .byte 0xc /* DW_CFA_def_cfa */ ! .byte 0x1 /* uleb128 0x1 */ ! .byte 0x0 /* uleb128 0x0 */ .align 2 .LECIE1: .LSFDE1: .4byte .LEFDE1-.LASFDE1 /* FDE Length */ .LASFDE1: ! .4byte .LASFDE1-__FRAME_BEGIN__ /* FDE CIE offset */ .4byte .LFB1 /* FDE initial location */ .4byte .LFE1-.LFB1 /* FDE address range */ .byte 0x4 /* DW_CFA_advance_loc4 */ .4byte .LCFI0-.LFB1 .byte 0xd /* DW_CFA_def_cfa_register */ ! .byte 0x08 /* uleb128 0x08 */ .byte 0x4 /* DW_CFA_advance_loc4 */ .4byte .LCFI5-.LCFI0 .byte 0x2f /* DW_CFA_GNU_negative_offset_extended */ ! .byte 0x41 /* uleb128 0x41 */ ! .byte 0x1 /* uleb128 0x1 */ .byte 0x9f /* DW_CFA_offset, column 0x1f */ ! .byte 0x1 /* uleb128 0x1 */ .byte 0x9e /* DW_CFA_offset, column 0x1e */ ! .byte 0x2 /* uleb128 0x2 */ .byte 0x9d /* DW_CFA_offset, column 0x1d */ ! .byte 0x3 /* uleb128 0x3 */ .byte 0x9c /* DW_CFA_offset, column 0x1c */ ! .byte 0x4 /* uleb128 0x4 */ .byte 0x4 /* DW_CFA_advance_loc4 */ .4byte .LCFI6-.LCFI5 .byte 0xd /* DW_CFA_def_cfa_register */ ! .byte 0x1c /* uleb128 0x1c */ .align 2 .LEFDE1: --- 129,191 ---- .LFE1: END(ffi_call_SYSV) ! .section ".eh_frame",EH_FRAME_FLAGS,@progbits ! .Lframe1: .4byte .LECIE1-.LSCIE1 /* Length of Common Information Entry */ .LSCIE1: .4byte 0x0 /* CIE Identifier Tag */ .byte 0x1 /* CIE Version */ ! #if defined _RELOCATABLE || defined __PIC__ ! .ascii "zR\0" /* CIE Augmentation */ ! #else ! .ascii "\0" /* CIE Augmentation */ ! #endif ! .uleb128 0x1 /* CIE Code Alignment Factor */ ! .sleb128 -4 /* CIE Data Alignment Factor */ .byte 0x41 /* CIE RA Column */ + #if defined _RELOCATABLE || defined __PIC__ + .uleb128 0x1 /* Augmentation size */ + .byte 0x1b /* FDE Encoding (pcrel sdata4) */ + #endif .byte 0xc /* DW_CFA_def_cfa */ ! .uleb128 0x1 ! .uleb128 0x0 .align 2 .LECIE1: .LSFDE1: .4byte .LEFDE1-.LASFDE1 /* FDE Length */ .LASFDE1: ! .4byte .LASFDE1-.Lframe1 /* FDE CIE offset */ ! #if defined _RELOCATABLE || defined __PIC__ ! .4byte .LFB1-. /* FDE initial location */ ! #else .4byte .LFB1 /* FDE initial location */ + #endif .4byte .LFE1-.LFB1 /* FDE address range */ + #if defined _RELOCATABLE || defined __PIC__ + .uleb128 0x0 /* Augmentation size */ + #endif .byte 0x4 /* DW_CFA_advance_loc4 */ .4byte .LCFI0-.LFB1 .byte 0xd /* DW_CFA_def_cfa_register */ ! .uleb128 0x08 .byte 0x4 /* DW_CFA_advance_loc4 */ .4byte .LCFI5-.LCFI0 .byte 0x2f /* DW_CFA_GNU_negative_offset_extended */ ! .uleb128 0x41 ! .uleb128 0x1 .byte 0x9f /* DW_CFA_offset, column 0x1f */ ! .uleb128 0x1 .byte 0x9e /* DW_CFA_offset, column 0x1e */ ! .uleb128 0x2 .byte 0x9d /* DW_CFA_offset, column 0x1d */ ! .uleb128 0x3 .byte 0x9c /* DW_CFA_offset, column 0x1c */ ! .uleb128 0x4 .byte 0x4 /* DW_CFA_advance_loc4 */ .4byte .LCFI6-.LCFI5 .byte 0xd /* DW_CFA_def_cfa_register */ ! .uleb128 0x1c .align 2 .LEFDE1: + #endif diff -Nrc3pad gcc-3.3.3/libffi/src/prep_cif.c gcc-3.4.0/libffi/src/prep_cif.c *** gcc-3.3.3/libffi/src/prep_cif.c 2002-09-30 11:59:42.000000000 +0000 --- gcc-3.4.0/libffi/src/prep_cif.c 2003-11-06 15:47:41.000000000 +0000 *************** *** 1,5 **** /* ----------------------------------------------------------------------- ! prep_cif.c - Copyright (c) 1996, 1998 Cygnus Solutions Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the --- 1,5 ---- /* ----------------------------------------------------------------------- ! prep_cif.c - Copyright (c) 1996, 1998 Red Hat, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the *************** *** 26,34 **** #include ! /* Round up to SIZEOF_ARG. */ ! #define STACK_ARG_SIZE(x) ALIGN(x, SIZEOF_ARG) /* Perform machine independent initialization of aggregate type specifications. */ --- 26,34 ---- #include ! /* Round up to FFI_SIZEOF_ARG. */ ! #define STACK_ARG_SIZE(x) ALIGN(x, FFI_SIZEOF_ARG) /* Perform machine independent initialization of aggregate type specifications. */ *************** static ffi_status initialize_aggregate(/ *** 53,59 **** return FFI_BAD_TYPEDEF; /* Perform a sanity check on the argument type */ ! FFI_ASSERT(ffi_type_test((*ptr))); arg->size = ALIGN(arg->size, (*ptr)->alignment); arg->size += (*ptr)->size; --- 53,59 ---- return FFI_BAD_TYPEDEF; /* Perform a sanity check on the argument type */ ! FFI_ASSERT_VALID_TYPE(*ptr); arg->size = ALIGN(arg->size, (*ptr)->alignment); arg->size += (*ptr)->size; *************** static ffi_status initialize_aggregate(/ *** 64,69 **** --- 64,78 ---- ptr++; } + /* Structure size includes tail padding. This is important for + structures that fit in one register on ABIs like the PowerPC64 + Linux ABI that right justify small structs in a register. + It's also needed for nested structure layout, for example + struct A { long a; char b; }; struct B { struct A x; char y; }; + should find y at an offset of 2*sizeof(long) and result in a + total size of 3*sizeof(long). */ + arg->size = ALIGN (arg->size, arg->alignment); + if (arg->size == 0) return FFI_BAD_TYPEDEF; else *************** ffi_status ffi_prep_cif(/*@out@*/ /*@par *** 85,91 **** ffi_type **ptr; FFI_ASSERT(cif != NULL); ! FFI_ASSERT((abi > FFI_FIRST_ABI) && (abi < FFI_LAST_ABI)); cif->abi = abi; cif->arg_types = atypes; --- 94,100 ---- ffi_type **ptr; FFI_ASSERT(cif != NULL); ! FFI_ASSERT((abi > FFI_FIRST_ABI) && (abi <= FFI_DEFAULT_ABI)); cif->abi = abi; cif->arg_types = atypes; *************** ffi_status ffi_prep_cif(/*@out@*/ /*@par *** 101,107 **** /*@=usedef@*/ /* Perform a sanity check on the return type */ ! FFI_ASSERT(ffi_type_test(cif->rtype)); /* x86-64 and s390 stack space allocation is handled in prep_machdep. */ #if !defined M68K && !defined __x86_64__ && !defined S390 --- 110,116 ---- /*@=usedef@*/ /* Perform a sanity check on the return type */ ! FFI_ASSERT_VALID_TYPE(cif->rtype); /* x86-64 and s390 stack space allocation is handled in prep_machdep. */ #if !defined M68K && !defined __x86_64__ && !defined S390 *************** ffi_status ffi_prep_cif(/*@out@*/ /*@par *** 116,128 **** for (ptr = cif->arg_types, i = cif->nargs; i > 0; i--, ptr++) { - /* Perform a sanity check on the argument type */ - FFI_ASSERT(ffi_type_test(*ptr)); /* Initialize any uninitialized aggregate type definitions */ if (((*ptr)->size == 0) && (initialize_aggregate((*ptr)) != FFI_OK)) return FFI_BAD_TYPEDEF; #if !defined __x86_64__ && !defined S390 #ifdef SPARC if (((*ptr)->type == FFI_TYPE_STRUCT --- 125,139 ---- for (ptr = cif->arg_types, i = cif->nargs; i > 0; i--, ptr++) { /* Initialize any uninitialized aggregate type definitions */ if (((*ptr)->size == 0) && (initialize_aggregate((*ptr)) != FFI_OK)) return FFI_BAD_TYPEDEF; + /* Perform a sanity check on the argument type, do this + check after the initialization. */ + FFI_ASSERT_VALID_TYPE(*ptr); + #if !defined __x86_64__ && !defined S390 #ifdef SPARC if (((*ptr)->type == FFI_TYPE_STRUCT diff -Nrc3pad gcc-3.3.3/libffi/src/raw_api.c gcc-3.4.0/libffi/src/raw_api.c *** gcc-3.3.3/libffi/src/raw_api.c 2000-02-25 19:13:44.000000000 +0000 --- gcc-3.4.0/libffi/src/raw_api.c 2003-10-21 19:01:54.000000000 +0000 *************** *** 1,5 **** /* ----------------------------------------------------------------------- ! raw_api.c - Copyright (c) 1999 Cygnus Solutions Author: Kresten Krab Thorup --- 1,5 ---- /* ----------------------------------------------------------------------- ! raw_api.c - Copyright (c) 1999 Red Hat, Inc. Author: Kresten Krab Thorup *************** ffi_raw_size (ffi_cif *cif) *** 44,53 **** { #if !FFI_NO_STRUCTS if ((*at)->type == FFI_TYPE_STRUCT) ! result += ALIGN (sizeof (void*), SIZEOF_ARG); else #endif ! result += ALIGN ((*at)->size, SIZEOF_ARG); } return result; --- 44,53 ---- { #if !FFI_NO_STRUCTS if ((*at)->type == FFI_TYPE_STRUCT) ! result += ALIGN (sizeof (void*), FFI_SIZEOF_ARG); else #endif ! result += ALIGN ((*at)->size, FFI_SIZEOF_ARG); } return result; *************** ffi_raw_to_ptrarray (ffi_cif *cif, ffi_r *** 68,85 **** { case FFI_TYPE_UINT8: case FFI_TYPE_SINT8: ! *args = (void*) ((char*)(raw++) + SIZEOF_ARG - 1); break; case FFI_TYPE_UINT16: case FFI_TYPE_SINT16: ! *args = (void*) ((char*)(raw++) + SIZEOF_ARG - 2); break; ! #if SIZEOF_ARG >= 4 case FFI_TYPE_UINT32: case FFI_TYPE_SINT32: ! *args = (void*) ((char*)(raw++) + SIZEOF_ARG - 4); break; #endif --- 68,85 ---- { case FFI_TYPE_UINT8: case FFI_TYPE_SINT8: ! *args = (void*) ((char*)(raw++) + FFI_SIZEOF_ARG - 1); break; case FFI_TYPE_UINT16: case FFI_TYPE_SINT16: ! *args = (void*) ((char*)(raw++) + FFI_SIZEOF_ARG - 2); break; ! #if FFI_SIZEOF_ARG >= 4 case FFI_TYPE_UINT32: case FFI_TYPE_SINT32: ! *args = (void*) ((char*)(raw++) + FFI_SIZEOF_ARG - 4); break; #endif *************** ffi_raw_to_ptrarray (ffi_cif *cif, ffi_r *** 95,101 **** default: *args = raw; ! raw += ALIGN ((*tp)->size, SIZEOF_ARG) / SIZEOF_ARG; } } --- 95,101 ---- default: *args = raw; ! raw += ALIGN ((*tp)->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG; } } *************** ffi_ptrarray_to_raw (ffi_cif *cif, void *** 152,158 **** (raw++)->sint = *(SINT16*) (*args); break; ! #if SIZEOF_ARG >= 4 case FFI_TYPE_UINT32: (raw++)->uint = *(UINT32*) (*args); break; --- 152,158 ---- (raw++)->sint = *(SINT16*) (*args); break; ! #if FFI_SIZEOF_ARG >= 4 case FFI_TYPE_UINT32: (raw++)->uint = *(UINT32*) (*args); break; *************** ffi_ptrarray_to_raw (ffi_cif *cif, void *** 174,180 **** default: memcpy ((void*) raw->data, (void*)*args, (*tp)->size); ! raw += ALIGN ((*tp)->size, SIZEOF_ARG) / SIZEOF_ARG; } } } --- 174,180 ---- default: memcpy ((void*) raw->data, (void*)*args, (*tp)->size); ! raw += ALIGN ((*tp)->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG; } } } diff -Nrc3pad gcc-3.3.3/libffi/src/s390/ffi.c gcc-3.4.0/libffi/src/s390/ffi.c *** gcc-3.3.3/libffi/src/s390/ffi.c 2002-10-08 14:55:03.000000000 +0000 --- gcc-3.4.0/libffi/src/s390/ffi.c 2003-02-05 23:58:57.000000000 +0000 *************** *** 70,78 **** static void ffi_prep_args (unsigned char *, extended_cif *); static int ffi_check_float_struct (ffi_type *); ! void ffi_closure_helper_SYSV (ffi_closure *, unsigned long *, ! unsigned long long *, unsigned long *); ! /*====================== End of Prototypes ===========================*/ /*====================================================================*/ --- 70,82 ---- static void ffi_prep_args (unsigned char *, extended_cif *); static int ffi_check_float_struct (ffi_type *); ! void ! #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 2) ! __attribute__ ((visibility ("hidden"))) ! #endif ! ffi_closure_helper_SYSV (ffi_closure *, unsigned long *, ! unsigned long long *, unsigned long *); ! /*====================== End of Prototypes ===========================*/ /*====================================================================*/ diff -Nrc3pad gcc-3.3.3/libffi/src/s390/ffitarget.h gcc-3.4.0/libffi/src/s390/ffitarget.h *** gcc-3.3.3/libffi/src/s390/ffitarget.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/src/s390/ffitarget.h 2003-10-21 19:07:51.000000000 +0000 *************** *** 0 **** --- 1,59 ---- + /* -----------------------------------------------------------------*-C-*- + ffitarget.h - Copyright (c) 1996-2003 Red Hat, Inc. + Target configuration macros for S390. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + ``Software''), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + ----------------------------------------------------------------------- */ + + #ifndef LIBFFI_TARGET_H + #define LIBFFI_TARGET_H + + #if defined (__s390x__) + #define S390X + #endif + + /* ---- System specific configurations ----------------------------------- */ + + #ifndef LIBFFI_ASM + typedef unsigned long ffi_arg; + typedef signed long ffi_sarg; + + typedef enum ffi_abi { + FFI_FIRST_ABI = 0, + FFI_SYSV, + FFI_DEFAULT_ABI = FFI_SYSV, + FFI_LAST_ABI = FFI_DEFAULT_ABI + 1 + } ffi_abi; + #endif + + + /* ---- Definitions for closures ----------------------------------------- */ + + #define FFI_CLOSURES 1 + #ifdef S390X + #define FFI_TRAMPOLINE_SIZE 32 + #else + #define FFI_TRAMPOLINE_SIZE 16 + #endif + #define FFI_NATIVE_RAW_API 0 + + #endif + diff -Nrc3pad gcc-3.3.3/libffi/src/s390/sysv.S gcc-3.4.0/libffi/src/s390/sysv.S *** gcc-3.3.3/libffi/src/s390/sysv.S 2002-11-27 16:44:35.000000000 +0000 --- gcc-3.4.0/libffi/src/s390/sysv.S 2003-10-21 19:01:57.000000000 +0000 *************** *** 23,28 **** --- 23,32 ---- OTHER DEALINGS IN THE SOFTWARE. ----------------------------------------------------------------------- */ + #define LIBFFI_ASM + #include + #include + #ifndef __s390x__ .text *************** ffi_closure_SYSV: *** 146,152 **** .size ffi_closure_SYSV,.ffi_closure_SYSV_end-ffi_closure_SYSV ! .section .eh_frame,"a",@progbits .Lframe1: .4byte .LECIE1-.LSCIE1 # Length of Common Information Entry .LSCIE1: --- 150,156 ---- .size ffi_closure_SYSV,.ffi_closure_SYSV_end-ffi_closure_SYSV ! .section .eh_frame,EH_FRAME_FLAGS,@progbits .Lframe1: .4byte .LECIE1-.LSCIE1 # Length of Common Information Entry .LSCIE1: *************** ffi_closure_SYSV: *** 345,351 **** ! .section .eh_frame,"a",@progbits .Lframe1: .4byte .LECIE1-.LSCIE1 # Length of Common Information Entry .LSCIE1: --- 349,355 ---- ! .section .eh_frame,EH_FRAME_FLAGS,@progbits .Lframe1: .4byte .LECIE1-.LSCIE1 # Length of Common Information Entry .LSCIE1: diff -Nrc3pad gcc-3.3.3/libffi/src/sh/ffi.c gcc-3.4.0/libffi/src/sh/ffi.c *** gcc-3.3.3/libffi/src/sh/ffi.c 2002-07-19 01:08:43.000000000 +0000 --- gcc-3.4.0/libffi/src/sh/ffi.c 2003-09-18 14:08:20.000000000 +0000 *************** *** 1,5 **** /* ----------------------------------------------------------------------- ! ffi.c - Copyright (c) 2002 Kaz Kojima SuperH Foreign Function Interface --- 1,5 ---- /* ----------------------------------------------------------------------- ! ffi.c - Copyright (c) 2002, 2003 Kaz Kojima SuperH Foreign Function Interface *************** void ffi_prep_args(char *stack, extended *** 220,226 **** greg += n; #endif memcpy (argp, *p_argv, z); ! argp += z; } } --- 220,226 ---- greg += n; #endif memcpy (argp, *p_argv, z); ! argp += n * sizeof (int); } } *************** void ffi_prep_args(char *stack, extended *** 315,321 **** } #endif memcpy (argp, *p_argv, z); ! argp += z; } } --- 315,321 ---- } #endif memcpy (argp, *p_argv, z); ! argp += n * sizeof (int); } } *************** ffi_prep_closure (ffi_closure* closure, *** 507,513 **** #ifdef __LITTLE_ENDIAN__ #define OFS_INT8 0 ! #define OFS_INT16 2 #else #define OFS_INT8 3 #define OFS_INT16 2 --- 507,513 ---- #ifdef __LITTLE_ENDIAN__ #define OFS_INT8 0 ! #define OFS_INT16 0 #else #define OFS_INT8 3 #define OFS_INT16 2 *************** ffi_closure_helper_SYSV (ffi_closure *cl *** 533,542 **** /* Copy the caller's structure return value address so that the closure returns the data directly to the caller. */ ! if (cif->rtype->type == FFI_TYPE_STRUCT) { rvalue = *pgr++; ! ireg = STRUCT_VALUE_ADDRESS_WITH_ARG ? 1 : 0; } else ireg = 0; --- 533,542 ---- /* Copy the caller's structure return value address so that the closure returns the data directly to the caller. */ ! if (cif->rtype->type == FFI_TYPE_STRUCT && STRUCT_VALUE_ADDRESS_WITH_ARG) { rvalue = *pgr++; ! ireg = 1; } else ireg = 0; *************** ffi_closure_helper_SYSV (ffi_closure *cl *** 717,722 **** (closure->fun) (cif, rvalue, avalue, closure->user_data); ! /* Tell ffi_closure_osf how to perform return type promotions. */ ! return cif->rtype->type; } --- 717,722 ---- (closure->fun) (cif, rvalue, avalue, closure->user_data); ! /* Tell ffi_closure_SYSV how to perform return type promotions. */ ! return return_type (cif->rtype); } diff -Nrc3pad gcc-3.3.3/libffi/src/sh/ffitarget.h gcc-3.4.0/libffi/src/sh/ffitarget.h *** gcc-3.3.3/libffi/src/sh/ffitarget.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/src/sh/ffitarget.h 2003-10-21 19:07:51.000000000 +0000 *************** *** 0 **** --- 1,48 ---- + /* -----------------------------------------------------------------*-C-*- + ffitarget.h - Copyright (c) 1996-2003 Red Hat, Inc. + Target configuration macros for SuperH. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + ``Software''), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + ----------------------------------------------------------------------- */ + + #ifndef LIBFFI_TARGET_H + #define LIBFFI_TARGET_H + + /* ---- Generic type definitions ----------------------------------------- */ + + #ifndef LIBFFI_ASM + typedef unsigned long ffi_arg; + typedef signed long ffi_sarg; + + typedef enum ffi_abi { + FFI_FIRST_ABI = 0, + FFI_SYSV, + FFI_DEFAULT_ABI = FFI_SYSV, + FFI_LAST_ABI = FFI_DEFAULT_ABI + 1 + } ffi_abi; + #endif + + #define FFI_CLOSURES 1 + #define FFI_TRAMPOLINE_SIZE 16 + #define FFI_NATIVE_RAW_API 0 + + #endif + diff -Nrc3pad gcc-3.3.3/libffi/src/sh/sysv.S gcc-3.4.0/libffi/src/sh/sysv.S *** gcc-3.3.3/libffi/src/sh/sysv.S 2002-07-19 01:08:43.000000000 +0000 --- gcc-3.4.0/libffi/src/sh/sysv.S 2003-10-21 19:01:57.000000000 +0000 *************** *** 1,5 **** /* ----------------------------------------------------------------------- ! sysv.S - Copyright (c) 2002 Kaz Kojima SuperH Foreign Function Interface --- 1,5 ---- /* ----------------------------------------------------------------------- ! sysv.S - Copyright (c) 2002, 2003 Kaz Kojima SuperH Foreign Function Interface *************** *** 24,29 **** --- 24,30 ---- ----------------------------------------------------------------------- */ #define LIBFFI_ASM + #include #include #ifdef HAVE_MACHINE_ASM_H #include *************** *** 50,65 **** # This assumes we are using gas. ENTRY(ffi_call_SYSV) - #if defined(__SH4__) # Save registers mov.l r8,@-r15 mov.l r9,@-r15 mov.l r10,@-r15 mov.l r12,@-r15 mov.l r14,@-r15 sts.l pr,@-r15 mov r15,r14 ! mov r6,r8 mov r7,r9 --- 51,73 ---- # This assumes we are using gas. ENTRY(ffi_call_SYSV) # Save registers + .LFB1: mov.l r8,@-r15 + .LCFI0: mov.l r9,@-r15 + .LCFI1: mov.l r10,@-r15 + .LCFI2: mov.l r12,@-r15 + .LCFI3: mov.l r14,@-r15 + .LCFI4: sts.l pr,@-r15 + .LCFI5: mov r15,r14 ! .LCFI6: ! #if defined(__SH4__) mov r6,r8 mov r7,r9 *************** L_epilogue: *** 319,333 **** rts mov.l @r15+,r8 #else - # Save registers - mov.l r8,@-r15 - mov.l r9,@-r15 - mov.l r10,@-r15 - mov.l r12,@-r15 - mov.l r14,@-r15 - sts.l pr,@-r15 - mov r15,r14 - mov r6,r8 mov r7,r9 --- 327,332 ---- *************** L_epilogue: *** 491,523 **** rts mov.l @r15+,r8 #endif ! .ffi_call_SYSV_end: .size CNAME(ffi_call_SYSV),.ffi_call_SYSV_end-CNAME(ffi_call_SYSV) .globl ffi_closure_helper_SYSV ENTRY(ffi_closure_SYSV) mov.l r14,@-r15 sts.l pr,@-r15 /* Stack layout: ... 32 bytes (floating register parameters, SH-4 only) 16 bytes (register parameters) ! 4 bytes (result) 4 bytes (5th arg) <- new stack pointer */ #if defined(__SH4__) ! add #-56,r15 #else ! add #-24,r15 #endif mov r15,r14 ! mov r14,r1 ! add #24,r1 mov.l r7,@-r1 mov.l r6,@-r1 mov.l r5,@-r1 --- 490,527 ---- rts mov.l @r15+,r8 #endif ! .LFE1: .ffi_call_SYSV_end: .size CNAME(ffi_call_SYSV),.ffi_call_SYSV_end-CNAME(ffi_call_SYSV) .globl ffi_closure_helper_SYSV ENTRY(ffi_closure_SYSV) + .LFB2: mov.l r14,@-r15 + .LCFI7: sts.l pr,@-r15 /* Stack layout: ... 32 bytes (floating register parameters, SH-4 only) 16 bytes (register parameters) ! 8 bytes (result) ! 4 bytes (pad) 4 bytes (5th arg) <- new stack pointer */ + .LCFI8: #if defined(__SH4__) ! add #-64,r15 #else ! add #-32,r15 #endif + .LCFI9: mov r15,r14 ! .LCFIA: mov r14,r1 ! add #32,r1 mov.l r7,@-r1 mov.l r6,@-r1 mov.l r5,@-r1 *************** ENTRY(ffi_closure_SYSV) *** 526,532 **** #if defined(__SH4__) mov r14,r1 ! add #56,r1 #ifdef __LITTLE_ENDIAN__ fmov.s fr10,@-r1 fmov.s fr11,@-r1 --- 530,536 ---- #if defined(__SH4__) mov r14,r1 ! add #64,r1 #ifdef __LITTLE_ENDIAN__ fmov.s fr10,@-r1 fmov.s fr11,@-r1 *************** ENTRY(ffi_closure_SYSV) *** 550,563 **** #endif mov r14,r1 ! add #4,r1 mov r1,r5 mov r14,r1 #if defined(__SH4__) ! add #64,r1 #else ! add #32,r1 #endif mov.l r1,@r14 --- 554,567 ---- #endif mov r14,r1 ! add #8,r1 mov r1,r5 mov r14,r1 #if defined(__SH4__) ! add #72,r1 #else ! add #40,r1 #endif mov.l r1,@r14 *************** ENTRY(ffi_closure_SYSV) *** 572,578 **** mov.w @r0,r0 mov r14,r2 braf r0 ! add #4,r2 0: .align 2 L_helper: --- 576,582 ---- mov.w @r0,r0 mov r14,r2 braf r0 ! add #8,r2 0: .align 2 L_helper: *************** L_case_uh: *** 662,674 **** L_case_v: #if defined(__SH4__) ! add #56,r15 #else ! add #24,r15 #endif lds.l @r15+,pr rts mov.l @r15+,r14 ! .ffi_closure_SYSV_end: .size CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV) --- 666,775 ---- L_case_v: #if defined(__SH4__) ! add #64,r15 #else ! add #32,r15 #endif lds.l @r15+,pr rts mov.l @r15+,r14 ! .LFE2: .ffi_closure_SYSV_end: .size CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV) + + .section ".eh_frame","aw",@progbits + __FRAME_BEGIN__: + .4byte .LECIE1-.LSCIE1 /* Length of Common Information Entry */ + .LSCIE1: + .4byte 0x0 /* CIE Identifier Tag */ + .byte 0x1 /* CIE Version */ + .byte 0x0 /* CIE Augmentation */ + .byte 0x1 /* uleb128 0x1; CIE Code Alignment Factor */ + .byte 0x7c /* sleb128 -4; CIE Data Alignment Factor */ + .byte 0x11 /* CIE RA Column */ + .byte 0xc /* DW_CFA_def_cfa */ + .byte 0xf /* uleb128 0xf */ + .byte 0x0 /* uleb128 0x0 */ + .align 2 + .LECIE1: + .LSFDE1: + .4byte .LEFDE1-.LASFDE1 /* FDE Length */ + .LASFDE1: + .4byte .LASFDE1-__FRAME_BEGIN__ /* FDE CIE offset */ + .4byte .LFB1 /* FDE initial location */ + .4byte .LFE1-.LFB1 /* FDE address range */ + .byte 0x4 /* DW_CFA_advance_loc4 */ + .4byte .LCFI0-.LFB1 + .byte 0xe /* DW_CFA_def_cfa_offset */ + .byte 0x4 /* uleb128 0x4 */ + .byte 0x4 /* DW_CFA_advance_loc4 */ + .4byte .LCFI1-.LCFI0 + .byte 0xe /* DW_CFA_def_cfa_offset */ + .byte 0x8 /* uleb128 0x4 */ + .byte 0x4 /* DW_CFA_advance_loc4 */ + .4byte .LCFI2-.LCFI1 + .byte 0xe /* DW_CFA_def_cfa_offset */ + .byte 0xc /* uleb128 0x4 */ + .byte 0x4 /* DW_CFA_advance_loc4 */ + .4byte .LCFI3-.LCFI2 + .byte 0xe /* DW_CFA_def_cfa_offset */ + .byte 0x10 /* uleb128 0x4 */ + .byte 0x4 /* DW_CFA_advance_loc4 */ + .4byte .LCFI4-.LCFI3 + .byte 0xe /* DW_CFA_def_cfa_offset */ + .byte 0x14 /* uleb128 0x4 */ + .byte 0x4 /* DW_CFA_advance_loc4 */ + .4byte .LCFI5-.LCFI4 + .byte 0xe /* DW_CFA_def_cfa_offset */ + .byte 0x18 /* uleb128 0x4 */ + .byte 0x91 /* DW_CFA_offset, column 0x11 */ + .byte 0x6 /* uleb128 0x6 */ + .byte 0x8e /* DW_CFA_offset, column 0xe */ + .byte 0x5 /* uleb128 0x5 */ + .byte 0x8c /* DW_CFA_offset, column 0xc */ + .byte 0x4 /* uleb128 0x4 */ + .byte 0x8a /* DW_CFA_offset, column 0xa */ + .byte 0x3 /* uleb128 0x3 */ + .byte 0x89 /* DW_CFA_offset, column 0x9 */ + .byte 0x2 /* uleb128 0x2 */ + .byte 0x88 /* DW_CFA_offset, column 0x8 */ + .byte 0x1 /* uleb128 0x1 */ + .byte 0x4 /* DW_CFA_advance_loc4 */ + .4byte .LCFI6-.LCFI5 + .byte 0xd /* DW_CFA_def_cfa_register */ + .byte 0xe /* uleb128 0xe */ + .align 2 + .LEFDE1: + + .LSFDE3: + .4byte .LEFDE3-.LASFDE3 /* FDE Length */ + .LASFDE3: + .4byte .LASFDE3-__FRAME_BEGIN__ /* FDE CIE offset */ + .4byte .LFB2 /* FDE initial location */ + .4byte .LFE2-.LFB2 /* FDE address range */ + .byte 0x4 /* DW_CFA_advance_loc4 */ + .4byte .LCFI7-.LFB2 + .byte 0xe /* DW_CFA_def_cfa_offset */ + .byte 0x4 /* uleb128 0x4 */ + .byte 0x4 /* DW_CFA_advance_loc4 */ + .4byte .LCFI8-.LCFI7 + .byte 0xe /* DW_CFA_def_cfa_offset */ + .byte 0x8 /* uleb128 0x8 */ + .byte 0x4 /* DW_CFA_advance_loc4 */ + .4byte .LCFI9-.LCFI8 + .byte 0xe /* DW_CFA_def_cfa_offset */ + #if defined(__SH4__) + .byte 8+64 /* uleb128 8+64 */ + #else + .byte 8+32 /* uleb128 8+32 */ + #endif + .byte 0x91 /* DW_CFA_offset, column 0x11 */ + .byte 0x2 + .byte 0x8e /* DW_CFA_offset, column 0xe */ + .byte 0x1 + .byte 0x4 /* DW_CFA_advance_loc4 */ + .4byte .LCFIA-.LCFI9 + .byte 0xd /* DW_CFA_def_cfa_register */ + .byte 0xe /* uleb128 0xe */ + .align 2 + .LEFDE3: diff -Nrc3pad gcc-3.3.3/libffi/src/sh64/ffi.c gcc-3.4.0/libffi/src/sh64/ffi.c *** gcc-3.3.3/libffi/src/sh64/ffi.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/src/sh64/ffi.c 2003-06-13 02:23:26.000000000 +0000 *************** *** 0 **** --- 1,448 ---- + /* ----------------------------------------------------------------------- + ffi.c - Copyright (c) 2003 Kaz Kojima + + SuperH SHmedia Foreign Function Interface + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + ``Software''), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + ----------------------------------------------------------------------- */ + + #include + #include + + #include + + #define NGREGARG 8 + #define NFREGARG 12 + + /* If the structure has essentialy an unique element, return its type. */ + static int + simple_type (ffi_type *arg) + { + if (arg->type != FFI_TYPE_STRUCT) + return arg->type; + else if (arg->elements[1]) + return FFI_TYPE_STRUCT; + + return simple_type (arg->elements[0]); + } + + static int + return_type (ffi_type *arg) + { + unsigned short type; + + if (arg->type != FFI_TYPE_STRUCT) + return arg->type; + + type = simple_type (arg->elements[0]); + if (! arg->elements[1]) + { + switch (type) + { + case FFI_TYPE_SINT8: + case FFI_TYPE_UINT8: + case FFI_TYPE_SINT16: + case FFI_TYPE_UINT16: + case FFI_TYPE_SINT32: + case FFI_TYPE_UINT32: + case FFI_TYPE_SINT64: + case FFI_TYPE_UINT64: + return FFI_TYPE_UINT64; + + default: + return type; + } + } + + /* gcc uses r2 if the result can be packed in on register. */ + if (arg->size <= sizeof (UINT64)) + return FFI_TYPE_UINT64; + + return FFI_TYPE_STRUCT; + } + + /* ffi_prep_args is called by the assembly routine once stack space + has been allocated for the function's arguments */ + + /*@-exportheader@*/ + void ffi_prep_args(char *stack, extended_cif *ecif) + /*@=exportheader@*/ + { + register unsigned int i; + register unsigned int avn; + register void **p_argv; + register char *argp; + register ffi_type **p_arg; + + argp = stack; + + if (return_type (ecif->cif->rtype) == FFI_TYPE_STRUCT) + { + *(void **) argp = ecif->rvalue; + argp += sizeof (UINT64); + } + + avn = ecif->cif->nargs; + p_argv = ecif->avalue; + + for (i = 0, p_arg = ecif->cif->arg_types; i < avn; i++, p_arg++, p_argv++) + { + size_t z; + + z = (*p_arg)->size; + if (z < sizeof (UINT32)) + { + switch ((*p_arg)->type) + { + case FFI_TYPE_SINT8: + *(SINT64 *) argp = (SINT64) *(SINT8 *)(*p_argv); + break; + + case FFI_TYPE_UINT8: + *(UINT64 *) argp = (UINT64) *(UINT8 *)(*p_argv); + break; + + case FFI_TYPE_SINT16: + *(SINT64 *) argp = (SINT64) *(SINT16 *)(*p_argv); + break; + + case FFI_TYPE_UINT16: + *(UINT64 *) argp = (UINT64) *(UINT16 *)(*p_argv); + break; + + case FFI_TYPE_STRUCT: + *(UINT64 *) argp = (UINT64) *(UINT32 *)(*p_argv); + break; + + default: + FFI_ASSERT(0); + } + argp += sizeof (UINT64); + } + else if (z == sizeof (UINT32)) + { + *(UINT64 *) argp = (UINT64) *(UINT32 *) (*p_argv); + argp += sizeof (UINT64); + } + else if (z == sizeof (UINT64)) + { + *(UINT64 *) argp = *(UINT64 *) (*p_argv); + argp += sizeof (UINT64); + } + else + { + int n = (z + sizeof (UINT64) - 1) / sizeof (UINT64); + + memcpy (argp, *p_argv, z); + argp += n * sizeof (UINT64); + } + } + + return; + } + + /* Perform machine dependent cif processing */ + ffi_status ffi_prep_cif_machdep(ffi_cif *cif) + { + int i, j; + int size, type; + int n, m; + int greg; + int freg; + + greg = (return_type (cif->rtype) == FFI_TYPE_STRUCT ? 1 : 0); + freg = 0; + cif->flags2 = 0; + + for (i = j = 0; i < cif->nargs; i++) + { + type = (cif->arg_types)[i]->type; + switch (type) + { + case FFI_TYPE_FLOAT: + greg++; + cif->bytes += sizeof (UINT64) - sizeof (float); + if (freg >= NFREGARG - 1) + continue; + freg++; + cif->flags2 += ((cif->arg_types)[i]->type) << (2 * j++); + break; + + case FFI_TYPE_DOUBLE: + if (greg++ >= NGREGARG && (freg + 1) >= NFREGARG) + continue; + if ((freg + 1) < NFREGARG) + { + freg = (freg + 1) & ~1; + freg += 2; + cif->flags2 += ((cif->arg_types)[i]->type) << (2 * j++); + } + else + cif->flags2 += FFI_TYPE_INT << (2 * j++); + break; + + default: + size = (cif->arg_types)[i]->size; + if (size < sizeof (UINT64)) + cif->bytes += sizeof (UINT64) - size; + n = (size + sizeof (UINT64) - 1) / sizeof (UINT64); + if (greg >= NGREGARG) + continue; + else if (greg + n - 1 >= NGREGARG) + greg = NGREGARG; + else + greg += n; + for (m = 0; m < n; m++) + cif->flags2 += FFI_TYPE_INT << (2 * j++); + break; + } + } + + /* Set the return type flag */ + switch (cif->rtype->type) + { + case FFI_TYPE_STRUCT: + cif->flags = return_type (cif->rtype); + break; + + case FFI_TYPE_VOID: + case FFI_TYPE_FLOAT: + case FFI_TYPE_DOUBLE: + case FFI_TYPE_SINT64: + case FFI_TYPE_UINT64: + cif->flags = cif->rtype->type; + break; + + default: + cif->flags = FFI_TYPE_INT; + break; + } + + return FFI_OK; + } + + /*@-declundef@*/ + /*@-exportheader@*/ + extern void ffi_call_SYSV(void (*)(char *, extended_cif *), + /*@out@*/ extended_cif *, + unsigned, unsigned, long long, + /*@out@*/ unsigned *, + void (*fn)()); + /*@=declundef@*/ + /*@=exportheader@*/ + + void ffi_call(/*@dependent@*/ ffi_cif *cif, + void (*fn)(), + /*@out@*/ void *rvalue, + /*@dependent@*/ void **avalue) + { + extended_cif ecif; + + ecif.cif = cif; + ecif.avalue = avalue; + + /* If the return value is a struct and we don't have a return */ + /* value address then we need to make one */ + + if ((rvalue == NULL) && + (cif->rtype->type == FFI_TYPE_STRUCT)) + { + /*@-sysunrecog@*/ + ecif.rvalue = alloca(cif->rtype->size); + /*@=sysunrecog@*/ + } + else + ecif.rvalue = rvalue; + + switch (cif->abi) + { + case FFI_SYSV: + /*@-usedef@*/ + ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, + cif->flags, cif->flags2, ecif.rvalue, fn); + /*@=usedef@*/ + break; + default: + FFI_ASSERT(0); + break; + } + } + + extern void ffi_closure_SYSV (void); + extern void __ic_invalidate (void *line); + + ffi_status + ffi_prep_closure (ffi_closure *closure, + ffi_cif *cif, + void (*fun)(ffi_cif*, void*, void**, void*), + void *user_data) + { + unsigned int *tramp; + + FFI_ASSERT (cif->abi == FFI_GCC_SYSV); + + tramp = (unsigned int *) &closure->tramp[0]; + /* Since ffi_closure is an aligned object, the ffi trampoline is + called as an SHcompact code. Sigh. + SHcompact part: + mova @(1,pc),r0; add #1,r0; jmp @r0; nop; + SHmedia part: + movi fnaddr >> 16,r1; shori fnaddr,r1; ptabs/l r1,tr0 + movi cxt >> 16,r1; shori cxt,r1; blink tr0,r63 */ + #ifdef __LITTLE_ENDIAN__ + tramp[0] = 0x7001c701; + tramp[1] = 0x0009402b; + #else + tramp[0] = 0xc7017001; + tramp[1] = 0x402b0009; + #endif + tramp[2] = 0xcc000010 | (((UINT32) ffi_closure_SYSV) >> 16) << 10; + tramp[3] = 0xc8000010 | (((UINT32) ffi_closure_SYSV) & 0xffff) << 10; + tramp[4] = 0x6bf10600; + tramp[5] = 0xcc000010 | (((UINT32) closure) >> 16) << 10; + tramp[6] = 0xc8000010 | (((UINT32) closure) & 0xffff) << 10; + tramp[7] = 0x4401fff0; + + closure->cif = cif; + closure->fun = fun; + closure->user_data = user_data; + + /* Flush the icache. */ + asm volatile ("ocbwb %0,0; synco; icbi %0,0; synci" : : "r" (tramp)); + + return FFI_OK; + } + + /* Basically the trampoline invokes ffi_closure_SYSV, and on + * entry, r3 holds the address of the closure. + * After storing the registers that could possibly contain + * parameters to be passed into the stack frame and setting + * up space for a return value, ffi_closure_SYSV invokes the + * following helper function to do most of the work. + */ + + int + ffi_closure_helper_SYSV (ffi_closure *closure, UINT64 *rvalue, + UINT64 *pgr, UINT64 *pfr, UINT64 *pst) + { + void **avalue; + ffi_type **p_arg; + int i, avn; + int greg, freg; + ffi_cif *cif; + + cif = closure->cif; + avalue = alloca (cif->nargs * sizeof (void *)); + + /* Copy the caller's structure return value address so that the closure + returns the data directly to the caller. */ + if (cif->rtype->type == FFI_TYPE_STRUCT) + { + rvalue = *pgr; + greg = 1; + } + else + greg = 0; + + freg = 0; + cif = closure->cif; + avn = cif->nargs; + + /* Grab the addresses of the arguments from the stack frame. */ + for (i = 0, p_arg = cif->arg_types; i < avn; i++, p_arg++) + { + size_t z; + void *p; + + z = (*p_arg)->size; + if (z < sizeof (UINT32)) + { + p = pgr + greg++; + + switch ((*p_arg)->type) + { + case FFI_TYPE_SINT8: + case FFI_TYPE_UINT8: + case FFI_TYPE_SINT16: + case FFI_TYPE_UINT16: + case FFI_TYPE_STRUCT: + #ifdef __LITTLE_ENDIAN__ + avalue[i] = p; + #else + avalue[i] = ((char *) p) + sizeof (UINT32) - z; + #endif + break; + + default: + FFI_ASSERT(0); + } + } + else if (z == sizeof (UINT32)) + { + if ((*p_arg)->type == FFI_TYPE_FLOAT) + { + if (freg < NFREGARG - 1) + #ifdef __LITTLE_ENDIAN__ + avalue[i] = (UINT32 *) pfr + (1 ^ freg++); + #else + avalue[i] = (UINT32 *) pfr + freg++; + #endif + else + #ifdef __LITTLE_ENDIAN__ + avalue[i] = pgr + greg; + #else + avalue[i] = (UINT32 *) (pgr + greg) + 1; + #endif + } + else + #ifdef __LITTLE_ENDIAN__ + avalue[i] = pgr + greg; + #else + avalue[i] = (UINT32 *) (pgr + greg) + 1; + #endif + greg++; + } + else if ((*p_arg)->type == FFI_TYPE_DOUBLE) + { + if (freg + 1 >= NFREGARG) + avalue[i] = pgr + greg; + else + { + freg = (freg + 1) & ~1; + avalue[i] = pfr + (freg >> 1); + freg += 2; + } + greg++; + } + else + { + int n = (z + sizeof (UINT64) - 1) / sizeof (UINT64); + + avalue[i] = pgr + greg; + greg += n; + } + } + + (closure->fun) (cif, rvalue, avalue, closure->user_data); + + /* Tell ffi_closure_SYSV how to perform return type promotions. */ + return cif->rtype->type; + } + diff -Nrc3pad gcc-3.3.3/libffi/src/sh64/ffitarget.h gcc-3.4.0/libffi/src/sh64/ffitarget.h *** gcc-3.3.3/libffi/src/sh64/ffitarget.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/src/sh64/ffitarget.h 2003-10-21 19:07:51.000000000 +0000 *************** *** 0 **** --- 1,52 ---- + /* -----------------------------------------------------------------*-C-*- + ffitarget.h - Copyright (c) 1996-2003 Red Hat, Inc. + Target configuration macros for SuperH - SHmedia. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + ``Software''), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + ----------------------------------------------------------------------- */ + + #ifndef LIBFFI_TARGET_H + #define LIBFFI_TARGET_H + + /* ---- Generic type definitions ----------------------------------------- */ + + #ifndef LIBFFI_ASM + typedef unsigned long ffi_arg; + typedef signed long ffi_sarg; + + typedef enum ffi_abi { + FFI_FIRST_ABI = 0, + FFI_SYSV, + FFI_DEFAULT_ABI = FFI_SYSV, + FFI_LAST_ABI = FFI_DEFAULT_ABI + 1 + } ffi_abi; + + #define FFI_EXTRA_CIF_FIELDS long long flags2 + #endif + + /* ---- Definitions for closures ----------------------------------------- */ + + #define FFI_CLOSURES 1 + #define FFI_TRAMPOLINE_SIZE 32 + #define FFI_NATIVE_RAW_API 0 + + #endif + diff -Nrc3pad gcc-3.3.3/libffi/src/sh64/sysv.S gcc-3.4.0/libffi/src/sh64/sysv.S *** gcc-3.3.3/libffi/src/sh64/sysv.S 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/src/sh64/sysv.S 2003-10-21 19:01:58.000000000 +0000 *************** *** 0 **** --- 1,484 ---- + /* ----------------------------------------------------------------------- + sysv.S - Copyright (c) 2003 Kaz Kojima + + SuperH SHmedia Foreign Function Interface + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + ``Software''), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + ----------------------------------------------------------------------- */ + + #define LIBFFI_ASM + #include + #include + #ifdef HAVE_MACHINE_ASM_H + #include + #else + /* XXX these lose for some platforms, I'm sure. */ + #define CNAME(x) x + #define ENTRY(x) .globl CNAME(x); .type CNAME(x),%function; CNAME(x): + #endif + + #ifdef __LITTLE_ENDIAN__ + #define OFS_FLT 0 + #else + #define OFS_FLT 4 + #endif + + .section .text..SHmedia32,"ax" + + # r2: ffi_prep_args + # r3: &ecif + # r4: bytes + # r5: flags + # r6: flags2 + # r7: rvalue + # r8: fn + + # This assumes we are using gas. + .align 5 + ENTRY(ffi_call_SYSV) + # Save registers + .LFB1: + addi.l r15, -48, r15 + .LCFI0: + st.q r15, 40, r32 + st.q r15, 32, r31 + st.q r15, 24, r30 + st.q r15, 16, r29 + st.q r15, 8, r28 + st.l r15, 4, r18 + st.l r15, 0, r14 + add.l r15, r63, r14 + .LCFI1: + # add r4, r63, r28 + add r5, r63, r29 + add r6, r63, r30 + add r7, r63, r31 + add r8, r63, r32 + + addi r4, (64 + 7), r4 + andi r4, ~7, r4 + sub.l r15, r4, r15 + + ptabs/l r2, tr0 + add r15, r63, r2 + blink tr0, r18 + + addi r15, 64, r22 + movi 0, r0 + movi 0, r1 + + pt/l 1f, tr1 + bnei/l r29, FFI_TYPE_STRUCT, tr1 + ld.l r15, 0, r19 + addi r15, 8, r15 + addi r0, 1, r0 + 1: + + .L_pass: + andi r30, 3, r20 + shlri r30, 2, r30 + + pt/l .L_call_it, tr0 + pt/l .L_pass_i, tr1 + pt/l .L_pass_f, tr2 + + beqi/l r20, FFI_TYPE_VOID, tr0 + beqi/l r20, FFI_TYPE_INT, tr1 + beqi/l r20, FFI_TYPE_FLOAT, tr2 + + .L_pass_d: + addi r0, 1, r0 + addi r1, 1, r1 + andi r1, ~1, r1 + + pt/l 3f, tr0 + movi 12, r20 + bge/l r1, r20, tr0 + + pt/l .L_pop_d, tr1 + pt/l 2f, tr0 + blink tr1, r63 + 2: + addi.l r15, 8, r15 + 3: + pt/l .L_pass, tr0 + addi r1, 2, r1 + blink tr0, r63 + + .L_pop_d: + pt/l .L_pop_d_tbl, tr1 + gettr tr1, r20 + shlli r1, 2, r21 + add r20, r21, r20 + ptabs/l r20, tr1 + blink tr1, r63 + + .L_pop_d_tbl: + fld.d r15, 0, dr0 + blink tr0, r63 + fld.d r15, 0, dr2 + blink tr0, r63 + fld.d r15, 0, dr4 + blink tr0, r63 + fld.d r15, 0, dr6 + blink tr0, r63 + fld.d r15, 0, dr8 + blink tr0, r63 + fld.d r15, 0, dr10 + blink tr0, r63 + + .L_pass_f: + addi r0, 1, r0 + pt/l 3f, tr0 + movi 12, r20 + bge/l r1, r20, tr0 + + pt/l .L_pop_f, tr1 + pt/l 2f, tr0 + blink tr1, r63 + 2: + addi.l r15, 8, r15 + 3: + pt/l .L_pass, tr0 + addi r1, 1, r1 + blink tr0, r63 + + .L_pop_f: + pt/l .L_pop_f_tbl, tr1 + gettr tr1, r20 + shlli r1, 3, r21 + add r20, r21, r20 + ptabs/l r20, tr1 + blink tr1, r63 + + .L_pop_f_tbl: + fld.s r15, OFS_FLT, fr0 + blink tr0, r63 + fld.s r15, OFS_FLT, fr1 + blink tr0, r63 + fld.s r15, OFS_FLT, fr2 + blink tr0, r63 + fld.s r15, OFS_FLT, fr3 + blink tr0, r63 + fld.s r15, OFS_FLT, fr4 + blink tr0, r63 + fld.s r15, OFS_FLT, fr5 + blink tr0, r63 + fld.s r15, OFS_FLT, fr6 + blink tr0, r63 + fld.s r15, OFS_FLT, fr7 + blink tr0, r63 + fld.s r15, OFS_FLT, fr8 + blink tr0, r63 + fld.s r15, OFS_FLT, fr9 + blink tr0, r63 + fld.s r15, OFS_FLT, fr10 + blink tr0, r63 + fld.s r15, OFS_FLT, fr11 + blink tr0, r63 + + .L_pass_i: + pt/l 3f, tr0 + movi 8, r20 + bge/l r0, r20, tr0 + + pt/l .L_pop_i, tr1 + pt/l 2f, tr0 + blink tr1, r63 + 2: + addi.l r15, 8, r15 + 3: + pt/l .L_pass, tr0 + addi r0, 1, r0 + blink tr0, r63 + + .L_pop_i: + pt/l .L_pop_i_tbl, tr1 + gettr tr1, r20 + shlli r0, 3, r21 + add r20, r21, r20 + ptabs/l r20, tr1 + blink tr1, r63 + + .L_pop_i_tbl: + ld.q r15, 0, r2 + blink tr0, r63 + ld.q r15, 0, r3 + blink tr0, r63 + ld.q r15, 0, r4 + blink tr0, r63 + ld.q r15, 0, r5 + blink tr0, r63 + ld.q r15, 0, r6 + blink tr0, r63 + ld.q r15, 0, r7 + blink tr0, r63 + ld.q r15, 0, r8 + blink tr0, r63 + ld.q r15, 0, r9 + blink tr0, r63 + + .L_call_it: + # call function + pt/l 1f, tr1 + bnei/l r29, FFI_TYPE_STRUCT, tr1 + add r19, r63, r2 + 1: + add r22, r63, r15 + ptabs/l r32, tr0 + blink tr0, r18 + + pt/l .L_ret_i, tr0 + pt/l .L_ret_ll, tr1 + pt/l .L_ret_d, tr2 + pt/l .L_ret_f, tr3 + pt/l .L_epilogue, tr4 + + beqi/l r29, FFI_TYPE_INT, tr0 + beqi/l r29, FFI_TYPE_SINT64, tr1 + beqi/l r29, FFI_TYPE_UINT64, tr1 + beqi/l r29, FFI_TYPE_DOUBLE, tr2 + beqi/l r29, FFI_TYPE_FLOAT, tr3 + blink tr4, r63 + + .L_ret_d: + fst.d r31, 0, dr0 + blink tr4, r63 + + .L_ret_ll: + st.q r31, 0, r2 + blink tr4, r63 + + .L_ret_f: + fst.s r31, OFS_FLT, fr0 + blink tr4, r63 + + .L_ret_i: + st.l r31, 0, r2 + # Fall + + .L_epilogue: + # Remove the space we pushed for the args + add r14, r63, r15 + + ld.l r15, 0, r14 + ld.l r15, 4, r18 + ld.q r15, 8, r28 + ld.q r15, 16, r29 + ld.q r15, 24, r30 + ld.q r15, 32, r31 + ld.q r15, 40, r32 + addi.l r15, 48, r15 + ptabs r18, tr0 + blink tr0, r63 + + .LFE1: + .ffi_call_SYSV_end: + .size CNAME(ffi_call_SYSV),.ffi_call_SYSV_end-CNAME(ffi_call_SYSV) + + .align 5 + ENTRY(ffi_closure_SYSV) + .LFB2: + addi.l r15, -136, r15 + .LCFI2: + st.l r15, 12, r18 + st.l r15, 8, r14 + st.l r15, 4, r12 + add r15, r63, r14 + .LCFI3: + /* Stack layout: + ... + 64 bytes (register parameters) + 48 bytes (floating register parameters) + 8 bytes (result) + 4 bytes (r18) + 4 bytes (r14) + 4 bytes (r12) + 4 bytes (for align) + <- new stack pointer + */ + fst.d r14, 24, dr0 + fst.d r14, 32, dr2 + fst.d r14, 40, dr4 + fst.d r14, 48, dr6 + fst.d r14, 56, dr8 + fst.d r14, 64, dr10 + st.q r14, 72, r2 + st.q r14, 80, r3 + st.q r14, 88, r4 + st.q r14, 96, r5 + st.q r14, 104, r6 + st.q r14, 112, r7 + st.q r14, 120, r8 + st.q r14, 128, r9 + + add r1, r63, r2 + addi r14, 16, r3 + addi r14, 72, r4 + addi r14, 24, r5 + addi r14, 136, r6 + #ifdef PIC + movi (((datalabel _GLOBAL_OFFSET_TABLE_-(.LPCS0-.)) >> 16) & 65535), r12 + shori ((datalabel _GLOBAL_OFFSET_TABLE_-(.LPCS0-.)) & 65535), r12 + .LPCS0: ptrel/u r12, tr0 + movi ((ffi_closure_helper_SYSV@GOTPLT) & 65535), r1 + gettr tr0, r12 + ldx.l r1, r12, r1 + ptabs r1, tr0 + #else + pt/l ffi_closure_helper_SYSV, tr0 + #endif + blink tr0, r18 + + shlli r2, 1, r1 + movi (((datalabel .L_table) >> 16) & 65535), r2 + shori ((datalabel .L_table) & 65535), r2 + ldx.w r2, r1, r1 + add r1, r2, r1 + pt/l .L_case_v, tr1 + ptabs r1, tr0 + blink tr0, r63 + + .align 2 + .L_table: + .word .L_case_v - datalabel .L_table /* FFI_TYPE_VOID */ + .word .L_case_i - datalabel .L_table /* FFI_TYPE_INT */ + .word .L_case_f - datalabel .L_table /* FFI_TYPE_FLOAT */ + .word .L_case_d - datalabel .L_table /* FFI_TYPE_DOUBLE */ + .word .L_case_d - datalabel .L_table /* FFI_TYPE_LONGDOUBLE */ + .word .L_case_uq - datalabel .L_table /* FFI_TYPE_UINT8 */ + .word .L_case_q - datalabel .L_table /* FFI_TYPE_SINT8 */ + .word .L_case_uh - datalabel .L_table /* FFI_TYPE_UINT16 */ + .word .L_case_h - datalabel .L_table /* FFI_TYPE_SINT16 */ + .word .L_case_i - datalabel .L_table /* FFI_TYPE_UINT32 */ + .word .L_case_i - datalabel .L_table /* FFI_TYPE_SINT32 */ + .word .L_case_ll - datalabel .L_table /* FFI_TYPE_UINT64 */ + .word .L_case_ll - datalabel .L_table /* FFI_TYPE_SINT64 */ + .word .L_case_v - datalabel .L_table /* FFI_TYPE_STRUCT */ + .word .L_case_i - datalabel .L_table /* FFI_TYPE_POINTER */ + + .align 2 + .L_case_d: + fld.d r14, 16, dr0 + blink tr1, r63 + .L_case_f: + fld.s r14, 16, fr0 + blink tr1, r63 + .L_case_ll: + ld.q r14, 16, r2 + blink tr1, r63 + .L_case_i: + ld.l r14, 16, r2 + blink tr1, r63 + .L_case_q: + ld.b r14, 16, r2 + blink tr1, r63 + .L_case_uq: + ld.ub r14, 16, r2 + blink tr1, r63 + .L_case_h: + ld.w r14, 16, r2 + blink tr1, r63 + .L_case_uh: + ld.uw r14, 16, r2 + blink tr1, r63 + .L_case_v: + add.l r14, r63, r15 + ld.l r15, 4, r12 + ld.l r15, 8, r14 + ld.l r15, 12, r18 + addi.l r15, 136, r15 + ptabs r18, tr0 + blink tr0, r63 + + .LFE2: + .ffi_closure_SYSV_end: + .size CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV) + + .section ".eh_frame","aw",@progbits + __FRAME_BEGIN__: + .4byte .LECIE1-.LSCIE1 /* Length of Common Information Entry */ + .LSCIE1: + .4byte 0x0 /* CIE Identifier Tag */ + .byte 0x1 /* CIE Version */ + .ascii "zR\0" /* CIE Augmentation */ + .uleb128 0x1 /* CIE Code Alignment Factor */ + .sleb128 -4 /* CIE Data Alignment Factor */ + .byte 0x12 /* CIE RA Column */ + .uleb128 0x1 /* Augmentation size */ + .byte 0x1b /* FDE Encoding (pcrel sdata4) */ + .byte 0xc /* DW_CFA_def_cfa */ + .uleb128 0xf + .uleb128 0x0 + .align 2 + .LECIE1: + .LSFDE1: + .4byte datalabel .LEFDE1-datalabel .LASFDE1 /* FDE Length */ + .LASFDE1: + .4byte datalabel .LASFDE1-datalabel __FRAME_BEGIN__ + .4byte datalabel .LFB1-. /* FDE initial location */ + .4byte datalabel .LFE1-datalabel .LFB1 /* FDE address range */ + .byte 0x4 /* DW_CFA_advance_loc4 */ + .4byte datalabel .LCFI0-datalabel .LFB1 + .byte 0xe /* DW_CFA_def_cfa_offset */ + .uleb128 0x30 + .byte 0x4 /* DW_CFA_advance_loc4 */ + .4byte datalabel .LCFI1-datalabel .LCFI0 + .byte 0x8e /* DW_CFA_offset, column 0xe */ + .uleb128 0xc + .byte 0x92 /* DW_CFA_offset, column 0x12 */ + .uleb128 0xb + .byte 0x9c /* DW_CFA_offset, column 0x1c */ + .uleb128 0xa + .byte 0x9d /* DW_CFA_offset, column 0x1d */ + .uleb128 0x8 + .byte 0x9e /* DW_CFA_offset, column 0x1e */ + .uleb128 0x6 + .byte 0x9f /* DW_CFA_offset, column 0x1f */ + .uleb128 0x4 + .byte 0xa0 /* DW_CFA_offset, column 0x20 */ + .uleb128 0x2 + .byte 0xd /* DW_CFA_def_cfa_register */ + .uleb128 0xe + .align 2 + .LEFDE1: + + .LSFDE3: + .4byte datalabel .LEFDE3-datalabel .LASFDE3 /* FDE Length */ + .LASFDE3: + .4byte datalabel .LASFDE3-datalabel __FRAME_BEGIN__ + .4byte datalabel .LFB2-. /* FDE initial location */ + .4byte datalabel .LFE2-datalabel .LFB2 /* FDE address range */ + .byte 0x4 /* DW_CFA_advance_loc4 */ + .4byte datalabel .LCFI2-datalabel .LFB2 + .byte 0xe /* DW_CFA_def_cfa_offset */ + .uleb128 0x88 + .byte 0x4 /* DW_CFA_advance_loc4 */ + .4byte datalabel .LCFI3-datalabel .LCFI2 + .byte 0x8c /* DW_CFA_offset, column 0xc */ + .uleb128 0x21 + .byte 0x8e /* DW_CFA_offset, column 0xe */ + .uleb128 0x20 + .byte 0x92 /* DW_CFA_offset, column 0x12 */ + .uleb128 0x1f + .byte 0xd /* DW_CFA_def_cfa_register */ + .uleb128 0xe + .align 2 + .LEFDE3: diff -Nrc3pad gcc-3.3.3/libffi/src/sparc/ffi.c gcc-3.4.0/libffi/src/sparc/ffi.c *** gcc-3.3.3/libffi/src/sparc/ffi.c 2003-01-04 03:13:28.000000000 +0000 --- gcc-3.4.0/libffi/src/sparc/ffi.c 2004-01-25 07:01:06.000000000 +0000 *************** *** 1,7 **** /* ----------------------------------------------------------------------- ! ffi.c - Copyright (c) 1996, 2003 Cygnus Solutions ! Sparc Foreign Function Interface Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the --- 1,7 ---- /* ----------------------------------------------------------------------- ! ffi.c - Copyright (c) 1996, 2003, 2004 Red Hat, Inc. ! SPARC Foreign Function Interface Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the *************** *** 28,38 **** #include - #ifdef SPARC64 - extern void ffi_closure_v9(void); - #else - extern void ffi_closure_v8(void); - #endif /* ffi_prep_args is called by the assembly routine once stack space has been allocated for the function's arguments */ --- 28,33 ---- *************** int ffi_prep_args_v9(char *stack, extend *** 154,159 **** --- 149,155 ---- ecif->cif->rtype->size > 32) { *(unsigned long long *) argp = (unsigned long)ecif->rvalue; + argp += sizeof(long long); tmp = 1; } *************** ffi_status ffi_prep_cif_machdep(ffi_cif *** 326,332 **** return FFI_OK; } ! int ffi_V9_return_struct(ffi_type *arg, int off, char *ret, char *intg, char *flt) { ffi_type **ptr = &arg->elements[0]; --- 322,328 ---- return FFI_OK; } ! int ffi_v9_layout_struct(ffi_type *arg, int off, char *ret, char *intg, char *flt) { ffi_type **ptr = &arg->elements[0]; *************** int ffi_V9_return_struct(ffi_type *arg, *** 338,355 **** switch ((*ptr)->type) { case FFI_TYPE_STRUCT: ! off = ffi_V9_return_struct(*ptr, off, ret, intg, flt); break; case FFI_TYPE_FLOAT: case FFI_TYPE_DOUBLE: #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE case FFI_TYPE_LONGDOUBLE: #endif ! memcpy(ret + off, flt + off, (*ptr)->size); off += (*ptr)->size; break; default: ! memcpy(ret + off, intg + off, (*ptr)->size); off += (*ptr)->size; break; } --- 334,352 ---- switch ((*ptr)->type) { case FFI_TYPE_STRUCT: ! off = ffi_v9_layout_struct(*ptr, off, ret, intg, flt); ! off = ALIGN(off, FFI_SIZEOF_ARG); break; case FFI_TYPE_FLOAT: case FFI_TYPE_DOUBLE: #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE case FFI_TYPE_LONGDOUBLE: #endif ! memmove(ret + off, flt + off, (*ptr)->size); off += (*ptr)->size; break; default: ! memmove(ret + off, intg + off, (*ptr)->size); off += (*ptr)->size; break; } *************** int ffi_V9_return_struct(ffi_type *arg, *** 358,367 **** return off; } ! extern int ffi_call_V8(void *, extended_cif *, unsigned, unsigned, unsigned *, void (*fn)()); ! extern int ffi_call_V9(void *, extended_cif *, unsigned, unsigned, unsigned *, void (*fn)()); void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue) { --- 355,368 ---- return off; } ! ! #ifdef SPARC64 ! extern int ffi_call_v9(void *, extended_cif *, unsigned, unsigned, unsigned *, void (*fn)()); ! #else ! extern int ffi_call_v8(void *, extended_cif *, unsigned, unsigned, unsigned *, void (*fn)()); + #endif void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue) { *************** void ffi_call(ffi_cif *cif, void (*fn)() *** 394,409 **** /* We don't yet support calling 32bit code from 64bit */ FFI_ASSERT(0); #else ! ffi_call_V8(ffi_prep_args_v8, &ecif, cif->bytes, cif->flags, rvalue, fn); #endif break; case FFI_V9: #ifdef SPARC64 ! ffi_call_V9(ffi_prep_args_v9, &ecif, cif->bytes, cif->flags, rval, fn); if (rvalue && rval && cif->rtype->type == FFI_TYPE_STRUCT) ! ffi_V9_return_struct(cif->rtype, 0, (char *)rvalue, (char *)rval, ((char *)rval)+32); #else /* And vice versa */ FFI_ASSERT(0); --- 395,410 ---- /* We don't yet support calling 32bit code from 64bit */ FFI_ASSERT(0); #else ! ffi_call_v8(ffi_prep_args_v8, &ecif, cif->bytes, cif->flags, rvalue, fn); #endif break; case FFI_V9: #ifdef SPARC64 ! ffi_call_v9(ffi_prep_args_v9, &ecif, cif->bytes, cif->flags, rval, fn); if (rvalue && rval && cif->rtype->type == FFI_TYPE_STRUCT) ! ffi_v9_layout_struct(cif->rtype, 0, (char *)rvalue, (char *)rval, ((char *)rval)+32); #else /* And vice versa */ FFI_ASSERT(0); *************** void ffi_call(ffi_cif *cif, void (*fn)() *** 416,421 **** --- 417,429 ---- } + + #ifdef SPARC64 + extern void ffi_closure_v9(void); + #else + extern void ffi_closure_v8(void); + #endif + ffi_status ffi_prep_closure (ffi_closure* closure, ffi_cif* cif, *************** ffi_prep_closure (ffi_closure* closure, *** 424,431 **** { unsigned int *tramp = (unsigned int *) &closure->tramp[0]; unsigned long fn; - unsigned long ctx = (unsigned long) closure; - #ifdef SPARC64 /* Trampoline address is equal to the closure address. We take advantage of that to reduce the trampoline size by 8 bytes. */ --- 432,437 ---- *************** ffi_prep_closure (ffi_closure* closure, *** 437,442 **** --- 443,449 ---- tramp[3] = 0x01000000; /* nop */ *((unsigned long *) &tramp[4]) = fn; #else + unsigned long ctx = (unsigned long) closure; FFI_ASSERT (cif->abi == FFI_V8); fn = (unsigned long) ffi_closure_v8; tramp[0] = 0x03000000 | fn >> 10; /* sethi %hi(fn), %g1 */ *************** ffi_prep_closure (ffi_closure* closure, *** 462,510 **** } int ! ffi_closure_sparc_inner(ffi_closure *closure, ! void *rvalue, unsigned long *gpr, double *fpr) { ffi_cif *cif; - void **avalue; ffi_type **arg_types; ! int i, avn, argn; cif = closure->cif; avalue = alloca(cif->nargs * sizeof(void *)); ! argn = 0; ! /* Copy the caller's structure return address to that the closure returns the data directly to the caller. */ ! if (cif->flags == FFI_TYPE_STRUCT) { rvalue = (void *) gpr[0]; argn = 1; } - i = 0; - avn = cif->nargs; - arg_types = cif->arg_types; - /* Grab the addresses of the arguments from the stack frame. */ ! while (i < avn) { ! /* Assume big-endian. FIXME */ ! argn += ALIGN(arg_types[i]->size, SIZEOF_ARG) / SIZEOF_ARG; ! #ifdef SPARC64 ! if (i < 6 && (arg_types[i]->type == FFI_TYPE_FLOAT ! || arg_types[i]->type == FFI_TYPE_DOUBLE #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE ! || arg_types[i]->type == FFI_TYPE_LONGDOUBLE ! #endif ! )) ! avalue[i] = ((char *) &fpr[argn]) - arg_types[i]->size; ! else #endif ! avalue[i] = ((char *) &gpr[argn]) - arg_types[i]->size; ! i++; } /* Invoke the closure. */ --- 469,590 ---- } int ! ffi_closure_sparc_inner_v8(ffi_closure *closure, ! void *rvalue, unsigned long *gpr) { ffi_cif *cif; ffi_type **arg_types; ! void **avalue; ! int i, argn; cif = closure->cif; + arg_types = cif->arg_types; avalue = alloca(cif->nargs * sizeof(void *)); ! /* Copy the caller's structure return address so that the closure ! returns the data directly to the caller. */ ! if (cif->flags == FFI_TYPE_STRUCT ! #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE ! || cif->flags == FFI_TYPE_LONGDOUBLE ! #endif ! ) ! rvalue = (void *) gpr[0]; ! /* Always skip the structure return address. */ ! argn = 1; ! ! /* Grab the addresses of the arguments from the stack frame. */ ! for (i = 0; i < cif->nargs; i++) ! { ! if (arg_types[i]->type == FFI_TYPE_STRUCT ! #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE ! || arg_types[i]->type == FFI_TYPE_LONGDOUBLE ! #endif ! ) ! { ! /* Straight copy of invisible reference. */ ! avalue[i] = (void *)gpr[argn++]; ! } ! else ! { ! /* Always right-justify. */ ! argn += ALIGN(arg_types[i]->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG; ! avalue[i] = ((char *) &gpr[argn]) - arg_types[i]->size; ! } ! } ! ! /* Invoke the closure. */ ! (closure->fun) (cif, rvalue, avalue, closure->user_data); ! ! /* Tell ffi_closure_sparc how to perform return type promotions. */ ! return cif->rtype->type; ! } ! ! int ! ffi_closure_sparc_inner_v9(ffi_closure *closure, ! void *rvalue, unsigned long *gpr, double *fpr) ! { ! ffi_cif *cif; ! ffi_type **arg_types; ! void **avalue; ! int i, argn, fp_slot_max; ! ! cif = closure->cif; ! arg_types = cif->arg_types; ! avalue = alloca(cif->nargs * sizeof(void *)); ! ! /* Copy the caller's structure return address so that the closure returns the data directly to the caller. */ ! if (cif->flags == FFI_TYPE_VOID ! && cif->rtype->type == FFI_TYPE_STRUCT) { rvalue = (void *) gpr[0]; + /* Skip the structure return address. */ argn = 1; } + else + argn = 0; + + fp_slot_max = 16 - argn; /* Grab the addresses of the arguments from the stack frame. */ ! for (i = 0; i < cif->nargs; i++) { ! if (arg_types[i]->type == FFI_TYPE_STRUCT) ! { ! if (arg_types[i]->size > 16) ! { ! /* Straight copy of invisible reference. */ ! avalue[i] = (void *)gpr[argn++]; ! } ! else ! { ! /* Left-justify. */ ! ffi_v9_layout_struct(arg_types[i], ! 0, ! (char *) &gpr[argn], ! (char *) &gpr[argn], ! (char *) &fpr[argn]); ! avalue[i] = &gpr[argn]; ! argn += ALIGN(arg_types[i]->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG; ! } ! } ! else ! { ! /* Right-justify. */ ! argn += ALIGN(arg_types[i]->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG; ! if (i < fp_slot_max ! && (arg_types[i]->type == FFI_TYPE_FLOAT ! || arg_types[i]->type == FFI_TYPE_DOUBLE #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE ! || arg_types[i]->type == FFI_TYPE_LONGDOUBLE #endif ! )) ! avalue[i] = ((char *) &fpr[argn]) - arg_types[i]->size; ! else ! avalue[i] = ((char *) &gpr[argn]) - arg_types[i]->size; ! } } /* Invoke the closure. */ diff -Nrc3pad gcc-3.3.3/libffi/src/sparc/ffitarget.h gcc-3.4.0/libffi/src/sparc/ffitarget.h *** gcc-3.3.3/libffi/src/sparc/ffitarget.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/src/sparc/ffitarget.h 2003-10-21 19:07:52.000000000 +0000 *************** *** 0 **** --- 1,65 ---- + /* -----------------------------------------------------------------*-C-*- + ffitarget.h - Copyright (c) 1996-2003 Red Hat, Inc. + Target configuration macros for SPARC. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + ``Software''), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + ----------------------------------------------------------------------- */ + + #ifndef LIBFFI_TARGET_H + #define LIBFFI_TARGET_H + + /* ---- System specific configurations ----------------------------------- */ + + #if defined(__arch64__) || defined(__sparcv9) + #define SPARC64 + #endif + + #ifndef LIBFFI_ASM + typedef unsigned long ffi_arg; + typedef signed long ffi_sarg; + + typedef enum ffi_abi { + FFI_FIRST_ABI = 0, + FFI_V8, + FFI_V8PLUS, + FFI_V9, + #ifdef SPARC64 + FFI_DEFAULT_ABI = FFI_V9, + #else + FFI_DEFAULT_ABI = FFI_V8, + #endif + FFI_LAST_ABI = FFI_DEFAULT_ABI + 1 + } ffi_abi; + #endif + + /* ---- Definitions for closures ----------------------------------------- */ + + #define FFI_CLOSURES 1 + #define FFI_NATIVE_RAW_API 0 + + #ifdef SPARC64 + #define FFI_TRAMPOLINE_SIZE 24 + #else + #define FFI_TRAMPOLINE_SIZE 16 + #endif + + #endif + diff -Nrc3pad gcc-3.3.3/libffi/src/sparc/v8.S gcc-3.4.0/libffi/src/sparc/v8.S *** gcc-3.3.3/libffi/src/sparc/v8.S 2003-05-08 20:37:57.000000000 +0000 --- gcc-3.4.0/libffi/src/sparc/v8.S 2004-01-25 07:01:06.000000000 +0000 *************** *** 1,7 **** /* ----------------------------------------------------------------------- ! v8.S - Copyright (c) 1996, 1997, 2003 Cygnus Solutions ! Sparc Foreign Function Interface Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the --- 1,7 ---- /* ----------------------------------------------------------------------- ! v8.S - Copyright (c) 1996, 1997, 2003, 2004 Red Hat, Inc. ! SPARC Foreign Function Interface Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the *************** *** 24,29 **** --- 24,30 ---- ----------------------------------------------------------------------- */ #define LIBFFI_ASM + #include #include #define STACKFRAME 96 /* Minimum stack framesize for SPARC */ *************** *** 31,41 **** .text .align 8 ! .globl ffi_call_V8 ! .globl _ffi_call_V8 ! ffi_call_V8: ! _ffi_call_V8: .LLFB1: save %sp, -STACKFRAME, %sp .LLCFI0: --- 32,42 ---- .text .align 8 ! .globl ffi_call_v8 ! .globl _ffi_call_v8 ! ffi_call_v8: ! _ffi_call_v8: .LLFB1: save %sp, -STACKFRAME, %sp .LLCFI0: *************** longlong: *** 91,100 **** restore .LLFE1: ! .ffi_call_V8_end: ! .size ffi_call_V8,.ffi_call_V8_end-ffi_call_V8 #define STACKFRAME 104 /* 16*4 register window + 1*4 struct return + 6*4 args backing store + --- 92,102 ---- restore .LLFE1: ! .ffi_call_v8_end: ! .size ffi_call_v8,.ffi_call_v8_end-ffi_call_v8 + #undef STACKFRAME #define STACKFRAME 104 /* 16*4 register window + 1*4 struct return + 6*4 args backing store + *************** ffi_closure_v8: *** 127,140 **** ! Call ffi_closure_sparc_inner to do the bulk of the work. mov %g2, %o0 add %fp, -8, %o1 ! add %fp, 68, %o2 ! call ffi_closure_sparc_inner ! mov 0, %o3 ! Load up the return value in the proper type. cmp %o0, FFI_TYPE_VOID be done1 cmp %o0, FFI_TYPE_FLOAT be,a done1 ld [%fp-8], %f0 --- 129,145 ---- ! Call ffi_closure_sparc_inner to do the bulk of the work. mov %g2, %o0 add %fp, -8, %o1 ! call ffi_closure_sparc_inner_v8 ! add %fp, 64, %o2 ! Load up the return value in the proper type. + ! See ffi_prep_cif_machdep for the list of cases. cmp %o0, FFI_TYPE_VOID be done1 + cmp %o0, FFI_TYPE_INT + be integer + cmp %o0, FFI_TYPE_FLOAT be,a done1 ld [%fp-8], %f0 *************** ffi_closure_v8: *** 143,161 **** be,a done1 ldd [%fp-8], %f0 ! cmp %o0, FFI_TYPE_SINT64 ! be,a integer ! ld [%fp-4], %i1 ! cmp %o0, FFI_TYPE_UINT64 ! be,a integer ! ld [%fp-4], %i1 integer: ld [%fp-8], %i0 done1: ! ret restore .LLFE2: --- 148,173 ---- be,a done1 ldd [%fp-8], %f0 ! #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE ! cmp %o0, FFI_TYPE_LONGDOUBLE ! be done2 ! #endif ! cmp %o0, FFI_TYPE_STRUCT ! be done2 ! ! ! FFI_TYPE_SINT64 ! ld [%fp-4], %i1 integer: ld [%fp-8], %i0 done1: ! jmp %i7+8 ! restore ! done2: ! ! Skip 'unimp'. ! jmp %i7+12 restore .LLFE2: *************** done1: *** 172,178 **** --- 184,194 ---- #define uanword uaword #endif + #ifdef HAVE_RO_EH_FRAME + .section ".eh_frame",#alloc + #else .section ".eh_frame",#alloc,#write + #endif .LLframe1: .uaword .LLECIE1-.LLSCIE1 ! Length of Common Information Entry .LLSCIE1: diff -Nrc3pad gcc-3.3.3/libffi/src/sparc/v9.S gcc-3.4.0/libffi/src/sparc/v9.S *** gcc-3.3.3/libffi/src/sparc/v9.S 2003-01-04 03:13:28.000000000 +0000 --- gcc-3.4.0/libffi/src/sparc/v9.S 2004-01-25 07:01:06.000000000 +0000 *************** *** 1,7 **** /* ----------------------------------------------------------------------- ! v9.S - Copyright (c) 2000, 2003 Cygnus Solutions ! Sparc 64bit Foreign Function Interface Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the --- 1,7 ---- /* ----------------------------------------------------------------------- ! v9.S - Copyright (c) 2000, 2003, 2004 Red Hat, Inc. ! SPARC 64-bit Foreign Function Interface Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the *************** *** 24,29 **** --- 24,30 ---- ----------------------------------------------------------------------- */ #define LIBFFI_ASM + #include #include #ifdef SPARC64 *************** *** 36,46 **** .text .align 8 ! .globl ffi_call_V9 ! .globl _ffi_call_V9 ! ffi_call_V9: ! _ffi_call_V9: .LLFB1: save %sp, -STACKFRAME, %sp .LLCFI0: --- 37,47 ---- .text .align 8 ! .globl ffi_call_v9 ! .globl _ffi_call_v9 ! ffi_call_v9: ! _ffi_call_v9: .LLFB1: save %sp, -STACKFRAME, %sp .LLCFI0: *************** _ffi_call_V9: *** 86,92 **** cmp %i3, FFI_TYPE_INT be,a,pt %icc, done ! stx %o0, [%i4] ! (delay) cmp %i3, FFI_TYPE_FLOAT be,a,pn %icc, done --- 87,93 ---- cmp %i3, FFI_TYPE_INT be,a,pt %icc, done ! stx %o0, [%i4+0] ! (delay) cmp %i3, FFI_TYPE_FLOAT be,a,pn %icc, done *************** dostruct: *** 122,134 **** restore .LLFE1: ! .ffi_call_V9_end: ! .size ffi_call_V9,.ffi_call_V9_end-ffi_call_V9 ! #define STACKFRAME 240 /* 16*8 register window + 6*8 args backing store + ! 8*8 locals */ #define FP %fp+STACK_BIAS /* ffi_closure_v9(...) --- 123,136 ---- restore .LLFE1: ! .ffi_call_v9_end: ! .size ffi_call_v9,.ffi_call_v9_end-ffi_call_v9 ! #undef STACKFRAME ! #define STACKFRAME 336 /* 16*8 register window + 6*8 args backing store + ! 20*8 locals */ #define FP %fp+STACK_BIAS /* ffi_closure_v9(...) *************** ffi_closure_v9: *** 153,213 **** stx %i5, [FP+128+40] ! Store possible floating point argument registers too. ! std %f0, [FP-48] ! std %f2, [FP-40] ! std %f4, [FP-32] ! std %f6, [FP-24] ! std %f8, [FP-16] ! std %f10, [FP-8] ! Call ffi_closure_sparc_inner to do the bulk of the work. mov %g1, %o0 ! add %fp, STACK_BIAS-64, %o1 add %fp, STACK_BIAS+128, %o2 ! call ffi_closure_sparc_inner ! add %fp, STACK_BIAS-48, %o3 ! Load up the return value in the proper type. cmp %o0, FFI_TYPE_VOID be,pn %icc, done1 cmp %o0, FFI_TYPE_FLOAT be,a,pn %icc, done1 ! ld [FP-64], %f0 cmp %o0, FFI_TYPE_DOUBLE be,a,pn %icc, done1 ! ldd [FP-64], %f0 cmp %o0, FFI_TYPE_LONGDOUBLE be,a,pn %icc, longdouble1 ! ldd [FP-64], %f0 ! cmp %o0, FFI_TYPE_STRUCT ! be,pn %icc, struct1 ! ! FFI_TYPE_UINT64 | FFI_TYPE_SINT64 | FFI_TYPE_POINTER ! ldx [FP-64], %i0 done1: ret restore ! struct1: ! ldx [FP-56], %i2 ! ret ! restore ! longdouble1: ! ldd [FP-56], %f2 ret restore .LLFE2: .ffi_closure_v9_end: .size ffi_closure_v9,.ffi_closure_v9_end-ffi_closure_v9 .section ".eh_frame",#alloc,#write .LLframe1: .uaword .LLECIE1-.LLSCIE1 ! Length of Common Information Entry .LLSCIE1: --- 155,238 ---- stx %i5, [FP+128+40] ! Store possible floating point argument registers too. ! std %f0, [FP-128] ! std %f2, [FP-120] ! std %f4, [FP-112] ! std %f6, [FP-104] ! std %f8, [FP-96] ! std %f10, [FP-88] ! std %f12, [FP-80] ! std %f14, [FP-72] ! std %f16, [FP-64] ! std %f18, [FP-56] ! std %f20, [FP-48] ! std %f22, [FP-40] ! std %f24, [FP-32] ! std %f26, [FP-24] ! std %f28, [FP-16] ! std %f30, [FP-8] ! Call ffi_closure_sparc_inner to do the bulk of the work. mov %g1, %o0 ! add %fp, STACK_BIAS-160, %o1 add %fp, STACK_BIAS+128, %o2 ! call ffi_closure_sparc_inner_v9 ! add %fp, STACK_BIAS-128, %o3 ! Load up the return value in the proper type. + ! See ffi_prep_cif_machdep for the list of cases. cmp %o0, FFI_TYPE_VOID be,pn %icc, done1 + cmp %o0, FFI_TYPE_INT + be,pn %icc, integer + cmp %o0, FFI_TYPE_FLOAT be,a,pn %icc, done1 ! ld [FP-160], %f0 cmp %o0, FFI_TYPE_DOUBLE be,a,pn %icc, done1 ! ldd [FP-160], %f0 + #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE cmp %o0, FFI_TYPE_LONGDOUBLE be,a,pn %icc, longdouble1 ! ldd [FP-160], %f0 ! #endif ! ! FFI_TYPE_STRUCT ! ldx [FP-152], %i1 ! ldx [FP-144], %i2 ! ldx [FP-136], %i3 ! ldd [FP-160], %f0 ! ldd [FP-152], %f2 ! ldd [FP-144], %f4 ! ldd [FP-136], %f6 ! integer: ! ldx [FP-160], %i0 done1: ret restore ! #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE longdouble1: ! ldd [FP-152], %f2 ret restore + #endif .LLFE2: .ffi_closure_v9_end: .size ffi_closure_v9,.ffi_closure_v9_end-ffi_closure_v9 + #ifdef HAVE_RO_EH_FRAME + .section ".eh_frame",#alloc + #else .section ".eh_frame",#alloc,#write + #endif .LLframe1: .uaword .LLECIE1-.LLSCIE1 ! Length of Common Information Entry .LLSCIE1: diff -Nrc3pad gcc-3.3.3/libffi/src/types.c gcc-3.4.0/libffi/src/types.c *** gcc-3.3.3/libffi/src/types.c 2002-11-26 22:24:05.000000000 +0000 --- gcc-3.4.0/libffi/src/types.c 2004-03-12 01:35:31.000000000 +0000 *************** *** 1,5 **** /* ----------------------------------------------------------------------- ! types.c - Copyright (c) 1996, 1998 Cygnus Solutions Predefined ffi_types needed by libffi. --- 1,5 ---- /* ----------------------------------------------------------------------- ! types.c - Copyright (c) 1996, 1998 Red Hat, Inc. Predefined ffi_types needed by libffi. *************** FFI_INTEGRAL_TYPEDEF(sint32, 4, 4, FFI_T *** 43,49 **** FFI_INTEGRAL_TYPEDEF(float, 4, 4, FFI_TYPE_FLOAT); #if defined ALPHA || defined SPARC64 || defined X86_64 || defined S390X \ ! || defined IA64 FFI_INTEGRAL_TYPEDEF(pointer, 8, 8, FFI_TYPE_POINTER); --- 43,49 ---- FFI_INTEGRAL_TYPEDEF(float, 4, 4, FFI_TYPE_FLOAT); #if defined ALPHA || defined SPARC64 || defined X86_64 || defined S390X \ ! || defined IA64 || defined POWERPC64 FFI_INTEGRAL_TYPEDEF(pointer, 8, 8, FFI_TYPE_POINTER); *************** FFI_INTEGRAL_TYPEDEF(sint64, 8, 8, FFI_T *** 76,87 **** FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE); FFI_INTEGRAL_TYPEDEF(longdouble, 12, 4, FFI_TYPE_LONGDOUBLE); ! #elif defined ARM ! ! FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE); ! FFI_INTEGRAL_TYPEDEF(longdouble, 8, 4, FFI_TYPE_LONGDOUBLE); ! ! #elif defined SH FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE); FFI_INTEGRAL_TYPEDEF(longdouble, 8, 4, FFI_TYPE_LONGDOUBLE); --- 76,82 ---- FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE); FFI_INTEGRAL_TYPEDEF(longdouble, 12, 4, FFI_TYPE_LONGDOUBLE); ! #elif defined ARM || defined SH || defined POWERPC_AIX || defined POWERPC_DARWIN FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE); FFI_INTEGRAL_TYPEDEF(longdouble, 8, 4, FFI_TYPE_LONGDOUBLE); *************** FFI_INTEGRAL_TYPEDEF(longdouble, 16, 16, *** 95,101 **** FFI_INTEGRAL_TYPEDEF(longdouble, 16, 8, FFI_TYPE_LONGDOUBLE); #endif ! #elif defined X86_64 FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_TYPE_DOUBLE); FFI_INTEGRAL_TYPEDEF(longdouble, 16, 16, FFI_TYPE_LONGDOUBLE); --- 90,96 ---- FFI_INTEGRAL_TYPEDEF(longdouble, 16, 8, FFI_TYPE_LONGDOUBLE); #endif ! #elif defined X86_64 || defined POWERPC64 FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_TYPE_DOUBLE); FFI_INTEGRAL_TYPEDEF(longdouble, 16, 16, FFI_TYPE_LONGDOUBLE); diff -Nrc3pad gcc-3.3.3/libffi/src/x86/ffi64.c gcc-3.4.0/libffi/src/x86/ffi64.c *** gcc-3.3.3/libffi/src/x86/ffi64.c 2003-01-28 16:39:05.000000000 +0000 --- gcc-3.4.0/libffi/src/x86/ffi64.c 2003-10-21 19:01:58.000000000 +0000 *************** ffi_closure_UNIX64_inner(ffi_closure *cl *** 689,695 **** FFI_ASSERT(0); } ! argn += ALIGN(arg_types[i]->size, SIZEOF_ARG) / SIZEOF_ARG; i++; } --- 689,695 ---- FFI_ASSERT(0); } ! argn += ALIGN(arg_types[i]->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG; i++; } diff -Nrc3pad gcc-3.3.3/libffi/src/x86/ffi.c gcc-3.4.0/libffi/src/x86/ffi.c *** gcc-3.3.3/libffi/src/x86/ffi.c 2003-03-22 11:57:33.000000000 +0000 --- gcc-3.4.0/libffi/src/x86/ffi.c 2003-12-02 05:39:06.000000000 +0000 *************** void ffi_prep_args(char *stack, extended *** 62,69 **** size_t z; /* Align if necessary */ ! if (((*p_arg)->alignment - 1) & (unsigned) argp) ! argp = (char *) ALIGN(argp, (*p_arg)->alignment); z = (*p_arg)->size; if (z < sizeof(int)) --- 62,69 ---- size_t z; /* Align if necessary */ ! if ((sizeof(int) - 1) & (unsigned) argp) ! argp = (char *) ALIGN(argp, sizeof(int)); z = (*p_arg)->size; if (z < sizeof(int)) *************** ffi_prep_incoming_args_SYSV(char *stack, *** 301,308 **** size_t z; /* Align if necessary */ ! if (((*p_arg)->alignment - 1) & (unsigned) argp) { ! argp = (char *) ALIGN(argp, (*p_arg)->alignment); } z = (*p_arg)->size; --- 301,308 ---- size_t z; /* Align if necessary */ ! if ((sizeof(int) - 1) & (unsigned) argp) { ! argp = (char *) ALIGN(argp, sizeof(int)); } z = (*p_arg)->size; diff -Nrc3pad gcc-3.3.3/libffi/src/x86/ffitarget.h gcc-3.4.0/libffi/src/x86/ffitarget.h *** gcc-3.3.3/libffi/src/x86/ffitarget.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/src/x86/ffitarget.h 2003-10-21 19:07:52.000000000 +0000 *************** *** 0 **** --- 1,81 ---- + /* -----------------------------------------------------------------*-C-*- + ffitarget.h - Copyright (c) 1996-2003 Red Hat, Inc. + Target configuration macros for x86 and x86-64. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + ``Software''), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + ----------------------------------------------------------------------- */ + + #ifndef LIBFFI_TARGET_H + #define LIBFFI_TARGET_H + + /* ---- System specific configurations ----------------------------------- */ + + #if defined (X86_64) && defined (__i386__) + #undef X86_64 + #define X86 + #endif + + /* ---- Generic type definitions ----------------------------------------- */ + + #ifndef LIBFFI_ASM + typedef unsigned long ffi_arg; + typedef signed long ffi_sarg; + + typedef enum ffi_abi { + FFI_FIRST_ABI = 0, + + /* ---- Intel x86 Win32 ---------- */ + #ifdef X86_WIN32 + FFI_SYSV, + FFI_STDCALL, + /* TODO: Add fastcall support for the sake of completeness */ + FFI_DEFAULT_ABI = FFI_SYSV, + #endif + + /* ---- Intel x86 and AMD x86-64 - */ + #if !defined(X86_WIN32) && (defined(__i386__) || defined(__x86_64__)) + FFI_SYSV, + FFI_UNIX64, /* Unix variants all use the same ABI for x86-64 */ + #ifdef __i386__ + FFI_DEFAULT_ABI = FFI_SYSV, + #else + FFI_DEFAULT_ABI = FFI_UNIX64, + #endif + #endif + + FFI_LAST_ABI = FFI_DEFAULT_ABI + 1 + } ffi_abi; + #endif + + /* ---- Definitions for closures ----------------------------------------- */ + + #define FFI_CLOSURES 1 + + #ifdef X86_64 + #define FFI_TRAMPOLINE_SIZE 24 + #define FFI_NATIVE_RAW_API 0 + #else + #define FFI_TRAMPOLINE_SIZE 10 + #define FFI_NATIVE_RAW_API 1 /* x86 has native raw api support */ + #endif + + #endif + diff -Nrc3pad gcc-3.3.3/libffi/src/x86/sysv.S gcc-3.4.0/libffi/src/x86/sysv.S *** gcc-3.3.3/libffi/src/x86/sysv.S 2002-07-18 23:08:31.000000000 +0000 --- gcc-3.4.0/libffi/src/x86/sysv.S 2003-10-21 19:01:58.000000000 +0000 *************** *** 1,5 **** /* ----------------------------------------------------------------------- ! sysv.S - Copyright (c) 1996, 1998, 2001, 2002 Cygnus Solutions X86 Foreign Function Interface --- 1,5 ---- /* ----------------------------------------------------------------------- ! sysv.S - Copyright (c) 1996, 1998, 2001, 2002, 2003 Red Hat, Inc. X86 Foreign Function Interface *************** *** 26,31 **** --- 26,32 ---- #ifndef __x86_64__ #define LIBFFI_ASM + #include #include .text *************** epilogue: *** 129,169 **** .ffi_call_SYSV_end: .size ffi_call_SYSV,.ffi_call_SYSV_end-ffi_call_SYSV ! .section .eh_frame,"aw",@progbits ! __FRAME_BEGIN__: ! .4byte .LLCIE1 .LSCIE1: ! .4byte 0x0 ! .byte 0x1 ! .byte 0x0 ! .byte 0x1 ! .byte 0x7c ! .byte 0x8 ! .byte 0xc ! .byte 0x4 ! .byte 0x4 ! .byte 0x88 ! .byte 0x1 .align 4 .LECIE1: - .set .LLCIE1,.LECIE1-.LSCIE1 - .4byte .LLFDE1 .LSFDE1: ! .4byte .LSFDE1-__FRAME_BEGIN__ ! .4byte .LFB1 ! .4byte .LFE1-.LFB1 ! .byte 0x4 ! .4byte .LCFI0-.LFB1 ! .byte 0xe ! .byte 0x8 ! .byte 0x85 ! .byte 0x2 ! .byte 0x4 ! .4byte .LCFI1-.LCFI0 ! .byte 0xd ! .byte 0x5 .align 4 .LEFDE1: - .set .LLFDE1,.LEFDE1-.LSFDE1 #endif /* ifndef __x86_64__ */ --- 130,184 ---- .ffi_call_SYSV_end: .size ffi_call_SYSV,.ffi_call_SYSV_end-ffi_call_SYSV ! .section .eh_frame,EH_FRAME_FLAGS,@progbits ! .Lframe1: ! .long .LECIE1-.LSCIE1 /* Length of Common Information Entry */ .LSCIE1: ! .long 0x0 /* CIE Identifier Tag */ ! .byte 0x1 /* CIE Version */ ! #ifdef __PIC__ ! .ascii "zR\0" /* CIE Augmentation */ ! #else ! .ascii "\0" /* CIE Augmentation */ ! #endif ! .byte 0x1 /* .uleb128 0x1; CIE Code Alignment Factor */ ! .byte 0x7c /* .sleb128 -4; CIE Data Alignment Factor */ ! .byte 0x8 /* CIE RA Column */ ! #ifdef __PIC__ ! .byte 0x1 /* .uleb128 0x1; Augmentation size */ ! .byte 0x1b /* FDE Encoding (pcrel sdata4) */ ! #endif ! .byte 0xc /* DW_CFA_def_cfa */ ! .byte 0x4 /* .uleb128 0x4 */ ! .byte 0x4 /* .uleb128 0x4 */ ! .byte 0x88 /* DW_CFA_offset, column 0x8 */ ! .byte 0x1 /* .uleb128 0x1 */ .align 4 .LECIE1: .LSFDE1: ! .long .LEFDE1-.LASFDE1 /* FDE Length */ ! .LASFDE1: ! .long .LASFDE1-.Lframe1 /* FDE CIE offset */ ! #ifdef __PIC__ ! .long .LFB1-. /* FDE initial location */ ! #else ! .long .LFB1 /* FDE initial location */ ! #endif ! .long .LFE1-.LFB1 /* FDE address range */ ! #ifdef __PIC__ ! .byte 0x0 /* .uleb128 0x0; Augmentation size */ ! #endif ! .byte 0x4 /* DW_CFA_advance_loc4 */ ! .long .LCFI0-.LFB1 ! .byte 0xe /* DW_CFA_def_cfa_offset */ ! .byte 0x8 /* .uleb128 0x8 */ ! .byte 0x85 /* DW_CFA_offset, column 0x5 */ ! .byte 0x2 /* .uleb128 0x2 */ ! .byte 0x4 /* DW_CFA_advance_loc4 */ ! .long .LCFI1-.LCFI0 ! .byte 0xd /* DW_CFA_def_cfa_register */ ! .byte 0x5 /* .uleb128 0x5 */ .align 4 .LEFDE1: #endif /* ifndef __x86_64__ */ diff -Nrc3pad gcc-3.3.3/libffi/src/x86/unix64.S gcc-3.4.0/libffi/src/x86/unix64.S *** gcc-3.3.3/libffi/src/x86/unix64.S 2003-01-28 16:39:05.000000000 +0000 --- gcc-3.4.0/libffi/src/x86/unix64.S 2003-10-21 19:01:58.000000000 +0000 *************** *** 25,30 **** --- 25,31 ---- #ifdef __x86_64__ #define LIBFFI_ASM + #include #include .section .rodata *************** ffi_closure_UNIX64: *** 237,243 **** ret .LFE2: ! .section .eh_frame,"a",@progbits .Lframe0: .long .LECIE1-.LSCIE1 .LSCIE1: --- 238,244 ---- ret .LFE2: ! .section .eh_frame,EH_FRAME_FLAGS,@progbits .Lframe0: .long .LECIE1-.LSCIE1 .LSCIE1: diff -Nrc3pad gcc-3.3.3/libffi/src/x86/win32.S gcc-3.4.0/libffi/src/x86/win32.S *** gcc-3.3.3/libffi/src/x86/win32.S 2002-12-06 01:16:45.000000000 +0000 --- gcc-3.4.0/libffi/src/x86/win32.S 2003-10-21 19:01:58.000000000 +0000 *************** *** 27,32 **** --- 27,33 ---- ----------------------------------------------------------------------- */ #define LIBFFI_ASM + #include #include .text diff -Nrc3pad gcc-3.3.3/libffi/testsuite/config/default.exp gcc-3.4.0/libffi/testsuite/config/default.exp *** gcc-3.3.3/libffi/testsuite/config/default.exp 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/config/default.exp 2003-09-04 14:47:47.000000000 +0000 *************** *** 0 **** --- 1 ---- + load_lib "standard.exp" diff -Nrc3pad gcc-3.3.3/libffi/testsuite/lib/libffi-dg.exp gcc-3.4.0/libffi/testsuite/lib/libffi-dg.exp *** gcc-3.3.3/libffi/testsuite/lib/libffi-dg.exp 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/lib/libffi-dg.exp 2004-01-12 20:49:14.000000000 +0000 *************** *** 0 **** --- 1,271 ---- + # Copyright (C) 2003 Free Software Foundation, Inc. + + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2 of the License, or + # (at your option) any later version. + # + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + load_lib dg.exp + load_lib libgloss.exp + + + + # Define libffi callbacks for dg.exp. + + proc libffi-dg-test-1 { target_compile prog do_what extra_tool_flags } { + # Set up the compiler flags, based on what we're going to do. + + set options [list] + switch $do_what { + "compile" { + set compile_type "assembly" + set output_file "[file rootname [file tail $prog]].s" + } + "link" { + set compile_type "executable" + set output_file "[file rootname [file tail $prog]].exe" + # The following line is needed for targets like the i960 where + # the default output file is b.out. Sigh. + } + "run" { + set compile_type "executable" + # FIXME: "./" is to cope with "." not being in $PATH. + # Should this be handled elsewhere? + # YES. + set output_file "./[file rootname [file tail $prog]].exe" + # This is the only place where we care if an executable was + # created or not. If it was, dg.exp will try to run it. + remote_file build delete $output_file; + } + default { + perror "$do_what: not a valid dg-do keyword" + return "" + } + } + + if { $extra_tool_flags != "" } { + lappend options "additional_flags=$extra_tool_flags" + } + + set comp_output [libffi_target_compile "$prog" "$output_file" "$compile_type" $options]; + + + return [list $comp_output $output_file] + } + + + proc libffi-dg-test { prog do_what extra_tool_flags } { + return [libffi-dg-test-1 target_compile $prog $do_what $extra_tool_flags] + } + + proc libffi-init { args } { + global gluefile wrap_flags; + global srcdir + global blddirffi + global blddircxx + global TOOL_OPTIONS + global ld_library_path + global libffi_include + global libffi_link_flags + global tool_root_dir + + set blddirffi [lookfor_file [get_multilibs] libffi] + verbose "libffi $blddirffi" + set blddircxx [lookfor_file [get_multilibs] libstdc++-v3] + verbose "libstdc++ $blddircxx" + + set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a] + if {$gccdir != ""} { + set gccdir [file dirname $gccdir] + } + verbose "gccdir $gccdir" + + set ld_library_path "." + append ld_library_path ":${gccdir}" + + set compiler "${gccdir}/xgcc" + if { [is_remote host] == 0 && [which $compiler] != 0 } { + foreach i "[exec $compiler --print-multi-lib]" { + set mldir "" + regexp -- "\[a-z0-9=/\.-\]*;" $i mldir + set mldir [string trimright $mldir "\;@"] + if { "$mldir" == "." } { + continue + } + if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]] == 1 } { + append ld_library_path ":${gccdir}/${mldir}" + } + } + } + # add the library path for libffi. + append ld_library_path ":${blddirffi}/.libs" + # add the library path for libstdc++ as well. + append ld_library_path ":${blddircxx}/src/.libs" + + verbose "ld_library_path: $ld_library_path" + + # Point to the Libffi headers in libffi. + set libffi_include "${blddirffi}/include" + verbose "libffi_include $libffi_include" + + set libffi_dir "${blddirffi}/.libs" + verbose "libffi_dir $libffi_dir" + if { $libffi_dir != "" } { + set libffi_dir [file dirname ${libffi_dir}] + set libffi_link_flags "-L${libffi_dir}/.libs" + lappend libffi_link_flags "-L${blddircxx}/src/.libs" + } + + # On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but + # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH + # (for the 64-bit ABI). The right way to do this would be to modify + # unix.exp -- but that's not an option since it's part of DejaGNU + # proper, so we do it here. + # The same applies to darwin (DYLD_LIBRARY_PATH), solaris 32 bit + # (LD_LIBRARY_PATH_32), solaris 64 bit (LD_LIBRARY_PATH_64), and HP-UX + # (SHLIB_PATH). + setenv LD_LIBRARY_PATH $ld_library_path + setenv SHLIB_PATH $ld_library_path + setenv LD_LIBRARYN32_PATH $ld_library_path + setenv LD_LIBRARY64_PATH $ld_library_path + setenv LD_LIBRARY_PATH_32 $ld_library_path + setenv LD_LIBRARY_PATH_64 $ld_library_path + setenv DYLD_LIBRARY_PATH $ld_library_path + } + + proc libffi_target_compile { source dest type options } { + global gluefile wrap_flags; + global srcdir + global blddirffi + global TOOL_OPTIONS + global ld_library_path + global libffi_link_flags + global libffi_include + global target_triplet + + + if { [target_info needs_status_wrapper]!="" && [info exists gluefile] } { + lappend options "libs=${gluefile}" + lappend options "ldflags=$wrap_flags" + } + + # TOOL_OPTIONS must come first, so that it doesn't override testcase + # specific options. + if [info exists TOOL_OPTIONS] { + lappend options [concat "additional_flags=$TOOL_OPTIONS" $options]; + } + + # search for ffi_mips.h in srcdir, too + lappend options "additional_flags=-I${libffi_include} -I${srcdir}/../include -I${libffi_include}/.." + lappend options "additional_flags=${libffi_link_flags}" + + if { [string match "powerpc-*-darwin*" $target_triplet] } { + lappend options "libs= -lgcc_s" + } + + lappend options "libs= -lffi" + + verbose "options: $options" + return [target_compile $source $dest $type $options] + } + + # Utility routines. + + # + # search_for -- looks for a string match in a file + # + proc search_for { file pattern } { + set fd [open $file r] + while { [gets $fd cur_line]>=0 } { + if [string match "*$pattern*" $cur_line] then { + close $fd + return 1 + } + } + close $fd + return 0 + } + + # Modified dg-runtest that can cycle through a list of optimization options + # as c-torture does. + proc libffi-dg-runtest { testcases default-extra-flags } { + global runtests + + foreach test $testcases { + # If we're only testing specific files and this isn't one of + # them, skip it. + if ![runtest_file_p $runtests $test] { + continue + } + + # Look for a loop within the source code - if we don't find one, + # don't pass -funroll[-all]-loops. + global torture_with_loops torture_without_loops + if [expr [search_for $test "for*("]+[search_for $test "while*("]] { + set option_list $torture_with_loops + } else { + set option_list $torture_without_loops + } + + set nshort [file tail [file dirname $test]]/[file tail $test] + + foreach flags $option_list { + verbose "Testing $nshort, $flags" 1 + dg-test $test $flags ${default-extra-flags} + } + } + } + + + # Like check_conditional_xfail, but callable from a dg test. + + proc dg-xfail-if { args } { + set args [lreplace $args 0 0] + set selector "target [join [lindex $args 1]]" + if { [dg-process-target $selector] == "S" } { + global compiler_conditional_xfail_data + set compiler_conditional_xfail_data $args + } + } + + + # We need to make sure that additional_files and additional_sources + # are both cleared out after every test. It is not enough to clear + # them out *before* the next test run because gcc-target-compile gets + # run directly from some .exp files (outside of any test). (Those + # uses should eventually be eliminated.) + + # Because the DG framework doesn't provide a hook that is run at the + # end of a test, we must replace dg-test with a wrapper. + + if { [info procs saved-dg-test] == [list] } { + rename dg-test saved-dg-test + + proc dg-test { args } { + global additional_files + global additional_sources + global errorInfo + + if { [ catch { eval saved-dg-test $args } errmsg ] } { + set saved_info $errorInfo + set additional_files "" + set additional_sources "" + error $errmsg $saved_info + } + set additional_files "" + set additional_sources "" + } + } + + # Local Variables: + # tcl-indent-level:4 + # End: diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/call.exp gcc-3.4.0/libffi/testsuite/libffi.call/call.exp *** gcc-3.3.3/libffi/testsuite/libffi.call/call.exp 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/call.exp 2003-09-04 14:47:48.000000000 +0000 *************** *** 0 **** --- 1,32 ---- + # Copyright (C) 2003 Free Software Foundation, Inc. + + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2 of the License, or + # (at your option) any later version. + # + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + # libffi testsuite that uses the 'dg.exp' driver. + + load_lib libffi-dg.exp + + dg-init + libffi-init + + global srcdir subdir + + dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "" "" + + dg-finish + + # Local Variables: + # tcl-indent-level:4 + # End: diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/closure_fn0.c gcc-3.4.0/libffi/testsuite/libffi.call/closure_fn0.c *** gcc-3.3.3/libffi/testsuite/libffi.call/closure_fn0.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/closure_fn0.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,93 ---- + /* Area: closure_call + Purpose: Check multiple values passing from different type. + Also, exceed the limit of gpr and fpr registers on PowerPC + Darwin. + Limitations: none. + PR: none. + Originator: 20030828 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + static void + closure_test_fn0(ffi_cif* cif,void* resp,void** args, void* userdata) + { + *(ffi_arg*)resp = + (int)*(unsigned long long *)args[0] + (int)(*(int *)args[1]) + + (int)(*(unsigned long long *)args[2]) + (int)*(int *)args[3] + + (int)(*(signed short *)args[4]) + + (int)(*(unsigned long long *)args[5]) + + (int)*(int *)args[6] + (int)(*(int *)args[7]) + + (int)(*(double *)args[8]) + (int)*(int *)args[9] + + (int)(*(int *)args[10]) + (int)(*(float *)args[11]) + + (int)*(int *)args[12] + (int)(*(int *)args[13]) + + (int)(*(int *)args[14]) + *(int *)args[15] + (int)(long)userdata; + + printf("%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d: %d\n", + (int)*(unsigned long long *)args[0], (int)(*(int *)args[1]), + (int)(*(unsigned long long *)args[2]), + (int)*(int *)args[3], (int)(*(signed short *)args[4]), + (int)(*(unsigned long long *)args[5]), + (int)*(int *)args[6], (int)(*(int *)args[7]), + (int)(*(double *)args[8]), (int)*(int *)args[9], + (int)(*(int *)args[10]), (int)(*(float *)args[11]), + (int)*(int *)args[12], (int)(*(int *)args[13]), + (int)(*(int *)args[14]),*(int *)args[15], + (int)(long)userdata, (int)*(ffi_arg *)resp); + + } + + typedef int (*closure_test_type0)(unsigned long long, int, unsigned long long, + int, signed short, unsigned long long, int, + int, double, int, int, float, int, int, + int, int); + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + ffi_type * cl_arg_types[17]; + int res; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cl_arg_types[0] = &ffi_type_uint64; + cl_arg_types[1] = &ffi_type_uint; + cl_arg_types[2] = &ffi_type_uint64; + cl_arg_types[3] = &ffi_type_uint; + cl_arg_types[4] = &ffi_type_sshort; + cl_arg_types[5] = &ffi_type_uint64; + cl_arg_types[6] = &ffi_type_uint; + cl_arg_types[7] = &ffi_type_uint; + cl_arg_types[8] = &ffi_type_double; + cl_arg_types[9] = &ffi_type_uint; + cl_arg_types[10] = &ffi_type_uint; + cl_arg_types[11] = &ffi_type_float; + cl_arg_types[12] = &ffi_type_uint; + cl_arg_types[13] = &ffi_type_uint; + cl_arg_types[14] = &ffi_type_uint; + cl_arg_types[15] = &ffi_type_uint; + cl_arg_types[16] = NULL; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 16, + &ffi_type_sint, cl_arg_types) == FFI_OK); + + CHECK(ffi_prep_closure(pcl, &cif, closure_test_fn0, + (void *) 3 /* userdata */) == FFI_OK); + + res = (*((closure_test_type0)pcl)) + (1LL, 2, 3LL, 4, 127, 429LL, 7, 8, 9.5, 10, 11, 12, 13, + 19, 21, 1); + /* { dg-output "1 2 3 4 127 429 7 8 9 10 11 12 13 19 21 1 3: 680" } */ + printf("res: %d\n",res); + /* { dg-output "\nres: 680" } */ + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/closure_fn1.c gcc-3.4.0/libffi/testsuite/libffi.call/closure_fn1.c *** gcc-3.3.3/libffi/testsuite/libffi.call/closure_fn1.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/closure_fn1.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,89 ---- + /* Area: closure_call. + Purpose: Check multiple values passing from different type. + Also, exceed the limit of gpr and fpr registers on PowerPC + Darwin. + Limitations: none. + PR: none. + Originator: 20030828 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + + static void closure_test_fn1(ffi_cif* cif,void* resp,void** args, + void* userdata) + { + *(ffi_arg*)resp = + (int)*(float *)args[0] +(int)(*(float *)args[1]) + + (int)(*(float *)args[2]) + (int)*(float *)args[3] + + (int)(*(signed short *)args[4]) + (int)(*(float *)args[5]) + + (int)*(float *)args[6] + (int)(*(int *)args[7]) + + (int)(*(double*)args[8]) + (int)*(int *)args[9] + + (int)(*(int *)args[10]) + (int)(*(float *)args[11]) + + (int)*(int *)args[12] + (int)(*(int *)args[13]) + + (int)(*(int *)args[14]) + *(int *)args[15] + (int)(long)userdata; + + printf("%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d: %d\n", + (int)*(float *)args[0], (int)(*(float *)args[1]), + (int)(*(float *)args[2]), (int)*(float *)args[3], + (int)(*(signed short *)args[4]), (int)(*(float *)args[5]), + (int)*(float *)args[6], (int)(*(int *)args[7]), + (int)(*(double *)args[8]), (int)*(int *)args[9], + (int)(*(int *)args[10]), (int)(*(float *)args[11]), + (int)*(int *)args[12], (int)(*(int *)args[13]), + (int)(*(int *)args[14]), *(int *)args[15], + (int)(long)userdata, (int)*(ffi_arg *)resp); + } + + typedef int (*closure_test_type1)(float, float, float, float, signed short, + float, float, int, double, int, int, float, + int, int, int, int); + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + ffi_type * cl_arg_types[17]; + int res; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cl_arg_types[0] = &ffi_type_float; + cl_arg_types[1] = &ffi_type_float; + cl_arg_types[2] = &ffi_type_float; + cl_arg_types[3] = &ffi_type_float; + cl_arg_types[4] = &ffi_type_sshort; + cl_arg_types[5] = &ffi_type_float; + cl_arg_types[6] = &ffi_type_float; + cl_arg_types[7] = &ffi_type_uint; + cl_arg_types[8] = &ffi_type_double; + cl_arg_types[9] = &ffi_type_uint; + cl_arg_types[10] = &ffi_type_uint; + cl_arg_types[11] = &ffi_type_float; + cl_arg_types[12] = &ffi_type_uint; + cl_arg_types[13] = &ffi_type_uint; + cl_arg_types[14] = &ffi_type_uint; + cl_arg_types[15] = &ffi_type_uint; + cl_arg_types[16] = NULL; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 16, + &ffi_type_sint, cl_arg_types) == FFI_OK); + + CHECK(ffi_prep_closure(pcl, &cif, closure_test_fn1, + (void *) 3 /* userdata */) == FFI_OK); + + res = (*((closure_test_type1)pcl)) + (1.1, 2.2, 3.3, 4.4, 127, 5.5, 6.6, 8, 9, 10, 11, 12.0, 13, + 19, 21, 1); + /* { dg-output "1 2 3 4 127 5 6 8 9 10 11 12 13 19 21 1 3: 255" } */ + printf("res: %d\n",res); + /* { dg-output "\nres: 255" } */ + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/closure_fn2.c gcc-3.4.0/libffi/testsuite/libffi.call/closure_fn2.c *** gcc-3.3.3/libffi/testsuite/libffi.call/closure_fn2.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/closure_fn2.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,89 ---- + /* Area: closure_call + Purpose: Check multiple values passing from different type. + Also, exceed the limit of gpr and fpr registers on PowerPC + Darwin. + Limitations: none. + PR: none. + Originator: 20030828 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + static void closure_test_fn2(ffi_cif* cif,void* resp,void** args, + void* userdata) + { + *(ffi_arg*)resp = + (int)*(double *)args[0] +(int)(*(double *)args[1]) + + (int)(*(double *)args[2]) + (int)*(double *)args[3] + + (int)(*(signed short *)args[4]) + (int)(*(double *)args[5]) + + (int)*(double *)args[6] + (int)(*(int *)args[7]) + + (int)(*(double *)args[8]) + (int)*(int *)args[9] + + (int)(*(int *)args[10]) + (int)(*(float *)args[11]) + + (int)*(int *)args[12] + (int)(*(float *)args[13]) + + (int)(*(int *)args[14]) + *(int *)args[15] + (int)(long)userdata; + + printf("%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d: %d\n", + (int)*(double *)args[0], (int)(*(double *)args[1]), + (int)(*(double *)args[2]), (int)*(double *)args[3], + (int)(*(signed short *)args[4]), (int)(*(double *)args[5]), + (int)*(double *)args[6], (int)(*(int *)args[7]), + (int)(*(double*)args[8]), (int)*(int *)args[9], + (int)(*(int *)args[10]), (int)(*(float *)args[11]), + (int)*(int *)args[12], (int)(*(float *)args[13]), + (int)(*(int *)args[14]), *(int *)args[15], (int)(long)userdata, + (int)*(ffi_arg *)resp); + } + + typedef int (*closure_test_type2)(double, double, double, double, signed short, + double, double, int, double, int, int, float, + int, float, int, int); + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + ffi_type * cl_arg_types[17]; + int res; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cl_arg_types[0] = &ffi_type_double; + cl_arg_types[1] = &ffi_type_double; + cl_arg_types[2] = &ffi_type_double; + cl_arg_types[3] = &ffi_type_double; + cl_arg_types[4] = &ffi_type_sshort; + cl_arg_types[5] = &ffi_type_double; + cl_arg_types[6] = &ffi_type_double; + cl_arg_types[7] = &ffi_type_uint; + cl_arg_types[8] = &ffi_type_double; + cl_arg_types[9] = &ffi_type_uint; + cl_arg_types[10] = &ffi_type_uint; + cl_arg_types[11] = &ffi_type_float; + cl_arg_types[12] = &ffi_type_uint; + cl_arg_types[13] = &ffi_type_float; + cl_arg_types[14] = &ffi_type_uint; + cl_arg_types[15] = &ffi_type_uint; + cl_arg_types[16] = NULL; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 16, + &ffi_type_sint, cl_arg_types) == FFI_OK); + + CHECK(ffi_prep_closure(pcl, &cif, closure_test_fn2, + (void *) 3 /* userdata */) == FFI_OK); + + res = (*((closure_test_type2)pcl)) + (1, 2, 3, 4, 127, 5, 6, 8, 9, 10, 11, 12.0, 13, + 19.0, 21, 1); + /* { dg-output "1 2 3 4 127 5 6 8 9 10 11 12 13 19 21 1 3: 255" } */ + printf("res: %d\n",res); + /* { dg-output "\nres: 255" } */ + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/closure_fn3.c gcc-3.4.0/libffi/testsuite/libffi.call/closure_fn3.c *** gcc-3.3.3/libffi/testsuite/libffi.call/closure_fn3.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/closure_fn3.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,90 ---- + /* Area: closure_call + Purpose: Check multiple values passing from different type. + Also, exceed the limit of gpr and fpr registers on PowerPC + Darwin. + Limitations: none. + PR: none. + Originator: 20030828 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + static void closure_test_fn3(ffi_cif* cif,void* resp,void** args, + void* userdata) + { + *(ffi_arg*)resp = + (int)*(float *)args[0] +(int)(*(float *)args[1]) + + (int)(*(float *)args[2]) + (int)*(float *)args[3] + + (int)(*(float *)args[4]) + (int)(*(float *)args[5]) + + (int)*(float *)args[6] + (int)(*(float *)args[7]) + + (int)(*(double *)args[8]) + (int)*(int *)args[9] + + (int)(*(float *)args[10]) + (int)(*(float *)args[11]) + + (int)*(int *)args[12] + (int)(*(float *)args[13]) + + (int)(*(float *)args[14]) + *(int *)args[15] + (int)(long)userdata; + + printf("%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d: %d\n", + (int)*(float *)args[0], (int)(*(float *)args[1]), + (int)(*(float *)args[2]), (int)*(float *)args[3], + (int)(*(float *)args[4]), (int)(*(float *)args[5]), + (int)*(float *)args[6], (int)(*(float *)args[7]), + (int)(*(double *)args[8]), (int)*(int *)args[9], + (int)(*(float *)args[10]), (int)(*(float *)args[11]), + (int)*(int *)args[12], (int)(*(float *)args[13]), + (int)(*(float *)args[14]), *(int *)args[15], (int)(long)userdata, + (int)*(ffi_arg *)resp); + + } + + typedef int (*closure_test_type3)(float, float, float, float, float, float, + float, float, double, int, float, float, int, + float, float, int); + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + ffi_type * cl_arg_types[17]; + int res; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cl_arg_types[0] = &ffi_type_float; + cl_arg_types[1] = &ffi_type_float; + cl_arg_types[2] = &ffi_type_float; + cl_arg_types[3] = &ffi_type_float; + cl_arg_types[4] = &ffi_type_float; + cl_arg_types[5] = &ffi_type_float; + cl_arg_types[6] = &ffi_type_float; + cl_arg_types[7] = &ffi_type_float; + cl_arg_types[8] = &ffi_type_double; + cl_arg_types[9] = &ffi_type_uint; + cl_arg_types[10] = &ffi_type_float; + cl_arg_types[11] = &ffi_type_float; + cl_arg_types[12] = &ffi_type_uint; + cl_arg_types[13] = &ffi_type_float; + cl_arg_types[14] = &ffi_type_float; + cl_arg_types[15] = &ffi_type_uint; + cl_arg_types[16] = NULL; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 16, + &ffi_type_sint, cl_arg_types) == FFI_OK); + + CHECK(ffi_prep_closure(pcl, &cif, closure_test_fn3, + (void *) 3 /* userdata */) == FFI_OK); + + res = (*((closure_test_type3)pcl)) + (1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9, 10, 11.11, 12.0, 13, + 19.19, 21.21, 1); + /* { dg-output "1 2 3 4 5 6 7 8 9 10 11 12 13 19 21 1 3: 135" } */ + printf("res: %d\n",res); + /* { dg-output "\nres: 135" } */ + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/closure_fn4.c gcc-3.4.0/libffi/testsuite/libffi.call/closure_fn4.c *** gcc-3.3.3/libffi/testsuite/libffi.call/closure_fn4.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/closure_fn4.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,96 ---- + /* Area: closure_call + Purpose: Check multiple long long values passing. + Also, exceed the limit of gpr and fpr registers on PowerPC + Darwin. + Limitations: none. + PR: none. + Originator: 20031026 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + + #include "ffitest.h" + + static void + closure_test_fn0(ffi_cif* cif,void* resp,void** args, void* userdata) + { + *(ffi_arg*)resp = + (int)*(unsigned long long *)args[0] + (int)*(unsigned long long *)args[1] + + (int)*(unsigned long long *)args[2] + (int)*(unsigned long long *)args[3] + + (int)*(unsigned long long *)args[4] + (int)*(unsigned long long *)args[5] + + (int)*(unsigned long long *)args[6] + (int)*(unsigned long long *)args[7] + + (int)*(unsigned long long *)args[8] + (int)*(unsigned long long *)args[9] + + (int)*(unsigned long long *)args[10] + + (int)*(unsigned long long *)args[11] + + (int)*(unsigned long long *)args[12] + + (int)*(unsigned long long *)args[13] + + (int)*(unsigned long long *)args[14] + + *(int *)args[15] + (int)(long)userdata; + + printf("%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d: %d\n", + (int)*(unsigned long long *)args[0], + (int)*(unsigned long long *)args[1], + (int)*(unsigned long long *)args[2], + (int)*(unsigned long long *)args[3], + (int)*(unsigned long long *)args[4], + (int)*(unsigned long long *)args[5], + (int)*(unsigned long long *)args[6], + (int)*(unsigned long long *)args[7], + (int)*(unsigned long long *)args[8], + (int)*(unsigned long long *)args[9], + (int)*(unsigned long long *)args[10], + (int)*(unsigned long long *)args[11], + (int)*(unsigned long long *)args[12], + (int)*(unsigned long long *)args[13], + (int)*(unsigned long long *)args[14], + *(int *)args[15], + (int)(long)userdata, (int)*(ffi_arg *)resp); + + } + + typedef int (*closure_test_type0)(unsigned long long, unsigned long long, + unsigned long long, unsigned long long, + unsigned long long, unsigned long long, + unsigned long long, unsigned long long, + unsigned long long, unsigned long long, + unsigned long long, unsigned long long, + unsigned long long, unsigned long long, + unsigned long long, int); + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + ffi_type * cl_arg_types[17]; + int i, res; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + for (i = 0; i < 15; i++) { + cl_arg_types[i] = &ffi_type_uint64; + } + cl_arg_types[15] = &ffi_type_uint; + cl_arg_types[16] = NULL; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 16, + &ffi_type_sint, cl_arg_types) == FFI_OK); + + CHECK(ffi_prep_closure(pcl, &cif, closure_test_fn0, + (void *) 3 /* userdata */) == FFI_OK); + + res = (*((closure_test_type0)pcl)) + (1LL, 2LL, 3LL, 4LL, 127LL, 429LL, 7LL, 8LL, 9LL, 10LL, 11LL, 12LL, + 13LL, 19LL, 21LL, 1); + /* { dg-output "1 2 3 4 127 429 7 8 9 10 11 12 13 19 21 1 3: 680" } */ + printf("res: %d\n",res); + /* { dg-output "\nres: 680" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/closure_fn5.c gcc-3.4.0/libffi/testsuite/libffi.call/closure_fn5.c *** gcc-3.3.3/libffi/testsuite/libffi.call/closure_fn5.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/closure_fn5.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,99 ---- + /* Area: closure_call + Purpose: Check multiple long long values passing. + Exceed the limit of gpr registers on PowerPC + Darwin. + Limitations: none. + PR: none. + Originator: 20031026 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + + #include "ffitest.h" + + static void + closure_test_fn5(ffi_cif* cif,void* resp,void** args, void* userdata) + { + *(ffi_arg*)resp = + (int)*(unsigned long long *)args[0] + (int)*(unsigned long long *)args[1] + + (int)*(unsigned long long *)args[2] + (int)*(unsigned long long *)args[3] + + (int)*(unsigned long long *)args[4] + (int)*(unsigned long long *)args[5] + + (int)*(unsigned long long *)args[6] + (int)*(unsigned long long *)args[7] + + (int)*(unsigned long long *)args[8] + (int)*(unsigned long long *)args[9] + + (int)*(int *)args[10] + + (int)*(unsigned long long *)args[11] + + (int)*(unsigned long long *)args[12] + + (int)*(unsigned long long *)args[13] + + (int)*(unsigned long long *)args[14] + + *(int *)args[15] + (int)(long)userdata; + + printf("%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d: %d\n", + (int)*(unsigned long long *)args[0], + (int)*(unsigned long long *)args[1], + (int)*(unsigned long long *)args[2], + (int)*(unsigned long long *)args[3], + (int)*(unsigned long long *)args[4], + (int)*(unsigned long long *)args[5], + (int)*(unsigned long long *)args[6], + (int)*(unsigned long long *)args[7], + (int)*(unsigned long long *)args[8], + (int)*(unsigned long long *)args[9], + (int)*(int *)args[10], + (int)*(unsigned long long *)args[11], + (int)*(unsigned long long *)args[12], + (int)*(unsigned long long *)args[13], + (int)*(unsigned long long *)args[14], + *(int *)args[15], + (int)(long)userdata, (int)*(ffi_arg *)resp); + + } + + typedef int (*closure_test_type0)(unsigned long long, unsigned long long, + unsigned long long, unsigned long long, + unsigned long long, unsigned long long, + unsigned long long, unsigned long long, + unsigned long long, unsigned long long, + int, unsigned long long, + unsigned long long, unsigned long long, + unsigned long long, int); + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + ffi_type * cl_arg_types[17]; + int i, res; + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + for (i = 0; i < 10; i++) { + cl_arg_types[i] = &ffi_type_uint64; + } + cl_arg_types[10] = &ffi_type_uint; + for (i = 11; i < 15; i++) { + cl_arg_types[i] = &ffi_type_uint64; + } + cl_arg_types[15] = &ffi_type_uint; + cl_arg_types[16] = NULL; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 16, + &ffi_type_sint, cl_arg_types) == FFI_OK); + + CHECK(ffi_prep_closure(pcl, &cif, closure_test_fn5, + (void *) 3 /* userdata */) == FFI_OK); + + res = (*((closure_test_type0)pcl)) + (1LL, 2LL, 3LL, 4LL, 127LL, 429LL, 7LL, 8LL, 9LL, 10LL, 11, 12LL, + 13LL, 19LL, 21LL, 1); + /* { dg-output "1 2 3 4 127 429 7 8 9 10 11 12 13 19 21 1 3: 680" } */ + printf("res: %d\n",res); + /* { dg-output "\nres: 680" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_1_1byte.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_1_1byte.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_1_1byte.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_1_1byte.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,94 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure passing with different structure size. + Especially with small structures which may fit in one + register. Depending on the ABI. + Limitations: none. + PR: none. + Originator: 20030902 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_1_1byte { + unsigned char a; + } cls_struct_1_1byte; + + cls_struct_1_1byte cls_struct_1_1byte_fn(struct cls_struct_1_1byte a1, + struct cls_struct_1_1byte a2) + { + struct cls_struct_1_1byte result; + + result.a = a1.a + a2.a; + + printf("%d %d: %d\n", a1.a, a2.a, result.a); + + return result; + } + + static void + cls_struct_1_1byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + + struct cls_struct_1_1byte a1, a2; + + a1 = *(struct cls_struct_1_1byte*)(args[0]); + a2 = *(struct cls_struct_1_1byte*)(args[1]); + + *(cls_struct_1_1byte*)resp = cls_struct_1_1byte_fn(a1, a2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[5]; + ffi_type* cls_struct_fields[2]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[5]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_1_1byte g_dbl = { 12 }; + struct cls_struct_1_1byte f_dbl = { 178 }; + struct cls_struct_1_1byte res_dbl; + + cls_struct_fields[0] = &ffi_type_uchar; + cls_struct_fields[1] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &g_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_1_1byte_fn), &res_dbl, args_dbl); + /* { dg-output "12 178: 190" } */ + printf("res: %d\n", res_dbl.a); + /* { dg-output "\nres: 190" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_1_1byte_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_1_1byte(*)(cls_struct_1_1byte, cls_struct_1_1byte))(pcl))(g_dbl, f_dbl); + /* { dg-output "\n12 178: 190" } */ + printf("res: %d\n", res_dbl.a); + /* { dg-output "\nres: 190" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_12byte.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_12byte.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_12byte.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_12byte.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,97 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure passing with different structure size. + Limitations: none. + PR: none. + Originator: 20030828 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_12byte { + int a; + int b; + int c; + } cls_struct_12byte; + + cls_struct_12byte cls_struct_12byte_fn(struct cls_struct_12byte b1, + struct cls_struct_12byte b2) + { + struct cls_struct_12byte result; + + result.a = b1.a + b2.a; + result.b = b1.b + b2.b; + result.c = b1.c + b2.c; + + printf("%d %d %d %d %d %d: %d %d %d\n", b1.a, b1.b, b1.c, b2.a, b2.b, b2.c, + result.a, result.b, result.c); + + return result; + } + + static void cls_struct_12byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + struct cls_struct_12byte b1, b2; + + b1 = *(struct cls_struct_12byte*)(args[0]); + b2 = *(struct cls_struct_12byte*)(args[1]); + + *(cls_struct_12byte*)resp = cls_struct_12byte_fn(b1, b2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[5]; + ffi_type* cls_struct_fields[4]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[5]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_12byte h_dbl = { 7, 4, 9 }; + struct cls_struct_12byte j_dbl = { 1, 5, 3 }; + struct cls_struct_12byte res_dbl; + + cls_struct_fields[0] = &ffi_type_uint32; + cls_struct_fields[1] = &ffi_type_uint32; + cls_struct_fields[2] = &ffi_type_uint32; + cls_struct_fields[3] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &h_dbl; + args_dbl[1] = &j_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_12byte_fn), &res_dbl, args_dbl); + /* { dg-output "7 4 9 1 5 3: 8 9 12" } */ + printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 8 9 12" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_12byte_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_12byte(*)(cls_struct_12byte, cls_struct_12byte))(pcl))(h_dbl, j_dbl); + /* { dg-output "\n7 4 9 1 5 3: 8 9 12" } */ + printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 8 9 12" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_16byte.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_16byte.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_16byte.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_16byte.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,98 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure passing with different structure size. + Depending on the ABI. Check overlapping. + Limitations: none. + PR: none. + Originator: 20030828 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_16byte { + int a; + double b; + int c; + } cls_struct_16byte; + + cls_struct_16byte cls_struct_16byte_fn(struct cls_struct_16byte b1, + struct cls_struct_16byte b2) + { + struct cls_struct_16byte result; + + result.a = b1.a + b2.a; + result.b = b1.b + b2.b; + result.c = b1.c + b2.c; + + printf("%d %g %d %d %g %d: %d %g %d\n", b1.a, b1.b, b1.c, b2.a, b2.b, b2.c, + result.a, result.b, result.c); + + return result; + } + + static void cls_struct_16byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + struct cls_struct_16byte b1, b2; + + b1 = *(struct cls_struct_16byte*)(args[0]); + b2 = *(struct cls_struct_16byte*)(args[1]); + + *(cls_struct_16byte*)resp = cls_struct_16byte_fn(b1, b2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[5]; + ffi_type* cls_struct_fields[4]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[5]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_16byte h_dbl = { 7, 8.0, 9 }; + struct cls_struct_16byte j_dbl = { 1, 9.0, 3 }; + struct cls_struct_16byte res_dbl; + + cls_struct_fields[0] = &ffi_type_uint32; + cls_struct_fields[1] = &ffi_type_double; + cls_struct_fields[2] = &ffi_type_uint32; + cls_struct_fields[3] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &h_dbl; + args_dbl[1] = &j_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_16byte_fn), &res_dbl, args_dbl); + /* { dg-output "7 8 9 1 9 3: 8 17 12" } */ + printf("res: %d %g %d\n", res_dbl.a, res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 8 17 12" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_16byte_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_16byte(*)(cls_struct_16byte, cls_struct_16byte))(pcl))(h_dbl, j_dbl); + /* { dg-output "\n7 8 9 1 9 3: 8 17 12" } */ + printf("res: %d %g %d\n", res_dbl.a, res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 8 17 12" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_18byte.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_18byte.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_18byte.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_18byte.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,103 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure passing with different structure size. + Depending on the ABI. Double alignment check on darwin. + Limitations: none. + PR: none. + Originator: 20030915 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_18byte { + double a; + unsigned char b; + unsigned char c; + double d; + } cls_struct_18byte; + + cls_struct_18byte cls_struct_18byte_fn(struct cls_struct_18byte a1, + struct cls_struct_18byte a2) + { + struct cls_struct_18byte result; + + result.a = a1.a + a2.a; + result.b = a1.b + a2.b; + result.c = a1.c + a2.c; + result.d = a1.d + a2.d; + + + printf("%g %d %d %g %g %d %d %g: %g %d %d %g\n", a1.a, a1.b, a1.c, a1.d, + a2.a, a2.b, a2.c, a2.d, + result.a, result.b, result.c, result.d); + return result; + } + + static void + cls_struct_18byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + struct cls_struct_18byte a1, a2; + + a1 = *(struct cls_struct_18byte*)(args[0]); + a2 = *(struct cls_struct_18byte*)(args[1]); + + *(cls_struct_18byte*)resp = cls_struct_18byte_fn(a1, a2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[3]; + ffi_type* cls_struct_fields[5]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[3]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_18byte g_dbl = { 1.0, 127, 126, 3.0 }; + struct cls_struct_18byte f_dbl = { 4.0, 125, 124, 5.0 }; + struct cls_struct_18byte res_dbl; + + cls_struct_fields[0] = &ffi_type_double; + cls_struct_fields[1] = &ffi_type_uchar; + cls_struct_fields[2] = &ffi_type_uchar; + cls_struct_fields[3] = &ffi_type_double; + cls_struct_fields[4] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &g_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_18byte_fn), &res_dbl, args_dbl); + /* { dg-output "1 127 126 3 4 125 124 5: 5 252 250 8" } */ + printf("res: %g %d %d %g\n", res_dbl.a, res_dbl.b, res_dbl.c, res_dbl.d); + /* { dg-output "\nres: 5 252 250 8" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_18byte_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_18byte(*)(cls_struct_18byte, cls_struct_18byte))(pcl))(g_dbl, f_dbl); + /* { dg-output "\n1 127 126 3 4 125 124 5: 5 252 250 8" } */ + printf("res: %g %d %d %g\n", res_dbl.a, res_dbl.b, res_dbl.c, res_dbl.d); + /* { dg-output "\nres: 5 252 250 8" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_19byte.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_19byte.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_19byte.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_19byte.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,109 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure passing with different structure size. + Depending on the ABI. Double alignment check on darwin. + Limitations: none. + PR: none. + Originator: 20030915 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_19byte { + double a; + unsigned char b; + unsigned char c; + double d; + unsigned char e; + } cls_struct_19byte; + + cls_struct_19byte cls_struct_19byte_fn(struct cls_struct_19byte a1, + struct cls_struct_19byte a2) + { + struct cls_struct_19byte result; + + result.a = a1.a + a2.a; + result.b = a1.b + a2.b; + result.c = a1.c + a2.c; + result.d = a1.d + a2.d; + result.e = a1.e + a2.e; + + + printf("%g %d %d %g %d %g %d %d %g %d: %g %d %d %g %d\n", + a1.a, a1.b, a1.c, a1.d, a1.e, + a2.a, a2.b, a2.c, a2.d, a2.e, + result.a, result.b, result.c, result.d, result.e); + return result; + } + + static void + cls_struct_19byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + struct cls_struct_19byte a1, a2; + + a1 = *(struct cls_struct_19byte*)(args[0]); + a2 = *(struct cls_struct_19byte*)(args[1]); + + *(cls_struct_19byte*)resp = cls_struct_19byte_fn(a1, a2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[3]; + ffi_type* cls_struct_fields[6]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[3]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_19byte g_dbl = { 1.0, 127, 126, 3.0, 120 }; + struct cls_struct_19byte f_dbl = { 4.0, 125, 124, 5.0, 119 }; + struct cls_struct_19byte res_dbl; + + cls_struct_fields[0] = &ffi_type_double; + cls_struct_fields[1] = &ffi_type_uchar; + cls_struct_fields[2] = &ffi_type_uchar; + cls_struct_fields[3] = &ffi_type_double; + cls_struct_fields[4] = &ffi_type_uchar; + cls_struct_fields[5] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &g_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_19byte_fn), &res_dbl, args_dbl); + /* { dg-output "1 127 126 3 120 4 125 124 5 119: 5 252 250 8 239" } */ + printf("res: %g %d %d %g %d\n", res_dbl.a, res_dbl.b, res_dbl.c, + res_dbl.d, res_dbl.e); + /* { dg-output "\nres: 5 252 250 8 239" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_19byte_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_19byte(*)(cls_struct_19byte, cls_struct_19byte))(pcl))(g_dbl, f_dbl); + /* { dg-output "\n1 127 126 3 120 4 125 124 5 119: 5 252 250 8 239" } */ + printf("res: %g %d %d %g %d\n", res_dbl.a, res_dbl.b, res_dbl.c, + res_dbl.d, res_dbl.e); + /* { dg-output "\nres: 5 252 250 8 239" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_20byte1.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_20byte1.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_20byte1.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_20byte1.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,98 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure passing with different structure size. + Depending on the ABI. Check overlapping. + Limitations: none. + PR: none. + Originator: 20030828 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_20byte { + int a; + double b; + double c; + } cls_struct_20byte; + + cls_struct_20byte cls_struct_20byte_fn(struct cls_struct_20byte a1, + struct cls_struct_20byte a2) + { + struct cls_struct_20byte result; + + result.a = a1.a + a2.a; + result.b = a1.b + a2.b; + result.c = a1.c + a2.c; + + printf("%d %g %g %d %g %g: %d %g %g\n", a1.a, a1.b, a1.c, a2.a, a2.b, a2.c, + result.a, result.b, result.c); + return result; + } + + static void + cls_struct_20byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + struct cls_struct_20byte a1, a2; + + a1 = *(struct cls_struct_20byte*)(args[0]); + a2 = *(struct cls_struct_20byte*)(args[1]); + + *(cls_struct_20byte*)resp = cls_struct_20byte_fn(a1, a2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[3]; + ffi_type* cls_struct_fields[4]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[3]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_20byte g_dbl = { 1, 2.0, 3.0 }; + struct cls_struct_20byte f_dbl = { 4, 5.0, 7.0 }; + struct cls_struct_20byte res_dbl; + + cls_struct_fields[0] = &ffi_type_uint32; + cls_struct_fields[1] = &ffi_type_double; + cls_struct_fields[2] = &ffi_type_double; + cls_struct_fields[3] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &g_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_20byte_fn), &res_dbl, args_dbl); + /* { dg-output "1 2 3 4 5 7: 5 7 10" } */ + printf("res: %d %g %g\n", res_dbl.a, res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 5 7 10" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_20byte_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_20byte(*)(cls_struct_20byte, cls_struct_20byte))(pcl))(g_dbl, f_dbl); + /* { dg-output "\n1 2 3 4 5 7: 5 7 10" } */ + printf("res: %d %g %g\n", res_dbl.a, res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 5 7 10" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_20byte.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_20byte.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_20byte.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_20byte.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,98 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure passing with different structure size. + Depending on the ABI. Check overlapping. + Limitations: none. + PR: none. + Originator: 20030828 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_20byte { + double a; + double b; + int c; + } cls_struct_20byte; + + cls_struct_20byte cls_struct_20byte_fn(struct cls_struct_20byte a1, + struct cls_struct_20byte a2) + { + struct cls_struct_20byte result; + + result.a = a1.a + a2.a; + result.b = a1.b + a2.b; + result.c = a1.c + a2.c; + + printf("%g %g %d %g %g %d: %g %g %d\n", a1.a, a1.b, a1.c, a2.a, a2.b, a2.c, + result.a, result.b, result.c); + return result; + } + + static void + cls_struct_20byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + struct cls_struct_20byte a1, a2; + + a1 = *(struct cls_struct_20byte*)(args[0]); + a2 = *(struct cls_struct_20byte*)(args[1]); + + *(cls_struct_20byte*)resp = cls_struct_20byte_fn(a1, a2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[5]; + ffi_type* cls_struct_fields[4]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[5]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_20byte g_dbl = { 1.0, 2.0, 3 }; + struct cls_struct_20byte f_dbl = { 4.0, 5.0, 7 }; + struct cls_struct_20byte res_dbl; + + cls_struct_fields[0] = &ffi_type_double; + cls_struct_fields[1] = &ffi_type_double; + cls_struct_fields[2] = &ffi_type_uint32; + cls_struct_fields[3] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &g_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_20byte_fn), &res_dbl, args_dbl); + /* { dg-output "1 2 3 4 5 7: 5 7 10" } */ + printf("res: %g %g %d\n", res_dbl.a, res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 5 7 10" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_20byte_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_20byte(*)(cls_struct_20byte, cls_struct_20byte))(pcl))(g_dbl, f_dbl); + /* { dg-output "\n1 2 3 4 5 7: 5 7 10" } */ + printf("res: %g %g %d\n", res_dbl.a, res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 5 7 10" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_24byte.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_24byte.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_24byte.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_24byte.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,120 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure passing with different structure size. + Depending on the ABI. Check overlapping. + Limitations: none. + PR: none. + Originator: 20030828 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_24byte { + double a; + double b; + int c; + float d; + } cls_struct_24byte; + + cls_struct_24byte cls_struct_24byte_fn(struct cls_struct_24byte b0, + struct cls_struct_24byte b1, + struct cls_struct_24byte b2, + struct cls_struct_24byte b3) + { + struct cls_struct_24byte result; + + result.a = b0.a + b1.a + b2.a + b3.a; + result.b = b0.b + b1.b + b2.b + b3.b; + result.c = b0.c + b1.c + b2.c + b3.c; + result.d = b0.d + b1.d + b2.d + b3.d; + + printf("%g %g %d %g %g %g %d %g %g %g %d %g %g %g %d %g: %g %g %d %g\n", + b0.a, b0.b, b0.c, b0.d, + b1.a, b1.b, b1.c, b1.d, + b2.a, b2.b, b2.c, b2.d, + b3.a, b3.b, b3.c, b2.d, + result.a, result.b, result.c, result.d); + + return result; + } + + static void + cls_struct_24byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + struct cls_struct_24byte b0, b1, b2, b3; + + b0 = *(struct cls_struct_24byte*)(args[0]); + b1 = *(struct cls_struct_24byte*)(args[1]); + b2 = *(struct cls_struct_24byte*)(args[2]); + b3 = *(struct cls_struct_24byte*)(args[3]); + + *(cls_struct_24byte*)resp = cls_struct_24byte_fn(b0, b1, b2, b3); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[5]; + ffi_type* cls_struct_fields[5]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[5]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_24byte e_dbl = { 9.0, 2.0, 6, 5.0 }; + struct cls_struct_24byte f_dbl = { 1.0, 2.0, 3, 7.0 }; + struct cls_struct_24byte g_dbl = { 4.0, 5.0, 7, 9.0 }; + struct cls_struct_24byte h_dbl = { 8.0, 6.0, 1, 4.0 }; + struct cls_struct_24byte res_dbl; + + cls_struct_fields[0] = &ffi_type_double; + cls_struct_fields[1] = &ffi_type_double; + cls_struct_fields[2] = &ffi_type_uint32; + cls_struct_fields[3] = &ffi_type_float; + cls_struct_fields[4] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = &cls_struct_type; + dbl_arg_types[3] = &cls_struct_type; + dbl_arg_types[4] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 4, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &e_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = &g_dbl; + args_dbl[3] = &h_dbl; + args_dbl[4] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_24byte_fn), &res_dbl, args_dbl); + /* { dg-output "9 2 6 5 1 2 3 7 4 5 7 9 8 6 1 9: 22 15 17 25" } */ + printf("res: %g %g %d %g\n", res_dbl.a, res_dbl.b, res_dbl.c, res_dbl.d); + /* { dg-output "\nres: 22 15 17 25" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_24byte_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_24byte(*)(cls_struct_24byte, + cls_struct_24byte, + cls_struct_24byte, + cls_struct_24byte)) + (pcl))(e_dbl, f_dbl, g_dbl, h_dbl); + /* { dg-output "\n9 2 6 5 1 2 3 7 4 5 7 9 8 6 1 9: 22 15 17 25" } */ + printf("res: %g %g %d %g\n", res_dbl.a, res_dbl.b, res_dbl.c, res_dbl.d); + /* { dg-output "\nres: 22 15 17 25" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_2byte.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_2byte.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_2byte.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_2byte.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,97 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure passing with different structure size. + Especially with small structures which may fit in one + register. Depending on the ABI. + Limitations: none. + PR: none. + Originator: 20030828 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_2byte { + unsigned char a; + unsigned char b; + } cls_struct_2byte; + + cls_struct_2byte cls_struct_2byte_fn(struct cls_struct_2byte a1, + struct cls_struct_2byte a2) + { + struct cls_struct_2byte result; + + result.a = a1.a + a2.a; + result.b = a1.b + a2.b; + + printf("%d %d %d %d: %d %d\n", a1.a, a1.b, a2.a, a2.b, result.a, result.b); + + return result; + } + + static void + cls_struct_2byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + + struct cls_struct_2byte a1, a2; + + a1 = *(struct cls_struct_2byte*)(args[0]); + a2 = *(struct cls_struct_2byte*)(args[1]); + + *(cls_struct_2byte*)resp = cls_struct_2byte_fn(a1, a2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[5]; + ffi_type* cls_struct_fields[4]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[5]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_2byte g_dbl = { 12, 127 }; + struct cls_struct_2byte f_dbl = { 1, 13 }; + struct cls_struct_2byte res_dbl; + + cls_struct_fields[0] = &ffi_type_uchar; + cls_struct_fields[1] = &ffi_type_uchar; + cls_struct_fields[2] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &g_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_2byte_fn), &res_dbl, args_dbl); + /* { dg-output "12 127 1 13: 13 140" } */ + printf("res: %d %d\n", res_dbl.a, res_dbl.b); + /* { dg-output "\nres: 13 140" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_2byte_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_2byte(*)(cls_struct_2byte, cls_struct_2byte))(pcl))(g_dbl, f_dbl); + /* { dg-output "\n12 127 1 13: 13 140" } */ + printf("res: %d %d\n", res_dbl.a, res_dbl.b); + /* { dg-output "\nres: 13 140" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_3_1byte.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_3_1byte.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_3_1byte.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_3_1byte.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,102 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure passing with different structure size. + Especially with small structures which may fit in one + register. Depending on the ABI. + Limitations: none. + PR: none. + Originator: 20030902 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_3_1byte { + unsigned char a; + unsigned char b; + unsigned char c; + } cls_struct_3_1byte; + + cls_struct_3_1byte cls_struct_3_1byte_fn(struct cls_struct_3_1byte a1, + struct cls_struct_3_1byte a2) + { + struct cls_struct_3_1byte result; + + result.a = a1.a + a2.a; + result.b = a1.b + a2.b; + result.c = a1.c + a2.c; + + printf("%d %d %d %d %d %d: %d %d %d\n", a1.a, a1.b, a1.c, + a2.a, a2.b, a2.c, + result.a, result.b, result.c); + + return result; + } + + static void + cls_struct_3_1byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + + struct cls_struct_3_1byte a1, a2; + + a1 = *(struct cls_struct_3_1byte*)(args[0]); + a2 = *(struct cls_struct_3_1byte*)(args[1]); + + *(cls_struct_3_1byte*)resp = cls_struct_3_1byte_fn(a1, a2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[5]; + ffi_type* cls_struct_fields[4]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[5]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_3_1byte g_dbl = { 12, 13, 14 }; + struct cls_struct_3_1byte f_dbl = { 178, 179, 180 }; + struct cls_struct_3_1byte res_dbl; + + cls_struct_fields[0] = &ffi_type_uchar; + cls_struct_fields[1] = &ffi_type_uchar; + cls_struct_fields[2] = &ffi_type_uchar; + cls_struct_fields[3] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &g_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_3_1byte_fn), &res_dbl, args_dbl); + /* { dg-output "12 13 14 178 179 180: 190 192 194" } */ + printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 190 192 194" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_3_1byte_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_3_1byte(*)(cls_struct_3_1byte, cls_struct_3_1byte))(pcl))(g_dbl, f_dbl); + /* { dg-output "\n12 13 14 178 179 180: 190 192 194" } */ + printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 190 192 194" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_3byte1.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_3byte1.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_3byte1.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_3byte1.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,97 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure passing with different structure size. + Especially with small structures which may fit in one + register. Depending on the ABI. Check overlapping. + Limitations: none. + PR: none. + Originator: 20030828 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_3byte { + unsigned short a; + unsigned char b; + } cls_struct_3byte; + + cls_struct_3byte cls_struct_3byte_fn(struct cls_struct_3byte a1, + struct cls_struct_3byte a2) + { + struct cls_struct_3byte result; + + result.a = a1.a + a2.a; + result.b = a1.b + a2.b; + + printf("%d %d %d %d: %d %d\n", a1.a, a1.b, a2.a, a2.b, result.a, result.b); + + return result; + } + + static void + cls_struct_3byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + + struct cls_struct_3byte a1, a2; + + a1 = *(struct cls_struct_3byte*)(args[0]); + a2 = *(struct cls_struct_3byte*)(args[1]); + + *(cls_struct_3byte*)resp = cls_struct_3byte_fn(a1, a2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[5]; + ffi_type* cls_struct_fields[4]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[5]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_3byte g_dbl = { 12, 119 }; + struct cls_struct_3byte f_dbl = { 1, 15 }; + struct cls_struct_3byte res_dbl; + + cls_struct_fields[0] = &ffi_type_ushort; + cls_struct_fields[1] = &ffi_type_uchar; + cls_struct_fields[2] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &g_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_3byte_fn), &res_dbl, args_dbl); + /* { dg-output "12 119 1 15: 13 134" } */ + printf("res: %d %d\n", res_dbl.a, res_dbl.b); + /* { dg-output "\nres: 13 134" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_3byte_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_3byte(*)(cls_struct_3byte, cls_struct_3byte))(pcl))(g_dbl, f_dbl); + /* { dg-output "\n12 119 1 15: 13 134" } */ + printf("res: %d %d\n", res_dbl.a, res_dbl.b); + /* { dg-output "\nres: 13 134" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_3byte2.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_3byte2.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_3byte2.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_3byte2.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,97 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure passing with different structure size. + Especially with small structures which may fit in one + register. Depending on the ABI. Check overlapping. + Limitations: none. + PR: none. + Originator: 20030828 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_3byte_1 { + unsigned char a; + unsigned short b; + } cls_struct_3byte_1; + + cls_struct_3byte_1 cls_struct_3byte_fn1(struct cls_struct_3byte_1 a1, + struct cls_struct_3byte_1 a2) + { + struct cls_struct_3byte_1 result; + + result.a = a1.a + a2.a; + result.b = a1.b + a2.b; + + printf("%d %d %d %d: %d %d\n", a1.a, a1.b, a2.a, a2.b, result.a, result.b); + + return result; + } + + static void + cls_struct_3byte_gn1(ffi_cif* cif, void* resp, void** args, void* userdata) + { + + struct cls_struct_3byte_1 a1, a2; + + a1 = *(struct cls_struct_3byte_1*)(args[0]); + a2 = *(struct cls_struct_3byte_1*)(args[1]); + + *(cls_struct_3byte_1*)resp = cls_struct_3byte_fn1(a1, a2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[5]; + ffi_type* cls_struct_fields[4]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[5]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_3byte_1 g_dbl = { 15, 125 }; + struct cls_struct_3byte_1 f_dbl = { 9, 19 }; + struct cls_struct_3byte_1 res_dbl; + + cls_struct_fields[0] = &ffi_type_uchar; + cls_struct_fields[1] = &ffi_type_ushort; + cls_struct_fields[2] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &g_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_3byte_fn1), &res_dbl, args_dbl); + /* { dg-output "15 125 9 19: 24 144" } */ + printf("res: %d %d\n", res_dbl.a, res_dbl.b); + /* { dg-output "\nres: 24 144" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_3byte_gn1, NULL) == FFI_OK); + + res_dbl = ((cls_struct_3byte_1(*)(cls_struct_3byte_1, cls_struct_3byte_1))(pcl))(g_dbl, f_dbl); + /* { dg-output "\n15 125 9 19: 24 144" } */ + printf("res: %d %d\n", res_dbl.a, res_dbl.b); + /* { dg-output "\nres: 24 144" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_4_1byte.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_4_1byte.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_4_1byte.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_4_1byte.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,105 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure passing with different structure size. + Especially with small structures which may fit in one + register. Depending on the ABI. + Limitations: none. + PR: none. + Originator: 20030902 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_4_1byte { + unsigned char a; + unsigned char b; + unsigned char c; + unsigned char d; + } cls_struct_4_1byte; + + cls_struct_4_1byte cls_struct_4_1byte_fn(struct cls_struct_4_1byte a1, + struct cls_struct_4_1byte a2) + { + struct cls_struct_4_1byte result; + + result.a = a1.a + a2.a; + result.b = a1.b + a2.b; + result.c = a1.c + a2.c; + result.d = a1.d + a2.d; + + printf("%d %d %d %d %d %d %d %d: %d %d %d %d\n", a1.a, a1.b, a1.c, a1.d, + a2.a, a2.b, a2.c, a2.d, + result.a, result.b, result.c, result.d); + + return result; + } + + static void + cls_struct_4_1byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + + struct cls_struct_4_1byte a1, a2; + + a1 = *(struct cls_struct_4_1byte*)(args[0]); + a2 = *(struct cls_struct_4_1byte*)(args[1]); + + *(cls_struct_4_1byte*)resp = cls_struct_4_1byte_fn(a1, a2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[5]; + ffi_type* cls_struct_fields[5]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[5]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_4_1byte g_dbl = { 12, 13, 14, 15 }; + struct cls_struct_4_1byte f_dbl = { 178, 179, 180, 181 }; + struct cls_struct_4_1byte res_dbl; + + cls_struct_fields[0] = &ffi_type_uchar; + cls_struct_fields[1] = &ffi_type_uchar; + cls_struct_fields[2] = &ffi_type_uchar; + cls_struct_fields[3] = &ffi_type_uchar; + cls_struct_fields[4] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &g_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_4_1byte_fn), &res_dbl, args_dbl); + /* { dg-output "12 13 14 15 178 179 180 181: 190 192 194 196" } */ + printf("res: %d %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c, res_dbl.d); + /* { dg-output "\nres: 190 192 194 196" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_4_1byte_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_4_1byte(*)(cls_struct_4_1byte, cls_struct_4_1byte))(pcl))(g_dbl, f_dbl); + /* { dg-output "\n12 13 14 15 178 179 180 181: 190 192 194 196" } */ + printf("res: %d %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c, res_dbl.d); + /* { dg-output "\nres: 190 192 194 196" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_4byte.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_4byte.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_4byte.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_4byte.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,97 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure passing with different structure size. + Depending on the ABI. Check overlapping. + Limitations: none. + PR: none. + Originator: 20030828 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + + #include "ffitest.h" + + typedef struct cls_struct_4byte { + unsigned short a; + unsigned short b; + } cls_struct_4byte; + + cls_struct_4byte cls_struct_4byte_fn(struct cls_struct_4byte a1, + struct cls_struct_4byte a2) + { + struct cls_struct_4byte result; + + result.a = a1.a + a2.a; + result.b = a1.b + a2.b; + + printf("%d %d %d %d: %d %d\n", a1.a, a1.b, a2.a, a2.b, result.a, result.b); + + return result; + } + + static void + cls_struct_4byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + + struct cls_struct_4byte a1, a2; + + a1 = *(struct cls_struct_4byte*)(args[0]); + a2 = *(struct cls_struct_4byte*)(args[1]); + + *(cls_struct_4byte*)resp = cls_struct_4byte_fn(a1, a2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[5]; + ffi_type* cls_struct_fields[4]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[5]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_4byte g_dbl = { 127, 120 }; + struct cls_struct_4byte f_dbl = { 12, 128 }; + struct cls_struct_4byte res_dbl; + + cls_struct_fields[0] = &ffi_type_ushort; + cls_struct_fields[1] = &ffi_type_ushort; + cls_struct_fields[2] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &g_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_4byte_fn), &res_dbl, args_dbl); + /* { dg-output "127 120 12 128: 139 248" } */ + printf("res: %d %d\n", res_dbl.a, res_dbl.b); + /* { dg-output "\nres: 139 248" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_4byte_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_4byte(*)(cls_struct_4byte, cls_struct_4byte))(pcl))(g_dbl, f_dbl); + /* { dg-output "\n127 120 12 128: 139 248" } */ + printf("res: %d %d\n", res_dbl.a, res_dbl.b); + /* { dg-output "\nres: 139 248" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_5byte.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_5byte.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_5byte.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_5byte.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,101 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure passing with different structure size. + Depending on the ABI. Check overlapping. + Limitations: none. + PR: none. + Originator: 20030828 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_5byte { + unsigned short a; + unsigned short b; + unsigned char c; + } cls_struct_5byte; + + cls_struct_5byte cls_struct_5byte_fn(struct cls_struct_5byte a1, + struct cls_struct_5byte a2) + { + struct cls_struct_5byte result; + + result.a = a1.a + a2.a; + result.b = a1.b + a2.b; + result.c = a1.c + a2.c; + + printf("%d %d %d %d %d %d: %d %d %d\n", a1.a, a1.b, a1.c, + a2.a, a2.b, a2.c, + result.a, result.b, result.c); + + return result; + } + + static void + cls_struct_5byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + + struct cls_struct_5byte a1, a2; + + a1 = *(struct cls_struct_5byte*)(args[0]); + a2 = *(struct cls_struct_5byte*)(args[1]); + + *(cls_struct_5byte*)resp = cls_struct_5byte_fn(a1, a2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[5]; + ffi_type* cls_struct_fields[4]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[5]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_5byte g_dbl = { 127, 120, 1 }; + struct cls_struct_5byte f_dbl = { 12, 128, 9 }; + struct cls_struct_5byte res_dbl; + + cls_struct_fields[0] = &ffi_type_ushort; + cls_struct_fields[1] = &ffi_type_ushort; + cls_struct_fields[2] = &ffi_type_uchar; + cls_struct_fields[3] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &g_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_5byte_fn), &res_dbl, args_dbl); + /* { dg-output "127 120 1 12 128 9: 139 248 10" } */ + printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 139 248 10" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_5byte_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_5byte(*)(cls_struct_5byte, cls_struct_5byte))(pcl))(g_dbl, f_dbl); + /* { dg-output "\n127 120 1 12 128 9: 139 248 10" } */ + printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 139 248 10" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_64byte.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_64byte.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_64byte.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_64byte.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,131 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure passing with different structure size. + Depending on the ABI. Check bigger struct which overlaps + the gp and fp register count on Darwin/AIX/ppc64. + Limitations: none. + PR: none. + Originator: 20030828 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_64byte { + double a; + double b; + double c; + double d; + double e; + double f; + double g; + double h; + } cls_struct_64byte; + + cls_struct_64byte cls_struct_64byte_fn(struct cls_struct_64byte b0, + struct cls_struct_64byte b1, + struct cls_struct_64byte b2, + struct cls_struct_64byte b3) + { + struct cls_struct_64byte result; + + result.a = b0.a + b1.a + b2.a + b3.a; + result.b = b0.b + b1.b + b2.b + b3.b; + result.c = b0.c + b1.c + b2.c + b3.c; + result.d = b0.d + b1.d + b2.d + b3.d; + result.e = b0.e + b1.e + b2.e + b3.e; + result.f = b0.f + b1.f + b2.f + b3.f; + result.g = b0.g + b1.g + b2.g + b3.g; + result.h = b0.h + b1.h + b2.h + b3.h; + + printf("%g %g %g %g %g %g %g %g\n", result.a, result.b, result.c, + result.d, result.e, result.f, result.g, result.h); + + return result; + } + + static void + cls_struct_64byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + struct cls_struct_64byte b0, b1, b2, b3; + + b0 = *(struct cls_struct_64byte*)(args[0]); + b1 = *(struct cls_struct_64byte*)(args[1]); + b2 = *(struct cls_struct_64byte*)(args[2]); + b3 = *(struct cls_struct_64byte*)(args[3]); + + *(cls_struct_64byte*)resp = cls_struct_64byte_fn(b0, b1, b2, b3); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[5]; + ffi_type* cls_struct_fields[9]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[5]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_64byte e_dbl = { 9.0, 2.0, 6.0, 5.0, 3.0, 4.0, 8.0, 1.0 }; + struct cls_struct_64byte f_dbl = { 1.0, 2.0, 3.0, 7.0, 2.0, 5.0, 6.0, 7.0 }; + struct cls_struct_64byte g_dbl = { 4.0, 5.0, 7.0, 9.0, 1.0, 1.0, 2.0, 9.0 }; + struct cls_struct_64byte h_dbl = { 8.0, 6.0, 1.0, 4.0, 0.0, 3.0, 3.0, 1.0 }; + struct cls_struct_64byte res_dbl; + + cls_struct_fields[0] = &ffi_type_double; + cls_struct_fields[1] = &ffi_type_double; + cls_struct_fields[2] = &ffi_type_double; + cls_struct_fields[3] = &ffi_type_double; + cls_struct_fields[4] = &ffi_type_double; + cls_struct_fields[5] = &ffi_type_double; + cls_struct_fields[6] = &ffi_type_double; + cls_struct_fields[7] = &ffi_type_double; + cls_struct_fields[8] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = &cls_struct_type; + dbl_arg_types[3] = &cls_struct_type; + dbl_arg_types[4] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 4, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &e_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = &g_dbl; + args_dbl[3] = &h_dbl; + args_dbl[4] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_64byte_fn), &res_dbl, args_dbl); + /* { dg-output "22 15 17 25 6 13 19 18" } */ + printf("res: %g %g %g %g %g %g %g %g\n", res_dbl.a, res_dbl.b, res_dbl.c, + res_dbl.d, res_dbl.e, res_dbl.f, res_dbl.g, res_dbl.h); + /* { dg-output "\nres: 22 15 17 25 6 13 19 18" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_64byte_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_64byte(*)(cls_struct_64byte, + cls_struct_64byte, + cls_struct_64byte, + cls_struct_64byte)) + (pcl))(e_dbl, f_dbl, g_dbl, h_dbl); + /* { dg-output "\n22 15 17 25 6 13 19 18" } */ + printf("res: %g %g %g %g %g %g %g %g\n", res_dbl.a, res_dbl.b, res_dbl.c, + res_dbl.d, res_dbl.e, res_dbl.f, res_dbl.g, res_dbl.h); + /* { dg-output "\nres: 22 15 17 25 6 13 19 18" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_6byte.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_6byte.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_6byte.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_6byte.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,105 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure passing with different structure size. + Depending on the ABI. Check overlapping. + Limitations: none. + PR: none. + Originator: 20030828 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_6byte { + unsigned short a; + unsigned short b; + unsigned char c; + unsigned char d; + } cls_struct_6byte; + + cls_struct_6byte cls_struct_6byte_fn(struct cls_struct_6byte a1, + struct cls_struct_6byte a2) + { + struct cls_struct_6byte result; + + result.a = a1.a + a2.a; + result.b = a1.b + a2.b; + result.c = a1.c + a2.c; + result.d = a1.d + a2.d; + + printf("%d %d %d %d %d %d %d %d: %d %d %d %d\n", a1.a, a1.b, a1.c, a1.d, + a2.a, a2.b, a2.c, a2.d, + result.a, result.b, result.c, result.d); + + return result; + } + + static void + cls_struct_6byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + + struct cls_struct_6byte a1, a2; + + a1 = *(struct cls_struct_6byte*)(args[0]); + a2 = *(struct cls_struct_6byte*)(args[1]); + + *(cls_struct_6byte*)resp = cls_struct_6byte_fn(a1, a2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[5]; + ffi_type* cls_struct_fields[5]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[5]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_6byte g_dbl = { 127, 120, 1, 128 }; + struct cls_struct_6byte f_dbl = { 12, 128, 9, 127 }; + struct cls_struct_6byte res_dbl; + + cls_struct_fields[0] = &ffi_type_ushort; + cls_struct_fields[1] = &ffi_type_ushort; + cls_struct_fields[2] = &ffi_type_uchar; + cls_struct_fields[3] = &ffi_type_uchar; + cls_struct_fields[4] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &g_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_6byte_fn), &res_dbl, args_dbl); + /* { dg-output "127 120 1 128 12 128 9 127: 139 248 10 255" } */ + printf("res: %d %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c, res_dbl.d); + /* { dg-output "\nres: 139 248 10 255" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_6byte_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_6byte(*)(cls_struct_6byte, cls_struct_6byte))(pcl))(g_dbl, f_dbl); + /* { dg-output "\n127 120 1 128 12 128 9 127: 139 248 10 255" } */ + printf("res: %d %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c, res_dbl.d); + /* { dg-output "\nres: 139 248 10 255" } */ + + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_7byte.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_7byte.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_7byte.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_7byte.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,104 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure passing with different structure size. + Depending on the ABI. Check overlapping. + Limitations: none. + PR: none. + Originator: 20030828 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_7byte { + unsigned short a; + unsigned short b; + unsigned char c; + unsigned short d; + } cls_struct_7byte; + + cls_struct_7byte cls_struct_7byte_fn(struct cls_struct_7byte a1, + struct cls_struct_7byte a2) + { + struct cls_struct_7byte result; + + result.a = a1.a + a2.a; + result.b = a1.b + a2.b; + result.c = a1.c + a2.c; + result.d = a1.d + a2.d; + + printf("%d %d %d %d %d %d %d %d: %d %d %d %d\n", a1.a, a1.b, a1.c, a1.d, + a2.a, a2.b, a2.c, a2.d, + result.a, result.b, result.c, result.d); + + return result; + } + + static void + cls_struct_7byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + + struct cls_struct_7byte a1, a2; + + a1 = *(struct cls_struct_7byte*)(args[0]); + a2 = *(struct cls_struct_7byte*)(args[1]); + + *(cls_struct_7byte*)resp = cls_struct_7byte_fn(a1, a2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[5]; + ffi_type* cls_struct_fields[5]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[5]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_7byte g_dbl = { 127, 120, 1, 254 }; + struct cls_struct_7byte f_dbl = { 12, 128, 9, 255 }; + struct cls_struct_7byte res_dbl; + + cls_struct_fields[0] = &ffi_type_ushort; + cls_struct_fields[1] = &ffi_type_ushort; + cls_struct_fields[2] = &ffi_type_uchar; + cls_struct_fields[3] = &ffi_type_ushort; + cls_struct_fields[4] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &g_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_7byte_fn), &res_dbl, args_dbl); + /* { dg-output "127 120 1 254 12 128 9 255: 139 248 10 509" } */ + printf("res: %d %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c, res_dbl.d); + /* { dg-output "\nres: 139 248 10 509" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_7byte_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_7byte(*)(cls_struct_7byte, cls_struct_7byte))(pcl))(g_dbl, f_dbl); + /* { dg-output "\n127 120 1 254 12 128 9 255: 139 248 10 509" } */ + printf("res: %d %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c, res_dbl.d); + /* { dg-output "\nres: 139 248 10 509" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_8byte.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_8byte.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_8byte.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_8byte.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,95 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure passing with different structure size. + Depending on the ABI. Check overlapping. + Limitations: none. + PR: none. + Originator: 20030828 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_8byte { + int a; + float b; + } cls_struct_8byte; + + cls_struct_8byte cls_struct_8byte_fn(struct cls_struct_8byte a1, + struct cls_struct_8byte a2) + { + struct cls_struct_8byte result; + + result.a = a1.a + a2.a; + result.b = a1.b + a2.b; + + printf("%d %g %d %g: %d %g\n", a1.a, a1.b, a2.a, a2.b, result.a, result.b); + + return result; + } + + static void + cls_struct_8byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + + struct cls_struct_8byte a1, a2; + + a1 = *(struct cls_struct_8byte*)(args[0]); + a2 = *(struct cls_struct_8byte*)(args[1]); + + *(cls_struct_8byte*)resp = cls_struct_8byte_fn(a1, a2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[5]; + ffi_type* cls_struct_fields[4]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[5]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_8byte g_dbl = { 1, 2.0 }; + struct cls_struct_8byte f_dbl = { 4, 5.0 }; + struct cls_struct_8byte res_dbl; + + cls_struct_fields[0] = &ffi_type_uint32; + cls_struct_fields[1] = &ffi_type_float; + cls_struct_fields[2] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &g_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_8byte_fn), &res_dbl, args_dbl); + /* { dg-output "1 2 4 5: 5 7" } */ + printf("res: %d %g\n", res_dbl.a, res_dbl.b); + /* { dg-output "\nres: 5 7" } */ + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_8byte_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_8byte(*)(cls_struct_8byte, cls_struct_8byte))(pcl))(g_dbl, f_dbl); + /* { dg-output "\n1 2 4 5: 5 7" } */ + printf("res: %d %g\n", res_dbl.a, res_dbl.b); + /* { dg-output "\nres: 5 7" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_9byte1.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_9byte1.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_9byte1.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_9byte1.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,98 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure passing with different structure size. + Depending on the ABI. Darwin/AIX do double-word + alignment of the struct if the first element is a double. + Check that it does not here. + Limitations: none. + PR: none. + Originator: 20030914 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_9byte { + int a; + double b; + } cls_struct_9byte; + + cls_struct_9byte cls_struct_9byte_fn(struct cls_struct_9byte b1, + struct cls_struct_9byte b2) + { + struct cls_struct_9byte result; + + result.a = b1.a + b2.a; + result.b = b1.b + b2.b; + + printf("%d %g %d %g: %d %g\n", b1.a, b1.b, b2.a, b2.b, + result.a, result.b); + + return result; + } + + static void cls_struct_9byte_gn(ffi_cif* cif, void* resp, void** args, + void* userdata) + { + struct cls_struct_9byte b1, b2; + + b1 = *(struct cls_struct_9byte*)(args[0]); + b2 = *(struct cls_struct_9byte*)(args[1]); + + *(cls_struct_9byte*)resp = cls_struct_9byte_fn(b1, b2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[3]; + ffi_type* cls_struct_fields[3]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[3]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_9byte h_dbl = { 7, 8.0}; + struct cls_struct_9byte j_dbl = { 1, 9.0}; + struct cls_struct_9byte res_dbl; + + cls_struct_fields[0] = &ffi_type_uint32; + cls_struct_fields[1] = &ffi_type_double; + cls_struct_fields[2] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &h_dbl; + args_dbl[1] = &j_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_9byte_fn), &res_dbl, args_dbl); + /* { dg-output "7 8 1 9: 8 17" } */ + printf("res: %d %g\n", res_dbl.a, res_dbl.b); + /* { dg-output "\nres: 8 17" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_9byte_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_9byte(*)(cls_struct_9byte, cls_struct_9byte))(pcl))(h_dbl, j_dbl); + /* { dg-output "\n7 8 1 9: 8 17" } */ + printf("res: %d %g\n", res_dbl.a, res_dbl.b); + /* { dg-output "\nres: 8 17" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_9byte2.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_9byte2.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_9byte2.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_9byte2.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,99 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure passing with different structure size. + Depending on the ABI. Darwin/AIX do double-word + alignment of the struct if the first element is a double. + Check that it does here. + Limitations: none. + PR: none. + Originator: 20030914 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_9byte { + double a; + int b; + } cls_struct_9byte; + + cls_struct_9byte cls_struct_9byte_fn(struct cls_struct_9byte b1, + struct cls_struct_9byte b2) + { + struct cls_struct_9byte result; + + result.a = b1.a + b2.a; + result.b = b1.b + b2.b; + + printf("%g %d %g %d: %g %d\n", b1.a, b1.b, b2.a, b2.b, + result.a, result.b); + + return result; + } + + static void cls_struct_9byte_gn(ffi_cif* cif, void* resp, void** args, + void* userdata) + { + struct cls_struct_9byte b1, b2; + + b1 = *(struct cls_struct_9byte*)(args[0]); + b2 = *(struct cls_struct_9byte*)(args[1]); + + *(cls_struct_9byte*)resp = cls_struct_9byte_fn(b1, b2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[3]; + ffi_type* cls_struct_fields[3]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[3]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_9byte h_dbl = { 7.0, 8}; + struct cls_struct_9byte j_dbl = { 1.0, 9}; + struct cls_struct_9byte res_dbl; + + cls_struct_fields[0] = &ffi_type_double; + cls_struct_fields[1] = &ffi_type_uint32; + cls_struct_fields[2] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &h_dbl; + args_dbl[1] = &j_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_9byte_fn), &res_dbl, args_dbl); + /* { dg-output "7 8 1 9: 8 17" } */ + printf("res: %g %d\n", res_dbl.a, res_dbl.b); + /* { dg-output "\nres: 8 17" } */ + + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_9byte_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_9byte(*)(cls_struct_9byte, cls_struct_9byte))(pcl))(h_dbl, j_dbl); + /* { dg-output "\n7 8 1 9: 8 17" } */ + printf("res: %g %d\n", res_dbl.a, res_dbl.b); + /* { dg-output "\nres: 8 17" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_align_double.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_align_double.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_align_double.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_align_double.c 2003-12-04 17:51:17.000000000 +0000 *************** *** 0 **** --- 1,98 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure alignment of double. + Limitations: none. + PR: none. + Originator: 20031203 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_align { + unsigned char a; + double b; + unsigned char c; + } cls_struct_align; + + cls_struct_align cls_struct_align_fn(struct cls_struct_align a1, + struct cls_struct_align a2) + { + struct cls_struct_align result; + + result.a = a1.a + a2.a; + result.b = a1.b + a2.b; + result.c = a1.c + a2.c; + + printf("%d %g %d %d %g %d: %d %g %d\n", a1.a, a1.b, a1.c, a2.a, a2.b, a2.c, result.a, result.b, result.c); + + return result; + } + + static void + cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + + struct cls_struct_align a1, a2; + + a1 = *(struct cls_struct_align*)(args[0]); + a2 = *(struct cls_struct_align*)(args[1]); + + *(cls_struct_align*)resp = cls_struct_align_fn(a1, a2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[5]; + ffi_type* cls_struct_fields[4]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[5]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_align g_dbl = { 12, 4951, 127 }; + struct cls_struct_align f_dbl = { 1, 9320, 13 }; + struct cls_struct_align res_dbl; + + cls_struct_fields[0] = &ffi_type_uchar; + cls_struct_fields[1] = &ffi_type_double; + cls_struct_fields[2] = &ffi_type_uchar; + cls_struct_fields[3] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &g_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl); + /* { dg-output "12 4951 127 1 9320 13: 13 14271 140" } */ + printf("res: %d %g %d\n", res_dbl.a, res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 13 14271 140" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_align_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(pcl))(g_dbl, f_dbl); + /* { dg-output "\n12 4951 127 1 9320 13: 13 14271 140" } */ + printf("res: %d %g %d\n", res_dbl.a, res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 13 14271 140" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_align_float.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_align_float.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_align_float.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_align_float.c 2003-12-04 17:51:17.000000000 +0000 *************** *** 0 **** --- 1,98 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure alignment of float. + Limitations: none. + PR: none. + Originator: 20031203 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_align { + unsigned char a; + float b; + unsigned char c; + } cls_struct_align; + + cls_struct_align cls_struct_align_fn(struct cls_struct_align a1, + struct cls_struct_align a2) + { + struct cls_struct_align result; + + result.a = a1.a + a2.a; + result.b = a1.b + a2.b; + result.c = a1.c + a2.c; + + printf("%d %g %d %d %g %d: %d %g %d\n", a1.a, (double)a1.b, a1.c, a2.a, (double)a2.b, a2.c, result.a, (double)result.b, result.c); + + return result; + } + + static void + cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + + struct cls_struct_align a1, a2; + + a1 = *(struct cls_struct_align*)(args[0]); + a2 = *(struct cls_struct_align*)(args[1]); + + *(cls_struct_align*)resp = cls_struct_align_fn(a1, a2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[5]; + ffi_type* cls_struct_fields[4]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[5]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_align g_dbl = { 12, 4951, 127 }; + struct cls_struct_align f_dbl = { 1, 9320, 13 }; + struct cls_struct_align res_dbl; + + cls_struct_fields[0] = &ffi_type_uchar; + cls_struct_fields[1] = &ffi_type_float; + cls_struct_fields[2] = &ffi_type_uchar; + cls_struct_fields[3] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &g_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl); + /* { dg-output "12 4951 127 1 9320 13: 13 14271 140" } */ + printf("res: %d %g %d\n", res_dbl.a, (double)res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 13 14271 140" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_align_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(pcl))(g_dbl, f_dbl); + /* { dg-output "\n12 4951 127 1 9320 13: 13 14271 140" } */ + printf("res: %d %g %d\n", res_dbl.a, (double)res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 13 14271 140" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_align_longdouble.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_align_longdouble.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_align_longdouble.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_align_longdouble.c 2004-03-12 01:35:32.000000000 +0000 *************** *** 0 **** --- 1,100 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure alignment of long double. + Limitations: none. + PR: none. + Originator: 20031203 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + /* { dg-options -mlong-double-128 { target powerpc64*-*-* } } */ + + #include "ffitest.h" + + typedef struct cls_struct_align { + unsigned char a; + long double b; + unsigned char c; + } cls_struct_align; + + cls_struct_align cls_struct_align_fn(struct cls_struct_align a1, + struct cls_struct_align a2) + { + struct cls_struct_align result; + + result.a = a1.a + a2.a; + result.b = a1.b + a2.b; + result.c = a1.c + a2.c; + + printf("%d %g %d %d %g %d: %d %g %d\n", a1.a, (double)a1.b, a1.c, a2.a, (double)a2.b, a2.c, result.a, (double)result.b, result.c); + + return result; + } + + static void + cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + + struct cls_struct_align a1, a2; + + a1 = *(struct cls_struct_align*)(args[0]); + a2 = *(struct cls_struct_align*)(args[1]); + + *(cls_struct_align*)resp = cls_struct_align_fn(a1, a2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[5]; + ffi_type* cls_struct_fields[4]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[5]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_align g_dbl = { 12, 4951, 127 }; + struct cls_struct_align f_dbl = { 1, 9320, 13 }; + struct cls_struct_align res_dbl; + + cls_struct_fields[0] = &ffi_type_uchar; + cls_struct_fields[1] = &ffi_type_longdouble; + cls_struct_fields[2] = &ffi_type_uchar; + cls_struct_fields[3] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &g_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl); + /* { dg-output "12 4951 127 1 9320 13: 13 14271 140" } */ + printf("res: %d %g %d\n", res_dbl.a, (double)res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 13 14271 140" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_align_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(pcl))(g_dbl, f_dbl); + /* { dg-output "\n12 4951 127 1 9320 13: 13 14271 140" } */ + printf("res: %d %g %d\n", res_dbl.a, (double)res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 13 14271 140" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_align_pointer.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_align_pointer.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_align_pointer.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_align_pointer.c 2003-12-10 09:43:29.000000000 +0000 *************** *** 0 **** --- 1,98 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure alignment of pointer. + Limitations: none. + PR: none. + Originator: 20031203 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_align { + unsigned char a; + void *b; + unsigned char c; + } cls_struct_align; + + cls_struct_align cls_struct_align_fn(struct cls_struct_align a1, + struct cls_struct_align a2) + { + struct cls_struct_align result; + + result.a = a1.a + a2.a; + result.b = (void *)((size_t)a1.b + (size_t)a2.b); + result.c = a1.c + a2.c; + + printf("%d %d %d %d %d %d: %d %d %d\n", a1.a, (size_t)a1.b, a1.c, a2.a, (size_t)a2.b, a2.c, result.a, (size_t)result.b, result.c); + + return result; + } + + static void + cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + + struct cls_struct_align a1, a2; + + a1 = *(struct cls_struct_align*)(args[0]); + a2 = *(struct cls_struct_align*)(args[1]); + + *(cls_struct_align*)resp = cls_struct_align_fn(a1, a2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[5]; + ffi_type* cls_struct_fields[4]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[5]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_align g_dbl = { 12, (void *)4951, 127 }; + struct cls_struct_align f_dbl = { 1, (void *)9320, 13 }; + struct cls_struct_align res_dbl; + + cls_struct_fields[0] = &ffi_type_uchar; + cls_struct_fields[1] = &ffi_type_pointer; + cls_struct_fields[2] = &ffi_type_uchar; + cls_struct_fields[3] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &g_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl); + /* { dg-output "12 4951 127 1 9320 13: 13 14271 140" } */ + printf("res: %d %d %d\n", res_dbl.a, (size_t)res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 13 14271 140" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_align_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(pcl))(g_dbl, f_dbl); + /* { dg-output "\n12 4951 127 1 9320 13: 13 14271 140" } */ + printf("res: %d %d %d\n", res_dbl.a, (size_t)res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 13 14271 140" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_align_sint16.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_align_sint16.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_align_sint16.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_align_sint16.c 2003-12-04 17:51:17.000000000 +0000 *************** *** 0 **** --- 1,98 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure alignment of sint16. + Limitations: none. + PR: none. + Originator: 20031203 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_align { + unsigned char a; + signed short b; + unsigned char c; + } cls_struct_align; + + cls_struct_align cls_struct_align_fn(struct cls_struct_align a1, + struct cls_struct_align a2) + { + struct cls_struct_align result; + + result.a = a1.a + a2.a; + result.b = a1.b + a2.b; + result.c = a1.c + a2.c; + + printf("%d %d %d %d %d %d: %d %d %d\n", a1.a, a1.b, a1.c, a2.a, a2.b, a2.c, result.a, result.b, result.c); + + return result; + } + + static void + cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + + struct cls_struct_align a1, a2; + + a1 = *(struct cls_struct_align*)(args[0]); + a2 = *(struct cls_struct_align*)(args[1]); + + *(cls_struct_align*)resp = cls_struct_align_fn(a1, a2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[5]; + ffi_type* cls_struct_fields[4]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[5]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_align g_dbl = { 12, 4951, 127 }; + struct cls_struct_align f_dbl = { 1, 9320, 13 }; + struct cls_struct_align res_dbl; + + cls_struct_fields[0] = &ffi_type_uchar; + cls_struct_fields[1] = &ffi_type_sint16; + cls_struct_fields[2] = &ffi_type_uchar; + cls_struct_fields[3] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &g_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl); + /* { dg-output "12 4951 127 1 9320 13: 13 14271 140" } */ + printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 13 14271 140" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_align_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(pcl))(g_dbl, f_dbl); + /* { dg-output "\n12 4951 127 1 9320 13: 13 14271 140" } */ + printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 13 14271 140" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_align_sint32.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_align_sint32.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_align_sint32.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_align_sint32.c 2003-12-04 17:51:17.000000000 +0000 *************** *** 0 **** --- 1,98 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure alignment of sint32. + Limitations: none. + PR: none. + Originator: 20031203 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_align { + unsigned char a; + signed int b; + unsigned char c; + } cls_struct_align; + + cls_struct_align cls_struct_align_fn(struct cls_struct_align a1, + struct cls_struct_align a2) + { + struct cls_struct_align result; + + result.a = a1.a + a2.a; + result.b = a1.b + a2.b; + result.c = a1.c + a2.c; + + printf("%d %d %d %d %d %d: %d %d %d\n", a1.a, a1.b, a1.c, a2.a, a2.b, a2.c, result.a, result.b, result.c); + + return result; + } + + static void + cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + + struct cls_struct_align a1, a2; + + a1 = *(struct cls_struct_align*)(args[0]); + a2 = *(struct cls_struct_align*)(args[1]); + + *(cls_struct_align*)resp = cls_struct_align_fn(a1, a2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[5]; + ffi_type* cls_struct_fields[4]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[5]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_align g_dbl = { 12, 4951, 127 }; + struct cls_struct_align f_dbl = { 1, 9320, 13 }; + struct cls_struct_align res_dbl; + + cls_struct_fields[0] = &ffi_type_uchar; + cls_struct_fields[1] = &ffi_type_sint32; + cls_struct_fields[2] = &ffi_type_uchar; + cls_struct_fields[3] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &g_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl); + /* { dg-output "12 4951 127 1 9320 13: 13 14271 140" } */ + printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 13 14271 140" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_align_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(pcl))(g_dbl, f_dbl); + /* { dg-output "\n12 4951 127 1 9320 13: 13 14271 140" } */ + printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 13 14271 140" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_align_sint64.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_align_sint64.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_align_sint64.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_align_sint64.c 2003-12-04 17:51:17.000000000 +0000 *************** *** 0 **** --- 1,98 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure alignment of sint64. + Limitations: none. + PR: none. + Originator: 20031203 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_align { + unsigned char a; + signed long long b; + unsigned char c; + } cls_struct_align; + + cls_struct_align cls_struct_align_fn(struct cls_struct_align a1, + struct cls_struct_align a2) + { + struct cls_struct_align result; + + result.a = a1.a + a2.a; + result.b = a1.b + a2.b; + result.c = a1.c + a2.c; + + printf("%d %lld %d %d %lld %d: %d %lld %d\n", a1.a, a1.b, a1.c, a2.a, a2.b, a2.c, result.a, result.b, result.c); + + return result; + } + + static void + cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + + struct cls_struct_align a1, a2; + + a1 = *(struct cls_struct_align*)(args[0]); + a2 = *(struct cls_struct_align*)(args[1]); + + *(cls_struct_align*)resp = cls_struct_align_fn(a1, a2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[5]; + ffi_type* cls_struct_fields[4]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[5]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_align g_dbl = { 12, 4951, 127 }; + struct cls_struct_align f_dbl = { 1, 9320, 13 }; + struct cls_struct_align res_dbl; + + cls_struct_fields[0] = &ffi_type_uchar; + cls_struct_fields[1] = &ffi_type_sint64; + cls_struct_fields[2] = &ffi_type_uchar; + cls_struct_fields[3] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &g_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl); + /* { dg-output "12 4951 127 1 9320 13: 13 14271 140" } */ + printf("res: %d %lld %d\n", res_dbl.a, res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 13 14271 140" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_align_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(pcl))(g_dbl, f_dbl); + /* { dg-output "\n12 4951 127 1 9320 13: 13 14271 140" } */ + printf("res: %d %lld %d\n", res_dbl.a, res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 13 14271 140" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_align_uint16.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_align_uint16.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_align_uint16.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_align_uint16.c 2003-12-04 17:51:17.000000000 +0000 *************** *** 0 **** --- 1,98 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure alignment of uint16. + Limitations: none. + PR: none. + Originator: 20031203 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_align { + unsigned char a; + unsigned short b; + unsigned char c; + } cls_struct_align; + + cls_struct_align cls_struct_align_fn(struct cls_struct_align a1, + struct cls_struct_align a2) + { + struct cls_struct_align result; + + result.a = a1.a + a2.a; + result.b = a1.b + a2.b; + result.c = a1.c + a2.c; + + printf("%d %d %d %d %d %d: %d %d %d\n", a1.a, a1.b, a1.c, a2.a, a2.b, a2.c, result.a, result.b, result.c); + + return result; + } + + static void + cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + + struct cls_struct_align a1, a2; + + a1 = *(struct cls_struct_align*)(args[0]); + a2 = *(struct cls_struct_align*)(args[1]); + + *(cls_struct_align*)resp = cls_struct_align_fn(a1, a2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[5]; + ffi_type* cls_struct_fields[4]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[5]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_align g_dbl = { 12, 4951, 127 }; + struct cls_struct_align f_dbl = { 1, 9320, 13 }; + struct cls_struct_align res_dbl; + + cls_struct_fields[0] = &ffi_type_uchar; + cls_struct_fields[1] = &ffi_type_uint16; + cls_struct_fields[2] = &ffi_type_uchar; + cls_struct_fields[3] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &g_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl); + /* { dg-output "12 4951 127 1 9320 13: 13 14271 140" } */ + printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 13 14271 140" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_align_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(pcl))(g_dbl, f_dbl); + /* { dg-output "\n12 4951 127 1 9320 13: 13 14271 140" } */ + printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 13 14271 140" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_align_uint32.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_align_uint32.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_align_uint32.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_align_uint32.c 2003-12-04 17:51:17.000000000 +0000 *************** *** 0 **** --- 1,98 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure alignment of uint32. + Limitations: none. + PR: none. + Originator: 20031203 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_align { + unsigned char a; + unsigned int b; + unsigned char c; + } cls_struct_align; + + cls_struct_align cls_struct_align_fn(struct cls_struct_align a1, + struct cls_struct_align a2) + { + struct cls_struct_align result; + + result.a = a1.a + a2.a; + result.b = a1.b + a2.b; + result.c = a1.c + a2.c; + + printf("%d %d %d %d %d %d: %d %d %d\n", a1.a, a1.b, a1.c, a2.a, a2.b, a2.c, result.a, result.b, result.c); + + return result; + } + + static void + cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + + struct cls_struct_align a1, a2; + + a1 = *(struct cls_struct_align*)(args[0]); + a2 = *(struct cls_struct_align*)(args[1]); + + *(cls_struct_align*)resp = cls_struct_align_fn(a1, a2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[5]; + ffi_type* cls_struct_fields[4]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[5]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_align g_dbl = { 12, 4951, 127 }; + struct cls_struct_align f_dbl = { 1, 9320, 13 }; + struct cls_struct_align res_dbl; + + cls_struct_fields[0] = &ffi_type_uchar; + cls_struct_fields[1] = &ffi_type_uint32; + cls_struct_fields[2] = &ffi_type_uchar; + cls_struct_fields[3] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &g_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl); + /* { dg-output "12 4951 127 1 9320 13: 13 14271 140" } */ + printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 13 14271 140" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_align_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(pcl))(g_dbl, f_dbl); + /* { dg-output "\n12 4951 127 1 9320 13: 13 14271 140" } */ + printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 13 14271 140" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_align_uint64.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_align_uint64.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_align_uint64.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_align_uint64.c 2003-12-04 17:51:17.000000000 +0000 *************** *** 0 **** --- 1,98 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure alignment of uint64. + Limitations: none. + PR: none. + Originator: 20031203 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_align { + unsigned char a; + unsigned long long b; + unsigned char c; + } cls_struct_align; + + cls_struct_align cls_struct_align_fn(struct cls_struct_align a1, + struct cls_struct_align a2) + { + struct cls_struct_align result; + + result.a = a1.a + a2.a; + result.b = a1.b + a2.b; + result.c = a1.c + a2.c; + + printf("%d %lld %d %d %lld %d: %d %lld %d\n", a1.a, a1.b, a1.c, a2.a, a2.b, a2.c, result.a, result.b, result.c); + + return result; + } + + static void + cls_struct_align_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + + struct cls_struct_align a1, a2; + + a1 = *(struct cls_struct_align*)(args[0]); + a2 = *(struct cls_struct_align*)(args[1]); + + *(cls_struct_align*)resp = cls_struct_align_fn(a1, a2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[5]; + ffi_type* cls_struct_fields[4]; + ffi_type cls_struct_type; + ffi_type* dbl_arg_types[5]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + struct cls_struct_align g_dbl = { 12, 4951, 127 }; + struct cls_struct_align f_dbl = { 1, 9320, 13 }; + struct cls_struct_align res_dbl; + + cls_struct_fields[0] = &ffi_type_uchar; + cls_struct_fields[1] = &ffi_type_uint64; + cls_struct_fields[2] = &ffi_type_uchar; + cls_struct_fields[3] = NULL; + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &g_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl); + /* { dg-output "12 4951 127 1 9320 13: 13 14271 140" } */ + printf("res: %d %lld %d\n", res_dbl.a, res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 13 14271 140" } */ + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_align_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(pcl))(g_dbl, f_dbl); + /* { dg-output "\n12 4951 127 1 9320 13: 13 14271 140" } */ + printf("res: %d %lld %d\n", res_dbl.a, res_dbl.b, res_dbl.c); + /* { dg-output "\nres: 13 14271 140" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_double.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_double.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_double.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_double.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,51 ---- + /* Area: closure_call + Purpose: Check return value double. + Limitations: none. + PR: none. + Originator: 20030828 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + static void cls_ret_double_fn(ffi_cif* cif,void* resp,void** args, + void* userdata) + { + *(double *)resp = *(double *)args[0]; + + printf("%f: %f\n",*(double *)args[0], + *(double *)resp); + } + typedef double (*cls_ret_double)(double); + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + ffi_type * cl_arg_types[2]; + double res; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cl_arg_types[0] = &ffi_type_double; + cl_arg_types[1] = NULL; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, + &ffi_type_double, cl_arg_types) == FFI_OK); + + CHECK(ffi_prep_closure(pcl, &cif, cls_ret_double_fn, NULL) == FFI_OK); + + res = (*((cls_ret_double)pcl))(21474.789); + /* { dg-output "21474.789000: 21474.789000" } */ + printf("res: %.6f\n", res); + /* { dg-output "\nres: 21474.789000" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_float.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_float.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_float.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_float.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,51 ---- + /* Area: closure_call + Purpose: Check return value float. + Limitations: none. + PR: none. + Originator: 20030828 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + static void cls_ret_float_fn(ffi_cif* cif,void* resp,void** args, + void* userdata) + { + *(float *)resp = *(float *)args[0]; + + printf("%g: %g\n",*(float *)args[0], + *(float *)resp); + } + + typedef float (*cls_ret_float)(float); + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + ffi_type * cl_arg_types[2]; + float res; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + + cl_arg_types[0] = &ffi_type_float; + cl_arg_types[1] = NULL; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, + &ffi_type_float, cl_arg_types) == FFI_OK); + + CHECK(ffi_prep_closure(pcl, &cif, cls_ret_float_fn, NULL) == FFI_OK); + res = ((((cls_ret_float)pcl)(-2122.12))); + /* { dg-output "\\-2122.12: \\-2122.12" } */ + printf("res: %.6f\n", res); + /* { dg-output "\nres: \-2122.120117" } */ + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_multi_schar.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_multi_schar.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_multi_schar.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_multi_schar.c 2003-12-01 07:23:28.000000000 +0000 *************** *** 0 **** --- 1,81 ---- + /* Area: ffi_call, closure_call + Purpose: Check passing of multiple signed char values. + Limitations: none. + PR: PR13221. + Originator: 20031129 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + signed char test_func_fn(signed char a1, signed char a2) + { + signed char result; + + result = a1 + a2; + + printf("%d %d: %d\n", a1, a2, result); + + return result; + + } + + static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data) + { + signed char a1, a2; + + a1 = *(signed char *)avals[0]; + a2 = *(signed char *)avals[1]; + + *(ffi_arg *)rval = test_func_fn(a1, a2); + + } + + typedef signed char (*test_type)(signed char, signed char); + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void * args_dbl[3]; + ffi_type * cl_arg_types[3]; + ffi_arg res_call; + signed char a, b, res_closure; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + a = 2; + b = 125; + + args_dbl[0] = &a; + args_dbl[1] = &b; + args_dbl[3] = NULL; + + cl_arg_types[0] = &ffi_type_schar; + cl_arg_types[1] = &ffi_type_schar; + cl_arg_types[2] = NULL; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, + &ffi_type_schar, cl_arg_types) == FFI_OK); + + ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl); + /* { dg-output "2 125: 127" } */ + printf("res: %d\n", res_call); + /* { dg-output "\nres: 127" } */ + + CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK); + + res_closure = (*((test_type)pcl))(2, 125); + /* { dg-output "\n2 125: 127" } */ + printf("res: %d\n", res_closure); + /* { dg-output "\nres: 127" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_multi_sshort.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_multi_sshort.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_multi_sshort.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_multi_sshort.c 2003-12-01 07:23:28.000000000 +0000 *************** *** 0 **** --- 1,81 ---- + /* Area: ffi_call, closure_call + Purpose: Check passing of multiple signed short values. + Limitations: none. + PR: PR13221. + Originator: 20031129 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + signed short test_func_fn(signed short a1, signed short a2) + { + signed short result; + + result = a1 + a2; + + printf("%d %d: %d\n", a1, a2, result); + + return result; + + } + + static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data) + { + signed short a1, a2; + + a1 = *(signed short *)avals[0]; + a2 = *(signed short *)avals[1]; + + *(ffi_arg *)rval = test_func_fn(a1, a2); + + } + + typedef signed short (*test_type)(signed short, signed short); + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void * args_dbl[3]; + ffi_type * cl_arg_types[3]; + ffi_arg res_call; + unsigned short a, b, res_closure; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + a = 2; + b = 32765; + + args_dbl[0] = &a; + args_dbl[1] = &b; + args_dbl[3] = NULL; + + cl_arg_types[0] = &ffi_type_sshort; + cl_arg_types[1] = &ffi_type_sshort; + cl_arg_types[2] = NULL; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, + &ffi_type_sshort, cl_arg_types) == FFI_OK); + + ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl); + /* { dg-output "2 32765: 32767" } */ + printf("res: %d\n", res_call); + /* { dg-output "\nres: 32767" } */ + + CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK); + + res_closure = (*((test_type)pcl))(2, 32765); + /* { dg-output "\n2 32765: 32767" } */ + printf("res: %d\n", res_closure); + /* { dg-output "\nres: 32767" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_multi_sshortchar.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_multi_sshortchar.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_multi_sshortchar.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_multi_sshortchar.c 2003-12-01 07:23:28.000000000 +0000 *************** *** 0 **** --- 1,93 ---- + /* Area: ffi_call, closure_call + Purpose: Check passing of multiple signed short/char values. + Limitations: none. + PR: PR13221. + Originator: 20031129 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + signed short test_func_fn(signed char a1, signed short a2, + signed char a3, signed short a4) + { + signed short result; + + result = a1 + a2 + a3 + a4; + + printf("%d %d %d %d: %d\n", a1, a2, a3, a4, result); + + return result; + + } + + static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data) + { + signed char a1, a3; + signed short a2, a4; + + a1 = *(signed char *)avals[0]; + a2 = *(signed short *)avals[1]; + a3 = *(signed char *)avals[2]; + a4 = *(signed short *)avals[3]; + + *(ffi_arg *)rval = test_func_fn(a1, a2, a3, a4); + + } + + typedef signed short (*test_type)(signed char, signed short, + signed char, signed short); + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void * args_dbl[5]; + ffi_type * cl_arg_types[5]; + ffi_arg res_call; + signed char a, c; + signed short b, d, res_closure; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + a = 1; + b = 32765; + c = 127; + d = -128; + + args_dbl[0] = &a; + args_dbl[1] = &b; + args_dbl[2] = &c; + args_dbl[3] = &d; + args_dbl[4] = NULL; + + cl_arg_types[0] = &ffi_type_schar; + cl_arg_types[1] = &ffi_type_sshort; + cl_arg_types[2] = &ffi_type_schar; + cl_arg_types[3] = &ffi_type_sshort; + cl_arg_types[4] = NULL; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 4, + &ffi_type_sshort, cl_arg_types) == FFI_OK); + + ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl); + /* { dg-output "1 32765 127 -128: 32765" } */ + printf("res: %d\n", res_call); + /* { dg-output "\nres: 32765" } */ + + CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK); + + res_closure = (*((test_type)pcl))(1, 32765, 127, -128); + /* { dg-output "\n1 32765 127 -128: 32765" } */ + printf("res: %d\n", res_closure); + /* { dg-output "\nres: 32765" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_multi_uchar.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_multi_uchar.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_multi_uchar.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_multi_uchar.c 2003-12-01 07:23:28.000000000 +0000 *************** *** 0 **** --- 1,96 ---- + /* Area: ffi_call, closure_call + Purpose: Check passing of multiple unsigned char values. + Limitations: none. + PR: PR13221. + Originator: 20031129 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + unsigned char test_func_fn(unsigned char a1, unsigned char a2, + unsigned char a3, unsigned char a4) + { + unsigned char result; + + result = a1 + a2 + a3 + a4; + + printf("%d %d %d %d: %d\n", a1, a2, a3, a4, result); + + return result; + + } + + static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data) + { + unsigned char a1, a2, a3, a4; + + a1 = *(unsigned char *)avals[0]; + a2 = *(unsigned char *)avals[1]; + a3 = *(unsigned char *)avals[2]; + a4 = *(unsigned char *)avals[3]; + + *(ffi_arg *)rval = test_func_fn(a1, a2, a3, a4); + + } + + typedef unsigned char (*test_type)(unsigned char, unsigned char, + unsigned char, unsigned char); + void test_func(ffi_cif *cif, void *rval, void **avals, void *data) + { + printf("%d %d %d %d\n", *(unsigned char *)avals[0], + *(unsigned char *)avals[1], *(unsigned char *)avals[2], + *(unsigned char *)avals[3]); + } + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void * args_dbl[5]; + ffi_type * cl_arg_types[5]; + ffi_arg res_call; + unsigned char a, b, c, d, res_closure; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + a = 1; + b = 2; + c = 127; + d = 125; + + args_dbl[0] = &a; + args_dbl[1] = &b; + args_dbl[2] = &c; + args_dbl[3] = &d; + args_dbl[4] = NULL; + + cl_arg_types[0] = &ffi_type_uchar; + cl_arg_types[1] = &ffi_type_uchar; + cl_arg_types[2] = &ffi_type_uchar; + cl_arg_types[3] = &ffi_type_uchar; + cl_arg_types[4] = NULL; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 4, + &ffi_type_uchar, cl_arg_types) == FFI_OK); + + ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl); + /* { dg-output "1 2 127 125: 255" } */ + printf("res: %d\n", res_call); + /* { dg-output "\nres: 255" } */ + + CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK); + + res_closure = (*((test_type)pcl))(1, 2, 127, 125); + /* { dg-output "\n1 2 127 125: 255" } */ + printf("res: %d\n", res_closure); + /* { dg-output "\nres: 255" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_multi_ushort.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_multi_ushort.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_multi_ushort.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_multi_ushort.c 2003-12-01 07:23:28.000000000 +0000 *************** *** 0 **** --- 1,81 ---- + /* Area: ffi_call, closure_call + Purpose: Check passing of multiple unsigned short values. + Limitations: none. + PR: PR13221. + Originator: 20031129 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + unsigned short test_func_fn(unsigned short a1, unsigned short a2) + { + unsigned short result; + + result = a1 + a2; + + printf("%d %d: %d\n", a1, a2, result); + + return result; + + } + + static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data) + { + unsigned short a1, a2; + + a1 = *(unsigned short *)avals[0]; + a2 = *(unsigned short *)avals[1]; + + *(ffi_arg *)rval = test_func_fn(a1, a2); + + } + + typedef unsigned short (*test_type)(unsigned short, unsigned short); + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void * args_dbl[3]; + ffi_type * cl_arg_types[3]; + ffi_arg res_call; + unsigned short a, b, res_closure; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + a = 2; + b = 32765; + + args_dbl[0] = &a; + args_dbl[1] = &b; + args_dbl[3] = NULL; + + cl_arg_types[0] = &ffi_type_ushort; + cl_arg_types[1] = &ffi_type_ushort; + cl_arg_types[2] = NULL; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, + &ffi_type_ushort, cl_arg_types) == FFI_OK); + + ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl); + /* { dg-output "2 32765: 32767" } */ + printf("res: %d\n", res_call); + /* { dg-output "\nres: 32767" } */ + + CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK); + + res_closure = (*((test_type)pcl))(2, 32765); + /* { dg-output "\n2 32765: 32767" } */ + printf("res: %d\n", res_closure); + /* { dg-output "\nres: 32767" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_multi_ushortchar.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_multi_ushortchar.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_multi_ushortchar.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_multi_ushortchar.c 2003-12-01 07:23:28.000000000 +0000 *************** *** 0 **** --- 1,93 ---- + /* Area: ffi_call, closure_call + Purpose: Check passing of multiple unsigned short/char values. + Limitations: none. + PR: PR13221. + Originator: 20031129 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + unsigned short test_func_fn(unsigned char a1, unsigned short a2, + unsigned char a3, unsigned short a4) + { + unsigned short result; + + result = a1 + a2 + a3 + a4; + + printf("%d %d %d %d: %d\n", a1, a2, a3, a4, result); + + return result; + + } + + static void test_func_gn(ffi_cif *cif, void *rval, void **avals, void *data) + { + unsigned char a1, a3; + unsigned short a2, a4; + + a1 = *(unsigned char *)avals[0]; + a2 = *(unsigned short *)avals[1]; + a3 = *(unsigned char *)avals[2]; + a4 = *(unsigned short *)avals[3]; + + *(ffi_arg *)rval = test_func_fn(a1, a2, a3, a4); + + } + + typedef unsigned short (*test_type)(unsigned char, unsigned short, + unsigned char, unsigned short); + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void * args_dbl[5]; + ffi_type * cl_arg_types[5]; + ffi_arg res_call; + unsigned char a, c; + unsigned short b, d, res_closure; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + a = 1; + b = 2; + c = 127; + d = 128; + + args_dbl[0] = &a; + args_dbl[1] = &b; + args_dbl[2] = &c; + args_dbl[3] = &d; + args_dbl[4] = NULL; + + cl_arg_types[0] = &ffi_type_uchar; + cl_arg_types[1] = &ffi_type_ushort; + cl_arg_types[2] = &ffi_type_uchar; + cl_arg_types[3] = &ffi_type_ushort; + cl_arg_types[4] = NULL; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 4, + &ffi_type_ushort, cl_arg_types) == FFI_OK); + + ffi_call(&cif, FFI_FN(test_func_fn), &res_call, args_dbl); + /* { dg-output "1 2 127 128: 258" } */ + printf("res: %d\n", res_call); + /* { dg-output "\nres: 258" } */ + + CHECK(ffi_prep_closure(pcl, &cif, test_func_gn, NULL) == FFI_OK); + + res_closure = (*((test_type)pcl))(1, 2, 127, 128); + /* { dg-output "\n1 2 127 128: 258" } */ + printf("res: %d\n", res_closure); + /* { dg-output "\nres: 258" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_schar.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_schar.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_schar.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_schar.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,50 ---- + /* Area: closure_call + Purpose: Check return value schar. + Limitations: none. + PR: none. + Originator: 20031108 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + static void cls_ret_schar_fn(ffi_cif* cif,void* resp,void** args, + void* userdata) + { + *(ffi_arg*)resp = *(signed char *)args[0]; + printf("%d: %d\n",*(signed char *)args[0], + *(ffi_arg*)resp); + } + typedef signed char (*cls_ret_schar)(signed char); + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + ffi_type * cl_arg_types[2]; + signed char res; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cl_arg_types[0] = &ffi_type_schar; + cl_arg_types[1] = NULL; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, + &ffi_type_schar, cl_arg_types) == FFI_OK); + + CHECK(ffi_prep_closure(pcl, &cif, cls_ret_schar_fn, NULL) == FFI_OK); + + res = (*((cls_ret_schar)pcl))(127); + /* { dg-output "127: 127" } */ + printf("res: %d\n", res); + /* { dg-output "\nres: 127" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_sint.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_sint.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_sint.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_sint.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,50 ---- + /* Area: closure_call + Purpose: Check return value sint32. + Limitations: none. + PR: none. + Originator: 20031108 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + static void cls_ret_sint_fn(ffi_cif* cif,void* resp,void** args, + void* userdata) + { + *(ffi_arg*)resp = *(signed int *)args[0]; + printf("%d: %d\n",*(signed int *)args[0], + *(ffi_arg*)resp); + } + typedef signed int (*cls_ret_sint)(signed int); + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + ffi_type * cl_arg_types[2]; + signed int res; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cl_arg_types[0] = &ffi_type_sint32; + cl_arg_types[1] = NULL; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, + &ffi_type_sint32, cl_arg_types) == FFI_OK); + + CHECK(ffi_prep_closure(pcl, &cif, cls_ret_sint_fn, NULL) == FFI_OK); + + res = (*((cls_ret_sint)pcl))(65534); + /* { dg-output "65534: 65534" } */ + printf("res: %d\n",res); + /* { dg-output "\nres: 65534" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_sshort.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_sshort.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_sshort.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_sshort.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,50 ---- + /* Area: closure_call + Purpose: Check return value sshort. + Limitations: none. + PR: none. + Originator: 20031108 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + static void cls_ret_sshort_fn(ffi_cif* cif,void* resp,void** args, + void* userdata) + { + *(ffi_arg*)resp = *(signed short *)args[0]; + printf("%d: %d\n",*(signed short *)args[0], + *(ffi_arg*)resp); + } + typedef signed short (*cls_ret_sshort)(signed short); + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + ffi_type * cl_arg_types[2]; + signed short res; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cl_arg_types[0] = &ffi_type_sint16; + cl_arg_types[1] = NULL; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, + &ffi_type_sint16, cl_arg_types) == FFI_OK); + + CHECK(ffi_prep_closure(pcl, &cif, cls_ret_sshort_fn, NULL) == FFI_OK); + + res = (*((cls_ret_sshort)pcl))(255); + /* { dg-output "255: 255" } */ + printf("res: %d\n",res); + /* { dg-output "\nres: 255" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_uchar.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_uchar.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_uchar.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_uchar.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,50 ---- + /* Area: closure_call + Purpose: Check return value uchar. + Limitations: none. + PR: none. + Originator: 20030828 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + static void cls_ret_uchar_fn(ffi_cif* cif,void* resp,void** args, + void* userdata) + { + *(ffi_arg*)resp = *(unsigned char *)args[0]; + printf("%d: %d\n",*(unsigned char *)args[0], + *(ffi_arg*)resp); + } + typedef unsigned char (*cls_ret_uchar)(unsigned char); + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + ffi_type * cl_arg_types[2]; + unsigned char res; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cl_arg_types[0] = &ffi_type_uchar; + cl_arg_types[1] = NULL; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, + &ffi_type_uchar, cl_arg_types) == FFI_OK); + + CHECK(ffi_prep_closure(pcl, &cif, cls_ret_uchar_fn, NULL) == FFI_OK); + + res = (*((cls_ret_uchar)pcl))(127); + /* { dg-output "127: 127" } */ + printf("res: %d\n",res); + /* { dg-output "\nres: 127" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_uint.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_uint.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_uint.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_uint.c 2004-01-22 23:06:10.000000000 +0000 *************** *** 0 **** --- 1,51 ---- + /* Area: closure_call + Purpose: Check return value uint. + Limitations: none. + PR: none. + Originator: 20030828 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + static void cls_ret_uint_fn(ffi_cif* cif,void* resp,void** args, + void* userdata) + { + *(ffi_arg *)resp = *(unsigned int *)args[0]; + + printf("%d: %d\n",*(unsigned int *)args[0], + *(ffi_arg *)resp); + } + typedef unsigned int (*cls_ret_uint)(unsigned int); + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + ffi_type * cl_arg_types[2]; + unsigned int res; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cl_arg_types[0] = &ffi_type_uint32; + cl_arg_types[1] = NULL; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, + &ffi_type_uint32, cl_arg_types) == FFI_OK); + + CHECK(ffi_prep_closure(pcl, &cif, cls_ret_uint_fn, NULL) == FFI_OK); + + res = (*((cls_ret_uint)pcl))(2147483647); + /* { dg-output "2147483647: 2147483647" } */ + printf("res: %d\n",res); + /* { dg-output "\nres: 2147483647" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_ulonglong.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_ulonglong.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_ulonglong.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_ulonglong.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,54 ---- + /* Area: closure_call + Purpose: Check return value long long. + Limitations: none. + PR: none. + Originator: 20030828 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + static void cls_ret_ulonglong_fn(ffi_cif* cif,void* resp,void** args, + void* userdata) + { + *(unsigned long long *)resp= *(unsigned long long *)args[0]; + + printf("%llu: %llu\n",*(unsigned long long *)args[0], + *(unsigned long long *)resp); + } + typedef unsigned long long (*cls_ret_ulonglong)(unsigned long long); + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + ffi_type * cl_arg_types[2]; + unsigned long long res; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cl_arg_types[0] = &ffi_type_uint64; + cl_arg_types[1] = NULL; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, + &ffi_type_uint64, cl_arg_types) == FFI_OK); + CHECK(ffi_prep_closure(pcl, &cif, cls_ret_ulonglong_fn, NULL) == FFI_OK); + res = (*((cls_ret_ulonglong)pcl))(214LL); + /* { dg-output "214: 214" } */ + printf("res: %lld\n", res); + /* { dg-output "\nres: 214" } */ + + res = (*((cls_ret_ulonglong)pcl))(9223372035854775808LL); + /* { dg-output "\n9223372035854775808: 9223372035854775808" } */ + printf("res: %lld\n", res); + /* { dg-output "\nres: 9223372035854775808" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/cls_ushort.c gcc-3.4.0/libffi/testsuite/libffi.call/cls_ushort.c *** gcc-3.3.3/libffi/testsuite/libffi.call/cls_ushort.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/cls_ushort.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,51 ---- + /* Area: closure_call + Purpose: Check return value ushort. + Limitations: none. + PR: none. + Originator: 20030828 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + static void cls_ret_ushort_fn(ffi_cif* cif,void* resp,void** args, + void* userdata) + { + *(ffi_arg*)resp = *(unsigned short *)args[0]; + + printf("%d: %d\n",*(unsigned short *)args[0], + *(ffi_arg*)resp); + } + typedef unsigned short (*cls_ret_ushort)(unsigned short); + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + ffi_type * cl_arg_types[2]; + unsigned short res; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cl_arg_types[0] = &ffi_type_ushort; + cl_arg_types[1] = NULL; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, + &ffi_type_ushort, cl_arg_types) == FFI_OK); + + CHECK(ffi_prep_closure(pcl, &cif, cls_ret_ushort_fn, NULL) == FFI_OK); + + res = (*((cls_ret_ushort)pcl))(65535); + /* { dg-output "65535: 65535" } */ + printf("res: %d\n",res); + /* { dg-output "\nres: 65535" } */ + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/ffitest.h gcc-3.4.0/libffi/testsuite/libffi.call/ffitest.h *** gcc-3.3.3/libffi/testsuite/libffi.call/ffitest.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/ffitest.h 2004-01-08 12:15:17.000000000 +0000 *************** *** 0 **** --- 1,79 ---- + #include + #include + #include + #include + #include + #include "fficonfig.h" + + #define MAX_ARGS 256 + + #define CHECK(x) !(x) ? abort() : 0 + + + /* Prefer MAP_ANON(YMOUS) to /dev/zero, since we don't need to keep a + file open. */ + #ifdef HAVE_MMAP_ANON + # undef HAVE_MMAP_DEV_ZERO + + # include + # ifndef MAP_FAILED + # define MAP_FAILED -1 + # endif + # if !defined (MAP_ANONYMOUS) && defined (MAP_ANON) + # define MAP_ANONYMOUS MAP_ANON + # endif + # define USING_MMAP + + #endif + + #ifdef HAVE_MMAP_DEV_ZERO + + # include + # ifndef MAP_FAILED + # define MAP_FAILED -1 + # endif + # define USING_MMAP + + #endif + + #ifdef USING_MMAP + static inline void * + allocate_mmap (size_t size) + { + void *page; + #if defined (HAVE_MMAP_DEV_ZERO) + static int dev_zero_fd = -1; + #endif + + #ifdef HAVE_MMAP_DEV_ZERO + if (dev_zero_fd == -1) + { + dev_zero_fd = open ("/dev/zero", O_RDONLY); + if (dev_zero_fd == -1) + { + perror ("open /dev/zero: %m"); + exit (1); + } + } + #endif + + + #ifdef HAVE_MMAP_ANON + page = mmap (NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + #endif + #ifdef HAVE_MMAP_DEV_ZERO + page = mmap (NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC, + MAP_PRIVATE, dev_zero_fd, 0); + #endif + + if (page == (void *) MAP_FAILED) + { + perror ("virtual memory exhausted"); + exit (1); + } + + return page; + } + + #endif diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/float1.c gcc-3.4.0/libffi/testsuite/libffi.call/float1.c *** gcc-3.3.3/libffi/testsuite/libffi.call/float1.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/float1.c 2003-09-04 14:47:48.000000000 +0000 *************** *** 0 **** --- 1,42 ---- + /* Area: ffi_call + Purpose: Check return value double. + Limitations: none. + PR: none. + Originator: From the original ffitest.c */ + + /* { dg-do run } */ + #include "ffitest.h" + #include "float.h" + + static double dblit(float f) + { + return f/3.0; + } + + int main (void) + { + ffi_cif cif; + ffi_type *args[MAX_ARGS]; + void *values[MAX_ARGS]; + float f; + double d; + + + args[0] = &ffi_type_float; + values[0] = &f; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, + &ffi_type_double, args) == FFI_OK); + + f = 3.14159; + + ffi_call(&cif, FFI_FN(dblit), &d, values); + + /* These are not always the same!! Check for a reasonable delta */ + + CHECK(d - dblit(f) < DBL_EPSILON); + + exit(0); + + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/float2.c gcc-3.4.0/libffi/testsuite/libffi.call/float2.c *** gcc-3.3.3/libffi/testsuite/libffi.call/float2.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/float2.c 2004-03-12 01:35:32.000000000 +0000 *************** *** 0 **** --- 1,60 ---- + /* Area: ffi_call + Purpose: Check return value long double. + Limitations: none. + PR: none. + Originator: From the original ffitest.c */ + + /* { dg-do run } */ + /* { dg-options -mlong-double-128 { target powerpc64*-*-* } } */ + + #include "ffitest.h" + #include "float.h" + + static long double ldblit(float f) + { + return (long double) (((long double) f)/ (long double) 3.0); + } + + int main (void) + { + ffi_cif cif; + ffi_type *args[MAX_ARGS]; + void *values[MAX_ARGS]; + float f; + long double ld; + + args[0] = &ffi_type_float; + values[0] = &f; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, + &ffi_type_longdouble, args) == FFI_OK); + + f = 3.14159; + + #if 1 + /* This is ifdef'd out for now. long double support under SunOS/gcc + is pretty much non-existent. You'll get the odd bus error in library + routines like printf(). */ + printf ("%Lf\n", ldblit(f)); + #endif + ld = 666; + ffi_call(&cif, FFI_FN(ldblit), &ld, values); + + #if 1 + /* This is ifdef'd out for now. long double support under SunOS/gcc + is pretty much non-existent. You'll get the odd bus error in library + routines like printf(). */ + printf ("%Lf, %Lf, %Lf, %Lf\n", ld, ldblit(f), ld - ldblit(f), LDBL_EPSILON); + #endif + + /* These are not always the same!! Check for a reasonable delta */ + /*@-realcompare@*/ + if (ld - ldblit(f) < LDBL_EPSILON) + /*@=realcompare@*/ + puts("long double return value tests ok!"); + else + CHECK(0); + + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/float.c gcc-3.4.0/libffi/testsuite/libffi.call/float.c *** gcc-3.3.3/libffi/testsuite/libffi.call/float.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/float.c 2004-03-12 01:35:32.000000000 +0000 *************** *** 0 **** --- 1,64 ---- + /* Area: ffi_call + Purpose: Check return value float. + Limitations: none. + PR: none. + Originator: From the original ffitest.c */ + + /* { dg-do run } */ + /* { dg-options -mlong-double-128 { target powerpc64*-*-* } } */ + + #include "ffitest.h" + + static int floating(int a, float b, double c, long double d, int e) + { + int i; + + i = (int) ((float)a/b + ((float)c/(float)d)); + + return i; + } + + int main (void) + { + ffi_cif cif; + ffi_type *args[MAX_ARGS]; + void *values[MAX_ARGS]; + ffi_arg rint; + + float f; + signed int si1; + double d; + long double ld; + signed int si2; + + args[0] = &ffi_type_sint; + values[0] = &si1; + args[1] = &ffi_type_float; + values[1] = &f; + args[2] = &ffi_type_double; + values[2] = &d; + args[3] = &ffi_type_longdouble; + values[3] = &ld; + args[4] = &ffi_type_sint; + values[4] = &si2; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 5, + &ffi_type_sint, args) == FFI_OK); + + si1 = 6; + f = 3.14159; + d = (double)1.0/(double)3.0; + ld = 2.71828182846L; + si2 = 10; + + floating (si1, f, d, ld, si2); + + ffi_call(&cif, FFI_FN(floating), &rint, values); + + printf ("%d vs %d\n", (int)rint, floating (si1, f, d, ld, si2)); + + CHECK(rint == floating(si1, f, d, ld, si2)); + + exit (0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/many.c gcc-3.4.0/libffi/testsuite/libffi.call/many.c *** gcc-3.3.3/libffi/testsuite/libffi.call/many.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/many.c 2003-09-04 14:47:48.000000000 +0000 *************** *** 0 **** --- 1,69 ---- + /* Area: ffi_call + Purpose: Check return value float, with many arguments + Limitations: none. + PR: none. + Originator: From the original ffitest.c */ + + /* { dg-do run } */ + #include "ffitest.h" + + #include + + static float many(float f1, + float f2, + float f3, + float f4, + float f5, + float f6, + float f7, + float f8, + float f9, + float f10, + float f11, + float f12, + float f13) + { + #if 0 + printf("%f %f %f %f %f %f %f %f %f %f %f %f %f\n", + (double) f1, (double) f2, (double) f3, (double) f4, (double) f5, + (double) f6, (double) f7, (double) f8, (double) f9, (double) f10, + (double) f11, (double) f12, (double) f13); + #endif + + return ((f1/f2+f3/f4+f5/f6+f7/f8+f9/f10+f11/f12) * f13); + } + + int main (void) + { + ffi_cif cif; + ffi_type *args[13]; + void *values[13]; + float fa[13]; + float f, ff; + int i; + + for (i = 0; i < 13; i++) + { + args[i] = &ffi_type_float; + values[i] = &fa[i]; + fa[i] = (float) i; + } + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 13, + &ffi_type_float, args) == FFI_OK); + + ffi_call(&cif, FFI_FN(many), &f, values); + + ff = many(fa[0], fa[1], + fa[2], fa[3], + fa[4], fa[5], + fa[6], fa[7], + fa[8], fa[9], + fa[10],fa[11],fa[12]); + + if (f - ff < FLT_EPSILON) + exit(0); + else + abort(); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/many_win32.c gcc-3.4.0/libffi/testsuite/libffi.call/many_win32.c *** gcc-3.3.3/libffi/testsuite/libffi.call/many_win32.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/many_win32.c 2003-12-04 17:51:17.000000000 +0000 *************** *** 0 **** --- 1,63 ---- + /* Area: ffi_call + Purpose: Check stdcall many call on X86_WIN32 systems. + Limitations: none. + PR: none. + Originator: From the original ffitest.c */ + + /* { dg-do run { target i?86-*-cygwin* i?86-*-mingw* } } */ + + #include "ffitest.h" + #include + + static float __attribute__((stdcall)) stdcall_many(float f1, + float f2, + float f3, + float f4, + float f5, + float f6, + float f7, + float f8, + float f9, + float f10, + float f11, + float f12, + float f13) + { + return ((f1/f2+f3/f4+f5/f6+f7/f8+f9/f10+f11/f12) * f13); + } + + int main (void) + { + ffi_cif cif; + ffi_type *args[13]; + void *values[13]; + float fa[13]; + float f, ff; + unsigned long ul; + + for (ul = 0; ul < 13; ul++) + { + args[ul] = &ffi_type_float; + values[ul] = &fa[ul]; + fa[ul] = (float) ul; + } + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_STDCALL, 13, + &ffi_type_float, args) == FFI_OK); + + ff = stdcall_many(fa[0], fa[1], + fa[2], fa[3], + fa[4], fa[5], + fa[6], fa[7], + fa[8], fa[9], + fa[10], fa[11], fa[12]); + + ffi_call(&cif, FFI_FN(stdcall_many), &f, values); + + if (f - ff < FLT_EPSILON) + printf("stdcall many arg tests ok!\n"); + else + CHECK(0); + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/nested_struct1.c gcc-3.4.0/libffi/testsuite/libffi.call/nested_struct1.c *** gcc-3.3.3/libffi/testsuite/libffi.call/nested_struct1.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/nested_struct1.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,168 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure passing with different structure size. + Contains structs as parameter of the struct itself. + Limitations: none. + PR: none. + Originator: 20030828 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_16byte1 { + double a; + float b; + int c; + } cls_struct_16byte1; + + typedef struct cls_struct_16byte2 { + int ii; + double dd; + float ff; + } cls_struct_16byte2; + + typedef struct cls_struct_combined { + cls_struct_16byte1 d; + cls_struct_16byte2 e; + } cls_struct_combined; + + cls_struct_combined cls_struct_combined_fn(struct cls_struct_16byte1 b0, + struct cls_struct_16byte2 b1, + struct cls_struct_combined b2, + struct cls_struct_16byte1 b3) + { + struct cls_struct_combined result; + + result.d.a = b0.a + b1.dd + b2.d.a; + result.d.b = b0.b + b1.ff + b2.d.b; + result.d.c = b0.c + b1.ii + b2.d.c; + result.e.ii = b0.c + b1.ii + b2.e.ii; + result.e.dd = b0.a + b1.dd + b2.e.dd; + result.e.ff = b0.b + b1.ff + b2.e.ff; + + printf("%g %g %d %d %g %g %g %g %d %d %g %g %g %g %d: %g %g %d %d %g %g\n", + b0.a, b0.b, b0.c, + b1.ii, b1.dd, b1.ff, + b2.d.a, b2.d.b, b2.d.c, + b2.e.ii, b2.e.dd, b2.e.ff, + b3.a, b3.b, b3.c, + result.d.a, result.d.b, result.d.c, + result.e.ii, result.e.dd, result.e.ff); + + return result; + } + + static void + cls_struct_combined_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + struct cls_struct_16byte1 b0; + struct cls_struct_16byte2 b1; + struct cls_struct_combined b2; + struct cls_struct_16byte1 b3; + + b0 = *(struct cls_struct_16byte1*)(args[0]); + b1 = *(struct cls_struct_16byte2*)(args[1]); + b2 = *(struct cls_struct_combined*)(args[2]); + b3 = *(struct cls_struct_16byte1*)(args[3]); + + + *(cls_struct_combined*)resp = cls_struct_combined_fn(b0, b1, b2, b3); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[5]; + ffi_type* cls_struct_fields[5]; + ffi_type* cls_struct_fields1[5]; + ffi_type* cls_struct_fields2[5]; + ffi_type cls_struct_type, cls_struct_type1, cls_struct_type2; + ffi_type* dbl_arg_types[5]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + cls_struct_type1.size = 0; + cls_struct_type1.alignment = 0; + cls_struct_type1.type = FFI_TYPE_STRUCT; + cls_struct_type1.elements = cls_struct_fields1; + + cls_struct_type2.size = 0; + cls_struct_type2.alignment = 0; + cls_struct_type2.type = FFI_TYPE_STRUCT; + cls_struct_type2.elements = cls_struct_fields2; + + struct cls_struct_16byte1 e_dbl = { 9.0, 2.0, 6}; + struct cls_struct_16byte2 f_dbl = { 1, 2.0, 3.0}; + struct cls_struct_combined g_dbl = {{4.0, 5.0, 6}, + {3, 1.0, 8.0}}; + struct cls_struct_16byte1 h_dbl = { 3.0, 2.0, 4}; + struct cls_struct_combined res_dbl; + + cls_struct_fields[0] = &ffi_type_double; + cls_struct_fields[1] = &ffi_type_float; + cls_struct_fields[2] = &ffi_type_uint32; + cls_struct_fields[3] = NULL; + + cls_struct_fields1[0] = &ffi_type_uint32; + cls_struct_fields1[1] = &ffi_type_double; + cls_struct_fields1[2] = &ffi_type_float; + cls_struct_fields1[3] = NULL; + + cls_struct_fields2[0] = &cls_struct_type; + cls_struct_fields2[1] = &cls_struct_type1; + cls_struct_fields2[2] = NULL; + + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type1; + dbl_arg_types[2] = &cls_struct_type2; + dbl_arg_types[3] = &cls_struct_type; + dbl_arg_types[4] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 4, &cls_struct_type2, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &e_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = &g_dbl; + args_dbl[3] = &h_dbl; + args_dbl[4] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_combined_fn), &res_dbl, args_dbl); + /* { dg-output "9 2 6 1 2 3 4 5 6 3 1 8 3 2 4: 15 10 13 10 12 13" } */ + CHECK( res_dbl.d.a == (e_dbl.a + f_dbl.dd + g_dbl.d.a)); + CHECK( res_dbl.d.b == (e_dbl.b + f_dbl.ff + g_dbl.d.b)); + CHECK( res_dbl.d.c == (e_dbl.c + f_dbl.ii + g_dbl.d.c)); + CHECK( res_dbl.e.ii == (e_dbl.c + f_dbl.ii + g_dbl.e.ii)); + CHECK( res_dbl.e.dd == (e_dbl.a + f_dbl.dd + g_dbl.e.dd)); + CHECK( res_dbl.e.ff == (e_dbl.b + f_dbl.ff + g_dbl.e.ff)); + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_combined_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_combined(*)(cls_struct_16byte1, + cls_struct_16byte2, + cls_struct_combined, + cls_struct_16byte1)) + (pcl))(e_dbl, f_dbl, g_dbl, h_dbl); + /* { dg-output "\n9 2 6 1 2 3 4 5 6 3 1 8 3 2 4: 15 10 13 10 12 13" } */ + CHECK( res_dbl.d.a == (e_dbl.a + f_dbl.dd + g_dbl.d.a)); + CHECK( res_dbl.d.b == (e_dbl.b + f_dbl.ff + g_dbl.d.b)); + CHECK( res_dbl.d.c == (e_dbl.c + f_dbl.ii + g_dbl.d.c)); + CHECK( res_dbl.e.ii == (e_dbl.c + f_dbl.ii + g_dbl.e.ii)); + CHECK( res_dbl.e.dd == (e_dbl.a + f_dbl.dd + g_dbl.e.dd)); + CHECK( res_dbl.e.ff == (e_dbl.b + f_dbl.ff + g_dbl.e.ff)); + // CHECK( 1 == 0); + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/nested_struct2.c gcc-3.4.0/libffi/testsuite/libffi.call/nested_struct2.c *** gcc-3.3.3/libffi/testsuite/libffi.call/nested_struct2.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/nested_struct2.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,127 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure passing with different structure size. + Contains structs as parameter of the struct itself. + Sample taken from Alan Modras patch to src/prep_cif.c. + Limitations: none. + PR: none. + Originator: 20030911 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + #if LONG_MAX == 2147483647 + #define ffi_type_mylong ffi_type_uint32 + #else + #if LONG_MAX == 9223372036854775807 + #define ffi_type_mylong ffi_type_uint64 + #else + #error "Error, size LONG not defined as expected" + #endif + #endif + + typedef struct A { + unsigned long a; + unsigned char b; + } A; + + typedef struct B { + struct A x; + unsigned char y; + } B; + + B B_fn(struct A b0, struct B b1) + { + struct B result; + + result.x.a = b0.a + b1.x.a; + result.x.b = b0.b + b1.x.b + b1.y; + result.y = b0.b + b1.x.b; + + printf("%d %d %d %d %d: %d %d %d\n", b0.a, b0.b, b1.x.a, b1.x.b, b1.y, + result.x.a, result.x.b, result.y); + + return result; + } + + static void + B_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + struct A b0; + struct B b1; + + b0 = *(struct A*)(args[0]); + b1 = *(struct B*)(args[1]); + + *(B*)resp = B_fn(b0, b1); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[3]; + ffi_type* cls_struct_fields[3]; + ffi_type* cls_struct_fields1[3]; + ffi_type cls_struct_type, cls_struct_type1; + ffi_type* dbl_arg_types[3]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + cls_struct_type1.size = 0; + cls_struct_type1.alignment = 0; + cls_struct_type1.type = FFI_TYPE_STRUCT; + cls_struct_type1.elements = cls_struct_fields1; + + struct A e_dbl = { 1, 7}; + struct B f_dbl = {{12 , 127}, 99}; + + struct B res_dbl; + + cls_struct_fields[0] = &ffi_type_mylong; + cls_struct_fields[1] = &ffi_type_uchar; + cls_struct_fields[2] = NULL; + + cls_struct_fields1[0] = &cls_struct_type; + cls_struct_fields1[1] = &ffi_type_uchar; + cls_struct_fields1[2] = NULL; + + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type1; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type1, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &e_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(B_fn), &res_dbl, args_dbl); + /* { dg-output "1 7 12 127 99: 13 233 134" } */ + CHECK( res_dbl.x.a == (e_dbl.a + f_dbl.x.a)); + CHECK( res_dbl.x.b == (e_dbl.b + f_dbl.x.b + f_dbl.y)); + CHECK( res_dbl.y == (e_dbl.b + f_dbl.x.b)); + + + CHECK(ffi_prep_closure(pcl, &cif, B_gn, NULL) == FFI_OK); + + res_dbl = ((B(*)(A, B))(pcl))(e_dbl, f_dbl); + /* { dg-output "\n1 7 12 127 99: 13 233 134" } */ + CHECK( res_dbl.x.a == (e_dbl.a + f_dbl.x.a)); + CHECK( res_dbl.x.b == (e_dbl.b + f_dbl.x.b + f_dbl.y)); + CHECK( res_dbl.y == (e_dbl.b + f_dbl.x.b)); + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/nested_struct3.c gcc-3.4.0/libffi/testsuite/libffi.call/nested_struct3.c *** gcc-3.3.3/libffi/testsuite/libffi.call/nested_struct3.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/nested_struct3.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,118 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure passing with different structure size. + Contains structs as parameter of the struct itself. + Sample taken from Alan Modras patch to src/prep_cif.c. + Limitations: none. + PR: none. + Originator: 20030911 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct A { + unsigned long long a; + unsigned char b; + } A; + + typedef struct B { + struct A x; + unsigned char y; + } B; + + B B_fn(struct A b0, struct B b1) + { + struct B result; + + result.x.a = b0.a + b1.x.a; + result.x.b = b0.b + b1.x.b + b1.y; + result.y = b0.b + b1.x.b; + + printf("%d %d %d %d %d: %d %d %d\n", (int)b0.a, b0.b, + (int)b1.x.a, b1.x.b, b1.y, + (int)result.x.a, result.x.b, result.y); + + return result; + } + + static void + B_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + struct A b0; + struct B b1; + + b0 = *(struct A*)(args[0]); + b1 = *(struct B*)(args[1]); + + *(B*)resp = B_fn(b0, b1); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[3]; + ffi_type* cls_struct_fields[3]; + ffi_type* cls_struct_fields1[3]; + ffi_type cls_struct_type, cls_struct_type1; + ffi_type* dbl_arg_types[3]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + cls_struct_type1.size = 0; + cls_struct_type1.alignment = 0; + cls_struct_type1.type = FFI_TYPE_STRUCT; + cls_struct_type1.elements = cls_struct_fields1; + + struct A e_dbl = { 1LL, 7}; + struct B f_dbl = {{12LL , 127}, 99}; + + struct B res_dbl; + + cls_struct_fields[0] = &ffi_type_uint64; + cls_struct_fields[1] = &ffi_type_uchar; + cls_struct_fields[2] = NULL; + + cls_struct_fields1[0] = &cls_struct_type; + cls_struct_fields1[1] = &ffi_type_uchar; + cls_struct_fields1[2] = NULL; + + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type1; + dbl_arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type1, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &e_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = NULL; + + ffi_call(&cif, FFI_FN(B_fn), &res_dbl, args_dbl); + /* { dg-output "1 7 12 127 99: 13 233 134" } */ + CHECK( res_dbl.x.a == (e_dbl.a + f_dbl.x.a)); + CHECK( res_dbl.x.b == (e_dbl.b + f_dbl.x.b + f_dbl.y)); + CHECK( res_dbl.y == (e_dbl.b + f_dbl.x.b)); + + + CHECK(ffi_prep_closure(pcl, &cif, B_gn, NULL) == FFI_OK); + + res_dbl = ((B(*)(A, B))(pcl))(e_dbl, f_dbl); + /* { dg-output "\n1 7 12 127 99: 13 233 134" } */ + CHECK( res_dbl.x.a == (e_dbl.a + f_dbl.x.a)); + CHECK( res_dbl.x.b == (e_dbl.b + f_dbl.x.b + f_dbl.y)); + CHECK( res_dbl.y == (e_dbl.b + f_dbl.x.b)); + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/nested_struct.c gcc-3.4.0/libffi/testsuite/libffi.call/nested_struct.c *** gcc-3.3.3/libffi/testsuite/libffi.call/nested_struct.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/nested_struct.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,159 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure passing with different structure size. + Contains structs as parameter of the struct itself. + Limitations: none. + PR: none. + Originator: 20030828 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct cls_struct_16byte1 { + double a; + float b; + int c; + } cls_struct_16byte1; + + typedef struct cls_struct_16byte2 { + int ii; + double dd; + float ff; + } cls_struct_16byte2; + + typedef struct cls_struct_combined { + cls_struct_16byte1 d; + cls_struct_16byte2 e; + } cls_struct_combined; + + cls_struct_combined cls_struct_combined_fn(struct cls_struct_16byte1 b0, + struct cls_struct_16byte2 b1, + struct cls_struct_combined b2) + { + struct cls_struct_combined result; + + result.d.a = b0.a + b1.dd + b2.d.a; + result.d.b = b0.b + b1.ff + b2.d.b; + result.d.c = b0.c + b1.ii + b2.d.c; + result.e.ii = b0.c + b1.ii + b2.e.ii; + result.e.dd = b0.a + b1.dd + b2.e.dd; + result.e.ff = b0.b + b1.ff + b2.e.ff; + + printf("%g %g %d %d %g %g %g %g %d %d %g %g: %g %g %d %d %g %g\n", + b0.a, b0.b, b0.c, + b1.ii, b1.dd, b1.ff, + b2.d.a, b2.d.b, b2.d.c, + b2.e.ii, b2.e.dd, b2.e.ff, + result.d.a, result.d.b, result.d.c, + result.e.ii, result.e.dd, result.e.ff); + + return result; + } + + static void + cls_struct_combined_gn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + struct cls_struct_16byte1 b0; + struct cls_struct_16byte2 b1; + struct cls_struct_combined b2; + + b0 = *(struct cls_struct_16byte1*)(args[0]); + b1 = *(struct cls_struct_16byte2*)(args[1]); + b2 = *(struct cls_struct_combined*)(args[2]); + + + *(cls_struct_combined*)resp = cls_struct_combined_fn(b0, b1, b2); + } + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args_dbl[5]; + ffi_type* cls_struct_fields[5]; + ffi_type* cls_struct_fields1[5]; + ffi_type* cls_struct_fields2[5]; + ffi_type cls_struct_type, cls_struct_type1, cls_struct_type2; + ffi_type* dbl_arg_types[5]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + cls_struct_type.size = 0; + cls_struct_type.alignment = 0; + cls_struct_type.type = FFI_TYPE_STRUCT; + cls_struct_type.elements = cls_struct_fields; + + cls_struct_type1.size = 0; + cls_struct_type1.alignment = 0; + cls_struct_type1.type = FFI_TYPE_STRUCT; + cls_struct_type1.elements = cls_struct_fields1; + + cls_struct_type2.size = 0; + cls_struct_type2.alignment = 0; + cls_struct_type2.type = FFI_TYPE_STRUCT; + cls_struct_type2.elements = cls_struct_fields2; + + struct cls_struct_16byte1 e_dbl = { 9.0, 2.0, 6}; + struct cls_struct_16byte2 f_dbl = { 1, 2.0, 3.0}; + struct cls_struct_combined g_dbl = {{4.0, 5.0, 6}, + {3, 1.0, 8.0}}; + struct cls_struct_combined res_dbl; + + cls_struct_fields[0] = &ffi_type_double; + cls_struct_fields[1] = &ffi_type_float; + cls_struct_fields[2] = &ffi_type_uint32; + cls_struct_fields[3] = NULL; + + cls_struct_fields1[0] = &ffi_type_uint32; + cls_struct_fields1[1] = &ffi_type_double; + cls_struct_fields1[2] = &ffi_type_float; + cls_struct_fields1[3] = NULL; + + cls_struct_fields2[0] = &cls_struct_type; + cls_struct_fields2[1] = &cls_struct_type1; + cls_struct_fields2[2] = NULL; + + + dbl_arg_types[0] = &cls_struct_type; + dbl_arg_types[1] = &cls_struct_type1; + dbl_arg_types[2] = &cls_struct_type2; + dbl_arg_types[3] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 3, &cls_struct_type2, + dbl_arg_types) == FFI_OK); + + args_dbl[0] = &e_dbl; + args_dbl[1] = &f_dbl; + args_dbl[2] = &g_dbl; + args_dbl[3] = NULL; + + ffi_call(&cif, FFI_FN(cls_struct_combined_fn), &res_dbl, args_dbl); + /* { dg-output "9 2 6 1 2 3 4 5 6 3 1 8: 15 10 13 10 12 13" } */ + CHECK( res_dbl.d.a == (e_dbl.a + f_dbl.dd + g_dbl.d.a)); + CHECK( res_dbl.d.b == (e_dbl.b + f_dbl.ff + g_dbl.d.b)); + CHECK( res_dbl.d.c == (e_dbl.c + f_dbl.ii + g_dbl.d.c)); + CHECK( res_dbl.e.ii == (e_dbl.c + f_dbl.ii + g_dbl.e.ii)); + CHECK( res_dbl.e.dd == (e_dbl.a + f_dbl.dd + g_dbl.e.dd)); + CHECK( res_dbl.e.ff == (e_dbl.b + f_dbl.ff + g_dbl.e.ff)); + + CHECK(ffi_prep_closure(pcl, &cif, cls_struct_combined_gn, NULL) == FFI_OK); + + res_dbl = ((cls_struct_combined(*)(cls_struct_16byte1, + cls_struct_16byte2, + cls_struct_combined)) + (pcl))(e_dbl, f_dbl, g_dbl); + /* { dg-output "\n9 2 6 1 2 3 4 5 6 3 1 8: 15 10 13 10 12 13" } */ + CHECK( res_dbl.d.a == (e_dbl.a + f_dbl.dd + g_dbl.d.a)); + CHECK( res_dbl.d.b == (e_dbl.b + f_dbl.ff + g_dbl.d.b)); + CHECK( res_dbl.d.c == (e_dbl.c + f_dbl.ii + g_dbl.d.c)); + CHECK( res_dbl.e.ii == (e_dbl.c + f_dbl.ii + g_dbl.e.ii)); + CHECK( res_dbl.e.dd == (e_dbl.a + f_dbl.dd + g_dbl.e.dd)); + CHECK( res_dbl.e.ff == (e_dbl.b + f_dbl.ff + g_dbl.e.ff)); + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/problem1.c gcc-3.4.0/libffi/testsuite/libffi.call/problem1.c *** gcc-3.3.3/libffi/testsuite/libffi.call/problem1.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/problem1.c 2003-11-21 11:24:09.000000000 +0000 *************** *** 0 **** --- 1,97 ---- + /* Area: ffi_call, closure_call + Purpose: Check structure passing with different structure size. + Limitations: none. + PR: none. + Originator: 20030828 */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitest.h" + + typedef struct my_ffi_struct { + double a; + double b; + double c; + } my_ffi_struct; + + my_ffi_struct callee(struct my_ffi_struct a1, struct my_ffi_struct a2) + { + struct my_ffi_struct result; + result.a = a1.a + a2.a; + result.b = a1.b + a2.b; + result.c = a1.c + a2.c; + + + printf("%g %g %g %g %g %g: %g %g %g\n", a1.a, a1.b, a1.c, + a2.a, a2.b, a2.c, result.a, result.b, result.c); + + return result; + } + + void stub(ffi_cif* cif, void* resp, void** args, void* userdata) + { + struct my_ffi_struct a1; + struct my_ffi_struct a2; + + a1 = *(struct my_ffi_struct*)(args[0]); + a2 = *(struct my_ffi_struct*)(args[1]); + + *(my_ffi_struct *)resp = callee(a1, a2); + } + + + int main(void) + { + ffi_type* my_ffi_struct_fields[4]; + ffi_type my_ffi_struct_type; + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + void* args[4]; + ffi_type* arg_types[3]; + + #ifdef USING_MMAP + pcl = allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + struct my_ffi_struct g = { 1.0, 2.0, 3.0 }; + struct my_ffi_struct f = { 1.0, 2.0, 3.0 }; + struct my_ffi_struct res; + + my_ffi_struct_type.size = 0; + my_ffi_struct_type.alignment = 0; + my_ffi_struct_type.type = FFI_TYPE_STRUCT; + my_ffi_struct_type.elements = my_ffi_struct_fields; + + my_ffi_struct_fields[0] = &ffi_type_double; + my_ffi_struct_fields[1] = &ffi_type_double; + my_ffi_struct_fields[2] = &ffi_type_double; + my_ffi_struct_fields[3] = NULL; + + arg_types[0] = &my_ffi_struct_type; + arg_types[1] = &my_ffi_struct_type; + arg_types[2] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &my_ffi_struct_type, + arg_types) == FFI_OK); + + args[0] = &g; + args[1] = &f; + args[2] = NULL; + ffi_call(&cif, FFI_FN(callee), &res, args); + /* { dg-output "1 2 3 1 2 3: 2 4 6" } */ + printf("res: %g %g %g\n", res.a, res.b, res.c); + /* { dg-output "\nres: 2 4 6" } */ + + CHECK(ffi_prep_closure(pcl, &cif, stub, NULL) == FFI_OK); + + res = ((my_ffi_struct(*)(struct my_ffi_struct, struct my_ffi_struct))(pcl))(g, f); + /* { dg-output "\n1 2 3 1 2 3: 2 4 6" } */ + printf("res: %g %g %g\n", res.a, res.b, res.c); + /* { dg-output "\nres: 2 4 6" } */ + + exit(0);; + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/promotion.c gcc-3.4.0/libffi/testsuite/libffi.call/promotion.c *** gcc-3.3.3/libffi/testsuite/libffi.call/promotion.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/promotion.c 2003-09-04 14:47:48.000000000 +0000 *************** *** 0 **** --- 1,59 ---- + /* Area: ffi_call + Purpose: Promotion test. + Limitations: none. + PR: none. + Originator: From the original ffitest.c */ + + /* { dg-do run } */ + #include "ffitest.h" + static int promotion(signed char sc, signed short ss, + unsigned char uc, unsigned short us) + { + int r = (int) sc + (int) ss + (int) uc + (int) us; + + return r; + } + + int main (void) + { + ffi_cif cif; + ffi_type *args[MAX_ARGS]; + void *values[MAX_ARGS]; + ffi_arg rint; + signed char sc; + unsigned char uc; + signed short ss; + unsigned short us; + unsigned long ul; + + args[0] = &ffi_type_schar; + args[1] = &ffi_type_sshort; + args[2] = &ffi_type_uchar; + args[3] = &ffi_type_ushort; + values[0] = ≻ + values[1] = &ss; + values[2] = &uc; + values[3] = &us; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 4, + &ffi_type_sint, args) == FFI_OK); + + us = 0; + ul = 0; + + for (sc = (signed char) -127; + sc <= (signed char) 120; /*@-type@*/ sc += 1 /*@=type@*/) + for (ss = -30000; ss <= 30000; ss += 10000) + for (uc = (unsigned char) 0; + uc <= (unsigned char) 200; /*@-type@*/ uc += 20 /*@=type@*/) + for (us = 0; us <= 60000; us += 10000) + { + ul++; + ffi_call(&cif, FFI_FN(promotion), &rint, values); + CHECK((int)rint == (signed char) sc + (signed short) ss + + (unsigned char) uc + (unsigned short) us); + } + printf("%lu promotion tests run\n", ul); + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/pyobjc-tc.c gcc-3.4.0/libffi/testsuite/libffi.call/pyobjc-tc.c *** gcc-3.3.3/libffi/testsuite/libffi.call/pyobjc-tc.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/pyobjc-tc.c 2004-01-24 18:45:46.000000000 +0000 *************** *** 0 **** --- 1,114 ---- + /* Area: ffi_call + Purpose: Check different structures. + Limitations: none. + PR: none. + Originator: Ronald Oussoren 20030824 */ + + /* { dg-do run } */ + #include "ffitest.h" + + typedef struct Point { + float x; + float y; + } Point; + + typedef struct Size { + float h; + float w; + } Size; + + typedef struct Rect { + Point o; + Size s; + } Rect; + + int doit(int o, char* s, Point p, Rect r, int last) + { + printf("CALLED WITH %d %s {%f %f} {{%f %f} {%f %f}} %d\n", + o, s, p.x, p.y, r.o.x, r.o.y, r.s.h, r.s.w, last); + return 42; + } + + + int main(void) + { + ffi_type point_type; + ffi_type size_type; + ffi_type rect_type; + ffi_cif cif; + ffi_type* arglist[6]; + void* values[6]; + int r; + + /* + * First set up FFI types for the 3 struct types + */ + + point_type.size = 0; /*sizeof(Point);*/ + point_type.alignment = 0; /*__alignof__(Point);*/ + point_type.type = FFI_TYPE_STRUCT; + point_type.elements = malloc(3 * sizeof(ffi_type*)); + point_type.elements[0] = &ffi_type_float; + point_type.elements[1] = &ffi_type_float; + point_type.elements[2] = NULL; + + size_type.size = 0;/* sizeof(Size);*/ + size_type.alignment = 0;/* __alignof__(Size);*/ + size_type.type = FFI_TYPE_STRUCT; + size_type.elements = malloc(3 * sizeof(ffi_type*)); + size_type.elements[0] = &ffi_type_float; + size_type.elements[1] = &ffi_type_float; + size_type.elements[2] = NULL; + + rect_type.size = 0;/*sizeof(Rect);*/ + rect_type.alignment =0;/* __alignof__(Rect);*/ + rect_type.type = FFI_TYPE_STRUCT; + rect_type.elements = malloc(3 * sizeof(ffi_type*)); + rect_type.elements[0] = &point_type; + rect_type.elements[1] = &size_type; + rect_type.elements[2] = NULL; + + /* + * Create a CIF + */ + arglist[0] = &ffi_type_sint; + arglist[1] = &ffi_type_pointer; + arglist[2] = &point_type; + arglist[3] = &rect_type; + arglist[4] = &ffi_type_sint; + arglist[5] = NULL; + + r = ffi_prep_cif(&cif, FFI_DEFAULT_ABI, + 5, &ffi_type_sint, arglist); + if (r != FFI_OK) { + abort(); + } + + + /* And call the function through the CIF */ + + { + Point p = { 1.0, 2.0 }; + Rect r = { { 9.0, 10.0}, { -1.0, -2.0 } }; + int o = 0; + int l = 42; + char* m = "myMethod"; + ffi_arg result; + + values[0] = &o; + values[1] = &m; + values[2] = &p; + values[3] = &r; + values[4] = &l; + values[5] = NULL; + + printf("CALLING WITH %d %s {%f %f} {{%f %f} {%f %f}} %d\n", + o, m, p.x, p.y, r.o.x, r.o.y, r.s.h, r.s.w, l); + + ffi_call(&cif, FFI_FN(doit), &result, values); + + printf ("The result is %d\n", result); + + } + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/return_ll.c gcc-3.4.0/libffi/testsuite/libffi.call/return_ll.c *** gcc-3.3.3/libffi/testsuite/libffi.call/return_ll.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/return_ll.c 2003-09-04 14:47:48.000000000 +0000 *************** *** 0 **** --- 1,45 ---- + /* Area: ffi_call + Purpose: Check return value long long. + Limitations: none. + PR: none. + Originator: From the original ffitest.c */ + + /* { dg-do run } */ + #include "ffitest.h" + static long long return_ll(long long ll) + { + return ll; + } + + int main (void) + { + ffi_cif cif; + ffi_type *args[MAX_ARGS]; + void *values[MAX_ARGS]; + long long rlonglong; + long long ll; + unsigned long ul; + + + args[0] = &ffi_type_sint64; + values[0] = ≪ + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, + &ffi_type_sint64, args) == FFI_OK); + + for (ll = 0LL; ll < 100LL; ll++) + { + ul++; + ffi_call(&cif, FFI_FN(return_ll), &rlonglong, values); + CHECK(rlonglong == ll); + } + + for (ll = 55555555555000LL; ll < 55555555555100LL; ll++) + { + ul++; + ffi_call(&cif, FFI_FN(return_ll), &rlonglong, values); + CHECK(rlonglong == ll); + } + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/return_sc.c gcc-3.4.0/libffi/testsuite/libffi.call/return_sc.c *** gcc-3.3.3/libffi/testsuite/libffi.call/return_sc.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/return_sc.c 2003-11-08 18:32:16.000000000 +0000 *************** *** 0 **** --- 1,38 ---- + /* Area: ffi_call + Purpose: Check return value signed char. + Limitations: none. + PR: none. + Originator: From the original ffitest.c */ + + /* { dg-do run } */ + #include "ffitest.h" + + static signed char return_sc(signed char sc) + { + return sc; + } + int main (void) + { + ffi_cif cif; + ffi_type *args[MAX_ARGS]; + void *values[MAX_ARGS]; + ffi_arg rint; + signed char sc; + unsigned long ul; + + args[0] = &ffi_type_schar; + values[0] = ≻ + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, + &ffi_type_schar, args) == FFI_OK); + + for (sc = (signed char) -127; + sc < (signed char) 127; sc++) + { + ul++; + ffi_call(&cif, FFI_FN(return_sc), &rint, values); + CHECK(rint == (ffi_arg) sc); + } + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/return_uc.c gcc-3.4.0/libffi/testsuite/libffi.call/return_uc.c *** gcc-3.3.3/libffi/testsuite/libffi.call/return_uc.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/return_uc.c 2003-09-04 14:47:48.000000000 +0000 *************** *** 0 **** --- 1,40 ---- + /* Area: ffi_call + Purpose: Check return value unsigned char. + Limitations: none. + PR: none. + Originator: From the original ffitest.c */ + + /* { dg-do run } */ + #include "ffitest.h" + + static unsigned char return_uc(unsigned char uc) + { + return uc; + } + + int main (void) + { + ffi_cif cif; + ffi_type *args[MAX_ARGS]; + void *values[MAX_ARGS]; + ffi_arg rint; + + unsigned char uc; + unsigned long ul; + + args[0] = &ffi_type_uchar; + values[0] = &uc; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, + &ffi_type_uchar, args) == FFI_OK); + + for (uc = (unsigned char) '\x00'; + uc < (unsigned char) '\xff'; uc++) + { + ul++; + ffi_call(&cif, FFI_FN(return_uc), &rint, values); + CHECK(rint == (signed int) uc); + } + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/strlen.c gcc-3.4.0/libffi/testsuite/libffi.call/strlen.c *** gcc-3.3.3/libffi/testsuite/libffi.call/strlen.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/strlen.c 2003-09-04 14:47:48.000000000 +0000 *************** *** 0 **** --- 1,44 ---- + /* Area: ffi_call + Purpose: Check strlen function call. + Limitations: none. + PR: none. + Originator: From the original ffitest.c */ + + /* { dg-do run } */ + #include "ffitest.h" + + static size_t my_strlen(char *s) + { + return (strlen(s)); + } + + int main (void) + { + ffi_cif cif; + ffi_type *args[MAX_ARGS]; + void *values[MAX_ARGS]; + ffi_arg rint; + char *s; + + args[0] = &ffi_type_pointer; + values[0] = (void*) &s; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, + &ffi_type_sint, args) == FFI_OK); + + s = "a"; + ffi_call(&cif, FFI_FN(my_strlen), &rint, values); + CHECK(rint == 1); + + s = "1234567"; + ffi_call(&cif, FFI_FN(my_strlen), &rint, values); + CHECK(rint == 7); + + s = "1234567890123456789012345"; + ffi_call(&cif, FFI_FN(my_strlen), &rint, values); + CHECK(rint == 25); + + exit (0); + } + diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/strlen_win32.c gcc-3.4.0/libffi/testsuite/libffi.call/strlen_win32.c *** gcc-3.3.3/libffi/testsuite/libffi.call/strlen_win32.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/strlen_win32.c 2003-09-04 14:47:48.000000000 +0000 *************** *** 0 **** --- 1,44 ---- + /* Area: ffi_call + Purpose: Check stdcall strlen call on X86_WIN32 systems. + Limitations: none. + PR: none. + Originator: From the original ffitest.c */ + + /* { dg-do run { target i?86-*-cygwin* i?86-*-mingw* } } */ + + #include "ffitest.h" + + static size_t __attribute__((stdcall)) my_stdcall_strlen(char *s) + { + return (strlen(s)); + } + + int main (void) + { + ffi_cif cif; + ffi_type *args[MAX_ARGS]; + void *values[MAX_ARGS]; + ffi_arg rint; + char *s; + args[0] = &ffi_type_pointer; + values[0] = (void*) &s; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_STDCALL, 1, + &ffi_type_sint, args) == FFI_OK); + + s = "a"; + ffi_call(&cif, FFI_FN(my_stdcall_strlen), &rint, values); + CHECK(rint == 1); + + s = "1234567"; + ffi_call(&cif, FFI_FN(my_stdcall_strlen), &rint, values); + CHECK(rint == 7); + + s = "1234567890123456789012345"; + ffi_call(&cif, FFI_FN(my_stdcall_strlen), &rint, values); + CHECK(rint == 25); + + printf("stdcall strlen tests passed\n"); + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/struct1.c gcc-3.4.0/libffi/testsuite/libffi.call/struct1.c *** gcc-3.3.3/libffi/testsuite/libffi.call/struct1.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/struct1.c 2003-09-04 14:47:48.000000000 +0000 *************** *** 0 **** --- 1,67 ---- + /* Area: ffi_call + Purpose: Check structures. + Limitations: none. + PR: none. + Originator: From the original ffitest.c */ + + /* { dg-do run } */ + #include "ffitest.h" + + typedef struct + { + unsigned char uc; + double d; + unsigned int ui; + } test_structure_1; + + static test_structure_1 struct1(test_structure_1 ts) + { + /*@-type@*/ + ts.uc++; + /*@=type@*/ + ts.d--; + ts.ui++; + + return ts; + } + + int main (void) + { + ffi_cif cif; + ffi_type *args[MAX_ARGS]; + void *values[MAX_ARGS]; + ffi_type ts1_type; + ffi_type *ts1_type_elements[4]; + ts1_type.size = 0; + ts1_type.alignment = 0; + ts1_type.type = FFI_TYPE_STRUCT; + ts1_type.elements = ts1_type_elements; + ts1_type_elements[0] = &ffi_type_uchar; + ts1_type_elements[1] = &ffi_type_double; + ts1_type_elements[2] = &ffi_type_uint; + ts1_type_elements[3] = NULL; + + test_structure_1 ts1_arg; + /* This is a hack to get a properly aligned result buffer */ + test_structure_1 *ts1_result = + (test_structure_1 *) malloc (sizeof(test_structure_1)); + + args[0] = &ts1_type; + values[0] = &ts1_arg; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, + &ts1_type, args) == FFI_OK); + + ts1_arg.uc = '\x01'; + ts1_arg.d = 3.14159; + ts1_arg.ui = 555; + + ffi_call(&cif, FFI_FN(struct1), ts1_result, values); + + CHECK(ts1_result->ui == 556); + CHECK(ts1_result->d == 3.14159 - 1); + + free (ts1_result); + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/struct2.c gcc-3.4.0/libffi/testsuite/libffi.call/struct2.c *** gcc-3.3.3/libffi/testsuite/libffi.call/struct2.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/struct2.c 2003-09-04 14:47:48.000000000 +0000 *************** *** 0 **** --- 1,67 ---- + /* Area: ffi_call + Purpose: Check structures. + Limitations: none. + PR: none. + Originator: From the original ffitest.c */ + + /* { dg-do run } */ + #include "ffitest.h" + + typedef struct + { + double d1; + double d2; + } test_structure_2; + + static test_structure_2 struct2(test_structure_2 ts) + { + ts.d1--; + ts.d2--; + + return ts; + } + + int main (void) + { + ffi_cif cif; + ffi_type *args[MAX_ARGS]; + void *values[MAX_ARGS]; + test_structure_2 ts2_arg; + ffi_type ts2_type; + ffi_type *ts2_type_elements[3]; + ts2_type.size = 0; + ts2_type.alignment = 0; + ts2_type.type = FFI_TYPE_STRUCT; + ts2_type.elements = ts2_type_elements; + ts2_type_elements[0] = &ffi_type_double; + ts2_type_elements[1] = &ffi_type_double; + ts2_type_elements[2] = NULL; + + + /* This is a hack to get a properly aligned result buffer */ + test_structure_2 *ts2_result = + (test_structure_2 *) malloc (sizeof(test_structure_2)); + + args[0] = &ts2_type; + values[0] = &ts2_arg; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, &ts2_type, args) == FFI_OK); + + ts2_arg.d1 = 5.55; + ts2_arg.d2 = 6.66; + + printf ("%g\n", ts2_arg.d1); + printf ("%g\n", ts2_arg.d2); + + ffi_call(&cif, FFI_FN(struct2), ts2_result, values); + + printf ("%g\n", ts2_result->d1); + printf ("%g\n", ts2_result->d2); + + CHECK(ts2_result->d1 == 5.55 - 1); + CHECK(ts2_result->d2 == 6.66 - 1); + + free (ts2_result); + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/struct3.c gcc-3.4.0/libffi/testsuite/libffi.call/struct3.c *** gcc-3.3.3/libffi/testsuite/libffi.call/struct3.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/struct3.c 2004-01-24 18:45:46.000000000 +0000 *************** *** 0 **** --- 1,59 ---- + /* Area: ffi_call + Purpose: Check structures. + Limitations: none. + PR: none. + Originator: From the original ffitest.c */ + + /* { dg-do run } */ + #include "ffitest.h" + + typedef struct + { + int si; + } test_structure_3; + + static test_structure_3 struct3(test_structure_3 ts) + { + ts.si = -(ts.si*2); + + return ts; + } + + int main (void) + { + ffi_cif cif; + ffi_type *args[MAX_ARGS]; + void *values[MAX_ARGS]; + int compare_value; + ffi_type ts3_type; + ffi_type *ts3_type_elements[2]; + ts3_type.size = 0; + ts3_type.alignment = 0; + ts3_type.type = FFI_TYPE_STRUCT; + ts3_type.elements = ts3_type_elements; + ts3_type_elements[0] = &ffi_type_sint; + ts3_type_elements[1] = NULL; + + test_structure_3 ts3_arg; + test_structure_3 *ts3_result = + (test_structure_3 *) malloc (sizeof(test_structure_3)); + + args[0] = &ts3_type; + values[0] = &ts3_arg; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, + &ts3_type, args) == FFI_OK); + + ts3_arg.si = -123; + compare_value = ts3_arg.si; + + ffi_call(&cif, FFI_FN(struct3), ts3_result, values); + + printf ("%d %d\n", ts3_result->si, -(compare_value*2)); + + CHECK(ts3_result->si == -(compare_value*2)); + + free (ts3_result); + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/struct4.c gcc-3.4.0/libffi/testsuite/libffi.call/struct4.c *** gcc-3.3.3/libffi/testsuite/libffi.call/struct4.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/struct4.c 2003-09-04 14:47:48.000000000 +0000 *************** *** 0 **** --- 1,63 ---- + /* Area: ffi_call + Purpose: Check structures. + Limitations: none. + PR: none. + Originator: From the original ffitest.c */ + + /* { dg-do run } */ + #include "ffitest.h" + + typedef struct + { + unsigned ui1; + unsigned ui2; + unsigned ui3; + } test_structure_4; + + static test_structure_4 struct4(test_structure_4 ts) + { + ts.ui3 = ts.ui1 * ts.ui2 * ts.ui3; + + return ts; + } + + int main (void) + { + ffi_cif cif; + ffi_type *args[MAX_ARGS]; + void *values[MAX_ARGS]; + ffi_type ts4_type; + ffi_type *ts4_type_elements[4]; + ts4_type.size = 0; + ts4_type.alignment = 0; + ts4_type.type = FFI_TYPE_STRUCT; + test_structure_4 ts4_arg; + ts4_type.elements = ts4_type_elements; + ts4_type_elements[0] = &ffi_type_uint; + ts4_type_elements[1] = &ffi_type_uint; + ts4_type_elements[2] = &ffi_type_uint; + ts4_type_elements[3] = NULL; + + + /* This is a hack to get a properly aligned result buffer */ + test_structure_4 *ts4_result = + (test_structure_4 *) malloc (sizeof(test_structure_4)); + + args[0] = &ts4_type; + values[0] = &ts4_arg; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, &ts4_type, args) == FFI_OK); + + ts4_arg.ui1 = 2; + ts4_arg.ui2 = 3; + ts4_arg.ui3 = 4; + + ffi_call (&cif, FFI_FN(struct4), ts4_result, values); + + CHECK(ts4_result->ui3 == 2U * 3U * 4U); + + + free (ts4_result); + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/struct5.c gcc-3.4.0/libffi/testsuite/libffi.call/struct5.c *** gcc-3.3.3/libffi/testsuite/libffi.call/struct5.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/struct5.c 2003-09-04 14:47:48.000000000 +0000 *************** *** 0 **** --- 1,65 ---- + /* Area: ffi_call + Purpose: Check structures. + Limitations: none. + PR: none. + Originator: From the original ffitest.c */ + + /* { dg-do run } */ + #include "ffitest.h" + typedef struct + { + char c1; + char c2; + } test_structure_5; + + static test_structure_5 struct5(test_structure_5 ts1, test_structure_5 ts2) + { + ts1.c1 += ts2.c1; + ts1.c2 -= ts2.c2; + + return ts1; + } + + int main (void) + { + ffi_cif cif; + ffi_type *args[MAX_ARGS]; + void *values[MAX_ARGS]; + ffi_type ts5_type; + ffi_type *ts5_type_elements[3]; + ts5_type.size = 0; + ts5_type.alignment = 0; + ts5_type.type = FFI_TYPE_STRUCT; + ts5_type.elements = ts5_type_elements; + ts5_type_elements[0] = &ffi_type_schar; + ts5_type_elements[1] = &ffi_type_schar; + ts5_type_elements[2] = NULL; + + test_structure_5 ts5_arg1, ts5_arg2; + + /* This is a hack to get a properly aligned result buffer */ + test_structure_5 *ts5_result = + (test_structure_5 *) malloc (sizeof(test_structure_5)); + + args[0] = &ts5_type; + args[1] = &ts5_type; + values[0] = &ts5_arg1; + values[1] = &ts5_arg2; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &ts5_type, args) == FFI_OK); + + ts5_arg1.c1 = 2; + ts5_arg1.c2 = 6; + ts5_arg2.c1 = 5; + ts5_arg2.c2 = 3; + + ffi_call (&cif, FFI_FN(struct5), ts5_result, values); + + CHECK(ts5_result->c1 == 7); + CHECK(ts5_result->c2 == 3); + + + free (ts5_result); + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/struct6.c gcc-3.4.0/libffi/testsuite/libffi.call/struct6.c *** gcc-3.3.3/libffi/testsuite/libffi.call/struct6.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/struct6.c 2003-09-04 14:47:48.000000000 +0000 *************** *** 0 **** --- 1,64 ---- + /* Area: ffi_call + Purpose: Check structures. + Limitations: none. + PR: none. + Originator: From the original ffitest.c */ + + /* { dg-do run } */ + #include "ffitest.h" + typedef struct + { + float f; + double d; + } test_structure_6; + + static test_structure_6 struct6 (test_structure_6 ts) + { + ts.f += 1; + ts.d += 1; + + return ts; + } + + int main (void) + { + ffi_cif cif; + ffi_type *args[MAX_ARGS]; + void *values[MAX_ARGS]; + ffi_type ts6_type; + ffi_type *ts6_type_elements[3]; + ts6_type.size = 0; + ts6_type.alignment = 0; + ts6_type.type = FFI_TYPE_STRUCT; + ts6_type.elements = ts6_type_elements; + ts6_type_elements[0] = &ffi_type_float; + ts6_type_elements[1] = &ffi_type_double; + ts6_type_elements[2] = NULL; + + + test_structure_6 ts6_arg; + + /* This is a hack to get a properly aligned result buffer */ + test_structure_6 *ts6_result = + (test_structure_6 *) malloc (sizeof(test_structure_6)); + + args[0] = &ts6_type; + values[0] = &ts6_arg; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, &ts6_type, args) == FFI_OK); + + ts6_arg.f = 5.55f; + ts6_arg.d = 6.66; + + printf ("%g\n", ts6_arg.f); + printf ("%g\n", ts6_arg.d); + + ffi_call(&cif, FFI_FN(struct6), ts6_result, values); + + CHECK(ts6_result->f == 5.55f + 1); + CHECK(ts6_result->d == 6.66 + 1); + + free (ts6_result); + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/struct7.c gcc-3.4.0/libffi/testsuite/libffi.call/struct7.c *** gcc-3.3.3/libffi/testsuite/libffi.call/struct7.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/struct7.c 2003-09-04 14:47:48.000000000 +0000 *************** *** 0 **** --- 1,74 ---- + /* Area: ffi_call + Purpose: Check structures. + Limitations: none. + PR: none. + Originator: From the original ffitest.c */ + + /* { dg-do run } */ + #include "ffitest.h" + typedef struct + { + float f1; + float f2; + double d; + } test_structure_7; + + static test_structure_7 struct7 (test_structure_7 ts) + { + ts.f1 += 1; + ts.f2 += 1; + ts.d += 1; + + return ts; + } + + int main (void) + { + ffi_cif cif; + ffi_type *args[MAX_ARGS]; + void *values[MAX_ARGS]; + ffi_type ts7_type; + ffi_type *ts7_type_elements[4]; + ts7_type.size = 0; + ts7_type.alignment = 0; + ts7_type.type = FFI_TYPE_STRUCT; + ts7_type.elements = ts7_type_elements; + ts7_type_elements[0] = &ffi_type_float; + ts7_type_elements[1] = &ffi_type_float; + ts7_type_elements[2] = &ffi_type_double; + ts7_type_elements[3] = NULL; + + + test_structure_7 ts7_arg; + + /* This is a hack to get a properly aligned result buffer */ + test_structure_7 *ts7_result = + (test_structure_7 *) malloc (sizeof(test_structure_7)); + + args[0] = &ts7_type; + values[0] = &ts7_arg; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, &ts7_type, args) == FFI_OK); + + ts7_arg.f1 = 5.55f; + ts7_arg.f2 = 55.5f; + ts7_arg.d = 6.66; + + printf ("%g\n", ts7_arg.f1); + printf ("%g\n", ts7_arg.f2); + printf ("%g\n", ts7_arg.d); + + ffi_call(&cif, FFI_FN(struct7), ts7_result, values); + + printf ("%g\n", ts7_result->f1); + printf ("%g\n", ts7_result->f2); + printf ("%g\n", ts7_result->d); + + CHECK(ts7_result->f1 == 5.55f + 1); + CHECK(ts7_result->f2 == 55.5f + 1); + CHECK(ts7_result->d == 6.66 + 1); + + free (ts7_result); + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/struct8.c gcc-3.4.0/libffi/testsuite/libffi.call/struct8.c *** gcc-3.3.3/libffi/testsuite/libffi.call/struct8.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/struct8.c 2003-09-04 14:47:48.000000000 +0000 *************** *** 0 **** --- 1,80 ---- + /* Area: ffi_call + Purpose: Check structures. + Limitations: none. + PR: none. + Originator: From the original ffitest.c */ + + /* { dg-do run } */ + #include "ffitest.h" + typedef struct + { + float f1; + float f2; + float f3; + float f4; + } test_structure_8; + + static test_structure_8 struct8 (test_structure_8 ts) + { + ts.f1 += 1; + ts.f2 += 1; + ts.f3 += 1; + ts.f4 += 1; + + return ts; + } + + int main (void) + { + ffi_cif cif; + ffi_type *args[MAX_ARGS]; + void *values[MAX_ARGS]; + ffi_type ts8_type; + ffi_type *ts8_type_elements[5]; + ts8_type.size = 0; + ts8_type.alignment = 0; + ts8_type.type = FFI_TYPE_STRUCT; + ts8_type.elements = ts8_type_elements; + ts8_type_elements[0] = &ffi_type_float; + ts8_type_elements[1] = &ffi_type_float; + ts8_type_elements[2] = &ffi_type_float; + ts8_type_elements[3] = &ffi_type_float; + ts8_type_elements[4] = NULL; + + test_structure_8 ts8_arg; + + /* This is a hack to get a properly aligned result buffer */ + test_structure_8 *ts8_result = + (test_structure_8 *) malloc (sizeof(test_structure_8)); + + args[0] = &ts8_type; + values[0] = &ts8_arg; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, &ts8_type, args) == FFI_OK); + + ts8_arg.f1 = 5.55f; + ts8_arg.f2 = 55.5f; + ts8_arg.f3 = -5.55f; + ts8_arg.f4 = -55.5f; + + printf ("%g\n", ts8_arg.f1); + printf ("%g\n", ts8_arg.f2); + printf ("%g\n", ts8_arg.f3); + printf ("%g\n", ts8_arg.f4); + + ffi_call(&cif, FFI_FN(struct8), ts8_result, values); + + printf ("%g\n", ts8_result->f1); + printf ("%g\n", ts8_result->f2); + printf ("%g\n", ts8_result->f3); + printf ("%g\n", ts8_result->f4); + + CHECK(ts8_result->f1 == 5.55f + 1); + CHECK(ts8_result->f2 == 55.5f + 1); + CHECK(ts8_result->f3 == -5.55f + 1); + CHECK(ts8_result->f4 == -55.5f + 1); + + free (ts8_result); + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.call/struct9.c gcc-3.4.0/libffi/testsuite/libffi.call/struct9.c *** gcc-3.3.3/libffi/testsuite/libffi.call/struct9.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.call/struct9.c 2003-09-04 14:47:48.000000000 +0000 *************** *** 0 **** --- 1,67 ---- + /* Area: ffi_call + Purpose: Check structures. + Limitations: none. + PR: none. + Originator: From the original ffitest.c */ + + /* { dg-do run } */ + #include "ffitest.h" + + typedef struct + { + float f; + int i; + } test_structure_9; + + static test_structure_9 struct9 (test_structure_9 ts) + { + ts.f += 1; + ts.i += 1; + + return ts; + } + + int main (void) + { + ffi_cif cif; + ffi_type *args[MAX_ARGS]; + void *values[MAX_ARGS]; + ffi_type ts9_type; + ffi_type *ts9_type_elements[3]; + ts9_type.size = 0; + ts9_type.alignment = 0; + ts9_type.type = FFI_TYPE_STRUCT; + ts9_type.elements = ts9_type_elements; + ts9_type_elements[0] = &ffi_type_float; + ts9_type_elements[1] = &ffi_type_sint; + ts9_type_elements[2] = NULL; + + test_structure_9 ts9_arg; + + /* This is a hack to get a properly aligned result buffer */ + test_structure_9 *ts9_result = + (test_structure_9 *) malloc (sizeof(test_structure_9)); + + args[0] = &ts9_type; + values[0] = &ts9_arg; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, &ts9_type, args) == FFI_OK); + + ts9_arg.f = 5.55f; + ts9_arg.i = 5; + + printf ("%g\n", ts9_arg.f); + printf ("%d\n", ts9_arg.i); + + ffi_call(&cif, FFI_FN(struct9), ts9_result, values); + + printf ("%g\n", ts9_result->f); + printf ("%d\n", ts9_result->i); + + CHECK(ts9_result->f == 5.55f + 1); + CHECK(ts9_result->i == 5 + 1); + + free (ts9_result); + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.special/ffitestcxx.h gcc-3.4.0/libffi/testsuite/libffi.special/ffitestcxx.h *** gcc-3.3.3/libffi/testsuite/libffi.special/ffitestcxx.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.special/ffitestcxx.h 2003-11-26 13:46:10.000000000 +0000 *************** *** 0 **** --- 1,77 ---- + #include + #include + #include + #include + #include "fficonfig.h" + + #define MAX_ARGS 256 + + #define CHECK(x) (!(x) ? abort() : (void)0) + + /* Prefer MAP_ANON(YMOUS) to /dev/zero, since we don't need to keep a + file open. */ + #ifdef HAVE_MMAP_ANON + # undef HAVE_MMAP_DEV_ZERO + + # include + # ifndef MAP_FAILED + # define MAP_FAILED -1 + # endif + # if !defined (MAP_ANONYMOUS) && defined (MAP_ANON) + # define MAP_ANONYMOUS MAP_ANON + # endif + # define USING_MMAP + + #endif + + #ifdef HAVE_MMAP_DEV_ZERO + + # include + # ifndef MAP_FAILED + # define MAP_FAILED -1 + # endif + # define USING_MMAP + + #endif + + #ifdef USING_MMAP + static inline void * + allocate_mmap (size_t size) + { + void *page; + #if defined (HAVE_MMAP_DEV_ZERO) + static int dev_zero_fd = -1; + #endif + + #ifdef HAVE_MMAP_DEV_ZERO + if (dev_zero_fd == -1) + { + dev_zero_fd = open ("/dev/zero", O_RDONLY); + if (dev_zero_fd == -1) + { + perror ("open /dev/zero: %m"); + exit (1); + } + } + #endif + + + #ifdef HAVE_MMAP_ANON + page = mmap (NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + #endif + #ifdef HAVE_MMAP_DEV_ZERO + page = mmap (NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC, + MAP_PRIVATE, dev_zero_fd, 0); + #endif + + if (page == MAP_FAILED) + { + perror ("virtual memory exhausted"); + exit (1); + } + + return page; + } + + #endif diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.special/special.exp gcc-3.4.0/libffi/testsuite/libffi.special/special.exp *** gcc-3.3.3/libffi/testsuite/libffi.special/special.exp 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.special/special.exp 2003-09-04 14:47:48.000000000 +0000 *************** *** 0 **** --- 1,36 ---- + # Copyright (C) 2003 Free Software Foundation, Inc. + + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2 of the License, or + # (at your option) any later version. + # + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + # libffi testsuite that uses the 'dg.exp' driver. + + load_lib libffi-dg.exp + + dg-init + libffi-init + + global srcdir subdir + + global cxx_options + + set cxx_options " -lstdc++" + + dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.cc]] $cxx_options "" + + dg-finish + + # Local Variables: + # tcl-indent-level:4 + # End: diff -Nrc3pad gcc-3.3.3/libffi/testsuite/libffi.special/unwindtest.cc gcc-3.4.0/libffi/testsuite/libffi.special/unwindtest.cc *** gcc-3.3.3/libffi/testsuite/libffi.special/unwindtest.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/libffi.special/unwindtest.cc 2003-12-01 07:23:28.000000000 +0000 *************** *** 0 **** --- 1,123 ---- + /* Area: ffi_closure, unwind info + Purpose: Check if the unwind information is passed correctly. + Limitations: none. + PR: none. + Originator: Jeff Sturm */ + + /* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */ + #include "ffitestcxx.h" + + void + closure_test_fn(ffi_cif* cif, void* resp, void** args, void* userdata) + { + throw 9; + } + + typedef void (*closure_test_type)(); + + void closure_test_fn1(ffi_cif* cif,void* resp,void** args, + void* userdata) + { + *(ffi_arg*)resp = + (int)*(float *)args[0] +(int)(*(float *)args[1]) + + (int)(*(float *)args[2]) + (int)*(float *)args[3] + + (int)(*(signed short *)args[4]) + (int)(*(float *)args[5]) + + (int)*(float *)args[6] + (int)(*(int *)args[7]) + + (int)(*(double*)args[8]) + (int)*(int *)args[9] + + (int)(*(int *)args[10]) + (int)(*(float *)args[11]) + + (int)*(int *)args[12] + (int)(*(int *)args[13]) + + (int)(*(int *)args[14]) + *(int *)args[15] + (int)(long)userdata; + + printf("%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d: %d\n", + (int)*(float *)args[0], (int)(*(float *)args[1]), + (int)(*(float *)args[2]), (int)*(float *)args[3], + (int)(*(signed short *)args[4]), (int)(*(float *)args[5]), + (int)*(float *)args[6], (int)(*(int *)args[7]), + (int)(*(double *)args[8]), (int)*(int *)args[9], + (int)(*(int *)args[10]), (int)(*(float *)args[11]), + (int)*(int *)args[12], (int)(*(int *)args[13]), + (int)(*(int *)args[14]), *(int *)args[15], + (int)(long)userdata, (int)*(ffi_arg*)resp); + + throw (int)*(ffi_arg*)resp; + } + + typedef int (*closure_test_type1)(float, float, float, float, signed short, + float, float, int, double, int, int, float, + int, int, int, int); + + int main (void) + { + ffi_cif cif; + #ifndef USING_MMAP + static ffi_closure cl; + #endif + ffi_closure *pcl; + ffi_type * cl_arg_types[17]; + int res; + #ifdef USING_MMAP + pcl = (ffi_closure *) allocate_mmap (sizeof(ffi_closure)); + #else + pcl = &cl; + #endif + + { + cl_arg_types[1] = NULL; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 0, + &ffi_type_void, cl_arg_types) == FFI_OK); + CHECK(ffi_prep_closure(pcl, &cif, closure_test_fn, NULL) == FFI_OK); + + try + { + (*((closure_test_type)(pcl)))(); + } catch (int exception_code) + { + CHECK(exception_code == 9); + } + + printf("part one OK\n"); + /* { dg-output "part one OK" } */ + } + + { + + cl_arg_types[0] = &ffi_type_float; + cl_arg_types[1] = &ffi_type_float; + cl_arg_types[2] = &ffi_type_float; + cl_arg_types[3] = &ffi_type_float; + cl_arg_types[4] = &ffi_type_sshort; + cl_arg_types[5] = &ffi_type_float; + cl_arg_types[6] = &ffi_type_float; + cl_arg_types[7] = &ffi_type_uint; + cl_arg_types[8] = &ffi_type_double; + cl_arg_types[9] = &ffi_type_uint; + cl_arg_types[10] = &ffi_type_uint; + cl_arg_types[11] = &ffi_type_float; + cl_arg_types[12] = &ffi_type_uint; + cl_arg_types[13] = &ffi_type_uint; + cl_arg_types[14] = &ffi_type_uint; + cl_arg_types[15] = &ffi_type_uint; + cl_arg_types[16] = NULL; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 16, + &ffi_type_sint, cl_arg_types) == FFI_OK); + + CHECK(ffi_prep_closure(pcl, &cif, closure_test_fn1, + (void *) 3 /* userdata */) == FFI_OK); + try + { + (*((closure_test_type1)pcl)) + (1.1, 2.2, 3.3, 4.4, 127, 5.5, 6.6, 8, 9, 10, 11, 12.0, 13, + 19, 21, 1); + /* { dg-output "\n1 2 3 4 127 5 6 8 9 10 11 12 13 19 21 1 3: 255" } */ + } catch (int exception_code) + { + CHECK(exception_code == 255); + } + printf("part two OK\n"); + /* { dg-output "\npart two OK" } */ + } + exit(0); + } diff -Nrc3pad gcc-3.3.3/libffi/testsuite/Makefile.am gcc-3.4.0/libffi/testsuite/Makefile.am *** gcc-3.3.3/libffi/testsuite/Makefile.am 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/Makefile.am 2003-09-04 14:49:22.000000000 +0000 *************** *** 0 **** --- 1,16 ---- + ## Process this file with automake to produce Makefile.in. + + AUTOMAKE_OPTIONS = foreign dejagnu + + # Setup the testing framework, if you have one + EXPECT = `if [ -f $(top_builddir)/../expect/expect ] ; then \ + echo $(top_builddir)/../expect/expect ; \ + else echo expect ; fi` + + RUNTEST = `if [ -f $(top_srcdir)/../dejagnu/runtest ] ; then \ + echo $(top_srcdir)/../dejagnu/runtest ; \ + else echo runtest; fi` + + AM_RUNTESTFLAGS = + + CLEANFILES = *.exe core* *.log *.sum diff -Nrc3pad gcc-3.3.3/libffi/testsuite/Makefile.in gcc-3.4.0/libffi/testsuite/Makefile.in *** gcc-3.3.3/libffi/testsuite/Makefile.in 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libffi/testsuite/Makefile.in 2003-11-12 18:18:30.000000000 +0000 *************** *** 0 **** --- 1,253 ---- + # Makefile.in generated automatically by automake 1.4 from Makefile.am + + # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. + + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY, to the extent permitted by law; without + # even the implied warranty of MERCHANTABILITY or FITNESS FOR A + # PARTICULAR PURPOSE. + + + SHELL = @SHELL@ + + srcdir = @srcdir@ + top_srcdir = @top_srcdir@ + VPATH = @srcdir@ + prefix = @prefix@ + exec_prefix = @exec_prefix@ + + bindir = @bindir@ + sbindir = @sbindir@ + libexecdir = @libexecdir@ + datadir = @datadir@ + sysconfdir = @sysconfdir@ + sharedstatedir = @sharedstatedir@ + localstatedir = @localstatedir@ + libdir = @libdir@ + infodir = @infodir@ + mandir = @mandir@ + includedir = @includedir@ + oldincludedir = /usr/include + + DESTDIR = + + pkgdatadir = $(datadir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ + + top_builddir = .. + + ACLOCAL = @ACLOCAL@ + AUTOCONF = @AUTOCONF@ + AUTOMAKE = @AUTOMAKE@ + AUTOHEADER = @AUTOHEADER@ + + INSTALL = @INSTALL@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) + INSTALL_DATA = @INSTALL_DATA@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + transform = @program_transform_name@ + + NORMAL_INSTALL = : + PRE_INSTALL = : + POST_INSTALL = : + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : + build_alias = @build_alias@ + build_triplet = @build@ + host_alias = @host_alias@ + host_triplet = @host@ + target_alias = @target_alias@ + target_triplet = @target@ + AS = @AS@ + CC = @CC@ + CXX = @CXX@ + CXXCPP = @CXXCPP@ + DLLTOOL = @DLLTOOL@ + EXEEXT = @EXEEXT@ + GCJ = @GCJ@ + GCJFLAGS = @GCJFLAGS@ + HAVE_LONG_DOUBLE = @HAVE_LONG_DOUBLE@ + LIBTOOL = @LIBTOOL@ + LN_S = @LN_S@ + MAINT = @MAINT@ + MAKEINFO = @MAKEINFO@ + OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + PACKAGE = @PACKAGE@ + RANLIB = @RANLIB@ + SHELL = @SHELL@ + STRIP = @STRIP@ + TARGET = @TARGET@ + TARGETDIR = @TARGETDIR@ + VERSION = @VERSION@ + gcc_version = @gcc_version@ + libffi_basedir = @libffi_basedir@ + tool_include_dir = @tool_include_dir@ + toolexecdir = @toolexecdir@ + toolexeclibdir = @toolexeclibdir@ + + AUTOMAKE_OPTIONS = foreign dejagnu + + # Setup the testing framework, if you have one + EXPECT = `if [ -f $(top_builddir)/../expect/expect ] ; then \ + echo $(top_builddir)/../expect/expect ; \ + else echo expect ; fi` + + + RUNTEST = `if [ -f $(top_srcdir)/../dejagnu/runtest ] ; then \ + echo $(top_srcdir)/../dejagnu/runtest ; \ + else echo runtest; fi` + + + AM_RUNTESTFLAGS = + + CLEANFILES = *.exe core* *.log *.sum + mkinstalldirs = $(SHELL) $(top_srcdir)/${libffi_basedir}../mkinstalldirs + CONFIG_HEADER = ../fficonfig.h + CONFIG_CLEAN_FILES = + DIST_COMMON = Makefile.am Makefile.in + + + DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + + TAR = gnutar + GZIP_ENV = --best + all: all-redirect + .SUFFIXES: + $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --foreign testsuite/Makefile + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + + tags: TAGS + TAGS: + + + distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + + subdir = testsuite + + distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign testsuite/Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done + + RUNTESTFLAGS = + + DEJATOOL = $(PACKAGE) + + RUNTESTDEFAULTFLAGS = --tool $(DEJATOOL) --srcdir $$srcdir + + check-DEJAGNU: site.exp + srcdir=`cd $(srcdir) && pwd`; export srcdir; \ + EXPECT=$(EXPECT); export EXPECT; \ + runtest=$(RUNTEST); \ + if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ + $$runtest $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \ + else echo "WARNING: could not find \`runtest'" 1>&2; :;\ + fi + site.exp: Makefile + @echo 'Making a new site.exp file...' + @test ! -f site.bak || rm -f site.bak + @echo '## these variables are automatically generated by make ##' > $@-t + @echo '# Do not edit here. If you wish to override these values' >> $@-t + @echo '# edit the last section' >> $@-t + @echo 'set tool $(DEJATOOL)' >> $@-t + @echo 'set srcdir $(srcdir)' >> $@-t + @echo 'set objdir' `pwd` >> $@-t + @echo 'set host_alias $(host_alias)' >> $@-t + @echo 'set host_triplet $(host_triplet)' >> $@-t + @echo 'set target_alias $(target_alias)' >> $@-t + @echo 'set target_triplet $(target_triplet)' >> $@-t + @echo 'set build_alias $(build_alias)' >> $@-t + @echo 'set build_triplet $(build_triplet)' >> $@-t + @echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t + @test ! -f site.exp || sed '1,/^## All variables above are.*##/ d' site.exp >> $@-t + @test ! -f site.exp || mv site.exp site.bak + @mv $@-t site.exp + info-am: + info: info-am + dvi-am: + dvi: dvi-am + check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU + check: check-am + installcheck-am: + installcheck: installcheck-am + install-exec-am: + install-exec: install-exec-am + + install-data-am: + install-data: install-data-am + + install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + install: install-am + uninstall-am: + uninstall: uninstall-am + all-am: Makefile + all-redirect: all-am + install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install + installdirs: + + + mostlyclean-generic: + + clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + + distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + + maintainer-clean-generic: + mostlyclean-am: mostlyclean-generic + + mostlyclean: mostlyclean-am + + clean-am: clean-generic mostlyclean-am + + clean: clean-am + + distclean-am: distclean-generic clean-am + -rm -f libtool + + distclean: distclean-am + + maintainer-clean-am: maintainer-clean-generic distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + + maintainer-clean: maintainer-clean-am + + .PHONY: tags distdir check-DEJAGNU info-am info dvi-am dvi check \ + check-am installcheck-am installcheck install-exec-am install-exec \ + install-data-am install-data install-am install uninstall-am uninstall \ + all-redirect all-am all installdirs mostlyclean-generic \ + distclean-generic clean-generic maintainer-clean-generic clean \ + mostlyclean distclean maintainer-clean + + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: diff -Nrc3pad gcc-3.3.3/libjava/acconfig.h gcc-3.4.0/libjava/acconfig.h *** gcc-3.3.3/libjava/acconfig.h 2002-08-29 18:05:14.000000000 +0000 --- gcc-3.4.0/libjava/acconfig.h 2003-09-11 17:25:47.000000000 +0000 *************** *** 1,165 **** - /* Name of this package. */ - #undef PACKAGE - - /* Version number of this package. */ - #undef VERSION - - /* Define this if you want runtime debugging enabled. */ - #undef DEBUG - - /* Define if using POSIX threads that have the mutexattr functions. */ - #undef HAVE_PTHREAD_MUTEXATTR_INIT - - /* Define this if you prefer size over speed for java.lang.Character. */ - #undef COMPACT_CHARACTER - - /* Define if you have memcpy. */ - #undef HAVE_MEMCPY - - /* Define if you have memmove. */ - #undef HAVE_MEMMOVE - - /* Define if you have strerror. */ - #undef HAVE_STRERROR - - /* Define if you have fsync. */ - #undef HAVE_FSYNC - - /* Define if you have sleep. */ - #undef HAVE_SLEEP - - /* Define if you have int32_t and uint32_t. */ - #undef HAVE_INT32_DEFINED - - /* Define if you have u_int32_t */ - #undef HAVE_BSD_INT32_DEFINED - - /* Define if you're running eCos. */ - #undef ECOS - - /* */ - #undef HAVE_LOCALTIME - - /* */ - #undef HAVE_MKTIME - - /* Define if using POSIX threads on Linux. */ - #undef LINUX_THREADS - - /* Define if you have the `gmtime_r' function. */ - #undef HAVE_GMTIME_R - - /* Define if you have the `localtime_r' function. */ - #undef HAVE_LOCALTIME_R - /* Define to `int' if `ssize_t' is not defined. */ #undef ssize_t - - /* Define to 1 if `in_addr_t' is defined in sys/types.h or - netinet/in.h. */ - #undef HAVE_IN_ADDR_T - - /* Define if inet6 structures are defined in netinet/in.h. */ - #undef HAVE_INET6 - - /* Define if struct ip_mreq is defined in netinet/in.h. */ - #undef HAVE_STRUCT_IP_MREQ - - /* Define if struct ipv6_mreq is defined in netinet/in.h. */ - #undef HAVE_STRUCT_IPV6_MREQ - - /* Define it socklen_t typedef is in sys/socket.h. */ - #undef HAVE_SOCKLEN_T - - /* Define if Boehm GC in use. */ - #undef HAVE_BOEHM_GC - - /* Define if gethostname is declared in . */ - #undef HAVE_GETHOSTNAME_DECL - - /* Define if gethostbyname_r returns `int'. */ - #undef GETHOSTBYNAME_R_RETURNS_INT - - /* Define if gethostbyaddr_r returns `int'. */ - #undef GETHOSTBYADDR_R_RETURNS_INT - - /* Define if struct tm has tm_gmtoff field. */ - #undef STRUCT_TM_HAS_GMTOFF - - /* Define if global `timezone' exists. */ - #undef HAVE_TIMEZONE - - /* Define to version of GCJ in use. */ - #undef GCJVERSION - - /* Define if if the synchronization code should try to avoid pthread_self - calls by caching thread IDs in a hashtable. */ - #undef SLOW_PTHREAD_SELF - - /* Define if you have the appropriate function. */ - #undef HAVE_ACCESS - #undef HAVE_STAT - #undef HAVE_MKDIR - #undef HAVE_RENAME - #undef HAVE_RMDIR - #undef HAVE_UNLINK - #undef HAVE_REALPATH - #undef HAVE_READDIR_R - #undef HAVE_GETHOSTBYNAME_R - #undef HAVE_GETHOSTBYADDR_R - #undef HAVE_FTRUNCATE - - /* Define if you want a bytecode interpreter. */ - #undef INTERPRETER - - /* Define if pthread_mutex_t has m_count member. */ - #undef PTHREAD_MUTEX_HAVE_M_COUNT - - /* Define if pthread_mutex_t has __m_count member. */ - #undef PTHREAD_MUTEX_HAVE___M_COUNT - - /* Define if java.net native functions should be stubbed out. */ - #undef DISABLE_JAVA_NET - - /* Define if we're to use libffi. */ - #undef USE_LIBFFI - - /* Define if system properties shouldn't be read from - getenv("GCJ_PROPERTIES"). */ - #undef DISABLE_GETENV_PROPERTIES - - /* Define if we should ignore arguments to main(). */ - #undef DISABLE_MAIN_ARGS - - /* Define if using setjmp/longjmp exceptions. */ - #undef SJLJ_EXCEPTIONS - - /* Define if you have /proc/self/exe */ - #undef HAVE_PROC_SELF_EXE - - /* Define if you have dladdr() */ - #undef HAVE_DLADDR - - /* Define if tzname is missing. */ - #undef NO_TZNAME - - /* Define if getuid() and friends are missing. */ - #undef NO_GETUID - - /* Define if libltdl is in use. */ - #undef USE_LTDL - - /* Define if g++ has a bug preventing us from inlining math routines. */ - #undef __NO_MATH_INLINES - - /* Define if you have working iconv() function. */ - #undef HAVE_ICONV - - /* Define if you are using JVMPI. */ - #undef ENABLE_JVMPI - - /* Define if your platform has a working backtrace() function. */ - #undef HAVE_BACKTRACE - - /* Define if your platform has the global _timezone variable. */ - #undef HAVE_UNDERSCORE_TIMEZONE --- 1,2 ---- diff -Nrc3pad gcc-3.3.3/libjava/acinclude.m4 gcc-3.4.0/libjava/acinclude.m4 *** gcc-3.3.3/libjava/acinclude.m4 2003-01-31 18:01:17.000000000 +0000 --- gcc-3.4.0/libjava/acinclude.m4 2003-12-31 08:58:29.000000000 +0000 *************** *** 1,28 **** ! AC_DEFUN([AC_COMPILE_CHECK_SIZEOF], ! [changequote(<<, >>)dnl ! dnl The name to #define. ! define(<>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl ! dnl The cache variable name. ! define(<>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl ! changequote([, ])dnl ! AC_MSG_CHECKING(size of $1) ! AC_CACHE_VAL(AC_CV_NAME, ! [for ac_size in 4 8 1 2 16 12 $2 ; do # List sizes in rough order of prevalence. ! AC_TRY_COMPILE([#include "confdefs.h" ! #include ! $2 ! ], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size) ! if test x$AC_CV_NAME != x ; then break; fi ! done ! ]) ! if test x$AC_CV_NAME = x ; then ! AC_MSG_ERROR([cannot determine a size for $1]) ! fi ! AC_MSG_RESULT($AC_CV_NAME) ! AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1]) ! undefine([AC_TYPE_NAME])dnl ! undefine([AC_CV_NAME])dnl ! ]) AC_DEFUN(LIBGCJ_CONFIGURE, [ --- 1,4 ---- ! sinclude(../config/accross.m4) AC_DEFUN(LIBGCJ_CONFIGURE, [ *************** version=0.0.7 *** 130,141 **** dnl Still use "libjava" here to placate dejagnu. AM_INIT_AUTOMAKE(libjava, $version) - # AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we don't - # run it explicitly here, it will be run implicitly before - # LIBGCJ_CONFIGURE, which doesn't work because that means that it will - # be run before AC_CANONICAL_HOST. - AC_CANONICAL_BUILD - AC_CHECK_TOOL(AS, as) AC_CHECK_TOOL(AR, ar) AC_CHECK_TOOL(RANLIB, ranlib, :) --- 106,111 ---- *************** size_t iconv(); *** 264,270 **** # serial 2 AC_DEFUN([AM_LC_MESSAGES], ! [if test $ac_cv_header_locale_h = yes; then AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) --- 234,241 ---- # serial 2 AC_DEFUN([AM_LC_MESSAGES], ! [AC_CHECK_HEADERS(locale.h) ! if test $ac_cv_header_locale_h = yes; then AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) *************** else *** 297,299 **** --- 268,327 ---- [Indicate that linker is not able to 8-byte align static data]) fi[]dnl ])# CHECK_FOR_BROKEN_MINGW_LD + + dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) + dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page + dnl also defines GSTUFF_PKG_ERRORS on error + AC_DEFUN(PKG_CHECK_MODULES, [ + succeeded=no + + if test -z "$PKG_CONFIG"; then + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + AC_MSG_CHECKING(for $2) + + if $PKG_CONFIG --exists "$2" ; then + AC_MSG_RESULT(yes) + succeeded=yes + + AC_MSG_CHECKING($1_CFLAGS) + $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` + AC_MSG_RESULT($$1_CFLAGS) + + AC_MSG_CHECKING($1_LIBS) + $1_LIBS=`$PKG_CONFIG --libs "$2"` + AC_MSG_RESULT($$1_LIBS) + else + $1_CFLAGS="" + $1_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + ifelse([$4], ,echo $$1_PKG_ERRORS,) + fi + + AC_SUBST($1_CFLAGS) + AC_SUBST($1_LIBS) + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + ifelse([$3], , :, [$3]) + else + ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) + fi + ]) + + diff -Nrc3pad gcc-3.3.3/libjava/aclocal.m4 gcc-3.4.0/libjava/aclocal.m4 *** gcc-3.3.3/libjava/aclocal.m4 2004-02-14 20:34:20.000000000 +0000 --- gcc-3.4.0/libjava/aclocal.m4 2004-04-19 02:23:04.000000000 +0000 *************** *** 1,6 **** ! dnl aclocal.m4 generated automatically by aclocal 1.4 ! dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. --- 1,6 ---- ! dnl aclocal.m4 generated automatically by aclocal 1.4-p6 ! dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. *************** dnl but WITHOUT ANY WARRANTY, to the ext *** 10,40 **** dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A dnl PARTICULAR PURPOSE. ! AC_DEFUN([AC_COMPILE_CHECK_SIZEOF], ! [changequote(<<, >>)dnl ! dnl The name to #define. ! define(<>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl ! dnl The cache variable name. ! define(<>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl ! changequote([, ])dnl ! AC_MSG_CHECKING(size of $1) ! AC_CACHE_VAL(AC_CV_NAME, ! [for ac_size in 4 8 1 2 16 12 $2 ; do # List sizes in rough order of prevalence. ! AC_TRY_COMPILE([#include "confdefs.h" ! #include ! $2 ! ], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size) ! if test x$AC_CV_NAME != x ; then break; fi ! done ! ]) ! if test x$AC_CV_NAME = x ; then ! AC_MSG_ERROR([cannot determine a size for $1]) ! fi ! AC_MSG_RESULT($AC_CV_NAME) ! AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1]) ! undefine([AC_TYPE_NAME])dnl ! undefine([AC_CV_NAME])dnl ! ]) AC_DEFUN(LIBGCJ_CONFIGURE, [ --- 10,16 ---- dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A dnl PARTICULAR PURPOSE. ! sinclude(../config/accross.m4) AC_DEFUN(LIBGCJ_CONFIGURE, [ *************** version=0.0.7 *** 142,153 **** dnl Still use "libjava" here to placate dejagnu. AM_INIT_AUTOMAKE(libjava, $version) - # AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we don't - # run it explicitly here, it will be run implicitly before - # LIBGCJ_CONFIGURE, which doesn't work because that means that it will - # be run before AC_CANONICAL_HOST. - AC_CANONICAL_BUILD - AC_CHECK_TOOL(AS, as) AC_CHECK_TOOL(AR, ar) AC_CHECK_TOOL(RANLIB, ranlib, :) --- 118,123 ---- *************** size_t iconv(); *** 276,282 **** # serial 2 AC_DEFUN([AM_LC_MESSAGES], ! [if test $ac_cv_header_locale_h = yes; then AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) --- 246,253 ---- # serial 2 AC_DEFUN([AM_LC_MESSAGES], ! [AC_CHECK_HEADERS(locale.h) ! if test $ac_cv_header_locale_h = yes; then AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) *************** else *** 310,315 **** --- 281,1162 ---- fi[]dnl ])# CHECK_FOR_BROKEN_MINGW_LD + dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) + dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page + dnl also defines GSTUFF_PKG_ERRORS on error + AC_DEFUN(PKG_CHECK_MODULES, [ + succeeded=no + + if test -z "$PKG_CONFIG"; then + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + AC_MSG_CHECKING(for $2) + + if $PKG_CONFIG --exists "$2" ; then + AC_MSG_RESULT(yes) + succeeded=yes + + AC_MSG_CHECKING($1_CFLAGS) + $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` + AC_MSG_RESULT($$1_CFLAGS) + + AC_MSG_CHECKING($1_LIBS) + $1_LIBS=`$PKG_CONFIG --libs "$2"` + AC_MSG_RESULT($$1_LIBS) + else + $1_CFLAGS="" + $1_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + ifelse([$4], ,echo $$1_PKG_ERRORS,) + fi + + AC_SUBST($1_CFLAGS) + AC_SUBST($1_LIBS) + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + ifelse([$3], , :, [$3]) + else + ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) + fi + ]) + + + + # lib-prefix.m4 serial 3 (gettext-0.12.2) + dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. + dnl This file is free software, distributed under the terms of the GNU + dnl General Public License. As a special exception to the GNU General + dnl Public License, this file may be distributed as part of a program + dnl that contains a configuration script generated by Autoconf, under + dnl the same distribution terms as the rest of that program. + + dnl From Bruno Haible. + + dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and + dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't + dnl require excessive bracketing. + ifdef([AC_HELP_STRING], + [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], + [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) + + dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed + dnl to access previously installed libraries. The basic assumption is that + dnl a user will want packages to use other packages he previously installed + dnl with the same --prefix option. + dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate + dnl libraries, but is otherwise very convenient. + AC_DEFUN([AC_LIB_PREFIX], + [ + AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_LIB_ARG_WITH([lib-prefix], + [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib + --without-lib-prefix don't search for libraries in includedir and libdir], + [ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/lib" + fi + fi + ]) + if test $use_additional = yes; then + dnl Potentially add $additional_includedir to $CPPFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's already present in $CPPFLAGS, + dnl 3. if it's /usr/local/include and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + for x in $CPPFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $CPPFLAGS. + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" + fi + fi + fi + fi + dnl Potentially add $additional_libdir to $LDFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's already present in $LDFLAGS, + dnl 3. if it's /usr/local/lib and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/lib"; then + haveit= + for x in $LDFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_libdir" = "X/usr/local/lib"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LDFLAGS. + LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" + fi + fi + fi + fi + fi + ]) + + dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, + dnl acl_final_exec_prefix, containing the values to which $prefix and + dnl $exec_prefix will expand at the end of the configure script. + AC_DEFUN([AC_LIB_PREPARE_PREFIX], + [ + dnl Unfortunately, prefix and exec_prefix get only finally determined + dnl at the end of configure. + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" + ]) + + dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the + dnl variables prefix and exec_prefix bound to the values they will have + dnl at the end of the configure script. + AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], + [ + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + $1 + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + ]) + + # lib-link.m4 serial 4 (gettext-0.12) + dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. + dnl This file is free software, distributed under the terms of the GNU + dnl General Public License. As a special exception to the GNU General + dnl Public License, this file may be distributed as part of a program + dnl that contains a configuration script generated by Autoconf, under + dnl the same distribution terms as the rest of that program. + + dnl From Bruno Haible. + + dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and + dnl the libraries corresponding to explicit and implicit dependencies. + dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and + dnl augments the CPPFLAGS variable. + AC_DEFUN([AC_LIB_LINKFLAGS], + [ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + define([Name],[translit([$1],[./-], [___])]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + ac_cv_lib[]Name[]_libs="$LIB[]NAME" + ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" + ac_cv_lib[]Name[]_cppflags="$INC[]NAME" + ]) + LIB[]NAME="$ac_cv_lib[]Name[]_libs" + LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" + INC[]NAME="$ac_cv_lib[]Name[]_cppflags" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the + dnl results of this search when this library appears as a dependency. + HAVE_LIB[]NAME=yes + undefine([Name]) + undefine([NAME]) + ]) + + dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) + dnl searches for libname and the libraries corresponding to explicit and + dnl implicit dependencies, together with the specified include files and + dnl the ability to compile and link the specified testcode. If found, it + dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and + dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and + dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs + dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. + AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], + [ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + define([Name],[translit([$1],[./-], [___])]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + + dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + + dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, + dnl because if the user has installed lib[]Name and not disabled its use + dnl via --without-lib[]Name-prefix, he wants to use it. + ac_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + + AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ + ac_save_LIBS="$LIBS" + LIBS="$LIBS $LIB[]NAME" + AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) + LIBS="$ac_save_LIBS" + ]) + if test "$ac_cv_lib[]Name" = yes; then + HAVE_LIB[]NAME=yes + AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) + AC_MSG_CHECKING([how to link with lib[]$1]) + AC_MSG_RESULT([$LIB[]NAME]) + else + HAVE_LIB[]NAME=no + dnl If $LIB[]NAME didn't lead to a usable library, we don't need + dnl $INC[]NAME either. + CPPFLAGS="$ac_save_CPPFLAGS" + LIB[]NAME= + LTLIB[]NAME= + fi + AC_SUBST([HAVE_LIB]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + undefine([Name]) + undefine([NAME]) + ]) + + dnl Determine the platform dependent parameters needed to use rpath: + dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, + dnl hardcode_direct, hardcode_minus_L. + AC_DEFUN([AC_LIB_RPATH], + [ + AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS + AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld + AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host + AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir + AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + ]) + wl="$acl_cv_wl" + libext="$acl_cv_libext" + shlibext="$acl_cv_shlibext" + hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + hardcode_direct="$acl_cv_hardcode_direct" + hardcode_minus_L="$acl_cv_hardcode_minus_L" + dnl Determine whether the user wants rpath handling at all. + AC_ARG_ENABLE(rpath, + [ --disable-rpath do not hardcode runtime library paths], + :, enable_rpath=yes) + ]) + + dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and + dnl the libraries corresponding to explicit and implicit dependencies. + dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. + AC_DEFUN([AC_LIB_LINKFLAGS_BODY], + [ + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_LIB_ARG_WITH([lib$1-prefix], + [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib + --without-lib$1-prefix don't search for lib$1 in includedir and libdir], + [ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/lib" + fi + fi + ]) + dnl Search the library and its dependencies in $additional_libdir and + dnl $LDFLAGS. Using breadth-first-seach. + LIB[]NAME= + LTLIB[]NAME= + INC[]NAME= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='$1 $2' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + dnl See if it was already located by an earlier AC_LIB_LINKFLAGS + dnl or AC_LIB_HAVE_LINKFLAGS call. + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" + else + dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined + dnl that this library doesn't exist. So just drop it. + : + fi + else + dnl Search the library lib$name in $additional_libdir and $LDFLAGS + dnl and the already constructed $LIBNAME/$LTLIBNAME. + found_dir= + found_la= + found_so= + found_a= + if test $use_additional = yes; then + if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then + found_dir="$additional_libdir" + found_so="$additional_libdir/lib$name.$shlibext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + else + if test -f "$additional_libdir/lib$name.$libext"; then + found_dir="$additional_libdir" + found_a="$additional_libdir/lib$name.$libext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then + found_dir="$dir" + found_so="$dir/lib$name.$shlibext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + else + if test -f "$dir/lib$name.$libext"; then + found_dir="$dir" + found_a="$dir/lib$name.$libext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + dnl Found the library. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + dnl Linking with a shared library. We attempt to hardcode its + dnl directory into the executable's runpath, unless it's the + dnl standard /usr/lib. + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then + dnl No hardcoding is needed. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + dnl The hardcoding into $LIBNAME is system dependent. + if test "$hardcode_direct" = yes; then + dnl Using DIR/libNAME.so during linking hardcodes DIR into the + dnl resulting binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + dnl Rely on "-L$found_dir". + dnl But don't add it if it's already contained in the LDFLAGS + dnl or the already constructed $LIBNAME + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" + fi + if test "$hardcode_minus_L" != no; then + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH + dnl here, because this doesn't fit in flags passed to the + dnl compiler. So give up. No hardcoding. This affects only + dnl very old systems. + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + dnl Linking with a static library. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" + else + dnl We shouldn't come here, but anyway it's good to have a + dnl fallback. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" + fi + fi + dnl Assume the include files are nearby. + additional_includedir= + case "$found_dir" in + */lib | */lib/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + dnl Potentially add $additional_includedir to $INCNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's /usr/local/include and we are using GCC on Linux, + dnl 3. if it's already present in $CPPFLAGS or the already + dnl constructed $INCNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INC[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $INCNAME. + INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + dnl Look for dependencies. + if test -n "$found_la"; then + dnl Read the .la file. It defines the variables + dnl dlname, library_names, old_library, dependency_libs, current, + dnl age, revision, installed, dlopen, dlpreopen, libdir. + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + dnl We use only dependency_libs. + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's /usr/local/lib and we are using GCC on Linux, + dnl 3. if it's already present in $LDFLAGS or the already + dnl constructed $LIBNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/lib"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/lib"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LIBNAME. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LTLIBNAME. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + dnl Handle this in the next round. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + dnl Handle this in the next round. Throw away the .la's + dnl directory; it is already contained in a preceding -L + dnl option. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + dnl Most likely an immediate library name. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" + ;; + esac + done + fi + else + dnl Didn't find the library; assume it is in the system directories + dnl known to the linker and runtime loader. (All the system + dnl directories known to the linker should also be known to the + dnl runtime loader, otherwise the system is severely misconfigured.) + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user must + dnl pass all path elements in one option. We can arrange that for a + dnl single library, but not when more than one $LIBNAMEs are used. + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" + done + dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + else + dnl The -rpath options are cumulative. + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + dnl When using libtool, the option that works for both libraries and + dnl executables is -R. The -R options are cumulative. + for found_dir in $ltrpathdirs; do + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" + done + fi + ]) + + dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, + dnl unless already present in VAR. + dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes + dnl contains two or three consecutive elements that belong together. + AC_DEFUN([AC_LIB_APPENDTOVAR], + [ + for element in [$2]; do + haveit= + for x in $[$1]; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + [$1]="${[$1]}${[$1]:+ }$element" + fi + done + ]) + + # lib-ld.m4 serial 2 (gettext-0.12) + dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. + dnl This file is free software, distributed under the terms of the GNU + dnl General Public License. As a special exception to the GNU General + dnl Public License, this file may be distributed as part of a program + dnl that contains a configuration script generated by Autoconf, under + dnl the same distribution terms as the rest of that program. + + dnl Subroutines of libtool.m4, + dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision + dnl with libtool.m4. + + dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. + AC_DEFUN([AC_LIB_PROG_LD_GNU], + [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, + [# I'd rather use --version here, but apparently some GNU ld's only accept -v. + if $LD -v 2>&1 &5; then + acl_cv_prog_gnu_ld=yes + else + acl_cv_prog_gnu_ld=no + fi]) + with_gnu_ld=$acl_cv_prog_gnu_ld + ]) + + dnl From libtool-1.4. Sets the variable LD. + AC_DEFUN([AC_LIB_PROG_LD], + [AC_ARG_WITH(gnu-ld, + [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], + test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_CANONICAL_HOST])dnl + # Prepare PATH_SEPARATOR. + # The user is always right. + if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh + fi + ac_prog=ld + if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by GCC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]* | [A-Za-z]:[\\/]*)] + [re_direlt='/[^/][^/]*/\.\./'] + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac + elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) + else + AC_MSG_CHECKING([for non-GNU ld]) + fi + AC_CACHE_VAL(acl_cv_path_LD, + [if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break + else + test "$with_gnu_ld" != yes && break + fi + fi + done + IFS="$ac_save_ifs" + else + acl_cv_path_LD="$LD" # Let the user override the test with a path. + fi]) + LD="$acl_cv_path_LD" + if test -n "$LD"; then + AC_MSG_RESULT($LD) + else + AC_MSG_RESULT(no) + fi + test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) + AC_LIB_PROG_LD_GNU + ]) + # Do all the work for Automake. This macro actually does too much -- # some checks are only needed if your package does certain things. # But this isn't really a big deal. *************** fi[]dnl *** 319,326 **** dnl Usage: dnl AM_INIT_AUTOMAKE(package,version, [no-define]) ! AC_DEFUN(AM_INIT_AUTOMAKE, ! [AC_REQUIRE([AC_PROG_INSTALL]) PACKAGE=[$1] AC_SUBST(PACKAGE) VERSION=[$2] --- 1166,1174 ---- dnl Usage: dnl AM_INIT_AUTOMAKE(package,version, [no-define]) ! AC_DEFUN([AM_INIT_AUTOMAKE], ! [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl ! AC_REQUIRE([AC_PROG_INSTALL]) PACKAGE=[$1] AC_SUBST(PACKAGE) VERSION=[$2] *************** AC_REQUIRE([AM_SANITY_CHECK]) *** 336,353 **** AC_REQUIRE([AC_ARG_PROGRAM]) dnl FIXME This is truly gross. missing_dir=`cd $ac_aux_dir && pwd` ! AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) ! AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) AC_REQUIRE([AC_PROG_MAKE_SET])]) # # Check to make sure that the build environment is sane. # ! AC_DEFUN(AM_SANITY_CHECK, [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 --- 1184,1230 ---- AC_REQUIRE([AC_ARG_PROGRAM]) dnl FIXME This is truly gross. missing_dir=`cd $ac_aux_dir && pwd` ! AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir) AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) ! AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir) AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) AC_REQUIRE([AC_PROG_MAKE_SET])]) + # Copyright 2002 Free Software Foundation, Inc. + + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2, or (at your option) + # any later version. + + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + + # AM_AUTOMAKE_VERSION(VERSION) + # ---------------------------- + # Automake X.Y traces this macro to ensure aclocal.m4 has been + # generated from the m4 files accompanying Automake X.Y. + AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"]) + + # AM_SET_CURRENT_AUTOMAKE_VERSION + # ------------------------------- + # Call AM_AUTOMAKE_VERSION so it can be traced. + # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. + AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], + [AM_AUTOMAKE_VERSION([1.4-p6])]) + # # Check to make sure that the build environment is sane. # ! AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 *************** AC_MSG_RESULT(yes)]) *** 388,394 **** dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) dnl The program must properly implement --version. ! AC_DEFUN(AM_MISSING_PROG, [AC_MSG_CHECKING(for working $2) # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. --- 1265,1271 ---- dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) dnl The program must properly implement --version. ! AC_DEFUN([AM_MISSING_PROG], [AC_MSG_CHECKING(for working $2) # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. *************** AC_SUBST($1)]) *** 407,413 **** # serial 1 ! AC_DEFUN(AM_MAINTAINER_MODE, [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default AC_ARG_ENABLE(maintainer-mode, --- 1284,1290 ---- # serial 1 ! AC_DEFUN([AM_MAINTAINER_MODE], [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default AC_ARG_ENABLE(maintainer-mode, *************** AC_DEFUN(AM_MAINTAINER_MODE, *** 424,430 **** # Define a conditional. ! AC_DEFUN(AM_CONDITIONAL, [AC_SUBST($1_TRUE) AC_SUBST($1_FALSE) if $2; then --- 1301,1307 ---- # Define a conditional. ! AC_DEFUN([AM_CONDITIONAL], [AC_SUBST($1_TRUE) AC_SUBST($1_FALSE) if $2; then *************** fi]) *** 437,443 **** # Like AC_CONFIG_HEADER, but automatically create stamp file. ! AC_DEFUN(AM_CONFIG_HEADER, [AC_PREREQ([2.12]) AC_CONFIG_HEADER([$1]) dnl When config.status generates a header, we must update the stamp-h file. --- 1314,1320 ---- # Like AC_CONFIG_HEADER, but automatically create stamp file. ! AC_DEFUN([AM_CONFIG_HEADER], [AC_PREREQ([2.12]) AC_CONFIG_HEADER([$1]) dnl When config.status generates a header, we must update the stamp-h file. *************** for am_file in <<$1>>; do *** 458,460 **** --- 1335,1916 ---- done<<>>dnl>>) changequote([,]))]) + # Configure paths for GTK+ + # Owen Taylor 1997-2001 + + dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) + dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES, + dnl pass to pkg-config + dnl + AC_DEFUN(AM_PATH_GTK_2_0, + [dnl + dnl Get the cflags and libraries from pkg-config + dnl + AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program], + , enable_gtktest=yes) + + pkg_config_args=gtk+-2.0 + for module in . $4 + do + case "$module" in + gthread) + pkg_config_args="$pkg_config_args gthread-2.0" + ;; + esac + done + + no_gtk="" + + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + + if test x$PKG_CONFIG != xno ; then + if pkg-config --atleast-pkgconfig-version 0.7 ; then + : + else + echo *** pkg-config too old; version 0.7 or better required. + no_gtk=yes + PKG_CONFIG=no + fi + else + no_gtk=yes + fi + + min_gtk_version=ifelse([$1], ,2.0.0,$1) + AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version) + + if test x$PKG_CONFIG != xno ; then + ## don't try to run the test against uninstalled libtool libs + if $PKG_CONFIG --uninstalled $pkg_config_args; then + echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH" + enable_gtktest=no + fi + + if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then + : + else + no_gtk=yes + fi + fi + + if test x"$no_gtk" = x ; then + GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags` + GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs` + gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_gtktest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$GTK_LIBS $LIBS" + dnl + dnl Now check if the installed GTK+ is sufficiently new. (Also sanity + dnl checks the results of pkg-config to some extent) + dnl + rm -f conf.gtktest + AC_TRY_RUN([ + #include + #include + #include + + int + main () + { + int major, minor, micro; + char *tmp_version; + + system ("touch conf.gtktest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_gtk_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_gtk_version"); + exit(1); + } + + if ((gtk_major_version != $gtk_config_major_version) || + (gtk_minor_version != $gtk_config_minor_version) || + (gtk_micro_version != $gtk_config_micro_version)) + { + printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", + $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf ("*** was found! If pkg-config was correct, then it is best\n"); + printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); + printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); + printf("*** required on your system.\n"); + printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); + printf("*** to point to the correct configuration files\n"); + } + else if ((gtk_major_version != GTK_MAJOR_VERSION) || + (gtk_minor_version != GTK_MINOR_VERSION) || + (gtk_micro_version != GTK_MICRO_VERSION)) + { + printf("*** GTK+ header files (version %d.%d.%d) do not match\n", + GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); + printf("*** library (version %d.%d.%d)\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + } + else + { + if ((gtk_major_version > major) || + ((gtk_major_version == major) && (gtk_minor_version > minor)) || + ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n"); + printf("*** correct copy of pkg-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + } + return 1; + } + ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_gtk" = x ; then + AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$PKG_CONFIG" = "no" ; then + echo "*** A new enough version of pkg-config was not found." + echo "*** See http://pkgconfig.sourceforge.net" + else + if test -f conf.gtktest ; then + : + else + echo "*** Could not run GTK+ test program, checking why..." + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$LIBS $GTK_LIBS" + AC_TRY_LINK([ + #include + #include + ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GTK+ or finding the wrong" + echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GTK_CFLAGS="" + GTK_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(GTK_CFLAGS) + AC_SUBST(GTK_LIBS) + rm -f conf.gtktest + ]) + + # Configure paths for GLIB + # Owen Taylor 1997-2001 + + dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) + dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject or + dnl gthread is specified in MODULES, pass to pkg-config + dnl + AC_DEFUN(AM_PATH_GLIB_2_0, + [dnl + dnl Get the cflags and libraries from pkg-config + dnl + AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program], + , enable_glibtest=yes) + + pkg_config_args=glib-2.0 + for module in . $4 + do + case "$module" in + gmodule) + pkg_config_args="$pkg_config_args gmodule-2.0" + ;; + gobject) + pkg_config_args="$pkg_config_args gobject-2.0" + ;; + gthread) + pkg_config_args="$pkg_config_args gthread-2.0" + ;; + esac + done + + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + + no_glib="" + + if test x$PKG_CONFIG != xno ; then + if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then + : + else + echo *** pkg-config too old; version 0.7 or better required. + no_glib=yes + PKG_CONFIG=no + fi + else + no_glib=yes + fi + + min_glib_version=ifelse([$1], ,2.0.0,$1) + AC_MSG_CHECKING(for GLIB - version >= $min_glib_version) + + if test x$PKG_CONFIG != xno ; then + ## don't try to run the test against uninstalled libtool libs + if $PKG_CONFIG --uninstalled $pkg_config_args; then + echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH" + enable_glibtest=no + fi + + if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then + : + else + no_glib=yes + fi + fi + + if test x"$no_glib" = x ; then + GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` + GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0` + GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` + + GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args` + GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args` + glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_glibtest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GLIB_CFLAGS" + LIBS="$GLIB_LIBS $LIBS" + dnl + dnl Now check if the installed GLIB is sufficiently new. (Also sanity + dnl checks the results of pkg-config to some extent) + dnl + rm -f conf.glibtest + AC_TRY_RUN([ + #include + #include + #include + + int + main () + { + int major, minor, micro; + char *tmp_version; + + system ("touch conf.glibtest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_glib_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_glib_version"); + exit(1); + } + + if ((glib_major_version != $glib_config_major_version) || + (glib_minor_version != $glib_config_minor_version) || + (glib_micro_version != $glib_config_micro_version)) + { + printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", + $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, + glib_major_version, glib_minor_version, glib_micro_version); + printf ("*** was found! If pkg-config was correct, then it is best\n"); + printf ("*** to remove the old version of GLib. You may also be able to fix the error\n"); + printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); + printf("*** required on your system.\n"); + printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); + printf("*** to point to the correct configuration files\n"); + } + else if ((glib_major_version != GLIB_MAJOR_VERSION) || + (glib_minor_version != GLIB_MINOR_VERSION) || + (glib_micro_version != GLIB_MICRO_VERSION)) + { + printf("*** GLIB header files (version %d.%d.%d) do not match\n", + GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); + printf("*** library (version %d.%d.%d)\n", + glib_major_version, glib_minor_version, glib_micro_version); + } + else + { + if ((glib_major_version > major) || + ((glib_major_version == major) && (glib_minor_version > minor)) || + ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", + glib_major_version, glib_minor_version, glib_micro_version); + printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n"); + printf("*** correct copy of pkg-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + } + return 1; + } + ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_glib" = x ; then + AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$PKG_CONFIG" = "no" ; then + echo "*** A new enough version of pkg-config was not found." + echo "*** See http://www.freedesktop.org/software/pkgconfig/" + else + if test -f conf.glibtest ; then + : + else + echo "*** Could not run GLIB test program, checking why..." + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GLIB_CFLAGS" + LIBS="$LIBS $GLIB_LIBS" + AC_TRY_LINK([ + #include + #include + ], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GLIB or finding the wrong" + echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GLIB is incorrectly installed."]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GLIB_CFLAGS="" + GLIB_LIBS="" + GLIB_GENMARSHAL="" + GOBJECT_QUERY="" + GLIB_MKENUMS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(GLIB_CFLAGS) + AC_SUBST(GLIB_LIBS) + AC_SUBST(GLIB_GENMARSHAL) + AC_SUBST(GOBJECT_QUERY) + AC_SUBST(GLIB_MKENUMS) + rm -f conf.glibtest + ]) + + # Configure paths for LIBART + # Raph Levien 98-11-18 + # stolen from Manish Singh 98-9-30 + # stolen back from Frank Belew + # stolen from Manish Singh + # Shamelessly stolen from Owen Taylor + + dnl AM_PATH_LIBART([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) + dnl Test for LIBART, and define LIBART_CFLAGS and LIBART_LIBS + dnl + AC_DEFUN(AM_PATH_LIBART, + [dnl + dnl Get the cflags and libraries from the libart-config script + dnl + AC_ARG_WITH(libart-prefix,[ --with-libart-prefix=PFX Prefix where LIBART is installed (optional)], + libart_prefix="$withval", libart_prefix="") + AC_ARG_WITH(libart-exec-prefix,[ --with-libart-exec-prefix=PFX Exec prefix where LIBART is installed (optional)], + libart_exec_prefix="$withval", libart_exec_prefix="") + AC_ARG_ENABLE(libarttest, [ --disable-libarttest Do not try to compile and run a test LIBART program], + , enable_libarttest=yes) + + if test x$libart_exec_prefix != x ; then + libart_args="$libart_args --exec-prefix=$libart_exec_prefix" + if test x${LIBART_CONFIG+set} != xset ; then + LIBART_CONFIG=$libart_exec_prefix/bin/libart-config + fi + fi + if test x$libart_prefix != x ; then + libart_args="$libart_args --prefix=$libart_prefix" + if test x${LIBART_CONFIG+set} != xset ; then + LIBART_CONFIG=$libart_prefix/bin/libart-config + fi + fi + + AC_PATH_PROG(LIBART_CONFIG, libart2-config, no) + if test "$LIBART_CONFIG" = "no" ; then + AC_PATH_PROG(LIBART_CONFIG, libart-config, no) + fi + min_libart_version=ifelse([$1], ,0.2.5,$1) + AC_MSG_CHECKING(for LIBART - version >= $min_libart_version) + no_libart="" + if test "$LIBART_CONFIG" = "no" ; then + no_libart=yes + else + LIBART_CFLAGS=`$LIBART_CONFIG $libartconf_args --cflags` + LIBART_LIBS=`$LIBART_CONFIG $libartconf_args --libs` + + libart_major_version=`$LIBART_CONFIG $libart_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + libart_minor_version=`$LIBART_CONFIG $libart_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + libart_micro_version=`$LIBART_CONFIG $libart_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_libarttest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $LIBART_CFLAGS" + LIBS="$LIBS $LIBART_LIBS" + dnl + dnl Now check if the installed LIBART is sufficiently new. (Also sanity + dnl checks the results of libart-config to some extent + dnl + rm -f conf.libarttest + AC_TRY_RUN([ + #include + #include + #include + #include + + char* + my_strdup (char *str) + { + char *new_str; + + if (str) + { + new_str = malloc ((strlen (str) + 1) * sizeof(char)); + strcpy (new_str, str); + } + else + new_str = NULL; + + return new_str; + } + + int main () + { + int major, minor, micro; + char *tmp_version; + + system ("touch conf.libarttest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = my_strdup("$min_libart_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_libart_version"); + exit(1); + } + + if (($libart_major_version > major) || + (($libart_major_version == major) && ($libart_minor_version > minor)) || + (($libart_major_version == major) && ($libart_minor_version == minor) && ($libart_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** 'libart-config --version' returned %d.%d.%d, but the minimum version\n", $libart_major_version, $libart_minor_version, $libart_micro_version); + printf("*** of LIBART required is %d.%d.%d. If libart-config is correct, then it is\n", major, minor, micro); + printf("*** best to upgrade to the required version.\n"); + printf("*** If libart-config was wrong, set the environment variable LIBART_CONFIG\n"); + printf("*** to point to the correct copy of libart-config, and remove the file\n"); + printf("*** config.cache before re-running configure\n"); + return 1; + } + } + + ],, no_libart=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_libart" = x ; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$LIBART_CONFIG" = "no" ; then + echo "*** The libart-config script installed by LIBART could not be found" + echo "*** If LIBART was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the LIBART_CONFIG environment variable to the" + echo "*** full path to libart-config." + else + if test -f conf.libarttest ; then + : + else + echo "*** Could not run LIBART test program, checking why..." + CFLAGS="$CFLAGS $LIBART_CFLAGS" + LIBS="$LIBS $LIBART_LIBS" + AC_TRY_LINK([ + #include + #include + ], [ return 0; ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding LIBART or finding the wrong" + echo "*** version of LIBART. If it is not finding LIBART, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means LIBART was incorrectly installed" + echo "*** or that you have moved LIBART since it was installed. In the latter case, you" + echo "*** may want to edit the libart-config script: $LIBART_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + LIBART_CFLAGS="" + LIBART_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(LIBART_CFLAGS) + AC_SUBST(LIBART_LIBS) + rm -f conf.libarttest + ]) + diff -Nrc3pad gcc-3.3.3/libjava/boehm.cc gcc-3.4.0/libjava/boehm.cc *** gcc-3.3.3/libjava/boehm.cc 2003-01-03 05:19:53.000000000 +0000 --- gcc-3.4.0/libjava/boehm.cc 2003-12-04 13:07:07.000000000 +0000 *************** *** 1,6 **** // boehm.cc - interface between libjava and Boehm GC. ! /* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation This file is part of libgcj. --- 1,6 ---- // boehm.cc - interface between libjava and Boehm GC. ! /* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation This file is part of libgcj. *************** details. */ *** 11,16 **** --- 11,17 ---- #include #include + #include #include #include *************** _Jv_MarkObj (void *addr, void *msp, void *** 205,210 **** --- 206,213 ---- MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c, cDlabel); p = (ptr_t) c->protectionDomain; MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c, cPlabel); + p = (ptr_t) c->hack_signers; + MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c, cSlabel); #ifdef INTERPRETER if (_Jv_IsInterpretedClass (c)) *************** _Jv_MarkArray (void *addr, void *msp, vo *** 325,335 **** // since another one could be registered first. But the compiler also // knows this, so in that case everything else will break, too. #define GCJ_DEFAULT_DESCR GC_MAKE_PROC(GC_GCJ_RESERVED_MARK_PROC_INDEX,0) void * ! _Jv_BuildGCDescr(jclass) { ! /* FIXME: We should really look at the class and build the descriptor. */ ! return (void *)(GCJ_DEFAULT_DESCR); } // Allocate some space that is known to be pointer-free. --- 328,382 ---- // since another one could be registered first. But the compiler also // knows this, so in that case everything else will break, too. #define GCJ_DEFAULT_DESCR GC_MAKE_PROC(GC_GCJ_RESERVED_MARK_PROC_INDEX,0) + void * ! _Jv_BuildGCDescr(jclass self) { ! jlong desc = 0; ! jint bits_per_word = CHAR_BIT * sizeof (void *); ! ! // Note: for now we only consider a bitmap mark descriptor. We ! // could also handle the case where the first N fields of a type are ! // references. However, this is not very likely to be used by many ! // classes, and it is easier to compute things this way. ! ! // The vtable pointer. ! desc |= 1ULL << (bits_per_word - 1); ! #ifndef JV_HASH_SYNCHRONIZATION ! // The sync_info field. ! desc |= 1ULL << (bits_per_word - 2); ! #endif ! ! for (jclass klass = self; klass != NULL; klass = klass->getSuperclass()) ! { ! jfieldID field = JvGetFirstInstanceField(klass); ! int count = JvNumInstanceFields(klass); ! ! for (int i = 0; i < count; ++i) ! { ! if (field->isRef()) ! { ! unsigned int off = field->getOffset(); ! // If we run into a weird situation, we bail. ! if (off % sizeof (void *) != 0) ! return (void *) (GCJ_DEFAULT_DESCR); ! off /= sizeof (void *); ! // If we find a field outside the range of our bitmap, ! // fall back to procedure marker. The bottom 2 bits are ! // reserved. ! if (off >= bits_per_word - 2) ! return (void *) (GCJ_DEFAULT_DESCR); ! desc |= 1ULL << (bits_per_word - off - 1); ! } ! ! field = field->getNextField(); ! } ! } ! ! // For bitmap mark type, bottom bits are 01. ! desc |= 1; ! // Bogus warning avoidance (on many platforms). ! return (void *) (unsigned long) desc; } // Allocate some space that is known to be pointer-free. diff -Nrc3pad gcc-3.3.3/libjava/ChangeLog gcc-3.4.0/libjava/ChangeLog *** gcc-3.3.3/libjava/ChangeLog 2004-02-14 20:20:08.000000000 +0000 --- gcc-3.4.0/libjava/ChangeLog 2004-04-19 01:59:40.000000000 +0000 *************** *** 1,61 **** ! 2004-02-14 Release Manager ! * GCC 3.3.3 Released. ! 2003-10-24 Ulrich Weigand ! * prims.cc (catch_segv): Unblock correct signal. ! (catch_fpe): Likewise. ! 2003-10-16 Release Manager ! * GCC 3.3.2 Released. 2003-09-09 Alan Modra * configure: Regenerate. 2003-08-20 Andrew Haley * prims.cc (unblock_signal): New function. (catch_segv): Use it. (catch_fpe): Likewise. ! * include/i386-signal.h (RESTORE): New. ! (INIT_SEGV): Set restorer. ! (INIT_FPE): Likewise. ! 2003-08-08 Kean Johnston ! * java/io/natFilePosix.cc: HAVE_READDIR_R is broken on SCO. Undefine. ! If MAXPATHLEN is not defined by the system, define it. ! * java/io/natFileDescriptorPosix.cc: Ditto. ! 2003-08-04 Release Manager ! * GCC 3.3.1 Released. ! 2003-08-04 Release Manager ! * GCC 3.3.1 Released. ! 2003-07-11 Michael Koch ! * gnu/gcj/convert/natIconv.cc ! (iconv_init): Fixed possible memory leak by releasing allocated iconv ! handle. ! 2003-07-11 Jeff Sturm ! PR libgcj/10886: ! * gnu/java/rmi/server/UnicastRemoteCall.java (returnValue): ! Test for empty vector. ! 2003-07-11 Jeff Sturm ! PR libgcj/10838: ! * java/io/ObjectInputStream (enableResolveObject): ! Fixed spelling of permission name. 2003-07-11 Matt Kraai --- 1,6246 ---- ! 2004-04-18 Release Manager ! * GCC 3.4.0 released. ! 2004-03-19 Rainer Orth ! * verify.cc: Undef PC. ! 2004-03-11 Alan Modra ! * include/powerpc-signal.h: Revert 2004-01-21 change. ! (INIT_SEGV, INIT_FPE): Provide powerpc64 versions. Check return ! from syscall for ppc32 versions. ! ! 2004-02-25 Andrew Haley ! ! PR java/14296: ! * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Make sure ! we have a valid method index. ! ! 2004-02-14 Per Bothner ! ! * java/nio/channels/spi/AbstractInterruptibleChannel.java (close): ! Set closed before calling implCloseChannel, as in the spec. ! ! 2004-02-08 Per Bothner ! ! * java/nio/ByteBuffer.java (shiftDown): New helper method. ! * java/nio/natDirectByteBufferImpl.cc (shiftDown): New implementation. ! * java/nio/ByteBufferImpl.java (compact): Use new shiftDown method. ! * sava/nio/ByteBufferHelper.java: Remove redundant 'final' specifiers. ! Pass ByteOrder parameter to most methods, since the underlying ! ByteBuffer's order isn't always what we should use. ! * java/nio/ByteBufferImpl.java: Pass byte-order various places. ! * java/nio/DirectByteBufferImpl.java: Likewise. ! Use ByteBufferHelper methods. ! * java/nio/MappedByteBufferImpl.java: Likewise. ! (compact): Use shiftDown. ! * java/nio/CharViewBufferImpl.java (): Pass byte-order. ! (get, put): Use ByteBufferHelper. ! (compact): Use new shiftDown method. ! (duplicate(boolean)): New helper method. ! (duplicate, asReadOnlyBuffer): Use it. ! (order): Return endian field. ! * java/nio/DoubleViewBufferImpl.java: Likewise. ! * java/nio/FloatViewBufferImpl.java: Likewise. ! * java/nio/IntViewBufferImpl.java: Likewise. ! * java/nio/LongViewBufferImpl.java: Likewise. ! * java/nio/ShortViewBufferImpl.java: Likewise. ! * java/nio/CharViewBufferImpl.java (subsequence): Redundant test. ! * java/nio/DirectByteBufferImpl.java (shiftDown): New native method. ! (compact): Re-implement using shiftDown. ! ! 2004-02-05 Michael Koch ! ! * gnu/java/nio/NIOServerSocket.java ! (impl): Unused, removed. ! * gnu/java/nio/SocketChannelImpl.java ! (finnishConnect): Don't throw NoConnectionPendingException if not ! connected or no connection pending. ! ! 2004-02-03 Tom Tromey ! ! * java/lang/natPosixProcess.cc (startProcess): Handle case where ! PATH or LD_LIBRARY_PATH is not set in parent environment. ! ! 2004-02-03 Mohan Embar ! ! * gnu/java/nio/DatagramChannelImpl.java ! (inChannelOperation): New field. ! (isInChannelOperation): New accessor. ! (setInChannelOperation): New modifier. ! (receive): Use capacity() - position() of destination ! buffer instead of remaining(). Set and reset our "in ! channel operation indicator" before and after delegating ! the receive to our datagram socket. Removed testing code. ! Update destination buffer's current position if it is ! backed by a byte array (hasArray() is true). ! (send): Set and reset our "in channel operation indicator" ! before and after delegating the send to our datagram socket. ! Removed testing code. Update source buffer's current position ! if it is backed by a byte array (hasArray() is true). ! * gnu/java/nio/SocketChannelImpl.java (read(ByteBuffer)): ! Use capacity() - position() of destination buffer instead ! of remaining(). ! * java/net/DatagramSocket.java (receive): Don't throw an ! IllegalBlockingModeException if we have a non-blocking ! channel which initiated this operation. ! (send): Likewise. ! ! 2004-02-03 Mohan Embar ! ! * gnu/java/net/PlainSocketImpl.java ! (inChannelOperation): New field. ! (isInChannelOperation): New accessor. ! (setInChannelOperation): New modifier. ! * gnu/java/nio/ServerSocketChannelImpl.java ! (accept): Set and reset our server socket's PlainSocketImpl's ! "in channel operation" indicator before and after delegating ! the accept to our server socket. ! * gnu/java/nio/SocketChannelImpl.java ! (connect): Set and reset our socket's PlainSocketImpl's "in channel ! operation" indicator before and after delegating the operation to ! our socket. ! (read): Likewise. ! (write): Likewise. ! * java/net/ServerSocket.java (implAccept): Don't throw an ! IllegalBlockingModeException if we have a non-blocking ! channel which initiated this accept operation. ! * java/net/Socket.java (connect): Don't throw an ! IllegalBlockingModeException if we have a non-blocking ! channel which initiated this connect operation. ! * java/nio/channels/spi/AbstractSelectableChannel.java ! (configureBlocking): Only call implConfigureBlocking() if ! the desired blocking mode is different from our current one. ! ! 2004-01-24 Michael Koch ! ! * gnu/java/net/protocol/http/Connection.java ! (connect): Don't initialize bufferedOutputStream if not needed. ! (sendRequest): Set property for content length if content is present. ! Write content only if present. ! (getOutputStream): Check if already connected, dont connect, ! initalize bufferedOutputStream if needed. ! ! 2004-01-24 Michael Koch ! ! * Makefile.am: Added library version to gtk peer lib. ! * Makefile.in: Regenerated. ! ! 2004-01-21 Jakub Jelinek ! ! * include/powerpc-signal.h: Add #ifndef __powerpc64__ around the ! header. For __powerpc64__ provide the default-signal.h definitions ! for now. ! * include/x86_64-signal.h [!__x86_64__]: Include java-signal-aux.h ! instead of the dummy definitions. ! * configure.host (x86_64-*): Remove CHECKREFSPEC, add DIVIDESPEC. ! (powerpc64*-*): Remove with_libffi_default. ! Only add -mminimal-toc for 64-bit compilations. ! * configure.in: Use powerpc-signal.h on powerpc64 as well. ! (x86_64-*-linux*): Set SIGNAL_HANDLER_AUX. ! Link SIGNAL_HANDLER_AUX to include/java-signal-aux.h. ! * configure: Rebuilt. ! ! 2004-01-21 Tom Tromey ! ! PR java/13468: ! * Makefile.in: Rebuilt. ! * Makefile.am (interpret.lo): New target. ! ! 2004-01-20 Jakub Jelinek ! ! * Makefile.am (lib_org_w3c_dom_la_LIBADD, ! lib_org_w3c_dom_la_LDFLAGS): New. ! (lib_org_xml_sax_la_LIBADD, lib_org_xml_sax_la_LDFLAGS): New. ! * Makefile.in: Rebuilt. ! ! 2004-01-19 Matthias Klose ! ! * libtool-version: Increased `current' to 5. ! ! 2004-01-16 Andrew Haley ! ! * sysdep/x86-64/locks.h: Don't use in/out memory constraints. ! * sysdep/i386/locks.h: Likewise. ! ! 2004-01-16 Fernando Nasser ! ! * java/awt/EventDispatchThread.java (run): Stop running when ! interrupted. ! * java/awt/EventQueue.java (pop): Stop dispatch thread when done. ! Reset the queue after transferring its contents. ! (push): Start a new dispatch thread if none is running. ! ! 2004-01-16  Olga Rodimina ! ! * gnu/java/awt/peer/gtk/GdkGraphics2D.java: ! (doPolygon): set fill rule of polygon to ! WIND_EVEN_ODD by default. ! ! 2004-01-15 Olga Rodimina ! ! * gnu/java/awt/peer/gtk/GdkGraphics2D.java: ! Implemented rendering hints related methods. ! (getDefaultHints): New helper method. Returns ! default rendering hints. ! (walkPath): changed to normalize path if ! the KEY_STROKE_CONTROL key is in "normalize" mode. ! (draw3DRect): changed coordinates of rectangle by +0.5 ! if in "normalize" mode. ! ! 2004-01-15 Tom Tromey ! ! * Makefile.in: Rebuilt. ! * Makefile.am (gnu/gcj/runtime/StackTrace.lo): New rule. ! (%.lo: %.java) Filter out StackTrace.lo. ! ! 2004-01-14 Kelley Cook ! ! * configure.in: Add in AC_PREREQ(2.13) ! * libltdl/configure.ac: Update to AC_PREREQ(2.57). Delete ! FIXME comment. ! ! 2004-01-14 Nathan Bryant ! Tom Tromey ! ! PR libgcj/12001: ! * gnu/gcj/runtime/VMClassLoader.java (VMClassLoader): Pass empty ! array to superclass. ! (init): Changed interface; add URLs here. ! (initialize): New static method. ! * prims.cc (_Jv_CreateJavaVM): Initialize ClassLoader here... ! (_Jv_RunMain): ... not here. ! ! 2004-01-14 Michael Koch ! ! * java/text/MessageFormat.java: ! Added descriptions to exceptions. ! This fixes PR libgcj/2429. ! ! 2004-01-13 Fernando Nasser ! ! * java/awt/EventQueue.java (isDispatchThread): Do check on top of stack. ! (push): Make sure push is performed at the top of the thread stack. ! ! 2004-01-13 Thomas Fitzsimmons ! ! * gnu/java/awt/peer/gtk/GtkTextAreaPeer.java, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c ! (native create): Add width and height parameters. Set text ! view's size request according to new parameters. ! (create): Calculate text view size based on current font's ! metrics and number of rows and columns. Set TextArea's font if ! not already set. Call native create. ! (getMinimumSize): Call minimumSize. ! (getPreferredSize): Call preferredSize. ! (getHScrollbarHeight): New method. ! (getVScrollbarWidth): New method. ! (minimumSize): Calculate minimum size based on scrollbar ! visibility, scrollbar sizes, font metrics and number of rows and ! columns. ! (preferredSize): Likewise for preferred size. ! (gtkTextGetSize): Remove method. ! ! 2004-01-13 Thomas Fitzsimmons ! ! * gnu/java/awt/peer/gtk/GtkComponentPeer.java ! (initializeInsets): Remove method. ! (GtkComponentPeer): Initialize insets field. Remove call to ! initializeInsets. ! * gnu/java/awt/peer/gtk/GtkDialogPeer.java (initializeInsets): ! Remove method. ! * gnu/java/awt/peer/gtk/GtkFramePeer.java (initializeInsets): ! Remove method. ! * gnu/java/awt/peer/gtk/GtkWindowPeer.java, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c: ! (latestInsets): Remove field. ! (native create): Add insets parameter. Call ! window_get_frame_extents. Set the window's default size and ! size request based on its frame extents. ! (create): Initialize insets. ! (postInsetsChangedEvent): New method. ! (postConfigureEvent): Remove parameters top, left, bottom, ! right. Remove insets-related logic. ! (connectJObject): Handle property-notify-event. ! (window_get_frame_extents, request_frame_extents, ! property_notify_predicate, window_property_changed_cb): New ! static functions. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c ! (pre_event_handler): Remove insets-related logic for configure ! events. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c (gtkInit): ! Update postConfigureEvent signature. ! ! 2004-01-13 Fernando Nasser ! ! * gnu/java/awt/peer/gtk/TestAWT.java (DialogWindow): Add WindowAdapter ! to handle Window "Closing" events. ! ! 2004-01-13  David Jee  ! ! * gnu/java/awt/peer/gtk/GtkContainerPeer.java ! (setBackground): New method. Children with no explicitly-set ! background will be repainted with the parent container's new ! background color. ! ! 2004-01-13  David Jee  ! ! * Makefile.am: Add BitwiseXORComposite.java. ! * Makefile.in: Regenerated. ! * gcj/Makefile.in: Regenerated. ! * include/Makefile.in: Regenerated. ! * testsuite/Makefile.in: Regenerated. ! ! 2004-01-12 Fernando Nasser ! ! * gnu/java/awt/peer/gtk/TestAWT.java: Fix test program so that it does ! not show modal dialogs twice and so that it allows showing a modal ! dialog from another modal dialog. ! ! 2004-01-12 Fernando Nasser ! ! * java/awt/Dialog.java (show): Enable blocking for all modal dialogs ! and run secondary dispatch thread to process event queue while this ! thread is blocked. ! ! 2004-01-12 Graydon Hoare ! ! * gnu/java/awt/gtk/GdkGraphics2D.java ! (static): Check GtkToolkit before initializing static state. ! (Graphics2D): Don't construct transform with 0.5 unit offset. ! ! 2003-11-06 Sascha Brawer ! ! * gnu/java/awt/BitwiseXORComposite.java: Add. ! * gnu/java/awt/peer/gtk/GdkGraphics2D.java ! (setXORMode): Switch to gnu.java.awt.BitwiseXORComposite. ! (BitwiseXORComposite): Remove inner class. ! ! 2004-01-11 Michael Koch ! ! * gnu/java/lang/reflect/TypeSignature.java ! (getEncodingOfClass): Documentation fixed. ! (getClassForEncoding): Give class loader to Class.forName(). ! Documentation fixed. ! ! 2004-01-11 Sascha Brawer ! ! * javax/swing/undo/CompoundEdit.java (serialVersionUID): Added. ! ! 2004-01-11 Michael Koch ! ! * javax/swing/undo/StateEditable.java ! (RCSID): Removed redundant modifiers. ! ! 2004-01-10 Michael Koch ! ! * javax/print/attribute/EnumSyntax.java ! (getStringTable): Made protected. ! (getEnumValueTable): Likewise. ! * javax/print/attribute/standard/JobKOctetsProcessed.java ! (JobKOctetsProcessed): Don't implement PrintRequestAttribute. ! * javax/print/attribute/standard/JobMediaSheetsCompleted.java ! (JobMediaSheetsCompleted): Made class final. ! * javax/print/attribute/standard/OutputDeviceAssigned.java ! (getName): Fixed typo. ! * javax/print/attribute/standard/RequestingUserName.java ! (serialVersionUID): Fixed value. ! ! 2004-01-10 Michael Koch ! ! * javax/swing/plaf/basic/BasicButtonUI.java, ! javax/swing/plaf/basic/BasicCheckBoxUI.java, ! javax/swing/plaf/basic/BasicListUI.java, ! javax/swing/plaf/basic/BasicOptionPaneUI.java, ! javax/swing/plaf/basic/BasicPanelUI.java, ! javax/swing/plaf/basic/BasicRadioButtonUI.java, ! javax/swing/plaf/basic/BasicScrollPaneUI.java, ! javax/swing/plaf/basic/BasicToggleButtonUI.java, ! javax/swing/plaf/basic/BasicViewportUI.java: ! Fixed import statements. ! ! 2004-01-10 Michael Koch ! ! * gnu/java/awt/image/ImageDecoder.java ! (produce): Made public. ! * gnu/java/awt/peer/GLightweightPeer.java, ! gnu/java/awt/peer/gtk/GtkToolkit.java: ! Reformated. ! ! 2004-01-10 Michael Koch ! ! * javax/swing/JRadioButtonMenuItem.java, ! javax/swing/JSeparator.java, ! javax/swing/JSplitPane.java, ! javax/swing/JTextPane.java, ! javax/swing/JToolBar.java, ! javax/swing/ListCellRenderer.java, ! javax/swing/ListModel.java, ! javax/swing/MenuElement.java, ! javax/swing/OverlayLayout.java, ! javax/swing/ProgressMonitor.java, ! javax/swing/ProgressMonitorInputStream.java, ! javax/swing/Renderer.java, ! javax/swing/RootPaneContainer.java, ! javax/swing/Scrollable.java, ! javax/swing/SingleSelectionModel.java, ! javax/swing/ToolTipManager.java, ! javax/swing/ViewportLayout.java, ! javax/swing/event/DocumentEvent.java, ! javax/swing/event/SwingPropertyChangeSupport.java, ! javax/swing/event/TreeSelectionEvent.java, ! javax/swing/event/UndoableEditEvent.java, ! javax/swing/text/AbstractDocument.java, ! javax/swing/text/AttributeSet.java, ! javax/swing/text/Caret.java, ! javax/swing/text/ComponentView.java, ! javax/swing/text/DefaultCaret.java, ! javax/swing/text/DefaultEditorKit.java, ! javax/swing/text/Document.java, ! javax/swing/text/EditorKit.java, ! javax/swing/text/GapContent.java, ! javax/swing/text/Keymap.java, ! javax/swing/text/MutableAttributeSet.java, ! javax/swing/text/PlainEditorKit.java, ! javax/swing/text/Segment.java, ! javax/swing/text/Style.java, ! javax/swing/text/StyledDocument.java, ! javax/swing/text/StyledEditorKit.java, ! javax/swing/text/TextAction.java, ! javax/swing/text/View.java: Fixed import statements. ! ! 2004-01-08 Graydon Hoare ! ! * javax/swing/JLayeredPane.java: Rewrite to accomodate ! djee@redhat.com's recent inverse ordering of Container elements. ! ! 2004-01-09 Michael Koch ! ! * gnu/java/lang/ArrayHelper.java ! (equalsArray): Removed. ! ! 2004-01-09 Andrew Haley ! ! * java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): Resolve ! a Utf8Const field before looking at its class. ! ! 2004-01-09 Michael Koch ! ! * javax/print/attribute/standard/DocumentName.java, ! javax/print/attribute/standard/JobHoldUntil.java, ! javax/print/attribute/standard/JobMessageFromOperator.java, ! javax/print/attribute/standard/JobName.java, ! javax/print/attribute/standard/JobOriginatingUserName.java, ! javax/print/attribute/standard/OutputDeviceAssigned.java, ! javax/print/attribute/standard/PrinterInfo.java, ! javax/print/attribute/standard/PrinterLocation.java, ! javax/print/attribute/standard/PrinterMakeAndModel.java, ! javax/print/attribute/standard/PrinterMessageFromOperator.java, ! javax/print/attribute/standard/PrinterName.java, ! javax/print/attribute/standard/RequestingUserName.java: New files. ! * Makefile.am (javax_source_files): Added new files. ! * Makefile.in: Regenerated. ! ! 2004-01-09 Michael Koch ! ! * javax/swing/AbstractAction.java, ! javax/swing/AbstractSet.java, ! javax/swing/Action.java, ! javax/swing/ActionMap.java, ! javax/swing/BoundedRangeModel.java, ! javax/swing/ButtonModel.java, ! javax/swing/CellEditor.java, ! javax/swing/CellRendererPane.java, ! javax/swing/ComboBoxEditor.java, ! javax/swing/DebugGraphics.java, ! javax/swing/DefaultCellEditor.java, ! javax/swing/DefaultCellRenderer.java, ! javax/swing/DefaultComboBoxModel.java, ! javax/swing/DefaultDesktopManager.java, ! javax/swing/DefaultFocusManager.java, ! javax/swing/DefaultListCellRenderer.java, ! javax/swing/Icon.java, ! javax/swing/JButton.java, ! javax/swing/JCheckBoxMenuItem.java, ! javax/swing/JDesktopPane.java, ! javax/swing/JEditorPane.java, ! javax/swing/JMenu.java, ! javax/swing/JPanel.java, ! javax/swing/JPasswordField.java, ! javax/swing/JPopupMenu.java, ! javax/swing/JProgressBar.java: Reworked imports. ! ! 2004-01-09 Michael Koch ! ! * java/awt/geom/PathIterator.java ! (WIND_EVEN_ODD): Removed redundant modifiers. ! (WIND_NON_ZERO): Likewise. ! (SEG_MOVETO): Likewise. ! (SEG_LINETO): Likewise. ! (SEG_QUADTO): Likewise. ! (SEG_CUBICTO): Likewise. ! (SEG_CLOSE): Likewise. ! * java/awt/image/SinglePixelPackedSampleModel.java: ! Removed redundant semicolon. ! * java/io/ObjectInputStream.java ! (inputGetObjectStreamClasses): Removed unused variable "ret_val". ! * java/util/logging/Filter.java ! (isLoggable): Removed redundant modifier. ! * java/util/logging/LogManager.java: ! Removed redundant semicolon. ! * java/util/logging/XMLFormatter.java ! (format): Removed unused variable "key". ! ! 2004-01-08 Fernando Nasser ! ! * gnu/java/awt/peer/gtk/GtkFileDialogPeer.java (nativeSetFile): ! New name for the former setFile native method. ! (setFile): New method. ! (setDirectory): Implemented. ! (connectSignals): New native method. ! (setFilenameFilter): Improve comment. ! (getGraphics): Comment. ! (gtkHideFileDialog): New method. ! (gtkDisposeFileDialog): New method. ! (gtkSetFilename): New method. ! * java/awt/Dialog.java (show): Block on modal dialogs, but only ! for FileDialog for now. ! (hide): New method. ! (dispose): New method. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c ! (Java_gnu_java_awt_peer_gtk_GtkFileDialog_create): Replace ! deprecated creation functions. Make dialog modal. Add it to the ! window group. ! (Java_gnu_java_awt_peer_gtk_GtkFileDialog_connectSignals): New ! function. ! (Java_gnu_java_awt_peer_gtk_GtkFileDialogPeer_gtkFileSelectionSetFilename): ! Rename to... ! (Java_gnu_java_awt_peer_gtk_GtkFileDialogPeer_nativeSetFile): New ! name. ! (window_closed): New function. ! (ok_clicked): New function. ! (cancel_clicked): New function. ! ! 2004-01-08 Michael Koch ! ! * javax/swing/JLayeredPane.java: Revert changes to standard ! boilerplate, reworked imports. ! ! 2004-01-07 Tom Tromey ! ! PR libgcj/13439: ! * verify.cc (state::merge): Copy changed locals out of subroutine ! in NO_STACK case. ! (state::FLAG_CHANGED): New const. ! (state::FLAG_UNUSED): Likewise. ! (state::local_changed): Removed. Updated all users. ! (state::flags): New field. ! (state::merge): Added jsr_semantics argument, more logic. ! (push_jump_merge): Added jsr_semantics argument. ! (handle_jsr_insn): Set jsr_semantics on push_jump_merge when ! merging through the jsr instruction. ! ! 2004-01-07 Tom Tromey ! ! * scripts/MakeDefaultMimeTypes.java: Use \n, not ! backslash-newline. ! ! 2004-01-07 Graydon Hoare ! ! * java/awt/Container.java (LightweightDispatcher): Implement. ! (visitChild): Reuse graphics object. ! (dispatchEventImpl): Optionally dispatch to lightweight. ! (addNotifyContainerChildren): Build LightweightDispatcher. ! ! 2004-01-07 David Jee ! ! * java/awt/Container.java ! (update): Clear only the clipped region, instead of clearing the ! entire Container. ! (visitChildren): Visit children in descending order. ! ! 2004-01-07 Michael Koch ! ! * java/lang/reflect/Array.java: Merged documentation with classpath. ! ! 2004-01-07 Michael Koch ! ! * java/text/CollationElementIterator.java ! (textIndex): Renamed from index. ! * java/text/CollationKey.java ! (collator): New member. ! (CollationKey): New argument for parent collator. ! (equals): Check for same collator, source string and key array. ! * java/text/RuleBasedCollator.java: ! Reformated. ! (RuleBasedCollator): Don't re-initialize frenchAccents with default ! value. ! (getCollationElementIterator): Rewritten. ! (getCollationKey): Added new argument to CollationKey constructor. ! ! 2004-01-07 Michael Koch ! ! * gnu/java/nio/DatagramChannelImpl.java ! (blocking): Removed. ! (DatagramChannelImpl): Call configureBlocking(). ! (implConfigureBlocking): Dont initialize blocking. ! * gnu/java/nio/ServerSocketChannelImpl.java ! (blocking): Removed. ! (ServerSocketChannelImpl): Call configureBlocking(). ! (implConfigureBlocking): Dont initialize blocking. ! * gnu/java/nio/SocketChannelImpl.java ! (blocking): Removed. ! (SocketChannelImpl): Call configureBlocking(). ! (implConfigureBlocking): Dont initialize blocking. ! (connect): Use isBlocking(). ! * java/nio/channels/spi/AbstractSelectableChannel.java ! (configureBlocking): Use blockingLock() instead of LOCK. ! Set blocking after successfully called implConfigureBlocking(). ! (register): Use blockingLock() instead of LOCK. ! ! 2004-01-07 Michael Koch ! ! * java/net/ServerSocket.java (isBound): Fixed documentation. ! ! 2004-01-07 Sascha Brawer ! ! * javax/swing/DefaultBoundedRangeModel.java: Documented API. ! (changeEvent): Create event object on demand. ! (DefaultBoundedRangeModel, toString, setValue, setExtent, ! setMinimum, setMaximum, setValueIsAdjusting, setRangeProperties, ! fireStateChanged): Re-written. ! * javax/swing/event/EventListenerList.java: Reformatted, document ! typical usage. ! (toString): Implemented. ! (getListeners): Re-written. ! (remove): Re-written. ! (add): Re-written. ! (NO_LISTENERS): New singleton field. ! (listenerList): Declare as transient; document. ! (serialVersionUID): Document. ! (getListenerCount(Class)): More efficient implementation, ! also accepts null argument. Improve Javadoc. ! (getListenerCount()): Remove unnecessary cast; docfix. ! * javax/swing/undo/UndoableEditSupport.java: ! Re-format, document. ! (UndoableEditSupport): Set realSource field. Improve documentation. ! (_postEdit): Iterate over cloned listener vector. ! (toString): Don't emit realSource. ! (beginUpdate, endUpdate): Support nested updates. ! (postEdit): Use compound edit if present. ! ! 2004-01-06 Graydon Hoare ! ! * java/awt/Container.java (swapComponents): Add forgotten ! function, required for JLayeredPane change. ! ! 2004-01-06 Michael Koch ! ! * java/text/CollationElementIterator.java: Reformated. ! (CollationElementIterator): Changed order of arguments. ! * java/text/RuleBasedCollator.java ! (RuleBasedCollator): Merged class documentation. ! (CollationElement): Added documentation. ! (compare): Reformated, renamed arguments. ! (equals): Likewise. ! (getCollationElementIterator): Likewise. ! (getCollationKey): Likewise. ! ! 2004-01-06 Graydon Hoare ! ! * javax/swing/JLayeredPane.java: Fix semantics, add javadocs. ! ! 2004-01-06 Michael Koch ! ! * gnu/java/net/protocol/file/Connection.java: ! Reformated copyright. ! (hdrHash): Removed. ! (hdrVec): Removed. ! (gotHeaders): Removed. ! (getHeaderField): Removed. ! (getHeaderField): Removed. ! (getHeaderFieldKey): Removed. ! (getKey): Removed. ! (getField): Removed. ! (getHeaders): Removed. ! ! 2004-01-06 Michael Koch ! ! * javax/print/attribute/standard/DateTimeAtCompleted.java, ! javax/print/attribute/standard/DateTimeAtCreation.java, ! javax/print/attribute/standard/DateTimeAtProcessing.java, ! javax/print/attribute/standard/JobImpressionsCompleted.java, ! javax/print/attribute/standard/JobKOctets.java, ! javax/print/attribute/standard/JobKOctetsProcessed.java, ! javax/print/attribute/standard/JobMediaSheetsCompleted.java, ! javax/print/attribute/standard/JobPrioritySupported.java: New files. ! * Makefile.am (javax_source_files): Added new files. ! * Makefile.in: Regenerated. ! ! 2004-01-06 Michael Koch ! ! * java/net/URLConnection.java ! (contentHandler): Removed. ! (locale): Removed. ! (getHeaderFields): Return an empty map instead of null. ! (getContent): Connect if needed, renamed "cType" to "type" and ! "contentHandler" to "ch" and made it a local variable. ! (getPermission): Don't use package in class name. ! (setDefaultRequestProperty): Fixed typo in documentation. ! (initializeDateFormats): Made locale a local variable. ! ! 2004-01-06 Michael Koch ! ! * java/lang/Package.java ! (getPackage): Get the current class loader directly. ! * java/lang/SecurityManager.java ! (currentLoadedClass): Dont iterate over class contexts. ! (classLoaderDepth): Don't check class loaders if everything is allowed. ! ! 2004-01-05 Thomas Fitzsimmons ! ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c ! (pre_event_handler): Set all insets to 0 when a Configure event ! is received for a GtkPlug. ! * gnu/java/awt/EmbeddedWindow.java (window_id): Rename handle. ! Make handle long, not int. ! (EmbeddedWindow()): New constructor. ! (EmbeddedWindow(int)): Rename window_id to handle. Make handle ! long, not int. ! (setHandle): New method. ! (getHandle): Return long, not int. ! * gnu/java/awt/peer/EmbeddedWindowPeer.java (embed): New method ! declaration. ! * gnu/java/awt/peer/gtk/GtkEmbeddedWindowPeer.java, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c: ! (create(long)): Take long parameter, not int. Cast gtk_plug_new ! argument to GdkNativeWindow. ! (construct): New method. ! (embed): New method. ! ! * gnu/java/awt/peer/gtk/GtkScrollPanePeer.java, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.c ! (create(int, int)): New method. ! (create): Call new create method. ! (gtkScrolledWindowNew, gtkScrolledWindowSetSize): Remove ! methods. ! (childResized): Remove native implementation. Implement in ! Java. ! (getHScrollbarHeight, getVScrollbarWidth): Call ! gtk_widget_size_request to get scrollbar dimensions. ! * java/awt/ScrollPane.java (getViewportSize): Reimplement. Only ! call getVScrollbarWidth and getHScrollbarHeight when vertical ! and horizontal scrollbars respectively are needed. ! (doLayout): Enlarge child if it is smaller than the viewport. ! ! 2004-01-05 Fernando Nasser ! ! * java/awt/Dialog.java (constructor): Accept null title as per spec. ! * java/awt/FileDialog.java (constructor): Throw exception on invalid ! argument as per spec. ! ! 2004-01-05 Fernando Nasser ! ! * java/awt/Choice.java (add): Leave posting of ItemEvents to peer. ! (insert): Ditto. ! (remove): Ditto. Also, Check for valid argument. ! (removeAll): Use peer interface method. ! * gnu/java/awt/peer/gtk/GtkChoicePeer.java (nativeAdd): New name for ! native add function. ! (nativeRemove): New name for native remove function. ! (getHistory): New native function. ! (constructor): Generate ItemEvent. ! (add): Ditto, if selection is changed. ! (remove): Ditto, ditto. ! (removeAll): Add implementation. ! (handleEvent): Remove. Dead code. ! (choicePostItemEvent): Add comment. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c ! (Java_gnu_java_awt_peer_gtk_GtkChoicePeer_append): Add comments. ! (Java_gnu_java_awt_peer_gtk_GtkChoicePeer_add): Rename to... ! (Java_gnu_java_awt_peer_gtk_GtkChoicePeer_nativeAdd): New name. Add ! comments and fix condition to change selection. ! (Java_gnu_java_awt_peer_gtk_GtkChoicePeer_remove): Rename to... ! (Java_gnu_java_awt_peer_gtk_GtkChoicePeer_nativeRemove): New name. Add ! remove all capability. ! (Java_gnu_java_awt_peer_gtk_GtkChoicePeer_getHistory): New function. ! (item_activate): Add cast to remove compiler warning. ! ! 2004-01-05 Thomas Fitzsimmons ! ! * gnu/java/awt/peer/gtk/GtkComponentPeer.java, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c ! (getPreferredSize): Call preferredSize. ! (preferredSize): Call gtkWidgetGetPreferredDimensions. ! (getMinimumSize): Call minimumSize. ! (minimumSize): Call gtkWidgetGetPreferredDimensions. ! (gtkWidgetGetDimensions): Return the peer widget's current size ! request. ! (gtkWidgetGetPreferredDimensions): Return the peer widget's ! natural size request. ! ! 2004-01-05 Sascha Brawer ! ! Thanks to Brian Gough ! * java/awt/geom/CubicCurve2D.java (solveCubic): Implemented. ! * java/awt/geom/QuadCurve2D.java (solveQuadratic): Re-written. ! ! 2004-01-04 Matthias Klose ! ! * aclocal.m4: Rebuilt using "aclocal -I .". ! * configure: Rebuilt. ! ! 2004-01-03 Per Bothner ! ! * java/util/Date.java (parse): Fix a number of problems. ! (skipParens): Remove no-longer-needed method. ! ! 2003-12-31 Michael Koch ! ! * gnu/java/net/protocol/http/Connection.java ! (sendRequest): Dont encode output in default character encoding, ! add correct version number to HTTP user agent string. ! ! 2003-12-31 Graydon Hoare ! ! * configure.in: Add --enable-gtk-cairo check. ! * configure: Regenerate. ! * Makefile.am: Conditionally link against cairo. ! * Makefile.in: Regenerate. ! * acinclude.m4: Include PKG_CHECK_MODULES. ! * aclocal.m4: Regenerate. ! * gnu/java/awt/peer/gtk/GtkToolkit.java (useGraphics2D): New method. ! (getFontMetrics, getClasspathFontPeer): ! * gnu/java/awt/peer/gtk/GtkCanvasPeer.java (getGraphics): ! * gnu/java/awt/peer/gtk/GtkComponentPeer.java (createImage): ! * gnu/java/awt/peer/gtk/GtkContainerPeer.java (getGraphics): ! * gnu/java/awt/peer/gtk/GtkFramePeer.java (getGraphics): ! Switch behavior depending on GtkToolkit.useGraphics2D(). ! * gnu/java/awt/peer/gtk/GtkFontPeer.java: Extend ClasspathFontPeer. ! * java/awt/Font.java: Switch to peer model. ! * jni/gtk-peer/gtkcairopeer.h: Definitions of cairo stuff. ! * jni/gtk-peer/gdkfont.h: Include gtkcairopeer.h. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c: Include gtkcairopeer.h. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeerMetrics.c: Un-include gtkpeer.h. ! ! 2003-12-31 Guilhem Lavaux ! ! * java/io/ObjectOutputStream.java ! (putFields): Reindented. Fixed behaviour: currentPutField should be ! null ! before calling this method. ! (writeFields): Likewise. ! (markFieldsWritten): Fixed the exception message. ! (callWriteMethod): Ensure currentPutField is null. ! (getBooleanField): Translate IllegalArgumentException into ! InvalidClassException. ! (getByteField): Likewise. ! (getCharField): Likewise. ! (getDoubleField): Likewise. ! (getFloatField): Likewise. ! (getIntField): Likewise. ! (getLongField): Likewise. ! (getShortField): Likewise. ! (getObjectField): Check the type code before returning the object. ! (getField): Translate NoSuchFieldException into InvalidClassException ! directly. ! ! 2003-12-31 Guilhem Lavaux ! ! * java/net/URL.java ! (URL): Change context path to "/" if it is empty. ! ! 2003-12-31 Michael Koch ! ! * testsuite/libjava.mauve/xfails: Removed tests that pass now: ! XPASS: gnu.testlet.java.net.URL.URLTest: new URL(string) (number 16) ! XPASS: gnu.testlet.java.net.URL.URLTest: new URL(string) (number 18) ! XPASS: gnu.testlet.java.net.URL.URLTest: new URL(protocol, host, file) ! (number 26) ! XPASS: gnu.testlet.java.net.URL.URLTest: new URL(protocol, host, file) ! (number 54) ! ! ! 2003-12-30 Guilhem Lavaux ! ! * java/util/GregorianCalendar.java ! (computeFields): Reported by Ito Kazumitsu . ! Fixed the computation of DAY_OF_WEEK_IN_MONTH. ! (computeTime): 12:00 midnight is AM and 12:00 noon is PM. ! ! 2003-12-30 Michael Koch ! ! * testsuite/libjava.mauve/xfails: Removed the following testcase ! because it passes now: ! FAIL: gnu.testlet.java.text.SimpleDateFormat.Test: parse() strict ! (number 1) ! ! 2003-12-30 Michael Koch ! ! * java/io/ObjectInputStream.java, ! java/io/ObjectOutputStream.java, ! java/io/ObjectStreamClass.java: ! Reformated, no functional code changes. ! ! 2003-12-30 Michael Koch ! ! * gnu/java/net/protocol/http/Connection.java ! (outputStream): New field. ! (bufferedOutputStream): New field. ! (connect): Initialize outputStream and bufferedOutputStream. ! (sendRequest): Create PrintWriter object from outputStream, ! support HTTP 1.1, send missing HTTP headers and buffered output data ! for POST method. ! (getOutputStream): Set request method to POST if output stream is ! used, return bufferedOutputStream. ! (setRequestMethod): Allow HEAD and POST methods. ! This fixes libgcj PR/6302 and libgcj PR/7752. ! ! 2003-12-30 Guilhem Lavaux ! ! * java/io/LineNumberReader.java ! (countLines): Removed. ! (fill): New private method. ! (mark): Changed logic to use and matchedNewLine. ! (reset): Likewise. ! (read): Likewise. ! (skipRedundantLF): Likewise. ! ! 2003-12-30 Michael Koch ! ! * gnu/java/net/protocol/http/Connection.java ! (requestProperties): New field. ! (addRequestProperty): New method. ! (getRequestProperty): New method. ! (setRequestProperty): New method. ! (getRequestProperties): New method. ! ! 2003-12-28 Michael Koch ! ! * gnu/java/net/protocol/http/Connection.java ! (inputStream): Made it a DataInputStream. ! (requestProperties): Removed. ! (hdrHash): Removed. ! (hdrVec): Removed. ! (headers): New field to store headers. ! (connect): Initialize inputStream. ! (receiveReply): Merged from classpath. The new algorithm is line based ! instead of character based. ! (getHeaderField): Use headers. ! (getHeaderFields): Use headers. ! (getKey): Removed. ! (getField): Removed. ! * gnu/java/net/HeaderFieldHelper.java: New file. ! * Makefile.am (ordinary_java_source_files): ! Added gnu/java/net/HeaderFieldHelper.java. ! * Makefile.in: Regenerated. ! ! 2003-12-28 Guilhem Lavaux ! ! * java/io/LineNumberReader.java ! (mark): Improved error checking. ! (read): Likewise. ! (skip): Likewise. Skip is now really eating the specified number of ! characters. ! * java/io/CharArrayReader.java (read): It should throw ! IndexOutOfBoundsException and not ArrayIndexOutOfBoundsException (see ! mauve). ! * java/io/BufferedReader.java (readLine): Make readLine() really block ! until either EOF is reached or a true error happens. ! ! 2003-12-27 Michael Koch ! ! * gnu/java/net/protocol/http/Connection.java ! (getRequestProperty): Removed. ! (setRequestProperty): Removed. ! ! 2003-12-27 Michael Koch ! ! * gnu/java/net/protocol/http/Connection.java ! (connect): Call receiveReply(). ! (receiveReply): Renamed from getHttpHeaders(). ! (getOutputStream): Moved check on doOutput before check for connection ! state. ! ! 2003-12-27 Michael Koch ! ! * javax/print/attribute/ResolutionSyntax.java, ! javax/print/attribute/SetOfIntegerSyntax.java, ! javax/print/attribute/Size2DSyntax.java, ! javax/print/attribute/standard/Copies.java, ! javax/print/attribute/standard/JobImpressions.java, ! javax/print/attribute/standard/JobMediaSheets.java, ! javax/print/attribute/standard/NumberOfDocuments.java, ! javax/print/attribute/standard/NumberOfInterveningJobs.java, ! javax/print/attribute/standard/PagesPerMinute.java, ! javax/print/attribute/standard/PagesPerMinuteColor.java, ! javax/print/attribute/standard/QueuedJobCount.java: ! Fixed typo (s/then/than/). ! ! 2003-12-27 Guilhem Lavaux ! ! * java/rmi/Naming.java (lookup): Check if the first character of the ! filename returned by URL.getFile() is a '/', only if it is the case ! we cut this first character and call the registry with the good name. ! (bind): Likewise. ! (rebind): Likewise. ! ! 2003-12-26 Guilhem Lavaux ! Mark Wielaard ! ! * java/io/BufferedReader.java (BufferedReader): ! Throw IllegalArgumentException when size <= 0. ! (mark): Document and better exception message for negative ! readLimit IllegalArgumentException. ! (read(char[],int,int)): Throw IndexOutOfBoundsException ! if offset and count are not valid regarding buf. ! (skip): Throw IllegalArgumentException when count is negative. ! ! 2003-12-26 Guilhem Lavaux ! ! * java/io/FileInputStream.java ! (FileInputStream(String)): Call FileInputStream(File). ! (FileInputStream(File)): Check whether the argument is a directory. ! ! 2003-12-26 Michael Koch ! ! * Makefile.am (rmi_java_source_files): ! Added gnu/java/rmi/server/RMIVoidValue.java. ! * Makefile.in: Regenerated. ! ! 2003-12-26 Guilhem Lavaux ! Mark Wielaard ! ! * gnu/java/rmi/server/UnicastConnectionManager.java ! (startScavenger): Set the client connection manager to daemon ! state because it may block clients until TIMEOUT is reached ! when they are exiting. ! ! * gnu/java/rmi/RMIVoidValue.java: New file for a class representing ! a void return. ! ! * gnu/java/rmi/server/UnicastRemoteCall.java ! (DummyOutputStream): Add a boolean before each written field to ! know whether it is a primitive. ! (releaseOutputStream): Flush parameters at write time. ! ! * gnu/java/rmi/server/UnicastServerRef.java ! (incomingMessageCall): Return a RMIVoidValue if no value is to be ! returned. ! ! * gnu/java/rmi/server/UnicastServer.java ! (incomingMessageCall): Do not write a returned object if it is ! a RMIVoidValue. ! ! 2003-12-25 Andreas Tobler ! ! * libltdl/ltdl.c (HAVE_DYLD): Remove ifdef conditional for ! darwin. Fixed by fixinclude now. ! ! 2003-12-25 Michael Koch ! ! * java/net/ServerSocket.java bind(): ! If InetSocketAddress.getAddress() returns "null" use "0.0.0.0" as ! address to bind to. ! ! 2003-12-23 Guilhem Lavaux ! ! * java/io/ObjectInputStream.java ! (getField): Handle transient and non persistent fields. ! (readClassDescriptor): Better error handling, use the right ! class loader. ! (readFields): Fields marked as not present in the stream ! or not to be set are not read and set. ! * java/io/ObjectInputStream.java ! (readFields): Changed implementation of GetField. ! (readClassDescriptor): Documented. ! * java/io/ObjectOutputStream.java ! (writeClassDescriptor): Added condition when to write class super ! class information. ! ! 2003-12-22 Fernando Nasser ! ! * gnu/java/awt/peer/gtk/GtkChoicePeer.java (postItemEvent): Rename to... ! (choicePostItemEvent): Change signature to more specific String object. ! * java/awt/Choice.java (add): Generate ItemEvent for the first item ! added. ! (insert): Generate ItemEvent if insertion caused ! selection to change. ! (remove): Generate ItemEvent if removal cause selection to change. ! (removeAll): Change algorithm to prevent generation of ItemEvents. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c ! (connect_choice_item_selectable_hook): Change argument type. ! Fix argument value. ! Make sure resources are feed by registering callback. ! (Java_gnu_java_awt_peer_gtk_GtkChoicePeer_append): Adjust call to the ! above function. ! (Java_gnu_java_awt_peer_gtk_GtkChoicePeer_add): Ditto. ! (item_activate): Ditto. ! (Java_gnu_java_awt_peer_gtk_GtkChoicePeer_remove): Destroy removed ! menuitem. ! (item_removed): New function. Free resources. ! * jni/gtk-peer/gtkpeer.h (item_event_hook_info): Change member type and ! name. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c ! (Java_gnu_java_awt_peer_gtk_GtkMainThread_gtkInit): Obtain MethodID for ! choicePostItemEvent. ! ! 2003-12-23 Michael Koch ! ! * javax/print/attribute/standard/Copies.java, ! javax/print/attribute/standard/JobImpressions.java, ! javax/print/attribute/standard/JobMediaSheets.java, ! javax/print/attribute/standard/JobPriority.java, ! javax/print/attribute/standard/NumberOfDocuments.java, ! javax/print/attribute/standard/NumberOfInterveningJobs.java, ! javax/print/attribute/standard/NumberUp.java, ! javax/print/attribute/standard/PagesPerMinuteColor.java, ! javax/print/attribute/standard/PagesPerMinute.java, ! javax/print/attribute/standard/QueuedJobCount.java: New files. ! * Makefile.am (ordinary_java_source_files): Added new files. ! * Makefile.in: Regenerated. ! ! 2003-12-23 Michael Koch ! ! * javax/print/attribute/AttributeSetUtilities.java ! (verifyCategoryForValue): Renamed from verifyCategoryForAttribute. ! * javax/print/attribute/HashAttributeSet.java ! (HashAttributeSet): Call internal add methods, added missing ! exceptions. ! (add): Call addInternal, added exceptions to documentation. ! (addInternal): New method. ! (addAll): Call addAllInternal, added exception to documentation. ! (addAllInternal): New method. ! (clear): Added exception to documentation. ! (remove): Likewise. ! * javax/print/attribute/URISyntax.java ! (serialVersionUID): Fixed value. ! ! 2003-12-22 Thomas Fitzsimmons ! ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c ! (pre_event_handler): Don't dereference NULL focus_obj_ptr. ! ! 2003-12-21 Michael Koch ! ! * javax/print/attribute/AttributeSetUtilities.java, ! javax/print/attribute/HashAttributeSet.java, ! javax/print/attribute/HashDocAttributeSet.java, ! javax/print/attribute/HashPrintJobAttributeSet.java, ! javax/print/attribute/HashPrintRequestAttributeSet.java, ! javax/print/attribute/HashPrintServiceAttributeSet.java: New files. ! * Makefile.am (ordinary_java_source_files): Added new files. ! * Makefile.in: Regenerated. ! ! 2003-12-21 Michael Koch ! ! * javax/print/attribute/EnumSyntax.java, ! javax/print/attribute/SetOfIntegerSyntax.java: New files. ! * Makefile.am (ordinary_java_source_files): ! Added javax/print/attribute/EnumSyntax.java ! and javax/print/attribute/SetOfIntegerSyntax.java. ! * Makefile.in: Regenerated. ! ! 2003-12-21 Michael Koch ! ! * javax/print/attribute/PrintJobAttribute.java, ! javax/print/attribute/PrintJobAttributeSet.java, ! javax/print/attribute/PrintRequestAttribute.java, ! javax/print/attribute/PrintServiceAttribute.java, ! javax/print/attribute/PrintServiceAttributeSet.java, ! javax/print/attribute/SupportedValuesAttribute.java: New files. ! * Makefile.am (ordinary_java_source_files): Added new files. ! * Makefile.in: Regenerated. ! ! 2003-12-21 Michael Koch ! ! * javax/print/attribute/DateTimeSyntax.java, ! javax/print/attribute/DocAttribute.java, ! javax/print/attribute/DocAttributeSet.java, ! javax/print/attribute/IntegerSyntax.java, ! javax/print/attribute/ResolutionSyntax.java, ! javax/print/attribute/Size2DSyntax.java, ! javax/print/attribute/TextSyntax.java, ! javax/print/attribute/URISyntax.java, ! javax/print/attribute/UnmodifiableSetException.java: New files. ! * Makefile.am (ordinary_java_source_files): Added new files. ! * Makefile.in: Regenerated. ! ! 2003-12-21 Michael Koch ! ! * gnu/java/net/PlainDatagramSocketImpl.java ! (mcastGrp): Added documentation. ! ! 2003-12-20 Michael Koch ! ! * gnu/java/net/protocol/jar/Connection.java ! (connectionCache): New field. ! (connect): New method. ! (getInputStream): New method. ! (hdrHash): New field. ! (hdrVec): New field. ! (gotHeaders): New field. ! (getHeaderField): New method. ! (getHeaderFields): New method. ! (getHeaderFieldKey): New method. ! (getKey): New method. ! (getField): New method. ! (getHeaders): New method. ! * java/net/JarURLConnection.java ! (connectionCache): Removed. ! (connect): Removed. ! (getInputStream): Removed. ! (hdrHash): Removed. ! (hdrVec): Removed. ! (gotHeaders): Removed. ! (getHeaderField): Removed. ! (getHeaderFields): Removed. ! (getHeaderFieldKey): Removed. ! (getKey): Removed. ! (getField): Removed. ! (getHeaders): Removed. ! ! 2003-12-20 Michael Koch ! ! * java/io/ObjectStreamField.java (isUnshared): Added documentation. ! ! 2003-12-20 Mohan Embar ! ! * gnu/java/nio/SelectorImpl.java ! (selectThreadMutex): New field. ! (selectThread): New field. ! (unhandledWakeup): New field. ! (implCloseSelector): Added skeleton code which ! synchronizes as per Sun JRE JavaDoc. ! (keys): Throw ClosedSelectorException if selector ! is closed. ! (selectNow): Added comment that we're faking out ! an immediate select with a one-microsecond-timeout one. ! (select): Use 0 instead of -1 for infinite timeout. ! (implSelect): Changed comment in declaration. ! (select): Added synchronized to method declaration. ! Added synchronization and wakeup support as per Sun ! JRE JavaDoc. ! (selectedKeys): Throw ClosedSelectorException if selector ! is closed. ! (wakeup): Implemented. ! (deregisterCancelledKeys): Synchronize on cancelled key ! set before deregistering. ! (register): Synchronize on key set before registering. ! * java/nio/channels/spi/AbstractSelector.java ! Added import for java.nio.channels.ClosedSelectorException. ! (close): Added synchronized to method declaration. ! (cancelledKeys): Throw ClosedSelectorException if selector ! is closed. ! (cancelKey): Synchronize on cancelled key set before key. ! ! 2003-12-20 Michael Koch ! ! * Makefile.am (ordinary_java_source_files): ! Added gnu.java.net.URLParseError.java. ! * Makefile.in: Regenerated. ! ! 2003-12-20 Guilhem Lavaux ! ! * gnu/java/net/URLParseError.java: New file. ! * gnu/java/net/protocol/jar/Handler.java ! (parseURL): Throw URLParseError if needed, fix '/' handling. ! * java/net/URL.java (URL): Catch URLParseError and ! transform it into a MalformedURLException. ! ! 2003-12-19 Michael Koch ! ! * gnu/java/nio/ChannelOutputStream.java: New file. ! * java/nio/channels/Channels.java ! (newOutputStream): Implemented. ! * Makefile.am (ordinary_java_source_files) ! Added gnu/java/nio/ChannelOutputStream.java. ! * Makefile.in: Regenerated. ! ! 2003-12-19 Thomas Fitzsimmons ! ! * java/awt/FlowLayout.java (layoutContainer): Let components ! assume their preferred height. Centre components vertically. ! ! 2003-12-19 Michael Koch ! ! * gnu/java/nio/ChannelInputStream.java: New file. ! * java/nio/channels/Channels.java (newInputStream): Implemented. ! * java/nio/channels/FileChannelImpl.java ! (readImpl): Only put data into buffer if something was read. ! * Makefile.am (ordinary_java_source_files): ! Added gnu/java/nio/ChannelInputStream.java. ! * Makefile.in: Regenerated. ! ! 2003-12-19 Michael Koch ! ! * gnu/java/nio/OutputStreamChannel.java: New file. ! * java/nio/channels/Channels.java (newChannel): Implemented. ! * Makefile.am (ordinary_java_source_files): ! Added gnu/java/nio/OutputStreamChannel.java. ! * Makefile.in: Regenerated. ! ! 2003-12-19 Michael Koch ! ! * Makefile.am (ordinary_java_source_files): ! Added gnu.java.nio.InputStreamChannel. ! * Makefile.in: Regenerated. ! ! 2003-12-19 Michael Koch ! ! * gnu/java/nio/InputStreamChannel.java: New file. ! * java/nio/channels/Channels.java (newChannel): Implemented. ! ! 2003-12-19 Michael Koch ! ! * java/util/SimpleTimeZone.java ! (setStartRule): Reformated documentation. ! (setEndRule): Reworked documentation. ! (getDSTSavings): Fixed @since tag. ! (setDSTSavings): New method. ! ! 2003-12-19 Michael Koch ! ! * java/text/NumberFormat.java: Sorted imports. ! (getCurrency): New method. ! (setCurrency): New method. ! ! ! 2003-12-19 Michael Koch ! ! * java/text/MessageFormat.java ! (MessageFormat): New constructor. ! ! 2003-12-19 Michael Koch ! ! * gnu/java/net/protocol/jar/Handler.java ! (parseURL): New method. ! (toExternalForm): New method. ! ! 2003-12-18 Fernando Nasser ! ! * java/awt/List.java (replaceItem): Prevent selection to move with ! replace and minimize flickering. ! ! 2003-12-18 Michael Koch ! ! * libltdl/ltdl.c: Define __private_extern__ if needed. ! ! 2003-12-18 Michael Koch ! ! * libltdl/.cvsignore: Ignore autom4te.cache ! * libltdl/Makefile.in: Regenerated. ! * libltdl/aclocal.m4: Regenerated. ! * libltdl/acconfig.h: Removed (obsolete). ! * libltdl/config-h.in: Regenerated. ! * libltdl/configure.ac: Added AM_MAINTAINER_MODE. ! * libltdl/configure: Regenerated. ! ! 2003-12-18 Michael Koch ! ! * mauve-libgcj: Removed the disabling of java.text.ACIAttribute and ! java.text.CollationElementIterator tests as they compile again. ! * testsuite/libjava.mauve/xfails: Added failing ! java.text.CollationElementIterator tests. ! ! 2003-12-18 Michael Koch ! ! * java/util/prefs/AbstractPreferences.java ! (cachedChildren): New method. ! ! 2003-12-18 Michael Koch ! ! * java/util/TimeZone.java (getOffset): New method. ! ! 2003-12-17 Fernando Nasser ! ! * gnu/java/awt/peer/gtk/GtkListPeer.java (handleEvent): Fix generation ! of ActionEvents for mouse double-clicks. ! ! 2003-12-17 Fernando Nasser ! ! * gnu/java/awt/peer/gtk/GtkContainerPeer.java (handleEvent): Check for ! null Graphics pointer returned by FileDialogPeer. ! ! 2003-12-17 Michael Koch ! ! * libltdl/stamp-h.in: Removed, not used anymore. ! ! 2003-12-16 Mohan Embar ! ! * gnu/java/net/natPlainDatagramSocketImplWin32.cc: ! Removed unused InterruptedIOException.h include. ! * gnu/java/net/natPlainSocketImplWin32.cc ! (connect): Reset and ignore our thread's interrupted ! flag instead of testing and throwing an InterruptedIOException ! if set. ! (accept): Likewise + changed case of SocketTimeoutException ! text. ! (write): Likewise (for both overloads). ! (doRead): Likewise. ! ! 2003-12-16 Mohan Embar ! ! * win32.cc (WSAEventWrapper): Implemented default ! constructor and init() methods. ! (_Jv_select): Removed. ! * gnu/java/nio/natSelectorImplWin32.cc ! (helper_put_filedescriptors): Removed. ! (helper_get_filedescriptors): Removed. ! (implSelect): Implemented in terms of WSAEventWrapper ! and WSAWaitForMultipleEvents instead of _Jv_select(). ! Added support for thread interruption. ! * include/win32.h (WSAEventWrapper): Minor formatting ! changes; added default constructor declaration, init(), ! getFD() and getEventHandle() methods. ! (_Jv_select): Removed. ! ! 2003-12-16 Mohan Embar ! ! * gnu/java/net/natPlainDatagramSocketImplPosix.cc ! (peekData): Throw SocketTimeoutException instead of ! InterruptedIOException on timeout. ! (receive): Likewise. ! * gnu/java/net/natPlainSocketImplPosix.cc ! (read): Made a minor exception text case change. ! ! 2003-12-16 Michael Koch ! ! Fix for PR libgcj/13056. ! * libltdl/configure.in, ! libltdl/config.h.in: Removed. ! * libltdl/configure.ac, ! libltdl/config-h.in, ! libltdl/install-sh, ! libltdl/config.guess, ! libltdl/config.sub, ! libltdl/missing, ! libltdl/mkinstalldirs, ! libltdl/ltmain.sh: New files. ! * libltdl/Makefile.am, ! libltdl/acinclude.m4, ! libltdl/aclocal.m4, ! libltdl/ltdl.c, ! libltdl/ltdl.h, ! libltdl/README: Update to versions from libtool 1.5. ! libltdl/configure, ! * libltdl/Makefile.in: Regenerated. ! * java/lang/natRuntime.cc (find_symbol): ! Use type 'lt_ptr' instead of 'lt_ptr_t'. ! ! 2003-12-16 Michael Koch ! ! * java/awt/MenuComponent.java ! (serialVersionUID): Fixed value. ! ! 2003-12-16 Fernando Nasser ! ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c ! (pre_event_handler): Handle GtkButton widgets differently as events ! go to its event_window. ! (connect_awt_hook): Remove compiler warning. ! ! i2003-12-16 Guilhem Lavaux ! ! * java/io/ObjectInputStream.java ! (lookupClass): New method. ! (currentLoader): New method. ! (inputGetObjectStreamClasses): New method. ! (assignNewHandle): Documented. ! (currentClassLoader): Documented. ! * java/io/ObjectStreamClass.java ! (setClass): Changed API. Better handling of the imported/exported ! fields. ! (getSerialPersistentFields): Make it throw previously caught exceptions ! so they can handled in setClass. ! ! 2003-12-16 Guilhem Lavaux ! ! * java/io/ObjectStreamField.java: A few methods were added in prevision ! of the upcoming upgrade of the serialization code. This also adds ! some missing documentation. ! (ObjectStreamField): We should throw a NullPointerException when 'name' ! is null. ! ! 2003-12-16 Guilhem Lavaux ! ! * java/io/ObjectInputStream.java (setBooleanField): ! Throw an InvalidClassException if the field hasn't the required type, ! documentation added. ! (setByteField) Likewise. ! (setCharField) Likewise. ! (setDoubleField) Likewise. ! (setFloatField) Likewise. ! (setIntField) Likewise. ! (setShortField) Likewise. ! (setLongField) Likewise. ! (setObjectField) Likewise. ! ! 2003-12-16 Guilhem Lavaux ! Helmer Kraemer ! ! * gnu/java/lang/reflect/TypeSignature.java (getClassForEncoding): ! Splitted the method so we can specify an explicit boot loader. ! ! 2003-12-15 Graydon Hoare ! ! * jni/gtk-peer/gdkfont.h: New file. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c: Remove ! include of cairo-xlib.h, add extra gdk_flush(). ! ! 2003-12-12 Fernando Nasser ! ! * jni/gtk-peer/gtkpeer.h: Extend NSA set of macros to handle a second ! native state table -- native_global_ref_table. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c: Define ! native_global_ref_table pointer. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c ! (Java_gnu_java_awt_peer_gtk_GtkGenericPeer_dispose): Make sure JNI ! global reference is deleted and memory allocated for pointer freed. ! (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals): Use saved ! JNI global reference instead of JNI local reference. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c ! (pre_event_handler): Remove compilation warning. ! (connect_awt_hook): Use saved JNI global reference instead of creating ! a new one. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c ! (Java_gnu_java_awt_peer_gtk_GtkButtonPeer_create): Save JNI global ! reference to the Java object. ! (Java_gnu_java_awt_peer_gtk_GtkButtonPeer_connectSignals): Remove ! unused variable declaration and add comment. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCanvasPeer.c ! (Java_gnu_java_awt_peer_gtk_GtkCanvasPeer_create): Save JNI global ! reference to the Java object. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer.c ! (Java_gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer_create): Ditto. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c ! (Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_nativeCreate): Ditto. ! (Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_connectSignals): Use saved ! JNI global reference instead of JNI local reference. ! (item_toggled): Add debug statement. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c ! (Java_gnu_java_awt_peer_gtk_GtkChoicePeer_create): Save JNI global ! reference to the Java object. ! (connect_choice_item_selectable_hook): Use saved JNI global references ! instead of JNI local reference. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c ! (Java_gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer_create): Save JNI ! global reference to the Java object. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c ! (Java_gnu_java_awt_peer_gtk_GtkFileDialogPeer_create): Save JNI global ! reference to the Java object. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c ! (Java_gnu_java_awt_peer_gtk_GtkLabelPeer_create): Ditto. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuBarPeer.c ! (Java_gnu_java_awt_peer_gtk_GtkMenuBarPeer_create): Ditto. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c ! (Java_gnu_java_awt_peer_gtk_GtkMenuPeer_create): Ditto. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.c ! (Java_gnu_java_awt_peer_gtk_GtkScrollPanePeer_create): Ditto. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c ! (Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_create): Ditto. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c ! (Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_create): Ditto. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c ! (Java_gnu_java_awt_peer_gtk_GtkListPeer_create): Ditto. ! (Java_gnu_java_awt_peer_gtk_GtkListPeer_connectSignals): Use saved ! JNI global reference instead of JNI local reference. ! (item_selected): Add debug statement. ! (item_unselected): Add debug statement. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.c ! (Java_gnu_java_awt_peer_gtk_GtkMenuItemPeer_create): Save JNI global ! reference to the Java object. ! Connect "activate" signal handler using global JNI reference. ! (connect_activate_hook): Removed in favor of inline code. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPanelPeer.c ! (Java_gnu_java_awt_peer_gtk_GtkPanelPeer_create): Save JNI global ! reference to the Java object. ! (Java_gnu_java_awt_peer_gtk_GtkPanelPeer_connectSignals): Use saved ! JNI global reference instead of JNI local reference. Add FIXME comment. ! (Java_gnu_java_awt_peer_gtk_GtkPanelPeer_gtkPanelNew): Save JNI global ! reference to the Java object. Add FIXME comment. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c ! (Java_gnu_java_awt_peer_gtk_GtkScrollbarPeer_create): Save JNI global ! reference to the Java object. ! (Java_gnu_java_awt_peer_gtk_GtkScrollbarPeer_connectSignals): Use saved ! JNI global reference instead of JNI local reference. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c ! (Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_connectSignals): Use ! saved JNI global reference instead of JNI local reference. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c ! (Java_gnu_java_awt_peer_gtk_GtkWindowPeer_create): Save JNI global ! reference to the Java object. ! (Java_gnu_java_awt_peer_gtk_GtkWindowPeer_connectSignals): Use saved ! JNI global reference instead of JNI local reference. ! ! 2003-12-11 Michael Koch ! ! * java/text/Format.java (serialVersionUID): Fixed value. ! ! 2003-12-11 Michael Koch ! ! * javax/naming/event/EventDirContext.java: Jalopied. ! (addNamingListener): Fixed typo in method name. ! ! ! 2003-12-11 Mohan Embar ! ! * gnu/java/nio/SocketChannelImpl.java ! (write): Removed diagnostic trace. ! * gnu/java/nio/natSelectorImplPosix.cc: Added ! includes for java.lang.Thread and java.io.InterruptedIOException. ! (helper_put_filedescriptors): Don't put invalid file descriptors ! in select set. ! (helper_get_filedescriptors): Clear invalid file descriptors ! from select set. ! (helper_reset): New method for clearing our file descriptor ! array. ! (implSelect): Correctly calculate timeout if specified and ! legal. ! Intercept and deal with any java.io.InterruptedIOException ! thrown by _Jv_select(). ! ! 2003-12-08 Fernando Nasser ! ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c (awt_event_handler): ! Most coded moved to pre_event_handler, with the modifications ! mentioned below. ! (pre_event_handler): New function. Called on the Gtk "event" signal. ! Do not retrieve the jobject from the window property as it is already ! available as user data in the signal. ! Do not try and find the grab widget as it is already done by Gtk at ! this point. ! Do not search for Window ancestor as Gtk already sends the signal to it. ! Do not meddle with the activation state of peer widgets on each ! key press or release. ! Add CList to the special handling when looking for the focused widget. ! * jni/gtk-peer/gtkpeer.h: Add declaration for pre_event_handler. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c (connectJObject): ! New function. ! (connectSignals): New function. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c (connectHooks): ! Rename to... ! (connectSignals): New name. Get rid of NewGlobalRef call. ! Use g_signal_connect instead of deprecated gtk_signal_connect. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c ! (connect_choice_item_selectable_hook): Use g_signal_connect instead of ! deprecated gtk_signal_connect. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.c ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c ! (Java_gnu_java_awt_peer_gtk_GtkClipboard_initNativeState): Ditto. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c ! (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectHooks): Remove ! function. ! (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectJObject): New ! function. ! (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals): New ! function. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c ! (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectHooks): Remove ! function. ! (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectJObject): New ! function. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c ! (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectHooks): Remove ! function. ! (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectJObject): New ! function. ! (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals): New ! function. ! (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_old_create): Remove dead ! code. ! (item_select): Remove indirection. ! (item_unselect): Ditto. ! (connect_selectable_hook): Folded into connectSignals. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPanelPeer.c ! (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectHooks): Remove ! function. ! (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectJObject): New ! function. ! (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals): New ! function. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c: Ditto. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c ! (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectHooks): Remove ! function. ! (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals): New ! function. ! * gnu/java/awt/peer/gtk/GtkComponentPeer.java: Declare and call ! connectJObject and connectSignals instead of connectHooks. ! * gnu/java/awt/peer/gtk/GtkButtonPeer.java: Declare connectJObject and ! connectSignals. ! * gnu/java/awt/peer/gtk/GtkCheckboxPeer.java: Declare connectSignals ! and not connectHooks. ! * gnu/java/awt/peer/gtk/GtkTextComponentPeer.java: Ditto. ! * gnu/java/awt/peer/gtk/GtkFileDialogPeer.java: Declare connectJObject ! and not connectHooks. ! * gnu/java/awt/peer/gtk/GtkListPeer.java: Declare connectJObject and ! connectSignals instead of connectHooks. ! * gnu/java/awt/peer/gtk/GtkPanelPeer.java: Ditto. ! * gnu/java/awt/peer/gtk/GtkScrollbarPeer.java: Ditto. ! * gnu/java/awt/peer/gtk/GtkWindowPeer.java: Ditto. ! ! 2003-12-09 Michael Koch ! ! * Makefile.am (nat_headers_install): New variable with header files to ! install automatically. ! (install-data-local): Install all headers listed in ! nat_headers_install. Install innert nat headers explicitely. ! * Makefile.in: Regenerated. ! ! 2003-12-09 Michael Koch ! ! * java/util/Calendar.java, ! java/util/IdentityHashMap.java, ! java/util/prefs/Preferences.java: ! Import used classes explicitely. ! ! 2003-12-09 Michael Koch ! ! * java/net/DatagramSocket.java ! (close): Directly return if socket is closed. ! * java/net/ServerSocket.java ! (close): Directly return if socket is closed. ! * java/net/Socket.java ! (close): Directly return if socket is closed. ! ! 2003-12-09 Michael Koch ! ! * gnu/java/nio/SelectorImpl.java ! (implSelect): Throws IOException. ! (select): Likewise. ! ! 2003-12-08 Kim Ho ! ! Fix for Checkbox states. ! * gnu/java/awt/peer/gtk/GtkCheckboxPeer.java: ! (currentState): New field. ! (nativeCreate): Add initial state parameter. ! (create): Changed to reflect new parameter. ! (setState): Fire only on changed states. ! (postItemEvent): Fire only on changed states. Also change the ! Java Checkbox to reflect new state. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c: ! (nativeCreate): Add parameter and set active state. ! ! 2003-12-08 Fernando Nasser ! ! * java/awt/datatransfer/StringSelection.java (getTransferData): Return ! object of type expected by specified DataFlavor. ! ! 2003-12-08 Fernando Nasser ! ! * java/awt/datatransfer/DataFlavor.java (getParameter): Fix off-by-one ! error which was clipping off the first character of a parameter value. ! ! 2003-12-08 Olga Rodimina ! ! * java/awt/Polygon.java ! (translate): Fixed error that caused polygon ! to move right/left when up/down translation was required. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c: ! (getSelectionStart): Initialized start position to 0. ! (getSelectionEnd): Initialized end position to 0. ! (getCaretPosition): Initialized caret position to 0. ! (getText): Initialized selected text to NULL ! ! 2003-12-08 Michael Koch ! ! Fix for PR libgcj/13176. ! * java/io/PrintStream.java: Partly revert my previous patches to get ! (line_separator): New field. ! (converter): New field. ! (work): New field. ! (work_bytes): New field. ! (pw): Removed. ! (closed): Removed. ! (PrintStrean): Initialize converter and not pw. ! (checkError): Flush always, pw doesn't exist anymore. ! (close): Close underlying out stream. ! (print): New method. ! (writeChars): New method. ! (print): Use new internal print method. ! (println): Likewise. ! ! 2002-12-08 Bryce McKinlay ! ! * java/util/Hashtable.java (Hashtable(Map)): Use putAll, not ! putAllInternal. ! (putAllInternal): Correct comment. ! * java/util/HashMap.java (HashMap(Map)): As above. ! (putAllInternal): As above. ! ! 2002-12-08 Bryce McKinlay ! ! * java/util/Hashtable.java (internalContainsValue): Removed. ! (containsValue): Don't delegate to internalContainsValue. ! ! 2003-12-06 Michael Koch ! ! * javax/naming/directory/Attribute.java, ! javax/naming/directory/Attributes.java, ! javax/naming/directory/DirContext.java, ! javax/naming/directory/InitialDirContext.java, ! javax/naming/directory/SearchResult.java, ! javax/naming/event/EventContext.java, ! javax/naming/event/NamingEvent.java, ! javax/naming/event/NamingExceptionEvent.java, ! javax/naming/ldap/ControlFactory.java, ! javax/naming/ldap/ExtendedRequest.java, ! javax/naming/ldap/HasControls.java, ! javax/naming/ldap/InitialLdapContext.java, ! javax/naming/ldap/LdapContext.java, ! javax/naming/ldap/LdapReferralException.java, ! javax/naming/ldap/UnsolicitedNotification.java, ! javax/naming/ldap/UnsolicitedNotificationListener.java, ! javax/naming/spi/DirObjectFactory.java, ! javax/naming/spi/DirStateFactory.java, ! javax/naming/spi/DirectoryManager.java, ! javax/naming/spi/NamingManager.java, ! javax/naming/spi/ObjectFactoryBuilder.java, ! javax/naming/spi/ResolveResult.java, ! javax/naming/spi/Resolver.java, ! javax/naming/spi/StateFactory.java: ! Import used classes explicitely. ! ! 2003-12-05 Scott Gilbertson ! ! * gnu/gcj/xlib/GC.java (updateClip): Added rectangles argument. ! (clip): Removed field ! (clipRectangles): New field. ! (clone): Use new updateClip. ! (setClipRectangles): Use new updateClip. ! * gnu/gcj/xlib/natGC.cc (updateClip): Prepare passed rectangles. ! ! 2003-12-04 Michael Koch ! ! * java/io/FilePermission.java: ! Import used classes explicitely. ! ! 2003-12-04 Michael Koch ! ! * java/beans/BeanDescriptor.java, ! java/beans/EventSetDescriptor.java, ! java/beans/FeatureDescriptor.java, ! java/beans/IndexedPropertyDescriptor.java, ! java/beans/Introspector.java, ! java/beans/MethodDescriptor.java, ! java/beans/PropertyDescriptor.java, ! java/beans/SimpleBeanInfo.java: Explicitely import used classes. ! * java/beans/beancontext/BeanContextServicesSupport.java ! (serialVersionUID): New field. ! ! 2003-12-04 Michael Koch ! ! * java/awt/MenuComponent.java: Import java.io.Serialization. ! * java/awt/MenuItem.java: Likewise. ! * java/awt/TextComponent.java: Likewise. ! * java/awt/image/ImagingOpException.java ! (serialVersionUID): Fixed. ! ! 2003-12-04 Michael Koch ! ! * gnu/java/net/protocol/http/Connection.java ! (sendRequest): Merged writing http headers with classpath. ! (getInputStream): Merged documentation from classpath. ! (getHeaderField): Likewise. ! (getHeaderFieldKey): Likewise. ! ! 2003-12-04 Michael Koch ! ! * boehm.cc (_Jv_MarkObj): Access hack_signers field. ! ! 2003-12-04 Michael Koch ! ! * java/net/DatagramPacket.java ! (length): Made packge-private to make it accessible via CNI. ! (maxlen): New field. ! (DatagramPacket): Cleaned up. ! (setSocketAddress): Add message to exception. ! (setData): Call other setData(). ! (setData): Call setLength(). ! (setLength): Initialize maxlen too. ! * gnu/java/net/natPlainDatagramSocketImplPosix.cc (peekData): ! Get maximal length from maxlen field, set length field directly. ! (receive): Likewise. ! * gnu/java/net/natPlainDatagramSocketImplWin32.cc (peekData): ! Get maximal length from maxlen field, set length field directly. ! (receive): Likewise. ! ! 2003-12-03 Mohan Embar ! ! * gnu/java/nio/natSelectorImplPosix.cc ! (implSelect): A timeout of 0 means an infinite ! timeout. ! ! 2003-12-02 Fernando Nasser ! ! * gnu/java/awt/peer/gtk/GtkListPeer.java (handleEvent): Fix generation ! of ActionEvents. ! ! 2003-12-03 Michael Koch ! ! * java/lang/Class.h (hack_signers): Renamed signers to hack_signers. ! * java/lang/natClass.cc (getSigners): Likewise. ! (setSigners): Likewise. ! ! 2003-12-02 Mohan Embar ! ! * configure.in: Added new MinGW-specific configure flag ! --with-win32-nlsapi. ! Added new AC_DEFINE MINGW_LIBGCJ_UNICODE. ! Add -lunicows to MinGW SYSTEMSPEC if --with-win32-nlsapi ! is set to unicows. ! * configure: Rebuilt. ! * include/config.h.in: Rebuilt. ! * win32.cc (_Jv_Win32NewString): Implemented. ! (nativeToUnicode): New helper function defined only for ! non-UNICODE builds. ! (unicodeToNative): Likewise. ! (_Jv_Win32TempString): Implemented. ! (lots): Refactored using tchar.h macros. ! (WSAEventWrapper): Use _Jv_Win32NewString. ! (_Jv_platform_initialize): Use GetModuleFileNameA instead ! of GetModuleFileName. ! (_Jv_platform_initProperties): Use _Jv_Win32NewString. ! Use temporary stack buffer instead of a heap buffer. ! * include/win32.h ! Added defines for UNICODE and _UNICODE if MINGW_LIBGCJ_UNICODE is ! defined; added tchar.h include. ! (_Jv_Win32TempString): Declared new helper class. ! (JV_TEMP_STRING_WIN32): New helper macro. ! (_Jv_Win32NewString): Declared new helper method. ! * java/io/natFileDescriptorWin32.cc (open): Use ! JV_TEMP_STRING_WIN32 instead of JV_TEMP_UTF_STRING. ! (write): Reformatted slightly. ! * java/io/natFileWin32.cc (lots): Use tchar.h macros; ! use JV_TEMP_STRING_WIN32 instead of JV_TEMP_UTF_STRING. ! (getCanonicalPath): Use _Jv_Win32NewString instead of ! JvNewStringUTF. ! (performList): Likewise. ! * java/lang/natWin32Process.cc (ChildProcessPipe): ! Use tchar.h macros. ! (startProcess): Use tchar.h macros, JV_TEMP_STRING_WIN32, ! and UNICODE environment flag for CreateProcess. ! * java/net/natNetworkInterfaceWin32.cc ! (winsock2GetRealNetworkInterfaces): Use tchar.h macros and ! _Jv_Win32NewString. ! ! 2003-12-02 Thomas Fitzsimmons ! ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontMetrics.c ! (initState): Mark obj parameter as unused. ! (stringWidth): Mark obj parameter as unused. Initialize ! font_name properly. ! ! * gnu/java/awt/peer/gtk/GdkPixbufDecoder.java: Make ! BufferedImageBuilder class static. ! ! 2003-12-02 Mark Wielaard ! ! * java/security/Security.java: Don't use   in the api doc. ! ! 2003-12-02 Dalibor Topic ! ! Reported by: Jim Pick ! * libraries/javalib/java/util/Hashtable.java ! (internalcontainsValue): New method. ! (contains): Delegate to internalContainsValue. ! ! Reported by: Mark Wielaard ! * libraries/javalib/java/util/Hashtable.java ! (contains): Improved comment. ! ! Reported by: Jeroen Frijters ! * libraries/javalib/java/util/Hashtable.java ! (containsValue): Delegate to contains(Object) to make sure older ! code overwriting it continues to work. ! ! 2003-12-02 Fernando Nasser ! ! * gnu/java/awt/peer/gtk/GtkListPeer.java (handleEvent): New ! method. Handle mouse and key events that must generate ! ActionEvents. ! * java/awt/List.java (getSelectedIndex): Return -1 ! if no list element is selected. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c (awt_event_handler): ! Correct handling of mouse and key events so that List receives them. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c ! (Java_gnu_java_awt_peer_gtk_GtkListPeer_delItems): Fix removal of ! multiple list elements. ! ! 2003-12-02 Ito Kazumitsu ! ! * java/text/SimpleDateFormat.java (compileFormat): ! isLowerCase() and isUpperCase() allow too many characters. ! Just use >= 'A' && <= 'Z' || >= 'a' && <= 'z'. ! ! 2003-12-02 Dalibor Topic ! ! * java/text/FieldPosition.java (equals): Fixed comment. ! ! 2003-12-02 Mark Wielaard ! ! Reported by Archie Cobbs: ! * java/security/DigestInputStream.java (read(byte[], int, int): Call ! digest.update() with temp, not len as lenght. ! ! 2003-12-02 Michael Koch ! ! * java/net/DatagramSocket.java ! (close): Close associated DatagramChannel object. ! * java/net/ServerSocket.java ! * java/net/Socket.java ! (close): Reset impl and bound before calling getChannel().close() to ! prevent from loops. ! ! 2003-12-02 Michael Koch ! ! * java/nio/channels/spi/AbstractInterruptibleChannel.java ! (opened): Removed. ! (closed): New field. ! (close): Check of channel is closed already. ! (isOpen): Return !closed. ! ! 2003-12-02 Michael Koch ! ! * gnu/java/nio/DatagramChannelImpl.java ! (blocking): Initialize with true by default. ! * gnu/java/nio/ServerSocketChannelImpl.java ! (serverSocket): Made private. ! (blocking): Likewise. ! (connected): Likewise. ! * gnu/java/nio/SocketChannelImpl.java ! (connectionPending): Made private. ! * gnu/java/nio/FileLockImpl.java ! (static): Load native library (needed for classpath). ! * gnu/java/nio/SelectorImpl.java ! (static): Load native library (needed for classpath). ! ! 2003-12-02 Michael Koch ! ! * gnu/java/net/protocol/file/Connection.java ! (getLastModified): Implement for file connections. ! (getContentLength): Likewise. ! ! 2003-12-02 Michael Koch ! ! * gnu/java/net/protocol/file/Connection.java: ! Some reformating. ! (file): Renamed from fileIn. ! (getPermission): Moved around. ! ! 2003-12-02 Michael Koch ! ! * gnu/java/net/protocol/jar/Connection.java ! (Connection): Made class final, merged documentation with classpath. ! (file_cache): Made private. ! (jar_file): Renamed from jarfile. ! ! 2003-12-02 Michael Koch ! ! * gnu/java/net/protocol/http/Connection.java ! (Connection): Initialize doOutput to false; ! (connect): Initialize inputStream, moved "send request" code to new ! method. ! (sendRequest): New method. ! (getHttpHeaders): Don't reinitialize inputStream. ! ! 2003-12-02 Michael Koch ! ! * gnu/java/net/protocol//http/Connection.java ! (defRequestProperties): Removed. This dont gets used since JDK 1.3. ! (requestProperties): Initialize, documentation added. ! (inputStream): Renamed from bufferedIn. ! (Connection): Dont initialize requestProperties. ! (setDefaultRequestProperty): Removed. ! (getDefaultRequestProperty): Removed. ! (usingProxy): Documentation added. ! (getHttpHeaders): Likewise. ! ! 2003-12-02 Michael Koch ! ! * java/text/DateFormat.java: ! Explicitely import used classes. ! ! 2003-12-01 Jeff Sturm ! ! * verify.cc (state::clean_subrs): Clear seen_subrs. ! (state::copy): Walk seen_subrs from copy, not `this'. ! Don't clear seen_subrs. ! ! 2003-12-01 Kim Ho ! ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c (create): ! Disable wrapping if TextArea has horizontal scroll bars. ! ! 2003-12-01 Thomas Fitzsimmons ! ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c ! (awt_event_handler): Hard-code inset values. ! ! * gnu/java/awt/peer/gtk/GdkFontMetrics.java (GdkFontMetrics): ! Pass font name, not XLFD, to initState. ! (stringWidth(String, int, String)): New method. ! (stringWidth(String)): Call new stringWidth. ! (getLeading): Always return 0. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontMetrics.c ! (initState): New Pango implementation. ! (stringWidth): Likewise. ! ! 2003-12-01 Olga Rodimina ! ! * java/awt/TextComponent.java: ! (getSelectionStart): Updated javadocs. ! (getSelectionEnd): Ditto. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer: ! (getSelectionStart): Changed to return caret position if no ! text is selected ! (getSelectionEnd): Ditto. ! ! 2003-12-01 Thomas Fitzsimmons ! ! * gnu/awt/gtk/GtkButtonPeer.java, gnu/awt/gtk/gtkcommon.cc, ! gnu/awt/gtk/gtkcommon.h, gnu/awt/gtk/GtkComponentPeer.java, ! gnu/awt/gtk/GtkContainerPeer.java, ! gnu/awt/gtk/GtkFramePeer.java, gnu/awt/gtk/GtkLabelPeer.java, ! gnu/awt/gtk/GtkMainThread.java, gnu/awt/gtk/GtkToolkit.java, ! gnu/awt/gtk/GtkWindowPeer.java, gnu/awt/gtk/natGtkButtonPeer.cc, ! gnu/awt/gtk/natGtkComponentPeer.cc, ! gnu/awt/gtk/natGtkContainerPeer.cc, ! gnu/awt/gtk/natGtkFramePeer.cc, gnu/awt/gtk/natGtkLabelPeer.cc, ! gnu/awt/gtk/natGtkMainThread.cc, gnu/awt/gtk/natGtkToolkit.cc, ! gnu/awt/gtk/natGtkWindowPeer.cc: Remove files. ! ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c ! (closed): Mark loader parameter as unused. ! ! 2003-12-01 Michael Koch ! ! * gnu/java/net/protocol/http/Connection.java ! (Connection): Merged class documentation. ! (socket): Renamed from sock. ! (Connection): Made protected, documentation added. ! (connect): Give URL'S host instead of InetAddress to Socket ! constructor. ! (disconnect): Documentation added. ! (getOutputStream): Rewrapped. ! ! 2003-12-01 Michael Koch ! ! * gnu/java/net/protocol/file/Connection.java ! (fileIn): Documentation added. ! (inputStream): Likewise. ! (outputStream): Likewise. ! (Connection): Likewise. ! (connect): Simplified. ! ! 2003-12-01 Thomas Fitzsimmons ! ! * gnu/java/awt/peer/gtk/GtkImage.java (setDimensions, ! setProperties): Check that io is not null before calling ! io.imageUpdate. ! * java/awt/image/ImageConsumer.java (setPixels, imageComplete): ! Update javadocs. ! * java/awt/image/PixelGrabber.java: Fix implementation and ! update javadocs. ! ! 2003-12-01 Michael Koch ! ! * gnu/java/net/natPlainSocketImplPosix.cc ! bind(): Dont set SockedImpl.address field on succesful bind. ! * gnu/java/net/natPlainSocketImplWin32.cc ! bind(): Likewise. ! ! 2003-11-30 Jeff Sturm ! ! * java/net/InetAddress.java: ! (static): Don'f force DNS request for ANY_IF address. ! ! 2003-11-30 Michael Koch ! ! * java/net/InetAddress.java, ! java/net/natInetAddressNoNet.cc, ! java/net/natInetAddressPosix.cc, ! java/net/natInetAddressWin32.cc: ! Reverted my last patch. ! ! 2003-11-28 Michael Koch ! ! * java/net/InetAddress.java ! (lookup): New method that doesnt lookup "0.0.0.0". ! (ImplLookup): Renamed from lookup. ! * java/net/natInetAddressNoNet.cc ! (ImplLookup): Renamed from lookup. ! * java/net/natInetAddressPosix.cc ! (ImplLookup): Renamed from lookup. ! * java/net/natInetAddressWin32.cc ! (ImplLookup): Renamed from lookup. ! ! 2003-11-28 Bryce McKinlay ! ! * configure: Rebuilt. ! * configure.in: Require gtk and glib 2.2.0. ! ! 2003-11-27 Dalibor Topic ! ! * java/text/FieldPosition.java (equals): Adapted to handle ! field_attribute. Added fast-circuit check for comparison to self. ! Replaced use of instanceof by getClass to fix symmetry for derived ! types. ! (toString): Adapted to handle field_attribute. Improved readability. ! (hashCode): New method. ! ! 2003-11-27 Guilhem Lavaux ! ! * java/text/FieldPosition.java (field_attribute): New field. ! (FieldPosition (Format.Field), FieldPosition(Format.Field, int), ! getFieldAttribute): New methods. ! ! 2003-11-27 Guilhem Lavaux ! ! * java/text/DecimalFormatSymbols.java (locale): New field. ! (DecimalFormatSymbols (Locale)): Set locale. ! (serialVersionOnStream): Upgraded to number 2. ! (readObject): Assign locale if it wasn't by the serializer. ! ! 2003-11-27 Guilhem Lavaux ! ! * java/text/FormatCharacterIterator.java: Documented the class and ! ! 2003-11-27 Guilhem Lavaux ! ! * java/text/FormatCharacterIterator.java: Fixed some typos. ! ! 2003-11-27 Guilhem Lavaux ! ! * java/text/NumberFormat.java: ! (getIntegerInstance) Added the java version in the comments. ! ! 2003-11-27 Mark Wielaard ! ! * java/text/NumberFormat.java: Import java.io.InvalidObjectException. ! (readResolve): Reformat. ! ! 2003-11-27 Guilhem Lavaux ! ! * java/text/NumberFormat.java ! (NumberFormat.Field): New implemented class to match Java 1.4. ! (getIntegerInstance): Two new Java 1.4 methods.o ! ! 2003-11-27 Ito Kazumitsu ! ! * java/util/GregorianCalendar.java (getLinearTime): Avoid counting ! the leap day of the leap year twice. ! (computeFields): First week of month is 1 not 0. ! ! 2003-11-27 Mark Wielaard ! ! * javax/swing/plaf/basic/BasicDefaults.java (BasicDefaults): Put ! AbstractUndoableEdit.undoText and AbstractUndoableEdit.redoText. ! ! 2003-11-27 Michael Koch ! ! * javax/swing/UIDefaults.java: ! Reformated to match classpath's version. ! ! 2003-11-27 Sascha Brawer ! ! * javax/swing/UIManager.java (getDefaults, getDimension, ! getIcon, getInsets, getInstalledLookAndFeels, getInt, ! getLookAndFeel, getString, getSystemLookAndFeelClassName): ! Declare as public. ! ! 2003-11-26 Sascha Brawer ! ! * javax/swing/undo/StateEdit.java (getPresentationName): Docfix. ! * javax/swing/undo/AbstractUndoableEdit.java (canUndo, canRedo, ! isSignificant): Likewise. ! ! 2003-11-26 Sascha Brawer ! ! * javax/swing/undo/CompoundEdit.java: Re-format, document. ! (inProgress): Set initial value to true. ! (undo, redo, die, canUndo, canRedo): Also call inherited ! implementation; simplify code structure. ! (getPresentationName, getUndoPresentationName, ! getRedoPresentationName): Make behavior dependent on lastEdit. ! (addEdit, isSignificant): Completely re-written. ! ! 2003-11-26 Sascha Brawer ! ! * javax/swing/undo/StateEdit.java: Re-format, document. ! (undo, redo): Also call inherited implementation. ! ! 2003-11-26 Sascha Brawer ! ! * javax/swing/undo/StateEditable.java: Re-format, document. ! ! 2003-11-26 Sascha Brawer ! ! * javax/swing/undo/AbstractUndoableEdit.java: Re-format, document. ! (AbstractUndoableEdit): Initialize hasBeenDone to true. ! (canUndo, canRedo): Simplify. ! (getUndoPresentationName, getRedoPresentationName): Support ! localized message; call getPresentationName() only once. ! ! 2003-11-26 David Belanger ! ! * java/util/zip/ZipFile (Zipfile(File)): Set file path as name. ! (ZipFile(File,int)): Likewise. ! ! 2003-11-26 Stuart Ballard ! ! * java/util/HashMap.java (putAll): Use Iterator hasNext() method. ! (putAllInternal): Likewise. ! * java/util/Hashtable.java (putAll): Use Iterator hasNext() method. ! (putAllInternal): Likewise. ! ! 2003-11-26 Michael Koch ! ! * java/net/URLStreamHandler.java ! (parseURL): Added comment in catch statement. ! (canonicalizeFilename): Add documentation. ! (sameURL): Completed documentation. ! (equals): Likewise. ! (hostsEqual): Likewise. ! (getDefaulPort): Likewise. ! (hashCode): Likewise. ! (toExternalForm): Likewise. ! (getHostName): Fix empty hostname check, completed documentation. ! ! 2003-11-26 Tom Tromey ! ! * java/lang/natDouble.cc (parseDouble): Reverted patch of ! 2003-11-13. ! ! 2003-11-26 Guilhem Lavaux ! Mark Wielaard ! ! * java/net/URLStreamHandler (parseUrl): Fixed URL parsing ! ('@' should be checked to distinguish port from userinfo). ! (toExternalForm): Add @ userInfo if necessary. ! ! ! 2003-11-26 Michael Koch ! ! * java/net/DatagramSocket.java ! (DategramSocket, bind): Moved binding code from DatagramSocket ! constructor to bind method. ! ! 2003-11-26 Michael Koch ! ! * java/net/DatagramSocket.java ! (impl): Made private. ! (bound): New private member variable. ! (DatagramSocket): Fixed documentation, use getImpl(). ! (getImpl): New package-private method. ! (isClosed): Use getImpl(). ! (getLocalAddress): Completed documentation, use getImpl(). ! (getLocalPort): Use getImpl(). ! (getSoTimeout): Likewise. ! (setSoTimeout): Likewise. ! (getSendBufferSize): Likewise. ! (setSendBufferSize): Likewise. ! (getReceiveBufferSize): Likewise. ! (setReceiveBufferSize): Likewise. ! (connect): Likewise. ! (disconnect): Likewise. ! (receive): Likewise. ! (send): Likewise. ! (setReuseAddress): Likewise. ! (setTrafficClass): Likewise. ! (bind): Added message to exception. ! (isClosed): Completed documentation. ! (getChannel): Likewise. ! (connect): Added missing exception, refined exception message. ! (isBound): Completed documentation, just return bound. ! (isConnected): Completed documentation. ! (getRemoteSocketAddress): Likewise. ! (getReuseAddress): Completed documentation, use getImpl(). ! (setSoBroadcast): Likewise. ! (getSoBroadcast): Likewise. ! (getTrafficClass): Likewise. ! (getLocalSocketAddress): Simplified. ! * java/net/MulticastSocket.java ! (MulticastSocket): Removed comment not applying anymore. ! (getInterface): Use getImpl(). ! (getTTL): Likewise. ! (getTimeToLive): Likewise. ! (setInterface): Likewise. ! (setNetworkInterface): Likewise. ! (getNetworkInterface): Likewise. ! (setLoopback): Likewise. ! (getLoopback): Likewise. ! (setTTL): Likewise. ! (setTimeToLive): Likewise. ! (joinGroup): Likewise. ! (leaveGroup): Likewise. ! (send): Likewise. ! ! 2003-11-26 Michael Koch ! ! * java/net/Socket.java ! (implCreated): Dont set default value explicitely, added ! documentation. ! (inputShutdown): Likewise. ! (outputShutdown): Likewise. ! (bound): New private member variable. ! (bind): Set bound to true. ! (close): Set bound to false. ! (isBound): Return bound. ! * java/net/ServerSocket.java ! (bound): New private member variable. ! (bind): Set bound to true. ! (close): Set bound to false. ! (isBound): Return bound. ! ! 2003-11-26 Michael Koch ! ! * java/net/URL.java ! (URL): Fixed documentation to be HTML compliant. ! (getContent): Completed documentation. ! (getFile): Likewise. ! (getPath): Likewise. ! (getAuthority): Likewise. ! (getHost): Likewise. ! (getDefaultPort): Likewise. ! (getProtocol): Likewise. ! (hashCode): Likewise. ! (openConnection): Likewise. ! (openStream): Likewise. ! (set): Likewise. ! (getURLStreamHandler): Wrapped lines to fit into our 79 chars rule. ! ! 2003-11-26 Michael Koch ! ! * java/net/InetSocketAddress.java ! (hostname): Made private, added documentation. ! (addr): Likewise. ! (port): Likewise. ! (equals): Completed documentation. ! (getAddress): Likewise. ! (getHostName): Likewise. ! (getPort): Likewise. ! (hashCode): Likewise. ! (isUnresolved): Likewise. ! (toString): Likewise. ! ! 2003-11-26 Michael Koch ! ! * gnu/java/net/protocol/file/Handler.java ! (Handler): New explicit constructor. ! (openConnection): Added documentation. ! * gnu/java/net/protocol/jar/Handler.java ! (Handler): New explicit constructor. ! (openConnection): Added documentation. ! ! 2003-11-26 Michael Koch ! ! * java/net/DatagramPacket.java ! (DatagramPacket): Fixed documentation to become legal HTML. ! ! 2003-11-25 Michael Koch ! ! * gcj/javaprims.h: Added missing java.util.Currency. ! ! 2003-11-25 Michael Koch ! ! * testsuite/libjava.mauve/xfails: ! Removed these two tests, they mystically pass now: ! -FAIL: gnu.testlet.java.net.ServerSocket.ServerSocketTest: Error : ! test_params failed - 5getInetAddress did not return proper values ! (number 1) ! -FAIL: gnu.testlet.java.net.Socket.SocketTest: Error : ! test_BasicServer failed - 11 exception was thrown :Illegal seek ! (number 1) ! ! 2003-11-25 Michael Koch ! ! * java/net/DatagramSocket.java ! (factory): Made private. ! (closed): Removed. ! (DatagramSocket): Check impl argument, use constructor with ! SocketAddress argument. ! (close): Set impl to null, use isClosed(). ! (isClosed): Check for impl == null. ! (getLocalAddress): Use isClosed(). ! (getLocalPort): Check if socket is closed. ! (getSoTimeout): Likewise. ! (setSoTimeout): Likewise. ! (getSendBufferSize): Likewise. ! (setSendBufferSize): Likewise. ! (getReceiveBufferSize): Likewise. ! (setReceiveBufferSize): Likewise. ! (receive): Likewise. ! (send): Likewise. ! (bind): Likewise. ! (connect): Likewise. ! (setReuseAddress): Likewise. ! (getReuseAddress): Likewise. ! (setBroadcast): Likewise. ! (getBroadcast): Likewise. ! (setTrafficClass): Likewise. ! (getTrafficClass): Likewise. ! * java/net/MulticastSocket.java ! (getInterface): Check if socket is closed. ! (getTTL): Likewise. ! (getTimeToLive): Likewise. ! (setInterface): Likewise. ! (setNetworkInterface): Likewise. ! (getNetworkInterface): Likewise. ! (setLoopbackMode): Likewise. ! (setTTL): Likewise. ! (setTimeToLive): Likewise. ! (joinGroup): Likewise. ! (leaveGroup): Likewise. ! (send): Likewise. ! * java/net/ServerSocket.java ! (closed): Removed. ! (close): Check if socket is closed, set impl to null. ! (isClosed): Check impl == null; ! (ServerSocket): Check impl argument. ! (getInetAddress): Check if socket is bound. ! (getLocalPort): Likewise. ! (getLocalSocketAddress): Likewise. ! (bind): Check if socket is closed. ! (implAccept): Likewise. ! (setSoTimeout): Likewise. ! (getSoTimeout): Likewise. ! (setReuseAddress): Likewise. ! (getReuseAddress): Likewise. ! (setReceiveBufferSize): Likewise. ! (getReceiveBufferSize): Likewise. ! (toString): Make output compliant to JDK 1.4.2. ! * java/net/Socket.java ! (closed): Removed. ! (Socket): Fixed documentation. ! (connect): Check if socket is closed, changed exception text, ! fixed documentation. ! (getInputStream): Check of socket is closed and connected. ! (getOutputStream): Likewise. ! (bind): Check if socket is closed. ! (setTcpNoDelay): Likewise. ! (getTcpNoDelay): Likewise. ! (setSoLinger): Likewise. ! (getSoLinger): Likewise. ! (sendUrgentData): Likewise. ! (setOOBInline): Likewise. ! (getOOBInline): Likewise. ! (setSoTimeout): Likewise. ! (getSoTimeout): Likewise. ! (setSendBufferSize): Likewise. ! (getSendBufferSize): Likewise. ! (setReceiveBufferSize): Likewise. ! (getReceiveBufferSize): Likewise. ! (setKeepAlive): Likewise. ! (getKeepAlive): Likewise. ! (close): Likewise. ! (shutdownInput): Likewise. ! (shutdownOutput): Likewise. ! (getReuseAddress): Likewise. ! (getTrafficClass): Likewise. ! (setTrafficClass): Likewise. ! (isClosed): Check impl == null. ! (toString): Added missing ']'. ! ! 2003-11-24 Tom Tromey ! ! * Makefile.in: Rebuilt. ! * Makefile.am (propdir): New macro. ! (install-data-local): Install logging.properties. ! (core_java_source_files): Added java.util.logging.*. ! * java/util/logging/logging.properties: New file. ! ! 2003-11-25 Michael Koch ! ! * java/net/DatagramSocket.java ! (DatagramSocket): Move binding code to bind(), simplify constructors. ! * java/net/MulticastSocket.java ! (MulticastSocket): Call parent constructor with null argument, ! bind socket after setReuseAddress is called, simplify constructors. ! ! 2003-11-24 Michael Koch ! ! * javax/swing/BoxLayout.java ! (serialVersionUIR): New member variable. ! (X_AXIS, Y_AXIS): Documentation added. ! (LINE_AXIS, PAGE_AXIS): New constants. ! (grid): Renamed from gridbag. ! (BoxLayout): Use new constants, throw exception if invalid value for ! way, added documentation. ! (BoxLayout): Removed. ! (addLayoutComponent): Use new constants, added documentation. ! (removeLayoutComponent): Likewise. ! (addLayoutContainer): Added documentation. ! (preferredLayoutSize): Added documentation, check given argument. ! (minimumLayoutSize): Likewise. ! (layoutContainer): Likewise. ! (getLayoutAlignmentX): Likewise. ! (getLayoutAlignmentY): Likewise. ! (invalidateLayout): Likewise. ! (maximumLayoutSize): Likewise. ! ! 2003-11-22 Michael Koch ! ! * gnu/java/net/natPlainDatagramSocketImplWin32.cc ! (peekData): Use offset and maximal free space in datagram packet. ! (receive): Likewise. ! (send): Use offset in datagram packet. ! ! 2003-11-22 Michael Koch ! ! * gnu/java/net/natPlainDatagramSocketImplPosix.cc ! (peekData): Use offset and maximal free space in datagram packet. ! (receive): Likewise. ! (send): Use offset in datagram packet. ! ! 2003-11-22 Michael Koch ! ! * gnu/java/nio/DatagramChannelImpl.java ! (getNativeFD): Use getPlainDatagramSocketImpl(). ! * gnu/java/nio/NIODatagramSocket.java ! (getPlainDatagramSocketImpl): Renamed from getImpl(). ! * gnu/java/nio/NIOSocket.java ! (getPlainSocketImpl): Renamed from getImpl(). ! (setChannel): Use getPlainSocketImpl(). ! * gnu/java/nio/SocketChannelImpl.java ! (SocketChannelImpl): Use getPlainSocketImpl(). ! (getPlainSocketImpl): Renamed from getImpl(). ! (getNativeFD): Use getPlainSocketImpl(). ! ! 2003-11-18 Graydon Hoare ! ! * javax/swing/JLayeredPane.java: Implement. ! * javax/swing/JFrame.java (getContentPane): Make public ! * javax/swing/javax/swing/JRootPane.java (setContentPane): ! Use JLayeredPane.FRAME_CONTENT_LAYER. ! ! 2003-11-21 Mark Wielaard ! ! * java/lang/Float.java (static): Removed. ! ! 2003-11-18 Graydon Hoare ! ! * java/awt/font/TextLayout.java: Implement simple layouts ! using attributed strings and glyph vectors. ! ! 2003-11-17 Graydon Hoare ! ! * gnu/java/awt/peer/gtk/GdkClasspathFontPeerMetrics.java: New file. ! * gnu/java/awt/peer/gtk/GdkClasspathFontPeer.java ! (GdkFontLineMetrics): New inner class. ! (getLineMetrics): Return new GdkFontLineMetrics. ! (getFontMetrics): Return new GdkClasspathFontPeerMetrics. ! (layoutGlyphVector): Create GdkGlyphVector. ! * gnu/java/awt/peer/gtk/GdkGraphics2D.java (stateStack): New member. ! (GdkGraphics2D): Initialize state via mathod calls. ! (cairoSetMatrix, cairoShowGlyphs): Simplify native calls. ! (cairoTranslate, cairoScale, cairoRotate): Remove. ! (various methods): use setTransform for special transform cases. ! (DrawState): New inner class. ! (stateSave): New method. ! (stateRestore): New method. ! (various methods): use stateSave, stateRestore. ! (getClipInDevSpace): New method. ! (clip, clipRect, setClip, getClip, getClipBounds): ! Follow spec more closely. ! (getTransform): Return clone of transform. ! (setStroke): Set linewidth to passed width / 2.0. ! (setPaintMode): Set SrcOver rather than Xor. ! (setColor): Set paint to passed color. ! (drawRaster, drawImage, PainterThread, drawPixels): Take affine ! transform from image to user space. ! (drawRenderedImage, drawRenderableImage): Implement. ! (getFontRenderContext, getFontMetrics, drawString, getFont): ! Implement ! (drawArc, drawOval, drawRoundRect, fillArc, fillOval, fillRoundRect): ! Implement. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c: ! Match changes to java side. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeer.c: ! Release resources. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGlyphVector.c: ! Don't use pango for metrics. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeerMetrics.c: ! New file. ! ! 2003-11-19 Guilhem Lavaux ! Jim Pick ! ! * java/text/DecimalFormat.java (getCurrency, setCurrency): New ! methods. ! ! 2003-11-19 Guilhem Lavaux ! ! * java/text/DecimalFormatSymbols.java (getCurrency, ! setCurrency): New methods. ! ! 2003-11-19 Sascha Brawer ! ! * java/awt/geom/FlatteningPathIterator.java: Entirely re-written. ! * java/awt/geom/doc-files/FlatteningPathIterator-1.html: ! Describe how the implementation works. ! ! 2003-11-19 Michael Koch ! ! * java/net/Socket.java ! (implCreated): New variable that indicates created impl. ! (getImpl): New method. ! (toString): Return more SUN compliant string representation. ! (various): Use getImpl() instead of impl. ! ! 2003-11-19 Andreas Tobler ! ! * lib/libjava.exp: Add DYLD_LIBRARY_PATH for darwin. Look for ! the right libgcc. Add -multiply_defined suppress and -bind_at_load ! flags. ! ! 2003-11-18 Tom Tromey ! ! PR libgcj/13026: ! * verify.cc (state::copy): Only set local_changed if we're in a ! subroutine. Correctly copy local variables which were modified ! by the subroutine. ! (push_jump_merge): Added more debugging output. ! ! * jni.cc (_Jv_JNI_GetStringUTFChars): Fail gracefully if string ! is null. ! ! 2003-11-17 Graydon Hoare ! ! * javax/swing/plaf/basic/BasicDefaults.java: Rewrite to spec. ! * javax/swing/UIDefaults.java: Modify to reflect rewrite. ! ! 2003-11-16 Tom Tromey ! ! PR libgcj/13062: ! * java/io/StreamTokenizer.java (commentChar): Clear other ! attributes for character. ! (quoteChar): Likewise. ! ! 2003-11-14 Thomas Fitzsimmons ! ! * java/awt/GridBagLayout.java (getLayoutDimensions): Return array of two ! zero-length int arrays when layoutInfo is null. ! (getLayoutWeights): Return array of two zero-length double arrays when ! layoutInfo is null. ! ! 2003-11-13 Tom Tromey ! ! * jni.cc (_Jv_JNI_GetStringUTFChars): Pass length of string to ! JvGetStringUTFRegion. ! * java/lang/natPosixProcess.cc (new_string): Pass length of string ! to JvGetStringUTFRegion. ! * java/lang/natDouble.cc (parseDouble): Pass length of string to ! JvGetStringUTFRegion. ! * java/lang/natWin32Process.cc (startProcess): Pass length of ! string to JvGetStringUTFRegion. ! * java/lang/natClass.cc (forName): Pass length of string to ! JvGetStringUTFRegion. ! * gnu/gcj/runtime/natNameFinder.cc (getExternalLabel): Pass length ! of string to JvGetStringUTFRegion. ! * gnu/gcj/convert/natIconv.cc (init): Pass length of string to ! JvGetStringUTFRegion. ! * gnu/awt/gtk/natGtkLabelPeer.cc (setText): Pass length of string ! to JvGetStringUTFRegion. ! * gnu/awt/gtk/natGtkButtonPeer.cc (setLabel): Pass length of ! string to JvGetStringUTFRegion. ! ! 2003-11-13 Mohan Embar ! ! * gnu/java/nio/natSelectorImplPosix.cc ! (helper_put_filedescriptors): Change to static linkage. ! (helper_get_filedescriptors): Likewise. ! ! 2003-11-12 Thomas Fitzsimmons ! ! * gnu/java/awt/peer/gtk/GtkComponentPeer.java (prepareImage): Remove ! null check. ! * gnu/java/awt/peer/gtk/GtkToolkit.java (prepareImage): Likewise. ! * java/awt/Component.java (prepareImage): Likewise. ! ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c (setAlignment): ! Rename to nativeSetAlignment. ! ! 2003-11-11 Danny Smith ! ! * jni.cc (JNI_CreateJavaVM): Remove JNIEXPORT. ! (JNI_GetCreatedJavaVMs): Likewise. ! (JNI_GetDefaultJavaVMInitArgs): Likewise. ! * include/jni.h (JNIIMPEXP): Remove definition ! and replace with... ! (__GCJ_JNIIMPEXP__): New macro, applicable only to libgcj ! symbols, ! (__GCJ_DLL__): New macro, controlling __GCJ_JNIIMPEXP__. ! ! 2003-11-11 Thomas Fitzsimmons ! ! * Makefile.am: Add GdkPixbufDecoder.java and ! gnu_java_awt_peer_gtk_GdkPixbufDecoder.c ! * Makefile.in: Regenerate. ! * gnu/java/awt/image/ImageDecoder.java (ImageDecoder(byte[],int,int)): ! New constructor. ! (startProduction): Create ByteArrayInputStream when url and filename are ! null. ! (produce): Declare stream parameter as InputStream. ! * gnu/java/awt/image/XBMDecoder.java (produce): Declare stream parameter ! as InputStream. ! * gnu/java/awt/peer/gtk/GdkPixbufDecoder.java ! (GdkPixbufDecoder(byte[],int,int)): New constructor. ! (produce): Declare stream parameter as InputStream. ! * gnu/java/awt/peer/gtk/GtkComponentPeer.java (prepareImage): Throw NPE ! if image is null. Set image's observer before running PrepareImage ! thread. Pass image to startProduction. ! * gnu/java/awt/peer/gtk/GtkImage.java: Add null checks before calls to ! source's member functions. ! (observer): New field. ! (setObserver): New method. ! (setDimensions, setPixels, imageComplete): Call observer's imageUpdate. ! * gnu/java/awt/peer/gtk/GtkToolkit.java (checkImage, getImage): Return ! new GtkImage. ! (prepareImage): Implement. ! * java/awt/Component.java: Add static fields incrementalDraw and ! redrawRate. ! (imageUpdate): Implement. ! (createImage): Call Toolkit's createImage if peer is null. ! (prepareImage): Throw NPE if image is null. ! * java/awt/MediaTracker.java: Fix return value. ! ! 2003-11-11 Thomas Fitzsimmons ! ! * gnu/java/awt/peer/gtk/GtkLabelPeer.java (create()): Call new create. ! (create(String, float)): New method. ! (setText): Make native. ! (nativeSetAlignment): New method. ! (setAlignment): Call nativeSetAlignment. ! (getArgs): Remove method. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c ! (find_fg_color_widget, find_bg_color_widget): New functions. ! (gtkWidgetSetForeground): Call find_fg_color_widget. ! (gtkWidgetSetBackground): Call find_bg_color_widget. Modify active and ! prelight colors. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c (create): Wrap label ! widget in event box. ! (setText, setAlignment): Implement new native methods. ! ! 2003-11-11 Michael Koch ! ! * java/awt/Font.java, ! java/awt/datatransfer/DataFlavor.java, ! java/math/BigInteger.java, ! java/net/Inet4Address.java, ! java/net/Inet6Address.java, ! java/rmi/MarshalledObject.java, ! java/rmi/server/RMIClassLoader.java, ! java/security/cert/CertStore.java, ! java/sql/Timestamp.java, ! java/text/SimpleDateFormat.java, ! javax/naming/CompoundName.java: ! Removed some redundant obj == null checks. ! ! 2003-11-11 Michael Koch ! ! * java/nio/ByteBuffer.java ! (equals): Remove redundant obj == null check. ! ! 2003-11-11 Michael Koch ! ! * gnu/java/nio/natPipeImpl.cc, ! gnu/java/nio/natSelectorImpl.cc: Removed ! * gnu/java/nio/natPipeImplEcos.cc, ! gnu/java/nio/natPipeImplPosix.cc, ! gnu/java/nio/natPipeImplWin32.cc, ! gnu/java/nio/natSelectorImplEcos.cc, ! gnu/java/nio/natSelectorImplPosix.cc, ! gnu/java/nio/natSelectorImplWin32.cc: New files ! * configure.in: Create links for gnu/java/nio/natPipeImpl.cc and ! gnu/java/nio/natSelectorImpl.cc ! * configure: Regenerated. ! ! 2003-11-11 Micheal Koch ! ! * java/net/URLStreamHandler.java (toExternalForm): Print port only ! if host is printed too and port was really given to URL. ! ! 2003-11-10 Gary Benson ! ! * java/sql/Timestamp.java (valueOf): Correctly handle ! nanoseconds. ! ! 2003-11-09 Tom Tromey ! ! * java/net/Inet4Address.java (serialVersionUID): Updated. ! ! 2003-11-08 Jeff Sturm ! ! * gnu/gcj/runtime/FirstThread.java (Klocale, Kcalendar): ! New fields. ! ! 2003-11-08 Jeff Sturm ! ! * java/io/ByteArrayOutputStream.java (resize): ! Fix off-by-one error. ! ! 2003-11-08 Bryce McKinlay ! ! * gnu/gcj/xlib/XAnyEvent.java (XAnyEvent): Make constructor ! public. ! ! 2003-11-06 Mohan Embar ! ! PR libgcj/12231 ! * java/lang/Win32Process.java (hasExited) Changed from ! public to private. ! (startProcess): Likewise. ! (cleanup): Likewise. ! * java/lang/natWin32Process.cc (cleanup) Don't close ! input, output and error streams. ! (ChildProcessPipe): New helper class. ! (startProcess): Refactored to use ChildProcessPipe. ! Use CREATE_NO_WINDOW when launching child process. ! ! 2003-11-06 Mohan Embar ! ! * include/win32.h (_Jv_platform_close_on_exec): Changed ! signature and declared extern. ! * win32.cc (_Jv_platform_close_on_exec): Implemented. ! * gnu/java/net/natPlainDatagramSocketImplWin32.cc ! (create): Use new signature of _Jv_platform_close_on_exec. ! * gnu/java/net/natPlainSocketImplWin32.cc ! (create): Eliminated a few typecasts ! Use new signature of _Jv_platform_close_on_exec. ! (accept): Eliminated a few typecasts ! Use new signature of _Jv_platform_close_on_exec. ! * java/io/natFileDescriptorWin32.cc (open): Use ! _Jv_platform_close_on_exec. ! ! 2003-11-04 Bryce McKinlay ! ! * java/lang/natClass.cc (newInstance): Throw InstantiationException ! if class has no null-argument constructor. ! ! 2003-10-30 Mohan Embar ! ! PR libgcj/12647: ! * win32-threads.cc (_Jv_CondWait): Respect mutex's ! refcount when releasing and reacquiring it. ! ! 2003-10-30 Mohan Embar ! ! * win32.cc: (dirExists) Internal helper function to ! test for directory existence. ! (getUserHome) New helper function refactored out ! of _Jv_platform_initProperties. Uses USERPROFILE ! instead of HOMEDIR and attempts to support Win9X and NT. ! (_Jv_platform_initProperties) Use getUserHome. ! ! 2003-10-30 Mohan Embar ! ! PR libgcj/11521: ! * gnu/java/net/natPlainSocketImplWin32.cc ! (bind): Don't use SO_REUSEADDR ! ! 2003-10-30 Mohan Embar ! ! PR libgcj/6652: ! * java/io/natFileWin32.cc (getCanonicalPath): Treat "" like ".". ! ! 2003-10-30 Bryce McKinlay ! ! * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Don't use vtable ! dispatch for final methods. ! ! 2003-10-30 Thomas Fitzsimmons ! ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c (create): Turn on ! word wrapping. ! ! 2003-10-29 Thomas Fitzsimmons ! ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c (getSize): Return ! scrolled window's size request. ! ! 2003-10-29 Sascha Brawer ! ! * java/awt/geom/CubicCurve2D.java (contains): Docfix for URL of embedded drawing. ! * java/awt/geom/QuadCurve2D.java: Likewise. ! ! 2003-10-29 Sascha Brawer ! ! * java/awt/geom/CubicCurve2D.java: Added documentation. ! * java/awt/geom/QuadCurve2D.java: Likewise. ! ! * java/awt/geom/doc-files/QuadCurve2D-4.png, ! java/awt/geom/doc-files/QuadCurve2D-5.png, ! java/awt/geom/doc-files/CubicCurve2D-4.png, ! java/awt/geom/doc-files/Cubicurve2D-5.png: New illustrations. ! ! 2003-10-29 Sascha Brawer ! ! * java/awt/geom/CubicCurve2D.java (getFlatnessSq): Implement. ! (subdivide(CubicCurve2D, CubicCurve2D)): Avoid useless object allocation. ! (subdivide(double[],int,double[],int,double[],int)): Implement. ! ! 2003-10-29 Sascha Brawer ! ! * java/awt/geom/doc-files/CubicCurve2D-1.png, ! java/awt/geom/doc-files/CubicCurve2D-2.png, ! java/awt/geom/doc-files/CubicCurve2D-3.png: New illustrations. ! ! 2003-10-29 Ito Kazumitsu ! ! * java/text/DecimalFormat.java ! (scanFormat) corrected so that '%' may appear in a pattern. ! ! 2003-10-29 Mark Wielaard ! ! From Guilhem Lavaux ! * java/text/DateFormat.java (Field): New public static inner class. ! * java/text/Format.java (Field): Likewise. ! (formatToCharacterIterator): New method. ! * java/text/FormatCharacterIterator.java: New file. ! ! 2003-10-29 Mark Wielaard ! ! From Guilhem Lavaux ! * java/util/Currency.java: New file. ! ! 2003-10-29 Michael Koch ! ! * Makefile.am (ordinary_java_source_files): Added ! java/text/FormatCharacterIterator.java and java/util/Currency.java. ! * Makefile.in: Regenerated. ! ! 2003-10-29 Dalibor Topic ! ! * gnu/java/beans/IntrospectionIncubator.java (addMethod): Add public ! static methods. ! ! 2003-10-29 Julian Dolby ! ! * javax/naming/spi/NamingManager.java (getContinuationContext): Call ! getObjectInstance() with Object, Name, Context and environment ! Hashtable from exception. Call fillInStackTrace() on exception when ! rethrown. ! * javax/naming/InitialContext.java (lookup(Name)): When a ! CannotProceedException is thrown use the ContinuationContext. ! (lookup(String)): Likewise. ! (close): Clear myProps and defaultInitCtx. ! ! 2003-10-29 Michael Koch ! ! * java/net/InetAddress.java ! (equals): Remove redundant obj == null check. ! * java/net/SocketPermission.java ! (equals): Likewise. ! * java/net/URL.java ! (equals): Likewise. ! (getURLStreamHandler): Likewise. ! ! 2003-10-29 Michael Koch ! ! * gnu/java/net/natPlainDatagramSocketImplPosix.cc ! (setOption): Directly return if no error occured. ! * gnu/java/net/natPlainSocketImplPosix.cc ! (setOption): Likewise. ! ! 2003-10-28 Bryce McKinlay ! ! * java/lang/natClass.cc (_Jv_LayoutVTableMethods): Always assign a ! vtable slot for final methods. Add FIXME comment. ! ! 2003-10-28 David S. Miller ! ! * sysdep/sparc/locks.h (__cas_start_atomic): %g0 --> %%g0. ! ! 2003-10-26 Mark Wielaard ! ! Reported by Helmer Kraemer ! * java/util/jar/JarInputStream.java (readManifest): Don't call ! closeEntry(). ! ! * java/util/zip/DeflaterOutputStream.java (inbufWrite): New method. ! (finish): Use inbufWrite(). ! (write(int)): Likewise. ! (write(byte[],int,int)): Likewise. ! ! 2003-10-26 Bryce McKinlay ! ! * java/lang/reflect/AccessibleObject.java (secureSetAccessible): ! Don't check for AccessibleObject. Update javadocs. ! ! * java/util/TreeMap.java: Doc fixes. HashMap -> TreeMap. ! ! 2003-10-26 Bryce McKinlay ! ! * java/lang/reflect/Constructor.java (toString): Avoid extra ! whitespace on constructor with no modifiers. ! * java/lang/reflect/natConstructor.java (newInstance): Look up ! caller and perform accessibility check only if constructor is ! non-public and accessible flag is not set. ! ! 2003-10-26 Bryce McKinlay ! ! * jni.cc (_Jv_JNI_CallAnyMethodV, _Jv_JNI_CallAnyMethodA, ! _Jv_JNI_CallAnyVoidMethodV, _Jv_JNI_CallAnyVoidMethodA): Don't ! use _Jv_LookupDeclaredMethod(). Call _Jv_CallAnyMethodA with ! is_virtual_call argument. ! * include/jvm.h (_Jv_isVirtualMethod): Moved and renamed from ! natClass.cc. ! * java/lang/natClass.cc (_Jv_LayoutVTableMethods): Use ! _Jv_isVirtualMethod. ! * java/lang/reflect/natMethod.cc (invoke): Don't use ! _Jv_LookupDeclaredMethod. ! (_Jv_CallAnyMethodA): New is_virtual_call argument. If specified, ! look up method in target object's vtable. ! ! 2003-10-25 Graydon Hoare ! ! * gnu/java/awt/ClasspathToolkit.java: New abstract class. ! * gnu/java/awt/peer/ClasspathFontPeer.java: New abstract class. ! * gnu/java/awt/peer/gtk/GdkClasspathFontPeer.java, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeer.c: ! New concrete implementation of ClasspathFontPeer, with native part. ! * gnu/java/awt/peer/gtk/GdkGlyphVector.java, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGlyphVector.c: ! New class, with native part. ! * gnu/java/awt/peer/gtk/GdkGraphics2D.java, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c: ! implement setFont, cairoSetFont, drawGlyphVector, cairoShowGlyphs. ! ! 2003-10-25 Bryce McKinlay ! ! * java/lang/reflect/Method.java (toString): Avoid extra whitespace ! on method with no modifiers. ! ! 2003-10-25 Bryce McKinlay ! ! PR libgcj/11780: ! * java/lang/reflect/natMethod.cc (invoke): Look up caller and perform ! accessibility check only if target is non-public and accessible flag ! is not set. ! * java/lang/reflect/natField.cc (getAddr): Likewise. ! ! 2003-10-24 Thomas Fitzsimmons ! ! * gnu/java/awt/peer/gtk/GtkDialogPeer.java (handleEvent): ! Remove method. ! * gnu/java/awt/peer/gtk/GtkWindowPeer.java (postWindowEvent): ! New method. ! * java/awt/Window.java (Window(Window,GraphicsConfiguration), ! show, hide, dispose, getOwnedWindows): Synchronize on tree lock. ! (dispose): Post WINDOW_CLOSED event. ! (addWindowFocusListener, addWindowStateListener): Assign result ! of multicaster add back to window listener. ! (removeWindowFocusListener, removeWindowStateListener): Assign ! result of multicaster remove back to window listener. ! (dispatchEventImpl): Add null checks for focus and state ! listeners. ! (processWindowEvent): Handle case where windowListener is null ! but state or focus listeners exist. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c: Add JNI ! glue for postWindowEvent. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c ! (window_delete_cb, window_destroy_cb, window_show_cb, ! window_focus_in_cb, window_focus_out_cb, window_window_state_cb, ! window_get_new_state): New functions. ! * jni/gtk-peer/gtkpeer.h: Define window event and frame state ! macros. Declare postWindowEventID. ! ! 2003-10-24 Anthony Green ! ! * java/lang/natClass.cc (_Jv_LinkSymbolTable): Fix case where ! we have no interpreter. ! ! 2003-10-22 Andrew Haley ! ! * java/lang/natClass.cc (initializeClass): Call ! _Jv_linkExceptionClassTable. ! (_Jv_LinkSymbolTable): Call )_Jv_ThrowNoSuchMethodError. Call ! _Jv_Defer_Resolution on a method whose ncode is NULL. ! (_Jv_linkExceptionClassTable): New function. ! (_Jv_LayoutVTableMethods): If superclass looks like a constant pool ! entry, look it up. ! * java/lang/Class.h (struct _Jv_CatchClass): New. ! (_Jv_linkExceptionClassTable): New friend. ! (_Jv_Defer_Resolution): New friend. ! (class Class.catch_classes): New field. ! * include/java-interp.h (Jv_Defer_Resolution): New method. ! (_Jv_PrepareClass): Make a friend of _Jv_MethodBase. ! (_Jv_MethodBase.deferred): New field. ! (_Jv_Defer_Resolution): New function. ! * resolve.cc (_Jv_PrepareClass): Resolve deferred handlers. ! * exception.cc (get_ttype_entry): Change return type to void**. ! (PERSONALITY_FUNCTION): Remove all code related to using a ! Utf8Const* for a match type. Change match type to be a pointer to ! a pointer, rather than a pointer to a Class. ! * defineclass.cc (handleCodeAttribute): Initialize ! method->deferred. ! (handleMethodsEnd): Likewise. ! ! 2003-10-23 Rainer Orth ! ! * java/lang/natObject.cc (_Jv_ObjectCheckMonitor): Use ! _Jv_MutexCheckMonitor instead of accessing mutex.owner directly. ! ! 2003-10-22 Tom Tromey ! ! PR libgcj/12416: ! * java/lang/Class.h: Updated. ! * java/lang/natClass.cc (_getFields): Removed. ! (getFields): Likewise. ! (getDeclaredFields): Added `public_only' parameter. ! * java/lang/Class.java (getFields): Now implemented in java; from ! Classpath. ! (getDeclaredFields): Likewise. ! (getDeclaredFields(boolean)): Declare. ! (_getFields): Removed. ! (internalGetFields): New method, from Classpath. ! ! PR libgcj/12656: ! * gnu/gcj/runtime/natFirstThread.cc (call_main): Use ! _Jv_LookupDeclaredMethod, not _Jv_GetMethodLocal. ! ! 2003-10-22 David Daney ! ! * java/awt/geom/QuadCurve2D.java (subdivide): Added documentation. ! java/awt/geom/doc-files/QuadCurve2D-3.png: New illustration. ! ! 2003-10-22 Sascha Brawer ! ! * java/awt/geom/QuadCurve2D.java: Reformatted, wrote Javadoc. ! * java/awt/geom/doc-files: New directory. ! * java/awt/geom/doc-files/QuadCurve2D-1.png, ! java/awt/geom/doc-files/QuadCurve2D-2.png: New illustrations. ! ! 2003-10-22 Sascha Brawer ! ! * java/awt/geom/QuadCurve2D.java (subdivide): Implement. ! ! 2003-10-22 Sascha Brawer ! ! * java/awt/geom/QuadCurve2D.java (getFlatness, getFlatnessSq): Implement. ! ! 2003-10-22 Michael Koch ! ! * java/io/File.java ! (equals): Removed redundant obj == null check. ! (createTempFile): Merged comments from classpath. ! ! 2003-10-21 Sascha Brawer ! ! Fix for bug #2944, reported by David Holmes ! * java/util/logging/ErrorManager.java (everUsed): Made volatile. ! (error): Synchronize on instance, not class. ! ! 2003-10-21 Mark Wielaard ! ! Reported by M.Negovanovic ! * java/beans/Introspector.java (getBeanInfo(ClassLoader, String)): New ! method. ! (reallyFindExplicitBeanInfo): Use new getBeanInfo() method. ! ! 2003-10-21 Sascha Brawer ! ! Fix for Classpath bug #6076. ! * java/awt/geom/GeneralPath.java (append): Re-written. ! ! 2003-10-21 Sascha Brawer ! ! Fix for Classpath bug #6089. ! * java/awt/geom/GeneralPath.java (curveTo): Set correct segment type. ! (getPathIterator, GeneralPathIterator): Re-written from scratch. ! ! 2003-10-21 Sascha Brawer ! ! * java/awt/geom/GeneralPath.java (getCurrentPoint): Return last ! point, not start of subpath. Fixes Classpath bug #6075. ! ! 2003-10-21 Michael Koch ! ! * java/nio/ByteOrder.java, ! java/nio/DirectByteBufferImpl.java, ! java/nio/channels/FileChannelImpl.java: ! Add code to load library with code for native methods if needed. ! ! 2003-10-21 Michael Koch ! ! * gnu/java/net/PlainDatagramSocketImpl.java, ! gnu/java/net/PlainSocketImpl.java, ! gnu/java/net/natPlainDatagramSocketImplPosix.cc, ! gnu/java/net/natPlainDatagramSocketImplWin32.cc, ! gnu/java/net/natPlainSocketImplPosix.cc, ! gnu/java/net/natPlainSocketImplWin32.cc: ! Renamed fnum to native_fd to match classpath more. ! ! 2003-10-21 Jerry Quinn ! ! * posix-threads.cc (_Jv_CondNotify,_Jv_CondNotifyAll): Rename ! _Jv_PthreadCheckMonitor to _Jv_MutexCheckMonitor. ! * include/no-threads.h (_Jv_MutexCheckMonitor): New. ! * include/posix-threads.h (_Jv_MutexCheckMonitor): Rename from ! _Jv_PthreadCheckMonitor. Simplify code. ! (_Jv_MutexUnlock): Use _Jv_MutexCheckMonitor. ! * include/win32-threads.h (_Jv_MutexCheckMonitor): New. ! * java/lang/Object.h (_Jv_ObjectCheckMonitor): Declare. ! * java/lang/Thread.java (holdsLock): New. ! * java/lang/natObject.cc (_Jv_ObjectCheckMonitor): New, with and ! without JV_HASH_SYNCHRONIZATION. ! * java/lang/natThread.cc (java::lang::Thread::holdsLock): New. ! ! 2003-10-20 Michael Koch ! ! * java/text/RuleBasedCollator.java ! (RuleBasedCollator): Check rules not empty, fixed search in already ! existing collation elements. ! (is_special): Removed common whitespace characters. ! (text_argument): Dont return on whitespaces, add characters between ! two ' to string buffer. ! ! 2003-10-18 Michael Koch ! ! * gnu/java/net/protocol/file/Connection.java, ! gnu/java/net/protocol/file/Handler.java, ! gnu/java/net/protocol/http/Connection.java, ! gnu/java/net/protocol/http/Handler.java, ! gnu/java/net/protocol/jar/Connection.java, ! gnu/java/net/protocol/jar/Handler.java: ! Merged copyright text from classpath to make ! it possible to merge the classes. ! ! 2003-10-18 Mark Wielaard ! ! Reported by M.Negovanovic ! * java/beans/IndexedPropertyDescriptor.java ! (IndexedPropertyDescriptor): this.setIndex = setIndex, not getIndex. ! ! 2003-10-17 Mohan Embar ! ! * win32.cc (_Jv_pipe): Implemented. ! * gnu/java/nio/natPipeImpl.cc (nativeInit): Use ! _Jv_pipe instead of ::pipe. ! * include/posix.h (_Jv_pipe): New inline. ! * include/win32.h (_Jv_pipe): New declaration. ! ! 2003-10-17 Ralph Loader ! ! * java/lang/StringBuffer.java (getChars): Fix array index checks. ! (append, substring, insert): Likewise. ! * testsuite/libjava.lang/StringBuffer_overflow.java: New file. ! * testsuite/libjava.lang/StringBuffer_overflow.out: New file. ! ! 2003-10-17 Ralph Loader ! ! * java/lang/natString.cc (getChars): ! Fix validation of array indexes. ! (getBytes, regionMatches, startsWith, valueOf): Likewise. ! * testsuite/libjava.lang/String_overflow.java: New file. ! * testsuite/libjava.lang/String_overflow.out: New file. ! ! 2003-10-17 Ralph Loader ! ! * prims.cc (_Jv_NewObjectArray): Make sure byte size doesn't ! overflow a jint. ! (_Jv_NewPrimArray): Check for overflowing a jint, replacing a ! check for overflowing size_t, since the lower level functions ! take a jint. ! * testsuite/libjava.lang/newarray_overflow.java: New file. ! * testsuite/libjava.lang/newarray_overflow.out: New file. ! ! 2003-10-15 Michael Koch ! ! * java/text/RuleBasedCollator.java ! (RuleBasedCollator): Moved around, documentation added. ! (compare): Documentation added. ! (equals): Likewise. ! (getCollationElementIterator): Likewise. ! (getCollationKey): Likewise. ! (getRules): Likewise. ! (hashCode): Likewise. ! ! 2003-10-15 Michael Koch ! ! * java/text/RuleBasedCollator.java ! (CollationElement): Renamed from RBCElement and moved into ! RuledBasedCollator as inner class. ! ! 2003-10-15 Michael Koch ! ! * java/text/CollationElementIterator.java ! (CollationElementIterator): Moved, documenatation added, call setText. ! (next): Reformated. ! (reset): Reformated. ! (setText): New method. ! (getOffset): New method. ! * java/text/CollationKey.java ! (getSourceString): Reformated. ! (hashCode): Reformated. ! (toByteArray): Reformated. ! ! 2003-10-15 Michael Koch ! ! * java/util/zip/InflaterInputStream.java ! (InflaterInputStream): Renamed infl to inf and bufsize to size, ! added description to exception, check for inf == null and size < 0. ! ! 2003-10-15 Michael Koch ! ! * java/text/AttributedCharacterIterator.java, ! java/text/CharacterIterator.java: Reformated. ! ! 2003-10-15 Michael Koch ! ! * javax/swing/UIDefaults.java (putDefaults): ! Readded accidently removed "public" modifier. ! ! 2003-10-14 Paolo Bonzini ! ! * interpret.cc (_Jv_InterpMethod::run): Don't ! use libffi types, they were meant to be internal. ! * gcj/javaprims.h (_Jv_ulong): New typedef. ! ! 2003-10-13 Tom Tromey ! ! * java/lang/natClassLoader.cc (_Jv_InitNewClassFields): Removed. ! (defineClass): Updated. ! (_Jv_NewClass): Likewise. ! * prims.cc (_Jv_InitPrimClass): Don't call ! _Jv_InitNewClassFields. ! ! 2003-10-13 Taras Glek ! ! PR libgcj/12592 ! * gnu/java/net/protocol/http/Connection.java (connect): Use \r\n, ! not just \n. ! ! 2003-10-13 Michael Koch ! ! * java/io/File.java: Reformated. ! (equals): Check for obj == null. ! ! 2003-10-13 Michael Koch ! ! * java/net/JarURLConnection.java ! (jarFileURL): Added dcoumentation. ! (jarFileURLConnection): Reformated documentation. ! (entryName): Renamed from "element", documentation rewritten. ! (connectionCache): Renamed from "conn_cache", documentation ! reformated. ! (JarURLConnection): Check URL protocol. ! (getEntryName): Use entryName. ! (connect): Use connectionCache. ! (getInputStream): Use entryName, fixed comment. ! (getJarEntry): Use entryName. ! (getHeaders): Use entryName. ! * java/net/URLConnection.java ! (addRequestProperty): Fixed documentation. ! (setDefaultRequestProptery): Added comment that it does nothing since ! JDK 1.3. ! (getDefaultRequestProperty): Likewise. ! ! 2003-10-13 Michael Koch ! ! * java/net/java/net/URLStreamHandlerFactory.java ! (createURLStreamHandler): Removed redundant "public" modifier. ! * java/sql/DatabaseMetaData.java: ! (DatabaseMetaData): Readded accidently removed "public" modifier. ! * java/sql/ParameterMetaData.java: ! (ParameterMetaData): Readded accidently removed "public" modifier. ! * java/sql/PreparedStatement.java: ! (PreparedStatement): Readded accidently removed "public" modifier. ! * java/sql/Ref.java: ! (Ref): Readded accidently removed "public" modifier. ! ! 2003-10-13 Michael Koch ! ! * java/nio/Buffer.java ! (hasRemaining): Made implementation more clear. ! * java/nio/MappedByteBuffer.java ! (loaded): New member variable. ! (force): Added comment. ! (isLoaded): Return value of loaded. ! (load): Set loaded to true, added comment. ! ! 2003-10-12 Michael Koch ! ! * gnu/java/nio/PipeImpl.java ! (SourceChannelImpl): New inner class. ! (SinkChannelImpl): New inner class. ! (sink): New member variable. ! (source): New member variable. ! (PipeImpl): Add SelectorProvider argument, implemented. ! (nativeInit): New method. ! (sink): Return sink channel. ! (source): Return source channel. ! * gnu/java/nio/SelectorProviderImpl.java ! (openPipe): Give provider as argument to PipeImpl constructor. ! * java/nio/channels/spi/SelectorProvider.java ! (pr): Removed. ! (systemDefaultProvider): New member variable. ! (provider): Made it synchronized, use property ! java.nio.channels.spi.SelectorProvider. ! * gnu/java/nio/natPipeImpl.cc: New file. ! * Makefile.am (nat_source_files): Added gnu/java/nio/natPipeImpl.cc. ! * Makefile.in: Regenerated. ! ! 2003-10-12 Michael Koch ! ! * javax/swing/table/DefaultTableModel.java, ! javax/swing/table/TableCellEditor.java, ! javax/swing/table/TableCellRenderer.java, ! javax/swing/table/TableColumnModel.java, ! javax/swing/table/TableModel.java, ! javax/swing/text/AbstractDocument.java, ! javax/swing/text/Document.java, ! javax/swing/text/MutableAttributeSet.java, ! javax/swing/text/StyledDocument.java, ! javax/swing/text/ViewFactory.java, ! javax/swing/tree/DefaultMutableTreeNode.java, ! javax/swing/tree/MutableTreeNode.java, ! javax/swing/tree/RowMapper.java, ! javax/swing/tree/TreeCellEditor.java, ! javax/swing/tree/TreeCellRenderer.java, ! javax/swing/tree/TreeModel.java, ! javax/swing/tree/TreeNode.java, ! javax/swing/tree/TreeSelectionModel.java, ! javax/swing/undo/StateEditable.java, ! javax/swing/undo/UndoableEdit.java: ! Removed redundant modifiers. ! ! 2003-10-12 Michael Koch ! ! * javax/swing/event/AncestorListener.java, ! javax/swing/event/CaretListener.java, ! javax/swing/event/CellEditorListener.java, ! javax/swing/event/ChangeListener.java, ! javax/swing/event/DocumentEvent.java, ! javax/swing/event/DocumentListener.java, ! javax/swing/event/HyperlinkListener.java, ! javax/swing/event/InternalFrameListener.java, ! javax/swing/event/ListDataListener.java, ! javax/swing/event/ListSelectionListener.java, ! javax/swing/event/MenuDragMouseListener.java, ! javax/swing/event/MenuKeyListener.java, ! javax/swing/event/MenuListener.java, ! javax/swing/event/MouseInputListener.java, ! javax/swing/event/PopupMenuListener.java, ! javax/swing/event/TableColumnModelListener.java, ! javax/swing/event/TableModelListener.java, ! javax/swing/event/TreeExpansionListener.java, ! javax/swing/event/TreeModelListener.java, ! javax/swing/event/TreeSelectionListener.java, ! javax/swing/event/TreeWillExpandListener.java, ! javax/swing/event/UndoableEditListener.java, ! javax/swing/plaf/UIResource.java, ! javax/swing/plaf/metal/MetalLookAndFeel.java: ! Removed redundant modifiers. ! ! 2003-10-12 Michael Koch ! ! * javax/swing/Action.java, ! javax/swing/BoundedRangeModel.java, ! javax/swing/CellEditor.java, ! javax/swing/ComboBoxEditor.java, ! javax/swing/ComboBoxModel.java, ! javax/swing/DesktopManager.java, ! javax/swing/JComboBox.java, ! javax/swing/ListCellRenderer.java, ! javax/swing/ListSelectionModel.java, ! javax/swing/MenuElement.java, ! javax/swing/MutableComboBoxModel.java, ! javax/swing/Renderer.java, ! javax/swing/RootPaneContainer.java, ! javax/swing/ScrollPaneConstants.java, ! javax/swing/SingleSelectionModel.java, ! javax/swing/SpinnerModel.java, ! javax/swing/SwingConstants.java, ! javax/swing/UIDefaults.java, ! javax/swing/WindowConstants.java, ! javax/swing/border/Border.java, ! javax/swing/colorchooser/ColorSelectionModel.java: ! Removed redundant modifiers. ! ! 2003-10-11 Michael Koch ! ! * javax/transaction/Status.java, ! javax/transaction/Synchronization.java, ! javax/transaction/Transaction.java, ! javax/transaction/TransactionManager.java, ! javax/transaction/UserTransaction.java, ! javax/transaction/xa/XAResource.java, ! javax/transaction/xa/Xid.java: ! Removing redundant modifiers. ! ! 2003-10-11 Michael Koch ! ! * javax/print/attribute/Attribute.java, ! javax/print/attribute/AttributeSet.java, ! javax/print/attribute/PrintRequestAttributeSet.java: ! Removing redundant modifiers. ! ! 2003-10-11 Michael Koch ! ! * javax/sql/ConnectionEventListener.java, ! javax/sql/ConnectionPoolDataSource.java, ! javax/sql/DataSource.java, ! javax/sql/PooledConnection.java, ! javax/sql/RowSet.java, ! javax/sql/RowSetInternal.java, ! javax/sql/RowSetListener.java, ! javax/sql/RowSetMetaData.java, ! javax/sql/RowSetReader.java, ! javax/sql/RowSetWriter.java, ! javax/sql/XAConnection.java, ! javax/sql/XADataSource.java: ! Removing redundant modifiers. ! ! 2003-10-11 Michael Koch ! ! * javax/naming/Context.java, ! javax/naming/Name.java, ! javax/naming/NameParser.java, ! javax/naming/NamingEnumeration.java, ! javax/naming/Referenceable.java, ! javax/naming/directory/Attribute.java, ! javax/naming/directory/Attributes.java, ! javax/naming/directory/DirContext.java, ! javax/naming/event/EventContext.java, ! javax/naming/event/EventDirContext.java, ! javax/naming/event/NamespaceChangeListener.java, ! javax/naming/event/NamingListener.java, ! javax/naming/event/ObjectChangeListener.java, ! javax/naming/ldap/Control.java, ! javax/naming/ldap/ExtendedRequest.java, ! javax/naming/ldap/ExtendedResponse.java, ! javax/naming/ldap/HasControls.java, ! javax/naming/ldap/LdapContext.java, ! javax/naming/ldap/UnsolicitedNotification.java, ! javax/naming/ldap/UnsolicitedNotificationListener.java, ! javax/naming/spi/DirObjectFactory.java, ! javax/naming/spi/DirStateFactory.java, ! javax/naming/spi/InitialContextFactory.java, ! javax/naming/spi/InitialContextFactoryBuilder.java, ! javax/naming/spi/ObjectFactory.java, ! javax/naming/spi/ObjectFactoryBuilder.java, ! javax/naming/spi/Resolver.java, ! javax/naming/spi/StateFactory.java: ! Removing redundant modifiers. ! ! 2003-10-11 Michael Koch ! ! * java/security/Key.java, ! * java/security/PrivateKey.java, ! * java/security/PublicKey.java, ! * java/security/acl/Acl.java, ! * java/security/acl/AclEntry.java, ! * java/security/acl/Group.java, ! * java/security/acl/Owner.java, ! * java/security/acl/Permission.java, ! * java/security/cert/X509Extension.java, ! * java/security/interfaces/DSAKey.java, ! * java/security/interfaces/DSAKeyPairGenerator.java, ! * java/security/interfaces/DSAParams.java, ! * java/security/interfaces/DSAPrivateKey.java, ! * java/security/interfaces/DSAPublicKey.java, ! * java/security/interfaces/RSAKey.java, ! * java/security/interfaces/RSAPrivateCrtKey.java, ! * java/security/interfaces/RSAPrivateKey.java, ! * java/security/interfaces/RSAPublicKey.java: ! Removed redundant modifiers. ! ! 2003-10-11 Michael Koch ! ! * gnu/java/rmi/server/ProtocolConstants.java, ! gnu/java/security/der/DER.java: ! Removing redundant modifiers. ! ! 2003-10-11 Michael Koch ! ! * java/util/Map.java, ! java/util/Observer.java, ! java/util/zip/Checksum.java, ! java/util/zip/ZipConstants.java: ! Removed redundant modifiers. ! ! 2003-10-11 Michael Koch ! ! * java/text/AttributedCharacterIterator.java, ! java/text/CharacterIterator.java: ! Removed redundant modifiers. ! ! 2003-10-11 Michael Koch ! ! * java/sql/Array.java, ! java/sql/Blob.java, ! java/sql/CallableStatement.java, ! java/sql/Clob.java, ! java/sql/Connection.java, ! java/sql/DatabaseMetaData.java, ! java/sql/Driver.java, ! java/sql/ParameterMetaData.java, ! java/sql/PreparedStatement.java, ! java/sql/Ref.java, ! java/sql/ResultSet.java, ! java/sql/ResultSetMetaData.java, ! java/sql/SQLData.java, ! java/sql/SQLInput.java, ! java/sql/SQLOutput.java, ! java/sql/Savepoint.java, ! java/sql/Statement.java, ! java/sql/Struct.java: ! Removed redundant modifiers. ! ! 2003-10-11 Michael Koch ! ! * java/nio/channels/Channel.java, ! java/nio/channels/GatheringByteChannel.java, ! java/nio/channels/ReadableByteChannel.java, ! java/nio/channels/ScatteringByteChannel.java, ! java/nio/channels/WritableByteChannel.java: ! Removed redundant modifiers. ! ! 2003-10-11 Michael Koch ! ! * java/rmi/activation/ActivationInstantiator.java, ! java/rmi/activation/ActivationMonitor.java, ! java/rmi/activation/ActivationSystem.java, ! java/rmi/activation/Activator.java, ! java/rmi/dgc/DGC.java, ! java/rmi/registry/Registry.java, ! java/rmi/registry/RegistryHandler.java, ! java/rmi/server/LoaderHandler.java, ! java/rmi/server/RMIClientSocketFactory.java, ! java/rmi/server/RMIFailureHandler.java, ! java/rmi/server/RMIServerSocketFactory.java, ! java/rmi/server/RemoteCall.java, ! java/rmi/server/RemoteRef.java, ! java/rmi/server/ServerRef.java, ! java/rmi/server/Skeleton.java, ! java/rmi/server/Unreferenced.java: ! Removed redundant modifiers. ! ! 2003-10-11 Michael Koch ! ! * java/net/ContentHandlerFactory.java, ! java/net/DatagramSocketImplFactory.java, ! java/net/FileNameMap.java, ! java/net/SocketImplFactory.java, ! java/net/SocketOptions.java, ! java/net/URLStreamHandlerFactory.java: ! Removed redundant modifiers. ! ! 2003-10-11 Michael Koch ! ! * java/io/Externalizable.java, ! java/io/FileFilter.java, ! java/io/FilePermission.java, ! java/io/ObjectInput.java, ! java/io/ObjectInputValidation.java, ! java/io/ObjectOutput.java, ! java/io/ObjectStreamClass.java, ! java/io/ObjectStreamConstants.java, ! java/io/Serializable.java: ! Removed redundant modifiers. ! ! 2003-10-11 Ingo Proetel ! ! * java/rmi/server/RMIClassLoader.java: Identify cached classloaders by ! codebase and context classloader. ! ! 2003-10-11 Michael Koch ! ! * java/beans/beancontext/BeanContext.java, ! java/beans/beancontext/BeanContextChild.java, ! java/beans/beancontext/BeanContextChildComponentProxy.java, ! java/beans/beancontext/BeanContextChildSupport.java, ! java/beans/beancontext/BeanContextContainerProxy.java, ! java/beans/beancontext/BeanContextMembershipListener.java, ! java/beans/beancontext/BeanContextProxy.java, ! java/beans/beancontext/BeanContextServiceProvider.java, ! java/beans/beancontext/BeanContextServiceProviderBeanInfo.java, ! java/beans/beancontext/BeanContextServiceRevokedListener.java, ! java/beans/beancontext/BeanContextServices.java, ! java/beans/beancontext/BeanContextServicesListener.java: ! Removed redundant modifiers. ! ! 2003-10-11 Michael Koch ! ! * java/beans/AppletInitializer.java, ! java/beans/BeanInfo.java, ! java/beans/Customizer.java, ! java/beans/DesignMode.java, ! java/beans/PropertyEditor.java, ! java/beans/Visibility.java: ! Removed redundant modifiers. ! ! 2003-10-11 Michael Koch ! ! * java/awt/print/Pageable.java, ! * java/awt/print/Printable.java, ! java/awt/print/PrinterGraphics.java: ! Removed redundant modifiers. ! ! 2003-10-11 Michael Koch ! ! * java/awt/peer/ButtonPeer.java, ! java/awt/peer/CheckboxMenuItemPeer.java, ! java/awt/peer/CheckboxPeer.java, ! java/awt/peer/ChoicePeer.java, ! java/awt/peer/ComponentPeer.java, ! java/awt/peer/ContainerPeer.java, ! java/awt/peer/DialogPeer.java, ! java/awt/peer/FileDialogPeer.java, ! java/awt/peer/FramePeer.java, ! java/awt/peer/LabelPeer.java, ! java/awt/peer/ListPeer.java, ! java/awt/peer/MenuBarPeer.java, ! java/awt/peer/MenuComponentPeer.java, ! java/awt/peer/MenuItemPeer.java, ! java/awt/peer/MenuPeer.java, ! java/awt/peer/PopupMenuPeer.java, ! java/awt/peer/RobotPeer.java, ! java/awt/peer/ScrollPanePeer.java, ! java/awt/peer/ScrollbarPeer.java, ! java/awt/peer/TextAreaPeer.java, ! java/awt/peer/TextComponentPeer.java, ! java/awt/peer/TextFieldPeer.java, ! java/awt/peer/WindowPeer.java: ! Removed redundant modifiers. ! ! 2003-10-11 Michael Koch ! ! * gnu/java/nio/NIOSocket.java (setChannel): Initialize impl. ! * gnu/java/nio/ServerSocketChannelImpl.java ! (serverSocket): Made it a NIOServerSocket. ! (impl): Removed. ! (ServerSocketChannelImpl): Initialize only serverSocket. ! (initServerSocket): Removed. ! (getNativeFD): Rewritten. ! (implConfigureBlocking): Set socket timeout and removed comment. ! (accept): Rewritten. ! * gnu/java/nio/SocketChannelImpl.java ! (impl): New variable. ! (connected): Removed. ! (SocketChannelImpl): Initialize impl too. ! (getImpl): New method. ! (isConnected): Rewritten. ! (read): Rewritten, set position in buffer correctly. ! (write): Set position in buffer correctly. ! * java/net/ServerSocket.java (getImpl): New method. ! * gnu/java/nio/NIOServerSocket.java, ! gnu/java/nio/natNIOServerSocket.cc: New files. ! * gnu/java/nio/natServerSocketChannelImpl.cc: Removed. ! * Makefile.am ! (ordinary_java_source_files): ! Added gnu/java/nio/NIOServerSocket.java. ! (nat_source_files): ! Removed gnu/java/nio/natServerSocketChannelImpl.cc ! and added gnu/java/nio/natNIOServerSocket.cc. ! * Makefile.in: Regenerated. ! ! 2003-10-11 Michael Koch ! ! * java/awt/ActiveEvent.java, ! java/awt/datatransfer/ClipboardOwner.java, ! java/awt/datatransfer/FlavorMap.java, ! java/awt/datatransfer/Transferable.java, ! java/awt/dnd/Autoscroll.java, ! java/awt/dnd/peer/DragSourceContextPeer.java, ! java/awt/dnd/peer/DropTargetContextPeer.java, ! java/awt/dnd/peer/DropTargetPeer.java, ! java/awt/font/MultipleMaster.java, ! java/awt/font/OpenType.java, ! java/awt/im/spi/InputMethodDescriptor.java, ! java/awt/image/ImageObserver.java, ! java/awt/image/ImageConsumer.java, ! java/awt/image/ImageProducer.java, ! java/awt/image/RGBImageFilter.java, ! java/awt/image/RasterOp.java, ! java/awt/image/renderable/RenderableImage.java: ! Removed redundant modifiers. ! ! 2003-10-11 Michael Koch ! ! * gnu/awt/j2d/DirectRasterGraphics.java, ! gnu/java/awt/EmbeddedWindowSupport.java: ! Removed redundant modifiers. ! ! 2003-10-09 Michael Koch ! ! * gnu/java/nio/SelectorImpl.java (register): ! Use ServerSocketChannelSelectionKey for server socket channels, ! removed unneeded comments. ! * gnu/java/nio/ServerSocketChannelImpl.java ! (ServerSocketChannelImpl): Made class public final. ! (impl): New member variable. ! (ServerSocketChannelImpl): Initialize member variables correctly. ! (initServerSocket): New method. ! (getNativeFD): Likewise. ! * gnu/java/nio/ServerSocketChannelSelectionKey.java, ! gnu/java/nio/natServerSocketChannelImpl.cc: New files. ! * Makefile.am (ordinary_java_source_files): ! Added gnu/java/nio/ServerSocketChannelSelectionKey.java. ! (nat_source_files): Added gnu/java/nio/natServerSocketChannelImpl.cc. ! * Makefile.in: Regenrated. ! ! 2003-10-09 Michael Koch ! ! * java/nio/channels/spi/AbstractSelectableChannel.java ! (registered): Made private. ! (blocking): Likewise. ! (LOCK): Likewise. ! (provider): Likewise. ! (keys): Made it a private LinkedList. ! (AbstractSelectableChannel): Initialize keys. ! (isRegistered): New implementation. ! (locate): Rewritten. ! (register): Rewritten. ! * java/nio/channels/spi/AbstractSelectionKey.java ! (ok): Removed. ! (cancelled): New member variable. ! (cancel): Rewritten. ! (isValid): Rewritten. ! * java/nio/channels/spi/AbstractSelector.java: ! Some methods moved. ! (closed): Make private. ! (provider): Likewise. ! (cancelledKeys): New member variable. ! (AbstractSelector): Initialize cancelledKeys. ! (cancelKey): New method. ! ! 2003-10-09 Tom Tromey ! ! * java/lang/ClassLoader.java (setSigners): Implemented. ! * boehm.cc (_Jv_MarkObj): Mark `signers' field. ! * java/lang/natClassLoader.cc (_Jv_InitNewClassFields): ! Initialize new fields. ! * java/lang/Class.java (getSigners): Now native. ! (setSigners): Declare. ! * java/lang/natClass.cc (getSigners): New method. ! (getSigners): Likewise. ! * java/lang/Class.h (Class::signers): New field. ! (Class::setSigners): New method. ! ! 2003-10-09 Michael Koch ! ! * java/rmi/server/RMIClassLoader.java: ! Removed unused imports, little reformatings. ! (getClassLoader): New method, implementation was part of old loadCLass ! method. ! (loadClass): Simplified by moving functionality to new method and ! reworking the code a bit. ! (getClassAnnotation): Merged documentation from classpath. ! ! 2003-10-09 Michael Koch ! ! * java/math/BigInteger.java ! (add): Removed unused local variable len. ! ! 2003-10-08 Thomas Fitzsimmons ! ! * gnu/java/awt/peer/gtk/GtkButtonPeer.java (handleEvent): Remove ! modality check. ! * gnu/java/awt/peer/gtk/GtkDialogPeer.java (initializeInsets): ! Initialize insets to use latest insets. ! * gnu/java/awt/peer/gtk/GtkFramePeer.java: Likewise. ! * gnu/java/awt/peer/gtk/GtkWindowPeer.java (latestInsets): New ! field. ! (postConfigureEvent): Update latestInsets field when insets ! change. Remove call to setSize. Move validate call outside of ! if blocks. ! (setVisible): Call setBounds before showing window. ! (nativeSetVisible): New native method. ! * java/awt/Window.java (show): Show visible owned windows. ! (hide): Hide visible owned windows. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c ! (awt_event_handler): Implement modality using GTK grabs. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c ! (global_gtk_window_group): New global variable. ! (gtkInit): Initialize global_gtk_window_group. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c (create): ! Clamp width and height values to at least 1. Add this window to ! the global GTK window group. ! (setVisible): Rename to nativeSetVisible. ! (setup_window): Remove function. ! (setSize): Clamp width and height values to at least 1. ! (nativeSetBounds): Likewise. ! (gdk_window_get_root_geometry): Remove function. ! * jni/gtk-peer/gtkpeer.h: Remove gdk_window_get_root_geometry ! and setup_window declarations. Declare global_gtk_window_group. ! ! * gnu/java/awt/peer/gtk/GtkButtonPeer.java, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c ! (gtkSetFont): Handle BOLD and ITALIC style specifiers. ! (gtkWidgetSetForeground): New method. ! * gnu/java/awt/peer/gtk/GtkComponentPeer.java, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c ! (gtkWidgetSetBackground, gtkWidgetSetForeground): New methods. ! (setBackground, setForeground): Implement. ! * gnu/java/awt/peer/gtk/GtkTextAreaPeer.java, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c ! (gtkSetFont): Handle BOLD and ITALIC style specifiers. ! * gnu/java/awt/peer/gtk/GtkTextFieldPeer.java, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c: Likewise. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c (drawString): ! Position PangoLayout relative to text's baseline. ! * jni/gtk-peer/gtkpeer.h: Define AWT font style constants. ! ! * java/awt/FlowLayout.java (layoutContainer): Fix offset problem ! for CENTER and RIGHT alignments. ! ! 2003-10-08 Michael Koch ! ! * java/security/Security.java: Reformated. ! ! 2003-10-08 Michael Koch ! ! * java/text/SimpleDateFormat.java ! (compileFormat): Replace Character.isLetter() test with ! Character.isLowerCase() || Character.isUpperCase(). ! ! 2003-10-08 Tom Tromey ! ! * java/lang/StrictMath.java (toDegrees): Multiply before ! dividing. ! (toRadians): Likewise. ! ! 2003-10-08 C. Brian Jones ! ! * java/lang/Math.java ! (toRadians): multiply before dividing to reduce decimal error ! (toDegrees): ditto ! ! 2003-10-08 Michael Koch ! ! * gnu/gcj/protocol/core/Connection.java, ! gnu/gcj/protocol/core/CoreInputStream.java, ! gnu/gcj/protocol/core/Handler.java, ! gnu/gcj/protocol/core/natCoreInputStream.cc, ! gnu/gcj/protocol/file/Connection.java, ! gnu/gcj/protocol/file/Handler.java, ! gnu/gcj/protocol/gcjlib/Connection.java, ! gnu/gcj/protocol/gcjlib/Handler.java, ! gnu/gcj/protocol/http/Connection.java, ! gnu/gcj/protocol/http/Handler.java, ! gnu/gcj/protocol/jar/Connection.java, ! gnu/gcj/protocol/jar/Handler.java: Moved to gnu/java/net/protocol. ! * gnu/java/net/protocol/core/Connection.java, ! gnu/java/net/protocol/core/CoreInputStream.java, ! gnu/java/net/protocol/core/Handler.java, ! gnu/java/net/protocol/core/natCoreInputStream.cc, ! gnu/java/net/protocol/file/Connection.java, ! gnu/java/net/protocol/file/Handler.java, ! gnu/java/net/protocol/gcjlib/Connection.java, ! gnu/java/net/protocol/gcjlib/Handler.java, ! gnu/java/net/protocol/http/Connection.java, ! gnu/java/net/protocol/http/Handler.java, ! gnu/java/net/protocol/jar/Connection.java, ! gnu/java/net/protocol/jar/Handler.java: Moved from gnu/gcj/protocol. ! * gnu/gcj/runtime/FirstThread.java, ! java/net/URL.java: Use moved protocol handlers. ! * Makefile.am ! (ordinary_java_source_files): Moved files. ! (nat_source_files): Likewise. ! * Makefile.in: Regenerated. ! ! 2003-10-08 Michael Koch ! ! * gnu/java/nio/SocketChannelImpl.java ! (read): Write only read data to buffer. ! ! 2003-10-08 Thomas Fitzsimmons ! ! * gnu/java/awt/peer/gtk/GtkMenuItemPeer.java (setEnabled): Stub ! out. ! * jni/classpath/jcl.c [!__GNUC__]: Elide __attribute__. ! (JCL_free): Attach "unused" attribute to env parameter. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImagePainter.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c, ! jni/gtk-peer/gthread-jni.c: Attach "unused" attribute to unused ! parameters. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c: ! (initNativeState): Pass 0 as info argument to ! gtk_selection_add_target. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c: ! (setVisible, gtkFixedNew, gtkFixedPut, gtkFixedMove): Remove ! unused method implementations. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c ! (awt_event_handler): Add break statement after default label. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImagePainter.c ! (drawPixels): Remove unused variable i. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.c ! (setEnabled): Remove method implementation. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c ! (accel_attach): Call _gtk_accel_group_attach with G_OBJECT ! argument. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPanelPeer.c (sr): Remove ! unused function. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c ! (menu_pos): Assign TRUE to push_in. ! (setupAccelGroup): Call _gtk_accel_group_attach with G_OBJECT ! argument. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.c ! (create): Remove unused variable layout. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c (create): ! Pass window_widget, rather than window, to ! gtk_widget_set_size_request. ! * jni/gtk-peer/gthread-jni.c (g_thread_jni_functions): Fill out ! structure initialization with NULL values. ! * jni/gtk-peer/gtkpeer.h [!__GNUC__]: Elide __attribute__. ! ! 2003-10-08 Michael Koch ! ! * java/util/LinkedList.java: ! Removed whitespace to match classpath's version again. ! ! 2003-10-08 Michael Koch ! ! * java/util/prefs/Preferences.java ! (defaultFactoryClass): Fixed class name. ! (getFactory): Create instance of class returned by Class.forName(), ! reformated code. ! ! 2003-10-08 Arnaud Vandyck ! ! * javax/swing/table/AbstractTableModel.java ! (getColumnName): Simplified code much. Thanks to Yannick Boogaerts who ! helped stop pulling my hair on this +1 then -1 tricky thing! ! ! 2003-10-07 Thomas Fitzsimmons ! ! * gnu/java/awt/peer/gtk/GtkTextAreaPeer.java (gtkTextGetSize): ! Remove unused parameters. ! * gnu/java/awt/peer/gtk/GtkTextFieldPeer.java (gtkEntryGetSize): ! Likewise. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c ! (keyevent_state_to_awt_mods): Export function. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c ! (getCaretPosition): Fix TextArea case. ! (textcomponent_commit_cb): Get exact event time and modifier ! state. ! * jni/gtk-peer/gtkpeer.h: Declare keyevent_state_to_awt_mods. ! ! 2003-10-02 Guilhem Lavaux ! ! * java/net/InetSocketAddress.java ! (InetSocketAddress): Made exception more clear. ! (equals): Handle case when addr is null. ! (toString): Likewise. ! * java/net/NetworkInterface.java ! (static): Load native library. ! (getNetworkInterfaces): Rewritten. ! ! 2003-10-02 Thomas Fitzsimmons ! ! * gnu/java/awt/peer/gtk/GtkComponentPeer.java (insets): New ! field. ! (initializeInsets): New method. ! (GtkComponentPeer): Call initializeInsets. Call setCursor and ! setBounds unconditionally. ! (setBounds): Convert coordinates if parent is a Window. ! * gnu/java/awt/peer/gtk/GtkContainerPeer.java (insets): Move ! field to GtkComponentPeer. ! (GtkContainerPeer): Don't initialize insets. ! * gnu/java/awt/peer/gtk/GtkDialogPeer.java (initializeInsets): ! New method. ! (create): Call new GtkWindowPeer create method. ! * gnu/java/awt/peer/gtk/GtkFramePeer.java (initializeInsets): ! New method. ! (create): Call new GtkWindowPeer create method. ! (setBounds): Remove method. ! (postConfigureEvent): Likewise. ! * gnu/java/awt/peer/gtk/GtkWindowPeer.java: Replace GTK window ! type constants with GDK window type constants. ! (create(int,boolean,int,int,GtkWindowPeer)): New method. ! (create(int,boolean)): Likewise. ! (create()): Call create(int,boolean). ! (nativeSetBounds): New native method declaration. ! (setBounds): Call native method declaration. ! (setSize): New native method declaration. ! (setBoundsCallback): Likewise. ! (postConfigureEvent): Handle change in insets. Call setSize and ! setBoundsCallback methods. ! * java/awt/Window.java (Window): Set visible to false. ! (setBoundsCallback): New method. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c ! (gtkWidgetGetLocationOnScreen): If this component is not a ! container, adjust the location returned based on the peer's ! allocation. ! (set(String,boolean)): Revert change from 2003-09-19. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c ! (awt_event_handler): Fix inset calculation. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c: Add JNI ! glue for Window.setBoundsCallback. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c (create): ! Set up stacking order, window decorations and window manager ! hints. ! (setBoundsCallback): New method. ! (setSize): New method. ! (nativeSetBounds): New method. ! * jni/gtk-peer/gtkpeer.h: Declare setBoundsCallbackID. ! ! 2003-10-02 Tom Tromey ! ! * java/lang/VMClassLoader.java (loadClass): Now native. ! * java/lang/natClassLoader.cc (loadClass): Implement. ! * prims.cc (_Jv_RunMain): Initialize ClassLoader. ! ! 2003-10-02 Michael Koch ! ! * java/net/InetAddress.java ! (zeros): Removed. ! (ANY_IF): Initalizie in static block. ! (static): Load library with native methods here and initialize ANY_IF. ! (isAnyLocalAddress): Check if equal to ANY_IF. ! (equals): Use addr directly instead of addr1. Simplify for loop. ! (toString): Rename "result" to "host" and add IP address allways. ! (getLocalHost): Merged documentation from classpath. ! * java/net/ServerSocket.java ! (ServerSocket): New package-private constructor used by java.nio. ! * java/net/URLConnection.java ! (getRequestProperties): Check if already connected. ! ! 2003-10-02 Michael Koch ! ! * java/nio/ByteBufferHelper.java: ! Rewrote all methods by suggestions from Eric Blake. ! ! 2003-10-02 Michael Koch ! ! * java/net/URL.java ! (DEFAULT_SEARCH_PATH): New static variable. ! (ph_cache): Made it a HashMap. ! (getURLStreamHandler): Rename propVal to ph_search_path and use ! DEFAULT_SEARCH_PATH. ! ! 2003-10-02 Michael Koch ! ! * javax/swing/table/AbstractTableModel.java ! (findColumnName): Prevent from NullPointerException if argument ! columnName is null. ! ! 2003-10-02 Michael Koch ! ! * javax/swing/table/AbstractTableModel.java: ! This patch is based on a patch done by Arnaud Vandyck ! . ! (getColumnName): Fixed method documentation. ! (findColumn): Likewise. ! (getColumnClass): Likewise. ! (isCellEditable): Likewise. ! (setValueAt): Likewise. ! (addTableModelListener): Likewise. ! (removeTableModelListener): Likewise. ! (getTableModelListeners): New method. ! ! 2003-10-02 Michael Koch ! ! * javax/swing/table/AbstractTableModel.java: ! Reformated. ! ! 2003-10-01 Bryce McKinlay ! ! Fix PR libgcj/12475 ! * gnu/gcj/runtime/StackTrace.java (finalize): Declare. ! * gnu/gcj/runtime/natStackTrace.cc (finalize): New. Free "addrs". ! ! 2003-10-01 Tom Tromey ! ! * gnu/gcj/runtime/FirstThread.java (getMain): Fixed indentation. ! ! 2003-10-01 Andrew Haley ! ! * java/lang/natClass.cc (initializeClass): Check for otable and ! atable. ! (_Jv_LinkOffsetTable): Check for existence of atable. Rewrite ! loops using for(). Search superinterfaces. Check for fields as ! well as methods. Initialize atable as well as otable: check for ! static methods as well as virtual methods. ! * java/lang/Class.h (struct _Jv_AddressTable): New. ! (atable): New. ! (atable_syms): New. ! * include/jvm.h (_Jv_equalUtf8Consts): constify. ! * prims.cc (_Jv_equalUtf8Consts): constify. ! ! 2003-09-29 Tom Tromey ! ! PR libgcj/10596: ! * include/jvm.h (_Jv_FinalizeString, ! _Jv_RegisterStringFinalizer): Declare. ! * java/lang/natString.cc (_Jv_FinalizeString): Renamed from ! unintern. ! (intern): Updated. ! (_Jv_NewStringUtf8Const): Likewise. ! * java/lang/ref/natReference.cc (finalize_referred_to_object): ! Add special case when finalizing a String. ! (in_hash): New function. ! (_Jv_RegisterStringFinalizer): Likewise. ! (maybe_add_finalize): Likewise. ! ! 2003-09-29 Michael Koch ! ! * java/net/InetAddress.java: ! (isMulticastAddress): Dont use local variable to store address length. ! Let the compiler optimize this. ! (getHostName): Merged dcoumentation from classpath. ! (getAddress): Likewise. ! (getHostAddress): Likewise. ! (hashCode): Likewise. ! (equals): Likewise. ! (toString): Likewise. ! (getByName): Likewise. ! (getAllByName): Likewise. ! ! 2003-09-29 Michael Koch ! ! * java/awt/image/IndexColorModel.java: Reformated. ! ! 2003-09-29 Michael Koch ! ! * java/net/InetAddress.java, ! java/net/URL.java: Reformated. ! ! 2003-09-29 Bryce McKinlay ! ! * boehm.cc (_Jv_BuildGCDescr): Put first word of object in most ! significant bit of descriptor. Include the vtable and sync_info ! fields. ! ! 2003-09-28 Bryce McKinlay ! ! * java/text/DateFormat.java (format): Throw IllegalArgumentException ! if `obj' is not a Number or Date instance. ! * java/text/SimpleDateFormat.java (tokens): Make it an ArrayList ! instead of Vector. ! ! 2003-09-28 Bryce McKinlay ! ! * java/text/SimpleDateFormat.java (parse): Revert patch of 2003-09-25. ! Don't call setTimeZone on calendar. ! ! 2003-09-27 Michael Koch ! ! * java/net/URL.java (getURLStreamHandler): Compile fixes. ! ! 2003-09-27 Michael Koch ! ! * java/net/URL.java (getURLStreamHandler): ! Check if we have to use cache before trying to retrieve handler from ! cache. Rename facName to clsName to match classpath more. Reformated ! some little pieces. ! ! 2003-09-27 Michael Koch ! ! * gnu/java/nio/SelectionKeyImpl.java ! (ch): Make package-private again. Jikes found this bug. ! Jeff Sturm submitted PR12426 for this to bugzilla ! to fix this bug in gcj. ! ! 2003-09-26 Michael Koch ! ! * java/rmi/server/RMIClassLoader.java: ! Reformatted file, no functional code changes. ! ! 2003-09-26 Sascha Brawer ! ! * java/awt/image/SinglePixelPackedSampleModel.java (createDataBuffer): ! Save space for some pixels at the buffer end. Added Javadoc. ! ! 2003-09-26 Tom Tromey ! ! * java/io/ObjectOutputStream.java (writeFields): Fixed ! indentation. ! (putFields): Likewise. ! ! 2003-09-26 Michael Koch ! ! * java/nio/ByteBufferHelper.java: ! Totally reworked with help from Eric Blake. ! ! 2003-09-26 Tom Tromey ! ! * java/awt/geom/RoundRectangle2D.java (getPathIterator): Wrote. ! * java/awt/geom/PathIterator.java: Documentation fixes. ! ! 2003-09-25 Jeff Sturm ! ! * gnu/java/nio/SelectorImpl.java (getFDsAsArray): Use getNativeFD(). ! (select): Likewise. ! (register): Use DatagramChannelSelectionKey, SocketChannelSelectionKey. ! ! 2003-09-25 Michael Koch ! ! * gnu/java/nio/DatagramChannelImpl.java ! (getNativeFD): New method. ! * gnu/java/nio/SelectionKeyImpl.java ! (SelectionKeyImpl): Class made abstract. ! (fd): Removed. ! (SelectionKeyImpl): Remove fd argument. ! (getNativeFD): New method. ! * gnu/java/nio/SocketChannelImpl.java ! (getNativeFD): New method. ! gnu/java/nio/DatagramChannelSelectionKey.java, ! * gnu/java/nio/SocketChannelSelectionKey.java: ! New files. ! * Makefile.am (ordinary_java_source_files): ! Added new files gnu/java/nio/DatagramChannelSelectionKey.java and ! gnu/java/nio/SocketChannelSelectionKey.java. ! * Makefile.in: Regenerated. ! ! 2003-09-25 Michael Koch ! ! * java/lang/reflect/Proxy.java ! (getProxyClass): Remove workaround for gcj 3.0.x. ! ! 2003-09-25 Michael Koch ! ! * gnu/java/net/PlainDatagramSocketImpl.java ! (finalize): Moved to directly after constructor. ! (getNativeFD): New method. ! * gnu/java/net/PlainSocketImpl.java ! (getNativeFD): New method. ! ! 2003-09-25 Ingo Proetel ! ! * java/io/ObjectOutputStream.java: ! Allow putFields be called more than once. ! ! 2003-09-25 Sascha Brawer ! ! * java/awt/image/Raster.java(Raster): Interpret null origin as (0,0). ! * java/awt/image/WritableRaster.java(WritableRaster): Likewise. ! * java/awt/image/BufferedImage.java (toString): Implement. ! ! 2003-09-25 Jeff Sturm ! ! * aclocal.m4: Rebuilt. ! * configure: Rebuilt. ! ! 2003-09-25 Guilhem Lavaux ! ! * java/text/SimpleDateFormat.java (parse): Don't use class calendar ! field. ! ! 2003-09-25 Michael Koch ! ! * gnu/java/nio/SelectorImpl.java ! (implSelect): Renamed from java_do_select. ! (select): Call native implSelect() and add support for Thread ! interruption. ! * gnu/java/nio/natSelectorImpl.cc ! (implSelect): Renamed from java_do_select. ! ! 2003-09-25 Michael Koch ! ! * gnu/java/nio/SelectorImpl.java ! (selectNow): Made final, throws IOException. ! (select): Likewise. ! (getFDsAsArray): Made final. ! (selectedKeys): Likewise. ! (wakeup): Likewise. ! (deregisterCancelledKeys): Likewise. ! (register): Likewise. ! (ass): Removed. ! (add_selected): Removed. ! * gnu/java/nio/natSelectorImpl.cc: ! No need to include bstring.h or gcj/cni.h. ! (helper_put_filedescriptors): Rewritten. ! (helper_get_filedescriptors): Rewritten. ! ! 2003-09-25 Sascha Brawer ! ! * java/awt/font/FontRenderContext.java (getTransform): Return ! copy of internal transform object. Add Javadoc. ! * java/awt/geom/Rectangle2D.java (getPathIterator): Use the same ! winding rule as Sun J2SE. ! * javax/swing/border/MatteBorder.java (MatteBorder(Icon)): Docfix. ! ! 2003-09-25 Ingo Proetel ! ! * java/rmi/Naming.java: ! Added comments, now accepts pseudo protocol "rmi". ! ! 2003-09-25 Guilhem Lavaux ! ! * java/text/DecimalFormat.java (format): Don't immediatly round ! baseNumber to long. ! (setMinimumIntegerDigits): Call super. ! (setMinimumFractionDigits): Likewise. ! (setMaximumIntegerDigits): Likewise. ! (setMaximumFractionDigits): Likewise. ! ! 2003-09-25 Michael Koch ! ! * gnu/java/nio/DatagramChannelImpl.java ! (DatagramChannelImpl): Made class final. ! (blocking): Made private. ! (socket): Made it a NIODatagramSocket and private. ! (DatagramChannelImpl): create NIODatagramSocket instead of ! DatagramSocket. ! (implConfigureBlocking): Set socket timeout. ! (connect): Check that channel is not closed. ! (write): Implemented. ! (write): Rewritten. ! (read): Implemented. ! (read): Rewritten. ! (receive): Implemented. ! (send): Implemented. ! * gnu/java/nio/SelectionKeyImpl.java ! (readyOps): Made private. ! (interestOps): Made private. ! (impl): Made private. ! (ch): Made private. ! (readyOps): Check if selection key is valid. ! (interestOps): Likewise. ! * gnu/java/nio/SelectorImpl.java ! (closed): Removed. ! (keys): Made private. ! (selected): Made private. ! (finalize): New method. ! (implCloseSelector): Rewritten. ! (keys): Return unmodifiable Set. ! (deregisterCancelledKeys): Fixed typo in method name. ! * gnu/java/nio/SocketChannelImpl.java ! (SocketChannelImpl): Made class final. ! (socket): Made it a NIOSocket and private. ! (blocking): Made private. ! (connected): Made private. ! (connectionPending): New member variable. ! (SocketChannelImpl): New implementation. ! (finalizer): Use isConnected(). ! (connect): Rewritten. ! (finishConnect): Throws IOException, implemented. ! (isConnectionPending): Return connectionPending. ! (read): Rewritten. ! (write): Rewritten. ! * gnu/java/nio/NIOConstants.java: New file. ! * Makefile.am (ordinary_java_source_files): ! Added gnu/java/nio/NIOConstants.java. ! * Makefile.in: Regenerated. ! ! 2003-09-25 Michael Koch ! ! * java/net/InetAddress.java: ! Reorder imports, remove implementation comment. ! (isMulticastAddress): Merged documentation from classpath. ! * java/net/URLConnection.java ! (setRequestProperty): Check key for null, fix documentation. ! (adREquestProperty): Check key for null, remove wrong implementation ! and replace it with comment to overwrite this method in subclasses, ! fix documentation. ! ! 2003-09-25 Tom Tromey ! ! * java/lang/reflect/Proxy.java (generate): Uncomment protection ! domain code. ! * java/lang/natClassLoader.cc (defineClass): Added `loader' ! argument. ! (linkClass0): Now in VMClassLoader. ! (markClassErrorState0): Likewise. ! (getSystemClassLoaderInternal): New method. ! * java/lang/natClass.cc (initializeClass): Use ! VMClassLoader::resolveClass. ! * java/lang/ClassLoader.java: New version, from Classpath. ! * java/lang/Class.java (getProtectionDomain): ! protectionDomainPermission and unknownProtectionDomain now in ! VMClassLoader. ! * java/lang/Class.h: VMClassLoader now a friend class. ! * gnu/gcj/runtime/VMClassLoader.java (instance): Now ! package-private. ! * gcj/javaprims.h: Regenerated class list. ! * resolve.cc (_Jv_PrepareClass): Use VMClassLoader::resolveClass. ! * java/lang/VMClassLoader.java: New version from Classpath; ! modified for libgcj use. ! ! 2003-09-25 Michael Koch ! ! * java/nio/ByteBufferHelper.java: ! New file. ! * java/nio/ByteBufferImpl.java, ! java/nio/DirectByteBufferImpl.java, ! java/nio/MappedByteBufferImpl.java ! (getType,putType): Use new helper class ByteBufferHelper. ! * Makefile.am (ordinary_java_source_files): ! Added java/nio/ByteBufferHelper.java. ! * Makefile.in: Regenerated. ! ! 2003-09-25 Bryce McKinlay ! ! * gnu/java/net/natPlainSocketImplWin32.cc: Add missing #includes. ! PR libgcj/12388. ! ! 2003-09-24 Bryce McKinlay ! ! * java/lang/StringBuffer.java (substring): Don't set `shared' on small ! Strings, even if buffer is already shared. ! ! 2003-09-24 Michael Koch ! ! * acinclude.m4 (AM_LC_LOCALES): Added check for locale.h. ! ! 2003-09-24 Bryce McKinlay ! ! * gnu/java/net/PlainSocketImpl.java (read): Remove declaration. ! (write): Likewise. ! (SocketInputStream): Declare `read' and `write' methods native. ! Remove implementations which called back into PlainSocketImpl. ! Remove unneccessary overridden methods. ! * gnu/java/net/natPlainSocketImplNoNet.cc (read): Move implementation ! to inner class PlainSocketImpl.SocketInputStream. ! (write): Likewise. ! * gnu/java/net/natPlainSocketImplPosix.cc: As above. ! * gnu/java/net/natPlainSocketImplWin32.cc: As above. ! * gnu/java/net/SocketInputStream.java: Remove unused file. ! * gnu/java/net/SocketOutputStream.java: Likewise. ! * Makefile.am: Build CNI headers for PlainSocketImpl.SocketInputStream ! and SocketOutputStream. ! * Makefile.in: Rebuilt. ! ! 2003-09-23 Nathanael Nerode ! ! * java/lang/System.java: Add GCJ LOCAL note about encoding aliases. ! ! * java/lang/Float.java, java/lang/Double.java: Add GCJ LOCAL ! markers. ! ! 2003-09-22 Anthony Green ! ! * configure.in (HAVE_USLEEP_DECL): Define for newlib build. ! * configure: Rebuilt. ! ! 2003-09-21 Ralph Loader ! ! PR java/12350: ! * java/lang/StringBuffer.java (substring): Fix handling of shared flag. ! ! 2003-09-22 Michael Koch ! ! * jni.cc (_Jv_LookupJNIMethod): Remove workaround that should hide a ! compiler warning but produces a different one now. ! ! 2003-09-22 Michael Koch ! ! * java/net/InetAddress.java: ! Moves around some code, reformats and adds documentation. ! No functional changes. ! ! 2003-09-22 Michael Koch ! ! * java/net/JarURLConnection.java ! (JarURLConnection): Modifed code to match classpath more, fixed comment. ! (getCertificates): Made it more error prone. ! (getMainAttributes): Likewise. ! (getAttributes): Implemented. ! (getManifest): Reformatted code. ! ! 2003-09-20 Tom Tromey ! ! * java/awt/Component.java: Indentation cleanup from Classpath. ! ! 2003-09-20 Dalibor Topic ! ! * java/awt/BasicStroke.java (BasicStroke): Fixed illegal argument ! checking to follow 1.4.2 spec. ! ! 2003-08-11 Ingo Proetel ! ! * gnu/java/rmi/server/UnicastRef.java: make constructor public and check if serverobject ! is compatible in case client and server are running in the same VM ! (remerged from Classpath on 2003-09-20) ! ! 2003-09-19 David Daney ! ! * java/lang/ref/Reference.java (clear): Set referent to null and ! synchronize. ! ! 2003-09-19 Michael Koch ! ! * gnu/java/nio/NIODatagramSocket.java, ! gnu/java/nio/NIOSocket.java: New files. ! * Makefile.am (ordinary_java_source_files): ! Added gnu/java/nio/NIODatagramSocket.java and ! gnu/java/nio/NIOSocket.java. ! * Makefile.in: Regenerated. ! ! 2003-09-19 Thomas Fitzsimmons ! ! * gnu/java/awt/peer/gtk/GtkDialogPeer.java (create()): Create a ! top-level GTK window. ! (getArgs): Add "title" property. ! * gnu/java/awt/peer/gtk/GtkWindowPeer.java (setResizable): Use ! "allow_shrink" and "allow_grow" properties. ! * java/awt/Dialog.java: Initialize resizable to true and change ! comments accordingly. Initialize visible to false in ! constructors. ! * java/awt/Frame.java (dispose): Remove method. ! * java/awt/Window.java (ownedWindows): New field. ! (Window(Window,GraphicsConfiguration)): Add a weak reference to ! owner's ownedWindows vector. ! (finalize): Remove method. ! (hide): Hide owned windows. ! (dispose): Dispose of owned windows. ! (getOwnedWindows): Implement. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c: Remove ! unused GtkArg code. ! (set(String,boolean)): Clamp gboolean parameter to g_object_set ! to TRUE or FALSE. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c ! (create): Set window's size requisition. ! (connectHooks): Fix indentation. ! (setResizable): Remove function. ! (static setBounds): Likewise. ! (setBounds): Replace call to setBounds with GTK size requisition ! and resize calls. ! ! 2003-09-19 Mohan Embar ! ! * win32-threads.cc: (ensure_interrupt_event_initialized) New ! function for lazy initialization of an auto-reset event. ! (_Jv_CondWait) Added thread interrupt support. ! (_Jv_ThreadInitData) Added initialization of interrupt support ! members. ! (_Jv_ThreadDestroyData) Added cleanup of interrupt support members. ! (_Jv_ThreadStart) Removed unused code. ! (_Jv_Win32GetInterruptEvent) New method for returning interrupt event ! to an external caller. ! (_Jv_ThreadInterrupt) Implemented. ! * include/win32-threads.h: (_Jv_Thread_t) Added a Win32 auto-reset ! event for interrupt support as well as a mutex which regulates ! access to this. ! (_Jv_Win32GetInterruptEvent) Declared new method for returning interrupt ! event to an external caller. ! * java/lang/natWin32Process.cc: (cleanup) Close handle to spawned ! process. ! (waitFor) Added interrupt support. ! ! 2003-09-19 Michael Koch ! ! * java/net/DatagramSocket.java (getLocalAddress): ! Renamed result variable to localAddr. ! * java/net/MulticastSocket.java: ! No need to import gnu.java.net.PlainDatagramSocketImpl. ! ! 2003-09-18 Sascha Brawer ! ! * java/awt/Toolkit.java (getSystemEventQueue, getSystemEventQueueImpl): ! Replace UTF-8 characters in Javadoc by XML/HTML escape sequence. ! ! 2003-09-18 Tom Tromey ! ! * javax/naming/InitialContext.java: Reindented. ! ! 2003-09-18 Dalibor Topic , ! Helmer Kraemer ! ! * javax/naming/spi/NamingManager.java (getURLContext, ! getObjectInstance, getStateToBind): Always use current thread's ! context class loader when calling Class.forName. ! ! 2003-09-18 Michael Koch ! ! * java/util/Timer.java (finalize): Added "throws Throwable". ! ! 2003-09-18 Michael Koch ! ! * java/net/DatagramSocket.java ! (ch): Removed. ! (receive): Use getChannel() instead of ch. ! (send): Likewise. ! (getChannel): Return null. ! * java/net/ServerSocket.java ! (ch): Removed. ! (setChannel): Removed. ! (implAccept): Use getChannel() instead of ch. ! (close): Likewise. ! (getChannel): Return null. ! * java/net/Socket.java ! (ch): Removed. ! (connect): Use getChannel() instead of ch. ! (setChannel): Removed. ! (getChannel): Return null. ! ! 2003-09-18 Mark Wielaard ! ! Reported by Guilhem Lavaux and Julian Dolby ! * java/io/ObjectStreamClass.java (getSerialPersistentFields): Get the ! field "serialPersistentFields", not "getSerialPersistentFields". ! ! 2003-09-18 Ingo Proetel ! ! * java/util/TimeZone.java: Initialize lazily. ! * java/util/Locale.java (readManifest): Fix check for country. ! * java/util/GregorianCalendar.java: Make use of ResourceBundle better ! traceable ! * java/util/Calendar.java: Make use of ResourceBundle better ! traceable. ! ! 2003-09-18 Jeroen Frijters ! ! * java/sql/Timestamp.java ! (valueOf): Fixed confusion of java.sql.Date and java.util.Date ! ! 2003-09-18 David P Grove ! ! * java/io/LineNumberReader (read): Don't reset pos & limit when ! markPos is 0. ! ! 2003-09-18 Dalibor Topic ! ! * gnu/java/rmi/rmic/Compile_gcj.java (COMPILER_ARGS): New private ! constant. ! (computeArguments): use computeTypicalArguments. ! ! * gnu/java/rmi/rmic/Makefile.am (EXTRA_DIST): Add Compile_kjc.java, ! Compile_jikes.java and RMICException.java. ! * gnu/java/rmi/rmic/Compile_kjc.java: New file. ! * gnu/java/rmi/rmic/Compile_jikes.java: Likewise. ! * gnu/java/rmi/rmic/RMICException.java: Likewise. ! ! * gnu/java/rmi/rmic/Compiler.java (getDestination): New method. ! ! * gnu/java/rmi/rmic/CompilerProcess.java: Import java.io.InputStream. ! (computeTypicalArguments): New method. ! (compile): Print compiler output to System.out. Collect compiler ! error output and use it in exception message. ! ! * gnu/java/rmi/rmic/RMIC.java: Import java.util.Set. ! (destination): Initialize to null. ! (run): Replace file separator with '.' when processing class. ! (processClass): Replace '.' with file separator when compiling ! classes. ! (findClass): Use SystemClassLoader to load class. ! (generateStub): Use full class name for generated stub, that puts ! it in right path. Replace '.' with file separator when generating ! stub file name. Write just the stub class name without package ! information as class name, and constructor name. Write only ! interface names for interfaces extending java.rmi.Remote as ! implemented. ! (generateSkel): Use full class name for generated skel, that puts ! it in right path. Replace '.' with file separator when generating ! stub file name. Write just the stub class name without package ! information as class name. ! ! 2003-09-18 Michael Koch ! ! * Makefile.am (rmi_java_source_files): ! Added gnu/java/rmi/rmic/Compile_kjc.java, ! gnu/java/rmi/rmic/Compile_jikes.java and ! gnu/java/rmi/rmic/RMICException.java ! * Makefile.in: Regenerated. ! ! 2003-09-17 Graydon Hoare ! ! * gnu/java/awt/peer/gtk/GdkGraphics2D.java, ! gnu/java/awt/peer/gtk/GdkPixbufDecoder.java, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c: ! New files. ! ! 2003-09-16 Graydon Hoare ! ! * java/awt/BufferedImage.java (setData): Support non-component ! sample models. ! (getData): Same. ! ! 2003-09-10 Graydon Hoare ! ! * java/awt/geom/AffineTransform.java(transform): Fix airthmetic bugs. ! * java/awt/geom/Arc2D.java: Approximate arc segments with cubics. ! ! 2003-09-17 Mohan Embar ! ! * configure.in: Standardized help text case of ! --enable-hash-synchronization ! New configure switch --enable-libgcj-multifile and corresponding ! automake conditional ONESTEP. ! * configure: Rebuilt. ! * Makefile.am: Use automake conditional ONESTEP to determine ! whether classfiles should be compiled individually or all ! at once. ! * Makefile.in: Rebuilt. ! ! 2003-09-16 Thomas Fitzsimmons ! ! * gnu/java/awt/peer/gtk/GtkEmbeddedWindowPeer.java (construct): ! Remove method declaration. ! (create()): Call native create. ! (create(int)): New method. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c: ! (create): Add window_id parameter. Call gtk_plug_new with ! window_id parameter. ! (construct): Remove method implementation. ! ! 2003-09-16 Mohan Embar ! ! * Makefile.am: (MOSTLYCLEANFILES) Removed libtool objects. ! (mostlyclean-local): New target patterned after clean-local ! which recursively deletes all libtool objects using 'libtool rm'. ! (clean-local): Slightly modified comment to alleviate monotony. ! (distclean-local): New target patterned after clean-local ! which recursively deletes all .d files. ! * Makefile.in: Rebuilt. ! ! 2003-09-11 Tom Tromey ! ! * java/net/URLStreamHandler.java (parseURL): If original file ! ends with "/", so must canonical result. ! * java/io/natFilePosix.cc (getCanonicalPath): Clean up snafus ! with nul-termination and finding previous "/". ! ! 2003-09-11 Michael Koch ! ! * acconfig.h: Removed most items. ! * configure.in: Added descriptions to AC_DEFINE macros that where in ! acconfig.h before. ! * include/config.h.in: Regenerated. ! ! 2003-09-11 Sascha Brawer ! ! * java/awt/Toolkit.java (getSystemEventQueue): Call SecurityManager ! if one is installed. Improve Javadoc. ! (getSystemEventQueueImpl): Improve Javadoc. ! ! 2003-09-11 Tom Tromey ! ! * java/io/natFilePosix.cc (getCanonicalPath): Handle case where ! file does not exist. ! ! 2003-09-10 Anthony Green ! ! * gnu/java/net/natPlainDatagramSocketImplWin32.cc (peekData): ! Specify full name when referencing ::java::net::InetAddress. ! * gnu/java/net/natPlainSocketImplWin32.cc (accept): Ditto. ! Fix argument type. ! ! 2003-09-10 Michael Koch ! ! * acconfig.h (__NO_MATH_INLINES): Removed. ! * configure.in: Removed check for g++ math inlining bug from 2000. ! * configure.host: Removed -D__NO_MATH_INLINES in libgcj_cflags and ! libgcj_cxxflags. ! * configure: Regenerated. ! ! 2003-09-10 David Daney ! ! * java/util/Arrays.java (equals(all variants)): Quit using ! NullPointerException catching to detect null valued parameters. ! ! 2003-09-10 Michael Koch ! ! * java/net/DatagramSocket.java, ! java/net/MulticastSocket.java, ! java/net/ServerSocket.java, ! java/net/Socket.java: ! Use gnu.java.net.Plain*SocketImpl instead of ! java.net.PlainSocketImpl. ! * java/net/PlainDatagramSocketImpl.java, ! java/net/PlainSocketImpl.java, ! java/net/SocketInputStream.java, ! java/net/SocketOutputStream.java, ! java/net/natPlainDatagramSocketImplNoNet.cc, ! java/net/natPlainDatagramSocketImplPosix.cc, ! java/net/natPlainDatagramSocketImplWin32.cc, ! java/net/natPlainSocketImplNoNet.cc, ! java/net/natPlainSocketImplPosix.cc, ! java/net/natPlainSocketImplWin32.cc: ! Removed. ! * gnu/java/net/PlainDatagramSocketImpl.java, ! gnu/java/net/PlainSocketImpl.java, ! gnu/java/net/SocketInputStream.java, ! gnu/java/net/SocketOutputStream.java, ! gnu/java/net/natPlainDatagramSocketImplNoNet.cc, ! gnu/java/net/natPlainDatagramSocketImplPosix.cc, ! gnu/java/net/natPlainDatagramSocketImplWin32.cc, ! gnu/java/net/natPlainSocketImplNoNet.cc, ! gnu/java/net/natPlainSocketImplPosix.cc, ! gnu/java/net/natPlainSocketImplWin32.cc: ! New files (moved from java/net). ! * configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc ! instead of java/net/natPlain*SocketImpl.cc. ! * configure: Regenerated. ! * Makefile.am: Moved files from java/net to gnu/java/net. ! * Makefile.in: Regenerated. 2003-09-09 Alan Modra * configure: Regenerate. + 2003-09-04 Tom Tromey + + * configure.host: Removed erroneous comment. + + * gnu/java/awt/natEmbeddedWindow.cc (setWindowPeer): Removed + lvalue cast; use correct rvalue cast. + + 2003-09-02 Thomas Fitzsimmons + + * gnu/java/awt/peer/gtk/GtkDialogPeer.java (create): Add width + and height arguments to GtkWindowPeer.create method call. + * gnu/java/awt/peer/gtk/GtkWindowPeer.java + (create(int,int,int)): New method. + (create(int)): Add call to new create method. + (create()): Add width and height arguments to create method + call. + (GtkWindowPeer): Remove call to setBounds. + * java/awt/Frame.java (Frame(String)): Initialize visible field + to false. + (Frame(GraphicsConfiguration)): Likewise. + (Frame(String,GraphicsConfiguration)): Likewise. + * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c (create): + Add width and height parameters. Call + gtk_window_set_default_size. + (connectHooks): Remove unused name variable. + (static setBounds): Call gtk_window_resize not + gtk_widget_set_usize. + (setBounds): Remove unused nchildren variable. + + 2003-08-31 Ingo Proetel + + * java/util/logging/Logger.java: provide class and method information + * java/util/logging/LogManager.java: create handlers + * java/util/logging/SimpleFormatter.java: print souceClassName and + sourceMethodName + + 2003-08-28 Mohan Embar + + * win32.cc: fixed tab, indentation and whitespace + inconsistencies + removed jvm.h include + added includes java/lang/UnsupportedOperationException.h, + java/io/IOException.h, java/net/SocketException.h + (WSAEventWrapper): class implementation + (_Jv_WinStrError): implemented both overloads + (_Jv_ThrowIOException): implemented both overloads + (_Jv_ThrowSocketException): implemented both overloads + (_Jv_select): implemented + * include/win32.h: fixed tab, indentation and whitespace + inconsistencies + wrapped include with #define WIN32_LEAN_AND_MEAN + added jvm.h include + (WSAEventWrapper): added class declaration + (_Jv_WinStrError): added both overload declarations + (_Jv_ThrowIOException): added both overload declarations + (_Jv_ThrowSocketException): added both overload declarations + removed ENOTCONN, ECONNRESET and ENOPROTOOPT defines + (_Jv_select): added declaration + (_Jv_socket): removed + (_Jv_connect): removed + (_Jv_close): removed + (_Jv_bind): removed + (_Jv_accept): removed + (_Jv_listen): removed + (_Jv_write): removed + (_Jv_read): removed + * java/io/natFileDescriptorWin32.cc: fixed tab, indentation and + whitespace inconsistencies + replaced #include with + removed jvm.h include + (testCanUseGetHandleInfo): new function which tests whether Win32 + GetHandleInformation() call can be used with console buffer handles + (only supported on >=WinNT 5.0) + (winerr): removed (superseded by _Jv_WinStrError in include/win32.h) + (valid): rewrote implementation using GetHandleInformation() + (sync): changed exception throwing to use error string and exception + helper methods declared in include/win32.h + (open): likewise + (write): likewise + (setLength): likewise + (close): likewise + (seek): likewise + (getFilePointer): likewise + (read): likewise + * java/io/natFileWin32.cc: fixed tab, indentation and + whitespace inconsistencies + replaced #include with + removed jvm.h include + (_access): use JV_TEMP_UTF_STRING + (_stat): likewise + (performMkDir): use JV_TEMP_UTF_STRING + (performRenameTo): likewise + (performDelete): likewise + (performCreate): likewise + (performSetReadOnly): likewise + (performSetLastModified): likewise + * java/lang/natWin32Process.cc: fixed tab, indentation and + whitespace inconsistencies + replaced #include with + removed includes gcj/cni.h, jvm.h + (new_string): removed + (startProcess): use JV_TEMP_UTF_STRING, + changed exception throwing to use error string and exception + helper methods declared in include/win32.h + * java/net/natInetAddressWin32.cc: fixed tab, indentation and + whitespace inconsistencies + replaced #include with + removed jvm.h include + removed DISABLE_JAVA_NET conditional code + removed POSIX conditional code not relevant to Win32 + (aton): use JV_TEMP_UTF_STRING + removed POSIX conditional code not relevant to Win32 + (lookup): likewise + (getLocalHostName): likewise + * java/net/natNetworkInterfaceWin32.cc: fixed tab, indentation and + whitespace inconsistencies + removed unnecessary windows.h, winsock.h and gcj/cni.h includes + removed DISABLE_JAVA_NET conditional code + removed POSIX conditional code not relevant to Win32 + (winsock2GetRealNetworkInterfaces): new function to compute network + interfaces via Winsock2 API + (determineGetRealNetworkInterfacesFN): new function for returning + a function pointer to the function used to compute network interfaces. + (getRealNetworkInterfaces): implemented + * java/net/natPlainDatagramSocketImplWin32.cc: fixed tab, indentation and + whitespace inconsistencies + removed gcj/cni.h include + removed DISABLE_JAVA_NET conditional code + removed POSIX conditional code not relevant to Win32 + changed net POSIXisms to Win32isms + replaced _Jv socket-related calls with their real Win32 equivalents + changed exception throwing to use error string and exception + helper methods declared in include/win32.h + (peekData): implemented timeout support + (receive): likewise + * java/net/natPlainSocketImplWin32.cc: fixed tab, indentation and + whitespace inconsistencies + removed gcj/cni.h and gcj/javaprims.h includes + removed DISABLE_JAVA_NET conditional code + removed POSIX conditional code not relevant to Win32 + changed net POSIXisms to Win32isms + replaced _Jv socket-related calls with their real Win32 + equivalents + changed exception throwing to use error string and exception + helper methods declared in include/win32.h + (throwConnectException): helper function for connect() + (connect): implemented timeout support + (accept): likewise + (doRead): new helper function common to both read() method overloads, + includes timeout support + (read): implemented both overloads in terms of doRead() + (available): implemented using ioctlsocket() + + 2003-08-28 Mohan Embar + + * java/net/natInetAddressWin32.cc, + java/net/natNetworkInterfaceWin32.cc, + java/net/natPlainDatagramSocketImplWin32.cc, + java/net/natPlainSocketImplWin32.cc: + Readded code enclosed in DISABLE_JAVA_NET defines + in preparation for MinGW cleanup / networking + patch + + 2003-08-28 Mohan Embar + + * Makefile.am: Fixed problems with parallel makes. + (all_java_class_files): Readded definition. + (all_java_class_files): New target which depends on + libgcj-@gcc_version@.jar + * Makefile.in: Rebuilt + + 2003-08-28 Tom Tromey + + * Makefile.in: Rebuilt. + * Makefile.am (ordinary_java_source_files): Added new files. + * java/lang/Class.h (_Jv_sharedlib_register_hook): Declare as + friend. + * java/net/URLClassLoader.java (findClass): Don't use + findURLResource. Use loader's getClass method. + (URLLoader.getClass): New method. + (addURL): Handle `gcjlib' URLs. + (SoURLLoader): New class. + (SoResource): Likewise. + * gnu/gcj/protocol/gcjlib/Connection.java: New file. + * gnu/gcj/protocol/gcjlib/Handler.java: New file. + * include/jvm.h (struct _Jv_core_chain): Moved from natCore.cc. + (_Jv_RegisterCoreHook): Declare. + (_Jv_FindCore): Declare. + * gnu/gcj/runtime/SharedLibHelper.java: New file. + * gnu/gcj/runtime/natSharedLibLoader.cc (CoreHookFunc): New + typedef. + (core_hook): New function. + (struct SharedLibDummy) [saved_core]: New field. + (init): Set _Jv_RegisterCoreHook. Throw exception on failure. + (register_hook): Set protection domain and class loader on new + class. + (finalize): Free core chain. + * gnu/gcj/Core.java (Core): New constructor. + * gnu/gcj/runtime/SharedLibLoader.java: Rewrote to use + SharedLibHelper. + * gnu/gcj/natCore.cc (_Jv_RegisterResource): Indentation fixlet. + (_Jv_create_core): New function. + (create): Use it. + (default_register_resource): New function. + (_Jv_RegisterCoreHook): New global. + (_Jv_RegisterResource): Use it. + (core_chain_struct): Removed. + (_Jv_FindCore): New function. + (_Jv_FreeCoreChain): New function. + + 2003-08-29 Michael Koch + + * java/net/natInetAddressWin32.cc, + java/net/natNetworkInterfaceWin32.cc, + java/net/natPlainDatagramSocketImplWin32.cc, + java/net/natPlainSocketImplWin32.cc: + Removed code enclosed in DISABLE_JAVA_NET defines. + + 2003-08-26 Mohan Embar + + * Makefile.am: (write_entries_to_file) New parameterized + function for writing entries to a file one line at a time. + (all_java_class_files): Removed definition. + (.java.class) Removed.target. + (libgcj-@gcc_version@.jar): Changed dependency to + $(all_java_source_files); added compilation step which compiles + all changed source files in one pass. + (libgcj.la) Refactored to use write_entries_to_file. + (lib-gnu-awt-xlib.la) Likewise. + (install-data-local) Likewise. + (write-entries-to-file-check) New target which tests write_entries_to_file. + (all-recursive): Changed dependency from $(all_java_class_files) + to libgcj-@gcc_version@.jar + * Makefile.in: Rebuilt. + + 2003-08-26 Tom Tromey + + * java/lang/StrictMath.java: Typo fix. + * java/lang/Math.java: Typo fix. + + 2003-08-26 Stephen Crawley + + * java/lang/ThreadGroup.java (removeThread): null the 'group' field + of the removed Thread. + + 2003-08-26 Mark Wielaard + + Reported by David Holmes . + * java/lang/InheritableThreadLocal.java (threadMap): Wrap inside + Collections.synchronizedMap. + * java/lang/ThreadLocal.java (valueMap): Likewise. + + 2003-08-26 Mark Wielaard + + * java/security/acl/Acl.java: Fix broken p tag. + * java/text/DateFormatSymbols.java: Correctly open and close li tags. + * javax/swing/border/LineBorder.java: Close img tag alt attributes. + * javax/swing/plaf/TreeUI.java: Likewise. + * javax/swing/plaf/basic/BasicTreeUI.java: Likewise. + * java/util/Properties.java: Use the word umlaut, not ä in api + documentation. + * java/util/PropertyResourceBundle.java: Likewise and add closing code + tag. + + 2003-08-26 Tom Tromey + + * Makefile.in: Rebuilt. + * Makefile.am: Removed all GNU-make-specific FIXME comments. + + * java/lang/ref/Reference.java (get): Indentation fix. + (clear): Comment fix. + (enqueue): Likewise. + (lock): Likewise. + (referent): Likewise. + + 2003-08-26 Tom Tromey + + PR java/12058: + * java/lang/reflect/natArray.cc (set): Allow null as argument. + + * java/lang/reflect/Proxy.java (ProxyData): `pack' now a String. + (ProxyData.getPackage): New method. + (ProxyData.getProxyData): Use package name, not Package. + (ClassFactory.ClassFactory): Updated. + + 2003-08-25 Scott Gilbertson + * Makefile.am: added gnu/awt/xlib/XOffScreenImage.java. + * Makefile.in: re-generated. + * gnu/awt/j2d/IntegerGraphicsState.java + (ScreenCoupledImage): new interface. + (drawImage): detect ScreenCoupledImage instances. + * gnu/awt/xlib/XCanvasPeer.java (createImage) implemented. + * gnu/awt/xlib/XEventLoop.java + (createEvent): re-formatted, and rearranged to avoid null pointer. + * gnu/awt/xlib/XGraphics.java + (drawImage): added XOffScreenImage handling. + * gnu/awt/xlib/XOffScreenImage.java: new file. + * gnu/gcj/xlib/Drawable.java (getDepth): new native method. + * gnu/gcj/xlib/GC.java (copyArea): new native method. + * gnu/gcj/xlib/XAnyEvent.java + (TYPE_KEY_PRESS): new constant. + (TYPE_KEY_RELEASE): new constant. + (TYPE_MOTION_NOTIFY): new constant. + (TYPE_ENTER_NOTIFY): new constant. + (TYPE_LEAVE_NOTIFY): new constant. + (TYPE_FOCUS_IN): new constant. + (TYPE_FOCUS_OUT): new constant. + (TYPE_KEYMAP_NOTIFY): new constant. + (TYPE_GRAPHICS_EXPOSE): new constant. + (TYPE_NO_EXPOSE): new constant. + (TYPE_VISIBILITY_NOTIFY): new constant. + (TYPE_CREATE_NOTIFY): new constant. + (TYPE_DESTROY_NOTIFY): new constant. + (TYPE_MAP_REQUEST): new constant. + (TYPE_CONFIGURE_REQUEST): new constant. + (TYPE_GRAVITY_NOTIFY): new constant. + (TYPE_RESIZE_REQUEST): new constant. + (TYPE_CIRCULATE_NOTIFY): new constant. + (TYPE_CIRCULATE_REQUEST): new constant. + (TYPE_PROPERTY_NOTIFY): new constant. + (TYPE_SELECTION_CLEAR): new constant. + (TYPE_SELECTION_REQUEST): new constant. + (TYPE_SELECTION_NOTIFY): new constant. + (TYPE_COLORMAP_NOTIFY): new constant. + (TYPE_MAPPING_NOTIFY): new constant. + * gnu/gcj/xlib/natDrawable.cc (getDepth): new method. + * gnu/gcj/xlib/natGC.cc (copyArea): new method + * java/awt/Component.java (createImage): changed to use peer method. + + 2003-08-22 Thomas Fitzsimmons + + * gnu/java/awt/peer/gtk/GdkGraphics.java (drawString): Pass font + name, not XLFD, to native drawString. + * jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c (drawString): + Replace XLFD-based implementation with Pango-based + implementation. + + 2003-08-22 Thomas Fitzsimmons + + * gnu/java/awt/peer/gtk/GtkWindowPeer.java: Remove + GTK_WINDOW_DIALOG. Set GTK_WINDOW_POPUP to 1. + + 2003-08-21 David Daney + + Fix for PR libgcj/12013: + * java/lang/ref/natReference.cc (finalize_referred_to_object): + Check `cleared' field. + * java/lang/ref/Reference.java (copy): Updated comments. + (cleared): New field. + (clear): Rewrote. + + 2003-08-21 Scott Gilbertson + Thomas Fitzsimmons + + * Makefile.am (gtk_awt_peer_sources): Add + gnu/java/awt/peer/GLightweightPeer.java. Remove + gnu/java/awt/GLightweightPeer.java. + * gnu/java/awt/GLightweightPeer.java: Remove file. + * gnu/java/awt/peer/GLightweightPeer.java: New file. + * java/awt/Component.java (getToolkit): Add comment about + lightweight components. + * java/awt/Toolkit.java (createComponent): Return + gnu.java.awt.peer.GLightweightPeer. + + 2003-08-21 Richard Earnshaw + + * configure.in: Fix detection of gcj when building with newlib. + * configure: Regenerated. + + 2003-08-20 Graydon Hoare + + * jni.cc: Replace "cheating" pointer-casting code with + extract_from_jvalue<> template. + 2003-08-20 Andrew Haley + * gnu/gcj/runtime/StackTrace.java (getClass): New method. + * gnu/gcj/runtime/natStackTrace.cc (getClass): New method. + (classAt): Break out class lookup function into getClass(). + * exception.cc (PERSONALITY_FUNCTION): Use new encoding for exception + handlers when using -fno-assume-compiled. + + 2003-08-20 Tom Tromey + + Fix for PR libgcj/9125: + * gnu/gcj/runtime/natVMClassLoader.cc (findClass): Find Runtime + object outside of loop. Respect lib_control setting. + * gnu/gcj/runtime/VMClassLoader.java (tried_libraries): New + field. + (lib_control): New field. + (LIB_FULL, LIB_CACHE, LIB_NEVER): New constants. + (VMClassLoader): Initialize new field. + + * java/lang/ref/natReference.cc (finalize_referred_to_object): + Set `list->reference' to DELETED_REFERENCE when removing dead + object. + (find_slot): Added an assert. + (DELETED_REFERENCE): New define. + (add_to_hash): Check for DELETED_REFERENCE. + (remove_from_hash): Just return if found slot isn't ours. + + 2003-08-19 Andrew Haley + * prims.cc (unblock_signal): New function. (catch_segv): Use it. (catch_fpe): Likewise. ! 2003-08-19 Danny Smith ! PR libgcj/11575 ! * java/io/natFileDescriptorWin32.cc (open): Set create ! flag to OPEN_AWAYS when READ & WRITE regardless of APPEND flag. ! Honor EXCL when openning with WRITE flag. ! 2003-08-19 Mohan Embar ! * include/jvm.h: New class _Jv_TempUTFString (helper class for ! getting a temporary C string from a jstring) ! New macro JV_TEMP_UTF_STRING, which leverages _Jv_TempUTFString ! but uses a stack buffer if the string length is less than 256 ! bytes. ! 2003-08-18 Tom Tromey ! PR libgcj/11951: ! * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Returns ! void. Throw VirtualMachineError if ffi fails. Initialize return ! value. Added is_jni_call argument; only wrap exception if not a ! JNI call. Use descriptive message if operation not supported. ! (_Jv_GetTypesFromSignature): Use declaring class' loader to find ! array class. ! * include/jvm.h (_Jv_CallAnyMethodA): Updated declaration. ! * jni.cc (_Jv_JNI_CallAnyMethodV): Updated for new form of ! _Jv_CallAnyMethodA. ! (_Jv_JNI_CallAnyMethodA): Likewise. ! (_Jv_JNI_CallAnyVoidMethodV): Likewise. ! (_Jv_JNI_CallAnyVoidMethodA): Likewise. ! 2003-08-13 Tom Tromey ! * gij.cc (help): Document -? and -X. ! 2003-08-12 Graydon Hoare ! * java/awt/Font.java: ! Stub out more recent API. ! 2003-08-12 Graydon Hoare ! * java/awt/Color.java (getAlpha): ! Prevent sign-extended alpha values. ! 2003-08-12 Tom Tromey ! ! * gij.cc (main): Handle -? and -X. ! ! 2003-08-10 Jeroen Frijters ! ! * java/awt/Container.java ! (getPreferredSize): Call preferredSize. ! (preferredSize): Moved body of getPreferredSize here. ! (getMinimumSize): Call minimumSize. ! (minimumSize): Moved body of getMinimumSize here. ! ! 2003-08-11 Tom Tromey ! ! * java/awt/EventQueue.java (currentEvent, lastWhen): New fields. ! (postEvent): Removed FIXME comment. ! (isDispatchThread): Documented. ! (getCurrentEvent): New method. ! (dispatchEvent): Set currentEvent and lastWhen. ! (getMostRecentEventTime): Rewrote. ! (invokeLater): Documented. ! ! 2003-08-10 Bryce McKinlay ! ! * java/io/PrintStream.java (print): Always flush if auto_flush is ! set. Don't check for newline characters. ! (write (int)): Implement without using a temporary array. ! (write (byte[], int, int): Always flush if auto_flush is set. Don't ! check for newline characters. ! Fixes PR libgcj/11778. ! ! 2003-08-08 Andrew Haley ! ! * Makefile.am (AM_CXXFLAGS): Define BOOT_CLASS_PATH. ! * Makefile.in: Rebuild. ! * java/lang/natRuntime.cc (insertSystemProperties): Add ! "sun.boot.class.path". ! ! 2003-08-07 Andrew Haley ! ! * java/io/PrintStream.java: Don't crash on a null string. ! ! 2003-08-07 Rainer Orth ! ! * configure.in: Don't initialize GCINCS to boehm-gc/include. ! * configure: Regenerate. ! ! 2003-08-07 Bryce McKinlay ! ! * java/net/Socket.java (Socket (SocketImpl)): Don't allow null ! SocketImpl. Update Javadoc. ! (bind): Call close() not impl.close() in event of exception. ! (connect): Likewise. ! Remove superfluous null checks throughout. ! * java/net/ServerSocket.java (ServerSocket (int, int, InetAddress)): ! Don't create an extra socket. Fix for PR libgcj/10868. ! (bind): Clean up exception handling. ! Remove superfluous null checks throughout. ! ! 2003-08-07 Jacob Gladish ! Bryce McKinlay ! ! * java/net/natPlainSocketImplPosix.cc (connect): Pass the FD as a ! ready-to-write argument to _Jv_Select. Reset the socket back to ! non-blocking state after connecting. ! (accept): Pass the FD as a ready-to-write argument to _Jv_Select. ! Throw SocketTimeoutException not InterruptedIOException. ! (read): Throw SocketTimeoutException not InterruptedIOException. ! ! 2003-08-07 Bryce McKinlay ! ! * java/lang/Thread.java (Thread): Check for null "name" from ! start of private constructor, not after calling the private ! constructor. ! ! 2003-08-06 Tom Tromey ! ! * java/io/FilePermission.java (equals): Use correct index for ! last character of path. ! ! 2003-08-06 Alan Modra ! ! * acinclude.m4 (LIBGCJ_CONFIGURE): Remove AC_CANONICAL_BUILD. ! * configure.in: Compare with_cross_host to build_alias, not build. ! * aclocal.m4: Regenerate. ! * configure: Regenerate. ! ! 2003-08-05 Tom Tromey ! ! Fix for PR libgcj/11779: ! * java/lang/reflect/natField.cc (getAddr): Skip frames in Field ! class. ! ! * java/lang/reflect/Method.java: Updated status comment. ! Imported javadoc from Classpath and re-ordered methods. ! * java/lang/reflect/Constructor.java: Reindented. Updated ! status comment. Imported javadoc from Classpath and re-ordered ! methods. ! ! 2003-08-05 Thomas Fitzsimmons ! ! * gnu/java/awt/peer/gtk/GtkComponentPeer.java (postKeyEvent): ! Add keyLocation parameter. ! * java/awt/event/KeyEvent.java (getKeyText): Fix "NumPad-" ! string. ! (paramString): Generate keyChar string according to keyChar, not ! keyCode. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c ! (state_to_awt_mods): Handle ALT key. ! (keyevent_state_to_awt_mods): New function. ! (get_first_keyval_from_keymap): New function. ! (keysym_to_awt_keycode): Get virtual key code from keymap. ! Handle missing VK_ values. ! (keysym_to_awt_keylocation): New function. ! (keyevent_to_awt_keychar): New function. ! (generates_key_typed_event): Handle non-text-component case. ! Handle GDK_KP_Delete and GDK_KP_Enter. ! (awt_event_handler): Call new functions to get postKeyEvent ! parameters. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c (gtkInit): ! Update postKeyEvent method signature. ! * jni/gtk-peer/gtkpeer.h: Add KEY_LOCATION defines. Add missing ! VK_ defines. ! ! 2003-08-05 Matthias Klose ! ! * aclocal.m4: check for libart-config binary ! under the name libart2-config as well. ! * configure: regenerated. ! ! 2003-08-04 David P Grove ! ! * java/text/DecimalFormat.java (format): avoid ArithmeticException ! when groupingSize is 0. ! (parse): Likewise. ! ! 2003-08-04 Matthias Klose ! ! * libart.m4: check for libart-config binary ! under the name libart2-config as well. ! * configure, aclocal.m4: regenerated. ! ! 2003-08-02 Michael Koch ! ! * java/nio/ByteBufferImpl.java ! (getChar): Check remaining bytes, fixed comment about endianess. ! (putChar): Likewise. ! (getShort): Likewise. ! (putShort): Likewise. ! (getInt): Check remaining bytes, fixed conversion, fixed comment about ! endianess. ! (putInt): Likewise. ! (getLong): Likewise. ! (putLong): Likewise. ! (getFloat): Likewise. ! (putFloat): Likewise. ! (getDouble): Likewise. ! (putDouble): Likewise. ! * java/nio/DirectByteBufferImpl.java ! (getChar): Wrapped code, fixed comment about endianess. ! (putchar): Likewise. ! (getShort): Likewise. ! (putShort): Likewise. ! (getInt): Fixed conversion, fixed comment about endianess. ! (putInt): Likewise. ! (getLong): Likewise. ! (putLong): Likewise. ! (getFloat): Likewise. ! (putFloat): Likewise. ! (getDouble): Likewise. ! (putDouble): Likewise. ! * java/nio/MappedByteBufferImpl.java ! (compact): Implemented. ! (getChar): Implemented. ! (putChar): Implemented. ! (getDouble): Implemented. ! (putdouble): Implemented. ! (getFloat): Implemented. ! (putFloat): Implemented. ! (getInt): Implemented. ! (putInt): Implemented. ! (getLong): Implemented. ! (putLong): Implemented. ! (getShort): Implemented. ! (putShort): Implemented. ! * java/nio/channels/FileChannelImpl.java ! (read): Set position where to access file. ! (write): Likewise. ! (transferTo): Flip buffer after read and before write. ! (transferFrom): Likewise. ! ! 2003-08-02 Michael Koch ! ! * gnu/java/lang/ArrayHelper.java ! (equalsArray): Reformated, added method documentation. ! ! 2003-08-02 Michael Koch ! ! * java/net/URL.java ! (URL): Added paragraph about the ! gnu.java.net.nocache_protocol_handlers property. ! (ph_cache): Renamed from handlers to match classpath's implementation. ! Reordered it with factory and serialVersionUID member variables. ! (cache_handlers): New member variable. ! (static): New static initializer to initialize cache_handlers from ! gnu.java.net.nocache_protocol_handlers property. ! (URL): Use ph_cache instead of handlers, reformatted some code to ! match classpath's implementation. ! ! 2003-08-01 Tom Tromey ! ! Fix for PR libgcj/11241: ! * java/util/WeakHashMap.java (WeakHashMap(int,float)): If ! initialCapacity is 0, set it to 1. ! ! 2003-08-01 Stephen Crawley ! ! * java/net/SocketImpl.java (toString): Display the remote address ! of an unconnected server socket as "0.0.0.0/0.0.0.0". ! ! 2003-08-01 Sascha Brawer ! ! * javax/swing/border/BevelBorder.java, ! javax/swing/border/EtchedBorder.java, ! javax/swing/border/LineBorder.java, ! javax/swing/border/MatteBorder.java, ! javax/swing/border/SoftBevelBorder.java, ! javax/swing/plaf/BorderUIResource.java, ! javax/swing/plaf/ComponentUI.java, ! javax/swing/plaf/TreeUI.java, ! javax/swing/plaf/basic/BasicBorders.java, ! javax/swing/plaf/basic/BasicGraphicsUtils.java, ! javax/swing/plaf/basic/BasicTreeUI.java: ! Prepend "doc-files" to all paths to embedded Javadoc images, so ! that the generated documentation contains the correct URL. ! ! 2003-08-01 Tom Tromey ! ! * configure: Rebuilt. ! * configure.in (tool_include_dir): Redefine to match gcc. ! ! 2003-08-01 Jerry Quinn ! Mark Wielaard ! ! * java/math/BigDecimal (divide): Correctly handle ! ROUND_HALF_EVEN when amount is greater than 0.5. ! Simplify and optimize code. ! ! 2003-07-31 Tom Tromey ! ! More for PR libgcj/11737: ! * java/io/ObjectInputStream.java (processResolution): Use ! getMethod. ! (getMethod): Make method accessible. ! (getField): Make field accessible. ! (setBooleanField): Don't call setAccessible here. ! (setByteField, setCharField, setDoubleField, setFloatField, ! setIntField, setLongField, setShortField, setObjectField): ! Likewise. ! (callReadMethod): Don't check whether method is null. Catch ! NoSuchMethodException. ! * java/io/ObjectOutputStream.java (callWriteMethod): Initialize ! cause on thrown exceptions. ! ! 2003-07-31 Stepan Koltsov ! ! Fix for PR libgcj/11728: ! * java/util/HashMap.java (readObject): Set size. ! ! 2003-07-31 Tom Tromey ! ! Fix for PR libgcj/11737: ! * java/io/ObjectOutputStream.java (getMethod): Make method ! accessible. ! (getField): Likewise. ! (writeObject): Use getMethod. ! Import PrivilegedAction and AccessController. ! (callWriteMethod): Don't check whether m is null. Catch ! NoSuchMethodException. ! ! * java/awt/geom/Arc2D.java (getBounds2D): Implement. ! (containsAngle): Likewise. ! (getStartPoint): Rewrote. ! (getEndPoint): Likewise. ! (setAngleStart(Point2D)): Likewise. ! ! 2003-07-31 Roger Sayle ! Rainer Orth ! ! * configure.in: Add new THREADCXXFLAGS variable. ! Handle POSIX threads on alpha*-dec-osf*. ! * configure: Regenerate. ! * Makefile.am: Add THREADCXXFLAGS to AM_CXXFLAGS. ! * Makefile.in: Regenerate. ! ! 2003-07-08 Andrew Haley ! ! * include/i386-signal.h (RESTORE): New. ! (INIT_SEGV): Set restorer. ! (INIT_FPE): Likewise. ! ! 2003-07-29 Thomas Fitzsimmons ! ! * gnu/java/awt/peer/gtk/GtkButtonPeer.java: Call getName rather ! than getXLFD. ! * gnu/java/awt/peer/gtk/GtkTextFieldPeer.java: Likewise. ! * gnu/java/awt/peer/gtk/GtkTextAreaPeer.java: Likewise. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c ! (gtkSetFont): Scale size parameter by PANGO_SCALE. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c: ! Likewise. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c: ! Likewise. ! ! 2003-07-29 Tom Tromey ! ! * defineclass.cc (handleField): Throw exception if field name is ! duplicated. ! (handleMethod): Throw exception for duplicate method. ! ! 2003-07-29 Tom Tromey ! ! * gnu/gcj/convert/natIconv.cc (write): Handle case where ! output buffer is too small. ! ! 2003-07-28 Tom Tromey ! ! * java/lang/natString.cc (init(gnu.gcj.runtime.StringBuffer)): ! New method. ! Include gnu/gcj/runtime/StringBuffer.h. ! * java/lang/String.java (init(gnu.gcj.runtime.StringBuffer)): New ! native method. ! (String(gnu.gcj.runtime.StringBuffer)): Use it. ! ! 2003-07-27 Anthony Green ! ! * configure.in: Fix newlib check. ! * configure: Rebuilt. ! ! 2003-07-27 Thomas Fitzsimmons ! ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c: ! Create vbox and layout for GtkPlug. ! ! 2003-07-27 Michael Koch ! ! * java/awt/Window.java ! (Window): Removed now unused constructor. It became oboslete with the ! new embedded window patch. ! ! 2003-07-27 Thomas Fitzsimmons ! Michael Koch ! ! * gnu/java/awt/EmbeddedWindow.java ! (EmbeddedWindow): Extends Frame instead of Window. ! (window_id): New member variable to store the native window handle. ! (create): Removed. ! (EmbeddedWindow): New constructor. ! (addNotify): New method. ! (getHandler): Likewise. ! (setWindowPeer): New native method. ! * gnu/java/awt/EmbeddedWindowSupport.java ! (EmbeddedWindowSupport): Fixed documentation. ! (createEmbeddedWindow): Return EmbeddedWindowPeer instead of ! WindowPeer, give it an EmbeddedWindow instance instead of the raw ! window data. ! * gnu/java/awt/natEmbeddedWindow.cc ! (create): Removed. ! (setWindowPeer): New method. ! * gnu/java/awt/peer/EmbeddedWindowPeer.java, ! gnu/java/awt/peer/gtk/GtkEmbeddedWindowPeer.java, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c: ! New files ! * gnu/java/awt/peer/gtk/GtkToolkit.java ! (GtkToolkit): Implements EmbeddedWindowSupport. ! (createEmbeddedWindow): New method. ! * java/awt/Window.java ! (Window): Removed. ! * Makefile.am ! (java_source_files): Added EmbeddedWindowPeer.java. ! (gtk_awt_peer_sources): Added GtkEmbeddedWindowPeer.java. ! (gtk_c_source_files): Added gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c. ! * Makefile.in: Regenerated. ! ! 2003-07-26 Ranjit Mathew ! ! * java/lang/Win32Process.java (ConcreteProcess): Surround ! a command line element with quotes if it contains an ! embedded space or tab. ! * java/lang/natWin32Process.cc (startProcess): Do not ! surround command line elements with quotes here. ! ! * configure.host: Use -fcheck-references and ! -fuse-divide-subroutine for MinGW until we fix ! win32_exception_handler( ) in win32.cc w.r.t. Win32 ! Structured Exception Handling (SEH). ! ! * win32.cc (_Jv_platform_initProperties): Use generic names ! like "x86" for the "os.arch" property to be consistent with ! what Sun's JDK produces. Use the wProcessorArchitecture ! member of the Win32 SYSTEM_INFO structure, filled in a call ! to GetSystemInfo( ), instead of dwProcessorType. ! ! 2003-07-26 Mohan Embar ! Ranjit Mathew ! ! * Makefile.am: Use cross-compiling gcjh from the path for ! a crossed-native build. ! * Makefile.in: Rebuilt. ! * configure.in: Include libltdl in non-newlib builds. ! Moved determination of gcj used to build libraries to ! its own section. Fixed cross-compilation issues for ! non-newlib builds. ! * configure: Rebuilt. ! ! 2003-07-25 Tom Tromey ! ! * java/io/natFileDescriptorPosix.cc (write): Try again on EINTR. ! (write): Likewise. ! (read): Likewise. ! (read): Likewise. ! ! 2003-07-25 Mark Wielaard ! ! * java/lang/natRuntime.cc (_load): Add library name to ! UnsatisfiedLinkError when thrown. ! ! 2003-07-25 Mark Wielaard ! ! * Makefile.am (awt_java_source_files): java/awt/GridBagLayoutInfo.java ! added. ! * Makefile.in: Likewise. ! ! 2003-07-25 Jeroen Frijters ! ! * java/awt/Component.java ! (getPreferredSize): Call preferredSize. ! (preferredSize): Moved body of getPreferredSize here. ! (getMinimumSize): Call minimumSize. ! (minimumSize): Moved body of getMinimumSize here. ! (prepareImage): Fall back on Toolkit.prepareImage if there is no peer ! (checkImage(Image,ImageObserver)): Don't call getWidth/getHeight, but ! pass -1 ! * java/awt/Container.java ! (validate): Don't validate if there is no peer. ! (update): Clear background before calling paint. ! * java/awt/GridBagLayout.java ! Completed the implementation and fixed several bugs. ! * java/awt/MediaTracker.java ! (MediaEntry.imageUpdate): Fixed typo. & instead of | was used to ! combine flags. ! * java/awt/Window.java ! (Window): Don't call setVisible(false). Windows are invisible by ! default and calling virtual methods from constructor causes ! compatibility problems (e.g. subclasses may assume that the peer ! already exists). ! ! 2003-07-25 Michael Koch ! ! * java/awt/GridBagLayout.java: ! Totally reworked and partly implemented. ! * java/awt/GridBagLayoutInfo.java: ! New file. ! ! 2003-07-24 Thomas Fitzsimmons ! ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c (create): ! Don't pack label in an event box. ! ! 2003-07-24 Tom Tromey ! ! For PR libgcj/7482: ! * verify.cc (ref_intersection): New class. ! (type_val): Removed unresolved_reference_type, ! uninitialized_unresolved_reference_type. ! (is_assignable_from_slow): Rewrote. ! (type::data): Removed. ! (type::klass): New field. ! (type::type): Added verifier argument. ! (type::resolve): Removed. ! (type::set_uninitialized): Updated for change to type_val. ! (type::set_initialized): Likewise. ! (type::isinitialized): Likewise. ! (type::print): Likewise. ! (construct_primitive_array_type): Likewise. ! (type::compatible): Updated for change to type_val and to use ! ref_intersection. ! (type::isarray): Updated to use ref_intersection. ! (type::isinterface): Likewise. ! (type::element_type): Likewise. ! (type::to_array): Likewise. ! (type::verify_dimensions): Rewrote. ! (type::merge): Likewise. ! (check_class_constant): Updated for type constructor change. ! (check_constant): Likewise. ! (check_field_constant): Likewise. ! (get_one_type): Likewise. ! (initialize_stack): Likewise. ! (verify_instructions_0): Likewise. ! (verify_instructions_0) [op_invokeinterface]: Removed special ! case. ! (isect_list): New field. ! (_Jv_BytecodeVerifier): Initialize it. ! (~_Jv_BytecodeVerifier): Destroy ref_intersection objects. ! ! 2003-07-24 H. Väisänen ! ! * java/text/SimpleDateFormat.java (format) [YEAR_FIELD]: Zero pad ! unless field size is 2. ! ! 2003-07-23 Thomas Fitzsimmons ! ! * gnu/java/awt/peer/gtk/GtkTextComponentPeer.java ! (connectHooks): New method. ! (handleEvent): Remove. ! * gnu/java/awt/peer/gtk/GtkTextFieldPeer.java ! (createHooks): Remove declaration. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c ! (generates_key_typed_event): Change to handle only certain ! keyvals. ! (awt_event_handler): Add special handling for GtkTextView. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c ! (textcomponent_commit_cb): New function. ! (textcomponent_changed_cb): Likewise. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c ! (connectHooks): Remove. ! ! 2003-07-23 Tom Tromey ! ! * java/lang/natSystem.cc (arraycopy): Check for overflow. ! ! * boehm.cc (_Jv_BuildGCDescr): Use `1ULL'. ! ! 2003-07-22 Tom Tromey ! ! * boehm.cc (_Jv_BuildGCDescr): Wrote. ! Include limits.h. ! ! 2003-07-22 Tom Tromey ! ! * java/awt/Window.java (getWarningString): Just return the ! string. ! (Window): Set warningString; check with security manager. ! ! 2003-07-22 Scott Gilbertson ! ! * gnu/awt/xlib/XGraphicsConfiguration.java ! (FontMetricsCache): Made static. ! ! 2003-07-22 Tom Tromey ! ! * java/net/URLEncoder.java (encode(String)): Use platform default ! encoding. ! (encode(String,String)): Convert to 2-digit upper-case hex ! number. ! (hex): New field. ! ! 2003-07-21 Thomas Fitzsimmons ! ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c ! (create): Remove unused method implementation. ! (connectHooks): Remove debug messages. ! ! 2003-07-20 Anthony Green ! ! * gnu/awt/j2d/AbstractGraphicsState.java (clone): Handle ! CloneNotSupportedException. ! * gnu/gcj/xlib/WindowAttributes.java (clone): Ditto. ! * gnu/gcj/xlib/WMSizeHints.java (clone): Ditto. ! * gnu/gcj/xlib/GC.java (clone): Ditto. ! * gnu/awt/xlib/XGraphics.java (clone): Ditto. ! * gnu/awt/j2d/Graphics2DImpl.java (clone): Ditto. ! ! * gnu/awt/xlib/XEventLoop.java (postNextEvent): Remove unreachable ! handler. ! * gnu/gcj/runtime/NameFinder.java (NameFinder): Ditto. ! ! 2003-07-20 Steve Pribyl ! ! * gnu/gcj/runtime/natSharedLibLoader.cc (init): `libname' now a ! String. Put dlerror() message into exception. ! Include UnsatisfiedLinkError. ! * gnu/gcj/runtime/SharedLibLoader.java (init): `libname' now a ! String. Now native. ! ! 2003-07-20 Tom Tromey ! ! * java/lang/Runtime.java: Comment fix. ! * java/lang/ClassLoader.java (isAncestorOf): New method. ! (getParent): Uncommented security check. Use isAncestorOf. ! * include/jvm.h (_Jv_CheckAccess): Declare. ! * java/lang/reflect/natConstructor.cc (newInstance): Perform ! access check. ! Include IllegalAccessException.h, ArrayIndexOutOfBoundsException.h. ! * java/lang/reflect/natArray.cc (newInstance): Pass caller's ! class loader to _Jv_GetArrayClass. ! Include ArrayIndexOutOfBoundsException.h. ! * java/lang/reflect/Field.java: Update comment to reflect status. ! (equals): Fixed indentation. ! * java/lang/Class.h (Class): Declare memberAccessCheck, not ! checkMemberAccess. Make _Jv_CheckAccess a friend. ! * java/lang/Class.java (memberAccessCheck): New method from ! Classpath. ! (checkMemberAccess): Removed. ! (getDeclaredMethod): Use memberAccessCheck. ! (getField): Likewise. ! (getMethod): Likewise. ! * resolve.cc (_Jv_ResolvePoolEntry): Use _Jv_CheckAccess. ! (_Jv_SearchMethodInClass): Likewise. ! * prims.cc (_Jv_CheckAccess): New function. ! * jni.cc (_Jv_JNI_FindClass): Use getClassLoaderInternal. ! (_Jv_JNI_GetAnyFieldID): Likewise. ! * java/lang/natClass.cc (forName): Use getClassLoaderInternal. ! (getClassLoader): Added security check. ! (getConstructor): Call memberAccessCheck. ! (getDeclaredClasses): Likewise. ! (getDeclaredField): Likewise. ! (getDeclaredFields): Likewise. ! (_getConstructors): Likewise. ! (getDeclaredConstructor): Likewise. ! (getDeclaredMethods): Likewise. ! (getFields): Likewise. ! (getMethods): Likewise. ! (newInstance): Likewise. ! (_Jv_MakeVTable): Put method name in exception. ! * java/lang/reflect/natMethod.cc (getType): Use ! getClassLoaderInternal. ! (_Jv_GetTypesFromSignature): Likewise. ! (invoke): Perform access check. ! (_Jv_CallAnyMethodA): Removed old FIXME comments. ! Include ArrayIndexOutOfBoundsException.h. ! * java/lang/reflect/natField.cc (getType): Use ! getClassLoaderInternal. ! (_Jv_CheckFieldAccessibility): Removed. ! (getAddr): Use _Jv_CheckAccess; find caller. ! Include ArrayIndexOutOfBoundsException.h. ! ! 2003-07-20 Michael Koch ! ! * java/net/URL.java ! (URL): Fixed documentation to name an argument correcty, Reformatted ! one method declaration. ! (getURLStreamHandler): Added documentation from classpath. ! ! 2003-07-19 Tom Tromey ! ! * mauve-libgcj: Don't run CollationElementIterator tests. ! ! 2003-07-19 Jeroen Frijters ! ! * java/net/URLClassLoader.java (addURL): Moved implementation to ! private addURLImpl() to avoid calling addURL from the constructor. ! (addURLImpl): Contains the code that was previously in addURL. ! (addURLs): Call addURLImpl(), not addURL(). ! ! 2003-07-18 Graydon Hoare ! ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c: ! Handle missing event cases, connect to "value-changed" signal. ! ! 2003-07-18 Graydon Hoare ! ! * java/awt/geom/CubicCurve2D.java, ! java/awt/geom/Line2D.java, ! java/awt/geom/QuadCurve2D.java, ! java/awt/geom/Rectangle2D.java: ! Fix path some calculations, make path iterators follow ! a consistent style. ! ! 2003-07-18 Mark Wielaard ! ! * java/util/logging/Handler.java (isLoggable): Check record level ! smaller or equal. ! ! 2003-07-17 Michael Koch ! ! * gnu/java/awt/peer/gtk/GtkToolkit.java: ! Reworked imports. ! ! 2003-07-14 Michael Koch ! ! * gnu/java/rmi/server/UnicastServerRef.java: ! New version from classpath. ! ! 2003-07-14 Michael Koch ! ! * java/awt/image/MemoryImageSource.java, ! java/beans/PropertyEditorManager.java, ! javax/naming/CompoundName.java, ! javax/naming/spi/NamingManager.java, ! javax/swing/AbstractButton.java, ! javax/swing/ButtonModel.java, ! javax/swing/SwingUtilities.java, ! javax/swing/UIManager.java, ! javax/swing/colorchooser/DefaultColorSelectionModel.java, ! javax/swing/event/AncestorEvent.java, ! javax/swing/event/InternalFrameEvent.java, ! java/util/zip/ZipFile.java: ! New versions from classpath. ! ! 2003-07-13 Michael Koch ! ! * gnu/java/nio/FileChannelImpl.java, ! gnu/java/nio/natFileChannelImpl.cc: Removed. ! * java/io/FileInputStream.java, ! java/io/FileOutputStream.java, ! java/io/RandomAccessFile.java, ! java/nio/MappedByteBufferImpl.java: ! Import java.nio.channels.FileChannelImpl instead of ! gnu.java.nio.FileChannelImpl. ! * java/nio/channels/FileChannelImpl.java, ! java/nio/channels/natFileChannelImpl.cc: ! New files. ! * Makefile.am ! (ordinary_java_source_files): ! Removed gnu/java/nio/FileChannelImpl.java and added ! java/nio/channels/FileChannelImpl.java. ! (nat source_files): ! Removed gnu/java/nio/natFileChannelImpl.cc and added ! java/nio/channels/natFileChannelImpl.cc. ! * Makefile.in: Regenerated. ! ! 2003-07-13 Michael Koch ! ! * javax/swing/plaf/basic/BasicBorders.java, ! javax/swing/plaf/basic/BasicLabelUI.java, ! javax/swing/plaf/basic/BasicLookAndFeel.java, ! javax/swing/plaf/basic/BasicTabbedPaneUI.java, ! javax/swing/plaf/basic/BasicTextUI.java, ! javax/swing/plaf/metal/MetalLookAndFeel.java: ! New versions from classpath. ! ! 2003-07-13 Michael Koch ! ! * gnu/java/awt/peer/gtk/GdkFontMetrics.java ! * gnu/java/awt/peer/gtk/GdkGraphics.java ! * gnu/java/awt/peer/gtk/GtkButtonPeer.java ! * gnu/java/awt/peer/gtk/GtkCanvasPeer.java ! * gnu/java/awt/peer/gtk/GtkCheckboxGroupPeer.java ! * gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java ! * gnu/java/awt/peer/gtk/GtkCheckboxPeer.java ! * gnu/java/awt/peer/gtk/GtkChoicePeer.java ! * gnu/java/awt/peer/gtk/GtkClipboard.java ! * gnu/java/awt/peer/gtk/GtkDialogPeer.java ! * gnu/java/awt/peer/gtk/GtkFileDialogPeer.java ! * gnu/java/awt/peer/gtk/GtkFramePeer.java ! * gnu/java/awt/peer/gtk/GtkGenericPeer.java ! * gnu/java/awt/peer/gtk/GtkImage.java ! * gnu/java/awt/peer/gtk/GtkImagePainter.java ! * gnu/java/awt/peer/gtk/GtkLabelPeer.java ! * gnu/java/awt/peer/gtk/GtkListPeer.java ! * gnu/java/awt/peer/gtk/GtkMenuBarPeer.java ! * gnu/java/awt/peer/gtk/GtkMenuComponentPeer.java ! * gnu/java/awt/peer/gtk/GtkMenuItemPeer.java ! * gnu/java/awt/peer/gtk/GtkMenuPeer.java ! * gnu/java/awt/peer/gtk/GtkOffScreenImage.java ! * gnu/java/awt/peer/gtk/GtkPanelPeer.java ! * gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java ! * gnu/java/awt/peer/gtk/GtkScrollPanePeer.java ! * gnu/java/awt/peer/gtk/GtkScrollbarPeer.java ! * gnu/java/awt/peer/gtk/GtkTextAreaPeer.java ! * gnu/java/awt/peer/gtk/GtkTextComponentPeer.java ! * gnu/java/awt/peer/gtk/GtkTextFieldPeer.java ! ! 2003-07-13 Michael Koch ! ! * gnu/java/locale/LocaleInformation_de.java ! * gnu/java/locale/LocaleInformation_en.java ! * gnu/java/locale/LocaleInformation_nl.java ! ! 2003-07-13 Michael Koch ! ! * gnu/java/awt/EmbeddedWindow.java, ! gnu/java/awt/EmbeddedWindowSupport.java, ! gnu/java/awt/natEmbeddedWindow.cc: ! New files. ! * java/awt/Window.java ! (Window): New constructor to support embedded windows. ! * Makefile.am ! (awt_java_source_files): Added gnu/java/awt/EmbeddedWindow.java and ! gnu/java/awt/EmbeddedWindowSupport.java. ! (nat_source_files): Added gnu/java/awt/natEmbeddedWindow.cc. ! * Makefile.in: Regenerated. 2003-07-11 Matt Kraai *************** *** 64,77 **** * java/awt/im/InputContext.java: Remove a redundant partial line. ! 2003-07-11 Jeff Sturm ! * gnu/gcj/runtime/FirstThread.java (KinputASCII, KoutputASCII): ! Create dummy references for static linking. 2003-07-07 Adam Megacz ! * posix.cc: added #include 2003-06-30 Gary Benson --- 6249,6362 ---- * java/awt/im/InputContext.java: Remove a redundant partial line. ! 2003-07-09 Tom Tromey ! * Makefile.in: Rebuilt. ! * Makefile.am (AM_MAKEFLAGS): Added CPPFLAGS. ! ! 2003-07-09 Mark Wielaard ! ! * java/io/ObjectOutputStream.java (writeObject): break after ! calling writeClassDescriptor(). ! ! 2003-07-09 Mark Mitchell ! ! * gcj/array.h (JvPrimClass): Don't parenthesize the output. ! ! 2003-07-09 Michael Koch ! ! * gnu/java/awt/peer/gtk/GtkComponentPeer.java, ! gnu/java/awt/peer/gtk/GtkContainerPeer.java, ! gnu/java/awt/peer/gtk/GtkDialogPeer.java, ! gnu/java/awt/peer/gtk/GtkWindowPeer.java: ! Explicitly import used classes. ! * java/awt/Container.java: New version from classpath. ! ! 2003-07-09 Michael Koch ! ! * libgcj.pc.in: New file. ! * Makefile.am: Install libgcj.pc in $libdir/pkgconfig. ! * Makefile.in: Regenerated. ! * configure: Regenrated. ! * configure.in: Create libgcj.pc from libgcj.pc.in. ! ! 2003-07-08 Mark Wielaard ! ! * gcj/cni.h: CNI now expands to Compiled Native Interface. ! ! * java/lang/e_pow.c: CYGNUS LOCAL should be GCJ LOCAL. ! * java/lang/fdlibm.h: Likewise. 2003-07-07 Adam Megacz ! * posix.cc: added #include ! ! 2003-07-07 Thomas Fitzsimmons ! ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c: Fix ! formatting. ! ! * gnu/java/awt/peer/gtk/GtkTextComponentPeer.java ! (setCaretPosition, setEditable): Rely entirely on native ! implementation. ! (getArgs): Remove. ! (postTextEvent): New method. ! (handleEvent): New method. ! * gnu/java/awt/peer/gtk/GtkTextFieldPeer.java (handleEvent): New ! method. ! * java/awt/event/ActionEvent.java (paramString): Fix formatting. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c ! (keysym_to_awt_keycode): Fix range checks. ! (generates_key_typed_event): New function. ! (awt_event_handler): Post AWT_KEY_RELEASED events to event ! queue. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c ! (gtkInit): Store TextComponent's postTextEvent method ID. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c ! (setText): Post TEXT_VALUE_CHANGED event to event queue. ! ! 2003-07-07 Rainer Orth ! ! * configure.in: Check for usleep declaration. ! * acconfig.h (HAVE_USLEEP_DECL): Provide template. ! * configure: Regenerate. ! * include/config.h.in: Likewise. ! * include/posix.h [!HAVE_USLEEP_DECL]: Declare usleep. ! ! 2003-07-01 Michael Koch ! ! * gnu/gcj/convert/natIconv.cc ! (iconv_init): Fixed possible memory leak by releasing allocated iconv ! handle. ! ! 2003-06-30 Thomas Fitzsimmons ! ! * glib-2.0.m4: New file. ! * gtk-2.0.m4: New file. ! * glib.m4: Remove. ! * gtk.m4: Remove. ! * configure.in: Update AM_PATH_GTK macro call to ! AM_PATH_GTK_2_0. Likewise for AM_PATH_GLIB. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c, ! jni/gtk-peer/gthread-jni.c, ! jni/gtk-peer/gthread-jni.h: ! New versions from classpath. ! * aclocal.m4: Regenerate. ! * configure: Regenerate. ! * Makefile.in: Regenerate. ! * gcj/Makefile.in: Regenerate. ! * include/Makefile.in: Regenerate. ! * testsuite/Makefile.in: Regenerate. 2003-06-30 Gary Benson *************** *** 79,94 **** * javax/naming/spi/NamingManager.java (getURLContext): Use correct name for factory class. 2003-06-17 Franz Sirl * include/powerpc-signal.h: New File. * configure.in: Use it. * configure: Regenerated. ! 2003-06-10 Andrew Haley ! * include/x86_64-signal.h (MAKE_THROW_FRAME): Mark sigcontext on ! stack volatile to prevent optimization from removing it. 2003-06-06 Mark Wielaard --- 6364,7388 ---- * javax/naming/spi/NamingManager.java (getURLContext): Use correct name for factory class. + 2003-06-28 Michael Koch + + * java/io/PrintStream.java + (checkError): Call flush() instead of direct flushing of the Writer + object. + (print): Call print(String) instead of direct print method of the + Writer Object. + (println): Call println(String) instead of direct println method of the + Writer Object. + (write): Simplified. + + 2003-06-28 Michael Koch + + * java/net/ServerSocket.java + (setChannel): New method. + * java/net/Socket.java + (setChannel): New method. + + 2003-06-27 Michael Koch + + * java/beans/beancontext/BeanContextSupport.java: + New version from classpath. + + 2003-06-27 Michael Koch + + * java/awt/Window.java, + java/awt/font/GraphicAttribute.java, + java/awt/font/ImageGraphicAttribute.java, + java/awt/image/DataBufferByte.java, + java/awt/image/DataBufferInt.java, + java/awt/image/DataBufferUShort.java, + java/awt/image/DirectColorModel.java, + java/awt/image/PixelGrabber.java: + New versions from classpath. + + 2003-06-27 Michael Koch + + * java/security/Certificate.java + (getGuarantor): Removed wrong @deprecated tag. + (getPrincipal): Likewise. + (getPublicKey): Likewise. + (encode): Likewise. + (decode): Likewise. + (getFormat): Likewise. + (toString): Likewise. + * java/security/cert/PolicyQualifierInfo.java + (PolicyQualifierInfo): Made final. + * javax/security/auth/x500/X500Principal.java + (serialVersionUID): New member variable. + + 2003-06-27 Michael Koch + + * java/text/Format.java + (serialVersionUID): Fixed value. + + 2003-06-27 Michael Koch + + * java/net/Inet4Address.java + (Inet4Address): Made package-private. + * java/net/Inet6Address.java + (Inet4Address): Made package-private. + + 2003-06-27 Michael Koch + + * java/io/RandomAccessFile.java + (readLine): Removed wrong @deprecated tag. + (getChannel): Made final. + + 2003-06-27 Michael Koch + + * gnu/java/nio/FileChannelImpl.java + (write): Removed. + + 2003-06-27 Michael Koch + + * java/nio/ByteBufferImpl.java + (ByteBufferImpl): Made it a package-private class + * java/nio/CharBufferImpl.java + (CharBufferImpl): Made it a package-private class + * java/nio/DirectByteBufferImpl.java + (DirectByteBufferImpl): Made it a package-private class + * java/nio/DoubleBufferImpl.java + (DoubleBufferImpl): Made it a package-private class + * java/nio/FloatBufferImpl.java + (FloatBufferImpl): Made it a package-private class + * java/nio/IntBufferImpl.java + (IntBufferImpl): Made it a package-private class + * java/nio/LongBufferImpl.java + (LongBufferImpl): Made it a package-private class + * java/nio/ShortBufferImpl.java + (ShortBufferImpl): Made it a package-private class + * java/nio/channels/FileChannel.java + (write): Made final. + * java/nio/channels/ServerSocketChannel.java + (ServerSocketChanne): Made protected. + + 2003-06-27 Michael Koch + + * javax/naming/CompositeName.java + (serialVersionUID): New member variable. + * javax/naming/CompoundName.java + (serialVersionUID): New member variable. + * javax/naming/InitialContext.java + (InitialContext): Throws NamingException. + (init): Likewise. + * javax/naming/LinkRef.java + (serialVersionUID): New member variable. + (gteLinkName): Throws NamingException. + * javax/naming/NamingException.java + (serialVersionUID): New member variable. + * javax/naming/NamingSecurityException.java + (NamingSecurityException): Made abstract. + (serialVersionUID): New member variable. + * javax/naming/ReferralException.java + (serialVersionUID): New member variable. + * javax/naming/StringRefAddr.java + (serialVersionUID): New member variable. + * javax/naming/directory/BasicAttribute.java: + Reworked imports. + (serialVersionUID): New member variable. + (get): Throws NamingException. + (getAll): Throws NamingException. + * javax/naming/directory/BasicAttributes.java: + Reworked imports. + (serialVersionUID): New member variable. + * javax/naming/ldap/UnsolicitedNotificationEvent.java + (serialVersionUID): New member variable. + + 2003-06-27 Michael Koch + + * Makefile.am + (awt_java_source_files): Added new files: + javax/swing/Popup.java, + javax/swing/PopupFactory.java + * Makefile.in: Regenerated. + + 2003-06-27 Michael Koch + + * javax/swing/JWindow.java, + javax/swing/event/AncestorEvent.java, + javax/swing/event/HyperlinkEvent.java, + javax/swing/event/InternalFrameEvent.java, + javax/swing/event/ListDataEvent.java, + javax/swing/event/TableModelEvent.java, + javax/swing/plaf/PopupMenuUI.java, + javax/swing/plaf/SplitPaneUI.java, + javax/swing/plaf/TabbedPaneUI.java, + javax/swing/plaf/TextUI.java, + javax/swing/plaf/TreeUI.java, + javax/swing/plaf/basic/BasicTextUI.java, + javax/swing/plaf/basic/BasicTreeUI.java: + New versions from classpath. + * javax/swing/Popup.java, + javax/swing/PopupFactory.jav: + New source files from classpath. + * javax/swing/plaf/doc-files/TreeUI-1.png: + New binary files from classpath. + + 2003-06-25 Michael Koch + + * Makefile.am + (awt_java_source_files): Added javax/swing/plaf/SpinnerUI.java. + * Makefile.in: Regenerated. + + 2003-06-25 Michael Koch + + * javax/swing/plaf/ActionMapUIResource.java, + javax/swing/plaf/BorderUIResource.java, + javax/swing/plaf/ButtonUI.java, + javax/swing/plaf/ColorChooserUI.java, + javax/swing/plaf/ColorUIResource.java, + javax/swing/plaf/ComboBoxUI.java, + javax/swing/plaf/ComponentInputMapUIResource.java, + javax/swing/plaf/ComponentUI.java, + javax/swing/plaf/DesktopIconUI.java, + javax/swing/plaf/DesktopPaneUI.java, + javax/swing/plaf/DimensionUIResource.java, + javax/swing/plaf/FileChooserUI.java, + javax/swing/plaf/FontUIResource.java, + javax/swing/plaf/IconUIResource.java, + javax/swing/plaf/InputMapUIResource.java, + javax/swing/plaf/InsetsUIResource.java, + javax/swing/plaf/InternalFrameUI.java, + javax/swing/plaf/LabelUI.java, + javax/swing/plaf/ListUI.java, + javax/swing/plaf/MenuBarUI.java, + javax/swing/plaf/MenuItemUI.java, + javax/swing/plaf/OptionPaneUI.java, + javax/swing/plaf/PanelUI.java, + javax/swing/plaf/ProgressBarUI.java, + javax/swing/plaf/RootPaneUI.java, + javax/swing/plaf/ScrollBarUI.java, + javax/swing/plaf/ScrollPaneUI.java, + javax/swing/plaf/SeparatorUI.java, + javax/swing/plaf/SliderUI.java, + javax/swing/plaf/TableHeaderUI.java, + javax/swing/plaf/TableUI.java, + javax/swing/plaf/ToolBarUI.java, + javax/swing/plaf/ToolTipUI.java, + javax/swing/plaf/ViewportUI.java: + New versions from classpath. + * javax/swing/plaf/SpinnerUI.java: + New file from classpath + + 2003-06-25 Michael Koch + + * java/awt/image/ColorModel.java: + New version from classpath. + + 2003-06-25 Michael Koch + + * java/net/PlainDatagramSocketImpl.java: + Partly merged with classpath, this mainly adds documentation. + + 2003-06-25 Michael Koch + + * java/io/ObjectInputStream.java + (readClassDescriptor): New method. + (readObject): Moved functionality to readClassDescriptor(). + * java/io/ObjectOutputStream.java + (writeClassDescriptor): New method. + (writeObject): Moved functionality to writeClassDescriptor(). + + 2003-06-25 Michael Koch + + * javax/swing/plaf/basic/BasicListUI.java, + javax/swing/plaf/basic/BasicOptionPaneUI.java: + Added missing methods. + + 2003-06-25 Michael Koch + + * javax/swing/event/AncestorEvent.java + javax/swing/event/HyperlinkEvent.java + javax/swing/event/InternalFrameEvent.java + javax/swing/event/ListDataEvent.java + javax/swing/event/TableModelEvent.java: + Compile fixes. + + 2003-06-24 Michael Koch + + * java/net/URL.java: + Renamed "handler" to "ph" in the whole file to match classpaths + version. + * java/net/URLStreamHandler.java: + (equals): Renamed "handler" to "ph". + + 2003-06-24 Michael Koch + + * javax/swing/event/AncestorEvent.java, + javax/swing/event/HyperlinkEvent.java, + javax/swing/event/InternalFrameEvent.java, + javax/swing/event/ListDataEvent.java, + javax/swing/event/TableModelEvent.java, + javax/swing/event/TreeWillExpandListener.java, + javax/swing/plaf/ComponentUI.java, + javax/swing/plaf/DesktopIconUI.java, + javax/swing/plaf/DesktopPaneUI.java, + javax/swing/plaf/DimensionUIResource.java, + javax/swing/plaf/FileChooserUI.java, + javax/swing/plaf/FontUIResource.java, + javax/swing/plaf/IconUIResource.java, + javax/swing/plaf/InputMapUIResource.java, + javax/swing/plaf/InsetsUIResource.java, + javax/swing/plaf/InternalFrameUI.java, + javax/swing/plaf/LabelUI.java, + javax/swing/plaf/ListUI.java, + javax/swing/plaf/MenuBarUI.java, + javax/swing/plaf/MenuItemUI.java, + javax/swing/plaf/OptionPaneUI.java, + javax/swing/plaf/PanelUI.java, + javax/swing/plaf/ProgressBarUI.java, + javax/swing/plaf/doc-files/ComponentUI-1.dia, + javax/swing/plaf/doc-files/ComponentUI-1.png: + New versions from classpath. + + 2003-06-24 Michael Koch + + * java/nio/Buffer.java + (cap): Made package-private. + (pos): Likewise. + (limit): Likewise. + (mark): Likewise. + + 2003-06-24 Michael Koch + + * java/net/SocketImpl.java + (shutdownInput): Made it non-abstract method throwing an exception + like in SUNs JRE. + (shutdownOutput): Likewise. + * java/net/SocketInputStream.java, + java/net/SocketOutputStream.java: + New files from classpath. + + 2003-06-24 Michael Koch + + * java/awt/Font.java, + java/awt/Window.java, + java/awt/color/ColorSpace.java, + java/awt/datatransfer/StringSelection.java, + java/awt/image/ColorModel.java: + New versions from classpath. + + 2003-06-24 Michael Koch + + * Makefile.am + (awt_java_source_files): Added new files: + javax/swing/plaf/basic/BasicSplitPaneDivider.java, + javax/swing/plaf/basic/BasicSplitPaneUI.java + * Makefile.in: Regenerated. + + 2003-06-24 Michael Koch + + * javax/swing/text/JTextComponent.java: + New version from classpath. + + 2003-06-24 Michael Koch + + * javax/swing/Timer.java, + javax/swing/plaf/ActionMapUIResource.java, + javax/swing/plaf/ButtonUI.java, + javax/swing/plaf/ColorChooserUI.java, + javax/swing/plaf/ColorUIResource.java, + javax/swing/plaf/ComboBoxUI.java, + javax/swing/plaf/ComponentInputMapUIResource.java, + javax/swing/plaf/basic/BasicBorders.java: + New versions from classpath. + * javax/swing/plaf/basic/BasicSplitPaneDivider.java. + javax/swing/plaf/basic/BasicSplitPaneUI.java: + New file from classpath. + * javax/swing/plaf/basic/doc-files/BasicBorders-1.png, + javax/swing/plaf/basic/doc-files/BasicBorders-2.png, + javax/swing/plaf/basic/doc-files/BasicBorders.FieldBorder-1.png, + javax/swing/plaf/doc-files/ComponentUI-1.dia, + javax/swing/plaf/doc-files/ComponentUI-1.png: + New binary files from classpath. + + 2003-06-24 Michael Koch + + * java/io/LineNumberReader.java + (skip): Dont do line number accounting here as this is already done in + read(), simplified. + + 2003-06-21 Michael Koch + + * java/io/File.java + (static): Load javaio lib if existing (only in classpath). + (File): Revised documentation to show the correct argument name. + (createTempFile): Partly merged with classpath. + (compareTo): Simplified. + (lastModified): Throw exception if time < 0. + (deleteOnExit): Revised documentation. + + 2003-06-21 Michael Koch + + * java/net/PlainSocketImpl.java: + Reformatted. + (PlainSocketImpl): Merged class documentaion with classpath. + (in): Moved. + (out): Moved. + (PlainSocketImpl): New empty constructor. + (finalize): Moved. + (setOption): Merged documentation from classpath. + (getOption): Likewise. + (create): Likewise. + (connect): Likewise. + (bind): Likewise. + (listen): Likewise. + (accept): Likewise. + (available): Likewise. + (close): Likewise. + (read): Likewise. + (write): Likewise. + (getInputStream): Made synchronozed to get sure that only one stream + object can be created for this socket, merged documentation from + classpath. + (getOutputStream): Likewise. + + 2003-06-21 Michael Koch + + * java/net/PlainSocketImpl.java: + Reformatting. + (static): New implicit method. + (read): Made package private. + (write): Likewise. + + 2003-06-21 Michael Koch + + * java/util/SimpleTimeZone.java: + Removed unneeded import, reformatting. + + 2003-06-21 Michael Koch + + * java/text/DateFormat.java, + java/text/SimpleDateFormat.java, + java/util/Locale.java: + New versions from classpath. + + 2003-06-21 Michael Koch + + * javax/swing/SpinnerModel.java: + New file from classpath. + * javax/swing/border/LineBorder.java, + javax/swing/border/SoftBevelBorder.java, + javax/swing/plaf/BorderUIResource.java, + javax/swing/plaf/basic/BasicBorders.java: + New versions from classpath. + * javax/swing/plaf/basic/doc-files/BasicBorders.MenuBarBorder-1.png, + javax/swing/plaf/basic/doc-files/BasicBorders.RadioButtonBorder-1.png, + javax/swing/plaf/basic/doc-files/BasicBorders.SplitPaneBorder-1.png, + javax/swing/plaf/basic/doc-files/BasicBorders.SplitPaneBorder-2.png, + javax/swing/plaf/basic/doc-files/BasicBorders.SplitPaneDividerBorder-1.png, + javax/swing/plaf/basic/doc-files/BasicBorders.ToggleButtonBorder-1.png: + New binary files from classpath. + + 2003-06-21 Michael Koch + + * java/util/logging/LogRecord.java, + java/util/logging/Logger.java, + java/util/logging/SocketHandler.java, + java/util/logging/SimpleFormatter.java, + java/util/logging/Formatter.java, + java/util/logging/ErrorManager.java, + java/util/logging/Handler.java, + java/util/logging/FileHandler.java, + java/util/logging/LogManager.java, + java/util/logging/Level.java, + java/util/logging/ConsoleHandler.java, + java/util/logging/StreamHandler.java, + java/util/logging/LoggingPermission.java, + java/util/logging/Filter.java, + java/util/logging/MemoryHandler.java, + java/util/logging/XMLFormatter.java: + New files from classpath. + + 2003-06-20 Michael Koch + + * java/io/ObjectStreamField.java + (unshared): new member variable. + (ObjectStreamField): New constructor. + (isUnshared): New method. + + 2003-06-20 Michael Koch + + * java/net/URLStreamHandler.java + (hostsEqual): Rewritten. + + 2003-06-20 Michael Koch + + * gnu/java/nio/MappedByteFileBuffer.java, + gnu/java/nio/natMappedByteFileBuffer.cc: + Removed + * java/nio/MappedByteBufferImpl.java: + New file. + * gnu/java/nio/FileChannelImpl.java: + Use MappedByteBufferImpl instead of MappedByteFileBuffer. + * Makefile.am + (ordinary_java_source_files): Removed + gnu/java/nio/MappedByteFileBuffer.java and added + java/nio/MappedByteBufferImpl.java. + (nat_source_files): Removed gnu/java/nio/natMappedByteFileBuffer.cc + * Makefile.in: Regenerated. + + 2003-06-19 Michael Koch + + * gnu/java/nio/DatagramChannelImpl.java + (fd): Removed. + (blocking): New member variable. + (socket): Likewise. + (DatagramChannelImpl): Throws IOException, initialize socket. + (socket):Implemented. + (implCloseSelectableChannel): Throws IOException, implemented. + (implConfigureBlocking): Likewise. + (connect): Likewise. + (disconnect): Likewise. + (isConnected): Likewise. + (write): Likewise. + (read): Likewise. + (receive): Throws IOException. + (send): Likewise. + * gnu/java/nio/SocketChannelImpl.java + (read): Implemented. + (write): Implemented. + + 2003-06-19 Michael Koch + + * javax/swing/JComponent.java, + javax/swing/JInternalFrame.java, + javax/swing/MenuSelectionManager.java, + javax/swing/SwingUtilities.java, + javax/swing/ToggleButtonModel.java: + New versions from classpath. + + 2003-06-19 Michael Koch + + * java/text/CollationElementIterator.java + (NULLORDER): Initialize with -1 as JDK documentation says. + + 2003-06-19 Michael Koch + + * java/net/HttpURLConnection.java, + java/net/Inet4Address.java, + java/net/Inet6Address.java, + java/net/SocketImpl.java, + java/net/URLClassLoader.java: + Reworked import statements. + * java/net/InetAddress.java + (getByAddress): Simplified. + * java/net/ServerSocket.java + (ServerSocket): Moved special handling during bind operation to + bind(). + (bind): Handle different cases when trying to bind a socket. + * java/net/URLConnection.java + (getHeaderFieldDate): Merged with classpath. + (getHeaderFieldInt): Likewise. + + 2003-06-19 Michael Koch + + * java/util/zip/InflaterInputStream.java + (InflaterInputStream): Throw NullPointerException if in is null (as + JDK does). + + 2003-06-19 Michael Koch + + * java/awt/Font.java + javax/swing/UIManager.java + javax/swing/border/AbstractBorder.java + javax/swing/border/BevelBorder.java + javax/swing/border/Border.java + javax/swing/border/CompoundBorder.java + javax/swing/border/EmptyBorder.java + javax/swing/border/EtchedBorder.java + javax/swing/border/LineBorder.java + javax/swing/border/MatteBorder.java + javax/swing/border/TitledBorder.java + javax/swing/plaf/BorderUIResource.java + javax/swing/plaf/basic/BasicBorders.java + javax/swing/plaf/basic/BasicButtonUI.java + javax/swing/plaf/basic/BasicCheckBoxUI.java + javax/swing/plaf/basic/BasicGraphicsUtils.java + javax/swing/plaf/basic/BasicLabelUI.java + javax/swing/plaf/basic/BasicRadioButtonUI.java + javax/swing/plaf/basic/BasicToggleButtonUI.java: + New versions from classpath. + * javax/swing/border/SoftBevelBorder.java: + New file from classpath. + * javax/swing/border/doc-files/LineBorder-1.png, + javax/swing/border/doc-files/BevelBorder-1.png, + javax/swing/border/doc-files/BevelBorder-2.png, + javax/swing/border/doc-files/BevelBorder-3.png, + javax/swing/border/doc-files/EmptyBorder-1.png, + javax/swing/border/doc-files/EtchedBorder-1.png, + javax/swing/border/doc-files/EtchedBorder-2.png, + javax/swing/border/doc-files/MatteBorder-1.png, + javax/swing/border/doc-files/MatteBorder-2.png, + javax/swing/border/doc-files/MatteBorder-3.png, + javax/swing/border/doc-files/MatteBorder-4.png, + javax/swing/border/doc-files/MatteBorder-5.png, + javax/swing/border/doc-files/MatteBorder-6.png, + javax/swing/border/doc-files/SoftBevelBorder-1.png, + javax/swing/border/doc-files/SoftBevelBorder-2.png, + javax/swing/border/doc-files/SoftBevelBorder-3.png, + javax/swing/plaf/basic/doc-files/BasicBorders.MarginBorder-1.png, + javax/swing/plaf/basic/doc-files/BasicBorders.ButtonBorder-1.png, + javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-1.png, + javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-2.png, + javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-3.png, + javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-4.png, + javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-5.png, + javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-6.png, + javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-7.png: + New binary files from classpath. + * Makefile.am + (awt_java_source_files): Added + javax/swing/border/SoftBevelBorder.java. + * Makefile.in: Regenerated. + + 2003-06-19 Michael Koch + + * gnu/java/security/x509/X509Certificate.java + (writeReplace): Merged from classpath. + + 2003-06-19 Michael Koch + + * gnu/java/nio/FileChannelImpl.java + (map_address): Made public. + (FileChannelImpl): Merged with classpath. + * gnu/java/nio/natFileChannelImpl.cc + (nio_mmap_file): Commented out unused arguments. + (nio_unmmap_file): Likewise. + (niu_msync): Likewise. + + 2003-06-19 Michael Koch + + * java/awt/image/IndexColorModel.java: + New version from classpath. + + 2003-06-18 Tom Tromey + + * java/net/Inet6Address.java (isAnyLocalAddress): Don't use "==" + on arrays. + (isLoopbackAddress): Likewise. + * java/net/Inet4Address.java (isAnyLocalAddress): Don't use "==" + on arrays. + + 2003-06-18 Matt Kraai + + * java/lang/natVMSecurityManager.cc (getClassContext): + Use maxlen instead of len for loop bound. + + 2003-06-18 Michael Koch + + * gnu/java/nio/SelectorImpl.java + (register): Use fd with value 0 for now, will be fixed later. + * gnu/java/nio/ServerSocketChannelImpl.java + (fd): Removed. + (local_port): Removed. + (InetSocketAddress): Removed. + (ServerSocketChannelImpl): Just initialize internal socket object. + (implCloseSelectableChannel): Close internal socket object. + (implConfigureBlocking): Added comment. + (accept): Use jaba.net stuff to accept socket. + * gnu/java/nio/SocketChannelImpl.java + (fd): Removed. + (local_port): Removed. + (InetSocketAddress): Removed. + (SocketCreate): Removed. + (SocketConnect): Removed. + (SocketBind): Removed. + (SocketListen): Removed. + (SocketAvailable): Removed. + (SocketClose): Removed. + (SocketRead): Removed. + (SocketWrite): Removed. + (SocketChannelImpl): Just initialize internal socket object. + (implCloseSelectableChannel): Close internal socket object. + (implConfigureBlocking): Fixed implementation, added comment. + (connect): Use internal socket object to connect. + (socket): No need for sanity checks. + (read): Comment out some stuff, this will be reimplemented in the next + commit. + (write): Likewise. + * gnu/java/nio/natFileChannelImpl.cc + (nio_mmap_file): Line wrapped. + * gnu/java/nio/natSocketChannelImpl.cc: Removed. + * Makefile.am + (nat_source_files): Removeded gnu/java/nio/natSocketChannelImpl.cc. + * Makefile.in: Regenerated. + + 2003-06-18 Michael Koch + + * java/util/Locale.java + (equals): Merged from classpath. + + 2003-06-18 Michael Koch + + * java/net/InetAddress.java: + Reformatted to better match classpath's version. + * java/net/URL.java + (equals): Simplified. + * java/net/URLConnection.java + (setDoInput): Revised documentation. + (getDefaultUseCaches): Likewise. + (setRequestProperty): Added @since tag. + + 2003-06-17 Michael Koch + + * java/net/InetSocketAddress.java + (InetSocketAddress): Use wildcard address if addr is null. + (InetSocketAddress): Dont duplicate implementation. + (InetSocketAddress): Throw exception when hostname is null. + * java/net/Socket.java: + Reworked imports. + (Socket): Throw exception when raddr is null, handle case when laddr + is null. + + 2003-06-17 Michael Koch + + * java/nio/DirectByteBufferImpl.java + (address): Made package private. + (DirectByteBufferImpl): New constructor. + * java/nio/natDirectByteBufferImpl.cc + (allocateImpl): Moved to java.nio namespace, implemented. + (freeImpl): Likewise. + (getImpl): Likewise. + (putImpl): Likewise. + * jni.cc + (_Jv_JNI_NewDirectByteBuffer): Implemented. + (_Jv_JNI_GetDirectBufferAddress): Implemented. + (_Jv_JNI_GetDirectBufferCapacity): Implemented. + 2003-06-17 Franz Sirl * include/powerpc-signal.h: New File. * configure.in: Use it. * configure: Regenerated. ! 2003-06-17 Michael Koch ! * java/util/Locale.java ! (getDisplayLanguage): Made it final. ! (getDisplayCountry): Likewise. ! (getDisplayVariant): Likewise. ! (getDisplayName): Likewise. ! ! 2003-06-17 Michael Koch ! ! * java/util/PropertyResourceBundle.java: ! Removed unneeded import. ! ! 2003-06-17 Michael Koch ! ! * java/util/prefs/AbstractPreferences.java, ! java/util/prefs/PreferencesFactory.java: ! Reworked imports, removed unused imports. ! * java/util/prefs/Preferences.java ! (systemNodeForPackage): Method takes a Class not an Object. ! (userNodeForPackage): Likewise. ! (nodeForPackage): Likewise. ! ! 2003-06-17 Michael Koch ! ! * gnu/java/security/x509/X509Certificate.java: ! Explicitely import used classes. ! ! 2003-06-17 Michael Koch ! ! * java/util/zip/ZipEntry.java, ! java/util/zip/ZipFile.java, ! java/util/zip/ZipInputStream.java, ! java/util/zip/ZipOutputStream.java: ! Reworked imports, only import used classes. ! ! 2003-06-17 Michael Koch ! ! * gnu/java/lang/ArrayHelper.java, ! gnu/java/lang/ClassHelper.java: ! Reformatted to match classpath's versions. ! ! 2003-06-14 Michael Koch ! ! * gnu/java/nio/FileChannelImpl.java ! (map_address): Removed incorrect comment. ! * gnu/java/nio/SelectorImpl.java ! (register): Remove code duplication and code for file channel handling. ! * gnu/java/nio/ServerSocketChannelImpl.java ! (serverSocket): Renamed from sock_object. ! (ServerSocketChannel): Initialize serverSocket. ! (socket): Return serverSocket. ! * gnu/java/nio/SocketChannelImpl.java ! (socket): Renamed from sock_object. ! (isConnectionPenging): Simplified. ! (socket): Return socket. ! 2003-06-14 Michael Koch ! ! * java/security/BasicPermission.java: ! New version from classpath. ! ! 2003-06-14 Michael Koch ! ! * javax/naming/directory/Attribute.java: ! New version from classpath. ! ! 2003-06-14 Michael Koch ! ! * java/io/BufferedReader.java, ! java/io/FileOutputStream.java: ! New versions from classpath. ! ! 2003-06-12 Andrew Haley ! ! * prims.cc (catch_segv): Create exception in handler. ! (catch_fpe): Likewise. ! (_Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ): Likewise. ! (_Jv_ThrowSignal): Remove. ! ! * include/x86_64-signal.h (INIT_SEGV): Delete reference to nullp. ! * include/default-signal.h (INIT_SEGV, INIT_FPE): Delete reference ! to nullp and arithexception. ! * include/dwarf2-signal.h (INIT_SEGV, INIT_FPE): Likewise. ! * include/i386-signal.h (INIT_SEGV, INIT_FPE): Likewise. ! * include/s390-signal.h (INIT_SEGV, INIT_FPE): Likewise. ! * include/sparc-signal.h (INIT_SEGV, INIT_FPE): Likewise. ! * include/win32-signal.h (INIT_SEGV, INIT_FPE): Likewise. ! ! 2003-06-11 Andrew Haley ! ! * jni.cc (_Jv_JNI_check_types): New. ! (_Jv_JNI_SetPrimgitiveArrayRegion): Check array type. ! (_Jv_JNI_GetPrimitiveArrayRegion): Ditto. ! (_Jv_JNI_GetPrimitiveArrayElements): Ditto. ! (_Jv_JNI_ReleasePrimitiveArrayElements): Ditto. ! ! * java/lang/natVMSecurityManager.cc (getClassContext): Fix ! infinite loop. ! ! 2003-06-11 Tom Tromey ! ! * java/lang/ClassLoader.java (loadClass): Not deprecated. ! * java/io/PrintStream.java: Not deprecated. ! ! 2003-06-11 Scott Gilbertson ! ! * gnu/awt/j2d/IntegerGraphicsState.java (drawOval): implemented. ! (fillOval): implemented ! * gnu/awt/xlib/XGraphics.java (drawArc): implemented. ! (fillArc): implemented. ! * gnu/gcj/xlib/GC.java (drawArc): added native method. ! (fillArc): added native method. ! * gnu/gcj/xlib/natGC.cc (drawArc): added native method. ! (fillArc): added native method. ! ! 2003-06-11 Michael Koch ! ! * java/awt/im/InputSubset.java: ! New version from classpath. ! ! 2003-06-11 Michael Koch ! ! * javax/swing/AbstractAction.java, ! javax/swing/AbstractButton.java, ! javax/swing/AbstractCellEditor.java, ! javax/swing/AbstractListModel.java, ! javax/swing/BorderFactory.java, ! javax/swing/Box.java, ! javax/swing/BoxLayout.java, ! javax/swing/ButtonGroup.java, ! javax/swing/DefaultButtonModel.java, ! javax/swing/DefaultListModel.java, ! javax/swing/DefaultListSelectionModel.java, ! javax/swing/FocusManager.java, ! javax/swing/ImageIcon.java, ! javax/swing/InputMap.java, ! javax/swing/JApplet.java, ! javax/swing/JButton.java, ! javax/swing/JCheckBox.java, ! javax/swing/JCheckBoxMenuItem.java, ! javax/swing/JColorChooser.java, ! javax/swing/JComboBox.java, ! javax/swing/JComponent.java, ! javax/swing/JDesktopPane.java, ! javax/swing/JDialog.java, ! javax/swing/JEditorPane.java, ! javax/swing/JFileChooser.java, ! javax/swing/JFormattedTextField.java, ! javax/swing/JFrame.java, ! javax/swing/JLabel.java, ! javax/swing/JLayeredPane.java, ! javax/swing/JList.java, ! javax/swing/JMenuBar.java, ! javax/swing/JMenuItem.java, ! javax/swing/JOptionPane.java, ! javax/swing/JPanel.java, ! javax/swing/JPasswordField.java, ! javax/swing/JPopupMenu.java, ! javax/swing/JProgressBar.java, ! javax/swing/JRadioButton.java, ! javax/swing/JRadioButtonMenuItem.java, ! javax/swing/JRootPane.java, ! javax/swing/JScrollBar.java, ! javax/swing/JScrollPane.java, ! javax/swing/JSeparator.java, ! javax/swing/JSlider.java, ! javax/swing/JTabbedPane.java, ! javax/swing/JTable.java, ! javax/swing/JTextField.java, ! javax/swing/JToggleButton.java, ! javax/swing/JToolBar.java, ! javax/swing/JToolTip.java, ! javax/swing/JTree.java, ! javax/swing/JViewport.java, ! javax/swing/JWindow.java, ! javax/swing/KeyStroke.java, ! javax/swing/ListSelectionModel.java, ! javax/swing/LookAndFeel.java, ! javax/swing/RepaintManager.java, ! javax/swing/ScrollPaneLayout.java, ! javax/swing/SizeRequirements.java, ! javax/swing/SwingConstants.java, ! javax/swing/Timer.java, ! javax/swing/UIDefaults.java, ! javax/swing/UIManager.java, ! javax/swing/border/AbstractBorder.java, ! javax/swing/border/CompoundBorder.java, ! javax/swing/colorchooser/AbstractColorChooserPanel.java, ! javax/swing/colorchooser/ColorChooserComponentFactory.java, ! javax/swing/colorchooser/ColorSelectionModel.java, ! javax/swing/colorchooser/DefaultColorSelectionModel.java, ! javax/swing/event/AncestorEvent.java, ! javax/swing/event/HyperlinkEvent.java, ! javax/swing/event/InternalFrameAdapter.java, ! javax/swing/event/InternalFrameEvent.java, ! javax/swing/event/ListDataEvent.java, ! javax/swing/event/MouseInputAdapter.java, ! javax/swing/event/SwingPropertyChangeSupport.java, ! javax/swing/event/TableModelEvent.java, ! javax/swing/event/TreeWillExpandListener.java, ! javax/swing/event/UndoableEditEvent.java, ! javax/swing/filechooser/FileFilter.java, ! javax/swing/filechooser/FileSystemView.java, ! javax/swing/filechooser/FileView.java, ! javax/swing/plaf/BorderUIResource.java, ! javax/swing/plaf/basic/BasicDefaults.java, ! javax/swing/table/AbstractTableModel.java, ! javax/swing/table/DefaultTableCellRenderer.java, ! javax/swing/table/DefaultTableColumnModel.java, ! javax/swing/table/DefaultTableModel.java, ! javax/swing/table/TableColumn.java, ! javax/swing/text/JTextComponent.java, ! javax/swing/tree/AbstractLayoutCache.java, ! javax/swing/tree/DefaultMutableTreeNode.java, ! javax/swing/tree/DefaultTreeCellEditor.java, ! javax/swing/tree/DefaultTreeCellRenderer.java, ! javax/swing/tree/DefaultTreeModel.java, ! javax/swing/tree/DefaultTreeSelectionModel.java, ! javax/swing/tree/FixedHeightLayoutCache.java, ! javax/swing/tree/TreeCellEditor.java, ! javax/swing/tree/TreeModel.java, ! javax/swing/tree/TreeNode.java, ! javax/swing/tree/TreePath.java, ! javax/swing/tree/TreeSelectionModel.java, ! javax/swing/tree/VariableHeightLayoutCache.java, ! javax/swing/undo/AbstractUndoableEdit.java, ! javax/swing/undo/CompoundEdit.java, ! javax/swing/undo/StateEdit.java, ! javax/swing/undo/UndoManager.java, ! javax/swing/undo/UndoableEditSupport.java: ! New versions from classpath. ! * javax/swing/table/JTableHeader.java: ! New file from classpath. ! * Makefile.am ! (java_awt_sources): Added javax/swing/table/JTableHeader.java. ! * Makefile.in: Regenerated. ! ! 2003-06-11 Michael Koch ! ! * java/nio/MappedByteBuffer.java, ! java/nio/channels/Channels.java, ! java/nio/channels/ServerSocketChannel.java, ! java/nio/channels/spi/AbstractSelector.java: ! Removed unneeded imports. ! ! 2003-06-11 Michael Koch ! ! * java/net/DatagramSocket.java: ! Partly merged with classpath. ! ! 2003-06-11 Michael Koch ! ! * java/awt/Frame.java, ! java/awt/Graphics.java, ! java/awt/Menu.java, ! java/awt/Robot.java, ! java/awt/image/ColorModel.java: ! New versions from classpath. ! ! 2003-06-10 Michael Koch ! ! * java/io/PrintStream.java: ! Merged version from classpath. ! (close): Removed sychronized keyword. This class is not garantied to ! be thread-safe. ! (write): Likewise. ! ! 2003-06-09 Tom Tromey ! ! * gnu/gcj/xlib/natFont.cc (getAscent): Correctly access "ascent" ! field. ! (getDescent): Likewise, for "descent". ! ! 2003-06-09 Scott Gilbertson ! ! * gnu/gcj/xlib/natFont.cc (getMaxAscent): adjusted return value. ! (getMaxDescent): adjusted return value. ! (getAscent): modified to use metrics for 'O'. ! (getDescent): modified to use metrics for 'y'. ! ! 2003-06-08 Anthony Green ! ! * java/net/URLStreamHandler.java (sameFile): Fix port value ! comparison. ! * java/net/URL.java (handler): Make package private. ! * gnu/gcj/protocol/http/Handler.java (getDefaultPort): New method. ! ! 2003-06-07 Tom Tromey ! ! For PR libgcj/11085: ! * java/text/SimpleDateFormat.java (parse(String,ParsePosition)): ! Limit number of characters in numeric field when required. ! * java/text/DecimalFormat.java (parse(String,ParsePosition)): ! Respect maximumIntegerDigits. ! ! 2003-06-08 Michael Koch ! ! * java/net/Socket.java ! (Socket): Dont initialize inputShutdown and outputShutdown twice, ! call bind() and connect() to actually do the bind and connect tasks. ! (bind): Connect to canonical address if bindpoint is null, create ! socket and bind it to bindpoint. ! (connect): Check for exceptions. ! ! 2003-06-08 Michael Koch ! ! * java/net/DatagramSocket.java ! (DatagramSocket): No need to set SO_REUSEADDRESS here. This belongs ! into the Multicast constructors. ! * java/net/DatagramSocketImpl.java ! (getOption): Removed. ! (setOption): Removed. ! * java/net/MulticastSocket.java ! (MulticastSocket): Call setReuseAddress (true). ! * java/net/SocketImpl.java ! (getOption): Removed. ! (setOption): Removed. ! ! 2003-06-07 Jeff Sturm ! ! PR libgcj/10886: ! * gnu/java/rmi/server/UnicastRemoteCall.java (returnValue): ! Test for empty vector. 2003-06-06 Mark Wielaard *************** *** 116,140 **** * java/io/OutputStreamWriter.java (writeChars(char[], int, int)): Check converter.havePendingBytes() and flush buffer when stalled. ! * mauve-libgcj: Don't ignore java.lang.String.surrogate. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. 2003-05-06 Tom Tromey * verify.cc: Reverted previous patch. ! 2003-05-01 Tom Tromey PR libgcj/10582: * verify.cc (_Jv_BytecodeVerifier::is_assignable_from_slow): --- 7410,8346 ---- * java/io/OutputStreamWriter.java (writeChars(char[], int, int)): Check converter.havePendingBytes() and flush buffer when stalled. ! 2003-06-07 Michael Koch ! * include/posix.h ! (O_DSYNC): Define O_DSYNC on platforms not ! supporting O_FSYNC (newlib). ! 2003-06-06 Mark Wielaard ! * java/awt/Toolkit.java (getDefaultToolkit): Add exception cause to ! AWTError. ! 2003-06-06 Michael Koch ! * javax/swing/plaf/basic/BasicOptionPaneUI.java: ! More compile fixes from my stupid work yesterday. ! 2003-06-05 Matt Kraai ! ! * java/lang/w_exp.c (o_threshold, u_threshold): Define only ! if _IEEE_LIBM is undefined. ! ! 2002-06-05 Loren J. Rittle ! ! * libjava/include/posix.h (O_SYNC): Define if not available ! and a reasonable, perhaps more conservative, replacement exists. ! (O_DSYNC): Likewise. ! * java/io/natFileDescriptorPosix.cc (open): Revert last patch. ! ! 2003-06-05 Michael Koch ! ! * javax/swing/plaf/BorderUIResource.java, ! javax/swing/plaf/basic/BasicDefaults.java, ! javax/swing/plaf/basic/BasicOptionPaneUI.java: ! More compile fixes for latest Border commit. I should not commit ! something in this heat here ... ! ! 2003-06-05 Michael Koch ! ! * javax/swing/border/BevelBorder.java ! (BevelBorder): Removed. ! * javax/swing/border/EmptyBorder.java: ! Reformatted. ! (EmptyBorder): Removed. ! (getBorderInsets): Dont use l, r, t and b. ! * javax/swing/border/EtchedBorder.java ! (EtchedBorder): Removed. ! * javax/swing/border/LineBorder.java ! (LineBorder): Removed. ! * javax/swing/border/MatteBorder.java ! (MatteBorder): Removed. ! * javax/swing/border/TitledBorder.java ! (defaultBorder): Use other default for now. ! (defaultFont): Likewise. ! (defaultColor): Likewise. ! ! 2003-06-05 Michael Koch ! ! * javax/swing/border/Border.java: ! New version from classpath. ! ! 2003-06-05 Michael Koch ! ! * javax/swing/border/AbstractBorder.java, ! javax/swing/border/BevelBorder.java, ! javax/swing/border/CompoundBorder.java, ! javax/swing/border/EmptyBorder.java, ! javax/swing/border/EtchedBorder.java, ! javax/swing/border/LineBorder.java, ! javax/swing/border/MatteBorder.java, ! javax/swing/border/TitledBorder.java: ! New versions from Classpath. ! ! 2003-06-05 Michael Koch ! ! * java/awt/Button.java, ! java/awt/Checkbox.java, ! java/awt/CheckboxMenuItem.java, ! java/awt/Choice.java, ! java/awt/Container.java, ! java/awt/Dialog.java, ! java/awt/EventQueue.java, ! java/awt/FileDialog.java, ! java/awt/Frame.java, ! java/awt/Label.java, ! java/awt/List.java, ! java/awt/Menu.java, ! java/awt/MenuItem.java, ! java/awt/Panel.java, ! java/awt/PopupMenu.java, ! java/awt/Rectangle.java, ! java/awt/ScrollPane.java, ! java/awt/Scrollbar.java, ! java/awt/TextArea.java, ! java/awt/TextField.java, ! java/awt/Window.java, ! java/awt/datatransfer/DataFlavor.java, ! java/awt/dnd/DragSource.java, ! java/awt/dnd/DragSourceContext.java, ! java/awt/event/HierarchyEvent.java, ! java/awt/event/MouseWheelEvent.java, ! java/awt/im/InputContext.java, ! java/awt/image/BufferedImage.java, ! java/awt/image/ComponentColorModel.java, ! java/awt/image/Raster.java, ! java/awt/image/WritableRaster.java, ! java/awt/peer/ComponentPeer.java, ! java/awt/print/PageFormat.java, ! java/awt/print/PrinterJob.java: ! New versions from Classpath. ! ! 2003-06-05 Scott Gilbertson ! ! * java/text/SimpleDateFormat.java (SimpleDateFormat): Added ! numberFormat.setParseIntegerOnly(true). ! ! 2003-06-05 Bert Deknuydt ! ! * include/posix-threads.h: Include on OSF. ! ! 2003-06-03 Andrew Haley ! ! * include/x86_64-signal.h (MAKE_THROW_FRAME): Mark sigcontext on ! stack volatile to prevent optimization from removing it. ! ! 2003-05-27 Michael Koch ! ! * java/util/zip/Deflater.java ! (FILTERED): Merged documentation from classpath. ! * java/util/zip/DeflaterOutputStream.java ! (DeflaterOutputStream): Merged documentation and argument validity ! check from classpath. ! (deflate): Merged documentation from classpath. ! (finish): Likewise. ! * java/util/zip/Inflater.java ! (Inflater): Merged class documentation from classpath. ! (zstream): Reordered. ! (is_finished): Reordered. ! (dict_needed): Reordered. ! (Inflater): Reordered, merged documentation from classpath. ! (end): Likewise. ! (finalize): Merged documentation from classpath. ! (finished): Likewise. ! (getAdler): Likewise. ! (getRemaining): Likewise. ! (getTotalIn): Likewise. ! (getTotalOut): Likewise. ! (inflate): Likewise. ! (needsDictionary): Likewise. ! (needsInput): Likewise. ! (reset): Likewise. ! (setDictionary): Likewise. ! (setInput): Likewise. ! ! 2003-05-27 Michael Koch ! ! * java/net/URLConnection.java ! (getHeaderFieldInt): Merged with classpath. ! ! 2003-05-27 Michael Koch ! ! * java/io/PrintStream.java ! (PrintStream): Reformatted. ! (PrintStream): New method, merged from classpath. ! (write): Reformatted. ! ! 2003-05-27 Michael Koch ! ! * java/lang/System.java: ! Explicitely import needed classes. ! ! 2003-05-26 Michael Koch ! ! * java/net/NetPermission.java, ! java/net/NetworkInterface.java, ! java/net/PasswordAuthentication.java, ! java/net/SocketPermission.java: ! New versions from classpath. ! ! 2003-05-25 Michael Koch ! ! * java/io/PushbackInputStream.java, ! java/net/Authenticator.java, ! java/net/ContentHandler.java, ! java/net/ContentHandlerFactory.java, ! java/net/DatagramSocket.java, ! java/net/DatagramSocketImpl.java, ! java/net/DatagramSocketImplFactory.java, ! java/net/FileNameMap.java, ! java/net/SocketImplFactory.java, ! java/net/SocketOptions.java, ! java/net/URLStreamHandlerFactory.java: ! Merged new versions from classpath. ! ! 2003-05-25 Michael Koch ! ! * java/awt/Checkbox.java, ! java/awt/Dialog.java, ! java/awt/Font.java, ! java/awt/Frame.java, ! java/awt/ScrollPaneAdjustable.java, ! java/awt/Scrollbar.java, ! java/awt/Window.java: ! New versions from classpath. ! ! 2003-05-22 Jeff Sturm ! ! PR libgcj/10838: ! * java/io/ObjectInputStream (enableResolveObject): ! Fixed spelling of permission name. ! ! 2003-05-20 Michael Koch ! ! * java/io/DataInputStream.java ! (convertFromUTF): Merged comment from classpath. ! * java/io/PrintStream.java ! (error_occured): Renamed from error, merged comment from classpath. ! (PrintStream): No need to initialized error. ! (checkError): Replace error with error_occurred. ! (setError): Likewise. + 2003-05-20 Michael Koch + + * java/io/DataInputStream.java: + Reformatted, Replaced < and & with html entitites in documentation. + * java/io/File.java: + Reformatted. + * java/io/PrintWriter.java: + Moved class documentation. + + 2003-05-20 Michael Koch + + * gnu/java/nio/ByteBufferImpl.java, + gnu/java/nio/CharBufferImpl.java, + gnu/java/nio/CharViewBufferImpl.java, + gnu/java/nio/DirectByteBufferImpl.java, + gnu/java/nio/DoubleBufferImpl.java, + gnu/java/nio/DoubleViewBufferImpl.java, + gnu/java/nio/FloatBufferImpl.java, + gnu/java/nio/FloatViewBufferImpl.java, + gnu/java/nio/IntBufferImpl.java, + gnu/java/nio/IntViewBufferImpl.java, + gnu/java/nio/LongBufferImpl.java, + gnu/java/nio/LongViewBufferImpl.java, + gnu/java/nio/natDirectByteBufferImpl.cc, + gnu/java/nio/ShortBufferImpl.java, + gnu/java/nio/ShortViewBufferImpl.java: + Moved files to java/nio. + * gnu/java/nio/SocketChannelImpl.java + + * java/nio/ByteBuffer.java, + java/nio/CharBuffer.java, + java/nio/DoubleBuffer.java, + java/nio/FloatBuffer.java, + java/nio/IntBuffer.java, + java/nio/LongBuffer.java, + java/nio/ShortBuffer.java: + Dont import anything. + * java/nio/ByteBufferImpl.java, + java/nio/CharBufferImpl.java, + java/nio/CharViewBufferImpl.java, + java/nio/DirectByteBufferImpl.java, + java/nio/DoubleBufferImpl.java, + java/nio/DoubleViewBufferImpl.java, + java/nio/FloatBufferImpl.java, + java/nio/FloatViewBufferImpl.java, + java/nio/IntBufferImpl.java, + java/nio/IntViewBufferImpl.java, + java/nio/LongBufferImpl.java, + java/nio/LongViewBufferImpl.java, + java/nio/natDirectByteBufferImpl.cc, + java/nio/ShortBufferImpl.java, + java/nio/ShortViewBufferImpl.java: + Moved from gnu/java/nio. + * Makefile.am + (ordinary_java_source_files): Moved files from gnu/java/nio to + java/nio. + (nat_source_files): Moved natDirectByteBufferImpl.cc from gnu/java/nio + to java/nio. + * Makefile.in: Regenerated. + + 2003-05-19 Michael Koch + + * java/util/Calendar.java + (get): Not final anymore since JDK 1.4 + (set): Likewise. + + 2003-05-19 Michael Koch + + * java/text/CollationKey.java: + Merged copyright and dat from classpath. + * java/text/RuleBasedCollator.java: + Merged class documentation from classpath. + + 2003-05-19 Michael Koch + + * java/nio/CharBuffer.java + (toString): Compile fix. + + 2003-05-19 Michael Koch + + * gnu/java/nio/ByteBufferImpl.java + (putLong): Fixed conversion to bytes. + (putDouble): Fixed conversion to bytes. + * gnu/java/nio/DirectByteBufferImpl.java + (putLong): Fixed conversion to bytes. + (putDouble): Fixed conversion to bytes. + * gnu/java/nio/FileLockImpl.java + (isValid): Reformatted. + * java/nio/Buffer.java + (Buffer): Fixed off-by-one bug in handling mark. + * java/nio/ByteBuffer.java: + Added newline. + * java/nio/CharBuffer.java + (toString): Don't use relative get to get string data. + + 2003-05-16 Michael Koch + + * java/io/natFileDescriptorPosix.cc + (open): Commented out the O_SYNC and O_DSYNC usage until its better + tested. + + 2003-05-14 Michael Koch + + * gnu/java/nio/FileLockImpl.java + (released): New member variable. + (FileLockImpl): Initialize released. + (releaseImpl): New native method. + (release): Implemented. + * gnu/java/nio/SelectorImpl.java: Reformatted. + * gnu/java/nio/SelectionKeyImpl.java: Reformatted. + * gnu/java/nio/ServerSocketChannelImpl.java: Reformatted. + (accept): Throws IOException. + * gnu/java/nio/SocketChannelImpl.java: Reformatted. + (implConfigureBlocking): Throws IOException. + (connect): Likewise. + (read): Likewise. + (write): Likewise. + * gnu/java/nio/natFileLockImpl.cc: New file. + * java/nio/channels/FileLock.java: Reformatted. + * Makefile.am: + (ordinary_java_source_files): Added gnu/java/nio/FileLockImpl.java. + (nat_source_files): Added gnu/java/nio/natFileLockImpl.cc. + * Makefile.in: Regenerated. + + 2003-05-13 Michael Koch + + * gnu/java/nio/CharViewBufferImpl.java + (CharViewBufferImpl): Fixed super constructor call, initialize offset. + (get): Shift bits to the right direction. + (put): Likewise. + * gnu/java/nio/DoubleViewBufferImpl.java + (DoubleViewBufferImpl): Fixed super constructor call, initialize offset. + (get): Shift bits to the right direction. + (put): Likewise. + * gnu/java/nio/FloatViewBufferImpl.java + (FloatViewBufferImpl): Fixed super constructor call, initialize offset. + (get): Shift bits to the right direction. + (put): Likewise. + * gnu/java/nio/IntViewBufferImpl.java + (IntViewBufferImpl): Fixed super constructor call, initialize offset. + (get): Shift bits to the right direction. + (put): Likewise. + * gnu/java/nio/LongViewBufferImpl.java + (LongViewBufferImpl): Fixed super constructor call, initialize offset. + (get): Shift bits to the right direction. + (put): Likewise. + * gnu/java/nio/ShortViewBufferImpl.java + (ShortViewBufferImpl): Fixed super constructor call, initialize offset. + (get): Shift bits to the right direction. + (put): Likewise. + + 2003-05-13 Michael Koch + + * gnu/java/nio/natDirectByteBufferImpl.cc + (allocateImpl): jlong -> RawData*. + (freeImpl): Likewise. + + 2003-05-13 Michael Koch + + * java/nio/channels/FileChannel.java + (MapMode.m): Made it package-private to match JDK 1.4. + * java/nio/charset/Charset.java + (decode): Made it final to match JDK 1.4. + + 2003-05-13 Michael Koch + + * java/io/FileDescriptor.java + (SYNC): New constant. + (DSYNC): Likewise. + (getLength): Renamed from lenght() to match classpath's + FileDescriptor.java. + * java/io/RandomAccessFile.java + (RandomAccessFile): Removed unneeded mode check, implemented mode + "rws" and "rwd", merged documentation from classpath. + (setLength): Reformatted. + (length): Use new getLength() of FileDescriptor. + * java/io/natFileDescriptorEcos.cc + (getLength): Renamed from length(). + * java/io/natFileDescriptorPosix.cc + (open): Implemented support for SYNC and DSYNC. + (seek): Use getLength() instead of length(). + (getLength): Renamed from length(). + * java/io/natFileDescriptorWin32.cc + (getLength): Renamed from length(). + (seek): Use getLength() instead of length(). + (available): Likewise. + * gnu/java/nio/natFileChannelImpl.cc + (size): Use getLength() instead of length(). + + 2003-05-13 Michael Koch + + * gnu/java/nio/ByteBufferImpl.java + (ByteBufferImpl): All constructors revised. + (slice): Reimplemented. + (duplicate): Reimplemented. + (asReadOnlyBuffer): Reimplemented. + * java/nio/ByteBuffer.java: + Reformatted. + (array_offset): Renamed from "offset" to match all other buffer + classes. + (ByteBuffer): All constructors revised. + (allocateDirect): Implemented. + (allocate): New implementation, documentation reworked. + (wrap): Likewise. + (get): Documentation reworked. + (put): New implementation, documentation reworked. + (hasArray): Documentation reworked. + (arrayOffset): Likewise. + (hashCode): Likewise. + (equals): Likewise. + (compareTo): Likewise. + (order): Likewise. + (compact): Likewise. + (isDirect): Likewise. + (slice): Likewise. + (duplicate): Likewise. + (asReadOnlyBuffer): Likewise. + * Makefile.am + (ordinary_java_source_files): + Added gnu/java/nio/DirectByteBufferImpl.java. + (nat_source_files): + Added gnu/java/nio/natDirectByteBufferImpl.cc. + * Makefile.in: Regenerated. + + 2003-05-12 Michael Koch + + * gnu/java/nio/ByteBufferImpl.java: Reformatted. + (nio_get_*): Removed. + (nio_put_*): Removed. + (as*Buffer): Implemented. + (compact): Implemented. + (get): Documentation added. + (put): Documentation added. + (get*): Newly implemented. + (put*): Newly implemented. + * gnu/java/nio/CharBufferImpl.java: Reformatted. + (CharBufferImpl): Revised. + (slice): New implementation. + (duplicate): New implementation. + (compact): New implementation. + (asReadOnlyBuffer): New implementation. + (get): Documentation revised. + (order): Return native byte order. + * gnu/java/nio/DirectByteBufferImpl.java + (allocateDirect): objects can be null not 0. + * gnu/java/nio/DoubleBufferImpl.java: Reformatted. + (DoubleBufferImpl): Revised. + (slice): New implementation. + (duplicate): New implementation. + (compact): New implementation. + (asReadOnlyBuffer): New implementation. + (get): Documentation revised. + (order): Return native byte order. + * gnu/java/nio/FloatBufferImpl.java: Reformatted. + (FloatBufferImpl): Revised. + (slice): New implementation. + (duplicate): New implementation. + (compact): New implementation. + (asReadOnlyBuffer): New implementation. + (get): Documentation revised. + (order): Return native byte order. + * gnu/java/nio/IntBufferImpl.java: Reformatted. + (IntBufferImpl): Revised. + (slice): New implementation. + (duplicate): New implementation. + (compact): New implementation. + (asReadOnlyBuffer): New implementation. + (get): Documentation revised. + (order): Return native byte order. + * gnu/java/nio/LongBufferImpl.java: Reformatted. + (LongBufferImpl): Revised. + (slice): New implementation. + (duplicate): New implementation. + (compact): New implementation. + (asReadOnlyBuffer): New implementation. + (get): Documentation revised. + (order): Return native byte order. + * gnu/java/nio/ShortBufferImpl.java: Reformatted. + (ShortBufferImpl): Revised. + (slice): New implementation. + (duplicate): New implementation. + (compact): New implementation. + (asReadOnlyBuffer): New implementation. + (get): Documentation revised. + (order): Return native byte order. + * java/nio/CharBuffer.java: Reformatted, much documentation rewritten. + (CharBuffer): Revised. + (order): Removed. + * java/nio/DoubleBuffer.java: Reformatted, much documentation rewritten. + (DoubleBuffer): Revised. + (allocateDirect): Removed. + (order): Removed. + * java/nio/FloatBuffer.java: Reformatted, much documentation rewritten. + (FloatBuffer): Revised. + (allocateDirect): Removed. + (order): Removed. + * java/nio/IntBuffer.java: Reformatted, much documentation rewritten. + (IntBuffer): Revised. + (allocateDirect): Removed. + (order): Removed. + * java/nio/LongBuffer.java: Reformatted, much documentation rewritten. + (LongBuffer): Revised. + (allocateDirect): Removed. + (order): Removed. + * java/nio/ShortBuffer.java: Reformatted, much documentation rewritten. + (ShortBuffer): Revised. + (allocateDirect): Removed. + (order): Removed. + * gnu/java/nio/natByteBufferImpl.cc: Removed. + * gnu/java/nio/natCharBufferImpl.cc: Removed. + * Makefile.am + (ordinary_java_source_files): Added the following files: + gnu/java/nio/CharViewBufferImpl.java, + gnu/java/nio/DoubleViewBufferImpl.java, + gnu/java/nio/FloatViewBufferImpl.java, + gnu/java/nio/IntViewBufferImpl.java, + gnu/java/nio/LongViewBufferImpl.java, + gnu/java/nio/ShortViewBufferImpl.java + (nat_source_files): Removed the following files: + gnu/java/nio/natByteBufferImpl.cc, + gnu/java/nio/natCharBufferImpl.cc + * Makefile.in: Regenerated. + + 2003-05-12 Michael Koch + + * gnu/java/nio/CharViewBufferImpl.java, + gnu/java/nio/DirectByteBufferImpl.java, + gnu/java/nio/DoubleViewBufferImpl.java, + gnu/java/nio/FloatViewBufferImpl.java, + gnu/java/nio/IntViewBufferImpl.java, + gnu/java/nio/LongViewBufferImpl.java, + gnu/java/nio/ShortViewBufferImpl.java, + gnu/java/nio/natDirectByteBufferImpl.cc: + New files, not yet to be compiled. + + 2003-05-10 Michael Koch + + * javax/swing/plaf/ButtonUI.java, + javax/swing/plaf/ColorUIResource.java, + javax/swing/plaf/ComponentUI.java, + javax/swing/plaf/DimensionUIResource.java, + javax/swing/plaf/FontUIResource.java, + javax/swing/plaf/IconUIResource.java, + javax/swing/plaf/InsetsUIResource.java, + javax/swing/plaf/LabelUI.java, + javax/swing/plaf/ListUI.java, + javax/swing/plaf/OptionPaneUI.java, + javax/swing/plaf/PanelUI.java, + javax/swing/plaf/TabbedPaneUI.java, + javax/swing/plaf/TextUI.java, + javax/swing/plaf/TreeUI.java, + javax/swing/plaf/ViewportUI.java, + javax/swing/plaf/basic/BasicBorders.java, + javax/swing/plaf/basic/BasicButtonUI.java, + javax/swing/plaf/basic/BasicCheckBoxUI.java, + javax/swing/plaf/basic/BasicDefaults.java, + javax/swing/plaf/basic/BasicGraphicsUtils.java, + javax/swing/plaf/basic/BasicIconFactory.java, + javax/swing/plaf/basic/BasicLabelUI.java, + javax/swing/plaf/basic/BasicListUI.java, + javax/swing/plaf/basic/BasicOptionPaneUI.java, + javax/swing/plaf/basic/BasicPanelUI.java, + javax/swing/plaf/basic/BasicRadioButtonUI.java, + javax/swing/plaf/basic/BasicScrollPaneUI.java, + javax/swing/plaf/basic/BasicTabbedPaneUI.java, + javax/swing/plaf/basic/BasicTextUI.java, + javax/swing/plaf/basic/BasicToggleButtonUI.java, + javax/swing/plaf/basic/BasicTreeUI.java, + javax/swing/plaf/basic/BasicViewportUI.java, + javax/swing/plaf/metal/MetalLookAndFeel.java: + New versions from classpath. This adds copyrights to all files and + some serialVersionUIDs. + + 2003-05-10 Michael Koch + + * java/nio/CharBuffer.java + (offset): Make it package-private. + (backing_buffer): Likewise. + * java/nio/DoubleBuffer.java + (offset): Make it package-private. + (backing_buffer): Likewise. + (put): Reformatted. + * java/nio/FloatBuffer.java + (offset): Make it package-private. + (backing_buffer): Likewise. + * java/nio/IntBuffer.java + (offset): Make it package-private. + (backing_buffer): Likewise. + * java/nio/LongBuffer.java + (offset): Make it package-private. + (backing_buffer): Likewise. + * java/nio/ShortBuffer.java + (offset): Make it package-private. + (backing_buffer): Likewise. + + 2003-05-10 Michael Koch + + * java/nio/CharBuffer.java + (put): Fixed precondtion check. + (toString): Make it work without backing array. + (put): Skip one level of method calling. + + 2003-05-10 Michael Koch + + * java/security/Identity.java, + java/security/IdentityScope.java, + java/security/Key.java, + java/security/KeyPair.java, + java/security/PrivateKey.java, + java/security/Provider.java, + java/security/PublicKey.java, + java/security/SecureRandom.java, + java/security/SecureRandomSpi.java, + java/security/SignedObject.java, + java/security/Signer.java, + java/security/cert/Certificate.java, + java/security/cert/PKIXCertPathBuilderResult.java, + java/security/cert/X509Certificate.java: + New versions from classpath. + + 2003-05-09 Tom Tromey + + * Makefile.in: Rebuilt. + * Makefile.am (nat_source_files): Removed old files. + * gnu/java/nio/natDoubleBufferImpl.cc: Removed. + * gnu/java/nio/natFloatBufferImpl.cc: Removed. + * gnu/java/nio/natIntBufferImpl.cc: Removed. + * gnu/java/nio/natLongBufferImpl.cc: Removed. + * gnu/java/nio/natShortBufferImpl.cc: Removed. + + 2003-05-09 Michael Koch + + * gnu/java/nio/ByteBufferImpl.java + (nio_cast): Removed. + (ByteBufferImpl): Removed. + (nio_get_Byte): Removed. + (nio_put_Byte): Removed. + (asByteBuffer): Removed. + (asCharBuffer): Removed implementation and throw exception. + (asShortBuffer): Likewise. + (asIntBuffer): Likewise. + (asLongBuffer): Likewise. + (asFloatBuffer): Likewise. + (asDoubleBuffer): Likewise. + * gnu/java/nio/CharBufferImpl.java + (CharBufferImpl): Removed. + (nio_get_Byte): Removed. + (nio_put_Byte): Removed. + (asByteBuffer): Removed. + * gnu/java/nio/DoubleBufferImpl.java + (DoubleBufferImpl): Removed. + (nio_get_Byte): Removed. + (nio_put_Byte): Removed. + (asByteBuffer): Removed. + * gnu/java/nio/FloatBufferImpl.java + (FloatBufferImpl): Removed. + (nio_get_Byte): Removed. + (nio_put_Byte): Removed. + (asByteBuffer): Removed. + * gnu/java/nio/IntBufferImpl.java + (IntBufferImpl): Removed. + (nio_get_Byte): Removed. + (nio_put_Byte): Removed. + (asByteBuffer): Removed. + * gnu/java/nio/LongBufferImpl.java + (LongBufferImpl): Removed. + (nio_get_Byte): Removed. + (nio_put_Byte): Removed. + (asByteBuffer): Removed. + * gnu/java/nio/ShortBufferImpl.java + (ShortBufferImpl): Removed. + (nio_get_Byte): Removed. + (nio_put_Byte): Removed. + (asByteBuffer): Removed. + * gnu/java/nio/natByteBufferImpl.cc + (nio_cast): Removed. + (nio_get_Byte): Removed. + (nio_put_Byte): Removed. + * gnu/java/nio/natCharBufferImpl.cc + (nio_get_Byte): Removed. + (nio_put_Byte): Removed. + + 2003-05-09 Michael Koch + + * java/net/JarURLConnection.java + (getJarEntry): Merged documentation from classpath. + (getJarFile): Likewise. + (getMainAttributes): Likewise. + (getAttributes): Likewise. + (getManifest): Likewise. + (getCertificates): Reformatted. + * java/net/URLConnection.java: + Little classpath merge. + + 2003-05-09 Michael Koch + + * java/io/DataOutputStream.java + (writeShort): Made it synchronized. + (writeChar): Likewise. + (writeInt): Likewise. + (writeLong): Liekwise. + (writeUTF): Made it synchronized, renamed argument to match classpath. + * java/io/InputStreamReader.java + (converter): Added documentation. + (read): Merged documentation from classpath. + * java/io/OutputStreamWriter.java + (OutputStreamWriter): Merged documentation from classpath. + (close): Reformatted. + (getEncoding): Likewise. + (flush): Likewise. + (write): Merged documentation from classpath, reformatted. + + 2003-05-08 Tom Tromey + + * configure.host : Set with_libffi_default and + libgcj_interpreter to "yes". + + 2003-05-08 Scott Gilbertson + + * gnu/gcj/xlib/natGC.cc (drawString): Removed obsolete code. + 2003-05-06 Tom Tromey * verify.cc: Reverted previous patch. ! 2003-05-06 Michael Koch ! ! * java/io/DataOutputStream.java ! (write): Renamed argument to "value", merged documentation from ! classpath. ! (writeBoolean): Likewise. ! (writeByte): Likewise. ! (writeShort): Likewise. ! (writeChar): Likewise. ! (writeInt): Likewise. ! (writeLong): Likewise. ! (writeFloat): Likewise. ! (writeDouble): Likewise. ! (writeBytes): Likewise. ! (writeChars): Likewise. ! (writeUTF): Likewise. ! * java/io/File.java ! (performDelete): Added documentation. ! (performList): Likewise. ! (performMkdir): Likewise. ! (performSetReadOnly): Likewise. ! (performRenameTo): Likewise. ! (performSetLastModified): Likewise. ! (delete): Made it sychronized. ! (renameTo): Made it sychronized. ! (equals): Reformatted. ! (isHidden): Likewise. ! (listFiles): Likewise. ! (setReadOnly): Likewise. ! (listRoots): Likewise. ! (setLastModified): Likewise. ! (checkRead): Likewise. ! (checkWrite): Likewise. ! * java/io/FileInputStream.java ! (skip): Made it sychronized, merged from classpath. ! * java/io/FileOutputStream.java ! (write): Merged from classpath. ! * java/io/InputStreamReader.java: ! (InputStreamReader): Merged documentation from classpath. ! ! 2003-05-05 Michael Koch ! ! * java/net/NetworkInterface.java ! (networkInterfaces): Removed. ! (getByName): Use getRealNetworkInterfaces() instead of ! networkInterfaces. ! (getByInetAddress): Likewise. ! (getNetworkInterfaces): Likewise. ! (toString): Fix output of addresses of an interface. ! ! 2003-05-05 Michael Koch ! ! * java/io/DataInputStream.java: ! Merged new documentation from classpath. ! ! 2003-05-03 Matt Kraai ! ! * gnu/awt/gtk/GtkButtonPeer.java: Fix misspelling of ! "version". ! * gnu/awt/gtk/GtkComponentPeer.java: Likewise. ! * gnu/awt/gtk/GtkContainerPeer.java: Likewise. ! * gnu/awt/gtk/GtkFramePeer.java: Likewise. ! * gnu/awt/gtk/GtkLabelPeer.java: Likewise. ! * gnu/awt/gtk/GtkMainThread.java: Likewise. ! * gnu/awt/gtk/GtkToolkit.java: Likewise. ! * gnu/awt/gtk/GtkWindowPeer.java: Likewise. ! * java/security/Key.java: Likewise. ! * java/security/PrivateKey.java: Likewise. ! * java/security/Provider.java: Likewise. ! * java/security/PublicKey.java: Likewise. ! ! 2003-05-02 Michael Koch ! ! * java/net/URI.java ! (create): Doesnt throws any exceptions. ! * java/net/URLConnection.java ! (URLConnection): Commend added. ! (getExpiration): The header field is called "expires" not ! "expiration". ! (getHeaderField): Merged documentation with classpath. ! (getHeaderFieldInt): Likewise. ! (getHeaderFieldDate): Likewise. ! (getHeaderFieldKey): Likewise. ! (getPermission): Likewise. ! (setDefaultUseCaches): Likewise. ! (setRequestProperty): Likewise. ! (addRequestProperty): Likewise. ! (getRequestProperty): Likewise. ! (getRequestProperties): Likewise. ! (setDefaultRequestProperty): Likewise. ! (getDefaultRequestProperty): Likewise. ! (guessContentTypeFromStream): Likewise. ! (getFileNameMap): Likewise. ! (setFileNameMap): Likewise. ! (setDoInput): Merged implementation and documentation with classpath. ! (setDoOutput): Likewise. ! (setAllowUserInteraction): Likewise. ! (setDefaultAllowUserInteraction): Likewise. ! (setContentHandlerFactory): Made it synchronized, merged documentation ! with classpath. ! (guessContentTypeFromName): Renamed argument fname to filename to ! match classpath, merged documentation with classpath. ! ! 2003-05-02 Michael Koch ! ! * java/net/JarURLConnection.java ! (JarURLConnection): Class documentation merged with classpath. ! (getJarFileURL): Moved and documentation merged with classpath. ! (getEntryName): Likewise. ! (JarURLConnection): Documentation merged with classpath. ! (getJarEntry): Likewise. ! (getJarFile): Likewise. ! * java/net/PlainDatagramSocketImpl.java: ! Class documentation moved. ! * java/net/URLConnection.java ! (fileNameMap): Moved and documentation merged with classpath. ! (factory): Likewise. ! (defaultAllowUserInteraction): Likewis. ! (defaultUseCaches): Likewise. ! (allowUserInteraction): Likewise. ! (connected): Likewise. ! (url): Likewise. ! (connect): Documentation merged with classpath. ! (getURL): Likewise. ! (getContentLength): Likewise. ! (getContentType): Likewise. ! (getContentEncoding): Likewise. ! (getExpiration): Likewise. ! (getDate): Likewise. ! (getLastModified): Likewise. ! (getHeaderField): Likewise. ! (getContent): Likewise. ! (getPermission): Likewise. ! (getInputStream): Likewise. ! (getOutputStream): Likewise. ! (toString): Likewise. ! (getDoInput): Likewise. ! (getDoOutput): Likewise. ! (setAllowUserInteraction): Likewise. ! (getAllowUserInteraction): Likewise. ! (setDefaultAllowUserInteraction): Likewise. ! (getDefaultAllowUserInteraction): Likewise. ! (setUseCaches): Likewise. ! (getUseCaches): Likewise. ! (setIfModifiedSince): Likewise. ! (getIfModifiedSince): Likewise. ! (setDefaultRequestProperty): Likewise. ! (getDefaultRequestProperty): Likewise. ! (setContentHandlerFactory): Likewise. ! (setFileNameMap): Likewise. ! ! 2003-05-02 Michael Koch ! ! * java/net/InetAddress.java: ! Merged class documentation with classpath. ! * java/net/JarURLConnection.java: ! Explicitely import all used classes. ! * java/net/URL.java: ! Reformatting. ! * java/net/ServerSocket.java, ! java/net/Socket.java: ! New versions from classpath. ! ! 2003-05-02 Michael Koch ! ! * gnu/java/nio/FileChannelImpl.java ! (read): New implementation. ! (implRead): New methods. ! (write): New implementation, call other write insteal of read method. ! (implWrite): New methods. ! (map): Added comment. ! (transferFrom): Implemented. ! (transferTo): Implemented. ! (lock): Added checks to throw exceptions. ! (truncate): Added check to throw exception. ! * gnu/java/nio/natFileChannelImpl.cc ! (implRead): New method. ! (implWrite): New method. ! * java/nio/ByteBuffer.java ! (hashCode): Fixed comment. ! (get): Fixed exception documentation. ! (put): Fixed exception documentation. ! * java/nio/CharBuffer.java: ! Added comment for later optimizations. ! ! 2003-04-30 Tom Tromey PR libgcj/10582: * verify.cc (_Jv_BytecodeVerifier::is_assignable_from_slow): *************** *** 144,164 **** (_Jv_IsAssignableFrom): Work even when source or target class is not prepared. ! 2003-04-15 Mohan Embar ! * include/win32.h: added dummy ECONNREFUSED define and ! _Jv_select() declaration ! * win32.cc (_Jv_select): placeholder implementation ! (_Jv_platform_initProperties): Fix by Ranjit ! Mathew (rmathew@hotmail.com): use generic names ! like "x86" for the "os.arch" property to be consistent with ! what Sun's JDK produces. Use the wProcessorArchitecture ! member of the Win32 SYSTEM_INFO structure, filled in a call ! to GetSystemInfo( ), instead of dwProcessorType ! * gnu/java/nio/natSocketChannelImpl.cc (SocketRead): use ! elements(data) and explicitly cast to char* on platforms ! where jbyte is not signed char ! (SocketWrite): idem 2003-03-29 Mohan Embar --- 8350,8589 ---- (_Jv_IsAssignableFrom): Work even when source or target class is not prepared. ! 2003-04-30 Michael Koch ! * java/text/BreakIterator.java ! (clone): New method. ! ! 2003-04-30 Michael Koch ! ! * java/text/CollationElementIterator.java, ! java/text/CollationKey.java, ! java/text/RuleBasedCollator.java: ! Merged copyright and documentation from classpath and ! rearranged some code. No code changes done. ! ! 2003-04-30 Michael Koch ! ! * java/util/regex/Matcher.java ! (pattern): New member variable. ! (appendReplacement): New method. ! (appendTail): New method. ! (end): New method. ! (find): New method. ! (group): New method. ! (replaceFirst): Added documentation. ! (replaceAll): Added documentation. ! (groupCount): New method. ! (lookingAt): New method. ! (matches): New method. ! (reset): New method. ! (start): New method. ! * java/util/regex/Pattern.java ! (serialVersionUID): New constant. ! (CANON_EQ): New constant. ! (CASE_INSENSITIVE): New constant. ! (COMMENTS): New constant. ! (DOTALL): New constant. ! (MULTILINE): New constant. ! (UNICODE_CASE): New constant. ! (UNIX_LINES): New constant. ! (regex): New member variable. ! (flags): New member variable. ! (Pattern): New method. ! (compile): Documentation added. ! (flags): New method. ! (matches): Documentation added. ! (matcher): Documentation added. ! (split): Documentation added. ! (pattern): New method. ! ! 2003-04-30 Michael Koch ! ! * gnu/java/security/Engine.java, ! gnu/java/security/OID.java, ! gnu/java/security/der/BitString.java, ! gnu/java/security/der/DER.java, ! gnu/java/security/der/DERReader.java, ! gnu/java/security/der/DERValue.java, ! gnu/java/security/der/DERWriter.java, ! gnu/java/security/provider/DSAKeyFactory.java, ! gnu/java/security/provider/X509CertificateFactory.java, ! gnu/java/security/x509/X500DistinguishedName.java, ! gnu/java/security/x509/X509CRL.java, ! gnu/java/security/x509/X509CRLEntry.java, ! gnu/java/security/x509/X509Certificate.java, ! java/security/cert/CRLSelector.java, ! java/security/cert/CertPathBuilder.java, ! java/security/cert/CertPathBuilderResult.java, ! java/security/cert/CertPathBuilderSpi.java, ! java/security/cert/CertPathParameters.java, ! java/security/cert/CertPathValidator.java, ! java/security/cert/CertPathValidatorResult.java, ! java/security/cert/CertPathValidatorSpi.java, ! java/security/cert/CertSelector.java, ! java/security/cert/CertStore.java, ! java/security/cert/CertStoreParameters.java, ! java/security/cert/CertStoreSpi.java, ! java/security/cert/CollectionCertStoreParameters.java, ! java/security/cert/LDAPCertStoreParameters.java, ! java/security/cert/PKIXBuilderParameters.java, ! java/security/cert/PKIXCertPathBuilderResult.java, ! java/security/cert/PKIXCertPathChecker.java, ! java/security/cert/PKIXCertPathValidatorResult.java, ! java/security/cert/PKIXParameters.java, ! java/security/cert/PolicyNode.java, ! java/security/cert/PolicyQualifierInfo.java, ! java/security/cert/TrustAnchor.java, ! javax/security/auth/x500/X500Principal.java: ! New files from classpath. ! * gnu/java/io/ASN1ParsingException.java, ! gnu/java/io/Base64InputStream.java, ! gnu/java/security/der/DEREncodingException.java, ! gnu/java/security/provider/DSAParameters.java, ! gnu/java/security/provider/DSASignature.java, ! gnu/java/security/provider/Gnu.java, ! gnu/java/security/provider/GnuDSAPrivateKey.java, ! gnu/java/security/provider/GnuDSAPublicKey.java, ! java/security/AlgorithmParameterGenerator.java, ! java/security/AlgorithmParameters.java, ! java/security/KeyFactory.java, ! java/security/KeyPairGenerator.java, ! java/security/KeyStore.java, ! java/security/MessageDigest.java, ! java/security/SecureClassLoader.java, ! java/security/SecureRandom.java, ! java/security/Security.java, ! java/security/Signature.java, ! java/security/cert/Certificate.java, ! java/security/cert/CertificateFactory.java, ! java/security/cert/CertificateFactorySpi.java, ! java/security/cert/X509CRL.java, ! java/security/cert/X509Certificate.java, ! java/security/spec/DSAPublicKeySpec.java: ! New versions from classpath. ! * gnu/java/security/provider/DERReader.java, ! gnu/java/security/provider/DERWriter.java, ! java/security/Engine.java: Removed. ! * Makefile.am ! (java_source_files, javax_source_files): Added new files. ! * Makefile.in: Regenerated. ! ! 2003-04-29 Michael Koch ! ! * javax/swing/JTable.java ! (AUTO_RESIZE_ALL_COLUMNS): New constant. ! (AUTO_RESIZE_LAST_COLUMN): New constant. ! (AUTO_RESIZE_NEXT_COLUMN): New constant. ! (AUTO_RESIZE_OFF): New constant. ! (AUTO_RESIZE_SUBSEQUENT_COLUMNS): New constant. ! (JTable): New method. ! (columnAdded): New method. ! (columnMarginChanged): New method. ! (columnMoved): New method. ! (columnRemoved): New method. ! (columnSelectionChanged): New method. ! (editingCanceled): New method. ! (editingStopped): New method. ! (getColumnModel): New method. ! (getPreferredScrollableViewportSize): New method. ! (getScrollableBlockIncrement): New method. ! (getScrollableTracksViewportHeight): New method. ! (getScrollableTracksViewportWidth): New method. ! (getScrollableUnitIncrement): New method. ! (getSelectedRow): New method. ! (getSelectionModel): New method. ! (tableChanged): New method. ! (setModel): New method. ! (setSelectionMode): New method. ! (setSelectionModel): New method. ! (setShowGrid): New method. ! (valueChanged): New method. ! * javax/swing/text/DefaultEditorKit.java ! (backwardAction): New constant. ! (beepAction): New constant. ! (beginAction): New constant. ! (beginLineAction): New constant. ! (beginParagraphAction): New constant. ! (beginWordAction): New constant. ! (copyAction): New constant. ! (cutAction): New constant. ! (defaultKeyTypedAction): New constant. ! (deleteNextCharAction): New constant. ! (deletePrevCharAction): New constant. ! (downAction): New constant. ! (endAction): New constant. ! (endLineAction): New constant. ! (endOfLineStringProperty): New constant. ! (endParagraphAction): New constant. ! (endWordAction): New constant. ! (forwardAction): New constant. ! (insertBreakAction): New constant. ! (insertContentAction): New constant. ! (insertTabAction): New constant. ! (nextWordAction): New constant. ! (pageDownAction): New constant. ! (pageUpAction): New constant. ! (pasteAction): New constant. ! (previousWordAction): New constant. ! (readOnlyAction): New constant. ! (selectAllAction): New constant. ! (selectionBackwardAction): New constant. ! (selectionBeginAction): New constant. ! (selectionBeginLineAction): New constant. ! (selectionBeginParagraphAction): New constant. ! (selectionBeginWordAction): New constant. ! (selectionDownAction): New constant. ! (selectionEndAction): New constant. ! (selectionEndLineAction): New constant. ! (selectionEndParagraphAction): New constant. ! (selectionEndWordAction): New constant. ! (selectionForwardAction): New constant. ! (selectionNextWordAction): New constant. ! (selectionPreviousWordAction): New constant. ! (selectionUpAction): New constant. ! (selectLineAction): New constant. ! (selectParagraphAction): New constant. ! (selectWordAction): New constant. ! (upAction): New constant. ! (writableAction): New constant. ! ! 2003-04-29 Michael Koch ! ! * java/util/PropertyPermission.java: ! New version from classpath ! * java/util/ResourceBundle.java: ! Partly merged from classpath ! (getObject): Reformated. ! (tryBundle): Set foundBundle = null if no bundle found. ! ! 2003-04-29 Michael Koch ! ! * javax/swing/AbstractListModel.java, ! javax/swing/DefaultBoundedRangeModel.java, ! javax/swing/DefaultSingleSelectionModel.java: ! New Versions from classpath. ! ! 2003-04-29 Michael Koch ! ! * java/awt/Window.java ! (show): Call super.show() instead of setVisible() to avoid endless ! loop. ! (hide): Call super.hide() instead of setVisible() to avoid endless ! loop. ! ! 2003-04-29 Michael Koch ! ! * java/util/zip/Deflater.java, ! java/util/zip/DeflaterOutputStream.java: ! Partly merged with classpath. ! ! 2003-04-27 Tom Tromey ! ! * java/lang/natString.cc (_Jv_AllocString): Initialize ! cachedHashCode. ! (init): Likewise. ! (_Jv_NewStringUtf8Const): Likewise. 2003-03-29 Mohan Embar *************** *** 175,180 **** --- 8600,8679 ---- * java/lang/natRuntime.cc: (insertSystemProperties) use _Jv_GetSafeArg() instead of _Jv_argv + 2003-04-23 Tom Tromey + + * resolve.cc (_Jv_PrepareClass): Round size up to alignment + required by this object. Search superclasses to find required + alignment. + (get_alignment_from_class): Use alignment of type as it appears + in a struct. + (ALIGNOF): New macro. + (struct aligner): New helper structure. + + 2003-04-20 Scott Gilbertson + + * java/awt/Container.java (addImpl): Enable paint events if adding + a lightweight to a heavyweight. + (addNotify): Ensure that peer is created before + addNotifyContainerChildren. + (addNotifyContainerChildren): Enable paint events if a heavyweight + container contains a lightweight. + + 2003-04-20 Tom Tromey + + * java/io/BufferedReader.java, java/io/BufferedWriter.java, + java/io/DataInput.java, java/io/DataOutput.java: Imports from + Classpath. + + 2003-04-19 Tom Tromey + + * java/sql/Date.java, java/sql/DriverManager.java, + java/sql/Time.java, java/sql/Timestamp.java: New versions from + Classpath. + + * Makefile.in: Rebuilt. + * Makefile.am (ordinary_java_source_files): Added new files. + * java/security/AlgorithmParameterGenerator.java, + java/security/AlgorithmParameters.java, java/security/Engine.java, + java/security/Identity.java, java/security/IdentityScope.java, + java/security/KeyFactory.java, + java/security/KeyPairGenerator.java, java/security/KeyStore.java, + java/security/MessageDigest.java, java/security/Policy.java, + java/security/ProtectionDomain.java, + java/security/SecureRandom.java, java/security/Security.java, + java/security/Signature.java, java/security/SignatureSpi.java, + java/security/SignedObject.java, java/security/Signer.java, + java/security/interfaces/RSAMultiPrimePrivateCrtKey.java, + java/security/spec/PSSParameterSpec.java, + java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java, + java/security/spec/RSAOtherPrimeInfo.java: New versions from + Classpath. + + 2003-04-19 Scott Gilbertson + + * gnu/awt/xlib/XGraphics.java (XGraphics): Use new GC.create. + (dispose): Null metrics. + * gnu/awt/xlib/XToolkit.java (sync): Implement. + * gnu/gcj/xlib/Clip.java (dispose): Change name of native from + finalize. + (finalize): Call dispose. + * gnu/gcj/xlib/Drawable.java (gcCache): New field. + (gcCachedCount): New field. + (finalize): New method. + (putGCInCache): New method. + (getGCFromCache): New method. + * gnu/gcj/xlib/GC.java (GC): Make protected. + (clone): Get new GC from cache if possible. + (create): New static method. + (dispose): Save old GC in cache. + * gnu/gcj/xlib/natClip.cc (dispose): Check for null before + deleting. + * gnu/gcj/xlib/natGC.cc (initStructure): Call XCreateGC only if gc + is null. + * gnu/gcj/xlib/Pixmap.java (Pixmap): Use new GC.create. + * java/awt/Container.java (visitChild): Dispose gfx2 when + finished. + 2003-04-19 Jerry Quinn * java/math/BigInteger.java (probablePrime): New. *************** *** 191,199 **** * java/io/natFileWin32.cc: Change copyright owner to FSF. ! 2003-04-16 Tom Tromey ! * mauve-libgcj: Disable some tests we can't compile. 2003-04-10 Tom Tromey --- 8690,8726 ---- * java/io/natFileWin32.cc: Change copyright owner to FSF. ! 2003-04-19 Scott Gilbertson ! * gnu/awt/xlib/XGraphicsConfiguration.java (FontMetricsCache): New ! inner class. ! (CACHE_SIZE_PER_DISPLAY): New field ! (fontMetricsCache): New field ! (getXFontMetrics): Use fontMetricsCache to cache fonts. Prefer ! loading ISO10646-1 fonts. ! ! 2003-04-19 Scott Gilbertson ! ! * libjava/gnu/gcj/xlib/natFont.cc (getStringWidth): Support 16-bit ! characters. ! * libjava/gnu/gcj/xlib/natGC.cc (drawString): Support 16-bit ! characters. ! ! 2003-04-16 Richard Earnshaw ! ! * java/lang/ieeefp.h: Handle ARM platforms that have pure-endian ! floating point. ! ! 2003-04-15 Jakub Jelinek ! ! * configure.host (*-linux*): Don't set slow_pthread_self if primary ! installed libpthread is either linuxthreads with floating stacks or ! NPTL. ! ! 2003-04-14 Tom Tromey ! ! * resolve.cc (_Jv_PrepareClass): Round up class size to multiple ! of alignment. 2003-04-10 Tom Tromey *************** *** 203,214 **** (initialize_stack): Check to ensure that is not static and is. 2003-03-29 Ulrich Weigand * configure.in (HAVE_BACKTRACE) [s390*-*-linux*]: Define. * configure: Regenerate. ! 2003-03-14 Jeroen Frijters * java/io/ObjectInputStream.java (readObject): Cleaned up the class hierarchy loop. --- 8730,9666 ---- (initialize_stack): Check to ensure that is not static and is. + 2003-04-07 Aaron M. Renn (arenn@urbanophile.com) + + * java/io/ObjectStreamException + * java/io/FileFilter + * java/io/FilenameFilter + * java/io/ObjectInput + * java/io/ObjectOutput + * java/io/ObjectStreamConstants + Minor doc fixes, format fixes, spelling corrections, etc. + * java/io/DataInput + Corrected code samples in Javadocs to match reality + * java/io/DataOutput + * java/io/ObjectInputValidation + Major documentation fixes - all Javadocs re-written or updated + + 2003-04-06 Michael Koch + + * java/net/URLConnection.java: + Import classes directly. + (URLConnection): Merged class documentation with classpath. + (url): Moved, documentation from classpath added. + (doInput): Moved, documentation from classpath added. + (doOutput): Moved, documentation from classpath added. + (allowUserInteraction): Moved. + (useCaches): Moved, documentation from classpath added. + (ifModifiedSince): Moved, documentation from classpath added. + (connected): Moved, documentation from classpath added. + + 2003-04-06 Michael Koch + + * java/io/FileInputStream.java + (skip): Renamed some variables to match classpath, added + checks from classpath. + + 2003-03-31 Michael Koch + + * javax/swing/AbstractAction.java + (AbstractAction): Reformatted. + (serialVersionUID): New private member variable. + * javax/swing/plaf/BorderUIResource.java + (serialVersionUID): New private member variable. + * javax/swing/plaf/basic/BasicLookAndFeel.java + (serialVersionUID): New private member variable. + + 2003-03-31 Michael Koch + + * java/sql/Date.java + (valueOf): Deprecated, reformatted. + (toString): Deprecated, reformatted. + * java/sql/Time.java + (valueOf): Deprecated, reformatted. + (toString): Deprecated, reformatted. + + 2003-03-31 Michael Koch + + * java/rmi/dgc/VMID.java + (isUnique): Deprecated. + + 2003-03-31 Michael Koch + + * java/io/File.java + (separator): Merged documentation from classpath. + (separatorChar): Merged documentation from classpath. + (pathSeparator): Merged documentation from classpath. + (pathSeparatorChar): Merged documentation from classpath. + (path): Merged documentation from classpath. + (canRead): Merged documentation from classpath. + (canWrite): Merged documentation from classpath. + (createNewFile): Merged documentation from classpath. + (delete): Merged documentation from classpath. + (equals): Merged documentation from classpath. + (exists): Merged documentation from classpath. + (File): Renamed p to name to match classpath, merged documentation + from classpath. + (getAbsolutePath): Merged documentation from classpath. + (getCanonicalPath): Merged documentation from classpath. + (getCanonicalFile): Merged documentation from classpath. + (getName): Merged documentation from classpath. + (getParent): Merged documentation from classpath. + (getParentFile): Merged documentation from classpath. + (getPath): Merged documentation from classpath. + (hashCode): Merged documentation from classpath. + (isAbsolute): Merged documentation from classpath. + (isDirectory): Merged documentation from classpath. + (isFile): Merged documentation from classpath. + (isHidden): Merged documentation from classpath. + (lastModified): Merged documentation from classpath. + (length): Merged documentation from classpath. + (list): Merged documentation from classpath. + (listFiles): Merged documentation from classpath. + (toString): Merged documentation from classpath. + (toURL): Merged documentation from classpath. + (mkdir): Merged documentation from classpath. + (mkdirs): Merged documentation from classpath. + (createTempFile): Merged documentation from classpath. + (setReadOnly): Merged documentation from classpath. + (listRoots): Merged documentation from classpath. + (compareTo): Merged documentation from classpath. + (renameTo): Merged documentation from classpath. + (setLastModified): Merged documentation from classpath. + * java/io/PrintStream.java + (auto_flush): Merged documentation from classpath. + (PrintStream): Merged documentation from classpath. + (checkError): Merged documentation from classpath. + (setError): Merged documentation from classpath. + (close): Merged documentation from classpath. + (flush): Merged documentation from classpath. + (print): Merged documentation from classpath. + (println): Merged documentation from classpath. + (write): Renamed count to len to match classpath, + merged documentation from classpath. + * java/io/RandomAccessFile.java + (readShort): Merged documentation from classpath. + (readUnsignedByte): Merged documentation from classpath. + (readUnsignedShort): Merged documentation from classpath. + (readUTF): Merged documentation from classpath. + (seek): Reformatted, merged documentation from classpath. + (skipBytes): Renamed some variables to match classpath, reformatted, + merged documentation from classpath. + (write): Merged documentation from classpath. + (writeBoolean): Merged documentation from classpath. + (writeByte): Merged documentation from classpath. + (writeShort): Merged documentation from classpath. + (writeChar): Merged documentation from classpath. + (writeInt): Merged documentation from classpath. + (writeLong): Merged documentation from classpath. + (writeFloat): Merged documentation from classpath. + (writeDouble): Merged documentation from classpath. + (writeBytes): Merged documentation from classpath. + (writeChars): Merged documentation from classpath. + (writeUTF): Reformatted. + (getChannel): Reformatted. + + 2003-03-31 Michael Koch + + * java/awt/font/TextAttribute.java + (readResolve): Throws java.io.InvalidObjectException. + + 2003-03-31 Michael Koch + + * java/rmi/server/LoaderHandler.java + (loadClass): Deprecated. + (getSecurityContext): Deprecated. + * java/rmi/server/LogStream.java + (getDefaultStream): Deprecated. + (setDefaultStream): Deprecated. + (getOutputStream): Deprecated. + (setOutputStream): Deprecated. + (write): Deprecated. + (toString): Deprecated. + (parseLevel): Deprecated. + * java/rmi/server/Operation.java + (Operation): Deprecated. + (getOperation): Deprecated. + (toString): Deprecated. + * java/rmi/server/RemoteCall.java + (getOutputStream): Deprecated. + (releaseOutputStream): Deprecated. + (getInputStream): Deprecated. + (releaseInputStream): Deprecated. + (getResultStream): Deprecated. + (executeCall): Deprecated. + (done): Deprecated. + * java/rmi/server/RemoteRef.java + (invoke): Deprecated. + (newCall): Deprecated. + (done): Deprecated. + * java/rmi/server/RemoteStub.java + (setRef): Deprecated. + * java/rmi/server/Skeleton.java: + No need to import java.lang.Exception explicitly. + (dispatch): Deprecated. + (getOperations): Deprecated. + + 2003-03-31 Michael Koch + + * java/rmi/dgc/VMID.java, + java/rmi/registry/RegistryHandler.java, + java/rmi/server/LogStream.java, + java/rmi/server/Operation.java, + java/rmi/server/RemoteCall.java, + java/rmi/server/RemoteRef.java, + java/rmi/server/RemoteStub.java: + Reformatted. + + 2003-03-31 Michael Koch + + * javax/swing/AbstractCellEditor.java, + javax/swing/AbstractListModel.java, + javax/swing/ActionMap.java, + javax/swing/BorderFactory.java, + javax/swing/ButtonGroup.java, + javax/swing/DefaultBoundedRangeModel.java, + javax/swing/DefaultButtonModel.java, + javax/swing/DefaultCellEditor.java, + javax/swing/DefaultComboBoxModel.java, + javax/swing/DefaultDesktopManager.java, + javax/swing/DefaultListCellRenderer.java, + javax/swing/DefaultSingleSelectionModel.java, + javax/swing/InputMap.java, + javax/swing/JComponent.java, + javax/swing/JMenu.java, + javax/swing/JSlider.java, + javax/swing/KeyStroke.java, + javax/swing/OverlayLayout.java, + javax/swing/ScrollPaneLayout.java, + javax/swing/SizeRequirements.java, + javax/swing/UIManager.java, + javax/swing/ViewportLayout.java, + javax/swing/border/AbstractBorder.java, + javax/swing/colorchooser/DefaultColorSelectionModel.java, + javax/swing/event/EventListenerList.java, + javax/swing/table/AbstractTableModel.java, + javax/swing/table/DefaultTableCellRenderer.java, + javax/swing/table/DefaultTableColumnModel.java, + javax/swing/table/DefaultTableModel.java, + javax/swing/table/TableColumn.java, + javax/swing/text/StyledEditorKit.java, + javax/swing/tree/DefaultMutableTreeNode.java, + javax/swing/tree/DefaultTreeModel.java, + javax/swing/tree/DefaultTreeSelectionModel.java, + javax/swing/tree/TreePath.java, + javax/swing/undo/AbstractUndoableEdit.java, + javax/swing/undo/StateEdit.java, + javax/swing/undo/StateEditable.java, + javax/swing/undo/UndoableEditSupport.java: + Merges from classpath. + + 2003-03-30 Tom Tromey + + * java/lang/String.java (data, boffset, count): Documented. + (String(byte[],String)): Reformatted. + (String(byte[])): Likewise. + (lastIndexOf(int)): Likewise. + (lastIndexOf(String)): Likewise. + (substring(int)): Renamed argument to match Classpath. + (String(StringBuffer)): Don't share buffer if it is nearly empty. + + * java/lang/String.java: Miscellaneous minor formatting changes + to match Classpath more closely. + + 2003-03-29 Eric Blake + Tom Tromey + + * java/lang/natString.cc (hashCode): Use cachedHashCode. + (init()): Removed. + (charAt): Put index in exception. + (contentEquals): New method. + Include StringBuffer.h. + * java/lang/String.java (cachedHashCode): New field. + (String()): Follow classpath implementation. + (init()): Removed. + (contentEquals): Declare. + (subSequence): Don't declare IndexOutIfBoundsException in throws + clause. + (matches, replaceFirst, replaceAll, split): New methods from + Classpath. + + 2003-03-29 Tom Tromey + + * java/lang/String.java: Reordered to follow Classpath; merged in + javadoc. + + * java/text/MessageFormat.java: Removed some whitespace. + + * Makefile.in: Rebuilt. + * Makefile.am (awt_java_source_files): Added new files. + * gnu/javax/rmi/PortableServer.java, + gnu/javax/rmi/CORBA/DelegateFactory.java, + gnu/javax/rmi/CORBA/GetDelegateInstanceException.java, + gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java, + gnu/javax/rmi/CORBA/StubDelegateImpl.java, + gnu/javax/rmi/CORBA/UtilDelegateImpl.java, + gnu/javax/rmi/CORBA/ValueHandlerImpl.java, + javax/rmi/BAD_OPERATION.java, javax/rmi/ORB.java, + javax/rmi/PortableRemoteObject.java, + javax/rmi/CORBA/ClassDesc.java, javax/rmi/CORBA/ObjectImpl.java, + javax/rmi/CORBA/PortableRemoteObjectDelegate.java, + javax/rmi/CORBA/Stub.java, javax/rmi/CORBA/StubDelegate.java, + javax/rmi/CORBA/SystemException.java, javax/rmi/CORBA/Tie.java, + javax/rmi/CORBA/Util.java, javax/rmi/CORBA/UtilDelegate.java, + javax/rmi/CORBA/ValueHandler.java: New files from Classpath. + + * java/lang/natClass.cc (newInstance): Put method name in + exception. + (getConstructor): Likewise. + (getDeclaredConstructor): Likewise. + (getPrivateMethod): Likewise. + + 2003-03-28 Tom Tromey + + * java/lang/reflect/Proxy.java: New version from Classpath. + * java/lang/Package.java: New version from Classpath. + 2003-03-29 Ulrich Weigand * configure.in (HAVE_BACKTRACE) [s390*-*-linux*]: Define. * configure: Regenerate. ! 2003-03-28 Michael Koch ! ! * java/io/File.java: ! Import needed classes instead of whole packages, merged class ! documentation with classpath, moved constants and variables to top of ! class. ! * java/io/PrintStream.java: ! Merged class documentation with classpath, moved constants and ! variables to top of class. ! * java/io/RandomAccessFile.java ! (RandomAccessFile): Merged with classpath. ! (read): Merged with classpath). ! (read*): Reformatted. ! ! 2003-03-28 Michael Koch ! ! * java/io/FileDescriptor.java ! (finalize): Throws Throwable, not IOException. ! * java/io/ObjectOutputStream.java ! (PutField.put): Doesnt throws anything. ! ! 2003­03-28 Michael Koch ! ! * java/io/FileOutputStream.java: ! Merged class documentation and authors with classpath. ! (FileOutputStream): Partly merged with classpath. ! (write): Merged with classpath. ! (getChannel): Make it synchronized instead of explicit block in this ! method. ! * java/io/RandomAccessFile.java: ! Merged class documentation and authors with classpath. ! ! 2003-03-26 Tom Tromey ! ! * java/lang/natRuntime.cc (insertSystemProperties): Set ! gnu.classpath.home.url. ! * Makefile.in: Rebuilt. ! * Makefile.am: Define LIBDIR. ! ! 2003-03-25 Michael Koch ! ! * java/io/FileInputStream.java ! (read): Renamed b to buf and off to offset. ! * java/io/FileOutputStream.java ! (ch): Documentation added. ! (FileOutputStream): Documentation added. ! (getFD): Documentation added. ! (write): Documentation added. ! (close): Documentation added. ! (getChannel): Documentation added. ! ! 2003-03-24 Michael Koch ! ! * java/io/DataOutputStream.java ! (write): Merged from classpath. ! * java/io/File.java: ! Merged copyrigth with classpath. ! * java/io/FileInputStream.java ! (getChannel): Made it synchronized instead of using a synchronized ! block. ! * java/io/FileOutputStream.java: Reformatted. ! * java/io/InputStreamReader.java ! (InputStreamReader): Renamed enc to encoding_name. ! (close): Merged documentation from classpath. ! (getEncoding): Merged documentation from classpath. ! (ready): Merged documentation from classpath. ! (read): Merged documentation from classpath. ! * java/io/LineNumberReader.java ! (lineNumber): Made it private. ! (LineNumberReader): Use Constant instead of a direct value. ! * java/io/OutputStreamWriter.java ! (OutputStreamWriter): Renamed enc to encoding_scheme, merged ! documentation from classpath. ! (close): Merged documentation from classpath. ! (flush): Merged documentation from classpath. ! (write): Merged documentation from classpath. ! * java/io/PrintStream.java: Reformatted. ! ! 2003-03-24 Michael Koch ! ! * javax/swing/text/ComponentView.java ! (getComponent): Must be final. ! * javax/swing/tree/DefaultTreeCellRenderer.java: ! Reformatted. ! * javax/swing/undo/StateEditable.java: ! Reformatted. ! ! 2003-03-24 Michael Koch ! ! * java/rmi/activation/ActivationInstantiator.java: ! Reformatted. ! * java/rmi/activation/Activator.java: ! Reformatted. ! * java/rmi/registry/RegistryHandler.java: ! Remerged from classpath. ! ! 2003-03-24 Michael Koch ! ! * java/util/Date.java: ! Fixed documentation starting tag to make javadoc happy. ! * java/util/regex/Pattern.java ! (Pattern): Implements Serializable. ! * java/util/PatternSyntaxException.java ! (serialVersionUID): New member variable. ! ! 2003-03-24 Michael Koch ! ! * java/awt/ContainerOrderFocusTraversalPolicy.java ! (getFirstComponent): Implemented. ! (getLastComponent): Implemented. ! (getDefaultComponent): Implemented. ! (setImplicitDownCycleTraversal): Fixed implementation. ! * java/awt/Robot.java ! (Robot): Added documentation. ! * java/awt/Toolkit.java ! (getFontList): Deprecated. ! (getFontMetrics): Deprecated. ! (getPrintJob): Added documentation. ! (getSystemSelection): Added documentation. ! (getLockingKeyState): Added documentation. ! (setLockingKeyState): Added documentation. ! (createCustomCursor): Added documentation. ! (getBestCursorSize): Added documentation. ! (getMaximumCursorColors): Added documentation. ! (isFrameStateSupported): Added documentation. ! ! 2003-03-24 Michael Koch ! ! * java/io/RandomAccessFile.java: ! More little merges with classpath. No code changes. ! ! 2003-03-24 Michael Koch ! ! * java/net/natInetAddressNoNet.cc: ! Include stddef.h. ! * java/net/natPlainDatagramSocketImplNoNet.cc: ! Fixed inlcude of java/net/DatagramPacket.h. ! * java/net/natPlainSocketImplNoNet.cc: ! Include some missing classes. ! ! 2003-03-24 Michael Koch ! ! * java/awt/dnd/DropTarget.java ! (DropTargetAutoScroller): According to the online documentation, this ! is protected, but in reality it is public. ! * java/awt/dnd/DropTargetContext.java ! (TransferableProxy): According to the online documentation, this ! is protected, but in reality it is public. ! ! 2003-03-24 Michael Koch ! ! * java/io/DataInputStream.java ! (): Wrapped documentation line. ! (): Fixed @return tag. ! * java/io/DataOutputStream.java ! (written): Moved to top of class. ! (all methods): Merged documentation from classpath. ! * java/io/File.java: ! Merged copyright year with classpath. ! * java/io/FileInputStream.java ! (all methods): Merged documentation from classpath. ! * java/io/LineNumberReader.java ! (getLineNumber): Fixed @return tag. ! * java/io/ObjectInputStream.java. ! Reformatted. ! * java/io/ObjectOutputStream.java: ! Reformatted, fixed some @see tags. ! * java/io/OutputStreamWriter.java: ! Deleted empty line. ! * java/io/Writer.java: ! Reformatted. ! ! 2003-03-24 Michael Koch ! ! * java/awt/Frame.java ! (DEFAULT_CURSOR): Fixed @deprecated tag. ! (setCursor): Fixed @deprecated tag. ! ! 2003-03-24 Michael Koch ! ! * java/beans/beancontext/BeanContextEvent.java: ! Reformated. ! ! 2003-03-23 Eric Blake ! ! * java/lang/natStringBuffer.cc (regionMatches): New function. ! * java/lang/String.java (count): Now package-private. ! * java/lang/StringBuffer.java: Merged with Classpath. ! ! 2003-03-23 Michael Koch ! ! * java/io/BufferedOutputStream.java: ! Reformated. ! * java/io/BufferedReader.java: ! Reformated. ! * java/io/ByteArrayOutputStream.java ! (size): Fixed @see tag. ! * java/io/CharArrayWriter.java ! (size): Fixed @see tag. ! * java/io/DataInput.java: ! Reformated. ! * java/io/DataOutput.java: ! Reformated. ! * java/io/DataOutputStream.java: ! Merged copyright years with classpath. ! * java/io/Externalizable.java: ! Reformated. ! * java/io/FileFilter.java: ! Reformated. ! * java/io/FileInputStream.java: ! Merged copyright years with classpath. ! * java/io/FileOutputStream.java: ! Merged copyright years with classpath. ! * java/io/FilePermission.java ! (FilePermission): Replaced @XXX with FIXME:. ! * java/io/FileWriter.java: ! Reformated. ! * java/io/FilenameFilter.java: ! Reformated. ! * java/io/FilterInputStream.java: ! Reformated. ! * java/io/FilterOutputStream.java: ! Reformated. ! * java/io/FilterReader.java: ! Reformated. ! * java/io/FilterWriter.java: ! Reformated. ! * java/io/LineNumberInputStream.java ! (LineNumberInputStream): Replaced @code with HTML tags to make javadoc ! happy. ! (getLineNumber): Fixed @return tag. ! * java/io/ObjectInput.java: ! Reformated. ! * java/io/ObjectOutput.java: ! Reformated. ! * java/io/ObjectStreamClass.java: ! Reformated. ! * java/io/PrintStream.java: ! Merged copyright years with classpath. ! * java/io/PushbackReader.java ! (PushbackReader): Replaced @code with @param. ! * java/io/SerializablePermission.java: ! Reformated. ! * java/io/StreamTokenizer.java ! (resetSyntax): Fixed @see tag. ! ! 2003-03-22 Richard Henderson ! ! * sysdep/ia64/locks.h: Include ia64intrin.h. ! (compare_and_swap): Use __sync_bool_compare_and_swap. ! (compare_and_swap_release): Expose ar.ccv assignment. ! ! 2003-03-22 Andreas Tobler ! ! * include/posix.h: Add suffix for darwin dynamic libraries. ! ! 2003-03-21 Michael Koch ! ! * javax/swing/Action.java ! (ACCELERATOR_KEY): New constant. ! (ACTION_COMMAND_KEY): Likewise. ! (MNEMONIC_KEY): Likewise. ! * javax/swing/UnsupportedLookAndFeelException.java ! (UnsupportedLookAndFeelException): Must be public. ! * javax/swing/WindowConstants.java ! (EXIT_ON_CLOSE): New constant. ! * javax/swing/text/BadLocationException.java ! (offset): New member variable. ! (BadLocationException): New implementation, documentation added. ! (offsetRequested): New method. ! * javax/swing/text/Caret.java: ! Reformated. ! * javax/swing/text/Document.java: ! Reformated. ! ! 2003-03-21 Michael Koch ! ! * java/rmi/activation/Activatable.java ! (serialVersionUID): New member variable. ! * java/rmi/activation/ActivationGroup.java ! (serialVersionUID): New member variable. ! * java/rmi/activation/ActivationGroupDesc.java ! (serialVersionUID): New member variable. ! * java/rmi/registry/Registry.java: ! Reformated. ! (Registry): Deprecated. ! * java/rmi/server/LoaderHandler.java ! Reformated. ! (LoaderHandler): Deprecated. ! * java/rmi/server/LogStream.java ! Reformated. ! (LogStream): Deprecated. ! * java/rmi/server/Operation.java ! (Operation): Deprecated. ! * java/rmi/server/RMIFailureHandler.java: ! Reformated. ! * java/rmi/server/RMISocketFactory.java: ! Reformated. ! * java/rmi/server/RemoteCall.java ! (RemoteCall): Deprecated. ! * java/rmi/server/RemoteStub.java: ! Reformated. ! * java/rmi/server/Skeleton.java ! Reformated. ! (Skeleton): Deprecated. ! ! 2003-03-21 Michael Koch ! ! * java/io/LineNumberReader.java ! (LineNumberReader): Merged documentation with classpath. ! (getLineNumber): Likewise. ! (setLineNumber): Likewise. ! (mark): Likewise. ! (reset): Likewise. ! (read): Likewise. ! (readLine): Likewise. ! (skip): Likewise. ! ! 2003-03-21 Michael Koch ! ! * java/rmi/RMISecurityManager.java ! (checkAccept): Removed. ! (checkAccess): Likewise. ! (checkAccess): Likewise. ! (checkAwtEventQueueAccess): Likewise. ! (checkConnect): Likewise. ! (checkCreateClassLoader): Likewise. ! (checkDelete): Likewise. ! (checkExec): Likewise. ! (checkExit): Likewise. ! (checkLink): Likewise. ! (checkListen): Likewise. ! (checkMemberAccess): Likewise. ! (checkMulticast): Likewise. ! (checkPackageAccess): Likewise. ! (checkPackageDefinition): Likewise. ! (checkPermission): Likewise. ! (checkPrintJobAccess): Likewise. ! (checkPropertiesAccess): Likewise. ! (checkPropertyAccess): Likewise. ! (checkRead): Likewise. ! (checkSecurityAccess): Likewise. ! (checkSetFactory): Likewise. ! (checkSystemClipboardAccess): Likewise. ! (checkTopLevelWindow): Likewise. ! (checkWrite): Likewise. ! ! 2003-03-20 Michael Koch ! ! * gnu/java/nio/FileChannelImpl.java ! (address): Removed. ! (map_address): New member variable. ! (length): Make it package private. ! (fd): Make it package private. ! (buf): Make it package private. ! (file_obj): Make it package private. ! (FileChannelImpl): New constructor. ! (nio_mmap_file): Use RawData instead of long. ! (nio_munmap_file): Use RawData instead of long. ! (nio_msync): Use RawData instead of long. ! (implCloseChannel): New implementation using map_address. ! (read): Reformated. ! (map): Implemented. ! (create_direct_mapped_buffer): Implemented, use RawData, throws ! IOException. ! (force): Use map_address instead of address. ! * gnu/java/nio/MappedByteFileBuffer.java ! (address): Removed. ! (map_address): New member variable. ! (MappedByteFileBuffer): Use map_address instead of address, reformated. ! (several methods): Use map_address instead of address, replaced long ! with RawData where appropriate. ! * gnu/java/nio/natFileChannelImpl.cc ! (nio_mmap_file): Replaced long with RawData. ! (nio_munmap_file): Replaced long with RawData. ! (nio_msync): Replaced long with RawData. ! * gnu/java/nio/natMappedByteFileBuffer.cc ! (several methods): Replaced long with RawData where appropriate. ! ! 2003-03-20 Michael Koch ! ! * java/net/InetAddress.java, ! java/net/JarURLConnection.java, ! java/net/PlainDatagramSocketImpl.java, ! java/net/PlainSocketImpl.java, ! java/net/URLConnection.java: ! Merged copyright statements with classpath for easier merging. ! ! 2003-03-20 Michael Koch ! ! * java/io/FileInputStream.java ! (getChannel): New implementation. ! * java/io/FileOutputStream.java ! (ch): New member variable. ! (getChannel): Implemented. ! * java/io/RandomAccessFile.java ! (RandomAccessFile): Throws FileNotFoundException instead of ! IOException. ! (getChannel): New method. ! (ch): New member variable. ! ! 2003-03-20 Michael Koch ! ! * java/io/DataOutputStream.java, ! java/io/File.java, ! java/io/FileInputStream.java, ! java/io/FileOutputStream.java, ! java/io/InputStreamReader.java, ! java/io/LineNumberReader.java, ! java/io/OutputStreamWriter.java, ! java/io/PrintStream.java, ! java/io/RandomAccessFile.java: ! Merged copyright statements with classpath for easier merging. ! ! 2003-03-19 Michael Koch ! ! * java/lang/Process.java: ! Merged from classpath. ! ! 2003-03-19 Michael Koch ! ! * java/io/FileOutputStream.java ! (FileOutputStream): New constructor, merged from classpath. ! * java/io/FileWriter.java ! (FileWriter): New constructor, merged from classpath. ! ! 2003-03-18 Michael Koch ! ! * java/awt/ScrollPane.java ! (ScrollPane): Rewrote for new ScrollPaneAdjustable. ! (getViewportSize): Likewise. ! (addNotify): Likewise. ! (removeNotify): Likewise. ! * java/awt/ScrollPaneAdjustable.java ! (ScrollPaneAdjustable): No longer extends Scrollbar. ! * java/beans/beancontext/BeanContextServices.java: ! Reformated. ! (getService): Added throws TooManyListenersException; ! * java/beans/beancontext/BeanContextServicesSupport.java: ! Reformated. ! ! 2003-03-18 Michael Koch ! ! * java/io/BufferedOutputStream.java, ! java/io/DataInput.java, ! java/io/DataInputStream.java, ! java/io/DataOutput.java, ! java/io/Externalizable.java: ! More merges from classpath. ! ! 2003-03-18 Michael Koch ! ! * configure.in: Fixed links to platform dependant java.net files. ! * configure: Regenerated. ! * java/net/natInetAddress.cc, ! java/net/natNetworkInterface.cc, ! java/net/natPlainDatagramSocketImpl.cc, ! java/net/natPlainSocketImpl.cc: ! Removed. ! ! 2003-03-18 Michael Koch ! ! * configure.in: Create links to architecture dependent files, ! introduced PLATFORMNET variable (set to NoNet for newlib usage). ! * configure: Regenerated. ! * java/net/natInetAddressNoNet.cc, ! java/net/natInetAddressPosix.cc, ! java/net/natInetAddressWin32.cc, ! java/net/natNetworkInterfaceNoNet.cc, ! java/net/natNetworkInterfacePosix.cc, ! java/net/natNetworkInterfaceWin32.cc, ! java/net/natPlainDatagramSocketImplNoNet.cc, ! java/net/natPlainDatagramSocketImplPosix.cc, ! java/net/natPlainDatagramSocketImplWin32.cc, ! java/net/natPlainSocketImplNoNet.cc, ! java/net/natPlainSocketImplPosix.cc, ! java/net/natPlainSocketImplWin32.cc: New files. ! ! 2003-03-18 Michael Koch ! ! * java/io/BufferedReader.java, ! java/io/BufferedWriter.java, ! java/io/ByteArrayOutputStream.java, ! java/io/FileFilter.java, ! java/io/FilePermission.java, ! java/io/FileReader.java, ! java/io/FileWriter.java, ! java/io/FilenameFilter.java, ! java/io/FilterInputStream.java, ! java/io/FilterOutputStream.java, ! java/io/FilterReader.java, ! java/io/FilterWriter.java, ! java/io/ObjectInput.java, ! java/io/ObjectInputValidation.java, ! java/io/ObjectOutput.java, ! java/io/ObjectStreamField.java, ! java/io/PipedInputStream.java, ! java/io/PipedReader.java, ! java/io/PrintWriter.java, ! java/io/PushbackReader.java, ! java/io/Reader.java, ! java/io/SerializablePermission.java, ! java/io/StringReader.java, ! java/io/Writer.java: ! Merged from classpath. ! ! 2003-03-17 Michael Koch ! ! * java/awt/ScrollPaneAdjustable.java: ! Compile fixes. ! ! 2003-03-17 Michael Koch ! ! * java/net/DatagramSocket.java ! (connect): Fixed comment. ! * java/nio/ByteBuffer.java ! (hasArray): Fixed comment. ! ! 2003-03-17 Michael Koch ! ! * java/beans/Beans.java: ! Explicitely import classes not packages. ! * java/beans/FeatureDescriptor.java ! (preferred): New member variable. ! (isPreferred): New method. ! (setPreferred): New method. ! * java/beans/PropertyEditorManager.java: ! Explicitely import used classes. ! * java/beans/beancontext/BeanContextChild.java: ! Added line wrapping. ! * java/beans/beancontext/BeanContextChildSupport.java: ! Reindented. ! * java/beans/beancontext/BeanContextEvent.java: ! Reindented. ! ! 2003-03-17 Michael Koch ! ! * java/awt/Dialog.java ! (Dialog): New constructor, changed implementations, added ! documentation. ! * java/awt/ScrollPaneAdjustable.java ! (ScrollPaneAdjustable): Extends Object, implements Adjustable and ! Serializable. ! (serialVersionUID): New member variable. ! (sp): New member variable. ! (orientation): New member variable. ! (value): New member variable. ! (minimum): New member variable. ! (maximum): New member variable. ! (visibleAmount): New member variable. ! (unitIncrement): New member variable. ! (blockIncrement): New member variable. ! (AdjustmentListener): New member variable. ! (ScrollPaneAdjustable): New implementation. ! (addAdjustmentListener): New method. ! (removeAdjustmentListener): New method. ! (getAdjustmentListeners): New method. ! (getBlockIncrement): New method. ! (getMaximum): New method. ! (getMinimum): New method. ! (getOrientation): New method. ! (getUnitIncrement): New method. ! (getValue): New method. ! (getVisibleAmount): New method. ! (setBlockIncrement): New method. ! (setMaximum): Implemented. ! (setMinimum): Implemented. ! (setUnitIncrement): New method. ! (setValue): New method. ! (setVisibleAmount): Implemented. ! (paramString): New stubbed method. ! * java/awt/Window.java ! (show): Call setVisible(). ! (hide): Call setVisible(). ! (processEvent): Add cases for WINDOW_GAINED_FOCUS, WINDOW_LOST_FOCUS ! and WINDOW_STATE_CHANGED. ! (processWindowFocusEvent): New method. ! (processWindowStateEvent): New method. ! (postEvent): Deprecated. ! (applyResourceBundle): Deprecated. ! * java/awt/datatransfer/DataFlavor.java ! (DataFlavor): Doesn't thow ClassNotFoundException. ! ! 2003-03-17 Michael Koch ! ! * javax/print/attribute/Attribute.java, ! javax/print/attribute/AttributeSet.java, ! javax/print/attribute/PrintRequestAttributeSet.java: ! New files. ! * Makefile.am ! (javax_source_files): Added new files: ! javax/print/attribute/Attribute.java ! javax/print/attribute/AttributeSet.java ! javax/print/attribute/PrintRequestAttributeSet.java ! * Makefile.in: Regenerated. ! ! 2003-03-17 Michael Koch ! ! * javax/print/attribute/Attribute.java, ! javax/print/attribute/AttributeSet.java, ! javax/print/attribute/PrintRequestAttributeSet.java: ! New files. ! * Makefile.am ! (awt_java_source_files): Added new files: ! javax/print/attribute/Attribute.java ! javax/print/attribute/AttributeSet.java ! javax/print/attribute/PrintRequestAttributeSet.java ! * Makefile.in: Regenerated. ! ! 2003-03-16 Tom Tromey ! ! * resolve.cc (ncode): Use _Jv_platform_ffi_abi. ! Include platform.h. ! * java/lang/natRuntime.cc (insertSystemProperties): Use ! _Jv_platform_path_separator. ! (nativeGetLibname): Use _Jv_platform_file_separator. ! (_load): Use _Jv_platform_onload_names. ! (onload_names): New global. ! * include/win32.h (_Jv_platform_file_separator): New define. ! (_Jv_platform_path_separator): Likewise. ! (_Jv_platform_onload_names): Likewise. ! (_Jv_platform_ffi_abi): Likewise. ! * include/posix.h (_Jv_platform_file_separator): New define. ! (_Jv_platform_path_separator): Likewise. ! (_Jv_platform_onload_names): Likewise. ! (_Jv_platform_ffi_abi): Likewise. ! ! 2003-03-14 Hans Boehm ! ! * java/lang/natObject.cc (JV_SYNC_HASH): replace signed % by &. ! ! 2003-02-14 Jeroen Frijters * java/io/ObjectInputStream.java (readObject): Cleaned up the class hierarchy loop. *************** *** 248,253 **** --- 9700,9726 ---- * java/io/ObjectStreamClass.java (hasReadMethod): Added method to facilitate caching the Method object in the future. + 2003-03-12 Andreas Schwab + + * configure.in: Avoid trailing /. in toolexeclibdir. + * configure: Rebuilt. + + 2003-03-11 Michael Koch + + * gnu/java/nio/ByteBufferImpl.java + (putInt): Use limit() instead of limit. + * gnu/java/nio/CharBufferImpl.java + (slice): Fixed implementation. + (subSequence): Better bounds checking. + * gnu/java/nio/MappedByteFileBuffer.java: + Import all needed classes directly. + * java/nio/ByteBuffer.java + (hashCode): New dummy method. + * java/nio/CharBuffer.java + (array_offset): New member variable. + (hasArray): Fixed documentation. + (arrayOffset): Return array_offset. + 2003-03-10 2003-02-27 Mohan Embar * include/jvm.h: removed declaration of _Jv_ThisExecutable() *************** *** 277,288 **** --- 9750,9864 ---- (gnu::gcj::runtime::NameFinder::getExternalLabel): Define using LABEL_PREFIX. + 2003-03-10 Tom Tromey + + * Makefile.in: Rebuilt. + * Makefile.am (GCJ_WITH_FLAGS): Added -Wno-deprecated. + (JC1FLAGS): Removed -Wno-deprecated. + + 2003-03-10 Michael Koch + + * java/nio/ByteOrder.java + (nativeOrder): Working implementation, added documentation. + (toString): Added documentation. + + 2003-03-10 Michael Koch + + * java/net/DatagramSocket.java, + java/net/MulticastSocket.java, + java/net/Socket.java, + java/net/URL.java, + java/net/URLConnection.java: + Fixed some documentation tags to make javadoc and friends happy. + + 2003-03-10 Michael Koch + + * java/beans/beancontext/BeanContextServicesSupport.java, + java/beans/beancontext/BeanContextSupport.java: New files. + * Makefile.am + (awt_source_files): Added new files. + * Makefile.in: Regenerated. + + 2003-03-10 Michael Koch + + * java/awt/FocusTraversalPolicy.java + (FocusTraversalPolicy): Documentation added. + (getComponentAfter): Documentation added. + (getComponentBefore): Documentation added. + (getFirstComponent): Documentation added. + (getLastComponent): Documentation added. + (getDefaultComponent): Documentation added. + (getInitialComponent): Documentation added. + * java/awt/ScrollPaneAdjustable.java + (sp): New member variable. + (orientation): New member variable. + (value): New member variable. + (minimum): New member variable. + (maximum): New member variable. + (visibleAmount): New member variable. + (unitIncrement): New member variable. + (blockIncrement): New member variable. + (adjustmentListener): New member variable. + (ScrollPaneAdjustable): Rewrote. + (addAdjustmentListener): New method. + (removeAdjustmentListener): New method. + (getAdjustmentListeners): New method. + (getBlockIncrement): New method. + (getMaximum): New method. + (getMinimum): New method. + (getOrientation): New method. + (getUnitIncrement): New method. + (getValue): New method. + (getVisibleAmount): New method. + (setBlockIncrement): New method. + (setUnitIncrement): New method. + (setMaximum): Implemented. + (setMinimum): Implemented. + (setValue): New method. + (setVisibleAmount): Implemented. + (paramString): New method. + * java/awt/Window.java + (show): Use setVisible(true) instead of super.show(). + (hide): Use sevVisible(false) instead of super.hide(). + (processWindowEvent): Added cases for WINDOW_GAINED_FOCUS, + WINDOW_LOST_FOCUS and WINDOW_STATE_CHANGED. + (postEvent): Deprecated. + (applyResourceBundle): Deprecated. + (processWindowFocusEvent): New method. + (processWindowStateEvent): New method. + * java/awt/datatransfer/DataFlavor.java: Reindented. + * java/awt/font/TextHitInfo.java + (charIndex): New member variable. + (leadingEdge): New member variable. + (TextHitInfo): New constructor. + (getCharIndex): Implemented. + (isLeadingEdge): Implemented. + (getInsertionIndex): Implemented. + (hashCode): Access charIndex directly. + (equals): Reformated. + (leading): Implemented. + (trailing): Implemented. + (beforeOffset): Implemented. + (afterOffset): Implemented. + (getOtherHit): Implemented. + (getOffsetHit): Implemented. + (toString): Implemented. + * java/awt/image/BufferedImage.java + (BufferedImage): Implements WritableRenderedImage. + (observers): New member variable. + (addTileObserver): New method. + (removeTileObserver): New method. + 2003-03-09 Tom Tromey PR libgcj/9934: * java/io/natFileDescriptorPosix.cc (available): Fixed arguments to lseek. Return 0 if we can't compute the value. + 2003-03-03 Michael Koch + + * java/net/NetworkInterface.java: Merged with classpath. + 2003-03-03 Tom Tromey * verify.cc (handle_jsr_insn): Don't fail if `jsr' appears at end *************** *** 290,300 **** --- 9866,10109 ---- (handle_ret_insn): Fail if returning to jsr that appears at end of bytecode. + 2003-03-03 Michael Koch + + * Makefile.am + (ordinary_java_source_files): + Added gnu/java/nio/MappedByteFileBuffer.java. + (nat_source_files): + Added gnu/java/nio/natMappedByteFileBuffer.cc. + * Makefile.in: Regenerated. + + 2003-03-03 Michael Koch + + * java/net/DatagramSocket.java + (connect): Merged comment from classpath. + (receive): Merged documentation from classpath. + * java/net/Socket.java + (setSoTimeout): Clarified documentation. + * java/net/URL.java + (getPath): Merged from classpath. + (getUserInfo): Merged from classpath. + (getQuery): Merged from classpath. + * java/net/URLStreamHandler.java + (toExternalForm): Merged from classpath. + 2003-03-02 Mark Wielaard * java/util/Properties.java (load): Only skip line if the first character is a comment, whitespaces don't count. + 2003-03-02 Michael Koch + + * java/net/NetPermission.java: + Merged copyright with classpath. + + 2003-03-02 Michael Koch + + * java/lang/Package.java: + Remerged from classpath. + + 2003-03-02 Michael Koch + + * java/net/HttpURLConnection.java + (HTTP_SERVER_ERROR): Deprecated. + * java/net/MulticastSocket.java + (send): Replaced checkMulticast with appropriate checkPermission call, + deprecated. + * java/net/URLDecoder.java + (decode): Deprecated. + * java/net/URLEncoder.java + (encode): Deprecated. + + 2003-03-02 Michael Koch + + * javax/swing/text/Caret.java + (getMagicCaretPosition): Fixed typo in method name. + * javax/swing/text/DefaultCaret.java + (getMagicCaretPosition): Fixed typo in method name. + + 2003-03-02 Michael Koch + + * java/awt/List.java + (setMultipleSelections): Deprecated. + (delItem): Deprecated. + * java/awt/MenuComponent.java + (getPeer): Deprecated. + * java/awt/ScrollPane.java + (addNotify): getPeer() is deprecated. Use isDisplayable() instead. + * java/awt/dnd/MouseDragGestureRecognizer.java + (mouseClicked): Added comment. + (mousePressed): Added comment. + (mouseReleased): Added comment. + (mouseEntered): Added comment. + (mouseExited): Added comment. + (mouseDragged): Added comment. + (mouseMoved): Added comment. + * java/awt/event/KeyEvent.java + (KeyEvent): Deprecated. + (setModifiers): Deprecated. + + 2003-03-02 Michael Koch + + * gnu/java/nio/FileChannelImpl.java + (fd): Type FileDescriptor instead of int. + (lengthInternal): Removed. + (FileChannelImpl): Fixed arguments, check type of file object. + (size): Made it native. + (implPosition): New native method. + (implTruncate): New native method. + (position): Implemented. + (truncate): Implemented. + (nio_mmap_file): Changed arguments. + (nio_munmap_file): Changed arguments. + (nio_msync): Changed arguments. + * gnu/java/nio/natFileChannelImpl.cc + (lengthInternal): Removed. + (size): New method. + (implPosition): New method. + (implTruncate): New method. + (nio_mmap_file): Changed arguments. + (nio_munmap_file): Changed arguments. + (nio_msync): Changed arguments. + + 2003-03-02 Michael Koch + + * java/awt/dnd/DropTargetContext.java: + Compile fix: Forgot to commit import. + + 2003-03-02 Michael Koch + + * java/awt/Component.java, + java/awt/ScrollPane.java: + Fixed typos. + + 2003-03-02 Michael Koch + + * java/awt/dnd/DnDEventMulticaster.java: New file. + * java/awt/dnd/DragSource.java + (flavorMap): New member variable. + (dragSourceListener): New member variable. + (dragSourceMotionListener): New member variable. + (getFlavorMap): Implemented. + (createDragGestureRecognizer): Implemented. + (addDragSourceListener): Implemented. + (removeDragSourceListener): Implemented. + (getDragSourceListeners): Implemented. + (addDragSourceMotionListener): Implemented. + (removeDragSourceMotionListener): Implemented. + (getDragSourceMotionListeners): Implemented. + (getListeners): Implemented. + * java/awt/dnd/DragSourceContext.java + (peer): New member variable. + (cursor): New member variable. + (transferable): New member variable. + (trigger): New member variable. + (dragSourceListener): New member variable. + (image): New member variable. + (offset): New member variable. + (DragSourceContext): Implemented. + (getDragSource): Implemented. + (getComponent): Implemented. + (getTrigger): Implemented. + (getSourceActions): Implemented. + (setCursor): Implemented. + (getCursor): Implemented. + (addDragSourceListener): Implemented. + (removeDragSourceListener): Implemented. + (getTransferable): Implemented. + * java/awt/dnd/DropTarget.java + (DropTargetAutoScroller.component): New member variable. + (DropTargetAutoScroller.point): New member variable. + (DropTargetAutoScroller.DropTargetAutoScroller): Implemented. + (DropTargetAutoScroller.updateLocation): Implemented. + (active): Renamed from isActive, defaults to true now. + (component): New member variable. + (flavorMap): New member variable. + (actions): New member variable. + (dropTargetContext): New member variable. + (dropTargetListener): New member variable. + (DropTarget): Implemented. + (getComponent): Implemented. + (setComponent): Implemented. + (setDefaultActions): Implemented. + (getDefaultActions): Implemented. + (setActive): Use active instead of isActive. + (isActive): Use active instead of isActive. + (addDropTargetListener): Implemented. + (removeDropTargetListener): Implemented. + (getFlavorMap): Implemented. + (setFlavorMap): Implemented. + (getDropTargetContext): Implemented. + (createDropTargetContext): Implemented. + (createDropTargetAutoScroller): Implemented. + * java/awt/dnd/DropTargetContext.java + (TransferableProxy.getTransferDataFlavors): Implemented. + (TransferableProxy.isDataFlavorSupported): Implemented. + (TransferableProxy.getTransferData): Implemented. + (dropTarget): New member variable. + (dtcp): New member variable. + (DropTargetContext): New package private constructor. + (getDropTarget): Implemented. + (getComponent): Implemented. + (addNotify): Implemented. + (removeNotify): Implemented. + (getCurrentDataFlavorsAsList): Implemented. + (isDataFlavorSupported): Implemented. + * java/awt/dnd/MouseDragGestureRecognizer.java + (registerListeners): Implemented. + (unregisterListeners): Implemented. + * Makefile.am + (awt_java_source_files): Added java/awt/dnd/DnDEventMulticaster.java. + * Makefile.in: Regenerated. + + 2003-03-02 Michael Koch + + * java/awt/Component.java + (eventTypeEnabled): New method. + (dispatchEventImpl): Moved checks for event to eventTypeEnabled. + * java/awt/Container.java + (changeSupport): New member variable. + (addPropertyChangeListener): New methods. + * java/awt/ContainerOrderFocusTraversalPolicy.java + (ContainerOrderFocusTraversalPolicy): Added comment. + (getComponentAfter): Throw exception, documentation added. + (getComponentBefore): Throw exception, documentation added. + (getFirstComponent): Throw exception, documentation added. + (getLastComponent): Throw exception, documentation added. + (getDefaultComponent): Throw exception, documentation added. + * java/awt/EventQueue.java: Reindented. + * java/awt/FocusTraversalPolicy.java: + (FocusTraversalPolicy): Added comment. + (getComponentAfter): Documentation added. + (getComponentBefore): Documentation added. + (getFirstComponent): Documentation added. + (getLastComponent): Documentation added. + (getDefaultComponent): Documentation added. + (getInitialComponent): Documentation added. + * java/awt/ScrollPane.java + (wheelScrollingEnabled): New member variable. + (ScrollPane): Initialize wheelScollingEnabled. + (eventTypeEnabled): New method. + (isWheelScrollingEnabled): New method. + (setWheelScrollingEnabled): New method. + + 2003-03-02 Michael Koch + + * java/net/DatagramSocket.java + (closed): New member variable. + (close): Use closed variable. + (getInetAddress): No need to call isConnected(). + (getPort): No need to call isConnected(). + (disconnect): Reset remoteAddress and remotePort, fixed typo. + (isClosed): Reimplemented. + + 2003-03-02 Michael Koch + + * configure.in: Added check for memory mapping of files. + * configure: Regenerated. + * config.h.in: Regenerated. + 2003-03-01 Jason Thorpe * posix-threads.cc: Include if HAVE_UNISTD_H is defined. *************** *** 316,330 **** (java::io::File::performSetLastModified): Likewise. (java::io::File::performListRoots): Likewise. ! 2003-03-01 Michael Koch ! * java/net/DatagramSocket.java ! (closed): New member variable. ! (close): Use closed variable. ! (getInetAddress): No need to call isConnected(). ! (getPort): No need to call isConnected(). ! (disconnect): Reset remoteAddress and remotePort, fixed typo. ! (isClosed): Reimplemented. 2003-03-01 Ranjit Mathew --- 10125,10138 ---- (java::io::File::performSetLastModified): Likewise. (java::io::File::performListRoots): Likewise. ! 2003-03-01 Tom Tromey ! * java/lang/natObject.cc: Don't include assert.h. ! (heavy_lock_obj_finalization_proc): Use JvAssert. ! (remove_all_heavy): Likewise. ! (_Jv_MonitorEnter): Likewise. ! (_Jv_MonitorExit): Likewise. ! (wait): Likewise. 2003-03-01 Ranjit Mathew *************** *** 347,425 **** * java/lang/natWin32Process.cc (startProcess): Double-quote each program array element passed to CreateProcess. ! 2003-03-01 Michael Koch ! * gnu/java/nio/natSocketChannelImpl.cc: ! Reverse logic for DISABLE_JAVA_NET. Thanks to Krister Walfridsson ! for pointing to it. ! * gnu/java/nio/natSocketChannelImpl.cc: ! Added support for platforms without network support. ! * java/nio/channels/FileChannel.java ! (toString): New implementation, added documentation. ! (map): Added exception documentation. ! (size): Added exception documentation. ! (write): New methods, documentation work. ! (read): New methods, documentation work. ! (implCloseChannel): Rewrote exception documentation. ! (force): Throws IOException, added documentation. ! (lock): New methods. ! (tryLock): New methods. ! (position): New methods. ! (transferTo): New method. ! (transferFrom): New method. ! (truncate): New method. ! * java/nio/channels/spi/SelectorProvider.java ! (provider): Implemented. ! * Makefile.am ! (ordinary_java_source_files): Added the following files: ! gnu/java/nio/DatagramChannelImpl.java ! gnu/java/nio/FileChannelImpl.java ! gnu/java/nio/PipeImpl.java ! gnu/java/nio/SelectionKeyImpl.java ! gnu/java/nio/SelectorImpl.java ! gnu/java/nio/SelectorProviderImpl.java ! gnu/java/nio/ServerSocketChannelImpl.java ! gnu/java/nio/SocketChannelImpl.java ! java/nio/channels/FileLock.java ! (nat_java_source_files): Added the following files: ! gnu/java/nio/natFileChannelImpl.cc ! gnu/java/nio/natSelectorImpl.cc ! gnu/java/nio/natSocketChannelImpl.cc ! * Makefile.in: Regenerated. ! 2003-03-01 Michael Koch ! * gnu/java/nio/ByteBufferImpl.java ! (ByteBufferImpl): Renamed two variables. ! * gnu/java/nio/CharBufferImpl.java ! (CharBufferImpl): Renamed two variables. ! * gnu/java/nio/DoubleBufferImpl.java ! (DoubleBufferImpl): Renamed two variables. ! * gnu/java/nio/FloatBufferImpl.java ! (FloatBufferImpl): Renamed two variables. ! * gnu/java/nio/IntBufferImpl.java ! (IntBufferImpl): Renamed two variables. ! * gnu/java/nio/LongBufferImpl.java ! (LongBufferImpl): Renamed two variables. ! * gnu/java/nio/ShortBufferImpl.java ! (ShortBufferImpl): Renamed two variables. ! * java/nio/CharBuffer.java ! (wrap): Fixed arguments to CharBufferImpl constructor. ! (hasArray): Only not read-only buffers have backing arrays. ! (length): Documentation added. ! (subSequence): Documentation added. ! * java/nio/DoubleBuffer.java ! (hasArray): Only not read-only buffers have backing arrays. ! * java/nio/FloatBuffer.java ! (hasArray): Only not read-only buffers have backing arrays. ! * java/nio/IntBuffer.java ! (hasArray): Only not read-only buffers have backing arrays. ! * java/nio/LongBuffer.java ! (hasArray): Only not read-only buffers have backing arrays. ! * java/nio/ShortBuffer.java ! (hasArray): Only not read-only buffers have backing arrays. 2003-03-01 Mark Wielaard --- 10155,10351 ---- * java/lang/natWin32Process.cc (startProcess): Double-quote each program array element passed to CreateProcess. ! 2003-03-01 Tom Tromey ! * java/rmi/registry/RegistryHandler.java: Deprecate. ! 2003-03-01 Tom Tromey ! * javax/accessibility/AccessibleEditableText.java, ! javax/accessibility/AccessibleHyperlink.java: New versions from ! Classpath. ! * gnu/java/locale/LocaleInformation_af_ZA.java, ! gnu/java/locale/LocaleInformation_ar_AE.java, ! gnu/java/locale/LocaleInformation_ar_BH.java, ! gnu/java/locale/LocaleInformation_ar_DZ.java, ! gnu/java/locale/LocaleInformation_ar_EG.java, ! gnu/java/locale/LocaleInformation_ar_IN.java, ! gnu/java/locale/LocaleInformation_ar_IQ.java, ! gnu/java/locale/LocaleInformation_ar_JO.java, ! gnu/java/locale/LocaleInformation_ar_KW.java, ! gnu/java/locale/LocaleInformation_ar_LB.java, ! gnu/java/locale/LocaleInformation_ar_LY.java, ! gnu/java/locale/LocaleInformation_ar_MA.java, ! gnu/java/locale/LocaleInformation_ar_OM.java, ! gnu/java/locale/LocaleInformation_ar_QA.java, ! gnu/java/locale/LocaleInformation_ar_SD.java, ! gnu/java/locale/LocaleInformation_ar_SY.java, ! gnu/java/locale/LocaleInformation_ar_TN.java, ! gnu/java/locale/LocaleInformation_ar_YE.java, ! gnu/java/locale/LocaleInformation_be_BY.java, ! gnu/java/locale/LocaleInformation_bn_IN.java, ! gnu/java/locale/LocaleInformation_br_FR.java, ! gnu/java/locale/LocaleInformation_bs_BA.java, ! gnu/java/locale/LocaleInformation_ca_ES.java, ! gnu/java/locale/LocaleInformation_cs_CZ.java, ! gnu/java/locale/LocaleInformation_cy_GB.java, ! gnu/java/locale/LocaleInformation_da_DK.java, ! gnu/java/locale/LocaleInformation_de_AT.java, ! gnu/java/locale/LocaleInformation_de_BE.java, ! gnu/java/locale/LocaleInformation_de_CH.java, ! gnu/java/locale/LocaleInformation_de_DE.java, ! gnu/java/locale/LocaleInformation_de_LU.java, ! gnu/java/locale/LocaleInformation_el_GR.java, ! gnu/java/locale/LocaleInformation_en_AU.java, ! gnu/java/locale/LocaleInformation_en_BW.java, ! gnu/java/locale/LocaleInformation_en_CA.java, ! gnu/java/locale/LocaleInformation_en_DK.java, ! gnu/java/locale/LocaleInformation_en_GB.java, ! gnu/java/locale/LocaleInformation_en_HK.java, ! gnu/java/locale/LocaleInformation_en_IE.java, ! gnu/java/locale/LocaleInformation_en_IN.java, ! gnu/java/locale/LocaleInformation_en_NZ.java, ! gnu/java/locale/LocaleInformation_en_PH.java, ! gnu/java/locale/LocaleInformation_en_SG.java, ! gnu/java/locale/LocaleInformation_en_US.java, ! gnu/java/locale/LocaleInformation_en_ZA.java, ! gnu/java/locale/LocaleInformation_en_ZW.java, ! gnu/java/locale/LocaleInformation_es_AR.java, ! gnu/java/locale/LocaleInformation_es_BO.java, ! gnu/java/locale/LocaleInformation_es_CL.java, ! gnu/java/locale/LocaleInformation_es_CO.java, ! gnu/java/locale/LocaleInformation_es_CR.java, ! gnu/java/locale/LocaleInformation_es_DO.java, ! gnu/java/locale/LocaleInformation_es_EC.java, ! gnu/java/locale/LocaleInformation_es_ES.java, ! gnu/java/locale/LocaleInformation_es_GT.java, ! gnu/java/locale/LocaleInformation_es_HN.java, ! gnu/java/locale/LocaleInformation_es_MX.java, ! gnu/java/locale/LocaleInformation_es_NI.java, ! gnu/java/locale/LocaleInformation_es_PA.java, ! gnu/java/locale/LocaleInformation_es_PE.java, ! gnu/java/locale/LocaleInformation_es_PR.java, ! gnu/java/locale/LocaleInformation_es_PY.java, ! gnu/java/locale/LocaleInformation_es_SV.java, ! gnu/java/locale/LocaleInformation_es_US.java, ! gnu/java/locale/LocaleInformation_es_UY.java, ! gnu/java/locale/LocaleInformation_es_VE.java, ! gnu/java/locale/LocaleInformation_et_EE.java, ! gnu/java/locale/LocaleInformation_eu_ES.java, ! gnu/java/locale/LocaleInformation_fa_IR.java, ! gnu/java/locale/LocaleInformation_fi_FI.java, ! gnu/java/locale/LocaleInformation_fo_FO.java, ! gnu/java/locale/LocaleInformation_fr_BE.java, ! gnu/java/locale/LocaleInformation_fr_CA.java, ! gnu/java/locale/LocaleInformation_fr_CH.java, ! gnu/java/locale/LocaleInformation_fr_FR.java, ! gnu/java/locale/LocaleInformation_fr_LU.java, ! gnu/java/locale/LocaleInformation_ga_IE.java, ! gnu/java/locale/LocaleInformation_gd_GB.java, ! gnu/java/locale/LocaleInformation_gl_ES.java, ! gnu/java/locale/LocaleInformation_gv_GB.java, ! gnu/java/locale/LocaleInformation_he_IL.java, ! gnu/java/locale/LocaleInformation_hi_IN.java, ! gnu/java/locale/LocaleInformation_hr_HR.java, ! gnu/java/locale/LocaleInformation_hu_HU.java, ! gnu/java/locale/LocaleInformation_id_ID.java, ! gnu/java/locale/LocaleInformation_it_CH.java, ! gnu/java/locale/LocaleInformation_it_IT.java, ! gnu/java/locale/LocaleInformation_iw_IL.java, ! gnu/java/locale/LocaleInformation_ja_JP.java, ! gnu/java/locale/LocaleInformation_ka_GE.java, ! gnu/java/locale/LocaleInformation_kl_GL.java, ! gnu/java/locale/LocaleInformation_ko_KR.java, ! gnu/java/locale/LocaleInformation_kw_GB.java, ! gnu/java/locale/LocaleInformation_lt_LT.java, ! gnu/java/locale/LocaleInformation_lv_LV.java, ! gnu/java/locale/LocaleInformation_mi_NZ.java, ! gnu/java/locale/LocaleInformation_mk_MK.java, ! gnu/java/locale/LocaleInformation_mr_IN.java, ! gnu/java/locale/LocaleInformation_mt_MT.java, ! gnu/java/locale/LocaleInformation_nl_BE.java, ! gnu/java/locale/LocaleInformation_nl_NL.java, ! gnu/java/locale/LocaleInformation_nn_NO.java, ! gnu/java/locale/LocaleInformation_no_NO.java, ! gnu/java/locale/LocaleInformation_oc_FR.java, ! gnu/java/locale/LocaleInformation_pl_PL.java, ! gnu/java/locale/LocaleInformation_pt_BR.java, ! gnu/java/locale/LocaleInformation_pt_PT.java, ! gnu/java/locale/LocaleInformation_ro_RO.java, ! gnu/java/locale/LocaleInformation_ru_RU.java, ! gnu/java/locale/LocaleInformation_ru_UA.java, ! gnu/java/locale/LocaleInformation_se_NO.java, ! gnu/java/locale/LocaleInformation_sk_SK.java, ! gnu/java/locale/LocaleInformation_sl_SI.java, ! gnu/java/locale/LocaleInformation_sq_AL.java, ! gnu/java/locale/LocaleInformation_sr_YU.java, ! gnu/java/locale/LocaleInformation_sv_FI.java, ! gnu/java/locale/LocaleInformation_sv_SE.java, ! gnu/java/locale/LocaleInformation_ta_IN.java, ! gnu/java/locale/LocaleInformation_te_IN.java, ! gnu/java/locale/LocaleInformation_tg_TJ.java, ! gnu/java/locale/LocaleInformation_tl_PH.java, ! gnu/java/locale/LocaleInformation_tr_TR.java, ! gnu/java/locale/LocaleInformation_uk_UA.java, ! gnu/java/locale/LocaleInformation_ur_PK.java, ! gnu/java/locale/LocaleInformation_uz_UZ.java, ! gnu/java/locale/LocaleInformation_vi_VN.java, ! gnu/java/locale/LocaleInformation_yi_US.java, ! gnu/java/locale/LocaleInformation_zh_CN.java, ! gnu/java/locale/LocaleInformation_zh_HK.java, ! gnu/java/locale/LocaleInformation_zh_SG.java, ! gnu/java/locale/LocaleInformation_zh_TW.java: Updated copyright ! info; from Classpath. ! * gnu/awt/xlib/XPanelPeer.java (beginLayout, endLayout, ! isPaintPending): New methods. ! * gnu/awt/xlib/XFramePeer.java (getState, setState, ! setMaximizedBounds): New methods. ! (beginLayout, endLayout, isPaintPending): Likewise. ! * gnu/awt/xlib/XCanvasPeer.java (isFocusable): New method. ! (requestFocus): Likewise. ! (isObscured): Likewise. ! (canDetermineObscurity): Likewise. ! (coalescePaintEvent): Likewise. ! (updateCursorImmediately): Likewise. ! (createVolatileImage): Likewise. ! (handlesWheelScrolling): Likewise. ! (createBuffers): Likewise. ! (getBackBuffer): Likewise. ! (flip): Likewise. ! (destroyBuffers): Likewise. ! ! * Makefile.in: Rebuilt. ! * Makefile.am (awt_java_source_files): Added DropTargetPeer.java, ! RobotPeer.java. ! * gnu/java/awt/GLightweightPeer.java, ! gnu/java/awt/peer/gtk/GtkChoicePeer.java, ! gnu/java/awt/peer/gtk/GtkComponentPeer.java, ! gnu/java/awt/peer/gtk/GtkContainerPeer.java, ! gnu/java/awt/peer/gtk/GtkFramePeer.java, ! gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java, ! gnu/java/awt/peer/gtk/GtkTextComponentPeer.java, ! java/awt/dnd/peer/DragSourceContextPeer.java, ! java/awt/dnd/peer/DropTargetContextPeer.java, ! java/awt/peer/ButtonPeer.java, ! java/awt/peer/CheckboxMenuItemPeer.java, ! java/awt/peer/CheckboxPeer.java, java/awt/peer/ChoicePeer.java, ! java/awt/peer/ComponentPeer.java, ! java/awt/peer/ContainerPeer.java, java/awt/peer/DialogPeer.java, ! java/awt/peer/FileDialogPeer.java, java/awt/peer/FramePeer.java, ! java/awt/peer/LabelPeer.java, java/awt/peer/ListPeer.java, ! java/awt/peer/MenuBarPeer.java, ! java/awt/peer/MenuComponentPeer.java, ! java/awt/peer/MenuItemPeer.java, java/awt/peer/MenuPeer.java, ! java/awt/peer/PopupMenuPeer.java, ! java/awt/peer/ScrollPanePeer.java, ! java/awt/peer/ScrollbarPeer.java, java/awt/peer/TextAreaPeer.java, ! java/awt/peer/TextComponentPeer.java, ! java/awt/peer/TextFieldPeer.java, java/awt/peer/WindowPeer.java: ! New versions from Classpath. ! * java/awt/dnd/peer/DropTargetPeer.java: New file from Classpath. ! * java/awt/peer/RobotPeer.java: Likewise. 2003-03-01 Mark Wielaard *************** *** 490,495 **** --- 10416,10472 ---- * java/io/natObjectInputStream.cc (getField): Removed. (getMethod): Likewise. + 2003-02-27 Michael Koch + + * java/beans/Beans.java, + java/beans/FeatureDescriptor.java + java/beans/PropertyEditorManager.java: + Reformated to GNU style. + + 2003-02-25 Michael Koch + + * gnu/java/nio/MappedByteFileBuffer.java, + gnu/java/nio/natMappedByteFileBuffer.cc: + New files, both are not compiled yet to get not noncompiling CVS. + + 2003-02-24 Tom Tromey + + * java/util/prefs/AbstractPreferences.java (isUserNode): + Implemented. + + 2003-02-24 Tom Tromey + + * java/lang/ClassLoader.java (defineClass(byte[],int,int)): + Deprecate. + * java/lang/Thread.java (resume): Deprecate. + * java/io/ByteArrayOutputStream.java (toString(int)): Fixed typo + in @deprecated. + + 2003-02-23 Tom Tromey + + * Makefile.in: Rebuilt. + * Makefile.am (JC1FLAGS): Added -Wno-deprecated. + + 2003-02-23 Tom Tromey + + * java/lang/natRuntime.cc (libraries_size, libraries_count, + libraries): Removed. + (add_library): Removed. + (_load): Don't call add_library. + (loadLibraryInternal): Likewise. + (init): Likewise. + (lookup_data): New struct. + (find_symbol): New function. + (_Jv_FindSymbolInExecutable): Use it. + + 2002-02-21 Anthony Green + + * java/lang/Thread.java (Thread): New constructor taking stack + size parameter (ignored for now). + * Many methods: Merged GNU Classpath documentation. + + * java/lang/Class.java (finalize): throws a Throwable. + 2003-02-21 Mark Wielaard * java/util/zip/ZipEntry.java (setComment): Don't check length when *************** *** 504,515 **** --- 10481,10509 ---- * java/util/zip/ZipFile.java (finalize): New method. + 2003-02-21 Michael Koch + + * gnu/java/nio/natSocketChannelImpl.cc: + Reverse logic for DISABLE_JAVA_NET. Thanks to Krister Walfridsson + for pointing to it. + + 2003-02-20 Raif S. Naffah + + * java/math/BigInteger.java (euclidInv): Take result array as an + argument. Updated all callers. + (modInverse): Removed unused variables. + 2003-02-20 Alexandre Oliva * configure.in: Propagate ORIGINAL_LD_FOR_MULTILIBS to config.status. * configure: Rebuilt. + 2003-02-19 Michael Koch + + * gnu/java/nio/natSocketChannelImpl.cc: + Added support for platforms without network support. + 2003-02-19 Rainer Orth * gnu/gcj/runtime/natStackTrace.cc: Include platform.h immediately *************** *** 522,554 **** * include/posix.h (fcntl, socket, connect, close, bind, accept, listen, write, read): Undef to avoid interference from OS macros. ! 2003-02-18 Raif S. Naffah ! * java/math/BigInteger.java (euclidInv): Take result array as an ! argument. Updated all callers. ! (modInverse): Removed unused variables. ! 2003-02-17 Michael Koch ! * java/net/DatagramSocket.java ! (connect): Merged with classpath. ! (disconnect): Merged documentation with classpath. ! (receice): Merged documentation with classpath. ! (send): Merged documentation with classpath. ! 2003-02-17 Jesse Rosenstock ! * java/nio/charset/Charset.java ! (isRegistered): Fixed method args and implementation. ! * java/nio/charset/CharsetEncoder.java ! (unmappableCharacterAction): New method. 2003-02-17 Raif S. Naffah * java/math/BigInteger.java (euclidInv): Return array of `BigInteger's. Changed all callers. ! 2003-02-16 Ranjit Mathew * java/util/Properties.java (store): Move the code formerly in list(), into this method. --- 10516,10655 ---- * include/posix.h (fcntl, socket, connect, close, bind, accept, listen, write, read): Undef to avoid interference from OS macros. ! 2003-02-19 Michael Koch ! * gnu/java/nio/ByteBufferImpl.java ! (ByteBufferImpl): Renamed two variables. ! * gnu/java/nio/CharBufferImpl.java ! (CharBufferImpl): Renamed two variables. ! * gnu/java/nio/DoubleBufferImpl.java ! (DoubleBufferImpl): Renamed two variables. ! * gnu/java/nio/FloatBufferImpl.java ! (FloatBufferImpl): Renamed two variables. ! * gnu/java/nio/IntBufferImpl.java ! (IntBufferImpl): Renamed two variables. ! * gnu/java/nio/LongBufferImpl.java ! (LongBufferImpl): Renamed two variables. ! * gnu/java/nio/ShortBufferImpl.java ! (ShortBufferImpl): Renamed two variables. ! * java/nio/CharBuffer.java ! (wrap): Fixed arguments to CharBufferImpl constructor. ! (hasArray): Only not read-only buffers have backing arrays. ! (length): Documentation added. ! (subSequence): Documentation added. ! * java/nio/DoubleBuffer.java ! (hasArray): Only not read-only buffers have backing arrays. ! * java/nio/FloatBuffer.java ! (hasArray): Only not read-only buffers have backing arrays. ! * java/nio/IntBuffer.java ! (hasArray): Only not read-only buffers have backing arrays. ! * java/nio/LongBuffer.java ! (hasArray): Only not read-only buffers have backing arrays. ! * java/nio/ShortBuffer.java ! (hasArray): Only not read-only buffers have backing arrays. ! ! 2003-02-19 Michael Koch ! * javax/accessibility/AccessibleContext.java ! (ACCESSIBLE_DESCRIPTION_PROPERTY): Fixed typo. ! 2003-02-19 Michael Koch ! * java/awt/ScrollPaneAdjustable.java: Reformated. ! 2003-02-19 Michael Koch ! ! * gnu/awt/j2d/Graphics2DImpl.java ! (getFontRenderContext): New method. ! (drawGlyphVector): New method. ! * java/awt/Graphics2D.java ! (getFontRenderContext): New abstract method. ! (drawGlyphVector): New abstract method. ! ! 2003-02-18 Hans Boehm ! ! * gnu/awt/xlib/XToolkit.java (getFontMetrics): initialize ! if necessary. ! ! * gnu/java/awt/peer/gtk/GtkButtonPeer.java, ! gnu/java/awt/peer/gtk/GtkTextAreaPeer.java, ! gnu/java/awt/peer/gtk/GtkTextFieldPeer.java, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c ! (setFont, gtkSetFont): add. ! gnu/java/awt/peer/gtk/GtkComponentPeer.java (GtkComponentPeer): ! Propagate font to peer. (setFont): add FIXME comment. ! ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c ! (gtkTextGetSize): fix height, width computation. ! ! * gnu/java/awt/peer/gtk/GtkFontPeer.java (GtkFontPeer): ! Make X font name a bit less bogus. ! ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c ! (post_adjustment_event): Pass on GTK_SCROLL_NONE. ! ! * java/awt/Scrollbar.java (setValues): Fix visibleAmount range check. ! (processAdjustmentEvent): Adjust value. ! ! * java/awt/FlowLayout.java (layoutContainer) Fix 2 indexing and one ! logic errors. ! ! * java/awt/Component.java (setVisible, show, hide): Call show and ! hide methods in subclasses. ! (getPreferredSize): don't set prefSize before we have peer. ! ! * java/awt/TextArea.java, java/awt/TextField.java (getPreferredSize): ! Guess (0,0) if we don't have peer. ! ! ! 2003-02-18 Michael Koch ! ! * java/nio/channels/FileChannel.java ! (toString): New implementation, added documentation. ! (map): Added exception documentation. ! (size): Added exception documentation. ! (write): New methods, documentation work. ! (read): New methods, documentation work. ! (implCloseChannel): Rewrote exception documentation. ! (force): Throws IOException, added documentation. ! (lock): New methods. ! (tryLock): New methods. ! (position): New methods. ! (transferTo): New method. ! (transferFrom): New method. ! (truncate): New method. ! * java/nio/channels/spi/SelectorProvider.java ! (provider): Implemented. ! * Makefile.am ! (ordinary_java_source_files): Added the following files: ! gnu/java/nio/DatagramChannelImpl.java ! gnu/java/nio/FileChannelImpl.java ! gnu/java/nio/PipeImpl.java ! gnu/java/nio/SelectionKeyImpl.java ! gnu/java/nio/SelectorImpl.java ! gnu/java/nio/SelectorProviderImpl.java ! gnu/java/nio/ServerSocketChannelImpl.java ! gnu/java/nio/SocketChannelImpl.java ! java/nio/channels/FileLock.java ! (nat_java_source_files): Added the following files: ! gnu/java/nio/natFileChannelImpl.cc ! gnu/java/nio/natSelectorImpl.cc ! gnu/java/nio/natSocketChannelImpl.cc ! * Makefile.in: Regenerated. ! ! 2003-02-17 Tom Tromey ! ! * java/awt/image/ColorModel.java: Re-merged with Classpath. ! * java/awt/image/ImageFilter.java: Likewise. 2003-02-17 Raif S. Naffah * java/math/BigInteger.java (euclidInv): Return array of `BigInteger's. Changed all callers. ! 2003-02-17 Ranjit Mathew * java/util/Properties.java (store): Move the code formerly in list(), into this method. *************** *** 557,573 **** (list (PrintWriter)): Emulate the output of Properties.list() as found in JDK 1.3/1.4. 2003-02-16 Tom Tromey * verify.cc (_Jv_BytecodeVerifier::pop_jump): Removed unused variable. ! 2003-02-14 Michael Koch ! * gnu/java/nio/natServerSocketChannelImpl.cc: Removed. ! * gnu/java/nio/ServerSocketChannelImpl.java ! (SocketAccept): Removed. ! (accept): Commented out use of SocketAccept. 2003-02-14 Mark Wielaard --- 10658,10846 ---- (list (PrintWriter)): Emulate the output of Properties.list() as found in JDK 1.3/1.4. + 2003-02-17 Michael Koch + + * java/net/DatagramSocket.java + (connect): Merged with classpath. + (disconnect): Merged documentation with classpath. + (receice): Merged documentation with classpath. + (send): Merged documentation with classpath. + + 2003-02-17 Michael Koch + + * java/awt/dnd/DragSourceContext.java + (addDragSourceListener): Added documentation. + * java/awt/dnd/DragSourceDragEvent.java + (serialVersionUID): New member variable. + (getDropAction): Reformated. + * java/awt/dnd/DragSourceDropEvent.java + (serialVersionUID): New member variable. + (dropSuccess): Renamed from success for serialization issues. + * java/awt/dnd/DragSourceEvent.java + (serialVersionUID): New member variable. + * java/awt/dnd/DropTarget.java + (serialVersionUID): New member variable. + (DropTarget): Implemented, documentation reworked. + (setComponent): Documentation added. + (getComponent): Documentation added. + (setDefaultActions): Documentation added. + (getDefaultActions): Documentation added. + (addDropTargetListener): Documentation added. + * java/awt/dnd/DropTargetContext.java + (DropTargetContext): Documentation added. + (TransferableProxy.TransferableProxy): New method. + (dropComplete): Fixed documentation. + (getTransferable): Fixed documentation. + (createTransferableProxy): Implemented. + * java/awt/dnd/DropTargetDragEvent.java + (DropTargetDragEvent): Documentation added. + (serialVersionUID): New member variable. + (DropTargetDragEvent): Throw exceptions, documentation added. + (acceptDrag): Implemented. + (getCurrentDataFlavors): Implemented.3yy + (getCurrentDataFlavorsAsList): Implemented. + (isDataFlavorSupported): Implemented. + (rejectDrag): Implemented. + * java/awt/dnd/DropTargetDropEvent.java + (DropTargetDropEvent): Documentation added. + (serialVersionUID): New member variable. + (actions): Renamed from srcActions for serialization issues. + (isLocalTx): Renamed from isLocalTx for serialization issues. + (DropTargetDropEvent): New implementation, throw exceptions, + documentation added. + (getCurrentDataFlavors): Implemented. + (getCurrentDataFlavorsAsList): Implemented. + (isDataFlavorSupported): Implemented. + (getSourceActions): Implemented. + (getDropAction): Implemented. + (getTransferable): Implemented. + (acceptDrop): Implemented. + (rejectDrop): Implemented. + * java/awt/dnd/DropTargetListener.java + (drop): Fixed documentation. + * java/awt/dnd/MouseDragGestureRecognizer.java + (MouseDragGestureRecognizer): Documentation added. + + 2003-02-17 Michael Koch + + * java/awt/font/FontRenderContext.java, + java/awt/font/ShapeGraphicAttribute.java, + java/awt/font/MultipleMaster.java, + java/awt/font/TransformAttribute.java, + java/awt/font/GlyphJustificationInfo.java, + java/awt/font/LineBreakMeasurer.java, + java/awt/font/TextMeasurer.java, + java/awt/font/TextLayout.java, + java/awt/font/LineMetrics.java, + java/awt/font/TextAttribute.java, + java/awt/font/GlyphMetrics.java, + java/awt/font/OpenType.java, + java/awt/font/GlyphVector.java, + java/awt/font/GraphicAttribute.java, + java/awt/font/ImageGraphicAttribute.java, + java/awt/font/NumericShaper.java: New files. + * Makefile.am + (awt_java_source_files): Added the following files: + java/awt/font/FontRenderContext.java + java/awt/font/ShapeGraphicAttribute.java + java/awt/font/MultipleMaster.java + java/awt/font/TransformAttribute.java + java/awt/font/GlyphJustificationInfo.java + java/awt/font/LineBreakMeasurer.java + java/awt/font/TextMeasurer.java + java/awt/font/TextLayout.java + java/awt/font/LineMetrics.java + java/awt/font/TextAttribute.java + java/awt/font/GlyphMetrics.java + java/awt/font/OpenType.java + java/awt/font/GlyphVector.java + java/awt/font/GraphicAttribute.java + java/awt/font/ImageGraphicAttribute.java + java/awt/font/NumericShaper.java + * Makefile.in: Regenerated. + + 2003-02-17 Michael Koch + + * java/awt/print/Paper.java + (Paper): Implements Cloneable. + * java/awt/print/PrinterJob.java + (setJobName): Return value must be void. + (print): Throws PrinterException. + 2003-02-16 Tom Tromey * verify.cc (_Jv_BytecodeVerifier::pop_jump): Removed unused variable. ! 2003-02-15 Michael Koch ! * java/awt/datatransfer/DataFlavor.java ! (isRepresentationClassByteBuffer): Removed try-catch block. ! (isRepresentationClassCharBuffer): Removed try-catch block. ! (isRepresentationClassReader): Removed try-catch block. ! ! 2003-02-15 Jesse Rosenstock ! ! * java/nio/charset/Charset.java ! (isRegistered): Fixed method args and implementation. ! * java/nio/charset/CharsetEncoder.java ! (unmappableCharacterAction): New method. ! ! 2003-02-15 Michael Koch ! ! * java/awt/CheckboxMenuItem.java ! (CheckBoxMenuItem): Dont implement Serializable. ! (getListeners): New method, ! (getItemListeners): New method. ! * java/awt/Choice.java ! (getListeners): New method, ! (getItemListeners): New method. ! * java/awt/Container.java ! (getListeners): Added exception documentation. ! (setFocusTraversalKeys): Throw exceptions, added documentattion. ! (getFocusTraversalKeys): Added documentation. ! (areFocusTraversalKeysSet): Added documentation. ! (applyComponentOrientation): Added documentation. ! * java/awt/ContainerOrderFocusTraversalPolicy.java ! (implicitDownCycleTraversal): Renamed from downCycle for ! serialization. ! (ContainerOrderFocusTraversalPolicy): Added documentation. ! (accept): Reformated. ! * java/awt/Dialog.java ! (Dialog): Dont implement Serializable. ! (Dialog): Added documentation. ! * java/awt/Font.java ! (Font): Dont use absolute class name. ! * java/awt/Frame.java ! (Frame): Font implement Serializable. ! * java/awt/List.java ! (getListeners): New method, ! (getActionListeners): New method. ! (getItemListeners): New method. ! * java/awt/Menu.java ! (countItems): New deprecated method. ! * java/awt/Scrollbar.java ! (getListeners): New method, ! (getAdjustmentListeners): New method, ! * java/awt/TextComponent.java ! (getListeners): New method, ! (getTextListeners): New method, ! * java/awt/TextField.java ! (getListeners): New method, ! (getActionListeners): New method. ! * java/awt/Window.java ! (windowFocusListener): New member variable. ! (windowStateListener): New member variable. ! (getWindowFocusListeners): New method. ! (getWindowStateListeners): New method. ! (addWindowFocusListener): New method. ! (addWindowStateListener): New method. ! (removeWindowFocusListener): New method. ! (removeWindowStateListener): New method. ! * java/awt/datatransfer/DataFlavor.java ! (isRepresentationClassByteBuffer): New method. ! (isRepresentationClassCharBuffer): New method. ! (isRepresentationClassReader): New method. 2003-02-14 Mark Wielaard *************** *** 580,585 **** --- 10853,10865 ---- * java/lang/System.java (properties): Use Properties.clone. (setProperties): Likewise. + 2003-02-14 Michael Koch + + * gnu/java/nio/natServerSocketChannelImpl.cc: Removed. + * gnu/java/nio/ServerSocketChannelImpl.java + (SocketAccept): Removed. + (accept): Commented out use of SocketAccept. + 2003-02-13 Tom Tromey * verify.cc (state::seen_subrs): New field. *************** *** 598,604 **** * java/io/OutputStreamWriter.java (getEncoding): Likewise. 2003-02-13 Mark Wielaard ! * java/util/zip/InflaterInputStream.java (read): Return zero when len is zero. --- 10878,10884 ---- * java/io/OutputStreamWriter.java (getEncoding): Likewise. 2003-02-13 Mark Wielaard ! * java/util/zip/InflaterInputStream.java (read): Return zero when len is zero. *************** *** 607,612 **** --- 10887,10925 ---- * java/io/BufferedOutputStream.java (write(int)): Only flush when next byte cannot be buffered. + 2003-02-13 Michael Koch + + * java/awt/Label.java + (Label): Don't implement Serializable directly. + (addNotify): Fixed typo in documentation. + * java/awt/List.java + (List): Don't implement Serializable directly. + * java/awt/PopupMenu.java + (PopupMenu): Don't implement Serializable directly. + * java/awt/ScrollPane.java + (ScrollPane): Don't implement Serializable directly. + * java/awt/Scrollbar.java + (Scrollbar): Don't implement Serializable directly. + * java/awt/TextArea.java + (preferredSize): Fixed method arguments. + * java/awt/TextField.java + (TextField): Don't implement Serializable directly. + * java/awt/color/ICC_ColorSpace.java + (fromCIOXYZ): Documentation added. + (getMinValue): Documentation added. + (getMaxValue): Documentation added. + * java/awt/datatransfer/DataFlavor.java + (isMimeTypeEqual): May not be final. + (clone): Throws CloneNotSupportedException. + (getReaderForText): Don't throws UnsupportedEncodingException. + + 2003-02-13 Michael Koch + + * gnu/java/awt/peer/gtk/GdkGraphics.java + (drawString): New stubbed method. + * java/awt/Graphics.java + (drawString): New method. + 2003-02-13 Casey Marshall PR libgcj/9271: *************** *** 634,640 **** (nio_munmap_file): Uncommented. (nio_msync): Uncommented. * gnu/java/nio/natFileChannelImpl.cc: New file. ! 2003-02-13 Michael Koch * java/nio/ByteBuffer.java --- 10947,10953 ---- (nio_munmap_file): Uncommented. (nio_msync): Uncommented. * gnu/java/nio/natFileChannelImpl.cc: New file. ! 2003-02-13 Michael Koch * java/nio/ByteBuffer.java *************** *** 661,666 **** --- 10974,10986 ---- (CharBuffer): Implement Comparable instead of Cloneable. (get): May not be final. (put): May not be final. + + 2002-02-13 Ranjit Mathew + + * gnu/gcj/runtime/NameFinder.java (createStackTraceElement): Use + lastIndexOf( ) instead of indexOf( ) to find the colon before + the line number, because Win32 file names might contain a + drive letter and a colon at the start of an absolute path. 2003-02-13 Michael Koch *************** *** 686,698 **** (array): Throw exceptions. (arrayOffset): Throw exceptions. ! 2002-02-13 Ranjit Mathew ! * gnu/gcj/runtime/NameFinder.java (createStackTraceElement): Use ! lastIndexOf( ) instead of indexOf( ) to find the colon before ! the line number, because Win32 file names might contain a ! drive letter and a colon at the start of an absolute path. 2003-02-12 Jeff Sturm * configure.host (alpha*-*): Default to -mieee. --- 11006,11075 ---- (array): Throw exceptions. (arrayOffset): Throw exceptions. ! 2003-02-13 Michael Koch ! ! * gnu/java/util/prefs/FileBasedFactory.java, ! gnu/java/util/prefs/MemmoryBasedFactory.java, ! gnu/java/util/prefs/MemoryBasedPreferences.java, ! gnu/java/util/prefs/NodeReader.java, ! gnu/java/util/prefs/NodeWriter.java, ! java/util/prefs/AbstractPreferences.java, ! java/util/prefs/BackingStoreException.java, ! java/util/prefs/InvalidPreferencesFormatException.java, ! java/util/prefs/NodeChangeEvent.java, ! java/util/prefs/NodeChangeListener.java, ! java/util/prefs/PreferenceChangeEvent.java, ! java/util/prefs/PreferenceChangeListener.java, ! java/util/prefs/Preferences.java, ! java/util/prefs/PreferencesFactory.java: ! New files, all merged from classpath. ! * Makefile.am ! (ordinary_java_source_files): Added the following files: ! gnu/java/util/prefs/FileBasedFactory.java, ! gnu/java/util/prefs/MemmoryBasedFactory.java, ! gnu/java/util/prefs/MemoryBasedPreferences.java, ! gnu/java/util/prefs/NodeReader.java, ! gnu/java/util/prefs/NodeWriter.java, ! (core_java_source_files): Added the following files: ! java/util/prefs/AbstractPreferences.java, ! java/util/prefs/BackingStoreException.java, ! java/util/prefs/InvalidPreferencesFormatException.java, ! java/util/prefs/NodeChangeEvent.java, ! java/util/prefs/NodeChangeListener.java, ! java/util/prefs/PreferenceChangeEvent.java, ! java/util/prefs/PreferenceChangeListener.java, ! java/util/prefs/Preferences.java, ! java/util/prefs/PreferencesFactory.java ! * Makefile.in: Regenerated. ! ! 2003-02-13 Michael Koch ! * java/net/NetPermission.java ! (NetPermission): Make doucmentation match the method declaration. ! * java/net/NetworkInterface.java ! (equals): Reformated for GNU coding style. ! * java/net/ServerSocket.java: Merged with classpath. ! * java/net/Socket.java: Partly merged with classpath (Added some @since). ! * java/net/SocketImpl.java ! (localPort): Merged with classpath (initialize with -1). ! * java/net/SocketPermission.java: Merged with classpath (reindented). ! * java/net/URLDecoder.java: Merged with classpath (reindented). ! ! 2003-02-13 Michael Koch + * java/awt/GridBagConstraints.java + (FIRST_LINE_ENT, FIRST_LINE_START, LAST_LINE_END, LAST_LINE_START, + LINE_END, LINE_START, PAGE_END, PAGE_START): New constants. + * java/awt/KeyboardFocusManager.java + (setGlobalCurrentFocusCycleRoot): Must be public. + * java/awt/MenuComponent.java + (MenuComponent): Must be public. + * java/awt/Toolkit.java: + Added some empty lines to make documentation more readable. + (getFontPeer): Added @deprecated. + (getColorModel): Added exception documentation. + (getProperty): Fixed documentation. + 2003-02-12 Jeff Sturm * configure.host (alpha*-*): Default to -mieee. *************** *** 719,738 **** 2003-02-12 Michael Koch - * java/net/NetPermission.java - (NetPermission): Make doucmentation match the method declaration. - * java/net/NetworkInterface.java - (equals): Reformated for GNU coding style. - * java/net/ServerSocket.java: Merged with classpath. - * java/net/Socket.java: Partly merged with classpath (Added some - @since). - * java/net/SocketImpl.java - (localPort): Merged with classpath (initialize with -1). - * java/net/SocketPermission.java: Merged with classpath (reindented). - * java/net/URLDecoder.java: Merged with classpath (reindented). - - 2003-02-12 Michael Koch - * java/nio/channels/Channels.java: New file. * Makefile.am (ordinary_java_source_files): Added java/nio/channels/Channels.java. --- 11096,11101 ---- *************** *** 760,765 **** --- 11123,11139 ---- * java/util/zip/ZipInputStream.java: Fix problem with 0-length reads from end of file. + 2003-02-11 Ranjit Mathew + + * java/io/natFileDescriptorWin32.cc + (java::io::FileDescriptor::read): Return -1 (EOF) if ReadFile( ) + returns with Win32 error code ERROR_BROKEN_PIPE. + + 2003-02-11 Michael Koch + + * Makefile.in + (libgcj_la_OBJECTS): Removed natSelctorImpl.la. + 2003-02-11 Michael Koch * gnu/java/nio/ByteBufferImpl.java: *************** *** 880,940 **** 2003-02-11 Michael Koch - * java/nio/Buffer.java - (cap, lim, pos, mark): Made private - (Buffer): Added package private constructor. - * java/nio/ByteBuffer.java - (ByteBuffer): Implements Cloneable. - (offset): New member variable. - (readOnly): New member variable. - (backing_buffer): New member variable. - (allocateDirect): Throw exception and tell that direct buffers are - not supported yet, documentation added. - (allocate): Documentation added. - (wrap): Documentation added. - (ByteBuffer): New constructor. - (hasArray): New method. - (array): New method. - (arrayOffset): New method. - (get): Documentation added. - (put): Documentation added. - * java/nio/CharBuffer.java - (CharBuffer): New constructor. - (compareTo): Don't access member variables of Buffer directly. - * java/nio/DoubleBuffer.java - (allocateDirect): Throw exception and tell that direct buffers are - not supported yet. - * java/nio/FloatBuffer.java - (allocateDirect): Throw exception and tell that direct buffers are - not supported yet. - * java/nio/IntBuffer.java - (allocateDirect): Throw exception and tell that direct buffers are - not supported yet. - * java/nio/LongBuffer.java - (allocateDirect): Throw exception and tell that direct buffers are - not supported yet. - * java/nio/MappedByteBuffer.java - (MappedByteBuffer): New method. - (force): New method. - (isLoaded): New method. - (load): New method. - * java/nio/ShortBuffer.java - (allocateDirect): Throw exception and tell that direct buffers are - not supported yet. - - 2003-02-11 Ranjit Mathew - - * java/io/natFileDescriptorWin32.cc - (java::io::FileDescriptor::read): Return -1 (EOF) if ReadFile( ) - returns with Win32 error code ERROR_BROKEN_PIPE. - - 2003-02-10 Tom Tromey - - * javax/sql/ConnectionEvent.java (serialVersionUID): New field. - (ex): Renamed from sqlException. - - 2003-02-10 Michael Koch - * java/nio/DoubleBuffer.java (DoubleBuffer): Implements Comparable. (endian): Removed. --- 11254,11259 ---- *************** *** 1001,1025 **** (get*): Removed. (put*): Removed. ! 2003-02-10 Michael Koch ! ! * gnu/java/nio/FileLockImpl.java, ! java/nio/channels/FileLock.java: New files. ! ! 2003-02-10 Michael Koch ! * java/nio/charset/IllegalCharsetNameException.java ! (serialVersionUID): New member variable. ! (charsetName): New member variable. ! (IllegalCharsetException): New implementation. ! (getCharsetName): New implementation. ! * java/nio/charset/UnsupportedCharsetException.java ! (serialVersionUID): New member variable. ! (charsetName): New member variable. ! (UnsupportedCharsetException): New implementation. ! (getCharsetName): New implementation. ! 2003-02-10 Michael Koch * java/nio/channels/DatagramChannel.java (write): Throws IOException. --- 11320,11332 ---- (get*): Removed. (put*): Removed. ! 2003-02-11 Michael Koch ! * java/nio/channels/SelectionKey.java ! (OP_ACCEPT, OP_CONNECT, OP_READ, OP_WRITE): Initialize with correct ! values. ! 2003-02-11 Michael Koch * java/nio/channels/DatagramChannel.java (write): Throws IOException. *************** *** 1054,1071 **** (openServerSocketChannel): Throws IOException. (openSocketChannel): Throws IOException. 2003-02-10 Raif S. Naffah * gnu/java/security/provider/SHA1PRNG.java (ensureIsSeeded): new method used to ensure seeding has occurred and that a specific seed can be set and used. - 2003-02-10 Michael Koch - - * java/nio/channels/SelectionKey.java - (OP_ACCEPT, OP_CONNECT, OP_READ, OP_WRITE): Initialize with correct - values. - 2003-02-10 Ranjit Mathew * java/lang/Win32Process.java (destroy): Declare as native. --- 11361,11395 ---- (openServerSocketChannel): Throws IOException. (openSocketChannel): Throws IOException. + 2003-02-11 Michael Koch + + * gnu/java/nio/FileLockImpl.java, + java/nio/channels/FileLock.java: New files. + + 2003-02-11 Michael Koch + + * java/nio/charset/IllegalCharsetNameException.java + (serialVersionUID): New member variable. + (charsetName): New member variable. + (IllegalCharsetException): New implementation. + (getCharsetName): New implementation. + * java/nio/charset/UnsupportedCharsetException.java + (serialVersionUID): New member variable. + (charsetName): New member variable. + (UnsupportedCharsetException): New implementation. + (getCharsetName): New implementation. + + 2003-02-10 Tom Tromey + + * javax/sql/ConnectionEvent.java (serialVersionUID): New field. + (ex): Renamed from sqlException. + 2003-02-10 Raif S. Naffah * gnu/java/security/provider/SHA1PRNG.java (ensureIsSeeded): new method used to ensure seeding has occurred and that a specific seed can be set and used. 2003-02-10 Ranjit Mathew * java/lang/Win32Process.java (destroy): Declare as native. *************** *** 1214,1232 **** * configure.host (x86_64): Enable interpreter. ! 2003-01-28 Andrew Haley ! * libgcj.spec.in (jc1): Add BACKTRACESPEC. * configure.host (x86_64): Default to -fno-omit-frame-pointer. * configure.in (BACKTRACESPEC): New. * configure: Regenerate. 2003-02-02 Tom Tromey * Makefile.in: Rebuilt. * Makefile.am (lib_gnu_awt_xlib_la_LDFLAGS): Link against libstdc++. 2003-01-31 Tom Tromey * jni.cc (_Jv_JNI_NewObjectArray): Check that initializer can be --- 11538,11564 ---- * configure.host (x86_64): Enable interpreter. ! 2003-02-03 Andrew Haley ! * libgcj.spec.in (jc1): Add BACKTRACESPEC. * configure.host (x86_64): Default to -fno-omit-frame-pointer. * configure.in (BACKTRACESPEC): New. * configure: Regenerate. 2003-02-02 Tom Tromey + * configure: Rebuilt. + * configure.in (TOOLKIT) [xlib]: Set correctly. + * Makefile.in: Rebuilt. * Makefile.am (lib_gnu_awt_xlib_la_LDFLAGS): Link against libstdc++. + 2003-01-31 Mark WIelaard + + * Makefile.in: Rebuilt. + * Makefile.am (gtk_c_headers): Strip trailing / from jniinclude. + 2003-01-31 Tom Tromey * jni.cc (_Jv_JNI_NewObjectArray): Check that initializer can be *************** *** 1234,1241 **** (_Jv_JNI_SetObjectArrayElement): Check array bounds. (_Jv_JNI_GetObjectArrayElement): Likewise. - 2003-01-31 Tom Tromey - * Makefile.in: Rebuilt. * Makefile.am (cond_x_ltlibrary): Renamed library to lib-gnu-awt-xlib.la. --- 11566,11571 ---- *************** *** 1248,1261 **** (install-exec-hook): Removed. (lib-gnu-awt-xlib.la): Renamed. * aclocal.m4, configure, include/config.h.in: Rebuilt. ! * acinclude.m4 (CHECK_FOR_BROKEN_MINGW_LD): Moved from ! aclocal.m4. 2003-01-31 Julian Dolby * java/util/Properties.java (load): Ignore backslash before EOF. 2003-01-28 Oscar Pearce * java/awt/Component.java (processPaintEvent): Dispose of Graphics --- 11578,11700 ---- (install-exec-hook): Removed. (lib-gnu-awt-xlib.la): Renamed. + 2003-01-31 Tom Tromey + * aclocal.m4, configure, include/config.h.in: Rebuilt. ! * acinclude.m4 (CHECK_FOR_BROKEN_MINGW_LD): Resurrected; was in ! aclocal.m4 and lost in some merge. ! ! * java/awt/Window.java (Window(Window,GraphicsConfiguration)): ! Don't try to find graphics configuration. ! * java/awt/Toolkit.java (default_toolkit_name): Use new ! Configuration entry. ! * gnu/classpath/Configuration.java.in (default_awt_peer_toolkit): ! New global. ! * configure: Rebuilt. ! * configure.in (TOOLKIT): New subst. ! (--enable-java-awt) [xlib, gtk]: Set TOOLKIT if required. ! Do AWT tests much earlier. Run Gtk tests. Make jniinclude ! directory. Make output directories for .c files. ! * Makefile.in: Rebuilt. ! * Makefile.am (lib_gnu_java_awt_peer_gtk_la_SOURCES): New macro. ! (toolexeclib_LTLIBRARIES): Added cond_gtk_ltlibrary. ! (all_java_source_files): Added new sources. ! ($(lib_gnu_java_awt_peer_gtk_la_OBJECTS)): New target. ! (gtk_c_files): New macro. ! (gtk_c_source_files): New macro. ! (cond_gtk_ltlibrary): New macro. ! ($(gtk_c_files)): New target. ! (lib_gnu_java_awt_peer_gtk_la_LIBADD): New macro. ! (gtk_awt_peer_sources): New macro. ! (gtk_c_headers): New macro. ! ($(gtk_c_headers)): New target. ! (ACLOCAL_AMFLAGS): New macro. ! * gtk.m4, glib.m4, libart.m4: New files. ! * gnu/java/awt/peer/gtk/GdkFontMetrics.java, ! gnu/java/awt/peer/gtk/GdkGraphics.java, ! gnu/java/awt/peer/gtk/GtkArg.java, ! gnu/java/awt/peer/gtk/GtkArgList.java, ! gnu/java/awt/peer/gtk/GtkButtonPeer.java, ! gnu/java/awt/peer/gtk/GtkCanvasPeer.java, ! gnu/java/awt/peer/gtk/GtkCheckboxGroupPeer.java, ! gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java, ! gnu/java/awt/peer/gtk/GtkCheckboxPeer.java, ! gnu/java/awt/peer/gtk/GtkChoicePeer.java, ! gnu/java/awt/peer/gtk/GtkClipboard.java, ! gnu/java/awt/peer/gtk/GtkComponentPeer.java, ! gnu/java/awt/peer/gtk/GtkContainerPeer.java, ! gnu/java/awt/peer/gtk/GtkDialogPeer.java, ! gnu/java/awt/peer/gtk/GtkFileDialogPeer.java, ! gnu/java/awt/peer/gtk/GtkFontPeer.java, ! gnu/java/awt/peer/gtk/GtkFramePeer.java, ! gnu/java/awt/peer/gtk/GtkGenericPeer.java, ! gnu/java/awt/peer/gtk/GtkImage.java, ! gnu/java/awt/peer/gtk/GtkImagePainter.java, ! gnu/java/awt/peer/gtk/GtkLabelPeer.java, ! gnu/java/awt/peer/gtk/GtkListPeer.java, ! gnu/java/awt/peer/gtk/GtkMainThread.java, ! gnu/java/awt/peer/gtk/GtkMenuBarPeer.java, ! gnu/java/awt/peer/gtk/GtkMenuComponentPeer.java, ! gnu/java/awt/peer/gtk/GtkMenuItemPeer.java, ! gnu/java/awt/peer/gtk/GtkMenuPeer.java, ! gnu/java/awt/peer/gtk/GtkOffScreenImage.java, ! gnu/java/awt/peer/gtk/GtkPanelPeer.java, ! gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java, ! gnu/java/awt/peer/gtk/GtkScrollbarPeer.java, ! gnu/java/awt/peer/gtk/GtkScrollPanePeer.java, ! gnu/java/awt/peer/gtk/GtkTextAreaPeer.java, ! gnu/java/awt/peer/gtk/GtkTextComponentPeer.java, ! gnu/java/awt/peer/gtk/GtkTextFieldPeer.java, ! gnu/java/awt/peer/gtk/GtkToolkit.java, ! gnu/java/awt/peer/gtk/GtkWindowPeer.java, ! gnu/java/awt/peer/gtk/TestAWT.java, ! gnu/java/awt/peer/gtk/Test.java: New files from Classpath. ! * jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontMetrics.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCanvasPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImagePainter.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuBarPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPanelPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c, ! jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c, ! jni/gtk-peer/gthread-jni.c, jni/gtk-peer/gthread-jni.h, ! jni/gtk-peer/gtkpeer.h, jni/classpath/jcl.c, jni/classpath/jcl.h, ! jni/classpath/jnilink.c, jni/classpath/jnilink.h, ! jni/classpath/native_state.c, jni/classpath/native_state.h, ! jni/classpath/primlib.c, jni/classpath/primlib.h: Likewise. 2003-01-31 Julian Dolby * java/util/Properties.java (load): Ignore backslash before EOF. + 2003-01-30 Jeff Sturm + + * java/lang/natClass.cc (initializeClass): Check tables when + (state == JV_STATE_IN_PROGRESS). + (_Jv_GetInterfaces): Use _Jv_WaitForState to link interface. + * java/lang/natClassLoader.cc (_Jv_WaitForState): Handle + interpreted classes. + (linkClass0): Use _Jv_WaitForState. + 2003-01-28 Oscar Pearce * java/awt/Component.java (processPaintEvent): Dispose of Graphics *************** *** 1294,1300 **** WaitForSingleObject( ) instead to wait for daemon_cond to be signalled. ! 2003-01-28 Ranjit Mathew * configure.in: Specifically define HAVE_BACKTRACE if building for MinGW. --- 11733,11739 ---- WaitForSingleObject( ) instead to wait for daemon_cond to be signalled. ! 2003-01-27 Ranjit Mathew * configure.in: Specifically define HAVE_BACKTRACE if building for MinGW. *************** *** 1318,1323 **** --- 11757,11777 ---- 2003-01-24 Tom Tromey + * defineclass.cc (handleMethodsEnd): Precompute code for static + method. + (handleCodeAttribute): Likewise. + * resolve.cc (ncode): Use run_class for unsynchronized static + methods. + * include/java-interp.h (class _Jv_InterpMethod): Declare + run_class. + * interpret.cc (run_synch_class): Initialize class. + (run) [insn_invokestatic]: Don't initialize class. + [insn_anewarray]: Likewise. + [insn_multianewarray]: Likewise. + (run_class): New function. + + 2003-01-24 Tom Tromey + * java/lang/ClassLoader.java (findLoadedClass): Removed erroneous comment. *************** *** 1352,1367 **** * java/io/natVMObjectStreamClass.cc: New file. * java/lang/Class.h: Make java::io::VMObjectStreamClass friend class. - 2003-01-19 Michael Koch - - * java/net/MulticastSocket.java - (setInterface): Reindented. - 2003-01-16 Mark Wielaard * java/net/SocketImpl.java (toString): Don't explicitly call toString() on possible null address. 2003-01-15 Scott Gilbertson * gnu/gcj/xlib/natGC.cc (fillPolygon): New method. --- 11806,11821 ---- * java/io/natVMObjectStreamClass.cc: New file. * java/lang/Class.h: Make java::io::VMObjectStreamClass friend class. 2003-01-16 Mark Wielaard * java/net/SocketImpl.java (toString): Don't explicitly call toString() on possible null address. + 2003-01-16 Michael Koch + + * java/net/MulticastSocket.java + (setInterface): Reindented. + 2003-01-15 Scott Gilbertson * gnu/gcj/xlib/natGC.cc (fillPolygon): New method. *************** *** 1393,1399 **** Don't pre-compute `choice' unless `what' is FIRST or LAST. Changed all callers. (NONE): Removed. ! 2003-01-14 Michael Koch * java/net/InetSocketAddress.java --- 11847,11853 ---- Don't pre-compute `choice' unless `what' is FIRST or LAST. Changed all callers. (NONE): Removed. ! 2003-01-14 Michael Koch * java/net/InetSocketAddress.java *************** *** 1402,1408 **** (NetPermission): Dont implement java.io.Serialization directly. * java/net/SocketAddress.java: (serialVersionUID): Documentation added. ! 2003-01-14 Michael Koch * java/awt/Label.java --- 11856,11862 ---- (NetPermission): Dont implement java.io.Serialization directly. * java/net/SocketAddress.java: (serialVersionUID): Documentation added. ! 2003-01-14 Michael Koch * java/awt/Label.java *************** *** 1477,1491 **** 2003-01-14 Andrew Haley ! * java/lang/natRuntime.cc (_load): StackTrace access needs to be ! in a try block. 2003-01-10 Andrew Haley ! * include/dwarf2-signal.h: Remove x86_64. ! * configure.host (x86_64 DIVIDESPEC): Remove. ! * include/x86_64-signal.h: New file. ! * configure.in: Regenerate. 2003-01-10 Michael Koch --- 11931,11945 ---- 2003-01-14 Andrew Haley ! * java/lang/natRuntime.cc (_load): StackTrace access needs to be ! in a try block. 2003-01-10 Andrew Haley ! * include/dwarf2-signal.h: Remove x86_64. ! * configure.host (x86_64 DIVIDESPEC): Remove. ! * include/x86_64-signal.h: New file. ! * configure.in: Regenerate. 2003-01-10 Michael Koch *************** *** 1513,1518 **** --- 11967,11979 ---- * java/awt/DisplayMode.java (equals): Fixed argument type and implementation. + 2003-01-07 Tom Tromey + + * include/posix.h (_Jv_platform_usleep): Wrap in ifdef + JV_HASH_SYNCHRONIZATION. + * include/win32.h (_Jv_platform_usleep): Wrap in ifdef + JV_HASH_SYNCHRONIZATION. + 2003-01-07 Michael Koch * java/net/DatagramSocket.java: *************** *** 1531,1543 **** (getReceiveBufferSize): Merged description with classpath. (setReceiveBufferSize): Merged description with classpath. - 2003-01-07 Tom Tromey - - * include/posix.h (_Jv_platform_usleep): Wrap in ifdef - JV_HASH_SYNCHRONIZATION. - * include/win32.h (_Jv_platform_usleep): Wrap in ifdef - JV_HASH_SYNCHRONIZATION. - 2003-01-04 Tom Tromey * java/awt/List.java: Merged with Classpath. --- 11992,11997 ---- *************** *** 1566,1579 **** (getClassUID): Same for suid. And check if suid is of type long. (hasClassInitializer): Don't throw NoSuchMethodError. ! 2003-01-03 Jeff Sturm ! * configure.host (sparc*-*): Enable bytecode interpreter. ! 2003-01-03 Mark Wielaard ! * java/io/FileInputStream.java (finalize): Don't explicitly ! finalize FileDescriptor. 2003-01-03 Dhek Bhun Kho --- 12020,12033 ---- (getClassUID): Same for suid. And check if suid is of type long. (hasClassInitializer): Don't throw NoSuchMethodError. ! 2003-01-03 Mark Wielaard ! * java/io/FileInputStream.java (finalize): Don't explicitly ! finalize FileDescriptor. ! 2003-01-03 Jeff Sturm ! * configure.host (sparc*-*): Enable bytecode interpreter. 2003-01-03 Dhek Bhun Kho *************** *** 1596,1602 **** (TreeIterator.remove): Prefer IllegalStateException over ConcurrentModificationException, to match Sun. ! 2002-01-02 Anthony Green * boehm.cc (_Jv_MarkObj): Mark the protectionDomain of a class. --- 12050,12056 ---- (TreeIterator.remove): Prefer IllegalStateException over ConcurrentModificationException, to match Sun. ! 2002-12-22 Anthony Green * boehm.cc (_Jv_MarkObj): Mark the protectionDomain of a class. *************** *** 1679,1685 **** (gnu.classpath.vm.shortname): Likewise. 2002-12-31 Tom Tromey ! Ranjit Mathew Fix for PR libgcj/8997: * java/lang/natObject.cc (spin): Use _Jv_platform_usleep. --- 12133,12139 ---- (gnu.classpath.vm.shortname): Likewise. 2002-12-31 Tom Tromey ! Ranjit Mathew Fix for PR libgcj/8997: * java/lang/natObject.cc (spin): Use _Jv_platform_usleep. *************** *** 1687,1695 **** * include/posix.h (_Jv_platform_usleep): New function. * include/win32.h (_Jv_platform_usleep): New function. ! 2002-12-30 Tom Tromey ! * gcj/javaprims.h: Updated class list. 2002-12-30 Mark Wielaard --- 12141,12150 ---- * include/posix.h (_Jv_platform_usleep): New function. * include/win32.h (_Jv_platform_usleep): New function. ! 2002-12-29 Tom Tromey ! * gcj/javaprims.h: Updated. ! * scripts/classes.pl (scan): Removed stray semicolon. 2002-12-30 Mark Wielaard *************** *** 1701,1712 **** * java/util/Properties (formatForOutput): Don't fall through to default case after escaping character. ! 2002-11-30 Mark Wielaard * java/lang/StringBuffer.java (getChars): Remove wrong dstOffset check against count. ! 2002-11-21 Anthony Green * Makefile.am: Move org.xml.sax and org.w3c.dom into their own libraries. --- 12156,12192 ---- * java/util/Properties (formatForOutput): Don't fall through to default case after escaping character. ! 2002-12-30 Mark Wielaard * java/lang/StringBuffer.java (getChars): Remove wrong dstOffset check against count. ! 2002-12-27 Mark Mitchell ! ! * boehm.cc: Remove stray semicolon. ! * interpret.cc: Likewise. ! * prims.cc: Likewise. ! * verify.cc (_Jv_BytecodeVerifier::verify_fail): Move definition ! earlier to ensure default arguments are processed. ! * gcj/array.h (JArray): Add forward declaration. ! (elements): Likewise. ! * gcj/javaprim.h: Remove stray semicolons. ! * include/bohm-gc.h: Likewise. ! * include/jni.h: Likewise. ! * include/jvm.h: Likewise. ! * java/lang/Class.h (_Jv_GetArrayClass): Declare _Jv_NewArrayClass. ! ! 2002-12-23 Jeff Sturm ! ! * exception.cc (PERSONALITY_FUNCTION): Clear least-significant-bit ! of catch_type. ! * java/lang/natClass.cc (initializeClass): Link vtable, otable, ! idt tables after initializing superclass. ! * java/lang/natClassLoader.cc (uaddr): New typedef. ! (_Jv_PrepareCompiledClass): Resolve superclass, interfaces ! if they are constant pool indicies. Don't link vtable, otable yet. ! ! 2002-12-21 Anthony Green * Makefile.am: Move org.xml.sax and org.w3c.dom into their own libraries. *************** *** 1813,1819 **** (gnu::gcj::runtime::VMClassLoader::findClass): Removed. 2002-12-10 Mark Wielaard ! Tom Tromey * java/net/URLClassLoader.java (getCanonicalFileURL): New method. (JarURLLoader): Use it. --- 12293,12299 ---- (gnu::gcj::runtime::VMClassLoader::findClass): Removed. 2002-12-10 Mark Wielaard ! Tom Tromey * java/net/URLClassLoader.java (getCanonicalFileURL): New method. (JarURLLoader): Use it. *************** *** 1956,2000 **** 2002-12-03 Raif Naffah ! * java/security/spec/DSAParameterSpec.java (getP): Return p, not q. ! * java/security/spec/DSAPrivateKeySpec.java (getP): Likewise. ! * java/security/spec/DSAPublicKeySpec.java (getP): Likewise. 2002-12-03 Andrew Haley ! * java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): Call _Jv_PushClass. ! (_Jv_InitNewClassFields): Set protectionDomain and chain = NULL. ! (_Jv_PopClass): New. ! (_Jv_PushClass): New. ! * java/lang/natClass.cc (forName (jstring)): Use a StackTrace to ! discover the ClassLoader of our caller. ! (_Jv_CheckArrayStore): Don't check that a class is assignment ! compatible with Object. ! * java/lang/natVMTHrowable.cc: Delete. ! * gnu/gcj/runtime/StackTrace.java: New, partly copied from java.lang.VMThrowable. ! (StackTrace(), StackTrace(int)): New constructors. ! (classAt, methodAt, update, methodAtAddress): New methods. ! (map): New field. * java/lang/VMThrowable.java: Use StackTrace instead of ! natVMTHrowable. * java/lang/Class.h (getClassLoaderInternal): New. ! (class Class): Be friendly with _Jv_PopClass and _Jv_PushClass. ! Be friendly with gnu::gcj::runtime::StackTrace. ! (Object.chain): New field. ! * include/java-interp.h (class _Jv_InterpMethod): Be friendly with ! gnu::gcj::runtime::StackTrace. * gnu/gcj/runtime/natStackTrace.cc: New file. * gnu/gcj/runtime/MethodRef.java: New file. ! * prims.cc (_Jv_NewObjectArray): Use getClassLoaderInternal() ! instead of getClassLoader(). ! * verify.cc (class _Jv_BytecodeVerifier): Likewise. ! java::lang::VMThrowable. ! * Makefile.am (core_java_source_files): Add MethodRef.java, StackTrace.java. ! (nat_source_files): Remove natVMThrowable.cc; add natStackTrace.cc. ! * Makefile.in: Rebuild. 2002-12-02 Tom Tromey --- 12436,12489 ---- 2002-12-03 Raif Naffah ! * java/security/spec/DSAParameterSpec.java (getP): Return p, not q. ! * java/security/spec/DSAPrivateKeySpec.java (getP): Likewise. ! * java/security/spec/DSAPublicKeySpec.java (getP): Likewise. 2002-12-03 Andrew Haley ! * java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): Call _Jv_PushClass. ! (_Jv_InitNewClassFields): Set protectionDomain and chain = NULL. ! (_Jv_PopClass): New. ! (_Jv_PushClass): New. ! * java/lang/natClass.cc (forName (jstring)): Use a StackTrace to ! discover the ClassLoader of our caller. ! (_Jv_CheckArrayStore): Don't check that a class is assignment ! compatible with Object. ! * java/lang/natVMTHrowable.cc: Delete. ! * gnu/gcj/runtime/StackTrace.java: New, partly copied from java.lang.VMThrowable. ! (StackTrace(), StackTrace(int)): New constructors. ! (classAt, methodAt, update, methodAtAddress): New methods. ! (map): New field. * java/lang/VMThrowable.java: Use StackTrace instead of ! natVMTHrowable. * java/lang/Class.h (getClassLoaderInternal): New. ! (class Class): Be friendly with _Jv_PopClass and _Jv_PushClass. ! Be friendly with gnu::gcj::runtime::StackTrace. ! (Object.chain): New field. ! * include/java-interp.h (class _Jv_InterpMethod): Be friendly with ! gnu::gcj::runtime::StackTrace. * gnu/gcj/runtime/natStackTrace.cc: New file. * gnu/gcj/runtime/MethodRef.java: New file. ! * prims.cc (_Jv_NewObjectArray): Use getClassLoaderInternal() ! instead of getClassLoader(). ! * verify.cc (class _Jv_BytecodeVerifier): Likewise. ! java::lang::VMThrowable. ! * Makefile.am (core_java_source_files): Add MethodRef.java, StackTrace.java. ! (nat_source_files): Remove natVMThrowable.cc; add natStackTrace.cc. ! * Makefile.in: Rebuild. ! ! 2002-12-02 Kaz Kojima ! ! * configure.host [sh-linux* | sh[34]*-linux*]: Don't set ! CHECKREFSPEC and EXCEPTIONSPEC. Set can_unwind_signal to ! yes also for sh-linux* and sh[34]*-linux*. ! * configure.in: Add sh-linux* and sh[34]*-linux* cases and ! set SIGNAL_HANDLER to use DWARF2 exception for them. ! * configure: Regenerate. 2002-12-02 Tom Tromey *************** *** 2049,2055 **** (write): Added exception documentation. (connect): Added exception documentation. (finishConnect): Added exception documentation. ! 2002-11-29 Michael Koch * gnu/java/nio/DatagramChannelImpl: --- 12538,12544 ---- (write): Added exception documentation. (connect): Added exception documentation. (finishConnect): Added exception documentation. ! 2002-11-29 Michael Koch * gnu/java/nio/DatagramChannelImpl: *************** *** 2076,2085 **** * gnu/java/nio/ServerSocketChannelImpl: (SocketAccept): Renamed from NioSocketAccept. (implConfigureBlocking): Implemented. ! (accept): Use SocketAccept instead of NioSocketAccept. * gnu/java/nio/SocketChannelImpl: Reactivate native methods. ! 2002-11-29 Michael Koch * gnu/java/nio/natByteBufferImpl.cc, --- 12565,12574 ---- * gnu/java/nio/ServerSocketChannelImpl: (SocketAccept): Renamed from NioSocketAccept. (implConfigureBlocking): Implemented. ! (accept): Use SocketAccept instead of NioSocketAccept. * gnu/java/nio/SocketChannelImpl: Reactivate native methods. ! 2002-11-29 Michael Koch * gnu/java/nio/natByteBufferImpl.cc, *************** *** 2179,2184 **** --- 12668,12680 ---- * interpret.cc (run) [insn_invokespecial, invokespecial_resolved]: Don't use NULLCHECK. + 2002-11-23 H.J. Lu + + * acinclude.m4 (AC_COMPILE_CHECK_SIZEOF): Removed. + Include ../config/accross.m4. + * aclocal.m4; Rebuild. + * configure: Likewise. + 2002-11-23 Mark Wielaard * javax/naming/AuthenticationException.java: Update copyright header. *************** *** 2284,2295 **** * include/posix.h: I put too much into the #ifndef DISABLE_JAVA_NET. Only the new network functions should be in it. ! 2002-11-21 Michael Koch * include/posix.h: Moved new functions into a #ifndef DISABLE_JAVA_NET * include/win32.h: Moved new functions into a #ifndef DISABLE_JAVA_NET ! 2002-11-21 Michael Koch * java/nio/channels/AsynchronousCloseException.java, --- 12780,12791 ---- * include/posix.h: I put too much into the #ifndef DISABLE_JAVA_NET. Only the new network functions should be in it. ! 2002-11-21 Michael Koch * include/posix.h: Moved new functions into a #ifndef DISABLE_JAVA_NET * include/win32.h: Moved new functions into a #ifndef DISABLE_JAVA_NET ! 2002-11-21 Michael Koch * java/nio/channels/AsynchronousCloseException.java, *************** *** 2352,2358 **** * Makefile.am (ordinary_java_source_files): Added java/nio/channels/FileChannel.java. * Makefile.in: Regenerated. ! 2002-11-20 Michael Koch * java/io/FileInputStream.java --- 12848,12854 ---- * Makefile.am (ordinary_java_source_files): Added java/nio/channels/FileChannel.java. * Makefile.in: Regenerated. ! 2002-11-20 Michael Koch * java/io/FileInputStream.java *************** *** 2396,2404 **** 2002-11-18 Jesse Rosenstock ! * java/nio/charset/CoderResult.java (Cache.get): Fix a bug ! that was causing CoderResults to be cached, not WeakReferences ! to CoderResults. 2002-11-18 Joerg Brunsmann --- 12892,12900 ---- 2002-11-18 Jesse Rosenstock ! * java/nio/charset/CoderResult.java (Cache.get): Fix a bug ! that was causing CoderResults to be cached, not WeakReferences ! to CoderResults. 2002-11-18 Joerg Brunsmann *************** *** 2771,2777 **** 2002-11-07 Mark Wielaard ! Merge Orp RMI patches from Wu Gansha * java/rmi/MarshalledObject.java (equals): Check hashcode first. * java/rmi/server/RMIClassLoader.java (MyClassLoader): Create/Use --- 13267,13273 ---- 2002-11-07 Mark Wielaard ! Merge Orp RMI patches from Wu Gansha * java/rmi/MarshalledObject.java (equals): Check hashcode first. * java/rmi/server/RMIClassLoader.java (MyClassLoader): Create/Use *************** *** 2918,2930 **** 2002-10-31 Wu Gansha : ! * java/util/ArrayList.java (readObject, writeObject): Only read/write ! size items. 2002-10-31 Wu Gansha : ! * java/io/DataInputStream.java (convertFromUTF): Give StringBuffer an ! initial estimated size to avoid enlarge buffer frequently. 2002-10-31 Wu Gansha : --- 13414,13426 ---- 2002-10-31 Wu Gansha : ! * java/util/ArrayList.java (readObject, writeObject): Only read/write ! size items. 2002-10-31 Wu Gansha : ! * java/io/DataInputStream.java (convertFromUTF): Give StringBuffer an ! initial estimated size to avoid enlarge buffer frequently. 2002-10-31 Wu Gansha : *************** *** 2936,2942 **** 2002-10-31 Mark Wielaard ! * java/net/URLDecoder.java (decode): Initialize Stringbuffer size to length of String. * java/net/URLEncoder.java (encode): Likewise. --- 13432,13438 ---- 2002-10-31 Mark Wielaard ! * java/net/URLDecoder.java (decode): Initialize Stringbuffer size to length of String. * java/net/URLEncoder.java (encode): Likewise. *************** *** 3102,3109 **** * aclocal.m4 (CHECK_FOR_BROKEN_MINGW_LD): added * configure.in: enabled hash sync on Win32 ! * include/win32-threads.h (_Jv_ThreadId_t): added. ! * java/lang/natObject.cc (_Jv_MonitorEnter, _Jv_MonitorExit, heavy_lock_obj_finalization_proc, wait, notify, notifyAll): removed some posix-isms, use Thread::sleep() instead of usleep, added code to clear bottom three bits if platform has a broken --- 13598,13605 ---- * aclocal.m4 (CHECK_FOR_BROKEN_MINGW_LD): added * configure.in: enabled hash sync on Win32 ! * include/win32-threads.h (_Jv_ThreadId_t): added. ! * java/lang/natObject.cc (_Jv_MonitorEnter, _Jv_MonitorExit, heavy_lock_obj_finalization_proc, wait, notify, notifyAll): removed some posix-isms, use Thread::sleep() instead of usleep, added code to clear bottom three bits if platform has a broken *************** *** 4144,4150 **** java/net/URLConnection.java: add/update of some @since/@deprecated 2002-08-27 Tony Kimball ! Tom Tromey * java/net/natPlainDatagramSocketImpl.cc (NATIVE_CLOSE): New define. --- 14640,14646 ---- java/net/URLConnection.java: add/update of some @since/@deprecated 2002-08-27 Tony Kimball ! Tom Tromey * java/net/natPlainDatagramSocketImpl.cc (NATIVE_CLOSE): New define. *************** *** 4758,4764 **** 2002-08-01 Kaz Kojima * configure.host: Add SH support. ! * sysdep/sh/locks.h: New file. 2002-07-31 Bryce McKinlay --- 15254,15260 ---- 2002-08-01 Kaz Kojima * configure.host: Add SH support. ! * sysdep/sh/locks.h: New file. 2002-07-31 Bryce McKinlay *************** *** 4797,4803 **** argument to _load. 2002-07-24 Tom Tromey ! Tony Kimball * java/io/natFileDescriptorWin32.cc (setLength): New method. * java/io/natFileDescriptorPosix.cc (setLength): New method. --- 15293,15299 ---- argument to _load. 2002-07-24 Tom Tromey ! Tony Kimball * java/io/natFileDescriptorWin32.cc (setLength): New method. * java/io/natFileDescriptorPosix.cc (setLength): New method. *************** *** 4924,4930 **** * java/lang/natRuntime.cc (nativeGetLibname): Added missing `#'. 2002-07-04 Tom Tromey ! Jeff Sturm Fix for PR libgcj/7060: * java/lang/Class.h (_getMethod): Renamed from getMethod. --- 15420,15426 ---- * java/lang/natRuntime.cc (nativeGetLibname): Added missing `#'. 2002-07-04 Tom Tromey ! Jeff Sturm Fix for PR libgcj/7060: * java/lang/Class.h (_getMethod): Renamed from getMethod. *************** *** 4935,4941 **** (_getMethod): New native method. 2002-07-02 Tom Tromey ! David Hovemeyer * java/text/ChoiceFormat.java (format(double,StringBuffer,FieldPosition)): Fix fencepost error --- 15431,15437 ---- (_getMethod): New native method. 2002-07-02 Tom Tromey ! David Hovemeyer * java/text/ChoiceFormat.java (format(double,StringBuffer,FieldPosition)): Fix fencepost error *************** *** 5316,5323 **** 2002-06-06 Adam Megacz ! * java/io/natFileDescriptorWin32.cc (open): Disable Win32 file ! locking, just like the Sun JVM does. 2002-06-05 H.J. Lu (hjl@gnu.org) --- 15812,15819 ---- 2002-06-06 Adam Megacz ! * java/io/natFileDescriptorWin32.cc (open): Disable Win32 file ! locking, just like the Sun JVM does. 2002-06-05 H.J. Lu (hjl@gnu.org) *************** *** 5420,5426 **** * Makefile.am: Add new CertPath classes. * Makefile.in: Rebuilt. ! * gnu/java/util/EmptyEnumeration.java: New file from classpath. 2002-05-24 Bryce McKinlay --- 15916,15922 ---- * Makefile.am: Add new CertPath classes. * Makefile.in: Rebuilt. ! * gnu/java/util/EmptyEnumeration.java: New file from classpath. 2002-05-24 Bryce McKinlay *************** *** 5775,5782 **** 2002-04-07 Mark Wielaard ! * java/util/AbstractMap.java (putAll): Use entrySet size. ! (toString): Explicitly use getKey() and getValue(). 2002-04-07 Mark Wielaard --- 16271,16278 ---- 2002-04-07 Mark Wielaard ! * java/util/AbstractMap.java (putAll): Use entrySet size. ! (toString): Explicitly use getKey() and getValue(). 2002-04-07 Mark Wielaard *************** *** 5817,5823 **** 2002-04-05 Adam Megacz ! * exception.cc (abort): added static modifier 2002-04-04 Adam Megacz --- 16313,16319 ---- 2002-04-05 Adam Megacz ! * exception.cc (abort): added static modifier 2002-04-04 Adam Megacz *************** *** 5864,5877 **** 2002-04-01 Mark Wielaard ! * java/util/BitSet.java (BitSet(int)): if nbits < 0 throw ! NegativeArraySizeException ! (clear(int)): Use sign extended shift. ! (flip(int)): Likewise. ! (get(int)): Likewise. ! (nextClearBit(int)): Likewise. ! (nextSetBit(int)): Likewise. ! (set(int)): Likewise. 2002-04-01 Mark Wielaard --- 16360,16373 ---- 2002-04-01 Mark Wielaard ! * java/util/BitSet.java (BitSet(int)): if nbits < 0 throw ! NegativeArraySizeException ! (clear(int)): Use sign extended shift. ! (flip(int)): Likewise. ! (get(int)): Likewise. ! (nextClearBit(int)): Likewise. ! (nextSetBit(int)): Likewise. ! (set(int)): Likewise. 2002-04-01 Mark Wielaard *************** *** 5915,5924 **** 2002-03-25 Andrew Haley , Hans Boehm ! * include/dwarf2-signal.h (MAKE_THROW_FRAME): Add for IA-64. ! (INIT_SEGV, INIT_FPE): Add versions that use __libc_sigaction ! instead of syscall on IA-64. ! Add FIXME comment. 2002-03-27 Anthony Green --- 16411,16420 ---- 2002-03-25 Andrew Haley , Hans Boehm ! * include/dwarf2-signal.h (MAKE_THROW_FRAME): Add for IA-64. ! (INIT_SEGV, INIT_FPE): Add versions that use __libc_sigaction ! instead of syscall on IA-64. ! Add FIXME comment. 2002-03-27 Anthony Green *************** *** 6148,6154 **** 2002-03-10 Adam Megacz ! * java/net/natPlainSocketImpl.cc: Added #include . 2002-03-10 Tom Tromey --- 16644,16650 ---- 2002-03-10 Adam Megacz ! * java/net/natPlainSocketImpl.cc: Added #include . 2002-03-10 Tom Tromey *************** *** 6209,6225 **** 2002-03-09 Adam Megacz ! * java/io/natFileDescriptorWin32.cc (read): Return -1 if zero ! bytes read and no failure code returned. 2002-03-09 Adam Megacz ! * win32.cc (_CRT_MT, __mingwthr_key_dtor) Added fake ! definitions to simulate -mthreads. 2002-03-09 Adam Megacz ! * win32.cc (_Jv_platform_gettimeofday) Cast 1000 to long long to avoid precision loss. 2002-03-09 Per Bothner --- 16705,16721 ---- 2002-03-09 Adam Megacz ! * java/io/natFileDescriptorWin32.cc (read): Return -1 if zero ! bytes read and no failure code returned. 2002-03-09 Adam Megacz ! * win32.cc (_CRT_MT, __mingwthr_key_dtor) Added fake ! definitions to simulate -mthreads. 2002-03-09 Adam Megacz ! * win32.cc (_Jv_platform_gettimeofday) Cast 1000 to long long to avoid precision loss. 2002-03-09 Per Bothner *************** *** 6230,6242 **** 2002-03-09 Adam Megacz ! * java/lang/Win32Process.java (ConcreteProcess): Now throws an ! IOException so that Throwable.printStackTrace fails correctly. 2002-03-08 Adam Megacz ! * java/net/natPlainSocketImpl.cc (read, write, close): Formatting ! fixed. 2002-03-09 Bryce McKinlay --- 16726,16738 ---- 2002-03-09 Adam Megacz ! * java/lang/Win32Process.java (ConcreteProcess): Now throws an ! IOException so that Throwable.printStackTrace fails correctly. 2002-03-08 Adam Megacz ! * java/net/natPlainSocketImpl.cc (read, write, close): Formatting ! fixed. 2002-03-09 Bryce McKinlay *************** *** 6254,6276 **** 2002-03-07 Adam Megacz ! * java/net/natPlainSocketImpl.cc: Changed USE_WINSOCK to ! WIN32, and added thunks for read(), write(), and close(). ! * java/net/natPlainSocketImpl.cc (accept, read, read): ! Disabled timeouts on WIN32 pending discussion. 2002-03-07 Adam Megacz ! * win32.cc (_Jv_platform_gettimeofday): Now takes no args, ! returns jlong. Added implementation ! * posix.cc (_Jv_platform_gettimeofday): Now takes no args, ! returns jlong. ! * win32.h (_Jv_platform_gettimeofday): Now takes no args, ! returns jlong. ! * posix.h (_Jv_platform_gettimeofday): Now takes no args, ! returns jlong. ! * java/lang/natSystem.cc (currentTimeMillis): Now uses updated ! _Jv_platform_gettimeofday signature. 2002-03-07 Bryce McKinlay --- 16750,16772 ---- 2002-03-07 Adam Megacz ! * java/net/natPlainSocketImpl.cc: Changed USE_WINSOCK to ! WIN32, and added thunks for read(), write(), and close(). ! * java/net/natPlainSocketImpl.cc (accept, read, read): ! Disabled timeouts on WIN32 pending discussion. 2002-03-07 Adam Megacz ! * win32.cc (_Jv_platform_gettimeofday): Now takes no args, ! returns jlong. Added implementation ! * posix.cc (_Jv_platform_gettimeofday): Now takes no args, ! returns jlong. ! * win32.h (_Jv_platform_gettimeofday): Now takes no args, ! returns jlong. ! * posix.h (_Jv_platform_gettimeofday): Now takes no args, ! returns jlong. ! * java/lang/natSystem.cc (currentTimeMillis): Now uses updated ! _Jv_platform_gettimeofday signature. 2002-03-07 Bryce McKinlay *************** *** 6291,6300 **** 2002-03-06 Adam Megacz ! * java/io/FileDescriptor.java: Initialize in/out/err in init(). ! * java/io/natFileDescriptorWin32.cc (init()): Added function. ! * java/io/natFileDescriptorPosix.cc (init()): Added function. ! * java/io/natFileDescriptorEcos.cc (init()): Added function. 2002-03-06 Eric Blake --- 16787,16796 ---- 2002-03-06 Adam Megacz ! * java/io/FileDescriptor.java: Initialize in/out/err in init(). ! * java/io/natFileDescriptorWin32.cc (init()): Added function. ! * java/io/natFileDescriptorPosix.cc (init()): Added function. ! * java/io/natFileDescriptorEcos.cc (init()): Added function. 2002-03-06 Eric Blake *************** *** 6568,6579 **** 2002-02-12 Adam Megacz ! * java/lang/Win32Process.java: Filled in a placeholder implementation so Win32 will build. 2002-02-12 Adam Megacz ! * java/io/natFilePosix.cc: Copied this from natFile.cc. * java/io/natFile.cc: Removed from repository. * configure.in: Added AC_LINK_FILES for natFile${PLATFORM}. --- 17064,17075 ---- 2002-02-12 Adam Megacz ! * java/lang/Win32Process.java: Filled in a placeholder implementation so Win32 will build. 2002-02-12 Adam Megacz ! * java/io/natFilePosix.cc: Copied this from natFile.cc. * java/io/natFile.cc: Removed from repository. * configure.in: Added AC_LINK_FILES for natFile${PLATFORM}. *************** *** 6729,6736 **** * prims.cc (_Jv_RunMain): Use DISABLE_MAIN_ARGS. * configure: Rebuilt. * configure.in: Add --disable-main-args option. Test for ! opendir function. Replace AC_CHECK_SIZEOF with ! AC_COMPILE_CHECK_SIZEOF. * java/io/natFile.cc (performList): Check HAVE_OPENDIR. * aclocal.m4: Rebuilt. * acinclude.m4: Add AC_COMPILE_CHECK_SIZEOF. --- 17225,17232 ---- * prims.cc (_Jv_RunMain): Use DISABLE_MAIN_ARGS. * configure: Rebuilt. * configure.in: Add --disable-main-args option. Test for ! opendir function. Replace AC_CHECK_SIZEOF with ! AC_COMPILE_CHECK_SIZEOF. * java/io/natFile.cc (performList): Check HAVE_OPENDIR. * aclocal.m4: Rebuilt. * acinclude.m4: Add AC_COMPILE_CHECK_SIZEOF. diff -Nrc3pad gcc-3.3.3/libjava/configure gcc-3.4.0/libjava/configure *** gcc-3.3.3/libjava/configure 2004-02-14 20:34:20.000000000 +0000 --- gcc-3.4.0/libjava/configure 2004-04-19 02:23:04.000000000 +0000 *************** ac_help="$ac_help *** 40,46 **** don't set system properties from GCJ_PROPERTIES" ac_help="$ac_help --enable-hash-synchronization ! Use global hash table for monitor locks" ac_help="$ac_help --enable-libgcj-debug enable runtime debugging code" ac_help="$ac_help --- 40,52 ---- don't set system properties from GCJ_PROPERTIES" ac_help="$ac_help --enable-hash-synchronization ! use global hash table for monitor locks" ! ac_help="$ac_help ! --enable-libgcj-multifile ! allow compilation of several files at once" ! ac_help="$ac_help ! --with-win32-nlsapi=ansi, unicows or unicode ! native MinGW libgcj Win32 OS API [ansi]" ac_help="$ac_help --enable-libgcj-debug enable runtime debugging code" ac_help="$ac_help *************** ac_help="$ac_help *** 58,70 **** ac_help="$ac_help --with-system-zlib use installed libz" ac_help="$ac_help --enable-java-gc=TYPE choose garbage collector [boehm]" ac_help="$ac_help --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib" ac_help="$ac_help ! --with-x use the X Window System" ac_help="$ac_help ! --enable-java-awt list of AWT peer implementations to be built" # Initialize some variables set by options. # The variables have the same names as the options, with --- 64,88 ---- ac_help="$ac_help --with-system-zlib use installed libz" ac_help="$ac_help + --with-x use the X Window System" + ac_help="$ac_help + --enable-java-awt list of AWT peer implementations to be built" + ac_help="$ac_help + --enable-gtk-cairo build the cairo Graphics2D implementation on GTK" + ac_help="$ac_help --enable-java-gc=TYPE choose garbage collector [boehm]" ac_help="$ac_help --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib" ac_help="$ac_help ! --disable-gtktest do not try to compile and run a test GTK+ program" ac_help="$ac_help ! --disable-glibtest do not try to compile and run a test GLIB program" ! ac_help="$ac_help ! --with-libart-prefix=PFX Prefix where LIBART is installed (optional)" ! ac_help="$ac_help ! --with-libart-exec-prefix=PFX Exec prefix where LIBART is installed (optional)" ! ac_help="$ac_help ! --disable-libarttest Do not try to compile and run a test LIBART program" # Initialize some variables set by options. # The variables have the same names as the options, with *************** fi *** 583,589 **** ORIGINAL_LD_FOR_MULTILIBS=$LD echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 ! echo "configure:587: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 601,607 ---- ORIGINAL_LD_FOR_MULTILIBS=$LD echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 ! echo "configure:605: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** if test "${with_newlib+set}" = set; then *** 624,629 **** --- 642,648 ---- fi + am__api_version="1.4" # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: *************** fi *** 636,642 **** # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:640: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 655,661 ---- # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:659: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** test -z "$INSTALL_SCRIPT" && INSTALL_SCR *** 689,695 **** test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 ! echo "configure:693: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile --- 708,714 ---- test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 ! echo "configure:712: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile *************** test "$program_suffix" != NONE && *** 746,752 **** test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:750: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 765,771 ---- test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:769: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** else *** 779,790 **** fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 ! echo "configure:783: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:802: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else --- 814,820 ---- return __CYGWIN__; ; return 0; } EOF ! if { (eval echo configure:818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else *************** echo "$ac_t""$ac_cv_cygwin" 1>&6 *** 812,830 **** CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 ! echo "configure:816: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else --- 831,849 ---- CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 ! echo "configure:835: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else *************** else { echo "configure: error: can not r *** 951,957 **** fi echo $ac_n "checking host system type""... $ac_c" 1>&6 ! echo "configure:955: checking host system type" >&5 host_alias=$host case "$host_alias" in --- 970,976 ---- fi echo $ac_n "checking host system type""... $ac_c" 1>&6 ! echo "configure:974: checking host system type" >&5 host_alias=$host case "$host_alias" in *************** host_os=`echo $host | sed 's/^\([^-]*\)- *** 972,978 **** echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 ! echo "configure:976: checking target system type" >&5 target_alias=$target case "$target_alias" in --- 991,997 ---- echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 ! echo "configure:995: checking target system type" >&5 target_alias=$target case "$target_alias" in *************** target_os=`echo $target | sed 's/^\([^-] *** 990,996 **** echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 ! echo "configure:994: checking build system type" >&5 build_alias=$build case "$build_alias" in --- 1009,1015 ---- echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 ! echo "configure:1013: checking build system type" >&5 build_alias=$build case "$build_alias" in *************** test "$host_alias" != "$target_alias" && *** 1019,1025 **** # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1023: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1038,1044 ---- # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1042: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** if test -z "$CC"; then *** 1049,1055 **** # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1053: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1068,1074 ---- # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1072: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 1100,1106 **** # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1104: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1119,1125 ---- # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1123: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 1133,1139 **** echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:1137: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1152,1158 ---- echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:1156: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 1142,1148 **** yes; #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no --- 1161,1167 ---- yes; #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no *************** ac_test_CFLAGS="${CFLAGS+set}" *** 1161,1167 **** ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:1165: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1180,1186 ---- ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:1184: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** do *** 1210,1216 **** # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1214: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_glibjava_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1229,1235 ---- # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1233: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_glibjava_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** CXX=$glibjava_CXX *** 1245,1251 **** test -z "$glibjava_CXX" && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 ! echo "configure:1249: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1264,1270 ---- test -z "$glibjava_CXX" && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 ! echo "configure:1268: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 1254,1260 **** yes; #endif EOF ! if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no --- 1273,1279 ---- yes; #endif EOF ! if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no *************** if test $ac_cv_prog_gxx = yes; then *** 1269,1275 **** ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 ! echo "configure:1273: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1288,1294 ---- ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 ! echo "configure:1292: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** EOF *** 1317,1337 **** missing_dir=`cd $ac_aux_dir && pwd` ! echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 ! echo "configure:1322: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. ! if (aclocal --version) < /dev/null > /dev/null 2>&1; then ! ACLOCAL=aclocal echo "$ac_t""found" 1>&6 else ! ACLOCAL="$missing_dir/missing aclocal" echo "$ac_t""missing" 1>&6 fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 ! echo "configure:1335: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. --- 1336,1356 ---- missing_dir=`cd $ac_aux_dir && pwd` ! echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6 ! echo "configure:1341: checking for working aclocal-${am__api_version}" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. ! if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then ! ACLOCAL=aclocal-${am__api_version} echo "$ac_t""found" 1>&6 else ! ACLOCAL="$missing_dir/missing aclocal-${am__api_version}" echo "$ac_t""missing" 1>&6 fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 ! echo "configure:1354: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. *************** else *** 1343,1363 **** echo "$ac_t""missing" 1>&6 fi ! echo $ac_n "checking for working automake""... $ac_c" 1>&6 ! echo "configure:1348: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. ! if (automake --version) < /dev/null > /dev/null 2>&1; then ! AUTOMAKE=automake echo "$ac_t""found" 1>&6 else ! AUTOMAKE="$missing_dir/missing automake" echo "$ac_t""missing" 1>&6 fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 ! echo "configure:1361: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. --- 1362,1382 ---- echo "$ac_t""missing" 1>&6 fi ! echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6 ! echo "configure:1367: checking for working automake-${am__api_version}" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. ! if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then ! AUTOMAKE=automake-${am__api_version} echo "$ac_t""found" 1>&6 else ! AUTOMAKE="$missing_dir/missing automake-${am__api_version}" echo "$ac_t""missing" 1>&6 fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 ! echo "configure:1380: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. *************** else *** 1370,1376 **** fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 ! echo "configure:1374: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. --- 1389,1395 ---- fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 ! echo "configure:1393: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. *************** fi *** 1384,1416 **** - # AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we don't - # run it explicitly here, it will be run implicitly before - # LIBGCJ_CONFIGURE, which doesn't work because that means that it will - # be run before AC_CANONICAL_HOST. - echo $ac_n "checking build system type""... $ac_c" 1>&6 - echo "configure:1393: checking build system type" >&5 - - build_alias=$build - case "$build_alias" in - NONE) - case $nonopt in - NONE) build_alias=$host_alias ;; - *) build_alias=$nonopt ;; - esac ;; - esac - - build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` - build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` - build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` - build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - echo "$ac_t""$build" 1>&6 - - # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1414: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1403,1412 ---- # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1410: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 1442,1448 **** # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1446: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1438,1444 ---- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1442: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 1474,1480 **** # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1478: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1470,1476 ---- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1474: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** if test -n "$ac_tool_prefix"; then *** 1506,1512 **** # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1510: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1502,1508 ---- # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1506: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 1551,1557 **** # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:1555: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1547,1553 ---- # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:1551: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** test -z "$INSTALL_DATA" && INSTALL_DATA= *** 1605,1611 **** echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 ! echo "configure:1609: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" --- 1601,1607 ---- echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 ! echo "configure:1605: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" *************** fi *** 1631,1637 **** echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 ! echo "configure:1635: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1627,1633 ---- echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 ! echo "configure:1631: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 1641,1650 **** rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= ! if { (eval echo configure:1645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in ! *.c | *.o | *.obj) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done --- 1637,1646 ---- rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= ! if { (eval echo configure:1641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in ! *.$ac_ext | *.c | *.o | *.obj) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done *************** LIBGCJ_JAVAFLAGS="${libgcj_javaflags}" *** 1685,1692 **** ! # Only use libltdl for native builds. ! if test -z "${with_cross_host}"; then case $enable_ltdl_convenience in no) { echo "configure: error: this package needs a convenience libltdl" 1>&2; exit 1; } ;; "") enable_ltdl_convenience=yes --- 1681,1688 ---- ! # Only use libltdl for non-newlib builds. ! if test "x${with_newlib}" = "x" || test "x${with_newlib}" = "xno"; then case $enable_ltdl_convenience in no) { echo "configure: error: this package needs a convenience libltdl" 1>&2; exit 1; } ;; "") enable_ltdl_convenience=yes *************** ac_prog=ld *** 1791,1797 **** if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 ! echo "configure:1795: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw --- 1787,1793 ---- if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 ! echo "configure:1791: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw *************** echo "configure:1795: checking for ld us *** 1821,1830 **** esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 ! echo "configure:1825: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 ! echo "configure:1828: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1817,1826 ---- esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 ! echo "configure:1821: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 ! echo "configure:1824: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** else *** 1859,1865 **** fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 ! echo "configure:1863: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1855,1861 ---- fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 ! echo "configure:1859: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** with_gnu_ld=$lt_cv_prog_gnu_ld *** 1876,1882 **** echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 ! echo "configure:1880: checking for $LD option to reload object files" >&5 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1872,1878 ---- echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 ! echo "configure:1876: checking for $LD option to reload object files" >&5 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** reload_flag=$lt_cv_ld_reload_flag *** 1888,1894 **** test -n "$reload_flag" && reload_flag=" $reload_flag" echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 ! echo "configure:1892: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1884,1890 ---- test -n "$reload_flag" && reload_flag=" $reload_flag" echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 ! echo "configure:1888: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** NM="$lt_cv_path_NM" *** 1926,1932 **** echo "$ac_t""$NM" 1>&6 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 ! echo "configure:1930: checking how to recognise dependant libraries" >&5 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1922,1928 ---- echo "$ac_t""$NM" 1>&6 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 ! echo "configure:1926: checking how to recognise dependant libraries" >&5 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** cygwin* | mingw* |pw32*) *** 1965,1970 **** --- 1961,1967 ---- ;; darwin* | rhapsody*) + # this will be overwritten by pass_all, but leave it in just in case lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' lt_cv_file_magic_cmd='/usr/bin/file -L' case "$host_os" in *************** darwin* | rhapsody*) *** 1975,1980 **** --- 1972,1978 ---- lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' ;; esac + lt_cv_deplibs_check_method=pass_all ;; freebsd* ) *************** irix5* | irix6*) *** 2036,2042 **** # This must be Linux ELF. linux-gnu*) case $host_cpu in ! alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* ) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM --- 2034,2040 ---- # This must be Linux ELF. linux-gnu*) case $host_cpu in ! alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* ) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM *************** file_magic_cmd=$lt_cv_file_magic_cmd *** 2099,2111 **** deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 ! echo "configure:2103: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext ! if { (eval echo configure:2109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; --- 2097,2109 ---- deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 ! echo "configure:2101: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext ! if { (eval echo configure:2107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; *************** case $deplibs_check_method in *** 2129,2135 **** file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 ! echo "configure:2133: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2127,2133 ---- file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 ! echo "configure:2131: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 2191,2197 **** if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 ! echo "configure:2195: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2189,2195 ---- if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 ! echo "configure:2193: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** esac *** 2262,2268 **** # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2266: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2260,2266 ---- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2264: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** if test -n "$ac_tool_prefix"; then *** 2294,2300 **** # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2298: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2292,2298 ---- # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2296: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 2329,2335 **** # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2333: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2327,2333 ---- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2331: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** if test -n "$ac_tool_prefix"; then *** 2361,2367 **** # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2365: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2359,2365 ---- # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2363: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** test x"$pic_mode" = xno && libtool_flags *** 2428,2435 **** case $host in *-*-irix6*) # Find out which ABI we are using. ! echo '#line 2432 "configure"' > conftest.$ac_ext ! if { (eval echo configure:2433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) --- 2426,2433 ---- case $host in *-*-irix6*) # Find out which ABI we are using. ! echo '#line 2430 "configure"' > conftest.$ac_ext ! if { (eval echo configure:2431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) *************** case $host in *** 2462,2468 **** ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext ! if { (eval echo configure:2466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *ELF-32*) HPUX_IA64_MODE="32" --- 2460,2466 ---- ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext ! if { (eval echo configure:2464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *ELF-32*) HPUX_IA64_MODE="32" *************** ia64-*-hpux*) *** 2478,2484 **** x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext ! if { (eval echo configure:2482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) case $host in --- 2476,2482 ---- x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext ! if { (eval echo configure:2480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) case $host in *************** x86_64-*linux*|ppc*-*linux*|powerpc*-*li *** 2522,2528 **** SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 ! echo "configure:2526: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2520,2526 ---- SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 ! echo "configure:2524: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** ac_link='${CC-cc} -o conftest${ac_exeext *** 2535,2548 **** cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else --- 2533,2546 ---- cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else *************** echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 *** 2572,2578 **** esac echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 ! echo "configure:2576: checking how to run the C++ preprocessor" >&5 if test -z "$CXXCPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2570,2576 ---- esac echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 ! echo "configure:2574: checking how to run the C++ preprocessor" >&5 if test -z "$CXXCPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** ac_link='${CXX-g++} -o conftest${ac_exee *** 2585,2596 **** cross_compiling=$ac_cv_prog_cxx_cross CXXCPP="${CXX-g++} -E" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : --- 2583,2594 ---- cross_compiling=$ac_cv_prog_cxx_cross CXXCPP="${CXX-g++} -E" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : *************** if test -z "$enable_hash_synchronization *** 2781,2786 **** --- 2779,2832 ---- enable_hash_synchronization=$enable_hash_synchronization_default fi + # Do we allow intermodule optimizations (i.e. compiling many files at once)? + # Check whether --enable-libgcj-multifile or --disable-libgcj-multifile was given. + if test "${enable_libgcj_multifile+set}" = set; then + enableval="$enable_libgcj_multifile" + case "${enableval}" in + yes) enable_libgcj_multifile=yes ;; + no) enable_libgcj_multifile=no ;; + *) { echo "configure: error: bad value ${enableval} for --enable-libgcj-multifile" 1>&2; exit 1; } ;; + esac + else + enable_libgcj_multifile=no + fi + + + + if test "$enable_libgcj_multifile" = yes; then + ONESTEP_TRUE= + ONESTEP_FALSE='#' + else + ONESTEP_TRUE='#' + ONESTEP_FALSE= + fi + + # What is the native OS API for MinGW? + # Check whether --with-win32-nlsapi or --without-win32-nlsapi was given. + if test "${with_win32_nlsapi+set}" = set; then + withval="$with_win32_nlsapi" + + case "${withval}" in + ansi) with_win32_nlsapi=ansi ;; + unicows) with_win32_nlsapi=unicows ;; + unicode) with_win32_nlsapi=unicode ;; + *) { echo "configure: error: Bad value ${withval} for --with-win32-nlsapi." 1>&2; exit 1; } ;; + esac + else + with_win32_nlsapi=ansi + fi + + + case "${with_win32_nlsapi}" in + unicows | unicode) + cat >> confdefs.h <<\EOF + #define MINGW_LIBGCJ_UNICODE 1 + EOF + + ;; + esac + if test "${slow_pthread_self}" = "yes"; then cat >> confdefs.h <<\EOF #define SLOW_PTHREAD_SELF 1 *************** INTERPRETER="$libgcj_interpreter" *** 2826,2832 **** echo $ac_n "checking for exception model to use""... $ac_c" 1>&6 ! echo "configure:2830: checking for exception model to use" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. --- 2872,2878 ---- echo $ac_n "checking for exception model to use""... $ac_c" 1>&6 ! echo "configure:2876: checking for exception model to use" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. *************** if test "${enable_sjlj_exceptions+set}" *** 2841,2847 **** : else cat > conftest.$ac_ext << EOF ! #line 2845 "configure" struct S { ~S(); }; void bar(); void foo() --- 2887,2893 ---- : else cat > conftest.$ac_ext << EOF ! #line 2891 "configure" struct S { ~S(); }; void bar(); void foo() *************** void foo() *** 2852,2858 **** EOF old_CXXFLAGS="$CXXFLAGS" CXXFLAGS=-S ! if { (eval echo configure:2856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then enable_sjlj_exceptions=yes elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then --- 2898,2904 ---- EOF old_CXXFLAGS="$CXXFLAGS" CXXFLAGS=-S ! if { (eval echo configure:2902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then enable_sjlj_exceptions=yes elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then *************** if test "${with_ecos+set}" = set; then *** 2953,2968 **** fi PLATFORMOBJS= case "$TARGET_ECOS" in no) case "$host" in *mingw*) PLATFORM=Win32 PLATFORMOBJS=win32.lo PLATFORMH=win32.h echo $ac_n "checking whether 'ld' is at least 2.13""... $ac_c" 1>&6 ! echo "configure:2966: checking whether 'ld' is at least 2.13" >&5 LD_PROG=`$CC --print-prog-name=ld` LD_VERSION=`$LD_PROG --version` LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4` --- 2999,3018 ---- fi + EXTRA_CC_FILES= + + PLATFORMOBJS= case "$TARGET_ECOS" in no) case "$host" in *mingw*) PLATFORM=Win32 + PLATFORMNET=Win32 PLATFORMOBJS=win32.lo PLATFORMH=win32.h echo $ac_n "checking whether 'ld' is at least 2.13""... $ac_c" 1>&6 ! echo "configure:3016: checking whether 'ld' is at least 2.13" >&5 LD_PROG=`$CC --print-prog-name=ld` LD_VERSION=`$LD_PROG --version` LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4` *************** fi *** 2987,2992 **** --- 3037,3043 ---- ;; *) PLATFORM=Posix + PLATFORMNET=Posix PLATFORMOBJS=posix.lo PLATFORMH=posix.h ;; *************** fi *** 2994,2999 **** --- 3045,3051 ---- ;; *) PLATFORM=Ecos + PLATFORMNET=NoNet cat >> confdefs.h <<\EOF #define ECOS 1 EOF *************** esac *** 3006,3012 **** echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 ! echo "configure:3010: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= --- 3058,3064 ---- echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 ! echo "configure:3062: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= *************** else *** 3021,3033 **** # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : --- 3073,3085 ---- # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : *************** else *** 3038,3050 **** rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : --- 3090,3102 ---- rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : *************** else *** 3055,3067 **** rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3065: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : --- 3107,3119 ---- rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3117: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : *************** fi *** 3086,3092 **** echo "$ac_t""$CPP" 1>&6 cat > conftest.$ac_ext < EOF --- 3138,3144 ---- echo "$ac_t""$CPP" 1>&6 cat > conftest.$ac_ext < EOF *************** fi *** 3101,3107 **** rm -f conftest* cat > conftest.$ac_ext < EOF --- 3153,3159 ---- rm -f conftest* cat > conftest.$ac_ext < EOF *************** fi *** 3116,3122 **** rm -f conftest* cat > conftest.$ac_ext < EOF --- 3168,3174 ---- rm -f conftest* cat > conftest.$ac_ext < EOF *************** fi *** 3131,3137 **** rm -f conftest* cat > conftest.$ac_ext < EOF --- 3183,3189 ---- rm -f conftest* cat > conftest.$ac_ext < EOF *************** rm -f conftest* *** 3148,3154 **** cat > conftest.$ac_ext < EOF --- 3200,3206 ---- cat > conftest.$ac_ext < EOF *************** fi *** 3163,3169 **** rm -f conftest* cat > conftest.$ac_ext < EOF --- 3215,3221 ---- rm -f conftest* cat > conftest.$ac_ext < EOF *************** test -d java/lang || mkdir java/lang *** 3188,3196 **** --- 3240,3264 ---- + test -d java/net || mkdir java/net + + + + test -d gnu/java || mkdir gnu/java + test -d gnu/java/net || mkdir gnu/java/net + + + + test -d gnu/java/nio || mkdir gnu/java/nio + + + case "${host}" in *mingw*) SYSTEMSPEC="-lgdi32 -lwsock32 -lws2_32" + if test "${with_win32_nlsapi}" = "unicows"; then + SYSTEMSPEC="-lunicows $SYSTEMSPEC" + fi ;; *) SYSTEMSPEC= *************** ZLIBSPEC= *** 3212,3221 **** ZLIBTESTSPEC= libsubdir=.libs echo $ac_n "checking for garbage collector to use""... $ac_c" 1>&6 ! echo "configure:3219: checking for garbage collector to use" >&5 # Check whether --enable-java-gc or --disable-java-gc was given. if test "${enable_java_gc+set}" = set; then enableval="$enable_java_gc" --- 3280,4394 ---- ZLIBTESTSPEC= + # If we find X, set shell vars x_includes and x_libraries to the + # paths, otherwise set no_x=yes. + # Uses ac_ vars as temps to allow command line to override cache and checks. + # --without-x overrides everything else, but does not touch the cache. + echo $ac_n "checking for X""... $ac_c" 1>&6 + echo "configure:3289: checking for X" >&5 + + # Check whether --with-x or --without-x was given. + if test "${with_x+set}" = set; then + withval="$with_x" + : + fi + + # $have_x is `yes', `no', `disabled', or empty when we do not yet know. + if test "x$with_x" = xno; then + # The user explicitly disabled X. + have_x=disabled + else + if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then + # Both variables are already set. + have_x=yes + else + if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + # One or both of the vars are not set, and there is no cached value. + ac_x_includes=NO ac_x_libraries=NO + rm -fr conftestdir + if mkdir conftestdir; then + cd conftestdir + # Make sure to not put "make" in the Imakefile rules, since we grep it out. + cat > Imakefile <<'EOF' + acfindx: + @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' + EOF + if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` + # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. + for ac_extension in a so sl; do + if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && + test -f $ac_im_libdir/libX11.$ac_extension; then + ac_im_usrlibdir=$ac_im_libdir; break + fi + done + # Screen out bogus values from the imake configuration. They are + # bogus both because they are the default anyway, and because + # using them would break gcc on systems where it needs fixed includes. + case "$ac_im_incroot" in + /usr/include) ;; + *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; + esac + case "$ac_im_usrlibdir" in + /usr/lib | /lib) ;; + *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; + esac + fi + cd .. + rm -fr conftestdir + fi + + if test "$ac_x_includes" = NO; then + # Guess where to find include files, by looking for this one X11 .h file. + test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h + + # First, try using that file with no special directory specified. + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" + { (eval echo configure:3356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* + # We can compile using X headers with no special include directory. + ac_x_includes= + else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + # Look for the header file in a standard set of common directories. + # Check X11 before X11Rn because it is often a symlink to the current release. + for ac_dir in \ + /usr/X11/include \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11R4/include \ + \ + /usr/include/X11 \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + /usr/include/X11R4 \ + \ + /usr/local/X11/include \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + /usr/local/X11R4/include \ + \ + /usr/local/include/X11 \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R5 \ + /usr/local/include/X11R4 \ + \ + /usr/X386/include \ + /usr/x386/include \ + /usr/XFree86/include/X11 \ + \ + /usr/include \ + /usr/local/include \ + /usr/unsupported/include \ + /usr/athena/include \ + /usr/local/x11r5/include \ + /usr/lpp/Xamples/include \ + \ + /usr/openwin/include \ + /usr/openwin/share/include \ + ; \ + do + if test -r "$ac_dir/$x_direct_test_include"; then + ac_x_includes=$ac_dir + break + fi + done + fi + rm -f conftest* + fi # $ac_x_includes = NO + + if test "$ac_x_libraries" = NO; then + # Check for the libraries. + + test -z "$x_direct_test_library" && x_direct_test_library=Xt + test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc + + # See if we find them without any special options. + # Don't add to $LIBS permanently. + ac_save_LIBS="$LIBS" + LIBS="-l$x_direct_test_library $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + LIBS="$ac_save_LIBS" + # We can link X programs with no special library path. + ac_x_libraries= + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + LIBS="$ac_save_LIBS" + # First see if replacing the include by lib works. + # Check X11 before X11Rn because it is often a symlink to the current release. + for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ + /usr/X11/lib \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11R4/lib \ + \ + /usr/lib/X11 \ + /usr/lib/X11R6 \ + /usr/lib/X11R5 \ + /usr/lib/X11R4 \ + \ + /usr/local/X11/lib \ + /usr/local/X11R6/lib \ + /usr/local/X11R5/lib \ + /usr/local/X11R4/lib \ + \ + /usr/local/lib/X11 \ + /usr/local/lib/X11R6 \ + /usr/local/lib/X11R5 \ + /usr/local/lib/X11R4 \ + \ + /usr/X386/lib \ + /usr/x386/lib \ + /usr/XFree86/lib/X11 \ + \ + /usr/lib \ + /usr/local/lib \ + /usr/unsupported/lib \ + /usr/athena/lib \ + /usr/local/x11r5/lib \ + /usr/lpp/Xamples/lib \ + /lib/usr/lib/X11 \ + \ + /usr/openwin/lib \ + /usr/openwin/share/lib \ + ; \ + do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then + ac_x_libraries=$ac_dir + break 2 + fi + done + done + fi + rm -f conftest* + fi # $ac_x_libraries = NO + + if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then + # Didn't find X anywhere. Cache the known absence of X. + ac_cv_have_x="have_x=no" + else + # Record where we found X for the cache. + ac_cv_have_x="have_x=yes \ + ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" + fi + fi + fi + eval "$ac_cv_have_x" + fi # $with_x != no + + if test "$have_x" != yes; then + echo "$ac_t""$have_x" 1>&6 + no_x=yes + else + # If each of the values was on the command line, it overrides each guess. + test "x$x_includes" = xNONE && x_includes=$ac_x_includes + test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries + # Update the cache value to reflect the command line values. + ac_cv_have_x="have_x=yes \ + ac_x_includes=$x_includes ac_x_libraries=$x_libraries" + echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 + fi + + if test "$no_x" = yes; then + # Not all programs may use this symbol, but it does not hurt to define it. + cat >> confdefs.h <<\EOF + #define X_DISPLAY_MISSING 1 + EOF + + X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= + else + if test -n "$x_includes"; then + X_CFLAGS="$X_CFLAGS -I$x_includes" + fi + + # It would also be nice to do this for all -L options, not just this one. + if test -n "$x_libraries"; then + X_LIBS="$X_LIBS -L$x_libraries" + # For Solaris; some versions of Sun CC require a space after -R and + # others require no space. Words are not sufficient . . . . + case "`(uname -sr) 2>/dev/null`" in + "SunOS 5"*) + echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 + echo "configure:3538: checking whether -R must be followed by a space" >&5 + ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_R_nospace=yes + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_R_nospace=no + fi + rm -f conftest* + if test $ac_R_nospace = yes; then + echo "$ac_t""no" 1>&6 + X_LIBS="$X_LIBS -R$x_libraries" + else + LIBS="$ac_xsave_LIBS -R $x_libraries" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_R_space=yes + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_R_space=no + fi + rm -f conftest* + if test $ac_R_space = yes; then + echo "$ac_t""yes" 1>&6 + X_LIBS="$X_LIBS -R $x_libraries" + else + echo "$ac_t""neither works" 1>&6 + fi + fi + LIBS="$ac_xsave_LIBS" + esac + fi + + # Check for system-dependent libraries X programs must link with. + # Do this before checking for the system-independent R6 libraries + # (-lICE), since we may need -lsocket or whatever for X linking. + + if test "$ISC" = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" + else + # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X + # libraries were built with DECnet support. And karl@cs.umb.edu says + # the Alpha needs dnet_stub (dnet does not exist). + echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 + echo "configure:3603: checking for dnet_ntoa in -ldnet" >&5 + ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_save_LIBS="$LIBS" + LIBS="-ldnet $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" + fi + rm -f conftest* + LIBS="$ac_save_LIBS" + + fi + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" + else + echo "$ac_t""no" 1>&6 + fi + + if test $ac_cv_lib_dnet_dnet_ntoa = no; then + echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 + echo "configure:3644: checking for dnet_ntoa in -ldnet_stub" >&5 + ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_save_LIBS="$LIBS" + LIBS="-ldnet_stub $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" + fi + rm -f conftest* + LIBS="$ac_save_LIBS" + + fi + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" + else + echo "$ac_t""no" 1>&6 + fi + + fi + + # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, + # to get the SysV transport functions. + # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4) + # needs -lnsl. + # The nsl library prevents programs from opening the X display + # on Irix 5.2, according to dickey@clark.net. + echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 + echo "configure:3692: checking for gethostbyname" >&5 + if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + /* Override any gcc2 internal prototype to avoid an error. */ + /* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + char gethostbyname(); + + int main() { + + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) + choke me + #else + gethostbyname(); + #endif + + ; return 0; } + EOF + if { (eval echo configure:3720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_gethostbyname=yes" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_gethostbyname=no" + fi + rm -f conftest* + fi + + if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : + else + echo "$ac_t""no" 1>&6 + fi + + if test $ac_cv_func_gethostbyname = no; then + echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 + echo "configure:3741: checking for gethostbyname in -lnsl" >&5 + ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_save_LIBS="$LIBS" + LIBS="-lnsl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" + fi + rm -f conftest* + LIBS="$ac_save_LIBS" + + fi + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" + else + echo "$ac_t""no" 1>&6 + fi + + fi + + # lieder@skyler.mavd.honeywell.com says without -lsocket, + # socket/setsockopt and other routines are undefined under SCO ODT + # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary + # on later versions), says simon@lia.di.epfl.ch: it contains + # gethostby* variants that don't use the nameserver (or something). + # -lsocket must be given before -lnsl if both are needed. + # We assume that if connect needs -lnsl, so does gethostbyname. + echo $ac_n "checking for connect""... $ac_c" 1>&6 + echo "configure:3790: checking for connect" >&5 + if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + /* Override any gcc2 internal prototype to avoid an error. */ + /* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + char connect(); + + int main() { + + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined (__stub_connect) || defined (__stub___connect) + choke me + #else + connect(); + #endif + + ; return 0; } + EOF + if { (eval echo configure:3818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_connect=yes" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_connect=no" + fi + rm -f conftest* + fi + + if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : + else + echo "$ac_t""no" 1>&6 + fi + + if test $ac_cv_func_connect = no; then + echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 + echo "configure:3839: checking for connect in -lsocket" >&5 + ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_save_LIBS="$LIBS" + LIBS="-lsocket $X_EXTRA_LIBS $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" + fi + rm -f conftest* + LIBS="$ac_save_LIBS" + + fi + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" + else + echo "$ac_t""no" 1>&6 + fi + + fi + + # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. + echo $ac_n "checking for remove""... $ac_c" 1>&6 + echo "configure:3882: checking for remove" >&5 + if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + /* Override any gcc2 internal prototype to avoid an error. */ + /* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + char remove(); + + int main() { + + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined (__stub_remove) || defined (__stub___remove) + choke me + #else + remove(); + #endif + + ; return 0; } + EOF + if { (eval echo configure:3910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_remove=yes" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_remove=no" + fi + rm -f conftest* + fi + + if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : + else + echo "$ac_t""no" 1>&6 + fi + + if test $ac_cv_func_remove = no; then + echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 + echo "configure:3931: checking for remove in -lposix" >&5 + ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_save_LIBS="$LIBS" + LIBS="-lposix $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" + fi + rm -f conftest* + LIBS="$ac_save_LIBS" + + fi + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" + else + echo "$ac_t""no" 1>&6 + fi + + fi + + # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. + echo $ac_n "checking for shmat""... $ac_c" 1>&6 + echo "configure:3974: checking for shmat" >&5 + if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + /* Override any gcc2 internal prototype to avoid an error. */ + /* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + char shmat(); + + int main() { + + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined (__stub_shmat) || defined (__stub___shmat) + choke me + #else + shmat(); + #endif + + ; return 0; } + EOF + if { (eval echo configure:4002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_shmat=yes" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_shmat=no" + fi + rm -f conftest* + fi + + if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : + else + echo "$ac_t""no" 1>&6 + fi + + if test $ac_cv_func_shmat = no; then + echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 + echo "configure:4023: checking for shmat in -lipc" >&5 + ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_save_LIBS="$LIBS" + LIBS="-lipc $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" + fi + rm -f conftest* + LIBS="$ac_save_LIBS" + + fi + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" + else + echo "$ac_t""no" 1>&6 + fi + + fi + fi + + # Check for libraries that X11R6 Xt/Xaw programs need. + ac_save_LDFLAGS="$LDFLAGS" + test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" + # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to + # check for ICE first), but we must link in the order -lSM -lICE or + # we get undefined symbols. So assume we have SM if we have ICE. + # These have to be linked with before -lX11, unlike the other + # libraries we check for below, so use a different variable. + # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. + echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 + echo "configure:4075: checking for IceConnectionNumber in -lICE" >&5 + ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_save_LIBS="$LIBS" + LIBS="-lICE $X_EXTRA_LIBS $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" + fi + rm -f conftest* + LIBS="$ac_save_LIBS" + + fi + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" + else + echo "$ac_t""no" 1>&6 + fi + + LDFLAGS="$ac_save_LDFLAGS" + + fi + + + # Check whether --enable-java-awt or --disable-java-awt was given. + if test "${enable_java_awt+set}" = set; then + enableval="$enable_java_awt" + : + fi + + + peerlibs="`echo ${enable_java_awt} | tr ',' ' '`" + use_xlib_awt="" + use_gtk_awt="" + # The default toolkit to use is the first one specified. + TOOLKIT= + + + for peer in $peerlibs ; do + case $peer in + xlib) + if test "$no_x" = yes; then + echo "*** xlib peers requested but no X library available" 1>&2 + exit 1 + else + use_xlib_awt="yes" + if test -z "$TOOLKIT"; then + TOOLKIT=gnu.awt.xlib.XToolkit + fi + fi + ;; + gtk) + if test "$no_x" = yes; then + echo "*** xlib peers requested but no X library available" 1>&2 + exit 1 + else + use_gtk_awt=yes + if test -z "$TOOLKIT"; then + TOOLKIT=gnu.java.awt.peer.gtk.GtkToolkit + fi + test -d jniinclude || mkdir jniinclude + fi + ;; + no) + use_xlib_awt= + use_gtk_awt= + break + ;; + *) + echo "*** unrecognised argument \"${peer}\" for --enable-java-awt" 1>&2 + exit 1 + esac + done + + + + if test "$use_xlib_awt" = yes; then + XLIB_AWT_TRUE= + XLIB_AWT_FALSE='#' + else + XLIB_AWT_TRUE='#' + XLIB_AWT_FALSE= + fi + + + if test "$use_gtk_awt" = yes; then + GTK_AWT_TRUE= + GTK_AWT_FALSE='#' + else + GTK_AWT_TRUE='#' + GTK_AWT_FALSE= + fi + + # Check whether --enable-gtk-cairo or --disable-gtk-cairo was given. + if test "${enable_gtk_cairo+set}" = set; then + enableval="$enable_gtk_cairo" + : + fi + + + + if test "x${enable_gtk_cairo}" = xyes; then + GTK_CAIRO_TRUE= + GTK_CAIRO_FALSE='#' + else + GTK_CAIRO_TRUE='#' + GTK_CAIRO_FALSE= + fi + if test "x${enable_gtk_cairo}" = xyes + then + + succeeded=no + + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. + set dummy pkg-config; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 + echo "configure:4212: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + case "$PKG_CONFIG" in + /*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; + esac + fi + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" + if test -n "$PKG_CONFIG"; then + echo "$ac_t""$PKG_CONFIG" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo $ac_n "checking for cairo""... $ac_c" 1>&6 + echo "configure:4256: checking for cairo" >&5 + + if $PKG_CONFIG --exists "cairo" ; then + echo "$ac_t""yes" 1>&6 + succeeded=yes + + echo $ac_n "checking CAIRO_CFLAGS""... $ac_c" 1>&6 + echo "configure:4263: checking CAIRO_CFLAGS" >&5 + CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo"` + echo "$ac_t""$CAIRO_CFLAGS" 1>&6 + + echo $ac_n "checking CAIRO_LIBS""... $ac_c" 1>&6 + echo "configure:4268: checking CAIRO_LIBS" >&5 + CAIRO_LIBS=`$PKG_CONFIG --libs "cairo"` + echo "$ac_t""$CAIRO_LIBS" 1>&6 + else + CAIRO_CFLAGS="" + CAIRO_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + CAIRO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cairo"` + echo $CAIRO_PKG_ERRORS + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + : + else + { echo "configure: error: Library requirements (cairo) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; exit 1; } + fi + + + succeeded=no + + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. + set dummy pkg-config; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 + echo "configure:4301: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + case "$PKG_CONFIG" in + /*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; + esac + fi + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" + if test -n "$PKG_CONFIG"; then + echo "$ac_t""$PKG_CONFIG" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo $ac_n "checking for pangoft2""... $ac_c" 1>&6 + echo "configure:4345: checking for pangoft2" >&5 + + if $PKG_CONFIG --exists "pangoft2" ; then + echo "$ac_t""yes" 1>&6 + succeeded=yes + + echo $ac_n "checking PANGOFT2_CFLAGS""... $ac_c" 1>&6 + echo "configure:4352: checking PANGOFT2_CFLAGS" >&5 + PANGOFT2_CFLAGS=`$PKG_CONFIG --cflags "pangoft2"` + echo "$ac_t""$PANGOFT2_CFLAGS" 1>&6 + + echo $ac_n "checking PANGOFT2_LIBS""... $ac_c" 1>&6 + echo "configure:4357: checking PANGOFT2_LIBS" >&5 + PANGOFT2_LIBS=`$PKG_CONFIG --libs "pangoft2"` + echo "$ac_t""$PANGOFT2_LIBS" 1>&6 + else + PANGOFT2_CFLAGS="" + PANGOFT2_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + PANGOFT2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pangoft2"` + echo $PANGOFT2_PKG_ERRORS + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + : + else + { echo "configure: error: Library requirements (pangoft2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; exit 1; } + fi + + fi + + + + + libsubdir=.libs echo $ac_n "checking for garbage collector to use""... $ac_c" 1>&6 ! echo "configure:4392: checking for garbage collector to use" >&5 # Check whether --enable-java-gc or --disable-java-gc was given. if test "${enable_java_gc+set}" = set; then enableval="$enable_java_gc" *************** case "$GC" in *** 3236,3246 **** boehm) echo "$ac_t""boehm" 1>&6 GCLIBS=../boehm-gc/libgcjgc_convenience.la - GCINCS='-I$(top_srcdir)/../boehm-gc/include' JC1GCSPEC='-fuse-boehm-gc' GCTESTSPEC="-L`${PWDCMD-pwd}`/../boehm-gc/.libs -rpath `${PWDCMD-pwd}`/../boehm-gc/.libs" ! GCINCS="$GCINCS `cat ../boehm-gc/boehm-cflags`" GCOBJS=boehm.lo GCHDR=boehm-gc.h cat >> confdefs.h <<\EOF --- 4409,4418 ---- boehm) echo "$ac_t""boehm" 1>&6 GCLIBS=../boehm-gc/libgcjgc_convenience.la JC1GCSPEC='-fuse-boehm-gc' GCTESTSPEC="-L`${PWDCMD-pwd}`/../boehm-gc/.libs -rpath `${PWDCMD-pwd}`/../boehm-gc/.libs" ! GCINCS="`cat ../boehm-gc/boehm-cflags`" GCOBJS=boehm.lo GCHDR=boehm-gc.h cat >> confdefs.h <<\EOF *************** esac *** 3268,3274 **** echo $ac_n "checking for thread model used by GCC""... $ac_c" 1>&6 ! echo "configure:3272: checking for thread model used by GCC" >&5 THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'` echo "$ac_t""$THREADS" 1>&6 --- 4440,4446 ---- echo $ac_n "checking for thread model used by GCC""... $ac_c" 1>&6 ! echo "configure:4444: checking for thread model used by GCC" >&5 THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'` echo "$ac_t""$THREADS" 1>&6 *************** EOF *** 3297,3302 **** --- 4469,4475 ---- ;; esac + THREADCXXFLAGS= THREADLDFLAGS= THREADLIBS= THREADINCS= *************** case "$THREADS" in *** 3331,3336 **** --- 4504,4515 ---- THREADLDFLAGS=-pthread THREADSPEC=-lc_r ;; + alpha*-dec-osf*) + THREADCXXFLAGS=-pthread + # boehm-gc needs some functions from librt, so link that too. + THREADLIBS='-lpthread -lrt' + THREADSPEC='-lpthread -lrt' + ;; *) THREADLIBS=-lpthread THREADSPEC=-lpthread *************** esac *** 3378,3383 **** --- 4557,4563 ---- + if test -d sysdep; then true; else mkdir sysdep; fi *************** GCC_UNWIND_INCLUDE='-I$(libgcj_basedir)/ *** 3414,3420 **** gcc_version_trigger=${libgcj_basedir}/../gcc/version.c gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'` gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` ! tool_include_dir='$(libdir)/gcc-lib/$(target_alias)/'${gcc_version}/include --- 4594,4600 ---- gcc_version_trigger=${libgcj_basedir}/../gcc/version.c gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'` gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` ! tool_include_dir='$(libdir)/gcc/$(target_alias)/'${gcc_version}/include *************** EOF *** 3449,3454 **** --- 4629,4638 ---- #define HAVE_LOCALTIME_R 1 EOF + cat >> confdefs.h <<\EOF + #define HAVE_USLEEP_DECL 1 + EOF + cat >> confdefs.h <<\EOF #define HAVE_PTHREAD_MUTEXATTR_INIT 1 EOF *************** EOF *** 3462,3487 **** #define NO_GETUID 1 EOF ! ! # If Canadian cross, then don't pick up tools from the build ! # directory. ! if test x"$build" != x"$with_cross_host" \ ! && test x"$build" != x"$target"; then ! CANADIAN=yes ! GCC_UNWIND_INCLUDE= ! GCJ="${target_alias}-gcj" ! fi ! NATIVE=no else for ac_func in strerror ioctl select fstat open fsync sleep opendir do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:3480: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:4655: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 4679,4685 ---- ; return 0; } EOF ! if { (eval echo configure:4683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** done *** 3531,3542 **** for ac_func in gmtime_r localtime_r readdir_r getpwuid_r getcwd do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:3535: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:4710: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 4734,4740 ---- ; return 0; } EOF ! if { (eval echo configure:4738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** done *** 3586,3597 **** for ac_func in access stat mkdir rename rmdir unlink realpath utime chmod do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:3590: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:4765: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 4789,4795 ---- ; return 0; } EOF ! if { (eval echo configure:4793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** done *** 3641,3652 **** for ac_func in nl_langinfo setlocale do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:3645: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:4820: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 4844,4850 ---- ; return 0; } EOF ! if { (eval echo configure:4848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** done *** 3696,3707 **** for ac_func in inet_aton inet_addr do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:3700: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:4875: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 4899,4905 ---- ; return 0; } EOF ! if { (eval echo configure:4903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** done *** 3751,3762 **** for ac_func in inet_pton uname inet_ntoa do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:3755: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:4930: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 4954,4960 ---- ; return 0; } EOF ! if { (eval echo configure:4958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** done *** 3806,3817 **** for ac_func in fork execvp pipe sigaction ftruncate do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:3810: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:4985: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 5009,5015 ---- ; return 0; } EOF ! if { (eval echo configure:5013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** done *** 3862,3878 **** do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:3866: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* --- 5037,5053 ---- do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:5041: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:5051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* *************** fi *** 3899,3910 **** done echo $ac_n "checking for backtrace""... $ac_c" 1>&6 ! echo "configure:3903: checking for backtrace" >&5 if eval "test \"`echo '$''{'ac_cv_func_backtrace'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:5078: checking for backtrace" >&5 if eval "test \"`echo '$''{'ac_cv_func_backtrace'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_backtrace=yes" else --- 5102,5108 ---- ; return 0; } EOF ! if { (eval echo configure:5106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_backtrace=yes" else *************** if eval "test \"`echo '$ac_cv_func_'back *** 3946,3951 **** --- 5121,5135 ---- ia64-*-linux*) # Has broken backtrace() ;; + mips*-*-linux*) + # Has broken backtrace(), but we supply our own. + if test -d sysdep; then true; else mkdir -p sysdep; fi + EXTRA_CC_FILES="${EXTRA_CC_FILES} sysdep/dwarf2-backtrace.cc" + cat >> confdefs.h <<\EOF + #define HAVE_BACKTRACE 1 + EOF + + ;; *) cat >> confdefs.h <<\EOF #define HAVE_BACKTRACE 1 *************** fi *** 3971,3977 **** echo $ac_n "checking for dladdr in -ldl""... $ac_c" 1>&6 ! echo "configure:3975: checking for dladdr in -ldl" >&5 ac_lib_var=`echo dl'_'dladdr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 5155,5161 ---- echo $ac_n "checking for dladdr in -ldl""... $ac_c" 1>&6 ! echo "configure:5159: checking for dladdr in -ldl" >&5 ac_lib_var=`echo dl'_'dladdr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** else *** 3979,3985 **** ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else --- 5174,5180 ---- dladdr() ; return 0; } EOF ! if { (eval echo configure:5178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else *************** fi *** 4006,4015 **** if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ! cat >> confdefs.h <<\EOF #define HAVE_DLADDR 1 EOF else echo "$ac_t""no" 1>&6 fi --- 5190,5205 ---- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ! if test "x${disable_dladdr}" = "xyes"; then ! #Broken dladdr(). ! true ! else ! cat >> confdefs.h <<\EOF #define HAVE_DLADDR 1 EOF + fi + else echo "$ac_t""no" 1>&6 fi *************** do *** 4020,4026 **** ac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_file""... $ac_c" 1>&6 ! echo "configure:4024: checking for $ac_file" >&5 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 5210,5216 ---- ac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_file""... $ac_c" 1>&6 ! echo "configure:5214: checking for $ac_file" >&5 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 4078,4084 **** echo $ac_n "checking for iconv""... $ac_c" 1>&6 ! echo "configure:4082: checking for iconv" >&5 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 5268,5274 ---- echo $ac_n "checking for iconv""... $ac_c" 1>&6 ! echo "configure:5272: checking for iconv" >&5 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 4086,4092 **** am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat > conftest.$ac_ext < #include --- 5276,5282 ---- am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat > conftest.$ac_ext < #include *************** iconv_t cd = iconv_open("",""); *** 4096,4102 **** iconv_close(cd); ; return 0; } EOF ! if { (eval echo configure:4100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_func_iconv=yes else --- 5286,5292 ---- iconv_close(cd); ; return 0; } EOF ! if { (eval echo configure:5290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_func_iconv=yes else *************** rm -f conftest* *** 4108,4114 **** am_save_LIBS="$LIBS" LIBS="$LIBS $am_cv_libiconv_ldpath -liconv" cat > conftest.$ac_ext < #include --- 5298,5304 ---- am_save_LIBS="$LIBS" LIBS="$LIBS $am_cv_libiconv_ldpath -liconv" cat > conftest.$ac_ext < #include *************** iconv_t cd = iconv_open("",""); *** 4118,4124 **** iconv_close(cd); ; return 0; } EOF ! if { (eval echo configure:4122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_lib_iconv=yes am_cv_func_iconv=yes --- 5308,5314 ---- iconv_close(cd); ; return 0; } EOF ! if { (eval echo configure:5312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_lib_iconv=yes am_cv_func_iconv=yes *************** echo "$ac_t""$am_cv_func_iconv" 1>&6 *** 4139,4151 **** EOF echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 ! echo "configure:4143: checking for iconv declaration" >&5 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 5329,5341 ---- EOF echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 ! echo "configure:5333: checking for iconv declaration" >&5 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** int main() { *** 4164,4170 **** ; return 0; } EOF ! if { (eval echo configure:4168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_proto_iconv_arg1="" else --- 5354,5360 ---- ; return 0; } EOF ! if { (eval echo configure:5358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_proto_iconv_arg1="" else *************** EOF *** 4191,4211 **** fi ! if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 ! echo "configure:4197: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return LC_MESSAGES ; return 0; } EOF ! if { (eval echo configure:4209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else --- 5381,5441 ---- fi ! for ac_hdr in locale.h ! do ! ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ! echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:5389: checking for $ac_hdr" >&5 ! if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! cat > conftest.$ac_ext < ! EOF ! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:5399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ! if test -z "$ac_err"; then ! rm -rf conftest* ! eval "ac_cv_header_$ac_safe=yes" ! else ! echo "$ac_err" >&5 ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_header_$ac_safe=no" ! fi ! rm -f conftest* ! fi ! if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ! ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` ! cat >> confdefs.h <&6 ! fi ! done ! ! if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 ! echo "configure:5427: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return LC_MESSAGES ; return 0; } EOF ! if { (eval echo configure:5439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else *************** EOF *** 4226,4237 **** fi fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 ! echo "configure:4230: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include --- 5456,5467 ---- fi fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 ! echo "configure:5460: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include *************** int main() { *** 4239,4245 **** struct tm *tp; tp->tm_sec; ; return 0; } EOF ! if { (eval echo configure:4243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else --- 5469,5475 ---- struct tm *tp; tp->tm_sec; ; return 0; } EOF ! if { (eval echo configure:5473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else *************** EOF *** 4260,4271 **** fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 ! echo "configure:4264: checking for tm_zone in struct tm" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_cv_struct_tm> --- 5490,5501 ---- fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 ! echo "configure:5494: checking for tm_zone in struct tm" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_cv_struct_tm> *************** int main() { *** 4273,4279 **** struct tm tm; tm.tm_zone; ; return 0; } EOF ! if { (eval echo configure:4277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else --- 5503,5509 ---- struct tm tm; tm.tm_zone; ; return 0; } EOF ! if { (eval echo configure:5507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else *************** EOF *** 4293,4304 **** else echo $ac_n "checking for tzname""... $ac_c" 1>&6 ! echo "configure:4297: checking for tzname" >&5 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifndef tzname /* For SGI. */ --- 5523,5534 ---- else echo $ac_n "checking for tzname""... $ac_c" 1>&6 ! echo "configure:5527: checking for tzname" >&5 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifndef tzname /* For SGI. */ *************** int main() { *** 4308,4314 **** atoi(*tzname); ; return 0; } EOF ! if { (eval echo configure:4312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_var_tzname=yes else --- 5538,5544 ---- atoi(*tzname); ; return 0; } EOF ! if { (eval echo configure:5542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_var_tzname=yes else *************** fi *** 4333,4344 **** for ac_func in gethostbyname_r do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:4337: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:5567: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 5591,5597 ---- ; return 0; } EOF ! if { (eval echo configure:5595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** EOF *** 4388,4394 **** # We look for the one that returns `int'. # Hopefully this check is robust enough. cat > conftest.$ac_ext < EOF --- 5618,5624 ---- # We look for the one that returns `int'. # Hopefully this check is robust enough. cat > conftest.$ac_ext < EOF *************** rm -f conftest* *** 4408,4414 **** *" -D_REENTRANT "*) ;; *) echo $ac_n "checking whether gethostbyname_r declaration requires -D_REENTRANT""... $ac_c" 1>&6 ! echo "configure:4412: checking whether gethostbyname_r declaration requires -D_REENTRANT" >&5 if eval "test \"`echo '$''{'libjava_cv_gethostbyname_r_needs_reentrant'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 5638,5644 ---- *" -D_REENTRANT "*) ;; *) echo $ac_n "checking whether gethostbyname_r declaration requires -D_REENTRANT""... $ac_c" 1>&6 ! echo "configure:5642: checking whether gethostbyname_r declaration requires -D_REENTRANT" >&5 if eval "test \"`echo '$''{'libjava_cv_gethostbyname_r_needs_reentrant'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** ac_link='${CXX-g++} -o conftest${ac_exee *** 4421,4434 **** cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext < int main() { gethostbyname_r("", 0, 0); ; return 0; } EOF ! if { (eval echo configure:4432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libjava_cv_gethostbyname_r_needs_reentrant=no else --- 5651,5664 ---- cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext < int main() { gethostbyname_r("", 0, 0); ; return 0; } EOF ! if { (eval echo configure:5662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libjava_cv_gethostbyname_r_needs_reentrant=no else *************** else *** 4438,4451 **** CPPFLAGS_SAVE="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -D_REENTRANT" cat > conftest.$ac_ext < int main() { gethostbyname_r("", 0, 0); ; return 0; } EOF ! if { (eval echo configure:4449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libjava_cv_gethostbyname_r_needs_reentrant=yes else --- 5668,5681 ---- CPPFLAGS_SAVE="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -D_REENTRANT" cat > conftest.$ac_ext < int main() { gethostbyname_r("", 0, 0); ; return 0; } EOF ! if { (eval echo configure:5679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libjava_cv_gethostbyname_r_needs_reentrant=yes else *************** EOF *** 4480,4491 **** esac echo $ac_n "checking for struct hostent_data""... $ac_c" 1>&6 ! echo "configure:4484: checking for struct hostent_data" >&5 if eval "test \"`echo '$''{'libjava_cv_struct_hostent_data'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:5714: checking for struct hostent_data" >&5 if eval "test \"`echo '$''{'libjava_cv_struct_hostent_data'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libjava_cv_struct_hostent_data=yes else --- 5726,5732 ---- struct hostent_data data; ; return 0; } EOF ! if { (eval echo configure:5730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libjava_cv_struct_hostent_data=yes else *************** done *** 4528,4534 **** # to exist where expected. (The root issue: AC_CHECK_FUNCS assumes C # linkage check is enough, yet C++ code requires proper prototypes.) cat > conftest.$ac_ext < EOF --- 5758,5764 ---- # to exist where expected. (The root issue: AC_CHECK_FUNCS assumes C # linkage check is enough, yet C++ code requires proper prototypes.) cat > conftest.$ac_ext < EOF *************** if (eval "$ac_cpp conftest.$ac_ext") 2>& *** 4539,4550 **** for ac_func in gethostbyaddr_r do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:4543: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:5773: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 5797,5803 ---- ; return 0; } EOF ! if { (eval echo configure:5801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** EOF *** 4594,4600 **** # We look for the one that returns `int'. # Hopefully this check is robust enough. cat > conftest.$ac_ext < EOF --- 5824,5830 ---- # We look for the one that returns `int'. # Hopefully this check is robust enough. cat > conftest.$ac_ext < EOF *************** rm -f conftest* *** 4621,4632 **** for ac_func in gethostname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:4625: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:5855: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 5879,5885 ---- ; return 0; } EOF ! if { (eval echo configure:5883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** EOF *** 4673,4679 **** EOF cat > conftest.$ac_ext < EOF --- 5903,5909 ---- EOF cat > conftest.$ac_ext < EOF *************** fi *** 4694,4699 **** --- 5924,6001 ---- done + for ac_func in usleep + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 + echo "configure:5931: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + /* Override any gcc2 internal prototype to avoid an error. */ + /* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + char $ac_func(); + + int main() { + + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined (__stub_$ac_func) || defined (__stub___$ac_func) + choke me + #else + $ac_func(); + #endif + + ; return 0; } + EOF + if { (eval echo configure:5959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" + fi + rm -f conftest* + fi + + if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h < conftest.$ac_ext < + EOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "usleep" >/dev/null 2>&1; then + rm -rf conftest* + + cat >> confdefs.h <<\EOF + #define HAVE_USLEEP_DECL 1 + EOF + + fi + rm -f conftest* + + else + echo "$ac_t""no" 1>&6 + fi + done + + # Look for these functions in the thread library, but only bother # if using POSIX threads. if test "$THREADS" = posix; then *************** done *** 4704,4715 **** for ac_func in pthread_mutexattr_settype pthread_mutexattr_setkind_np do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:4708: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:6010: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 6034,6040 ---- ; return 0; } EOF ! if { (eval echo configure:6038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** done *** 4762,4773 **** for ac_func in sched_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:4766: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:6068: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 6092,6098 ---- ; return 0; } EOF ! if { (eval echo configure:6096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** EOF *** 4812,4818 **** else echo "$ac_t""no" 1>&6 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6 ! echo "configure:4816: checking for sched_yield in -lrt" >&5 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 6114,6120 ---- else echo "$ac_t""no" 1>&6 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6 ! echo "configure:6118: checking for sched_yield in -lrt" >&5 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** else *** 4820,4826 **** ac_save_LIBS="$LIBS" LIBS="-lrt $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else --- 6133,6139 ---- sched_yield() ; return 0; } EOF ! if { (eval echo configure:6137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else *************** else *** 4857,4863 **** echo "$ac_t""no" 1>&6 echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6 ! echo "configure:4861: checking for sched_yield in -lposix4" >&5 ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 6159,6165 ---- echo "$ac_t""no" 1>&6 echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6 ! echo "configure:6163: checking for sched_yield in -lposix4" >&5 ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** else *** 4865,4871 **** ac_save_LIBS="$LIBS" LIBS="-lposix4 $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else --- 6178,6184 ---- sched_yield() ; return 0; } EOF ! if { (eval echo configure:6182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else *************** done *** 4912,4918 **** # We can save a little space at runtime if the mutex has m_count # or __m_count. This is a nice hack for Linux. cat > conftest.$ac_ext < int main() { --- 6214,6220 ---- # We can save a little space at runtime if the mutex has m_count # or __m_count. This is a nice hack for Linux. cat > conftest.$ac_ext < int main() { *************** int main() { *** 4921,4927 **** ; return 0; } EOF ! if { (eval echo configure:4925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define PTHREAD_MUTEX_HAVE_M_COUNT 1 --- 6223,6229 ---- ; return 0; } EOF ! if { (eval echo configure:6227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define PTHREAD_MUTEX_HAVE_M_COUNT 1 *************** else *** 4933,4939 **** rm -rf conftest* cat > conftest.$ac_ext < int main() { --- 6235,6241 ---- rm -rf conftest* cat > conftest.$ac_ext < int main() { *************** int main() { *** 4942,4948 **** ; return 0; } EOF ! if { (eval echo configure:4946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define PTHREAD_MUTEX_HAVE___M_COUNT 1 --- 6244,6250 ---- ; return 0; } EOF ! if { (eval echo configure:6248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define PTHREAD_MUTEX_HAVE___M_COUNT 1 *************** rm -f conftest* *** 4962,4973 **** for ac_func in gettimeofday time ftime do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:4966: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:6268: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 6292,6298 ---- ; return 0; } EOF ! if { (eval echo configure:6296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** done *** 5021,5032 **** for ac_func in memmove do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:5025: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:6327: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 6351,6357 ---- ; return 0; } EOF ! if { (eval echo configure:6355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** done *** 5079,5090 **** for ac_func in memcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:5083: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:6385: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 6409,6415 ---- ; return 0; } EOF ! if { (eval echo configure:6413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** done *** 5136,5142 **** fi echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 ! echo "configure:5140: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 6438,6444 ---- fi echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 ! echo "configure:6442: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** else *** 5144,5150 **** ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else --- 6457,6463 ---- dlopen() ; return 0; } EOF ! if { (eval echo configure:6461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else *************** fi *** 5200,5206 **** #-------------------------------------------------------------------- echo $ac_n "checking for socket libraries""... $ac_c" 1>&6 ! echo "configure:5204: checking for socket libraries" >&5 if eval "test \"`echo '$''{'gcj_cv_lib_sockets'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 6502,6508 ---- #-------------------------------------------------------------------- echo $ac_n "checking for socket libraries""... $ac_c" 1>&6 ! echo "configure:6506: checking for socket libraries" >&5 if eval "test \"`echo '$''{'gcj_cv_lib_sockets'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 5208,5219 **** gcj_checkBoth=0 unset ac_cv_func_connect echo $ac_n "checking for connect""... $ac_c" 1>&6 ! echo "configure:5212: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:6514: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else --- 6538,6544 ---- ; return 0; } EOF ! if { (eval echo configure:6542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else *************** fi *** 5259,5265 **** if test "$gcj_checkSocket" = 1; then unset ac_cv_func_connect echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 ! echo "configure:5263: checking for main in -lsocket" >&5 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 6561,6567 ---- if test "$gcj_checkSocket" = 1; then unset ac_cv_func_connect echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 ! echo "configure:6565: checking for main in -lsocket" >&5 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** else *** 5267,5280 **** ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else --- 6569,6582 ---- ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else *************** fi *** 5301,5312 **** LIBS="$LIBS -lsocket -lnsl" unset ac_cv_func_accept echo $ac_n "checking for accept""... $ac_c" 1>&6 ! echo "configure:5305: checking for accept" >&5 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:6607: checking for accept" >&5 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_accept=yes" else --- 6631,6637 ---- ; return 0; } EOF ! if { (eval echo configure:6635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_accept=yes" else *************** fi *** 5356,5367 **** gcj_oldLibs=$LIBS LIBS="$LIBS $gcj_cv_lib_sockets" echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 ! echo "configure:5360: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:6662: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else --- 6686,6692 ---- ; return 0; } EOF ! if { (eval echo configure:6690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else *************** if eval "test \"`echo '$ac_cv_func_'geth *** 5402,5408 **** else echo "$ac_t""no" 1>&6 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 ! echo "configure:5406: checking for main in -lnsl" >&5 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 6704,6710 ---- else echo "$ac_t""no" 1>&6 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 ! echo "configure:6708: checking for main in -lnsl" >&5 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** else *** 5410,5423 **** ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else --- 6712,6725 ---- ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else *************** echo "$ac_t""$gcj_cv_lib_sockets" 1>&6 *** 5449,5455 **** if test "$with_system_zlib" = yes; then echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6 ! echo "configure:5453: checking for deflate in -lz" >&5 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 6751,6757 ---- if test "$with_system_zlib" = yes; then echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6 ! echo "configure:6755: checking for deflate in -lz" >&5 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** else *** 5457,5463 **** ac_save_LIBS="$LIBS" LIBS="-lz $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else --- 6770,6776 ---- deflate() ; return 0; } EOF ! if { (eval echo configure:6774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else *************** fi *** 5491,5501 **** fi # On Solaris, and maybe other architectures, the Boehm collector # requires -ldl. if test "$GC" = boehm; then echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6 ! echo "configure:5499: checking for main in -ldl" >&5 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 6793,7611 ---- fi + # Test for Gtk stuff, if asked for. + if test "$use_gtk_awt" = yes; then + # Check whether --enable-gtktest or --disable-gtktest was given. + if test "${enable_gtktest+set}" = set; then + enableval="$enable_gtktest" + : + else + enable_gtktest=yes + fi + + + pkg_config_args=gtk+-2.0 + for module in . + do + case "$module" in + gthread) + pkg_config_args="$pkg_config_args gthread-2.0" + ;; + esac + done + + no_gtk="" + + # Extract the first word of "pkg-config", so it can be a program name with args. + set dummy pkg-config; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 + echo "configure:6823: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + case "$PKG_CONFIG" in + /*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; + esac + fi + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" + if test -n "$PKG_CONFIG"; then + echo "$ac_t""$PKG_CONFIG" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + + if test x$PKG_CONFIG != xno ; then + if pkg-config --atleast-pkgconfig-version 0.7 ; then + : + else + echo *** pkg-config too old; version 0.7 or better required. + no_gtk=yes + PKG_CONFIG=no + fi + else + no_gtk=yes + fi + + min_gtk_version=2.2.0 + echo $ac_n "checking for GTK+ - version >= $min_gtk_version""... $ac_c" 1>&6 + echo "configure:6871: checking for GTK+ - version >= $min_gtk_version" >&5 + + if test x$PKG_CONFIG != xno ; then + ## don't try to run the test against uninstalled libtool libs + if $PKG_CONFIG --uninstalled $pkg_config_args; then + echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH" + enable_gtktest=no + fi + + if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then + : + else + no_gtk=yes + fi + fi + + if test x"$no_gtk" = x ; then + GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags` + GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs` + gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` + if test "x$enable_gtktest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$GTK_LIBS $LIBS" + rm -f conf.gtktest + if test "$cross_compiling" = yes; then + echo $ac_n "cross compiling; assumed OK... $ac_c" + else + cat > conftest.$ac_ext < + #include + #include + + int + main () + { + int major, minor, micro; + char *tmp_version; + + system ("touch conf.gtktest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_gtk_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_gtk_version"); + exit(1); + } + + if ((gtk_major_version != $gtk_config_major_version) || + (gtk_minor_version != $gtk_config_minor_version) || + (gtk_micro_version != $gtk_config_micro_version)) + { + printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", + $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf ("*** was found! If pkg-config was correct, then it is best\n"); + printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); + printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); + printf("*** required on your system.\n"); + printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); + printf("*** to point to the correct configuration files\n"); + } + else if ((gtk_major_version != GTK_MAJOR_VERSION) || + (gtk_minor_version != GTK_MINOR_VERSION) || + (gtk_micro_version != GTK_MICRO_VERSION)) + { + printf("*** GTK+ header files (version %d.%d.%d) do not match\n", + GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); + printf("*** library (version %d.%d.%d)\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + } + else + { + if ((gtk_major_version > major) || + ((gtk_major_version == major) && (gtk_minor_version > minor)) || + ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n"); + printf("*** correct copy of pkg-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + } + return 1; + } + + EOF + if { (eval echo configure:6981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + : + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + no_gtk=yes + fi + rm -fr conftest* + fi + + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_gtk" = x ; then + echo "$ac_t""yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)" 1>&6 + : + else + echo "$ac_t""no" 1>&6 + if test "$PKG_CONFIG" = "no" ; then + echo "*** A new enough version of pkg-config was not found." + echo "*** See http://pkgconfig.sourceforge.net" + else + if test -f conf.gtktest ; then + : + else + echo "*** Could not run GTK+ test program, checking why..." + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$LIBS $GTK_LIBS" + cat > conftest.$ac_ext < + #include + + int main() { + return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); + ; return 0; } + EOF + if { (eval echo configure:7025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GTK+ or finding the wrong" + echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GTK+ is incorrectly installed." + fi + rm -f conftest* + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GTK_CFLAGS="" + GTK_LIBS="" + exit 1 + fi + + + rm -f conf.gtktest + + # Check whether --enable-glibtest or --disable-glibtest was given. + if test "${enable_glibtest+set}" = set; then + enableval="$enable_glibtest" + : + else + enable_glibtest=yes + fi + + + pkg_config_args=glib-2.0 + for module in . gthread + do + case "$module" in + gmodule) + pkg_config_args="$pkg_config_args gmodule-2.0" + ;; + gobject) + pkg_config_args="$pkg_config_args gobject-2.0" + ;; + gthread) + pkg_config_args="$pkg_config_args gthread-2.0" + ;; + esac + done + + # Extract the first word of "pkg-config", so it can be a program name with args. + set dummy pkg-config; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 + echo "configure:7084: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + case "$PKG_CONFIG" in + /*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; + esac + fi + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" + if test -n "$PKG_CONFIG"; then + echo "$ac_t""$PKG_CONFIG" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + + no_glib="" + + if test x$PKG_CONFIG != xno ; then + if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then + : + else + echo *** pkg-config too old; version 0.7 or better required. + no_glib=yes + PKG_CONFIG=no + fi + else + no_glib=yes + fi + + min_glib_version=2.2.0 + echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6 + echo "configure:7134: checking for GLIB - version >= $min_glib_version" >&5 + + if test x$PKG_CONFIG != xno ; then + ## don't try to run the test against uninstalled libtool libs + if $PKG_CONFIG --uninstalled $pkg_config_args; then + echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH" + enable_glibtest=no + fi + + if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then + : + else + no_glib=yes + fi + fi + + if test x"$no_glib" = x ; then + GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` + GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0` + GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` + + GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args` + GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args` + glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` + if test "x$enable_glibtest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GLIB_CFLAGS" + LIBS="$GLIB_LIBS $LIBS" + rm -f conf.glibtest + if test "$cross_compiling" = yes; then + echo $ac_n "cross compiling; assumed OK... $ac_c" + else + cat > conftest.$ac_ext < + #include + #include + + int + main () + { + int major, minor, micro; + char *tmp_version; + + system ("touch conf.glibtest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_glib_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_glib_version"); + exit(1); + } + + if ((glib_major_version != $glib_config_major_version) || + (glib_minor_version != $glib_config_minor_version) || + (glib_micro_version != $glib_config_micro_version)) + { + printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", + $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, + glib_major_version, glib_minor_version, glib_micro_version); + printf ("*** was found! If pkg-config was correct, then it is best\n"); + printf ("*** to remove the old version of GLib. You may also be able to fix the error\n"); + printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); + printf("*** required on your system.\n"); + printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); + printf("*** to point to the correct configuration files\n"); + } + else if ((glib_major_version != GLIB_MAJOR_VERSION) || + (glib_minor_version != GLIB_MINOR_VERSION) || + (glib_micro_version != GLIB_MICRO_VERSION)) + { + printf("*** GLIB header files (version %d.%d.%d) do not match\n", + GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); + printf("*** library (version %d.%d.%d)\n", + glib_major_version, glib_minor_version, glib_micro_version); + } + else + { + if ((glib_major_version > major) || + ((glib_major_version == major) && (glib_minor_version > minor)) || + ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", + glib_major_version, glib_minor_version, glib_micro_version); + printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n"); + printf("*** correct copy of pkg-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + } + return 1; + } + + EOF + if { (eval echo configure:7248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + : + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + no_glib=yes + fi + rm -fr conftest* + fi + + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_glib" = x ; then + echo "$ac_t""yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" 1>&6 + : + else + echo "$ac_t""no" 1>&6 + if test "$PKG_CONFIG" = "no" ; then + echo "*** A new enough version of pkg-config was not found." + echo "*** See http://www.freedesktop.org/software/pkgconfig/" + else + if test -f conf.glibtest ; then + : + else + echo "*** Could not run GLIB test program, checking why..." + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GLIB_CFLAGS" + LIBS="$LIBS $GLIB_LIBS" + cat > conftest.$ac_ext < + #include + + int main() { + return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); + ; return 0; } + EOF + if { (eval echo configure:7292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GLIB or finding the wrong" + echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GLIB is incorrectly installed." + fi + rm -f conftest* + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GLIB_CFLAGS="" + GLIB_LIBS="" + GLIB_GENMARSHAL="" + GOBJECT_QUERY="" + GLIB_MKENUMS="" + exit 1 + fi + + + + + + rm -f conf.glibtest + + enable_libarttest=no + # Check whether --with-libart-prefix or --without-libart-prefix was given. + if test "${with_libart_prefix+set}" = set; then + withval="$with_libart_prefix" + libart_prefix="$withval" + else + libart_prefix="" + fi + + # Check whether --with-libart-exec-prefix or --without-libart-exec-prefix was given. + if test "${with_libart_exec_prefix+set}" = set; then + withval="$with_libart_exec_prefix" + libart_exec_prefix="$withval" + else + libart_exec_prefix="" + fi + + # Check whether --enable-libarttest or --disable-libarttest was given. + if test "${enable_libarttest+set}" = set; then + enableval="$enable_libarttest" + : + else + enable_libarttest=yes + fi + + + if test x$libart_exec_prefix != x ; then + libart_args="$libart_args --exec-prefix=$libart_exec_prefix" + if test x${LIBART_CONFIG+set} != xset ; then + LIBART_CONFIG=$libart_exec_prefix/bin/libart-config + fi + fi + if test x$libart_prefix != x ; then + libart_args="$libart_args --prefix=$libart_prefix" + if test x${LIBART_CONFIG+set} != xset ; then + LIBART_CONFIG=$libart_prefix/bin/libart-config + fi + fi + + # Extract the first word of "libart2-config", so it can be a program name with args. + set dummy libart2-config; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 + echo "configure:7371: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_LIBART_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + case "$LIBART_CONFIG" in + /*) + ac_cv_path_LIBART_CONFIG="$LIBART_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_LIBART_CONFIG="$LIBART_CONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_LIBART_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_LIBART_CONFIG" && ac_cv_path_LIBART_CONFIG="no" + ;; + esac + fi + LIBART_CONFIG="$ac_cv_path_LIBART_CONFIG" + if test -n "$LIBART_CONFIG"; then + echo "$ac_t""$LIBART_CONFIG" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + if test "$LIBART_CONFIG" = "no" ; then + # Extract the first word of "libart-config", so it can be a program name with args. + set dummy libart-config; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 + echo "configure:7408: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_LIBART_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + case "$LIBART_CONFIG" in + /*) + ac_cv_path_LIBART_CONFIG="$LIBART_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_LIBART_CONFIG="$LIBART_CONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_LIBART_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_LIBART_CONFIG" && ac_cv_path_LIBART_CONFIG="no" + ;; + esac + fi + LIBART_CONFIG="$ac_cv_path_LIBART_CONFIG" + if test -n "$LIBART_CONFIG"; then + echo "$ac_t""$LIBART_CONFIG" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + fi + min_libart_version=2.1.0 + echo $ac_n "checking for LIBART - version >= $min_libart_version""... $ac_c" 1>&6 + echo "configure:7444: checking for LIBART - version >= $min_libart_version" >&5 + no_libart="" + if test "$LIBART_CONFIG" = "no" ; then + no_libart=yes + else + LIBART_CFLAGS=`$LIBART_CONFIG $libartconf_args --cflags` + LIBART_LIBS=`$LIBART_CONFIG $libartconf_args --libs` + + libart_major_version=`$LIBART_CONFIG $libart_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + libart_minor_version=`$LIBART_CONFIG $libart_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + libart_micro_version=`$LIBART_CONFIG $libart_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` + if test "x$enable_libarttest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $LIBART_CFLAGS" + LIBS="$LIBS $LIBART_LIBS" + rm -f conf.libarttest + if test "$cross_compiling" = yes; then + echo $ac_n "cross compiling; assumed OK... $ac_c" + else + cat > conftest.$ac_ext < + #include + #include + #include + + char* + my_strdup (char *str) + { + char *new_str; + + if (str) + { + new_str = malloc ((strlen (str) + 1) * sizeof(char)); + strcpy (new_str, str); + } + else + new_str = NULL; + + return new_str; + } + + int main () + { + int major, minor, micro; + char *tmp_version; + + system ("touch conf.libarttest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = my_strdup("$min_libart_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_libart_version"); + exit(1); + } + + if (($libart_major_version > major) || + (($libart_major_version == major) && ($libart_minor_version > minor)) || + (($libart_major_version == major) && ($libart_minor_version == minor) && ($libart_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** 'libart-config --version' returned %d.%d.%d, but the minimum version\n", $libart_major_version, $libart_minor_version, $libart_micro_version); + printf("*** of LIBART required is %d.%d.%d. If libart-config is correct, then it is\n", major, minor, micro); + printf("*** best to upgrade to the required version.\n"); + printf("*** If libart-config was wrong, set the environment variable LIBART_CONFIG\n"); + printf("*** to point to the correct copy of libart-config, and remove the file\n"); + printf("*** config.cache before re-running configure\n"); + return 1; + } + } + + + EOF + if { (eval echo configure:7526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + : + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + no_libart=yes + fi + rm -fr conftest* + fi + + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_libart" = x ; then + echo "$ac_t""yes" 1>&6 + : + else + echo "$ac_t""no" 1>&6 + if test "$LIBART_CONFIG" = "no" ; then + echo "*** The libart-config script installed by LIBART could not be found" + echo "*** If LIBART was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the LIBART_CONFIG environment variable to the" + echo "*** full path to libart-config." + else + if test -f conf.libarttest ; then + : + else + echo "*** Could not run LIBART test program, checking why..." + CFLAGS="$CFLAGS $LIBART_CFLAGS" + LIBS="$LIBS $LIBART_LIBS" + cat > conftest.$ac_ext < + #include + + int main() { + return 0; + ; return 0; } + EOF + if { (eval echo configure:7570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding LIBART or finding the wrong" + echo "*** version of LIBART. If it is not finding LIBART, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means LIBART was incorrectly installed" + echo "*** or that you have moved LIBART since it was installed. In the latter case, you" + echo "*** may want to edit the libart-config script: $LIBART_CONFIG" + fi + rm -f conftest* + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + LIBART_CFLAGS="" + LIBART_LIBS="" + exit 1 + fi + + + rm -f conf.libarttest + + fi + # On Solaris, and maybe other architectures, the Boehm collector # requires -ldl. if test "$GC" = boehm; then echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6 ! echo "configure:7609: checking for main in -ldl" >&5 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** else *** 5503,5516 **** ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else --- 7613,7626 ---- ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else *************** else *** 5531,5553 **** fi fi ! if test -z "${with_multisubdir}"; then ! builddotdot=. ! else ! builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'` ! fi ! if test -x "${builddotdot}/../../gcc/gcj"; then ! dir="`cd ${builddotdot}/../../gcc && ${PWDCMD-pwd}`" ! GCJ="$dir/gcj -B`${PWDCMD-pwd}`/ -B$dir/" ! else CANADIAN=yes NULL_TARGET=yes GCJ="gcj -B`${PWDCMD-pwd}`/" ! fi ! fi # Create it, so that compile/link tests don't fail test -f libgcj.spec || touch libgcj.spec --- 7641,7717 ---- fi fi + fi ! if test -z "${with_multisubdir}"; then ! builddotdot=. ! else ! builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'` ! fi ! ! # Which gcj do we use? ! which_gcj=default ! built_gcc_dir="`cd ${builddotdot}/../../gcc && ${PWDCMD-pwd}`" ! if test -n "${with_cross_host}"; then ! # We are being configured with a cross compiler. We can't ! # use ac_exeext, because that is for the target platform. ! NATIVE=no ! cross_host_exeext= ! case "${with_cross_host}" in ! *mingw* | *cygwin*) ! cross_host_exeext=.exe ! ;; ! esac ! if test -x "${built_gcc_dir}/gcj${cross_host_exeext}"; then ! if test x"$build_alias" = x"$with_cross_host"; then ! # Ordinary cross (host!=target and host=build) ! which_gcj=built ! else ! # Canadian cross (host!=target and host!=build) ! which_gcj=cross ! fi ! else ! which_gcj=cross ! fi ! else ! # We are being configured with a native or crossed-native compiler ! if test -x "${built_gcc_dir}/gcj${ac_exeext}"; then ! if test x"$build" = x"$host"; then ! # True native build (host=target and host=build) ! which_gcj=built ! else ! # Crossed-native build (host=target and host!=build) ! which_gcj=cross ! fi ! else ! which_gcj=path ! fi ! fi ! case "${which_gcj}" in ! built) ! GCJ="$built_gcc_dir/gcj -B`${PWDCMD-pwd}`/ -B$built_gcc_dir/" ! ;; ! cross) ! # See the comment in Makefile.am about CANADIAN being a misnomer ! CANADIAN=yes ! NULL_TARGET=no ! if test "x${with_newlib}" = "xyes"; then ! # FIXME (comment): Why is this needed? ! GCC_UNWIND_INCLUDE= ! GCJ="${target_alias}-gcj" ! else ! GCJ="${target_alias}-gcj -B`${PWDCMD-pwd}`/" ! fi ! ;; ! path) ! # See the comment in Makefile.am about CANADIAN being a misnomer CANADIAN=yes NULL_TARGET=yes GCJ="gcj -B`${PWDCMD-pwd}`/" ! ;; ! esac # Create it, so that compile/link tests don't fail test -f libgcj.spec || touch libgcj.spec *************** CPPFLAGS="$CPPFLAGS -I`${PWDCMD-pwd}` -I *** 5562,5568 **** if test ! -f gnu/classpath/Configuration.java; then test -d gnu || mkdir gnu test -d gnu/classpath || mkdir gnu/classpath ! sed 's,@LIBGCJDEBUG@,$LIBGCJDEBUG,' \ < $srcdir/gnu/classpath/Configuration.java.in \ > gnu/classpath/Configuration.java # We do not want to redirect the output of the grep below to /dev/null, --- 7726,7733 ---- if test ! -f gnu/classpath/Configuration.java; then test -d gnu || mkdir gnu test -d gnu/classpath || mkdir gnu/classpath ! sed -e 's,@LIBGCJDEBUG@,$LIBGCJDEBUG,' \ ! -e 's,@TOOLKIT@,$TOOLKIT,' \ < $srcdir/gnu/classpath/Configuration.java.in \ > gnu/classpath/Configuration.java # We do not want to redirect the output of the grep below to /dev/null, *************** fi *** 5576,5582 **** # Extract the first word of "${ac_tool_prefix}gcj", so it can be a program name with args. set dummy ${ac_tool_prefix}gcj; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:5580: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 7741,7747 ---- # Extract the first word of "${ac_tool_prefix}gcj", so it can be a program name with args. set dummy ${ac_tool_prefix}gcj; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:7745: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** if test -n "$ac_tool_prefix"; then *** 5608,5614 **** # Extract the first word of "gcj", so it can be a program name with args. set dummy gcj; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:5612: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 7773,7779 ---- # Extract the first word of "gcj", so it can be a program name with args. set dummy gcj; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:7777: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** exec 5>>./config.log *** 5670,5682 **** CPPFLAGS=$GCJ_SAVE_CPPFLAGS echo $ac_n "checking size of void *""... $ac_c" 1>&6 ! echo "configure:5674: checking size of void *" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < --- 7835,7847 ---- CPPFLAGS=$GCJ_SAVE_CPPFLAGS echo $ac_n "checking size of void *""... $ac_c" 1>&6 ! echo "configure:7839: checking size of void *" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < *************** int main() { *** 5686,5692 **** switch (0) case 0: case (sizeof (void *) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:5690: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_void_p=$ac_size else --- 7851,7857 ---- switch (0) case 0: case (sizeof (void *) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:7855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_void_p=$ac_size else *************** else *** 5775,5781 **** toolexecdir='$(libdir)/gcc-lib/$(target_alias)' toolexecmainlibdir='$(libdir)' fi ! toolexeclibdir=$toolexecmainlibdir/`$CC -print-multi-os-directory` --- 7940,7950 ---- toolexecdir='$(libdir)/gcc-lib/$(target_alias)' toolexecmainlibdir='$(libdir)' fi ! multi_os_directory=`$CC -print-multi-os-directory` ! case $multi_os_directory in ! .) toolexeclibdir=$toolexecmainlibdir ;; # Avoid trailing /. ! *) toolexeclibdir=$toolexecmainlibdir/$multi_os_directory ;; ! esac *************** cat >> confdefs.h <&6 - echo "configure:5796: checking for g++ -ffloat-store bug" >&5 - save_CFLAGS="$CFLAGS" - CFLAGS="-x c++ -O2 -ffloat-store" - cat > conftest.$ac_ext < - int main() { - - ; return 0; } - EOF - if { (eval echo configure:5807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""no" 1>&6 - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - cat >> confdefs.h <<\EOF - #define __NO_MATH_INLINES 1 - EOF - - echo "$ac_t""yes" 1>&6 - fi - rm -f conftest* - CFLAGS="$save_CFLAGS" - for ac_hdr in unistd.h bstring.h sys/time.h sys/types.h fcntl.h sys/ioctl.h sys/filio.h sys/stat.h sys/select.h sys/socket.h netinet/in.h arpa/inet.h netdb.h net/if.h pwd.h sys/config.h stdint.h langinfo.h locale.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:5827: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:5837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* --- 7960,7980 ---- EOF for ac_hdr in unistd.h bstring.h sys/time.h sys/types.h fcntl.h sys/ioctl.h sys/filio.h sys/stat.h sys/select.h sys/socket.h netinet/in.h arpa/inet.h netdb.h net/if.h pwd.h sys/config.h stdint.h langinfo.h locale.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:7968: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:7978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* *************** for ac_hdr in dirent.h *** 5863,5879 **** do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:5867: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:5877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* --- 8004,8020 ---- do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:8008: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:8018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* *************** for ac_hdr in inttypes.h *** 5903,5919 **** do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:5907: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:5917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* --- 8044,8060 ---- do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:8048: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:8058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* *************** fi *** 5949,5960 **** done echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 ! echo "configure:5953: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include --- 8090,8101 ---- done echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 ! echo "configure:8094: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include *************** wait (&s); *** 5970,5976 **** s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF ! if { (eval echo configure:5974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else --- 8111,8117 ---- s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF ! if { (eval echo configure:8115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else *************** fi *** 5992,6003 **** echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 ! echo "configure:5996: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include --- 8133,8144 ---- echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 ! echo "configure:8137: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include *************** else *** 6005,6011 **** #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:6009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* --- 8146,8152 ---- #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:8150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* *************** rm -f conftest* *** 6022,6028 **** if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF --- 8163,8169 ---- if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF *************** fi *** 6040,6046 **** if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF --- 8181,8187 ---- if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF *************** if test "$cross_compiling" = yes; then *** 6061,6067 **** : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') --- 8202,8208 ---- : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') *************** if (XOR (islower (i), ISLOWER (i)) || to *** 6072,6078 **** exit (0); } EOF ! if { (eval echo configure:6076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else --- 8213,8219 ---- exit (0); } EOF ! if { (eval echo configure:8217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else *************** EOF *** 6096,6107 **** fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 ! echo "configure:6100: checking for ssize_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS --- 8237,8248 ---- fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 ! echo "configure:8241: checking for ssize_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS *************** fi *** 6130,6138 **** echo $ac_n "checking for in_addr_t""... $ac_c" 1>&6 ! echo "configure:6134: checking for in_addr_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS --- 8271,8279 ---- echo $ac_n "checking for in_addr_t""... $ac_c" 1>&6 ! echo "configure:8275: checking for in_addr_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS *************** int main() { *** 6146,6152 **** in_addr_t foo; ; return 0; } EOF ! if { (eval echo configure:6150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_IN_ADDR_T 1 --- 8287,8293 ---- in_addr_t foo; ; return 0; } EOF ! if { (eval echo configure:8291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_IN_ADDR_T 1 *************** fi *** 6162,6177 **** rm -f conftest* echo $ac_n "checking whether struct ip_mreq is in netinet/in.h""... $ac_c" 1>&6 ! echo "configure:6166: checking whether struct ip_mreq is in netinet/in.h" >&5 cat > conftest.$ac_ext < int main() { struct ip_mreq mreq; ; return 0; } EOF ! if { (eval echo configure:6175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_STRUCT_IP_MREQ 1 --- 8303,8318 ---- rm -f conftest* echo $ac_n "checking whether struct ip_mreq is in netinet/in.h""... $ac_c" 1>&6 ! echo "configure:8307: checking whether struct ip_mreq is in netinet/in.h" >&5 cat > conftest.$ac_ext < int main() { struct ip_mreq mreq; ; return 0; } EOF ! if { (eval echo configure:8316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_STRUCT_IP_MREQ 1 *************** fi *** 6187,6202 **** rm -f conftest* echo $ac_n "checking whether struct ipv6_mreq is in netinet/in.h""... $ac_c" 1>&6 ! echo "configure:6191: checking whether struct ipv6_mreq is in netinet/in.h" >&5 cat > conftest.$ac_ext < int main() { struct ipv6_mreq mreq6; ; return 0; } EOF ! if { (eval echo configure:6200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_STRUCT_IPV6_MREQ 1 --- 8328,8343 ---- rm -f conftest* echo $ac_n "checking whether struct ipv6_mreq is in netinet/in.h""... $ac_c" 1>&6 ! echo "configure:8332: checking whether struct ipv6_mreq is in netinet/in.h" >&5 cat > conftest.$ac_ext < int main() { struct ipv6_mreq mreq6; ; return 0; } EOF ! if { (eval echo configure:8341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_STRUCT_IPV6_MREQ 1 *************** fi *** 6212,6227 **** rm -f conftest* echo $ac_n "checking whether struct sockaddr_in6 is in netinet/in.h""... $ac_c" 1>&6 ! echo "configure:6216: checking whether struct sockaddr_in6 is in netinet/in.h" >&5 cat > conftest.$ac_ext < int main() { struct sockaddr_in6 addr6; ; return 0; } EOF ! if { (eval echo configure:6225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_INET6 1 --- 8353,8368 ---- rm -f conftest* echo $ac_n "checking whether struct sockaddr_in6 is in netinet/in.h""... $ac_c" 1>&6 ! echo "configure:8357: checking whether struct sockaddr_in6 is in netinet/in.h" >&5 cat > conftest.$ac_ext < int main() { struct sockaddr_in6 addr6; ; return 0; } EOF ! if { (eval echo configure:8366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_INET6 1 *************** fi *** 6237,6245 **** rm -f conftest* echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6 ! echo "configure:6241: checking for socklen_t in sys/socket.h" >&5 cat > conftest.$ac_ext < --- 8378,8386 ---- rm -f conftest* echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6 ! echo "configure:8382: checking for socklen_t in sys/socket.h" >&5 cat > conftest.$ac_ext < *************** int main() { *** 6248,6254 **** socklen_t x = 5; ; return 0; } EOF ! if { (eval echo configure:6252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_SOCKLEN_T 1 --- 8389,8395 ---- socklen_t x = 5; ; return 0; } EOF ! if { (eval echo configure:8393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_SOCKLEN_T 1 *************** fi *** 6264,6279 **** rm -f conftest* echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6 ! echo "configure:6268: checking for tm_gmtoff in struct tm" >&5 cat > conftest.$ac_ext < int main() { struct tm tim; tim.tm_gmtoff = 0; ; return 0; } EOF ! if { (eval echo configure:6277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define STRUCT_TM_HAS_GMTOFF 1 --- 8405,8420 ---- rm -f conftest* echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6 ! echo "configure:8409: checking for tm_gmtoff in struct tm" >&5 cat > conftest.$ac_ext < int main() { struct tm tim; tim.tm_gmtoff = 0; ; return 0; } EOF ! if { (eval echo configure:8418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define STRUCT_TM_HAS_GMTOFF 1 *************** else *** 6286,6301 **** rm -rf conftest* echo "$ac_t""no" 1>&6 echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6 ! echo "configure:6290: checking for global timezone variable" >&5 cat > conftest.$ac_ext < int main() { void i(){long z2 = 2*timezone;} ; return 0; } EOF ! if { (eval echo configure:6299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_TIMEZONE 1 --- 8427,8442 ---- rm -rf conftest* echo "$ac_t""no" 1>&6 echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6 ! echo "configure:8431: checking for global timezone variable" >&5 cat > conftest.$ac_ext < int main() { void i(){long z2 = 2*timezone;} ; return 0; } EOF ! if { (eval echo configure:8440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_TIMEZONE 1 *************** else *** 6308,6323 **** rm -rf conftest* echo "$ac_t""no" 1>&6 echo $ac_n "checking for global _timezone variable""... $ac_c" 1>&6 ! echo "configure:6312: checking for global _timezone variable" >&5 cat > conftest.$ac_ext < int main() { long z2 = _timezone; ; return 0; } EOF ! if { (eval echo configure:6321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_UNDERSCORE_TIMEZONE 1 --- 8449,8464 ---- rm -rf conftest* echo "$ac_t""no" 1>&6 echo $ac_n "checking for global _timezone variable""... $ac_c" 1>&6 ! echo "configure:8453: checking for global _timezone variable" >&5 cat > conftest.$ac_ext < int main() { long z2 = _timezone; ; return 0; } EOF ! if { (eval echo configure:8462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_UNDERSCORE_TIMEZONE 1 *************** rm -f conftest* *** 6339,6357 **** # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 ! echo "configure:6343: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF ! if { (eval echo configure:6355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else --- 8480,8498 ---- # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 ! echo "configure:8484: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF ! if { (eval echo configure:8496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else *************** EOF *** 6372,6383 **** fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 ! echo "configure:6376: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:8517: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else --- 8546,8552 ---- char *p = (char *) alloca(1); ; return 0; } EOF ! if { (eval echo configure:8550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else *************** EOF *** 6437,6448 **** echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 ! echo "configure:6441: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:8582: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 *** 6467,6478 **** if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:6471: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:8612: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 8636,8642 ---- ; return 0; } EOF ! if { (eval echo configure:8640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** done *** 6522,6528 **** fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 ! echo "configure:6526: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 8663,8669 ---- fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 ! echo "configure:8667: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 6530,6536 **** ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else --- 8690,8696 ---- exit (find_stack_direction() < 0); } EOF ! if { (eval echo configure:8694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else *************** EOF *** 6570,7565 **** fi ! ! for ac_prog in perl do ! # Extract the first word of "$ac_prog", so it can be a program name with args. ! set dummy $ac_prog; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:6580: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! if test -n "$PERL"; then ! ac_cv_prog_PERL="$PERL" # Let the user override the test. ! else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_PERL="$ac_prog" ! break ! fi ! done ! IFS="$ac_save_ifs" ! fi ! fi ! PERL="$ac_cv_prog_PERL" ! if test -n "$PERL"; then ! echo "$ac_t""$PERL" 1>&6 ! else ! echo "$ac_t""no" 1>&6 ! fi ! ! test -n "$PERL" && break ! done ! test -n "$PERL" || PERL="false" ! ! ! SYSDEP_SOURCES= ! ! case "${host}" in ! i?86-*-linux*) ! SIGNAL_HANDLER=include/i386-signal.h ! ;; ! sparc*-sun-solaris*) ! SIGNAL_HANDLER=include/sparc-signal.h ! ;; ! # ia64-*) ! # SYSDEP_SOURCES=sysdep/ia64.c ! # test -d sysdep || mkdir sysdep ! # ;; ! ia64-*-linux*) ! SIGNAL_HANDLER=include/dwarf2-signal.h ! ;; ! powerpc-*-linux*) ! SIGNAL_HANDLER=include/powerpc-signal.h ! ;; ! alpha*-*-linux*) ! SIGNAL_HANDLER=include/dwarf2-signal.h ! ;; ! s390*-*-linux*) ! SIGNAL_HANDLER=include/s390-signal.h ! ;; ! x86_64*-*-linux*) ! SIGNAL_HANDLER=include/x86_64-signal.h ! ;; ! sparc*-*-linux*) ! SIGNAL_HANDLER=include/dwarf2-signal.h ! ;; ! *mingw*) ! SIGNAL_HANDLER=include/win32-signal.h ! ;; ! *) ! SIGNAL_HANDLER=include/default-signal.h ! ;; ! esac ! ! # If we're using sjlj exceptions, forget what we just learned. ! if test "$enable_sjlj_exceptions" = yes; then ! SIGNAL_HANDLER=include/default-signal.h ! fi ! ! # Define here any compiler flags that you need in order to make backtrace() work. ! BACKTRACESPEC= ! case "${host}" in ! x86_64*-*-linux*) ! BACKTRACESPEC=-fno-omit-frame-pointer ! ;; ! esac ! ! ! ! ! ! ! if test "${multilib}" = "yes"; then ! multilib_arg="--enable-multilib" ! else ! multilib_arg= ! fi ! ! # If we find X, set shell vars x_includes and x_libraries to the ! # paths, otherwise set no_x=yes. ! # Uses ac_ vars as temps to allow command line to override cache and checks. ! # --without-x overrides everything else, but does not touch the cache. ! echo $ac_n "checking for X""... $ac_c" 1>&6 ! echo "configure:6679: checking for X" >&5 ! ! # Check whether --with-x or --without-x was given. ! if test "${with_x+set}" = set; then ! withval="$with_x" ! : ! fi ! ! # $have_x is `yes', `no', `disabled', or empty when we do not yet know. ! if test "x$with_x" = xno; then ! # The user explicitly disabled X. ! have_x=disabled ! else ! if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then ! # Both variables are already set. ! have_x=yes ! else ! if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ! # One or both of the vars are not set, and there is no cached value. ! ac_x_includes=NO ac_x_libraries=NO ! rm -fr conftestdir ! if mkdir conftestdir; then ! cd conftestdir ! # Make sure to not put "make" in the Imakefile rules, since we grep it out. ! cat > Imakefile <<'EOF' ! acfindx: ! @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' ! EOF ! if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then ! # GNU make sometimes prints "make[1]: Entering...", which would confuse us. ! eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` ! # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. ! for ac_extension in a so sl; do ! if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && ! test -f $ac_im_libdir/libX11.$ac_extension; then ! ac_im_usrlibdir=$ac_im_libdir; break ! fi ! done ! # Screen out bogus values from the imake configuration. They are ! # bogus both because they are the default anyway, and because ! # using them would break gcc on systems where it needs fixed includes. ! case "$ac_im_incroot" in ! /usr/include) ;; ! *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; ! esac ! case "$ac_im_usrlibdir" in ! /usr/lib | /lib) ;; ! *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; ! esac ! fi ! cd .. ! rm -fr conftestdir ! fi ! ! if test "$ac_x_includes" = NO; then ! # Guess where to find include files, by looking for this one X11 .h file. ! test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h ! ! # First, try using that file with no special directory specified. ! cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:6746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* ! # We can compile using X headers with no special include directory. ! ac_x_includes= else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ! # Look for the header file in a standard set of common directories. ! # Check X11 before X11Rn because it is often a symlink to the current release. ! for ac_dir in \ ! /usr/X11/include \ ! /usr/X11R6/include \ ! /usr/X11R5/include \ ! /usr/X11R4/include \ ! \ ! /usr/include/X11 \ ! /usr/include/X11R6 \ ! /usr/include/X11R5 \ ! /usr/include/X11R4 \ ! \ ! /usr/local/X11/include \ ! /usr/local/X11R6/include \ ! /usr/local/X11R5/include \ ! /usr/local/X11R4/include \ ! \ ! /usr/local/include/X11 \ ! /usr/local/include/X11R6 \ ! /usr/local/include/X11R5 \ ! /usr/local/include/X11R4 \ ! \ ! /usr/X386/include \ ! /usr/x386/include \ ! /usr/XFree86/include/X11 \ ! \ ! /usr/include \ ! /usr/local/include \ ! /usr/unsupported/include \ ! /usr/athena/include \ ! /usr/local/x11r5/include \ ! /usr/lpp/Xamples/include \ ! \ ! /usr/openwin/include \ ! /usr/openwin/share/include \ ! ; \ ! do ! if test -r "$ac_dir/$x_direct_test_include"; then ! ac_x_includes=$ac_dir ! break ! fi ! done ! fi ! rm -f conftest* ! fi # $ac_x_includes = NO ! ! if test "$ac_x_libraries" = NO; then ! # Check for the libraries. ! ! test -z "$x_direct_test_library" && x_direct_test_library=Xt ! test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc ! ! # See if we find them without any special options. ! # Don't add to $LIBS permanently. ! ac_save_LIBS="$LIBS" ! LIBS="-l$x_direct_test_library $LIBS" ! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! LIBS="$ac_save_LIBS" ! # We can link X programs with no special library path. ! ac_x_libraries= ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! LIBS="$ac_save_LIBS" ! # First see if replacing the include by lib works. ! # Check X11 before X11Rn because it is often a symlink to the current release. ! for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ ! /usr/X11/lib \ ! /usr/X11R6/lib \ ! /usr/X11R5/lib \ ! /usr/X11R4/lib \ ! \ ! /usr/lib/X11 \ ! /usr/lib/X11R6 \ ! /usr/lib/X11R5 \ ! /usr/lib/X11R4 \ ! \ ! /usr/local/X11/lib \ ! /usr/local/X11R6/lib \ ! /usr/local/X11R5/lib \ ! /usr/local/X11R4/lib \ ! \ ! /usr/local/lib/X11 \ ! /usr/local/lib/X11R6 \ ! /usr/local/lib/X11R5 \ ! /usr/local/lib/X11R4 \ ! \ ! /usr/X386/lib \ ! /usr/x386/lib \ ! /usr/XFree86/lib/X11 \ ! \ ! /usr/lib \ ! /usr/local/lib \ ! /usr/unsupported/lib \ ! /usr/athena/lib \ ! /usr/local/x11r5/lib \ ! /usr/lpp/Xamples/lib \ ! /lib/usr/lib/X11 \ ! \ ! /usr/openwin/lib \ ! /usr/openwin/share/lib \ ! ; \ ! do ! for ac_extension in a so sl; do ! if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then ! ac_x_libraries=$ac_dir ! break 2 ! fi ! done ! done ! fi ! rm -f conftest* ! fi # $ac_x_libraries = NO ! ! if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then ! # Didn't find X anywhere. Cache the known absence of X. ! ac_cv_have_x="have_x=no" ! else ! # Record where we found X for the cache. ! ac_cv_have_x="have_x=yes \ ! ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" ! fi ! fi ! fi ! eval "$ac_cv_have_x" ! fi # $with_x != no ! ! if test "$have_x" != yes; then ! echo "$ac_t""$have_x" 1>&6 ! no_x=yes ! else ! # If each of the values was on the command line, it overrides each guess. ! test "x$x_includes" = xNONE && x_includes=$ac_x_includes ! test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries ! # Update the cache value to reflect the command line values. ! ac_cv_have_x="have_x=yes \ ! ac_x_includes=$x_includes ac_x_libraries=$x_libraries" ! echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 ! fi ! ! if test "$no_x" = yes; then ! # Not all programs may use this symbol, but it does not hurt to define it. ! cat >> confdefs.h <<\EOF ! #define X_DISPLAY_MISSING 1 ! EOF ! ! X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= ! else ! if test -n "$x_includes"; then ! X_CFLAGS="$X_CFLAGS -I$x_includes" ! fi ! ! # It would also be nice to do this for all -L options, not just this one. ! if test -n "$x_libraries"; then ! X_LIBS="$X_LIBS -L$x_libraries" ! # For Solaris; some versions of Sun CC require a space after -R and ! # others require no space. Words are not sufficient . . . . ! case "`(uname -sr) 2>/dev/null`" in ! "SunOS 5"*) ! echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 ! echo "configure:6928: checking whether -R must be followed by a space" >&5 ! ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" ! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! ac_R_nospace=yes ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! ac_R_nospace=no ! fi ! rm -f conftest* ! if test $ac_R_nospace = yes; then ! echo "$ac_t""no" 1>&6 ! X_LIBS="$X_LIBS -R$x_libraries" ! else ! LIBS="$ac_xsave_LIBS -R $x_libraries" ! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! ac_R_space=yes ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! ac_R_space=no ! fi ! rm -f conftest* ! if test $ac_R_space = yes; then ! echo "$ac_t""yes" 1>&6 ! X_LIBS="$X_LIBS -R $x_libraries" ! else ! echo "$ac_t""neither works" 1>&6 ! fi ! fi ! LIBS="$ac_xsave_LIBS" ! esac ! fi ! ! # Check for system-dependent libraries X programs must link with. ! # Do this before checking for the system-independent R6 libraries ! # (-lICE), since we may need -lsocket or whatever for X linking. ! ! if test "$ISC" = yes; then ! X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" ! else ! # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X ! # libraries were built with DECnet support. And karl@cs.umb.edu says ! # the Alpha needs dnet_stub (dnet does not exist). ! echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 ! echo "configure:6993: checking for dnet_ntoa in -ldnet" >&5 ! ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` ! if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! ac_save_LIBS="$LIBS" ! LIBS="-ldnet $LIBS" ! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=yes" ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* - LIBS="$ac_save_LIBS" - fi ! if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ! X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" ! else ! echo "$ac_t""no" 1>&6 ! fi ! ! if test $ac_cv_lib_dnet_dnet_ntoa = no; then ! echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 ! echo "configure:7034: checking for dnet_ntoa in -ldnet_stub" >&5 ! ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` ! if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! ac_save_LIBS="$LIBS" ! LIBS="-ldnet_stub $LIBS" ! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=yes" ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=no" ! fi ! rm -f conftest* ! LIBS="$ac_save_LIBS" ! ! fi ! if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ! X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" else echo "$ac_t""no" 1>&6 fi ! fi ! ! # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, ! # to get the SysV transport functions. ! # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4) ! # needs -lnsl. ! # The nsl library prevents programs from opening the X display ! # on Irix 5.2, according to dickey@clark.net. ! echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 ! echo "configure:7082: checking for gethostbyname" >&5 ! if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ ! char gethostbyname(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ ! #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) choke me #else ! gethostbyname(); #endif ; return 0; } EOF ! if { (eval echo configure:7110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ! eval "ac_cv_func_gethostbyname=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ! eval "ac_cv_func_gethostbyname=no" fi rm -f conftest* fi ! if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then echo "$ac_t""yes" 1>&6 ! : ! else ! echo "$ac_t""no" 1>&6 ! fi ! ! if test $ac_cv_func_gethostbyname = no; then ! echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 ! echo "configure:7131: checking for gethostbyname in -lnsl" >&5 ! ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` ! if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! ac_save_LIBS="$LIBS" ! LIBS="-lnsl $LIBS" ! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=yes" ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=no" ! fi ! rm -f conftest* ! LIBS="$ac_save_LIBS" ! ! fi ! if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ! X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" else echo "$ac_t""no" 1>&6 fi ! fi ! ! # lieder@skyler.mavd.honeywell.com says without -lsocket, ! # socket/setsockopt and other routines are undefined under SCO ODT ! # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary ! # on later versions), says simon@lia.di.epfl.ch: it contains ! # gethostby* variants that don't use the nameserver (or something). ! # -lsocket must be given before -lnsl if both are needed. ! # We assume that if connect needs -lnsl, so does gethostbyname. ! echo $ac_n "checking for connect""... $ac_c" 1>&6 ! echo "configure:7180: checking for connect" >&5 ! if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < - /* Override any gcc2 internal prototype to avoid an error. */ - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char connect(); - - int main() { - - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_connect) || defined (__stub___connect) - choke me - #else - connect(); - #endif - - ; return 0; } - EOF - if { (eval echo configure:7208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_connect=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_connect=no" - fi - rm -f conftest* - fi - - if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - fi ! if test $ac_cv_func_connect = no; then ! echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 ! echo "configure:7229: checking for connect in -lsocket" >&5 ! ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` ! if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! ac_save_LIBS="$LIBS" ! LIBS="-lsocket $X_EXTRA_LIBS $LIBS" ! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=yes" ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=no" ! fi ! rm -f conftest* ! LIBS="$ac_save_LIBS" ! fi ! if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ! X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" ! else ! echo "$ac_t""no" 1>&6 ! fi ! fi ! # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. ! echo $ac_n "checking for remove""... $ac_c" 1>&6 ! echo "configure:7272: checking for remove" >&5 ! if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! cat > conftest.$ac_ext < ! /* Override any gcc2 internal prototype to avoid an error. */ ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char remove(); ! int main() { ! /* The GNU C library defines this for functions which it implements ! to always fail with ENOSYS. Some functions are actually named ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub_remove) || defined (__stub___remove) ! choke me #else ! remove(); #endif ! ; return 0; } ! EOF ! if { (eval echo configure:7300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! eval "ac_cv_func_remove=yes" ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_func_remove=no" ! fi ! rm -f conftest* ! fi ! ! if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ! : ! else ! echo "$ac_t""no" 1>&6 ! fi ! ! if test $ac_cv_func_remove = no; then ! echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 ! echo "configure:7321: checking for remove in -lposix" >&5 ! ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` ! if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! ac_save_LIBS="$LIBS" ! LIBS="-lposix $LIBS" ! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=yes" ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=no" ! fi ! rm -f conftest* ! LIBS="$ac_save_LIBS" ! ! fi ! if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ! X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" ! else ! echo "$ac_t""no" 1>&6 ! fi ! fi ! # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. ! echo $ac_n "checking for shmat""... $ac_c" 1>&6 ! echo "configure:7364: checking for shmat" >&5 ! if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! cat > conftest.$ac_ext < ! /* Override any gcc2 internal prototype to avoid an error. */ ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char shmat(); ! int main() { ! /* The GNU C library defines this for functions which it implements ! to always fail with ENOSYS. Some functions are actually named ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub_shmat) || defined (__stub___shmat) ! choke me ! #else ! shmat(); ! #endif - ; return 0; } EOF ! if { (eval echo configure:7392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! eval "ac_cv_func_shmat=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_func_shmat=no" fi ! rm -f conftest* fi - if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 fi ! if test $ac_cv_func_shmat = no; then ! echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 ! echo "configure:7413: checking for shmat in -lipc" >&5 ! ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` ! if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! ac_save_LIBS="$LIBS" ! LIBS="-lipc $LIBS" ! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - LIBS="$ac_save_LIBS" fi - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" - else - echo "$ac_t""no" 1>&6 - fi - fi - fi ! # Check for libraries that X11R6 Xt/Xaw programs need. ! ac_save_LDFLAGS="$LDFLAGS" ! test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" ! # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to ! # check for ICE first), but we must link in the order -lSM -lICE or ! # we get undefined symbols. So assume we have SM if we have ICE. ! # These have to be linked with before -lX11, unlike the other ! # libraries we check for below, so use a different variable. ! # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. ! echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 ! echo "configure:7465: checking for IceConnectionNumber in -lICE" >&5 ! ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` ! if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ! ac_save_LIBS="$LIBS" ! LIBS="-lICE $X_EXTRA_LIBS $LIBS" ! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=yes" else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=no" fi - rm -f conftest* - LIBS="$ac_save_LIBS" - fi ! if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ! X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" else echo "$ac_t""no" 1>&6 fi ! LDFLAGS="$ac_save_LDFLAGS" - fi ! # Check whether --enable-java-awt or --disable-java-awt was given. ! if test "${enable_java_awt+set}" = set; then ! enableval="$enable_java_awt" ! : ! fi ! peerlibs="`echo ${enable_java_awt} | tr ',' ' '`" ! use_xlib_awt="" ! use_gtk_awt="" - for peer in $peerlibs ; do - case $peer in - xlib) - if test "$no_x" = yes; then - echo "*** xlib peers requested but no X library available" 1>&2 - exit 1 - else - use_xlib_awt="yes" - fi - ;; - gtk) - # Nothing, yet... - ;; - no) - use_xlib_awt= - use_gtk_awt= - break - ;; - *) - echo "*** unrecognised argument \"${peer}\" for --enable-java-awt" 1>&2 - exit 1 - esac - done ! if test "$use_xlib_awt" = yes; then ! XLIB_AWT_TRUE= ! XLIB_AWT_FALSE='#' ! else ! XLIB_AWT_TRUE='#' ! XLIB_AWT_FALSE= fi ! if test "$use_gtk_awt" = yes; then ! GTK_AWT_TRUE= ! GTK_AWT_FALSE='#' else ! GTK_AWT_TRUE='#' ! GTK_AWT_FALSE= fi here=`${PWDCMD-pwd}` --- 8711,9097 ---- fi ! for ac_hdr in unistd.h do ! ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ! echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:8719: checking for $ac_hdr" >&5 ! if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:8729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* ! eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ! eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi ! if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ! ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` ! cat >> confdefs.h <&6 fi + done ! for ac_func in getpagesize ! do ! echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:8758: checking for $ac_func" >&5 ! if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ ! char $ac_func(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ ! #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else ! $ac_func(); #endif ; return 0; } EOF ! if { (eval echo configure:8786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ! eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ! eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi ! if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ! ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >> confdefs.h <&6 fi + done ! echo $ac_n "checking for working mmap""... $ac_c" 1>&6 ! echo "configure:8811: checking for working mmap" >&5 ! if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else + if test "$cross_compiling" = yes; then + ac_cv_func_mmap_fixed_mapped=no + else cat > conftest.$ac_ext < ! #include ! #include ! /* This mess was copied from the GNU getpagesize.h. */ ! #ifndef HAVE_GETPAGESIZE ! # ifdef HAVE_UNISTD_H ! # include ! # endif ! /* Assume that all systems that can run configure have sys/param.h. */ ! # ifndef HAVE_SYS_PARAM_H ! # define HAVE_SYS_PARAM_H 1 ! # endif ! # ifdef _SC_PAGESIZE ! # define getpagesize() sysconf(_SC_PAGESIZE) ! # else /* no _SC_PAGESIZE */ ! # ifdef HAVE_SYS_PARAM_H ! # include ! # ifdef EXEC_PAGESIZE ! # define getpagesize() EXEC_PAGESIZE ! # else /* no EXEC_PAGESIZE */ ! # ifdef NBPG ! # define getpagesize() NBPG * CLSIZE ! # ifndef CLSIZE ! # define CLSIZE 1 ! # endif /* no CLSIZE */ ! # else /* no NBPG */ ! # ifdef NBPC ! # define getpagesize() NBPC ! # else /* no NBPC */ ! # ifdef PAGESIZE ! # define getpagesize() PAGESIZE ! # endif /* PAGESIZE */ ! # endif /* no NBPC */ ! # endif /* no NBPG */ ! # endif /* no EXEC_PAGESIZE */ ! # else /* no HAVE_SYS_PARAM_H */ ! # define getpagesize() 8192 /* punt totally */ ! # endif /* no HAVE_SYS_PARAM_H */ ! # endif /* no _SC_PAGESIZE */ ! #endif /* no HAVE_GETPAGESIZE */ ! #ifdef __cplusplus ! extern "C" { void *malloc(unsigned); } #else ! char *malloc(); #endif ! int ! main() ! { ! char *data, *data2, *data3; ! int i, pagesize; ! int fd; ! pagesize = getpagesize(); ! /* ! * First, make a file with some known garbage in it. ! */ ! data = malloc(pagesize); ! if (!data) ! exit(1); ! for (i = 0; i < pagesize; ++i) ! *(data + i) = rand(); ! umask(0); ! fd = creat("conftestmmap", 0600); ! if (fd < 0) ! exit(1); ! if (write(fd, data, pagesize) != pagesize) ! exit(1); ! close(fd); ! /* ! * Next, try to mmap the file at a fixed address which ! * already has something else allocated at it. If we can, ! * also make sure that we see the same garbage. ! */ ! fd = open("conftestmmap", O_RDWR); ! if (fd < 0) ! exit(1); ! data2 = malloc(2 * pagesize); ! if (!data2) ! exit(1); ! data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); ! if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, ! MAP_PRIVATE | MAP_FIXED, fd, 0L)) ! exit(1); ! for (i = 0; i < pagesize; ++i) ! if (*(data + i) != *(data2 + i)) ! exit(1); ! /* ! * Finally, make sure that changes to the mapped area ! * do not percolate back to the file as seen by read(). ! * (This is a bug on some variants of i386 svr4.0.) ! */ ! for (i = 0; i < pagesize; ++i) ! *(data2 + i) = *(data2 + i) + 1; ! data3 = malloc(pagesize); ! if (!data3) ! exit(1); ! if (read(fd, data3, pagesize) != pagesize) ! exit(1); ! for (i = 0; i < pagesize; ++i) ! if (*(data + i) != *(data3 + i)) ! exit(1); ! close(fd); ! unlink("conftestmmap"); ! exit(0); ! } EOF ! if { (eval echo configure:8959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ! then ! ac_cv_func_mmap_fixed_mapped=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ! rm -fr conftest* ! ac_cv_func_mmap_fixed_mapped=no fi ! rm -fr conftest* fi fi ! echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 ! if test $ac_cv_func_mmap_fixed_mapped = yes; then ! cat >> confdefs.h <<\EOF ! #define HAVE_MMAP 1 EOF fi ! for ac_prog in perl ! do ! # Extract the first word of "$ac_prog", so it can be a program name with args. ! set dummy $ac_prog; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:8987: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ! if test -n "$PERL"; then ! ac_cv_prog_PERL="$PERL" # Let the user override the test. else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_PERL="$ac_prog" ! break ! fi ! done ! IFS="$ac_save_ifs" fi fi ! PERL="$ac_cv_prog_PERL" ! if test -n "$PERL"; then ! echo "$ac_t""$PERL" 1>&6 else echo "$ac_t""no" 1>&6 fi ! test -n "$PERL" && break ! done ! test -n "$PERL" || PERL="false" + SYSDEP_SOURCES= + SIGNAL_HANDLER_AUX= ! case "${host}" in ! i?86-*-linux*) ! SIGNAL_HANDLER=include/i386-signal.h ! ;; ! sparc*-sun-solaris*) ! SIGNAL_HANDLER=include/sparc-signal.h ! ;; ! # ia64-*) ! # SYSDEP_SOURCES=sysdep/ia64.c ! # test -d sysdep || mkdir sysdep ! # ;; ! ia64-*-linux*) ! SIGNAL_HANDLER=include/dwarf2-signal.h ! ;; ! powerpc*-*-linux*) ! SIGNAL_HANDLER=include/powerpc-signal.h ! ;; ! alpha*-*-linux*) ! SIGNAL_HANDLER=include/dwarf2-signal.h ! ;; ! s390*-*-linux*) ! SIGNAL_HANDLER=include/s390-signal.h ! ;; ! x86_64*-*-linux*) ! SIGNAL_HANDLER=include/x86_64-signal.h ! SIGNAL_HANDLER_AUX=include/i386-signal.h ! ;; ! sparc*-*-linux*) ! SIGNAL_HANDLER=include/dwarf2-signal.h ! ;; ! sh-*-linux* | sh[34]*-*-linux*) ! SIGNAL_HANDLER=include/dwarf2-signal.h ! ;; ! *mingw*) ! SIGNAL_HANDLER=include/win32-signal.h ! ;; ! mips*-*-linux*) ! SIGNAL_HANDLER=include/mips-signal.h ! ;; ! *) ! SIGNAL_HANDLER=include/default-signal.h ! ;; ! esac + # If we're using sjlj exceptions, forget what we just learned. + if test "$enable_sjlj_exceptions" = yes; then + SIGNAL_HANDLER=include/default-signal.h + SIGNAL_HANDLER_AUX= + fi ! # Define here any compiler flags that you need in order to make backtrace() work. ! BACKTRACESPEC= ! case "${host}" in ! x86_64*-*-linux*) ! BACKTRACESPEC=-fno-omit-frame-pointer ! ;; ! esac ! if test -z "$SIGNAL_HANDLER_AUX"; then ! SIGNAL_HANDLER_AUX=$SIGNAL_HANDLER fi ! ! if test "${multilib}" = "yes"; then ! multilib_arg="--enable-multilib" else ! multilib_arg= fi + here=`${PWDCMD-pwd}` *************** done *** 7667,7673 **** ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" ! trap 'rm -fr `echo "Makefile libgcj.spec libgcj-test.spec gnu/classpath/Configuration.java gcj/Makefile include/Makefile testsuite/Makefile include/config.h gcj/libgcj-config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then --- 9411,9417 ---- cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then *************** fi; done *** 8026,8033 **** EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF --- 9580,9587 ---- EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF *************** esac *** 8105,8114 **** # builddir for the .java files. h=`${PWDCMD-pwd}` : > deps.mk ! ( (cd $srcdir && find . \( -name '*.java' -o -name '*.cc' \) -print) ; ! find . \( -name '*.java' -o -name '*.cc' \) -print) | \ fgrep -v testsuite | \ ! sed -e 's/\.java/.d/'\;'s/\.cc/.d/' | \ while read f; do echo "include $f" >> deps.mk test -f $f || { --- 9659,9668 ---- # builddir for the .java files. h=`${PWDCMD-pwd}` : > deps.mk ! ( (cd $srcdir && find . \( -name '*.java' -o -name '*.cc' -o -name '*.c' \) -print) ; ! find . \( -name '*.java' -o -name '*.cc' -o -name '*.c' \) -print) | \ fgrep -v testsuite | \ ! sed -e 's/\.java/.d/'\;'s/\.cc/.d/'\;'s/\.c/.d/' | \ while read f; do echo "include $f" >> deps.mk test -f $f || { *************** if test "$no_recursion" != yes; then *** 8221,8227 **** fi fi ! cd $ac_popdir done fi --- 9775,9781 ---- fi fi ! cd "$ac_popdir" done fi diff -Nrc3pad gcc-3.3.3/libjava/configure.host gcc-3.4.0/libjava/configure.host *** gcc-3.3.3/libjava/configure.host 2003-02-13 02:09:26.000000000 +0000 --- gcc-3.4.0/libjava/configure.host 2004-01-23 17:39:12.000000000 +0000 *************** *** 28,33 **** --- 28,35 ---- # pthread_self calls by caching thread IDs in a hashtable # can_unwind_signal Set to "yes" if the EH unwinder supports throwing # from a signal handler. + # disable_dladdr Set to "yes" if dladdr should not be used + # (i.e it is broken). libgcj_flags= libgcj_cflags= *************** enable_hash_synchronization_default=no *** 39,44 **** --- 41,47 ---- sysdeps_dir=generic slow_pthread_self= can_unwind_signal=no + disable_dladdr= case "${target_optspace}:${host}" in yes:*) *************** case "${host}" in *** 89,106 **** sysdeps_dir=i386 libgcj_flags="${libgcj_flags} -ffloat-store" libgcj_interpreter=yes ! libgcj_cxxflags="-D__NO_MATH_INLINES" ! libgcj_cflags="-D__NO_MATH_INLINES" DIVIDESPEC=-fno-use-divide-subroutine enable_hash_synchronization_default=yes slow_pthread_self=yes ;; x86_64-*) - CHECKREFSPEC="%{m32:-fcheck-references}" sysdeps_dir=x86-64 libgcj_flags="${libgcj_flags} -ffloat-store -fno-omit-frame-pointer" ! libgcj_cxxflags="-D__NO_MATH_INLINES" ! libgcj_cflags="-D__NO_MATH_INLINES" enable_hash_synchronization_default=yes slow_pthread_self=yes libgcj_interpreter=yes --- 92,109 ---- sysdeps_dir=i386 libgcj_flags="${libgcj_flags} -ffloat-store" libgcj_interpreter=yes ! libgcj_cxxflags= ! libgcj_cflags= DIVIDESPEC=-fno-use-divide-subroutine enable_hash_synchronization_default=yes slow_pthread_self=yes ;; x86_64-*) sysdeps_dir=x86-64 libgcj_flags="${libgcj_flags} -ffloat-store -fno-omit-frame-pointer" ! libgcj_cxxflags= ! libgcj_cflags= ! DIVIDESPEC=-f%{m32:no-}use-divide-subroutine enable_hash_synchronization_default=yes slow_pthread_self=yes libgcj_interpreter=yes *************** case "${host}" in *** 113,124 **** IEEESPEC=-mieee ;; powerpc64*-*) - # libffi not ported. - with_libffi_default=no - libgcj_interpreter=no - libgcj_flags="${libgcj_flags} -mminimal-toc" - # this may not be correct sysdeps_dir=powerpc enable_hash_synchronization_default=yes slow_pthread_self=yes ;; --- 116,126 ---- IEEESPEC=-mieee ;; powerpc64*-*) sysdeps_dir=powerpc + libgcj_interpreter=yes + if [ x`$CC -print-multi-os-directory` = x../lib64 ]; then + libgcj_flags="${libgcj_flags} -mminimal-toc" + fi enable_hash_synchronization_default=yes slow_pthread_self=yes ;; *************** case "${host}" in *** 146,153 **** sysdeps_dir=sh libgcj_flags="${libgcj_flags} -mieee" libgcj_interpreter=yes - CHECKREFSPEC=-fcheck-references - EXCEPTIONSPEC= enable_hash_synchronization_default=yes ;; esac --- 148,153 ---- *************** case "${host}" in *** 163,170 **** s390*-linux* | \ sparc*-linux* | \ ia64-* | \ ! x86_64*-linux*) can_unwind_signal=yes ;; *-*-darwin*) enable_hash_synchronization_default=no --- 163,231 ---- s390*-linux* | \ sparc*-linux* | \ ia64-* | \ ! x86_64*-linux* | \ ! sh-linux* | sh[34]*-linux*) ! can_unwind_signal=yes ! if test x$slow_pthread_self = xyes \ ! && test x$cross_compiling != xyes; then ! cat > conftest.c < ! #include ! #include ! #include ! ! void * ! tf (void *arg __attribute__ ((unused))) ! { ! pthread_attr_t a; ! size_t s; ! ! if (pthread_getattr_np (pthread_self (), &a) ! || pthread_attr_getstacksize (&a, &s) ! || s > 2 * PTHREAD_STACK_MIN) ! exit (1); ! exit (0); ! } ! ! int ! main (int argc, char **argv) ! { ! pthread_t p; ! void *ret; ! struct rlimit r; ! ! if (argc == 2) ! { ! r.rlim_cur = 2 * PTHREAD_STACK_MIN; ! r.rlim_max = 2 * PTHREAD_STACK_MIN; ! if (setrlimit (RLIMIT_STACK, &r)) ! exit (1); ! execl (argv[1], argv[0], NULL); ! exit (1); ! } ! ! if (pthread_create (&p, NULL, tf, NULL) ! || pthread_join (p, &ret)) ! exit (1); ! exit (1); ! } ! EOF ! $CC -o conftest conftest.c -lpthread > /dev/null 2>&1 && \ ! ./conftest ./conftest && slow_pthread_self= ! rm -f conftest conftest.c ! fi ! ;; ! mips*-*-linux* ) ! sysdeps_dir=mips can_unwind_signal=yes + libgcj_flags="${libgcj_flags} -mxgot" + case "${host}" in + mipsel*-linux* | mipsisa32el*-linux*) + enable_hash_synchronization_default=yes + disable_dladdr=yes + ;; + esac ;; *-*-darwin*) enable_hash_synchronization_default=no *************** case "${host}" in *** 174,179 **** --- 235,247 ---- *-*-freebsd*) slow_pthread_self= ;; + *-mingw*) + # FIXME: win32_exception_handler( ) in win32.cc does not do the + # right stuff yet w.r.t. SEH. Live with the following for now. + can_unwind_signal=no + CHECKREFSPEC=-fcheck-references + DIVIDESPEC=-fuse-divide-subroutine + ;; *-cygwin*) # The cygwin linker doesn't do 8-byte alignment by default, so # disable hash synchronization for now. diff -Nrc3pad gcc-3.3.3/libjava/configure.in gcc-3.4.0/libjava/configure.in *** gcc-3.3.3/libjava/configure.in 2003-06-17 16:04:20.000000000 +0000 --- gcc-3.4.0/libjava/configure.in 2004-01-23 17:39:12.000000000 +0000 *************** *** 1,4 **** --- 1,5 ---- dnl Process this with autoconf to create configure + AC_PREREQ(2.13) AC_INIT(java/lang/System.java) # This works around the fact that libtool configuration may change LD *************** LIBGCJ_CONFIGURE(.) *** 23,34 **** AM_CONFIG_HEADER(include/config.h gcj/libgcj-config.h) ! # Only use libltdl for native builds. ! if test -z "${with_cross_host}"; then AC_LIBLTDL_CONVENIENCE AC_LIBTOOL_DLOPEN DIRLTDL=libltdl ! AC_DEFINE(USE_LTDL) # Sigh. Libtool's macro doesn't do the right thing. INCLTDL="-I\$(top_srcdir)/libltdl $INCLTDL" # FIXME: this is a hack. --- 24,35 ---- AM_CONFIG_HEADER(include/config.h gcj/libgcj-config.h) ! # Only use libltdl for non-newlib builds. ! if test "x${with_newlib}" = "x" || test "x${with_newlib}" = "xno"; then AC_LIBLTDL_CONVENIENCE AC_LIBTOOL_DLOPEN DIRLTDL=libltdl ! AC_DEFINE(USE_LTDL, 1, [Define if libltdl is in use.]) # Sigh. Libtool's macro doesn't do the right thing. INCLTDL="-I\$(top_srcdir)/libltdl $INCLTDL" # FIXME: this is a hack. *************** if test -z "$enable_getenv_properties"; *** 62,68 **** enable_getenv_properties=${enable_getenv_properties_default-yes} fi if test "$enable_getenv_properties" = no; then ! AC_DEFINE(DISABLE_GETENV_PROPERTIES) fi dnl Whether we should use arguments to main() --- 63,70 ---- enable_getenv_properties=${enable_getenv_properties_default-yes} fi if test "$enable_getenv_properties" = no; then ! AC_DEFINE(DISABLE_GETENV_PROPERTIES, 1, ! [Define if system properties shouldn't be read from getenv("GCJ_PROPERTIES").]) fi dnl Whether we should use arguments to main() *************** if test -z "$enable_main_args"; then *** 70,76 **** enable_main_args=${enable_main_args_default-yes} fi if test "$enable_main_args" = no; then ! AC_DEFINE(DISABLE_MAIN_ARGS) fi --- 72,78 ---- enable_main_args=${enable_main_args_default-yes} fi if test "$enable_main_args" = no; then ! AC_DEFINE(DISABLE_MAIN_ARGS, 1, [Define if we should ignore arguments to main().]) fi *************** dnl Currently works only for Linux X86/i *** 79,94 **** dnl Typically faster and more space-efficient AC_ARG_ENABLE(hash-synchronization, [ --enable-hash-synchronization ! Use global hash table for monitor locks]) if test -z "$enable_hash_synchronization"; then enable_hash_synchronization=$enable_hash_synchronization_default fi dnl configure.host sets slow_pthread_self if the synchronization code should dnl try to avoid pthread_self calls by caching thread IDs in a hashtable. if test "${slow_pthread_self}" = "yes"; then ! AC_DEFINE(SLOW_PTHREAD_SELF) fi --- 81,128 ---- dnl Typically faster and more space-efficient AC_ARG_ENABLE(hash-synchronization, [ --enable-hash-synchronization ! use global hash table for monitor locks]) if test -z "$enable_hash_synchronization"; then enable_hash_synchronization=$enable_hash_synchronization_default fi + # Do we allow intermodule optimizations (i.e. compiling many files at once)? + AC_ARG_ENABLE(libgcj-multifile, + [ --enable-libgcj-multifile + allow compilation of several files at once], + [case "${enableval}" in + yes) enable_libgcj_multifile=yes ;; + no) enable_libgcj_multifile=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-libgcj-multifile) ;; + esac],[enable_libgcj_multifile=no]) + AM_CONDITIONAL(ONESTEP, test "$enable_libgcj_multifile" = yes) + + # What is the native OS API for MinGW? + AC_ARG_WITH(win32-nlsapi, + changequote(<<,>>)dnl + << --with-win32-nlsapi=ansi, unicows or unicode + native MinGW libgcj Win32 OS API [ansi]>>, + changequote([,]) + [case "${withval}" in + ansi) with_win32_nlsapi=ansi ;; + unicows) with_win32_nlsapi=unicows ;; + unicode) with_win32_nlsapi=unicode ;; + *) AC_MSG_ERROR(Bad value ${withval} for --with-win32-nlsapi.) ;; + esac],[with_win32_nlsapi=ansi]) + + case "${with_win32_nlsapi}" in + unicows | unicode) + AC_DEFINE(MINGW_LIBGCJ_UNICODE, 1, + [Define if MinGW libgcj uses the Windows UNICODE OS API.]) + ;; + esac + dnl configure.host sets slow_pthread_self if the synchronization code should dnl try to avoid pthread_self calls by caching thread IDs in a hashtable. if test "${slow_pthread_self}" = "yes"; then ! AC_DEFINE(SLOW_PTHREAD_SELF, 1, ! [Define if if the synchronization code should try to avoid pthread_self calls by caching thread IDs in a hashtable.]) fi *************** AC_SUBST(LIBGCJDEBUG) *** 98,104 **** AC_ARG_ENABLE(libgcj-debug, [ --enable-libgcj-debug enable runtime debugging code], if test "$enable_libgcj_debug" = yes; then ! AC_DEFINE(DEBUG) LIBGCJDEBUG="true" fi) --- 132,138 ---- AC_ARG_ENABLE(libgcj-debug, [ --enable-libgcj-debug enable runtime debugging code], if test "$enable_libgcj_debug" = yes; then ! AC_DEFINE(DEBUG, 1, [Define this if you want runtime debugging enabled.]) LIBGCJDEBUG="true" fi) *************** AC_ARG_ENABLE(interpreter, *** 113,119 **** fi) if test "$libgcj_interpreter" = yes; then ! AC_DEFINE(INTERPRETER) fi INTERPRETER="$libgcj_interpreter" AC_SUBST(INTERPRETER) --- 147,153 ---- fi) if test "$libgcj_interpreter" = yes; then ! AC_DEFINE(INTERPRETER, 1, [Define if you want a bytecode interpreter.]) fi INTERPRETER="$libgcj_interpreter" AC_SUBST(INTERPRETER) *************** if test -z "$enable_java_net"; then *** 182,188 **** enable_java_net=${enable_java_net_default-yes} fi if test "$enable_java_net" = no; then ! AC_DEFINE(DISABLE_JAVA_NET) fi dnl See if the user wants to configure without libffi. Some --- 216,222 ---- enable_java_net=${enable_java_net_default-yes} fi if test "$enable_java_net" = no; then ! AC_DEFINE(DISABLE_JAVA_NET, 1, [Define if java.net native functions should be stubbed out.]) fi dnl See if the user wants to configure without libffi. Some *************** AC_ARG_WITH(libffi, *** 194,200 **** LIBFFI= LIBFFIINCS= if test "$with_libffi" != no; then ! AC_DEFINE(USE_LIBFFI) LIBFFI=../libffi/libffi_convenience.la LIBFFIINCS='-I$(top_srcdir)/../libffi/include -I../libffi/include' fi --- 228,234 ---- LIBFFI= LIBFFIINCS= if test "$with_libffi" != no; then ! AC_DEFINE(USE_LIBFFI, 1, [Define if we're to use libffi.]) LIBFFI=../libffi/libffi_convenience.la LIBFFIINCS='-I$(top_srcdir)/../libffi/include -I../libffi/include' fi *************** AC_ARG_ENABLE(jvmpi, *** 206,212 **** [ --disable-jvmpi disable JVMPI support]) if test "$enable_jvmpi" != no; then ! AC_DEFINE(ENABLE_JVMPI) fi dnl If the target is an eCos system, use the appropriate eCos --- 240,246 ---- [ --disable-jvmpi disable JVMPI support]) if test "$enable_jvmpi" != no; then ! AC_DEFINE(ENABLE_JVMPI, 1, [Define if you are using JVMPI.]) fi dnl If the target is an eCos system, use the appropriate eCos *************** AC_ARG_WITH(ecos, *** 219,235 **** --- 253,274 ---- TARGET_ECOS="$with_ecos" ) + EXTRA_CC_FILES= + AC_SUBST(EXTRA_CC_FILES) + PLATFORMOBJS= case "$TARGET_ECOS" in no) case "$host" in *mingw*) PLATFORM=Win32 + PLATFORMNET=Win32 PLATFORMOBJS=win32.lo PLATFORMH=win32.h CHECK_FOR_BROKEN_MINGW_LD ;; *) PLATFORM=Posix + PLATFORMNET=Posix PLATFORMOBJS=posix.lo PLATFORMH=posix.h ;; *************** case "$TARGET_ECOS" in *** 237,243 **** ;; *) PLATFORM=Ecos ! AC_DEFINE(ECOS) PLATFORMOBJS=posix.lo PLATFORMH=posix.h ;; --- 276,283 ---- ;; *) PLATFORM=Ecos ! PLATFORMNET=NoNet ! AC_DEFINE(ECOS, 1, [Define if you're running eCos.]) PLATFORMOBJS=posix.lo PLATFORMH=posix.h ;; *************** esac *** 245,260 **** AC_SUBST(PLATFORMOBJS) AC_LINK_FILES(include/$PLATFORMH, include/platform.h) ! AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED)) ! AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED)) ! AC_EGREP_HEADER(u_int32_t, sys/types.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED)) ! AC_EGREP_HEADER(u_int32_t, sys/config.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED)) dnl These may not be defined in a non-ANS conformant embedded system. dnl FIXME: Should these case a runtime exception in that case? ! AC_EGREP_HEADER(mktime, time.h, AC_DEFINE(HAVE_MKTIME)) ! AC_EGREP_HEADER(localtime, time.h, AC_DEFINE(HAVE_LOCALTIME)) dnl Create the subdirectory for natFileDescriptor.cc, or the attempt dnl to create the link will fail. --- 285,306 ---- AC_SUBST(PLATFORMOBJS) AC_LINK_FILES(include/$PLATFORMH, include/platform.h) ! AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, ! [Define if you have int32_t and uint32_t.])) ! AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, ! [Define if you have int32_t and uint32_t.])) ! AC_EGREP_HEADER(u_int32_t, sys/types.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED, 1, ! [Define if you have u_int32_t])) ! AC_EGREP_HEADER(u_int32_t, sys/config.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED, 1, ! [Define if you have u_int32_t])) dnl These may not be defined in a non-ANS conformant embedded system. dnl FIXME: Should these case a runtime exception in that case? ! AC_EGREP_HEADER(mktime, time.h, AC_DEFINE(HAVE_MKTIME, 1, ! [Define is you have 'mktime' in ])) ! AC_EGREP_HEADER(localtime, time.h, AC_DEFINE(HAVE_LOCALTIME, 1, ! [Define is you have 'localtime' in ])) dnl Create the subdirectory for natFileDescriptor.cc, or the attempt dnl to create the link will fail. *************** test -d java/lang || mkdir java/lang *** 269,277 **** --- 315,342 ---- AC_LINK_FILES(java/lang/${PLATFORM}Process.java, java/lang/ConcreteProcess.java) AC_LINK_FILES(java/lang/nat${PLATFORM}Process.cc, java/lang/natConcreteProcess.cc) + dnl Likewise for natInetAddress.cc and natNetworkInterface.cc. + test -d java/net || mkdir java/net + AC_LINK_FILES(java/net/natInetAddress${PLATFORMNET}.cc, java/net/natInetAddress.cc) + AC_LINK_FILES(java/net/natNetworkInterface${PLATFORMNET}.cc, java/net/natNetworkInterface.cc) + + dnl Likewise for natPlainSocketImpl.cc and natPlainDatagramSocketImpl.cc. + test -d gnu/java || mkdir gnu/java + test -d gnu/java/net || mkdir gnu/java/net + AC_LINK_FILES(gnu/java/net/natPlainSocketImpl${PLATFORMNET}.cc, gnu/java/net/natPlainSocketImpl.cc) + AC_LINK_FILES(gnu/java/net/natPlainDatagramSocketImpl${PLATFORMNET}.cc, gnu/java/net/natPlainDatagramSocketImpl.cc) + + dnl Likewise for natPipeImpl.cc and natSelectorImpl.cc. + test -d gnu/java/nio || mkdir gnu/java/nio + AC_LINK_FILES(gnu/java/nio/natPipeImpl${PLATFORM}.cc, gnu/java/nio/natPipeImpl.cc) + AC_LINK_FILES(gnu/java/nio/natSelectorImpl${PLATFORM}.cc, gnu/java/nio/natSelectorImpl.cc) + case "${host}" in *mingw*) SYSTEMSPEC="-lgdi32 -lwsock32 -lws2_32" + if test "${with_win32_nlsapi}" = "unicows"; then + SYSTEMSPEC="-lunicows $SYSTEMSPEC" + fi ;; *) SYSTEMSPEC= *************** AC_SUBST(ZLIBSPEC) *** 289,294 **** --- 354,424 ---- ZLIBTESTSPEC= AC_SUBST(ZLIBTESTSPEC) + AC_PATH_XTRA + + dnl Determine which AWT peer libraries to build + AC_ARG_ENABLE(java-awt, + [ --enable-java-awt list of AWT peer implementations to be built]) + + peerlibs="`echo ${enable_java_awt} | tr ',' ' '`" + use_xlib_awt="" + use_gtk_awt="" + # The default toolkit to use is the first one specified. + TOOLKIT= + AC_SUBST(TOOLKIT) + + for peer in $peerlibs ; do + case $peer in + xlib) + if test "$no_x" = yes; then + echo "*** xlib peers requested but no X library available" 1>&2 + exit 1 + else + use_xlib_awt="yes" + if test -z "$TOOLKIT"; then + TOOLKIT=gnu.awt.xlib.XToolkit + fi + fi + ;; + gtk) + if test "$no_x" = yes; then + echo "*** xlib peers requested but no X library available" 1>&2 + exit 1 + else + use_gtk_awt=yes + if test -z "$TOOLKIT"; then + TOOLKIT=gnu.java.awt.peer.gtk.GtkToolkit + fi + test -d jniinclude || mkdir jniinclude + fi + ;; + no) + use_xlib_awt= + use_gtk_awt= + break + ;; + *) + echo "*** unrecognised argument \"${peer}\" for --enable-java-awt" 1>&2 + exit 1 + esac + done + + AM_CONDITIONAL(XLIB_AWT, test "$use_xlib_awt" = yes) + AM_CONDITIONAL(GTK_AWT, test "$use_gtk_awt" = yes) + + dnl determine whether to enable the cairo GTK Graphics2D backend + AC_ARG_ENABLE(gtk-cairo, [ --enable-gtk-cairo build the cairo Graphics2D implementation on GTK]) + AM_CONDITIONAL(GTK_CAIRO, test "x${enable_gtk_cairo}" = xyes) + if test "x${enable_gtk_cairo}" = xyes + then + PKG_CHECK_MODULES(CAIRO, cairo) + PKG_CHECK_MODULES(PANGOFT2, pangoft2) + fi + AC_SUBST(CAIRO_LIBS) + AC_SUBST(CAIRO_CFLAGS) + AC_SUBST(PANGOFT2_LIBS) + AC_SUBST(PANGOFT2_CFLAGS) + dnl FIXME: this should be _libs on some hosts. libsubdir=.libs *************** case "$GC" in *** 311,327 **** boehm) AC_MSG_RESULT(boehm) GCLIBS=../boehm-gc/libgcjgc_convenience.la - GCINCS='-I$(top_srcdir)/../boehm-gc/include' JC1GCSPEC='-fuse-boehm-gc' GCTESTSPEC="-L`${PWDCMD-pwd}`/../boehm-gc/.libs -rpath `${PWDCMD-pwd}`/../boehm-gc/.libs" dnl We also want to pick up some cpp flags required when including dnl boehm-config.h. Yuck. ! GCINCS="$GCINCS `cat ../boehm-gc/boehm-cflags`" GCOBJS=boehm.lo GCHDR=boehm-gc.h dnl The POSIX thread support needs to know this. ! AC_DEFINE(HAVE_BOEHM_GC) ;; no) AC_MSG_RESULT(none) --- 441,456 ---- boehm) AC_MSG_RESULT(boehm) GCLIBS=../boehm-gc/libgcjgc_convenience.la JC1GCSPEC='-fuse-boehm-gc' GCTESTSPEC="-L`${PWDCMD-pwd}`/../boehm-gc/.libs -rpath `${PWDCMD-pwd}`/../boehm-gc/.libs" dnl We also want to pick up some cpp flags required when including dnl boehm-config.h. Yuck. ! GCINCS="`cat ../boehm-gc/boehm-cflags`" GCOBJS=boehm.lo GCHDR=boehm-gc.h dnl The POSIX thread support needs to know this. ! AC_DEFINE(HAVE_BOEHM_GC, 1, [Define if Boehm GC in use.]) ;; no) AC_MSG_RESULT(none) *************** case "$THREADS" in *** 354,360 **** THREADS=posix case "$host" in *-*-linux*) ! AC_DEFINE(LINUX_THREADS) ;; esac ;; --- 483,489 ---- THREADS=posix case "$host" in *-*-linux*) ! AC_DEFINE(LINUX_THREADS, 1, [Define if using POSIX threads on Linux.]) ;; esac ;; *************** case "$THREADS" in *** 368,373 **** --- 497,503 ---- ;; esac + THREADCXXFLAGS= THREADLDFLAGS= THREADLIBS= THREADINCS= *************** changequote([,]) *** 402,407 **** --- 532,543 ---- THREADLDFLAGS=-pthread THREADSPEC=-lc_r ;; + alpha*-dec-osf*) + THREADCXXFLAGS=-pthread + # boehm-gc needs some functions from librt, so link that too. + THREADLIBS='-lpthread -lrt' + THREADSPEC='-lpthread -lrt' + ;; *) THREADLIBS=-lpthread THREADSPEC=-lpthread *************** changequote([,]) *** 412,418 **** # MIT pthreads doesn't seem to have the mutexattr functions. # But for now we don't check for it. We just assume you aren't # using MIT pthreads. ! AC_DEFINE(HAVE_PTHREAD_MUTEXATTR_INIT) # If we're using the Boehm GC, then we happen to know that it # defines _REENTRANT, so we don't bother. Eww. --- 548,554 ---- # MIT pthreads doesn't seem to have the mutexattr functions. # But for now we don't check for it. We just assume you aren't # using MIT pthreads. ! AC_DEFINE(HAVE_PTHREAD_MUTEXATTR_INIT, 1, [Define if using POSIX threads that have the mutexattr functions.]) # If we're using the Boehm GC, then we happen to know that it # defines _REENTRANT, so we don't bother. Eww. *************** AC_SUBST(THREADDEPS) *** 439,444 **** --- 575,581 ---- AC_SUBST(THREADOBJS) AC_SUBST(THREADSPEC) AC_SUBST(THREADLDFLAGS) + AC_SUBST(THREADCXXFLAGS) if test -d sysdep; then true; else mkdir sysdep; fi AC_LINK_FILES(sysdep/$sysdeps_dir/locks.h, sysdep/locks.h) *************** changequote(,)dnl *** 466,472 **** gcc_version_trigger=${libgcj_basedir}/../gcc/version.c gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'` gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` ! tool_include_dir='$(libdir)/gcc-lib/$(target_alias)/'${gcc_version}/include changequote([,])dnl AC_SUBST(tool_include_dir) AC_SUBST(gcc_version) --- 603,609 ---- gcc_version_trigger=${libgcj_basedir}/../gcc/version.c gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'` gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` ! tool_include_dir='$(libdir)/gcc/$(target_alias)/'${gcc_version}/include changequote([,])dnl AC_SUBST(tool_include_dir) AC_SUBST(gcc_version) *************** if test "x${with_newlib}" = "xyes"; then *** 478,506 **** # We assume newlib. This lets us hard-code the functions we know # we'll have. ! AC_DEFINE(HAVE_MEMMOVE) ! AC_DEFINE(HAVE_MEMCPY) ! AC_DEFINE(HAVE_STRERROR) ! AC_DEFINE(HAVE_TIME) ! AC_DEFINE(HAVE_GMTIME_R) ! AC_DEFINE(HAVE_LOCALTIME_R) dnl This is only for POSIX threads. ! AC_DEFINE(HAVE_PTHREAD_MUTEXATTR_INIT) dnl We also assume we are using gcc, which provides alloca. AC_DEFINE(HAVE_ALLOCA) dnl Assume we do not have getuid and friends. ! AC_DEFINE(NO_GETUID) ! ! # If Canadian cross, then don't pick up tools from the build ! # directory. ! if test x"$build" != x"$with_cross_host" \ ! && test x"$build" != x"$target"; then ! CANADIAN=yes ! GCC_UNWIND_INCLUDE= ! GCJ="${target_alias}-gcj" ! fi ! NATIVE=no else AC_CHECK_FUNCS(strerror ioctl select fstat open fsync sleep opendir) AC_CHECK_FUNCS(gmtime_r localtime_r readdir_r getpwuid_r getcwd) --- 615,635 ---- # We assume newlib. This lets us hard-code the functions we know # we'll have. ! AC_DEFINE(HAVE_MEMMOVE, 1, [Define if you have memmove.]) ! AC_DEFINE(HAVE_MEMCPY, 1, [Define if you have memcpy.]) ! AC_DEFINE(HAVE_STRERROR, 1, [Define if you have strerror.]) ! AC_DEFINE(HAVE_TIME, 1, [Define if you have time.]) ! AC_DEFINE(HAVE_GMTIME_R, 1, [Define if you have the 'gmtime_r' function]) ! AC_DEFINE(HAVE_LOCALTIME_R, 1, [Define if you have the 'localtime_r' function.]) ! AC_DEFINE(HAVE_USLEEP_DECL, 1, [Define if usleep is declared in .]) dnl This is only for POSIX threads. ! AC_DEFINE(HAVE_PTHREAD_MUTEXATTR_INIT, 1, [Define if using POSIX threads that have the mutexattr functions.]) dnl We also assume we are using gcc, which provides alloca. AC_DEFINE(HAVE_ALLOCA) dnl Assume we do not have getuid and friends. ! AC_DEFINE(NO_GETUID, 1, [Define if getuid() and friends are missing.]) ! PLATFORMNET=NoNet else AC_CHECK_FUNCS(strerror ioctl select fstat open fsync sleep opendir) AC_CHECK_FUNCS(gmtime_r localtime_r readdir_r getpwuid_r getcwd) *************** else *** 515,542 **** ia64-*-linux*) # Has broken backtrace() ;; *) ! AC_DEFINE(HAVE_BACKTRACE) ;; esac ], [ case "$host" in *mingw*) # Has backtrace() defined in libgcj itself ! AC_DEFINE(HAVE_BACKTRACE) ;; esac ]) AC_CHECK_LIB(dl, dladdr, [ ! AC_DEFINE(HAVE_DLADDR)]) if test x"$build" = x"$host"; then AC_CHECK_FILES(/proc/self/exe, [ ! AC_DEFINE(HAVE_PROC_SELF_EXE)]) else case $host in *-linux*) ! AC_DEFINE(HAVE_PROC_SELF_EXE) ;; esac fi --- 644,686 ---- ia64-*-linux*) # Has broken backtrace() ;; + mips*-*-linux*) + # Has broken backtrace(), but we supply our own. + if test -d sysdep; then true; else mkdir -p sysdep; fi + EXTRA_CC_FILES="${EXTRA_CC_FILES} sysdep/dwarf2-backtrace.cc" + AC_DEFINE(HAVE_BACKTRACE, 1, + [Define if your platform has a working backtrace() function.]) + ;; *) ! AC_DEFINE(HAVE_BACKTRACE, 1, ! [Define if your platform has a working backtrace() function.]) ;; esac ], [ case "$host" in *mingw*) # Has backtrace() defined in libgcj itself ! AC_DEFINE(HAVE_BACKTRACE, 1, ! [Define if your platform has a working backtrace() function.]) ;; esac ]) AC_CHECK_LIB(dl, dladdr, [ ! if test "x${disable_dladdr}" = "xyes"; then ! #Broken dladdr(). ! true ! else ! AC_DEFINE(HAVE_DLADDR, 1, [Define if you have dladdr()]) ! fi ! ]) if test x"$build" = x"$host"; then AC_CHECK_FILES(/proc/self/exe, [ ! AC_DEFINE(HAVE_PROC_SELF_EXE, 1, [Define if you have /proc/self/exe])]) else case $host in *-linux*) ! AC_DEFINE(HAVE_PROC_SELF_EXE, 1, [Define if you have /proc/self/exe]) ;; esac fi *************** else *** 546,557 **** AC_STRUCT_TIMEZONE AC_CHECK_FUNCS(gethostbyname_r, [ ! AC_DEFINE(HAVE_GETHOSTBYNAME_R) # There are two different kinds of gethostbyname_r. # We look for the one that returns `int'. # Hopefully this check is robust enough. AC_EGREP_HEADER(int.*gethostbyname_r, netdb.h, [ ! AC_DEFINE(GETHOSTBYNAME_R_RETURNS_INT)]) case " $GCINCS " in *" -D_REENTRANT "*) ;; --- 690,702 ---- AC_STRUCT_TIMEZONE AC_CHECK_FUNCS(gethostbyname_r, [ ! AC_DEFINE(HAVE_GETHOSTBYNAME_R, 1, ! [Define if you have the 'gethostbyname_r' function.]) # There are two different kinds of gethostbyname_r. # We look for the one that returns `int'. # Hopefully this check is robust enough. AC_EGREP_HEADER(int.*gethostbyname_r, netdb.h, [ ! AC_DEFINE(GETHOSTBYNAME_R_RETURNS_INT, 1, [Define if gethostbyname_r returns 'int'.])]) case " $GCINCS " in *" -D_REENTRANT "*) ;; *************** else *** 601,617 **** # linkage check is enough, yet C++ code requires proper prototypes.) AC_EGREP_HEADER(gethostbyaddr_r, netdb.h, [ AC_CHECK_FUNCS(gethostbyaddr_r, [ ! AC_DEFINE(HAVE_GETHOSTBYADDR_R) # There are two different kinds of gethostbyaddr_r. # We look for the one that returns `int'. # Hopefully this check is robust enough. AC_EGREP_HEADER(int.*gethostbyaddr_r, netdb.h, [ ! AC_DEFINE(GETHOSTBYADDR_R_RETURNS_INT)])])]) AC_CHECK_FUNCS(gethostname, [ ! AC_DEFINE(HAVE_GETHOSTNAME) AC_EGREP_HEADER(gethostname, unistd.h, [ ! AC_DEFINE(HAVE_GETHOSTNAME_DECL)])]) # Look for these functions in the thread library, but only bother # if using POSIX threads. --- 746,771 ---- # linkage check is enough, yet C++ code requires proper prototypes.) AC_EGREP_HEADER(gethostbyaddr_r, netdb.h, [ AC_CHECK_FUNCS(gethostbyaddr_r, [ ! AC_DEFINE(HAVE_GETHOSTBYADDR_R, 1, ! [Define if you have the 'gethostbyaddr_r' function.]) # There are two different kinds of gethostbyaddr_r. # We look for the one that returns `int'. # Hopefully this check is robust enough. AC_EGREP_HEADER(int.*gethostbyaddr_r, netdb.h, [ ! AC_DEFINE(GETHOSTBYADDR_R_RETURNS_INT, 1, ! [Define if gethostbyaddr_r returns 'int'.])])])]) AC_CHECK_FUNCS(gethostname, [ ! AC_DEFINE(HAVE_GETHOSTNAME, 1, ! [Define if you have the 'gethostname' function.]) AC_EGREP_HEADER(gethostname, unistd.h, [ ! AC_DEFINE(HAVE_GETHOSTNAME_DECL, 1, ! [Define if gethostname is declared in .])])]) ! ! AC_CHECK_FUNCS(usleep, [ ! AC_EGREP_HEADER(usleep, unistd.h, [ ! AC_DEFINE(HAVE_USLEEP_DECL, 1, ! [Define if usleep is declared in .])])]) # Look for these functions in the thread library, but only bother # if using POSIX threads. *************** else *** 639,648 **** # or __m_count. This is a nice hack for Linux. AC_TRY_COMPILE([#include ], [ extern pthread_mutex_t *mutex; int q = mutex->m_count; ! ], AC_DEFINE(PTHREAD_MUTEX_HAVE_M_COUNT), [ AC_TRY_COMPILE([#include ], [ extern pthread_mutex_t *mutex; int q = mutex->__m_count; ! ], AC_DEFINE(PTHREAD_MUTEX_HAVE___M_COUNT))]) fi # We require a way to get the time. --- 793,804 ---- # or __m_count. This is a nice hack for Linux. AC_TRY_COMPILE([#include ], [ extern pthread_mutex_t *mutex; int q = mutex->m_count; ! ], AC_DEFINE(PTHREAD_MUTEX_HAVE_M_COUNT, 1, ! [Define if pthread_mutex_t has m_count member.]), [ AC_TRY_COMPILE([#include ], [ extern pthread_mutex_t *mutex; int q = mutex->__m_count; ! ], AC_DEFINE(PTHREAD_MUTEX_HAVE___M_COUNT, 1, ! [Define if pthread_mutex_t has __m_count member.]))]) fi # We require a way to get the time. *************** else *** 718,745 **** AC_CHECK_LIB(z, deflate, ZLIBSPEC=-lz, ZLIBSPEC=) fi # On Solaris, and maybe other architectures, the Boehm collector # requires -ldl. if test "$GC" = boehm; then AC_CHECK_LIB(dl, main, SYSTEMSPEC="$SYSTEMSPEC -ldl") fi ! if test -z "${with_multisubdir}"; then ! builddotdot=. ! else changequote(<<,>>) ! builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'` changequote([,]) ! fi ! if test -x "${builddotdot}/../../gcc/gcj"; then ! dir="`cd ${builddotdot}/../../gcc && ${PWDCMD-pwd}`" ! GCJ="$dir/gcj -B`${PWDCMD-pwd}`/ -B$dir/" ! else CANADIAN=yes NULL_TARGET=yes GCJ="gcj -B`${PWDCMD-pwd}`/" ! fi ! fi # Create it, so that compile/link tests don't fail test -f libgcj.spec || touch libgcj.spec --- 874,964 ---- AC_CHECK_LIB(z, deflate, ZLIBSPEC=-lz, ZLIBSPEC=) fi + # Test for Gtk stuff, if asked for. + if test "$use_gtk_awt" = yes; then + AM_PATH_GTK_2_0(2.2.0,,exit 1) + AM_PATH_GLIB_2_0(2.2.0,,exit 1,gthread) + dnl XXX Fix me when libart.m4 has the compile test fixed! + enable_libarttest=no + AM_PATH_LIBART(2.1.0,,exit 1) + fi + # On Solaris, and maybe other architectures, the Boehm collector # requires -ldl. if test "$GC" = boehm; then AC_CHECK_LIB(dl, main, SYSTEMSPEC="$SYSTEMSPEC -ldl") fi + fi ! if test -z "${with_multisubdir}"; then ! builddotdot=. ! else changequote(<<,>>) ! builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'` changequote([,]) ! fi ! ! # Which gcj do we use? ! which_gcj=default ! built_gcc_dir="`cd ${builddotdot}/../../gcc && ${PWDCMD-pwd}`" ! if test -n "${with_cross_host}"; then ! # We are being configured with a cross compiler. We can't ! # use ac_exeext, because that is for the target platform. ! NATIVE=no ! cross_host_exeext= ! case "${with_cross_host}" in ! *mingw* | *cygwin*) ! cross_host_exeext=.exe ! ;; ! esac ! if test -x "${built_gcc_dir}/gcj${cross_host_exeext}"; then ! if test x"$build_alias" = x"$with_cross_host"; then ! # Ordinary cross (host!=target and host=build) ! which_gcj=built ! else ! # Canadian cross (host!=target and host!=build) ! which_gcj=cross ! fi ! else ! which_gcj=cross ! fi ! else ! # We are being configured with a native or crossed-native compiler ! if test -x "${built_gcc_dir}/gcj${ac_exeext}"; then ! if test x"$build" = x"$host"; then ! # True native build (host=target and host=build) ! which_gcj=built ! else ! # Crossed-native build (host=target and host!=build) ! which_gcj=cross ! fi ! else ! which_gcj=path ! fi ! fi ! case "${which_gcj}" in ! built) ! GCJ="$built_gcc_dir/gcj -B`${PWDCMD-pwd}`/ -B$built_gcc_dir/" ! ;; ! cross) ! # See the comment in Makefile.am about CANADIAN being a misnomer ! CANADIAN=yes ! NULL_TARGET=no ! if test "x${with_newlib}" = "xyes"; then ! # FIXME (comment): Why is this needed? ! GCC_UNWIND_INCLUDE= ! GCJ="${target_alias}-gcj" ! else ! GCJ="${target_alias}-gcj -B`${PWDCMD-pwd}`/" ! fi ! ;; ! path) ! # See the comment in Makefile.am about CANADIAN being a misnomer CANADIAN=yes NULL_TARGET=yes GCJ="gcj -B`${PWDCMD-pwd}`/" ! ;; ! esac # Create it, so that compile/link tests don't fail test -f libgcj.spec || touch libgcj.spec *************** CPPFLAGS="$CPPFLAGS -I`${PWDCMD-pwd}` -I *** 754,760 **** if test ! -f gnu/classpath/Configuration.java; then test -d gnu || mkdir gnu test -d gnu/classpath || mkdir gnu/classpath ! sed 's,@LIBGCJDEBUG@,$LIBGCJDEBUG,' \ < $srcdir/gnu/classpath/Configuration.java.in \ > gnu/classpath/Configuration.java # We do not want to redirect the output of the grep below to /dev/null, --- 973,980 ---- if test ! -f gnu/classpath/Configuration.java; then test -d gnu || mkdir gnu test -d gnu/classpath || mkdir gnu/classpath ! sed -e 's,@LIBGCJDEBUG@,$LIBGCJDEBUG,' \ ! -e 's,@TOOLKIT@,$TOOLKIT,' \ < $srcdir/gnu/classpath/Configuration.java.in \ > gnu/classpath/Configuration.java # We do not want to redirect the output of the grep below to /dev/null, *************** else *** 805,811 **** toolexecdir='$(libdir)/gcc-lib/$(target_alias)' toolexecmainlibdir='$(libdir)' fi ! toolexeclibdir=$toolexecmainlibdir/`$CC -print-multi-os-directory` AC_SUBST(toolexecdir) AC_SUBST(toolexecmainlibdir) AC_SUBST(toolexeclibdir) --- 1025,1035 ---- toolexecdir='$(libdir)/gcc-lib/$(target_alias)' toolexecmainlibdir='$(libdir)' fi ! multi_os_directory=`$CC -print-multi-os-directory` ! case $multi_os_directory in ! .) toolexeclibdir=$toolexecmainlibdir ;; # Avoid trailing /. ! *) toolexeclibdir=$toolexecmainlibdir/$multi_os_directory ;; ! esac AC_SUBST(toolexecdir) AC_SUBST(toolexecmainlibdir) AC_SUBST(toolexeclibdir) *************** GCJVERSION=$gcjversion *** 818,833 **** AC_SUBST(GCJVERSION) AC_DEFINE_UNQUOTED(GCJVERSION, "$GCJVERSION", [Short GCJ version ID]) - dnl Work around a g++ bug. Reported to gcc-bugs@gcc.gnu.org on Jan 22, 2000. - AC_MSG_CHECKING([for g++ -ffloat-store bug]) - save_CFLAGS="$CFLAGS" - CFLAGS="-x c++ -O2 -ffloat-store" - AC_TRY_COMPILE([#include ], , - [AC_MSG_RESULT(no)], - [AC_DEFINE(__NO_MATH_INLINES) - AC_MSG_RESULT(yes)]) - CFLAGS="$save_CFLAGS" - dnl We check for sys/filio.h because Solaris 2.5 defines FIONREAD there. dnl On that system, sys/ioctl.h will not include sys/filio.h unless dnl BSD_COMP is defined; just including sys/filio.h is simpler. --- 1042,1047 ---- *************** AC_TRY_COMPILE([#include *** 852,876 **** #if HAVE_NETINET_IN_H #include #endif], [in_addr_t foo;], ! [AC_DEFINE([HAVE_IN_ADDR_T]) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) AC_MSG_CHECKING([whether struct ip_mreq is in netinet/in.h]) AC_TRY_COMPILE([#include ], [struct ip_mreq mreq;], ! [AC_DEFINE(HAVE_STRUCT_IP_MREQ) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) AC_MSG_CHECKING([whether struct ipv6_mreq is in netinet/in.h]) AC_TRY_COMPILE([#include ], [struct ipv6_mreq mreq6;], ! [AC_DEFINE(HAVE_STRUCT_IPV6_MREQ) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) AC_MSG_CHECKING([whether struct sockaddr_in6 is in netinet/in.h]) AC_TRY_COMPILE([#include ], [struct sockaddr_in6 addr6;], ! [AC_DEFINE(HAVE_INET6) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) --- 1066,1094 ---- #if HAVE_NETINET_IN_H #include #endif], [in_addr_t foo;], ! [AC_DEFINE(HAVE_IN_ADDR_T, 1, ! [Define to 1 if 'in_addr_t' is defined in sys/types.h or netinet/in.h.]) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) AC_MSG_CHECKING([whether struct ip_mreq is in netinet/in.h]) AC_TRY_COMPILE([#include ], [struct ip_mreq mreq;], ! [AC_DEFINE(HAVE_STRUCT_IP_MREQ, 1, ! [Define if struct ip_mreq is defined in netinet/in.h.]) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) AC_MSG_CHECKING([whether struct ipv6_mreq is in netinet/in.h]) AC_TRY_COMPILE([#include ], [struct ipv6_mreq mreq6;], ! [AC_DEFINE(HAVE_STRUCT_IPV6_MREQ, 1, ! [Define if struct ipv6_mreq is defined in netinet/in.h.]) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) AC_MSG_CHECKING([whether struct sockaddr_in6 is in netinet/in.h]) AC_TRY_COMPILE([#include ], [struct sockaddr_in6 addr6;], ! [AC_DEFINE(HAVE_INET6, 1, ! [Define if inet6 structures are defined in netinet/in.h.]) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) *************** AC_MSG_CHECKING([for socklen_t in sys/so *** 878,890 **** AC_TRY_COMPILE([#define _POSIX_PII_SOCKET #include #include ], [socklen_t x = 5;], ! [AC_DEFINE(HAVE_SOCKLEN_T) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) AC_MSG_CHECKING([for tm_gmtoff in struct tm]) AC_TRY_COMPILE([#include ], [struct tm tim; tim.tm_gmtoff = 0;], ! [AC_DEFINE(STRUCT_TM_HAS_GMTOFF) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) AC_MSG_CHECKING([for global timezone variable]) --- 1096,1108 ---- AC_TRY_COMPILE([#define _POSIX_PII_SOCKET #include #include ], [socklen_t x = 5;], ! [AC_DEFINE(HAVE_SOCKLEN_T, 1, [Define it socklen_t typedef is in sys/socket.h.]) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) AC_MSG_CHECKING([for tm_gmtoff in struct tm]) AC_TRY_COMPILE([#include ], [struct tm tim; tim.tm_gmtoff = 0;], ! [AC_DEFINE(STRUCT_TM_HAS_GMTOFF, 1, [Define if struct tm has tm_gmtoff field.]) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) AC_MSG_CHECKING([for global timezone variable]) *************** AC_TRY_COMPILE([#include ], [str *** 893,913 **** dnl the header file will mention timezone if it exists. dnl Don't find the win32 function timezone AC_TRY_COMPILE([#include ], [void i(){long z2 = 2*timezone;}], ! [AC_DEFINE(HAVE_TIMEZONE) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) AC_MSG_CHECKING([for global _timezone variable]) dnl FIXME: As above, don't want link check AC_TRY_COMPILE([#include ], [long z2 = _timezone;], ! [AC_DEFINE(HAVE_UNDERSCORE_TIMEZONE) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)])])]) AC_FUNC_ALLOCA AC_CHECK_PROGS(PERL, perl, false) SYSDEP_SOURCES= case "${host}" in i?86-*-linux*) --- 1111,1134 ---- dnl the header file will mention timezone if it exists. dnl Don't find the win32 function timezone AC_TRY_COMPILE([#include ], [void i(){long z2 = 2*timezone;}], ! [AC_DEFINE(HAVE_TIMEZONE, 1, [Define if global 'timezone' exists.]) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) AC_MSG_CHECKING([for global _timezone variable]) dnl FIXME: As above, don't want link check AC_TRY_COMPILE([#include ], [long z2 = _timezone;], ! [AC_DEFINE(HAVE_UNDERSCORE_TIMEZONE, 1, ! [Define if your platform has the global _timezone variable.]) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)])])]) AC_FUNC_ALLOCA + AC_FUNC_MMAP AC_CHECK_PROGS(PERL, perl, false) SYSDEP_SOURCES= + SIGNAL_HANDLER_AUX= case "${host}" in i?86-*-linux*) *************** case "${host}" in *** 923,929 **** ia64-*-linux*) SIGNAL_HANDLER=include/dwarf2-signal.h ;; ! powerpc-*-linux*) SIGNAL_HANDLER=include/powerpc-signal.h ;; alpha*-*-linux*) --- 1144,1150 ---- ia64-*-linux*) SIGNAL_HANDLER=include/dwarf2-signal.h ;; ! powerpc*-*-linux*) SIGNAL_HANDLER=include/powerpc-signal.h ;; alpha*-*-linux*) *************** case "${host}" in *** 934,946 **** --- 1155,1174 ---- ;; x86_64*-*-linux*) SIGNAL_HANDLER=include/x86_64-signal.h + SIGNAL_HANDLER_AUX=include/i386-signal.h ;; sparc*-*-linux*) SIGNAL_HANDLER=include/dwarf2-signal.h ;; + sh-*-linux* | sh[[34]]*-*-linux*) + SIGNAL_HANDLER=include/dwarf2-signal.h + ;; *mingw*) SIGNAL_HANDLER=include/win32-signal.h ;; + mips*-*-linux*) + SIGNAL_HANDLER=include/mips-signal.h + ;; *) SIGNAL_HANDLER=include/default-signal.h ;; *************** esac *** 949,954 **** --- 1177,1183 ---- # If we're using sjlj exceptions, forget what we just learned. if test "$enable_sjlj_exceptions" = yes; then SIGNAL_HANDLER=include/default-signal.h + SIGNAL_HANDLER_AUX= fi # Define here any compiler flags that you need in order to make backtrace() work. *************** AC_SUBST(BACKTRACESPEC) *** 962,968 **** AC_SUBST(SYSDEP_SOURCES) ! AC_LINK_FILES($SIGNAL_HANDLER, include/java-signal.h) if test "${multilib}" = "yes"; then multilib_arg="--enable-multilib" --- 1191,1202 ---- AC_SUBST(SYSDEP_SOURCES) ! if test -z "$SIGNAL_HANDLER_AUX"; then ! SIGNAL_HANDLER_AUX=$SIGNAL_HANDLER ! fi ! ! AC_LINK_FILES($SIGNAL_HANDLER $SIGNAL_HANDLER_AUX, ! include/java-signal.h include/java-signal-aux.h) if test "${multilib}" = "yes"; then multilib_arg="--enable-multilib" *************** else *** 970,1011 **** multilib_arg= fi - AC_PATH_XTRA - - dnl Determine which AWT peer libraries to build - AC_ARG_ENABLE(java-awt, - [ --enable-java-awt list of AWT peer implementations to be built]) - - peerlibs="`echo ${enable_java_awt} | tr ',' ' '`" - use_xlib_awt="" - use_gtk_awt="" - - for peer in $peerlibs ; do - case $peer in - xlib) - if [test "$no_x" = yes]; then - echo "*** xlib peers requested but no X library available" 1>&2 - exit 1 - else - use_xlib_awt="yes" - fi - ;; - gtk) - # Nothing, yet... - ;; - no) - use_xlib_awt= - use_gtk_awt= - break - ;; - *) - echo "*** unrecognised argument \"${peer}\" for --enable-java-awt" 1>&2 - exit 1 - esac - done - - AM_CONDITIONAL(XLIB_AWT, test "$use_xlib_awt" = yes) - AM_CONDITIONAL(GTK_AWT, test "$use_gtk_awt" = yes) here=`${PWDCMD-pwd}` --- 1204,1209 ---- *************** AC_SUBST(here) *** 1014,1020 **** # We get this from the environment. AC_SUBST(GCJFLAGS) ! AC_OUTPUT(Makefile libgcj.spec libgcj-test.spec gnu/classpath/Configuration.java gcj/Makefile include/Makefile testsuite/Makefile, [# Only add multilib support code if we just rebuilt top-level Makefile. case " $CONFIG_FILES " in *" Makefile "*) --- 1212,1218 ---- # We get this from the environment. AC_SUBST(GCJFLAGS) ! AC_OUTPUT(Makefile libgcj.pc libgcj.spec libgcj-test.spec gnu/classpath/Configuration.java gcj/Makefile include/Makefile testsuite/Makefile, [# Only add multilib support code if we just rebuilt top-level Makefile. case " $CONFIG_FILES " in *" Makefile "*) *************** esac *** 1027,1036 **** # builddir for the .java files. h=`${PWDCMD-pwd}` : > deps.mk ! ( (cd $srcdir && find . \( -name '*.java' -o -name '*.cc' \) -print) ; ! find . \( -name '*.java' -o -name '*.cc' \) -print) | \ fgrep -v testsuite | \ ! sed -e 's/\.java/.d/'\;'s/\.cc/.d/' | \ while read f; do echo "include $f" >> deps.mk test -f $f || { --- 1225,1234 ---- # builddir for the .java files. h=`${PWDCMD-pwd}` : > deps.mk ! ( (cd $srcdir && find . \( -name '*.java' -o -name '*.cc' -o -name '*.c' \) -print) ; ! find . \( -name '*.java' -o -name '*.cc' -o -name '*.c' \) -print) | \ fgrep -v testsuite | \ ! sed -e 's/\.java/.d/'\;'s/\.cc/.d/'\;'s/\.c/.d/' | \ while read f; do echo "include $f" >> deps.mk test -f $f || { diff -Nrc3pad gcc-3.3.3/libjava/defineclass.cc gcc-3.4.0/libjava/defineclass.cc *** gcc-3.3.3/libjava/defineclass.cc 2002-12-19 19:32:16.000000000 +0000 --- gcc-3.4.0/libjava/defineclass.cc 2003-10-24 09:29:41.000000000 +0000 *************** *** 1,6 **** // defineclass.cc - defining a class from .class format. ! /* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation This file is part of libgcj. --- 1,6 ---- // defineclass.cc - defining a class from .class format. ! /* Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation This file is part of libgcj. *************** struct _Jv_ClassReader { *** 75,81 **** // allways on. You always want this as far as I can see, but it also // controls weither identifiers and type descriptors/signatures are // verified as legal. This could be somewhat more expensive since it ! // will call Characher.isJavaIdentifier{Start,Part} for each character // in any identifier (field name or method name) it comes by. Thus, // it might be useful to turn off this verification for classes that // come from a trusted source. However, for GCJ, trusted classes are --- 75,81 ---- // allways on. You always want this as far as I can see, but it also // controls weither identifiers and type descriptors/signatures are // verified as legal. This could be somewhat more expensive since it ! // will call Character.isJavaIdentifier{Start,Part} for each character // in any identifier (field name or method name) it comes by. Thus, // it might be useful to turn off this verification for classes that // come from a trusted source. However, for GCJ, trusted classes are *************** void _Jv_ClassReader::read_fields () *** 403,417 **** int name_index = read2u (); int descriptor_index = read2u (); int attributes_count = read2u (); ! check_tag (name_index, JV_CONSTANT_Utf8); prepare_pool_entry (name_index, JV_CONSTANT_Utf8); check_tag (descriptor_index, JV_CONSTANT_Utf8); prepare_pool_entry (descriptor_index, JV_CONSTANT_Utf8); ! handleField (i, access_flags, name_index, descriptor_index); ! for (int j = 0; j < attributes_count; j++) { read_one_field_attribute (i); --- 403,417 ---- int name_index = read2u (); int descriptor_index = read2u (); int attributes_count = read2u (); ! check_tag (name_index, JV_CONSTANT_Utf8); prepare_pool_entry (name_index, JV_CONSTANT_Utf8); check_tag (descriptor_index, JV_CONSTANT_Utf8); prepare_pool_entry (descriptor_index, JV_CONSTANT_Utf8); ! handleField (i, access_flags, name_index, descriptor_index); ! for (int j = 0; j < attributes_count; j++) { read_one_field_attribute (i); *************** void _Jv_ClassReader::handleField (int f *** 1071,1084 **** field->nameIndex = name; #endif ! if (verify) ! verify_identifier (field_name); ! ! // ignore flags we don't know about. field->flags = flags & Modifier::ALL_FLAGS; if (verify) { if (field->flags & (Modifier::SYNCHRONIZED | Modifier::NATIVE | Modifier::INTERFACE --- 1071,1095 ---- field->nameIndex = name; #endif ! // Ignore flags we don't know about. field->flags = flags & Modifier::ALL_FLAGS; + _Jv_Utf8Const* sig = pool_data[desc].utf8; + if (verify) { + verify_identifier (field_name); + + for (int i = 0; i < field_no; ++i) + { + if (_Jv_equalUtf8Consts (field_name, def->fields[i].name) + && _Jv_equalUtf8Consts (sig, + // We know the other fields are + // unresolved. + (_Jv_Utf8Const *) def->fields[i].type)) + throw_class_format_error ("duplicate field name"); + } + if (field->flags & (Modifier::SYNCHRONIZED | Modifier::NATIVE | Modifier::INTERFACE *************** void _Jv_ClassReader::handleField (int f *** 1091,1098 **** throw_class_format_error ("erroneous field access flags"); } - _Jv_Utf8Const* sig = pool_data[desc].utf8; - if (verify) _Jv_VerifyFieldSignature (sig); --- 1102,1107 ---- *************** void _Jv_ClassReader::handleMethod *** 1233,1238 **** --- 1242,1255 ---- _Jv_VerifyMethodSignature (method->signature); + for (int i = 0; i < mth_index; ++i) + { + if (_Jv_equalUtf8Consts (method->name, def->methods[i].name) + && _Jv_equalUtf8Consts (method->signature, + def->methods[i].signature)) + throw_class_format_error ("duplicate method"); + } + if (method->accflags & (Modifier::VOLATILE | Modifier::TRANSIENT | Modifier::INTERFACE)) *************** void _Jv_ClassReader::handleCodeAttribut *** 1253,1258 **** --- 1270,1276 ---- _Jv_InterpMethod *method = (_Jv_InterpMethod*) (_Jv_AllocBytes (size)); + method->deferred = NULL; method->max_stack = max_stack; method->max_locals = max_locals; method->code_length = code_length; *************** void _Jv_ClassReader::handleCodeAttribut *** 1267,1272 **** --- 1285,1299 ---- code_length); def->interpreted_methods[method_index] = method; + + if ((method->self->accflags & java::lang::reflect::Modifier::STATIC)) + { + // Precompute the ncode field for a static method. This lets us + // call a static method of an interpreted class from precompiled + // code without first resolving the class (that will happen + // during class initialization instead). + method->self->ncode = method->ncode (); + } } void _Jv_ClassReader::handleExceptionTableEntry *************** void _Jv_ClassReader::handleMethodsEnd ( *** 1302,1307 **** --- 1329,1345 ---- m->self = method; m->function = NULL; def->interpreted_methods[i] = m; + m->deferred = NULL; + + if ((method->accflags & Modifier::STATIC)) + { + // Precompute the ncode field for a static method. + // This lets us call a static method of an + // interpreted class from precompiled code without + // first resolving the class (that will happen + // during class initialization instead). + method->ncode = m->ncode (); + } } } else if ((method->accflags & Modifier::ABSTRACT) != 0) diff -Nrc3pad gcc-3.3.3/libjava/exception.cc gcc-3.4.0/libjava/exception.cc *** gcc-3.3.3/libjava/exception.cc 2002-04-06 04:19:10.000000000 +0000 --- gcc-3.4.0/libjava/exception.cc 2003-10-24 09:29:41.000000000 +0000 *************** details. */ *** 15,20 **** --- 15,23 ---- #include #include + #include + #include + #include #include #include *************** parse_lsda_header (_Unwind_Context *cont *** 158,164 **** return p; } ! static jclass get_ttype_entry (_Unwind_Context *context, lsda_header_info *info, long i) { _Unwind_Ptr ptr; --- 161,167 ---- return p; } ! static void ** get_ttype_entry (_Unwind_Context *context, lsda_header_info *info, long i) { _Unwind_Ptr ptr; *************** get_ttype_entry (_Unwind_Context *contex *** 166,172 **** i *= size_of_encoded_value (info->ttype_encoding); read_encoded_value (context, info->ttype_encoding, info->TType - i, &ptr); ! return reinterpret_cast(ptr); } --- 169,175 ---- i *= size_of_encoded_value (info->ttype_encoding); read_encoded_value (context, info->ttype_encoding, info->TType - i, &ptr); ! return reinterpret_cast(ptr); } *************** PERSONALITY_FUNCTION (int version, *** 333,344 **** { // Positive filter values are handlers. ! jclass catch_type = get_ttype_entry (context, &info, ar_filter); ! // The catch_type is either a (java::lang::Class*) or ! // is one more than a (Utf8Const*). ! if ((size_t)catch_type & 1) ! catch_type = _Jv_FindClass ((Utf8Const*)catch_type - 1, NULL); if (_Jv_IsInstanceOf (xh->value, catch_type)) { --- 336,349 ---- { // Positive filter values are handlers. ! void **catch_word = get_ttype_entry (context, &info, ar_filter); ! jclass catch_type = (jclass)*catch_word; ! // FIXME: This line is a kludge to work around exception ! // handlers written in C++, which don't yet use indirect ! // dispatch. ! if (catch_type == *(void **)&java::lang::Class::class$) ! catch_type = (jclass)catch_word; if (_Jv_IsInstanceOf (xh->value, catch_type)) { diff -Nrc3pad gcc-3.3.3/libjava/gcj/array.h gcc-3.4.0/libjava/gcj/array.h *** gcc-3.3.3/libjava/gcj/array.h 2001-01-15 08:11:40.000000000 +0000 --- gcc-3.4.0/libjava/gcj/array.h 2003-07-09 08:48:08.000000000 +0000 *************** *** 1,6 **** // array.h - Header file for CNI arrays. -*- c++ -*- ! /* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation This file is part of libgcj. --- 1,6 ---- // array.h - Header file for CNI arrays. -*- c++ -*- ! /* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation This file is part of libgcj. *************** public: *** 30,35 **** --- 30,43 ---- }; template + class JArray; + + template + inline T* elements(JArray& x); + template + inline T* elements(JArray* x); + + template class JArray : public __JArray { T data[0]; *************** inline T* elements(JArray& x) { retur *** 45,51 **** template inline T* elements(JArray* x) { return x->data; } ! }; // end extern "Java" /* These typesdefs match those in JNI. */ typedef __JArray *jarray; --- 53,59 ---- template inline T* elements(JArray* x) { return x->data; } ! } // end extern "Java" /* These typesdefs match those in JNI. */ typedef __JArray *jarray; *************** typedef JArray *jstringArray; *** 63,69 **** extern java::lang::Class _Jv_byteClass, _Jv_shortClass, _Jv_intClass, _Jv_longClass, _Jv_booleanClass, _Jv_charClass, _Jv_floatClass, _Jv_doubleClass, _Jv_voidClass; ! #define JvPrimClass(TYPE) (& _Jv_##TYPE##Class) extern "C" jobjectArray _Jv_NewObjectArray(jsize length, jclass, jobject init); extern "C" jobject _Jv_NewPrimArray (jclass eltype, jint count); --- 71,79 ---- extern java::lang::Class _Jv_byteClass, _Jv_shortClass, _Jv_intClass, _Jv_longClass, _Jv_booleanClass, _Jv_charClass, _Jv_floatClass, _Jv_doubleClass, _Jv_voidClass; ! /* The definition of this macro cannot be enclosed in parentheses ! because "JvPrimClass(x)" is used as a template argument. */ ! #define JvPrimClass(TYPE) & _Jv_##TYPE##Class extern "C" jobjectArray _Jv_NewObjectArray(jsize length, jclass, jobject init); extern "C" jobject _Jv_NewPrimArray (jclass eltype, jint count); diff -Nrc3pad gcc-3.3.3/libjava/gcj/cni.h gcc-3.4.0/libjava/gcj/cni.h *** gcc-3.3.3/libjava/gcj/cni.h 2002-04-10 20:36:02.000000000 +0000 --- gcc-3.4.0/libjava/gcj/cni.h 2003-07-08 21:27:37.000000000 +0000 *************** *** 1,5 **** // gcj/cni.h -*- c++ -*- ! // This file describes the Cygnus Native Interface, CNI. // It provides a nicer interface to many of the things in gcj/javaprims.h. /* Copyright (C) 1998, 1999, 2002 Free Software Foundation --- 1,5 ---- // gcj/cni.h -*- c++ -*- ! // This file describes the Compiled Native Interface, CNI. // It provides a nicer interface to many of the things in gcj/javaprims.h. /* Copyright (C) 1998, 1999, 2002 Free Software Foundation diff -Nrc3pad gcc-3.3.3/libjava/gcj/javaprims.h gcc-3.4.0/libjava/gcj/javaprims.h *** gcc-3.3.3/libjava/gcj/javaprims.h 2003-01-20 06:49:28.000000000 +0000 --- gcc-3.4.0/libjava/gcj/javaprims.h 2003-11-25 18:26:08.000000000 +0000 *************** *** 1,6 **** // javaprims.h - Main external header file for libgcj. -*- c++ -*- ! /* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation This file is part of libgcj. --- 1,6 ---- // javaprims.h - Main external header file for libgcj. -*- c++ -*- ! /* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation This file is part of libgcj. *************** extern "Java" *** 124,130 **** class ValidatorAndPriority; class WriteAbortedException; class Writer; ! }; namespace lang { --- 124,130 ---- class ValidatorAndPriority; class WriteAbortedException; class Writer; ! } namespace lang { *************** extern "Java" *** 223,229 **** class ReferenceQueue; class SoftReference; class WeakReference; ! }; namespace reflect { --- 223,229 ---- class ReferenceQueue; class SoftReference; class WeakReference; ! } namespace reflect { *************** extern "Java" *** 243,250 **** class Proxy$ProxyType; class ReflectPermission; class UndeclaredThrowableException; ! }; ! }; namespace util { --- 243,250 ---- class Proxy$ProxyType; class ReflectPermission; class UndeclaredThrowableException; ! } ! } namespace util { *************** extern "Java" *** 291,296 **** --- 291,297 ---- class Collections$UnmodifiableSortedSet; class Comparator; class ConcurrentModificationException; + class Currency; class Date; class Dictionary; class EmptyStackException; *************** extern "Java" *** 371,384 **** class JarInputStream; class JarOutputStream; class Manifest; ! }; namespace regex { class Matcher; class Pattern; class PatternSyntaxException; ! }; namespace zip { --- 372,418 ---- class JarInputStream; class JarOutputStream; class Manifest; ! } ! ! namespace logging ! { ! class ConsoleHandler; ! class ErrorManager; ! class FileHandler; ! class Filter; ! class Formatter; ! class Handler; ! class Level; ! class LogManager; ! class LogRecord; ! class Logger; ! class LoggingPermission; ! class MemoryHandler; ! class SimpleFormatter; ! class SocketHandler; ! class StreamHandler; ! class XMLFormatter; ! } ! ! namespace prefs ! { ! class AbstractPreferences; ! class BackingStoreException; ! class InvalidPreferencesFormatException; ! class NodeChangeEvent; ! class NodeChangeListener; ! class PreferenceChangeEvent; ! class PreferenceChangeListener; ! class Preferences; ! class PreferencesFactory; ! } namespace regex { class Matcher; class Pattern; class PatternSyntaxException; ! } namespace zip { *************** extern "Java" *** 402,411 **** class ZipFile$ZipEntryEnumeration; class ZipInputStream; class ZipOutputStream; ! }; ! }; ! }; ! }; typedef struct java::lang::Object* jobject; typedef class java::lang::Class* jclass; --- 436,445 ---- class ZipFile$ZipEntryEnumeration; class ZipInputStream; class ZipOutputStream; ! } ! } ! } ! } typedef struct java::lang::Object* jobject; typedef class java::lang::Class* jclass; *************** extern "C" void _Jv_RegisterClassHookDef *** 463,468 **** --- 497,503 ---- typedef unsigned short _Jv_ushort __attribute__((__mode__(__HI__))); typedef unsigned int _Jv_uint __attribute__((__mode__(__SI__))); + typedef unsigned int _Jv_ulong __attribute__((__mode__(__DI__))); struct _Jv_Utf8Const { diff -Nrc3pad gcc-3.3.3/libjava/gcj/Makefile.in gcc-3.4.0/libjava/gcj/Makefile.in *** gcc-3.3.3/libjava/gcj/Makefile.in 2003-03-01 22:57:52.000000000 +0000 --- gcc-3.4.0/libjava/gcj/Makefile.in 2004-01-13 17:37:23.000000000 +0000 *************** target_triplet = @target@ *** 66,71 **** --- 66,73 ---- AR = @AR@ AS = @AS@ BACKTRACESPEC = @BACKTRACESPEC@ + CAIRO_CFLAGS = @CAIRO_CFLAGS@ + CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CHECKREFSPEC = @CHECKREFSPEC@ COMPPATH = @COMPPATH@ *************** DIVIDESPEC = @DIVIDESPEC@ *** 76,81 **** --- 78,84 ---- DLLTOOL = @DLLTOOL@ EXCEPTIONSPEC = @EXCEPTIONSPEC@ EXEEXT = @EXEEXT@ + EXTRA_CC_FILES = @EXTRA_CC_FILES@ GCC_UNWIND_INCLUDE = @GCC_UNWIND_INCLUDE@ GCDEPS = @GCDEPS@ GCINCS = @GCINCS@ *************** GCLIBS = @GCLIBS@ *** 86,96 **** --- 89,111 ---- GCOBJS = @GCOBJS@ GCSPEC = @GCSPEC@ GCTESTSPEC = @GCTESTSPEC@ + GLIB_CFLAGS = @GLIB_CFLAGS@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GTK_CFLAGS = @GTK_CFLAGS@ + GTK_LIBS = @GTK_LIBS@ HASH_SYNC_SPEC = @HASH_SYNC_SPEC@ + HAVE_LIB = @HAVE_LIB@ IEEESPEC = @IEEESPEC@ INCLTDL = @INCLTDL@ INTERPRETER = @INTERPRETER@ JC1GCSPEC = @JC1GCSPEC@ + LIB = @LIB@ + LIBART_CFLAGS = @LIBART_CFLAGS@ + LIBART_CONFIG = @LIBART_CONFIG@ + LIBART_LIBS = @LIBART_LIBS@ LIBFFI = @LIBFFI@ LIBFFIINCS = @LIBFFIINCS@ LIBGCJDEBUG = @LIBGCJDEBUG@ *************** LIBICONV = @LIBICONV@ *** 102,125 **** --- 117,146 ---- LIBLTDL = @LIBLTDL@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ + LTLIB = @LTLIB@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ + PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ + PANGOFT2_LIBS = @PANGOFT2_LIBS@ PERL = @PERL@ + PKG_CONFIG = @PKG_CONFIG@ PLATFORMOBJS = @PLATFORMOBJS@ RANLIB = @RANLIB@ STRIP = @STRIP@ SYSDEP_SOURCES = @SYSDEP_SOURCES@ SYSTEMSPEC = @SYSTEMSPEC@ SYS_ZLIBS = @SYS_ZLIBS@ + THREADCXXFLAGS = @THREADCXXFLAGS@ THREADDEPS = @THREADDEPS@ THREADINCS = @THREADINCS@ THREADLDFLAGS = @THREADLDFLAGS@ THREADLIBS = @THREADLIBS@ THREADOBJS = @THREADOBJS@ THREADSPEC = @THREADSPEC@ + TOOLKIT = @TOOLKIT@ VERSION = @VERSION@ ZINCS = @ZINCS@ ZLIBS = @ZLIBS@ diff -Nrc3pad gcc-3.3.3/libjava/gij.cc gcc-3.4.0/libjava/gij.cc *** gcc-3.3.3/libjava/gij.cc 2002-10-25 03:28:00.000000000 +0000 --- gcc-3.4.0/libjava/gij.cc 2003-08-13 17:20:08.000000000 +0000 *************** *** 1,4 **** ! /* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation This file is part of libgcj. --- 1,4 ---- ! /* Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation This file is part of libgcj. *************** help () *** 31,37 **** printf (" --cp LIST set class path\n"); printf (" --classpath LIST set class path\n"); printf (" -DVAR=VAL define property VAR with value VAL\n"); ! printf (" --help print this help, then exit\n"); printf (" --ms=NUMBER set initial heap size\n"); printf (" --mx=NUMBER set maximum heap size\n"); printf (" --showversion print version number, then keep going\n"); --- 31,38 ---- printf (" --cp LIST set class path\n"); printf (" --classpath LIST set class path\n"); printf (" -DVAR=VAL define property VAR with value VAL\n"); ! printf (" -?, --help print this help, then exit\n"); ! printf (" -X print help on supported -X options, then exit\n"); printf (" --ms=NUMBER set initial heap size\n"); printf (" --mx=NUMBER set maximum heap size\n"); printf (" --showversion print version number, then keep going\n"); *************** main (int argc, const char **argv) *** 90,96 **** if (arg[1] == '-') ++arg; ! if (! strcmp (arg, "-help")) help (); else if (! strcmp (arg, "-version")) { --- 91,97 ---- if (arg[1] == '-') ++arg; ! if (! strcmp (arg, "-help") || ! strcmp (arg, "-?")) help (); else if (! strcmp (arg, "-version")) { *************** main (int argc, const char **argv) *** 132,137 **** --- 133,147 ---- // correct behavior. _Jv_Jar_Class_Path = argv[++i]; } + else if (arg[1] == 'X') + { + if (arg[2] == '\0') + { + printf ("gij: currently no -X options are recognized\n"); + exit (0); + } + /* Ignore other -X options. */ + } else { fprintf (stderr, "gij: unrecognized option -- `%s'\n", argv[i]); diff -Nrc3pad gcc-3.3.3/libjava/glib-2.0.m4 gcc-3.4.0/libjava/glib-2.0.m4 *** gcc-3.3.3/libjava/glib-2.0.m4 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/glib-2.0.m4 2003-06-30 23:53:28.000000000 +0000 *************** *** 0 **** --- 1,212 ---- + # Configure paths for GLIB + # Owen Taylor 1997-2001 + + dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) + dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject or + dnl gthread is specified in MODULES, pass to pkg-config + dnl + AC_DEFUN(AM_PATH_GLIB_2_0, + [dnl + dnl Get the cflags and libraries from pkg-config + dnl + AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program], + , enable_glibtest=yes) + + pkg_config_args=glib-2.0 + for module in . $4 + do + case "$module" in + gmodule) + pkg_config_args="$pkg_config_args gmodule-2.0" + ;; + gobject) + pkg_config_args="$pkg_config_args gobject-2.0" + ;; + gthread) + pkg_config_args="$pkg_config_args gthread-2.0" + ;; + esac + done + + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + + no_glib="" + + if test x$PKG_CONFIG != xno ; then + if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then + : + else + echo *** pkg-config too old; version 0.7 or better required. + no_glib=yes + PKG_CONFIG=no + fi + else + no_glib=yes + fi + + min_glib_version=ifelse([$1], ,2.0.0,$1) + AC_MSG_CHECKING(for GLIB - version >= $min_glib_version) + + if test x$PKG_CONFIG != xno ; then + ## don't try to run the test against uninstalled libtool libs + if $PKG_CONFIG --uninstalled $pkg_config_args; then + echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH" + enable_glibtest=no + fi + + if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then + : + else + no_glib=yes + fi + fi + + if test x"$no_glib" = x ; then + GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` + GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0` + GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` + + GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args` + GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args` + glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_glibtest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GLIB_CFLAGS" + LIBS="$GLIB_LIBS $LIBS" + dnl + dnl Now check if the installed GLIB is sufficiently new. (Also sanity + dnl checks the results of pkg-config to some extent) + dnl + rm -f conf.glibtest + AC_TRY_RUN([ + #include + #include + #include + + int + main () + { + int major, minor, micro; + char *tmp_version; + + system ("touch conf.glibtest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_glib_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_glib_version"); + exit(1); + } + + if ((glib_major_version != $glib_config_major_version) || + (glib_minor_version != $glib_config_minor_version) || + (glib_micro_version != $glib_config_micro_version)) + { + printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", + $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, + glib_major_version, glib_minor_version, glib_micro_version); + printf ("*** was found! If pkg-config was correct, then it is best\n"); + printf ("*** to remove the old version of GLib. You may also be able to fix the error\n"); + printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); + printf("*** required on your system.\n"); + printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); + printf("*** to point to the correct configuration files\n"); + } + else if ((glib_major_version != GLIB_MAJOR_VERSION) || + (glib_minor_version != GLIB_MINOR_VERSION) || + (glib_micro_version != GLIB_MICRO_VERSION)) + { + printf("*** GLIB header files (version %d.%d.%d) do not match\n", + GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); + printf("*** library (version %d.%d.%d)\n", + glib_major_version, glib_minor_version, glib_micro_version); + } + else + { + if ((glib_major_version > major) || + ((glib_major_version == major) && (glib_minor_version > minor)) || + ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", + glib_major_version, glib_minor_version, glib_micro_version); + printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n"); + printf("*** correct copy of pkg-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + } + return 1; + } + ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_glib" = x ; then + AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$PKG_CONFIG" = "no" ; then + echo "*** A new enough version of pkg-config was not found." + echo "*** See http://www.freedesktop.org/software/pkgconfig/" + else + if test -f conf.glibtest ; then + : + else + echo "*** Could not run GLIB test program, checking why..." + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GLIB_CFLAGS" + LIBS="$LIBS $GLIB_LIBS" + AC_TRY_LINK([ + #include + #include + ], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GLIB or finding the wrong" + echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GLIB is incorrectly installed."]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GLIB_CFLAGS="" + GLIB_LIBS="" + GLIB_GENMARSHAL="" + GOBJECT_QUERY="" + GLIB_MKENUMS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(GLIB_CFLAGS) + AC_SUBST(GLIB_LIBS) + AC_SUBST(GLIB_GENMARSHAL) + AC_SUBST(GOBJECT_QUERY) + AC_SUBST(GLIB_MKENUMS) + rm -f conf.glibtest + ]) diff -Nrc3pad gcc-3.3.3/libjava/gnu/awt/gtk/GtkButtonPeer.java gcc-3.4.0/libjava/gnu/awt/gtk/GtkButtonPeer.java *** gcc-3.3.3/libjava/gnu/awt/gtk/GtkButtonPeer.java 2001-01-12 23:08:23.000000000 +0000 --- gcc-3.4.0/libjava/gnu/awt/gtk/GtkButtonPeer.java 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,61 **** - /* GtkButtonPeer.java -- Implements ButtonPeer with GTK - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. - - This file is part of the peer AWT libraries of GNU Classpath. - - This library is free software; you can redistribute it and/or modify - it under the terms of the GNU Library General Public License as published - by the Free Software Foundation, either version 2 of the License, or - (at your option) any later verion. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; if not, write to the Free Software Foundation - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. */ - - - package gnu.awt.gtk; - - import java.awt.*; - import java.awt.event.MouseEvent; - import java.awt.event.KeyEvent; - import java.awt.peer.*; - - public class GtkButtonPeer extends GtkComponentPeer - implements ButtonPeer - { - protected native void create (); - public native void setLabel (String label); - - public GtkButtonPeer (Button b) - { - super (b); - } - - public void handleEvent (AWTEvent e) - { - // if (e.getID () == MouseEvent.MOUSE_CLICKED && isEnabled () - // && !modalHasGrab ()) - // { - // MouseEvent me = (MouseEvent) e; - // if (!me.isConsumed () - // && (me.getModifiers () & MouseEvent.BUTTON1_MASK) != 0) - // postActionEvent (((Button)awtComponent).getActionCommand (), - // me.getModifiers ()); - // } - - // if (e.getID () == KeyEvent.KEY_PRESSED) - // { - // KeyEvent ke = (KeyEvent) e; - // if (!ke.isConsumed () && ke.getKeyCode () == KeyEvent.VK_SPACE) - // postActionEvent (((Button)awtComponent).getActionCommand (), - // ke.getModifiers ()); - // } - - super.handleEvent (e); - } - } --- 0 ---- diff -Nrc3pad gcc-3.3.3/libjava/gnu/awt/gtk/gtkcommon.cc gcc-3.4.0/libjava/gnu/awt/gtk/gtkcommon.cc *** gcc-3.3.3/libjava/gnu/awt/gtk/gtkcommon.cc 2000-10-02 05:14:25.000000000 +0000 --- gcc-3.4.0/libjava/gnu/awt/gtk/gtkcommon.cc 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,14 **** - // -*- c++ -*- - // gtkutils.cc - Common functions for the gtk AWT peers. - - /* Copyright (C) 2000 Free Software Foundation - - This file is part of libgcj. - - This software is copyrighted work licensed under the terms of the - Libgcj License. Please consult the file "LIBGCJ_LICENSE" for - details. */ - - #include - - #include "gtkcommon.h" --- 0 ---- diff -Nrc3pad gcc-3.3.3/libjava/gnu/awt/gtk/gtkcommon.h gcc-3.4.0/libjava/gnu/awt/gtk/gtkcommon.h *** gcc-3.3.3/libjava/gnu/awt/gtk/gtkcommon.h 2001-01-12 23:08:23.000000000 +0000 --- gcc-3.4.0/libjava/gnu/awt/gtk/gtkcommon.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,85 **** - // -*- c++ -*- - // gtkutils.h - Common defines and inline functions for the gtk AWT peers. - - /* Copyright (C) 2000 Free Software Foundation - - This file is part of libgcj. - - This software is copyrighted work licensed under the terms of the - Libgcj License. Please consult the file "LIBGCJ_LICENSE" for - details. */ - - #ifndef __GTKCOMMON_H__ - #define __GTKCOMMON_H__ - - #include - #include - - #include - - class _Jv_GdkThreadLock - { - public: - _Jv_GdkThreadLock () - { - GDK_THREADS_ENTER (); - } - - ~_Jv_GdkThreadLock () - { - GDK_THREADS_LEAVE (); - } - }; - - // Convert AWT Color to gdk color value. - static inline void - _Jv_ConvertAwtColor(java::awt::Color* awtcolor, GdkColor* gdkcolor) - { - jint rgb = awtcolor->getRGB(); - gushort r = (rgb >> 16) & 0xFF; - gushort g = (rgb >> 8) & 0xFF; - gushort b = rgb & 0xFF; - - gdkcolor->red = (r << 8) + r; - gdkcolor->green = (g << 8) + g; - gdkcolor->blue = (b << 8) + b; - - // FIXME: Deal with colormap? gdk_color_alloc()? - } - - // Convert gdk color value to AWT Color. - static inline java::awt::Color* - _Jv_ConvertGtkColor (GdkColor* gdkcolor) - { - jint r = gdkcolor->red >> 8; - jint g = gdkcolor->green >> 8; - jint b = gdkcolor->blue >> 8; - - java::awt::Color *c = new java::awt::Color(r,g,b); - - return c; - } - - static inline void - _Jv_GdkScaleColor (GdkColor* oldc, GdkColor* newc, gfloat scale) - { - // FIXME: Need to deal with overflows or find a better way - *newc = *oldc; - newc->red += (gushort) (newc->red * scale); - newc->green += (gushort) (newc->green * scale); - newc->blue += (gushort) (newc->blue * scale); - } - - // Normally the X queue gets flushed automatically when gtk's event loop goes - // idle. However, some calls do not cause any activitity on the event loop, - // so we need to occasionally flush pending requests manually because we arn't - // running from the gtk_main thread. Note that gdk_flush calls XSync(), which - // is more than what is needed here. - static inline void - _Jv_FlushRequests () - { - // FIXME: What about platforms that arn't X? - XFlush (GDK_DISPLAY ()); - } - - #endif /* __GTKUTILS_H__ */ --- 0 ---- diff -Nrc3pad gcc-3.3.3/libjava/gnu/awt/gtk/GtkComponentPeer.java gcc-3.4.0/libjava/gnu/awt/gtk/GtkComponentPeer.java *** gcc-3.3.3/libjava/gnu/awt/gtk/GtkComponentPeer.java 2000-10-02 05:14:25.000000000 +0000 --- gcc-3.4.0/libjava/gnu/awt/gtk/GtkComponentPeer.java 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,269 **** - /* GtkComponentPeer.java -- Implements ComponentPeer with GTK - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. - - This file is part of the peer AWT libraries of GNU Classpath. - - This library is free software; you can redistribute it and/or modify - it under the terms of the GNU Library General Public License as published - by the Free Software Foundation, either version 2 of the License, or - (at your option) any later verion. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; if not, write to the Free Software Foundation - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. */ - - - package gnu.awt.gtk; - - import java.awt.*; - import java.awt.event.*; - import java.awt.image.*; - import java.awt.peer.ComponentPeer; - - public abstract class GtkComponentPeer implements ComponentPeer - { - // We need to put a reference to the Event Queue somewhere. This seems like - // a convenient place. - static EventQueue eventQueue = new EventQueue(); - - Component awtComponent; - gnu.gcj.RawData ptr; // Actual gtk object. - - static - { - // This will start the main toolkit thread. - GtkToolkit.instance.init(); - } - - public int checkImage (Image image, int width, int height, - ImageObserver observer) - { - return -1; - /* - GtkImage i = (GtkImage) image; - return i.checkImage (); - */ - } - - public Image createImage (ImageProducer producer) - { - return null; - //return new GtkImage (producer, null); - } - - public Image createImage (int width, int height) - { - return null; - /* - GdkGraphics g = new GdkGraphics (width, height); - return new GtkOffScreenImage (null, g, width, height); - */ - } - - public void disable () - { - setEnabled (false); - } - - native public void dispose (); - - public void enable () - { - setEnabled (true); - } - - /** - * Get the graphics configuration of the component. The color model - * of the component can be derived from the configuration. - */ - public GraphicsConfiguration getGraphicsConfiguration () - { - return null; - } - - public FontMetrics getFontMetrics (Font font) - { - return null; - //return new GdkFontMetrics (font); - } - - public Graphics getGraphics () - { - throw new InternalError (); - } - - public native Point getLocationOnScreen (); - public native Dimension getMinimumSize(); - public native Dimension getPreferredSize(); - - public Toolkit getToolkit () - { - return GtkToolkit.instance; - } - - public void handleEvent(AWTEvent e) - { - } - - public void hide () - { - setVisible (false); - } - - public void show () - { - setVisible (true); - } - - public boolean isFocusTraversable () - { - return true; - } - - public Dimension minimumSize () - { - return getMinimumSize(); - } - - public Dimension preferredSize() - { - return getPreferredSize(); - } - - public void paint (Graphics g) - { - awtComponent.paint (g); // ??? - } - - public boolean prepareImage (Image image, int width, int height, - ImageObserver observer) - { - /* - GtkImage i = (GtkImage) image; - - if (i.isLoaded ()) return true; - - class PrepareImage extends Thread - { - GtkImage image; - ImageObserver observer; - - PrepareImage (GtkImage image, ImageObserver observer) - { - this.image = image; - this.observer = observer; - } - - public void run () - { - // XXX: need to return data to image observer - image.source.startProduction (null); - } - } - - new PrepareImage (i, observer).start (); - */ - return false; - } - - public void print (Graphics g) - { - throw new RuntimeException (); - } - - native public void requestFocus (); - - public void repaint (long tm, int x, int y, int width, int height) - { - // ??? - eventQueue.postEvent (new PaintEvent ( - awtComponent, PaintEvent.UPDATE, new Rectangle (x, y, width, height))); - } - - - public void reshape (int x, int y, int width, int height) - { - setBounds (x, y, width, height); - } - - public native void setBounds (int x, int y, int width, int height); - public native void setCursor (Cursor cursor); - - public native void setEnabled (boolean b); - - public native void setEventMask(long eventMask); - public native void setFont(Font font); - public native void setForeground(Color color); - public native void setBackground (Color c); - public native void setVisible(boolean visible); - - native void realize(); - - protected GtkComponentPeer (Component awtComponent) - { - this.awtComponent = awtComponent; - create(); - - // TODO: Each of these calls will currently perform a separate native lock. - // It may be desirable to use our own, recusive mutex implementation by - // passing our threads implementation to g_threads_init(). - // This would greatly reduce locking calls in the peer code, and allow us - // to aquire the lock from java code. - Rectangle r = awtComponent.getBounds(); - setBounds (r.x, r.y, r.width, r.height); - - Color c = awtComponent.getForeground(); - if (c != null) - setForeground (c); - c = awtComponent.getBackground(); - if (c != null) - setBackground (c); - setEnabled (awtComponent.isEnabled()); - Font f = awtComponent.getFont(); - if (f != null) - setFont (awtComponent.getFont()); - - realize(); - } - - protected native void create (); - - // FIXME: It may make sense to do the following directly from the native - // code. - protected void postMouseEvent(int id, long when, int mods, int x, int y, - int clickCount, boolean popupTrigger) - { - eventQueue.postEvent(new MouseEvent(awtComponent, id, when, mods, x, y, - clickCount, popupTrigger)); - } - - protected void postExposeEvent (int x, int y, int width, int height) - { - eventQueue.postEvent (new PaintEvent (awtComponent, PaintEvent.PAINT, - new Rectangle (x, y, width, height))); - } - - protected void postKeyEvent (int id, long when, int mods, - int keyCode, char keyChar) - { - eventQueue.postEvent (new KeyEvent (awtComponent, id, when, mods, - keyCode, keyChar)); - } - - protected void postFocusEvent (int id, boolean temporary) - { - eventQueue.postEvent (new FocusEvent (awtComponent, id, temporary)); - } - - protected void postItemEvent (Object item, int stateChange) - { - eventQueue.postEvent (new ItemEvent ((ItemSelectable)awtComponent, - ItemEvent.ITEM_STATE_CHANGED, - item, stateChange)); - } - } --- 0 ---- diff -Nrc3pad gcc-3.3.3/libjava/gnu/awt/gtk/GtkContainerPeer.java gcc-3.4.0/libjava/gnu/awt/gtk/GtkContainerPeer.java *** gcc-3.3.3/libjava/gnu/awt/gtk/GtkContainerPeer.java 2000-10-02 05:14:25.000000000 +0000 --- gcc-3.4.0/libjava/gnu/awt/gtk/GtkContainerPeer.java 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,55 **** - /* GtkContainerPeer.java -- Implements ContainerPeer with GTK - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. - - This file is part of the peer AWT libraries of GNU Classpath. - - This library is free software; you can redistribute it and/or modify - it under the terms of the GNU Library General Public License as published - by the Free Software Foundation, either version 2 of the License, or - (at your option) any later verion. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; if not, write to the Free Software Foundation - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. */ - - - package gnu.awt.gtk; - - import java.awt.*; - import java.awt.event.*; - import java.awt.peer.ContainerPeer; - - public abstract class GtkContainerPeer extends GtkComponentPeer - implements ContainerPeer - { - // FIXME? - static Insets insets = new Insets(0,0,0,0); - - protected GtkContainerPeer (Container awtContainer) - { - super (awtContainer); - } - - public Insets getInsets() - { - // FIXME? - return insets; - } - - public void beginValidate() - { - // FIXME - } - - public void endValidate() - { - // FIXME - } - - protected native void create(); - } --- 0 ---- diff -Nrc3pad gcc-3.3.3/libjava/gnu/awt/gtk/GtkFramePeer.java gcc-3.4.0/libjava/gnu/awt/gtk/GtkFramePeer.java *** gcc-3.3.3/libjava/gnu/awt/gtk/GtkFramePeer.java 2000-10-02 05:14:25.000000000 +0000 --- gcc-3.4.0/libjava/gnu/awt/gtk/GtkFramePeer.java 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,42 **** - /* GtkFramePeer.java -- Implements FramePeer with GTK - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. - - This file is part of the peer AWT libraries of GNU Classpath. - - This library is free software; you can redistribute it and/or modify - it under the terms of the GNU Library General Public License as published - by the Free Software Foundation, either version 2 of the License, or - (at your option) any later verion. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; if not, write to the Free Software Foundation - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. */ - - - package gnu.awt.gtk; - - import java.awt.*; - import java.awt.event.*; - import java.awt.peer.FramePeer; - - public class GtkFramePeer extends GtkWindowPeer - implements FramePeer - { - protected GtkFramePeer (Frame awtFrame) - { - super (awtFrame); - //init (); - } - - public native void setIconImage(Image image); - public native void setMenuBar(MenuBar mb); - public native void setResizable(boolean resizable); - public native void setTitle(String title); - - protected native void create(); - } --- 0 ---- diff -Nrc3pad gcc-3.3.3/libjava/gnu/awt/gtk/GtkLabelPeer.java gcc-3.4.0/libjava/gnu/awt/gtk/GtkLabelPeer.java *** gcc-3.3.3/libjava/gnu/awt/gtk/GtkLabelPeer.java 2001-01-12 23:08:23.000000000 +0000 --- gcc-3.4.0/libjava/gnu/awt/gtk/GtkLabelPeer.java 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,37 **** - /* GtkLabelPeer.java -- Implements LabelPeer with GTK - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. - - This file is part of the peer AWT libraries of GNU Classpath. - - This library is free software; you can redistribute it and/or modify - it under the terms of the GNU Library General Public License as published - by the Free Software Foundation, either version 2 of the License, or - (at your option) any later verion. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; if not, write to the Free Software Foundation - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. */ - - - package gnu.awt.gtk; - - import java.awt.*; - import java.awt.peer.*; - - public class GtkLabelPeer extends GtkComponentPeer - implements LabelPeer - { - public GtkLabelPeer (Label l) - { - super (l); - } - - public native void setText (String text); - public native void setAlignment (int alignment); - protected native void create (); - } --- 0 ---- diff -Nrc3pad gcc-3.3.3/libjava/gnu/awt/gtk/GtkMainThread.java gcc-3.4.0/libjava/gnu/awt/gtk/GtkMainThread.java *** gcc-3.3.3/libjava/gnu/awt/gtk/GtkMainThread.java 2000-10-02 05:14:25.000000000 +0000 --- gcc-3.4.0/libjava/gnu/awt/gtk/GtkMainThread.java 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,36 **** - /* GtkMainThread.java -- Runs gtk_main() - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. - - This file is part of the peer AWT libraries of GNU Classpath. - - This library is free software; you can redistribute it and/or modify - it under the terms of the GNU Library General Public License as published - by the Free Software Foundation, either version 2 of the License, or - (at your option) any later verion. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; if not, write to the Free Software Foundation - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. */ - - - package gnu.awt.gtk; - - public class GtkMainThread extends Thread - { - native void gtkMain(); - - public GtkMainThread() - { - super ("GtkMain"); - } - - public void run() - { - gtkMain(); - } - } --- 0 ---- diff -Nrc3pad gcc-3.3.3/libjava/gnu/awt/gtk/GtkToolkit.java gcc-3.4.0/libjava/gnu/awt/gtk/GtkToolkit.java *** gcc-3.3.3/libjava/gnu/awt/gtk/GtkToolkit.java 2000-10-02 05:14:25.000000000 +0000 --- gcc-3.4.0/libjava/gnu/awt/gtk/GtkToolkit.java 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,314 **** - /* GtkToolkit.java -- Implements an AWT Toolkit using GTK for peers - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. - - This file is part of the peer AWT libraries of GNU Classpath. - - This library is free software; you can redistribute it and/or modify - it under the terms of the GNU Library General Public License as published - by the Free Software Foundation, either version 2 of the License, or - (at your option) any later verion. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; if not, write to the Free Software Foundation - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. */ - - - package gnu.awt.gtk; - - import java.awt.*; - import java.net.*; - import java.util.Hashtable; - import java.util.Properties; - import java.util.MissingResourceException; - import java.awt.datatransfer.*; - import java.awt.image.*; - import java.awt.peer.*; - - public class GtkToolkit extends java.awt.Toolkit - { - static GtkMainThread gtkthread; - static EventQueue evtqueue; - static Hashtable containers = new Hashtable(); - static Clipboard systemClipboard; - static GtkToolkit instance = null; - - public GtkToolkit () - { - gtkInit(); - instance = this; - //systemClipboard = new GtkClipboard (); - } - - // Start the thread to run the GTK event loop. This is called from - // a GtkComponentPeer static initializer. - void init () - { - gtkthread = new GtkMainThread (); - gtkthread.start(); - } - - static native void gtkInit(); - - native public void beep (); - - public int checkImage (Image image, int width, int height, - ImageObserver observer) - { - return ImageObserver.ALLBITS; - - // GtkImage i = (GtkImage) image; - // return i.checkImage (); - } - - public Image createImage(String filename) - { - return null; - } - - public Image createImage(URL url) - { - return null; - } - - public Image createImage (ImageProducer producer) - { - // return new GtkImage (producer, null); - return null; - } - - public Image createImage (byte[] imagedata, int imageoffset, - int imagelength) - { - System.out.println ("createImage byte[] NOT SUPPORTED"); - return null; - } - - public ColorModel getColorModel () - { - return ColorModel.getRGBdefault (); - } - - public String[] getFontList () - { - return (new String[] { "Dialog", - "DialogInput", - "Monospaced", - "Serif", - "SansSerif" }); - } - - public FontMetrics getFontMetrics (Font font) - { - // return new GdkFontMetrics (font); - return null; - } - - public Image getImage (String filename) - { - // return new GtkImage (new GdkPixbufDecoder (filename), null); - return null; - } - - public Image getImage (URL url) - { - // return new GtkImage (new GdkPixbufDecoder (url), null); - return null; - } - - /* - public PrintJob getPrintJob (Frame frame, String jobtitle, Properties props) - { - return null; - } - */ - native public int getScreenResolution(); - - native public Dimension getScreenSize (); - - public Clipboard getSystemClipboard() - { - return systemClipboard; - } - - public boolean prepareImage (Image image, int width, int height, - ImageObserver observer) - { - return false; - } - - native public void sync (); - - protected void setComponentState (Component c, GtkComponentPeer cp) - { - /* Make the Peer reflect the state of the Component */ - if (! (c instanceof Window)) - { - cp.setCursor (c.getCursor ()); - - Rectangle bounds = c.getBounds (); - cp.setBounds (bounds.x, bounds.y, bounds.width, bounds.height); - if (c instanceof Canvas) - System.out.println ("width " + bounds.width + " height " + bounds.height); - - cp.setVisible (c.isVisible ()); - } - } - - protected ButtonPeer createButton (Button b) - { - return null; - /* - GtkButtonPeer bp = new GtkButtonPeer (b); - Rectangle bounds = b.getBounds (); - bp.setBounds (bounds.x, bounds.y, bounds.width, bounds.height); - return bp; - */ - } - - protected CanvasPeer createCanvas (Canvas c) - { - // return new GtkCanvasPeer (c); - return null; - } - - protected CheckboxPeer createCheckbox (Checkbox cb) - { - return null; - /* - if (cb.getCheckboxGroup () != null) - return new GtkRadioButtonPeer (cb); - else - return new GtkCheckButtonPeer (cb); - */ - } - - protected CheckboxMenuItemPeer createCheckboxMenuItem (CheckboxMenuItem cmi) - { - return null; - //return new GtkCheckboxMenuItemPeer (cmi); - } - - protected ChoicePeer createChoice (Choice c) - { - return null; - //return new GtkChoicePeer (c); - } - - protected DialogPeer createDialog (Dialog d) - { - return null; - //return new GtkDialogPeer (d); - } - - protected FileDialogPeer createFileDialog (FileDialog fd) - { - return null; - //return new GtkFileDialogPeer (fd); - } - - protected FramePeer createFrame (Frame f) - { - return new GtkFramePeer (f); - } - - protected LabelPeer createLabel (Label label) - { - return null; - //return new GtkLabelPeer (label); - } - - protected ListPeer createList (List list) - { - return null; - //return new GtkListPeer (list); - } - - protected MenuPeer createMenu (Menu m) - { - return null; - //return new GtkMenuPeer (m); - } - - protected MenuBarPeer createMenuBar (MenuBar mb) - { - return null; - //return new GtkMenuBarPeer (mb); - } - - protected MenuItemPeer createMenuItem (MenuItem mi) - { - return null; - //return new GtkMenuItemPeer (mi); - } - - protected PanelPeer createPanel (Panel p) - { - return null; - //return new GtkPanelPeer (p); - } - - protected PopupMenuPeer createPopupMenu (PopupMenu target) - { - return null; - //return new GtkPopupMenuPeer (target); - } - - protected ScrollPanePeer createScrollPane (ScrollPane sp) - { - return null; - //return new GtkScrollPanePeer (sp); - } - - protected ScrollbarPeer createScrollbar (Scrollbar sb) - { - return null; - //return new GtkScrollbarPeer (sb); - } - - protected TextAreaPeer createTextArea (TextArea ta) - { - return null; - //return new GtkTextAreaPeer (ta); - } - - protected TextFieldPeer createTextField (TextField tf) - { - return null; - //return new GtkTextFieldPeer (tf); - } - - protected WindowPeer createWindow (Window w) - { - return new GtkWindowPeer (w); - } - - protected FontPeer getFontPeer (String name, int style) - { - return null; - /* - try - { - GtkFontPeer fp = new GtkFontPeer (name, style); - return fp; - } - catch (MissingResourceException ex) - { - return null; - } - */ - } - - protected EventQueue getSystemEventQueueImpl() - { - return GtkComponentPeer.eventQueue; - } - - protected void loadSystemColors (int[] systemColors) - { - } - } --- 0 ---- diff -Nrc3pad gcc-3.3.3/libjava/gnu/awt/gtk/GtkWindowPeer.java gcc-3.4.0/libjava/gnu/awt/gtk/GtkWindowPeer.java *** gcc-3.3.3/libjava/gnu/awt/gtk/GtkWindowPeer.java 2000-10-02 05:14:25.000000000 +0000 --- gcc-3.4.0/libjava/gnu/awt/gtk/GtkWindowPeer.java 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,39 **** - /* GtkWindowPeer.java -- Implements WindowPeer with GTK - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. - - This file is part of the peer AWT libraries of GNU Classpath. - - This library is free software; you can redistribute it and/or modify - it under the terms of the GNU Library General Public License as published - by the Free Software Foundation, either version 2 of the License, or - (at your option) any later verion. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; if not, write to the Free Software Foundation - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. */ - - - package gnu.awt.gtk; - - import java.awt.*; - import java.awt.event.*; - import java.awt.peer.WindowPeer; - - public class GtkWindowPeer extends GtkContainerPeer - implements WindowPeer - { - protected GtkWindowPeer (Window awtWindow) - { - super (awtWindow); - } - - public native void toBack(); - public native void toFront(); - - protected native void create(); - } --- 0 ---- diff -Nrc3pad gcc-3.3.3/libjava/gnu/awt/gtk/natGtkButtonPeer.cc gcc-3.4.0/libjava/gnu/awt/gtk/natGtkButtonPeer.cc *** gcc-3.3.3/libjava/gnu/awt/gtk/natGtkButtonPeer.cc 2001-01-12 23:08:23.000000000 +0000 --- gcc-3.4.0/libjava/gnu/awt/gtk/natGtkButtonPeer.cc 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,52 **** - // Native Gtk AWT button code - - #include - - #include - - #include "gtkcommon.h" - #include - #include - - void - gnu::awt::gtk::GtkButtonPeer::setLabel (java::lang::String *label) - { - _Jv_GdkThreadLock sync; - jsize len = 0; - if (label) - len = JvGetStringUTFLength (label); - char buf[len + 1]; - // FIXME: this can allocate an unbounded amount. Should use heap - // even though it is slower. - if (label) - JvGetStringUTFRegion (label, 0, len, buf); - buf[len] = '\0'; - // The button child is a label. - GtkBin *bin = GTK_BIN (ptr); - gtk_label_set_text (GTK_LABEL (bin->child), buf); - } - - void - gnu::awt::gtk::GtkButtonPeer::create () - { - if (! ptr) - { - _Jv_GdkThreadLock sync; - // This is a little inefficient. - ptr = (gnu::gcj::RawData *) gtk_button_new_with_label (""); - - using namespace ::java::awt; - Button *button = reinterpret_cast
      ** @return the initialization string for this object in Java. **/ ! public abstract String getJavaInitializationString(); } --- 205,209 ---- **
    ** @return the initialization string for this object in Java. **/ ! String getJavaInitializationString(); } diff -Nrc3pad gcc-3.3.3/libjava/java/beans/PropertyEditorManager.java gcc-3.4.0/libjava/java/beans/PropertyEditorManager.java *** gcc-3.3.3/libjava/java/beans/PropertyEditorManager.java 2002-01-22 22:40:11.000000000 +0000 --- gcc-3.4.0/libjava/java/beans/PropertyEditorManager.java 2003-07-14 05:33:30.000000000 +0000 *************** exception statement from your version. * *** 39,161 **** package java.beans; import gnu.java.lang.ClassHelper; /** ! ** PropertyEditorManager is used to find property editors ! ** for various types (not necessarily Beans).

    ! ** ! ** It first checks to see if the property editor is ! ** already registered; if it is, that property editor is ! ** used. Next it takes the type's classname and appends ! ** "Editor" to it, and searches first in the class's ! ** package and then in the property editor search path.

    ! ** ! ** Default property editors are provided for:

    ! **

      ! **
    1. boolean, byte, short, int, long, float, and double
    2. ! **
    3. java.lang.String
    4. ! **
    5. java.awt.Color
    6. ! **
    7. java.awt.Font
    8. ! **
        ! ** ! ** Spec Suggestion: Perhaps an editor for ! ** Filename or something like it should be provided. As well ! ** as char. ! ** ! ** @author John Keiser ! ** @since JDK1.1 ! ** @version 1.1.0, 29 Jul 1998 ! **/ ! ! public class PropertyEditorManager { ! static java.util.Hashtable editors = new java.util.Hashtable(); ! static String[] editorSearchPath = {"gnu.java.beans.editors","sun.beans.editors"}; ! static { ! registerEditor(java.lang.Boolean.TYPE, gnu.java.beans.editors.NativeBooleanEditor.class); ! registerEditor(java.lang.Byte.TYPE, gnu.java.beans.editors.NativeByteEditor.class); ! registerEditor(java.lang.Short.TYPE, gnu.java.beans.editors.NativeShortEditor.class); ! registerEditor(java.lang.Integer.TYPE, gnu.java.beans.editors.NativeIntEditor.class); ! registerEditor(java.lang.Long.TYPE, gnu.java.beans.editors.NativeLongEditor.class); ! registerEditor(java.lang.Float.TYPE, gnu.java.beans.editors.NativeFloatEditor.class); ! registerEditor(java.lang.Double.TYPE, gnu.java.beans.editors.NativeDoubleEditor.class); ! registerEditor(java.lang.String.class, gnu.java.beans.editors.StringEditor.class); ! registerEditor(java.awt.Color.class, gnu.java.beans.editors.ColorEditor.class); ! registerEditor(java.awt.Font.class, gnu.java.beans.editors.FontEditor.class); ! } ! /** Beats me why this class can be instantiated, but there ! ** you have it. ! **/ ! public PropertyEditorManager() { } ! /** Register an editor for a class. Replaces old editor ! ** if there was one registered before. ! ** @param editedClass the class that the property editor ! ** will edit. ! ** @param editorClass the PropertyEditor class. ! **/ ! public static void registerEditor(Class editedClass, Class editorClass) { ! editors.put(editedClass, editorClass); ! } ! /** Returns a new instance of the property editor for the ! ** specified class. ! ** @param editedClass the class that the property editor ! ** will edit. ! ** @return a PropertyEditor instance that can edit the ! ** specified class. ! **/ ! public static PropertyEditor findEditor(Class editedClass) { ! try { ! Class found = (Class)editors.get(editedClass); ! if(found != null) { ! return (PropertyEditor)found.newInstance(); ! } ! try { ! found = Class.forName(editedClass.getName()+"Editor"); ! registerEditor(editedClass,found); ! return (PropertyEditor)found.newInstance(); ! } catch(ClassNotFoundException E) { ! } ! String appendName = "." + ClassHelper.getTruncatedClassName(editedClass) + "Editor"; ! synchronized(editorSearchPath) { ! for(int i=0;i ! * ! * It first checks to see if the property editor is ! * already registered; if it is, that property editor is ! * used. Next it takes the type's classname and appends ! * "Editor" to it, and searches first in the class's ! * package and then in the property editor search path.

        ! * ! * Default property editors are provided for:

        ! *

          ! *
        1. boolean, byte, short, int, long, float, and double
        2. ! *
        3. java.lang.String
        4. ! *
        5. java.awt.Color
        6. ! *
        7. java.awt.Font
        8. ! *
            ! * ! * Spec Suggestion: Perhaps an editor for ! * Filename or something like it should be provided. As well ! * as char. ! * ! * @author John Keiser ! * @since 1.1 ! * @version 1.1.0, 29 Jul 1998 ! */ ! public class PropertyEditorManager ! { ! static java.util.Hashtable editors = new java.util.Hashtable(); ! static String[] editorSearchPath = { "gnu.java.beans.editors", ! "sun.beans.editors" }; ! static ! { ! registerEditor(Boolean.TYPE, NativeBooleanEditor.class); ! registerEditor(Byte.TYPE, NativeByteEditor.class); ! registerEditor(Short.TYPE, NativeShortEditor.class); ! registerEditor(Integer.TYPE, NativeIntEditor.class); ! registerEditor(Long.TYPE, NativeLongEditor.class); ! registerEditor(Float.TYPE, NativeFloatEditor.class); ! registerEditor(Double.TYPE, NativeDoubleEditor.class); ! registerEditor(String.class, StringEditor.class); ! registerEditor(Color.class, ColorEditor.class); ! registerEditor(Font.class, FontEditor.class); ! } ! /** ! * Beats me why this class can be instantiated, but there ! * you have it. ! */ ! public PropertyEditorManager() ! { ! // Do nothing here ! } ! /** ! * Register an editor for a class. Replaces old editor ! * if there was one registered before. ! * ! * @param editedClass the class that the property editor ! * will edit. ! * @param editorClass the PropertyEditor class. ! */ ! public static void registerEditor(Class editedClass, Class editorClass) ! { ! editors.put(editedClass, editorClass); ! } ! /** ! * Returns a new instance of the property editor for the ! * specified class. ! * ! * @param editedClass the class that the property editor ! * will edit. ! * @return a PropertyEditor instance that can edit the ! * specified class. ! */ ! public static PropertyEditor findEditor(Class editedClass) ! { ! try ! { ! Class found = (Class)editors.get(editedClass); ! if(found != null) ! { ! return (PropertyEditor)found.newInstance(); ! } ! ClassLoader contextClassLoader ! = Thread.currentThread().getContextClassLoader(); ! try ! { ! found = Class.forName(editedClass.getName()+"Editor", true, ! contextClassLoader); ! registerEditor(editedClass,found); ! return (PropertyEditor)found.newInstance(); ! } ! catch(ClassNotFoundException E) ! { ! } ! String appendName ! = "." ! + ClassHelper.getTruncatedClassName(editedClass) ! + "Editor"; ! synchronized(editorSearchPath) ! { ! for(int i=0;iBufferedOutputStream instance ! * that will write to the specified subordinate OutputStream ! * and which will use a default buffer size of 512 bytes. ! * ! * @param out The underlying OutputStream to write data to ! */ ! public ! BufferedOutputStream(OutputStream out) ! { ! this(out, DEFAULT_BUFFER_SIZE); ! } ! /*************************************************************************/ ! /** ! * This method initializes a new BufferedOutputStream instance ! * that will write to the specified subordinate OutputStream ! * and which will use the specified buffer size ! * ! * @param out The underlying OutputStream to write data to ! * @param size The size of the internal buffer ! */ ! public ! BufferedOutputStream(OutputStream out, int size) ! { ! super(out); ! buf = new byte[size]; ! } ! /*************************************************************************/ ! /* ! * Instance Methods ! */ ! /** ! * This method causes any currently buffered bytes to be immediately ! * written to the underlying output stream. ! * ! * @exception IOException If an error occurs */ - public synchronized void - flush() throws IOException - { - if (count == 0) - return; - - out.write(buf, 0, count); - count = 0; - out.flush(); - } - - /*************************************************************************/ ! /* ! * This method flushes any remaining buffered bytes then closes the ! * underlying output stream. Any further attempts to write to this stream ! * may throw an exception ! * ! public synchronized void ! close() throws IOException ! { ! flush(); ! out.close(); ! } ! */ ! ! /*************************************************************************/ ! ! /* ! * This method runs when the object is garbage collected. It is ! * responsible for ensuring that all buffered bytes are written and ! * for closing the underlying stream. ! * ! * @exception IOException If an error occurs (ignored by the Java runtime) ! * ! protected void ! finalize() throws IOException ! { ! close(); ! } ! */ ! ! /*************************************************************************/ ! ! /** ! * This method writes a single byte of data. This will be written to the ! * buffer instead of the underlying data source. However, if the buffer ! * is filled as a result of this write request, it will be flushed to the ! * underlying output stream. ! * ! * @param b The byte of data to be written, passed as an int ! * ! * @exception IOException If an error occurs */ - public synchronized void - write(int b) throws IOException - { - if (count == buf.length) - flush(); ! buf[count] = (byte)(b & 0xFF); ! ++count; ! } ! /*************************************************************************/ ! /** ! * This method writes len bytes from the byte array ! * buf starting at position offset in the buffer. ! * These bytes will be written to the internal buffer. However, if this ! * write operation fills the buffer, the buffer will be flushed to the ! * underlying output stream. ! * ! * @param buf The array of bytes to write. ! * @param offset The index into the byte array to start writing from. ! * @param len The number of bytes to write. ! * ! * @exception IOException If an error occurs ! */ ! public synchronized void ! write(byte[] buf, int offset, int len) throws IOException ! { ! // Buffer can hold everything. Note that the case where LEN < 0 ! // is automatically handled by the downstream write. ! if (len < (this.buf.length - count)) ! { ! System.arraycopy(buf, offset, this.buf, count, len); ! count += len; ! } ! else ! { ! // The write was too big. So flush the buffer and write the new ! // bytes directly to the underlying stream, per the JDK 1.2 ! // docs. ! flush(); ! out.write (buf, offset, len); ! } ! } } // class BufferedOutputStream --- 46,192 ---- * efficient mechanism for writing versus doing numerous small unbuffered * writes. * * @author Aaron M. Renn (arenn@urbanophile.com) */ public class BufferedOutputStream extends FilterOutputStream { + /** + * This is the default buffer size + */ + private static final int DEFAULT_BUFFER_SIZE = 512; ! /** ! * This is the internal byte array used for buffering output before ! * writing it. ! */ ! protected byte[] buf; ! /** ! * This is the number of bytes that are currently in the buffer and ! * are waiting to be written to the underlying stream. It always points to ! * the index into the buffer where the next byte of data will be stored ! */ ! protected int count; ! /** ! * This method initializes a new BufferedOutputStream instance ! * that will write to the specified subordinate OutputStream ! * and which will use a default buffer size of 512 bytes. ! * ! * @param out The underlying OutputStream to write data to ! */ ! public BufferedOutputStream(OutputStream out) ! { ! this(out, DEFAULT_BUFFER_SIZE); ! } ! /** ! * This method initializes a new BufferedOutputStream instance ! * that will write to the specified subordinate OutputStream ! * and which will use the specified buffer size ! * ! * @param out The underlying OutputStream to write data to ! * @param size The size of the internal buffer ! */ ! public BufferedOutputStream(OutputStream out, int size) ! { ! super(out); ! buf = new byte[size]; ! } ! /** ! * This method causes any currently buffered bytes to be immediately ! * written to the underlying output stream. ! * ! * @exception IOException If an error occurs ! */ ! public synchronized void flush() throws IOException ! { ! if (count == 0) ! return; ! out.write(buf, 0, count); ! count = 0; ! out.flush(); ! } ! /** ! * This method flushes any remaining buffered bytes then closes the ! * underlying output stream. Any further attempts to write to this stream ! * may throw an exception ! * ! public synchronized void close() throws IOException ! { ! flush(); ! out.close(); ! } */ ! /** ! * This method runs when the object is garbage collected. It is ! * responsible for ensuring that all buffered bytes are written and ! * for closing the underlying stream. ! * ! * @exception IOException If an error occurs (ignored by the Java runtime) ! * ! protected void finalize() throws IOException ! { ! close(); ! } */ ! /** ! * This method writes a single byte of data. This will be written to the ! * buffer instead of the underlying data source. However, if the buffer ! * is filled as a result of this write request, it will be flushed to the ! * underlying output stream. ! * ! * @param b The byte of data to be written, passed as an int ! * ! * @exception IOException If an error occurs ! */ ! public synchronized void write(int b) throws IOException ! { ! if (count == buf.length) ! flush(); ! buf[count] = (byte)(b & 0xFF); ! ++count; ! } ! /** ! * This method writes len bytes from the byte array ! * buf starting at position offset in the buffer. ! * These bytes will be written to the internal buffer. However, if this ! * write operation fills the buffer, the buffer will be flushed to the ! * underlying output stream. ! * ! * @param buf The array of bytes to write. ! * @param offset The index into the byte array to start writing from. ! * @param len The number of bytes to write. ! * ! * @exception IOException If an error occurs ! */ ! public synchronized void write(byte[] buf, int offset, int len) ! throws IOException ! { ! // Buffer can hold everything. Note that the case where LEN < 0 ! // is automatically handled by the downstream write. ! if (len < (this.buf.length - count)) ! { ! System.arraycopy(buf, offset, this.buf, count, len); ! count += len; ! } ! else ! { ! // The write was too big. So flush the buffer and write the new ! // bytes directly to the underlying stream, per the JDK 1.2 ! // docs. ! flush(); ! out.write (buf, offset, len); ! } ! } } // class BufferedOutputStream + diff -Nrc3pad gcc-3.3.3/libjava/java/io/BufferedReader.java gcc-3.4.0/libjava/java/io/BufferedReader.java *** gcc-3.3.3/libjava/java/io/BufferedReader.java 2002-04-30 23:55:57.000000000 +0000 --- gcc-3.4.0/libjava/java/io/BufferedReader.java 2003-12-28 11:54:17.000000000 +0000 *************** *** 1,5 **** /* BufferedReader.java ! Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,6 ---- /* BufferedReader.java ! Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ! Free Software Foundation, Inc. This file is part of GNU Classpath. *************** package java.io; *** 44,62 **** */ /** ! * This subclass of FilterReader buffers input from an ! * underlying implementation to provide a possibly more efficient read ! * mechanism. It maintains the buffer and buffer state in instance ! * variables that are available to subclasses. The default buffer size ! * of 512 chars can be overridden by the creator of the stream. ! *

            ! * This class also implements mark/reset functionality. It is capable ! * of remembering any number of input chars, to the limits of ! * system memory or the size of Integer.MAX_VALUE ! * ! * @author Per Bothner ! * @author Aaron M. Renn ! */ public class BufferedReader extends Reader { Reader in; --- 45,63 ---- */ /** ! * This subclass of FilterReader buffers input from an ! * underlying implementation to provide a possibly more efficient read ! * mechanism. It maintains the buffer and buffer state in instance ! * variables that are available to subclasses. The default buffer size ! * of 8192 chars can be overridden by the creator of the stream. ! *

            ! * This class also implements mark/reset functionality. It is capable ! * of remembering any number of input chars, to the limits of ! * system memory or the size of Integer.MAX_VALUE ! * ! * @author Per Bothner ! * @author Aaron M. Renn ! */ public class BufferedReader extends Reader { Reader in; *************** public class BufferedReader extends Read *** 89,95 **** /** * Create a new BufferedReader that will read from the ! * specified subordinate stream with a default buffer size of 4096 chars. * * @param in The subordinate stream to read from */ --- 90,96 ---- /** * Create a new BufferedReader that will read from the ! * specified subordinate stream with a default buffer size of 8192 chars. * * @param in The subordinate stream to read from */ *************** public class BufferedReader extends Read *** 99,123 **** } /** ! * Create a new BufferedReader that will read from the ! * specified subordinate stream with a buffer size that is specified by the ! * caller. ! * ! * @param in The subordinate stream to read from ! * @param bufsize The buffer size to use ! */ public BufferedReader(Reader in, int size) { super(in.lock); this.in = in; buffer = new char[size]; } /** ! * This method closes the stream ! * ! * @exception IOException If an error occurs ! */ public void close() throws IOException { synchronized (lock) --- 100,129 ---- } /** ! * Create a new BufferedReader that will read from the ! * specified subordinate stream with a buffer size that is specified by the ! * caller. ! * ! * @param in The subordinate stream to read from ! * @param size The buffer size to use ! * ! * @exception IllegalArgumentException if size <&eq; 0 ! */ public BufferedReader(Reader in, int size) { super(in.lock); + if (size <= 0) + throw new IllegalArgumentException("Illegal buffer size: " + size); this.in = in; buffer = new char[size]; } /** ! * This method closes the underlying stream and frees any associated ! * resources. ! * ! * @exception IOException If an error occurs ! */ public void close() throws IOException { synchronized (lock) *************** public class BufferedReader extends Read *** 130,167 **** } /** ! * Returns true to indicate that this class supports mark/reset ! * functionality. ! * ! * @return true ! */ public boolean markSupported() { return true; } /** ! * Mark a position in the input to which the stream can be ! * "reset" by calling the reset() method. The parameter ! * readlimit is the number of chars that can be read from the ! * stream after setting the mark before the mark becomes invalid. For ! * example, if mark() is called with a read limit of 10, then ! * when 11 chars of data are read from the stream before the ! * reset() method is called, then the mark is invalid and the ! * stream object instance is not required to remember the mark. ! *

            ! * Note that the number of chars that can be remembered by this method ! * can be greater than the size of the internal read buffer. It is also ! * not dependent on the subordinate stream supporting mark/reset ! * functionality. ! * ! * @param readlimit The number of chars that can be read before the mark ! * becomes invalid ! * ! * @exception IOException If an error occurs ! */ public void mark(int readLimit) throws IOException { synchronized (lock) { checkStatus(); --- 136,177 ---- } /** ! * Returns true to indicate that this class supports mark/reset ! * functionality. ! * ! * @return true ! */ public boolean markSupported() { return true; } /** ! * Mark a position in the input to which the stream can be ! * "reset" by calling the reset() method. The parameter ! * readLimit is the number of chars that can be read from the ! * stream after setting the mark before the mark becomes invalid. For ! * example, if mark() is called with a read limit of 10, then ! * when 11 chars of data are read from the stream before the ! * reset() method is called, then the mark is invalid and the ! * stream object instance is not required to remember the mark. ! *

            ! * Note that the number of chars that can be remembered by this method ! * can be greater than the size of the internal read buffer. It is also ! * not dependent on the subordinate stream supporting mark/reset ! * functionality. ! * ! * @param readLimit The number of chars that can be read before the mark ! * becomes invalid ! * ! * @exception IOException If an error occurs ! * @exception IllegalArgumentException if readLimit is negative. ! */ public void mark(int readLimit) throws IOException { + if (readLimit < 0) + throw new IllegalArgumentException("Read-ahead limit is negative"); + synchronized (lock) { checkStatus(); *************** public class BufferedReader extends Read *** 207,222 **** } /** ! * Reset the stream to the point where the mark() method ! * was called. Any chars that were read after the mark point was set will ! * be re-read during subsequent reads. ! *

            ! * This method will throw an IOException if the number of chars read from ! * the stream since the call to mark() exceeds the mark limit ! * passed when establishing the mark. ! * ! * @exception IOException If an error occurs; ! */ public void reset() throws IOException { synchronized (lock) --- 217,232 ---- } /** ! * Reset the stream to the point where the mark() method ! * was called. Any chars that were read after the mark point was set will ! * be re-read during subsequent reads. ! *

            ! * This method will throw an IOException if the number of chars read from ! * the stream since the call to mark() exceeds the mark limit ! * passed when establishing the mark. ! * ! * @exception IOException If an error occurs; ! */ public void reset() throws IOException { synchronized (lock) *************** public class BufferedReader extends Read *** 239,252 **** } /** ! * This method determines whether or not a stream is ready to be read. If ! * This method returns false then this stream could (but is ! * not guaranteed to) block on the next read attempt. ! * ! * @return true if this stream is ready to be read, false otherwise ! * ! * @exception IOException If an error occurs ! */ public boolean ready() throws IOException { synchronized (lock) --- 249,263 ---- } /** ! * This method determines whether or not a stream is ready to be read. If ! * this method returns false then this stream could (but is ! * not guaranteed to) block on the next read attempt. ! * ! * @return true if this stream is ready to be read, ! * false otherwise ! * ! * @exception IOException If an error occurs ! */ public boolean ready() throws IOException { synchronized (lock) *************** public class BufferedReader extends Read *** 257,281 **** } /** ! * This method read chars from a stream and stores them into a caller ! * supplied buffer. It starts storing the data at index offset into ! * the buffer and attempts to read len chars. This method can ! * return before reading the number of chars requested. The actual number ! * of chars read is returned as an int. A -1 is returned to indicate the ! * end of the stream. ! *

            ! * This method will block until some data can be read. ! * ! * @param buf The array into which the chars read should be stored ! * @param offset The offset into the array to start storing chars ! * @param count The requested number of chars to read ! * ! * @return The actual number of chars read, or -1 if end of stream. ! * ! * @exception IOException If an error occurs. ! */ public int read(char[] buf, int offset, int count) throws IOException { synchronized (lock) { checkStatus(); --- 268,298 ---- } /** ! * This method read chars from a stream and stores them into a caller ! * supplied buffer. It starts storing the data at index ! * offset into ! * the buffer and attempts to read len chars. This method can ! * return before reading the number of chars requested. The actual number ! * of chars read is returned as an int. A -1 is returned to indicate the ! * end of the stream. ! *

            ! * This method will block until some data can be read. ! * ! * @param buf The array into which the chars read should be stored ! * @param offset The offset into the array to start storing chars ! * @param count The requested number of chars to read ! * ! * @return The actual number of chars read, or -1 if end of stream. ! * ! * @exception IOException If an error occurs. ! * @exception IndexOutOfBoundsException If offset and count are not ! * valid regarding buf. ! */ public int read(char[] buf, int offset, int count) throws IOException { + if (offset < 0 || offset + count > buf.length || count < 0) + throw new IndexOutOfBoundsException(); + synchronized (lock) { checkStatus(); *************** public class BufferedReader extends Read *** 394,409 **** } /** ! * This method reads a single line of text from the input stream, returning ! * it as a String. A line is terminated by "\n", a "\r", or ! * an "\r\n" sequence. The system dependent line separator is not used. ! * The line termination characters are not returned in the resulting ! * String. ! * ! * @return The line of text read, or null if end of stream. ! * ! * @exception IOException If an error occurs ! */ public String readLine() throws IOException { checkStatus(); --- 411,426 ---- } /** ! * This method reads a single line of text from the input stream, returning ! * it as a String. A line is terminated by "\n", a "\r", or ! * an "\r\n" sequence. The system dependent line separator is not used. ! * The line termination characters are not returned in the resulting ! * String. ! * ! * @return The line of text read, or null if end of stream. ! * ! * @exception IOException If an error occurs ! */ public String readLine() throws IOException { checkStatus(); *************** public class BufferedReader extends Read *** 443,454 **** boolean eof = false; for (;;) { ! int ch = read(); ! if (ch < 0) { ! eof = true; ! break; } if (ch == '\n' || ch == '\r') { // Check here if a '\r' was the last char in the buffer; if so, --- 460,478 ---- boolean eof = false; for (;;) { ! // readLine should block. So we must not return until a -1 is reached. ! if (pos >= limit) { ! // here count == 0 isn't sufficient to give a failure. ! int count = fill(); ! if (count < 0) ! { ! eof = true; ! break; ! } ! continue; } + int ch = buffer[pos++]; if (ch == '\n' || ch == '\r') { // Check here if a '\r' was the last char in the buffer; if so, *************** public class BufferedReader extends Read *** 468,492 **** } /** ! * This method skips the specified number of chars in the stream. It ! * returns the actual number of chars skipped, which may be less than the ! * requested amount. ! *

            ! * This method first discards chars in the buffer, then calls the ! * skip method on the underlying stream to skip the remaining chars. ! * ! * @param num_chars The requested number of chars to skip ! * ! * @return The actual number of chars skipped. ! * ! * @exception IOException If an error occurs ! */ public long skip(long count) throws IOException { synchronized (lock) { checkStatus(); ! if (count <= 0) return 0; // Yet again, we need to handle the special case of a readLine // that has a '\r' at the end of the buffer. In this case, we need --- 492,520 ---- } /** ! * This method skips the specified number of chars in the stream. It ! * returns the actual number of chars skipped, which may be less than the ! * requested amount. ! *

            ! * This method first discards chars in the buffer, then calls the ! * skip method on the underlying stream to skip the ! * remaining chars. ! * ! * @param numChars The requested number of chars to skip ! * ! * @return The actual number of chars skipped. ! * ! * @exception IOException If an error occurs. ! * @exception IllegalArgumentException If count is negative. ! */ public long skip(long count) throws IOException { synchronized (lock) { checkStatus(); ! if (count < 0) ! throw new IllegalArgumentException("skip value is negative"); ! if (count == 0) return 0; // Yet again, we need to handle the special case of a readLine // that has a '\r' at the end of the buffer. In this case, we need diff -Nrc3pad gcc-3.3.3/libjava/java/io/BufferedWriter.java gcc-3.4.0/libjava/java/io/BufferedWriter.java *** gcc-3.3.3/libjava/java/io/BufferedWriter.java 2002-01-22 22:40:13.000000000 +0000 --- gcc-3.4.0/libjava/java/io/BufferedWriter.java 2003-04-20 22:47:43.000000000 +0000 *************** package java.io; *** 51,58 **** * efficient mechanism for writing versus doing numerous small unbuffered * writes. * - * @version 0.0 - * * @author Aaron M. Renn (arenn@urbanophile.com) * @author Tom Tromey * @date September 25, 1998 --- 51,56 ---- *************** public class BufferedWriter extends Writ *** 63,69 **** /** * This method initializes a new BufferedWriter instance * that will write to the specified subordinate Writer ! * and which will use a default buffer size of 512 chars. * * @param out The underlying Writer to write data to */ --- 61,67 ---- /** * This method initializes a new BufferedWriter instance * that will write to the specified subordinate Writer ! * and which will use a default buffer size of 8192 chars. * * @param out The underlying Writer to write data to */ diff -Nrc3pad gcc-3.3.3/libjava/java/io/ByteArrayOutputStream.java gcc-3.4.0/libjava/java/io/ByteArrayOutputStream.java *** gcc-3.3.3/libjava/java/io/ByteArrayOutputStream.java 2002-01-22 22:40:13.000000000 +0000 --- gcc-3.4.0/libjava/java/io/ByteArrayOutputStream.java 2003-11-08 13:41:20.000000000 +0000 *************** *** 1,5 **** /* BufferedReader.java ! Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* BufferedReader.java ! Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** package java.io; *** 65,72 **** * application specified character encoding. Thus it can handle * multibyte character encodings. * - * @version 0.0 - * * @author Aaron M. Renn (arenn@urbanophile.com) * @author Tom Tromey * @date September 24, 1998 --- 65,70 ---- *************** public class ByteArrayOutputStream exten *** 120,126 **** * * @return The number of bytes in the internal buffer * ! * @see reset */ public int size () { --- 118,124 ---- * * @return The number of bytes in the internal buffer * ! * @see #reset() */ public int size () { *************** public class ByteArrayOutputStream exten *** 190,196 **** * @return A String containing the data written to this * stream so far * ! * @deprecrated */ public String toString (int hibyte) { --- 188,194 ---- * @return A String containing the data written to this * stream so far * ! * @deprecated */ public String toString (int hibyte) { *************** public class ByteArrayOutputStream exten *** 200,206 **** // Resize buffer to accommodate new bytes. private void resize (int add) { ! if (count + add >= buf.length) { int newlen = buf.length * 2; if (count + add > newlen) --- 198,204 ---- // Resize buffer to accommodate new bytes. private void resize (int add) { ! if (count + add > buf.length) { int newlen = buf.length * 2; if (count + add > newlen) diff -Nrc3pad gcc-3.3.3/libjava/java/io/CharArrayReader.java gcc-3.4.0/libjava/java/io/CharArrayReader.java *** gcc-3.3.3/libjava/java/io/CharArrayReader.java 2002-01-22 22:40:13.000000000 +0000 --- gcc-3.4.0/libjava/java/io/CharArrayReader.java 2003-12-28 11:54:17.000000000 +0000 *************** public class CharArrayReader extends Rea *** 228,234 **** /* Don't need to check pos value, arraycopy will check it. */ if (off < 0 || len < 0 || off + len > b.length) ! throw new ArrayIndexOutOfBoundsException(); if (pos >= count) return -1; --- 228,234 ---- /* Don't need to check pos value, arraycopy will check it. */ if (off < 0 || len < 0 || off + len > b.length) ! throw new IndexOutOfBoundsException(); if (pos >= count) return -1; diff -Nrc3pad gcc-3.3.3/libjava/java/io/CharArrayWriter.java gcc-3.4.0/libjava/java/io/CharArrayWriter.java *** gcc-3.3.3/libjava/java/io/CharArrayWriter.java 2002-12-02 21:30:13.000000000 +0000 --- gcc-3.4.0/libjava/java/io/CharArrayWriter.java 2003-03-23 19:11:18.000000000 +0000 *************** public class CharArrayWriter extends Wri *** 130,136 **** * * @return The number of chars in the internal buffer * ! * @see reset */ public int size () { --- 130,136 ---- * * @return The number of chars in the internal buffer * ! * @see #reset() */ public int size () { diff -Nrc3pad gcc-3.3.3/libjava/java/io/DataInput.java gcc-3.4.0/libjava/java/io/DataInput.java *** gcc-3.3.3/libjava/java/io/DataInput.java 2002-01-22 22:40:13.000000000 +0000 --- gcc-3.4.0/libjava/java/io/DataInput.java 2003-04-20 22:47:43.000000000 +0000 *************** *** 1,5 **** /* DataInput.java -- Interface for reading data from a stream ! Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* DataInput.java -- Interface for reading data from a stream ! Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** package java.io; *** 40,472 **** /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 * "The Java Language Specification", ISBN 0-201-63451-1 ! * plus online API docs for JDK 1.2 beta from http://www.javasoft.com. ! * Status: Believed complete and correct. ! */ /** ! * This interface is implemented by classes that can data from streams ! * into Java primitive types. ! * ! * @author Aaron M. Renn (arenn@urbanophile.com) ! * @author Warren Levy ! */ public interface DataInput { ! /** ! * This method reads a Java boolean value from an input stream. It does ! * so by reading a single byte of data. If that byte is zero, then the ! * value returned is false. If the byte is non-zero, then ! * the value returned is true. ! *

            ! * This method can read a boolean written by an object ! * implementing the writeBoolean() method in the ! * DataOutput interface. ! * ! * @return The boolean value read ! * ! * @exception EOFException If end of file is reached before reading the boolean ! * @exception IOException If any other error occurs ! */ ! boolean ! readBoolean() throws EOFException, IOException; ! ! /*************************************************************************/ ! ! /** ! * This method reads a Java byte value from an input stream. The value ! * is in the range of -128 to 127. ! *

            ! * This method can read a byte written by an object ! * implementing the ! * writeByte() method in the DataOutput interface. ! *

            ! * @return The byte value read ! * ! * @exception EOFException If end of file is reached before reading the byte ! * @exception IOException If any other error occurs ! * ! * @see DataOutput ! */ ! byte ! readByte() throws EOFException, IOException; ! ! /*************************************************************************/ ! ! /** ! * This method reads 8 unsigned bits into a Java int value from ! * the stream. The value returned is in the range of 0 to 255. ! *

            ! * This method can read an unsigned byte written by an object implementing the ! * writeUnsignedByte() method in the DataOutput ! * interface. ! * ! * @return The unsigned bytes value read as a Java int. ! * ! * @exception EOFException If end of file is reached before reading the value ! * @exception IOException If any other error occurs ! * ! * @see DataOutput ! */ ! int ! readUnsignedByte() throws EOFException, IOException; ! ! /*************************************************************************/ ! ! /** ! * This method reads a Java char value from an input stream. ! * It operates by reading two bytes from the stream and converting them to ! * a single 16-bit Java char. The two bytes are stored most ! * significant byte first (i.e., "big endian") regardless of the native ! * host byte ordering. ! *

            ! * As an example, if byte1 and byte2 represent the ! * first and second byte read from the stream respectively, they will be ! * transformed to a char in the following manner: ! *

            ! * (char)((byte1 << 8) + byte2) ! *

            ! * This method can read a char written by an object implementing ! * the ! * writeChar() method in the DataOutput interface. ! * ! * @return The char value read ! * ! * @exception EOFException If end of file is reached before reading the char ! * @exception IOException If any other error occurs ! * ! * @see DataOutput ! */ ! char ! readChar() throws EOFException, IOException; ! ! /*************************************************************************/ ! ! /** ! * This method reads a signed 16-bit value into a Java in from the stream. ! * It operates by reading two bytes from the stream and converting them to ! * a single 16-bit Java short. The two bytes are stored most ! * significant byte first (i.e., "big endian") regardless of the native ! * host byte ordering. ! *

            ! * As an example, if byte1 and byte2 represent the ! * first and second byte read from the stream respectively, they will be ! * transformed to a short in the following manner: ! *

            ! * (short)((byte1 << 8) + byte2) ! *

            ! * The value returned is in the range of -32768 to 32767. ! *

            ! * This method can read a short written by an object implementing ! * the writeShort() method in the DataOutput ! * interface. ! * ! * @return The short value read ! * ! * @exception EOFException If end of file is reached before reading the value ! * @exception IOException If any other error occurs ! * ! * @see DataOutput ! */ ! short ! readShort() throws EOFException, IOException; ! ! /*************************************************************************/ ! ! /** ! * This method reads 16 unsigned bits into a Java int value from the stream. ! * It operates by reading two bytes from the stream and converting them to ! * a single Java int. The two bytes are stored most ! * significant byte first (i.e., "big endian") regardless of the native ! * host byte ordering. ! *

            ! * As an example, if byte1 and byte2 represent the ! * first and second byte read from the stream respectively, they will be ! * transformed to an int in the following manner: ! *

            ! * (int)((byte1 << 8) + byte2) ! *

            ! * The value returned is in the range of 0 to 65535. ! *

            ! * This method can read an unsigned short written by an object implementing ! * the writeUnsignedShort() method in the DataOutput ! * interface. ! * ! * @return The unsigned short value read as a Java int. ! * ! * @exception EOFException If end of file is reached before reading the value ! * @exception IOException If any other error occurs ! */ ! int ! readUnsignedShort() throws EOFException, IOException; ! ! /*************************************************************************/ ! ! /** ! * This method reads a Java int value from an input stream ! * It operates by reading four bytes from the stream and converting them to ! * a single Java int. The bytes are stored most ! * significant byte first (i.e., "big endian") regardless of the native ! * host byte ordering. ! *

            ! * As an example, if byte1 through byte4 represent ! * the first four bytes read from the stream, they will be ! * transformed to an int in the following manner: ! *

            ! * (int)((byte1 << 24) + (byte2 << 16) + (byte3 << 8) + byte4)) ! *

            ! The value returned is in the range of -2147483648 to 2147483647. ! *

            ! * This method can read an int written by an object implementing ! * the writeInt() method in the DataOutput interface. ! * ! * @return The int value read ! * ! * @exception EOFException If end of file is reached before reading the int ! * @exception IOException If any other error occurs ! * ! * @see DataOutput ! */ ! int ! readInt() throws EOFException, IOException; ! ! /*************************************************************************/ ! ! /** ! * This method reads a Java long value from an input stream ! * It operates by reading eight bytes from the stream and converting them to ! * a single Java long. The bytes are stored most ! * significant byte first (i.e., "big endian") regardless of the native ! * host byte ordering. ! *

            ! * As an example, if byte1 through byte8 represent ! * the first eight bytes read from the stream, they will be ! * transformed to an long in the following manner: ! *

            ! * (long)((byte1 << 56) + (byte2 << 48) + (byte3 << 40) + ! * (byte4 << 32) + (byte5 << 24) + (byte6 << 16) + (byte7 << 8) + byte9)) ! * ! *

            ! * The value returned is in the range of -9223372036854775808 to ! * 9223372036854775807. ! *

            ! * This method can read an long written by an object implementing ! * the writeLong() method in the DataOutput ! * interface. ! * ! * @return The long value read ! * ! * @exception EOFException If end of file is reached before reading the long ! * @exception IOException If any other error occurs ! * ! * @see DataOutput ! */ ! long ! readLong() throws EOFException, IOException; ! /*************************************************************************/ ! /** ! * This method reads a Java float value from an input stream. It operates ! * by first reading an int value from the stream by calling the ! * readInt() method in this interface, then converts that ! * int to a float using the ! * intBitsToFloat method in the class ! * java.lang.Float. ! *

            ! * This method can read a float written by an object implementing ! * the writeFloat() method in the DataOutput ! * interface. ! * ! * @return The float value read ! * ! * @exception EOFException If end of file is reached before reading the float ! * @exception IOException If any other error occurs ! * ! * @see java.lang.Float ! * @see DataOutput ! */ ! float ! readFloat() throws EOFException, IOException; ! /*************************************************************************/ ! /** ! * This method reads a Java double value from an input stream. It operates ! * by first reading a long value from the stream by calling the ! * readLong() method in this interface, then converts that ! * long to a double using the ! * longBitsToDouble method in the class ! * java.lang.Double. ! *

            ! * This method can read a double written by an object ! * implementing the writeDouble() method in the ! * DataOutput interface. ! * ! * @return The double value read ! * ! * @exception EOFException If end of file is reached before reading the double ! * @exception IOException If any other error occurs ! * ! * @see java.lang.Double ! * @see DataOutput ! */ ! double ! readDouble() throws EOFException, IOException; ! /*************************************************************************/ ! /** ! * This method reads the next line of text data from an input stream. ! * It operates by reading bytes and converting those bytes to char ! * values by treating the byte read as the low eight bits of the ! * char and using 0 as the high eight bits. Because of this, ! * it does not support the full 16-bit Unicode character set. ! *

            ! * The reading of bytes ends when either the end of file or a line terminator ! * is encountered. The bytes read are then returned as a String. ! * A line terminator is a byte sequence consisting of either ! * \r, \n or \r\n. These termination ! * charaters are discarded and are not returned as part of the string. ! *

            ! * This method can read data that was written by an object implementing the ! * writeLine() method in DataOutput. ! * ! * @return The line read as a String ! * ! * @exception IOException If an error occurs ! * ! * @see DataOutput ! */ ! String ! readLine() throws IOException; ! /*************************************************************************/ ! /** ! * This method reads a String from an input stream that is ! * encoded in a modified UTF-8 format. This format has a leading two byte ! * sequence that contains the remaining number of bytes to read. This two byte ! * sequence is read using the readUnsignedShort() method of this ! * interface. ! * ! * After the number of remaining bytes have been determined, these bytes ! * are read an transformed into char values. These ! * char values are encoded in the stream using either a one, two, ! * or three byte format. ! * The particular format in use can be determined by examining the first ! * byte read. ! *

            ! * If the first byte has a high order bit of 0, then ! * that character consists on only one byte. This character value consists ! * of seven bits that are at positions 0 through 6 of the byte. As an ! * example, if byte1 is the byte read from the stream, it would ! * be converted to a char like so: ! *

            ! * (char)byte1 ! *

            ! * If the first byte has 110 as its high order bits, then the ! * character consists of two bytes. The bits that make up the character ! * value are in positions 0 through 4 of the first byte and bit positions ! * 0 through 5 of the second byte. (The second byte should have ! * 10 as its high order bits). These values are in most significant ! * byte first (i.e., "big endian") order. ! *

            ! * As an example, if byte1 and byte2 are the first ! * two bytes read respectively, and the high order bits of them match the ! * patterns which indicate a two byte character encoding, then they would be ! * converted to a Java char like so: ! *

            ! * (char)(((byte1 & 0x1F) << 6) + (byte2 & 0x3F)) ! *

            ! * If the first byte has a 1110 as its high order bits, then the ! * character consists of three bytes. The bits that make up the character ! * value are in positions 0 through 3 of the first byte and bit positions ! * 0 through 5 of the other two bytes. (The second and third bytes should ! * have 10 as their high order bits). These values are in most ! * significant byte first (i.e., "big endian") order. ! *

            ! * As an example, if byte1, byte2, and ! * byte3 are the three bytes read, and the high order bits of ! * them match the patterns which indicate a three byte character encoding, ! * then they would be converted to a Java char like so: ! * ! * ! * (char)(((byte1 & 0x0F) << 12) + ((byte2 & 0x3F) + (byte3 & 0x3F)) ! * ! * ! * Note that all characters are encoded in the method that requires the ! * fewest number of bytes with the exception of the character with the ! * value of \u0000 which is encoded as two bytes. This is ! * a modification of the UTF standard used to prevent C language style ! * NUL values from appearing in the byte stream. ! *

            ! * This method can read data that was written by an object implementing the ! * writeUTF() method in DataOutput. ! * ! * @returns The String read ! * ! * @exception EOFException If end of file is reached before reading the String ! * @exception UTFDataFormatException If the data is not in UTF-8 format ! * @exception IOException If any other error occurs ! * ! * @see DataOutput ! */ ! String ! readUTF() throws EOFException, UTFDataFormatException, IOException; ! /*************************************************************************/ ! /** ! * This method reads raw bytes into the passed array until the array is ! * full. Note that this method blocks until the data is available and ! * throws an exception if there is not enough data left in the stream to ! * fill the buffer ! * ! * @param buf The buffer into which to read the data ! * ! * @exception EOFException If end of file is reached before filling the buffer ! * @exception IOException If any other error occurs ! */ ! void ! readFully(byte[] buf) throws EOFException, IOException; ! /*************************************************************************/ ! /** ! * This method reads raw bytes into the passed array buf starting ! * offset bytes into the buffer. The number of bytes read will be ! * exactly len. Note that this method blocks until the data is ! * available and * throws an exception if there is not enough data left in ! * the stream to read len bytes. ! * ! * @param buf The buffer into which to read the data ! * @param offset The offset into the buffer to start storing data ! * @param len The number of bytes to read into the buffer ! * ! * @exception EOFException If end of file is reached before filling the buffer ! * @exception IOException If any other error occurs ! */ ! void ! readFully(byte[] buf, int offset, int len) throws EOFException, IOException; ! /*************************************************************************/ ! /** ! * This method skips and discards the specified number of bytes in an ! * input stream ! * ! * @param num_bytes The number of bytes to skip ! * ! * @return The number of bytes actually skipped, which will always be ! * num_bytes ! * ! * @exception EOFException If end of file is reached before all bytes can be ! * skipped ! * @exception IOException If any other error occurs ! */ ! int ! skipBytes(int n) throws EOFException, IOException; } // interface DataInput --- 40,456 ---- /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 * "The Java Language Specification", ISBN 0-201-63451-1 ! * plus online API docs for JDK 1.2 beta from http://www.javasoft.com. ! * Status: Believed complete and correct. */ /** ! * This interface is implemented by classes that can data from streams ! * into Java primitive types. ! * ! * @author Aaron M. Renn (arenn@urbanophile.com) ! * @author Warren Levy ! */ public interface DataInput { ! /** ! * This method reads a Java boolean value from an input stream. It does ! * so by reading a single byte of data. If that byte is zero, then the ! * value returned is false. If the byte is non-zero, then ! * the value returned is true. ! *

            ! * This method can read a boolean written by an object ! * implementing the writeBoolean() method in the ! * DataOutput interface. ! * ! * @return The boolean value read ! * ! * @exception EOFException If end of file is reached before ! * reading the boolean ! * @exception IOException If any other error occurs ! * ! * @see DataOutput#writeBoolean ! */ ! boolean readBoolean() throws EOFException, IOException; ! /** ! * This method reads a Java byte value from an input stream. The value ! * is in the range of -128 to 127. ! *

            ! * This method can read a byte written by an object ! * implementing the ! * writeByte() method in the DataOutput interface. ! *

            ! * @return The byte value read ! * ! * @exception EOFException If end of file is reached before reading the byte ! * @exception IOException If any other error occurs ! * ! * @see DataOutput#writeByte ! */ ! byte readByte() throws EOFException, IOException; ! /** ! * This method reads 8 unsigned bits into a Java int value from ! * the stream. The value returned is in the range of 0 to 255. ! *

            ! * This method can read an unsigned byte written by an object ! * implementing the ! * writeByte() method in the DataOutput ! * interface. ! * ! * @return The unsigned bytes value read as a Java int. ! * ! * @exception EOFException If end of file is reached before reading the value ! * @exception IOException If any other error occurs ! * ! * @see DataOutput#writeByte ! */ ! int readUnsignedByte() throws EOFException, IOException; ! /** ! * This method reads a Java char value from an input stream. ! * It operates by reading two bytes from the stream and converting them to ! * a single 16-bit Java char. The two bytes are stored most ! * significant byte first (i.e., "big endian") regardless of the native ! * host byte ordering. ! *

            ! * As an example, if byte1 and byte2 represent the ! * first and second byte read from the stream respectively, they will be ! * transformed to a char in the following manner: ! *

            ! * (char)((byte1 << 8) + byte2) ! *

            ! * This method can read a char written by an object implementing ! * the ! * writeChar() method in the DataOutput interface. ! * ! * @return The char value read ! * ! * @exception EOFException If end of file is reached before reading the char ! * @exception IOException If any other error occurs ! * ! * @see DataOutput#writeChar ! */ ! char readChar() throws EOFException, IOException; ! /** ! * This method reads a signed 16-bit value into a Java in from the stream. ! * It operates by reading two bytes from the stream and converting them to ! * a single 16-bit Java short. The two bytes are stored most ! * significant byte first (i.e., "big endian") regardless of the native ! * host byte ordering. ! *

            ! * As an example, if byte1 and byte2 represent the ! * first and second byte read from the stream respectively, they will be ! * transformed to a short in the following manner: ! *

            ! * (short)(((byte1 & 0xFF) << 8) + (byte2 & 0xFF)) ! *

            ! * The value returned is in the range of -32768 to 32767. ! *

            ! * This method can read a short written by an object ! * implementing ! * the writeShort() method in the DataOutput ! * interface. ! * ! * @return The short value read ! * ! * @exception EOFException If end of file is reached before reading the value ! * @exception IOException If any other error occurs ! * ! * @see DataOutput#writeShort ! */ ! short readShort() throws EOFException, IOException; ! /** ! * This method reads 16 unsigned bits into a Java int value from the stream. ! * It operates by reading two bytes from the stream and converting them to ! * a single Java int. The two bytes are stored most ! * significant byte first (i.e., "big endian") regardless of the native ! * host byte ordering. ! *

            ! * As an example, if byte1 and byte2 represent the ! * first and second byte read from the stream respectively, they will be ! * transformed to an int in the following manner: ! *

            ! * (int)(((byte1 0xFF) << 8) + (byte2 & 0xFF)) ! *

            ! * The value returned is in the range of 0 to 65535. ! *

            ! * This method can read an unsigned short written by an object implementing ! * the writeShort() method in the ! * DataOutput ! * interface. ! * ! * @return The unsigned short value read as a Java int. ! * ! * @exception EOFException If end of file is reached before reading ! * the value ! * @exception IOException If any other error occurs ! * ! * @see DataOutput#writeShort ! */ ! int readUnsignedShort() throws EOFException, IOException; ! /** ! * This method reads a Java int value from an input stream ! * It operates by reading four bytes from the stream and converting them to ! * a single Java int. The bytes are stored most ! * significant byte first (i.e., "big endian") regardless of the native ! * host byte ordering. ! *

            ! * As an example, if byte1 through byte4 represent ! * the first four bytes read from the stream, they will be ! * transformed to an int in the following manner: ! *

            ! * (int)(((byte1 & 0xFF) << 24) + ((byte2 & 0xFF) << 16) + ! * ((byte3 & 0xFF)<< 8) + (byte4 & 0xFF))) ! *

            ! * The value returned is in the range of -2147483648 to 2147483647. ! *

            ! * This method can read an int written by an object ! * implementing the writeInt() method in the ! * DataOutput interface. ! * ! * @return The int value read ! * ! * @exception EOFException If end of file is reached before reading the int ! * @exception IOException If any other error occurs ! * ! * @see DataOutput#writeInt ! */ ! int readInt() throws EOFException, IOException; ! /** ! * This method reads a Java long value from an input stream ! * It operates by reading eight bytes from the stream and converting them to ! * a single Java long. The bytes are stored most ! * significant byte first (i.e., "big endian") regardless of the native ! * host byte ordering. ! *

            ! * As an example, if byte1 through byte8 represent ! * the first eight bytes read from the stream, they will be ! * transformed to an long in the following manner: ! *

            ! * (long)(((byte1 & 0xFF) << 56) + ((byte2 & 0xFF) << 48) + ! * ((byte3 & 0xFF) << 40) + ((byte4 & 0xFF) << 32) + ! * ((byte5 & 0xFF) << 24) + ((byte6 & 0xFF) << 16) + ! * ((byte7 & 0xFF) << 8) + (byte8 & 0xFF))) ! * ! *

            ! * The value returned is in the range of -9223372036854775808 to ! * 9223372036854775807. ! *

            ! * This method can read an long written by an object ! * implementing the writeLong() method in the ! * DataOutput interface. ! * ! * @return The long value read ! * ! * @exception EOFException If end of file is reached before reading the long ! * @exception IOException If any other error occurs ! * ! * @see DataOutput#writeLong ! */ ! long readLong() throws EOFException, IOException; ! /** ! * This method reads a Java float value from an input stream. It operates ! * by first reading an int value from the stream by calling the ! * readInt() method in this interface, then converts that ! * int to a float using the ! * intBitsToFloat method in the class ! * java.lang.Float. ! *

            ! * This method can read a float written by an object ! * implementing ! * the writeFloat() method in the DataOutput ! * interface. ! * ! * @return The float value read ! * ! * @exception EOFException If end of file is reached before reading the ! * float ! * @exception IOException If any other error occurs ! * ! * @see DataOutput#writeFloat ! * @see java.lang.Float#intBitsToFloat ! */ ! float readFloat() throws EOFException, IOException; ! /** ! * This method reads a Java double value from an input stream. It operates ! * by first reading a long value from the stream by calling the ! * readLong() method in this interface, then converts that ! * long to a double using the ! * longBitsToDouble method in the class ! * java.lang.Double. ! *

            ! * This method can read a double written by an object ! * implementing the writeDouble() method in the ! * DataOutput interface. ! * ! * @return The double value read ! * ! * @exception EOFException If end of file is reached before reading the ! * double ! * @exception IOException If any other error occurs ! * ! * @see DataOutput#writeDouble ! * @see java.lang.Double#longBitsToDouble ! */ ! double readDouble() throws EOFException, IOException; ! /** ! * This method reads the next line of text data from an input stream. ! * It operates by reading bytes and converting those bytes to ! * char ! * values by treating the byte read as the low eight bits of the ! * char and using 0 as the high eight bits. Because of this, ! * it does not support the full 16-bit Unicode character set. ! *

            ! * The reading of bytes ends when either the end of file or a line terminator ! * is encountered. The bytes read are then returned as a ! * String. ! * A line terminator is a byte sequence consisting of either ! * \r, \n or \r\n. These termination ! * charaters are discarded and are not returned as part of the string. ! * A line is also terminated by an end of file condition. ! *

            ! * ! * @return The line read as a String ! * ! * @exception IOException If an error occurs ! */ ! String readLine() throws IOException; ! /** ! * This method reads a String from an input stream that is ! * encoded in a modified UTF-8 format. This format has a leading two byte ! * sequence that contains the remaining number of bytes to read. ! * This two byte ! * sequence is read using the readUnsignedShort() method of this ! * interface. ! * ! * After the number of remaining bytes have been determined, these bytes ! * are read an transformed into char values. These ! * char values are encoded in the stream using either a one, ! * two, or three byte format. ! * The particular format in use can be determined by examining the first ! * byte read. ! *

            ! * If the first byte has a high order bit of 0, then ! * that character consists on only one byte. This character value consists ! * of seven bits that are at positions 0 through 6 of the byte. As an ! * example, if byte1 is the byte read from the stream, it would ! * be converted to a char like so: ! *

            ! * (char)byte1 ! *

            ! * If the first byte has 110 as its high order bits, then the ! * character consists of two bytes. The bits that make up the character ! * value are in positions 0 through 4 of the first byte and bit positions ! * 0 through 5 of the second byte. (The second byte should have ! * 10 as its high order bits). These values are in most significant ! * byte first (i.e., "big endian") order. ! *

            ! * As an example, if byte1 and byte2 are the first ! * two bytes read respectively, and the high order bits of them match the ! * patterns which indicate a two byte character encoding, then they would be ! * converted to a Java char like so: ! *

            ! * (char)(((byte1 & 0x1F) << 6) + (byte2 & 0x3F)) ! *

            ! * If the first byte has a 1110 as its high order bits, then the ! * character consists of three bytes. The bits that make up the character ! * value are in positions 0 through 3 of the first byte and bit positions ! * 0 through 5 of the other two bytes. (The second and third bytes should ! * have 10 as their high order bits). These values are in most ! * significant byte first (i.e., "big endian") order. ! *

            ! * As an example, if byte1, byte2, and ! * byte3 are the three bytes read, and the high order bits of ! * them match the patterns which indicate a three byte character encoding, ! * then they would be converted to a Java char like so: ! * ! * ! * (char)(((byte1 & 0x0F) << 12) + ((byte2 & 0x3F) + (byte3 & 0x3F)) ! * ! * ! * Note that all characters are encoded in the method that requires the ! * fewest number of bytes with the exception of the character with the ! * value of \u0000 which is encoded as two bytes. ! * This is a modification of the UTF standard used to prevent C language ! * style NUL values from appearing in the byte stream. ! *

            ! * This method can read data that was written by an object implementing the ! * writeUTF() method in DataOutput. ! * ! * @returns The String read ! * ! * @exception EOFException If end of file is reached before reading the ! * String ! * @exception UTFDataFormatException If the data is not in UTF-8 format ! * @exception IOException If any other error occurs ! * ! * @see DataOutput#writeUTF ! */ ! String readUTF() throws EOFException, UTFDataFormatException, IOException; ! /** ! * This method reads raw bytes into the passed array until the array is ! * full. Note that this method blocks until the data is available and ! * throws an exception if there is not enough data left in the stream to ! * fill the buffer. Note also that zero length buffers are permitted. ! * In this case, the method will return immediately without reading any ! * bytes from the stream. ! * ! * @param buf The buffer into which to read the data ! * ! * @exception EOFException If end of file is reached before filling the ! * buffer ! * @exception IOException If any other error occurs ! */ ! void readFully(byte[] buf) throws EOFException, IOException; ! /** ! * This method reads raw bytes into the passed array buf ! * starting ! * offset bytes into the buffer. The number of bytes read ! * will be ! * exactly len. Note that this method blocks until the data is ! * available and throws an exception if there is not enough data left in ! * the stream to read len bytes. Note also that zero length ! * buffers are permitted. In this case, the method will return immediately ! * without reading any bytes from the stream. ! * ! * @param buf The buffer into which to read the data ! * @param offset The offset into the buffer to start storing data ! * @param len The number of bytes to read into the buffer ! * ! * @exception EOFException If end of file is reached before filling the ! * buffer ! * @exception IOException If any other error occurs ! */ ! void readFully(byte[] buf, int offset, int len) ! throws EOFException, IOException; ! /** ! * This method skips and discards the specified number of bytes in an ! * input stream. Note that this method may skip less than the requested ! * number of bytes. The actual number of bytes skipped is returned. ! * No bytes are skipped if a negative number is passed to this method. ! * ! * @param numBytes The number of bytes to skip ! * ! * @return The number of bytes actually skipped, which will always be ! * numBytes ! * ! * @exception EOFException If end of file is reached before all bytes can be ! * skipped ! * @exception IOException If any other error occurs ! */ ! int skipBytes(int numBytes) throws EOFException, IOException; } // interface DataInput diff -Nrc3pad gcc-3.3.3/libjava/java/io/DataInputStream.java gcc-3.4.0/libjava/java/io/DataInputStream.java *** gcc-3.3.3/libjava/java/io/DataInputStream.java 2002-11-03 20:27:30.000000000 +0000 --- gcc-3.4.0/libjava/java/io/DataInputStream.java 2003-05-20 11:53:10.000000000 +0000 *************** *** 1,5 **** /* DataInputStream.java -- FilteredInputStream that implements DataInput ! Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation This file is part of GNU Classpath. --- 1,5 ---- /* DataInputStream.java -- FilteredInputStream that implements DataInput ! Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation This file is part of GNU Classpath. *************** package java.io; *** 50,59 **** * * @see DataInput * - * @version 0.0 - * * @author Warren Levy ! * @author Aaron M. Renn (arenn@urbanophile.com) * @date October 20, 1998. */ public class DataInputStream extends FilterInputStream implements DataInput --- 50,57 ---- * * @see DataInput * * @author Warren Levy ! * @author Aaron M. Renn * @date October 20, 1998. */ public class DataInputStream extends FilterInputStream implements DataInput *************** public class DataInputStream extends Fil *** 64,70 **** boolean ignoreInitialNewline = false; // Byte buffer, used to make primitive read calls more efficient. ! byte[] buf = new byte[8]; /** * This constructor initializes a new DataInputStream --- 62,68 ---- boolean ignoreInitialNewline = false; // Byte buffer, used to make primitive read calls more efficient. ! byte[] buf = new byte [8]; /** * This constructor initializes a new DataInputStream *************** public class DataInputStream extends Fil *** 72,80 **** * * @param in The subordinate InputStream to read from */ ! public DataInputStream(InputStream in) { ! super(in); } /** --- 70,78 ---- * * @param in The subordinate InputStream to read from */ ! public DataInputStream (InputStream in) { ! super (in); } /** *************** public class DataInputStream extends Fil *** 90,98 **** * * @exception IOException If an error occurs. */ ! public final int read(byte[] b) throws IOException { ! return in.read(b, 0, b.length); } /** --- 88,96 ---- * * @exception IOException If an error occurs. */ ! public final int read (byte[] b) throws IOException { ! return in.read (b, 0, b.length); } /** *************** public class DataInputStream extends Fil *** 111,119 **** * * @exception IOException If an error occurs. */ ! public final int read(byte[] b, int off, int len) throws IOException { ! return in.read(b, off, len); } /** --- 109,117 ---- * * @exception IOException If an error occurs. */ ! public final int read (byte[] b, int off, int len) throws IOException { ! return in.read (b, off, len); } /** *************** public class DataInputStream extends Fil *** 131,140 **** * @exception EOFException If end of file is reached before reading * the boolean * @exception IOException If any other error occurs */ ! public final boolean readBoolean() throws IOException { ! return convertToBoolean(in.read()); } /** --- 129,140 ---- * @exception EOFException If end of file is reached before reading * the boolean * @exception IOException If any other error occurs + * + * @see DataOutput#writeBoolean */ ! public final boolean readBoolean () throws IOException { ! return convertToBoolean (in.read ()); } /** *************** public class DataInputStream extends Fil *** 150,160 **** * @exception EOFException If end of file is reached before reading the byte * @exception IOException If any other error occurs * ! * @see DataOutput */ ! public final byte readByte() throws IOException { ! return convertToByte(in.read()); } /** --- 150,160 ---- * @exception EOFException If end of file is reached before reading the byte * @exception IOException If any other error occurs * ! * @see DataOutput#writeByte */ ! public final byte readByte () throws IOException { ! return convertToByte (in.read ()); } /** *************** public class DataInputStream extends Fil *** 169,175 **** * respectively, they will be transformed to a char in * the following manner: *

            ! * (char)(((byte1 & 0xFF) << 8) | (byte2 & 0xFF) *

            * This method can read a char written by an object * implementing the writeChar() method in the --- 169,175 ---- * respectively, they will be transformed to a char in * the following manner: *

            ! * (char)(((byte1 & 0xFF) << 8) | (byte2 & 0xFF) *

            * This method can read a char written by an object * implementing the writeChar() method in the *************** public class DataInputStream extends Fil *** 180,191 **** * @exception EOFException If end of file is reached before reading the char * @exception IOException If any other error occurs * ! * @see DataOutput */ ! public final char readChar() throws IOException { readFully (buf, 0, 2); ! return convertToChar(buf); } /** --- 180,191 ---- * @exception EOFException If end of file is reached before reading the char * @exception IOException If any other error occurs * ! * @see DataOutput#writeChar */ ! public final char readChar () throws IOException { readFully (buf, 0, 2); ! return convertToChar (buf); } /** *************** public class DataInputStream extends Fil *** 206,217 **** * the double * @exception IOException If any other error occurs * ! * @see java.lang.Double ! * @see DataOutput */ ! public final double readDouble() throws IOException { ! return Double.longBitsToDouble(readLong()); } /** --- 206,217 ---- * the double * @exception IOException If any other error occurs * ! * @see DataOutput#writeDouble ! * @see java.lang.Double#longBitsToDouble */ ! public final double readDouble () throws IOException { ! return Double.longBitsToDouble (readLong ()); } /** *************** public class DataInputStream extends Fil *** 223,229 **** * in the class java.lang.Float *

            * This method can read a float written by an object ! * implementing the * writeFloat() method in the * DataOutput interface. * * @return The float value read --- 223,229 ---- * in the class java.lang.Float *

            * This method can read a float written by an object ! * implementing the writeFloat() method in the * DataOutput interface. * * @return The float value read *************** public class DataInputStream extends Fil *** 231,303 **** * @exception EOFException If end of file is reached before reading the float * @exception IOException If any other error occurs * ! * @see java.lang.Float ! * @see DataOutput */ ! public final float readFloat() throws IOException { ! return Float.intBitsToFloat(readInt()); } /** * This method reads raw bytes into the passed array until the array is * full. Note that this method blocks until the data is available and * throws an exception if there is not enough data left in the stream to ! * fill the buffer * * @param b The buffer into which to read the data * ! * @exception EOFException If end of file is reached before filling ! * the buffer ! * @exception IOException If any other error occurs */ ! public final void readFully(byte[] b) throws IOException { ! readFully(b, 0, b.length); } /** ! * This method reads raw bytes into the passed array ! * buf starting offset bytes into the ! * buffer. The number of bytes read will be exactly ! * len Note that this method blocks until the data is ! * available and * throws an exception if there is not enough data ! * left in the stream to read len bytes. * * @param buf The buffer into which to read the data * @param offset The offset into the buffer to start storing data * @param len The number of bytes to read into the buffer * ! * @exception EOFException If end of file is reached before filling ! * the buffer * @exception IOException If any other error occurs */ ! public final void readFully(byte[] b, int off, int len) throws IOException { while (len > 0) { // in.read will block until some data is available. ! int numread = in.read(b, off, len); if (numread < 0) ! throw new EOFException(); len -= numread; off += numread; } } /** ! * This method reads a Java int value from an input ! * stream It operates by reading four bytes from the stream and ! * converting them to a single Java int The bytes are ! * stored most significant byte first (i.e., "big endian") ! * regardless of the native host byte ordering. *

            ! * As an example, if byte1 through byte4 ! * represent the first four bytes read from the stream, they will be * transformed to an int in the following manner: *

            ! * (int)(((byte1 & 0xFF) << 24) + ((byte2 & 0xFF) << 16) + ! * ((byte3 & 0xFF) << 8) + (byte4 & 0xFF))) *

            ! * The value returned is in the range of 0 to 65535. *

            * This method can read an int written by an object * implementing the writeInt() method in the --- 231,310 ---- * @exception EOFException If end of file is reached before reading the float * @exception IOException If any other error occurs * ! * @see DataOutput#writeFloat ! * @see java.lang.Float#intBitsToFloat ! */ ! public final float readFloat () throws IOException { ! return Float.intBitsToFloat (readInt ()); } /** * This method reads raw bytes into the passed array until the array is * full. Note that this method blocks until the data is available and * throws an exception if there is not enough data left in the stream to ! * fill the buffer. Note also that zero length buffers are permitted. ! * In this case, the method will return immediately without reading any ! * bytes from the stream. * * @param b The buffer into which to read the data * ! * @exception EOFException If end of file is reached before filling the ! * buffer ! * @exception IOException If any other error occurs ! */ ! public final void readFully (byte[] b) throws IOException { ! readFully (b, 0, b.length); } /** ! * This method reads raw bytes into the passed array buf ! * starting ! * offset bytes into the buffer. The number of bytes read ! * will be ! * exactly len. Note that this method blocks until the data is ! * available and throws an exception if there is not enough data left in ! * the stream to read len bytes. Note also that zero length ! * buffers are permitted. In this case, the method will return immediately ! * without reading any bytes from the stream. * * @param buf The buffer into which to read the data * @param offset The offset into the buffer to start storing data * @param len The number of bytes to read into the buffer * ! * @exception EOFException If end of file is reached before filling the ! * buffer * @exception IOException If any other error occurs */ ! public final void readFully (byte[] b, int off, int len) throws IOException { while (len > 0) { // in.read will block until some data is available. ! int numread = in.read (b, off, len); if (numread < 0) ! throw new EOFException (); len -= numread; off += numread; } } /** ! * This method reads a Java int value from an input stream ! * It operates by reading four bytes from the stream and converting them to ! * a single Java int. The bytes are stored most ! * significant byte first (i.e., "big endian") regardless of the native ! * host byte ordering. *

            ! * As an example, if byte1 through byte4 represent ! * the first four bytes read from the stream, they will be * transformed to an int in the following manner: *

            ! * (int)(((byte1 & 0xFF) << 24) + ((byte2 & 0xFF) << 16) + ! * ((byte3 & 0xFF)<< 8) + (byte4 & 0xFF))) *

            ! * The value returned is in the range of -2147483648 to 2147483647. *

            * This method can read an int written by an object * implementing the writeInt() method in the *************** public class DataInputStream extends Fil *** 308,319 **** * @exception EOFException If end of file is reached before reading the int * @exception IOException If any other error occurs * ! * @see DataOutput */ ! public final int readInt() throws IOException { readFully (buf, 0, 4); ! return convertToInt(buf); } /** --- 315,326 ---- * @exception EOFException If end of file is reached before reading the int * @exception IOException If any other error occurs * ! * @see DataOutput#writeInt */ ! public final int readInt () throws IOException { readFully (buf, 0, 4); ! return convertToInt (buf); } /** *************** public class DataInputStream extends Fil *** 342,350 **** * * @deprecated */ ! public final String readLine() throws IOException { ! StringBuffer strb = new StringBuffer(); readloop: while (true) { --- 349,357 ---- * * @deprecated */ ! public final String readLine () throws IOException { ! StringBuffer strb = new StringBuffer (); readloop: while (true) { *************** public class DataInputStream extends Fil *** 356,362 **** getnext = false; c = in.read(); if (c < 0) // got an EOF ! return strb.length() > 0 ? strb.toString() : null; ch = (char) c; if ((ch &= 0xFF) == '\n') // hack to correctly handle '\r\n' sequences --- 363,369 ---- getnext = false; c = in.read(); if (c < 0) // got an EOF ! return strb.length () > 0 ? strb.toString () : null; ch = (char) c; if ((ch &= 0xFF) == '\n') // hack to correctly handle '\r\n' sequences *************** public class DataInputStream extends Fil *** 430,451 **** } /** ! * This method reads a Java long value from an input stream ! * It operates by reading eight bytes from the stream and converting them to ! * a single Java long The bytes are stored most * significant byte first (i.e., "big endian") regardless of the native ! * host byte ordering. *

            ! * As an example, if byte1 through byte8 ! * represent the first eight bytes read from the stream, they will ! * be transformed to an long in the following manner: *

            ! * (long)((((long)byte1 & 0xFF) << 56) + (((long)byte2 & 0xFF) << 48) + ! * (((long)byte3 & 0xFF) << 40) + (((long)byte4 & 0xFF) << 32) + ! * (((long)byte5 & 0xFF) << 24) + (((long)byte6 & 0xFF) << 16) + ! * (((long)byte7 & 0xFF) << 8) + ((long)byte9 & 0xFF))) *

            ! * The value returned is in the range of 0 to 65535. *

            * This method can read an long written by an object * implementing the writeLong() method in the --- 437,460 ---- } /** ! * This method reads a Java long value from an input stream ! * It operates by reading eight bytes from the stream and converting them to ! * a single Java long. The bytes are stored most * significant byte first (i.e., "big endian") regardless of the native ! * host byte ordering. *

            ! * As an example, if byte1 through byte8 represent ! * the first eight bytes read from the stream, they will be ! * transformed to an long in the following manner: *

            ! * (long)(((byte1 & 0xFF) << 56) + ((byte2 & 0xFF) << 48) + ! * ((byte3 & 0xFF) << 40) + ((byte4 & 0xFF) << 32) + ! * ((byte5 & 0xFF) << 24) + ((byte6 & 0xFF) << 16) + ! * ((byte7 & 0xFF) << 8) + (byte8 & 0xFF))) ! * *

            ! * The value returned is in the range of -9223372036854775808 to ! * 9223372036854775807. *

            * This method can read an long written by an object * implementing the writeLong() method in the *************** public class DataInputStream extends Fil *** 456,467 **** * @exception EOFException If end of file is reached before reading the long * @exception IOException If any other error occurs * ! * @see DataOutput */ ! public final long readLong() throws IOException { readFully (buf, 0, 8); ! return convertToLong(buf); } /** --- 465,476 ---- * @exception EOFException If end of file is reached before reading the long * @exception IOException If any other error occurs * ! * @see DataOutput#writeLong */ ! public final long readLong () throws IOException { readFully (buf, 0, 8); ! return convertToLong (buf); } /** *************** public class DataInputStream extends Fil *** 476,482 **** * respectively, they will be transformed to a short. in * the following manner: *

            ! * (short)(((byte1 & 0xFF) << 8) | (byte2 & 0xFF) *

            * The value returned is in the range of -32768 to 32767. *

            --- 485,491 ---- * respectively, they will be transformed to a short. in * the following manner: *

            ! * (short)(((byte1 & 0xFF) << 8) | (byte2 & 0xFF)) *

            * The value returned is in the range of -32768 to 32767. *

            *************** public class DataInputStream extends Fil *** 489,502 **** * @exception EOFException If end of file is reached before reading the value * @exception IOException If any other error occurs * ! * @see DataOutput */ ! public final short readShort() throws IOException { readFully (buf, 0, 2); ! return convertToShort(buf); } ! /** * This method reads 8 unsigned bits into a Java int * value from the stream. The value returned is in the range of 0 to --- 498,511 ---- * @exception EOFException If end of file is reached before reading the value * @exception IOException If any other error occurs * ! * @see DataOutput#writeShort */ ! public final short readShort () throws IOException { readFully (buf, 0, 2); ! return convertToShort (buf); } ! /** * This method reads 8 unsigned bits into a Java int * value from the stream. The value returned is in the range of 0 to *************** public class DataInputStream extends Fil *** 511,521 **** * @exception EOFException If end of file is reached before reading the value * @exception IOException If any other error occurs * ! * @see DataOutput */ ! public final int readUnsignedByte() throws IOException { ! return convertToUnsignedByte(in.read()); } /** --- 520,530 ---- * @exception EOFException If end of file is reached before reading the value * @exception IOException If any other error occurs * ! * @see DataOutput#writeByte */ ! public final int readUnsignedByte () throws IOException { ! return convertToUnsignedByte (in.read ()); } /** *************** public class DataInputStream extends Fil *** 530,536 **** * respectively, they will be transformed to an int in * the following manner: *

            ! * (int)(((byte1 & 0xFF) << 8) + (byte2 & 0xFF)) *

            * The value returned is in the range of 0 to 65535. *

            --- 539,545 ---- * respectively, they will be transformed to an int in * the following manner: *

            ! * (int)(((byte1 & 0xFF) << 8) + (byte2 & 0xFF)) *

            * The value returned is in the range of 0 to 65535. *

            *************** public class DataInputStream extends Fil *** 542,552 **** * * @exception EOFException If end of file is reached before reading the value * @exception IOException If any other error occurs */ ! public final int readUnsignedShort() throws IOException { readFully (buf, 0, 2); ! return convertToUnsignedShort(buf); } /** --- 551,563 ---- * * @exception EOFException If end of file is reached before reading the value * @exception IOException If any other error occurs + * + * @see DataOutput#writeShort */ ! public final int readUnsignedShort () throws IOException { readFully (buf, 0, 2); ! return convertToUnsignedShort (buf); } /** *************** public class DataInputStream extends Fil *** 598,604 **** * character encoding, then they would be converted to a Java * char like so: *

            ! * (char)(((byte1 & 0x0F) << 12) | ((byte2 & 0x3F) << 6) | (byte3 & 0x3F)) *

            * Note that all characters are encoded in the method that requires * the fewest number of bytes with the exception of the character --- 609,616 ---- * character encoding, then they would be converted to a Java * char like so: *

            ! * (char)(((byte1 & 0x0F) << 12) | ((byte2 & 0x3F) << 6) | ! * (byte3 & 0x3F)) *

            * Note that all characters are encoded in the method that requires * the fewest number of bytes with the exception of the character *************** public class DataInputStream extends Fil *** 610,627 **** * This method can read data that was written by an object implementing the * writeUTF() method in DataOutput * ! * @returns The String read * * @exception EOFException If end of file is reached before reading * the String * @exception UTFDataFormatException If the data is not in UTF-8 format * @exception IOException If any other error occurs * ! * @see DataOutput */ ! public final String readUTF() throws IOException { ! return readUTF(this); } /** --- 622,639 ---- * This method can read data that was written by an object implementing the * writeUTF() method in DataOutput * ! * @return The String read * * @exception EOFException If end of file is reached before reading * the String * @exception UTFDataFormatException If the data is not in UTF-8 format * @exception IOException If any other error occurs * ! * @see DataOutput#writeUTF */ ! public final String readUTF () throws IOException { ! return readUTF (this); } /** *************** public class DataInputStream extends Fil *** 633,651 **** * @return The String read from the source * * @exception IOException If an error occurs */ ! public final static String readUTF(DataInput in) throws IOException { ! final int UTFlen = in.readUnsignedShort(); ! byte[] buf = new byte[UTFlen]; // This blocks until the entire string is available rather than // doing partial processing on the bytes that are available and then // blocking. An advantage of the latter is that Exceptions // could be thrown earlier. The former is a bit cleaner. ! in.readFully(buf, 0, UTFlen); ! return convertFromUTF(buf); } /** --- 645,665 ---- * @return The String read from the source * * @exception IOException If an error occurs + * + * @see DataInput#readUTF */ ! public final static String readUTF (DataInput in) throws IOException { ! final int UTFlen = in.readUnsignedShort (); ! byte[] buf = new byte [UTFlen]; // This blocks until the entire string is available rather than // doing partial processing on the bytes that are available and then // blocking. An advantage of the latter is that Exceptions // could be thrown earlier. The former is a bit cleaner. ! in.readFully (buf, 0, UTFlen); ! return convertFromUTF (buf); } /** *************** public class DataInputStream extends Fil *** 655,674 **** * to skip. * * @param n The requested number of bytes to skip. * @return The requested number of bytes to skip. * @exception IOException If an error occurs. * @specnote The JDK docs claim that this returns the number of bytes * actually skipped. The JCL claims that this method can throw an * EOFException. Neither of these appear to be true in the JDK 1.3's * implementation. This tries to implement the actual JDK behaviour. */ ! public final int skipBytes(int n) throws IOException { if (n <= 0) return 0; try { ! return (int) in.skip(n); } catch (EOFException x) { --- 669,690 ---- * to skip. * * @param n The requested number of bytes to skip. + * * @return The requested number of bytes to skip. + * * @exception IOException If an error occurs. * @specnote The JDK docs claim that this returns the number of bytes * actually skipped. The JCL claims that this method can throw an * EOFException. Neither of these appear to be true in the JDK 1.3's * implementation. This tries to implement the actual JDK behaviour. */ ! public final int skipBytes (int n) throws IOException { if (n <= 0) return 0; try { ! return (int) in.skip (n); } catch (EOFException x) { *************** public class DataInputStream extends Fil *** 677,770 **** return n; } ! static boolean convertToBoolean(int b) throws EOFException { if (b < 0) ! throw new EOFException(); return (b != 0); } ! static byte convertToByte(int i) throws EOFException { if (i < 0) ! throw new EOFException(); return (byte) i; } ! static int convertToUnsignedByte(int i) throws EOFException { if (i < 0) ! throw new EOFException(); return (i & 0xFF); } ! static char convertToChar(byte[] buf) { ! return (char) ((buf[0] << 8) | (buf[1] & 0xff)); } ! static short convertToShort(byte[] buf) { ! return (short) ((buf[0] << 8) | (buf[1] & 0xff)); } ! static int convertToUnsignedShort(byte[] buf) { ! return (((buf[0] & 0xff) << 8) | (buf[1] & 0xff)); } ! static int convertToInt(byte[] buf) { ! return (((buf[0] & 0xff) << 24) | ((buf[1] & 0xff) << 16) | ! ((buf[2] & 0xff) << 8) | (buf[3] & 0xff)); } ! static long convertToLong(byte[] buf) { ! return (((long)(buf[0] & 0xff) << 56) | ! ((long)(buf[1] & 0xff) << 48) | ! ((long)(buf[2] & 0xff) << 40) | ! ((long)(buf[3] & 0xff) << 32) | ! ((long)(buf[4] & 0xff) << 24) | ! ((long)(buf[5] & 0xff) << 16) | ! ((long)(buf[6] & 0xff) << 8) | ! ((long)(buf[7] & 0xff))); } ! static String convertFromUTF(byte[] buf) throws EOFException, UTFDataFormatException { // Give StringBuffer an initial estimated size to avoid // enlarge buffer frequently ! StringBuffer strbuf = new StringBuffer(buf.length/2 + 2); for (int i = 0; i < buf.length; ) { ! if ((buf[i] & 0x80) == 0) // bit pattern 0xxxxxxx ! strbuf.append((char) (buf[i++] & 0xFF)); ! else if ((buf[i] & 0xE0) == 0xC0) // bit pattern 110xxxxx { ! if (i + 1 >= buf.length || (buf[i+1] & 0xC0) != 0x80) ! throw new UTFDataFormatException(); ! strbuf.append((char) (((buf[i++] & 0x1F) << 6) | ! (buf[i++] & 0x3F))); } ! else if ((buf[i] & 0xF0) == 0xE0) // bit pattern 1110xxxx { ! if (i + 2 >= buf.length || ! (buf[i+1] & 0xC0) != 0x80 || (buf[i+2] & 0xC0) != 0x80) ! throw new UTFDataFormatException(); ! strbuf.append((char) (((buf[i++] & 0x0F) << 12) | ! ((buf[i++] & 0x3F) << 6) | ! (buf[i++] & 0x3F))); } ! else // must be ((buf[i] & 0xF0) == 0xF0 || (buf[i] & 0xC0) == 0x80) ! throw new UTFDataFormatException(); // bit patterns 1111xxxx or // 10xxxxxx } ! return strbuf.toString(); } } --- 693,800 ---- return n; } ! static boolean convertToBoolean (int b) throws EOFException { if (b < 0) ! throw new EOFException (); ! return (b != 0); } ! static byte convertToByte (int i) throws EOFException { if (i < 0) ! throw new EOFException (); ! return (byte) i; } ! static int convertToUnsignedByte (int i) throws EOFException { if (i < 0) ! throw new EOFException (); ! return (i & 0xFF); } ! static char convertToChar (byte[] buf) { ! return (char) ((buf [0] << 8) ! | (buf [1] & 0xff)); } ! static short convertToShort (byte[] buf) { ! return (short) ((buf [0] << 8) ! | (buf [1] & 0xff)); } ! static int convertToUnsignedShort (byte[] buf) { ! return (((buf [0] & 0xff) << 8) ! | (buf [1] & 0xff)); } ! static int convertToInt (byte[] buf) { ! return (((buf [0] & 0xff) << 24) ! | ((buf [1] & 0xff) << 16) ! | ((buf [2] & 0xff) << 8) ! | (buf [3] & 0xff)); } ! static long convertToLong (byte[] buf) { ! return (((long)(buf [0] & 0xff) << 56) | ! ((long)(buf [1] & 0xff) << 48) | ! ((long)(buf [2] & 0xff) << 40) | ! ((long)(buf [3] & 0xff) << 32) | ! ((long)(buf [4] & 0xff) << 24) | ! ((long)(buf [5] & 0xff) << 16) | ! ((long)(buf [6] & 0xff) << 8) | ! ((long)(buf [7] & 0xff))); } ! // FIXME: This method should be re-thought. I suspect we have multiple ! // UTF-8 decoders floating around. We should use the standard charset ! // converters, maybe and adding a direct call into one of the new ! // NIO converters for a super-fast UTF8 decode. ! static String convertFromUTF (byte[] buf) throws EOFException, UTFDataFormatException { // Give StringBuffer an initial estimated size to avoid // enlarge buffer frequently ! StringBuffer strbuf = new StringBuffer (buf.length / 2 + 2); for (int i = 0; i < buf.length; ) { ! if ((buf [i] & 0x80) == 0) // bit pattern 0xxxxxxx ! strbuf.append ((char) (buf [i++] & 0xFF)); ! else if ((buf [i] & 0xE0) == 0xC0) // bit pattern 110xxxxx { ! if (i + 1 >= buf.length ! || (buf [i + 1] & 0xC0) != 0x80) ! throw new UTFDataFormatException (); ! strbuf.append((char) (((buf [i++] & 0x1F) << 6) ! | (buf [i++] & 0x3F))); } ! else if ((buf [i] & 0xF0) == 0xE0) // bit pattern 1110xxxx { ! if (i + 2 >= buf.length ! || (buf [i + 1] & 0xC0) != 0x80 ! || (buf [i + 2] & 0xC0) != 0x80) ! throw new UTFDataFormatException (); ! strbuf.append ((char) (((buf [i++] & 0x0F) << 12) ! | ((buf [i++] & 0x3F) << 6) ! | (buf [i++] & 0x3F))); } ! else // must be ((buf [i] & 0xF0) == 0xF0 || (buf [i] & 0xC0) == 0x80) ! throw new UTFDataFormatException (); // bit patterns 1111xxxx or // 10xxxxxx } ! return strbuf.toString (); } } diff -Nrc3pad gcc-3.3.3/libjava/java/io/DataOutput.java gcc-3.4.0/libjava/java/io/DataOutput.java *** gcc-3.3.3/libjava/java/io/DataOutput.java 2002-01-22 22:40:14.000000000 +0000 --- gcc-3.4.0/libjava/java/io/DataOutput.java 2003-04-20 22:47:43.000000000 +0000 *************** *** 1,5 **** /* DataOutput.java -- Interface for writing data from a stream ! Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* DataOutput.java -- Interface for writing data from a stream ! Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** package java.io; *** 44,228 **** */ /** ! * This interface is implemented by classes that can wrte data to streams ! * from Java primitive types. ! * ! * @author Aaron M. Renn (arenn@urbanophile.com) ! * @author Tom Tromey ! */ public interface DataOutput { ! /** ! * This method writes a Java boolean value to an output stream ! * ! * @param value The boolean value to write ! * ! * @exception IOException If an error occurs ! */ ! void ! writeBoolean(boolean value) throws IOException; ! ! /*************************************************************************/ ! ! /** ! * This method writes a Java byte value to an output stream ! * ! * @param value The int value to write ! * ! * @exception IOException If an error occurs ! */ ! void ! writeByte(int value) throws IOException; ! ! /*************************************************************************/ ! ! /** ! * This method writes a Java char value to an output stream ! * ! * @param value The char value to write ! * ! * @exception IOException If an error occurs ! */ ! void ! writeChar(int value) throws IOException; ! ! /*************************************************************************/ ! ! /** ! * This method writes a Java int value to an output stream as a 16 bit value ! * ! * @param value The int value to write as a 16-bit value ! * ! * @exception IOException If an error occurs ! */ ! void ! writeShort(int value) throws IOException; ! ! /*************************************************************************/ ! ! /** ! * This method writes a Java int value to an output stream ! * ! * @param value The int value to write ! * ! * @exception IOException If an error occurs ! */ ! void ! writeInt(int value) throws IOException; ! ! /*************************************************************************/ ! ! /** ! * This method writes a Java long value to an output stream ! * ! * @param value The long value to write ! * ! * @exception IOException If an error occurs ! */ ! void ! writeLong(long value) throws IOException; ! ! /*************************************************************************/ ! ! /** ! * This method writes a Java float value to an output stream ! * ! * @param value The float value to write ! * ! * @exception IOException If an error occurs ! */ ! void ! writeFloat(float value) throws IOException; ! ! /*************************************************************************/ ! ! /** ! * This method writes a Java double value to an output stream ! * ! * @param value The double value to write ! * ! * @exception IOException If any other error occurs ! */ ! void ! writeDouble(double value) throws IOException; ! /*************************************************************************/ ! /** ! * This method writes a String to an output stream as an array of bytes ! * ! * @param value The String to write ! * ! * @exception IOException If an error occurs ! */ ! void ! writeBytes(String value) throws IOException; ! /*************************************************************************/ ! /** ! * This method writes a String to an output stream as an array of char's ! * ! * @param value The String to write ! * ! * @exception IOException If an error occurs ! */ ! void ! writeChars(String value) throws IOException; ! /*************************************************************************/ ! /** ! * This method writes a String to an output stream encoded in ! * UTF-8 format. ! * ! * @param value The String to write ! * ! * @exception IOException If an error occurs ! */ ! void ! writeUTF(String value) throws IOException; ! /*************************************************************************/ ! /** ! * This method writes an 8-bit value (passed into the method as a Java ! * int) to an output stream. ! * ! * @param value The byte to write to the output stream ! * ! * @exception IOException If an error occurs ! */ ! void ! write(int value) throws IOException; ! /*************************************************************************/ ! /** ! * This method writes the raw byte array passed in to the output stream. ! * ! * @param buf The byte array to write ! * ! * @exception IOException If an error occurs ! */ ! void ! write(byte[] buf) throws IOException; ! /*************************************************************************/ ! /** ! * This method writes raw bytes from the passed array buf starting ! * offset bytes into the buffer. The number of bytes written will be ! * exactly len. ! * ! * @param buf The buffer from which to write the data ! * @param offset The offset into the buffer to start writing data from ! * @param len The number of bytes to write from the buffer to the output stream ! * ! * @exception IOException If any other error occurs ! */ ! void ! write(byte[] buf, int offset, int len) throws IOException; } // interface DataOutput --- 44,326 ---- */ /** ! * This interface is implemented by classes that can wrte data to streams ! * from Java primitive types. This data can subsequently be read back ! * by classes implementing the DataInput interface. ! * ! * @author Aaron M. Renn (arenn@urbanophile.com) ! * @author Tom Tromey ! * ! * @see DataInput ! */ public interface DataOutput { + /** + * This method writes a Java boolean value to an output stream. If + * value is true, a byte with the value of + * 1 will be written, otherwise a byte with the value of 0 will be + * written. + * + * The value written can be read using the readBoolean + * method in DataInput. + * + * @param value The boolean value to write + * + * @exception IOException If an error occurs + * + * @see DataInput#readBoolean + */ + void writeBoolean(boolean value) throws IOException; ! /** ! * This method writes a Java byte value to an output stream. The ! * byte to be written will be in the lowest 8 bits of the ! * int value passed. ! * ! * The value written can be read using the readByte or ! * readUnsignedByte methods in DataInput. ! * ! * @param value The int value to write ! * ! * @exception IOException If an error occurs ! * ! * @see DataInput#readByte ! * @see DataInput#readUnsignedByte ! */ ! void writeByte(int value) throws IOException; ! /** ! * This method writes a Java char value to an output stream. The ! * char to be written will be in the lowest 16 bits of the int ! * value passed. These bytes will be written "big endian". That is, ! * with the high byte written first in the following manner: ! *

            ! * byte0 = (byte)((value & 0xFF00) >> 8);
            ! * byte1 = (byte)(value & 0x00FF);
            ! *

            ! * ! * The value written can be read using the readChar ! * method in DataInput. ! * ! * @param value The char value to write ! * ! * @exception IOException If an error occurs ! * ! * @see DataInput#readChar ! */ ! void writeChar(int value) throws IOException; ! /** ! * This method writes a Java short value to an output stream. The ! * char to be written will be in the lowest 16 bits of the int ! * value passed. These bytes will be written "big endian". That is, ! * with the high byte written first in the following manner: ! *

            ! * byte0 = (byte)((value & 0xFF00) >> 8);
            ! * byte1 = (byte)(value & 0x00FF);
            ! *

            ! * ! * The value written can be read using the readShort and ! * readUnsignedShort methods in DataInput. ! * ! * @param value The int value to write as a 16-bit value ! * ! * @exception IOException If an error occurs ! * ! * @see DataInput#readShort ! * @see DataInput#readUnsignedShort ! */ ! void writeShort(int value) throws IOException; ! /** ! * This method writes a Java int value to an output stream. The 4 bytes ! * of the passed value will be written "big endian". That is, with ! * the high byte written first in the following manner: ! *

            ! * byte0 = (byte)((value & 0xFF000000) >> 24);
            ! * byte1 = (byte)((value & 0x00FF0000) >> 16);
            ! * byte2 = (byte)((value & 0x0000FF00) >> 8);
            ! * byte3 = (byte)(value & 0x000000FF);
            ! *

            ! * ! * The value written can be read using the readInt ! * method in DataInput. ! * ! * @param value The int value to write ! * ! * @exception IOException If an error occurs ! * ! * @see DataInput#readInt ! */ ! void writeInt(int value) throws IOException; ! /** ! * This method writes a Java long value to an output stream. The 8 bytes ! * of the passed value will be written "big endian". That is, with ! * the high byte written first in the following manner: ! *

            ! * byte0 = (byte)((value & 0xFF00000000000000L) >> 56);
            ! * byte1 = (byte)((value & 0x00FF000000000000L) >> 48);
            ! * byte2 = (byte)((value & 0x0000FF0000000000L) >> 40);
            ! * byte3 = (byte)((value & 0x000000FF00000000L) >> 32);
            ! * byte4 = (byte)((value & 0x00000000FF000000L) >> 24);
            ! * byte5 = (byte)((value & 0x0000000000FF0000L) >> 16);
            ! * byte6 = (byte)((value & 0x000000000000FF00L) >> 8);
            ! * byte7 = (byte)(value & 0x00000000000000FFL);
            ! *

            ! * ! * The value written can be read using the readLong ! * method in DataInput. ! * ! * @param value The long value to write ! * ! * @exception IOException If an error occurs ! * ! * @see DataInput#readLong ! */ ! void writeLong(long value) throws IOException; ! /** ! * This method writes a Java float value to the stream. This ! * value is written by first calling the method ! * Float.floatToIntBits ! * to retrieve an int representing the floating point number, ! * then writing this int value to the stream exactly the same ! * as the writeInt() method does. ! * ! * The value written can be read using the readFloat ! * method in DataInput. ! * ! * @param value The float value to write ! * ! * @exception IOException If an error occurs ! * ! * @see writeInt ! * @see DataInput#readFloat ! * @see Float#floatToIntBits ! */ ! void writeFloat(float value) throws IOException; ! /** ! * This method writes a Java double value to the stream. This ! * value is written by first calling the method ! * Double.doubleToLongBits ! * to retrieve an long representing the floating point number, ! * then writing this long value to the stream exactly the same ! * as the writeLong() method does. ! * ! * The value written can be read using the readDouble ! * method in DataInput. ! * ! * @param value The double value to write ! * ! * @exception IOException If any other error occurs ! * ! * @see writeLong ! * @see DataInput#readDouble ! * @see Double#doubleToLongBits ! */ ! void writeDouble(double value) throws IOException; ! /** ! * This method writes all the bytes in a String out to the ! * stream. One byte is written for each character in the ! * String. ! * The high eight bits of each character are discarded, thus this ! * method is inappropriate for completely representing Unicode characters. ! * ! * @param value The String to write ! * ! * @exception IOException If an error occurs ! */ ! void writeBytes(String value) throws IOException; ! /** ! * This method writes all the characters of a String to an ! * output stream as an array of char's. Each character ! * is written using the method specified in the writeChar ! * method. ! * ! * @param value The String to write ! * ! * @exception IOException If an error occurs ! * ! * @see writeChar ! */ ! void writeChars(String value) throws IOException; ! /** ! * This method writes a Java String to the stream in a modified ! * UTF-8 format. First, two bytes are written to the stream indicating the ! * number of bytes to follow. This is written in the form of a Java ! * short value in the same manner used by the ! * writeShort method. Note that this is the number of ! * bytes in the ! * encoded String not the String length. Next ! * come the encoded characters. Each character in the String ! * is encoded as either one, two or three bytes. For characters in the ! * range of \u0001 to \u007F, one byte is used. ! * The character ! * value goes into bits 0-7 and bit eight is 0. For characters in the range ! * of \u0080 to \u007FF, two bytes are used. Bits ! * 6-10 of the character value are encoded bits 0-4 of the first byte, with ! * the high bytes having a value of "110". Bits 0-5 of the character value ! * are stored in bits 0-5 of the second byte, with the high bits set to ! * "10". This type of encoding is also done for the null character ! * \u0000. This eliminates any C style NUL character values ! * in the output. All remaining characters are stored as three bytes. ! * Bits 12-15 of the character value are stored in bits 0-3 of the first ! * byte. The high bits of the first bytes are set to "1110". Bits 6-11 ! * of the character value are stored in bits 0-5 of the second byte. The ! * high bits of the second byte are set to "10". And bits 0-5 of the ! * character value are stored in bits 0-5 of byte three, with the high bits ! * of that byte set to "10". ! * ! * The value written can be read using the readUTF ! * method in DataInput. ! * ! * @param value The String to write ! * ! * @exception IOException If an error occurs ! * ! * @see DataInput#readUTF ! */ ! void writeUTF(String value) throws IOException; ! /** ! * This method writes an 8-bit value (passed into the method as a Java ! * int) to an output stream. The low 8 bits of the ! * passed value are written. ! * ! * @param value The byte to write to the output stream ! * ! * @exception IOException If an error occurs ! */ ! void write(int value) throws IOException; ! /** ! * This method writes the raw byte array passed in to the output stream. ! * ! * @param buf The byte array to write ! * ! * @exception IOException If an error occurs ! */ ! void write(byte[] buf) throws IOException; ! /** ! * This method writes raw bytes from the passed array buf ! * starting ! * offset bytes into the buffer. The number of bytes ! * written will be exactly len. ! * ! * @param buf The buffer from which to write the data ! * @param offset The offset into the buffer to start writing data from ! * @param len The number of bytes to write from the buffer to the output ! * stream ! * ! * @exception IOException If any other error occurs ! */ ! void write(byte[] buf, int offset, int len) throws IOException; } // interface DataOutput + diff -Nrc3pad gcc-3.3.3/libjava/java/io/DataOutputStream.java gcc-3.4.0/libjava/java/io/DataOutputStream.java *** gcc-3.3.3/libjava/java/io/DataOutputStream.java 2001-12-16 00:14:57.000000000 +0000 --- gcc-3.4.0/libjava/java/io/DataOutputStream.java 2003-05-09 07:10:58.000000000 +0000 *************** *** 1,130 **** ! // DataOutputStream.java - Output filter that implements DataOutput ! /* Copyright (C) 1998, 1999 Free Software Foundation ! This file is part of libgcj. ! This software is copyrighted work licensed under the terms of the ! Libgcj License. Please consult the file "LIBGCJ_LICENSE" for ! details. */ ! package java.io; ! /** ! * @author Tom Tromey ! * @date September 24, 1998 ! */ /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 * "The Java Language Specification", ISBN 0-201-63451-1 * Status: Complete to version 1.1. */ public class DataOutputStream extends FilterOutputStream implements DataOutput { public DataOutputStream (OutputStream out) { super (out); written = 0; } public void flush () throws IOException { out.flush(); } public final int size () { return written; } ! public synchronized void write (int b) throws IOException { ! out.write(b); ++written; } ! public synchronized void write (byte[] b, int off, int len) ! throws IOException, NullPointerException, IndexOutOfBoundsException { ! out.write(b, off, len); written += len; } ! public final void writeBoolean (boolean v) throws IOException { ! write (v ? 1 : 0); } ! public final void writeByte (int v) throws IOException { ! write (v & 0xff); } ! public final void writeShort (int v) throws IOException { ! write ((byte) (0xff & (v >> 8))); ! write ((byte) (0xff & v)); } ! public final void writeChar (int v) throws IOException { ! write ((byte) (0xff & (v >> 8))); ! write ((byte) (0xff & v)); } ! public final void writeInt (int v) throws IOException { ! write ((byte) (0xff & (v >> 24))); ! write ((byte) (0xff & (v >> 16))); ! write ((byte) (0xff & (v >> 8))); ! write ((byte) (0xff & v)); } ! public final void writeLong (long v) throws IOException { ! write ((byte) (0xff & (v >> 56))); ! write ((byte) (0xff & (v >> 48))); ! write ((byte) (0xff & (v >> 40))); ! write ((byte) (0xff & (v >> 32))); ! write ((byte) (0xff & (v >> 24))); ! write ((byte) (0xff & (v >> 16))); ! write ((byte) (0xff & (v >> 8))); ! write ((byte) (0xff & v)); } ! public final void writeFloat (float v) throws IOException { ! writeInt (Float.floatToIntBits(v)); } ! public final void writeDouble (double v) throws IOException { ! writeLong (Double.doubleToLongBits(v)); } ! public final void writeBytes (String s) throws IOException { ! int len = s.length(); for (int i = 0; i < len; ++i) ! writeByte (s.charAt(i)); } ! public final void writeChars (String s) throws IOException { ! int len = s.length(); for (int i = 0; i < len; ++i) ! writeChar (s.charAt(i)); } ! public final void writeUTF (String s) throws IOException { ! int len = s.length(); int sum = 0; for (int i = 0; i < len && sum <= 65535; ++i) { ! char c = s.charAt(i); if (c >= '\u0001' && c <= '\u007f') sum += 1; else if (c == '\u0000' || (c >= '\u0080' && c <= '\u07ff')) --- 1,417 ---- ! /* DataOutputStream.java -- Writes primitive Java datatypes to streams ! Copyright (C) 1998, 2001, 2003 Free Software Foundation, Inc. ! This file is part of GNU Classpath. ! GNU Classpath is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! GNU Classpath is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with GNU Classpath; see the file COPYING. If not, write to the ! Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ! 02111-1307 USA. ! Linking this library statically or dynamically with other modules is ! making a combined work based on this library. Thus, the terms and ! conditions of the GNU General Public License cover the whole ! combination. ! As a special exception, the copyright holders of this library give you ! permission to link this library with independent modules to produce an ! executable, regardless of the license terms of these independent ! modules, and to copy and distribute the resulting executable under ! terms of your choice, provided that you also meet, for each linked ! independent module, the terms and conditions of the license of that ! module. An independent module is a module which is not derived from ! or based on this library. If you modify this library, you may extend ! this exception to your version of the library, but you are not ! obligated to do so. If you do not wish to do so, delete this ! exception statement from your version. */ ! ! ! package java.io; /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 * "The Java Language Specification", ISBN 0-201-63451-1 * Status: Complete to version 1.1. */ + /** + * This class provides a mechanism for writing primitive Java datatypes + * to an OutputStream in a portable way. Data written to + * a stream using this class can be read back in using the + * DataInputStream class on any platform. + * + * @see DataInputStream + * + * @author Aaron M. Renn + * @author Tom Tromey + */ public class DataOutputStream extends FilterOutputStream implements DataOutput { + /** + * This is the total number of bytes that have been written to the + * stream by this object instance. + */ + protected int written; + + /** + * This method initializes an instance of DataOutputStream to + * write its data to the specified underlying OutputStream + * + * @param out The subordinate OutputStream to which this + * object will write + */ public DataOutputStream (OutputStream out) { super (out); written = 0; } + /** + * This method flushes any unwritten bytes to the underlying stream. + * + * @exception IOException If an error occurs. + */ public void flush () throws IOException { out.flush(); } + /** + * This method returns the total number of bytes that have been written to + * the underlying output stream so far. This is the value of the + * written instance variable + * + * @return The number of bytes written to the stream. + */ public final int size () { return written; } ! /** ! * This method writes the specified byte (passed as an int) ! * to the underlying output stream. ! * ! * @param value The byte to write, passed as an int. ! * ! * @exception IOException If an error occurs. ! */ ! public synchronized void write (int value) throws IOException { ! out.write (value); ++written; } ! /** ! * This method writes len bytes from the specified byte array ! * buf starting at position offset into the ! * buffer to the underlying output stream. ! * ! * @param buf The byte array to write from. ! * @param offset The index into the byte array to start writing from. ! * @param len The number of bytes to write. ! * ! * @exception IOException If an error occurs. ! */ ! public synchronized void write (byte[] buf, int offset, int len) ! throws IOException { ! out.write(buf, offset, len); written += len; } ! /** ! * This method writes a Java boolean value to an output stream. If ! * value is true, a byte with the value of ! * 1 will be written, otherwise a byte with the value of 0 will be ! * written. ! * ! * The value written can be read using the readBoolean ! * method in DataInput. ! * ! * @param value The boolean value to write to the stream ! * ! * @exception IOException If an error occurs ! * ! * @see DataInput#readBoolean ! */ ! public final void writeBoolean (boolean value) throws IOException { ! write (value ? 1 : 0); } ! /** ! * This method writes a Java byte value to an output stream. The ! * byte to be written will be in the lowest 8 bits of the ! * int value passed. ! * ! * The value written can be read using the readByte or ! * readUnsignedByte methods in DataInput. ! * ! * @param value The byte to write to the stream, passed as ! * the low eight bits of an int. ! * ! * @exception IOException If an error occurs ! * ! * @see DataInput#readByte ! * @see DataInput#readUnsignedByte ! */ ! public final void writeByte (int value) throws IOException { ! write (value & 0xff); } ! /** ! * This method writes a Java short value to an output stream. The ! * char to be written will be in the lowest 16 bits of the int ! * value passed. These bytes will be written "big endian". That is, ! * with the high byte written first in the following manner: ! *

            ! * byte0 = (byte)((value & 0xFF00) >> 8);
            ! * byte1 = (byte)(value & 0x00FF);
            ! *

            ! * ! * The value written can be read using the readShort and ! * readUnsignedShort methods in DataInput. ! * ! * @param value The short value to write to the stream, ! * passed as an int. ! * ! * @exception IOException If an error occurs ! * ! * @see DataInput#readShort ! * @see DataInput#readUnsignedShort ! */ ! public final synchronized void writeShort (int value) throws IOException { ! write ((byte) (0xff & (value >> 8))); ! write ((byte) (0xff & value)); } ! /** ! * This method writes a Java char value to an output stream. The ! * char to be written will be in the lowest 16 bits of the int ! * value passed. These bytes will be written "big endian". That is, ! * with the high byte written first in the following manner: ! *

            ! * byte0 = (byte)((value & 0xFF00) >> 8);
            ! * byte1 = (byte)(value & 0x00FF);
            ! *

            ! * ! * The value written can be read using the readChar ! * method in DataInput. ! * ! * @param value The char value to write, ! * passed as an int. ! * ! * @exception IOException If an error occurs ! * ! * @see DataInput#readChar ! */ ! public final synchronized void writeChar (int value) throws IOException { ! write ((byte) (0xff & (value >> 8))); ! write ((byte) (0xff & value)); } ! /** ! * This method writes a Java int value to an output stream. The 4 bytes ! * of the passed value will be written "big endian". That is, with ! * the high byte written first in the following manner: ! *

            ! * byte0 = (byte)((value & 0xFF000000) >> 24);
            ! * byte1 = (byte)((value & 0x00FF0000) >> 16);
            ! * byte2 = (byte)((value & 0x0000FF00) >> 8);
            ! * byte3 = (byte)(value & 0x000000FF);
            ! *

            ! * ! * The value written can be read using the readInt ! * method in DataInput. ! * ! * @param value The int value to write to the stream ! * ! * @exception IOException If an error occurs ! * ! * @see DataInput#readInt ! */ ! public final synchronized void writeInt (int value) throws IOException { ! write ((byte) (0xff & (value >> 24))); ! write ((byte) (0xff & (value >> 16))); ! write ((byte) (0xff & (value >> 8))); ! write ((byte) (0xff & value)); } ! /** ! * This method writes a Java long value to an output stream. The 8 bytes ! * of the passed value will be written "big endian". That is, with ! * the high byte written first in the following manner: ! *

            ! * byte0 = (byte)((value & 0xFF00000000000000L) >> 56);
            ! * byte1 = (byte)((value & 0x00FF000000000000L) >> 48);
            ! * byte2 = (byte)((value & 0x0000FF0000000000L) >> 40);
            ! * byte3 = (byte)((value & 0x000000FF00000000L) >> 32);
            ! * byte4 = (byte)((value & 0x00000000FF000000L) >> 24);
            ! * byte5 = (byte)((value & 0x0000000000FF0000L) >> 16);
            ! * byte6 = (byte)((value & 0x000000000000FF00L) >> 8);
            ! * byte7 = (byte)(value & 0x00000000000000FFL);
            ! *

            ! * ! * The value written can be read using the readLong ! * method in DataInput. ! * ! * @param value The long value to write to the stream ! * ! * @exception IOException If an error occurs ! * ! * @see DataInput#readLong ! */ ! public final synchronized void writeLong (long value) throws IOException { ! write ((byte) (0xff & (value >> 56))); ! write ((byte) (0xff & (value>> 48))); ! write ((byte) (0xff & (value>> 40))); ! write ((byte) (0xff & (value>> 32))); ! write ((byte) (0xff & (value>> 24))); ! write ((byte) (0xff & (value>> 16))); ! write ((byte) (0xff & (value>> 8))); ! write ((byte) (0xff & value)); } ! /** ! * This method writes a Java float value to the stream. This ! * value is written by first calling the method ! * Float.floatToIntBits ! * to retrieve an int representing the floating point number, ! * then writing this int value to the stream exactly the same ! * as the writeInt() method does. ! * ! * The value written can be read using the readFloat ! * method in DataInput. ! * ! * @param value The float value to write to the stream ! * ! * @exception IOException If an error occurs ! * ! * @see writeInt ! * @see DataInput#readFloat ! * @see Float#floatToIntBits ! */ ! public final void writeFloat (float value) throws IOException { ! writeInt (Float.floatToIntBits (value)); } ! /** ! * This method writes a Java double value to the stream. This ! * value is written by first calling the method ! * Double.doubleToLongBits ! * to retrieve an long representing the floating point number, ! * then writing this long value to the stream exactly the same ! * as the writeLong() method does. ! * ! * The value written can be read using the readDouble ! * method in DataInput. ! * ! * @param value The double value to write to the stream ! * ! * @exception IOException If an error occurs ! * ! * @see writeLong ! * @see DataInput#readDouble ! * @see Double#doubleToLongBits ! */ ! public final void writeDouble (double value) throws IOException { ! writeLong (Double.doubleToLongBits (value)); } ! /** ! * This method writes all the bytes in a String out to the ! * stream. One byte is written for each character in the ! * String. ! * The high eight bits of each character are discarded, thus this ! * method is inappropriate for completely representing Unicode characters. ! * ! * @param value The String to write to the stream ! * ! * @exception IOException If an error occurs ! */ ! public final void writeBytes (String value) throws IOException { ! int len = value.length(); for (int i = 0; i < len; ++i) ! writeByte (value.charAt(i)); } ! /** ! * This method writes all the characters of a String to an ! * output stream as an array of char's. Each character ! * is written using the method specified in the writeChar ! * method. ! * ! * @param value The String to write to the stream ! * ! * @exception IOException If an error occurs ! * ! * @see writeChar ! */ ! public final void writeChars (String value) throws IOException { ! int len = value.length(); for (int i = 0; i < len; ++i) ! writeChar (value.charAt(i)); } ! /** ! * This method writes a Java String to the stream in a modified ! * UTF-8 format. First, two bytes are written to the stream indicating the ! * number of bytes to follow. Note that this is the number of bytes in the ! * encoded String not the String length. Next ! * come the encoded characters. Each character in the String ! * is encoded as either one, two or three bytes. For characters in the ! * range of \u0001 to <\u007F>, one byte is used. The character ! * value goes into bits 0-7 and bit eight is 0. For characters in the range ! * of \u0080 to \u007FF, two bytes are used. Bits ! * 6-10 of the character value are encoded bits 0-4 of the first byte, with ! * the high bytes having a value of "110". Bits 0-5 of the character value ! * are stored in bits 0-5 of the second byte, with the high bits set to ! * "10". This type of encoding is also done for the null character ! * \u0000. This eliminates any C style NUL character values ! * in the output. All remaining characters are stored as three bytes. ! * Bits 12-15 of the character value are stored in bits 0-3 of the first ! * byte. The high bits of the first bytes are set to "1110". Bits 6-11 ! * of the character value are stored in bits 0-5 of the second byte. The ! * high bits of the second byte are set to "10". And bits 0-5 of the ! * character value are stored in bits 0-5 of byte three, with the high bits ! * of that byte set to "10". ! * ! * The value written can be read using the readUTF ! * method in DataInput. ! * ! * @param value The String to write to the output in UTF format ! * ! * @exception IOException If an error occurs ! * ! * @see DataInput#readUTF ! */ ! public synchronized final void writeUTF (String value) throws IOException { ! int len = value.length(); int sum = 0; for (int i = 0; i < len && sum <= 65535; ++i) { ! char c = value.charAt(i); if (c >= '\u0001' && c <= '\u007f') sum += 1; else if (c == '\u0000' || (c >= '\u0080' && c <= '\u07ff')) *************** public class DataOutputStream extends Fi *** 140,146 **** for (int i = 0; i < len; ++i) { ! char c = s.charAt(i); if (c >= '\u0001' && c <= '\u007f') write (c); else if (c == '\u0000' || (c >= '\u0080' && c <= '\u07ff')) --- 427,433 ---- for (int i = 0; i < len; ++i) { ! char c = value.charAt(i); if (c >= '\u0001' && c <= '\u007f') write (c); else if (c == '\u0000' || (c >= '\u0080' && c <= '\u07ff')) *************** public class DataOutputStream extends Fi *** 160,165 **** } } ! // Number of bytes written so far. ! protected int written; ! } --- 447,451 ---- } } ! } // class DataOutputStream ! diff -Nrc3pad gcc-3.3.3/libjava/java/io/Externalizable.java gcc-3.4.0/libjava/java/io/Externalizable.java *** gcc-3.3.3/libjava/java/io/Externalizable.java 2002-11-10 22:06:48.000000000 +0000 --- gcc-3.4.0/libjava/java/io/Externalizable.java 2003-10-11 18:38:12.000000000 +0000 *************** exception statement from your version. * *** 39,110 **** package java.io; /** ! * This interface provides a way that classes can completely control how ! * the data of their object instances are written and read to and from ! * streams. It has two methods which are used to write the data to a stream ! * and to read the data from a stream. The read method must read the data ! * in exactly the way it was written by the write method. ! *

            ! * Note that classes which implement this interface must take into account ! * that all superclass data must also be written to the stream as well. ! * The class implementing this interface must figure out how to make that ! * happen. ! *

            ! * This interface can be used to provide object persistence. When an ! * object is to be stored externally, the writeExternal method is ! * called to save state. When the object is restored, an instance is ! * created using the default no-argument constructor and the ! * readExternal method is used to restore the state. ! * ! * @version 0.0 ! * ! * @author Aaron M. Renn (arenn@urbanophile.com) ! */ public interface Externalizable extends Serializable { ! static final long serialVersionUID = -282491828744381764L; ! ! /** ! * This method restores an object's state by reading in the instance data ! * for the object from the passed in stream. Note that this stream is not ! * a subclass of InputStream, but rather is a class that implements ! * the ObjectInput interface. That interface provides a mechanism for ! * reading in Java data types from a stream. ! *

            ! * Note that this method must be compatible with writeExternal. ! * It must read back the exact same types that were written by that ! * method in the exact order they were written. ! *

            ! * If this method needs to read back an object instance, then the class ! * for that object must be found and loaded. If that operation fails, ! * then this method throws a ClassNotFoundException ! * ! * @param in An ObjectInput instance for reading in the object state ! * ! * @exception ClassNotFoundException If the class of an object being restored cannot be found ! * @exception IOException If any other error occurs ! */ ! public abstract void ! readExternal(ObjectInput in) throws ClassNotFoundException, IOException; ! ! /*************************************************************************/ ! ! /** ! * This method is responsible for writing the instance data of an object ! * to the passed in stream. Note that this stream is not a subclass of ! * OutputStream, but rather is a class that implements the ! * ObjectOutput interface. That interface provides a number of methods ! * for writing Java data values to a stream. ! *

            ! * Not that the implementation of this method must be coordinated with ! * the implementation of readExternal. ! * ! * @param out An ObjectOutput instance for writing the object state ! * ! * @exception IOException If an error occurs ! */ ! public abstract void ! writeExternal(ObjectOutput out) throws IOException; ! } // interface Externalizable --- 39,109 ---- package java.io; /** ! * This interface provides a way that classes can completely control how ! * the data of their object instances are written and read to and from ! * streams. It has two methods which are used to write the data to a stream ! * and to read the data from a stream. The read method must read the data ! * in exactly the way it was written by the write method. ! *

            ! * Note that classes which implement this interface must take into account ! * that all superclass data must also be written to the stream as well. ! * The class implementing this interface must figure out how to make that ! * happen. ! *

            ! * This interface can be used to provide object persistence. When an ! * object is to be stored externally, the writeExternal method is ! * called to save state. When the object is restored, an instance is ! * created using the default no-argument constructor and the ! * readExternal method is used to restore the state. ! * ! * @author Aaron M. Renn (arenn@urbanophile.com) ! */ public interface Externalizable extends Serializable { ! long serialVersionUID = -282491828744381764L; ! /** ! * This method restores an object's state by reading in the instance data ! * for the object from the passed in stream. Note that this stream is not ! * a subclass of InputStream, but rather is a class that ! * implements ! * the ObjectInput interface. That interface provides a ! * mechanism for ! * reading in Java data types from a stream. ! *

            ! * Note that this method must be compatible with writeExternal. ! * It must read back the exact same types that were written by that ! * method in the exact order they were written. ! *

            ! * If this method needs to read back an object instance, then the class ! * for that object must be found and loaded. If that operation fails, ! * then this method throws a ClassNotFoundException ! * ! * @param in An ObjectInput instance for reading in the object ! * state ! * ! * @exception ClassNotFoundException If the class of an object being ! * restored cannot be found ! * @exception IOException If any other error occurs ! */ ! void readExternal(ObjectInput in) ! throws ClassNotFoundException, IOException; + /** + * This method is responsible for writing the instance data of an object + * to the passed in stream. Note that this stream is not a subclass of + * OutputStream, but rather is a class that implements the + * ObjectOutput interface. That interface provides a + * number of methods + * for writing Java data values to a stream. + *

            + * Not that the implementation of this method must be coordinated with + * the implementation of readExternal. + * + * @param out An ObjectOutput instance for writing the + * object state + * + * @exception IOException If an error occurs + */ + void writeExternal(ObjectOutput out) throws IOException; + } diff -Nrc3pad gcc-3.3.3/libjava/java/io/FileDescriptor.java gcc-3.4.0/libjava/java/io/FileDescriptor.java *** gcc-3.3.3/libjava/java/io/FileDescriptor.java 2003-01-04 03:55:28.000000000 +0000 --- gcc-3.4.0/libjava/java/io/FileDescriptor.java 2003-05-13 09:13:31.000000000 +0000 *************** public final class FileDescriptor *** 44,49 **** --- 44,51 ---- static final int APPEND = 4; // EXCL is used only when making a temp file. static final int EXCL = 8; + static final int SYNC = 16; + static final int DSYNC = 32; // These are WHENCE values for seek. static final int SET = 0; *************** public final class FileDescriptor *** 71,77 **** // past the end is ok (and if a subsequent write occurs the file // will grow). native int seek (long pos, int whence, boolean eof_trunc) throws IOException; ! native long length () throws IOException; native long getFilePointer () throws IOException; native int read () throws IOException; native int read (byte[] bytes, int offset, int len) throws IOException; --- 73,79 ---- // past the end is ok (and if a subsequent write occurs the file // will grow). native int seek (long pos, int whence, boolean eof_trunc) throws IOException; ! native long getLength () throws IOException; native long getFilePointer () throws IOException; native int read () throws IOException; native int read (byte[] bytes, int offset, int len) throws IOException; *************** public final class FileDescriptor *** 79,85 **** // When collected, close. ! protected void finalize () throws IOException { if (valid ()) close (); --- 81,87 ---- // When collected, close. ! protected void finalize () throws Throwable { if (valid ()) close (); diff -Nrc3pad gcc-3.3.3/libjava/java/io/FileFilter.java gcc-3.4.0/libjava/java/io/FileFilter.java *** gcc-3.3.3/libjava/java/io/FileFilter.java 2002-01-22 22:40:14.000000000 +0000 --- gcc-3.4.0/libjava/java/io/FileFilter.java 2003-10-11 18:38:12.000000000 +0000 *************** *** 1,5 **** /* FileFilter.java -- Filter a list of pathnames ! Copyright (C) 1998 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* FileFilter.java -- Filter a list of pathnames ! Copyright (C) 1998,2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 39,68 **** package java.io; /** ! * This interface has one method which is used for filtering pathnames ! * returned in a pathname listing. It is currently used by the ! * File.listFiles() method. ! *

            ! * The method in this interface determines if a particular pathname should ! * or should not be included in the pathname listing. ! * ! * @version 0.0 ! * ! * @author Aaron M. Renn (arenn@urbanophile.com) ! */ public interface FileFilter { ! ! /** ! * This method determines whether or not a given pathname should be included ! * in a pathname listing. ! * ! * @param pathname The pathname to test ! * ! * @return true if the path should be included in the list, false otherwise. ! */ ! public abstract boolean ! accept(File pathname); ! ! } // interface FileFilter ! --- 39,65 ---- package java.io; /** ! * This interface has one method which is used for filtering pathnames ! * returned in a pathname listing. It is currently used by the ! * File.listFiles(FileFilter) method. ! *

            ! * The method in this interface determines if a particular pathname should ! * or should not be included in the pathname listing. ! * ! * @author Aaron M. Renn (arenn@urbanophile.com) ! * ! * @see File#listFiles(java.io.FileFilter) ! */ public interface FileFilter { ! /** ! * This method determines whether or not a given pathname should be included ! * in a pathname listing. ! * ! * @param pathname The pathname to test ! * ! * @return true if the path should be included in the list, ! * false otherwise. ! */ ! boolean accept(File pathname); ! } diff -Nrc3pad gcc-3.3.3/libjava/java/io/FileInputStream.java gcc-3.4.0/libjava/java/io/FileInputStream.java *** gcc-3.3.3/libjava/java/io/FileInputStream.java 2003-01-04 00:08:27.000000000 +0000 --- gcc-3.4.0/libjava/java/io/FileInputStream.java 2003-12-26 21:11:03.000000000 +0000 *************** *** 1,58 **** ! /* Copyright (C) 1998, 1999, 2001, 2002, 2003 Free Software Foundation ! This file is part of libgcj. ! This software is copyrighted work licensed under the terms of the ! Libgcj License. Please consult the file "LIBGCJ_LICENSE" for ! details. */ package java.io; import java.nio.channels.FileChannel; - /** - * @author Warren Levy - * @date October 28, 1998. - */ /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 * "The Java Language Specification", ISBN 0-201-63451-1 * plus online API docs for JDK 1.2 beta from http://www.javasoft.com. * Status: Believed complete and correct. */ public class FileInputStream extends InputStream { ! /* Contains the file descriptor for referencing the actual file. */ private FileDescriptor fd; ! private FileChannel ch; public FileInputStream(String name) throws FileNotFoundException { ! SecurityManager s = System.getSecurityManager(); ! if (s != null) ! s.checkRead(name); ! fd = new FileDescriptor(name, FileDescriptor.READ); } public FileInputStream(File file) throws FileNotFoundException { ! this(file.getPath()); } public FileInputStream(FileDescriptor fdObj) { SecurityManager s = System.getSecurityManager(); if (s != null) s.checkRead(fdObj); fd = fdObj; } public int available() throws IOException { return fd.available(); } public void close() throws IOException { if (fd.valid()) --- 1,171 ---- ! /* FileInputStream.java -- An input stream that reads from disk files. ! Copyright (C) 1998, 2002, 2003 Free Software Foundation, Inc. ! This file is part of GNU Classpath. ! GNU Classpath is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package java.io; import java.nio.channels.FileChannel; + import java.nio.channels.FileChannelImpl; /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 * "The Java Language Specification", ISBN 0-201-63451-1 * plus online API docs for JDK 1.2 beta from http://www.javasoft.com. * Status: Believed complete and correct. */ + /** + * This class is a stream that reads its bytes from a file. + * + * @author Aaron M. Renn + * @author Warren Levy + */ public class FileInputStream extends InputStream { ! /** ! * This is the native file handle for the file this stream is reading from ! */ private FileDescriptor fd; ! private FileChannel ch; /* cached associated file-channel */ + /** + * This method initializes a FileInputStream to read from the + * specified named file. A security check is first made to determine + * whether or not access to this file is allowed. This is done by + * calling the checkRead() method of the + * SecurityManager + * (if one exists) with the name of this file. An exception is thrown + * if reading is not allowed. If the file does not exist, an exception + * is also thrown. + * + * @param name The name of the file this stream should read from + * + * @exception SecurityException If read access to the file is not allowed + * @exception FileNotFoundException If the file does not exist. + */ public FileInputStream(String name) throws FileNotFoundException { ! this(new File(name)); } + /** + * This method initializes a FileInputStream to read from the + * specified File object. A security check is first + * made to determine + * whether or not access to this file is allowed. This is done by + * calling the checkRead() method of the + * SecurityManager + * (if one exists) with the name of this file. An exception is thrown + * if reading is not allowed. If the file does not exist, an exception + * is also thrown. + * + * @param file The File object this stream should read from + * + * @exception SecurityException If read access to the file is not allowed + * @exception FileNotFoundException If the file does not exist. + */ public FileInputStream(File file) throws FileNotFoundException { ! SecurityManager s = System.getSecurityManager(); ! if (s != null) ! s.checkRead(file.getPath()); ! ! if (file.isDirectory()) ! throw new FileNotFoundException(file.getPath() + " is a directory"); ! ! fd = new FileDescriptor(file.getPath(), FileDescriptor.READ); } + /** + * This method initializes a FileInputStream to read from the + * specified FileDescriptor object. A security + * check is first made to + * determine whether or not access to this file is allowed. This is done by + * calling the checkRead() method of the + * SecurityManager + * (if one exists) with the specified FileDescriptor + * An exception is + * thrown if reading is not allowed. + * + * @param fd The FileDescriptor object this stream + * should read from + * + * @exception SecurityException If read access to the file is not allowed + */ public FileInputStream(FileDescriptor fdObj) { SecurityManager s = System.getSecurityManager(); if (s != null) s.checkRead(fdObj); + fd = fdObj; } + /** + * This method returns the number of bytes that can be read from this + * stream before a read can block. A return of 0 indicates that blocking + * might (or might not) occur on the very next read attempt. + *

            + * This method returns the number of unread bytes remaining in the file if + * the descriptor being read from is an actual file. If this method is + * reading from a ''special'' file such a the standard input, this method + * will return the appropriate value for the stream being read. + *

            + * Be aware that reads on plain files that do not reside locally might + * possibly block even if this method says they should not. For example, + * a remote server might crash, preventing an NFS mounted file from being + * read. + * + * @return The number of bytes that can be read before blocking could occur + * + * @exception IOException If an error occurs + */ public int available() throws IOException { return fd.available(); } + /** + * This method closes the stream. Any futher attempts to read from the + * stream will likely generate an IOException since the underlying file + * will be closed. + * + * @exception IOException If an error occurs. + */ public void close() throws IOException { if (fd.valid()) *************** public class FileInputStream extends Inp *** 65,70 **** --- 178,192 ---- // mentioned in the JCL. } + /** + * This method returns a FileDescriptor object representing the + * underlying native file handle of the file this stream is reading + * from + * + * @return A FileDescriptor for this stream + * + * @exception IOException If an error occurs + */ public final FileDescriptor getFD() throws IOException { if (!fd.valid()) *************** public class FileInputStream extends Inp *** 72,104 **** return fd; } public int read() throws IOException { return fd.read(); } ! public int read(byte[] b) throws IOException { ! return fd.read(b, 0, b.length); } ! public int read(byte[] b, int off, int len) throws IOException { ! if (off < 0 || len < 0 || off + len > b.length) throw new ArrayIndexOutOfBoundsException(); ! return fd.read(b, off, len); } ! public long skip(long n) throws IOException { ! long startPos = fd.getFilePointer(); ! long endPos = fd.seek(n, FileDescriptor.CUR, true); ! return endPos - startPos; } ! public FileChannel getChannel () { return ch; } ! } --- 194,304 ---- return fd; } + /** + * This method reads an unsigned byte from the input stream and returns it + * as an int in the range of 0-255. This method also will return -1 if + * the end of the stream has been reached. + *

            + * This method will block until the byte can be read. + * + * @return The byte read or -1 if end of stream + * + * @exception IOException If an error occurs + */ public int read() throws IOException { return fd.read(); } ! /** ! * This method reads bytes from a stream and stores them into a caller ! * supplied buffer. This method attempts to completely fill the buffer, ! * but can return before doing so. The actual number of bytes read is ! * returned as an int. A -1 is returned to indicate the end of the stream. ! *

            ! * This method will block until some data can be read. ! *

            ! * This method operates by calling an overloaded read method like so: ! * read(buf, 0, buf.length) ! * ! * @param buf The buffer into which the bytes read will be stored. ! * ! * @return The number of bytes read or -1 if end of stream. ! * ! * @exception IOException If an error occurs. ! */ ! public int read(byte[] buf) throws IOException { ! return read(buf, 0, buf.length); } ! /** ! * This method read bytes from a stream and stores them into a caller ! * supplied buffer. It starts storing the data at index ! * offset into ! * the buffer and attempts to read len bytes. This method can ! * return before reading the number of bytes requested. The actual number ! * of bytes read is returned as an int. A -1 is returned to indicate the ! * end of the stream. ! *

            ! * This method will block until some data can be read. ! * ! * @param buf The array into which the bytes read should be stored ! * @param offset The offset into the array to start storing bytes ! * @param len The requested number of bytes to read ! * ! * @return The actual number of bytes read, or -1 if end of stream. ! * ! * @exception IOException If an error occurs. ! */ ! public int read(byte[] buf, int offset, int len) throws IOException { ! if (offset < 0 ! || len < 0 ! || offset + len > buf.length) throw new ArrayIndexOutOfBoundsException(); ! return fd.read(buf, offset, len); } ! /** ! * This method skips the specified number of bytes in the stream. It ! * returns the actual number of bytes skipped, which may be less than the ! * requested amount. ! *

            ! * @param numBytes The requested number of bytes to skip ! * ! * @return The actual number of bytes skipped. ! * ! * @exception IOException If an error occurs ! */ ! public synchronized long skip (long numBytes) throws IOException { ! if (numBytes < 0) ! throw new IllegalArgumentException ("Can't skip negative bytes: " + ! numBytes); ! ! if (numBytes == 0) ! return 0; ! ! long curPos = fd.getFilePointer (); ! long newPos = fd.seek (numBytes, FileDescriptor.CUR, true); ! return newPos - curPos; } ! /** ! * This method creates a java.nio.channels.FileChannel. ! * Nio does not allow one to create a file channel directly. ! * A file channel must be created by first creating an instance of ! * Input/Output/RandomAccessFile and invoking the getChannel() method on it. ! */ ! public synchronized FileChannel getChannel () { + if (ch == null) + ch = new FileChannelImpl (fd, false, this); + return ch; } ! ! } // class FileInputStream ! diff -Nrc3pad gcc-3.3.3/libjava/java/io/File.java gcc-3.4.0/libjava/java/io/File.java *** gcc-3.3.3/libjava/java/io/File.java 2003-04-19 19:19:50.000000000 +0000 --- gcc-3.4.0/libjava/java/io/File.java 2003-10-22 08:47:12.000000000 +0000 *************** *** 1,38 **** ! // File.java - File name ! /* Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. ! This file is part of libgcj. - This software is copyrighted work licensed under the terms of the - Libgcj License. Please consult the file "LIBGCJ_LICENSE" for - details. */ package java.io; ! import java.util.*; ! import java.net.*; import gnu.gcj.runtime.FileDeleter; - /** - * @author Tom Tromey - * @date September 24, 1998 - */ - /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 * "The Java Language Specification", ISBN 0-201-63451-1 * Status: Complete to version 1.3. */ public class File implements Serializable, Comparable { ! public boolean canRead () { checkRead(); return _access (READ); } ! public boolean canWrite () { checkWrite(); return _access (WRITE); --- 1,180 ---- ! /* File.java -- Class representing a file on disk ! Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. ! This file is part of GNU Classpath. ! GNU Classpath is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! GNU Classpath is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with GNU Classpath; see the file COPYING. If not, write to the ! Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ! 02111-1307 USA. ! ! Linking this library statically or dynamically with other modules is ! making a combined work based on this library. Thus, the terms and ! conditions of the GNU General Public License cover the whole ! combination. ! ! As a special exception, the copyright holders of this library give you ! permission to link this library with independent modules to produce an ! executable, regardless of the license terms of these independent ! modules, and to copy and distribute the resulting executable under ! terms of your choice, provided that you also meet, for each linked ! independent module, the terms and conditions of the license of that ! module. An independent module is a module which is not derived from ! or based on this library. If you modify this library, you may extend ! this exception to your version of the library, but you are not ! obligated to do so. If you do not wish to do so, delete this ! exception statement from your version. */ package java.io; ! import java.net.MalformedURLException; ! import java.net.URL; ! import gnu.classpath.Configuration; import gnu.gcj.runtime.FileDeleter; /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 * "The Java Language Specification", ISBN 0-201-63451-1 * Status: Complete to version 1.3. */ + /** + * This class represents a file or directory on a local disk. It provides + * facilities for dealing with a variety of systems that use various + * types of path separators ("/" versus "\", for example). It also + * contains method useful for creating and deleting files and directories. + * + * @author Aaron M. Renn + * @author Tom Tromey + */ public class File implements Serializable, Comparable { ! private static final long serialVersionUID = 301077366599181567L; ! ! // QUERY arguments to access function. ! private final static int READ = 0; ! private final static int WRITE = 1; ! private final static int EXISTS = 2; ! ! // QUERY arguments to stat function. ! private final static int DIRECTORY = 0; ! private final static int ISFILE = 1; ! private final static int ISHIDDEN = 2; ! ! // QUERY arguments to attr function. ! private final static int MODIFIED = 0; ! private final static int LENGTH = 1; ! ! private final native long attr (int query); ! // On OSF1 V5.0, `stat' is a macro. It is easiest to use the name ! // `_stat' instead. We do the same thing for `_access' just in ! // case. ! private final native boolean _access (int query); ! private final native boolean _stat (int query); ! ! /** ! * This is the path separator string for the current host. This field ! * contains the value of the file.separator system property. ! * An example separator string would be "/" on the GNU system. ! */ ! public static final String separator = System.getProperty("file.separator"); ! ! /** ! * This is the first character of the file separator string. On many ! * hosts (for example, on the GNU system), this represents the entire ! * separator string. The complete separator string is obtained from the ! * file.separatorsystem property. ! */ ! public static final char separatorChar = separator.charAt(0); ! ! /** ! * This is the string that is used to separate the host name from the ! * path name in paths than include the host name. It is the value of ! * the path.separator system property. ! */ ! public static final String pathSeparator ! = System.getProperty("path.separator"); ! ! /** ! * This is the first character of the string used to separate the host name ! * from the path name in paths that include a host. The separator string ! * is taken from the path.separator system property. ! */ ! public static final char pathSeparatorChar = pathSeparator.charAt(0); ! ! static final String tmpdir = System.getProperty("java.io.tmpdir"); ! static int maxPathLen; ! static boolean caseSensitive; ! static String dupSeparator = separator + separator; ! ! static ! { ! if (Configuration.INIT_LOAD_LIBRARY) ! { ! System.loadLibrary ("javaio"); ! } ! ! init_native(); ! } ! ! // Native function called at class initialization. This should should ! // set the maxPathLen and caseSensitive variables. ! private static native void init_native(); ! ! /** ! * This is the path to the file set when the object is created. It ! * may be an absolute or relative path name. ! */ ! private String path; ! ! // We keep a counter for use by createTempFile. We choose the first ! // value randomly to try to avoid clashes with other VMs. ! private static long counter = Double.doubleToLongBits (Math.random()); ! ! /** ! * This method tests whether or not the current thread is allowed to ! * to read the file pointed to by this object. This will be true if and ! * and only if 1) the file exists and 2) the SecurityManager ! * (if any) allows access to the file via it's checkRead ! * method 3) the file is readable. ! * ! * @return true if reading is allowed, ! * false otherwise ! * ! * @exception SecurityException If the SecurityManager ! * does not allow access to the file ! */ ! public boolean canRead() { checkRead(); return _access (READ); } ! /** ! * This method test whether or not the current thread is allowed to ! * write to this object. This will be true if and only if 1) The ! * SecurityManager (if any) allows write access to the ! * file and 2) The file exists and 3) The file is writable. To determine ! * whether or not a non-existent file can be created, check the parent ! * directory for write access. ! * ! * @return true if writing is allowed, false ! * otherwise ! * ! * @exception SecurityException If the SecurityManager ! * does not allow access to the file ! */ ! public boolean canWrite() { checkWrite(); return _access (WRITE); *************** public class File implements Serializabl *** 40,82 **** private native boolean performCreate() throws IOException; ! /** @since 1.2 */ public boolean createNewFile() throws IOException { checkWrite(); return performCreate(); } ! ! private native boolean performDelete (); ! public boolean delete () { SecurityManager s = System.getSecurityManager(); ! String name = path; if (s != null) ! s.checkDelete(path); ! return performDelete (); } public boolean equals (Object obj) { if (! (obj instanceof File)) return false; File other = (File) obj; if (caseSensitive) ! return (path.equals(other.path)); else ! return (path.equalsIgnoreCase(other.path)); } ! public boolean exists () { checkRead(); return _access (EXISTS); } ! public File (String p) { ! path = normalizePath(p); } // Remove duplicate and redundant separator characters. --- 182,285 ---- private native boolean performCreate() throws IOException; ! /** ! * This method creates a new file of zero length with the same name as ! * the path of this File object if an only if that file ! * does not already exist. ! *

            ! * A SecurityManagercheckWrite check is done prior ! * to performing this action. ! * ! * @return true if the file was created, false if ! * the file alread existed. ! * ! * @exception IOException If an I/O error occurs ! * @exception SecurityException If the SecurityManager will ! * not allow this operation to be performed. ! * ! * @since 1.2 ! */ public boolean createNewFile() throws IOException { checkWrite(); return performCreate(); } ! ! /* ! * This native method handles the actual deleting of the file ! */ ! private native boolean performDelete(); ! ! /** ! * This method deletes the file represented by this object. If this file ! * is a directory, it must be empty in order for the delete to succeed. ! * ! * @return true if the file was deleted, false ! * otherwise ! * ! * @exception SecurityException If deleting of the file is not allowed ! */ ! public synchronized boolean delete() { SecurityManager s = System.getSecurityManager(); ! if (s != null) ! s.checkDelete (path); ! ! return performDelete(); } + /** + * This method tests two File objects for equality by + * comparing the path of the specified File against the path + * of this object. The two objects are equal if an only if 1) The + * argument is not null 2) The argument is a File object and + * 3) The path of the Fileargument is equal to the path + * of this object. + *

            + * The paths of the files are determined by calling the + * getPath() + * method on each object. + * + * @return true if the two objects are equal, + * false otherwise. + */ public boolean equals (Object obj) { if (! (obj instanceof File)) return false; + File other = (File) obj; + if (caseSensitive) ! return path.equals (other.path); else ! return path.equalsIgnoreCase (other.path); } ! /** ! * This method tests whether or not the file represented by the object ! * actually exists on the filesystem. ! * ! * @return true if the file exists, falseotherwise. ! * ! * @exception SecurityException If reading of the file is not permitted ! */ ! public boolean exists() { checkRead(); return _access (EXISTS); } ! /** ! * This method initializes a new File object to represent ! * a file with the specified path. ! * ! * @param name The path name of the file ! */ ! public File (String name) { ! path = normalizePath (name); } // Remove duplicate and redundant separator characters. *************** public class File implements Serializabl *** 140,150 **** return newpath.toString(); } ! public File (String dirPath, String name) { if (name == null) ! throw new NullPointerException (); if (dirPath != null && dirPath.length() > 0) { // Try to be smart about the number of separator characters. --- 343,363 ---- return newpath.toString(); } ! ! /** ! * This method initializes a new File object to represent ! * a file in the specified named directory. The path name to the file ! * will be the directory name plus the separator string plus the file ! * name. If the directory path name ends in the separator string, another ! * separator string will still be appended. ! * ! * @param dirPath The path to the directory the file resides in ! * @param name The name of the file ! */ public File (String dirPath, String name) { if (name == null) ! throw new NullPointerException(); if (dirPath != null && dirPath.length() > 0) { // Try to be smart about the number of separator characters. *************** public class File implements Serializabl *** 158,174 **** path = normalizePath(name); } ! public File (File dir, String name) { ! this (dir == null ? null : dir.path, name); } ! public String getAbsolutePath () { ! if (isAbsolute ()) return path; else if (separatorChar == '\\' ! && path.length () > 0 && path.charAt (0) == '\\') { // On Windows, even if the path starts with a '\\' it is not // really absolute until we prefix the drive specifier from --- 371,406 ---- path = normalizePath(name); } ! /** ! * This method initializes a new File object to represent ! * a file in the specified directory. If the directory ! * argument is null, the file is assumed to be in the ! * current directory as specified by the user.dir system ! * property ! * ! * @param directory The directory this file resides in ! * @param name The name of the file ! */ ! public File (File directory, String name) { ! this (directory == null ? null : directory.path, name); } ! /** ! * This method returns the path of this file as an absolute path name. ! * If the path name is already absolute, then it is returned. Otherwise ! * the value returned is the current directory plus the separatory ! * string plus the path of the file. The current directory is determined ! * from the user.dir system property. ! * ! * @return The absolute path of this file ! */ ! public String getAbsolutePath() { ! if (isAbsolute()) return path; else if (separatorChar == '\\' ! && path.length() > 0 && path.charAt (0) == '\\') { // On Windows, even if the path starts with a '\\' it is not // really absolute until we prefix the drive specifier from *************** public class File implements Serializabl *** 176,182 **** return System.getProperty ("user.dir").substring (0, 2) + path; } else if (separatorChar == '\\' ! && path.length () > 1 && path.charAt (1) == ':' && ((path.charAt (0) >= 'a' && path.charAt (0) <= 'z') || (path.charAt (0) >= 'A' && path.charAt (0) <= 'Z'))) { --- 408,414 ---- return System.getProperty ("user.dir").substring (0, 2) + path; } else if (separatorChar == '\\' ! && path.length() > 1 && path.charAt (1) == ':' && ((path.charAt (0) >= 'a' && path.charAt (0) <= 'z') || (path.charAt (0) >= 'A' && path.charAt (0) <= 'Z'))) { *************** public class File implements Serializabl *** 187,193 **** String drvDir = null; try { ! drvDir = new File (path.substring (0, 2)).getCanonicalPath (); } catch (IOException e) { --- 419,425 ---- String drvDir = null; try { ! drvDir = new File (path.substring (0, 2)).getCanonicalPath(); } catch (IOException e) { *************** public class File implements Serializabl *** 197,204 **** // Note: this would return "C:\\." for the path "C:.", if "\" // is the working folder on the C drive, but this is // consistent with what Sun's JRE 1.4.1.01 actually returns! ! if (path.length () > 2) ! return drvDir + '\\' + path.substring (2, path.length ()); else return drvDir; } --- 429,436 ---- // Note: this would return "C:\\." for the path "C:.", if "\" // is the working folder on the C drive, but this is // consistent with what Sun's JRE 1.4.1.01 actually returns! ! if (path.length() > 2) ! return drvDir + '\\' + path.substring (2, path.length()); else return drvDir; } *************** public class File implements Serializabl *** 206,243 **** return System.getProperty ("user.dir") + separatorChar + path; } ! /** @since 1.2 */ ! public File getAbsoluteFile () { return new File (getAbsolutePath()); } ! public native String getCanonicalPath () throws IOException; ! /** @since 1.2 */ ! public File getCanonicalFile () throws IOException { return new File (getCanonicalPath()); } ! public String getName () { int nameSeqIndex = 0; ! if (separatorChar == '\\' && path.length () > 1) { // On Windows, ignore the drive specifier or the leading '\\' // of a UNC network path, if any (a.k.a. the "prefix"). if ((path.charAt (0) == '\\' && path.charAt (1) == '\\') || (((path.charAt (0) >= 'a' && path.charAt (0) <= 'z') ! || (path.charAt (0) >= 'A' && path.charAt (0) <= 'Z')) ! && path.charAt (1) == ':')) ! { ! if (path.length () > 2) ! nameSeqIndex = 2; ! else ! return ""; ! } } String nameSeq --- 438,512 ---- return System.getProperty ("user.dir") + separatorChar + path; } ! /** ! * This method returns a File object representing the ! * absolute path of this object. ! * ! * @return A File with the absolute path of the object. ! * ! * @since 1.2 ! */ ! public File getAbsoluteFile() { return new File (getAbsolutePath()); } ! /** ! * This method returns a canonical representation of the pathname of ! * this file. The actual form of the canonical representation is ! * different. On the GNU system, the canonical form differs from the ! * absolute form in that all relative file references to "." and ".." ! * are resolved and removed. ! *

            ! * Note that this method, unlike the other methods which return path ! * names, can throw an IOException. This is because native method ! * might be required in order to resolve the canonical path ! * ! * @exception IOException If an error occurs ! */ ! public native String getCanonicalPath() throws IOException; ! /** ! * This method returns a File object representing the ! * canonical path of this object. ! * ! * @return A File instance representing the canonical path of ! * this object. ! * ! * @exception IOException If an error occurs. ! * ! * @since 1.2 ! */ ! public File getCanonicalFile() throws IOException { return new File (getCanonicalPath()); } ! /** ! * This method returns the name of the file. This is everything in the ! * complete path of the file after the last instance of the separator ! * string. ! * ! * @return The file name ! */ ! public String getName() { int nameSeqIndex = 0; ! if (separatorChar == '\\' && path.length() > 1) { // On Windows, ignore the drive specifier or the leading '\\' // of a UNC network path, if any (a.k.a. the "prefix"). if ((path.charAt (0) == '\\' && path.charAt (1) == '\\') || (((path.charAt (0) >= 'a' && path.charAt (0) <= 'z') ! || (path.charAt (0) >= 'A' && path.charAt (0) <= 'Z')) ! && path.charAt (1) == ':')) ! { ! if (path.length() > 2) ! nameSeqIndex = 2; ! else ! return ""; ! } } String nameSeq *************** public class File implements Serializabl *** 248,254 **** return nameSeq.substring (last + 1); } ! public String getParent () { String prefix = null; int nameSeqIndex = 0; --- 517,530 ---- return nameSeq.substring (last + 1); } ! /** ! * This method returns a String the represents this file's ! * parent. null is returned if the file has no parent. The ! * parent is determined via a simple operation which removes the ! * ! * @return The parent directory of this file ! */ ! public String getParent() { String prefix = null; int nameSeqIndex = 0; *************** public class File implements Serializabl *** 261,267 **** prefix = "/"; nameSeqIndex = 1; } ! else if (separatorChar == '\\' && path.length () > 1) { if ((path.charAt (0) == '\\' && path.charAt (1) == '\\') || (((path.charAt (0) >= 'a' && path.charAt (0) <= 'z') --- 537,543 ---- prefix = "/"; nameSeqIndex = 1; } ! else if (separatorChar == '\\' && path.length() > 1) { if ((path.charAt (0) == '\\' && path.charAt (1) == '\\') || (((path.charAt (0) >= 'a' && path.charAt (0) <= 'z') *************** public class File implements Serializabl *** 276,288 **** // According to the JDK docs, the returned parent path is the // portion of the name sequence before the last separator // character, if found, prefixed by the prefix, otherwise null. ! if (nameSeqIndex < path.length ()) { ! String nameSeq = path.substring (nameSeqIndex, path.length ()); int last = nameSeq.lastIndexOf (separatorChar); if (last == -1) return prefix; ! else if (last == (nameSeq.length () - 1)) // Note: The path would not have a trailing separator // except for cases like "C:\" on Windows (see // normalizePath( )), where Sun's JRE 1.4 returns null. --- 552,564 ---- // According to the JDK docs, the returned parent path is the // portion of the name sequence before the last separator // character, if found, prefixed by the prefix, otherwise null. ! if (nameSeqIndex < path.length()) { ! String nameSeq = path.substring (nameSeqIndex, path.length()); int last = nameSeq.lastIndexOf (separatorChar); if (last == -1) return prefix; ! else if (last == (nameSeq.length() - 1)) // Note: The path would not have a trailing separator // except for cases like "C:\" on Windows (see // normalizePath( )), where Sun's JRE 1.4 returns null. *************** public class File implements Serializabl *** 302,420 **** return null; } ! /** @since 1.2 */ ! public File getParentFile () { ! String parent = getParent (); ! return (parent == null ? null : new File (parent)); } ! public String getPath () { return path; } ! public int hashCode () { if (caseSensitive) ! return (path.hashCode() ^ 1234321); else ! return (path.toLowerCase().hashCode() ^ 1234321); } ! public native boolean isAbsolute (); ! public boolean isDirectory () { checkRead(); return _stat (DIRECTORY); } ! public boolean isFile () { checkRead(); return _stat (ISFILE); } ! /** @since 1.2 */ public boolean isHidden() { checkRead(); return _stat (ISHIDDEN); } ! public long lastModified () { checkRead(); return attr (MODIFIED); } ! public long length () { checkRead(); return attr (LENGTH); } ! private final native Object[] performList (FilenameFilter filter, FileFilter fileFilter, Class result_type); public String[] list (FilenameFilter filter) { checkRead(); return (String[]) performList (filter, null, String.class); } ! public String[] list () { checkRead(); return (String[]) performList (null, null, String.class); } ! /** @since 1.2 */ public File[] listFiles() { checkRead(); return (File[]) performList (null, null, File.class); } ! /** @since 1.2 */ ! public File[] listFiles(FilenameFilter filter) { checkRead(); return (File[]) performList (filter, null, File.class); } ! ! /** @since 1.2 */ ! public File[] listFiles(FileFilter filter) { checkRead(); return (File[]) performList (null, filter, File.class); } ! public String toString () { return path; } ! public URL toURL () throws MalformedURLException { // On Win32, Sun's JDK returns URLs of the form "file:/c:/foo/bar.txt", // while on UNIX, it returns URLs of the form "file:/foo/bar.txt". if (separatorChar == '\\') ! return new URL ("file:/" + getAbsolutePath ().replace ('\\', '/') + (isDirectory() ? "/" : "")); else ! return new URL ("file:" + getAbsolutePath () + (isDirectory() ? "/" : "")); } ! private final native boolean performMkdir (); ! public boolean mkdir () { checkWrite(); ! return performMkdir (); } private static boolean mkdirs (File x) --- 578,917 ---- return null; } ! /** ! * This method returns a File object representing the parent ! * file of this one. ! * ! * @param A File for the parent of this object. ! * null ! * will be returned if this object does not have a parent. ! * ! * @since 1.2 ! */ ! public File getParentFile() { ! String parent = getParent(); ! return parent != null ? new File (parent) : null; } ! /** ! * Returns the path name that represents this file. May be a relative ! * or an absolute path name ! * ! * @return The pathname of this file ! */ ! public String getPath() { return path; } ! /** ! * This method returns a hash code representing this file. It is the ! * hash code of the path of this file (as returned by getPath()) ! * exclusived or-ed with the value 1234321. ! * ! * @return The hash code for this object ! */ ! public int hashCode() { if (caseSensitive) ! return path.hashCode() ^ 1234321; else ! return path.toLowerCase().hashCode() ^ 1234321; } ! /** ! * This method returns true if this object represents an absolute file ! * path and false if it does not. The definition of an absolute path varies ! * by system. As an example, on GNU systems, a path is absolute if it starts ! * with a "/". ! * ! * @return true if this object represents an absolute ! * file name, false otherwise. ! */ ! public native boolean isAbsolute(); ! /** ! * This method tests whether or not the file represented by this object ! * is a directory. In order for this method to return true, ! * the file represented by this object must exist and be a directory. ! * ! * @return true if this file is a directory, false ! * otherwise ! * ! * @exception SecurityException If reading of the file is not permitted ! */ ! public boolean isDirectory() { checkRead(); return _stat (DIRECTORY); } ! /** ! * This method tests whether or not the file represented by this object ! * is a "plain" file. A file is a plain file if and only if it 1) Exists, ! * 2) Is not a directory or other type of special file. ! * ! * @return true if this is a plain file, false ! * otherwise ! * ! * @exception SecurityException If reading of the file is not permitted ! */ ! public boolean isFile() { checkRead(); return _stat (ISFILE); } ! /** ! * This method tests whether or not this file represents a "hidden" file. ! * On GNU systems, a file is hidden if its name begins with a "." ! * character. Files with these names are traditionally not shown with ! * directory listing tools. ! * ! * @return true if the file is hidden, false ! * otherwise. ! * ! * @since 1.2 ! */ public boolean isHidden() { checkRead(); return _stat (ISHIDDEN); } ! /** ! * This method returns the last modification time of this file. The ! * time value returned is an abstract value that should not be interpreted ! * as a specified time value. It is only useful for comparing to other ! * such time values returned on the same system. In that case, the larger ! * value indicates a more recent modification time. ! *

            ! * If the file does not exist, then a value of 0 is returned. ! * ! * @return The last modification time of the file ! * ! * @exception SecurityException If reading of the file is not permitted ! */ ! public long lastModified() { checkRead(); return attr (MODIFIED); } ! /** ! * This method returns the length of the file represented by this object, ! * or 0 if the specified file does not exist. ! * ! * @return The length of the file ! * ! * @exception SecurityException If reading of the file is not permitted ! */ ! public long length() { checkRead(); return attr (LENGTH); } ! ! /* ! * This native function actually produces the list of file in this ! * directory ! */ private final native Object[] performList (FilenameFilter filter, FileFilter fileFilter, Class result_type); + /** + * This method returns a array of String's representing the + * list of files is then directory represented by this object. If this + * object represents a non-directory file or a non-existent file, then + * null is returned. The list of files will not contain + * any names such as "." or ".." which indicate the current or parent + * directory. Also, the names are not guaranteed to be sorted. + *

            + * In this form of the list() method, a filter is specified + * that allows the caller to control which files are returned in the + * list. The FilenameFilter specified is called for each + * file returned to determine whether or not that file should be included + * in the list. + *

            + * A SecurityManager check is made prior to reading the + * directory. If read access to the directory is denied, an exception + * will be thrown. + * + * @param filter An object which will identify files to exclude from + * the directory listing. + * + * @return An array of files in the directory, or null + * if this object does not represent a valid directory. + * + * @exception SecurityException If read access is not allowed to the + * directory by the SecurityManager + */ public String[] list (FilenameFilter filter) { checkRead(); return (String[]) performList (filter, null, String.class); } ! /** ! * This method returns a array of String's representing the ! * list of files is then directory represented by this object. If this ! * object represents a non-directory file or a non-existent file, then ! * null is returned. The list of files will not contain ! * any names such as "." or ".." which indicate the current or parent ! * directory. Also, the names are not guaranteed to be sorted. ! *

            ! * A SecurityManager check is made prior to reading the ! * directory. If read access to the directory is denied, an exception ! * will be thrown. ! * ! * @return An array of files in the directory, or null if ! * this object does not represent a valid directory. ! * ! * @exception SecurityException If read access is not allowed to the ! * directory by the SecurityManager ! */ ! public String[] list() { checkRead(); return (String[]) performList (null, null, String.class); } ! /** ! * This method returns an array of File objects representing ! * all the files in the directory represented by this object. If this ! * object does not represent a directory, null is returned. ! * Each of the returned File object is constructed with this ! * object as its parent. ! *

            ! * A SecurityManager check is made prior to reading the ! * directory. If read access to the directory is denied, an exception ! * will be thrown. ! * ! * @return An array of File objects for this directory. ! * ! * @exception SecurityException If the SecurityManager denies ! * access to this directory. ! * ! * @since 1.2 ! */ public File[] listFiles() { checkRead(); return (File[]) performList (null, null, File.class); } ! /** ! * This method returns an array of File objects representing ! * all the files in the directory represented by this object. If this ! * object does not represent a directory, null is returned. ! * Each of the returned File object is constructed with this ! * object as its parent. ! *

            ! * In this form of the listFiles() method, a filter is specified ! * that allows the caller to control which files are returned in the ! * list. The FilenameFilter specified is called for each ! * file returned to determine whether or not that file should be included ! * in the list. ! *

            ! * A SecurityManager check is made prior to reading the ! * directory. If read access to the directory is denied, an exception ! * will be thrown. ! * ! * @return An array of File objects for this directory. ! * ! * @exception SecurityException If the SecurityManager denies ! * access to this directory. ! * ! * @since 1.2 ! */ ! public File[] listFiles (FilenameFilter filter) { checkRead(); return (File[]) performList (filter, null, File.class); } ! ! /** ! * This method returns an array of File objects representing ! * all the files in the directory represented by this object. If this ! * object does not represent a directory, null is returned. ! * Each of the returned File object is constructed with this ! * object as its parent. ! *

            ! * In this form of the listFiles() method, a filter is specified ! * that allows the caller to control which files are returned in the ! * list. The FileFilter specified is called for each ! * file returned to determine whether or not that file should be included ! * in the list. ! *

            ! * A SecurityManager check is made prior to reading the ! * directory. If read access to the directory is denied, an exception ! * will be thrown. ! * ! * @return An array of File objects for this directory. ! * ! * @exception SecurityException If the SecurityManager denies ! * access to this directory. ! * ! * @since 1.2 ! */ ! public File[] listFiles (FileFilter filter) { checkRead(); return (File[]) performList (null, filter, File.class); } ! /** ! * This method returns a String that is the path name of the ! * file as returned by getPath. ! * ! * @return A String representation of this file ! */ ! public String toString() { return path; } ! /** ! * This method returns a URL with the file: ! * protocol that represents this file. The exact form of this URL is ! * system dependent. ! * ! * @return A URL for this object. ! * ! * @exception MalformedURLException If the URL cannot be created ! * successfully. ! */ ! public URL toURL() throws MalformedURLException { // On Win32, Sun's JDK returns URLs of the form "file:/c:/foo/bar.txt", // while on UNIX, it returns URLs of the form "file:/foo/bar.txt". if (separatorChar == '\\') ! return new URL ("file:/" + getAbsolutePath().replace ('\\', '/') + (isDirectory() ? "/" : "")); else ! return new URL ("file:" + getAbsolutePath() + (isDirectory() ? "/" : "")); } ! /* ! * This native method actually creates the directory ! */ ! private final native boolean performMkdir(); ! /** ! * This method creates a directory for the path represented by this object. ! * ! * @return true if the directory was created, ! * false otherwise ! * ! * @exception SecurityException If write access is not allowed to this file ! */ ! public boolean mkdir() { checkWrite(); ! return performMkdir(); } private static boolean mkdirs (File x) *************** public class File implements Serializabl *** 433,452 **** return x.mkdir(); } ! public boolean mkdirs () { checkWrite(); ! if (isDirectory ()) return false; return mkdirs (new File (path)); } ! private static synchronized String nextValue () { return Long.toString(counter++, Character.MAX_RADIX); } ! /** @since 1.2 */ public static File createTempFile (String prefix, String suffix, File directory) throws IOException --- 930,987 ---- return x.mkdir(); } ! /** ! * This method creates a directory for the path represented by this file. ! * It will also create any intervening parent directories if necessary. ! * ! * @return true if the directory was created, ! * false otherwise ! * ! * @exception SecurityException If write access is not allowed to this file ! */ ! public boolean mkdirs() { checkWrite(); ! if (isDirectory()) return false; return mkdirs (new File (path)); } ! private static synchronized String nextValue() { return Long.toString(counter++, Character.MAX_RADIX); } ! /** ! * This method creates a temporary file in the specified directory. If ! * the directory name is null, then this method uses the system temporary ! * directory. The files created are guaranteed not to currently exist and ! * the same file name will never be used twice in the same virtual ! * machine instance. ! * The system temporary directory is determined by examinging the ! * java.io.tmpdir system property. ! *

            ! * The prefix parameter is a sequence of at least three ! * characters that are used as the start of the generated filename. The ! * suffix parameter is a sequence of characters that is used ! * to terminate the file name. This parameter may be null ! * and if it is, the suffix defaults to ".tmp". ! *

            ! * If a SecurityManager exists, then its checkWrite ! * method is used to verify that this operation is permitted. ! * ! * @param prefix The character prefix to use in generating the path name. ! * @param suffix The character suffix to use in generating the path name. ! * @param directory The directory to create the file in, or ! * null for the default temporary directory ! * ! * @exception IllegalArgumentException If the patterns is not valid ! * @exception SecurityException If there is no permission to perform ! * this operation ! * @exception IOException If an error occurs ! * ! * @since 1.2 ! */ public static File createTempFile (String prefix, String suffix, File directory) throws IOException *************** public class File implements Serializabl *** 454,488 **** // Grab the system temp directory if necessary if (directory == null) { ! String dirname = tmpdir; ! if (dirname == null) ! throw ! new IOException("Cannot determine system temporary directory"); ! directory = new File(dirname); ! if (!directory.exists()) ! throw new IOException("System temporary directory " ! + directory.getName() + " does not exist."); ! if (!directory.isDirectory()) ! throw new IOException("System temporary directory " ! + directory.getName() ! + " is not really a directory."); } ! if (prefix.length () < 3) throw new IllegalArgumentException ("Prefix too short: " + prefix); if (suffix == null) suffix = ".tmp"; // Truncation rules. // `6' is the number of characters we generate. ! if (prefix.length () + 6 + suffix.length () > maxPathLen) { int suf_len = 0; if (suffix.charAt(0) == '.') suf_len = 4; suffix = suffix.substring(0, suf_len); ! if (prefix.length () + 6 + suf_len > maxPathLen) prefix = prefix.substring(0, maxPathLen - 6 - suf_len); } --- 989,1025 ---- // Grab the system temp directory if necessary if (directory == null) { ! String dirname = tmpdir; ! if (dirname == null) ! throw new IOException ("Cannot determine system temporary directory"); ! directory = new File (dirname); ! if (!directory.exists()) ! throw new IOException ("System temporary directory " ! + directory.getName() + " does not exist."); ! if (!directory.isDirectory()) ! throw new IOException ("System temporary directory " ! + directory.getName() ! + " is not really a directory."); } ! // Check if prefix is at least 3 characters long ! if (prefix.length() < 3) throw new IllegalArgumentException ("Prefix too short: " + prefix); + + // Set default value of suffix if (suffix == null) suffix = ".tmp"; // Truncation rules. // `6' is the number of characters we generate. ! if (prefix.length() + 6 + suffix.length() > maxPathLen) { int suf_len = 0; if (suffix.charAt(0) == '.') suf_len = 4; suffix = suffix.substring(0, suf_len); ! if (prefix.length() + 6 + suf_len > maxPathLen) prefix = prefix.substring(0, maxPathLen - 6 - suf_len); } *************** public class File implements Serializabl *** 492,498 **** for (int i = 0; i < 100; ++i) { // This is ugly. ! String t = "ZZZZZZ" + nextValue (); String l = prefix + t.substring(t.length() - 6) + suffix; try { --- 1029,1035 ---- for (int i = 0; i < 100; ++i) { // This is ugly. ! String t = "ZZZZZZ" + nextValue(); String l = prefix + t.substring(t.length() - 6) + suffix; try { *************** public class File implements Serializabl *** 508,516 **** throw new IOException ("cannot create temporary file"); } private native boolean performSetReadOnly(); ! /** @since 1.2 */ public boolean setReadOnly() { checkWrite(); --- 1045,1069 ---- throw new IOException ("cannot create temporary file"); } + /* + * This native method sets the permissions to make the file read only. + */ private native boolean performSetReadOnly(); ! /** ! * This method sets the file represented by this object to be read only. ! * A read only file or directory cannot be modified. Please note that ! * GNU systems allow read only files to be deleted if the directory it ! * is contained in is writable. ! * ! * @return true if the operation succeeded, false ! * otherwise. ! * ! * @exception SecurityException If the SecurityManager does ! * not allow this operation. ! * ! * @since 1.2 ! */ public boolean setReadOnly() { checkWrite(); *************** public class File implements Serializabl *** 519,525 **** private static native File[] performListRoots(); ! /** @since 1.2 */ public static File[] listRoots() { File[] roots = performListRoots(); --- 1072,1088 ---- private static native File[] performListRoots(); ! /** ! * This method returns an array of filesystem roots. Some operating systems ! * have volume oriented filesystem. This method provides a mechanism for ! * determining which volumes exist. GNU systems use a single hierarchical ! * filesystem, so will have only one "/" filesystem root. ! * ! * @return An array of File objects for each filesystem root ! * available. ! * ! * @since 1.2 ! */ public static File[] listRoots() { File[] roots = performListRoots(); *************** public class File implements Serializabl *** 533,539 **** { try { ! s.checkRead(roots[i].path); } catch (SecurityException sx) { --- 1096,1102 ---- { try { ! s.checkRead (roots[i].path); } catch (SecurityException sx) { *************** public class File implements Serializabl *** 556,569 **** return roots; } public static File createTempFile (String prefix, String suffix) throws IOException { return createTempFile (prefix, suffix, null); } ! /** @since 1.2 */ ! public int compareTo(File other) { if (caseSensitive) return path.compareTo (other.path); --- 1119,1174 ---- return roots; } + /** + * This method creates a temporary file in the system temporary directory. + * The files created are guaranteed not to currently exist and the same file + * name will never be used twice in the same virtual machine instance. The + * system temporary directory is determined by examinging the + * java.io.tmpdir system property. + *

            + * The prefix parameter is a sequence of at least three + * characters that are used as the start of the generated filename. The + * suffix parameter is a sequence of characters that is used + * to terminate the file name. This parameter may be null + * and if it is, the suffix defaults to ".tmp". + *

            + * If a SecurityManager exists, then its checkWrite + * method is used to verify that this operation is permitted. + *

            + * This method is identical to calling + * createTempFile(prefix, suffix, null). + * + * @param prefix The character prefix to use in generating the path name. + * @param suffix The character suffix to use in generating the path name. + * + * @exception IllegalArgumentException If the prefix or suffix are not valid. + * @exception SecurityException If there is no permission to perform + * this operation + * @exception IOException If an error occurs + */ public static File createTempFile (String prefix, String suffix) throws IOException { return createTempFile (prefix, suffix, null); } ! /** ! * This method compares the specified File to this one ! * to test for equality. It does this by comparing the canonical path names ! * of the files. ! *

            ! * The canonical paths of the files are determined by calling the ! * getCanonicalPath method on each object. ! *

            ! * This method returns a 0 if the specified Object is equal ! * to this one, a negative value if it is less than this one ! * a positive value if it is greater than this one. ! * ! * @return An integer as described above ! * ! * @since 1.2 ! */ ! public int compareTo (File other) { if (caseSensitive) return path.compareTo (other.path); *************** public class File implements Serializabl *** 571,701 **** return path.compareToIgnoreCase (other.path); } ! /** @since 1.2 */ ! public int compareTo(Object o) { ! File other = (File) o; ! return compareTo (other); } private native boolean performRenameTo (File dest); ! public boolean renameTo (File dest) { SecurityManager s = System.getSecurityManager(); String sname = getName(); String dname = dest.getName(); if (s != null) { ! s.checkWrite(sname); ! s.checkWrite(dname); } return performRenameTo (dest); } private native boolean performSetLastModified(long time); ! ! /** @since 1.2 */ ! public boolean setLastModified(long time) { checkWrite(); return performSetLastModified(time); } ! public static final String pathSeparator ! = System.getProperty("path.separator"); ! public static final char pathSeparatorChar = pathSeparator.charAt(0); ! public static final String separator = System.getProperty("file.separator"); ! public static final char separatorChar = separator.charAt(0); ! ! static final String tmpdir = System.getProperty("java.io.tmpdir"); ! static int maxPathLen; ! static boolean caseSensitive; ! static String dupSeparator = separator + separator; ! ! static ! { ! init_native(); ! } ! ! // Native function called at class initialization. This should should ! // set the maxPathLen and caseSensitive variables. ! private static native void init_native(); ! ! // The path. ! private String path; ! ! // We keep a counter for use by createTempFile. We choose the first ! // value randomly to try to avoid clashes with other VMs. ! private static long counter = Double.doubleToLongBits (Math.random ()); ! ! private void checkWrite () { SecurityManager s = System.getSecurityManager(); if (s != null) ! s.checkWrite(path); } ! private void checkRead () { SecurityManager s = System.getSecurityManager(); if (s != null) ! s.checkRead(path); } /** ! * Add this File to the set of files to be deleted upon normal ! * termination. ! * ! * @since 1.2 ! */ // FIXME: This should use the ShutdownHook API once we implement that. ! public void deleteOnExit () { ! SecurityManager sm = System.getSecurityManager (); if (sm != null) ! sm.checkDelete (getName ()); FileDeleter.add (this); } private void writeObject (ObjectOutputStream oos) throws IOException { ! oos.defaultWriteObject (); oos.writeChar (separatorChar); } private void readObject (ObjectInputStream ois) throws ClassNotFoundException, IOException { ! ois.defaultReadObject (); // If the file was from an OS with a different dir separator, // fixup the path to use the separator on this OS. ! char oldSeparatorChar = ois.readChar (); if (oldSeparatorChar != separatorChar) path = path.replace (oldSeparatorChar, separatorChar); } - - // QUERY arguments to access function. - private final static int READ = 0; - private final static int WRITE = 1; - private final static int EXISTS = 2; - - // QUERY arguments to stat function. - private final static int DIRECTORY = 0; - private final static int ISFILE = 1; - private final static int ISHIDDEN = 2; - - // QUERY arguments to attr function. - private final static int MODIFIED = 0; - private final static int LENGTH = 1; ! private final native long attr (int query); ! // On OSF1 V5.0, `stat' is a macro. It is easiest to use the name ! // `_stat' instead. We do the same thing for `_access' just in ! // case. ! private final native boolean _access (int query); ! private final native boolean _stat (int query); - private static final long serialVersionUID = 301077366599181567L; - } --- 1176,1322 ---- return path.compareToIgnoreCase (other.path); } ! /** ! * This method compares the specified Object to this one ! * to test for equality. It does this by comparing the canonical path names ! * of the files. This method is identical to compareTo(File) ! * except that if the Object passed to it is not a ! * File, it throws a ClassCastException ! *

            ! * The canonical paths of the files are determined by calling the ! * getCanonicalPath method on each object. ! *

            ! * This method returns a 0 if the specified Object is equal ! * to this one, a negative value if it is less than this one ! * a positive value if it is greater than this one. ! * ! * @return An integer as described above ! * ! * @exception ClassCastException If the passed Object is ! * not a File ! * ! * @since 1.2 ! */ ! public int compareTo (Object obj) { ! return compareTo ((File) obj); } + /* + * This native method actually performs the rename. + */ private native boolean performRenameTo (File dest); ! ! /** ! * This method renames the file represented by this object to the path ! * of the file represented by the argument File. ! * ! * @param dest The File object representing the target name ! * ! * @return true if the rename succeeds, false ! * otherwise. ! * ! * @exception SecurityException If write access is not allowed to the ! * file by the SecurityMananger. ! */ ! public synchronized boolean renameTo (File dest) { SecurityManager s = System.getSecurityManager(); String sname = getName(); String dname = dest.getName(); if (s != null) { ! s.checkWrite (sname); ! s.checkWrite (dname); } return performRenameTo (dest); } + /* + * This method does the actual setting of the modification time. + */ private native boolean performSetLastModified(long time); ! ! /** ! * This method sets the modification time on the file to the specified ! * value. This is specified as the number of seconds since midnight ! * on January 1, 1970 GMT. ! * ! * @param time The desired modification time. ! * ! * @return true if the operation succeeded, false ! * otherwise. ! * ! * @exception IllegalArgumentException If the specified time is negative. ! * @exception SecurityException If the SecurityManager will ! * not allow this operation. ! * ! * @since 1.2 ! */ ! public boolean setLastModified (long time) { + if (time < 0) + throw new IllegalArgumentException("Negative modification time: " + time); + checkWrite(); return performSetLastModified(time); } ! private void checkWrite() { + // Check the SecurityManager SecurityManager s = System.getSecurityManager(); + if (s != null) ! s.checkWrite (path); } ! private void checkRead() { + // Check the SecurityManager SecurityManager s = System.getSecurityManager(); + if (s != null) ! s.checkRead (path); } /** ! * Add this File to the set of files to be deleted upon normal ! * termination. ! * ! * @exception SecurityException If deleting of the file is not allowed ! * ! * @since 1.2 ! */ // FIXME: This should use the ShutdownHook API once we implement that. ! public void deleteOnExit() { ! // Check the SecurityManager ! SecurityManager sm = System.getSecurityManager(); if (sm != null) ! sm.checkDelete (getName()); FileDeleter.add (this); } private void writeObject (ObjectOutputStream oos) throws IOException { ! oos.defaultWriteObject(); oos.writeChar (separatorChar); } private void readObject (ObjectInputStream ois) throws ClassNotFoundException, IOException { ! ois.defaultReadObject(); // If the file was from an OS with a different dir separator, // fixup the path to use the separator on this OS. ! char oldSeparatorChar = ois.readChar(); ! if (oldSeparatorChar != separatorChar) path = path.replace (oldSeparatorChar, separatorChar); } ! } // class File diff -Nrc3pad gcc-3.3.3/libjava/java/io/FilenameFilter.java gcc-3.4.0/libjava/java/io/FilenameFilter.java *** gcc-3.3.3/libjava/java/io/FilenameFilter.java 2002-01-22 22:40:14.000000000 +0000 --- gcc-3.4.0/libjava/java/io/FilenameFilter.java 2003-04-07 12:25:08.000000000 +0000 *************** *** 1,5 **** /* FilenameFilter.java -- Filter a list of filenames ! Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* FilenameFilter.java -- Filter a list of filenames ! Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** package java.io; *** 44,73 **** */ /** ! * This interface has one method which is used for filtering filenames ! * returned in a directory listing. It is currently used by the ! * File.list() method and by the filename dialog in AWT. ! *

            ! * The method in this interface determines if a particular file should ! * or should not be included in the file listing. ! * ! * @author Aaron M. Renn (arenn@urbanophile.com) ! * @author Tom Tromey ! */ public interface FilenameFilter { ! ! /** ! * This method determines whether or not a given file should be included ! * in a directory listing. ! * ! * @param dir The File instance for the directory being read ! * @param name The name of the file to test ! * ! * @return true if the file should be included in the list, ! * false otherwise. ! */ ! boolean ! accept(File dir, String name); } // interface FilenameFilter --- 44,76 ---- */ /** ! * This interface has one method which is used for filtering filenames ! * returned in a directory listing. It is currently used by the ! * File.list(FilenameFilter) method and by the filename ! * dialog in AWT. ! *

            ! * The method in this interface determines if a particular file should ! * or should not be included in the file listing. ! * ! * @author Aaron M. Renn (arenn@urbanophile.com) ! * @author Tom Tromey ! * ! * @see File#listFiles(java.io.FilenameFilter) ! * @see java.awt.FileDialog#setFilenameFilter(java.io.FilenameFilter) ! */ public interface FilenameFilter { ! /** ! * This method determines whether or not a given file should be included ! * in a directory listing. ! * ! * @param dir The File instance for the directory being read ! * @param name The name of the file to test ! * ! * @return true if the file should be included in the list, ! * false otherwise. ! */ ! boolean accept(File dir, String name); } // interface FilenameFilter + diff -Nrc3pad gcc-3.3.3/libjava/java/io/FileOutputStream.java gcc-3.4.0/libjava/java/io/FileOutputStream.java *** gcc-3.3.3/libjava/java/io/FileOutputStream.java 2002-11-20 16:19:05.000000000 +0000 --- gcc-3.4.0/libjava/java/io/FileOutputStream.java 2003-07-13 16:53:05.000000000 +0000 *************** *** 1,29 **** ! // FileOutputStream.java - Write bytes to a file. ! /* Copyright (C) 1998, 1999, 2001 Free Software Foundation ! This file is part of libgcj. - This software is copyrighted work licensed under the terms of the - Libgcj License. Please consult the file "LIBGCJ_LICENSE" for - details. */ package java.io; import java.nio.channels.FileChannel; ! ! /** ! * @author Tom Tromey ! * @date September 24, 1998 ! */ /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 * "The Java Language Specification", ISBN 0-201-63451-1 * Status: Complete to version 1.1. */ public class FileOutputStream extends OutputStream { public FileOutputStream (String path, boolean append) throws SecurityException, FileNotFoundException { --- 1,83 ---- ! /* FileOutputStream.java -- Writes to a file on disk. ! Copyright (C) 1998, 2001, 2003 Free Software Foundation, Inc. ! This file is part of GNU Classpath. ! GNU Classpath is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! GNU Classpath is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with GNU Classpath; see the file COPYING. If not, write to the ! Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ! 02111-1307 USA. ! ! Linking this library statically or dynamically with other modules is ! making a combined work based on this library. Thus, the terms and ! conditions of the GNU General Public License cover the whole ! combination. ! ! As a special exception, the copyright holders of this library give you ! permission to link this library with independent modules to produce an ! executable, regardless of the license terms of these independent ! modules, and to copy and distribute the resulting executable under ! terms of your choice, provided that you also meet, for each linked ! independent module, the terms and conditions of the license of that ! module. An independent module is a module which is not derived from ! or based on this library. If you modify this library, you may extend ! this exception to your version of the library, but you are not ! obligated to do so. If you do not wish to do so, delete this ! exception statement from your version. */ package java.io; import java.nio.channels.FileChannel; ! import java.nio.channels.FileChannelImpl; /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 * "The Java Language Specification", ISBN 0-201-63451-1 * Status: Complete to version 1.1. */ + /** + * This classes allows a stream of data to be written to a disk file or + * any open FileDescriptor. + * + * @author Aaron M. Renn + * @author Tom Tromey + */ public class FileOutputStream extends OutputStream { + private FileDescriptor fd; + + private FileChannel ch; /* cached associated file-channel */ + + /** + * This method initializes a FileOutputStream object to write + * to the named file. The file is created if it does not exist, and + * the bytes written are written starting at the beginning of the file if + * the append argument is false or at the end + * of the file if the append argument is true. + *

            + * Before opening a file, a security check is performed by calling the + * checkWrite method of the SecurityManager (if + * one exists) with the name of the file to be opened. An exception is + * thrown if writing is not allowed. + * + * @param name The name of the file this stream should write to + * @param append true to append bytes to the end of the file, + * or false to write bytes to the beginning + * + * @exception SecurityException If write access to the file is not allowed + * @exception FileNotFoundException If a non-security error occurs + */ public FileOutputStream (String path, boolean append) throws SecurityException, FileNotFoundException { *************** public class FileOutputStream extends Ou *** 31,58 **** if (s != null) s.checkWrite(path); fd = new FileDescriptor (path, (append ! ? FileDescriptor.APPEND : FileDescriptor.WRITE)); } public FileOutputStream (String path) throws SecurityException, FileNotFoundException { this (path, false); } public FileOutputStream (File file) throws SecurityException, FileNotFoundException { this (file.getPath(), false); } public FileOutputStream (FileDescriptor fdObj) throws SecurityException { SecurityManager s = System.getSecurityManager(); if (s != null) s.checkWrite(fdObj); fd = fdObj; } --- 85,192 ---- if (s != null) s.checkWrite(path); fd = new FileDescriptor (path, (append ! ? FileDescriptor.WRITE ! | FileDescriptor.APPEND : FileDescriptor.WRITE)); } + /** + * This method initializes a FileOutputStream object to write + * to the named file. The file is created if it does not exist, and + * the bytes written are written starting at the beginning of the file. + *

            + * Before opening a file, a security check is performed by calling the + * checkWrite method of the SecurityManager (if + * one exists) with the name of the file to be opened. An exception is + * thrown if writing is not allowed. + * + * @param name The name of the file this stream should write to + * + * @exception SecurityException If write access to the file is not allowed + * @exception FileNotFoundException If a non-security error occurs + */ public FileOutputStream (String path) throws SecurityException, FileNotFoundException { this (path, false); } + /** + * This method initializes a FileOutputStream object to write + * to the specified File object. The file is created if it + * does not exist, and the bytes written are written starting at the + * beginning of the file. + *

            + * Before opening a file, a security check is performed by calling the + * checkWrite method of the SecurityManager (if + * one exists) with the name of the file to be opened. An exception is + * thrown if writing is not allowed. + * + * @param file The File object this stream should write to + * + * @exception SecurityException If write access to the file is not allowed + * @exception FileNotFoundException If a non-security error occurs + */ public FileOutputStream (File file) throws SecurityException, FileNotFoundException { this (file.getPath(), false); } + /** + * This method initializes a FileOutputStream object to write + * to the specified File object. The file is created if it + * does not exist, and the bytes written are written starting at the + * beginning of the file if the append parameter is + * false. Otherwise bytes are written at the end of the + * file. + *

            + * Before opening a file, a security check is performed by calling the + * checkWrite method of the SecurityManager (if + * one exists) with the name of the file to be opened. An exception is + * thrown if writing is not allowed. + * + * @param file The File object this stream should write to + * @param append true to append bytes to the end of the file, + * or false to write bytes to the beginning + * + * @exception SecurityException If write access to the file is not allowed + * @exception FileNotFoundException If a non-security error occurs + */ + public FileOutputStream (File file, boolean append) + throws FileNotFoundException + { + this (file.getPath(), append); + } + + /** + * This method initializes a FileOutputStream object to write + * to the file represented by the specified FileDescriptor + * object. This method does not create any underlying disk file or + * reposition the file pointer of the given descriptor. It assumes that + * this descriptor is ready for writing as is. + *

            + * Before opening a file, a security check is performed by calling the + * checkWrite method of the SecurityManager (if + * one exists) with the specified FileDescriptor as an argument. + * An exception is thrown if writing is not allowed. + * + * @param file The FileDescriptor this stream should write to + * + * @exception SecurityException If write access to the file is not allowed + */ public FileOutputStream (FileDescriptor fdObj) throws SecurityException { + // Hmm, no other exception but this one to throw, but if the descriptor + // isn't valid, we surely don't have "permission" to write to it. + if (!fdObj.valid()) + throw new SecurityException("Invalid FileDescriptor"); + SecurityManager s = System.getSecurityManager(); if (s != null) s.checkWrite(fdObj); + fd = fdObj; } *************** public class FileOutputStream extends Ou *** 62,67 **** --- 196,209 ---- // mentioned in the JCL. } + /** + * This method returns a FileDescriptor object representing + * the file that is currently being written to + * + * @return A FileDescriptor object for this stream + * + * @exception IOException If an error occurs + */ public final FileDescriptor getFD () throws IOException { if (! fd.valid()) *************** public class FileOutputStream extends Ou *** 69,103 **** return fd; } public void write (int b) throws IOException { fd.write (b); } ! public void write (byte[] b) throws IOException, NullPointerException { ! fd.write (b, 0, b.length); } ! public void write (byte[] b, int off, int len) ! throws IOException, NullPointerException, IndexOutOfBoundsException { ! if (off < 0 || len < 0 || off + len > b.length) throw new ArrayIndexOutOfBoundsException (); ! fd.write (b, off, len); } public void close () throws IOException { if (fd.valid()) fd.close(); } ! // Instance variables. ! private FileDescriptor fd; ! ! public FileChannel getChannel () { ! return null; } ! } --- 211,289 ---- return fd; } + /** + * This method writes a single byte of data to the file. + * + * @param b The byte of data to write, passed as an int + * + * @exception IOException If an error occurs + */ public void write (int b) throws IOException { fd.write (b); } ! /** ! * This method writes all the bytes in the specified array to the ! * file. ! * ! * @param buf The array of bytes to write to the file ! * ! * @exception IOException If an error occurs ! */ ! public void write (byte[] buf) ! throws IOException { ! write (buf, 0, buf.length); } ! /** ! * This method writes len bytes from the byte array ! * buf to the file starting at index offset. ! * ! * @param buf The array of bytes to write to the file ! * @param offset The offset into the array to start writing bytes from ! * @param len The number of bytes to write to the file ! * ! * @exception IOException If an error occurs ! */ ! public void write (byte[] buf, int offset, int len) ! throws IOException { ! if (offset < 0 ! || len < 0 ! || offset + len > buf.length) throw new ArrayIndexOutOfBoundsException (); ! ! fd.write (buf, offset, len); } + /** + * This method closes the underlying file. Any further attempts to + * write to this stream will likely generate an exception since the + * file is closed. + * + * @exception IOException If an error occurs + */ public void close () throws IOException { if (fd.valid()) fd.close(); } ! /** ! * This method creates a java.nio.channels.FileChannel. ! * Nio does not allow one to create a file channel directly. ! * A file channel must be created by first creating an instance of ! * Input/Output/RandomAccessFile and invoking the getChannel() method on it. ! */ ! public synchronized FileChannel getChannel() { ! if (ch == null) ! ch = new FileChannelImpl (fd, true, this); ! ! return ch; } ! ! } // class FileOutputStream ! diff -Nrc3pad gcc-3.3.3/libjava/java/io/FilePermission.java gcc-3.4.0/libjava/java/io/FilePermission.java *** gcc-3.3.3/libjava/java/io/FilePermission.java 2002-11-10 22:06:48.000000000 +0000 --- gcc-3.4.0/libjava/java/io/FilePermission.java 2003-12-04 20:09:57.000000000 +0000 *************** *** 1,5 **** /* java.lang.FilePermission ! Copyright (C) 1998, 2000 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* java.lang.FilePermission ! Copyright (C) 1998, 2000, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 38,51 **** package java.io; ! import java.security.*; ! public final class FilePermission extends Permission implements Serializable { static final long serialVersionUID = 7930732926638008763L; ! private static final String CURRENT_DIRECTORY = System.getProperty("user.dir"); private boolean usingPerms = false; private boolean readPerm = false; private boolean writePerm = false; --- 38,51 ---- package java.io; ! import java.security.Permission; public final class FilePermission extends Permission implements Serializable { static final long serialVersionUID = 7930732926638008763L; ! private static final String CURRENT_DIRECTORY = ! System.getProperty("user.dir"); private boolean usingPerms = false; private boolean readPerm = false; private boolean writePerm = false; *************** public final class FilePermission extend *** 53,78 **** private boolean deletePerm = false; private String actionsString; ! private void cachePerms() { // While race conditions could occur, they don't matter at all. String action; int i = actionsString.indexOf(','); int startI = 0; ! while(i != -1) { ! action = actionsString.substring(startI,i); ! if(action.equals("read")) ! readPerm = true; ! else if(action.equals("write")) ! writePerm = true; ! else if(action.equals("execute")) ! executePerm = true; ! else if(action.equals("delete")) ! deletePerm = true; ! startI = i+1; ! i = actionsString.indexOf(',',startI); ! } action = actionsString.substring(startI); if(action.equals("read")) --- 53,80 ---- private boolean deletePerm = false; private String actionsString; ! private void cachePerms() ! { // While race conditions could occur, they don't matter at all. String action; int i = actionsString.indexOf(','); int startI = 0; ! while(i != -1) ! { ! action = actionsString.substring(startI,i); ! if(action.equals("read")) ! readPerm = true; ! else if(action.equals("write")) ! writePerm = true; ! else if(action.equals("execute")) ! executePerm = true; ! else if(action.equals("delete")) ! deletePerm = true; ! startI = i+1; ! i = actionsString.indexOf(',',startI); ! } action = actionsString.substring(startI); if(action.equals("read")) *************** public final class FilePermission extend *** 90,117 **** ** permission represents. ** @param actionsString a comma-separated list of the actions this ** permission represents. ! ** @XXX what to do when the file string is malformed? **/ public FilePermission(String pathExpression, String actionsString) ! { ! super(pathExpression); ! this.actionsString = actionsString; ! } /** Get the actions this FilePermission supports. ** @return the String representing the actions this FilePermission supports. **/ ! public String getActions() { return actionsString; } /** Get the hash code for this Object.

            ! ** FilePermission's hash code is calculated as the exclusive or of the target ** String's hash code and the action String's hash code. ! ** @specnote Sun did not specify how to calculate the hash code; I made this up. ** @return the hash code for this Object. **/ ! public int hashCode() { return getName().hashCode() ^ actionsString.hashCode(); } --- 92,123 ---- ** permission represents. ** @param actionsString a comma-separated list of the actions this ** permission represents. ! ** FIXME: what to do when the file string is malformed? **/ public FilePermission(String pathExpression, String actionsString) ! { ! super(pathExpression); ! this.actionsString = actionsString; ! } /** Get the actions this FilePermission supports. ** @return the String representing the actions this FilePermission supports. **/ ! public String getActions() ! { return actionsString; } /** Get the hash code for this Object.

            ! ** FilePermission's hash code is calculated as the exclusive or of the ! ** target ** String's hash code and the action String's hash code. ! ** @specnote Sun did not specify how to calculate the hash code; ! ** I made this up. ** @return the hash code for this Object. **/ ! public int hashCode() ! { return getName().hashCode() ^ actionsString.hashCode(); } *************** public final class FilePermission extend *** 121,127 **** ** @param o the Object to compare to. ** @return whether the Objects are semantically equivalent. **/ ! public boolean equals(Object o) { if(!(o instanceof FilePermission)) return false; FilePermission p = (FilePermission)o; --- 127,134 ---- ** @param o the Object to compare to. ** @return whether the Objects are semantically equivalent. **/ ! public boolean equals(Object o) ! { if(!(o instanceof FilePermission)) return false; FilePermission p = (FilePermission)o; *************** public final class FilePermission extend *** 136,158 **** /* Compare names, taking into account if they refer to a * directory and one has a separator and the other does not. */ ! if(f1.charAt(f1.length()) == File.separatorChar) { ! if(f2.charAt(f2.length()) == File.separatorChar) { ! if(!f2.equals(f1)) ! return false; ! } else { ! if(!f2.equals(f1.substring(0,f1.length()-1))) ! return false; ! } ! } else { ! if(f2.charAt(f2.length()) == File.separatorChar) { ! if(!f1.equals(f2.substring(0,f2.length()-1))) ! return false; ! } else { ! if(!f1.equals(f2)) ! return false; ! } ! } return readPerm == p.readPerm && writePerm == p.writePerm && executePerm == p.executePerm && deletePerm == p.deletePerm; } --- 143,176 ---- /* Compare names, taking into account if they refer to a * directory and one has a separator and the other does not. */ ! if(f1.length() > 0 && f1.charAt(f1.length() - 1) == File.separatorChar) ! { ! if(f2.length() > 0 ! && f2.charAt(f2.length() - 1) == File.separatorChar) ! { ! if(!f2.equals(f1)) ! return false; ! } ! else ! { ! if(!f2.equals(f1.substring(0,f1.length()-1))) ! return false; ! } ! } ! else ! { ! if(f2.length() > 0 ! && f2.charAt(f2.length() - 1) == File.separatorChar) ! { ! if(!f1.equals(f2.substring(0,f2.length()-1))) ! return false; ! } ! else ! { ! if(!f1.equals(f2)) ! return false; ! } ! } return readPerm == p.readPerm && writePerm == p.writePerm && executePerm == p.executePerm && deletePerm == p.deletePerm; } *************** public final class FilePermission extend *** 160,221 **** ** Permission A implies permission B if these things are all true: **

              **
            1. A and B are both FilePermissions.
            2. ! **
            3. All possible files in B are included in A (possibly more are in A).
            4. **
            5. All actions B supports, A also supports.
            6. **
            ** @param p the Permission to compare against. ** @return whether this Permission implies p **/ ! public boolean implies(Permission p) { FilePermission fp; if(!(p instanceof FilePermission)) return false; fp = (FilePermission)p; String f1 = getName(); String f2 = fp.getName(); - if(f1.charAt(0) != File.separatorChar) { - f1 = CURRENT_DIRECTORY + f1; - } - if(f2.charAt(0) != File.separatorChar) { - f2 = CURRENT_DIRECTORY + f2; - } ! String sub1, sub2a, sub2b; ! switch(f1.charAt(f1.length() - 1)) { ! case '*': ! sub1 = f1.substring(0,f1.length() - 1); // chop off "*" ! if(f2.length() <= sub1.length()) { ! /* If it's smaller, there is no way it could be part of this directory. ! * If it's the same (or length - 1), it could be the same directory but ! * specifies access to the directory rather than the files in it. ! */ ! return false; ! } else if(f2.charAt(sub1.length() - 1) == File.separatorChar) { ! /* Make sure the part before the "/" is the same */ ! if(!f2.substring(0,sub1.length()).equals(sub1)) ! return false; ! /* Make sure there are no subdirectories specified underneath this one */ ! String sub2 = f2.substring(sub1.length()+1); ! if(f2.substring(sub1.length()+1).indexOf(File.separatorChar) != -1) ! return false; ! } else { ! /* Obviously not equal: f2 is either not a directory or is not ! * the same directory (its name continues further than we want) ! */ ! return false; } ! break; ! case '-': ! sub1 = f1.substring(0,f1.length() - 2); // chop off "/-" ! if(f2.length() < sub1.length()) { ! /* If it's smaller, there is no way it could be part of this directory. */ ! return false; ! } else if(f2.length() > sub1.length() && f2.charAt(sub1.length()) != File.separatorChar) { ! return false; ! } else if(!f2.substring(0,sub1.length()).equals(sub1)) ! return false; ! break; /* Looks redundant with default case and won't compile anyway - arenn case File.separatorChar: if(f2.charAt(f2.length()) == File.separatorChar) { --- 178,264 ---- ** Permission A implies permission B if these things are all true: **
              **
            1. A and B are both FilePermissions.
            2. ! **
            3. All possible files in B are included in A ! ** (possibly more are in A).
            4. **
            5. All actions B supports, A also supports.
            6. **
            ** @param p the Permission to compare against. ** @return whether this Permission implies p **/ ! public boolean implies(Permission p) ! { FilePermission fp; + if(!(p instanceof FilePermission)) return false; + fp = (FilePermission)p; String f1 = getName(); String f2 = fp.getName(); ! if(f1.charAt(0) != File.separatorChar) ! { ! f1 = CURRENT_DIRECTORY + f1; } ! if(f2.charAt(0) != File.separatorChar) ! { ! f2 = CURRENT_DIRECTORY + f2; ! } ! ! String sub1; ! ! switch(f1.charAt(f1.length() - 1)) ! { ! case '*': ! sub1 = f1.substring(0,f1.length() - 1); // chop off "*" ! if(f2.length() <= sub1.length()) ! { ! /* If it's smaller, there is no way it could be part of this ! * directory. ! * If it's the same (or length - 1), it could be the same ! * directory but ! * specifies access to the directory rather than the files in it. ! */ ! return false; ! } ! else if(f2.charAt(sub1.length() - 1) == File.separatorChar) ! { ! /* Make sure the part before the "/" is the same */ ! if(!f2.substring(0,sub1.length()).equals(sub1)) ! return false; ! /* Make sure there are no subdirectories specified ! underneath this one */ ! String sub2 = f2.substring(sub1.length()+1); ! if(f2.substring(sub1.length()+1).indexOf(File.separatorChar) ! != -1) ! return false; ! } ! else ! { ! /* Obviously not equal: f2 is either not a directory or is not ! * the same directory (its name continues further than we want) ! */ ! return false; ! } ! break; ! case '-': ! sub1 = f1.substring(0,f1.length() - 2); // chop off "/-" ! if(f2.length() < sub1.length()) ! { ! /* If it's smaller, there is no way it could be part of ! * this directory. */ ! return false; ! } ! else if(f2.length() > sub1.length() && f2.charAt(sub1.length()) ! != File.separatorChar) ! { ! return false; ! ! } ! else if(!f2.substring(0,sub1.length()).equals(sub1)) ! return false; ! break; /* Looks redundant with default case and won't compile anyway - arenn case File.separatorChar: if(f2.charAt(f2.length()) == File.separatorChar) { *************** public final class FilePermission extend *** 227,242 **** } break; */ ! default: ! if(f2.charAt(f2.length()) == File.separatorChar) { ! if(!f1.equals(f2.substring(0,f2.length()-1))) ! return false; ! } else { ! if(!f1.equals(f2)) ! return false; } - break; - } if(!usingPerms) cachePerms(); --- 270,288 ---- } break; */ ! default: ! if(f2.charAt(f2.length()) == File.separatorChar) ! { ! if(!f1.equals(f2.substring(0,f2.length()-1))) ! return false; ! } ! else ! { ! if(!f1.equals(f2)) ! return false; ! } ! break; } if(!usingPerms) cachePerms(); *************** public final class FilePermission extend *** 254,257 **** return true; } ! } --- 300,304 ---- return true; } ! } // class FilePermission ! diff -Nrc3pad gcc-3.3.3/libjava/java/io/FileReader.java gcc-3.4.0/libjava/java/io/FileReader.java *** gcc-3.3.3/libjava/java/io/FileReader.java 2002-01-22 22:40:14.000000000 +0000 --- gcc-3.4.0/libjava/java/io/FileReader.java 2003-03-18 06:00:25.000000000 +0000 *************** *** 1,5 **** /* FileReader.java -- Convenience class for reading characters from a file ! Copyright (C) 1998, 2000 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* FileReader.java -- Convenience class for reading characters from a file ! Copyright (C) 1998, 2000, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** package java.io; *** 46,53 **** * to read from files using the default character encoding. Use * InputStreamReader directly to use a non-default encoding. * - * @version 0.0 - * * @author Aaron M. Renn (arenn@urbanophile.com) */ public class FileReader extends InputStreamReader --- 46,51 ---- *************** public class FileReader extends InputStr *** 90,93 **** { super(new FileInputStream(name)); } ! } --- 88,92 ---- { super(new FileInputStream(name)); } ! } // class FileReader ! diff -Nrc3pad gcc-3.3.3/libjava/java/io/FileWriter.java gcc-3.4.0/libjava/java/io/FileWriter.java *** gcc-3.3.3/libjava/java/io/FileWriter.java 2002-01-22 22:40:14.000000000 +0000 --- gcc-3.4.0/libjava/java/io/FileWriter.java 2003-03-23 19:11:19.000000000 +0000 *************** *** 1,5 **** /* FileWriter.java -- Convenience class for writing to files. ! Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* FileWriter.java -- Convenience class for writing to files. ! Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** package java.io; *** 54,137 **** public class FileWriter extends OutputStreamWriter { ! /*************************************************************************/ ! ! /* ! * Constructors ! */ ! ! /** ! * This method initializes a new FileWriter object to write ! * to the specified File object. ! * ! * @param file The File object to write to. ! * ! * @param SecurityException If writing to this file is forbidden by the ! * SecurityManager. ! * @param IOException If any other error occurs ! */ ! public ! FileWriter(File file) throws SecurityException, IOException ! { ! super(new FileOutputStream(file)); ! } ! ! /*************************************************************************/ ! ! /** ! * This method initializes a new FileWriter object to write ! * to the specified FileDescriptor object. ! * ! * @param fd The FileDescriptor object to write to ! * ! * @param SecurityException If writing to this file is forbidden by the ! * SecurityManager. ! */ ! public ! FileWriter(FileDescriptor fd) throws SecurityException ! { ! super(new FileOutputStream(fd)); ! } ! /*************************************************************************/ ! /** ! * This method intializes a new FileWriter object to write to the ! * specified named file. ! * ! * @param name The name of the file to write to ! * ! * @param SecurityException If writing to this file is forbidden by the ! * SecurityManager. ! * @param IOException If any other error occurs ! */ ! public ! FileWriter(String name) throws IOException ! { ! super(new FileOutputStream(name)); ! } ! /*************************************************************************/ ! /** ! * This method intializes a new FileWriter object to write to the ! * specified named file. This form of the constructor allows the caller ! * to determin whether data should be written starting at the beginning or ! * the end of the file. ! * ! * @param name The name of the file to write to ! * @param append true to start adding data at the end of the ! * file, false otherwise. ! * ! * @param SecurityException If writing to this file is forbidden by the ! * SecurityManager. ! * @param IOException If any other error occurs ! */ ! public ! FileWriter(String name, boolean append) throws IOException ! { ! super(new FileOutputStream(name, append)); ! } } // class FileWriter --- 54,144 ---- public class FileWriter extends OutputStreamWriter { ! /* ! * Constructors ! */ ! ! /** ! * This method initializes a new FileWriter object to write ! * to the specified File object. ! * ! * @param file The File object to write to. ! * ! * @param SecurityException If writing to this file is forbidden by the ! * SecurityManager. ! * @param IOException If any other error occurs ! */ ! public FileWriter(File file) throws SecurityException, IOException ! { ! super(new FileOutputStream(file)); ! } ! /** ! * This method initializes a new FileWriter object to write ! * to the specified File object. ! * ! * @param file The File object to write to. ! * @param append true to start adding data at the end of the ! * file, false otherwise. ! * ! * @param SecurityException If writing to this file is forbidden by the ! * SecurityManager. ! * @param IOException If any other error occurs ! */ ! public FileWriter(File file, boolean append) throws IOException ! { ! super(new FileOutputStream(file, append)); ! } ! /** ! * This method initializes a new FileWriter object to write ! * to the specified FileDescriptor object. ! * ! * @param fd The FileDescriptor object to write to ! * ! * @param SecurityException If writing to this file is forbidden by the ! * SecurityManager. ! */ ! public FileWriter(FileDescriptor fd) throws SecurityException ! { ! super(new FileOutputStream(fd)); ! } ! /** ! * This method intializes a new FileWriter object to ! * write to the ! * specified named file. ! * ! * @param name The name of the file to write to ! * ! * @param SecurityException If writing to this file is forbidden by the ! * SecurityManager. ! * @param IOException If any other error occurs ! */ ! public FileWriter(String name) throws IOException ! { ! super(new FileOutputStream(name)); ! } ! /** ! * This method intializes a new FileWriter object to ! * write to the ! * specified named file. This form of the constructor allows the caller ! * to determin whether data should be written starting at the beginning or ! * the end of the file. ! * ! * @param name The name of the file to write to ! * @param append true to start adding data at the end of the ! * file, false otherwise. ! * ! * @param SecurityException If writing to this file is forbidden by the ! * SecurityManager. ! * @param IOException If any other error occurs ! */ ! public FileWriter(String name, boolean append) throws IOException ! { ! super(new FileOutputStream(name, append)); ! } } // class FileWriter diff -Nrc3pad gcc-3.3.3/libjava/java/io/FilterInputStream.java gcc-3.4.0/libjava/java/io/FilterInputStream.java *** gcc-3.3.3/libjava/java/io/FilterInputStream.java 2002-01-22 22:40:14.000000000 +0000 --- gcc-3.4.0/libjava/java/io/FilterInputStream.java 2003-03-23 19:11:19.000000000 +0000 *************** package java.io; *** 69,248 **** */ public class FilterInputStream extends InputStream { ! /*************************************************************************/ ! ! /* ! * Instance Variables ! */ ! ! /** ! * This is the subordinate InputStream to which method calls ! * are redirected ! */ ! protected InputStream in; ! ! /*************************************************************************/ ! ! /* ! * Constructors ! */ ! ! /** ! * Create a FilterInputStream with the specified subordinate ! * InputStream. ! * ! * @param in The subordinate InputStream ! */ ! protected ! FilterInputStream(InputStream in) ! { ! this.in = in; ! } ! ! /*************************************************************************/ ! ! /* ! * Instance Methods ! */ ! ! /** ! * Calls the in.mark(int) method. ! * ! * @param readlimit The parameter passed to in.mark(int) ! */ ! public void ! mark(int readlimit) ! { ! in.mark(readlimit); ! } ! ! /*************************************************************************/ ! ! /** ! * Calls the in.markSupported() method. ! * ! * @return true if mark/reset is supported, false ! * otherwise ! */ ! public boolean ! markSupported() ! { ! return(in.markSupported()); ! } ! ! /*************************************************************************/ ! ! /** ! * Calls the in.reset() method. ! * ! * @exception IOException If an error occurs ! */ ! public void ! reset() throws IOException ! { ! in.reset(); ! } ! ! /*************************************************************************/ ! ! /** ! * Calls the in.available() method. ! * ! * @return The value returned from in.available() ! * ! * @exception IOException If an error occurs ! */ ! public int ! available() throws IOException ! { ! return(in.available()); ! } ! ! /*************************************************************************/ ! /** ! * Calls the in.skip(long) method ! * ! * @param The requested number of bytes to skip. ! * ! * @return The value returned from in.skip(long) ! * ! * @exception IOException If an error occurs ! */ ! public long ! skip(long num_bytes) throws IOException ! { ! return(in.skip(num_bytes)); ! } ! /*************************************************************************/ ! /** ! * Calls the in.read() method ! * ! * @return The value returned from in.read() ! * ! * @exception IOException If an error occurs ! */ ! public int ! read() throws IOException ! { ! return(in.read()); ! } ! /*************************************************************************/ ! /** ! * Calls the read(byte[], int, int) overloaded method. Note that ! * this method does not redirect its call directly to a corresponding ! * method in in. This allows subclasses to override only the ! * three argument version of read. ! * ! * @param buf The buffer to read bytes into ! * ! * @return The value retured from in.read(byte[], int, int) ! * ! * @exception IOException If an error occurs ! */ ! public int ! read(byte[] buf) throws IOException ! { ! return(read(buf, 0, buf.length)); ! } ! /*************************************************************************/ ! /** ! * Calls the in.read(byte[], int, int) method. ! * ! * @param buf The buffer to read bytes into ! * @param offset The index into the buffer to start storing bytes ! * @param len The maximum number of bytes to read. ! * ! * @return The value retured from in.read(byte[], int, int) ! * ! * @exception IOException If an error occurs ! */ ! public int ! read(byte[] buf, int offset, int len) throws IOException ! { ! return(in.read(buf, offset, len)); ! } ! /*************************************************************************/ ! /** ! * This method closes the input stream by closing the input stream that ! * this object is filtering. Future attempts to access this stream may ! * throw an exception. ! * ! * @exception IOException If an error occurs ! */ ! public void ! close() throws IOException ! { ! in.close(); ! } } // class FilterInputStream --- 69,205 ---- */ public class FilterInputStream extends InputStream { + /** + * This is the subordinate InputStream to which method calls + * are redirected + */ + protected InputStream in; ! /** ! * Create a FilterInputStream with the specified subordinate ! * InputStream. ! * ! * @param in The subordinate InputStream ! */ ! protected FilterInputStream(InputStream in) ! { ! this.in = in; ! } ! /** ! * Calls the in.mark(int) method. ! * ! * @param readlimit The parameter passed to in.mark(int) ! */ ! public void mark(int readlimit) ! { ! in.mark(readlimit); ! } ! /** ! * Calls the in.markSupported() method. ! * ! * @return true if mark/reset is supported, false ! * otherwise ! */ ! public boolean markSupported() ! { ! return(in.markSupported()); ! } ! /** ! * Calls the in.reset() method. ! * ! * @exception IOException If an error occurs ! */ ! public void reset() throws IOException ! { ! in.reset(); ! } ! /** ! * Calls the in.available() method. ! * ! * @return The value returned from in.available() ! * ! * @exception IOException If an error occurs ! */ ! public int available() throws IOException ! { ! return(in.available()); ! } ! /** ! * Calls the in.skip(long) method ! * ! * @param numBytes The requested number of bytes to skip. ! * ! * @return The value returned from in.skip(long) ! * ! * @exception IOException If an error occurs ! */ ! public long skip(long num_bytes) throws IOException ! { ! return(in.skip(num_bytes)); ! } ! /** ! * Calls the in.read() method ! * ! * @return The value returned from in.read() ! * ! * @exception IOException If an error occurs ! */ ! public int read() throws IOException ! { ! return(in.read()); ! } ! /** ! * Calls the read(byte[], int, int) overloaded method. ! * Note that ! * this method does not redirect its call directly to a corresponding ! * method in in. This allows subclasses to override only the ! * three argument version of read. ! * ! * @param buf The buffer to read bytes into ! * ! * @return The value retured from in.read(byte[], int, int) ! * ! * @exception IOException If an error occurs ! */ ! public int read(byte[] buf) throws IOException ! { ! return(read(buf, 0, buf.length)); ! } ! /** ! * Calls the in.read(byte[], int, int) method. ! * ! * @param buf The buffer to read bytes into ! * @param offset The index into the buffer to start storing bytes ! * @param len The maximum number of bytes to read. ! * ! * @return The value retured from in.read(byte[], int, int) ! * ! * @exception IOException If an error occurs ! */ ! public int read(byte[] buf, int offset, int len) throws IOException ! { ! return(in.read(buf, offset, len)); ! } ! /** ! * This method closes the input stream by closing the input stream that ! * this object is filtering. Future attempts to access this stream may ! * throw an exception. ! * ! * @exception IOException If an error occurs ! */ ! public void close() throws IOException ! { ! in.close(); ! } } // class FilterInputStream + diff -Nrc3pad gcc-3.3.3/libjava/java/io/FilterOutputStream.java gcc-3.4.0/libjava/java/io/FilterOutputStream.java *** gcc-3.3.3/libjava/java/io/FilterOutputStream.java 2002-01-22 22:40:14.000000000 +0000 --- gcc-3.4.0/libjava/java/io/FilterOutputStream.java 2003-03-23 19:11:19.000000000 +0000 *************** *** 1,5 **** /* FilterOutputStream.java -- Parent class for output streams that filter ! Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* FilterOutputStream.java -- Parent class for output streams that filter ! Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** package java.io; *** 56,182 **** */ public class FilterOutputStream extends OutputStream { ! /*************************************************************************/ ! ! /* ! * Instance Variables ! */ ! ! /** ! * This is the subordinate OutputStream that this class ! * redirects its method calls to. ! */ ! protected OutputStream out; ! ! /*************************************************************************/ ! ! /* ! * Constructors ! */ ! ! /** ! * This method initializes an instance of FilterOutputStream ! * to write to the specified subordinate OutputStream. ! * ! * @param out The OutputStream to write to ! */ ! public ! FilterOutputStream(OutputStream out) ! { ! this.out = out; ! } ! ! /*************************************************************************/ ! ! /* ! * Instance Methods ! */ ! ! /** ! * This method closes the underlying OutputStream. Any ! * further attempts to write to this stream may throw an exception. ! * ! * @exception IOException If an error occurs ! */ ! public void ! close() throws IOException ! { ! flush(); ! out.close(); ! } ! ! /*************************************************************************/ ! ! /** ! * This method attempt to flush all buffered output to be written to the ! * underlying output sink. ! * ! * @exception IOException If an error occurs ! */ ! public void ! flush() throws IOException ! { ! out.flush(); ! } ! ! /*************************************************************************/ ! /** ! * This method writes a single byte of output to the underlying ! * OutputStream. ! * ! * @param b The byte to write, passed as an int. ! * ! * @exception IOException If an error occurs ! */ ! public void ! write(int b) throws IOException ! { ! out.write(b); ! } ! /*************************************************************************/ ! /** ! * This method writes all the bytes in the specified array to the underlying ! * OutputStream. It does this by calling the three parameter ! * version of this method - write(byte[], int, int) in this ! * class instead of writing to the underlying OutputStream ! * directly. This allows most subclasses to avoid overriding this method. ! * ! * @param buf The byte array to write bytes from ! * ! * @exception IOException If an error occurs ! */ ! public void ! write(byte[] buf) throws IOException ! { ! // Don't do checking here, per Java Lang Spec. ! write(buf, 0, buf.length); ! } ! /*************************************************************************/ ! /** ! * This method calls the write(int) method len ! * times for all bytes from the array buf starting at index ! * offset. Subclasses should overwrite this method to get a ! * more efficient implementation. ! * ! * @param buf The byte array to write bytes from ! * @param offset The index into the array to start writing bytes from ! * @param len The number of bytes to write ! * ! * @exception IOException If an error occurs ! */ ! public void ! write(byte[] buf, int offset, int len) throws IOException ! { ! // Don't do checking here, per Java Lang Spec. ! for (int i=0; i < len; i++) ! write(buf[offset + i]); ! } } // class FilterOutputStream --- 56,150 ---- */ public class FilterOutputStream extends OutputStream { + /** + * This is the subordinate OutputStream that this class + * redirects its method calls to. + */ + protected OutputStream out; ! /** ! * This method initializes an instance of FilterOutputStream ! * to write to the specified subordinate OutputStream. ! * ! * @param out The OutputStream to write to ! */ ! public FilterOutputStream(OutputStream out) ! { ! this.out = out; ! } ! /** ! * This method closes the underlying OutputStream. Any ! * further attempts to write to this stream may throw an exception. ! * ! * @exception IOException If an error occurs ! */ ! public void close() throws IOException ! { ! flush(); ! out.close(); ! } ! /** ! * This method attempt to flush all buffered output to be written to the ! * underlying output sink. ! * ! * @exception IOException If an error occurs ! */ ! public void flush() throws IOException ! { ! out.flush(); ! } ! /** ! * This method writes a single byte of output to the underlying ! * OutputStream. ! * ! * @param b The byte to write, passed as an int. ! * ! * @exception IOException If an error occurs ! */ ! public void write(int b) throws IOException ! { ! out.write(b); ! } ! /** ! * This method writes all the bytes in the specified array to the underlying ! * OutputStream. It does this by calling the three parameter ! * version of this method - write(byte[], int, int) in this ! * class instead of writing to the underlying OutputStream ! * directly. This allows most subclasses to avoid overriding this method. ! * ! * @param buf The byte array to write bytes from ! * ! * @exception IOException If an error occurs ! */ ! public void write(byte[] buf) throws IOException ! { ! // Don't do checking here, per Java Lang Spec. ! write(buf, 0, buf.length); ! } ! /** ! * This method calls the write(int) method len ! * times for all bytes from the array buf starting at index ! * offset. Subclasses should overwrite this method to get a ! * more efficient implementation. ! * ! * @param buf The byte array to write bytes from ! * @param offset The index into the array to start writing bytes from ! * @param len The number of bytes to write ! * ! * @exception IOException If an error occurs ! */ ! public void write(byte[] buf, int offset, int len) throws IOException ! { ! // Don't do checking here, per Java Lang Spec. ! for (int i=0; i < len; i++) ! write(buf[offset + i]); ! } } // class FilterOutputStream + diff -Nrc3pad gcc-3.3.3/libjava/java/io/FilterReader.java gcc-3.4.0/libjava/java/io/FilterReader.java *** gcc-3.3.3/libjava/java/io/FilterReader.java 2002-01-22 22:40:14.000000000 +0000 --- gcc-3.4.0/libjava/java/io/FilterReader.java 2003-03-23 19:11:19.000000000 +0000 *************** *** 1,5 **** /* FilterReader.java -- Base class for char stream classes that filter input ! Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* FilterReader.java -- Base class for char stream classes that filter input ! Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** package java.io; *** 63,225 **** */ public abstract class FilterReader extends Reader { ! /*************************************************************************/ ! ! /* ! * Instance Variables ! */ ! ! /** ! * This is the subordinate Reader to which method calls ! * are redirected ! */ ! protected Reader in; ! ! /*************************************************************************/ ! ! /* ! * Constructors ! */ ! ! /** ! * Create a FilterReader with the specified subordinate ! * Reader. ! * The lock of the new FilterReader will be set ! * to in.lock. ! * ! * @param in The subordinate Reader ! */ ! protected ! FilterReader(Reader in) ! { ! super(in.lock); ! this.in = in; ! } ! ! /*************************************************************************/ ! ! /* ! * Instance Methods ! */ ! ! /** ! * Calls the in.mark(int) method. ! * ! * @param readlimit The parameter passed to in.mark(int) ! * ! * @exception IOException If an error occurs ! */ ! public void ! mark(int readlimit) throws IOException ! { ! in.mark(readlimit); ! } ! ! /*************************************************************************/ ! ! /** ! * Calls the in.markSupported() method. ! * ! * @return true if mark/reset is supported, false otherwise ! */ ! public boolean ! markSupported() ! { ! return(in.markSupported()); ! } ! ! /*************************************************************************/ ! ! /** ! * Calls the in.reset() method. ! * ! * @exception IOException If an error occurs ! */ ! public void ! reset() throws IOException ! { ! in.reset(); ! } ! ! /*************************************************************************/ ! ! /** ! * Calls the in.read() method. ! * ! * @return The value returned from in.available() ! * ! * @exception IOException If an error occurs ! */ ! public boolean ! ready() throws IOException ! { ! return(in.ready()); ! } ! /*************************************************************************/ ! /** ! * Calls the in.skip(long) method ! * ! * @param The requested number of chars to skip. ! * ! * @return The value returned from in.skip(long) ! * ! * @exception IOException If an error occurs ! */ ! public long ! skip(long num_chars) throws IOException ! { ! return(in.skip(num_chars)); ! } ! /*************************************************************************/ ! /** ! * Calls the in.read() method ! * ! * @return The value returned from in.read() ! * ! * @exception IOException If an error occurs ! */ ! public int ! read() throws IOException ! { ! return(in.read()); ! } ! /*************************************************************************/ ! /** ! * Calls the in.read(char[], int, int) method. ! * ! * @param buf The buffer to read chars into ! * @param offset The index into the buffer to start storing chars ! * @param len The maximum number of chars to read. ! * ! * @return The value retured from in.read(char[], int, int) ! * ! * @exception IOException If an error occurs ! */ ! public int ! read(char[] buf, int offset, int len) throws IOException ! { ! return(in.read(buf, offset, len)); ! } ! /*************************************************************************/ ! /** ! * This method closes the stream by calling the close() method ! * of the underlying stream. ! * ! * @exception IOException If an error occurs ! */ ! public void ! close() throws IOException ! { ! in.close(); ! } } // class FilterReader --- 63,185 ---- */ public abstract class FilterReader extends Reader { + /** + * This is the subordinate Reader to which method calls + * are redirected + */ + protected Reader in; ! /** ! * Create a FilterReader with the specified subordinate ! * Reader. ! * The lock of the new FilterReader will be set ! * to in.lock. ! * ! * @param in The subordinate Reader ! */ ! protected FilterReader(Reader in) ! { ! super(in.lock); ! this.in = in; ! } ! /** ! * Calls the in.mark(int) method. ! * ! * @param readlimit The parameter passed to in.mark(int) ! * ! * @exception IOException If an error occurs ! */ ! public void mark(int readlimit) throws IOException ! { ! in.mark(readlimit); ! } ! /** ! * Calls the in.markSupported() method. ! * ! * @return true if mark/reset is supported, ! * false otherwise ! */ ! public boolean markSupported() ! { ! return(in.markSupported()); ! } ! /** ! * Calls the in.reset() method. ! * ! * @exception IOException If an error occurs ! */ ! public void reset() throws IOException ! { ! in.reset(); ! } ! /** ! * Calls the in.read() method. ! * ! * @return The value returned from in.available() ! * ! * @exception IOException If an error occurs ! */ ! public boolean ready() throws IOException ! { ! return(in.ready()); ! } ! /** ! * Calls the in.skip(long) method ! * ! * @param numBytes The requested number of chars to skip. ! * ! * @return The value returned from in.skip(long) ! * ! * @exception IOException If an error occurs ! */ ! public long skip(long num_chars) throws IOException ! { ! return(in.skip(num_chars)); ! } ! /** ! * Calls the in.read() method ! * ! * @return The value returned from in.read() ! * ! * @exception IOException If an error occurs ! */ ! public int read() throws IOException ! { ! return(in.read()); ! } ! /** ! * Calls the in.read(char[], int, int) method. ! * ! * @param buf The buffer to read chars into ! * @param offset The index into the buffer to start storing chars ! * @param len The maximum number of chars to read. ! * ! * @return The value retured from in.read(char[], int, int) ! * ! * @exception IOException If an error occurs ! */ ! public int read(char[] buf, int offset, int len) throws IOException ! { ! return(in.read(buf, offset, len)); ! } ! /** ! * This method closes the stream by calling the close() method ! * of the underlying stream. ! * ! * @exception IOException If an error occurs ! */ ! public void close() throws IOException ! { ! in.close(); ! } } // class FilterReader + diff -Nrc3pad gcc-3.3.3/libjava/java/io/FilterWriter.java gcc-3.4.0/libjava/java/io/FilterWriter.java *** gcc-3.3.3/libjava/java/io/FilterWriter.java 2002-01-22 22:40:14.000000000 +0000 --- gcc-3.4.0/libjava/java/io/FilterWriter.java 2003-03-23 19:11:19.000000000 +0000 *************** *** 1,5 **** /* FilterWriter.java -- Parent class for output streams that filter ! Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* FilterWriter.java -- Parent class for output streams that filter ! Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** package java.io; *** 52,179 **** * underlying stream. Subclasses provide actual filtering. * * @author Aaron M. Renn (arenn@urbanophile.com) ! * @author Tom Tromey */ public abstract class FilterWriter extends Writer { ! /*************************************************************************/ ! ! /* ! * Instance Variables ! */ ! ! /** ! * This is the subordinate Writer that this class ! * redirects its method calls to. ! */ ! protected Writer out; ! ! /*************************************************************************/ ! ! /* ! * Constructors ! */ ! ! /** ! * This method initializes an instance of FilterWriter ! * to write to the specified subordinate Writer. ! * The given Writer will be used as lock for ! * the newly created FilterWriter. ! * ! * @param out The Writer to write to ! */ ! protected ! FilterWriter(Writer out) ! { ! super(out); ! this.out = out; ! } ! ! /*************************************************************************/ ! ! /* ! * Instance Methods ! */ ! ! /** ! * This method closes the underlying Writer. Any ! * further attempts to write to this stream may throw an exception. ! * ! * @exception IOException If an error occurs ! */ ! public void ! close() throws IOException ! { ! out.close(); ! } ! ! /*************************************************************************/ ! ! /** ! * This method attempt to flush all buffered output to be written to the ! * underlying output sink. ! * ! * @exception IOException If an error occurs ! */ ! public void ! flush() throws IOException ! { ! out.flush(); ! } ! ! /*************************************************************************/ ! /** ! * This method writes a single char of output to the underlying ! * Writer. ! * ! * @param b The char to write, passed as an int. ! * ! * @exception IOException If an error occurs ! */ ! public void ! write(int b) throws IOException ! { ! out.write(b); ! } ! /*************************************************************************/ ! /** ! * This method writes len chars from the array buf ! * starting at index offset to the underlying ! * Writer. ! * ! * @param buf The char array to write chars from ! * @param offset The index into the array to start writing chars from ! * @param len The number of chars to write ! * ! * @exception IOException If an error occurs ! */ ! public void ! write(char[] buf, int offset, int len) throws IOException ! { ! out.write(buf, offset, len); ! } ! /*************************************************************************/ ! /** ! * This method writes len chars from the String ! * starting at position offset. ! * ! * @param str The String that is to be written ! * @param offset The character offset into the String to start writing from ! * @param len The number of chars to write ! * ! * @exception IOException If an error occurs ! */ ! public void ! write(String str, int offset, int len) throws IOException ! { ! out.write(str, offset, len); ! } } // class FilterWriter --- 52,147 ---- * underlying stream. Subclasses provide actual filtering. * * @author Aaron M. Renn (arenn@urbanophile.com) ! * @author Tom Tromey */ public abstract class FilterWriter extends Writer { + /** + * This is the subordinate Writer that this class + * redirects its method calls to. + */ + protected Writer out; ! /** ! * This method initializes an instance of FilterWriter ! * to write to the specified subordinate Writer. ! * The given Writer will be used as lock for ! * the newly created FilterWriter. ! * ! * @param out The Writer to write to ! */ ! protected FilterWriter(Writer out) ! { ! super(out); ! this.out = out; ! } ! /** ! * This method closes the underlying Writer. Any ! * further attempts to write to this stream may throw an exception. ! * ! * @exception IOException If an error occurs ! */ ! public void close() throws IOException ! { ! out.close(); ! } ! /** ! * This method attempt to flush all buffered output to be written to the ! * underlying output sink. ! * ! * @exception IOException If an error occurs ! */ ! public void flush() throws IOException ! { ! out.flush(); ! } ! /** ! * This method writes a single char of output to the underlying ! * Writer. ! * ! * @param b The char to write, passed as an int. ! * ! * @exception IOException If an error occurs ! */ ! public void write(int b) throws IOException ! { ! out.write(b); ! } ! /** ! * This method writes len chars from the array buf ! * starting at index offset to the underlying ! * Writer. ! * ! * @param buf The char array to write chars from ! * @param offset The index into the array to start writing chars from ! * @param len The number of chars to write ! * ! * @exception IOException If an error occurs ! */ ! public void write(char[] buf, int offset, int len) throws IOException ! { ! out.write(buf, offset, len); ! } ! /** ! * This method writes len chars from the String ! * starting at position offset. ! * ! * @param str The String that is to be written ! * @param offset The character offset into the String ! * to start writing from ! * @param len The number of chars to write ! * ! * @exception IOException If an error occurs ! */ ! public void write(String str, int offset, int len) throws IOException ! { ! out.write(str, offset, len); ! } } // class FilterWriter diff -Nrc3pad gcc-3.3.3/libjava/java/io/InputStreamReader.java gcc-3.4.0/libjava/java/io/InputStreamReader.java *** gcc-3.3.3/libjava/java/io/InputStreamReader.java 2003-02-13 23:30:00.000000000 +0000 --- gcc-3.4.0/libjava/java/io/InputStreamReader.java 2003-05-09 07:10:58.000000000 +0000 *************** *** 1,23 **** ! /* Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation ! This file is part of libgcj. ! This software is copyrighted work licensed under the terms of the ! Libgcj License. Please consult the file "LIBGCJ_LICENSE" for ! details. */ package java.io; import gnu.gcj.convert.*; /** * @author Per Bothner * @date April 22, 1998. */ - /* Written using "Java Class Libraries", 2nd edition, plus online - * API docs for JDK 1.2 beta from http://www.javasoft.com. - * Status: Believed complete and correct, but only supports 8859_1. - */ - public class InputStreamReader extends Reader { BufferedInputStream in; --- 1,90 ---- ! /* InputStreamReader.java -- Reader than transforms bytes to chars ! Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation, Inc. ! This file is part of GNU Classpath. ! GNU Classpath is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package java.io; + import gnu.gcj.convert.*; /** + * This class reads characters from a byte input stream. The characters + * read are converted from bytes in the underlying stream by a + * decoding layer. The decoding layer transforms bytes to chars according + * to an encoding standard. There are many available encodings to choose + * from. The desired encoding can either be specified by name, or if no + * encoding is selected, the system default encoding will be used. The + * system default encoding name is determined from the system property + * file.encoding. The only encodings that are guaranteed to + * be availalbe are "8859_1" (the Latin-1 character set) and "UTF8". + * Unforunately, Java does not provide a mechanism for listing the + * ecodings that are supported in a given implementation. + *

            + * Here is a list of standard encoding names that may be available: + *

            + *

              + *
            • 8859_1 (ISO-8859-1/Latin-1) + *
            • 8859_2 (ISO-8859-2/Latin-2) + *
            • 8859_3 (ISO-8859-3/Latin-3) + *
            • 8859_4 (ISO-8859-4/Latin-4) + *
            • 8859_5 (ISO-8859-5/Latin-5) + *
            • 8859_6 (ISO-8859-6/Latin-6) + *
            • 8859_7 (ISO-8859-7/Latin-7) + *
            • 8859_8 (ISO-8859-8/Latin-8) + *
            • 8859_9 (ISO-8859-9/Latin-9) + *
            • ASCII (7-bit ASCII) + *
            • UTF8 (UCS Transformation Format-8) + *
            • More later + *
            + *

            + * It is recommended that applications do not use + * InputStreamReader's + * directly. Rather, for efficiency purposes, an object of this class + * should be wrapped by a BufferedReader. + *

            + * Due to a deficiency the Java class library design, there is no standard + * way for an application to install its own byte-character encoding. + * + * @see BufferedReader + * @see InputStream + * + * @author Aaron M. Renn (arenn@urbanophile.com) * @author Per Bothner * @date April 22, 1998. */ public class InputStreamReader extends Reader { BufferedInputStream in; *************** public class InputStreamReader extends R *** 29,45 **** // Last available character (in work buffer) to read. int wcount; BytesToUnicode converter; public InputStreamReader(InputStream in) { this(in, BytesToUnicode.getDefaultDecoder()); } ! public InputStreamReader(InputStream in, String enc) throws UnsupportedEncodingException { ! this(in, BytesToUnicode.getDecoder(enc)); } private InputStreamReader(InputStream in, BytesToUnicode decoder) --- 96,134 ---- // Last available character (in work buffer) to read. int wcount; + /* + * This is the byte-character decoder class that does the reading and + * translation of bytes from the underlying stream. + */ BytesToUnicode converter; + /** + * This method initializes a new instance of InputStreamReader + * to read from the specified stream using the default encoding. + * + * @param in The InputStream to read from + */ public InputStreamReader(InputStream in) { this(in, BytesToUnicode.getDefaultDecoder()); } ! /** ! * This method initializes a new instance of InputStreamReader ! * to read from the specified stream using a caller supplied character ! * encoding scheme. Note that due to a deficiency in the Java language ! * design, there is no way to determine which encodings are supported. ! * ! * @param in The InputStream to read from ! * @param encoding_name The name of the encoding scheme to use ! * ! * @exception UnsupportedEncodingException If the encoding scheme ! * requested is not available. ! */ ! public InputStreamReader(InputStream in, String encoding_name) throws UnsupportedEncodingException { ! this(in, BytesToUnicode.getDecoder(encoding_name)); } private InputStreamReader(InputStream in, BytesToUnicode decoder) *************** public class InputStreamReader extends R *** 58,63 **** --- 147,158 ---- converter.setInput(this.in.buf, 0, 0); } + /** + * This method closes this stream, as well as the underlying + * InputStream. + * + * @exception IOException If an error occurs + */ public void close() throws IOException { synchronized (lock) *************** public class InputStreamReader extends R *** 70,80 **** --- 165,193 ---- } } + /** + * This method returns the name of the encoding that is currently in use + * by this object. If the stream has been closed, this method is allowed + * to return null. + * + * @param The current encoding name + */ public String getEncoding() { return in != null ? converter.getName() : null; } + /** + * This method checks to see if the stream is read to be read. It + * will return true if is, or false if it is not. + * If the stream is not ready to be read, it could (although is not required + * to) block on the next read attempt. + * + * @return true if the stream is ready to be read, + * false otherwise + * + * @exception IOException If an error occurs + */ public boolean ready() throws IOException { synchronized (lock) *************** public class InputStreamReader extends R *** 92,98 **** } } ! public int read(char buf[], int offset, int length) throws IOException { synchronized (lock) { --- 205,224 ---- } } ! /** ! * This method reads up to length characters from the stream into ! * the specified array starting at index offset into the ! * array. ! * ! * @param buf The character array to recieve the data read ! * @param offset The offset into the array to start storing characters ! * @param length The requested number of characters to read. ! * ! * @return The actual number of characters read, or -1 if end of stream. ! * ! * @exception IOException If an error occurs ! */ ! public int read (char[] buf, int offset, int length) throws IOException { synchronized (lock) { *************** public class InputStreamReader extends R *** 119,124 **** --- 245,257 ---- } } + /** + * This method reads a single character of data from the stream. + * + * @return The char read, as an int, or -1 if end of stream. + * + * @exception IOException If an error occurs + */ public int read() throws IOException { synchronized (lock) *************** public class InputStreamReader extends R *** 168,171 **** } } } ! } --- 301,306 ---- } } } ! ! } // class InputStreamReader ! diff -Nrc3pad gcc-3.3.3/libjava/java/io/LineNumberInputStream.java gcc-3.4.0/libjava/java/io/LineNumberInputStream.java *** gcc-3.3.3/libjava/java/io/LineNumberInputStream.java 2002-06-17 03:52:24.000000000 +0000 --- gcc-3.4.0/libjava/java/io/LineNumberInputStream.java 2003-03-23 19:11:19.000000000 +0000 *************** package java.io; *** 57,63 **** * stream, it has the same mark/reset functionality as the underlying * stream. The mark() and reset() methods * in this class handle line numbers correctly. Calling ! * @code{reset()} resets the line number to the point at which * mark() was called if the subordinate stream supports * that functionality. *

            --- 57,63 ---- * stream, it has the same mark/reset functionality as the underlying * stream. The mark() and reset() methods * in this class handle line numbers correctly. Calling ! * reset() resets the line number to the point at which * mark() was called if the subordinate stream supports * that functionality. *

            *************** public class LineNumberInputStream exten *** 119,125 **** /** * This method returns the current line number * ! * @returns The current line number */ public int getLineNumber() { --- 119,125 ---- /** * This method returns the current line number * ! * @return The current line number */ public int getLineNumber() { diff -Nrc3pad gcc-3.3.3/libjava/java/io/LineNumberReader.java gcc-3.4.0/libjava/java/io/LineNumberReader.java *** gcc-3.3.3/libjava/java/io/LineNumberReader.java 2001-07-02 05:16:24.000000000 +0000 --- gcc-3.4.0/libjava/java/io/LineNumberReader.java 2003-12-30 13:21:16.000000000 +0000 *************** *** 1,16 **** ! /* Copyright (C) 1998, 1999, 2001 Free Software Foundation ! This file is part of libgcj. - This software is copyrighted work licensed under the terms of the - Libgcj License. Please consult the file "LIBGCJ_LICENSE" for - details. */ - package java.io; /** * @author Per Bothner ! * @date April 22, 1998. */ /* Written using "Java Class Libraries", 2nd edition, plus online * API docs for JDK 1.2 beta from http://www.javasoft.com. --- 1,61 ---- ! /* LineNumberReader.java -- A character input stream which counts line numbers ! Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation, Inc. ! This file is part of GNU Classpath. ! ! GNU Classpath is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! GNU Classpath is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with GNU Classpath; see the file COPYING. If not, write to the ! Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ! 02111-1307 USA. ! ! Linking this library statically or dynamically with other modules is ! making a combined work based on this library. Thus, the terms and ! conditions of the GNU General Public License cover the whole ! combination. ! ! As a special exception, the copyright holders of this library give you ! permission to link this library with independent modules to produce an ! executable, regardless of the license terms of these independent ! modules, and to copy and distribute the resulting executable under ! terms of your choice, provided that you also meet, for each linked ! independent module, the terms and conditions of the license of that ! module. An independent module is a module which is not derived from ! or based on this library. If you modify this library, you may extend ! this exception to your version of the library, but you are not ! obligated to do so. If you do not wish to do so, delete this ! exception statement from your version. */ package java.io; /** + * This class functions like a standard Reader except that it + * counts line numbers, and canonicalizes newline characters. As data + * is read, whenever the char sequences "\r", "\n", or "\r\n" are encountered, + * the running line count is incremeted by one. Additionally, the whatever + * line termination sequence was encountered will be converted to a "\n" + * char. Note that this class numbers lines from 0. When the first + * line terminator is encountered, the line number is incremented to 1, and + * so on. Also note that actual "\r" and "\n" characters are looked for. + * The system dependent line separator sequence is ignored. + *

            + * This class counts only line termination characters. If the last line + * read from the stream does not end in a line termination sequence, it + * will not be counted as a line. + * * @author Per Bothner ! * @author Aaron M. Renn (arenn@urbanophile.com) ! * @author Guilhem Lavaux ! * @date December 28, 2003. */ /* Written using "Java Class Libraries", 2nd edition, plus online * API docs for JDK 1.2 beta from http://www.javasoft.com. *************** package java.io; *** 23,70 **** * * This implementation is also minimal in the number of fields it uses. */ - public class LineNumberReader extends BufferedReader { /** The current line number. */ ! int lineNumber; public LineNumberReader(Reader in) { ! super(in, 8192); } public LineNumberReader(Reader in, int size) { super(in, size); } public int getLineNumber() { return lineNumber; } public void setLineNumber(int lineNumber) { this.lineNumber = lineNumber; } ! private static int countLines (char[] buffer, int off, int len) ! { ! int count = 0; ! char prev = '\0'; ! for (int i = 0; i < len; i++) ! { ! char ch = buffer[i+off]; ! if ((ch == '\n' && prev != '\r') || ch == '\r') ! count++; ! prev = ch; ! } ! return count; ! } ! public void mark(int readLimit) throws IOException { synchronized (lock) { // This is basically the same as BufferedReader.mark. --- 68,154 ---- * * This implementation is also minimal in the number of fields it uses. */ public class LineNumberReader extends BufferedReader { /** The current line number. */ ! private int lineNumber; ! /** Whether we already found a new line in the former call. */ ! private boolean matchedNewLine; ! /** The saved line number when calling mark() */ ! private int savedLineNumber; + /** + * Create a new LineNumberReader that reads from the + * specified subordinate Reader. A default 8K char sized + * buffer will be used for reads. + * + * @param in The subordinate Reader to read from + */ public LineNumberReader(Reader in) { ! super(in, DEFAULT_BUFFER_SIZE); } + /** + * This method initializes a new LineNumberReader to read + * from the specified subordinate Reader using the specified + * read buffer size. + * + * @param in The subordinate Reader to read from + * @param size The buffer size to use for reading + */ public LineNumberReader(Reader in, int size) { super(in, size); } + /** + * This method returns the current line number + * + * @return The current line number + */ public int getLineNumber() { return lineNumber; } + /** + * This method sets the current line number to the specified value. + * + * @param line_number The new line number + */ public void setLineNumber(int lineNumber) { this.lineNumber = lineNumber; } ! /** ! * This method marks a position in the input to which the stream can be ! * "reset" char calling the reset() method. The parameter ! * readlimit is the number of chars that can be read from the ! * stream after setting the mark before the mark becomes invalid. For ! * example, if mark() is called with a read limit of 10, ! * then when ! * 11 chars of data are read from the stream before the reset() ! * method is called, then the mark is invalid and the stream object ! * instance is not required to remember the mark. ! *

            ! * In this class, this method will remember the current line number as well ! * as the current position in the stream. When the reset() ! * method ! * is called, the line number will be restored to the saved line number in ! * addition to the stream position. ! * ! * @param readlimit The number of chars that can be read before the ! * mark becomes invalid ! * ! * @exception IOException If an error occurs ! */ public void mark(int readLimit) throws IOException { + if (readLimit < 0) + throw new IllegalArgumentException("Read-ahead limit is negative"); + synchronized (lock) { // This is basically the same as BufferedReader.mark. *************** public class LineNumberReader extends Bu *** 72,82 **** // save that 'r', in case the next character is a '\n'. if (pos + readLimit > limit) { ! int saveCR = (pos > 0 && buffer[pos-1] == '\r') ? 1 : 0; char[] old_buffer = buffer; if (readLimit > limit) buffer = new char[saveCR + readLimit]; int copy_start = pos - saveCR; limit -= copy_start; System.arraycopy(old_buffer, copy_start, buffer, 0, limit); pos = saveCR; --- 156,167 ---- // save that 'r', in case the next character is a '\n'. if (pos + readLimit > limit) { ! int saveCR = matchedNewLine ? 1 : 0; char[] old_buffer = buffer; if (readLimit > limit) buffer = new char[saveCR + readLimit]; int copy_start = pos - saveCR; + savedLineNumber = lineNumber; limit -= copy_start; System.arraycopy(old_buffer, copy_start, buffer, 0, limit); pos = saveCR; *************** public class LineNumberReader extends Bu *** 85,169 **** } } public void reset() throws IOException { synchronized (lock) { if (markPos < 0) throw new IOException("mark never set or invalidated"); ! if (markPos > 0 && pos > markPos && buffer[markPos-1] == '\r' ! && buffer[markPos] == '\n') ! lineNumber--; ! lineNumber -= countLines(buffer, markPos, pos - markPos); pos = markPos; } } public int read() throws IOException { synchronized (lock) { skipRedundantLF(); ! if (pos >= limit) ! { ! if (markPos >= 0 && limit == buffer.length) ! markPos = -1; ! if (markPos <= 0) ! pos = limit = 0; ! int count = in.read(buffer, limit, buffer.length - limit); ! if (count <= 0) ! return -1; ! limit += count; ! } char ch = buffer[pos++]; ! if (ch == '\r' || ch == '\n') { lineNumber++; return '\n'; } return (int) ch; } } public int read(char[] buf, int offset, int count) throws IOException { if (count <= 0) { if (count < 0) throw new IndexOutOfBoundsException(); return 0; } synchronized (lock) { ! int first = read(); ! if (first < 0) return -1; int start_offset = offset; ! buf[offset++] = (char) first; ! if (buffer[pos-1] == '\r' && pos < limit && buffer[pos] == '\n') ! pos++; ! count--; while (count-- > 0 && pos < limit) { char ch = buffer[pos++]; if (ch == '\r') { lineNumber++; ! ch = '\n'; ! if (pos < limit && buffer[pos] == '\n') ! pos++; } ! else if (ch == '\n') lineNumber++; buf[offset++] = ch; } return offset - start_offset; } } private void skipRedundantLF() throws IOException { ! if (pos > 0 && buffer[pos-1] == '\r') { if (pos < limit) { // fast case --- 170,330 ---- } } + /** + * This method resets a stream to the point where the mark() + * method + * was called. Any chars that were read after the mark point was set will + * be re-read during subsequent reads. + *

            + * In this class, this method will also restore the line number that was + * current when the mark() method was called. + * + * @exception IOException If an error occurs + */ public void reset() throws IOException { synchronized (lock) { if (markPos < 0) throw new IOException("mark never set or invalidated"); ! lineNumber = savedLineNumber; pos = markPos; + matchedNewLine = (markPos > 0 && buffer[markPos-1] == '\r'); } } + /** + * This private method fills the input buffer whatever pos is. + * Consequently pos should be checked before calling this method. + * + * @return the number of bytes actually read from the input stream or + * -1 if end of stream. + * @exception IOException If an error occurs. + */ + private int fill() throws IOException + { + if (markPos >= 0 && limit == buffer.length) + markPos = -1; + if (markPos < 0) + pos = limit = 0; + int count = in.read(buffer, limit, buffer.length - limit); + if (count <= 0) + return -1; + limit += count; + + return count; + } + + /** + * This method reads an unsigned char from the input stream and returns it + * as an int in the range of 0-65535. This method will return -1 if the + * end of the stream has been reached. + *

            + * Note that if a line termination sequence is encountered (ie, "\r", + * "\n", or "\r\n") then that line termination sequence is converted to + * a single "\n" value which is returned from this method. This means + * that it is possible this method reads two chars from the subordinate + * stream instead of just one. + *

            + * Note that this method will block until a char of data is available + * to be read. + * + * @return The char read or -1 if end of stream + * + * @exception IOException If an error occurs + */ public int read() throws IOException { synchronized (lock) { skipRedundantLF(); ! if (pos >= limit && fill() < 0) ! return -1; char ch = buffer[pos++]; ! ! if ((matchedNewLine = (ch == '\r')) || ch == '\n') { lineNumber++; return '\n'; } + matchedNewLine = false; return (int) ch; } } + /** + * This method reads chars from a stream and stores them into a caller + * supplied buffer. It starts storing data at index offset into + * the buffer and attemps to read len chars. This method can + * return before reading the number of chars requested. The actual number + * of chars read is returned as an int. A -1 is returned to indicated the + * end of the stream. + *

            + * This method will block until some data can be read. + *

            + * Note that if a line termination sequence is encountered (ie, "\r", + * "\n", or "\r\n") then that line termination sequence is converted to + * a single "\n" value which is stored in the buffer. Only a single + * char is counted towards the number of chars read in this case. + * + * @param buf The array into which the chars read should be stored + * @param offset The offset into the array to start storing chars + * @param len The requested number of chars to read + * + * @return The actual number of chars read, or -1 if end of stream + * + * @exception IOException If an error occurs. + * @exception NullPointerException If buf is null (in any case). + * @exception IndexOutOfBoundsException If buffer parameters (offset and + * count) lies outside of the buffer capacity. + */ public int read(char[] buf, int offset, int count) throws IOException { + if (buf == null) + throw new NullPointerException(); + + if (offset + count > buf.length || offset < 0) + throw new IndexOutOfBoundsException(); + if (count <= 0) { if (count < 0) throw new IndexOutOfBoundsException(); return 0; } + synchronized (lock) { ! if (pos >= limit && fill() < 0) return -1; + int start_offset = offset; ! boolean matched = matchedNewLine; ! while (count-- > 0 && pos < limit) { char ch = buffer[pos++]; if (ch == '\r') { lineNumber++; ! matched = true; } ! else if (ch == '\n' && !matched) lineNumber++; + else + matched = false; + buf[offset++] = ch; } + + matchedNewLine = matched; return offset - start_offset; } } private void skipRedundantLF() throws IOException { ! if (pos > 0 && matchedNewLine) { if (pos < limit) { // fast case *************** public class LineNumberReader extends Bu *** 171,189 **** pos++; } else ! { // use read() to deal with the general case. ! // Set pos and limit to zero to avoid infinite recursion in read. ! // May need to invalidate markPos if we've exceeded the buffer. ! if (pos >= buffer.length) ! markPos = -1; ! pos = limit = 0; ! int ch = read(); ! if (ch >= 0 && ch != '\n') ! pos--; } } } public String readLine() throws IOException { // BufferedReader.readLine already does this. Shouldn't need to keep --- 332,359 ---- pos++; } else ! { // check whether the next buffer begins with '\n'. ! // in that case kill the '\n'. ! if (fill() <= 0) ! return; ! if (buffer[pos] == '\n') ! pos++; } + matchedNewLine = true; } } + /** + * This method reads a line of text from the input stream and returns + * it as a String. A line is considered to be terminated + * by a "\r", "\n", or "\r\n" sequence, not by the system dependent line + * separator. + * + * @return The line read as a String or null + * if end of stream. + * + * @exception IOException If an error occurs + */ public String readLine() throws IOException { // BufferedReader.readLine already does this. Shouldn't need to keep *************** public class LineNumberReader extends Bu *** 203,245 **** if (pos > limit) --pos; ! int ch; ! if (pos > 0 && ((ch = buffer[pos - 1]) == '\n' || ch == '\r')) lineNumber = tmpLineNumber + 1; return str; } ! public long skip(long count) throws IOException { ! if (count <= 0) return 0; ! long to_do = count; ! do { ! int ch = read(); ! if (ch < 0) ! break; ! to_do--; ! if (ch == '\n' || ch == '\r') ! lineNumber++; ! else ! { ! long fence = pos + to_do; ! if (limit < fence) ! fence = limit; ! int end = pos; ! for (; end < fence; end++) ! { ! char endch = buffer[end]; ! if (endch == '\n' || endch == '\r') ! break; ! } ! to_do -= end - pos; ! pos = end; ! } } ! while (to_do > 0); ! return count - to_do; } } --- 373,417 ---- if (pos > limit) --pos; ! // The only case where you mustn't increment the line number is you are ! // at the EOS. ! if (str != null) lineNumber = tmpLineNumber + 1; return str; } ! /** ! * This method skips over characters in the stream. This method will ! * skip the specified number of characters if possible, but is not required ! * to skip them all. The actual number of characters skipped is returned. ! * This method returns 0 if the specified number of chars is less than 1. ! * ! * @param count The specified number of chars to skip. ! * ! * @return The actual number of chars skipped. ! * ! * @exception IOException If an error occurs ! */ ! public long skip (long count) throws IOException { ! if (count < 0) ! throw new IllegalArgumentException("skip() value is negative"); ! if (count == 0) return 0; ! ! int skipped; ! char[] buf = new char[1]; ! ! for (skipped = 0; skipped < count; skipped++) { ! int ch = read(buf, 0, 1); ! ! if (ch < 0) ! break; } ! ! return skipped; } } + diff -Nrc3pad gcc-3.3.3/libjava/java/io/natFileDescriptorEcos.cc gcc-3.4.0/libjava/java/io/natFileDescriptorEcos.cc *** gcc-3.3.3/libjava/java/io/natFileDescriptorEcos.cc 2002-07-24 17:48:41.000000000 +0000 --- gcc-3.4.0/libjava/java/io/natFileDescriptorEcos.cc 2003-05-13 09:13:31.000000000 +0000 *************** java::io::FileDescriptor::seek (jlong po *** 108,114 **** } jlong ! java::io::FileDescriptor::length (void) { return 0; } --- 108,114 ---- } jlong ! java::io::FileDescriptor::getLength (void) { return 0; } diff -Nrc3pad gcc-3.3.3/libjava/java/io/natFileDescriptorPosix.cc gcc-3.4.0/libjava/java/io/natFileDescriptorPosix.cc *** gcc-3.3.3/libjava/java/io/natFileDescriptorPosix.cc 2003-08-09 06:59:48.000000000 +0000 --- gcc-3.4.0/libjava/java/io/natFileDescriptorPosix.cc 2003-07-26 00:40:50.000000000 +0000 *************** details. */ *** 18,27 **** #include #include - #ifndef MAXPATHLEN - # define MAXPATHLEN 1024 - #endif - #ifdef HAVE_SYS_IOCTL_H #define BSD_COMP /* Get FIONREAD on Solaris2. */ #include --- 18,23 ---- *************** java::io::FileDescriptor::open (jstring *** 109,114 **** --- 105,116 ---- } } + if ((jflags & SYNC)) + flags |= O_SYNC; + + if ((jflags & DSYNC)) + flags |= O_DSYNC; + int fd = ::open (buf, flags, mode); if (fd == -1 && errno == EMFILE) { *************** java::io::FileDescriptor::write (jint b) *** 148,154 **** iioe->bytesTransferred = r == -1 ? 0 : r; throw iioe; } ! throw new IOException (JvNewStringLatin1 (strerror (errno))); } } position++; --- 150,157 ---- iioe->bytesTransferred = r == -1 ? 0 : r; throw iioe; } ! if (errno != EINTR) ! throw new IOException (JvNewStringLatin1 (strerror (errno))); } } position++; *************** java::io::FileDescriptor::write (jbyteAr *** 176,182 **** iioe->bytesTransferred = written; throw iioe; } ! throw new IOException (JvNewStringLatin1 (strerror (errno))); } written += r; --- 179,186 ---- iioe->bytesTransferred = written; throw iioe; } ! if (errno != EINTR) ! throw new IOException (JvNewStringLatin1 (strerror (errno))); } written += r; *************** java::io::FileDescriptor::seek (jlong po *** 237,243 **** if (eof_trunc) { ! jlong len = length (); if (whence == SET) { if (pos > len) --- 241,247 ---- if (eof_trunc) { ! jlong len = getLength (); if (whence == SET) { if (pos > len) *************** java::io::FileDescriptor::seek (jlong po *** 262,268 **** } jlong ! java::io::FileDescriptor::length (void) { struct stat sb; if (::fstat (fd, &sb)) --- 266,272 ---- } jlong ! java::io::FileDescriptor::getLength (void) { struct stat sb; if (::fstat (fd, &sb)) *************** jint *** 280,299 **** java::io::FileDescriptor::read (void) { jbyte b; ! int r = ::read (fd, &b, 1); ! if (r == 0) ! return -1; ! if (r == -1) { ! if (java::lang::Thread::interrupted()) { ! InterruptedIOException *iioe ! = new InterruptedIOException (JvNewStringLatin1 (strerror (errno))); ! iioe->bytesTransferred = r == -1 ? 0 : r; ! throw iioe; } - throw new IOException (JvNewStringLatin1 (strerror (errno))); } position++; return b & 0xFF; } --- 284,309 ---- java::io::FileDescriptor::read (void) { jbyte b; ! int r; ! do { ! r = ::read (fd, &b, 1); ! if (r == 0) ! return -1; ! if (r == -1) { ! if (java::lang::Thread::interrupted()) ! { ! InterruptedIOException *iioe ! = new InterruptedIOException (JvNewStringLatin1 (strerror (errno))); ! iioe->bytesTransferred = r == -1 ? 0 : r; ! throw iioe; ! } ! if (errno != EINTR) ! throw new IOException (JvNewStringLatin1 (strerror (errno))); } } + while (r != 1); position++; return b & 0xFF; } *************** java::io::FileDescriptor::read (jbyteArr *** 312,331 **** return 0; jbyte *bytes = elements (buffer) + offset; ! int r = ::read (fd, bytes, count); ! if (r == 0) ! return -1; ! if (r == -1) ! { ! if (java::lang::Thread::interrupted()) { ! InterruptedIOException *iioe ! = new InterruptedIOException (JvNewStringLatin1 (strerror (errno))); ! iioe->bytesTransferred = r == -1 ? 0 : r; ! throw iioe; } - throw new IOException (JvNewStringLatin1 (strerror (errno))); } position += r; return r; } --- 322,347 ---- return 0; jbyte *bytes = elements (buffer) + offset; ! int r; ! do ! { ! r = ::read (fd, bytes, count); ! if (r == 0) ! return -1; ! if (r == -1) { ! if (java::lang::Thread::interrupted()) ! { ! InterruptedIOException *iioe ! = new InterruptedIOException (JvNewStringLatin1 (strerror (errno))); ! iioe->bytesTransferred = r == -1 ? 0 : r; ! throw iioe; ! } ! if (errno != EINTR) ! throw new IOException (JvNewStringLatin1 (strerror (errno))); } } + while (r <= 0); position += r; return r; } diff -Nrc3pad gcc-3.3.3/libjava/java/io/natFileDescriptorWin32.cc gcc-3.4.0/libjava/java/io/natFileDescriptorWin32.cc *** gcc-3.3.3/libjava/java/io/natFileDescriptorWin32.cc 2003-02-11 20:56:05.000000000 +0000 --- gcc-3.4.0/libjava/java/io/natFileDescriptorWin32.cc 2003-12-02 22:26:49.000000000 +0000 *************** details. */ *** 13,27 **** // need to change to use the windows asynchronous IO functions #include #include #include - #include #undef STRICT - #include - #include #include #include #include --- 13,25 ---- // need to change to use the windows asynchronous IO functions #include + #include #include #include #undef STRICT #include #include #include *************** details. */ *** 33,38 **** --- 31,46 ---- #include #include + static bool testCanUseGetHandleInfo() + { + /* Test to see whether GetHandleInformation can be used + for console input or screen buffers. This is better + a kludgy OS version check. */ + DWORD dwFlags; + return GetHandleInformation (GetStdHandle (STD_INPUT_HANDLE), + &dwFlags) != 0; + } + // FIXME: casting a FILE (pointer) to a jint will not work on Win64 -- // we should be using gnu.gcj.RawData's. *************** java::io::FileDescriptor::init(void) *** 44,84 **** err = new java::io::FileDescriptor((jint)(GetStdHandle (STD_ERROR_HANDLE))); } - static char * - winerr (void) - { - static LPVOID last = NULL; - LPVOID old = NULL; - - if (last) - old = last; - - FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, - GetLastError(), - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPTSTR) &last, - 0, - NULL); - - if (old) - LocalFree (old); - - return (char *)last; - } - jboolean java::io::FileDescriptor::valid (void) { ! BY_HANDLE_FILE_INFORMATION info; ! return GetFileInformationByHandle ((HANDLE)fd, &info) != 0; } void java::io::FileDescriptor::sync (void) { if (! FlushFileBuffers ((HANDLE)fd)) ! throw new SyncFailedException (JvNewStringLatin1 (winerr ())); } jint --- 52,83 ---- err = new java::io::FileDescriptor((jint)(GetStdHandle (STD_ERROR_HANDLE))); } jboolean java::io::FileDescriptor::valid (void) { ! static bool bCanUseGetHandleInfo = testCanUseGetHandleInfo(); ! if (bCanUseGetHandleInfo) ! { ! /* As with UNIX, a "file" descriptor can be one of ! a gazillion possible underlying things like a pipe ! or socket, so we can't get too fancy here. */ ! DWORD dwFlags; ! HANDLE h = (HANDLE) fd; ! return GetHandleInformation (h, &dwFlags) != 0; ! } ! else ! { ! /* Can't use GetHandleInformation() for console handles on < WinNT 5. */ ! return true; ! } } void java::io::FileDescriptor::sync (void) { if (! FlushFileBuffers ((HANDLE)fd)) ! { ! DWORD dwErrorCode = GetLastError (); ! throw new SyncFailedException (_Jv_WinStrError (dwErrorCode)); ! } } jint *************** java::io::FileDescriptor::open (jstring *** 87,125 **** HANDLE handle = NULL; DWORD access = 0; DWORD create = OPEN_EXISTING; ! char buf[MAX_PATH] = ""; ! ! jsize total = JvGetStringUTFRegion(path, 0, path->length(), buf); ! buf[total] = '\0'; JvAssert((jflags & READ) || (jflags & WRITE)); if ((jflags & READ) && (jflags & WRITE)) { access = GENERIC_READ | GENERIC_WRITE; ! if (jflags & APPEND) ! create = OPEN_ALWAYS; else ! create = CREATE_ALWAYS; } ! else if(jflags & READ) ! access = GENERIC_READ; ! else { access = GENERIC_WRITE; ! if (jflags & APPEND) ! create = OPEN_ALWAYS; else create = CREATE_ALWAYS; } ! handle = CreateFile(buf, access, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, create, 0, NULL); if (handle == INVALID_HANDLE_VALUE) { ! char msg[MAX_PATH + 1000]; ! sprintf (msg, "%s: %s", buf, winerr ()); ! throw new FileNotFoundException (JvNewStringLatin1 (msg)); } // For APPEND mode, move the file pointer to the end of the file. --- 86,127 ---- HANDLE handle = NULL; DWORD access = 0; DWORD create = OPEN_EXISTING; ! ! JV_TEMP_STRING_WIN32(cpath, path) JvAssert((jflags & READ) || (jflags & WRITE)); if ((jflags & READ) && (jflags & WRITE)) { access = GENERIC_READ | GENERIC_WRITE; ! if (jflags & EXCL) ! create = CREATE_NEW; // this will raise error if file exists. else ! create = OPEN_ALWAYS; // equivalent to O_CREAT } ! else if (jflags & READ) { + access = GENERIC_READ; + create = OPEN_EXISTING; // ignore EXCL + } + else + { access = GENERIC_WRITE; ! if (jflags & EXCL) ! create = CREATE_NEW; ! else if (jflags & APPEND) ! create = OPEN_ALWAYS; else create = CREATE_ALWAYS; } ! handle = CreateFile(cpath, access, FILE_SHARE_READ | FILE_SHARE_WRITE, ! NULL, create, 0, NULL); if (handle == INVALID_HANDLE_VALUE) { ! DWORD dwErrorCode = GetLastError (); ! throw new FileNotFoundException (_Jv_WinStrError (cpath, dwErrorCode)); } // For APPEND mode, move the file pointer to the end of the file. *************** java::io::FileDescriptor::open (jstring *** 127,135 **** { DWORD low = SetFilePointer (handle, 0, NULL, FILE_END); if ((low == 0xffffffff) && (GetLastError () != NO_ERROR)) ! throw new FileNotFoundException (JvNewStringLatin1 (winerr ())); } ! return (jint)handle; } void --- 129,146 ---- { DWORD low = SetFilePointer (handle, 0, NULL, FILE_END); if ((low == 0xffffffff) && (GetLastError () != NO_ERROR)) ! { ! DWORD dwErrorCode = GetLastError (); ! throw new FileNotFoundException (_Jv_WinStrError (cpath, dwErrorCode)); ! } } ! ! // Make this handle non-inheritable so that child ! // processes don't inadvertently prevent us from ! // closing this file. ! _Jv_platform_close_on_exec (handle); ! ! return (jint) handle; } void *************** java::io::FileDescriptor::write (jint b) *** 144,156 **** { InterruptedIOException *iioe = new InterruptedIOException (JvNewStringLatin1 ("write interrupted")); iioe->bytesTransferred = bytesWritten; ! throw iioe; } if (bytesWritten != 1) ! throw new IOException (JvNewStringLatin1 (winerr ())); } else ! throw new IOException (JvNewStringLatin1 (winerr ())); // FIXME: loop until bytesWritten == 1 } --- 155,167 ---- { InterruptedIOException *iioe = new InterruptedIOException (JvNewStringLatin1 ("write interrupted")); iioe->bytesTransferred = bytesWritten; ! throw iioe; } if (bytesWritten != 1) ! _Jv_ThrowIOException (); } else ! _Jv_ThrowIOException (); // FIXME: loop until bytesWritten == 1 } *************** java::io::FileDescriptor::write(jbyteArr *** 164,180 **** jbyte *buf = elements (b) + offset; DWORD bytesWritten; if (WriteFile ((HANDLE)fd, buf, len, &bytesWritten, NULL)) { if (java::lang::Thread::interrupted()) { InterruptedIOException *iioe = new InterruptedIOException (JvNewStringLatin1 ("write interrupted")); iioe->bytesTransferred = bytesWritten; ! throw iioe; } } else ! throw new IOException (JvNewStringLatin1 (winerr ())); // FIXME: loop until bytesWritten == len } --- 175,192 ---- jbyte *buf = elements (b) + offset; DWORD bytesWritten; + if (WriteFile ((HANDLE)fd, buf, len, &bytesWritten, NULL)) { if (java::lang::Thread::interrupted()) { InterruptedIOException *iioe = new InterruptedIOException (JvNewStringLatin1 ("write interrupted")); iioe->bytesTransferred = bytesWritten; ! throw iioe; } } else ! _Jv_ThrowIOException (); // FIXME: loop until bytesWritten == len } *************** java::io::FileDescriptor::close (void) *** 184,190 **** HANDLE save = (HANDLE)fd; fd = (jint)INVALID_HANDLE_VALUE; if (! CloseHandle (save)) ! throw new IOException (JvNewStringLatin1 (winerr ())); } void --- 196,202 ---- HANDLE save = (HANDLE)fd; fd = (jint)INVALID_HANDLE_VALUE; if (! CloseHandle (save)) ! _Jv_ThrowIOException (); } void *************** java::io::FileDescriptor::setLength(jlon *** 196,241 **** // Get the original file pointer. if (SetFilePointer((HANDLE) fd, (LONG) 0, &liOrigFilePointer, ! FILE_CURRENT) != (BOOL) 0 && (GetLastError() != NO_ERROR)) ! throw new IOException (JvNewStringLatin1 (winerr ())); // Get the length of the file. if (SetFilePointer((HANDLE) fd, (LONG) 0, &liEndFilePointer, ! FILE_END) != (BOOL) 0 && (GetLastError() != NO_ERROR)) ! throw new IOException (JvNewStringLatin1 (winerr ())); if ((jlong)liEndFilePointer == pos) { // Restore the file pointer. if (liOrigFilePointer != liEndFilePointer) ! { ! if (SetFilePointer((HANDLE) fd, liOrigFilePointer, &liNewFilePointer, ! FILE_BEGIN) != (BOOL) 0 ! && (GetLastError() != NO_ERROR)) ! throw new IOException (JvNewStringLatin1 (winerr ())); ! } return; } // Seek to the new end of file. if (SetFilePointer((HANDLE) fd, (LONG) pos, &liNewFilePointer, ! FILE_BEGIN) != (BOOL) 0 && (GetLastError() != NO_ERROR)) ! throw new IOException (JvNewStringLatin1 (winerr ())); // Truncate the file at this point. if (SetEndOfFile((HANDLE) fd) != (BOOL) 0 && (GetLastError() != NO_ERROR)) ! throw new IOException (JvNewStringLatin1 (winerr ())); if (liOrigFilePointer < liNewFilePointer) { // Restore the file pointer. if (SetFilePointer((HANDLE) fd, liOrigFilePointer, &liNewFilePointer, ! FILE_BEGIN) != (BOOL) 0 ! && (GetLastError() != NO_ERROR)) ! throw new IOException (JvNewStringLatin1 (winerr ())); } } --- 208,253 ---- // Get the original file pointer. if (SetFilePointer((HANDLE) fd, (LONG) 0, &liOrigFilePointer, ! FILE_CURRENT) != (BOOL) 0 && (GetLastError() != NO_ERROR)) ! _Jv_ThrowIOException (); // Get the length of the file. if (SetFilePointer((HANDLE) fd, (LONG) 0, &liEndFilePointer, ! FILE_END) != (BOOL) 0 && (GetLastError() != NO_ERROR)) ! _Jv_ThrowIOException (); if ((jlong)liEndFilePointer == pos) { // Restore the file pointer. if (liOrigFilePointer != liEndFilePointer) ! { ! if (SetFilePointer((HANDLE) fd, liOrigFilePointer, &liNewFilePointer, ! FILE_BEGIN) != (BOOL) 0 ! && (GetLastError() != NO_ERROR)) ! _Jv_ThrowIOException (); ! } return; } // Seek to the new end of file. if (SetFilePointer((HANDLE) fd, (LONG) pos, &liNewFilePointer, ! FILE_BEGIN) != (BOOL) 0 && (GetLastError() != NO_ERROR)) ! _Jv_ThrowIOException (); // Truncate the file at this point. if (SetEndOfFile((HANDLE) fd) != (BOOL) 0 && (GetLastError() != NO_ERROR)) ! _Jv_ThrowIOException (); if (liOrigFilePointer < liNewFilePointer) { // Restore the file pointer. if (SetFilePointer((HANDLE) fd, liOrigFilePointer, &liNewFilePointer, ! FILE_BEGIN) != (BOOL) 0 ! && (GetLastError() != NO_ERROR)) ! _Jv_ThrowIOException (); } } *************** java::io::FileDescriptor::seek (jlong po *** 244,250 **** { JvAssert (whence == SET || whence == CUR); ! jlong len = length(); jlong here = getFilePointer(); if (eof_trunc --- 256,262 ---- { JvAssert (whence == SET || whence == CUR); ! jlong len = getLength(); jlong here = getFilePointer(); if (eof_trunc *************** java::io::FileDescriptor::seek (jlong po *** 257,263 **** LONG high = pos >> 32; DWORD low = SetFilePointer ((HANDLE)fd, (DWORD)(0xffffffff & pos), &high, whence == SET ? FILE_BEGIN : FILE_CURRENT); if ((low == 0xffffffff) && (GetLastError () != NO_ERROR)) ! throw new IOException (JvNewStringLatin1 (winerr ())); return low; } --- 269,275 ---- LONG high = pos >> 32; DWORD low = SetFilePointer ((HANDLE)fd, (DWORD)(0xffffffff & pos), &high, whence == SET ? FILE_BEGIN : FILE_CURRENT); if ((low == 0xffffffff) && (GetLastError () != NO_ERROR)) ! _Jv_ThrowIOException (); return low; } *************** java::io::FileDescriptor::getFilePointer *** 267,278 **** LONG high = 0; DWORD low = SetFilePointer ((HANDLE)fd, 0, &high, FILE_CURRENT); if ((low == 0xffffffff) && (GetLastError() != NO_ERROR)) ! throw new IOException (JvNewStringLatin1 (winerr ())); return (((jlong)high) << 32L) | (jlong)low; } jlong ! java::io::FileDescriptor::length(void) { DWORD high; DWORD low; --- 279,290 ---- LONG high = 0; DWORD low = SetFilePointer ((HANDLE)fd, 0, &high, FILE_CURRENT); if ((low == 0xffffffff) && (GetLastError() != NO_ERROR)) ! _Jv_ThrowIOException (); return (((jlong)high) << 32L) | (jlong)low; } jlong ! java::io::FileDescriptor::getLength(void) { DWORD high; DWORD low; *************** java::io::FileDescriptor::read(void) *** 293,299 **** if (GetLastError () == ERROR_BROKEN_PIPE) return -1; else ! throw new IOException (JvNewStringLatin1 (winerr ())); } if (! read) --- 305,311 ---- if (GetLastError () == ERROR_BROKEN_PIPE) return -1; else ! _Jv_ThrowIOException (); } if (! read) *************** java::io::FileDescriptor::read(jbyteArra *** 324,330 **** if (GetLastError () == ERROR_BROKEN_PIPE) return -1; else ! throw new IOException (JvNewStringLatin1 (winerr ())); } if (read == 0) return -1; --- 336,342 ---- if (GetLastError () == ERROR_BROKEN_PIPE) return -1; else ! _Jv_ThrowIOException (); } if (read == 0) return -1; *************** jint *** 336,340 **** java::io::FileDescriptor::available(void) { // FIXME: ! return length() - getFilePointer(); } --- 348,352 ---- java::io::FileDescriptor::available(void) { // FIXME: ! return getLength() - getFilePointer(); } diff -Nrc3pad gcc-3.3.3/libjava/java/io/natFilePosix.cc gcc-3.4.0/libjava/java/io/natFilePosix.cc *** gcc-3.3.3/libjava/java/io/natFilePosix.cc 2003-08-09 06:59:48.000000000 +0000 --- gcc-3.4.0/libjava/java/io/natFilePosix.cc 2003-09-12 01:08:18.000000000 +0000 *************** details. */ *** 26,35 **** #include #include - #ifndef MAXPATHLEN - # define MAXPATHLEN 1024 - #endif - #include #include #include --- 26,31 ---- *************** details. */ *** 40,49 **** #include #include - #ifdef _SCO_DS - # undef HAVE_READDIR_R - #endif - jboolean java::io::File::_access (jint query) { --- 36,41 ---- *************** java::io::File::getCanonicalPath (void) *** 126,132 **** #ifdef HAVE_REALPATH if (realpath (buf, buf2) == NULL) ! throw new IOException (JvNewStringLatin1 (strerror (errno))); // FIXME: what encoding to assume for file names? This affects many // calls. --- 118,187 ---- #ifdef HAVE_REALPATH if (realpath (buf, buf2) == NULL) ! { ! // If realpath failed, we have to come up with a canonical path ! // anyway. We do this with purely textual manipulation. ! // FIXME: this isn't perfect. You can construct a case where ! // we get a different answer from the JDK: ! // mkdir -p /tmp/a/b/c ! // ln -s /tmp/a/b /tmp/a/z ! // ... getCanonicalPath("/tmp/a/z/c/nosuchfile") ! // We will give /tmp/a/z/c/nosuchfile, while the JDK will ! // give /tmp/a/b/c/nosuchfile. ! int out_idx; ! if (buf[0] != '/') ! { ! // Not absolute, so start with current directory. ! if (getcwd (buf2, sizeof (buf2)) == NULL) ! throw new IOException (); ! out_idx = strlen (buf2); ! } ! else ! { ! buf2[0] = '/'; ! out_idx = 1; ! } ! int in_idx = 0; ! while (buf[in_idx] != '\0') ! { ! // Skip '/'s. ! while (buf[in_idx] == '/') ! ++in_idx; ! int elt_start = in_idx; ! // Find next '/' or end of path. ! while (buf[in_idx] != '\0' && buf[in_idx] != '/') ! ++in_idx; ! if (in_idx == elt_start) ! { ! // An empty component means we've reached the end. ! break; ! } ! int len = in_idx - elt_start; ! if (len == 1 && buf[in_idx] == '.') ! continue; ! if (len == 2 && buf[in_idx] == '.' && buf[in_idx + 1] == '.') ! { ! // Found ".." component, lop off last part from existing ! // buffer. ! --out_idx; ! while (out_idx > 0 && buf2[out_idx] != '/') ! --out_idx; ! // Can't go up past "/". ! if (out_idx == 0) ! ++out_idx; ! } ! else ! { ! // Append a real path component to the output. ! if (out_idx > 1) ! buf2[out_idx++] = '/'; ! strncpy (&buf2[out_idx], &buf[elt_start], len); ! out_idx += len; ! } ! } ! ! buf2[out_idx] = '\0'; ! } // FIXME: what encoding to assume for file names? This affects many // calls. diff -Nrc3pad gcc-3.3.3/libjava/java/io/natFileWin32.cc gcc-3.4.0/libjava/java/io/natFileWin32.cc *** gcc-3.3.3/libjava/java/io/natFileWin32.cc 2003-04-19 19:19:50.000000000 +0000 --- gcc-3.4.0/libjava/java/io/natFileWin32.cc 2003-12-02 22:26:49.000000000 +0000 *************** Libgcj License. Please consult the file *** 9,23 **** details. */ #include #include #include - #include #undef STRICT - #include - #include #include #include #include --- 9,21 ---- details. */ #include + #include #include #include #undef STRICT #include #include #include *************** details. */ *** 42,53 **** jboolean java::io::File::_access (jint query) { ! jstring canon = getCanonicalPath(); ! if (! canon) return false; - char *buf = (char *) __builtin_alloca (JvGetStringUTFLength (canon) + 1); - jsize total = JvGetStringUTFRegion (canon, 0, canon->length(), buf); - buf[total] = '\0'; JvAssert (query == READ || query == WRITE || query == EXISTS); --- 40,48 ---- jboolean java::io::File::_access (jint query) { ! JV_TEMP_STRING_WIN32 (canon, getCanonicalPath()); ! if (!canon) return false; JvAssert (query == READ || query == WRITE || query == EXISTS); *************** java::io::File::_access (jint query) *** 55,80 **** // If the file exists but cannot be read because of the secuirty attributes // on an NTFS disk this wont work (it reports it can be read but cant) // Could we use something from the security API? ! DWORD attributes = GetFileAttributes (buf); if ((query == EXISTS) || (query == READ)) return (attributes == 0xffffffff) ? false : true; else ! return ((attributes != 0xffffffff) && ((attributes & FILE_ATTRIBUTE_READONLY) == 0)) ? true : false; } jboolean java::io::File::_stat (jint query) { ! jstring canon = getCanonicalPath(); ! if (! canon) return false; - char *buf = (char *) __builtin_alloca (JvGetStringUTFLength (canon) + 1); - jsize total = JvGetStringUTFRegion (canon, 0, canon->length(), buf); - buf[total] = '\0'; JvAssert (query == DIRECTORY || query == ISFILE); ! DWORD attributes = GetFileAttributes (buf); if (attributes == 0xffffffff) return false; --- 50,73 ---- // If the file exists but cannot be read because of the secuirty attributes // on an NTFS disk this wont work (it reports it can be read but cant) // Could we use something from the security API? ! DWORD attributes = GetFileAttributes (canon); if ((query == EXISTS) || (query == READ)) return (attributes == 0xffffffff) ? false : true; else ! return ((attributes != 0xffffffff) && ! ((attributes & FILE_ATTRIBUTE_READONLY) == 0)) ? true : false; } jboolean java::io::File::_stat (jint query) { ! JV_TEMP_STRING_WIN32 (canon, getCanonicalPath()); ! if (!canon) return false; JvAssert (query == DIRECTORY || query == ISFILE); ! DWORD attributes = GetFileAttributes (canon); if (attributes == 0xffffffff) return false; *************** java::io::File::_stat (jint query) *** 87,104 **** jlong java::io::File::attr (jint query) { ! jstring canon = getCanonicalPath(); ! if (! canon) return false; - char *buf = (char *) __builtin_alloca (JvGetStringUTFLength (canon) + 1); - jsize total = JvGetStringUTFRegion (canon, 0, canon->length(), buf); - buf[total] = '\0'; JvAssert (query == MODIFIED || query == LENGTH); WIN32_FIND_DATA info; HANDLE sHandle; ! if ( ( sHandle = FindFirstFile( buf, &info)) == INVALID_HANDLE_VALUE) return 0; FindClose( sHandle); --- 80,94 ---- jlong java::io::File::attr (jint query) { ! JV_TEMP_STRING_WIN32 (canon, getCanonicalPath()); ! if (!canon) return false; JvAssert (query == MODIFIED || query == LENGTH); WIN32_FIND_DATA info; HANDLE sHandle; ! if ( ( sHandle = FindFirstFile( canon, &info)) == INVALID_HANDLE_VALUE) return 0; FindClose( sHandle); *************** java::io::File::attr (jint query) *** 119,136 **** jstring java::io::File::getCanonicalPath (void) { ! char *buf = (char *) __builtin_alloca (JvGetStringUTFLength (path) + 1); ! jsize total = JvGetStringUTFRegion (path, 0, path->length(), buf); ! buf[total] = '\0'; LPTSTR unused; ! char buf2[MAX_PATH]; ! if(!GetFullPathName(buf, MAX_PATH, buf2, &unused)) throw new IOException (JvNewStringLatin1 ("GetFullPathName failed")); ! // FIXME: what encoding to assume for file names? This affects many ! // calls. ! return JvNewStringUTF(buf2); } jboolean --- 109,127 ---- jstring java::io::File::getCanonicalPath (void) { ! JV_TEMP_STRING_WIN32 (cpath, path); ! ! // If the filename is blank, use the current directory. ! LPCTSTR thepath = cpath.buf(); ! if (*thepath == 0) ! thepath = _T("."); LPTSTR unused; ! TCHAR buf2[MAX_PATH]; ! if(!GetFullPathName(thepath, MAX_PATH, buf2, &unused)) throw new IOException (JvNewStringLatin1 ("GetFullPathName failed")); ! return _Jv_Win32NewString (buf2); } jboolean *************** java::io::File::isAbsolute (void) *** 152,158 **** && (path->charAt(0) < 'A' || path->charAt(0) > 'Z')) return false; return (path->charAt(1) == ':' ! && (path->charAt(2) == '/' || path->charAt(2) == '\\')); } void java::io::File::init_native () --- 143,149 ---- && (path->charAt(0) < 'A' || path->charAt(0) > 'Z')) return false; return (path->charAt(1) == ':' ! && (path->charAt(2) == '/' || path->charAt(2) == '\\')); } void java::io::File::init_native () *************** void java::io::File::init_native () *** 163,180 **** jobjectArray java::io::File::performList (java::io::FilenameFilter *filter, ! java::io::FileFilter *fileFilter, ! java::lang::Class *clazz) { jstring canon = getCanonicalPath(); if (! canon) return NULL; ! char *buf = (char *) __builtin_alloca (JvGetStringUTFLength (canon) + 5); ! jsize total = JvGetStringUTFRegion (canon, 0, canon->length(), buf); ! if (buf[total-1] == '\\') ! strcpy (&buf[total], "*.*"); else ! strcpy (&buf[total], "\\*.*"); WIN32_FIND_DATA data; HANDLE handle = FindFirstFile (buf, &data); --- 154,176 ---- jobjectArray java::io::File::performList (java::io::FilenameFilter *filter, ! java::io::FileFilter *fileFilter, ! java::lang::Class *clazz) { jstring canon = getCanonicalPath(); if (! canon) return NULL; ! ! int len = canon->length(); ! TCHAR buf[len + 5]; ! ! JV_TEMP_STRING_WIN32(canonstr, canon); ! ! _tcscpy(buf, canonstr); ! if (buf[len - 1] == _T('\\')) ! _tcscpy (&buf[len], _T("*.*")); else ! _tcscpy (&buf[len], _T("\\*.*")); WIN32_FIND_DATA data; HANDLE handle = FindFirstFile (buf, &data); *************** java::io::File::performList (java::io::F *** 185,205 **** do { ! if (strcmp (data.cFileName, ".") && strcmp (data.cFileName, "..")) { ! jstring name = JvNewStringUTF (data.cFileName); if (filter && !filter->accept(this, name)) ! continue; if (clazz == &java::io::File::class$) ! { java::io::File *file = new java::io::File (this, name); if (fileFilter && !fileFilter->accept(file)) ! continue; ! vec->addElement (file); ! } ! else ! vec->addElement (name); } } while (FindNextFile (handle, &data)); --- 181,202 ---- do { ! if (_tcscmp (data.cFileName, _T(".")) && ! _tcscmp (data.cFileName, _T(".."))) { ! jstring name = _Jv_Win32NewString (data.cFileName); if (filter && !filter->accept(this, name)) ! continue; if (clazz == &java::io::File::class$) ! { java::io::File *file = new java::io::File (this, name); if (fileFilter && !fileFilter->accept(file)) ! continue; ! vec->addElement (file); ! } ! else ! vec->addElement (name); } } while (FindNextFile (handle, &data)); *************** java::io::File::performList (java::io::F *** 217,269 **** jboolean java::io::File::performMkdir (void) { ! char *buf = (char *) __builtin_alloca (JvGetStringUTFLength (path) + 1); ! jsize total = JvGetStringUTFRegion(path, 0, path->length(), buf); ! buf[total] = '\0'; ! ! return (CreateDirectory(buf, NULL)) ? true : false; } jboolean java::io::File::performRenameTo (File *dest) { ! char *buf = (char *) __builtin_alloca (JvGetStringUTFLength (path) + 1); ! jsize total = JvGetStringUTFRegion(path, 0, path->length(), buf); ! buf[total] = '\0'; ! char *buf2 = (char *) __builtin_alloca (JvGetStringUTFLength (dest->path) ! + 1); ! total = JvGetStringUTFRegion(dest->path, 0, dest->path->length(), buf2); ! buf2[total] = '\0'; ! ! return (MoveFile(buf, buf2)) ? true : false; } jboolean java::io::File::performDelete () { ! jstring canon = getCanonicalPath(); ! char *buf = (char *) __builtin_alloca (JvGetStringUTFLength (canon) + 1); ! jsize total = JvGetStringUTFRegion(canon, 0, canon->length(), buf); ! buf[total] = '\0'; ! DWORD attributes = GetFileAttributes (buf); if (attributes == 0xffffffff) return false; if (attributes & FILE_ATTRIBUTE_DIRECTORY) ! return (RemoveDirectory (buf)) ? true : false; else ! return (DeleteFile (buf)) ? true : false; } jboolean java::io::File::performCreate (void) { ! jstring canon = getCanonicalPath (); ! char *buf = (char *) __builtin_alloca (JvGetStringUTFLength (canon) + 1); ! jsize total = JvGetStringUTFRegion (canon, 0, canon->length (), buf); ! buf[total] = '\0'; ! HANDLE h = CreateFile (buf, 0, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL); if (h != INVALID_HANDLE_VALUE) { --- 214,255 ---- jboolean java::io::File::performMkdir (void) { ! JV_TEMP_STRING_WIN32 (cpath, path); ! return (CreateDirectory(cpath, NULL)) ? true : false; } jboolean java::io::File::performRenameTo (File *dest) { ! JV_TEMP_STRING_WIN32 (pathFrom, path); ! JV_TEMP_STRING_WIN32 (pathTo, dest->path); ! return (MoveFile(pathFrom, pathTo)) ? true : false; } jboolean java::io::File::performDelete () { ! JV_TEMP_STRING_WIN32 (canon, getCanonicalPath()); ! if (!canon) ! return false; ! DWORD attributes = GetFileAttributes (canon); if (attributes == 0xffffffff) return false; if (attributes & FILE_ATTRIBUTE_DIRECTORY) ! return (RemoveDirectory (canon)) ? true : false; else ! return (DeleteFile (canon)) ? true : false; } jboolean java::io::File::performCreate (void) { ! JV_TEMP_STRING_WIN32 (canon, getCanonicalPath()); ! if (!canon) ! return false; ! HANDLE h = CreateFile (canon, 0, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL); if (h != INVALID_HANDLE_VALUE) { *************** jboolean java::io::File::performCreate ( *** 281,295 **** jboolean java::io::File::performSetReadOnly () { ! jstring canon = getCanonicalPath (); ! char *buf = (char *) __builtin_alloca (JvGetStringUTFLength (canon) + 1); ! jsize total = JvGetStringUTFRegion (canon, 0, canon->length (), buf); ! buf[total] = '\0'; ! DWORD attrs = GetFileAttributes (buf); if (attrs != INVALID_FILE_ATTRIBUTES) { ! if (SetFileAttributes (buf, attrs | FILE_ATTRIBUTE_READONLY) != 0) return true; else return false; --- 267,280 ---- jboolean java::io::File::performSetReadOnly () { ! JV_TEMP_STRING_WIN32 (canon, getCanonicalPath()); ! if (!canon) ! return false; ! DWORD attrs = GetFileAttributes (canon); if (attrs != INVALID_FILE_ATTRIBUTES) { ! if (SetFileAttributes (canon, attrs | FILE_ATTRIBUTE_READONLY) != 0) return true; else return false; *************** jboolean java::io::File::performSetReadO *** 300,309 **** jboolean java::io::File::performSetLastModified (jlong time) { ! jstring canon = getCanonicalPath (); ! char *buf = (char *) __builtin_alloca (JvGetStringUTFLength (canon) + 1); ! jsize total = JvGetStringUTFRegion (canon, 0, canon->length (), buf); ! buf[total] = '\0'; FILETIME modTime; long long mTime100ns = ((long long) time /* Ha! */ --- 285,293 ---- jboolean java::io::File::performSetLastModified (jlong time) { ! JV_TEMP_STRING_WIN32 (canon, getCanonicalPath()); ! if (!canon) ! return false; FILETIME modTime; long long mTime100ns = ((long long) time /* Ha! */ *************** jboolean java::io::File::performSetLastM *** 313,319 **** modTime.dwHighDateTime = (DWORD) (mTime100ns >> 32); jboolean retVal = false; ! HANDLE h = CreateFile (buf, FILE_WRITE_ATTRIBUTES, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL); --- 297,303 ---- modTime.dwHighDateTime = (DWORD) (mTime100ns >> 32); jboolean retVal = false; ! HANDLE h = CreateFile (canon, FILE_WRITE_ATTRIBUTES, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL); diff -Nrc3pad gcc-3.3.3/libjava/java/io/ObjectInput.java gcc-3.4.0/libjava/java/io/ObjectInput.java *** gcc-3.3.3/libjava/java/io/ObjectInput.java 2002-01-22 22:40:14.000000000 +0000 --- gcc-3.4.0/libjava/java/io/ObjectInput.java 2003-10-11 18:38:12.000000000 +0000 *************** *** 1,5 **** /* ObjectInput.java -- Read object data from a stream ! Copyright (C) 1998 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ObjectInput.java -- Read object data from a stream ! Copyright (C) 1998,2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** package java.io; *** 44,158 **** * also has methods that allow input to be done in a manner similar to * InputStream * - * @version 0.0 - * * @author Aaron M. Renn (arenn@urbanophile.com) */ public interface ObjectInput extends DataInput { ! /** ! * This method returns the number of bytes that can be read without ! * blocking. ! * ! * @return The number of bytes available before blocking ! * ! * @exception IOException If an error occurs ! */ ! public abstract int ! available() throws IOException; ! ! /*************************************************************************/ ! ! /** ! * This method reading a byte of data from a stream. It returns that byte ! * as an int. This method blocks if no data is available to be read. ! * ! * @return The byte of data read ! * ! * @exception IOException If an error occurs ! */ ! public abstract int ! read() throws IOException; ! ! /*************************************************************************/ ! ! /** ! * This method reads raw bytes and stores them them a byte array buffer. ! * Note that this method will block if no data is available. However, ! * it will not necessarily block until it fills the entire buffer. That is, ! * a "short count" is possible. ! * ! * @param buf The byte array to receive the data read ! * ! * @return The actual number fo bytes read or -1 if end of stream ! * ! * @exception IOException If an error occurs ! */ ! public abstract int ! read(byte[] buf) throws IOException; ! ! /*************************************************************************/ ! ! /** ! * This method reads raw bytes and stores them in a byte array buffer ! * buf starting at position offset into the buffer. A ! * maximum of len bytes will be read. Note that this method ! * blocks if no data is available, but will not necessarily block until ! * it can read len bytes of data. That is, a "short count" is ! * possible. ! * ! * @param buf The byte array to receive the data read ! * @param offset The offset into @code{buf} to start storing data ! * @param len The maximum number of bytes to read ! * ! * @return The actual number fo bytes read or -1 if end of stream ! * ! * @exception IOException If an error occurs ! */ ! public abstract int ! read(byte[] buf, int offset, int len) throws IOException; ! ! /*************************************************************************/ ! ! /** ! * Reads an object instance and returns it. If the class for the object ! * being read cannot be found, then a ClassNotFoundException will ! * be thrown. ! * ! * @return The object instance that was read ! * ! * @exception ClassNotFoundException If a class for the object cannot be found ! * @exception IOException If an error occurs ! */ ! public abstract Object ! readObject() throws ClassNotFoundException, IOException; ! ! /*************************************************************************/ ! /** ! * This method causes the specified number of bytes to be read and ! * discarded. It is possible that fewer than the requested number of bytes ! * will actually be skipped. ! * ! * @param num_bytes The number of bytes to skip ! * ! * @return The actual number of bytes skipped ! * ! * @exception IOException If an error occurs ! */ ! public abstract long ! skip(long num_bytes) throws IOException; ! /*************************************************************************/ ! /** ! * This method closes the input source ! * ! * @exception IOException If an error occurs ! */ ! public abstract void ! close() throws IOException; ! } // interface ObjectInput --- 44,140 ---- * also has methods that allow input to be done in a manner similar to * InputStream * * @author Aaron M. Renn (arenn@urbanophile.com) + * + * @see DataInput */ public interface ObjectInput extends DataInput { + /** + * This method returns the number of bytes that can be read without + * blocking. + * + * @return The number of bytes available before blocking + * + * @exception IOException If an error occurs + */ + int available() throws IOException; ! /** ! * This method reading a byte of data from a stream. It returns that byte ! * as an int. This method blocks if no data is available ! * to be read. ! * ! * @return The byte of data read ! * ! * @exception IOException If an error occurs ! */ ! int read() throws IOException; ! /** ! * This method reads raw bytes and stores them them a byte array buffer. ! * Note that this method will block if no data is available. However, ! * it will not necessarily block until it fills the entire buffer. That is, ! * a "short count" is possible. ! * ! * @param buf The byte array to receive the data read ! * ! * @return The actual number of bytes read or -1 if end of stream ! * ! * @exception IOException If an error occurs ! */ ! int read(byte[] buf) throws IOException; ! /** ! * This method reads raw bytes and stores them in a byte array buffer ! * buf starting at position offset into the ! * buffer. A ! * maximum of len bytes will be read. Note that this method ! * blocks if no data is available, but will not necessarily block until ! * it can read len bytes of data. That is, a "short count" is ! * possible. ! * ! * @param buf The byte array to receive the data read ! * @param offset The offset into buf to start storing data ! * @param len The maximum number of bytes to read ! * ! * @return The actual number of bytes read or -1 if end of stream ! * ! * @exception IOException If an error occurs ! */ ! int read(byte[] buf, int offset, int len) throws IOException; ! /** ! * Reads an object instance and returns it. If the class for the object ! * being read cannot be found, then a ClassNotFoundException ! * will be thrown. ! * ! * @return The object instance that was read ! * ! * @exception ClassNotFoundException If a class for the object cannot be ! * found ! * @exception IOException If any other error occurs ! */ ! Object readObject() ! throws ClassNotFoundException, IOException; ! /** ! * This method causes the specified number of bytes to be read and ! * discarded. It is possible that fewer than the requested number of bytes ! * will actually be skipped. ! * ! * @param numBytes The number of bytes to skip ! * ! * @return The actual number of bytes skipped ! * ! * @exception IOException If an error occurs ! */ ! long skip(long numBytes) throws IOException; + /** + * This method closes the input source + * + * @exception IOException If an error occurs + */ + void close() throws IOException; + } diff -Nrc3pad gcc-3.3.3/libjava/java/io/ObjectInputStream.java gcc-3.4.0/libjava/java/io/ObjectInputStream.java *** gcc-3.3.3/libjava/java/io/ObjectInputStream.java 2003-07-11 20:07:04.000000000 +0000 --- gcc-3.4.0/libjava/java/io/ObjectInputStream.java 2004-01-09 08:58:58.000000000 +0000 *************** package java.io; *** 41,50 **** --- 41,53 ---- import java.lang.reflect.Array; import java.lang.reflect.Modifier; import java.lang.reflect.Proxy; + import java.security.PrivilegedAction; + import java.security.AccessController; import java.util.Arrays; import java.util.Hashtable; import java.util.Vector; + import gnu.java.io.ObjectIdentityWrapper; import gnu.java.lang.reflect.TypeSignature; import java.lang.reflect.Field; *************** public class ObjectInputStream extends I *** 57,76 **** implements ObjectInput, ObjectStreamConstants { /** ! Creates a new ObjectInputStream that will do all of ! its reading from in. This method also checks ! the stream by reading the header information (stream magic number ! and stream version). ! ! @exception IOException Reading stream header from underlying ! stream cannot be completed. ! ! @exception StreamCorruptedException An invalid stream magic ! number or stream version was read from the stream. ! ! @see readStreamHeader () ! */ ! public ObjectInputStream (InputStream in) throws IOException, StreamCorruptedException { if (Configuration.DEBUG) --- 60,79 ---- implements ObjectInput, ObjectStreamConstants { /** ! * Creates a new ObjectInputStream that will do all of ! * its reading from in. This method also checks ! * the stream by reading the header information (stream magic number ! * and stream version). ! * ! * @exception IOException Reading stream header from underlying ! * stream cannot be completed. ! * ! * @exception StreamCorruptedException An invalid stream magic ! * number or stream version was read from the stream. ! * ! * @see #readStreamHeader() ! */ ! public ObjectInputStream(InputStream in) throws IOException, StreamCorruptedException { if (Configuration.DEBUG) *************** public class ObjectInputStream extends I *** 93,127 **** this.blockDataPosition = 0; this.blockDataBytes = 0; this.blockData = new byte[BUFFER_SIZE]; ! this.blockDataInput = new DataInputStream (this); ! this.realInputStream = new DataInputStream (in); this.nextOID = baseWireHandle; ! this.objectLookupTable = new Hashtable (); ! this.validators = new Vector (); ! setBlockDataMode (true); ! readStreamHeader (); } /** ! Returns the next deserialized object read from the underlying stream. ! ! This method can be overriden by a class by implementing ! private void readObject (ObjectInputStream). ! ! If an exception is thrown from this method, the stream is left in ! an undefined state. ! ! @exception ClassNotFoundException The class that an object being ! read in belongs to cannot be found. ! ! @exception IOException Exception from underlying ! InputStream. ! */ ! public final Object readObject () throws ClassNotFoundException, IOException { if (this.useSubclassMethod) ! return readObjectOverride (); boolean was_deserializing; --- 96,131 ---- this.blockDataPosition = 0; this.blockDataBytes = 0; this.blockData = new byte[BUFFER_SIZE]; ! this.blockDataInput = new DataInputStream(this); ! this.realInputStream = new DataInputStream(in); this.nextOID = baseWireHandle; ! this.objectLookupTable = new Hashtable(); ! this.validators = new Vector(); ! this.classLookupTable = new Hashtable(); ! setBlockDataMode(true); ! readStreamHeader(); } /** ! * Returns the next deserialized object read from the underlying stream. ! * ! * This method can be overriden by a class by implementing ! * private void readObject (ObjectInputStream). ! * ! * If an exception is thrown from this method, the stream is left in ! * an undefined state. ! * ! * @exception ClassNotFoundException The class that an object being ! * read in belongs to cannot be found. ! * ! * @exception IOException Exception from underlying ! * InputStream. ! */ ! public final Object readObject() throws ClassNotFoundException, IOException { if (this.useSubclassMethod) ! return readObjectOverride(); boolean was_deserializing; *************** public class ObjectInputStream extends I *** 129,140 **** was_deserializing = this.isDeserializing; boolean is_consumed = false; ! boolean old_mode = setBlockDataMode (false); this.isDeserializing = true; ! byte marker = this.realInputStream.readByte (); ! dumpElement ("MARKER: 0x" + Integer.toHexString(marker) + " "); try { --- 133,144 ---- was_deserializing = this.isDeserializing; boolean is_consumed = false; ! boolean old_mode = setBlockDataMode(false); this.isDeserializing = true; ! byte marker = this.realInputStream.readByte(); ! dumpElement("MARKER: 0x" + Integer.toHexString(marker) + " "); try { *************** public class ObjectInputStream extends I *** 151,193 **** case TC_BLOCKDATALONG: { if (marker == TC_BLOCKDATALONG) ! dumpElementln ("BLOCKDATALONG"); else ! dumpElementln ("BLOCKDATA"); ! readNextBlock (marker); ! throw new StreamCorruptedException ("Unexpected blockData"); } case TC_NULL: { ! dumpElementln ("NULL"); ret_val = null; break; } case TC_REFERENCE: { ! dumpElement ("REFERENCE "); ! Integer oid = new Integer (this.realInputStream.readInt ()); ! dumpElementln (Integer.toHexString(oid.intValue())); ret_val = ((ObjectIdentityWrapper) ! this.objectLookupTable.get (oid)).object; break; } case TC_CLASS: { ! dumpElementln ("CLASS"); ! ObjectStreamClass osc = (ObjectStreamClass)readObject (); ! Class clazz = osc.forClass (); ! assignNewHandle (clazz); ret_val = clazz; break; } case TC_PROXYCLASSDESC: { ! dumpElementln ("PROXYCLASS"); int n_intf = this.realInputStream.readInt(); String[] intfs = new String[n_intf]; for (int i = 0; i < n_intf; i++) --- 155,197 ---- case TC_BLOCKDATALONG: { if (marker == TC_BLOCKDATALONG) ! dumpElementln("BLOCKDATALONG"); else ! dumpElementln("BLOCKDATA"); ! readNextBlock(marker); ! throw new StreamCorruptedException("Unexpected blockData"); } case TC_NULL: { ! dumpElementln("NULL"); ret_val = null; break; } case TC_REFERENCE: { ! dumpElement("REFERENCE "); ! Integer oid = new Integer(this.realInputStream.readInt()); ! dumpElementln(Integer.toHexString(oid.intValue())); ret_val = ((ObjectIdentityWrapper) ! this.objectLookupTable.get(oid)).object; break; } case TC_CLASS: { ! dumpElementln("CLASS"); ! ObjectStreamClass osc = (ObjectStreamClass)readObject(); ! Class clazz = osc.forClass(); ! assignNewHandle(clazz); ret_val = clazz; break; } case TC_PROXYCLASSDESC: { ! dumpElementln("PROXYCLASS"); int n_intf = this.realInputStream.readInt(); String[] intfs = new String[n_intf]; for (int i = 0; i < n_intf; i++) *************** public class ObjectInputStream extends I *** 196,273 **** System.out.println(intfs[i]); } ! boolean oldmode = setBlockDataMode (true); Class cl = resolveProxyClass(intfs); setBlockDataMode(oldmode); ! ObjectStreamClass osc = ObjectStreamClass.lookup(cl); ! assignNewHandle (osc); if (!is_consumed) { ! byte b = this.realInputStream.readByte (); if (b != TC_ENDBLOCKDATA) ! throw new IOException ("Data annotated to class was not consumed." + b); } else is_consumed = false; ! ObjectStreamClass superosc = (ObjectStreamClass)readObject (); ! osc.setSuperclass (superosc); ret_val = osc; break; } case TC_CLASSDESC: { ! dumpElement ("CLASSDESC NAME="); ! String name = this.realInputStream.readUTF (); ! dumpElement (name + "; UID="); ! long uid = this.realInputStream.readLong (); ! dumpElement (Long.toHexString(uid) + "; FLAGS="); ! byte flags = this.realInputStream.readByte (); ! dumpElement (Integer.toHexString(flags) + "; FIELD COUNT="); ! short field_count = this.realInputStream.readShort (); ! dumpElementln (Short.toString(field_count)); ! ObjectStreamField[] fields = new ObjectStreamField[field_count]; ! ObjectStreamClass osc = new ObjectStreamClass (name, uid, ! flags, fields); ! assignNewHandle (osc); ! ! for (int i=0; i < field_count; i++) ! { ! dumpElement (" TYPE CODE="); ! char type_code = (char)this.realInputStream.readByte (); ! dumpElement (type_code + "; FIELD NAME="); ! String field_name = this.realInputStream.readUTF (); ! dumpElementln (field_name); ! String class_name; ! ! if (type_code == 'L' || type_code == '[') ! class_name = (String)readObject (); ! else ! class_name = String.valueOf (type_code); ! ! // There're many cases you can't get java.lang.Class from ! // typename if your context class loader can't load it, ! // then use typename to construct the field ! fields[i] = ! new ObjectStreamField (field_name, class_name); ! } ! ! boolean oldmode = setBlockDataMode (true); ! osc.setClass (resolveClass (osc)); ! setBlockDataMode (oldmode); if (!is_consumed) { ! byte b = this.realInputStream.readByte (); if (b != TC_ENDBLOCKDATA) ! throw new IOException ("Data annotated to class was not consumed." + b); } else is_consumed = false; ! osc.setSuperclass ((ObjectStreamClass)readObject ()); ret_val = osc; break; } --- 200,240 ---- System.out.println(intfs[i]); } ! boolean oldmode = setBlockDataMode(true); Class cl = resolveProxyClass(intfs); setBlockDataMode(oldmode); ! ObjectStreamClass osc = lookupClass(cl); ! assignNewHandle(osc); if (!is_consumed) { ! byte b = this.realInputStream.readByte(); if (b != TC_ENDBLOCKDATA) ! throw new IOException("Data annotated to class was not consumed." + b); } else is_consumed = false; ! ObjectStreamClass superosc = (ObjectStreamClass)readObject(); ! osc.setSuperclass(superosc); ret_val = osc; break; } case TC_CLASSDESC: { ! ObjectStreamClass osc = readClassDescriptor(); if (!is_consumed) { ! byte b = this.realInputStream.readByte(); if (b != TC_ENDBLOCKDATA) ! throw new IOException("Data annotated to class was not consumed." + b); } else is_consumed = false; ! osc.setSuperclass ((ObjectStreamClass)readObject()); ret_val = osc; break; } *************** public class ObjectInputStream extends I *** 275,379 **** case TC_STRING: case TC_LONGSTRING: { ! dumpElement ("STRING="); ! String s = this.realInputStream.readUTF (); ! dumpElementln (s); ! ret_val = processResolution (s, assignNewHandle (s)); break; } case TC_ARRAY: { ! dumpElementln ("ARRAY"); ! ObjectStreamClass osc = (ObjectStreamClass)readObject (); ! Class componentType = osc.forClass ().getComponentType (); ! dumpElement ("ARRAY LENGTH="); ! int length = this.realInputStream.readInt (); dumpElementln (length + "; COMPONENT TYPE=" + componentType); ! Object array = Array.newInstance (componentType, length); ! int handle = assignNewHandle (array); ! readArrayElements (array, componentType); ! for (int i=0, len=Array.getLength(array); i < len; i++) ! dumpElementln (" ELEMENT[" + i + "]=" + Array.get(array, i)); ! ret_val = processResolution (array, handle); break; } case TC_OBJECT: { ! dumpElementln ("OBJECT"); ! ObjectStreamClass osc = (ObjectStreamClass)readObject (); ! Class clazz = osc.forClass (); ! if (!Serializable.class.isAssignableFrom (clazz)) ! throw new NotSerializableException (clazz + " is not Serializable, and thus cannot be deserialized."); ! if (Externalizable.class.isAssignableFrom (clazz)) { Externalizable obj = null; try { ! obj = (Externalizable)clazz.newInstance (); } catch (InstantiationException e) { ! throw new ClassNotFoundException ("Instance of " + clazz ! + " could not be created"); } catch (IllegalAccessException e) { ! throw new ClassNotFoundException ("Instance of " + clazz ! + " could not be created because class or zero-argument constructor is not accessible"); } catch (NoSuchMethodError e) { ! throw new ClassNotFoundException ("Instance of " + clazz ! + " could not be created because zero-argument constructor is not defined"); } ! int handle = assignNewHandle (obj); ! boolean read_from_blocks = ((osc.getFlags () & SC_BLOCK_DATA) != 0); boolean oldmode = this.readDataFromBlock; if (read_from_blocks) ! setBlockDataMode (true); ! obj.readExternal (this); if (read_from_blocks) ! setBlockDataMode (oldmode); ! ret_val = processResolution (obj, handle); break; } // end if (Externalizable.class.isAssignableFrom (clazz)) // find the first non-serializable, non-abstract // class in clazz's inheritance hierarchy ! Class first_nonserial = clazz.getSuperclass (); ! while (Serializable.class.isAssignableFrom (first_nonserial) ! || Modifier.isAbstract (first_nonserial.getModifiers ())) ! first_nonserial = first_nonserial.getSuperclass (); Object obj = null; ! obj = newObject (clazz, first_nonserial); if (obj == null) ! throw new ClassNotFoundException ("Instance of " + clazz + ! " could not be created"); ! int handle = assignNewHandle (obj); this.currentObject = obj; ObjectStreamClass[] hierarchy = ! ObjectStreamClass.getObjectStreamClasses (clazz); ! for (int i=0; i < hierarchy.length; i++) { this.currentObjectStreamClass = hierarchy[i]; ! dumpElementln ("Reading fields of " ! + this.currentObjectStreamClass.getName ()); // XXX: should initialize fields in classes in the hierarchy // that aren't in the stream --- 242,348 ---- case TC_STRING: case TC_LONGSTRING: { ! dumpElement("STRING="); ! String s = this.realInputStream.readUTF(); ! dumpElementln(s); ! ret_val = processResolution(s, assignNewHandle(s)); break; } case TC_ARRAY: { ! dumpElementln("ARRAY"); ! ObjectStreamClass osc = (ObjectStreamClass)readObject(); ! Class componentType = osc.forClass().getComponentType(); ! dumpElement("ARRAY LENGTH="); ! int length = this.realInputStream.readInt(); dumpElementln (length + "; COMPONENT TYPE=" + componentType); ! Object array = Array.newInstance(componentType, length); ! int handle = assignNewHandle(array); ! readArrayElements(array, componentType); ! for (int i = 0, len = Array.getLength(array); i < len; i++) ! dumpElementln(" ELEMENT[" + i + "]=" + Array.get(array, i)); ! ret_val = processResolution(array, handle); break; } case TC_OBJECT: { ! dumpElementln("OBJECT"); ! ObjectStreamClass osc = (ObjectStreamClass)readObject(); ! Class clazz = osc.forClass(); ! if (!Serializable.class.isAssignableFrom(clazz)) ! throw new NotSerializableException ! (clazz + " is not Serializable, and thus cannot be deserialized."); ! if (Externalizable.class.isAssignableFrom(clazz)) { Externalizable obj = null; try { ! obj = (Externalizable)clazz.newInstance(); } catch (InstantiationException e) { ! throw new ClassNotFoundException ! ("Instance of " + clazz + " could not be created"); } catch (IllegalAccessException e) { ! throw new ClassNotFoundException ! ("Instance of " + clazz + " could not be created because class or " ! + "zero-argument constructor is not accessible"); } catch (NoSuchMethodError e) { ! throw new ClassNotFoundException ! ("Instance of " + clazz ! + " could not be created because zero-argument constructor is not defined"); } ! int handle = assignNewHandle(obj); ! boolean read_from_blocks = ((osc.getFlags() & SC_BLOCK_DATA) != 0); boolean oldmode = this.readDataFromBlock; if (read_from_blocks) ! setBlockDataMode(true); ! obj.readExternal(this); if (read_from_blocks) ! setBlockDataMode(oldmode); ! ret_val = processResolution(obj, handle); break; } // end if (Externalizable.class.isAssignableFrom (clazz)) // find the first non-serializable, non-abstract // class in clazz's inheritance hierarchy ! Class first_nonserial = clazz.getSuperclass(); ! while (Serializable.class.isAssignableFrom(first_nonserial) ! || Modifier.isAbstract(first_nonserial.getModifiers())) ! first_nonserial = first_nonserial.getSuperclass(); Object obj = null; ! obj = newObject(clazz, first_nonserial); if (obj == null) ! throw new ClassNotFoundException ! ("Instance of " + clazz + " could not be created"); ! int handle = assignNewHandle(obj); this.currentObject = obj; ObjectStreamClass[] hierarchy = ! inputGetObjectStreamClasses(clazz); ! for (int i = 0; i < hierarchy.length; i++) { this.currentObjectStreamClass = hierarchy[i]; ! dumpElementln("Reading fields of " + this.currentObjectStreamClass.getName ()); // XXX: should initialize fields in classes in the hierarchy // that aren't in the stream *************** public class ObjectInputStream extends I *** 383,450 **** if (this.currentObjectStreamClass.hasReadMethod()) { fieldsAlreadyRead = false; ! boolean oldmode = setBlockDataMode (true); ! callReadMethod (obj, this.currentObjectStreamClass); ! setBlockDataMode (oldmode); ! dumpElement ("ENDBLOCKDATA? "); try { // FIXME: XXX: This try block is to catch EOF which is // thrown for some objects. That indicates a bug in the logic. ! if (this.realInputStream.readByte () != TC_ENDBLOCKDATA) ! throw new IOException ("No end of block data seen for class with readObject (ObjectInputStream) method."); ! dumpElementln ("yes"); } catch (EOFException e) { ! dumpElementln ("no, got EOFException"); } catch (IOException e) { ! dumpElementln ("no, got IOException"); } } else { ! readFields (obj, currentObjectStreamClass); } } this.currentObject = null; this.currentObjectStreamClass = null; ! ret_val = processResolution (obj, handle); break; } case TC_RESET: ! dumpElementln ("RESET"); ! clearHandles (); ! ret_val = readObject (); break; case TC_EXCEPTION: { ! dumpElement ("EXCEPTION="); ! Exception e = (Exception)readObject (); ! dumpElementln (e.toString()); ! clearHandles (); ! throw new WriteAbortedException ("Exception thrown during writing of stream", e); } default: ! throw new IOException ("Unknown marker on stream: " + marker); } } finally { ! setBlockDataMode (old_mode); this.isDeserializing = was_deserializing; if (! was_deserializing) { ! if (validators.size () > 0) ! invokeValidators (); } } --- 352,420 ---- if (this.currentObjectStreamClass.hasReadMethod()) { fieldsAlreadyRead = false; ! boolean oldmode = setBlockDataMode(true); ! callReadMethod(obj, this.currentObjectStreamClass); ! setBlockDataMode(oldmode); ! dumpElement("ENDBLOCKDATA? "); try { // FIXME: XXX: This try block is to catch EOF which is // thrown for some objects. That indicates a bug in the logic. ! if (this.realInputStream.readByte() != TC_ENDBLOCKDATA) ! throw new IOException ! ("No end of block data seen for class with readObject (ObjectInputStream) method."); ! dumpElementln("yes"); } catch (EOFException e) { ! dumpElementln("no, got EOFException"); } catch (IOException e) { ! dumpElementln("no, got IOException"); } } else { ! readFields(obj, currentObjectStreamClass); } } this.currentObject = null; this.currentObjectStreamClass = null; ! ret_val = processResolution(obj, handle); break; } case TC_RESET: ! dumpElementln("RESET"); ! clearHandles(); ! ret_val = readObject(); break; case TC_EXCEPTION: { ! dumpElement("EXCEPTION="); ! Exception e = (Exception)readObject(); ! dumpElementln(e.toString()); ! clearHandles(); ! throw new WriteAbortedException("Exception thrown during writing of stream", e); } default: ! throw new IOException("Unknown marker on stream: " + marker); } } finally { ! setBlockDataMode(old_mode); this.isDeserializing = was_deserializing; if (! was_deserializing) { ! if (validators.size() > 0) ! invokeValidators(); } } *************** public class ObjectInputStream extends I *** 452,486 **** } /** ! Reads the current objects non-transient, non-static fields from ! the current class from the underlying output stream. ! ! This method is intended to be called from within a object's ! private void readObject (ObjectInputStream) ! method. ! @exception ClassNotFoundException The class that an object being ! read in belongs to cannot be found. ! @exception NotActiveException This method was called from a ! context other than from the current object's and current class's ! private void readObject (ObjectInputStream) ! method. ! @exception IOException Exception from underlying ! OutputStream. ! */ ! public void defaultReadObject () throws ClassNotFoundException, IOException, NotActiveException { if (this.currentObject == null || this.currentObjectStreamClass == null) ! throw new NotActiveException ("defaultReadObject called by non-active class and/or object"); if (fieldsAlreadyRead) ! throw new NotActiveException ("defaultReadObject called but fields already read from stream (by defaultReadObject or readFields)"); boolean oldmode = setBlockDataMode(false); ! readFields (this.currentObject, this.currentObjectStreamClass); setBlockDataMode(oldmode); fieldsAlreadyRead = true; --- 422,544 ---- } /** ! * This method reads a class descriptor from the real input stream ! * and use these data to create a new instance of ObjectStreamClass. ! * Fields are sorted and ordered for the real read which occurs for ! * each instance of the described class. Be aware that if you call that ! * method you must ensure that the stream is synchronized, in the other ! * case it may be completely desynchronized. ! * ! * @return A new instance of ObjectStreamClass containing the freshly ! * created descriptor. ! * @throws ClassNotFoundException if the required class to build the ! * descriptor has not been found in the system. ! * @throws IOException An input/output error occured. ! * @throws InvalidClassException If there was a compatibility problem ! * between the class present in the system and the serialized class. ! */ ! protected ObjectStreamClass readClassDescriptor() ! throws ClassNotFoundException, IOException ! { ! dumpElement("CLASSDESC NAME="); ! String name = this.realInputStream.readUTF(); ! dumpElement(name + "; UID="); ! long uid = this.realInputStream.readLong (); ! dumpElement(Long.toHexString(uid) + "; FLAGS="); ! byte flags = this.realInputStream.readByte (); ! dumpElement(Integer.toHexString(flags) + "; FIELD COUNT="); ! short field_count = this.realInputStream.readShort(); ! dumpElementln(Short.toString(field_count)); ! ObjectStreamField[] fields = new ObjectStreamField[field_count]; ! ObjectStreamClass osc = new ObjectStreamClass(name, uid, ! flags, fields); ! assignNewHandle(osc); ! ! for (int i = 0; i < field_count; i++) ! { ! dumpElement(" TYPE CODE="); ! char type_code = (char)this.realInputStream.readByte(); ! dumpElement(type_code + "; FIELD NAME="); ! String field_name = this.realInputStream.readUTF(); ! dumpElementln(field_name); ! String class_name; ! ! // If the type code is an array or an object we must ! // decode a String here. In the other case we convert ! // the type code and pass it to ObjectStreamField. ! // Type codes are decoded by gnu.java.lang.reflect.TypeSignature. ! if (type_code == 'L' || type_code == '[') ! class_name = (String)readObject(); ! else ! class_name = String.valueOf(type_code); ! ! fields[i] = ! new ObjectStreamField(field_name, class_name, currentLoader()); ! } ! ! /* Now that fields have been read we may resolve the class ! * (and read annotation if needed). */ ! Class clazz = resolveClass(osc); ! ! for (int i = 0; i < field_count; i++) ! { ! Field f; ! ! try ! { ! f = clazz.getDeclaredField(fields[i].getName()); ! if (f != null && !f.getType().equals(fields[i].getType())) ! throw new InvalidClassException ! ("invalid field type for " + fields[i].getName() + " in class " ! + name + " (requested was \"" + fields[i].getType() ! + " and found \"" + f.getType() + "\")"); ! } ! catch (NoSuchFieldException _) ! { ! } ! } ! boolean oldmode = setBlockDataMode(true); ! osc.setClass(clazz, lookupClass(clazz.getSuperclass())); ! classLookupTable.put(clazz, osc); ! setBlockDataMode(oldmode); ! return osc; ! } ! /** ! * Reads the current objects non-transient, non-static fields from ! * the current class from the underlying output stream. ! * ! * This method is intended to be called from within a object's ! * private void readObject (ObjectInputStream) ! * method. ! * ! * @exception ClassNotFoundException The class that an object being ! * read in belongs to cannot be found. ! * ! * @exception NotActiveException This method was called from a ! * context other than from the current object's and current class's ! * private void readObject (ObjectInputStream) ! * method. ! * ! * @exception IOException Exception from underlying ! * OutputStream. ! */ ! public void defaultReadObject() throws ClassNotFoundException, IOException, NotActiveException { if (this.currentObject == null || this.currentObjectStreamClass == null) ! throw new NotActiveException("defaultReadObject called by non-active" ! + " class and/or object"); if (fieldsAlreadyRead) ! throw new NotActiveException("defaultReadObject called but fields " ! + "already read from stream (by " ! + "defaultReadObject or readFields)"); boolean oldmode = setBlockDataMode(false); ! readFields(this.currentObject, this.currentObjectStreamClass); setBlockDataMode(oldmode); fieldsAlreadyRead = true; *************** public class ObjectInputStream extends I *** 488,620 **** /** ! Registers a ObjectInputValidation to be carried out ! on the object graph currently being deserialized before it is ! returned to the original caller of readObject (). ! The order of validation for multiple ! ObjectInputValidations can be controled using ! priority. Validators with higher priorities are ! called first. ! ! @see java.io.ObjectInputValidation ! ! @exception InvalidObjectException validator is ! null ! ! @exception NotActiveException an attempt was made to add a ! validator outside of the readObject method of the ! object currently being deserialized ! */ ! public void registerValidation (ObjectInputValidation validator, ! int priority) throws InvalidObjectException, NotActiveException { if (this.currentObject == null || this.currentObjectStreamClass == null) ! throw new NotActiveException ("registerValidation called by non-active class and/or object"); if (validator == null) ! throw new InvalidObjectException ("attempt to add a null ObjectInputValidation object"); ! this.validators.addElement (new ValidatorAndPriority (validator, ! priority)); } /** ! Called when a class is being deserialized. This is a hook to ! allow subclasses to read in information written by the ! annotateClass (Class) method of an ! ObjectOutputStream. ! ! This implementation looks up the active call stack for a ! ClassLoader; if a ClassLoader is found, ! it is used to load the class associated with osc, ! otherwise, the default system ClassLoader is used. ! ! @exception IOException Exception from underlying ! OutputStream. ! ! @see java.io.ObjectOutputStream#annotateClass (java.lang.Class) ! */ ! protected Class resolveClass (ObjectStreamClass osc) throws ClassNotFoundException, IOException { ! SecurityManager sm = System.getSecurityManager (); if (sm == null) sm = new SecurityManager () {}; ! // FIXME: currentClassLoader doesn't yet do anything useful. We need ! // to call forName() with the classloader of the class which called ! // readObject(). See SecurityManager.getClassContext(). ! ClassLoader cl = currentClassLoader (sm); ! if (cl == null) ! return Class.forName (osc.getName ()); else ! return cl.loadClass (osc.getName ()); } /** ! Allows subclasses to resolve objects that are read from the ! stream with other objects to be returned in their place. This ! method is called the first time each object is encountered. ! This method must be enabled before it will be called in the ! serialization process. ! @exception IOException Exception from underlying ! OutputStream. ! @see enableResolveObject (boolean) ! */ ! protected Object resolveObject (Object obj) throws IOException { return obj; } ! protected Class resolveProxyClass (String[] intfs) throws IOException, ClassNotFoundException { ! SecurityManager sm = System.getSecurityManager (); if (sm == null) ! sm = new SecurityManager () {}; ! ClassLoader cl = currentClassLoader (sm); Class[] clss = new Class[intfs.length]; ! if(cl == null){ ! for (int i = 0; i < intfs.length; i++) ! clss[i] = Class.forName(intfs[i]); ! cl = ClassLoader.getSystemClassLoader(); ! } else for (int i = 0; i < intfs.length; i++) clss[i] = cl.loadClass(intfs[i]); ! try { ! return Proxy.getProxyClass(cl, clss); ! } catch (IllegalArgumentException e) { ! throw new ClassNotFoundException(null, e); ! } } /** ! If enable is true and this object is ! trusted, then resolveObject (Object) will be called ! in subsequent calls to readObject (Object). ! Otherwise, resolveObject (Object) will not be called. ! ! @exception SecurityException This class is not trusted. ! */ protected boolean enableResolveObject (boolean enable) throws SecurityException { if (enable) { ! SecurityManager sm = System.getSecurityManager (); if (sm != null) ! sm.checkPermission (new SerializablePermission ("enableSubstitution")); } boolean old_val = this.resolveEnabled; --- 546,749 ---- /** ! * Registers a ObjectInputValidation to be carried out ! * on the object graph currently being deserialized before it is ! * returned to the original caller of readObject (). ! * The order of validation for multiple ! * ObjectInputValidations can be controled using ! * priority. Validators with higher priorities are ! * called first. ! * ! * @see java.io.ObjectInputValidation ! * ! * @exception InvalidObjectException validator is ! * null ! * ! * @exception NotActiveException an attempt was made to add a ! * validator outside of the readObject method of the ! * object currently being deserialized ! */ ! public void registerValidation(ObjectInputValidation validator, ! int priority) throws InvalidObjectException, NotActiveException { if (this.currentObject == null || this.currentObjectStreamClass == null) ! throw new NotActiveException("registerValidation called by non-active " ! + "class and/or object"); if (validator == null) ! throw new InvalidObjectException("attempt to add a null " ! + "ObjectInputValidation object"); ! this.validators.addElement(new ValidatorAndPriority (validator, ! priority)); } /** ! * Called when a class is being deserialized. This is a hook to ! * allow subclasses to read in information written by the ! * annotateClass (Class) method of an ! * ObjectOutputStream. ! * ! * This implementation looks up the active call stack for a ! * ClassLoader; if a ClassLoader is found, ! * it is used to load the class associated with osc, ! * otherwise, the default system ClassLoader is used. ! * ! * @exception IOException Exception from underlying ! * OutputStream. ! * ! * @see java.io.ObjectOutputStream#annotateClass (java.lang.Class) ! */ ! protected Class resolveClass(ObjectStreamClass osc) throws ClassNotFoundException, IOException { ! return Class.forName(osc.getName(), true, currentLoader()); ! } ! ! /** ! * This method invokes the method currentClassLoader for the ! * current security manager (or build an empty one if it is not ! * present). ! * ! * @return The most recent non-system ClassLoader on the execution stack. ! * @see java.lang.SecurityManager#currentClassLoader() ! */ ! private ClassLoader currentLoader() ! { ! SecurityManager sm = System.getSecurityManager(); if (sm == null) sm = new SecurityManager () {}; + + return currentClassLoader(sm); + } ! /** ! * Lookup a class stored in the local hashtable. If it is not ! * use the global lookup function in ObjectStreamClass to build ! * the ObjectStreamClass. This method is requested according to ! * the behaviour detected in the JDK by Kaffe's team. ! * ! * @param clazz Class to lookup in the hash table or for which ! * we must build a descriptor. ! * @return A valid instance of ObjectStreamClass corresponding ! * to the specified class. ! */ ! private ObjectStreamClass lookupClass(Class clazz) ! { ! ObjectStreamClass oclazz; ! oclazz = (ObjectStreamClass)classLookupTable.get(clazz); ! if (oclazz == null) ! return ObjectStreamClass.lookup(clazz); else ! return oclazz; } /** ! * Reconstruct class hierarchy the same way ! * {@link java.io.ObjectStreamClass.getObjectStreamClasses(java.lang.Class)} does ! * but using lookupClass instead of ObjectStreamClass.lookup. This ! * dup is necessary localize the lookup table. Hopefully some future ! * rewritings will be able to prevent this. ! * ! * @param clazz This is the class for which we want the hierarchy. ! * ! * @return An array of valid {@link java.io.ObjectStreamClass} instances which ! * represent the class hierarchy for clazz. ! */ ! private ObjectStreamClass[] inputGetObjectStreamClasses(Class clazz) ! { ! ObjectStreamClass osc = lookupClass(clazz); ! if (osc == null) ! return new ObjectStreamClass[0]; ! else ! { ! Vector oscs = new Vector(); ! while (osc != null) ! { ! oscs.addElement(osc); ! osc = osc.getSuper(); ! } ! int count = oscs.size(); ! ObjectStreamClass[] sorted_oscs = new ObjectStreamClass[count]; ! ! for (int i = count - 1; i >= 0; i--) ! sorted_oscs[count - i - 1] = (ObjectStreamClass) oscs.elementAt(i); ! ! return sorted_oscs; ! } ! } ! ! /** ! * Allows subclasses to resolve objects that are read from the ! * stream with other objects to be returned in their place. This ! * method is called the first time each object is encountered. ! * ! * This method must be enabled before it will be called in the ! * serialization process. ! * ! * @exception IOException Exception from underlying ! * OutputStream. ! * ! * @see #enableResolveObject(boolean) ! */ ! protected Object resolveObject(Object obj) throws IOException { return obj; } ! protected Class resolveProxyClass(String[] intfs) throws IOException, ClassNotFoundException { ! SecurityManager sm = System.getSecurityManager(); if (sm == null) ! sm = new SecurityManager() {}; ! ClassLoader cl = currentClassLoader(sm); Class[] clss = new Class[intfs.length]; ! if(cl == null) ! { ! for (int i = 0; i < intfs.length; i++) ! clss[i] = Class.forName(intfs[i]); ! cl = ClassLoader.getSystemClassLoader(); ! } else for (int i = 0; i < intfs.length; i++) clss[i] = cl.loadClass(intfs[i]); ! try ! { ! return Proxy.getProxyClass(cl, clss); ! } ! catch (IllegalArgumentException e) ! { ! throw new ClassNotFoundException(null, e); ! } } /** ! * If enable is true and this object is ! * trusted, then resolveObject (Object) will be called ! * in subsequent calls to readObject (Object). ! * Otherwise, resolveObject (Object) will not be called. ! * ! * @exception SecurityException This class is not trusted. ! */ protected boolean enableResolveObject (boolean enable) throws SecurityException { if (enable) { ! SecurityManager sm = System.getSecurityManager(); if (sm != null) ! sm.checkPermission(new SerializablePermission("enableSubstitution")); } boolean old_val = this.resolveEnabled; *************** public class ObjectInputStream extends I *** 622,663 **** return old_val; } - /** ! Reads stream magic and stream version information from the ! underlying stream. ! ! @exception IOException Exception from underlying stream. ! ! @exception StreamCorruptedException An invalid stream magic ! number or stream version was read from the stream. ! */ ! protected void readStreamHeader () throws IOException, StreamCorruptedException { ! dumpElement ("STREAM MAGIC "); ! if (this.realInputStream.readShort () != STREAM_MAGIC) ! throw new StreamCorruptedException ("Invalid stream magic number"); ! dumpElementln ("STREAM VERSION "); ! if (this.realInputStream.readShort () != STREAM_VERSION) ! throw new StreamCorruptedException ("Invalid stream version number"); } ! ! public int read () throws IOException { if (this.readDataFromBlock) { if (this.blockDataPosition >= this.blockDataBytes) ! readNextBlock (); return (this.blockData[this.blockDataPosition++] & 0xff); } else ! return this.realInputStream.read (); } ! public int read (byte[] data, int offset, int length) throws IOException { if (this.readDataFromBlock) { --- 751,790 ---- return old_val; } /** ! * Reads stream magic and stream version information from the ! * underlying stream. ! * ! * @exception IOException Exception from underlying stream. ! * ! * @exception StreamCorruptedException An invalid stream magic ! * number or stream version was read from the stream. ! */ ! protected void readStreamHeader() throws IOException, StreamCorruptedException { ! dumpElement("STREAM MAGIC "); ! if (this.realInputStream.readShort() != STREAM_MAGIC) ! throw new StreamCorruptedException("Invalid stream magic number"); ! dumpElementln("STREAM VERSION "); ! if (this.realInputStream.readShort() != STREAM_VERSION) ! throw new StreamCorruptedException("Invalid stream version number"); } ! public int read() throws IOException { if (this.readDataFromBlock) { if (this.blockDataPosition >= this.blockDataBytes) ! readNextBlock(); return (this.blockData[this.blockDataPosition++] & 0xff); } else ! return this.realInputStream.read(); } ! public int read(byte[] data, int offset, int length) throws IOException { if (this.readDataFromBlock) { *************** public class ObjectInputStream extends I *** 666,690 **** int remain = this.blockDataBytes - this.blockDataPosition; if (remain != 0) { ! System.arraycopy (this.blockData, this.blockDataPosition, ! data, offset, remain); offset += remain; length -= remain; } readNextBlock (); } ! System.arraycopy (this.blockData, this.blockDataPosition, ! data, offset, length); this.blockDataPosition += length; return length; } else ! return this.realInputStream.read (data, offset, length); } ! public int available () throws IOException { if (this.readDataFromBlock) { --- 793,817 ---- int remain = this.blockDataBytes - this.blockDataPosition; if (remain != 0) { ! System.arraycopy(this.blockData, this.blockDataPosition, ! data, offset, remain); offset += remain; length -= remain; } readNextBlock (); } ! System.arraycopy(this.blockData, this.blockDataPosition, ! data, offset, length); this.blockDataPosition += length; return length; } else ! return this.realInputStream.read(data, offset, length); } ! public int available() throws IOException { if (this.readDataFromBlock) { *************** public class ObjectInputStream extends I *** 694,837 **** return this.blockDataBytes - this.blockDataPosition; } else ! return this.realInputStream.available (); } ! public void close () throws IOException { ! this.realInputStream.close (); } ! public boolean readBoolean () throws IOException { ! return this.dataInputStream.readBoolean (); } ! public byte readByte () throws IOException { ! return this.dataInputStream.readByte (); } ! public int readUnsignedByte () throws IOException { ! return this.dataInputStream.readUnsignedByte (); } ! public short readShort () throws IOException { ! return this.dataInputStream.readShort (); } ! public int readUnsignedShort () throws IOException { ! return this.dataInputStream.readUnsignedShort (); } ! public char readChar () throws IOException { ! return this.dataInputStream.readChar (); } ! public int readInt () throws IOException { ! return this.dataInputStream.readInt (); } ! public long readLong () throws IOException { ! return this.dataInputStream.readLong (); } ! public float readFloat () throws IOException { ! return this.dataInputStream.readFloat (); } ! public double readDouble () throws IOException { ! return this.dataInputStream.readDouble (); } ! public void readFully (byte data[]) throws IOException { ! this.dataInputStream.readFully (data); } ! public void readFully (byte data[], int offset, int size) throws IOException { ! this.dataInputStream.readFully (data, offset, size); } ! public int skipBytes (int len) throws IOException { ! return this.dataInputStream.skipBytes (len); } /** ! @deprecated ! @see java.io.DataInputStream#readLine () ! */ ! public String readLine () throws IOException { ! return this.dataInputStream.readLine (); } ! public String readUTF () throws IOException { ! return this.dataInputStream.readUTF (); } - /** ! This class allows a class to specify exactly which fields should ! be read, and what values should be read for these fields. ! ! XXX: finish up comments ! */ public static abstract class GetField { ! public abstract ObjectStreamClass getObjectStreamClass (); ! public abstract boolean defaulted (String name) throws IOException, IllegalArgumentException; ! public abstract boolean get (String name, boolean defvalue) throws IOException, IllegalArgumentException; ! public abstract char get (String name, char defvalue) throws IOException, IllegalArgumentException; ! public abstract byte get (String name, byte defvalue) throws IOException, IllegalArgumentException; ! public abstract short get (String name, short defvalue) throws IOException, IllegalArgumentException; ! public abstract int get (String name, int defvalue) throws IOException, IllegalArgumentException; ! public abstract long get (String name, long defvalue) throws IOException, IllegalArgumentException; ! public abstract float get (String name, float defvalue) throws IOException, IllegalArgumentException; ! public abstract double get (String name, double defvalue) throws IOException, IllegalArgumentException; ! public abstract Object get (String name, Object defvalue) throws IOException, IllegalArgumentException; } ! public GetField readFields () throws IOException, ClassNotFoundException, NotActiveException { if (this.currentObject == null || this.currentObjectStreamClass == null) ! throw new NotActiveException ("readFields called by non-active class and/or object"); if (fieldsAlreadyRead) ! throw new NotActiveException ("readFields called but fields already read from stream (by defaultReadObject or readFields)"); final ObjectStreamClass clazz = this.currentObjectStreamClass; final byte[] prim_field_data = new byte[clazz.primFieldSize]; --- 821,1070 ---- return this.blockDataBytes - this.blockDataPosition; } else ! return this.realInputStream.available(); } ! public void close() throws IOException { ! this.realInputStream.close(); } ! public boolean readBoolean() throws IOException { ! boolean switchmode = true; ! boolean oldmode = this.readDataFromBlock; ! if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 1) ! switchmode = false; ! if (switchmode) ! oldmode = setBlockDataMode (true); ! boolean value = this.dataInputStream.readBoolean (); ! if (switchmode) ! setBlockDataMode (oldmode); ! return value; } ! public byte readByte() throws IOException { ! boolean switchmode = true; ! boolean oldmode = this.readDataFromBlock; ! if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 1) ! switchmode = false; ! if (switchmode) ! oldmode = setBlockDataMode(true); ! byte value = this.dataInputStream.readByte(); ! if (switchmode) ! setBlockDataMode(oldmode); ! return value; } ! public int readUnsignedByte() throws IOException { ! boolean switchmode = true; ! boolean oldmode = this.readDataFromBlock; ! if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 1) ! switchmode = false; ! if (switchmode) ! oldmode = setBlockDataMode(true); ! int value = this.dataInputStream.readUnsignedByte(); ! if (switchmode) ! setBlockDataMode(oldmode); ! return value; } ! public short readShort() throws IOException { ! boolean switchmode = true; ! boolean oldmode = this.readDataFromBlock; ! if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 2) ! switchmode = false; ! if (switchmode) ! oldmode = setBlockDataMode(true); ! short value = this.dataInputStream.readShort(); ! if (switchmode) ! setBlockDataMode(oldmode); ! return value; } ! public int readUnsignedShort() throws IOException { ! boolean switchmode = true; ! boolean oldmode = this.readDataFromBlock; ! if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 2) ! switchmode = false; ! if (switchmode) ! oldmode = setBlockDataMode(true); ! int value = this.dataInputStream.readUnsignedShort(); ! if (switchmode) ! setBlockDataMode(oldmode); ! return value; } ! public char readChar() throws IOException { ! boolean switchmode = true; ! boolean oldmode = this.readDataFromBlock; ! if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 2) ! switchmode = false; ! if (switchmode) ! oldmode = setBlockDataMode(true); ! char value = this.dataInputStream.readChar(); ! if (switchmode) ! setBlockDataMode(oldmode); ! return value; } ! public int readInt() throws IOException { ! boolean switchmode = true; ! boolean oldmode = this.readDataFromBlock; ! if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 4) ! switchmode = false; ! if (switchmode) ! oldmode = setBlockDataMode(true); ! int value = this.dataInputStream.readInt(); ! if (switchmode) ! setBlockDataMode(oldmode); ! return value; } ! public long readLong() throws IOException { ! boolean switchmode = true; ! boolean oldmode = this.readDataFromBlock; ! if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 8) ! switchmode = false; ! if (switchmode) ! oldmode = setBlockDataMode(true); ! long value = this.dataInputStream.readLong(); ! if (switchmode) ! setBlockDataMode(oldmode); ! return value; } ! public float readFloat() throws IOException { ! boolean switchmode = true; ! boolean oldmode = this.readDataFromBlock; ! if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 4) ! switchmode = false; ! if (switchmode) ! oldmode = setBlockDataMode(true); ! float value = this.dataInputStream.readFloat(); ! if (switchmode) ! setBlockDataMode(oldmode); ! return value; } ! public double readDouble() throws IOException { ! boolean switchmode = true; ! boolean oldmode = this.readDataFromBlock; ! if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 8) ! switchmode = false; ! if (switchmode) ! oldmode = setBlockDataMode(true); ! double value = this.dataInputStream.readDouble(); ! if (switchmode) ! setBlockDataMode(oldmode); ! return value; } ! public void readFully(byte data[]) throws IOException { ! this.dataInputStream.readFully(data); } ! public void readFully(byte data[], int offset, int size) throws IOException { ! this.dataInputStream.readFully(data, offset, size); } ! public int skipBytes(int len) throws IOException { ! return this.dataInputStream.skipBytes(len); } /** ! * @deprecated ! * @see java.io.DataInputStream#readLine () ! */ ! public String readLine() throws IOException { ! return this.dataInputStream.readLine(); } ! public String readUTF() throws IOException { ! return this.dataInputStream.readUTF(); } /** ! * This class allows a class to specify exactly which fields should ! * be read, and what values should be read for these fields. ! * ! * XXX: finish up comments ! */ public static abstract class GetField { ! public abstract ObjectStreamClass getObjectStreamClass(); ! public abstract boolean defaulted(String name) throws IOException, IllegalArgumentException; ! public abstract boolean get(String name, boolean defvalue) throws IOException, IllegalArgumentException; ! public abstract char get(String name, char defvalue) throws IOException, IllegalArgumentException; ! public abstract byte get(String name, byte defvalue) throws IOException, IllegalArgumentException; ! public abstract short get(String name, short defvalue) throws IOException, IllegalArgumentException; ! public abstract int get(String name, int defvalue) throws IOException, IllegalArgumentException; ! public abstract long get(String name, long defvalue) throws IOException, IllegalArgumentException; ! public abstract float get(String name, float defvalue) throws IOException, IllegalArgumentException; ! public abstract double get(String name, double defvalue) throws IOException, IllegalArgumentException; ! public abstract Object get(String name, Object defvalue) throws IOException, IllegalArgumentException; } ! /** ! * This method should be called by a method called 'readObject' in the ! * deserializing class (if present). It cannot (and should not)be called ! * outside of it. Its goal is to read all fields in the real input stream ! * and keep them accessible through the {@link #GetField} class. Calling ! * this method will not alterate the deserializing object. ! * ! * @return A valid freshly created 'GetField' instance to get access to ! * the deserialized stream. ! * @throws IOException An input/output exception occured. ! * @throws ClassNotFoundException ! * @throws NotActiveException ! */ ! public GetField readFields() throws IOException, ClassNotFoundException, NotActiveException { if (this.currentObject == null || this.currentObjectStreamClass == null) ! throw new NotActiveException("readFields called by non-active class and/or object"); ! ! if (prereadFields != null) ! return prereadFields; if (fieldsAlreadyRead) ! throw new NotActiveException("readFields called but fields already read from" ! + " stream (by defaultReadObject or readFields)"); final ObjectStreamClass clazz = this.currentObjectStreamClass; final byte[] prim_field_data = new byte[clazz.primFieldSize]; *************** public class ObjectInputStream extends I *** 840,923 **** // Apparently Block data is not used with GetField as per // empirical evidence against JDK 1.2. Also see Mauve test // java.io.ObjectInputOutput.Test.GetPutField. ! boolean oldmode = setBlockDataMode (false); ! readFully (prim_field_data); for (int i = 0; i < objs.length; ++ i) ! objs[i] = readObject (); ! setBlockDataMode (oldmode); ! return new GetField () { ! public ObjectStreamClass getObjectStreamClass () { return clazz; } ! public boolean defaulted (String name) throws IOException, IllegalArgumentException { ! return clazz.getField (name) == null; } ! public boolean get (String name, boolean defvalue) throws IOException, IllegalArgumentException { ! ObjectStreamField field = getField (name, Boolean.TYPE); if (field == null) return defvalue; ! return prim_field_data[field.getOffset ()] == 0 ? false : true; } ! public char get (String name, char defvalue) throws IOException, IllegalArgumentException { ! ObjectStreamField field = getField (name, Character.TYPE); if (field == null) return defvalue; ! int off = field.getOffset (); return (char)(((prim_field_data[off++] & 0xFF) << 8) | (prim_field_data[off] & 0xFF)); } ! public byte get (String name, byte defvalue) throws IOException, IllegalArgumentException { ! ObjectStreamField field = getField (name, Byte.TYPE); if (field == null) return defvalue; ! return prim_field_data[field.getOffset ()]; } ! public short get (String name, short defvalue) throws IOException, IllegalArgumentException { ! ObjectStreamField field = getField (name, Short.TYPE); if (field == null) return defvalue; ! int off = field.getOffset (); return (short)(((prim_field_data[off++] & 0xFF) << 8) | (prim_field_data[off] & 0xFF)); } ! public int get (String name, int defvalue) throws IOException, IllegalArgumentException { ! ObjectStreamField field = getField (name, Integer.TYPE); if (field == null) return defvalue; ! int off = field.getOffset (); return ((prim_field_data[off++] & 0xFF) << 24) | ((prim_field_data[off++] & 0xFF) << 16) --- 1073,1180 ---- // Apparently Block data is not used with GetField as per // empirical evidence against JDK 1.2. Also see Mauve test // java.io.ObjectInputOutput.Test.GetPutField. ! boolean oldmode = setBlockDataMode(false); ! readFully(prim_field_data); for (int i = 0; i < objs.length; ++ i) ! objs[i] = readObject(); ! setBlockDataMode(oldmode); ! prereadFields = new GetField() { ! public ObjectStreamClass getObjectStreamClass() { return clazz; } ! public boolean defaulted(String name) throws IOException, IllegalArgumentException { ! ObjectStreamField f = clazz.getField(name); ! ! /* First if we have a serialized field use the descriptor */ ! if (f != null) ! { ! /* It is in serialPersistentFields but setClass tells us ! * it should not be set. This value is defaulted. ! */ ! if (f.isPersistent() && !f.isToSet()) ! return true; ! ! return false; ! } ! ! /* This is not a serialized field. There should be ! * a default value only if the field really exists. ! */ ! try ! { ! return (clazz.forClass().getDeclaredField (name) != null); ! } ! catch (NoSuchFieldException e) ! { ! throw new IllegalArgumentException(e.getMessage()); ! } } ! public boolean get(String name, boolean defvalue) throws IOException, IllegalArgumentException { ! ObjectStreamField field = getField(name, Boolean.TYPE); if (field == null) return defvalue; ! return prim_field_data[field.getOffset()] == 0 ? false : true; } ! public char get(String name, char defvalue) throws IOException, IllegalArgumentException { ! ObjectStreamField field = getField(name, Character.TYPE); if (field == null) return defvalue; ! int off = field.getOffset(); return (char)(((prim_field_data[off++] & 0xFF) << 8) | (prim_field_data[off] & 0xFF)); } ! public byte get(String name, byte defvalue) throws IOException, IllegalArgumentException { ! ObjectStreamField field = getField(name, Byte.TYPE); if (field == null) return defvalue; ! return prim_field_data[field.getOffset()]; } ! public short get(String name, short defvalue) throws IOException, IllegalArgumentException { ! ObjectStreamField field = getField(name, Short.TYPE); if (field == null) return defvalue; ! int off = field.getOffset(); return (short)(((prim_field_data[off++] & 0xFF) << 8) | (prim_field_data[off] & 0xFF)); } ! public int get(String name, int defvalue) throws IOException, IllegalArgumentException { ! ObjectStreamField field = getField(name, Integer.TYPE); if (field == null) return defvalue; ! int off = field.getOffset(); return ((prim_field_data[off++] & 0xFF) << 24) | ((prim_field_data[off++] & 0xFF) << 16) *************** public class ObjectInputStream extends I *** 925,939 **** | (prim_field_data[off] & 0xFF); } ! public long get (String name, long defvalue) throws IOException, IllegalArgumentException { ! ObjectStreamField field = getField (name, Long.TYPE); if (field == null) return defvalue; ! int off = field.getOffset (); return (long)(((prim_field_data[off++] & 0xFF) << 56) | ((prim_field_data[off++] & 0xFF) << 48) --- 1182,1196 ---- | (prim_field_data[off] & 0xFF); } ! public long get(String name, long defvalue) throws IOException, IllegalArgumentException { ! ObjectStreamField field = getField(name, Long.TYPE); if (field == null) return defvalue; ! int off = field.getOffset(); return (long)(((prim_field_data[off++] & 0xFF) << 56) | ((prim_field_data[off++] & 0xFF) << 48) *************** public class ObjectInputStream extends I *** 945,975 **** | (prim_field_data[off] & 0xFF)); } ! public float get (String name, float defvalue) throws IOException, IllegalArgumentException { ! ObjectStreamField field = getField (name, Float.TYPE); if (field == null) return defvalue; ! int off = field.getOffset (); ! return Float.intBitsToFloat (((prim_field_data[off++] & 0xFF) << 24) ! | ((prim_field_data[off++] & 0xFF) << 16) ! | ((prim_field_data[off++] & 0xFF) << 8) ! | (prim_field_data[off] & 0xFF)); } ! public double get (String name, double defvalue) throws IOException, IllegalArgumentException { ! ObjectStreamField field = getField (name, Double.TYPE); if (field == null) return defvalue; ! int off = field.getOffset (); return Double.longBitsToDouble ( (long) (((prim_field_data[off++] & 0xFF) << 56) --- 1202,1232 ---- | (prim_field_data[off] & 0xFF)); } ! public float get(String name, float defvalue) throws IOException, IllegalArgumentException { ! ObjectStreamField field = getField(name, Float.TYPE); if (field == null) return defvalue; ! int off = field.getOffset(); ! return Float.intBitsToFloat(((prim_field_data[off++] & 0xFF) << 24) ! | ((prim_field_data[off++] & 0xFF) << 16) ! | ((prim_field_data[off++] & 0xFF) << 8) ! | (prim_field_data[off] & 0xFF)); } ! public double get(String name, double defvalue) throws IOException, IllegalArgumentException { ! ObjectStreamField field = getField(name, Double.TYPE); if (field == null) return defvalue; ! int off = field.getOffset(); return Double.longBitsToDouble ( (long) (((prim_field_data[off++] & 0xFF) << 56) *************** public class ObjectInputStream extends I *** 982,1071 **** | (prim_field_data[off] & 0xFF))); } ! public Object get (String name, Object defvalue) throws IOException, IllegalArgumentException { ObjectStreamField field = ! getField (name, defvalue == null ? null : defvalue.getClass ()); if (field == null) return defvalue; ! return objs[field.getOffset ()]; } ! private ObjectStreamField getField (String name, Class type) throws IllegalArgumentException { ! ObjectStreamField field = clazz.getField (name); ! ! if (field == null) ! return null; ! ! Class field_type = field.getType (); ! if (type == field_type || ! (type == null && ! field_type.isPrimitive ())) ! return field; ! throw new IllegalArgumentException ("Field requested is of type " ! + field_type.getName () ! + ", but requested type was " ! + (type == null ? ! "Object" : type.getName ())); } }; } - /** ! Protected constructor that allows subclasses to override ! deserialization. This constructor should be called by subclasses ! that wish to override readObject (Object). This ! method does a security check NOTE: currently not ! implemented, then sets a flag that informs ! readObject (Object) to call the subclasses ! readObjectOverride (Object) method. ! ! @see readObjectOverride (Object) ! */ ! protected ObjectInputStream () throws IOException, SecurityException { ! SecurityManager sec_man = System.getSecurityManager (); if (sec_man != null) ! sec_man.checkPermission (SUBCLASS_IMPLEMENTATION_PERMISSION); this.useSubclassMethod = true; } - /** ! This method allows subclasses to override the default ! de serialization mechanism provided by ! ObjectInputStream. To make this method be used for ! writing objects, subclasses must invoke the 0-argument ! constructor on this class from their constructor. ! ! @see ObjectInputStream () ! */ ! protected Object readObjectOverride () throws ClassNotFoundException, IOException, OptionalDataException { ! throw new IOException ("Subclass of ObjectInputStream must implement readObjectOverride"); } ! ! // assigns the next availible handle to OBJ ! private int assignNewHandle (Object obj) { ! this.objectLookupTable.put (new Integer (this.nextOID), ! new ObjectIdentityWrapper (obj)); return this.nextOID++; } ! ! private Object processResolution (Object obj, int handle) throws IOException { if (obj instanceof Serializable) --- 1239,1381 ---- | (prim_field_data[off] & 0xFF))); } ! public Object get(String name, Object defvalue) throws IOException, IllegalArgumentException { ObjectStreamField field = ! getField(name, defvalue == null ? null : defvalue.getClass ()); if (field == null) return defvalue; ! return objs[field.getOffset()]; } ! private ObjectStreamField getField(String name, Class type) throws IllegalArgumentException { ! ObjectStreamField field = clazz.getField(name); ! boolean illegal = false; ! try ! { ! try ! { ! Class field_type = field.getType(); ! ! if (type == field_type || ! (type == null && !field_type.isPrimitive())) ! { ! /* See defaulted */ ! return field; ! } ! ! illegal = true; ! throw new IllegalArgumentException ! ("Field requested is of type " ! + field_type.getName() ! + ", but requested type was " ! + (type == null ? "Object" : type.getName())); ! } ! catch (NullPointerException _) ! { ! /* Here we catch NullPointerException, because it may ! only come from the call 'field.getType()'. If field ! is null, we have to return null and classpath ethic ! say we must try to avoid 'if (xxx == null)'. ! */ ! } ! catch (IllegalArgumentException e) ! { ! throw e; ! } ! ! return null; ! } ! finally ! { ! /* If this is an unassigned field we should return ! * the default value. ! */ ! if (!illegal && field != null && !field.isToSet() && field.isPersistent()) ! return null; ! /* We do not want to modify transient fields. They should ! * be left to 0. ! */ ! try ! { ! Field f = clazz.forClass().getDeclaredField(name); ! if (Modifier.isTransient(f.getModifiers())) ! throw new IllegalArgumentException ! ("no such field (non transient) " + name); ! if (field == null && f.getType() != type) ! throw new IllegalArgumentException ! ("Invalid requested type for field " + name); ! } ! catch (NoSuchFieldException e) ! { ! if (field == null) ! throw new IllegalArgumentException(e.getMessage()); ! } ! ! } } }; + fieldsAlreadyRead = true; + return prereadFields; } /** ! * Protected constructor that allows subclasses to override ! * deserialization. This constructor should be called by subclasses ! * that wish to override readObject (Object). This ! * method does a security check NOTE: currently not ! * implemented, then sets a flag that informs ! * readObject (Object) to call the subclasses ! * readObjectOverride (Object) method. ! * ! * @see #readObjectOverride() ! */ ! protected ObjectInputStream() throws IOException, SecurityException { ! SecurityManager sec_man = System.getSecurityManager(); if (sec_man != null) ! sec_man.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION); this.useSubclassMethod = true; } /** ! * This method allows subclasses to override the default ! * de serialization mechanism provided by ! * ObjectInputStream. To make this method be used for ! * writing objects, subclasses must invoke the 0-argument ! * constructor on this class from their constructor. ! * ! * @see #ObjectInputStream() ! */ ! protected Object readObjectOverride() throws ClassNotFoundException, IOException, OptionalDataException { ! throw new IOException("Subclass of ObjectInputStream must implement readObjectOverride"); } ! /** ! * Assigns the next available handle to obj. ! * ! * @param obj The object for which we want a new handle. ! * @return A valid handle for the specified object. ! */ ! private int assignNewHandle(Object obj) { ! this.objectLookupTable.put(new Integer(this.nextOID), ! new ObjectIdentityWrapper(obj)); return this.nextOID++; } ! private Object processResolution(Object obj, int handle) throws IOException { if (obj instanceof Serializable) *************** public class ObjectInputStream extends I *** 1074,1083 **** try { Class classArgs[] = {}; ! m = obj.getClass ().getDeclaredMethod ("readResolve", classArgs); ! // m can't be null by definition since an exception would ! // have been thrown so a check for null is not needed. ! obj = m.invoke (obj, new Object[] {}); } catch (NoSuchMethodException ignore) { --- 1384,1391 ---- try { Class classArgs[] = {}; ! m = getMethod(obj.getClass(), "readResolve", classArgs); ! obj = m.invoke(obj, new Object[] {}); } catch (NoSuchMethodException ignore) { *************** public class ObjectInputStream extends I *** 1091,1135 **** } if (this.resolveEnabled) ! obj = resolveObject (obj); ! this.objectLookupTable.put (new Integer (handle), ! new ObjectIdentityWrapper (obj)); return obj; } ! ! private void clearHandles () { ! this.objectLookupTable.clear (); this.nextOID = baseWireHandle; } ! ! private void readNextBlock () throws IOException { ! readNextBlock (this.realInputStream.readByte ()); } ! ! private void readNextBlock (byte marker) throws IOException { if (marker == TC_BLOCKDATA) { ! dumpElement ("BLOCK DATA SIZE="); ! this.blockDataBytes = this.realInputStream.readUnsignedByte (); dumpElementln (Integer.toString(this.blockDataBytes)); } else if (marker == TC_BLOCKDATALONG) { ! dumpElement ("BLOCK DATA LONG SIZE="); ! this.blockDataBytes = this.realInputStream.readInt (); dumpElementln (Integer.toString(this.blockDataBytes)); } else { ! throw new EOFException ("Attempt to read primitive data, but no data block is active."); } if (this.blockData.length < this.blockDataBytes) --- 1399,1440 ---- } if (this.resolveEnabled) ! obj = resolveObject(obj); ! this.objectLookupTable.put(new Integer(handle), ! new ObjectIdentityWrapper(obj)); return obj; } ! private void clearHandles() { ! this.objectLookupTable.clear(); this.nextOID = baseWireHandle; } ! private void readNextBlock() throws IOException { ! readNextBlock(this.realInputStream.readByte()); } ! private void readNextBlock(byte marker) throws IOException { if (marker == TC_BLOCKDATA) { ! dumpElement("BLOCK DATA SIZE="); ! this.blockDataBytes = this.realInputStream.readUnsignedByte(); dumpElementln (Integer.toString(this.blockDataBytes)); } else if (marker == TC_BLOCKDATALONG) { ! dumpElement("BLOCK DATA LONG SIZE="); ! this.blockDataBytes = this.realInputStream.readInt(); dumpElementln (Integer.toString(this.blockDataBytes)); } else { ! throw new EOFException("Attempt to read primitive data, but no data block is active."); } if (this.blockData.length < this.blockDataBytes) *************** public class ObjectInputStream extends I *** 1139,1204 **** this.blockDataPosition = 0; } - private void readArrayElements (Object array, Class clazz) throws ClassNotFoundException, IOException { ! if (clazz.isPrimitive ()) { if (clazz == Boolean.TYPE) { boolean[] cast_array = (boolean[])array; for (int i=0; i < cast_array.length; i++) ! cast_array[i] = this.realInputStream.readBoolean (); return; } if (clazz == Byte.TYPE) { byte[] cast_array = (byte[])array; for (int i=0; i < cast_array.length; i++) ! cast_array[i] = this.realInputStream.readByte (); return; } if (clazz == Character.TYPE) { char[] cast_array = (char[])array; for (int i=0; i < cast_array.length; i++) ! cast_array[i] = this.realInputStream.readChar (); return; } if (clazz == Double.TYPE) { double[] cast_array = (double[])array; for (int i=0; i < cast_array.length; i++) ! cast_array[i] = this.realInputStream.readDouble (); return; } if (clazz == Float.TYPE) { float[] cast_array = (float[])array; for (int i=0; i < cast_array.length; i++) ! cast_array[i] = this.realInputStream.readFloat (); return; } if (clazz == Integer.TYPE) { int[] cast_array = (int[])array; for (int i=0; i < cast_array.length; i++) ! cast_array[i] = this.realInputStream.readInt (); return; } if (clazz == Long.TYPE) { long[] cast_array = (long[])array; for (int i=0; i < cast_array.length; i++) ! cast_array[i] = this.realInputStream.readLong (); return; } if (clazz == Short.TYPE) { short[] cast_array = (short[])array; for (int i=0; i < cast_array.length; i++) ! cast_array[i] = this.realInputStream.readShort (); return; } } --- 1444,1508 ---- this.blockDataPosition = 0; } private void readArrayElements (Object array, Class clazz) throws ClassNotFoundException, IOException { ! if (clazz.isPrimitive()) { if (clazz == Boolean.TYPE) { boolean[] cast_array = (boolean[])array; for (int i=0; i < cast_array.length; i++) ! cast_array[i] = this.realInputStream.readBoolean(); return; } if (clazz == Byte.TYPE) { byte[] cast_array = (byte[])array; for (int i=0; i < cast_array.length; i++) ! cast_array[i] = this.realInputStream.readByte(); return; } if (clazz == Character.TYPE) { char[] cast_array = (char[])array; for (int i=0; i < cast_array.length; i++) ! cast_array[i] = this.realInputStream.readChar(); return; } if (clazz == Double.TYPE) { double[] cast_array = (double[])array; for (int i=0; i < cast_array.length; i++) ! cast_array[i] = this.realInputStream.readDouble(); return; } if (clazz == Float.TYPE) { float[] cast_array = (float[])array; for (int i=0; i < cast_array.length; i++) ! cast_array[i] = this.realInputStream.readFloat(); return; } if (clazz == Integer.TYPE) { int[] cast_array = (int[])array; for (int i=0; i < cast_array.length; i++) ! cast_array[i] = this.realInputStream.readInt(); return; } if (clazz == Long.TYPE) { long[] cast_array = (long[])array; for (int i=0; i < cast_array.length; i++) ! cast_array[i] = this.realInputStream.readLong(); return; } if (clazz == Short.TYPE) { short[] cast_array = (short[])array; for (int i=0; i < cast_array.length; i++) ! cast_array[i] = this.realInputStream.readShort(); return; } } *************** public class ObjectInputStream extends I *** 1206,1222 **** { Object[] cast_array = (Object[])array; for (int i=0; i < cast_array.length; i++) ! cast_array[i] = readObject (); } } - private void readFields (Object obj, ObjectStreamClass stream_osc) throws ClassNotFoundException, IOException { ObjectStreamField[] stream_fields = stream_osc.fields; ObjectStreamField[] real_fields = ! ObjectStreamClass.lookup (stream_osc.forClass ()).fields; boolean default_initialize, set_value; String field_name = null; --- 1510,1525 ---- { Object[] cast_array = (Object[])array; for (int i=0; i < cast_array.length; i++) ! cast_array[i] = readObject(); } } private void readFields (Object obj, ObjectStreamClass stream_osc) throws ClassNotFoundException, IOException { ObjectStreamField[] stream_fields = stream_osc.fields; ObjectStreamField[] real_fields = ! lookupClass(stream_osc.forClass()).fields; boolean default_initialize, set_value; String field_name = null; *************** public class ObjectInputStream extends I *** 1237,1243 **** else { stream_field = stream_fields[stream_idx]; ! type = stream_field.getType (); } if (real_idx == real_fields.length) --- 1540,1546 ---- else { stream_field = stream_fields[stream_idx]; ! type = stream_field.getType(); } if (real_idx == real_fields.length) *************** public class ObjectInputStream extends I *** 1245,1252 **** else { real_field = real_fields[real_idx]; ! type = real_field.getType (); ! field_name = real_field.getName (); } if (set_value && !default_initialize) --- 1548,1555 ---- else { real_field = real_fields[real_idx]; ! type = real_field.getType(); ! field_name = real_field.getName(); } if (set_value && !default_initialize) *************** public class ObjectInputStream extends I *** 1271,1357 **** } } try { if (type == Boolean.TYPE) { boolean value = ! default_initialize ? false : this.realInputStream.readBoolean (); if (!default_initialize && set_value) ! dumpElementln (" " + field_name + ": " + value); if (set_value) ! setBooleanField (obj, stream_osc.forClass (), field_name, value); } else if (type == Byte.TYPE) { byte value = ! default_initialize ? 0 : this.realInputStream.readByte (); if (!default_initialize && set_value) ! dumpElementln (" " + field_name + ": " + value); if (set_value) ! setByteField (obj, stream_osc.forClass (), field_name, value); } else if (type == Character.TYPE) { char value = ! default_initialize ? (char)0 : this.realInputStream.readChar (); if (!default_initialize && set_value) ! dumpElementln (" " + field_name + ": " + value); if (set_value) ! setCharField (obj, stream_osc.forClass (), field_name, value); } else if (type == Double.TYPE) { double value = ! default_initialize ? 0 : this.realInputStream.readDouble (); if (!default_initialize && set_value) ! dumpElementln (" " + field_name + ": " + value); if (set_value) ! setDoubleField (obj, stream_osc.forClass (), field_name, value); } else if (type == Float.TYPE) { float value = ! default_initialize ? 0 : this.realInputStream.readFloat (); if (!default_initialize && set_value) ! dumpElementln (" " + field_name + ": " + value); if (set_value) ! setFloatField (obj, stream_osc.forClass (), field_name, value); } else if (type == Integer.TYPE) { int value = ! default_initialize ? 0 : this.realInputStream.readInt (); if (!default_initialize && set_value) ! dumpElementln (" " + field_name + ": " + value); if (set_value) ! setIntField (obj, stream_osc.forClass (), field_name, value); } else if (type == Long.TYPE) { long value = ! default_initialize ? 0 : this.realInputStream.readLong (); if (!default_initialize && set_value) ! dumpElementln (" " + field_name + ": " + value); if (set_value) ! setLongField (obj, stream_osc.forClass (), field_name, value); } else if (type == Short.TYPE) { short value = ! default_initialize ? (short)0 : this.realInputStream.readShort (); if (!default_initialize && set_value) ! dumpElementln (" " + field_name + ": " + value); if (set_value) ! setShortField (obj, stream_osc.forClass (), field_name, value); } else { Object value = ! default_initialize ? null : readObject (); if (set_value) ! setObjectField (obj, stream_osc.forClass (), field_name, ! real_field.getTypeString (), value); } } catch (NoSuchFieldError e) --- 1574,1669 ---- } } + if (stream_field.getOffset() < 0) + { + default_initialize = true; + set_value = false; + } + + if (!stream_field.isToSet()) + set_value = false; + try { if (type == Boolean.TYPE) { boolean value = ! default_initialize ? false : this.realInputStream.readBoolean(); if (!default_initialize && set_value) ! dumpElementln(" " + field_name + ": " + value); if (set_value) ! setBooleanField(obj, stream_osc.forClass(), field_name, value); } else if (type == Byte.TYPE) { byte value = ! default_initialize ? 0 : this.realInputStream.readByte(); if (!default_initialize && set_value) ! dumpElementln(" " + field_name + ": " + value); if (set_value) ! setByteField(obj, stream_osc.forClass(), field_name, value); } else if (type == Character.TYPE) { char value = ! default_initialize ? (char)0 : this.realInputStream.readChar(); if (!default_initialize && set_value) ! dumpElementln(" " + field_name + ": " + value); if (set_value) ! setCharField(obj, stream_osc.forClass(), field_name, value); } else if (type == Double.TYPE) { double value = ! default_initialize ? 0 : this.realInputStream.readDouble(); if (!default_initialize && set_value) ! dumpElementln(" " + field_name + ": " + value); if (set_value) ! setDoubleField(obj, stream_osc.forClass(), field_name, value); } else if (type == Float.TYPE) { float value = ! default_initialize ? 0 : this.realInputStream.readFloat(); if (!default_initialize && set_value) ! dumpElementln(" " + field_name + ": " + value); if (set_value) ! setFloatField(obj, stream_osc.forClass(), field_name, value); } else if (type == Integer.TYPE) { int value = ! default_initialize ? 0 : this.realInputStream.readInt(); if (!default_initialize && set_value) ! dumpElementln(" " + field_name + ": " + value); if (set_value) ! setIntField(obj, stream_osc.forClass(), field_name, value); } else if (type == Long.TYPE) { long value = ! default_initialize ? 0 : this.realInputStream.readLong(); if (!default_initialize && set_value) ! dumpElementln(" " + field_name + ": " + value); if (set_value) ! setLongField(obj, stream_osc.forClass(), field_name, value); } else if (type == Short.TYPE) { short value = ! default_initialize ? (short)0 : this.realInputStream.readShort(); if (!default_initialize && set_value) ! dumpElementln(" " + field_name + ": " + value); if (set_value) ! setShortField(obj, stream_osc.forClass(), field_name, value); } else { Object value = ! default_initialize ? null : readObject(); if (set_value) ! setObjectField(obj, stream_osc.forClass(), field_name, ! real_field.getTypeString(), value); } } catch (NoSuchFieldError e) *************** public class ObjectInputStream extends I *** 1374,1380 **** return oldmode; } - // returns a new instance of REAL_CLASS that has been constructed // only to the level of CONSTRUCTOR_CLASS (a super class of REAL_CLASS) private Object newObject (Class real_class, Class constructor_class) --- 1686,1691 ---- *************** public class ObjectInputStream extends I *** 1391,1435 **** } } - // runs all registered ObjectInputValidations in prioritized order // on OBJ ! private void invokeValidators () throws InvalidObjectException { ! Object[] validators = new Object[this.validators.size ()]; this.validators.copyInto (validators); Arrays.sort (validators); try { for (int i=0; i < validators.length; i++) ! ((ObjectInputValidation)validators[i]).validateObject (); } finally { ! this.validators.removeAllElements (); } } ! ! // this native method is used to get access to the protected method ! // of the same name in SecurityManger private static ClassLoader currentClassLoader (SecurityManager sm) { // FIXME: This is too simple. return ClassLoader.getSystemClassLoader (); } ! private static Field getField (Class klass, String name) throws java.lang.NoSuchFieldException { ! return klass.getDeclaredField(name); } private static Method getMethod (Class klass, String name, Class args[]) throws java.lang.NoSuchMethodException { ! return klass.getDeclaredMethod(name, args); } private void callReadMethod (Object obj, ObjectStreamClass osc) throws IOException --- 1702,1789 ---- } } // runs all registered ObjectInputValidations in prioritized order // on OBJ ! private void invokeValidators() throws InvalidObjectException { ! Object[] validators = new Object[this.validators.size()]; this.validators.copyInto (validators); Arrays.sort (validators); try { for (int i=0; i < validators.length; i++) ! ((ObjectInputValidation)validators[i]).validateObject(); } finally { ! this.validators.removeAllElements(); } } ! /** ! * This native method is used to get access to the protected method ! * of the same name in SecurityManger. ! * ! * @param sm SecurityManager instance which should be called. ! * @return The current class loader in the calling stack. ! */ private static ClassLoader currentClassLoader (SecurityManager sm) { // FIXME: This is too simple. return ClassLoader.getSystemClassLoader (); } ! /** ! * This method tries to access a precise field called in the ! * specified class. Before accessing the field, it tries to ! * gain control on this field. If the field is either declared as ! * not persistent or transient then it returns null ! * immediately. ! * ! * @param klass Class to get the field from. ! * @param name Name of the field to access. ! * @return Field instance representing the requested field. ! * @throws NoSuchFieldException if the field does not exist. ! */ ! private Field getField(Class klass, String name) throws java.lang.NoSuchFieldException { ! final Field f = klass.getDeclaredField(name); ! ObjectStreamField sf = lookupClass(klass).getField(name); ! ! AccessController.doPrivileged(new PrivilegedAction() ! { ! public Object run() ! { ! f.setAccessible(true); ! return null; ! } ! }); ! ! /* We do not want to modify transient fields. They should ! * be left to 0. ! * N.B.: Not valid if the field is in serialPersistentFields. ! */ ! if (Modifier.isTransient(f.getModifiers()) && !sf.isPersistent()) ! return null; ! ! return f; } private static Method getMethod (Class klass, String name, Class args[]) throws java.lang.NoSuchMethodException { ! final Method m = klass.getDeclaredMethod(name, args); ! AccessController.doPrivileged(new PrivilegedAction() ! { ! public Object run() ! { ! m.setAccessible(true); ! return null; ! } ! }); ! return m; } private void callReadMethod (Object obj, ObjectStreamClass osc) throws IOException *************** public class ObjectInputStream extends I *** 1439,1448 **** { Class classArgs[] = {ObjectInputStream.class}; Method m = getMethod (klass, "readObject", classArgs); - if (m == null) - return; Object args[] = {this}; ! m.invoke (obj, args); } catch (InvocationTargetException x) { --- 1793,1804 ---- { Class classArgs[] = {ObjectInputStream.class}; Method m = getMethod (klass, "readObject", classArgs); Object args[] = {this}; ! m.invoke(obj, args); ! } ! catch (NoSuchMethodException nsme) ! { ! // Nothing. } catch (InvocationTargetException x) { *************** public class ObjectInputStream extends I *** 1453,1466 **** if (exception instanceof IOException) throw (IOException) exception; ! throw new IOException ("Exception thrown from readObject() on " + klass + ": " + exception.getClass().getName()); } catch (Exception x) { ! throw new IOException ("Failure invoking readObject() on " + klass + ": " + x.getClass().getName()); } } private native Object allocateObject (Class clazz) --- 1809,1825 ---- if (exception instanceof IOException) throw (IOException) exception; ! throw new IOException("Exception thrown from readObject() on " + klass + ": " + exception.getClass().getName()); } catch (Exception x) { ! throw new IOException("Failure invoking readObject() on " + klass + ": " + x.getClass().getName()); } + + // Invalidate fields which has been read through readFields. + prereadFields = null; } private native Object allocateObject (Class clazz) *************** public class ObjectInputStream extends I *** 1468,1601 **** private native void callConstructor (Class clazz, Object obj); ! private void setBooleanField (Object obj, Class klass, String field_name, ! boolean val) { try { ! Field f = getField (klass, field_name); ! f.setAccessible(true); ! f.setBoolean (obj, val); } catch (Exception _) { } } ! private void setByteField (Object obj, Class klass, String field_name, ! byte val) { try { ! Field f = getField (klass, field_name); ! f.setAccessible(true); ! f.setByte (obj, val); } catch (Exception _) { } } ! private void setCharField (Object obj, Class klass, String field_name, ! char val) { try { ! Field f = getField (klass, field_name); ! f.setAccessible(true); ! f.setChar (obj, val); } catch (Exception _) { } } ! private void setDoubleField (Object obj, Class klass, String field_name, ! double val) { try { ! Field f = getField (klass, field_name); ! f.setAccessible(true); ! f.setDouble (obj, val); } catch (Exception _) { } } ! private void setFloatField (Object obj, Class klass, String field_name, ! float val) { try { ! Field f = getField (klass, field_name); ! f.setAccessible(true); ! f.setFloat (obj, val); } catch (Exception _) { } } ! private void setIntField (Object obj, Class klass, String field_name, ! int val) { try { ! Field f = getField (klass, field_name); ! f.setAccessible(true); ! f.setInt (obj, val); } catch (Exception _) { } } ! ! private void setLongField (Object obj, Class klass, String field_name, ! long val) { try { ! Field f = getField (klass, field_name); ! f.setAccessible(true); ! f.setLong (obj, val); } catch (Exception _) { } } ! ! private void setShortField (Object obj, Class klass, String field_name, ! short val) { try { ! Field f = getField (klass, field_name); ! f.setAccessible(true); ! f.setShort (obj, val); } catch (Exception _) { } } ! ! private void setObjectField (Object obj, Class klass, String field_name, String type_code, ! Object val) { try { ! Field f = getField (klass, field_name); ! f.setAccessible(true); ! // FIXME: We should check the type_code here ! f.set (obj, val); } catch (Exception _) { ! } } private static final int BUFFER_SIZE = 1024; --- 1827,2087 ---- private native void callConstructor (Class clazz, Object obj); ! /** ! * This method writes a "boolean" value val in the specified field ! * of the instance obj of the type klass. ! * ! * @param obj Instance to setup. ! * @param klass Class type of the specified instance. ! * @param field_name Name of the field in the specified class type. ! * @param val The boolean value to write into the field. ! * @throws InvalidClassException if the specified field has not the required type. ! * @throws IOException if there is no field of that name in the specified class. ! */ ! private void setBooleanField(Object obj, Class klass, String field_name, ! boolean val) throws IOException, InvalidClassException { try { ! Field f = getField(klass, field_name); ! f.setBoolean(obj, val); ! } ! catch (IllegalArgumentException _) ! { ! throw new InvalidClassException("incompatible field type for " + klass.getName() + "." + field_name); } catch (Exception _) { } } ! /** ! * This method writes a "byte" value val in the specified field ! * of the instance obj of the type klass. ! * ! * @param obj Instance to setup. ! * @param klass Class type of the specified instance. ! * @param field_name Name of the field in the specified class type. ! * @param val The byte value to write into the field. ! * @throws InvalidClassException if the specified field has not the required type. ! * @throws IOException if there is no field of that name in the specified class. ! */ ! private void setByteField(Object obj, Class klass, String field_name, ! byte val) throws IOException, InvalidClassException { try { ! Field f = getField(klass, field_name); ! f.setByte(obj, val); ! } ! catch (IllegalArgumentException _) ! { ! throw new InvalidClassException("incompatible field type for " + klass.getName() + "." + field_name); } catch (Exception _) { } } ! /** ! * This method writes a "character" value val in the specified field ! * of the instance obj of the type klass. ! * ! * @param obj Instance to setup. ! * @param klass Class type of the specified instance. ! * @param field_name Name of the field in the specified class type. ! * @param val The character value to write into the field. ! * @throws InvalidClassException if the specified field has not the required type. ! * @throws IOException if there is no field of that name in the specified class. ! */ ! private void setCharField(Object obj, Class klass, String field_name, ! char val) throws IOException, InvalidClassException { try { ! Field f = getField(klass, field_name); ! f.setChar(obj, val); ! } ! catch (IllegalArgumentException _) ! { ! throw new InvalidClassException("incompatible field type for " + klass.getName() + "." + field_name); } catch (Exception _) { } } ! /** ! * This method writes a "double" value val in the specified field ! * of the instance obj of the type klass. ! * ! * @param obj Instance to setup. ! * @param klass Class type of the specified instance. ! * @param field_name Name of the field in the specified class type. ! * @param val The double value to write into the field. ! * @throws InvalidClassException if the specified field has not the required type. ! * @throws IOException if there is no field of that name in the specified class. ! */ ! private void setDoubleField(Object obj, Class klass, String field_name, ! double val) throws IOException, InvalidClassException { try { ! Field f = getField(klass, field_name); ! f.setDouble(obj, val); ! } ! catch (IllegalArgumentException _) ! { ! throw new InvalidClassException("incompatible field type for " + klass.getName() + "." + field_name); } catch (Exception _) { } } ! /** ! * This method writes a "float" value val in the specified field ! * of the instance obj of the type klass. ! * ! * @param obj Instance to setup. ! * @param klass Class type of the specified instance. ! * @param field_name Name of the field in the specified class type. ! * @param val The float value to write into the field. ! * @throws InvalidClassException if the specified field has not the required type. ! * @throws IOException if there is no field of that name in the specified class. ! */ ! private void setFloatField(Object obj, Class klass, String field_name, ! float val) throws IOException, InvalidClassException { try { ! Field f = getField(klass, field_name); ! f.setFloat(obj, val); ! } ! catch (IllegalArgumentException _) ! { ! throw new InvalidClassException("incompatible field type for " + klass.getName() + "." + field_name); } catch (Exception _) { } } ! /** ! * This method writes an "integer" value val in the specified field ! * of the instance obj of the type klass. ! * ! * @param obj Instance to setup. ! * @param klass Class type of the specified instance. ! * @param field_name Name of the field in the specified class type. ! * @param val The integer value to write into the field. ! * @throws InvalidClassException if the specified field has not the required type. ! * @throws IOException if there is no field of that name in the specified class. ! */ ! private void setIntField(Object obj, Class klass, String field_name, ! int val) throws IOException, InvalidClassException { try { ! Field f = getField(klass, field_name); ! f.setInt(obj, val); ! } ! catch (IllegalArgumentException _) ! { ! throw new InvalidClassException("incompatible field type for " + klass.getName() + "." + field_name); } catch (Exception _) { } } ! /** ! * This method writes the long value val in the specified field ! * of the instance obj of the type klass. ! * ! * @param obj Instance to setup. ! * @param klass Class type of the specified instance. ! * @param field_name Name of the field in the specified class type. ! * @param val The long value to write into the field. ! * @throws InvalidClassException if the specified field has not the required type. ! * @throws IOException if there is no field of that name in the specified class. ! */ ! private void setLongField(Object obj, Class klass, String field_name, ! long val) throws IOException, InvalidClassException { try { ! Field f = getField(klass, field_name); ! f.setLong(obj, val); ! } ! catch (IllegalArgumentException _) ! { ! throw new InvalidClassException("incompatible field type for " + klass.getName() + "." + field_name); } catch (Exception _) { } } ! /** ! * This method writes a "short" value val in the specified field ! * of the instance obj of the type klass. ! * ! * @param obj Instance to setup. ! * @param klass Class type of the specified instance. ! * @param field_name Name of the field in the specified class type. ! * @param val The short value to write into the field. ! * @throws InvalidClassException if the specified field has not the required type. ! * @throws IOException if there is no field of that name in the specified class. ! */ ! private void setShortField(Object obj, Class klass, String field_name, ! short val) throws IOException, InvalidClassException { try { ! Field f = getField(klass, field_name); ! f.setShort(obj, val); ! } ! catch (IllegalArgumentException _) ! { ! throw new InvalidClassException("incompatible field type for " + klass.getName() + "." + field_name); } catch (Exception _) { } } ! /** ! * This method writes an "object" value val in the specified field ! * of the instance obj of the type klass. ! * ! * @param obj Instance to setup. ! * @param klass Class type of the specified instance. ! * @param field_name Name of the field in the specified class type. ! * @param val The "object" value to write into the field. ! * @throws InvalidClassException if the specified field has not the required type. ! * @throws IOException if there is no field of that name in the specified class. ! */ ! private void setObjectField(Object obj, Class klass, String field_name, ! String type_code, Object val) throws IOException, InvalidClassException { try { ! Field f = getField(klass, field_name); ! ObjectStreamField of = new ObjectStreamField(field_name, f.getType()); ! ! if (of.getTypeString() == null || ! !of.getTypeString().equals(type_code)) ! throw new InvalidClassException("incompatible field type for " + klass.getName() + "." + field_name); ! f.set(obj, val); ! } ! catch (InvalidClassException e) ! { ! throw e; } catch (Exception _) { ! } } private static final int BUFFER_SIZE = 1024; *************** public class ObjectInputStream extends I *** 1617,1622 **** --- 2103,2110 ---- private boolean isDeserializing; private boolean fieldsAlreadyRead; private Vector validators; + private Hashtable classLookupTable; + private GetField prereadFields; private static boolean dump; diff -Nrc3pad gcc-3.3.3/libjava/java/io/ObjectInputValidation.java gcc-3.4.0/libjava/java/io/ObjectInputValidation.java *** gcc-3.3.3/libjava/java/io/ObjectInputValidation.java 2002-01-22 22:40:14.000000000 +0000 --- gcc-3.4.0/libjava/java/io/ObjectInputValidation.java 2003-10-11 18:38:12.000000000 +0000 *************** *** 1,5 **** /* ObjectInputValidation.java -- Validate an object ! Copyright (C) 1998 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ObjectInputValidation.java -- Validate an object ! Copyright (C) 1998, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 39,61 **** package java.io; /** ! * What does this interface really do? * ! * @version 0.0 * * @author Aaron M. Renn (arenn@urbanophile.com) */ public interface ObjectInputValidation { ! ! /** ! * This method is called to validate an object. If the object is invalid ! * an exception is thrown. ! * ! * @exception InvalidObjectException If the object is invalid ! */ ! public abstract void ! validateObject() throws InvalidObjectException; ! ! } // interface ObjectInputValidation ! --- 39,67 ---- package java.io; /** ! * This class allows an object to validate that it is valid after ! * deserialization has run completely for it and all dependent objects. ! * This allows an object to determine if it is invalid even if all ! * state data was correctly deserialized from the stream. It can also ! * be used to perform re-initialization type activities on an object ! * after it has been completely deserialized. * ! * Since this method functions as a type of callback, it must be ! * registered through ObjectInputStream.registerValidation ! * in order to be invoked. This is typically done in the ! * readObject method. * * @author Aaron M. Renn (arenn@urbanophile.com) + * + * @see ObjectInputStream#registerValidation */ public interface ObjectInputValidation { ! /** ! * This method is called to validate an object after serialization ! * is complete. If the object is invalid an exception is thrown. ! * ! * @exception InvalidObjectException If the object is invalid ! */ ! void validateObject() throws InvalidObjectException; ! } diff -Nrc3pad gcc-3.3.3/libjava/java/io/ObjectOutput.java gcc-3.4.0/libjava/java/io/ObjectOutput.java *** gcc-3.3.3/libjava/java/io/ObjectOutput.java 2002-01-22 22:40:14.000000000 +0000 --- gcc-3.4.0/libjava/java/io/ObjectOutput.java 2003-10-11 18:38:12.000000000 +0000 *************** *** 1,5 **** /* ObjectOutput.java -- Interface for writing objects to a stream ! Copyright (C) 1998 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ObjectOutput.java -- Interface for writing objects to a stream ! Copyright (C) 1998, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** package java.io; *** 41,127 **** /** * This interface extends DataOutput to provide the additional * facility of writing object instances to a stream. It also adds some ! * additional methods to make the interface more OutputStream like. ! * ! * @version 0.0 * * @author Aaron M. Renn (arenn@urbanophile.com) */ public interface ObjectOutput extends DataOutput { ! /** ! * This method writes the specified byte to the output stream. ! * ! * @param b The byte to write. ! * ! * @exception IOException If an error occurs. ! */ ! public abstract void ! write(int b) throws IOException; ! ! /*************************************************************************/ ! ! /** ! * This method writes all the bytes in the specified byte array to the ! * output stream. ! * ! * @param buf The array of bytes to write. ! * ! * @exception IOException If an error occurs. ! */ ! public abstract void ! write(byte[] buf) throws IOException; ! ! /*************************************************************************/ ! ! /** ! * This method writes len bytes from the specified array ! * starting at index offset into that array. ! * ! * @param buf The byte array to write from. ! * @param offset The index into the byte array to start writing from. ! * @param len The number of bytes to write. ! * ! * @exception IOException If an error occurs. ! */ ! public abstract void ! write(byte[] buf, int offset, int len) throws IOException; ! ! /*************************************************************************/ ! ! /** ! * This method writes a object instance to a stream. The format of the ! * data written is determined by the actual implementation of this method ! * ! * @param obj The object to write ! * ! * @exception IOException If an error occurs ! */ ! public abstract void ! writeObject(Object obj) throws IOException; ! ! /*************************************************************************/ ! /** ! * This method causes any buffered data to be flushed out to the underlying ! * stream ! * ! * @exception IOException If an error occurs ! */ ! public abstract void ! flush() throws IOException; ! /*************************************************************************/ ! /** ! * This method closes the underlying stream. ! * ! * @exception IOException If an error occurs ! */ ! public abstract void ! close() throws IOException; } // interface ObjectOutput --- 41,111 ---- /** * This interface extends DataOutput to provide the additional * facility of writing object instances to a stream. It also adds some ! * additional methods to make the interface more ! * OutputStream like. * * @author Aaron M. Renn (arenn@urbanophile.com) + * + * @see DataOutput */ public interface ObjectOutput extends DataOutput { + /** + * This method writes the specified byte to the output stream. + * + * @param b The byte to write. + * + * @exception IOException If an error occurs. + */ + void write(int b) throws IOException; + /** + * This method writes all the bytes in the specified byte array to the + * output stream. + * + * @param buf The array of bytes to write. + * + * @exception IOException If an error occurs. + */ + void write(byte[] buf) throws IOException; ! /** ! * This method writes len bytes from the specified array ! * starting at index offset into that array. ! * ! * @param buf The byte array to write from. ! * @param offset The index into the byte array to start writing from. ! * @param len The number of bytes to write. ! * ! * @exception IOException If an error occurs. ! */ ! void write(byte[] buf, int offset, int len) ! throws IOException; ! /** ! * This method writes a object instance to a stream. The format of the ! * data written is determined by the actual implementation of this method ! * ! * @param obj The object to write ! * ! * @exception IOException If an error occurs ! */ ! void writeObject(Object obj) throws IOException; ! /** ! * This method causes any buffered data to be flushed out to the underlying ! * stream ! * ! * @exception IOException If an error occurs ! */ ! void flush() throws IOException; ! /** ! * This method closes the underlying stream. ! * ! * @exception IOException If an error occurs ! */ ! void close() throws IOException; } // interface ObjectOutput diff -Nrc3pad gcc-3.3.3/libjava/java/io/ObjectOutputStream.java gcc-3.4.0/libjava/java/io/ObjectOutputStream.java *** gcc-3.3.3/libjava/java/io/ObjectOutputStream.java 2003-03-14 12:06:41.000000000 +0000 --- gcc-3.4.0/libjava/java/io/ObjectOutputStream.java 2003-12-31 11:04:21.000000000 +0000 *************** import java.lang.reflect.Array; *** 42,47 **** --- 42,49 ---- import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.InvocationTargetException; + import java.security.PrivilegedAction; + import java.security.AccessController; import java.util.Hashtable; import gnu.java.io.ObjectIdentityWrapper; *************** import gnu.java.lang.reflect.TypeSignatu *** 49,180 **** import gnu.classpath.Configuration; /** ! An ObjectOutputStream can be used to write objects ! as well as primitive data in a platform-independent manner to an ! OutputStream. ! ! The data produced by an ObjectOutputStream can be read ! and reconstituted by an ObjectInputStream. ! ! writeObject (Object) is used to write Objects, the ! write<type> methods are used to write primitive ! data (as in DataOutputStream). Strings can be written ! as objects or as primitive data. ! ! Not all objects can be written out using an ! ObjectOutputStream. Only those objects that are an ! instance of java.io.Serializable can be written. ! ! Using default serialization, information about the class of an ! object is written, all of the non-transient, non-static fields of ! the object are written, if any of these fields are objects, they are ! written out in the same manner. ! ! An object is only written out the first time it is encountered. If ! the object is encountered later, a reference to it is written to ! the underlying stream. Thus writing circular object graphs ! does not present a problem, nor are relationships between objects ! in a graph lost. ! ! Example usage: !

            !    Hashtable map = new Hashtable ();
            !    map.put ("one", new Integer (1));
            !    map.put ("two", new Integer (2));
            ! 
            !    ObjectOutputStream oos =
            !    new ObjectOutputStream (new FileOutputStream ("numbers"));
            !    oos.writeObject (map);
            !    oos.close ();
            ! 
            !    ObjectInputStream ois =
            !    new ObjectInputStream (new FileInputStream ("numbers"));
            !    Hashtable newmap = (Hashtable)ois.readObject ();
            ! 
            !    System.out.println (newmap);
            !    
            ! ! The default serialization can be overriden in two ways. ! ! By defining a method private void ! writeObject (ObjectOutputStream), a class can dictate exactly ! how information about itself is written. ! defaultWriteObject () may be called from this method to ! carry out default serialization. This method is not ! responsible for dealing with fields of super-classes or subclasses. ! ! By implementing java.io.Externalizable. This gives ! the class complete control over the way it is written to the ! stream. If this approach is used the burden of writing superclass ! and subclass data is transfered to the class implementing ! java.io.Externalizable. ! ! @see java.io.DataOutputStream ! @see java.io.Externalizable ! @see java.io.ObjectInputStream ! @see java.io.Serializable ! @see XXX: java serialization spec ! */ public class ObjectOutputStream extends OutputStream implements ObjectOutput, ObjectStreamConstants { /** ! Creates a new ObjectOutputStream that will do all of ! its writing onto out. This method also initializes ! the stream by writing the header information (stream magic number ! and stream version). ! ! @exception IOException Writing stream header to underlying ! stream cannot be completed. ! ! @see writeStreamHeader () ! */ public ObjectOutputStream (OutputStream out) throws IOException { ! realOutput = new DataOutputStream (out); blockData = new byte[ BUFFER_SIZE ]; blockDataCount = 0; ! blockDataOutput = new DataOutputStream (this); ! setBlockDataMode (true); replacementEnabled = false; isSerializing = false; nextOID = baseWireHandle; ! OIDLookupTable = new Hashtable (); protocolVersion = defaultProtocolVersion; useSubclassMethod = false; ! writeStreamHeader (); } - /** ! Writes a representation of obj to the underlying ! output stream by writing out information about its class, then ! writing out each of the objects non-transient, non-static ! fields. If any of these fields are other objects, ! they are written out in the same manner. ! ! This method can be overriden by a class by implementing ! private void writeObject (ObjectOutputStream). ! ! If an exception is thrown from this method, the stream is left in ! an undefined state. ! ! @exception NotSerializableException An attempt was made to ! serialize an Object that is not serializable. ! ! @exception IOException Exception from underlying ! OutputStream. ! */ ! public final void writeObject (Object obj) throws IOException { if (useSubclassMethod) { ! writeObjectOverride (obj); return; } boolean was_serializing = isSerializing; ! boolean old_mode = setBlockDataMode (false); try { isSerializing = true; --- 51,183 ---- import gnu.classpath.Configuration; /** ! * An ObjectOutputStream can be used to write objects ! * as well as primitive data in a platform-independent manner to an ! * OutputStream. ! * ! * The data produced by an ObjectOutputStream can be read ! * and reconstituted by an ObjectInputStream. ! * ! * writeObject (Object) is used to write Objects, the ! * write<type> methods are used to write primitive ! * data (as in DataOutputStream). Strings can be written ! * as objects or as primitive data. ! * ! * Not all objects can be written out using an ! * ObjectOutputStream. Only those objects that are an ! * instance of java.io.Serializable can be written. ! * ! * Using default serialization, information about the class of an ! * object is written, all of the non-transient, non-static fields of ! * the object are written, if any of these fields are objects, they are ! * written out in the same manner. ! * ! * An object is only written out the first time it is encountered. If ! * the object is encountered later, a reference to it is written to ! * the underlying stream. Thus writing circular object graphs ! * does not present a problem, nor are relationships between objects ! * in a graph lost. ! * ! * Example usage: ! *
            !  * Hashtable map = new Hashtable ();
            !  * map.put ("one", new Integer (1));
            !  * map.put ("two", new Integer (2));
            !  *
            !  * ObjectOutputStream oos =
            !  * new ObjectOutputStream (new FileOutputStream ("numbers"));
            !  * oos.writeObject (map);
            !  * oos.close ();
            !  *
            !  * ObjectInputStream ois =
            !  * new ObjectInputStream (new FileInputStream ("numbers"));
            !  * Hashtable newmap = (Hashtable)ois.readObject ();
            !  *
            !  * System.out.println (newmap);
            !  * 
            ! * ! * The default serialization can be overriden in two ways. ! * ! * By defining a method private void ! * writeObject (ObjectOutputStream), a class can dictate exactly ! * how information about itself is written. ! * defaultWriteObject () may be called from this method to ! * carry out default serialization. This method is not ! * responsible for dealing with fields of super-classes or subclasses. ! * ! * By implementing java.io.Externalizable. This gives ! * the class complete control over the way it is written to the ! * stream. If this approach is used the burden of writing superclass ! * and subclass data is transfered to the class implementing ! * java.io.Externalizable. ! * ! * @see java.io.DataOutputStream ! * @see java.io.Externalizable ! * @see java.io.ObjectInputStream ! * @see java.io.Serializable ! */ public class ObjectOutputStream extends OutputStream implements ObjectOutput, ObjectStreamConstants { /** ! * Creates a new ObjectOutputStream that will do all of ! * its writing onto out. This method also initializes ! * the stream by writing the header information (stream magic number ! * and stream version). ! * ! * @exception IOException Writing stream header to underlying ! * stream cannot be completed. ! * ! * @see #writeStreamHeader() ! */ public ObjectOutputStream (OutputStream out) throws IOException { ! realOutput = new DataOutputStream(out); blockData = new byte[ BUFFER_SIZE ]; blockDataCount = 0; ! blockDataOutput = new DataOutputStream(this); ! setBlockDataMode(true); replacementEnabled = false; isSerializing = false; nextOID = baseWireHandle; ! OIDLookupTable = new Hashtable(); protocolVersion = defaultProtocolVersion; useSubclassMethod = false; ! writeStreamHeader(); } /** ! * Writes a representation of obj to the underlying ! * output stream by writing out information about its class, then ! * writing out each of the objects non-transient, non-static ! * fields. If any of these fields are other objects, ! * they are written out in the same manner. ! * ! * This method can be overriden by a class by implementing ! * private void writeObject (ObjectOutputStream). ! * ! * If an exception is thrown from this method, the stream is left in ! * an undefined state. ! * ! * @exception NotSerializableException An attempt was made to ! * serialize an Object that is not serializable. ! * ! * @exception InvalidClassException Somebody tried to serialize ! * an object which is wrongly formatted. ! * ! * @exception IOException Exception from underlying ! * OutputStream. ! */ ! public final void writeObject(Object obj) throws IOException { if (useSubclassMethod) { ! writeObjectOverride(obj); return; } boolean was_serializing = isSerializing; ! boolean old_mode = setBlockDataMode(false); try { isSerializing = true; *************** public class ObjectOutputStream extends *** 185,269 **** { if (obj == null) { ! realOutput.writeByte (TC_NULL); break; } ! Integer handle = findHandle (obj); if (handle != null) { ! realOutput.writeByte (TC_REFERENCE); ! realOutput.writeInt (handle.intValue ()); break; } if (obj instanceof Class) { Class cl = (Class)obj; ! ObjectStreamClass osc = ObjectStreamClass.lookupForClassObject (cl); ! assignNewHandle (obj); ! realOutput.writeByte (TC_CLASS); if (!osc.isProxyClass) { writeObject (osc); } else { ! realOutput.writeByte (TC_PROXYCLASSDESC); Class[] intfs = cl.getInterfaces(); realOutput.writeInt(intfs.length); for (int i = 0; i < intfs.length; i++) realOutput.writeUTF(intfs[i].getName()); ! boolean oldmode = setBlockDataMode (true); annotateProxyClass(cl); ! setBlockDataMode (oldmode); realOutput.writeByte(TC_ENDBLOCKDATA); ! writeObject (osc.getSuper()); } break; } if (obj instanceof ObjectStreamClass) { ! ObjectStreamClass osc = (ObjectStreamClass)obj; ! realOutput.writeByte (TC_CLASSDESC); ! realOutput.writeUTF (osc.getName ()); ! realOutput.writeLong (osc.getSerialVersionUID ()); ! assignNewHandle (obj); ! ! int flags = osc.getFlags (); ! ! if (protocolVersion == PROTOCOL_VERSION_2 ! && osc.isExternalizable ()) ! flags |= SC_BLOCK_DATA; ! ! realOutput.writeByte (flags); ! ! ObjectStreamField[] fields = osc.fields; ! realOutput.writeShort (fields.length); ! ! ObjectStreamField field; ! for (int i=0; i < fields.length; i++) ! { ! field = fields[i]; ! realOutput.writeByte (field.getTypeCode ()); ! realOutput.writeUTF (field.getName ()); ! ! if (! field.isPrimitive ()) ! writeObject (field.getTypeString ()); ! } ! ! boolean oldmode = setBlockDataMode (true); ! annotateClass (osc.forClass ()); ! setBlockDataMode (oldmode); ! realOutput.writeByte (TC_ENDBLOCKDATA); ! ! if (osc.isSerializable ()) ! writeObject (osc.getSuper ()); ! else ! writeObject (null); break; } --- 188,236 ---- { if (obj == null) { ! realOutput.writeByte(TC_NULL); break; } ! Integer handle = findHandle(obj); if (handle != null) { ! realOutput.writeByte(TC_REFERENCE); ! realOutput.writeInt(handle.intValue()); break; } if (obj instanceof Class) { Class cl = (Class)obj; ! ObjectStreamClass osc = ObjectStreamClass.lookupForClassObject(cl); ! assignNewHandle(obj); ! realOutput.writeByte(TC_CLASS); if (!osc.isProxyClass) { writeObject (osc); } else { ! realOutput.writeByte(TC_PROXYCLASSDESC); Class[] intfs = cl.getInterfaces(); realOutput.writeInt(intfs.length); for (int i = 0; i < intfs.length; i++) realOutput.writeUTF(intfs[i].getName()); ! boolean oldmode = setBlockDataMode(true); annotateProxyClass(cl); ! setBlockDataMode(oldmode); realOutput.writeByte(TC_ENDBLOCKDATA); ! writeObject(osc.getSuper()); } break; } if (obj instanceof ObjectStreamClass) { ! writeClassDescriptor((ObjectStreamClass) obj); break; } *************** public class ObjectOutputStream extends *** 271,288 **** && ! replaceDone) { replacedObject = obj; ! if (obj instanceof Serializable) { Method m = null; try { Class classArgs[] = {}; ! m = obj.getClass ().getDeclaredMethod ("writeReplace", ! classArgs); ! // m can't be null by definition since an exception would ! // have been thrown so a check for null is not needed. ! obj = m.invoke (obj, new Object[] {}); } catch (NoSuchMethodException ignore) { --- 238,256 ---- && ! replaceDone) { replacedObject = obj; ! if (obj instanceof Serializable) { Method m = null; try { Class classArgs[] = {}; ! m = getMethod(obj.getClass(), "writeReplace", ! classArgs); ! // m can't be null by definition since an ! // exception would have been thrown so a check ! // for null is not needed. ! obj = m.invoke(obj, new Object[] {}); } catch (NoSuchMethodException ignore) { *************** public class ObjectOutputStream extends *** 294,348 **** { } } ! if (replacementEnabled) ! obj = replaceObject (obj); ! replaceDone = true; continue; } if (obj instanceof String) { ! realOutput.writeByte (TC_STRING); ! assignNewHandle (obj); ! realOutput.writeUTF ((String)obj); break; } ! Class clazz = obj.getClass (); ! ObjectStreamClass osc = ObjectStreamClass.lookupForClassObject (clazz); if (osc == null) ! throw new NotSerializableException (clazz.getName ()); ! if (clazz.isArray ()) { ! realOutput.writeByte (TC_ARRAY); ! writeObject (osc); ! assignNewHandle (obj); ! writeArraySizeAndElements (obj, clazz.getComponentType ()); break; } ! ! realOutput.writeByte (TC_OBJECT); ! writeObject (osc); if (replaceDone) ! assignNewHandle (replacedObject); else ! assignNewHandle (obj); if (obj instanceof Externalizable) { if (protocolVersion == PROTOCOL_VERSION_2) ! setBlockDataMode (true); ! ! ((Externalizable)obj).writeExternal (this); ! if (protocolVersion == PROTOCOL_VERSION_2) { ! setBlockDataMode (false); ! realOutput.writeByte (TC_ENDBLOCKDATA); } break; --- 262,316 ---- { } } ! if (replacementEnabled) ! obj = replaceObject(obj); ! replaceDone = true; continue; } if (obj instanceof String) { ! realOutput.writeByte(TC_STRING); ! assignNewHandle(obj); ! realOutput.writeUTF((String)obj); break; } ! Class clazz = obj.getClass(); ! ObjectStreamClass osc = ObjectStreamClass.lookupForClassObject(clazz); if (osc == null) ! throw new NotSerializableException(clazz.getName()); ! if (clazz.isArray ()) { ! realOutput.writeByte(TC_ARRAY); ! writeObject(osc); ! assignNewHandle(obj); ! writeArraySizeAndElements(obj, clazz.getComponentType()); break; } ! ! realOutput.writeByte(TC_OBJECT); ! writeObject(osc); if (replaceDone) ! assignNewHandle(replacedObject); else ! assignNewHandle(obj); if (obj instanceof Externalizable) { if (protocolVersion == PROTOCOL_VERSION_2) ! setBlockDataMode(true); ! ! ((Externalizable)obj).writeExternal(this); ! if (protocolVersion == PROTOCOL_VERSION_2) { ! setBlockDataMode(false); ! realOutput.writeByte(TC_ENDBLOCKDATA); } break; *************** public class ObjectOutputStream extends *** 352,373 **** { currentObject = obj; ObjectStreamClass[] hierarchy = ! ObjectStreamClass.getObjectStreamClasses (clazz); ! ! for (int i=0; i < hierarchy.length; i++) { currentObjectStreamClass = hierarchy[i]; ! fieldsAlreadyWritten = false; ! if (currentObjectStreamClass.hasWriteMethod ()) { ! setBlockDataMode (true); ! callWriteMethod (obj, currentObjectStreamClass); ! setBlockDataMode (false); ! realOutput.writeByte (TC_ENDBLOCKDATA); } else ! writeFields (obj, currentObjectStreamClass); } currentObject = null; --- 320,341 ---- { currentObject = obj; ObjectStreamClass[] hierarchy = ! ObjectStreamClass.getObjectStreamClasses(clazz); ! ! for (int i = 0; i < hierarchy.length; i++) { currentObjectStreamClass = hierarchy[i]; ! fieldsAlreadyWritten = false; ! if (currentObjectStreamClass.hasWriteMethod()) { ! setBlockDataMode(true); ! callWriteMethod(obj, currentObjectStreamClass); ! setBlockDataMode(false); ! realOutput.writeByte(TC_ENDBLOCKDATA); } else ! writeFields(obj, currentObjectStreamClass); } currentObject = null; *************** public class ObjectOutputStream extends *** 376,382 **** break; } ! throw new NotSerializableException (clazz.getName ()); } // end pseudo-loop } catch (ObjectStreamException ose) --- 344,350 ---- break; } ! throw new NotSerializableException(clazz.getName ()); } // end pseudo-loop } catch (ObjectStreamException ose) *************** public class ObjectOutputStream extends *** 386,587 **** } catch (IOException e) { ! realOutput.writeByte (TC_EXCEPTION); ! reset (true); ! setBlockDataMode (false); try { ! writeObject (e); } catch (IOException ioe) { ! throw new StreamCorruptedException ("Exception " + ioe + " thrown while exception was being written to stream."); } reset (true); } finally { isSerializing = was_serializing; ! setBlockDataMode (old_mode); } } ! /** ! Writes the current objects non-transient, non-static fields from ! the current class to the underlying output stream. ! This method is intended to be called from within a object's ! private void writeObject (ObjectOutputStream) ! method. ! @exception NotActiveException This method was called from a ! context other than from the current object's and current class's ! private void writeObject (ObjectOutputStream) ! method. ! @exception IOException Exception from underlying ! OutputStream. ! */ ! public void defaultWriteObject () throws IOException, NotActiveException { ! markFieldsWritten (); ! writeFields (currentObject, currentObjectStreamClass); } ! private void markFieldsWritten () throws IOException { if (currentObject == null || currentObjectStreamClass == null) ! throw new NotActiveException ("defaultWriteObject called by non-active class and/or object"); if (fieldsAlreadyWritten) ! throw new IOException ("Only one of putFields and defaultWriteObject may be called, and it may only be called once"); fieldsAlreadyWritten = true; } - /** ! Resets stream to state equivalent to the state just after it was ! constructed. ! ! Causes all objects previously written to the stream to be ! forgotten. A notification of this reset is also written to the ! underlying stream. ! ! @exception IOException Exception from underlying ! OutputStream or reset called while serialization is ! in progress. ! */ ! public void reset () throws IOException { ! reset (false); } ! private void reset (boolean internal) throws IOException { if (!internal) { if (isSerializing) ! throw new IOException ("Reset called while serialization in progress"); ! realOutput.writeByte (TC_RESET); } ! ! clearHandles (); } /** ! Informs this ObjectOutputStream to write data ! according to the specified protocol. There are currently two ! different protocols, specified by PROTOCOL_VERSION_1 ! and PROTOCOL_VERSION_2. This implementation writes ! data using PROTOCOL_VERSION_2 by default, as is done ! by the JDK 1.2. ! ! A non-portable method, setDefaultProtocolVersion (int ! version) is provided to change the default protocol ! version. ! ! For an explination of the differences beween the two protocols ! see XXX: the Java ObjectSerialization Specification. ! ! @exception IOException if version is not a valid ! protocol ! ! @see setDefaultProtocolVersion (int) ! */ ! public void useProtocolVersion (int version) throws IOException { if (version != PROTOCOL_VERSION_1 && version != PROTOCOL_VERSION_2) ! throw new IOException ("Invalid protocol version requested."); ! protocolVersion = version; } /** ! GNU $classpath specific ! ! Changes the default stream protocol used by all ! ObjectOutputStreams. There are currently two ! different protocols, specified by PROTOCOL_VERSION_1 ! and PROTOCOL_VERSION_2. The default default is ! PROTOCOL_VERSION_1. ! ! @exception IOException if version is not a valid ! protocol ! ! @see useProtocolVersion (int) ! */ ! public static void setDefaultProtocolVersion (int version) throws IOException { if (version != PROTOCOL_VERSION_1 && version != PROTOCOL_VERSION_2) ! throw new IOException ("Invalid protocol version requested."); defaultProtocolVersion = version; } /** ! An empty hook that allows subclasses to write extra information ! about classes to the stream. This method is called the first ! time each class is seen, and after all of the standard ! information about the class has been written. ! ! @exception IOException Exception from underlying ! OutputStream. ! ! @see java.io.ObjectInputStream#resolveClass (java.io.ObjectStreamClass) ! */ ! protected void annotateClass (Class cl) throws IOException ! {} protected void annotateProxyClass(Class cl) throws IOException ! {} /** ! Allows subclasses to replace objects that are written to the ! stream with other objects to be written in their place. This ! method is called the first time each object is encountered ! (modulo reseting of the stream). ! ! This method must be enabled before it will be called in the ! serialization process. ! ! @exception IOException Exception from underlying ! OutputStream. ! ! @see enableReplaceObject (boolean) ! */ ! protected Object replaceObject (Object obj) throws IOException { return obj; } /** ! If enable is true and this object is ! trusted, then replaceObject (Object) will be called ! in subsequent calls to writeObject (Object). ! Otherwise, replaceObject (Object) will not be called. ! ! @exception SecurityException This class is not trusted. ! */ ! protected boolean enableReplaceObject (boolean enable) throws SecurityException { if (enable) { ! SecurityManager sm = System.getSecurityManager (); if (sm != null) ! sm.checkPermission (new SerializablePermission ("enableSubstitution")); } boolean old_val = replacementEnabled; --- 354,600 ---- } catch (IOException e) { ! realOutput.writeByte(TC_EXCEPTION); ! reset(true); ! setBlockDataMode(false); try { ! writeObject(e); } catch (IOException ioe) { ! throw new StreamCorruptedException ! ("Exception " + ioe + " thrown while exception was being written to stream."); } reset (true); + } finally { isSerializing = was_serializing; ! setBlockDataMode(old_mode); } } ! protected void writeClassDescriptor(ObjectStreamClass osc) throws IOException ! { ! realOutput.writeByte(TC_CLASSDESC); ! realOutput.writeUTF(osc.getName()); ! realOutput.writeLong(osc.getSerialVersionUID()); ! assignNewHandle(osc); ! int flags = osc.getFlags(); ! if (protocolVersion == PROTOCOL_VERSION_2 ! && osc.isExternalizable()) ! flags |= SC_BLOCK_DATA; ! realOutput.writeByte(flags); ! ! ObjectStreamField[] fields = osc.fields; ! realOutput.writeShort(fields.length); ! ! ObjectStreamField field; ! for (int i = 0; i < fields.length; i++) ! { ! field = fields[i]; ! realOutput.writeByte(field.getTypeCode ()); ! realOutput.writeUTF(field.getName ()); ! ! if (! field.isPrimitive()) ! writeObject(field.getTypeString()); ! } ! ! boolean oldmode = setBlockDataMode(true); ! annotateClass(osc.forClass()); ! setBlockDataMode(oldmode); ! realOutput.writeByte(TC_ENDBLOCKDATA); ! ! if (osc.isSerializable() || osc.isExternalizable()) ! writeObject(osc.getSuper()); ! else ! writeObject(null); ! } ! ! /** ! * Writes the current objects non-transient, non-static fields from ! * the current class to the underlying output stream. ! * ! * This method is intended to be called from within a object's ! * private void writeObject (ObjectOutputStream) ! * method. ! * ! * @exception NotActiveException This method was called from a ! * context other than from the current object's and current class's ! * private void writeObject (ObjectOutputStream) ! * method. ! * ! * @exception IOException Exception from underlying ! * OutputStream. ! */ ! public void defaultWriteObject() throws IOException, NotActiveException { ! markFieldsWritten(); ! writeFields(currentObject, currentObjectStreamClass); } ! private void markFieldsWritten() throws IOException { if (currentObject == null || currentObjectStreamClass == null) ! throw new NotActiveException ! ("defaultWriteObject called by non-active class and/or object"); if (fieldsAlreadyWritten) ! throw new IOException ! ("Only one of writeFields and defaultWriteObject may be called, and it may only be called once"); fieldsAlreadyWritten = true; } /** ! * Resets stream to state equivalent to the state just after it was ! * constructed. ! * ! * Causes all objects previously written to the stream to be ! * forgotten. A notification of this reset is also written to the ! * underlying stream. ! * ! * @exception IOException Exception from underlying ! * OutputStream or reset called while serialization is ! * in progress. ! */ ! public void reset() throws IOException { ! reset(false); } ! private void reset(boolean internal) throws IOException { if (!internal) { if (isSerializing) ! throw new IOException("Reset called while serialization in progress"); ! realOutput.writeByte(TC_RESET); } ! ! clearHandles(); } /** ! * Informs this ObjectOutputStream to write data ! * according to the specified protocol. There are currently two ! * different protocols, specified by PROTOCOL_VERSION_1 ! * and PROTOCOL_VERSION_2. This implementation writes ! * data using PROTOCOL_VERSION_2 by default, as is done ! * by the JDK 1.2. ! * ! * A non-portable method, setDefaultProtocolVersion (int ! * version) is provided to change the default protocol ! * version. ! * ! * For an explination of the differences beween the two protocols ! * see XXX: the Java ObjectSerialization Specification. ! * ! * @exception IOException if version is not a valid ! * protocol ! * ! * @see #setDefaultProtocolVersion(int) ! */ ! public void useProtocolVersion(int version) throws IOException { if (version != PROTOCOL_VERSION_1 && version != PROTOCOL_VERSION_2) ! throw new IOException("Invalid protocol version requested."); ! protocolVersion = version; } /** ! * GNU $classpath specific ! * ! * Changes the default stream protocol used by all ! * ObjectOutputStreams. There are currently two ! * different protocols, specified by PROTOCOL_VERSION_1 ! * and PROTOCOL_VERSION_2. The default default is ! * PROTOCOL_VERSION_1. ! * ! * @exception IOException if version is not a valid ! * protocol ! * ! * @see #useProtocolVersion(int) ! */ ! public static void setDefaultProtocolVersion(int version) throws IOException { if (version != PROTOCOL_VERSION_1 && version != PROTOCOL_VERSION_2) ! throw new IOException("Invalid protocol version requested."); defaultProtocolVersion = version; } /** ! * An empty hook that allows subclasses to write extra information ! * about classes to the stream. This method is called the first ! * time each class is seen, and after all of the standard ! * information about the class has been written. ! * ! * @exception IOException Exception from underlying ! * OutputStream. ! * ! * @see ObjectInputStream#resolveClass(java.io.ObjectStreamClass) ! */ ! protected void annotateClass(Class cl) throws IOException ! { ! } protected void annotateProxyClass(Class cl) throws IOException ! { ! } /** ! * Allows subclasses to replace objects that are written to the ! * stream with other objects to be written in their place. This ! * method is called the first time each object is encountered ! * (modulo reseting of the stream). ! * ! * This method must be enabled before it will be called in the ! * serialization process. ! * ! * @exception IOException Exception from underlying ! * OutputStream. ! * ! * @see #enableReplaceObject(boolean) ! */ ! protected Object replaceObject(Object obj) throws IOException { return obj; } /** ! * If enable is true and this object is ! * trusted, then replaceObject (Object) will be called ! * in subsequent calls to writeObject (Object). ! * Otherwise, replaceObject (Object) will not be called. ! * ! * @exception SecurityException This class is not trusted. ! */ ! protected boolean enableReplaceObject(boolean enable) throws SecurityException { if (enable) { ! SecurityManager sm = System.getSecurityManager(); if (sm != null) ! sm.checkPermission(new SerializablePermission("enableSubstitution")); } boolean old_val = replacementEnabled; *************** public class ObjectOutputStream extends *** 591,917 **** /** ! Writes stream magic and stream version information to the ! underlying stream. ! ! @exception IOException Exception from underlying ! OutputStream. ! */ ! protected void writeStreamHeader () throws IOException { ! realOutput.writeShort (STREAM_MAGIC); ! realOutput.writeShort (STREAM_VERSION); } - - /** ! Protected constructor that allows subclasses to override ! serialization. This constructor should be called by subclasses ! that wish to override writeObject (Object). This ! method does a security check NOTE: currently not ! implemented, then sets a flag that informs ! writeObject (Object) to call the subclasses ! writeObjectOverride (Object) method. ! ! @see writeObjectOverride (Object) ! */ ! protected ObjectOutputStream () throws IOException, SecurityException { SecurityManager sec_man = System.getSecurityManager (); if (sec_man != null) ! sec_man.checkPermission (SUBCLASS_IMPLEMENTATION_PERMISSION); useSubclassMethod = true; } /** ! This method allows subclasses to override the default ! serialization mechanism provided by ! ObjectOutputStream. To make this method be used for ! writing objects, subclasses must invoke the 0-argument ! constructor on this class from there constructor. ! ! @see ObjectOutputStream () ! ! @exception NotActiveException Subclass has arranged for this ! method to be called, but did not implement this method. ! */ ! protected void writeObjectOverride (Object obj) throws NotActiveException, IOException { ! throw new NotActiveException ("Subclass of ObjectOutputStream must implement writeObjectOverride"); } /** ! @see java.io.DataOutputStream#write (int) ! */ public void write (int data) throws IOException { if (writeDataAsBlocks) { if (blockDataCount == BUFFER_SIZE) ! drain (); blockData[ blockDataCount++ ] = (byte)data; } else ! realOutput.write (data); } /** ! @see java.io.DataOutputStream#write (byte[]) ! */ ! public void write (byte[] b) throws IOException { ! write (b, 0, b.length); } /** ! @see java.io.DataOutputStream#write (byte[],int,int) ! */ ! public void write (byte[] b, int off, int len) throws IOException { if (writeDataAsBlocks) { if (len < 0) ! throw new IndexOutOfBoundsException (); if (blockDataCount + len < BUFFER_SIZE) { ! System.arraycopy (b, off, blockData, blockDataCount, len); blockDataCount += len; } else { ! drain (); ! writeBlockDataHeader (len); ! realOutput.write (b, off, len); } } else ! realOutput.write (b, off, len); } /** ! @see java.io.DataOutputStream#flush () ! */ public void flush () throws IOException { ! drain (); ! realOutput.flush (); } /** ! Causes the block-data buffer to be written to the underlying ! stream, but does not flush underlying stream. ! ! @exception IOException Exception from underlying ! OutputStream. ! */ ! protected void drain () throws IOException { if (blockDataCount == 0) return; if (writeDataAsBlocks) ! writeBlockDataHeader (blockDataCount); ! realOutput.write (blockData, 0, blockDataCount); blockDataCount = 0; } /** ! @see java.io.DataOutputStream#close () ! */ ! public void close () throws IOException { ! flush (); ! realOutput.close (); } /** ! @see java.io.DataOutputStream#writeBoolean (boolean) ! */ ! public void writeBoolean (boolean data) throws IOException { ! blockDataOutput.writeBoolean (data); } /** ! @see java.io.DataOutputStream#writeByte (int) ! */ ! public void writeByte (int data) throws IOException { ! blockDataOutput.writeByte (data); } /** ! @see java.io.DataOutputStream#writeShort (int) ! */ public void writeShort (int data) throws IOException { ! blockDataOutput.writeShort (data); } /** ! @see java.io.DataOutputStream#writeChar (int) ! */ ! public void writeChar (int data) throws IOException { ! blockDataOutput.writeChar (data); } /** ! @see java.io.DataOutputStream#writeInt (int) ! */ ! public void writeInt (int data) throws IOException { ! blockDataOutput.writeInt (data); } /** ! @see java.io.DataOutputStream#writeLong (long) ! */ ! public void writeLong (long data) throws IOException { ! blockDataOutput.writeLong (data); } /** ! @see java.io.DataOutputStream#writeFloat (float) ! */ ! public void writeFloat (float data) throws IOException { ! blockDataOutput.writeFloat (data); } /** ! @see java.io.DataOutputStream#writeDouble (double) ! */ ! public void writeDouble (double data) throws IOException { ! blockDataOutput.writeDouble (data); } /** ! @see java.io.DataOutputStream#writeBytes (java.lang.String) ! */ ! public void writeBytes (String data) throws IOException { ! blockDataOutput.writeBytes (data); } /** ! @see java.io.DataOutputStream#writeChars (java.lang.String) ! */ ! public void writeChars (String data) throws IOException { ! dataOutput.writeChars (data); } /** ! @see java.io.DataOutputStream#writeUTF (java.lang.String) ! */ ! public void writeUTF (String data) throws IOException { ! dataOutput.writeUTF (data); } /** ! This class allows a class to specify exactly which fields should ! be written, and what values should be written for these fields. ! ! XXX: finish up comments ! */ public static abstract class PutField { ! public abstract void put (String name, boolean value) ! throws IOException, IllegalArgumentException; ! public abstract void put (String name, byte value) ! throws IOException, IllegalArgumentException; ! public abstract void put (String name, char value) ! throws IOException, IllegalArgumentException; ! public abstract void put (String name, double value) ! throws IOException, IllegalArgumentException; ! public abstract void put (String name, float value) ! throws IOException, IllegalArgumentException; ! public abstract void put (String name, int value) ! throws IOException, IllegalArgumentException; ! public abstract void put (String name, long value) ! throws IOException, IllegalArgumentException; ! public abstract void put (String name, short value) ! throws IOException, IllegalArgumentException; ! public abstract void put (String name, Object value) ! throws IOException, IllegalArgumentException; public abstract void write (ObjectOutput out) throws IOException; } ! ! public PutField putFields () throws IOException { ! markFieldsWritten (); ! currentPutField = new PutField () { private byte[] prim_field_data ! = new byte[currentObjectStreamClass.primFieldSize]; private Object[] objs ! = new Object[currentObjectStreamClass.objectFieldCount]; ! public void put (String name, boolean value) ! throws IOException, IllegalArgumentException { ObjectStreamField field ! = currentObjectStreamClass.getField (name); ! checkType (field, 'Z'); prim_field_data[field.getOffset ()] = (byte)(value ? 1 : 0); } ! public void put (String name, byte value) ! throws IOException, IllegalArgumentException { ! ObjectStreamField field ! = currentObjectStreamClass.getField (name); ! checkType (field, 'B'); ! prim_field_data[field.getOffset ()] = value; } ! public void put (String name, char value) ! throws IOException, IllegalArgumentException { ! ObjectStreamField field ! = currentObjectStreamClass.getField (name); ! checkType (field, 'C'); ! int off = field.getOffset (); prim_field_data[off++] = (byte)(value >>> 8); prim_field_data[off] = (byte)value; } ! public void put (String name, double value) ! throws IOException, IllegalArgumentException { ! ObjectStreamField field ! = currentObjectStreamClass.getField (name); ! checkType (field, 'D'); ! int off = field.getOffset (); long l_value = Double.doubleToLongBits (value); prim_field_data[off++] = (byte)(l_value >>> 52); prim_field_data[off++] = (byte)(l_value >>> 48); --- 604,931 ---- /** ! * Writes stream magic and stream version information to the ! * underlying stream. ! * ! * @exception IOException Exception from underlying ! * OutputStream. ! */ ! protected void writeStreamHeader() throws IOException { ! realOutput.writeShort(STREAM_MAGIC); ! realOutput.writeShort(STREAM_VERSION); } /** ! * Protected constructor that allows subclasses to override ! * serialization. This constructor should be called by subclasses ! * that wish to override writeObject (Object). This ! * method does a security check NOTE: currently not ! * implemented, then sets a flag that informs ! * writeObject (Object) to call the subclasses ! * writeObjectOverride (Object) method. ! * ! * @see #writeObjectOverride(Object) ! */ ! protected ObjectOutputStream() throws IOException, SecurityException { SecurityManager sec_man = System.getSecurityManager (); if (sec_man != null) ! sec_man.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION); useSubclassMethod = true; } /** ! * This method allows subclasses to override the default ! * serialization mechanism provided by ! * ObjectOutputStream. To make this method be used for ! * writing objects, subclasses must invoke the 0-argument ! * constructor on this class from there constructor. ! * ! * @see #ObjectOutputStream() ! * ! * @exception NotActiveException Subclass has arranged for this ! * method to be called, but did not implement this method. ! */ ! protected void writeObjectOverride(Object obj) throws NotActiveException, IOException { ! throw new NotActiveException ! ("Subclass of ObjectOutputStream must implement writeObjectOverride"); } /** ! * @see DataOutputStream#write(int) ! */ public void write (int data) throws IOException { if (writeDataAsBlocks) { if (blockDataCount == BUFFER_SIZE) ! drain(); blockData[ blockDataCount++ ] = (byte)data; } else ! realOutput.write(data); } /** ! * @see DataOutputStream#write(byte[]) ! */ ! public void write(byte[] b) throws IOException { ! write(b, 0, b.length); } /** ! * @see DataOutputStream#write(byte[],int,int) ! */ ! public void write(byte[] b, int off, int len) throws IOException { if (writeDataAsBlocks) { if (len < 0) ! throw new IndexOutOfBoundsException(); if (blockDataCount + len < BUFFER_SIZE) { ! System.arraycopy(b, off, blockData, blockDataCount, len); blockDataCount += len; } else { ! drain(); ! writeBlockDataHeader(len); ! realOutput.write(b, off, len); } } else ! realOutput.write(b, off, len); } /** ! * @see DataOutputStream#flush() ! */ public void flush () throws IOException { ! drain(); ! realOutput.flush(); } /** ! * Causes the block-data buffer to be written to the underlying ! * stream, but does not flush underlying stream. ! * ! * @exception IOException Exception from underlying ! * OutputStream. ! */ ! protected void drain() throws IOException { if (blockDataCount == 0) return; if (writeDataAsBlocks) ! writeBlockDataHeader(blockDataCount); ! realOutput.write(blockData, 0, blockDataCount); blockDataCount = 0; } /** ! * @see java.io.DataOutputStream#close () ! */ ! public void close() throws IOException { ! flush(); ! realOutput.close(); } /** ! * @see java.io.DataOutputStream#writeBoolean (boolean) ! */ ! public void writeBoolean(boolean data) throws IOException { ! blockDataOutput.writeBoolean(data); } /** ! * @see java.io.DataOutputStream#writeByte (int) ! */ ! public void writeByte(int data) throws IOException { ! blockDataOutput.writeByte(data); } /** ! * @see java.io.DataOutputStream#writeShort (int) ! */ public void writeShort (int data) throws IOException { ! blockDataOutput.writeShort(data); } /** ! * @see java.io.DataOutputStream#writeChar (int) ! */ ! public void writeChar(int data) throws IOException { ! blockDataOutput.writeChar(data); } /** ! * @see java.io.DataOutputStream#writeInt (int) ! */ ! public void writeInt(int data) throws IOException { ! blockDataOutput.writeInt(data); } /** ! * @see java.io.DataOutputStream#writeLong (long) ! */ ! public void writeLong(long data) throws IOException { ! blockDataOutput.writeLong(data); } /** ! * @see java.io.DataOutputStream#writeFloat (float) ! */ ! public void writeFloat(float data) throws IOException { ! blockDataOutput.writeFloat(data); } /** ! * @see java.io.DataOutputStream#writeDouble (double) ! */ ! public void writeDouble(double data) throws IOException { ! blockDataOutput.writeDouble(data); } /** ! * @see java.io.DataOutputStream#writeBytes (java.lang.String) ! */ ! public void writeBytes(String data) throws IOException { ! blockDataOutput.writeBytes(data); } /** ! * @see java.io.DataOutputStream#writeChars (java.lang.String) ! */ ! public void writeChars(String data) throws IOException { ! dataOutput.writeChars(data); } /** ! * @see java.io.DataOutputStream#writeUTF (java.lang.String) ! */ ! public void writeUTF(String data) throws IOException { ! dataOutput.writeUTF(data); } /** ! * This class allows a class to specify exactly which fields should ! * be written, and what values should be written for these fields. ! * ! * XXX: finish up comments ! */ public static abstract class PutField { ! public abstract void put (String name, boolean value); ! public abstract void put (String name, byte value); ! public abstract void put (String name, char value); ! public abstract void put (String name, double value); ! public abstract void put (String name, float value); ! public abstract void put (String name, int value); ! public abstract void put (String name, long value); ! public abstract void put (String name, short value); ! public abstract void put (String name, Object value); ! ! /** ! * @deprecated ! */ public abstract void write (ObjectOutput out) throws IOException; } ! public PutField putFields() throws IOException { ! if (currentPutField != null) ! return currentPutField; ! currentPutField = new PutField() { private byte[] prim_field_data ! = new byte[currentObjectStreamClass.primFieldSize]; private Object[] objs ! = new Object[currentObjectStreamClass.objectFieldCount]; ! private ObjectStreamField getField (String name) { ObjectStreamField field ! = currentObjectStreamClass.getField(name); ! ! if (field == null) ! throw new IllegalArgumentException("no such serializable field " + name); ! ! return field; ! } ! ! public void put(String name, boolean value) ! { ! ObjectStreamField field = getField(name); ! ! checkType(field, 'Z'); prim_field_data[field.getOffset ()] = (byte)(value ? 1 : 0); } ! public void put(String name, byte value) { ! ObjectStreamField field = getField(name); ! ! checkType(field, 'B'); ! prim_field_data[field.getOffset()] = value; } ! public void put(String name, char value) { ! ObjectStreamField field = getField(name); ! ! checkType(field, 'C'); ! int off = field.getOffset(); prim_field_data[off++] = (byte)(value >>> 8); prim_field_data[off] = (byte)value; } ! public void put(String name, double value) { ! ObjectStreamField field = getField (name); ! ! checkType(field, 'D'); ! int off = field.getOffset(); long l_value = Double.doubleToLongBits (value); prim_field_data[off++] = (byte)(l_value >>> 52); prim_field_data[off++] = (byte)(l_value >>> 48); *************** public class ObjectOutputStream extends *** 923,962 **** prim_field_data[off] = (byte)l_value; } ! public void put (String name, float value) ! throws IOException, IllegalArgumentException { ! ObjectStreamField field ! = currentObjectStreamClass.getField (name); ! checkType (field, 'F'); ! int off = field.getOffset (); ! int i_value = Float.floatToIntBits (value); prim_field_data[off++] = (byte)(i_value >>> 24); prim_field_data[off++] = (byte)(i_value >>> 16); prim_field_data[off++] = (byte)(i_value >>> 8); prim_field_data[off] = (byte)i_value; } ! public void put (String name, int value) ! throws IOException, IllegalArgumentException { ! ObjectStreamField field ! = currentObjectStreamClass.getField (name); ! checkType (field, 'I'); ! int off = field.getOffset (); prim_field_data[off++] = (byte)(value >>> 24); prim_field_data[off++] = (byte)(value >>> 16); prim_field_data[off++] = (byte)(value >>> 8); prim_field_data[off] = (byte)value; } ! public void put (String name, long value) ! throws IOException, IllegalArgumentException { ! ObjectStreamField field ! = currentObjectStreamClass.getField (name); ! checkType (field, 'J'); ! int off = field.getOffset (); prim_field_data[off++] = (byte)(value >>> 52); prim_field_data[off++] = (byte)(value >>> 48); prim_field_data[off++] = (byte)(value >>> 40); --- 937,971 ---- prim_field_data[off] = (byte)l_value; } ! public void put(String name, float value) { ! ObjectStreamField field = getField(name); ! ! checkType(field, 'F'); ! int off = field.getOffset(); ! int i_value = Float.floatToIntBits(value); prim_field_data[off++] = (byte)(i_value >>> 24); prim_field_data[off++] = (byte)(i_value >>> 16); prim_field_data[off++] = (byte)(i_value >>> 8); prim_field_data[off] = (byte)i_value; } ! public void put(String name, int value) { ! ObjectStreamField field = getField(name); ! checkType(field, 'I'); ! int off = field.getOffset(); prim_field_data[off++] = (byte)(value >>> 24); prim_field_data[off++] = (byte)(value >>> 16); prim_field_data[off++] = (byte)(value >>> 8); prim_field_data[off] = (byte)value; } ! public void put(String name, long value) { ! ObjectStreamField field = getField(name); ! checkType(field, 'J'); ! int off = field.getOffset(); prim_field_data[off++] = (byte)(value >>> 52); prim_field_data[off++] = (byte)(value >>> 48); prim_field_data[off++] = (byte)(value >>> 40); *************** public class ObjectOutputStream extends *** 967,1013 **** prim_field_data[off] = (byte)value; } ! public void put (String name, short value) ! throws IOException, IllegalArgumentException { ! ObjectStreamField field ! = currentObjectStreamClass.getField (name); ! checkType (field, 'S'); ! int off = field.getOffset (); prim_field_data[off++] = (byte)(value >>> 8); prim_field_data[off] = (byte)value; } ! public void put (String name, Object value) ! throws IOException, IllegalArgumentException { ! ObjectStreamField field ! = currentObjectStreamClass.getField (name); ! if (field == null) ! throw new IllegalArgumentException (); if (value != null && ! ! field.getType ().isAssignableFrom (value.getClass ())) ! throw new IllegalArgumentException (); ! objs[field.getOffset ()] = value; } ! public void write (ObjectOutput out) throws IOException { // Apparently Block data is not used with PutField as per // empirical evidence against JDK 1.2. Also see Mauve test // java.io.ObjectInputOutput.Test.GetPutField. ! boolean oldmode = setBlockDataMode (false); ! out.write (prim_field_data); for (int i = 0; i < objs.length; ++ i) ! out.writeObject (objs[i]); ! setBlockDataMode (oldmode); } ! private void checkType (ObjectStreamField field, char type) throws IllegalArgumentException { ! if (TypeSignature.getEncodingOfClass (field.getType ()).charAt (0) != type) ! throw new IllegalArgumentException (); } }; // end PutFieldImpl --- 976,1019 ---- prim_field_data[off] = (byte)value; } ! public void put(String name, short value) { ! ObjectStreamField field = getField(name); ! checkType(field, 'S'); ! int off = field.getOffset(); prim_field_data[off++] = (byte)(value >>> 8); prim_field_data[off] = (byte)value; } ! public void put(String name, Object value) { ! ObjectStreamField field = getField(name); ! if (value != null && ! ! field.getType().isAssignableFrom(value.getClass ())) ! throw new IllegalArgumentException("Class " + value.getClass() + ! " cannot be cast to " + field.getType()); ! objs[field.getOffset()] = value; } ! public void write(ObjectOutput out) throws IOException { // Apparently Block data is not used with PutField as per // empirical evidence against JDK 1.2. Also see Mauve test // java.io.ObjectInputOutput.Test.GetPutField. ! boolean oldmode = setBlockDataMode(false); ! out.write(prim_field_data); for (int i = 0; i < objs.length; ++ i) ! out.writeObject(objs[i]); ! setBlockDataMode(oldmode); } ! private void checkType(ObjectStreamField field, char type) throws IllegalArgumentException { ! if (TypeSignature.getEncodingOfClass(field.getType()).charAt(0) ! != type) ! throw new IllegalArgumentException(); } }; // end PutFieldImpl *************** public class ObjectOutputStream extends *** 1016,1194 **** } ! public void writeFields () throws IOException { if (currentPutField == null) ! throw new NotActiveException ("writeFields can only be called after putFields has been called"); ! currentPutField.write (this); } // write out the block-data buffer, picking the correct header // depending on the size of the buffer ! private void writeBlockDataHeader (int size) throws IOException { if (size < 256) { ! realOutput.writeByte (TC_BLOCKDATA); ! realOutput.write (size); } else { ! realOutput.writeByte (TC_BLOCKDATALONG); ! realOutput.writeInt (size); } } // lookup the handle for OBJ, return null if OBJ doesn't have a // handle yet ! private Integer findHandle (Object obj) { ! return (Integer)OIDLookupTable.get (new ObjectIdentityWrapper (obj)); } // assigns the next availible handle to OBJ ! private int assignNewHandle (Object obj) { ! OIDLookupTable.put (new ObjectIdentityWrapper (obj), ! new Integer (nextOID)); return nextOID++; } // resets mapping from objects to handles ! private void clearHandles () { nextOID = baseWireHandle; ! OIDLookupTable.clear (); } // write out array size followed by each element of the array ! private void writeArraySizeAndElements (Object array, Class clazz) throws IOException { ! int length = Array.getLength (array); ! if (clazz.isPrimitive ()) { if (clazz == Boolean.TYPE) { boolean[] cast_array = (boolean[])array; realOutput.writeInt (length); ! for (int i=0; i < length; i++) ! realOutput.writeBoolean (cast_array[i]); return; } if (clazz == Byte.TYPE) { byte[] cast_array = (byte[])array; ! realOutput.writeInt (length); realOutput.write(cast_array, 0, length); return; } if (clazz == Character.TYPE) { char[] cast_array = (char[])array; ! realOutput.writeInt (length); ! for (int i=0; i < length; i++) ! realOutput.writeChar (cast_array[i]); return; } if (clazz == Double.TYPE) { double[] cast_array = (double[])array; ! realOutput.writeInt (length); ! for (int i=0; i < length; i++) ! realOutput.writeDouble (cast_array[i]); return; } if (clazz == Float.TYPE) { float[] cast_array = (float[])array; ! realOutput.writeInt (length); ! for (int i=0; i < length; i++) ! realOutput.writeFloat (cast_array[i]); return; } if (clazz == Integer.TYPE) { int[] cast_array = (int[])array; ! realOutput.writeInt (length); ! for (int i=0; i < length; i++) ! realOutput.writeInt (cast_array[i]); return; } if (clazz == Long.TYPE) { long[] cast_array = (long[])array; realOutput.writeInt (length); ! for (int i=0; i < length; i++) ! realOutput.writeLong (cast_array[i]); return; } if (clazz == Short.TYPE) { short[] cast_array = (short[])array; realOutput.writeInt (length); ! for (int i=0; i < length; i++) ! realOutput.writeShort (cast_array[i]); return; } } else { Object[] cast_array = (Object[])array; ! realOutput.writeInt (length); ! for (int i=0; i < length; i++) ! writeObject (cast_array[i]); } } // writes out FIELDS of OBJECT for the specified ObjectStreamClass. // FIELDS are already in canonical order. ! private void writeFields (Object obj, ObjectStreamClass osc) throws IOException { ObjectStreamField[] fields = osc.fields; ! boolean oldmode = setBlockDataMode (false); String field_name; Class type; ! for (int i=0; i < fields.length; i++) { ! field_name = fields[i].getName (); ! type = fields[i].getType (); if (type == Boolean.TYPE) ! realOutput.writeBoolean (getBooleanField (obj, osc.forClass(), field_name)); else if (type == Byte.TYPE) ! realOutput.writeByte (getByteField (obj, osc.forClass(), field_name)); else if (type == Character.TYPE) ! realOutput.writeChar (getCharField (obj, osc.forClass(), field_name)); else if (type == Double.TYPE) ! realOutput.writeDouble (getDoubleField (obj, osc.forClass(), field_name)); else if (type == Float.TYPE) ! realOutput.writeFloat (getFloatField (obj, osc.forClass(), field_name)); else if (type == Integer.TYPE) ! realOutput.writeInt (getIntField (obj, osc.forClass(), field_name)); else if (type == Long.TYPE) ! realOutput.writeLong (getLongField (obj, osc.forClass(), field_name)); else if (type == Short.TYPE) ! realOutput.writeShort (getShortField (obj, osc.forClass(), field_name)); else ! writeObject (getObjectField (obj, osc.forClass(), field_name, ! fields[i].getTypeString ())); } ! setBlockDataMode (oldmode); } // Toggles writing primitive data to block-data buffer. ! private boolean setBlockDataMode (boolean on) throws IOException { if (on == writeDataAsBlocks) return on; --- 1022,1202 ---- } ! public void writeFields() throws IOException { if (currentPutField == null) ! throw new NotActiveException("writeFields can only be called after putFields has been called"); ! markFieldsWritten(); ! currentPutField.write(this); } // write out the block-data buffer, picking the correct header // depending on the size of the buffer ! private void writeBlockDataHeader(int size) throws IOException { if (size < 256) { ! realOutput.writeByte(TC_BLOCKDATA); ! realOutput.write(size); } else { ! realOutput.writeByte(TC_BLOCKDATALONG); ! realOutput.writeInt(size); } } // lookup the handle for OBJ, return null if OBJ doesn't have a // handle yet ! private Integer findHandle(Object obj) { ! return (Integer)OIDLookupTable.get(new ObjectIdentityWrapper(obj)); } // assigns the next availible handle to OBJ ! private int assignNewHandle(Object obj) { ! OIDLookupTable.put(new ObjectIdentityWrapper(obj), ! new Integer(nextOID)); return nextOID++; } // resets mapping from objects to handles ! private void clearHandles() { nextOID = baseWireHandle; ! OIDLookupTable.clear(); } // write out array size followed by each element of the array ! private void writeArraySizeAndElements(Object array, Class clazz) throws IOException { ! int length = Array.getLength(array); ! if (clazz.isPrimitive()) { if (clazz == Boolean.TYPE) { boolean[] cast_array = (boolean[])array; realOutput.writeInt (length); ! for (int i = 0; i < length; i++) ! realOutput.writeBoolean(cast_array[i]); return; } if (clazz == Byte.TYPE) { byte[] cast_array = (byte[])array; ! realOutput.writeInt(length); realOutput.write(cast_array, 0, length); return; } if (clazz == Character.TYPE) { char[] cast_array = (char[])array; ! realOutput.writeInt(length); ! for (int i = 0; i < length; i++) ! realOutput.writeChar(cast_array[i]); return; } if (clazz == Double.TYPE) { double[] cast_array = (double[])array; ! realOutput.writeInt(length); ! for (int i = 0; i < length; i++) ! realOutput.writeDouble(cast_array[i]); return; } if (clazz == Float.TYPE) { float[] cast_array = (float[])array; ! realOutput.writeInt(length); ! for (int i = 0; i < length; i++) ! realOutput.writeFloat(cast_array[i]); return; } if (clazz == Integer.TYPE) { int[] cast_array = (int[])array; ! realOutput.writeInt(length); ! for (int i = 0; i < length; i++) ! realOutput.writeInt(cast_array[i]); return; } if (clazz == Long.TYPE) { long[] cast_array = (long[])array; realOutput.writeInt (length); ! for (int i = 0; i < length; i++) ! realOutput.writeLong(cast_array[i]); return; } if (clazz == Short.TYPE) { short[] cast_array = (short[])array; realOutput.writeInt (length); ! for (int i = 0; i < length; i++) ! realOutput.writeShort(cast_array[i]); return; } } else { Object[] cast_array = (Object[])array; ! realOutput.writeInt(length); ! for (int i = 0; i < length; i++) ! writeObject(cast_array[i]); } } // writes out FIELDS of OBJECT for the specified ObjectStreamClass. // FIELDS are already in canonical order. ! private void writeFields(Object obj, ObjectStreamClass osc) throws IOException { ObjectStreamField[] fields = osc.fields; ! boolean oldmode = setBlockDataMode(false); String field_name; Class type; ! ! for (int i = 0; i < fields.length; i++) { ! field_name = fields[i].getName(); ! type = fields[i].getType(); if (type == Boolean.TYPE) ! realOutput.writeBoolean(getBooleanField(obj, osc.forClass(), field_name)); else if (type == Byte.TYPE) ! realOutput.writeByte(getByteField(obj, osc.forClass(), field_name)); else if (type == Character.TYPE) ! realOutput.writeChar(getCharField(obj, osc.forClass(), field_name)); else if (type == Double.TYPE) ! realOutput.writeDouble(getDoubleField(obj, osc.forClass(), field_name)); else if (type == Float.TYPE) ! realOutput.writeFloat(getFloatField(obj, osc.forClass(), field_name)); else if (type == Integer.TYPE) ! realOutput.writeInt(getIntField(obj, osc.forClass(), field_name)); else if (type == Long.TYPE) ! realOutput.writeLong(getLongField(obj, osc.forClass(), field_name)); else if (type == Short.TYPE) ! realOutput.writeShort(getShortField(obj, osc.forClass(), field_name)); else ! writeObject(getObjectField(obj, osc.forClass(), field_name, ! fields[i].getTypeString ())); } ! setBlockDataMode(oldmode); } // Toggles writing primitive data to block-data buffer. ! private boolean setBlockDataMode(boolean on) throws IOException { if (on == writeDataAsBlocks) return on; *************** public class ObjectOutputStream extends *** 1206,1222 **** } ! private void callWriteMethod (Object obj, ObjectStreamClass osc) throws IOException { Class klass = osc.forClass(); try { Class classArgs[] = {ObjectOutputStream.class}; ! Method m = getMethod (klass, "writeObject", classArgs); ! if (m == null) ! return; Object args[] = {this}; ! m.invoke (obj, args); } catch (InvocationTargetException x) { --- 1214,1234 ---- } ! private void callWriteMethod(Object obj, ObjectStreamClass osc) ! throws IOException { Class klass = osc.forClass(); + currentPutField = null; try { Class classArgs[] = {ObjectOutputStream.class}; ! Method m = getMethod(klass, "writeObject", classArgs); Object args[] = {this}; ! m.invoke(obj, args); ! } ! catch (NoSuchMethodException nsme) ! { ! // Nothing. } catch (InvocationTargetException x) { *************** public class ObjectOutputStream extends *** 1227,1258 **** if (exception instanceof IOException) throw (IOException) exception; ! throw new IOException ("Exception thrown from writeObject() on " + ! klass + ": " + exception.getClass().getName()); } catch (Exception x) { ! throw new IOException ("Failure invoking writeObject() on " + ! klass + ": " + x.getClass().getName()); } } ! private boolean getBooleanField (Object obj, Class klass, String field_name) throws IOException { try { ! Field f = getField (klass, field_name); ! boolean b = f.getBoolean (obj); return b; } catch (Exception _) { ! throw new IOException (); ! } } ! private byte getByteField (Object obj, Class klass, String field_name) throws IOException { try { --- 1239,1286 ---- if (exception instanceof IOException) throw (IOException) exception; ! IOException ioe ! = new IOException("Exception thrown from writeObject() on " + ! klass + ": " + exception.getClass().getName()); ! ioe.initCause(exception); ! throw ioe; } catch (Exception x) { ! IOException ioe ! = new IOException("Failure invoking writeObject() on " + ! klass + ": " + x.getClass().getName()); ! ioe.initCause(x); ! throw ioe; } } ! private boolean getBooleanField(Object obj, Class klass, String field_name) throws IOException { try { ! Field f = getField(klass, field_name); ! boolean b = f.getBoolean(obj); return b; } + catch (IllegalArgumentException _) + { + throw new InvalidClassException + ("invalid requested type for field " + field_name + " in class " + klass.getName()); + } + catch (IOException e) + { + throw e; + } catch (Exception _) { ! throw new IOException("Unexpected exception " + _); ! } } ! private byte getByteField (Object obj, Class klass, String field_name) ! throws IOException { try { *************** public class ObjectOutputStream extends *** 1260,1272 **** byte b = f.getByte (obj); return b; } catch (Exception _) { ! throw new IOException (); } } ! private char getCharField (Object obj, Class klass, String field_name) throws IOException { try { --- 1288,1310 ---- byte b = f.getByte (obj); return b; } + catch (IllegalArgumentException _) + { + throw new InvalidClassException + ("invalid requested type for field " + field_name + " in class " + klass.getName()); + } + catch (IOException e) + { + throw e; + } catch (Exception _) { ! throw new IOException("Unexpected exception " + _); } } ! private char getCharField (Object obj, Class klass, String field_name) ! throws IOException { try { *************** public class ObjectOutputStream extends *** 1274,1282 **** char b = f.getChar (obj); return b; } catch (Exception _) { ! throw new IOException (); } } --- 1312,1329 ---- char b = f.getChar (obj); return b; } + catch (IllegalArgumentException _) + { + throw new InvalidClassException + ("invalid requested type for field " + field_name + " in class " + klass.getName()); + } + catch (IOException e) + { + throw e; + } catch (Exception _) { ! throw new IOException("Unexpected exception " + _); } } *************** public class ObjectOutputStream extends *** 1289,1297 **** double b = f.getDouble (obj); return b; } catch (Exception _) { ! throw new IOException (); } } --- 1336,1353 ---- double b = f.getDouble (obj); return b; } + catch (IllegalArgumentException _) + { + throw new InvalidClassException + ("invalid requested type for field " + field_name + " in class " + klass.getName()); + } + catch (IOException e) + { + throw e; + } catch (Exception _) { ! throw new IOException("Unexpected exception " + _); } } *************** public class ObjectOutputStream extends *** 1304,1316 **** float b = f.getFloat (obj); return b; } catch (Exception _) { ! throw new IOException (); ! } } ! private int getIntField (Object obj, Class klass, String field_name) throws IOException { try { --- 1360,1382 ---- float b = f.getFloat (obj); return b; } + catch (IllegalArgumentException _) + { + throw new InvalidClassException + ("invalid requested type for field " + field_name + " in class " + klass.getName()); + } + catch (IOException e) + { + throw e; + } catch (Exception _) { ! throw new IOException("Unexpected exception " + _); ! } } ! private int getIntField (Object obj, Class klass, String field_name) ! throws IOException { try { *************** public class ObjectOutputStream extends *** 1318,1330 **** int b = f.getInt (obj); return b; } catch (Exception _) { ! throw new IOException (); ! } } ! private long getLongField (Object obj, Class klass, String field_name) throws IOException { try { --- 1384,1406 ---- int b = f.getInt (obj); return b; } + catch (IllegalArgumentException _) + { + throw new InvalidClassException + ("invalid requested type for field " + field_name + " in class " + klass.getName()); + } + catch (IOException e) + { + throw e; + } catch (Exception _) { ! throw new IOException("Unexpected exception " + _); ! } } ! private long getLongField (Object obj, Class klass, String field_name) ! throws IOException { try { *************** public class ObjectOutputStream extends *** 1332,1340 **** long b = f.getLong (obj); return b; } catch (Exception _) { ! throw new IOException (); } } --- 1408,1425 ---- long b = f.getLong (obj); return b; } + catch (IllegalArgumentException _) + { + throw new InvalidClassException + ("invalid requested type for field " + field_name + " in class " + klass.getName()); + } + catch (IOException e) + { + throw e; + } catch (Exception _) { ! throw new IOException("Unexpected exception " + _); } } *************** public class ObjectOutputStream extends *** 1347,1356 **** short b = f.getShort (obj); return b; } catch (Exception _) { ! throw new IOException (); ! } } private Object getObjectField (Object obj, Class klass, String field_name, --- 1432,1450 ---- short b = f.getShort (obj); return b; } + catch (IllegalArgumentException _) + { + throw new InvalidClassException + ("invalid requested type for field " + field_name + " in class " + klass.getName()); + } + catch (IOException e) + { + throw e; + } catch (Exception _) { ! throw new IOException("Unexpected exception " + _); ! } } private Object getObjectField (Object obj, Class klass, String field_name, *************** public class ObjectOutputStream extends *** 1359,1384 **** try { Field f = getField (klass, field_name); Object o = f.get (obj); // FIXME: We should check the type_code here return o; } ! catch (Exception _) { throw new IOException (); } } private static Field getField (Class klass, String name) ! throws java.lang.NoSuchFieldException { ! return klass.getDeclaredField(name); } private static Method getMethod (Class klass, String name, Class[] args) throws java.lang.NoSuchMethodException { ! return klass.getDeclaredMethod(name, args); } // this value comes from 1.2 spec, but is used in 1.1 as well --- 1453,1515 ---- try { Field f = getField (klass, field_name); + ObjectStreamField of = new ObjectStreamField(f.getName(), f.getType()); + + if (of.getTypeString() == null || + !of.getTypeString().equals(type_code)) + throw new InvalidClassException + ("invalid type code for " + field_name + " in class " + klass.getName()); + Object o = f.get (obj); // FIXME: We should check the type_code here return o; } ! catch (IOException e) ! { ! throw e; ! } ! catch (Exception e) { throw new IOException (); } } private static Field getField (Class klass, String name) ! throws java.io.InvalidClassException { ! try ! { ! final Field f = klass.getDeclaredField(name); ! AccessController.doPrivileged(new PrivilegedAction() ! { ! public Object run() ! { ! f.setAccessible(true); ! return null; ! } ! }); ! return f; ! } ! catch (java.lang.NoSuchFieldException e) ! { ! throw new InvalidClassException ! ("no field called " + name + " in class " + klass.getName()); ! } } private static Method getMethod (Class klass, String name, Class[] args) throws java.lang.NoSuchMethodException { ! final Method m = klass.getDeclaredMethod(name, args); ! AccessController.doPrivileged(new PrivilegedAction() ! { ! public Object run() ! { ! m.setAccessible(true); ! return null; ! } ! }); ! return m; } // this value comes from 1.2 spec, but is used in 1.1 as well *************** public class ObjectOutputStream extends *** 1407,1413 **** { if (Configuration.INIT_LOAD_LIBRARY) { ! System.loadLibrary ("javaio"); } } } --- 1538,1544 ---- { if (Configuration.INIT_LOAD_LIBRARY) { ! System.loadLibrary("javaio"); } } } diff -Nrc3pad gcc-3.3.3/libjava/java/io/ObjectStreamClass.java gcc-3.4.0/libjava/java/io/ObjectStreamClass.java *** gcc-3.3.3/libjava/java/io/ObjectStreamClass.java 2003-03-14 12:06:41.000000000 +0000 --- gcc-3.4.0/libjava/java/io/ObjectStreamClass.java 2003-12-30 15:51:15.000000000 +0000 *************** *** 2,40 **** about serialized objects. Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. ! This file is part of GNU Classpath. ! GNU Classpath is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! GNU Classpath is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with GNU Classpath; see the file COPYING. If not, write to the ! Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ! 02111-1307 USA. ! Linking this library statically or dynamically with other modules is ! making a combined work based on this library. Thus, the terms and ! conditions of the GNU General Public License cover the whole ! combination. ! As a special exception, the copyright holders of this library give you ! permission to link this library with independent modules to produce an ! executable, regardless of the license terms of these independent ! modules, and to copy and distribute the resulting executable under ! terms of your choice, provided that you also meet, for each linked ! independent module, the terms and conditions of the license of that ! module. An independent module is a module which is not derived from ! or based on this library. If you modify this library, you may extend ! this exception to your version of the library, but you are not ! obligated to do so. If you do not wish to do so, delete this ! exception statement from your version. */ package java.io; --- 2,40 ---- about serialized objects. Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. ! This file is part of GNU Classpath. ! GNU Classpath is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! GNU Classpath is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with GNU Classpath; see the file COPYING. If not, write to the ! Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ! 02111-1307 USA. ! Linking this library statically or dynamically with other modules is ! making a combined work based on this library. Thus, the terms and ! conditions of the GNU General Public License cover the whole ! combination. ! As a special exception, the copyright holders of this library give you ! permission to link this library with independent modules to produce an ! executable, regardless of the license terms of these independent ! modules, and to copy and distribute the resulting executable under ! terms of your choice, provided that you also meet, for each linked ! independent module, the terms and conditions of the license of that ! module. An independent module is a module which is not derived from ! or based on this library. If you modify this library, you may extend ! this exception to your version of the library, but you are not ! obligated to do so. If you do not wish to do so, delete this ! exception statement from your version. */ package java.io; *************** import gnu.java.security.provider.Gnu; *** 61,83 **** public class ObjectStreamClass implements Serializable { /** ! Returns the ObjectStreamClass for cl. ! If cl is null, or is not Serializable, ! null is returned. ObjectStreamClass's are memorized; ! later calls to this method with the same class will return the ! same ObjectStreamClass object and no recalculation ! will be done. ! ! @see java.io.Serializable ! */ ! public static ObjectStreamClass lookup (Class cl) { if (cl == null) return null; ! if (! (Serializable.class).isAssignableFrom (cl)) return null; ! return lookupForClassObject (cl); } /** --- 61,83 ---- public class ObjectStreamClass implements Serializable { /** ! * Returns the ObjectStreamClass for cl. ! * If cl is null, or is not Serializable, ! * null is returned. ObjectStreamClass's are memorized; ! * later calls to this method with the same class will return the ! * same ObjectStreamClass object and no recalculation ! * will be done. ! * ! * @see java.io.Serializable ! */ ! public static ObjectStreamClass lookup(Class cl) { if (cl == null) return null; ! if (! (Serializable.class).isAssignableFrom(cl)) return null; ! return lookupForClassObject(cl); } /** *************** public class ObjectStreamClass implement *** 85,141 **** * we have a java.lang.Class object C for class A, though A is not * serializable, but it's okay to serialize C. */ ! static ObjectStreamClass lookupForClassObject (Class cl) { if (cl == null) return null; ! ObjectStreamClass osc = (ObjectStreamClass)classLookupTable.get (cl); if (osc != null) return osc; else ! { ! osc = new ObjectStreamClass (cl); ! classLookupTable.put (cl, osc); ! return osc; ! } } /** ! Returns the name of the class that this ! ObjectStreamClass represents. ! */ ! public String getName () { return name; } /** ! Returns the class that this ObjectStreamClass ! represents. Null could be returned if this ! ObjectStreamClass was read from an ! ObjectInputStream and the class it represents cannot ! be found or loaded. ! ! @see java.io.ObjectInputStream ! */ ! public Class forClass () { return clazz; } /** ! Returns the serial version stream-unique identifier for the class ! represented by this ObjectStreamClass. This SUID is ! either defined by the class as static final long ! serialVersionUID or is calculated as specified in ! Javasoft's "Object Serialization Specification" XXX: add reference ! */ ! public long getSerialVersionUID () { return uid; } --- 85,141 ---- * we have a java.lang.Class object C for class A, though A is not * serializable, but it's okay to serialize C. */ ! static ObjectStreamClass lookupForClassObject(Class cl) { if (cl == null) return null; ! ObjectStreamClass osc = (ObjectStreamClass) classLookupTable.get(cl); if (osc != null) return osc; else ! { ! osc = new ObjectStreamClass(cl); ! classLookupTable.put(cl, osc); ! return osc; ! } } /** ! * Returns the name of the class that this ! * ObjectStreamClass represents. ! */ ! public String getName() { return name; } /** ! * Returns the class that this ObjectStreamClass ! * represents. Null could be returned if this ! * ObjectStreamClass was read from an ! * ObjectInputStream and the class it represents cannot ! * be found or loaded. ! * ! * @see java.io.ObjectInputStream ! */ ! public Class forClass() { return clazz; } /** ! * Returns the serial version stream-unique identifier for the class ! * represented by this ObjectStreamClass. This SUID is ! * either defined by the class as static final long ! * serialVersionUID or is calculated as specified in ! * Javasoft's "Object Serialization Specification" XXX: add reference ! */ ! public long getSerialVersionUID() { return uid; } *************** public class ObjectStreamClass implement *** 145,154 **** // of the class represented by this ObjectStreamClass. The Fields // are sorted by name. // XXX doc ! public ObjectStreamField[] getFields () { ObjectStreamField[] copy = new ObjectStreamField[ fields.length ]; ! System.arraycopy (fields, 0, copy, 0, fields.length); return copy; } --- 145,154 ---- // of the class represented by this ObjectStreamClass. The Fields // are sorted by name. // XXX doc ! public ObjectStreamField[] getFields() { ObjectStreamField[] copy = new ObjectStreamField[ fields.length ]; ! System.arraycopy(fields, 0, copy, 0, fields.length); return copy; } *************** public class ObjectStreamClass implement *** 158,180 **** // primitiveness. public ObjectStreamField getField (String name) { ! for (int i=0; i < fields.length; i++) ! if (fields[i].getName ().equals (name)) return fields[i]; return null; } /** ! Returns a textual representation of this ! ObjectStreamClass object including the name of the ! class it represents as well as that class's serial version ! stream-unique identifier. ! ! @see getSerialVersionUID () ! @see getName () ! */ ! public String toString () { return "java.io.ObjectStreamClass< " + name + ", " + uid + " >"; } --- 158,180 ---- // primitiveness. public ObjectStreamField getField (String name) { ! for (int i = 0; i < fields.length; i++) ! if (fields[i].getName().equals(name)) return fields[i]; return null; } /** ! * Returns a textual representation of this ! * ObjectStreamClass object including the name of the ! * class it represents as well as that class's serial version ! * stream-unique identifier. ! * ! * @see #getSerialVersionUID() ! * @see #getName() ! */ ! public String toString() { return "java.io.ObjectStreamClass< " + name + ", " + uid + " >"; } *************** public class ObjectStreamClass implement *** 187,193 **** // // This method is used by the class to override default // serialization behavior. ! boolean hasWriteMethod () { return (flags & ObjectStreamConstants.SC_WRITE_METHOD) != 0; } --- 187,193 ---- // // This method is used by the class to override default // serialization behavior. ! boolean hasWriteMethod() { return (flags & ObjectStreamConstants.SC_WRITE_METHOD) != 0; } *************** public class ObjectStreamClass implement *** 200,223 **** // // This method is used by the class to override default // serialization behavior. ! boolean hasReadMethod () { ! try { ! Class[] readObjectParams = { ObjectInputStream.class }; ! forClass ().getDeclaredMethod ("readObject", readObjectParams); ! return true; } ! catch (NoSuchMethodException e) { ! return false; } } // Returns true iff the class that this ObjectStreamClass represents // implements Serializable but does *not* implement Externalizable. ! boolean isSerializable () { return (flags & ObjectStreamConstants.SC_SERIALIZABLE) != 0; } --- 200,223 ---- // // This method is used by the class to override default // serialization behavior. ! boolean hasReadMethod() { ! try { ! Class[] readObjectParams = { ObjectInputStream.class }; ! forClass().getDeclaredMethod("readObject", readObjectParams); ! return true; } ! catch (NoSuchMethodException e) { ! return false; } } // Returns true iff the class that this ObjectStreamClass represents // implements Serializable but does *not* implement Externalizable. ! boolean isSerializable() { return (flags & ObjectStreamConstants.SC_SERIALIZABLE) != 0; } *************** public class ObjectStreamClass implement *** 225,231 **** // Returns true iff the class that this ObjectStreamClass represents // implements Externalizable. ! boolean isExternalizable () { return (flags & ObjectStreamConstants.SC_EXTERNALIZABLE) != 0; } --- 225,231 ---- // Returns true iff the class that this ObjectStreamClass represents // implements Externalizable. ! boolean isExternalizable() { return (flags & ObjectStreamConstants.SC_EXTERNALIZABLE) != 0; } *************** public class ObjectStreamClass implement *** 235,241 **** // class that is the superclass of the class this // ObjectStreamClass represents. If the superclass is // not Serializable, null is returned. ! ObjectStreamClass getSuper () { return superClass; } --- 235,241 ---- // class that is the superclass of the class this // ObjectStreamClass represents. If the superclass is // not Serializable, null is returned. ! ObjectStreamClass getSuper() { return superClass; } *************** public class ObjectStreamClass implement *** 245,276 **** // classes of CLAZZ and CLAZZ itself in order from most super to // CLAZZ. ObjectStreamClass[0] is the highest superclass of CLAZZ // that is serializable. ! static ObjectStreamClass[] getObjectStreamClasses (Class clazz) { ! ObjectStreamClass osc = ObjectStreamClass.lookup (clazz); ! ! ObjectStreamClass[] ret_val; if (osc == null) return new ObjectStreamClass[0]; else - { - Vector oscs = new Vector (); - - while (osc != null) { ! oscs.addElement (osc); ! osc = osc.getSuper (); ! } ! int count = oscs.size (); ! ObjectStreamClass[] sorted_oscs = new ObjectStreamClass[ count ]; ! for (int i = count - 1; i >= 0; i--) ! sorted_oscs[ count - i - 1 ] = (ObjectStreamClass)oscs.elementAt (i); ! return sorted_oscs; ! } } --- 245,274 ---- // classes of CLAZZ and CLAZZ itself in order from most super to // CLAZZ. ObjectStreamClass[0] is the highest superclass of CLAZZ // that is serializable. ! static ObjectStreamClass[] getObjectStreamClasses(Class clazz) { ! ObjectStreamClass osc = ObjectStreamClass.lookup(clazz); if (osc == null) return new ObjectStreamClass[0]; else { ! Vector oscs = new Vector(); ! while (osc != null) ! { ! oscs.addElement (osc); ! osc = osc.getSuper(); ! } ! int count = oscs.size(); ! ObjectStreamClass[] sorted_oscs = new ObjectStreamClass[ count ]; ! for (int i = count - 1; i >= 0; i--) ! sorted_oscs[ count - i - 1 ] = (ObjectStreamClass) oscs.elementAt(i); ! ! return sorted_oscs; ! } } *************** public class ObjectStreamClass implement *** 278,291 **** // properties of the class represented by this ObjectStreamClass. // The bit-flags that could be present are those defined in // ObjectStreamConstants that begin with `SC_' ! int getFlags () { return flags; } ! ObjectStreamClass (String name, long uid, byte flags, ! ObjectStreamField[] fields) { this.name = name; this.uid = uid; --- 276,289 ---- // properties of the class represented by this ObjectStreamClass. // The bit-flags that could be present are those defined in // ObjectStreamConstants that begin with `SC_' ! int getFlags() { return flags; } ! ObjectStreamClass(String name, long uid, byte flags, ! ObjectStreamField[] fields) { this.name = name; this.uid = uid; *************** public class ObjectStreamClass implement *** 293,303 **** this.fields = fields; } ! void setClass (Class cl) throws InvalidClassException { this.clazz = cl; ! long class_uid = getClassUID (cl); if (uid == 0) uid = class_uid; else --- 291,312 ---- this.fields = fields; } ! /** ! * This method builds the internal description corresponding to a Java Class. ! * As the constructor only assign a name to the current ObjectStreamClass instance, ! * that method sets the serial UID, chose the fields which will be serialized, ! * and compute the position of the fields in the serialized stream. ! * ! * @param cl The Java class which is used as a reference for building the descriptor. ! * @param superClass The descriptor of the super class for this class descriptor. ! * @throws InvalidClassException if an incompatibility between computed UID and ! * already set UID is found. ! */ ! void setClass(Class cl, ObjectStreamClass superClass) throws InvalidClassException { this.clazz = cl; ! long class_uid = getClassUID(cl); if (uid == 0) uid = class_uid; else *************** public class ObjectStreamClass implement *** 313,324 **** } } ! isProxyClass = clazz != null && Proxy.isProxyClass (clazz); ! ObjectStreamClass osc = (ObjectStreamClass)classLookupTable.get (clazz); ! if (osc == null) ! classLookupTable.put (clazz, this); ! superClass = lookupForClassObject (clazz.getSuperclass ()); ! calculateOffsets (); } void setSuperclass (ObjectStreamClass osc) --- 322,411 ---- } } ! isProxyClass = clazz != null && Proxy.isProxyClass(clazz); ! this.superClass = superClass; ! calculateOffsets(); ! ! try ! { ! ObjectStreamField[] exportedFields = getSerialPersistentFields (clazz); ! ! if (exportedFields == null) ! return; ! ! ObjectStreamField[] newFieldList = new ObjectStreamField[exportedFields.length + fields.length]; ! int i, j, k; ! ! /* We now check the import fields against the exported fields. ! * There should not be contradiction (e.g. int x and String x) ! * but extra virtual fields can be added to the class. ! */ ! ! Arrays.sort(exportedFields); ! ! i = 0; j = 0; k = 0; ! while (i < fields.length && j < exportedFields.length) ! { ! int comp = fields[i].getName().compareTo(exportedFields[j].getName()); ! ! if (comp < 0) ! { ! newFieldList[k] = fields[i]; ! fields[i].setPersistent(false); ! fields[i].setToSet(false); ! i++; ! } ! else if (comp > 0) ! { ! /* field not found in imported fields. We add it ! * in the list of supported fields. ! */ ! newFieldList[k] = exportedFields[j]; ! newFieldList[k].setPersistent(true); ! newFieldList[k].setToSet(false); ! j++; ! } ! else ! { ! if (!fields[i].getType().equals(exportedFields[j].getType())) ! throw new InvalidClassException ! ("serialPersistentFields must be compatible with" + ! " imported fields (about " + fields[i].getName() + ")"); ! newFieldList[k] = fields[i]; ! fields[i].setPersistent(true); ! i++; ! j++; ! } ! k++; ! } ! ! if (i < fields.length) ! for (;i"); ! data_out.writeInt (Modifier.STATIC); ! data_out.writeUTF ("()V"); ! } ! Constructor constructor; ! Constructor[] constructors = cl.getDeclaredConstructors (); ! Arrays.sort (constructors, memberComparator); ! for (int i=0; i < constructors.length; i++) ! { ! constructor = constructors[i]; ! modifiers = constructor.getModifiers (); ! if (Modifier.isPrivate (modifiers)) ! continue; ! data_out.writeUTF (""); ! data_out.writeInt (modifiers); ! // the replacement of '/' with '.' was needed to make computed ! // SUID's agree with those computed by JDK ! data_out.writeUTF ( ! TypeSignature.getEncodingOfConstructor (constructor).replace ('/','.')); ! } ! Method method; ! Method[] methods = cl.getDeclaredMethods (); ! Arrays.sort (methods, memberComparator); ! for (int i=0; i < methods.length; i++) ! { ! method = methods[i]; ! modifiers = method.getModifiers (); ! if (Modifier.isPrivate (modifiers)) ! continue; ! data_out.writeUTF (method.getName ()); ! data_out.writeInt (modifiers); ! // the replacement of '/' with '.' was needed to make computed ! // SUID's agree with those computed by JDK ! data_out.writeUTF ( ! TypeSignature.getEncodingOfMethod (method).replace ('/', '.')); ! } ! data_out.close (); ! byte[] sha = md.digest (); ! long result = 0; ! int len = sha.length < 8 ? sha.length : 8; ! for (int i=0; i < len; i++) ! result += (long)(sha[i] & 0xFF) << (8 * i); ! return result; ! } ! catch (NoSuchAlgorithmException e) ! { ! throw new RuntimeException ("The SHA algorithm was not found to use in computing the Serial Version UID for class " ! + cl.getName (), e); ! } ! catch (IOException ioe) ! { ! throw new RuntimeException (ioe); ! } ! } ! // Returns the value of CLAZZ's private static final field named ! // `serialPersistentFields'. ! private ObjectStreamField[] getSerialPersistentFields (Class clazz) ! { ! ObjectStreamField[] o = null; ! try ! { ! // Use getDeclaredField rather than getField for the same reason ! // as above in getDefinedSUID. ! Field f = clazz.getDeclaredField ("getSerialPersistentFields"); ! f.setAccessible(true); ! o = (ObjectStreamField[])f.get (null); } ! catch (java.lang.NoSuchFieldException e) { } ! catch (java.lang.IllegalAccessException e) { } ! return o; } public static final ObjectStreamField[] NO_FIELDS = {}; ! private static Hashtable classLookupTable = new Hashtable (); ! private static final NullOutputStream nullOutputStream = new NullOutputStream (); ! private static final Comparator interfaceComparator = new InterfaceComparator (); ! private static final Comparator memberComparator = new MemberComparator (); private static final Class[] writeMethodArgTypes = { java.io.ObjectOutputStream.class }; --- 413,757 ---- superClass = osc; } ! void calculateOffsets() { int i; ObjectStreamField field; primFieldSize = 0; int fcount = fields.length; for (i = 0; i < fcount; ++ i) { ! field = fields[i]; ! ! if (! field.isPrimitive()) break; + + field.setOffset(primFieldSize); + switch (field.getTypeCode()) + { + case 'B': + case 'Z': + ++ primFieldSize; + break; + case 'C': + case 'S': + primFieldSize += 2; + break; + case 'I': + case 'F': + primFieldSize += 4; + break; + case 'D': + case 'J': + primFieldSize += 8; + break; + } } for (objectFieldCount = 0; i < fcount; ++ i) ! fields[i].setOffset(objectFieldCount++); } ! private ObjectStreamClass(Class cl) { uid = 0; flags = 0; ! isProxyClass = Proxy.isProxyClass(cl); clazz = cl; ! name = cl.getName(); ! setFlags(cl); ! setFields(cl); // to those class nonserializable, its uid field is 0 ! if ( (Serializable.class).isAssignableFrom(cl) && !isProxyClass) ! uid = getClassUID(cl); ! superClass = lookup(cl.getSuperclass()); } // Sets bits in flags according to features of CL. ! private void setFlags(Class cl) { ! if ((java.io.Externalizable.class).isAssignableFrom(cl)) flags |= ObjectStreamConstants.SC_EXTERNALIZABLE; ! else if ((java.io.Serializable.class).isAssignableFrom(cl)) // only set this bit if CL is NOT Externalizable flags |= ObjectStreamConstants.SC_SERIALIZABLE; try ! { ! Method writeMethod = cl.getDeclaredMethod("writeObject", ! writeMethodArgTypes); ! int modifiers = writeMethod.getModifiers(); ! if (writeMethod.getReturnType() == Void.TYPE ! && Modifier.isPrivate(modifiers) ! && !Modifier.isStatic(modifiers)) ! flags |= ObjectStreamConstants.SC_WRITE_METHOD; ! } ! catch(NoSuchMethodException oh_well) ! { ! } } // Sets fields to be a sorted array of the serializable fields of // clazz. ! private void setFields(Class cl) { ! if (!isSerializable() || isExternalizable()) ! { ! fields = NO_FIELDS; ! return; ! } try { ! Field serialPersistentFields = ! cl.getDeclaredField("serialPersistentFields"); ! serialPersistentFields.setAccessible(true); ! int modifiers = serialPersistentFields.getModifiers(); ! ! if (Modifier.isStatic(modifiers) ! && Modifier.isFinal(modifiers) ! && Modifier.isPrivate(modifiers)) ! { ! fields = getSerialPersistentFields(cl); ! if (fields != null) ! { ! Arrays.sort (fields); ! calculateOffsets(); ! return; ! } ! } } catch (NoSuchFieldException ignore) ! { ! } ! catch (IllegalAccessException ignore) ! { ! } int num_good_fields = 0; ! Field[] all_fields = cl.getDeclaredFields(); int modifiers; // set non-serializable fields to null in all_fields ! for (int i = 0; i < all_fields.length; i++) ! { ! modifiers = all_fields[i].getModifiers(); ! if (Modifier.isTransient(modifiers) ! || Modifier.isStatic(modifiers)) ! all_fields[i] = null; ! else ! num_good_fields++; ! } // make a copy of serializable (non-null) fields fields = new ObjectStreamField[ num_good_fields ]; ! for (int from = 0, to = 0; from < all_fields.length; from++) if (all_fields[from] != null) ! { ! Field f = all_fields[from]; ! fields[to] = new ObjectStreamField(f.getName(), f.getType()); ! to++; ! } ! Arrays.sort(fields); ! calculateOffsets(); } // Returns the serial version UID defined by class, or if that // isn't present, calculates value of serial version UID. ! private long getClassUID(Class cl) { try ! { ! // Use getDeclaredField rather than getField, since serialVersionUID ! // may not be public AND we only want the serialVersionUID of this ! // class, not a superclass or interface. ! Field suid = cl.getDeclaredField("serialVersionUID"); ! suid.setAccessible(true); ! int modifiers = suid.getModifiers(); ! if (Modifier.isStatic(modifiers) ! && Modifier.isFinal(modifiers) ! && suid.getType() == Long.TYPE) ! return suid.getLong(null); ! } catch (NoSuchFieldException ignore) ! { ! } catch (IllegalAccessException ignore) ! { ! } // cl didn't define serialVersionUID, so we have to compute it try ! { ! MessageDigest md; ! try ! { ! md = MessageDigest.getInstance("SHA"); ! } ! catch (NoSuchAlgorithmException e) ! { ! // If a provider already provides SHA, use it; otherwise, use this. ! Gnu gnuProvider = new Gnu(); ! Security.addProvider(gnuProvider); ! md = MessageDigest.getInstance("SHA"); ! } ! DigestOutputStream digest_out = ! new DigestOutputStream(nullOutputStream, md); ! DataOutputStream data_out = new DataOutputStream(digest_out); ! data_out.writeUTF(cl.getName()); ! int modifiers = cl.getModifiers(); ! // just look at interesting bits ! modifiers = modifiers & (Modifier.ABSTRACT | Modifier.FINAL ! | Modifier.INTERFACE | Modifier.PUBLIC); ! data_out.writeInt(modifiers); ! // Pretend that an array has no interfaces, because when array ! // serialization was defined (JDK 1.1), arrays didn't have it. ! if (! cl.isArray()) ! { ! Class[] interfaces = cl.getInterfaces(); ! Arrays.sort(interfaces, interfaceComparator); ! for (int i = 0; i < interfaces.length; i++) ! data_out.writeUTF(interfaces[i].getName()); ! } ! Field field; ! Field[] fields = cl.getDeclaredFields(); ! Arrays.sort(fields, memberComparator); ! for (int i = 0; i < fields.length; i++) ! { ! field = fields[i]; ! modifiers = field.getModifiers(); ! if (Modifier.isPrivate(modifiers) ! && (Modifier.isStatic(modifiers) ! || Modifier.isTransient(modifiers))) ! continue; ! data_out.writeUTF(field.getName()); ! data_out.writeInt(modifiers); ! data_out.writeUTF(TypeSignature.getEncodingOfClass (field.getType())); ! } ! // write class initializer method if present ! if (VMObjectStreamClass.hasClassInitializer(cl)) ! { ! data_out.writeUTF(""); ! data_out.writeInt(Modifier.STATIC); ! data_out.writeUTF("()V"); ! } ! Constructor constructor; ! Constructor[] constructors = cl.getDeclaredConstructors(); ! Arrays.sort (constructors, memberComparator); ! for (int i = 0; i < constructors.length; i++) ! { ! constructor = constructors[i]; ! modifiers = constructor.getModifiers(); ! if (Modifier.isPrivate(modifiers)) ! continue; ! data_out.writeUTF(""); ! data_out.writeInt(modifiers); ! // the replacement of '/' with '.' was needed to make computed ! // SUID's agree with those computed by JDK ! data_out.writeUTF ! (TypeSignature.getEncodingOfConstructor(constructor).replace('/','.')); ! } ! Method method; ! Method[] methods = cl.getDeclaredMethods(); ! Arrays.sort(methods, memberComparator); ! for (int i = 0; i < methods.length; i++) ! { ! method = methods[i]; ! modifiers = method.getModifiers(); ! if (Modifier.isPrivate(modifiers)) ! continue; ! data_out.writeUTF(method.getName()); ! data_out.writeInt(modifiers); ! // the replacement of '/' with '.' was needed to make computed ! // SUID's agree with those computed by JDK ! data_out.writeUTF ! (TypeSignature.getEncodingOfMethod(method).replace('/', '.')); ! } ! data_out.close(); ! byte[] sha = md.digest(); ! long result = 0; ! int len = sha.length < 8 ? sha.length : 8; ! for (int i = 0; i < len; i++) ! result += (long) (sha[i] & 0xFF) << (8 * i); ! return result; } ! catch (NoSuchAlgorithmException e) { + throw new RuntimeException + ("The SHA algorithm was not found to use in computing the Serial Version UID for class " + + cl.getName(), e); } ! catch (IOException ioe) { + throw new RuntimeException(ioe); } + } ! /** ! * Returns the value of CLAZZ's private static final field named ! * `serialPersistentFields'. It performs some sanity checks before ! * returning the real array. Besides, the returned array is a clean ! * copy of the original. So it can be modified. ! * ! * @param clazz Class to retrieve 'serialPersistentFields' from. ! * @return The content of 'serialPersistentFields'. ! */ ! private ObjectStreamField[] getSerialPersistentFields(Class clazz) ! throws NoSuchFieldException, IllegalAccessException ! { ! ObjectStreamField[] fieldsArray = null; ! ObjectStreamField[] o; ! ! // Use getDeclaredField rather than getField for the same reason ! // as above in getDefinedSUID. ! Field f = clazz.getDeclaredField("serialPersistentFields"); ! f.setAccessible(true); ! ! int modifiers = f.getModifiers(); ! if (!(Modifier.isStatic(modifiers) && ! Modifier.isFinal(modifiers) && ! Modifier.isPrivate(modifiers))) ! return null; ! ! o = (ObjectStreamField[]) f.get(null); ! ! if (o == null) ! return null; ! ! fieldsArray = new ObjectStreamField[ o.length ]; ! System.arraycopy(o, 0, fieldsArray, 0, o.length); ! ! return fieldsArray; } public static final ObjectStreamField[] NO_FIELDS = {}; ! private static Hashtable classLookupTable = new Hashtable(); ! private static final NullOutputStream nullOutputStream = new NullOutputStream(); ! private static final Comparator interfaceComparator = new InterfaceComparator(); ! private static final Comparator memberComparator = new MemberComparator(); private static final Class[] writeMethodArgTypes = { java.io.ObjectOutputStream.class }; *************** public class ObjectStreamClass implement *** 670,678 **** // interfaces are compared only by name class InterfaceComparator implements Comparator { ! public int compare (Object o1, Object o2) { ! return ((Class)o1).getName ().compareTo (((Class)o2).getName ()); } } --- 781,789 ---- // interfaces are compared only by name class InterfaceComparator implements Comparator { ! public int compare(Object o1, Object o2) { ! return ((Class) o1).getName().compareTo(((Class) o2).getName()); } } *************** class InterfaceComparator implements Com *** 681,696 **** // conflicts are resolved by comparing type signatures class MemberComparator implements Comparator { ! public int compare (Object o1, Object o2) { ! Member m1 = (Member)o1; ! Member m2 = (Member)o2; ! int comp = m1.getName ().compareTo (m2.getName ()); if (comp == 0) ! return TypeSignature.getEncodingOfMember (m1). ! compareTo (TypeSignature.getEncodingOfMember (m2)); else return comp; } --- 792,807 ---- // conflicts are resolved by comparing type signatures class MemberComparator implements Comparator { ! public int compare(Object o1, Object o2) { ! Member m1 = (Member) o1; ! Member m2 = (Member) o2; ! int comp = m1.getName().compareTo(m2.getName()); if (comp == 0) ! return TypeSignature.getEncodingOfMember(m1). ! compareTo(TypeSignature.getEncodingOfMember(m2)); else return comp; } diff -Nrc3pad gcc-3.3.3/libjava/java/io/ObjectStreamConstants.java gcc-3.4.0/libjava/java/io/ObjectStreamConstants.java *** gcc-3.3.3/libjava/java/io/ObjectStreamConstants.java 2002-11-10 22:06:48.000000000 +0000 --- gcc-3.4.0/libjava/java/io/ObjectStreamConstants.java 2003-10-11 18:38:12.000000000 +0000 *************** *** 1,6 **** /* ObjectStreamConstants.java -- Interface containing constant values used in reading and writing serialized objects ! Copyright (C) 1998, 1999 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,6 ---- /* ObjectStreamConstants.java -- Interface containing constant values used in reading and writing serialized objects ! Copyright (C) 1998, 1999, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 40,87 **** package java.io; /** ! This interface contains constants that are used in object ! serialization. This interface is used by ObjectOutputStream, ! ObjectInputStream, ObjectStreamClass, and possibly other classes. ! The values for these constants are specified in Javasoft's "Object ! Serialization Specification" TODO: add reference ! */ public interface ObjectStreamConstants { ! public final static int PROTOCOL_VERSION_1 = 1; ! public final static int PROTOCOL_VERSION_2 = 2; ! final static short STREAM_MAGIC = (short)0xaced; ! final static short STREAM_VERSION = 5; ! final static byte TC_NULL = (byte)112; //0x70 ! final static byte TC_REFERENCE = (byte)113; //0x71 ! final static byte TC_CLASSDESC = (byte)114; //0x72 ! final static byte TC_OBJECT = (byte)115; //0x73 ! final static byte TC_STRING = (byte)116; //0x74 ! final static byte TC_ARRAY = (byte)117; //0x75 ! final static byte TC_CLASS = (byte)118; //0x76 ! final static byte TC_BLOCKDATA = (byte)119; //0x77 ! final static byte TC_ENDBLOCKDATA = (byte)120; //0x78 ! final static byte TC_RESET = (byte)121; //0x79 ! final static byte TC_BLOCKDATALONG = (byte)122; //0x7A ! final static byte TC_EXCEPTION = (byte)123; //0x7B ! final static byte TC_LONGSTRING = (byte)124; //0x7C ! final static byte TC_PROXYCLASSDESC = (byte)125; //0x7D ! final static byte TC_BASE = TC_NULL; ! final static byte TC_MAX = TC_PROXYCLASSDESC; ! final static int baseWireHandle = 0x7e0000; ! final static byte SC_WRITE_METHOD = 0x01; ! final static byte SC_SERIALIZABLE = 0x02; ! final static byte SC_EXTERNALIZABLE = 0x04; ! final static byte SC_BLOCK_DATA = 0x08; ! final static SerializablePermission SUBSTITUTION_PERMISSION = new SerializablePermission("enableSubstitution"); ! final static SerializablePermission SUBCLASS_IMPLEMENTATION_PERMISSION = new SerializablePermission("enableSubclassImplementation"); } --- 40,89 ---- package java.io; /** ! * This interface contains constants that are used in object ! * serialization. This interface is used by ObjectOutputStream, ! * ObjectInputStream, and ObjectStreamClass. ! * The values for these constants are specified by the Java library ! * specification. ! */ public interface ObjectStreamConstants { ! // FIXME: Javadoc comment these values. ! int PROTOCOL_VERSION_1 = 1; ! int PROTOCOL_VERSION_2 = 2; ! short STREAM_MAGIC = (short)0xaced; ! short STREAM_VERSION = 5; ! byte TC_NULL = (byte)112; //0x70 ! byte TC_REFERENCE = (byte)113; //0x71 ! byte TC_CLASSDESC = (byte)114; //0x72 ! byte TC_OBJECT = (byte)115; //0x73 ! byte TC_STRING = (byte)116; //0x74 ! byte TC_ARRAY = (byte)117; //0x75 ! byte TC_CLASS = (byte)118; //0x76 ! byte TC_BLOCKDATA = (byte)119; //0x77 ! byte TC_ENDBLOCKDATA = (byte)120; //0x78 ! byte TC_RESET = (byte)121; //0x79 ! byte TC_BLOCKDATALONG = (byte)122; //0x7A ! byte TC_EXCEPTION = (byte)123; //0x7B ! byte TC_LONGSTRING = (byte)124; //0x7C ! byte TC_PROXYCLASSDESC = (byte)125; //0x7D ! byte TC_BASE = TC_NULL; ! byte TC_MAX = TC_PROXYCLASSDESC; ! int baseWireHandle = 0x7e0000; ! byte SC_WRITE_METHOD = 0x01; ! byte SC_SERIALIZABLE = 0x02; ! byte SC_EXTERNALIZABLE = 0x04; ! byte SC_BLOCK_DATA = 0x08; ! SerializablePermission SUBSTITUTION_PERMISSION = new SerializablePermission("enableSubstitution"); ! SerializablePermission SUBCLASS_IMPLEMENTATION_PERMISSION = new SerializablePermission("enableSubclassImplementation"); } + diff -Nrc3pad gcc-3.3.3/libjava/java/io/ObjectStreamException.java gcc-3.4.0/libjava/java/io/ObjectStreamException.java *** gcc-3.3.3/libjava/java/io/ObjectStreamException.java 2002-06-15 18:59:15.000000000 +0000 --- gcc-3.4.0/libjava/java/io/ObjectStreamException.java 2003-04-07 12:25:08.000000000 +0000 *************** *** 1,5 **** /* ObjectStreamException.java -- Superclass of all serialization exceptions ! Copyright (C) 1998, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ObjectStreamException.java -- Superclass of all serialization exceptions ! Copyright (C) 1998, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** package java.io; *** 40,46 **** /** * This exception is thrown when a problem occurs during serialization. ! * There are more specific subclasses than give more fine grained * indications of the precise failure. * * @author Aaron M. Renn (arenn@urbanophile.com) --- 40,46 ---- /** * This exception is thrown when a problem occurs during serialization. ! * There are more specific subclasses that give more fine grained * indications of the precise failure. * * @author Aaron M. Renn (arenn@urbanophile.com) diff -Nrc3pad gcc-3.3.3/libjava/java/io/ObjectStreamField.java gcc-3.4.0/libjava/java/io/ObjectStreamField.java *** gcc-3.3.3/libjava/java/io/ObjectStreamField.java 2003-02-28 12:37:01.000000000 +0000 --- gcc-3.4.0/libjava/java/io/ObjectStreamField.java 2003-12-20 22:36:02.000000000 +0000 *************** *** 1,5 **** /* ObjectStreamField.java -- Class used to store name and class of fields ! Copyright (C) 1998, 1999 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ObjectStreamField.java -- Class used to store name and class of fields ! Copyright (C) 1998, 1999, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** package java.io; *** 40,100 **** import gnu.java.lang.reflect.TypeSignature; ! // XXX doc ! public class ObjectStreamField implements java.lang.Comparable { public ObjectStreamField (String name, Class type) { this.name = name; this.type = type; this.typename = TypeSignature.getEncodingOfClass(type); } /** ! * There're many cases you can't get java.lang.Class from typename if your context ! * class loader can't load it, then use typename to construct the field */ ! ObjectStreamField (String name, String typename){ this.name = name; this.typename = typename; ! try{ ! type = TypeSignature.getClassForEncoding(typename); ! }catch(ClassNotFoundException e){ ! type = Object.class; //?? ! } } public String getName () { return name; } public Class getType () { return type; } public char getTypeCode () { return typename.charAt (0); } public String getTypeString () { // use intern() return typename.intern(); } public int getOffset () { return offset; } protected void setOffset (int off) { offset = off; } public boolean isPrimitive () { return type.isPrimitive (); --- 40,228 ---- import gnu.java.lang.reflect.TypeSignature; ! /** ! * This class intends to describe the field of a class for the serialization ! * subsystem. Serializable fields in a serializable class can be explicitly ! * exported using an array of ObjectStreamFields. ! */ ! public class ObjectStreamField implements Comparable { + private String name; + private Class type; + private String typename; + private int offset = -1; // XXX make sure this is correct + private boolean unshared; + private boolean persistent = false; + private boolean toset = true; + + /** + * This constructor creates an ObjectStreamField instance + * which represents a field named name and is + * of the type type. + * + * @param name Name of the field to export. + * @param type Type of the field in the concerned class. + */ public ObjectStreamField (String name, Class type) { + this (name, type, false); + } + + /** + * This constructor creates an ObjectStreamField instance + * which represents a field named name and is + * of the type type. + * + * @param name Name of the field to export. + * @param type Type of the field in the concerned class. + */ + public ObjectStreamField (String name, Class type, boolean unshared) + { + if (name == null) + throw new NullPointerException(); + this.name = name; this.type = type; this.typename = TypeSignature.getEncodingOfClass(type); + this.unshared = unshared; } /** ! * There are many cases you can not get java.lang.Class from typename ! * if your context class loader cann not load it, then use typename to ! * construct the field. ! * ! * @param name Name of the field to export. ! * @param typename The coded name of the type for this field. */ ! ObjectStreamField (String name, String typename) ! { this.name = name; this.typename = typename; ! try ! { ! type = TypeSignature.getClassForEncoding(typename); ! } ! catch(ClassNotFoundException e) ! { ! type = Object.class; //FIXME: ??? ! } } + /** + * There are many cases you can not get java.lang.Class from typename + * if your context class loader cann not load it, then use typename to + * construct the field. + * + * @param name Name of the field to export. + * @param typename The coded name of the type for this field. + * @param loader The class loader to use to resolve class names. + */ + ObjectStreamField (String name, String typename, ClassLoader loader) + { + this.name = name; + this.typename = typename; + try + { + type = TypeSignature.getClassForEncoding(typename, true, loader); + } + catch(ClassNotFoundException e) + { + type = Object.class; // ALSO FIXME + } + } + + /** + * This method returns the name of the field represented by the + * ObjectStreamField instance. + * + * @return A string containing the name of the field. + */ public String getName () { return name; } + /** + * This method returns the class representing the type of the + * field which is represented by this instance of ObjectStreamField. + * + * @return A class representing the type of the field. + */ public Class getType () { return type; } + /** + * This method returns the char encoded type of the field which + * is represented by this instance of ObjectStreamField. + * + * @return A char representing the type of the field. + */ public char getTypeCode () { return typename.charAt (0); } + /** + * This method returns a more explicit type name than + * {@link #getTypeCode()} in the case the type is a real + * class (and not a primitive). + * + * @return The name of the type (class name) if it is not a + * primitive, in the other case null is returned. + */ public String getTypeString () { // use intern() + if (this.type.isPrimitive()) + return null; return typename.intern(); } + /** + * This method returns the current offset of the field in + * the serialization stream relatively to the other fields. + * The offset is expressed in bytes. + * + * @return The offset of the field in bytes. + * @see #setOffset(int) + */ public int getOffset () { return offset; } + /** + * This method sets the current offset of the field. + * + * @param off The offset of the field in bytes. + * @see getOffset() + */ protected void setOffset (int off) { offset = off; } + /** + * This method returns whether the field represented by this object is + * unshared or not. + * + * @return Tells if this field is unshared or not. + */ + public boolean isUnshared () + { + return unshared; + } + + /** + * This method returns true if the type of the field + * represented by this instance is a primitive. + * + * @return true if the type is a primitive, false + * in the other case. + */ public boolean isPrimitive () { return type.isPrimitive (); *************** public class ObjectStreamField implement *** 115,127 **** return getName ().compareTo (f.getName ()); } public String toString () { return "ObjectStreamField< " + type + " " + name + " >"; } - - private String name; - private Class type; - private String typename; - private int offset = -1; // XXX make sure this is correct } --- 243,303 ---- return getName ().compareTo (f.getName ()); } + /** + * This method is specific to classpath's implementation and so has the default + * access. It changes the state of this field to "persistent". It means that + * the field should not be changed when the stream is read (if it is not + * explicitly specified using serialPersistentFields). + * + * @param persistent True if the field is persistent, false in the + * other cases. + * @see #isPersistent() + */ + void setPersistent(boolean persistent) + { + this.persistent = persistent; + } + + /** + * This method returns true if the field is marked as persistent. + * + * @return True if persistent, false in the other cases. + * @see #setPersistent(boolean) + */ + boolean isPersistent() + { + return persistent; + } + + /** + * This method is specific to classpath's implementation and so + * has the default access. It changes the state of this field as + * to be set by ObjectInputStream. + * + * @param toset True if this field should be set, false in the other + * cases. + * @see #isToSet() + */ + void setToSet(boolean toset) + { + this.toset = toset; + } + + /** + * This methods returns true if the field is marked as to be + * set. + * + * @return True if it is to be set, false in the other cases. + * @see #setToSet(boolean) + */ + boolean isToSet() + { + return toset; + } + public String toString () { return "ObjectStreamField< " + type + " " + name + " >"; } } + diff -Nrc3pad gcc-3.3.3/libjava/java/io/OutputStreamWriter.java gcc-3.4.0/libjava/java/io/OutputStreamWriter.java *** gcc-3.3.3/libjava/java/io/OutputStreamWriter.java 2003-06-07 18:42:28.000000000 +0000 --- gcc-3.4.0/libjava/java/io/OutputStreamWriter.java 2003-06-07 18:35:00.000000000 +0000 *************** *** 1,38 **** ! /* Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation ! This file is part of libgcj. - This software is copyrighted work licensed under the terms of the - Libgcj License. Please consult the file "LIBGCJ_LICENSE" for - details. */ package java.io; import gnu.gcj.convert.UnicodeToBytes; /** * @author Per Bothner * @date April 17, 1998. */ - /* Written using "Java Class Libraries", 2nd edition, plus online - * API docs for JDK 1.2 beta from http://www.javasoft.com. - * Status: Believed complete and correct, but only supports 8859_1. - */ - public class OutputStreamWriter extends Writer { BufferedOutputStream out; UnicodeToBytes converter; /* Temporary buffer. */ private char[] work; private int wcount; - public String getEncoding() - { - return out != null ? converter.getName() : null; - } - private OutputStreamWriter(OutputStream out, UnicodeToBytes encoder) { this.out = out instanceof BufferedOutputStream --- 1,93 ---- ! /* OutputStreamWriter.java -- Writer that converts chars to bytes ! Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. ! This file is part of GNU Classpath. ! ! GNU Classpath is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! GNU Classpath is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with GNU Classpath; see the file COPYING. If not, write to the ! Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ! 02111-1307 USA. ! ! Linking this library statically or dynamically with other modules is ! making a combined work based on this library. Thus, the terms and ! conditions of the GNU General Public License cover the whole ! combination. ! ! As a special exception, the copyright holders of this library give you ! permission to link this library with independent modules to produce an ! executable, regardless of the license terms of these independent ! modules, and to copy and distribute the resulting executable under ! terms of your choice, provided that you also meet, for each linked ! independent module, the terms and conditions of the license of that ! module. An independent module is a module which is not derived from ! or based on this library. If you modify this library, you may extend ! this exception to your version of the library, but you are not ! obligated to do so. If you do not wish to do so, delete this ! exception statement from your version. */ package java.io; + import gnu.gcj.convert.UnicodeToBytes; /** + * This class writes characters to an output stream that is byte oriented + * It converts the chars that are written to bytes using an encoding layer, + * which is specific to a particular encoding standard. The desired + * encoding can either be specified by name, or if no encoding is specified, + * the system default encoding will be used. The system default encoding + * name is determined from the system property file.encoding. + * The only encodings that are guaranteed to be available are "8859_1" + * (the Latin-1 character set) and "UTF8". Unfortunately, Java does not + * provide a mechanism for listing the encodings that are supported in + * a given implementation. + *

            + * Here is a list of standard encoding names that may be available: + *

            + *

              + *
            • 8859_1 (ISO-8859-1/Latin-1) + *
            • 8859_2 (ISO-8859-2/Latin-2) + *
            • 8859_3 (ISO-8859-3/Latin-3) + *
            • 8859_4 (ISO-8859-4/Latin-4) + *
            • 8859_5 (ISO-8859-5/Latin-5) + *
            • 8859_6 (ISO-8859-6/Latin-6) + *
            • 8859_7 (ISO-8859-7/Latin-7) + *
            • 8859_8 (ISO-8859-8/Latin-8) + *
            • 8859_9 (ISO-8859-9/Latin-9) + *
            • ASCII (7-bit ASCII) + *
            • UTF8 (UCS Transformation Format-8) + *
            • More Later + *
            + * + * @author Aaron M. Renn (arenn@urbanophile.com) * @author Per Bothner * @date April 17, 1998. */ public class OutputStreamWriter extends Writer { BufferedOutputStream out; + /** + * This is the byte-character encoder class that does the writing and + * translation of characters to bytes before writing to the underlying + * class. + */ UnicodeToBytes converter; /* Temporary buffer. */ private char[] work; private int wcount; private OutputStreamWriter(OutputStream out, UnicodeToBytes encoder) { this.out = out instanceof BufferedOutputStream *************** public class OutputStreamWriter extends *** 43,60 **** this.converter = encoder; } ! public OutputStreamWriter(OutputStream out, String enc) ! throws UnsupportedEncodingException { ! this(out, UnicodeToBytes.getEncoder(enc)); } ! public OutputStreamWriter(OutputStream out) { this(out, UnicodeToBytes.getDefaultEncoder()); } ! public void close() throws IOException { synchronized (lock) { --- 98,140 ---- this.converter = encoder; } ! /** ! * This method initializes a new instance of OutputStreamWriter ! * to write to the specified stream using a caller supplied character ! * encoding scheme. Note that due to a deficiency in the Java language ! * design, there is no way to determine which encodings are supported. ! * ! * @param out The OutputStream to write to ! * @param encoding_scheme The name of the encoding scheme to use for ! * character to byte translation ! * ! * @exception UnsupportedEncodingException If the named encoding is ! * not available. ! */ ! public OutputStreamWriter (OutputStream out, String encoding_scheme) ! throws UnsupportedEncodingException { ! this(out, UnicodeToBytes.getEncoder(encoding_scheme)); } ! /** ! * This method initializes a new instance of OutputStreamWriter ! * to write to the specified stream using the default encoding. ! * ! * @param out The OutputStream to write to ! */ ! public OutputStreamWriter (OutputStream out) { this(out, UnicodeToBytes.getDefaultEncoder()); } ! /** ! * This method closes this stream, and the underlying ! * OutputStream ! * ! * @exception IOException If an error occurs ! */ ! public void close () throws IOException { synchronized (lock) { *************** public class OutputStreamWriter extends *** 68,74 **** } } ! public void flush() throws IOException { synchronized (lock) { --- 148,171 ---- } } ! /** ! * This method returns the name of the character encoding scheme currently ! * in use by this stream. If the stream has been closed, then this method ! * may return null. ! * ! * @return The encoding scheme name ! */ ! public String getEncoding () ! { ! return out != null ? converter.getName() : null; ! } ! ! /** ! * This method flushes any buffered bytes to the underlying output sink. ! * ! * @exception IOException If an error occurs ! */ ! public void flush () throws IOException { synchronized (lock) { *************** public class OutputStreamWriter extends *** 84,91 **** } } ! public void write(char[] buf, int offset, int count) ! throws IOException { synchronized (lock) { --- 181,198 ---- } } ! /** ! * This method writes count characters from the specified ! * array to the output stream starting at position offset ! * into the array. ! * ! * @param buf The array of character to write from ! * @param offset The offset into the array to start writing chars from ! * @param count The number of chars to write. ! * ! * @exception IOException If an error occurs ! */ ! public void write (char[] buf, int offset, int count) throws IOException { synchronized (lock) { *************** public class OutputStreamWriter extends *** 101,108 **** } } ! /** Writes characters through to the inferior BufferedOutputStream. ! * Ignores wcount and the work buffer. */ private void writeChars(char[] buf, int offset, int count) throws IOException { --- 208,217 ---- } } ! /* ! * Writes characters through to the inferior BufferedOutputStream. ! * Ignores wcount and the work buffer. ! */ private void writeChars(char[] buf, int offset, int count) throws IOException { *************** public class OutputStreamWriter extends *** 132,139 **** } } ! public void write(String str, int offset, int count) ! throws IOException { synchronized (lock) { --- 241,259 ---- } } ! /** ! * This method writes count bytes from the specified ! * String starting at position offset into the ! * String. ! * ! * @param str The String to write chars from ! * @param offset The position in the String to start ! * writing chars from ! * @param count The number of chars to write ! * ! * @exception IOException If an error occurs ! */ ! public void write (String str, int offset, int count) throws IOException { synchronized (lock) { *************** public class OutputStreamWriter extends *** 164,170 **** } } ! public void write(int ch) throws IOException { synchronized (lock) { --- 284,297 ---- } } ! /** ! * This method writes a single character to the output stream. ! * ! * @param c The char to write, passed as an int. ! * ! * @exception IOException If an error occurs ! */ ! public void write (int ch) throws IOException { synchronized (lock) { *************** public class OutputStreamWriter extends *** 181,184 **** work[wcount++] = (char) ch; } } ! } --- 308,313 ---- work[wcount++] = (char) ch; } } ! ! } // class OutputStreamWriter ! diff -Nrc3pad gcc-3.3.3/libjava/java/io/PipedInputStream.java gcc-3.4.0/libjava/java/io/PipedInputStream.java *** gcc-3.3.3/libjava/java/io/PipedInputStream.java 2002-06-15 18:59:15.000000000 +0000 --- gcc-3.4.0/libjava/java/io/PipedInputStream.java 2003-03-18 06:00:25.000000000 +0000 *************** *** 1,5 **** /* PipedInputStream.java -- Read portion of piped streams. ! Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* PipedInputStream.java -- Read portion of piped streams. ! Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** package java.io; *** 46,52 **** * to which it is connected. *

            * Data is read and written to an internal buffer. It is highly recommended ! * that the PipedInputStream and connected PipedOutputStream * be part of different threads. If they are not, the read and write * operations could deadlock their thread. * --- 46,53 ---- * to which it is connected. *

            * Data is read and written to an internal buffer. It is highly recommended ! * that the PipedInputStream and connected ! * PipedOutputStream * be part of different threads. If they are not, the read and write * operations could deadlock their thread. * *************** public class PipedInputStream extends In *** 113,119 **** * it to the passed in PipedOutputStream. The stream is then * ready for reading. * ! * @param source The PipedOutputStream to connect this stream to * * @exception IOException If source is already connected. */ --- 114,121 ---- * it to the passed in PipedOutputStream. The stream is then * ready for reading. * ! * @param source The PipedOutputStream to connect this ! * stream to * * @exception IOException If source is already connected. */ *************** public class PipedInputStream extends In *** 123,129 **** } /** ! * This method connects this stream to the passed in PipedOutputStream. * This stream is then ready for reading. If this stream is already * connected or has been previously closed, then an exception is thrown * --- 125,132 ---- } /** ! * This method connects this stream to the passed in ! * PipedOutputStream. * This stream is then ready for reading. If this stream is already * connected or has been previously closed, then an exception is thrown * *************** public class PipedInputStream extends In *** 224,232 **** /** * This method reads bytes from the stream into a caller supplied buffer. ! * It starts storing bytes at position offset into the buffer and ! * reads a maximum of len bytes. Note that this method can actually ! * read fewer than len bytes. The actual number of bytes read is * returned. A -1 is returned to indicated that no bytes can be read * because the end of the stream was reached. If the stream is already * closed, a -1 will again be returned to indicate the end of the stream. --- 227,238 ---- /** * This method reads bytes from the stream into a caller supplied buffer. ! * It starts storing bytes at position offset into the ! * buffer and ! * reads a maximum of len bytes. Note that this method ! * can actually ! * read fewer than len bytes. The actual number of bytes ! * read is * returned. A -1 is returned to indicated that no bytes can be read * because the end of the stream was reached. If the stream is already * closed, a -1 will again be returned to indicate the end of the stream. *************** public class PipedInputStream extends In *** 255,263 **** /** * This method reads bytes from the stream into a caller supplied buffer. ! * It starts storing bytes at position offset into the buffer and ! * reads a maximum of len bytes. Note that this method can actually ! * read fewer than len bytes. The actual number of bytes read is * returned. A -1 is returned to indicated that no bytes can be read * because the end of the stream was reached - ie close() was called on the * connected PipedOutputStream. --- 261,272 ---- /** * This method reads bytes from the stream into a caller supplied buffer. ! * It starts storing bytes at position offset into the ! * buffer and ! * reads a maximum of len bytes. Note that this method ! * can actually ! * read fewer than len bytes. The actual number of bytes ! * read is * returned. A -1 is returned to indicated that no bytes can be read * because the end of the stream was reached - ie close() was called on the * connected PipedOutputStream. *************** public class PipedInputStream extends In *** 371,373 **** --- 380,383 ---- notifyAll(); } } + diff -Nrc3pad gcc-3.3.3/libjava/java/io/PipedReader.java gcc-3.4.0/libjava/java/io/PipedReader.java *** gcc-3.3.3/libjava/java/io/PipedReader.java 2002-01-22 22:40:14.000000000 +0000 --- gcc-3.4.0/libjava/java/io/PipedReader.java 2003-03-18 06:00:25.000000000 +0000 *************** public class PipedReader extends Reader *** 118,124 **** } /** ! * This method connects this stream to the passed in PipedWriter. * This stream is then ready for reading. If this stream is already * connected or has been previously closed, then an exception is thrown * --- 118,125 ---- } /** ! * This method connects this stream to the passed in ! * PipedWriter. * This stream is then ready for reading. If this stream is already * connected or has been previously closed, then an exception is thrown * *************** public class PipedReader extends Reader *** 207,215 **** /** * This method reads chars from the stream into a caller supplied buffer. ! * It starts storing chars at position offset into the buffer and ! * reads a maximum of len chars. Note that this method can actually ! * read fewer than len chars. The actual number of chars read is * returned. A -1 is returned to indicated that no chars can be read * because the end of the stream was reached. If the stream is already * closed, a -1 will again be returned to indicate the end of the stream. --- 208,219 ---- /** * This method reads chars from the stream into a caller supplied buffer. ! * It starts storing chars at position offset into the ! * buffer and ! * reads a maximum of len chars. Note that this method ! * can actually ! * read fewer than len chars. The actual number of chars ! * read is * returned. A -1 is returned to indicated that no chars can be read * because the end of the stream was reached. If the stream is already * closed, a -1 will again be returned to indicate the end of the stream. *************** public class PipedReader extends Reader *** 237,246 **** } /** ! * This method reads characters from the stream into a caller supplied buffer. ! * It starts storing chars at position offset into the buffer and ! * reads a maximum of len chars. Note that this method can actually ! * read fewer than len chars. The actual number of chars read is * returned. A -1 is returned to indicated that no chars can be read * because the end of the stream was reached - ie close() was called on the * connected PipedWriter. --- 241,251 ---- } /** ! * This method reads characters from the stream into a caller supplied ! * buffer. It starts storing chars at position offset into ! * the buffer and reads a maximum of len chars. Note that ! * this method can actually read fewer than len chars. ! * The actual number of chars read is * returned. A -1 is returned to indicated that no chars can be read * because the end of the stream was reached - ie close() was called on the * connected PipedWriter. *************** public class PipedReader extends Reader *** 361,363 **** --- 366,369 ---- } } } + diff -Nrc3pad gcc-3.3.3/libjava/java/io/PrintStream.java gcc-3.4.0/libjava/java/io/PrintStream.java *** gcc-3.3.3/libjava/java/io/PrintStream.java 2003-06-07 18:42:28.000000000 +0000 --- gcc-3.4.0/libjava/java/io/PrintStream.java 2003-12-08 12:45:59.000000000 +0000 *************** *** 1,38 **** ! // PrintStream.java - Print string representations ! /* Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation ! This file is part of libgcj. - This software is copyrighted work licensed under the terms of the - Libgcj License. Please consult the file "LIBGCJ_LICENSE" for - details. */ package java.io; - import gnu.gcj.convert.UnicodeToBytes; ! /** ! * @author Tom Tromey ! * @date September 24, 1998 ! */ /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 * "The Java Language Specification", ISBN 0-201-63451-1 * Status: Believed complete and correct to 1.3 */ public class PrintStream extends FilterOutputStream { /* Notice the implementation is quite similar to OutputStreamWriter. * This leads to some minor duplication, because neither inherits * from the other, and we want to maximize performance. */ public boolean checkError () { ! flush(); ! return error; } public void close () { try --- 1,175 ---- ! /* PrintStream.java -- OutputStream for printing output ! Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation, Inc. ! This file is part of GNU Classpath. ! GNU Classpath is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! GNU Classpath is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with GNU Classpath; see the file COPYING. If not, write to the ! Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ! 02111-1307 USA. ! ! Linking this library statically or dynamically with other modules is ! making a combined work based on this library. Thus, the terms and ! conditions of the GNU General Public License cover the whole ! combination. ! ! As a special exception, the copyright holders of this library give you ! permission to link this library with independent modules to produce an ! executable, regardless of the license terms of these independent ! modules, and to copy and distribute the resulting executable under ! terms of your choice, provided that you also meet, for each linked ! independent module, the terms and conditions of the license of that ! module. An independent module is a module which is not derived from ! or based on this library. If you modify this library, you may extend ! this exception to your version of the library, but you are not ! obligated to do so. If you do not wish to do so, delete this ! exception statement from your version. */ package java.io; ! import gnu.gcj.convert.UnicodeToBytes; /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 * "The Java Language Specification", ISBN 0-201-63451-1 * Status: Believed complete and correct to 1.3 */ + /** + * This class prints Java primitive values and object to a stream as + * text. None of the methods in this class throw an exception. However, + * errors can be detected by calling the checkError() method. + * Additionally, this stream can be designated as "autoflush" when + * created so that any writes are automatically flushed to the underlying + * output sink when the current line is terminated. + *

            + * This class converts char's into byte's using the system default encoding. + * + * @author Aaron M. Renn + * @author Tom Tromey + */ public class PrintStream extends FilterOutputStream { /* Notice the implementation is quite similar to OutputStreamWriter. * This leads to some minor duplication, because neither inherits * from the other, and we want to maximize performance. */ + // Line separator string. + private static final char[] line_separator + = System.getProperty("line.separator").toCharArray(); + + UnicodeToBytes converter; + + // Work buffer of characters for converter. + char[] work = new char[100]; + // Work buffer of bytes where we temporarily keep converter output. + byte[] work_bytes = new byte[100]; + + /** + * This boolean indicates whether or not an error has ever occurred + * on this stream. + */ + private boolean error_occurred = false; + + /** + * This is true if auto-flush is enabled, + * false otherwise + */ + private boolean auto_flush; + + /** + * This method intializes a new PrintStream object to write + * to the specified output sink. + * + * @param out The OutputStream to write to. + */ + public PrintStream (OutputStream out) + { + this (out, false); + } + + /** + * This method intializes a new PrintStream object to write + * to the specified output sink. This constructor also allows "auto-flush" + * functionality to be specified where the stream will be flushed after + * every print or println call, when the + * write methods with array arguments are called, or when a + * single new-line character is written. + *

            + * + * @param out The OutputStream to write to. + * @param auto_flush true to flush the stream after every + * line, false otherwise + */ + public PrintStream (OutputStream out, boolean auto_flush) + { + super (out); + + converter = UnicodeToBytes.getDefaultEncoder(); + this.auto_flush = auto_flush; + } + + /** + * This method intializes a new PrintStream object to write + * to the specified output sink. This constructor also allows "auto-flush" + * functionality to be specified where the stream will be flushed after + * every print or println call, when the + * write methods with array arguments are called, or when a + * single new-line character is written. + *

            + * + * @param out The OutputStream to write to. + * @param auto_flush true to flush the stream after every + * line, false otherwise + * @param encoding The name of the character encoding to use for this + * object. + */ + public PrintStream (OutputStream out, boolean auto_flush, String encoding) + throws UnsupportedEncodingException + { + super (out); + + converter = UnicodeToBytes.getEncoder (encoding); + this.auto_flush = auto_flush; + } + + /** + * This method checks to see if an error has occurred on this stream. Note + * that once an error has occurred, this method will continue to report + * true forever for this stream. Before checking for an + * error condition, this method flushes the stream. + * + * @return true if an error has occurred, + * false otherwise + */ public boolean checkError () { ! flush (); ! return error_occurred; ! } ! ! /** ! * This method can be called by subclasses to indicate that an error ! * has occurred and should be reported by checkError. ! */ ! protected void setError () ! { ! error_occurred = true; } + /** + * This method closes this stream and all underlying streams. + */ public void close () { try *************** public class PrintStream extends FilterO *** 50,55 **** --- 187,196 ---- } } + /** + * This method flushes any buffered bytes to the underlying stream and + * then flushes that stream as well. + */ public void flush () { try *************** public class PrintStream extends FilterO *** 133,302 **** } } public void print (boolean bool) { print(String.valueOf(bool), false); } public void print (int inum) { print(String.valueOf(inum), false); } public void print (long lnum) { print(String.valueOf(lnum), false); } public void print (float fnum) { print(String.valueOf(fnum), false); } public void print (double dnum) { print(String.valueOf(dnum), false); } public void print (Object obj) { print(obj == null ? "null" : obj.toString(), false); } public void print (String str) { print(str == null ? "null" : str, false); } public synchronized void print (char ch) { work[0] = ch; print(work, 0, 1, false); } public void print (char[] charArray) { print(charArray, 0, charArray.length, false); } public void println () { print(line_separator, 0, line_separator.length, false); } public void println (boolean bool) { print(String.valueOf(bool), true); } public void println (int inum) { print(String.valueOf(inum), true); } public void println (long lnum) { print(String.valueOf(lnum), true); } public void println (float fnum) { print(String.valueOf(fnum), true); } public void println (double dnum) { print(String.valueOf(dnum), true); } public void println (Object obj) { print(obj == null ? "null" : obj.toString(), true); } public void println (String str) { print (str == null ? "null" : str, true); } public synchronized void println (char ch) { work[0] = ch; print(work, 0, 1, true); } public void println (char[] charArray) { print(charArray, 0, charArray.length, true); } ! public PrintStream (OutputStream out) ! { ! this(out, false); ! } ! ! public PrintStream (OutputStream out, boolean af) ! { ! super(out); ! converter = UnicodeToBytes.getDefaultEncoder(); ! error = false; ! auto_flush = af; ! } ! ! protected void setError () ! { ! error = true; ! } ! public void write (int oneByte) { try { ! out.write(oneByte); ! if (auto_flush && oneByte == '\n') ! flush(); } catch (InterruptedIOException iioe) { ! Thread.currentThread().interrupt(); } catch (IOException e) { ! setError (); } } ! public void write (byte[] buffer, int offset, int count) { try { ! out.write(buffer, offset, count); ! if (auto_flush) ! flush(); } catch (InterruptedIOException iioe) { ! Thread.currentThread().interrupt(); } catch (IOException e) { ! setError (); } } - UnicodeToBytes converter; - - // Work buffer of characters for converter. - char[] work = new char[100]; - // Work buffer of bytes where we temporarily keep converter output. - byte[] work_bytes = new byte[100]; - - // True if error occurred. - private boolean error; - // True if auto-flush. - private boolean auto_flush; - - // Line separator string. - private static final char[] line_separator - = System.getProperty("line.separator").toCharArray(); - } --- 274,562 ---- } } + /** + * This methods prints a boolean value to the stream. true + * values are printed as "true" and false values are printed + * as "false". + * + * @param b The boolean value to print + */ public void print (boolean bool) { print(String.valueOf(bool), false); } + /** + * This method prints an integer to the stream. The value printed is + * determined using the String.valueOf() method. + * + * @param inum The int value to be printed + */ public void print (int inum) { print(String.valueOf(inum), false); } + /** + * This method prints a long to the stream. The value printed is + * determined using the String.valueOf() method. + * + * @param lnum The long value to be printed + */ public void print (long lnum) { print(String.valueOf(lnum), false); } + /** + * This method prints a float to the stream. The value printed is + * determined using the String.valueOf() method. + * + * @param fnum The float value to be printed + */ public void print (float fnum) { print(String.valueOf(fnum), false); } + /** + * This method prints a double to the stream. The value printed is + * determined using the String.valueOf() method. + * + * @param dnum The double value to be printed + */ public void print (double dnum) { print(String.valueOf(dnum), false); } + /** + * This method prints an Object to the stream. The actual + * value printed is determined by calling the String.valueOf() + * method. + * + * @param obj The Object to print. + */ public void print (Object obj) { print(obj == null ? "null" : obj.toString(), false); } + /** + * This method prints a String to the stream. The actual + * value printed depends on the system default encoding. + * + * @param str The String to print. + */ public void print (String str) { print(str == null ? "null" : str, false); } + /** + * This method prints a char to the stream. The actual value printed is + * determined by the character encoding in use. + * + * @param ch The char value to be printed + */ public synchronized void print (char ch) { work[0] = ch; print(work, 0, 1, false); } + /** + * This method prints an array of characters to the stream. The actual + * value printed depends on the system default encoding. + * + * @param s The array of characters to print. + */ public void print (char[] charArray) { print(charArray, 0, charArray.length, false); } + /** + * This method prints a line separator sequence to the stream. The value + * printed is determined by the system property

            line.separator + * and is not necessarily the Unix '\n' newline character. + */ public void println () { print(line_separator, 0, line_separator.length, false); } + /** + * This methods prints a boolean value to the stream. true + * values are printed as "true" and false values are printed + * as "false". + *

            + * This method prints a line termination sequence after printing the value. + * + * @param b The boolean value to print + */ public void println (boolean bool) { print(String.valueOf(bool), true); } + /** + * This method prints an integer to the stream. The value printed is + * determined using the String.valueOf() method. + *

            + * This method prints a line termination sequence after printing the value. + * + * @param inum The int value to be printed + */ public void println (int inum) { print(String.valueOf(inum), true); } + /** + * This method prints a long to the stream. The value printed is + * determined using the String.valueOf() method. + *

            + * This method prints a line termination sequence after printing the value. + * + * @param lnum The long value to be printed + */ public void println (long lnum) { print(String.valueOf(lnum), true); } + /** + * This method prints a float to the stream. The value printed is + * determined using the String.valueOf() method. + *

            + * This method prints a line termination sequence after printing the value. + * + * @param fnum The float value to be printed + */ public void println (float fnum) { print(String.valueOf(fnum), true); } + /** + * This method prints a double to the stream. The value printed is + * determined using the String.valueOf() method. + *

            + * This method prints a line termination sequence after printing the value. + * + * @param dnum The double value to be printed + */ public void println (double dnum) { print(String.valueOf(dnum), true); } + /** + * This method prints an Object to the stream. The actual + * value printed is determined by calling the String.valueOf() + * method. + *

            + * This method prints a line termination sequence after printing the value. + * + * @param obj The Object to print. + */ public void println (Object obj) { print(obj == null ? "null" : obj.toString(), true); } + /** + * This method prints a String to the stream. The actual + * value printed depends on the system default encoding. + *

            + * This method prints a line termination sequence after printing the value. + * + * @param str The String to print. + */ public void println (String str) { print (str == null ? "null" : str, true); } + /** + * This method prints a char to the stream. The actual value printed is + * determined by the character encoding in use. + *

            + * This method prints a line termination sequence after printing the value. + * + * @param ch The char value to be printed + */ public synchronized void println (char ch) { work[0] = ch; print(work, 0, 1, true); } + /** + * This method prints an array of characters to the stream. The actual + * value printed depends on the system default encoding. + *

            + * This method prints a line termination sequence after printing the value. + * + * @param s The array of characters to print. + */ public void println (char[] charArray) { print(charArray, 0, charArray.length, true); } ! /** ! * This method writes a byte of data to the stream. If auto-flush is ! * enabled, printing a newline character will cause the stream to be ! * flushed after the character is written. ! * ! * @param b The byte to be written ! */ public void write (int oneByte) { try { ! out.write (oneByte & 0xff); ! ! if (auto_flush && (oneByte == '\n')) ! flush (); } catch (InterruptedIOException iioe) { ! Thread.currentThread ().interrupt (); } catch (IOException e) { ! setError (); } } ! /** ! * This method writes len bytes from the specified array ! * starting at index offset into the array. ! * ! * @param buffer The array of bytes to write ! * @param offset The index into the array to start writing from ! * @param len The number of bytes to write ! */ ! public void write (byte[] buffer, int offset, int len) { try { ! out.write (buffer, offset, len); ! ! if (auto_flush) ! flush (); } catch (InterruptedIOException iioe) { ! Thread.currentThread ().interrupt (); } catch (IOException e) { ! setError (); } } + } // class PrintStream diff -Nrc3pad gcc-3.3.3/libjava/java/io/PrintWriter.java gcc-3.4.0/libjava/java/io/PrintWriter.java *** gcc-3.3.3/libjava/java/io/PrintWriter.java 2002-01-22 22:40:14.000000000 +0000 --- gcc-3.4.0/libjava/java/io/PrintWriter.java 2003-05-20 09:13:19.000000000 +0000 *************** exception statement from your version. * *** 37,65 **** package java.io; - /** - * This class prints Java primitive values and objects to a stream as - * text. None of the methods in this class throw an exception. However, - * errors can be detected by calling the checkError() method. - * Additionally, this stream can be designated as "autoflush" when - * created so that any writes are automatically flushed to the underlying - * output sink whenever one of the println methods is - * called. (Note that this differs from the PrintStream - * class which also auto-flushes when it encounters a newline character - * in the chars written). - * - * @version 0.0 - * - * @author Per Bothner - * @author Aaron M. Renn (arenn@urbanophile.com) - * @date April 17, 1998. - */ /* Written using "Java Class Libraries", 2nd edition, plus online * API docs for JDK 1.2 beta from http://www.javasoft.com. * Status: Believed complete and correct. * However, should use native methods for conversion. */ public class PrintWriter extends Writer { /** --- 37,63 ---- package java.io; /* Written using "Java Class Libraries", 2nd edition, plus online * API docs for JDK 1.2 beta from http://www.javasoft.com. * Status: Believed complete and correct. * However, should use native methods for conversion. */ + /** + * This class prints Java primitive values and objects to a stream as + * text. None of the methods in this class throw an exception. However, + * errors can be detected by calling the checkError() method. + * Additionally, this stream can be designated as "autoflush" when + * created so that any writes are automatically flushed to the underlying + * output sink whenever one of the println methods is + * called. (Note that this differs from the PrintStream + * class which also auto-flushes when it encounters a newline character + * in the chars written). + * + * @author Per Bothner + * @author Aaron M. Renn + * @date April 17, 1998. + */ public class PrintWriter extends Writer { /** *************** public class PrintWriter extends Writer *** 99,105 **** * every line is terminated or newline character is written. * * @param wr The Writer to write to. ! * @param autoflush true to flush the stream after every line, false otherwise */ public PrintWriter(Writer wr, boolean autoflush) { --- 97,104 ---- * every line is terminated or newline character is written. * * @param wr The Writer to write to. ! * @param autoflush true to flush the stream after every ! * line, false otherwise */ public PrintWriter(Writer wr, boolean autoflush) { *************** public class PrintWriter extends Writer *** 130,136 **** * constructor allows auto-flush functionality to be enabled if desired * * @param out The OutputStream to write to ! * @param autoflush true to flush the stream after every println call, false otherwise. */ public PrintWriter(OutputStream out, boolean autoflush) { --- 129,136 ---- * constructor allows auto-flush functionality to be enabled if desired * * @param out The OutputStream to write to ! * @param autoflush true to flush the stream after every ! * println call, false otherwise. */ public PrintWriter(OutputStream out, boolean autoflush) { *************** public class PrintWriter extends Writer *** 153,159 **** * true forever for this stream. Before checking for an * error condition, this method flushes the stream. * ! * @return true if an error has occurred, false otherwise */ public boolean checkError() { --- 153,160 ---- * true forever for this stream. Before checking for an * error condition, this method flushes the stream. * ! * @return true if an error has occurred, ! * false otherwise */ public boolean checkError() { *************** public class PrintWriter extends Writer *** 309,315 **** * This is the system dependent line separator */ private static final char[] line_separator ! = System.getProperty("line.separator").toCharArray(); /** * This method prints a line separator sequence to the stream. The value --- 310,316 ---- * This is the system dependent line separator */ private static final char[] line_separator ! = System.getProperty("line.separator").toCharArray(); /** * This method prints a line separator sequence to the stream. The value *************** public class PrintWriter extends Writer *** 567,569 **** --- 568,571 ---- write(str, 0, str.length()); } } + diff -Nrc3pad gcc-3.3.3/libjava/java/io/PushbackInputStream.java gcc-3.4.0/libjava/java/io/PushbackInputStream.java *** gcc-3.3.3/libjava/java/io/PushbackInputStream.java 2002-06-15 18:59:15.000000000 +0000 --- gcc-3.4.0/libjava/java/io/PushbackInputStream.java 2003-05-25 11:40:18.000000000 +0000 *************** public class PushbackInputStream extends *** 74,81 **** /** * This method initializes a PushbackInputStream to ! * read from the * specified subordinate InputStream ! * with a default pushback buffer * size of 1. * * @param in The subordinate stream to read from */ --- 74,81 ---- /** * This method initializes a PushbackInputStream to ! * read from the specified subordinate InputStream ! * with a default pushback buffer size of 1. * * @param in The subordinate stream to read from */ *************** public class PushbackInputStream extends *** 302,308 **** * skip method on the underlying InputStream to * skip additional bytes if necessary. * ! * @param num_bytes The requested number of bytes to skip * * @return The actual number of bytes skipped. * --- 302,308 ---- * skip method on the underlying InputStream to * skip additional bytes if necessary. * ! * @param numBytes The requested number of bytes to skip * * @return The actual number of bytes skipped. * diff -Nrc3pad gcc-3.3.3/libjava/java/io/PushbackReader.java gcc-3.4.0/libjava/java/io/PushbackReader.java *** gcc-3.3.3/libjava/java/io/PushbackReader.java 2002-03-25 01:13:20.000000000 +0000 --- gcc-3.4.0/libjava/java/io/PushbackReader.java 2003-03-23 19:11:19.000000000 +0000 *************** *** 1,5 **** /* PushbackReader.java -- An character stream that can unread chars ! Copyright (C) 1998, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* PushbackReader.java -- An character stream that can unread chars ! Copyright (C) 1998, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** package java.io; *** 48,55 **** * The default pushback buffer size one char, but this can be overridden * by the creator of the stream. * - * @version 0.0 - * * @author Aaron M. Renn (arenn@urbanophile.com) * @author Warren Levy */ --- 48,53 ---- *************** public class PushbackReader extends Filt *** 79,85 **** * specified subordinate Reader with a default pushback buffer * size of 1. * ! * @code in The subordinate stream to read from */ public PushbackReader(Reader in) { --- 77,83 ---- * specified subordinate Reader with a default pushback buffer * size of 1. * ! * @param in The subordinate stream to read from */ public PushbackReader(Reader in) { *************** public class PushbackReader extends Filt *** 136,142 **** * This method returns false to indicate that it does not support * mark/reset functionality. * ! * @return This method returns false to indicate that this class does not support mark/reset functionality * */ public boolean markSupported() --- 134,141 ---- * This method returns false to indicate that it does not support * mark/reset functionality. * ! * @return This method returns false to indicate that this ! * class does not support mark/reset functionality * */ public boolean markSupported() *************** public class PushbackReader extends Filt *** 165,171 **** * read in the pushback buffer or if the underlying stream is ready to * be read. * ! * @return true if this stream is ready to be read, false otherwise * * @exception IOException If an error occurs */ --- 164,171 ---- * read in the pushback buffer or if the underlying stream is ready to * be read. * ! * @return true if this stream is ready to be read, ! * false otherwise * * @exception IOException If an error occurs */ *************** public class PushbackReader extends Filt *** 252,258 **** /** * This method read chars from a stream and stores them into a caller ! * supplied buffer. It starts storing the data at index offset into * the buffer and attempts to read len chars. This method can * return before reading the number of chars requested. The actual number * of chars read is returned as an int. A -1 is returned to indicate the --- 252,259 ---- /** * This method read chars from a stream and stores them into a caller ! * supplied buffer. It starts storing the data at index offset ! * into * the buffer and attempts to read len chars. This method can * return before reading the number of chars requested. The actual number * of chars read is returned as an int. A -1 is returned to indicate the *************** public class PushbackReader extends Filt *** 302,309 **** *

            * If the pushback buffer is full, this method throws an exception. *

            ! * The argument to this method is an int. Only the low eight bits ! * of this value are pushed back. * * @param b The char to be pushed back, passed as an int * --- 303,310 ---- *

            * If the pushback buffer is full, this method throws an exception. *

            ! * The argument to this method is an int. Only the low eight ! * bits of this value are pushed back. * * @param b The char to be pushed back, passed as an int * *************** public class PushbackReader extends Filt *** 343,349 **** /** * This method pushed back chars from the passed in array into the pushback ! * buffer. The chars from buf[offset] to buf[offset + len] * are pushed in reverse order so that the next char read from the stream * after this operation will be buf[offset] followed by * buf[offset + 1], etc. --- 344,351 ---- /** * This method pushed back chars from the passed in array into the pushback ! * buffer. The chars from buf[offset] to ! * buf[offset + len] * are pushed in reverse order so that the next char read from the stream * after this operation will be buf[offset] followed by * buf[offset + 1], etc. *************** public class PushbackReader extends Filt *** 378,380 **** --- 380,383 ---- } } } + diff -Nrc3pad gcc-3.3.3/libjava/java/io/RandomAccessFile.java gcc-3.4.0/libjava/java/io/RandomAccessFile.java *** gcc-3.3.3/libjava/java/io/RandomAccessFile.java 2002-08-13 23:10:11.000000000 +0000 --- gcc-3.4.0/libjava/java/io/RandomAccessFile.java 2003-07-13 16:53:05.000000000 +0000 *************** *** 1,257 **** ! // RandomAccessFile.java ! /* Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation ! This file is part of libgcj. - This software is copyrighted work licensed under the terms of the - Libgcj License. Please consult the file "LIBGCJ_LICENSE" for - details. */ package java.io; ! /** ! * @author Tom Tromey ! * @date September 25, 1998 ! */ /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 * "The Java Language Specification", ISBN 0-201-63451-1 * Status: Believe complete and correct to 1.1. */ public class RandomAccessFile implements DataOutput, DataInput { public void close () throws IOException { if (fd.valid()) fd.close(); } public final FileDescriptor getFD () throws IOException { if (! fd.valid()) throw new IOException (); return fd; } public long getFilePointer () throws IOException { return fd.getFilePointer(); } ! public void setLength (long pos) throws IOException { ! fd.setLength(pos); } public long length () throws IOException { ! return fd.length(); ! } ! ! public RandomAccessFile (String fileName, String mode) throws IOException ! { ! int fdmode; ! if (mode.compareTo ("r") == 0) ! fdmode = FileDescriptor.READ; ! else if (mode.compareTo ("rw") == 0) ! fdmode = FileDescriptor.READ | FileDescriptor.WRITE; ! else ! throw new IllegalArgumentException ("invalid mode: " + mode); ! ! SecurityManager s = System.getSecurityManager(); ! if (s != null) ! { ! s.checkRead(fileName); ! if ((fdmode & FileDescriptor.WRITE) != 0) ! s.checkWrite(fileName); ! } ! ! fd = new FileDescriptor (fileName, fdmode); ! out = new DataOutputStream (new FileOutputStream (fd)); ! in = new DataInputStream (new FileInputStream (fd)); ! } ! ! public RandomAccessFile (File file, String mode) throws IOException ! { ! this (file.getPath(), mode); } public int read () throws IOException { return in.read(); } public int read (byte[] buffer) throws IOException { ! return in.read(buffer); } ! public int read (byte[] buffer, int offset, int count) throws IOException { ! return in.read(buffer, offset, count); } public final boolean readBoolean () throws IOException { ! return in.readBoolean(); } public final byte readByte () throws IOException { ! return in.readByte(); } public final char readChar () throws IOException { return in.readChar(); } public final double readDouble () throws IOException { ! return in.readDouble(); } public final float readFloat () throws IOException { return in.readFloat(); } public final void readFully (byte[] buffer) throws IOException { in.readFully(buffer); } public final void readFully (byte[] buffer, int offset, int count) throws IOException { ! in.readFully(buffer, offset, count); } public final int readInt () throws IOException { return in.readInt(); } public final String readLine () throws IOException { ! return in.readLine(); } public final long readLong () throws IOException { return in.readLong(); } public final short readShort () throws IOException { return in.readShort(); } public final int readUnsignedByte () throws IOException { return in.readUnsignedByte(); } public final int readUnsignedShort () throws IOException { return in.readUnsignedShort(); } public final String readUTF () throws IOException { return in.readUTF(); } public void seek (long pos) throws IOException { ! fd.seek(pos, FileDescriptor.SET, false); } ! public int skipBytes (int count) throws IOException { ! if (count <= 0) return 0; ! long startPos = fd.getFilePointer(); ! long endPos = fd.seek(count, FileDescriptor.CUR, true); ! return (int) (endPos - startPos); } public void write (int oneByte) throws IOException { out.write(oneByte); } public void write (byte[] buffer) throws IOException { out.write(buffer); } ! public void write (byte[] buffer, int offset, int count) throws IOException { ! out.write(buffer, offset, count); } public final void writeBoolean (boolean val) throws IOException { out.writeBoolean(val); } public final void writeByte (int v) throws IOException { out.writeByte(v); } public final void writeShort (int v) throws IOException { out.writeShort(v); } public final void writeChar (int v) throws IOException { out.writeChar(v); } public final void writeInt (int v) throws IOException { out.writeInt(v); } public final void writeLong (long v) throws IOException { out.writeLong(v); } public final void writeFloat (float v) throws IOException { out.writeFloat(v); } public final void writeDouble (double v) throws IOException { out.writeDouble(v); } public final void writeBytes (String s) throws IOException { out.writeBytes(s); } ! public final void writeChars (String s) throws IOException { out.writeChars(s); } public final void writeUTF (String s) throws IOException { out.writeUTF(s); } - // The underlying file. - private FileDescriptor fd; - // The corresponding input and output streams. - private DataOutputStream out; - private DataInputStream in; - } --- 1,972 ---- ! /* RandomAccessFile.java -- Class supporting random file I/O ! Copyright (C) 1998, 1999, 2001, 2002, 2003 Free Software Foundation, Inc. ! This file is part of GNU Classpath. ! GNU Classpath is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! GNU Classpath is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with GNU Classpath; see the file COPYING. If not, write to the ! Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ! 02111-1307 USA. ! ! Linking this library statically or dynamically with other modules is ! making a combined work based on this library. Thus, the terms and ! conditions of the GNU General Public License cover the whole ! combination. ! ! As a special exception, the copyright holders of this library give you ! permission to link this library with independent modules to produce an ! executable, regardless of the license terms of these independent ! modules, and to copy and distribute the resulting executable under ! terms of your choice, provided that you also meet, for each linked ! independent module, the terms and conditions of the license of that ! module. An independent module is a module which is not derived from ! or based on this library. If you modify this library, you may extend ! this exception to your version of the library, but you are not ! obligated to do so. If you do not wish to do so, delete this ! exception statement from your version. */ package java.io; ! import java.nio.channels.FileChannel; ! import java.nio.channels.FileChannelImpl; /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 * "The Java Language Specification", ISBN 0-201-63451-1 * Status: Believe complete and correct to 1.1. */ + /** + * This class allows reading and writing of files at random locations. + * Most Java I/O classes are either pure sequential input or output. This + * class fulfills the need to be able to read the bytes of a file in an + * arbitrary order. In addition, this class implements the + * DataInput and DataOutput interfaces to allow + * the reading and writing of Java primitives. + * + * @author Aaron M. Renn + * @author Tom Tromey + */ public class RandomAccessFile implements DataOutput, DataInput { + + // The underlying file. + private FileDescriptor fd; + // The corresponding input and output streams. + private DataOutputStream out; + private DataInputStream in; + + private FileChannel ch; /* cached associated file-channel */ + + /** + * This method initializes a new instance of RandomAccessFile + * to read from the specified File object with the specified + * access mode. The access mode is either "r" for read only access or "rw" + * for read-write access. + *

            + * Note that a SecurityManager check is made prior to + * opening the file to determine whether or not this file is allowed to + * be read or written. + * + * @param file The File object to read and/or write. + * @param mode "r" for read only or "rw" for read-write access to the file + * + * @exception IllegalArgumentException If mode has an + * illegal value + * @exception SecurityException If the requested access to the file + * is not allowed + * @exception IOException If any other error occurs + */ + public RandomAccessFile (File file, String mode) + throws FileNotFoundException + { + this (file.getPath(), mode); + } + + /** + * This method initializes a new instance of RandomAccessFile + * to read from the specified file name with the specified access mode. + * The access mode is either "r" for read only access, "rw" for read + * write access, "rws" for synchronized read/write access of both + * content and metadata, or "rwd" for read/write access + * where only content is required to be synchronous. + *

            + * Note that a SecurityManager check is made prior to + * opening the file to determine whether or not this file is allowed to + * be read or written. + * + * @param fileName The name of the file to read and/or write + * @param mode "r", "rw", "rws", or "rwd" + * + * @exception IllegalArgumentException If mode has an + * illegal value + * @exception SecurityException If the requested access to the file + * is not allowed + * @exception FileNotFoundException If any other error occurs + */ + public RandomAccessFile (String fileName, String mode) + throws FileNotFoundException + { + int fdmode; + if (mode.equals("r")) + fdmode = FileDescriptor.READ; + else if (mode.equals("rw")) + fdmode = FileDescriptor.READ | FileDescriptor.WRITE; + else if (mode.equals("rws")) + { + fdmode = (FileDescriptor.READ | FileDescriptor.WRITE + | FileDescriptor.SYNC); + } + else if (mode.equals("rwd")) + { + fdmode = (FileDescriptor.READ | FileDescriptor.WRITE + | FileDescriptor.DSYNC); + } + else + throw new IllegalArgumentException ("invalid mode: " + mode); + + // The obligatory SecurityManager stuff + SecurityManager s = System.getSecurityManager(); + if (s != null) + { + s.checkRead(fileName); + + if ((fdmode & FileDescriptor.WRITE) != 0) + s.checkWrite(fileName); + } + + fd = new FileDescriptor (fileName, fdmode); + out = new DataOutputStream (new FileOutputStream (fd)); + in = new DataInputStream (new FileInputStream (fd)); + } + + /** + * This method closes the file and frees up all file related system + * resources. Since most operating systems put a limit on how many files + * may be opened at any given time, it is a good idea to close all files + * when no longer needed to avoid hitting this limit + */ public void close () throws IOException { if (fd.valid()) fd.close(); } + /** + * This method returns a FileDescriptor object that + * represents the native file handle for this file. + * + * @return The FileDescriptor object for this file + * + * @exception IOException If an error occurs + */ public final FileDescriptor getFD () throws IOException { if (! fd.valid()) throw new IOException (); + return fd; } + /** + * This method returns the current offset in the file at which the next + * read or write will occur + * + * @return The current file position + * + * @exception IOException If an error occurs + */ public long getFilePointer () throws IOException { return fd.getFilePointer(); } ! /** ! * This method sets the length of the file to the specified length. If ! * the currently length of the file is longer than the specified length, ! * then the file is truncated to the specified length. If the current ! * length of the file is shorter than the specified length, the file ! * is extended with bytes of an undefined value. ! *

            ! * The file must be open for write access for this operation to succeed. ! * ! * @param newlen The new length of the file ! * ! * @exception IOException If an error occurs ! */ ! public void setLength (long newLen) throws IOException { ! fd.setLength (newLen); } + /** + * This method returns the length of the file in bytes + * + * @return The length of the file + * + * @exception IOException If an error occurs + */ public long length () throws IOException { ! return fd.getLength (); } + /** + * This method reads a single byte of data from the file and returns it + * as an integer. + * + * @return The byte read as an int, or -1 if the end of the file was reached. + * + * @exception IOException If an error occurs + */ public int read () throws IOException { return in.read(); } + /** + * This method reads bytes from the file into the specified array. The + * bytes are stored starting at the beginning of the array and up to + * buf.length bytes can be read. + * + * @param buf The buffer to read bytes from the file into + * + * @return The actual number of bytes read or -1 if end of file + * + * @exception IOException If an error occurs + */ public int read (byte[] buffer) throws IOException { ! return in.read (buffer); } ! /** ! * This methods reads up to len bytes from the file into the ! * specified array starting at position offset into the array. ! * ! * @param buf The array to read the bytes into ! * @param offset The index into the array to start storing bytes ! * @param len The requested number of bytes to read ! * ! * @return The actual number of bytes read, or -1 if end of file ! * ! * @exception IOException If an error occurs ! */ ! public int read (byte[] buffer, int offset, int len) throws IOException { ! return in.read (buffer, offset, len); } + /** + * This method reads a Java boolean value from an input stream. It does + * so by reading a single byte of data. If that byte is zero, then the + * value returned is false If the byte is non-zero, then + * the value returned is true + *

            + * This method can read a boolean written by an object + * implementing the + * writeBoolean() method in the DataOutput + * interface. + * + * @return The boolean value read + * + * @exception EOFException If end of file is reached before reading the + * boolean + * @exception IOException If any other error occurs + */ public final boolean readBoolean () throws IOException { ! return in.readBoolean (); } + /** + * This method reads a Java byte value from an input stream. The value + * is in the range of -128 to 127. + *

            + * This method can read a byte written by an object + * implementing the + * writeByte() method in the DataOutput interface. + * + * @return The byte value read + * + * @exception EOFException If end of file is reached before reading the byte + * @exception IOException If any other error occurs + * + * @see DataOutput + */ public final byte readByte () throws IOException { ! return in.readByte (); } + /** + * This method reads a Java char value from an input stream. + * It operates by reading two bytes from the stream and converting them to + * a single 16-bit Java char The two bytes are stored most + * significant byte first (i.e., "big endian") regardless of the native + * host byte ordering. + *

            + * As an example, if byte1 and code{byte2 represent + * the first + * and second byte read from the stream respectively, they will be + * transformed to a char in the following manner: + *

            + * (char)(((byte1 & 0xFF) << 8) | (byte2 & 0xFF) + *

            + * This method can read a char written by an object + * implementing the + * writeChar() method in the DataOutput interface. + * + * @return The char value read + * + * @exception EOFException If end of file is reached before reading the char + * @exception IOException If any other error occurs + * + * @see DataOutput + */ public final char readChar () throws IOException { return in.readChar(); } + /** + * This method reads a Java double value from an input stream. It operates + * by first reading a logn value from the stream by calling the + * readLong() method in this interface, then + * converts that long + * to a double using the longBitsToDouble + * method in the class java.lang.Double + *

            + * This method can read a double written by an object + * implementing the + * writeDouble() method in the DataOutput + * interface. + * + * @return The double value read + * + * @exception EOFException If end of file is reached before reading + * the double + * @exception IOException If any other error occurs + * + * @see java.lang.Double + * @see DataOutput + */ public final double readDouble () throws IOException { ! return in.readDouble (); } + /** + * This method reads a Java float value from an input stream. It operates + * by first reading an int value from the stream by calling the + * readInt() method in this interface, then converts + * that int + * to a float using the intBitsToFloat method in + * the class java.lang.Float + *

            + * This method can read a float written by an object + * implementing the + * writeFloat() method in the DataOutput interface. + * + * @return The float value read + * + * @exception EOFException If end of file is reached before reading the float + * @exception IOException If any other error occurs + * + * @see java.lang.Float + * @see DataOutput + */ public final float readFloat () throws IOException { return in.readFloat(); } + /** + * This method reads raw bytes into the passed array until the array is + * full. Note that this method blocks until the data is available and + * throws an exception if there is not enough data left in the stream to + * fill the buffer + * + * @param buf The buffer into which to read the data + * + * @exception EOFException If end of file is reached before filling the + * buffer + * @exception IOException If any other error occurs + */ public final void readFully (byte[] buffer) throws IOException { in.readFully(buffer); } + /** + * This method reads raw bytes into the passed array buf + * starting + * offset bytes into the buffer. The number of bytes read + * will be + * exactly len Note that this method blocks until the data is + * available and throws an exception if there is not enough data left in + * the stream to read len bytes. + * + * @param buf The buffer into which to read the data + * @param offset The offset into the buffer to start storing data + * @param len The number of bytes to read into the buffer + * + * @exception EOFException If end of file is reached before filling + * the buffer + * @exception IOException If any other error occurs + */ public final void readFully (byte[] buffer, int offset, int count) throws IOException { ! in.readFully (buffer, offset, count); } + /** + * This method reads a Java int value from an input stream + * It operates by reading four bytes from the stream and converting them to + * a single Java int The bytes are stored most + * significant byte first (i.e., "big endian") regardless of the native + * host byte ordering. + *

            + * As an example, if byte1 through byte4 + * represent the first + * four bytes read from the stream, they will be + * transformed to an int in the following manner: + *

            + * (int)(((byte1 & 0xFF) << 24) + ((byte2 & 0xFF) << 16) + + * ((byte3 & 0xFF) << 8) + (byte4 & 0xFF))) + *

            + * The value returned is in the range of 0 to 65535. + *

            + * This method can read an int written by an object + * implementing the + * writeInt() method in the DataOutput interface. + * + * @return The int value read + * + * @exception EOFException If end of file is reached before reading the int + * @exception IOException If any other error occurs + * + * @see DataOutput + */ public final int readInt () throws IOException { return in.readInt(); } + /** + * This method reads the next line of text data from an input stream. + * It operates by reading bytes and converting those bytes to + * char + * values by treating the byte read as the low eight bits of the + * char + * and using 0 as the high eight bits. Because of this, it does + * not support the full 16-bit Unicode character set. + *

            + * The reading of bytes ends when either the end of file or a line terminator + * is encountered. The bytes read are then returned as a String + * A line terminator is a byte sequence consisting of either + * \r \n or \r\n These + * termination charaters are + * discarded and are not returned as part of the string. + *

            + * This method can read data that was written by an object implementing the + * writeLine() method in DataOutput + * + * @return The line read as a String + * + * @exception IOException If an error occurs + * + * @see DataOutput + */ public final String readLine () throws IOException { ! return in.readLine (); } + /** + * This method reads a Java long value from an input stream + * It operates by reading eight bytes from the stream and converting them to + * a single Java long The bytes are stored most + * significant byte first (i.e., "big endian") regardless of the native + * host byte ordering. + *

            + * As an example, if byte1 through byte8 + * represent the first + * eight bytes read from the stream, they will be + * transformed to an long in the following manner: + *

            + * + * (long)((((long)byte1 & 0xFF) << 56) + (((long)byte2 & 0xFF) << 48) + + * (((long)byte3 & 0xFF) << 40) + (((long)byte4 & 0xFF) << 32) + + * (((long)byte5 & 0xFF) << 24) + (((long)byte6 & 0xFF) << 16) + + * (((long)byte7 & 0xFF) << 8) + ((long)byte9 & 0xFF))) + *

            + * The value returned is in the range of 0 to 65535. + *

            + * This method can read an long written by an object + * implementing the + * writeLong() method in the DataOutput interface. + * + * @return The long value read + * + * @exception EOFException If end of file is reached before reading the long + * @exception IOException If any other error occurs + * + * @see DataOutput + */ public final long readLong () throws IOException { return in.readLong(); } + /** + * This method reads a signed 16-bit value into a Java in from the stream. + * It operates by reading two bytes from the stream and converting them to + * a single 16-bit Java short The two bytes are stored most + * significant byte first (i.e., "big endian") regardless of the native + * host byte ordering. + *

            + * As an example, if byte1 and code{byte2 + * represent the first + * and second byte read from the stream respectively, they will be + * transformed to a short in the following manner: + *

            + * (short)(((byte1 & 0xFF) << 8) | (byte2 & 0xFF) + *

            + * The value returned is in the range of -32768 to 32767. + *

            + * This method can read a short written by an object + * implementing the + * writeShort() method in the DataOutput interface. + * + * @return The short value read + * + * @exception EOFException If end of file is reached before reading the value + * @exception IOException If any other error occurs + * + * @see DataOutput + */ public final short readShort () throws IOException { return in.readShort(); } + /** + * This method reads 8 unsigned bits into a Java int value + * from the + * stream. The value returned is in the range of 0 to 255. + *

            + * This method can read an unsigned byte written by an object implementing + * the writeUnsignedByte() method in the + * DataOutput interface. + * + * @return The unsigned bytes value read as a Java int + * + * @exception EOFException If end of file is reached before reading the value + * @exception IOException If any other error occurs + * + * @see DataOutput + */ public final int readUnsignedByte () throws IOException { return in.readUnsignedByte(); } + /** + * This method reads 16 unsigned bits into a Java int value from the stream. + * It operates by reading two bytes from the stream and converting them to + * a single Java int The two bytes are stored most + * significant byte first (i.e., "big endian") regardless of the native + * host byte ordering. + *

            + * As an example, if byte1 and byte2 + * represent the first + * and second byte read from the stream respectively, they will be + * transformed to an int in the following manner: + *

            + * (int)(((byte1 & 0xFF) << 8) + (byte2 & 0xFF)) + *

            + * The value returned is in the range of 0 to 65535. + *

            + * This method can read an unsigned short written by an object implementing + * the writeUnsignedShort() method in the + * DataOutput interface. + * + * @return The unsigned short value read as a Java int + * + * @exception EOFException If end of file is reached before reading the value + * @exception IOException If any other error occurs + */ public final int readUnsignedShort () throws IOException { return in.readUnsignedShort(); } + /** + * This method reads a String from an input stream that + * is encoded in + * a modified UTF-8 format. This format has a leading two byte sequence + * that contains the remaining number of bytes to read. This two byte + * sequence is read using the readUnsignedShort() method of this + * interface. + *

            + * After the number of remaining bytes have been determined, these bytes + * are read an transformed into char values. + * These char values + * are encoded in the stream using either a one, two, or three byte format. + * The particular format in use can be determined by examining the first + * byte read. + *

            + * If the first byte has a high order bit of 0 then + * that character consists on only one byte. This character value consists + * of seven bits that are at positions 0 through 6 of the byte. As an + * example, if byte1 is the byte read from the stream, it would + * be converted to a char like so: + *

            + * (char)byte1 + *

            + * If the first byte has 110 as its high order bits, then the + * character consists of two bytes. The bits that make up the character + * value are in positions 0 through 4 of the first byte and bit positions + * 0 through 5 of the second byte. (The second byte should have + * 10 as its high order bits). These values are in most significant + * byte first (i.e., "big endian") order. + *

            + * As an example, if byte1 and byte2 + * are the first two bytes + * read respectively, and the high order bits of them match the patterns + * which indicate a two byte character encoding, then they would be + * converted to a Java char like so: + *

            + * (char)(((byte1 & 0x1F) << 6) | (byte2 & 0x3F)) + *

            + * If the first byte has a 1110 as its high order bits, then the + * character consists of three bytes. The bits that make up the character + * value are in positions 0 through 3 of the first byte and bit positions + * 0 through 5 of the other two bytes. (The second and third bytes should + * have 10 as their high order bits). These values are in most + * significant byte first (i.e., "big endian") order. + *

            + * As an example, if byte1 byte2 + * and byte3 are the + * three bytes read, and the high order bits of them match the patterns + * which indicate a three byte character encoding, then they would be + * converted to a Java char like so: + *

            + * (char)(((byte1 & 0x0F) << 12) | ((byte2 & 0x3F) << 6) | + * (byte3 & 0x3F)) + *

            + * Note that all characters are encoded in the method that requires the + * fewest number of bytes with the exception of the character with the + * value of \u0000 which is encoded as two bytes. This is + * a modification of the UTF standard used to prevent C language style + * NUL values from appearing in the byte stream. + *

            + * This method can read data that was written by an object implementing the + * writeUTF() method in DataOutput + * + * @return The String read + * + * @exception EOFException If end of file is reached before reading the + * String + * @exception UTFDataFormatException If the data is not in UTF-8 format + * @exception IOException If any other error occurs + * + * @see DataOutput + */ public final String readUTF () throws IOException { return in.readUTF(); } + /** + * This method sets the current file position to the specified offset + * from the beginning of the file. Note that some operating systems will + * allow the file pointer to be set past the current end of the file. + * + * @param pos The offset from the beginning of the file at which to set + * the file pointer + * + * @exception IOException If an error occurs + */ public void seek (long pos) throws IOException { ! fd.seek (pos, FileDescriptor.SET, false); } ! /** ! * This method attempts to skip and discard the specified number of bytes ! * in the input stream. It may actually skip fewer bytes than requested. ! * The actual number of bytes skipped is returned. This method will not ! * skip any bytes if passed a negative number of bytes to skip. ! * ! * @param numBytes The requested number of bytes to skip. ! * ! * @return The number of bytes actually skipped. ! * ! * @exception IOException If an error occurs. ! */ ! public int skipBytes (int numBytes) throws IOException { ! if (numBytes < 0) ! throw new IllegalArgumentException ("Can't skip negative bytes: " + ! numBytes); ! ! if (numBytes == 0) return 0; ! ! long curPos = fd.getFilePointer (); ! long newPos = fd.seek (numBytes, FileDescriptor.CUR, true); ! ! return (int) (newPos - curPos); } + /** + * This method writes a single byte of data to the file. The file must + * be open for read-write in order for this operation to succeed. + * + * @param The byte of data to write, passed as an int. + * + * @exception IOException If an error occurs + */ public void write (int oneByte) throws IOException { out.write(oneByte); } + /** + * This method writes all the bytes in the specified array to the file. + * The file must be open read-write in order for this operation to succeed. + * + * @param buf The array of bytes to write to the file + */ public void write (byte[] buffer) throws IOException { out.write(buffer); } ! /** ! * This method writes len bytes to the file from the specified ! * array starting at index offset into the array. ! * ! * @param buf The array of bytes to write to the file ! * @param offset The index into the array to start writing file ! * @param len The number of bytes to write ! * ! * @exception IOException If an error occurs ! */ ! public void write (byte[] buffer, int offset, int len) throws IOException { ! out.write (buffer, offset, len); } + /** + * This method writes a Java boolean to the underlying output + * stream. For a value of true, 1 is written to the stream. + * For a value of false, 0 is written. + * + * @param b The boolean value to write to the stream + * + * @exception IOException If an error occurs + */ public final void writeBoolean (boolean val) throws IOException { out.writeBoolean(val); } + /** + * This method writes a Java byte value to the underlying + * output stream. + * + * @param b The byte to write to the stream, passed + * as an int. + * + * @exception IOException If an error occurs + */ public final void writeByte (int v) throws IOException { out.writeByte(v); } + /** + * This method writes a Java short to the stream, high byte + * first. This method requires two bytes to encode the value. + * + * @param s The short value to write to the stream, + * passed as an int. + * + * @exception IOException If an error occurs + */ public final void writeShort (int v) throws IOException { out.writeShort(v); } + /** + * This method writes a single char value to the stream, + * high byte first. + * + * @param v The char value to write, passed as + * an int. + * + * @exception IOException If an error occurs + */ public final void writeChar (int v) throws IOException { out.writeChar(v); } + /** + * This method writes a Java int to the stream, high bytes + * first. This method requires four bytes to encode the value. + * + * @param v The int value to write to the stream. + * + * @exception IOException If an error occurs + */ public final void writeInt (int v) throws IOException { out.writeInt(v); } + /** + * This method writes a Java long to the stream, high bytes + * first. This method requires eight bytes to encode the value. + * + * @param v The long value to write to the stream. + * + * @exception IOException If an error occurs + */ public final void writeLong (long v) throws IOException { out.writeLong(v); } + /** + * This method writes a Java float value to the stream. This + * value is written by first calling the method + * Float.floatToIntBits + * to retrieve an int representing the floating point number, + * then writing this int value to the stream exactly the same + * as the writeInt() method does. + * + * @param v The floating point number to write to the stream. + * + * @exception IOException If an error occurs + * + * @see #writeInt(int) + */ public final void writeFloat (float v) throws IOException { out.writeFloat(v); } + /** + * This method writes a Java double value to the stream. This + * value is written by first calling the method + * Double.doubleToLongBits + * to retrieve an long representing the floating point number, + * then writing this long value to the stream exactly the same + * as the writeLong() method does. + * + * @param v The double precision floating point number to write to the + * stream. + * + * @exception IOException If an error occurs + * + * @see #writeLong(long) + */ public final void writeDouble (double v) throws IOException { out.writeDouble(v); } + /** + * This method writes all the bytes in a String out to the + * stream. One byte is written for each character in the String. + * The high eight bits of each character are discarded. + * + * @param s The String to write to the stream + * + * @exception IOException If an error occurs + */ public final void writeBytes (String s) throws IOException { out.writeBytes(s); } ! ! /** ! * This method writes all the characters in a String to the ! * stream. There will be two bytes for each character value. The high ! * byte of the character will be written first. ! * ! * @param s The String to write to the stream. ! * ! * @exception IOException If an error occurs ! */ public final void writeChars (String s) throws IOException { out.writeChars(s); } + /** + * This method writes a Java String to the stream in a modified + * UTF-8 format. First, two bytes are written to the stream indicating the + * number of bytes to follow. Note that this is the number of bytes in the + * encoded String not the String length. Next + * come the encoded characters. Each character in the String + * is encoded as either one, two or three bytes. For characters in the + * range of \u0001 to \u007F, + * one byte is used. The character + * value goes into bits 0-7 and bit eight is 0. For characters in the range + * of \u0080 to \u007FF, two + * bytes are used. Bits + * 6-10 of the character value are encoded bits 0-4 of the first byte, with + * the high bytes having a value of "110". Bits 0-5 of the character value + * are stored in bits 0-5 of the second byte, with the high bits set to + * "10". This type of encoding is also done for the null character + * \u0000. This eliminates any C style NUL character values + * in the output. All remaining characters are stored as three bytes. + * Bits 12-15 of the character value are stored in bits 0-3 of the first + * byte. The high bits of the first bytes are set to "1110". Bits 6-11 + * of the character value are stored in bits 0-5 of the second byte. The + * high bits of the second byte are set to "10". And bits 0-5 of the + * character value are stored in bits 0-5 of byte three, with the high bits + * of that byte set to "10". + * + * @param s The String to write to the output in UTF format + * + * @exception IOException If an error occurs + */ public final void writeUTF (String s) throws IOException { out.writeUTF(s); } + + /** + * This method creates a java.nio.channels.FileChannel. + * Nio does not allow one to create a file channel directly. + * A file channel must be created by first creating an instance of + * Input/Output/RandomAccessFile and invoking the getChannel() method on it. + */ + public final synchronized FileChannel getChannel () + { + if (ch == null) + ch = new FileChannelImpl (fd, true, this); + + return ch; + } + } // class RandomAccessFile diff -Nrc3pad gcc-3.3.3/libjava/java/io/Reader.java gcc-3.4.0/libjava/java/io/Reader.java *** gcc-3.3.3/libjava/java/io/Reader.java 2002-01-22 22:40:14.000000000 +0000 --- gcc-3.4.0/libjava/java/io/Reader.java 2003-03-18 06:00:25.000000000 +0000 *************** *** 1,5 **** /* Reader.java -- base class of classes that read input as a stream of chars ! Copyright (C) 1998, 1999, 2000 Free Software Foundation This file is part of GNU Classpath. --- 1,5 ---- /* Reader.java -- base class of classes that read input as a stream of chars ! Copyright (C) 1998, 1999, 2000, 2003 Free Software Foundation This file is part of GNU Classpath. *************** public abstract class Reader *** 222,228 **** *

            * This method always returns false in this class * ! * @return true if the stream is ready to be read, false otherwise. * * @exception IOException If an error occurs */ --- 222,229 ---- *

            * This method always returns false in this class * ! * @return true if the stream is ready to be read, ! * false otherwise. * * @exception IOException If an error occurs */ diff -Nrc3pad gcc-3.3.3/libjava/java/io/Serializable.java gcc-3.4.0/libjava/java/io/Serializable.java *** gcc-3.3.3/libjava/java/io/Serializable.java 2002-11-10 22:06:48.000000000 +0000 --- gcc-3.4.0/libjava/java/io/Serializable.java 2003-10-11 18:38:12.000000000 +0000 *************** package java.io; *** 51,55 **** */ public interface Serializable { ! static final long serialVersionUID = 1196656838076753133L; } // interface Serializable --- 51,55 ---- */ public interface Serializable { ! long serialVersionUID = 1196656838076753133L; } // interface Serializable diff -Nrc3pad gcc-3.3.3/libjava/java/io/SerializablePermission.java gcc-3.4.0/libjava/java/io/SerializablePermission.java *** gcc-3.3.3/libjava/java/io/SerializablePermission.java 2002-11-10 22:06:48.000000000 +0000 --- gcc-3.4.0/libjava/java/io/SerializablePermission.java 2003-03-23 19:11:19.000000000 +0000 *************** *** 1,5 **** /* SerializablePermission.java -- Basic permissions related to serialization. ! Copyright (C) 1998, 2000 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* SerializablePermission.java -- Basic permissions related to serialization. ! Copyright (C) 1998, 2000, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** import java.security.BasicPermission; *** 55,118 **** * * @see java.security.BasicPermission * - * @version 0.0 - * * @author Aaron M. Renn (arenn@urbanophile.com) */ public final class SerializablePermission extends BasicPermission { static final long serialVersionUID = 8537212141160296410L; ! /* ! * Class Variables ! */ ! ! private static final String[] legal_names = { "enableSubclassImplementation", ! "enableSubstitution" }; ! /*************************************************************************/ ! ! /* ! * Constructors ! */ ! ! /** ! * This method initializes a new instance of SerializablePermission ! * that has the specified name. ! * ! * @param name The name of the permission. ! * ! * @exception IllegalArgumentException If the name is not valid for this class. ! */ ! public ! SerializablePermission(String name) ! { ! this(name, null); ! } ! /*************************************************************************/ ! /** ! * This method initializes a new instance of SerializablePermission ! * that has the specified name and action list. Note that the action list ! * is unused in this class. ! * ! * @param name The name of the permission. ! * @param actions The action list (unused). ! * ! * @exception IllegalArgumentException If the name is not valid for this class. ! */ ! public ! SerializablePermission(String name, String actions) ! { ! super(name, actions); ! for (int i = 0; i < legal_names.length; i++) ! if (legal_names[i].equals(name)) ! return; ! throw new IllegalArgumentException("Bad permission name: " + name); ! } } // class SerializablePermission --- 55,113 ---- * * @see java.security.BasicPermission * * @author Aaron M. Renn (arenn@urbanophile.com) */ public final class SerializablePermission extends BasicPermission { static final long serialVersionUID = 8537212141160296410L; ! /* ! * Class Variables ! */ ! private static final String[] legal_names = { "enableSubclassImplementation", ! "enableSubstitution" }; ! /* ! * Constructors ! */ ! /** ! * This method initializes a new instance of ! * SerializablePermission ! * that has the specified name. ! * ! * @param name The name of the permission. ! * ! * @exception IllegalArgumentException If the name is not valid for ! * this class. ! */ ! public SerializablePermission(String name) ! { ! this(name, null); ! } ! /** ! * This method initializes a new instance of ! * SerializablePermission ! * that has the specified name and action list. Note that the action list ! * is unused in this class. ! * ! * @param name The name of the permission. ! * @param actions The action list (unused). ! * ! * @exception IllegalArgumentException If the name is not valid for ! * this class. ! */ ! public SerializablePermission(String name, String actions) ! { ! super(name, actions); ! for (int i = 0; i < legal_names.length; i++) ! if (legal_names[i].equals(name)) ! return; + throw new IllegalArgumentException("Bad permission name: " + name); + } } // class SerializablePermission diff -Nrc3pad gcc-3.3.3/libjava/java/io/StreamTokenizer.java gcc-3.4.0/libjava/java/io/StreamTokenizer.java *** gcc-3.3.3/libjava/java/io/StreamTokenizer.java 2002-07-16 21:08:25.000000000 +0000 --- gcc-3.4.0/libjava/java/io/StreamTokenizer.java 2003-11-16 21:15:55.000000000 +0000 *************** *** 1,5 **** /* StreamTokenizer.java -- parses streams of characters into tokens ! Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation This file is part of GNU Classpath. --- 1,5 ---- /* StreamTokenizer.java -- parses streams of characters into tokens ! Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation This file is part of GNU Classpath. *************** public class StreamTokenizer *** 167,180 **** } /** ! * This method sets the comment attribute on the specified character. * * @param c The character to set the comment attribute for, passed as an int */ public void commentChar(int ch) { if (ch >= 0 && ch <= 255) ! comment[ch] = true; } /** --- 167,187 ---- } /** ! * This method sets the comment attribute on the specified ! * character. Other attributes for the character are cleared. * * @param c The character to set the comment attribute for, passed as an int */ public void commentChar(int ch) { if (ch >= 0 && ch <= 255) ! { ! comment[ch] = true; ! whitespace[ch] = false; ! alphabetic[ch] = false; ! numeric[ch] = false; ! quote[ch] = false; ! } } /** *************** public class StreamTokenizer *** 566,578 **** /** * This method sets the quote attribute on the specified character. * * @param c The character to set the quote attribute for, passed as an int. */ public void quoteChar(int ch) { if (ch >= 0 && ch <= 255) ! quote[ch] = true; } /** --- 573,592 ---- /** * This method sets the quote attribute on the specified character. + * Other attributes for the character are cleared. * * @param c The character to set the quote attribute for, passed as an int. */ public void quoteChar(int ch) { if (ch >= 0 && ch <= 255) ! { ! quote[ch] = true; ! comment[ch] = false; ! whitespace[ch] = false; ! alphabetic[ch] = false; ! numeric[ch] = false; ! } } /** *************** public class StreamTokenizer *** 580,586 **** * quote, and comment) from all characters. It is equivalent to calling * ordinaryChars(0x00, 0xFF). * ! * @see ordinaryChars */ public void resetSyntax() { --- 594,600 ---- * quote, and comment) from all characters. It is equivalent to calling * ordinaryChars(0x00, 0xFF). * ! * @see #ordinaryChars(int, int) */ public void resetSyntax() { diff -Nrc3pad gcc-3.3.3/libjava/java/io/StringReader.java gcc-3.4.0/libjava/java/io/StringReader.java *** gcc-3.3.3/libjava/java/io/StringReader.java 2002-01-22 22:40:14.000000000 +0000 --- gcc-3.4.0/libjava/java/io/StringReader.java 2003-03-18 06:00:25.000000000 +0000 *************** *** 1,5 **** /* StringReader.java -- permits a String to be read as a character input stream ! Copyright (C) 1998, 1999, 2000 Free Software Foundation This file is part of GNU Classpath. --- 1,5 ---- /* StringReader.java -- permits a String to be read as a character input stream ! Copyright (C) 1998, 1999, 2000, 2003 Free Software Foundation This file is part of GNU Classpath. *************** package java.io; *** 51,58 **** * normal. If no mark has been set, then calling the reset() * method rewinds the read pointer to the beginning of the String. * - * @version 0.0 - * * @author Aaron M. Renn (arenn@urbanophile.com) * @author Warren Levy * @date October 19, 1998. --- 51,56 ---- *************** public class StringReader extends Reader *** 73,80 **** /** * Create a new StringReader that will read chars from the ! * passed in String. This stream will read from the beginning to the ! * end of the String. * * @param s The String this stream will read from. */ --- 71,78 ---- /** * Create a new StringReader that will read chars from the ! * passed in String. This stream will read from the beginning ! * to the end of the String. * * @param s The String this stream will read from. */ *************** public class StringReader extends Reader *** 208,210 **** --- 206,209 ---- } } } + diff -Nrc3pad gcc-3.3.3/libjava/java/io/Writer.java gcc-3.4.0/libjava/java/io/Writer.java *** gcc-3.3.3/libjava/java/io/Writer.java 2002-01-22 22:40:14.000000000 +0000 --- gcc-3.4.0/libjava/java/io/Writer.java 2003-03-24 08:27:28.000000000 +0000 *************** *** 1,5 **** /* Writer.java -- Base class for character output streams ! Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Writer.java -- Base class for character output streams ! Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** package java.io; *** 44,222 **** */ /** ! * This abstract class forms the base of the hierarchy of classes that ! * write output as a stream of chars. It provides a common set of methods ! * for writing chars to stream. Subclasses implement and/or extend these ! * methods to write chars in a particular manner or to a particular ! * destination such as a file on disk or network connection. ! * ! * @author Aaron M. Renn (arenn@urbanophile.com) ! * @author Per Bothner ! */ ! public abstract class Writer ! { ! ! /*************************************************************************/ ! ! /** ! * This is the object used to synchronize criticial code sections for ! * thread safety. Subclasses should use this field instead of using ! * synchronized methods or explicity synchronizations on this ! */ ! protected Object lock; ! ! /*************************************************************************/ ! ! /* ! * Constructors */ ! ! /** ! * This is the default no-argument constructor for this class. This method ! * will set up the class to synchronize criticial sections on itself. ! */ ! protected ! Writer() ! { ! lock = this; ! } ! ! /*************************************************************************/ ! ! /** ! * This method initializes a Writer that will synchronize ! * on the specified Object. ! * ! * @param obj The Object to use for synchronizing critical ! * sections ! */ ! protected ! Writer(Object lock) { ! this.lock = lock; ! } ! ! /*************************************************************************/ ! ! /* ! * Instance Methods ! */ ! ! /** ! * This method forces any data that may have been buffered to be written ! * to the underlying output device. Please note that the host environment ! * might perform its own buffering unbeknowst to Java. In that case, a ! * write made (for example, to a disk drive) might be cached in OS ! * buffers instead of actually being written to disk. ! * ! * @exception IOException If an error occurs ! */ ! public abstract void ! flush() throws IOException; ! ! /*************************************************************************/ ! ! /** ! * This method closes the stream. Any internal or native resources associated ! * with this stream are freed. Any subsequent attempt to access the stream ! * might throw an exception. ! *

            ! * This method in this class does nothing. ! * ! * @exception IOException If an error occurs ! */ ! public abstract void ! close() throws IOException; ! ! /*************************************************************************/ ! /** ! * This method writes a single char to the output stream. ! * ! * @param b The char to be written to the output stream, passed as an int ! * ! * @exception IOException If an error occurs ! */ ! public void ! write(int b) throws IOException ! { ! char[] buf = new char[1]; ! buf[0] = (char)b; ! write(buf, 0, buf.length); ! } ! /*************************************************************************/ ! /** ! * This method all the writes char from the passed array to the output stream. ! * This method is equivalent to write(buf, 0, buf.length) which ! * is exactly how it is implemented in this class. ! * ! * @param buf The array of char to write ! * ! * @exception IOException If an error occurs ! */ ! public void ! write(char[] buf) throws IOException ! { ! write(buf, 0, buf.length); ! } ! /*************************************************************************/ ! /** ! * This method writes len char from the specified array ! * buf starting at index offset into the array. ! *

            ! * Subclasses must provide an implementation of this abstract method. ! * ! * @param buf The array of char to write from ! * @param offset The index into the array to start writing from ! * @param len The number of char to write ! * ! * @exception IOException If an error occurs ! */ ! public abstract void ! write(char[] buf, int offset, int len) throws IOException; ! /*************************************************************************/ ! /** ! * This method writes all the characters in a String to the ! * output. ! * ! * @param str The String whose chars are to be written. ! * ! * @param IOException If an error occurs ! */ ! public void ! write(String str) throws IOException ! { ! write(str, 0, str.length()); ! } ! /*************************************************************************/ ! /** ! * This method writes len chars from the String ! * starting at position offset. ! * ! * @param str The String that is to be written ! * @param offset The character offset into the String to start ! * writing from ! * @param len The number of chars to write ! * ! * @exception IOException If an error occurs ! */ ! public void ! write(String str, int offset, int len) throws IOException ! { ! // FIXME - for libgcj re-write using native code to not require copied buffer. ! char[] buf = new char[len]; ! str.getChars(offset, offset + len, buf, 0); ! write(buf, 0, len); ! } } // class Writer --- 44,189 ---- */ /** ! * This abstract class forms the base of the hierarchy of classes that ! * write output as a stream of chars. It provides a common set of methods ! * for writing chars to stream. Subclasses implement and/or extend these ! * methods to write chars in a particular manner or to a particular ! * destination such as a file on disk or network connection. ! * ! * @author Aaron M. Renn (arenn@urbanophile.com) ! * @author Per Bothner */ ! public abstract class Writer { ! /** ! * This is the object used to synchronize criticial code sections for ! * thread safety. Subclasses should use this field instead of using ! * synchronized methods or explicity synchronizations on this ! */ ! protected Object lock; ! /** ! * This is the default no-argument constructor for this class. This method ! * will set up the class to synchronize criticial sections on itself. ! */ ! protected Writer() ! { ! lock = this; ! } ! /** ! * This method initializes a Writer that will synchronize ! * on the specified Object. ! * ! * @param obj The Object to use for synchronizing critical ! * sections ! */ ! protected Writer(Object lock) ! { ! this.lock = lock; ! } ! /** ! * This method forces any data that may have been buffered to be written ! * to the underlying output device. Please note that the host environment ! * might perform its own buffering unbeknowst to Java. In that case, a ! * write made (for example, to a disk drive) might be cached in OS ! * buffers instead of actually being written to disk. ! * ! * @exception IOException If an error occurs ! */ ! public abstract void flush() throws IOException; ! /** ! * This method closes the stream. Any internal or native resources ! * associated ! * with this stream are freed. Any subsequent attempt to access the stream ! * might throw an exception. ! *

            ! * This method in this class does nothing. ! * ! * @exception IOException If an error occurs ! */ ! public abstract void close() throws IOException; ! /** ! * This method writes a single char to the output stream. ! * ! * @param b The char to be written to the output stream, passed as an int ! * ! * @exception IOException If an error occurs ! */ ! public void write(int b) throws IOException ! { ! char[] buf = new char[1]; ! buf[0] = (char)b; ! write(buf, 0, buf.length); ! } ! /** ! * This method all the writes char from the passed array to the output ! * stream. This method is equivalent to ! * write(buf, 0, buf.length) which ! * is exactly how it is implemented in this class. ! * ! * @param buf The array of char to write ! * ! * @exception IOException If an error occurs ! */ ! public void write(char[] buf) throws IOException ! { ! write(buf, 0, buf.length); ! } ! /** ! * This method writes len char from the specified array ! * buf starting at index offset into the array. ! *

            ! * Subclasses must provide an implementation of this abstract method. ! * ! * @param buf The array of char to write from ! * @param offset The index into the array to start writing from ! * @param len The number of char to write ! * ! * @exception IOException If an error occurs ! */ ! public abstract void write(char[] buf, int offset, int len) ! throws IOException; ! /** ! * This method writes all the characters in a String to the ! * output. ! * ! * @param str The String whose chars are to be written. ! * ! * @param IOException If an error occurs ! */ ! public void write(String str) throws IOException ! { ! write(str, 0, str.length()); ! } ! /** ! * This method writes len chars from the String ! * starting at position offset. ! * ! * @param str The String that is to be written ! * @param offset The character offset into the String to start ! * writing from ! * @param len The number of chars to write ! * ! * @exception IOException If an error occurs ! */ ! public void write(String str, int offset, int len) throws IOException ! { ! // FIXME - for libgcj re-write using native code to not require ! // copied buffer. ! char[] buf = new char[len]; ! str.getChars(offset, offset + len, buf, 0); ! write(buf, 0, len); ! } } // class Writer + diff -Nrc3pad gcc-3.3.3/libjava/java/lang/Class.h gcc-3.4.0/libjava/java/lang/Class.h *** gcc-3.3.3/libjava/java/lang/Class.h 2003-01-20 06:49:28.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/Class.h 2003-12-03 21:26:59.000000000 +0000 *************** struct _Jv_OffsetTable *** 125,130 **** --- 125,142 ---- jint offsets[]; }; + struct _Jv_AddressTable + { + jint state; + void *addresses[]; + }; + + struct _Jv_CatchClass + { + java::lang::Class **address; + _Jv_Utf8Const *classname; + }; + #define JV_PRIMITIVE_VTABLE ((_Jv_VTable *) -1) #define JV_CLASS(Obj) ((jclass) (*(_Jv_VTable **) Obj)->clas) *************** public: *** 151,157 **** java::lang::reflect::Constructor *getDeclaredConstructor (JArray *); JArray *getDeclaredConstructors (void); java::lang::reflect::Field *getDeclaredField (jstring); ! JArray *getDeclaredFields (void); java::lang::reflect::Method *getDeclaredMethod (jstring, JArray *); JArray *getDeclaredMethods (void); --- 163,170 ---- java::lang::reflect::Constructor *getDeclaredConstructor (JArray *); JArray *getDeclaredConstructors (void); java::lang::reflect::Field *getDeclaredField (jstring); ! JArray *getDeclaredFields (); ! JArray *getDeclaredFields (jboolean); java::lang::reflect::Method *getDeclaredMethod (jstring, JArray *); JArray *getDeclaredMethods (void); *************** public: *** 160,166 **** java::lang::reflect::Field *getField (jstring); private: ! jint _getFields (JArray *result, jint offset); JArray *_getConstructors (jboolean); java::lang::reflect::Field *getField (jstring, jint); jint _getMethods (JArray *result, --- 173,179 ---- java::lang::reflect::Field *getField (jstring); private: ! JArray internalGetFields (); JArray *_getConstructors (jboolean); java::lang::reflect::Field *getField (jstring, jint); jint _getMethods (JArray *result, *************** public: *** 191,196 **** --- 204,210 ---- java::net::URL *getResource (jstring resourceName); java::io::InputStream *getResourceAsStream (jstring resourceName); JArray *getSigners (void); + void setSigners(JArray *); inline jclass getSuperclass (void) { *************** public: *** 243,249 **** private: ! void checkMemberAccess (jint flags); void initializeClass (void); --- 257,263 ---- private: ! void memberAccessCheck (jint flags); void initializeClass (void); *************** private: *** 290,295 **** --- 304,310 ---- // Friends classes and functions to implement the ClassLoader friend class java::lang::ClassLoader; + friend class java::lang::VMClassLoader; friend class java::io::ObjectOutputStream; friend class java::io::ObjectInputStream; *************** private: *** 323,338 **** friend jstring _Jv_GetMethodString(jclass, _Jv_Utf8Const *); friend jshort _Jv_AppendPartialITable (jclass, jclass, void **, jshort); friend jshort _Jv_FindIIndex (jclass *, jshort *, jshort); ! friend void _Jv_LinkOffsetTable (jclass); friend void _Jv_LayoutVTableMethods (jclass klass); friend void _Jv_SetVTableEntries (jclass, _Jv_VTable *, jboolean *); friend void _Jv_MakeVTable (jclass); // Return array class corresponding to element type KLASS, creating it if // necessary. inline friend jclass _Jv_GetArrayClass (jclass klass, java::lang::ClassLoader *loader) { if (__builtin_expect (!klass->arrayclass, false)) _Jv_NewArrayClass (klass, loader); return klass->arrayclass; --- 338,360 ---- friend jstring _Jv_GetMethodString(jclass, _Jv_Utf8Const *); friend jshort _Jv_AppendPartialITable (jclass, jclass, void **, jshort); friend jshort _Jv_FindIIndex (jclass *, jshort *, jshort); ! friend void _Jv_LinkSymbolTable (jclass); friend void _Jv_LayoutVTableMethods (jclass klass); friend void _Jv_SetVTableEntries (jclass, _Jv_VTable *, jboolean *); friend void _Jv_MakeVTable (jclass); + friend void _Jv_linkExceptionClassTable (jclass); + + friend jboolean _Jv_CheckAccess (jclass self_klass, jclass other_klass, + jint flags); // Return array class corresponding to element type KLASS, creating it if // necessary. inline friend jclass _Jv_GetArrayClass (jclass klass, java::lang::ClassLoader *loader) { + extern void _Jv_NewArrayClass (jclass element, + java::lang::ClassLoader *loader, + _Jv_VTable *array_vtable = 0); if (__builtin_expect (!klass->arrayclass, false)) _Jv_NewArrayClass (klass, loader); return klass->arrayclass; *************** private: *** 350,355 **** --- 372,379 ---- friend void _Jv_PrepareClass (jclass); friend void _Jv_PrepareMissingMethods (jclass base, jclass iface_class); + friend void _Jv_Defer_Resolution (void *cl, _Jv_Method *meth, void **); + friend class _Jv_ClassReader; friend class _Jv_InterpClass; friend class _Jv_InterpMethod; *************** private: *** 363,368 **** --- 387,394 ---- friend class gnu::gcj::runtime::StackTrace; friend class java::io::VMObjectStreamClass; + friend void _Jv_sharedlib_register_hook (jclass klass); + // Chain for class pool. jclass next; // Name of class. *************** private: *** 395,400 **** --- 421,429 ---- _Jv_OffsetTable *otable; // Offset table symbols. _Jv_MethodSymbol *otable_syms; + _Jv_AddressTable *atable; + _Jv_MethodSymbol *atable_syms; + _Jv_CatchClass *catch_classes; // Interfaces implemented by this class. jclass *interfaces; // The class loader for this class. *************** private: *** 416,421 **** --- 445,452 ---- jclass arrayclass; // Security Domain to which this class belongs (or null). java::security::ProtectionDomain *protectionDomain; + // Signers of this class (or null). + JArray *hack_signers; // Used by Jv_PopClass and _Jv_PushClass to communicate with StackTrace. jclass chain; }; diff -Nrc3pad gcc-3.3.3/libjava/java/lang/Class.java gcc-3.4.0/libjava/java/lang/Class.java *** gcc-3.3.3/libjava/java/lang/Class.java 2002-09-03 21:33:46.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/Class.java 2003-10-22 19:29:27.000000000 +0000 *************** *** 1,6 **** // Class.java - Representation of a Java class. ! /* Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation This file is part of libgcj. --- 1,6 ---- // Class.java - Representation of a Java class. ! /* Copyright (C) 1998, 1999, 2000, 2002, 2003 Free Software Foundation This file is part of libgcj. *************** import java.io.Serializable; *** 13,18 **** --- 13,20 ---- import java.io.InputStream; import java.lang.reflect.*; import java.security.*; + import java.util.Arrays; + import java.util.HashSet; /** * @author Tom Tromey *************** public final class Class implements Seri *** 64,70 **** public native Field getDeclaredField (String fieldName) throws NoSuchFieldException, SecurityException; ! public native Field[] getDeclaredFields () throws SecurityException; private native Method _getDeclaredMethod (String methodName, Class[] parameterTypes); --- 66,91 ---- public native Field getDeclaredField (String fieldName) throws NoSuchFieldException, SecurityException; ! ! /** ! * Get all the declared fields in this class, but not those inherited from ! * superclasses. This returns an array of length 0 if there are no fields, ! * including for primitive types. This does not return the implicit length ! * field of arrays. A security check may be performed, with ! * checkMemberAccess(this, Member.DECLARED) as well as ! * checkPackageAccess both having to succeed. ! * ! * @return all declared fields in this class ! * @throws SecurityException if the security check fails ! * @since 1.1 ! */ ! public Field[] getDeclaredFields() ! { ! memberAccessCheck(Member.DECLARED); ! return getDeclaredFields(false); ! } ! ! native Field[] getDeclaredFields (boolean publicOnly); private native Method _getDeclaredMethod (String methodName, Class[] parameterTypes); *************** public final class Class implements Seri *** 72,85 **** public Method getDeclaredMethod (String methodName, Class[] parameterTypes) throws NoSuchMethodException, SecurityException { ! SecurityManager sm = System.getSecurityManager(); ! if (sm != null) ! { ! sm.checkMemberAccess(this, Member.DECLARED); ! Package p = getPackage(); ! if (p != null) ! sm.checkPackageAccess(p.getName()); ! } if ("".equals(methodName) || "".equals(methodName)) throw new NoSuchMethodException(methodName); --- 93,99 ---- public Method getDeclaredMethod (String methodName, Class[] parameterTypes) throws NoSuchMethodException, SecurityException { ! memberAccessCheck(Member.DECLARED); if ("".equals(methodName) || "".equals(methodName)) throw new NoSuchMethodException(methodName); *************** public final class Class implements Seri *** 101,117 **** public Field getField (String fieldName) throws NoSuchFieldException, SecurityException { ! SecurityManager s = System.getSecurityManager(); ! if (s != null) ! s.checkMemberAccess (this, java.lang.reflect.Member.DECLARED); Field fld = getField(fieldName, fieldName.hashCode()); if (fld == null) throw new NoSuchFieldException(fieldName); return fld; } ! private native Field[] _getFields (Field[] result, int offset); ! public native Field[] getFields () throws SecurityException; /** * Returns the Package in which this class is defined --- 115,160 ---- public Field getField (String fieldName) throws NoSuchFieldException, SecurityException { ! memberAccessCheck (Member.PUBLIC); Field fld = getField(fieldName, fieldName.hashCode()); if (fld == null) throw new NoSuchFieldException(fieldName); return fld; } ! /** ! * Get all the public fields declared in this class or inherited from ! * superclasses. This returns an array of length 0 if there are no fields, ! * including for primitive types. This does not return the implicit length ! * field of arrays. A security check may be performed, with ! * checkMemberAccess(this, Member.PUBLIC) as well as ! * checkPackageAccess both having to succeed. ! * ! * @return all public fields in this class ! * @throws SecurityException if the security check fails ! * @since 1.1 ! */ ! public Field[] getFields() ! { ! memberAccessCheck(Member.PUBLIC); ! return internalGetFields(); ! } ! ! /** ! * Like getFields() but without the security checks. ! */ ! private Field[] internalGetFields() ! { ! HashSet set = new HashSet(); ! set.addAll(Arrays.asList(getDeclaredFields(true))); ! Class[] interfaces = getInterfaces(); ! for (int i = 0; i < interfaces.length; i++) ! set.addAll(Arrays.asList(interfaces[i].internalGetFields())); ! Class superClass = getSuperclass(); ! if (superClass != null) ! set.addAll(Arrays.asList(superClass.internalGetFields())); ! return (Field[])set.toArray(new Field[set.size()]); ! } /** * Returns the Package in which this class is defined *************** public final class Class implements Seri *** 148,161 **** public Method getMethod (String methodName, Class[] parameterTypes) throws NoSuchMethodException, SecurityException { ! SecurityManager sm = System.getSecurityManager(); ! if (sm != null) ! { ! sm.checkMemberAccess(this, Member.PUBLIC); ! Package p = getPackage(); ! if (p != null) ! sm.checkPackageAccess(p.getName()); ! } if ("".equals(methodName) || "".equals(methodName)) throw new NoSuchMethodException(methodName); --- 191,197 ---- public Method getMethod (String methodName, Class[] parameterTypes) throws NoSuchMethodException, SecurityException { ! memberAccessCheck(Member.PUBLIC); if ("".equals(methodName) || "".equals(methodName)) throw new NoSuchMethodException(methodName); *************** public final class Class implements Seri *** 209,219 **** return packageName.substring (0, end+1) + resourceName; } ! // FIXME: implement. Requires java.security. ! public Object[] getSigners () ! { ! return null; ! } public native Class getSuperclass (); public native boolean isArray (); --- 245,252 ---- return packageName.substring (0, end+1) + resourceName; } ! public native Object[] getSigners (); ! native void setSigners(Object[] signers); public native Class getSuperclass (); public native boolean isArray (); *************** public final class Class implements Seri *** 243,254 **** { SecurityManager sm = System.getSecurityManager(); if (sm != null) ! sm.checkPermission(ClassLoader.protectionDomainPermission); ProtectionDomain protectionDomain = getProtectionDomain0(); if (protectionDomain == null) ! return ClassLoader.unknownProtectionDomain; else return protectionDomain; } --- 276,287 ---- { SecurityManager sm = System.getSecurityManager(); if (sm != null) ! sm.checkPermission(VMClassLoader.protectionDomainPermission); ProtectionDomain protectionDomain = getProtectionDomain0(); if (protectionDomain == null) ! return VMClassLoader.unknownProtectionDomain; else return protectionDomain; } *************** public final class Class implements Seri *** 334,352 **** { } - // Do a security check. - private void checkMemberAccess (int flags) - { - SecurityManager sm = System.getSecurityManager(); - if (sm != null) - sm.checkMemberAccess(this, flags); - } - // Initialize the class. private native void initializeClass (); // finalization ! protected native void finalize (); /** * Strip the last portion of the name (after the last dot). --- 367,377 ---- { } // Initialize the class. private native void initializeClass (); // finalization ! protected native void finalize () throws Throwable; /** * Strip the last portion of the name (after the last dot). *************** public final class Class implements Seri *** 361,364 **** --- 386,405 ---- return ""; return name.substring(0, lastInd); } + + /** + * Perform security checks common to all of the methods that + * get members of this Class. + */ + private void memberAccessCheck(int which) + { + SecurityManager sm = System.getSecurityManager(); + if (sm != null) + { + sm.checkMemberAccess(this, which); + Package pkg = getPackage(); + if (pkg != null) + sm.checkPackageAccess(pkg.getName()); + } + } } diff -Nrc3pad gcc-3.3.3/libjava/java/lang/ClassLoader.java gcc-3.4.0/libjava/java/lang/ClassLoader.java *** gcc-3.3.3/libjava/java/lang/ClassLoader.java 2003-01-24 19:38:24.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/ClassLoader.java 2003-10-09 16:24:55.000000000 +0000 *************** *** 1,25 **** ! // ClassLoader.java - Define policies for loading Java classes. ! /* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation ! This file is part of libgcj. - This software is copyrighted work licensed under the terms of the - Libgcj License. Please consult the file "LIBGCJ_LICENSE" for - details. */ package java.lang; import java.io.InputStream; import java.io.IOException; import java.net.URL; - import java.security.AllPermission; import java.security.CodeSource; ! import java.security.Permission; ! import java.security.Permissions; import java.security.Policy; import java.security.ProtectionDomain; ! import java.util.*; /** * The ClassLoader is a way of customizing the way Java gets its classes --- 1,56 ---- ! /* ClassLoader.java -- responsible for loading classes into the VM ! Copyright (C) 1998, 1999, 2001, 2002, 2003 Free Software Foundation, Inc. ! This file is part of GNU Classpath. ! GNU Classpath is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! GNU Classpath is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with GNU Classpath; see the file COPYING. If not, write to the ! Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ! 02111-1307 USA. ! ! Linking this library statically or dynamically with other modules is ! making a combined work based on this library. Thus, the terms and ! conditions of the GNU General Public License cover the whole ! combination. ! ! As a special exception, the copyright holders of this library give you ! permission to link this library with independent modules to produce an ! executable, regardless of the license terms of these independent ! modules, and to copy and distribute the resulting executable under ! terms of your choice, provided that you also meet, for each linked ! independent module, the terms and conditions of the license of that ! module. An independent module is a module which is not derived from ! or based on this library. If you modify this library, you may extend ! this exception to your version of the library, but you are not ! obligated to do so. If you do not wish to do so, delete this ! exception statement from your version. */ package java.lang; import java.io.InputStream; import java.io.IOException; + import java.lang.reflect.Constructor; import java.net.URL; import java.security.CodeSource; ! import java.security.PermissionCollection; import java.security.Policy; import java.security.ProtectionDomain; ! import java.util.Enumeration; ! import java.util.HashMap; ! import java.util.Map; ! import gnu.java.util.DoubleEnumeration; ! import gnu.java.util.EmptyEnumeration; /** * The ClassLoader is a way of customizing the way Java gets its classes *************** import java.util.*; *** 30,40 **** * modification! * *

            Every classloader has a parent classloader that is consulted before ! * the 'child' classloader when classes or resources should be loaded. * This is done to make sure that classes can be loaded from an hierarchy of ! * multiple classloaders and classloaders do not accidentially redefine * already loaded classes by classloaders higher in the hierarchy. ! * *

            The grandparent of all classloaders is the bootstrap classloader, which * loads all the standard system classes as implemented by GNU Classpath. The * other special classloader is the system classloader (also called --- 61,71 ---- * modification! * *

            Every classloader has a parent classloader that is consulted before ! * the 'child' classloader when classes or resources should be loaded. * This is done to make sure that classes can be loaded from an hierarchy of ! * multiple classloaders and classloaders do not accidentially redefine * already loaded classes by classloaders higher in the hierarchy. ! * *

            The grandparent of all classloaders is the bootstrap classloader, which * loads all the standard system classes as implemented by GNU Classpath. The * other special classloader is the system classloader (also called *************** import java.util.*; *** 78,85 **** * * @author John Keiser * @author Mark Wielaard ! * @author Eric Blake ! * @author Kresten Krab Thorup * @see Class * @since 1.0 * @status still missing 1.4 functionality --- 109,115 ---- * * @author John Keiser * @author Mark Wielaard ! * @author Eric Blake * @see Class * @since 1.0 * @status still missing 1.4 functionality *************** public abstract class ClassLoader *** 95,100 **** --- 125,174 ---- final Map loadedClasses = new HashMap(); /** + * All packages defined by this classloader. It is not private in order to + * allow native code (and trusted subclasses) access to this field. + */ + final Map definedPackages = new HashMap(); + + /** + * The classloader that is consulted before this classloader. + * If null then the parent is the bootstrap classloader. + */ + private final ClassLoader parent; + + /** + * This is true if this classloader was successfully initialized. + * This flag is needed to avoid a class loader attack: even if the + * security manager rejects an attempt to create a class loader, the + * malicious class could have a finalize method which proceeds to + * define classes. + */ + private final boolean initialized; + + /** + * System/Application classloader: defaults to an instance of + * gnu.java.lang.SystemClassLoader, unless the first invocation of + * getSystemClassLoader loads another class loader because of the + * java.system.class.loader property. The initialization of this field + * is somewhat circular - getSystemClassLoader() checks whether this + * field is null in order to bypass a security check. + */ + static final ClassLoader systemClassLoader = + VMClassLoader.getSystemClassLoader(); + + /** + * The default protection domain, used when defining a class with a null + * paramter for the domain. + */ + static final ProtectionDomain defaultProtectionDomain; + static + { + CodeSource cs = new CodeSource(null, null); + PermissionCollection perm = Policy.getPolicy().getPermissions(cs); + defaultProtectionDomain = new ProtectionDomain(cs, perm); + } + + /** * The desired assertion status of classes loaded by this loader, if not * overridden by package or class instructions. */ *************** public abstract class ClassLoader *** 136,295 **** Map classAssertionStatus; /** ! * The classloader that is consulted before this classloader. ! * If null then the parent is the bootstrap classloader. ! */ ! private final ClassLoader parent; ! ! /** ! * All packages defined by this classloader. It is not private in order to ! * allow native code (and trusted subclasses) access to this field. ! */ ! private HashMap definedPackages = new HashMap(); ! ! /** ! * Returns the parent of this classloader. If the parent of this ! * classloader is the bootstrap classloader then this method returns ! * null. A security check may be performed on ! * RuntimePermission("getClassLoader"). * * @throws SecurityException if the security check fails - * @since 1.2 */ ! public final ClassLoader getParent () { ! // Check if we may return the parent classloader ! SecurityManager sm = System.getSecurityManager(); ! if (sm != null) ! { ! /* FIXME: security, getClassContext() not implemented. ! Class c = VMSecurityManager.getClassContext()[1]; ! ClassLoader cl = c.getClassLoader(); ! if (cl != null && cl != this) ! sm.checkPermission(new RuntimePermission("getClassLoader")); ! */ ! } ! return parent; } /** ! * Returns the system classloader. The system classloader (also called ! * the application classloader) is the classloader that was used to ! * load the application classes on the classpath (given by the system ! * property java.class.path. This is set as the context ! * class loader for a thread. The system property ! * java.system.class.loader, if defined, is taken to be the ! * name of the class to use as the system class loader, which must have ! * a public constructor which takes a ClassLoader as a parent; otherwise this ! * uses gnu.java.lang.SystemClassLoader. ! * ! *

            Note that this is different from the bootstrap classloader that ! * actually loads all the real "system" classes (the bootstrap classloader ! * is the parent of the returned system classloader). ! * ! *

            A security check will be performed for ! * RuntimePermission("getClassLoader") if the calling class ! * is not a parent of the system class loader. * ! * @return the system class loader * @throws SecurityException if the security check fails - * @throws IllegalStateException if this is called recursively - * @throws Error if java.system.class.loader fails to load * @since 1.2 */ ! public static ClassLoader getSystemClassLoader () { ! return gnu.gcj.runtime.VMClassLoader.instance; } /** ! * Creates a ClassLoader with no parent. ! * @exception java.lang.SecurityException if not allowed */ ! protected ClassLoader() { ! this (null); } /** ! * Creates a ClassLoader with the given parent. ! * The parent may be null. ! * The only thing this ! * constructor does, is to call ! * checkCreateClassLoader on the current ! * security manager. ! * @exception java.lang.SecurityException if not allowed ! * @since 1.2 */ ! protected ClassLoader(ClassLoader parent) ! { ! SecurityManager security = System.getSecurityManager (); ! if (security != null) ! security.checkCreateClassLoader (); ! this.parent = parent; ! } ! ! /** ! * Loads and link the class by the given name. ! * @param name the name of the class. ! * @return the class loaded. ! * @see ClassLoader#loadClass(String,boolean) ! * @exception java.lang.ClassNotFoundException ! */ ! public Class loadClass(String name) ! throws java.lang.ClassNotFoundException ! { ! return loadClass (name, false); ! } ! ! /** ! * Loads the class by the given name. The default implementation ! * will search for the class in the following order (similar to jdk 1.2) ! *

              ! *
            • First findLoadedClass. ! *
            • If parent is non-null, parent.loadClass; ! * otherwise findSystemClass. ! *
            • findClass. ! *
            ! * If link is true, resolveClass is then ! * called.

            Normally, this need not be overridden; override ! * findClass instead. ! * @param name the name of the class. ! * @param link if the class should be linked. ! * @return the class loaded. ! * @exception java.lang.ClassNotFoundException ! * @deprecated ! */ ! protected Class loadClass(String name, boolean link) ! throws java.lang.ClassNotFoundException { ! Class c = findLoadedClass (name); ! if (c == null) { ! try { ! ClassLoader cl = parent; ! if (parent == null) ! cl = gnu.gcj.runtime.VMClassLoader.instance; ! if (cl != this) ! c = cl.loadClass (name, link); } ! catch (ClassNotFoundException ex) { ! /* ignore, we'll try findClass */; } } ! ! if (c == null) ! c = findClass (name); ! ! if (c == null) ! throw new ClassNotFoundException (name); ! ! if (link) ! resolveClass (c); ! return c; } --- 210,314 ---- Map classAssertionStatus; /** ! * Create a new ClassLoader with as parent the system classloader. There ! * may be a security check for checkCreateClassLoader. * * @throws SecurityException if the security check fails */ ! protected ClassLoader() throws SecurityException { ! this(systemClassLoader); } /** ! * Create a new ClassLoader with the specified parent. The parent will ! * be consulted when a class or resource is requested through ! * loadClass() or getResource(). Only when the ! * parent classloader cannot provide the requested class or resource the ! * findClass() or findResource() method ! * of this classloader will be called. There may be a security check for ! * checkCreateClassLoader. * ! * @param parent the classloader's parent, or null for the bootstrap ! * classloader * @throws SecurityException if the security check fails * @since 1.2 */ ! protected ClassLoader(ClassLoader parent) { ! // May we create a new classloader? ! SecurityManager sm = System.getSecurityManager(); ! if (sm != null) ! sm.checkCreateClassLoader(); ! this.parent = parent; ! this.initialized = true; } /** ! * Load a class using this ClassLoader or its parent, without resolving ! * it. Calls loadClass(name, false). ! * ! *

            Subclasses should not override this method but should override ! * findClass() which is called by this method. ! * ! * @param name the name of the class relative to this ClassLoader ! * @return the loaded class ! * @throws ClassNotFoundException if the class cannot be found */ ! public Class loadClass(String name) throws ClassNotFoundException { ! return loadClass(name, false); } /** ! * Load a class using this ClassLoader or its parent, possibly resolving ! * it as well using resolveClass(). It first tries to find ! * out if the class has already been loaded through this classloader by ! * calling findLoadedClass(). Then it calls ! * loadClass() on the parent classloader (or when there is ! * no parent it uses the VM bootclassloader)). If the class is still ! * not loaded it tries to create a new class by calling ! * findClass(). Finally when resolve is ! * true it also calls resolveClass() on the ! * newly loaded class. ! * ! *

            Subclasses should not override this method but should override ! * findClass() which is called by this method. ! * ! * @param name the fully qualified name of the class to load ! * @param resolve whether or not to resolve the class ! * @return the loaded class ! * @throws ClassNotFoundException if the class cannot be found */ ! protected synchronized Class loadClass(String name, boolean resolve) ! throws ClassNotFoundException { ! // Have we already loaded this class? ! Class c = findLoadedClass(name); ! if (c != null) ! return c; ! // Can the class be loaded by a parent? ! try { ! if (parent == null) { ! c = VMClassLoader.loadClass(name, resolve); ! if (c != null) ! return c; } ! else { ! return parent.loadClass(name, resolve); } } ! catch (ClassNotFoundException e) ! { ! } ! // Still not found, we have to do it ourself. ! c = findClass(name); ! if (resolve) ! resolveClass(c); return c; } *************** public abstract class ClassLoader *** 334,390 **** * @return the requested Class * @throws ClassNotFoundException when the class can not be found * @since 1.2 ! */ ! protected Class findClass (String name) ! throws ClassNotFoundException ! { ! throw new ClassNotFoundException (name); ! } ! ! // Protection Domain definitions ! // FIXME: should there be a special protection domain used for native code? ! ! // The permission required to check what a classes protection domain is. ! static final Permission protectionDomainPermission ! = new RuntimePermission("getProtectionDomain"); ! // The protection domain returned if we cannot determine it. ! static ProtectionDomain unknownProtectionDomain; ! // Protection domain to use when a class is defined without one specified. ! static ProtectionDomain defaultProtectionDomain; ! ! static { ! Permissions permissions = new Permissions(); ! permissions.add(new AllPermission()); ! unknownProtectionDomain = new ProtectionDomain(null, permissions); ! ! CodeSource cs = new CodeSource(null, null); ! defaultProtectionDomain = ! new ProtectionDomain(cs, Policy.getPolicy().getPermissions(cs)); } ! /** ! * Defines a class, given the class-data. According to the JVM, this ! * method should not be used; instead use the variant of this method ! * in which the name of the class being defined is specified ! * explicitly. ! *

            ! * If the name of the class, as specified (implicitly) in the class ! * data, denotes a class which has already been loaded by this class ! * loader, an instance of ! * java.lang.ClassNotFoundException will be thrown. * ! * @param data bytes in class file format. ! * @param off offset to start interpreting data. ! * @param len length of data in class file. ! * @return the class defined. ! * @exception java.lang.ClassNotFoundException ! * @exception java.lang.LinkageError ! * @see ClassLoader#defineClass(String,byte[],int,int) */ ! protected final Class defineClass(byte[] data, int off, int len) throws ClassFormatError { ! return defineClass (null, data, off, len, defaultProtectionDomain); } /** --- 353,381 ---- * @return the requested Class * @throws ClassNotFoundException when the class can not be found * @since 1.2 ! */ ! protected Class findClass(String name) throws ClassNotFoundException { ! throw new ClassNotFoundException(name); } ! /** ! * Helper to define a class using a string of bytes. This version is not ! * secure. * ! * @param data the data representing the classfile, in classfile format ! * @param offset the offset into the data where the classfile starts ! * @param len the length of the classfile data in the array ! * @return the class that was defined ! * @throws ClassFormatError if data is not in proper classfile format ! * @throws IndexOutOfBoundsException if offset or len is negative, or ! * offset + len exceeds data ! * @deprecated use {@link #defineClass(String, byte[], int, int)} instead ! */ ! protected final Class defineClass(byte[] data, int offset, int len) throws ClassFormatError { ! return defineClass(null, data, offset, len); } /** *************** public abstract class ClassLoader *** 406,756 **** * @throws SecurityException if name starts with "java." * @since 1.1 */ ! protected final Class defineClass(String name, byte[] data, int off, int len) ! throws ClassFormatError { ! return defineClass (name, data, off, len, defaultProtectionDomain); } ! ! /** ! * Defines a class, given the class-data. This is preferable ! * over defineClass(byte[],off,len) since it is more ! * secure. If the expected name does not match that of the class ! * file, ClassNotFoundException is thrown. If ! * name denotes the name of an already loaded class, a ! * LinkageError is thrown. ! *

            ! * ! * FIXME: How do we assure that the class-file data is not being ! * modified, simultaneously with the class loader running!? If this ! * was done in some very clever way, it might break security. ! * Right now I am thinking that defineclass should make sure never to ! * read an element of this array more than once, and that that would ! * assure the ``immutable'' appearance. It is still to be determined ! * if this is in fact how defineClass operates. * ! * @param name the expected name. ! * @param data bytes in class file format. ! * @param off offset to start interpreting data. ! * @param len length of data in class file. ! * @param protectionDomain security protection domain for the class. ! * @return the class defined. ! * @exception java.lang.ClassNotFoundException ! * @exception java.lang.LinkageError */ ! protected final synchronized Class defineClass(String name, ! byte[] data, ! int off, ! int len, ! ProtectionDomain protectionDomain) throws ClassFormatError { ! if (data==null || data.length < off+len || off<0 || len<0) ! throw new ClassFormatError ("arguments to defineClass " ! + "are meaningless"); ! ! // as per 5.3.5.1 ! if (name != null && findLoadedClass (name) != null) ! throw new java.lang.LinkageError ("class " ! + name ! + " already loaded"); ! ! if (protectionDomain == null) ! protectionDomain = defaultProtectionDomain; ! ! try ! { ! Class retval = defineClass0 (name, data, off, len, protectionDomain); ! loadedClasses.put(retval.getName(), retval); ! return retval; ! } ! catch (LinkageError x) ! { ! throw x; // rethrow ! } ! catch (VirtualMachineError x) ! { ! throw x; // rethrow ! } ! catch (Throwable x) ! { ! // This should never happen, or we are beyond spec. ! InternalError r = new InternalError ("Unexpected exception " ! + "while defining class " ! + name); ! r.initCause(x); ! throw r; ! } } ! /** This is the entry point of defineClass into the native code */ ! private native Class defineClass0 (String name, ! byte[] data, ! int off, ! int len, ! ProtectionDomain protectionDomain) ! throws ClassFormatError; ! ! /** ! * Link the given class. This will bring the class to a state where ! * the class initializer can be run. Linking involves the following ! * steps: ! *

              ! *
            • Prepare (allocate and internalize) the constant strings that ! * are used in this class. ! *
            • Allocate storage for static fields, and define the layout ! * of instance fields. ! *
            • Perform static initialization of ``static final'' int, ! * long, float, double and String fields for which there is a ! * compile-time constant initializer. ! *
            • Create the internal representation of the ``vtable''. ! *
            ! * For gcj-compiled classes, only the first step is ! * performed. The compiler will have done the rest already. ! *

            ! * This is called by the system automatically, ! * as part of class initialization; there is no reason to ever call ! * this method directly. ! *

            ! * For historical reasons, this method has a name which is easily ! * misunderstood. Java classes are never ``resolved''. Classes are ! * linked; whereas method and field references are resolved. * ! * @param clazz the class to link. ! * @exception java.lang.LinkageError */ ! protected final void resolveClass(Class clazz) ! { ! resolveClass0(clazz); ! } ! ! static void resolveClass0(Class clazz) { ! synchronized (clazz) ! { ! try ! { ! linkClass0 (clazz); ! } ! catch (Throwable x) ! { ! markClassErrorState0 (clazz); ! ! LinkageError e; ! if (x instanceof LinkageError) ! e = (LinkageError)x; ! else if (x instanceof ClassNotFoundException) ! { ! e = new NoClassDefFoundError("while resolving class: " ! + clazz.getName()); ! e.initCause (x); ! } ! else ! { ! e = new LinkageError ("unexpected exception during linking: " ! + clazz.getName()); ! e.initCause (x); ! } ! throw e; ! } ! } } - /** Internal method. Calls _Jv_PrepareClass and - * _Jv_PrepareCompiledClass. This is only called from resolveClass. */ - private static native void linkClass0(Class clazz); - - /** Internal method. Marks the given clazz to be in an erroneous - * state, and calls notifyAll() on the class object. This should only - * be called when the caller has the lock on the class object. */ - private static native void markClassErrorState0(Class clazz); - /** ! * Defines a new package and creates a Package object. ! * The package should be defined before any class in the package is ! * defined with defineClass(). The package should not yet ! * be defined before in this classloader or in one of its parents (which ! * means that getPackage() should return null). ! * All parameters except the name of the package may be ! * null. ! *

            ! * Subclasses should call this method from their findClass() ! * implementation before calling defineClass() on a Class ! * in a not yet defined Package (which can be checked by calling ! * getPackage()). ! * ! * @param name The name of the Package ! * @param specTitle The name of the specification ! * @param specVendor The name of the specification designer ! * @param specVersion The version of this specification ! * @param implTitle The name of the implementation ! * @param implVendor The vendor that wrote this implementation ! * @param implVersion The version of this implementation ! * @param sealed If sealed the origin of the package classes ! * @return the Package object for the specified package ! * ! * @exception IllegalArgumentException if the package name is null or if ! * it was already defined by this classloader or one of its parents. * ! * @see Package ! * @since 1.2 */ ! protected Package definePackage(String name, ! String specTitle, String specVendor, ! String specVersion, String implTitle, ! String implVendor, String implVersion, ! URL sealed) { ! if (getPackage(name) != null) ! throw new IllegalArgumentException("Package " + name ! + " already defined"); ! Package p = new Package(name, ! specTitle, specVendor, specVersion, ! implTitle, implVendor, implVersion, ! sealed); ! synchronized (definedPackages) ! { ! definedPackages.put(name, p); ! } ! return p; } /** ! * Returns the Package object for the requested package name. It returns ! * null when the package is not defined by this classloader or one of its ! * parents. * ! * @param name the package name to find ! * @return the package, if defined * @since 1.2 */ ! protected Package getPackage(String name) { ! Package p; ! if (parent == null) ! // XXX - Should we use the bootstrap classloader? ! p = null; ! else ! p = parent.getPackage(name); ! ! if (p == null) { ! synchronized (definedPackages) ! { ! p = (Package) definedPackages.get(name); ! } } ! ! return p; } /** ! * Returns all Package objects defined by this classloader and its parents. * ! * @return an array of all defined packages ! * @since 1.2 */ ! protected Package[] getPackages() { ! Package[] allPackages; ! ! // Get all our packages. ! Package[] packages; ! synchronized(definedPackages) ! { ! packages = new Package[definedPackages.size()]; ! definedPackages.values().toArray(packages); ! } ! ! // If we have a parent get all packages defined by our parents. ! if (parent != null) ! { ! Package[] parentPackages = parent.getPackages(); ! allPackages = new Package[parentPackages.length + packages.length]; ! System.arraycopy(parentPackages, 0, allPackages, 0, ! parentPackages.length); ! System.arraycopy(packages, 0, allPackages, parentPackages.length, ! packages.length); ! } ! else ! // XXX - Should we use the bootstrap classloader? ! allPackages = packages; ! ! return allPackages; } /** ! * Called by Runtime.loadLibrary() to get an absolute path ! * to a (system specific) library that was requested by a class loaded ! * by this classloader. The default implementation returns ! * null. It should be implemented by subclasses when they ! * have a way to find the absolute path to a library. If this method ! * returns null the library is searched for in the default locations ! * (the directories listed in the java.library.path system ! * property). * ! * @param name the (system specific) name of the requested library ! * @return the full pathname to the requested library, or null ! * @see Runtime#loadLibrary() ! * @since 1.2 */ ! protected String findLibrary(String name) { ! return null; } ! /** ! * Returns a class found in a system-specific way, typically ! * via the java.class.path system property. Loads the ! * class if necessary. * ! * @param name the class to resolve. ! * @return the class loaded. ! * @exception java.lang.LinkageError ! * @exception java.lang.ClassNotFoundException */ ! protected final Class findSystemClass(String name) ! throws java.lang.ClassNotFoundException { ! return gnu.gcj.runtime.VMClassLoader.instance.loadClass (name); } /** ! * Helper to set the signers of a class. This should be called after ! * defining the class. * ! * @param c the Class to set signers of ! * @param signers the signers to set ! * @since 1.1 ! */ ! protected final void setSigners(Class c, Object[] signers) { ! /* ! * Does currently nothing. FIXME. ! */ } /** ! * If a class named name was previously loaded using ! * this ClassLoader, then it is returned. Otherwise ! * it returns null. ! * @param name class to find. ! * @return the class loaded, or null. ! */ ! protected final synchronized Class findLoadedClass(String name) { ! return (Class) loadedClasses.get(name); } /** ! * Get a resource using the system classloader. * ! * @param name the name of the resource relative to the system classloader ! * @return an input stream for the resource, or null ! * @since 1.1 */ ! public static InputStream getSystemResourceAsStream(String name) { ! return getSystemClassLoader().getResourceAsStream (name); } /** --- 397,621 ---- * @throws SecurityException if name starts with "java." * @since 1.1 */ ! protected final Class defineClass(String name, byte[] data, int offset, ! int len) throws ClassFormatError { ! return defineClass(name, data, offset, len, null); } ! ! /** ! * Helper to define a class using a string of bytes. Subclasses should call ! * this method from their findClass() implementation. If the ! * domain is null, the default of ! * Policy.getPolicy().getPermissions(new CodeSource(null, null)) ! * is used. Once a class has been defined in a package, all further classes ! * in that package must have the same set of certificates or a ! * SecurityException is thrown. * ! * @param name the name to give the class. null if unknown ! * @param data the data representing the classfile, in classfile format ! * @param offset the offset into the data where the classfile starts ! * @param len the length of the classfile data in the array ! * @param domain the ProtectionDomain to give to the class, null for the ! * default protection domain ! * @return the class that was defined ! * @throws ClassFormatError if data is not in proper classfile format ! * @throws IndexOutOfBoundsException if offset or len is negative, or ! * offset + len exceeds data ! * @throws SecurityException if name starts with "java.", or if certificates ! * do not match up ! * @since 1.2 */ ! protected final synchronized Class defineClass(String name, byte[] data, ! int offset, int len, ! ProtectionDomain domain) throws ClassFormatError { ! if (domain == null) ! domain = defaultProtectionDomain; ! if (! initialized) ! throw new SecurityException("attempt to define class from uninitialized class loader"); ! Class retval = VMClassLoader.defineClass(this, name, data, ! offset, len, domain); ! loadedClasses.put(retval.getName(), retval); ! return retval; } ! /** ! * Links the class, if that has not already been done. Linking basically ! * resolves all references to other classes made by this class. * ! * @param c the class to resolve ! * @throws NullPointerException if c is null ! * @throws LinkageError if linking fails */ ! protected final void resolveClass(Class c) { ! VMClassLoader.resolveClass(c); } /** ! * Helper to find a Class using the system classloader, possibly loading it. ! * A subclass usually does not need to call this, if it correctly ! * overrides findClass(String). * ! * @param name the name of the class to find ! * @return the found class ! * @throws ClassNotFoundException if the class cannot be found */ ! protected final Class findSystemClass(String name) ! throws ClassNotFoundException { ! return Class.forName(name, false, systemClassLoader); } /** ! * Returns the parent of this classloader. If the parent of this ! * classloader is the bootstrap classloader then this method returns ! * null. A security check may be performed on ! * RuntimePermission("getClassLoader"). * ! * @throws SecurityException if the security check fails * @since 1.2 */ ! public final ClassLoader getParent() { ! // Check if we may return the parent classloader. ! SecurityManager sm = System.getSecurityManager(); ! if (sm != null) { ! Class c = VMSecurityManager.getClassContext()[1]; ! ClassLoader cl = c.getClassLoader(); ! if (cl != null && ! cl.isAncestorOf(this)) ! sm.checkPermission(new RuntimePermission("getClassLoader")); } ! return parent; } /** ! * Helper to set the signers of a class. This should be called after ! * defining the class. * ! * @param c the Class to set signers of ! * @param signers the signers to set ! * @since 1.1 */ ! protected final void setSigners(Class c, Object[] signers) { ! c.setSigners(signers); } /** ! * Helper to find an already-loaded class in this ClassLoader. * ! * @param name the name of the class to find ! * @return the found Class, or null if it is not found ! * @since 1.1 */ ! protected final synchronized Class findLoadedClass(String name) { ! // NOTE: If the VM is keeping its own cache, it may make sense to have ! // this method be native. ! return (Class) loadedClasses.get(name); } ! /** ! * Get the URL to a resource using this classloader or one of its parents. ! * First tries to get the resource by calling getResource() ! * on the parent classloader. If the parent classloader returns null then ! * it tries finding the resource by calling findResource() on ! * this classloader. The resource name should be separated by '/' for path ! * elements. * ! *

            Subclasses should not override this method but should override ! * findResource() which is called by this method. ! * ! * @param name the name of the resource relative to this classloader ! * @return the URL to the resource or null when not found */ ! public URL getResource(String name) { ! URL result; ! ! if (parent == null) ! result = VMClassLoader.getResource(name); ! else ! result = parent.getResource(name); ! ! if (result == null) ! result = findResource(name); ! return result; } /** ! * Returns an Enumeration of all resources with a given name that can ! * be found by this classloader and its parents. Certain classloaders ! * (such as the URLClassLoader when given multiple jar files) can have ! * multiple resources with the same name that come from multiple locations. ! * It can also occur that a parent classloader offers a resource with a ! * certain name and the child classloader also offers a resource with that ! * same name. getResource() only offers the first resource (of the ! * parent) with a given name. This method lists all resources with the ! * same name. The name should use '/' as path separators. * ! *

            The Enumeration is created by first calling getResources() ! * on the parent classloader and then calling findResources() ! * on this classloader. ! * ! * @param name the resource name ! * @return an enumaration of all resources found ! * @throws IOException if I/O errors occur in the process ! * @since 1.2 ! */ ! public final Enumeration getResources(String name) throws IOException { ! Enumeration parentResources; ! if (parent == null) ! parentResources = VMClassLoader.getResources(name); ! else ! parentResources = parent.getResources(name); ! return new DoubleEnumeration(parentResources, findResources(name)); } /** ! * Called whenever all locations of a named resource are needed. ! * It is called by getResources() after it has called ! * parent.getResources(). The results are combined by ! * the getResources() method. ! * ! *

            The default implementation always returns an empty Enumeration. ! * Subclasses should override it when they can provide an Enumeration of ! * URLs (possibly just one element) to the named resource. ! * The first URL of the Enumeration should be the same as the one ! * returned by findResource. ! * ! * @param name the name of the resource to be found ! * @return a possibly empty Enumeration of URLs to the named resource ! * @throws IOException if I/O errors occur in the process ! * @since 1.2 ! */ ! protected Enumeration findResources(String name) throws IOException { ! return EmptyEnumeration.getInstance(); } /** ! * Called whenever a resource is needed that could not be provided by ! * one of the parents of this classloader. It is called by ! * getResource() after parent.getResource() ! * couldn't provide the requested resource. * ! *

            The default implementation always returns null. Subclasses should ! * override this method when they can provide a way to return a URL ! * to a named resource. ! * ! * @param name the name of the resource to be found ! * @return a URL to the named resource or null when not found ! * @since 1.2 */ ! protected URL findResource(String name) ! { ! return null; } /** *************** public abstract class ClassLoader *** 760,767 **** * @return the URL to the resource * @since 1.1 */ ! public static URL getSystemResource(String name) { ! return getSystemClassLoader().getResource (name); } /** --- 625,633 ---- * @return the URL to the resource * @since 1.1 */ ! public static final URL getSystemResource(String name) ! { ! return systemClassLoader.getResource(name); } /** *************** public abstract class ClassLoader *** 777,925 **** */ public static Enumeration getSystemResources(String name) throws IOException { ! return getSystemClassLoader().getResources(name); } /** ! * Return an InputStream representing the resource name. ! * This is essentially like ! * getResource(name).openStream(), except ! * it masks out any IOException and returns null on failure. ! * @param name resource to load ! * @return an InputStream, or null ! * @see java.lang.ClassLoader#getResource(String) ! * @see java.io.InputStream */ ! public InputStream getResourceAsStream(String name) { try { ! URL res = getResource (name); ! if (res == null) return null; ! return res.openStream (); } ! catch (java.io.IOException x) { ! return null; } } ! /** ! * Return an java.io.URL representing the resouce name. ! * The default implementation just returns null. ! * @param name resource to load ! * @return a URL, or null if there is no such resource. ! * @see java.lang.ClassLoader#getResourceAsBytes(String) ! * @see java.lang.ClassLoader#getResourceAsStream(String) ! * @see java.io.URL */ ! public URL getResource (String name) { ! // The rules say search the parent class if non-null, ! // otherwise search the built-in class loader (assumed to be ! // the system ClassLoader). If not found, call ! // findResource(). ! URL result = null; ! ! ClassLoader delegate = parent; ! if (delegate == null) ! delegate = getSystemClassLoader (); ! ! // Protect ourselves from looping. ! if (this != delegate) ! result = delegate.getResource (name); ! if (result != null) ! return result; ! else ! return findResource (name); } /** ! * Called whenever a resource is needed that could not be provided by ! * one of the parents of this classloader. It is called by ! * getResource() after parent.getResource() ! * couldn't provide the requested resource. * ! *

            The default implementation always returns null. Subclasses should ! * override this method when they can provide a way to return a URL ! * to a named resource. * ! * @param name the name of the resource to be found ! * @return a URL to the named resource or null when not found * @since 1.2 */ ! protected URL findResource (String name) { ! // Default to returning null. Derived classes implement this. ! return null; } /** ! * Returns an Enumeration of all resources with a given name that can ! * be found by this classloader and its parents. Certain classloaders ! * (such as the URLClassLoader when given multiple jar files) can have ! * multiple resources with the same name that come from multiple locations. ! * It can also occur that a parent classloader offers a resource with a ! * certain name and the child classloader also offers a resource with that ! * same name. getResource() only offers the first resource (of the ! * parent) with a given name. This method lists all resources with the ! * same name. The name should use '/' as path separators. ! * ! *

            The Enumeration is created by first calling getResources() ! * on the parent classloader and then calling findResources() ! * on this classloader. * ! * @param name the resource name ! * @return an enumaration of all resources found ! * @throws IOException if I/O errors occur in the process * @since 1.2 */ ! public final Enumeration getResources(String name) throws IOException { ! // The rules say search the parent class if non-null, ! // otherwise search the built-in class loader (assumed to be ! // the system ClassLoader). If not found, call ! // findResource(). ! Enumeration result = null; ! ClassLoader delegate = parent; ! if (delegate == null) ! delegate = getSystemClassLoader (); ! ! // Protect ourselves from looping. ! if (this != delegate) ! result = delegate.getResources (name); ! if (result != null) ! return result; else ! return findResources (name); } /** ! * Called whenever all locations of a named resource are needed. ! * It is called by getResources() after it has called ! * parent.getResources(). The results are combined by ! * the getResources() method. ! * ! *

            The default implementation always returns an empty Enumeration. ! * Subclasses should override it when they can provide an Enumeration of ! * URLs (possibly just one element) to the named resource. ! * The first URL of the Enumeration should be the same as the one ! * returned by findResource. * ! * @param name the name of the resource to be found ! * @return a possibly empty Enumeration of URLs to the named resource ! * @throws IOException if I/O errors occur in the process * @since 1.2 */ ! protected Enumeration findResources(String name) throws IOException { ! return Collections.enumeration(Collections.EMPTY_LIST); } /** --- 643,863 ---- */ public static Enumeration getSystemResources(String name) throws IOException { ! return systemClassLoader.getResources(name); } /** ! * Get a resource as stream using this classloader or one of its parents. ! * First calls getResource() and if that returns a URL to ! * the resource then it calls and returns the InputStream given by ! * URL.openStream(). ! * ! *

            Subclasses should not override this method but should override ! * findResource() which is called by this method. ! * ! * @param name the name of the resource relative to this classloader ! * @return an InputStream to the resource, or null ! * @since 1.1 */ ! public InputStream getResourceAsStream(String name) { try { ! URL url = getResource(name); ! if (url == null) return null; ! return url.openStream(); } ! catch (IOException e) { ! return null; } } ! /** ! * Get a resource using the system classloader. ! * ! * @param name the name of the resource relative to the system classloader ! * @return an input stream for the resource, or null ! * @since 1.1 */ ! public static final InputStream getSystemResourceAsStream(String name) { ! try ! { ! URL url = getSystemResource(name); ! if (url == null) ! return null; ! return url.openStream(); ! } ! catch (IOException e) ! { ! return null; ! } ! } ! /** ! * Returns the system classloader. The system classloader (also called ! * the application classloader) is the classloader that was used to ! * load the application classes on the classpath (given by the system ! * property java.class.path. This is set as the context ! * class loader for a thread. The system property ! * java.system.class.loader, if defined, is taken to be the ! * name of the class to use as the system class loader, which must have ! * a public constructor which takes a ClassLoader as a parent; otherwise this ! * uses gnu.java.lang.SystemClassLoader. ! * ! *

            Note that this is different from the bootstrap classloader that ! * actually loads all the real "system" classes (the bootstrap classloader ! * is the parent of the returned system classloader). ! * ! *

            A security check will be performed for ! * RuntimePermission("getClassLoader") if the calling class ! * is not a parent of the system class loader. ! * ! * @return the system class loader ! * @throws SecurityException if the security check fails ! * @throws IllegalStateException if this is called recursively ! * @throws Error if java.system.class.loader fails to load ! * @since 1.2 ! */ ! public static ClassLoader getSystemClassLoader() ! { ! // Check if we may return the system classloader ! SecurityManager sm = System.getSecurityManager(); ! if (sm != null) ! { ! Class c = VMSecurityManager.getClassContext()[1]; ! ClassLoader cl = c.getClassLoader(); ! if (cl != null && cl != systemClassLoader) ! sm.checkPermission(new RuntimePermission("getClassLoader")); ! } ! return systemClassLoader; } /** ! * Defines a new package and creates a Package object. The package should ! * be defined before any class in the package is defined with ! * defineClass(). The package should not yet be defined ! * before in this classloader or in one of its parents (which means that ! * getPackage() should return null). All ! * parameters except the name of the package may be ! * null. * ! *

            Subclasses should call this method from their findClass() ! * implementation before calling defineClass() on a Class ! * in a not yet defined Package (which can be checked by calling ! * getPackage()). * ! * @param name the name of the Package ! * @param specTitle the name of the specification ! * @param specVendor the name of the specification designer ! * @param specVersion the version of this specification ! * @param implTitle the name of the implementation ! * @param implVendor the vendor that wrote this implementation ! * @param implVersion the version of this implementation ! * @param sealed if sealed the origin of the package classes ! * @return the Package object for the specified package ! * @throws IllegalArgumentException if the package name is null or it ! * was already defined by this classloader or one of its parents ! * @see Package * @since 1.2 */ ! protected Package definePackage(String name, String specTitle, ! String specVendor, String specVersion, ! String implTitle, String implVendor, ! String implVersion, URL sealed) { ! if (getPackage(name) != null) ! throw new IllegalArgumentException("Package " + name ! + " already defined"); ! Package p = new Package(name, specTitle, specVendor, specVersion, ! implTitle, implVendor, implVersion, sealed); ! synchronized (definedPackages) ! { ! definedPackages.put(name, p); ! } ! return p; } /** ! * Returns the Package object for the requested package name. It returns ! * null when the package is not defined by this classloader or one of its ! * parents. * ! * @param name the package name to find ! * @return the package, if defined * @since 1.2 */ ! protected Package getPackage(String name) { ! Package p; ! if (parent == null) ! p = VMClassLoader.getPackage(name); ! else ! p = parent.getPackage(name); ! if (p == null) ! { ! synchronized (definedPackages) ! { ! p = (Package) definedPackages.get(name); ! } ! } ! return p; ! } ! /** ! * Returns all Package objects defined by this classloader and its parents. ! * ! * @return an array of all defined packages ! * @since 1.2 ! */ ! protected Package[] getPackages() ! { ! // Get all our packages. ! Package[] packages; ! synchronized(definedPackages) ! { ! packages = new Package[definedPackages.size()]; ! definedPackages.values().toArray(packages); ! } ! // If we have a parent get all packages defined by our parents. ! Package[] parentPackages; ! if (parent == null) ! parentPackages = VMClassLoader.getPackages(); else ! parentPackages = parent.getPackages(); ! ! Package[] allPackages = new Package[parentPackages.length ! + packages.length]; ! System.arraycopy(parentPackages, 0, allPackages, 0, ! parentPackages.length); ! System.arraycopy(packages, 0, allPackages, parentPackages.length, ! packages.length); ! return allPackages; } /** ! * Called by Runtime.loadLibrary() to get an absolute path ! * to a (system specific) library that was requested by a class loaded ! * by this classloader. The default implementation returns ! * null. It should be implemented by subclasses when they ! * have a way to find the absolute path to a library. If this method ! * returns null the library is searched for in the default locations ! * (the directories listed in the java.library.path system ! * property). * ! * @param name the (system specific) name of the requested library ! * @return the full pathname to the requested library, or null ! * @see Runtime#loadLibrary() * @since 1.2 */ ! protected String findLibrary(String name) { ! return null; } /** *************** public abstract class ClassLoader *** 936,942 **** { defaultAssertionStatus = enabled; } ! /** * Set the default assertion status for packages, used unless overridden * by a class request. This default also covers subpackages, unless they --- 874,880 ---- { defaultAssertionStatus = enabled; } ! /** * Set the default assertion status for packages, used unless overridden * by a class request. This default also covers subpackages, unless they *************** public abstract class ClassLoader *** 995,998 **** --- 933,952 ---- packageAssertionStatus = new HashMap(); classAssertionStatus = new HashMap(); } + + /** + * Return true if this loader is either the specified class loader + * or an ancestor thereof. + * @param loader the class loader to check + */ + final boolean isAncestorOf(ClassLoader loader) + { + while (loader != null) + { + if (this == loader) + return true; + loader = loader.parent; + } + return false; + } } diff -Nrc3pad gcc-3.3.3/libjava/java/lang/Double.java gcc-3.4.0/libjava/java/lang/Double.java *** gcc-3.3.3/libjava/java/lang/Double.java 2002-11-03 20:27:30.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/Double.java 2003-09-23 21:42:40.000000000 +0000 *************** public final class Double extends Number *** 428,434 **** --- 428,436 ---- * @return the bits of the double * @see #longBitsToDouble(long) */ + // GCJ LOCAL: We diverge from Classpath for efficiency. public static native long doubleToLongBits(double value); + // END GCJ LOCAL /** * Convert the double to the IEEE 754 floating-point "double format" bit *************** public final class Double extends Number *** 444,450 **** --- 446,454 ---- * @return the bits of the double * @see #longBitsToDouble(long) */ + // GCJ LOCAL: We diverge from Classpath for efficiency. public static native long doubleToRawLongBits(double value); + // END GCJ LOCAL /** * Convert the argument in IEEE 754 floating-point "double format" bit *************** public final class Double extends Number *** 459,465 **** --- 463,471 ---- * @see #doubleToLongBits(double) * @see #doubleToRawLongBits(double) */ + // GCJ LOCAL: We diverge from Classpath for efficiency. public static native double longBitsToDouble(long bits); + // END GCJ LOCAL /** * Compare two Doubles numerically by comparing their double diff -Nrc3pad gcc-3.3.3/libjava/java/lang/e_pow.c gcc-3.4.0/libjava/java/lang/e_pow.c *** gcc-3.3.3/libjava/java/lang/e_pow.c 1999-06-24 20:05:49.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/e_pow.c 2003-07-08 21:27:37.000000000 +0000 *************** ivln2_l = 1.92596299112661746887e-08; *** 179,185 **** } /* (x<0)**(non-int) is NaN */ ! /* CYGNUS LOCAL: This used to be if((((hx>>31)+1)|yisint)==0) return (x-x)/(x-x); but ANSI C says a right shift of a signed negative quantity is implementation defined. */ --- 179,185 ---- } /* (x<0)**(non-int) is NaN */ ! /* GCJ LOCAL: This used to be if((((hx>>31)+1)|yisint)==0) return (x-x)/(x-x); but ANSI C says a right shift of a signed negative quantity is implementation defined. */ diff -Nrc3pad gcc-3.3.3/libjava/java/lang/fdlibm.h gcc-3.4.0/libjava/java/lang/fdlibm.h *** gcc-3.3.3/libjava/java/lang/fdlibm.h 2000-09-05 11:05:58.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/fdlibm.h 2003-07-08 21:27:37.000000000 +0000 *************** *** 15,21 **** #include #include ! /* CYGNUS LOCAL: Include files. */ #include "ieeefp.h" #include "mprec.h" --- 15,21 ---- #include #include ! /* GCJ LOCAL: Include files. */ #include "ieeefp.h" #include "mprec.h" diff -Nrc3pad gcc-3.3.3/libjava/java/lang/Float.java gcc-3.4.0/libjava/java/lang/Float.java *** gcc-3.3.3/libjava/java/lang/Float.java 2002-06-13 18:16:25.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/Float.java 2003-11-21 13:24:28.000000000 +0000 *************** *** 1,5 **** /* Float.java -- object wrapper for float ! Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Float.java -- object wrapper for float ! Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 38,45 **** package java.lang; - import gnu.classpath.Configuration; - /** * Instances of class Float represent primitive * float values. --- 38,43 ---- *************** public final class Float extends Number *** 102,118 **** private final float value; /** - * Load native routines necessary for this class. - */ - static - { - if (Configuration.INIT_LOAD_LIBRARY) - { - System.loadLibrary("javalang"); - } - } - - /** * Create a Float from the primitive float * specified. * --- 100,105 ---- *************** public final class Float extends Number *** 438,444 **** --- 425,433 ---- * @return the bits of the float * @see #intBitsToFloat(int) */ + // GCJ LOCAL: We diverge from Classpath for efficiency. public static native int floatToIntBits(float value); + // END GCJ LOCAL /** * Convert the float to the IEEE 754 floating-point "single format" bit *************** public final class Float extends Number *** 453,459 **** --- 442,450 ---- * @return the bits of the float * @see #intBitsToFloat(int) */ + // GCJ LOCAL: We diverge from Classpath for efficiency. public static native int floatToRawIntBits(float value); + // END GCJ LOCAL /** * Convert the argument in IEEE 754 floating-point "single format" bit *************** public final class Float extends Number *** 468,474 **** --- 459,467 ---- * @see #floatToIntBits(float) * @see #floatToRawIntBits(float) */ + // GCJ LOCAL: We diverge from Classpath for efficiency. public static native float intBitsToFloat(int bits); + // END GCJ LOCAL /** * Compare two Floats numerically by comparing their float diff -Nrc3pad gcc-3.3.3/libjava/java/lang/ieeefp.h gcc-3.4.0/libjava/java/lang/ieeefp.h *** gcc-3.3.3/libjava/java/lang/ieeefp.h 2002-07-19 14:41:14.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/ieeefp.h 2003-04-16 18:32:06.000000000 +0000 *************** *** 6,18 **** #endif #if defined(__arm__) || defined(__thumb__) ! /* ARM always has big-endian words. Within those words the byte ordering ! will be big or little endian depending upon the target. */ #define __IEEE_BIG_ENDIAN #ifdef __ARMEL__ #define __IEEE_BYTES_LITTLE_ENDIAN #endif #endif #ifdef __hppa__ #define __IEEE_BIG_ENDIAN --- 6,28 ---- #endif #if defined(__arm__) || defined(__thumb__) ! /* ARM traditionally used big-endian words; and within those words the ! byte ordering was big or little endian depending upon the target. ! Modern floating-point formats are naturally ordered; in this case ! __VFP_FP__ will be defined, even if soft-float. */ ! #ifdef __VFP_FP__ ! #ifdef __ARMEL__ ! #define __IEEE_LITTLE_ENDIAN ! #else ! #define __IEEE_BIG_ENDIAN ! #endif ! #else #define __IEEE_BIG_ENDIAN #ifdef __ARMEL__ #define __IEEE_BYTES_LITTLE_ENDIAN #endif #endif + #endif #ifdef __hppa__ #define __IEEE_BIG_ENDIAN diff -Nrc3pad gcc-3.3.3/libjava/java/lang/InheritableThreadLocal.java gcc-3.4.0/libjava/java/lang/InheritableThreadLocal.java *** gcc-3.3.3/libjava/java/lang/InheritableThreadLocal.java 2002-06-15 19:45:31.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/InheritableThreadLocal.java 2003-08-26 23:14:07.000000000 +0000 *************** *** 1,5 **** /* InheritableThreadLocal -- a ThreadLocal which inherits values across threads ! Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* InheritableThreadLocal -- a ThreadLocal which inherits values across threads ! Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,45 **** package java.lang; import java.util.Iterator; import java.util.List; ! import java.util.ArrayList; import java.util.WeakHashMap; /** --- 37,47 ---- package java.lang; + import java.util.ArrayList; + import java.util.Collections; import java.util.Iterator; import java.util.List; ! import java.util.Map; import java.util.WeakHashMap; /** *************** public class InheritableThreadLocal exte *** 67,73 **** * List can be collected, too. Maps to a list in case the user overrides * equals. */ ! private static final WeakHashMap threadMap = new WeakHashMap(); /** * Creates a new InheritableThreadLocal that has no values associated --- 69,76 ---- * List can be collected, too. Maps to a list in case the user overrides * equals. */ ! private static final Map threadMap ! = Collections.synchronizedMap(new WeakHashMap()); /** * Creates a new InheritableThreadLocal that has no values associated *************** public class InheritableThreadLocal exte *** 77,83 **** { Thread currentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will ! // ever modify the returned heritage. List heritage = (List) threadMap.get(currentThread); if (heritage == null) { --- 80,86 ---- { Thread currentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will ! // ever modify the returned heritage and threadMap is a synchronizedMap. List heritage = (List) threadMap.get(currentThread); if (heritage == null) { *************** public class InheritableThreadLocal exte *** 114,120 **** // The currentThread is the parent of the new thread. Thread parentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will ! // ever modify the returned heritage. ArrayList heritage = (ArrayList) threadMap.get(parentThread); if (heritage != null) { --- 117,123 ---- // The currentThread is the parent of the new thread. Thread parentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will ! // ever modify the returned heritage and threadMap is a synchronizedMap. ArrayList heritage = (ArrayList) threadMap.get(parentThread); if (heritage != null) { diff -Nrc3pad gcc-3.3.3/libjava/java/lang/Math.java gcc-3.4.0/libjava/java/lang/Math.java *** gcc-3.3.3/libjava/java/lang/Math.java 2002-02-15 03:21:47.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/Math.java 2003-10-08 19:00:21.000000000 +0000 *************** *** 1,5 **** /* java.lang.Math -- common mathematical functions, native allowed ! Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* java.lang.Math -- common mathematical functions, native allowed ! Copyright (C) 1998, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** public final class Math *** 521,527 **** * double to x / y (ties go to the even n); for a zero * remainder, the sign is that of x. If either argument is NaN, * the first argument is infinite, or the second argument is zero, the result ! * is NaN; if x is finite but y is infinte, the result is x. This is * accurate within the limits of doubles. * * @param x the dividend (the top half) --- 521,527 ---- * double to x / y (ties go to the even n); for a zero * remainder, the sign is that of x. If either argument is NaN, * the first argument is infinite, or the second argument is zero, the result ! * is NaN; if x is finite but y is infinite, the result is x. This is * accurate within the limits of doubles. * * @param x the dividend (the top half) *************** public final class Math *** 575,580 **** --- 575,583 ---- */ public static int round(float a) { + // this check for NaN, from JLS 15.21.1, saves a method call + if (a != a) + return 0; return (int) floor(a + 0.5f); } *************** public final class Math *** 591,596 **** --- 594,602 ---- */ public static long round(double a) { + // this check for NaN, from JLS 15.21.1, saves a method call + if (a != a) + return 0; return (long) floor(a + 0.5d); } *************** public final class Math *** 624,630 **** */ public static double toRadians(double degrees) { ! return degrees * (PI / 180); } /** --- 630,636 ---- */ public static double toRadians(double degrees) { ! return (degrees * PI) / 180; } /** *************** public final class Math *** 638,643 **** */ public static double toDegrees(double rads) { ! return rads * (180 / PI); } } --- 644,649 ---- */ public static double toDegrees(double rads) { ! return (rads * 180) / PI; } } diff -Nrc3pad gcc-3.3.3/libjava/java/lang/natClass.cc gcc-3.4.0/libjava/java/lang/natClass.cc *** gcc-3.3.3/libjava/java/lang/natClass.cc 2003-05-01 21:52:35.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/natClass.cc 2003-12-03 21:26:59.000000000 +0000 *************** *** 1,6 **** // natClass.cc - Implementation of java.lang.Class native methods. ! /* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation This file is part of libgcj. --- 1,6 ---- // natClass.cc - Implementation of java.lang.Class native methods. ! /* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation This file is part of libgcj. *************** details. */ *** 12,17 **** --- 12,18 ---- #include #include + #include #pragma implementation "Class.h" *************** details. */ *** 36,41 **** --- 37,43 ---- #include #include #include + #include #include #include #include *************** details. */ *** 48,60 **** #include #include #include #include #include #include #include #include ! using namespace gcj; --- 50,63 ---- #include #include #include + #include #include #include #include #include #include ! #include using namespace gcj; *************** java::lang::Class::forName (jstring clas *** 68,74 **** jsize length = _Jv_GetStringUTFLength (className); char buffer[length]; ! _Jv_GetStringUTFRegion (className, 0, length, buffer); _Jv_Utf8Const *name = _Jv_makeUtf8Const (buffer, length); --- 71,77 ---- jsize length = _Jv_GetStringUTFLength (className); char buffer[length]; ! _Jv_GetStringUTFRegion (className, 0, className->length(), buffer); _Jv_Utf8Const *name = _Jv_makeUtf8Const (buffer, length); *************** java::lang::Class::forName (jstring clas *** 101,107 **** { klass = t->classAt (i); } ! loader = klass->getClassLoader(); } catch (::java::lang::ArrayIndexOutOfBoundsException *e) { --- 104,110 ---- { klass = t->classAt (i); } ! loader = klass->getClassLoaderInternal(); } catch (::java::lang::ArrayIndexOutOfBoundsException *e) { *************** java::lang::Class::forName (jstring clas *** 113,125 **** java::lang::ClassLoader * java::lang::Class::getClassLoader (void) { - #if 0 - // FIXME: the checks we need to do are more complex. See the spec. - // Currently we can't implement them. java::lang::SecurityManager *s = java::lang::System::getSecurityManager(); if (s != NULL) ! s->checkPermission (new RuntimePermission (JvNewStringLatin1 ("getClassLoader"))); ! #endif // The spec requires us to return `null' for primitive classes. In // other cases we have the option of returning `null' for classes --- 116,146 ---- java::lang::ClassLoader * java::lang::Class::getClassLoader (void) { java::lang::SecurityManager *s = java::lang::System::getSecurityManager(); if (s != NULL) ! { ! gnu::gcj::runtime::StackTrace *t ! = new gnu::gcj::runtime::StackTrace(4); ! Class *caller = NULL; ! ClassLoader *caller_loader = NULL; ! try ! { ! for (int i = 1; !caller; i++) ! { ! caller = t->classAt (i); ! } ! caller_loader = caller->getClassLoaderInternal(); ! } ! catch (::java::lang::ArrayIndexOutOfBoundsException *e) ! { ! } ! ! // If the caller has a non-null class loader, and that loader ! // is not this class' loader or an ancestor thereof, then do a ! // security check. ! if (caller_loader != NULL && ! caller_loader->isAncestorOf(loader)) ! s->checkPermission (new RuntimePermission (JvNewStringLatin1 ("getClassLoader"))); ! } // The spec requires us to return `null' for primitive classes. In // other cases we have the option of returning `null' for classes *************** java::lang::Class::getClassLoader (void) *** 136,148 **** java::lang::reflect::Constructor * java::lang::Class::getConstructor (JArray *param_types) { jstring partial_sig = getSignature (param_types, true); jint hash = partial_sig->hashCode (); int i = isPrimitive () ? 0 : method_count; while (--i >= 0) { - // FIXME: access checks. if (_Jv_equalUtf8Consts (methods[i].name, init_name) && _Jv_equal (methods[i].signature, partial_sig, hash)) { --- 157,170 ---- java::lang::reflect::Constructor * java::lang::Class::getConstructor (JArray *param_types) { + memberAccessCheck(java::lang::reflect::Member::PUBLIC); + jstring partial_sig = getSignature (param_types, true); jint hash = partial_sig->hashCode (); int i = isPrimitive () ? 0 : method_count; while (--i >= 0) { if (_Jv_equalUtf8Consts (methods[i].name, init_name) && _Jv_equal (methods[i].signature, partial_sig, hash)) { *************** java::lang::Class::getConstructor (JArra *** 157,169 **** return cons; } } ! throw new java::lang::NoSuchMethodException; } JArray * java::lang::Class::_getConstructors (jboolean declared) { ! // FIXME: this method needs access checks. int numConstructors = 0; int max = isPrimitive () ? 0 : method_count; --- 179,191 ---- return cons; } } ! throw new java::lang::NoSuchMethodException (_Jv_NewStringUtf8Const (init_name)); } JArray * java::lang::Class::_getConstructors (jboolean declared) { ! memberAccessCheck(java::lang::reflect::Member::PUBLIC); int numConstructors = 0; int max = isPrimitive () ? 0 : method_count; *************** java::lang::Class::_getConstructors (jbo *** 206,218 **** java::lang::reflect::Constructor * java::lang::Class::getDeclaredConstructor (JArray *param_types) { jstring partial_sig = getSignature (param_types, true); jint hash = partial_sig->hashCode (); int i = isPrimitive () ? 0 : method_count; while (--i >= 0) { - // FIXME: access checks. if (_Jv_equalUtf8Consts (methods[i].name, init_name) && _Jv_equal (methods[i].signature, partial_sig, hash)) { --- 228,241 ---- java::lang::reflect::Constructor * java::lang::Class::getDeclaredConstructor (JArray *param_types) { + memberAccessCheck(java::lang::reflect::Member::DECLARED); + jstring partial_sig = getSignature (param_types, true); jint hash = partial_sig->hashCode (); int i = isPrimitive () ? 0 : method_count; while (--i >= 0) { if (_Jv_equalUtf8Consts (methods[i].name, init_name) && _Jv_equal (methods[i].signature, partial_sig, hash)) { *************** java::lang::Class::getDeclaredConstructo *** 224,230 **** return cons; } } ! throw new java::lang::NoSuchMethodException; } java::lang::reflect::Field * --- 247,253 ---- return cons; } } ! throw new java::lang::NoSuchMethodException (_Jv_NewStringUtf8Const (init_name)); } java::lang::reflect::Field * *************** java::lang::Class::getField (jstring nam *** 256,264 **** java::lang::reflect::Field * java::lang::Class::getDeclaredField (jstring name) { ! java::lang::SecurityManager *s = java::lang::System::getSecurityManager(); ! if (s != NULL) ! s->checkMemberAccess (this, java::lang::reflect::Member::DECLARED); int hash = name->hashCode(); for (int i = 0; i < field_count; i++) { --- 279,285 ---- java::lang::reflect::Field * java::lang::Class::getDeclaredField (jstring name) { ! memberAccessCheck(java::lang::reflect::Member::DECLARED); int hash = name->hashCode(); for (int i = 0; i < field_count; i++) { *************** java::lang::Class::getDeclaredField (jst *** 275,292 **** } JArray * ! java::lang::Class::getDeclaredFields (void) { ! java::lang::SecurityManager *s = java::lang::System::getSecurityManager(); ! if (s != NULL) ! s->checkMemberAccess (this, java::lang::reflect::Member::DECLARED); JArray *result = (JArray *) ! JvNewObjectArray (field_count, &java::lang::reflect::Field::class$, NULL); java::lang::reflect::Field** fptr = elements (result); for (int i = 0; i < field_count; i++) { _Jv_Field *field = &fields[i]; java::lang::reflect::Field* rfield = new java::lang::reflect::Field (); rfield->offset = (char*) field - (char*) fields; rfield->declaringClass = this; --- 296,327 ---- } JArray * ! java::lang::Class::getDeclaredFields (jboolean public_only) { ! int size; ! if (public_only) ! { ! size = 0; ! for (int i = 0; i < field_count; ++i) ! { ! _Jv_Field *field = &fields[i]; ! if ((field->flags & java::lang::reflect::Modifier::PUBLIC)) ! ++size; ! } ! } ! else ! size = field_count; ! JArray *result = (JArray *) ! JvNewObjectArray (size, &java::lang::reflect::Field::class$, NULL); java::lang::reflect::Field** fptr = elements (result); for (int i = 0; i < field_count; i++) { _Jv_Field *field = &fields[i]; + if (public_only + && ! (field->flags & java::lang::reflect::Modifier::PUBLIC)) + continue; java::lang::reflect::Field* rfield = new java::lang::reflect::Field (); rfield->offset = (char*) field - (char*) fields; rfield->declaringClass = this; *************** java::lang::Class::_getDeclaredMethod (j *** 361,366 **** --- 396,403 ---- JArray * java::lang::Class::getDeclaredMethods (void) { + memberAccessCheck(java::lang::reflect::Member::DECLARED); + int numMethods = 0; int max = isPrimitive () ? 0 : method_count; int i; *************** java::lang::Class::getClasses (void) *** 424,430 **** JArray * java::lang::Class::getDeclaredClasses (void) { ! checkMemberAccess (java::lang::reflect::Member::DECLARED); // Until we have inner classes, it always makes sense to return an // empty array. JArray *result --- 461,467 ---- JArray * java::lang::Class::getDeclaredClasses (void) { ! memberAccessCheck (java::lang::reflect::Member::DECLARED); // Until we have inner classes, it always makes sense to return an // empty array. JArray *result *************** java::lang::Class::getDeclaringClass (vo *** 441,502 **** return NULL; } - jint - java::lang::Class::_getFields (JArray *result, - jint offset) - { - int count = 0; - for (int i = 0; i < field_count; i++) - { - _Jv_Field *field = &fields[i]; - if (! (field->getModifiers() & java::lang::reflect::Modifier::PUBLIC)) - continue; - ++count; - - if (result != NULL) - { - java::lang::reflect::Field *rfield - = new java::lang::reflect::Field (); - rfield->offset = (char *) field - (char *) fields; - rfield->declaringClass = this; - rfield->name = _Jv_NewStringUtf8Const (field->name); - (elements (result))[offset++] = rfield; - } - } - jclass superclass = getSuperclass(); - if (superclass != NULL) - { - int s_count = superclass->_getFields (result, offset); - count += s_count; - offset += s_count; - } - for (int i = 0; i < interface_count; ++i) - { - int f_count = interfaces[i]->_getFields (result, offset); - count += f_count; - offset += f_count; - } - return count; - } - - JArray * - java::lang::Class::getFields (void) - { - // FIXME: security checking. - - using namespace java::lang::reflect; - - int count = _getFields (NULL, 0); - - JArray *result - = ((JArray *) - JvNewObjectArray (count, &java::lang::reflect::Field::class$, NULL)); - - _getFields (result, 0); - - return result; - } - JArray * java::lang::Class::getInterfaces (void) { --- 478,483 ---- *************** java::lang::Class::_getMethod (jstring n *** 518,524 **** int i = klass->isPrimitive () ? 0 : klass->method_count; while (--i >= 0) { - // FIXME: access checks. if (_Jv_equalUtf8Consts (klass->methods[i].name, utf_name) && _Jv_equaln (klass->methods[i].signature, partial_sig, p_len) && (klass->methods[i].accflags --- 499,504 ---- *************** java::lang::Class::getMethods (void) *** 642,648 **** { using namespace java::lang::reflect; ! // FIXME: security checks. // This will overestimate the size we need. jint count = _getMethods (NULL, 0); --- 622,628 ---- { using namespace java::lang::reflect; ! memberAccessCheck(Member::PUBLIC); // This will overestimate the size we need. jint count = _getMethods (NULL, 0); *************** java::lang::Class::isInstance (jobject o *** 696,719 **** jobject java::lang::Class::newInstance (void) { ! // FIXME: do accessibility checks here. There currently doesn't ! // seem to be any way to do these. ! // FIXME: we special-case one check here just to pass a Plum Hall ! // test. Once access checking is implemented, remove this. ! if (this == &java::lang::Class::class$) ! throw new java::lang::IllegalAccessException; if (isPrimitive () || isInterface () || isArray () || java::lang::reflect::Modifier::isAbstract(accflags)) ! throw new java::lang::InstantiationException; _Jv_InitClass (this); _Jv_Method *meth = _Jv_GetMethodLocal (this, init_name, void_signature); if (! meth) ! throw new java::lang::NoSuchMethodException; jobject r = JvAllocObject (this); ((void (*) (jobject)) meth->ncode) (r); --- 676,694 ---- jobject java::lang::Class::newInstance (void) { ! memberAccessCheck(java::lang::reflect::Member::PUBLIC); if (isPrimitive () || isInterface () || isArray () || java::lang::reflect::Modifier::isAbstract(accflags)) ! throw new java::lang::InstantiationException (getName ()); _Jv_InitClass (this); _Jv_Method *meth = _Jv_GetMethodLocal (this, init_name, void_signature); if (! meth) ! throw new java::lang::InstantiationException (getName()); jobject r = JvAllocObject (this); ((void (*) (jobject)) meth->ncode) (r); *************** java::lang::Class::initializeClass (void *** 748,754 **** { // this can throw exceptions, so exit the monitor as a precaution. _Jv_MonitorExit (this); ! java::lang::ClassLoader::resolveClass0 (this); _Jv_MonitorEnter (this); } else --- 723,729 ---- { // this can throw exceptions, so exit the monitor as a precaution. _Jv_MonitorExit (this); ! java::lang::VMClassLoader::resolveClass (this); _Jv_MonitorEnter (this); } else *************** java::lang::Class::initializeClass (void *** 758,766 **** } } - if (state <= JV_STATE_LINKED) - _Jv_PrepareConstantTimeTables (this); - // Step 2. java::lang::Thread *self = java::lang::Thread::currentThread(); // FIXME: `self' can be null at startup. Hence this nasty trick. --- 733,738 ---- *************** java::lang::Class::initializeClass (void *** 769,779 **** wait (); // Steps 3 & 4. ! if (state == JV_STATE_DONE || state == JV_STATE_IN_PROGRESS) { _Jv_MonitorExit (this); return; } // Step 5. if (state == JV_STATE_ERROR) --- 741,763 ---- wait (); // Steps 3 & 4. ! if (state == JV_STATE_DONE) { _Jv_MonitorExit (this); return; } + if (state == JV_STATE_IN_PROGRESS) + { + _Jv_MonitorExit (this); + + /* Initialization in progress. The class is linked now, + so ensure internal tables are built. */ + _Jv_PrepareConstantTimeTables (this); + _Jv_MakeVTable(this); + _Jv_LinkSymbolTable(this); + + return; + } // Step 5. if (state == JV_STATE_ERROR) *************** java::lang::Class::initializeClass (void *** 805,810 **** --- 789,804 ---- } } + _Jv_PrepareConstantTimeTables (this); + + if (vtable == NULL) + _Jv_MakeVTable(this); + + if (otable || atable) + _Jv_LinkSymbolTable(this); + + _Jv_linkExceptionClassTable (this); + // Steps 8, 9, 10, 11. try { *************** _Jv_GetInterfaces (jclass klass, _Jv_ifa *** 1216,1221 **** --- 1210,1219 ---- for (int i=0; i < klass->interface_count; i++) { jclass iface = klass->interfaces[i]; + + /* Make sure interface is linked. */ + _Jv_WaitForState(iface, JV_STATE_LINKED); + if (_Jv_IndexOf (iface, (void **) ifaces->list, ifaces->count) == -1) { if (ifaces->count + 1 >= ifaces->len) *************** java::lang::Class::getPrivateMethod (jst *** 1491,1497 **** } } } ! throw new java::lang::NoSuchMethodException; } // Private accessor method for Java code to retrieve the protection domain. --- 1489,1495 ---- } } } ! throw new java::lang::NoSuchMethodException (name); } // Private accessor method for Java code to retrieve the protection domain. *************** java::lang::Class::getProtectionDomain0 *** 1501,1587 **** return protectionDomain; } ! // Functions for indirect dispatch (symbolic virtual method binding) support. - // Resolve entries in the virtual method offset symbol table - // (klass->otable_syms). The vtable offset (in bytes) for each resolved method - // is placed at the corresponding position in the virtual method offset table - // (klass->otable). A single otable and otable_syms pair may be shared by many - // classes. void ! _Jv_LinkOffsetTable(jclass klass) { ! //// FIXME: Need to lock the otable //// if (klass->otable == NULL || klass->otable->state != 0) ! return; ! klass->otable->state = 1; ! int index = 0; ! _Jv_MethodSymbol sym = klass->otable_syms[0]; ! ! while (sym.name != NULL) { jclass target_class = _Jv_FindClass (sym.class_name, NULL); _Jv_Method *meth = NULL; ! ! if (target_class != NULL) ! if (target_class->isInterface()) { ! // FIXME: This does not yet fully conform to binary compatibility ! // rules. It will break if a declaration is moved into a ! // superinterface. ! for (int i=0; i < target_class->method_count; i++) { ! meth = &target_class->methods[i]; ! if (_Jv_equalUtf8Consts (sym.name, meth->name) ! && _Jv_equalUtf8Consts (sym.signature, meth->signature)) ! { ! klass->otable->offsets[index] = i + 1; ! break; ! } } } ! else { ! // If the target class does not have a vtable_method_count yet, ! // then we can't tell the offsets for its methods, so we must lay ! // it out now. ! if (target_class->vtable_method_count == -1) { ! JvSynchronize sync (target_class); ! _Jv_LayoutVTableMethods (target_class); } ! meth = _Jv_LookupDeclaredMethod(target_class, sym.name, ! sym.signature); ! if (meth != NULL) { ! klass->otable->offsets[index] = ! _Jv_VTable::idx_to_offset (meth->index); ! } ! } ! if (meth == NULL) ! // FIXME: This should be special index for ThrowNoSuchMethod(). ! klass->otable->offsets[index] = -1; ! sym = klass->otable_syms[++index]; } } ! // Returns true if METH should get an entry in a VTable. ! static jboolean ! isVirtualMethod (_Jv_Method *meth) { ! using namespace java::lang::reflect; ! return (((meth->accflags & (Modifier::STATIC | Modifier::PRIVATE)) == 0) ! && meth->name->data[0] != '<'); } ! // This is put in empty vtable slots. static void _Jv_abstractMethodError (void) --- 1499,1784 ---- return protectionDomain; } ! JArray * ! java::lang::Class::getSigners() ! { ! return hack_signers; ! } void ! java::lang::Class::setSigners(JArray *s) { ! hack_signers = s; ! } ! ! // Functions for indirect dispatch (symbolic virtual binding) support. ! ! // There are two tables, atable and otable. atable is an array of ! // addresses, and otable is an array of offsets, and these are used ! // for static and virtual members respectively. ! ! // {a,o}table_syms is an array of _Jv_MethodSymbols. Each such symbol ! // is a tuple of {classname, member name, signature}. ! // _Jv_LinkSymbolTable() scans these two arrays and fills in the ! // corresponding atable and otable with the addresses of static ! // members and the offsets of virtual members. ! ! // The offset (in bytes) for each resolved method or field is placed ! // at the corresponding position in the virtual method offset table ! // (klass->otable). ! ! // The same otable and atable may be shared by many classes. ! ! void ! _Jv_LinkSymbolTable(jclass klass) ! { ! //// FIXME: Need to lock the tables //// + int index = 0; + _Jv_MethodSymbol sym; if (klass->otable == NULL || klass->otable->state != 0) ! goto atable; ! klass->otable->state = 1; ! for (index = 0; sym = klass->otable_syms[index], sym.name != NULL; index++) { + // FIXME: Why are we passing NULL as the class loader? jclass target_class = _Jv_FindClass (sym.class_name, NULL); _Jv_Method *meth = NULL; ! ! const _Jv_Utf8Const *signature = sym.signature; ! ! { ! static char *bounce = (char *)_Jv_ThrowNoSuchMethodError; ! ptrdiff_t offset = (char *)(klass->vtable) - bounce; ! klass->otable->offsets[index] = offset; ! } ! ! if (target_class == NULL) ! continue; ! ! if (target_class->isInterface()) ! { ! // FIXME: This does not yet fully conform to binary compatibility ! // rules. It will break if a declaration is moved into a ! // superinterface. ! for (jclass cls = target_class; cls != 0; cls = cls->getSuperclass ()) ! { ! for (int i=0; i < cls->method_count; i++) ! { ! meth = &cls->methods[i]; ! if (_Jv_equalUtf8Consts (sym.name, meth->name) ! && _Jv_equalUtf8Consts (signature, meth->signature)) ! { ! klass->otable->offsets[index] = i + 1; ! goto found; ! } ! } ! ! } ! found: ! continue; ! } ! ! // We're looking for a field or a method, and we can tell ! // which is needed by looking at the signature. ! if (signature->length >= 2 ! && signature->data[0] == '(') ! { ! // If the target class does not have a vtable_method_count yet, ! // then we can't tell the offsets for its methods, so we must lay ! // it out now. ! if (target_class->vtable_method_count == -1) ! { ! JvSynchronize sync (target_class); ! _Jv_LayoutVTableMethods (target_class); ! } ! ! meth = _Jv_LookupDeclaredMethod(target_class, sym.name, ! sym.signature); ! ! if (meth != NULL) ! { ! klass->otable->offsets[index] = ! _Jv_VTable::idx_to_offset (meth->index); ! } ! ! continue; ! } ! ! // try fields ! { ! _Jv_Field *the_field = NULL; ! ! for (jclass cls = target_class; cls != 0; cls = cls->getSuperclass ()) { ! for (int i = 0; i < cls->field_count; i++) { ! _Jv_Field *field = &cls->fields[i]; ! if (! _Jv_equalUtf8Consts (field->name, sym.name)) ! continue; ! ! // FIXME: What access checks should we perform here? ! // if (_Jv_CheckAccess (klass, cls, field->flags)) ! // { ! ! if (!field->isResolved ()) ! _Jv_ResolveField (field, cls->loader); ! ! // if (field_type != 0 && field->type != field_type) ! // throw new java::lang::LinkageError ! // (JvNewStringLatin1 ! // ("field type mismatch with different loaders")); ! ! the_field = field; ! goto end_of_field_search; } } ! end_of_field_search: ! if (the_field != NULL) { ! if (the_field->flags & 0x0008 /* Modifier::STATIC */) ! { ! throw new java::lang::IncompatibleClassChangeError; ! } ! else { ! klass->otable->offsets[index] = the_field->u.boffset; } + } + else + { + throw new java::lang::NoSuchFieldError + (_Jv_NewStringUtf8Const (sym.name)); + } + } + } ! atable: ! if (klass->atable == NULL ! || klass->atable->state != 0) ! return; ! klass->atable->state = 1; ! ! for (index = 0; sym = klass->atable_syms[index], sym.name != NULL; index++) ! { ! // FIXME: Why are we passing NULL as the class loader? ! jclass target_class = _Jv_FindClass (sym.class_name, NULL); ! _Jv_Method *meth = NULL; ! const _Jv_Utf8Const *signature = sym.signature; ! ! // ??? Setting this pointer to null will at least get us a ! // NullPointerException ! klass->atable->addresses[index] = NULL; ! ! if (target_class == NULL) ! continue; ! ! // We're looking for a static field or a static method, and we ! // can tell which is needed by looking at the signature. ! if (signature->length >= 2 ! && signature->data[0] == '(') ! { ! // If the target class does not have a vtable_method_count yet, ! // then we can't tell the offsets for its methods, so we must lay ! // it out now. ! if (target_class->vtable_method_count == -1) ! { ! JvSynchronize sync (target_class); ! _Jv_LayoutVTableMethods (target_class); ! } ! ! meth = _Jv_LookupDeclaredMethod(target_class, sym.name, ! sym.signature); ! ! if (meth != NULL) ! { ! if (meth->ncode) // Maybe abstract? ! klass->atable->addresses[index] = meth->ncode; ! #ifdef INTERPRETER ! else if (_Jv_IsInterpretedClass (target_class)) ! _Jv_Defer_Resolution (target_class, meth, ! &klass->atable->addresses[index]); ! #endif ! } ! else ! klass->atable->addresses[index] = (void *)_Jv_ThrowNoSuchMethodError; ! ! continue; ! } ! ! // try fields ! { ! _Jv_Field *the_field = NULL; ! ! for (jclass cls = target_class; cls != 0; cls = cls->getSuperclass ()) ! { ! for (int i = 0; i < cls->field_count; i++) { ! _Jv_Field *field = &cls->fields[i]; ! if (! _Jv_equalUtf8Consts (field->name, sym.name)) ! continue; ! // FIXME: What access checks should we perform here? ! // if (_Jv_CheckAccess (klass, cls, field->flags)) ! // { ! if (!field->isResolved ()) ! _Jv_ResolveField (field, cls->loader); ! ! // if (field_type != 0 && field->type != field_type) ! // throw new java::lang::LinkageError ! // (JvNewStringLatin1 ! // ("field type mismatch with different loaders")); ! ! the_field = field; ! goto end_of_static_field_search; ! } ! } ! end_of_static_field_search: ! if (the_field != NULL) ! { ! if (the_field->flags & 0x0008 /* Modifier::STATIC */) ! { ! klass->atable->addresses[index] = the_field->u.addr; ! } ! else ! { ! throw new java::lang::IncompatibleClassChangeError; ! } ! } ! else ! { ! throw new java::lang::NoSuchFieldError ! (_Jv_NewStringUtf8Const (sym.name)); ! } ! } } } ! ! // For each catch_record in the list of caught classes, fill in the ! // address field. ! void ! _Jv_linkExceptionClassTable (jclass self) { ! struct _Jv_CatchClass *catch_record = self->catch_classes; ! if (!catch_record || catch_record->classname) ! return; ! catch_record++; ! while (catch_record->classname) ! { ! jclass target_class = _Jv_FindClass (catch_record->classname, ! self->getClassLoaderInternal ()); ! *catch_record->address = target_class; ! catch_record++; ! } ! self->catch_classes->classname = (_Jv_Utf8Const *)-1; } ! // This is put in empty vtable slots. static void _Jv_abstractMethodError (void) *************** _Jv_LayoutVTableMethods (jclass klass) *** 1602,1607 **** --- 1799,1824 ---- jclass superclass = klass->superclass; + typedef unsigned int uaddr __attribute__ ((mode (pointer))); + + // If superclass looks like a constant pool entry, + // resolve it now. + if ((uaddr)superclass < (uaddr)klass->constants.size) + { + if (klass->state < JV_STATE_LINKED) + { + _Jv_Utf8Const *name = klass->constants.data[(int)superclass].utf8; + superclass = _Jv_FindClass (name, klass->loader); + if (! superclass) + { + jstring str = _Jv_NewStringUTF (name->data); + throw new java::lang::NoClassDefFoundError (str); + } + } + else + superclass = klass->constants.data[(int)superclass].clazz; + } + if (superclass != NULL && superclass->vtable_method_count == -1) { JvSynchronize sync (superclass); *************** _Jv_LayoutVTableMethods (jclass klass) *** 1615,1623 **** _Jv_Method *meth = &klass->methods[i]; _Jv_Method *super_meth = NULL; ! if (! isVirtualMethod (meth)) continue; if (superclass != NULL) { super_meth = _Jv_LookupDeclaredMethod (superclass, meth->name, --- 1832,1846 ---- _Jv_Method *meth = &klass->methods[i]; _Jv_Method *super_meth = NULL; ! if (! _Jv_isVirtualMethod (meth)) continue; + // FIXME: Must check that we don't override: + // - Package-private method where superclass is in different package. + // - Final or less-accessible declaration in superclass (check binary + // spec, do we allocate new vtable entry or put throw node in vtable?) + // - Static or private method in superclass. + if (superclass != NULL) { super_meth = _Jv_LookupDeclaredMethod (superclass, meth->name, *************** _Jv_LayoutVTableMethods (jclass klass) *** 1626,1633 **** if (super_meth) meth->index = super_meth->index; ! else if (! (meth->accflags & java::lang::reflect::Modifier::FINAL) ! && ! (klass->accflags & java::lang::reflect::Modifier::FINAL)) meth->index = index++; } --- 1849,1855 ---- if (super_meth) meth->index = super_meth->index; ! else meth->index = index++; } *************** _Jv_MakeVTable (jclass klass) *** 1723,1729 **** { for (int i = 0; i < klass->vtable_method_count; ++i) if (! flags[i]) ! // FIXME: messsage. ! throw new java::lang::AbstractMethodError (); } } --- 1945,1970 ---- { for (int i = 0; i < klass->vtable_method_count; ++i) if (! flags[i]) ! { ! using namespace java::lang; ! while (klass != NULL) ! { ! for (int j = 0; j < klass->method_count; ++j) ! { ! if (klass->methods[i].index == i) ! { ! StringBuffer *buf = new StringBuffer (); ! buf->append (_Jv_NewStringUtf8Const (klass->methods[i].name)); ! buf->append ((jchar) ' '); ! buf->append (_Jv_NewStringUtf8Const (klass->methods[i].signature)); ! throw new AbstractMethodError (buf->toString ()); ! } ! } ! klass = klass->getSuperclass (); ! } ! // Couldn't find the name, which is weird. ! // But we still must throw the error. ! throw new AbstractMethodError (); ! } } } diff -Nrc3pad gcc-3.3.3/libjava/java/lang/natClassLoader.cc gcc-3.4.0/libjava/java/lang/natClassLoader.cc *** gcc-3.3.3/libjava/java/lang/natClassLoader.cc 2002-12-19 19:32:17.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/natClassLoader.cc 2004-01-09 17:10:43.000000000 +0000 *************** *** 1,6 **** // natClassLoader.cc - Implementation of java.lang.ClassLoader native methods. ! /* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation This file is part of libgcj. --- 1,6 ---- // natClassLoader.cc - Implementation of java.lang.ClassLoader native methods. ! /* Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation This file is part of libgcj. *************** details. */ *** 44,60 **** /////////// java.lang.ClassLoader native methods //////////// java::lang::Class * ! java::lang::ClassLoader::defineClass0 (jstring name, ! jbyteArray data, ! jint offset, ! jint length, ! java::security::ProtectionDomain *pd) { #ifdef INTERPRETER jclass klass; klass = (jclass) JvAllocObject (&java::lang::Class::class$, sizeof (_Jv_InterpClass)); - _Jv_InitNewClassFields (klass); // Synchronize on the class, so that it is not attempted initialized // until we're done loading. --- 44,60 ---- /////////// java.lang.ClassLoader native methods //////////// java::lang::Class * ! java::lang::VMClassLoader::defineClass (java::lang::ClassLoader *loader, ! jstring name, ! jbyteArray data, ! jint offset, ! jint length, ! java::security::ProtectionDomain *pd) { #ifdef INTERPRETER jclass klass; klass = (jclass) JvAllocObject (&java::lang::Class::class$, sizeof (_Jv_InterpClass)); // Synchronize on the class, so that it is not attempted initialized // until we're done loading. *************** java::lang::ClassLoader::defineClass0 (j *** 62,69 **** // Record the defining loader. For the system class loader, we // record NULL. ! if (this != java::lang::ClassLoader::getSystemClassLoader()) ! klass->loader = this; if (name != 0) { --- 62,69 ---- // Record the defining loader. For the system class loader, we // record NULL. ! if (loader != java::lang::ClassLoader::getSystemClassLoader()) ! klass->loader = loader; if (name != 0) { *************** java::lang::ClassLoader::defineClass0 (j *** 105,110 **** --- 105,151 ---- #endif } + // Finish linking a class. Only called from ClassLoader::resolveClass. + void + java::lang::VMClassLoader::linkClass0 (java::lang::Class *klass) + { + _Jv_WaitForState (klass, JV_STATE_LINKED); + } + + void + java::lang::VMClassLoader::markClassErrorState0 (java::lang::Class *klass) + { + klass->state = JV_STATE_ERROR; + klass->notifyAll (); + } + + java::lang::ClassLoader * + java::lang::VMClassLoader::getSystemClassLoaderInternal() + { + _Jv_InitClass (&gnu::gcj::runtime::VMClassLoader::class$); + return gnu::gcj::runtime::VMClassLoader::instance; + } + + jclass + java::lang::VMClassLoader::getPrimitiveClass (jchar type) + { + char sig[2]; + sig[0] = (char) type; + sig[1] = '\0'; + return _Jv_FindClassFromSignature (sig, NULL); + } + + jclass + java::lang::VMClassLoader::loadClass(jstring name, jboolean resolve) + { + _Jv_Utf8Const *utf = _Jv_makeUtf8Const (name); + // FIXME: we culd make _Jv_FindClassFromSignature a template. + jclass klass = _Jv_FindClassInCache (utf, NULL); + if (klass && resolve) + _Jv_InitClass (klass); + return klass; + } + void _Jv_WaitForState (jclass klass, int state) { *************** _Jv_WaitForState (jclass klass, int stat *** 117,122 **** --- 158,167 ---- { // Must call _Jv_PrepareCompiledClass while holding the class // mutex. + #ifdef INTERPRETER + if (_Jv_IsInterpretedClass (klass)) + _Jv_PrepareClass (klass); + #endif _Jv_PrepareCompiledClass (klass); _Jv_MonitorExit (klass); return; *************** _Jv_WaitForState (jclass klass, int stat *** 137,182 **** throw new java::lang::LinkageError; } ! // Finish linking a class. Only called from ClassLoader::resolveClass. ! void ! java::lang::ClassLoader::linkClass0 (java::lang::Class *klass) ! { ! if (klass->state >= JV_STATE_LINKED) ! return; ! ! #ifdef INTERPRETER ! if (_Jv_IsInterpretedClass (klass)) ! _Jv_PrepareClass (klass); ! #endif ! ! _Jv_PrepareCompiledClass (klass); ! } ! ! void ! java::lang::ClassLoader::markClassErrorState0 (java::lang::Class *klass) ! { ! klass->state = JV_STATE_ERROR; ! klass->notifyAll (); ! } ! ! jclass ! java::lang::VMClassLoader::defineClass (java::lang::ClassLoader *cl, ! jstring name, ! jbyteArray data, ! jint offset, ! jint length) ! { ! return cl->defineClass (name, data, offset, length); ! } ! ! jclass ! java::lang::VMClassLoader::getPrimitiveClass (jchar type) ! { ! char sig[2]; ! sig[0] = (char) type; ! sig[1] = '\0'; ! return _Jv_FindClassFromSignature (sig, NULL); ! } /** This function does class-preparation for compiled classes. NOTE: It contains replicated functionality from --- 182,188 ---- throw new java::lang::LinkageError; } ! typedef unsigned int uaddr __attribute__ ((mode (pointer))); /** This function does class-preparation for compiled classes. NOTE: It contains replicated functionality from *************** _Jv_PrepareCompiledClass (jclass klass) *** 193,198 **** --- 199,207 ---- klass->state = JV_STATE_LINKED; _Jv_Constants *pool = &klass->constants; + + // Resolve class constants first, since other constant pool + // entries may rely on these. for (int index = 1; index < pool->size; ++index) { if (pool->tags[index] == JV_CONSTANT_Class) *************** _Jv_PrepareCompiledClass (jclass klass) *** 215,221 **** pool->data[index].clazz = found; pool->tags[index] |= JV_CONSTANT_ResolvedFlag; } ! else if (pool->tags[index] == JV_CONSTANT_String) { jstring str; --- 224,245 ---- pool->data[index].clazz = found; pool->tags[index] |= JV_CONSTANT_ResolvedFlag; } ! } ! ! // If superclass looks like a constant pool entry, ! // resolve it now. ! if ((uaddr) klass->superclass < pool->size) ! klass->superclass = pool->data[(int) klass->superclass].clazz; ! ! // Likewise for interfaces. ! for (int i = 0; i < klass->interface_count; i++) ! if ((uaddr) klass->interfaces[i] < pool->size) ! klass->interfaces[i] = pool->data[(int) klass->interfaces[i]].clazz; ! ! // Resolve the remaining constant pool entries. ! for (int index = 1; index < pool->size; ++index) ! { ! if (pool->tags[index] == JV_CONSTANT_String) { jstring str; *************** _Jv_PrepareCompiledClass (jclass klass) *** 238,243 **** --- 262,268 ---- int mod = f->getModifiers (); // If we have a static String field with a non-null initial // value, we know it points to a Utf8Const. + _Jv_ResolveField(f, klass->loader); if (f->getClass () == &java::lang::String::class$ && java::lang::reflect::Modifier::isStatic (mod)) { *************** _Jv_PrepareCompiledClass (jclass klass) *** 251,262 **** } #endif /* INTERPRETER */ - if (klass->vtable == NULL) - _Jv_MakeVTable(klass); - - if (klass->otable != NULL && klass->otable->state == 0) - _Jv_LinkOffsetTable(klass); - klass->notifyAll (); _Jv_PushClass (klass); --- 276,281 ---- *************** _Jv_PrepareCompiledClass (jclass klass) *** 271,277 **** // The set of initiating class loaders are used to ensure // safety of linking, and is maintained in the hash table // "initiated_classes". A defining classloader is by definition also ! // initiating, so we only store classes in this table, if they have more // than one class loader associated. // --- 290,296 ---- // The set of initiating class loaders are used to ensure // safety of linking, and is maintained in the hash table // "initiated_classes". A defining classloader is by definition also ! // initiating, so we only store classes in this table if they have more // than one class loader associated. // *************** _Jv_FindClass (_Jv_Utf8Const *name, java *** 502,544 **** return klass; } - void - _Jv_InitNewClassFields (jclass ret) - { - ret->next = NULL; - ret->name = NULL; - ret->accflags = 0; - ret->superclass = NULL; - ret->constants.size = 0; - ret->constants.tags = NULL; - ret->constants.data = NULL; - ret->methods = NULL; - ret->method_count = 0; - ret->vtable_method_count = 0; - ret->fields = NULL; - ret->size_in_bytes = 0; - ret->field_count = 0; - ret->static_field_count = 0; - ret->vtable = NULL; - ret->interfaces = NULL; - ret->loader = NULL; - ret->interface_count = 0; - ret->state = JV_STATE_NOTHING; - ret->thread = NULL; - ret->depth = 0; - ret->ancestors = NULL; - ret->idt = NULL; - ret->arrayclass = NULL; - ret->protectionDomain = NULL; - ret->chain = NULL; - } - jclass _Jv_NewClass (_Jv_Utf8Const *name, jclass superclass, java::lang::ClassLoader *loader) { jclass ret = (jclass) JvAllocObject (&java::lang::Class::class$); - _Jv_InitNewClassFields (ret); ret->name = name; ret->superclass = superclass; ret->loader = loader; --- 521,531 ---- diff -Nrc3pad gcc-3.3.3/libjava/java/lang/natDouble.cc gcc-3.4.0/libjava/java/lang/natDouble.cc *** gcc-3.3.3/libjava/java/lang/natDouble.cc 2002-04-15 03:11:12.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/natDouble.cc 2003-11-26 18:02:34.000000000 +0000 *************** *** 1,6 **** // natDouble.cc - Implementation of java.lang.Double native methods. ! /* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation This file is part of libgcj. --- 1,6 ---- // natDouble.cc - Implementation of java.lang.Double native methods. ! /* Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation This file is part of libgcj. diff -Nrc3pad gcc-3.3.3/libjava/java/lang/natObject.cc gcc-3.4.0/libjava/java/lang/natObject.cc *** gcc-3.3.3/libjava/java/lang/natObject.cc 2003-02-19 16:27:22.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/natObject.cc 2003-10-23 21:48:36.000000000 +0000 *************** _Jv_MonitorExit (jobject obj) *** 264,269 **** --- 264,276 ---- throw new java::lang::IllegalMonitorStateException; } + bool + _Jv_ObjectCheckMonitor (jobject obj) + { + _Jv_SyncInfo *si = (_Jv_SyncInfo *) obj->sync_info; + return _Jv_MutexCheckMonitor (&si->mutex); + } + #else /* JV_HASH_SYNCHRONIZATION */ // FIXME: We shouldn't be calling GC_register_finalizer directly. *************** _Jv_MonitorExit (jobject obj) *** 303,309 **** // that can atomically update only N bits at a time. // Author: Hans-J. Boehm (Hans_Boehm@hp.com, boehm@acm.org) - #include #include #include // for usleep, sysconf. #include --- 310,315 ---- *************** struct heavy_lock { *** 352,358 **** obj_addr_t address; // Object to which this lock corresponds. // Should not be traced by GC. // Cleared as heavy_lock is destroyed. ! // Together with the rest of the hevy lock // chain, this is protected by the lock // bit in the hash table entry to which // the chain is attached. --- 358,364 ---- obj_addr_t address; // Object to which this lock corresponds. // Should not be traced by GC. // Cleared as heavy_lock is destroyed. ! // Together with the rest of the heavy lock // chain, this is protected by the lock // bit in the hash table entry to which // the chain is attached. *************** struct hash_entry { *** 458,469 **** }; #ifndef JV_SYNC_TABLE_SZ ! # define JV_SYNC_TABLE_SZ 2048 #endif hash_entry light_locks[JV_SYNC_TABLE_SZ]; ! #define JV_SYNC_HASH(p) (((long)p ^ ((long)p >> 10)) % JV_SYNC_TABLE_SZ) // Note that the light_locks table is scanned conservatively by the // collector. It is essential the the heavy_locks field is scanned. --- 464,475 ---- }; #ifndef JV_SYNC_TABLE_SZ ! # define JV_SYNC_TABLE_SZ 2048 // Must be power of 2. #endif hash_entry light_locks[JV_SYNC_TABLE_SZ]; ! #define JV_SYNC_HASH(p) (((long)p ^ ((long)p >> 10)) & (JV_SYNC_TABLE_SZ-1)) // Note that the light_locks table is scanned conservatively by the // collector. It is essential the the heavy_locks field is scanned. *************** heavy_lock_obj_finalization_proc (void * *** 605,611 **** release_set(&(he -> address), he_address); return; } ! assert(hl -> address == addr); GC_finalization_proc old_finalization_proc = hl -> old_finalization_proc; if (old_finalization_proc != 0) { --- 611,617 ---- release_set(&(he -> address), he_address); return; } ! JvAssert(hl -> address == addr); GC_finalization_proc old_finalization_proc = hl -> old_finalization_proc; if (old_finalization_proc != 0) { *************** heavy_lock_obj_finalization_proc (void * *** 653,660 **** static void remove_all_heavy (hash_entry *he, obj_addr_t new_address_val) { ! assert(he -> heavy_count == 0); ! assert(he -> address & LOCKED); heavy_lock *hl = he -> heavy_locks; he -> heavy_locks = 0; // We would really like to release the lock bit here. Unfortunately, that --- 659,666 ---- static void remove_all_heavy (hash_entry *he, obj_addr_t new_address_val) { ! JvAssert(he -> heavy_count == 0); ! JvAssert(he -> address & LOCKED); heavy_lock *hl = he -> heavy_locks; he -> heavy_locks = 0; // We would really like to release the lock bit here. Unfortunately, that *************** remove_all_heavy (hash_entry *he, obj_ad *** 664,671 **** for(; 0 != hl; hl = hl->next) { obj_addr_t obj = hl -> address; ! assert(0 != obj); // If this was previously finalized, it should no ! // longer appear on our list. hl -> address = 0; // Finalization proc might still see it after we // finish. GC_finalization_proc old_finalization_proc = hl -> old_finalization_proc; --- 670,677 ---- for(; 0 != hl; hl = hl->next) { obj_addr_t obj = hl -> address; ! JvAssert(0 != obj); // If this was previously finalized, it should no ! // longer appear on our list. hl -> address = 0; // Finalization proc might still see it after we // finish. GC_finalization_proc old_finalization_proc = hl -> old_finalization_proc; *************** _Jv_MonitorEnter (jobject obj) *** 782,794 **** if (__builtin_expect(!addr, false)) throw new java::lang::NullPointerException; ! assert(!(addr & FLAGS)); retry: if (__builtin_expect(compare_and_swap(&(he -> address), 0, addr),true)) { ! assert(he -> light_thr_id == INVALID_THREAD_ID); ! assert(he -> light_count == 0); he -> light_thr_id = self; // Count fields are set correctly. Heavy_count was also zero, // but can change asynchronously. --- 788,800 ---- if (__builtin_expect(!addr, false)) throw new java::lang::NullPointerException; ! JvAssert(!(addr & FLAGS)); retry: if (__builtin_expect(compare_and_swap(&(he -> address), 0, addr),true)) { ! JvAssert(he -> light_thr_id == INVALID_THREAD_ID); ! JvAssert(he -> light_count == 0); he -> light_thr_id = self; // Count fields are set correctly. Heavy_count was also zero, // but can change asynchronously. *************** retry: *** 836,842 **** // only be held by other threads waiting for conversion, and // they, like us, drop it quickly without blocking. _Jv_MutexLock(&(hl->si.mutex)); ! assert(he -> address == address | LOCKED ); release_set(&(he -> address), (address | REQUEST_CONVERSION | HEAVY)); // release lock on he while ((he -> address & ~FLAGS) == (address & ~FLAGS)) --- 842,848 ---- // only be held by other threads waiting for conversion, and // they, like us, drop it quickly without blocking. _Jv_MutexLock(&(hl->si.mutex)); ! JvAssert(he -> address == address | LOCKED ); release_set(&(he -> address), (address | REQUEST_CONVERSION | HEAVY)); // release lock on he while ((he -> address & ~FLAGS) == (address & ~FLAGS)) *************** retry: *** 849,855 **** // Guarantee that hl doesn't get unlinked by finalizer. // This is only an issue if the client fails to release // the lock, which is unlikely. ! assert(he -> address & HEAVY); // Lock has been converted, we hold the heavyweight lock, // heavy_count has been incremented. return; --- 855,861 ---- // Guarantee that hl doesn't get unlinked by finalizer. // This is only an issue if the client fails to release // the lock, which is unlikely. ! JvAssert(he -> address & HEAVY); // Lock has been converted, we hold the heavyweight lock, // heavy_count has been incremented. return; *************** retry: *** 866,872 **** { // Either was_heavy is true, or something changed out from under us, // since the initial test for 0 failed. ! assert(!(address & REQUEST_CONVERSION)); // Can't convert a nonexistent lightweight lock. heavy_lock *hl; hl = (was_heavy? find_heavy(addr, he) : 0); --- 872,878 ---- { // Either was_heavy is true, or something changed out from under us, // since the initial test for 0 failed. ! JvAssert(!(address & REQUEST_CONVERSION)); // Can't convert a nonexistent lightweight lock. heavy_lock *hl; hl = (was_heavy? find_heavy(addr, he) : 0); *************** retry: *** 879,893 **** // one first and use that. he -> light_thr_id = self; // OK, since nobody else can hold // light lock or do this at the same time. ! assert(he -> light_count == 0); ! assert(was_heavy == (he -> address & HEAVY)); release_set(&(he -> address), (addr | was_heavy)); } else { // Must use heavy lock. ++ (he -> heavy_count); ! assert(0 == (address & ~HEAVY)); release_set(&(he -> address), HEAVY); _Jv_MutexLock(&(hl->si.mutex)); keep_live(addr); --- 885,899 ---- // one first and use that. he -> light_thr_id = self; // OK, since nobody else can hold // light lock or do this at the same time. ! JvAssert(he -> light_count == 0); ! JvAssert(was_heavy == (he -> address & HEAVY)); release_set(&(he -> address), (addr | was_heavy)); } else { // Must use heavy lock. ++ (he -> heavy_count); ! JvAssert(0 == (address & ~HEAVY)); release_set(&(he -> address), HEAVY); _Jv_MutexLock(&(hl->si.mutex)); keep_live(addr); *************** retry: *** 898,904 **** // We hold the lock on the hash entry, and he -> address can't // change from under us. Neither can the chain of heavy locks. { ! assert(0 == he -> heavy_count || (address & HEAVY)); heavy_lock *hl = get_heavy(addr, he); ++ (he -> heavy_count); release_set(&(he -> address), address | HEAVY); --- 904,910 ---- // We hold the lock on the hash entry, and he -> address can't // change from under us. Neither can the chain of heavy locks. { ! JvAssert(0 == he -> heavy_count || (address & HEAVY)); heavy_lock *hl = get_heavy(addr, he); ++ (he -> heavy_count); release_set(&(he -> address), address | HEAVY); *************** retry: *** 1006,1022 **** he -> light_count = count - 1; return; } ! assert(he -> light_thr_id == self); ! assert(address & REQUEST_CONVERSION); // Conversion requested // Convert now. if (!compare_and_swap(&(he -> address), address, address | LOCKED)) goto retry; heavy_lock *hl = find_heavy(addr, he); ! assert (0 != hl); // Requestor created it. he -> light_count = 0; ! assert(he -> heavy_count > 0); // was incremented by requestor. _Jv_MutexLock(&(hl->si.mutex)); // Release the he lock after acquiring the mutex. --- 1012,1028 ---- he -> light_count = count - 1; return; } ! JvAssert(he -> light_thr_id == self); ! JvAssert(address & REQUEST_CONVERSION); // Conversion requested // Convert now. if (!compare_and_swap(&(he -> address), address, address | LOCKED)) goto retry; heavy_lock *hl = find_heavy(addr, he); ! JvAssert (0 != hl); // Requestor created it. he -> light_count = 0; ! JvAssert(he -> heavy_count > 0); // was incremented by requestor. _Jv_MutexLock(&(hl->si.mutex)); // Release the he lock after acquiring the mutex. *************** retry: *** 1033,1040 **** return; } // lightweight lock not for this object. ! assert(!(address & LOCKED)); ! assert((address & ~FLAGS) != addr); if (!compare_and_swap(&(he -> address), address, address | LOCKED)) goto retry; heavy_lock *hl = find_heavy(addr, he); --- 1039,1046 ---- return; } // lightweight lock not for this object. ! JvAssert(!(address & LOCKED)); ! JvAssert((address & ~FLAGS) != addr); if (!compare_and_swap(&(he -> address), address, address | LOCKED)) goto retry; heavy_lock *hl = find_heavy(addr, he); *************** retry: *** 1049,1057 **** throw new java::lang::IllegalMonitorStateException( JvNewStringLatin1("current thread not owner")); } ! assert(address & HEAVY); count = he -> heavy_count; ! assert(count > 0); --count; he -> heavy_count = count; if (0 == count) --- 1055,1063 ---- throw new java::lang::IllegalMonitorStateException( JvNewStringLatin1("current thread not owner")); } ! JvAssert(address & HEAVY); count = he -> heavy_count; ! JvAssert(count > 0); --count; he -> heavy_count = count; if (0 == count) *************** retry: *** 1088,1093 **** --- 1094,1139 ---- keep_live(addr); } + // Return false if obj's monitor is held by the current thread + bool + _Jv_ObjectCheckMonitor (jobject obj) + { + #ifdef JV_LINKER_CANNOT_8BYTE_ALIGN_STATICS + obj_addr_t addr = (obj_addr_t)obj & ~((obj_addr_t)FLAGS); + #else + obj_addr_t addr = (obj_addr_t)obj; + #endif + obj_addr_t address; + unsigned hash = JV_SYNC_HASH(addr); + hash_entry * he = light_locks + hash; + _Jv_ThreadId_t self = _Jv_ThreadSelf(); + + JvAssert(!(addr & FLAGS)); + retry: + // Acquire the hash table entry lock + address = ((he -> address) & ~LOCKED); + if (!compare_and_swap(&(he -> address), address, address | LOCKED)) + { + wait_unlocked(he); + goto retry; + } + + bool not_mine; + + if (!(address & ~FLAGS)) + not_mine = true; + else if ((address & ~FLAGS) == addr) + not_mine = (he -> light_thr_id != self); + else + { + heavy_lock* hl = find_heavy(addr, he); + not_mine = hl ? _Jv_MutexCheckMonitor(&hl->si.mutex) : true; + } + + release_set(&(he -> address), address); // unlock hash entry + return not_mine; + } + // The rest of these are moderately thin veneers on _Jv_Cond ops. // The current version of Notify might be able to make the pthread // call AFTER releasing the lock, thus saving some context switches?? *************** retry: *** 1160,1166 **** throw new IllegalMonitorStateException (JvNewStringLatin1 ("current thread not owner")); } ! assert(address & HEAVY); } switch (_Jv_CondWait (&(hl->si.condition), &(hl->si.mutex), timeout, nanos)) { --- 1206,1212 ---- throw new IllegalMonitorStateException (JvNewStringLatin1 ("current thread not owner")); } ! JvAssert(address & HEAVY); } switch (_Jv_CondWait (&(hl->si.condition), &(hl->si.mutex), timeout, nanos)) { diff -Nrc3pad gcc-3.3.3/libjava/java/lang/natPosixProcess.cc gcc-3.4.0/libjava/java/lang/natPosixProcess.cc *** gcc-3.3.3/libjava/java/lang/natPosixProcess.cc 2002-08-14 19:53:54.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/natPosixProcess.cc 2004-02-04 00:04:20.000000000 +0000 *************** *** 1,6 **** // natPosixProcess.cc - Native side of POSIX process code. ! /* Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation This file is part of libgcj. --- 1,6 ---- // natPosixProcess.cc - Native side of POSIX process code. ! /* Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004 Free Software Foundation This file is part of libgcj. *************** new_string (jstring string) *** 82,88 **** { jsize s = _Jv_GetStringUTFLength (string); char *buf = (char *) _Jv_Malloc (s + 1); ! _Jv_GetStringUTFRegion (string, 0, s, buf); buf[s] = '\0'; return buf; } --- 82,88 ---- { jsize s = _Jv_GetStringUTFLength (string); char *buf = (char *) _Jv_Malloc (s + 1); ! _Jv_GetStringUTFRegion (string, 0, string->length(), buf); buf[s] = '\0'; return buf; } *************** java::lang::ConcreteProcess::startProces *** 207,213 **** char *path_val = getenv ("PATH"); char *ld_path_val = getenv ("LD_LIBRARY_PATH"); environ = env; ! if (getenv ("PATH") == NULL) { char *path_env = (char *) _Jv_Malloc (strlen (path_val) + 5 + 1); --- 207,213 ---- char *path_val = getenv ("PATH"); char *ld_path_val = getenv ("LD_LIBRARY_PATH"); environ = env; ! if (path_val && getenv ("PATH") == NULL) { char *path_env = (char *) _Jv_Malloc (strlen (path_val) + 5 + 1); *************** java::lang::ConcreteProcess::startProces *** 215,221 **** strcat (path_env, path_val); putenv (path_env); } ! if (getenv ("LD_LIBRARY_PATH") == NULL) { char *ld_path_env = (char *) _Jv_Malloc (strlen (ld_path_val) + 16 + 1); --- 215,221 ---- strcat (path_env, path_val); putenv (path_env); } ! if (ld_path_val && getenv ("LD_LIBRARY_PATH") == NULL) { char *ld_path_env = (char *) _Jv_Malloc (strlen (ld_path_val) + 16 + 1); diff -Nrc3pad gcc-3.3.3/libjava/java/lang/natRuntime.cc gcc-3.4.0/libjava/java/lang/natRuntime.cc *** gcc-3.3.3/libjava/java/lang/natRuntime.cc 2003-04-25 16:02:23.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/natRuntime.cc 2003-12-16 21:48:23.000000000 +0000 *************** details. */ *** 60,107 **** AC_LTDL_PREOPEN to see if we do. */ extern const lt_dlsymlist lt_preloaded_symbols[1] = { { 0, 0 } }; ! // We keep track of all the libraries loaded by this application. For ! // now we use them to look up symbols for JNI. `libraries_size' holds ! // the total size of the buffer. `libraries_count' is the number of ! // items which are in use. ! static int libraries_size; ! static int libraries_count; ! static lt_dlhandle *libraries; ! ! static void ! add_library (lt_dlhandle lib) { ! if (libraries_count == libraries_size) ! { ! int ns = libraries_size * 2; ! if (ns == 0) ! ns = 10; ! lt_dlhandle *n = (lt_dlhandle *) _Jv_Malloc (ns * sizeof (lt_dlhandle)); ! if (libraries) ! { ! memcpy (n, libraries, libraries_size * sizeof (lt_dlhandle)); ! _Jv_Free (libraries); ! } ! libraries = n; ! libraries_size = ns; ! for (int i = libraries_count; i < libraries_size; ++i) ! libraries[i] = NULL; ! } ! libraries[libraries_count++] = lib; } void * _Jv_FindSymbolInExecutable (const char *symname) { ! for (int i = 0; i < libraries_count; ++i) ! { ! void *r = lt_dlsym (libraries[i], symname); ! if (r) ! return r; ! } ! ! return NULL; } void --- 60,87 ---- AC_LTDL_PREOPEN to see if we do. */ extern const lt_dlsymlist lt_preloaded_symbols[1] = { { 0, 0 } }; ! struct lookup_data { ! const char *symname; ! void *result; ! }; ! static int ! find_symbol (lt_dlhandle handle, lt_ptr data) ! { ! lookup_data *ld = (lookup_data *) data; ! ld->result = lt_dlsym (handle, ld->symname); ! return ld->result != NULL; } void * _Jv_FindSymbolInExecutable (const char *symname) { ! lookup_data data; ! data.symname = symname; ! data.result = NULL; ! lt_dlforeach (find_symbol, (lt_ptr) &data); ! return data.result; } void *************** java::lang::Runtime::gc (void) *** 156,161 **** --- 136,146 ---- _Jv_RunGC (); } + #ifdef USE_LTDL + // List of names for JNI_OnLoad. + static const char *onload_names[] = _Jv_platform_onload_names; + #endif + void java::lang::Runtime::_load (jstring path, jboolean do_search) { *************** java::lang::Runtime::_load (jstring path *** 232,257 **** if (h == NULL) { const char *msg = lt_dlerror (); ! jstring str = path->concat (JvNewStringLatin1 (": ")); str = str->concat (JvNewStringLatin1 (msg)); throw new UnsatisfiedLinkError (str); } ! add_library (h); ! ! void *onload = lt_dlsym (h, "JNI_OnLoad"); ! ! #ifdef WIN32 ! // On Win32, JNI_OnLoad is an "stdcall" function taking two pointers ! // (8 bytes) as arguments. It could also have been exported as ! // "JNI_OnLoad@8" (MinGW) or "_JNI_OnLoad@8" (MSVC). ! if (onload == NULL) { ! onload = lt_dlsym (h, "JNI_OnLoad@8"); ! if (onload == NULL) ! onload = lt_dlsym (h, "_JNI_OnLoad@8"); } - #endif /* WIN32 */ if (onload != NULL) { --- 217,238 ---- if (h == NULL) { const char *msg = lt_dlerror (); ! jstring str = JvNewStringLatin1 (lib_name); ! str = str->concat (JvNewStringLatin1 (": ")); str = str->concat (JvNewStringLatin1 (msg)); throw new UnsatisfiedLinkError (str); } ! // Search for JNI_OnLoad function. ! void *onload = NULL; ! const char **name = onload_names; ! while (*name != NULL) { ! onload = lt_dlsym (h, *name); ! if (onload != NULL) ! break; ! ++name; } if (onload != NULL) { *************** java::lang::Runtime::loadLibraryInternal *** 289,296 **** buf[total] = '\0'; // FIXME: make sure path is absolute. lt_dlhandle h = lt_dlopenext (buf); - if (h != NULL) - add_library (h); return h != NULL; #else return false; --- 270,275 ---- *************** java::lang::Runtime::init (void) *** 302,310 **** { #ifdef USE_LTDL lt_dlinit (); ! lt_dlhandle self = lt_dlopen (NULL); ! if (self != NULL) ! add_library (self); #endif } --- 281,288 ---- { #ifdef USE_LTDL lt_dlinit (); ! // Make sure self is opened. ! lt_dlopen (NULL); #endif } *************** java::lang::Runtime::insertSystemPropert *** 441,446 **** --- 419,430 ---- // redefine `java.home' with `-D' if necessary. SET ("java.home", PREFIX); SET ("gnu.classpath.home", PREFIX); + // This is set to $(libdir) because we use this to find .security + // files at runtime. + char val2[sizeof ("file://") + sizeof (LIBDIR) + 1]; + strcpy (val2, "file://"); + strcat (val2, LIBDIR); + SET ("gnu.classpath.home.url", val2); SET ("file.encoding", default_file_encoding); *************** java::lang::Runtime::insertSystemPropert *** 580,586 **** if (_Jv_Jar_Class_Path) newprops->put(JvNewStringLatin1 ("java.class.path"), ! JvNewStringLatin1 (_Jv_Jar_Class_Path)); else { // FIXME: find libgcj.zip and append its path? --- 564,570 ---- if (_Jv_Jar_Class_Path) newprops->put(JvNewStringLatin1 ("java.class.path"), ! JvNewStringLatin1 (_Jv_Jar_Class_Path)); else { // FIXME: find libgcj.zip and append its path? *************** java::lang::Runtime::insertSystemPropert *** 591,601 **** if (classpath) { sb->append (JvNewStringLatin1 (classpath)); ! #ifdef WIN32 ! sb->append ((jchar) ';'); ! #else ! sb->append ((jchar) ':'); ! #endif } if (cp != NULL) sb->append (cp); --- 575,581 ---- if (classpath) { sb->append (JvNewStringLatin1 (classpath)); ! sb->append (_Jv_platform_path_separator); } if (cp != NULL) sb->append (cp); *************** java::lang::Runtime::insertSystemPropert *** 606,611 **** --- 586,594 ---- sb->toString ()); } + // The path to libgcj's boot classes + SET ("sun.boot.class.path", BOOT_CLASS_PATH); + // The name used to invoke this process (argv[0] in C). SET ("gnu.gcj.progname", _Jv_GetSafeArg (0)); *************** java::lang::Runtime::nativeGetLibname (j *** 653,666 **** java::lang::StringBuffer *sb = new java::lang::StringBuffer (); sb->append(pathname); if (pathname->length() > 0) ! { ! // FIXME: use platform function here. ! #ifdef WIN32 ! sb->append ((jchar) '\\'); ! #else ! sb->append ((jchar) '/'); ! #endif ! } sb->append (JvNewStringLatin1 (_Jv_platform_solib_prefix)); sb->append(libname); --- 636,642 ---- java::lang::StringBuffer *sb = new java::lang::StringBuffer (); sb->append(pathname); if (pathname->length() > 0) ! sb->append (_Jv_platform_file_separator); sb->append (JvNewStringLatin1 (_Jv_platform_solib_prefix)); sb->append(libname); diff -Nrc3pad gcc-3.3.3/libjava/java/lang/natStringBuffer.cc gcc-3.4.0/libjava/java/lang/natStringBuffer.cc *** gcc-3.3.3/libjava/java/lang/natStringBuffer.cc 2001-05-22 04:38:35.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/natStringBuffer.cc 2003-03-24 00:50:18.000000000 +0000 *************** *** 1,6 **** // natStringBuffer.cc - Implementation of java.lang.StringBuffer native methods. ! /* Copyright (C) 2001 Free Software Foundation This file is part of libgcj. --- 1,6 ---- // natStringBuffer.cc - Implementation of java.lang.StringBuffer native methods. ! /* Copyright (C) 2001, 2003 Free Software Foundation This file is part of libgcj. *************** java::lang::StringBuffer::append (jint n *** 28,30 **** --- 28,42 ---- count = needed; return this; } + + jboolean + java::lang::StringBuffer::regionMatches(jint toffset, jstring other) + { + jint len = other->count; + jchar *tptr = elements(value) + toffset; + jchar *optr = JvGetStringChars(other); + while (--len >= 0) + if (*tptr++ != *optr++) + return false; + return true; + } diff -Nrc3pad gcc-3.3.3/libjava/java/lang/natString.cc gcc-3.4.0/libjava/java/lang/natString.cc *** gcc-3.3.3/libjava/java/lang/natString.cc 2003-06-07 18:42:28.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/natString.cc 2003-10-16 21:28:23.000000000 +0000 *************** *** 1,6 **** // natString.cc - Implementation of java.lang.String native methods. ! /* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation This file is part of libgcj. --- 1,6 ---- // natString.cc - Implementation of java.lang.String native methods. ! /* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation This file is part of libgcj. *************** details. */ *** 20,25 **** --- 20,26 ---- #include #include #include + #include #include #include #include *************** details. */ *** 27,35 **** #include #include #include #include - static void unintern (jobject); static jstring* strhash = NULL; static int strhash_count = 0; /* Number of slots used in strhash. */ static int strhash_size = 0; /* Number of slots available in strhash. --- 28,36 ---- #include #include #include + #include #include static jstring* strhash = NULL; static int strhash_count = 0; /* Number of slots used in strhash. */ static int strhash_size = 0; /* Number of slots available in strhash. *************** hashChars (jchar* ptr, jint length) *** 102,108 **** jint java::lang::String::hashCode() { ! return hashChars(JvGetStringChars(this), length()); } jstring* --- 103,111 ---- jint java::lang::String::hashCode() { ! if (cachedHashCode == 0) ! cachedHashCode = hashChars(JvGetStringChars(this), length()); ! return cachedHashCode; } jstring* *************** java::lang::String::intern() *** 169,196 **** jstring* ptr = _Jv_StringGetSlot(this); if (*ptr != NULL && *ptr != DELETED_STRING) { ! // See description in unintern() to understand this. *ptr = (jstring) MASK_PTR (*ptr); return (jstring) UNMASK_PTR (*ptr); } ! jstring str = this->data == this ? this ! : _Jv_NewString(JvGetStringChars(this), this->length()); SET_STRING_IS_INTERNED(str); strhash_count++; *ptr = str; // When string is GC'd, clear the slot in the hash table. ! _Jv_RegisterFinalizer ((void *) str, unintern); return str; } ! /* Called by String fake finalizer. */ ! static void ! unintern (jobject obj) { JvSynchronize sync (&StringClass); jstring str = reinterpret_cast (obj); ! jstring* ptr = _Jv_StringGetSlot(str); ! if (*ptr == NULL || *ptr == DELETED_STRING) return; // We assume the lowest bit of the pointer is free for our nefarious --- 172,209 ---- jstring* ptr = _Jv_StringGetSlot(this); if (*ptr != NULL && *ptr != DELETED_STRING) { ! // See description in _Jv_FinalizeString() to understand this. *ptr = (jstring) MASK_PTR (*ptr); return (jstring) UNMASK_PTR (*ptr); } ! jstring str = (this->data == this ! ? this ! : _Jv_NewString(JvGetStringChars(this), this->length())); SET_STRING_IS_INTERNED(str); strhash_count++; *ptr = str; // When string is GC'd, clear the slot in the hash table. ! _Jv_RegisterStringFinalizer (str); return str; } ! // The fake String finalizer. This is only used when the String has ! // been intern()d. However, we must check this case, as it might be ! // called by the Reference code for any String. ! void ! _Jv_FinalizeString (jobject obj) { JvSynchronize sync (&StringClass); + + // We might not actually have intern()d any strings at all, if + // we're being called from Reference. + if (! strhash) + return; + jstring str = reinterpret_cast (obj); ! jstring *ptr = _Jv_StringGetSlot(str); ! if (*ptr == NULL || *ptr == DELETED_STRING ! || (jobject) UNMASK_PTR (*ptr) != obj) return; // We assume the lowest bit of the pointer is free for our nefarious *************** unintern (jobject obj) *** 198,218 **** // interning the String. If we subsequently re-intern the same // String, then we set the bit. When finalizing, if the bit is set // then we clear it and re-register the finalizer. We know this is ! // a safe approach because both intern() and unintern() acquire ! // the class lock; this bit can't be manipulated when the lock is ! // not held. So if we are finalizing and the bit is clear then we ! // know all references are gone and we can clear the entry in the ! // hash table. The naive approach of simply clearing the pointer ! // here fails in the case where a request to intern a new string ! // with the same contents is made between the time the intern()d ! // string is found to be unreachable and when the finalizer is ! // actually run. In this case we could clear a pointer to a valid ! // string, and future intern() calls for that particular value would ! // spuriously fail. if (PTR_MASKED (*ptr)) { *ptr = (jstring) UNMASK_PTR (*ptr); ! _Jv_RegisterFinalizer ((void *) obj, unintern); } else { --- 211,231 ---- // interning the String. If we subsequently re-intern the same // String, then we set the bit. When finalizing, if the bit is set // then we clear it and re-register the finalizer. We know this is ! // a safe approach because both intern() and _Jv_FinalizeString() ! // acquire the class lock; this bit can't be manipulated when the ! // lock is not held. So if we are finalizing and the bit is clear ! // then we know all references are gone and we can clear the entry ! // in the hash table. The naive approach of simply clearing the ! // pointer here fails in the case where a request to intern a new ! // string with the same contents is made between the time the ! // intern()d string is found to be unreachable and when the ! // finalizer is actually run. In this case we could clear a pointer ! // to a valid string, and future intern() calls for that particular ! // value would spuriously fail. if (PTR_MASKED (*ptr)) { *ptr = (jstring) UNMASK_PTR (*ptr); ! _Jv_RegisterStringFinalizer (obj); } else { *************** _Jv_NewStringUtf8Const (Utf8Const* str) *** 285,294 **** chrs = JvGetStringChars(jstr); memcpy (chrs, buffer, sizeof(jchar)*length); } *ptr = jstr; SET_STRING_IS_INTERNED(jstr); ! // When string is GC'd, clear the slot in the hash table. ! _Jv_RegisterFinalizer ((void *) jstr, unintern); return jstr; } --- 298,310 ---- chrs = JvGetStringChars(jstr); memcpy (chrs, buffer, sizeof(jchar)*length); } + jstr->cachedHashCode = hash; *ptr = jstr; SET_STRING_IS_INTERNED(jstr); ! // When string is GC'd, clear the slot in the hash table. Note that ! // we don't have to call _Jv_RegisterStringFinalizer here, as we ! // know the new object cannot be referred to by a Reference. ! _Jv_RegisterFinalizer ((void *) jstr, _Jv_FinalizeString); return jstr; } *************** _Jv_AllocString(jsize len) *** 405,410 **** --- 421,427 ---- obj->data = obj; obj->boffset = sizeof(java::lang::String); obj->count = len; + obj->cachedHashCode = 0; return obj; } *************** _Jv_NewStringLatin1(const char *bytes, j *** 429,442 **** } void - java::lang::String::init () - { - count = 0; - boffset = sizeof(java::lang::String); - data = this; - } - - void java::lang::String::init(jcharArray chars, jint offset, jint count, jboolean dont_copy) { --- 446,451 ---- *************** java::lang::String::init (jbyteArray byt *** 528,533 **** --- 537,548 ---- this->count = outpos; } + void + java::lang::String::init (gnu::gcj::runtime::StringBuffer *buffer) + { + init (buffer->value, 0, buffer->count, true); + } + jboolean java::lang::String::equals(jobject anObject) { *************** java::lang::String::equals(jobject anObj *** 552,562 **** return true; } jchar java::lang::String::charAt(jint i) { if (i < 0 || i >= count) ! throw new java::lang::StringIndexOutOfBoundsException; return JvGetStringChars(this)[i]; } --- 567,596 ---- return true; } + jboolean + java::lang::String::contentEquals(java::lang::StringBuffer* buffer) + { + if (buffer == NULL) + throw new NullPointerException; + JvSynchronize sync(buffer); + if (count != buffer->count) + return false; + if (data == buffer->value) + return true; // Possible if shared. + jint i = count; + jchar *xptr = JvGetStringChars(this); + jchar *yptr = elements(buffer->value); + while (--i >= 0) + if (*xptr++ != *yptr++) + return false; + return true; + } + jchar java::lang::String::charAt(jint i) { if (i < 0 || i >= count) ! throw new java::lang::StringIndexOutOfBoundsException(i); return JvGetStringChars(this)[i]; } *************** java::lang::String::getChars(jint srcBeg *** 567,573 **** jint dst_length = JvGetArrayLength (dst); if (srcBegin < 0 || srcBegin > srcEnd || srcEnd > count) throw new java::lang::StringIndexOutOfBoundsException; ! if (dstBegin < 0 || dstBegin + (srcEnd-srcBegin) > dst_length) throw new ArrayIndexOutOfBoundsException; jchar *dPtr = elements (dst) + dstBegin; jchar *sPtr = JvGetStringChars (this) + srcBegin; --- 601,610 ---- jint dst_length = JvGetArrayLength (dst); if (srcBegin < 0 || srcBegin > srcEnd || srcEnd > count) throw new java::lang::StringIndexOutOfBoundsException; ! // The 2nd part of the test below is equivalent to ! // dstBegin + (srcEnd-srcBegin) > dst_length ! // except that it does not overflow. ! if (dstBegin < 0 || dstBegin > dst_length - (srcEnd-srcBegin)) throw new ArrayIndexOutOfBoundsException; jchar *dPtr = elements (dst) + dstBegin; jchar *sPtr = JvGetStringChars (this) + srcBegin; *************** java::lang::String::getBytes(jint srcBeg *** 619,625 **** jint dst_length = JvGetArrayLength (dst); if (srcBegin < 0 || srcBegin > srcEnd || srcEnd > count) throw new java::lang::StringIndexOutOfBoundsException; ! if (dstBegin < 0 || dstBegin + (srcEnd-srcBegin) > dst_length) throw new ArrayIndexOutOfBoundsException; jbyte *dPtr = elements (dst) + dstBegin; jchar *sPtr = JvGetStringChars (this) + srcBegin; --- 656,665 ---- jint dst_length = JvGetArrayLength (dst); if (srcBegin < 0 || srcBegin > srcEnd || srcEnd > count) throw new java::lang::StringIndexOutOfBoundsException; ! // The 2nd part of the test below is equivalent to ! // dstBegin + (srcEnd-srcBegin) > dst_length ! // except that it does not overflow. ! if (dstBegin < 0 || dstBegin > dst_length - (srcEnd-srcBegin)) throw new ArrayIndexOutOfBoundsException; jbyte *dPtr = elements (dst) + dstBegin; jchar *sPtr = JvGetStringChars (this) + srcBegin; *************** jboolean *** 666,674 **** java::lang::String::regionMatches (jint toffset, jstring other, jint ooffset, jint len) { ! if (toffset < 0 || ooffset < 0 ! || toffset + len > count ! || ooffset + len > other->count) return false; jchar *tptr = JvGetStringChars (this) + toffset; jchar *optr = JvGetStringChars (other) + ooffset; --- 706,714 ---- java::lang::String::regionMatches (jint toffset, jstring other, jint ooffset, jint len) { ! if (toffset < 0 || ooffset < 0 || len < 0 ! || toffset > count - len ! || ooffset > other->count - len) return false; jchar *tptr = JvGetStringChars (this) + toffset; jchar *optr = JvGetStringChars (other) + ooffset; *************** jboolean *** 703,711 **** java::lang::String::regionMatches (jboolean ignoreCase, jint toffset, jstring other, jint ooffset, jint len) { ! if (toffset < 0 || ooffset < 0 ! || toffset + len > count ! || ooffset + len > other->count) return false; jchar *tptr = JvGetStringChars (this) + toffset; jchar *optr = JvGetStringChars (other) + ooffset; --- 743,751 ---- java::lang::String::regionMatches (jboolean ignoreCase, jint toffset, jstring other, jint ooffset, jint len) { ! if (toffset < 0 || ooffset < 0 || len < 0 ! || toffset > count - len ! || ooffset > other->count - len) return false; jchar *tptr = JvGetStringChars (this) + toffset; jchar *optr = JvGetStringChars (other) + ooffset; *************** jboolean *** 736,742 **** java::lang::String::startsWith (jstring prefix, jint toffset) { jint i = prefix->count; ! if (toffset < 0 || toffset + i > count) return false; jchar *xptr = JvGetStringChars (this) + toffset; jchar *yptr = JvGetStringChars (prefix); --- 776,782 ---- java::lang::String::startsWith (jstring prefix, jint toffset) { jint i = prefix->count; ! if (toffset < 0 || toffset > count - i) return false; jchar *xptr = JvGetStringChars (this) + toffset; jchar *yptr = JvGetStringChars (prefix); *************** jstring *** 1009,1015 **** java::lang::String::valueOf(jcharArray data, jint offset, jint count) { jint data_length = JvGetArrayLength (data); ! if (offset < 0 || count < 0 || offset+count > data_length) throw new ArrayIndexOutOfBoundsException; jstring result = JvAllocString(count); jchar *sPtr = elements (data) + offset; --- 1049,1055 ---- java::lang::String::valueOf(jcharArray data, jint offset, jint count) { jint data_length = JvGetArrayLength (data); ! if (offset < 0 || count < 0 || offset > data_length - count) throw new ArrayIndexOutOfBoundsException; jstring result = JvAllocString(count); jchar *sPtr = elements (data) + offset; diff -Nrc3pad gcc-3.3.3/libjava/java/lang/natSystem.cc gcc-3.4.0/libjava/java/lang/natSystem.cc *** gcc-3.3.3/libjava/java/lang/natSystem.cc 2003-02-19 16:27:22.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/natSystem.cc 2003-07-23 15:31:43.000000000 +0000 *************** java::lang::System::arraycopy (jobject s *** 66,73 **** __JArray *src_a = (__JArray *) src; __JArray *dst_a = (__JArray *) dst; if (src_offset < 0 || dst_offset < 0 || count < 0 ! || src_offset + count > src_a->length ! || dst_offset + count > dst_a->length) throw new ArrayIndexOutOfBoundsException; // Do-nothing cases. --- 66,75 ---- __JArray *src_a = (__JArray *) src; __JArray *dst_a = (__JArray *) dst; if (src_offset < 0 || dst_offset < 0 || count < 0 ! || (unsigned jint) src_offset > (unsigned jint) src_a->length ! || (unsigned jint) (src_offset + count) > (unsigned jint) src_a->length ! || (unsigned jint) dst_offset > (unsigned jint) dst_a->length ! || (unsigned jint) (dst_offset + count) > (unsigned jint) dst_a->length) throw new ArrayIndexOutOfBoundsException; // Do-nothing cases. diff -Nrc3pad gcc-3.3.3/libjava/java/lang/natThread.cc gcc-3.4.0/libjava/java/lang/natThread.cc *** gcc-3.3.3/libjava/java/lang/natThread.cc 2002-04-10 20:36:04.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/natThread.cc 2003-10-21 04:46:19.000000000 +0000 *************** java::lang::Thread::destroy (void) *** 107,112 **** --- 107,120 ---- (JvNewStringLatin1 ("Thread.destroy unimplemented")); } + jboolean + java::lang::Thread::holdsLock (jobject obj) + { + if (!obj) + throw new NullPointerException; + return !_Jv_ObjectCheckMonitor (obj); + } + void java::lang::Thread::interrupt (void) { diff -Nrc3pad gcc-3.3.3/libjava/java/lang/natVMSecurityManager.cc gcc-3.4.0/libjava/java/lang/natVMSecurityManager.cc *** gcc-3.3.3/libjava/java/lang/natVMSecurityManager.cc 2002-12-05 00:49:29.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/natVMSecurityManager.cc 2003-06-18 14:13:59.000000000 +0000 *************** java::lang::VMSecurityManager::getClassC *** 28,36 **** int maxlen = t->length(); int len = 0; ! while (len < maxlen) { ! jclass klass = t->classAt(len); if (klass != NULL && klass != &java::lang::VMSecurityManager::class$ && klass != &java::lang::SecurityManager::class$) ++len; --- 28,36 ---- int maxlen = t->length(); int len = 0; ! for (int i=0; iclassAt(i); if (klass != NULL && klass != &java::lang::VMSecurityManager::class$ && klass != &java::lang::SecurityManager::class$) ++len; *************** java::lang::VMSecurityManager::getClassC *** 41,49 **** NULL); len = 0; ! while (len < maxlen) { ! jclass klass = t->classAt(len); if (klass != NULL && klass != &java::lang::VMSecurityManager::class$ && klass != &java::lang::SecurityManager::class$) elements(result)[len++] = klass; --- 41,49 ---- NULL); len = 0; ! for (int i=0; iclassAt(i); if (klass != NULL && klass != &java::lang::VMSecurityManager::class$ && klass != &java::lang::SecurityManager::class$) elements(result)[len++] = klass; diff -Nrc3pad gcc-3.3.3/libjava/java/lang/natWin32Process.cc gcc-3.4.0/libjava/java/lang/natWin32Process.cc *** gcc-3.3.3/libjava/java/lang/natWin32Process.cc 2003-03-01 23:01:56.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/natWin32Process.cc 2003-12-02 22:26:49.000000000 +0000 *************** Libgcj License. Please consult the file *** 9,26 **** details. */ #include ! ! #include ! ! #define WIN32_LEAN_AND_MEAN ! #include // Conflicts with the definition in "java/lang/reflect/Modifier.h" #undef STRICT - #include - #include - #include #include #include --- 9,19 ---- details. */ #include ! #include // Conflicts with the definition in "java/lang/reflect/Modifier.h" #undef STRICT #include #include #include *************** details. */ *** 36,57 **** void java::lang::ConcreteProcess::cleanup (void) { ! if (inputStream != NULL) ! { ! inputStream->close (); ! inputStream = NULL; ! } ! ! if (outputStream != NULL) ! { ! outputStream->close (); ! outputStream = NULL; ! } ! ! if (errorStream != NULL) { ! errorStream->close (); ! errorStream = NULL; } } --- 29,61 ---- void java::lang::ConcreteProcess::cleanup (void) { ! // FIXME: ! // We used to close the input, output and ! // error streams here, but we can't do that ! // because the caller also has the right ! // to close these and FileInputStream and FileOutputStream ! // scream if you attempt to close() them twice. Presently, ! // we use _Jv_platform_close_on_exec, which is similar ! // to the POSIX approach. ! // ! // What I wanted to do is have private nested ! // classes in ConcreteProcess which extend FileInputStream ! // and FileOutputStream, respectively, but override ! // close() to permit multiple calls to close(). This ! // led to class header and platform configury issues ! // that I didn't feel like dealing with. However, ! // this approach could conceivably be a good multiplatform ! // one since delaying the pipe close until process ! // termination could be wasteful if many child processes ! // are spawned within the parent process' lifetime. ! inputStream = NULL; ! outputStream = NULL; ! errorStream = NULL; ! ! if (procHandle) { ! CloseHandle((HANDLE) procHandle); ! procHandle = (jint) INVALID_HANDLE_VALUE; } } *************** java::lang::ConcreteProcess::waitFor (vo *** 99,106 **** { DWORD exitStatus = 0UL; ! // FIXME: The wait should be interruptible. ! WaitForSingleObject ((HANDLE) procHandle, INFINITE); GetExitCodeProcess ((HANDLE) procHandle, &exitStatus); exitCode = exitStatus; --- 103,130 ---- { DWORD exitStatus = 0UL; ! // Set up our waitable objects array ! // - 0: the handle to the process we just launched ! // - 1: our thread's interrupt event ! HANDLE arh[2]; ! arh[0] = (HANDLE) procHandle; ! arh[1] = _Jv_Win32GetInterruptEvent (); ! DWORD rval = WaitForMultipleObjects (2, arh, 0, INFINITE); ! ! // Use the returned value from WaitForMultipleObjects ! // instead of our thread's interrupt_flag to test for ! // thread interruption. See the comment for ! // _Jv_Win32GetInterruptEvent(). ! bool bInterrupted = rval == (WAIT_OBJECT_0 + 1); ! ! if (bInterrupted) ! { ! // Querying this forces a reset our thread's interrupt flag. ! Thread::interrupted(); ! ! cleanup (); ! throw new InterruptedException (); ! } GetExitCodeProcess ((HANDLE) procHandle, &exitStatus); exitCode = exitStatus; *************** java::lang::ConcreteProcess::waitFor (vo *** 111,124 **** return exitCode; } ! static char * ! new_string (jstring string) { ! jsize s = _Jv_GetStringUTFLength (string); ! char *buf = (char *) _Jv_Malloc (s + 1); ! _Jv_GetStringUTFRegion (string, 0, s, buf); ! buf[s] = '\0'; ! return buf; } void --- 135,208 ---- return exitCode; } ! ! // Helper class for creating and managing the pipes ! // used for I/O redirection for child processes. ! class ChildProcessPipe { ! public: ! // Indicates from the child process' point of view ! // whether the pipe is for reading or writing. ! enum EType {INPUT, OUTPUT}; ! ! ChildProcessPipe(EType eType); ! ~ChildProcessPipe(); ! ! // Returns a pipe handle suitable for use by the parent process ! HANDLE getParentHandle(); ! ! // Returns a pipe handle suitable for use by the child process. ! HANDLE getChildHandle(); ! ! private: ! EType m_eType; ! HANDLE m_hRead, m_hWrite; ! }; ! ! ChildProcessPipe::ChildProcessPipe(EType eType): ! m_eType(eType) ! { ! SECURITY_ATTRIBUTES sAttrs; ! ! // Explicitly allow the handles to the pipes to be inherited. ! sAttrs.nLength = sizeof (SECURITY_ATTRIBUTES); ! sAttrs.bInheritHandle = 1; ! sAttrs.lpSecurityDescriptor = NULL; ! ! if (CreatePipe (&m_hRead, &m_hWrite, &sAttrs, 0) == 0) ! { ! DWORD dwErrorCode = GetLastError (); ! throw new java::io::IOException ( ! _Jv_WinStrError (_T("Error creating pipe"), dwErrorCode)); ! } ! ! // If this is the read end of the child, we need ! // to make the parent write end non-inheritable. Similarly, ! // if this is the write end of the child, we need to make ! // the parent read end non-inheritable. If we didn't ! // do this, the child would inherit these ends and we wouldn't ! // be able to close them from our end. For full details, ! // do a Google search on "Q190351". ! HANDLE& rhStd = m_eType==INPUT ? m_hWrite : m_hRead; ! _Jv_platform_close_on_exec (rhStd); ! } ! ! ChildProcessPipe::~ChildProcessPipe() ! { ! // Close the parent end of the pipe. This ! // destructor is called after the child process ! // has been spawned. ! CloseHandle(getChildHandle()); ! } ! ! HANDLE ChildProcessPipe::getParentHandle() ! { ! return m_eType==INPUT ? m_hWrite : m_hRead; ! } ! ! HANDLE ChildProcessPipe::getChildHandle() ! { ! return m_eType==INPUT ? m_hRead : m_hWrite; } void *************** java::lang::ConcreteProcess::startProces *** 136,187 **** int cmdLineLen = 0; for (int i = 0; i < progarray->length; ++i) ! cmdLineLen += (_Jv_GetStringUTFLength (elts[i]) + 3); ! char *cmdLine = (char *) _Jv_Malloc (cmdLineLen + 1); ! char *cmdLineCurPos = cmdLine; for (int i = 0; i < progarray->length; ++i) { if (i > 0) ! *cmdLineCurPos++ = ' '; ! *cmdLineCurPos++ = '\"'; ! jsize s = _Jv_GetStringUTFLength (elts[i]); ! _Jv_GetStringUTFRegion (elts[i], 0, s, cmdLineCurPos); ! cmdLineCurPos += s; ! *cmdLineCurPos++ = '\"'; } ! *cmdLineCurPos = '\0'; // Get the environment, if any. ! char *env = NULL; if (envp) { elts = elements (envp); int envLen = 0; for (int i = 0; i < envp->length; ++i) ! envLen += (_Jv_GetStringUTFLength (elts[i]) + 1); ! env = (char *) _Jv_Malloc (envLen + 1); int j = 0; for (int i = 0; i < envp->length; ++i) { ! jsize s = _Jv_GetStringUTFLength (elts[i]); ! _Jv_GetStringUTFRegion (elts[i], 0, s, (env + j)); ! ! j += s; ! *(env + j) = '\0'; j++; } ! *(env + j) = '\0'; } // Get the working directory path, if specified. ! char *wdir = NULL; ! if (dir != NULL) ! wdir = new_string (dir->getPath ()); errorStream = NULL; inputStream = NULL; --- 220,272 ---- int cmdLineLen = 0; for (int i = 0; i < progarray->length; ++i) ! cmdLineLen += (elts[i]->length() + 1); ! LPTSTR cmdLine = (LPTSTR) _Jv_Malloc ((cmdLineLen + 1) * sizeof(TCHAR)); ! LPTSTR cmdLineCurPos = cmdLine; for (int i = 0; i < progarray->length; ++i) { if (i > 0) ! *cmdLineCurPos++ = _T(' '); ! ! jint len = elts[i]->length(); ! JV_TEMP_STRING_WIN32(thiselt, elts[i]); ! _tcscpy(cmdLineCurPos, thiselt); ! cmdLineCurPos += len; } ! *cmdLineCurPos = _T('\0'); // Get the environment, if any. ! LPTSTR env = NULL; if (envp) { elts = elements (envp); int envLen = 0; for (int i = 0; i < envp->length; ++i) ! envLen += (elts[i]->length() + 1); ! env = (LPTSTR) _Jv_Malloc ((envLen + 1) * sizeof(TCHAR)); int j = 0; for (int i = 0; i < envp->length; ++i) { ! jint len = elts[i]->length(); ! ! JV_TEMP_STRING_WIN32(thiselt, elts[i]); ! _tcscpy(env + j, thiselt); ! ! j += len; ! ! // Skip past the null terminator that _tcscpy just inserted. j++; } ! *(env + j) = _T('\0'); } // Get the working directory path, if specified. ! JV_TEMP_STRING_WIN32 (wdir, dir ? dir->getPath () : 0); errorStream = NULL; inputStream = NULL; *************** java::lang::ConcreteProcess::startProces *** 193,242 **** { // We create anonymous pipes to communicate with the child // on each of standard streams. ! HANDLE cldStdInRd, cldStdInWr; ! HANDLE cldStdOutRd, cldStdOutWr; ! HANDLE cldStdErrRd, cldStdErrWr; ! ! SECURITY_ATTRIBUTES sAttrs; ! ! // Explicitly allow the handles to the pipes to be inherited. ! sAttrs.nLength = sizeof (SECURITY_ATTRIBUTES); ! sAttrs.bInheritHandle = 1; ! sAttrs.lpSecurityDescriptor = NULL; ! ! ! char tmpBuff[64]; ! if (CreatePipe (&cldStdInRd, &cldStdInWr, &sAttrs, 0) == 0) ! { ! sprintf (tmpBuff, ! "Error creating stdin pipe (Win32 Error Code: %lu)", ! GetLastError ()); ! throw new IOException (JvNewStringLatin1 (tmpBuff)); ! } ! ! if (CreatePipe (&cldStdOutRd, &cldStdOutWr, &sAttrs, 0) == 0) ! { ! sprintf (tmpBuff, ! "Error creating stdout pipe (Win32 Error Code: %lu)", ! GetLastError ()); ! throw new IOException (JvNewStringLatin1 (tmpBuff)); ! } ! ! if (CreatePipe (&cldStdErrRd, &cldStdErrWr, &sAttrs, 0) == 0) ! { ! sprintf (tmpBuff, ! "Error creating stderr pipe (Win32 Error Code: %lu)", ! GetLastError ()); ! throw new IOException (JvNewStringLatin1 (tmpBuff)); ! } ! ! outputStream = new FileOutputStream ! (new FileDescriptor ((jint) cldStdInWr)); ! inputStream = new FileInputStream ! (new FileDescriptor ((jint) cldStdOutRd)); ! errorStream = new FileInputStream ! (new FileDescriptor ((jint) cldStdErrRd)); // Now create the child process. PROCESS_INFORMATION pi; --- 278,293 ---- { // We create anonymous pipes to communicate with the child // on each of standard streams. + ChildProcessPipe aChildStdIn(ChildProcessPipe::INPUT); + ChildProcessPipe aChildStdOut(ChildProcessPipe::OUTPUT); + ChildProcessPipe aChildStdErr(ChildProcessPipe::OUTPUT); ! outputStream = new FileOutputStream (new FileDescriptor ( ! (jint) aChildStdIn.getParentHandle ())); ! inputStream = new FileInputStream (new FileDescriptor ( ! (jint) aChildStdOut.getParentHandle ())); ! errorStream = new FileInputStream (new FileDescriptor ( ! (jint) aChildStdErr.getParentHandle ())); // Now create the child process. PROCESS_INFORMATION pi; *************** java::lang::ConcreteProcess::startProces *** 250,288 **** // Explicitly specify the handles to the standard streams. si.dwFlags |= STARTF_USESTDHANDLES; ! si.hStdInput = cldStdInRd; ! si.hStdOutput = cldStdOutWr; ! si.hStdError = cldStdErrWr; if (CreateProcess (NULL, cmdLine, NULL, NULL, 1, ! 0, env, wdir, &si, &pi) == 0) { ! sprintf (tmpBuff, ! "Error creating child process (Win32 Error Code: %lu)", ! GetLastError ()); ! throw new IOException (JvNewStringLatin1 (tmpBuff)); } procHandle = (jint ) pi.hProcess; - // Close the wrong ends (for the parent) of the pipes. - CloseHandle (cldStdInRd); - CloseHandle (cldStdOutWr); - CloseHandle (cldStdErrWr); - _Jv_Free (cmdLine); if (env != NULL) _Jv_Free (env); - if (wdir != NULL) - _Jv_Free (wdir); } catch (java::lang::Throwable *thrown) { --- 301,336 ---- // Explicitly specify the handles to the standard streams. si.dwFlags |= STARTF_USESTDHANDLES; ! si.hStdInput = aChildStdIn.getChildHandle(); ! si.hStdOutput = aChildStdOut.getChildHandle(); ! si.hStdError = aChildStdErr.getChildHandle(); + // Spawn the process. CREATE_NO_WINDOW only applies when + // starting a console application; it suppresses the + // creation of a console window. This flag is ignored on + // Win9X. + if (CreateProcess (NULL, cmdLine, NULL, NULL, 1, ! CREATE_NO_WINDOW | CREATE_UNICODE_ENVIRONMENT, env, wdir, &si, &pi) == 0) { ! DWORD dwErrorCode = GetLastError (); ! throw new IOException ( ! _Jv_WinStrError (_T("Error creating child process"), dwErrorCode)); } procHandle = (jint ) pi.hProcess; _Jv_Free (cmdLine); if (env != NULL) _Jv_Free (env); } catch (java::lang::Throwable *thrown) { diff -Nrc3pad gcc-3.3.3/libjava/java/lang/Object.h gcc-3.4.0/libjava/java/lang/Object.h *** gcc-3.3.3/libjava/java/lang/Object.h 2001-12-14 18:43:53.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/Object.h 2003-10-21 04:46:19.000000000 +0000 *************** public: *** 49,54 **** --- 49,55 ---- friend void _Jv_MonitorExit (jobject obj); friend void _Jv_InitializeSyncMutex (void); friend void _Jv_FinalizeObject (jobject obj); + friend bool _Jv_ObjectCheckMonitor (jobject obj); #ifdef JV_MARKOBJ_DECL friend JV_MARKOBJ_DECL; diff -Nrc3pad gcc-3.3.3/libjava/java/lang/Package.java gcc-3.4.0/libjava/java/lang/Package.java *** gcc-3.3.3/libjava/java/lang/Package.java 2002-01-22 22:40:16.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/Package.java 2004-01-06 08:34:58.000000000 +0000 *************** *** 1,5 **** ! /* java.lang.Package - Everything you ever wanted to know about a package. ! Copyright (C) 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- ! /* Package.java -- information about a package ! Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** import java.util.StringTokenizer; *** 49,56 **** * section of the * Product Versioning Specification. * It also allows packages to be sealed with respect to the originating URL. ! *

            ! * The most useful method is the isCompatibleWith() method that * compares a desired version of a specification with the version of the * specification as implemented by a package. A package is considered * compatible with another version if the version of the specification is --- 49,56 ---- * section of the * Product Versioning Specification. * It also allows packages to be sealed with respect to the originating URL. ! * ! *

            The most useful method is the isCompatibleWith() method that * compares a desired version of a specification with the version of the * specification as implemented by a package. A package is considered * compatible with another version if the version of the specification is *************** import java.util.StringTokenizer; *** 63,70 **** * then the other version, etc. (If a version has no minor, micro, etc numbers * then they are considered the be 0.) * * @since 1.2 ! * @author Mark Wielaard (mark@klomp.org) */ public class Package { --- 63,73 ---- * then the other version, etc. (If a version has no minor, micro, etc numbers * then they are considered the be 0.) * + * @author Mark Wielaard + * @see ClassLoader#definePackage(String, String, String, String, String, + * String, String, URL) * @since 1.2 ! * @status updated to 1.4 */ public class Package { *************** public class Package *** 73,98 **** /** The name if the implementation */ final private String implTitle; /** The vendor that wrote this implementation */ final private String implVendor; /** The version of this implementation */ final private String implVersion; /** The name of the specification */ final private String specTitle; /** The name of the specification designer */ final private String specVendor; /** The version of this specification */ final private String specVersion; /** If sealed the origin of the package classes, otherwise null */ final private URL sealed; ! /** ! * A package local constructor for the Package class. ! * All parameters except the name of the package may be ! * null. ! * There are no public constructors defined for Package this is a package * local constructor that is used by java.lang.Classloader.definePackage(). * * @param name The name of the Package --- 76,104 ---- /** The name if the implementation */ final private String implTitle; + /** The vendor that wrote this implementation */ final private String implVendor; + /** The version of this implementation */ final private String implVersion; /** The name of the specification */ final private String specTitle; + /** The name of the specification designer */ final private String specVendor; + /** The version of this specification */ final private String specVersion; /** If sealed the origin of the package classes, otherwise null */ final private URL sealed; ! /** ! * A package local constructor for the Package class. All parameters except ! * the name of the package may be null. ! * There are no public constructors defined for Package; this is a package * local constructor that is used by java.lang.Classloader.definePackage(). * * @param name The name of the Package *************** public class Package *** 112,198 **** throw new IllegalArgumentException("null Package name"); this.name = name; - this.implTitle = implTitle; this.implVendor = implVendor; this.implVersion = implVersion; - this.specTitle = specTitle; this.specVendor = specVendor; this.specVersion = specVersion; - this.sealed = sealed; } ! /** ! * Returns the Package name. */ public String getName() { return name; } ! /** ! * Returns the name of the implementation or null if unknown. */ ! public String getImplementationTitle() { ! return implTitle; } ! /** ! * Returns the vendor that wrote this implementation or null if unknown. */ ! public String getImplementationVendor() { ! return implVendor; } ! /** ! * Returns the version of this implementation or null if unknown. */ ! public String getImplementationVersion() { ! return implVersion; } ! /** ! * Returns the name of the specification or null if unknown. */ ! public String getSpecificationTitle() { ! return specTitle; } ! /** ! * Returns the name of the specification designer or null if unknown. */ ! public String getSpecificationVendor() { ! return specVendor; } ! /** ! * Returns the version of the specification or null if unknown. */ ! public String getSpecificationVersion() { ! return specVersion; } ! /** * Returns true if this Package is sealed. */ public boolean isSealed() { ! return (sealed != null); } ! /** * Returns true if this Package is sealed and the origin of the classes is * the given URL. ! * ! * @param url */ public boolean isSealed(URL url) { --- 118,219 ---- throw new IllegalArgumentException("null Package name"); this.name = name; this.implTitle = implTitle; this.implVendor = implVendor; this.implVersion = implVersion; this.specTitle = specTitle; this.specVendor = specVendor; this.specVersion = specVersion; this.sealed = sealed; } ! /** ! * Returns the Package name in dot-notation. ! * ! * @return the non-null package name */ public String getName() { return name; } ! /** ! * Returns the name of the specification, or null if unknown. ! * ! * @return the specification title */ ! public String getSpecificationTitle() { ! return specTitle; } ! /** ! * Returns the version of the specification, or null if unknown. ! * ! * @return the specification version */ ! public String getSpecificationVersion() { ! return specVersion; } ! /** ! * Returns the name of the specification designer, or null if unknown. ! * ! * @return the specification vendor */ ! public String getSpecificationVendor() { ! return specVendor; } ! /** ! * Returns the name of the implementation, or null if unknown. ! * ! * @return the implementation title */ ! public String getImplementationTitle() { ! return implTitle; } ! /** ! * Returns the version of this implementation, or null if unknown. ! * ! * @return the implementation version */ ! public String getImplementationVersion() { ! return implVersion; } ! /** ! * Returns the vendor that wrote this implementation, or null if unknown. ! * ! * @return the implementation vendor */ ! public String getImplementationVendor() { ! return implVendor; } ! /** * Returns true if this Package is sealed. + * + * @return true if the package is sealed */ public boolean isSealed() { ! return sealed != null; } ! /** * Returns true if this Package is sealed and the origin of the classes is * the given URL. ! * ! * @param url the URL to test ! * @return true if the package is sealed by this URL ! * @throws NullPointerException if url is null */ public boolean isSealed(URL url) { *************** public class Package *** 201,236 **** /** * Checks if the version of the specification is higher or at least as high ! * as the desired version. * @param version the (minimal) desired version of the specification ! * @exception NumberFormatException when either version or the ! * specification version is not a correctly formatted version number ! * @exception NullPointerException if the supplied version or the ! * Package specification version is null. */ ! public boolean isCompatibleWith(String version) throws NumberFormatException { StringTokenizer versionTokens = new StringTokenizer(version, "."); StringTokenizer specTokens = new StringTokenizer(specVersion, "."); try { ! while (versionTokens.hasMoreElements()) ! { ! int vers = Integer.parseInt(versionTokens.nextToken()); ! int spec = Integer.parseInt(specTokens.nextToken()); ! if (spec < vers) ! return false; ! else if (spec > vers) ! return true; ! // They must be equal, next Token please! ! } } catch (NoSuchElementException e) { ! // this must have been thrown by spec.netToken() so return false ! return false; } - // They must have been exactly the same version. // Or the specVersion has more subversions. That is also good. return true; --- 222,257 ---- /** * Checks if the version of the specification is higher or at least as high ! * as the desired version. Comparison is done by sequentially comparing ! * dotted decimal numbers from the parameter and from ! * getSpecificationVersion. ! * * @param version the (minimal) desired version of the specification ! * @throws NumberFormatException if either version string is invalid ! * @throws NullPointerException if either version string is null */ ! public boolean isCompatibleWith(String version) { StringTokenizer versionTokens = new StringTokenizer(version, "."); StringTokenizer specTokens = new StringTokenizer(specVersion, "."); try { ! while (versionTokens.hasMoreElements()) ! { ! int vers = Integer.parseInt(versionTokens.nextToken()); ! int spec = Integer.parseInt(specTokens.nextToken()); ! if (spec < vers) ! return false; ! else if (spec > vers) ! return true; ! // They must be equal, next Token please! ! } } catch (NoSuchElementException e) { ! // This must have been thrown by spec.nextToken() so return false. ! return false; } // They must have been exactly the same version. // Or the specVersion has more subversions. That is also good. return true; *************** public class Package *** 241,298 **** * It may return null if the package is unknown, when there is no * information on that particular package available or when the callers * classloader is null. * @param name the name of the desired package */ public static Package getPackage(String name) { // Get the caller's classloader ! SecurityManager sm = System.getSecurityManager(); ! Class c = sm.getClassContext()[1]; ! ClassLoader cl = c.getClassLoader(); ! ! if (cl != null) ! return cl.getPackage(name); ! else ! return null; } /** * Returns all the packages that are known to the callers class loader. * It may return an empty array if the classloader of the caller is null. */ public static Package[] getPackages() { // Get the caller's classloader ! SecurityManager sm = System.getSecurityManager(); ! Class c = sm.getClassContext()[1]; ClassLoader cl = c.getClassLoader(); ! ! if (cl != null) ! return cl.getPackages(); ! else ! return new Package[0]; } ! /** * Returns the hashCode of the name of this package. */ public int hashCode() { return name.hashCode(); } ! /** ! * Returns a string representation of this package name, specification, ! * implementation and class origin if sealed. */ public String toString() { ! return "package: " + name + ! " spec: " + specTitle + ! " version: " + specVersion + ! " vendor: " + specVendor + ! " implementation: " + implTitle + ! " version: " + implVersion + ! " vendor: " + implVendor + " sealed: " + sealed; } ! } --- 262,316 ---- * It may return null if the package is unknown, when there is no * information on that particular package available or when the callers * classloader is null. + * * @param name the name of the desired package + * @return the package by that name in the current ClassLoader */ public static Package getPackage(String name) { // Get the caller's classloader ! ClassLoader cl = VMSecurityManager.currentClassLoader(); ! return cl != null ? cl.getPackage(name) : null; } /** * Returns all the packages that are known to the callers class loader. * It may return an empty array if the classloader of the caller is null. + * + * @return an array of all known packages */ public static Package[] getPackages() { // Get the caller's classloader ! Class c = VMSecurityManager.getClassContext()[1]; ClassLoader cl = c.getClassLoader(); ! // Sun's implementation returns the packages loaded by the bootstrap ! // classloader if cl is null, but right now our bootstrap classloader ! // does not create any Packages. ! return cl != null ? cl.getPackages() : new Package[0]; } ! /** * Returns the hashCode of the name of this package. + * + * @return the hash code */ public int hashCode() { return name.hashCode(); } ! /** ! * Returns a string representation of this package. It is specified to ! * be "package " + getName() + (getSpecificationTitle() == null ! * ? "" : ", " + getSpecificationTitle()) + (getSpecificationVersion() ! * == null ? "" : ", version " + getSpecificationVersion()). ! * ! * @return the string representation of the package */ public String toString() { ! return ("package " + name + (specTitle == null ? "" : ", " + specTitle) ! + (specVersion == null ? "" : ", version " + specVersion)); } ! } // class Package diff -Nrc3pad gcc-3.3.3/libjava/java/lang/Process.java gcc-3.4.0/libjava/java/lang/Process.java *** gcc-3.3.3/libjava/java/lang/Process.java 2002-06-15 19:45:31.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/Process.java 2003-03-19 12:15:04.000000000 +0000 *************** *** 1,5 **** /* Process.java - Represent spawned system process ! Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Process.java - Represent spawned system process ! Copyright (C) 1998, 1999, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** public abstract class Process *** 107,113 **** * immediately returns with the exit value of the subprocess. * * @return the subprocess exit value; 0 conventionally denotes success ! * @throws InterruptedException if another thread interrups the blocked one */ public abstract int waitFor() throws InterruptedException; --- 107,113 ---- * immediately returns with the exit value of the subprocess. * * @return the subprocess exit value; 0 conventionally denotes success ! * @throws InterruptedException if another thread interrupts the blocked one */ public abstract int waitFor() throws InterruptedException; diff -Nrc3pad gcc-3.3.3/libjava/java/lang/ref/natReference.cc gcc-3.4.0/libjava/java/lang/ref/natReference.cc *** gcc-3.3.3/libjava/java/lang/ref/natReference.cc 2002-11-19 21:59:41.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/ref/natReference.cc 2003-09-29 21:13:55.000000000 +0000 *************** *** 1,6 **** // natReference.cc - Native code for References ! /* Copyright (C) 2001, 2002 Free Software Foundation This file is part of libgcj. --- 1,6 ---- // natReference.cc - Native code for References ! /* Copyright (C) 2001, 2002, 2003 Free Software Foundation This file is part of libgcj. *************** static int hash_count = 0; *** 67,72 **** --- 67,74 ---- // Number of slots total in HASH. Must be power of 2. static int hash_size = 0; + #define DELETED_REFERENCE ((jobject) -1) + static object_list * find_slot (jobject key) { *************** find_slot (jobject key) *** 89,95 **** return &hash[deleted_index]; } else if (ptr->weight == DELETED) ! deleted_index = index; index = (index + step) & (hash_size - 1); JvAssert (index != start_index); } --- 91,100 ---- return &hash[deleted_index]; } else if (ptr->weight == DELETED) ! { ! deleted_index = index; ! JvAssert (ptr->reference == DELETED_REFERENCE); ! } index = (index + step) & (hash_size - 1); JvAssert (index != start_index); } *************** remove_from_hash (jobject obj) *** 132,137 **** --- 137,147 ---- java::lang::ref::Reference *ref = reinterpret_cast (obj); object_list *head = find_slot (ref->copy); + + // We might have found a new slot. We can just ignore that here. + if (head->reference != ref->copy) + return; + object_list **link = &head->next; head = head->next; *************** remove_from_hash (jobject obj) *** 149,154 **** --- 159,177 ---- } } + // Return list head if object is in hash, NULL otherwise. + object_list * + in_hash (jobject obj) + { + // The hash table might not yet be initialized. + if (hash == NULL) + return NULL; + object_list *head = find_slot (obj); + if (head->reference != obj) + return NULL; + return head; + } + // FIXME what happens if an object's finalizer creates a Reference to // the object, and the object has never before been added to the hash? // Madness! *************** add_to_hash (java::lang::ref::Reference *** 168,174 **** // Use `copy' here because the `referent' field has been cleared. jobject referent = the_reference->copy; object_list *item = find_slot (referent); ! if (item->reference == NULL) { // New item, so make an entry for the finalizer. item->reference = referent; --- 191,197 ---- // Use `copy' here because the `referent' field has been cleared. jobject referent = the_reference->copy; object_list *item = find_slot (referent); ! if (item->reference == NULL || item->reference == DELETED_REFERENCE) { // New item, so make an entry for the finalizer. item->reference = referent; *************** add_to_hash (java::lang::ref::Reference *** 202,207 **** --- 225,253 ---- *link = n; } + // Add a FINALIZE entry if one doesn't exist. + static void + maybe_add_finalize (object_list *entry, jobject obj) + { + object_list **link = &entry->next; + object_list *iter = *link; + while (iter && iter->weight < FINALIZE) + { + link = &iter->next; + iter = *link; + } + + // We want at most one FINALIZE entry in the queue. + if (iter && iter->weight == FINALIZE) + return; + + object_list *n = (object_list *) _Jv_Malloc (sizeof (object_list)); + n->reference = obj; + n->weight = FINALIZE; + n->next = *link; + *link = n; + } + // This is called when an object is ready to be finalized. This // actually implements the appropriate Reference semantics. static void *************** finalize_referred_to_object (jobject obj *** 217,222 **** --- 263,269 ---- // run, all the object's references have been processed, and the // object is unreachable. There is, at long last, no way to // resurrect it. + list->reference = DELETED_REFERENCE; list->weight = DELETED; --hash_count; return; *************** finalize_referred_to_object (jobject obj *** 225,240 **** enum weight w = head->weight; if (w == FINALIZE) { // If we have a Reference A to a Reference B, and B is // finalized, then we have to take special care to make sure // that B is properly deregistered. This is super gross. FIXME // will it fail if B's finalizer resurrects B? if (java::lang::ref::Reference::class$.isInstance (obj)) finalize_reference (obj); else _Jv_FinalizeObject (obj); - list->next = head->next; - _Jv_Free (head); } else if (w != SOFT || _Jv_GCCanReclaimSoftReference (obj)) { --- 272,292 ---- enum weight w = head->weight; if (w == FINALIZE) { + // Update the list first, as _Jv_FinalizeString might end up + // looking at this data structure. + list->next = head->next; + _Jv_Free (head); + // If we have a Reference A to a Reference B, and B is // finalized, then we have to take special care to make sure // that B is properly deregistered. This is super gross. FIXME // will it fail if B's finalizer resurrects B? if (java::lang::ref::Reference::class$.isInstance (obj)) finalize_reference (obj); + else if (obj->getClass() == &java::lang::String::class$) + _Jv_FinalizeString (obj); else _Jv_FinalizeObject (obj); } else if (w != SOFT || _Jv_GCCanReclaimSoftReference (obj)) { *************** finalize_referred_to_object (jobject obj *** 247,255 **** { java::lang::ref::Reference *ref = reinterpret_cast (head->reference); ! // If the copy is already NULL then the user must have ! // called Reference.clear(). ! if (ref->copy != NULL) ref->enqueue (); object_list *next = head->next; --- 299,305 ---- { java::lang::ref::Reference *ref = reinterpret_cast (head->reference); ! if (! ref->cleared) ref->enqueue (); object_list *next = head->next; *************** finalize_reference (jobject ref) *** 278,283 **** --- 328,350 ---- } void + _Jv_RegisterStringFinalizer (jobject str) + { + // This function might be called before any other Reference method, + // so we must ensure the class is initialized. + _Jv_InitClass (&java::lang::ref::Reference::class$); + JvSynchronize sync (java::lang::ref::Reference::lock); + // If the object is in our hash table, then we might need to add a + // new FINALIZE entry. Otherwise, we just register an ordinary + // finalizer. + object_list *entry = in_hash (str); + if (entry) + maybe_add_finalize (entry, str); + else + _Jv_RegisterFinalizer ((void *) str, _Jv_FinalizeString); + } + + void ::java::lang::ref::Reference::create (jobject ref) { // Nothing says you can't make a Reference with a NULL referent. diff -Nrc3pad gcc-3.3.3/libjava/java/lang/ref/Reference.java gcc-3.4.0/libjava/java/lang/ref/Reference.java *** gcc-3.3.3/libjava/java/lang/ref/Reference.java 2002-11-19 21:59:40.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/ref/Reference.java 2003-09-20 02:57:07.000000000 +0000 *************** *** 1,5 **** /* java.lang.ref.Reference ! Copyright (C) 1999, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* java.lang.ref.Reference ! Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** package java.lang.ref; *** 40,46 **** /** * This is the base class of all references. A reference allows ! * refering to an object without preventing the garbage collection to * collect it. The only way to get the referred object is via the * get()-method. This method will return * null if the object was collected.
            --- 40,46 ---- /** * This is the base class of all references. A reference allows ! * refering to an object without preventing the garbage collector to * collect it. The only way to get the referred object is via the * get()-method. This method will return * null if the object was collected.
            *************** package java.lang.ref; *** 52,62 **** * There are currently three types of references: soft reference, * weak reference and phantom reference.
            * ! * Soft references will be cleared if the garbage collection is told * to free some memory and there are no unreferenced or weakly referenced * objects. It is useful for caches.
            * ! * Weak references will be cleared as soon as the garbage collection * determines that the refered object is only weakly reachable. They * are useful as keys in hashtables (see WeakHashtable) as * you get notified when nobody has the key anymore. --- 52,62 ---- * There are currently three types of references: soft reference, * weak reference and phantom reference.
            * ! * Soft references will be cleared if the garbage collector is told * to free some memory and there are no unreferenced or weakly referenced * objects. It is useful for caches.
            * ! * Weak references will be cleared as soon as the garbage collector * determines that the refered object is only weakly reachable. They * are useful as keys in hashtables (see WeakHashtable) as * you get notified when nobody has the key anymore. *************** public abstract class Reference *** 74,80 **** { /** * The underlying object. This field is handled in a special way by ! * the garbage collection. * GCJ LOCAL: * This is a RawData because it must be disguised from the GC. * END GCJ LOCAL --- 74,80 ---- { /** * The underlying object. This field is handled in a special way by ! * the garbage collector. * GCJ LOCAL: * This is a RawData because it must be disguised from the GC. * END GCJ LOCAL *************** public abstract class Reference *** 83,97 **** /** * This is like REFERENT but is not scanned by the GC. We keep a ! * copy around so that we can see when clear() has been called. * GCJ LOCAL: ! * This field doesn't exist in Classpath; we use it to detect ! * clearing. * END GCJ LOCAL */ gnu.gcj.RawData copy; /** * The queue this reference is registered on. This is null, if this * wasn't registered to any queue or reference was already enqueued. */ --- 83,107 ---- /** * This is like REFERENT but is not scanned by the GC. We keep a ! * copy around so that we can clean up our internal data structure ! * even after clear() is called. * GCJ LOCAL: ! * This field doesn't exist in Classpath. * END GCJ LOCAL */ gnu.gcj.RawData copy; /** + * Set to true if {@link #clear()} is called. + * GCJ LOCAL: + * This field doesn't exist in Classpath. It is used internally in + * natReference.cc, which enqueues the reference unless it is true + * (has been cleared). + * END GCJ LOCAL + */ + boolean cleared = false; + + /** * The queue this reference is registered on. This is null, if this * wasn't registered to any queue or reference was already enqueued. */ *************** public abstract class Reference *** 107,113 **** Reference nextOnQueue; /** ! * This lock should be taken by the garbage collection, before * determining reachability. It will prevent the get()-method to * return the reference so that reachability doesn't change. */ --- 117,123 ---- Reference nextOnQueue; /** ! * This lock should be taken by the garbage collector, before * determining reachability. It will prevent the get()-method to * return the reference so that reachability doesn't change. */ *************** public abstract class Reference *** 152,158 **** */ public Object get() { ! synchronized(lock) { return referent; } --- 162,168 ---- */ public Object get() { ! synchronized (lock) { return referent; } *************** public abstract class Reference *** 161,173 **** /** * Clears the reference, so that it doesn't refer to its object * anymore. For soft and weak references this is called by the ! * garbage collection. For phantom references you should call * this when enqueuing the reference. */ public void clear() { ! referent = null; ! copy = null; } /** --- 171,187 ---- /** * Clears the reference, so that it doesn't refer to its object * anymore. For soft and weak references this is called by the ! * garbage collector. For phantom references you should call * this when enqueuing the reference. */ public void clear() { ! // Must synchronize so changes are visible in finalizer thread. ! synchronized (lock) ! { ! referent = null; ! cleared = true; ! } } /** *************** public abstract class Reference *** 181,187 **** /** * Enqueue an object on a reference queue. This is normally executed ! * by the garbage collection. */ public boolean enqueue() { --- 195,201 ---- /** * Enqueue an object on a reference queue. This is normally executed ! * by the garbage collector. */ public boolean enqueue() { diff -Nrc3pad gcc-3.3.3/libjava/java/lang/reflect/AccessibleObject.java gcc-3.4.0/libjava/java/lang/reflect/AccessibleObject.java *** gcc-3.3.3/libjava/java/lang/reflect/AccessibleObject.java 2002-01-22 22:40:20.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/reflect/AccessibleObject.java 2003-10-26 02:28:45.000000000 +0000 *************** public class AccessibleObject *** 59,66 **** { /** * True if this object is marked accessible, which means the reflected ! * object bypasses normal security checks. NOTEDon't try messing ! * with this by reflection. You'll mess yourself up. */ // default visibility for use by inherited classes boolean flag = false; --- 59,65 ---- { /** * True if this object is marked accessible, which means the reflected ! * object bypasses normal security checks. */ // default visibility for use by inherited classes boolean flag = false; *************** public class AccessibleObject *** 88,106 **** * security check. If a security manager exists, it is checked for * ReflectPermission("suppressAccessChecks").

            * ! * If flag is true, and the initial security check succeeds, ! * this can still fail if a forbidden object is encountered, leaving the ! * array half-modified. At the moment, the forbidden members are:
            ! *

              ! *
            • Any Constructor for java.lang.Class
            • ! *
            • Any AccessibleObject for java.lang.reflect.AccessibleObject ! * (this is not specified by Sun, but it closes a big security hole ! * where you can use reflection to bypass the security checks that ! * reflection is supposed to provide)
            • ! *
            ! * (Sun has not specified others, but good candidates might include ! * ClassLoader, String, and such. However, the more checks we do, the ! * slower this method gets). * * @param array the array of accessible objects * @param flag the desired state of accessibility, true to bypass security --- 87,97 ---- * security check. If a security manager exists, it is checked for * ReflectPermission("suppressAccessChecks").

            * ! * It is forbidden to set the accessibility flag to true on any constructor ! * for java.lang.Class. This will result in a SecurityException. If the ! * SecurityException is thrown for any of the passed AccessibleObjects, ! * the accessibility flag will be set on AccessibleObjects in the array prior ! * to the one which resulted in the exception. * * @param array the array of accessible objects * @param flag the desired state of accessibility, true to bypass security *************** public class AccessibleObject *** 121,139 **** * manager exists, it is checked for * ReflectPermission("suppressAccessChecks").

            * ! * If flag is true, and the initial security check succeeds, ! * this will still fail for a forbidden object. At the moment, the ! * forbidden members are:
            ! *

              ! *
            • Any Constructor for java.lang.Class
            • ! *
            • Any AccessibleObject for java.lang.reflect.AccessibleObject ! * (this is not specified by Sun, but it closes a big security hole ! * where you can use reflection to bypass the security checks that ! * reflection is supposed to provide)
            • ! *
            ! * (Sun has not specified others, but good candidates might include ! * ClassLoader, String, and such. However, the more checks we do, the ! * slower this method gets). * * @param flag the desired state of accessibility, true to bypass security * @throws NullPointerException if array is null --- 112,119 ---- * manager exists, it is checked for * ReflectPermission("suppressAccessChecks").

            * ! * It is forbidden to set the accessibility flag to true on any constructor for ! * java.lang.Class. This will result in a SecurityException. * * @param flag the desired state of accessibility, true to bypass security * @throws NullPointerException if array is null *************** public class AccessibleObject *** 165,179 **** * after calling checkPermission. * * @param flag the desired status ! * @throws SecurityException if flag is true and this is one of the ! * forbidden members mentioned in {@link setAccessible(boolean)}. */ private final void secureSetAccessible(boolean flag) { if (flag && ! ((this instanceof Constructor ! && ((Constructor) this).getDeclaringClass() == Class.class) ! || ((Member) this).getDeclaringClass() == AccessibleObject.class)) throw new SecurityException("Cannot make object accessible: " + this); this.flag = flag; } --- 145,158 ---- * after calling checkPermission. * * @param flag the desired status ! * @throws SecurityException if flag is true and this is a constructor ! * for java.lang.Class. */ private final void secureSetAccessible(boolean flag) { if (flag && ! (this instanceof Constructor ! && ((Constructor) this).getDeclaringClass() == Class.class)) throw new SecurityException("Cannot make object accessible: " + this); this.flag = flag; } diff -Nrc3pad gcc-3.3.3/libjava/java/lang/reflect/Array.java gcc-3.4.0/libjava/java/lang/reflect/Array.java *** gcc-3.3.3/libjava/java/lang/reflect/Array.java 2000-03-07 19:55:26.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/reflect/Array.java 2004-01-07 18:46:18.000000000 +0000 *************** *** 1,48 **** ! // FileDescriptor.java - Open file or device ! /* Copyright (C) 1999 Free Software Foundation ! This file is part of libgcj. - This software is copyrighted work licensed under the terms of the - Libgcj License. Please consult the file "LIBGCJ_LICENSE" for - details. */ package java.lang.reflect; /** * @author Per Bothner ! * @date january 12, 1999 ! */ ! ! /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3. ! * Status: Believe complete and correct. */ - public final class Array { ! Array () { } public static native Object newInstance(Class componentType, int length); public static native Object newInstance(Class elementType, int[] dimensions); - public static native int getLength (Object array); ! public static native Object get (Object array, int index); ! public static native char getChar (Object array, int index); ! public static native byte getByte (Object array, int index); ! public static native short getShort (Object array, int index); ! public static native int getInt (Object array, int index); ! public static native long getLong (Object array, int index); ! public static native float getFloat (Object array, int index); ! public static native double getDouble (Object array, int index); ! public static native boolean getBoolean (Object array, int index); ! private static native Class getElementType (Object array, int index); ! private static native void set (Object array, int index, Object value, Class elType); ! public static void set (Object array, int index, Object value) { Class elType = getElementType(array, index); if (! elType.isPrimitive()) --- 1,317 ---- ! /* java.lang.reflect.Array - manipulate arrays by reflection ! Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation, Inc. ! This file is part of GNU Classpath. ! GNU Classpath is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! GNU Classpath is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with GNU Classpath; see the file COPYING. If not, write to the ! Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ! 02111-1307 USA. ! ! Linking this library statically or dynamically with other modules is ! making a combined work based on this library. Thus, the terms and ! conditions of the GNU General Public License cover the whole ! combination. ! ! As a special exception, the copyright holders of this library give you ! permission to link this library with independent modules to produce an ! executable, regardless of the license terms of these independent ! modules, and to copy and distribute the resulting executable under ! terms of your choice, provided that you also meet, for each linked ! independent module, the terms and conditions of the license of that ! module. An independent module is a module which is not derived from ! or based on this library. If you modify this library, you may extend ! this exception to your version of the library, but you are not ! obligated to do so. If you do not wish to do so, delete this ! exception statement from your version. */ package java.lang.reflect; + import gnu.classpath.Configuration; + /** + * Array holds static helper functions that allow you to create and + * manipulate arrays by reflection. Operations know how to perform widening + * conversions, but throw {@link IllegalArgumentException} if you attempt + * a narrowing conversion. Also, when accessing primitive arrays, this + * class performs object wrapping and unwrapping as necessary.

            + * + * Note: This class returns and accepts types as Classes, even + * primitive types; there are Class types defined that represent each + * different primitive type. They are java.lang.Boolean.TYPE, + * java.lang.Byte.TYPE,, also available as boolean.class, + * byte.class, etc. These are not to be confused with the + * classes java.lang.Boolean, java.lang.Byte, etc., which are + * real classes. Note also that the shorthand Object[].class + * is a convenient way to get array Classes.

            + * + * Performance note: This class performs best when it does not have + * to convert primitive types. The further along the chain it has to convert, + * the worse performance will be. You're best off using the array as whatever + * type it already is, and then converting the result. You will do even + * worse if you do this and use the generic set() function. + * + * @author John Keiser + * @author Eric Blake * @author Per Bothner ! * @see java.lang.Boolean#TYPE ! * @see java.lang.Byte#TYPE ! * @see java.lang.Short#TYPE ! * @see java.lang.Character#TYPE ! * @see java.lang.Integer#TYPE ! * @see java.lang.Long#TYPE ! * @see java.lang.Float#TYPE ! * @see java.lang.Double#TYPE ! * @since 1.1 ! * @status updated to 1.4 */ public final class Array { ! static ! { ! if (Configuration.INIT_LOAD_LIBRARY) ! { ! System.loadLibrary("javalangreflect"); ! } ! } ! ! /** ! * This class is uninstantiable. ! */ ! private Array() ! { ! } + /** + * Creates a new single-dimensioned array. + * @param componentType the type of the array to create + * @param length the length of the array to create + * @return the created array, cast to an Object + * @throws NullPointerException if componentType is null + * @throws IllegalArgumentException if componentType is + * Void.TYPE + * @throws NegativeArraySizeException when length is less than 0 + * @throws OutOfMemoryError if memory allocation fails + */ public static native Object newInstance(Class componentType, int length); + + /** + * Creates a new multi-dimensioned array. The new array has the same + * component type as the argument class, and the number of dimensions + * in the new array is the sum of the dimensions of the argument class + * and the length of the argument dimensions. Virtual Machine limitations + * forbid too many dimensions (usually 255 is the maximum); but even + * 50 dimensions of 2 elements in each dimension would exceed your memory + * long beforehand! + * + * @param componentType the type of the array to create. + * @param dimensions the dimensions of the array to create. Each element + * in dimensions makes another dimension of the new + * array. Thus, Array.newInstance(java.lang.Boolean, + * new int[]{1,2,3}) is the same as + * new java.lang.Boolean[1][2][3] + * @return the created array, cast to an Object + * @throws NullPointerException if componentType or dimension is null + * @throws IllegalArgumentException if the the size of + * dimensions is 0 or exceeds the maximum number of + * array dimensions in the VM; or if componentType is Void.TYPE + * @throws NegativeArraySizeException when any of the dimensions is less + * than 0 + * @throws OutOfMemoryError if memory allocation fails + */ public static native Object newInstance(Class elementType, int[] dimensions); ! /** ! * Gets the array length. ! * @param array the array ! * @return the length of the array ! * @throws IllegalArgumentException if array is not an array ! * @throws NullPointerException if array is null ! */ ! public static native int getLength(Object array); ! /** ! * Gets an element of an array. Primitive elements will be wrapped in ! * the corresponding class type. ! * ! * @param array the array to access ! * @param index the array index to access ! * @return the element at array[index] ! * @throws IllegalArgumentException if array is not an array ! * @throws NullPointerException if array is null ! * @throws ArrayIndexOutOfBoundsException if index is out of ! * bounds ! * @see #getBoolean(Object, int) ! * @see #getByte(Object, int) ! * @see #getChar(Object, int) ! * @see #getShort(Object, int) ! * @see #getInt(Object, int) ! * @see #getLong(Object, int) ! * @see #getFloat(Object, int) ! * @see #getDouble(Object, int) ! */ ! public static native Object get(Object array, int index); ! /** ! * Gets an element of a boolean array. ! * ! * @param array the array to access ! * @param index the array index to access ! * @return the boolean element at array[index] ! * @throws IllegalArgumentException if array is not a boolean ! * array ! * @throws NullPointerException if array is null ! * @throws ArrayIndexOutOfBoundsException if index is out of ! * bounds ! * @see #get(Object, int) ! */ ! public static native boolean getBoolean(Object array, int index); ! ! /** ! * Gets an element of a byte array. ! * ! * @param array the array to access ! * @param index the array index to access ! * @return the byte element at array[index] ! * @throws IllegalArgumentException if array is not a byte ! * array ! * @throws NullPointerException if array is null ! * @throws ArrayIndexOutOfBoundsException if index is out of ! * bounds ! * @see #get(Object, int) ! */ ! public static native byte getByte(Object array, int index); ! ! /** ! * Gets an element of a char array. ! * ! * @param array the array to access ! * @param index the array index to access ! * @return the char element at array[index] ! * @throws IllegalArgumentException if array is not a char ! * array ! * @throws NullPointerException if array is null ! * @throws ArrayIndexOutOfBoundsException if index is out of ! * bounds ! * @see #get(Object, int) ! */ ! public static native char getChar(Object array, int index); ! ! /** ! * Gets an element of a short array. ! * ! * @param array the array to access ! * @param index the array index to access ! * @return the short element at array[index] ! * @throws IllegalArgumentException if array is not a byte ! * or char array ! * @throws NullPointerException if array is null ! * @throws ArrayIndexOutOfBoundsException if index is out of ! * bounds ! * @see #get(Object, int) ! */ ! public static native short getShort(Object array, int index); ! ! /** ! * Gets an element of an int array. ! * ! * @param array the array to access ! * @param index the array index to access ! * @return the int element at array[index] ! * @throws IllegalArgumentException if array is not a byte, ! * char, short, or int array ! * @throws NullPointerException if array is null ! * @throws ArrayIndexOutOfBoundsException if index is out of ! * bounds ! * @see #get(Object, int) ! */ ! public static native int getInt(Object array, int index); ! ! /** ! * Gets an element of a long array. ! * ! * @param array the array to access ! * @param index the array index to access ! * @return the long element at array[index] ! * @throws IllegalArgumentException if array is not a byte, ! * char, short, int, or long array ! * @throws NullPointerException if array is null ! * @throws ArrayIndexOutOfBoundsException if index is out of ! * bounds ! * @see #get(Object, int) ! */ ! public static native long getLong(Object array, int index); ! ! /** ! * Gets an element of a float array. ! * ! * @param array the array to access ! * @param index the array index to access ! * @return the float element at array[index] ! * @throws IllegalArgumentException if array is not a byte, ! * char, short, int, long, or float array ! * @throws NullPointerException if array is null ! * @throws ArrayIndexOutOfBoundsException if index is out of ! * bounds ! * @see #get(Object, int) ! */ ! public static native float getFloat(Object array, int index); ! ! /** ! * Gets an element of a double array. ! * ! * @param array the array to access ! * @param index the array index to access ! * @return the double element at array[index] ! * @throws IllegalArgumentException if array is not a byte, ! * char, short, int, long, float, or double array ! * @throws NullPointerException if array is null ! * @throws ArrayIndexOutOfBoundsException if index is out of ! * bounds ! * @see #get(Object, int) ! */ ! public static native double getDouble(Object array, int index); ! ! private static native Class getElementType(Object array, int index); ! ! private static native void set(Object array, int index, Object value, Class elType); ! /** ! * Sets an element of an array. If the array is primitive, then the new ! * value is unwrapped and widened. ! * ! * @param array the array to set a value of ! * @param index the array index to set the value to ! * @param value the value to set ! * @throws IllegalArgumentException if array is not an array, ! * or the array is primitive and unwrapping value fails, or the ! * value is not assignable to the array component type ! * @throws NullPointerException if array is null, or if array is primitive ! * and value is null ! * @throws ArrayIndexOutOfBoundsException if index is out of ! * bounds ! * @see #setBoolean(Object, int, boolean) ! * @see #setByte(Object, int, byte) ! * @see #setChar(Object, int, char) ! * @see #setShort(Object, int, short) ! * @see #setInt(Object, int, int) ! * @see #setLong(Object, int, long) ! * @see #setFloat(Object, int, float) ! * @see #setDouble(Object, int, double) ! */ ! public static void set(Object array, int index, Object value) { Class elType = getElementType(array, index); if (! elType.isPrimitive()) *************** public final class Array *** 50,56 **** else if (value instanceof Byte) setByte(array, index, ((Byte) value).byteValue()); else if (value instanceof Short) ! setShort (array, index, ((Short) value).shortValue()); else if (value instanceof Integer) setInt(array, index, ((Integer) value).intValue()); else if (value instanceof Long) --- 319,325 ---- else if (value instanceof Byte) setByte(array, index, ((Byte) value).byteValue()); else if (value instanceof Short) ! setShort(array, index, ((Short) value).shortValue()); else if (value instanceof Integer) setInt(array, index, ((Integer) value).intValue()); else if (value instanceof Long) *************** public final class Array *** 67,78 **** throw new IllegalArgumentException(); } ! public static native void setByte (Object array, int index, byte value); ! public static native void setShort (Object array, int index, short value); ! public static native void setInt (Object array, int index, int value); ! public static native void setLong (Object array, int index, long value); ! public static native void setFloat (Object array, int index, float value); ! public static native void setDouble (Object array, int index, double value); ! public static native void setChar (Object array, int index, char value); public static native void setBoolean(Object array, int index, boolean value); } --- 336,458 ---- throw new IllegalArgumentException(); } ! /** ! * Sets an element of a boolean array. ! * ! * @param array the array to set a value of ! * @param index the array index to set the value to ! * @param value the value to set ! * @throws IllegalArgumentException if array is not a boolean ! * array ! * @throws NullPointerException if array is null ! * @throws ArrayIndexOutOfBoundsException if index is out of ! * bounds ! * @see #set(Object, int, Object) ! */ public static native void setBoolean(Object array, int index, boolean value); + + /** + * Sets an element of a byte array. + * + * @param array the array to set a value of + * @param index the array index to set the value to + * @param value the value to set + * @throws IllegalArgumentException if array is not a byte, + * short, int, long, float, or double array + * @throws NullPointerException if array is null + * @throws ArrayIndexOutOfBoundsException if index is out of + * bounds + * @see #set(Object, int, Object) + */ + public static native void setByte(Object array, int index, byte value); + + /** + * Sets an element of a char array. + * + * @param array the array to set a value of + * @param index the array index to set the value to + * @param value the value to set + * @throws IllegalArgumentException if array is not a char, + * int, long, float, or double array + * @throws NullPointerException if array is null + * @throws ArrayIndexOutOfBoundsException if index is out of + * bounds + * @see #set(Object, int, Object) + */ + public static native void setChar(Object array, int index, char value); + + /** + * Sets an element of a short array. + * + * @param array the array to set a value of + * @param index the array index to set the value to + * @param value the value to set + * @throws IllegalArgumentException if array is not a short, + * int, long, float, or double array + * @throws NullPointerException if array is null + * @throws ArrayIndexOutOfBoundsException if index is out of + * bounds + * @see #set(Object, int, Object) + */ + public static native void setShort(Object array, int index, short value); + + /** + * Sets an element of an int array. + * + * @param array the array to set a value of + * @param index the array index to set the value to + * @param value the value to set + * @throws IllegalArgumentException if array is not an int, + * long, float, or double array + * @throws NullPointerException if array is null + * @throws ArrayIndexOutOfBoundsException if index is out of + * bounds + * @see #set(Object, int, Object) + */ + public static native void setInt(Object array, int index, int value); + + /** + * Sets an element of a long array. + * + * @param array the array to set a value of + * @param index the array index to set the value to + * @param value the value to set + * @throws IllegalArgumentException if array is not a long, + * float, or double array + * @throws NullPointerException if array is null + * @throws ArrayIndexOutOfBoundsException if index is out of + * bounds + * @see #set(Object, int, Object) + */ + public static native void setLong(Object array, int index, long value); + + /** + * Sets an element of a float array. + * + * @param array the array to set a value of + * @param index the array index to set the value to + * @param value the value to set + * @throws IllegalArgumentException if array is not a float + * or double array + * @throws NullPointerException if array is null + * @throws ArrayIndexOutOfBoundsException if index is out of + * bounds + * @see #set(Object, int, Object) + */ + public static native void setFloat(Object array, int index, float value); + + /** + * Sets an element of a double array. + * + * @param array the array to set a value of + * @param index the array index to set the value to + * @param value the value to set + * @throws IllegalArgumentException if array is not a double + * array + * @throws NullPointerException if array is null + * @throws ArrayIndexOutOfBoundsException if index is out of + * bounds + * @see #set(Object, int, Object) + */ + public static native void setDouble(Object array, int index, double value); } diff -Nrc3pad gcc-3.3.3/libjava/java/lang/reflect/Constructor.java gcc-3.4.0/libjava/java/lang/reflect/Constructor.java *** gcc-3.3.3/libjava/java/lang/reflect/Constructor.java 2001-11-14 23:42:38.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/reflect/Constructor.java 2003-10-26 02:25:41.000000000 +0000 *************** *** 1,6 **** // Constructor.java - Represents a constructor for a class. ! /* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation This file is part of libgcj. --- 1,6 ---- // Constructor.java - Represents a constructor for a class. ! /* Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation This file is part of libgcj. *************** details. */ *** 11,98 **** package java.lang.reflect; /** ! * @author Tom Tromey ! * @date December 12, 1998 ! */ ! /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 ! * "The Java Language Specification", ISBN 0-201-63451-1 ! * plus online API docs for JDK 1.2 beta from http://www.javasoft.com. ! * Status: Incomplete: needs a private constructor, and ! * newInstance() needs to be written. */ - public final class Constructor extends AccessibleObject implements Member { ! public boolean equals (Object obj) ! { ! if (! (obj instanceof Constructor)) ! return false; ! Constructor c = (Constructor) obj; ! return declaringClass == c.declaringClass && offset == c.offset; ! } public Class getDeclaringClass () ! { ! return declaringClass; ! } ! ! public Class[] getExceptionTypes () ! { ! if (exception_types == null) ! getType(); ! return (Class[]) exception_types.clone(); ! } ! ! public native int getModifiers (); public String getName () { return declaringClass.getName(); } public Class[] getParameterTypes () ! { ! if (parameter_types == null) ! getType (); ! return (Class[]) parameter_types.clone(); ! } public int hashCode () ! { ! // FIXME. ! return getName().hashCode() + declaringClass.getName().hashCode(); ! } ! // Update cached values from method descriptor in class. ! private native void getType (); public native Object newInstance (Object[] args) throws InstantiationException, IllegalAccessException, ! IllegalArgumentException, InvocationTargetException; ! ! public String toString () ! { ! if (parameter_types == null) ! getType (); ! StringBuffer b = new StringBuffer (); ! Modifier.toString(getModifiers(), b); ! b.append(" "); ! Method.appendClassName (b, declaringClass); ! b.append("("); ! for (int i = 0; i < parameter_types.length; ++i) ! { ! Method.appendClassName (b, parameter_types[i]); ! if (i < parameter_types.length - 1) ! b.append(","); ! } ! b.append(")"); ! return b.toString(); ! } ! // Can't create these. ! private Constructor () ! { ! } // Declaring class. private Class declaringClass; --- 11,210 ---- package java.lang.reflect; /** ! * The Constructor class represents a constructor of a class. It also allows ! * dynamic creation of an object, via reflection. Invocation on Constructor ! * objects knows how to do widening conversions, but throws ! * {@link IllegalArgumentException} if a narrowing conversion would be ! * necessary. You can query for information on this Constructor regardless ! * of location, but construction access may be limited by Java language ! * access controls. If you can't do it in the compiler, you can't normally ! * do it here either.

            ! * ! * Note: This class returns and accepts types as Classes, even ! * primitive types; there are Class types defined that represent each ! * different primitive type. They are java.lang.Boolean.TYPE, ! * java.lang.Byte.TYPE,, also available as boolean.class, ! * byte.class, etc. These are not to be confused with the ! * classes java.lang.Boolean, java.lang.Byte, etc., which are ! * real classes.

            ! * ! * Also note that this is not a serializable class. It is entirely feasible ! * to make it serializable using the Externalizable interface, but this is ! * on Sun, not me. ! * ! * @author John Keiser ! * @author Eric Blake ! * @author Tom Tromey ! * @see Member ! * @see Class ! * @see java.lang.Class#getConstructor(Object[]) ! * @see java.lang.Class#getDeclaredConstructor(Object[]) ! * @see java.lang.Class#getConstructors() ! * @see java.lang.Class#getDeclaredConstructors() ! * @since 1.1 ! * @status updated to 1.4 */ public final class Constructor extends AccessibleObject implements Member { ! /** ! * This class is uninstantiable except from native code. ! */ ! private Constructor () ! { ! } + /** + * Gets the class that declared this constructor. + * @return the class that declared this member + */ public Class getDeclaringClass () ! { ! return declaringClass; ! } + /** + * Gets the name of this constructor (the non-qualified name of the class + * it was declared in). + * @return the name of this constructor + */ public String getName () { return declaringClass.getName(); } + /** + * Gets the modifiers this constructor uses. Use the Modifier + * class to interpret the values. A constructor can only have a subset of the + * following modifiers: public, private, protected. + * + * @return an integer representing the modifiers to this Member + * @see Modifier + */ + public native int getModifiers (); + + /** + * Get the parameter list for this constructor, in declaration order. If the + * constructor takes no parameters, returns a 0-length array (not null). + * + * @return a list of the types of the constructor's parameters + */ public Class[] getParameterTypes () ! { ! if (parameter_types == null) ! getType (); ! return (Class[]) parameter_types.clone(); ! } ! ! /** ! * Get the exception types this constructor says it throws, in no particular ! * order. If the constructor has no throws clause, returns a 0-length array ! * (not null). ! * ! * @return a list of the types in the constructor's throws clause ! */ ! public Class[] getExceptionTypes () ! { ! if (exception_types == null) ! getType(); ! return (Class[]) exception_types.clone(); ! } + /** + * Compare two objects to see if they are semantically equivalent. + * Two Constructors are semantically equivalent if they have the same + * declaring class and the same parameter list. + * + * @param o the object to compare to + * @return true if they are equal; false if not. + */ + public boolean equals (Object obj) + { + if (! (obj instanceof Constructor)) + return false; + Constructor c = (Constructor) obj; + return declaringClass == c.declaringClass && offset == c.offset; + } + + /** + * Get the hash code for the Constructor. + * + * @return the hash code for the object + */ public int hashCode () ! { ! // FIXME. ! return getName().hashCode() + declaringClass.getName().hashCode(); ! } ! /** ! * Get a String representation of the Constructor. A Constructor's String ! * representation is "<modifier> <classname>(<paramtypes>) ! * throws <exceptions>", where everything after ')' is omitted if ! * there are no exceptions.
            Example: ! * public java.io.FileInputStream(java.lang.Runnable) ! * throws java.io.FileNotFoundException ! * ! * @return the String representation of the Constructor ! */ ! public String toString () ! { ! if (parameter_types == null) ! getType (); ! StringBuffer b = new StringBuffer (); ! int mods = getModifiers(); ! if (mods != 0) ! { ! Modifier.toString(mods, b); ! b.append(" "); ! } ! Method.appendClassName (b, declaringClass); ! b.append("("); ! for (int i = 0; i < parameter_types.length; ++i) ! { ! Method.appendClassName (b, parameter_types[i]); ! if (i < parameter_types.length - 1) ! b.append(","); ! } ! b.append(")"); ! return b.toString(); ! } + /** + * Create a new instance by invoking the constructor. Arguments are + * automatically unwrapped and widened, if needed.

            + * + * If this class is abstract, you will get an + * InstantiationException. If the constructor takes 0 + * arguments, you may use null or a 0-length array for args.

            + * + * If this Constructor enforces access control, your runtime context is + * evaluated, and you may have an IllegalAccessException if + * you could not create this object in similar compiled code. If the class + * is uninitialized, you trigger class initialization, which may end in a + * ExceptionInInitializerError.

            + * + * Then, the constructor is invoked. If it completes normally, the return + * value will be the new object. If it completes abruptly, the exception is + * wrapped in an InvocationTargetException. + * + * @param args the arguments to the constructor + * @return the newly created object + * @throws IllegalAccessException if the constructor could not normally be + * called by the Java code (i.e. it is not public) + * @throws IllegalArgumentException if the number of arguments is incorrect; + * or if the arguments types are wrong even with a widening + * conversion + * @throws InstantiationException if the class is abstract + * @throws InvocationTargetException if the constructor throws an exception + * @throws ExceptionInInitializerError if construction triggered class + * initialization, which then failed + */ public native Object newInstance (Object[] args) throws InstantiationException, IllegalAccessException, ! IllegalArgumentException, InvocationTargetException; ! // Update cached values from method descriptor in class. ! private native void getType (); // Declaring class. private Class declaringClass; diff -Nrc3pad gcc-3.3.3/libjava/java/lang/reflect/Field.java gcc-3.4.0/libjava/java/lang/reflect/Field.java *** gcc-3.3.3/libjava/java/lang/reflect/Field.java 2001-10-24 18:06:48.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/reflect/Field.java 2003-07-21 01:54:06.000000000 +0000 *************** *** 1,4 **** ! /* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation This file is part of libgcj. --- 1,4 ---- ! /* Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation This file is part of libgcj. *************** package java.lang.reflect; *** 12,26 **** * @author Per Bothner * @date September 1998; February 1999. */ - /* Status: Mostly implemented. - * However, access checks are not implemented. See natField.cc for - * _Jv_CheckFieldAccessibility as well as the missing getCaller. - * Note that the idea is to have to compiler convert calls to - * setXXX(...) and getXXX(...) to setXXX(CALLER, ...) and getXXX(CALLER, ...), - * where CALLER is reference to the class that contains the calls to - * setXXX or getXXX. This is easy for the compiler, and replaces - * expensive stack and table searching with a constant. - */ public final class Field extends AccessibleObject implements Member { --- 12,17 ---- *************** public final class Field extends Accessi *** 39,50 **** } public boolean equals (Object fld) ! { ! if (! (fld instanceof Field)) ! return false; ! Field f = (Field) fld; ! return declaringClass == f.declaringClass && offset == f.offset; ! } public Class getDeclaringClass () { --- 30,41 ---- } public boolean equals (Object fld) ! { ! if (! (fld instanceof Field)) ! return false; ! Field f = (Field) fld; ! return declaringClass == f.declaringClass && offset == f.offset; ! } public Class getDeclaringClass () { *************** public final class Field extends Accessi *** 62,72 **** return (declaringClass.hashCode() ^ offset); } - // The idea is that the compiler will magically translate - // fld.getShort(obj) to fld.getShort(THISCLASS, obj). - // This makes checking assessiblity more efficient, - // since we don't have to do any stack-walking. - public boolean getBoolean (Object obj) throws IllegalArgumentException, IllegalAccessException { --- 53,58 ---- diff -Nrc3pad gcc-3.3.3/libjava/java/lang/reflect/Method.java gcc-3.4.0/libjava/java/lang/reflect/Method.java *** gcc-3.3.3/libjava/java/lang/reflect/Method.java 2001-08-24 17:24:44.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/reflect/Method.java 2003-10-25 06:55:21.000000000 +0000 *************** *** 1,6 **** // Method.java - Represent method of class or interface. ! /* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation This file is part of libgcj. --- 1,6 ---- // Method.java - Represent method of class or interface. ! /* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation This file is part of libgcj. *************** package java.lang.reflect; *** 13,55 **** import gnu.gcj.RawData; /** ! * @author Tom Tromey ! * @date December 12, 1998 ! */ ! /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 ! * "The Java Language Specification", ISBN 0-201-63451-1 ! * plus online API docs for JDK 1.2 beta from http://www.javasoft.com. ! * Status: Complete, but not correct: access checks aren't done. */ - public final class Method extends AccessibleObject implements Member { ! public boolean equals (Object obj) { - if (! (obj instanceof Method)) - return false; - Method m = (Method) obj; - return declaringClass == m.declaringClass && offset == m.offset; } public Class getDeclaringClass () { return declaringClass; } ! public Class[] getExceptionTypes () ! { ! if (exception_types == null) ! getType(); ! return (Class[]) exception_types.clone(); ! } public native int getModifiers (); ! public native String getName (); ! ! private native void getType (); public Class[] getParameterTypes () { if (parameter_types == null) --- 13,104 ---- import gnu.gcj.RawData; /** ! * The Method class represents a member method of a class. It also allows ! * dynamic invocation, via reflection. This works for both static and ! * instance methods. Invocation on Method objects knows how to do ! * widening conversions, but throws {@link IllegalArgumentException} if ! * a narrowing conversion would be necessary. You can query for information ! * on this Method regardless of location, but invocation access may be limited ! * by Java language access controls. If you can't do it in the compiler, you ! * can't normally do it here either.

            ! * ! * Note: This class returns and accepts types as Classes, even ! * primitive types; there are Class types defined that represent each ! * different primitive type. They are java.lang.Boolean.TYPE, ! * java.lang.Byte.TYPE,, also available as boolean.class, ! * byte.class, etc. These are not to be confused with the ! * classes java.lang.Boolean, java.lang.Byte, etc., which are ! * real classes.

            ! * ! * Also note that this is not a serializable class. It is entirely feasible ! * to make it serializable using the Externalizable interface, but this is ! * on Sun, not me. ! * ! * @author John Keiser ! * @author Eric Blake ! * @author Tom Tromey ! * @see Member ! * @see Class ! * @see java.lang.Class#getMethod(String,Object[]) ! * @see java.lang.Class#getDeclaredMethod(String,Object[]) ! * @see java.lang.Class#getMethods() ! * @see java.lang.Class#getDeclaredMethods() ! * @since 1.1 ! * @status updated to 1.4 */ public final class Method extends AccessibleObject implements Member { ! /** ! * This class is uninstantiable. ! */ ! private Method () { } + /** + * Gets the class that declared this method, or the class where this method + * is a non-inherited member. + * @return the class that declared this member + */ public Class getDeclaringClass () { return declaringClass; } ! /** ! * Gets the name of this method. ! * @return the name of this method ! */ ! public native String getName (); + /** + * Gets the modifiers this method uses. Use the Modifier + * class to interpret the values. A method can only have a subset of the + * following modifiers: public, private, protected, abstract, static, + * final, synchronized, native, and strictfp. + * + * @return an integer representing the modifiers to this Member + * @see Modifier + */ public native int getModifiers (); ! /** ! * Gets the return type of this method. ! * @return the type of this method ! */ ! public Class getReturnType () ! { ! if (return_type == null) ! getType(); ! return return_type; ! } + /** + * Get the parameter list for this method, in declaration order. If the + * method takes no parameters, returns a 0-length array (not null). + * + * @return a list of the types of the method's parameters + */ public Class[] getParameterTypes () { if (parameter_types == null) *************** public final class Method extends Access *** 57,107 **** return (Class[]) parameter_types.clone(); } ! public Class getReturnType () { ! if (return_type == null) getType(); ! return return_type; } ! public int hashCode () { ! // FIXME. ! return getName().hashCode() + declaringClass.getName().hashCode(); } ! public native Object invoke (Object obj, Object[] args) ! throws IllegalAccessException, IllegalArgumentException, ! InvocationTargetException; ! ! // Append a class name to a string buffer. We try to print the ! // fully-qualified name, the way that a Java programmer would expect ! // it to be written. Weirdly, Class has no appropriate method for ! // this. ! static void appendClassName (StringBuffer buf, Class k) { ! if (k.isArray ()) ! { ! appendClassName (buf, k.getComponentType ()); ! buf.append ("[]"); ! } ! else ! { ! // This is correct for primitive and reference types. Really ! // we'd like `Main$Inner' to be printed as `Main.Inner', I ! // think, but that is a pain. ! buf.append (k.getName ()); ! } } public String toString () { if (parameter_types == null) getType (); StringBuffer b = new StringBuffer (); ! Modifier.toString(getModifiers(), b); ! b.append(" "); appendClassName (b, return_type); b.append(" "); appendClassName (b, declaringClass); --- 106,174 ---- return (Class[]) parameter_types.clone(); } ! /** ! * Get the exception types this method says it throws, in no particular ! * order. If the method has no throws clause, returns a 0-length array ! * (not null). ! * ! * @return a list of the types in the method's throws clause ! */ ! public Class[] getExceptionTypes () { ! if (exception_types == null) getType(); ! return (Class[]) exception_types.clone(); } ! /** ! * Compare two objects to see if they are semantically equivalent. ! * Two Methods are semantically equivalent if they have the same declaring ! * class, name, and parameter list. This ignores different exception ! * clauses or return types. ! * ! * @param o the object to compare to ! * @return true if they are equal; false if not ! */ ! public boolean equals (Object obj) { ! if (! (obj instanceof Method)) ! return false; ! Method m = (Method) obj; ! return declaringClass == m.declaringClass && offset == m.offset; } ! /** ! * Get the hash code for the Method. ! * ! * @return the hash code for the object ! */ ! public int hashCode () { ! // FIXME. ! return getName().hashCode() + declaringClass.getName().hashCode(); } + /** + * Get a String representation of the Method. A Method's String + * representation is "<modifiers> <returntype> + * <methodname>(<paramtypes>) throws <exceptions>", where + * everything after ')' is omitted if there are no exceptions.
            Example: + * public static int run(java.lang.Runnable,int) + * + * @return the String representation of the Method + */ public String toString () { if (parameter_types == null) getType (); StringBuffer b = new StringBuffer (); ! int mods = getModifiers(); ! if (mods != 0) ! { ! Modifier.toString(mods, b); ! b.append(" "); ! } appendClassName (b, return_type); b.append(" "); appendClassName (b, declaringClass); *************** public final class Method extends Access *** 128,135 **** return b.toString(); } ! private Method () { } // Declaring class. --- 195,265 ---- return b.toString(); } ! /** ! * Invoke the method. Arguments are automatically unwrapped and widened, ! * and the result is automatically wrapped, if needed.

            ! * ! * If the method is static, o will be ignored. Otherwise, ! * the method uses dynamic lookup as described in JLS 15.12.4.4. You cannot ! * mimic the behavior of nonvirtual lookup (as in super.foo()). This means ! * you will get a NullPointerException if o is ! * null, and an IllegalArgumentException if it is incompatible ! * with the declaring class of the method. If the method takes 0 arguments, ! * you may use null or a 0-length array for args.

            ! * ! * Next, if this Method enforces access control, your runtime context is ! * evaluated, and you may have an IllegalAccessException if ! * you could not acces this method in similar compiled code. If the method ! * is static, and its class is uninitialized, you trigger class ! * initialization, which may end in a ! * ExceptionInInitializerError.

            ! * ! * Finally, the method is invoked. If it completes normally, the return value ! * will be null for a void method, a wrapped object for a primitive return ! * method, or the actual return of an Object method. If it completes ! * abruptly, the exception is wrapped in an ! * InvocationTargetException. ! * ! * @param o the object to invoke the method on ! * @param args the arguments to the method ! * @return the return value of the method, wrapped in the appropriate ! * wrapper if it is primitive ! * @throws IllegalAccessException if the method could not normally be called ! * by the Java code (i.e. it is not public) ! * @throws IllegalArgumentException if the number of arguments is incorrect; ! * if the arguments types are wrong even with a widening conversion; ! * or if o is not an instance of the class or interface ! * declaring this method ! * @throws InvocationTargetException if the method throws an exception ! * @throws NullPointerException if o is null and this field ! * requires an instance ! * @throws ExceptionInInitializerError if accessing a static method triggered ! * class initialization, which then failed ! */ ! public native Object invoke (Object obj, Object[] args) ! throws IllegalAccessException, IllegalArgumentException, ! InvocationTargetException; ! ! private native void getType (); ! ! // Append a class name to a string buffer. We try to print the ! // fully-qualified name, the way that a Java programmer would expect ! // it to be written. Weirdly, Class has no appropriate method for ! // this. ! static void appendClassName (StringBuffer buf, Class k) { + if (k.isArray ()) + { + appendClassName (buf, k.getComponentType ()); + buf.append ("[]"); + } + else + { + // This is correct for primitive and reference types. Really + // we'd like `Main$Inner' to be printed as `Main.Inner', I + // think, but that is a pain. + buf.append (k.getName ()); + } } // Declaring class. diff -Nrc3pad gcc-3.3.3/libjava/java/lang/reflect/natArray.cc gcc-3.4.0/libjava/java/lang/reflect/natArray.cc *** gcc-3.3.3/libjava/java/lang/reflect/natArray.cc 2001-10-02 13:44:32.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/reflect/natArray.cc 2003-08-26 14:55:30.000000000 +0000 *************** *** 1,6 **** // natField.cc - Implementation of java.lang.reflect.Field native methods. ! /* Copyright (C) 1999, 2000, 2001 Free Software Foundation This file is part of libgcj. --- 1,6 ---- // natField.cc - Implementation of java.lang.reflect.Field native methods. ! /* Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation This file is part of libgcj. *************** details. */ *** 15,20 **** --- 15,21 ---- #include #include #include + #include #include #include #include *************** java::lang::reflect::Array::newInstance *** 38,45 **** return _Jv_NewPrimArray (componentType, length); } else return JvNewObjectArray (length, componentType, NULL); - } jobject --- 39,46 ---- return _Jv_NewPrimArray (componentType, length); } else + // FIXME: class loader? return JvNewObjectArray (length, componentType, NULL); } jobject *************** java::lang::reflect::Array::newInstance *** 52,61 **** jint* dims = elements (dimensions); if (ndims == 1) return newInstance (componentType, dims[0]); jclass arrayType = componentType; ! for (int i = 0; i < ndims; i++) // FIXME 2nd arg should ! // be "current" loader ! arrayType = _Jv_GetArrayClass (arrayType, 0); return _Jv_NewMultiArray (arrayType, ndims, dims); } --- 53,78 ---- jint* dims = elements (dimensions); if (ndims == 1) return newInstance (componentType, dims[0]); + + gnu::gcj::runtime::StackTrace *t + = new gnu::gcj::runtime::StackTrace(4); + Class *caller = NULL; + ClassLoader *caller_loader = NULL; + try + { + for (int i = 1; !caller; i++) + { + caller = t->classAt (i); + } + caller_loader = caller->getClassLoaderInternal(); + } + catch (::java::lang::ArrayIndexOutOfBoundsException *e) + { + } + jclass arrayType = componentType; ! for (int i = 0; i < ndims; i++) ! arrayType = _Jv_GetArrayClass (arrayType, caller_loader); return _Jv_NewMultiArray (arrayType, ndims, dims); } *************** java::lang::reflect::Array::setBoolean ( *** 343,351 **** void java::lang::reflect::Array::set (jobject array, jint index, ! jobject value, jclass elType) { ! if (! _Jv_IsInstanceOf (value, elType)) throw new java::lang::IllegalArgumentException; elements ((jobjectArray) array) [index] = value; } --- 360,370 ---- void java::lang::reflect::Array::set (jobject array, jint index, ! jobject value, jclass elType) { ! // We don't have to call getElementType here, or check INDEX, ! // because it was already done in the Java wrapper. ! if (value != NULL && ! _Jv_IsInstanceOf (value, elType)) throw new java::lang::IllegalArgumentException; elements ((jobjectArray) array) [index] = value; } diff -Nrc3pad gcc-3.3.3/libjava/java/lang/reflect/natConstructor.cc gcc-3.4.0/libjava/java/lang/reflect/natConstructor.cc *** gcc-3.3.3/libjava/java/lang/reflect/natConstructor.cc 2002-08-27 23:57:17.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/reflect/natConstructor.cc 2003-10-26 02:25:41.000000000 +0000 *************** *** 1,6 **** // natConstructor.cc - Native code for Constructor class. ! /* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation This file is part of libgcj. --- 1,6 ---- // natConstructor.cc - Native code for Constructor class. ! /* Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation This file is part of libgcj. *************** details. */ *** 13,18 **** --- 13,20 ---- #include #include + #include + #include #include #include #include *************** java::lang::reflect::Constructor::getTyp *** 43,58 **** jobject java::lang::reflect::Constructor::newInstance (jobjectArray args) { if (parameter_types == NULL) getType (); ! using namespace java::lang::reflect; if (Modifier::isAbstract (declaringClass->getModifiers())) throw new InstantiationException; _Jv_InitClass (declaringClass); - jmethodID meth = _Jv_FromReflectedConstructor (this); // In the constructor case the return type is the type of the // constructor. return _Jv_CallAnyMethodA (NULL, declaringClass, meth, true, --- 45,83 ---- jobject java::lang::reflect::Constructor::newInstance (jobjectArray args) { + using namespace java::lang::reflect; + if (parameter_types == NULL) getType (); ! jmethodID meth = _Jv_FromReflectedConstructor (this); ! ! // Check accessibility, if required. ! if (! (Modifier::isPublic (meth->accflags) || this->isAccessible())) ! { ! gnu::gcj::runtime::StackTrace *t ! = new gnu::gcj::runtime::StackTrace(4); ! Class *caller = NULL; ! try ! { ! for (int i = 1; !caller; i++) ! { ! caller = t->classAt (i); ! } ! } ! catch (::java::lang::ArrayIndexOutOfBoundsException *e) ! { ! } ! ! if (! _Jv_CheckAccess(caller, declaringClass, meth->accflags)) ! throw new IllegalAccessException; ! } ! if (Modifier::isAbstract (declaringClass->getModifiers())) throw new InstantiationException; _Jv_InitClass (declaringClass); // In the constructor case the return type is the type of the // constructor. return _Jv_CallAnyMethodA (NULL, declaringClass, meth, true, diff -Nrc3pad gcc-3.3.3/libjava/java/lang/reflect/natField.cc gcc-3.4.0/libjava/java/lang/reflect/natField.cc *** gcc-3.3.3/libjava/java/lang/reflect/natField.cc 2002-11-07 17:57:09.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/reflect/natField.cc 2003-10-25 06:49:20.000000000 +0000 *************** *** 1,6 **** // natField.cc - Implementation of java.lang.reflect.Field native methods. ! /* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation This file is part of libgcj. --- 1,6 ---- // natField.cc - Implementation of java.lang.reflect.Field native methods. ! /* Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation This file is part of libgcj. *************** details. */ *** 15,20 **** --- 15,21 ---- #include #include #include + #include #include #include #include *************** java::lang::reflect::Field::getType () *** 46,77 **** { jfieldID fld = _Jv_FromReflectedField (this); JvSynchronize sync (declaringClass); ! _Jv_ResolveField (fld, declaringClass->getClassLoader ()); return fld->type; } - static void - _Jv_CheckFieldAccessibility (jfieldID /*fld*/, jclass /*caller*/) - { - #if 0 - if (caller == NULL) - caller = getCaller(); - #endif - #if 0 - _Jv_ushort flags = fld->getModifiers(); - check accesss; - #endif - } - static void* getAddr (java::lang::reflect::Field* field, jclass caller, jobject obj) { jfieldID fld = _Jv_FromReflectedField (field); _Jv_ushort flags = fld->getModifiers(); ! if (! (flags & java::lang::reflect::Modifier::PUBLIC) ! && ! field->isAccessible ()) ! _Jv_CheckFieldAccessibility (fld, caller); ! if (flags & java::lang::reflect::Modifier::STATIC) { jclass fldClass = field->getDeclaringClass (); JvInitClass(fldClass); --- 47,89 ---- { jfieldID fld = _Jv_FromReflectedField (this); JvSynchronize sync (declaringClass); ! _Jv_ResolveField (fld, declaringClass->getClassLoaderInternal ()); return fld->type; } static void* getAddr (java::lang::reflect::Field* field, jclass caller, jobject obj) { + // FIXME: we know CALLER is NULL here. At one point we planned to + // have the compiler insert the caller as a hidden argument in some + // calls. However, we never implemented that, so we have to find + // the caller by hand instead. + + using namespace java::lang::reflect; + jfieldID fld = _Jv_FromReflectedField (field); _Jv_ushort flags = fld->getModifiers(); ! ! // Check accessibility, if required. ! if (! (Modifier::isPublic (flags) || field->isAccessible())) ! { ! gnu::gcj::runtime::StackTrace *t ! = new gnu::gcj::runtime::StackTrace(7); ! try ! { ! // We want to skip all the frames on the stack from this class. ! for (int i = 1; !caller || caller == &Field::class$; i++) ! caller = t->classAt (i); ! } ! catch (::java::lang::ArrayIndexOutOfBoundsException *e) ! { ! } ! ! if (! _Jv_CheckAccess (caller, field->getDeclaringClass(), flags)) ! throw new java::lang::IllegalAccessException; ! } ! ! if (flags & Modifier::STATIC) { jclass fldClass = field->getDeclaringClass (); JvInitClass(fldClass); diff -Nrc3pad gcc-3.3.3/libjava/java/lang/reflect/natMethod.cc gcc-3.4.0/libjava/java/lang/reflect/natMethod.cc *** gcc-3.3.3/libjava/java/lang/reflect/natMethod.cc 2003-02-28 17:57:58.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/reflect/natMethod.cc 2004-02-26 15:21:11.000000000 +0000 *************** *** 1,6 **** // natMethod.cc - Native code for Method class. ! /* Copyright (C) 1998, 1999, 2000, 2001 , 2002 Free Software Foundation This file is part of libgcj. --- 1,6 ---- // natMethod.cc - Native code for Method class. ! /* Copyright (C) 1998, 1999, 2000, 2001 , 2002, 2003 Free Software Foundation This file is part of libgcj. *************** details. */ *** 28,35 **** --- 28,38 ---- #include #include #include + #include #include #include + #include + #include #include #include #include *************** get_ffi_type (jclass klass) *** 139,167 **** jobject java::lang::reflect::Method::invoke (jobject obj, jobjectArray args) { if (parameter_types == NULL) getType (); ! jmethodID meth = _Jv_FromReflectedMethod (this); - if (! java::lang::reflect::Modifier::isStatic(meth->accflags)) - { - jclass k = obj ? obj->getClass() : NULL; - if (! obj) - throw new java::lang::NullPointerException; - if (! declaringClass->isAssignableFrom(k)) - throw new java::lang::IllegalArgumentException; - // FIXME: access checks. ! // Find the possibly overloaded method based on the runtime type ! // of the object. ! meth = _Jv_LookupDeclaredMethod (k, meth->name, meth->signature); ! } ! else { // We have to initialize a static class. It is safe to do this // here and not in _Jv_CallAnyMethodA because JNI initializes a // class whenever a method lookup is done. _Jv_InitClass (declaringClass); } return _Jv_CallAnyMethodA (obj, return_type, meth, false, --- 142,191 ---- jobject java::lang::reflect::Method::invoke (jobject obj, jobjectArray args) { + using namespace java::lang::reflect; + if (parameter_types == NULL) getType (); ! jmethodID meth = _Jv_FromReflectedMethod (this); ! jclass objClass; ! ! if (Modifier::isStatic(meth->accflags)) { // We have to initialize a static class. It is safe to do this // here and not in _Jv_CallAnyMethodA because JNI initializes a // class whenever a method lookup is done. _Jv_InitClass (declaringClass); + objClass = declaringClass; + } + else + { + objClass = JV_CLASS (obj); + + if (! _Jv_IsAssignableFrom (declaringClass, objClass)) + throw new java::lang::IllegalArgumentException; + } + + // Check accessibility, if required. + if (! (Modifier::isPublic (meth->accflags) || this->isAccessible())) + { + gnu::gcj::runtime::StackTrace *t + = new gnu::gcj::runtime::StackTrace(4); + Class *caller = NULL; + try + { + for (int i = 1; !caller; i++) + { + caller = t->classAt (i); + } + } + catch (::java::lang::ArrayIndexOutOfBoundsException *e) + { + } + + if (! _Jv_CheckAccess(caller, objClass, meth->accflags)) + throw new IllegalAccessException; } return _Jv_CallAnyMethodA (obj, return_type, meth, false, *************** java::lang::reflect::Method::getType () *** 207,213 **** jclass *elts = elements (exception_types); for (int i = 0; i < count; ++i) elts[i] = _Jv_FindClass (method->throws[i], ! declaringClass->getClassLoader ()); } void --- 231,237 ---- jclass *elts = elements (exception_types); for (int i = 0; i < count; ++i) elts[i] = _Jv_FindClass (method->throws[i], ! declaringClass->getClassLoaderInternal ()); } void *************** _Jv_GetTypesFromSignature (jmethodID met *** 218,224 **** { _Jv_Utf8Const* sig = method->signature; ! java::lang::ClassLoader *loader = declaringClass->getClassLoader(); char *ptr = sig->data; int numArgs = 0; /* First just count the number of parameters. */ --- 242,248 ---- { _Jv_Utf8Const* sig = method->signature; ! java::lang::ClassLoader *loader = declaringClass->getClassLoaderInternal(); char *ptr = sig->data; int numArgs = 0; /* First just count the number of parameters. */ *************** _Jv_GetTypesFromSignature (jmethodID met *** 290,298 **** break; } - // FIXME: 2'nd argument should be "current loader" while (--num_arrays >= 0) ! type = _Jv_GetArrayClass (type, 0); // ARGPTR can be NULL if we are processing the return value of a // call from Constructor. if (argPtr) --- 314,321 ---- break; } while (--num_arrays >= 0) ! type = _Jv_GetArrayClass (type, loader); // ARGPTR can be NULL if we are processing the return value of a // call from Constructor. if (argPtr) *************** _Jv_GetTypesFromSignature (jmethodID met *** 309,323 **** // to a `jvalue' (see jni.h); for a void method this should be NULL. // This function returns an exception (if one was thrown), or NULL if // the call went ok. ! jthrowable _Jv_CallAnyMethodA (jobject obj, jclass return_type, jmethodID meth, jboolean is_constructor, JArray *parameter_types, jvalue *args, ! jvalue *result) { #ifdef USE_LIBFFI JvAssert (! is_constructor || ! obj); JvAssert (! is_constructor || return_type); --- 332,350 ---- // to a `jvalue' (see jni.h); for a void method this should be NULL. // This function returns an exception (if one was thrown), or NULL if // the call went ok. ! void _Jv_CallAnyMethodA (jobject obj, jclass return_type, jmethodID meth, jboolean is_constructor, + jboolean is_virtual_call, JArray *parameter_types, jvalue *args, ! jvalue *result, ! jboolean is_jni_call) { + using namespace java::lang::reflect; + #ifdef USE_LIBFFI JvAssert (! is_constructor || ! obj); JvAssert (! is_constructor || return_type); *************** _Jv_CallAnyMethodA (jobject obj, *** 326,332 **** // constructor does need a `this' argument, but it is one we create. jboolean needs_this = false; if (is_constructor ! || ! java::lang::reflect::Modifier::isStatic(meth->accflags)) needs_this = true; int param_count = parameter_types->length; --- 353,359 ---- // constructor does need a `this' argument, but it is one we create. jboolean needs_this = false; if (is_constructor ! || ! Modifier::isStatic(meth->accflags)) needs_this = true; int param_count = parameter_types->length; *************** _Jv_CallAnyMethodA (jobject obj, *** 344,362 **** jclass *paramelts = elements (parameter_types); - // FIXME: at some point the compiler is going to add extra arguments - // to some functions. In particular we are going to do this for - // handling access checks in reflection. We must add these hidden - // arguments here. - // Special case for the `this' argument of a constructor. Note that // the JDK 1.2 docs specify that the new object must be allocated // before argument conversions are done. if (is_constructor) ! { ! // FIXME: must special-case String, arrays, maybe others here. ! obj = JvAllocObject (return_type); ! } const int size_per_arg = sizeof(jvalue); ffi_cif cif; --- 371,381 ---- jclass *paramelts = elements (parameter_types); // Special case for the `this' argument of a constructor. Note that // the JDK 1.2 docs specify that the new object must be allocated // before argument conversions are done. if (is_constructor) ! obj = JvAllocObject (return_type); const int size_per_arg = sizeof(jvalue); ffi_cif cif; *************** _Jv_CallAnyMethodA (jobject obj, *** 398,412 **** if (ffi_prep_cif (&cif, FFI_DEFAULT_ABI, param_count, rtype, argtypes) != FFI_OK) ! { ! // FIXME: throw some kind of VirtualMachineError here. ! } using namespace java::lang; using namespace java::lang::reflect; - Throwable *ex = NULL; - union { ffi_arg i; --- 417,427 ---- if (ffi_prep_cif (&cif, FFI_DEFAULT_ABI, param_count, rtype, argtypes) != FFI_OK) ! throw new java::lang::VirtualMachineError(JvNewStringLatin1("internal error: ffi_prep_cif failed")); using namespace java::lang; using namespace java::lang::reflect; union { ffi_arg i; *************** _Jv_CallAnyMethodA (jobject obj, *** 416,432 **** jdouble d; } ffi_result; try { ! ffi_call (&cif, (void (*)()) meth->ncode, &ffi_result, values); } ! catch (Throwable *ex2) { ! // FIXME: this is wrong for JNI. But if we just return the ! // exception, then the non-JNI cases won't be able to ! // distinguish it from exceptions we might generate ourselves. ! // Sigh. ! ex = new InvocationTargetException (ex2); } // Since ffi_call returns integer values promoted to a word, use --- 431,502 ---- jdouble d; } ffi_result; + switch (rtype->type) + { + case FFI_TYPE_VOID: + break; + case FFI_TYPE_SINT8: + result->b = 0; + break; + case FFI_TYPE_SINT16: + result->s = 0; + break; + case FFI_TYPE_UINT16: + result->c = 0; + break; + case FFI_TYPE_SINT32: + result->i = 0; + break; + case FFI_TYPE_SINT64: + result->j = 0; + break; + case FFI_TYPE_FLOAT: + result->f = 0; + break; + case FFI_TYPE_DOUBLE: + result->d = 0; + break; + case FFI_TYPE_POINTER: + result->l = 0; + break; + default: + JvFail ("Unknown ffi_call return type"); + break; + } + + void *ncode; + + // FIXME: If a vtable index is -1 at this point it is invalid, so we + // have to use the ncode. + // + // This can happen because methods in final classes don't have + // vtable entries, but _Jv_isVirtualMethod() doesn't know that. We + // could solve this problem by allocating a vtable index for methods + // in final classes. + if (is_virtual_call + && ! Modifier::isFinal (meth->accflags) + && (_Jv_ushort)-1 != meth->index) + { + _Jv_VTable *vtable = *(_Jv_VTable **) obj; + ncode = vtable->get_method (meth->index); + } + else + { + ncode = meth->ncode; + } + try { ! ffi_call (&cif, (void (*)()) ncode, &ffi_result, values); } ! catch (Throwable *ex) { ! // For JNI we just throw the real error. For reflection, we ! // wrap the underlying method's exception in an ! // InvocationTargetException. ! if (! is_jni_call) ! ex = new InvocationTargetException (ex); ! throw ex; } // Since ffi_call returns integer values promoted to a word, use *************** _Jv_CallAnyMethodA (jobject obj, *** 470,480 **** break; } } - - return ex; #else ! throw new java::lang::UnsupportedOperationException; ! return 0; #endif // USE_LIBFFI } --- 540,547 ---- break; } } #else ! throw new java::lang::UnsupportedOperationException(JvNewStringLatin1("reflection not available in this build")); #endif // USE_LIBFFI } *************** _Jv_CallAnyMethodA (jobject obj, *** 488,495 **** JArray *parameter_types, jobjectArray args) { - // FIXME: access checks. - if (parameter_types->length == 0 && args == NULL) { // The JDK accepts this, so we do too. --- 555,560 ---- *************** _Jv_CallAnyMethodA (jobject obj, *** 553,568 **** } jvalue ret_value; ! java::lang::Throwable *ex = _Jv_CallAnyMethodA (obj, ! return_type, ! meth, ! is_constructor, ! parameter_types, ! argvals, ! &ret_value); ! ! if (ex) ! throw ex; jobject r; #define VAL(Wrapper, Field) (new Wrapper (ret_value.Field)) --- 618,627 ---- } jvalue ret_value; ! _Jv_CallAnyMethodA (obj, return_type, meth, is_constructor, ! _Jv_isVirtualMethod (meth), ! parameter_types, argvals, &ret_value, ! false); jobject r; #define VAL(Wrapper, Field) (new Wrapper (ret_value.Field)) diff -Nrc3pad gcc-3.3.3/libjava/java/lang/reflect/Proxy.java gcc-3.4.0/libjava/java/lang/reflect/Proxy.java *** gcc-3.3.3/libjava/java/lang/reflect/Proxy.java 2002-11-03 20:27:30.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/reflect/Proxy.java 2003-09-25 20:46:14.000000000 +0000 *************** *** 1,5 **** /* Proxy.java -- build a proxy class that implements reflected interfaces ! Copyright (C) 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Proxy.java -- build a proxy class that implements reflected interfaces ! Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** public class Proxy implements Serializab *** 185,191 **** * Proxy. * @serial invocation handler associated with this proxy instance */ ! protected final InvocationHandler h; /** * Constructs a new Proxy from a subclass (usually a proxy class), --- 185,191 ---- * Proxy. * @serial invocation handler associated with this proxy instance */ ! protected InvocationHandler h; /** * Constructs a new Proxy from a subclass (usually a proxy class), *************** public class Proxy implements Serializab *** 269,286 **** ? getProxyData0(loader, interfaces) : ProxyData.getProxyData(pt)); ! // FIXME workaround for bug in gcj 3.0.x ! // Not needed with the latest gcj from cvs ! //clazz = (Configuration.HAVE_NATIVE_GENERATE_PROXY_CLASS ! // ? generateProxyClass0(loader, data) ! // : new ClassFactory(data).generate(loader)); ! if (Configuration.HAVE_NATIVE_GENERATE_PROXY_CLASS) ! clazz = generateProxyClass0(loader, data); ! else ! { ! ClassFactory cf = new ClassFactory(data); ! clazz = cf.generate(loader); ! } } Object check = proxyClasses.put(pt, clazz); --- 269,277 ---- ? getProxyData0(loader, interfaces) : ProxyData.getProxyData(pt)); ! clazz = (Configuration.HAVE_NATIVE_GENERATE_PROXY_CLASS ! ? generateProxyClass0(loader, data) ! : new ClassFactory(data).generate(loader)); } Object check = proxyClasses.put(pt, clazz); *************** public class Proxy implements Serializab *** 733,739 **** * The package this class is in. Possibly null, meaning the unnamed * package. */ ! Package pack; /** * The interfaces this class implements. Non-null, but possibly empty. --- 724,730 ---- * The package this class is in. Possibly null, meaning the unnamed * package. */ ! String pack; /** * The interfaces this class implements. Non-null, but possibly empty. *************** public class Proxy implements Serializab *** 777,782 **** --- 768,788 ---- } /** + * Return the name of a package given the name of a class. + * Returns null if no package. We use this in preference to + * using Class.getPackage() to avoid problems with ClassLoaders + * that don't set the package. + */ + static String getPackage(Class k) + { + String name = k.getName(); + int idx = name.lastIndexOf('.'); + if (idx >= 0) + return name.substring(0, idx); + return null; + } + + /** * Verifies that the arguments are legal, and sets up remaining data * This should only be called when a class must be generated, as * it is expensive. *************** public class Proxy implements Serializab *** 818,825 **** if (! Modifier.isPublic(inter.getModifiers())) if (in_package) { ! Package p = inter.getPackage(); ! if (data.pack != inter.getPackage()) throw new IllegalArgumentException("non-public interfaces " + "from different " + "packages"); --- 824,831 ---- if (! Modifier.isPublic(inter.getModifiers())) if (in_package) { ! String p = getPackage(inter); ! if (! data.pack.equals(p)) throw new IllegalArgumentException("non-public interfaces " + "from different " + "packages"); *************** public class Proxy implements Serializab *** 827,833 **** else { in_package = true; ! data.pack = inter.getPackage(); } for (int j = i-1; j >= 0; j--) if (data.interfaces[j] == inter) --- 833,839 ---- else { in_package = true; ! data.pack = getPackage(inter); } for (int j = i-1; j >= 0; j--) if (data.interfaces[j] == inter) *************** public class Proxy implements Serializab *** 954,960 **** // access_flags putU2(Modifier.SUPER | Modifier.FINAL | Modifier.PUBLIC); // this_class ! qualName = ((data.pack == null ? "" : data.pack.getName() + '.') + "$Proxy" + data.id); putU2(classInfo(TypeSignature.getEncodingOfClass(qualName, false))); // super_class --- 960,966 ---- // access_flags putU2(Modifier.SUPER | Modifier.FINAL | Modifier.PUBLIC); // this_class ! qualName = ((data.pack == null ? "" : data.pack + '.') + "$Proxy" + data.id); putU2(classInfo(TypeSignature.getEncodingOfClass(qualName, false))); // super_class *************** public class Proxy implements Serializab *** 1320,1336 **** { // XXX Do we require more native support here? - // XXX Security hole - it is possible for another thread to grab the - // VMClassLoader.defineClass Method object, and abuse it while we - // have temporarily made it accessible. Do we need to add some - // synchronization lock to prevent user reflection while we use it? - - // XXX This is waiting on VM support for protection domains. - Class vmClassLoader = Class.forName("java.lang.VMClassLoader"); Class[] types = {ClassLoader.class, String.class, byte[].class, int.class, int.class, ! /* ProtectionDomain.class */ }; Method m = vmClassLoader.getDeclaredMethod("defineClass", types); // Bypass the security check of setAccessible(true), since this --- 1326,1335 ---- { // XXX Do we require more native support here? Class vmClassLoader = Class.forName("java.lang.VMClassLoader"); Class[] types = {ClassLoader.class, String.class, byte[].class, int.class, int.class, ! ProtectionDomain.class }; Method m = vmClassLoader.getDeclaredMethod("defineClass", types); // Bypass the security check of setAccessible(true), since this *************** public class Proxy implements Serializab *** 1339,1345 **** m.flag = true; Object[] args = {loader, qualName, bytecode, new Integer(0), new Integer(bytecode.length), ! /* Object.class.getProtectionDomain() */ }; Class clazz = (Class) m.invoke(null, args); m.flag = false; --- 1338,1344 ---- m.flag = true; Object[] args = {loader, qualName, bytecode, new Integer(0), new Integer(bytecode.length), ! Object.class.getProtectionDomain() }; Class clazz = (Class) m.invoke(null, args); m.flag = false; diff -Nrc3pad gcc-3.3.3/libjava/java/lang/Runtime.java gcc-3.4.0/libjava/java/lang/Runtime.java *** gcc-3.3.3/libjava/java/lang/Runtime.java 2002-08-14 01:07:59.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/Runtime.java 2003-07-21 01:54:05.000000000 +0000 *************** *** 1,5 **** /* Runtime.java -- access to the VM process ! Copyright (C) 1998, 2002 Free Software Foundation This file is part of GNU Classpath. --- 1,5 ---- /* Runtime.java -- access to the VM process ! Copyright (C) 1998, 2002, 2003 Free Software Foundation This file is part of GNU Classpath. *************** public class Runtime *** 65,71 **** /** * The current security manager. This is located here instead of in ! * Runtime, to avoid security problems, as well as bootstrap issues. * Make sure to access it in a thread-safe manner; it is package visible * to avoid overhead in java.lang. */ --- 65,71 ---- /** * The current security manager. This is located here instead of in ! * System, to avoid security problems, as well as bootstrap issues. * Make sure to access it in a thread-safe manner; it is package visible * to avoid overhead in java.lang. */ diff -Nrc3pad gcc-3.3.3/libjava/java/lang/SecurityManager.java gcc-3.4.0/libjava/java/lang/SecurityManager.java *** gcc-3.3.3/libjava/java/lang/SecurityManager.java 2002-12-01 16:16:19.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/SecurityManager.java 2004-01-06 08:34:58.000000000 +0000 *************** public class SecurityManager *** 207,217 **** */ protected Class currentLoadedClass() { ! Class[] c = getClassContext(); ! for (int i = 0; i < c.length; i++) ! if (c[i].getClassLoader() != null) ! return c[i]; ! return null; } /** --- 207,214 ---- */ protected Class currentLoadedClass() { ! int i = classLoaderDepth(); ! return i >= 0 ? getClassContext()[i] : null; } /** *************** public class SecurityManager *** 247,256 **** */ protected int classLoaderDepth() { ! Class[] c = getClassContext(); ! for (int i = 0; i < c.length; i++) ! if (c[i].getClassLoader() != null) ! return i; return -1; } --- 244,261 ---- */ protected int classLoaderDepth() { ! try ! { ! checkPermission(new AllPermission()); ! } ! catch (SecurityException e) ! { ! Class[] c = getClassContext(); ! for (int i = 0; i < c.length; i++) ! if (c[i].getClassLoader() != null) ! // XXX Check if c[i] is AccessController, or a system class. ! return i; ! } return -1; } *************** public class SecurityManager *** 1016,1021 **** --- 1021,1027 ---- for (int index = list.indexOf(packageName); index != -1; index = list.indexOf(packageName, index + 1)) { + // Exploit package visibility for speed. int packageNameCount = packageName.length(); if (index + packageNameCount == list.length() || list.charAt(index + packageNameCount) == ',') diff -Nrc3pad gcc-3.3.3/libjava/java/lang/StrictMath.java gcc-3.4.0/libjava/java/lang/StrictMath.java *** gcc-3.3.3/libjava/java/lang/StrictMath.java 2002-02-15 03:21:47.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/StrictMath.java 2003-10-08 19:00:21.000000000 +0000 *************** *** 1,5 **** /* java.lang.StrictMath -- common mathematical functions, strict Java ! Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* java.lang.StrictMath -- common mathematical functions, strict Java ! Copyright (C) 1998, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** public final strictfp class StrictMath *** 1053,1059 **** * double to x / y (ties go to the even n); for a zero * remainder, the sign is that of x. If either argument is NaN, * the first argument is infinite, or the second argument is zero, the result ! * is NaN; if x is finite but y is infinte, the result is x. * * @param x the dividend (the top half) * @param y the divisor (the bottom half) --- 1053,1059 ---- * double to x / y (ties go to the even n); for a zero * remainder, the sign is that of x. If either argument is NaN, * the first argument is infinite, or the second argument is zero, the result ! * is NaN; if x is finite but y is infinite, the result is x. * * @param x the dividend (the top half) * @param y the divisor (the bottom half) *************** public final strictfp class StrictMath *** 1213,1219 **** */ public static double toRadians(double degrees) { ! return degrees * (PI / 180); } /** --- 1213,1219 ---- */ public static double toRadians(double degrees) { ! return (degrees * PI) / 180; } /** *************** public final strictfp class StrictMath *** 1226,1232 **** */ public static double toDegrees(double rads) { ! return rads * (180 / PI); } /** --- 1226,1232 ---- */ public static double toDegrees(double rads) { ! return (rads * 180) / PI; } /** diff -Nrc3pad gcc-3.3.3/libjava/java/lang/StringBuffer.java gcc-3.4.0/libjava/java/lang/StringBuffer.java *** gcc-3.3.3/libjava/java/lang/StringBuffer.java 2002-12-30 07:17:20.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/StringBuffer.java 2003-10-16 21:35:41.000000000 +0000 *************** *** 1,5 **** /* StringBuffer.java -- Growable strings ! Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* StringBuffer.java -- Growable strings ! Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** GNU Classpath is free software; you can *** 7,13 **** it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- 7,13 ---- it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *************** obligated to do so. If you do not wish *** 36,311 **** exception statement from your version. */ package java.lang; - import java.io.Serializable; ! /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 ! * Updated using online JDK 1.2 docs. ! * Believed complete and correct to JDK 1.2. ! * Merged with Classpath. ! */ /** * StringBuffer represents a changeable String. * It provides the operations required to modify the ! * StringBuffer including insert, replace, delete, append, ! * and reverse. ! *

            * ! * StringBuffers are variable-length in nature, so even if * you initialize them to a certain size, they can still grow larger than ! * that. Capacity indicates the number of characters the * StringBuffer can have in it before it has to grow (growing * the char array is an expensive operation involving new). - *

            * ! * Incidentally, the String operator "+" actually is turned into a ! * StringBuffer operation: ! *
            ! * a + b ! *
            ! * is the same as ! *
            ! * new StringBuffer(a).append(b).toString(). * ! * @implnote Classpath's StringBuffer is capable of sharing memory with ! * Strings for efficiency. This will help in two instances: ! * first, when a StringBuffer is created from a String but is ! * never changed, and second, when a StringBuffer is converted ! * to a String and the StringBuffer is not changed after that. * - * @since JDK1.0 * @author Paul Fisher * @author John Keiser * @author Tom Tromey ! * @see java.lang.String */ public final class StringBuffer implements Serializable, CharSequence { ! /** Append the String value of the argument to this StringBuffer. ! * Uses String.valueOf() to convert to ! * String. ! * @param bool the boolean to convert and append. ! * @return this StringBuffer. ! * @see java.lang.String#valueOf(boolean) */ ! public StringBuffer append (boolean bool) ! { ! return append (String.valueOf(bool)); ! } ! /** Append the char to this StringBuffer. ! * @param c the char to append. ! * @return this StringBuffer. */ ! public synchronized StringBuffer append (char ch) ! { ! ensureCapacity_unsynchronized (count + 1); ! value[count++] = ch; ! return this; ! } ! /** Append the String value of the argument to this StringBuffer. ! * Uses String.valueOf() to convert to ! * String. ! * @param inum the int to convert and append. ! * @return this StringBuffer. ! * @see java.lang.String#valueOf(int) */ ! public native StringBuffer append (int inum); ! /** Append the String value of the argument to this StringBuffer. ! * Uses String.valueOf() to convert to ! * String. ! * @param lnum the long to convert and append. ! * @return this StringBuffer. ! * @see java.lang.String#valueOf(long) */ ! public StringBuffer append (long lnum) ! { ! return append (String.valueOf(lnum)); ! } ! /** Append the String value of the argument to this StringBuffer. ! * Uses String.valueOf() to convert to ! * String. ! * @param fnum the float to convert and append. ! * @return this StringBuffer. ! * @see java.lang.String#valueOf(float) */ ! public StringBuffer append (float fnum) ! { ! return append (String.valueOf(fnum)); ! } ! /** Append the String value of the argument to this StringBuffer. ! * Uses String.valueOf() to convert to ! * String. ! * @param dnum the double to convert and append. ! * @return this StringBuffer. ! * @see java.lang.String#valueOf(double) */ ! public StringBuffer append (double dnum) { ! return append (String.valueOf(dnum)); } ! /** Append the String value of the argument to this StringBuffer. ! * Uses String.valueOf() to convert to ! * String. ! * @param obj the Object to convert and append. ! * @return this StringBuffer. ! * @see java.lang.String#valueOf(java.lang.Object) */ ! public StringBuffer append (Object obj) { ! return append (String.valueOf(obj)); } ! /** Append the String to this StringBuffer. ! * @param str the String to append. ! * @return this StringBuffer. */ ! public synchronized StringBuffer append (String str) { ! if (str == null) ! str = "null"; ! int len = str.length(); ! ensureCapacity_unsynchronized (count + len); ! str.getChars(0, len, value, count); ! count += len; ! return this; } ! /** Append the char array to this StringBuffer. ! * @param data the char[] to append. ! * @return this StringBuffer. ! * @exception NullPointerException if str is null. */ ! public StringBuffer append (char[] data) { ! return append (data, 0, data.length); } ! /** Append the char array to this StringBuffer. ! * @param data the char[] to append. ! * @param offset the place to start grabbing characters from ! * str. ! * @param count the number of characters to get from str. ! * @return this StringBuffer. ! * @exception NullPointerException if str is null. ! * @exception IndexOutOfBoundsException if offset or ! * offset+len is out of range. ! */ ! public synchronized StringBuffer append (char[] data, int offset, int count) ! { ! ensureCapacity_unsynchronized (this.count + count); ! System.arraycopy(data, offset, value, this.count, count); ! this.count += count; ! return this; ! } ! ! /** Get the total number of characters this StringBuffer ! * can support before it must be grown. Not to be confused with ! * length. ! * @return the capacity of this StringBuffer ! * @see #length() ! * @see #ensureCapacity(int) */ ! public int capacity () { return value.length; } ! /** Get the character at the specified index. ! * @param index the index of the character to get, starting at 0. ! * @return the character at the specified index. ! * @exception IndexOutOfBoundsException if the desired character index ! * is negative or greater then length() - 1. */ ! public synchronized char charAt (int index) { ! if (index >= count) ! throw new StringIndexOutOfBoundsException (index); ! return value[index]; } ! /** Delete characters from this StringBuffer. ! * delete(10, 12) will delete 10 and 11, but not 12. ! * @param start the first character to delete. ! * @param end the index after the last character to delete. ! * @return this StringBuffer. ! * @exception StringIndexOutOfBoundsException if start ! * or end-1 are out of bounds, or if ! * start > end. */ ! public synchronized StringBuffer delete (int start, int end) { ! if (start < 0 || start > count || start > end) ! throw new StringIndexOutOfBoundsException (start); ! if (end > count) ! end = count; ! // This will unshare if required. ! ensureCapacity_unsynchronized (count); ! if (count - end != 0) ! System.arraycopy (value, end, value, start, count - end); ! count -= (end - start); ! return this; ! } ! /** Delete a character from this StringBuffer. ! * @param index the index of the character to delete. ! * @return this StringBuffer. ! * @exception StringIndexOutOfBoundsException if index ! * is out of bounds. ! */ ! public StringBuffer deleteCharAt(int index) ! { ! return delete (index, index + 1); } ! /** Increase the capacity of this StringBuffer. ! * This will ensure that an expensive growing operation will not occur ! * until minimumCapacity is reached. ! * If the capacity is actually already greater than minimumCapacity ! * @param minimumCapacity the new capacity. ! * @see #capacity() */ ! public synchronized void ensureCapacity (int minimumCapacity) ! { ! if (shared || minimumCapacity > value.length) ! { ! // We don't want to make a larger vector when `shared' is ! // set. If we do, then setLength becomes very inefficient ! // when repeatedly reusing a StringBuffer in a loop. ! int max = (minimumCapacity > value.length ! ? value.length*2+2 ! : value.length); ! minimumCapacity = (minimumCapacity < max ? max : minimumCapacity); ! char[] nb = new char[minimumCapacity]; ! System.arraycopy(value, 0, nb, 0, count); ! value = nb; ! shared = false; ! } ! } ! ! // ensureCapacity is used by several synchronized methods in StringBuffer. ! // There's no need to synchronize again. ! private void ensureCapacity_unsynchronized (int minimumCapacity) { ! if (shared || minimumCapacity > value.length) ! { ! // We don't want to make a larger vector when `shared' is ! // set. If we do, then setLength becomes very inefficient ! // when repeatedly reusing a StringBuffer in a loop. ! int max = (minimumCapacity > value.length ! ? value.length*2+2 ! : value.length); ! minimumCapacity = (minimumCapacity < max ? max : minimumCapacity); ! char[] nb = new char[minimumCapacity]; ! System.arraycopy(value, 0, nb, 0, count); ! value = nb; ! shared = false; ! } } /** --- 36,229 ---- exception statement from your version. */ package java.lang; ! import java.io.Serializable; /** * StringBuffer represents a changeable String. * It provides the operations required to modify the ! * StringBuffer, including insert, replace, delete, append, ! * and reverse. It is thread-safe; meaning that all modifications to a buffer ! * are in synchronized methods. * ! *

            StringBuffers are variable-length in nature, so even if * you initialize them to a certain size, they can still grow larger than ! * that. Capacity indicates the number of characters the * StringBuffer can have in it before it has to grow (growing * the char array is an expensive operation involving new). * ! *

            Incidentally, compilers often implement the String operator "+" ! * by using a StringBuffer operation:
            ! * a + b
            ! * is the same as
            ! * new StringBuffer().append(a).append(b).toString(). * ! *

            Classpath's StringBuffer is capable of sharing memory with Strings for ! * efficiency. This will help when a StringBuffer is converted to a String ! * and the StringBuffer is not changed after that (quite common when performing ! * string concatenation). * * @author Paul Fisher * @author John Keiser * @author Tom Tromey ! * @author Eric Blake ! * @see String ! * @since 1.0 ! * @status updated to 1.4 */ public final class StringBuffer implements Serializable, CharSequence { ! /** ! * Compatible with JDK 1.0+. */ ! private static final long serialVersionUID = 3388685877147921107L; ! /** ! * Index of next available character (and thus the size of the current ! * string contents). Note that this has permissions set this way so that ! * String can get the value. ! * ! * @serial the number of characters in the buffer */ ! int count; ! /** ! * The buffer. Note that this has permissions set this way so that String ! * can get the value. ! * ! * @serial the buffer */ ! char[] value; ! /** ! * True if the buffer is shared with another object (StringBuffer or ! * String); this means the buffer must be copied before writing to it again. ! * Note that this has permissions set this way so that String can get the ! * value. ! * ! * @serial whether the buffer is shared */ ! boolean shared; ! /** ! * The default capacity of a buffer. */ ! private final static int DEFAULT_CAPACITY = 16; ! /** ! * Create a new StringBuffer with default capacity 16. */ ! public StringBuffer() { ! this(DEFAULT_CAPACITY); } ! /** ! * Create an empty StringBuffer with the specified initial ! * capacity. ! * ! * @param capacity the initial capacity ! * @throws NegativeArraySizeException if capacity is negative */ ! public StringBuffer(int capacity) { ! value = new char[capacity]; } ! /** ! * Create a new StringBuffer with the characters in the ! * specified String. Initial capacity will be the size of the ! * String plus 16. ! * ! * @param str the String to convert ! * @throws NullPointerException if str is null */ ! public StringBuffer(String str) { ! // Unfortunately, because the size is 16 larger, we cannot share. ! count = str.count; ! value = new char[count + DEFAULT_CAPACITY]; ! str.getChars(0, count, value, 0); } ! /** ! * Get the length of the String this StringBuffer ! * would create. Not to be confused with the capacity of the ! * StringBuffer. ! * ! * @return the length of this StringBuffer ! * @see #capacity() ! * @see #setLength(int) */ ! public synchronized int length() { ! return count; } ! /** ! * Get the total number of characters this StringBuffer can ! * support before it must be grown. Not to be confused with length. ! * ! * @return the capacity of this StringBuffer ! * @see #length() ! * @see #ensureCapacity(int) */ ! public synchronized int capacity() { return value.length; } ! /** ! * Increase the capacity of this StringBuffer. This will ! * ensure that an expensive growing operation will not occur until ! * minimumCapacity is reached. The buffer is grown to the ! * larger of minimumCapacity and ! * capacity() * 2 + 2, if it is not already large enough. ! * ! * @param minimumCapacity the new capacity ! * @see #capacity() */ ! public synchronized void ensureCapacity(int minimumCapacity) { ! ensureCapacity_unsynchronized(minimumCapacity); } ! /** ! * Set the length of this StringBuffer. If the new length is greater than ! * the current length, all the new characters are set to '\0'. If the new ! * length is less than the current length, the first newLength ! * characters of the old array will be preserved, and the remaining ! * characters are truncated. ! * ! * @param newLength the new length ! * @throws IndexOutOfBoundsException if the new length is negative ! * (while unspecified, this is a StringIndexOutOfBoundsException) ! * @see #length() */ ! public synchronized void setLength(int newLength) { ! if (newLength < 0) ! throw new StringIndexOutOfBoundsException(newLength); ! ensureCapacity_unsynchronized(newLength); ! while (count < newLength) ! value[count++] = '\0'; ! count = newLength; } ! /** ! * Get the character at the specified index. ! * ! * @param index the index of the character to get, starting at 0 ! * @return the character at the specified index ! * @throws IndexOutOfBoundsException if index is negative or >= length() ! * (while unspecified, this is a StringIndexOutOfBoundsException) */ ! public synchronized char charAt(int index) { ! if (index < 0 || index >= count) ! throw new StringIndexOutOfBoundsException(index); ! return value[index]; } /** *************** public final class StringBuffer implemen *** 326,728 **** public synchronized void getChars(int srcOffset, int srcEnd, char[] dst, int dstOffset) { ! int todo = srcEnd - srcOffset; ! if (srcOffset < 0 || srcEnd > count || todo < 0) throw new StringIndexOutOfBoundsException(); ! System.arraycopy(value, srcOffset, dst, dstOffset, todo); } ! /** Insert the String value of the argument into this StringBuffer. ! * Uses String.valueOf() to convert to ! * String. ! * @param offset the place to insert. ! * @param bool the boolean to convert and insert. ! * @return this StringBuffer. ! * @exception IndexOutOfBoundsException if offset is out ! * of range for this StringBuffer. ! * @see java.lang.String#valueOf(boolean) */ ! public StringBuffer insert (int offset, boolean bool) { ! return insert (offset, bool ? "true" : "false"); } ! /** Insert the char argument into this StringBuffer. ! * @param offset the place to insert. ! * @param ch the char to insert. ! * @return this StringBuffer. ! * @exception IndexOutOfBoundsException if offset is out ! * of range for this StringBuffer. */ ! public synchronized StringBuffer insert (int offset, char ch) { ! if (offset < 0 || offset > count) ! throw new StringIndexOutOfBoundsException (offset); ! ensureCapacity_unsynchronized (count+1); ! System.arraycopy(value, offset, value, offset+1, count-offset); ! value[offset] = ch; ! count++; ! return this; } ! /** Insert the String value of the argument into this StringBuffer. ! * Uses String.valueOf() to convert to ! * String. ! * @param offset the place to insert. ! * @param inum the int to convert and insert. ! * @return this StringBuffer. ! * @exception IndexOutOfBoundsException if offset is out ! * of range for this StringBuffer. ! * @see java.lang.String#valueOf(int) */ ! public StringBuffer insert (int offset, int inum) { ! return insert (offset, String.valueOf(inum)); } ! /** Insert the String value of the argument into this StringBuffer. ! * Uses String.valueOf() to convert to ! * String. ! * @param offset the place to insert. ! * @param lnum the long to convert and insert. ! * @return this StringBuffer. ! * @exception IndexOutOfBoundsException if offset is out ! * of range for this StringBuffer. ! * @see java.lang.String#valueOf(long) */ ! public StringBuffer insert (int offset, long lnum) { ! return insert (offset, String.valueOf(lnum)); } ! /** Insert the String value of the argument into this StringBuffer. ! * Uses String.valueOf() to convert to ! * String. ! * @param offset the place to insert. ! * @param fnum the float to convert and insert. ! * @return this StringBuffer. ! * @exception IndexOutOfBoundsException if offset is out ! * of range for this StringBuffer. ! * @see java.lang.String#valueOf(float) */ ! public StringBuffer insert (int offset, float fnum) { ! return insert (offset, String.valueOf(fnum)); } ! /** Insert the String value of the argument into this StringBuffer. ! * Uses String.valueOf() to convert to ! * String. ! * @param offset the place to insert. ! * @param dnum the double to convert and insert. ! * @return this StringBuffer. ! * @exception IndexOutOfBoundsException if offset is out ! * of range for this StringBuffer. ! * @see java.lang.String#valueOf(double) */ ! public StringBuffer insert (int offset, double dnum) { ! return insert (offset, String.valueOf(dnum)); } ! /** Insert the String value of the argument into this StringBuffer. ! * Uses String.valueOf() to convert to ! * String. ! * @param offset the place to insert. ! * @param obj the Object to convert and insert. ! * @return this StringBuffer. ! * @exception IndexOutOfBoundsException if offset is out ! * of range for this StringBuffer. ! * @see java.lang.String#valueOf(java.lang.Object) */ ! public StringBuffer insert (int offset, Object obj) { ! return insert (offset, String.valueOf(obj)); } ! /** Insert the String argument into this StringBuffer. ! * @param offset the place to insert. ! * @param str the String to insert. ! * @return this StringBuffer. ! * @exception IndexOutOfBoundsException if offset is out ! * of range for this StringBuffer. */ ! public synchronized StringBuffer insert (int offset, String str) { ! if (offset < 0 || offset > count) ! throw new StringIndexOutOfBoundsException (offset); ! // Note that using `null' is from JDK 1.2. ! if (str == null) ! str = "null"; ! int len = str.length(); ! ensureCapacity_unsynchronized (count+len); ! System.arraycopy(value, offset, value, offset+len, count-offset); ! str.getChars(0, len, value, offset); ! count += len; return this; } ! /** Insert the char[] argument into this ! * StringBuffer. ! * @param offset the place to insert. ! * @param data the char[] to insert. ! * @return this StringBuffer. ! * @exception NullPointerException if data is ! * null. ! * @exception IndexOutOfBoundsException if offset is out ! * of range for this StringBuffer. */ ! public StringBuffer insert (int offset, char[] data) { ! // One could check if offset is invalid here instead of making sure that ! // data isn't null before dereferencing, but this works just as well. ! return insert (offset, data, 0, data == null ? 0 : data.length); } ! /** Insert the char[] argument into this ! * StringBuffer. ! * @param offset the place to insert. ! * @param str the char[] to insert. ! * @param str_offset the index in str to start inserting ! * from. ! * @param len the number of characters to insert. ! * @return this StringBuffer. ! * @exception NullPointerException if str is null. ! * @exception IndexOutOfBoundsException if offset is out ! * of range, for this StringBuffer, or if ! * str_offset or str_offset+len ! * are out of range for str. */ ! public synchronized StringBuffer insert(int offset, char[] str, ! int str_offset, int len) { ! if (offset < 0 || offset > count) ! throw new StringIndexOutOfBoundsException (offset); ! if (len < 0) ! throw new StringIndexOutOfBoundsException (len); ! if (str_offset < 0 || str_offset + len > str.length) ! throw new StringIndexOutOfBoundsException (str_offset); ! ensureCapacity_unsynchronized (count + len); ! System.arraycopy(value, offset, value, offset + len, count - offset); ! System.arraycopy(str, str_offset, value, offset, len); ! count += len; return this; } ! /** Get the length of the String this ! * StringBuffer would create. Not to be confused with the ! * capacity of the StringBuffer. ! * @return the length of this StringBuffer. ! * @see #capacity() ! * @see #setLength(int) */ ! public int length () { ! return count; } ! /** Replace characters between index start (inclusive) and ! * end (exclusive) with str. If end ! * is larger than the size of this StringBuffer, all characters after ! * start are replaced. ! * @param start the beginning index of characters to delete (inclusive). ! * @param end the ending index of characters to delete (exclusive). ! * @param str the new String to insert. ! * @return this StringBuffer. */ ! public synchronized StringBuffer replace (int start, int end, String str) { if (start < 0 || start > count || start > end) ! throw new StringIndexOutOfBoundsException (start); ! ! int len = str.length(); // Calculate the difference in 'count' after the replace. ! int delta = len - ((end > count ? count : end) - start); ! ensureCapacity_unsynchronized (count + delta); ! if (delta != 0 && end < count) System.arraycopy(value, end, value, end + delta, count - end); ! ! str.getChars (0, len, value, start); ! count += delta; ! return this; } ! /** Reverse the characters in this StringBuffer. ! * @return this StringBuffer. */ ! public synchronized StringBuffer reverse () { ! // Call ensureCapacity to enforce copy-on-write. ! ensureCapacity_unsynchronized (count); ! for (int i = 0; i < count / 2; ++i) ! { ! char c = value[i]; ! value[i] = value[count - i - 1]; ! value[count - i - 1] = c; ! } ! return this; } ! /** Set the character at the specified index. ! * @param index the index of the character to set starting at 0. ! * @param ch the value to set that character to. ! * @exception IndexOutOfBoundsException if the specified character ! * index is not between 0 and length() - 1 (inclusive). */ ! public synchronized void setCharAt (int index, char ch) { ! if (index < 0 || index >= count) ! throw new StringIndexOutOfBoundsException (index); ! // Call ensureCapacity to enforce copy-on-write. ! ensureCapacity_unsynchronized (count); ! value[index] = ch; } ! /** Set the length of this StringBuffer. ! *

            ! * If the new length is greater than the current length, all the new ! * characters are set to '\0'. ! *

            ! * If the new length is less than the current length, the first ! * newLength characters of the old array will be ! * @param newLength the new length ! * @exception IndexOutOfBoundsException if the new length is ! * negative. ! * @see #length() */ ! public synchronized void setLength (int newLength) { ! if (newLength < 0) ! throw new StringIndexOutOfBoundsException (newLength); ! ensureCapacity_unsynchronized (newLength); ! for (int i = count; i < newLength; ++i) ! value[i] = '\0'; ! count = newLength; } ! /** Create a new StringBuffer with default capacity 16. ! * @see JLS 20.13.1 */ ! public StringBuffer () { ! this (DEFAULT_CAPACITY); } ! /** Create an empty StringBuffer with the specified initial capacity. ! * @param capacity the initial capacity. */ ! public StringBuffer (int capacity) { ! count = 0; ! value = new char[capacity]; ! shared = false; } ! /** Create a new StringBuffer with the characters in the specified String. ! * Initial capacity will be the size of the String plus 16. ! * @param str the String to make a StringBuffer out of. ! * @XXX optimize for sharing. */ ! public StringBuffer (String str) { ! // The documentation is not clear, but experimentation with ! // other implementations indicates that StringBuffer(null) ! // should throw a NullPointerException. ! count = str.length(); ! // JLS: The initial capacity of the string buffer is 16 plus the ! // length of the argument string. ! value = new char[count + DEFAULT_CAPACITY]; ! str.getChars(0, count, value, 0); ! shared = false; } /** ! * Creates a substring of this StringBuffer, starting at a specified index ! * and ending at the end of this StringBuffer. * ! * @param beginIndex index to start substring (base 0) ! * ! * @return new String which is a substring of this StringBuffer * ! * @exception StringIndexOutOfBoundsException ! * if (beginIndex < 0 || beginIndex > this.length()) */ ! public String substring (int beginIndex) { ! return substring (beginIndex, count); } /** ! * Creates a substring of this StringBuffer, starting at a specified index ! * and ending at one character before a specified index. * ! * @param beginIndex index to start substring (base 0) ! * @param endIndex index after the last character to be ! * copied into the substring ! * ! * @return new String which is a substring of this StringBuffer * ! * @exception StringIndexOutOfBoundsException ! * if (beginIndex < 0 || endIndex > this.length() || beginIndex > endIndex) */ ! public synchronized String substring (int beginIndex, int endIndex) { ! if (beginIndex < 0 || endIndex > count || beginIndex > endIndex) ! throw new StringIndexOutOfBoundsException (); ! // FIXME: for libgcj it would be possible, and more efficient, to ! // enable sharing here. ! return new String (value, beginIndex, endIndex - beginIndex); } /** ! * Creates a substring of this StringBuffer, starting at a specified index ! * and ending at one character before a specified index. ! *

            ! * To implement CharSequence. ! * Calls substring(beginIndex, endIndex). * ! * @param beginIndex index to start substring (base 0) ! * @param endIndex index after the last character to be ! * copied into the substring ! * ! * @return new String which is a substring of this StringBuffer * ! * @exception StringIndexOutOfBoundsException ! * if (beginIndex < 0 || endIndex > this.length() || beginIndex > endIndex) */ ! public CharSequence subSequence (int beginIndex, int endIndex) { ! return substring(beginIndex, endIndex); } ! /** Convert this StringBuffer to a String. ! * @return the characters in this StringBuffer */ ! public String toString () { ! // Note: in libgcj this causes the StringBuffer to be shared. In ! // Classpath it does not. ! return new String (this); } ! // Index of next available character. Note that this has ! // permissions set this way so that String can get the value. ! int count; ! // The buffer. Note that this has permissions set this way so that ! // String can get the value. ! char[] value; ! // True if we need to copy the buffer before writing to it again. ! // FIXME: JDK 1.2 doesn't specify this. The new buffer-growing ! // semantics make this less useful in that case, too. Note that ! // this has permissions set this way so that String can get the ! // value. ! boolean shared; ! static final long serialVersionUID = 3388685877147921107L; ! private final static int DEFAULT_CAPACITY = 16; // JLS 20.13.1 } --- 244,904 ---- public synchronized void getChars(int srcOffset, int srcEnd, char[] dst, int dstOffset) { ! if (srcOffset < 0 || srcEnd > count || srcEnd < srcOffset) throw new StringIndexOutOfBoundsException(); ! System.arraycopy(value, srcOffset, dst, dstOffset, srcEnd - srcOffset); } ! /** ! * Set the character at the specified index. ! * ! * @param index the index of the character to set starting at 0 ! * @param ch the value to set that character to ! * @throws IndexOutOfBoundsException if index is negative or >= length() ! * (while unspecified, this is a StringIndexOutOfBoundsException) */ ! public synchronized void setCharAt(int index, char ch) { ! if (index < 0 || index >= count) ! throw new StringIndexOutOfBoundsException(index); ! // Call ensureCapacity to enforce copy-on-write. ! ensureCapacity_unsynchronized(count); ! value[index] = ch; } ! /** ! * Append the String value of the argument to this ! * StringBuffer. Uses String.valueOf() to convert ! * to String. ! * ! * @param obj the Object to convert and append ! * @return this StringBuffer ! * @see String#valueOf(Object) ! * @see #append(String) */ ! public StringBuffer append(Object obj) { ! return append(obj == null ? "null" : obj.toString()); } ! /** ! * Append the String to this StringBuffer. If ! * str is null, the String "null" is appended. ! * ! * @param str the String to append ! * @return this StringBuffer */ ! public synchronized StringBuffer append(String str) { ! if (str == null) ! str = "null"; ! int len = str.count; ! ensureCapacity_unsynchronized(count + len); ! str.getChars(0, len, value, count); ! count += len; ! return this; } ! /** ! * Append the StringBuffer value of the argument to this ! * StringBuffer. This behaves the same as ! * append((Object) stringBuffer), except it is more efficient. ! * ! * @param stringBuffer the StringBuffer to convert and append ! * @return this StringBuffer ! * @see #append(Object) ! * @since 1.4 */ ! public synchronized StringBuffer append(StringBuffer stringBuffer) { ! if (stringBuffer == null) ! return append("null"); ! synchronized (stringBuffer) ! { ! int len = stringBuffer.count; ! ensureCapacity_unsynchronized(count + len); ! System.arraycopy(stringBuffer.value, 0, value, count, len); ! count += len; ! } ! return this; } ! /** ! * Append the char array to this StringBuffer. ! * This is similar (but more efficient) than ! * append(new String(data)), except in the case of null. ! * ! * @param data the char[] to append ! * @return this StringBuffer ! * @throws NullPointerException if str is null ! * @see #append(char[], int, int) */ ! public StringBuffer append(char[] data) { ! return append(data, 0, data.length); } ! /** ! * Append part of the char array to this ! * StringBuffer. This is similar (but more efficient) than ! * append(new String(data, offset, count)), except in the case ! * of null. ! * ! * @param data the char[] to append ! * @param offset the start location in str ! * @param count the number of characters to get from str ! * @return this StringBuffer ! * @throws NullPointerException if str is null ! * @throws IndexOutOfBoundsException if offset or count is out of range ! * (while unspecified, this is a StringIndexOutOfBoundsException) */ ! public synchronized StringBuffer append(char[] data, int offset, int count) { ! if (offset < 0 || count < 0 || offset > data.length - count) ! throw new StringIndexOutOfBoundsException(); ! ensureCapacity_unsynchronized(this.count + count); ! System.arraycopy(data, offset, value, this.count, count); ! this.count += count; ! return this; } ! /** ! * Append the String value of the argument to this ! * StringBuffer. Uses String.valueOf() to convert ! * to String. ! * ! * @param bool the boolean to convert and append ! * @return this StringBuffer ! * @see String#valueOf(boolean) */ ! public StringBuffer append(boolean bool) { ! return append(bool ? "true" : "false"); } ! /** ! * Append the char to this StringBuffer. ! * ! * @param c the char to append ! * @return this StringBuffer */ ! public synchronized StringBuffer append(char ch) { ! ensureCapacity_unsynchronized(count + 1); ! value[count++] = ch; return this; } ! /** ! * Append the String value of the argument to this ! * StringBuffer. Uses String.valueOf() to convert ! * to String. ! * ! * @param inum the int to convert and append ! * @return this StringBuffer ! * @see String#valueOf(int) */ ! // GCJ LOCAL: this is native for efficiency. ! public native StringBuffer append (int inum); ! ! /** ! * Append the String value of the argument to this ! * StringBuffer. Uses String.valueOf() to convert ! * to String. ! * ! * @param lnum the long to convert and append ! * @return this StringBuffer ! * @see String#valueOf(long) ! */ ! public StringBuffer append(long lnum) { ! return append(Long.toString(lnum, 10)); } ! /** ! * Append the String value of the argument to this ! * StringBuffer. Uses String.valueOf() to convert ! * to String. ! * ! * @param fnum the float to convert and append ! * @return this StringBuffer ! * @see String#valueOf(float) */ ! public StringBuffer append(float fnum) { ! return append(Float.toString(fnum)); ! } ! ! /** ! * Append the String value of the argument to this ! * StringBuffer. Uses String.valueOf() to convert ! * to String. ! * ! * @param dnum the double to convert and append ! * @return this StringBuffer ! * @see String#valueOf(double) ! */ ! public StringBuffer append(double dnum) ! { ! return append(Double.toString(dnum)); ! } ! ! /** ! * Delete characters from this StringBuffer. ! * delete(10, 12) will delete 10 and 11, but not 12. It is ! * harmless for end to be larger than length(). ! * ! * @param start the first character to delete ! * @param end the index after the last character to delete ! * @return this StringBuffer ! * @throws StringIndexOutOfBoundsException if start or end are out of bounds ! * @since 1.2 ! */ ! public synchronized StringBuffer delete(int start, int end) ! { ! if (start < 0 || start > count || start > end) ! throw new StringIndexOutOfBoundsException(start); ! if (end > count) ! end = count; ! // This will unshare if required. ! ensureCapacity_unsynchronized(count); ! if (count - end != 0) ! System.arraycopy(value, end, value, start, count - end); ! count -= end - start; return this; } ! /** ! * Delete a character from this StringBuffer. ! * ! * @param index the index of the character to delete ! * @return this StringBuffer ! * @throws StringIndexOutOfBoundsException if index is out of bounds ! * @since 1.2 */ ! public StringBuffer deleteCharAt(int index) { ! return delete(index, index + 1); } ! /** ! * Replace characters between index start (inclusive) and ! * end (exclusive) with str. If end ! * is larger than the size of this StringBuffer, all characters after ! * start are replaced. ! * ! * @param start the beginning index of characters to delete (inclusive) ! * @param end the ending index of characters to delete (exclusive) ! * @param str the new String to insert ! * @return this StringBuffer ! * @throws StringIndexOutOfBoundsException if start or end are out of bounds ! * @throws NullPointerException if str is null ! * @since 1.2 */ ! public synchronized StringBuffer replace(int start, int end, String str) { if (start < 0 || start > count || start > end) ! throw new StringIndexOutOfBoundsException(start); ! ! int len = str.count; // Calculate the difference in 'count' after the replace. ! int delta = len - (end > count ? count : end) + start; ! ensureCapacity_unsynchronized(count + delta); ! if (delta != 0 && end < count) System.arraycopy(value, end, value, end + delta, count - end); ! ! str.getChars(0, len, value, start); ! count += delta; ! return this; } ! /** ! * Creates a substring of this StringBuffer, starting at a specified index ! * and ending at the end of this StringBuffer. ! * ! * @param beginIndex index to start substring (base 0) ! * @return new String which is a substring of this StringBuffer ! * @throws StringIndexOutOfBoundsException if beginIndex is out of bounds ! * @see #substring(int, int) ! * @since 1.2 */ ! public String substring(int beginIndex) { ! return substring(beginIndex, count); } ! /** ! * Creates a substring of this StringBuffer, starting at a specified index ! * and ending at one character before a specified index. This is implemented ! * the same as substring(beginIndex, endIndex), to satisfy ! * the CharSequence interface. ! * ! * @param beginIndex index to start at (inclusive, base 0) ! * @param endIndex index to end at (exclusive) ! * @return new String which is a substring of this StringBuffer ! * @throws IndexOutOfBoundsException if beginIndex or endIndex is out of ! * bounds ! * @see #substring(int, int) ! * @since 1.4 */ ! public CharSequence subSequence(int beginIndex, int endIndex) { ! return substring(beginIndex, endIndex); } ! /** ! * Creates a substring of this StringBuffer, starting at a specified index ! * and ending at one character before a specified index. ! * ! * @param beginIndex index to start at (inclusive, base 0) ! * @param endIndex index to end at (exclusive) ! * @return new String which is a substring of this StringBuffer ! * @throws StringIndexOutOfBoundsException if beginIndex or endIndex is out ! * of bounds ! * @since 1.2 */ ! public synchronized String substring(int beginIndex, int endIndex) { ! int len = endIndex - beginIndex; ! if (beginIndex < 0 || endIndex > count || endIndex < beginIndex) ! throw new StringIndexOutOfBoundsException(); ! if (len == 0) ! return ""; ! // Don't copy unless substring is smaller than 1/4 of the buffer. ! boolean share_buffer = ((len << 2) >= value.length); ! if (share_buffer) ! this.shared = true; ! // Package constructor avoids an array copy. ! return new String(value, beginIndex, len, share_buffer); ! } ! /** ! * Insert a subarray of the char[] argument into this ! * StringBuffer. ! * ! * @param offset the place to insert in this buffer ! * @param str the char[] to insert ! * @param str_offset the index in str to start inserting from ! * @param len the number of characters to insert ! * @return this StringBuffer ! * @throws NullPointerException if str is null ! * @throws StringIndexOutOfBoundsException if any index is out of bounds ! * @since 1.2 ! */ ! public synchronized StringBuffer insert(int offset, ! char[] str, int str_offset, int len) ! { ! if (offset < 0 || offset > count || len < 0 ! || str_offset < 0 || str_offset > str.length - len) ! throw new StringIndexOutOfBoundsException(); ! ensureCapacity_unsynchronized(count + len); ! System.arraycopy(value, offset, value, offset + len, count - offset); ! System.arraycopy(str, str_offset, value, offset, len); ! count += len; ! return this; } ! /** ! * Insert the String value of the argument into this ! * StringBuffer. Uses String.valueOf() to convert ! * to String. ! * ! * @param offset the place to insert in this buffer ! * @param obj the Object to convert and insert ! * @return this StringBuffer ! * @exception StringIndexOutOfBoundsException if offset is out of bounds ! * @see String#valueOf(Object) */ ! public StringBuffer insert(int offset, Object obj) { ! return insert(offset, obj == null ? "null" : obj.toString()); } ! /** ! * Insert the String argument into this ! * StringBuffer. If str is null, the String "null" is used ! * instead. ! * ! * @param offset the place to insert in this buffer ! * @param str the String to insert ! * @return this StringBuffer ! * @throws StringIndexOutOfBoundsException if offset is out of bounds */ ! public synchronized StringBuffer insert(int offset, String str) { ! if (offset < 0 || offset > count) ! throw new StringIndexOutOfBoundsException(offset); ! if (str == null) ! str = "null"; ! int len = str.count; ! ensureCapacity_unsynchronized(count + len); ! System.arraycopy(value, offset, value, offset + len, count - offset); ! str.getChars(0, len, value, offset); ! count += len; ! return this; } ! /** ! * Insert the char[] argument into this ! * StringBuffer. ! * ! * @param offset the place to insert in this buffer ! * @param data the char[] to insert ! * @return this StringBuffer ! * @throws NullPointerException if data is null ! * @throws StringIndexOutOfBoundsException if offset is out of bounds ! * @see #insert(int, char[], int, int) */ ! public StringBuffer insert(int offset, char[] data) { ! return insert(offset, data, 0, data.length); } /** ! * Insert the String value of the argument into this ! * StringBuffer. Uses String.valueOf() to convert ! * to String. * ! * @param offset the place to insert in this buffer ! * @param bool the boolean to convert and insert ! * @return this StringBuffer ! * @throws StringIndexOutOfBoundsException if offset is out of bounds ! * @see String#valueOf(boolean) ! */ ! public StringBuffer insert(int offset, boolean bool) ! { ! return insert(offset, bool ? "true" : "false"); ! } ! ! /** ! * Insert the char argument into this StringBuffer. * ! * @param offset the place to insert in this buffer ! * @param ch the char to insert ! * @return this StringBuffer ! * @throws StringIndexOutOfBoundsException if offset is out of bounds */ ! public synchronized StringBuffer insert(int offset, char ch) { ! if (offset < 0 || offset > count) ! throw new StringIndexOutOfBoundsException(offset); ! ensureCapacity_unsynchronized(count + 1); ! System.arraycopy(value, offset, value, offset + 1, count - offset); ! value[offset] = ch; ! count++; ! return this; } /** ! * Insert the String value of the argument into this ! * StringBuffer. Uses String.valueOf() to convert ! * to String. * ! * @param offset the place to insert in this buffer ! * @param inum the int to convert and insert ! * @return this StringBuffer ! * @throws StringIndexOutOfBoundsException if offset is out of bounds ! * @see String#valueOf(int) ! */ ! public StringBuffer insert(int offset, int inum) ! { ! return insert(offset, String.valueOf(inum)); ! } ! ! /** ! * Insert the String value of the argument into this ! * StringBuffer. Uses String.valueOf() to convert ! * to String. * ! * @param offset the place to insert in this buffer ! * @param lnum the long to convert and insert ! * @return this StringBuffer ! * @throws StringIndexOutOfBoundsException if offset is out of bounds ! * @see String#valueOf(long) */ ! public StringBuffer insert(int offset, long lnum) { ! return insert(offset, Long.toString(lnum, 10)); } /** ! * Insert the String value of the argument into this ! * StringBuffer. Uses String.valueOf() to convert ! * to String. * ! * @param offset the place to insert in this buffer ! * @param fnum the float to convert and insert ! * @return this StringBuffer ! * @throws StringIndexOutOfBoundsException if offset is out of bounds ! * @see String#valueOf(float) ! */ ! public StringBuffer insert(int offset, float fnum) ! { ! return insert(offset, Float.toString(fnum)); ! } ! ! /** ! * Insert the String value of the argument into this ! * StringBuffer. Uses String.valueOf() to convert ! * to String. * ! * @param offset the place to insert in this buffer ! * @param dnum the double to convert and insert ! * @return this StringBuffer ! * @throws StringIndexOutOfBoundsException if offset is out of bounds ! * @see String#valueOf(double) */ ! public StringBuffer insert(int offset, double dnum) { ! return insert(offset, Double.toString(dnum)); ! } ! ! /** ! * Finds the first instance of a substring in this StringBuffer. ! * ! * @param str String to find ! * @return location (base 0) of the String, or -1 if not found ! * @throws NullPointerException if str is null ! * @see #indexOf(String, int) ! * @since 1.4 ! */ ! public int indexOf(String str) ! { ! return indexOf(str, 0); } + /** + * Finds the first instance of a String in this StringBuffer, starting at + * a given index. If starting index is less than 0, the search starts at + * the beginning of this String. If the starting index is greater than the + * length of this String, or the substring is not found, -1 is returned. + * + * @param str String to find + * @param fromIndex index to start the search + * @return location (base 0) of the String, or -1 if not found + * @throws NullPointerException if str is null + * @since 1.4 + */ + public synchronized int indexOf(String str, int fromIndex) + { + if (fromIndex < 0) + fromIndex = 0; + int limit = count - str.count; + for ( ; fromIndex <= limit; fromIndex++) + if (regionMatches(fromIndex, str)) + return fromIndex; + return -1; + } ! /** ! * Finds the last instance of a substring in this StringBuffer. ! * ! * @param str String to find ! * @return location (base 0) of the String, or -1 if not found ! * @throws NullPointerException if str is null ! * @see #lastIndexOf(String, int) ! * @since 1.4 */ ! public int lastIndexOf(String str) { ! return lastIndexOf(str, count - str.count); } ! /** ! * Finds the last instance of a String in this StringBuffer, starting at a ! * given index. If starting index is greater than the maximum valid index, ! * then the search begins at the end of this String. If the starting index ! * is less than zero, or the substring is not found, -1 is returned. ! * ! * @param str String to find ! * @param fromIndex index to start the search ! * @return location (base 0) of the String, or -1 if not found ! * @throws NullPointerException if str is null ! * @since 1.4 ! */ ! public synchronized int lastIndexOf(String str, int fromIndex) ! { ! fromIndex = Math.min(fromIndex, count - str.count); ! for ( ; fromIndex >= 0; fromIndex--) ! if (regionMatches(fromIndex, str)) ! return fromIndex; ! return -1; ! } ! /** ! * Reverse the characters in this StringBuffer. The same sequence of ! * characters exists, but in the reverse index ordering. ! * ! * @return this StringBuffer ! */ ! public synchronized StringBuffer reverse() ! { ! // Call ensureCapacity to enforce copy-on-write. ! ensureCapacity_unsynchronized(count); ! for (int i = count >> 1, j = count - i; --i >= 0; ++j) ! { ! char c = value[i]; ! value[i] = value[j]; ! value[j] = c; ! } ! return this; ! } ! /** ! * Convert this StringBuffer to a String. The ! * String is composed of the characters currently in this StringBuffer. Note ! * that the result is a copy, and that future modifications to this buffer ! * do not affect the String. ! * ! * @return the characters in this StringBuffer ! */ ! public String toString() ! { ! // The string will set this.shared = true. ! return new String(this); ! } ! /** ! * An unsynchronized version of ensureCapacity, used internally to avoid ! * the cost of a second lock on the same object. This also has the side ! * effect of duplicating the array, if it was shared (to form copy-on-write ! * semantics). ! * ! * @param minimumCapacity the minimum capacity ! * @see #ensureCapacity(int) ! */ ! private void ensureCapacity_unsynchronized(int minimumCapacity) ! { ! if (shared || minimumCapacity > value.length) ! { ! // We don't want to make a larger vector when `shared' is ! // set. If we do, then setLength becomes very inefficient ! // when repeatedly reusing a StringBuffer in a loop. ! int max = (minimumCapacity > value.length ! ? value.length * 2 + 2 ! : value.length); ! minimumCapacity = (minimumCapacity < max ? max : minimumCapacity); ! char[] nb = new char[minimumCapacity]; ! System.arraycopy(value, 0, nb, 0, count); ! value = nb; ! shared = false; ! } ! } ! ! /** ! * Predicate which determines if a substring of this matches another String ! * starting at a specified offset for each String and continuing for a ! * specified length. This is more efficient than creating a String to call ! * indexOf on. ! * ! * @param toffset index to start comparison at for this String ! * @param other non-null String to compare to region of this ! * @return true if regions match, false otherwise ! * @see #indexOf(String, int) ! * @see #lastIndexOf(String, int) ! * @see String#regionMatches(boolean, int, String, int, int) ! */ ! // GCJ LOCAL: native for gcj. ! private native boolean regionMatches(int toffset, String other); } diff -Nrc3pad gcc-3.3.3/libjava/java/lang/String.java gcc-3.4.0/libjava/java/lang/String.java *** gcc-3.3.3/libjava/java/lang/String.java 2002-06-13 18:16:26.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/String.java 2003-07-28 16:12:00.000000000 +0000 *************** *** 1,53 **** ! /* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation ! This file is part of libgcj. - This software is copyrighted work licensed under the terms of the - Libgcj License. Please consult the file "LIBGCJ_LICENSE" for - details. */ package java.lang; import java.io.UnsupportedEncodingException; import java.io.Serializable; import java.lang.Comparable; import java.util.Comparator; import java.util.Locale; /** * @author Per Bothner ! * @date September 4, 1998. ! */ ! /* Written using "Java Class Libraries", 2nd edition, plus online ! * API docs for JDK 1.2 beta from http://www.javasoft.com. ! * Status: Complete to 1.3. */ - public final class String implements Serializable, Comparable, CharSequence { ! private Object data; ! private int boffset; // Note this is a byte offset - don't use in Java code! ! private int count; ! // This is probably not necessary because this class is special cased already ! // but it will avoid showing up as a discrepancy when comparing SUIDs. private static final long serialVersionUID = -6849794470754667710L; /** * An implementation for {@link CASE_INSENSITIVE_ORDER}. ! * This must be {@link Serializable}. */ private static final class CaseInsensitiveComparator implements Comparator, Serializable { /** ! * The default private constructor generates unnecessary overhead */ CaseInsensitiveComparator() {} /** ! * Compares two Strings, using * String.compareToIgnoreCase(String). ! * * @param o1 the first string * @param o2 the second string * @return < 0, 0, or > 0 depending on the case-insensitive --- 1,139 ---- ! /* String.java -- immutable character sequences; the object of string literals ! Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ! Free Software Foundation, Inc. ! This file is part of GNU Classpath. ! ! GNU Classpath is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! GNU Classpath is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with GNU Classpath; see the file COPYING. If not, write to the ! Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ! 02111-1307 USA. ! ! Linking this library statically or dynamically with other modules is ! making a combined work based on this library. Thus, the terms and ! conditions of the GNU General Public License cover the whole ! combination. ! ! As a special exception, the copyright holders of this library give you ! permission to link this library with independent modules to produce an ! executable, regardless of the license terms of these independent ! modules, and to copy and distribute the resulting executable under ! terms of your choice, provided that you also meet, for each linked ! independent module, the terms and conditions of the license of that ! module. An independent module is a module which is not derived from ! or based on this library. If you modify this library, you may extend ! this exception to your version of the library, but you are not ! obligated to do so. If you do not wish to do so, delete this ! exception statement from your version. */ package java.lang; + import java.io.UnsupportedEncodingException; import java.io.Serializable; import java.lang.Comparable; import java.util.Comparator; import java.util.Locale; + import java.util.regex.Pattern; + import java.util.regex.PatternSyntaxException; /** + * Strings represent an immutable set of characters. All String literals + * are instances of this class, and two string literals with the same contents + * refer to the same String object. + * + *

            This class also includes a number of methods for manipulating the + * contents of strings (of course, creating a new object if there are any + * changes, as String is immutable). Case mapping relies on Unicode 3.0.0 + * standards, where some character sequences have a different number of + * characters in the uppercase version than the lower case. + * + *

            Strings are special, in that they are the only object with an overloaded + * operator. When you use '+' with at least one String argument, both + * arguments have String conversion performed on them, and another String (not + * guaranteed to be unique) results. + * + *

            String is special-cased when doing data serialization - rather than + * listing the fields of this class, a String object is converted to a string + * literal in the object stream. + * + * @author Paul N. Fisher + * @author Eric Blake * @author Per Bothner ! * @since 1.0 ! * @status updated to 1.4 */ public final class String implements Serializable, Comparable, CharSequence { ! // WARNING: String is a CORE class in the bootstrap cycle. See the comments ! // in vm/reference/java/lang/Runtime for implications of this fact. ! /** ! * This is probably not necessary because this class is special cased already ! * but it will avoid showing up as a discrepancy when comparing SUIDs. ! */ private static final long serialVersionUID = -6849794470754667710L; /** + * This is the object that holds the characters that make up the + * String. It might be a char[], or it could be String. It could + * even be `this'. The actual characters can't be located using + * pure Java code. + * @see #boffset + */ + private Object data; + + /** + * This is a byte offset of the actual characters from + * the start of the character-holding object. Don't use this field + * in Java code. + */ + private int boffset; + + /** + * Holds the number of characters in value. Package visible for use + * by trusted code. + */ + int count; + + /** + * Caches the result of hashCode(). If this value is zero, the hashcode + * is considered uncached (even if 0 is the correct hash value). + */ + private int cachedHashCode; + + /** * An implementation for {@link CASE_INSENSITIVE_ORDER}. ! * This must be {@link Serializable}. The class name is dictated by ! * compatibility with Sun's JDK. */ private static final class CaseInsensitiveComparator implements Comparator, Serializable { /** ! * Compatible with JDK 1.2. ! */ ! private static final long serialVersionUID = 8575799808933029326L; ! ! /** ! * The default private constructor generates unnecessary overhead. */ CaseInsensitiveComparator() {} /** ! * Compares to Strings, using * String.compareToIgnoreCase(String). ! * * @param o1 the first string * @param o2 the second string * @return < 0, 0, or > 0 depending on the case-insensitive *************** public final class String implements Ser *** 60,133 **** { return ((String) o1).compareToIgnoreCase((String) o2); } ! } /** * A Comparator that uses String.compareToIgnoreCase(String). ! * This comparator is {@link Serializable}. * * @since 1.2 */ public static final Comparator CASE_INSENSITIVE_ORDER = new CaseInsensitiveComparator(); ! public String () { ! init(); } ! public String (String value) { ! data = value.data; ! boffset = value.boffset; ! count = value.count; } ! public String (StringBuffer buffer) { ! synchronized (buffer) ! { ! buffer.shared = true; ! init (buffer.value, 0, buffer.count, true); ! } } ! // This is used by gnu.gcj.runtime.StringBuffer, so it must have ! // package-private protection. It is accessed via CNI and so avoids ! // ordinary protection mechanisms. ! String (gnu.gcj.runtime.StringBuffer buffer) { ! // No need to synchronize or mark the buffer, since we know it is ! // only used once. ! init (buffer.value, 0, buffer.count, true); } ! public String (char[] data) { ! init(data, 0, data.length, false); } ! public String (char[] data, int offset, int count) { ! init(data, offset, count, false); } ! // This is used by Integer.toString(int,int). ! String (char[] data, int offset, int count, boolean dont_copy) { ! init(data, offset, count, dont_copy); } ! public String (byte[] byteArray) { ! this (byteArray, 0, byteArray.length); } ! public String (byte[] byteArray, int offset, int count) { try { ! init (byteArray, offset, count, System.getProperty("file.encoding", "8859_1")); } catch (UnsupportedEncodingException x1) --- 146,347 ---- { return ((String) o1).compareToIgnoreCase((String) o2); } ! } // class CaseInsensitiveComparator /** * A Comparator that uses String.compareToIgnoreCase(String). ! * This comparator is {@link Serializable}. Note that it ignores Locale, ! * for that, you want a Collator. * + * @see Collator#compare(String, String) * @since 1.2 */ public static final Comparator CASE_INSENSITIVE_ORDER = new CaseInsensitiveComparator(); ! /** ! * Creates an empty String (length 0). Unless you really need a new object, ! * consider using "" instead. ! */ ! public String() { ! data = "".data; ! boffset = 0; ! count = 0; } ! /** ! * Copies the contents of a String to a new String. Since Strings are ! * immutable, only a shallow copy is performed. ! * ! * @param str String to copy ! * @throws NullPointerException if value is null ! */ ! public String(String str) { ! data = str.data; ! boffset = str.boffset; ! count = str.count; ! cachedHashCode = str.cachedHashCode; } ! /** ! * Creates a new String using the character sequence of the char array. ! * Subsequent changes to data do not affect the String. ! * ! * @param data char array to copy ! * @throws NullPointerException if data is null ! */ ! public String(char[] data) { ! init(data, 0, data.length, false); } ! /** ! * Creates a new String using the character sequence of a subarray of ! * characters. The string starts at offset, and copies count chars. ! * Subsequent changes to data do not affect the String. ! * ! * @param data char array to copy ! * @param offset position (base 0) to start copying out of data ! * @param count the number of characters from data to copy ! * @throws NullPointerException if data is null ! * @throws IndexOutOfBoundsException if (offset < 0 || count < 0 ! * || offset + count > data.length) ! * (while unspecified, this is a StringIndexOutOfBoundsException) ! */ ! public String(char[] data, int offset, int count) { ! init(data, offset, count, false); } ! /** ! * Creates a new String using an 8-bit array of integer values, starting at ! * an offset, and copying up to the count. Each character c, using ! * corresponding byte b, is created in the new String as if by performing: ! * ! *

            !    * c = (char) (((hibyte & 0xff) << 8) | (b & 0xff))
            !    * 
            ! * ! * @param ascii array of integer values ! * @param hibyte top byte of each Unicode character ! * @param offset position (base 0) to start copying out of ascii ! * @param count the number of characters from ascii to copy ! * @throws NullPointerException if ascii is null ! * @throws IndexOutOfBoundsException if (offset < 0 || count < 0 ! * || offset + count > ascii.length) ! * (while unspecified, this is a StringIndexOutOfBoundsException) ! * @see #String(byte[]) ! * @see #String(byte[], String) ! * @see #String(byte[], int, int) ! * @see #String(byte[], int, int, String) ! * @deprecated use {@link #String(byte[], int, int, String)} to perform ! * correct encoding ! */ ! public String(byte[] ascii, int hibyte, int offset, int count) { ! init(ascii, hibyte, offset, count); } ! /** ! * Creates a new String using an 8-bit array of integer values. Each ! * character c, using corresponding byte b, is created in the new String ! * as if by performing: ! * ! *
            !    * c = (char) (((hibyte & 0xff) << 8) | (b & 0xff))
            !    * 
            ! * ! * @param ascii array of integer values ! * @param hibyte top byte of each Unicode character ! * @throws NullPointerException if ascii is null ! * @see #String(byte[]) ! * @see #String(byte[], String) ! * @see #String(byte[], int, int) ! * @see #String(byte[], int, int, String) ! * @see #String(byte[], int, int, int) ! * @deprecated use {@link #String(byte[], String)} to perform ! * correct encoding ! */ ! public String(byte[] ascii, int hibyte) { ! init(ascii, hibyte, 0, ascii.length); } ! /** ! * Creates a new String using the portion of the byte array starting at the ! * offset and ending at offset + count. Uses the specified encoding type ! * to decode the byte array, so the resulting string may be longer or ! * shorter than the byte array. For more decoding control, use ! * {@link java.nio.charset.CharsetDecoder}, and for valid character sets, ! * see {@link java.nio.charset.Charset}. The behavior is not specified if ! * the decoder encounters invalid characters; this implementation throws ! * an Error. ! * ! * @param data byte array to copy ! * @param offset the offset to start at ! * @param count the number of characters in the array to use ! * @param encoding the name of the encoding to use ! * @throws NullPointerException if data or encoding is null ! * @throws IndexOutOfBoundsException if offset or count is incorrect ! * (while unspecified, this is a StringIndexOutOfBoundsException) ! * @throws UnsupportedEncodingException if encoding is not found ! * @throws Error if the decoding fails ! * @since 1.1 ! */ ! public String(byte[] data, int offset, int count, String encoding) ! throws UnsupportedEncodingException { ! init (data, offset, count, encoding); } ! /** ! * Creates a new String using the byte array. Uses the specified encoding ! * type to decode the byte array, so the resulting string may be longer or ! * shorter than the byte array. For more decoding control, use ! * {@link java.nio.charset.CharsetDecoder}, and for valid character sets, ! * see {@link java.nio.charset.Charset}. The behavior is not specified if ! * the decoder encounters invalid characters; this implementation throws ! * an Error. ! * ! * @param data byte array to copy ! * @param encoding the name of the encoding to use ! * @throws NullPointerException if data or encoding is null ! * @throws UnsupportedEncodingException if encoding is not found ! * @throws Error if the decoding fails ! * @see #String(byte[], int, int, String) ! * @since 1.1 ! */ ! public String(byte[] data, String encoding) ! throws UnsupportedEncodingException { ! this(data, 0, data.length, encoding); } ! /** ! * Creates a new String using the portion of the byte array starting at the ! * offset and ending at offset + count. Uses the encoding of the platform's ! * default charset, so the resulting string may be longer or shorter than ! * the byte array. For more decoding control, use ! * {@link java.nio.charset.CharsetDecoder}. The behavior is not specified ! * if the decoder encounters invalid characters; this implementation throws ! * an Error. ! * ! * @param data byte array to copy ! * @param offset the offset to start at ! * @param count the number of characters in the array to use ! * @throws NullPointerException if data is null ! * @throws IndexOutOfBoundsException if offset or count is incorrect ! * @throws Error if the decoding fails ! * @see #String(byte[], int, int, String) ! * @since 1.1 ! */ ! public String(byte[] data, int offset, int count) { try { ! init (data, offset, count, System.getProperty("file.encoding", "8859_1")); } catch (UnsupportedEncodingException x1) *************** public final class String implements Ser *** 135,141 **** // Maybe the default encoding is bad. try { ! init (byteArray, offset, count, "8859_1"); } catch (UnsupportedEncodingException x2) { --- 349,355 ---- // Maybe the default encoding is bad. try { ! init (data, offset, count, "8859_1"); } catch (UnsupportedEncodingException x2) { *************** public final class String implements Ser *** 144,205 **** } } ! public String (byte[] byteArray, String enc) ! throws UnsupportedEncodingException ! { ! this (byteArray, 0, byteArray.length, enc); ! } ! ! public String (byte[] byteArray, int offset, int count, String enc) ! throws UnsupportedEncodingException ! { ! init (byteArray, offset, count, enc); ! } ! ! public static String copyValueOf(char[] data) { ! return copyValueOf (data, 0, data.length); } ! public static String copyValueOf(char[] data, int offset, int count) { ! String r = new String (); ! r.init(data, offset, count, false); ! return r; } ! /** @deprecated */ ! public String (byte[] ascii, int hibyte) { ! init(ascii, hibyte, 0, ascii.length); } ! /** @deprecated */ ! public String (byte[] ascii, int hibyte, int offset, int count) { ! init(ascii, hibyte, offset, count); } ! public String toString () { ! return this; } ! public native boolean equals (Object anObject); ! ! public native int hashCode (); ! public int length () ! { ! return count; ! } ! public native char charAt (int index); ! public native void getChars (int srcBegin, int srcEnd, ! char[] dst, int dstBegin); ! public byte[] getBytes () { try { --- 358,514 ---- } } ! /** ! * Creates a new String using the byte array. Uses the encoding of the ! * platform's default charset, so the resulting string may be longer or ! * shorter than the byte array. For more decoding control, use ! * {@link java.nio.charset.CharsetDecoder}. The behavior is not specified ! * if the decoder encounters invalid characters; this implementation throws ! * an Error. ! * ! * @param data byte array to copy ! * @throws NullPointerException if data is null ! * @throws Error if the decoding fails ! * @see #String(byte[], int, int) ! * @see #String(byte[], int, int, String) ! * @since 1.1 ! */ ! public String(byte[] data) { ! this(data, 0, data.length); } ! /** ! * Creates a new String using the character sequence represented by ! * the StringBuffer. Subsequent changes to buf do not affect the String. ! * ! * @param buffer StringBuffer to copy ! * @throws NullPointerException if buffer is null ! */ ! public String(StringBuffer buffer) { ! synchronized (buffer) ! { ! // Share unless buffer is 3/4 empty. ! boolean should_copy = ((buffer.count << 2) < buffer.value.length); ! if (! should_copy) ! buffer.shared = true; ! init (buffer.value, 0, buffer.count, ! should_copy); ! } } ! /** ! * Special constructor which can share an array when safe to do so. ! * ! * @param data the characters to copy ! * @param offset the location to start from ! * @param count the number of characters to use ! * @param dont_copy true if the array is trusted, and need not be copied ! * @throws NullPointerException if chars is null ! * @throws StringIndexOutOfBoundsException if bounds check fails ! */ ! String(char[] data, int offset, int count, boolean dont_copy) { ! init(data, offset, count, dont_copy); } ! // This is used by gnu.gcj.runtime.StringBuffer, so it must have ! // package-private protection. It is accessed via CNI and so avoids ! // ordinary protection mechanisms. ! String(gnu.gcj.runtime.StringBuffer buffer) { ! // No need to synchronize or mark the buffer, since we know it is ! // only used once. ! init (buffer); } ! /** ! * Returns the number of characters contained in this String. ! * ! * @return the length of this String ! */ ! public int length() { ! return count; } ! /** ! * Returns the character located at the specified index within this String. ! * ! * @param index position of character to return (base 0) ! * @return character located at position index ! * @throws IndexOutOfBoundsException if index < 0 || index >= length() ! * (while unspecified, this is a StringIndexOutOfBoundsException) ! */ ! public native char charAt(int index); ! /** ! * Copies characters from this String starting at a specified start index, ! * ending at a specified stop index, to a character array starting at ! * a specified destination begin index. ! * ! * @param srcBegin index to begin copying characters from this String ! * @param srcEnd index after the last character to be copied from this String ! * @param dst character array which this String is copied into ! * @param dstBegin index to start writing characters into dst ! * @throws NullPointerException if dst is null ! * @throws IndexOutOfBoundsException if any indices are out of bounds ! * (while unspecified, source problems cause a ! * StringIndexOutOfBoundsException, and dst problems cause an ! * ArrayIndexOutOfBoundsException) ! */ ! public native void getChars(int srcBegin, int srcEnd, ! char[] dst, int dstBegin); ! /** ! * Copies the low byte of each character from this String starting at a ! * specified start index, ending at a specified stop index, to a byte array ! * starting at a specified destination begin index. ! * ! * @param srcBegin index to being copying characters from this String ! * @param srcEnd index after the last character to be copied from this String ! * @param dst byte array which each low byte of this String is copied into ! * @param dstBegin index to start writing characters into dst ! * @throws NullPointerException if dst is null and copy length is non-zero ! * @throws IndexOutOfBoundsException if any indices are out of bounds ! * (while unspecified, source problems cause a ! * StringIndexOutOfBoundsException, and dst problems cause an ! * ArrayIndexOutOfBoundsException) ! * @see #getBytes() ! * @see #getBytes(String) ! * @deprecated use {@link #getBytes()}, which uses a char to byte encoder ! */ ! public native void getBytes(int srcBegin, int srcEnd, ! byte[] dst, int dstBegin); ! /** ! * Converts the Unicode characters in this String to a byte array. Uses the ! * specified encoding method, so the result may be longer or shorter than ! * the String. For more encoding control, use ! * {@link java.nio.charset.CharsetEncoder}, and for valid character sets, ! * see {@link java.nio.charset.Charset}. The behavior is not specified if ! * the encoder encounters a problem; this implementation returns null. ! * ! * @param enc encoding name ! * @return the resulting byte array, or null on a problem ! * @throws NullPointerException if enc is null ! * @throws UnsupportedEncodingException if encoding is not supported ! * @since 1.1 ! */ ! public native byte[] getBytes(String enc) ! throws UnsupportedEncodingException; ! /** ! * Converts the Unicode characters in this String to a byte array. Uses the ! * encoding of the platform's default charset, so the result may be longer ! * or shorter than the String. For more encoding control, use ! * {@link java.nio.charset.CharsetEncoder}. The behavior is not specified if ! * the encoder encounters a problem; this implementation returns null. ! * ! * @return the resulting byte array, or null on a problem ! * @since 1.1 ! */ ! public byte[] getBytes() { try { *************** public final class String implements Ser *** 222,306 **** } } ! public native byte[] getBytes (String enc) ! throws UnsupportedEncodingException; ! ! /** @deprecated */ ! public native void getBytes (int srcBegin, int srcEnd, ! byte[] dst, int dstBegin); ! public native char[] toCharArray (); ! public native boolean equalsIgnoreCase (String anotherString); ! public native int compareTo (String anotherString); ! public int compareTo (Object obj) { ! return compareTo ((String)obj); } ! ! public int compareToIgnoreCase (String str) { return this.toUpperCase().toLowerCase().compareTo( str.toUpperCase().toLowerCase()); } ! public native boolean regionMatches (int toffset, ! String other, int ooffset, int len); ! public native boolean regionMatches (boolean ignoreCase, int toffset, ! String other, int ooffset, int len); ! public boolean startsWith (String prefix) { return startsWith (prefix, 0); } ! public native boolean startsWith (String prefix, int toffset); ! ! public boolean endsWith (String suffix) { return regionMatches (this.count - suffix.count, suffix, 0, suffix.count); } ! // No such method specified in the doc, including JDK 1.2. ! // public boolean endsWith (String suffix, int toffset) ! // { ! // return regionMatches (toffset, suffix, 0, suffix.count); ! // } ! ! // The Language Specification, and the JDK 1.2 API docs say that ! // index and lastIndex take an int, while the Class Libraries ! // say they take a char. The former wins ... ! public int indexOf (int ch) { ! return indexOf (ch, 0); } ! public native int indexOf (int ch, int fromIndex); ! public int indexOf (String str) { ! return indexOf (str, 0); } ! public native int indexOf (String str, int fromIndex); ! public int lastIndexOf (int ch) { ! return lastIndexOf (ch, count - 1); } ! public native int lastIndexOf (int ch, int fromIndex); ! public int lastIndexOf (String str) { ! return lastIndexOf (str, count - str.count); } ! public int lastIndexOf (String str, int fromIndex) { if (fromIndex >= count) fromIndex = count - str.count; --- 531,811 ---- } } ! /** ! * Predicate which compares anObject to this. This is true only for Strings ! * with the same character sequence. ! * ! * @param anObject the object to compare ! * @return true if anObject is semantically equal to this ! * @see #compareTo(String) ! * @see #equalsIgnoreCase(String) ! */ ! public native boolean equals(Object anObject); ! /** ! * Compares the given StringBuffer to this String. This is true if the ! * StringBuffer has the same content as this String at this moment. ! * ! * @param buffer the StringBuffer to compare to ! * @return true if StringBuffer has the same character sequence ! * @throws NullPointerException if the given StringBuffer is null ! * @since 1.4 ! */ ! public native boolean contentEquals(StringBuffer buffer); ! /** ! * Compares a String to this String, ignoring case. This does not handle ! * multi-character capitalization exceptions; instead the comparison is ! * made on a character-by-character basis, and is true if:
              ! *
            • c1 == c2
            • ! *
            • Character.toUpperCase(c1) ! * == Character.toUpperCase(c2)
            • ! *
            • Character.toLowerCase(c1) ! * == Character.toLowerCase(c2)
            • ! *
            ! * ! * @param anotherString String to compare to this String ! * @return true if anotherString is equal, ignoring case ! * @see #equals(Object) ! * @see Character#toUpperCase(char) ! * @see Character#toLowerCase(char) ! */ ! public native boolean equalsIgnoreCase(String anotherString); ! /** ! * Compares this String and another String (case sensitive, ! * lexicographically). The result is less than 0 if this string sorts ! * before the other, 0 if they are equal, and greater than 0 otherwise. ! * After any common starting sequence is skipped, the result is ! * this.charAt(k) - anotherString.charAt(k) if both strings ! * have characters remaining, or ! * this.length() - anotherString.length() if one string is ! * a subsequence of the other. ! * ! * @param anotherString the String to compare against ! * @return the comparison ! * @throws NullPointerException if anotherString is null ! */ ! public native int compareTo(String anotherString); ! /** ! * Behaves like compareTo(java.lang.String) unless the Object ! * is not a String. Then it throws a ! * ClassCastException. ! * ! * @param o the object to compare against ! * @return the comparison ! * @throws NullPointerException if o is null ! * @throws ClassCastException if o is not a String ! * @since 1.2 ! */ ! public int compareTo(Object o) { ! return compareTo((String) o); } ! ! /** ! * Compares this String and another String (case insensitive). This ! * comparison is similar to equalsIgnoreCase, in that it ignores ! * locale and multi-characater capitalization, and compares characters ! * after performing ! * Character.toLowerCase(Character.toUpperCase(c)) on each ! * character of the string. This is unsatisfactory for locale-based ! * comparison, in which case you should use {@link java.text.Collator}. ! * ! * @param s the string to compare against ! * @return the comparison ! * @see Collator#compare(String, String) ! * @since 1.2 ! */ ! public int compareToIgnoreCase(String str) { return this.toUpperCase().toLowerCase().compareTo( str.toUpperCase().toLowerCase()); } ! /** ! * Predicate which determines if this String matches another String ! * starting at a specified offset for each String and continuing ! * for a specified length. Indices out of bounds are harmless, and give ! * a false result. ! * ! * @param toffset index to start comparison at for this String ! * @param other String to compare region to this String ! * @param oofset index to start comparison at for other ! * @param len number of characters to compare ! * @return true if regions match (case sensitive) ! * @throws NullPointerException if other is null ! */ ! public native boolean regionMatches(int toffset, ! String other, int ooffset, int len); ! /** ! * Predicate which determines if this String matches another String ! * starting at a specified offset for each String and continuing ! * for a specified length, optionally ignoring case. Indices out of bounds ! * are harmless, and give a false result. Case comparisons are based on ! * Character.toLowerCase() and ! * Character.toUpperCase(), not on multi-character ! * capitalization expansions. ! * ! * @param ignoreCase true if case should be ignored in comparision ! * @param toffset index to start comparison at for this String ! * @param other String to compare region to this String ! * @param oofset index to start comparison at for other ! * @param len number of characters to compare ! * @return true if regions match, false otherwise ! * @throws NullPointerException if other is null ! */ ! public native boolean regionMatches(boolean ignoreCase, int toffset, ! String other, int ooffset, int len); ! /** ! * Predicate which determines if this String contains the given prefix, ! * beginning comparison at toffset. The result is false if toffset is ! * negative or greater than this.length(), otherwise it is the same as ! * this.subString(toffset).startsWith(prefix). ! * ! * @param prefix String to compare ! * @param toffset offset for this String where comparison starts ! * @return true if this String starts with prefix ! * @throws NullPointerException if prefix is null ! * @see #regionMatches(boolean, int, String, int, int) ! */ ! public native boolean startsWith(String prefix, int toffset); ! ! /** ! * Predicate which determines if this String starts with a given prefix. ! * If the prefix is an empty String, true is returned. ! * ! * @param prefex String to compare ! * @return true if this String starts with the prefix ! * @throws NullPointerException if prefix is null ! * @see #startsWith(String, int) ! */ ! public boolean startsWith(String prefix) { return startsWith (prefix, 0); } ! /** ! * Predicate which determines if this String ends with a given suffix. ! * If the suffix is an empty String, true is returned. ! * ! * @param suffix String to compare ! * @return true if this String ends with the suffix ! * @throws NullPointerException if suffix is null ! * @see #regionMatches(boolean, int, String, int, int) ! */ ! public boolean endsWith(String suffix) { return regionMatches (this.count - suffix.count, suffix, 0, suffix.count); } ! /** ! * Computes the hashcode for this String. This is done with int arithmetic, ! * where ** represents exponentiation, by this formula:
            ! * s[0]*31**(n-1) + s[1]*31**(n-2) + ... + s[n-1]. ! * ! * @return hashcode value of this String ! */ ! public native int hashCode(); ! /** ! * Finds the first instance of a character in this String. ! * ! * @param ch character to find ! * @return location (base 0) of the character, or -1 if not found ! */ ! public int indexOf(int ch) { ! return indexOf(ch, 0); } ! /** ! * Finds the first instance of a character in this String, starting at ! * a given index. If starting index is less than 0, the search ! * starts at the beginning of this String. If the starting index ! * is greater than the length of this String, -1 is returned. ! * ! * @param ch character to find ! * @param fromIndex index to start the search ! * @return location (base 0) of the character, or -1 if not found ! */ ! public native int indexOf(int ch, int fromIndex); ! /** ! * Finds the last instance of a character in this String. ! * ! * @param ch character to find ! * @return location (base 0) of the character, or -1 if not found ! */ ! public int lastIndexOf(int ch) { ! return lastIndexOf(ch, count - 1); } ! /** ! * Finds the last instance of a character in this String, starting at ! * a given index. If starting index is greater than the maximum valid ! * index, then the search begins at the end of this String. If the ! * starting index is less than zero, -1 is returned. ! * ! * @param ch character to find ! * @param fromIndex index to start the search ! * @return location (base 0) of the character, or -1 if not found ! */ ! public native int lastIndexOf(int ch, int fromIndex); ! /** ! * Finds the first instance of a String in this String. ! * ! * @param str String to find ! * @return location (base 0) of the String, or -1 if not found ! * @throws NullPointerException if str is null ! */ ! public int indexOf(String str) { ! return indexOf(str, 0); } ! /** ! * Finds the first instance of a String in this String, starting at ! * a given index. If starting index is less than 0, the search ! * starts at the beginning of this String. If the starting index ! * is greater than the length of this String, -1 is returned. ! * ! * @param str String to find ! * @param fromIndex index to start the search ! * @return location (base 0) of the String, or -1 if not found ! * @throws NullPointerException if str is null ! */ ! public native int indexOf(String str, int fromIndex); ! /** ! * Finds the last instance of a String in this String. ! * ! * @param str String to find ! * @return location (base 0) of the String, or -1 if not found ! * @throws NullPointerException if str is null ! */ ! public int lastIndexOf(String str) { ! return lastIndexOf(str, count - str.count); } ! /** ! * Finds the last instance of a String in this String, starting at ! * a given index. If starting index is greater than the maximum valid ! * index, then the search begins at the end of this String. If the ! * starting index is less than zero, -1 is returned. ! * ! * @param str String to find ! * @param fromIndex index to start the search ! * @return location (base 0) of the String, or -1 if not found ! * @throws NullPointerException if str is null ! */ ! public int lastIndexOf(String str, int fromIndex) { if (fromIndex >= count) fromIndex = count - str.count; *************** public final class String implements Ser *** 315,355 **** /** * Creates a substring of this String, starting at a specified index * and ending at one character before a specified index. - *

            - * To implement CharSequence. - * Calls substring(beginIndex, endIndex). * ! * @param beginIndex index to start substring (base 0) ! * @param endIndex index after the last character to be ! * copied into the substring ! * * @return new String which is a substring of this String * ! * @exception StringIndexOutOfBoundsException ! * if (beginIndex < 0 || endIndex > this.length() || beginIndex > endIndex) */ public CharSequence subSequence(int beginIndex, int endIndex) - throws IndexOutOfBoundsException { return substring(beginIndex, endIndex); } ! public String substring (int beginIndex) { ! return substring (beginIndex, count); } ! public native String substring (int beginIndex, int endIndex); ! public native String concat (String str); ! public native String replace (char oldChar, char newChar); ! public native String toLowerCase (Locale locale); ! public native String toUpperCase (Locale locale); ! public String toLowerCase () { // The JDK is a bit confused about what to do here. If we pass in // the default Locale then special Locale handling might be --- 820,1028 ---- /** * Creates a substring of this String, starting at a specified index + * and ending at the end of this String. + * + * @param begin index to start substring (base 0) + * @return new String which is a substring of this String + * @throws IndexOutOfBoundsException if begin < 0 || begin > length() + * (while unspecified, this is a StringIndexOutOfBoundsException) + */ + public String substring(int begin) + { + return substring(begin, count); + } + + /** + * Creates a substring of this String, starting at a specified index * and ending at one character before a specified index. * ! * @param begin index to start substring (inclusive, base 0) ! * @param end index to end at (exclusive) * @return new String which is a substring of this String + * @throws IndexOutOfBoundsException if begin < 0 || end > length() + * || begin > end (while unspecified, this is a + * StringIndexOutOfBoundsException) + */ + public native String substring(int beginIndex, int endIndex); + + /** + * Creates a substring of this String, starting at a specified index + * and ending at one character before a specified index. This behaves like + * substring(beginIndex, endIndex). * ! * @param beginIndex index to start substring (inclusive, base 0) ! * @param endIndex index to end at (exclusive) ! * @return new String which is a substring of this String ! * @throws IndexOutOfBoundsException if begin < 0 || end > length() ! * || begin > end ! * @since 1.4 */ public CharSequence subSequence(int beginIndex, int endIndex) { return substring(beginIndex, endIndex); } ! /** ! * Concatenates a String to this String. This results in a new string unless ! * one of the two originals is "". ! * ! * @param str String to append to this String ! * @return newly concatenated String ! * @throws NullPointerException if str is null ! */ ! public native String concat(String str); ! ! /** ! * Replaces every instance of a character in this String with a new ! * character. If no replacements occur, this is returned. ! * ! * @param oldChar the old character to replace ! * @param newChar the new character ! * @return new String with all instances of oldChar replaced with newChar ! */ ! public native String replace(char oldChar, char newChar); ! ! /** ! * Test if this String matches a regular expression. This is shorthand for ! * {@link Pattern}.matches(regex, this). ! * ! * @param regex the pattern to match ! * @return true if the pattern matches ! * @throws NullPointerException if regex is null ! * @throws PatternSyntaxException if regex is invalid ! * @see Pattern#matches(String, CharSequence) ! * @since 1.4 ! */ ! public boolean matches(String regex) { ! return Pattern.matches(regex, this); } ! /** ! * Replaces the first substring match of the regular expression with a ! * given replacement. This is shorthand for {@link Pattern} ! * .compile(regex).matcher(this).replaceFirst(replacement). ! * ! * @param regex the pattern to match ! * @param replacement the replacement string ! * @return the modified string ! * @throws NullPointerException if regex or replacement is null ! * @throws PatternSyntaxException if regex is invalid ! * @see #replaceAll(String, String) ! * @see Pattern#compile(String) ! * @see Pattern#matcher(CharSequence) ! * @see Matcher#replaceFirst(String) ! * @since 1.4 ! */ ! public String replaceFirst(String regex, String replacement) ! { ! return Pattern.compile(regex).matcher(this).replaceFirst(replacement); ! } ! /** ! * Replaces all matching substrings of the regular expression with a ! * given replacement. This is shorthand for {@link Pattern} ! * .compile(regex).matcher(this).replaceAll(replacement). ! * ! * @param regex the pattern to match ! * @param replacement the replacement string ! * @return the modified string ! * @throws NullPointerException if regex or replacement is null ! * @throws PatternSyntaxException if regex is invalid ! * @see #replaceFirst(String, String) ! * @see Pattern#compile(String) ! * @see Pattern#matcher(CharSequence) ! * @see Matcher#replaceAll(String) ! * @since 1.4 ! */ ! public String replaceAll(String regex, String replacement) ! { ! return Pattern.compile(regex).matcher(this).replaceAll(replacement); ! } ! /** ! * Split this string around the matches of a regular expression. Each ! * element of the returned array is the largest block of characters not ! * terminated by the regular expression, in the order the matches are found. ! * ! *

            The limit affects the length of the array. If it is positive, the ! * array will contain at most n elements (n - 1 pattern matches). If ! * negative, the array length is unlimited, but there can be trailing empty ! * entries. if 0, the array length is unlimited, and trailing empty entries ! * are discarded. ! * ! *

            For example, splitting "boo:and:foo" yields:
            ! * ! * ! * ! * ! * ! * ! * ! * ! *
            Regex Limit Result
            ":" 2 { "boo", "and:foo" }
            ":" t { "boo", "and", "foo" }
            ":" -2 { "boo", "and", "foo" }
            "o" 5 { "b", "", ":and:f", "", "" }
            "o" -2 { "b", "", ":and:f", "", "" }
            "o" 0 { "b", "", ":and:f" }
            ! * ! *

            This is shorthand for ! * {@link Pattern}.compile(regex).split(this, limit). ! * ! * @param regex the pattern to match ! * @param limit the limit threshold ! * @return the array of split strings ! * @throws NullPointerException if regex or replacement is null ! * @throws PatternSyntaxException if regex is invalid ! * @see Pattern#compile(String) ! * @see Pattern#split(CharSequence, int) ! * @since 1.4 ! */ ! public String[] split(String regex, int limit) ! { ! return Pattern.compile(regex).split(this, limit); ! } ! /** ! * Split this string around the matches of a regular expression. Each ! * element of the returned array is the largest block of characters not ! * terminated by the regular expression, in the order the matches are found. ! * The array length is unlimited, and trailing empty entries are discarded, ! * as though calling split(regex, 0). ! * ! * @param regex the pattern to match ! * @return the array of split strings ! * @throws NullPointerException if regex or replacement is null ! * @throws PatternSyntaxException if regex is invalid ! * @see #split(String, int) ! * @see Pattern#compile(String) ! * @see Pattern#split(CharSequence, int) ! * @since 1.4 ! */ ! public String[] split(String regex) ! { ! return Pattern.compile(regex).split(this, 0); ! } ! /** ! * Lowercases this String according to a particular locale. This uses ! * Unicode's special case mappings, as applied to the given Locale, so the ! * resulting string may be a different length. ! * ! * @param loc locale to use ! * @return new lowercased String, or this if no characters were lowercased ! * @throws NullPointerException if loc is null ! * @see #toUpperCase(Locale) ! * @since 1.1 ! */ ! public native String toLowerCase(Locale locale); ! ! /** ! * Lowercases this String. This uses Unicode's special case mappings, as ! * applied to the platform's default Locale, so the resulting string may ! * be a different length. ! * ! * @return new lowercased String, or this if no characters were lowercased ! * @see #toLowerCase(Locale) ! * @see #toUpperCase() ! */ ! public String toLowerCase() { // The JDK is a bit confused about what to do here. If we pass in // the default Locale then special Locale handling might be *************** public final class String implements Ser *** 358,364 **** return toLowerCase (null); } ! public String toUpperCase () { // The JDK is a bit confused about what to do here. If we pass in // the default Locale then special Locale handling might be --- 1031,1059 ---- return toLowerCase (null); } ! /** ! * Uppercases this String according to a particular locale. This uses ! * Unicode's special case mappings, as applied to the given Locale, so the ! * resulting string may be a different length. ! * ! * @param loc locale to use ! * @return new uppercased String, or this if no characters were uppercased ! * @throws NullPointerException if loc is null ! * @see #toLowerCase(Locale) ! * @since 1.1 ! */ ! public native String toUpperCase(Locale locale); ! ! /** ! * Uppercases this String. This uses Unicode's special case mappings, as ! * applied to the platform's default Locale, so the resulting string may ! * be a different length. ! * ! * @return new uppercased String, or this if no characters were uppercased ! * @see #toUpperCase(Locale) ! * @see #toLowerCase() ! */ ! public String toUpperCase() { // The JDK is a bit confused about what to do here. If we pass in // the default Locale then special Locale handling might be *************** public final class String implements Ser *** 367,417 **** return toUpperCase (null); } ! public native String trim (); ! public static String valueOf (Object obj) { return obj == null ? "null" : obj.toString(); } ! public static String valueOf (char[] data) { return valueOf (data, 0, data.length); } ! public static native String valueOf (char[] data, int offset, int count); ! public static String valueOf (boolean b) { return b ? "true" : "false"; } ! public static native String valueOf (char c); ! public static native String valueOf (int i); ! public static String valueOf (long l) { return Long.toString(l); } ! public static String valueOf (float f) { return Float.toString(f); } ! public static String valueOf (double d) { return Double.toString(d); } ! public native String intern (); ! private native void init (); ! private native void init (char[] chars, int offset, int count, ! boolean dont_copy); ! private native void init (byte[] chars, int hibyte, int offset, int count); ! private native void init (byte[] chars, int offset, int count, String enc) throws UnsupportedEncodingException; ! private static native void rehash (); } --- 1062,1258 ---- return toUpperCase (null); } ! /** ! * Trims all characters less than or equal to '\u0020' ! * (' ') from the beginning and end of this String. This ! * includes many, but not all, ASCII control characters, and all ! * {@link Character#whitespace(char)}. ! * ! * @return new trimmed String, or this if nothing trimmed ! */ ! public native String trim(); ! /** ! * Returns this, as it is already a String! ! * ! * @return this ! */ ! public String toString() ! { ! return this; ! } ! ! /** ! * Copies the contents of this String into a character array. Subsequent ! * changes to the array do not affect the String. ! * ! * @return character array copying the String ! */ ! public native char[] toCharArray(); ! ! /** ! * Returns a String representation of an Object. This is "null" if the ! * object is null, otherwise it is obj.toString() (which ! * can be null). ! * ! * @param obj the Object ! * @return the string conversion of obj ! */ ! public static String valueOf(Object obj) { return obj == null ? "null" : obj.toString(); } ! /** ! * Returns a String representation of a character array. Subsequent ! * changes to the array do not affect the String. ! * ! * @param data the character array ! * @return a String containing the same character sequence as data ! * @throws NullPointerException if data is null ! * @see #valueOf(char[], int, int) ! * @see #String(char[]) ! */ ! public static String valueOf(char[] data) { return valueOf (data, 0, data.length); } ! /** ! * Returns a String representing the character sequence of the char array, ! * starting at the specified offset, and copying chars up to the specified ! * count. Subsequent changes to the array do not affect the String. ! * ! * @param data character array ! * @param offset position (base 0) to start copying out of data ! * @param count the number of characters from data to copy ! * @return String containing the chars from data[offset..offset+count] ! * @throws NullPointerException if data is null ! * @throws IndexOutOfBoundsException if (offset < 0 || count < 0 ! * || offset + count > data.length) ! * (while unspecified, this is a StringIndexOutOfBoundsException) ! * @see #String(char[], int, int) ! */ ! public static native String valueOf(char[] data, int offset, int count); ! /** ! * Returns a String representing the character sequence of the char array, ! * starting at the specified offset, and copying chars up to the specified ! * count. Subsequent changes to the array do not affect the String. ! * ! * @param data character array ! * @param offset position (base 0) to start copying out of data ! * @param count the number of characters from data to copy ! * @return String containing the chars from data[offset..offset+count] ! * @throws NullPointerException if data is null ! * @throws IndexOutOfBoundsException if (offset < 0 || count < 0 ! * || offset + count > data.length) ! * (while unspecified, this is a StringIndexOutOfBoundsException) ! * @see #String(char[], int, int) ! */ ! public static String copyValueOf(char[] data, int offset, int count) ! { ! String r = new String (); ! r.init(data, offset, count, false); ! return r; ! } ! ! /** ! * Returns a String representation of a character array. Subsequent ! * changes to the array do not affect the String. ! * ! * @param data the character array ! * @return a String containing the same character sequence as data ! * @throws NullPointerException if data is null ! * @see #copyValueOf(char[], int, int) ! * @see #String(char[]) ! */ ! public static String copyValueOf(char[] data) ! { ! return copyValueOf (data, 0, data.length); ! } ! ! /** ! * Returns a String representing a boolean. ! * ! * @param b the boolean ! * @return "true" if b is true, else "false" ! */ ! public static String valueOf(boolean b) { return b ? "true" : "false"; } ! /** ! * Returns a String representing a character. ! * ! * @param c the character ! * @return String containing the single character c ! */ ! public static native String valueOf(char c); ! /** ! * Returns a String representing an integer. ! * ! * @param i the integer ! * @return String containing the integer in base 10 ! * @see Integer#toString(int) ! */ ! public static native String valueOf(int i); ! /** ! * Returns a String representing a long. ! * ! * @param l the long ! * @return String containing the long in base 10 ! * @see Long#toString(long) ! */ ! public static String valueOf(long l) { return Long.toString(l); } ! /** ! * Returns a String representing a float. ! * ! * @param f the float ! * @return String containing the float ! * @see Float#toString(float) ! */ ! public static String valueOf(float f) { return Float.toString(f); } ! /** ! * Returns a String representing a double. ! * ! * @param d the double ! * @return String containing the double ! * @see Double#toString(double) ! */ ! public static String valueOf(double d) { return Double.toString(d); } ! /** ! * Fetches this String from the intern hashtable. If two Strings are ! * considered equal, by the equals() method, then intern() will return the ! * same String instance. ie. if (s1.equals(s2)) then ! * (s1.intern() == s2.intern()). All string literals and string-valued ! * constant expressions are already interned. ! * ! * @return the interned String ! */ ! public native String intern(); ! ! private native void init(char[] chars, int offset, int count, ! boolean dont_copy); ! private native void init(byte[] chars, int hibyte, int offset, int count); ! private native void init(byte[] chars, int offset, int count, String enc) throws UnsupportedEncodingException; ! private native void init(gnu.gcj.runtime.StringBuffer buffer); ! private static native void rehash(); } diff -Nrc3pad gcc-3.3.3/libjava/java/lang/System.java gcc-3.4.0/libjava/java/lang/System.java *** gcc-3.3.3/libjava/java/lang/System.java 2003-02-14 17:44:31.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/System.java 2003-09-24 01:56:56.000000000 +0000 *************** exception statement from your version. * *** 38,44 **** package java.lang; ! import java.io.*; import java.util.Properties; import java.util.PropertyPermission; import gnu.classpath.Configuration; --- 38,50 ---- package java.lang; ! import java.io.BufferedInputStream; ! import java.io.BufferedOutputStream; ! import java.io.FileDescriptor; ! import java.io.FileInputStream; ! import java.io.FileOutputStream; ! import java.io.InputStream; ! import java.io.PrintStream; import java.util.Properties; import java.util.PropertyPermission; import gnu.classpath.Configuration; *************** public final class System *** 93,98 **** --- 99,109 ---- defaultProperties.put("gnu.cpu.endian", isWordsBigEndian() ? "big" : "little"); + + // GCJ LOCAL: Classpath sets common encoding aliases here. + // Since we don't (yet) have gnu.java.io.EncodingManager, these + // are a waste of time and just slow down system startup. + // XXX FIXME - Temp hack for old systems that set the wrong property if (defaultProperties.get("java.io.tmpdir") == null) defaultProperties.put("java.io.tmpdir", *************** public final class System *** 184,189 **** --- 195,201 ---- SecurityManager sm = Runtime.securityManager; // Be thread-safe. if (sm != null) sm.checkPermission(new RuntimePermission("setIO")); + setOut0(out); } diff -Nrc3pad gcc-3.3.3/libjava/java/lang/ThreadGroup.java gcc-3.4.0/libjava/java/lang/ThreadGroup.java *** gcc-3.3.3/libjava/java/lang/ThreadGroup.java 2002-06-18 15:39:39.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/ThreadGroup.java 2003-08-26 23:14:07.000000000 +0000 *************** public class ThreadGroup *** 718,723 **** --- 718,724 ---- if (groups == null) return; threads.remove(t); + t.group = null; // Daemon groups are automatically destroyed when all their threads die. if (daemon_flag && groups.size() == 0 && threads.size() == 0) { diff -Nrc3pad gcc-3.3.3/libjava/java/lang/Thread.java gcc-3.4.0/libjava/java/lang/Thread.java *** gcc-3.3.3/libjava/java/lang/Thread.java 2002-10-07 21:02:38.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/Thread.java 2003-10-21 04:46:19.000000000 +0000 *************** *** 1,6 **** // Thread.java - Thread class. ! /* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation This file is part of libgcj. --- 1,6 ---- // Thread.java - Thread class. ! /* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation This file is part of libgcj. *************** package java.lang; *** 12,41 **** import gnu.gcj.RawData; - /** - * @author Tom Tromey - * @date August 24, 1998 - */ - /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 * "The Java Language Specification", ISBN 0-201-63451-1 * plus online API docs for JDK 1.2 beta from http://www.javasoft.com. ! * Status: Believed complete to version 1.3, with caveats. We do not * implement the deprecated (and dangerous) stop, suspend, and resume * methods. Security implementation is not complete. */ public class Thread implements Runnable { public final static int MAX_PRIORITY = 10; public final static int MIN_PRIORITY = 1; public final static int NORM_PRIORITY = 5; public static int activeCount () { return currentThread().getThreadGroup().activeCount(); } public final void checkAccess () { SecurityManager s = System.getSecurityManager(); --- 12,95 ---- import gnu.gcj.RawData; /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 * "The Java Language Specification", ISBN 0-201-63451-1 * plus online API docs for JDK 1.2 beta from http://www.javasoft.com. ! * Status: Believed complete to version 1.4, with caveats. We do not * implement the deprecated (and dangerous) stop, suspend, and resume * methods. Security implementation is not complete. */ + /** + * Thread represents a single thread of execution in the VM. When an + * application VM starts up, it creates a non-daemon Thread which calls the + * main() method of a particular class. There may be other Threads running, + * such as the garbage collection thread. + * + *

            Threads have names to identify them. These names are not necessarily + * unique. Every Thread has a priority, as well, which tells the VM which + * Threads should get more running time. New threads inherit the priority + * and daemon status of the parent thread, by default. + * + *

            There are two methods of creating a Thread: you may subclass Thread and + * implement the run() method, at which point you may start the + * Thread by calling its start() method, or you may implement + * Runnable in the class you want to use and then call new + * Thread(your_obj).start(). + * + *

            The virtual machine runs until all non-daemon threads have died (either + * by returning from the run() method as invoked by start(), or by throwing + * an uncaught exception); or until System.exit is called with + * adequate permissions. + * + *

            It is unclear at what point a Thread should be added to a ThreadGroup, + * and at what point it should be removed. Should it be inserted when it + * starts, or when it is created? Should it be removed when it is suspended + * or interrupted? The only thing that is clear is that the Thread should be + * removed when it is stopped. + * + * @author Tom Tromey + * @author John Keiser + * @author Eric Blake + * @see Runnable + * @see Runtime#exit(int) + * @see #run() + * @see #start() + * @see ThreadLocal + * @since 1.0 + * @status updated to 1.4 + */ public class Thread implements Runnable { + /** The maximum priority for a Thread. */ public final static int MAX_PRIORITY = 10; + + /** The minimum priority for a Thread. */ public final static int MIN_PRIORITY = 1; + + /** The priority a Thread gets by default. */ public final static int NORM_PRIORITY = 5; + /** + * Get the number of active threads in the current Thread's ThreadGroup. + * This implementation calls + * currentThread().getThreadGroup().activeCount(). + * + * @return the number of active threads in the current ThreadGroup + * @see ThreadGroup#activeCount() + */ public static int activeCount () { return currentThread().getThreadGroup().activeCount(); } + /** + * Check whether the current Thread is allowed to modify this Thread. This + * passes the check on to SecurityManager.checkAccess(this). + * + * @throws SecurityException if the current Thread cannot modify this Thread + * @see SecurityManager#checkAccess(Thread) + */ public final void checkAccess () { SecurityManager s = System.getSecurityManager(); *************** public class Thread implements Runnable *** 43,120 **** s.checkAccess(this); } public native int countStackFrames (); public static native Thread currentThread (); public native void destroy (); public static void dumpStack () { (new Exception ("Stack trace")).printStackTrace (); } public static int enumerate (Thread[] threads) { return currentThread().group.enumerate(threads); } ! public final String getName () { return name; } public final int getPriority () { return priority; } public final ThreadGroup getThreadGroup () { return group; } public native void interrupt (); public static boolean interrupted () { return currentThread().isInterrupted (true); } ! // Check the threads interrupted status. Note that this does not clear the ! // thread's interrupted status (per JDK 1.2 online API documentation). public boolean isInterrupted () { return interrupt_flag; } public final boolean isAlive () { return alive_flag; } public final boolean isDaemon () { return daemon_flag; } public final void join () throws InterruptedException { join (0, 0); } public final void join (long timeout) throws InterruptedException { join (timeout, 0); } public final native void join (long timeout, int nanos) throws InterruptedException; public final native void resume (); private final native void finish_ (); ! // Check the thread's interrupted status. If clear_flag is true, the ! // thread's interrupted status is also cleared. private boolean isInterrupted (boolean clear_flag) { boolean r = interrupt_flag; --- 97,324 ---- s.checkAccess(this); } + /** + * Count the number of stack frames in this Thread. The Thread in question + * must be suspended when this occurs. + * + * @return the number of stack frames in this Thread + * @throws IllegalThreadStateException if this Thread is not suspended + * @deprecated pointless, since suspend is deprecated + */ public native int countStackFrames (); + + /** + * Get the currently executing Thread. + * + * @return the currently executing Thread + */ public static native Thread currentThread (); + + /** + * Originally intended to destroy this thread, this method was never + * implemented by Sun, and is hence a no-op. + */ public native void destroy (); + /** + * Print a stack trace of the current thread to stderr using the same + * format as Throwable's printStackTrace() method. + * + * @see Throwable#printStackTrace() + */ public static void dumpStack () { (new Exception ("Stack trace")).printStackTrace (); } + /** + * Copy every active thread in the current Thread's ThreadGroup into the + * array. Extra threads are silently ignored. This implementation calls + * getThreadGroup().enumerate(array), which may have a + * security check, checkAccess(group). + * + * @param array the array to place the Threads into + * @return the number of Threads placed into the array + * @throws NullPointerException if array is null + * @throws SecurityException if you cannot access the ThreadGroup + * @see ThreadGroup#enumerate(Thread[]) + * @see #activeCount() + * @see SecurityManager#checkAccess(ThreadGroup) + */ public static int enumerate (Thread[] threads) { return currentThread().group.enumerate(threads); } ! ! /** ! * Get this Thread's name. ! * ! * @return this Thread's name ! */ public final String getName () { return name; } + /** + * Get this Thread's priority. + * + * @return the Thread's priority + */ public final int getPriority () { return priority; } + /** + * Get the ThreadGroup this Thread belongs to. If the thread has died, this + * returns null. + * + * @return this Thread's ThreadGroup + */ public final ThreadGroup getThreadGroup () { return group; } + /** + * Return true if this Thread holds the object's lock, false otherwise. + * + * @param obj the object to test lock ownership on. + * @throws NullPointerException if obj is null. + * @since 1.4 + */ + public static native boolean holdsLock (Object obj); + + /** + * Interrupt this Thread. First, there is a security check, + * checkAccess. Then, depending on the current state of the + * thread, various actions take place: + * + *

            If the thread is waiting because of {@link #wait()}, + * {@link #sleep(long)}, or {@link #join()}, its interrupt status + * will be cleared, and an InterruptedException will be thrown. Notice that + * this case is only possible if an external thread called interrupt(). + * + *

            If the thread is blocked in an interruptible I/O operation, in + * {@link java.nio.channels.InterruptibleChannel}, the interrupt + * status will be set, and ClosedByInterruptException will be thrown. + * + *

            If the thread is blocked on a {@link java.nio.channels.Selector}, the + * interrupt status will be set, and the selection will return, with + * a possible non-zero value, as though by the wakeup() method. + * + *

            Otherwise, the interrupt status will be set. + * + * @throws SecurityException if you cannot modify this Thread + */ public native void interrupt (); + /** + * Determine whether the current Thread has been interrupted, and clear + * the interrupted status in the process. + * + * @return whether the current Thread has been interrupted + * @see #isInterrupted() + */ public static boolean interrupted () { return currentThread().isInterrupted (true); } ! /** ! * Determine whether the given Thread has been interrupted, but leave ! * the interrupted status alone in the process. ! * ! * @return whether the current Thread has been interrupted ! * @see #interrupted() ! */ public boolean isInterrupted () { return interrupt_flag; } + /** + * Determine whether this Thread is alive. A thread which is alive has + * started and not yet died. + * + * @return whether this Thread is alive + */ public final boolean isAlive () { return alive_flag; } + /** + * Tell whether this is a daemon Thread or not. + * + * @return whether this is a daemon Thread or not + * @see #setDaemon(boolean) + */ public final boolean isDaemon () { return daemon_flag; } + /** + * Wait forever for the Thread in question to die. + * + * @throws InterruptedException if the Thread is interrupted; it's + * interrupted status will be cleared + */ public final void join () throws InterruptedException { join (0, 0); } + /** + * Wait the specified amount of time for the Thread in question to die. + * + * @param ms the number of milliseconds to wait, or 0 for forever + * @throws InterruptedException if the Thread is interrupted; it's + * interrupted status will be cleared + */ public final void join (long timeout) throws InterruptedException { join (timeout, 0); } + /** + * Wait the specified amount of time for the Thread in question to die. + * + *

            Note that 1,000,000 nanoseconds == 1 millisecond, but most VMs do + * not offer that fine a grain of timing resolution. Besides, there is + * no guarantee that this thread can start up immediately when time expires, + * because some other thread may be active. So don't expect real-time + * performance. + * + * @param ms the number of milliseconds to wait, or 0 for forever + * @param ns the number of extra nanoseconds to sleep (0-999999) + * @throws InterruptedException if the Thread is interrupted; it's + * interrupted status will be cleared + * @throws IllegalArgumentException if ns is invalid + * @XXX A ThreadListener would be nice, to make this efficient. + */ public final native void join (long timeout, int nanos) throws InterruptedException; + /** + * Resume a suspended thread. + * + * @see #resume() + * @deprecated pointless, since suspend is deprecated + */ public final native void resume (); private final native void finish_ (); ! /** ! * Determine whether the given Thread has been interrupted, but leave ! * the interrupted status alone in the process. ! * ! * @return whether the current Thread has been interrupted ! * @see #interrupted() ! */ private boolean isInterrupted (boolean clear_flag) { boolean r = interrupt_flag; *************** public class Thread implements Runnable *** 128,139 **** --- 332,362 ---- return r; } + /** + * The method of Thread that will be run if there is no Runnable object + * associated with the Thread. Thread's implementation does nothing at all. + * + * @see #start() + * @see #Thread(ThreadGroup, Runnable, String) + */ public void run () { if (runnable != null) runnable.run(); } + /** + * Set the daemon status of this Thread. If this is a daemon Thread, then + * the VM may exit even if it is still running. This may only be called + * before the Thread starts running. There may be a security check, + * checkAccess. + * + * @param daemon whether this should be a daemon thread or not + * @throws SecurityException if you cannot modify this Thread + * @throws IllegalThreadStateException if the Thread is active + * @see #isDaemon() + * @see #checkAccess() + */ public final void setDaemon (boolean status) { checkAccess (); *************** public class Thread implements Runnable *** 142,147 **** --- 365,384 ---- daemon_flag = status; } + /** + * Returns the context classloader of this Thread. The context + * classloader can be used by code that want to load classes depending + * on the current thread. Normally classes are loaded depending on + * the classloader of the current class. There may be a security check + * for RuntimePermission("getClassLoader") if the caller's + * class loader is not null or an ancestor of this thread's context class + * loader. + * + * @return the context class loader + * @throws SecurityException when permission is denied + * @see setContextClassLoader(ClassLoader) + * @since 1.2 + */ public synchronized ClassLoader getContextClassLoader() { if (context_class_loader == null) *************** public class Thread implements Runnable *** 168,173 **** --- 405,424 ---- return context_class_loader; } + /** + * Returns the context classloader of this Thread. The context + * classloader can be used by code that want to load classes depending + * on the current thread. Normally classes are loaded depending on + * the classloader of the current class. There may be a security check + * for RuntimePermission("getClassLoader") if the caller's + * class loader is not null or an ancestor of this thread's context class + * loader. + * + * @return the context class loader + * @throws SecurityException when permission is denied + * @see setContextClassLoader(ClassLoader) + * @since 1.2 + */ public synchronized void setContextClassLoader(ClassLoader cl) { SecurityManager s = System.getSecurityManager (); *************** public class Thread implements Runnable *** 176,181 **** --- 427,440 ---- context_class_loader = cl; } + /** + * Set this Thread's name. There may be a security check, + * checkAccess. + * + * @param name the new name for this Thread + * @throws NullPointerException if name is null + * @throws SecurityException if you cannot modify this Thread + */ public final void setName (String n) { checkAccess (); *************** public class Thread implements Runnable *** 186,202 **** --- 445,542 ---- name = n; } + /** + * Set this Thread's priority. There may be a security check, + * checkAccess, then the priority is set to the smaller of + * priority and the ThreadGroup maximum priority. + * + * @param priority the new priority for this Thread + * @throws IllegalArgumentException if priority exceeds MIN_PRIORITY or + * MAX_PRIORITY + * @throws SecurityException if you cannot modify this Thread + * @see #getPriority() + * @see #checkAccess() + * @see ThreadGroup#getMaxPriority() + * @see #MIN_PRIORITY + * @see #MAX_PRIORITY + */ public final native void setPriority (int newPriority); + /** + * Suspend the current Thread's execution for the specified amount of + * time. The Thread will not lose any locks it has during this time. There + * are no guarantees which thread will be next to run, but most VMs will + * choose the highest priority thread that has been waiting longest. + * + * @param ms the number of milliseconds to sleep, or 0 for forever + * @throws InterruptedException if the Thread is interrupted; it's + * interrupted status will be cleared + * @see #notify() + * @see #wait(long) + */ public static void sleep (long timeout) throws InterruptedException { sleep (timeout, 0); } + /** + * Suspend the current Thread's execution for the specified amount of + * time. The Thread will not lose any locks it has during this time. There + * are no guarantees which thread will be next to run, but most VMs will + * choose the highest priority thread that has been waiting longest. + * + *

            Note that 1,000,000 nanoseconds == 1 millisecond, but most VMs do + * not offer that fine a grain of timing resolution. Besides, there is + * no guarantee that this thread can start up immediately when time expires, + * because some other thread may be active. So don't expect real-time + * performance. + * + * @param ms the number of milliseconds to sleep, or 0 for forever + * @param ns the number of extra nanoseconds to sleep (0-999999) + * @throws InterruptedException if the Thread is interrupted; it's + * interrupted status will be cleared + * @throws IllegalArgumentException if ns is invalid + * @see #notify() + * @see #wait(long, int) + */ public static native void sleep (long timeout, int nanos) throws InterruptedException; + + /** + * Start this Thread, calling the run() method of the Runnable this Thread + * was created with, or else the run() method of the Thread itself. This + * is the only way to start a new thread; calling run by yourself will just + * stay in the same thread. The virtual machine will remove the thread from + * its thread group when the run() method completes. + * + * @throws IllegalThreadStateException if the thread has already started + * @see #run() + */ public native void start (); + /** + * Cause this Thread to stop abnormally because of the throw of a ThreadDeath + * error. If you stop a Thread that has not yet started, it will stop + * immediately when it is actually started. + * + *

            This is inherently unsafe, as it can interrupt synchronized blocks and + * leave data in bad states. Hence, there is a security check: + * checkAccess(this), plus another one if the current thread + * is not this: RuntimePermission("stopThread"). If you must + * catch a ThreadDeath, be sure to rethrow it after you have cleaned up. + * ThreadDeath is the only exception which does not print a stack trace when + * the thread dies. + * + * @throws SecurityException if you cannot stop the Thread + * @see #interrupt() + * @see #checkAccess() + * @see #start() + * @see ThreadDeath + * @see ThreadGroup#uncaughtException(Thread, Throwable) + * @see SecurityManager#checkAccess(Thread) + * @see SecurityManager#checkPermission(Permission) + * @deprecated unsafe operation, try not to use + */ public final void stop () { // Argument doesn't matter, because this is no longer *************** public class Thread implements Runnable *** 204,228 **** stop (null); } public final native void stop (Throwable e); public final native void suspend (); private final native void initialize_native (); private final native static String gen_name (); public Thread (ThreadGroup g, Runnable r, String n) { this (currentThread (), g, r, n); ! // The Class Libraries book says ``threadName cannot be null''. I ! // take this to mean NullPointerException. ! if (n == null) ! throw new NullPointerException (); } private Thread (Thread current, ThreadGroup g, Runnable r, String n) { if (g == null) { // If CURRENT is null, then we are bootstrapping the first thread. --- 544,663 ---- stop (null); } + /** + * Cause this Thread to stop abnormally and throw the specified exception. + * If you stop a Thread that has not yet started, it will stop immediately + * when it is actually started. WARNINGThis bypasses Java security, + * and can throw a checked exception which the call stack is unprepared to + * handle. Do not abuse this power. + * + *

            This is inherently unsafe, as it can interrupt synchronized blocks and + * leave data in bad states. Hence, there is a security check: + * checkAccess(this), plus another one if the current thread + * is not this: RuntimePermission("stopThread"). If you must + * catch a ThreadDeath, be sure to rethrow it after you have cleaned up. + * ThreadDeath is the only exception which does not print a stack trace when + * the thread dies. + * + * @param t the Throwable to throw when the Thread dies + * @throws SecurityException if you cannot stop the Thread + * @throws NullPointerException in the calling thread, if t is null + * @see #interrupt() + * @see #checkAccess() + * @see #start() + * @see ThreadDeath + * @see ThreadGroup#uncaughtException(Thread, Throwable) + * @see SecurityManager#checkAccess(Thread) + * @see SecurityManager#checkPermission(Permission) + * @deprecated unsafe operation, try not to use + */ public final native void stop (Throwable e); + + /** + * Suspend this Thread. It will not come back, ever, unless it is resumed. + * + *

            This is inherently unsafe, as the suspended thread still holds locks, + * and can potentially deadlock your program. Hence, there is a security + * check: checkAccess. + * + * @throws SecurityException if you cannot suspend the Thread + * @see #checkAccess() + * @see #resume() + * @deprecated unsafe operation, try not to use + */ public final native void suspend (); private final native void initialize_native (); private final native static String gen_name (); + /** + * Allocate a new Thread object, with the specified ThreadGroup and name, and + * using the specified Runnable object's run() method to + * execute. If the Runnable object is null, this (which is + * a Runnable) is used instead. + * + *

            If the ThreadGroup is null, the security manager is checked. If a + * manager exists and returns a non-null object for + * getThreadGroup, that group is used; otherwise the group + * of the creating thread is used. Note that the security manager calls + * checkAccess if the ThreadGroup is not null. + * + *

            The new Thread will inherit its creator's priority and daemon status. + * These can be changed with setPriority and + * setDaemon. + * + * @param group the group to put the Thread into + * @param target the Runnable object to execute + * @param name the name for the Thread + * @throws NullPointerException if name is null + * @throws SecurityException if this thread cannot access group + * @throws IllegalThreadStateException if group is destroyed + * @see Runnable#run() + * @see #run() + * @see #setDaemon(boolean) + * @see #setPriority(int) + * @see SecurityManager#checkAccess(ThreadGroup) + * @see ThreadGroup#checkAccess() + */ public Thread (ThreadGroup g, Runnable r, String n) { this (currentThread (), g, r, n); + } ! /** ! * Allocate a new Thread object, as if by ! * Thread(group, null, name), and give it the specified stack ! * size, in bytes. The stack size is highly platform independent, ! * and the virtual machine is free to round up or down, or ignore it ! * completely. A higher value might let you go longer before a ! * StackOverflowError, while a lower value might let you go ! * longer before an OutOfMemoryError. Or, it may do absolutely ! * nothing! So be careful, and expect to need to tune this value if your ! * virtual machine even supports it. ! * ! * @param group the group to put the Thread into ! * @param target the Runnable object to execute ! * @param name the name for the Thread ! * @param size the stack size, in bytes; 0 to be ignored ! * @throws NullPointerException if name is null ! * @throws SecurityException if this thread cannot access group ! * @throws IllegalThreadStateException if group is destroyed ! * @since 1.4 ! */ ! public Thread (ThreadGroup g, Runnable r, String n, long size) ! { ! // Just ignore stackSize for now. ! this (currentThread (), g, r, n); } private Thread (Thread current, ThreadGroup g, Runnable r, String n) { + // The Class Libraries book says ``threadName cannot be null''. I + // take this to mean NullPointerException. + if (n == null) + throw new NullPointerException (); + if (g == null) { // If CURRENT is null, then we are bootstrapping the first thread. *************** public class Thread implements Runnable *** 264,305 **** --- 699,850 ---- initialize_native (); } + /** + * Allocates a new Thread object. This constructor has + * the same effect as Thread(null, null, + * gname), where gname is + * a newly generated name. Automatically generated names are of the + * form "Thread-"+n, where n is an integer. + *

            + * Threads created this way must have overridden their + * run() method to actually do anything. An example + * illustrating this method being used follows: + *

            +    *     import java.lang.*;
            +    *
            +    *     class plain01 implements Runnable {
            +    *         String name;
            +    *         plain01() {
            +    *             name = null;
            +    *         }
            +    *         plain01(String s) {
            +    *             name = s;
            +    *         }
            +    *         public void run() {
            +    *             if (name == null)
            +    *                 System.out.println("A new thread created");
            +    *             else
            +    *                 System.out.println("A new thread with name " + name +
            +    *                                    " created");
            +    *         }
            +    *     }
            +    *     class threadtest01 {
            +    *         public static void main(String args[] ) {
            +    *             int failed = 0 ;
            +    *
            +    *             Thread t1 = new Thread();
            +    *             if (t1 != null)
            +    *                 System.out.println("new Thread() succeed");
            +    *             else {
            +    *                 System.out.println("new Thread() failed");
            +    *                 failed++;
            +    *             }
            +    *         }
            +    *     }
            +    * 
            + * + * @see java.lang.Thread#Thread(java.lang.ThreadGroup, + * java.lang.Runnable, java.lang.String) + */ public Thread () { this (null, null, gen_name ()); } + /** + * Allocates a new Thread object. This constructor has + * the same effect as Thread(null, target, + * gname), where gname is + * a newly generated name. Automatically generated names are of the + * form "Thread-"+n, where n is an integer. + * + * @param target the object whose run method is called. + * @see java.lang.Thread#Thread(java.lang.ThreadGroup, + * java.lang.Runnable, java.lang.String) + */ public Thread (Runnable r) { this (null, r, gen_name ()); } + /** + * Allocates a new Thread object. This constructor has + * the same effect as Thread(null, null, name). + * + * @param name the name of the new thread. + * @see java.lang.Thread#Thread(java.lang.ThreadGroup, + * java.lang.Runnable, java.lang.String) + */ public Thread (String n) { this (null, null, n); } + /** + * Allocates a new Thread object. This constructor has + * the same effect as Thread(group, target, + * gname), where gname is + * a newly generated name. Automatically generated names are of the + * form "Thread-"+n, where n is an integer. + * + * @param group the thread group. + * @param target the object whose run method is called. + * @exception SecurityException if the current thread cannot create a + * thread in the specified thread group. + * @see java.lang.Thread#Thread(java.lang.ThreadGroup, + * java.lang.Runnable, java.lang.String) + */ public Thread (ThreadGroup g, Runnable r) { this (g, r, gen_name ()); } + /** + * Allocates a new Thread object. This constructor has + * the same effect as Thread(group, null, name) + * + * @param group the thread group. + * @param name the name of the new thread. + * @exception SecurityException if the current thread cannot create a + * thread in the specified thread group. + * @see java.lang.Thread#Thread(java.lang.ThreadGroup, + * java.lang.Runnable, java.lang.String) + */ public Thread (ThreadGroup g, String n) { this (g, null, n); } + /** + * Allocates a new Thread object. This constructor has + * the same effect as Thread(null, target, name). + * + * @param target the object whose run method is called. + * @param name the name of the new thread. + * @see java.lang.Thread#Thread(java.lang.ThreadGroup, + * java.lang.Runnable, java.lang.String) + */ public Thread (Runnable r, String n) { this (null, r, n); } + /** + * Returns a string representation of this thread, including the + * thread's name, priority, and thread group. + * + * @return a string representation of this thread. + */ public String toString () { return "Thread[" + name + "," + priority + "," + (group == null ? "" : group.getName()) + "]"; } + /** + * Causes the currently executing thread object to temporarily pause + * and allow other threads to execute. + */ public static native void yield (); // Private data. diff -Nrc3pad gcc-3.3.3/libjava/java/lang/ThreadLocal.java gcc-3.4.0/libjava/java/lang/ThreadLocal.java *** gcc-3.3.3/libjava/java/lang/ThreadLocal.java 2002-06-15 19:45:31.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/ThreadLocal.java 2003-08-26 23:14:07.000000000 +0000 *************** *** 1,5 **** /* ThreadLocal -- a variable with a unique value per thread ! Copyright (C) 2000, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ThreadLocal -- a variable with a unique value per thread ! Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,42 **** --- 37,43 ---- package java.lang; + import java.util.Collections; import java.util.Map; import java.util.WeakHashMap; *************** public class ThreadLocal *** 101,107 **** * set(Thread, Object) and get(Thread) methods * access it. Package visible for use by InheritableThreadLocal. */ ! final Map valueMap = new WeakHashMap(); /** * Creates a ThreadLocal object without associating any value to it yet. --- 102,108 ---- * set(Thread, Object) and get(Thread) methods * access it. Package visible for use by InheritableThreadLocal. */ ! final Map valueMap = Collections.synchronizedMap(new WeakHashMap()); /** * Creates a ThreadLocal object without associating any value to it yet. *************** public class ThreadLocal *** 135,141 **** { Thread currentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will ! // ever modify the returned value. Object value = valueMap.get(currentThread); if (value == null) { --- 136,142 ---- { Thread currentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will ! // ever modify the returned value and valueMap is a synchronizedMap. Object value = valueMap.get(currentThread); if (value == null) { *************** public class ThreadLocal *** 156,162 **** public void set(Object value) { // Note that we don't have to synchronize, as only this thread will ! // ever modify the returned value. valueMap.put(Thread.currentThread(), value == null ? NULL : value); } } --- 157,163 ---- public void set(Object value) { // Note that we don't have to synchronize, as only this thread will ! // ever modify the returned value and valueMap is a synchronizedMap. valueMap.put(Thread.currentThread(), value == null ? NULL : value); } } diff -Nrc3pad gcc-3.3.3/libjava/java/lang/VMClassLoader.java gcc-3.4.0/libjava/java/lang/VMClassLoader.java *** gcc-3.3.3/libjava/java/lang/VMClassLoader.java 2002-09-30 05:19:09.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/VMClassLoader.java 2003-10-02 15:34:28.000000000 +0000 *************** *** 1,66 **** ! /* ! * java.lang.ClassLoader: part of the Java Class Libraries project. ! * Copyright (C) 1998, 2001, 2002 Free Software Foundation ! * ! * This library is free software; you can redistribute it and/or ! * modify it under the terms of the GNU Library General Public ! * License as published by the Free Software Foundation; either ! * version 2 of the License, or (at your option) any later version. ! * ! * This library is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! * Library General Public License for more details. ! * ! * You should have received a copy of the GNU Library General Public ! * License along with this library; if not, write to the ! * Free Software Foundation, Inc., 59 Temple Place - Suite 330, ! * Boston, MA 02111-1307, USA. ! */ package java.lang; ! import java.util.*; /** * java.lang.VMClassLoader is a package-private helper for VMs to implement * on behalf of java.lang.ClassLoader. * * @author John Keiser ! * @version 1.1.0, Sep 22 1998 ! * @since CP1.1 */ ! class VMClassLoader { ! /** ! * Helper to define a class using a string of bytes. ! * ! * @param name the name to give the class. null if unknown. ! * @param data the data representing the classfile, in classfile format. ! * @param offset the offset into the data where the classfile starts. ! * @param len the length of the classfile data in the array. ! * @return the class that was defined. ! * @exception ClassFormatError if the byte array is not in proper classfile format. ! */ ! final static native Class defineClass(ClassLoader cl, String name, ! byte[] data, int offset, int len) ! throws ClassFormatError; ! /** ! * Helper to resolve all references to other classes from this class. ! * @param c the class to resolve. ! */ ! // Not yet needed for libgcj. ! // final static native void resolveClass(Class c); ! /** ! * Helper for java.lang.Integer, Byte, etc. to get the TYPE class ! * at initialization time. ! * ! * @param type code for the primitive type. ! */ ! static native Class getPrimitiveClass(char type); /** * The system default for assertion status. This is used for all system --- 1,231 ---- ! /* VMClassLoader.java -- Reference implementation of native interface ! required by ClassLoader ! Copyright (C) 1998, 2001, 2002, 2003 Free Software Foundation ! ! This file is part of GNU Classpath. ! ! GNU Classpath is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! GNU Classpath is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with GNU Classpath; see the file COPYING. If not, write to the ! Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ! 02111-1307 USA. ! ! Linking this library statically or dynamically with other modules is ! making a combined work based on this library. Thus, the terms and ! conditions of the GNU General Public License cover the whole ! combination. ! ! As a special exception, the copyright holders of this library give you ! permission to link this library with independent modules to produce an ! executable, regardless of the license terms of these independent ! modules, and to copy and distribute the resulting executable under ! terms of your choice, provided that you also meet, for each linked ! independent module, the terms and conditions of the license of that ! module. An independent module is a module which is not derived from ! or based on this library. If you modify this library, you may extend ! this exception to your version of the library, but you are not ! obligated to do so. If you do not wish to do so, delete this ! exception statement from your version. */ package java.lang; ! import java.security.ProtectionDomain; ! import java.net.URL; ! import java.io.IOException; ! import java.util.Enumeration; ! import java.util.Map; ! import java.util.HashMap; ! import java.lang.reflect.Constructor; ! import java.security.AllPermission; ! import java.security.Permission; ! import java.security.Permissions; ! import java.security.ProtectionDomain; ! ! import gnu.java.util.EmptyEnumeration; /** * java.lang.VMClassLoader is a package-private helper for VMs to implement * on behalf of java.lang.ClassLoader. * * @author John Keiser ! * @author Mark Wielaard ! * @author Eric Blake */ + final class VMClassLoader + { + // Protection Domain definitions + // FIXME: should there be a special protection domain used for native code? + + // The permission required to check what a classes protection domain is. + static final Permission protectionDomainPermission + = new RuntimePermission("getProtectionDomain"); + // The protection domain returned if we cannot determine it. + static ProtectionDomain unknownProtectionDomain; ! static ! { ! Permissions permissions = new Permissions(); ! permissions.add(new AllPermission()); ! unknownProtectionDomain = new ProtectionDomain(null, permissions); ! } ! /** ! * Helper to define a class using a string of bytes. This assumes that ! * the security checks have already been performed, if necessary. ! * ! * For backward compatibility, this just ignores the protection ! * domain; that is the wrong behavior, and you should directly implement ! * this method natively if you can. ! * ! * @param name the name to give the class, or null if unknown ! * @param data the data representing the classfile, in classfile format ! * @param offset the offset into the data where the classfile starts ! * @param len the length of the classfile data in the array ! * @param pd the protection domain ! * @return the class that was defined ! * @throws ClassFormatError if data is not in proper classfile format ! */ ! static final native Class defineClass(ClassLoader cl, String name, ! byte[] data, int offset, int len, ! ProtectionDomain pd) ! throws ClassFormatError; ! static final native void linkClass0 (Class klass); ! static final native void markClassErrorState0 (Class klass); ! /** ! * Helper to resolve all references to other classes from this class. ! * ! * @param c the class to resolve ! */ ! static final void resolveClass(Class clazz) ! { ! synchronized (clazz) ! { ! try ! { ! linkClass0 (clazz); ! } ! catch (Throwable x) ! { ! markClassErrorState0 (clazz); ! ! LinkageError e; ! if (x instanceof LinkageError) ! e = (LinkageError) x; ! else if (x instanceof ClassNotFoundException) ! { ! e = new NoClassDefFoundError("while resolving class: " ! + clazz.getName()); ! e.initCause (x); ! } ! else ! { ! e = new LinkageError ("unexpected exception during linking: " ! + clazz.getName()); ! e.initCause (x); ! } ! throw e; ! } ! } ! } ! ! /** ! * Helper to load a class from the bootstrap class loader. ! * ! * @param name the class name to load ! * @param resolve whether to resolve it ! * @return the class, loaded by the bootstrap classloader or null ! * if the class wasn't found. Returning null is equivalent to throwing ! * a ClassNotFoundException (but a possible performance optimization). ! */ ! static final native Class loadClass(String name, boolean resolve) ! throws ClassNotFoundException; ! ! /** ! * Helper to load a resource from the bootstrap class loader. ! * ! * In libgcj, this does nothing, as the default system loader knows ! * how to find resources that have been linked in. ! * ! * @param name the resource to find ! * @return the URL to the resource ! */ ! static URL getResource(String name) ! { ! return null; ! } ! ! /** ! * Helper to get a list of resources from the bootstrap class loader. ! * ! * In libgcj, this does nothing, as the default system loader knows ! * how to find resources that have been linked in. ! * ! * @param name the resource to find ! * @return an enumeration of resources ! * @throws IOException if one occurs ! */ ! static Enumeration getResources(String name) throws IOException ! { ! return EmptyEnumeration.getInstance(); ! } ! ! /** ! * Helper to get a package from the bootstrap class loader. The default ! * implementation of returning null may be adequate, or you may decide ! * that this needs some native help. ! * ! * @param name the name to find ! * @return the named package, if it exists ! */ ! static Package getPackage(String name) ! { ! return null; ! } ! ! /** ! * Helper to get all packages from the bootstrap class loader. The default ! * implementation of returning an empty array may be adequate, or you may ! * decide that this needs some native help. ! * ! * @return all named packages, if any exist ! */ ! static Package[] getPackages() ! { ! return new Package[0]; ! } ! ! /** ! * Helper for java.lang.Integer, Byte, etc to get the TYPE class ! * at initialization time. The type code is one of the chars that ! * represents the primitive type as in JNI. ! * ! *
              ! *
            • 'Z' - boolean
            • ! *
            • 'B' - byte
            • ! *
            • 'C' - char
            • ! *
            • 'D' - double
            • ! *
            • 'F' - float
            • ! *
            • 'I' - int
            • ! *
            • 'J' - long
            • ! *
            • 'S' - short
            • ! *
            • 'V' - void
            • ! *
            ! * ! * @param type the primitive type ! * @return a "bogus" class representing the primitive type ! */ ! static final native Class getPrimitiveClass(char type); /** * The system default for assertion status. This is used for all system *************** class VMClassLoader { *** 104,107 **** --- 269,302 ---- { return new HashMap(); } + + static native ClassLoader getSystemClassLoaderInternal(); + + static ClassLoader getSystemClassLoader() + { + // This method is called as the initialization of systemClassLoader, + // so if there is a null value, this is the first call and we must check + // for java.system.class.loader. + String loader = System.getProperty("java.system.class.loader"); + ClassLoader default_sys = getSystemClassLoaderInternal(); + if (loader != null) + { + try + { + Class load_class = Class.forName(loader, true, default_sys); + Constructor c + = load_class.getConstructor(new Class[] { ClassLoader.class }); + default_sys + = (ClassLoader) c.newInstance(new Object[] { default_sys }); + } + catch (Exception e) + { + System.err.println("Requested system classloader " + + loader + " failed, using " + + "gnu.gcj.runtime.VMClassLoader"); + e.printStackTrace(); + } + } + return default_sys; + } } diff -Nrc3pad gcc-3.3.3/libjava/java/lang/w_exp.c gcc-3.4.0/libjava/java/lang/w_exp.c *** gcc-3.3.3/libjava/java/lang/w_exp.c 1999-04-07 14:52:39.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/w_exp.c 2003-06-06 03:34:36.000000000 +0000 *************** PORTABILITY *** 65,70 **** --- 65,72 ---- #ifndef _DOUBLE_IS_32BITS + #ifndef _IEEE_LIBM + #ifdef __STDC__ static const double #else *************** static double *** 73,78 **** --- 75,82 ---- o_threshold= 7.09782712893383973096e+02, /* 0x40862E42, 0xFEFA39EF */ u_threshold= -7.45133219101941108420e+02; /* 0xc0874910, 0xD52D3051 */ + #endif + #ifdef __STDC__ double exp(double x) /* wrapper exp */ #else diff -Nrc3pad gcc-3.3.3/libjava/java/lang/Win32Process.java gcc-3.4.0/libjava/java/lang/Win32Process.java *** gcc-3.3.3/libjava/java/lang/Win32Process.java 2003-02-10 23:53:28.000000000 +0000 --- gcc-3.4.0/libjava/java/lang/Win32Process.java 2003-11-07 03:16:49.000000000 +0000 *************** final class ConcreteProcess extends Proc *** 28,35 **** { public native void destroy (); - public native boolean hasExited (); - public int exitValue () { if (! hasExited ()) --- 28,33 ---- *************** final class ConcreteProcess extends Proc *** 55,72 **** public native int waitFor () throws InterruptedException; - public native void startProcess (String[] progarray, - String[] envp, - File dir) - throws IOException; - - public native void cleanup (); - public ConcreteProcess (String[] progarray, String[] envp, File dir) throws IOException { startProcess (progarray, envp, dir); } --- 53,71 ---- public native int waitFor () throws InterruptedException; public ConcreteProcess (String[] progarray, String[] envp, File dir) throws IOException { + for (int i = 0; i < progarray.length; i++) + { + String s = progarray[i]; + + if ( (s.indexOf (' ') >= 0) || (s.indexOf ('\t') >= 0)) + progarray[i] = "\"" + s + "\""; + } + startProcess (progarray, envp, dir); } *************** final class ConcreteProcess extends Proc *** 81,84 **** --- 80,90 ---- // Exit code of the child if it has exited. private int exitCode; + + private native boolean hasExited (); + private native void startProcess (String[] progarray, + String[] envp, + File dir) + throws IOException; + private native void cleanup (); } diff -Nrc3pad gcc-3.3.3/libjava/java/math/BigDecimal.java gcc-3.4.0/libjava/java/math/BigDecimal.java *** gcc-3.3.3/libjava/java/math/BigDecimal.java 2003-04-19 19:28:42.000000000 +0000 --- gcc-3.4.0/libjava/java/math/BigDecimal.java 2003-08-01 15:07:49.000000000 +0000 *************** *** 1,5 **** /* java.math.BigDecimal -- Arbitrary precision decimals. ! Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* java.math.BigDecimal -- Arbitrary precision decimals. ! Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** public class BigDecimal extends Number i *** 273,279 **** // Ensure that pow gets a non-negative value. int valScale = val.scale; BigInteger valIntVal = val.intVal; ! int power = newScale + 1 - (scale - val.scale); if (power < 0) { // Effectively increase the scale of val to avoid an --- 273,279 ---- // Ensure that pow gets a non-negative value. int valScale = val.scale; BigInteger valIntVal = val.intVal; ! int power = newScale - (scale - val.scale); if (power < 0) { // Effectively increase the scale of val to avoid an *************** public class BigDecimal extends Number i *** 285,334 **** BigInteger dividend = intVal.multiply (BigInteger.valueOf (10).pow (power)); BigInteger parts[] = dividend.divideAndRemainder (valIntVal); - // System.out.println("int: " + parts[0]); - // System.out.println("rem: " + parts[1]); ! int roundDigit = parts[0].mod (BigInteger.valueOf (10)).intValue (); ! BigInteger unrounded = parts[0].divide (BigInteger.valueOf (10)); ! ! if (roundDigit == 0 && parts[1].signum () == 0) // no rounding necessary return new BigDecimal (unrounded, newScale); ! int sign = unrounded.signum (); ! switch (roundingMode) { ! case ROUND_UNNECESSARY: ! throw new ArithmeticException ("newScale is not large enough"); ! case ROUND_CEILING: ! roundingMode = (sign == 1) ? ROUND_UP : ROUND_DOWN; ! break; ! case ROUND_FLOOR: ! roundingMode = (sign == 1) ? ROUND_DOWN : ROUND_UP; ! break; ! case ROUND_HALF_UP: ! roundingMode = (roundDigit >= 5) ? ROUND_UP : ROUND_DOWN; ! break; ! case ROUND_HALF_DOWN: ! roundingMode = (roundDigit > 5) ? ROUND_UP : ROUND_DOWN; ! break; ! case ROUND_HALF_EVEN: ! if (roundDigit < 5) ! roundingMode = ROUND_DOWN; ! else { ! int rightmost = ! unrounded.mod (BigInteger.valueOf (10)).intValue (); ! if (rightmost % 2 == 1) // odd, then ROUND_HALF_UP roundingMode = ROUND_UP; ! else // even, then ROUND_HALF_DOWN ! roundingMode = (roundDigit > 5) ? ROUND_UP : ROUND_DOWN; } - break; } if (roundingMode == ROUND_UP) ! return new BigDecimal (unrounded.add (BigInteger.valueOf (1)), newScale); // roundingMode == ROUND_DOWN return new BigDecimal (unrounded, newScale); --- 285,337 ---- BigInteger dividend = intVal.multiply (BigInteger.valueOf (10).pow (power)); BigInteger parts[] = dividend.divideAndRemainder (valIntVal); ! BigInteger unrounded = parts[0]; ! if (parts[1].signum () == 0) // no remainder, no rounding necessary return new BigDecimal (unrounded, newScale); ! if (roundingMode == ROUND_UNNECESSARY) ! throw new ArithmeticException ("newScale is not large enough"); ! int sign = intVal.signum () * valIntVal.signum (); ! ! if (roundingMode == ROUND_CEILING) ! roundingMode = (sign > 0) ? ROUND_UP : ROUND_DOWN; ! else if (roundingMode == ROUND_FLOOR) ! roundingMode = (sign < 0) ? ROUND_UP : ROUND_DOWN; ! else { ! // half is -1 if remainder*2 < positive intValue (*power), 0 if equal, ! // 1 if >. This implies that the remainder to round is less than, ! // equal to, or greater than half way to the next digit. ! BigInteger posRemainder ! = parts[1].signum () < 0 ? parts[1].negate() : parts[1]; ! valIntVal = valIntVal.signum () < 0 ? valIntVal.negate () : valIntVal; ! int half = posRemainder.shiftLeft(1).compareTo(valIntVal); ! ! switch(roundingMode) { ! case ROUND_HALF_UP: ! roundingMode = (half < 0) ? ROUND_DOWN : ROUND_UP; ! break; ! case ROUND_HALF_DOWN: ! roundingMode = (half > 0) ? ROUND_UP : ROUND_DOWN; ! break; ! case ROUND_HALF_EVEN: ! if (half < 0) ! roundingMode = ROUND_DOWN; ! else if (half > 0) roundingMode = ROUND_UP; ! else if (unrounded.testBit(0)) // odd, then ROUND_HALF_UP ! roundingMode = ROUND_UP; ! else // even, ROUND_HALF_DOWN ! roundingMode = ROUND_DOWN; ! break; } } if (roundingMode == ROUND_UP) ! unrounded = unrounded.add (BigInteger.valueOf (sign > 0 ? 1 : -1)); // roundingMode == ROUND_DOWN return new BigDecimal (unrounded, newScale); diff -Nrc3pad gcc-3.3.3/libjava/java/math/BigInteger.java gcc-3.4.0/libjava/java/math/BigInteger.java *** gcc-3.3.3/libjava/java/math/BigInteger.java 2003-04-19 19:28:42.000000000 +0000 --- gcc-3.4.0/libjava/java/math/BigInteger.java 2003-11-11 12:22:18.000000000 +0000 *************** public class BigInteger extends Number i *** 541,547 **** if (y.words == null) return BigInteger.add(x, y.ival); // Both are big - int len; if (y.ival > x.ival) { // Swap so x is longer then y. BigInteger tmp = x; x = y; y = tmp; --- 541,546 ---- *************** public class BigInteger extends Number i *** 1566,1572 **** /* Assumes this and obj are both canonicalized. */ public boolean equals(Object obj) { ! if (obj == null || ! (obj instanceof BigInteger)) return false; return equals(this, (BigInteger) obj); } --- 1565,1571 ---- /* Assumes this and obj are both canonicalized. */ public boolean equals(Object obj) { ! if (! (obj instanceof BigInteger)) return false; return equals(this, (BigInteger) obj); } diff -Nrc3pad gcc-3.3.3/libjava/java/net/Authenticator.java gcc-3.4.0/libjava/java/net/Authenticator.java *** gcc-3.3.3/libjava/java/net/Authenticator.java 2002-08-28 05:24:10.000000000 +0000 --- gcc-3.4.0/libjava/java/net/Authenticator.java 2003-05-25 11:40:19.000000000 +0000 *************** *** 1,5 **** /* Authenticator.java -- Abstract class for obtaining authentication info ! Copyright (C) 1998,2000 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Authenticator.java -- Abstract class for obtaining authentication info ! Copyright (C) 1998, 2000, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** package java.net; *** 43,54 **** * some network operations (such as hitting a password protected * web site). *

            ! * To make use of this feature, a programmer must create a subclass of ! * Authenticator that knows how to obtain the necessary info. An example * would be a class that popped up a dialog box to prompt the user. ! * After creating an instance of that subclass, the static setDefault ! * method of this class is called to set up that instance as the object ! * to use on subsequent calls to obtain authorization. * * @since 1.2 * --- 43,55 ---- * some network operations (such as hitting a password protected * web site). *

            ! * To make use of this feature, a programmer must create a subclass ! * that knows how to obtain the necessary info. An example * would be a class that popped up a dialog box to prompt the user. ! * After creating an instance of that subclass, the static ! * setDefault method of this class is called to set up ! * that instance as the object to use on subsequent calls to obtain ! * authorization. * * @since 1.2 * *************** package java.net; *** 57,336 **** */ public abstract class Authenticator { ! /*************************************************************************/ ! ! /* ! * Class Variables ! */ ! ! /** ! * This is the default Authenticator object to use for password requests ! */ ! private static Authenticator default_authenticator; ! ! /*************************************************************************/ ! ! /* ! * Instance Variables ! */ ! ! /** ! * The hostname of the site requesting authentication ! */ ! private String host; ! ! /** ! * InternetAddress of the site requesting authentication ! */ ! private InetAddress addr; ! ! /** ! * The port number of the site requesting authentication ! */ ! private int port; ! ! /** ! * The protocol name of the site requesting authentication ! */ ! private String protocol; ! ! /** ! * The prompt to display to the user when requesting authentication info ! */ ! private String prompt; ! ! /** ! * The authentication scheme in use ! */ ! private String scheme; ! ! /*************************************************************************/ ! ! /* ! * Class Methods ! */ ! /** ! * This method sets the default Authenticator object (an ! * instance of a ! * subclass of Authenticator) to use when prompting the user for ! * information. Note that this method checks to see if the caller is ! * allowed to set this value (the "setDefaultAuthenticator" permission) ! * and throws a SecurityException if it is not. ! * ! * @param def_auth The new default Authenticator object to use ! * ! * @exception SecurityException If the caller does not have permission ! * to perform this operation ! */ ! public static void ! setDefault(Authenticator def_auth) ! { ! SecurityManager sm = System.getSecurityManager(); ! if (sm != null) ! sm.checkPermission(new NetPermission("setDefaultAuthenticator")); ! default_authenticator = def_auth; ! } ! /*************************************************************************/ ! /** ! * This method is called whenever a username and password for a given ! * network operation is required. First, a security check is made to see ! * if the caller has the "requestPasswordAuthentication" ! * permission. If not, the method thows an exception. If there is no ! * default Authenticator object, the method then returns ! * null. Otherwise, the default authenticators's instance ! * variables are initialized and it's getPasswordAuthentication ! * method is called to get the actual authentication information to return. ! * ! * @param addr The address requesting authentication ! * @param port The port requesting authentication ! * @param protocol The protocol requesting authentication ! * @param prompt The prompt to display to the user when requesting ! * authentication info ! * @param scheme The authentication scheme in use ! * ! * @return A PasswordAuthentication object with the user's ! * authentication info. ! * ! * @exception SecurityException If the caller does not have permission to ! * perform this operation ! */ ! public static PasswordAuthentication ! requestPasswordAuthentication(InetAddress addr, int port, String protocol, ! String prompt, String scheme) ! throws SecurityException ! { ! return(requestPasswordAuthentication (null, addr, port, protocol, ! prompt, scheme)); ! } ! /** ! * This method is called whenever a username and password for a given ! * network operation is required. First, a security check is made to see ! * if the caller has the "requestPasswordAuthentication" ! * permission. If not, the method thows an exception. If there is no ! * default Authenticator object, the method then returns ! * null. Otherwise, the default authenticators's instance ! * variables are initialized and it's getPasswordAuthentication ! * method is called to get the actual authentication information to return. ! * This method is the preferred one as it can be used with hostname ! * when addr is unknown. ! * ! * @param host The hostname requesting authentication ! * @param addr The address requesting authentication ! * @param port The port requesting authentication ! * @param protocol The protocol requesting authentication ! * @param prompt The prompt to display to the user when requesting ! * authentication info ! * @param scheme The authentication scheme in use ! * ! * @return A PasswordAuthentication object with the user's ! * authentication info. ! * ! * @exception SecurityException If the caller does not have permission to ! * perform this operation ! * ! * @since 1.4 ! */ ! public static PasswordAuthentication ! requestPasswordAuthentication(String host, InetAddress addr, int port, ! String protocol, String prompt, String scheme) ! throws SecurityException ! { ! SecurityManager sm = System.getSecurityManager(); ! if (sm != null) ! sm.checkPermission(new NetPermission("requestPasswordAuthentication")); ! if (default_authenticator == null) ! return(null); ! default_authenticator.host = host; ! default_authenticator.addr = addr; ! default_authenticator.port = port; ! default_authenticator.protocol = protocol; ! default_authenticator.prompt = prompt; ! default_authenticator.scheme = scheme; ! return(default_authenticator.getPasswordAuthentication()); ! } ! /** ! * Returns the hostname of the host or proxy requesting authorization, ! * or null if not available. ! * ! * @since 1.4 ! */ ! protected final String getRequestingHost() ! { ! return(host); ! } ! /*************************************************************************/ ! /* ! * Constructors ! */ ! /** ! * Default, no-argument constructor for subclasses to call. ! */ ! public ! Authenticator() ! { ! } ! /*************************************************************************/ ! /* ! * Instance Methods ! */ ! /** ! * This method returns the address of the site that is requesting ! * authentication. ! * ! * @return The requesting site ! */ ! protected final InetAddress ! getRequestingSite() ! { ! return(addr); ! } ! /*************************************************************************/ ! /** ! * This method returns the port of the site that is requesting ! * authentication. ! * ! * @return The requesting port ! */ ! protected final int ! getRequestingPort() ! { ! return(port); ! } ! /*************************************************************************/ ! /** ! * This method returns the requesting protocol of the operation that is ! * requesting authentication ! * ! * @return The requesting protocol ! */ ! protected final String ! getRequestingProtocol() ! { ! return(protocol); ! } ! /*************************************************************************/ ! /** ! * Returns the prompt that should be used when requesting authentication ! * information from the user ! * ! * @return The user prompt ! */ ! protected final String ! getRequestingPrompt() ! { ! return(prompt); ! } ! /*************************************************************************/ ! /** ! * This method returns the authentication scheme in use ! * ! * @return The authentication scheme ! */ ! protected final String ! getRequestingScheme() ! { ! return(scheme); ! } ! /*************************************************************************/ ! /** ! * This method is called whenever a request for authentication is made. It ! * can call the other getXXX methods to determine the information relevant ! * to this request. Subclasses should override this method, which returns ! * null by default. ! * ! * @return The PasswordAuthentication information ! */ ! protected PasswordAuthentication ! getPasswordAuthentication() ! { ! return(null); ! } } // class Authenticator --- 58,309 ---- */ public abstract class Authenticator { + /* + * Class Variables + */ ! /** ! * This is the default Authenticator object to use for password requests ! */ ! private static Authenticator defaultAuthenticator; ! /* ! * Instance Variables ! */ ! /** ! * The hostname of the site requesting authentication ! */ ! private String host; ! /** ! * InternetAddress of the site requesting authentication ! */ ! private InetAddress addr; ! /** ! * The port number of the site requesting authentication ! */ ! private int port; ! /** ! * The protocol name of the site requesting authentication ! */ ! private String protocol; ! /** ! * The prompt to display to the user when requesting authentication info ! */ ! private String prompt; ! /** ! * The authentication scheme in use ! */ ! private String scheme; ! /* ! * Class Methods ! */ ! /** ! * This method sets the default Authenticator object (an ! * instance of a subclass of Authenticator) to use when ! * prompting the user for ! * information. Note that this method checks to see if the caller is ! * allowed to set this value (the "setDefaultAuthenticator" permission) ! * and throws a SecurityException if it is not. ! * ! * @param defAuth The new default Authenticator object to use ! * ! * @exception SecurityException If the caller does not have permission ! * to perform this operation ! */ ! public static void setDefault(Authenticator defAuth) ! { ! SecurityManager sm = System.getSecurityManager(); ! if (sm != null) ! sm.checkPermission(new NetPermission("setDefaultAuthenticator")); ! defaultAuthenticator = defAuth; ! } ! /** ! * This method is called whenever a username and password for a given ! * network operation is required. First, a security check is made to see ! * if the caller has the "requestPasswordAuthentication" ! * permission. If not, the method thows an exception. If there is no ! * default Authenticator object, the method then returns ! * null. Otherwise, the default authenticators's instance ! * variables are initialized and it's getPasswordAuthentication ! * method is called to get the actual authentication information to return. ! * ! * @param addr The address requesting authentication ! * @param port The port requesting authentication ! * @param protocol The protocol requesting authentication ! * @param prompt The prompt to display to the user when requesting ! * authentication info ! * @param scheme The authentication scheme in use ! * ! * @return A PasswordAuthentication object with the user's ! * authentication info. ! * ! * @exception SecurityException If the caller does not have permission to ! * perform this operation ! */ ! public static PasswordAuthentication ! requestPasswordAuthentication(InetAddress addr, int port, String protocol, ! String prompt, String scheme) ! throws SecurityException ! { ! return(requestPasswordAuthentication (null, addr, port, protocol, ! prompt, scheme)); ! } ! /** ! * This method is called whenever a username and password for a given ! * network operation is required. First, a security check is made to see ! * if the caller has the "requestPasswordAuthentication" ! * permission. If not, the method thows an exception. If there is no ! * default Authenticator object, the method then returns ! * null. Otherwise, the default authenticators's instance ! * variables are initialized and it's getPasswordAuthentication ! * method is called to get the actual authentication information to return. ! * This method is the preferred one as it can be used with hostname ! * when addr is unknown. ! * ! * @param host The hostname requesting authentication ! * @param addr The address requesting authentication ! * @param port The port requesting authentication ! * @param protocol The protocol requesting authentication ! * @param prompt The prompt to display to the user when requesting ! * authentication info ! * @param scheme The authentication scheme in use ! * ! * @return A PasswordAuthentication object with the user's ! * authentication info. ! * ! * @exception SecurityException If the caller does not have permission to ! * perform this operation ! * ! * @since 1.4 ! */ ! public static PasswordAuthentication ! requestPasswordAuthentication(String host, InetAddress addr, int port, ! String protocol, String prompt, String scheme) ! throws SecurityException ! { ! SecurityManager sm = System.getSecurityManager(); ! if (sm != null) ! sm.checkPermission(new NetPermission("requestPasswordAuthentication")); ! if (defaultAuthenticator == null) ! return(null); ! defaultAuthenticator.host = host; ! defaultAuthenticator.addr = addr; ! defaultAuthenticator.port = port; ! defaultAuthenticator.protocol = protocol; ! defaultAuthenticator.prompt = prompt; ! defaultAuthenticator.scheme = scheme; ! return(defaultAuthenticator.getPasswordAuthentication()); ! } ! /* ! * Constructors ! */ ! /** ! * Default, no-argument constructor for subclasses to call. ! */ ! public Authenticator() ! { ! } ! /* ! * Instance Methods ! */ ! /** ! * This method returns the address of the site that is requesting ! * authentication. ! * ! * @return The requesting site's address ! */ ! protected final InetAddress getRequestingSite() ! { ! return(addr); ! } ! /** ! * Returns the hostname of the host or proxy requesting authorization, ! * or null if not available. ! * ! * @return The name of the host requesting authentication, or ! * null if it is not available. ! * ! * @since 1.4 ! */ ! protected final String getRequestingHost() ! { ! return(host); ! } ! /** ! * This method returns the port of the site that is requesting ! * authentication. ! * ! * @return The requesting port ! */ ! protected final int getRequestingPort() ! { ! return(port); ! } ! /** ! * This method returns the requesting protocol of the operation that is ! * requesting authentication ! * ! * @return The requesting protocol ! */ ! protected final String getRequestingProtocol() ! { ! return(protocol); ! } ! /** ! * Returns the prompt that should be used when requesting authentication ! * information from the user ! * ! * @return The user prompt ! */ ! protected final String getRequestingPrompt() ! { ! return(prompt); ! } ! /** ! * This method returns the authentication scheme in use ! * ! * @return The authentication scheme ! */ ! protected final String getRequestingScheme() ! { ! return(scheme); ! } ! /** ! * This method is called whenever a request for authentication is made. It ! * can call the other getXXX methods to determine the information relevant ! * to this request. Subclasses should override this method, which returns ! * null by default. ! * ! * @return The PasswordAuthentication information ! */ ! protected PasswordAuthentication getPasswordAuthentication() ! { ! return(null); ! } } // class Authenticator diff -Nrc3pad gcc-3.3.3/libjava/java/net/ContentHandlerFactory.java gcc-3.4.0/libjava/java/net/ContentHandlerFactory.java *** gcc-3.3.3/libjava/java/net/ContentHandlerFactory.java 2002-01-22 22:40:23.000000000 +0000 --- gcc-3.4.0/libjava/java/net/ContentHandlerFactory.java 2003-10-11 18:39:35.000000000 +0000 *************** *** 1,5 **** /* ContentHandlerFactory.java -- Interface for creating content handlers ! Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ContentHandlerFactory.java -- Interface for creating content handlers ! Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** package java.net; *** 45,69 **** */ /** ! * This interface maps MIME types to ContentHandler objects. It consists ! * of one method that, when passed a MIME type, returns a handler for that ! * type. * * @author Aaron M. Renn (arenn@urbanophile.com) * @author Warren Levy */ public interface ContentHandlerFactory { ! /** ! * This method is passed a MIME type as a string and is responsible for ! * returning the appropriate ContentType object. ! * ! * @param mime_type The MIME type to map to a ContentHandler ! * ! * @return The ContentHandler for the passed in MIME type ! */ ! ContentHandler ! createContentHandler(String mime_type); } // interface ContentHandlerFactory --- 45,68 ---- */ /** ! * This interface maps MIME types to ContentHandler objects. ! * It consists of one method that, when passed a MIME type, returns a ! * handler for that type. * * @author Aaron M. Renn (arenn@urbanophile.com) * @author Warren Levy */ public interface ContentHandlerFactory { ! /** ! * This method is passed a MIME type as a string and is responsible for ! * returning the appropriate ContentHandler object. ! * ! * @param mimeType The MIME type to map to a ContentHandler ! * ! * @return The ContentHandler for the passed in MIME type ! */ ! ContentHandler createContentHandler(String mimeType); } // interface ContentHandlerFactory diff -Nrc3pad gcc-3.3.3/libjava/java/net/ContentHandler.java gcc-3.4.0/libjava/java/net/ContentHandler.java *** gcc-3.3.3/libjava/java/net/ContentHandler.java 2002-08-21 05:34:45.000000000 +0000 --- gcc-3.4.0/libjava/java/net/ContentHandler.java 2003-05-25 11:40:19.000000000 +0000 *************** *** 1,5 **** /* ContentHandler.java -- Abstract class for handling content from URL's ! Copyright (C) 1998, 1999 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ContentHandler.java -- Abstract class for handling content from URL's ! Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** import java.io.IOException; *** 59,123 **** */ public abstract class ContentHandler { ! /*************************************************************************/ ! ! /* ! * Constructors ! */ ! ! /** ! * Default, no-argument constructor. ! */ ! public ContentHandler() { } ! ! /*************************************************************************/ ! /** ! * This method reads from the InputStream of the passed in URL ! * connection and uses the data downloaded to create an Object ! * represening the content. For example, if the URL is pointing to a GIF ! * file, this method might return an Image object. This method ! * must be implemented by subclasses. ! * ! * @param urlc A URLConnection object to read data from. ! * ! * @return An object representing the data read ! * ! * @exception IOException If an error occurs ! */ ! public abstract Object getContent(URLConnection urlc) throws IOException; ! /*************************************************************************/ ! /** ! * This method reads from the InputStream of the passed in URL ! * connection and uses the data downloaded to create an Object ! * represening the content. For example, if the URL is pointing to a GIF ! * file, this method might return an Image object. This method ! * must be implemented by subclasses. If the object doesnt match any type in ! * classes it returns null. ! * ! * @param urlc A URLConnection object to read data from. ! * ! * @return An object representing the data read ! * ! * @exception IOException If an error occurs ! * ! * @since 1.3 ! */ ! public Object getContent(URLConnection urlc, Class[] classes) ! throws IOException ! { ! Object obj = getContent (urlc); ! for (int i = 0; i < classes.length; i++) ! { ! if (classes [i].isInstance (obj)) ! return obj; ! } ! return null; ! } } // class ContentHandler --- 59,127 ---- */ public abstract class ContentHandler { + /* + * Constructors + */ ! /** ! * Default, no-argument constructor. ! */ ! public ContentHandler() ! { ! } ! /* ! * Instance Methods ! */ ! /** ! * This method reads from the InputStream of the passed in URL ! * connection and uses the data downloaded to create an Object ! * represening the content. For example, if the URL is pointing to a GIF ! * file, this method might return an Image object. This method ! * must be implemented by subclasses. ! * ! * @param urlc A URLConnection object to read data from. ! * ! * @return An object representing the data read ! * ! * @exception IOException If an error occurs ! */ ! public abstract Object getContent(URLConnection urlc) ! throws IOException; ! /** ! * This method reads from the InputStream of the passed in URL ! * connection and uses the data downloaded to create an Object ! * represening the content. For example, if the URL is pointing to a GIF ! * file, this method might return an Image object. This method ! * must be implemented by subclasses. This method uses the list of ! * supplied classes as candidate types. If the data read doesn't match ! * any of the supplied type, null is returned. ! * ! * @param urlc A URLConnection object to read data from. ! * @param classes An array of types of objects that are candidate types ! * for the data to be read. ! * ! * @return An object representing the data read, or null ! * if the data does not match any of the candidate types. ! * ! * @exception IOException If an error occurs ! * ! * @since 1.3 ! */ ! public Object getContent(URLConnection urlc, Class[] classes) ! throws IOException ! { ! Object obj = getContent (urlc); ! for (int i = 0; i < classes.length; i++) ! { ! if (classes [i].isInstance (obj)) ! return obj; ! } ! return null; ! } } // class ContentHandler diff -Nrc3pad gcc-3.3.3/libjava/java/net/DatagramPacket.java gcc-3.4.0/libjava/java/net/DatagramPacket.java *** gcc-3.3.3/libjava/java/net/DatagramPacket.java 2002-10-03 14:30:48.000000000 +0000 --- gcc-3.4.0/libjava/java/net/DatagramPacket.java 2003-12-04 10:59:56.000000000 +0000 *************** public final class DatagramPacket *** 78,90 **** private int offset; /** ! * The length of the data buffer to send */ ! private int length; /** * The address to which the packet should be sent or from which it ! * was received */ private InetAddress address; --- 78,95 ---- private int offset; /** ! * The length of the data buffer to send. */ ! int length; /** + * The maximal length of the buffer. + */ + int maxlen; + + /** * The address to which the packet should be sent or from which it ! * was received. */ private InetAddress address; *************** public final class DatagramPacket *** 106,126 **** */ public DatagramPacket(byte[] buf, int offset, int length) { ! if (buf == null) ! throw new NullPointerException("Null buffer"); ! if (offset < 0) ! throw new IllegalArgumentException("Invalid offset: " + offset); ! if (length < 0) ! throw new IllegalArgumentException("Invalid length: " + length); ! if (offset + length > buf.length) ! throw new IllegalArgumentException("Potential buffer overflow - offset: " ! + offset + " length: " + length); ! ! buffer = buf; ! this.offset = offset; ! this.length = length; ! this.address = null; ! this.port = -1; } /** --- 111,119 ---- */ public DatagramPacket(byte[] buf, int offset, int length) { ! setData(buf, offset, length); ! address = null; ! port = -1; } /** *************** public final class DatagramPacket *** 128,134 **** * receiving packets from the network. * * @param buf A buffer for storing the returned packet data ! * @param length The length of the buffer (must be <= buf.length) */ public DatagramPacket(byte[] buf, int length) { --- 121,127 ---- * receiving packets from the network. * * @param buf A buffer for storing the returned packet data ! * @param length The length of the buffer (must be <= buf.length) */ public DatagramPacket(byte[] buf, int length) { *************** public final class DatagramPacket *** 141,147 **** * * @param buf A buffer containing the data to send * @param offset The offset into the buffer to start writing from. ! * @param len The length of the buffer (must be <= buf.length) * @param addr The address to send to * @param port The port to send to * --- 134,140 ---- * * @param buf A buffer containing the data to send * @param offset The offset into the buffer to start writing from. ! * @param len The length of the buffer (must be <= buf.length) * @param addr The address to send to * @param port The port to send to * *************** public final class DatagramPacket *** 150,174 **** public DatagramPacket(byte[] buf, int offset, int length, InetAddress address, int port) { ! if (buf == null) ! throw new NullPointerException("Null buffer"); ! if (offset < 0) ! throw new IllegalArgumentException("Invalid offset: " + offset); ! if (length < 0) ! throw new IllegalArgumentException("Invalid length: " + length); ! if (offset + length > buf.length) ! throw new IllegalArgumentException("Potential buffer overflow - offset: " ! + offset + " length: " + length); ! if (port < 0 || port > 65535) ! throw new IllegalArgumentException("Invalid port: " + port); ! if (address == null) ! throw new NullPointerException("Null address"); ! ! buffer = buf; ! this.offset = offset; ! this.length = length; ! this.address = address; ! this.port = port; } /** --- 143,151 ---- public DatagramPacket(byte[] buf, int offset, int length, InetAddress address, int port) { ! setData(buf, offset, length); ! setAddress(address); ! setPort(port); } /** *************** public final class DatagramPacket *** 176,182 **** * transmitting packets across the network. * * @param buf A buffer containing the data to send ! * @param length The length of the buffer (must be <= buf.length) * @param address The address to send to * @param port The port to send to */ --- 153,159 ---- * transmitting packets across the network. * * @param buf A buffer containing the data to send ! * @param length The length of the buffer (must be <= buf.length) * @param address The address to send to * @param port The port to send to */ *************** public final class DatagramPacket *** 191,197 **** * * @param buf A buffer containing the data to send * @param offset The offset into the buffer to start writing from. ! * @param length The length of the buffer (must be <= buf.length) * @param address The socket address to send to * * @exception SocketException If an error occurs --- 168,174 ---- * * @param buf A buffer containing the data to send * @param offset The offset into the buffer to start writing from. ! * @param length The length of the buffer (must be <= buf.length) * @param address The socket address to send to * * @exception SocketException If an error occurs *************** public final class DatagramPacket *** 203,210 **** SocketAddress address) throws SocketException { ! this(buf, offset, length, ((InetSocketAddress)address).getAddress(), ! ((InetSocketAddress)address).getPort()); } /** --- 180,192 ---- SocketAddress address) throws SocketException { ! if (! (address instanceof InetSocketAddress)) ! throw new IllegalArgumentException("unsupported address type"); ! ! InetSocketAddress tmp = (InetSocketAddress) address; ! setData(buf, offset, length); ! setAddress(tmp.getAddress()); ! setPort(tmp.getPort()); } /** *************** public final class DatagramPacket *** 212,218 **** * transmitting packets across the network. * * @param buf A buffer containing the data to send ! * @param length The length of the buffer (must be <= buf.length) * @param address The socket address to send to * * @exception SocketException If an error occurs --- 194,200 ---- * transmitting packets across the network. * * @param buf A buffer containing the data to send ! * @param length The length of the buffer (must be <= buf.length) * @param address The socket address to send to * * @exception SocketException If an error occurs *************** public final class DatagramPacket *** 223,230 **** public DatagramPacket(byte[] buf, int length, SocketAddress address) throws SocketException { ! this(buf, 0, length, ((InetSocketAddress)address).getAddress(), ! ((InetSocketAddress)address).getPort()); } /** --- 205,211 ---- public DatagramPacket(byte[] buf, int length, SocketAddress address) throws SocketException { ! this(buf, 0, length, address); } /** *************** public final class DatagramPacket *** 330,338 **** public void setSocketAddress(SocketAddress address) throws IllegalArgumentException { ! if (address == null) throw new IllegalArgumentException(); ! InetSocketAddress tmp = (InetSocketAddress)address; this.address = tmp.getAddress(); this.port = tmp.getPort(); } --- 311,320 ---- public void setSocketAddress(SocketAddress address) throws IllegalArgumentException { ! if (address == null) ! throw new IllegalArgumentException("address may not be null"); ! InetSocketAddress tmp = (InetSocketAddress) address; this.address = tmp.getAddress(); this.port = tmp.getPort(); } *************** public final class DatagramPacket *** 359,372 **** * * @since 1.1 */ ! public synchronized void setData(byte[] buf) { ! // This form of setData requires setLength to be called separately ! // and subsequently. ! if (buf == null) ! throw new NullPointerException("Null buffer"); ! ! buffer = buf; } /** --- 341,349 ---- * * @since 1.1 */ ! public void setData(byte[] buf) { ! setData(buf, 0, buf.length); } /** *************** public final class DatagramPacket *** 388,402 **** throw new NullPointerException("Null buffer"); if (offset < 0) throw new IllegalArgumentException("Invalid offset: " + offset); - if (length < 0) - throw new IllegalArgumentException("Invalid length: " + length); - if (offset + length > buf.length) - throw new IllegalArgumentException("Potential buffer overflow - offset: " - + offset + " length: " + length); buffer = buf; this.offset = offset; ! this.length = length; } /** --- 365,374 ---- throw new NullPointerException("Null buffer"); if (offset < 0) throw new IllegalArgumentException("Invalid offset: " + offset); buffer = buf; this.offset = offset; ! setLength(length); } /** *************** public final class DatagramPacket *** 418,423 **** + offset + " length: " + length); this.length = length; } ! } // class DatagramPacket ! --- 390,395 ---- + offset + " length: " + length); this.length = length; + this.maxlen = length; } ! } diff -Nrc3pad gcc-3.3.3/libjava/java/net/DatagramSocketImplFactory.java gcc-3.4.0/libjava/java/net/DatagramSocketImplFactory.java *** gcc-3.3.3/libjava/java/net/DatagramSocketImplFactory.java 2002-08-28 19:23:50.000000000 +0000 --- gcc-3.4.0/libjava/java/net/DatagramSocketImplFactory.java 2003-10-11 18:39:35.000000000 +0000 *************** *** 1,5 **** /* DatagramSocketImplFactory.java ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* DatagramSocketImplFactory.java ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** package java.net; *** 42,48 **** */ /** ! * This interface defines one method which returns a DatagramSocketImpl object. * This should not be needed by ordinary applications. * * @author Michael Koch --- 42,49 ---- */ /** ! * This interface defines one method which returns a ! * DatagramSocketImpl object. * This should not be needed by ordinary applications. * * @author Michael Koch *************** public interface DatagramSocketImplFacto *** 56,59 **** --- 57,61 ---- * @return A DatagramSocketImpl object */ DatagramSocketImpl createDatagramSocketImpl(); + } // interface DatagramSocketImplFactory diff -Nrc3pad gcc-3.3.3/libjava/java/net/DatagramSocketImpl.java gcc-3.4.0/libjava/java/net/DatagramSocketImpl.java *** gcc-3.3.3/libjava/java/net/DatagramSocketImpl.java 2002-09-25 05:05:06.000000000 +0000 --- gcc-3.4.0/libjava/java/net/DatagramSocketImpl.java 2003-06-08 09:25:54.000000000 +0000 *************** *** 1,5 **** /* DatagramSocketImpl.java -- Abstract class for UDP socket implementations ! Copyright (C) 1998, 1999 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,6 ---- /* DatagramSocketImpl.java -- Abstract class for UDP socket implementations ! Copyright (C) 1998, 1999 2000, 2001, ! 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** public abstract class DatagramSocketImpl *** 102,109 **** * Takes a peek at the next packet received in order to retrieve the * address of the sender * ! * @param i The InetAddress to fill in with the information about the ! * sender if the next packet * * @return The port number of the sender of the packet * --- 103,110 ---- * Takes a peek at the next packet received in order to retrieve the * address of the sender * ! * @param i The InetAddress to fill in with the information ! * about the sender if the next packet * * @return The port number of the sender of the packet * *************** public abstract class DatagramSocketImpl *** 118,124 **** * Takes a peek at the next packet received. This packet is not consumed. * With the next peekData/receive operation this packet will be read again. * ! * @param p The DatagramPacket to fill in with the data sent. * * @return The port number of the sender of the packet. * --- 119,125 ---- * Takes a peek at the next packet received. This packet is not consumed. * With the next peekData/receive operation this packet will be read again. * ! * @param p The DatagramPacket to fill in with the data sent. * * @return The port number of the sender of the packet. * *************** public abstract class DatagramSocketImpl *** 147,153 **** /** * Receives a packet of data from the network Will block until a packet * arrives. The packet info in populated into the passed in ! * DatagramPacket object. * * @param p A place to store the incoming packet. * --- 148,154 ---- /** * Receives a packet of data from the network Will block until a packet * arrives. The packet info in populated into the passed in ! * DatagramPacket object. * * @param p A place to store the incoming packet. * *************** public abstract class DatagramSocketImpl *** 161,167 **** /** * Connects the socket to a host specified by address and port. * ! * @param address The InetAddress of the host to connect to * @param port The port number of the host to connect to * * @exception SocketException If an error occurs --- 162,168 ---- /** * Connects the socket to a host specified by address and port. * ! * @param address The InetAddress of the host to connect to * @param port The port number of the host to connect to * * @exception SocketException If an error occurs *************** public abstract class DatagramSocketImpl *** 283,318 **** { return localPort; } - - /** - * Sets the specified option on a socket to the passed in object. For - * options that take an integer argument, the passed in object is an - * Integer. For options that are set to on or off, the - * value passed will be a Boolean. The option_id - * parameter is one of the defined constants in the superinterface. - * - * @param option_id The identifier of the option - * @param val The value to set the option to - * - * @exception SocketException If an error occurs - * @XXX This redeclaration from SocketOptions is a workaround to a gcj bug. - */ - public abstract void setOption(int option_id, Object val) - throws SocketException; - - /** - * Returns the current setting of the specified option. The - * Object returned will be an Integer for options - * that have integer values. For options that are set to on or off, a - * Boolean will be returned. The option_id - * is one of the defined constants in the superinterface. - * - * @param option_id The option identifier - * - * @return The current value of the option - * - * @exception SocketException If an error occurs - * @XXX This redeclaration from SocketOptions is a workaround to a gcj bug. - */ - public abstract Object getOption(int option_id) throws SocketException; } --- 284,287 ---- diff -Nrc3pad gcc-3.3.3/libjava/java/net/DatagramSocket.java gcc-3.4.0/libjava/java/net/DatagramSocket.java *** gcc-3.3.3/libjava/java/net/DatagramSocket.java 2003-03-02 00:17:09.000000000 +0000 --- gcc-3.4.0/libjava/java/net/DatagramSocket.java 2004-02-03 21:53:55.000000000 +0000 *************** *** 1,5 **** /* DatagramSocket.java -- A class to model UDP sockets ! Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* DatagramSocket.java -- A class to model UDP sockets ! Copyright (C) 1998, 1999, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,42 **** --- 35,45 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package java.net; + import gnu.java.net.PlainDatagramSocketImpl; + import gnu.java.nio.DatagramChannelImpl; import java.io.IOException; import java.nio.channels.DatagramChannel; import java.nio.channels.IllegalBlockingModeException; *************** public class DatagramSocket *** 65,82 **** * This is the user DatagramSocketImplFactory for this class. If this * variable is null, a default factory is used. */ ! static DatagramSocketImplFactory factory; /** * This is the implementation object used by this socket. */ ! DatagramSocketImpl impl; /** ! * The unique DatagramChannel object associated with this datagram socket, ! * or null. */ ! DatagramChannel ch; /** * This is the address we are "connected" to --- 68,84 ---- * This is the user DatagramSocketImplFactory for this class. If this * variable is null, a default factory is used. */ ! private static DatagramSocketImplFactory factory; /** * This is the implementation object used by this socket. */ ! private DatagramSocketImpl impl; /** ! * True if socket implementation was created. */ ! private boolean implCreated; /** * This is the address we are "connected" to *************** public class DatagramSocket *** 89,107 **** private int remotePort = -1; /** ! * Indicates when the socket is closed. */ ! private boolean closed = false; /** ! * Creates a DatagramSocket from a specified DatagramSocketImpl instance * ! * @param impl The DatagramSocketImpl the socket will be created from * * @since 1.4 */ protected DatagramSocket (DatagramSocketImpl impl) { this.impl = impl; this.remoteAddress = null; this.remotePort = -1; --- 91,114 ---- private int remotePort = -1; /** ! * True if socket is bound. */ ! private boolean bound; /** ! * Creates a DatagramSocket from a specified ! * DatagramSocketImpl instance * ! * @param impl The DatagramSocketImpl the socket will be ! * created from * * @since 1.4 */ protected DatagramSocket (DatagramSocketImpl impl) { + if (impl == null) + throw new NullPointerException("impl may not be null"); + this.impl = impl; this.remoteAddress = null; this.remotePort = -1; *************** public class DatagramSocket *** 113,123 **** * * @exception SocketException If an error occurs. * @exception SecurityException If a security manager exists and ! * its checkListen method doesn't allow the operation. */ public DatagramSocket() throws SocketException { ! this(0, null); } /** --- 120,130 ---- * * @exception SocketException If an error occurs. * @exception SecurityException If a security manager exists and ! * its checkListen method doesn't allow the operation. */ public DatagramSocket() throws SocketException { ! this(new InetSocketAddress(0)); } /** *************** public class DatagramSocket *** 127,138 **** * @param port The local port number to bind to. * * @exception SecurityException If a security manager exists and its ! * checkListen method doesn't allow the operation. * @exception SocketException If an error occurs. */ public DatagramSocket(int port) throws SocketException { ! this(port, null); } /** --- 134,145 ---- * @param port The local port number to bind to. * * @exception SecurityException If a security manager exists and its ! * checkListen method doesn't allow the operation. * @exception SocketException If an error occurs. */ public DatagramSocket(int port) throws SocketException { ! this(new InetSocketAddress(port)); } /** *************** public class DatagramSocket *** 140,160 **** * the specified local port and address. * * @param port The local port number to bind to. ! * @param laddr The local address to bind to. * * @exception SecurityException If a security manager exists and its * checkListen method doesn't allow the operation. * @exception SocketException If an error occurs. */ ! public DatagramSocket(int port, InetAddress laddr) throws SocketException { ! if (port < 0 || port > 65535) ! throw new IllegalArgumentException("Invalid port: " + port); ! ! SecurityManager s = System.getSecurityManager(); ! if (s != null) ! s.checkListen(port); String propVal = System.getProperty("impl.prefix"); if (propVal == null || propVal.equals("")) impl = new PlainDatagramSocketImpl(); --- 147,177 ---- * the specified local port and address. * * @param port The local port number to bind to. ! * @param addr The local address to bind to. * * @exception SecurityException If a security manager exists and its * checkListen method doesn't allow the operation. * @exception SocketException If an error occurs. */ ! public DatagramSocket(int port, InetAddress addr) throws SocketException { ! this(new InetSocketAddress(addr, port)); ! } + /** + * Initializes a new instance of DatagramSocket that binds to + * the specified local port and address. + * + * @param address The local address and port number to bind to. + * + * @exception SecurityException If a security manager exists and its + * checkListen method doesn't allow the operation. + * @exception SocketException If an error occurs. + * + * @since 1.4 + */ + public DatagramSocket (SocketAddress address) throws SocketException + { String propVal = System.getProperty("impl.prefix"); if (propVal == null || propVal.equals("")) impl = new PlainDatagramSocketImpl(); *************** public class DatagramSocket *** 170,204 **** propVal + "DatagramSocketImpl"); impl = new PlainDatagramSocketImpl(); } - impl.create(); - - // For multicasting, set the socket to be reused (Stevens pp. 195-6). - if (this instanceof MulticastSocket) - impl.setOption(SocketOptions.SO_REUSEADDR, new Boolean(true)); ! impl.bind(port, laddr == null ? InetAddress.ANY_IF : laddr); ! ! remoteAddress = null; ! remotePort = -1; } ! ! /** ! * Initializes a new instance of DatagramSocket that binds to ! * the specified local port and address. ! * ! * @param port The local port number to bind to. ! * @param laddr The local address to bind to. ! * ! * @exception SecurityException If a security manager exists and its ! * checkListen method doesn't allow the operation. ! * @exception SocketException If an error occurs. ! * ! * @since 1.4 ! */ ! public DatagramSocket (SocketAddress address) throws SocketException { ! this (((InetSocketAddress) address).getPort (), ! ((InetSocketAddress) address).getAddress ()); } /** --- 187,215 ---- propVal + "DatagramSocketImpl"); impl = new PlainDatagramSocketImpl(); } ! if (address != null) ! bind(address); } ! ! // This needs to be accessible from java.net.MulticastSocket ! DatagramSocketImpl getImpl() ! throws SocketException { ! try ! { ! if (!implCreated) ! { ! impl.create(); ! implCreated = true; ! } ! ! return impl; ! } ! catch (IOException e) ! { ! throw new SocketException(e.getMessage()); ! } } /** *************** public class DatagramSocket *** 206,217 **** */ public void close() { ! if (!closed) { ! impl.close(); ! remoteAddress = null; ! remotePort = -1; ! closed = true; } } --- 217,248 ---- */ public void close() { ! if (isClosed()) ! return; ! ! try { ! getImpl().close(); ! } ! catch (SocketException e) ! { ! // Ignore this case, just close the socket in finally clause. ! } ! finally ! { ! remoteAddress = null; ! remotePort = -1; ! impl = null; ! } ! ! try ! { ! if (getChannel() != null) ! getChannel().close(); ! } ! catch (IOException e) ! { ! // Do nothing. } } *************** public class DatagramSocket *** 246,288 **** /** * Returns the local address this datagram socket is bound to. * * @since 1.1 */ public InetAddress getLocalAddress() { ! // FIXME: JCL p. 510 says this should call checkConnect. But what ! // string should be used as the hostname? Maybe this is just a side ! // effect of calling InetAddress.getLocalHost. ! // ! // And is getOption with SO_BINDADDR the right way to get the address? ! // Doesn't seem to be since this method doesn't throw a SocketException ! // and SO_BINADDR can throw one. ! // ! // Also see RETURNS section in JCL p. 510 about returning any local ! // addr "if the current execution context is not allowed to connect to ! // the network interface that is actually bound to this datagram socket." ! // How is that done? via InetAddress.getLocalHost? But that throws ! // an UnknownHostException and this method doesn't. ! // ! // if (s != null) ! // s.checkConnect("localhost", -1); try { ! return (InetAddress)impl.getOption(SocketOptions.SO_BINDADDR); ! } ! catch (SocketException ex) ! { ! } ! try { ! return InetAddress.getLocalHost(); } ! catch (UnknownHostException ex) { ! // FIXME: This should never happen, so how can we avoid this construct? return null; } } /** --- 277,312 ---- /** * Returns the local address this datagram socket is bound to. * + * @return The local address is the socket is bound or null + * * @since 1.1 */ public InetAddress getLocalAddress() { ! if (isClosed()) ! return null; ! ! InetAddress localAddr; ! try { ! localAddr = (InetAddress) getImpl().getOption(SocketOptions.SO_BINDADDR); ! SecurityManager s = System.getSecurityManager(); ! if (s != null) ! s.checkConnect (localAddr.getHostName(), -1); ! } ! catch (SecurityException e) { ! localAddr = InetAddress.ANY_IF; } ! catch (SocketException e) { ! // This cannot happen as we are bound. return null; } + + return localAddr; } /** *************** public class DatagramSocket *** 292,301 **** */ public int getLocalPort() { ! if (!isBound ()) return -1; ! ! return impl.getLocalPort(); } /** --- 316,333 ---- */ public int getLocalPort() { ! if (isClosed()) return -1; ! ! try ! { ! return getImpl().getLocalPort(); ! } ! catch (SocketException e) ! { ! // This cannot happen as we are bound. ! return 0; ! } } /** *************** public class DatagramSocket *** 310,324 **** */ public synchronized int getSoTimeout() throws SocketException { ! if (impl == null) ! throw new SocketException ("Cannot initialize Socket implementation"); ! Object timeout = impl.getOption(SocketOptions.SO_TIMEOUT); ! if (timeout instanceof Integer) ! return ((Integer)timeout).intValue(); ! else ! return 0; } /** --- 342,356 ---- */ public synchronized int getSoTimeout() throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! Object buf = getImpl().getOption(SocketOptions.SO_TIMEOUT); ! if (buf instanceof Integer) ! return ((Integer) buf).intValue(); ! ! throw new SocketException("unexpected type"); } /** *************** public class DatagramSocket *** 334,343 **** */ public synchronized void setSoTimeout(int timeout) throws SocketException { if (timeout < 0) throw new IllegalArgumentException("Invalid timeout: " + timeout); ! impl.setOption(SocketOptions.SO_TIMEOUT, new Integer(timeout)); } /** --- 366,378 ---- */ public synchronized void setSoTimeout(int timeout) throws SocketException { + if (isClosed()) + throw new SocketException("socket is closed"); + if (timeout < 0) throw new IllegalArgumentException("Invalid timeout: " + timeout); ! getImpl().setOption(SocketOptions.SO_TIMEOUT, new Integer(timeout)); } /** *************** public class DatagramSocket *** 353,367 **** */ public int getSendBufferSize() throws SocketException { ! if (impl == null) ! throw new SocketException ("Cannot initialize Socket implementation"); ! Object obj = impl.getOption(SocketOptions.SO_SNDBUF); ! if (obj instanceof Integer) ! return(((Integer)obj).intValue()); ! else ! throw new SocketException("Unexpected type"); } /** --- 388,402 ---- */ public int getSendBufferSize() throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! ! Object buf = getImpl().getOption(SocketOptions.SO_SNDBUF); ! if (buf instanceof Integer) ! return ((Integer) buf).intValue(); ! throw new SocketException("unexpected type"); } /** *************** public class DatagramSocket *** 378,387 **** */ public void setSendBufferSize(int size) throws SocketException { if (size < 0) throw new IllegalArgumentException("Buffer size is less than 0"); ! impl.setOption(SocketOptions.SO_SNDBUF, new Integer(size)); } /** --- 413,425 ---- */ public void setSendBufferSize(int size) throws SocketException { + if (isClosed()) + throw new SocketException("socket is closed"); + if (size < 0) throw new IllegalArgumentException("Buffer size is less than 0"); ! getImpl().setOption(SocketOptions.SO_SNDBUF, new Integer(size)); } /** *************** public class DatagramSocket *** 397,411 **** */ public int getReceiveBufferSize() throws SocketException { ! if (impl == null) ! throw new SocketException ("Cannot initialize Socket implementation"); ! Object obj = impl.getOption(SocketOptions.SO_RCVBUF); ! if (obj instanceof Integer) ! return(((Integer)obj).intValue()); ! else ! throw new SocketException("Unexpected type"); } /** --- 435,449 ---- */ public int getReceiveBufferSize() throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! Object buf = getImpl().getOption(SocketOptions.SO_RCVBUF); ! if (buf instanceof Integer) ! return ((Integer) buf).intValue(); ! ! throw new SocketException("unexpected type"); } /** *************** public class DatagramSocket *** 422,434 **** */ public void setReceiveBufferSize(int size) throws SocketException { ! if (impl == null) ! throw new SocketException ("Cannot initialize Socket implementation"); if (size < 0) throw new IllegalArgumentException("Buffer size is less than 0"); ! impl.setOption(SocketOptions.SO_RCVBUF, new Integer(size)); } /** --- 460,472 ---- */ public void setReceiveBufferSize(int size) throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); if (size < 0) throw new IllegalArgumentException("Buffer size is less than 0"); ! getImpl().setOption(SocketOptions.SO_RCVBUF, new Integer(size)); } /** *************** public class DatagramSocket *** 461,472 **** try { ! impl.connect (address, port); remoteAddress = address; remotePort = port; } catch (SocketException e) { } } --- 499,511 ---- try { ! getImpl().connect (address, port); remoteAddress = address; remotePort = port; } catch (SocketException e) { + // This means simply not connected or connect not implemented. } } *************** public class DatagramSocket *** 479,487 **** */ public void disconnect() { ! impl.disconnect(); ! remoteAddress = null; ! remotePort = -1; } /** --- 518,539 ---- */ public void disconnect() { ! if (!isConnected()) ! return; ! ! try ! { ! getImpl().disconnect(); ! } ! catch (SocketException e) ! { ! // This cannot happen as we are connected. ! } ! finally ! { ! remoteAddress = null; ! remotePort = -1; ! } } /** *************** public class DatagramSocket *** 489,497 **** * will block until a packet is received from the network. On return, * the passed in DatagramPacket is populated with the data * received and all the other information about the packet. ! * ! * @param p The datagram packet to put the incoming data into. ! * * @exception IOException If an error occurs. * @exception SocketTimeoutException If setSoTimeout was previously called * and the timeout has expired. --- 541,549 ---- * will block until a packet is received from the network. On return, * the passed in DatagramPacket is populated with the data * received and all the other information about the packet. ! * ! * @param p A DatagramPacket for storing the data ! * * @exception IOException If an error occurs. * @exception SocketTimeoutException If setSoTimeout was previously called * and the timeout has expired. *************** public class DatagramSocket *** 505,521 **** */ public synchronized void receive(DatagramPacket p) throws IOException { ! if (impl == null) ! throw new IOException ("Cannot initialize Socket implementation"); ! ! if (remoteAddress != null && remoteAddress.isMulticastAddress ()) ! throw new IOException ( ! "Socket connected to a multicast address my not receive"); ! if (ch != null && !ch.isBlocking ()) throw new IllegalBlockingModeException (); ! impl.receive(p); SecurityManager s = System.getSecurityManager(); if (s != null && isConnected ()) --- 557,576 ---- */ public synchronized void receive(DatagramPacket p) throws IOException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! ! if (remoteAddress != null ! && remoteAddress.isMulticastAddress()) ! throw new IOException ! ("Socket connected to a multicast address my not receive"); ! if (getChannel() != null ! && !getChannel().isBlocking () ! && !((DatagramChannelImpl) getChannel()).isInChannelOperation()) throw new IllegalBlockingModeException (); ! getImpl().receive(p); SecurityManager s = System.getSecurityManager(); if (s != null && isConnected ()) *************** public class DatagramSocket *** 539,544 **** --- 594,602 ---- */ public void send(DatagramPacket p) throws IOException { + if (isClosed()) + throw new SocketException("socket is closed"); + // JDK1.2: Don't do security checks if socket is connected; see jdk1.2 api. SecurityManager s = System.getSecurityManager(); if (s != null && !isConnected ()) *************** public class DatagramSocket *** 561,570 **** // FIXME: if this is a subclass of MulticastSocket, // use getTimeToLive for TTL val. ! if (ch != null && !ch.isBlocking ()) throw new IllegalBlockingModeException (); ! impl.send(p); } /** --- 619,630 ---- // FIXME: if this is a subclass of MulticastSocket, // use getTimeToLive for TTL val. ! if (getChannel() != null ! && !getChannel().isBlocking () ! && !((DatagramChannelImpl) getChannel()).isInChannelOperation()) throw new IllegalBlockingModeException (); ! getImpl().send(p); } /** *************** public class DatagramSocket *** 582,617 **** public void bind (SocketAddress address) throws SocketException { if (! (address instanceof InetSocketAddress)) ! throw new IllegalArgumentException (); ! InetSocketAddress tmp = (InetSocketAddress) address; SecurityManager s = System.getSecurityManager (); if (s != null) ! s.checkListen(tmp.getPort ()); ! impl.bind (tmp.getPort (), tmp.getAddress ()); } /** * Checks if the datagram socket is closed. * * @since 1.4 */ public boolean isClosed() { ! return closed; } /** * Returns the datagram channel assoziated with this datagram socket. * * @since 1.4 */ public DatagramChannel getChannel() { ! return ch; } /** --- 642,710 ---- public void bind (SocketAddress address) throws SocketException { + if (isClosed()) + throw new SocketException("socket is closed"); + if (! (address instanceof InetSocketAddress)) ! throw new IllegalArgumentException("unsupported address type"); ! InetAddress addr = ((InetSocketAddress) address).getAddress(); ! int port = ((InetSocketAddress) address).getPort(); ! ! if (port < 0 || port > 65535) ! throw new IllegalArgumentException("Invalid port: " + port); SecurityManager s = System.getSecurityManager (); if (s != null) ! s.checkListen(port); ! if (addr == null) ! addr = InetAddress.ANY_IF; ! ! try ! { ! getImpl().bind(port, addr); ! bound = true; ! } ! catch (SocketException exception) ! { ! getImpl().close(); ! throw exception; ! } ! catch (RuntimeException exception) ! { ! getImpl().close(); ! throw exception; ! } ! catch (Error error) ! { ! getImpl().close(); ! throw error; ! } } /** * Checks if the datagram socket is closed. * + * @return True if socket is closed, false otherwise. + * * @since 1.4 */ public boolean isClosed() { ! return impl == null; } /** * Returns the datagram channel assoziated with this datagram socket. * + * @return The associated DatagramChannel object or null + * * @since 1.4 */ public DatagramChannel getChannel() { ! return null; } /** *************** public class DatagramSocket *** 626,661 **** */ public void connect (SocketAddress address) throws SocketException { if ( !(address instanceof InetSocketAddress) ) ! throw new IllegalArgumentException ( ! "SocketAddress is not InetSocketAddress"); InetSocketAddress tmp = (InetSocketAddress) address; ! connect( tmp.getAddress(), tmp.getPort()); } /** * Returns the binding state of the socket. * * @since 1.4 */ public boolean isBound() { ! try ! { ! Object bindaddr = impl.getOption (SocketOptions.SO_BINDADDR); ! } ! catch (SocketException e) ! { ! return false; ! } ! ! return true; } /** * Returns the connection state of the socket. * * @since 1.4 */ public boolean isConnected() --- 719,751 ---- */ public void connect (SocketAddress address) throws SocketException { + if (isClosed()) + throw new SocketException("socket is closed"); + if ( !(address instanceof InetSocketAddress) ) ! throw new IllegalArgumentException("unsupported address type"); InetSocketAddress tmp = (InetSocketAddress) address; ! connect(tmp.getAddress(), tmp.getPort()); } /** * Returns the binding state of the socket. * + * @return True if socket bound, false otherwise. + * * @since 1.4 */ public boolean isBound() { ! return bound; } /** * Returns the connection state of the socket. * + * @return True if socket is connected, false otherwise. + * * @since 1.4 */ public boolean isConnected() *************** public class DatagramSocket *** 667,672 **** --- 757,764 ---- * Returns the SocketAddress of the host this socket is conneted to * or null if this socket is not connected. * + * @return The socket address of the remote host if connected or null + * * @since 1.4 */ public SocketAddress getRemoteSocketAddress() *************** public class DatagramSocket *** 678,702 **** } /** ! * Returns the local SocketAddress this socket is bound to ! * or null if it is not bound. * * @since 1.4 */ public SocketAddress getLocalSocketAddress() { ! InetAddress addr; ! try ! { ! addr = (InetAddress) impl.getOption (SocketOptions.SO_BINDADDR); ! } ! catch (SocketException e) ! { ! return null; ! } ! ! return new InetSocketAddress (addr, impl.localPort); } /** --- 770,787 ---- } /** ! * Returns the local SocketAddress this socket is bound to. ! * ! * @return The local SocketAddress or null if the socket is not bound. * * @since 1.4 */ public SocketAddress getLocalSocketAddress() { ! if (!isBound()) ! return null; ! return new InetSocketAddress (getLocalAddress(), getLocalPort()); } /** *************** public class DatagramSocket *** 710,776 **** */ public void setReuseAddress(boolean on) throws SocketException { ! if (impl == null) ! throw new SocketException ("Cannot initialize Socket implementation"); ! impl.setOption (SocketOptions.SO_REUSEADDR, new Boolean (on)); } /** * Checks if SO_REUSEADDR is enabled. * * @exception SocketException If an error occurs. * * @since 1.4 */ public boolean getReuseAddress() throws SocketException { ! if (impl == null) ! throw new SocketException ("Cannot initialize Socket implementation"); ! Object obj = impl.getOption (SocketOptions.SO_REUSEADDR); ! if (obj instanceof Boolean) ! return(((Boolean) obj).booleanValue ()); ! else ! throw new SocketException ("Unexpected type"); } /** * Enables/Disables SO_BROADCAST * ! * @param on Whether or not to have SO_BROADCAST turned on * * @exception SocketException If an error occurs * * @since 1.4 */ ! public void setBroadcast(boolean on) throws SocketException { ! if (impl == null) ! throw new SocketException ("Cannot initialize Socket implementation"); ! impl.setOption (SocketOptions.SO_BROADCAST, new Boolean (on)); } /** * Checks if SO_BROADCAST is enabled * * @exception SocketException If an error occurs * * @since 1.4 */ public boolean getBroadcast() throws SocketException { ! if (impl == null) ! throw new SocketException ("Cannot initialize Socket implementation"); ! Object obj = impl.getOption (SocketOptions.SO_BROADCAST); ! if (obj instanceof Boolean) ! return ((Boolean) obj).booleanValue (); ! else ! throw new SocketException ("Unexpected type"); } /** --- 795,865 ---- */ public void setReuseAddress(boolean on) throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! getImpl().setOption (SocketOptions.SO_REUSEADDR, new Boolean (on)); } /** * Checks if SO_REUSEADDR is enabled. * + * @return True if SO_REUSEADDR is set on the socket, false otherwise. + * * @exception SocketException If an error occurs. * * @since 1.4 */ public boolean getReuseAddress() throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! Object buf = getImpl().getOption (SocketOptions.SO_REUSEADDR); ! if (buf instanceof Boolean) ! return ((Boolean) buf).booleanValue(); ! ! throw new SocketException("unexpected type"); } /** * Enables/Disables SO_BROADCAST * ! * @param enable True if SO_BROADCAST should be enabled, false otherwise. * * @exception SocketException If an error occurs * * @since 1.4 */ ! public void setBroadcast(boolean enable) throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! getImpl().setOption(SocketOptions.SO_BROADCAST, new Boolean(enable)); } /** * Checks if SO_BROADCAST is enabled * + * @return Whether SO_BROADCAST is set + * * @exception SocketException If an error occurs * * @since 1.4 */ public boolean getBroadcast() throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! Object buf = getImpl().getOption(SocketOptions.SO_BROADCAST); ! if (buf instanceof Boolean) ! return ((Boolean) buf).booleanValue(); ! ! throw new SocketException("unexpected type"); } /** *************** public class DatagramSocket *** 781,806 **** * @exception SocketException If an error occurs * @exception IllegalArgumentException If tc value is illegal * ! * @see DatagramSocket:getTrafficClass * * @since 1.4 */ public void setTrafficClass(int tc) throws SocketException { ! if (impl == null) ! throw new SocketException ("Cannot initialize Socket implementation"); if (tc < 0 || tc > 255) throw new IllegalArgumentException(); ! impl.setOption (SocketOptions.IP_TOS, new Integer (tc)); } /** * Returns the current traffic class * ! * @see DatagramSocket:setTrafficClass * * @exception SocketException If an error occurs * --- 870,897 ---- * @exception SocketException If an error occurs * @exception IllegalArgumentException If tc value is illegal * ! * @see DatagramSocket#getTrafficClass() * * @since 1.4 */ public void setTrafficClass(int tc) throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); if (tc < 0 || tc > 255) throw new IllegalArgumentException(); ! getImpl().setOption (SocketOptions.IP_TOS, new Integer (tc)); } /** * Returns the current traffic class * ! * @return The current traffic class. ! * ! * @see DatagramSocket#setTrafficClass(int tc) * * @exception SocketException If an error occurs * *************** public class DatagramSocket *** 808,822 **** */ public int getTrafficClass() throws SocketException { ! if (impl == null) ! throw new SocketException( "Cannot initialize Socket implementation"); ! Object obj = impl.getOption(SocketOptions.IP_TOS); ! if (obj instanceof Integer) ! return ((Integer) obj).intValue (); ! else ! throw new SocketException ("Unexpected type"); } /** --- 899,913 ---- */ public int getTrafficClass() throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! ! Object buf = getImpl().getOption(SocketOptions.IP_TOS); ! if (buf instanceof Integer) ! return ((Integer) buf).intValue(); ! throw new SocketException("unexpected type"); } /** diff -Nrc3pad gcc-3.3.3/libjava/java/net/FileNameMap.java gcc-3.4.0/libjava/java/net/FileNameMap.java *** gcc-3.3.3/libjava/java/net/FileNameMap.java 2002-08-27 17:47:26.000000000 +0000 --- gcc-3.4.0/libjava/java/net/FileNameMap.java 2003-10-11 18:39:35.000000000 +0000 *************** *** 1,5 **** /* FileNameMap.java -- Maps filenames to MIME types ! Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* FileNameMap.java -- Maps filenames to MIME types ! Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** package java.net; *** 54,69 **** */ public interface FileNameMap { ! /** ! * This method is passed a filename and is responsible for determining ! * the appropriate MIME type for that file. ! * ! * @param filename The name of the file to generate a MIME type for. ! * ! * @return The MIME type for the filename passed in. ! */ ! String ! getContentTypeFor(String filename); } // interface FileNameMap --- 54,68 ---- */ public interface FileNameMap { ! /** ! * This method is passed a filename and is responsible for determining ! * the appropriate MIME type for that file. ! * ! * @param filename The name of the file to generate a MIME type for. ! * ! * @return The MIME type for the filename passed in. ! */ ! String getContentTypeFor(String filename); } // interface FileNameMap diff -Nrc3pad gcc-3.3.3/libjava/java/net/HttpURLConnection.java gcc-3.4.0/libjava/java/net/HttpURLConnection.java *** gcc-3.3.3/libjava/java/net/HttpURLConnection.java 2003-01-03 00:51:33.000000000 +0000 --- gcc-3.4.0/libjava/java/net/HttpURLConnection.java 2003-06-19 15:08:22.000000000 +0000 *************** *** 1,7 **** ! // HttpURLConnection.java - Subclass of communications links using ! // Hypertext Transfer Protocol. ! ! /* Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation This file is part of GNU Classpath. --- 1,6 ---- ! /* HttpURLConnection.java - Subclass of communications links using ! Hypertext Transfer Protocol. ! Copyright (C) 1998, 1999, 2000, 2002, 2003 Free Software Foundation This file is part of GNU Classpath. *************** this exception to your version of the li *** 37,45 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.net; ! import java.io.*; import java.security.Permission; /* --- 36,47 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package java.net; ! import java.io.InputStream; ! import java.io.IOException; ! import java.io.PushbackInputStream; import java.security.Permission; /* *************** public abstract class HttpURLConnection *** 242,247 **** --- 244,251 ---- /** * This error code indicates that some sort of server error occurred. + * + * @deprecated */ public static final int HTTP_SERVER_ERROR = 500; diff -Nrc3pad gcc-3.3.3/libjava/java/net/Inet4Address.java gcc-3.4.0/libjava/java/net/Inet4Address.java *** gcc-3.3.3/libjava/java/net/Inet4Address.java 2002-10-10 05:19:22.000000000 +0000 --- gcc-3.4.0/libjava/java/net/Inet4Address.java 2003-11-11 12:22:18.000000000 +0000 *************** *** 1,5 **** /* Inet4Address.java ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Inet4Address.java ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,44 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.net; - import java.io.IOException; import java.io.ObjectStreamException; /** * @author Michael Koch --- 35,45 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package java.net; import java.io.ObjectStreamException; + import java.util.Arrays; /** * @author Michael Koch *************** import java.io.ObjectStreamException; *** 55,61 **** public final class Inet4Address extends InetAddress { ! static final long serialVersionUID = 7615067291688066509L; /** * needed for serialization --- 56,62 ---- public final class Inet4Address extends InetAddress { ! static final long serialVersionUID = 3286316764910316507L; /** * needed for serialization *************** public final class Inet4Address extends *** 71,77 **** * @param addr The IP address * @param host The Hostname */ ! protected Inet4Address(byte[] addr, String host) { super (addr, host); } --- 72,78 ---- * @param addr The IP address * @param host The Hostname */ ! Inet4Address(byte[] addr, String host) { super (addr, host); } *************** public final class Inet4Address extends *** 103,109 **** { byte[] anylocal = { 0, 0, 0, 0 }; ! return addr == anylocal; } /** --- 104,110 ---- { byte[] anylocal = { 0, 0, 0, 0 }; ! return Arrays.equals(addr, anylocal); } /** *************** public final class Inet4Address extends *** 257,263 **** */ public boolean equals (Object obj) { ! if (obj == null || ! (obj instanceof InetAddress)) return false; byte[] addr1 = addr; --- 258,264 ---- */ public boolean equals (Object obj) { ! if (! (obj instanceof InetAddress)) return false; byte[] addr1 = addr; diff -Nrc3pad gcc-3.3.3/libjava/java/net/Inet6Address.java gcc-3.4.0/libjava/java/net/Inet6Address.java *** gcc-3.3.3/libjava/java/net/Inet6Address.java 2002-11-01 06:35:14.000000000 +0000 --- gcc-3.4.0/libjava/java/net/Inet6Address.java 2003-11-11 12:22:18.000000000 +0000 *************** *** 1,5 **** /* Inet6Address.java ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Inet6Address.java ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,43 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.net; ! import java.io.IOException; /** * @author Michael Koch --- 35,44 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package java.net; ! import java.util.Arrays; /** * @author Michael Koch *************** public final class Inet6Address extends *** 65,71 **** * @param addr The IP address * @param host The hostname */ ! protected Inet6Address (byte[] addr, String host) { super (addr, host); this.ipaddress = addr; --- 66,72 ---- * @param addr The IP address * @param host The hostname */ ! Inet6Address (byte[] addr, String host) { super (addr, host); this.ipaddress = addr; *************** public final class Inet6Address extends *** 91,97 **** byte[] anylocal = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; ! return ipaddress == anylocal; } /** --- 92,98 ---- byte[] anylocal = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; ! return Arrays.equals(ipaddress, anylocal); } /** *************** public final class Inet6Address extends *** 104,110 **** byte[] loopback = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }; ! return ipaddress == loopback; } /** --- 105,111 ---- byte[] loopback = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }; ! return Arrays.equals(ipaddress, loopback); } /** *************** public final class Inet6Address extends *** 242,248 **** */ public boolean equals (Object obj) { ! if (obj == null || ! (obj instanceof Inet6Address)) return false; Inet6Address tmp = (Inet6Address) obj; --- 243,249 ---- */ public boolean equals (Object obj) { ! if (! (obj instanceof Inet6Address)) return false; Inet6Address tmp = (Inet6Address) obj; diff -Nrc3pad gcc-3.3.3/libjava/java/net/InetAddress.java gcc-3.4.0/libjava/java/net/InetAddress.java *** gcc-3.3.3/libjava/java/net/InetAddress.java 2002-12-07 01:19:02.000000000 +0000 --- gcc-3.4.0/libjava/java/net/InetAddress.java 2003-11-30 21:02:56.000000000 +0000 *************** *** 1,108 **** ! // INetAddress.java -- An Internet Protocol (IP) address. ! /* Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation ! This file is part of libgcj. - This software is copyrighted work licensed under the terms of the - Libgcj License. Please consult the file "LIBGCJ_LICENSE" for - details. */ package java.net; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; - import java.io.IOException; - import java.io.Serializable; import java.io.ObjectStreamException; /** * @author Per Bothner - * @date January 6, 1999. - */ - - /* - * Written using on-line Java Platform 1.2 API Specification, as well - * as "The Java Class Libraries", 2nd edition (Addison-Wesley, 1998). - * (The latter turns out to have some errors ...) - * Status: Believed complete and correct. * * @specnote This class is not final since JK 1.4 */ - public class InetAddress implements Serializable { ! // The Serialized Form specifies that an int 'address' is saved/restored. ! // This class uses a byte array internally so we'll just do the conversion ! // at serialization time and leave the rest of the algorithm as is. private int address; transient byte[] addr; String hostName; ! // The field 'family' seems to be the AF_ value. ! // FIXME: Much of the code in the other java.net classes does not make ! // use of this family field. A better implementation would be to make ! // use of getaddrinfo() and have other methods just check the family ! // field rather than examining the length of the address each time. int family; - private static final long serialVersionUID = 3286316764910316507L; /** ! * Needed for serialization */ ! private void readResolve () throws ObjectStreamException ! { ! // FIXME: implement this ! } ! ! private void readObject(ObjectInputStream ois) ! throws IOException, ClassNotFoundException ! { ! ois.defaultReadObject(); ! addr = new byte[4]; ! addr[3] = (byte) address; ! for (int i = 2; i >= 0; --i) ! addr[i] = (byte) (address >>= 8); ! // Ignore family from serialized data. Since the saved address is 32 bits ! // the deserialized object will have an IPv4 address i.e. AF_INET family. ! // FIXME: An alternative is to call the aton method on the deserialized ! // hostname to get a new address. The Serialized Form doc is silent ! // on how these fields are used. ! family = getFamily (addr); ! } ! ! private void writeObject(ObjectOutputStream oos) throws IOException { ! // Build a 32 bit address from the last 4 bytes of a 4 byte IPv4 address ! // or a 16 byte IPv6 address. ! int len = addr.length; ! int i = len - 4; ! for (; i < len; i++) ! address = address << 8 | (((int) addr[i]) & 0xFF); ! oos.defaultWriteObject(); } ! private static native int getFamily (byte[] address); ! InetAddress (byte[] address, String hostname) { addr = address; hostName = hostname; if (address != null) family = getFamily (address); } /** ! * Utility routine to check if the InetAddress is an IP multicast address * * @since 1.1 */ ! public boolean isMulticastAddress () { ! int len = addr.length; ! if (len == 4) ! return (addr[0] & 0xF0) == 0xE0; ! if (len == 16) ! return addr[0] == (byte) 0xFF; return false; } --- 1,164 ---- ! /* InetAddress.java -- Class to model an Internet address ! Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc. ! This file is part of GNU Classpath. ! GNU Classpath is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! GNU Classpath is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with GNU Classpath; see the file COPYING. If not, write to the ! Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ! 02111-1307 USA. ! ! Linking this library statically or dynamically with other modules is ! making a combined work based on this library. Thus, the terms and ! conditions of the GNU General Public License cover the whole ! combination. ! ! As a special exception, the copyright holders of this library give you ! permission to link this library with independent modules to produce an ! executable, regardless of the license terms of these independent ! modules, and to copy and distribute the resulting executable under ! terms of your choice, provided that you also meet, for each linked ! independent module, the terms and conditions of the license of that ! module. An independent module is a module which is not derived from ! or based on this library. If you modify this library, you may extend ! this exception to your version of the library, but you are not ! obligated to do so. If you do not wish to do so, delete this ! exception statement from your version. */ package java.net; + import gnu.classpath.Configuration; + import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.ObjectStreamException; + import java.io.Serializable; /** + * This class models an Internet address. It does not have a public + * constructor. Instead, new instances of this objects are created + * using the static methods getLocalHost(), getByName(), and + * getAllByName(). + *

            + * This class fulfills the function of the C style functions gethostname(), + * gethostbyname(), and gethostbyaddr(). It resolves Internet DNS names + * into their corresponding numeric addresses and vice versa. + * + * @author Aaron M. Renn * @author Per Bothner * * @specnote This class is not final since JK 1.4 */ public class InetAddress implements Serializable { ! private static final long serialVersionUID = 3286316764910316507L; ! ! /** ! * Dummy InetAddress, used to bind socket to any (all) network interfaces. ! */ ! static InetAddress ANY_IF; ! ! private static final byte[] localhostAddress = { 127, 0, 0, 1 }; ! ! private static InetAddress localhost = null; ! ! static ! { ! // load the shared library needed for name resolution ! if (Configuration.INIT_LOAD_LIBRARY) ! { ! System.loadLibrary ("javanet"); ! } ! ! byte[] zeros = { 0, 0, 0, 0 }; ! ANY_IF = new InetAddress (zeros, "0.0.0.0"); ! } ! ! /** ! * The Serialized Form specifies that an int 'address' is saved/restored. ! * This class uses a byte array internally so we'll just do the conversion ! * at serialization time and leave the rest of the algorithm as is. ! */ private int address; + + /** + * An array of octets representing an IP address. + */ transient byte[] addr; + + /** + * The name of the host for this address. + */ String hostName; ! ! /** ! * The field 'family' seems to be the AF_ value. ! * FIXME: Much of the code in the other java.net classes does not make ! * use of this family field. A better implementation would be to make ! * use of getaddrinfo() and have other methods just check the family ! * field rather than examining the length of the address each time. ! */ int family; /** ! * Initializes this object's addr instance variable from the passed in ! * int array. Note that this constructor is protected and is called ! * only by static methods in this class. ! * ! * @param ipaddr The IP number of this address as an array of bytes */ ! InetAddress (byte[] address) { ! this (address, null); } ! /** ! * Initializes this object's addr instance variable from the passed in ! * int array. Note that this constructor is protected and is called ! * only by static methods in this class. ! * ! * @param ipaddr The IP number of this address as an array of bytes ! * @param hostname The hostname of this IP address. ! */ InetAddress (byte[] address, String hostname) { addr = address; hostName = hostname; + if (address != null) family = getFamily (address); } /** ! * Returns true if this address is a multicast address, false otherwise. ! * An address is multicast if the high four bits are "1110". These are ! * also known as "Class D" addresses. ! * ! * @return true if mulitcast, false if not * * @since 1.1 */ ! public boolean isMulticastAddress() { ! // Mask against high order bits of 1110 ! if (addr.length == 4) ! return (addr [0] & 0xF0) == 0xE0; ! ! // Mask against high order bits of 11111111 ! if (addr.length == 16) ! return addr [0] == (byte) 0xFF; ! return false; } *************** public class InetAddress implements Seri *** 111,121 **** * * @since 1.4 */ ! public boolean isAnyLocalAddress () { // This is the IPv4 implementation. // Any class derived from InetAddress should override this. ! return addr == zeros; } /** --- 167,177 ---- * * @since 1.4 */ ! public boolean isAnyLocalAddress() { // This is the IPv4 implementation. // Any class derived from InetAddress should override this. ! return equals (ANY_IF); } /** *************** public class InetAddress implements Seri *** 123,134 **** * * @since 1.4 */ ! public boolean isLoopbackAddress () { // This is the IPv4 implementation. // Any class derived from InetAddress should override this. ! return addr[0] == 0x7F; } /** --- 179,190 ---- * * @since 1.4 */ ! public boolean isLoopbackAddress() { // This is the IPv4 implementation. // Any class derived from InetAddress should override this. ! return addr [0] == 0x7F; } /** *************** public class InetAddress implements Seri *** 136,142 **** * * @since 1.4 */ ! public boolean isLinkLocalAddress () { // This is the IPv4 implementation. // Any class derived from InetAddress should override this. --- 192,198 ---- * * @since 1.4 */ ! public boolean isLinkLocalAddress() { // This is the IPv4 implementation. // Any class derived from InetAddress should override this. *************** public class InetAddress implements Seri *** 150,173 **** * * @since 1.4 */ ! public boolean isSiteLocalAddress () { // This is the IPv4 implementation. // Any class derived from InetAddress should override this. // 10.0.0.0/8 ! if (addr[0] == 0x0A) return true; // XXX: Suns JDK 1.4.1 (on Linux) seems to have a bug here: // it says 172.16.0.0 - 172.255.255.255 are site local addresses // 172.16.0.0/12 ! if (addr[0] == 0xAC && (addr[1] & 0xF0) == 0x01) return true; // 192.168.0.0/16 ! if (addr[0] == 0xC0 && addr[1] == 0xA8) return true; // XXX: Do we need to check more addresses here ? --- 206,231 ---- * * @since 1.4 */ ! public boolean isSiteLocalAddress() { // This is the IPv4 implementation. // Any class derived from InetAddress should override this. // 10.0.0.0/8 ! if (addr [0] == 0x0A) return true; // XXX: Suns JDK 1.4.1 (on Linux) seems to have a bug here: // it says 172.16.0.0 - 172.255.255.255 are site local addresses // 172.16.0.0/12 ! if (addr [0] == 0xAC ! && (addr [1] & 0xF0) == 0x01) return true; // 192.168.0.0/16 ! if (addr [0] == 0xC0 ! && addr [1] == 0xA8) return true; // XXX: Do we need to check more addresses here ? *************** public class InetAddress implements Seri *** 179,185 **** * * @since 1.4 */ ! public boolean isMCGlobal () { // This is the IPv4 implementation. // Any class derived from InetAddress should override this. --- 237,243 ---- * * @since 1.4 */ ! public boolean isMCGlobal() { // This is the IPv4 implementation. // Any class derived from InetAddress should override this. *************** public class InetAddress implements Seri *** 193,199 **** * * @since 1.4 */ ! public boolean isMCNodeLocal () { // This is the IPv4 implementation. // Any class derived from InetAddress should override this. --- 251,257 ---- * * @since 1.4 */ ! public boolean isMCNodeLocal() { // This is the IPv4 implementation. // Any class derived from InetAddress should override this. *************** public class InetAddress implements Seri *** 207,231 **** * * @since 1.4 */ ! public boolean isMCLinkLocal () { // This is the IPv4 implementation. // Any class derived from InetAddress should override this. ! if (!isMulticastAddress ()) return false; ! return (addr[0] == 0xE0 ! && addr[1] == 0x00 ! && addr[2] == 0x00); } /** ! * Utility reoutine to check if InetAddress is a site local multicast address * * @since 1.4 */ ! public boolean isMCSiteLocal () { // This is the IPv4 implementation. // Any class derived from InetAddress should override this. --- 265,289 ---- * * @since 1.4 */ ! public boolean isMCLinkLocal() { // This is the IPv4 implementation. // Any class derived from InetAddress should override this. ! if (!isMulticastAddress()) return false; ! return (addr [0] == 0xE0 ! && addr [1] == 0x00 ! && addr [2] == 0x00); } /** ! * Utility routine to check if InetAddress is a site local multicast address * * @since 1.4 */ ! public boolean isMCSiteLocal() { // This is the IPv4 implementation. // Any class derived from InetAddress should override this. *************** public class InetAddress implements Seri *** 240,246 **** * * @since 1.4 */ ! public boolean isMCOrgLocal () { // This is the IPv4 implementation. // Any class derived from InetAddress should override this. --- 298,304 ---- * * @since 1.4 */ ! public boolean isMCOrgLocal() { // This is the IPv4 implementation. // Any class derived from InetAddress should override this. *************** public class InetAddress implements Seri *** 250,258 **** } /** ! * Returns the hostname represented by this InetAddress */ ! public String getHostName () { if (hostName == null) lookup (null, this, false); --- 308,319 ---- } /** ! * Returns the hostname for this address. This will return the IP address ! * as a String if there is no hostname available for this address ! * ! * @return The hostname for this address */ ! public String getHostName() { if (hostName == null) lookup (null, this, false); *************** public class InetAddress implements Seri *** 265,273 **** * * @since 1.4 */ ! public String getCanonicalHostName () { ! SecurityManager sm = System.getSecurityManager (); if (sm != null) { try --- 326,334 ---- * * @since 1.4 */ ! public String getCanonicalHostName() { ! SecurityManager sm = System.getSecurityManager(); if (sm != null) { try *************** public class InetAddress implements Seri *** 276,294 **** } catch (SecurityException e) { ! return getHostAddress (); } } // Try to find the FDQN now ! InetAddress address = new InetAddress (getAddress (), null); ! return address.getHostName (); } /** ! * Returns the IP address of this InetAddress as array of bytes */ ! public byte[] getAddress () { // An experiment shows that JDK1.2 returns a different byte array each // time. This makes sense, in terms of security. --- 337,357 ---- } catch (SecurityException e) { ! return getHostAddress(); } } // Try to find the FDQN now ! InetAddress address = new InetAddress (getAddress(), null); ! return address.getHostName(); } /** ! * Returns the IP address of this object as a byte array. ! * ! * @return IP address */ ! public byte[] getAddress() { // An experiment shows that JDK1.2 returns a different byte array each // time. This makes sense, in terms of security. *************** public class InetAddress implements Seri *** 298,315 **** /* Helper function due to a CNI limitation. */ private static InetAddress[] allocArray (int count) { ! return new InetAddress[count]; } /* Helper function due to a CNI limitation. */ private static SecurityException checkConnect (String hostname) { SecurityManager s = System.getSecurityManager(); if (s == null) return null; try { ! s.checkConnect(hostname, -1); return null; } catch (SecurityException ex) --- 361,380 ---- /* Helper function due to a CNI limitation. */ private static InetAddress[] allocArray (int count) { ! return new InetAddress [count]; } /* Helper function due to a CNI limitation. */ private static SecurityException checkConnect (String hostname) { SecurityManager s = System.getSecurityManager(); + if (s == null) return null; + try { ! s.checkConnect (hostname, -1); return null; } catch (SecurityException ex) *************** public class InetAddress implements Seri *** 319,376 **** } /** ! * Returns the IP address as string * * @since 1.0.2 */ ! public String getHostAddress () { ! StringBuffer sbuf = new StringBuffer(40); int len = addr.length; int i = 0; if (len == 16) { // An IPv6 address. ! for (; ; i += 2) { if (i >= 16) ! return sbuf.toString(); ! int x = ((addr[i] & 0xFF) << 8) | (addr[i+1] & 0xFF); ! boolean empty = sbuf.length() == 0; if (empty) { if (i == 10 && x == 0xFFFF) { // IPv4-mapped IPv6 address. ! sbuf.append(":FFFF:"); break; // Continue as IPv4 address; } else if (i == 12) { // IPv4-compatible IPv6 address. ! sbuf.append(':'); break; // Continue as IPv4 address. } else if (i > 0) ! sbuf.append("::"); } else ! sbuf.append(':'); if (x != 0 || i >= 14) ! sbuf.append(Integer.toHexString(x).toUpperCase()); } } ! for ( ; ; ) { ! sbuf.append(addr[i] & 0xFF); i++; if (i == len) break; ! sbuf.append('.'); } ! return sbuf.toString(); } /** ! * Returns a hashcode of the InetAddress */ public int hashCode() { --- 384,454 ---- } /** ! * Returns the IP address of this object as a String. The address is in ! * the dotted octet notation, for example, "127.0.0.1". ! * ! * @return The IP address of this object in String form * * @since 1.0.2 */ ! public String getHostAddress() { ! StringBuffer sb = new StringBuffer (40); int len = addr.length; int i = 0; + if (len == 16) { // An IPv6 address. ! for ( ; ; i += 2) { if (i >= 16) ! return sb.toString(); ! ! int x = ((addr [i] & 0xFF) << 8) | (addr [i + 1] & 0xFF); ! boolean empty = sb.length() == 0; ! if (empty) { if (i == 10 && x == 0xFFFF) { // IPv4-mapped IPv6 address. ! sb.append (":FFFF:"); break; // Continue as IPv4 address; } else if (i == 12) { // IPv4-compatible IPv6 address. ! sb.append (':'); break; // Continue as IPv4 address. } else if (i > 0) ! sb.append ("::"); } else ! sb.append (':'); ! if (x != 0 || i >= 14) ! sb.append (Integer.toHexString (x).toUpperCase()); } } ! ! for ( ; ; ) { ! sb.append (addr [i] & 0xff); i++; + if (i == len) break; ! ! sb.append ('.'); } ! return sb.toString(); } /** ! * Returns a hash value for this address. Useful for creating hash ! * tables. Overrides Object.hashCode() ! * ! * @return A hash value for this address. */ public int hashCode() { *************** public class InetAddress implements Seri *** 379,395 **** int hash = 0; int len = addr.length; int i = len > 4 ? len - 4 : 0; for ( ; i < len; i++) hash = (hash << 8) | (addr[i] & 0xFF); return hash; } /** ! * Compares the InetAddress object with another one. */ public boolean equals (Object obj) { ! if (obj == null || ! (obj instanceof InetAddress)) return false; // "The Java Class Libraries" 2nd edition says "If a machine has --- 457,482 ---- int hash = 0; int len = addr.length; int i = len > 4 ? len - 4 : 0; + for ( ; i < len; i++) hash = (hash << 8) | (addr[i] & 0xFF); + return hash; } /** ! * Tests this address for equality against another InetAddress. The two ! * addresses are considered equal if they contain the exact same octets. ! * This implementation overrides Object.equals() ! * ! * @param obj The address to test for equality ! * ! * @return true if the passed in object's address is equal to this one's, ! * false otherwise */ public boolean equals (Object obj) { ! if (! (obj instanceof InetAddress)) return false; // "The Java Class Libraries" 2nd edition says "If a machine has *************** public class InetAddress implements Seri *** 398,425 **** // different host names." This violates the description in the // JDK 1.2 API documentation. A little experimentation // shows that the latter is correct. - byte[] addr1 = addr; byte[] addr2 = ((InetAddress) obj).addr; ! if (addr1.length != addr2.length) return false; ! for (int i = addr1.length; --i >= 0; ) ! if (addr1[i] != addr2[i]) return false; return true; } /** ! * Returns then InetAddress as string */ public String toString() { ! String result; String address = getHostAddress(); if (hostName != null) ! result = hostName + "/" + address; else ! result = address; ! return result; } /** --- 485,520 ---- // different host names." This violates the description in the // JDK 1.2 API documentation. A little experimentation // shows that the latter is correct. byte[] addr2 = ((InetAddress) obj).addr; ! ! if (addr.length != addr2.length) return false; ! ! for (int i = 0; i < addr.length; i++) ! if (addr [i] != addr2 [i]) return false; + return true; } /** ! * Converts this address to a String. This string contains the IP in ! * dotted decimal form. For example: "127.0.0.1" This method is equivalent ! * to getHostAddress() and overrides Object.toString() ! * ! * @return This address in String form */ public String toString() { ! String host; String address = getHostAddress(); + if (hostName != null) ! host = hostName; else ! host = address; ! ! return host + "/" + address; } /** *************** public class InetAddress implements Seri *** 434,449 **** * * @since 1.4 */ ! public static InetAddress getByAddress(byte[] addr) throws UnknownHostException { ! if (addr.length != 4 && addr.length != 16) ! throw new UnknownHostException ("IP address has illegal length"); ! ! if (addr.length == 4) ! return new Inet4Address (addr, null); ! ! return new Inet6Address (addr, null); } /** --- 529,538 ---- * * @since 1.4 */ ! public static InetAddress getByAddress (byte[] addr) throws UnknownHostException { ! return getByAddress (null, addr); } /** *************** public class InetAddress implements Seri *** 469,483 **** throw new UnknownHostException ("IP address has illegal length"); } ! /** If host is a valid numeric IP address, return the numeric address. ! * Otherwise, return null. */ private static native byte[] aton (String host); private static native InetAddress[] lookup (String hostname, InetAddress addr, boolean all); /** ! * Determines the IP address of a host, given the host's name. * * @exception UnknownHostException If no IP address for the host could * be found --- 558,585 ---- throw new UnknownHostException ("IP address has illegal length"); } ! /** ! * If host is a valid numeric IP address, return the numeric address. ! * Otherwise, return null. ! */ private static native byte[] aton (String host); private static native InetAddress[] lookup (String hostname, InetAddress addr, boolean all); + private static native int getFamily (byte[] address); + /** ! * Returns an InetAddress object representing the IP address of the given ! * hostname. This name can be either a hostname such as "www.urbanophile.com" ! * or an IP address in dotted decimal format such as "127.0.0.1". If the ! * hostname is null, the hostname of the local machine is supplied by ! * default. This method is equivalent to returning the first element in ! * the InetAddress array returned from GetAllByName. ! * ! * @param hostname The name of the desired host, or null for the local machine. ! * ! * @return The address of the host as an InetAddress object. * * @exception UnknownHostException If no IP address for the host could * be found *************** public class InetAddress implements Seri *** 487,495 **** public static InetAddress getByName (String hostname) throws UnknownHostException { ! SecurityManager sm = System.getSecurityManager(); ! if (sm != null) ! sm.checkConnect (hostname, -1); // Default to current host if necessary if (hostname == null) --- 589,597 ---- public static InetAddress getByName (String hostname) throws UnknownHostException { ! SecurityManager s = System.getSecurityManager(); ! if (s != null) ! s.checkConnect (hostname, -1); // Default to current host if necessary if (hostname == null) *************** public class InetAddress implements Seri *** 503,515 **** return new Inet4Address (address, null); else if (address.length == 16) { ! if ((address[10] == 0xFF) && (address[11] == 0xFF)) { ! byte[] ip4addr = new byte[4]; ! ip4addr[0] = address[12]; ! ip4addr[1] = address[13]; ! ip4addr[2] = address[14]; ! ip4addr[3] = address[15]; return new Inet4Address (ip4addr, null); } return new Inet6Address (address, null); --- 605,617 ---- return new Inet4Address (address, null); else if (address.length == 16) { ! if ((address [10] == 0xFF) && (address [11] == 0xFF)) { ! byte[] ip4addr = new byte [4]; ! ip4addr [0] = address [12]; ! ip4addr [1] = address [13]; ! ip4addr [2] = address [14]; ! ip4addr [3] = address [15]; return new Inet4Address (ip4addr, null); } return new Inet6Address (address, null); *************** public class InetAddress implements Seri *** 520,532 **** // Try to resolve the host by DNS InetAddress[] addresses = getAllByName (hostname); ! return addresses[0]; } /** ! * Given the name of a host, returns an array of its IP addresses, ! * based on the configured name service on the system. * * @exception UnknownHostException If no IP address for the host could * be found * @exception SecurityException If a security manager exists and its --- 622,642 ---- // Try to resolve the host by DNS InetAddress[] addresses = getAllByName (hostname); ! return addresses [0]; } /** ! * Returns an array of InetAddress objects representing all the host/ip ! * addresses of a given host, given the host's name. This name can be ! * either a hostname such as "www.urbanophile.com" or an IP address in ! * dotted decimal format such as "127.0.0.1". If the value is null, the ! * hostname of the local machine is supplied by default. * + * @param @param hostname The name of the desired host, or null for the + * local machine. + * + * @return All addresses of the host as an array of InetAddress objects. + * * @exception UnknownHostException If no IP address for the host could * be found * @exception SecurityException If a security manager exists and its *************** public class InetAddress implements Seri *** 535,550 **** public static InetAddress[] getAllByName (String hostname) throws UnknownHostException { ! SecurityManager sm = System.getSecurityManager(); ! if (sm != null) ! sm.checkConnect(hostname, -1); // Check if hostname is an IP address byte[] address = aton (hostname); if (address != null) { ! InetAddress[] result = new InetAddress[1]; ! result[0] = new InetAddress(address, null); return result; } --- 645,660 ---- public static InetAddress[] getAllByName (String hostname) throws UnknownHostException { ! SecurityManager s = System.getSecurityManager(); ! if (s != null) ! s.checkConnect (hostname, -1); // Check if hostname is an IP address byte[] address = aton (hostname); if (address != null) { ! InetAddress[] result = new InetAddress [1]; ! result [0] = new InetAddress (address, null); return result; } *************** public class InetAddress implements Seri *** 552,570 **** return lookup (hostname, null, true); } ! static final byte[] zeros = {0,0,0,0}; ! ! /* dummy InetAddress, used to bind socket to any (all) network interfaces */ ! static final InetAddress ANY_IF = new InetAddress(zeros, null); ! ! private static final byte[] localhostAddress = { 127, 0, 0, 1 }; ! ! private static native String getLocalHostname (); ! ! private static InetAddress localhost = null; /** ! * Returns the local host * * @exception UnknownHostException If no IP address for the host could * be found --- 662,674 ---- return lookup (hostname, null, true); } ! private static native String getLocalHostname(); /** ! * Returns an InetAddress object representing the address of the current ! * host. ! * ! * @return The local host's address * * @exception UnknownHostException If no IP address for the host could * be found *************** public class InetAddress implements Seri *** 572,593 **** public static InetAddress getLocalHost() throws UnknownHostException { SecurityManager s = System.getSecurityManager(); // Experimentation shows that JDK1.2 does cache the result. // However, if there is a security manager, and the cached result // is other than "localhost", we need to check again. if (localhost == null || (s != null && localhost.addr != localhostAddress)) ! getLocalHost(s); return localhost; } ! private static synchronized void getLocalHost(SecurityManager s) throws UnknownHostException { // Check the localhost cache again, now that we've synchronized. if (s == null && localhost != null) return; String hostname = getLocalHostname(); if (s != null) { // "The Java Class Libraries" suggests that if the security --- 676,701 ---- public static InetAddress getLocalHost() throws UnknownHostException { SecurityManager s = System.getSecurityManager(); + // Experimentation shows that JDK1.2 does cache the result. // However, if there is a security manager, and the cached result // is other than "localhost", we need to check again. if (localhost == null || (s != null && localhost.addr != localhostAddress)) ! getLocalHost (s); ! return localhost; } ! private static synchronized void getLocalHost (SecurityManager s) throws UnknownHostException { // Check the localhost cache again, now that we've synchronized. if (s == null && localhost != null) return; + String hostname = getLocalHostname(); + if (s != null) { // "The Java Class Libraries" suggests that if the security *************** public class InetAddress implements Seri *** 600,624 **** { // This is wrong, if the name returned from getLocalHostname() // is not a fully qualified name. FIXME. ! s.checkConnect(hostname, -1); } catch (SecurityException ex) { hostname = null; } } if (hostname != null) { try { ! localhost = new InetAddress(null, null); ! lookup(hostname, localhost, false); } catch (Exception ex) { } } if (localhost == null) localhost = new InetAddress (localhostAddress, "localhost"); } } --- 708,773 ---- { // This is wrong, if the name returned from getLocalHostname() // is not a fully qualified name. FIXME. ! s.checkConnect (hostname, -1); } catch (SecurityException ex) { hostname = null; } } + if (hostname != null) { try { ! localhost = new InetAddress (null, null); ! lookup (hostname, localhost, false); } catch (Exception ex) { } } + if (localhost == null) localhost = new InetAddress (localhostAddress, "localhost"); } + + /** + * Needed for serialization + */ + private void readResolve() throws ObjectStreamException + { + // FIXME: implement this + } + + private void readObject (ObjectInputStream ois) + throws IOException, ClassNotFoundException + { + ois.defaultReadObject(); + addr = new byte [4]; + addr [3] = (byte) address; + + for (int i = 2; i >= 0; --i) + addr [i] = (byte) (address >>= 8); + + // Ignore family from serialized data. Since the saved address is 32 bits + // the deserialized object will have an IPv4 address i.e. AF_INET family. + // FIXME: An alternative is to call the aton method on the deserialized + // hostname to get a new address. The Serialized Form doc is silent + // on how these fields are used. + family = getFamily (addr); + } + + private void writeObject (ObjectOutputStream oos) throws IOException + { + // Build a 32 bit address from the last 4 bytes of a 4 byte IPv4 address + // or a 16 byte IPv6 address. + int len = addr.length; + int i = len - 4; + + for (; i < len; i++) + address = address << 8 | (((int) addr [i]) & 0xFF); + + oos.defaultWriteObject(); + } } diff -Nrc3pad gcc-3.3.3/libjava/java/net/InetSocketAddress.java gcc-3.4.0/libjava/java/net/InetSocketAddress.java *** gcc-3.3.3/libjava/java/net/InetSocketAddress.java 2003-01-14 22:27:29.000000000 +0000 --- gcc-3.4.0/libjava/java/net/InetSocketAddress.java 2003-11-26 10:41:02.000000000 +0000 *************** public class InetSocketAddress extends S *** 52,60 **** */ private static final long serialVersionUID = 5076001401234631237L; ! String hostname; ! InetAddress addr; ! int port; /** * Constructs an InetSocketAddress instance. --- 52,71 ---- */ private static final long serialVersionUID = 5076001401234631237L; ! /** ! * Name of host. ! */ ! private String hostname; ! ! /** ! * Address of host. ! */ ! private InetAddress addr; ! ! /** ! * Port of host. ! */ ! private int port; /** * Constructs an InetSocketAddress instance. *************** public class InetSocketAddress extends S *** 68,74 **** throws IllegalArgumentException { if (port < 0 || port > 65535) ! throw new IllegalArgumentException(); this.addr = addr; this.port = port; --- 79,88 ---- throws IllegalArgumentException { if (port < 0 || port > 65535) ! throw new IllegalArgumentException ("Bad port number: " + port); ! ! if (addr == null) ! addr = InetAddress.ANY_IF; this.addr = addr; this.port = port; *************** public class InetSocketAddress extends S *** 85,109 **** public InetSocketAddress(int port) throws IllegalArgumentException { ! if (port < 0 || port > 65535) ! throw new IllegalArgumentException(); ! ! this.port = port; ! ! try ! { ! byte[] any = { 0, 0, 0, 0 }; ! this.addr = InetAddress.getByAddress (any); ! this.hostname = "0.0.0.0"; ! } ! catch (UnknownHostException e) ! { ! this.addr = null; ! this.hostname = ""; ! } } - /** * Constructs an InetSocketAddress instance. * --- 99,107 ---- public InetSocketAddress(int port) throws IllegalArgumentException { ! this ((InetAddress) null, port); } /** * Constructs an InetSocketAddress instance. * *************** public class InetSocketAddress extends S *** 115,122 **** public InetSocketAddress(String hostname, int port) throws IllegalArgumentException { if (port < 0 || port > 65535) ! throw new IllegalArgumentException(); this.port = port; this.hostname = hostname; --- 113,123 ---- public InetSocketAddress(String hostname, int port) throws IllegalArgumentException { + if (hostname == null) + throw new IllegalArgumentException ("Null host name value"); + if (port < 0 || port > 65535) ! throw new IllegalArgumentException ("Bad port number: " + port); this.port = port; this.hostname = hostname; *************** public class InetSocketAddress extends S *** 134,139 **** --- 135,144 ---- /** * Test if obj is a InetSocketAddress and * has the same address and port + * + * @param obj The obj to compare this address with. + * + * @return True if obj is equal. */ public final boolean equals (Object obj) { *************** public class InetSocketAddress extends S *** 142,149 **** if (obj instanceof InetSocketAddress) { ! InetSocketAddress a = (InetSocketAddress) obj; ! return addr.equals(a.addr) && a.port == port; } return false; --- 147,160 ---- if (obj instanceof InetSocketAddress) { ! InetSocketAddress sa = (InetSocketAddress) obj; ! ! if (addr == null && sa.addr != null) ! return false; ! else if (addr == null && sa.addr == null) ! return hostname.equals (sa.hostname) && sa.port == port; ! else ! return addr.equals (sa.addr) && sa.port == port; } return false; *************** public class InetSocketAddress extends S *** 152,157 **** --- 163,170 ---- /** * Returns the InetAddress or * null if its unresolved + * + * @return The IP address of this address. */ public final InetAddress getAddress() { *************** public class InetSocketAddress extends S *** 160,165 **** --- 173,180 ---- /** * Returns hostname + * + * @return The hostname of this address. */ public final String getHostName() { *************** public class InetSocketAddress extends S *** 168,173 **** --- 183,190 ---- /** * Returns the port + * + * @return The port of this address. */ public final int getPort() { *************** public class InetSocketAddress extends S *** 176,181 **** --- 193,200 ---- /** * Returns the hashcode of the InetSocketAddress + * + * @return The hashcode for this address. */ public final int hashCode() { *************** public class InetSocketAddress extends S *** 184,189 **** --- 203,210 ---- /** * Checks wether the address has been resolved or not + * + * @return True if address is unresolved. */ public final boolean isUnresolved() { *************** public class InetSocketAddress extends S *** 192,200 **** /** * Returns the InetSocketAddress as string */ public String toString() { ! return addr + ":" + port; } } --- 213,223 ---- /** * Returns the InetSocketAddress as string + * + * @return A string represenation of this address. */ public String toString() { ! return (addr == null ? hostname : addr.getHostName()) + ":" + port; } } diff -Nrc3pad gcc-3.3.3/libjava/java/net/JarURLConnection.java gcc-3.4.0/libjava/java/net/JarURLConnection.java *** gcc-3.3.3/libjava/java/net/JarURLConnection.java 2002-12-09 00:04:00.000000000 +0000 --- gcc-3.4.0/libjava/java/net/JarURLConnection.java 2003-12-20 22:54:26.000000000 +0000 *************** *** 1,171 **** ! /* Copyright (C) 1999, 2000, 2002 Free Software Foundation ! This file is part of libgcj. - This software is copyrighted work licensed under the terms of the - Libgcj License. Please consult the file "LIBGCJ_LICENSE" for - details. */ package java.net; ! import java.net.*; ! import java.io.*; ! import java.util.jar.*; ! import java.util.zip.*; ! import java.util.Map; ! import java.util.Vector; ! import java.util.Hashtable; import java.security.cert.Certificate; /** * @author Kresten Krab Thorup - * @since 1.2 * @date Aug 10, 1999. */ - - public abstract class JarURLConnection extends URLConnection { ! // three different ways to say the same thing private final URL jarFileURL; ! /** The connection to the jar file itself. A JarURLConnection ! * can represent an entry in a jar file or an entire jar file. In ! * either case this describes just the jar file itself. */ protected URLConnection jarFileURLConnection; ! // If this is a connection to a jar file element this is set, otherwise null. ! private final String element; ! ! // Cached JarURLConnection's ! static Hashtable conn_cache = new Hashtable(); ! ! public URL getJarFileURL () ! { ! return jarFileURL; ! } ! ! public String getEntryName () ! { ! return element; ! } /** ! * Creates a new JarURLConnection * * @exception MalformedURLException If url is invalid * * @specnote This constructor is protected since JDK 1.4 */ ! protected JarURLConnection(URL url) throws MalformedURLException { ! super(url); String spec = url.getFile(); ! int bang = spec.indexOf ("!/", 0); if (bang == -1) throw new MalformedURLException (url + ": No `!/' in spec."); ! // Extact the url for the jar itself. ! jarFileURL = new URL(spec.substring (0, bang)); ! // Get the name of the element, if any. ! element = (bang+2==spec.length() ? null : spec.substring (bang+2)); } ! public synchronized void connect() throws IOException { ! // Call is ignored if already connected. ! if (connected) ! return; ! ! if (getUseCaches()) ! { ! jarFileURLConnection = (URLConnection) conn_cache.get (jarFileURL); ! ! if (jarFileURLConnection == null) ! { ! jarFileURLConnection = jarFileURL.openConnection (); ! jarFileURLConnection.setUseCaches (true); ! jarFileURLConnection.connect (); ! conn_cache.put (jarFileURL, jarFileURLConnection); ! } ! } ! else ! { ! jarFileURLConnection = jarFileURL.openConnection (); ! jarFileURLConnection.connect (); ! } ! ! connected = true; } ! public InputStream getInputStream() throws IOException { ! if (!connected) ! connect(); ! ! if (! doInput) ! throw new ProtocolException("Can't open InputStream if doInput is false"); ! ! if (element == null) ! { ! // This is a JarURLConnection for the entire jar file. ! ! InputStream jar_is = new BufferedInputStream( ! jarFileURLConnection.getInputStream ()); ! return new JarInputStream(jar_is); ! } ! ! // Reaching this point, we're looking for an element of a jar file. ! ! JarFile jarfile = null; ! ! try ! { ! jarfile = getJarFile (); ! } ! catch (java.io.IOException x) ! { ! /* ignore */ ! } ! ! if (jarfile != null) ! { ! // this is the easy way... ! ZipEntry entry = jarfile.getEntry(element); ! if (entry != null) ! return jarfile.getInputStream (entry); ! else ! return null; ! } ! else ! { ! // If the jar file is not local, ... ! JarInputStream zis = new JarInputStream( ! jarFileURLConnection.getInputStream ()); ! ! // This is hideous, we're doing a linear search... ! for (ZipEntry ent = zis.getNextEntry (); ! ent != null; ! ent = zis.getNextEntry ()) ! { ! if (element.equals (ent.getName ())) ! { ! int size = (int)ent.getSize(); ! byte[] data = new byte[size]; ! zis.read (data, 0, size); ! return new ByteArrayInputStream (data); ! } ! } ! } ! ! return null; } /** ! * Return the JAR entry object for this connection, if any * * @exception IOException If an error occurs */ --- 1,154 ---- ! /* JarURLConnection.java -- Class for manipulating remote jar files ! Copyright (C) 1998, 2002, 2003 Free Software Foundation, Inc. ! This file is part of GNU Classpath. ! ! GNU Classpath is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! GNU Classpath is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with GNU Classpath; see the file COPYING. If not, write to the ! Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ! 02111-1307 USA. ! ! Linking this library statically or dynamically with other modules is ! making a combined work based on this library. Thus, the terms and ! conditions of the GNU General Public License cover the whole ! combination. ! ! As a special exception, the copyright holders of this library give you ! permission to link this library with independent modules to produce an ! executable, regardless of the license terms of these independent ! modules, and to copy and distribute the resulting executable under ! terms of your choice, provided that you also meet, for each linked ! independent module, the terms and conditions of the license of that ! module. An independent module is a module which is not derived from ! or based on this library. If you modify this library, you may extend ! this exception to your version of the library, but you are not ! obligated to do so. If you do not wish to do so, delete this ! exception statement from your version. */ package java.net; ! import java.io.IOException; ! import java.util.jar.Attributes; ! import java.util.jar.JarEntry; ! import java.util.jar.JarFile; ! import java.util.jar.JarInputStream; ! import java.util.jar.Manifest; ! import java.util.zip.ZipEntry; import java.security.cert.Certificate; /** + * This abstract class represents a common superclass for implementations + * of jar URL's. A jar URL is a special type of URL that allows JAR + * files on remote systems to be accessed. It has the form: + *

            + * jar:!/file/within/jarfile + *

            for example: + *

            + * jar:http://www.urbanophile.com/java/foo.jar!/com/urbanophile/bar.class + *

            + * That example URL points to the file /com/urbanophile/bar.class in the + * remote JAR file http://www.urbanophile.com/java/foo.jar. The HTTP + * protocol is used only as an example. Any supported remote protocol + * can be used. + *

            + * This class currently works by retrieving the entire jar file into a + * local cache file, then performing standard jar operations on it. + * (At least this is true for the default protocol implementation). + * + * @author Aaron M. Renn * @author Kresten Krab Thorup * @date Aug 10, 1999. + * + * @since 1.2 */ public abstract class JarURLConnection extends URLConnection { ! /** ! * This is the actual URL that points the remote jar file. This is parsed ! * out of the jar URL by the constructor. ! */ private final URL jarFileURL; ! /** ! * The connection to the jar file itself. A JarURLConnection ! * can represent an entry in a jar file or an entire jar file. In ! * either case this describes just the jar file itself. ! */ protected URLConnection jarFileURLConnection; ! /** ! * This is the jar file "entry name" or portion after the "!/" in the ! * URL which represents the pathname inside the actual jar file. ! */ ! private final String entryName; /** ! * Creates a JarURLConnection from an URL object ! * ! * @param URL url The URL object for this connection. * * @exception MalformedURLException If url is invalid * * @specnote This constructor is protected since JDK 1.4 */ ! protected JarURLConnection (URL url) throws MalformedURLException { ! super (url); ! ! if (!url.getProtocol().equals ("jar")) ! throw new MalformedURLException (url + ": Not jar protocol."); String spec = url.getFile(); ! int bang = spec.indexOf ("!/"); if (bang == -1) throw new MalformedURLException (url + ": No `!/' in spec."); ! // Extract the url for the jar itself. ! jarFileURL = new URL (spec.substring (0, bang)); ! // Get the name of the entry, if any. ! entryName = spec.length() == (bang + 2) ? null : spec.substring (bang + 2); } ! /** ! * This method returns the "real" URL where the JarFile is located. ! * //****Is this right?***** ! * ! * @return The remote URL ! */ ! public URL getJarFileURL () { ! return jarFileURL; } ! /** ! * Returns the "entry name" portion of the jar URL. This is the portion ! * after the "!/" in the jar URL that represents the pathname inside the ! * actual jar file. ! * ! * @return The entry name. ! */ ! public String getEntryName () { ! return entryName; } /** ! * Returns the entry in this jar file specified by the URL. ! * ! * @return The jar entry * * @exception IOException If an error occurs */ *************** public abstract class JarURLConnection e *** 173,179 **** { JarFile jarfile = null; ! if (element == null) return null; if (! doInput) --- 156,162 ---- { JarFile jarfile = null; ! if (entryName == null) return null; if (! doInput) *************** public abstract class JarURLConnection e *** 198,204 **** ent != null; ent = zis.getNextEntry ()) { ! if (element.equals (ent.getName ())) { return new JarEntry (ent); } --- 181,187 ---- ent != null; ent = zis.getNextEntry ()) { ! if (entryName.equals (ent.getName())) { return new JarEntry (ent); } *************** public abstract class JarURLConnection e *** 207,350 **** else { ! return jarfile.getJarEntry (element); } return null; } /** ! * Return the JAR file for this connection * * @exception IOException If an error occurs */ ! public abstract JarFile getJarFile() throws IOException; ! ! ! // Steal and borrow from protocol/file/Connection.java ! ! private Hashtable hdrHash = new Hashtable(); ! private Vector hdrVec = new Vector(); ! private boolean gotHeaders = false; ! ! // Override default method in URLConnection. ! public String getHeaderField(String name) ! { ! try ! { ! getHeaders(); ! } ! catch (IOException x) ! { ! return null; ! } ! return (String) hdrHash.get(name.toLowerCase()); ! } ! ! // Override default method in URLConnection. ! public Map getHeaderFields() ! { ! try ! { ! getHeaders(); ! } ! catch (IOException x) ! { ! return null; ! } ! return hdrHash; ! } ! ! // Override default method in URLConnection. ! public String getHeaderField(int n) ! { ! try ! { ! getHeaders(); ! } ! catch (IOException x) ! { ! return null; ! } ! if (n < hdrVec.size()) ! return getField((String) hdrVec.elementAt(n)); ! ! return null; ! } ! ! // Override default method in URLConnection. ! public String getHeaderFieldKey(int n) ! { ! try ! { ! getHeaders(); ! } ! catch (IOException x) ! { ! return null; ! } ! if (n < hdrVec.size()) ! return getKey((String) hdrVec.elementAt(n)); ! ! return null; ! } ! ! private String getKey(String str) ! { ! if (str == null) ! return null; ! int index = str.indexOf(':'); ! if (index >= 0) ! return str.substring(0, index); ! else ! return null; ! } ! ! private String getField(String str) ! { ! if (str == null) ! return null; ! int index = str.indexOf(':'); ! if (index >= 0) ! return str.substring(index + 1).trim(); ! else ! return str; ! } ! ! private void getHeaders() throws IOException ! { ! if (gotHeaders) ! return; ! gotHeaders = true; ! ! connect(); ! ! // Yes, it is overkill to use the hash table and vector here since ! // we're only putting one header in the file, but in case we need ! // to add others later and for consistency, we'll implement it this way. ! ! // Add the only header we know about right now: Content-length. ! long len = -1; ! ! if (element == null) ! if (jarFileURLConnection != null) ! len = jarFileURLConnection.getContentLength (); ! else ! { ! JarEntry entry = getJarEntry(); ! if (entry != null) ! len = entry.getSize (); ! } ! ! String line = "Content-length: " + len; ! hdrVec.addElement(line); ! ! // The key will never be null in this scenario since we build up the ! // headers ourselves. If we ever rely on getting a header from somewhere ! // else, then we may have to check if the result of getKey() is null. ! String key = getKey(line); ! hdrHash.put(key.toLowerCase(), Long.toString(len)); ! } /** * Returns an array of Certificate objects for the jar file entry specified --- 190,209 ---- else { ! return jarfile.getJarEntry (entryName); } return null; } /** ! * Returns a read-only JarFile object for the remote jar file ! * ! * @return The JarFile object * * @exception IOException If an error occurs */ ! public abstract JarFile getJarFile () throws IOException; /** * Returns an array of Certificate objects for the jar file entry specified *************** public abstract class JarURLConnection e *** 354,395 **** * * @exception IOException If an error occurs */ ! public Certificate[] getCertificates() throws IOException { ! return getJarEntry().getCertificates(); } /** ! * Returns the main Attributes for the JAR file for this connection * * @exception IOException If an error occurs */ public Attributes getMainAttributes () throws IOException { ! return getManifest ().getMainAttributes (); } /** ! * Return the Attributes object for this connection if the URL for it points * to a JAR file entry, null otherwise * * @exception IOException If an error occurs */ public Attributes getAttributes () throws IOException { ! // FIXME: implement this ! return null; } /** ! * Returns the Manifest for this connection, or null if none * * @exception IOException If an error occurs */ public Manifest getManifest () throws IOException { ! JarFile file = getJarFile (); ! return (file != null) ? file.getManifest() : null; } } --- 213,268 ---- * * @exception IOException If an error occurs */ ! public Certificate[] getCertificates () throws IOException { ! JarEntry entry = getJarEntry(); ! ! return entry != null ? entry.getCertificates() : null; } /** ! * Returns the main Attributes for the jar file specified in the URL or ! * null if there are none ! * ! * @return The main Attributes for the JAR file for this connection * * @exception IOException If an error occurs */ public Attributes getMainAttributes () throws IOException { ! Manifest manifest = getManifest(); ! ! return manifest != null ? manifest.getMainAttributes() : null; } /** ! * Returns the Attributes for the Jar entry specified by the URL or null ! * if none ! * ! * @return The Attributes object for this connection if the URL for it points * to a JAR file entry, null otherwise * * @exception IOException If an error occurs */ public Attributes getAttributes () throws IOException { ! JarEntry entry = getJarEntry(); ! ! return entry != null ? entry.getAttributes() : null; } /** ! * Returns a Manifest object for this jar file, or null if there is no ! * manifest. ! * ! * @return The Manifest for this connection, or null if none * * @exception IOException If an error occurs */ public Manifest getManifest () throws IOException { ! JarFile file = getJarFile(); ! return file != null ? file.getManifest() : null; } } diff -Nrc3pad gcc-3.3.3/libjava/java/net/MulticastSocket.java gcc-3.4.0/libjava/java/net/MulticastSocket.java *** gcc-3.3.3/libjava/java/net/MulticastSocket.java 2003-01-20 01:34:03.000000000 +0000 --- gcc-3.4.0/libjava/java/net/MulticastSocket.java 2003-11-26 14:33:41.000000000 +0000 *************** import java.util.Enumeration; *** 67,76 **** */ public class MulticastSocket extends DatagramSocket { - // FIXME: the local addr bound to the multicast socket can be reused; - // unlike unicast sockets. It binds to any available network interface. - // See p.1159 JCL book. - /** * Create a MulticastSocket that this not bound to any address * --- 67,72 ---- *************** public class MulticastSocket extends Dat *** 80,86 **** */ public MulticastSocket() throws IOException { ! super(0, null); } /** --- 76,82 ---- */ public MulticastSocket() throws IOException { ! this(new InetSocketAddress(0)); } /** *************** public class MulticastSocket extends Dat *** 94,100 **** */ public MulticastSocket(int port) throws IOException { ! super(port, null); } /** --- 90,96 ---- */ public MulticastSocket(int port) throws IOException { ! this(new InetSocketAddress(port)); } /** *************** public class MulticastSocket extends Dat *** 110,116 **** */ public MulticastSocket(SocketAddress address) throws IOException { ! super(address); } /** --- 106,115 ---- */ public MulticastSocket(SocketAddress address) throws IOException { ! super((SocketAddress) null); ! setReuseAddress(true); ! if (address != null) ! bind(address); } /** *************** public class MulticastSocket extends Dat *** 122,128 **** */ public InetAddress getInterface() throws SocketException { ! return (InetAddress) impl.getOption(SocketOptions.IP_MULTICAST_IF); } /** --- 121,130 ---- */ public InetAddress getInterface() throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! ! return (InetAddress) getImpl().getOption(SocketOptions.IP_MULTICAST_IF); } /** *************** public class MulticastSocket extends Dat *** 136,149 **** * * @deprecated 1.2 Replaced by getTimeToLive() * ! * @see Multicastsocket:getTimeToLive */ public byte getTTL() throws IOException { // Use getTTL here rather than getTimeToLive in case we're using an impl // other than the default PlainDatagramSocketImpl and it doesn't have // getTimeToLive yet. ! return impl.getTTL(); } /** --- 138,154 ---- * * @deprecated 1.2 Replaced by getTimeToLive() * ! * @see MulticastSocket#getTimeToLive() */ public byte getTTL() throws IOException { + if (isClosed()) + throw new SocketException("socket is closed"); + // Use getTTL here rather than getTimeToLive in case we're using an impl // other than the default PlainDatagramSocketImpl and it doesn't have // getTimeToLive yet. ! return getImpl().getTTL(); } /** *************** public class MulticastSocket extends Dat *** 158,164 **** */ public int getTimeToLive() throws IOException { ! return impl.getTimeToLive(); } /** --- 163,172 ---- */ public int getTimeToLive() throws IOException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! ! return getImpl().getTimeToLive(); } /** *************** public class MulticastSocket extends Dat *** 172,178 **** */ public void setInterface(InetAddress addr) throws SocketException { ! impl.setOption(SocketOptions.IP_MULTICAST_IF, addr); } /** --- 180,189 ---- */ public void setInterface(InetAddress addr) throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! ! getImpl().setOption(SocketOptions.IP_MULTICAST_IF, addr); } /** *************** public class MulticastSocket extends Dat *** 182,205 **** * * @exception SocketException If an error occurs * ! * @see MulticastSocket:getNetworkInterface * * @since 1.4 */ public void setNetworkInterface(NetworkInterface netIf) throws SocketException { ! if (impl == null) ! throw new SocketException ( ! "MulticastSocket: Cant access socket implementation"); Enumeration e = netIf.getInetAddresses (); if (!e.hasMoreElements ()) ! throw new SocketException ("MulticastSocket: Error"); InetAddress address = (InetAddress) e.nextElement (); ! impl.setOption (SocketOptions.IP_MULTICAST_IF, address); } /** --- 193,215 ---- * * @exception SocketException If an error occurs * ! * @see MulticastSocket#getNetworkInterface() * * @since 1.4 */ public void setNetworkInterface(NetworkInterface netIf) throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); Enumeration e = netIf.getInetAddresses (); if (!e.hasMoreElements ()) ! throw new SocketException("no network devices found"); InetAddress address = (InetAddress) e.nextElement (); ! getImpl().setOption (SocketOptions.IP_MULTICAST_IF, address); } /** *************** public class MulticastSocket extends Dat *** 209,227 **** * * @exception SocketException If an error occurs * ! * @see MulticastSocket:setNetworkInterface * * @since 1.4 */ public NetworkInterface getNetworkInterface() throws SocketException { ! if (impl == null) ! throw new SocketException ( ! "MulticastSocket: Cant access socket implementation"); InetAddress address = ! (InetAddress) impl.getOption (SocketOptions.IP_MULTICAST_IF); NetworkInterface netIf = NetworkInterface.getByInetAddress (address); return netIf; --- 219,236 ---- * * @exception SocketException If an error occurs * ! * @see MulticastSocket#setNetworkInterface(NetworkInterface netIf) * * @since 1.4 */ public NetworkInterface getNetworkInterface() throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); InetAddress address = ! (InetAddress) getImpl().getOption (SocketOptions.IP_MULTICAST_IF); NetworkInterface netIf = NetworkInterface.getByInetAddress (address); return netIf; *************** public class MulticastSocket extends Dat *** 243,253 **** */ public void setLoopbackMode(boolean disable) throws SocketException { ! if (impl == null) ! throw new SocketException ( ! "MulticastSocket: Cant access socket implementation"); ! impl.setOption (SocketOptions.IP_MULTICAST_LOOP, new Boolean (disable)); } /** --- 252,261 ---- */ public void setLoopbackMode(boolean disable) throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! getImpl().setOption (SocketOptions.IP_MULTICAST_LOOP, new Boolean (disable)); } /** *************** public class MulticastSocket extends Dat *** 259,270 **** */ public boolean getLoopbackMode() throws SocketException { ! Object obj = impl.getOption (SocketOptions.IP_MULTICAST_LOOP); ! if (obj instanceof Boolean) ! return ((Boolean) obj).booleanValue (); ! else ! throw new SocketException ("Unexpected type"); } /** --- 267,281 ---- */ public boolean getLoopbackMode() throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! Object buf = getImpl().getOption (SocketOptions.IP_MULTICAST_LOOP); ! ! if (buf instanceof Boolean) ! return ((Boolean) buf).booleanValue(); ! ! throw new SocketException("unexpected type"); } /** *************** public class MulticastSocket extends Dat *** 277,290 **** * * @deprecated 1.2 Replaced by setTimeToLive * ! * @see MulticastSocket:setTimeToLive */ public void setTTL(byte ttl) throws IOException { // Use setTTL here rather than setTimeToLive in case we're using an impl // other than the default PlainDatagramSocketImpl and it doesn't have // setTimeToLive yet. ! impl.setTTL(ttl); } /** --- 288,304 ---- * * @deprecated 1.2 Replaced by setTimeToLive * ! * @see MulticastSocket#setTimeToLive(int ttl) */ public void setTTL(byte ttl) throws IOException { + if (isClosed()) + throw new SocketException("socket is closed"); + // Use setTTL here rather than setTimeToLive in case we're using an impl // other than the default PlainDatagramSocketImpl and it doesn't have // setTimeToLive yet. ! getImpl().setTTL(ttl); } /** *************** public class MulticastSocket extends Dat *** 299,308 **** */ public void setTimeToLive(int ttl) throws IOException { if (ttl <= 0 || ttl > 255) throw new IllegalArgumentException("Invalid ttl: " + ttl); ! impl.setTimeToLive(ttl); } /** --- 313,325 ---- */ public void setTimeToLive(int ttl) throws IOException { + if (isClosed()) + throw new SocketException("socket is closed"); + if (ttl <= 0 || ttl > 255) throw new IllegalArgumentException("Invalid ttl: " + ttl); ! getImpl().setTimeToLive(ttl); } /** *************** public class MulticastSocket extends Dat *** 316,321 **** --- 333,341 ---- */ public void joinGroup(InetAddress mcastaddr) throws IOException { + if (isClosed()) + throw new SocketException("socket is closed"); + if (! mcastaddr.isMulticastAddress()) throw new IOException("Not a Multicast address"); *************** public class MulticastSocket extends Dat *** 323,329 **** if (s != null) s.checkMulticast(mcastaddr); ! impl.join(mcastaddr); } /** --- 343,349 ---- if (s != null) s.checkMulticast(mcastaddr); ! getImpl().join(mcastaddr); } /** *************** public class MulticastSocket extends Dat *** 337,342 **** --- 357,365 ---- */ public void leaveGroup(InetAddress mcastaddr) throws IOException { + if (isClosed()) + throw new SocketException("socket is closed"); + if (! mcastaddr.isMulticastAddress()) throw new IOException("Not a Multicast address"); *************** public class MulticastSocket extends Dat *** 344,350 **** if (s != null) s.checkMulticast(mcastaddr); ! impl.leave(mcastaddr); } /** --- 367,373 ---- if (s != null) s.checkMulticast(mcastaddr); ! getImpl().leave(mcastaddr); } /** *************** public class MulticastSocket extends Dat *** 360,373 **** * @exception SecurityException If a security manager exists and its * checkMulticast method doesn't allow the operation * ! * @see MulticastSocket:setInterface ! * @see MulticastSocket:setNetworkInterface * * @since 1.4 */ public void joinGroup(SocketAddress mcastaddr, NetworkInterface netIf) throws IOException { if (! (mcastaddr instanceof InetSocketAddress)) throw new IllegalArgumentException ("SocketAddress type not supported"); --- 383,399 ---- * @exception SecurityException If a security manager exists and its * checkMulticast method doesn't allow the operation * ! * @see MulticastSocket#setInterface(InetAddress addr) ! * @see MulticastSocket#setNetworkInterface(NetworkInterface netIf) * * @since 1.4 */ public void joinGroup(SocketAddress mcastaddr, NetworkInterface netIf) throws IOException { + if (isClosed()) + throw new SocketException("socket is closed"); + if (! (mcastaddr instanceof InetSocketAddress)) throw new IllegalArgumentException ("SocketAddress type not supported"); *************** public class MulticastSocket extends Dat *** 380,386 **** if (s != null) s.checkMulticast (tmp.getAddress ()); ! impl.joinGroup (mcastaddr, netIf); } /** --- 406,412 ---- if (s != null) s.checkMulticast (tmp.getAddress ()); ! getImpl().joinGroup (mcastaddr, netIf); } /** *************** public class MulticastSocket extends Dat *** 395,408 **** * @exception SecurityException If a security manager exists and its * checkMulticast method doesn't allow the operation * ! * @see MulticastSocket:setInterface ! * @see MulticastSocket:setNetworkInterface * * @since 1.4 */ public void leaveGroup(SocketAddress mcastaddr, NetworkInterface netIf) throws IOException { InetSocketAddress tmp = (InetSocketAddress) mcastaddr; if (! tmp.getAddress ().isMulticastAddress ()) --- 421,437 ---- * @exception SecurityException If a security manager exists and its * checkMulticast method doesn't allow the operation * ! * @see MulticastSocket#setInterface(InetAddress addr) ! * @see MulticastSocket#setNetworkInterface(NetworkInterface netIf) * * @since 1.4 */ public void leaveGroup(SocketAddress mcastaddr, NetworkInterface netIf) throws IOException { + if (isClosed()) + throw new SocketException("socket is closed"); + InetSocketAddress tmp = (InetSocketAddress) mcastaddr; if (! tmp.getAddress ().isMulticastAddress ()) *************** public class MulticastSocket extends Dat *** 412,418 **** if (s != null) s.checkMulticast (tmp.getAddress ()); ! impl.leaveGroup (mcastaddr, netIf); } /** --- 441,447 ---- if (s != null) s.checkMulticast (tmp.getAddress ()); ! getImpl().leaveGroup (mcastaddr, netIf); } /** *************** public class MulticastSocket extends Dat *** 426,447 **** * @exception IOException If an error occurs * @exception SecurityException If a security manager exists and its * checkConnect or checkMulticast method doesn't allow the operation */ public synchronized void send(DatagramPacket p, byte ttl) throws IOException { SecurityManager s = System.getSecurityManager(); if (s != null) { ! InetAddress addr = p.getAddress(); ! if (addr.isMulticastAddress()) ! s.checkMulticast(addr, ttl); ! else ! s.checkConnect(addr.getHostAddress(), p.getPort()); } ! int oldttl = impl.getTimeToLive(); ! impl.setTimeToLive(((int) ttl) & 0xFF); ! impl.send(p); ! impl.setTimeToLive(oldttl); } } // class MulticastSocket --- 455,483 ---- * @exception IOException If an error occurs * @exception SecurityException If a security manager exists and its * checkConnect or checkMulticast method doesn't allow the operation + * + * @deprecated */ public synchronized void send(DatagramPacket p, byte ttl) throws IOException { + if (isClosed()) + throw new SocketException("socket is closed"); + SecurityManager s = System.getSecurityManager(); if (s != null) { ! InetAddress addr = p.getAddress(); ! if (addr.isMulticastAddress()) ! s.checkPermission (new SocketPermission ! (addr.getHostName () + p.getPort (), ! "accept,connect")); ! else ! s.checkConnect(addr.getHostAddress(), p.getPort()); } ! int oldttl = getImpl().getTimeToLive(); ! getImpl().setTimeToLive(((int) ttl) & 0xFF); ! getImpl().send(p); ! getImpl().setTimeToLive(oldttl); } } // class MulticastSocket diff -Nrc3pad gcc-3.3.3/libjava/java/net/natInetAddress.cc gcc-3.4.0/libjava/java/net/natInetAddress.cc *** gcc-3.3.3/libjava/java/net/natInetAddress.cc 2002-11-01 06:35:14.000000000 +0000 --- gcc-3.4.0/libjava/java/net/natInetAddress.cc 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,357 **** - // natInetAddress.cc - - /* Copyright (C) 1998, 1999, 2000 Free Software Foundation - - This file is part of libgcj. - - This software is copyrighted work licensed under the terms of the - Libgcj License. Please consult the file "LIBGCJ_LICENSE" for - details. */ - - #include - - #ifdef WIN32 - - #include - #include - #undef STRICT - - #ifndef MAXHOSTNAMELEN - #define MAXHOSTNAMELEN 64 - #endif /* MAXHOSTNAMELEN */ - - #else /* WIN32 */ - - #ifdef HAVE_UNISTD_H - #include - #endif - #include - #include - - #include - #include - #ifdef HAVE_SYS_SOCKET_H - #include - #endif - #ifdef HAVE_NETINET_IN_H - #include - #endif - #ifdef HAVE_ARPA_INET_H - #include - #endif - #ifdef HAVE_NETDB_H - #include - #endif - - #endif /* WIN32 */ - - #include - #include - #include - #include - #include - - #if defined(HAVE_UNAME) && ! defined(HAVE_GETHOSTNAME) - #include - #endif - - #ifndef HAVE_GETHOSTNAME_DECL - extern "C" int gethostname (char *name, int namelen); - #endif - - #ifdef DISABLE_JAVA_NET - - jbyteArray - java::net::InetAddress::aton (jstring) - { - return NULL; - } - - jint - java::net::InetAddress::getFamily (jbyteArray bytes) - { - return 0; - } - - JArray * - java::net::InetAddress::lookup (jstring, java::net::InetAddress *, jboolean) - { - return NULL; - } - - jstring - java::net::InetAddress::getLocalHostname () - { - return NULL; - } - - #else /* DISABLE_JAVA_NET */ - - jbyteArray - java::net::InetAddress::aton (jstring host) - { - char *hostname; - char buf[100]; - int len = JvGetStringUTFLength(host); - if (len < 100) - hostname = buf; - else - hostname = (char*) _Jv_AllocBytes (len+1); - JvGetStringUTFRegion (host, 0, host->length(), hostname); - buf[len] = '\0'; - char* bytes = NULL; - int blen = 0; - #ifdef HAVE_INET_ATON - struct in_addr laddr; - if (inet_aton (hostname, &laddr)) - { - bytes = (char*) &laddr; - blen = 4; - } - #elif defined(HAVE_INET_ADDR) - #if ! HAVE_IN_ADDR_T - typedef jint in_addr_t; - #endif - in_addr_t laddr = inet_addr (hostname); - if (laddr != (in_addr_t)(-1)) - { - bytes = (char*) &laddr; - blen = 4; - } - #endif - #if defined (HAVE_INET_PTON) && defined (HAVE_INET6) - char inet6_addr[16]; - if (len != 0 && inet_pton (AF_INET6, hostname, inet6_addr) > 0) - { - bytes = inet6_addr; - blen = 16; - } - #endif - if (blen == 0) - return NULL; - jbyteArray result = JvNewByteArray (blen); - memcpy (elements (result), bytes, blen); - return result; - } - - jint - java::net::InetAddress::getFamily (jbyteArray bytes) - { - int len = bytes->length; - if (len == 4) - return AF_INET; - #ifdef HAVE_INET6 - else if (len == 16) - return AF_INET6; - #endif /* HAVE_INET6 */ - else - JvFail ("unrecognized size"); - } - - - JArray * - java::net::InetAddress::lookup (jstring host, java::net::InetAddress* iaddr, - jboolean all) - { - struct hostent *hptr = NULL; - #if defined (HAVE_GETHOSTBYNAME_R) || defined (HAVE_GETHOSTBYADDR_R) - struct hostent hent_r; - #if HAVE_STRUCT_HOSTENT_DATA - struct hostent_data fixed_buffer, *buffer_r = &fixed_buffer; - #else - #if defined (__GLIBC__) - // FIXME: in glibc, gethostbyname_r returns NETDB_INTERNAL to herr and - // ERANGE to errno if the buffer size is too small, rather than what is - // expected here. We work around this by setting a bigger buffer size and - // hoping that it is big enough. - char fixed_buffer[1024]; - #else - char fixed_buffer[200]; - #endif - char *buffer_r = fixed_buffer; - int size_r = sizeof (fixed_buffer); - #endif - #endif - - if (host != NULL) - { - char *hostname; - char buf[100]; - int len = JvGetStringUTFLength(host); - if (len < 100) - hostname = buf; - else - hostname = (char*) _Jv_AllocBytes (len+1); - JvGetStringUTFRegion (host, 0, host->length(), hostname); - buf[len] = '\0'; - #ifdef HAVE_GETHOSTBYNAME_R - while (true) - { - int ok; - #if HAVE_STRUCT_HOSTENT_DATA - ok = ! gethostbyname_r (hostname, &hent_r, buffer_r); - #else - int herr = 0; - #ifdef GETHOSTBYNAME_R_RETURNS_INT - ok = ! gethostbyname_r (hostname, &hent_r, buffer_r, size_r, - &hptr, &herr); - #else - hptr = gethostbyname_r (hostname, &hent_r, buffer_r, size_r, &herr); - ok = hptr != NULL; - #endif /* GETHOSTNAME_R_RETURNS_INT */ - if (! ok && herr == ERANGE) - { - size_r *= 2; - buffer_r = (char *) _Jv_AllocBytes (size_r); - } - else - #endif /* HAVE_STRUCT_HOSTENT_DATA */ - break; - } - #else - // FIXME: this is insufficient if some other piece of code calls - // this gethostbyname. - JvSynchronize sync (java::net::InetAddress::localhostAddress); - hptr = gethostbyname (hostname); - #endif /* HAVE_GETHOSTBYNAME_R */ - } - else - { - jbyteArray bytes = iaddr->addr; - char *chars = (char*) elements (bytes); - int len = bytes->length; - int type; - char *val; - if (len == 4) - { - val = chars; - type = iaddr->family = AF_INET; - } - #ifdef HAVE_INET6 - else if (len == 16) - { - val = (char *) &chars; - type = iaddr->family = AF_INET6; - } - #endif /* HAVE_INET6 */ - else - JvFail ("unrecognized size"); - - #ifdef HAVE_GETHOSTBYADDR_R - while (true) - { - int ok; - #if HAVE_STRUCT_HOSTENT_DATA - ok = ! gethostbyaddr_r (val, len, type, &hent_r, buffer_r); - #else - int herr = 0; - #ifdef GETHOSTBYADDR_R_RETURNS_INT - ok = ! gethostbyaddr_r (val, len, type, &hent_r, - buffer_r, size_r, &hptr, &herr); - #else - hptr = gethostbyaddr_r (val, len, type, &hent_r, - buffer_r, size_r, &herr); - ok = hptr != NULL; - #endif /* GETHOSTBYADDR_R_RETURNS_INT */ - if (! ok && herr == ERANGE) - { - size_r *= 2; - buffer_r = (char *) _Jv_AllocBytes (size_r); - } - else - #endif /* HAVE_STRUCT_HOSTENT_DATA */ - break; - } - #else /* HAVE_GETHOSTBYADDR_R */ - // FIXME: this is insufficient if some other piece of code calls - // this gethostbyaddr. - JvSynchronize sync (java::net::InetAddress::localhostAddress); - hptr = gethostbyaddr (val, len, type); - #endif /* HAVE_GETHOSTBYADDR_R */ - } - if (hptr != NULL) - { - if (!all) - host = JvNewStringUTF (hptr->h_name); - java::lang::SecurityException *ex = checkConnect (host); - if (ex != NULL) - { - if (iaddr == NULL || iaddr->addr == NULL) - throw ex; - hptr = NULL; - } - } - if (hptr == NULL) - { - if (iaddr != NULL && iaddr->addr != NULL) - { - iaddr->hostName = iaddr->getHostAddress(); - return NULL; - } - else - throw new java::net::UnknownHostException(host); - } - int count; - if (all) - { - char** ptr = hptr->h_addr_list; - count = 0; - while (*ptr++) count++; - } - else - count = 1; - JArray *result; - java::net::InetAddress** iaddrs; - if (all) - { - result = java::net::InetAddress::allocArray (count); - iaddrs = elements (result); - } - else - { - result = NULL; - iaddrs = &iaddr; - } - - for (int i = 0; i < count; i++) - { - if (iaddrs[i] == NULL) - iaddrs[i] = new java::net::InetAddress (NULL, NULL); - if (iaddrs[i]->hostName == NULL) - iaddrs[i]->hostName = host; - if (iaddrs[i]->addr == NULL) - { - char *bytes = hptr->h_addr_list[i]; - iaddrs[i]->addr = JvNewByteArray (hptr->h_length); - iaddrs[i]->family = getFamily (iaddrs[i]->addr); - memcpy (elements (iaddrs[i]->addr), bytes, hptr->h_length); - } - } - return result; - } - - jstring - java::net::InetAddress::getLocalHostname () - { - char *chars; - #ifdef HAVE_GETHOSTNAME - char buffer[MAXHOSTNAMELEN]; - if (gethostname (buffer, MAXHOSTNAMELEN)) - return NULL; - chars = buffer; - #elif HAVE_UNAME - struct utsname stuff; - if (uname (&stuff) != 0) - return NULL; - chars = stuff.nodename; - #else - return NULL; - #endif - // It is admittedly non-optimal to convert the hostname to Unicode - // only to convert it back in getByName, but simplicity wins. Note - // that unless there is a SecurityManager, we only get called once - // anyway, thanks to the InetAddress.localhost cache. - return JvNewStringUTF (chars); - } - - #endif /* DISABLE_JAVA_NET */ --- 0 ---- diff -Nrc3pad gcc-3.3.3/libjava/java/net/natInetAddressNoNet.cc gcc-3.4.0/libjava/java/net/natInetAddressNoNet.cc *** gcc-3.3.3/libjava/java/net/natInetAddressNoNet.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/net/natInetAddressNoNet.cc 2003-11-30 21:02:56.000000000 +0000 *************** *** 0 **** --- 1,36 ---- + /* Copyright (C) 2003 Free Software Foundation + + This file is part of libgcj. + + This software is copyrighted work licensed under the terms of the + Libgcj License. Please consult the file "LIBGCJ_LICENSE" for + details. */ + + #include + #include + + #include + + jbyteArray + java::net::InetAddress::aton (jstring) + { + return NULL; + } + + jint + java::net::InetAddress::getFamily (jbyteArray bytes) + { + return 0; + } + + JArray * + java::net::InetAddress::lookup (jstring, java::net::InetAddress *, jboolean) + { + return NULL; + } + + jstring + java::net::InetAddress::getLocalHostname () + { + return NULL; + } diff -Nrc3pad gcc-3.3.3/libjava/java/net/natInetAddressPosix.cc gcc-3.4.0/libjava/java/net/natInetAddressPosix.cc *** gcc-3.3.3/libjava/java/net/natInetAddressPosix.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/net/natInetAddressPosix.cc 2003-11-30 21:02:56.000000000 +0000 *************** *** 0 **** --- 1,311 ---- + /* Copyright (C) 2003 Free Software Foundation + + This file is part of libgcj. + + This software is copyrighted work licensed under the terms of the + Libgcj License. Please consult the file "LIBGCJ_LICENSE" for + details. */ + + #include + + #ifdef HAVE_UNISTD_H + #include + #endif + #include + #include + + #include + #include + #ifdef HAVE_SYS_SOCKET_H + #include + #endif + #ifdef HAVE_NETINET_IN_H + #include + #endif + #ifdef HAVE_ARPA_INET_H + #include + #endif + #ifdef HAVE_NETDB_H + #include + #endif + + #include + #include + #include + #include + #include + + #if defined(HAVE_UNAME) && ! defined(HAVE_GETHOSTNAME) + #include + #endif + + #ifndef HAVE_GETHOSTNAME_DECL + extern "C" int gethostname (char *name, int namelen); + #endif + + jbyteArray + java::net::InetAddress::aton (jstring host) + { + char *hostname; + char buf[100]; + int len = JvGetStringUTFLength(host); + if (len < 100) + hostname = buf; + else + hostname = (char*) _Jv_AllocBytes (len+1); + JvGetStringUTFRegion (host, 0, host->length(), hostname); + buf[len] = '\0'; + char* bytes = NULL; + int blen = 0; + #ifdef HAVE_INET_ATON + struct in_addr laddr; + if (inet_aton (hostname, &laddr)) + { + bytes = (char*) &laddr; + blen = 4; + } + #elif defined(HAVE_INET_ADDR) + #if ! HAVE_IN_ADDR_T + typedef jint in_addr_t; + #endif + in_addr_t laddr = inet_addr (hostname); + if (laddr != (in_addr_t)(-1)) + { + bytes = (char*) &laddr; + blen = 4; + } + #endif + #if defined (HAVE_INET_PTON) && defined (HAVE_INET6) + char inet6_addr[16]; + if (len != 0 && inet_pton (AF_INET6, hostname, inet6_addr) > 0) + { + bytes = inet6_addr; + blen = 16; + } + #endif + if (blen == 0) + return NULL; + jbyteArray result = JvNewByteArray (blen); + memcpy (elements (result), bytes, blen); + return result; + } + + jint + java::net::InetAddress::getFamily (jbyteArray bytes) + { + int len = bytes->length; + if (len == 4) + return AF_INET; + #ifdef HAVE_INET6 + else if (len == 16) + return AF_INET6; + #endif /* HAVE_INET6 */ + else + JvFail ("unrecognized size"); + } + + + JArray * + java::net::InetAddress::lookup (jstring host, java::net::InetAddress* iaddr, + jboolean all) + { + struct hostent *hptr = NULL; + #if defined (HAVE_GETHOSTBYNAME_R) || defined (HAVE_GETHOSTBYADDR_R) + struct hostent hent_r; + #if HAVE_STRUCT_HOSTENT_DATA + struct hostent_data fixed_buffer, *buffer_r = &fixed_buffer; + #else + #if defined (__GLIBC__) + // FIXME: in glibc, gethostbyname_r returns NETDB_INTERNAL to herr and + // ERANGE to errno if the buffer size is too small, rather than what is + // expected here. We work around this by setting a bigger buffer size and + // hoping that it is big enough. + char fixed_buffer[1024]; + #else + char fixed_buffer[200]; + #endif + char *buffer_r = fixed_buffer; + int size_r = sizeof (fixed_buffer); + #endif + #endif + + if (host != NULL) + { + char *hostname; + char buf[100]; + int len = JvGetStringUTFLength(host); + if (len < 100) + hostname = buf; + else + hostname = (char*) _Jv_AllocBytes (len+1); + JvGetStringUTFRegion (host, 0, host->length(), hostname); + buf[len] = '\0'; + #ifdef HAVE_GETHOSTBYNAME_R + while (true) + { + int ok; + #if HAVE_STRUCT_HOSTENT_DATA + ok = ! gethostbyname_r (hostname, &hent_r, buffer_r); + #else + int herr = 0; + #ifdef GETHOSTBYNAME_R_RETURNS_INT + ok = ! gethostbyname_r (hostname, &hent_r, buffer_r, size_r, + &hptr, &herr); + #else + hptr = gethostbyname_r (hostname, &hent_r, buffer_r, size_r, &herr); + ok = hptr != NULL; + #endif /* GETHOSTNAME_R_RETURNS_INT */ + if (! ok && herr == ERANGE) + { + size_r *= 2; + buffer_r = (char *) _Jv_AllocBytes (size_r); + } + else + #endif /* HAVE_STRUCT_HOSTENT_DATA */ + break; + } + #else + // FIXME: this is insufficient if some other piece of code calls + // this gethostbyname. + JvSynchronize sync (java::net::InetAddress::localhostAddress); + hptr = gethostbyname (hostname); + #endif /* HAVE_GETHOSTBYNAME_R */ + } + else + { + jbyteArray bytes = iaddr->addr; + char *chars = (char*) elements (bytes); + int len = bytes->length; + int type; + char *val; + if (len == 4) + { + val = chars; + type = iaddr->family = AF_INET; + } + #ifdef HAVE_INET6 + else if (len == 16) + { + val = (char *) &chars; + type = iaddr->family = AF_INET6; + } + #endif /* HAVE_INET6 */ + else + JvFail ("unrecognized size"); + + #ifdef HAVE_GETHOSTBYADDR_R + while (true) + { + int ok; + #if HAVE_STRUCT_HOSTENT_DATA + ok = ! gethostbyaddr_r (val, len, type, &hent_r, buffer_r); + #else + int herr = 0; + #ifdef GETHOSTBYADDR_R_RETURNS_INT + ok = ! gethostbyaddr_r (val, len, type, &hent_r, + buffer_r, size_r, &hptr, &herr); + #else + hptr = gethostbyaddr_r (val, len, type, &hent_r, + buffer_r, size_r, &herr); + ok = hptr != NULL; + #endif /* GETHOSTBYADDR_R_RETURNS_INT */ + if (! ok && herr == ERANGE) + { + size_r *= 2; + buffer_r = (char *) _Jv_AllocBytes (size_r); + } + else + #endif /* HAVE_STRUCT_HOSTENT_DATA */ + break; + } + #else /* HAVE_GETHOSTBYADDR_R */ + // FIXME: this is insufficient if some other piece of code calls + // this gethostbyaddr. + JvSynchronize sync (java::net::InetAddress::localhostAddress); + hptr = gethostbyaddr (val, len, type); + #endif /* HAVE_GETHOSTBYADDR_R */ + } + if (hptr != NULL) + { + if (!all) + host = JvNewStringUTF (hptr->h_name); + java::lang::SecurityException *ex = checkConnect (host); + if (ex != NULL) + { + if (iaddr == NULL || iaddr->addr == NULL) + throw ex; + hptr = NULL; + } + } + if (hptr == NULL) + { + if (iaddr != NULL && iaddr->addr != NULL) + { + iaddr->hostName = iaddr->getHostAddress(); + return NULL; + } + else + throw new java::net::UnknownHostException(host); + } + int count; + if (all) + { + char** ptr = hptr->h_addr_list; + count = 0; + while (*ptr++) count++; + } + else + count = 1; + JArray *result; + java::net::InetAddress** iaddrs; + if (all) + { + result = java::net::InetAddress::allocArray (count); + iaddrs = elements (result); + } + else + { + result = NULL; + iaddrs = &iaddr; + } + + for (int i = 0; i < count; i++) + { + if (iaddrs[i] == NULL) + iaddrs[i] = new java::net::InetAddress (NULL, NULL); + if (iaddrs[i]->hostName == NULL) + iaddrs[i]->hostName = host; + if (iaddrs[i]->addr == NULL) + { + char *bytes = hptr->h_addr_list[i]; + iaddrs[i]->addr = JvNewByteArray (hptr->h_length); + iaddrs[i]->family = getFamily (iaddrs[i]->addr); + memcpy (elements (iaddrs[i]->addr), bytes, hptr->h_length); + } + } + return result; + } + + jstring + java::net::InetAddress::getLocalHostname () + { + char *chars; + #ifdef HAVE_GETHOSTNAME + char buffer[MAXHOSTNAMELEN]; + if (gethostname (buffer, MAXHOSTNAMELEN)) + return NULL; + chars = buffer; + #elif HAVE_UNAME + struct utsname stuff; + if (uname (&stuff) != 0) + return NULL; + chars = stuff.nodename; + #else + return NULL; + #endif + // It is admittedly non-optimal to convert the hostname to Unicode + // only to convert it back in getByName, but simplicity wins. Note + // that unless there is a SecurityManager, we only get called once + // anyway, thanks to the InetAddress.localhost cache. + return JvNewStringUTF (chars); + } diff -Nrc3pad gcc-3.3.3/libjava/java/net/natInetAddressWin32.cc gcc-3.4.0/libjava/java/net/natInetAddressWin32.cc *** gcc-3.3.3/libjava/java/net/natInetAddressWin32.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/net/natInetAddressWin32.cc 2003-11-30 21:02:56.000000000 +0000 *************** *** 0 **** --- 1,168 ---- + /* Copyright (C) 2003 Free Software Foundation + + This file is part of libgcj. + + This software is copyrighted work licensed under the terms of the + Libgcj License. Please consult the file "LIBGCJ_LICENSE" for + details. */ + + #include + #include + + #undef STRICT + + #include + #include + #include + + jbyteArray + java::net::InetAddress::aton (jstring host) + { + JV_TEMP_UTF_STRING (hostname, host); + char* bytes = NULL; + int blen = 0; + unsigned long laddr = inet_addr (hostname); + if (laddr != INADDR_NONE) + { + bytes = (char*) &laddr; + blen = 4; + } + if (blen == 0) + return NULL; + jbyteArray result = JvNewByteArray (blen); + memcpy (elements (result), bytes, blen); + return result; + } + + jint + java::net::InetAddress::getFamily (jbyteArray bytes) + { + int len = bytes->length; + if (len == 4) + return AF_INET; + #ifdef HAVE_INET6 + else if (len == 16) + return AF_INET6; + #endif /* HAVE_INET6 */ + else + JvFail ("unrecognized size"); + } + + + JArray * + java::net::InetAddress::lookup (jstring host, java::net::InetAddress* iaddr, + jboolean all) + { + struct hostent *hptr = NULL; + if (host != NULL) + { + JV_TEMP_UTF_STRING (hostname, host); + + // FIXME: this is insufficient if some other piece of code calls + // this gethostbyname. + JvSynchronize sync (java::net::InetAddress::localhostAddress); + hptr = gethostbyname (hostname); + } + else + { + jbyteArray bytes = iaddr->addr; + char *chars = (char*) elements (bytes); + int len = bytes->length; + int type; + char *val; + if (len == 4) + { + val = chars; + type = iaddr->family = AF_INET; + } + #ifdef HAVE_INET6 + else if (len == 16) + { + val = (char *) &chars; + type = iaddr->family = AF_INET6; + } + #endif /* HAVE_INET6 */ + else + JvFail ("unrecognized size"); + + // FIXME: this is insufficient if some other piece of code calls + // this gethostbyaddr. + JvSynchronize sync (java::net::InetAddress::localhostAddress); + hptr = gethostbyaddr (val, len, type); + } + if (hptr != NULL) + { + if (!all) + host = JvNewStringUTF (hptr->h_name); + java::lang::SecurityException *ex = checkConnect (host); + if (ex != NULL) + { + if (iaddr == NULL || iaddr->addr == NULL) + throw ex; + hptr = NULL; + } + } + if (hptr == NULL) + { + if (iaddr != NULL && iaddr->addr != NULL) + { + iaddr->hostName = iaddr->getHostAddress(); + return NULL; + } + else + throw new java::net::UnknownHostException(host); + } + + int count; + if (all) + { + char** ptr = hptr->h_addr_list; + count = 0; + while (*ptr++) count++; + } + else + count = 1; + + JArray *result; + java::net::InetAddress** iaddrs; + if (all) + { + result = java::net::InetAddress::allocArray (count); + iaddrs = elements (result); + } + else + { + result = NULL; + iaddrs = &iaddr; + } + + for (int i = 0; i < count; i++) + { + if (iaddrs[i] == NULL) + iaddrs[i] = new java::net::InetAddress (NULL, NULL); + if (iaddrs[i]->hostName == NULL) + iaddrs[i]->hostName = host; + if (iaddrs[i]->addr == NULL) + { + char *bytes = hptr->h_addr_list[i]; + iaddrs[i]->addr = JvNewByteArray (hptr->h_length); + iaddrs[i]->family = getFamily (iaddrs[i]->addr); + memcpy (elements (iaddrs[i]->addr), bytes, hptr->h_length); + } + } + + return result; + } + + jstring + java::net::InetAddress::getLocalHostname () + { + char buffer[400]; + if (gethostname (buffer, sizeof(buffer))) + return NULL; + // It is admittedly non-optimal to convert the hostname to Unicode + // only to convert it back in getByName, but simplicity wins. Note + // that unless there is a SecurityManager, we only get called once + // anyway, thanks to the InetAddress.localhost cache. + return JvNewStringUTF (buffer); + } diff -Nrc3pad gcc-3.3.3/libjava/java/net/natNetworkInterface.cc gcc-3.4.0/libjava/java/net/natNetworkInterface.cc *** gcc-3.3.3/libjava/java/net/natNetworkInterface.cc 2002-11-21 10:08:03.000000000 +0000 --- gcc-3.4.0/libjava/java/net/natNetworkInterface.cc 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,144 **** - // natNetworkInterface.cc - - /* Copyright (C) 2002 Free Software Foundation - - This file is part of libgcj. - - This software is copyrighted work licensed under the terms of the - Libgcj License. Please consult the file "LIBGCJ_LICENSE" for - details. */ - - #include - #include - - #ifdef WIN32 - - #include - #include - #undef STRICT - - #else /* WIN32 */ - - #ifdef HAVE_UNISTD_H - #include - #endif - #include - #include - #include - - #include - #include - #ifdef HAVE_NETINET_IN_H - #include - #endif - #ifdef HAVE_ARPA_INET_H - #include - #endif - #ifdef HAVE_NETDB_H - #include - #endif - #ifdef HAVE_SYS_IOCTL_H - #define BSD_COMP /* Get FIONREAD on Solaris2. */ - #include - #endif - #ifdef HAVE_NET_IF_H - #include - #endif - - #endif /* WIN32 */ - - #include - #include - #include - #include - #include - #include - - #ifdef DISABLE_JAVA_NET - - ::java::util::Vector* - java::net::NetworkInterface::getRealNetworkInterfaces () - { - ::java::util::Vector* ht = new ::java::util::Vector(); - return ht; - } - - #else /* DISABLE_JAVA_NET */ - - ::java::util::Vector* - java::net::NetworkInterface::getRealNetworkInterfaces () - { - #ifdef WIN32 - throw new ::java::net::SocketException; - #else - int fd; - int num_interfaces = 0; - struct ifconf if_data; - struct ifreq* if_record; - ::java::util::Vector* ht = new ::java::util::Vector (); - - if_data.ifc_len = 0; - if_data.ifc_buf = NULL; - - // Open a (random) socket to have a file descriptor for the ioctl calls. - fd = _Jv_socket (PF_INET, SOCK_DGRAM, htons (IPPROTO_IP)); - - if (fd < 0) - throw new ::java::net::SocketException; - - // Get all interfaces. If not enough buffers are available try it - // with a bigger buffer size. - do - { - num_interfaces += 16; - - if_data.ifc_len = sizeof (struct ifreq) * num_interfaces; - if_data.ifc_buf = - (char*) _Jv_Realloc (if_data.ifc_buf, if_data.ifc_len); - - // Try to get all local interfaces. - if (::ioctl (fd, SIOCGIFCONF, &if_data) < 0) - throw new java::net::SocketException; - } - while (if_data.ifc_len >= (sizeof (struct ifreq) * num_interfaces)); - - // Get addresses of all interfaces. - if_record = if_data.ifc_req; - - for (int n = 0; n < if_data.ifc_len; n += sizeof (struct ifreq)) - { - struct ifreq ifr; - - memset (&ifr, 0, sizeof (ifr)); - strcpy (ifr.ifr_name, if_record->ifr_name); - - // Try to get the IPv4-address of the local interface - if (::ioctl (fd, SIOCGIFADDR, &ifr) < 0) - throw new java::net::SocketException; - - int len = 4; - struct sockaddr_in sa = *((sockaddr_in*) &(ifr.ifr_addr)); - - jbyteArray baddr = JvNewByteArray (len); - memcpy (elements (baddr), &(sa.sin_addr), len); - jstring if_name = JvNewStringLatin1 (if_record->ifr_name); - Inet4Address* address = - new java::net::Inet4Address (baddr, JvNewStringLatin1 ("")); - ht->add (new NetworkInterface (if_name, address)); - if_record++; - } - - #ifdef HAVE_INET6 - // FIXME: read /proc/net/if_inet6 (on Linux 2.4) - #endif - - _Jv_Free (if_data.ifc_buf); - - if (fd >= 0) - _Jv_close (fd); - - return ht; - #endif /* WIN32 */ - } - - #endif // DISABLE_JAVA_NET // --- 0 ---- diff -Nrc3pad gcc-3.3.3/libjava/java/net/natNetworkInterfaceNoNet.cc gcc-3.4.0/libjava/java/net/natNetworkInterfaceNoNet.cc *** gcc-3.3.3/libjava/java/net/natNetworkInterfaceNoNet.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/net/natNetworkInterfaceNoNet.cc 2003-03-18 06:01:16.000000000 +0000 *************** *** 0 **** --- 1,21 ---- + /* Copyright (C) 2003 Free Software Foundation + + This file is part of libgcj. + + This software is copyrighted work licensed under the terms of the + Libgcj License. Please consult the file "LIBGCJ_LICENSE" for + details. */ + + #include + #include + + #include + #include + #include + + ::java::util::Vector* + java::net::NetworkInterface::getRealNetworkInterfaces () + { + throw new SocketException ( + JvNewStringLatin1 ("NetworkInterface.getrealNetworkInterfaces: unimplemented")); + } diff -Nrc3pad gcc-3.3.3/libjava/java/net/natNetworkInterfacePosix.cc gcc-3.4.0/libjava/java/net/natNetworkInterfacePosix.cc *** gcc-3.3.3/libjava/java/net/natNetworkInterfacePosix.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/net/natNetworkInterfacePosix.cc 2003-03-18 06:01:16.000000000 +0000 *************** *** 0 **** --- 1,115 ---- + /* Copyright (C) 2003 Free Software Foundation + + This file is part of libgcj. + + This software is copyrighted work licensed under the terms of the + Libgcj License. Please consult the file "LIBGCJ_LICENSE" for + details. */ + + #include + #include + + #ifdef HAVE_UNISTD_H + #include + #endif + #include + #include + #include + + #include + #include + #ifdef HAVE_NETINET_IN_H + #include + #endif + #ifdef HAVE_ARPA_INET_H + #include + #endif + #ifdef HAVE_NETDB_H + #include + #endif + #ifdef HAVE_SYS_IOCTL_H + #define BSD_COMP /* Get FIONREAD on Solaris2. */ + #include + #endif + #ifdef HAVE_NET_IF_H + #include + #endif + + #include + #include + #include + #include + #include + #include + + ::java::util::Vector* + java::net::NetworkInterface::getRealNetworkInterfaces () + { + int fd; + int num_interfaces = 0; + struct ifconf if_data; + struct ifreq* if_record; + ::java::util::Vector* ht = new ::java::util::Vector (); + + if_data.ifc_len = 0; + if_data.ifc_buf = NULL; + + // Open a (random) socket to have a file descriptor for the ioctl calls. + fd = _Jv_socket (PF_INET, SOCK_DGRAM, htons (IPPROTO_IP)); + + if (fd < 0) + throw new ::java::net::SocketException; + + // Get all interfaces. If not enough buffers are available try it + // with a bigger buffer size. + do + { + num_interfaces += 16; + + if_data.ifc_len = sizeof (struct ifreq) * num_interfaces; + if_data.ifc_buf = + (char*) _Jv_Realloc (if_data.ifc_buf, if_data.ifc_len); + + // Try to get all local interfaces. + if (::ioctl (fd, SIOCGIFCONF, &if_data) < 0) + throw new java::net::SocketException; + } + while (if_data.ifc_len >= (sizeof (struct ifreq) * num_interfaces)); + + // Get addresses of all interfaces. + if_record = if_data.ifc_req; + + for (int n = 0; n < if_data.ifc_len; n += sizeof (struct ifreq)) + { + struct ifreq ifr; + + memset (&ifr, 0, sizeof (ifr)); + strcpy (ifr.ifr_name, if_record->ifr_name); + + // Try to get the IPv4-address of the local interface + if (::ioctl (fd, SIOCGIFADDR, &ifr) < 0) + throw new java::net::SocketException; + + int len = 4; + struct sockaddr_in sa = *((sockaddr_in*) &(ifr.ifr_addr)); + + jbyteArray baddr = JvNewByteArray (len); + memcpy (elements (baddr), &(sa.sin_addr), len); + jstring if_name = JvNewStringLatin1 (if_record->ifr_name); + Inet4Address* address = + new java::net::Inet4Address (baddr, JvNewStringLatin1 ("")); + ht->add (new NetworkInterface (if_name, address)); + if_record++; + } + + #ifdef HAVE_INET6 + // FIXME: read /proc/net/if_inet6 (on Linux 2.4) + #endif + + _Jv_Free (if_data.ifc_buf); + + if (fd >= 0) + _Jv_close (fd); + + return ht; + } diff -Nrc3pad gcc-3.3.3/libjava/java/net/natNetworkInterfaceWin32.cc gcc-3.4.0/libjava/java/net/natNetworkInterfaceWin32.cc *** gcc-3.3.3/libjava/java/net/natNetworkInterfaceWin32.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/net/natNetworkInterfaceWin32.cc 2003-12-02 22:26:50.000000000 +0000 *************** *** 0 **** --- 1,134 ---- + /* Copyright (C) 2003 Free Software Foundation + + This file is part of libgcj. + + This software is copyrighted work licensed under the terms of the + Libgcj License. Please consult the file "LIBGCJ_LICENSE" for + details. */ + + #include + #include + + #undef STRICT + + #include + #include + #include + #include + + /* As of this writing, NetworkInterface.java has + getName() == getDisplayName() and only one IP address + per interface. If this changes, we'll need to use + iphlpapi (not supported on Win95) to retrieve richer + adapter information via GetAdaptersInfo(). In this + module, we provide the necessary hooks to detect the + presence of iphlpapi and use it if necessary, but + comment things out for now to avoid compiler warnings. */ + + enum {MAX_INTERFACES = 50}; + + typedef int + (*PfnGetRealNetworkInterfaces) (jstring* pjstrName, + java::net::InetAddress** ppAddress); + + static int + winsock2GetRealNetworkInterfaces (jstring* pjstrName, + java::net::InetAddress** ppAddress) + { + // FIXME: Add IPv6 support. + + INTERFACE_INFO arInterfaceInfo[MAX_INTERFACES]; + + // Open a (random) socket to have a file descriptor for the WSAIoctl call. + SOCKET skt = ::socket (AF_INET, SOCK_DGRAM, 0); + if (skt == INVALID_SOCKET) + _Jv_ThrowSocketException (); + + DWORD dwOutBufSize; + int nRetCode = ::WSAIoctl (skt, SIO_GET_INTERFACE_LIST, + NULL, 0, &arInterfaceInfo, sizeof(arInterfaceInfo), + &dwOutBufSize, NULL, NULL); + + if (nRetCode == SOCKET_ERROR) + { + DWORD dwLastErrorCode = WSAGetLastError (); + ::closesocket (skt); + _Jv_ThrowSocketException (dwLastErrorCode); + } + + // Get addresses of all interfaces. + int nNbInterfaces = dwOutBufSize / sizeof(INTERFACE_INFO); + int nCurETHInterface = 0; + for (int i=0; i < nNbInterfaces; ++i) + { + int len = 4; + jbyteArray baddr = JvNewByteArray (len); + SOCKADDR_IN* pAddr = (SOCKADDR_IN*) &arInterfaceInfo[i].iiAddress; + memcpy (elements (baddr), &(pAddr->sin_addr), len); + + // Concoct a name for this interface. Since we don't + // have access to the real name under Winsock 2, we use + // "lo" for the loopback interface and ethX for the + // real ones. + TCHAR szName[30]; + u_long lFlags = arInterfaceInfo[i].iiFlags; + + if (lFlags & IFF_LOOPBACK) + _tcscpy (szName, _T("lo")); + else + { + _tcscpy (szName, _T("eth")); + wsprintf(szName+3, _T("%d"), nCurETHInterface++); + } + + jstring if_name = _Jv_Win32NewString (szName); + java::net::Inet4Address* address = + new java::net::Inet4Address (baddr, JvNewStringLatin1 ("")); + pjstrName[i] = if_name; + ppAddress[i] = address; + } + + ::closesocket (skt); + + return nNbInterfaces; + } + + /* + static int + iphlpapiGetRealNetworkInterfaces (jstring* pjstrName, + java::net::InetAddress** ppAddress) + { + return 0; + } + */ + + static PfnGetRealNetworkInterfaces + determineGetRealNetworkInterfacesFN () + { + /* FIXME: Try to dynamically load iphlpapi.dll and + detect the presence of GetAdaptersInfo() using + GetProcAddress(). If successful, return + iphlpapiGetRealNetworkInterfaces; if not, + return winsock2GetRealNetworkInterfaces */ + return &winsock2GetRealNetworkInterfaces; + } + + ::java::util::Vector* + java::net::NetworkInterface::getRealNetworkInterfaces () + { + static PfnGetRealNetworkInterfaces pfn = + determineGetRealNetworkInterfacesFN (); + + jstring arIFName[MAX_INTERFACES]; + InetAddress* arpInetAddress[MAX_INTERFACES]; + ::java::util::Vector* ht = new ::java::util::Vector (); + + int nNbInterfaces = (*pfn) (arIFName, arpInetAddress); + for (int i=0; i < nNbInterfaces; ++i) + { + ht->add (new java::net::NetworkInterface (arIFName[i], + arpInetAddress[i])); + } + + return ht; + } diff -Nrc3pad gcc-3.3.3/libjava/java/net/natPlainDatagramSocketImpl.cc gcc-3.4.0/libjava/java/net/natPlainDatagramSocketImpl.cc *** gcc-3.3.3/libjava/java/net/natPlainDatagramSocketImpl.cc 2002-11-26 20:09:28.000000000 +0000 --- gcc-3.4.0/libjava/java/net/natPlainDatagramSocketImpl.cc 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,872 **** - /* Copyright (C) 1999, 2000, 2002 Free Software Foundation - - This file is part of libgcj. - - This software is copyrighted work licensed under the terms of the - Libgcj License. Please consult the file "LIBGCJ_LICENSE" for - details. */ - - #include - #include - - #ifdef WIN32 - - #include - #include - - #else /* WIN32 */ - - #ifdef HAVE_NETINET_IN_H - #include - #endif - #ifdef HAVE_ARPA_INET_H - #include - #endif - #include - #include - - #endif /* WIN32 */ - - #if HAVE_BSTRING_H - // Needed for bzero, implicitly used by FD_ZERO on IRIX 5.2 - #include - #endif - - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - - #ifdef DISABLE_JAVA_NET - - void - java::net::PlainDatagramSocketImpl::create () - { - throw new SocketException ( - JvNewStringLatin1 ("DatagramSocketImpl.create: unimplemented")); - } - - void - java::net::PlainDatagramSocketImpl::bind (jint, java::net::InetAddress *) - { - throw new BindException ( - JvNewStringLatin1 ("DatagramSocketImpl.bind: unimplemented")); - } - - void - java::net::PlainDatagramSocketImpl::connect (java::net::InetAddress *, jint) - { - throw new SocketException ( - JvNewStringLatin1 ("DatagramSocketImpl.connect: unimplemented")); - } - - void - java::net::PlainDatagramSocketImpl::disconnect () - { - throw new SocketException ( - JvNewStringLatin1 ("DatagramSocketImpl.disconnect: unimplemented")); - } - - jint - java::net::PlainDatagramSocketImpl::peek (java::net::InetAddress *) - { - throw new java::io::IOException ( - JvNewStringLatin1 ("DatagramSocketImpl.peek: unimplemented")); - } - - jint - java::net::PlainDatagramSocketImpl::peekData(java::net::DatagramPacket *) - { - throw new java::io::IOException ( - JvNewStringLatin1 ("DatagramSocketImpl.peekData: unimplemented")); - } - - void - java::net::PlainDatagramSocketImpl::close () - { - throw new java::io::IOException ( - JvNewStringLatin1 ("DatagramSocketImpl.close: unimplemented")); - } - - void - java::net::PlainDatagramSocketImpl::send (java::net::DatagramPacket *) - { - throw new java::io::IOException ( - JvNewStringLatin1 ("DatagramSocketImpl.send: unimplemented")); - } - - void - java::net::PlainDatagramSocketImpl::receive (java::net::DatagramPacket *) - { - throw new java::io::IOException ( - JvNewStringLatin1 ("DatagramSocketImpl.receive: unimplemented")); - } - - void - java::net::PlainDatagramSocketImpl::setTimeToLive (jint) - { - throw new java::io::IOException ( - JvNewStringLatin1 ("DatagramSocketImpl.setTimeToLive: unimplemented")); - } - - jint - java::net::PlainDatagramSocketImpl::getTimeToLive () - { - throw new java::io::IOException ( - JvNewStringLatin1 ("DatagramSocketImpl.getTimeToLive: unimplemented")); - } - - void - java::net::PlainDatagramSocketImpl::mcastGrp (java::net::InetAddress *, - java::net::NetworkInterface *, - jboolean) - { - throw new java::io::IOException ( - JvNewStringLatin1 ("DatagramSocketImpl.mcastGrp: unimplemented")); - } - - void - java::net::PlainDatagramSocketImpl::setOption (jint, java::lang::Object *) - { - throw new SocketException ( - JvNewStringLatin1 ("DatagramSocketImpl.setOption: unimplemented")); - } - - java::lang::Object * - java::net::PlainDatagramSocketImpl::getOption (jint) - { - throw new SocketException ( - JvNewStringLatin1 ("DatagramSocketImpl.getOption: unimplemented")); - } - - #else /* DISABLE_JAVA_NET */ - - - union SockAddr - { - struct sockaddr_in address; - #ifdef HAVE_INET6 - struct sockaddr_in6 address6; - #endif - }; - - union McastReq - { - #if HAVE_STRUCT_IP_MREQ - struct ip_mreq mreq; - #endif - #if HAVE_STRUCT_IPV6_MREQ - struct ipv6_mreq mreq6; - #endif - }; - - union InAddr - { - struct in_addr addr; - #ifdef HAVE_INET6 - struct in6_addr addr6; - #endif - }; - - - // FIXME: routines here and/or in natPlainSocketImpl.cc could throw - // NoRouteToHostException; also consider UnknownHostException, ConnectException. - - void - java::net::PlainDatagramSocketImpl::create () - { - int sock = _Jv_socket (AF_INET, SOCK_DGRAM, 0); - - if (sock < 0) - { - char* strerr = strerror (errno); - throw new java::net::SocketException (JvNewStringUTF (strerr)); - } - - _Jv_platform_close_on_exec (sock); - - // We use fnum in place of fd here. From leaving fd null we avoid - // the double close problem in FileDescriptor.finalize. - fnum = sock; - } - - void - java::net::PlainDatagramSocketImpl::bind (jint lport, - java::net::InetAddress *host) - { - union SockAddr u; - struct sockaddr *ptr = (struct sockaddr *) &u.address; - // FIXME: Use getaddrinfo() to get actual protocol instead of assuming ipv4. - jbyteArray haddress = host->addr; - jbyte *bytes = elements (haddress); - int len = haddress->length; - - if (len == 4) - { - u.address.sin_family = AF_INET; - - if (host != NULL) - memcpy (&u.address.sin_addr, bytes, len); - else - u.address.sin_addr.s_addr = htonl (INADDR_ANY); - - len = sizeof (struct sockaddr_in); - u.address.sin_port = htons (lport); - } - #ifdef HAVE_INET6 - else if (len == 16) - { - u.address6.sin6_family = AF_INET6; - memcpy (&u.address6.sin6_addr, bytes, len); - len = sizeof (struct sockaddr_in6); - u.address6.sin6_port = htons (lport); - } - #endif - else - throw new java::net::SocketException (JvNewStringUTF ("invalid length")); - - if (_Jv_bind (fnum, ptr, len) == 0) - { - socklen_t addrlen = sizeof(u); - - if (lport != 0) - localPort = lport; - else if (::getsockname (fnum, (sockaddr*) &u, &addrlen) == 0) - localPort = ntohs (u.address.sin_port); - else - goto error; - - /* Allow broadcast by default. */ - int broadcast = 1; - if (::setsockopt (fnum, SOL_SOCKET, SO_BROADCAST, (char *) &broadcast, - sizeof (broadcast)) != 0) - goto error; - - return; - } - - error: - char* strerr = strerror (errno); - throw new java::net::BindException (JvNewStringUTF (strerr)); - } - - void - java::net::PlainDatagramSocketImpl::connect (java::net::InetAddress *, jint) - { - throw new ::java::lang::InternalError (JvNewStringLatin1 ( - "PlainDatagramSocketImpl::connect: not implemented yet")); - } - - void - java::net::PlainDatagramSocketImpl::disconnect () - { - throw new ::java::lang::InternalError (JvNewStringLatin1 ( - "PlainDatagramSocketImpl::disconnect: not implemented yet")); - } - - jint - java::net::PlainDatagramSocketImpl::peek (java::net::InetAddress *i) - { - // FIXME: Deal with Multicast and if the socket is connected. - union SockAddr u; - socklen_t addrlen = sizeof(u); - ssize_t retlen = - ::recvfrom (fnum, (char *) NULL, 0, MSG_PEEK, (sockaddr*) &u, - &addrlen); - if (retlen < 0) - goto error; - // FIXME: Deal with Multicast addressing and if the socket is connected. - jbyteArray raddr; - jint rport; - if (u.address.sin_family == AF_INET) - { - raddr = JvNewByteArray (4); - memcpy (elements (raddr), &u.address.sin_addr, 4); - rport = ntohs (u.address.sin_port); - } - #ifdef HAVE_INET6 - else if (u.address.sin_family == AF_INET6) - { - raddr = JvNewByteArray (16); - memcpy (elements (raddr), &u.address6.sin6_addr, 16); - rport = ntohs (u.address6.sin6_port); - } - #endif - else - throw new java::net::SocketException (JvNewStringUTF ("invalid family")); - - i->addr = raddr; - return rport; - error: - char* strerr = strerror (errno); - - if (errno == ECONNREFUSED) - throw new PortUnreachableException (JvNewStringUTF (strerr)); - - throw new java::io::IOException (JvNewStringUTF (strerr)); - } - - jint - java::net::PlainDatagramSocketImpl::peekData(java::net::DatagramPacket *p) - { - // FIXME: Deal with Multicast and if the socket is connected. - union SockAddr u; - socklen_t addrlen = sizeof(u); - jbyte *dbytes = elements (p->getData()); - ssize_t retlen = 0; - - // FIXME: implement timeout support for Win32 - #ifndef WIN32 - // Do timeouts via select since SO_RCVTIMEO is not always available. - if (timeout > 0 && fnum >= 0 && fnum < FD_SETSIZE) - { - fd_set rset; - struct timeval tv; - FD_ZERO(&rset); - FD_SET(fnum, &rset); - tv.tv_sec = timeout / 1000; - tv.tv_usec = (timeout % 1000) * 1000; - int retval; - if ((retval = _Jv_select (fnum + 1, &rset, NULL, NULL, &tv)) < 0) - goto error; - else if (retval == 0) - throw new java::io::InterruptedIOException (); - } - #endif /* WIN32 */ - - retlen = - ::recvfrom (fnum, (char *) dbytes, p->getLength(), MSG_PEEK, (sockaddr*) &u, - &addrlen); - if (retlen < 0) - goto error; - // FIXME: Deal with Multicast addressing and if the socket is connected. - jbyteArray raddr; - jint rport; - if (u.address.sin_family == AF_INET) - { - raddr = JvNewByteArray (4); - memcpy (elements (raddr), &u.address.sin_addr, 4); - rport = ntohs (u.address.sin_port); - } - #ifdef HAVE_INET6 - else if (u.address.sin_family == AF_INET6) - { - raddr = JvNewByteArray (16); - memcpy (elements (raddr), &u.address6.sin6_addr, 16); - rport = ntohs (u.address6.sin6_port); - } - #endif - else - throw new java::net::SocketException (JvNewStringUTF ("invalid family")); - - p->setAddress (new InetAddress (raddr, NULL)); - p->setPort (rport); - p->setLength ((jint) retlen); - return rport; - - error: - char* strerr = strerror (errno); - - if (errno == ECONNREFUSED) - throw new PortUnreachableException (JvNewStringUTF (strerr)); - - throw new java::io::IOException (JvNewStringUTF (strerr)); - } - - // Close(shutdown) the socket. - void - java::net::PlainDatagramSocketImpl::close () - { - // Avoid races from asynchronous finalization. - JvSynchronize sync (this); - - // The method isn't declared to throw anything, so we disregard - // the return value. - _Jv_close (fnum); - fnum = -1; - timeout = 0; - } - - void - java::net::PlainDatagramSocketImpl::send (java::net::DatagramPacket *p) - { - // FIXME: Deal with Multicast and if the socket is connected. - jint rport = p->getPort(); - union SockAddr u; - jbyteArray haddress = p->getAddress()->addr; - jbyte *bytes = elements (haddress); - int len = haddress->length; - struct sockaddr *ptr = (struct sockaddr *) &u.address; - jbyte *dbytes = elements (p->getData()); - if (len == 4) - { - u.address.sin_family = AF_INET; - memcpy (&u.address.sin_addr, bytes, len); - len = sizeof (struct sockaddr_in); - u.address.sin_port = htons (rport); - } - #ifdef HAVE_INET6 - else if (len == 16) - { - u.address6.sin6_family = AF_INET6; - memcpy (&u.address6.sin6_addr, bytes, len); - len = sizeof (struct sockaddr_in6); - u.address6.sin6_port = htons (rport); - } - #endif - else - throw new java::net::SocketException (JvNewStringUTF ("invalid length")); - - if (::sendto (fnum, (char *) dbytes, p->getLength(), 0, ptr, len) >= 0) - return; - - char* strerr = strerror (errno); - - if (errno == ECONNREFUSED) - throw new PortUnreachableException (JvNewStringUTF (strerr)); - - throw new java::io::IOException (JvNewStringUTF (strerr)); - } - - void - java::net::PlainDatagramSocketImpl::receive (java::net::DatagramPacket *p) - { - // FIXME: Deal with Multicast and if the socket is connected. - union SockAddr u; - socklen_t addrlen = sizeof(u); - jbyte *dbytes = elements (p->getData()); - ssize_t retlen = 0; - - // FIXME: implement timeout support for Win32 - #ifndef WIN32 - // Do timeouts via select since SO_RCVTIMEO is not always available. - if (timeout > 0 && fnum >= 0 && fnum < FD_SETSIZE) - { - fd_set rset; - struct timeval tv; - FD_ZERO(&rset); - FD_SET(fnum, &rset); - tv.tv_sec = timeout / 1000; - tv.tv_usec = (timeout % 1000) * 1000; - int retval; - if ((retval = _Jv_select (fnum + 1, &rset, NULL, NULL, &tv)) < 0) - goto error; - else if (retval == 0) - throw new java::io::InterruptedIOException (); - } - #endif /* WIN32 */ - - retlen = - ::recvfrom (fnum, (char *) dbytes, p->getLength(), 0, (sockaddr*) &u, - &addrlen); - if (retlen < 0) - goto error; - // FIXME: Deal with Multicast addressing and if the socket is connected. - jbyteArray raddr; - jint rport; - if (u.address.sin_family == AF_INET) - { - raddr = JvNewByteArray (4); - memcpy (elements (raddr), &u.address.sin_addr, 4); - rport = ntohs (u.address.sin_port); - } - #ifdef HAVE_INET6 - else if (u.address.sin_family == AF_INET6) - { - raddr = JvNewByteArray (16); - memcpy (elements (raddr), &u.address6.sin6_addr, 16); - rport = ntohs (u.address6.sin6_port); - } - #endif - else - throw new java::net::SocketException (JvNewStringUTF ("invalid family")); - - p->setAddress (new InetAddress (raddr, NULL)); - p->setPort (rport); - p->setLength ((jint) retlen); - return; - - error: - char* strerr = strerror (errno); - - if (errno == ECONNREFUSED) - throw new PortUnreachableException (JvNewStringUTF (strerr)); - - throw new java::io::IOException (JvNewStringUTF (strerr)); - } - - void - java::net::PlainDatagramSocketImpl::setTimeToLive (jint ttl) - { - // Assumes IPPROTO_IP rather than IPPROTO_IPV6 since socket created is IPv4. - char val = (char) ttl; - socklen_t val_len = sizeof(val); - - if (::setsockopt (fnum, IPPROTO_IP, IP_MULTICAST_TTL, &val, val_len) == 0) - return; - - char* strerr = strerror (errno); - throw new java::io::IOException (JvNewStringUTF (strerr)); - } - - jint - java::net::PlainDatagramSocketImpl::getTimeToLive () - { - // Assumes IPPROTO_IP rather than IPPROTO_IPV6 since socket created is IPv4. - char val; - socklen_t val_len = sizeof(val); - - if (::getsockopt (fnum, IPPROTO_IP, IP_MULTICAST_TTL, &val, &val_len) == 0) - return ((int) val) & 0xFF; - - char* strerr = strerror (errno); - throw new java::io::IOException (JvNewStringUTF (strerr)); - } - - void - java::net::PlainDatagramSocketImpl::mcastGrp (java::net::InetAddress *inetaddr, - java::net::NetworkInterface *, - jboolean join) - { - // FIXME: implement use of NetworkInterface - - union McastReq u; - jbyteArray haddress = inetaddr->addr; - jbyte *bytes = elements (haddress); - int len = haddress->length; - int level, opname; - const char *ptr; - if (0) - ; - #if HAVE_STRUCT_IP_MREQ - else if (len == 4) - { - level = IPPROTO_IP; - opname = join ? IP_ADD_MEMBERSHIP : IP_DROP_MEMBERSHIP; - memcpy (&u.mreq.imr_multiaddr, bytes, len); - // FIXME: If a non-default interface is set, use it; see Stevens p. 501. - // Maybe not, see note in last paragraph at bottom of Stevens p. 497. - u.mreq.imr_interface.s_addr = htonl (INADDR_ANY); - len = sizeof (struct ip_mreq); - ptr = (const char *) &u.mreq; - } - #endif - #if HAVE_STRUCT_IPV6_MREQ - else if (len == 16) - { - level = IPPROTO_IPV6; - - /* Prefer new RFC 2553 names. */ - #ifndef IPV6_JOIN_GROUP - #define IPV6_JOIN_GROUP IPV6_ADD_MEMBERSHIP - #endif - #ifndef IPV6_LEAVE_GROUP - #define IPV6_LEAVE_GROUP IPV6_DROP_MEMBERSHIP - #endif - - opname = join ? IPV6_JOIN_GROUP : IPV6_LEAVE_GROUP; - memcpy (&u.mreq6.ipv6mr_multiaddr, bytes, len); - // FIXME: If a non-default interface is set, use it; see Stevens p. 501. - // Maybe not, see note in last paragraph at bottom of Stevens p. 497. - u.mreq6.ipv6mr_interface = 0; - len = sizeof (struct ipv6_mreq); - ptr = (const char *) &u.mreq6; - } - #endif - else - throw new java::net::SocketException (JvNewStringUTF ("invalid length")); - - if (::setsockopt (fnum, level, opname, ptr, len) == 0) - return; - - char* strerr = strerror (errno); - throw new java::io::IOException (JvNewStringUTF (strerr)); - } - - void - java::net::PlainDatagramSocketImpl::setOption (jint optID, - java::lang::Object *value) - { - int val; - socklen_t val_len = sizeof (val); - - if (fnum < 0) - throw new java::net::SocketException (JvNewStringUTF ("Socket closed")); - - if (_Jv_IsInstanceOf (value, &java::lang::Boolean::class$)) - { - java::lang::Boolean *boolobj = - static_cast (value); - val = boolobj->booleanValue() ? 1 : 0; - } - else if (_Jv_IsInstanceOf (value, &java::lang::Integer::class$)) - { - java::lang::Integer *intobj = - static_cast (value); - val = (int) intobj->intValue(); - } - // Else assume value to be an InetAddress for use with IP_MULTICAST_IF. - - switch (optID) - { - case _Jv_TCP_NODELAY_ : - throw new java::net::SocketException ( - JvNewStringUTF ("TCP_NODELAY not valid for UDP")); - return; - case _Jv_SO_LINGER_ : - throw new java::net::SocketException ( - JvNewStringUTF ("SO_LINGER not valid for UDP")); - return; - case _Jv_SO_KEEPALIVE_ : - throw new java::net::SocketException ( - JvNewStringUTF ("SO_KEEPALIVE not valid for UDP")); - return; - - case _Jv_SO_BROADCAST_ : - if (::setsockopt (fnum, SOL_SOCKET, SO_BROADCAST, (char *) &val, - val_len) != 0) - goto error; - break; - - case _Jv_SO_OOBINLINE_ : - throw new java::net::SocketException ( - JvNewStringUTF ("SO_OOBINLINE: not valid for UDP")); - break; - - case _Jv_SO_SNDBUF_ : - case _Jv_SO_RCVBUF_ : - #if defined(SO_SNDBUF) && defined(SO_RCVBUF) - int opt; - optID == _Jv_SO_SNDBUF_ ? opt = SO_SNDBUF : opt = SO_RCVBUF; - if (::setsockopt (fnum, SOL_SOCKET, opt, (char *) &val, val_len) != 0) - goto error; - #else - throw new java::lang::InternalError ( - JvNewStringUTF ("SO_RCVBUF/SO_SNDBUF not supported")); - #endif - return; - case _Jv_SO_REUSEADDR_ : - #if defined(SO_REUSEADDR) - if (::setsockopt (fnum, SOL_SOCKET, SO_REUSEADDR, (char *) &val, - val_len) != 0) - goto error; - #else - throw new java::lang::InternalError ( - JvNewStringUTF ("SO_REUSEADDR not supported")); - #endif - return; - case _Jv_SO_BINDADDR_ : - throw new java::net::SocketException ( - JvNewStringUTF ("SO_BINDADDR: read only option")); - return; - case _Jv_IP_MULTICAST_IF_ : - union InAddr u; - jbyteArray haddress; - jbyte *bytes; - int len; - int level, opname; - const char *ptr; - - haddress = ((java::net::InetAddress *) value)->addr; - bytes = elements (haddress); - len = haddress->length; - if (len == 4) - { - level = IPPROTO_IP; - opname = IP_MULTICAST_IF; - memcpy (&u.addr, bytes, len); - len = sizeof (struct in_addr); - ptr = (const char *) &u.addr; - } - // Tru64 UNIX V5.0 has struct sockaddr_in6, but no IPV6_MULTICAST_IF - #if defined (HAVE_INET6) && defined (IPV6_MULTICAST_IF) - else if (len == 16) - { - level = IPPROTO_IPV6; - opname = IPV6_MULTICAST_IF; - memcpy (&u.addr6, bytes, len); - len = sizeof (struct in6_addr); - ptr = (const char *) &u.addr6; - } - #endif - else - throw - new java::net::SocketException (JvNewStringUTF ("invalid length")); - - if (::setsockopt (fnum, level, opname, ptr, len) != 0) - goto error; - return; - - case _Jv_IP_MULTICAST_IF2_ : - throw new java::net::SocketException ( - JvNewStringUTF ("IP_MULTICAST_IF2: not yet implemented")); - break; - - case _Jv_IP_MULTICAST_LOOP_ : - throw new java::net::SocketException ( - JvNewStringUTF ("IP_MULTICAST_LOOP: not yet implemented")); - break; - - case _Jv_IP_TOS_ : - if (::setsockopt (fnum, SOL_SOCKET, IP_TOS, (char *) &val, - val_len) != 0) - goto error; - return; - - case _Jv_SO_TIMEOUT_ : - timeout = val; - return; - default : - errno = ENOPROTOOPT; - } - - error: - char* strerr = strerror (errno); - throw new java::net::SocketException (JvNewStringUTF (strerr)); - } - - java::lang::Object * - java::net::PlainDatagramSocketImpl::getOption (jint optID) - { - int val; - socklen_t val_len = sizeof(val); - union SockAddr u; - socklen_t addrlen = sizeof(u); - - switch (optID) - { - case _Jv_TCP_NODELAY_ : - throw new java::net::SocketException ( - JvNewStringUTF ("TCP_NODELAY not valid for UDP")); - break; - case _Jv_SO_LINGER_ : - throw new java::net::SocketException ( - JvNewStringUTF ("SO_LINGER not valid for UDP")); - break; - case _Jv_SO_KEEPALIVE_ : - throw new java::net::SocketException ( - JvNewStringUTF ("SO_KEEPALIVE not valid for UDP")); - break; - - case _Jv_SO_BROADCAST_ : - if (::getsockopt (fnum, SOL_SOCKET, SO_BROADCAST, (char *) &val, - &val_len) != 0) - goto error; - return new java::lang::Boolean (val != 0); - - case _Jv_SO_OOBINLINE_ : - throw new java::net::SocketException ( - JvNewStringUTF ("SO_OOBINLINE not valid for UDP")); - break; - - case _Jv_SO_RCVBUF_ : - case _Jv_SO_SNDBUF_ : - #if defined(SO_SNDBUF) && defined(SO_RCVBUF) - int opt; - optID == _Jv_SO_SNDBUF_ ? opt = SO_SNDBUF : opt = SO_RCVBUF; - if (::getsockopt (fnum, SOL_SOCKET, opt, (char *) &val, &val_len) != 0) - goto error; - else - return new java::lang::Integer (val); - #else - throw new java::lang::InternalError ( - JvNewStringUTF ("SO_RCVBUF/SO_SNDBUF not supported")); - #endif - break; - case _Jv_SO_BINDADDR_: - // cache the local address - if (localAddress == NULL) - { - jbyteArray laddr; - if (::getsockname (fnum, (sockaddr*) &u, &addrlen) != 0) - goto error; - if (u.address.sin_family == AF_INET) - { - laddr = JvNewByteArray (4); - memcpy (elements (laddr), &u.address.sin_addr, 4); - } - #ifdef HAVE_INET6 - else if (u.address.sin_family == AF_INET6) - { - laddr = JvNewByteArray (16); - memcpy (elements (laddr), &u.address6.sin6_addr, 16); - } - #endif - else - throw new java::net::SocketException ( - JvNewStringUTF ("invalid family")); - localAddress = new java::net::InetAddress (laddr, NULL); - } - return localAddress; - break; - case _Jv_SO_REUSEADDR_ : - #if defined(SO_REUSEADDR) - if (::getsockopt (fnum, SOL_SOCKET, SO_REUSEADDR, (char *) &val, - &val_len) != 0) - goto error; - return new java::lang::Boolean (val != 0); - #else - throw new java::lang::InternalError ( - JvNewStringUTF ("SO_REUSEADDR not supported")); - #endif - break; - case _Jv_IP_MULTICAST_IF_ : - #ifdef HAVE_INET_NTOA - struct in_addr inaddr; - socklen_t inaddr_len; - char *bytes; - - inaddr_len = sizeof(inaddr); - if (::getsockopt (fnum, IPPROTO_IP, IP_MULTICAST_IF, (char *) &inaddr, - &inaddr_len) != 0) - goto error; - - bytes = inet_ntoa (inaddr); - - return java::net::InetAddress::getByName (JvNewStringLatin1 (bytes)); - #else - throw new java::net::SocketException ( - JvNewStringUTF ("IP_MULTICAST_IF: not available - no inet_ntoa()")); - #endif - break; - case _Jv_SO_TIMEOUT_ : - return new java::lang::Integer (timeout); - break; - - case _Jv_IP_MULTICAST_IF2_ : - throw new java::net::SocketException ( - JvNewStringUTF ("IP_MULTICAST_IF2: not yet implemented")); - break; - - case _Jv_IP_MULTICAST_LOOP_ : - if (::getsockopt (fnum, SOL_SOCKET, IP_MULTICAST_LOOP, (char *) &val, - &val_len) != 0) - goto error; - return new java::lang::Boolean (val != 0); - - case _Jv_IP_TOS_ : - if (::getsockopt (fnum, SOL_SOCKET, IP_TOS, (char *) &val, - &val_len) != 0) - goto error; - return new java::lang::Integer (val); - - default : - errno = ENOPROTOOPT; - } - - error: - char* strerr = strerror (errno); - throw new java::net::SocketException (JvNewStringUTF (strerr)); - } - - #endif /* DISABLE_JAVA_NET */ --- 0 ---- diff -Nrc3pad gcc-3.3.3/libjava/java/net/natPlainSocketImpl.cc gcc-3.4.0/libjava/java/net/natPlainSocketImpl.cc *** gcc-3.3.3/libjava/java/net/natPlainSocketImpl.cc 2002-11-26 20:09:28.000000000 +0000 --- gcc-3.4.0/libjava/java/net/natPlainSocketImpl.cc 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,1019 **** - /* Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation - - This file is part of libgcj. - - This software is copyrighted work licensed under the terms of the - Libgcj License. Please consult the file "LIBGCJ_LICENSE" for - details. */ - - #include - #include - - #ifndef DISABLE_JAVA_NET - - #ifdef WIN32 - - #include - #include - #include - #include - #undef STRICT - #undef MAX_PRIORITY - #undef MIN_PRIORITY - #undef FIONREAD - - // These functions make the Win32 socket API look more POSIXy - static inline int - write(int s, void *buf, int len) - { - return send(s, (char*)buf, len, 0); - } - - static inline int - read(int s, void *buf, int len) - { - return recv(s, (char*)buf, len, 0); - } - - // these errors cannot occur on Win32 - #else /* WIN32 */ - - #ifdef HAVE_SYS_IOCTL_H - #define BSD_COMP /* Get FIONREAD on Solaris2. */ - #include - #endif - - // Pick up FIONREAD on Solaris 2.5. - #ifdef HAVE_SYS_FILIO_H - #include - #endif - - #include - #include - #include - #include - - #endif /* WIN32 */ - #endif /* DISABLE_JAVA_NET */ - - #if HAVE_BSTRING_H - // Needed for bzero, implicitly used by FD_ZERO on IRIX 5.2 - #include - #endif - - - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - - #ifdef DISABLE_JAVA_NET - - void - java::net::PlainSocketImpl::create (jboolean) - { - throw new java::io::IOException ( - JvNewStringLatin1 ("SocketImpl.create: unimplemented")); - } - - void - java::net::PlainSocketImpl::bind (java::net::InetAddress *, jint) - { - throw new BindException ( - JvNewStringLatin1 ("SocketImpl.bind: unimplemented")); - } - - void - java::net::PlainSocketImpl::connect (java::net::SocketAddress *, jint) - { - throw new ConnectException ( - JvNewStringLatin1 ("SocketImpl.connect: unimplemented")); - } - - void - java::net::PlainSocketImpl::listen (jint) - { - throw new java::io::IOException ( - JvNewStringLatin1 ("SocketImpl.listen: unimplemented")); - } - - void - java::net::PlainSocketImpl::accept (java::net::PlainSocketImpl *) - { - throw new java::io::IOException ( - JvNewStringLatin1 ("SocketImpl.accept: unimplemented")); - } - - void - java::net::PlainSocketImpl::setOption (jint, java::lang::Object *) - { - throw new SocketException ( - JvNewStringLatin1 ("SocketImpl.setOption: unimplemented")); - } - - java::lang::Object * - java::net::PlainSocketImpl::getOption (jint) - { - throw new SocketException ( - JvNewStringLatin1 ("SocketImpl.getOption: unimplemented")); - } - - jint - java::net::PlainSocketImpl::read(void) - { - throw new SocketException ( - JvNewStringLatin1 ("SocketImpl.read: unimplemented")); - } - - jint - java::net::PlainSocketImpl::read(jbyteArray buffer, jint offset, jint count) - { - throw new SocketException ( - JvNewStringLatin1 ("SocketImpl.read: unimplemented")); - } - - void - java::net::PlainSocketImpl::write(jint b) - { - throw new SocketException ( - JvNewStringLatin1 ("SocketImpl.write: unimplemented")); - } - - void - java::net::PlainSocketImpl::write(jbyteArray b, jint offset, jint len) - { - throw new SocketException ( - JvNewStringLatin1 ("SocketImpl.write: unimplemented")); - } - - void - java::net::PlainSocketImpl::sendUrgentData(jint data) - { - throw new SocketException ( - JvNewStringLatin1 ("SocketImpl.sendUrgentData: unimplemented")); - } - - jint - java::net::PlainSocketImpl::available(void) - { - throw new SocketException ( - JvNewStringLatin1 ("SocketImpl.available: unimplemented")); - } - - void - java::net::PlainSocketImpl::close(void) - { - throw new SocketException ( - JvNewStringLatin1 ("SocketImpl.close: unimplemented")); - } - - void - java::net::PlainSocketImpl::shutdownInput (void) - { - throw new SocketException ( - JvNewStringLatin1 ("SocketImpl.shutdownInput: unimplemented")); - } - - void - java::net::PlainSocketImpl::shutdownOutput (void) - { - throw new SocketException ( - JvNewStringLatin1 ("SocketImpl.shutdownOutput: unimplemented")); - } - - #else /* DISABLE_JAVA_NET */ - - union SockAddr - { - struct sockaddr_in address; - #ifdef HAVE_INET6 - struct sockaddr_in6 address6; - #endif - }; - - void - java::net::PlainSocketImpl::create (jboolean stream) - { - int sock = _Jv_socket (AF_INET, stream ? SOCK_STREAM : SOCK_DGRAM, 0); - - if (sock < 0) - { - char* strerr = strerror (errno); - throw new java::io::IOException (JvNewStringUTF (strerr)); - } - - _Jv_platform_close_on_exec (sock); - - // We use fnum in place of fd here. From leaving fd null we avoid - // the double close problem in FileDescriptor.finalize. - fnum = sock; - } - - void - java::net::PlainSocketImpl::bind (java::net::InetAddress *host, jint lport) - { - union SockAddr u; - struct sockaddr *ptr = (struct sockaddr *) &u.address; - jbyteArray haddress = host->addr; - jbyte *bytes = elements (haddress); - int len = haddress->length; - int i = 1; - - if (len == 4) - { - u.address.sin_family = AF_INET; - - if (host != NULL) - memcpy (&u.address.sin_addr, bytes, len); - else - u.address.sin_addr.s_addr = htonl (INADDR_ANY); - - len = sizeof (struct sockaddr_in); - u.address.sin_port = htons (lport); - } - #ifdef HAVE_INET6 - else if (len == 16) - { - u.address6.sin6_family = AF_INET6; - memcpy (&u.address6.sin6_addr, bytes, len); - len = sizeof (struct sockaddr_in6); - u.address6.sin6_port = htons (lport); - } - #endif - else - throw new java::net::SocketException (JvNewStringUTF ("invalid length")); - - // Enable SO_REUSEADDR, so that servers can reuse ports left in TIME_WAIT. - ::setsockopt(fnum, SOL_SOCKET, SO_REUSEADDR, (char *) &i, sizeof(i)); - - if (_Jv_bind (fnum, ptr, len) == 0) - { - address = host; - socklen_t addrlen = sizeof(u); - - if (lport != 0) - localport = lport; - else if (::getsockname (fnum, (sockaddr*) &u, &addrlen) == 0) - localport = ntohs (u.address.sin_port); - else - goto error; - - return; - } - - error: - char* strerr = strerror (errno); - throw new java::net::BindException (JvNewStringUTF (strerr)); - } - - void - java::net::PlainSocketImpl::connect (java::net::SocketAddress *addr, - jint timeout) - { - java::net::InetSocketAddress *tmp = (java::net::InetSocketAddress*) addr; - java::net::InetAddress *host = tmp->getAddress(); - jint rport = tmp->getPort(); - - union SockAddr u; - socklen_t addrlen = sizeof(u); - jbyteArray haddress = host->addr; - jbyte *bytes = elements (haddress); - int len = haddress->length; - struct sockaddr *ptr = (struct sockaddr *) &u.address; - if (len == 4) - { - u.address.sin_family = AF_INET; - memcpy (&u.address.sin_addr, bytes, len); - len = sizeof (struct sockaddr_in); - u.address.sin_port = htons (rport); - } - #ifdef HAVE_INET6 - else if (len == 16) - { - u.address6.sin6_family = AF_INET6; - memcpy (&u.address6.sin6_addr, bytes, len); - len = sizeof (struct sockaddr_in6); - u.address6.sin6_port = htons (rport); - } - #endif - else - throw new java::net::SocketException (JvNewStringUTF ("invalid length")); - - // FIXME: implement timeout support for Win32 - #ifndef WIN32 - if (timeout > 0) - { - int flags = ::fcntl (fnum, F_GETFL); - ::fcntl (fnum, F_SETFL, flags | O_NONBLOCK); - - if ((_Jv_connect (fnum, ptr, len) != 0) && (errno != EINPROGRESS)) - goto error; - - fd_set rset; - struct timeval tv; - FD_ZERO(&rset); - FD_SET(fnum, &rset); - tv.tv_sec = timeout / 1000; - tv.tv_usec = (timeout % 1000) * 1000; - int retval; - - if ((retval = _Jv_select (fnum + 1, &rset, NULL, NULL, &tv)) < 0) - goto error; - else if (retval == 0) - throw new java::net::SocketTimeoutException - (JvNewStringUTF ("Connect timed out")); - } - else - #endif - { - if (_Jv_connect (fnum, ptr, len) != 0) - goto error; - } - - address = host; - port = rport; - - // A bind may not have been done on this socket; if so, set localport now. - if (localport == 0) - { - if (::getsockname (fnum, (sockaddr*) &u, &addrlen) == 0) - localport = ntohs (u.address.sin_port); - else - goto error; - } - - return; - - error: - char* strerr = strerror (errno); - throw new java::net::ConnectException (JvNewStringUTF (strerr)); - } - - void - java::net::PlainSocketImpl::listen (jint backlog) - { - if (::listen (fnum, backlog) != 0) - { - char* strerr = strerror (errno); - throw new java::io::IOException (JvNewStringUTF (strerr)); - } - } - - void - java::net::PlainSocketImpl::accept (java::net::PlainSocketImpl *s) - { - union SockAddr u; - socklen_t addrlen = sizeof(u); - int new_socket = 0; - - // FIXME: implement timeout support for Win32 - #ifndef WIN32 - // Do timeouts via select since SO_RCVTIMEO is not always available. - if (timeout > 0 && fnum >= 0 && fnum < FD_SETSIZE) - { - fd_set rset; - struct timeval tv; - FD_ZERO(&rset); - FD_SET(fnum, &rset); - tv.tv_sec = timeout / 1000; - tv.tv_usec = (timeout % 1000) * 1000; - int retval; - if ((retval = _Jv_select (fnum + 1, &rset, NULL, NULL, &tv)) < 0) - goto error; - else if (retval == 0) - throw new java::io::InterruptedIOException ( - JvNewStringUTF("Accept timed out")); - } - #endif /* WIN32 */ - - new_socket = _Jv_accept (fnum, (sockaddr*) &u, &addrlen); - - if (new_socket < 0) - goto error; - - _Jv_platform_close_on_exec (new_socket); - - jbyteArray raddr; - jint rport; - if (u.address.sin_family == AF_INET) - { - raddr = JvNewByteArray (4); - memcpy (elements (raddr), &u.address.sin_addr, 4); - rport = ntohs (u.address.sin_port); - } - #ifdef HAVE_INET6 - else if (u.address.sin_family == AF_INET6) - { - raddr = JvNewByteArray (16); - memcpy (elements (raddr), &u.address6.sin6_addr, 16); - rport = ntohs (u.address6.sin6_port); - } - #endif - else - throw new java::net::SocketException (JvNewStringUTF ("invalid family")); - - s->fnum = new_socket; - s->localport = localport; - s->address = new InetAddress (raddr, NULL); - s->port = rport; - return; - - error: - char* strerr = strerror (errno); - throw new java::io::IOException (JvNewStringUTF (strerr)); - } - - // Close(shutdown) the socket. - void - java::net::PlainSocketImpl::close() - { - // Avoid races from asynchronous finalization. - JvSynchronize sync (this); - - // should we use shutdown here? how would that effect so_linger? - int res = _Jv_close (fnum); - - if (res == -1) - { - // These three errors are not errors according to tests performed - // on the reference implementation. - if (errno != ENOTCONN && errno != ECONNRESET && errno != EBADF) - throw new java::io::IOException (JvNewStringUTF (strerror (errno))); - } - // Safe place to reset the file pointer. - fnum = -1; - timeout = 0; - } - - // Write a byte to the socket. - void - java::net::PlainSocketImpl::write(jint b) - { - jbyte d =(jbyte) b; - int r = 0; - - while (r != 1) - { - r = _Jv_write (fnum, &d, 1); - if (r == -1) - { - if (java::lang::Thread::interrupted()) - { - java::io::InterruptedIOException *iioe - = new java::io::InterruptedIOException - (JvNewStringLatin1 (strerror (errno))); - iioe->bytesTransferred = 0; - throw iioe; - } - // Some errors should not cause exceptions. - if (errno != ENOTCONN && errno != ECONNRESET && errno != EBADF) - throw new java::io::IOException (JvNewStringUTF (strerror (errno))); - break; - } - } - } - - // Write some bytes to the socket. - void - java::net::PlainSocketImpl::write(jbyteArray b, jint offset, jint len) - { - if (! b) - throw new java::lang::NullPointerException; - if (offset < 0 || len < 0 || offset + len > JvGetArrayLength (b)) - throw new java::lang::ArrayIndexOutOfBoundsException; - - jbyte *bytes = elements (b) + offset; - int written = 0; - - while (len > 0) - { - int r = _Jv_write (fnum, bytes, len); - - if (r == -1) - { - if (java::lang::Thread::interrupted()) - { - java::io::InterruptedIOException *iioe - = new java::io::InterruptedIOException - (JvNewStringLatin1 (strerror (errno))); - iioe->bytesTransferred = written; - throw iioe; - } - // Some errors should not cause exceptions. - if (errno != ENOTCONN && errno != ECONNRESET && errno != EBADF) - throw new java::io::IOException (JvNewStringUTF (strerror (errno))); - break; - } - - written += r; - len -= r; - bytes += r; - } - } - - void - java::net::PlainSocketImpl::sendUrgentData (jint) - { - throw new SocketException (JvNewStringLatin1 ( - "PlainSocketImpl: sending of urgent data not supported by this socket")); - } - - // Read a single byte from the socket. - jint - java::net::PlainSocketImpl::read(void) - { - jbyte b; - - // FIXME: implement timeout support for Win32 - #ifndef WIN32 - // Do timeouts via select. - if (timeout > 0 && fnum >= 0 && fnum < FD_SETSIZE) - { - // Create the file descriptor set. - fd_set read_fds; - FD_ZERO (&read_fds); - FD_SET (fnum,&read_fds); - // Create the timeout struct based on our internal timeout value. - struct timeval timeout_value; - timeout_value.tv_sec = timeout / 1000; - timeout_value.tv_usec = (timeout % 1000) * 1000; - // Select on the fds. - int sel_retval = - _Jv_select (fnum + 1, &read_fds, NULL, NULL, &timeout_value); - // If select returns 0 we've waited without getting data... - // that means we've timed out. - if (sel_retval == 0) - throw new java::io::InterruptedIOException - (JvNewStringUTF ("read timed out") ); - // If select returns ok we know we either got signalled or read some data... - // either way we need to try to read. - } - #endif /* WIN32 */ - - int r = _Jv_read (fnum, &b, 1); - - if (r == 0) - return -1; - - if (java::lang::Thread::interrupted()) - { - java::io::InterruptedIOException *iioe = - new java::io::InterruptedIOException - (JvNewStringUTF("read interrupted")); - iioe->bytesTransferred = r == -1 ? 0 : r; - throw iioe; - } - else if (r == -1) - { - // Some errors cause us to return end of stream... - if (errno == ENOTCONN) - return -1; - - // Other errors need to be signalled. - throw new java::io::IOException (JvNewStringUTF (strerror (errno))); - } - - return b & 0xFF; - } - - // Read count bytes into the buffer, starting at offset. - jint - java::net::PlainSocketImpl::read(jbyteArray buffer, jint offset, jint count) - { - if (! buffer) - throw new java::lang::NullPointerException; - - jsize bsize = JvGetArrayLength (buffer); - - if (offset < 0 || count < 0 || offset + count > bsize) - throw new java::lang::ArrayIndexOutOfBoundsException; - - jbyte *bytes = elements (buffer) + offset; - - // FIXME: implement timeout support for Win32 - #ifndef WIN32 - // Do timeouts via select. - if (timeout > 0 && fnum >= 0 && fnum < FD_SETSIZE) - { - // Create the file descriptor set. - fd_set read_fds; - FD_ZERO (&read_fds); - FD_SET (fnum, &read_fds); - // Create the timeout struct based on our internal timeout value. - struct timeval timeout_value; - timeout_value.tv_sec = timeout / 1000; - timeout_value.tv_usec =(timeout % 1000) * 1000; - // Select on the fds. - int sel_retval = - _Jv_select (fnum + 1, &read_fds, NULL, NULL, &timeout_value); - // We're only interested in the 0 return. - // error returns still require us to try to read - // the socket to see what happened. - if (sel_retval == 0) - { - java::io::InterruptedIOException *iioe = - new java::io::InterruptedIOException - (JvNewStringUTF ("read interrupted")); - iioe->bytesTransferred = 0; - throw iioe; - } - } - #endif - - // Read the socket. - int r = ::recv (fnum, (char *) bytes, count, 0); - - if (r == 0) - return -1; - - if (java::lang::Thread::interrupted()) - { - java::io::InterruptedIOException *iioe = - new java::io::InterruptedIOException - (JvNewStringUTF ("read interrupted")); - iioe->bytesTransferred = r == -1 ? 0 : r; - throw iioe; - } - else if (r == -1) - { - // Some errors cause us to return end of stream... - if (errno == ENOTCONN) - return -1; - - // Other errors need to be signalled. - throw new java::io::IOException (JvNewStringUTF (strerror (errno))); - } - - return r; - } - - // How many bytes are available? - jint - java::net::PlainSocketImpl::available(void) - { - #if defined(FIONREAD) || defined(HAVE_SELECT) - long num = 0; - int r = 0; - bool num_set = false; - - #if defined(FIONREAD) - r = ::ioctl (fnum, FIONREAD, &num); - - if (r == -1 && errno == ENOTTY) - { - // If the ioctl doesn't work, we don't care. - r = 0; - num = 0; - } - else - num_set = true; - #elif defined(HAVE_SELECT) - if (fnum < 0) - { - errno = EBADF; - r = -1; - } - #endif - - if (r == -1) - { - posix_error: - throw new java::io::IOException(JvNewStringUTF(strerror(errno))); - } - - // If we didn't get anything we can use select. - - #if defined(HAVE_SELECT) - if (! num_set) - if (! num_set && fnum >= 0 && fnum < FD_SETSIZE) - { - fd_set rd; - FD_ZERO (&rd); - FD_SET (fnum, &rd); - struct timeval tv; - tv.tv_sec = 0; - tv.tv_usec = 0; - r = _Jv_select (fnum + 1, &rd, NULL, NULL, &tv); - if(r == -1) - goto posix_error; - num = r == 0 ? 0 : 1; - } - #endif /* HAVE_SELECT */ - - return (jint) num; - #else - throw new java::io::IOException (JvNewStringUTF ("unimplemented")); - #endif - } - - void - java::net::PlainSocketImpl::setOption (jint optID, java::lang::Object *value) - { - int val; - socklen_t val_len = sizeof (val); - - if (fnum < 0) - throw new java::net::SocketException (JvNewStringUTF ("Socket closed")); - - if (_Jv_IsInstanceOf (value, &java::lang::Boolean::class$)) - { - java::lang::Boolean *boolobj = - static_cast (value); - if (boolobj->booleanValue()) - val = 1; - else - { - if (optID == _Jv_SO_LINGER_) - val = -1; - else - val = 0; - } - } - else if (_Jv_IsInstanceOf (value, &java::lang::Integer::class$)) - { - java::lang::Integer *intobj = - static_cast (value); - val = (int) intobj->intValue(); - } - else - { - throw new java::lang::IllegalArgumentException ( - JvNewStringLatin1 ("`value' must be Boolean or Integer")); - } - - switch (optID) - { - case _Jv_TCP_NODELAY_ : - #ifdef TCP_NODELAY - if (::setsockopt (fnum, IPPROTO_TCP, TCP_NODELAY, (char *) &val, - val_len) != 0) - goto error; - #else - throw new java::lang::InternalError - (JvNewStringUTF ("TCP_NODELAY not supported")); - #endif /* TCP_NODELAY */ - return; - - case _Jv_SO_KEEPALIVE_ : - if (::setsockopt (fnum, SOL_SOCKET, SO_KEEPALIVE, (char *) &val, - val_len) != 0) - goto error; - break; - - case _Jv_SO_BROADCAST_ : - throw new java::net::SocketException - (JvNewStringUTF ("SO_BROADCAST not valid for TCP")); - break; - - case _Jv_SO_OOBINLINE_ : - if (::setsockopt (fnum, SOL_SOCKET, SO_OOBINLINE, (char *) &val, - val_len) != 0) - goto error; - break; - - case _Jv_SO_LINGER_ : - #ifdef SO_LINGER - struct linger l_val; - l_val.l_onoff = (val != -1); - l_val.l_linger = val; - - if (::setsockopt (fnum, SOL_SOCKET, SO_LINGER, (char *) &l_val, - sizeof(l_val)) != 0) - goto error; - #else - throw new java::lang::InternalError ( - JvNewStringUTF ("SO_LINGER not supported")); - #endif /* SO_LINGER */ - return; - - case _Jv_SO_SNDBUF_ : - case _Jv_SO_RCVBUF_ : - #if defined(SO_SNDBUF) && defined(SO_RCVBUF) - int opt; - optID == _Jv_SO_SNDBUF_ ? opt = SO_SNDBUF : opt = SO_RCVBUF; - if (::setsockopt (fnum, SOL_SOCKET, opt, (char *) &val, val_len) != 0) - goto error; - #else - throw new java::lang::InternalError ( - JvNewStringUTF ("SO_RCVBUF/SO_SNDBUF not supported")); - #endif - return; - - case _Jv_SO_BINDADDR_ : - throw new java::net::SocketException ( - JvNewStringUTF ("SO_BINDADDR: read only option")); - return; - - case _Jv_IP_MULTICAST_IF_ : - throw new java::net::SocketException ( - JvNewStringUTF ("IP_MULTICAST_IF: not valid for TCP")); - return; - - case _Jv_IP_MULTICAST_IF2_ : - throw new java::net::SocketException ( - JvNewStringUTF ("IP_MULTICAST_IF2: not valid for TCP")); - break; - - case _Jv_IP_MULTICAST_LOOP_ : - throw new java::net::SocketException ( - JvNewStringUTF ("IP_MULTICAST_LOOP: not valid for TCP")); - break; - - case _Jv_IP_TOS_ : - if (::setsockopt (fnum, SOL_SOCKET, IP_TOS, (char *) &val, - val_len) != 0) - goto error; - break; - - case _Jv_SO_REUSEADDR_ : - throw new java::net::SocketException ( - JvNewStringUTF ("SO_REUSEADDR: not valid for TCP")); - return; - - case _Jv_SO_TIMEOUT_ : - timeout = val; - return; - - default : - errno = ENOPROTOOPT; - } - - error: - char* strerr = strerror (errno); - throw new java::net::SocketException (JvNewStringUTF (strerr)); - } - - java::lang::Object * - java::net::PlainSocketImpl::getOption (jint optID) - { - int val; - socklen_t val_len = sizeof(val); - union SockAddr u; - socklen_t addrlen = sizeof(u); - struct linger l_val; - socklen_t l_val_len = sizeof(l_val); - - switch (optID) - { - #ifdef TCP_NODELAY - case _Jv_TCP_NODELAY_ : - if (::getsockopt (fnum, IPPROTO_TCP, TCP_NODELAY, (char *) &val, - &val_len) != 0) - goto error; - else - return new java::lang::Boolean (val != 0); - #else - throw new java::lang::InternalError - (JvNewStringUTF ("TCP_NODELAY not supported")); - #endif - break; - - case _Jv_SO_LINGER_ : - #ifdef SO_LINGER - if (::getsockopt (fnum, SOL_SOCKET, SO_LINGER, (char *) &l_val, - &l_val_len) != 0) - goto error; - - if (l_val.l_onoff) - return new java::lang::Integer (l_val.l_linger); - else - return new java::lang::Boolean ((jboolean)false); - #else - throw new java::lang::InternalError - (JvNewStringUTF ("SO_LINGER not supported")); - #endif - break; - - case _Jv_SO_KEEPALIVE_ : - if (::getsockopt (fnum, SOL_SOCKET, SO_KEEPALIVE, (char *) &val, - &val_len) != 0) - goto error; - else - return new java::lang::Boolean (val != 0); - - case _Jv_SO_BROADCAST_ : - if (::getsockopt (fnum, SOL_SOCKET, SO_BROADCAST, (char *) &val, - &val_len) != 0) - goto error; - return new java::lang::Boolean ((jboolean)val); - - case _Jv_SO_OOBINLINE_ : - if (::getsockopt (fnum, SOL_SOCKET, SO_OOBINLINE, (char *) &val, - &val_len) != 0) - goto error; - return new java::lang::Boolean ((jboolean)val); - - case _Jv_SO_RCVBUF_ : - case _Jv_SO_SNDBUF_ : - #if defined(SO_SNDBUF) && defined(SO_RCVBUF) - int opt; - optID == _Jv_SO_SNDBUF_ ? opt = SO_SNDBUF : opt = SO_RCVBUF; - if (::getsockopt (fnum, SOL_SOCKET, opt, (char *) &val, &val_len) != 0) - goto error; - else - return new java::lang::Integer (val); - #else - throw new java::lang::InternalError - (JvNewStringUTF ("SO_RCVBUF/SO_SNDBUF not supported")); - #endif - break; - case _Jv_SO_BINDADDR_: - // cache the local address - if (localAddress == NULL) - { - jbyteArray laddr; - - if (::getsockname (fnum, (sockaddr*) &u, &addrlen) != 0) - goto error; - - if (u.address.sin_family == AF_INET) - { - laddr = JvNewByteArray (4); - memcpy (elements (laddr), &u.address.sin_addr, 4); - } - #ifdef HAVE_INET6 - else if (u.address.sin_family == AF_INET6) - { - laddr = JvNewByteArray (16); - memcpy (elements (laddr), &u.address6.sin6_addr, 16); - } - #endif - else - throw new java::net::SocketException - (JvNewStringUTF ("invalid family")); - localAddress = new java::net::InetAddress (laddr, NULL); - } - - return localAddress; - break; - case _Jv_IP_MULTICAST_IF_ : - throw new java::net::SocketException - (JvNewStringUTF ("IP_MULTICAST_IF: not valid for TCP")); - break; - - case _Jv_IP_MULTICAST_IF2_ : - throw new java::net::SocketException - (JvNewStringUTF ("IP_MULTICAST_IF2: not valid for TCP")); - break; - - case _Jv_IP_MULTICAST_LOOP_ : - throw new java::net::SocketException - (JvNewStringUTF ("IP_MULTICAST_LOOP: not valid for TCP")); - break; - - case _Jv_IP_TOS_ : - if (::getsockopt (fnum, SOL_SOCKET, IP_TOS, (char *) &val, - &val_len) != 0) - goto error; - return new java::lang::Integer (val); - break; - - case _Jv_SO_REUSEADDR_ : - throw new java::net::SocketException - (JvNewStringUTF ("SO_REUSEADDR: not valid for TCP")); - break; - - case _Jv_SO_TIMEOUT_ : - return new java::lang::Integer (timeout); - break; - - default : - errno = ENOPROTOOPT; - } - - error: - char* strerr = strerror (errno); - throw new java::net::SocketException (JvNewStringUTF (strerr)); - } - - void - java::net::PlainSocketImpl::shutdownInput (void) - { - if (::shutdown (fnum, 0)) - throw new SocketException (JvNewStringUTF (strerror (errno))); - } - - void - java::net::PlainSocketImpl::shutdownOutput (void) - { - if (::shutdown (fnum, 1)) - throw new SocketException (JvNewStringUTF (strerror (errno))); - } - - #endif /* DISABLE_JAVA_NET */ --- 0 ---- diff -Nrc3pad gcc-3.3.3/libjava/java/net/NetPermission.java gcc-3.4.0/libjava/java/net/NetPermission.java *** gcc-3.3.3/libjava/java/net/NetPermission.java 2003-02-12 22:44:38.000000000 +0000 --- gcc-3.4.0/libjava/java/net/NetPermission.java 2003-05-26 12:58:02.000000000 +0000 *************** *** 1,5 **** /* NetPermission.java -- A class for basic miscellaneous network permission ! Copyright (C) 1998, 2000 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* NetPermission.java -- A class for basic miscellaneous network permission ! Copyright (C) 1998, 2000, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** import java.security.BasicPermission; *** 41,49 **** /** * This class is used to model miscellaneous network permissions. It is ! * a subclass of BasicPermission. This means that it models a "boolean" ! * permission. One that you either have or do not have. Thus there is ! * no permitted action list associated with this object. * * @author Aaron M. Renn (arenn@urbanophile.com) */ --- 41,61 ---- /** * This class is used to model miscellaneous network permissions. It is ! * a subclass of BasicPermission. This means that it models a ! * "boolean" permission. One that you either have or do not have. Thus ! * there is no permitted action list associated with this object. ! * ! * The following permission names are defined for this class: ! * ! *

              ! *
            • setDefaultAuthenticator - Grants the ability to install a facility ! * to collect username and password information when requested by a ! * web site or proxy server. ! *
            • requestPasswordAuthentication - Grants the ability to ask the ! * authentication facility for the user's password. ! *
            • specifyStreamHandler - Grants the permission to specify the ! * stream handler class used when loading from a URL. ! *
            * * @author Aaron M. Renn (arenn@urbanophile.com) */ diff -Nrc3pad gcc-3.3.3/libjava/java/net/NetworkInterface.java gcc-3.4.0/libjava/java/net/NetworkInterface.java *** gcc-3.3.3/libjava/java/net/NetworkInterface.java 2003-02-12 22:44:38.000000000 +0000 --- gcc-3.4.0/libjava/java/net/NetworkInterface.java 2003-10-02 19:29:31.000000000 +0000 *************** *** 1,5 **** /* NetworkInterface.java ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* NetworkInterface.java ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,53 **** package java.net; import java.util.Enumeration; import java.util.Vector; /** * @author Michael Koch * @since 1.4 */ public final class NetworkInterface { ! private static Vector networkInterfaces; ! private String name; private Vector inetAddresses; --- 37,66 ---- package java.net; + import gnu.classpath.Configuration; import java.util.Enumeration; import java.util.Vector; /** + * This class models a network interface on the host computer. A network + * interface contains a name (typically associated with a specific + * hardware adapter) and a list of addresses that are bound to it. + * For example, an ethernet interface may be named "eth0" and have the + * address 192.168.1.101 assigned to it. + * * @author Michael Koch * @since 1.4 */ public final class NetworkInterface { ! static ! { ! if (Configuration.INIT_LOAD_LIBRARY) ! { ! System.loadLibrary ("javanet"); ! } ! } ! private String name; private Vector inetAddresses; *************** public final class NetworkInterface *** 63,69 **** throws SocketException; /** ! * Returns the name of the network interface */ public String getName () { --- 76,84 ---- throws SocketException; /** ! * Returns the name of the network interface ! * ! * @return The name of the interface. */ public String getName () { *************** public final class NetworkInterface *** 75,82 **** * * If a @see SecurityManager is available all addresses are checked * with @see SecurityManager::checkConnect() if they are available. ! * Only InetAddresses are returned where the security manager doesn't ! * thrown an exception. * * @return An enumeration of all addresses. */ --- 90,97 ---- * * If a @see SecurityManager is available all addresses are checked * with @see SecurityManager::checkConnect() if they are available. ! * Only InetAddresses are returned where the security manager ! * doesn't throw an exception. * * @return An enumeration of all addresses. */ *************** public final class NetworkInterface *** 108,113 **** --- 123,130 ---- /** * Returns the display name of the interface + * + * @return The display name of the interface */ public String getDisplayName () { *************** public final class NetworkInterface *** 125,132 **** public static NetworkInterface getByName (String name) throws SocketException { ! if (networkInterfaces == null) ! networkInterfaces = getRealNetworkInterfaces (); for (Enumeration e = networkInterfaces.elements (); e.hasMoreElements (); ) --- 142,148 ---- public static NetworkInterface getByName (String name) throws SocketException { ! Vector networkInterfaces = getRealNetworkInterfaces (); for (Enumeration e = networkInterfaces.elements (); e.hasMoreElements (); ) *************** public final class NetworkInterface *** 151,158 **** public static NetworkInterface getByInetAddress (InetAddress addr) throws SocketException { ! if (networkInterfaces == null) ! networkInterfaces = getRealNetworkInterfaces (); for (Enumeration interfaces = networkInterfaces.elements (); interfaces.hasMoreElements (); ) --- 167,173 ---- public static NetworkInterface getByInetAddress (InetAddress addr) throws SocketException { ! Vector networkInterfaces = getRealNetworkInterfaces (); for (Enumeration interfaces = networkInterfaces.elements (); interfaces.hasMoreElements (); ) *************** public final class NetworkInterface *** 172,192 **** } /** ! * Return an Enumeration of all available network interfaces * * @exception SocketException If an error occurs */ public static Enumeration getNetworkInterfaces () throws SocketException { ! if (networkInterfaces == null) ! networkInterfaces = getRealNetworkInterfaces (); ! Enumeration tmp = networkInterfaces.elements (); ! if (tmp.hasMoreElements ()) ! return tmp; ! return null; } /** --- 187,205 ---- } /** ! * Return an Enumeration of all available network interfaces * * @exception SocketException If an error occurs */ public static Enumeration getNetworkInterfaces () throws SocketException { ! Vector networkInterfaces = getRealNetworkInterfaces(); ! if (networkInterfaces.isEmpty()) ! return null; ! return networkInterfaces.elements(); } /** *************** public final class NetworkInterface *** 200,206 **** return false; NetworkInterface tmp = (NetworkInterface) obj; ! return (name.equals (tmp.name) && inetAddresses.equals (tmp.inetAddresses)); } --- 213,219 ---- return false; NetworkInterface tmp = (NetworkInterface) obj; ! return (name.equals (tmp.name) && inetAddresses.equals (tmp.inetAddresses)); } *************** public final class NetworkInterface *** 230,236 **** e.hasMoreElements (); ) { InetAddress address = (InetAddress) e.nextElement (); ! result += address.toString () + separator; } return result; --- 243,249 ---- e.hasMoreElements (); ) { InetAddress address = (InetAddress) e.nextElement (); ! result += address.toString () + ";" + separator; } return result; diff -Nrc3pad gcc-3.3.3/libjava/java/net/PasswordAuthentication.java gcc-3.4.0/libjava/java/net/PasswordAuthentication.java *** gcc-3.3.3/libjava/java/net/PasswordAuthentication.java 2002-08-27 17:47:27.000000000 +0000 --- gcc-3.4.0/libjava/java/net/PasswordAuthentication.java 2003-05-26 12:58:02.000000000 +0000 *************** *** 1,5 **** /* PasswordAuthentication.java -- Container class for username/password pairs ! Copyright (C) 1998,2000 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* PasswordAuthentication.java -- Container class for username/password pairs ! Copyright (C) 1998, 2000, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** package java.net; *** 45,116 **** */ public final class PasswordAuthentication { ! /*************************************************************************/ ! ! /* ! * Instance Variables ! */ ! ! /** ! * The username ! */ ! private String username; ! ! /** ! * The password ! */ ! private char[] password; ! /*************************************************************************/ ! /* ! * Constructors ! */ ! /** ! * Creates a new PasswordAuthentication object from the specified username ! * and password. ! * ! * @param username The username for this object ! * @param password The password for this object ! */ ! public ! PasswordAuthentication(String username, char[] password) ! { ! this.username = username; ! this.password = password; ! } ! /*************************************************************************/ ! /* ! * Instance Methods ! */ ! /** ! * Returns the username associated with this object ! * ! * @return The username ! */ ! public String ! getUserName() ! { ! return(username); ! } ! ! /*************************************************************************/ ! /** ! * Returns the password associated with this object ! * ! * @return The password ! */ ! public char[] ! getPassword() ! { ! return(password); ! } } // class PasswordAuthentication --- 45,108 ---- */ public final class PasswordAuthentication { + /* + * Instance Variables + */ ! /** ! * The username ! */ ! private String username; ! /** ! * The password ! */ ! private char[] password; ! /*************************************************************************/ ! /* ! * Constructors ! */ ! /** ! * Creates a new PasswordAuthentication object from the ! * specified username and password. ! * ! * @param username The username for this object ! * @param password The password for this object ! */ ! public PasswordAuthentication(String username, char[] password) ! { ! this.username = username; ! this.password = password; ! } ! /*************************************************************************/ ! /* ! * Instance Methods ! */ ! /** ! * Returns the username associated with this object ! * ! * @return The username ! */ ! public String getUserName() ! { ! return(username); ! } ! ! /** ! * Returns the password associated with this object ! * ! * @return The password ! */ ! public char[] getPassword() ! { ! return(password); ! } } // class PasswordAuthentication diff -Nrc3pad gcc-3.3.3/libjava/java/net/PlainDatagramSocketImpl.java gcc-3.4.0/libjava/java/net/PlainDatagramSocketImpl.java *** gcc-3.3.3/libjava/java/net/PlainDatagramSocketImpl.java 2002-09-25 05:05:06.000000000 +0000 --- gcc-3.4.0/libjava/java/net/PlainDatagramSocketImpl.java 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,125 **** - // PlainDatagramSocketImpl.java - Implementation of DatagramSocketImpl. - - /* Copyright (C) 1999, 2002 Free Software Foundation - - This file is part of libgcj. - - This software is copyrighted work licensed under the terms of the - Libgcj License. Please consult the file "LIBGCJ_LICENSE" for - details. */ - - package java.net; - import java.io.IOException; - - /** - * @author Warren Levy - * @date May 3, 1999. - */ - - /** - * Written using on-line Java Platform 1.2 API Specification, as well - * as "The Java Class Libraries", 2nd edition (Addison-Wesley, 1998). - * Status: Believed complete and correct. - */ - - class PlainDatagramSocketImpl extends DatagramSocketImpl - { - // These fields are mirrored for use in native code to avoid cpp conflicts - // when the #defines in system header files are the same as the public fields. - static final int _Jv_TCP_NODELAY_ = SocketOptions.TCP_NODELAY, - _Jv_SO_BINDADDR_ = SocketOptions.SO_BINDADDR, - _Jv_SO_REUSEADDR_ = SocketOptions.SO_REUSEADDR, - _Jv_SO_BROADCAST_ = SocketOptions.SO_BROADCAST, - _Jv_SO_OOBINLINE_ = SocketOptions.SO_OOBINLINE, - _Jv_IP_MULTICAST_IF_ = SocketOptions.IP_MULTICAST_IF, - _Jv_IP_MULTICAST_IF2_ = SocketOptions.IP_MULTICAST_IF2, - _Jv_IP_MULTICAST_LOOP_ = SocketOptions.IP_MULTICAST_LOOP, - _Jv_IP_TOS_ = SocketOptions.IP_TOS, - _Jv_SO_LINGER_ = SocketOptions.SO_LINGER, - _Jv_SO_TIMEOUT_ = SocketOptions.SO_TIMEOUT, - _Jv_SO_SNDBUF_ = SocketOptions.SO_SNDBUF, - _Jv_SO_RCVBUF_ = SocketOptions.SO_RCVBUF, - _Jv_SO_KEEPALIVE_ = SocketOptions.SO_KEEPALIVE; - - int fnum = -1; - - // FIXME: Is this necessary? Could it help w/ DatagramSocket.getLocalAddress? - // InetAddress address; - - // localAddress cache - InetAddress localAddress; - - // 'timeout' is set/read by setOption/getOption. - int timeout = 0; - - // FIXME: Probably should have bind (and create?) calls from DatagramSocket - // constuctor. If so, then same change should be made to the corresponding - // Socket (non-datagram) classes. This allows the implementation more - // complete control over how the socket is set up and used (e.g. connect, - // setting options, etc.). - public PlainDatagramSocketImpl() - { - } - - protected native void bind(int lport, InetAddress laddr) - throws SocketException; - protected native void connect (InetAddress i, int port) - throws SocketException; - protected native void disconnect (); - protected native void create() throws SocketException; - protected native int peek(InetAddress i) throws IOException; - protected native int peekData (DatagramPacket dp) throws IOException; - protected native void setTimeToLive(int ttl) throws IOException; - protected native int getTimeToLive() throws IOException; - protected native void send(DatagramPacket p) throws IOException; - protected native void receive(DatagramPacket p) throws IOException; - public native void setOption(int optID, Object value) throws SocketException; - public native Object getOption(int optID) throws SocketException; - private native void mcastGrp(InetAddress inetaddr, NetworkInterface netIf, - boolean join) throws IOException; - protected native void close(); - - // Deprecated in JDK 1.2. - protected byte getTTL() throws IOException - { - return (byte) getTimeToLive(); - } - - // Deprecated in JDK 1.2. - protected void setTTL(byte ttl) throws IOException - { - setTimeToLive(((int) ttl) & 0xFF); - } - - protected void join(InetAddress inetaddr) throws IOException - { - mcastGrp(inetaddr, null, true); - } - - protected void leave(InetAddress inetaddr) throws IOException - { - mcastGrp(inetaddr, null, false); - } - - protected void joinGroup (SocketAddress mcastaddr, NetworkInterface netIf) - throws IOException - { - mcastGrp(((InetSocketAddress)mcastaddr).getAddress(), netIf, true); - } - - protected void leaveGroup (SocketAddress mcastaddr, NetworkInterface netIf) - throws IOException - { - mcastGrp(((InetSocketAddress)mcastaddr).getAddress(), netIf, false); - } - - protected void finalize() throws Throwable - { - synchronized (this) - { - if (fnum != -1) - close(); - } - super.finalize(); - } - } --- 0 ---- diff -Nrc3pad gcc-3.3.3/libjava/java/net/PlainSocketImpl.java gcc-3.4.0/libjava/java/net/PlainSocketImpl.java *** gcc-3.3.3/libjava/java/net/PlainSocketImpl.java 2002-11-18 14:55:54.000000000 +0000 --- gcc-3.4.0/libjava/java/net/PlainSocketImpl.java 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,229 **** - // PlainSocketImpl.java - Implementation of SocketImpl. - - /* Copyright (C) 1999 , 2002 Free Software Foundation - - This file is part of libgcj. - - This software is copyrighted work licensed under the terms of the - Libgcj License. Please consult the file "LIBGCJ_LICENSE" for - details. */ - - package java.net; - - import java.io.InputStream; - import java.io.IOException; - import java.io.OutputStream; - - /** - * The standard GCJ socket implementation. - * Written using on-line Java Platform 1.2 API Specification, as well - * as "The Java Class Libraries", 2nd edition (Addison-Wesley, 1998). - * Status: Believed complete and correct. - * - * @author Per Bothner - * @author Nic Ferrier - */ - class PlainSocketImpl extends SocketImpl - { - // These fields are mirrored for use in native code to avoid cpp conflicts - // when the #defines in system header files are the same as the public fields. - static final int _Jv_TCP_NODELAY_ = SocketOptions.TCP_NODELAY, - _Jv_SO_BINDADDR_ = SocketOptions.SO_BINDADDR, - _Jv_SO_REUSEADDR_ = SocketOptions.SO_REUSEADDR, - _Jv_SO_BROADCAST_ = SocketOptions.SO_BROADCAST, - _Jv_SO_OOBINLINE_ = SocketOptions.SO_OOBINLINE, - _Jv_IP_MULTICAST_IF_ = SocketOptions.IP_MULTICAST_IF, - _Jv_IP_MULTICAST_IF2_ = SocketOptions.IP_MULTICAST_IF2, - _Jv_IP_MULTICAST_LOOP_ = SocketOptions.IP_MULTICAST_LOOP, - _Jv_IP_TOS_ = SocketOptions.IP_TOS, - _Jv_SO_LINGER_ = SocketOptions.SO_LINGER, - _Jv_SO_TIMEOUT_ = SocketOptions.SO_TIMEOUT, - _Jv_SO_SNDBUF_ = SocketOptions.SO_SNDBUF, - _Jv_SO_RCVBUF_ = SocketOptions.SO_RCVBUF, - _Jv_SO_KEEPALIVE_ = SocketOptions.SO_KEEPALIVE; - - /** - * The OS file handle representing the socket. - * This is used for reads and writes to/from the socket and - * to close it. - * - * When the socket is closed this is reset to -1. - */ - int fnum = -1; - - // This value is set/read by setOption/getOption. - int timeout = 0; - - // localAddress cache - InetAddress localAddress; - - public native void setOption(int optID, Object value) throws SocketException; - - public native Object getOption(int optID) throws SocketException; - - public native void shutdownInput () throws IOException; - - public native void shutdownOutput () throws IOException; - - protected native void create (boolean stream) throws IOException; - - protected void connect (String host, int port) throws IOException - { - connect (new InetSocketAddress (InetAddress.getByName(host), port), 0); - } - - protected void connect (InetAddress host, int port) throws IOException - { - connect (new InetSocketAddress (host, port), 0); - } - - protected native void connect (SocketAddress addr, int timeout) - throws IOException; - - protected native void bind (InetAddress host, int port) throws IOException; - - protected native void listen (int backlog) throws IOException; - - private native void accept (PlainSocketImpl s) throws IOException; - - protected void accept (SocketImpl s) throws IOException - { - accept((PlainSocketImpl) s); - } - - protected native int available() throws IOException; - - protected native void close () throws IOException; - - protected native void sendUrgentData(int data) - throws IOException; - - // Stream handling. - - /** A cached copy of the in stream for reading from the socket. */ - private InputStream in; - - /** A cached copy of the out stream for writing to the socket. */ - private OutputStream out; - - - // The native read methods. - - private native int read() throws IOException; - - private native int read(byte[] buffer, int offset, int count) - throws IOException; - - - // The native write methods. - - private native void write(int c) throws IOException; - - private native void write(byte[] buffer, int offset, int count) - throws IOException; - - protected void finalize() throws Throwable - { - synchronized (this) - { - if (fnum != -1) - try - { - close(); - } - catch (IOException ex) - { - // ignore - } - } - super.finalize(); - } - - /** @return the input stream attached to the socket. - */ - protected InputStream getInputStream() throws IOException - { - if (in == null) - in = new SocketInputStream(); - return in; - } - - /** @return the output stream attached to the socket. - */ - protected OutputStream getOutputStream() throws IOException - { - if (out == null) - out = new SocketOutputStream(); - return out; - } - - /** - * A stream which reads from the socket implementation. - * - * @author Nic Ferrier - */ - class SocketInputStream - extends InputStream - { - SocketInputStream() - { - } - - public final void close() throws IOException - { - PlainSocketImpl.this.close(); - } - - public final int available() throws IOException - { - return PlainSocketImpl.this.available(); - } - - public final int read() throws IOException - { - return PlainSocketImpl.this.read(); - } - - public final int read(byte[] buffer, int offset, int length) - throws IOException - { - return PlainSocketImpl.this.read(buffer, offset, length); - } - - public final int read(byte[] buffer) - throws IOException - { - return PlainSocketImpl.this.read(buffer, 0, buffer.length); - } - } - - /** A stream which writes to the socket implementation. - * - * @author Nic Ferrier - */ - class SocketOutputStream - extends OutputStream - { - public final void close() throws IOException - { - PlainSocketImpl.this.close(); - } - - public final void write(int c) throws IOException - { - PlainSocketImpl.this.write(c); - } - - public final void write(byte[] buffer, int offset, int length) - throws IOException - { - PlainSocketImpl.this.write(buffer, offset, length); - } - - public final void write(byte[] buffer) - throws IOException - { - PlainSocketImpl.this.write(buffer, 0, buffer.length); - } - } - } --- 0 ---- diff -Nrc3pad gcc-3.3.3/libjava/java/net/ServerSocket.java gcc-3.4.0/libjava/java/net/ServerSocket.java *** gcc-3.3.3/libjava/java/net/ServerSocket.java 2003-02-12 22:44:38.000000000 +0000 --- gcc-3.4.0/libjava/java/net/ServerSocket.java 2004-02-03 14:50:59.000000000 +0000 *************** *** 1,5 **** /* ServerSocket.java -- Class for implementing server side sockets ! Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ServerSocket.java -- Class for implementing server side sockets ! Copyright (C) 1998, 1999, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,42 **** --- 35,44 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package java.net; + import gnu.java.net.PlainSocketImpl; import java.io.IOException; import java.nio.channels.IllegalBlockingModeException; import java.nio.channels.ServerSocketChannel; *************** public class ServerSocket *** 72,83 **** private SocketImpl impl; /** ! * ServerSocketChannel of this ServerSocket. This channel only exists ! * when the socket is created by ServerSocketChannel.open(). */ ! private ServerSocketChannel ch; ! private boolean closed = false; /** * Constructor that simply sets the implementation. --- 74,106 ---- private SocketImpl impl; /** ! * True if socket is bound. */ ! private boolean bound; ! ! /* ! * This constructor is only used by java.nio. ! */ ! // FIXME: Workaround a bug in gcj. ! //ServerSocket (PlainSocketImpl impl) throws IOException ! ServerSocket (SocketImpl impl) throws IOException ! { ! if (impl == null) ! throw new NullPointerException("impl may not be null"); ! this.impl = impl; ! this.impl.create (true); ! } ! ! /* ! * This method is only used by java.nio. ! */ ! // FIXME: Workaround a bug in gcj. ! //PlainSocketImpl getImpl() ! SocketImpl getImpl() ! { ! return impl; ! } /** * Constructor that simply sets the implementation. *************** public class ServerSocket *** 154,172 **** { this(); ! if (impl == null) ! throw new IOException("Cannot initialize Socket implementation"); ! ! SecurityManager s = System.getSecurityManager(); ! if (s != null) ! s.checkListen(port); ! ! if (bindAddr == null) ! bindAddr = InetAddress.ANY_IF; ! ! impl.create(true); ! impl.bind(bindAddr, port); ! impl.listen(backlog); } /** --- 177,184 ---- { this(); ! // bind/listen socket ! bind (new InetSocketAddress (bindAddr, port), backlog); } /** *************** public class ServerSocket *** 202,224 **** */ public void bind (SocketAddress endpoint, int backlog) throws IOException { ! if (closed) ! throw new SocketException ("ServerSocket is closed"); - if (impl == null) - throw new IOException ("Cannot initialize Socket implementation"); - if (! (endpoint instanceof InetSocketAddress)) throw new IllegalArgumentException ("Address type not supported"); InetSocketAddress tmp = (InetSocketAddress) endpoint; ! SecurityManager s = System.getSecurityManager (); if (s != null) s.checkListen (tmp.getPort ()); ! impl.bind (tmp.getAddress (), tmp.getPort ()); ! impl.listen(backlog); } /** --- 214,258 ---- */ public void bind (SocketAddress endpoint, int backlog) throws IOException { ! if (isClosed()) ! throw new SocketException("ServerSocket is closed"); if (! (endpoint instanceof InetSocketAddress)) throw new IllegalArgumentException ("Address type not supported"); InetSocketAddress tmp = (InetSocketAddress) endpoint; ! SecurityManager s = System.getSecurityManager (); if (s != null) s.checkListen (tmp.getPort ()); ! InetAddress addr = tmp.getAddress(); ! ! // Initialize addr with 0.0.0.0. ! if (addr == null) ! addr = InetAddress.ANY_IF; ! ! try ! { ! impl.bind(addr, tmp.getPort()); ! impl.listen(backlog); ! bound = true; ! } ! catch (IOException exception) ! { ! close(); ! throw exception; ! } ! catch (RuntimeException exception) ! { ! close(); ! throw exception; ! } ! catch (Error error) ! { ! close(); ! throw error; ! } } /** *************** public class ServerSocket *** 228,239 **** --- 262,277 ---- */ public InetAddress getInetAddress() { + if (!isBound()) + return null; + try { return (InetAddress) impl.getOption (SocketOptions.SO_BINDADDR); } catch (SocketException e) { + // This never happens as we are bound. return null; } } *************** public class ServerSocket *** 245,250 **** --- 283,291 ---- */ public int getLocalPort() { + if (!isBound()) + return -1; + return impl.getLocalPort(); } *************** public class ServerSocket *** 255,266 **** */ public SocketAddress getLocalSocketAddress() { ! InetAddress addr = getInetAddress(); ! ! if (addr != null) ! return new InetSocketAddress (getInetAddress(), getLocalPort()); ! ! return null; } /** --- 296,305 ---- */ public SocketAddress getLocalSocketAddress() { ! if (!isBound()) ! return null; ! ! return new InetSocketAddress(getInetAddress(), getLocalPort()); } /** *************** public class ServerSocket *** 278,294 **** */ public Socket accept () throws IOException { - if (impl == null) - throw new IOException ("Cannot initialize Socket implementation"); - SecurityManager sm = System.getSecurityManager (); if (sm != null) sm.checkListen (impl.getLocalPort ()); ! Socket s = new Socket(); ! implAccept (s); ! ! return s; } /** --- 317,329 ---- */ public Socket accept () throws IOException { SecurityManager sm = System.getSecurityManager (); if (sm != null) sm.checkListen (impl.getLocalPort ()); ! Socket socket = new Socket(); ! implAccept (socket); ! return socket; } /** *************** public class ServerSocket *** 304,316 **** * * @since 1.1 */ ! protected final void implAccept (Socket s) throws IOException { ! if (ch != null && !ch.isBlocking()) ! throw new IllegalBlockingModeException(); ! impl.accept(s.impl); } /** --- 339,360 ---- * * @since 1.1 */ ! protected final void implAccept (Socket socket) throws IOException { ! if (isClosed()) ! throw new SocketException("ServerSocket is closed"); ! ! // The Sun spec says that if we have an associated channel and ! // it is in non-blocking mode, we throw an IllegalBlockingModeException. ! // However, in our implementation if the channel itself initiated this ! // operation, then we must honor it regardless of its blocking mode. ! if (getChannel() != null ! && !getChannel().isBlocking () ! && !((PlainSocketImpl) getImpl()).isInChannelOperation()) ! throw new IllegalBlockingModeException (); ! impl.accept(socket.getImpl()); } /** *************** public class ServerSocket *** 320,332 **** */ public void close () throws IOException { ! if (impl != null) ! impl.close (); ! ! if (ch != null) ! ch.close (); ! closed = true; } /** --- 364,378 ---- */ public void close () throws IOException { ! if (isClosed()) ! return; ! impl.close(); ! impl = null; ! bound = false; ! ! if (getChannel() != null) ! getChannel().close(); } /** *************** public class ServerSocket *** 340,365 **** */ public ServerSocketChannel getChannel() { ! return ch; } /** ! * Returns true then the socket is bound, otherwise false * * @since 1.4 */ public boolean isBound() { ! try ! { ! Object bindaddr = impl.getOption (SocketOptions.SO_BINDADDR); ! } ! catch (SocketException e) ! { ! return false; ! } ! ! return true; } /** --- 386,402 ---- */ public ServerSocketChannel getChannel() { ! return null; } /** ! * Returns true when the socket is bound, otherwise false * * @since 1.4 */ public boolean isBound() { ! return bound; } /** *************** public class ServerSocket *** 369,375 **** */ public boolean isClosed() { ! return closed; } /** --- 406,412 ---- */ public boolean isClosed() { ! return impl == null; } /** *************** public class ServerSocket *** 386,391 **** --- 423,431 ---- */ public void setSoTimeout (int timeout) throws SocketException { + if (isClosed()) + throw new SocketException("ServerSocket is closed"); + if (timeout < 0) throw new IllegalArgumentException("SO_TIMEOUT value must be >= 0"); *************** public class ServerSocket *** 406,411 **** --- 446,454 ---- */ public int getSoTimeout () throws IOException { + if (isClosed()) + throw new SocketException("ServerSocket is closed"); + Object timeout = impl.getOption(SocketOptions.SO_TIMEOUT); if (!(timeout instanceof Integer)) *************** public class ServerSocket *** 424,432 **** public void setReuseAddress (boolean on) throws SocketException { ! if (impl == null) ! throw new SocketException ("Cannot initialize Socket implementation"); ! impl.setOption (SocketOptions.SO_REUSEADDR, new Boolean (on)); } --- 467,475 ---- public void setReuseAddress (boolean on) throws SocketException { ! if (isClosed()) ! throw new SocketException("ServerSocket is closed"); ! impl.setOption (SocketOptions.SO_REUSEADDR, new Boolean (on)); } *************** public class ServerSocket *** 440,448 **** public boolean getReuseAddress() throws SocketException { ! if (impl == null) ! throw new SocketException ("Cannot initialize Socket implementation"); ! Object reuseaddr = impl.getOption (SocketOptions.SO_REUSEADDR); if (!(reuseaddr instanceof Boolean)) --- 483,491 ---- public boolean getReuseAddress() throws SocketException { ! if (isClosed()) ! throw new SocketException("ServerSocket is closed"); ! Object reuseaddr = impl.getOption (SocketOptions.SO_REUSEADDR); if (!(reuseaddr instanceof Boolean)) *************** public class ServerSocket *** 466,474 **** public void setReceiveBufferSize (int size) throws SocketException { ! if (impl == null) ! throw new SocketException ("Not connected"); ! if (size <= 0) throw new IllegalArgumentException ("SO_RCVBUF value must be > 0"); --- 509,517 ---- public void setReceiveBufferSize (int size) throws SocketException { ! if (isClosed()) ! throw new SocketException("ServerSocket is closed"); ! if (size <= 0) throw new IllegalArgumentException ("SO_RCVBUF value must be > 0"); *************** public class ServerSocket *** 489,497 **** public int getReceiveBufferSize () throws SocketException { ! if (impl == null) ! throw new SocketException ("Not connected"); ! Object buf = impl.getOption (SocketOptions.SO_RCVBUF); if (!(buf instanceof Integer)) --- 532,540 ---- public int getReceiveBufferSize () throws SocketException { ! if (isClosed()) ! throw new SocketException("ServerSocket is closed"); ! Object buf = impl.getOption (SocketOptions.SO_RCVBUF); if (!(buf instanceof Integer)) *************** public class ServerSocket *** 507,517 **** */ public String toString () { ! return "ServerSocket" + impl.toString(); } - // Class methods - /** * Sets the SocketImplFactory for all * ServerSocket's. This may only be done --- 550,564 ---- */ public String toString () { ! if (!isBound()) ! return "ServerSocket[unbound]"; ! ! return ("ServerSocket[addr=" + getInetAddress() ! + ",port=" + impl.getPort() ! + ",localport=" + impl.getLocalPort() ! + "]"); } /** * Sets the SocketImplFactory for all * ServerSocket's. This may only be done diff -Nrc3pad gcc-3.3.3/libjava/java/net/SocketImplFactory.java gcc-3.4.0/libjava/java/net/SocketImplFactory.java *** gcc-3.3.3/libjava/java/net/SocketImplFactory.java 2002-01-22 22:40:23.000000000 +0000 --- gcc-3.4.0/libjava/java/net/SocketImplFactory.java 2003-10-11 18:39:35.000000000 +0000 *************** *** 1,5 **** /* SocketImplFactory.java -- Interface to create a SocketImpl object ! Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* SocketImplFactory.java -- Interface to create a SocketImpl object ! Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** package java.net; *** 43,63 **** */ /** ! * This interface defines one method which returns a SocketImpl object. ! * This should not be needed by ordinary applications. * * @author Aaron M. Renn (arenn@urbanophile.com) * @author Per Bothner */ public interface SocketImplFactory { ! /** ! * This method returns an instance of the SocketImpl object ! * ! * @return A SocketImpl object ! */ ! SocketImpl ! createSocketImpl(); } // interface SocketImplFactory --- 43,62 ---- */ /** ! * This interface defines one method which returns a SocketImpl ! * object. This should not be needed by ordinary applications. * * @author Aaron M. Renn (arenn@urbanophile.com) * @author Per Bothner */ public interface SocketImplFactory { ! /** ! * This method returns an instance of the SocketImpl object ! * ! * @return A SocketImpl object ! */ ! SocketImpl createSocketImpl(); } // interface SocketImplFactory diff -Nrc3pad gcc-3.3.3/libjava/java/net/SocketImpl.java gcc-3.4.0/libjava/java/net/SocketImpl.java *** gcc-3.3.3/libjava/java/net/SocketImpl.java 2003-02-12 22:44:38.000000000 +0000 --- gcc-3.4.0/libjava/java/net/SocketImpl.java 2003-08-01 21:08:33.000000000 +0000 *************** *** 1,5 **** /* SocketImpl.java -- Abstract socket implementation class ! Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,6 ---- /* SocketImpl.java -- Abstract socket implementation class ! Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ! Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,43 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.net; ! import java.io.*; /* Written using on-line Java Platform 1.2 API Specification. * Believed complete and correct. --- 36,48 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package java.net; ! import java.io.FileDescriptor; ! import java.io.InputStream; ! import java.io.IOException; ! import java.io.OutputStream; /* Written using on-line Java Platform 1.2 API Specification. * Believed complete and correct. *************** public abstract class SocketImpl impleme *** 271,320 **** */ public String toString() { ! return "[addr=" + address + ",port=" + port + ",localport=" + localport + "]"; } /** - * Sets the specified option on a socket to the passed in object. For - * options that take an integer argument, the passed in object is an - * Integer. For options that are set to on or off, the - * value passed will be a Boolean. The option_id - * parameter is one of the defined constants in the superinterface. - * - * @param option_id The identifier of the option - * @param val The value to set the option to - * - * @exception SocketException If an error occurs - * @XXX This redeclaration from SocketOptions is a workaround to a gcj bug. - */ - public abstract void setOption(int option_id, Object val) - throws SocketException; - - /** - * Returns the current setting of the specified option. The - * Object returned will be an Integer for options - * that have integer values. For options that are set to on or off, a - * Boolean will be returned. The option_id - * is one of the defined constants in the superinterface. - * - * @param option_id The option identifier - * - * @return The current value of the option - * - * @exception SocketException If an error occurs - * @XXX This redeclaration from SocketOptions is a workaround to a gcj bug. - */ - public abstract Object getOption(int option_id) throws SocketException; - - /** * Shut down the input side of this socket. Subsequent reads will * return end-of-file. * * @exception IOException if an error occurs */ ! protected abstract void shutdownInput () throws IOException; /** * Shut down the output side of this socket. Subsequent writes will --- 276,297 ---- */ public String toString() { ! return "[addr=" + ((address == null) ? "0.0.0.0/0.0.0.0" : ! address.toString()) + ",port=" + port + ",localport=" + localport + "]"; } /** * Shut down the input side of this socket. Subsequent reads will * return end-of-file. * * @exception IOException if an error occurs */ ! protected void shutdownInput () throws IOException ! { ! throw new IOException ("Not implemented in this socket class"); ! } /** * Shut down the output side of this socket. Subsequent writes will *************** public abstract class SocketImpl impleme *** 322,326 **** * * @exception IOException if an error occurs */ ! protected abstract void shutdownOutput () throws IOException; } --- 299,306 ---- * * @exception IOException if an error occurs */ ! protected void shutdownOutput () throws IOException ! { ! throw new IOException ("Not implemented in this socket class"); ! } } diff -Nrc3pad gcc-3.3.3/libjava/java/net/Socket.java gcc-3.4.0/libjava/java/net/Socket.java *** gcc-3.3.3/libjava/java/net/Socket.java 2003-02-12 22:44:38.000000000 +0000 --- gcc-3.4.0/libjava/java/net/Socket.java 2004-02-03 14:50:59.000000000 +0000 *************** *** 1,5 **** /* Socket.java -- Client socket implementation ! Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Socket.java -- Client socket implementation ! Copyright (C) 1998, 1999, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,43 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.net; ! import java.io.*; import java.nio.channels.SocketChannel; import java.nio.channels.IllegalBlockingModeException; --- 35,47 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package java.net; ! import gnu.java.net.PlainSocketImpl; ! import java.io.InputStream; ! import java.io.IOException; ! import java.io.OutputStream; import java.nio.channels.SocketChannel; import java.nio.channels.IllegalBlockingModeException; *************** import java.nio.channels.IllegalBlocking *** 64,93 **** */ public class Socket { - - // Class Variables - /** * This is the user SocketImplFactory for this class. If this variable is * null, a default factory is used. */ static SocketImplFactory factory; - // Instance Variables - /** * The implementation object to which calls are redirected */ ! SocketImpl impl; ! private boolean inputShutdown; ! private boolean outputShutdown; ! SocketChannel ch; // this field must have been set if created by SocketChannel ! private boolean closed = false; ! // Constructors /** * Initializes a new instance of Socket object without --- 68,103 ---- */ public class Socket { /** * This is the user SocketImplFactory for this class. If this variable is * null, a default factory is used. */ static SocketImplFactory factory; /** * The implementation object to which calls are redirected */ ! private SocketImpl impl; ! /** ! * True if socket implementation was created by calling their create() method. ! */ ! private boolean implCreated; ! /** ! * True if the socket is bound. ! */ ! private boolean bound; ! /** ! * True if input is shutdown. ! */ ! private boolean inputShutdown; ! /** ! * True if output is shutdown. ! */ ! private boolean outputShutdown; /** * Initializes a new instance of Socket object without *************** public class Socket *** 103,111 **** impl = factory.createSocketImpl(); else impl = new PlainSocketImpl(); - - inputShutdown = false; - outputShutdown = false; } /** --- 113,118 ---- *************** public class Socket *** 115,123 **** *

            * Additionally, this socket will be created using the supplied * implementation class instead the default class or one returned by a ! * factory. This value can be null, but if it is, all instance ! * methods in Socket should be overridden because most of them ! * rely on this value being populated. * * @param impl The SocketImpl to use for this * Socket --- 122,129 ---- *

            * Additionally, this socket will be created using the supplied * implementation class instead the default class or one returned by a ! * factory. If this value is null, the default Socket ! * implementation is used. * * @param impl The SocketImpl to use for this * Socket *************** public class Socket *** 128,136 **** */ protected Socket (SocketImpl impl) throws SocketException { ! this.impl = impl; ! this.inputShutdown = false; ! this.outputShutdown = false; } /** --- 134,143 ---- */ protected Socket (SocketImpl impl) throws SocketException { ! if (impl == null) ! this.impl = new PlainSocketImpl(); ! else ! this.impl = impl; } /** *************** public class Socket *** 176,182 **** * * @param host The name of the remote host to connect to. * @param port The remote port to connect to. ! * @param loadAddr The local address to bind to. * @param localPort The local port to bind to. * * @exception SecurityException If the SecurityManager --- 183,189 ---- * * @param host The name of the remote host to connect to. * @param port The remote port to connect to. ! * @param localAddr The local address to bind to. * @param localPort The local port to bind to. * * @exception SecurityException If the SecurityManager *************** public class Socket *** 281,306 **** boolean stream) throws IOException { this(); - this.inputShutdown = false; - this.outputShutdown = false; - - if (impl == null) - throw new IOException("Cannot initialize Socket implementation"); SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkConnect(raddr.getHostName(), rport); ! impl.create(stream); // FIXME: JCL p. 1586 says if localPort is unspecified, bind to any port, // i.e. '0' and if localAddr is unspecified, use getLocalAddress() as // that default. JDK 1.2 doc infers not to do a bind. ! if (laddr != null) ! impl.bind(laddr, lport); ! if (raddr != null) ! impl.connect(raddr, rport); } /** --- 288,329 ---- boolean stream) throws IOException { this(); SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkConnect(raddr.getHostName(), rport); ! // bind socket ! SocketAddress bindaddr = ! laddr == null ? null : new InetSocketAddress (laddr, lport); ! bind (bindaddr); ! ! // connect socket ! connect (new InetSocketAddress (raddr, rport)); // FIXME: JCL p. 1586 says if localPort is unspecified, bind to any port, // i.e. '0' and if localAddr is unspecified, use getLocalAddress() as // that default. JDK 1.2 doc infers not to do a bind. ! } ! // This has to be accessible from java.net.ServerSocket. ! SocketImpl getImpl() ! throws SocketException ! { ! try ! { ! if (!implCreated) ! { ! impl.create(true); ! implCreated = true; ! } ! } ! catch (IOException e) ! { ! throw new SocketException(e.getMessage()); ! } ! ! return impl; } /** *************** public class Socket *** 317,330 **** */ public void bind (SocketAddress bindpoint) throws IOException { ! if (closed) ! throw new SocketException ("Socket is closed"); if ( !(bindpoint instanceof InetSocketAddress)) throw new IllegalArgumentException (); InetSocketAddress tmp = (InetSocketAddress) bindpoint; ! impl.bind (tmp.getAddress(), tmp.getPort()); } /** --- 340,379 ---- */ public void bind (SocketAddress bindpoint) throws IOException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! ! // XXX: JDK 1.4.1 API documentation says that if bindpoint is null the ! // socket will be bound to an ephemeral port and a valid local address. ! if (bindpoint == null) ! bindpoint = new InetSocketAddress (InetAddress.ANY_IF, 0); if ( !(bindpoint instanceof InetSocketAddress)) throw new IllegalArgumentException (); InetSocketAddress tmp = (InetSocketAddress) bindpoint; ! ! // bind to address/port ! try ! { ! getImpl().bind (tmp.getAddress(), tmp.getPort()); ! bound = true; ! } ! catch (IOException exception) ! { ! close (); ! throw exception; ! } ! catch (RuntimeException exception) ! { ! close (); ! throw exception; ! } ! catch (Error error) ! { ! close (); ! throw error; ! } } /** *************** public class Socket *** 342,357 **** public void connect (SocketAddress endpoint) throws IOException { ! if (closed) ! throw new SocketException ("Socket is closed"); ! ! if (! (endpoint instanceof InetSocketAddress)) ! throw new IllegalArgumentException ("Address type not supported"); ! ! if (ch != null && !ch.isBlocking ()) ! throw new IllegalBlockingModeException (); ! ! impl.connect (endpoint, 0); } /** --- 391,397 ---- public void connect (SocketAddress endpoint) throws IOException { ! connect (endpoint, 0); } /** *************** public class Socket *** 360,365 **** --- 400,407 ---- * until established or an error occurs. * * @param endpoint The address to connect to + * @param timeout The length of the timeout in milliseconds, or + * 0 to indicate no timeout. * * @exception IOException If an error occurs * @exception IllegalArgumentException If the address type is not supported *************** public class Socket *** 372,387 **** public void connect (SocketAddress endpoint, int timeout) throws IOException { ! if (closed) ! throw new SocketException ("Socket is closed"); if (! (endpoint instanceof InetSocketAddress)) ! throw new IllegalArgumentException ("Address type not supported"); ! if (ch != null && !ch.isBlocking ()) throw new IllegalBlockingModeException (); ! ! impl.connect (endpoint, timeout); } /** --- 414,456 ---- public void connect (SocketAddress endpoint, int timeout) throws IOException { ! if (isClosed()) ! throw new SocketException("socket is closed"); if (! (endpoint instanceof InetSocketAddress)) ! throw new IllegalArgumentException("unsupported address type"); ! // The Sun spec says that if we have an associated channel and ! // it is in non-blocking mode, we throw an IllegalBlockingModeException. ! // However, in our implementation if the channel itself initiated this ! // operation, then we must honor it regardless of its blocking mode. ! if (getChannel() != null ! && !getChannel().isBlocking () ! && !((PlainSocketImpl) getImpl()).isInChannelOperation()) throw new IllegalBlockingModeException (); ! ! if (!isBound ()) ! bind (null); ! ! try ! { ! getImpl().connect (endpoint, timeout); ! } ! catch (IOException exception) ! { ! close (); ! throw exception; ! } ! catch (RuntimeException exception) ! { ! close (); ! throw exception; ! } ! catch (Error error) ! { ! close (); ! throw error; ! } } /** *************** public class Socket *** 392,399 **** */ public InetAddress getInetAddress () { ! if (impl != null) ! return impl.getInetAddress(); return null; } --- 461,477 ---- */ public InetAddress getInetAddress () { ! if (!isConnected()) ! return null; ! ! try ! { ! return getImpl().getInetAddress(); ! } ! catch (SocketException e) ! { ! // This cannot happen as we are connected. ! } return null; } *************** public class Socket *** 408,420 **** */ public InetAddress getLocalAddress () { - if (impl == null) - return null; - InetAddress addr = null; try { ! addr = (InetAddress)impl.getOption(SocketOptions.SO_BINDADDR); } catch(SocketException e) { --- 486,496 ---- */ public InetAddress getLocalAddress () { InetAddress addr = null; + try { ! addr = (InetAddress) getImpl().getOption(SocketOptions.SO_BINDADDR); } catch(SocketException e) { *************** public class Socket *** 444,451 **** */ public int getPort () { ! if (impl != null) ! return impl.getPort(); return -1; } --- 520,537 ---- */ public int getPort () { ! if (!isConnected()) ! return 0; ! ! try ! { ! if (getImpl() != null) ! return getImpl().getPort(); ! } ! catch (SocketException e) ! { ! // This cannot happen as we are connected. ! } return -1; } *************** public class Socket *** 458,465 **** */ public int getLocalPort () { ! if (impl != null) ! return impl.getLocalPort(); return -1; } --- 544,561 ---- */ public int getLocalPort () { ! if (!isBound()) ! return -1; ! ! try ! { ! if (getImpl() != null) ! return getImpl().getLocalPort(); ! } ! catch (SocketException e) ! { ! // This cannot happen as we are bound. ! } return -1; } *************** public class Socket *** 472,483 **** */ public SocketAddress getLocalSocketAddress() { ! InetAddress addr = getLocalAddress (); ! ! if (addr == null) return null; ! return new InetSocketAddress (addr, impl.getLocalPort()); } /** --- 568,587 ---- */ public SocketAddress getLocalSocketAddress() { ! if (!isBound()) return null; ! InetAddress addr = getLocalAddress (); ! ! try ! { ! return new InetSocketAddress (addr, getImpl().getLocalPort()); ! } ! catch (SocketException e) ! { ! // This cannot happen as we are bound. ! return null; ! } } /** *************** public class Socket *** 491,497 **** if (!isConnected ()) return null; ! return new InetSocketAddress (impl.getInetAddress (), impl.getPort ()); } /** --- 595,609 ---- if (!isConnected ()) return null; ! try ! { ! return new InetSocketAddress (getImpl().getInetAddress (), getImpl().getPort ()); ! } ! catch (SocketException e) ! { ! // This cannot happen as we are connected. ! return null; ! } } /** *************** public class Socket *** 503,512 **** */ public InputStream getInputStream () throws IOException { ! if (impl != null) ! return(impl.getInputStream()); ! ! throw new IOException("Not connected"); } /** --- 615,627 ---- */ public InputStream getInputStream () throws IOException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! ! if (!isConnected()) ! throw new IOException("not connected"); ! ! return getImpl().getInputStream(); } /** *************** public class Socket *** 518,527 **** */ public OutputStream getOutputStream () throws IOException { ! if (impl != null) ! return impl.getOutputStream(); ! ! throw new IOException("Not connected"); } /** --- 633,645 ---- */ public OutputStream getOutputStream () throws IOException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! ! if (!isConnected()) ! throw new IOException("not connected"); ! ! return getImpl().getOutputStream(); } /** *************** public class Socket *** 535,544 **** */ public void setTcpNoDelay (boolean on) throws SocketException { ! if (impl == null) ! throw new SocketException("Not connected"); ! ! impl.setOption(SocketOptions.TCP_NODELAY, new Boolean(on)); } /** --- 653,662 ---- */ public void setTcpNoDelay (boolean on) throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! ! getImpl().setOption(SocketOptions.TCP_NODELAY, new Boolean(on)); } /** *************** public class Socket *** 555,564 **** */ public boolean getTcpNoDelay() throws SocketException { ! if (impl == null) ! throw new SocketException("Not connected"); ! ! Object on = impl.getOption(SocketOptions.TCP_NODELAY); if (on instanceof Boolean) return(((Boolean)on).booleanValue()); --- 673,682 ---- */ public boolean getTcpNoDelay() throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! ! Object on = getImpl().getOption(SocketOptions.TCP_NODELAY); if (on instanceof Boolean) return(((Boolean)on).booleanValue()); *************** public class Socket *** 585,593 **** */ public void setSoLinger(boolean on, int linger) throws SocketException { ! if (impl == null) ! throw new SocketException("No socket created"); ! if (on == true) { if (linger < 0) --- 703,711 ---- */ public void setSoLinger(boolean on, int linger) throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! if (on == true) { if (linger < 0) *************** public class Socket *** 596,606 **** if (linger > 65535) linger = 65535; ! impl.setOption(SocketOptions.SO_LINGER, new Integer(linger)); } else { ! impl.setOption(SocketOptions.SO_LINGER, new Boolean(false)); } } --- 714,724 ---- if (linger > 65535) linger = 65535; ! getImpl().setOption(SocketOptions.SO_LINGER, new Integer(linger)); } else { ! getImpl().setOption(SocketOptions.SO_LINGER, new Boolean(false)); } } *************** public class Socket *** 622,631 **** */ public int getSoLinger() throws SocketException { ! if (impl == null) ! throw new SocketException("Not connected"); - Object linger = impl.getOption(SocketOptions.SO_LINGER); if (linger instanceof Integer) return(((Integer)linger).intValue()); else --- 740,750 ---- */ public int getSoLinger() throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! ! Object linger = getImpl().getOption(SocketOptions.SO_LINGER); if (linger instanceof Integer) return(((Integer)linger).intValue()); else *************** public class Socket *** 644,650 **** */ public void sendUrgentData (int data) throws IOException { ! impl.sendUrgentData (data); } /** --- 763,772 ---- */ public void sendUrgentData (int data) throws IOException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! ! getImpl().sendUrgentData (data); } /** *************** public class Socket *** 658,682 **** */ public void setOOBInline (boolean on) throws SocketException { ! if (impl == null) ! throw new SocketException("Not connected"); ! ! impl.setOption(SocketOptions.SO_OOBINLINE, new Boolean(on)); } /** * Returns the current setting of the SO_OOBINLINE option for this socket * * @exception SocketException If an error occurs * * @since 1.4 */ public boolean getOOBInline () throws SocketException { ! if (impl == null) ! throw new SocketException("Not connected"); ! ! Object buf = impl.getOption(SocketOptions.SO_OOBINLINE); if (buf instanceof Boolean) return(((Boolean)buf).booleanValue()); --- 780,806 ---- */ public void setOOBInline (boolean on) throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! ! getImpl().setOption(SocketOptions.SO_OOBINLINE, new Boolean(on)); } /** * Returns the current setting of the SO_OOBINLINE option for this socket * + * @return True if SO_OOBINLINE is set, false otherwise. + * * @exception SocketException If an error occurs * * @since 1.4 */ public boolean getOOBInline () throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! ! Object buf = getImpl().getOption(SocketOptions.SO_OOBINLINE); if (buf instanceof Boolean) return(((Boolean)buf).booleanValue()); *************** public class Socket *** 692,701 **** * this option implies that there is no timeout (ie, operations will * block forever). On systems that have separate read and write timeout * values, this method returns the read timeout. This ! * value is in thousandths of a second (****????*****) * ! * @param timeout The length of the timeout in thousandth's of a second or ! * 0 if not set * * @exception SocketException If an error occurs or Socket not connected * --- 816,825 ---- * this option implies that there is no timeout (ie, operations will * block forever). On systems that have separate read and write timeout * values, this method returns the read timeout. This ! * value is in milliseconds. * ! * @param timeout The length of the timeout in milliseconds, or ! * 0 to indicate no timeout. * * @exception SocketException If an error occurs or Socket not connected * *************** public class Socket *** 703,715 **** */ public synchronized void setSoTimeout (int timeout) throws SocketException { ! if (impl == null) ! throw new SocketException("Not connected"); if (timeout < 0) throw new IllegalArgumentException("SO_TIMEOUT value must be >= 0"); ! impl.setOption(SocketOptions.SO_TIMEOUT, new Integer(timeout)); } /** --- 827,839 ---- */ public synchronized void setSoTimeout (int timeout) throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); if (timeout < 0) throw new IllegalArgumentException("SO_TIMEOUT value must be >= 0"); ! getImpl().setOption(SocketOptions.SO_TIMEOUT, new Integer(timeout)); } /** *************** public class Socket *** 731,740 **** */ public synchronized int getSoTimeout () throws SocketException { ! if (impl == null) ! throw new SocketException("Not connected"); ! ! Object timeout = impl.getOption(SocketOptions.SO_TIMEOUT); if (timeout instanceof Integer) return(((Integer)timeout).intValue()); else --- 855,864 ---- */ public synchronized int getSoTimeout () throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! ! Object timeout = getImpl().getOption(SocketOptions.SO_TIMEOUT); if (timeout instanceof Integer) return(((Integer)timeout).intValue()); else *************** public class Socket *** 755,767 **** */ public void setSendBufferSize (int size) throws SocketException { ! if (impl == null) ! throw new SocketException("Not connected"); if (size <= 0) throw new IllegalArgumentException("SO_SNDBUF value must be > 0"); ! impl.setOption(SocketOptions.SO_SNDBUF, new Integer(size)); } /** --- 879,891 ---- */ public void setSendBufferSize (int size) throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); if (size <= 0) throw new IllegalArgumentException("SO_SNDBUF value must be > 0"); ! getImpl().setOption(SocketOptions.SO_SNDBUF, new Integer(size)); } /** *************** public class Socket *** 777,786 **** */ public int getSendBufferSize () throws SocketException { ! if (impl == null) ! throw new SocketException("Not connected"); ! ! Object buf = impl.getOption(SocketOptions.SO_SNDBUF); if (buf instanceof Integer) return(((Integer)buf).intValue()); --- 901,910 ---- */ public int getSendBufferSize () throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! ! Object buf = getImpl().getOption(SocketOptions.SO_SNDBUF); if (buf instanceof Integer) return(((Integer)buf).intValue()); *************** public class Socket *** 802,814 **** */ public void setReceiveBufferSize (int size) throws SocketException { ! if (impl == null) ! throw new SocketException("Not connected"); ! if (size <= 0) throw new IllegalArgumentException("SO_RCVBUF value must be > 0"); ! impl.setOption(SocketOptions.SO_RCVBUF, new Integer(size)); } /** --- 926,938 ---- */ public void setReceiveBufferSize (int size) throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! if (size <= 0) throw new IllegalArgumentException("SO_RCVBUF value must be > 0"); ! getImpl().setOption(SocketOptions.SO_RCVBUF, new Integer(size)); } /** *************** public class Socket *** 824,833 **** */ public int getReceiveBufferSize () throws SocketException { ! if (impl == null) ! throw new SocketException("Not connected"); ! ! Object buf = impl.getOption(SocketOptions.SO_RCVBUF); if (buf instanceof Integer) return(((Integer)buf).intValue()); --- 948,957 ---- */ public int getReceiveBufferSize () throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! ! Object buf = getImpl().getOption(SocketOptions.SO_RCVBUF); if (buf instanceof Integer) return(((Integer)buf).intValue()); *************** public class Socket *** 847,856 **** */ public void setKeepAlive (boolean on) throws SocketException { ! if (impl == null) ! throw new SocketException("Not connected"); ! ! impl.setOption(SocketOptions.SO_KEEPALIVE, new Boolean(on)); } /** --- 971,980 ---- */ public void setKeepAlive (boolean on) throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! ! getImpl().setOption(SocketOptions.SO_KEEPALIVE, new Boolean(on)); } /** *************** public class Socket *** 865,874 **** */ public boolean getKeepAlive () throws SocketException { ! if (impl == null) ! throw new SocketException("Not connected"); ! ! Object buf = impl.getOption(SocketOptions.SO_KEEPALIVE); if (buf instanceof Boolean) return(((Boolean)buf).booleanValue()); --- 989,998 ---- */ public boolean getKeepAlive () throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! ! Object buf = getImpl().getOption(SocketOptions.SO_KEEPALIVE); if (buf instanceof Boolean) return(((Boolean)buf).booleanValue()); *************** public class Socket *** 883,895 **** */ public synchronized void close () throws IOException { ! if (impl != null) ! impl.close(); ! ! if (ch != null) ! ch.close(); ! closed = true; } /** --- 1007,1021 ---- */ public synchronized void close () throws IOException { ! if (isClosed()) ! return; ! getImpl().close(); ! impl = null; ! bound = false; ! ! if (getChannel() != null) ! getChannel().close(); } /** *************** public class Socket *** 899,908 **** */ public String toString () { ! return("Socket " + impl); ! } ! // Class Methods /** * Sets the SocketImplFactory. This may be done only once per --- 1025,1045 ---- */ public String toString () { ! try ! { ! if (isConnected()) ! return ("Socket[addr=" + getImpl().getInetAddress() ! + ",port=" + getImpl().getPort() ! + ",localport=" + getImpl().getLocalPort() ! + "]"); ! } ! catch (SocketException e) ! { ! // This cannot happen as we are connected. ! } ! return "Socket[unconnected]"; ! } /** * Sets the SocketImplFactory. This may be done only once per *************** public class Socket *** 944,952 **** */ public void shutdownInput() throws IOException { ! if (impl != null) ! impl.shutdownInput(); ! inputShutdown = true; } --- 1081,1090 ---- */ public void shutdownInput() throws IOException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! ! getImpl().shutdownInput(); inputShutdown = true; } *************** public class Socket *** 959,967 **** */ public void shutdownOutput() throws IOException { ! if (impl != null) ! impl.shutdownOutput(); outputShutdown = true; } --- 1097,1106 ---- */ public void shutdownOutput() throws IOException { ! if (isClosed()) ! throw new SocketException("socket is closed"); + getImpl().shutdownOutput(); outputShutdown = true; } *************** public class Socket *** 974,995 **** */ public SocketChannel getChannel() { ! return ch; } /** * Checks if the SO_REUSEADDR option is enabled * * @exception SocketException If an error occurs * * @since 1.4 */ public boolean getReuseAddress () throws SocketException { ! if (impl == null) ! throw new SocketException ("Cannot initialize Socket implementation"); ! ! Object reuseaddr = impl.getOption (SocketOptions.SO_REUSEADDR); if (!(reuseaddr instanceof Boolean)) throw new SocketException ("Internal Error"); --- 1113,1136 ---- */ public SocketChannel getChannel() { ! return null; } /** * Checks if the SO_REUSEADDR option is enabled * + * @return True if SO_REUSEADDR is set, false otherwise. + * * @exception SocketException If an error occurs * * @since 1.4 */ public boolean getReuseAddress () throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! ! Object reuseaddr = getImpl().getOption (SocketOptions.SO_REUSEADDR); if (!(reuseaddr instanceof Boolean)) throw new SocketException ("Internal Error"); *************** public class Socket *** 1000,1032 **** /** * Enables/Disables the SO_REUSEADDR option * * @exception SocketException If an error occurs * * @since 1.4 */ public void setReuseAddress (boolean on) throws SocketException { ! if (impl == null) ! throw new SocketException ("Cannot initialize Socket implementation"); ! ! impl.setOption (SocketOptions.SO_REUSEADDR, new Boolean (on)); } /** * Returns the current traffic class * * @exception SocketException If an error occurs * ! * @see Socket:setTrafficClass * * @since 1.4 */ public int getTrafficClass () throws SocketException { ! if (impl == null) ! throw new SocketException ("Cannot initialize Socket implementation"); ! ! Object obj = impl.getOption(SocketOptions.IP_TOS); if (obj instanceof Integer) return ((Integer) obj).intValue (); --- 1141,1174 ---- /** * Enables/Disables the SO_REUSEADDR option * + * @param reuseAddress True if SO_REUSEADDR should be set. + * * @exception SocketException If an error occurs * * @since 1.4 */ public void setReuseAddress (boolean on) throws SocketException { ! getImpl().setOption (SocketOptions.SO_REUSEADDR, new Boolean (on)); } /** * Returns the current traffic class * + * @return The current traffic class. + * * @exception SocketException If an error occurs * ! * @see Socket#setTrafficClass(int tc) * * @since 1.4 */ public int getTrafficClass () throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! ! Object obj = getImpl().getOption(SocketOptions.IP_TOS); if (obj instanceof Integer) return ((Integer) obj).intValue (); *************** public class Socket *** 1042,1095 **** * @exception SocketException If an error occurs * @exception IllegalArgumentException If tc value is illegal * ! * @see Socket:getTrafficClass * * @since 1.4 */ public void setTrafficClass (int tc) throws SocketException { ! if (impl == null) ! throw new SocketException ("Cannot initialize Socket implementation"); ! if (tc < 0 || tc > 255) throw new IllegalArgumentException(); ! impl.setOption (SocketOptions.IP_TOS, new Integer (tc)); } /** * Checks if the socket is connected * * @since 1.4 */ public boolean isConnected () { ! return impl.getInetAddress () != null; } /** * Checks if the socket is already bound. * * @since 1.4 */ public boolean isBound () { ! return getLocalAddress () != null; } /** * Checks if the socket is closed. * * @since 1.4 */ public boolean isClosed () { ! return closed; } /** * Checks if the socket's input stream is shutdown * * @since 1.4 */ public boolean isInputShutdown () --- 1184,1252 ---- * @exception SocketException If an error occurs * @exception IllegalArgumentException If tc value is illegal * ! * @see Socket#getTrafficClass() * * @since 1.4 */ public void setTrafficClass (int tc) throws SocketException { ! if (isClosed()) ! throw new SocketException("socket is closed"); ! if (tc < 0 || tc > 255) throw new IllegalArgumentException(); ! getImpl().setOption (SocketOptions.IP_TOS, new Integer (tc)); } /** * Checks if the socket is connected * + * @return True if socket is connected, false otherwise. + * * @since 1.4 */ public boolean isConnected () { ! try ! { ! return getImpl().getInetAddress () != null; ! } ! catch (SocketException e) ! { ! return false; ! } } /** * Checks if the socket is already bound. * + * @return True if socket is bound, false otherwise. + * * @since 1.4 */ public boolean isBound () { ! return bound; } /** * Checks if the socket is closed. * + * @return True if socket is closed, false otherwise. + * * @since 1.4 */ public boolean isClosed () { ! return impl == null; } /** * Checks if the socket's input stream is shutdown * + * @return True if input is shut down. + * * @since 1.4 */ public boolean isInputShutdown () *************** public class Socket *** 1100,1105 **** --- 1257,1264 ---- /** * Checks if the socket's output stream is shutdown * + * @return True if output is shut down. + * * @since 1.4 */ public boolean isOutputShutdown () diff -Nrc3pad gcc-3.3.3/libjava/java/net/SocketOptions.java gcc-3.4.0/libjava/java/net/SocketOptions.java *** gcc-3.3.3/libjava/java/net/SocketOptions.java 2002-10-03 14:30:48.000000000 +0000 --- gcc-3.4.0/libjava/java/net/SocketOptions.java 2003-10-11 18:39:35.000000000 +0000 *************** *** 1,5 **** /* SocketOptions.java -- Implements options for sockets (duh!) ! Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,6 ---- /* SocketOptions.java -- Implements options for sockets (duh!) ! Copyright (C) 1998, 1999, 2000, 2001, ! 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** public interface SocketOptions *** 59,167 **** * Option id for the SO_KEEPALIVE value * @since 1.3 */ ! static final int SO_KEEPALIVE = 0x8; /** * Option id for the SO_LINGER value */ ! static final int SO_LINGER = 0x80; // 128 /** * Option id for the SO_TIMEOUT value */ ! static final int SO_TIMEOUT = 0x1006; // 4102 /** * Retrieve the local address to which the socket is bound. */ ! static final int SO_BINDADDR = 0x0F; // 15 /** * Option id for the send buffer size * @since 1.2 */ ! static final int SO_SNDBUF = 0x1001; // 4097 /** * Option id for the receive buffer size * @since 1.2 */ ! static final int SO_RCVBUF = 0x1002; // 4098 /** * Sets the SO_REUSEADDR parameter on a socket */ ! static final int SO_REUSEADDR = 0x04; // 4 /** * Sets SO_BROADCAST for a socket * @since 1.4 */ ! static final int SO_BROADCAST = 0x20; // 32 /** * Sets SO_OOBINLINE for a socket * @since 1.4 */ ! static final int SO_OOBINLINE = 0x1003; // 4099 /** * Option id for the TCP_NODELAY value */ ! static final int TCP_NODELAY = 0x01; // 1 /** * Options id for the IP_MULTICAST_IF value */ ! static final int IP_MULTICAST_IF = 0x10; // 16 /** * same as above * @since 1.4 */ ! static final int IP_MULTICAST_IF2 = 0x1F; // 31 /** * This option enables or disables local loopback of multicast datagrams. * @since 1.4 */ ! static final int IP_MULTICAST_LOOP = 0x12; // 18 /** * This option sets the type-of-service or traffic class field in the * IP header for a TCP or UDP socket. * @since 1.4 */ ! static final int IP_TOS = 0x03; // 3 /** * Sets the specified option on a socket to the passed in object. For * options that take an integer argument, the passed in object is an * Integer. For options that are set to on or off, the ! * value passed will be a Boolean. The option_id * parameter is one of the defined constants in this interface. * ! * @param option_id The identifier of the option * @param val The value to set the option to * * @exception SocketException If an error occurs */ ! void setOption(int option_id, Object val) throws SocketException; /** * Returns the current setting of the specified option. The * Object returned will be an Integer for options * that have integer values. For options that are set to on or off, a ! * Boolean will be returned. The option_id ! * is one of the defined constants in this interface. * ! * @param option_id The option identifier * * @return The current value of the option * * @exception SocketException If an error occurs */ ! Object getOption(int option_id) throws SocketException; } // interface SocketOptions --- 60,168 ---- * Option id for the SO_KEEPALIVE value * @since 1.3 */ ! int SO_KEEPALIVE = 0x8; /** * Option id for the SO_LINGER value */ ! int SO_LINGER = 0x80; // 128 /** * Option id for the SO_TIMEOUT value */ ! int SO_TIMEOUT = 0x1006; // 4102 /** * Retrieve the local address to which the socket is bound. */ ! int SO_BINDADDR = 0x0F; // 15 /** * Option id for the send buffer size * @since 1.2 */ ! int SO_SNDBUF = 0x1001; // 4097 /** * Option id for the receive buffer size * @since 1.2 */ ! int SO_RCVBUF = 0x1002; // 4098 /** * Sets the SO_REUSEADDR parameter on a socket */ ! int SO_REUSEADDR = 0x04; // 4 /** * Sets SO_BROADCAST for a socket * @since 1.4 */ ! int SO_BROADCAST = 0x20; // 32 /** * Sets SO_OOBINLINE for a socket * @since 1.4 */ ! int SO_OOBINLINE = 0x1003; // 4099 /** * Option id for the TCP_NODELAY value */ ! int TCP_NODELAY = 0x01; // 1 /** * Options id for the IP_MULTICAST_IF value */ ! int IP_MULTICAST_IF = 0x10; // 16 /** * same as above * @since 1.4 */ ! int IP_MULTICAST_IF2 = 0x1F; // 31 /** * This option enables or disables local loopback of multicast datagrams. * @since 1.4 */ ! int IP_MULTICAST_LOOP = 0x12; // 18 /** * This option sets the type-of-service or traffic class field in the * IP header for a TCP or UDP socket. * @since 1.4 */ ! int IP_TOS = 0x03; // 3 /** * Sets the specified option on a socket to the passed in object. For * options that take an integer argument, the passed in object is an * Integer. For options that are set to on or off, the ! * value passed will be a Boolean. The optionId * parameter is one of the defined constants in this interface. * ! * @param optionId The identifier of the option * @param val The value to set the option to * * @exception SocketException If an error occurs */ ! void setOption(int optionId, Object val) throws SocketException; /** * Returns the current setting of the specified option. The * Object returned will be an Integer for options * that have integer values. For options that are set to on or off, a ! * Boolean will be returned. The optionId ! * parameter is one of the defined constants in this interface. * ! * @param optionId The option identifier * * @return The current value of the option * * @exception SocketException If an error occurs */ ! Object getOption(int optionId) throws SocketException; } // interface SocketOptions diff -Nrc3pad gcc-3.3.3/libjava/java/net/SocketPermission.java gcc-3.4.0/libjava/java/net/SocketPermission.java *** gcc-3.3.3/libjava/java/net/SocketPermission.java 2003-02-12 22:44:38.000000000 +0000 --- gcc-3.4.0/libjava/java/net/SocketPermission.java 2003-10-29 10:53:19.000000000 +0000 *************** import java.security.PermissionCollectio *** 96,101 **** --- 96,104 ---- * Can accept connections from 197.197.20.1 *

            * + * This class also supports IPv6 addresses. These should be specified + * in either RFC 2732 format or in full uncompressed form. + * * @since 1.2 * * @author Aaron M. Renn (arenn@urbanophile.com) *************** public final class SocketPermission exte *** 144,152 **** */ public boolean equals(Object obj) { - if (obj == null) - return (false); - if (!(obj instanceof SocketPermission)) return (false); --- 147,152 ---- *************** public final class SocketPermission exte *** 159,165 **** /** * Returns a hash code value for this object. Overrides the ! * Permission.hashCode() * * @return A hash code */ --- 159,165 ---- /** * Returns a hash code value for this object. Overrides the ! * Permission.hashCode(). * * @return A hash code */ *************** public final class SocketPermission exte *** 233,239 **** * Returns true if the permission object passed it is implied by the * this permission. This will be true if *

              ! *
            • The argument is of type SocketPermission *
            • The actions list of the argument are in this object's actions *
            • The port range of the argument is within this objects port range *
            • The hostname is equal to or a subset of this objects hostname --- 233,239 ---- * Returns true if the permission object passed it is implied by the * this permission. This will be true if *

                ! *
              • The argument is of type SocketPermission *
              • The actions list of the argument are in this object's actions *
              • The port range of the argument is within this objects port range *
              • The hostname is equal to or a subset of this objects hostname *************** public final class SocketPermission exte *** 247,253 **** * wildcards *
              * ! * @param perm The Permission to check against * * @return true if the Permission is implied by * this object, false otherwise. --- 247,253 ---- * wildcards *
            * ! * @param perm The Permission to check against * * @return true if the Permission is implied by * this object, false otherwise. diff -Nrc3pad gcc-3.3.3/libjava/java/net/URI.java gcc-3.4.0/libjava/java/net/URI.java *** gcc-3.3.3/libjava/java/net/URI.java 2002-10-05 07:49:08.000000000 +0000 --- gcc-3.4.0/libjava/java/net/URI.java 2003-05-05 05:10:47.000000000 +0000 *************** public final class URI *** 164,170 **** * @exception NullPointerException If str is null */ public static URI create (String str) - throws IllegalArgumentException, URISyntaxException { return null; } --- 164,169 ---- diff -Nrc3pad gcc-3.3.3/libjava/java/net/URLClassLoader.java gcc-3.4.0/libjava/java/net/URLClassLoader.java *** gcc-3.3.3/libjava/java/net/URLClassLoader.java 2003-01-02 09:36:05.000000000 +0000 --- gcc-3.4.0/libjava/java/net/URLClassLoader.java 2003-08-28 22:17:37.000000000 +0000 *************** *** 1,5 **** /* URLClassLoader.java -- ClassLoader that loads classes from one or more URLs ! Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* URLClassLoader.java -- ClassLoader that loads classes from one or more URLs ! Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,48 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.net; import java.io.ByteArrayOutputStream; import java.io.EOFException; import java.io.File; import java.io.FileInputStream; - import java.io.FileNotFoundException; - import java.io.FilterInputStream; import java.io.FilePermission; import java.io.InputStream; import java.io.IOException; --- 35,47 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package java.net; import java.io.ByteArrayOutputStream; import java.io.EOFException; import java.io.File; import java.io.FileInputStream; import java.io.FilePermission; import java.io.InputStream; import java.io.IOException; *************** import java.util.jar.Attributes; *** 60,66 **** import java.util.jar.JarEntry; import java.util.jar.JarFile; import java.util.jar.Manifest; ! import java.util.zip.ZipException; /** * A secure class loader that can load classes and resources from --- 59,65 ---- import java.util.jar.JarEntry; import java.util.jar.JarFile; import java.util.jar.Manifest; ! import gnu.gcj.runtime.SharedLibHelper; /** * A secure class loader that can load classes and resources from *************** public class URLClassLoader extends Secu *** 196,201 **** --- 195,211 ---- } /** + * Returns a Class loaded by this + * URLLoader, or null when this loader + * either can't load the class or doesn't know how to load classes + * at all. + */ + Class getClass(String className) + { + return null; + } + + /** * Returns a Resource loaded by this * URLLoader, or null when no * Resource with the given name exists. *************** public class URLClassLoader extends Secu *** 284,290 **** { super(classloader, baseURL); ! // cache url prefix for all resources in this jar url String external = baseURL.toExternalForm(); StringBuffer sb = new StringBuffer(external.length() + 6); sb.append("jar:"); --- 294,300 ---- { super(classloader, baseURL); ! // Cache url prefix for all resources in this jar url. String external = baseURL.toExternalForm(); StringBuffer sb = new StringBuffer(external.length() + 6); sb.append("jar:"); *************** public class URLClassLoader extends Secu *** 313,318 **** --- 323,331 ---- if (jarfile == null) return null; + if (name.startsWith("/")) + name = name.substring(1); + JarEntry je = jarfile.getJarEntry(name); if(je != null) return new JarURLResource(this, name, je); *************** public class URLClassLoader extends Secu *** 447,458 **** { return stream; } ! public int getLength() { return length; } ! public URL getURL() { return url; --- 460,471 ---- { return stream; } ! public int getLength() { return length; } ! public URL getURL() { return url; *************** public class URLClassLoader extends Secu *** 460,465 **** --- 473,535 ---- } /** + * A SoURLLoader is a type of URLLoader + * that loads classes and resources from a shared library. + */ + final static class SoURLLoader extends URLLoader + { + SharedLibHelper helper; + + SoURLLoader(URLClassLoader classloader, URL url) + { + super(classloader, url); + helper = SharedLibHelper.findHelper(classloader, url.getFile(), + noCertCodeSource); + } + + Class getClass(String className) + { + return helper.findClass(className); + } + + Resource getResource(String name) + { + URL url = helper.findResource(name); + if (url == null) + return null; + return new SoResource(this, name, url); + } + } + + final static class SoResource extends Resource + { + SoResource(SoURLLoader loader, String name, URL url) + { + super(loader, name); + this.url = url; + } + + InputStream getInputStream() throws IOException + { + URLConnection conn = url.openConnection(); + return conn.getInputStream(); + } + + public int getLength() + { + // FIXME we could find this by asking the core object. + return -1; + } + + public URL getURL () + { + return url; + } + + final URL url; + } + + /** * A FileURLLoader is a type of URLLoader * only loading from file url. */ *************** public class URLClassLoader extends Secu *** 643,649 **** // for cache initial size synchronized(factoryCache) { ! if(factory != null && factoryCache.get(factory) == null) factoryCache.put(factory, new HashMap(5)); } } --- 713,719 ---- // for cache initial size synchronized(factoryCache) { ! if (factory != null && factoryCache.get(factory) == null) factoryCache.put(factory, new HashMap(5)); } } *************** public class URLClassLoader extends Secu *** 656,681 **** */ protected void addURL(URL newUrl) { synchronized(urlloaders) { if (newUrl == null) return; // Silently ignore... ! // check global cache to see if there're already url loader ! // for this url URLLoader loader = (URLLoader)urlloaders.get(newUrl); if (loader == null) { String file = newUrl.getFile(); // Check that it is not a directory ! if (! (file.endsWith("/") || file.endsWith(File.separator))) loader = new JarURLLoader(this, newUrl); ! else if ("file".equals(newUrl.getProtocol())) loader = new FileURLLoader(this, newUrl); else loader = new RemoteURLLoader(this, newUrl); ! // cache it urlloaders.put(newUrl, loader); } --- 726,759 ---- */ protected void addURL(URL newUrl) { + addURLImpl(newUrl); + } + + private void addURLImpl(URL newUrl) + { synchronized(urlloaders) { if (newUrl == null) return; // Silently ignore... ! // Check global cache to see if there're already url loader ! // for this url. URLLoader loader = (URLLoader)urlloaders.get(newUrl); if (loader == null) { String file = newUrl.getFile(); + String protocol = newUrl.getProtocol(); // Check that it is not a directory ! if ("gcjlib".equals(protocol)) ! loader = new SoURLLoader(this, newUrl); ! else if (! (file.endsWith("/") || file.endsWith(File.separator))) loader = new JarURLLoader(this, newUrl); ! else if ("file".equals(protocol)) loader = new FileURLLoader(this, newUrl); else loader = new RemoteURLLoader(this, newUrl); ! // Cache it. urlloaders.put(newUrl, loader); } *************** public class URLClassLoader extends Secu *** 692,698 **** { for (int i = 0; i < newUrls.length; i++) { ! addURL(newUrls[i]); } } --- 770,776 ---- { for (int i = 0; i < newUrls.length; i++) { ! addURLImpl(newUrls[i]); } } *************** public class URLClassLoader extends Secu *** 758,764 **** { // Just try to find the resource by the (almost) same name String resourceName = className.replace('.', '/') + ".class"; ! Resource resource = findURLResource(resourceName); if (resource == null) throw new ClassNotFoundException(className + " not found in " + urls); --- 836,855 ---- { // Just try to find the resource by the (almost) same name String resourceName = className.replace('.', '/') + ".class"; ! int max = urls.size(); ! Resource resource = null; ! for (int i = 0; i < max && resource == null; i++) ! { ! URLLoader loader = (URLLoader)urlinfos.elementAt(i); ! if (loader == null) ! continue; ! ! Class k = loader.getClass(className); ! if (k != null) ! return k; ! ! resource = loader.getResource(resourceName); ! } if (resource == null) throw new ClassNotFoundException(className + " not found in " + urls); *************** public class URLClassLoader extends Secu *** 901,912 **** URLStreamHandler handler; synchronized (factoryCache) { ! // check if there're handler for the same protocol in cache HashMap cache = (HashMap)factoryCache.get(factory); handler = (URLStreamHandler)cache.get(protocol); if(handler == null) { ! // add it to cache handler = factory.createURLStreamHandler(protocol); cache.put(protocol, handler); } --- 992,1003 ---- URLStreamHandler handler; synchronized (factoryCache) { ! // Check if there're handler for the same protocol in cache. HashMap cache = (HashMap)factoryCache.get(factory); handler = (URLStreamHandler)cache.get(protocol); if(handler == null) { ! // Add it to cache. handler = factory.createURLStreamHandler(protocol); cache.put(protocol, handler); } *************** public class URLClassLoader extends Secu *** 965,987 **** // First get the permissions that would normally be granted PermissionCollection permissions = super.getPermissions(source); ! // Now add the any extra permissions depending on the URL location URL url = source.getLocation(); String protocol = url.getProtocol(); if (protocol.equals("file")) { String file = url.getFile(); ! // If the file end in / it must be an directory if (file.endsWith("/") || file.endsWith(File.separator)) { // Grant permission to read everything in that directory and ! // all subdirectories permissions.add(new FilePermission(file + "-", "read")); } else { ! // It is a 'normal' file ! // Grant permission to access that file permissions.add(new FilePermission(file, "read")); } } --- 1056,1078 ---- // First get the permissions that would normally be granted PermissionCollection permissions = super.getPermissions(source); ! // Now add any extra permissions depending on the URL location. URL url = source.getLocation(); String protocol = url.getProtocol(); if (protocol.equals("file")) { String file = url.getFile(); ! // If the file end in / it must be an directory. if (file.endsWith("/") || file.endsWith(File.separator)) { // Grant permission to read everything in that directory and ! // all subdirectories. permissions.add(new FilePermission(file + "-", "read")); } else { ! // It is a 'normal' file. ! // Grant permission to access that file. permissions.add(new FilePermission(file, "read")); } } diff -Nrc3pad gcc-3.3.3/libjava/java/net/URLConnection.java gcc-3.4.0/libjava/java/net/URLConnection.java *** gcc-3.3.3/libjava/java/net/URLConnection.java 2002-10-10 05:19:22.000000000 +0000 --- gcc-3.4.0/libjava/java/net/URLConnection.java 2004-01-06 08:54:20.000000000 +0000 *************** *** 1,56 **** ! // URLConnection.java - Superclass of all communications links between ! // an application and a URL. ! /* Copyright (C) 1999, 2000 Free Software Foundation ! This file is part of libgcj. - This software is copyrighted work licensed under the terms of the - Libgcj License. Please consult the file "LIBGCJ_LICENSE" for - details. */ package java.net; ! import java.io.*; import java.text.ParsePosition; import java.text.SimpleDateFormat; import java.util.Date; - import java.util.Locale; import java.util.Hashtable; import java.util.Map; import java.util.StringTokenizer; - import java.security.Permission; - import java.security.AllPermission; import gnu.gcj.io.MimeTypes; /** - * @author Warren Levy - * @date March 5, 1999. - */ - - /** * Written using on-line Java Platform 1.2 API Specification, as well * as "The Java Class Libraries", 2nd edition (Addison-Wesley, 1998). * Status: One guessContentTypeFrom... methods not implemented. * getContent method assumes content type from response; see comment there. */ public abstract class URLConnection { ! protected URL url; protected boolean doInput = true; protected boolean doOutput = false; ! protected boolean allowUserInteraction; protected boolean useCaches; protected long ifModifiedSince = 0L; ! protected boolean connected = false; ! private static boolean defaultAllowUserInteraction = false; ! private static boolean defaultUseCaches = true; ! private static FileNameMap fileNameMap; // Set by the URLConnection subclass. ! private static ContentHandlerFactory factory; ! private static ContentHandler contentHandler; private static Hashtable handlers = new Hashtable(); - private static Locale locale; private static SimpleDateFormat dateFormat1, dateFormat2, dateFormat3; private static boolean dateformats_initialized = false; --- 1,171 ---- ! /* URLConnection.java -- Abstract superclass for reading from URL's ! Copyright (C) 1998, 2002, 2003 Free Software Foundation, Inc. ! This file is part of GNU Classpath. ! GNU Classpath is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! GNU Classpath is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with GNU Classpath; see the file COPYING. If not, write to the ! Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ! 02111-1307 USA. ! ! Linking this library statically or dynamically with other modules is ! making a combined work based on this library. Thus, the terms and ! conditions of the GNU General Public License cover the whole ! combination. ! ! As a special exception, the copyright holders of this library give you ! permission to link this library with independent modules to produce an ! executable, regardless of the license terms of these independent ! modules, and to copy and distribute the resulting executable under ! terms of your choice, provided that you also meet, for each linked ! independent module, the terms and conditions of the license of that ! module. An independent module is a module which is not derived from ! or based on this library. If you modify this library, you may extend ! this exception to your version of the library, but you are not ! obligated to do so. If you do not wish to do so, delete this ! exception statement from your version. */ package java.net; ! import java.io.InputStream; ! import java.io.IOException; ! import java.io.OutputStream; ! import java.security.AllPermission; ! import java.security.Permission; import java.text.ParsePosition; import java.text.SimpleDateFormat; + import java.util.Collections; import java.util.Date; import java.util.Hashtable; + import java.util.Locale; import java.util.Map; import java.util.StringTokenizer; import gnu.gcj.io.MimeTypes; /** * Written using on-line Java Platform 1.2 API Specification, as well * as "The Java Class Libraries", 2nd edition (Addison-Wesley, 1998). * Status: One guessContentTypeFrom... methods not implemented. * getContent method assumes content type from response; see comment there. */ + /** + * This class models a connection that retrieves the information pointed + * to by a URL object. This is typically a connection to a remote node + * on the network, but could be a simple disk read. + *

            + * A URLConnection object is normally created by calling the openConnection() + * method of a URL object. This method is somewhat misnamed because it does + * not actually open the connection. Instead, it return an unconnected + * instance of this object. The caller then has the opportunity to set + * various connection options prior to calling the actual connect() method. + *

            + * After the connection has been opened, there are a number of methods in + * this class that access various attributes of the data, typically + * represented by headers sent in advance of the actual data itself. + *

            + * Also of note are the getInputStream and getContent() methods which allow + * the caller to retrieve the actual data from the connection. Note that + * for some types of connections, writing is also allowed. The setDoOutput() + * method must be called prior to connecing in order to enable this, then + * the getOutputStream method called after the connection in order to + * obtain a stream to write the output to. + *

            + * The getContent() method is of particular note. This method returns an + * Object that encapsulates the data returned. There is no way do determine + * the type of object that will be returned in advance. This is determined + * by the actual content handlers as described in the description of that + * method. + * + * @author Aaron M. Renn + * @author Warren Levy + */ public abstract class URLConnection { ! /** ! * This is an object that maps filenames to MIME types. The interface ! * to do this is implemented by this class, so just create an empty ! * instance and store it here. ! */ ! private static FileNameMap fileNameMap; ! ! /** ! * This is the ContentHandlerFactory set by the caller, if any ! */ ! private static ContentHandlerFactory factory; ! ! /** ! * This is the default value that will be used to determine whether or ! * not user interaction should be allowed. ! */ ! private static boolean defaultAllowUserInteraction = false; ! ! /** ! * This is the default flag indicating whether or not to use caches to ! * store the data returned from a server ! */ ! private static boolean defaultUseCaches = true; ! ! /** ! * This variable determines whether or not interaction is allowed with ! * the user. For example, to prompt for a username and password. ! */ ! protected boolean allowUserInteraction; ! ! /** ! * Indicates whether or not a connection has been established to the ! * destination specified in the URL ! */ ! protected boolean connected = false; ! ! /** ! * Indicates whether or not input can be read from this URL ! */ protected boolean doInput = true; + + /** + * Indicates whether or not output can be sent to this URL + */ protected boolean doOutput = false; ! ! /** ! * If this flag is set, the protocol is allowed to cache data whenever ! * it can (caching is not guaranteed). If it is not set, the protocol ! * must a get a fresh copy of the data. ! *

            ! * This field is set by the setUseCaches method and returned by the ! * getUseCaches method. ! * ! * Its default value is that determined by the last invocation of ! * setDefaultUseCaches ! */ protected boolean useCaches; + + /** + * If this value is non-zero, then the connection will only attempt to + * fetch the document pointed to by the URL if the document has been + * modified more recently than the date set in this variable. That date + * should be specified as the number of seconds since 1/1/1970 GMT. + */ protected long ifModifiedSince = 0L; ! ! /** ! * This is the URL associated with this connection ! */ ! protected URL url; ! private static Hashtable handlers = new Hashtable(); private static SimpleDateFormat dateFormat1, dateFormat2, dateFormat3; private static boolean dateformats_initialized = false; *************** public abstract class URLConnection *** 60,84 **** * * @param url The Object to create the URL connection to * ! * @see URLConnection:connect */ protected URLConnection(URL url) { this.url = url; allowUserInteraction = defaultAllowUserInteraction; useCaches = defaultUseCaches; } /** ! * Creates a real connection to the object references by the URL given ! * to the constructor ! * ! * @exception IOException If an error occurs */ public abstract void connect() throws IOException; /** ! * Returns ths URL to the object. */ public URL getURL() { --- 175,200 ---- * * @param url The Object to create the URL connection to * ! * @see URLConnection#connect() */ protected URLConnection(URL url) { + // Set up all our instance variables this.url = url; allowUserInteraction = defaultAllowUserInteraction; useCaches = defaultUseCaches; } /** ! * Establishes the actual connection to the URL associated with this ! * connection object */ public abstract void connect() throws IOException; /** ! * Returns the URL object associated with this connection ! * ! * @return The URL for this connection. */ public URL getURL() { *************** public abstract class URLConnection *** 86,92 **** } /** ! * Returns the value of the content-length header field */ public int getContentLength() { --- 202,211 ---- } /** ! * Returns the value of the content-length header field or -1 if the value ! * is not known or not present. ! * ! * @return The content-length field */ public int getContentLength() { *************** public abstract class URLConnection *** 94,100 **** } /** ! * Returns the value of the content-type header field */ public String getContentType() { --- 213,226 ---- } /** ! * Returns the the content-type of the data pointed to by the URL. This ! * method first tries looking for a content-type header. If that is not ! * present, it attempts to use the file name to determine the content's ! * MIME type. If that is unsuccessful, the method returns null. The caller ! * may then still attempt to determine the MIME type by a call to ! * guessContentTypeFromStream() ! * ! * @return The content MIME type */ public String getContentType() { *************** public abstract class URLConnection *** 102,108 **** } /** ! * Returns the value of the content-encoding header field */ public String getContentEncoding() { --- 228,237 ---- } /** ! * Returns the value of the content-encoding field or null if it is not ! * known or not present. ! * ! * @return The content-encoding field */ public String getContentEncoding() { *************** public abstract class URLConnection *** 110,124 **** } /** ! * Returns the value of the expires header field */ public long getExpiration() { ! return getHeaderFieldDate("expiration", 0L); } /** ! * Returns the value of the date header field */ public long getDate() { --- 239,262 ---- } /** ! * Returns the value of the expires header or 0 if not known or present. ! * If populated, the return value is number of seconds since midnight ! * on 1/1/1970 GMT. ! * ! * @return The expiration time. */ public long getExpiration() { ! return getHeaderFieldDate("expires", 0L); } /** ! * Returns the date of the document pointed to by the URL as reported in ! * the date field of the header or 0 if the value is not present or not ! * known. If populated, the return value is number of seconds since ! * midnight on 1/1/1970 GMT. ! * ! * @return The document date */ public long getDate() { *************** public abstract class URLConnection *** 126,132 **** } /** ! * Returns the value of the last-modified header field */ public long getLastModified() { --- 264,274 ---- } /** ! * Returns the value of the last-modified header field or 0 if not known known ! * or not present. If populated, the return value is the number of seconds ! * since midnight on 1/1/1970. ! * ! * @return The last modified time */ public long getLastModified() { *************** public abstract class URLConnection *** 134,153 **** } /** ! * Returns the value of the n-th header field * ! * @param num The number of the header field */ ! public String getHeaderField(int num) { // Subclasses for specific protocols override this. return null; } /** ! * Returns the value of the header filed specified by name * ! * @param name The name of the header field */ public String getHeaderField(String name) { --- 276,303 ---- } /** ! * Return a String representing the header value at the specified index. ! * This allows the caller to walk the list of header fields. The analogous ! * getHeaderFieldKey(int) method allows access to the corresponding key ! * for this header field * ! * @param index The index into the header field list to retrieve the value for ! * ! * @return The header value or null if index is past the end of the headers */ ! public String getHeaderField(int index) { // Subclasses for specific protocols override this. return null; } /** ! * Returns a String representing the value of the header field having ! * the named key. Returns null if the header field does not exist. * ! * @param The key of the header field ! * ! * @return The value of the header field as a String */ public String getHeaderField(String name) { *************** public abstract class URLConnection *** 163,236 **** public Map getHeaderFields() { // Subclasses for specific protocols override this. ! return null; } /** ! * Returns the value of the header filed name as int. * ! * @param name The name of the header field ! * @param val The default value * ! * @return Returns the value of the header filed or the default value ! * if the field is missing or malformed */ ! public int getHeaderFieldInt(String name, int val) { ! String str = getHeaderField(name); try { ! if (str != null) ! val = Integer.parseInt(str); } ! catch (NumberFormatException e) ! { ! ; // Do nothing; val is the default. } - return val; } /** ! * Returns the value of a header field parsed as date. The result is then ! * number of milliseconds since January 1st, 1970 GMT. * * @param name The name of the header field ! * @param val The dafault date * * @return Returns the date value of the header filed or the default value * if the field is missing or malformed */ ! public long getHeaderFieldDate(String name, long val) { if (! dateformats_initialized) ! initializeDateFormats(); ! String str = getHeaderField(name); if (str != null) { ! Date date; ! if ((date = dateFormat1.parse(str, new ParsePosition(0))) != null) ! val = date.getTime(); ! else if ((date = dateFormat2.parse(str, new ParsePosition(0))) != null) ! val = date.getTime(); ! else if ((date = dateFormat3.parse(str, new ParsePosition(0))) != null) ! val = date.getTime(); } ! return val; } /** ! * Returns the key of the n-th header field * ! * @param num The number of the header field */ ! public String getHeaderFieldKey(int num) { // Subclasses for specific protocols override this. return null; } /** ! * Retrieves the content of this URLConnection * * @exception IOException If an error occurs * @exception UnknownServiceException If the protocol does not support the --- 313,415 ---- public Map getHeaderFields() { // Subclasses for specific protocols override this. ! return Collections.EMPTY_MAP; } /** ! * Returns the value of the named header field as an int. If the field ! * is not present or cannot be parsed as an integer, the default value ! * will be returned. * ! * @param name The header field key to lookup ! * @param defaultValue The defaule value if the header field is not found ! * or can't be parsed. * ! * @return The value of the header field or the default value if the field ! * is missing or malformed */ ! public int getHeaderFieldInt(String name, int defaultValue) { ! String value = getHeaderField (name); ! ! if (value == null) ! return defaultValue; ! try { ! return Integer.parseInt (value); } ! catch (NumberFormatException e) ! { ! return defaultValue; } } /** ! * Returns the value of the named header field as a date. This date will ! * be the number of seconds since midnight 1/1/1970 GMT or the default ! * value if the field is not present or cannot be converted to a date. * * @param name The name of the header field ! * @param defaultValue The default date if the header field is not found ! * or can't be converted. * * @return Returns the date value of the header filed or the default value * if the field is missing or malformed */ ! public long getHeaderFieldDate (String name, long defaultValue) { if (! dateformats_initialized) ! initializeDateFormats (); ! ! long result = defaultValue; ! String str = getHeaderField (name); ! if (str != null) { ! Date date; ! if ((date = dateFormat1.parse (str, new ParsePosition (0))) != null) ! result = date.getTime (); ! else if ((date = dateFormat2.parse (str, new ParsePosition (0))) != null) ! result = date.getTime (); ! else if ((date = dateFormat3.parse (str, new ParsePosition (0))) != null) ! result = date.getTime (); } ! ! return result; } /** ! * Returns a String representing the header key at the specified index. ! * This allows the caller to walk the list of header fields. The analogous ! * getHeaderField(int) method allows access to the corresponding value for ! * this tag. * ! * @param index The index into the header field list to retrieve the key for. ! * ! * @return The header field key or null if index is past the end ! * of the headers. */ ! public String getHeaderFieldKey (int index) { // Subclasses for specific protocols override this. return null; } /** ! * This method returns the content of the document pointed to by the URL ! * as an Object. The type of object depends on the MIME type of the ! * object and particular content hander loaded. Most text type content ! * handlers will return a subclass of InputStream. Images usually return ! * a class that implements ImageProducer. There is not guarantee what ! * type of object will be returned, however. ! *

            ! * This class first determines the MIME type of the content, then creates ! * a ContentHandler object to process the input. If the ContentHandlerFactory ! * is set, then that object is called to load a content handler, otherwise ! * a class called gnu.java.net.content. is tried. ! * The default class will also be used if the content handler factory returns ! * a null content handler. * * @exception IOException If an error occurs * @exception UnknownServiceException If the protocol does not support the *************** public abstract class URLConnection *** 238,253 **** */ public Object getContent() throws IOException { // FIXME: Doc indicates that other criteria should be applied as // heuristics to determine the true content type, e.g. see // guessContentTypeFromName() and guessContentTypeFromStream methods // as well as FileNameMap class & fileNameMap field & get/set methods. ! String cType = getContentType(); ! contentHandler = setContentHandler(cType); ! if (contentHandler == null) return getInputStream(); ! return contentHandler.getContent(this); } /** --- 417,436 ---- */ public Object getContent() throws IOException { + if (!connected) + connect(); + // FIXME: Doc indicates that other criteria should be applied as // heuristics to determine the true content type, e.g. see // guessContentTypeFromName() and guessContentTypeFromStream methods // as well as FileNameMap class & fileNameMap field & get/set methods. ! String type = getContentType(); ! ContentHandler ch = setContentHandler(type); ! ! if (ch == null) return getInputStream(); ! return ch.getContent(this); } /** *************** public abstract class URLConnection *** 264,272 **** } /** ! * Returns a permission object representing the permission necessary to make ! * the connection represented by this object. This method returns null if no ! * permission is required to make the connection. * * @exception IOException If the computation of the permission requires * network or file I/O and an exception occurs while computing it --- 447,463 ---- } /** ! * This method returns a Permission object representing the ! * permissions required to access this URL. This method returns ! * java.security.AllPermission by default. Subclasses should ! * override it to return a more specific permission. For example, an ! * HTTP URL should return an instance of SocketPermission ! * for the appropriate host and port. ! *

            ! * Note that because of items such as HTTP redirects, the permission ! * object returned might be different before and after connecting. ! * ! * @return A Permission object * * @exception IOException If the computation of the permission requires * network or file I/O and an exception occurs while computing it *************** public abstract class URLConnection *** 274,284 **** public Permission getPermission() throws IOException { // Subclasses may override this. ! return new java.security.AllPermission(); } /** ! * Returns the input stream of the URL connection * * @exception IOException If an error occurs * @exception UnknownServiceException If the protocol does not support input --- 465,478 ---- public Permission getPermission() throws IOException { // Subclasses may override this. ! return new AllPermission(); } /** ! * Returns an InputStream for this connection. As this default ! * implementation returns null, subclasses should override this method ! * ! * @return An InputStream for this connection * * @exception IOException If an error occurs * @exception UnknownServiceException If the protocol does not support input *************** public abstract class URLConnection *** 291,297 **** } /** ! * Returns the output stream of the URL connection * * @exception IOException If an error occurs * @exception UnknownServiceException If the protocol does not support output --- 485,494 ---- } /** ! * Returns an OutputStream for this connection. As this default ! * implementation returns null, subclasses should override this method ! * ! * @return An OutputStream for this connection * * @exception IOException If an error occurs * @exception UnknownServiceException If the protocol does not support output *************** public abstract class URLConnection *** 304,310 **** } /** ! * Returns a string representation of the URL connection object */ public String toString() { --- 501,510 ---- } /** ! * The methods prints the value of this object as a String by calling the ! * toString() method of its associated URL. Overrides Object.toString() ! * ! * @return A String representation of this object */ public String toString() { *************** public abstract class URLConnection *** 312,333 **** } /** ! * Sets tha value of the doInput field. ! * ! * @param doinput The new value of the doInput field * * @exception IllegalStateException If already connected */ ! public void setDoInput(boolean doinput) { if (connected) throw new IllegalStateException ("Already connected"); ! doInput = doinput; } /** ! * Returns the current value of the doInput field */ public boolean getDoInput() { --- 512,540 ---- } /** ! * Returns the value of a flag indicating whether or not input is going ! * to be done for this connection. This default to true unless the ! * doOutput flag is set to false, in which case this defaults to false. ! * ! * @param input true if input is to be done, ! * false otherwise * * @exception IllegalStateException If already connected */ ! public void setDoInput(boolean input) { if (connected) throw new IllegalStateException ("Already connected"); ! doInput = input; } /** ! * Returns the value of a flag indicating whether or not input is going ! * to be done for this connection. This default to true unless the ! * doOutput flag is set to false, in which case this defaults to false. ! * ! * @return true if input is to be done, false otherwise */ public boolean getDoInput() { *************** public abstract class URLConnection *** 335,356 **** } /** ! * Sets the value of the doOutput field * ! * @param dooutput The new value of the doOutput field * * @exception IllegalStateException If already connected */ ! public void setDoOutput(boolean dooutput) { if (connected) throw new IllegalStateException ("Already connected"); ! doOutput = dooutput; } /** ! * Returns the current value of the doOutput field */ public boolean getDoOutput() { --- 542,568 ---- } /** ! * Returns a boolean flag indicating whether or not output will be done ! * on this connection. The default value is false, so this method can ! * be used to override the default * ! * @param output ture if output is to be done, false otherwise * * @exception IllegalStateException If already connected */ ! public void setDoOutput(boolean output) { if (connected) throw new IllegalStateException ("Already connected"); ! doOutput = output; } /** ! * Returns a boolean flag indicating whether or not output will be done ! * on this connection. This defaults to false. ! * ! * @return true if output is to be done, false otherwise */ public boolean getDoOutput() { *************** public abstract class URLConnection *** 358,379 **** } /** ! * Sets a new value to the allowUserInteraction field * ! * @param allowed The new value * * @exception IllegalStateException If already connected */ ! public void setAllowUserInteraction(boolean allowed) { ! if (connected) ! throw new IllegalStateException ("Already connected"); ! ! allowUserInteraction = allowed; } /** ! * Returns the current value of the allowUserInteraction field */ public boolean getAllowUserInteraction() { --- 570,594 ---- } /** ! * Sets a boolean flag indicating whether or not user interaction is ! * allowed for this connection. (For example, in order to prompt for ! * username and password info. * ! * @param allow true if user interaction should be allowed, false otherwise. * * @exception IllegalStateException If already connected */ ! public void setAllowUserInteraction(boolean allow) { ! allowUserInteraction = allow; } /** ! * Returns a boolean flag indicating whether or not user interaction is ! * allowed for this connection. (For example, in order to prompt for ! * username and password info. ! * ! * @return true if user interaction is allowed, false otherwise */ public boolean getAllowUserInteraction() { *************** public abstract class URLConnection *** 381,397 **** } /** ! * Sets the default value if the allowUserInteraction field * ! * @param allowed The new default value */ ! public static void setDefaultAllowUserInteraction(boolean allowed) { ! defaultAllowUserInteraction = allowed; } /** ! * Returns the default value of the allowUserInteraction field */ public static boolean getDefaultAllowUserInteraction() { --- 596,616 ---- } /** ! * Sets the default flag for whether or not interaction with a user ! * is allowed. This will be used for all connections unless overridden * ! * @param allow true to allow user interaction, false otherwise */ ! public static void setDefaultAllowUserInteraction(boolean allow) { ! defaultAllowUserInteraction = allow; } /** ! * Returns the default flag for whether or not interaction with a user ! * is allowed. This will be used for all connections unless overridden ! * ! * @return true if user interaction is allowed, false otherwise */ public static boolean getDefaultAllowUserInteraction() { *************** public abstract class URLConnection *** 399,405 **** } /** ! * Sets a new value to the useCaches field * * @param usecaches The new value * --- 618,625 ---- } /** ! * Sets a boolean flag indicating whether or not caching will be used ! * (if possible) to store data downloaded via the connection. * * @param usecaches The new value * *************** public abstract class URLConnection *** 414,420 **** } /** ! * The current value of the useCaches field */ public boolean getUseCaches() { --- 634,643 ---- } /** ! * Returns a boolean flag indicating whether or not caching will be used ! * (if possible) to store data downloaded via the connection. ! * ! * @return true if caching should be used if possible, false otherwise */ public boolean getUseCaches() { *************** public abstract class URLConnection *** 422,428 **** } /** ! * Sets the value of the ifModifiedSince field * * @param ifmodifiedsince The new value in milliseconds * since January 1, 1970 GMT --- 645,655 ---- } /** ! * Sets the ifModified since instance variable. If this value is non ! * zero and the underlying protocol supports it, the actual document will ! * not be fetched unless it has been modified since this time. The value ! * passed should be 0 if this feature is to be disabled or the time expressed ! * as the number of seconds since midnight 1/1/1970 GMT otherwise. * * @param ifmodifiedsince The new value in milliseconds * since January 1, 1970 GMT *************** public abstract class URLConnection *** 438,444 **** } /** ! * Returns the current value of the ifModifiedSince field */ public long getIfModifiedSince() { --- 665,677 ---- } /** ! * Returns the ifModified since instance variable. If this value is non ! * zero and the underlying protocol supports it, the actual document will ! * not be fetched unless it has been modified since this time. The value ! * returned will be 0 if this feature is disabled or the time expressed ! * as the number of seconds since midnight 1/1/1970 GMT otherwise ! * ! * @return The ifModifiedSince value */ public long getIfModifiedSince() { *************** public abstract class URLConnection *** 446,452 **** } /** ! * Returns the default value of the useCaches field */ public boolean getDefaultUseCaches() { --- 679,688 ---- } /** ! * Returns the default value used to determine whether or not caching ! * of documents will be done when possible. ! * ! * @return true if caches will be used, false otherwise */ public boolean getDefaultUseCaches() { *************** public abstract class URLConnection *** 454,462 **** } /** ! * Sets the default value of the useCaches field * ! * @param defaultusecaches The new default value */ public void setDefaultUseCaches(boolean defaultusecaches) { --- 690,699 ---- } /** ! * Sets the default value used to determine whether or not caching ! * of documents will be done when possible. * ! * @param use true to use caches if possible by default, false otherwise */ public void setDefaultUseCaches(boolean defaultusecaches) { *************** public abstract class URLConnection *** 464,501 **** } /** ! * Sets a property specified by key to value. ! * ! * @param key Key of the property to set ! * @param value Value of the Property to set * * @exception IllegalStateException If already connected * @exception NullPointerException If key is null * ! * @see URLConnection:getRequestProperty(String key) ! * @see URLConnection:addRequestProperty(String key, String value) */ public void setRequestProperty(String key, String value) { if (connected) throw new IllegalStateException ("Already connected"); // Do nothing unless overridden by subclasses that support setting // header fields in the request. } /** ! * Sets a property specified by key to value. If the property key already ! * is assigned to a value it does nothing. ! * * @param key Key of the property to add * @param value Value of the Property to add * * @exception IllegalStateException If already connected * @exception NullPointerException If key is null * ! * @see URLConnection:getRequestProperty(String key) ! * @see URLConnection:setRequestProperty(String key, String value) * * @since 1.4 */ --- 701,743 ---- } /** ! * Sets the value of the named request property * + * @param key The name of the property + * @param value The value of the property + * * @exception IllegalStateException If already connected * @exception NullPointerException If key is null * ! * @see URLConnection#getRequestProperty(String key) ! * @see URLConnection#addRequestProperty(String key, String value) ! * ! * @since 1.4 */ public void setRequestProperty(String key, String value) { if (connected) throw new IllegalStateException ("Already connected"); + if (key == null) + throw new NullPointerException ("key is null"); + // Do nothing unless overridden by subclasses that support setting // header fields in the request. } /** ! * Adds a new request property by a key/value pair. ! * This method does not overwrite existing properties with the same key. ! * * @param key Key of the property to add * @param value Value of the Property to add * * @exception IllegalStateException If already connected * @exception NullPointerException If key is null * ! * @see URLConnection#getRequestProperty(String key) ! * @see URLConnection#setRequestProperty(String key, String value) * * @since 1.4 */ *************** public abstract class URLConnection *** 504,526 **** if (connected) throw new IllegalStateException ("Already connected"); ! if (getRequestProperty (key) == null) ! { ! setRequestProperty (key, value); ! } } /** ! * Returns a property value specified by key. * ! * @param key Key of the property to return * * @exception IllegalStateException If already connected * ! * @see URLConnection:setRequestProperty(String key, String value) ! * @see URLConnection:addRequestProperty(String key, String value) ! * ! * @return Value of the property. */ public String getRequestProperty(String key) { --- 746,769 ---- if (connected) throw new IllegalStateException ("Already connected"); ! if (key == null) ! throw new NullPointerException ("key is null"); ! ! // Do nothing unless overridden by subclasses that support adding ! // header fields in the request. } /** ! * Returns the value of the named request property. * ! * @param key The name of the property ! * ! * @return Value of the property * * @exception IllegalStateException If already connected * ! * @see URLConnection#setRequestProperty(String key, String value) ! * @see URLConnection#addRequestProperty(String key, String value) */ public String getRequestProperty(String key) { *************** public abstract class URLConnection *** 533,594 **** } /** ! * Returns a map that contains all properties of the request * * @exception IllegalStateException If already connected * ! * @return The map of properties */ public Map getRequestProperties() { // Overridden by subclasses that support reading header fields from the // request. ! return null; } /** ! * Defines a default request property * ! * @param key The key of the property ! * @param value The value of the property * ! * @deprecated 1.3 The method setRequestProperty should be used instead * ! * @see URLConnection:setRequestProperty */ ! public static void setDefaultRequestProperty(String key, String value) { ! // Do nothing unless overridden by subclasses that support setting ! // default request properties. } /** ! * Returns the value of a default request property * ! * @param key The key of the default property * * @return The value of the default property or null if not available * ! * @deprecated 1.3 The method getRequestProperty should be used instead * ! * @see URLConnection:getRequestProperty */ public static String getDefaultRequestProperty(String key) { ! // Overridden by subclasses that support default request properties. return null; } /** ! * Sets a ContentHandlerFactory * ! * @param fac The ContentHandlerFactory * * @exception Error If the factory has already been defined * @exception SecurityException If a security manager exists and its * checkSetFactory method doesn't allow the operation */ ! public static void setContentHandlerFactory(ContentHandlerFactory fac) { if (factory != null) throw new Error("ContentHandlerFactory already set"); --- 776,851 ---- } /** ! * Returns an unmodifiable Map containing the request properties. ! * ! * @return The map of properties * * @exception IllegalStateException If already connected * ! * @since 1.4 */ public Map getRequestProperties() { + if (connected) + throw new IllegalStateException ("Already connected"); + // Overridden by subclasses that support reading header fields from the // request. ! return Collections.EMPTY_MAP; } /** ! * Sets the default value of a request property. This will be used ! * for all connections unless the value of the property is manually ! * overridden. * ! * @param key The request property name the default is being set for ! * @param value The value to set the default to * ! * @deprecated 1.3 The method setRequestProperty should be used instead. ! * This method does nothing now. * ! * @see URLConnection#setRequestProperty(String key, String value) */ ! public static void setDefaultRequestProperty (String key, String value) { ! // This method does nothing since JDK 1.3. } /** ! * Returns the default value of a request property. This will be used ! * for all connections unless the value of the property is manually ! * overridden. * ! * @param key The request property to return the default value of * * @return The value of the default property or null if not available * ! * @deprecated 1.3 The method getRequestProperty should be used instead. ! * This method does nothing now. * ! * @see URLConnection#getRequestProperty(String key) */ public static String getDefaultRequestProperty(String key) { ! // This method does nothing since JDK 1.3. return null; } /** ! * Set's the ContentHandlerFactory for an application. This can be called ! * once and only once. If it is called again, then an Error is thrown. ! * Unlike for other set factory methods, this one does not do a security ! * check prior to setting the factory. * ! * @param factory The ContentHandlerFactory for this application * * @exception Error If the factory has already been defined * @exception SecurityException If a security manager exists and its * checkSetFactory method doesn't allow the operation */ ! public static synchronized void setContentHandlerFactory ! (ContentHandlerFactory fac) { if (factory != null) throw new Error("ContentHandlerFactory already set"); *************** public abstract class URLConnection *** 598,639 **** SecurityManager s = System.getSecurityManager(); if (s != null) s.checkSetFactory(); factory = fac; } /** ! * Tries to determine the content type of an object, based on the ! * specified file name * ! * @param fname The filename to guess the content type from * * @specnote public since JDK 1.4 */ ! public static String guessContentTypeFromName(String fname) { ! int dot = fname.lastIndexOf ("."); if (dot != -1) { ! if (dot == fname.length()) return ("application/octet-stream"); else ! fname = fname.substring (dot + 1); } ! String type = MimeTypes.getMimeTypeFromExtension (fname); if (type == null) return("application/octet-stream"); ! return(type); } /** ! * Tries to guess the content type of an object, based on the characters ! * at the beginning of then input stream * ! * @param is The input stream to guess from * * @exception IOException If an error occurs */ --- 855,909 ---- SecurityManager s = System.getSecurityManager(); if (s != null) s.checkSetFactory(); + factory = fac; } /** ! * Returns the MIME type of a file based on the name of the file. This ! * works by searching for the file's extension in a list of file extensions ! * and returning the MIME type associated with it. If no type is found, ! * then a MIME type of "application/octet-stream" will be returned. * ! * @param filename The filename to determine the MIME type for ! * ! * @return The MIME type String * * @specnote public since JDK 1.4 */ ! public static String guessContentTypeFromName(String filename) { ! int dot = filename.lastIndexOf ("."); if (dot != -1) { ! if (dot == filename.length()) return ("application/octet-stream"); else ! filename = filename.substring (dot + 1); } ! String type = MimeTypes.getMimeTypeFromExtension (filename); if (type == null) return("application/octet-stream"); ! return type; } /** ! * Returns the MIME type of a stream based on the first few characters ! * at the beginning of the stream. This routine can be used to determine ! * the MIME type if a server is believed to be returning an incorrect ! * MIME type. This method returns "application/octet-stream" if it ! * cannot determine the MIME type. ! *

            ! * NOTE: Overriding MIME types sent from the server can be obnoxious ! * to user's. See Internet Exploder 4 if you don't believe me. * ! * @param is The InputStream to determine the MIME type from ! * ! * @return The MIME type * * @exception IOException If an error occurs */ *************** public abstract class URLConnection *** 647,653 **** } /** ! * Returns a filename map (a mimetable) * * @since 1.2 */ --- 917,926 ---- } /** ! * This method returns the FileNameMap object being used ! * to decode MIME types by file extension. ! * ! * @return The FileNameMap. * * @since 1.2 */ *************** public abstract class URLConnection *** 657,665 **** } /** ! * Sets a FileNameMap * ! * @param map The new FileNameMap * * @exception SecurityException If a security manager exists and its * checkSetFactory method doesn't allow the operation --- 930,939 ---- } /** ! * This method set the FileNameMap object being used ! * to decode MIME types by file extension. * ! * @param map The FileNameMap. * * @exception SecurityException If a security manager exists and its * checkSetFactory method doesn't allow the operation *************** public abstract class URLConnection *** 764,770 **** { if (dateformats_initialized) return; ! locale = new Locale("En", "Us", "Unix"); dateFormat1 = new SimpleDateFormat("EEE, dd MMM yyyy hh:mm:ss 'GMT'", locale); dateFormat2 = new SimpleDateFormat("EEEE, dd-MMM-yy hh:mm:ss 'GMT'", --- 1038,1045 ---- { if (dateformats_initialized) return; ! ! Locale locale = new Locale("En", "Us", "Unix"); dateFormat1 = new SimpleDateFormat("EEE, dd MMM yyyy hh:mm:ss 'GMT'", locale); dateFormat2 = new SimpleDateFormat("EEEE, dd-MMM-yy hh:mm:ss 'GMT'", *************** public abstract class URLConnection *** 772,775 **** dateFormat3 = new SimpleDateFormat("EEE MMM d hh:mm:ss yyyy", locale); dateformats_initialized = true; } ! } --- 1047,1051 ---- dateFormat3 = new SimpleDateFormat("EEE MMM d hh:mm:ss yyyy", locale); dateformats_initialized = true; } ! } // class URLConnection ! diff -Nrc3pad gcc-3.3.3/libjava/java/net/URLDecoder.java gcc-3.4.0/libjava/java/net/URLDecoder.java *** gcc-3.3.3/libjava/java/net/URLDecoder.java 2003-02-12 22:44:39.000000000 +0000 --- gcc-3.4.0/libjava/java/net/URLDecoder.java 2003-03-02 20:11:13.000000000 +0000 *************** public class URLDecoder *** 77,82 **** --- 77,84 ---- * @param s the String to convert * * @return the converted String + * + * @deprecated */ public static String decode(String s) { diff -Nrc3pad gcc-3.3.3/libjava/java/net/URLEncoder.java gcc-3.4.0/libjava/java/net/URLEncoder.java *** gcc-3.3.3/libjava/java/net/URLEncoder.java 2002-11-03 20:27:31.000000000 +0000 --- gcc-3.4.0/libjava/java/net/URLEncoder.java 2003-07-22 18:03:47.000000000 +0000 *************** *** 1,5 **** /* URLEncoder.java -- Class to convert strings to a properly encoded URL ! Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* URLEncoder.java -- Class to convert strings to a properly encoded URL ! Copyright (C) 1998, 1999, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** import java.io.UnsupportedEncodingExcept *** 53,59 **** * US alphabet remain as is, the space character (' ') is replaced with * '+' sign, and all other characters are converted to a "%XX" format * where XX is the hexadecimal representation of that character in a ! * certain encoding (by default "UTF-8"). *

            * This method is very useful for encoding strings to be sent to CGI scripts * --- 53,60 ---- * US alphabet remain as is, the space character (' ') is replaced with * '+' sign, and all other characters are converted to a "%XX" format * where XX is the hexadecimal representation of that character in a ! * certain encoding (by default, the platform encoding, though the ! * standard is "UTF-8"). *

            * This method is very useful for encoding strings to be sent to CGI scripts * *************** public class URLEncoder *** 65,86 **** { /** * This method translates the passed in string into x-www-form-urlencoded ! * format using the standard "UTF-8" character encoding to hex-encode the ! * unsafe characters. * * @param s The String to convert * * @return The converted String */ public static String encode(String s) { try { ! return encode(s, "UTF-8"); } catch (UnsupportedEncodingException uee) { ! // Should never happen since UTF-8 should always be supported return s; } } --- 66,92 ---- { /** * This method translates the passed in string into x-www-form-urlencoded ! * format using the default encoding. The standard encoding is ! * "UTF-8", and the two-argument form of this method should be used ! * instead. * * @param s The String to convert * * @return The converted String + * + * @deprecated */ public static String encode(String s) { try { ! // We default to 8859_1 for compatibility with the same ! // default elsewhere in the library. ! return encode(s, System.getProperty("file.encoding", "8859_1")); } catch (UnsupportedEncodingException uee) { ! // Should never happen since default should always be supported return s; } } *************** public class URLEncoder *** 137,143 **** for (int j = 0; j < bytes.length; j++) { result.append('%'); ! result.append(Integer.toHexString(((int) bytes[j]) & 0xFF)); } } start = i; --- 143,151 ---- for (int j = 0; j < bytes.length; j++) { result.append('%'); ! int val = bytes[j]; ! result.append(hex.charAt((val & 0xf0) >> 4)); ! result.append(hex.charAt(val & 0x0f)); } } start = i; *************** public class URLEncoder *** 164,167 **** --- 172,182 ---- */ private URLEncoder() { } + /** + * Used to convert to hex. We don't use Integer.toHexString, since + * it converts to lower case (and the Sun docs pretty clearly + * specify upper case here), and because it doesn't provide a + * leading 0. + */ + private static final String hex = "0123456789ABCDEF"; } // class URLEncoder diff -Nrc3pad gcc-3.3.3/libjava/java/net/URL.java gcc-3.4.0/libjava/java/net/URL.java *** gcc-3.3.3/libjava/java/net/URL.java 2002-11-22 16:48:52.000000000 +0000 --- gcc-3.4.0/libjava/java/net/URL.java 2003-12-31 10:55:40.000000000 +0000 *************** *** 1,5 **** /* URL.java -- Uniform Resource Locator Class ! Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* URL.java -- Uniform Resource Locator Class ! Copyright (C) 1998, 1999, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 38,52 **** package java.net; import java.io.InputStream; import java.io.IOException; import java.io.Serializable; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; ! import java.util.Hashtable; import java.util.StringTokenizer; - /* * Written using on-line Java Platform 1.2 API Specification, as well * as "The Java Class Libraries", 2nd edition (Addison-Wesley, 1998). --- 38,52 ---- package java.net; + import gnu.java.net.URLParseError; import java.io.InputStream; import java.io.IOException; import java.io.Serializable; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; ! import java.util.HashMap; import java.util.StringTokenizer; /* * Written using on-line Java Platform 1.2 API Specification, as well * as "The Java Class Libraries", 2nd edition (Addison-Wesley, 1998). *************** import java.util.StringTokenizer; *** 57,63 **** * This final class represents an Internet Uniform Resource Locator (URL). * For details on the syntax of URL's and what they can be used for, * refer to RFC 1738, available from http://ds.internic.net/rfcs/rfc1738.txt *

            * There are a great many protocols supported by URL's such as "http", * "ftp", and "file". This object can handle any arbitrary URL for which --- 57,64 ---- * This final class represents an Internet Uniform Resource Locator (URL). * For details on the syntax of URL's and what they can be used for, * refer to RFC 1738, available from ! * http://ds.internic.net/rfcs/rfc1738.txt *

            * There are a great many protocols supported by URL's such as "http", * "ftp", and "file". This object can handle any arbitrary URL for which *************** import java.util.StringTokenizer; *** 74,83 **** * If this property is set, it is assumed to be a "|" separated list of * package names in which to attempt locating protocol handlers. The * protocol handler is searched for by appending the string ! * "..Handler" to each packed in the list until a hander is found. ! * If a protocol handler is not found in this list of packages, or if the ! * property does not exist, then the default protocol handler of ! * "gnu.java.net..Handler" is tried. If this is * unsuccessful, a MalformedURLException is thrown. *

            * All of the constructor methods of URL attempt to load a protocol --- 75,84 ---- * If this property is set, it is assumed to be a "|" separated list of * package names in which to attempt locating protocol handlers. The * protocol handler is searched for by appending the string ! * ".<protocol>.Handler" to each packed in the list until a hander is ! * found. If a protocol handler is not found in this list of packages, or if ! * the property does not exist, then the default protocol handler of ! * "gnu.java.net.<protocol>.Handler" is tried. If this is * unsuccessful, a MalformedURLException is thrown. *

            * All of the constructor methods of URL attempt to load a protocol *************** import java.util.StringTokenizer; *** 98,111 **** *

            * Please note that a protocol handler must be a subclass of * URLStreamHandler. * ! * @author Aaron M. Renn (arenn@urbanophile.com) * @author Warren Levy * * @see URLStreamHandler */ public final class URL implements Serializable { /** * The name of the protocol for this URL. * The protocol is always stored in lower case. --- 99,128 ---- *

            * Please note that a protocol handler must be a subclass of * URLStreamHandler. + *

            + * Normally, this class caches protocol handlers. Once it finds a handler + * for a particular protocol, it never tries to look up a new handler + * again. However, if the system property + * gnu.java.net.nocache_protocol_handlers is set, then this + * caching behavior is disabled. This property is specific to this + * implementation. Sun's JDK may or may not do protocol caching, but it + * almost certainly does not examine this property. + *

            + * Please also note that an application can install its own factory for + * loading protocol handlers (see setURLStreamHandlerFactory). If this is + * done, then the above information is superseded and the behavior of this + * class in loading protocol handlers is dependent on that factory. * ! * @author Aaron M. Renn * @author Warren Levy * * @see URLStreamHandler */ public final class URL implements Serializable { + private static final String DEFAULT_SEARCH_PATH = + "gnu.java.net.protocol|sun.net.www.protocol"; + /** * The name of the protocol for this URL. * The protocol is always stored in lower case. *************** public final class URL implements Serial *** 147,167 **** /** * The protocol handler in use for this URL */ ! transient private URLStreamHandler handler; /** * This a table where we cache protocol handlers to avoid the overhead * of looking them up each time. */ ! private static Hashtable handlers = new Hashtable(); /** ! * If an application installs its own protocol handler factory, this is ! * where we keep track of it. */ ! private static URLStreamHandlerFactory factory; ! private static final long serialVersionUID = -7627629688361524110L; /** * Constructs a URL and loads a protocol handler for the values passed as --- 164,199 ---- /** * The protocol handler in use for this URL */ ! transient URLStreamHandler ph; ! ! /** ! * If an application installs its own protocol handler factory, this is ! * where we keep track of it. ! */ ! private static URLStreamHandlerFactory factory; ! ! private static final long serialVersionUID = -7627629688361524110L; /** * This a table where we cache protocol handlers to avoid the overhead * of looking them up each time. */ ! private static HashMap ph_cache = new HashMap(); /** ! * Whether or not to cache protocol handlers. */ ! private static boolean cache_handlers; ! static ! { ! String s = System.getProperty ("gnu.java.net.nocache_protocol_handlers"); ! ! if (s == null) ! cache_handlers = true; ! else ! cache_handlers = false; ! } /** * Constructs a URL and loads a protocol handler for the values passed as *************** public final class URL implements Serial *** 213,219 **** * @param port The port number to use, or -1 to use the protocol's default * port * @param file The "file" portion of the URL. ! * @param handler The protocol handler to use with this URL. * * @exception MalformedURLException If no protocol handler can be loaded * for the specified protocol. --- 245,251 ---- * @param port The port number to use, or -1 to use the protocol's default * port * @param file The "file" portion of the URL. ! * @param ph The protocol handler to use with this URL. * * @exception MalformedURLException If no protocol handler can be loaded * for the specified protocol. *************** public final class URL implements Serial *** 222,246 **** * * @since 1.2 */ ! public URL(String protocol, String host, int port, String file, ! URLStreamHandler handler) throws MalformedURLException { if (protocol == null) throw new MalformedURLException("null protocol"); this.protocol = protocol.toLowerCase(); ! if (handler != null) { SecurityManager s = System.getSecurityManager(); if (s != null) s.checkPermission (new NetPermission ("specifyStreamHandler")); ! this.handler = handler; } else ! this.handler = getURLStreamHandler(protocol); ! if (this.handler == null) throw new MalformedURLException ( "Protocol handler not found: " + protocol); --- 254,279 ---- * * @since 1.2 */ ! public URL (String protocol, String host, int port, String file, ! URLStreamHandler ph) ! throws MalformedURLException { if (protocol == null) throw new MalformedURLException("null protocol"); this.protocol = protocol.toLowerCase(); ! if (ph != null) { SecurityManager s = System.getSecurityManager(); if (s != null) s.checkPermission (new NetPermission ("specifyStreamHandler")); ! this.ph = ph; } else ! this.ph = getURLStreamHandler(protocol); ! if (this.ph == null) throw new MalformedURLException ( "Protocol handler not found: " + protocol); *************** public final class URL implements Serial *** 279,285 **** this((URL) null, spec, (URLStreamHandler) null); } ! /* * This method parses a String representation of a URL within the * context of an existing URL. Principally this means that any * fields not present the URL are inheritied from the context URL. --- 312,318 ---- this((URL) null, spec, (URLStreamHandler) null); } ! /** * This method parses a String representation of a URL within the * context of an existing URL. Principally this means that any * fields not present the URL are inheritied from the context URL. *************** public final class URL implements Serial *** 319,325 **** * * @param context The context in which to parse the specification * @param spec The string to parse as an URL ! * @param handler The stream handler for the URL * * @exception MalformedURLException If a protocol handler cannot be found * or the URL cannot be parsed --- 352,358 ---- * * @param context The context in which to parse the specification * @param spec The string to parse as an URL ! * @param ph The stream handler for the URL * * @exception MalformedURLException If a protocol handler cannot be found * or the URL cannot be parsed *************** public final class URL implements Serial *** 328,334 **** * * @since 1.2 */ ! public URL(URL context, String spec, URLStreamHandler handler) throws MalformedURLException { /* A protocol is defined by the doc as the substring before a ':' --- 361,367 ---- * * @since 1.2 */ ! public URL(URL context, String spec, URLStreamHandler ph) throws MalformedURLException { /* A protocol is defined by the doc as the substring before a ':' *************** public final class URL implements Serial *** 363,368 **** --- 396,403 ---- host = context.host; port = context.port; file = context.file; + if (file == null || file.length() == 0) + file = "/"; authority = context.authority; } } *************** public final class URL implements Serial *** 375,398 **** host = context.host; port = context.port; file = context.file; authority = context.authority; } else // Protocol NOT specified in spec. and no context available. throw new MalformedURLException("Absolute URL required with null context"); ! if (handler != null) { SecurityManager s = System.getSecurityManager (); if (s != null) s.checkPermission (new NetPermission ("specifyStreamHandler")); ! this.handler = handler; } else ! this.handler = getURLStreamHandler(protocol); ! if (this.handler == null) throw new MalformedURLException("Protocol handler not found: " + protocol); --- 410,435 ---- host = context.host; port = context.port; file = context.file; + if (file == null || file.length() == 0) + file = "/"; authority = context.authority; } else // Protocol NOT specified in spec. and no context available. throw new MalformedURLException("Absolute URL required with null context"); ! if (ph != null) { SecurityManager s = System.getSecurityManager (); if (s != null) s.checkPermission (new NetPermission ("specifyStreamHandler")); ! this.ph = ph; } else ! this.ph = getURLStreamHandler(protocol); ! if (this.ph == null) throw new MalformedURLException("Protocol handler not found: " + protocol); *************** public final class URL implements Serial *** 400,407 **** // is to be excluded by passing the 'limit' as the indexOf the '#' // if one exists, otherwise pass the end of the string. int hashAt = spec.indexOf('#', colon + 1); ! this.handler.parseURL(this, spec, colon + 1, ! hashAt < 0 ? spec.length() : hashAt); if (hashAt >= 0) ref = spec.substring(hashAt + 1); --- 437,453 ---- // is to be excluded by passing the 'limit' as the indexOf the '#' // if one exists, otherwise pass the end of the string. int hashAt = spec.indexOf('#', colon + 1); ! ! try ! { ! this.ph.parseURL(this, spec, colon + 1, ! hashAt < 0 ? spec.length() : hashAt); ! } ! catch (URLParseError e) ! { ! throw new MalformedURLException(e.getMessage()); ! } ! if (hashAt >= 0) ref = spec.substring(hashAt + 1); *************** public final class URL implements Serial *** 418,431 **** * * @return true if the URL is equal, false otherwise */ ! public boolean equals(Object obj) { ! if (obj == null || ! (obj instanceof URL)) return false; ! URL uObj = (URL) obj; ! ! return handler.equals (this, uObj); } /** --- 464,475 ---- * * @return true if the URL is equal, false otherwise */ ! public boolean equals (Object obj) { ! if (! (obj instanceof URL)) return false; ! return ph.equals (this, (URL) obj); } /** *************** public final class URL implements Serial *** 446,451 **** --- 490,499 ---- /** * Gets the contents of this URL * + * @param classes The allow classes for the content object. + * + * @return a context object for this URL. + * * @exception IOException If an error occurs */ public final Object getContent (Class[] classes) throws IOException *************** public final class URL implements Serial *** 458,463 **** --- 506,513 ---- * Returns the file portion of the URL. * Defined as path[?query]. * Returns the empty string if there is no file portion. + * + * @return The filename specified in this URL. */ public String getFile() { *************** public final class URL implements Serial *** 468,483 **** * Returns the path of the URL. This is the part of the file before any '?' * character. * * @since 1.3 */ public String getPath() { ! int quest = file.indexOf('?'); ! return quest < 0 ? file : file.substring(0, quest); } /** * Returns the authority of the URL * * @since 1.3 */ --- 518,537 ---- * Returns the path of the URL. This is the part of the file before any '?' * character. * + * @return The path specified in this URL. + * * @since 1.3 */ public String getPath() { ! int quest = (file == null) ? -1 : file.indexOf('?'); ! return quest < 0 ? getFile() : file.substring(0, quest); } /** * Returns the authority of the URL + * + * @return The authority specified in this URL. * * @since 1.3 */ *************** public final class URL implements Serial *** 488,493 **** --- 542,549 ---- /** * Returns the host of the URL + * + * @return The host specified in this URL. */ public String getHost() { *************** public final class URL implements Serial *** 511,524 **** /** * Returns the default port of the URL. If the StreamHandler for the URL * protocol does not define a default port it returns -1. */ public int getDefaultPort() { ! return handler.getDefaultPort(); } /** * Returns the protocol of the URL */ public String getProtocol() { --- 567,584 ---- /** * Returns the default port of the URL. If the StreamHandler for the URL * protocol does not define a default port it returns -1. + * + * @return The default port of the current protocol. */ public int getDefaultPort() { ! return ph.getDefaultPort(); } /** * Returns the protocol of the URL + * + * @return The specified protocol. */ public String getProtocol() { *************** public final class URL implements Serial *** 544,550 **** */ public String getUserInfo () { ! int at = host.indexOf('@'); return at < 0 ? null : host.substring(0, at); } --- 604,610 ---- */ public String getUserInfo () { ! int at = (host == null) ? -1 : host.indexOf('@'); return at < 0 ? null : host.substring(0, at); } *************** public final class URL implements Serial *** 552,574 **** * Returns the query of the URL. This is the part of the file before the * '?'. * ! * @ return the query part of the file, or null when there is no query part. */ public String getQuery () { ! int quest = file.indexOf('?'); return quest < 0 ? null : file.substring(quest + 1, file.length()); } /** * Returns a hashcode computed by the URLStreamHandler of this URL */ public int hashCode() { if (hashCode != 0) return hashCode; // Use cached value if available. else ! return handler.hashCode (this); } /** --- 612,636 ---- * Returns the query of the URL. This is the part of the file before the * '?'. * ! * @return the query part of the file, or null when there is no query part. */ public String getQuery () { ! int quest = (file == null) ? -1 : file.indexOf('?'); return quest < 0 ? null : file.substring(quest + 1, file.length()); } /** * Returns a hashcode computed by the URLStreamHandler of this URL + * + * @return The hashcode for this URL. */ public int hashCode() { if (hashCode != 0) return hashCode; // Use cached value if available. else ! return ph.hashCode (this); } /** *************** public final class URL implements Serial *** 577,593 **** * openConnection() method of the protocol handler * * @return A URLConnection for this URL * @exception IOException If an error occurs */ public URLConnection openConnection() throws IOException { ! return handler.openConnection(this); } /** * Opens a connection to this URL and returns an InputStream for reading * from that connection * * @exception IOException If an error occurs */ public final InputStream openStream() throws IOException --- 639,658 ---- * openConnection() method of the protocol handler * * @return A URLConnection for this URL + * * @exception IOException If an error occurs */ public URLConnection openConnection() throws IOException { ! return ph.openConnection(this); } /** * Opens a connection to this URL and returns an InputStream for reading * from that connection * + * @return An InputStream for this URL. + * * @exception IOException If an error occurs */ public final InputStream openStream() throws IOException *************** public final class URL implements Serial *** 607,613 **** */ public boolean sameFile(URL other) { ! return handler.sameFile(this, other); } /** --- 672,678 ---- */ public boolean sameFile(URL other) { ! return ph.sameFile(this, other); } /** *************** public final class URL implements Serial *** 629,635 **** // invalid protocol. It will cause the handler to be set to null // thus overriding a valid handler. Callers of this method should // be aware of this. ! this.handler = getURLStreamHandler(protocol); this.protocol = protocol.toLowerCase(); this.authority = null; this.port = port; --- 694,700 ---- // invalid protocol. It will cause the handler to be set to null // thus overriding a valid handler. Callers of this method should // be aware of this. ! this.ph = getURLStreamHandler(protocol); this.protocol = protocol.toLowerCase(); this.authority = null; this.port = port; *************** public final class URL implements Serial *** 644,649 **** --- 709,723 ---- * that only URLStreamHandlers can modify URL fields. URLs are otherwise * constant. * + * @param protocol The protocol name for this URL. + * @param host The hostname or IP address for this URL. + * @param port The port number of this URL. + * @param authority The authority of this URL. + * @param userInfo The user and password (if needed) of this URL. + * @param path The "path" portion of this URL. + * @param query The query of this URL. + * @param ref The anchor portion of this URL. + * * @since 1.3 */ protected void set(String protocol, String host, int port, *************** public final class URL implements Serial *** 654,660 **** // invalid protocol. It will cause the handler to be set to null // thus overriding a valid handler. Callers of this method should // be aware of this. ! this.handler = getURLStreamHandler(protocol); this.protocol = protocol.toLowerCase(); if (userInfo == null) this.host = host; --- 728,734 ---- // invalid protocol. It will cause the handler to be set to null // thus overriding a valid handler. Callers of this method should // be aware of this. ! this.ph = getURLStreamHandler(protocol); this.protocol = protocol.toLowerCase(); if (userInfo == null) this.host = host; *************** public final class URL implements Serial *** 703,709 **** public String toExternalForm() { // Identical to toString(). ! return handler.toExternalForm(this); } /** --- 777,783 ---- public String toExternalForm() { // Identical to toString(). ! return ph.toExternalForm(this); } /** *************** public final class URL implements Serial *** 716,744 **** public String toString() { // Identical to toExternalForm(). ! return handler.toExternalForm(this); } private static synchronized URLStreamHandler ! getURLStreamHandler(String protocol) { ! URLStreamHandler handler; ! // See if a handler has been cached for this protocol. ! if ((handler = (URLStreamHandler) handlers.get(protocol)) != null) ! return handler; // If a non-default factory has been set, use it to find the protocol. if (factory != null) ! handler = factory.createURLStreamHandler(protocol); else if (protocol.equals ("core")) { ! handler = new gnu.gcj.protocol.core.Handler (); } else if (protocol.equals ("file")) { // This is an interesting case. It's tempting to think that we ! // could call Class.forName ("gnu.gcj.protocol.file.Handler") to // get the appropriate class. Unfortunately, if we do that the // program will never terminate, because getURLStreamHandler is // eventually called by Class.forName. --- 790,831 ---- public String toString() { // Identical to toExternalForm(). ! return ph.toExternalForm(this); } + /** + * This internal method is used in two different constructors to load + * a protocol handler for this URL. + * + * @param protocol The protocol to load a handler for + * + * @return A URLStreamHandler for this protocol, or null when not found. + */ private static synchronized URLStreamHandler ! getURLStreamHandler (String protocol) { ! URLStreamHandler ph = null; ! // First, see if a protocol handler is in our cache. ! if (cache_handlers) ! { ! if ((ph = (URLStreamHandler) ph_cache.get (protocol)) != null) ! return ph; ! } // If a non-default factory has been set, use it to find the protocol. if (factory != null) ! { ! ph = factory.createURLStreamHandler (protocol); ! } else if (protocol.equals ("core")) { ! ph = new gnu.java.net.protocol.core.Handler(); } else if (protocol.equals ("file")) { // This is an interesting case. It's tempting to think that we ! // could call Class.forName ("gnu.java.net.protocol.file.Handler") to // get the appropriate class. Unfortunately, if we do that the // program will never terminate, because getURLStreamHandler is // eventually called by Class.forName. *************** public final class URL implements Serial *** 747,802 **** // fix this problem. If other protocols are required in a // statically linked application they will need to be handled in // the same way as "file". ! handler = new gnu.gcj.protocol.file.Handler (); } // Non-default factory may have returned null or a factory wasn't set. // Use the default search algorithm to find a handler for this protocol. ! if (handler == null) { // Get the list of packages to check and append our default handler // to it, along with the JDK specified default as a last resort. // Except in very unusual environments the JDK specified one shouldn't // ever be needed (or available). ! String propVal = System.getProperty("java.protocol.handler.pkgs"); ! propVal = (propVal == null) ? "" : (propVal + "|"); ! propVal = propVal + "gnu.gcj.protocol|sun.net.www.protocol"; ! StringTokenizer pkgPrefix = new StringTokenizer(propVal, "|"); do ! { ! String facName = pkgPrefix.nextToken() + "." + protocol + ! ".Handler"; ! try ! { ! handler = ! (URLStreamHandler) Class.forName(facName).newInstance(); ! } ! catch (Exception e) ! { ! // Can't instantiate; handler still null, go on to next element. ! } ! } while ((handler == null || ! ! (handler instanceof URLStreamHandler)) && ! pkgPrefix.hasMoreTokens()); } // Update the hashtable with the new protocol handler. ! if (handler != null) ! if (handler instanceof URLStreamHandler) ! handlers.put(protocol, handler); else ! handler = null; ! return handler; } private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { ois.defaultReadObject(); ! this.handler = getURLStreamHandler(protocol); ! if (this.handler == null) throw new IOException("Handler for protocol " + protocol + " not found"); } --- 834,903 ---- // fix this problem. If other protocols are required in a // statically linked application they will need to be handled in // the same way as "file". ! ph = new gnu.java.net.protocol.file.Handler(); } // Non-default factory may have returned null or a factory wasn't set. // Use the default search algorithm to find a handler for this protocol. ! if (ph == null) { // Get the list of packages to check and append our default handler // to it, along with the JDK specified default as a last resort. // Except in very unusual environments the JDK specified one shouldn't // ever be needed (or available). ! String ph_search_path = ! System.getProperty("java.protocol.handler.pkgs"); ! // Tack our default package on at the ends. ! if (ph_search_path != null) ! ph_search_path += "|" + DEFAULT_SEARCH_PATH; ! else ! ph_search_path = DEFAULT_SEARCH_PATH; ! ! // Finally loop through our search path looking for a match. ! StringTokenizer pkgPrefix = new StringTokenizer (ph_search_path, "|"); ! do ! { ! String clsName = (pkgPrefix.nextToken() + "." ! + protocol + ".Handler"); ! ! try ! { ! Object obj = Class.forName (clsName).newInstance(); ! ! if (!(obj instanceof URLStreamHandler)) ! continue; ! else ! ph = (URLStreamHandler) obj; ! } ! catch (Exception e) ! { ! // Can't instantiate; handler still null, ! // go on to next element. ! } ! } ! while ((! (ph instanceof URLStreamHandler)) ! && pkgPrefix.hasMoreTokens()); } // Update the hashtable with the new protocol handler. ! if (ph != null ! && cache_handlers) ! if (ph instanceof URLStreamHandler) ! ph_cache.put (protocol, ph); else ! ph = null; ! return ph; } private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { ois.defaultReadObject(); ! this.ph = getURLStreamHandler(protocol); ! if (this.ph == null) throw new IOException("Handler for protocol " + protocol + " not found"); } diff -Nrc3pad gcc-3.3.3/libjava/java/net/URLStreamHandlerFactory.java gcc-3.4.0/libjava/java/net/URLStreamHandlerFactory.java *** gcc-3.3.3/libjava/java/net/URLStreamHandlerFactory.java 2002-01-22 22:40:23.000000000 +0000 --- gcc-3.4.0/libjava/java/net/URLStreamHandlerFactory.java 2003-10-13 05:03:39.000000000 +0000 *************** *** 1,5 **** /* URLStreamHandlerFactory.java -- Maps protocols to URLStreamHandlers ! Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* URLStreamHandlerFactory.java -- Maps protocols to URLStreamHandlers ! Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** package java.net; *** 46,68 **** /** * This interface contains one method which maps the protocol portion of * a URL (eg, "http" in "http://www.urbanophile.com/arenn/") to a ! * URLStreamHandler object. * * @author Aaron M. Renn (arenn@urbanophile.com) * @author Warren Levy */ public interface URLStreamHandlerFactory { ! /** ! * This method maps the protocol portion of a URL to a URLStreamHandler ! * object. ! * ! * @param protocol The protocol name to map ("http", "ftp", etc). ! * ! * @return The URLStreamHandler for the specified protocol ! */ ! URLStreamHandler ! createURLStreamHandler(String protocol); } // interface URLStreamHandlerFactory --- 46,67 ---- /** * This interface contains one method which maps the protocol portion of * a URL (eg, "http" in "http://www.urbanophile.com/arenn/") to a ! * URLStreamHandler object. * * @author Aaron M. Renn (arenn@urbanophile.com) * @author Warren Levy */ public interface URLStreamHandlerFactory { ! /** ! * This method maps the protocol portion of a URL to a ! * URLStreamHandler object. ! * ! * @param protocol The protocol name to map ("http", "ftp", etc). ! * ! * @return The URLStreamHandler for the specified protocol ! */ ! URLStreamHandler createURLStreamHandler (String protocol); } // interface URLStreamHandlerFactory diff -Nrc3pad gcc-3.3.3/libjava/java/net/URLStreamHandler.java gcc-3.4.0/libjava/java/net/URLStreamHandler.java *** gcc-3.3.3/libjava/java/net/URLStreamHandler.java 2003-03-01 23:37:51.000000000 +0000 --- gcc-3.4.0/libjava/java/net/URLStreamHandler.java 2003-11-26 21:25:41.000000000 +0000 *************** public abstract class URLStreamHandler *** 129,139 **** if (spec.regionMatches (start, "//", 0, 2)) { int hostEnd; ! int colon; start += 2; ! int slash = spec.indexOf('/', start); if (slash >= 0) hostEnd = slash; else --- 129,140 ---- if (spec.regionMatches (start, "//", 0, 2)) { + String genuineHost; int hostEnd; ! int colon, at_host; start += 2; ! int slash = spec.indexOf ('/', start); if (slash >= 0) hostEnd = slash; else *************** public abstract class URLStreamHandler *** 141,164 **** host = spec.substring (start, hostEnd); // Look for optional port number. It is valid for the non-port // part of the host name to be null (e.g. a URL "http://:80"). // TBD: JDK 1.2 in this case sets host to null rather than ""; // this is undocumented and likely an unintended side effect in 1.2 // so we'll be simple here and stick with "". Note that // "http://" or "http:///" produce a "" host in JDK 1.2. ! if ((colon = host.indexOf(':')) >= 0) { try { ! port = Integer.parseInt(host.substring(colon + 1)); } catch (NumberFormatException e) { ; // Ignore invalid port values; port is already set to u's // port. } ! host = host.substring(0, colon); } file = null; start = hostEnd; --- 142,178 ---- host = spec.substring (start, hostEnd); + // We first need a genuine host name (with userinfo). + // So we check for '@': if it's present check the port in the + // section after '@' in the other case check it in the full string. + // P.S.: We don't care having '@' at the beginning of the string. + if ((at_host = host.indexOf ('@')) >= 0) + genuineHost = host.substring (at_host); + else + genuineHost = host; + // Look for optional port number. It is valid for the non-port // part of the host name to be null (e.g. a URL "http://:80"). // TBD: JDK 1.2 in this case sets host to null rather than ""; // this is undocumented and likely an unintended side effect in 1.2 // so we'll be simple here and stick with "". Note that // "http://" or "http:///" produce a "" host in JDK 1.2. ! if ((colon = genuineHost.indexOf (':')) >= 0) { try { ! port = Integer.parseInt (genuineHost.substring (colon + 1)); } catch (NumberFormatException e) { ; // Ignore invalid port values; port is already set to u's // port. } ! // Now we must cut the port number in the original string. ! if (at_host >= 0) ! host = host.substring (0, at_host + colon); ! else ! host = host.substring (0, colon); } file = null; start = hostEnd; *************** public abstract class URLStreamHandler *** 176,182 **** } else if (start < end) { ! // Context is available, but only override it if there is a new file. char sepChar = '/'; int lastSlash = file.lastIndexOf (sepChar); if (lastSlash < 0 && File.separatorChar != sepChar --- 190,196 ---- } else if (start < end) { ! // Context is available, but only override it if there is a new file. char sepChar = '/'; int lastSlash = file.lastIndexOf (sepChar); if (lastSlash < 0 && File.separatorChar != sepChar *************** public abstract class URLStreamHandler *** 196,205 **** --- 210,224 ---- // need to canonicalise the file path. try { + boolean endsWithSlash = file.charAt(file.length() - 1) == '/'; file = new File (file).getCanonicalPath (); + if (endsWithSlash + && file.charAt(file.length() - 1) != '/') + file += '/'; } catch (IOException e) { + // Do nothing. } } *************** public abstract class URLStreamHandler *** 225,230 **** --- 244,252 ---- setURL(url, url.getProtocol(), host, port, file, ref); } + /* + * Canonicalize a filename. + */ private static String canonicalizeFilename(String file) { // XXX - GNU Classpath has an implementation that might be more appropriate *************** public abstract class URLStreamHandler *** 257,262 **** --- 279,286 ---- * @param url1 The first url * @param url2 The second url to compare with the first * + * @return True if both URLs point to the same file, false otherwise. + * * @specnote Now protected */ protected boolean sameFile(URL url1, URL url2) *************** public abstract class URLStreamHandler *** 265,271 **** return true; // This comparison is very conservative. It assumes that any // field can be null. ! if (url1 == null || url2 == null || url1.getPort() != url2.getPort()) return false; String s1, s2; s1 = url1.getProtocol(); --- 289,303 ---- return true; // This comparison is very conservative. It assumes that any // field can be null. ! if (url1 == null || url2 == null) ! return false; ! int p1 = url1.getPort (); ! if (p1 == -1) ! p1 = url1.ph.getDefaultPort (); ! int p2 = url2.getPort (); ! if (p2 == -1) ! p2 = url2.ph.getDefaultPort (); ! if (p1 != p2) return false; String s1, s2; s1 = url1.getProtocol(); *************** public abstract class URLStreamHandler *** 337,342 **** --- 369,376 ---- * * @param url1 An URL object * @param url2 An URL object + * + * @return True if both given URLs are equal, false otherwise. */ protected boolean equals (URL url1, URL url2) { *************** public abstract class URLStreamHandler *** 369,394 **** /** * Compares the host components of two URLs. * * @exception UnknownHostException If an unknown host is found */ protected boolean hostsEqual (URL url1, URL url2) - throws UnknownHostException { ! InetAddress addr1 = InetAddress.getByName (url1.getHost ()); ! InetAddress addr2 = InetAddress.getByName (url2.getHost ()); ! return addr1.equals (addr2); } /** * Get the IP address of our host. An empty host field or a DNS failure will * result in a null return. */ protected InetAddress getHostAddress (URL url) { String hostname = url.getHost (); ! if (hostname == "") return null; try --- 403,445 ---- /** * Compares the host components of two URLs. * + * @param url1 The first URL. + * @param url2 The second URL. + * + * @return True if both URLs contain the same host. + * * @exception UnknownHostException If an unknown host is found */ protected boolean hostsEqual (URL url1, URL url2) { ! InetAddress addr1 = getHostAddress (url1); ! InetAddress addr2 = getHostAddress (url2); ! if (addr1 != null || addr2 != null) ! return addr1.equals (addr2); ! ! String host1 = url1.getHost(); ! String host2 = url2.getHost(); ! ! if (host1 != null && host2 != null) ! return host1.equalsIgnoreCase (host2); ! ! return host1 == null && host2 == null; } /** * Get the IP address of our host. An empty host field or a DNS failure will * result in a null return. + * + * @param url The URL to return the host address for. + * + * @return The address of the hostname in url. */ protected InetAddress getHostAddress (URL url) { String hostname = url.getHost (); ! if (hostname.equals("")) return null; try *************** public abstract class URLStreamHandler *** 404,409 **** --- 455,462 ---- /** * Returns the default port for a URL parsed by this handler. This method is * meant to be overidden by handlers with default port numbers. + * + * @return The default port number. */ protected int getDefaultPort () { *************** public abstract class URLStreamHandler *** 413,418 **** --- 466,475 ---- /** * Provides the default hash calculation. May be overidden by handlers for * other protocols that have different requirements for hashCode calculation. + * + * @param url The URL to calc the hashcode for. + * + * @return The hashcode for the given URL. */ protected int hashCode (URL url) { *************** public abstract class URLStreamHandler *** 428,437 **** * that have a different syntax should override this method * * @param url The URL object to convert */ protected String toExternalForm(URL u) { ! String protocol, host, file, ref; int port; protocol = u.getProtocol(); --- 485,496 ---- * that have a different syntax should override this method * * @param url The URL object to convert + * + * @return A string representation of the url */ protected String toExternalForm(URL u) { ! String protocol, host, file, ref, user; int port; protocol = u.getProtocol(); *************** public abstract class URLStreamHandler *** 445,469 **** port = u.getPort(); file = u.getFile(); ref = u.getRef(); // Guess a reasonable size for the string buffer so we have to resize // at most once. int size = protocol.length() + host.length() + file.length() + 24; StringBuffer sb = new StringBuffer(size); ! sb.append(protocol); ! sb.append(':'); if (host.length() != 0) ! sb.append("//").append(host); ! // Note that this produces different results from JDK 1.2 as JDK 1.2 ! // ignores a non-default port if host is null or "". That is inconsistent ! // with the spec since the result of this method is spec'ed so it can be ! // used to construct a new URL that is equivalent to the original. ! boolean port_needed = port > 0 && port != getDefaultPort(); ! if (port_needed) ! sb.append(':').append(port); sb.append(file); --- 504,533 ---- port = u.getPort(); file = u.getFile(); ref = u.getRef(); + user = u.getUserInfo(); // Guess a reasonable size for the string buffer so we have to resize // at most once. int size = protocol.length() + host.length() + file.length() + 24; StringBuffer sb = new StringBuffer(size); ! if (protocol != null && protocol.length() > 0) ! { ! sb.append(protocol); ! sb.append(":"); ! } if (host.length() != 0) ! { ! sb.append("//"); ! if (user != null && !"".equals(user)) ! sb.append(user).append('@'); ! sb.append(host); ! // Append port if port was in URL spec. ! if (port >= 0) ! sb.append(':').append(port); ! } sb.append(file); diff -Nrc3pad gcc-3.3.3/libjava/java/nio/Buffer.java gcc-3.4.0/libjava/java/nio/Buffer.java *** gcc-3.3.3/libjava/java/nio/Buffer.java 2003-02-11 21:08:49.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/Buffer.java 2003-10-13 04:45:03.000000000 +0000 *************** *** 1,5 **** /* Buffer.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Buffer.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,48 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.nio; public abstract class Buffer { ! private int cap = 0; ! private int limit = 0; ! private int pos = 0; ! private int mark = -1; // Creates a new Buffer. // --- 35,49 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package java.nio; public abstract class Buffer { ! int cap = 0; ! int limit = 0; ! int pos = 0; ! int mark = -1; // Creates a new Buffer. // *************** public abstract class Buffer *** 57,63 **** limit (limit); position (position); ! if (mark > 0) { if (mark > pos) throw new IllegalArgumentException (); --- 58,64 ---- limit (limit); position (position); ! if (mark >= 0) { if (mark > pos) throw new IllegalArgumentException (); *************** public abstract class Buffer *** 101,107 **** */ public final boolean hasRemaining () { ! return limit > pos; } /** --- 102,108 ---- */ public final boolean hasRemaining () { ! return remaining() > 0; } /** diff -Nrc3pad gcc-3.3.3/libjava/java/nio/ByteBufferHelper.java gcc-3.4.0/libjava/java/nio/ByteBufferHelper.java *** gcc-3.3.3/libjava/java/nio/ByteBufferHelper.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/ByteBufferHelper.java 2004-02-08 21:18:37.000000000 +0000 *************** *** 0 **** --- 1,381 ---- + /* ByteBufferImpl.java -- + Copyright (C) 2003, 2004 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package java.nio; + + /** + * @author Michael Koch + */ + final class ByteBufferHelper + { + private static void checkRemainingForRead (ByteBuffer buffer, int bytes) + { + if (buffer.remaining() < bytes) + throw new BufferUnderflowException(); + } + + private static void checkRemainingForWrite (ByteBuffer buffer, int bytes) + { + if (buffer.remaining() < bytes) + throw new BufferOverflowException(); + } + + private static void checkAvailableForRead (ByteBuffer buffer, + int index, int bytes) + { + if (buffer.limit() < (index + bytes)) + throw new BufferUnderflowException(); + } + + private static void checkAvailableForWrite (ByteBuffer buffer, + int index, int bytes) + { + if (buffer.limit() < (index + bytes)) + throw new BufferOverflowException(); + } + + public static char getChar (ByteBuffer buffer, ByteOrder order) + { + return (char) getShort (buffer, order); + } + + public static void putChar (ByteBuffer buffer, char value, ByteOrder order) + { + putShort (buffer, (short) value, order); + } + + public static char getChar (ByteBuffer buffer, int index, ByteOrder order) + { + return (char) getShort (buffer, index, order); + } + + public static void putChar (ByteBuffer buffer, int index, + char value, ByteOrder order) + { + putShort (buffer, index, (short) value, order); + } + + public static short getShort (ByteBuffer buffer, ByteOrder order) + { + checkRemainingForRead (buffer, 2); + + if (order == ByteOrder.LITTLE_ENDIAN) + { + return (short) ((buffer.get() & 0xff) + + (buffer.get() << 8)); + } + + return (short) ((buffer.get() << 8) + + (buffer.get() & 0xff)); + } + + public static void putShort (ByteBuffer buffer, short value, ByteOrder order) + { + checkRemainingForWrite (buffer, 2); + + if (order == ByteOrder.LITTLE_ENDIAN) + { + buffer.put ((byte) value); + buffer.put ((byte) (value >> 8)); + } + else + { + buffer.put ((byte) (value >> 8)); + buffer.put ((byte) value); + } + } + + public static short getShort (ByteBuffer buffer, + int index, ByteOrder order) + { + checkAvailableForRead (buffer, index, 2); + + if (order == ByteOrder.LITTLE_ENDIAN) + { + return (short) ((buffer.get (index) & 0xff) + + (buffer.get (++index) << 8)); + } + + return (short) ((buffer.get (index) << 8) + + (buffer.get (++index) & 0xff)); + } + + public static void putShort (ByteBuffer buffer, int index, + short value, ByteOrder order) + { + checkAvailableForWrite (buffer, index, 2); + + if (order == ByteOrder.LITTLE_ENDIAN) + { + buffer.put (index, (byte) value); + buffer.put (++index, (byte) (value >> 8)); + } + else + { + buffer.put (index, (byte) (value >> 8)); + buffer.put (++index, (byte) value); + } + } + + public static int getInt (ByteBuffer buffer, ByteOrder order) + { + checkRemainingForRead (buffer, 4); + + if (order == ByteOrder.LITTLE_ENDIAN) + { + return ((buffer.get() & 0xff) + + ((buffer.get() & 0xff) << 8) + + ((buffer.get() & 0xff) << 16) + + (buffer.get() << 24)); + } + + return (int) ((buffer.get() << 24) + + ((buffer.get() & 0xff) << 16) + + ((buffer.get() & 0xff) << 8) + + (buffer.get() & 0xff)); + } + + public static void putInt (ByteBuffer buffer, int value, ByteOrder order) + { + checkRemainingForWrite (buffer, 4); + + if (order == ByteOrder.LITTLE_ENDIAN) + { + buffer.put ((byte) value); + buffer.put ((byte) (value >> 8)); + buffer.put ((byte) (value >> 16)); + buffer.put ((byte) (value >> 24)); + } + else + { + buffer.put ((byte) (value >> 24)); + buffer.put ((byte) (value >> 16)); + buffer.put ((byte) (value >> 8)); + buffer.put ((byte) value); + } + } + + public static int getInt (ByteBuffer buffer, int index, ByteOrder order) + { + checkAvailableForRead (buffer, index, 4); + + if (order == ByteOrder.LITTLE_ENDIAN) + { + return ((buffer.get (index) & 0xff) + + ((buffer.get (++index) & 0xff) << 8) + + ((buffer.get (++index) & 0xff) << 16) + + (buffer.get (++index) << 24)); + } + + return ((buffer.get (index) << 24) + + ((buffer.get (++index) & 0xff) << 16) + + ((buffer.get (++index) & 0xff) << 8) + + (buffer.get (++index) & 0xff)); + } + + public static void putInt (ByteBuffer buffer, int index, + int value, ByteOrder order) + { + checkAvailableForWrite (buffer, index, 4); + + if (order == ByteOrder.LITTLE_ENDIAN) + { + buffer.put (index, (byte) value); + buffer.put (++index, (byte) (value >> 8)); + buffer.put (++index, (byte) (value >> 16)); + buffer.put (++index, (byte) (value >> 24)); + } + else + { + buffer.put (index, (byte) (value >> 24)); + buffer.put (++index, (byte) (value >> 16)); + buffer.put (++index, (byte) (value >> 8)); + buffer.put (++index, (byte) value); + } + } + + public static long getLong (ByteBuffer buffer, ByteOrder order) + { + checkRemainingForRead (buffer, 8); + + if (order == ByteOrder.LITTLE_ENDIAN) + { + return ((buffer.get() & 0xff) + + (((buffer.get() & 0xff)) << 8) + + (((buffer.get() & 0xff)) << 16) + + (((buffer.get() & 0xffL)) << 24) + + (((buffer.get() & 0xffL)) << 32) + + (((buffer.get() & 0xffL)) << 40) + + (((buffer.get() & 0xffL)) << 48) + + (((long) buffer.get()) << 56)); + } + + return ((((long) buffer.get()) << 56) + + ((buffer.get() & 0xffL) << 48) + + ((buffer.get() & 0xffL) << 40) + + ((buffer.get() & 0xffL) << 32) + + ((buffer.get() & 0xffL) << 24) + + ((buffer.get() & 0xff) << 16) + + ((buffer.get() & 0xff) << 8) + + (buffer.get() & 0xff)); + } + + public static void putLong (ByteBuffer buffer, long value, ByteOrder order) + { + checkRemainingForWrite (buffer, 8); + + if (order == ByteOrder.LITTLE_ENDIAN) + { + buffer.put ((byte) value); + buffer.put ((byte) (value >> 8)); + buffer.put ((byte) (value >> 16)); + buffer.put ((byte) (value >> 24)); + buffer.put ((byte) (value >> 32)); + buffer.put ((byte) (value >> 40)); + buffer.put ((byte) (value >> 48)); + buffer.put ((byte) (value >> 56)); + } + else + { + buffer.put ((byte) (value >> 56)); + buffer.put ((byte) (value >> 48)); + buffer.put ((byte) (value >> 40)); + buffer.put ((byte) (value >> 32)); + buffer.put ((byte) (value >> 24)); + buffer.put ((byte) (value >> 16)); + buffer.put ((byte) (value >> 8)); + buffer.put ((byte) value); + } + } + + public static long getLong (ByteBuffer buffer, int index, ByteOrder order) + { + checkAvailableForRead (buffer, index, 8); + + if (order == ByteOrder.LITTLE_ENDIAN) + { + return ((buffer.get (index) & 0xff) + + ((buffer.get (++index) & 0xff) << 8) + + ((buffer.get (++index) & 0xff) << 16) + + ((buffer.get (++index) & 0xffL) << 24) + + ((buffer.get (++index) & 0xffL) << 32) + + ((buffer.get (++index) & 0xffL) << 40) + + ((buffer.get (++index) & 0xffL) << 48) + + (((long) buffer.get (++index)) << 56)); + } + + return ((((long) buffer.get (index)) << 56) + + ((buffer.get (++index) & 0xffL) << 48) + + ((buffer.get (++index) & 0xffL) << 40) + + ((buffer.get (++index) & 0xffL) << 32) + + ((buffer.get (++index) & 0xffL) << 24) + + ((buffer.get (++index) & 0xff) << 16) + + ((buffer.get (++index) & 0xff) << 8) + + (buffer.get (++index) & 0xff)); + } + + public static void putLong (ByteBuffer buffer, int index, + long value, ByteOrder order) + { + checkAvailableForWrite (buffer, index, 8); + + if (order == ByteOrder.LITTLE_ENDIAN) + { + buffer.put (index, (byte) value); + buffer.put (++index, (byte) (value >> 8)); + buffer.put (++index, (byte) (value >> 16)); + buffer.put (++index, (byte) (value >> 24)); + buffer.put (++index, (byte) (value >> 32)); + buffer.put (++index, (byte) (value >> 40)); + buffer.put (++index, (byte) (value >> 48)); + buffer.put (++index, (byte) (value >> 56)); + } + else + { + buffer.put (index, (byte) (value >> 56)); + buffer.put (++index, (byte) (value >> 48)); + buffer.put (++index, (byte) (value >> 40)); + buffer.put (++index, (byte) (value >> 32)); + buffer.put (++index, (byte) (value >> 24)); + buffer.put (++index, (byte) (value >> 16)); + buffer.put (++index, (byte) (value >> 8)); + buffer.put (++index, (byte) value); + } + } + + public static float getFloat (ByteBuffer buffer, ByteOrder order) + { + return Float.intBitsToFloat (getInt (buffer, order)); + } + + public static void putFloat (ByteBuffer buffer, float value, ByteOrder order) + { + putInt (buffer, Float.floatToRawIntBits (value), order); + } + + public static float getFloat (ByteBuffer buffer, int index, ByteOrder order) + { + return Float.intBitsToFloat (getInt (buffer, index, order)); + } + + public static void putFloat (ByteBuffer buffer, int index, + float value, ByteOrder order) + { + putInt (buffer, index, Float.floatToRawIntBits (value), order); + } + + public static double getDouble (ByteBuffer buffer, ByteOrder order) + { + return Double.longBitsToDouble (getLong (buffer, order)); + } + + public static void putDouble (ByteBuffer buffer, double value, ByteOrder order) + { + putLong (buffer, Double.doubleToLongBits (value), order); + } + + public static double getDouble (ByteBuffer buffer, int index, ByteOrder order) + { + return Double.longBitsToDouble (getLong (buffer, index, order)); + } + + public static void putDouble (ByteBuffer buffer, int index, + double value, ByteOrder order) + { + putLong (buffer, index, Double.doubleToLongBits (value), order); + } + } // ByteBufferHelper diff -Nrc3pad gcc-3.3.3/libjava/java/nio/ByteBufferImpl.java gcc-3.4.0/libjava/java/nio/ByteBufferImpl.java *** gcc-3.3.3/libjava/java/nio/ByteBufferImpl.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/ByteBufferImpl.java 2004-02-08 21:18:37.000000000 +0000 *************** *** 0 **** --- 1,313 ---- + /* ByteBufferImpl.java -- + Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.nio; + + /** + * This is a Heap memory implementation + */ + final class ByteBufferImpl extends ByteBuffer + { + private boolean readOnly; + + ByteBufferImpl (int capacity) + { + this (new byte [capacity], 0, capacity, capacity, 0, -1, false); + } + + ByteBufferImpl (byte[] buffer, int offset, int capacity, int limit, int position, int mark, boolean readOnly) + { + super (buffer, offset, capacity, limit, position, mark); + this.readOnly = readOnly; + } + + public CharBuffer asCharBuffer () + { + return new CharViewBufferImpl (this, position (), remaining(), remaining (), 0, -1, isReadOnly (), order()); + } + + public ShortBuffer asShortBuffer () + { + return new ShortViewBufferImpl (this, position (), remaining(), remaining (), 0, -1, isReadOnly (), order()); + } + + public IntBuffer asIntBuffer () + { + return new IntViewBufferImpl (this, position (), remaining(), remaining (), 0, -1, isReadOnly (), order()); + } + + public LongBuffer asLongBuffer () + { + return new LongViewBufferImpl (this, position (), remaining(), remaining (), 0, -1, isReadOnly (), order()); + } + + public FloatBuffer asFloatBuffer () + { + return new FloatViewBufferImpl (this, position (), remaining(), remaining (), 0, -1, isReadOnly (), order()); + } + + public DoubleBuffer asDoubleBuffer () + { + return new DoubleViewBufferImpl (this, position (), remaining(), remaining (), 0, -1, isReadOnly (), order()); + } + + public boolean isReadOnly () + { + return readOnly; + } + + public ByteBuffer slice () + { + return new ByteBufferImpl (backing_buffer, array_offset + position (), remaining (), remaining (), 0, -1, isReadOnly ()); + } + + public ByteBuffer duplicate () + { + return new ByteBufferImpl (backing_buffer, array_offset, capacity (), limit (), position (), mark, isReadOnly ()); + } + + public ByteBuffer asReadOnlyBuffer () + { + return new ByteBufferImpl (backing_buffer, array_offset, capacity (), limit (), position (), mark, true); + } + + public ByteBuffer compact () + { + int pos = position(); + if (pos > 0) + { + int count = remaining(); + shiftDown(0, pos, count); + position(count); + limit(capacity()); + } + return this; + } + + public boolean isDirect () + { + return false; + } + + /** + * Relative get method. Reads the next byte from the buffer. + */ + final public byte get () + { + byte result = backing_buffer [position ()]; + position (position () + 1); + return result; + } + + /** + * Relative put method. Writes value to the next position + * in the buffer. + * + * @exception ReadOnlyBufferException If this buffer is read-only. + */ + final public ByteBuffer put (byte value) + { + if (readOnly) + throw new ReadOnlyBufferException (); + + backing_buffer [position ()] = value; + position (position () + 1); + return this; + } + + /** + * Absolute get method. Reads the byte at position + * index. + * + * @exception IndexOutOfBoundsException If index is negative or not smaller + * than the buffer's limit. + */ + final public byte get (int index) + { + return backing_buffer [index]; + } + + /** + * Absolute put method. Writes value to position + * index in the buffer. + * + * @exception IndexOutOfBoundsException If index is negative or not smaller + * than the buffer's limit. + * @exception ReadOnlyBufferException If this buffer is read-only. + */ + final public ByteBuffer put (int index, byte value) + { + if (readOnly) + throw new ReadOnlyBufferException (); + + backing_buffer [index] = value; + return this; + } + + final public char getChar () + { + return ByteBufferHelper.getChar(this, order()); + } + + final public ByteBuffer putChar (char value) + { + ByteBufferHelper.putChar(this, value, order()); + return this; + } + + final public char getChar (int index) + { + return ByteBufferHelper.getChar(this, index, order()); + } + + final public ByteBuffer putChar (int index, char value) + { + ByteBufferHelper.putChar(this, index, value, order()); + return this; + } + + final public short getShort () + { + return ByteBufferHelper.getShort(this, order()); + } + + final public ByteBuffer putShort (short value) + { + ByteBufferHelper.putShort(this, value, order()); + return this; + } + + final public short getShort (int index) + { + return ByteBufferHelper.getShort(this, index, order()); + } + + final public ByteBuffer putShort (int index, short value) + { + ByteBufferHelper.putShort(this, index, value, order()); + return this; + } + + final public int getInt () + { + return ByteBufferHelper.getInt(this, order()); + } + + final public ByteBuffer putInt (int value) + { + ByteBufferHelper.putInt(this, value, order()); + return this; + } + + final public int getInt (int index) + { + return ByteBufferHelper.getInt(this, index, order()); + } + + final public ByteBuffer putInt (int index, int value) + { + ByteBufferHelper.putInt(this, index, value, order()); + return this; + } + + final public long getLong () + { + return ByteBufferHelper.getLong(this, order()); + } + + final public ByteBuffer putLong (long value) + { + ByteBufferHelper.putLong (this, value, order()); + return this; + } + + final public long getLong (int index) + { + return ByteBufferHelper.getLong (this, index, order()); + } + + final public ByteBuffer putLong (int index, long value) + { + ByteBufferHelper.putLong (this, index, value, order()); + return this; + } + + final public float getFloat () + { + return ByteBufferHelper.getFloat (this, order()); + } + + final public ByteBuffer putFloat (float value) + { + ByteBufferHelper.putFloat (this, value, order()); + return this; + } + + public final float getFloat (int index) + { + return ByteBufferHelper.getFloat (this, index, order()); + } + + final public ByteBuffer putFloat (int index, float value) + { + ByteBufferHelper.putFloat (this, index, value, order()); + return this; + } + + final public double getDouble () + { + return ByteBufferHelper.getDouble (this, order()); + } + + final public ByteBuffer putDouble (double value) + { + ByteBufferHelper.putDouble (this, value, order()); + return this; + } + + final public double getDouble (int index) + { + return ByteBufferHelper.getDouble (this, index, order()); + } + + final public ByteBuffer putDouble (int index, double value) + { + ByteBufferHelper.putDouble (this, index, value, order()); + return this; + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/ByteBuffer.java gcc-3.4.0/libjava/java/nio/ByteBuffer.java *** gcc-3.3.3/libjava/java/nio/ByteBuffer.java 2003-02-13 16:49:03.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/ByteBuffer.java 2004-02-08 21:18:37.000000000 +0000 *************** *** 1,5 **** /* ByteBuffer.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ByteBuffer.java -- ! Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,107 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package java.nio; ! import gnu.java.nio.ByteBufferImpl; /** * @since 1.4 */ ! public abstract class ByteBuffer extends Buffer implements Comparable { private ByteOrder endian = ByteOrder.BIG_ENDIAN; ! int offset; byte[] backing_buffer; /** * Allocates a new direct byte buffer. */ public static ByteBuffer allocateDirect (int capacity) { ! throw new Error ("direct buffers are not implemented"); } /** ! * Allocates a new byte buffer. */ public static ByteBuffer allocate (int capacity) { ! return new ByteBufferImpl (capacity, 0, capacity); } ! /** ! * Wraps a byte array into a buffer. ! * * @exception IndexOutOfBoundsException If the preconditions on the offset * and length parameters do not hold */ final public static ByteBuffer wrap (byte[] array, int offset, int length) { ! return new ByteBufferImpl (array, offset, length); } /** ! * Wraps a byte array into a buffer. */ final public static ByteBuffer wrap (byte[] array) { return wrap (array, 0, array.length); } ! ! ByteBuffer (int capacity, int limit, int position, int mark) ! { ! super (capacity, limit, position, mark); ! } ! /** ! * This method transfers bytes from this buffer into ! * the given destination array. * * @param dst The destination array ! * @param offset The offset within the array of the first byte to be written; ! * must be non-negative and no larger than dst.length. * @param length The maximum number of bytes to be written to the given array; * must be non-negative and no larger than dst.length - offset. * ! * @exception BufferUnderflowException If there are fewer than length bytes ! * remaining in this buffer. ! * @exception IndexOutOfBoundsException - If the preconditions on the offset * and length parameters do not hold. */ public ByteBuffer get (byte[] dst, int offset, int length) --- 35,117 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ ! package java.nio; /** * @since 1.4 */ ! public abstract class ByteBuffer extends Buffer ! implements Comparable { private ByteOrder endian = ByteOrder.BIG_ENDIAN; ! int array_offset; byte[] backing_buffer; + + ByteBuffer (int capacity, int limit, int position, int mark) + { + super (capacity, limit, position, mark); + array_offset = 0; + } + + ByteBuffer (byte[] buffer, int offset, int capacity, int limit, int position, int mark) + { + super (capacity, limit, position, mark); + this.backing_buffer = buffer; + this.array_offset = offset; + } /** * Allocates a new direct byte buffer. */ public static ByteBuffer allocateDirect (int capacity) { ! return DirectByteBufferImpl.allocate (capacity); } /** ! * Allocates a new ByteBuffer object with a given capacity. */ public static ByteBuffer allocate (int capacity) { ! return new ByteBufferImpl (capacity); } ! /** ! * Wraps a byte array into a ByteBuffer ! * object. ! * * @exception IndexOutOfBoundsException If the preconditions on the offset * and length parameters do not hold */ final public static ByteBuffer wrap (byte[] array, int offset, int length) { ! return new ByteBufferImpl (array, 0, array.length, offset + length, offset, -1, false); } /** ! * Wraps a byte array into a ByteBuffer ! * object. */ final public static ByteBuffer wrap (byte[] array) { return wrap (array, 0, array.length); } ! /** ! * This method transfers bytes from this buffer into the given ! * destination array. * * @param dst The destination array ! * @param offset The offset within the array of the first byte ! * to be written; must be non-negative and no larger than dst.length. * @param length The maximum number of bytes to be written to the given array; * must be non-negative and no larger than dst.length - offset. * ! * @exception BufferUnderflowException If there are fewer than length ! * bytes remaining in this buffer. ! * @exception IndexOutOfBoundsException If the preconditions on the offset * and length parameters do not hold. */ public ByteBuffer get (byte[] dst, int offset, int length) *************** public abstract class ByteBuffer extends *** 114,174 **** for (int i = offset; i < offset + length; i++) { ! dst [i] = get(); } return this; } /** ! * This method transfers bytes from this buffer into the given * destination array. * * @param dst The byte array to write into. * * @exception BufferUnderflowException If there are fewer than dst.length ! * bytes remaining in this buffer. */ public ByteBuffer get (byte[] dst) { return get (dst, 0, dst.length); } ! /** ! * Writes the content of src into the buffer. * * @param src The source data. * * @exception BufferOverflowException If there is insufficient space in this ! * buffer for the remaining bytes in the source buffer. * @exception IllegalArgumentException If the source buffer is this buffer. ! * @exception ReadOnlyBufferException If this buffer is read only. */ public ByteBuffer put (ByteBuffer src) { if (src == this) throw new IllegalArgumentException (); ! while (src.hasRemaining ()) ! put (src.get ()); ! return this; } /** ! * Writes the content of the the array src into the buffer. * * @param src The array to copy into the buffer. * @param offset The offset within the array of the first byte to be read; * must be non-negative and no larger than src.length. * @param length The number of bytes to be read from the given array; * must be non-negative and no larger than src.length - offset. ! * * @exception BufferOverflowException If there is insufficient space in this ! * buffer for the remaining bytes in the source buffer. * @exception IndexOutOfBoundsException If the preconditions on the offset ! * and length parameters do not hold. ! * @exception ReadOnlyBufferException If this buffer is read only. */ public ByteBuffer put (byte[] src, int offset, int length) { --- 124,193 ---- for (int i = offset; i < offset + length; i++) { ! dst [i] = get (); } return this; } /** ! * This method transfers bytes from this buffer into the given * destination array. * * @param dst The byte array to write into. * * @exception BufferUnderflowException If there are fewer than dst.length ! * bytes remaining in this buffer. */ public ByteBuffer get (byte[] dst) { return get (dst, 0, dst.length); } ! /** ! * Writes the content of the the ByteBUFFER src ! * into the buffer. * * @param src The source data. * * @exception BufferOverflowException If there is insufficient space in this ! * buffer for the remaining bytes in the source buffer. * @exception IllegalArgumentException If the source buffer is this buffer. ! * @exception ReadOnlyBufferException If this buffer is read-only. */ public ByteBuffer put (ByteBuffer src) { if (src == this) throw new IllegalArgumentException (); ! if (src.remaining () > remaining ()) ! throw new BufferOverflowException (); ! ! if (src.remaining () > 0) ! { ! byte[] toPut = new byte [src.remaining ()]; ! src.get (toPut); ! src.put (toPut); ! } ! return this; } /** ! * Writes the content of the the byte array src ! * into the buffer. * * @param src The array to copy into the buffer. * @param offset The offset within the array of the first byte to be read; * must be non-negative and no larger than src.length. * @param length The number of bytes to be read from the given array; * must be non-negative and no larger than src.length - offset. ! * * @exception BufferOverflowException If there is insufficient space in this ! * buffer for the remaining bytes in the source array. * @exception IndexOutOfBoundsException If the preconditions on the offset ! * and length parameters do not hold ! * @exception ReadOnlyBufferException If this buffer is read-only. */ public ByteBuffer put (byte[] src, int offset, int length) { *************** public abstract class ByteBuffer extends *** 180,197 **** for (int i = offset; i < offset + length; i++) put (src [i]); ! return this; } /** ! * Writes the content of the the array src into the buffer. * * @param src The array to copy into the buffer. ! * * @exception BufferOverflowException If there is insufficient space in this ! * buffer for the remaining bytes in the source buffer. ! * @exception ReadOnlyBufferException If this buffer is read only. */ public final ByteBuffer put (byte[] src) { --- 199,217 ---- for (int i = offset; i < offset + length; i++) put (src [i]); ! return this; } /** ! * Writes the content of the the byte array src ! * into the buffer. * * @param src The array to copy into the buffer. ! * * @exception BufferOverflowException If there is insufficient space in this ! * buffer for the remaining bytes in the source array. ! * @exception ReadOnlyBufferException If this buffer is read-only. */ public final ByteBuffer put (byte[] src) { *************** public abstract class ByteBuffer extends *** 199,217 **** } /** ! * Tells whether or not this buffer is backed by an accessible byte array. */ public final boolean hasArray () { return (backing_buffer != null ! && !isReadOnly ()); } /** ! * Returns the byte array that backs this buffer. * ! * @exception ReadOnlyBufferException If this buffer is backed by an array ! * but is read-only. * @exception UnsupportedOperationException If this buffer is not backed * by an accessible array. */ --- 219,237 ---- } /** ! * Tells whether ot not this buffer is backed by an accessible ! * byte array. */ public final boolean hasArray () { return (backing_buffer != null ! && !isReadOnly ()); } /** ! * Returns the byte array that backs this buffer. * ! * @exception ReadOnlyBufferException If this buffer is read-only. * @exception UnsupportedOperationException If this buffer is not backed * by an accessible array. */ *************** public abstract class ByteBuffer extends *** 222,237 **** if (isReadOnly ()) throw new ReadOnlyBufferException (); ! return backing_buffer; } /** ! * Returns the offset within this buffer's backing array of the first element ! * of the buffer * ! * @exception ReadOnlyBufferException If this buffer is backed by an array ! * but is read-only. * @exception UnsupportedOperationException If this buffer is not backed * by an accessible array. */ --- 242,255 ---- if (isReadOnly ()) throw new ReadOnlyBufferException (); ! return backing_buffer; } /** ! * Returns the offset within this buffer's backing array of the first element. * ! * @exception ReadOnlyBufferException If this buffer is read-only. * @exception UnsupportedOperationException If this buffer is not backed * by an accessible array. */ *************** public abstract class ByteBuffer extends *** 242,306 **** if (isReadOnly ()) throw new ReadOnlyBufferException (); ! return offset; } ! /** ! * Tells whether or not this buffer is equal to another object. */ public boolean equals (Object obj) { ! if (obj != null && ! obj instanceof ByteBuffer) { return compareTo (obj) == 0; } ! return false; } ! /** ! * Compares this buffer to another object. * ! * @exception ClassCastException If the argument is not a byte buffer */ public int compareTo (Object obj) { ByteBuffer a = (ByteBuffer) obj; ! if (a.remaining() != remaining()) ! { ! return 1; ! } ! ! if (! hasArray() || ! ! a.hasArray()) { return 1; } ! ! int r = remaining(); int i1 = position (); int i2 = a.position (); ! for (int i = 0; i < r; i++) { int t = (int) (get (i1) - a.get (i2)); ! if (t != 0) { return (int) t; } } ! return 0; } /** ! * Retrieves this buffer's byte order. */ ! public final ByteOrder order() { return endian; } --- 260,331 ---- if (isReadOnly ()) throw new ReadOnlyBufferException (); + + return array_offset; + } ! /** ! * Calculates a hash code for this buffer. ! */ ! public int hashCode () ! { ! // FIXME: Check what SUN calculates here. ! return super.hashCode (); } ! /** ! * Checks if this buffer is equal to obj. */ public boolean equals (Object obj) { ! if (obj instanceof ByteBuffer) { return compareTo (obj) == 0; } ! return false; } ! /** ! * Compares two ByteBuffer objects. * ! * @exception ClassCastException If obj is not an object derived from ! * ByteBuffer. */ public int compareTo (Object obj) { ByteBuffer a = (ByteBuffer) obj; ! if (a.remaining () != remaining ()) ! return 1; ! ! if (! hasArray () || ! ! a.hasArray ()) { return 1; } ! ! int r = remaining (); int i1 = position (); int i2 = a.position (); ! for (int i = 0; i < r; i++) { int t = (int) (get (i1) - a.get (i2)); ! if (t != 0) { return (int) t; } } ! return 0; } /** ! * Returns the byte order of this buffer. */ ! public final ByteOrder order () { return endian; } *************** public abstract class ByteBuffer extends *** 315,409 **** } /** ! * Reads the byte at this buffer's current position, * and then increments the position. * ! * @exception BufferUnderflowException If the buffer's current position ! * is not smaller than its limit. */ public abstract byte get (); ! /** ! * Relative put method. * ! * @exception BufferOverflowException If this buffer's current position is ! * not smaller than its limit. * @exception ReadOnlyBufferException If this buffer is read-only. */ public abstract ByteBuffer put (byte b); ! /** * Absolute get method. * ! * @exception IndexOutOfBoundsException FIXME */ public abstract byte get (int index); /** * Absolute put method. * ! * @exception ReadOnlyBufferException If this buffer is read-only ! * @exception IndexOutOfBoundsException FIXME */ public abstract ByteBuffer put (int index, byte b); ! /** * Compacts this buffer. ! * ! * @exception ReadOnlyBufferException If this buffer is read-only */ ! public abstract ByteBuffer compact(); /** * Tells whether or not this buffer is direct. */ ! public abstract boolean isDirect(); ! /** ! * Creates a new byte buffer whose content is a shared subsequence of this ! * buffer's content. */ ! public abstract ByteBuffer slice(); ! /** ! * Creates a new byte buffer that shares this buffer's content. */ ! public abstract ByteBuffer duplicate(); ! /** ! * Creates a new, read-only byte buffer that shares this buffer's content. */ ! public abstract ByteBuffer asReadOnlyBuffer(); /** * Creates a view of this byte buffer as a short buffer. */ ! public abstract ShortBuffer asShortBuffer(); /** * Creates a view of this byte buffer as a char buffer. */ ! public abstract CharBuffer asCharBuffer(); /** * Creates a view of this byte buffer as an integer buffer. */ ! public abstract IntBuffer asIntBuffer(); /** * Creates a view of this byte buffer as a long buffer. */ ! public abstract LongBuffer asLongBuffer(); /** * Creates a view of this byte buffer as a float buffer. */ ! public abstract FloatBuffer asFloatBuffer(); /** * Creates a view of this byte buffer as a double buffer. */ ! public abstract DoubleBuffer asDoubleBuffer(); /** * Relative get method for reading a character value. --- 340,445 ---- } /** ! * Reads the byte at this buffer's current position, * and then increments the position. * ! * @exception BufferUnderflowException If there are no remaining ! * bytes in this buffer. */ public abstract byte get (); ! /** ! * Writes the byte at this buffer's current position, ! * and then increments the position. * ! * @exception BufferOverflowException If there no remaining ! * bytes in this buffer. * @exception ReadOnlyBufferException If this buffer is read-only. */ public abstract ByteBuffer put (byte b); ! /** * Absolute get method. * ! * @exception IndexOutOfBoundsException If index is negative or not smaller ! * than the buffer's limit. */ public abstract byte get (int index); /** * Absolute put method. * ! * @exception IndexOutOfBoundsException If index is negative or not smaller ! * than the buffer's limit. ! * @exception ReadOnlyBufferException If this buffer is read-only. */ public abstract ByteBuffer put (int index, byte b); ! /** * Compacts this buffer. ! * ! * @exception ReadOnlyBufferException If this buffer is read-only. */ ! public abstract ByteBuffer compact (); ! ! void shiftDown (int dst_offset, int src_offset, int count) ! { ! for (int i = 0; i < count; i++) ! put(dst_offset + i, get(src_offset + i)); ! } /** * Tells whether or not this buffer is direct. */ ! public abstract boolean isDirect (); ! /** ! * Creates a new ByteBuffer whose content is a shared ! * subsequence of this buffer's content. */ ! public abstract ByteBuffer slice (); ! /** ! * Creates a new ByteBuffer that shares this buffer's ! * content. */ ! public abstract ByteBuffer duplicate (); ! /** ! * Creates a new read-only ByteBuffer that shares this ! * buffer's content. */ ! public abstract ByteBuffer asReadOnlyBuffer (); /** * Creates a view of this byte buffer as a short buffer. */ ! public abstract ShortBuffer asShortBuffer (); /** * Creates a view of this byte buffer as a char buffer. */ ! public abstract CharBuffer asCharBuffer (); /** * Creates a view of this byte buffer as an integer buffer. */ ! public abstract IntBuffer asIntBuffer (); /** * Creates a view of this byte buffer as a long buffer. */ ! public abstract LongBuffer asLongBuffer (); /** * Creates a view of this byte buffer as a float buffer. */ ! public abstract FloatBuffer asFloatBuffer (); /** * Creates a view of this byte buffer as a double buffer. */ ! public abstract DoubleBuffer asDoubleBuffer (); /** * Relative get method for reading a character value. *************** public abstract class ByteBuffer extends *** 411,417 **** * @exception BufferUnderflowException If there are fewer than two bytes * remaining in this buffer. */ ! public abstract char getChar(); /** * Relative put method for writing a character value. --- 447,453 ---- * @exception BufferUnderflowException If there are fewer than two bytes * remaining in this buffer. */ ! public abstract char getChar (); /** * Relative put method for writing a character value. *************** public abstract class ByteBuffer extends *** 419,425 **** * @exception BufferOverflowException If this buffer's current position is * not smaller than its limit. */ ! public abstract ByteBuffer putChar(char value); /** * Absolute get method for reading a character value. --- 455,461 ---- * @exception BufferOverflowException If this buffer's current position is * not smaller than its limit. */ ! public abstract ByteBuffer putChar (char value); /** * Absolute get method for reading a character value. *************** public abstract class ByteBuffer extends *** 427,433 **** * @exception IndexOutOfBoundsException If there are fewer than two bytes * remaining in this buffer */ ! public abstract char getChar(int index); /** * Absolute put method for writing a character value. --- 463,469 ---- * @exception IndexOutOfBoundsException If there are fewer than two bytes * remaining in this buffer */ ! public abstract char getChar (int index); /** * Absolute put method for writing a character value. *************** public abstract class ByteBuffer extends *** 435,441 **** * @exception IndexOutOfBoundsException If index is negative or not smaller * than the buffer's limit, minus one. */ ! public abstract ByteBuffer putChar(int index, char value); /** * Relative get method for reading a short value. --- 471,477 ---- * @exception IndexOutOfBoundsException If index is negative or not smaller * than the buffer's limit, minus one. */ ! public abstract ByteBuffer putChar (int index, char value); /** * Relative get method for reading a short value. *************** public abstract class ByteBuffer extends *** 443,449 **** * @exception BufferUnderflowException If index is negative or not smaller * than the buffer's limit, minus one. */ ! public abstract short getShort(); /** * Relative put method for writing a short value. --- 479,485 ---- * @exception BufferUnderflowException If index is negative or not smaller * than the buffer's limit, minus one. */ ! public abstract short getShort (); /** * Relative put method for writing a short value. *************** public abstract class ByteBuffer extends *** 451,457 **** * @exception BufferOverflowException If this buffer's current position is * not smaller than its limit. */ ! public abstract ByteBuffer putShort(short value); /** * Absolute get method for reading a short value. --- 487,493 ---- * @exception BufferOverflowException If this buffer's current position is * not smaller than its limit. */ ! public abstract ByteBuffer putShort (short value); /** * Absolute get method for reading a short value. *************** public abstract class ByteBuffer extends *** 459,465 **** * @exception IndexOutOfBoundsException If there are fewer than two bytes * remaining in this buffer */ ! public abstract short getShort(int index); /** * Absolute put method for writing a short value. --- 495,501 ---- * @exception IndexOutOfBoundsException If there are fewer than two bytes * remaining in this buffer */ ! public abstract short getShort (int index); /** * Absolute put method for writing a short value. *************** public abstract class ByteBuffer extends *** 467,473 **** * @exception IndexOutOfBoundsException If index is negative or not smaller * than the buffer's limit, minus one. */ ! public abstract ByteBuffer putShort(int index, short value); /** * Relative get method for reading an integer value. --- 503,509 ---- * @exception IndexOutOfBoundsException If index is negative or not smaller * than the buffer's limit, minus one. */ ! public abstract ByteBuffer putShort (int index, short value); /** * Relative get method for reading an integer value. *************** public abstract class ByteBuffer extends *** 475,481 **** * @exception BufferUnderflowException If there are fewer than four bytes * remaining in this buffer. */ ! public abstract int getInt(); /** * Relative put method for writing an integer value. --- 511,517 ---- * @exception BufferUnderflowException If there are fewer than four bytes * remaining in this buffer. */ ! public abstract int getInt (); /** * Relative put method for writing an integer value. *************** public abstract class ByteBuffer extends *** 483,489 **** * @exception BufferOverflowException If this buffer's current position is * not smaller than its limit. */ ! public abstract ByteBuffer putInt(int value); /** * Absolute get method for reading an integer value. --- 519,525 ---- * @exception BufferOverflowException If this buffer's current position is * not smaller than its limit. */ ! public abstract ByteBuffer putInt (int value); /** * Absolute get method for reading an integer value. *************** public abstract class ByteBuffer extends *** 491,497 **** * @exception IndexOutOfBoundsException If index is negative or not smaller * than the buffer's limit, minus three. */ ! public abstract int getInt(int index); /** * Absolute put method for writing an integer value. --- 527,533 ---- * @exception IndexOutOfBoundsException If index is negative or not smaller * than the buffer's limit, minus three. */ ! public abstract int getInt (int index); /** * Absolute put method for writing an integer value. *************** public abstract class ByteBuffer extends *** 499,505 **** * @exception IndexOutOfBoundsException If index is negative or not smaller * than the buffer's limit, minus three. */ ! public abstract ByteBuffer putInt(int index, int value); /** * Relative get method for reading a long value. --- 535,541 ---- * @exception IndexOutOfBoundsException If index is negative or not smaller * than the buffer's limit, minus three. */ ! public abstract ByteBuffer putInt (int index, int value); /** * Relative get method for reading a long value. *************** public abstract class ByteBuffer extends *** 507,513 **** * @exception BufferUnderflowException If there are fewer than eight bytes * remaining in this buffer. */ ! public abstract long getLong(); /** * Relative put method for writing a long value. --- 543,549 ---- * @exception BufferUnderflowException If there are fewer than eight bytes * remaining in this buffer. */ ! public abstract long getLong (); /** * Relative put method for writing a long value. *************** public abstract class ByteBuffer extends *** 515,521 **** * @exception BufferOverflowException If this buffer's current position is * not smaller than its limit. */ ! public abstract ByteBuffer putLong(long value); /** * Absolute get method for reading a long value. --- 551,557 ---- * @exception BufferOverflowException If this buffer's current position is * not smaller than its limit. */ ! public abstract ByteBuffer putLong (long value); /** * Absolute get method for reading a long value. *************** public abstract class ByteBuffer extends *** 523,529 **** * @exception IndexOutOfBoundsException If index is negative or not smaller * than the buffer's limit, minus seven. */ ! public abstract long getLong(int index); /** * Absolute put method for writing a float value. --- 559,565 ---- * @exception IndexOutOfBoundsException If index is negative or not smaller * than the buffer's limit, minus seven. */ ! public abstract long getLong (int index); /** * Absolute put method for writing a float value. *************** public abstract class ByteBuffer extends *** 531,537 **** * @exception IndexOutOfBoundsException If index is negative or not smaller * than the buffer's limit, minus seven. */ ! public abstract ByteBuffer putLong(int index, long value); /** * Relative get method for reading a float value. --- 567,573 ---- * @exception IndexOutOfBoundsException If index is negative or not smaller * than the buffer's limit, minus seven. */ ! public abstract ByteBuffer putLong (int index, long value); /** * Relative get method for reading a float value. *************** public abstract class ByteBuffer extends *** 539,545 **** * @exception BufferUnderflowException If there are fewer than four bytes * remaining in this buffer. */ ! public abstract float getFloat(); /** * Relative put method for writing a float value. --- 575,581 ---- * @exception BufferUnderflowException If there are fewer than four bytes * remaining in this buffer. */ ! public abstract float getFloat (); /** * Relative put method for writing a float value. *************** public abstract class ByteBuffer extends *** 547,553 **** * @exception BufferOverflowException If there are fewer than four bytes * remaining in this buffer. */ ! public abstract ByteBuffer putFloat(float value); /** * Absolute get method for reading a float value. --- 583,589 ---- * @exception BufferOverflowException If there are fewer than four bytes * remaining in this buffer. */ ! public abstract ByteBuffer putFloat (float value); /** * Absolute get method for reading a float value. *************** public abstract class ByteBuffer extends *** 555,561 **** * @exception IndexOutOfBoundsException If index is negative or not smaller * than the buffer's limit, minus three. */ ! public abstract float getFloat(int index); /** * Relative put method for writing a float value. --- 591,597 ---- * @exception IndexOutOfBoundsException If index is negative or not smaller * than the buffer's limit, minus three. */ ! public abstract float getFloat (int index); /** * Relative put method for writing a float value. *************** public abstract class ByteBuffer extends *** 563,569 **** * @exception IndexOutOfBoundsException If index is negative or not smaller * than the buffer's limit, minus three. */ ! public abstract ByteBuffer putFloat(int index, float value); /** * Relative get method for reading a double value. --- 599,605 ---- * @exception IndexOutOfBoundsException If index is negative or not smaller * than the buffer's limit, minus three. */ ! public abstract ByteBuffer putFloat (int index, float value); /** * Relative get method for reading a double value. *************** public abstract class ByteBuffer extends *** 571,577 **** * @exception BufferUnderflowException If there are fewer than eight bytes * remaining in this buffer. */ ! public abstract double getDouble(); /** * Relative put method for writing a double value. --- 607,613 ---- * @exception BufferUnderflowException If there are fewer than eight bytes * remaining in this buffer. */ ! public abstract double getDouble (); /** * Relative put method for writing a double value. *************** public abstract class ByteBuffer extends *** 579,585 **** * @exception BufferOverflowException If this buffer's current position is * not smaller than its limit. */ ! public abstract ByteBuffer putDouble(double value); /** * Absolute get method for reading a double value. --- 615,621 ---- * @exception BufferOverflowException If this buffer's current position is * not smaller than its limit. */ ! public abstract ByteBuffer putDouble (double value); /** * Absolute get method for reading a double value. *************** public abstract class ByteBuffer extends *** 587,593 **** * @exception IndexOutOfBoundsException If index is negative or not smaller * than the buffer's limit, minus seven. */ ! public abstract double getDouble(int index); /** * Absolute put method for writing a double value. --- 623,629 ---- * @exception IndexOutOfBoundsException If index is negative or not smaller * than the buffer's limit, minus seven. */ ! public abstract double getDouble (int index); /** * Absolute put method for writing a double value. *************** public abstract class ByteBuffer extends *** 595,601 **** * @exception IndexOutOfBoundsException If index is negative or not smaller * than the buffer's limit, minus seven. */ ! public abstract ByteBuffer putDouble(int index, double value); /** * Returns a string summarizing the state of this buffer. --- 631,637 ---- * @exception IndexOutOfBoundsException If index is negative or not smaller * than the buffer's limit, minus seven. */ ! public abstract ByteBuffer putDouble (int index, double value); /** * Returns a string summarizing the state of this buffer. diff -Nrc3pad gcc-3.3.3/libjava/java/nio/ByteOrder.java gcc-3.4.0/libjava/java/nio/ByteOrder.java *** gcc-3.3.3/libjava/java/nio/ByteOrder.java 2002-11-01 12:03:38.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/ByteOrder.java 2003-10-21 12:55:02.000000000 +0000 *************** this exception to your version of the li *** 35,53 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.nio; public final class ByteOrder { public static final ByteOrder BIG_ENDIAN = new ByteOrder(); public static final ByteOrder LITTLE_ENDIAN = new ByteOrder(); ! public static ByteOrder nativeOrder() { ! return BIG_ENDIAN; } public String toString() { return this == BIG_ENDIAN ? "BIG_ENDIAN" : "LITTLE_ENDIAN"; --- 35,75 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package java.nio; + import gnu.classpath.Configuration; + /** + * @author Michael Koch + * @since 1.4 + */ public final class ByteOrder { public static final ByteOrder BIG_ENDIAN = new ByteOrder(); public static final ByteOrder LITTLE_ENDIAN = new ByteOrder(); ! static { ! // load the shared library needed for native methods. ! if (Configuration.INIT_LOAD_LIBRARY) ! { ! System.loadLibrary ("javanio"); ! } ! } ! ! /** ! * Returns the native byte order of the platform currently running. ! */ ! public static ByteOrder nativeOrder () ! { ! return (System.getProperty ("gnu.cpu.endian") == "big" ! ? BIG_ENDIAN : LITTLE_ENDIAN); } + /** + * Returns a string representation of the byte order. + */ public String toString() { return this == BIG_ENDIAN ? "BIG_ENDIAN" : "LITTLE_ENDIAN"; diff -Nrc3pad gcc-3.3.3/libjava/java/nio/channels/Channel.java gcc-3.4.0/libjava/java/nio/channels/Channel.java *** gcc-3.3.3/libjava/java/nio/channels/Channel.java 2002-10-07 07:59:12.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/channels/Channel.java 2003-10-11 18:45:10.000000000 +0000 *************** public interface Channel *** 44,55 **** /** * Tells whether this channel is open or not */ ! public boolean isOpen(); /** * Closes this channel * * @exception IOException If an error occurs */ ! public void close() throws IOException; } --- 44,55 ---- /** * Tells whether this channel is open or not */ ! boolean isOpen(); /** * Closes this channel * * @exception IOException If an error occurs */ ! void close() throws IOException; } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/channels/Channels.java gcc-3.4.0/libjava/java/nio/channels/Channels.java *** gcc-3.3.3/libjava/java/nio/channels/Channels.java 2003-02-12 20:00:03.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/channels/Channels.java 2003-12-19 20:42:00.000000000 +0000 *************** *** 1,5 **** /* Channels.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Channels.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,47 **** package java.nio.channels; import java.io.InputStream; import java.io.OutputStream; import java.io.Reader; import java.io.Writer; - import java.nio.channels.WritableByteChannel; import java.nio.charset.Charset; import java.nio.charset.CharsetDecoder; import java.nio.charset.CharsetEncoder; --- 37,50 ---- package java.nio.channels; + import gnu.java.nio.ChannelInputStream; + import gnu.java.nio.ChannelOutputStream; + import gnu.java.nio.InputStreamChannel; + import gnu.java.nio.OutputStreamChannel; import java.io.InputStream; import java.io.OutputStream; import java.io.Reader; import java.io.Writer; import java.nio.charset.Charset; import java.nio.charset.CharsetDecoder; import java.nio.charset.CharsetEncoder; *************** public final class Channels *** 54,86 **** /** * Constructs a stream that reads bytes from the given channel. */ ! public static InputStream newInputStream (ReadableByteChannel ch) { ! throw new Error ("not implemented"); } /** * Constructs a stream that writes bytes to the given channel. */ ! public static OutputStream newOutputStream (WritableByteChannel ch) { ! throw new Error ("not implemented"); } /** * Constructs a channel that reads bytes from the given stream. */ ! public static ReadableByteChannel newChannel (InputStream in) { ! throw new Error ("not implemented"); } /** * Constructs a channel that writes bytes to the given stream. */ ! public static WritableByteChannel newChannel (OutputStream out) { ! throw new Error ("not implemented"); } /** --- 57,89 ---- /** * Constructs a stream that reads bytes from the given channel. */ ! public static InputStream newInputStream(ReadableByteChannel ch) { ! return new ChannelInputStream(ch); } /** * Constructs a stream that writes bytes to the given channel. */ ! public static OutputStream newOutputStream(WritableByteChannel ch) { ! return new ChannelOutputStream(ch); } /** * Constructs a channel that reads bytes from the given stream. */ ! public static ReadableByteChannel newChannel(InputStream in) { ! return new InputStreamChannel(in); } /** * Constructs a channel that writes bytes to the given stream. */ ! public static WritableByteChannel newChannel(OutputStream out) { ! return new OutputStreamChannel (out); } /** diff -Nrc3pad gcc-3.3.3/libjava/java/nio/channels/FileChannelImpl.java gcc-3.4.0/libjava/java/nio/channels/FileChannelImpl.java *** gcc-3.3.3/libjava/java/nio/channels/FileChannelImpl.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/channels/FileChannelImpl.java 2003-12-19 19:06:34.000000000 +0000 *************** *** 0 **** --- 1,408 ---- + /* FileChannelImpl.java -- + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.nio.channels; + + import java.io.EOFException; + import java.io.FileDescriptor; + import java.io.FileInputStream; + import java.io.FileOutputStream; + import java.io.IOException; + import java.io.RandomAccessFile; + import java.nio.ByteBuffer; + import java.nio.MappedByteBuffer; + import java.nio.MappedByteBufferImpl; + import gnu.classpath.Configuration; + import gnu.gcj.RawData; + + /** + * This file is not user visible ! + * But alas, Java does not have a concept of friendly packages + * so this class is public. + * Instances of this class are created by invoking getChannel + * Upon a Input/Output/RandomAccessFile object. + */ + + public class FileChannelImpl extends FileChannel + { + static + { + // load the shared library needed for native methods. + if (Configuration.INIT_LOAD_LIBRARY) + { + System.loadLibrary ("javanio"); + } + } + + public RawData map_address; + + int length; + FileDescriptor fd; + MappedByteBuffer buf; + Object file_obj; // just to keep it live... + + public FileChannelImpl (FileDescriptor fd, boolean write, Object obj) + { + if (!(obj instanceof RandomAccessFile) + && !(obj instanceof FileInputStream) + && !(obj instanceof FileOutputStream)) + throw new InternalError (); + + this.fd = fd; + this.file_obj = obj; + } + + public FileChannelImpl () + { + this (new FileDescriptor (), true, null); + } + + private native long implPosition (); + private native FileChannel implPosition (long newPosition); + private native FileChannel implTruncate (long size); + + private native RawData nio_mmap_file (long pos, long size, int mode); + private native void nio_unmmap_file (RawData map_address, int size); + private native void nio_msync (RawData map_address, int length); + + public native long size () throws IOException; + + protected void implCloseChannel() throws IOException + { + if (map_address != null) + { + nio_unmmap_file (map_address, (int) length); + map_address = null; + } + + if (file_obj instanceof RandomAccessFile) + { + RandomAccessFile o = (RandomAccessFile) file_obj; + o.close(); + } + else if (file_obj instanceof FileInputStream) + { + FileInputStream o = (FileInputStream) file_obj; + o.close(); + } + else if (file_obj instanceof FileOutputStream) + { + FileOutputStream o = (FileOutputStream) file_obj; + o.close(); + } + } + + public int read (ByteBuffer dst) throws IOException + { + // Check if file is mapped into memory. + if (buf != null) + { + // FIXME: implement this + throw new Error ("Accessing mapped buffers not implemented."); + } + + // File not mapped, access it directly. + return implRead (dst); + } + + public int read (ByteBuffer dst, long position) + throws IOException + { + if (position < 0) + throw new IllegalArgumentException (); + + if (!isOpen ()) + throw new ClosedChannelException (); + + if (file_obj instanceof FileOutputStream) + throw new NonReadableChannelException (); + + int result; + long oldPosition; + + oldPosition = implPosition (); + position (position); + result = implRead (dst); + implPosition (oldPosition); + + return result; + } + + private int implRead (ByteBuffer dst) throws IOException + { + int result; + byte[] buffer = new byte [dst.remaining ()]; + + result = implRead (buffer, 0, buffer.length); + + if (result > 0) + dst.put (buffer, 0, result); + + return result; + } + + private native int implRead (byte[] buffer, int offset, int length) + throws IOException; + + public long read (ByteBuffer[] dsts, int offset, int length) + throws IOException + { + long result = 0; + + for (int i = offset; i < offset + length; i++) + { + result += read (dsts [i]); + } + + return result; + } + + public int write (ByteBuffer src) throws IOException + { + // Check if file is mapped into memory. + if (buf != null) + { + // FIXME: implement this + throw new Error ("Accessing mapped buffers not implemented."); + } + + // File not mapped, access it directly. + return implWrite (src); + } + + public int write (ByteBuffer src, long position) + throws IOException + { + if (position < 0) + throw new IllegalArgumentException (); + + if (!isOpen ()) + throw new ClosedChannelException (); + + if (file_obj instanceof FileInputStream) + throw new NonWritableChannelException (); + + int result; + long oldPosition; + + oldPosition = implPosition (); + position (position); + result = implWrite (src); + implPosition (oldPosition); + + return result; + } + + private int implWrite (ByteBuffer src) throws IOException + { + byte[] buffer = new byte [src.remaining ()]; + + src.get (buffer, 0, buffer.length); + return implWrite (buffer, 0, buffer.length); + } + + private native int implWrite (byte[] buffer, int offset, int length) + throws IOException; + + public long write(ByteBuffer[] srcs, int offset, int length) + throws IOException + { + long result = 0; + + for (int i = offset;i < offset + length;i++) + { + result += write (srcs[i]); + } + + return result; + } + + public MappedByteBuffer map (FileChannel.MapMode mode, long position, + long size) + throws IOException + { + if ((mode != MapMode.READ_ONLY + && mode != MapMode.READ_WRITE + && mode != MapMode.PRIVATE) + || position < 0 + || size < 0 + || size > Integer.MAX_VALUE) + throw new IllegalArgumentException (); + + // FIXME: Make this working. + int cmode = mode.m; + map_address = nio_mmap_file (position, size, cmode); + length = (int) size; + buf = new MappedByteBufferImpl (this); + return buf; + } + + static MappedByteBuffer create_direct_mapped_buffer (RawData map_address, + long length) + throws IOException + { + FileChannelImpl ch = new FileChannelImpl (); + ch.map_address = map_address; + ch.length = (int) length; + ch.buf = new MappedByteBufferImpl (ch); + return ch.buf; + } + + /** + * msync with the disk + */ + public void force (boolean metaData) throws IOException + { + if (!isOpen ()) + throw new ClosedChannelException (); + + // FIXME: What to do with metaData ? + + nio_msync (map_address, length); + } + + public long transferTo (long position, long count, WritableByteChannel target) + throws IOException + { + if (position < 0 + || count < 0) + throw new IllegalArgumentException (); + + if (!isOpen ()) + throw new ClosedChannelException (); + + if (file_obj instanceof FileOutputStream) + throw new NonReadableChannelException (); + + // XXX: count needs to be casted from long to int. Dataloss ? + ByteBuffer buffer = ByteBuffer.allocate ((int) count); + read (buffer, position); + buffer.flip(); + return target.write (buffer); + } + + public long transferFrom (ReadableByteChannel src, long position, long count) + throws IOException + { + if (position < 0 + || count < 0) + throw new IllegalArgumentException (); + + if (!isOpen ()) + throw new ClosedChannelException (); + + if (file_obj instanceof FileInputStream) + throw new NonWritableChannelException (); + + // XXX: count needs to be casted from long to int. Dataloss ? + ByteBuffer buffer = ByteBuffer.allocate ((int) count); + src.read (buffer); + buffer.flip(); + return write (buffer, position); + } + + public FileLock lock (long position, long size, boolean shared) + throws IOException + { + if (position < 0 + || size < 0) + throw new IllegalArgumentException (); + + if (!isOpen ()) + throw new ClosedChannelException (); + + if (shared && + file_obj instanceof FileOutputStream) + throw new NonReadableChannelException (); + + if (!shared && + file_obj instanceof FileInputStream) + throw new NonWritableChannelException (); + + throw new Error ("Not implemented"); + } + + public FileLock tryLock (long position, long size, boolean shared) + throws IOException + { + if (position < 0 + || size < 0) + throw new IllegalArgumentException (); + + if (!isOpen ()) + throw new ClosedChannelException (); + + throw new Error ("Not implemented"); + } + + public long position () + throws IOException + { + if (!isOpen ()) + throw new ClosedChannelException (); + + return implPosition (); + } + + public FileChannel position (long newPosition) + throws IOException + { + if (newPosition < 0) + throw new IllegalArgumentException (); + + if (!isOpen ()) + throw new ClosedChannelException (); + + return implPosition (newPosition); + } + + public FileChannel truncate (long size) + throws IOException + { + if (size < 0) + throw new IllegalArgumentException (); + + if (!isOpen ()) + throw new ClosedChannelException (); + + if (file_obj instanceof FileInputStream) + throw new NonWritableChannelException (); + + return implTruncate (size); + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/channels/FileChannel.java gcc-3.4.0/libjava/java/nio/channels/FileChannel.java *** gcc-3.3.3/libjava/java/nio/channels/FileChannel.java 2003-03-01 22:57:53.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/channels/FileChannel.java 2003-06-27 13:34:12.000000000 +0000 *************** public abstract class FileChannel extend *** 51,57 **** { public static class MapMode { ! public int m; public static MapMode READ_ONLY = new MapMode(0); public static MapMode READ_WRITE = new MapMode(1); --- 51,57 ---- { public static class MapMode { ! int m; public static MapMode READ_ONLY = new MapMode(0); public static MapMode READ_WRITE = new MapMode(1); *************** public abstract class FileChannel extend *** 112,118 **** * * @exception IOException If an I/O error occurs. */ ! public long write (ByteBuffer[] srcs) throws IOException { long result = 0; --- 112,118 ---- * * @exception IOException If an I/O error occurs. */ ! public final long write (ByteBuffer[] srcs) throws IOException { long result = 0; diff -Nrc3pad gcc-3.3.3/libjava/java/nio/channels/FileLock.java gcc-3.4.0/libjava/java/nio/channels/FileLock.java *** gcc-3.3.3/libjava/java/nio/channels/FileLock.java 2003-02-11 04:13:47.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/channels/FileLock.java 2003-05-14 06:37:59.000000000 +0000 *************** public abstract class FileLock *** 101,107 **** */ public final boolean overlaps (long position, long size) { ! if (position > this.position +this.size) return false; if (position + size < this.position) --- 101,107 ---- */ public final boolean overlaps (long position, long size) { ! if (position > this.position + this.size) return false; if (position + size < this.position) diff -Nrc3pad gcc-3.3.3/libjava/java/nio/channels/GatheringByteChannel.java gcc-3.4.0/libjava/java/nio/channels/GatheringByteChannel.java *** gcc-3.3.3/libjava/java/nio/channels/GatheringByteChannel.java 2002-10-07 07:59:12.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/channels/GatheringByteChannel.java 2003-10-11 18:45:10.000000000 +0000 *************** public interface GatheringByteChannel *** 59,65 **** * @exception NonWritableChannelException If this channel was not opened for * writing */ ! public long write(ByteBuffer[] srcs, int offset, int length) throws IOException; /** --- 59,65 ---- * @exception NonWritableChannelException If this channel was not opened for * writing */ ! long write (ByteBuffer[] srcs, int offset, int length) throws IOException; /** *************** public interface GatheringByteChannel *** 75,79 **** * @exception NonWritableChannelException If this channel was not opened for * writing */ ! public long write(ByteBuffer[] srcs) throws IOException; } --- 75,79 ---- * @exception NonWritableChannelException If this channel was not opened for * writing */ ! long write (ByteBuffer[] srcs) throws IOException; } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/channels/natFileChannelImpl.cc gcc-3.4.0/libjava/java/nio/channels/natFileChannelImpl.cc *** gcc-3.3.3/libjava/java/nio/channels/natFileChannelImpl.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/channels/natFileChannelImpl.cc 2003-07-13 16:53:05.000000000 +0000 *************** *** 0 **** --- 1,94 ---- + // natFileChannelImpl.cc + + /* Copyright (C) 2003 Free Software Foundation + + This file is part of libgcj. + + This software is copyrighted work licensed under the terms of the + Libgcj License. Please consult the file "LIBGCJ_LICENSE" for + details. */ + + #include + + #include + + #include + #include + #include + + #ifdef HAVE_UNISTD_H + #include + #endif + + #ifdef HAVE_FCNTL_H + #include + #endif + + #include + #include + #include + #include + #include + #include + + jlong + java::nio::channels::FileChannelImpl::size () + { + return fd->getLength (); + } + + jlong + java::nio::channels::FileChannelImpl::implPosition () + { + return fd->getFilePointer (); + } + + java::nio::channels::FileChannel* + java::nio::channels::FileChannelImpl::implPosition (jlong newPosition) + { + fd->seek (newPosition, ::java::io::FileDescriptor::SET, true); + return this; + } + + jint + java::nio::channels::FileChannelImpl::implRead (JArray* buffer, + jint offset, jint len) + { + return fd->read (buffer, offset, len); + } + + jint + java::nio::channels::FileChannelImpl::implWrite (JArray* buffer, + jint offset, jint len) + { + fd->write (buffer, offset, len); + return len; + } + + java::nio::channels::FileChannel* + java::nio::channels::FileChannelImpl::implTruncate (jlong size) + { + fd->setLength (size); + return this; + } + + gnu::gcj::RawData* + java::nio::channels::FileChannelImpl::nio_mmap_file (jlong /*pos*/, jlong /*size*/, + jint /*mode*/) + { + throw new ::java::io::IOException (JvNewStringUTF ("mmap not implemented")); + } + + void + java::nio::channels::FileChannelImpl::nio_unmmap_file (gnu::gcj::RawData* /*address*/, + jint /*size*/) + { + throw new ::java::io::IOException (JvNewStringUTF ("munmap not implemented")); + } + + void + java::nio::channels::FileChannelImpl::nio_msync (gnu::gcj::RawData* /*map_address*/, + jint /*length*/) + { + throw new ::java::io::IOException (JvNewStringUTF ("msync not implemented")); + } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/channels/ReadableByteChannel.java gcc-3.4.0/libjava/java/nio/channels/ReadableByteChannel.java *** gcc-3.3.3/libjava/java/nio/channels/ReadableByteChannel.java 2002-10-07 07:59:12.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/channels/ReadableByteChannel.java 2003-10-11 18:45:10.000000000 +0000 *************** public interface ReadableByteChannel ext *** 55,59 **** * @exception NonReadableChannelException If this channel was not opened for * reading */ ! public int read (ByteBuffer dst) throws IOException; } --- 55,59 ---- * @exception NonReadableChannelException If this channel was not opened for * reading */ ! int read (ByteBuffer dst) throws IOException; } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/channels/ScatteringByteChannel.java gcc-3.4.0/libjava/java/nio/channels/ScatteringByteChannel.java *** gcc-3.3.3/libjava/java/nio/channels/ScatteringByteChannel.java 2002-10-07 07:59:12.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/channels/ScatteringByteChannel.java 2003-10-11 18:45:10.000000000 +0000 *************** public interface ScatteringByteChannel *** 59,65 **** * @exception NonReadableChannelException If this channel was not opened for * reading */ ! public long read(ByteBuffer[] srcs, int offset, int length) throws IOException; /** --- 59,65 ---- * @exception NonReadableChannelException If this channel was not opened for * reading */ ! long read (ByteBuffer[] srcs, int offset, int length) throws IOException; /** *************** public interface ScatteringByteChannel *** 75,79 **** * @exception NonReadableChannelException If this channel was not opened for * reading */ ! public long read(ByteBuffer[] srcs) throws IOException; } --- 75,79 ---- * @exception NonReadableChannelException If this channel was not opened for * reading */ ! long read (ByteBuffer[] srcs) throws IOException; } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/channels/ServerSocketChannel.java gcc-3.4.0/libjava/java/nio/channels/ServerSocketChannel.java *** gcc-3.3.3/libjava/java/nio/channels/ServerSocketChannel.java 2003-02-11 03:59:37.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/channels/ServerSocketChannel.java 2003-06-27 13:34:12.000000000 +0000 *************** this exception to your version of the li *** 35,46 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.nio.channels; import java.nio.channels.spi.AbstractSelectableChannel; import java.nio.channels.spi.SelectorProvider; - import java.nio.ByteOrder; - import java.nio.ByteBuffer; import java.io.IOException; import java.net.ServerSocket; --- 35,45 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package java.nio.channels; import java.nio.channels.spi.AbstractSelectableChannel; import java.nio.channels.spi.SelectorProvider; import java.io.IOException; import java.net.ServerSocket; *************** public abstract class ServerSocketChanne *** 54,60 **** /** * Initializes this channel. */ ! public ServerSocketChannel (SelectorProvider provider) { super (provider); } --- 53,59 ---- /** * Initializes this channel. */ ! protected ServerSocketChannel (SelectorProvider provider) { super (provider); } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/channels/spi/AbstractInterruptibleChannel.java gcc-3.4.0/libjava/java/nio/channels/spi/AbstractInterruptibleChannel.java *** gcc-3.3.3/libjava/java/nio/channels/spi/AbstractInterruptibleChannel.java 2003-02-11 03:59:37.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/channels/spi/AbstractInterruptibleChannel.java 2004-02-14 18:44:11.000000000 +0000 *************** import java.nio.channels.InterruptibleCh *** 49,55 **** public abstract class AbstractInterruptibleChannel implements Channel, InterruptibleChannel { ! boolean opened = true; /** * Initializes the channel. --- 49,55 ---- public abstract class AbstractInterruptibleChannel implements Channel, InterruptibleChannel { ! private boolean closed; /** * Initializes the channel. *************** public abstract class AbstractInterrupti *** 72,79 **** */ public final void close () throws IOException { ! opened = false; ! implCloseChannel (); } /** --- 72,82 ---- */ public final void close () throws IOException { ! if (!closed) ! { ! closed = true; ! implCloseChannel(); ! } } /** *************** public abstract class AbstractInterrupti *** 101,106 **** */ public final boolean isOpen () { ! return opened; } } --- 104,109 ---- */ public final boolean isOpen () { ! return !closed; } } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/channels/spi/AbstractSelectableChannel.java gcc-3.4.0/libjava/java/nio/channels/spi/AbstractSelectableChannel.java *** gcc-3.3.3/libjava/java/nio/channels/spi/AbstractSelectableChannel.java 2003-02-11 03:59:37.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/channels/spi/AbstractSelectableChannel.java 2004-02-03 14:50:59.000000000 +0000 *************** *** 1,5 **** /* AbstractSelectableChannel.java ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* AbstractSelectableChannel.java ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** import java.util.ListIterator; *** 48,58 **** public abstract class AbstractSelectableChannel extends SelectableChannel { ! int registered; ! boolean blocking = true; ! Object LOCK = new Object (); ! SelectorProvider provider; ! List keys; /** * Initializes the channel --- 48,58 ---- public abstract class AbstractSelectableChannel extends SelectableChannel { ! private int registered; ! private boolean blocking = true; ! private Object LOCK = new Object(); ! private SelectorProvider provider; ! private LinkedList keys; /** * Initializes the channel *************** public abstract class AbstractSelectable *** 60,65 **** --- 60,66 ---- protected AbstractSelectableChannel (SelectorProvider provider) { this.provider = provider; + this.keys = new LinkedList(); } /** *************** public abstract class AbstractSelectable *** 74,86 **** /** * Adjusts this channel's blocking mode. */ ! public final SelectableChannel configureBlocking (boolean block) throws IOException { ! synchronized (LOCK) { ! blocking = true; ! implConfigureBlocking (block); } return this; --- 75,90 ---- /** * Adjusts this channel's blocking mode. */ ! public final SelectableChannel configureBlocking (boolean blocking) throws IOException { ! synchronized (blockingLock()) { ! if (this.blocking != blocking) ! { ! implConfigureBlocking(blocking); ! this.blocking = blocking; ! } } return this; *************** public abstract class AbstractSelectable *** 122,128 **** */ public final boolean isRegistered() { ! return registered > 0; } /** --- 126,132 ---- */ public final boolean isRegistered() { ! return !keys.isEmpty(); } /** *************** public abstract class AbstractSelectable *** 154,181 **** if (keys == null) return null; - SelectionKey k = null; ListIterator it = keys.listIterator (); while (it.hasNext ()) { ! k = (SelectionKey) it.next (); ! if (k.selector () == selector) ! { ! return k; ! } } ! return k; } private void add (SelectionKey key) { - if (keys == null) - { - keys = new LinkedList (); - } - keys.add (key); } --- 158,178 ---- if (keys == null) return null; ListIterator it = keys.listIterator (); while (it.hasNext ()) { ! SelectionKey key = (SelectionKey) it.next(); ! ! if (key.selector() == selector) ! return key; } ! return null; } private void add (SelectionKey key) { keys.add (key); } *************** public abstract class AbstractSelectable *** 190,215 **** if (!isOpen ()) throw new ClosedChannelException(); ! SelectionKey k = null; AbstractSelector selector = (AbstractSelector) selin; ! synchronized (LOCK) { ! k = locate (selector); ! if (k != null) { ! k.attach (att); } else { ! k = selector.register (this, ops, att); ! if (k != null) ! add (k); } } ! return k; } } --- 187,212 ---- if (!isOpen ()) throw new ClosedChannelException(); ! SelectionKey key = null; AbstractSelector selector = (AbstractSelector) selin; ! synchronized (blockingLock()) { ! key = locate (selector); ! if (key != null) { ! key.attach (att); } else { ! key = selector.register (this, ops, att); ! if (key != null) ! add (key); } } ! return key; } } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/channels/spi/AbstractSelectionKey.java gcc-3.4.0/libjava/java/nio/channels/spi/AbstractSelectionKey.java *** gcc-3.3.3/libjava/java/nio/channels/spi/AbstractSelectionKey.java 2002-11-13 13:52:47.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/channels/spi/AbstractSelectionKey.java 2003-10-09 17:34:10.000000000 +0000 *************** *** 1,5 **** /* AbstractSelectionKey.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* AbstractSelectionKey.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** import java.nio.channels.SelectionKey; *** 45,51 **** public abstract class AbstractSelectionKey extends SelectionKey { ! boolean ok = true; /** * Initializes the key. --- 45,51 ---- public abstract class AbstractSelectionKey extends SelectionKey { ! private boolean cancelled = false; /** * Initializes the key. *************** public abstract class AbstractSelectionK *** 59,68 **** */ public final void cancel () { ! if (ok) ! selector ().selectedKeys ().add (this); ! ! ok = false; } /** --- 59,70 ---- */ public final void cancel () { ! if (isValid()) ! { ! // FIXME: implement this. ! //selector().cancelledKeys().add (this); ! cancelled = true; ! } } /** *************** public abstract class AbstractSelectionK *** 70,75 **** */ public final boolean isValid () { ! return ok; } } --- 72,77 ---- */ public final boolean isValid () { ! return !cancelled; } } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/channels/spi/AbstractSelector.java gcc-3.4.0/libjava/java/nio/channels/spi/AbstractSelector.java *** gcc-3.3.3/libjava/java/nio/channels/spi/AbstractSelector.java 2002-11-13 13:52:47.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/channels/spi/AbstractSelector.java 2003-12-20 15:33:24.000000000 +0000 *************** *** 1,5 **** /* AbstractSelector.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* AbstractSelector.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,52 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.nio.channels.spi; import java.io.IOException; import java.nio.channels.SelectionKey; import java.nio.channels.Selector; - import java.util.List; import java.util.Set; public abstract class AbstractSelector extends Selector { ! boolean closed = false; ! SelectorProvider provider; /** * Initializes the slector. --- 35,55 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package java.nio.channels.spi; import java.io.IOException; + import java.nio.channels.ClosedSelectorException; import java.nio.channels.SelectionKey; import java.nio.channels.Selector; import java.util.Set; + import java.util.HashSet; public abstract class AbstractSelector extends Selector { ! private boolean closed = false; ! private SelectorProvider provider; ! private HashSet cancelledKeys; /** * Initializes the slector. *************** public abstract class AbstractSelector e *** 54,80 **** protected AbstractSelector (SelectorProvider provider) { this.provider = provider; } /** - * Marks the beginning of an I/O operation that might block indefinitely. - */ - protected final void begin () - { - } - - /** * Closes the channel. * * @exception IOException If an error occurs */ ! public final void close () throws IOException { if (closed) return; closed = true; - implCloseSelector (); } /** --- 57,77 ---- protected AbstractSelector (SelectorProvider provider) { this.provider = provider; + this.cancelledKeys = new HashSet(); } /** * Closes the channel. * * @exception IOException If an error occurs */ ! public final synchronized void close () throws IOException { if (closed) return; + implCloseSelector(); closed = true; } /** *************** public abstract class AbstractSelector e *** 85,95 **** return ! closed; } ! protected final void deregister (AbstractSelectionKey key) { - cancelledKeys ().remove (key); } ! protected final void end() { } --- 82,97 ---- return ! closed; } ! /** ! * Marks the beginning of an I/O operation that might block indefinitely. ! */ ! protected final void begin() { } ! ! /** ! * Marks the end of an I/O operation that might block indefinitely. ! */ protected final void end() { } *************** public abstract class AbstractSelector e *** 101,107 **** protected final Set cancelledKeys() { ! return null; } /** --- 103,120 ---- protected final Set cancelledKeys() { ! if (!isOpen()) ! throw new ClosedSelectorException(); ! ! return cancelledKeys; ! } ! ! final void cancelKey (AbstractSelectionKey key) ! { ! synchronized (cancelledKeys) ! { ! cancelledKeys.remove(key); ! } } /** *************** public abstract class AbstractSelector e *** 111,114 **** --- 124,132 ---- protected abstract SelectionKey register (AbstractSelectableChannel ch, int ops, Object att); + + protected final void deregister (AbstractSelectionKey key) + { + // FIXME + } } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/channels/spi/SelectorProvider.java gcc-3.4.0/libjava/java/nio/channels/spi/SelectorProvider.java *** gcc-3.3.3/libjava/java/nio/channels/spi/SelectorProvider.java 2003-03-01 22:57:53.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/channels/spi/SelectorProvider.java 2003-10-12 13:39:07.000000000 +0000 *************** *** 1,5 **** /* SelectorProvider.java ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* SelectorProvider.java ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** import java.nio.channels.SocketChannel; *** 50,56 **** */ public abstract class SelectorProvider { ! static SelectorProvider pr; /** * Initializes the selector provider. --- 50,56 ---- */ public abstract class SelectorProvider { ! private static SelectorProvider systemDefaultProvider; /** * Initializes the selector provider. *************** public abstract class SelectorProvider *** 95,107 **** * Returns the system-wide default selector provider for this invocation * of the Java virtual machine. */ ! public static SelectorProvider provider () { ! if (pr == null) { ! pr = new SelectorProviderImpl (); } ! return pr; } } --- 95,126 ---- * Returns the system-wide default selector provider for this invocation * of the Java virtual machine. */ ! public static synchronized SelectorProvider provider () { ! if (systemDefaultProvider == null) { ! String propertyValue = ! System.getProperty ("java.nio.channels.spi.SelectorProvider"); ! ! if (propertyValue == null ! || propertyValue.equals ("")) ! systemDefaultProvider = new SelectorProviderImpl(); ! else ! { ! try ! { ! systemDefaultProvider = (SelectorProvider) Class.forName ! (propertyValue).newInstance(); ! } ! catch (Exception e) ! { ! System.err.println ("Could not instantiate class: " ! + propertyValue); ! systemDefaultProvider = new SelectorProviderImpl(); ! } ! } } ! return systemDefaultProvider; } } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/channels/WritableByteChannel.java gcc-3.4.0/libjava/java/nio/channels/WritableByteChannel.java *** gcc-3.3.3/libjava/java/nio/channels/WritableByteChannel.java 2002-10-07 07:59:12.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/channels/WritableByteChannel.java 2003-10-11 18:45:10.000000000 +0000 *************** public interface WritableByteChannel *** 56,60 **** * @exception NonWritableChannelException If this channel was not opened for * writing */ ! public int write(ByteBuffer src) throws IOException; } --- 56,60 ---- * @exception NonWritableChannelException If this channel was not opened for * writing */ ! int write (ByteBuffer src) throws IOException; } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/CharBufferImpl.java gcc-3.4.0/libjava/java/nio/CharBufferImpl.java *** gcc-3.3.3/libjava/java/nio/CharBufferImpl.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/CharBufferImpl.java 2003-06-27 13:34:11.000000000 +0000 *************** *** 0 **** --- 1,183 ---- + /* CharBufferImpl.java -- + Copyright (C) 2002, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.nio; + + /** + * This is a Heap memory implementation + */ + final class CharBufferImpl extends CharBuffer + { + private boolean readOnly; + + CharBufferImpl (int capacity) + { + this (new char [capacity], 0, capacity, capacity, 0, -1, false); + } + + CharBufferImpl (char[] buffer, int offset, int capacity, int limit, int position, int mark, boolean readOnly) + { + super (buffer, offset, capacity, limit, position, mark); + this.readOnly = readOnly; + } + + public CharBufferImpl (CharBufferImpl copy) + { + super (copy.capacity (), copy.limit (), copy.position (), 0); + backing_buffer = copy.backing_buffer; + readOnly = copy.isReadOnly (); + } + + public boolean isReadOnly () + { + return readOnly; + } + + public CharBuffer slice () + { + return new CharBufferImpl (backing_buffer, array_offset + position (), remaining (), remaining (), 0, -1, isReadOnly ()); + } + + public CharBuffer duplicate () + { + return new CharBufferImpl (backing_buffer, array_offset, capacity (), limit (), position (), mark, isReadOnly ()); + } + + public CharBuffer asReadOnlyBuffer () + { + return new CharBufferImpl (backing_buffer, array_offset, capacity (), limit (), position (), mark, true); + } + + public CharBuffer compact () + { + int copied = 0; + + while (remaining () > 0) + { + put (copied, get ()); + copied++; + } + + position (copied); + return this; + } + + public boolean isDirect () + { + return false; + } + + final public CharSequence subSequence (int start, int end) + { + if (start < 0 + || start > length () + || end < start + || end > length ()) + throw new IndexOutOfBoundsException (); + + return new CharBufferImpl (backing_buffer, array_offset, capacity (), position () + end, position () + start, -1, isReadOnly ()); + } + + /** + * Relative get method. Reads the next char from the buffer. + */ + final public char get () + { + char result = backing_buffer [position ()]; + position (position () + 1); + return result; + } + + /** + * Relative put method. Writes value to the next position + * in the buffer. + * + * @exception ReadOnlyBufferException If this buffer is read-only. + */ + final public CharBuffer put (char value) + { + if (readOnly) + throw new ReadOnlyBufferException (); + + backing_buffer [position ()] = value; + position (position () + 1); + return this; + } + + /** + * Absolute get method. Reads the char at position + * index. + * + * @exception IndexOutOfBoundsException If index is negative or not smaller + * than the buffer's limit. + */ + final public char get (int index) + { + if (index < 0 + || index >= limit ()) + throw new IndexOutOfBoundsException (); + + return backing_buffer [index]; + } + + /** + * Absolute put method. Writes value to position + * index in the buffer. + * + * @exception IndexOutOfBoundsException If index is negative or not smaller + * than the buffer's limit. + * @exception ReadOnlyBufferException If this buffer is read-only. + */ + final public CharBuffer put (int index, char value) + { + if (index < 0 + || index >= limit ()) + throw new IndexOutOfBoundsException (); + + if (readOnly) + throw new ReadOnlyBufferException (); + + backing_buffer [index] = value; + return this; + } + + final public ByteOrder order () + { + return ByteOrder.nativeOrder (); + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/CharBuffer.java gcc-3.4.0/libjava/java/nio/CharBuffer.java *** gcc-3.3.3/libjava/java/nio/CharBuffer.java 2003-03-01 21:06:22.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/CharBuffer.java 2003-05-20 08:58:31.000000000 +0000 *************** *** 1,5 **** /* CharBuffer.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* CharBuffer.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,43 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package java.nio; ! import gnu.java.nio.CharBufferImpl; /** * @since 1.4 --- 35,42 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ ! package java.nio; /** * @since 1.4 *************** import gnu.java.nio.CharBufferImpl; *** 45,69 **** public abstract class CharBuffer extends Buffer implements Comparable, CharSequence { ! protected char [] backing_buffer; ! /** * Allocates a new CharBuffer object with a given capacity. */ public static CharBuffer allocate (int capacity) { ! return new CharBufferImpl (capacity, 0, capacity); } ! /** ! * Wraps a character array into a CharBuffer object. ! * * @exception IndexOutOfBoundsException If the preconditions on the offset * and length parameters do not hold */ final public static CharBuffer wrap (char[] array, int offset, int length) { ! return new CharBufferImpl (array, offset, length); } /** --- 44,83 ---- public abstract class CharBuffer extends Buffer implements Comparable, CharSequence { ! int array_offset; ! char[] backing_buffer; ! ! CharBuffer (int capacity, int limit, int position, int mark) ! { ! super (capacity, limit, position, mark); ! array_offset = 0; ! } ! ! CharBuffer (char[] buffer, int offset, int capacity, int limit, int position, int mark) ! { ! super (capacity, limit, position, mark); ! this.backing_buffer = buffer; ! this.array_offset = offset; ! } ! /** * Allocates a new CharBuffer object with a given capacity. */ public static CharBuffer allocate (int capacity) { ! return new CharBufferImpl (capacity); } ! /** ! * Wraps a char array into a CharBuffer ! * object. ! * * @exception IndexOutOfBoundsException If the preconditions on the offset * and length parameters do not hold */ final public static CharBuffer wrap (char[] array, int offset, int length) { ! return new CharBufferImpl (array, 0, array.length, offset + length, offset, -1, false); } /** *************** public abstract class CharBuffer extends *** 82,87 **** --- 96,104 ---- */ final public static CharBuffer wrap (CharSequence a, int offset, int length) { + // FIXME: implement better handling of java.lang.String. + // Probably share data with String via reflection. + if ((offset < 0) || (offset > a.length ()) || (length < 0) *************** public abstract class CharBuffer extends *** 95,123 **** buffer [i] = a.charAt (i); } ! return wrap (buffer, offset, length); } ! /** ! * Wraps a character array into a CharBuffer object. */ final public static CharBuffer wrap (char[] array) { return wrap (array, 0, array.length); } - - CharBuffer (int cap, int lim, int pos, int mark) - { - super (cap, lim, pos, mark); - } /** ! * Relative get method. ! * ! * @exception BufferUnderflowException If the buffer's current position is ! * not smaller than its limit. * @exception IndexOutOfBoundsException If the preconditions on the offset ! * and length parameters do not hold */ public CharBuffer get (char[] dst, int offset, int length) { --- 112,143 ---- buffer [i] = a.charAt (i); } ! return wrap (buffer, offset, length).asReadOnlyBuffer (); } ! /** ! * Wraps a char array into a CharBuffer ! * object. */ final public static CharBuffer wrap (char[] array) { return wrap (array, 0, array.length); } /** ! * This method transfers chars from this buffer into the given ! * destination array. ! * ! * @param dst The destination array ! * @param offset The offset within the array of the first char ! * to be written; must be non-negative and no larger than dst.length. ! * @param length The maximum number of bytes to be written to the given array; ! * must be non-negative and no larger than dst.length - offset. ! * ! * @exception BufferUnderflowException If there are fewer than length ! * chars remaining in this buffer. * @exception IndexOutOfBoundsException If the preconditions on the offset ! * and length parameters do not hold. */ public CharBuffer get (char[] dst, int offset, int length) { *************** public abstract class CharBuffer extends *** 125,148 **** { dst [i] = get (); } ! return this; } ! /** ! * Relative get method. ! * ! * @exception BufferUnderflowException If there are fewer than length ! * characters remaining in this buffer. */ public CharBuffer get (char[] dst) { return get (dst, 0, dst.length); } ! /** ! * @exception BufferOverflowException If there are fewer than length of ! * source buffer characters remaining in this buffer. * @exception IllegalArgumentException If the source buffer is this buffer. * @exception ReadOnlyBufferException If this buffer is read-only. */ --- 145,176 ---- { dst [i] = get (); } ! return this; } ! /** ! * This method transfers chars from this buffer into the given ! * destination array. ! * ! * @param dst The byte array to write into. ! * ! * @exception BufferUnderflowException If there are fewer than dst.length ! * chars remaining in this buffer. */ public CharBuffer get (char[] dst) { return get (dst, 0, dst.length); } ! /** ! * Writes the content of the the CharBUFFER src ! * into the buffer. ! * ! * @param src The source data. ! * ! * @exception BufferOverflowException If there is insufficient space in this ! * buffer for the remaining chars in the source buffer. * @exception IllegalArgumentException If the source buffer is this buffer. * @exception ReadOnlyBufferException If this buffer is read-only. */ *************** public abstract class CharBuffer extends *** 151,169 **** if (src == this) throw new IllegalArgumentException (); ! if (src.length () > 0) { ! char [] toPut = new char [src.length ()]; src.get (toPut); src.put (toPut); } return this; } ! /** ! * @exception BufferOverflowException If there are fewer then length ! * characters remaining in this buffer. * @exception IndexOutOfBoundsException If the preconditions on the offset * and length parameters do not hold * @exception ReadOnlyBufferException If this buffer is read-only. --- 179,209 ---- if (src == this) throw new IllegalArgumentException (); ! if (src.remaining () > remaining ()) ! throw new BufferOverflowException (); ! ! if (src.remaining () > 0) { ! char[] toPut = new char [src.remaining ()]; src.get (toPut); src.put (toPut); } return this; } ! /** ! * Writes the content of the the char array src ! * into the buffer. ! * ! * @param src The array to copy into the buffer. ! * @param offset The offset within the array of the first byte to be read; ! * must be non-negative and no larger than src.length. ! * @param length The number of bytes to be read from the given array; ! * must be non-negative and no larger than src.length - offset. ! * ! * @exception BufferOverflowException If there is insufficient space in this ! * buffer for the remaining chars in the source array. * @exception IndexOutOfBoundsException If the preconditions on the offset * and length parameters do not hold * @exception ReadOnlyBufferException If this buffer is read-only. *************** public abstract class CharBuffer extends *** 173,179 **** if (offset < 0 || offset >= src.length || length < 0 ! || length >= (src.length - offset)) throw new IndexOutOfBoundsException (); // Put nothing into this buffer when not enough space left. --- 213,219 ---- if (offset < 0 || offset >= src.length || length < 0 ! || length > (src.length - offset)) throw new IndexOutOfBoundsException (); // Put nothing into this buffer when not enough space left. *************** public abstract class CharBuffer extends *** 181,198 **** throw new BufferOverflowException (); for (int i = offset; i < offset + length; i++) ! { ! put (src [i]); ! } return this; } /** ! * Relative put method. * ! * @exception BufferOverflowException If there are fewer then length of the ! * array characters remaining in this buffer. * @exception ReadOnlyBufferException If this buffer is read-only. */ public final CharBuffer put (char[] src) --- 221,239 ---- throw new BufferOverflowException (); for (int i = offset; i < offset + length; i++) ! put (src [i]); return this; } /** ! * Writes the content of the the char array src ! * into the buffer. ! * ! * @param src The array to copy into the buffer. * ! * @exception BufferOverflowException If there is insufficient space in this ! * buffer for the remaining chars in the source array. * @exception ReadOnlyBufferException If this buffer is read-only. */ public final CharBuffer put (char[] src) *************** public abstract class CharBuffer extends *** 201,217 **** } /** ! * Tells wether this is buffer is backed by an array or not. */ public final boolean hasArray () { return (backing_buffer != null ! && ! isReadOnly ()); } /** ! * Returns the array that backs this buffer. ! * * @exception ReadOnlyBufferException If this buffer is read-only. * @exception UnsupportedOperationException If this buffer is not backed * by an accessible array. --- 242,259 ---- } /** ! * Tells whether ot not this buffer is backed by an accessible ! * char array. */ public final boolean hasArray () { return (backing_buffer != null ! && !isReadOnly ()); } /** ! * Returns the char array that backs this buffer. ! * * @exception ReadOnlyBufferException If this buffer is read-only. * @exception UnsupportedOperationException If this buffer is not backed * by an accessible array. *************** public abstract class CharBuffer extends *** 226,235 **** return backing_buffer; } ! /** ! * Returns the offset to the position of a character in this buffer. ! * * @exception ReadOnlyBufferException If this buffer is read-only. * @exception UnsupportedOperationException If this buffer is not backed * by an accessible array. --- 268,277 ---- return backing_buffer; } ! /** ! * Returns the offset within this buffer's backing array of the first element. ! * * @exception ReadOnlyBufferException If this buffer is read-only. * @exception UnsupportedOperationException If this buffer is not backed * by an accessible array. *************** public abstract class CharBuffer extends *** 242,321 **** if (isReadOnly ()) throw new ReadOnlyBufferException (); ! return 0; } ! /** ! * Calculates a hash code for this buffer- */ public int hashCode () { // FIXME: Check what SUN calculates here. return super.hashCode (); } ! /** * Checks if this buffer is equal to obj. */ public boolean equals (Object obj) { if (obj instanceof CharBuffer) ! return compareTo (obj) == 0; ! return false; } ! /** ! * Compares two character buffer objects. ! * * @exception ClassCastException If obj is not an object derived from * CharBuffer. */ ! public int compareTo(Object obj) { CharBuffer a = (CharBuffer) obj; ! if (a.remaining () != remaining ()) return 1; ! ! if (! hasArray () || ! a.hasArray ()) ! return 1; ! int r = remaining (); int i1 = position (); int i2 = a.position (); ! for (int i = 0; i < r; i++) { ! int t = (int) (get (i1)- a.get (i2)); ! if (t != 0) ! return (int) t; } ! return 0; } ! /** ! * Relative get method. ! * ! * @exception BufferUnderflowException If there are no remaining characters ! * in this buffer. */ public abstract char get (); ! /** ! * Relative put method. ! * ! * @exception BufferOverflowException If there no remaining characters in ! * this buffer. * @exception ReadOnlyBufferException If this buffer is read-only. */ public abstract CharBuffer put (char b); ! /** * Absolute get method. ! * * @exception IndexOutOfBoundsException If index is negative or not smaller * than the buffer's limit. */ --- 284,377 ---- if (isReadOnly ()) throw new ReadOnlyBufferException (); ! return array_offset; } ! /** ! * Calculates a hash code for this buffer. */ public int hashCode () { // FIXME: Check what SUN calculates here. return super.hashCode (); } ! /** * Checks if this buffer is equal to obj. */ public boolean equals (Object obj) { if (obj instanceof CharBuffer) ! { ! return compareTo (obj) == 0; ! } ! return false; } ! /** ! * Compares two CharBuffer objects. ! * * @exception ClassCastException If obj is not an object derived from * CharBuffer. */ ! public int compareTo (Object obj) { CharBuffer a = (CharBuffer) obj; ! if (a.remaining () != remaining ()) return 1; ! ! if (! hasArray () || ! ! a.hasArray ()) ! { ! return 1; ! } ! int r = remaining (); int i1 = position (); int i2 = a.position (); ! for (int i = 0; i < r; i++) { ! int t = (int) (get (i1) - a.get (i2)); ! if (t != 0) ! { ! return (int) t; ! } } ! return 0; } ! /** ! * Returns the byte order of this buffer. ! */ ! public abstract ByteOrder order (); ! ! /** ! * Reads the char at this buffer's current position, ! * and then increments the position. ! * ! * @exception BufferUnderflowException If there are no remaining ! * chars in this buffer. */ public abstract char get (); ! /** ! * Writes the char at this buffer's current position, ! * and then increments the position. ! * ! * @exception BufferOverflowException If there no remaining ! * chars in this buffer. * @exception ReadOnlyBufferException If this buffer is read-only. */ public abstract CharBuffer put (char b); ! /** * Absolute get method. ! * * @exception IndexOutOfBoundsException If index is negative or not smaller * than the buffer's limit. */ *************** public abstract class CharBuffer extends *** 323,354 **** /** * Absolute put method. ! * * @exception IndexOutOfBoundsException If index is negative or not smaller * than the buffer's limit. * @exception ReadOnlyBufferException If this buffer is read-only. */ public abstract CharBuffer put (int index, char b); ! /** * @exception ReadOnlyBufferException If this buffer is read-only. */ public abstract CharBuffer compact (); ! /** ! * Tells wether this buffer is direct or not. */ public abstract boolean isDirect (); ! public abstract CharBuffer slice (); ! /** ! * Duplicates this buffer. */ public abstract CharBuffer duplicate (); ! /** ! * Returns this buffer made read-only. */ public abstract CharBuffer asReadOnlyBuffer (); --- 379,418 ---- /** * Absolute put method. ! * * @exception IndexOutOfBoundsException If index is negative or not smaller * than the buffer's limit. * @exception ReadOnlyBufferException If this buffer is read-only. */ public abstract CharBuffer put (int index, char b); ! /** + * Compacts this buffer. + * * @exception ReadOnlyBufferException If this buffer is read-only. */ public abstract CharBuffer compact (); ! /** ! * Tells wether or not this buffer is direct. */ public abstract boolean isDirect (); ! ! /** ! * Creates a new CharBuffer whose content is a shared ! * subsequence of this buffer's content. ! */ public abstract CharBuffer slice (); ! /** ! * Creates a new CharBuffer that shares this buffer's ! * content. */ public abstract CharBuffer duplicate (); ! /** ! * Creates a new read-only CharBuffer that shares this ! * buffer's content. */ public abstract CharBuffer asReadOnlyBuffer (); *************** public abstract class CharBuffer extends *** 357,363 **** */ public String toString () { ! return new String (array (), position (), length ()); } /** --- 421,434 ---- */ public String toString () { ! if (hasArray ()) ! return new String (array (), position (), length ()); ! ! char[] buf = new char [length ()]; ! int pos = position (); ! get (buf, 0, buf.length); ! position (pos); ! return new String (buf); } /** *************** public abstract class CharBuffer extends *** 369,379 **** } /** - * Returns the byte order of this buffer. - */ - public abstract ByteOrder order (); - - /** * Creates a new character buffer that represents the specified subsequence * of this buffer, relative to the current position. * --- 440,445 ---- *************** public abstract class CharBuffer extends *** 405,411 **** */ public final CharBuffer put (String str) { ! return put (str, 0, str.length ()); } /** --- 471,477 ---- */ public final CharBuffer put (String str) { ! return put (str.toCharArray (), 0, str.length ()); } /** diff -Nrc3pad gcc-3.3.3/libjava/java/nio/charset/Charset.java gcc-3.4.0/libjava/java/nio/charset/Charset.java *** gcc-3.3.3/libjava/java/nio/charset/Charset.java 2003-02-18 00:04:00.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/charset/Charset.java 2003-05-13 10:25:00.000000000 +0000 *************** public abstract class Charset implements *** 235,241 **** return encode (CharBuffer.wrap (str)); } ! public CharBuffer decode (ByteBuffer bb) { try { --- 235,241 ---- return encode (CharBuffer.wrap (str)); } ! public final CharBuffer decode (ByteBuffer bb) { try { diff -Nrc3pad gcc-3.3.3/libjava/java/nio/CharViewBufferImpl.java gcc-3.4.0/libjava/java/nio/CharViewBufferImpl.java *** gcc-3.3.3/libjava/java/nio/CharViewBufferImpl.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/CharViewBufferImpl.java 2004-02-08 21:18:37.000000000 +0000 *************** *** 0 **** --- 1,153 ---- + /* CharViewBufferImpl.java -- + Copyright (C) 2003, 2004 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.nio; + + class CharViewBufferImpl extends CharBuffer + { + /** Position in bb (i.e. a byte offset) where this buffer starts. */ + private int offset; + private ByteBuffer bb; + private boolean readOnly; + private ByteOrder endian; + + public CharViewBufferImpl (ByteBuffer bb, int offset, int capacity, + int limit, int position, int mark, + boolean readOnly, ByteOrder endian) + { + super (limit >> 1, limit >> 1, position >> 1, mark >> 1); + this.bb = bb; + this.offset = offset; + this.readOnly = readOnly; + this.endian = endian; + } + + public char get () + { + int p = position(); + char result = ByteBufferHelper.getChar(bb, (p << 1) + offset, endian); + position(p + 1); + return result; + } + + public char get (int index) + { + return ByteBufferHelper.getChar(bb, (index << 1) + offset, endian); + } + + public CharBuffer put (char value) + { + int p = position(); + ByteBufferHelper.putChar(bb, (p << 1) + offset, value, endian); + position(p + 1); + return this; + } + + public CharBuffer put (int index, char value) + { + ByteBufferHelper.putChar(bb, (index << 1) + offset, value, endian); + return this; + } + + public CharBuffer compact () + { + if (position () > 0) + { + int count = limit () - position (); + bb.shiftDown(offset, offset + 2 * position(), 2 * count); + position (count); + limit (capacity ()); + } + return this; + } + + public CharBuffer slice () + { + // Create a sliced copy of this object that shares its content. + return new CharViewBufferImpl (bb, (position () >> 1) + offset, + remaining (), remaining (), 0, -1, + isReadOnly (), endian); + } + + CharBuffer duplicate (boolean readOnly) + { + int pos = position(); + reset(); + int mark = position(); + position(pos); + return new CharViewBufferImpl (bb, offset, capacity(), limit(), + pos, mark, readOnly, endian); + } + + public CharBuffer duplicate () + { + return duplicate(readOnly); + } + + public CharBuffer asReadOnlyBuffer () + { + return duplicate(true); + } + + public CharSequence subSequence (int start, int end) + { + if (start < 0 + || end < start + || end > length ()) + throw new IndexOutOfBoundsException (); + + return new CharViewBufferImpl (bb, array_offset, capacity (), + position () + end, position () + start, + -1, isReadOnly (), endian); + } + + public boolean isReadOnly () + { + return readOnly; + } + + public boolean isDirect () + { + return bb.isDirect (); + } + + public ByteOrder order () + { + return endian; + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/DirectByteBufferImpl.java gcc-3.4.0/libjava/java/nio/DirectByteBufferImpl.java *** gcc-3.3.3/libjava/java/nio/DirectByteBufferImpl.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/DirectByteBufferImpl.java 2004-02-08 21:18:37.000000000 +0000 *************** *** 0 **** --- 1,323 ---- + /* DirectByteBufferImpl.java -- + Copyright (C) 2003, 2004 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.nio; + + import gnu.classpath.Configuration; + import gnu.gcj.RawData; + + class DirectByteBufferImpl extends ByteBuffer + { + static + { + // load the shared library needed for native methods. + if (Configuration.INIT_LOAD_LIBRARY) + { + System.loadLibrary ("javanio"); + } + } + + RawData address; + private int offset; + private boolean readOnly; + + public DirectByteBufferImpl (RawData address, long len) + { + this (address, 0, (int) len, (int) len, 0, -1, false); + } + + public DirectByteBufferImpl (RawData address, int offset, int capacity, + int limit, int position, int mark, + boolean readOnly) + { + super (capacity, limit, position, mark); + this.address = address; + this.offset = offset; + this.readOnly = readOnly; + } + + private static native RawData allocateImpl (int capacity); + private static native void freeImpl (RawData address); + + protected void finalize () throws Throwable + { + freeImpl (address); + } + + public static ByteBuffer allocateDirect (int capacity) + { + RawData address = allocateImpl (capacity); + + if (address == null) + throw new InternalError ("Not enough memory to create direct buffer"); + + return new DirectByteBufferImpl (address, 0, capacity, capacity, 0, -1, false); + } + + private native byte getImpl (int index); + private native void putImpl (int index, byte value); + + public byte get () + { + byte result = getImpl (position () + offset); + position (position () + 1); + return result; + } + + public byte get (int index) + { + return getImpl (index); + } + + public ByteBuffer put (byte value) + { + putImpl (position (), value); + position (position () + 1); + return this; + } + + public ByteBuffer put (int index, byte value) + { + putImpl (index, value); + return this; + } + + native void shiftDown (int dst_offset, int src_offset, int count); + + public ByteBuffer compact () + { + int pos = position(); + if (pos > 0) + { + int count = remaining(); + shiftDown(0, pos, count); + position(count); + limit(capacity()); + } + return this; + } + + public ByteBuffer duplicate () + { + return new DirectByteBufferImpl ( + address, offset, capacity (), limit (), position (), -1, isReadOnly ()); + } + + public ByteBuffer slice () + { + return new DirectByteBufferImpl (address, position () + offset, remaining (), remaining (), 0, -1, isReadOnly ()); + } + + public ByteBuffer asReadOnlyBuffer () + { + return new DirectByteBufferImpl ( + address, offset, capacity (), limit (), position (), -1, true); + } + + public boolean isReadOnly () + { + return readOnly; + } + + public boolean isDirect () + { + return true; + } + + public CharBuffer asCharBuffer () + { + return new CharViewBufferImpl (this, position (), remaining (), remaining (), 0, -1, isReadOnly (), order()); + } + + public DoubleBuffer asDoubleBuffer () + { + return new DoubleViewBufferImpl (this, position (), remaining (), remaining (), 0, -1, isReadOnly (), order()); + } + + public FloatBuffer asFloatBuffer () + { + return new FloatViewBufferImpl (this, position (), remaining (), remaining (), 0, -1, isReadOnly (), order()); + } + + public IntBuffer asIntBuffer () + { + return new IntViewBufferImpl (this, position (), remaining (), remaining (), 0, -1, isReadOnly (), order()); + } + + public LongBuffer asLongBuffer () + { + return new LongViewBufferImpl (this, position (), remaining (), remaining (), 0, -1, isReadOnly (), order()); + } + + public ShortBuffer asShortBuffer () + { + return new ShortViewBufferImpl (this, position (), remaining (), remaining (), 0, -1, isReadOnly (), order()); + } + + final public char getChar () + { + return ByteBufferHelper.getChar(this, order()); + } + + final public ByteBuffer putChar (char value) + { + ByteBufferHelper.putChar(this, value, order()); + return this; + } + + final public char getChar (int index) + { + return ByteBufferHelper.getChar(this, index, order()); + } + + final public ByteBuffer putChar (int index, char value) + { + ByteBufferHelper.putChar(this, index, value, order()); + return this; + } + + final public short getShort () + { + return ByteBufferHelper.getShort(this, order()); + } + + final public ByteBuffer putShort (short value) + { + ByteBufferHelper.putShort(this, value, order()); + return this; + } + + final public short getShort (int index) + { + return ByteBufferHelper.getShort(this, index, order()); + } + + final public ByteBuffer putShort (int index, short value) + { + ByteBufferHelper.putShort(this, index, value, order()); + return this; + } + + final public int getInt () + { + return ByteBufferHelper.getInt(this, order()); + } + + final public ByteBuffer putInt (int value) + { + ByteBufferHelper.putInt(this, value, order()); + return this; + } + + final public int getInt (int index) + { + return ByteBufferHelper.getInt(this, index, order()); + } + + final public ByteBuffer putInt (int index, int value) + { + ByteBufferHelper.putInt(this, index, value, order()); + return this; + } + + final public long getLong () + { + return ByteBufferHelper.getLong(this, order()); + } + + final public ByteBuffer putLong (long value) + { + ByteBufferHelper.putLong (this, value, order()); + return this; + } + + final public long getLong (int index) + { + return ByteBufferHelper.getLong (this, index, order()); + } + + final public ByteBuffer putLong (int index, long value) + { + ByteBufferHelper.putLong (this, index, value, order()); + return this; + } + + final public float getFloat () + { + return ByteBufferHelper.getFloat (this, order()); + } + + final public ByteBuffer putFloat (float value) + { + ByteBufferHelper.putFloat (this, value, order()); + return this; + } + + public final float getFloat (int index) + { + return ByteBufferHelper.getFloat (this, index, order()); + } + + final public ByteBuffer putFloat (int index, float value) + { + ByteBufferHelper.putFloat (this, index, value, order()); + return this; + } + + final public double getDouble () + { + return ByteBufferHelper.getDouble (this, order()); + } + + final public ByteBuffer putDouble (double value) + { + ByteBufferHelper.putDouble (this, value, order()); + return this; + } + + final public double getDouble (int index) + { + return ByteBufferHelper.getDouble (this, index, order()); + } + + final public ByteBuffer putDouble (int index, double value) + { + ByteBufferHelper.putDouble (this, index, value, order()); + return this; + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/DoubleBufferImpl.java gcc-3.4.0/libjava/java/nio/DoubleBufferImpl.java *** gcc-3.3.3/libjava/java/nio/DoubleBufferImpl.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/DoubleBufferImpl.java 2003-06-27 13:34:11.000000000 +0000 *************** *** 0 **** --- 1,157 ---- + /* DoubleBufferImpl.java -- + Copyright (C) 2002, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.nio; + + /** + * This is a Heap memory implementation + */ + final class DoubleBufferImpl extends DoubleBuffer + { + private boolean readOnly; + + DoubleBufferImpl (int capacity) + { + this (new double [capacity], 0, capacity, capacity, 0, -1, false); + } + + DoubleBufferImpl (double[] buffer, int offset, int capacity, int limit, int position, int mark, boolean readOnly) + { + super (buffer, offset, capacity, limit, position, mark); + this.readOnly = readOnly; + } + + public boolean isReadOnly () + { + return readOnly; + } + + public DoubleBuffer slice () + { + return new DoubleBufferImpl (backing_buffer, array_offset + position (), remaining (), remaining (), 0, -1, isReadOnly ()); + } + + public DoubleBuffer duplicate () + { + return new DoubleBufferImpl (backing_buffer, array_offset, capacity (), limit (), position (), mark, isReadOnly ()); + } + + public DoubleBuffer asReadOnlyBuffer () + { + return new DoubleBufferImpl (backing_buffer, array_offset, capacity (), limit (), position (), mark, true); + } + + public DoubleBuffer compact () + { + int copied = 0; + + while (remaining () > 0) + { + put (copied, get ()); + copied++; + } + + position (copied); + return this; + } + + public boolean isDirect () + { + return false; + } + + /** + * Relative get method. Reads the next double from the buffer. + */ + final public double get () + { + double result = backing_buffer [position ()]; + position (position () + 1); + return result; + } + + /** + * Relative put method. Writes value to the next position + * in the buffer. + * + * @exception ReadOnlyBufferException If this buffer is read-only. + */ + final public DoubleBuffer put (double value) + { + if (readOnly) + throw new ReadOnlyBufferException (); + + backing_buffer [position ()] = value; + position (position () + 1); + return this; + } + + /** + * Absolute get method. Reads the double at position + * index. + * + * @exception IndexOutOfBoundsException If index is negative or not smaller + * than the buffer's limit. + */ + final public double get (int index) + { + return backing_buffer [index]; + } + + /** + * Absolute put method. Writes value to position + * index in the buffer. + * + * @exception IndexOutOfBoundsException If index is negative or not smaller + * than the buffer's limit. + * @exception ReadOnlyBufferException If this buffer is read-only. + */ + final public DoubleBuffer put (int index, double value) + { + if (readOnly) + throw new ReadOnlyBufferException (); + + backing_buffer [index] = value; + return this; + } + + final public ByteOrder order () + { + return ByteOrder.nativeOrder (); + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/DoubleBuffer.java gcc-3.4.0/libjava/java/nio/DoubleBuffer.java *** gcc-3.3.3/libjava/java/nio/DoubleBuffer.java 2003-03-01 21:06:22.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/DoubleBuffer.java 2003-05-20 08:58:31.000000000 +0000 *************** *** 1,5 **** /* DoubleBuffer.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* DoubleBuffer.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,130 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package java.nio; ! import gnu.java.nio.DoubleBufferImpl; ! public abstract class DoubleBuffer extends Buffer implements Comparable { ! protected double [] backing_buffer; ! protected int array_offset; ! ! public static DoubleBuffer allocateDirect(int capacity) ! { ! throw new Error ("direct buffers are not implemented"); ! } ! public static DoubleBuffer allocate(int capacity) { ! return new DoubleBufferImpl(capacity, 0, capacity); } ! final public static DoubleBuffer wrap (double[] array, int offset, int length) { ! return new DoubleBufferImpl(array, offset, length); } ! final public static DoubleBuffer wrap(String a) { ! int len = a.length(); ! double[] buffer = new double[len]; ! ! for (int i=0;iDoubleBuffer object with a given capacity. ! */ ! public static DoubleBuffer allocate (int capacity) { ! return new DoubleBufferImpl (capacity); } ! /** ! * Wraps a double array into a DoubleBuffer ! * object. ! * ! * @exception IndexOutOfBoundsException If the preconditions on the offset ! * and length parameters do not hold ! */ ! final public static DoubleBuffer wrap (double[] array, int offset, int length) { ! return new DoubleBufferImpl (array, 0, array.length, offset + length, offset, -1, false); } ! /** ! * Wraps a double array into a DoubleBuffer ! * object. ! */ ! final public static DoubleBuffer wrap (double[] array) { ! return wrap (array, 0, array.length); } + /** + * This method transfers doubles from this buffer into the given + * destination array. + * + * @param dst The destination array + * @param offset The offset within the array of the first double + * to be written; must be non-negative and no larger than dst.length. + * @param length The maximum number of bytes to be written to the given array; + * must be non-negative and no larger than dst.length - offset. + * + * @exception BufferUnderflowException If there are fewer than length + * doubles remaining in this buffer. + * @exception IndexOutOfBoundsException If the preconditions on the offset + * and length parameters do not hold. + */ public DoubleBuffer get (double[] dst, int offset, int length) { for (int i = offset; i < offset + length; i++) { ! dst [i] = get (); } return this; } + /** + * This method transfers doubles from this buffer into the given + * destination array. + * + * @param dst The byte array to write into. + * + * @exception BufferUnderflowException If there are fewer than dst.length + * doubles remaining in this buffer. + */ public DoubleBuffer get (double[] dst) { ! return get (dst, 0, dst.length); } + /** + * Writes the content of the the DoubleBUFFER src + * into the buffer. + * + * @param src The source data. + * + * @exception BufferOverflowException If there is insufficient space in this + * buffer for the remaining doubles in the source buffer. + * @exception IllegalArgumentException If the source buffer is this buffer. + * @exception ReadOnlyBufferException If this buffer is read-only. + */ public DoubleBuffer put (DoubleBuffer src) { ! if (src == this) ! throw new IllegalArgumentException (); ! ! if (src.remaining () > remaining ()) ! throw new BufferOverflowException (); ! ! if (src.remaining () > 0) ! { ! double[] toPut = new double [src.remaining ()]; ! src.get (toPut); ! src.put (toPut); ! } return this; } + /** + * Writes the content of the the double array src + * into the buffer. + * + * @param src The array to copy into the buffer. + * @param offset The offset within the array of the first byte to be read; + * must be non-negative and no larger than src.length. + * @param length The number of bytes to be read from the given array; + * must be non-negative and no larger than src.length - offset. + * + * @exception BufferOverflowException If there is insufficient space in this + * buffer for the remaining doubles in the source array. + * @exception IndexOutOfBoundsException If the preconditions on the offset + * and length parameters do not hold + * @exception ReadOnlyBufferException If this buffer is read-only. + */ public DoubleBuffer put (double[] src, int offset, int length) { for (int i = offset; i < offset + length; i++) ! put (src [i]); return this; } ! /** ! * Writes the content of the the double array src ! * into the buffer. ! * ! * @param src The array to copy into the buffer. ! * ! * @exception BufferOverflowException If there is insufficient space in this ! * buffer for the remaining doubles in the source array. ! * @exception ReadOnlyBufferException If this buffer is read-only. ! */ ! public final DoubleBuffer put (double[] src) { ! return put (src, 0, src.length); } ! /** ! * Tells whether ot not this buffer is backed by an accessible ! * double array. ! */ ! public final boolean hasArray () { return (backing_buffer != null && !isReadOnly ()); } ! /** ! * Returns the double array that backs this buffer. ! * ! * @exception ReadOnlyBufferException If this buffer is read-only. ! * @exception UnsupportedOperationException If this buffer is not backed ! * by an accessible array. ! */ ! public final double[] array () { if (backing_buffer == null) throw new UnsupportedOperationException (); *************** public abstract class DoubleBuffer exten *** 135,141 **** return backing_buffer; } ! public final int arrayOffset() { if (backing_buffer == null) throw new UnsupportedOperationException (); --- 224,237 ---- return backing_buffer; } ! /** ! * Returns the offset within this buffer's backing array of the first element. ! * ! * @exception ReadOnlyBufferException If this buffer is read-only. ! * @exception UnsupportedOperationException If this buffer is not backed ! * by an accessible array. ! */ ! public final int arrayOffset () { if (backing_buffer == null) throw new UnsupportedOperationException (); *************** public abstract class DoubleBuffer exten *** 146,186 **** return array_offset; } ! public int hashCode() { ! return super.hashCode(); } ! public boolean equals(Object obj) { if (obj instanceof DoubleBuffer) { ! return compareTo(obj) == 0; } return false; } ! public int compareTo(Object ob) { ! DoubleBuffer a = (DoubleBuffer) ob; ! if (a.remaining() != remaining()) return 1; ! if (! hasArray() || ! ! a.hasArray()) { return 1; } ! int r = remaining(); int i1 = position (); int i2 = a.position (); ! for (int i=0;iDoubleBuffer objects. ! * ! * @exception ClassCastException If obj is not an object derived from ! * DoubleBuffer. ! */ ! public int compareTo (Object obj) { ! DoubleBuffer a = (DoubleBuffer) obj; ! if (a.remaining () != remaining ()) return 1; ! if (! hasArray () || ! ! a.hasArray ()) { return 1; } ! int r = remaining (); int i1 = position (); int i2 = a.position (); ! for (int i = 0; i < r; i++) { ! int t = (int) (get (i1) - a.get (i2)); ! if (t != 0) { return (int) t; *************** public abstract class DoubleBuffer exten *** 190,203 **** return 0; } public abstract ByteOrder order (); ! public abstract double get(); public abstract DoubleBuffer put (double b); ! public abstract double get(int index); ! public abstract DoubleBuffer put(int index, double b); ! public abstract DoubleBuffer compact(); ! public abstract boolean isDirect(); ! public abstract DoubleBuffer slice(); ! public abstract DoubleBuffer duplicate(); ! public abstract DoubleBuffer asReadOnlyBuffer(); } --- 300,373 ---- return 0; } + /** + * Returns the byte order of this buffer. + */ public abstract ByteOrder order (); ! ! /** ! * Reads the double at this buffer's current position, ! * and then increments the position. ! * ! * @exception BufferUnderflowException If there are no remaining ! * doubles in this buffer. ! */ ! public abstract double get (); ! ! /** ! * Writes the double at this buffer's current position, ! * and then increments the position. ! * ! * @exception BufferOverflowException If there no remaining ! * doubles in this buffer. ! * @exception ReadOnlyBufferException If this buffer is read-only. ! */ public abstract DoubleBuffer put (double b); ! ! /** ! * Absolute get method. ! * ! * @exception IndexOutOfBoundsException If index is negative or not smaller ! * than the buffer's limit. ! */ ! public abstract double get (int index); ! ! /** ! * Absolute put method. ! * ! * @exception IndexOutOfBoundsException If index is negative or not smaller ! * than the buffer's limit. ! * @exception ReadOnlyBufferException If this buffer is read-only. ! */ ! public abstract DoubleBuffer put (int index, double b); ! ! /** ! * Compacts this buffer. ! * ! * @exception ReadOnlyBufferException If this buffer is read-only. ! */ ! public abstract DoubleBuffer compact (); ! ! /** ! * Tells wether or not this buffer is direct. ! */ ! public abstract boolean isDirect (); ! ! /** ! * Creates a new DoubleBuffer whose content is a shared ! * subsequence of this buffer's content. ! */ ! public abstract DoubleBuffer slice (); ! ! /** ! * Creates a new DoubleBuffer that shares this buffer's ! * content. ! */ ! public abstract DoubleBuffer duplicate (); ! ! /** ! * Creates a new read-only DoubleBuffer that shares this ! * buffer's content. ! */ ! public abstract DoubleBuffer asReadOnlyBuffer (); } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/DoubleViewBufferImpl.java gcc-3.4.0/libjava/java/nio/DoubleViewBufferImpl.java *** gcc-3.3.3/libjava/java/nio/DoubleViewBufferImpl.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/DoubleViewBufferImpl.java 2004-02-08 21:18:37.000000000 +0000 *************** *** 0 **** --- 1,140 ---- + /* DoubleViewBufferImpl.java -- + Copyright (C) 2003, 2004 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.nio; + + class DoubleViewBufferImpl extends DoubleBuffer + { + /** Position in bb (i.e. a byte offset) where this buffer starts. */ + private int offset; + private ByteBuffer bb; + private boolean readOnly; + private ByteOrder endian; + + public DoubleViewBufferImpl (ByteBuffer bb, int offset, int capacity, + int limit, int position, int mark, + boolean readOnly, ByteOrder endian) + { + super (limit >> 3, limit >> 3, position >> 3, mark >> 3); + this.bb = bb; + this.offset = offset; + this.readOnly = readOnly; + this.endian = endian; + } + + public double get () + { + int p = position(); + double result = ByteBufferHelper.getDouble(bb, (p << 3) + offset, endian); + position(p + 1); + return result; + } + + public double get (int index) + { + return ByteBufferHelper.getDouble(bb, (index << 3) + offset, endian); + } + + public DoubleBuffer put (double value) + { + int p = position(); + ByteBufferHelper.putDouble(bb, (p << 3) + offset, value, endian); + position(p + 1); + return this; + } + + public DoubleBuffer put (int index, double value) + { + ByteBufferHelper.putDouble(bb, (index << 3) + offset, value, endian); + return this; + } + + public DoubleBuffer compact () + { + if (position () > 0) + { + int count = limit () - position (); + bb.shiftDown(offset, offset + 8 * position(), 8 * count); + position (count); + limit (capacity ()); + } + return this; + } + + public DoubleBuffer slice () + { + return new DoubleViewBufferImpl (bb, (position () >> 3) + offset, + remaining(), remaining(), 0, -1, + readOnly, endian); + } + + DoubleBuffer duplicate (boolean readOnly) + { + int pos = position(); + reset(); + int mark = position(); + position(pos); + return new DoubleViewBufferImpl (bb, offset, capacity(), limit(), + pos, mark, readOnly, endian); + } + + public DoubleBuffer duplicate () + { + return duplicate(readOnly); + } + + public DoubleBuffer asReadOnlyBuffer () + { + return duplicate(true); + } + + public boolean isReadOnly () + { + return readOnly; + } + + public boolean isDirect () + { + return bb.isDirect (); + } + + public ByteOrder order () + { + return endian; + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/FloatBufferImpl.java gcc-3.4.0/libjava/java/nio/FloatBufferImpl.java *** gcc-3.3.3/libjava/java/nio/FloatBufferImpl.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/FloatBufferImpl.java 2003-06-27 13:34:11.000000000 +0000 *************** *** 0 **** --- 1,157 ---- + /* FloatBufferImpl.java -- + Copyright (C) 2002, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.nio; + + /** + * This is a Heap memory implementation + */ + final class FloatBufferImpl extends FloatBuffer + { + private boolean readOnly; + + FloatBufferImpl (int capacity) + { + this (new float [capacity], 0, capacity, capacity, 0, -1, false); + } + + FloatBufferImpl (float[] buffer, int offset, int capacity, int limit, int position, int mark, boolean readOnly) + { + super (buffer, offset, capacity, limit, position, mark); + this.readOnly = readOnly; + } + + public boolean isReadOnly () + { + return readOnly; + } + + public FloatBuffer slice () + { + return new FloatBufferImpl (backing_buffer, array_offset + position (), remaining (), remaining (), 0, -1, isReadOnly ()); + } + + public FloatBuffer duplicate () + { + return new FloatBufferImpl (backing_buffer, array_offset, capacity (), limit (), position (), mark, isReadOnly ()); + } + + public FloatBuffer asReadOnlyBuffer () + { + return new FloatBufferImpl (backing_buffer, array_offset, capacity (), limit (), position (), mark, true); + } + + public FloatBuffer compact () + { + int copied = 0; + + while (remaining () > 0) + { + put (copied, get ()); + copied++; + } + + position (copied); + return this; + } + + public boolean isDirect () + { + return false; + } + + /** + * Relative get method. Reads the next float from the buffer. + */ + final public float get () + { + float result = backing_buffer [position ()]; + position (position () + 1); + return result; + } + + /** + * Relative put method. Writes value to the next position + * in the buffer. + * + * @exception ReadOnlyBufferException If this buffer is read-only. + */ + final public FloatBuffer put (float value) + { + if (readOnly) + throw new ReadOnlyBufferException (); + + backing_buffer [position ()] = value; + position (position () + 1); + return this; + } + + /** + * Absolute get method. Reads the float at position + * index. + * + * @exception IndexOutOfBoundsException If index is negative or not smaller + * than the buffer's limit. + */ + final public float get (int index) + { + return backing_buffer [index]; + } + + /** + * Absolute put method. Writes value to position + * index in the buffer. + * + * @exception IndexOutOfBoundsException If index is negative or not smaller + * than the buffer's limit. + * @exception ReadOnlyBufferException If this buffer is read-only. + */ + final public FloatBuffer put (int index, float value) + { + if (readOnly) + throw new ReadOnlyBufferException (); + + backing_buffer [index] = value; + return this; + } + + final public ByteOrder order () + { + return ByteOrder.nativeOrder (); + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/FloatBuffer.java gcc-3.4.0/libjava/java/nio/FloatBuffer.java *** gcc-3.3.3/libjava/java/nio/FloatBuffer.java 2003-03-01 21:06:23.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/FloatBuffer.java 2003-05-20 08:58:31.000000000 +0000 *************** *** 1,5 **** /* FloatBuffer.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* FloatBuffer.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,131 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package java.nio; ! import gnu.java.nio.FloatBufferImpl; ! public abstract class FloatBuffer extends Buffer implements Comparable { ! protected float [] backing_buffer; ! protected int array_offset; ! ! public static FloatBuffer allocateDirect(int capacity) ! { ! throw new Error ("direct buffers not implemented"); ! } ! public static FloatBuffer allocate(int capacity) { ! return new FloatBufferImpl (capacity, 0, capacity); } ! final public static FloatBuffer wrap(float[] array, int offset, int length) { ! return new FloatBufferImpl(array, offset, length); } ! final public static FloatBuffer wrap(String a) { ! int len = a.length(); ! float[] buffer = new float[len]; ! ! for (int i=0;iFloatBuffer object with a given capacity. ! */ ! public static FloatBuffer allocate (int capacity) { ! return new FloatBufferImpl (capacity); } ! /** ! * Wraps a float array into a FloatBuffer ! * object. ! * ! * @exception IndexOutOfBoundsException If the preconditions on the offset ! * and length parameters do not hold ! */ ! final public static FloatBuffer wrap (float[] array, int offset, int length) { ! return new FloatBufferImpl (array, 0, array.length, offset + length, offset, -1, false); } ! /** ! * Wraps a float array into a FloatBuffer ! * object. ! */ ! final public static FloatBuffer wrap (float[] array) { ! return wrap (array, 0, array.length); } + /** + * This method transfers floats from this buffer into the given + * destination array. + * + * @param dst The destination array + * @param offset The offset within the array of the first float + * to be written; must be non-negative and no larger than dst.length. + * @param length The maximum number of bytes to be written to the given array; + * must be non-negative and no larger than dst.length - offset. + * + * @exception BufferUnderflowException If there are fewer than length + * floats remaining in this buffer. + * @exception IndexOutOfBoundsException If the preconditions on the offset + * and length parameters do not hold. + */ public FloatBuffer get (float[] dst, int offset, int length) { for (int i = offset; i < offset + length; i++) { ! dst [i] = get (); } return this; } + /** + * This method transfers floats from this buffer into the given + * destination array. + * + * @param dst The byte array to write into. + * + * @exception BufferUnderflowException If there are fewer than dst.length + * floats remaining in this buffer. + */ public FloatBuffer get (float[] dst) { ! return get (dst, 0, dst.length); } + /** + * Writes the content of the the FloatBUFFER src + * into the buffer. + * + * @param src The source data. + * + * @exception BufferOverflowException If there is insufficient space in this + * buffer for the remaining floats in the source buffer. + * @exception IllegalArgumentException If the source buffer is this buffer. + * @exception ReadOnlyBufferException If this buffer is read-only. + */ public FloatBuffer put (FloatBuffer src) { ! if (src == this) ! throw new IllegalArgumentException (); ! ! if (src.remaining () > remaining ()) ! throw new BufferOverflowException (); ! ! if (src.remaining () > 0) ! { ! float[] toPut = new float [src.remaining ()]; ! src.get (toPut); ! src.put (toPut); ! } return this; } + /** + * Writes the content of the the float array src + * into the buffer. + * + * @param src The array to copy into the buffer. + * @param offset The offset within the array of the first byte to be read; + * must be non-negative and no larger than src.length. + * @param length The number of bytes to be read from the given array; + * must be non-negative and no larger than src.length - offset. + * + * @exception BufferOverflowException If there is insufficient space in this + * buffer for the remaining floats in the source array. + * @exception IndexOutOfBoundsException If the preconditions on the offset + * and length parameters do not hold + * @exception ReadOnlyBufferException If this buffer is read-only. + */ public FloatBuffer put (float[] src, int offset, int length) { for (int i = offset; i < offset + length; i++) ! put (src [i]); return this; } ! /** ! * Writes the content of the the float array src ! * into the buffer. ! * ! * @param src The array to copy into the buffer. ! * ! * @exception BufferOverflowException If there is insufficient space in this ! * buffer for the remaining floats in the source array. ! * @exception ReadOnlyBufferException If this buffer is read-only. ! */ ! public final FloatBuffer put (float[] src) { ! return put (src, 0, src.length); } ! /** ! * Tells whether ot not this buffer is backed by an accessible ! * float array. ! */ ! public final boolean hasArray () { return (backing_buffer != null && !isReadOnly ()); } ! /** ! * Returns the float array that backs this buffer. ! * ! * @exception ReadOnlyBufferException If this buffer is read-only. ! * @exception UnsupportedOperationException If this buffer is not backed ! * by an accessible array. ! */ ! public final float[] array () { if (backing_buffer == null) throw new UnsupportedOperationException (); *************** public abstract class FloatBuffer extend *** 136,142 **** return backing_buffer; } ! public final int arrayOffset() { if (backing_buffer == null) throw new UnsupportedOperationException (); --- 224,237 ---- return backing_buffer; } ! /** ! * Returns the offset within this buffer's backing array of the first element. ! * ! * @exception ReadOnlyBufferException If this buffer is read-only. ! * @exception UnsupportedOperationException If this buffer is not backed ! * by an accessible array. ! */ ! public final int arrayOffset () { if (backing_buffer == null) throw new UnsupportedOperationException (); *************** public abstract class FloatBuffer extend *** 147,187 **** return array_offset; } ! public int hashCode() { ! return super.hashCode(); } ! public boolean equals(Object obj) { if (obj instanceof FloatBuffer) { ! return compareTo(obj) == 0; } return false; } ! public int compareTo(Object ob) { ! FloatBuffer a = (FloatBuffer) ob; ! if (a.remaining() != remaining()) return 1; ! if (! hasArray() || ! ! a.hasArray()) { return 1; } ! int r = remaining(); int i1 = position (); int i2 = a.position (); ! for (int i=0;iFloatBuffer objects. ! * ! * @exception ClassCastException If obj is not an object derived from ! * FloatBuffer. ! */ ! public int compareTo (Object obj) { ! FloatBuffer a = (FloatBuffer) obj; ! if (a.remaining () != remaining ()) return 1; ! if (! hasArray () || ! ! a.hasArray ()) { return 1; } ! int r = remaining (); int i1 = position (); int i2 = a.position (); ! for (int i = 0; i < r; i++) { ! int t = (int) (get (i1) - a.get (i2)); ! if (t != 0) { return (int) t; *************** public abstract class FloatBuffer extend *** 191,204 **** return 0; } public abstract ByteOrder order (); ! public abstract float get(); ! public abstract java.nio. FloatBuffer put(float b); ! public abstract float get(int index); ! public abstract java.nio. FloatBuffer put(int index, float b); ! public abstract FloatBuffer compact(); ! public abstract boolean isDirect(); ! public abstract FloatBuffer slice(); ! public abstract FloatBuffer duplicate(); ! public abstract FloatBuffer asReadOnlyBuffer(); } --- 300,373 ---- return 0; } + /** + * Returns the byte order of this buffer. + */ public abstract ByteOrder order (); ! ! /** ! * Reads the float at this buffer's current position, ! * and then increments the position. ! * ! * @exception BufferUnderflowException If there are no remaining ! * floats in this buffer. ! */ ! public abstract float get (); ! ! /** ! * Writes the float at this buffer's current position, ! * and then increments the position. ! * ! * @exception BufferOverflowException If there no remaining ! * floats in this buffer. ! * @exception ReadOnlyBufferException If this buffer is read-only. ! */ ! public abstract FloatBuffer put (float b); ! ! /** ! * Absolute get method. ! * ! * @exception IndexOutOfBoundsException If index is negative or not smaller ! * than the buffer's limit. ! */ ! public abstract float get (int index); ! ! /** ! * Absolute put method. ! * ! * @exception IndexOutOfBoundsException If index is negative or not smaller ! * than the buffer's limit. ! * @exception ReadOnlyBufferException If this buffer is read-only. ! */ ! public abstract FloatBuffer put (int index, float b); ! ! /** ! * Compacts this buffer. ! * ! * @exception ReadOnlyBufferException If this buffer is read-only. ! */ ! public abstract FloatBuffer compact (); ! ! /** ! * Tells wether or not this buffer is direct. ! */ ! public abstract boolean isDirect (); ! ! /** ! * Creates a new FloatBuffer whose content is a shared ! * subsequence of this buffer's content. ! */ ! public abstract FloatBuffer slice (); ! ! /** ! * Creates a new FloatBuffer that shares this buffer's ! * content. ! */ ! public abstract FloatBuffer duplicate (); ! ! /** ! * Creates a new read-only FloatBuffer that shares this ! * buffer's content. ! */ ! public abstract FloatBuffer asReadOnlyBuffer (); } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/FloatViewBufferImpl.java gcc-3.4.0/libjava/java/nio/FloatViewBufferImpl.java *** gcc-3.3.3/libjava/java/nio/FloatViewBufferImpl.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/FloatViewBufferImpl.java 2004-02-08 21:18:37.000000000 +0000 *************** *** 0 **** --- 1,141 ---- + /* FloatViewBufferImpl.java -- + Copyright (C) 2003, 2004 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.nio; + + class FloatViewBufferImpl extends FloatBuffer + { + /** Position in bb (i.e. a byte offset) where this buffer starts. */ + private int offset; + private ByteBuffer bb; + private boolean readOnly; + private ByteOrder endian; + + public FloatViewBufferImpl (ByteBuffer bb, int offset, int capacity, + int limit, int position, int mark, + boolean readOnly, ByteOrder endian) + { + super (limit >> 2, limit >> 2, position >> 2, mark >> 2); + this.bb = bb; + this.offset = offset; + this.readOnly = readOnly; + this.endian = endian; + } + + public float get () + { + int p = position(); + float result = ByteBufferHelper.getFloat(bb, (p << 2) + offset, endian); + position(p + 1); + return result; + } + + public float get (int index) + { + return ByteBufferHelper.getFloat(bb, (index << 2) + offset, endian); + } + + public FloatBuffer put (float value) + { + int p = position(); + ByteBufferHelper.putFloat(bb, (p << 2) + offset, value, endian); + position(p + 1); + return this; + } + + public FloatBuffer put (int index, float value) + { + ByteBufferHelper.putFloat(bb, (index << 2) + offset, value, endian); + return this; + } + + public FloatBuffer compact () + { + if (position () > 0) + { + int count = limit () - position (); + bb.shiftDown(offset, offset + 4 * position(), 4 * count); + position (count); + limit (capacity ()); + } + return this; + } + + public FloatBuffer slice () + { + // Create a sliced copy of this object that shares its content. + return new FloatViewBufferImpl (bb, (position () >> 2) + offset, + remaining(), remaining(), 0, -1, + readOnly, endian); + } + + FloatBuffer duplicate (boolean readOnly) + { + int pos = position(); + reset(); + int mark = position(); + position(pos); + return new FloatViewBufferImpl (bb, offset, capacity(), limit(), + pos, mark, readOnly, endian); + } + + public FloatBuffer duplicate () + { + return duplicate(readOnly); + } + + public FloatBuffer asReadOnlyBuffer () + { + return duplicate(true); + } + + public boolean isReadOnly () + { + return readOnly; + } + + public boolean isDirect () + { + return bb.isDirect (); + } + + public ByteOrder order () + { + return endian; + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/IntBufferImpl.java gcc-3.4.0/libjava/java/nio/IntBufferImpl.java *** gcc-3.3.3/libjava/java/nio/IntBufferImpl.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/IntBufferImpl.java 2003-06-27 13:34:11.000000000 +0000 *************** *** 0 **** --- 1,157 ---- + /* IntBufferImpl.java -- + Copyright (C) 2002, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.nio; + + /** + * This is a Heap memory implementation + */ + final class IntBufferImpl extends IntBuffer + { + private boolean readOnly; + + IntBufferImpl (int capacity) + { + this (new int [capacity], 0, capacity, capacity, 0, -1, false); + } + + IntBufferImpl (int[] buffer, int offset, int capacity, int limit, int position, int mark, boolean readOnly) + { + super (buffer, offset, capacity, limit, position, mark); + this.readOnly = readOnly; + } + + public boolean isReadOnly () + { + return readOnly; + } + + public IntBuffer slice () + { + return new IntBufferImpl (backing_buffer, array_offset + position (), remaining (), remaining (), 0, -1, isReadOnly ()); + } + + public IntBuffer duplicate () + { + return new IntBufferImpl (backing_buffer, array_offset, capacity (), limit (), position (), mark, isReadOnly ()); + } + + public IntBuffer asReadOnlyBuffer () + { + return new IntBufferImpl (backing_buffer, array_offset, capacity (), limit (), position (), mark, true); + } + + public IntBuffer compact () + { + int copied = 0; + + while (remaining () > 0) + { + put (copied, get ()); + copied++; + } + + position (copied); + return this; + } + + public boolean isDirect () + { + return false; + } + + /** + * Relative get method. Reads the next int from the buffer. + */ + final public int get () + { + int result = backing_buffer [position ()]; + position (position () + 1); + return result; + } + + /** + * Relative put method. Writes value to the next position + * in the buffer. + * + * @exception ReadOnlyBufferException If this buffer is read-only. + */ + final public IntBuffer put (int value) + { + if (readOnly) + throw new ReadOnlyBufferException (); + + backing_buffer [position ()] = value; + position (position () + 1); + return this; + } + + /** + * Absolute get method. Reads the int at position + * index. + * + * @exception IndexOutOfBoundsException If index is negative or not smaller + * than the buffer's limit. + */ + final public int get (int index) + { + return backing_buffer [index]; + } + + /** + * Absolute put method. Writes value to position + * index in the buffer. + * + * @exception IndexOutOfBoundsException If index is negative or not smaller + * than the buffer's limit. + * @exception ReadOnlyBufferException If this buffer is read-only. + */ + final public IntBuffer put (int index, int value) + { + if (readOnly) + throw new ReadOnlyBufferException (); + + backing_buffer [index] = value; + return this; + } + + final public ByteOrder order () + { + return ByteOrder.nativeOrder (); + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/IntBuffer.java gcc-3.4.0/libjava/java/nio/IntBuffer.java *** gcc-3.3.3/libjava/java/nio/IntBuffer.java 2003-03-01 21:06:23.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/IntBuffer.java 2003-05-20 08:58:31.000000000 +0000 *************** *** 1,5 **** /* IntBuffer.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* IntBuffer.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,131 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package java.nio; ! import gnu.java.nio.IntBufferImpl; ! public abstract class IntBuffer extends Buffer implements Comparable { ! protected int [] backing_buffer; ! protected int array_offset; ! ! public static IntBuffer allocateDirect(int capacity) ! { ! throw new Error ("direct buffers not implemented"); ! } ! public static IntBuffer allocate(int capacity) { ! return new IntBufferImpl (capacity, 0, capacity); } ! final public static IntBuffer wrap(int[] array, int offset, int length) { ! return new IntBufferImpl(array, offset, length); } ! final public static IntBuffer wrap(String a) { ! int len = a.length(); ! int[] buffer = new int[len]; ! ! for (int i=0;iIntBuffer object with a given capacity. ! */ ! public static IntBuffer allocate (int capacity) { ! return new IntBufferImpl (capacity); } ! /** ! * Wraps a int array into a IntBuffer ! * object. ! * ! * @exception IndexOutOfBoundsException If the preconditions on the offset ! * and length parameters do not hold ! */ ! final public static IntBuffer wrap (int[] array, int offset, int length) { ! return new IntBufferImpl (array, 0, array.length, offset + length, offset, -1, false); } ! /** ! * Wraps a int array into a IntBuffer ! * object. ! */ ! final public static IntBuffer wrap (int[] array) { ! return wrap (array, 0, array.length); } ! /** ! * This method transfers ints from this buffer into the given ! * destination array. ! * ! * @param dst The destination array ! * @param offset The offset within the array of the first int ! * to be written; must be non-negative and no larger than dst.length. ! * @param length The maximum number of bytes to be written to the given array; ! * must be non-negative and no larger than dst.length - offset. ! * ! * @exception BufferUnderflowException If there are fewer than length ! * ints remaining in this buffer. ! * @exception IndexOutOfBoundsException If the preconditions on the offset ! * and length parameters do not hold. ! */ ! public IntBuffer get (int[] dst, int offset, int length) { for (int i = offset; i < offset + length; i++) { ! dst [i] = get (); } return this; } + /** + * This method transfers ints from this buffer into the given + * destination array. + * + * @param dst The byte array to write into. + * + * @exception BufferUnderflowException If there are fewer than dst.length + * ints remaining in this buffer. + */ public IntBuffer get (int[] dst) { ! return get (dst, 0, dst.length); } + /** + * Writes the content of the the IntBUFFER src + * into the buffer. + * + * @param src The source data. + * + * @exception BufferOverflowException If there is insufficient space in this + * buffer for the remaining ints in the source buffer. + * @exception IllegalArgumentException If the source buffer is this buffer. + * @exception ReadOnlyBufferException If this buffer is read-only. + */ public IntBuffer put (IntBuffer src) { ! if (src == this) ! throw new IllegalArgumentException (); ! ! if (src.remaining () > remaining ()) ! throw new BufferOverflowException (); ! ! if (src.remaining () > 0) ! { ! int[] toPut = new int [src.remaining ()]; ! src.get (toPut); ! src.put (toPut); ! } return this; } + /** + * Writes the content of the the int array src + * into the buffer. + * + * @param src The array to copy into the buffer. + * @param offset The offset within the array of the first byte to be read; + * must be non-negative and no larger than src.length. + * @param length The number of bytes to be read from the given array; + * must be non-negative and no larger than src.length - offset. + * + * @exception BufferOverflowException If there is insufficient space in this + * buffer for the remaining ints in the source array. + * @exception IndexOutOfBoundsException If the preconditions on the offset + * and length parameters do not hold + * @exception ReadOnlyBufferException If this buffer is read-only. + */ public IntBuffer put (int[] src, int offset, int length) { for (int i = offset; i < offset + length; i++) ! put (src [i]); return this; } ! /** ! * Writes the content of the the int array src ! * into the buffer. ! * ! * @param src The array to copy into the buffer. ! * ! * @exception BufferOverflowException If there is insufficient space in this ! * buffer for the remaining ints in the source array. ! * @exception ReadOnlyBufferException If this buffer is read-only. ! */ ! public final IntBuffer put (int[] src) { ! return put (src, 0, src.length); } ! /** ! * Tells whether ot not this buffer is backed by an accessible ! * int array. ! */ ! public final boolean hasArray () { return (backing_buffer != null && !isReadOnly ()); } ! /** ! * Returns the int array that backs this buffer. ! * ! * @exception ReadOnlyBufferException If this buffer is read-only. ! * @exception UnsupportedOperationException If this buffer is not backed ! * by an accessible array. ! */ ! public final int[] array () { if (backing_buffer == null) throw new UnsupportedOperationException (); *************** public abstract class IntBuffer extends *** 136,142 **** return backing_buffer; } ! public final int arrayOffset() { if (backing_buffer == null) throw new UnsupportedOperationException (); --- 224,237 ---- return backing_buffer; } ! /** ! * Returns the offset within this buffer's backing array of the first element. ! * ! * @exception ReadOnlyBufferException If this buffer is read-only. ! * @exception UnsupportedOperationException If this buffer is not backed ! * by an accessible array. ! */ ! public final int arrayOffset () { if (backing_buffer == null) throw new UnsupportedOperationException (); *************** public abstract class IntBuffer extends *** 147,187 **** return array_offset; } ! public int hashCode() { ! return super.hashCode(); } ! public boolean equals(Object obj) { if (obj instanceof IntBuffer) { ! return compareTo(obj) == 0; } return false; } ! public int compareTo(Object ob) { ! IntBuffer a = (IntBuffer) ob; ! if (a.remaining() != remaining()) return 1; ! if (! hasArray() || ! ! a.hasArray()) { return 1; } ! int r = remaining(); int i1 = position (); int i2 = a.position (); ! for (int i=0;iIntBuffer objects. ! * ! * @exception ClassCastException If obj is not an object derived from ! * IntBuffer. ! */ ! public int compareTo (Object obj) { ! IntBuffer a = (IntBuffer) obj; ! if (a.remaining () != remaining ()) return 1; ! if (! hasArray () || ! ! a.hasArray ()) { return 1; } ! int r = remaining (); int i1 = position (); int i2 = a.position (); ! for (int i = 0; i < r; i++) { ! int t = (int) (get (i1) - a.get (i2)); ! if (t != 0) { return (int) t; *************** public abstract class IntBuffer extends *** 191,204 **** return 0; } ! public abstract ByteOrder order(); ! public abstract int get(); ! public abstract IntBuffer put(int b); ! public abstract int get(int index); ! public abstract IntBuffer put(int index, int b); ! public abstract IntBuffer compact(); ! public abstract boolean isDirect(); ! public abstract IntBuffer slice(); ! public abstract IntBuffer duplicate(); ! public abstract IntBuffer asReadOnlyBuffer(); } --- 300,373 ---- return 0; } ! /** ! * Returns the byte order of this buffer. ! */ ! public abstract ByteOrder order (); ! ! /** ! * Reads the int at this buffer's current position, ! * and then increments the position. ! * ! * @exception BufferUnderflowException If there are no remaining ! * ints in this buffer. ! */ ! public abstract int get (); ! ! /** ! * Writes the int at this buffer's current position, ! * and then increments the position. ! * ! * @exception BufferOverflowException If there no remaining ! * ints in this buffer. ! * @exception ReadOnlyBufferException If this buffer is read-only. ! */ ! public abstract IntBuffer put (int b); ! ! /** ! * Absolute get method. ! * ! * @exception IndexOutOfBoundsException If index is negative or not smaller ! * than the buffer's limit. ! */ ! public abstract int get (int index); ! ! /** ! * Absolute put method. ! * ! * @exception IndexOutOfBoundsException If index is negative or not smaller ! * than the buffer's limit. ! * @exception ReadOnlyBufferException If this buffer is read-only. ! */ ! public abstract IntBuffer put (int index, int b); ! ! /** ! * Compacts this buffer. ! * ! * @exception ReadOnlyBufferException If this buffer is read-only. ! */ ! public abstract IntBuffer compact (); ! ! /** ! * Tells wether or not this buffer is direct. ! */ ! public abstract boolean isDirect (); ! ! /** ! * Creates a new IntBuffer whose content is a shared ! * subsequence of this buffer's content. ! */ ! public abstract IntBuffer slice (); ! ! /** ! * Creates a new IntBuffer that shares this buffer's ! * content. ! */ ! public abstract IntBuffer duplicate (); ! ! /** ! * Creates a new read-only IntBuffer that shares this ! * buffer's content. ! */ ! public abstract IntBuffer asReadOnlyBuffer (); } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/IntViewBufferImpl.java gcc-3.4.0/libjava/java/nio/IntViewBufferImpl.java *** gcc-3.3.3/libjava/java/nio/IntViewBufferImpl.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/IntViewBufferImpl.java 2004-02-08 21:18:37.000000000 +0000 *************** *** 0 **** --- 1,141 ---- + /* IntViewBufferImpl.java -- + Copyright (C) 2003, 2004 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.nio; + + class IntViewBufferImpl extends IntBuffer + { + /** Position in bb (i.e. a byte offset) where this buffer starts. */ + private int offset; + private ByteBuffer bb; + private boolean readOnly; + private ByteOrder endian; + + public IntViewBufferImpl (ByteBuffer bb, int offset, int capacity, + int limit, int position, int mark, + boolean readOnly, ByteOrder endian) + { + super (limit >> 2, limit >> 2, position >> 2, mark >> 2); + this.bb = bb; + this.offset = offset; + this.readOnly = readOnly; + this.endian = endian; + } + + public int get () + { + int p = position(); + int result = ByteBufferHelper.getInt(bb, (p << 2) + offset, endian); + position(p + 1); + return result; + } + + public int get (int index) + { + return ByteBufferHelper.getInt(bb, (index << 2) + offset, endian); + } + + public IntBuffer put (int value) + { + int p = position(); + ByteBufferHelper.putInt(bb, (p << 2) + offset, value, endian); + position(p + 1); + return this; + } + + public IntBuffer put (int index, int value) + { + ByteBufferHelper.putInt(bb, (index << 2) + offset, value, endian); + return this; + } + + public IntBuffer compact () + { + if (position () > 0) + { + int count = limit () - position (); + bb.shiftDown(offset, offset + 4 * position(), 4 * count); + position (count); + limit (capacity ()); + } + return this; + } + + public IntBuffer slice () + { + // Create a sliced copy of this object that shares its content. + return new IntViewBufferImpl (bb, (position () >> 2) + offset, + remaining(), remaining(), 0, -1, + readOnly, endian); + } + + IntBuffer duplicate (boolean readOnly) + { + int pos = position(); + reset(); + int mark = position(); + position(pos); + return new IntViewBufferImpl (bb, offset, capacity(), limit(), + pos, mark, readOnly, endian); + } + + public IntBuffer duplicate () + { + return duplicate(readOnly); + } + + public IntBuffer asReadOnlyBuffer () + { + return duplicate(true); + } + + public boolean isReadOnly () + { + return readOnly; + } + + public boolean isDirect () + { + return bb.isDirect (); + } + + public ByteOrder order () + { + return endian; + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/LongBufferImpl.java gcc-3.4.0/libjava/java/nio/LongBufferImpl.java *** gcc-3.3.3/libjava/java/nio/LongBufferImpl.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/LongBufferImpl.java 2003-06-27 13:34:12.000000000 +0000 *************** *** 0 **** --- 1,157 ---- + /* LongBufferImpl.java -- + Copyright (C) 2002, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.nio; + + /** + * This is a Heap memory implementation + */ + final class LongBufferImpl extends LongBuffer + { + private boolean readOnly; + + LongBufferImpl (int capacity) + { + this (new long [capacity], 0, capacity, capacity, 0, -1, false); + } + + LongBufferImpl (long[] buffer, int offset, int capacity, int limit, int position, int mark, boolean readOnly) + { + super (buffer, offset, capacity, limit, position, mark); + this.readOnly = readOnly; + } + + public boolean isReadOnly () + { + return readOnly; + } + + public LongBuffer slice () + { + return new LongBufferImpl (backing_buffer, array_offset + position (), remaining (), remaining (), 0, -1, isReadOnly ()); + } + + public LongBuffer duplicate () + { + return new LongBufferImpl (backing_buffer, array_offset, capacity (), limit (), position (), mark, isReadOnly ()); + } + + public LongBuffer asReadOnlyBuffer () + { + return new LongBufferImpl (backing_buffer, array_offset, capacity (), limit (), position (), mark, true); + } + + public LongBuffer compact () + { + int copied = 0; + + while (remaining () > 0) + { + put (copied, get ()); + copied++; + } + + position (copied); + return this; + } + + public boolean isDirect () + { + return false; + } + + /** + * Relative get method. Reads the next long from the buffer. + */ + final public long get () + { + long result = backing_buffer [position ()]; + position (position () + 1); + return result; + } + + /** + * Relative put method. Writes value to the next position + * in the buffer. + * + * @exception ReadOnlyBufferException If this buffer is read-only. + */ + final public LongBuffer put (long value) + { + if (readOnly) + throw new ReadOnlyBufferException (); + + backing_buffer [position ()] = value; + position (position () + 1); + return this; + } + + /** + * Absolute get method. Reads the long at position + * index. + * + * @exception IndexOutOfBoundsException If index is negative or not smaller + * than the buffer's limit. + */ + final public long get (int index) + { + return backing_buffer [index]; + } + + /** + * Absolute put method. Writes value to position + * index in the buffer. + * + * @exception IndexOutOfBoundsException If index is negative or not smaller + * than the buffer's limit. + * @exception ReadOnlyBufferException If this buffer is read-only. + */ + final public LongBuffer put (int index, long value) + { + if (readOnly) + throw new ReadOnlyBufferException (); + + backing_buffer [index] = value; + return this; + } + + final public ByteOrder order () + { + return ByteOrder.nativeOrder (); + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/LongBuffer.java gcc-3.4.0/libjava/java/nio/LongBuffer.java *** gcc-3.3.3/libjava/java/nio/LongBuffer.java 2003-03-01 21:06:23.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/LongBuffer.java 2003-05-20 08:58:31.000000000 +0000 *************** *** 1,5 **** /* LongBuffer.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* LongBuffer.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,131 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package java.nio; ! import gnu.java.nio.LongBufferImpl; ! public abstract class LongBuffer extends Buffer implements Comparable { ! protected long [] backing_buffer; ! protected int array_offset; ! ! public static LongBuffer allocateDirect(int capacity) ! { ! throw new Error ("direct buffers not implemented"); ! } ! public static LongBuffer allocate(int capacity) { ! return new LongBufferImpl(capacity, 0, capacity); } ! final public static LongBuffer wrap(long[] array, int offset, int length) { ! return new LongBufferImpl (array, offset, length); } ! final public static LongBuffer wrap(String a) { ! int len = a.length(); ! long[] buffer = new long[len]; ! ! for (int i=0;iLongBuffer object with a given capacity. ! */ ! public static LongBuffer allocate (int capacity) { ! return new LongBufferImpl (capacity); } ! /** ! * Wraps a long array into a LongBuffer ! * object. ! * ! * @exception IndexOutOfBoundsException If the preconditions on the offset ! * and length parameters do not hold ! */ ! final public static LongBuffer wrap (long[] array, int offset, int length) { ! return new LongBufferImpl (array, 0, array.length, offset + length, offset, -1, false); } ! /** ! * Wraps a long array into a LongBuffer ! * object. ! */ ! final public static LongBuffer wrap (long[] array) { ! return wrap (array, 0, array.length); } + /** + * This method transfers longs from this buffer into the given + * destination array. + * + * @param dst The destination array + * @param offset The offset within the array of the first long + * to be written; must be non-negative and no larger than dst.length. + * @param length The maximum number of bytes to be written to the given array; + * must be non-negative and no larger than dst.length - offset. + * + * @exception BufferUnderflowException If there are fewer than length + * longs remaining in this buffer. + * @exception IndexOutOfBoundsException If the preconditions on the offset + * and length parameters do not hold. + */ public LongBuffer get (long[] dst, int offset, int length) { for (int i = offset; i < offset + length; i++) { ! dst [i] = get (); } return this; } + /** + * This method transfers longs from this buffer into the given + * destination array. + * + * @param dst The byte array to write into. + * + * @exception BufferUnderflowException If there are fewer than dst.length + * longs remaining in this buffer. + */ public LongBuffer get (long[] dst) { ! return get (dst, 0, dst.length); } + /** + * Writes the content of the the LongBUFFER src + * into the buffer. + * + * @param src The source data. + * + * @exception BufferOverflowException If there is insufficient space in this + * buffer for the remaining longs in the source buffer. + * @exception IllegalArgumentException If the source buffer is this buffer. + * @exception ReadOnlyBufferException If this buffer is read-only. + */ public LongBuffer put (LongBuffer src) { ! if (src == this) ! throw new IllegalArgumentException (); ! ! if (src.remaining () > remaining ()) ! throw new BufferOverflowException (); ! ! if (src.remaining () > 0) ! { ! long[] toPut = new long [src.remaining ()]; ! src.get (toPut); ! src.put (toPut); ! } return this; } + /** + * Writes the content of the the long array src + * into the buffer. + * + * @param src The array to copy into the buffer. + * @param offset The offset within the array of the first byte to be read; + * must be non-negative and no larger than src.length. + * @param length The number of bytes to be read from the given array; + * must be non-negative and no larger than src.length - offset. + * + * @exception BufferOverflowException If there is insufficient space in this + * buffer for the remaining longs in the source array. + * @exception IndexOutOfBoundsException If the preconditions on the offset + * and length parameters do not hold + * @exception ReadOnlyBufferException If this buffer is read-only. + */ public LongBuffer put (long[] src, int offset, int length) { for (int i = offset; i < offset + length; i++) ! put (src [i]); return this; } ! /** ! * Writes the content of the the long array src ! * into the buffer. ! * ! * @param src The array to copy into the buffer. ! * ! * @exception BufferOverflowException If there is insufficient space in this ! * buffer for the remaining longs in the source array. ! * @exception ReadOnlyBufferException If this buffer is read-only. ! */ ! public final LongBuffer put (long[] src) { ! return put (src, 0, src.length); } ! /** ! * Tells whether ot not this buffer is backed by an accessible ! * long array. ! */ ! public final boolean hasArray () { return (backing_buffer != null && !isReadOnly ()); } ! /** ! * Returns the long array that backs this buffer. ! * ! * @exception ReadOnlyBufferException If this buffer is read-only. ! * @exception UnsupportedOperationException If this buffer is not backed ! * by an accessible array. ! */ ! public final long[] array () { if (backing_buffer == null) throw new UnsupportedOperationException (); *************** public abstract class LongBuffer extends *** 136,142 **** return backing_buffer; } ! public final int arrayOffset() { if (backing_buffer == null) throw new UnsupportedOperationException (); --- 224,237 ---- return backing_buffer; } ! /** ! * Returns the offset within this buffer's backing array of the first element. ! * ! * @exception ReadOnlyBufferException If this buffer is read-only. ! * @exception UnsupportedOperationException If this buffer is not backed ! * by an accessible array. ! */ ! public final int arrayOffset () { if (backing_buffer == null) throw new UnsupportedOperationException (); *************** public abstract class LongBuffer extends *** 147,187 **** return array_offset; } ! public int hashCode() { ! return super.hashCode(); } ! public boolean equals(Object obj) { if (obj instanceof LongBuffer) { ! return compareTo(obj) == 0; } return false; } ! public int compareTo(Object ob) { ! LongBuffer a = (LongBuffer) ob; ! if (a.remaining() != remaining()) return 1; ! if (! hasArray() || ! ! a.hasArray()) { return 1; } ! int r = remaining(); int i1 = position (); int i2 = a.position (); ! for (int i=0;iLongBuffer objects. ! * ! * @exception ClassCastException If obj is not an object derived from ! * LongBuffer. ! */ ! public int compareTo (Object obj) { ! LongBuffer a = (LongBuffer) obj; ! if (a.remaining () != remaining ()) return 1; ! if (! hasArray () || ! ! a.hasArray ()) { return 1; } ! int r = remaining (); int i1 = position (); int i2 = a.position (); ! for (int i = 0; i < r; i++) { ! int t = (int) (get (i1) - a.get (i2)); if (t != 0) { *************** public abstract class LongBuffer extends *** 192,205 **** return 0; } ! public abstract ByteOrder order(); ! public abstract long get(); ! public abstract java.nio. LongBuffer put(long b); ! public abstract long get(int index); ! public abstract java.nio. LongBuffer put(int index, long b); ! public abstract LongBuffer compact(); ! public abstract boolean isDirect(); ! public abstract LongBuffer slice(); ! public abstract LongBuffer duplicate(); ! public abstract LongBuffer asReadOnlyBuffer(); } --- 300,373 ---- return 0; } ! /** ! * Returns the byte order of this buffer. ! */ ! public abstract ByteOrder order (); ! ! /** ! * Reads the long at this buffer's current position, ! * and then increments the position. ! * ! * @exception BufferUnderflowException If there are no remaining ! * longs in this buffer. ! */ ! public abstract long get (); ! ! /** ! * Writes the long at this buffer's current position, ! * and then increments the position. ! * ! * @exception BufferOverflowException If there no remaining ! * longs in this buffer. ! * @exception ReadOnlyBufferException If this buffer is read-only. ! */ ! public abstract LongBuffer put (long b); ! ! /** ! * Absolute get method. ! * ! * @exception IndexOutOfBoundsException If index is negative or not smaller ! * than the buffer's limit. ! */ ! public abstract long get (int index); ! ! /** ! * Absolute put method. ! * ! * @exception IndexOutOfBoundsException If index is negative or not smaller ! * than the buffer's limit. ! * @exception ReadOnlyBufferException If this buffer is read-only. ! */ ! public abstract LongBuffer put (int index, long b); ! ! /** ! * Compacts this buffer. ! * ! * @exception ReadOnlyBufferException If this buffer is read-only. ! */ ! public abstract LongBuffer compact (); ! ! /** ! * Tells wether or not this buffer is direct. ! */ ! public abstract boolean isDirect (); ! ! /** ! * Creates a new LongBuffer whose content is a shared ! * subsequence of this buffer's content. ! */ ! public abstract LongBuffer slice (); ! ! /** ! * Creates a new LongBuffer that shares this buffer's ! * content. ! */ ! public abstract LongBuffer duplicate (); ! ! /** ! * Creates a new read-only LongBuffer that shares this ! * buffer's content. ! */ ! public abstract LongBuffer asReadOnlyBuffer (); } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/LongViewBufferImpl.java gcc-3.4.0/libjava/java/nio/LongViewBufferImpl.java *** gcc-3.3.3/libjava/java/nio/LongViewBufferImpl.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/LongViewBufferImpl.java 2004-02-08 21:18:37.000000000 +0000 *************** *** 0 **** --- 1,141 ---- + /* LongViewBufferImpl.java -- + Copyright (C) 2003, 2004 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.nio; + + class LongViewBufferImpl extends LongBuffer + { + /** Position in bb (i.e. a byte offset) where this buffer starts. */ + private int offset; + private ByteBuffer bb; + private boolean readOnly; + private ByteOrder endian; + + public LongViewBufferImpl (ByteBuffer bb, int offset, int capacity, + int limit, int position, int mark, + boolean readOnly, ByteOrder endian) + { + super (limit >> 3, limit >> 3, position >> 3, mark >> 3); + this.bb = bb; + this.offset = offset; + this.readOnly = readOnly; + this.endian = endian; + } + + public long get () + { + int p = position(); + long result = ByteBufferHelper.getLong(bb, (p << 3) + offset, endian); + position(p + 1); + return result; + } + + public long get (int index) + { + return ByteBufferHelper.getLong(bb, (index << 3) + offset, endian); + } + + public LongBuffer put (long value) + { + int p = position(); + ByteBufferHelper.putLong(bb, (p << 3) + offset, value, endian); + position(p + 1); + return this; + } + + public LongBuffer put (int index, long value) + { + ByteBufferHelper.putLong(bb, (index << 3) + offset, value, endian); + return this; + } + + public LongBuffer compact () + { + if (position () > 0) + { + int count = limit () - position (); + bb.shiftDown(offset, offset + 8 * position(), 8 * count); + position (count); + limit (capacity ()); + } + return this; + } + + public LongBuffer slice () + { + // Create a sliced copy of this object that shares its content. + return new LongViewBufferImpl (bb, (position () >> 3) + offset, + remaining(), remaining(), 0, -1, + readOnly, endian); + } + + LongBuffer duplicate (boolean readOnly) + { + int pos = position(); + reset(); + int mark = position(); + position(pos); + return new LongViewBufferImpl (bb, offset, capacity(), limit(), + pos, mark, readOnly, endian); + } + + public LongBuffer duplicate () + { + return duplicate(readOnly); + } + + public LongBuffer asReadOnlyBuffer () + { + return duplicate(true); + } + + public boolean isReadOnly () + { + return readOnly; + } + + public boolean isDirect () + { + return bb.isDirect (); + } + + public ByteOrder order () + { + return endian; + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/MappedByteBufferImpl.java gcc-3.4.0/libjava/java/nio/MappedByteBufferImpl.java *** gcc-3.3.3/libjava/java/nio/MappedByteBufferImpl.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/MappedByteBufferImpl.java 2004-02-08 21:18:37.000000000 +0000 *************** *** 0 **** --- 1,306 ---- + /* MappedByteBufferImpl.java -- + Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.nio; + + import java.io.IOException; + import java.nio.channels.FileChannelImpl; + import gnu.gcj.RawData; + + public class MappedByteBufferImpl extends MappedByteBuffer + { + boolean readOnly; + RawData map_address; + public FileChannelImpl ch; + + public MappedByteBufferImpl (FileChannelImpl ch) throws IOException + { + super ((int) ch.size (), (int) ch.size (), 0, -1); + + this.ch = ch; + map_address = ch.map_address; + long si = ch.size () / 1; + limit ((int) si); + } + + public MappedByteBufferImpl (FileChannelImpl ch, int offset, int capacity, int limit, int position, int mark, boolean readOnly) + { + super (capacity, limit, position, mark); + + this.ch = ch; + this.array_offset = offset; + this.readOnly = readOnly; + } + + public boolean isReadOnly () + { + return readOnly; + } + + public static byte getImpl (FileChannelImpl ch, int index, + int limit, RawData map_address) + { + throw new Error ("Not implemented"); + } + + public static void putImpl (FileChannelImpl ch, int index, + int limit, byte value, RawData map_address) + { + throw new Error ("Not implemented"); + } + + public byte get () + { + byte result = get (position()); + position (position() + 1); + return result; + } + + public ByteBuffer put (byte value) + { + put (position(), value); + position (position() + 1); + return this; + } + + public byte get (int index) + { + return getImpl (ch, index, limit (), map_address); + } + + public ByteBuffer put (int index, byte value) + { + putImpl (ch, index, limit (), value, map_address); + return this; + } + + public ByteBuffer compact () + { + int pos = position(); + if (pos > 0) + { + int count = remaining(); + shiftDown(0, pos, count); + position(count); + limit(capacity()); + } + return this; + } + + public boolean isDirect () + { + return true; + } + + public ByteBuffer slice () + { + throw new Error ("Not implemented"); + } + + public ByteBuffer duplicate () + { + throw new Error ("Not implemented"); + } + + public ByteBuffer asReadOnlyBuffer () + { + throw new Error ("Not implemented"); + } + + public CharBuffer asCharBuffer () + { + return new CharViewBufferImpl (this, position (), remaining(), remaining (), 0, -1, isReadOnly (), order()); + } + + public ShortBuffer asShortBuffer () + { + return new ShortViewBufferImpl (this, position (), remaining(), remaining (), 0, -1, isReadOnly (), order()); + } + + public IntBuffer asIntBuffer () + { + return new IntViewBufferImpl (this, position (), remaining(), remaining (), 0, -1, isReadOnly (), order()); + } + + public LongBuffer asLongBuffer () + { + return new LongViewBufferImpl (this, position (), remaining(), remaining (), 0, -1, isReadOnly (), order()); + } + + public FloatBuffer asFloatBuffer () + { + return new FloatViewBufferImpl (this, position (), remaining(), remaining (), 0, -1, isReadOnly (), order()); + } + + public DoubleBuffer asDoubleBuffer () + { + return new DoubleViewBufferImpl (this, position (), remaining(), remaining (), 0, -1, isReadOnly (), order()); + } + + final public char getChar () + { + return ByteBufferHelper.getChar(this, order()); + } + + final public ByteBuffer putChar (char value) + { + ByteBufferHelper.putChar(this, value, order()); + return this; + } + + final public char getChar (int index) + { + return ByteBufferHelper.getChar(this, index, order()); + } + + final public ByteBuffer putChar (int index, char value) + { + ByteBufferHelper.putChar(this, index, value, order()); + return this; + } + + final public short getShort () + { + return ByteBufferHelper.getShort(this, order()); + } + + final public ByteBuffer putShort (short value) + { + ByteBufferHelper.putShort(this, value, order()); + return this; + } + + final public short getShort (int index) + { + return ByteBufferHelper.getShort(this, index, order()); + } + + final public ByteBuffer putShort (int index, short value) + { + ByteBufferHelper.putShort(this, index, value, order()); + return this; + } + + final public int getInt () + { + return ByteBufferHelper.getInt(this, order()); + } + + final public ByteBuffer putInt (int value) + { + ByteBufferHelper.putInt(this, value, order()); + return this; + } + + final public int getInt (int index) + { + return ByteBufferHelper.getInt(this, index, order()); + } + + final public ByteBuffer putInt (int index, int value) + { + ByteBufferHelper.putInt(this, index, value, order()); + return this; + } + + final public long getLong () + { + return ByteBufferHelper.getLong(this, order()); + } + + final public ByteBuffer putLong (long value) + { + ByteBufferHelper.putLong (this, value, order()); + return this; + } + + final public long getLong (int index) + { + return ByteBufferHelper.getLong (this, index, order()); + } + + final public ByteBuffer putLong (int index, long value) + { + ByteBufferHelper.putLong (this, index, value, order()); + return this; + } + + final public float getFloat () + { + return ByteBufferHelper.getFloat (this, order()); + } + + final public ByteBuffer putFloat (float value) + { + ByteBufferHelper.putFloat (this, value, order()); + return this; + } + + public final float getFloat (int index) + { + return ByteBufferHelper.getFloat (this, index, order()); + } + + final public ByteBuffer putFloat (int index, float value) + { + ByteBufferHelper.putFloat (this, index, value, order()); + return this; + } + + final public double getDouble () + { + return ByteBufferHelper.getDouble (this, order()); + } + + final public ByteBuffer putDouble (double value) + { + ByteBufferHelper.putDouble (this, value, order()); + return this; + } + + final public double getDouble (int index) + { + return ByteBufferHelper.getDouble (this, index, order()); + } + + final public ByteBuffer putDouble (int index, double value) + { + ByteBufferHelper.putDouble (this, index, value, order()); + return this; + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/MappedByteBuffer.java gcc-3.4.0/libjava/java/nio/MappedByteBuffer.java *** gcc-3.3.3/libjava/java/nio/MappedByteBuffer.java 2003-02-11 21:08:49.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/MappedByteBuffer.java 2003-10-13 04:45:03.000000000 +0000 *************** this exception to your version of the li *** 35,40 **** --- 35,41 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package java.nio; /** *************** package java.nio; *** 43,48 **** --- 44,51 ---- */ public abstract class MappedByteBuffer extends ByteBuffer { + private boolean loaded = false; + MappedByteBuffer (int capacity, int limit, int position, int mark) { super (capacity, limit, position, mark); *************** public abstract class MappedByteBuffer e *** 50,65 **** public final MappedByteBuffer force () { return this; } public final boolean isLoaded () { ! return true; } public final MappedByteBuffer load () { return this; } } --- 53,71 ---- public final MappedByteBuffer force () { + // FIXME: Flush to disk here. return this; } public final boolean isLoaded () { ! return loaded; } public final MappedByteBuffer load () { + // FIXME: Try to load all pages into memory. + loaded = true; return this; } } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/natDirectByteBufferImpl.cc gcc-3.4.0/libjava/java/nio/natDirectByteBufferImpl.cc *** gcc-3.3.3/libjava/java/nio/natDirectByteBufferImpl.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/natDirectByteBufferImpl.cc 2004-02-08 21:18:37.000000000 +0000 *************** *** 0 **** --- 1,54 ---- + // natDirectByteBufferImpl.cc + + /* Copyright (C) 2003 Free Software Foundation + + This file is part of libgcj. + + This software is copyrighted work licensed under the terms of the + Libgcj License. Please consult the file "LIBGCJ_LICENSE" for + details. */ + + #include + + #include + #include + + #include + + #include + #include + + gnu::gcj::RawData* + java::nio::DirectByteBufferImpl::allocateImpl (jint capacity) + { + return reinterpret_cast (::malloc (capacity)); + } + + void + java::nio::DirectByteBufferImpl::freeImpl (gnu::gcj::RawData* address) + { + ::free (reinterpret_cast (address)); + } + + jbyte + java::nio::DirectByteBufferImpl::getImpl (jint index) + { + jbyte* pointer = reinterpret_cast (address) + offset + index; + return *pointer; + } + + void + java::nio::DirectByteBufferImpl::putImpl (jint index, jbyte value) + { + jbyte* pointer = reinterpret_cast (address) + offset + index; + *pointer = value; + } + + void + java::nio::DirectByteBufferImpl::shiftDown + (jint dst_offset, jint src_offset, jint count) + { + jbyte* dst = reinterpret_cast (address) + offset + dst_offset; + jbyte* src = reinterpret_cast (address) + offset + src_offset; + ::memmove(dst, src, count); + } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/ShortBufferImpl.java gcc-3.4.0/libjava/java/nio/ShortBufferImpl.java *** gcc-3.3.3/libjava/java/nio/ShortBufferImpl.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/ShortBufferImpl.java 2003-06-27 13:34:12.000000000 +0000 *************** *** 0 **** --- 1,157 ---- + /* ShortBufferImpl.java -- + Copyright (C) 2002, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.nio; + + /** + * This is a Heap memory implementation + */ + final class ShortBufferImpl extends ShortBuffer + { + private boolean readOnly; + + ShortBufferImpl (int capacity) + { + this (new short [capacity], 0, capacity, capacity, 0, -1, false); + } + + ShortBufferImpl (short[] buffer, int offset, int capacity, int limit, int position, int mark, boolean readOnly) + { + super (buffer, offset, capacity, limit, position, mark); + this.readOnly = readOnly; + } + + public boolean isReadOnly () + { + return readOnly; + } + + public ShortBuffer slice () + { + return new ShortBufferImpl (backing_buffer, array_offset + position (), remaining (), remaining (), 0, -1, isReadOnly ()); + } + + public ShortBuffer duplicate () + { + return new ShortBufferImpl (backing_buffer, array_offset, capacity (), limit (), position (), mark, isReadOnly ()); + } + + public ShortBuffer asReadOnlyBuffer () + { + return new ShortBufferImpl (backing_buffer, array_offset, capacity (), limit (), position (), mark, true); + } + + public ShortBuffer compact () + { + int copied = 0; + + while (remaining () > 0) + { + put (copied, get ()); + copied++; + } + + position (copied); + return this; + } + + public boolean isDirect () + { + return false; + } + + /** + * Relative get method. Reads the next short from the buffer. + */ + final public short get () + { + short result = backing_buffer [position ()]; + position (position () + 1); + return result; + } + + /** + * Relative put method. Writes value to the next position + * in the buffer. + * + * @exception ReadOnlyBufferException If this buffer is read-only. + */ + final public ShortBuffer put (short value) + { + if (readOnly) + throw new ReadOnlyBufferException (); + + backing_buffer [position ()] = value; + position (position () + 1); + return this; + } + + /** + * Absolute get method. Reads the short at position + * index. + * + * @exception IndexOutOfBoundsException If index is negative or not smaller + * than the buffer's limit. + */ + final public short get (int index) + { + return backing_buffer [index]; + } + + /** + * Absolute put method. Writes value to position + * index in the buffer. + * + * @exception IndexOutOfBoundsException If index is negative or not smaller + * than the buffer's limit. + * @exception ReadOnlyBufferException If this buffer is read-only. + */ + final public ShortBuffer put (int index, short value) + { + if (readOnly) + throw new ReadOnlyBufferException (); + + backing_buffer [index] = value; + return this; + } + + final public ByteOrder order () + { + return ByteOrder.nativeOrder (); + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/ShortBuffer.java gcc-3.4.0/libjava/java/nio/ShortBuffer.java *** gcc-3.3.3/libjava/java/nio/ShortBuffer.java 2003-03-01 21:06:23.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/ShortBuffer.java 2003-05-20 08:58:31.000000000 +0000 *************** *** 1,5 **** /* ShortBuffer.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ShortBuffer.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,131 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package java.nio; ! import gnu.java.nio.ShortBufferImpl; ! public abstract class ShortBuffer extends Buffer implements Comparable { ! protected short [] backing_buffer; ! protected int array_offset; ! ! public static ShortBuffer allocateDirect(int capacity) ! { ! throw new Error ("direct buffers not implemented"); ! } ! public static ShortBuffer allocate(int capacity) { ! return new ShortBufferImpl(capacity, 0, capacity); } ! final public static ShortBuffer wrap(short[] array, int offset, int length) { ! return new ShortBufferImpl(array, offset, length); } ! final public static ShortBuffer wrap(String a) { ! int len = a.length(); ! short[] buffer = new short[len]; ! ! for (int i=0;iShortBuffer object with a given capacity. ! */ ! public static ShortBuffer allocate (int capacity) { ! return new ShortBufferImpl (capacity); } ! /** ! * Wraps a short array into a ShortBuffer ! * object. ! * ! * @exception IndexOutOfBoundsException If the preconditions on the offset ! * and length parameters do not hold ! */ ! final public static ShortBuffer wrap (short[] array, int offset, int length) { ! return new ShortBufferImpl (array, 0, array.length, offset + length, offset, -1, false); } ! /** ! * Wraps a short array into a ShortBuffer ! * object. ! */ ! final public static ShortBuffer wrap (short[] array) { ! return wrap (array, 0, array.length); } + /** + * This method transfers shorts from this buffer into the given + * destination array. + * + * @param dst The destination array + * @param offset The offset within the array of the first short + * to be written; must be non-negative and no larger than dst.length. + * @param length The maximum number of bytes to be written to the given array; + * must be non-negative and no larger than dst.length - offset. + * + * @exception BufferUnderflowException If there are fewer than length + * shorts remaining in this buffer. + * @exception IndexOutOfBoundsException If the preconditions on the offset + * and length parameters do not hold. + */ public ShortBuffer get (short[] dst, int offset, int length) { for (int i = offset; i < offset + length; i++) { ! dst [i] = get (); } return this; } + /** + * This method transfers shorts from this buffer into the given + * destination array. + * + * @param dst The byte array to write into. + * + * @exception BufferUnderflowException If there are fewer than dst.length + * shorts remaining in this buffer. + */ public ShortBuffer get (short[] dst) { ! return get (dst, 0, dst.length); } + /** + * Writes the content of the the ShortBUFFER src + * into the buffer. + * + * @param src The source data. + * + * @exception BufferOverflowException If there is insufficient space in this + * buffer for the remaining shorts in the source buffer. + * @exception IllegalArgumentException If the source buffer is this buffer. + * @exception ReadOnlyBufferException If this buffer is read-only. + */ public ShortBuffer put (ShortBuffer src) { ! if (src == this) ! throw new IllegalArgumentException (); ! ! if (src.remaining () > remaining ()) ! throw new BufferOverflowException (); ! ! if (src.remaining () > 0) ! { ! short[] toPut = new short [src.remaining ()]; ! src.get (toPut); ! src.put (toPut); ! } return this; } + /** + * Writes the content of the the short array src + * into the buffer. + * + * @param src The array to copy into the buffer. + * @param offset The offset within the array of the first byte to be read; + * must be non-negative and no larger than src.length. + * @param length The number of bytes to be read from the given array; + * must be non-negative and no larger than src.length - offset. + * + * @exception BufferOverflowException If there is insufficient space in this + * buffer for the remaining shorts in the source array. + * @exception IndexOutOfBoundsException If the preconditions on the offset + * and length parameters do not hold + * @exception ReadOnlyBufferException If this buffer is read-only. + */ public ShortBuffer put (short[] src, int offset, int length) { for (int i = offset; i < offset + length; i++) ! put (src [i]); return this; } ! /** ! * Writes the content of the the short array src ! * into the buffer. ! * ! * @param src The array to copy into the buffer. ! * ! * @exception BufferOverflowException If there is insufficient space in this ! * buffer for the remaining shorts in the source array. ! * @exception ReadOnlyBufferException If this buffer is read-only. ! */ ! public final ShortBuffer put (short[] src) { ! return put (src, 0, src.length); } ! /** ! * Tells whether ot not this buffer is backed by an accessible ! * short array. ! */ ! public final boolean hasArray () { return (backing_buffer != null && !isReadOnly ()); } ! /** ! * Returns the short array that backs this buffer. ! * ! * @exception ReadOnlyBufferException If this buffer is read-only. ! * @exception UnsupportedOperationException If this buffer is not backed ! * by an accessible array. ! */ ! public final short[] array () { if (backing_buffer == null) throw new UnsupportedOperationException (); *************** public abstract class ShortBuffer extend *** 136,142 **** return backing_buffer; } ! public final int arrayOffset() { if (backing_buffer == null) throw new UnsupportedOperationException (); --- 224,237 ---- return backing_buffer; } ! /** ! * Returns the offset within this buffer's backing array of the first element. ! * ! * @exception ReadOnlyBufferException If this buffer is read-only. ! * @exception UnsupportedOperationException If this buffer is not backed ! * by an accessible array. ! */ ! public final int arrayOffset () { if (backing_buffer == null) throw new UnsupportedOperationException (); *************** public abstract class ShortBuffer extend *** 147,187 **** return array_offset; } ! public int hashCode() { ! return super.hashCode(); } ! public boolean equals(Object obj) { if (obj instanceof ShortBuffer) { ! return compareTo(obj) == 0; } return false; } ! public int compareTo(Object ob) { ! ShortBuffer a = (ShortBuffer) ob; ! if (a.remaining() != remaining()) return 1; ! if (! hasArray() || ! ! a.hasArray()) { return 1; } ! int r = remaining(); int i1 = position (); int i2 = a.position (); ! for (int i=0;iShortBuffer objects. ! * ! * @exception ClassCastException If obj is not an object derived from ! * ShortBuffer. ! */ ! public int compareTo (Object obj) { ! ShortBuffer a = (ShortBuffer) obj; ! if (a.remaining () != remaining ()) return 1; ! if (! hasArray () || ! ! a.hasArray ()) { return 1; } ! int r = remaining (); int i1 = position (); int i2 = a.position (); ! for (int i = 0; i < r; i++) { ! int t = (int) (get (i1) - a.get (i2)); if (t != 0) { *************** public abstract class ShortBuffer extend *** 192,205 **** return 0; } public abstract ByteOrder order (); ! public abstract short get(); ! public abstract java.nio. ShortBuffer put(short b); ! public abstract short get(int index); ! public abstract java.nio. ShortBuffer put(int index, short b); ! public abstract ShortBuffer compact(); ! public abstract boolean isDirect(); ! public abstract ShortBuffer slice(); ! public abstract ShortBuffer duplicate(); ! public abstract ShortBuffer asReadOnlyBuffer(); } --- 300,373 ---- return 0; } + /** + * Returns the byte order of this buffer. + */ public abstract ByteOrder order (); ! ! /** ! * Reads the short at this buffer's current position, ! * and then increments the position. ! * ! * @exception BufferUnderflowException If there are no remaining ! * shorts in this buffer. ! */ ! public abstract short get (); ! ! /** ! * Writes the short at this buffer's current position, ! * and then increments the position. ! * ! * @exception BufferOverflowException If there no remaining ! * shorts in this buffer. ! * @exception ReadOnlyBufferException If this buffer is read-only. ! */ ! public abstract ShortBuffer put (short b); ! ! /** ! * Absolute get method. ! * ! * @exception IndexOutOfBoundsException If index is negative or not smaller ! * than the buffer's limit. ! */ ! public abstract short get (int index); ! ! /** ! * Absolute put method. ! * ! * @exception IndexOutOfBoundsException If index is negative or not smaller ! * than the buffer's limit. ! * @exception ReadOnlyBufferException If this buffer is read-only. ! */ ! public abstract ShortBuffer put (int index, short b); ! ! /** ! * Compacts this buffer. ! * ! * @exception ReadOnlyBufferException If this buffer is read-only. ! */ ! public abstract ShortBuffer compact (); ! ! /** ! * Tells wether or not this buffer is direct. ! */ ! public abstract boolean isDirect (); ! ! /** ! * Creates a new ShortBuffer whose content is a shared ! * subsequence of this buffer's content. ! */ ! public abstract ShortBuffer slice (); ! ! /** ! * Creates a new ShortBuffer that shares this buffer's ! * content. ! */ ! public abstract ShortBuffer duplicate (); ! ! /** ! * Creates a new read-only ShortBuffer that shares this ! * buffer's content. ! */ ! public abstract ShortBuffer asReadOnlyBuffer (); } diff -Nrc3pad gcc-3.3.3/libjava/java/nio/ShortViewBufferImpl.java gcc-3.4.0/libjava/java/nio/ShortViewBufferImpl.java *** gcc-3.3.3/libjava/java/nio/ShortViewBufferImpl.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/nio/ShortViewBufferImpl.java 2004-02-08 21:18:37.000000000 +0000 *************** *** 0 **** --- 1,141 ---- + /* ShortViewBufferImpl.java -- + Copyright (C) 2003, 2004 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.nio; + + class ShortViewBufferImpl extends ShortBuffer + { + /** Position in bb (i.e. a byte offset) where this buffer starts. */ + private int offset; + private ByteBuffer bb; + private boolean readOnly; + private ByteOrder endian; + + public ShortViewBufferImpl (ByteBuffer bb, int offset, int capacity, + int limit, int position, int mark, + boolean readOnly, ByteOrder endian) + { + super (limit >> 1, limit >> 1, position >> 1, mark >> 1); + this.bb = bb; + this.offset = offset; + this.readOnly = readOnly; + this.endian = endian; + } + + public short get () + { + int p = position(); + short result = ByteBufferHelper.getShort(bb, (p << 1) + offset, endian); + position(p + 1); + return result; + } + + public short get (int index) + { + return ByteBufferHelper.getShort(bb, (index << 1) + offset, endian); + } + + public ShortBuffer put (short value) + { + int p = position(); + ByteBufferHelper.putShort(bb, (p << 1) + offset, value, endian); + position(p + 1); + return this; + } + + public ShortBuffer put (int index, short value) + { + ByteBufferHelper.putShort(bb, (index << 1) + offset, value, endian); + return this; + } + + public ShortBuffer compact () + { + if (position () > 0) + { + int count = limit () - position (); + bb.shiftDown(offset, offset + 2 * position(), 2 * count); + position (count); + limit (capacity ()); + } + return this; + } + + public ShortBuffer slice () + { + // Create a sliced copy of this object that shares its content. + return new ShortViewBufferImpl (bb, (position () >> 1) + offset, + remaining(), remaining(), 0, -1, + readOnly, endian); + } + + ShortBuffer duplicate (boolean readOnly) + { + int pos = position(); + reset(); + int mark = position(); + position(pos); + return new ShortViewBufferImpl (bb, offset, capacity(), limit(), + pos, mark, readOnly, endian); + } + + public ShortBuffer duplicate () + { + return duplicate(readOnly); + } + + public ShortBuffer asReadOnlyBuffer () + { + return duplicate(true); + } + + public boolean isReadOnly () + { + return readOnly; + } + + public boolean isDirect () + { + return bb.isDirect (); + } + + public ByteOrder order () + { + return endian; + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/activation/Activatable.java gcc-3.4.0/libjava/java/rmi/activation/Activatable.java *** gcc-3.3.3/libjava/java/rmi/activation/Activatable.java 2002-01-22 22:40:25.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/activation/Activatable.java 2003-03-21 09:00:29.000000000 +0000 *************** import java.rmi.MarshalledObject; *** 48,53 **** --- 48,55 ---- public abstract class Activatable extends RemoteServer { + static final long serialVersionUID = -3120617863591563455L; + protected Activatable(String location, MarshalledObject data, boolean restart, int port) throws ActivationException, RemoteException { throw new Error("Not implemented"); } diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/activation/ActivationGroupDesc.java gcc-3.4.0/libjava/java/rmi/activation/ActivationGroupDesc.java *** gcc-3.3.3/libjava/java/rmi/activation/ActivationGroupDesc.java 2002-10-02 21:21:37.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/activation/ActivationGroupDesc.java 2003-03-21 09:00:29.000000000 +0000 *************** public final class ActivationGroupDesc i *** 48,53 **** --- 48,55 ---- public static class CommandEnvironment implements Serializable { + static final long serialVersionUID = 6165754737887770191L; + private String cmdpath; private String[] argv; diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/activation/ActivationGroup.java gcc-3.4.0/libjava/java/rmi/activation/ActivationGroup.java *** gcc-3.3.3/libjava/java/rmi/activation/ActivationGroup.java 2002-01-22 22:40:25.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/activation/ActivationGroup.java 2003-03-21 09:00:29.000000000 +0000 *************** public abstract class ActivationGroup *** 46,51 **** --- 46,53 ---- extends UnicastRemoteObject implements ActivationInstantiator { + static final long serialVersionUID = -7696947875314805420L; + protected ActivationGroup(ActivationGroupID groupID) throws RemoteException { throw new Error("Not implemented"); } diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/activation/ActivationInstantiator.java gcc-3.4.0/libjava/java/rmi/activation/ActivationInstantiator.java *** gcc-3.3.3/libjava/java/rmi/activation/ActivationInstantiator.java 2002-01-22 22:40:25.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/activation/ActivationInstantiator.java 2003-10-11 18:42:06.000000000 +0000 *************** import java.rmi.RemoteException; *** 42,49 **** import java.rmi.MarshalledObject; public interface ActivationInstantiator ! extends Remote { ! ! public MarshalledObject newInstance(ActivationID id, ActivationDesc desc) throws ActivationException, RemoteException; ! } --- 42,49 ---- import java.rmi.MarshalledObject; public interface ActivationInstantiator ! extends Remote ! { ! MarshalledObject newInstance (ActivationID id, ActivationDesc desc) ! throws ActivationException, RemoteException; } diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/activation/ActivationMonitor.java gcc-3.4.0/libjava/java/rmi/activation/ActivationMonitor.java *** gcc-3.3.3/libjava/java/rmi/activation/ActivationMonitor.java 2002-01-22 22:40:25.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/activation/ActivationMonitor.java 2003-10-11 18:42:06.000000000 +0000 *************** import java.rmi.Remote; *** 41,51 **** import java.rmi.RemoteException; import java.rmi.MarshalledObject; ! public interface ActivationMonitor ! extends Remote { ! public void inactiveObject(ActivationID id) throws UnknownObjectException, RemoteException; ! public void activeObject(ActivationID id, MarshalledObject obj) throws UnknownObjectException, RemoteException; ! public void inactiveGroup(ActivationGroupID id, long incarnation) throws UnknownGroupException, RemoteException; } --- 41,54 ---- import java.rmi.RemoteException; import java.rmi.MarshalledObject; ! public interface ActivationMonitor extends Remote ! { ! void inactiveObject (ActivationID id) ! throws UnknownObjectException, RemoteException; ! void activeObject (ActivationID id, MarshalledObject obj) ! throws UnknownObjectException, RemoteException; + void inactiveGroup (ActivationGroupID id, long incarnation) + throws UnknownGroupException, RemoteException; } diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/activation/ActivationSystem.java gcc-3.4.0/libjava/java/rmi/activation/ActivationSystem.java *** gcc-3.3.3/libjava/java/rmi/activation/ActivationSystem.java 2002-01-22 22:40:25.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/activation/ActivationSystem.java 2003-10-11 18:42:07.000000000 +0000 *************** package java.rmi.activation; *** 40,59 **** import java.rmi.Remote; import java.rmi.RemoteException; ! public interface ActivationSystem ! extends Remote { ! public static final int SYSTEM_PORT = 0; // XXX ! public ActivationID registerObject(ActivationDesc desc) throws ActivationException, UnknownGroupException, RemoteException; ! public void unregisterObject(ActivationID id) throws ActivationException, UnknownObjectException, RemoteException; ! public ActivationGroupID registerGroup(ActivationGroupDesc desc) throws ActivationException, RemoteException; ! public ActivationMonitor activeGroup(ActivationGroupID id, ActivationInstantiator group, long incarnation) throws UnknownGroupException, ActivationException, RemoteException; ! public void unregisterGroup(ActivationGroupID id) throws ActivationException, UnknownGroupException, RemoteException; ! public void shutdown() throws RemoteException; ! public ActivationDesc setActivationDesc(ActivationID id, ActivationDesc desc) throws ActivationException, UnknownObjectException, UnknownGroupException, RemoteException; ! public ActivationGroupDesc setActivationGroupDesc(ActivationGroupID id, ActivationGroupDesc desc) throws ActivationException, UnknownGroupException, RemoteException; ! public ActivationDesc getActivationDesc(ActivationID id) throws ActivationException, UnknownObjectException, RemoteException; ! public ActivationGroupDesc getActivationGroupDesc(ActivationGroupID id) throws ActivationException, UnknownGroupException, RemoteException; } --- 40,77 ---- import java.rmi.Remote; import java.rmi.RemoteException; ! public interface ActivationSystem extends Remote ! { ! int SYSTEM_PORT = 0; // XXX ! ActivationID registerObject (ActivationDesc desc) ! throws ActivationException, UnknownGroupException, RemoteException; ! void unregisterObject (ActivationID id) ! throws ActivationException, UnknownObjectException, RemoteException; ! ! ActivationGroupID registerGroup (ActivationGroupDesc desc) ! throws ActivationException, RemoteException; ! ! ActivationMonitor activeGroup (ActivationGroupID id, ! ActivationInstantiator group, long incarnation) ! throws UnknownGroupException, ActivationException, RemoteException; ! ! void unregisterGroup (ActivationGroupID id) ! throws ActivationException, UnknownGroupException, RemoteException; ! ! void shutdown() ! throws RemoteException; + ActivationDesc setActivationDesc (ActivationID id, ActivationDesc desc) + throws ActivationException, UnknownObjectException, UnknownGroupException, + RemoteException; + + ActivationGroupDesc setActivationGroupDesc (ActivationGroupID id, + ActivationGroupDesc desc) + throws ActivationException, UnknownGroupException, RemoteException; + + ActivationDesc getActivationDesc (ActivationID id) throws ActivationException, UnknownObjectException, RemoteException; + + ActivationGroupDesc getActivationGroupDesc (ActivationGroupID id) throws ActivationException, UnknownGroupException, RemoteException; } diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/activation/Activator.java gcc-3.4.0/libjava/java/rmi/activation/Activator.java *** gcc-3.3.3/libjava/java/rmi/activation/Activator.java 2002-01-22 22:40:25.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/activation/Activator.java 2003-10-11 18:42:07.000000000 +0000 *************** import java.rmi.RemoteException; *** 42,49 **** import java.rmi.MarshalledObject; public interface Activator ! extends Remote { ! ! public MarshalledObject activate(ActivationID id, boolean force) throws ActivationException, UnknownObjectException, RemoteException; ! } --- 42,49 ---- import java.rmi.MarshalledObject; public interface Activator ! extends Remote ! { ! MarshalledObject activate (ActivationID id, boolean force) ! throws ActivationException, UnknownObjectException, RemoteException; } diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/dgc/DGC.java gcc-3.4.0/libjava/java/rmi/dgc/DGC.java *** gcc-3.3.3/libjava/java/rmi/dgc/DGC.java 2002-01-22 22:40:26.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/dgc/DGC.java 2003-10-11 18:42:07.000000000 +0000 *************** import java.rmi.Remote; *** 41,51 **** import java.rmi.RemoteException; import java.rmi.server.ObjID; ! public interface DGC ! extends Remote { ! ! public Lease dirty(ObjID[] ids, long sequenceNum, Lease lease) throws RemoteException; ! ! public void clean(ObjID[] ids, long sequenceNum, VMID vmid, boolean strong) throws RemoteException; } --- 41,51 ---- import java.rmi.RemoteException; import java.rmi.server.ObjID; ! public interface DGC extends Remote ! { ! Lease dirty (ObjID[] ids, long sequenceNum, Lease lease) ! throws RemoteException; + void clean (ObjID[] ids, long sequenceNum, VMID vmid, boolean strong) + throws RemoteException; } diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/dgc/VMID.java gcc-3.4.0/libjava/java/rmi/dgc/VMID.java *** gcc-3.3.3/libjava/java/rmi/dgc/VMID.java 2002-01-22 22:40:26.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/dgc/VMID.java 2003-03-31 11:07:24.000000000 +0000 *************** exception statement from your version. * *** 38,116 **** package java.rmi.dgc; import java.io.Serializable; - import java.rmi.server.UID; import java.net.InetAddress; import java.net.UnknownHostException; ! public final class VMID ! implements Serializable { ! ! static final long serialVersionUID = -538642295484486218L; ! static final boolean areWeUnique; ! static byte[] localAddr; ! ! private byte[] addr; ! private UID uid; ! static { ! byte[] addr; ! boolean awu = true; ! try { ! addr = InetAddress.getLocalHost().getAddress(); ! if (addr[0] == 127 && addr[1] == 0 && addr[2] == 0 && addr[3] == 1) { ! awu = false; ! } ! } ! catch (UnknownHostException _) { ! addr = new byte[]{ 127, 0, 0, 1 }; ! awu = false; ! } ! localAddr = addr; ! areWeUnique = awu; ! } ! public VMID() { ! addr = localAddr; ! uid = new UID(); ! } ! public static boolean isUnique() { ! return (areWeUnique); ! } ! public int hashCode() { ! return (super.hashCode()); ! } ! public boolean equals(Object obj) { ! if (!(obj instanceof VMID)) { ! return (false); ! } ! VMID other = (VMID)obj; ! if (addr.length != other.addr.length) { ! return (false); ! } ! for (int i = addr.length - 1; i >= 0; i--) { ! if (addr[i] != other.addr[i]) { ! return (false); ! } ! } ! return (uid.equals(other.uid)); ! } ! public String toString() { ! StringBuffer buf = new StringBuffer("[VMID: "); ! for (int i = 0; i < addr.length; i++) { ! if (i > 0) { ! buf.append("."); ! } ! buf.append(Integer.toString(addr[i])); ! } ! buf.append(" "); ! buf.append(uid.toString()); ! buf.append("]"); ! return (buf.toString()); ! } } --- 38,138 ---- package java.rmi.dgc; import java.io.Serializable; import java.net.InetAddress; import java.net.UnknownHostException; + import java.rmi.server.UID; ! public final class VMID implements Serializable ! { ! static final long serialVersionUID = -538642295484486218L; ! ! static final boolean areWeUnique; ! ! static byte[] localAddr; ! private byte[] addr; ! ! private UID uid; ! static ! { ! byte[] addr; ! boolean awu = true; ! try { ! addr = InetAddress.getLocalHost().getAddress(); ! if (addr[0] == 127 && addr[1] == 0 && addr[2] == 0 && addr[3] == 1) { ! awu = false; ! } ! } ! catch (UnknownHostException _) { ! addr = new byte[]{ 127, 0, 0, 1 }; ! awu = false; ! } ! localAddr = addr; ! areWeUnique = awu; ! } ! public VMID() ! { ! addr = localAddr; ! uid = new UID(); ! } ! /** ! * @deprecated ! */ ! public static boolean isUnique () ! { ! return areWeUnique; ! } ! public int hashCode () ! { ! return super.hashCode(); ! } ! public boolean equals (Object obj) ! { ! if (!(obj instanceof VMID)) ! { ! return false; ! } ! ! VMID other = (VMID) obj; ! if (addr.length != other.addr.length) ! { ! return false; ! } ! ! for (int i = addr.length - 1; i >= 0; i--) ! { ! if (addr[i] != other.addr[i]) ! { ! return false; ! } ! } ! ! return uid.equals(other.uid); ! } ! public String toString () ! { ! StringBuffer buf = new StringBuffer ("[VMID: "); ! ! for (int i = 0; i < addr.length; i++) ! { ! if (i > 0) ! { ! buf.append ("."); ! } ! ! buf.append (Integer.toString (addr [i])); ! } ! ! buf.append (" "); ! buf.append (uid.toString ()); ! buf.append ("]"); + return buf.toString(); + } } diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/MarshalledObject.java gcc-3.4.0/libjava/java/rmi/MarshalledObject.java *** gcc-3.3.3/libjava/java/rmi/MarshalledObject.java 2002-11-07 18:01:03.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/MarshalledObject.java 2003-11-11 12:22:19.000000000 +0000 *************** public final class MarshalledObject *** 76,82 **** public boolean equals(Object obj) { ! if(obj == null || !(obj instanceof MarshalledObject) ) return false; // hashCode even differs, don't do the time-consuming comparisons --- 76,82 ---- public boolean equals(Object obj) { ! if (! (obj instanceof MarshalledObject)) return false; // hashCode even differs, don't do the time-consuming comparisons diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/Naming.java gcc-3.4.0/libjava/java/rmi/Naming.java *** gcc-3.3.3/libjava/java/rmi/Naming.java 2002-01-22 22:40:24.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/Naming.java 2003-12-26 23:23:55.000000000 +0000 *************** import java.rmi.registry.LocateRegistry; *** 44,69 **** public final class Naming { public static Remote lookup(String name) throws NotBoundException, MalformedURLException, RemoteException { URL u = new URL("http:" + name); ! return (getRegistry(u).lookup(u.getFile().substring(1))); } public static void bind(String name, Remote obj) throws AlreadyBoundException, MalformedURLException, RemoteException { URL u = new URL("http:" + name); ! getRegistry(u).bind(u.getFile().substring(1), obj); } public static void unbind(String name) throws RemoteException, NotBoundException, MalformedURLException { URL u = new URL("http:" + name); ! getRegistry(u).unbind(u.getFile().substring(1)); } public static void rebind(String name, Remote obj) throws RemoteException, MalformedURLException { URL u = new URL("http:" + name); ! getRegistry(u).rebind(u.getFile().substring(1), obj); } public static String[] list(String name) throws RemoteException, MalformedURLException { return (getRegistry(new URL("http:" + name)).list()); } --- 44,140 ---- public final class Naming { + /**

            +  * Looks for the remote object that is associated with the named service.
            +  * Name and location is given in form of a URL without a scheme:
            +  * 
            +  *   //host:port/service-name
            +  *  
            +  * The port is optional.
            +  * 
            + * @param name the service name and location + * @return Remote-object that implements the named service + * @throws NotBoundException if no object implements the service + * @throws MalformedURLException + * @throws RemoteException + */ public static Remote lookup(String name) throws NotBoundException, MalformedURLException, RemoteException { + // hack to accept "rmi://host:port/service" strings + if(name.startsWith("rmi:")){ name = name.substring(4); } URL u = new URL("http:" + name); ! String filename = u.getFile(); ! ! // If the filename begins with a slash we must cut it for ! // name resolution. ! if (filename.charAt(0) == '/') ! return (getRegistry(u).lookup(filename.substring(1))); ! else ! return (getRegistry(u).lookup(filename)); } + /** + * Try to bind the given object to the given service name. + * @param name + * @param obj + * @throws AlreadyBoundException + * @throws MalformedURLException + * @throws RemoteException + */ public static void bind(String name, Remote obj) throws AlreadyBoundException, MalformedURLException, RemoteException { URL u = new URL("http:" + name); ! String filename = u.getFile(); ! // If the filename begins with a slash we must cut it for ! // name resolution. ! if (filename.charAt(0) == '/') ! getRegistry(u).bind(filename.substring(1), obj); ! else ! getRegistry(u).bind(filename, obj); } + /** + * Remove a binding for a given service name. + * @param name + * @throws RemoteException + * @throws NotBoundException + * @throws MalformedURLException + */ public static void unbind(String name) throws RemoteException, NotBoundException, MalformedURLException { URL u = new URL("http:" + name); ! String filename = u.getFile(); ! // If the filename begins with a slash we must cut it for ! // name resolution. ! if (filename.charAt(0) == '/') ! getRegistry(u).unbind(filename.substring(1)); ! else ! getRegistry(u).unbind(filename); } + /** + * Forces the binding between the given Remote-object and the given service name, even + * if there was already an object bound to this name. + * @param name + * @param obj + * @throws RemoteException + * @throws MalformedURLException + */ public static void rebind(String name, Remote obj) throws RemoteException, MalformedURLException { URL u = new URL("http:" + name); ! String filename = u.getFile(); ! // If the filename begins with a slash we must cut it for ! // name resolution. ! if (filename.charAt(0) == '/') ! getRegistry(u).rebind(filename.substring(1), obj); ! else ! getRegistry(u).rebind(filename, obj); } + /** + * Lists all services at the named registry. + * @param name url that specifies the registry + * @return list of services at the name registry + * @throws RemoteException + * @throws MalformedURLException + */ public static String[] list(String name) throws RemoteException, MalformedURLException { return (getRegistry(new URL("http:" + name)).list()); } diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/registry/RegistryHandler.java gcc-3.4.0/libjava/java/rmi/registry/RegistryHandler.java *** gcc-3.3.3/libjava/java/rmi/registry/RegistryHandler.java 2002-01-22 22:40:28.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/registry/RegistryHandler.java 2003-10-11 18:42:07.000000000 +0000 *************** package java.rmi.registry; *** 40,49 **** import java.rmi.RemoteException; import java.rmi.UnknownHostException; ! public interface RegistryHandler { ! ! public Registry registryStub(String host, int port) throws RemoteException, UnknownHostException; ! ! public Registry registryImpl(int port) throws RemoteException; } --- 40,58 ---- import java.rmi.RemoteException; import java.rmi.UnknownHostException; ! /** ! * @deprecated ! */ ! public interface RegistryHandler ! { ! /** ! * @deprecated ! */ ! Registry registryStub (String host, int port) ! throws RemoteException, UnknownHostException; + /** + * @deprecated + */ + Registry registryImpl (int port) throws RemoteException; } diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/registry/Registry.java gcc-3.4.0/libjava/java/rmi/registry/Registry.java *** gcc-3.3.3/libjava/java/rmi/registry/Registry.java 2002-01-22 22:40:28.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/registry/Registry.java 2003-10-11 18:42:07.000000000 +0000 *************** import java.rmi.AccessException; *** 43,61 **** import java.rmi.AlreadyBoundException; import java.rmi.Remote; ! public interface Registry ! extends Remote { ! ! public static int REGISTRY_PORT = 1099; ! ! public Remote lookup(String name) throws RemoteException, NotBoundException, AccessException; ! public void bind(String name, Remote obj) throws RemoteException, AlreadyBoundException, AccessException; ! public void unbind(String name) throws RemoteException, NotBoundException, AccessException; ! public void rebind(String name, Remote obj) throws RemoteException, AccessException; ! public String[] list() throws RemoteException, AccessException; } --- 43,64 ---- import java.rmi.AlreadyBoundException; import java.rmi.Remote; ! public interface Registry extends Remote ! { ! int REGISTRY_PORT = 1099; ! Remote lookup(String name) ! throws RemoteException, NotBoundException, AccessException; ! void bind(String name, Remote obj) ! throws RemoteException, AlreadyBoundException, AccessException; ! void unbind(String name) ! throws RemoteException, NotBoundException, AccessException; ! void rebind(String name, Remote obj) ! throws RemoteException, AccessException; + String[] list() + throws RemoteException, AccessException; } diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/RMISecurityManager.java gcc-3.4.0/libjava/java/rmi/RMISecurityManager.java *** gcc-3.3.3/libjava/java/rmi/RMISecurityManager.java 2002-01-22 22:40:24.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/RMISecurityManager.java 2003-03-21 08:48:14.000000000 +0000 *************** *** 1,5 **** /* ! Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ! Copyright (c) 1996, 1997, 1998, 1999, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,149 **** package java.rmi; ! import java.io.FileDescriptor; ! import java.lang.Thread; ! import java.lang.Class; ! import java.lang.SecurityManager; ! import java.net.InetAddress; ! import java.security.Permission; ! ! public class RMISecurityManager extends SecurityManager { ! ! public RMISecurityManager() { ! } ! ! public void checkAccept(String host, int port) { ! } ! ! public void checkAccess(Thread g) { ! } ! ! public void checkAccess(ThreadGroup g) { ! } ! ! public void checkAwtEventQueueAccess() { ! } ! ! public void checkConnect(String host, int port) { ! } ! ! public void checkConnect(String host, int port, Object context) { ! } ! ! public void checkCreateClassLoader() { ! } ! ! public void checkDelete(String file) { ! } ! ! public void checkExec(String cmd) { ! } ! ! public void checkExit(int status) { ! } ! ! public void checkLink(String lib) { ! } ! ! public void checkListen(int port) { ! } ! ! public void checkMemberAccess ( Class clazz, int which ) { ! } ! ! public void checkMulticast(InetAddress maddr) { ! } ! ! public void checkMulticast(InetAddress maddr, byte ttl) { ! } ! ! public void checkPackageAccess(String pkg) { ! } ! ! public void checkPackageDefinition(String pkg) { ! } ! ! public void checkPermission(Permission perm) { ! } ! ! public void checkPermission(Permission perm, Object context) { ! } ! ! public void checkPrintJobAccess() { ! } ! ! public void checkPropertiesAccess() { ! } ! ! public void checkPropertyAccess(String key) { ! } ! ! /* public void checkPropertyAccess(String key, String def) { ! }*/ ! ! public void checkRead(FileDescriptor fd) { ! } ! ! public void checkRead(String file) { ! } ! ! public void checkRead(String file, Object context) { ! } ! ! public void checkSecurityAccess(String action) { ! } ! ! public void checkSetFactory() { ! } ! ! public void checkSystemClipboardAccess() { ! } ! ! public boolean checkTopLevelWindow(Object window) { ! return (true); ! } ! ! public void checkWrite(FileDescriptor fd) { ! } ! ! public void checkWrite(String file) { ! } ! } --- 37,48 ---- package java.rmi; ! /** ! * @since 1.1 ! */ ! public class RMISecurityManager extends SecurityManager ! { ! public RMISecurityManager() ! { ! } } diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/server/LoaderHandler.java gcc-3.4.0/libjava/java/rmi/server/LoaderHandler.java *** gcc-3.3.3/libjava/java/rmi/server/LoaderHandler.java 2002-01-22 22:40:29.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/server/LoaderHandler.java 2003-10-11 18:42:07.000000000 +0000 *************** package java.rmi.server; *** 40,54 **** import java.net.MalformedURLException; import java.net.URL; ! public interface LoaderHandler { ! ! public static final String packagePrefix = ""; ! ! public Class loadClass(String name) throws MalformedURLException, ClassNotFoundException; ! ! public Class loadClass(URL codebase, String name) throws MalformedURLException, ClassNotFoundException; ! public Object getSecurityContext(ClassLoader loader); } --- 40,66 ---- import java.net.MalformedURLException; import java.net.URL; + /** + * @deprecated + */ + public interface LoaderHandler + { + String packagePrefix = ""; ! /** ! * @deprecated ! */ ! Class loadClass(String name) ! throws MalformedURLException, ClassNotFoundException; ! /** ! * @deprecated ! */ ! Class loadClass(URL codebase, String name) ! throws MalformedURLException, ClassNotFoundException; + /** + * @deprecated + */ + Object getSecurityContext(ClassLoader loader); } diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/server/LogStream.java gcc-3.4.0/libjava/java/rmi/server/LogStream.java *** gcc-3.3.3/libjava/java/rmi/server/LogStream.java 2002-09-16 09:46:36.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/server/LogStream.java 2003-03-31 06:49:33.000000000 +0000 *************** import java.io.PrintStream; *** 41,102 **** import java.io.OutputStream; import java.io.IOException; ! public class LogStream ! extends PrintStream { ! ! public static final int SILENT = 0; ! public static final int BRIEF = 10; ! public static final int VERBOSE = 20; ! ! private static PrintStream defStream; ! ! private LogStream(OutputStream s) { ! super(s); ! } ! public static LogStream log(String name) { ! throw new Error("Not implemented"); ! } ! public static PrintStream getDefaultStream() { ! return (defStream); ! } ! public static void setDefaultStream(PrintStream s) { ! defStream = s; ! } ! public OutputStream getOutputStream() { ! return (out); ! } ! public void setOutputStream(OutputStream s) { ! out = s; ! } ! public void write(int b) { ! super.write(b); ! } ! public void write(byte[] b, int off, int len) { ! super.write(b, off, len); ! } ! public String toString() { ! throw new Error("Not implemented"); ! } ! public static int parseLevel(String s) { ! if (s.equalsIgnoreCase("silent")) { ! return (SILENT); ! } ! if (s.equalsIgnoreCase("brief")) { ! return (BRIEF); ! } ! if (s.equalsIgnoreCase("verbose")) { ! return (VERBOSE); ! } ! return (SILENT); ! } } --- 41,146 ---- import java.io.OutputStream; import java.io.IOException; ! /** ! * @deprecated ! */ ! public class LogStream extends PrintStream ! { ! public static final int SILENT = 0; ! public static final int BRIEF = 10; ! public static final int VERBOSE = 20; ! private static PrintStream defStream; ! private LogStream (OutputStream s) ! { ! super (s); ! } ! /** ! * @deprecated ! */ ! public static LogStream log (String name) ! { ! throw new Error ("Not implemented"); ! } ! /** ! * @deprecated ! */ ! public static PrintStream getDefaultStream () ! { ! return defStream; ! } ! ! /** ! * @deprecated ! */ ! public static void setDefaultStream (PrintStream s) ! { ! defStream = s; ! } ! /** ! * @deprecated ! */ ! public OutputStream getOutputStream () ! { ! return out; ! } ! /** ! * @deprecated ! */ ! public void setOutputStream (OutputStream s) ! { ! out = s; ! } ! /** ! * @deprecated ! */ ! public void write (int buffer) ! { ! super.write (buffer); ! } ! /** ! * @deprecated ! */ ! public void write (byte[] buffer, int offset, int len) ! { ! super.write (buffer, offset, len); ! } ! /** ! * @deprecated ! */ ! public String toString () ! { ! throw new Error ("Not implemented"); ! } + /** + * @deprecated + */ + public static int parseLevel (String s) + { + if (s.equalsIgnoreCase ("silent")) + { + return SILENT; + } + + if (s.equalsIgnoreCase ("brief")) + { + return BRIEF; + } + + if (s.equalsIgnoreCase ("verbose")) + { + return VERBOSE; + } + + return SILENT; + } } diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/server/Operation.java gcc-3.4.0/libjava/java/rmi/server/Operation.java *** gcc-3.3.3/libjava/java/rmi/server/Operation.java 2002-01-22 22:40:29.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/server/Operation.java 2003-03-31 06:49:33.000000000 +0000 *************** exception statement from your version. * *** 37,56 **** package java.rmi.server; ! public class Operation { ! ! private String operation; ! ! public Operation(String op) { ! operation = op; ! } ! public String getOperation() { ! return (operation); ! } ! public String toString() { ! return (operation); ! } } --- 37,70 ---- package java.rmi.server; ! /** ! * @deprecated ! */ ! public class Operation ! { ! private String operation; ! /** ! * @deprecated ! */ ! public Operation (String op) ! { ! operation = op; ! } ! /** ! * @deprecated ! */ ! public String getOperation () ! { ! return operation; ! } + /** + * @deprecated + */ + public String toString () + { + return operation; + } } diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/server/RemoteCall.java gcc-3.4.0/libjava/java/rmi/server/RemoteCall.java *** gcc-3.3.3/libjava/java/rmi/server/RemoteCall.java 2002-01-22 22:40:29.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/server/RemoteCall.java 2003-10-11 18:42:07.000000000 +0000 *************** import java.io.ObjectOutput; *** 43,56 **** import java.io.ObjectInput; import java.io.StreamCorruptedException; ! public interface RemoteCall { ! public ObjectOutput getOutputStream() throws IOException; ! public void releaseOutputStream() throws IOException; ! public ObjectInput getInputStream() throws IOException; ! public void releaseInputStream() throws IOException; ! public ObjectOutput getResultStream(boolean success) throws IOException, StreamCorruptedException; ! public void executeCall() throws Exception; ! public void done() throws IOException; } --- 43,86 ---- import java.io.ObjectInput; import java.io.StreamCorruptedException; ! /** ! * @deprecated ! */ ! public interface RemoteCall ! { ! /** ! * @deprecated ! */ ! ObjectOutput getOutputStream () throws IOException; ! /** ! * @deprecated ! */ ! void releaseOutputStream () throws IOException; ! ! /** ! * @deprecated ! */ ! ObjectInput getInputStream () throws IOException; ! ! /** ! * @deprecated ! */ ! void releaseInputStream () throws IOException; + /** + * @deprecated + */ + ObjectOutput getResultStream (boolean success) + throws IOException, StreamCorruptedException; + + /** + * @deprecated + */ + void executeCall () throws Exception; + + /** + * @deprecated + */ + void done () throws IOException; } diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/server/RemoteRef.java gcc-3.4.0/libjava/java/rmi/server/RemoteRef.java *** gcc-3.3.3/libjava/java/rmi/server/RemoteRef.java 2002-01-22 22:40:29.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/server/RemoteRef.java 2003-10-11 18:42:07.000000000 +0000 *************** import java.rmi.Remote; *** 43,61 **** import java.rmi.RemoteException; import java.io.ObjectOutput; ! public interface RemoteRef ! extends Externalizable { ! ! public static final long serialVersionUID = 0; ! public static final String packagePrefix = "gnu.java.rmi.server"; ! public void invoke(RemoteCall call) throws Exception; ! public Object invoke(Remote obj, Method method, Object[] params, long opnum) throws Exception; ! public RemoteCall newCall(RemoteObject obj, Operation[] op, int opnum, long hash) throws RemoteException; ! public void done(RemoteCall call) throws RemoteException; ! public boolean remoteEquals(RemoteRef ref); ! public int remoteHashCode(); ! public String getRefClass(ObjectOutput out); ! public String remoteToString(); } --- 43,78 ---- import java.rmi.RemoteException; import java.io.ObjectOutput; ! public interface RemoteRef extends Externalizable ! { ! long serialVersionUID = 0; ! ! String packagePrefix = "gnu.java.rmi.server"; ! /** ! * @deprecated ! */ ! void invoke (RemoteCall call) throws Exception; ! ! Object invoke (Remote obj, Method method, Object[] params, long opnum) ! throws Exception; ! ! /** ! * @deprecated ! */ ! RemoteCall newCall (RemoteObject obj, Operation[] op, int opnum, long hash) ! throws RemoteException; + /** + * @deprecated + */ + void done (RemoteCall call) throws RemoteException; + + boolean remoteEquals (RemoteRef ref); + + int remoteHashCode(); + + String getRefClass (ObjectOutput out); + + String remoteToString(); } diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/server/RemoteStub.java gcc-3.4.0/libjava/java/rmi/server/RemoteStub.java *** gcc-3.3.3/libjava/java/rmi/server/RemoteStub.java 2002-01-22 22:40:29.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/server/RemoteStub.java 2003-03-31 06:49:33.000000000 +0000 *************** *** 1,5 **** /* ! Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ! Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,57 **** package java.rmi.server; ! public abstract class RemoteStub ! extends RemoteObject { ! ! public static final long serialVersionUID = -1585587260594494182l; ! ! protected RemoteStub() { ! super(); ! } ! protected RemoteStub(RemoteRef ref) { ! super(ref); ! } ! protected static void setRef(RemoteStub stub, RemoteRef ref) { ! stub.ref = ref; ! } ! } --- 37,61 ---- package java.rmi.server; ! public abstract class RemoteStub extends RemoteObject ! { ! static final long serialVersionUID = -1585587260594494182l; ! protected RemoteStub () ! { ! super (); ! } ! protected RemoteStub (RemoteRef ref) ! { ! super (ref); ! } ! /** ! * @deprecated ! */ ! protected static void setRef (RemoteStub stub, RemoteRef ref) ! { ! stub.ref = ref; ! } ! } // class RemoteSub diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/server/RMIClassLoader.java gcc-3.4.0/libjava/java/rmi/server/RMIClassLoader.java *** gcc-3.3.3/libjava/java/rmi/server/RMIClassLoader.java 2003-01-02 00:14:10.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/server/RMIClassLoader.java 2003-11-11 12:22:19.000000000 +0000 *************** *** 1,5 **** /* RMIClassLoader.java ! Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,6 ---- /* RMIClassLoader.java ! Copyright (c) 1996, 1997, 1998, 1999, 2002, 2003 ! Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,94 **** package java.rmi.server; import java.net.URL; - import java.net.URLConnection; import java.net.URLClassLoader; - import java.io.IOException; - import java.io.DataInputStream; - import java.net.MalformedURLException; import java.util.ArrayList; - import java.util.Collection; - import java.util.Collections; import java.util.Hashtable; import java.util.Map; import java.util.StringTokenizer; - import java.util.WeakHashMap; public class RMIClassLoader { - static private class MyClassLoader extends URLClassLoader { ! ! private MyClassLoader(URL[] urls, ClassLoader parent, String annotation) { ! super(urls, parent); this.annotation = annotation; } ! private MyClassLoader(URL[] urls, ClassLoader parent) { super (urls, parent); ! this.annotation = urlToAnnotation(urls); } ! public static String urlToAnnotation(URL[] urls) { if (urls.length == 0) ! return null; ! StringBuffer annotation = new StringBuffer(64*urls.length); ! for(int i = 0; i < urls.length; i++) ! { ! annotation.append(urls[i].toExternalForm()); ! annotation.append(' '); ! } return annotation.toString(); } ! public final String getClassAnnotation(){ return annotation; } private final String annotation; } --- 38,152 ---- package java.rmi.server; + import java.net.MalformedURLException; import java.net.URL; import java.net.URLClassLoader; import java.util.ArrayList; import java.util.Hashtable; import java.util.Map; import java.util.StringTokenizer; + + /** + * This class provides a set of public static utility methods for supporting + * network-based class loading in RMI. These methods are called by RMI's + * internal marshal streams to implement the dynamic class loading of types for + * RMI parameters and return values. + */ public class RMIClassLoader { static private class MyClassLoader extends URLClassLoader { ! private MyClassLoader (URL[] urls, ClassLoader parent, String annotation) { ! super (urls, parent); this.annotation = annotation; } ! private MyClassLoader (URL[] urls, ClassLoader parent) { super (urls, parent); ! this.annotation = urlToAnnotation (urls); } ! public static String urlToAnnotation (URL[] urls) { if (urls.length == 0) ! return null; ! StringBuffer annotation = new StringBuffer (64 * urls.length); ! ! for (int i = 0; i < urls.length; i++) ! { ! annotation.append (urls [i].toExternalForm()); ! annotation.append (' '); ! } return annotation.toString(); } ! public final String getClassAnnotation() ! { return annotation; } private final String annotation; + } + + /** + * This class is used to identify a cached classloader by its codebase and + * the context classloader that is its parent. + */ + private static class CacheKey + { + private String mCodeBase; + private ClassLoader mContextClassLoader; + + public CacheKey (String theCodebase, ClassLoader theContextClassLoader) + { + mCodeBase = theCodebase; + mContextClassLoader = theContextClassLoader; + } + + /** + * @return true if the codebase and the context classloader are equal + */ + public boolean equals (Object theOther) + { + if (theOther instanceof CacheKey) + { + CacheKey key = (CacheKey) theOther; + + return (equals (this.mCodeBase,key.mCodeBase) + && equals (this.mContextClassLoader, key.mContextClassLoader)); + } + return false; + } + + /** + * Test if the two objects are equal or both null. + * @param theOne + * @param theOther + * @return + */ + private boolean equals (Object theOne, Object theOther) + { + return theOne != null ? theOne.equals (theOther) : theOther == null; + } + + /** + * @return hashCode + */ + public int hashCode() + { + return ((mCodeBase != null ? mCodeBase.hashCode() : 0) + ^(mContextClassLoader != null ? mContextClassLoader.hashCode() : -1)); + } + + public String toString() + { + return "[" + mCodeBase + "," + mContextClassLoader + "]"; + } } *************** public class RMIClassLoader *** 98,221 **** //defaultAnnotation is got from system property // "java.rmi.server.defaultAnnotation" private static String defaultAnnotation; //URL object for defaultAnnotation private static URL defaultCodebase; //class loader for defaultAnnotation private static MyClassLoader defaultLoader; ! static { // 89 is a nice prime number for Hashtable initial capacity ! cacheLoaders = new Hashtable(89); ! cacheAnnotations = new Hashtable(89); ! ! defaultAnnotation = System.getProperty("java.rmi.server.defaultAnnotation"); ! try { ! if (defaultAnnotation != null) ! defaultCodebase = new URL(defaultAnnotation); } ! catch(Exception _) { ! defaultCodebase = null; } if (defaultCodebase != null) { ! defaultLoader = new MyClassLoader(new URL[]{ defaultCodebase }, ! null, defaultAnnotation); ! cacheLoaders.put(defaultAnnotation, defaultLoader); } ! } ! /** * @deprecated */ ! public static Class loadClass(String name) throws MalformedURLException, ClassNotFoundException { ! return (loadClass("", name)); } ! public static Class loadClass(String codebases, String name) ! throws MalformedURLException, ClassNotFoundException { - Class c = null; ClassLoader loader = Thread.currentThread().getContextClassLoader(); //try context class loader first try { ! c = loader.loadClass(name); } - catch(ClassNotFoundException e) {} - - if (c != null) - return c; if (codebases.length() == 0) //=="" - loader = defaultLoader; - else { ! loader = (ClassLoader)cacheLoaders.get(codebases); ! if (loader == null) ! { ! //create an entry in cacheLoaders mapping a loader to codebases. ! ! // codebases are separated by " " ! StringTokenizer tok = new StringTokenizer(codebases, " "); ! ArrayList urls = new ArrayList(); ! while (tok.hasMoreTokens()) ! urls.add(new URL(tok.nextToken())); ! ! loader = new MyClassLoader((URL[])urls.toArray(new URL[urls.size()]), ! null, codebases); ! cacheLoaders.put(codebases, loader); ! } } ! return loader.loadClass(name); } ! ! public static String getClassAnnotation(Class cl) { ClassLoader loader = cl.getClassLoader(); ! if (loader == null || loader == ClassLoader.getSystemClassLoader()) { ! return null; //?? } ! if (loader instanceof MyClassLoader) { ! return ((MyClassLoader)loader).getClassAnnotation(); } ! ! String s = (String)cacheAnnotations.get(loader); if (s != null) return s; ! if (loader instanceof URLClassLoader) { ! URL[] urls = ((URLClassLoader)loader).getURLs(); ! if(urls.length == 0) ! return null; ! StringBuffer annotation = new StringBuffer(64*urls.length); ! for(int i = 0; i < urls.length; i++) ! { ! annotation.append(urls[i].toExternalForm()); ! annotation.append(' '); ! } ! s = annotation.toString(); ! cacheAnnotations.put(loader, s); } ! return null; } ! /** * @deprecated */ ! public static Object getSecurityContext(ClassLoader loader) { ! throw new Error("Not implemented"); } - } --- 156,333 ---- //defaultAnnotation is got from system property // "java.rmi.server.defaultAnnotation" private static String defaultAnnotation; + //URL object for defaultAnnotation private static URL defaultCodebase; + //class loader for defaultAnnotation private static MyClassLoader defaultLoader; ! static { // 89 is a nice prime number for Hashtable initial capacity ! cacheLoaders = new Hashtable (89); ! cacheAnnotations = new Hashtable (89); ! ! defaultAnnotation = System.getProperty ("java.rmi.server.defaultAnnotation"); ! ! try { ! if (defaultAnnotation != null) ! defaultCodebase = new URL (defaultAnnotation); } ! catch (Exception _) { ! defaultCodebase = null; } + if (defaultCodebase != null) { ! defaultLoader = new MyClassLoader (new URL[] { defaultCodebase }, null, ! defaultAnnotation); ! cacheLoaders.put (new CacheKey (defaultAnnotation, ! Thread.currentThread().getContextClassLoader()), ! defaultLoader); } ! } ! /** * @deprecated */ ! public static Class loadClass (String name) throws MalformedURLException, ClassNotFoundException { ! return loadClass ("", name); } ! public static Class loadClass (String codebases, String name) ! throws MalformedURLException, ClassNotFoundException { ClassLoader loader = Thread.currentThread().getContextClassLoader(); + //try context class loader first try { ! return loader.loadClass (name); ! } ! catch (ClassNotFoundException e) ! { ! // class not found in the local classpath } if (codebases.length() == 0) //=="" { ! loader = defaultLoader; ! } ! else ! { ! loader = getClassLoader(codebases); } ! if (loader == null) ! { ! //do not throw NullPointerException ! throw new ClassNotFoundException ("Could not find class (" + name + ! ") at codebase (" + codebases + ")"); ! } ! ! return loader.loadClass (name); } ! ! /** ! * Gets a classloader for the given codebase and with the current ! * context classloader as parent. ! * ! * @param codebases ! * ! * @return a classloader for the given codebase ! * ! * @throws MalformedURLException if the codebase contains a malformed URL ! */ ! private static ClassLoader getClassLoader (String codebases) ! throws MalformedURLException ! { ! ClassLoader loader; ! CacheKey loaderKey = new CacheKey ! (codebases, Thread.currentThread().getContextClassLoader()); ! loader = (ClassLoader) cacheLoaders.get (loaderKey); ! ! if (loader == null) ! { ! //create an entry in cacheLoaders mapping a loader to codebases. ! // codebases are separated by " " ! StringTokenizer tok = new StringTokenizer (codebases, " "); ! ArrayList urls = new ArrayList(); ! ! while (tok.hasMoreTokens()) ! urls.add (new URL (tok.nextToken())); ! ! loader = new MyClassLoader ((URL[]) urls.toArray (new URL [urls.size()]), ! Thread.currentThread().getContextClassLoader(), ! codebases); ! cacheLoaders.put (loaderKey, loader); ! } ! ! return loader; ! } ! ! /** ! * Returns a string representation of the network location where a remote ! * endpoint can get the class-definition of the given class. ! * ! * @param cl ! * ! * @return a space seperated list of URLs where the class-definition ! * of cl may be found ! */ ! public static String getClassAnnotation (Class cl) { ClassLoader loader = cl.getClassLoader(); ! ! if (loader == null ! || loader == ClassLoader.getSystemClassLoader()) { ! return System.getProperty ("java.rmi.server.codebase"); } ! if (loader instanceof MyClassLoader) { ! return ((MyClassLoader) loader).getClassAnnotation(); } ! ! String s = (String) cacheAnnotations.get (loader); ! if (s != null) return s; ! if (loader instanceof URLClassLoader) { ! URL[] urls = ((URLClassLoader) loader).getURLs(); ! if (urls.length == 0) ! return null; ! ! StringBuffer annotation = new StringBuffer (64 * urls.length); ! ! for (int i = 0; i < urls.length; i++) ! { ! annotation.append (urls [i].toExternalForm()); ! annotation.append (' '); ! } ! ! s = annotation.toString(); ! cacheAnnotations.put (loader, s); ! return s; } ! ! return System.getProperty ("java.rmi.server.codebase"); } ! /** * @deprecated */ ! public static Object getSecurityContext (ClassLoader loader) { ! throw new Error ("Not implemented"); } } diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/server/RMIClientSocketFactory.java gcc-3.4.0/libjava/java/rmi/server/RMIClientSocketFactory.java *** gcc-3.3.3/libjava/java/rmi/server/RMIClientSocketFactory.java 2002-01-22 22:40:29.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/server/RMIClientSocketFactory.java 2003-10-11 18:42:07.000000000 +0000 *************** package java.rmi.server; *** 40,47 **** import java.net.Socket; import java.io.IOException; ! public interface RMIClientSocketFactory { ! ! public Socket createSocket(String host, int port) throws IOException; ! } --- 40,46 ---- import java.net.Socket; import java.io.IOException; ! public interface RMIClientSocketFactory ! { ! Socket createSocket (String host, int port) throws IOException; } diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/server/RMIFailureHandler.java gcc-3.4.0/libjava/java/rmi/server/RMIFailureHandler.java *** gcc-3.3.3/libjava/java/rmi/server/RMIFailureHandler.java 2002-01-22 22:40:29.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/server/RMIFailureHandler.java 2003-10-11 18:42:07.000000000 +0000 *************** exception statement from your version. * *** 37,44 **** package java.rmi.server; ! public interface RMIFailureHandler { ! ! public boolean failure(Exception ex); ! } --- 37,46 ---- package java.rmi.server; ! public interface RMIFailureHandler ! { ! /** ! * @exception IOException If an error occurs ! */ ! boolean failure (Exception ex); } diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/server/RMIServerSocketFactory.java gcc-3.4.0/libjava/java/rmi/server/RMIServerSocketFactory.java *** gcc-3.3.3/libjava/java/rmi/server/RMIServerSocketFactory.java 2002-01-22 22:40:29.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/server/RMIServerSocketFactory.java 2003-10-11 18:42:07.000000000 +0000 *************** package java.rmi.server; *** 40,47 **** import java.net.ServerSocket; import java.io.IOException; ! public interface RMIServerSocketFactory { ! ! public ServerSocket createServerSocket(int port) throws IOException; ! } --- 40,46 ---- import java.net.ServerSocket; import java.io.IOException; ! public interface RMIServerSocketFactory ! { ! ServerSocket createServerSocket(int port) throws IOException; } diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/server/RMISocketFactory.java gcc-3.4.0/libjava/java/rmi/server/RMISocketFactory.java *** gcc-3.3.3/libjava/java/rmi/server/RMISocketFactory.java 2002-01-22 22:40:29.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/server/RMISocketFactory.java 2003-03-21 09:00:29.000000000 +0000 *************** import java.io.IOException; *** 43,84 **** import gnu.java.rmi.server.RMIDefaultSocketFactory; public abstract class RMISocketFactory ! implements RMIClientSocketFactory, RMIServerSocketFactory { ! ! static private RMISocketFactory defaultFactory; ! static private RMISocketFactory currentFactory; ! static private RMIFailureHandler currentHandler; ! ! static { ! defaultFactory = new RMIDefaultSocketFactory(); ! currentFactory = defaultFactory; ! } ! public RMISocketFactory() { ! } ! public abstract Socket createSocket(String host, int port) throws IOException; ! public abstract ServerSocket createServerSocket(int port) throws IOException; ! public static void setSocketFactory(RMISocketFactory fac) throws IOException { ! currentFactory = fac; ! } ! public static RMISocketFactory getSocketFactory() { ! return (currentFactory); ! } ! public static RMISocketFactory getDefaultSocketFactory() { ! return (defaultFactory); ! } ! public static void setFailureHandler(RMIFailureHandler fh) { ! currentHandler = fh; ! } ! public static RMIFailureHandler getFailureHandler() { ! return (currentHandler); ! } } --- 43,106 ---- import gnu.java.rmi.server.RMIDefaultSocketFactory; public abstract class RMISocketFactory ! implements RMIClientSocketFactory, RMIServerSocketFactory ! { ! static private RMISocketFactory defaultFactory; ! static private RMISocketFactory currentFactory; ! static private RMIFailureHandler currentHandler; ! static ! { ! defaultFactory = new RMIDefaultSocketFactory(); ! currentFactory = defaultFactory; ! } ! public RMISocketFactory () ! { ! } ! /** ! * @exception IOException If an error occurs ! */ ! public abstract Socket createSocket (String host, int port) ! throws IOException; ! /** ! * @exception IOException If an error occurs ! */ ! public abstract ServerSocket createServerSocket (int port) ! throws IOException; ! /** ! * @exception IOException If an error occurs ! * @exception SecurityException FIXME ! */ ! public static void setSocketFactory (RMISocketFactory fac) ! throws IOException ! { ! currentFactory = fac; ! } ! public static RMISocketFactory getSocketFactory () ! { ! return currentFactory; ! } ! public static RMISocketFactory getDefaultSocketFactory () ! { ! return defaultFactory; ! } ! /** ! * @exception SecurityException FIXME ! */ ! public static void setFailureHandler (RMIFailureHandler fh) ! { ! currentHandler = fh; ! } + public static RMIFailureHandler getFailureHandler () + { + return currentHandler; + } } diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/server/ServerRef.java gcc-3.4.0/libjava/java/rmi/server/ServerRef.java *** gcc-3.3.3/libjava/java/rmi/server/ServerRef.java 2002-01-22 22:40:29.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/server/ServerRef.java 2003-10-11 18:42:07.000000000 +0000 *************** exception statement from your version. * *** 37,53 **** package java.rmi.server; - import java.rmi.server.RemoteStub; import java.rmi.Remote; import java.rmi.RemoteException; import java.rmi.server.ServerNotActiveException; ! public interface ServerRef ! extends RemoteRef { ! ! public static final long serialVersionUID = 0; ! public RemoteStub exportObject(Remote obj, Object data) throws RemoteException; ! public String getClientHost() throws ServerNotActiveException; } --- 37,52 ---- package java.rmi.server; import java.rmi.Remote; import java.rmi.RemoteException; + import java.rmi.server.RemoteStub; import java.rmi.server.ServerNotActiveException; ! public interface ServerRef extends RemoteRef ! { ! long serialVersionUID = 0; ! RemoteStub exportObject(Remote obj, Object data) throws RemoteException; + String getClientHost() throws ServerNotActiveException; } diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/server/Skeleton.java gcc-3.4.0/libjava/java/rmi/server/Skeleton.java *** gcc-3.3.3/libjava/java/rmi/server/Skeleton.java 2002-01-22 22:40:29.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/server/Skeleton.java 2003-10-11 18:42:07.000000000 +0000 *************** exception statement from your version. * *** 38,49 **** package java.rmi.server; import java.rmi.Remote; - import java.lang.Exception; import java.rmi.server.RemoteCall; ! public interface Skeleton { ! ! public void dispatch(Remote obj, RemoteCall theCall, int opnum, long hash) throws Exception; ! public Operation[] getOperations(); } --- 38,58 ---- package java.rmi.server; import java.rmi.Remote; import java.rmi.server.RemoteCall; ! /** ! * @deprecated ! */ ! public interface Skeleton ! { ! /** ! * @deprecated ! */ ! void dispatch (Remote obj, RemoteCall theCall, int opnum, long hash) ! throws Exception; + /** + * @deprecated + */ + Operation[] getOperations(); } diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/server/SkeletonNotFoundException.java gcc-3.4.0/libjava/java/rmi/server/SkeletonNotFoundException.java *** gcc-3.3.3/libjava/java/rmi/server/SkeletonNotFoundException.java 2002-06-17 19:11:40.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/server/SkeletonNotFoundException.java 2003-06-27 15:58:42.000000000 +0000 *************** this exception to your version of the li *** 35,40 **** --- 35,41 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package java.rmi.server; import java.rmi.RemoteException; *************** public class SkeletonNotFoundException e *** 59,65 **** * Create an exception with the specified message. * * @param s the message - * @deprecated no longer needed */ public SkeletonNotFoundException(String s) { --- 60,65 ---- *************** public class SkeletonNotFoundException e *** 71,77 **** * * @param s the message * @param e the cause - * @deprecated no longer needed */ public SkeletonNotFoundException(String s, Exception e) { --- 71,76 ---- diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/server/UnicastRemoteObject.java gcc-3.4.0/libjava/java/rmi/server/UnicastRemoteObject.java *** gcc-3.3.3/libjava/java/rmi/server/UnicastRemoteObject.java 2003-01-03 22:56:56.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/server/UnicastRemoteObject.java 2003-06-27 15:58:42.000000000 +0000 *************** this exception to your version of the li *** 35,40 **** --- 35,41 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package java.rmi.server; import java.rmi.RemoteException; *************** public static RemoteStub exportObject(Re *** 89,95 **** return exportObject(obj, port, null); } ! protected static Remote exportObject(Remote obj, int port, RMIServerSocketFactory ssf) throws RemoteException { UnicastServerRef sref = null; --- 90,96 ---- return exportObject(obj, port, null); } ! static Remote exportObject(Remote obj, int port, RMIServerSocketFactory ssf) throws RemoteException { UnicastServerRef sref = null; *************** public static RemoteStub exportObject(Re *** 103,109 **** } /** ! * FIX ME */ public static Remote exportObject(Remote obj, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) --- 104,110 ---- } /** ! * FIXME */ public static Remote exportObject(Remote obj, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) diff -Nrc3pad gcc-3.3.3/libjava/java/rmi/server/Unreferenced.java gcc-3.4.0/libjava/java/rmi/server/Unreferenced.java *** gcc-3.3.3/libjava/java/rmi/server/Unreferenced.java 2002-01-22 22:40:29.000000000 +0000 --- gcc-3.4.0/libjava/java/rmi/server/Unreferenced.java 2003-10-11 18:42:07.000000000 +0000 *************** exception statement from your version. * *** 37,44 **** package java.rmi.server; ! public interface Unreferenced { ! ! public void unreferenced(); ! } --- 37,43 ---- package java.rmi.server; ! public interface Unreferenced ! { ! void unreferenced(); } diff -Nrc3pad gcc-3.3.3/libjava/java/security/acl/AclEntry.java gcc-3.4.0/libjava/java/security/acl/AclEntry.java *** gcc-3.3.3/libjava/java/security/acl/AclEntry.java 2002-01-22 22:40:32.000000000 +0000 --- gcc-3.4.0/libjava/java/security/acl/AclEntry.java 2003-10-11 19:00:05.000000000 +0000 *************** public interface AclEntry extends Clonea *** 63,69 **** * * @return The Principal for this ACL entry */ ! public abstract Principal getPrincipal(); /** * This method sets ths Principal associated with this --- 63,69 ---- * * @return The Principal for this ACL entry */ ! Principal getPrincipal(); /** * This method sets ths Principal associated with this *************** public interface AclEntry extends Clonea *** 74,80 **** * * @return true if the Principal was successfully set or false if this entry already has a Principal. */ ! public abstract boolean setPrincipal(Principal user); /** * This method sets this ACL entry to be a negative entry, indicating --- 74,80 ---- * * @return true if the Principal was successfully set or false if this entry already has a Principal. */ ! boolean setPrincipal(Principal user); /** * This method sets this ACL entry to be a negative entry, indicating *************** public interface AclEntry extends Clonea *** 82,95 **** * to the entry's Principal. Note that there is no way to * undo this operation. */ ! public abstract void setNegativePermissions(); /** * This method tests whether or not this ACL entry is a negative entry or not. * * @return true if this ACL entry is negative, false otherwise */ ! public abstract boolean isNegative(); /** * This method adds the specified permission to this ACL entry. --- 82,95 ---- * to the entry's Principal. Note that there is no way to * undo this operation. */ ! void setNegativePermissions(); /** * This method tests whether or not this ACL entry is a negative entry or not. * * @return true if this ACL entry is negative, false otherwise */ ! boolean isNegative(); /** * This method adds the specified permission to this ACL entry. *************** public interface AclEntry extends Clonea *** 98,104 **** * * @return true if the permission was added or false if it was already set for this entry */ ! public abstract boolean addPermission(Permission permission); /** * This method deletes the specified permission to this ACL entry. --- 98,104 ---- * * @return true if the permission was added or false if it was already set for this entry */ ! boolean addPermission(Permission permission); /** * This method deletes the specified permission to this ACL entry. *************** public interface AclEntry extends Clonea *** 107,113 **** * * @return true if the permission was successfully deleted or false if the permission was not part of this ACL to begin with */ ! public abstract boolean removePermission(Permission perm); /** * This method tests whether or not the specified permission is associated --- 107,113 ---- * * @return true if the permission was successfully deleted or false if the permission was not part of this ACL to begin with */ ! boolean removePermission(Permission perm); /** * This method tests whether or not the specified permission is associated *************** public interface AclEntry extends Clonea *** 117,123 **** * * @return true if this permission is associated with this entry or false otherwise */ ! public abstract boolean checkPermission(Permission permission); /** * This method returns a list of all Permission objects --- 117,123 ---- * * @return true if this permission is associated with this entry or false otherwise */ ! boolean checkPermission(Permission permission); /** * This method returns a list of all Permission objects *************** public interface AclEntry extends Clonea *** 125,143 **** * * @return A list of permissions for this ACL entry */ ! public abstract Enumeration permissions(); /** * This method returns this object as a String. * * @return A String representation of this object */ ! public abstract String toString(); /** * This method returns a clone of this ACL entry * * @return A clone of this ACL entry */ ! public abstract Object clone(); } --- 125,143 ---- * * @return A list of permissions for this ACL entry */ ! Enumeration permissions(); /** * This method returns this object as a String. * * @return A String representation of this object */ ! String toString(); /** * This method returns a clone of this ACL entry * * @return A clone of this ACL entry */ ! Object clone(); } diff -Nrc3pad gcc-3.3.3/libjava/java/security/acl/Acl.java gcc-3.4.0/libjava/java/security/acl/Acl.java *** gcc-3.3.3/libjava/java/security/acl/Acl.java 2002-01-22 22:40:32.000000000 +0000 --- gcc-3.4.0/libjava/java/security/acl/Acl.java 2003-10-11 19:00:05.000000000 +0000 *************** import java.util.Enumeration; *** 52,58 **** * Principal belongs have an ACL entry, the permissions for * the individual Principal take precedence over the * permissions of the Group if there is a conflict. ! *

            Owner interface * and so an ACL has owners. Actions which modify the ACL are restricted * to owners. --- 52,58 ---- * Principal belongs have an ACL entry, the permissions for * the individual Principal take precedence over the * permissions of the Group if there is a conflict. ! *

            * Additionally, the ACL interface extends the Owner interface * and so an ACL has owners. Actions which modify the ACL are restricted * to owners. *************** public interface Acl extends Owner *** 69,75 **** * * @return The name of this ACL */ ! public abstract String getName(); /** * This method sets the name of the ACL --- 69,75 ---- * * @return The name of this ACL */ ! String getName(); /** * This method sets the name of the ACL *************** public interface Acl extends Owner *** 79,85 **** * * @exception NotOwnerException If the caller is not an owner of this ACL. */ ! public abstract void setName(Principal caller, String name) throws NotOwnerException; /** --- 79,85 ---- * * @exception NotOwnerException If the caller is not an owner of this ACL. */ ! void setName(Principal caller, String name) throws NotOwnerException; /** *************** public interface Acl extends Owner *** 88,98 **** * @param caller The Principal requesting the addition * @param entry The ACL entry to add * ! * @return true if the entry was added, false if there is already an entry of the same type for the Principal. * * @exception NotOwnerException If the caller is not an owner of this ACL. */ ! public abstract boolean addEntry(Principal caller, AclEntry entry) throws NotOwnerException; /** --- 88,100 ---- * @param caller The Principal requesting the addition * @param entry The ACL entry to add * ! * @return true if the entry was added, false ! * if there is already an entry of the same type for the ! * Principal. * * @exception NotOwnerException If the caller is not an owner of this ACL. */ ! boolean addEntry(Principal caller, AclEntry entry) throws NotOwnerException; /** *************** public interface Acl extends Owner *** 101,111 **** * @param caller The Principal requesting the deletion. * @param entry The ACL entry to delete * ! * @return true if the entry was deleted, or false if this entry was not part of the ACL to begin with * * @exception NotOwnerException If the caller is not an owner of this ACL. */ ! public abstract boolean removeEntry(Principal caller, AclEntry entry) throws NotOwnerException; /** --- 103,114 ---- * @param caller The Principal requesting the deletion. * @param entry The ACL entry to delete * ! * @return true if the entry was deleted, or false ! * if this entry was not part of the ACL to begin with * * @exception NotOwnerException If the caller is not an owner of this ACL. */ ! boolean removeEntry(Principal caller, AclEntry entry) throws NotOwnerException; /** *************** public interface Acl extends Owner *** 114,120 **** * * @return An enumeration of the ACL entries */ ! public abstract Enumeration entries(); /** * This method tests whether or not the specified Principal --- 117,123 ---- * * @return An enumeration of the ACL entries */ ! Enumeration entries(); /** * This method tests whether or not the specified Principal *************** public interface Acl extends Owner *** 123,131 **** * @param user The Principal to test * @param perm The Permission to test for * ! * @return true if the user has been granted the permission, false otherwise */ ! public abstract boolean checkPermission(Principal user, Permission perm); /** * This method returns a list of Permission's that are granted --- 126,135 ---- * @param user The Principal to test * @param perm The Permission to test for * ! * @return true if the user has been granted the permission, ! * false otherwise */ ! boolean checkPermission(Principal user, Permission perm); /** * This method returns a list of Permission's that are granted *************** public interface Acl extends Owner *** 138,149 **** * * @return A list of permissions for the Principal. */ ! public abstract Enumeration getPermissions(Principal user); /** * This method returns the ACL as a String * * @return A String representation of this ACL */ ! public abstract String toString(); } --- 142,153 ---- * * @return A list of permissions for the Principal. */ ! Enumeration getPermissions(Principal user); /** * This method returns the ACL as a String * * @return A String representation of this ACL */ ! String toString(); } diff -Nrc3pad gcc-3.3.3/libjava/java/security/acl/Group.java gcc-3.4.0/libjava/java/security/acl/Group.java *** gcc-3.3.3/libjava/java/security/acl/Group.java 2002-01-22 22:40:32.000000000 +0000 --- gcc-3.4.0/libjava/java/security/acl/Group.java 2003-10-11 19:00:05.000000000 +0000 *************** public interface Group extends Principal *** 59,65 **** * * @return true if the user was successfully added or false if the user is already a member */ ! public abstract boolean addMember(Principal user); /** * This method deletes a member from the group. --- 59,65 ---- * * @return true if the user was successfully added or false if the user is already a member */ ! boolean addMember(Principal user); /** * This method deletes a member from the group. *************** public interface Group extends Principal *** 68,74 **** * * @return true if the user was successfully deleted or false if the user is not a member of the group */ ! public abstract boolean removeMember(Principal user); /** * This method tests whether or not a given Principal is a --- 68,74 ---- * * @return true if the user was successfully deleted or false if the user is not a member of the group */ ! boolean removeMember(Principal user); /** * This method tests whether or not a given Principal is a *************** public interface Group extends Principal *** 78,84 **** * * @return true if the user is member, false otherwise */ ! public abstract boolean isMember(Principal member); /** * This method returns a list of all members of the group as an --- 78,84 ---- * * @return true if the user is member, false otherwise */ ! boolean isMember(Principal member); /** * This method returns a list of all members of the group as an *************** public interface Group extends Principal *** 86,90 **** * * @return The list of all members of the group */ ! public abstract Enumeration members(); } --- 86,90 ---- * * @return The list of all members of the group */ ! Enumeration members(); } diff -Nrc3pad gcc-3.3.3/libjava/java/security/acl/Owner.java gcc-3.4.0/libjava/java/security/acl/Owner.java *** gcc-3.3.3/libjava/java/security/acl/Owner.java 2002-01-22 22:40:32.000000000 +0000 --- gcc-3.4.0/libjava/java/security/acl/Owner.java 2003-10-11 19:00:05.000000000 +0000 *************** public interface Owner *** 64,70 **** * * @exception NotOwnerException If the caller is not already an owner of this ACL */ ! public abstract boolean addOwner(Principal caller, Principal owner) throws NotOwnerException; /** --- 64,70 ---- * * @exception NotOwnerException If the caller is not already an owner of this ACL */ ! boolean addOwner(Principal caller, Principal owner) throws NotOwnerException; /** *************** public interface Owner *** 82,88 **** * @exception NotOwnerException If the caller is not already an owner of this ACL * @exception LastOwnerException If completing the operation would delete the last ACL owner */ ! public abstract boolean deleteOwner(Principal caller, Principal owner) throws NotOwnerException, LastOwnerException; /** --- 82,88 ---- * @exception NotOwnerException If the caller is not already an owner of this ACL * @exception LastOwnerException If completing the operation would delete the last ACL owner */ ! boolean deleteOwner(Principal caller, Principal owner) throws NotOwnerException, LastOwnerException; /** *************** public interface Owner *** 91,95 **** * * @return true if the Principal is an owner, false otherwise */ ! public abstract boolean isOwner(Principal owner); } --- 91,95 ---- * * @return true if the Principal is an owner, false otherwise */ ! boolean isOwner(Principal owner); } diff -Nrc3pad gcc-3.3.3/libjava/java/security/acl/Permission.java gcc-3.4.0/libjava/java/security/acl/Permission.java *** gcc-3.3.3/libjava/java/security/acl/Permission.java 2002-01-22 22:40:32.000000000 +0000 --- gcc-3.4.0/libjava/java/security/acl/Permission.java 2003-10-11 19:00:05.000000000 +0000 *************** public interface Permission *** 56,67 **** * * @return true if the specified permission is the same as this one, false otherwise */ ! public abstract boolean equals(Object perm); /** * This method returns this Permission as a String. * * @return A String representing this permission. */ ! public String toString(); } --- 56,67 ---- * * @return true if the specified permission is the same as this one, false otherwise */ ! boolean equals (Object perm); /** * This method returns this Permission as a String. * * @return A String representing this permission. */ ! String toString(); } diff -Nrc3pad gcc-3.3.3/libjava/java/security/AlgorithmParameterGenerator.java gcc-3.4.0/libjava/java/security/AlgorithmParameterGenerator.java *** gcc-3.3.3/libjava/java/security/AlgorithmParameterGenerator.java 2002-01-22 22:40:30.000000000 +0000 --- gcc-3.4.0/libjava/java/security/AlgorithmParameterGenerator.java 2003-04-30 07:23:41.000000000 +0000 *************** *** 1,5 **** /* AlgorithmParameterGenerator.java --- Algorithm Parameter Generator ! Copyright (C) 1999 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* AlgorithmParameterGenerator.java --- Algorithm Parameter Generator ! Copyright (C) 1999, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** obligated to do so. If you do not wish *** 36,64 **** exception statement from your version. */ package java.security; import java.security.spec.AlgorithmParameterSpec; ! /** ! AlgorithmParameterGenerator is used to generate ! algorithm parameters for specified algorithms. ! This class is used to generate the algorithm parameters ! for a specific algorithm. ! @since JDK 1.2 ! @author Mark Benvenuto */ public class AlgorithmParameterGenerator { private AlgorithmParameterGeneratorSpi paramGenSpi; private Provider provider; private String algorithm; /** ! Creates an instance of AlgorithmParameters ! ! @param paramSpi A parameters engine to use ! @param provider A provider to use ! @param algorithm The algorithm */ protected AlgorithmParameterGenerator(AlgorithmParameterGeneratorSpi paramGenSpi, Provider provider, --- 36,101 ---- exception statement from your version. */ package java.security; + import java.security.spec.AlgorithmParameterSpec; ! import gnu.java.security.Engine; ! /** ! *

            The AlgorithmParameterGenerator class is used to generate a ! * set of parameters to be used with a certain algorithm. Parameter generators ! * are constructed using the getInstance() factory methods (static ! * methods that return instances of a given class).

            ! * ! *

            The object that will generate the parameters can be initialized in two ! * different ways: in an algorithm-independent manner, or in an ! * algorithm-specific manner:

            ! * ! *
              ! *
            • The algorithm-independent approach uses the fact that all parameter ! * generators share the concept of a "size" and a source of ! * randomness. The measure of size is universally shared by all ! * algorithm parameters, though it is interpreted differently for different ! * algorithms. For example, in the case of parameters for the DSA ! * algorithm, "size" corresponds to the size of the prime modulus (in ! * bits). When using this approach, algorithm-specific parameter generation ! * values - if any - default to some standard values, unless they can be ! * derived from the specified size.
            • ! *
            • The other approach initializes a parameter generator object using ! * algorithm-specific semantics, which are represented by a set of ! * algorithm-specific parameter generation values. To generate Diffie-Hellman ! * system parameters, for example, the parameter generation values usually ! * consist of the size of the prime modulus and the size of the random ! * exponent, both specified in number of bits.
            • ! *
                ! * ! *

                In case the client does not explicitly initialize the ! * AlgorithmParameterGenerator (via a call to an init() ! * method), each provider must supply (and document) a default initialization. ! * For example, the GNU provider uses a default modulus prime size of ! * 1024 bits for the generation of DSA parameters. ! * ! * @author Mark Benvenuto ! * @since 1.2 ! * @see AlgorithmParameters ! * @see AlgorithmParameterSpec */ public class AlgorithmParameterGenerator { + /** Service name for algorithm parameter generators. */ + private static final String ALGORITHM_PARAMETER_GENERATOR = + "AlgorithmParameterGenerator"; + private AlgorithmParameterGeneratorSpi paramGenSpi; private Provider provider; private String algorithm; /** ! * Creates an AlgorithmParameterGenerator object. ! * ! * @param paramGenSpi the delegate. ! * @param provider the provider. ! * @param algorithm the algorithm. */ protected AlgorithmParameterGenerator(AlgorithmParameterGeneratorSpi paramGenSpi, Provider provider, *************** public class AlgorithmParameterGenerator *** 70,166 **** } /** ! Returns the name of the algorithm used ! ! @return A string with the name of the algorithm */ public final String getAlgorithm() { return algorithm; } ! /** ! Gets an instance of the AlgorithmParameterGenerator class ! which generates algorithm parameters for the specified algorithm. ! If the algorithm is not found then, it throws NoSuchAlgorithmException. ! ! @param algorithm the name of algorithm to choose ! @return a AlgorithmParameterGenerator repesenting the desired algorithm ! ! @throws NoSuchAlgorithmException if the algorithm is not implemented by providers */ public static AlgorithmParameterGenerator getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] p = Security.getProviders(); - for (int i = 0; i < p.length; i++) ! { ! String classname = ! p[i].getProperty("AlgorithmParameterGenerator." + algorithm); ! if (classname != null) ! return getInstance(classname, algorithm, p[i]); ! } throw new NoSuchAlgorithmException(algorithm); } ! /** ! Gets an instance of the AlgorithmParameterGenerator class ! which generates algorithm parameters for the specified algorithm. ! If the algorithm is not found then, it throws NoSuchAlgorithmException. ! ! @param algorithm the name of algorithm to choose ! @param provider the name of the provider to find the algorithm in ! @return a AlgorithmParameterGenerator repesenting the desired algorithm ! ! @throws NoSuchAlgorithmException if the algorithm is not implemented by the provider ! @throws NoSuchProviderException if the provider is not found */ public static AlgorithmParameterGenerator getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException { Provider p = Security.getProvider(provider); if (p == null) throw new NoSuchProviderException(); ! return getInstance(p. ! getProperty("AlgorithmParameterGenerator." + ! algorithm), algorithm, p); } ! private static AlgorithmParameterGenerator getInstance(String classname, ! String algorithm, ! Provider provider) throws NoSuchAlgorithmException { try { ! return new ! AlgorithmParameterGenerator((AlgorithmParameterGeneratorSpi) Class. ! forName(classname).newInstance(), ! provider, algorithm); ! } ! catch (ClassNotFoundException cnfe) ! { ! throw new NoSuchAlgorithmException("Class not found"); } ! catch (InstantiationException ie) { ! throw new NoSuchAlgorithmException("Class instantiation failed"); } ! catch (IllegalAccessException iae) { ! throw new NoSuchAlgorithmException("Illegal Access"); } } /** ! Gets the provider that the class is from. ! ! @return the provider of this class */ public final Provider getProvider() { --- 107,223 ---- } /** ! * Returns the standard name of the algorithm this parameter generator is ! * associated with. ! * ! * @return the string name of the algorithm. */ public final String getAlgorithm() { return algorithm; } ! /** ! * Generates an AlgorithmParameterGenerator object that ! * implements the specified digest algorithm. If the default provider package ! * provides an implementation of the requested digest algorithm, an instance ! * of AlgorithmParameterGenerator containing that implementation ! * is returned. If the algorithm is not available in the default package, ! * other packages are searched. ! * ! * @param algorithm the string name of the algorithm this parameter generator ! * is associated with. ! * @return the new AlgorithmParameterGenerator object. ! * @throws NoSuchAlgorithmException if the algorithm is not available in the ! * environment. */ public static AlgorithmParameterGenerator getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] p = Security.getProviders(); for (int i = 0; i < p.length; i++) ! try ! { ! return getInstance(algorithm, p[i]); ! } ! catch (NoSuchAlgorithmException ignored) {} throw new NoSuchAlgorithmException(algorithm); } ! /** ! * Generates an AlgorithmParameterGenerator object for the ! * requested algorithm, as supplied from the specified provider, if such a ! * parameter generator is available from the provider. ! * ! * @param algorithm the string name of the algorithm. ! * @param provider the string name of the provider. ! * @return the new AlgorithmParameterGenerator object. ! * @throws NoSuchAlgorithmException if the algorithm is not ! * available from the provider. ! * @throws NoSuchProviderException if the provider is not ! * available in the environment. ! * @throws IllegalArgumentException if the provider name is ! * null or empty. ! * @see Provider */ public static AlgorithmParameterGenerator getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException { + if (provider == null || provider.length() == 0) + throw new IllegalArgumentException("Illegal provider"); + Provider p = Security.getProvider(provider); if (p == null) throw new NoSuchProviderException(); ! return getInstance(algorithm, p); } ! /** ! * Generates an AlgorithmParameterGenerator object for the requested ! * algorithm, as supplied from the specified provider, if such a parameter ! * generator is available from the provider. Note: the provider ! * doesn't have to be registered. ! * ! * @param algorithm the string name of the algorithm. ! * @param provider the provider. ! * @return the new AlgorithmParameterGenerator object. ! * @throws NoSuchAlgorithmException if the algorithm is not available from ! * the provider. ! * @throws IllegalArgumentException if the provider is null. ! * @since 1.4 ! * @see Provider ! */ ! public static AlgorithmParameterGenerator getInstance(String algorithm, ! Provider provider) throws NoSuchAlgorithmException { + if (provider == null) + throw new IllegalArgumentException("Illegal provider"); try { ! return new AlgorithmParameterGenerator( ! (AlgorithmParameterGeneratorSpi) Engine.getInstance( ! ALGORITHM_PARAMETER_GENERATOR, algorithm, provider), ! provider, algorithm); } ! catch (java.lang.reflect.InvocationTargetException ite) { ! throw new NoSuchAlgorithmException(algorithm); } ! catch (ClassCastException cce) { ! throw new NoSuchAlgorithmException(algorithm); } } /** ! * Returns the provider of this algorithm parameter generator object. ! * ! * @return the provider of this algorithm parameter generator object. */ public final Provider getProvider() { *************** public class AlgorithmParameterGenerator *** 168,178 **** } /** ! Initializes the Algorithm Parameter Generator with the specified ! size. (Since no source of randomness is supplied, a default ! one is supplied). ! ! @param size size (in bits) to use */ public final void init(int size) { --- 225,237 ---- } /** ! * Initializes this parameter generator for a certain size. To create ! * the parameters, the {@link SecureRandom} implementation of the ! * highest-priority installed provider is used as the source of randomness. ! * (If none of the installed providers supply an implementation of ! * {@link SecureRandom}, a system-provided source of randomness is used.) ! * ! * @param size the size (number of bits). */ public final void init(int size) { *************** public class AlgorithmParameterGenerator *** 180,190 **** } /** ! Initializes the Algorithm Parameter Generator with the specified ! size and source of randomness. ! ! @param size size (in bits) to use ! @param random source of randomness to use */ public final void init(int size, SecureRandom random) { --- 239,249 ---- } /** ! * Initializes this parameter generator for a certain size and source of ! * randomness. ! * ! * @param size the size (number of bits). ! * @param random the source of randomness. */ public final void init(int size, SecureRandom random) { *************** public class AlgorithmParameterGenerator *** 192,227 **** } /** ! Initializes the Algorithm Parameter Generator with the specified ! AlgorithmParameterSpec. (Since no source of randomness is supplied, ! a default one is supplied). ! ! @param genParamSpec the AlgorithmParameterSpec class to use */ ! public final void init(AlgorithmParameterSpec genParamSpec) throws ! InvalidAlgorithmParameterException { init(genParamSpec, new SecureRandom()); } /** ! Initializes the Algorithm Parameter Generator with the specified ! AlgorithmParameterSpec and source of randomness. ! ! @param genParamSpec the AlgorithmParameterSpec class to use ! @param random source of randomness to use */ public final void init(AlgorithmParameterSpec genParamSpec, ! SecureRandom random) throws ! InvalidAlgorithmParameterException { paramGenSpi.engineInit(genParamSpec, random); } /** ! Generate a new set of AlgorithmParameters. ! ! @returns a new set of algorithm parameters */ public final AlgorithmParameters generateParameters() { --- 251,295 ---- } /** ! * Initializes this parameter generator with a set of algorithm-specific ! * parameter generation values. To generate the parameters, the {@link ! * SecureRandom} implementation of the highest-priority installed provider is ! * used as the source of randomness. (If none of the installed providers ! * supply an implementation of {@link SecureRandom}, a system-provided source ! * of randomness is used.) ! * ! * @param genParamSpec the set of algorithm-specific parameter generation ! * values. ! * @throws InvalidAlgorithmParameterException if the given parameter ! * generation values are inappropriate for this parameter generator. */ ! public final void init(AlgorithmParameterSpec genParamSpec) ! throws InvalidAlgorithmParameterException { init(genParamSpec, new SecureRandom()); } /** ! * Initializes this parameter generator with a set of algorithm-specific ! * parameter generation values. ! * ! * @param genParamSpec the set of algorithm-specific parameter generation ! * values. ! * @param random the source of randomness. ! * @throws InvalidAlgorithmParameterException if the given parameter ! * generation values are inappropriate for this parameter generator. */ public final void init(AlgorithmParameterSpec genParamSpec, ! SecureRandom random) ! throws InvalidAlgorithmParameterException { paramGenSpi.engineInit(genParamSpec, random); } /** ! * Generates the parameters. ! * ! * @return the new {@link AlgorithmParameters} object. */ public final AlgorithmParameters generateParameters() { diff -Nrc3pad gcc-3.3.3/libjava/java/security/AlgorithmParameters.java gcc-3.4.0/libjava/java/security/AlgorithmParameters.java *** gcc-3.3.3/libjava/java/security/AlgorithmParameters.java 2002-01-22 22:40:30.000000000 +0000 --- gcc-3.4.0/libjava/java/security/AlgorithmParameters.java 2003-04-30 07:23:41.000000000 +0000 *************** *** 1,5 **** /* AlgorithmParameters.java --- Algorithm Parameters Implementation Class ! Copyright (C) 1999 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* AlgorithmParameters.java --- Algorithm Parameters Implementation Class ! Copyright (C) 1999, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,69 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package java.security; import java.security.spec.InvalidParameterSpecException; import java.security.spec.AlgorithmParameterSpec; import java.io.IOException; ! /** ! AlgorithmParameters is the Algorithm Parameters class which ! provides an interface through which to modify parameters for ! classes. This class is used to manage the algorithm parameters. ! @since JDK 1.2 ! @author Mark Benvenuto */ public class AlgorithmParameters { private AlgorithmParametersSpi paramSpi; private Provider provider; private String algorithm; /** ! Creates an instance of AlgorithmParameters ! ! @param paramSpi A parameters engine to use ! @param provider A provider to use ! @param algorithm The algorithm */ protected AlgorithmParameters(AlgorithmParametersSpi paramSpi, ! Provider provider, String algorithm) { this.paramSpi = paramSpi; this.provider = provider; --- 35,104 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.security; + import java.security.spec.InvalidParameterSpecException; import java.security.spec.AlgorithmParameterSpec; import java.io.IOException; ! import gnu.java.security.Engine; ! /** ! *

                This class is used as an opaque representation of cryptographic ! * parameters.

                ! * ! *

                An AlgorithmParameters object for managing the parameters ! * for a particular algorithm can be obtained by calling one of the ! * getInstance() factory methods (static methods that return ! * instances of a given class).

                ! * ! *

                There are two ways to request such an implementation: by specifying ! * either just an algorithm name, or both an algorithm name and a package ! * provider.

                ! * ! *
                  ! *
                • If just an algorithm name is specified, the system will determine if ! * there is an AlgorithmParameters implementation for the algorithm requested ! * available in the environment, and if there is more than one, if there is ! * a preferred one.
                • ! *
                • If both an algorithm name and a package provider are specified, the ! * system will determine if there is an implementation in the package ! * requested, and throw an exception if there is not.
                • ! *
                ! * ! *

                Once an AlgorithmParameters object is returned, it must be ! * initialized via a call to init(), using an appropriate ! * parameter specification or parameter encoding.

                ! * ! *

                A transparent parameter specification is obtained from an ! * AlgorithmParameters object via a call to ! * getParameterSpec(), and a byte encoding of the parameters is ! * obtained via a call to getEncoded().

                ! * ! * @author Mark Benvenuto ! * @since 1.2 ! * @see AlgorithmParameterSpec ! * @see java.security.spec.DSAParameterSpec ! * @see KeyPairGenerator */ public class AlgorithmParameters { + /** Service name for algorithm parameters. */ + private static final String ALGORITHM_PARAMETERS = "AlgorithmParameters"; + private AlgorithmParametersSpi paramSpi; private Provider provider; private String algorithm; /** ! * Creates an AlgorithmParameters object. ! * ! * @param paramSpi the delegate. ! * @param provider the provider. ! * @param algorithm the algorithm. */ protected AlgorithmParameters(AlgorithmParametersSpi paramSpi, ! Provider provider, String algorithm) { this.paramSpi = paramSpi; this.provider = provider; *************** public class AlgorithmParameters *** 71,173 **** } /** ! Returns the name of the algorithm used ! ! @return A string with the name of the algorithm */ public final String getAlgorithm() { return algorithm; } ! /** ! Gets an instance of the AlgorithmParameters class representing ! the specified algorithm parameters. If the algorithm is not ! found then, it throws NoSuchAlgorithmException. ! ! The returned AlgorithmParameters must still be intialized with ! init(). ! ! @param algorithm the name of algorithm to choose ! @return a AlgorithmParameters repesenting the desired algorithm ! ! @throws NoSuchAlgorithmException if the algorithm is not implemented by providers */ ! public static AlgorithmParameters getInstance(String algorithm) throws ! NoSuchAlgorithmException { Provider[] p = Security.getProviders(); - for (int i = 0; i < p.length; i++) ! { ! String classname = ! p[i].getProperty("AlgorithmParameters." + algorithm); ! if (classname != null) ! return getInstance(classname, algorithm, p[i]); ! } throw new NoSuchAlgorithmException(algorithm); } ! /** ! Gets an instance of the AlgorithmParameters class representing ! the specified algorithm parameters from the specified provider. ! If the algorithm is not found then, it throws ! NoSuchAlgorithmException. If the provider is not found, then ! it throws NoSuchProviderException. ! ! The returned AlgorithmParameters must still be intialized with ! init(). ! ! @param algorithm the name of algorithm to choose ! @param provider the name of the provider to find the algorithm in ! @return a AlgorithmParameters repesenting the desired algorithm ! ! @throws NoSuchAlgorithmException if the algorithm is not implemented by the provider ! @throws NoSuchProviderException if the provider is not found */ ! public static AlgorithmParameters getInstance(String algorithm, ! String provider) throws ! NoSuchAlgorithmException, NoSuchProviderException { Provider p = Security.getProvider(provider); if (p == null) throw new NoSuchProviderException(); ! return getInstance(p.getProperty("AlgorithmParameters." + algorithm), ! algorithm, p); } ! private static AlgorithmParameters getInstance(String classname, ! String algorithm, ! Provider provider) throws NoSuchAlgorithmException { try { ! return new AlgorithmParameters((AlgorithmParametersSpi) Class. ! forName(classname).newInstance(), ! provider, algorithm); ! } ! catch (ClassNotFoundException cnfe) ! { ! throw new NoSuchAlgorithmException("Class not found"); } ! catch (InstantiationException ie) { ! throw new NoSuchAlgorithmException("Class instantiation failed"); } ! catch (IllegalAccessException iae) { ! throw new NoSuchAlgorithmException("Illegal Access"); } } /** ! Gets the provider that the class is from. ! ! @return the provider of this class */ public final Provider getProvider() { --- 106,225 ---- } /** ! * Returns the name of the algorithm associated with this parameter object. ! * ! * @return the algorithm name. */ public final String getAlgorithm() { return algorithm; } ! /** ! *

                Generates a parameter object for the specified algorithm.

                ! * ! *

                If the default provider package provides an implementation of the ! * requested algorithm, an instance of AlgorithmParameters ! * containing that implementation is returned. If the algorithm is not ! * available in the default package, other packages are searched.

                ! * ! *

                The returned parameter object must be initialized via a call to ! * init(), using an appropriate parameter specification or ! * parameter encoding.

                ! * ! * @param algorithm the name of the algorithm requested. ! * @return the new parameter object. ! * @throws NoSuchAlgorithmException if the algorithm is not available in the ! * environment. */ ! public static AlgorithmParameters getInstance(String algorithm) ! throws NoSuchAlgorithmException { Provider[] p = Security.getProviders(); for (int i = 0; i < p.length; i++) ! try ! { ! return getInstance(algorithm, p[i]); ! } ! catch (NoSuchAlgorithmException ignored) {} throw new NoSuchAlgorithmException(algorithm); } ! /** ! *

                Generates a parameter object for the specified algorithm, as supplied ! * by the specified provider, if such an algorithm is available from the ! * provider.

                ! * ! *

                The returned parameter object must be initialized via a call to ! * init(), using an appropriate parameter specification or ! * parameter encoding.

                ! * ! * @param algorithm the name of the algorithm requested. ! * @param provider the name of the provider. ! * @return the new parameter object. ! * @throws NoSuchAlgorithmException if the algorithm is not available in the ! * package supplied by the requested provider. ! * @throws NoSuchProviderException if the provider is not available in the ! * environment. ! * @throws IllegalArgumentException if the provider name is null or empty. ! * @see Provider */ ! public static AlgorithmParameters getInstance(String algorithm, String provider) ! throws NoSuchAlgorithmException, NoSuchProviderException { + if (provider == null || provider.length() == 0) + throw new IllegalArgumentException("Illegal provider"); + Provider p = Security.getProvider(provider); if (p == null) throw new NoSuchProviderException(); ! return getInstance(algorithm, p); } ! /** ! * Generates an AlgorithmParameterGenerator object for the ! * requested algorithm, as supplied from the specified provider, if such a ! * parameter generator is available from the provider. Note: the ! * provider doesn't have to be registered. ! * ! * @param algorithm the string name of the algorithm. ! * @param provider the provider. ! * @return the new AlgorithmParameterGenerator object. ! * @throws NoSuchAlgorithmException if the algorithm is not ! * available from the provider. ! * @throws IllegalArgumentException if the provider is ! * null. ! * @since 1.4 ! */ ! public static AlgorithmParameters getInstance(String algorithm, ! Provider provider) throws NoSuchAlgorithmException { + if (provider == null) + throw new IllegalArgumentException("Illegal provider"); try { ! return new AlgorithmParameters((AlgorithmParametersSpi) ! Engine.getInstance(ALGORITHM_PARAMETERS, algorithm, provider), ! provider, algorithm); } ! catch (java.lang.reflect.InvocationTargetException ite) { ! throw new NoSuchAlgorithmException(algorithm); } ! catch (ClassCastException cce) { ! throw new NoSuchAlgorithmException(algorithm); } } /** ! * Returns the provider of this parameter object. ! * ! * @return the provider of this parameter object. */ public final Provider getProvider() { *************** public class AlgorithmParameters *** 175,203 **** } /** ! Initializes the engine with the specified ! AlgorithmParameterSpec class. ! ! @param paramSpec A AlgorithmParameterSpec to initialize with ! ! @throws InvalidParameterSpecException For an inapporiate ParameterSpec class */ ! public final void init(AlgorithmParameterSpec paramSpec) throws ! InvalidParameterSpecException { paramSpi.engineInit(paramSpec); } /** ! Initializes the engine with the specified ! parameters stored in the byte array and decodes them ! according to the ASN.1 specification. If the ASN.1 ! specification exists then it succeeds or else it throws ! IOException. ! ! @param params Parameters to initialize with ! ! @throws IOException Decoding Error */ public final void init(byte[]params) throws IOException { --- 227,254 ---- } /** ! * Initializes this parameter object using the parameters specified in ! * paramSpec. ! * ! * @param paramSpec the parameter specification. ! * @throws InvalidParameterSpecException if the given parameter specification ! * is inappropriate for the initialization of this parameter object, or if ! * this parameter object has already been initialized. */ ! public final void init(AlgorithmParameterSpec paramSpec) ! throws InvalidParameterSpecException { paramSpi.engineInit(paramSpec); } /** ! * Imports the specified parameters and decodes them according to the primary ! * decoding format for parameters. The primary decoding format for parameters ! * is ASN.1, if an ASN.1 specification for this type of parameters exists. ! * ! * @param params the encoded parameters. ! * @throws IOException on decoding errors, or if this parameter object has ! * already been initialized. */ public final void init(byte[]params) throws IOException { *************** public class AlgorithmParameters *** 205,221 **** } /** ! Initializes the engine with the specified ! parameters stored in the byte array and decodes them ! according to the specified decoding specification. ! If format is null, then it is decoded using the ASN.1 ! specification if it exists or else it throws ! IOException. ! ! @param params Parameters to initialize with ! @param format Name of decoding format to use ! ! @throws IOException Decoding Error */ public final void init(byte[]params, String format) throws IOException { --- 256,270 ---- } /** ! * Imports the parameters from params and decodes them according to the ! * specified decoding scheme. If format is null, ! * the primary decoding format for parameters is used. The primary decoding ! * format is ASN.1, if an ASN.1 specification for these parameters exists. ! * ! * @param params the encoded parameters. ! * @param format the name of the decoding scheme. ! * @throws IOException on decoding errors, or if this parameter object has ! * already been initialized. */ public final void init(byte[]params, String format) throws IOException { *************** public class AlgorithmParameters *** 223,250 **** } /** ! Returns a specification of this AlgorithmParameters object. ! paramSpec identifies the class to return the AlgortihmParameters ! in. ! ! @param paramSpec Class to return AlgorithmParameters in ! ! @return the parameter specification ! ! @throws InvalidParameterSpecException if the paramSpec is an invalid parameter class */ ! public final AlgorithmParameterSpec getParameterSpec(Class paramSpec) throws ! InvalidParameterSpecException { return paramSpi.engineGetParameterSpec(paramSpec); } /** ! Returns the parameters in the default encoding format. ! The primary encoding format is ASN.1 format if it exists ! for the specified type. ! ! @return byte array representing the parameters */ public final byte[] getEncoded() throws IOException { --- 272,305 ---- } /** ! * Returns a (transparent) specification of this parameter object. ! * paramSpec identifies the specification class in which the ! * parameters should be returned. It could, for example, be ! * DSAParameterSpec.class, to indicate that the parameters should ! * be returned in an instance of the {@link java.security.spec.DSAParameterSpec} ! * class. ! * ! * @param paramSpec the specification class in which the parameters should be ! * returned. ! * @return the parameter specification. ! * @throws InvalidParameterSpecException if the requested parameter ! * specification is inappropriate for this parameter object, or if this ! * parameter object has not been initialized. */ ! public final AlgorithmParameterSpec getParameterSpec(Class paramSpec) ! throws InvalidParameterSpecException { return paramSpi.engineGetParameterSpec(paramSpec); } /** ! * Returns the parameters in their primary encoding format. The primary ! * encoding format for parameters is ASN.1, if an ASN.1 specification for ! * this type of parameters exists. ! * ! * @return the parameters encoded using their primary encoding format. ! * @throws IOException on encoding errors, or if this parameter object has not ! * been initialized. */ public final byte[] getEncoded() throws IOException { *************** public class AlgorithmParameters *** 252,263 **** } /** ! Returns the parameters in the specified encoding format. ! If format is null then the ! primary encoding format is used, the ASN.1 format, ! if it exists for the specified type. ! ! @return byte array representing the parameters */ public final byte[] getEncoded(String format) throws IOException { --- 307,321 ---- } /** ! * Returns the parameters encoded in the specified scheme. If format is ! * null, the primary encoding format for parameters is used. The ! * primary encoding format is ASN.1, if an ASN.1 specification for these ! * parameters exists. ! * ! * @param format the name of the encoding format. ! * @return the parameters encoded using the specified encoding scheme. ! * @throws IOException on encoding errors, or if this parameter object has ! * not been initialized. */ public final byte[] getEncoded(String format) throws IOException { *************** public class AlgorithmParameters *** 265,273 **** } /** ! Returns a string representation of the encoding format ! ! @return a string containing the string representation */ public final String toString() { --- 323,332 ---- } /** ! * Returns a formatted string describing the parameters. ! * ! * @return a formatted string describing the parameters, or null ! * if this parameter object has not been initialized. */ public final String toString() { diff -Nrc3pad gcc-3.3.3/libjava/java/security/BasicPermission.java gcc-3.4.0/libjava/java/security/BasicPermission.java *** gcc-3.3.3/libjava/java/security/BasicPermission.java 2002-05-24 11:57:11.000000000 +0000 --- gcc-3.4.0/libjava/java/security/BasicPermission.java 2003-06-14 05:45:12.000000000 +0000 *************** *** 1,5 **** /* BasicPermission.java -- implements a simple named permission ! Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* BasicPermission.java -- implements a simple named permission ! Copyright (C) 1998, 1999, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** import java.util.Enumeration; *** 71,79 **** * @since 1.1 * @status updated to 1.4 */ ! public abstract class BasicPermission extends java.security.Permission implements Serializable - // FIXME extends with fully qualified classname is workaround for gcj 3.0.4. { /** * Compatible with JDK 1.1+. --- 71,78 ---- * @since 1.1 * @status updated to 1.4 */ ! public abstract class BasicPermission extends Permission implements Serializable { /** * Compatible with JDK 1.1+. diff -Nrc3pad gcc-3.3.3/libjava/java/security/cert/CertificateFactory.java gcc-3.4.0/libjava/java/security/cert/CertificateFactory.java *** gcc-3.3.3/libjava/java/security/cert/CertificateFactory.java 2002-05-24 11:57:34.000000000 +0000 --- gcc-3.4.0/libjava/java/security/cert/CertificateFactory.java 2003-04-30 07:23:42.000000000 +0000 *************** *** 1,5 **** /* CertificateFactory.java -- Certificate Factory Class ! Copyright (C) 1999, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* CertificateFactory.java -- Certificate Factory Class ! Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,275 **** package java.security.cert; import java.security.NoSuchProviderException; import java.security.Provider; import java.security.Security; import java.io.InputStream; import java.util.Collection; /** ! This class implments the CertificateFactory class interface ! used to generate certificates and certificate revocation ! list (CRL) objects from their encodings. ! ! A certifcate factory for X.509 returns certificates of the ! java.security.cert.X509Certificate class, and CRLs of the ! java.security.cert.X509CRL class. ! ! @author Mark Benvenuto ! @since JDK 1.2 ! @status still missing full 1.4 support ! */ public class CertificateFactory { private CertificateFactorySpi certFacSpi; private Provider provider; private String type; /** ! Creates an instance of CertificateFactory ! ! @param certFacSpi A CertificateFactory engine to use ! @param provider A provider to use ! @param type The type of Certificate ! */ ! protected CertificateFactory(CertificateFactorySpi certFacSpi, Provider provider, String type) { this.certFacSpi = certFacSpi; this.provider = provider; this.type = type; } /** ! Gets an instance of the CertificateFactory class representing ! the specified certificate factory. If the type is not ! found then, it throws CertificateException. ! ! @param type the type of certificate to choose ! ! @return a CertificateFactory repesenting the desired type ! ! @throws CertificateException if the type of certificate is not implemented by providers ! */ ! public static final CertificateFactory getInstance(String type) throws CertificateException { ! Provider[] p = Security.getProviders (); for (int i = 0; i < p.length; i++) { ! String classname = p[i].getProperty ("CertificateFactory." + type); ! if (classname != null) ! return getInstance (classname, type, p[i]); } throw new CertificateException(type); } - - /** ! Gets an instance of the CertificateFactory class representing ! the specified certificate factory from the specified provider. ! If the type is not found then, it throws CertificateException. ! If the provider is not found, then it throws ! NoSuchProviderException. ! ! @param type the type of certificate to choose ! ! @return a CertificateFactory repesenting the desired type ! ! @throws CertificateException if the type of certificate is not implemented by providers ! @throws NoSuchProviderException if the provider is not found ! */ ! public static final CertificateFactory getInstance(String type, String provider) throws CertificateException, NoSuchProviderException { Provider p = Security.getProvider(provider); if( p == null) throw new NoSuchProviderException(); ! return getInstance (p.getProperty ("CertificateFactory." + type), ! type, p); } ! private static CertificateFactory getInstance (String classname, ! String type, ! Provider provider) throws CertificateException { ! try { ! return new CertificateFactory( (CertificateFactorySpi)Class.forName( classname ).newInstance(), provider, type ); ! } catch( ClassNotFoundException cnfe) { ! throw new CertificateException("Class not found"); ! } catch( InstantiationException ie) { ! throw new CertificateException("Class instantiation failed"); ! } catch( IllegalAccessException iae) { ! throw new CertificateException("Illegal Access"); ! } } /** ! Gets the provider that the class is from. ! ! @return the provider of this class ! */ public final Provider getProvider() { return provider; } /** ! Returns the type of the certificate supported ! ! @return A string with the type of certificate ! */ public final String getType() { return type; } /** ! Generates a Certificate based on the encoded data read ! from the InputStream. ! ! The input stream must contain only one certificate. ! ! If there exists a specialized certificate class for the ! certificate format handled by the certificate factory ! then the return Ceritificate should be a typecast of it. ! Ex: A X.509 CertificateFactory should return X509Certificate. ! ! For X.509 certificates, the certificate in inStream must be ! DER encoded and supplied in binary or printable (Base64) ! encoding. If the certificate is in Base64 encoding, it must be ! bounded by -----BEGINCERTIFICATE-----, and ! -----END CERTIFICATE-----. ! ! @param inStream an input stream containing the certificate data ! ! @return a certificate initialized with InputStream data. ! ! @throws CertificateException Certificate parsing error ! */ public final Certificate generateCertificate(InputStream inStream) throws CertificateException { ! return certFacSpi.engineGenerateCertificate( inStream ); } /** ! Returns a collection of certificates that were read from the ! input stream. It may be empty, have only one, or have ! multiple certificates. ! ! For a X.509 certificate factory, the stream may contain a ! single DER encoded certificate or a PKCS#7 certificate ! chain. This is a PKCS#7 SignedData object with the ! most significant field being certificates. If no ! CRLs are present, then an empty collection is returned. ! ! @param inStream an input stream containing the certificates ! ! @return a collection of certificates initialized with ! the InputStream data. ! ! @throws CertificateException Certificate parsing error ! */ public final Collection generateCertificates(InputStream inStream) throws CertificateException { ! return certFacSpi.engineGenerateCertificates( inStream ); } /** ! Generates a CRL based on the encoded data read ! from the InputStream. ! ! The input stream must contain only one CRL. ! ! If there exists a specialized CRL class for the ! CRL format handled by the certificate factory ! then the return CRL should be a typecast of it. ! Ex: A X.509 CertificateFactory should return X509CRL. ! ! @param inStream an input stream containing the CRL data ! ! @return a CRL initialized with InputStream data. ! ! @throws CRLException CRL parsing error ! */ public final CRL generateCRL(InputStream inStream) throws CRLException { ! return certFacSpi.engineGenerateCRL( inStream ); } - /** ! Generates CRLs based on the encoded data read ! from the InputStream. ! ! For a X.509 certificate factory, the stream may contain a ! single DER encoded CRL or a PKCS#7 CRL set. This is a ! PKCS#7 SignedData object with the most significant ! field being crls. If no CRLs are present, then an ! empty collection is returned. ! ! @param inStream an input stream containing the CRLs ! ! @return a collection of CRLs initialized with ! the InputStream data. ! ! @throws CRLException CRL parsing error ! */ public final Collection generateCRLs(InputStream inStream) throws CRLException { return certFacSpi.engineGenerateCRLs( inStream ); } public final CertPath generateCertPath(InputStream inStream) throws CertificateException { ! throw new CertificateException("not implemented"); } } // class CertificateFactory --- 37,359 ---- package java.security.cert; + + import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import java.security.Provider; import java.security.Security; + import java.io.InputStream; + import java.util.Collection; + import java.util.Iterator; + import java.util.List; + + import gnu.java.security.Engine; /** ! * This class implements the CertificateFactory class interface used to ! * generate certificates, certificate revocation lists (CRLs), and certificate ! * paths objects from their encoded forms. ! * ! * @author Mark Benvenuto ! * @author Casey Marshall ! * @since JDK 1.2 ! * @status Fully compatible with JDK 1.4. ! */ public class CertificateFactory { + /** The service name for certificate factories. */ + private static final String CERTIFICATE_FACTORY = "CertificateFactory"; + private CertificateFactorySpi certFacSpi; private Provider provider; private String type; /** ! * Creates an instance of CertificateFactory. ! * ! * @param certFacSpi The underlying CertificateFactory engine. ! * @param provider The provider of this implementation. ! * @param type The type of Certificate this factory creates. ! */ ! protected CertificateFactory(CertificateFactorySpi certFacSpi, ! Provider provider, String type) { this.certFacSpi = certFacSpi; this.provider = provider; this.type = type; } + // Class methods. + // ------------------------------------------------------------------------ /** ! * Gets an instance of the CertificateFactory class representing ! * the specified certificate factory. If the type is not ! * found then, it throws CertificateException. ! * ! * @param type The type of certificate factory to create. ! * @return a CertificateFactory repesenting the desired type ! * @throws CertificateException If the type of certificate is not ! * implemented by any installed provider. ! */ ! public static final CertificateFactory getInstance(String type) ! throws CertificateException { ! Provider[] p = Security.getProviders(); for (int i = 0; i < p.length; i++) { ! try ! { ! return getInstance(type, p[i]); ! } ! catch (CertificateException ignored) ! { ! } } throw new CertificateException(type); } /** ! * Gets an instance of the CertificateFactory class representing ! * the specified certificate factory from the specified provider. ! * If the type is not found then, it throws {@link CertificateException}. ! * If the provider is not found, then it throws ! * {@link java.security.NoSuchProviderException}. ! * ! * @param type The type of certificate factory to create. ! * @param provider The name of the provider from which to get the ! * implementation. ! * @return A CertificateFactory for the desired type. ! * @throws CertificateException If the type of certificate is not ! * implemented by the named provider. ! * @throws NoSuchProviderException If the named provider is not installed. ! */ ! public static final CertificateFactory getInstance(String type, ! String provider) throws CertificateException, NoSuchProviderException { Provider p = Security.getProvider(provider); if( p == null) throw new NoSuchProviderException(); ! return getInstance(type, p); } ! /** ! * Get a certificate factory for the given certificate type from the ! * given provider. ! * ! * @param type The type of certificate factory to create. ! * @param provider The provider from which to get the implementation. ! * @return A CertificateFactory for the desired type. ! * @throws CertificateException If the type of certificate is not ! * implemented by the provider. ! * @throws IllegalArgumentException If the provider is null. ! */ ! public static final CertificateFactory getInstance(String type, ! Provider provider) throws CertificateException { ! if (provider == null) ! throw new IllegalArgumentException("null provider"); ! ! try ! { ! return new CertificateFactory((CertificateFactorySpi) ! Engine.getInstance(CERTIFICATE_FACTORY, type, provider), ! provider, type); ! } ! catch (ClassCastException cce) ! { ! throw new CertificateException(type); ! } ! catch (java.lang.reflect.InvocationTargetException ite) ! { ! throw new CertificateException(type); ! } ! catch (NoSuchAlgorithmException nsae) ! { ! throw new CertificateException(nsae.getMessage()); ! } } + // Instance methods. + // ------------------------------------------------------------------------ /** ! * Gets the provider of this implementation. ! * ! * @return The provider of this implementation. ! */ public final Provider getProvider() { return provider; } /** ! * Returns the type of the certificate this factory creates. ! * ! * @return A string with the type of certificate ! */ public final String getType() { return type; } /** ! * Generates a Certificate from the encoded data read ! * from an InputStream. ! * ! *

                The input stream must contain only one certificate. ! * ! *

                If there exists a specialized certificate class for the ! * certificate format handled by the certificate factory ! * then the return Ceritificate should be a typecast of it. ! * Ex: A X.509 CertificateFactory should return X509Certificate. ! * ! *

                For X.509 certificates, the certificate in inStream must be ! * DER encoded and supplied in binary or printable (Base64) ! * encoding. If the certificate is in Base64 encoding, it must be ! * bounded by -----BEGINCERTIFICATE-----, and ! * -----END CERTIFICATE-----. ! * ! * @param inStream An input stream containing the certificate data. ! * @return A certificate initialized from the decoded InputStream data. ! * @throws CertificateException If an error occurs decoding the ! * certificate. ! */ public final Certificate generateCertificate(InputStream inStream) throws CertificateException { ! return certFacSpi.engineGenerateCertificate(inStream); } /** ! * Returns a collection of certificates that were read from the ! * input stream. It may be empty, have only one, or have ! * multiple certificates. ! * ! * For a X.509 certificate factory, the stream may contain a ! * single DER encoded certificate or a PKCS#7 certificate ! * chain. This is a PKCS#7 SignedData object with the ! * most significant field being certificates. If no ! * CRLs are present, then an empty collection is returned. ! * ! * @param inStream An input stream containing the certificate data. ! * @return A collection of certificates initialized from the decoded ! * InputStream data. ! * @throws CertificateException If an error occurs decoding the ! * certificates. ! */ public final Collection generateCertificates(InputStream inStream) throws CertificateException { ! return certFacSpi.engineGenerateCertificates(inStream); } /** ! * Generates a CRL based on the encoded data read ! * from the InputStream. ! * ! *

                The input stream must contain only one CRL. ! * ! *

                If there exists a specialized CRL class for the ! * CRL format handled by the certificate factory ! * then the return CRL should be a typecast of it. ! * Ex: A X.509 CertificateFactory should return X509CRL. ! * ! * @param inStream An input stream containing the CRL data. ! * @return A CRL initialized from the decoded InputStream data. ! * @throws CRLException If an error occurs decoding the CRL. ! */ public final CRL generateCRL(InputStream inStream) throws CRLException { ! return certFacSpi.engineGenerateCRL(inStream); } /** ! *

                Generates CRLs based on the encoded data read ! * from the InputStream. ! * ! *

                For a X.509 certificate factory, the stream may contain a ! * single DER encoded CRL or a PKCS#7 CRL set. This is a ! * PKCS#7 SignedData object with the most significant ! * field being crls. If no CRLs are present, then an ! * empty collection is returned. ! * ! * @param inStream an input stream containing the CRLs. ! * @return a collection of CRLs initialized from the decoded ! * InputStream data. ! * @throws CRLException If an error occurs decoding the CRLs. ! */ public final Collection generateCRLs(InputStream inStream) throws CRLException { return certFacSpi.engineGenerateCRLs( inStream ); } + /** + * Generate a {@link CertPath} and initialize it with data parsed from + * the input stream. The default encoding of this factory is used. + * + * @param inStream The InputStream containing the CertPath data. + * @return A CertPath initialized from the input stream data. + * @throws CertificateException If an error occurs decoding the + * CertPath. + */ public final CertPath generateCertPath(InputStream inStream) throws CertificateException { ! return certFacSpi.engineGenerateCertPath(inStream); ! } ! ! /** ! * Generate a {@link CertPath} and initialize it with data parsed from ! * the input stream, using the specified encoding. ! * ! * @param inStream The InputStream containing the CertPath data. ! * @param encoding The encoding of the InputStream data. ! * @return A CertPath initialized from the input stream data. ! * @throws CertificateException If an error occurs decoding the ! * CertPath. ! */ ! public final CertPath generateCertPath(InputStream inStream, String encoding) ! throws CertificateException ! { ! return certFacSpi.engineGenerateCertPath(inStream, encoding); ! } ! ! /** ! * Generate a {@link CertPath} and initialize it with the certificates ! * in the {@link java.util.List} argument. ! * ! * @param certificates The list of certificates with which to create ! * the CertPath. ! * @return A CertPath initialized from the certificates. ! * @throws CertificateException If an error occurs generating the ! * CertPath. ! */ ! public final CertPath generateCertPath(List certificates) ! throws CertificateException ! { ! return certFacSpi.engineGenerateCertPath(certificates); ! } ! ! /** ! * Returns an Iterator of CertPath encodings supported by this ! * factory, with the default encoding first. The returned Iterator ! * cannot be modified. ! * ! * @return The Iterator of supported encodings. ! */ ! public final Iterator getCertPathEncodings() ! { ! return certFacSpi.engineGetCertPathEncodings(); } } // class CertificateFactory diff -Nrc3pad gcc-3.3.3/libjava/java/security/cert/CertificateFactorySpi.java gcc-3.4.0/libjava/java/security/cert/CertificateFactorySpi.java *** gcc-3.3.3/libjava/java/security/cert/CertificateFactorySpi.java 2002-01-22 22:40:33.000000000 +0000 --- gcc-3.4.0/libjava/java/security/cert/CertificateFactorySpi.java 2003-04-30 07:23:42.000000000 +0000 *************** *** 1,5 **** /* CertificateFactorySpi.java --- Certificate Factory Class ! Copyright (C) 1999 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* CertificateFactorySpi.java --- Certificate Factory Class ! Copyright (C) 1999,2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,49 **** package java.security.cert; import java.io.InputStream; import java.util.Collection; /** CertificateFactorySpi is the abstract class Service Provider Interface (SPI) for the CertificateFactory class. A provider ! must implment all the abstract methods if they wish to supply a certificate factory for a particular certificate type. Ex: X.509 --- 37,53 ---- package java.security.cert; + import java.io.InputStream; + import java.util.Collection; + import java.util.Iterator; + import java.util.List; /** CertificateFactorySpi is the abstract class Service Provider Interface (SPI) for the CertificateFactory class. A provider ! must implement all the abstract methods if they wish to supply a certificate factory for a particular certificate type. Ex: X.509 *************** import java.util.Collection; *** 53,68 **** @since JDK 1.2 @author Mark Benvenuto ! */ public abstract class CertificateFactorySpi { /** ! Constructs a new CertificateFactorySpi ! */ public CertificateFactorySpi() {} /** Generates a Certificate based on the encoded data read from the InputStream. --- 57,78 ---- @since JDK 1.2 @author Mark Benvenuto ! */ public abstract class CertificateFactorySpi { + // Constructor. + // ------------------------------------------------------------------------ + /** ! * Constructs a new CertificateFactorySpi ! */ public CertificateFactorySpi() {} + // Abstract methods. + // ------------------------------------------------------------------------ + /** Generates a Certificate based on the encoded data read from the InputStream. *************** public abstract class CertificateFactory *** 77,83 **** For X.509 certificates, the certificate in inStream must be DER encoded and supplied in binary or printable (Base64) encoding. If the certificate is in Base64 encoding, it must be ! bounded by -----BEGINCERTIFICATE-----, and -----END CERTIFICATE-----. @param inStream an input stream containing the certificate data --- 87,93 ---- For X.509 certificates, the certificate in inStream must be DER encoded and supplied in binary or printable (Base64) encoding. If the certificate is in Base64 encoding, it must be ! bounded by -----BEGIN CERTIFICATE-----, and -----END CERTIFICATE-----. @param inStream an input stream containing the certificate data *************** public abstract class CertificateFactory *** 149,153 **** --- 159,225 ---- */ public abstract Collection engineGenerateCRLs(InputStream inStream) throws CRLException; + + // 1.4 instance methods. + // ------------------------------------------------------------------------ + + /** + * Generate a {@link CertPath} and initialize it with data parsed from + * the input stream. The default encoding of this factory is used. + * + * @param inStream The InputStream containing the CertPath data. + * @return A CertPath initialized from the input stream data. + * @throws CertificateException If an error occurs decoding the + * CertPath. + */ + public CertPath engineGenerateCertPath(InputStream inStream) + throws CertificateException + { + throw new UnsupportedOperationException("not implemented"); + } + + /** + * Generate a {@link CertPath} and initialize it with data parsed from + * the input stream, using the specified encoding. + * + * @param inStream The InputStream containing the CertPath data. + * @param encoding The encoding of the InputStream data. + * @return A CertPath initialized from the input stream data. + * @throws CertificateException If an error occurs decoding the + * CertPath. + */ + public CertPath engineGenerateCertPath(InputStream inStream, String encoding) + throws CertificateException + { + throw new UnsupportedOperationException("not implemented"); + } + + /** + * Generate a {@link CertPath} and initialize it with the certificates + * in the {@link java.util.List} argument. + * + * @param certificates The list of certificates with which to create + * the CertPath. + * @return A CertPath initialized from the certificates. + * @throws CertificateException If an error occurs generating the + * CertPath. + */ + public CertPath engineGenerateCertPath(List certificates) + throws CertificateException + { + throw new UnsupportedOperationException("not implemented"); + } + + /** + * Returns an Iterator of CertPath encodings supported by this + * factory, with the default encoding first. The returned Iterator + * cannot be modified. + * + * @return The Iterator of supported encodings. + */ + public Iterator engineGetCertPathEncodings() + { + throw new UnsupportedOperationException("not implemented"); + } } diff -Nrc3pad gcc-3.3.3/libjava/java/security/cert/Certificate.java gcc-3.4.0/libjava/java/security/cert/Certificate.java *** gcc-3.3.3/libjava/java/security/cert/Certificate.java 2002-10-04 20:15:08.000000000 +0000 --- gcc-3.4.0/libjava/java/security/cert/Certificate.java 2003-05-10 07:12:48.000000000 +0000 *************** *** 1,5 **** /* Certificate.java --- Certificate class ! Copyright (C) 1999 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Certificate.java --- Certificate class ! Copyright (C) 1999,2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,42 **** --- 37,43 ---- package java.security.cert; + import java.security.PublicKey; import java.security.NoSuchAlgorithmException; import java.security.InvalidKeyException; *************** import java.security.NoSuchProviderExcep *** 44,77 **** import java.security.SignatureException; import java.io.ObjectInputStream; import java.io.ByteArrayInputStream; import java.io.ObjectStreamException; /** ! The Certificate class is an abstract class used to manage ! identity certificates. An identity certificate is a ! combination of a principal and a public key which is ! certified by another principal. This is the puprose of ! Certificate Authorities (CA). ! ! This class is used to manage different types of certificates ! but have important common puposes. Different types of ! certificates like X.509 and OpenPGP share general certificate ! functions (like encoding and verifying) and information like ! public keys. ! ! X.509, OpenPGP, and SDSI can be implemented by subclassing this ! class even though they differ in storage methods and information ! stored. ! ! @since JDK 1.2 ! ! @author Mark Benvenuto ! */ ! public abstract class Certificate { ! static final long serialVersionUID = -6751606818319535583L; private String type; /** Constructs a new certificate of the specified type. An example is "X.509". --- 45,83 ---- import java.security.SignatureException; import java.io.ObjectInputStream; import java.io.ByteArrayInputStream; + import java.io.InvalidObjectException; import java.io.ObjectStreamException; + import java.io.Serializable; /** ! * The Certificate class is an abstract class used to manage ! * identity certificates. An identity certificate is a ! * combination of a principal and a public key which is ! * certified by another principal. This is the puprose of ! * Certificate Authorities (CA). ! * ! *

                This class is used to manage different types of certificates ! * but have important common puposes. Different types of ! * certificates like X.509 and OpenPGP share general certificate ! * functions (like encoding and verifying) and information like ! * public keys. ! * ! *

                X.509, OpenPGP, and SDSI can be implemented by subclassing this ! * class even though they differ in storage methods and information ! * stored. ! * ! * @see CertificateFactory ! * @see X509Certificate ! * @since JDK 1.2 ! * @author Mark Benvenuto ! * @author Casey Marshall ! */ ! public abstract class Certificate implements Serializable { ! private static final long serialVersionUID = -6751606818319535583L; private String type; + /** Constructs a new certificate of the specified type. An example is "X.509". *************** public abstract class Certificate *** 203,249 **** */ public abstract PublicKey getPublicKey(); - /* INNER CLASS */ /** Certificate.CertificateRep is an inner class used to provide an alternate storage mechanism for serialized Certificates. */ protected static class CertificateRep implements java.io.Serializable { private String type; private byte[] data; /** ! Create an alternate Certificate class to store a serialized Certificate ! ! @param type the name of certificate type ! @param data the certificate data ! */ ! protected CertificateRep(String type, ! byte[] data) { this.type = type; this.data = data; } /** ! Return the stored Certificate ! ! @return the stored certificate ! ! @throws ObjectStreamException if certificate cannot be resolved ! */ ! protected Object readResolve() ! throws ObjectStreamException { ! try { ! return new ObjectInputStream( new ByteArrayInputStream( data ) ).readObject(); ! } catch ( Exception e ) { ! e.printStackTrace(); ! throw new RuntimeException ( e.toString() ); ! } } } - } --- 209,307 ---- */ public abstract PublicKey getPublicKey(); + // Protected methods. + // ------------------------------------------------------------------------ + + /** + * Returns a replacement for this certificate to be serialized. This + * method returns the equivalent to the following for this class: + * + *

                + *
                new CertificateRep(getType(), getEncoded());
                + *
                + * + *

                This thusly replaces the certificate with its name and its + * encoded form, which can be deserialized later with the {@link + * CertificateFactory} implementation for this certificate's type. + * + * @return The replacement object to be serialized. + * @throws ObjectStreamException If the replacement could not be + * created. + */ + protected Object writeReplace() throws ObjectStreamException + { + try + { + return new CertificateRep(getType(), getEncoded()); + } + catch (CertificateEncodingException cee) + { + throw new InvalidObjectException(cee.toString()); + } + } + + // Inner class. + // ------------------------------------------------------------------------ /** Certificate.CertificateRep is an inner class used to provide an alternate storage mechanism for serialized Certificates. */ protected static class CertificateRep implements java.io.Serializable { + + /** From JDK1.4. */ + private static final long serialVersionUID = -8563758940495660020L; + + /** The certificate type, e.g. "X.509". */ private String type; + + /** The encoded certificate data. */ private byte[] data; /** ! * Create an alternative representation of this certificate. The ! * (type, data) pair is typically the certificate's ! * type as returned by {@link Certificate#getType()} (i.e. the ! * canonical name of the certificate type) and the encoded form as ! * returned by {@link Certificate#getEncoded()}. ! * ! *

                For example, X.509 certificates would create an instance of ! * this class with the parameters "X.509" and the ASN.1 ! * representation of the certificate, encoded as DER bytes. ! * ! * @param type The certificate type. ! * @param data The encoded certificate data. ! */ ! protected CertificateRep(String type, byte[] data) { this.type = type; this.data = data; } /** ! * Deserialize this certificate replacement into the appropriate ! * certificate object. That is, this method attempts to create a ! * {@link CertificateFactory} for this certificate's type, then ! * attempts to parse the encoded data with that factory, returning ! * the resulting certificate. ! * ! * @return The deserialized certificate. ! * @throws ObjectStreamException If there is no appropriate ! * certificate factory for the given type, or if the encoded form ! * cannot be parsed. ! */ ! protected Object readResolve() throws ObjectStreamException { ! try ! { ! CertificateFactory fact = CertificateFactory.getInstance(type); ! return fact.generateCertificate(new ByteArrayInputStream(data)); ! } ! catch (Exception e) ! { ! throw new InvalidObjectException(e.toString()); ! } } } } diff -Nrc3pad gcc-3.3.3/libjava/java/security/cert/CertPathBuilder.java gcc-3.4.0/libjava/java/security/cert/CertPathBuilder.java *** gcc-3.3.3/libjava/java/security/cert/CertPathBuilder.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/security/cert/CertPathBuilder.java 2003-04-30 07:23:42.000000000 +0000 *************** *** 0 **** --- 1,237 ---- + /* CertPathBuilder.java -- bulids CertPath objects from Certificates. + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.security.cert; + + import java.security.InvalidAlgorithmParameterException; + import java.security.NoSuchAlgorithmException; + import java.security.NoSuchProviderException; + import java.security.Provider; + import java.security.Security; + + import gnu.java.security.Engine; + + /** + * This class builds certificate paths (also called certificate chains), + * which can be used to establish trust for a particular certificate by + * building a path from a trusted certificate (a trust anchor) to the + * untrusted certificate. + * + * @see CertPath + */ + public class CertPathBuilder + { + + // Constants and fields. + // ------------------------------------------------------------------------ + + /** Service name for CertPathBuilder. */ + private static final String CERT_PATH_BUILDER = "CertPathBuilder"; + + /** The underlying implementation. */ + private CertPathBuilderSpi cpbSpi; + + /** The provider of this implementation. */ + private Provider provider; + + /** The name of this implementation. */ + private String algorithm; + + // Constructor. + // ------------------------------------------------------------------------ + + /** + * Creates a new CertPathBuilder. + * + * @param cpbSpi The underlying implementation. + * @param provider The provider of the implementation. + * @param algorithm This implementation's name. + */ + protected CertPathBuilder(CertPathBuilderSpi cpbSpi, Provider provider, + String algorithm) + { + this.cpbSpi = cpbSpi; + this.provider = provider; + this.algorithm = algorithm; + } + + // Class methods. + // ------------------------------------------------------------------------ + + /** + * Get the default cert path builder type. + * + *

                This value can be set at run-time by the security property + * "certpathbuilder.type". If this property is not set, + * then the value returned is "PKIX". + * + * @return The default CertPathBuilder algorithm. + */ + public static final String getDefaultType() + { + String type = Security.getProperty("certpathbuilder.type"); + if (type == null) + type = "PKIX"; + return type; + } + + /** + * Get an instance of a named CertPathBuilder, from the first provider + * that implements it. + * + * @param algorithm The name of the CertPathBuilder to create. + * @return The new instance. + * @throws NoSuchAlgorithmException If no installed provider + * implements the named algorithm. + */ + public static CertPathBuilder getInstance(String algorithm) + throws NoSuchAlgorithmException + { + Provider[] p = Security.getProviders(); + + for (int i = 0; i < p.length; i++) + { + try + { + return getInstance(algorithm, p[i]); + } + catch (NoSuchAlgorithmException ignored) + { + } + } + + throw new NoSuchAlgorithmException(algorithm); + } + + /** + * Get an instance of a named CertPathBuilder from the named + * provider. + * + * @param algorithm The name of the CertPathBuilder to create. + * @param provider The name of the provider from which to get the + * implementation. + * @return The new instance. + * @throws NoSuchAlgorithmException If no installed provider + * implements the named algorithm. + * @throws NoSuchProviderException If the named provider does not + * exist. + */ + public static CertPathBuilder getInstance(String algorithm, String provider) + throws NoSuchAlgorithmException, NoSuchProviderException + { + Provider p = Security.getProvider(provider); + if (p == null) + throw new NoSuchProviderException(provider); + return getInstance(algorithm, p); + } + + /** + * Get an instance of a named CertPathBuilder from the specified + * provider. + * + * @param algorithm The name of the CertPathBuilder to create. + * @param provider The provider from which to get the implementation. + * @return The new instance. + * @throws NoSuchAlgorithmException If no installed provider + * implements the named algorithm. + * @throws IllegalArgumentException If provider in + * null. + */ + public static CertPathBuilder getInstance(String algorithm, Provider provider) + throws NoSuchAlgorithmException + { + if (provider == null) + throw new IllegalArgumentException("null provider"); + try + { + return new CertPathBuilder((CertPathBuilderSpi) + Engine.getInstance(CERT_PATH_BUILDER, algorithm, provider), + provider, algorithm); + } + catch (java.lang.reflect.InvocationTargetException ite) + { + throw new NoSuchAlgorithmException(algorithm); + } + catch (ClassCastException cce) + { + throw new NoSuchAlgorithmException(algorithm); + } + } + + // Instance methods. + // ------------------------------------------------------------------------ + + /** + * Return the name of this CertPathBuilder algorithm. + * + * @return The algorithm name. + */ + public final String getAlgorithm() + { + return algorithm; + } + + /** + * Return the provider of this instance's implementation. + * + * @return The provider. + */ + public final Provider getProvider() + { + return provider; + } + + /** + * Builds a certificate path. The {@link CertPathParameters} parameter + * passed to this method is implementation-specific, but in general + * should contain some number of certificates and some number of + * trusted certificates (or "trust anchors"). + * + * @param params The parameters. + * @retrun The certificate path result. + * @throws CertPathBuilderException If the certificate path cannot be + * built. + * @throws InvalidAlgorithmParameterException If the implementation + * rejects the specified parameters. + */ + public final CertPathBuilderResult build(CertPathParameters params) + throws CertPathBuilderException, InvalidAlgorithmParameterException + { + return cpbSpi.engineBuild(params); + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/security/cert/CertPathBuilderResult.java gcc-3.4.0/libjava/java/security/cert/CertPathBuilderResult.java *** gcc-3.3.3/libjava/java/security/cert/CertPathBuilderResult.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/security/cert/CertPathBuilderResult.java 2003-04-30 07:23:42.000000000 +0000 *************** *** 0 **** --- 1,63 ---- + /* CertPathBuilderResult -- results from building cert paths. + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.security.cert; + + /** + * A standard interface for the result of building a certificate path. + * All implementations of this class must provide a way to get the + * certificate path, but may also define additional methods for + * returning other result data generated by the certificate path + * builder. + */ + public interface CertPathBuilderResult extends Cloneable { + + /** + * Creates a copy of this builder result. + * + * @return The copy. + */ + Object clone(); + + /** + * Get the certificate path that was built. + * + * @retrn The certificate path. + */ + CertPath getCertPath(); + } diff -Nrc3pad gcc-3.3.3/libjava/java/security/cert/CertPathBuilderSpi.java gcc-3.4.0/libjava/java/security/cert/CertPathBuilderSpi.java *** gcc-3.3.3/libjava/java/security/cert/CertPathBuilderSpi.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/security/cert/CertPathBuilderSpi.java 2003-04-30 07:23:42.000000000 +0000 *************** *** 0 **** --- 1,74 ---- + /* CertPathBuilderSpi -- CertPathBuilder service provider interface. + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package java.security.cert; + + /** + * The {@link CertPathBuilder} Service Provider Interface + * (SPI). + * + * @see CertPathBuilder + */ + public abstract class CertPathBuilderSpi { + + // Constructors. + // ------------------------------------------------------------------------ + + /** + * Creates a new CertPathBuilderSpi. + */ + public CertPathBuilderSpi() { + super(); + } + + // Abstract methods. + // ------------------------------------------------------------------------ + + /** + * Creates a certificate path from the specified parameters. + * + * @param params The parameters to use. + * @return The certificate path result. + * @throws CertPathBuilderException If the certificate path cannot be + * built. + * @throws java.security.InvalidAlgorithmParameterException If the + * implementation rejects the specified parameters. + */ + public abstract CertPathBuilderResult engineBuild(CertPathParameters params) + throws CertPathBuilderException, + java.security.InvalidAlgorithmParameterException; + } diff -Nrc3pad gcc-3.3.3/libjava/java/security/cert/CertPathParameters.java gcc-3.4.0/libjava/java/security/cert/CertPathParameters.java *** gcc-3.3.3/libjava/java/security/cert/CertPathParameters.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/security/cert/CertPathParameters.java 2003-04-30 07:23:42.000000000 +0000 *************** *** 0 **** --- 1,58 ---- + /* CertPathParameters.java -- parameters for CertPathBuilder. + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package java.security.cert; + + /** + * Parameters for generating and validating certificate paths. This + * class does not define any methods (except a required cloneable + * interface) and is provided only to provide type safety for + * implementations. Concrete implementations implement this interface + * in accord with thier own needs. + * + * @see CertPathBuilder + * @see CertPathValidator + */ + public interface CertPathParameters extends Cloneable { + + /** + * Makes a copy of this CertPathParameters instance. + * + * @return The copy. + */ + Object clone(); + } diff -Nrc3pad gcc-3.3.3/libjava/java/security/cert/CertPathValidator.java gcc-3.4.0/libjava/java/security/cert/CertPathValidator.java *** gcc-3.3.3/libjava/java/security/cert/CertPathValidator.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/security/cert/CertPathValidator.java 2003-04-30 07:23:42.000000000 +0000 *************** *** 0 **** --- 1,248 ---- + /* CertPathValidator -- validates certificate paths. + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.security.cert; + + import java.security.AccessController; + import java.security.InvalidAlgorithmParameterException; + import java.security.NoSuchAlgorithmException; + import java.security.NoSuchProviderException; + import java.security.PrivilegedAction; + import java.security.Provider; + import java.security.Security; + + import gnu.java.security.Engine; + + /** + * Generic interface to classes that validate certificate paths. + * + *

                Using this class is similar to all the provider-based security + * classes; the method of interest, {@link + * #validate(java.security.cert.CertPath,java.security.cert.CertPathParameters)}, + * which takes provider-specific implementations of {@link + * CertPathParameters}, and return provider-specific implementations of + * {@link CertPathValidatorResult}. + * + * @since JDK 1.4 + * @see CertPath + */ + public class CertPathValidator { + + // Constants and fields. + // ------------------------------------------------------------------------ + + /** Service name for CertPathValidator. */ + private static final String CERT_PATH_VALIDATOR = "CertPathValidator"; + + /** The underlying implementation. */ + private final CertPathValidatorSpi validatorSpi; + + /** The provider of this implementation. */ + private final Provider provider; + + /** The algorithm's name. */ + private final String algorithm; + + // Constructor. + // ------------------------------------------------------------------------ + + /** + * Creates a new CertPathValidator. + * + * @param validatorSpi The underlying implementation. + * @param provider The provider of the implementation. + * @param algorithm The algorithm name. + */ + protected CertPathValidator(CertPathValidatorSpi validatorSpi, + Provider provider, String algorithm) + { + this.validatorSpi = validatorSpi; + this.provider = provider; + this.algorithm = algorithm; + } + + // Class methods. + // ------------------------------------------------------------------------ + + /** + * Returns the default validator type. + * + *

                This value may be set at run-time via the security property + * "certpathvalidator.type", or the value "PKIX" if this property is + * not set. + * + * @return The default validator type. + */ + public static synchronized String getDefaultType() { + String type = (String) AccessController.doPrivileged( + new PrivilegedAction() + { + public Object run() + { + return Security.getProperty("certpathvalidator.type"); + } + } + ); + if (type == null) + type = "PKIX"; + return type; + } + + /** + * Get an instance of the given validator from the first provider that + * implements it. + * + * @param algorithm The name of the algorithm to get. + * @return The new instance. + * @throws NoSuchAlgorithmException If no installed provider + * implements the requested algorithm. + */ + public static CertPathValidator getInstance(String algorithm) + throws NoSuchAlgorithmException + { + Provider[] p = Security.getProviders(); + for (int i = 0; i < p.length; i++) + { + try + { + return getInstance(algorithm, p[i]); + } + catch (NoSuchAlgorithmException ignored) + { + } + } + throw new NoSuchAlgorithmException(algorithm); + } + + /** + * Get an instance of the given validator from the named provider. + * + * @param algorithm The name of the algorithm to get. + * @param provider The name of the provider from which to get the + * implementation. + * @return The new instance. + * @throws NoSuchAlgorithmException If the named provider does not + * implement the algorithm. + * @throws NoSuchProviderException If no provider named + * provider is installed. + */ + public static CertPathValidator getInstance(String algorithm, + String provider) + throws NoSuchAlgorithmException, NoSuchProviderException + { + Provider p = Security.getProvider(provider); + if (p == null) + throw new NoSuchProviderException(provider); + + return getInstance(algorithm, p); + } + + /** + * Get an instance of the given validator from the given provider. + * + * @param algorithm The name of the algorithm to get. + * @param provider The provider from which to get the implementation. + * @return The new instance. + * @throws NoSuchAlgorithmException If the provider does not implement + * the algorithm. + * @throws IllegalArgumentException If provider is null. + */ + public static CertPathValidator getInstance(String algorithm, + Provider provider) + throws NoSuchAlgorithmException + { + if (provider == null) + throw new IllegalArgumentException("null provider"); + + try + { + return new CertPathValidator((CertPathValidatorSpi) + Engine.getInstance(CERT_PATH_VALIDATOR, algorithm, provider), + provider, algorithm); + } + catch (java.lang.reflect.InvocationTargetException ite) + { + throw new NoSuchAlgorithmException(algorithm); + } + catch (ClassCastException cce) + { + throw new NoSuchAlgorithmException(algorithm); + } + } + + // Instance methods. + // ------------------------------------------------------------------------ + + /** + * Return the name of this validator. + * + * @return This validator's name. + */ + public final String getAlgorithm() + { + return algorithm; + } + + /** + * Return the provider of this implementation. + * + * @return The provider. + */ + public final Provider getProvider() + { + return provider; + } + + /** + * Attempt to validate a certificate path. + * + * @param certPath The path to validate. + * @param params The algorithm-specific parameters. + * @return The result of this validation attempt. + * @throws CertPathValidatorException If the certificate path cannot + * be validated. + * @throws InvalidAlgorithmParameterException If this implementation + * rejects the specified parameters. + */ + public final CertPathValidatorResult validate(CertPath certPath, + CertPathParameters params) + throws CertPathValidatorException, InvalidAlgorithmParameterException + { + return validatorSpi.engineValidate(certPath, params); + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/security/cert/CertPathValidatorResult.java gcc-3.4.0/libjava/java/security/cert/CertPathValidatorResult.java *** gcc-3.3.3/libjava/java/security/cert/CertPathValidatorResult.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/security/cert/CertPathValidatorResult.java 2003-04-30 07:23:42.000000000 +0000 *************** *** 0 **** --- 1,63 ---- + /* CertPathValidatorResult -- result of validating certificate paths + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.security.cert; + + /** + * Interface to the result of calling {@link + * CertPathValidator#validate(java.security.cert.CertPath,java.security.cert.CertPathParameters)}. + * + *

                This interface defines no methods other than the required + * {@link java.lang.Cloneable} interface, and is intended to group and + * provide type safety for validator results. Providers that implement + * a certificate path validator must also provide an implementation of + * this interface, possibly defining additional methods. + * + * @since JDK 1.4 + * @see CertPathValidator + */ + public interface CertPathValidatorResult extends Cloneable + { + + /** + * Returns a copy of this validator result. + * + * @return The copy. + */ + Object clone(); + } diff -Nrc3pad gcc-3.3.3/libjava/java/security/cert/CertPathValidatorSpi.java gcc-3.4.0/libjava/java/security/cert/CertPathValidatorSpi.java *** gcc-3.3.3/libjava/java/security/cert/CertPathValidatorSpi.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/security/cert/CertPathValidatorSpi.java 2003-04-30 07:23:42.000000000 +0000 *************** *** 0 **** --- 1,79 ---- + /* CertPathValidatorSpi -- cert path validator service provider interface + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.security.cert; + + /** + * The service provider interface (SPI) for the {@link + * CertPathValidator} class. Providers implementing certificate path + * validators must subclass this class and implement its abstract + * methods. + */ + public abstract class CertPathValidatorSpi + { + + // Constructor. + // ------------------------------------------------------------------------ + + /** + * Default constructor. + */ + public CertPathValidatorSpi() + { + super(); + } + + // Abstract methods. + // ------------------------------------------------------------------------ + + /** + * Attempt to validate a certificate path. + * + * @param certPath The path to validate. + * @param params The algorithm-specific parameters. + * @return The result of this validation attempt. + * @throws CertPathValidatorException If the certificate path cannot + * be validated. + * @throws InvalidAlgorithmParameterException If this implementation + * rejects the specified parameters. + */ + public abstract CertPathValidatorResult + engineValidate(CertPath certPath, CertPathParameters params) + throws CertPathValidatorException, + java.security.InvalidAlgorithmParameterException; + } diff -Nrc3pad gcc-3.3.3/libjava/java/security/cert/CertSelector.java gcc-3.4.0/libjava/java/security/cert/CertSelector.java *** gcc-3.3.3/libjava/java/security/cert/CertSelector.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/security/cert/CertSelector.java 2003-04-30 07:23:42.000000000 +0000 *************** *** 0 **** --- 1,58 ---- + /* CertSelector.java -- certificate selector interface. + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.security.cert; + + public interface CertSelector extends Cloneable + { + + /** + * Returns a copy of this CertSelector. + * + * @return The copy. + */ + Object clone(); + + /** + * Match a certificate according to this selector's criteria. + * + * @param cert The certificate to match. + * @return true if the certificate matches thin criteria. + */ + boolean match(Certificate cert); + } diff -Nrc3pad gcc-3.3.3/libjava/java/security/cert/CertStore.java gcc-3.4.0/libjava/java/security/cert/CertStore.java *** gcc-3.3.3/libjava/java/security/cert/CertStore.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/security/cert/CertStore.java 2003-11-11 12:22:19.000000000 +0000 *************** *** 0 **** --- 1,294 ---- + /* CertStore -- stores and retrieves certificates. + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.security.cert; + + import java.security.InvalidAlgorithmParameterException; + import java.security.NoSuchAlgorithmException; + import java.security.NoSuchProviderException; + import java.security.PrivilegedAction; + import java.security.Provider; + import java.security.Security; + + import java.util.Collection; + + import gnu.java.security.Engine; + + /** + * A CertStore is a read-only repository for certificates and + * certificate revocation lists. + * + * @since JDK 1.4 + */ + public class CertStore + { + + // Constants and fields. + // ------------------------------------------------------------------------ + + /** Service name for CertStore. */ + private static final String CERT_STORE = "CertStore"; + + /** The underlying implementation. */ + private CertStoreSpi storeSpi; + + /** This implementation's provider. */ + private Provider provider; + + /** The name of this key store type. */ + private String type; + + /** The parameters used to initialize this instance, if any. */ + private CertStoreParameters params; + + // Constructor. + // ------------------------------------------------------------------------ + + /** + * Create a new CertStore. + * + * @param storeSpi The underlying implementation. + * @param provider The provider of this implementation. + * @param type The type of CertStore this class represents. + * @param params The parameters used to initialize this instance, if any. + */ + protected CertStore(CertStoreSpi storeSpi, Provider provider, String type, + CertStoreParameters params) + { + this.storeSpi = storeSpi; + this.provider = provider; + this.type = type; + this.params = params; + } + + // Class methods. + // ------------------------------------------------------------------------ + + /** + * Returns the default certificate store type. + * + *

                This value can be set at run-time via the security property + * "certstore.type"; if not specified than the default type will be + * "LDAP". + * + * @return The default CertStore type. + */ + public static final synchronized String getDefaultType() + { + String type = null; + type = (String) java.security.AccessController.doPrivileged( + new PrivilegedAction() { + public Object run() { + return Security.getProperty("certstore.type"); + } + } + ); + if (type == null) + type = "LDAP"; + return type; + } + + /** + * Get an instance of the given certificate store from the first + * installed provider. + * + * @param type The type of CertStore to create. + * @param params The parameters to initialize this cert store with. + * @return The new instance. + * @throws InvalidAlgorithmParameterException If the instance rejects + * the specified parameters. + * @throws NoSuchAlgorithmException If no installed provider + * implements the specified CertStore. + * @throws IllegalArgumentException If provider is null. + */ + public static CertStore getInstance(String type, CertStoreParameters params) + throws InvalidAlgorithmParameterException, NoSuchAlgorithmException + { + Provider[] p = Security.getProviders(); + for (int i = 0; i < p.length; i++) + { + try + { + return getInstance(type, params, p[i]); + } + catch (NoSuchAlgorithmException ignored) + { + } + } + + throw new NoSuchAlgorithmException(type); + } + + /** + * Get an instance of the given certificate store from the named + * provider. + * + * @param type The type of CertStore to create. + * @param params The parameters to initialize this cert store with. + * @param provider The name of the provider from which to get the + * implementation. + * @return The new instance. + * @throws InvalidAlgorithmParameterException If the instance rejects + * the specified parameters. + * @throws NoSuchAlgorithmException If the specified provider does not + * implement the specified CertStore. + * @throws NoSuchProviderException If no provider named + * provider is installed. + * @throws IllegalArgumentException If provider is null. + */ + public static CertStore getInstance(String type, CertStoreParameters params, + String provider) + throws InvalidAlgorithmParameterException, NoSuchAlgorithmException, + NoSuchProviderException + { + Provider p = Security.getProvider(provider); + if (p == null) + throw new NoSuchProviderException(provider); + return getInstance(type, params, p); + } + + /** + * Get an instance of the given certificate store from the given + * provider. + * + * @param type The type of CertStore to create. + * @param params The parameters to initialize this cert store with. + * @param provider The provider from which to get the implementation. + * @return The new instance. + * @throws InvalidAlgorithmParameterException If the instance rejects + * the specified parameters. + * @throws NoSuchAlgorithmException If the specified provider does not + * implement the specified CertStore. + * @throws IllegalArgumentException If provider is null. + */ + public static CertStore getInstance(String type, CertStoreParameters params, + Provider provider) + throws InvalidAlgorithmParameterException, NoSuchAlgorithmException + { + if (provider == null) + throw new IllegalArgumentException("null provider"); + + try + { + return new CertStore((CertStoreSpi) Engine.getInstance(CERT_STORE, + type, provider, new Object[] { params }), provider, type, params); + } + catch (ClassCastException cce) + { + throw new NoSuchAlgorithmException(type); + } + catch (java.lang.reflect.InvocationTargetException ite) + { + Throwable cause = ite.getCause(); + if (cause instanceof InvalidAlgorithmParameterException) + throw (InvalidAlgorithmParameterException) cause; + else + throw new NoSuchAlgorithmException(type); + } + } + + // Instance methods. + // ------------------------------------------------------------------------ + + /** + * Return the type of certificate store this instance represents. + * + * @return The CertStore type. + */ + public final String getType() + { + return type; + } + + /** + * Return the provider of this implementation. + * + * @return The provider. + */ + public final Provider getProvider() + { + return provider; + } + + /** + * Get the parameters this instance was created with, if any. The + * parameters will be cloned before they are returned. + * + * @return The parameters, or null. + */ + public final CertStoreParameters getCertStoreParameters() + { + return params != null ? (CertStoreParameters) params.clone() : null; + } + + /** + * Get a collection of certificates from this CertStore, optionally + * filtered by the specified CertSelector. The Collection returned may + * be empty, but will never be null. + * + *

                Implementations may not allow a null argument, even if no + * filtering is desired. + * + * @param selector The certificate selector. + * @return The collection of certificates. + * @throws CertStoreException If the certificates cannot be retrieved. + */ + public final Collection getCertificates(CertSelector selector) + throws CertStoreException + { + return storeSpi.engineGetCertificates(selector); + } + + /** + * Get a collection of certificate revocation lists from this CertStore, + * optionally filtered by the specified CRLSelector. The Collection + * returned may be empty, but will never be null. + * + *

                Implementations may not allow a null argument, even if no + * filtering is desired. + * + * @param selector The certificate selector. + * @return The collection of certificate revocation lists. + * @throws CertStoreException If the CRLs cannot be retrieved. + */ + public final Collection getCRLs(CRLSelector selector) + throws CertStoreException + { + return storeSpi.engineGetCRLs(selector); + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/security/cert/CertStoreParameters.java gcc-3.4.0/libjava/java/security/cert/CertStoreParameters.java *** gcc-3.3.3/libjava/java/security/cert/CertStoreParameters.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/security/cert/CertStoreParameters.java 2003-04-30 07:23:42.000000000 +0000 *************** *** 0 **** --- 1,60 ---- + /* CertStoreParameters -- interface to CertStore parameters. + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.security.cert; + + /** + * Parameters used when creating instances of {@link CertStore}. This + * class does not define any methods (except a required cloneable + * interface) and is provided only to provide type safety for + * implementations. Concrete implementations implement this interface + * in accord with thier own needs. + * + * @see LDAPCertStoreParameters + * @see CollectionCertStoreParameters + */ + public interface CertStoreParameters extends Cloneable + { + + /** + * Create a copy of these parameters. + * + * @return The copy. + */ + Object clone(); + } diff -Nrc3pad gcc-3.3.3/libjava/java/security/cert/CertStoreSpi.java gcc-3.4.0/libjava/java/security/cert/CertStoreSpi.java *** gcc-3.3.3/libjava/java/security/cert/CertStoreSpi.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/security/cert/CertStoreSpi.java 2003-04-30 07:23:42.000000000 +0000 *************** *** 0 **** --- 1,102 ---- + /* CertStoreSpi -- certificate store service provider interface. + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.security.cert; + + import java.util.Collection; + + /** + * The service provider interface (SPI) for the {@link + * CertStore} class. + * + *

                Providers wishing to implement a CertStore must subclass this + * class, implementing all the abstract methods. Providers may also + * implement the {@link CertStoreParameters} interface, if they require + * parameters. + * + * @since JDK 1.4 + * @see CertStore + * @see CollectionCertStoreParameters + * @see LDAPCertStoreParameters + */ + public abstract class CertStoreSpi + { + + // Constructors. + // ------------------------------------------------------------------------ + + /** + * Creates a new CertStoreSpi. + * + * @param params The parameters to initialize this instance with, or + * null if no parameters are required. + * @throws InvalidAlgorithmParameterException If the specified + * parameters are inappropriate for this class. + */ + public CertStoreSpi(CertStoreParameters params) + throws java.security.InvalidAlgorithmParameterException + { + super(); + } + + // Abstract methods. + // ------------------------------------------------------------------------ + + /** + * Get the certificates from this store, filtering them through the + * specified CertSelector. + * + * @param selector The CertSelector to filter certificates. + * @return A (non-null) collection of certificates. + * @throws CertStoreException If the certificates cannot be retrieved. + */ + public abstract Collection engineGetCertificates(CertSelector selector) + throws CertStoreException; + + /** + * Get the certificate revocation list from this store, filtering them + * through the specified CRLSelector. + * + * @param selector The CRLSelector to filter certificate revocation + * lists. + * @return A (non-null) collection of certificate revocation list. + * @throws CertStoreException If the CRLs cannot be retrieved. + */ + public abstract Collection engineGetCRLs(CRLSelector selector) + throws CertStoreException; + } diff -Nrc3pad gcc-3.3.3/libjava/java/security/cert/CollectionCertStoreParameters.java gcc-3.4.0/libjava/java/security/cert/CollectionCertStoreParameters.java *** gcc-3.3.3/libjava/java/security/cert/CollectionCertStoreParameters.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/security/cert/CollectionCertStoreParameters.java 2003-04-30 07:23:42.000000000 +0000 *************** *** 0 **** --- 1,121 ---- + /* CollectionCertStoreParameters -- collection-based cert store parameters + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.security.cert; + + import java.util.ArrayList; + import java.util.Collection; + import java.util.Collections; + + /** + * An implementation of {@link CertStoreParameters} with a simple, + * in-memory {@link Collection} of certificates and certificate + * revocation list. + * + *

                Note that this class is not thread-safe, and its underlying + * collection may be changed at any time. + * + * @see CertStore + */ + public class CollectionCertStoreParameters implements CertStoreParameters + { + + // Constants and fields. + // ------------------------------------------------------------------------ + + /** The underlying collection. */ + private final Collection collection; + + // Constructors. + // ------------------------------------------------------------------------ + + /** + * Creates a new CollectionCertStoreParameters with an empty, + * immutable collection. + */ + public CollectionCertStoreParameters() + { + this(Collections.EMPTY_LIST); + } + + /** + * Create a new CollectionCertStoreParameters with the specified + * collection. The argument is not copied, and subsequent changes to + * the collection will change this class's collection. + * + * @param collection The collection. + * @throws NullPointerException If collection is null. + */ + public CollectionCertStoreParameters(Collection collection) + { + if (collection == null) + throw new NullPointerException(); + this.collection = collection; + } + + // Instance methods. + // ------------------------------------------------------------------------ + + public Object clone() + { + return new CollectionCertStoreParameters(new ArrayList(collection)); + } + + /** + * Return the underlying collection. The collection is not copied + * before being returned, so callers may update the collection that is + * returned. + * + * @return The collection. + */ + public Collection getCollection() + { + return collection; + } + + /** + * Return a string representation of these parameters. + * + * @return The string representation of these parameters. + */ + public String toString() + { + return "CollectionCertStoreParameters: [ collection: " + + collection + " ]"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/security/cert/CRLSelector.java gcc-3.4.0/libjava/java/security/cert/CRLSelector.java *** gcc-3.3.3/libjava/java/security/cert/CRLSelector.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/security/cert/CRLSelector.java 2003-04-30 07:23:42.000000000 +0000 *************** *** 0 **** --- 1,69 ---- + /* CRLSelector.java -- matches CRLs against criteria. + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.security.cert; + + /** + * A generic interface to classes that match certificate revocation + * lists (CRLs) to some given criteria. Implementations of this + * interface are useful for finding {@link CRL} objects in a {@link + * CertStore}. + * + * @see CertStore + * @see CertSelector + * @see X509CRLSelector + */ + public interface CRLSelector extends Cloneable + { + + /** + * Returns a clone of this instance. + * + * @return The clone. + */ + Object clone(); + + /** + * Match a given certificate revocation list to this selector's + * criteria, returning true if it matches, false otherwise. + * + * @param crl The certificate revocation list to test. + * @return The boolean result of this test. + */ + boolean match(CRL crl); + } diff -Nrc3pad gcc-3.3.3/libjava/java/security/cert/LDAPCertStoreParameters.java gcc-3.4.0/libjava/java/security/cert/LDAPCertStoreParameters.java *** gcc-3.3.3/libjava/java/security/cert/LDAPCertStoreParameters.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/security/cert/LDAPCertStoreParameters.java 2003-04-30 07:23:42.000000000 +0000 *************** *** 0 **** --- 1,140 ---- + /* LDAPCertStoreParameters.java -- LDAP CertStore parameters. + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.security.cert; + + /** + * Parameters for CertStores that are retrieved via the lightweight + * directory access protocol (LDAP). + * + * @see CertStore + */ + public class LDAPCertStoreParameters implements CertStoreParameters + { + + // Constants and fields. + // ------------------------------------------------------------------------ + + /** The default LDAP port. */ + private static final int LDAP_PORT = 389; + + /** The server name. */ + private final String serverName; + + /** The LDAP port. */ + private final int port; + + // Constructors. + // ------------------------------------------------------------------------ + + /** + * Create a new LDAPCertStoreParameters object, with a servername of + * "localhost" and a port of 389. + */ + public LDAPCertStoreParameters() + { + this("localhost", LDAP_PORT); + } + + /** + * Create a new LDAPCertStoreParameters object, with a specified + * server name and a port of 389. + * + * @param serverName The LDAP server name. + * @throws NullPointerException If serverName is null. + */ + public LDAPCertStoreParameters(String serverName) + { + this(serverName, LDAP_PORT); + } + + /** + * Create a new LDAPCertStoreParameters object, with a specified + * server name and port. + * + * @param serverName The LDAP server name. + * @param port The LDAP port. + * @throws NullPointerException If serverName is null. + */ + public LDAPCertStoreParameters(String serverName, int port) + { + if (serverName == null) + throw new NullPointerException(); + this.serverName = serverName; + this.port = port; + } + + // Instance methods. + // ------------------------------------------------------------------------ + + public Object clone() + { + return new LDAPCertStoreParameters(serverName, port); + } + + /** + * Return the server name. + * + * @return The server name. + */ + public String getServerName() + { + return serverName; + } + + /** + * Return the port. + * + * @return the port. + */ + public int getPort() + { + return port; + } + + /** + * Return a string representation of these parameters. + * + * @return The string representation of these parameters. + */ + public String toString() + { + return "LDAPCertStoreParameters: [ serverName: " + serverName + + "; port: " + port + " ]"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/security/cert/PKIXBuilderParameters.java gcc-3.4.0/libjava/java/security/cert/PKIXBuilderParameters.java *** gcc-3.3.3/libjava/java/security/cert/PKIXBuilderParameters.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/security/cert/PKIXBuilderParameters.java 2003-04-30 07:23:42.000000000 +0000 *************** *** 0 **** --- 1,145 ---- + /* PKIXBuilderParameters.java -- parameters for PKIX cert path builders + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.security.cert; + + import java.security.InvalidAlgorithmParameterException; + import java.security.KeyStore; + import java.security.KeyStoreException; + + import java.util.Set; + + /** + * Parameters for building certificate paths using the PKIX algorithm. + * + * @see CertPathBuilder + */ + public class PKIXBuilderParameters extends PKIXParameters + { + + // Fields. + // ------------------------------------------------------------------------ + + /** The maximum path length. */ + private int maxPathLength; + + // Constructors. + // ------------------------------------------------------------------------ + + /** + * Create a new PKIXBuilderParameters object, populating the trusted + * certificates set with all X.509 certificates found in the given key + * store. All certificates found in the key store are assumed to be + * trusted by this constructor. + * + * @param keystore The key store. + * @param targetConstraints The target certificate constraints. + * @throws KeyStoreException If the certificates cannot be retrieved + * from the key store. + * @throws InvalidAlgorithmParameterException If there are no + * certificates in the key store. + * @throws NullPointerException If keystore is null. + */ + public PKIXBuilderParameters(KeyStore keystore, + CertSelector targetConstraints) + throws KeyStoreException, InvalidAlgorithmParameterException + { + super(keystore); + setTargetCertConstraints(targetConstraints); + maxPathLength = 5; + } + + /** + * Create a new PKIXBuilderParameters object, populating the trusted + * certificates set with the elements of the given set, each of which + * must be a {@link TrustAnchor}. + * + * @param trustAnchors The set of trust anchors. + * @param targetConstraints The target certificate constraints. + * @throws InvalidAlgorithmParameterException If there are no + * certificates in the set. + * @throws NullPointerException If trustAnchors is null. + * @throws ClassCastException If every element in trustAnchors + * is not a {@link TrustAnchor}. + */ + public PKIXBuilderParameters(Set trustAnchors, CertSelector targetConstraints) + throws InvalidAlgorithmParameterException + { + super(trustAnchors); + setTargetCertConstraints(targetConstraints); + maxPathLength = 5; + } + + // Instance methods. + // ------------------------------------------------------------------------ + + /** + * Returns the maximum length of certificate paths to build. + * + *

                If this value is 0 it is taken to mean that the certificate path + * should contain only one certificate. A value of -1 means that the + * certificate path length is unconstrained. The default value is 5. + * + * @return The maximum path length. + */ + public int getMaxPathLength() + { + return maxPathLength; + } + + /** + * Sets the maximum length of certificate paths to build. + * + * @param maxPathLength The new path length. + * @throws IllegalArgumentException If maxPathLength is less + * than -1. + */ + public void setMaxPathLength(int maxPathLength) + { + if (maxPathLength < -1) + throw new IllegalArgumentException(); + this.maxPathLength = maxPathLength; + } + + public String toString() + { + StringBuffer buf = new StringBuffer(super.toString()); + buf.insert(buf.length() - 2, "; Max Path Length=" + maxPathLength); + return buf.toString(); + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/security/cert/PKIXCertPathBuilderResult.java gcc-3.4.0/libjava/java/security/cert/PKIXCertPathBuilderResult.java *** gcc-3.3.3/libjava/java/security/cert/PKIXCertPathBuilderResult.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/security/cert/PKIXCertPathBuilderResult.java 2003-05-10 07:12:48.000000000 +0000 *************** *** 0 **** --- 1,102 ---- + /* PKIXCertPathBuilderResult.java -- PKIX cert path bulider result + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.security.cert; + + /** + * The result of calling the {@link + * CertPathBuilder#build(java.security.cert.CertPathParameters)} method + * of PKIX {@link CertPathBuilder}s. + * + * @see CertPathBuilder + * @see CertPathBuilderResult + */ + public class PKIXCertPathBuilderResult extends PKIXCertPathValidatorResult + implements CertPathBuilderResult + { + + // Fields. + // ------------------------------------------------------------------------ + + /** The certificate path. */ + private CertPath certPath; + + // Constructor. + // ------------------------------------------------------------------------ + + /** + * Creates a new PKIXCertPathBuilderResult. + * + * @param certPath The certificate path. + * @param trustAnchor The trust anchor. + * @param policyTree The root node of the policy tree. + * @param subjectPublicKey The public key. + * @throws NullPointerException If certPath, trustAnchor or + * subjectPublicKey is null. + */ + public PKIXCertPathBuilderResult(CertPath certPath, + TrustAnchor trustAnchor, + PolicyNode policyTree, + java.security.PublicKey subjectPublicKey) + { + super(trustAnchor, policyTree, subjectPublicKey); + if (certPath == null) + throw new NullPointerException(); + this.certPath = certPath; + } + + // Instance methods. + // ------------------------------------------------------------------------ + + /** + * Returns the certificate path that was built. + * + * @return The certificate path that was built. + */ + public CertPath getCertPath() + { + return certPath; + } + + public String toString() + { + StringBuffer buf = new StringBuffer(super.toString()); + buf.insert(buf.length() - 2, "; CertPath=" + certPath); + return buf.toString(); + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/security/cert/PKIXCertPathChecker.java gcc-3.4.0/libjava/java/security/cert/PKIXCertPathChecker.java *** gcc-3.3.3/libjava/java/security/cert/PKIXCertPathChecker.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/security/cert/PKIXCertPathChecker.java 2003-04-30 07:23:42.000000000 +0000 *************** *** 0 **** --- 1,133 ---- + /* PKIXCertPathChecker.java -- checks X.509 certificate paths. + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.security.cert; + + import java.util.Collection; + import java.util.Set; + + /** + * A validator for X.509 certificates when approving certificate chains. + * + *

                Concrete subclasses can be passed to the {@link + * PKIXParameters#setCertPathCheckers(java.util.List)} and {@link + * PKIXParameters#addCertPathChecker(java.security.cert.PKIXCertPathChecker} + * methods, which are then used to set up PKIX certificate chain + * builders or validators. These classes then call the {@link + * #check(java.security.cert.Certificate,java.util.Collection)} method + * of this class, performing whatever checks on the certificate, + * throwing an exception if any check fails. + * + *

                Subclasses of this must be able to perform their checks in the + * backward direction -- from the most-trusted certificate to the target + * -- and may optionally support forward checking -- from the target to + * the most-trusted certificate. + * + * @see PKIXParameters + */ + public abstract class PKIXCertPathChecker implements Cloneable + { + + // Constructor. + // ------------------------------------------------------------------------ + + /** Default constructor. */ + protected PKIXCertPathChecker() + { + super(); + } + + // Cloneable interface. + // ------------------------------------------------------------------------ + + public Object clone() + { + try + { + return super.clone(); + } + catch (CloneNotSupportedException cnse) + { + throw new InternalError(cnse.getMessage()); + } + } + + // Abstract methods. + // ------------------------------------------------------------------------ + + /** + * Initialize this PKIXCertPathChecker. If subclasses support forward + * checking, a value of true can be passed to this method, and + * certificates can be validated from the target certificate to the + * most-trusted certifcate. + * + * @param forward The direction of this PKIXCertPathChecker. + * @throws CertPathValidatorException If forward is true and + * this class does not support forward checking. + */ + public abstract void init(boolean forward) throws CertPathValidatorException; + + /** + * Returns whether or not this class supports forward checking. + * + * @return Whether or not this class supports forward checking. + */ + public abstract boolean isForwardCheckingSupported(); + + /** + * Returns an immutable set of X.509 extension object identifiers (OIDs) + * supported by this PKIXCertPathChecker. + * + * @return An immutable set of Strings of the supported X.509 OIDs, or + * null if no extensions are supported. + */ + public abstract Set getSupportedExtensions(); + + /** + * Checks a certificate, removing any critical extensions that are + * resolved in this check. + * + * @param cert The certificate to check. + * @param unresolvedCritExts The (mutable) collection of as-of-yet + * unresolved critical extensions, as OID strings. + * @throws CertPathValidatorException If this certificate fails this + * check. + */ + public abstract void check(Certificate cert, Collection unresolvedCritExts) + throws CertPathValidatorException; + } diff -Nrc3pad gcc-3.3.3/libjava/java/security/cert/PKIXCertPathValidatorResult.java gcc-3.4.0/libjava/java/security/cert/PKIXCertPathValidatorResult.java *** gcc-3.3.3/libjava/java/security/cert/PKIXCertPathValidatorResult.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/security/cert/PKIXCertPathValidatorResult.java 2003-04-30 07:23:42.000000000 +0000 *************** *** 0 **** --- 1,142 ---- + /* PKIXCertPathValidatorResult.java -- PKIX cert path builder result + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.security.cert; + + import java.security.PublicKey; + + /** + * Results returned by the {@link + * CertPathValidator#validate(java.security.cert.CertPath,java.security.cert.CertPathParameters)} + * method for PKIX {@link CertPathValidator}s. + * + * @see CertPathValidator + */ + public class PKIXCertPathValidatorResult implements CertPathValidatorResult + { + + // Fields. + // ------------------------------------------------------------------------ + + /** The trust anchor. */ + private final TrustAnchor trustAnchor; + + /** The root node of the policy tree. */ + private final PolicyNode policyTree; + + /** The subject's public key. */ + private final PublicKey subjectPublicKey; + + // Constructor. + // ------------------------------------------------------------------------ + + /** + * Creates a new PKIXCertPathValidatorResult. + * + * @param trustAnchor The trust anchor. + * @param policyTree The root node of the policy tree. + * @param subjectPublicKey The public key. + * @throws NullPointerException If either trustAnchor or + * subjectPublicKey is null. + */ + public PKIXCertPathValidatorResult(TrustAnchor trustAnchor, + PolicyNode policyTree, + PublicKey subjectPublicKey) + { + if (trustAnchor == null || subjectPublicKey == null) + throw new NullPointerException(); + this.trustAnchor = trustAnchor; + this.policyTree = policyTree; + this.subjectPublicKey = subjectPublicKey; + } + + // Instance methods. + // ------------------------------------------------------------------------ + + /** + * Returns the trust anchor. + * + * @return The trust anchor. + */ + public TrustAnchor getTrustAnchor() + { + return trustAnchor; + } + + /** + * Returns the root node of the policy tree. + * + * @return The root node of the policy tree. + */ + public PolicyNode getPolicyTree() + { + return policyTree; + } + + /** + * Returns the subject public key. + * + * @return The subject public key. + */ + public PublicKey getPublicKey() + { + return subjectPublicKey; + } + + /** + * Returns a copy of this object. + * + * @return The copy. + */ + public Object clone() + { + return new PKIXCertPathValidatorResult(trustAnchor, policyTree, + subjectPublicKey); + } + + /** + * Returns a printable string representation of this result. + * + * @return A printable string representation of this result. + */ + public String toString() + { + return "[ Trust Anchor=" + trustAnchor + "; Policy Tree=" + + policyTree + "; Subject Public Key=" + subjectPublicKey + " ]"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/security/cert/PKIXParameters.java gcc-3.4.0/libjava/java/security/cert/PKIXParameters.java *** gcc-3.3.3/libjava/java/security/cert/PKIXParameters.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/security/cert/PKIXParameters.java 2003-04-30 07:23:42.000000000 +0000 *************** *** 0 **** --- 1,546 ---- + /* PKIXParameters.java -- parameters for the PKIX cert path algorithm + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.security.cert; + + import java.security.InvalidAlgorithmParameterException; + import java.security.KeyStore; + import java.security.KeyStoreException; + + import java.util.Collections; + import java.util.Date; + import java.util.Enumeration; + import java.util.HashSet; + import java.util.Iterator; + import java.util.LinkedList; + import java.util.List; + import java.util.Set; + + /** + * Parameters for verifying certificate paths using the PKIX + * (Public-Key Infrastructure (X.509)) algorithm. + * + * @see CertPathBulider + */ + public class PKIXParameters implements CertPathParameters + { + + // Fields. + // ------------------------------------------------------------------------ + + /** The trusted certificates. */ + private final Set trustAnchors; + + /** The set of initial policy identifiers. */ + private final Set initPolicies; + + /** The list of certificate stores. */ + private final List certStores; + + /** The list of path checkers. */ + private final List pathCheckers; + + /** The revocation enabled flag. */ + private boolean revocationEnabled; + + /** The explicit policy required flag. */ + private boolean exPolicyRequired; + + /** The policy mapping inhibited flag. */ + private boolean policyMappingInhibited; + + /** The any policy inhibited flag. */ + private boolean anyPolicyInhibited; + + /** The policy qualifiers rejected flag. */ + private boolean policyQualRejected; + + /** The target validation date. */ + private Date date; + + /** The signature algorithm provider. */ + private String sigProvider; + + /** The target constraints. */ + private CertSelector targetConstraints; + + // Constructors. + // ------------------------------------------------------------------------ + + /** + * Create a new PKIXParameters object, populating the trusted + * certificates set with all certificates found in the given key + * store. All certificates found in the key store are assumed to be + * trusted by this constructor. + * + * @param keystore The key store. + * @throws KeyStoreException If the certificates cannot be retrieved + * from the key store. + * @throws InvalidAlgorithmParameterException If there are no + * certificates in the key store. + * @throws NullPointerException If keystore is null. + */ + public PKIXParameters(KeyStore keystore) + throws KeyStoreException, InvalidAlgorithmParameterException + { + this(); + for (Enumeration e = keystore.aliases(); e.hasMoreElements(); ) + { + String alias = (String) e.nextElement(); + if (!keystore.isCertificateEntry(alias)) + continue; + Certificate cert = keystore.getCertificate(alias); + if (cert instanceof X509Certificate) + trustAnchors.add(new TrustAnchor((X509Certificate) cert, null)); + } + if (trustAnchors.isEmpty()) + throw new InvalidAlgorithmParameterException("no certs in the key store"); + } + + /** + * Create a new PKIXParameters object, populating the trusted + * certificates set with the elements of the given set, each of which + * must be a {@link TrustAnchor}. + * + * @param trustAnchors The set of trust anchors. + * @throws InvalidAlgorithmParameterException If there are no + * certificates in the set. + * @throws NullPointerException If trustAnchors is null. + * @throws ClassCastException If every element in trustAnchors + * is not a {@link TrustAnchor}. + */ + public PKIXParameters(Set trustAnchors) + throws InvalidAlgorithmParameterException + { + this(); + setTrustAnchors(trustAnchors); + } + + /** + * Default constructor. + */ + private PKIXParameters() + { + trustAnchors = new HashSet(); + initPolicies = new HashSet(); + certStores = new LinkedList(); + pathCheckers = new LinkedList(); + revocationEnabled = true; + exPolicyRequired = false; + policyMappingInhibited = false; + anyPolicyInhibited = false; + policyQualRejected = true; + } + + /** + * Copying constructor for cloning. + * + * @param that The instance being cloned. + */ + private PKIXParameters(PKIXParameters that) + { + this(); + this.trustAnchors.addAll(that.trustAnchors); + this.initPolicies.addAll(that.initPolicies); + this.certStores.addAll(that.certStores); + this.pathCheckers.addAll(that.pathCheckers); + this.revocationEnabled = that.revocationEnabled; + this.exPolicyRequired = that.exPolicyRequired; + this.policyMappingInhibited = that.policyMappingInhibited; + this.anyPolicyInhibited = that.anyPolicyInhibited; + this.policyQualRejected = that.policyQualRejected; + this.date = that.date; + this.sigProvider = that.sigProvider; + this.targetConstraints = that.targetConstraints != null + ? (CertSelector) that.targetConstraints.clone() : null; + } + + // Instance methods. + // ------------------------------------------------------------------------ + + /** + * Returns an immutable set of trust anchors. The set returned will + * never be null and will never be empty. + * + * @return A (never null, never empty) immutable set of trust anchors. + */ + public Set getTrustAnchors() + { + return Collections.unmodifiableSet(trustAnchors); + } + + /** + * Sets the trust anchors of this class, replacing the current trust + * anchors with those in the given set. The supplied set is copied to + * prevent modification. + * + * @param trustAnchors The new set of trust anchors. + * @throws InvalidAlgorithmParameterException If there are no + * certificates in the set. + * @throws NullPointerException If trustAnchors is null. + * @throws ClassCastException If every element in trustAnchors + * is not a {@link TrustAnchor}. + */ + public void setTrustAnchors(Set trustAnchors) + throws InvalidAlgorithmParameterException + { + if (trustAnchors.isEmpty()) + throw new InvalidAlgorithmParameterException("no trust anchors"); + this.trustAnchors.clear(); + for (Iterator i = trustAnchors.iterator(); i.hasNext(); ) + { + this.trustAnchors.add((TrustAnchor) i.next()); + } + } + + /** + * Returns the set of initial policy identifiers (as OID strings). If + * any policy is accepted, this method returns the empty set. + * + * @return An immutable set of initial policy OID strings, or the + * empty set if any policy is acceptable. + */ + public Set getInitialPolicies() + { + return Collections.unmodifiableSet(initPolicies); + } + + /** + * Sets the initial policy identifiers (as OID strings). If the + * argument is null or the empty set, then any policy identifier will + * be accepted. + * + * @param initPolicies The new set of policy strings, or null. + * @throws ClassCastException If any element in initPolicies is + * not a string. + */ + public void setInitialPolicies(Set initPolicies) + { + this.initPolicies.clear(); + if (initPolicies == null) + return; + for (Iterator i = initPolicies.iterator(); i.hasNext(); ) + { + this.initPolicies.add((String) i.next()); + } + } + + /** + * Add a {@link CertStore} to the list of cert stores. + * + * @param store The CertStore to add. + */ + public void addCertStore(CertStore store) + { + if (store != null) + certStores.add(store); + } + + /** + * Returns an immutable list of cert stores. This method never returns + * null. + * + * @return The list of cert stores. + */ + public List getCertStores() + { + return Collections.unmodifiableList(certStores); + } + + /** + * Set the cert stores. If the argument is null the list of cert + * stores will be empty. + * + * @param certStores The cert stores. + */ + public void setCertStores(List certStores) + { + this.certStores.clear(); + if (certStores == null) + return; + for (Iterator i = certStores.iterator(); i.hasNext(); ) + { + this.certStores.add((CertStore) i.next()); + } + } + + /** + * Returns the value of the revocation enabled flag. The default + * value for this flag is true. + * + * @return The revocation enabled flag. + */ + public boolean isRevocationEnabled() + { + return revocationEnabled; + } + + /** + * Sets the value of the revocation enabled flag. + * + * @param value The new value. + */ + public void setRevocationEnabled(boolean value) + { + revocationEnabled = value; + } + + /** + * Returns the value of the explicit policy required flag. The + * default value of this flag is false. + * + * @return The explicit policy required flag. + */ + public boolean isExplicitPolicyRequired() + { + return exPolicyRequired; + } + + /** + * Sets the value of the explicit policy required flag. + * + * @param value The new value. + */ + public void setExplicitPolicyRequired(boolean value) + { + exPolicyRequired = value; + } + + /** + * Returns the value of the policy mapping inhibited flag. The + * default value of this flag is false. + * + * @return The policy mapping inhibited flag. + */ + public boolean isPolicyMappingInhibited() + { + return policyMappingInhibited; + } + + /** + * Sets the value of the policy mapping inhibited flag. + * + * @param value The new value. + */ + public void setPolicyMappingInhibited(boolean value) + { + policyMappingInhibited = value; + } + + /** + * Returns the value of the any policy inhibited flag. The + * default value of this flag is false. + * + * @return The any policy inhibited flag. + */ + public boolean isAnyPolicyInhibited() + { + return anyPolicyInhibited; + } + + /** + * Sets the value of the any policy inhibited flag. + * + * @param value The new value. + */ + public void setAnyPolicyInhibited(boolean value) + { + anyPolicyInhibited = value; + } + + /** + * Returns the value of the policy qualifiers enabled flag. The + * default value of this flag is true. + * + * @return The policy qualifiers enabled flag. + */ + public boolean getPolicyQualifiersRejected() + { + return policyQualRejected; + } + + /** + * Sets the value of the policy qualifiers enabled flag. + * + * @param value The new value. + */ + public void setPolicyQualifiersRejected(boolean value) + { + policyQualRejected = value; + } + + /** + * Returns the date for which the certificate path should be + * validated, or null if the current time should be used. The date + * object is copied to prevent subsequent modification. + * + * @return The date, or null if not set. + */ + public Date getDate() + { + return date != null ? (Date) date.clone() : null; + } + + /** + * Sets the date for which the certificate path should be validated, + * or null if the current time should be used. + * + * @param date The new date, or null. + */ + public void setDate(Date date) + { + if (date != null) + this.date = (Date) date.clone(); + else + this.date = null; + } + + /** + * Add a certificate path checker. + * + * @param checker The certificate path checker to add. + */ + public void addCertPathChecker(PKIXCertPathChecker checker) + { + if (checker != null) + pathCheckers.add(checker); + } + + /** + * Returns an immutable list of all certificate path checkers. + * + * @return An immutable list of all certificate path checkers. + */ + public List getCertPathCheckers() + { + return Collections.unmodifiableList(pathCheckers); + } + + /** + * Sets the certificate path checkers. If the argument is null, the + * list of checkers will merely be cleared. + * + * @param pathCheckers The new list of certificate path checkers. + * @throws ClassCastException If any element of pathCheckers is + * not a {@link PKIXCertPathChecker}. + */ + public void setCertPathCheckers(List pathCheckers) + { + this.pathCheckers.clear(); + if (pathCheckers == null) + return; + for (Iterator i = pathCheckers.iterator(); i.hasNext(); ) + { + this.pathCheckers.add((PKIXCertPathChecker) i.next()); + } + } + + /** + * Returns the signature algorithm provider, or null if not set. + * + * @return The signature algorithm provider, or null if not set. + */ + public String getSigProvider() + { + return sigProvider; + } + + /** + * Sets the signature algorithm provider, or null if there is no + * preferred provider. + * + * @param sigProvider The signature provider name. + */ + public void setSigProvider(String sigProvider) + { + this.sigProvider = sigProvider; + } + + /** + * Returns the constraints placed on the target certificate, or null + * if there are none. The target constraints are copied to prevent + * subsequent modification. + * + * @return The target constraints, or null. + */ + public CertSelector getTargetCertConstraints() + { + return targetConstraints != null + ? (CertSelector) targetConstraints.clone() : null; + } + + /** + * Sets the constraints placed on the target certificate. + * + * @param targetConstraints The target constraints. + */ + public void setTargetCertConstraints(CertSelector targetConstraints) + { + this.targetConstraints = targetConstraints != null + ? (CertSelector) targetConstraints.clone() : null; + } + + /** + * Returns a copy of these parameters. + * + * @return The copy. + */ + public Object clone() + { + return new PKIXParameters(this); + } + + /** + * Returns a printable representation of these parameters. + * + * @return A printable representation of these parameters. + */ + public String toString() { + return "[ Trust Anchors: " + trustAnchors + "; Initial Policy OIDs=" + + (initPolicies != null ? initPolicies.toString() : "any") + + "; Validity Date=" + date + "; Signature Provider=" + + sigProvider + "; Default Revocation Enabled=" + revocationEnabled + + "; Explicit Policy Required=" + exPolicyRequired + + "; Policy Mapping Inhibited=" + policyMappingInhibited + + "; Any Policy Inhibited=" + anyPolicyInhibited + + "; Policy Qualifiers Rejected=" + policyQualRejected + + "; Target Cert Contstraints=" + targetConstraints + + "; Certification Path Checkers=" + pathCheckers + + "; CertStores=" + certStores + " ]"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/security/cert/PolicyNode.java gcc-3.4.0/libjava/java/security/cert/PolicyNode.java *** gcc-3.3.3/libjava/java/security/cert/PolicyNode.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/security/cert/PolicyNode.java 2003-04-30 07:23:42.000000000 +0000 *************** *** 0 **** --- 1,102 ---- + /* PolicyNode.java -- a single node in a policy tree + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.security.cert; + + public interface PolicyNode + { + + /** + * Get the iterator of the child nodes of this node. The returned + * iterator is (naturally) unmodifiable. + * + * @return An iterator over the child nodes. + */ + java.util.Iterator getChildren(); + + /** + * Get the depth of this node within the tree, starting at 0 for the + * root node. + * + * @return The depth of this node. + */ + int getDepth(); + + /** + * Returns a set of policies (string OIDs) that will satisfy this + * node's policy. The root node should always return the singleton set + * with the element "any-policy". + * + * @return The set of expected policies. + */ + java.util.Set getExpectedPolicies(); + + /** + * Returns the parent node of this node, or null if this is the root + * node. + * + * @return The parent node, or null. + */ + PolicyNode getParent(); + + /** + * Returns a set of {@link PolicyQualifierInfo} objects that qualify + * the valid policy of this node. The root node should always return + * the empty set. + * + * @return The set of {@link PolicyQualifierInfo} objects. + */ + java.util.Set getPolicyQualifiers(); + + /** + * Get the policy OID this node represents. The root node should return + * the special value "any-policy". + * + * @return The policy of this node. + */ + String getValidPolicy(); + + /** + * Return the criticality flag of this policy node. Nodes who return + * true for this method should be considered critical. The root node + * is never critical. + * + * @return The criticality flag. + */ + boolean isCritical(); + } diff -Nrc3pad gcc-3.3.3/libjava/java/security/cert/PolicyQualifierInfo.java gcc-3.4.0/libjava/java/security/cert/PolicyQualifierInfo.java *** gcc-3.3.3/libjava/java/security/cert/PolicyQualifierInfo.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/security/cert/PolicyQualifierInfo.java 2003-06-27 16:11:27.000000000 +0000 *************** *** 0 **** --- 1,172 ---- + /* PolicyQualifierInfo.java -- policy qualifier info object. + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.security.cert; + + import java.io.ByteArrayInputStream; + import java.io.ByteArrayOutputStream; + import java.io.IOException; + + import gnu.java.io.ASN1ParsingException; + import gnu.java.security.OID; + import gnu.java.security.der.DER; + import gnu.java.security.der.DEREncodingException; + import gnu.java.security.der.DERReader; + import gnu.java.security.der.DERValue; + import gnu.java.security.der.DERWriter; + + /** + * The PolicyQualifierInfo X.509 certificate extension. + * PolicyQualifierInfo objects are represented by the ASN.1 structure: + * + *

                +  * PolicyQualifierInfo ::= SEQUENCE {
                +  *    policyQualifierId   PolicyQualifierId,
                +  *    qualifier           ANY DEFINED BY policyQualifierId
                +  * }
                +  *
                +  * PolicyQualifierId ::= OBJECT IDENTIFIER
                +  * 
                + * + * @since JDK 1.4 + */ + public final class PolicyQualifierInfo + { + + // Fields. + // ------------------------------------------------------------------------ + + /** The policyQualifierId field. */ + private OID oid; + + /** The DER encoded form of this object. */ + private byte[] encoded; + + /** The DER encoded form of the qualifier field. */ + private DERValue qualifier; + + // Constructor. + // ------------------------------------------------------------------------ + + /** + * Create a new PolicyQualifierInfo object from the DER encoded form + * passed in the byte array. The argument is copied. + * + *

                The ASN.1 form of PolicyQualifierInfo is: +

                + PolicyQualifierInfo ::= SEQUENCE {
                +    policyQualifierId     PolicyQualifierId,
                +    qualifier             ANY DEFINED BY policyQualifierId
                + }
                + 
                + PolicyQualifierId ::= OBJECT IDENTIFIER
                + 
                + * + * @param encoded The DER encoded form. + * @throws IOException If the structure cannot be parsed from the + * encoded bytes. + */ + public PolicyQualifierInfo(byte[] encoded) throws IOException + { + if (encoded == null) + throw new IOException("null bytes"); + this.encoded = (byte[]) encoded.clone(); + DERReader in = new DERReader(new ByteArrayInputStream(this.encoded)); + DERValue qualInfo = in.read(); + if (!qualInfo.isConstructed()) + throw new ASN1ParsingException("malformed PolicyQualifierInfo"); + DERValue val = in.read(); + if (!(val.getValue() instanceof OID)) + throw new ASN1ParsingException("value read not an OBJECT IDENTIFIER"); + oid = (OID) val.getValue(); + if (val.getEncodedLength() < val.getLength()) + qualifier = in.read(); + } + + // Instance methods. + // ------------------------------------------------------------------------ + + /** + * Returns the policyQualifierId field of this structure, + * as a dotted-decimal representation of the object identifier. + * + * @return This structure's OID field. + */ + public String getPolicyQualifierId() + { + return oid.toString(); + } + + /** + * Returns the DER encoded form of this object; the contents of the + * returned byte array are equivalent to those that were passed to the + * constructor. The byte array is cloned every time this method is + * called. + * + * @return The encoded form. + */ + public byte[] getEncoded() + { + return (byte[]) encoded.clone(); + } + + /** + * Get the qualifier field of this object, as a DER + * encoded byte array. The byte array returned is cloned every time + * this method is called. + * + * @return The encoded qualifier. + */ + public byte[] getPolicyQualifier() + { + if (qualifier == null) + return new byte[0]; + return qualifier.getEncoded(); + } + + /** + * Returns a printable string representation of this object. + * + * @return The string representation. + */ + public String toString() + { + return "PolicyQualifierInfo { policyQualifierId ::= " + oid + + ", qualifier ::= " + qualifier + " }"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/security/cert/TrustAnchor.java gcc-3.4.0/libjava/java/security/cert/TrustAnchor.java *** gcc-3.3.3/libjava/java/security/cert/TrustAnchor.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/security/cert/TrustAnchor.java 2003-04-30 07:23:42.000000000 +0000 *************** *** 0 **** --- 1,188 ---- + /* TrustAnchor.java -- an ultimately-trusted certificate. + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.security.cert; + + import java.io.ByteArrayInputStream; + import java.io.IOException; + + import java.security.PublicKey; + + import gnu.java.security.x509.X500DistinguishedName; + + /** + * An ultimately-trusted certificate to serve as the root of a + * certificate chain. + * + * @author Casey Marshall (rsdio@metastatic.org) + */ + public class TrustAnchor + { + + // Fields. + // ------------------------------------------------------------------------ + + /** The certificate authority's distinguished name. */ + private final X500DistinguishedName caName; + + /** The certficate authority's public key. */ + private final PublicKey caKey; + + /** The certficate authority's certificate. */ + private final X509Certificate trustedCert; + + /** The encoded name constraints bytes. */ + private final byte[] nameConstraints; + + // Constnuctors. + // ------------------------------------------------------------------------ + + /** + * Create a new trust anchor from a certificate and (optional) name + * constraints. + * + *

                If the nameConstraints argument in non-null, it will be + * copied to prevent modification. + * + * @param trustedCert The trusted certificate. + * @param nameConstraints The encoded nameConstraints. + */ + public TrustAnchor(X509Certificate trustedCert, byte[] nameConstraints) + { + if (trustedCert == null) + throw new NullPointerException(); + this.trustedCert = trustedCert; + caName = null; + caKey = null; + if (nameConstraints != null) + this.nameConstraints = (byte[]) nameConstraints.clone(); + else + this.nameConstraints = null; + } + + /** + * Create a new trust anchor from a certificate authority's + * distinguished name, public key, and (optional) name constraints. + * + *

                If the nameConstraints argument in non-null, it will be + * copied to prevent modification. + * + * @params caName The CA's distinguished name. + * @params caKey The CA's public key. + * @params nameConstraints The encoded nameConstraints. + */ + public TrustAnchor(String caName, PublicKey caKey, byte[] nameConstraints) + { + if (caName == null || caKey == null) + throw new NullPointerException(); + if (caName.length() == 0) + throw new IllegalArgumentException(); + trustedCert = null; + this.caName = new X500DistinguishedName(caName); + this.caKey = caKey; + if (nameConstraints != null) + this.nameConstraints = (byte[]) nameConstraints.clone(); + else + this.nameConstraints = null; + } + + // Instance methods. + // ------------------------------------------------------------------------ + + /** + * Return the trusted certificate, or null if none was specified. + * + * @return The trusted certificate. + */ + public final X509Certificate getTrustedCert() + { + return trustedCert; + } + + /** + * Return the certificate authority's distinguished name, or null if + * none was specified. + * + * @return The CA's distinguished name. + */ + public final String getCAName() + { + if (caName != null) + return caName.toRFC2253(); + return null; + } + + /** + * Return the certificate authority's public key, or null if none was + * specified. + * + * @return The CA's public key. + */ + public final PublicKey getCAPublicKey() + { + return caKey; + } + + /** + * Return the encoded name constraints, or null if none was specified. + * + *

                The name constraints byte array is copied when this method is + * called to prevent modification. + * + * @return The encoded name constraints. + */ + public final byte[] getNameConstraints() + { + if (nameConstraints == null) + return null; + return (byte[]) nameConstraints.clone(); + } + + /** + * Return a printable representation of this trust anchor. + * + * @return The printable representation. + */ + public String toString() + { + if (trustedCert == null) + return "[ Trusted CA Public Key=" + caKey + ", Trusted CA Issuer Name=" + + caName.toRFC2253() + " ]"; + return "[ Trusted CA Certificate=" + trustedCert + " ]"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/security/cert/X509Certificate.java gcc-3.4.0/libjava/java/security/cert/X509Certificate.java *** gcc-3.3.3/libjava/java/security/cert/X509Certificate.java 2002-01-22 22:40:33.000000000 +0000 --- gcc-3.4.0/libjava/java/security/cert/X509Certificate.java 2003-05-10 07:12:48.000000000 +0000 *************** *** 1,5 **** /* X509Certificate.java --- X.509 Certificate class ! Copyright (C) 1999 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* X509Certificate.java --- X.509 Certificate class ! Copyright (C) 1999,2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,42 **** --- 37,43 ---- package java.security.cert; + import java.math.BigInteger; import java.security.Principal; import java.security.PublicKey; *************** import java.security.SignatureException; *** 47,136 **** import java.util.Date; /** ! X509Certificate is the abstract class for X.509 certificates. ! This provides a stanard class interface for accessing all ! the attributes of X.509 certificates. ! ! In June 1996, the basic X.509 v3 format was finished by ! ISO/IEC and ANSI X.9. The ASN.1 DER format is below: ! ! Certificate ::= SEQUENCE { ! tbsCertificate TBSCertificate, ! signatureAlgorithm AlgorithmIdentifier, ! signatureValue BIT STRING } ! ! These certificates are widely used in various Internet ! protocols to support authentication. It is used in ! Privacy Enhanced Mail (PEM), Transport Layer Security (TLS), ! Secure Sockets Layer (SSL), code signing for trusted software ! distribution, and Secure Electronic Transactions (SET). ! ! The certificates are managed and vouched for by ! Certificate Authorities (CAs). CAs are companies or ! groups that create certificates by placing the data in the ! X.509 certificate format and signing it with their private ! key. CAs serve as trusted third parties by certifying that ! the person or group specified in the certificate is who ! they say they are. ! ! The ASN.1 defintion for tbsCertificate is ! ! TBSCertificate ::= SEQUENCE { ! version [0] EXPLICIT Version DEFAULT v1, ! serialNumber CertificateSerialNumber, ! signature AlgorithmIdentifier, ! issuer Name, ! validity Validity, ! subject Name, ! subjectPublicKeyInfo SubjectPublicKeyInfo, ! issuerUniqueID [1] IMPLICIT UniqueIdentifier OPTIONAL, ! -- If present, version shall be v2 or v3 ! subjectUniqueID [2] IMPLICIT UniqueIdentifier OPTIONAL, ! -- If present, version shall be v2 or v3 ! extensions [3] EXPLICIT Extensions OPTIONAL ! -- If present, version shall be v3 ! } ! ! Version ::= INTEGER { v1(0), v2(1), v3(2) } ! ! CertificateSerialNumber ::= INTEGER ! ! Validity ::= SEQUENCE { ! notBefore Time, ! notAfter Time } ! ! Time ::= CHOICE { ! utcTime UTCTime, ! generalTime GeneralizedTime } ! ! UniqueIdentifier ::= BIT STRING ! ! SubjectPublicKeyInfo ::= SEQUENCE { ! algorithm AlgorithmIdentifier, ! subjectPublicKey BIT STRING } ! ! Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension ! ! Extension ::= SEQUENCE { ! extnID OBJECT IDENTIFIER, ! critical BOOLEAN DEFAULT FALSE, ! extnValue OCTET STRING } ! ! ! Certificates are created with the CertificateFactory. ! For more information about X.509 certificates, consult ! rfc2459. ! ! @since JDK 1.2 ! ! @author Mark Benvenuto ! */ public abstract class X509Certificate extends Certificate implements X509Extension { /** ! Constructs a new certificate of the specified type. ! */ protected X509Certificate() { super( "X.509" ); --- 48,152 ---- import java.util.Date; /** ! * X509Certificate is the abstract class for X.509 certificates. ! * This provides a stanard class interface for accessing all ! * the attributes of X.509 certificates. ! * ! *

                In June 1996, the basic X.509 v3 format was finished by ! * ISO/IEC and ANSI X.9. The ASN.1 DER format is below: ! * ! *

                !  * Certificate  ::=  SEQUENCE  {
                !  *   tbsCertificate       TBSCertificate,
                !  *   signatureAlgorithm   AlgorithmIdentifier,
                !  *   signatureValue       BIT STRING  }
                !  * 
                ! * ! *

                These certificates are widely used in various Internet ! * protocols to support authentication. It is used in ! * Privacy Enhanced Mail (PEM), Transport Layer Security (TLS), ! * Secure Sockets Layer (SSL), code signing for trusted software ! * distribution, and Secure Electronic Transactions (SET). ! * ! *

                The certificates are managed and vouched for by ! * Certificate Authorities (CAs). CAs are companies or ! * groups that create certificates by placing the data in the ! * X.509 certificate format and signing it with their private ! * key. CAs serve as trusted third parties by certifying that ! * the person or group specified in the certificate is who ! * they say they are. ! * ! *

                The ASN.1 defintion for tbsCertificate is ! * ! *

                !  * TBSCertificate  ::=  SEQUENCE  {
                !  *   version         [0]  EXPLICIT Version DEFAULT v1,
                !  *   serialNumber         CertificateSerialNumber,
                !  *   signature            AlgorithmIdentifier,
                !  *   issuer               Name,
                !  *   validity             Validity,
                !  *   subject              Name,
                !  *   subjectPublicKeyInfo SubjectPublicKeyInfo,
                !  *   issuerUniqueID  [1]  IMPLICIT UniqueIdentifier OPTIONAL,
                !  *                        -- If present, version shall be v2 or v3
                !  *   subjectUniqueID [2]  IMPLICIT UniqueIdentifier OPTIONAL,
                !  *                        -- If present, version shall be v2 or v3
                !  *   extensions      [3]  EXPLICIT Extensions OPTIONAL
                !  *                        -- If present, version shall be v3
                !  * }
                !  *
                !  * Version  ::=  INTEGER  {  v1(0), v2(1), v3(2)  }
                !  *
                !  * CertificateSerialNumber  ::=  INTEGER
                !  *
                !  * Validity ::= SEQUENCE {
                !  *   notBefore      Time,
                !  *   notAfter       Time }
                !  *
                !  * Time ::= CHOICE {
                !  *   utcTime        UTCTime,
                !  *   generalTime    GeneralizedTime }
                !  *
                !  * UniqueIdentifier  ::=  BIT STRING
                !  *
                !  * SubjectPublicKeyInfo  ::=  SEQUENCE  {
                !  *   algorithm            AlgorithmIdentifier,
                !  *   subjectPublicKey     BIT STRING  }
                !  *
                !  * Extensions  ::=  SEQUENCE SIZE (1..MAX) OF Extension
                !  *
                !  * Extension  ::=  SEQUENCE  {
                !  *   extnID      OBJECT IDENTIFIER,
                !  *   critical    BOOLEAN DEFAULT FALSE,
                !  *   extnValue   OCTET STRING  }
                !  * 
                ! * ! * Certificates are created with the CertificateFactory. ! * ! *

                References: ! * ! *

                  ! *
                1. Olivier Dubuisson, Philippe Fouquart (Translator) ASN.1 - ! * Communication between heterogeneous systems, (C) September 2000, ! * Morgan Kaufmann Publishers, ISBN 0-12-6333361-0. Available on-line at ! * http://www.oss.com/asn1/dubuisson.html
                2. ! *
                3. R. Housley et al, RFC ! * 3280: Internet X.509 Public Key Infrastructure Certificate and CRL ! * Profile.
                4. ! *
                ! * ! * @since JDK 1.2 ! * @author Mark Benvenuto ! * @author Casey Marshall (rsdio@metastatic.org) ! */ public abstract class X509Certificate extends Certificate implements X509Extension { + private static final long serialVersionUID = -2491127588187038216L; /** ! * Constructs a new certificate of the specified type. ! */ protected X509Certificate() { super( "X.509" ); *************** public abstract class X509Certificate ex *** 451,455 **** --- 467,591 ---- */ public abstract int getBasicConstraints(); + // 1.4 instance methods. + // ------------------------------------------------------------------------ + /** + * Returns the ExtendedKeyUsage extension of this + * certificate, or null if there is no extension present. The returned + * value is a {@link java.util.List} strings representing the object + * identifiers of the extended key usages. This extension has the OID + * 2.5.29.37. + * + *

                The ASN.1 definition for this extension is: + * + *

                 
                +    * ExtendedKeyUsage ::= SEQUENCE SIZE (1..MAX) OF KeyPurposeId
                +    *
                +    * KeyPurposeId ::= OBJECT IDENTIFIER
                +    * 
                + * + * @return The list of extension OIDs, or null if there are none + * present in this certificate. + * @throws CertificateParsingException If this extension cannot be + * parsed from its encoded form. + */ + public java.util.List getExtendedKeyUsage() + throws CertificateParsingException + { + throw new UnsupportedOperationException(); + } + + /** + * Returns the alternative names for this certificate's subject (the + * owner), or null if there are none. + * + *

                This is an X.509 extension with OID 2.5.29.17 and is defined by + * the ASN.1 construction: + * + *

                +    * SubjectAltNames ::= GeneralNames
                +    *
                +    * GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName
                +    *
                +    * GeneralName ::= CHOICE {
                +    *   otherName                 [0]   OtherName,
                +    *   rfc822Name                [1]   IA5String,
                +    *   dNSName                   [2]   IA5String,
                +    *   x400Address               [3]   ORAddress,
                +    *   directoryName             [4]   Name,
                +    *   ediPartyName              [5]   EDIPartyName,
                +    *   uniformResourceIdentifier [6]   IA5String,
                +    *   iPAddress                 [7]   OCTET STRING,
                +    *   registeredID              [8]   OBJECT IDENTIFIER
                +    * }
                +    * 
                + * + *

                The returned collection contains one or more two-element Lists, + * with the first object being an Integer representing the choice + * above (with value 0 through 8) and the second being an (a) String + * if the GeneralName is a rfc822Name, dNSName, + * uniformResourceIdentifier, iPAddress, or registeredID, or (b) a + * byte array of the DER encoded form for any others. + * + * @return The collection of alternative names, or null if there are + * none. + * @throws CertificateParsingException If the encoded extension cannot + * be parsed. + * @since JDK 1.4 + */ + public java.util.Collection getSubjectAlternativeNames() + throws CertificateParsingException + { + throw new UnsupportedOperationException(); + } + + /** + * Returns the alternative names for this certificate's issuer, or + * null if there are none. + * + *

                This is an X.509 extension with OID 2.5.29.18, and is defined by + * the ASN.1 construction: + * + *

                +    * IssuerAltNames ::= GeneralNames
                +    * 
                + * + *

                The GeneralNames construct and the form of the + * returned collection are the same as with {@link + * #getSubjectAlternativeNames()}. + * + * @return The collection of alternative names, or null if there are + * none. + * @throws CertificateParsingException If the encoded extension cannot + * be parsed. + * @since JDK 1.4 + */ + public java.util.Collection getIssuerAlternativeNames() + throws CertificateParsingException + { + throw new UnsupportedOperationException(); + } + + /** + * Returns the X.500 distinguished name of this certificate's subject. + * + * @return The subject's X.500 distinguished name. + * @since JDK 1.4 + */ + public javax.security.auth.x500.X500Principal getSubjectX500Principal() + { + throw new UnsupportedOperationException(); + } + + /** + * Returns the X.500 distinguished name of this certificate's issuer. + * + * @return The issuer's X.500 distinguished name. + * @since JDK 1.4 + */ + public javax.security.auth.x500.X500Principal getIssuerX500Principal() + { + throw new UnsupportedOperationException(); + } } diff -Nrc3pad gcc-3.3.3/libjava/java/security/cert/X509CRL.java gcc-3.4.0/libjava/java/security/cert/X509CRL.java *** gcc-3.3.3/libjava/java/security/cert/X509CRL.java 2002-01-22 22:40:33.000000000 +0000 --- gcc-3.4.0/libjava/java/security/cert/X509CRL.java 2003-04-30 07:23:42.000000000 +0000 *************** import java.security.SignatureException; *** 47,52 **** --- 47,54 ---- import java.util.Date; import java.util.Set; + import javax.security.auth.x500.X500Principal; + /** The X509CRL class is the abstract class used to manage X.509 Certificate Revocation Lists. The CRL is a list of *************** public abstract class X509CRL extends CR *** 378,381 **** --- 380,396 ---- */ public abstract byte[] getSigAlgParams(); + // 1.4 instance methods. + // ------------------------------------------------------------------------ + + /** + * Returns the X.500 distinguished name of this CRL's issuer. + * + * @return The issuer's X.500 distinguished name. + * @since JDK 1.4 + */ + public X500Principal getIssuerX500Principal() + { + throw new UnsupportedOperationException(); + } } diff -Nrc3pad gcc-3.3.3/libjava/java/security/cert/X509Extension.java gcc-3.4.0/libjava/java/security/cert/X509Extension.java *** gcc-3.3.3/libjava/java/security/cert/X509Extension.java 2002-01-22 22:40:33.000000000 +0000 --- gcc-3.4.0/libjava/java/security/cert/X509Extension.java 2003-10-11 19:00:06.000000000 +0000 *************** public interface X509Extension *** 81,87 **** @return true if has unsupported extension, false otherwise */ ! public boolean hasUnsupportedCriticalExtension(); /** Returns a set of the CRITICAL extension OIDs from the --- 81,87 ---- @return true if has unsupported extension, false otherwise */ ! boolean hasUnsupportedCriticalExtension(); /** Returns a set of the CRITICAL extension OIDs from the *************** public interface X509Extension *** 91,97 **** @return A Set containing the OIDs. If there are no CRITICAL extensions or extensions at all this returns null. */ ! public Set getCriticalExtensionOIDs(); /** Returns a set of the NON-CRITICAL extension OIDs from the --- 91,97 ---- @return A Set containing the OIDs. If there are no CRITICAL extensions or extensions at all this returns null. */ ! Set getCriticalExtensionOIDs(); /** Returns a set of the NON-CRITICAL extension OIDs from the *************** public interface X509Extension *** 101,113 **** @return A Set containing the OIDs. If there are no NON-CRITICAL extensions or extensions at all this returns null. */ ! public Set getNonCriticalExtensionOIDs(); /** Returns the DER encoded OCTET string for the specified extension value identified by a OID. The OID is a string of number separated by periods. Ex: 12.23.45.67 */ ! public byte[] getExtensionValue(String oid); } --- 101,113 ---- @return A Set containing the OIDs. If there are no NON-CRITICAL extensions or extensions at all this returns null. */ ! Set getNonCriticalExtensionOIDs(); /** Returns the DER encoded OCTET string for the specified extension value identified by a OID. The OID is a string of number separated by periods. Ex: 12.23.45.67 */ ! byte[] getExtensionValue(String oid); } diff -Nrc3pad gcc-3.3.3/libjava/java/security/Certificate.java gcc-3.4.0/libjava/java/security/Certificate.java *** gcc-3.3.3/libjava/java/security/Certificate.java 2002-05-24 11:57:12.000000000 +0000 --- gcc-3.4.0/libjava/java/security/Certificate.java 2003-06-27 16:11:26.000000000 +0000 *************** this exception to your version of the li *** 35,40 **** --- 35,41 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package java.security; import java.io.InputStream; *************** public interface Certificate *** 62,68 **** * this certificate. * * @return the Principal guaranteeing the certificate - * @deprecated this entire interface is deprecated */ Principal getGuarantor(); --- 63,68 ---- *************** public interface Certificate *** 71,77 **** * this certificate. * * @return the Principal guaranteed by this certificate - * @deprecated this entire interface is deprecated */ Principal getPrincipal(); --- 71,76 ---- *************** public interface Certificate *** 80,86 **** * is being guaranteed. * * @return the PublicKey of the Principal being guaranteed - * @deprecated this entire interface is deprecated */ PublicKey getPublicKey(); --- 79,84 ---- *************** public interface Certificate *** 93,99 **** * @throws IOException if an error occurs writing to the stream * @see #decode(InputStream) * @see #getFormat() - * @deprecated this entire interface is deprecated */ void encode(OutputStream out) throws KeyException, IOException; --- 91,96 ---- *************** public interface Certificate *** 105,111 **** * @throws IOException if an error occurs reading from the stream * @see #encode(OutputStream) * @see #getFormat() - * @deprecated this entire interface is deprecated */ void decode(InputStream in) throws KeyException, IOException; --- 102,107 ---- *************** public interface Certificate *** 115,121 **** * decode methods. * * @return the encoding format being used - * @deprecated this entire interface is deprecated */ String getFormat(); --- 111,116 ---- *************** public interface Certificate *** 125,131 **** * * @param detail true to provided more detailed information * @return the string representation - * @deprecated this entire interface is deprecated */ String toString(boolean detail); } // interface Certificate --- 120,125 ---- diff -Nrc3pad gcc-3.3.3/libjava/java/security/DigestInputStream.java gcc-3.4.0/libjava/java/security/DigestInputStream.java *** gcc-3.3.3/libjava/java/security/DigestInputStream.java 2002-01-22 22:40:30.000000000 +0000 --- gcc-3.4.0/libjava/java/security/DigestInputStream.java 2003-12-02 15:52:07.000000000 +0000 *************** *** 1,5 **** /* DigestInputStream.java --- An Input stream tied to a message digest ! Copyright (C) 1999 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* DigestInputStream.java --- An Input stream tied to a message digest ! Copyright (C) 1999, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** public class DigestInputStream extends F *** 138,144 **** int temp = in.read(b, off, len); if (state == true && temp != -1) ! digest.update(b, off, len); return temp; } --- 138,144 ---- int temp = in.read(b, off, len); if (state == true && temp != -1) ! digest.update(b, off, temp); return temp; } diff -Nrc3pad gcc-3.3.3/libjava/java/security/Identity.java gcc-3.4.0/libjava/java/security/Identity.java *** gcc-3.3.3/libjava/java/security/Identity.java 2002-10-04 20:15:07.000000000 +0000 --- gcc-3.4.0/libjava/java/security/Identity.java 2003-05-10 07:12:47.000000000 +0000 *************** *** 1,7 **** /* Identity.java --- Identity Class ! Copyright (C) 1999 Free Software Foundation, Inc. ! This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by --- 1,7 ---- /* Identity.java --- Identity Class ! Copyright (C) 1999, 2003, Free Software Foundation, Inc. ! This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by *************** obligated to do so. If you do not wish *** 36,70 **** exception statement from your version. */ package java.security; import java.io.Serializable; import java.util.Vector; /** ! The Identity class is used to repsent people and companies that ! can be authenticated using public key encryption. The identities ! can also be abstract objects such as smart cards. ! ! Identity object store a name and public key for each identity. ! The names cannot be changed and the identities can be scoped. ! Each identity (name and public key) within a scope is unique ! to that scope. ! ! Each identity has a set of ceritificates which all specify the ! same public key but not necessarily the same name. ! ! The Identity class can be subclassed to allow additional ! information to be attached to it. ! ! @since JDK 1.1 ! ! @deprecated Use java.security.KeyStore, the java.security.cert ! package, and java.security.Principal. ! ! @author Mark Benvenuto */ public abstract class Identity implements Principal, Serializable { ! static final long serialVersionUID = 3609922007826600659L; private String name; private IdentityScope scope; --- 36,75 ---- exception statement from your version. */ package java.security; + import java.io.Serializable; import java.util.Vector; /** ! *

                This class represents identities: real-world objects such as people, ! * companies or organizations whose identities can be authenticated using their ! * public keys. Identities may also be more abstract (or concrete) constructs, ! * such as daemon threads or smart cards.

                ! * ! *

                All Identity objects have a name and a public key. Names ! * are immutable. Identities may also be scoped. That is, if an ! * Identity is specified to have a particular scope, then the ! * name and public key of the Identity are unique within ! * that scope.

                ! * ! *

                An Identity also has a set of certificates (all certifying ! * its own public key). The Principal names specified in these ! * certificates need not be the same, only the key.

                ! * ! *

                An Identity can be subclassed, to include postal and email ! * addresses, telephone numbers, images of faces and logos, and so on.

                ! * ! * @author Mark Benvenuto ! * @see IdentityScope ! * @see Signer ! * @see Principal ! * @deprecated This class is no longer used. Its functionality has been replaced ! * by java.security.KeyStore, the java.security.cert ! * package, and java.security.Principal. */ public abstract class Identity implements Principal, Serializable { ! private static final long serialVersionUID = 3609922007826600659L; private String name; private IdentityScope scope; *************** public abstract class Identity implement *** 72,93 **** private String info; private Vector certificates; ! /** ! Creates a new instance of Identity from Serialized Data ! */ protected Identity() { } /** ! Creates a new instance of Identity with the specified name ! and IdentityScope. ! ! @param name the name to use ! @param scope the scope to use ! ! @throws KeyManagementException if the identity is already ! present */ public Identity(String name, IdentityScope scope) throws KeyManagementException --- 77,94 ---- private String info; private Vector certificates; ! /** Constructor for serialization only. */ protected Identity() { } /** ! * Constructs an identity with the specified name and scope. ! * ! * @param name the identity name. ! * @param scope the scope of the identity. ! * @throws KeyManagementException if there is already an identity with the ! * same name in the scope. */ public Identity(String name, IdentityScope scope) throws KeyManagementException *************** public abstract class Identity implement *** 97,106 **** } /** ! Creates a new instance of Identity with the specified name ! and no scope. ! ! @param name the name to use */ public Identity(String name) { --- 98,106 ---- } /** ! * Constructs an identity with the specified name and no scope. ! * ! * @param name the identity name. */ public Identity(String name) { *************** public abstract class Identity implement *** 109,117 **** } /** ! Gets the name for this Identity. ! ! @return the name */ public final String getName() { --- 109,117 ---- } /** ! * Returns this identity's name. ! * ! * @return the name of this identity. */ public final String getName() { *************** public abstract class Identity implement *** 119,127 **** } /** ! Gets the scope for this Identity. ! ! @return the scope */ public final IdentityScope getScope() { --- 119,127 ---- } /** ! * Returns this identity's scope. ! * ! * @return the scope of this identity. */ public final IdentityScope getScope() { *************** public abstract class Identity implement *** 129,137 **** } /** ! Gets the public key for this identity. ! ! @return the public key */ public PublicKey getPublicKey() { --- 129,138 ---- } /** ! * Returns this identity's public key. ! * ! * @return the public key for this identity. ! * @see #setPublicKey(java.security.PublicKey) */ public PublicKey getPublicKey() { *************** public abstract class Identity implement *** 139,156 **** } /** ! Sets the public key for this identity. ! The old key and all certificates are removed. ! ! This class checks the security manager with the call ! checkSecurityAccess with "setIdentityPublicKey". ! ! @param key the public key to use ! ! @throws KeyManagementException if this public key is used by ! another identity in the current scope. ! @throws SecurityException - if the security manager denies ! access to "setIdentityPublicKey" */ public void setPublicKey(PublicKey key) throws KeyManagementException { --- 140,160 ---- } /** ! *

                Sets this identity's public key. The old key and all of this identity's ! * certificates are removed by this operation.

                ! * ! *

                First, if there is a security manager, its checkSecurityAccess() ! * method is called with "setIdentityPublicKey" as its ! * argument to see if it's ok to set the public key.

                ! * ! * @param key the public key for this identity. ! * @throws KeyManagementException if another identity in the identity's scope ! * has the same public key, or if another exception occurs. ! * @throws SecurityException if a security manager exists and its ! * checkSecurityAccess() method doesn't allow setting the public ! * key. ! * @see #getPublicKey() ! * @see SecurityManager#checkSecurityAccess(String) */ public void setPublicKey(PublicKey key) throws KeyManagementException { *************** public abstract class Identity implement *** 162,176 **** } /** ! Sets the general information string. ! ! This class checks the security manager with the call ! checkSecurityAccess with "setIdentityInfo". ! ! @param info the general information string. ! ! @throws SecurityException - if the security manager denies ! access to "setIdentityInfo" */ public void setInfo(String info) { --- 166,183 ---- } /** ! *

                Specifies a general information string for this identity.

                ! * ! *

                First, if there is a security manager, its checkSecurityAccess() ! * method is called with "setIdentityInfo" as its ! * argument to see if it's ok to specify the information string.

                ! * ! * @param info the information string. ! * @throws SecurityException if a security manager exists and its ! * checkSecurityAccess() method doesn't allow setting the ! * information string. ! * @see #getInfo() ! * @see SecurityManager#checkSecurityAccess(String) */ public void setInfo(String info) { *************** public abstract class Identity implement *** 182,190 **** } /** ! Gets the general information string. ! ! @return the string */ public String getInfo() { --- 189,198 ---- } /** ! * Returns general information previously specified for this identity. ! * ! * @return general information about this identity. ! * @see #setInfo(String) */ public String getInfo() { *************** public abstract class Identity implement *** 192,241 **** } /** ! Adds a certificate to the list of ceritificates for this ! identity. The public key in this certificate must match the ! existing public key if it exists. ! ! This class checks the security manager with the call ! checkSecurityAccess with "addIdentityCertificate". ! ! @param certificate the certificate to add ! ! @throws KeyManagementException if the certificate is invalid ! or the public key conflicts ! @throws SecurityException - if the security manager denies ! access to "addIdentityCertificate" */ ! public void addCertificate(java.security.Certificate certificate) throws KeyManagementException { SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkSecurityAccess("addIdentityCertificate"); ! //Check public key of this certificate against the first one ! //in the vector if (certificates.size() > 0) { ! if (((Certificate) certificates.firstElement()).getPublicKey() != ! publicKey) throw new KeyManagementException("Public key does not match"); } certificates.addElement(certificate); } /** ! Removes a certificate from the list of ceritificates for this ! identity. ! ! This class checks the security manager with the call ! checkSecurityAccess with "removeIdentityCertificate". ! ! @param certificate the certificate to add ! ! @throws KeyManagementException if the certificate is invalid ! @throws SecurityException - if the security manager denies ! access to "removeIdentityCertificate" */ public void removeCertificate(Certificate certificate) throws KeyManagementException --- 200,253 ---- } /** ! *

                Adds a certificate for this identity. If the identity has a public key, ! * the public key in the certificate must be the same, and if the identity ! * does not have a public key, the identity's public key is set to be that ! * specified in the certificate.

                ! * ! *

                First, if there is a security manager, its checkSecurityAccess() ! * method is called with "addIdentityCertificate" as its ! * argument to see if it's ok to add a certificate.

                ! * ! * @param certificate the certificate to be added. ! * @throws KeyManagementException if the certificate is not valid, if the ! * public key in the certificate being added conflicts with this identity's ! * public key, or if another exception occurs. ! * @throws SecurityException if a security manager exists and its ! * checkSecurityAccess() method doesn't allow adding a ! * certificate. ! * @see SecurityManager#checkSecurityAccess(String) */ ! public void addCertificate(Certificate certificate) throws KeyManagementException { SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkSecurityAccess("addIdentityCertificate"); ! // Check public key of this certificate against the first one in the vector if (certificates.size() > 0) { ! if (((Certificate) certificates.firstElement()).getPublicKey() != publicKey) throw new KeyManagementException("Public key does not match"); } certificates.addElement(certificate); } /** ! *

                Removes a certificate from this identity.

                ! * ! *

                First, if there is a security manager, its checkSecurityAccess() ! * method is called with "removeIdentityCertificate" as ! * its argument to see if it's ok to remove a certificate.

                ! * ! * @param certificate the certificate to be removed. ! * @throws KeyManagementException if the certificate is missing, or if ! * another exception occurs. ! * @throws SecurityException if a security manager exists and its ! * checkSecurityAccess() method doesn't allow removing a ! * certificate. ! * @see SecurityManager#checkSecurityAccess(String) */ public void removeCertificate(Certificate certificate) throws KeyManagementException *************** public abstract class Identity implement *** 251,259 **** } /** ! Returns an array of certificates for this identity. ! ! @returns array of certificates */ public Certificate[] certificates() { --- 263,271 ---- } /** ! * Returns a copy of all the certificates for this identity. ! * ! * @return a copy of all the certificates for this identity. */ public Certificate[] certificates() { *************** public abstract class Identity implement *** 261,276 **** int max = certificates.size(); for (int i = 0; i < max; i++) certs[i] = (Certificate) certificates.elementAt(i); return certs; } /** ! Checks for equality between this Identity and the specified ! object. If first checks if they are the same object, then ! if the name and scope matches and returns true if successful. ! If these tests fail, identityEquals is called. ! ! @return true if they are equal, false otherwise */ public final boolean equals(Object identity) { --- 273,294 ---- int max = certificates.size(); for (int i = 0; i < max; i++) certs[i] = (Certificate) certificates.elementAt(i); + return certs; } /** ! * Tests for equality between the specified object and this identity. This ! * first tests to see if the entities actually refer to the same object, in ! * which case it returns true. Next, it checks to see if the ! * entities have the same name and the same scope. If they do, ! * the method returns true. Otherwise, it calls ! * identityEquals(), which subclasses should override. ! * ! * @param identity the object to test for equality with this identity. ! * @return true if the objects are considered equal, false ! * otherwise. ! * @see #identityEquals(Identity) */ public final boolean equals(Object identity) { *************** public abstract class Identity implement *** 289,299 **** } /** ! Checks for equality between this Identity and the specified ! object. A subclass should override this method. The default ! behavior is to return true if the public key and names match. ! ! @return true if they are equal, false otherwise */ protected boolean identityEquals(Identity identity) { --- 307,321 ---- } /** ! * Tests for equality between the specified identity and this ! * identity. This method should be overriden by subclasses to test for ! * equality. The default behavior is to return true if the names ! * and public keys are equal. ! * ! * @param identity the identity to test for equality with this identity. ! * @return true if the identities are considered equal, ! * false otherwise. ! * @see #equals(Object) */ protected boolean identityEquals(Identity identity) { *************** public abstract class Identity implement *** 302,316 **** } /** ! Returns a string representing this Identity. ! ! This class checks the security manager with the call ! checkSecurityAccess with "printIdentity". ! ! @returns a string representing this Identity. ! ! @throws SecurityException - if the security manager denies ! access to "printIdentity" */ public String toString() { --- 324,342 ---- } /** ! *

                Returns a short string describing this identity, telling its name and ! * its scope (if any).

                ! * ! *

                First, if there is a security manager, its checkSecurityAccess() ! * method is called with "printIdentity" as its argument ! * to see if it's ok to return the string.

                ! * ! * @return information about this identity, such as its name and the name of ! * its scope (if any). ! * @throws SecurityException if a security manager exists and its ! * checkSecurityAccess() method doesn't allow returning a string ! * describing this identity. ! * @see SecurityManager#checkSecurityAccess(String) */ public String toString() { *************** public abstract class Identity implement *** 323,340 **** } /** ! Returns a detailed string representing this Identity. ! ! This class checks the security manager with the call ! checkSecurityAccess with "printIdentity". ! ! @param detailed indicates whether or not to provide detailed ! information ! ! @returns a string representing this Identity. ! ! @throws SecurityException - if the security manager denies ! access to "printIdentity" */ public String toString(boolean detailed) { --- 349,371 ---- } /** ! *

                Returns a string representation of this identity, with optionally more ! * details than that provided by the toString() method without ! * any arguments.

                ! * ! *

                First, if there is a security manager, its checkSecurityAccess() ! * method is called with "printIdentity" as its argument ! * to see if it's ok to return the string.

                ! * ! * @param detailed whether or not to provide detailed information. ! * @return information about this identity. If detailed is true, ! * then this method returns more information than that provided by the ! * toString() method without any arguments. ! * @throws SecurityException if a security manager exists and its ! * checkSecurityAccess() method doesn't allow returning a string ! * describing this identity. ! * @see #toString() ! * @see SecurityManager#checkSecurityAccess(String) */ public String toString(boolean detailed) { *************** public abstract class Identity implement *** 355,363 **** } /** ! Gets the hashcode for this Identity. ! ! @returns the hashcode */ public int hashCode() { --- 386,394 ---- } /** ! * Returns a hashcode for this identity. ! * ! * @return a hashcode for this identity. */ public int hashCode() { diff -Nrc3pad gcc-3.3.3/libjava/java/security/IdentityScope.java gcc-3.4.0/libjava/java/security/IdentityScope.java *** gcc-3.3.3/libjava/java/security/IdentityScope.java 2002-01-22 22:40:30.000000000 +0000 --- gcc-3.4.0/libjava/java/security/IdentityScope.java 2003-05-10 07:12:47.000000000 +0000 *************** *** 1,7 **** /* IdentityScope.java --- IdentityScope Class ! Copyright (C) 1999 Free Software Foundation, Inc. ! This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by --- 1,7 ---- /* IdentityScope.java --- IdentityScope Class ! Copyright (C) 1999, 2003, Free Software Foundation, Inc. ! This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by *************** obligated to do so. If you do not wish *** 36,68 **** exception statement from your version. */ package java.security; import java.util.Enumeration; /** ! IdentityScope represents a scope of an identity. IdentityScope ! is also an Identity and can have a name and scope along with ! the other qualitites identities posses. ! ! An IdentityScope contains other Identity objects. All Identity ! objects are manipulated in the scope the same way. The scope ! is suppose to apply different scope to different type of ! Identities. ! ! No identity within the same scope can have the same public key. ! ! @since JDK 1.1 ! ! @deprecated Use java.security.KeyStore, the java.security.cert ! package, and java.security.Principal. ! ! @author Mark Benvenuto */ public abstract class IdentityScope extends Identity { private static IdentityScope systemScope = null; /** ! Creates a new instance of IdentityScope from Serialized Data */ protected IdentityScope() { --- 36,81 ---- exception statement from your version. */ package java.security; + import java.util.Enumeration; /** ! *

                This class represents a scope for identities. It is an Identity itself, ! * and therefore has a name and can have a scope. It can also optionally have a ! * public key and associated certificates.

                ! * ! *

                An IdentityScope can contain {@link Identity} objects of all ! * kinds, including {@link Signer}s. All types of Identity objects ! * can be retrieved, added, and removed using the same methods. Note that it is ! * possible, and in fact expected, that different types of identity scopes will ! * apply different policies for their various operations on the various types of ! * Identities.

                ! * ! *

                There is a one-to-one mapping between keys and identities, and there can ! * only be one copy of one key per scope. For example, suppose Acme Software, ! * Inc is a software publisher known to a user. Suppose it is an Identity, ! * that is, it has a public key, and a set of associated certificates. It is ! * named in the scope using the name "Acme Software". No other named Identity ! * in the scope has the same public key. Of course, none has the same name ! * as well.

                ! * ! * @author Mark Benvenuto ! * @see Identity ! * @see Signer ! * @see Principal ! * @see Key ! * @deprecated This class is no longer used. Its functionality has been replaced ! * by java.security.KeyStore, the java.security.cert ! * package, and java.security.Principal. */ public abstract class IdentityScope extends Identity { + private static final long serialVersionUID = -2337346281189773310L; private static IdentityScope systemScope = null; /** ! * This constructor is used for serialization only and should not be used by ! * subclasses. */ protected IdentityScope() { *************** public abstract class IdentityScope exte *** 70,79 **** } /** ! Creates a new instance of IdentityScope with the specified name ! and no scope. ! ! @param name the name to use */ public IdentityScope(String name) { --- 83,91 ---- } /** ! * Constructs a new identity scope with the specified name. ! * ! * @param name the scope name. */ public IdentityScope(String name) { *************** public abstract class IdentityScope exte *** 81,94 **** } /** ! Creates a new instance of IdentityScope with the specified name ! and IdentityScope. ! ! @param name the name to use ! @param scope the scope to use ! ! @throws KeyManagementException if the identity scope is already ! present */ public IdentityScope(String name, IdentityScope scope) throws KeyManagementException --- 93,104 ---- } /** ! * Constructs a new identity scope with the specified name and scope. ! * ! * @param name the scope name. ! * @param scope the scope for the new identity scope. ! * @throws KeyManagementException if there is already an identity with the ! * same name in the scope. */ public IdentityScope(String name, IdentityScope scope) throws KeyManagementException *************** public abstract class IdentityScope exte *** 97,103 **** } /** ! Gets the system's Scope. */ public static IdentityScope getSystemScope() { --- 107,116 ---- } /** ! * Returns the system's identity scope. ! * ! * @return the system's identity scope. ! * @see #setSystemScope(IdentityScope) */ public static IdentityScope getSystemScope() { *************** public abstract class IdentityScope exte *** 110,124 **** } /** ! Sets the scope of the system. ! ! This class checks the security manager with the call ! checkSecurityAccess with "setSystemScope". ! ! @param scope the new sustem scope ! ! @throws SecurityException - if the security manager denies ! access to "setSystemScope" */ protected static void setSystemScope(IdentityScope scope) { --- 123,140 ---- } /** ! *

                Sets the system's identity scope.

                ! * ! *

                First, if there is a security manager, its checkSecurityAccess() ! * method is called with "setSystemScope" as its argument ! * to see if it's ok to set the identity scope.

                ! * ! * @param scope the scope to set. ! * @throws SecurityException if a security manager exists and its ! * checkSecurityAccess() method doesn't allow setting the ! * identity scope. ! * @see #getSystemScope() ! * @see SecurityManager#checkSecurityAccess(String) */ protected static void setSystemScope(IdentityScope scope) { *************** public abstract class IdentityScope exte *** 130,160 **** } /** ! Gets the number of entries within this IdentityScope. ! ! @returns the number of entries */ public abstract int size(); /** ! Gets the specified Identity within this scope ! by specified name. ! ! @param name name of Identity to get ! ! @returns an identity representing the name or null if it ! cannot be found */ public abstract Identity getIdentity(String name); /** ! Gets the specified Identity within this scope ! by the specified Principal. ! ! @param principal The Principal of the Identity to get ! ! @returns an identity representing the principal or null if it ! cannot be found */ public Identity getIdentity(Principal principal) { --- 146,174 ---- } /** ! * Returns the number of identities within this identity scope. ! * ! * @return the number of identities within this identity scope. */ public abstract int size(); /** ! * Returns the identity in this scope with the specified name (if any). ! * ! * @param name the name of the identity to be retrieved. ! * @return the identity named name, or null if there are no ! * identities named name in this scope. */ public abstract Identity getIdentity(String name); /** ! * Retrieves the identity whose name is the same as that of the specified ! * principal. (Note: Identity implements Principal.) ! * ! * @param principal the principal corresponding to the identity to be ! * retrieved. ! * @return the identity whose name is the same as that of the principal, or ! * null if there are no identities of the same name in this scope. */ public Identity getIdentity(Principal principal) { *************** public abstract class IdentityScope exte *** 162,216 **** } /** ! Gets the specified Identity within this scope ! by the specified public key. ! ! @param key the PublicKey of the Identity to get ! ! @returns an identity representing the public key or null if it ! cannot be found */ public abstract Identity getIdentity(PublicKey key); /** ! Adds an identity to his scope. ! ! @param identity the identity to add ! ! @throws KeyManagementException if it is an invalid identity, ! an identity with the same key exists, or another error ! occurs. */ public abstract void addIdentity(Identity identity) throws KeyManagementException; /** ! Removes an identity to his scope. ! ! @param identity the identity to remove ! ! @throws KeyManagementException if it is a missing identity, ! or another error occurs. */ public abstract void removeIdentity(Identity identity) throws KeyManagementException; /** ! Returns an Enumeration of identities. ! ! @returns an enumeration of the identities. */ public abstract Enumeration identities(); /** ! Returns a string representing this IdentityScope. ! It includes the name, the scope name, and number of identities. ! ! @returns a string representing this IdentityScope. */ public String toString() { ! return (super.getName() + " " + super.getScope().getName() ! + " " + size()); } } --- 176,226 ---- } /** ! * Retrieves the identity with the specified public key. ! * ! * @param key the public key for the identity to be returned. ! * @return the identity with the given key, or null if there are ! * no identities in this scope with that key. */ public abstract Identity getIdentity(PublicKey key); /** ! * Adds an identity to this identity scope. ! * ! * @param identity the identity to be added. ! * @throws KeyManagementException if the identity is not valid, a name ! * conflict occurs, another identity has the same public key as the identity ! * being added, or another exception occurs. */ public abstract void addIdentity(Identity identity) throws KeyManagementException; /** ! * Removes an identity from this identity scope. ! * ! * @param identity the identity to be removed. ! * @throws KeyManagementException if the identity is missing, or another ! * exception occurs. */ public abstract void removeIdentity(Identity identity) throws KeyManagementException; /** ! * Returns an enumeration of all identities in this identity scope. ! * ! * @return an enumeration of all identities in this identity scope. */ public abstract Enumeration identities(); /** ! * Returns a string representation of this identity scope, including its name, ! * its scope name, and the number of identities in this identity scope. ! * ! * @return a string representation of this identity scope. ! * @see SecurityManager#checkSecurityAccess(String) */ public String toString() { ! return (super.getName() + " " + super.getScope().getName() + " " + size()); } } diff -Nrc3pad gcc-3.3.3/libjava/java/security/interfaces/DSAKey.java gcc-3.4.0/libjava/java/security/interfaces/DSAKey.java *** gcc-3.3.3/libjava/java/security/interfaces/DSAKey.java 2002-01-22 22:40:34.000000000 +0000 --- gcc-3.4.0/libjava/java/security/interfaces/DSAKey.java 2003-10-11 19:00:07.000000000 +0000 *************** public interface DSAKey *** 52,56 **** * * @return The DSA parameters */ ! public abstract DSAParams getParams(); } --- 52,56 ---- * * @return The DSA parameters */ ! DSAParams getParams(); } diff -Nrc3pad gcc-3.3.3/libjava/java/security/interfaces/DSAKeyPairGenerator.java gcc-3.4.0/libjava/java/security/interfaces/DSAKeyPairGenerator.java *** gcc-3.3.3/libjava/java/security/interfaces/DSAKeyPairGenerator.java 2002-01-22 22:40:34.000000000 +0000 --- gcc-3.4.0/libjava/java/security/interfaces/DSAKeyPairGenerator.java 2003-10-11 19:00:07.000000000 +0000 *************** public interface DSAKeyPairGenerator *** 62,68 **** * * @exception InvalidParameterException If the parameters passed are not valid */ ! public abstract void initialize(DSAParams params, SecureRandom random) throws InvalidParameterException; /** --- 62,68 ---- * * @exception InvalidParameterException If the parameters passed are not valid */ ! void initialize (DSAParams params, SecureRandom random) throws InvalidParameterException; /** *************** public interface DSAKeyPairGenerator *** 80,86 **** * * @exception InvalidParameterException If a parameter is invalid */ ! public abstract void initialize(int modlen, boolean genParams, ! SecureRandom random) throws InvalidParameterException; } --- 80,85 ---- * * @exception InvalidParameterException If a parameter is invalid */ ! void initialize (int modlen, boolean genParams, SecureRandom random) throws InvalidParameterException; } diff -Nrc3pad gcc-3.3.3/libjava/java/security/interfaces/DSAParams.java gcc-3.4.0/libjava/java/security/interfaces/DSAParams.java *** gcc-3.3.3/libjava/java/security/interfaces/DSAParams.java 2002-01-22 22:40:34.000000000 +0000 --- gcc-3.4.0/libjava/java/security/interfaces/DSAParams.java 2003-10-11 19:00:07.000000000 +0000 *************** public interface DSAParams *** 54,72 **** * * @return The DSA base value */ ! public abstract BigInteger getG(); /** * Returns the prime, or 'p' value * * @return The DSA prime value */ ! public abstract BigInteger getP(); /** * Returns the subprime, or 'q' value * * @return The DSA subprime value */ ! public abstract BigInteger getQ(); } --- 54,72 ---- * * @return The DSA base value */ ! BigInteger getG(); /** * Returns the prime, or 'p' value * * @return The DSA prime value */ ! BigInteger getP(); /** * Returns the subprime, or 'q' value * * @return The DSA subprime value */ ! BigInteger getQ(); } diff -Nrc3pad gcc-3.3.3/libjava/java/security/interfaces/DSAPrivateKey.java gcc-3.4.0/libjava/java/security/interfaces/DSAPrivateKey.java *** gcc-3.3.3/libjava/java/security/interfaces/DSAPrivateKey.java 2002-01-22 22:40:34.000000000 +0000 --- gcc-3.4.0/libjava/java/security/interfaces/DSAPrivateKey.java 2003-10-11 19:00:07.000000000 +0000 *************** public interface DSAPrivateKey extends D *** 52,56 **** /** * This method returns the value of the DSA private key */ ! public BigInteger getX(); } --- 52,56 ---- /** * This method returns the value of the DSA private key */ ! BigInteger getX(); } diff -Nrc3pad gcc-3.3.3/libjava/java/security/interfaces/DSAPublicKey.java gcc-3.4.0/libjava/java/security/interfaces/DSAPublicKey.java *** gcc-3.3.3/libjava/java/security/interfaces/DSAPublicKey.java 2002-01-22 22:40:34.000000000 +0000 --- gcc-3.4.0/libjava/java/security/interfaces/DSAPublicKey.java 2003-10-11 19:00:07.000000000 +0000 *************** public interface DSAPublicKey extends DS *** 52,56 **** /** * This method returns the value of the DSA public key */ ! public BigInteger getY(); } --- 52,56 ---- /** * This method returns the value of the DSA public key */ ! BigInteger getY(); } diff -Nrc3pad gcc-3.3.3/libjava/java/security/interfaces/RSAKey.java gcc-3.4.0/libjava/java/security/interfaces/RSAKey.java *** gcc-3.3.3/libjava/java/security/interfaces/RSAKey.java 2002-01-22 22:40:34.000000000 +0000 --- gcc-3.4.0/libjava/java/security/interfaces/RSAKey.java 2003-10-11 19:00:07.000000000 +0000 *************** exception statement from your version. * *** 37,42 **** --- 37,44 ---- package java.security.interfaces; + import java.math.BigInteger; + /** A generic RSA Key interface for public and private keys *************** public interface RSAKey *** 51,55 **** @returns a modulus */ ! public java.math.BigInteger getModulus(); } --- 53,57 ---- @returns a modulus */ ! BigInteger getModulus(); } diff -Nrc3pad gcc-3.3.3/libjava/java/security/interfaces/RSAMultiPrimePrivateCrtKey.java gcc-3.4.0/libjava/java/security/interfaces/RSAMultiPrimePrivateCrtKey.java *** gcc-3.3.3/libjava/java/security/interfaces/RSAMultiPrimePrivateCrtKey.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/security/interfaces/RSAMultiPrimePrivateCrtKey.java 2003-04-19 20:54:55.000000000 +0000 *************** *** 0 **** --- 1,110 ---- + /* RSAMultiPrimePrivateCrtKey.java -- + Copyright (C) 2003, Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package java.security.interfaces; + + import java.math.BigInteger; + import java.security.spec.RSAOtherPrimeInfo; + + /** + * The interface to an RSA multi-prime private key, as defined in the PKCS#1 + * v2.1, using the Chinese Remainder Theorem (CRT) information values. + * + * @since 1.4 + * @see java.security.spec.RSAPrivateKeySpec + * @see java.security.spec.RSAMultiPrimePrivateCrtKeySpec + * @see RSAPrivateKey + * @see RSAPrivateCrtKey + */ + public interface RSAMultiPrimePrivateCrtKey extends RSAPrivateKey + { + // Constants + // -------------------------------------------------------------------------- + + // Methods + // -------------------------------------------------------------------------- + + /** + * Returns the public exponent. + * + * @return the public exponent. + */ + BigInteger getPublicExponent(); + + /** + * Returns the primeP. + * + * @return the primeP. + */ + BigInteger getPrimeP(); + + /** + * Returns the primeQ. + * + * @return the primeQ. + */ + BigInteger getPrimeQ(); + + /** + * Returns the primeExponentP. + * + * @return the primeExponentP. + */ + BigInteger getPrimeExponentP(); + + /** + * Returns the primeExponentQ. + * + * @return the primeExponentQ. + */ + BigInteger getPrimeExponentQ(); + + /** + * Returns the crtCoefficient. + * + * @return the crtCoefficient. + */ + BigInteger getCrtCoefficient(); + + /** + * Returns the otherPrimeInfo or null if there are only two + * prime factors (p and q). + * + * @return the otherPrimeInfo. + */ + RSAOtherPrimeInfo[] getOtherPrimeInfo(); + } diff -Nrc3pad gcc-3.3.3/libjava/java/security/interfaces/RSAPrivateCrtKey.java gcc-3.4.0/libjava/java/security/interfaces/RSAPrivateCrtKey.java *** gcc-3.3.3/libjava/java/security/interfaces/RSAPrivateCrtKey.java 2002-01-22 22:40:34.000000000 +0000 --- gcc-3.4.0/libjava/java/security/interfaces/RSAPrivateCrtKey.java 2003-10-11 19:00:07.000000000 +0000 *************** public interface RSAPrivateCrtKey extend *** 54,93 **** * * @return The public exponent for this key */ ! public abstract BigInteger getPublicExponent(); /** * Returns the primeP value * * @return The primeP value */ ! public abstract BigInteger getPrimeP(); /** * Returns the primeQ value * * @return The primeQ value */ ! public abstract BigInteger getPrimeQ(); /** * Returns the primeExponentP * * @return The primeExponentP */ ! public abstract BigInteger getPrimeExponentP(); /** * Returns the primeExponentQ * * @return The primeExponentQ */ ! public abstract BigInteger getPrimeExponentQ(); /** * Returns the CRT coefficient * * @return The CRT coefficient */ ! public abstract BigInteger getCrtCoefficient(); } --- 54,93 ---- * * @return The public exponent for this key */ ! BigInteger getPublicExponent(); /** * Returns the primeP value * * @return The primeP value */ ! BigInteger getPrimeP(); /** * Returns the primeQ value * * @return The primeQ value */ ! BigInteger getPrimeQ(); /** * Returns the primeExponentP * * @return The primeExponentP */ ! BigInteger getPrimeExponentP(); /** * Returns the primeExponentQ * * @return The primeExponentQ */ ! BigInteger getPrimeExponentQ(); /** * Returns the CRT coefficient * * @return The CRT coefficient */ ! BigInteger getCrtCoefficient(); } diff -Nrc3pad gcc-3.3.3/libjava/java/security/interfaces/RSAPrivateKey.java gcc-3.4.0/libjava/java/security/interfaces/RSAPrivateKey.java *** gcc-3.3.3/libjava/java/security/interfaces/RSAPrivateKey.java 2002-01-22 22:40:34.000000000 +0000 --- gcc-3.4.0/libjava/java/security/interfaces/RSAPrivateKey.java 2003-10-11 19:00:07.000000000 +0000 *************** public interface RSAPrivateKey extends P *** 54,58 **** * * @return The private exponent value for this key */ ! public abstract BigInteger getPrivateExponent(); } --- 54,58 ---- * * @return The private exponent value for this key */ ! BigInteger getPrivateExponent(); } diff -Nrc3pad gcc-3.3.3/libjava/java/security/interfaces/RSAPublicKey.java gcc-3.4.0/libjava/java/security/interfaces/RSAPublicKey.java *** gcc-3.3.3/libjava/java/security/interfaces/RSAPublicKey.java 2002-01-22 22:40:34.000000000 +0000 --- gcc-3.4.0/libjava/java/security/interfaces/RSAPublicKey.java 2003-10-11 19:00:07.000000000 +0000 *************** public interface RSAPublicKey extends Pu *** 54,58 **** * * @return The public exponent value for this key */ ! public abstract BigInteger getPublicExponent(); } --- 54,58 ---- * * @return The public exponent value for this key */ ! BigInteger getPublicExponent(); } diff -Nrc3pad gcc-3.3.3/libjava/java/security/KeyFactory.java gcc-3.4.0/libjava/java/security/KeyFactory.java *** gcc-3.3.3/libjava/java/security/KeyFactory.java 2002-01-22 22:40:30.000000000 +0000 --- gcc-3.4.0/libjava/java/security/KeyFactory.java 2003-04-30 07:23:41.000000000 +0000 *************** *** 1,5 **** /* KeyFactory.java --- Key Factory Class ! Copyright (C) 1999 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* KeyFactory.java --- Key Factory Class ! Copyright (C) 1999, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** obligated to do so. If you do not wish *** 36,72 **** exception statement from your version. */ package java.security; import java.security.spec.KeySpec; import java.security.spec.InvalidKeySpecException; ! /** ! Key factories are used to convert keys (opaque cryptographic ! keys of type Key) into key specifications (transparent ! representations of the underlying key material). ! ! Key factories are bi-directional. They allow a key class ! to be converted into a key specification (key material) and ! back again. ! ! For example DSA public keys can be specified as ! DSAPublicKeySpec or X509EncodedKeySpec. The key factory ! translate these key specifications. ! @since JDK 1.2 @author Mark Benvenuto */ public class KeyFactory { private KeyFactorySpi keyFacSpi; private Provider provider; private String algorithm; /** ! Constructs a new keyFactory with the specified parameters. ! ! @param keyFacSpi Key Factory SPI to use ! @param provider the provider of the Key Factory SPI ! @param algorithm the name of the key algorithm for this key factory */ protected KeyFactory(KeyFactorySpi keyFacSpi, Provider provider, String algorithm) --- 36,104 ---- exception statement from your version. */ package java.security; + import java.security.spec.KeySpec; import java.security.spec.InvalidKeySpecException; + import java.security.NoSuchAlgorithmException; ! import gnu.java.security.Engine; ! /** ! *

                Key factories are used to convert keys (opaque cryptographic keys of type ! * {@link Key}) into key specifications (transparent representations of the ! * underlying key material), and vice versa.

                ! * ! *

                Key factories are bi-directional. That is, they allow you to build an ! * opaque key object from a given key specification (key material), or to ! * retrieve the underlying key material of a key object in a suitable format.

                ! * ! *

                Multiple compatible key specifications may exist for the same key. For ! * example, a DSA public key may be specified using {@link ! * java.security.spec.DSAPublicKeySpec} or {@link ! * java.security.spec.X509EncodedKeySpec}. A key factory can be used to ! * translate between compatible key specifications.

                ! * ! *

                The following is an example of how to use a key factory in order to ! * instantiate a DSA public key from its encoding. Assume Alice has ! * received a digital signature from Bob. Bob also sent her his public key (in ! * encoded format) to verify his signature. Alice then performs the following ! * actions: ! * ! *

                !  *  X509EncodedKeySpec bobPubKeySpec = new X509EncodedKeySpec(bobEncodedPubKey);
                !  *  KeyFactory keyFactory = KeyFactory.getInstance("DSA");
                !  *  PublicKey bobPubKey = keyFactory.generatePublic(bobPubKeySpec);
                !  *  Signature sig = Signature.getInstance("DSA");
                !  *  sig.initVerify(bobPubKey);
                !  *  sig.update(data);
                !  *  sig.verify(signature);
                !  * 
                ! * ! * @since 1.2 ! * @see Key ! * @see PublicKey ! * @see PrivateKey ! * @see KeySpec ! * @see java.security.spec.DSAPublicKeySpec ! * @see java.security.spec.X509EncodedKeySpec @author Mark Benvenuto */ public class KeyFactory { + /** The service name for key factories. */ + private static final String KEY_FACTORY = "KeyFactory"; + private KeyFactorySpi keyFacSpi; private Provider provider; private String algorithm; /** ! * Creates a KeyFactory object. ! * ! * @param keyFacSpi the delegate. ! * @param provider the provider. ! * @param algorithm the name of the algorithm to associate with this ! * KeyFactory. */ protected KeyFactory(KeyFactorySpi keyFacSpi, Provider provider, String algorithm) *************** public class KeyFactory *** 76,160 **** this.algorithm = algorithm; } ! /** ! Gets an instance of the KeyFactory class representing ! the specified key factory. If the algorithm is not ! found then, it throws NoSuchAlgorithmException. ! ! @param algorithm the name of algorithm to choose ! @return a KeyFactory repesenting the desired algorithm ! ! @throws NoSuchAlgorithmException if the algorithm is not implemented by providers */ public static KeyFactory getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] p = Security.getProviders(); - for (int i = 0; i < p.length; i++) ! { ! String classname = p[i].getProperty("KeyFactory." + algorithm); ! if (classname != null) ! return getInstance(classname, algorithm, p[i]); ! } throw new NoSuchAlgorithmException(algorithm); } ! /** ! Gets an instance of the KeyFactory class representing ! the specified key factory from the specified provider. ! If the algorithm is not found then, it throws ! NoSuchAlgorithmException. If the provider is not found, then ! it throws NoSuchProviderException. ! ! @param algorithm the name of algorithm to choose ! @param provider the name of the provider to find the algorithm in ! @return a KeyFactory repesenting the desired algorithm ! ! @throws NoSuchAlgorithmException if the algorithm is not implemented by the provider ! @throws NoSuchProviderException if the provider is not found */ public static KeyFactory getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException { Provider p = Security.getProvider(provider); if (p == null) throw new NoSuchProviderException(); ! return getInstance(p.getProperty("KeyFactory." + algorithm), ! algorithm, p); } ! private static KeyFactory getInstance(String classname, ! String algorithm, ! Provider provider) throws NoSuchAlgorithmException { try { ! return new KeyFactory((KeyFactorySpi) Class.forName(classname). ! newInstance(), provider, algorithm); ! } ! catch (ClassNotFoundException cnfe) ! { ! throw new NoSuchAlgorithmException("Class not found"); } ! catch (InstantiationException ie) { ! throw new NoSuchAlgorithmException("Class instantiation failed"); } ! catch (IllegalAccessException iae) { ! throw new NoSuchAlgorithmException("Illegal Access"); ! } } /** ! Gets the provider that the class is from. ! ! @return the provider of this class */ public final Provider getProvider() { --- 108,213 ---- this.algorithm = algorithm; } ! /** ! * Generates a KeyFactory object that implements the specified ! * algorithm. If the default provider package provides an implementation of ! * the requested algorithm, an instance of KeyFactory containing ! * that implementation is returned. If the algorithm is not available in the ! * default package, other packages are searched. ! * ! * @param algorithm the name of the requested key algorithm. See Appendix A ! * in the Java Cryptography Architecture API Specification & Reference ! * for information about standard algorithm names. ! * @return a KeyFactory object for the specified algorithm. ! * @throws NoSuchAlgorithmException if the requested algorithm is not ! * available in the default provider package or any of the other provider ! * packages that were searched. */ public static KeyFactory getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] p = Security.getProviders(); for (int i = 0; i < p.length; i++) ! try ! { ! return getInstance(algorithm, p[i]); ! } ! catch (NoSuchAlgorithmException ignored) {} throw new NoSuchAlgorithmException(algorithm); } ! /** ! * Generates a KeyFactory object for the specified algorithm ! * from the specified provider. ! * ! * @param algorithm the name of the requested key algorithm. See Appendix A ! * in the Java Cryptography Architecture API Specification & Reference ! * for information about standard algorithm names. ! * @param provider the name of the provider. ! * @return a KeyFactory object for the specified algorithm. ! * @throws NoSuchAlgorithmException if the algorithm is not available from ! * the specified provider. ! * @throws NoSuchProviderException if the provider has not been configured. ! * @throws IllegalArgumentException if the provider name is null or empty. ! * @see Provider */ public static KeyFactory getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException { + if (provider == null || provider.length() == 0) + throw new IllegalArgumentException("Illegal provider"); + Provider p = Security.getProvider(provider); if (p == null) throw new NoSuchProviderException(); ! return getInstance(algorithm, p); } ! /** ! * Generates a KeyFactory object for the specified algorithm from ! * the specified provider. Note: the provider doesn't have to be ! * registered. ! * ! * @param algorithm the name of the requested key algorithm. See Appendix A ! * in the Java Cryptography Architecture API Specification & Reference for ! * information about standard algorithm names. ! * @param provider the provider. ! * @return a KeyFactory object for the specified algorithm. ! * @throws NoSuchAlgorithmException if the algorithm is not available from ! * the specified provider. ! * @throws IllegalArgumentException if the provider is ! * null. ! * @since 1.4 ! * @see Provider ! */ ! public static KeyFactory getInstance(String algorithm, Provider provider) throws NoSuchAlgorithmException { + if (provider == null) + throw new IllegalArgumentException("Illegal provider"); try { ! return new KeyFactory((KeyFactorySpi) ! Engine.getInstance(KEY_FACTORY, algorithm, provider), ! provider, algorithm); } ! catch (java.lang.reflect.InvocationTargetException ite) { ! throw new NoSuchAlgorithmException(algorithm); } ! catch (ClassCastException cce) { ! throw new NoSuchAlgorithmException(algorithm); ! } } /** ! * Returns the provider of this key factory object. ! * ! * @return the provider of this key factory object. */ public final Provider getProvider() { *************** public class KeyFactory *** 162,170 **** } /** ! Returns the name of the algorithm used ! ! @return A string with the name of the algorithm */ public final String getAlgorithm() { --- 215,224 ---- } /** ! * Gets the name of the algorithm associated with this KeyFactory. ! * ! * @return the name of the algorithm associated with this ! * KeyFactory. */ public final String getAlgorithm() { *************** public class KeyFactory *** 172,223 **** } /** ! Generates a public key from the provided key specification. ! ! @param keySpec key specification ! ! @return the public key ! ! @throws InvalidKeySpecException invalid key specification for ! this key factory to produce a public key */ ! public final PublicKey generatePublic(KeySpec keySpec) throws ! InvalidKeySpecException { return keyFacSpi.engineGeneratePublic(keySpec); } /** ! Generates a private key from the provided key specification. ! ! @param keySpec key specification ! ! @return the private key ! ! @throws InvalidKeySpecException invalid key specification for ! this key factory to produce a private key */ ! public final PrivateKey generatePrivate(KeySpec keySpec) throws ! InvalidKeySpecException { return keyFacSpi.engineGeneratePrivate(keySpec); } /** ! Returns a key specification for the given key. keySpec ! identifies the specification class to return the key ! material in. ! ! @param key the key ! @param keySpec the specification class to return the ! key material in. ! ! @return the key specification in an instance of the requested ! specification class ! ! @throws InvalidKeySpecException the requested key specification ! is inappropriate for this key or the key is ! unrecognized. */ public final KeySpec getKeySpec(Key key, Class keySpec) throws InvalidKeySpecException --- 226,276 ---- } /** ! * Generates a public key object from the provided key specification (key ! * material). ! * ! * @param keySpec the specification (key material) of the public key. ! * @return the public key. ! * @throws InvalidKeySpecException if the given key specification is ! * inappropriate for this key factory to produce a public key. */ ! public final PublicKey generatePublic(KeySpec keySpec) ! throws InvalidKeySpecException { return keyFacSpi.engineGeneratePublic(keySpec); } /** ! * Generates a private key object from the provided key specification (key ! * material). ! * ! * @param keySpec the specification (key material) of the private key. ! * @return the private key. ! * @throws InvalidKeySpecException if the given key specification is ! * inappropriate for this key factory to produce a private key. */ ! public final PrivateKey generatePrivate(KeySpec keySpec) ! throws InvalidKeySpecException { return keyFacSpi.engineGeneratePrivate(keySpec); } /** ! * Returns a specification (key material) of the given key object. ! * keySpec identifies the specification class in which the key ! * material should be returned. It could, for example, be ! * DSAPublicKeySpec.class, to indicate that the key material ! * should be returned in an instance of the {@link ! * java.security.spec.DSAPublicKeySpec} class. ! * ! * @param key the key. ! * @param keySpec the specification class in which the key material should be ! * returned. ! * @return the underlying key specification (key material) in an instance of ! * the requested specification class. ! * @throws InvalidKeySpecException if the requested key specification is ! * inappropriate for the given key, or the given key cannot be processed ! * (e.g., the given key has an unrecognized algorithm or format). */ public final KeySpec getKeySpec(Key key, Class keySpec) throws InvalidKeySpecException *************** public class KeyFactory *** 226,240 **** } /** ! Translates the key from an unknown or untrusted provider ! into a key for this key factory. ! ! @param the key from an unknown or untrusted provider ! ! @return the translated key ! ! @throws InvalidKeySpecException if the key cannot be ! processed by this key factory */ public final Key translateKey(Key key) throws InvalidKeyException { --- 279,291 ---- } /** ! * Translates a key object, whose provider may be unknown or potentially ! * untrusted, into a corresponding key object of this key factory. ! * ! * @param key the key whose provider is unknown or untrusted. ! * @return the translated key. ! * @throws InvalidKeyException if the given key cannot be processed by this ! * key factory. */ public final Key translateKey(Key key) throws InvalidKeyException { diff -Nrc3pad gcc-3.3.3/libjava/java/security/Key.java gcc-3.4.0/libjava/java/security/Key.java *** gcc-3.3.3/libjava/java/security/Key.java 2002-05-24 11:57:16.000000000 +0000 --- gcc-3.4.0/libjava/java/security/Key.java 2003-10-11 19:00:04.000000000 +0000 *************** import java.io.Serializable; *** 62,68 **** public interface Key extends Serializable { /** ! * The verion identifier used for serialization. */ long serialVersionUID = 6603384152749567654L; --- 62,68 ---- public interface Key extends Serializable { /** ! * The version identifier used for serialization. */ long serialVersionUID = 6603384152749567654L; diff -Nrc3pad gcc-3.3.3/libjava/java/security/KeyPairGenerator.java gcc-3.4.0/libjava/java/security/KeyPairGenerator.java *** gcc-3.3.3/libjava/java/security/KeyPairGenerator.java 2002-11-17 00:10:24.000000000 +0000 --- gcc-3.4.0/libjava/java/security/KeyPairGenerator.java 2003-04-30 07:23:41.000000000 +0000 *************** *** 1,5 **** /* KeyPairGenerator.java --- Key Pair Generator Class ! Copyright (C) 1999, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* KeyPairGenerator.java --- Key Pair Generator Class ! Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** package java.security; *** 39,64 **** import java.security.spec.AlgorithmParameterSpec; ! /** ! KeyPairGenerator is the class used to generate key pairs ! for a security algorithm. ! ! The KeyPairGenerator is created with the getInstance() ! methods. The class is used to generate public and private ! keys for an algorithm and associate it with ! algorithm parameters. ! @author Mark Benvenuto */ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi { Provider provider; private String algorithm; /** ! Constructs a new KeyPairGenerator ! ! @param algorithm the algorithm to use */ protected KeyPairGenerator(String algorithm) { --- 39,135 ---- import java.security.spec.AlgorithmParameterSpec; ! import gnu.java.security.Engine; ! /** ! *

                The KeyPairGenerator class is used to generate pairs of ! * public and private keys. Key pair generators are constructed using the ! * getInstance() factory methods (static methods that return ! * instances of a given class).

                ! * ! *

                A Key pair generator for a particular algorithm creates a public/private ! * key pair that can be used with this algorithm. It also associates ! * algorithm-specific parameters with each of the generated keys.

                ! * ! *

                There are two ways to generate a key pair: in an algorithm-independent ! * manner, and in an algorithm-specific manner. The only difference between the ! * two is the initialization of the object:

                ! * ! *
                  ! *
                • Algorithm-Independent Initialization
                  ! * All key pair generators share the concepts of a keysize and a ! * source of randomness. The keysize is interpreted differently ! * for different algorithms (e.g., in the case of the DSA algorithm, ! * the keysize corresponds to the length of the modulus). There is an ! * initialize() method in this KeyPairGenerator ! * class that takes these two universally shared types of arguments. There ! * is also one that takes just a keysize argument, and uses the ! * {@link SecureRandom} implementation of the highest-priority installed ! * provider as the source of randomness. (If none of the installed ! * providers supply an implementation of {@link SecureRandom}, a ! * system-provided source of randomness is used.)

                  ! * ! * Since no other parameters are specified when you call the above ! * algorithm-independent initialize methods, it is up to the provider what ! * to do about the algorithm-specific parameters (if any) to be associated ! * with each of the keys.

                  ! * ! * If the algorithm is the DSA algorithm, and the keysize ! * (modulus size) is 512, 768, or 1024, ! * then the GNU provider uses a set of precomputed values for the ! * p, q, and g parameters. If the ! * modulus size is not one of the above values, the GNU ! * provider creates a new set of parameters. Other providers might have ! * precomputed parameter sets for more than just the three modulus sizes ! * mentioned above. Still others might not have a list of precomputed ! * parameters at all and instead always create new parameter sets.
                • ! * ! *
                • Algorithm-Specific Initialization
                  ! * For situations where a set of algorithm-specific parameters already ! * exists (e.g., so-called community parameters in DSA), there ! * are two initialize methods that have an {@link AlgorithmParameterSpec} ! * argument. One also has a {@link SecureRandom} argument, while the the ! * other uses the {@link SecureRandom} implementation of the highest-priority ! * installed provider as the source of randomness. (If none of the installed ! * providers supply an implementation of {@link SecureRandom}, a ! * system-provided source of randomness is used.)
                • ! *
                ! * ! *

                In case the client does not explicitly initialize the ! * KeyPairGenerator (via a call to an initialize method), each ! * provider must supply (and document) a default initialization. For example, ! * the GNU provider uses a default modulus size (keysize) of ! * 1024 bits.

                ! * ! *

                Note that this class is abstract and extends from {@link ! * KeyPairGeneratorSpi} for historical reasons. Application developers should ! * only take notice of the methods defined in this KeyPairGenerator ! * class; all the methods in the superclass are intended for cryptographic ! * service providers who wish to supply their own implementations of key pair ! * generators.

                ! * ! * @see Signature ! * @see KeyPair ! * @see AlgorithmParameterSpec ! * @author Mark Benvenuto ! * @author Casey Marshall */ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi { + /** The service name for key pair generators. */ + private static final String KEY_PAIR_GENERATOR = "KeyPairGenerator"; + Provider provider; private String algorithm; /** ! * Creates a KeyPairGenerator object for the specified ! * algorithm. ! * ! * @param algorithm the standard string name of the algorithm. ! * See Appendix A in the Java Cryptography Architecture API ! * Specification & Reference for information about standard ! * algorithm names. */ protected KeyPairGenerator(String algorithm) { *************** public abstract class KeyPairGenerator e *** 67,121 **** } /** ! Returns the name of the algorithm used ! ! @return A string with the name of the algorithm */ public String getAlgorithm() { return algorithm; } ! /** ! Gets an instance of the KeyPairGenerator class ! which generates key pairs for the specified algorithm. ! If the algorithm is not found then, it throws NoSuchAlgorithmException. ! ! @param algorithm the name of algorithm to choose ! @return a AlgorithmParameterGenerator repesenting the desired algorithm ! ! @throws NoSuchAlgorithmException if the algorithm is not implemented by ! providers */ ! public static KeyPairGenerator getInstance(String algorithm) throws ! NoSuchAlgorithmException { Provider[] p = Security.getProviders(); - for (int i = 0; i < p.length; i++) { ! try ! { ! return getInstance(algorithm, p[i]); } ! catch (NoSuchAlgorithmException ignored) {} } throw new NoSuchAlgorithmException(algorithm); } ! /** ! Gets an instance of the KeyPairGenerator class ! which generates key pairs for the specified algorithm. ! If the algorithm is not found then, it throws NoSuchAlgorithmException. ! ! @param algorithm the name of algorithm to choose ! @param provider the name of the provider to find the algorithm in ! @return a AlgorithmParameterGenerator repesenting the desired algorithm ! ! @throws NoSuchAlgorithmException if the algorithm is not implemented by ! the provider ! @throws NoSuchProviderException if the provider is not found */ public static KeyPairGenerator getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException --- 138,202 ---- } /** ! * Returns the standard name of the algorithm for this key pair generator. ! * See Appendix A in the Java Cryptography Architecture API Specification ! * & Reference for information about standard algorithm names. ! * ! * @return the standard string name of the algorithm. */ public String getAlgorithm() { return algorithm; } ! /** ! * Generates a KeyPairGenerator object that implements the ! * specified digest algorithm. If the default provider package provides an ! * implementation of the requested digest algorithm, an instance of ! * KeyPairGenerator containing that implementation is returned. ! * If the algorithm is not available in the default package, other packages ! * are searched. ! * ! * @param algorithm the standard string name of the algorithm. See Appendix A ! * in the Java Cryptography Architecture API Specification & Reference for ! * information about standard algorithm names. ! * @return the new KeyPairGenerator object. ! * @throws NoSuchAlgorithmException if the algorithm is not available in the ! * environment. */ ! public static KeyPairGenerator getInstance(String algorithm) ! throws NoSuchAlgorithmException { Provider[] p = Security.getProviders(); for (int i = 0; i < p.length; i++) { ! try ! { ! return getInstance(algorithm, p[i]); } ! catch (NoSuchAlgorithmException ignored) {} } throw new NoSuchAlgorithmException(algorithm); } ! /** ! * Generates a KeyPairGenerator object implementing the ! * specified algorithm, as supplied from the specified provider, if ! * such an algorithm is available from the provider. ! * ! * @param algorithm the standard string name of the algorithm. See ! * Appendix A in the Java Cryptography Architecture API Specification ! * & Reference for information about standard algorithm names. ! * @param provider the string name of the provider. ! * @return the new KeyPairGenerator object. ! * @throws NoSuchAlgorithmException if the algorithm is not available ! * from the provider. ! * @throws NoSuchProviderException if the provider is not available in the ! * environment. ! * @throws IllegalArgumentException if the provider name is null ! * or empty. ! * @see Provider */ public static KeyPairGenerator getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException *************** public abstract class KeyPairGenerator e *** 127,195 **** return getInstance(algorithm, p); } ! private static KeyPairGenerator getInstance(String algorithm, Provider p) throws NoSuchAlgorithmException { ! // try the name as is ! String className = p.getProperty("KeyPairGenerator." + algorithm); ! if (className == null) { // try all uppercase ! String upper = algorithm.toUpperCase(); ! className = p.getProperty("KeyPairGenerator." + upper); ! if (className == null) { // try if it's an alias ! String alias = p.getProperty("Alg.Alias.KeyPairGenerator." + algorithm); ! if (alias == null) { // try all-uppercase alias name ! alias = p.getProperty("Alg.Alias.KeyPairGenerator." + upper); ! if (alias == null) { // spit the dummy ! throw new NoSuchAlgorithmException(algorithm); ! } ! } ! className = p.getProperty("KeyPairGenerator." + alias); ! if (className == null) { ! throw new NoSuchAlgorithmException(algorithm); ! } ! } ! } ! return getInstance(className, algorithm, p); ! } ! private static KeyPairGenerator getInstance(String classname, ! String algorithm, ! Provider provider) ! throws NoSuchAlgorithmException ! { try { ! Object o = Class.forName(classname).newInstance(); ! KeyPairGenerator kpg; ! if (o instanceof KeyPairGeneratorSpi) ! kpg = new DummyKeyPairGenerator((KeyPairGeneratorSpi) o, algorithm); ! else ! { ! kpg = (KeyPairGenerator) o; ! kpg.algorithm = algorithm; ! } ! ! kpg.provider = provider; ! return kpg; } ! catch (ClassNotFoundException cnfe) { ! throw new NoSuchAlgorithmException("Class not found"); } ! catch (InstantiationException ie) { ! throw new NoSuchAlgorithmException("Class instantiation failed"); } ! catch (IllegalAccessException iae) { ! throw new NoSuchAlgorithmException("Illegal Access"); } } /** ! Gets the provider that the class is from. ! ! @return the provider of this class */ public final Provider getProvider() { --- 208,266 ---- return getInstance(algorithm, p); } ! /** ! * Generates a KeyPairGenerator object implementing the specified ! * algorithm, as supplied from the specified provider, if such an algorithm is ! * available from the provider. Note: the provider doesn't have to be ! * registered. ! * ! * @param algorithm the standard string name of the algorithm. See Appendix A ! * in the Java Cryptography Architecture API Specification & Reference for ! * information about standard algorithm names. ! * @param provider the provider. ! * @return the new KeyPairGenerator object. ! * @throws NoSuchAlgorithmException if the algorithm is not ! * available from the provider. ! * @throws IllegalArgumentException if the provider is ! * null. ! * @since 1.4 ! * @see Provider ! */ ! public static KeyPairGenerator getInstance(String algorithm, ! Provider provider) throws NoSuchAlgorithmException { ! if (provider == null) ! throw new IllegalArgumentException("Illegal provider"); ! Object o = null; try { ! o = Engine.getInstance(KEY_PAIR_GENERATOR, algorithm, provider); } ! catch (java.lang.reflect.InvocationTargetException ite) { ! throw new NoSuchAlgorithmException(algorithm); } ! ! KeyPairGenerator result = null; ! if (o instanceof KeyPairGeneratorSpi) { ! result = new DummyKeyPairGenerator((KeyPairGeneratorSpi) o, algorithm); } ! else if (o instanceof KeyPairGenerator) { ! result = (KeyPairGenerator) o; ! result.algorithm = algorithm; } + result.provider = provider; + return result; } /** ! * Returns the provider of this key pair generator object. ! * ! * @return the provider of this key pair generator object. */ public final Provider getProvider() { *************** public abstract class KeyPairGenerator e *** 197,207 **** } /** ! Initializes the KeyPairGenerator for the specified key size. ! (Since no source of randomness is specified, a default one is ! provided.) ! ! @param keysize Size of key to generate */ public void initialize(int keysize) { --- 268,283 ---- } /** ! * Initializes the key pair generator for a certain keysize using a default ! * parameter set and the {@link SecureRandom} implementation of the ! * highest-priority installed provider as the source of randomness. (If none ! * of the installed providers supply an implementation of {@link SecureRandom}, ! * a system-provided source of randomness is used.) ! * ! * @param keysize the keysize. This is an algorithm-specific metric, such as ! * modulus length, specified in number of bits. ! * @throws InvalidParameterException if the keysize is not supported by this ! * KeyPairGenerator object. */ public void initialize(int keysize) { *************** public abstract class KeyPairGenerator e *** 209,221 **** } /** ! Initializes the KeyPairGenerator for the specified key size ! and specified SecureRandom. ! ! @param keysize Size of key to generate ! @param random SecureRandom to use ! ! @since JDK 1.2 */ public void initialize(int keysize, SecureRandom random) { --- 285,299 ---- } /** ! * Initializes the key pair generator for a certain keysize with the given ! * source of randomness (and a default parameter set). ! * ! * @param keysize the keysize. This is an algorithm-specific metric, such as ! * modulus length, specified in number of bits. ! * @param random the source of randomness. ! * @throws InvalidParameterException if the keysize is not ! * supported by this KeyPairGenerator object. ! * @since 1.2 */ public void initialize(int keysize, SecureRandom random) { *************** public abstract class KeyPairGenerator e *** 223,236 **** } /** ! Initializes the KeyPairGenerator with the specified ! AlgorithmParameterSpec class. ! (Since no source of randomness is specified, a default one is ! provided.) ! ! @param params AlgorithmParameterSpec to initialize with ! ! @since JDK 1.2 */ public void initialize(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException --- 301,325 ---- } /** ! *

                Initializes the key pair generator using the specified parameter set and ! * the {@link SecureRandom} implementation of the highest-priority installed ! * provider as the source of randomness. (If none of the installed providers ! * supply an implementation of {@link SecureRandom}, a system-provided source ! * of randomness is used.)

                ! * ! *

                This concrete method has been added to this previously-defined abstract ! * class. This method calls the ! * {@link KeyPairGeneratorSpi#initialize(AlgorithmParameterSpec, SecureRandom)} ! * initialize method, passing it params and a source of ! * randomness (obtained from the highest-priority installed provider or ! * system-provided if none of the installed providers supply one). That ! * initialize method always throws an {@link UnsupportedOperationException} ! * if it is not overridden by the provider.

                ! * ! * @param params the parameter set used to generate the keys. ! * @throws InvalidAlgorithmParameterException if the given parameters are ! * inappropriate for this key pair generator. ! * @since 1.2 */ public void initialize(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException *************** public abstract class KeyPairGenerator e *** 239,251 **** } /** ! Initializes the KeyPairGenerator with the specified ! AlgorithmParameterSpec class and specified SecureRandom. ! ! @param params AlgorithmParameterSpec to initialize with ! @param random SecureRandom to use ! ! @since JDK 1.2 */ public void initialize(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException --- 328,348 ---- } /** ! *

                Initializes the key pair generator with the given parameter set and ! * source of randomness.

                ! * ! *

                This concrete method has been added to this previously-defined abstract ! * class. This method calls the ! * {@link KeyPairGeneratorSpi#initialize(AlgorithmParameterSpec, SecureRandom)} ! * initialize method, passing it params and random. ! * That initialize method always throws an {@link UnsupportedOperationException} ! * if it is not overridden by the provider.

                ! * ! * @param params the parameter set used to generate the keys. ! * @param random the source of randomness. ! * @throws InvalidAlgorithmParameterException if the given parameters are ! * inappropriate for this key pair generator. ! * @since 1.2 */ public void initialize(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException *************** public abstract class KeyPairGenerator e *** 254,289 **** } /** ! Generates a KeyPair according the rules for the algorithm. ! Unless intialized, algorithm defaults will be used. It ! creates a unique key pair each time. ! ! Same as generateKeyPair(); ! ! @return a key pair */ public final KeyPair genKeyPair() { try { ! return getInstance("DSA", "GNU").generateKeyPair(); } catch (Exception e) { ! System.err.println("genKeyPair failed: " + e); ! e.printStackTrace(); ! return null; } } /** ! Generates a KeyPair according the rules for the algorithm. ! Unless intialized, algorithm defaults will be used. It ! creates a unique key pair each time. ! ! Same as genKeyPair(); ! ! @return a key pair */ public KeyPair generateKeyPair() { --- 351,395 ---- } /** ! *

                Generates a key pair.

                ! * ! *

                If this KeyPairGenerator has not been initialized ! * explicitly, provider-specific defaults will be used for the size and other ! * (algorithm-specific) values of the generated keys.

                ! * ! *

                This will generate a new key pair every time it is called.

                ! * ! *

                This method is functionally equivalent to {@link #generateKeyPair()}.

                ! * ! * @return the generated key pair. ! * @since 1.2 */ public final KeyPair genKeyPair() { try { ! return getInstance("DSA", "GNU").generateKeyPair(); } catch (Exception e) { ! System.err.println("genKeyPair failed: " + e); ! e.printStackTrace(); ! return null; } } /** ! *

                Generates a key pair.

                ! * ! *

                If this KeyPairGenerator has not been initialized ! * explicitly, provider-specific defaults will be used for the size and other ! * (algorithm-specific) values of the generated keys.

                ! * ! *

                This will generate a new key pair every time it is called.

                ! * ! *

                This method is functionally equivalent to {@link #genKeyPair()}.

                ! * ! * @return the generated key pair. */ public KeyPair generateKeyPair() { diff -Nrc3pad gcc-3.3.3/libjava/java/security/KeyPair.java gcc-3.4.0/libjava/java/security/KeyPair.java *** gcc-3.3.3/libjava/java/security/KeyPair.java 2002-10-04 20:15:07.000000000 +0000 --- gcc-3.4.0/libjava/java/security/KeyPair.java 2003-05-10 07:12:47.000000000 +0000 *************** import java.io.Serializable; *** 48,54 **** */ public final class KeyPair implements Serializable { ! static final long serialVersionUID = -7565189502268009837L; private PublicKey publicKey; private PrivateKey privateKey; --- 48,54 ---- */ public final class KeyPair implements Serializable { ! private static final long serialVersionUID = -7565189502268009837L; private PublicKey publicKey; private PrivateKey privateKey; diff -Nrc3pad gcc-3.3.3/libjava/java/security/KeyStore.java gcc-3.4.0/libjava/java/security/KeyStore.java *** gcc-3.3.3/libjava/java/security/KeyStore.java 2002-11-18 18:09:35.000000000 +0000 --- gcc-3.4.0/libjava/java/security/KeyStore.java 2003-04-30 07:23:41.000000000 +0000 *************** *** 1,5 **** /* KeyStore.java --- Key Store Class ! Copyright (C) 1999, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* KeyStore.java --- Key Store Class ! Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** import java.security.cert.CertificateExc *** 43,80 **** import java.util.Date; import java.util.Enumeration; ! /** ! Keystore represents an in-memory collection of keys and ! certificates. There are two types of entries: ! ! * Key Entry ! ! This type of keystore entry store sensitive crytographic key ! information in a protected format.Typically this is a secret ! key or a private key with a certificate chain. ! ! ! * Trusted Ceritificate Entry ! ! This type of keystore entry contains a single public key ! certificate belonging to annother entity. It is called trusted ! because the keystore owner trusts that the certificates ! belongs to the subject (owner) of the certificate. ! ! The keystore contains an "alias" string for each entry. ! The structure and persistentence of the key store is not ! specified. Any method could be used to protect sensitive ! (private or secret) keys. Smart cards or integrated ! cryptographic engines could be used or the keystore could ! be simply stored in a file. */ public class KeyStore { private KeyStoreSpi keyStoreSpi; private Provider provider; private String type; /** Creates an instance of KeyStore --- 43,97 ---- import java.util.Date; import java.util.Enumeration; ! import gnu.java.security.Engine; ! /** ! * Keystore represents an in-memory collection of keys and ! * certificates. There are two types of entries: ! * ! *
                ! *
                Key Entry
                ! * ! *

                This type of keystore entry store sensitive crytographic key ! * information in a protected format.Typically this is a secret ! * key or a private key with a certificate chain.

                ! * ! *
                Trusted Ceritificate Entry
                ! * ! *

                This type of keystore entry contains a single public key ! * certificate belonging to annother entity. It is called trusted ! * because the keystore owner trusts that the certificates ! * belongs to the subject (owner) of the certificate.

                ! *
                ! * ! *

                Entries in a key store are referred to by their "alias": a simple ! * unique string. ! * ! *

                The structure and persistentence of the key store is not ! * specified. Any method could be used to protect sensitive ! * (private or secret) keys. Smart cards or integrated ! * cryptographic engines could be used or the keystore could ! * be simply stored in a file.

                ! * ! * @see java.security.cert.Certificate ! * @see Key */ public class KeyStore { + + // Constants and fields. + // ------------------------------------------------------------------------ + + /** Service name for key stores. */ + private static final String KEY_STORE = "KeyStore"; + private KeyStoreSpi keyStoreSpi; private Provider provider; private String type; + // Constructors. + // ------------------------------------------------------------------------ + /** Creates an instance of KeyStore *************** public class KeyStore *** 89,104 **** this.type = type; } ! /** ! Gets an instance of the KeyStore class representing ! the specified keystore. If the type is not ! found then, it throws KeyStoreException. ! ! @param type the type of keystore to choose ! ! @return a KeyStore repesenting the desired type ! @throws KeyStoreException if the type of keystore is not implemented by providers */ public static KeyStore getInstance(String type) throws KeyStoreException { --- 106,123 ---- this.type = type; } ! // Class methods. ! // ------------------------------------------------------------------------ ! /** ! * Gets an instance of the KeyStore class representing ! * the specified keystore. If the type is not ! * found then, it throws KeyStoreException. ! * ! * @param type the type of keystore to choose ! * @return a KeyStore repesenting the desired type ! * @throws KeyStoreException if the type of keystore is not implemented ! * by providers or the implementation cannot be instantiated. */ public static KeyStore getInstance(String type) throws KeyStoreException { *************** public class KeyStore *** 106,200 **** for (int i = 0; i < p.length; i++) { ! String classname = p[i].getProperty("KeyStore." + type); ! if (classname != null) ! return getInstance(classname, type, p[i]); } throw new KeyStoreException(type); } /** ! Gets an instance of the KeyStore class representing ! the specified key store from the specified provider. ! If the type is not found then, it throws KeyStoreException. ! If the provider is not found, then it throws ! NoSuchProviderException. ! ! @param type the type of keystore to choose ! @param provider the provider name ! ! @return a KeyStore repesenting the desired type ! ! @throws KeyStoreException if the type of keystore is not ! implemented by the given provider ! @throws NoSuchProviderException if the provider is not found ! @throws IllegalArgumentException if the provider string is ! null or empty */ public static KeyStore getInstance(String type, String provider) throws KeyStoreException, NoSuchProviderException { if (provider == null || provider.length() == 0) throw new IllegalArgumentException("Illegal provider"); Provider p = Security.getProvider(provider); if (p == null) throw new NoSuchProviderException(); ! return getInstance(p.getProperty("KeyStore." + type), type, p); } /** ! Gets an instance of the KeyStore class representing ! the specified key store from the specified provider. ! If the type is not found then, it throws KeyStoreException. ! If the provider is not found, then it throws ! NoSuchProviderException. ! ! @param type the type of keystore to choose ! @param provider the keystore provider ! ! @return a KeyStore repesenting the desired type ! ! @throws KeyStoreException if the type of keystore is not ! implemented by the given provider ! @throws IllegalArgumentException if the provider object is null ! @since 1.4 */ public static KeyStore getInstance(String type, Provider provider) throws KeyStoreException { if (provider == null) throw new IllegalArgumentException("Illegal provider"); - - return getInstance(provider.getProperty("KeyStore." + type), - type, provider); - } - - private static KeyStore getInstance(String classname, - String type, - Provider provider) - throws KeyStoreException - { try { ! return new KeyStore((KeyStoreSpi) Class.forName(classname). ! newInstance(), provider, type); } ! catch (ClassNotFoundException cnfe) { ! throw new KeyStoreException("Class not found"); } ! catch (InstantiationException ie) { ! throw new KeyStoreException("Class instantiation failed"); } ! catch (IllegalAccessException iae) { ! throw new KeyStoreException("Illegal Access"); } } /** Gets the provider that the class is from. --- 125,230 ---- for (int i = 0; i < p.length; i++) { ! try ! { ! return getInstance(type, p[i]); ! } ! catch (KeyStoreException ignore) ! { ! } } throw new KeyStoreException(type); } /** ! * Gets an instance of the KeyStore class representing ! * the specified key store from the specified provider. ! * If the type is not found then, it throws KeyStoreException. ! * If the provider is not found, then it throws ! * NoSuchProviderException. ! * ! * @param type the type of keystore to choose ! * @param provider the provider name ! * @return a KeyStore repesenting the desired type ! * @throws KeyStoreException if the type of keystore is not ! * implemented by the given provider ! * @throws NoSuchProviderException if the provider is not found ! * @throws IllegalArgumentException if the provider string is ! * null or empty */ public static KeyStore getInstance(String type, String provider) throws KeyStoreException, NoSuchProviderException { if (provider == null || provider.length() == 0) throw new IllegalArgumentException("Illegal provider"); + Provider p = Security.getProvider(provider); if (p == null) throw new NoSuchProviderException(); ! return getInstance(type, p); } /** ! * Gets an instance of the KeyStore class representing ! * the specified key store from the specified provider. ! * If the type is not found then, it throws KeyStoreException. ! * If the provider is not found, then it throws ! * NoSuchProviderException. ! * ! * @param type the type of keystore to choose ! * @param provider the keystore provider ! * @return a KeyStore repesenting the desired type ! * @throws KeyStoreException if the type of keystore is not ! * implemented by the given provider ! * @throws IllegalArgumentException if the provider object is null ! * @since 1.4 */ public static KeyStore getInstance(String type, Provider provider) throws KeyStoreException { if (provider == null) throw new IllegalArgumentException("Illegal provider"); try { ! return new KeyStore( ! (KeyStoreSpi) Engine.getInstance(KEY_STORE, type, provider), ! provider, type); } ! catch (NoSuchAlgorithmException nsae) { ! throw new KeyStoreException(type); } ! catch (java.lang.reflect.InvocationTargetException ite) { ! throw new KeyStoreException(type); } ! catch (ClassCastException cce) { ! throw new KeyStoreException(type); } } + /** + * Returns the default KeyStore type. This method looks up the + * type in /lib/security/java.security with the + * property "keystore.type" or if that fails then "jks" . + */ + public static final String getDefaultType() + { + // Security reads every property in java.security so it + // will return this property if it exists. + String tmp = Security.getProperty("keystore.type"); + + if (tmp == null) + tmp = "jks"; + + return tmp; + } + + // Instance methods. + // ------------------------------------------------------------------------ /** Gets the provider that the class is from. *************** public class KeyStore *** 471,491 **** keyStoreSpi.engineLoad(stream, password); } - /** - Returns the default KeyStore type. This method looks up the - type in /lib/security/java.security with the - property "keystore.type" or if that fails then "jks" . - */ - public static final String getDefaultType() - { - String tmp; - //Security reads every property in java.security so it - //will return this property if it exists. - tmp = Security.getProperty("keystore.type"); - - if (tmp == null) - tmp = "jks"; - - return tmp; - } } --- 501,504 ---- diff -Nrc3pad gcc-3.3.3/libjava/java/security/MessageDigest.java gcc-3.4.0/libjava/java/security/MessageDigest.java *** gcc-3.3.3/libjava/java/security/MessageDigest.java 2002-11-17 00:10:24.000000000 +0000 --- gcc-3.4.0/libjava/java/security/MessageDigest.java 2003-04-30 07:23:41.000000000 +0000 *************** *** 1,6 **** - /* MessageDigest.java --- The message digest interface. ! Copyright (C) 1999, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* MessageDigest.java --- The message digest interface. ! Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 38,54 **** package java.security; public abstract class MessageDigest extends MessageDigestSpi { private String algorithm; Provider provider; private byte[] lastDigest; /** ! Creates a MessageDigest representing the specified ! algorithm. ! ! @param algorithm the name of digest algorithm to choose */ protected MessageDigest(String algorithm) { --- 37,111 ---- package java.security; + import gnu.java.security.Engine; + + /** + *

                This MessageDigest class provides applications the + * functionality of a message digest algorithm, such as MD5 or SHA. + * Message digests are secure one-way hash functions that take arbitrary-sized + * data and output a fixed-length hash value.

                + * + *

                A MessageDigest object starts out initialized. The data is + * processed through it using the update() methods. At any point + * reset() can be called to reset the digest. Once all the data to + * be updated has been updated, one of the digest() methods should + * be called to complete the hash computation.

                + * + *

                The digest() method can be called once for a given + * number of updates. After digest() has been called, the + * MessageDigest object is reset to its initialized state. + *

                + * + *

                Implementations are free to implement the {@link Cloneable} interface. + * Client applications can test cloneability by attempting cloning and catching + * the {@link CloneNotSupportedException}: + * + *

                +  *    MessageDigest md = MessageDigest.getInstance("SHA");
                +  *    try
                +  *      {
                +  *        md.update(toChapter1);
                +  *        MessageDigest tc1 = md.clone();
                +  *        byte[] toChapter1Digest = tc1.digest();
                +  *        md.update(toChapter2);
                +  *        // ...
                +  *      }
                +  *    catch (CloneNotSupportedException x)
                +  *      {
                +  *        throw new DigestException("couldn't make digest of partial content");
                +  *      }
                +  * 
                + * + *

                Note that if a given implementation is not cloneable, it is still possible + * to compute intermediate digests by instantiating several instances, if the + * number of digests is known in advance.

                + * + *

                Note that this class is abstract and extends from {@link MessageDigestSpi} + * for historical reasons. Application developers should only take notice of the + * methods defined in this MessageDigest class; all the methods in + * the superclass are intended for cryptographic service providers who wish to + * supply their own implementations of message digest algorithms.

                + * + * @see MessageDigestSpi + * @see Provider + * @since JDK 1.1 + */ public abstract class MessageDigest extends MessageDigestSpi { + /** The service name for message digests. */ + private static final String MESSAGE_DIGEST = "MessageDigest"; + private String algorithm; Provider provider; private byte[] lastDigest; /** ! * Creates a message digest with the specified algorithm name. ! * ! * @param algorithm the standard name of the digest algorithm. ! * See Appendix A in the Java Cryptography Architecture API ! * Specification & Reference for information about standard ! * algorithm names. */ protected MessageDigest(String algorithm) { *************** public abstract class MessageDigest exte *** 56,71 **** provider = null; } ! /** ! Gets an instance of the MessageDigest class representing ! the specified digest. If the algorithm is not found then, ! it throws NoSuchAlgorithmException. ! ! @param algorithm the name of digest algorithm to choose ! @return a MessageDigest representing the desired algorithm ! ! @exception NoSuchAlgorithmException if the algorithm is not implemented by ! providers */ public static MessageDigest getInstance(String algorithm) throws NoSuchAlgorithmException --- 113,132 ---- provider = null; } ! /** ! * Generates a MessageDigest object that implements the specified ! * digest algorithm. If the default provider package provides an ! * implementation of the requested digest algorithm, an instance of ! * MessageDigest containing that implementation is returned. If ! * the algorithm is not available in the default package, other packages are ! * searched. ! * ! * @param algorithm the name of the algorithm requested. See Appendix A in the ! * Java Cryptography Architecture API Specification & Reference for ! * information about standard algorithm names. ! * @return a Message Digest object implementing the specified algorithm. ! * @throws NoSuchAlgorithmException if the algorithm is not available in the ! * caller's environment. */ public static MessageDigest getInstance(String algorithm) throws NoSuchAlgorithmException *************** public abstract class MessageDigest exte *** 83,185 **** throw new NoSuchAlgorithmException(algorithm); } ! /** ! Gets an instance of the MessageDigest class representing ! the specified digest from the specified provider. If the ! algorithm is not found then, it throws NoSuchAlgorithmException. ! If the provider is not found, then it throws ! NoSuchProviderException. ! ! @param algorithm the name of digest algorithm to choose ! @param provider the name of the provider to find the algorithm in ! @return a MessageDigest representing the desired algorithm ! ! @exception NoSuchAlgorithmException if the algorithm is not implemented by ! the provider ! @exception NoSuchProviderException if the provider is not found */ - public static MessageDigest getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException { ! Provider p = Security.getProvider(provider); if (p == null) throw new NoSuchProviderException(provider); return getInstance(algorithm, p); } ! private static MessageDigest getInstance(String algorithm, Provider p) ! throws NoSuchAlgorithmException ! { ! // try the name as is ! String className = p.getProperty("MessageDigest." + algorithm); ! if (className == null) { // try all uppercase ! String upper = algorithm.toUpperCase(); ! className = p.getProperty("MessageDigest." + upper); ! if (className == null) { // try if it's an alias ! String alias = p.getProperty("Alg.Alias.MessageDigest." +algorithm); ! if (alias == null) { // try all-uppercase alias name ! alias = p.getProperty("Alg.Alias.MessageDigest." +upper); ! if (alias == null) { // spit the dummy ! throw new NoSuchAlgorithmException(algorithm); ! } ! } ! className = p.getProperty("MessageDigest." + alias); ! if (className == null) { ! throw new NoSuchAlgorithmException(algorithm); ! } ! } ! } ! return getInstance(className, algorithm, p); ! } ! ! private static MessageDigest getInstance(String classname, ! String algorithm, ! Provider provider) throws NoSuchAlgorithmException { ! if (classname == null) ! throw new NoSuchAlgorithmException(algorithm); MessageDigest result = null; try { ! Object obj = Class.forName(classname).newInstance(); ! if (obj instanceof MessageDigest) { ! result = (MessageDigest) obj; ! result.algorithm = algorithm; ! } else if (obj instanceof MessageDigestSpi) { ! result = new DummyMessageDigest((MessageDigestSpi) obj, algorithm); ! } else { ! throw new ClassCastException("Class "+classname+" from Provider " ! +provider.getName() ! +" does not extend java.security.MessageDigestSpi"); ! } ! result.provider = provider; ! return result; } ! catch (ClassNotFoundException cnfe) { ! throw new NoSuchAlgorithmException(algorithm + ": Class not found."); } ! catch (InstantiationException ie) { ! throw new NoSuchAlgorithmException(algorithm ! + ": Class instantiation failed."); } ! catch (IllegalAccessException iae) { ! throw new NoSuchAlgorithmException(algorithm + ": Illegal Access"); } } - /** ! Gets the provider that the MessageDigest is from. ! ! @return the provider the this MessageDigest */ public final Provider getProvider() { --- 144,235 ---- throw new NoSuchAlgorithmException(algorithm); } ! /** ! * Generates a MessageDigest object implementing the specified ! * algorithm, as supplied from the specified provider, if such an algorithm is ! * available from the provider. ! * ! * @param algorithm the name of the algorithm requested. See Appendix A in the ! * Java Cryptography Architecture API Specification & Reference for ! * information about standard algorithm names. ! * @param provider the name of the provider. ! * @return a Message Digest object implementing the specified algorithm. ! * @throws NoSuchAlgorithmException if the algorithm is not available in the ! * package supplied by the requested provider. ! * @throws NoSuchProviderException if the provider is not available in the ! * environment. ! * @throws IllegalArgumentException if the provider name is null or empty. ! * @see Provider */ public static MessageDigest getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException { ! if (provider == null || provider.length() == 0) ! throw new IllegalArgumentException("Illegal provider"); + Provider p = Security.getProvider(provider); if (p == null) throw new NoSuchProviderException(provider); return getInstance(algorithm, p); } ! /** ! * Generates a MessageDigest object implementing the specified ! * algorithm, as supplied from the specified provider, if such an algorithm ! * is available from the provider. Note: the provider doesn't have to be ! * registered. ! * ! * @param algorithm the name of the algorithm requested. See Appendix A in ! * the Java Cryptography Architecture API Specification & Reference for ! * information about standard algorithm names. ! * @param provider the provider. ! * @return a Message Digest object implementing the specified algorithm. ! * @throws NoSuchAlgorithmException if the algorithm is not ! * available in the package supplied by the requested provider. ! * @throws IllegalArgumentException if the provider is ! * null. ! * @since 1.4 ! * @see Provider ! */ ! public static MessageDigest getInstance(String algorithm, Provider provider) throws NoSuchAlgorithmException { ! if (provider == null) ! throw new IllegalArgumentException("Illegal provider"); MessageDigest result = null; + Object o = null; try { ! o = Engine.getInstance(MESSAGE_DIGEST, algorithm, provider); } ! catch (java.lang.reflect.InvocationTargetException ite) { ! throw new NoSuchAlgorithmException(algorithm); } ! ! if (o instanceof MessageDigestSpi) { ! result = new DummyMessageDigest((MessageDigestSpi) o, algorithm); } ! else if (o instanceof MessageDigest) { ! result = (MessageDigest) o; ! result.algorithm = algorithm; ! } ! else ! { ! throw new NoSuchAlgorithmException(algorithm); } + result.provider = provider; + return result; } /** ! * Returns the provider of this message digest object. ! * ! * @return the provider of this message digest object. */ public final Provider getProvider() { *************** public abstract class MessageDigest exte *** 187,195 **** } /** ! Updates the digest with the byte. ! ! @param input byte to update the digest with */ public void update(byte input) { --- 237,245 ---- } /** ! * Updates the digest using the specified byte. ! * ! * @param input the byte with which to update the digest. */ public void update(byte input) { *************** public abstract class MessageDigest exte *** 197,228 **** } /** ! Updates the digest with the bytes from the array from the ! specified offset to the specified length. ! ! @param input bytes to update the digest with ! @param offset the offset to start at ! @param len length of the data to update with */ ! public void update(byte[]input, int offset, int len) { engineUpdate(input, offset, len); } /** ! Updates the digest with the bytes from the array. ! ! @param input bytes to update the digest with */ ! public void update(byte[]input) { engineUpdate(input, 0, input.length); } /** ! Computes the digest of the stored data. ! ! @return a byte array representing the message digest */ public byte[] digest() { --- 247,279 ---- } /** ! * Updates the digest using the specified array of bytes, starting at the ! * specified offset. ! * ! * @param input the array of bytes. ! * @param offset the offset to start from in the array of bytes. ! * @param len the number of bytes to use, starting at offset. */ ! public void update(byte[] input, int offset, int len) { engineUpdate(input, offset, len); } /** ! * Updates the digest using the specified array of bytes. ! * ! * @param input the array of bytes. */ ! public void update(byte[] input) { engineUpdate(input, 0, input.length); } /** ! * Completes the hash computation by performing final operations such as ! * padding. The digest is reset after this call is made. ! * ! * @return the array of bytes for the resulting hash value. */ public byte[] digest() { *************** public abstract class MessageDigest exte *** 230,281 **** } /** ! Computes the final digest of the stored bytes and returns ! them. ! ! @param buf An array of bytes to store the digest ! @param offset An offset to start storing the digest at ! @param len The length of the buffer ! @return Returns the length of the buffer */ ! public int digest(byte[]buf, int offset, int len) throws DigestException { return engineDigest(buf, offset, len); } /** ! Computes a final update using the input array of bytes, ! then computes a final digest and returns it. It calls ! update(input) and then digest(); ! ! @param input An array of bytes to perform final update with ! @return a byte array representing the message digest */ ! public byte[] digest(byte[]input) { update(input); return digest(); } /** ! Returns a representation of the MessageDigest as a String. ! ! @return a string representing the message digest */ public String toString() { ! return (getClass()).getName() ! + " Message Digest <" + digestToString() + ">"; } /** ! Does a simple byte comparison of the two digests. ! ! @param digesta first digest to compare ! @param digestb second digest to compare ! @return true if they are equal, false otherwise */ ! public static boolean isEqual(byte[]digesta, byte[]digestb) { if (digesta.length != digestb.length) return false; --- 281,334 ---- } /** ! * Completes the hash computation by performing final operations such as ! * padding. The digest is reset after this call is made. ! * ! * @param buf An output buffer for the computed digest. ! * @param offset The offset into the output buffer to begin storing the digest. ! * @param len The number of bytes within buf allotted for the digest. ! * @return The number of bytes placed into buf. ! * @throws DigestException if an error occurs. */ ! public int digest(byte[] buf, int offset, int len) throws DigestException { return engineDigest(buf, offset, len); } /** ! * Performs a final update on the digest using the specified array of bytes, ! * then completes the digest computation. That is, this method first calls ! * update(input), passing the input array to the update() ! * method, then calls digest(). ! * ! * @param input the input to be updated before the digest is completed. ! * @return the array of bytes for the resulting hash value. */ ! public byte[] digest(byte[] input) { update(input); return digest(); } /** ! * Returns a string representation of this message digest object. ! * ! * @return a string representation of the object. */ public String toString() { ! return (getClass()).getName() + " Message Digest <" + digestToString() + ">"; } /** ! * Compares two digests for equality. Does a simple byte compare. ! * ! * @param digesta one of the digests to compare. ! * @param digestb the other digest to compare. ! * @return true if the digests are equal, false ! * otherwise. */ ! public static boolean isEqual(byte[] digesta, byte[] digestb) { if (digesta.length != digestb.length) return false; *************** public abstract class MessageDigest exte *** 287,306 **** return true; } ! ! /** ! Resets the message digest. ! */ public void reset() { engineReset(); } ! /** ! Gets the name of the algorithm currently used. ! The names of algorithms are usually SHA-1 or MD5. ! ! @return name of algorithm. */ public final String getAlgorithm() { --- 340,359 ---- return true; } ! /** Resets the digest for further use. */ public void reset() { engineReset(); } ! /** ! * Returns a string that identifies the algorithm, independent of ! * implementation details. The name should be a standard Java Security name ! * (such as "SHA", "MD5", and so on). See Appendix ! * A in the Java Cryptography Architecture API Specification & Reference ! * for information about standard algorithm names. ! * ! * @return the name of the algorithm. */ public final String getAlgorithm() { *************** public abstract class MessageDigest exte *** 308,318 **** } /** ! Gets the length of the message digest. ! The default is zero which means that this message digest ! does not implement this function. ! ! @return length of the message digest */ public final int getDigestLength() { --- 361,373 ---- } /** ! * Returns the length of the digest in bytes, or 0 if this ! * operation is not supported by the provider and the implementation is not ! * cloneable. ! * ! * @return the digest length in bytes, or 0 if this operation is ! * not supported by the provider and the implementation is not cloneable. ! * @since 1.2 */ public final int getDigestLength() { *************** public abstract class MessageDigest exte *** 320,334 **** } /** ! Returns a clone of this class if supported. ! If it does not then it throws CloneNotSupportedException. ! The cloning of this class depends on whether the subclass ! MessageDigestSpi implements Cloneable which contains the ! actual implementation of the appropriate algorithm. ! ! @return clone of this class ! ! @exception CloneNotSupportedException this class does not support cloning */ public Object clone() throws CloneNotSupportedException { --- 375,385 ---- } /** ! * Returns a clone if the implementation is cloneable. ! * ! * @return a clone if the implementation is cloneable. ! * @throws CloneNotSupportedException if this is called on an implementation ! * that does not support {@link Cloneable}. */ public Object clone() throws CloneNotSupportedException { *************** public abstract class MessageDigest exte *** 359,363 **** return buf.toString(); } - } --- 410,413 ---- diff -Nrc3pad gcc-3.3.3/libjava/java/security/Policy.java gcc-3.4.0/libjava/java/security/Policy.java *** gcc-3.3.3/libjava/java/security/Policy.java 2002-05-24 11:57:20.000000000 +0000 --- gcc-3.4.0/libjava/java/security/Policy.java 2003-04-19 20:54:55.000000000 +0000 *************** *** 1,5 **** /* Policy.java --- Policy Manager Class ! Copyright (C) 1999 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Policy.java --- Policy Manager Class ! Copyright (C) 1999, 2003, Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,126 **** package java.security; ! /** ! Policy is an abstract class for managing the system security ! policy for the Java application environment. It specifies ! which permissions are available for code from various ! sources. The security policy is represented through a ! subclass of Policy. ! ! Only one Policy is in effect at any time. ProtectionDomain ! initializes itself with information from this class on the ! set of permssions to grant. ! ! The location for the actual Policy could be anywhere in any ! form because it depends on the Policy implementation. The ! default system is in a flat ASCII file or it could be in a ! database. ! ! The current installed Policy can be accessed with getPolicy ! and changed with setPolicy if the code has the correct ! permissions. ! ! The refresh method causes the Policy class to refresh/reload ! its configuration. The method used to refresh depends on the ! Policy implementation. ! ! When a protection domain initializes its permissions it uses ! code like: ! ! policy = Policy.getPolicy(); ! permissionCollection perms = policy.getPermissions(MyCodeSource) ! ! The protection domain passes the Policy handler a CodeSource ! object which contains the codebase URL and public key. The ! Policy implementation then returns the proper set of ! permissions for the CodeSource. ! ! The default Policy implementation can be changed by setting ! the "policy.provider" security provider in java.security ! to the correct Policy implementation class. ! ! @author Mark Benvenuto ! @since JDK 1.2 */ public abstract class Policy { - // FIXME: The class name of the Policy provider should really be sourced - // from the "java.security" configuration file. For now, just hard-code - // a stub implementation. static private Policy currentPolicy = null; ! static ! { ! String pp = System.getProperty ("policy.provider"); ! if (pp != null) ! try ! { ! currentPolicy = (Policy)Class.forName(pp).newInstance(); ! } ! catch (Exception _) ! { ! currentPolicy = null; ! } ! if (currentPolicy == null) ! currentPolicy = new gnu.java.security.provider.DefaultPolicy(); ! } ! ! /** ! Constructs a new Policy class. ! */ public Policy() { } /** ! Gets the currently installed Policy handler. The value should ! not be cached as it can be changed by setPolicy. This ! function first calls SecurityManager.checkPermission ! with SecurityPermission("getPolicy") to check ! if the caller has Permission to get the current Policy. ! ! @return the current Policy ! ! @throws SecurityException if the security manager exists ! the caller does not have permission to ! getPolicy. */ public static Policy getPolicy() { --- 37,123 ---- package java.security; ! import java.util.Collections; ! import java.util.Enumeration; ! import java.util.LinkedHashMap; ! import java.util.Map; ! /** ! *

                This is an abstract class for representing the system security policy for ! * a Java application environment (specifying which permissions are available ! * for code from various sources). That is, the security policy is represented ! * by a Policy subclass providing an implementation of the abstract ! * methods in this Policy class.

                ! * ! *

                There is only one Policy object in effect at any given time. ! *

                ! * ! *

                The source location for the policy information utilized by the ! * Policy object is up to the Policy implementation. ! * The policy configuration may be stored, for example, as a flat ASCII file, as ! * a serialized binary file of the Policy class, or as a database. ! *

                ! * ! *

                The currently-installed Policy object can be obtained by ! * calling the getPolicy() method, and it can be changed by a call ! * to the setPolicy() method (by code with permission to reset the ! * Policy).

                ! * ! *

                The refresh() method causes the policy object to refresh / ! * reload its current configuration.

                ! * ! *

                This is implementation-dependent. For example, if the policy object stores ! * its policy in configuration files, calling refresh() will cause ! * it to re-read the configuration policy files. The refreshed policy may not ! * have an effect on classes in a particular {@link ProtectionDomain}. This is ! * dependent on the Policy provider's implementation of the ! * implies() method and the {@link PermissionCollection} caching ! * strategy.

                ! * ! *

                The default Policy implementation can be changed by setting ! * the value of the "policy.provider" security property (in the ! * Java security properties file) to the fully qualified name of the desired ! * Policy implementation class. The Java security properties file ! * is located in the file named <JAVA_HOME>/lib/security/java.security ! * , where <JAVA_HOME> refers to the directory where the ! * SDK was installed.

                ! * ! *

                IMPLEMENTATION NOTE: This implementation attempts to read the ! * System property named policy.provider to find the concrete ! * implementation of the Policy. If/when this fails, it falls back ! * to a default implementation, which allows everything. ! * ! * @author Mark Benvenuto ! * @see CodeSource ! * @see PermissionCollection ! * @see SecureClassLoader ! * @since 1.2 */ public abstract class Policy { static private Policy currentPolicy = null; ! ! /** Map of ProtectionDomains to PermissionCollections for this instance. */ ! private Map pd2pc = null; ! ! /** Constructs a new Policy object. */ public Policy() { } /** ! * Returns the installed Policy object. This value should not be ! * cached, as it may be changed by a call to setPolicy(). This ! * method first calls {@link SecurityManager#checkPermission(Permission)} with ! * a SecurityPermission("getPolicy") permission to ensure it's ok ! * to get the Policy object. ! * ! * @return the installed Policy. ! * @throws SecurityException if a security manager exists and its ! * checkPermission() method doesn't allow getting the ! * Policy object. ! * @see SecurityManager#checkPermission(Permission) ! * @see #setPolicy(Policy) */ public static Policy getPolicy() { *************** public abstract class Policy *** 128,147 **** if (sm != null) sm.checkPermission(new SecurityPermission("getPolicy")); ! return currentPolicy; } /** ! Sets the currently installed Policy handler. This ! function first calls SecurityManager.checkPermission ! with SecurityPermission("setPolicy") to check ! if the caller has Permission to get the current Policy. ! ! @param policy the new Policy to use ! ! @throws SecurityException if the security manager exists ! the caller does not have permission to ! getPolicy. */ public static void setPolicy(Policy policy) { --- 125,145 ---- if (sm != null) sm.checkPermission(new SecurityPermission("getPolicy")); ! return getCurrentPolicy(); } /** ! * Sets the system-wide Policy object. This method first calls ! * {@link SecurityManager#checkPermission(Permission)} with a ! * SecurityPermission("setPolicy") permission to ensure it's ok ! * to set the Policy. ! * ! * @param policy the new system Policy object. ! * @throws SecurityException if a security manager exists and its ! * checkPermission() method doesn't allow setting the ! * Policy. ! * @see SecurityManager#checkPermission(Permission) ! * @see #getPolicy() */ public static void setPolicy(Policy policy) { *************** public abstract class Policy *** 149,175 **** if (sm != null) sm.checkPermission(new SecurityPermission("setPolicy")); currentPolicy = policy; } /** ! Evalutes the global policy and returns a set of Permissions ! allowed for the specified CodeSource. ! @param codesource The CodeSource to get Permission for ! @return a set of permissions for codesource specified by ! the current policy ! @throws SecurityException if the current thread does not ! have permission to call getPermissions */ public abstract PermissionCollection getPermissions(CodeSource codesource); /** ! Refreshes and/or reloads the current Policy. The actual ! behavior of this method depends on the implementation. */ public abstract void refresh(); } --- 147,307 ---- if (sm != null) sm.checkPermission(new SecurityPermission("setPolicy")); + setup(policy); currentPolicy = policy; } + private static void setup(final Policy policy) + { + if (policy.pd2pc == null) + policy.pd2pc = Collections.synchronizedMap(new LinkedHashMap()); + + ProtectionDomain pd = policy.getClass().getProtectionDomain(); + if (pd.getCodeSource() != null) + { + PermissionCollection pc = null; + if (currentPolicy != null) + pc = currentPolicy.getPermissions(pd); + + if (pc == null) // assume it has all + { + pc = new Permissions(); + pc.add(new AllPermission()); + } + + policy.pd2pc.put(pd, pc); // add the mapping pd -> pc + } + } /** ! * Ensures/forces loading of the configured policy provider, while bypassing ! * the {@link SecurityManager} checks for "getPolicy" security ! * permission. Needed by {@link ProtectionDomain}. ! */ ! static Policy getCurrentPolicy() ! { ! // FIXME: The class name of the Policy provider should really be sourced ! // from the "java.security" configuration file. For now, just hard-code ! // a stub implementation. ! if (currentPolicy == null) ! { ! String pp = System.getProperty ("policy.provider"); ! if (pp != null) ! try ! { ! currentPolicy = (Policy) Class.forName(pp).newInstance(); ! } ! catch (Exception ignored) {} ! if (currentPolicy == null) ! currentPolicy = new gnu.java.security.provider.DefaultPolicy(); ! } ! return currentPolicy; ! } ! /** ! * Tests if currentPolicy is not null, ! * thus allowing clients to not force loading of any policy ! * provider; needed by {@link ProtectionDomain}. ! */ ! static boolean isLoaded() ! { ! return currentPolicy != null; ! } ! /** ! * Evaluates the global policy and returns a {@link PermissionCollection} ! * object specifying the set of permissions allowed for code from the ! * specified code source. ! * ! * @param codesource the {@link CodeSource} associated with the caller. This ! * encapsulates the original location of the code (where the code came from) ! * and the public key(s) of its signer. ! * @return the set of permissions allowed for code from codesource according ! * to the policy. The returned set of permissions must be a new mutable ! * instance and it must support heterogeneous {@link Permission} types. */ public abstract PermissionCollection getPermissions(CodeSource codesource); /** ! * Evaluates the global policy and returns a {@link PermissionCollection} ! * object specifying the set of permissions allowed given the characteristics ! * of the protection domain. ! * ! * @param domain the {@link ProtectionDomain} associated with the caller. ! * @return the set of permissions allowed for the domain according to the ! * policy. The returned set of permissions must be a new mutable instance and ! * it must support heterogeneous {@link Permission} types. ! * @since 1.4 ! * @see ProtectionDomain ! * @see SecureClassLoader ! */ ! public PermissionCollection getPermissions(ProtectionDomain domain) ! { ! if (domain == null) ! return new Permissions(); ! ! if (pd2pc == null) ! setup(this); ! ! PermissionCollection result = (PermissionCollection) pd2pc.get(domain); ! if (result != null) ! { ! Permissions realResult = new Permissions(); ! for (Enumeration e = result.elements(); e.hasMoreElements(); ) ! realResult.add((Permission) e.nextElement()); ! ! return realResult; ! } ! ! result = getPermissions(domain.getCodeSource()); ! if (result == null) ! result = new Permissions(); ! ! PermissionCollection pc = domain.getPermissions(); ! if (pc != null) ! for (Enumeration e = pc.elements(); e.hasMoreElements(); ) ! result.add((Permission) e.nextElement()); ! ! return result; ! } ! ! /** ! * Evaluates the global policy for the permissions granted to the {@link ! * ProtectionDomain} and tests whether the permission is granted. ! * ! * @param domain the {@link ProtectionDomain} to test. ! * @param permission the {@link Permission} object to be tested for ! * implication. ! * @return true if permission is a proper subset of ! * a permission granted to this {@link ProtectionDomain}. ! * @since 1.4 ! * @see ProtectionDomain ! */ ! public boolean implies(ProtectionDomain domain, Permission permission) ! { ! if (pd2pc == null) ! setup(this); ! ! PermissionCollection pc = (PermissionCollection) pd2pc.get(domain); ! if (pc != null) ! return pc.implies(permission); ! ! boolean result = false; ! pc = getPermissions(domain); ! if (pc != null) ! { ! result = pc.implies(permission); ! pd2pc.put(domain, pc); ! } ! ! return result; ! } ! ! /** ! * Refreshes/reloads the policy configuration. The behavior of this method ! * depends on the implementation. For example, calling refresh on a file-based ! * policy will cause the file to be re-read. */ public abstract void refresh(); } diff -Nrc3pad gcc-3.3.3/libjava/java/security/PrivateKey.java gcc-3.4.0/libjava/java/security/PrivateKey.java *** gcc-3.3.3/libjava/java/security/PrivateKey.java 2002-05-24 11:57:21.000000000 +0000 --- gcc-3.4.0/libjava/java/security/PrivateKey.java 2003-10-11 19:00:04.000000000 +0000 *************** package java.security; *** 56,62 **** public interface PrivateKey extends Key { /** ! * The verion identifier used for serialization. */ long serialVersionUID = 6034044314589513430L; } // interface PrivateKey --- 56,62 ---- public interface PrivateKey extends Key { /** ! * The version identifier used for serialization. */ long serialVersionUID = 6034044314589513430L; } // interface PrivateKey diff -Nrc3pad gcc-3.3.3/libjava/java/security/ProtectionDomain.java gcc-3.4.0/libjava/java/security/ProtectionDomain.java *** gcc-3.3.3/libjava/java/security/ProtectionDomain.java 2002-10-04 20:15:07.000000000 +0000 --- gcc-3.4.0/libjava/java/security/ProtectionDomain.java 2003-04-19 20:54:55.000000000 +0000 *************** *** 1,5 **** /* ProtectionDomain.java -- A security domain ! Copyright (C) 1998 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ProtectionDomain.java -- A security domain ! Copyright (C) 1998, 2003, Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 38,92 **** package java.security; /** ! * This class represents a group of classes, along with the permissions ! * they are granted. The classes are identified by a CodeSource. ! * Thus, any class loaded from the specified CodeSource is ! * treated as part of this domain. The set of permissions is represented ! * by a PermissionCollection. ! *

                ! * Every class in the system will belong to one and only one ! * ProtectionDomain. * ! * @version 0.0 * * @author Aaron M. Renn (arenn@urbanophile.com) */ public class ProtectionDomain { ! /** ! * This is the CodeSource for this protection domain ! */ private CodeSource code_source; /** ! * This is the set of permissions granted to this domain */ ! private PermissionCollection perms; /** ! * This method initializes a new instance of ProtectionDomain ! * representing the specified CodeSource and permission set. ! * No permissions may be added to the PermissionCollection ! * and this contructor will call the setReadOnly method on ! * the specified permission set. * ! * @param code_source The CodeSource for this domain ! * @param perms The permission set for this domain * ! * @see java.security.PermissionCollection#setReadOnly() ! */ ! public ProtectionDomain(CodeSource code_source, PermissionCollection perms) { ! this.code_source = code_source; ! this.perms = perms; ! if (perms != null) ! perms.setReadOnly(); } /** ! * This method returns the CodeSource for this domain. ! * ! * @return This domain's CodeSource. */ public final CodeSource getCodeSource() { --- 38,146 ---- package java.security; /** ! *

                This ProtectionDomain class encapsulates the characteristics ! * of a domain, which encloses a set of classes whose instances are granted a ! * set of permissions when being executed on behalf of a given set of ! * Principals. * ! *

                A static set of permissions can be bound to a ProtectionDomain ! * when it is constructed; such permissions are granted to the domain regardless ! * of the {@link Policy} in force. However, to support dynamic security ! * policies, a ProtectionDomain can also be constructed such that ! * it is dynamically mapped to a set of permissions by the current {@link ! * Policy} whenever a permission is checked.

                * * @author Aaron M. Renn (arenn@urbanophile.com) + * @version 0.0 */ public class ProtectionDomain { ! /** This is the CodeSource for this protection domain. */ private CodeSource code_source; + /** This is the set of permissions granted to this domain. */ + private PermissionCollection perms; + + /** The {@link ClassLoader} associated with this domain. */ + private ClassLoader classloader; + + /** The array of Principals associated with this domain.. */ + private Principal[] principals; + + /** Post 1.4 the policy may be refreshed! use false for pre 1.4. */ + private boolean staticBinding; + /** ! * Creates a new ProtectionDomain with the given {@link ! * CodeSource} and {@link Permissions}. If the permissions object is not ! * null, then setReadOnly() will be called on the ! * passed in {@link Permissions} object. The only permissions granted to this ! * domain are the ones specified; the current {@link Policy} will not be ! * consulted. ! * ! * @param codesource the codesource associated with this domain. ! * @param permissions the permissions granted to this domain */ ! public ProtectionDomain(CodeSource codesource, PermissionCollection permissions) ! { ! this(codesource, permissions, null, null, false); ! } /** ! *

                Creates a new ProtectionDomain qualified by the given CodeSource, ! * Permissions, ClassLoader and array of Principals. If the permissions ! * object is not null, then setReadOnly() will be called on the ! * passed in Permissions object. The permissions granted to this domain are ! * dynamic; they include both the static permissions passed to this ! * constructor, and any permissions granted to this domain by the current ! * Policy at the time a permission is checked.

                * ! *

                This constructor is typically used by {@link ClassLoader}s and {@link ! * DomainCombiner}s which delegate to Policy to actively ! * associate the permissions granted to this domain. This constructor affords ! * the Policy provider the opportunity to augment the supplied ! * PermissionCollection to reflect policy changes.

                * ! * @param codesource the CodeSource associated with this domain. ! * @param permissions the permissions granted to this domain. ! * @param classloader the ClassLoader associated with this domain. ! * @param principals the array of Principals associated with this domain. ! * @since 1.4 ! * @see Policy#refresh() ! * @see Policy#getPermissions(ProtectionDomain) ! */ ! public ProtectionDomain(CodeSource codesource, ! PermissionCollection permissions, ! ClassLoader classloader, Principal[] principals) { ! this(codesource, permissions, classloader, principals, false); ! } ! ! private ProtectionDomain(CodeSource codesource, ! PermissionCollection permissions, ! ClassLoader classloader, Principal[] principals, ! boolean staticBinding) ! { ! super(); ! ! code_source = codesource; ! if (permissions != null) ! { ! perms = permissions; ! perms.setReadOnly(); ! } ! ! this.classloader = classloader; ! this.principals = ! (principals != null ? (Principal[]) principals.clone() : new Principal[0]); ! this.staticBinding = staticBinding; } /** ! * Returns the {@link CodeSource} of this domain. ! * ! * @return the {@link CodeSource} of this domain which may be null. ! * @since 1.2 */ public final CodeSource getCodeSource() { *************** public class ProtectionDomain *** 94,102 **** } /** ! * This method returns the set of permissions granted to this domain. * ! * @return The permission set for this domain */ public final PermissionCollection getPermissions() { --- 148,183 ---- } /** ! * Returns the {@link ClassLoader} of this domain. * ! * @return the {@link ClassLoader} of this domain which may be ! * null. ! * @since 1.4 ! */ ! public final ClassLoader getClassLoader() ! { ! return this.classloader; ! } ! ! /** ! * Returns an array of principals for this domain. ! * ! * @return returns a non-null array of principals for this domain. Changes to ! * this array will have no impact on the ProtectionDomain. ! * @since 1.4 ! */ ! public final Principal[] getPrincipals() ! { ! return (Principal[]) principals.clone(); ! } ! ! /** ! * Returns the static permissions granted to this domain. ! * ! * @return the static set of permissions for this domain which may be ! * null. ! * @see Policy#refresh() ! * @see Policy#getPermissions(ProtectionDomain) */ public final PermissionCollection getPermissions() { *************** public class ProtectionDomain *** 104,144 **** } /** ! * This method tests whether or not the specified Permission is ! * implied by the set of permissions granted to this domain. * ! * @param perm The Permission to test. * ! * @return true if the specified Permission is implied for this domain, false otherwise. */ ! public boolean implies(Permission perm) { ! PermissionCollection pc = getPermissions(); ! if (pc == null) ! return (false); ! ! return (pc.implies(perm)); } /** ! * This method returns a String representation of this ! * object. It will print the CodeSource and ! * permission set associated with this domain. * ! * @return A String representation of this object. */ public String toString() { String linesep = System.getProperty("line.separator"); ! StringBuffer sb = new StringBuffer(""); ! sb.append("ProtectionDomain (" + linesep); if (code_source == null) ! sb.append("CodeSource:null" + linesep); else ! sb.append(code_source + linesep); ! sb.append(perms); ! sb.append(linesep + ")" + linesep); ! ! return sb.toString(); } } --- 185,269 ---- } /** ! *

                Check and see if this ProtectionDomain implies the ! * permissions expressed in the Permission object.

                * ! *

                The set of permissions evaluated is a function of whether the ! * ProtectionDomain was constructed with a static set of ! * permissions or it was bound to a dynamically mapped set of permissions.

                * ! *

                If the ProtectionDomain was constructed to a statically ! * bound {@link PermissionCollection} then the permission will only be checked ! * against the {@link PermissionCollection} supplied at construction.

                ! * ! *

                However, if the ProtectionDomain was constructed with the ! * constructor variant which supports dynamically binding permissions, then ! * the permission will be checked against the combination of the ! * {@link PermissionCollection} supplied at construction and the current ! * {@link Policy} binding. ! * ! * @param permission the {@link Permission} object to check. ! * @return true if permission is implicit to this ! * ProtectionDomain. */ ! public boolean implies(Permission permission) { ! if (staticBinding) ! return (perms == null ? false : perms.implies(permission)); ! // Else dynamically bound. Do we have it? ! // NOTE: this will force loading of Policy.currentPolicy ! return Policy.getCurrentPolicy().implies(this, permission); } /** ! * Convert a ProtectionDomain to a String. * ! * @return a string representation of the object. */ public String toString() { String linesep = System.getProperty("line.separator"); ! StringBuffer sb = new StringBuffer("ProtectionDomain (").append(linesep); ! if (code_source == null) ! sb.append("CodeSource:null"); else ! sb.append(code_source); ! ! sb.append(linesep); ! if (classloader == null) ! sb.append("ClassLoader:null"); ! else ! sb.append(classloader); ! ! sb.append(linesep); ! sb.append("Principals:"); ! if (principals != null && principals.length > 0) ! { ! sb.append("["); ! Principal pal; ! for (int i = 0; i < principals.length; i++) ! { ! pal = principals[i]; ! sb.append("'").append(pal.getName()) ! .append("' of type ").append(pal.getClass().getName()); ! if (i < principals.length-1) ! sb.append(", "); ! } ! sb.append("]"); ! } ! else ! sb.append("none"); ! ! sb.append(linesep); ! if (!staticBinding) // include all but dont force loading Policy.currentPolicy ! if (Policy.isLoaded()) ! sb.append(Policy.getCurrentPolicy().getPermissions(this)); ! else // fallback on this one's permissions ! sb.append(perms); ! else ! sb.append(perms); ! ! return sb.append(linesep).append(")").append(linesep).toString(); } } diff -Nrc3pad gcc-3.3.3/libjava/java/security/Provider.java gcc-3.4.0/libjava/java/security/Provider.java *** gcc-3.3.3/libjava/java/security/Provider.java 2002-11-17 00:10:24.000000000 +0000 --- gcc-3.4.0/libjava/java/security/Provider.java 2003-05-10 07:12:47.000000000 +0000 *************** import java.util.Properties; *** 45,51 **** * The services provided by a such a provider can range from security * algorithms to key generation. *

                ! * Providers are installed by name and verion number. There is one * standard provider supplied with the class library. This is the * "GNU" provider, which can also be accessed by the alias "SUN" for * compatibility with the JDK. --- 45,51 ---- * The services provided by a such a provider can range from security * algorithms to key generation. *

                ! * Providers are installed by name and version number. There is one * standard provider supplied with the class library. This is the * "GNU" provider, which can also be accessed by the alias "SUN" for * compatibility with the JDK. *************** import java.util.Properties; *** 56,62 **** */ public abstract class Provider extends Properties implements Serializable { ! static final long serialVersionUID = -4298000515446427739L; /** * This is a textual description of the provider --- 56,62 ---- */ public abstract class Provider extends Properties implements Serializable { ! private static final long serialVersionUID = -4298000515446427739L; /** * This is a textual description of the provider diff -Nrc3pad gcc-3.3.3/libjava/java/security/PublicKey.java gcc-3.4.0/libjava/java/security/PublicKey.java *** gcc-3.3.3/libjava/java/security/PublicKey.java 2002-05-24 11:57:23.000000000 +0000 --- gcc-3.4.0/libjava/java/security/PublicKey.java 2003-10-11 19:00:04.000000000 +0000 *************** package java.security; *** 54,60 **** public interface PublicKey extends Key { /** ! * The verion identifier used for serialization. */ long serialVersionUID = 7187392471159151072L; } // interface PublicKey --- 54,60 ---- public interface PublicKey extends Key { /** ! * The version identifier used for serialization. */ long serialVersionUID = 7187392471159151072L; } // interface PublicKey diff -Nrc3pad gcc-3.3.3/libjava/java/security/SecureClassLoader.java gcc-3.4.0/libjava/java/security/SecureClassLoader.java *** gcc-3.3.3/libjava/java/security/SecureClassLoader.java 2002-10-01 03:46:43.000000000 +0000 --- gcc-3.4.0/libjava/java/security/SecureClassLoader.java 2003-04-30 07:23:41.000000000 +0000 *************** public class SecureClassLoader extends C *** 93,99 **** /** Returns a PermissionCollection for the specified CodeSource. ! The default implmentation invokes java.security.Policy.getPermissions. This method is called by defineClass that takes a CodeSource --- 93,99 ---- /** Returns a PermissionCollection for the specified CodeSource. ! The default implementation invokes java.security.Policy.getPermissions. This method is called by defineClass that takes a CodeSource diff -Nrc3pad gcc-3.3.3/libjava/java/security/SecureRandom.java gcc-3.4.0/libjava/java/security/SecureRandom.java *** gcc-3.3.3/libjava/java/security/SecureRandom.java 2003-02-13 16:58:43.000000000 +0000 --- gcc-3.4.0/libjava/java/security/SecureRandom.java 2003-05-10 07:12:47.000000000 +0000 *************** *** 1,4 **** ! /* SecureRandom.java --- Secure Random class implmentation Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,4 ---- ! /* SecureRandom.java --- Secure Random class implementation Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** import java.io.Serializable; *** 41,56 **** import java.util.Random; import java.util.Enumeration; ! /** ! SecureRandom is the class interface for using SecureRandom ! providers. It provides an interface to the SecureRandomSpi ! engine so that programmers can generate pseudo-random numbers. ! @author Mark Benvenuto */ public class SecureRandom extends Random { ! static final long serialVersionUID = 4940670005562187L; //Serialized Field long counter = 0; //Serialized --- 41,68 ---- import java.util.Random; import java.util.Enumeration; ! import gnu.java.security.Engine; ! /** ! * An interface to a cryptographically secure pseudo-random number ! * generator (PRNG). Random (or at least unguessable) numbers are used ! * in all areas of security and cryptography, from the generation of ! * keys and initialization vectors to the generation of random padding ! * bytes. ! * ! * @author Mark Benvenuto ! * @author Casey Marshall */ public class SecureRandom extends Random { ! ! // Constants and fields. ! // ------------------------------------------------------------------------ ! ! /** Service name for PRNGs. */ ! private static final String SECURE_RANDOM = "SecureRandom"; ! ! private static final long serialVersionUID = 4940670005562187L; //Serialized Field long counter = 0; //Serialized *************** public class SecureRandom extends Random *** 60,65 **** --- 72,80 ---- SecureRandomSpi secureRandomSpi = null; byte[] state = null; + // Constructors. + // ------------------------------------------------------------------------ + /** Default constructor for SecureRandom. It constructs a new SecureRandom by instantating the first SecureRandom *************** public class SecureRandom extends Random *** 69,75 **** on the first call to getnextBytes it will force a seed. It is maintained for backwards compatibility and programs ! should use getInstance. */ public SecureRandom() { --- 84,90 ---- on the first call to getnextBytes it will force a seed. It is maintained for backwards compatibility and programs ! should use {@link #getInstance(java.lang.String)}. */ public SecureRandom() { *************** public class SecureRandom extends Random *** 88,107 **** { key = (String) e.nextElement(); if (key.startsWith("SECURERANDOM.")) ! { ! if ((classname = p[i].getProperty(key)) != null) ! { ! try ! { ! secureRandomSpi = (SecureRandomSpi) Class. ! forName(classname).newInstance(); ! provider = p[i]; ! return; ! } ! catch (Throwable ignore) { } ! } ! } ! } } // Nothing found. Fall back to SHA1PRNG --- 103,122 ---- { key = (String) e.nextElement(); if (key.startsWith("SECURERANDOM.")) ! { ! if ((classname = p[i].getProperty(key)) != null) ! { ! try ! { ! secureRandomSpi = (SecureRandomSpi) Class. ! forName(classname).newInstance(); ! provider = p[i]; ! return; ! } ! catch (Throwable ignore) { } ! } ! } ! } } // Nothing found. Fall back to SHA1PRNG *************** public class SecureRandom extends Random *** 141,155 **** this.provider = provider; } ! /** ! Returns an instance of a SecureRandom. It creates the class ! for the specified algorithm if it exists from a provider. ! ! @param algorithm A SecureRandom algorithm to use ! ! @return Returns a new SecureRandom implmenting the chosen algorithm ! @throws NoSuchAlgorithmException if the algorithm cannot be found */ public static SecureRandom getInstance(String algorithm) throws NoSuchAlgorithmException --- 156,172 ---- this.provider = provider; } ! // Class methods. ! // ------------------------------------------------------------------------ ! /** ! * Returns an instance of a SecureRandom. It creates the class from ! * the first provider that implements it. ! * ! * @param algorithm The algorithm name. ! * @return A new SecureRandom implementing the given algorithm. ! * @throws NoSuchAlgorithmException If no installed provider implements ! * the given algorithm. */ public static SecureRandom getInstance(String algorithm) throws NoSuchAlgorithmException *************** public class SecureRandom extends Random *** 157,167 **** Provider p[] = Security.getProviders(); for (int i = 0; i < p.length; i++) { ! try ! { ! return getInstance(algorithm, p[i]); ! } ! catch (NoSuchAlgorithmException ignored) { } } // None found. --- 174,186 ---- Provider p[] = Security.getProviders(); for (int i = 0; i < p.length; i++) { ! try ! { ! return getInstance(algorithm, p[i]); ! } ! catch (NoSuchAlgorithmException ignored) ! { ! } } // None found. *************** public class SecureRandom extends Random *** 169,189 **** } /** ! Returns an instance of a SecureRandom. It creates the class ! for the specified algorithm from the specified provider. ! ! @param algorithm A SecureRandom algorithm to use ! @param provider A security provider to use ! ! @return Returns a new SecureRandom implmenting the chosen algorithm ! ! @throws NoSuchAlgorithmException if the algorithm cannot be found ! @throws NoSuchProviderException if the provider cannot be found */ ! public static SecureRandom getInstance(String algorithm, ! String provider) throws ! NoSuchAlgorithmException, NoSuchProviderException { Provider p = Security.getProvider(provider); if (p == null) throw new NoSuchProviderException(); --- 188,213 ---- } /** ! * Returns an instance of a SecureRandom. It creates the class ! * for the specified algorithm from the named provider. ! * ! * @param algorithm The algorithm name. ! * @param provider The provider name. ! * @return A new SecureRandom implementing the chosen algorithm. ! * @throws NoSuchAlgorithmException If the named provider does not implement ! * the algorithm, or if the implementation cannot be ! * instantiated. ! * @throws NoSuchProviderException If no provider named ! * provider is currently installed. ! * @throws IllegalArgumentException If provider is null ! * or is empty. */ ! public static SecureRandom getInstance(String algorithm, String provider) ! throws NoSuchAlgorithmException, NoSuchProviderException { + if (provider == null || provider.length() == 0) + throw new IllegalArgumentException("Illegal provider"); + Provider p = Security.getProvider(provider); if (p == null) throw new NoSuchProviderException(); *************** public class SecureRandom extends Random *** 192,279 **** } /** ! Returns an instance of a SecureRandom. It creates the class for ! the specified algorithm from the given provider. ! ! @param algorithm The SecureRandom algorithm to create. ! @param provider The provider to get the instance from. ! ! @throws NoSuchAlgorithmException If the algorithm cannot be found, or ! if the class cannot be instantiated. ! */ ! public static SecureRandom getInstance(String algorithm, ! Provider provider) throws ! NoSuchAlgorithmException ! { ! return getInstance(algorithm, provider, true); ! } ! ! /** ! Creates the instance of SecureRandom, recursing to resolve aliases. ! ! @param algorithm The SecureRandom algorithm to create. ! @param provider The provider to get the implementation from. ! @param recurse Whether or not to recurse to resolve aliases. ! ! @throws NoSuchAlgorithmException If the algorithm cannot be found, ! if there are too many aliases, or if the class cannot be ! instantiated. */ ! private static SecureRandom getInstance(String algorithm, ! Provider provider, ! boolean recurse) ! throws NoSuchAlgorithmException { ! String msg = algorithm; ! for (Enumeration e = provider.propertyNames(); e.hasMoreElements(); ) { ! // We could replace the boolean with an integer, incrementing it ! // every ! String key = (String) e.nextElement(); ! if (key.startsWith("SECURERANDOM.") ! && key.substring(13).equalsIgnoreCase(algorithm)) ! { ! try ! { ! Class c = Class.forName(provider.getProperty(key)); ! return new SecureRandom((SecureRandomSpi) c.newInstance(), ! provider); ! } ! catch (Throwable ignored) { } ! } ! else if (key.startsWith("ALG.ALIAS.SECURERANDOM.") ! && key.substring(23).equalsIgnoreCase(algorithm) && recurse) ! { ! try ! { ! // First see if this alias refers to a class in this ! // provider. ! return getInstance(provider.getProperty(key), provider, false); ! } ! catch (NoSuchAlgorithmException nsae) ! { ! Provider[] provs = Security.getProviders(); ! for (int i = 0; i < provs.length; i++) ! { ! if (provs[i] == provider) ! continue; ! // Now try other providers for the implementation ! try ! { ! return getInstance(provider.getProperty(key), ! provs[i], false); ! } ! catch (NoSuchAlgorithmException nsae2) ! { ! msg = nsae2.getMessage(); ! } ! } ! } ! } } - throw new NoSuchAlgorithmException(algorithm); } /** Returns the provider being used by the current SecureRandom class. --- 216,254 ---- } /** ! * Returns an instance of a SecureRandom. It creates the class for ! * the specified algorithm from the given provider. ! * ! * @param algorithm The SecureRandom algorithm to create. ! * @param provider The provider to get the instance from. ! * @throws NoSuchAlgorithmException If the algorithm cannot be found, or ! * if the class cannot be instantiated. ! * @throws IllegalArgumentException If provider is null. */ ! public static SecureRandom getInstance(String algorithm, Provider provider) ! throws NoSuchAlgorithmException { ! if (provider == null) ! throw new IllegalArgumentException("Illegal provider"); ! try { ! return new SecureRandom((SecureRandomSpi) ! Engine.getInstance(SECURE_RANDOM, algorithm, provider), ! provider); ! } ! catch (java.lang.reflect.InvocationTargetException ite) ! { ! throw new NoSuchAlgorithmException(algorithm); ! } ! catch (ClassCastException cce) ! { ! throw new NoSuchAlgorithmException(algorithm); } } + // Instance methods. + // ------------------------------------------------------------------------ + /** Returns the provider being used by the current SecureRandom class. *************** public class SecureRandom extends Random *** 318,325 **** (byte) (0xff & (seed >> 16)), (byte) (0xff & (seed >> 8)), (byte) (0xff & seed) ! }; ! secureRandomSpi.engineSetSeed(tmp); } } --- 293,300 ---- (byte) (0xff & (seed >> 16)), (byte) (0xff & (seed >> 8)), (byte) (0xff & seed) ! }; ! secureRandomSpi.engineSetSeed(tmp); } } diff -Nrc3pad gcc-3.3.3/libjava/java/security/SecureRandomSpi.java gcc-3.4.0/libjava/java/security/SecureRandomSpi.java *** gcc-3.3.3/libjava/java/security/SecureRandomSpi.java 2002-10-04 20:15:07.000000000 +0000 --- gcc-3.4.0/libjava/java/security/SecureRandomSpi.java 2003-05-10 07:12:47.000000000 +0000 *************** import java.io.Serializable; *** 50,56 **** */ public abstract class SecureRandomSpi implements Serializable { ! static final long serialVersionUID = -2991854161009191830L; /** Default Constructor for SecureRandomSpi --- 50,56 ---- */ public abstract class SecureRandomSpi implements Serializable { ! private static final long serialVersionUID = -2991854161009191830L; /** Default Constructor for SecureRandomSpi diff -Nrc3pad gcc-3.3.3/libjava/java/security/Security.java gcc-3.4.0/libjava/java/security/Security.java *** gcc-3.3.3/libjava/java/security/Security.java 2003-06-07 19:32:07.000000000 +0000 --- gcc-3.4.0/libjava/java/security/Security.java 2003-12-02 17:31:46.000000000 +0000 *************** *** 1,5 **** ! /* Security.java --- Java base security class implmentation ! Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- ! /* Security.java --- Java base security class implementation ! Copyright (C) 1999, 2001, 2002, 2003, Free Software Foundation, Inc. This file is part of GNU Classpath. *************** obligated to do so. If you do not wish *** 36,89 **** exception statement from your version. */ package java.security; ! import java.io.File; import java.io.InputStream; import java.io.IOException; - import java.io.FileNotFoundException; import java.net.URL; import java.security.Provider; ! import java.util.Vector; import java.util.Enumeration; import java.util.Properties; /** ! Security class that loads the Providers and provides an ! interface to security properties. ! ! @author Mark Benvenuto */ - public final class Security extends Object { private static Vector providers = new Vector(); private static Properties secprops = new Properties(); ! static ! { ! String base = System.getProperty("gnu.classpath.home.url"); ! String vendor = System.getProperty("gnu.classpath.vm.shortname"); ! ! // Try VM specific security file ! boolean loaded = loadProviders(base, vendor); ! ! // Append classpath standard provider if possible ! if (!loadProviders(base, "classpath") && !loaded && providers.size() == 0) ! { ! // No providers found and both security files failed to load properly. ! System.err.println ! ("WARNING: could not properly read security provider files:"); ! System.err.println ! (" " + base + "/security/" + vendor + ".security"); ! System.err.println ! (" " + base + "/security/" + "classpath" + ".security"); ! System.err.println ! (" Falling back to standard GNU security provider"); ! providers.addElement(new gnu.java.security.provider.Gnu()); ! } } // This class can't be instantiated. ! private Security () { } --- 36,99 ---- exception statement from your version. */ package java.security; ! ! import java.io.FileNotFoundException; import java.io.InputStream; import java.io.IOException; import java.net.URL; import java.security.Provider; ! import java.util.Collections; import java.util.Enumeration; + import java.util.HashMap; + import java.util.HashSet; + import java.util.Iterator; + import java.util.LinkedHashSet; + import java.util.Map; import java.util.Properties; + import java.util.Set; + import java.util.Vector; /** ! * This class centralizes all security properties and common security methods. ! * One of its primary uses is to manage providers. ! * ! * @author Mark Benvenuto */ public final class Security extends Object { + private static final String ALG_ALIAS = "Alg.Alias."; + private static Vector providers = new Vector(); private static Properties secprops = new Properties(); ! static ! { ! String base = System.getProperty ("gnu.classpath.home.url"); ! String vendor = System.getProperty ("gnu.classpath.vm.shortname"); ! ! // Try VM specific security file ! boolean loaded = loadProviders (base, vendor); ! ! // Append classpath standard provider if possible ! if (!loadProviders (base, "classpath") ! && !loaded ! && providers.size() == 0) ! { ! // No providers found and both security files failed to load properly. ! System.err.println ! ("WARNING: could not properly read security provider files:"); ! System.err.println ! (" " + base + "/security/" + vendor + ".security"); ! System.err.println ! (" " + base + "/security/" + "classpath" + ".security"); ! System.err.println ! (" Falling back to standard GNU security provider"); ! providers.addElement (new gnu.java.security.provider.Gnu()); ! } } // This class can't be instantiated. ! private Security() { } *************** public final class Security extends Obje *** 106,117 **** int i = 1; String name; ! ! while ((name = secprops.getProperty("security.provider." + i)) != ! null) { Exception exception = null; - try { providers.addElement(Class.forName(name).newInstance()); --- 116,124 ---- int i = 1; String name; ! while ((name = secprops.getProperty("security.provider." + i)) != null) { Exception exception = null; try { providers.addElement(Class.forName(name).newInstance()); *************** public final class Security extends Obje *** 128,133 **** --- 135,141 ---- { exception = x; } + if (exception != null) { System.err.println ("WARNING: Error loading security provider " *************** public final class Security extends Obje *** 142,202 **** result = false; } ! return result; } /** ! Gets a specific property for an algorithm. This is used to produce ! specialized algorithm parsers. ! ! @deprecated it used to a return the value of a propietary property ! for the "SUN" Cryptographic Service Provider to obtain ! algorithm-specific parameters. Used AlogorithmParameters and ! KeyFactory instead. ! ! @param algName name of algorithm to get property of ! @param propName name of property to check ! ! @return a string containing the value of the property */ public static String getAlgorithmProperty(String algName, String propName) { ! /* TODO: Figure out what this actually does */ return null; } /** ! Adds a new provider, at a specified position. The position is the ! preference order in which providers are searched for requested algorithms. ! Note that it is not guaranteed that this preference will be respected. The ! position is 1-based, that is, 1 is most preferred, followed by 2, and so ! on. !

                ! If the given provider is installed at the requested position, the ! provider that used to be at that position, and all providers with a ! position greater than position, are shifted up one position (towards the ! end of the list of installed providers). !

                ! A provider cannot be added if it is already installed. !

                ! NOT IMPLEMENTED YET:[ ! First, if there is a security manager, its checkSecurityAccess ! method is called with the string ! "insertProvider."+provider.getName() ! to see if it's ok to add a new provider. If the default implementation of ! checkSecurityAccess is used (i.e., that method is not ! overriden), then this will result in a call to the security manager's ! checkPermission method with a SecurityPermission( ! "insertProvider."+provider.getName()) permission.] ! ! @param provider the provider to be added. ! @param position the preference position that the caller would like for ! this provider. ! @return the actual preference position (1-based) in which the provider was ! added, or -1 if the provider was not added because it is already installed. ! @throws SecurityException if a security manager exists and its ! SecurityManager.checkSecurityAccess(java.lang.String) method denies ! access to add a new provider. */ public static int insertProviderAt(Provider provider, int position) { --- 150,231 ---- result = false; } ! return false; } /** ! * Gets a specified property for an algorithm. The algorithm name should be a ! * standard name. See Appendix A in the Java Cryptography Architecture API ! * Specification & Reference for information about standard algorithm ! * names. One possible use is by specialized algorithm parsers, which may map ! * classes to algorithms which they understand (much like {@link Key} parsers ! * do). ! * ! * @param algName the algorithm name. ! * @param propName the name of the property to get. ! * @return the value of the specified property. ! * @deprecated This method used to return the value of a proprietary property ! * in the master file of the "SUN" Cryptographic Service Provider in order to ! * determine how to parse algorithm-specific parameters. Use the new ! * provider-based and algorithm-independent {@link AlgorithmParameters} and ! * {@link KeyFactory} engine classes (introduced in the Java 2 platform) ! * instead. */ public static String getAlgorithmProperty(String algName, String propName) { ! if (algName == null || propName == null) ! return null; ! ! String property = String.valueOf(propName) + "." + String.valueOf(algName); ! Provider p; ! for (Iterator i = providers.iterator(); i.hasNext(); ) ! { ! p = (Provider) i.next(); ! for (Iterator j = p.keySet().iterator(); j.hasNext(); ) ! { ! String key = (String) j.next(); ! if (key.equalsIgnoreCase(property)) ! return p.getProperty(key); ! } ! } return null; } /** ! *

                Adds a new provider, at a specified position. The position is the ! * preference order in which providers are searched for requested algorithms. ! * Note that it is not guaranteed that this preference will be respected. The ! * position is 1-based, that is, 1 is most preferred, followed by ! * 2, and so on.

                ! * ! *

                If the given provider is installed at the requested position, the ! * provider that used to be at that position, and all providers with a ! * position greater than position, are shifted up one position (towards the ! * end of the list of installed providers).

                ! * ! *

                A provider cannot be added if it is already installed.

                ! * ! *

                First, if there is a security manager, its checkSecurityAccess() ! * method is called with the string "insertProvider."+provider. ! * getName() to see if it's ok to add a new provider. If the default ! * implementation of checkSecurityAccess() is used (i.e., that ! * method is not overriden), then this will result in a call to the security ! * manager's checkPermission() method with a ! * SecurityPermission("insertProvider."+provider.getName()) ! * permission.

                ! * ! * @param provider the provider to be added. ! * @param position the preference position that the caller would like for ! * this provider. ! * @return the actual preference position in which the provider was added, or ! * -1 if the provider was not added because it is already ! * installed. ! * @throws SecurityException if a security manager exists and its ! * {@link SecurityManager#checkSecurityAccess(String)} method denies access ! * to add a new provider. ! * @see #getProvider(String) ! * @see #removeProvider(String) ! * @see SecurityPermission */ public static int insertProviderAt(Provider provider, int position) { *************** public final class Security extends Obje *** 208,215 **** int max = providers.size (); for (int i = 0; i < max; i++) { ! if (((Provider) providers.elementAt(i)).getName() == ! provider.getName()) return -1; } --- 237,243 ---- int max = providers.size (); for (int i = 0; i < max; i++) { ! if (((Provider) providers.elementAt(i)).getName() == provider.getName()) return -1; } *************** public final class Security extends Obje *** 223,248 **** return position + 1; } - /** ! Adds a provider to the next position available. !

                ! NOT IMPLEMENTED YET: [ ! First, if there is a security manager, its checkSecurityAccess ! method is called with the string ! "insertProvider."+provider.getName() ! to see if it's ok to add a new provider. If the default implementation of ! checkSecurityAccess is used (i.e., that method is not ! overriden), then this will result in a call to the security manager's ! checkPermission method with a SecurityPermission( ! "insertProvider."+provider.getName()) permission.] ! ! @param provider the provider to be added. ! @return the preference position in which the provider was added, or ! -1 if the provider was not added because it is already installed. ! @throws SecurityException if a security manager exists and its ! SecurityManager.checkSecurityAccess(java.lang.String) method denies ! access to add a new provider. */ public static int addProvider(Provider provider) { --- 251,278 ---- return position + 1; } /** ! *

                Adds a provider to the next position available.

                ! * ! *

                First, if there is a security manager, its checkSecurityAccess() ! * method is called with the string "insertProvider."+provider. ! * getName() to see if it's ok to add a new provider. If the default ! * implementation of checkSecurityAccess() is used (i.e., that ! * method is not overriden), then this will result in a call to the security ! * manager's checkPermission() method with a ! * SecurityPermission("insertProvider."+provider.getName()) ! * permission.

                ! * ! * @param provider the provider to be added. ! * @return the preference position in which the provider was added, or ! * -1 if the provider was not added because it is already ! * installed. ! * @throws SecurityException if a security manager exists and its ! * {@link SecurityManager#checkSecurityAccess(String)} method denies access ! * to add a new provider. ! * @see #getProvider(String) ! * @see #removeProvider(String) ! * @see SecurityPermission */ public static int addProvider(Provider provider) { *************** public final class Security extends Obje *** 250,267 **** } /** ! Removes a provider. This allows dynamic unloading ! of providers. It will automatically shift up providers to a higher ! ranking. If the provider is not installed, it fails silently. ! ! This method checks the security manager with the call checkSecurityAccess ! with "removeProvider."+provider.getName() to see if the user can remove ! this provider. ! ! @param name name of the provider to add ! ! @throws SecurityException - if the security manager denies access to ! remove a new provider */ public static void removeProvider(String name) { --- 280,307 ---- } /** ! *

                Removes the provider with the specified name.

                ! * ! *

                When the specified provider is removed, all providers located at a ! * position greater than where the specified provider was are shifted down ! * one position (towards the head of the list of installed providers).

                ! * ! *

                This method returns silently if the provider is not installed.

                ! * ! *

                First, if there is a security manager, its checkSecurityAccess() ! * method is called with the string "removeProvider."+name ! * to see if it's ok to remove the provider. If the default implementation of ! * checkSecurityAccess() is used (i.e., that method is not ! * overriden), then this will result in a call to the security manager's ! * checkPermission() method with a SecurityPermission( ! * "removeProvider."+name) permission.

                ! * ! * @param name the name of the provider to remove. ! * @throws SecurityException if a security manager exists and its ! * {@link SecurityManager#checkSecurityAccess(String)} method denies access ! * to remove the provider. ! * @see #getProvider(String) ! * @see #addProvider(Provider) */ public static void removeProvider(String name) { *************** public final class Security extends Obje *** 269,275 **** if (sm != null) sm.checkSecurityAccess("removeProvider." + name); - Provider p = null; int max = providers.size (); for (int i = 0; i < max; i++) { --- 309,314 ---- *************** public final class Security extends Obje *** 282,291 **** } /** ! Returns array containing all the providers. It is in the preference order ! of the providers. ! ! @return an array of installed providers */ public static Provider[] getProviders() { --- 321,330 ---- } /** ! * Returns an array containing all the installed providers. The order of the ! * providers in the array is their preference order. ! * ! * @return an array of all the installed providers. */ public static Provider[] getProviders() { *************** public final class Security extends Obje *** 295,306 **** } /** ! Returns the provider with the specified name. It will return null ! if the provider cannot be found. ! ! @param name name of the requested provider ! ! @return requested provider */ public static Provider getProvider(String name) { --- 334,346 ---- } /** ! * Returns the provider installed with the specified name, if any. Returns ! * null if no provider with the specified name is installed. ! * ! * @param name the name of the provider to get. ! * @return the provider of the specified name. ! * @see #removeProvider(String) ! * @see #addProvider(Provider) */ public static Provider getProvider(String name) { *************** public final class Security extends Obje *** 316,332 **** } /** ! Gets the value of a security property. ! ! This method checks the security manager with the call checkSecurityAccess ! with "getProperty."+key to see if the user can get this property. ! ! @param key property to get ! ! @return value of the property ! ! @throws SecurityException - if the security manager denies access to ! getting a property */ public static String getProperty(String key) { --- 356,375 ---- } /** ! *

                Gets a security property value.

                ! * ! *

                First, if there is a security manager, its checkPermission() ! * method is called with a SecurityPermission("getProperty."+key) ! * permission to see if it's ok to retrieve the specified security property ! * value.

                ! * ! * @param key the key of the property being retrieved. ! * @return the value of the security property corresponding to key. ! * @throws SecurityException if a security manager exists and its ! * {@link SecurityManager#checkPermission(Permission)} method denies access ! * to retrieve the specified security property value. ! * @see #setProperty(String, String) ! * @see SecurityPermission */ public static String getProperty(String key) { *************** public final class Security extends Obje *** 337,354 **** return secprops.getProperty(key); } - /** ! Sets the value of a security property. ! ! This method checks the security manager with the call checkSecurityAccess ! with "setProperty."+key to see if the user can get this property. ! ! @param key property to set ! @param datnum new value of property ! ! @throws SecurityException - if the security manager denies access to ! setting a property */ public static void setProperty(String key, String datnum) { --- 380,400 ---- return secprops.getProperty(key); } /** ! *

                Sets a security property value.

                ! * ! *

                First, if there is a security manager, its checkPermission() ! * method is called with a SecurityPermission("setProperty."+key) ! * permission to see if it's ok to set the specified security property value. ! *

                ! * ! * @param key the name of the property to be set. ! * @param datnum the value of the property to be set. ! * @throws SecurityException if a security manager exists and its ! * {@link SecurityManager#checkPermission(Permission)} method denies access ! * to set the specified security property value. ! * @see #getProperty(String) ! * @see SecurityPermission */ public static void setProperty(String key, String datnum) { *************** public final class Security extends Obje *** 358,361 **** --- 404,730 ---- secprops.put(key, datnum); } + + /** + * Returns a Set of Strings containing the names of all available algorithms + * or types for the specified Java cryptographic service (e.g., Signature, + * MessageDigest, Cipher, Mac, KeyStore). Returns an empty Set if there is no + * provider that supports the specified service. For a complete list of Java + * cryptographic services, please see the Java Cryptography Architecture API + * Specification & Reference. Note: the returned set is immutable. + * + * @param serviceName the name of the Java cryptographic service (e.g., + * Signature, MessageDigest, Cipher, Mac, KeyStore). Note: this parameter is + * case-insensitive. + * @return a Set of Strings containing the names of all available algorithms + * or types for the specified Java cryptographic service or an empty set if + * no provider supports the specified service. + * @since 1.4 + */ + public static Set getAlgorithms(String serviceName) + { + HashSet result = new HashSet(); + if (serviceName == null || serviceName.length() == 0) + return result; + + serviceName = serviceName.trim(); + if (serviceName.length() == 0) + return result; + + serviceName = serviceName.toUpperCase()+"."; + Provider[] providers = getProviders(); + int ndx; + for (int i = 0; i < providers.length; i++) + for (Enumeration e = providers[i].propertyNames(); e.hasMoreElements(); ) + { + String service = ((String) e.nextElement()).trim(); + if (service.toUpperCase().startsWith(serviceName)) + { + service = service.substring(serviceName.length()).trim(); + ndx = service.indexOf(' '); // get rid of attributes + if (ndx != -1) + service = service.substring(0, ndx); + result.add(service); + } + } + return Collections.unmodifiableSet(result); + } + + /** + *

                Returns an array containing all installed providers that satisfy the + * specified selection criterion, or null if no such providers + * have been installed. The returned providers are ordered according to their + * preference order.

                + * + *

                A cryptographic service is always associated with a particular + * algorithm or type. For example, a digital signature service is always + * associated with a particular algorithm (e.g., DSA), and a + * CertificateFactory service is always associated with a particular + * certificate type (e.g., X.509).

                + * + *

                The selection criterion must be specified in one of the following two + * formats:

                + * + *
                  + *
                • <crypto_service>.<algorithm_or_type>

                  + *

                  The cryptographic service name must not contain any dots.

                  + *

                  A provider satisfies the specified selection criterion iff the + * provider implements the specified algorithm or type for the specified + * cryptographic service.

                  + *

                  For example, "CertificateFactory.X.509" would be satisfied by any + * provider that supplied a CertificateFactory implementation for X.509 + * certificates.

                • + * + *
                • <crypto_service>.<algorithm_or_type> <attribute_name>:<attribute_value>

                  + *

                  The cryptographic service name must not contain any dots. There must + * be one or more space charaters between the the <algorithm_or_type> + * and the <attribute_name>.

                  + *

                  A provider satisfies this selection criterion iff the provider + * implements the specified algorithm or type for the specified + * cryptographic service and its implementation meets the constraint + * expressed by the specified attribute name/value pair.

                  + *

                  For example, "Signature.SHA1withDSA KeySize:1024" would be satisfied + * by any provider that implemented the SHA1withDSA signature algorithm + * with a keysize of 1024 (or larger).

                • + *
                + * + *

                See Appendix A in the Java Cryptogaphy Architecture API Specification + * & Reference for information about standard cryptographic service names, + * standard algorithm names and standard attribute names.

                + * + * @param filter the criterion for selecting providers. The filter is case- + * insensitive. + * @return all the installed providers that satisfy the selection criterion, + * or null if no such providers have been installed. + * @throws InvalidParameterException if the filter is not in the required + * format. + * @see #getProviders(Map) + */ + public static Provider[] getProviders(String filter) + { + if (providers == null || providers.isEmpty()) + return null; + + if (filter == null || filter.length() == 0) + return getProviders(); + + HashMap map = new HashMap(1); + int i = filter.indexOf(':'); + if (i == -1) // . + map.put(filter, ""); + else // . : + map.put(filter.substring(0, i), filter.substring(i+1)); + + return getProviders(map); + } + + /** + *

                Returns an array containing all installed providers that satisfy the + * specified selection criteria, or null if no such providers + * have been installed. The returned providers are ordered according to their + * preference order.

                + * + *

                The selection criteria are represented by a map. Each map entry + * represents a selection criterion. A provider is selected iff it satisfies + * all selection criteria. The key for any entry in such a map must be in one + * of the following two formats:

                + * + *
                  + *
                • <crypto_service>.<algorithm_or_type>

                  + *

                  The cryptographic service name must not contain any dots.

                  + *

                  The value associated with the key must be an empty string.

                  + *

                  A provider satisfies this selection criterion iff the provider + * implements the specified algorithm or type for the specified + * cryptographic service.

                • + * + *
                • <crypto_service>.<algorithm_or_type> <attribute_name>

                  + *

                  The cryptographic service name must not contain any dots. There must + * be one or more space charaters between the <algorithm_or_type> and + * the <attribute_name>.

                  + *

                  The value associated with the key must be a non-empty string. A + * provider satisfies this selection criterion iff the provider implements + * the specified algorithm or type for the specified cryptographic service + * and its implementation meets the constraint expressed by the specified + * attribute name/value pair.

                • + *
                + * + *

                See Appendix A in the Java Cryptogaphy Architecture API Specification + * & Reference for information about standard cryptographic service names, + * standard algorithm names and standard attribute names.

                + * + * @param filter the criteria for selecting providers. The filter is case- + * insensitive. + * @return all the installed providers that satisfy the selection criteria, + * or null if no such providers have been installed. + * @throws InvalidParameterException if the filter is not in the required + * format. + * @see #getProviders(String) + */ + public static Provider[] getProviders(Map filter) + { + if (providers == null || providers.isEmpty()) + return null; + + if (filter == null) + return getProviders(); + + Set querries = filter.keySet(); + if (querries == null || querries.isEmpty()) + return getProviders(); + + LinkedHashSet result = new LinkedHashSet(providers); // assume all + int dot, ws; + String querry, service, algorithm, attribute, value; + LinkedHashSet serviceProviders = new LinkedHashSet(); // preserve insertion order + for (Iterator i = querries.iterator(); i.hasNext(); ) + { + querry = (String) i.next(); + if (querry == null) // all providers + continue; + + querry = querry.trim(); + if (querry.length() == 0) // all providers + continue; + + dot = querry.indexOf('.'); + if (dot == -1) // syntax error + throw new InvalidParameterException( + "missing dot in '" + String.valueOf(querry)+"'"); + + value = (String) filter.get(querry); + // deconstruct querry into [service, algorithm, attribute] + if (value == null || value.trim().length() == 0) // . + { + value = null; + attribute = null; + service = querry.substring(0, dot).trim(); + algorithm = querry.substring(dot+1).trim(); + } + else // . + { + ws = querry.indexOf(' '); + if (ws == -1) + throw new InvalidParameterException( + "value (" + String.valueOf(value) + + ") is not empty, but querry (" + String.valueOf(querry) + + ") is missing at least one space character"); + value = value.trim(); + attribute = querry.substring(ws+1).trim(); + // was the dot in the attribute? + if (attribute.indexOf('.') != -1) + throw new InvalidParameterException( + "attribute_name (" + String.valueOf(attribute) + + ") in querry (" + String.valueOf(querry) + ") contains a dot"); + + querry = querry.substring(0, ws).trim(); + service = querry.substring(0, dot).trim(); + algorithm = querry.substring(dot+1).trim(); + } + + // service and algorithm must not be empty + if (service.length() == 0) + throw new InvalidParameterException( + " in querry (" + String.valueOf(querry) + + ") is empty"); + + if (algorithm.length() == 0) + throw new InvalidParameterException( + " in querry (" + String.valueOf(querry) + + ") is empty"); + + selectProviders(service, algorithm, attribute, value, result, serviceProviders); + result.retainAll(serviceProviders); // eval next retaining found providers + if (result.isEmpty()) // no point continuing + break; + } + + if (result.isEmpty()) + return null; + + return (Provider[]) result.toArray(new Provider[0]); + } + + private static void selectProviders(String svc, String algo, String attr, + String val, LinkedHashSet providerSet, + LinkedHashSet result) + { + result.clear(); // ensure we start with an empty result set + for (Iterator i = providerSet.iterator(); i.hasNext(); ) + { + Provider p = (Provider) i.next(); + if (provides(p, svc, algo, attr, val)) + result.add(p); + } + } + + private static boolean provides(Provider p, String svc, String algo, + String attr, String val) + { + Iterator it; + String serviceDotAlgorithm = null; + String key = null; + String realVal; + boolean found = false; + // if . is in the set then so is . + // but it may be stored under an alias . resolve + outer: for (int r = 0; r < 3; r++) // guard against circularity + { + serviceDotAlgorithm = (svc+"."+String.valueOf(algo)).trim(); + inner: for (it = p.keySet().iterator(); it.hasNext(); ) + { + key = (String) it.next(); + if (key.equalsIgnoreCase(serviceDotAlgorithm)) // eureka + { + found = true; + break outer; + } + // it may be there but as an alias + if (key.equalsIgnoreCase(ALG_ALIAS + serviceDotAlgorithm)) + { + algo = p.getProperty(key); + continue outer; + } + // else continue inner + } + } + + if (!found) + return false; + + // found a candidate for the querry. do we have an attr to match? + if (val == null) // . querry + return true; + + // . ; find the key entry that match + String realAttr; + int limit = serviceDotAlgorithm.length() + 1; + for (it = p.keySet().iterator(); it.hasNext(); ) + { + key = (String) it.next(); + if (key.length() <= limit) + continue; + + if (key.substring(0, limit).equalsIgnoreCase(serviceDotAlgorithm+" ")) + { + realAttr = key.substring(limit).trim(); + if (! realAttr.equalsIgnoreCase(attr)) + continue; + + // eveything matches so far. do the value + realVal = p.getProperty(key); + if (realVal == null) + return false; + + realVal = realVal.trim(); + // is it a string value? + if (val.equalsIgnoreCase(realVal)) + return true; + + // assume value is a number. cehck for greater-than-or-equal + return (new Integer(val).intValue() >= new Integer(realVal).intValue()); + } + } + + return false; + } } diff -Nrc3pad gcc-3.3.3/libjava/java/security/Signature.java gcc-3.4.0/libjava/java/security/Signature.java *** gcc-3.3.3/libjava/java/security/Signature.java 2002-11-17 00:10:24.000000000 +0000 --- gcc-3.4.0/libjava/java/security/Signature.java 2003-04-30 07:23:41.000000000 +0000 *************** *** 1,5 **** /* Signature.java --- Signature Class ! Copyright (C) 1999, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Signature.java --- Signature Class ! Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** obligated to do so. If you do not wish *** 36,108 **** exception statement from your version. */ package java.security; - import java.security.spec.AlgorithmParameterSpec; - - /** - Signature is used to provide an interface to digital signature - algorithms. Digital signatures provide authentication and data - integrity of digital data. - - The GNU provider provides the NIST standard DSA which uses DSA - and SHA-1. It can be specified by SHA/DSA, SHA-1/DSA or its - OID. If the RSA signature algorithm is provided then - it could be MD2/RSA. MD5/RSA, or SHA-1/RSA. The algorithm must - be specified because there is no default. - - Signature provides implementation-independent algorithms which - are requested by the user through getInstance. It can be - requested by specifying just the algorithm name or by - specifying both the algorithm name and provider name. - - The three phases of using Signature are: - - 1. Initialing - - * It must be initialized with a private key for signing. - * It must be initialized with a public key for verifying. - - 2. Updating ! Update the bytes for signing or verifying with calls to update. ! 3. Signing or Verify the signature on the currently stored ! bytes by calling sign or verify. ! @author Mark Benvenuto ! @since JDK 1.1 */ public abstract class Signature extends SignatureSpi { /** ! Possible state variable which signifies if it has not been ! initialized. */ ! protected static final int UNINITIALIZED = 1; /** ! Possible state variable which signifies if it has been ! initialized for signing. */ protected static final int SIGN = 2; /** ! Possible state variable which signifies if it has been ! initialized for verifying. */ protected static final int VERIFY = 3; ! /** ! State of this Signature class. ! */ protected int state = UNINITIALIZED; private String algorithm; Provider provider; /** ! Creates a new signature for this algorithm. ! ! @param algorithm the algorithm to use */ protected Signature(String algorithm) { --- 36,150 ---- exception statement from your version. */ package java.security; ! import java.security.cert.Certificate; ! import java.security.cert.X509Certificate; ! import java.security.spec.AlgorithmParameterSpec; ! import gnu.java.security.Engine; ! /** ! *

                This Signature class is used to provide applications the ! * functionality of a digital signature algorithm. Digital signatures are used ! * for authentication and integrity assurance of digital data.

                ! * ! *

                The signature algorithm can be, among others, the NIST standard DSS, ! * using DSA and SHA-1. The DSA algorithm using the ! * SHA-1 message digest algorithm can be specified as SHA1withDSA ! * . In the case of RSA, there are multiple choices for the ! * message digest algorithm, so the signing algorithm could be specified as, for ! * example, MD2withRSA, MD5withRSA, or ! * SHA1withRSA. The algorithm name must be specified, as there is ! * no default.

                ! * ! *

                Like other algorithm-based classes in Java Security, Signature ! * provides implementation-independent algorithms, whereby a caller (application ! * code) requests a particular signature algorithm and is handed back a properly ! * initialized Signature object. It is also possible, if desired, ! * to request a particular algorithm from a particular provider. See the ! * getInstance() methods.

                ! * ! *

                Thus, there are two ways to request a Signature algorithm ! * object: by specifying either just an algorithm name, or both an algorithm ! * name and a package provider.

                ! * ! *

                If just an algorithm name is specified, the system will determine if there ! * is an implementation of the algorithm requested available in the environment, ! * and if there is more than one, if there is a preferred one.

                ! * ! *

                If both an algorithm name and a package provider are specified, the system ! * will determine if there is an implementation of the algorithm in the package ! * requested, and throw an exception if there is not.

                ! * ! *

                A Signature object can be used to generate and verify digital ! * signatures.

                ! * ! *

                There are three phases to the use of a Signature object for ! * either signing data or verifying a signature:

                ! * ! *
                  ! *
                1. Initialization, with either ! *
                    ! *
                  • a public key, which initializes the signature for verification ! * (see initVerify()), or
                  • ! *
                  • a private key (and optionally a Secure Random Number Generator), ! * which initializes the signature for signing (see ! * {@link #initSign(PrivateKey)} and {@link #initSign(PrivateKey, SecureRandom)} ! * ).
                  • ! *
                2. ! *
                3. Updating
                  ! * Depending on the type of initialization, this will update the bytes to ! * be signed or verified. See the update methods.
                4. ! *
                5. Signing or Verifying a signature on all updated bytes. See the ! * sign() methods and the verify() method.
                6. ! *
                ! * ! *

                Note that this class is abstract and extends from {@link SignatureSpi} for ! * historical reasons. Application developers should only take notice of the ! * methods defined in this Signature class; all the methods in the ! * superclass are intended for cryptographic service providers who wish to ! * supply their own implementations of digital signature algorithms. ! * ! * @author Mark Benvenuto */ public abstract class Signature extends SignatureSpi { + /** Service name for signatures. */ + private static final String SIGNATURE = "Signature"; + /** ! * Possible state value, signifying that this signature object ! * has not yet been initialized. */ ! protected static final int UNINITIALIZED = 0; ! ! // Constructor. ! // ------------------------------------------------------------------------ /** ! * Possible state value, signifying that this signature object ! * has been initialized for signing. */ protected static final int SIGN = 2; /** ! * Possible state value, signifying that this signature object ! * has been initialized for verification. */ protected static final int VERIFY = 3; ! /** Current state of this signature object. */ protected int state = UNINITIALIZED; private String algorithm; Provider provider; /** ! * Creates a Signature object for the specified algorithm. ! * ! * @param algorithm the standard string name of the algorithm. See Appendix A ! * in the Java Cryptography Architecture API Specification & Reference for ! * information about standard algorithm names. */ protected Signature(String algorithm) { *************** public abstract class Signature extends *** 111,131 **** } /** ! Gets an instance of the Signature class representing ! the specified signature. If the algorithm is not found then, ! it throws NoSuchAlgorithmException. ! ! @param algorithm the name of signature algorithm to choose ! @return a Signature repesenting the desired algorithm ! ! @throws NoSuchAlgorithmException if the algorithm is not implemented by ! providers */ public static Signature getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] p = Security.getProviders(); - for (int i = 0; i < p.length; i++) { try --- 153,176 ---- } /** ! * Generates a Signature object that implements the specified ! * digest algorithm. If the default provider package provides an ! * implementation of the requested digest algorithm, an instance of ! * Signature containing that implementation is returned. If the ! * algorithm is not available in the default package, other packages are ! * searched. ! * ! * @param algorithm the standard name of the algorithm requested. See Appendix ! * A in the Java Cryptography Architecture API Specification & Reference ! * for information about standard algorithm names. ! * @return the new Signature object. ! * @throws NoSuchAlgorithmException if the algorithm is not available in the ! * environment. */ public static Signature getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] p = Security.getProviders(); for (int i = 0; i < p.length; i++) { try *************** public abstract class Signature extends *** 138,161 **** throw new NoSuchAlgorithmException(algorithm); } ! /** ! Gets an instance of the Signature class representing ! the specified signature from the specified provider. If the ! algorithm is not found then, it throws NoSuchAlgorithmException. ! If the provider is not found, then it throws ! NoSuchProviderException. ! ! @param algorithm the name of signature algorithm to choose ! @param provider the name of the provider to find the algorithm in ! @return a Signature repesenting the desired algorithm ! ! @throws NoSuchAlgorithmException if the algorithm is not implemented by ! the provider ! @throws NoSuchProviderException if the provider is not found */ public static Signature getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException { Provider p = Security.getProvider(provider); if (p == null) throw new NoSuchProviderException(provider); --- 183,212 ---- throw new NoSuchAlgorithmException(algorithm); } ! /** ! * Generates a Signature object implementing the specified ! * algorithm, as supplied from the specified provider, if such an algorithm ! * is available from the provider. ! * ! * @param algorithm the name of the algorithm requested. See Appendix A in ! * the Java Cryptography Architecture API Specification & Reference for ! * information about standard algorithm names. ! * @param provider the name of the provider. ! * @return the new Signature object. ! * @throws NoSuchAlgorithmException if the algorithm is not available in the ! * package supplied by the requested provider. ! * @throws NoSuchProviderException if the provider is not available in the ! * environment. ! * @throws IllegalArgumentException if the provider name is null ! * or empty. ! * @see Provider */ public static Signature getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException { + if (provider == null || provider.length() == 0) + throw new IllegalArgumentException("Illegal provider"); + Provider p = Security.getProvider(provider); if (p == null) throw new NoSuchProviderException(provider); *************** public abstract class Signature extends *** 163,231 **** return getInstance(algorithm, p); } ! private static Signature getInstance(String algorithm, Provider p) throws NoSuchAlgorithmException { ! // try the name as is ! String className = p.getProperty("Signature." + algorithm); ! if (className == null) { // try all uppercase ! String upper = algorithm.toUpperCase(); ! className = p.getProperty("Signature." + upper); ! if (className == null) { // try if it's an alias ! String alias = p.getProperty("Alg.Alias.Signature." + algorithm); ! if (alias == null) { ! alias = p.getProperty("Alg.Alias.Signature." + upper); ! if (alias == null) { // spit the dummy ! throw new NoSuchAlgorithmException(algorithm); ! } ! } ! className = p.getProperty("Signature." + alias); ! if (className == null) { ! throw new NoSuchAlgorithmException(algorithm); ! } ! } ! } ! return getInstance(className, algorithm, p); ! } ! private static Signature getInstance(String classname, ! String algorithm, ! Provider provider) ! throws NoSuchAlgorithmException ! { try { ! Object o = Class.forName(classname).newInstance(); ! Signature sig; ! if (o instanceof SignatureSpi) ! sig = new DummySignature((SignatureSpi) o, algorithm); ! else ! { ! sig = (Signature) o; ! sig.algorithm = algorithm; ! } ! ! sig.provider = provider; ! return sig; } ! catch (ClassNotFoundException cnfe) { ! throw new NoSuchAlgorithmException("Class not found"); } ! catch (InstantiationException ie) { ! throw new NoSuchAlgorithmException("Class instantiation failed"); } ! catch (IllegalAccessException iae) { ! throw new NoSuchAlgorithmException("Illegal Access"); } } /** ! Gets the provider that the Signature is from. ! ! @return the provider of this Signature */ public final Provider getProvider() { --- 214,275 ---- return getInstance(algorithm, p); } ! /** ! * Generates a Signature object implementing the specified ! * algorithm, as supplied from the specified provider, if such an algorithm ! * is available from the provider. Note: the provider doesn't have to be ! * registered. ! * ! * @param algorithm the name of the algorithm requested. See Appendix A in ! * the Java Cryptography Architecture API Specification & Reference for ! * information about standard algorithm names. ! * @param provider the provider. ! * @return the new Signature object. ! * @throws NoSuchAlgorithmException if the algorithm is not ! * available in the package supplied by the requested provider. ! * @throws IllegalArgumentException if the provider is ! * null. ! * @since 1.4 ! * @see Provider ! */ ! public static Signature getInstance(String algorithm, Provider provider) throws NoSuchAlgorithmException { ! if (provider == null) ! throw new IllegalArgumentException("Illegal provider"); ! Signature result = null; ! Object o = null; try { ! o = Engine.getInstance(SIGNATURE, algorithm, provider); } ! catch (java.lang.reflect.InvocationTargetException ite) { ! throw new NoSuchAlgorithmException(algorithm); } ! ! if (o instanceof SignatureSpi) { ! result = new DummySignature((SignatureSpi) o, algorithm); } ! else if (o instanceof Signature) { ! result = (Signature) o; ! result.algorithm = algorithm; ! } ! else ! { ! throw new NoSuchAlgorithmException(algorithm); } + result.provider = provider; + return result; } /** ! * Returns the provider of this signature object. ! * ! * @return the provider of this signature object. */ public final Provider getProvider() { *************** public abstract class Signature extends *** 233,244 **** } /** ! Initializes this class with the public key for ! verification purposes. ! ! @param publicKey the public key to verify with ! ! @throws InvalidKeyException invalid key */ public final void initVerify(PublicKey publicKey) throws InvalidKeyException { --- 277,288 ---- } /** ! * Initializes this object for verification. If this method is called again ! * with a different argument, it negates the effect of this call. ! * ! * @param publicKey the public key of the identity whose signature is going ! * to be verified. ! * @throws InvalidKeyException if the key is invalid. */ public final void initVerify(PublicKey publicKey) throws InvalidKeyException { *************** public abstract class Signature extends *** 247,285 **** } /** ! Verify Signature with a certificate. This is a FIPS 140-1 compatible method ! since it verifies a signature with a certificate. ! ! If the certificate is an X.509 certificate, has a KeyUsage parameter and ! the parameter indicates this key is not to be used for signing then an ! error is returned. ! ! @param certificate a certificate containing a public key to verify with */ ! public final void initVerify(java.security.cert.Certificate certificate) throws InvalidKeyException { state = VERIFY; if (certificate.getType().equals("X509")) { ! java.security.cert.X509Certificate cert = ! (java.security.cert.X509Certificate) certificate; ! boolean[]array = cert.getKeyUsage(); if (array != null && array[0] == false) ! throw new InvalidKeyException ! ("KeyUsage of this Certificate indicates it cannot be used for digital signing"); } this.initVerify(certificate.getPublicKey()); } /** ! Initializes this class with the private key for ! signing purposes. ! ! @param privateKey the private key to sign with ! ! @throws InvalidKeyException invalid key */ public final void initSign(PrivateKey privateKey) throws InvalidKeyException { --- 291,333 ---- } /** ! *

                Initializes this object for verification, using the public key from the ! * given certificate.

                ! * ! *

                If the certificate is of type X.509 and has a key usage ! * extension field marked as critical, and the value of the key ! * usage extension field implies that the public key in the certificate ! * and its corresponding private key are not supposed to be used for digital ! * signatures, an {@link InvalidKeyException} is thrown.

                ! * ! * @param certificate the certificate of the identity whose signature is ! * going to be verified. ! * @throws InvalidKeyException if the public key in the certificate is not ! * encoded properly or does not include required parameter information or ! * cannot be used for digital signature purposes. */ ! public final void initVerify(Certificate certificate) throws InvalidKeyException { state = VERIFY; if (certificate.getType().equals("X509")) { ! X509Certificate cert = (X509Certificate) certificate; boolean[]array = cert.getKeyUsage(); if (array != null && array[0] == false) ! throw new InvalidKeyException( ! "KeyUsage of this Certificate indicates it cannot be used for digital signing"); } this.initVerify(certificate.getPublicKey()); } /** ! * Initialize this object for signing. If this method is called again with a ! * different argument, it negates the effect of this call. ! * ! * @param privateKey the private key of the identity whose signature is going ! * to be generated. ! * @throws InvalidKeyException if the key is invalid. */ public final void initSign(PrivateKey privateKey) throws InvalidKeyException { *************** public abstract class Signature extends *** 288,302 **** } /** ! Initializes this class with the private key and source ! of randomness for signing purposes. ! ! @param privateKey the private key to sign with ! @param random Source of randomness ! ! @throws InvalidKeyException invalid key ! ! @since JDK 1.2 */ public final void initSign(PrivateKey privateKey, SecureRandom random) throws InvalidKeyException --- 336,348 ---- } /** ! * Initialize this object for signing. If this method is called again with a ! * different argument, it negates the effect of this call. ! * ! * @param privateKey the private key of the identity whose signature is going ! * to be generated. ! * @param random the source of randomness for this signature. ! * @throws InvalidKeyException if the key is invalid. */ public final void initSign(PrivateKey privateKey, SecureRandom random) throws InvalidKeyException *************** public abstract class Signature extends *** 305,395 **** engineInitSign(privateKey, random); } - /** ! Returns the signature bytes of all the data fed to this class. ! The format of the output depends on the underlying signature ! algorithm. ! ! @return the signature ! ! @throws SignatureException engine not properly initialized */ public final byte[] sign() throws SignatureException { if (state == SIGN) { ! state = UNINITIALIZED; ! return engineSign(); } else throw new SignatureException(); } /** ! Generates signature bytes of all the data fed to this class ! and outputs it to the passed array. The format of the ! output depends on the underlying signature algorithm. ! ! After calling this method, the signature is reset to its ! initial state and can be used to generate additional ! signatures. ! ! @param outbuf array of bytes ! @param offset the offset to start at in the array ! @param len the length of the bytes to put into the array. ! Neither this method or the GNU provider will ! return partial digests. If len is less than the ! signature length, this method will throw ! SignatureException. If it is greater than or equal ! then it is ignored. ! ! @return number of bytes in outbuf ! ! @throws SignatureException engine not properly initialized ! ! @since JDK 1.2 */ public final int sign(byte[] outbuf, int offset, int len) throws SignatureException { if (state == SIGN) { ! state = UNINITIALIZED; ! return engineSign(outbuf, offset, len); } else throw new SignatureException(); } /** ! Verifies the passed signature. ! ! @param signature the signature bytes to verify ! ! @return true if verified, false otherwise ! ! @throws SignatureException engine not properly initialized ! or wrong signature */ public final boolean verify(byte[]signature) throws SignatureException { if (state == VERIFY) { ! state = UNINITIALIZED; ! return engineVerify(signature); } else throw new SignatureException(); } /** ! Updates the data to be signed or verified with the specified ! byte. ! @param b byte to update with ! @throws SignatureException Engine not properly initialized */ public final void update(byte b) throws SignatureException { --- 351,487 ---- engineInitSign(privateKey, random); } /** ! *

                Returns the signature bytes of all the data updated. The format of the ! * signature depends on the underlying signature scheme.

                ! * ! *

                A call to this method resets this signature object to the state it was ! * in when previously initialized for signing via a call to ! * initSign(PrivateKey). That is, the object is reset and ! * available to generate another signature from the same signer, if desired, ! * via new calls to update() and sign().

                ! * ! * @return the signature bytes of the signing operation's result. ! * @throws SignatureException if this signature object is not initialized ! * properly. */ public final byte[] sign() throws SignatureException { if (state == SIGN) { ! state = UNINITIALIZED; ! return engineSign(); } else throw new SignatureException(); } /** ! *

                Finishes the signature operation and stores the resulting signature ! * bytes in the provided buffer outbuf, starting at offset ! * . The format of the signature depends on the underlying signature ! * scheme.

                ! * ! *

                This signature object is reset to its initial state (the state it was ! * in after a call to one of the initSign() methods) and can be ! * reused to generate further signatures with the same private key.

                ! * ! * @param outbuf buffer for the signature result. ! * @param offset offset into outbuf where the signature is stored. ! * @param len number of bytes within outbuf allotted for the signature. ! * @return the number of bytes placed into outbuf. ! * @throws SignatureException if an error occurs or len is less than the ! * actual signature length. ! * @since 1.2 */ public final int sign(byte[] outbuf, int offset, int len) throws SignatureException { if (state == SIGN) { ! state = UNINITIALIZED; ! return engineSign(outbuf, offset, len); } else throw new SignatureException(); } /** ! *

                Verifies the passed-in signature.

                ! * ! *

                A call to this method resets this signature object to the state it was ! * in when previously initialized for verification via a call to ! * initVerify(PublicKey). That is, the object is reset and ! * available to verify another signature from the identity whose public key ! * was specified in the call to initVerify().

                ! * ! * @param signature the signature bytes to be verified. ! * @return true if the signature was verified, false ! * if not. ! * @throws SignatureException if this signature object is not initialized ! * properly, or the passed-in signature is improperly encoded or of the wrong ! * type, etc. */ public final boolean verify(byte[]signature) throws SignatureException { if (state == VERIFY) { ! state = UNINITIALIZED; ! return engineVerify(signature); } else throw new SignatureException(); } /** ! *

                Verifies the passed-in signature in the specified array of ! * bytes, starting at the specified offset.

                ! * ! *

                A call to this method resets this signature object to the state it was ! * in when previously initialized for verification via a call to ! * initVerify(PublicKey). That is, the object is reset and ! * available to verify another signature from the identity whose public key ! * was specified in the call to initVerify().

                ! * ! * @param signature the signature bytes to be verified. ! * @param offset the offset to start from in the array of bytes. ! * @param length the number of bytes to use, starting at offset. ! * @return true if the signature was verified, false ! * if not. ! * @throws SignatureException if this signature object is not initialized ! * properly, or the passed-in signature is improperly encoded or ! * of the wrong type, etc. ! * @throws IllegalArgumentException if the signature byte array ! * is null, or the offset or length is ! * less than 0, or the sum of the offset and ! * length is greater than the length of the signature ! * byte array. ! */ ! public final boolean verify(byte[] signature, int offset, int length) ! throws SignatureException ! { ! if (state != VERIFY) ! throw new SignatureException("illegal state"); ! if (signature == null) ! throw new IllegalArgumentException("signaure is null"); ! if (offset < 0) ! throw new IllegalArgumentException("offset is less than 0"); ! if (length < 0) ! throw new IllegalArgumentException("length is less than 0"); ! if (offset + length < signature.length) ! throw new IllegalArgumentException("range is out of bounds"); ! state = UNINITIALIZED; ! return engineVerify(signature, offset, length); ! } ! ! /** ! * Updates the data to be signed or verified by a byte. ! * ! * @param b the byte to use for the update. ! * @throws SignatureException if this signature object is not initialized ! * properly. */ public final void update(byte b) throws SignatureException { *************** public abstract class Signature extends *** 400,411 **** } /** ! Updates the data to be signed or verified with the specified ! bytes. ! ! @param data array of bytes ! ! @throws SignatureException engine not properly initialized */ public final void update(byte[]data) throws SignatureException { --- 492,503 ---- } /** ! * Updates the data to be signed or verified, using the specified array of ! * bytes. ! * ! * @param data the byte array to use for the update. ! * @throws SignatureException if this signature object is not initialized ! * properly. */ public final void update(byte[]data) throws SignatureException { *************** public abstract class Signature extends *** 416,429 **** } /** ! Updates the data to be signed or verified with the specified ! bytes. ! ! @param data array of bytes ! @param off the offset to start at in the array ! @param len the length of the bytes to use in the array ! ! @throws SignatureException engine not properly initialized */ public final void update(byte[]data, int off, int len) throws SignatureException --- 508,521 ---- } /** ! * Updates the data to be signed or verified, using the specified array of ! * bytes, starting at the specified offset. ! * ! * @param data the array of bytes. ! * @param off the offset to start from in the array of bytes. ! * @param len the number of bytes to use, starting at offset. ! * @throws SignatureException if this signature object is not initialized ! * properly. */ public final void update(byte[]data, int off, int len) throws SignatureException *************** public abstract class Signature extends *** 434,444 **** throw new SignatureException(); } ! /** ! Gets the name of the algorithm currently used. ! The names of algorithms are usually SHA/DSA or SHA/RSA. ! ! @return name of algorithm. */ public final String getAlgorithm() { --- 526,535 ---- throw new SignatureException(); } ! /** ! * Returns the name of the algorithm for this signature object. ! * ! * @return the name of the algorithm for this signature object. */ public final String getAlgorithm() { *************** public abstract class Signature extends *** 446,454 **** } /** ! Returns a representation of the Signature as a String ! ! @return a string representing the signature */ public String toString() { --- 537,547 ---- } /** ! * Returns a string representation of this signature object, providing ! * information that includes the state of the object and the name of the ! * algorithm used. ! * ! * @return a string representation of this signature object. */ public String toString() { *************** public abstract class Signature extends *** 456,471 **** } /** ! Sets the specified algorithm parameter to the specified value. ! ! @param param parameter name ! @param value parameter value ! ! @throws InvalidParameterException invalid parameter, parameter ! already set and cannot set again, a security exception, ! etc. ! ! @deprecated use the other setParameter */ public final void setParameter(String param, Object value) throws InvalidParameterException --- 549,570 ---- } /** ! * Sets the specified algorithm parameter to the specified value. This method ! * supplies a general-purpose mechanism through which it is possible to set ! * the various parameters of this object. A parameter may be any settable ! * parameter for the algorithm, such as a parameter size, or a source of ! * random bits for signature generation (if appropriate), or an indication of ! * whether or not to perform a specific but optional computation. A uniform ! * algorithm-specific naming scheme for each parameter is desirable but left ! * unspecified at this time. ! * ! * @param param the string identifier of the parameter. ! * @param value the parameter value. ! * @throws InvalidParameterException if param is an invalid parameter for this ! * signature algorithm engine, the parameter is already set and cannot be set ! * again, a security exception occurs, and so on. ! * @see #getParameter(String) ! * @deprecated Use setParameter(AlgorithmParameterSpec). */ public final void setParameter(String param, Object value) throws InvalidParameterException *************** public abstract class Signature extends *** 474,490 **** } /** ! Sets the signature engine with the specified ! AlgorithmParameterSpec; ! ! By default this always throws UnsupportedOperationException ! if not overridden; ! ! @param params the parameters ! ! @throws InvalidParameterException invalid parameter, parameter ! already set and cannot set again, a security exception, ! etc. */ public final void setParameter(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException --- 573,584 ---- } /** ! * Initializes this signature engine with the specified parameter set. ! * ! * @param params the parameters. ! * @throws InvalidAlgorithmParameterException if the given parameters are ! * inappropriate for this signature engine. ! * @see #getParameters() */ public final void setParameter(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException *************** public abstract class Signature extends *** 493,507 **** } /** ! Gets the value for the specified algorithm parameter. ! ! @param param parameter name ! ! @return parameter value ! ! @throws InvalidParameterException invalid parameter ! @deprecated use the other getParameter */ public final Object getParameter(String param) throws InvalidParameterException --- 587,626 ---- } /** ! *

                Returns the parameters used with this signature object.

                ! * ! *

                The returned parameters may be the same that were used to initialize ! * this signature, or may contain a combination of default and randomly ! * generated parameter values used by the underlying signature implementation ! * if this signature requires algorithm parameters but was not initialized ! * with any. ! * ! * @return the parameters used with this signature, or null if ! * this signature does not use any parameters. ! * @see #setParameter(AlgorithmParameterSpec) ! */ ! public final AlgorithmParameters getParameters() ! { ! return engineGetParameters(); ! } ! /** ! * Gets the value of the specified algorithm parameter. This method supplies ! * a general-purpose mechanism through which it is possible to get the various ! * parameters of this object. A parameter may be any settable parameter for ! * the algorithm, such as a parameter size, or a source of random bits for ! * signature generation (if appropriate), or an indication of whether or not ! * to perform a specific but optional computation. A uniform ! * algorithm-specific naming scheme for each parameter is desirable but left ! * unspecified at this time. ! * ! * @param param the string name of the parameter. ! * @return the object that represents the parameter value, or null if there ! * is none. ! * @throws InvalidParameterException if param is an invalid parameter for this ! * engine, or another exception occurs while trying to get this parameter. ! * @see #setParameter(String, Object) ! * @deprecated */ public final Object getParameter(String param) throws InvalidParameterException *************** public abstract class Signature extends *** 510,521 **** } /** ! Returns a clone if cloneable. ! ! @return a clone if cloneable. ! ! @throws CloneNotSupportedException if the implementation does ! not support cloning */ public Object clone() throws CloneNotSupportedException { --- 629,639 ---- } /** ! * Returns a clone if the implementation is cloneable. ! * ! * @return a clone if the implementation is cloneable. ! * @throws CloneNotSupportedException if this is called on an implementation ! * that does not support {@link Cloneable}. */ public Object clone() throws CloneNotSupportedException { diff -Nrc3pad gcc-3.3.3/libjava/java/security/SignatureSpi.java gcc-3.4.0/libjava/java/security/SignatureSpi.java *** gcc-3.3.3/libjava/java/security/SignatureSpi.java 2002-01-22 22:40:30.000000000 +0000 --- gcc-3.4.0/libjava/java/security/SignatureSpi.java 2003-04-19 20:54:55.000000000 +0000 *************** *** 1,5 **** /* SignatureSpi.java --- Signature Service Provider Interface ! Copyright (C) 1999 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* SignatureSpi.java --- Signature Service Provider Interface ! Copyright (C) 1999, 2003, Free Software Foundation, Inc. This file is part of GNU Classpath. *************** obligated to do so. If you do not wish *** 36,102 **** exception statement from your version. */ package java.security; import java.security.spec.AlgorithmParameterSpec; /** ! SignatureSpi defines the Service Provider Interface (SPI) ! for the Signature class. The signature class provides an ! interface to a digital signature algorithm. Digital signatures ! are used for authentication and integrity of data. ! ! @author Mark Benvenuto ! ! @since JDK 1.2 */ public abstract class SignatureSpi { ! /** ! Source of randomness ! */ protected SecureRandom appRandom; - /** - Creates a new instance of SignatureSpi. - */ public SignatureSpi() { appRandom = null; } /** ! Initializes this class with the public key for ! verification purposes. ! ! @param publicKey the public key to verify with ! ! @throws InvalidKeyException invalid key */ protected abstract void engineInitVerify(PublicKey publicKey) throws InvalidKeyException; /** ! Initializes this class with the private key for ! signing purposes. ! ! @param privateKey the private key to sign with ! ! @throws InvalidKeyException invalid key */ protected abstract void engineInitSign(PrivateKey privateKey) throws InvalidKeyException; /** ! Initializes this class with the private key and source ! of randomness for signing purposes. ! ! This cannot be abstract backward compatibility reasons ! ! @param privateKey the private key to sign with ! @param random Source of randomness ! ! @throws InvalidKeyException invalid key ! ! @since JDK 1.2 */ protected void engineInitSign(PrivateKey privateKey, SecureRandom random) throws InvalidKeyException --- 36,105 ---- exception statement from your version. */ package java.security; + import java.security.spec.AlgorithmParameterSpec; /** ! *

                This class defines the Service Provider Interface (SPI) for the ! * {@link Signature} class, which is used to provide the functionality of a ! * digital signature algorithm. Digital signatures are used for authentication ! * and integrity assurance of digital data.

                ! * ! *

                All the abstract methods in this class must be implemented by each ! * cryptographic service provider who wishes to supply the implementation of a ! * particular signature algorithm. ! * ! * @author Mark Benvenuto ! * @since 1.2 ! * @see Signature */ public abstract class SignatureSpi { ! /** Application-specified source of randomness. */ protected SecureRandom appRandom; public SignatureSpi() { appRandom = null; } /** ! * Initializes this signature object with the specified public key for ! * verification operations. ! * ! * @param publicKey the public key of the identity whose signature is going ! * to be verified. ! * @throws InvalidKeyException if the key is improperly encoded, parameters ! * are missing, and so on. */ protected abstract void engineInitVerify(PublicKey publicKey) throws InvalidKeyException; /** ! * Initializes this signature object with the specified private key for ! * signing operations. ! * ! * @param privateKey the private key of the identity whose signature will be ! * generated. ! * @throws InvalidKeyException if the key is improperly encoded, parameters ! * are missing, and so on. */ protected abstract void engineInitSign(PrivateKey privateKey) throws InvalidKeyException; /** ! *

                Initializes this signature object with the specified private key and ! * source of randomness for signing operations.

                ! * ! *

                This concrete method has been added to this previously-defined abstract ! * class. (For backwards compatibility, it cannot be abstract.)

                ! * ! * @param privateKey the private key of the identity whose signature will be ! * generated. ! * @param random the source of randomness. ! * @throws InvalidKeyException if the key is improperly encoded, parameters ! * are missing, and so on. ! * @since 1.2 */ protected void engineInitSign(PrivateKey privateKey, SecureRandom random) throws InvalidKeyException *************** public abstract class SignatureSpi *** 106,223 **** } /** ! Updates the data to be signed or verified with the specified ! byte. ! ! @param b byte to update with ! ! @throws SignatureException Engine not properly initialized */ protected abstract void engineUpdate(byte b) throws SignatureException; /** ! Updates the data to be signed or verified with the specified ! bytes. ! ! @param b array of bytes ! @param off the offset to start at in the array ! @param len the length of the bytes to use in the array ! ! @throws SignatureException engine not properly initialized */ protected abstract void engineUpdate(byte[] b, int off, int len) throws SignatureException; /** ! Returns the signature bytes of all the data fed to this class. ! The format of the output depends on the underlying signature ! algorithm. ! ! @return the signature ! ! @throws SignatureException engine not properly initialized */ protected abstract byte[] engineSign() throws SignatureException; /** ! Generates signature bytes of all the data fed to this class ! and outputs it to the passed array. The format of the ! output depends on the underlying signature algorithm. ! ! This cannot be abstract backward compatibility reasons. ! After calling this method, the signature is reset to its ! initial state and can be used to generate additional ! signatures. ! ! @param outbuff array of bytes ! @param offset the offset to start at in the array ! @param len the length of the bytes to put into the array. ! Neither this method or the GNU provider will ! return partial digests. If len is less than the ! signature length, this method will throw ! SignatureException. If it is greater than or equal ! then it is ignored. ! ! @return number of bytes in outbuf ! ! @throws SignatureException engine not properly initialized ! ! @since JDK 1.2 */ protected int engineSign(byte[] outbuf, int offset, int len) throws SignatureException { byte tmp[] = engineSign(); - if (tmp.length > len) throw new SignatureException("Invalid Length"); System.arraycopy(outbuf, offset, tmp, 0, tmp.length); - return tmp.length; } /** ! Verifies the passed signature. ! ! @param sigBytes the signature bytes to verify ! ! @return true if verified, false otherwise ! ! @throws SignatureException engine not properly initialized ! or wrong signature */ protected abstract boolean engineVerify(byte[] sigBytes) throws SignatureException; /** ! Sets the specified algorithm parameter to the specified value. ! ! @param param parameter name ! @param value parameter value ! ! @throws InvalidParameterException invalid parameter, parameter ! already set and cannot set again, a security exception, ! etc. ! @deprecated use the other setParameter */ protected abstract void engineSetParameter(String param, Object value) throws InvalidParameterException; /** ! Sets the signature engine with the specified ! AlgorithmParameterSpec; ! ! This cannot be abstract backward compatibility reasons ! By default this always throws UnsupportedOperationException ! if not overridden; ! ! @param params the parameters ! ! @throws InvalidParameterException invalid parameter, parameter ! already set and cannot set again, a security exception, ! etc. */ protected void engineSetParameter(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException --- 109,243 ---- } /** ! * Updates the data to be signed or verified using the specified byte. ! * ! * @param b the byte to use for the update. ! * @throws SignatureException if the engine is not initialized properly. */ protected abstract void engineUpdate(byte b) throws SignatureException; /** ! * Updates the data to be signed or verified, using the specified array of ! * bytes, starting at the specified offset. ! * ! * @param b the array of bytes. ! * @param off the offset to start from in the array of bytes. ! * @param len the number of bytes to use, starting at offset. ! * @throws SignatureException if the engine is not initialized properly. */ protected abstract void engineUpdate(byte[] b, int off, int len) throws SignatureException; /** ! * Returns the signature bytes of all the data updated so far. The format of ! * the signature depends on the underlying signature scheme. ! * ! * @return the signature bytes of the signing operation's result. ! * @throws SignatureException if the engine is not initialized properly. */ protected abstract byte[] engineSign() throws SignatureException; /** ! *

                Finishes this signature operation and stores the resulting signature ! * bytes in the provided buffer outbuf, starting at offset ! * . The format of the signature depends on the underlying signature ! * scheme.

                ! * ! *

                The signature implementation is reset to its initial state (the state it ! * was in after a call to one of the engineInitSign() methods) ! * and can be reused to generate further signatures with the same private key. ! * This method should be abstract, but we leave it concrete for binary ! * compatibility. Knowledgeable providers should override this method.

                ! * ! * @param outbuf buffer for the signature result. ! * @param offset offset into outbuf where the signature is stored. ! * @param len number of bytes within outbuf allotted for the signature. Both ! * this default implementation and the GNU provider do not return ! * partial digests. If the value of this parameter is less than the actual ! * signature length, this method will throw a {@link SignatureException}. This ! * parameter is ignored if its value is greater than or equal to the actual ! * signature length. ! * @return the number of bytes placed into outbuf. ! * @throws SignatureException if an error occurs or len is less than the ! * actual signature length. ! * @since 1.2 */ protected int engineSign(byte[] outbuf, int offset, int len) throws SignatureException { byte tmp[] = engineSign(); if (tmp.length > len) throw new SignatureException("Invalid Length"); System.arraycopy(outbuf, offset, tmp, 0, tmp.length); return tmp.length; } /** ! * Verifies the passed-in signature. ! * ! * @param sigBytes the signature bytes to be verified. ! * @return true if the signature was verified, false ! * if not. ! * @throws SignatureException if the engine is not initialized properly, or ! * the passed-in signature is improperly encoded or of the wrong type, etc. */ protected abstract boolean engineVerify(byte[] sigBytes) throws SignatureException; /** ! *

                Verifies the passed-in signature in the specified array of ! * bytes, starting at the specified offset.

                ! * ! *

                Note: Subclasses should overwrite the default implementation.

                ! * ! * @param sigBytes the signature bytes to be verified. ! * @param offset the offset to start from in the array of bytes. ! * @param length the number of bytes to use, starting at offset. ! * @return true if the signature was verified, false ! * if not. ! * @throws SignatureException if the engine is not initialized properly, or ! * the passed-in signature is improperly encoded or of the wrong ! * type, etc. ! */ ! protected boolean engineVerify(byte[] sigBytes, int offset, int length) ! throws SignatureException ! { ! byte[] tmp = new byte[length]; ! System.arraycopy(sigBytes, offset, tmp, 0, length); ! return engineVerify(tmp); ! } ! /** ! * Sets the specified algorithm parameter to the specified value. This method ! * supplies a general-purpose mechanism through which it is possible to set ! * the various parameters of this object. A parameter may be any settable ! * parameter for the algorithm, such as a parameter size, or a source of ! * random bits for signature generation (if appropriate), or an indication of ! * whether or not to perform a specific but optional computation. A uniform ! * algorithm-specific naming scheme for each parameter is desirable but left ! * unspecified at this time. ! * ! * @param param the string identifier of the parameter. ! * @param value the parameter value. ! * @throws InvalidParameterException if param is an invalid ! * parameter for this signature algorithm engine, the parameter is already set ! * and cannot be set again, a security exception occurs, and so on. ! * @deprecated Replaced by engineSetParameter(AlgorithmParameterSpec). */ protected abstract void engineSetParameter(String param, Object value) throws InvalidParameterException; /** ! * This method is overridden by providers to initialize this signature engine ! * with the specified parameter set. ! * ! * @param params the parameters. ! * @throws UnsupportedOperationException if this method is not overridden by ! * a provider. ! * @throws InvalidAlgorithmParameterException if this method is overridden by ! * a provider and the the given parameters are inappropriate for this ! * signature engine. */ protected void engineSetParameter(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException *************** public abstract class SignatureSpi *** 226,251 **** } /** ! Gets the value for the specified algorithm parameter. ! ! @param param parameter name ! ! @return parameter value ! ! @throws InvalidParameterException invalid parameter ! @deprecated use the other getParameter */ protected abstract Object engineGetParameter(String param) throws InvalidParameterException; /** ! Returns a clone if cloneable. ! ! @return a clone if cloneable. ! ! @throws CloneNotSupportedException if the implementation does ! not support cloning */ public Object clone() throws CloneNotSupportedException { --- 246,299 ---- } /** ! *

                This method is overridden by providers to return the parameters used ! * with this signature engine, or null if this signature engine ! * does not use any parameters.

                ! * ! *

                The returned parameters may be the same that were used to initialize ! * this signature engine, or may contain a combination of default and randomly ! * generated parameter values used by the underlying signature implementation ! * if this signature engine requires algorithm parameters but was not ! * initialized with any.

                ! * ! * @return the parameters used with this signature engine, or null ! * if this signature engine does not use any parameters. ! * @throws UnsupportedOperationException if this method is not overridden by ! * a provider. ! */ ! protected AlgorithmParameters engineGetParameters() ! { ! throw new UnsupportedOperationException(); ! } ! /** ! * Gets the value of the specified algorithm parameter. This method supplies ! * a general-purpose mechanism through which it is possible to get the various ! * parameters of this object. A parameter may be any settable parameter for ! * the algorithm, such as a parameter size, or a source of random bits for ! * signature generation (if appropriate), or an indication of whether or not ! * to perform a specific but optional computation. A uniform algorithm-specific ! * naming scheme for each parameter is desirable but left unspecified at this ! * time. ! * ! * @param param the string name of the parameter. ! * @return the object that represents the parameter value, or null ! * if there is none. ! * @throws InvalidParameterException if param is an invalid ! * parameter for this engine, or another exception occurs while trying to get ! * this parameter. ! * @deprecated */ protected abstract Object engineGetParameter(String param) throws InvalidParameterException; /** ! * Returns a clone if the implementation is cloneable. ! * ! * @return a clone if the implementation is cloneable. ! * @throws CloneNotSupportedException if this is called on an implementation ! * that does not support {@link Cloneable}. ! * @see Cloneable */ public Object clone() throws CloneNotSupportedException { diff -Nrc3pad gcc-3.3.3/libjava/java/security/SignedObject.java gcc-3.4.0/libjava/java/security/SignedObject.java *** gcc-3.3.3/libjava/java/security/SignedObject.java 2002-10-04 20:15:07.000000000 +0000 --- gcc-3.4.0/libjava/java/security/SignedObject.java 2003-05-10 07:12:47.000000000 +0000 *************** *** 1,5 **** /* SignedObject.java --- Signed Object Class ! Copyright (C) 1999 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* SignedObject.java --- Signed Object Class ! Copyright (C) 1999, 2003, Free Software Foundation, Inc. This file is part of GNU Classpath. *************** obligated to do so. If you do not wish *** 36,105 **** exception statement from your version. */ package java.security; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; /** ! SignedObject is used for storing rutime objects whose integrity ! cannot be compromised without being detected. ! ! SignedObject contains a Serializable object which is yet to be ! signed and its signature. ! ! The signed copy is a "deep copy" (in serialized form) of the ! original object. Any changes to the original will not affect ! the original. ! ! Several things to note are that, first there is no need to ! initialize the signature engine as this class will handle that ! automatically. Second, verification will only succeed if the ! public key corresponds to the private key used to generate ! the SignedObject. ! ! For fexibility, the signature engine can be specified in the ! constructor or the verify method. The programmer who writes ! code that verifies the SignedObject has not changed should be ! aware of the Signature engine they use. A malicious Signature ! may choose to always return true on verification and ! bypass the secrity check. ! ! The GNU provider provides the NIST standard DSA which uses DSA ! and SHA-1. It can be specified by SHA/DSA, SHA-1/DSA or its ! OID. If the RSA signature algorithm is provided then ! it could be MD2/RSA. MD5/RSA, or SHA-1/RSA. The algorithm must ! be specified because there is no default. ! ! @author Mark Benvenuto ! ! @since JDK 1.2 */ public final class SignedObject implements Serializable { ! static final long serialVersionUID = 720502720485447167L; private byte[] content; private byte[] signature; private String thealgorithm; /** ! Constructs a new SignedObject from a Serializeable object. The ! object is signed with private key and signature engine ! ! @param object the object to sign ! @param signingKey the key to sign with ! @param signingEngine the signature engine to use ! ! @throws IOException serialization error occurred ! @throws InvalidKeyException invalid key ! @throws SignatureException signing error */ public SignedObject(Serializable object, PrivateKey signingKey, ! Signature signingEngine) throws IOException, ! InvalidKeyException, SignatureException { thealgorithm = signingEngine.getAlgorithm(); --- 36,158 ---- exception statement from your version. */ package java.security; + import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; + import java.io.ObjectInput; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; /** ! *

                SignedObject is a class for the purpose of creating authentic ! * runtime objects whose integrity cannot be compromised without being detected. ! *

                ! * ! *

                More specifically, a SignedObject contains another ! * {@link Serializable} object, the (to-be-)signed object and its signature.

                ! * ! *

                The signed object is a "deep copy" (in serialized form) of an ! * original object. Once the copy is made, further manipulation of the original ! * object has no side effect on the copy.

                ! * ! *

                The underlying signing algorithm is designated by the {@link Signature} ! * object passed to the constructor and the verify() method. A ! * typical usage for signing is the following:

                ! * ! *
                !  * Signature signingEngine = Signature.getInstance(algorithm, provider);
                !  * SignedObject so = new SignedObject(myobject, signingKey, signingEngine);
                !  * 
                ! * ! *

                A typical usage for verification is the following (having received ! * SignedObject so):

                ! * ! *
                !  * Signature verificationEngine = Signature.getInstance(algorithm, provider);
                !  * if (so.verify(publickey, verificationEngine))
                !  *   try
                !  *     {
                !  *       Object myobj = so.getObject();
                !  *     }
                !  *   catch (ClassNotFoundException ignored) {};
                !  * 
                ! * ! *

                Several points are worth noting. First, there is no need to initialize the ! * signing or verification engine, as it will be re-initialized inside the ! * constructor and the verify() method. Secondly, for verification ! * to succeed, the specified public key must be the public key corresponding to ! * the private key used to generate the SignedObject.

                ! * ! *

                More importantly, for flexibility reasons, the constructor ! * and verify() method allow for customized signature engines, ! * which can implement signature algorithms that are not installed formally as ! * part of a crypto provider. However, it is crucial that the programmer writing ! * the verifier code be aware what {@link Signature} engine is being used, as ! * its own implementation of the verify() method is invoked to ! * verify a signature. In other words, a malicious {@link Signature} may choose ! * to always return true on verification in an attempt to bypass a ! * security check.

                ! * ! *

                The signature algorithm can be, among others, the NIST standard DSS, ! * using DSA and SHA-1. The algorithm is specified using the same ! * convention as that for signatures. The DSA algorithm using the ! * SHA-1 message digest algorithm can be specified, for example, as ! * "SHA/DSA" or "SHA-1/DSA" (they are equivalent). In ! * the case of RSA, there are multiple choices for the message digest ! * algorithm, so the signing algorithm could be specified as, for example, ! * "MD2/RSA", "MD5/RSA" or "SHA-1/RSA". ! * The algorithm name must be specified, as there is no default.

                ! * ! *

                The name of the Cryptography Package Provider is designated also by the ! * {@link Signature} parameter to the constructor and the ! * verify() method. If the provider is not specified, the default ! * provider is used. Each installation can be configured to use a particular ! * provider as default.

                ! * ! *

                Potential applications of SignedObject include:

                ! * ! *
                  ! *
                • It can be used internally to any Java runtime as an unforgeable ! * authorization token -- one that can be passed around without the fear that ! * the token can be maliciously modified without being detected.
                • ! *
                • It can be used to sign and serialize data/object for storage outside the ! * Java runtime (e.g., storing critical access control data on disk).
                • ! *
                • Nested SignedObjects can be used to construct a logical sequence ! * of signatures, resembling a chain of authorization and delegation.
                • ! *
                ! * ! * @author Mark Benvenuto ! * @since 1.2 ! * @see Signature */ public final class SignedObject implements Serializable { ! private static final long serialVersionUID = 720502720485447167L; + /** @serial */ private byte[] content; + /** @serial */ private byte[] signature; + /** @serial */ private String thealgorithm; /** ! * Constructs a SignedObject from any {@link Serializable} ! * object. The given object is signed with the given signing key, using the ! * designated signature engine. ! * ! * @param object the object to be signed. ! * @param signingKey the private key for signing. ! * @param signingEngine the signature signing engine. ! * @throws IOException if an error occurs during serialization. ! * @throws InvalidKeyException if the key is invalid. ! * @throws SignatureException if signing fails. */ public SignedObject(Serializable object, PrivateKey signingKey, ! Signature signingEngine) ! throws IOException, InvalidKeyException, SignatureException { thealgorithm = signingEngine.getAlgorithm(); *************** public final class SignedObject implemen *** 107,112 **** --- 160,166 ---- ObjectOutputStream p = new ObjectOutputStream(ostream); p.writeObject(object); p.flush(); + p.close(); content = ostream.toByteArray(); *************** public final class SignedObject implemen *** 116,150 **** } /** ! Returns the encapsulated object. The object is ! de-serialized before being returned. ! ! @return the encapsulated object ! ! @throws IOException de-serialization error occurred ! @throws ClassNotFoundException de-serialization error occurred */ public Object getObject() throws IOException, ClassNotFoundException { ! ByteArrayInputStream istream = new ByteArrayInputStream(content); ! return new ObjectInputStream(istream).readObject(); } /** ! Returns the signature of the encapsulated object. ! ! @return a byte array containing the signature */ public byte[] getSignature() { ! return signature; } /** ! Returns the name of the signature algorithm. ! ! @return the name of the signature algorithm. */ public String getAlgorithm() { --- 170,208 ---- } /** ! * Retrieves the encapsulated object. The encapsulated object is de-serialized ! * before it is returned. ! * ! * @return the encapsulated object. ! * @throws IOException if an error occurs during de-serialization. ! * @throws ClassNotFoundException if an error occurs during de-serialization. */ public Object getObject() throws IOException, ClassNotFoundException { ! ByteArrayInputStream bais = new ByteArrayInputStream(content); ! ObjectInput oi = new ObjectInputStream(bais); ! Object obj = oi.readObject(); ! oi.close(); ! bais.close(); ! return obj; } /** ! * Retrieves the signature on the signed object, in the form of a byte array. ! * ! * @return a copy of the signature. */ public byte[] getSignature() { ! return (byte[]) signature.clone(); ! } /** ! * Retrieves the name of the signature algorithm. ! * ! * @return the signature algorithm name. */ public String getAlgorithm() { *************** public final class SignedObject implemen *** 152,179 **** } /** ! Verifies the SignedObject by checking that the signature that ! this class contains for the encapsulated object. ! ! @param verificationKey the public key to use ! @param verificationEngine the signature engine to use ! ! @return true if signature is correct, false otherwise ! ! @throws InvalidKeyException invalid key ! @throws SignatureException signature verification failed */ ! public boolean verify(PublicKey verificationKey, ! Signature verificationEngine) throws ! InvalidKeyException, SignatureException { verificationEngine.initVerify(verificationKey); verificationEngine.update(content); return verificationEngine.verify(signature); } ! // readObject is called to restore the state of the SignedObject from a ! // stream. ! //private void readObject(ObjectInputStream s) ! // throws IOException, ClassNotFoundException } --- 210,240 ---- } /** ! * Verifies that the signature in this SignedObject is the valid ! * signature for the object stored inside, with the given verification key, ! * using the designated verification engine. ! * ! * @param verificationKey the public key for verification. ! * @param verificationEngine the signature verification engine. ! * @return true if the signature is valid, false ! * otherwise. ! * @throws SignatureException if signature verification failed. ! * @throws InvalidKeyException if the verification key is invalid. */ ! public boolean verify(PublicKey verificationKey, Signature verificationEngine) ! throws InvalidKeyException, SignatureException { verificationEngine.initVerify(verificationKey); verificationEngine.update(content); return verificationEngine.verify(signature); } ! /** Called to restore the state of the SignedObject from a stream. */ ! private void readObject(ObjectInputStream s) ! throws IOException, ClassNotFoundException ! { ! s.defaultReadObject(); ! content = (byte[]) content.clone(); ! signature = (byte[]) signature.clone(); ! } } diff -Nrc3pad gcc-3.3.3/libjava/java/security/Signer.java gcc-3.4.0/libjava/java/security/Signer.java *** gcc-3.3.3/libjava/java/security/Signer.java 2002-01-22 22:40:30.000000000 +0000 --- gcc-3.4.0/libjava/java/security/Signer.java 2003-05-10 07:12:47.000000000 +0000 *************** *** 1,5 **** /* Signer.java --- Signer Class ! Copyright (C) 1999 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Signer.java --- Signer Class ! Copyright (C) 1999, 2003, Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 38,65 **** package java.security; /** ! Signer is a subclass used to store a digital signature key with ! an Identity. ! ! @author Mark Benvenuto ! ! @since JDK 1.1 */ public abstract class Signer extends Identity { private PrivateKey privateKey = null; /** ! Constructs a new Signer. */ protected Signer() { } /** ! Constructs a new Signer with the specified name. ! ! @param name the name of the identity. */ public Signer(String name) { --- 38,72 ---- package java.security; /** ! *

                This class is used to represent an {@link Identity} that can also ! * digitally sign data.

                ! * ! *

                The management of a signer's private keys is an important and sensitive ! * issue that should be handled by subclasses as appropriate to their intended ! * use.

                ! * ! * @author Mark Benvenuto ! * @deprecated This class is no longer used. Its functionality has been replaced ! * by java.security.KeyStore, the java.security.cert ! * package, and java.security.Principal. */ public abstract class Signer extends Identity { + private static final long serialVersionUID = -1763464102261361480L; private PrivateKey privateKey = null; /** ! * Creates a Signer. This constructor should only be used for ! * serialization. */ protected Signer() { } /** ! * Creates a Signer with the specified identity name. ! * ! * @param name the identity name. */ public Signer(String name) { *************** public abstract class Signer extends Ide *** 67,97 **** } /** ! Constructs a new Signer with the specifid name and ! IdentityScope. ! ! @param name the name of the identity. ! @scope the IdentityScope to use ! ! @throws KeyManagementException if duplicate identity name ! within scope */ ! public Signer(String name, IdentityScope scope) ! throws KeyManagementException { super(name, scope); } /** ! Returns the private key for this signer. ! ! This class checks the security manager with the call ! checkSecurityAccess with "getSignerPrivateKey". ! ! @returns the private key for the signer ! ! @throws SecurityException - if the security manager denies ! access to "getSignerPrivateKey" */ public PrivateKey getPrivateKey() { --- 74,104 ---- } /** ! * Creates a Signer with the specified identity name and scope. ! * ! * @param name the identity name. ! * @param scope the scope of the identity. ! * @throws KeyManagementException if there is already an identity with the ! * same name in the scope. */ ! public Signer(String name, IdentityScope scope) throws KeyManagementException { super(name, scope); } /** ! *

                Returns this signer's private key.

                ! * ! *

                First, if there is a security manager, its checkSecurityAccess() ! * method is called with "getSignerPrivateKey" as its ! * argument to see if it's ok to return the private key.

                ! * ! * @return this signer's private key, or null if the private key ! * has not yet been set. ! * @throws SecurityException if a security manager exists and its ! * checkSecurityAccess() method doesn't allow returning the ! * private key. ! * @see SecurityManager#checkSecurityAccess(String) */ public PrivateKey getPrivateKey() { *************** public abstract class Signer extends Ide *** 103,119 **** } /** ! Specifies the KeyPair associated with this Signer. ! ! This class checks the security manager with the call ! checkSecurityAccess with "setSignerKeyPair". ! ! @param pair the keyPair ! ! @throws InvalidParameterException invalidly intialized key pair ! @throws KeyException another key error ! @throws SecurityException - if the security manager denies ! access to "getSignerPrivateKey" */ public final void setKeyPair(KeyPair pair) throws InvalidParameterException, KeyException --- 110,129 ---- } /** ! *

                Sets the key pair (public key and private key) for this signer.

                ! * ! *

                First, if there is a security manager, its checkSecurityAccess() ! * method is called with "setSignerKeyPair" as its ! * argument to see if it's ok to set the key pair.

                ! * ! * @param pair an initialized key pair. ! * @throws InvalidParameterException if the key pair is not properly ! * initialized. ! * @throws KeyException if the key pair cannot be set for any other reason. ! * @throws SecurityException if a security manager exists and its ! * checkSecurityAccess() method doesn't allow setting the key ! * pair. ! * @see SecurityManager#checkSecurityAccess(String) */ public final void setKeyPair(KeyPair pair) throws InvalidParameterException, KeyException *************** public abstract class Signer extends Ide *** 124,138 **** try { ! if (pair.getPublic() != null) ! setPublicKey(pair.getPublic()); ! else ! throw new InvalidParameterException(); } catch (KeyManagementException kme) { ! throw new KeyException(); } if (pair.getPrivate() != null) --- 134,148 ---- try { ! if (pair.getPublic() != null) ! setPublicKey(pair.getPublic()); ! else ! throw new InvalidParameterException(); } catch (KeyManagementException kme) { ! throw new KeyException(); } if (pair.getPrivate() != null) *************** public abstract class Signer extends Ide *** 142,150 **** } /** ! Returns a string representing this Signer. ! ! @returns a string representing this Signer. */ public String toString() { --- 152,161 ---- } /** ! * Returns a string of information about the signer. ! * ! * @return a string of information about the signer. ! * @see SecurityManager#checkSecurityAccess(String) */ public String toString() { diff -Nrc3pad gcc-3.3.3/libjava/java/security/spec/DSAPublicKeySpec.java gcc-3.4.0/libjava/java/security/spec/DSAPublicKeySpec.java *** gcc-3.3.3/libjava/java/security/spec/DSAPublicKeySpec.java 2002-12-03 18:46:59.000000000 +0000 --- gcc-3.4.0/libjava/java/security/spec/DSAPublicKeySpec.java 2003-04-30 07:23:42.000000000 +0000 *************** public class DSAPublicKeySpec extends Ob *** 62,68 **** @param q the sub-prime @param g the base */ ! public DSAPublicKeySpec(BigInteger x, BigInteger p, BigInteger q, BigInteger g) { this.y = y; this.p = p; --- 62,68 ---- @param q the sub-prime @param g the base */ ! public DSAPublicKeySpec(BigInteger y, BigInteger p, BigInteger q, BigInteger g) { this.y = y; this.p = p; diff -Nrc3pad gcc-3.3.3/libjava/java/security/spec/PSSParameterSpec.java gcc-3.4.0/libjava/java/security/spec/PSSParameterSpec.java *** gcc-3.3.3/libjava/java/security/spec/PSSParameterSpec.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/security/spec/PSSParameterSpec.java 2003-04-19 20:54:55.000000000 +0000 *************** *** 0 **** --- 1,90 ---- + /* PSSParameterSpec.java -- + Copyright (C) 2003, Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package java.security.spec; + + /** + * This class specifies a parameter spec for RSA PSS encoding scheme, as + * defined in the PKCS#1 v2.1. + * + * @since 1.4 + * @see AlgorithmParameterSpec + * @see java.security.Signature + */ + public class PSSParameterSpec implements AlgorithmParameterSpec + { + // Constants and fields + // -------------------------------------------------------------------------- + + private int saltLen; + + // Constructor(s) + // -------------------------------------------------------------------------- + + /** + * Creates a new PSSParameterSpec given the salt length as + * defined in PKCS#1. + * + * @param saltLen the length of salt in bits to be used in PKCS#1 PSS encoding. + * @throws IllegalArgumentException if saltLen is less than + * 0. + */ + public PSSParameterSpec(int saltLen) + { + super(); + + if (saltLen < 0) + throw new IllegalArgumentException(); + this.saltLen = saltLen; + } + + // Class methods + // -------------------------------------------------------------------------- + + // Instance methods + // -------------------------------------------------------------------------- + + /** + * Returns the salt length in bits. + * + * @return the salt length. + */ + public int getSaltLength() + { + return this.saltLen; + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java gcc-3.4.0/libjava/java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java *** gcc-3.3.3/libjava/java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java 2003-04-19 20:54:55.000000000 +0000 *************** *** 0 **** --- 1,218 ---- + /* PSSParameterSpec.java -- + Copyright (C) 2003, Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package java.security.spec; + + import java.math.BigInteger; + import java.security.spec.RSAOtherPrimeInfo; + + /** + * This class specifies an RSA multi-prime private key, as defined in the + * PKCS#1 v2.1, using the Chinese Remainder Theorem (CRT) information + * values for efficiency. + * + * @since 1.4 + * @see java.security.Key + * @see java.security.KeyFactory + * @see KeySpec + * @see PKCS8EncodedKeySpec + * @see RSAPrivateKeySpec + * @see RSAPublicKeySpec + * @see RSAOtherPrimeInfo + */ + public class RSAMultiPrimePrivateCrtKeySpec extends RSAPrivateKeySpec + { + // Constants and fields + // -------------------------------------------------------------------------- + + private BigInteger publicExponent; + private BigInteger primeP; + private BigInteger primeQ; + private BigInteger primeExponentP; + private BigInteger primeExponentQ; + private BigInteger crtCoefficient; + private RSAOtherPrimeInfo[] otherPrimeInfo; + + // Constructor(s) + // -------------------------------------------------------------------------- + + /** + *

                Creates a new RSAMultiPrimePrivateCrtKeySpec given the + * modulus, publicExponent, privateExponent, primeP, primeQ, primeExponentP, + * primeExponentQ, crtCoefficient, and otherPrimeInfo as defined in PKCS#1 + * v2.1.

                + * + *

                Note that otherPrimeInfo is cloned when constructing this + * object.

                + * + * @param modulus the modulus n. + * @param publicExponent the public exponent e. + * @param privateExponent the private exponent d. + * @param primeP the prime factor p of n. + * @param primeQ the prime factor q of n. + * @param primeExponentP this is d mod (p-1). + * @param primeExponentQ this is d mod (q-1). + * @param crtCoefficient the Chinese Remainder Theorem coefficient q-1 mod p. + * @param otherPrimeInfo triplets of the rest of primes, null + * can be specified if there are only two prime factors (p and q). + * @throws NullPointerException if any of the parameters, i.e. modulus, + * publicExponent, privateExponent, primeP, primeQ, primeExponentP, + * primeExponentQ, crtCoefficient, is null. + * @throws IllegalArgumentException if an empty, i.e. 0-length, + * otherPrimeInfo is specified. + */ + public RSAMultiPrimePrivateCrtKeySpec(BigInteger modulus, + BigInteger publicExponent, + BigInteger privateExponent, + BigInteger primeP, + BigInteger primeQ, + BigInteger primeExponentP, + BigInteger primeExponentQ, + BigInteger crtCoefficient, + RSAOtherPrimeInfo[] otherPrimeInfo) + { + super(modulus, privateExponent); + + if (modulus == null) + throw new NullPointerException("modulus"); + if (publicExponent == null) + throw new NullPointerException("publicExponent"); + if (privateExponent == null) + throw new NullPointerException("privateExponent"); + if (primeP == null) + throw new NullPointerException("primeP"); + if (primeQ == null) + throw new NullPointerException("primeQ"); + if (primeExponentP == null) + throw new NullPointerException("primeExponentP"); + if (primeExponentQ == null) + throw new NullPointerException("primeExponentQ"); + if (crtCoefficient == null) + throw new NullPointerException("crtCoefficient"); + if (otherPrimeInfo != null) + if (otherPrimeInfo.length == 0) + throw new IllegalArgumentException(); + else + this.otherPrimeInfo = (RSAOtherPrimeInfo[]) otherPrimeInfo.clone(); + + this.publicExponent = publicExponent; + this.primeP = primeP; + this.primeQ = primeQ; + this.primeExponentP = primeExponentP; + this.primeExponentQ = primeExponentQ; + this.crtCoefficient = crtCoefficient; + } + + // Class methods + // -------------------------------------------------------------------------- + + // Instance methods + // -------------------------------------------------------------------------- + + /** + * Returns the public exponent. + * + * @return the public exponent. + */ + public BigInteger getPublicExponent() + { + return this.publicExponent; + } + + /** + * Returns the primeP. + * + * @return the primeP. + */ + public BigInteger getPrimeP() + { + return this.primeP; + } + + /** + * Returns the primeQ. + * + * @return the primeQ. + */ + public BigInteger getPrimeQ() + { + return this.primeQ; + } + + /** + * Returns the primeExponentP. + * + * @return the primeExponentP. + */ + public BigInteger getPrimeExponentP() + { + return this.primeExponentP; + } + + /** + * Returns the primeExponentQ. + * + * @return the primeExponentQ. + */ + public BigInteger getPrimeExponentQ() + { + return this.primeExponentQ; + } + + /** + * Returns the crtCoefficient. + * + * @return the crtCoefficient. + */ + public BigInteger getCrtCoefficient() + { + return this.crtCoefficient; + } + + /** + * Returns a copy of the otherPrimeInfo or null if there are + * only two prime factors (p and q). + * + * @return the otherPrimeInfo. + */ + public RSAOtherPrimeInfo[] getOtherPrimeInfo() + { + return this.otherPrimeInfo == null + ? null + : (RSAOtherPrimeInfo[]) this.otherPrimeInfo.clone(); + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/security/spec/RSAOtherPrimeInfo.java gcc-3.4.0/libjava/java/security/spec/RSAOtherPrimeInfo.java *** gcc-3.3.3/libjava/java/security/spec/RSAOtherPrimeInfo.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/security/spec/RSAOtherPrimeInfo.java 2003-04-19 20:54:55.000000000 +0000 *************** *** 0 **** --- 1,133 ---- + /* RSAOtherPrimeInfo.java -- + Copyright (C) 2003, Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package java.security.spec; + + import java.math.BigInteger; + + /** + * This class represents the triplet (prime, exponent, and coefficient) inside + * RSA's OtherPrimeInfo structure, as defined in the PKCS#1 v2.1. The ASN.1 + * syntax of RSA's OtherPrimeInfo is as follows: + * + *
                +  *  OtherPrimeInfo ::= SEQUENCE {
                +  *    prime INTEGER,
                +  *    exponent INTEGER,
                +  *    coefficient INTEGER
                +  *  }
                +  * 
                + * + * @since 1.4 + * @see RSAPrivateCrtKeySpec + * @see java.security.interfaces.RSAMultiPrimePrivateCrtKey + */ + public class RSAOtherPrimeInfo + { + // Constants and fields + // -------------------------------------------------------------------------- + + private BigInteger prime; + private BigInteger primeExponent; + private BigInteger crtCoefficient; + + // Constructor(s) + // -------------------------------------------------------------------------- + + /** + * Creates a new RSAOtherPrimeInfo given the prime, + * primeExponent, and crtCoefficient as defined in PKCS#1. + * + * @param prime the prime factor of n. + * @param primeExponent the exponent. + * @param crtCoefficient the Chinese Remainder Theorem coefficient. + * @throws NullPointerException if any of the parameters, i.e. prime, + * primeExponent, crtCoefficient, is null. + */ + public RSAOtherPrimeInfo(BigInteger prime, BigInteger primeExponent, + BigInteger crtCoefficient) + { + super(); + + if (prime == null) + throw new NullPointerException("prime"); + if (primeExponent == null) + throw new NullPointerException("primeExponent"); + if (crtCoefficient == null) + throw new NullPointerException("crtCoefficient"); + + this.prime = prime; + this.primeExponent = primeExponent; + this.crtCoefficient = crtCoefficient; + } + + // Class methods + // -------------------------------------------------------------------------- + + // Instance methods + // -------------------------------------------------------------------------- + + /** + * Returns the prime. + * + * @return the prime. + */ + public final BigInteger getPrime() + { + return this.prime; + } + + /** + * Returns the prime's exponent. + * + * @return the primeExponent. + */ + public final BigInteger getExponent() + { + return this.primeExponent; + } + + /** + * Returns the prime's crtCoefficient. + * + * @return the crtCoefficient. + */ + public final BigInteger getCrtCoefficient() + { + return this.crtCoefficient; + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/sql/Array.java gcc-3.4.0/libjava/java/sql/Array.java *** gcc-3.3.3/libjava/java/sql/Array.java 2002-06-21 05:39:20.000000000 +0000 --- gcc-3.4.0/libjava/java/sql/Array.java 2003-10-11 18:49:51.000000000 +0000 *************** public interface Array *** 53,59 **** * @param The name of the SQL type of the elements in this array. * @exception SQLException If an error occurs. */ ! public String getBaseTypeName() throws SQLException; /** * Returns the JDBC type identifier of the elements in this --- 53,59 ---- * @param The name of the SQL type of the elements in this array. * @exception SQLException If an error occurs. */ ! String getBaseTypeName() throws SQLException; /** * Returns the JDBC type identifier of the elements in this *************** public interface Array *** 64,70 **** * @exception SQLException If an error occurs. * @see Types */ ! public int getBaseType() throws SQLException; /** * Returns the contents of this array. This object returned --- 64,70 ---- * @exception SQLException If an error occurs. * @see Types */ ! int getBaseType() throws SQLException; /** * Returns the contents of this array. This object returned *************** public interface Array *** 73,79 **** * @return The contents of the array as an array of Java objects. * @exception SQLException If an error occurs. */ ! public Object getArray() throws SQLException; /** * Returns the contents of this array. The specified --- 73,79 ---- * @return The contents of the array as an array of Java objects. * @exception SQLException If an error occurs. */ ! Object getArray() throws SQLException; /** * Returns the contents of this array. The specified *************** public interface Array *** 84,90 **** * @return The contents of the array as an array of Java objects. * @exception SQLException If an error occurs. */ ! public Object getArray(Map map) throws SQLException; /** * Returns a portion of this array starting at index --- 84,90 ---- * @return The contents of the array as an array of Java objects. * @exception SQLException If an error occurs. */ ! Object getArray(Map map) throws SQLException; /** * Returns a portion of this array starting at index *************** public interface Array *** 99,105 **** * @return The requested portion of the array. * @exception SQLException If an error occurs. */ ! public Object getArray(long index, int count) throws SQLException; /** * This method returns a portion of this array starting at index --- 99,105 ---- * @return The requested portion of the array. * @exception SQLException If an error occurs. */ ! Object getArray(long index, int count) throws SQLException; /** * This method returns a portion of this array starting at index *************** public interface Array *** 116,122 **** * @return The requested portion of the array. * @exception SQLException If an error occurs. */ ! public Object getArray(long index, int count, Map map) throws SQLException; /** * Returns the elements in the array as a ResultSet. --- 116,122 ---- * @return The requested portion of the array. * @exception SQLException If an error occurs. */ ! Object getArray(long index, int count, Map map) throws SQLException; /** * Returns the elements in the array as a ResultSet. *************** public interface Array *** 128,134 **** * @exception SQLException If an error occurs. * @see ResultSet */ ! public ResultSet getResultSet() throws SQLException; /** * This method returns the elements in the array as a ResultSet. --- 128,134 ---- * @exception SQLException If an error occurs. * @see ResultSet */ ! ResultSet getResultSet() throws SQLException; /** * This method returns the elements in the array as a ResultSet. *************** public interface Array *** 143,149 **** * @exception SQLException If an error occurs. * @see ResultSet */ ! public ResultSet getResultSet(Map map) throws SQLException; /** * This method returns a portion of the array as a ResultSet. --- 143,149 ---- * @exception SQLException If an error occurs. * @see ResultSet */ ! ResultSet getResultSet(Map map) throws SQLException; /** * This method returns a portion of the array as a ResultSet. *************** public interface Array *** 160,166 **** * @exception SQLException If an error occurs. * @see ResultSet */ ! public ResultSet getResultSet(long index, int count) throws SQLException; /** * This method returns a portion of the array as a ResultSet. --- 160,166 ---- * @exception SQLException If an error occurs. * @see ResultSet */ ! ResultSet getResultSet(long index, int count) throws SQLException; /** * This method returns a portion of the array as a ResultSet. *************** public interface Array *** 180,185 **** * @exception SQLException If an error occurs. * @see ResultSet */ ! public ResultSet getResultSet(long index, int count, Map map) throws SQLException; } --- 180,185 ---- * @exception SQLException If an error occurs. * @see ResultSet */ ! ResultSet getResultSet(long index, int count, Map map) throws SQLException; } diff -Nrc3pad gcc-3.3.3/libjava/java/sql/Blob.java gcc-3.4.0/libjava/java/sql/Blob.java *** gcc-3.3.3/libjava/java/sql/Blob.java 2002-06-21 05:39:21.000000000 +0000 --- gcc-3.4.0/libjava/java/sql/Blob.java 2003-10-11 18:49:51.000000000 +0000 *************** public interface Blob *** 55,61 **** * @return The number of bytes in the BLOB. * @exception SQLException If an error occurs. */ ! public long length() throws SQLException; /** * This method returns up to the requested bytes of this BLOB as a --- 55,61 ---- * @return The number of bytes in the BLOB. * @exception SQLException If an error occurs. */ ! long length() throws SQLException; /** * This method returns up to the requested bytes of this BLOB as a *************** public interface Blob *** 66,72 **** * @return The requested bytes from the BLOB. * @exception SQLException If an error occurs. */ ! public byte[] getBytes(long pos, int length) throws SQLException; /** * This method returns a stream that will read the bytes of the BLOB. --- 66,72 ---- * @return The requested bytes from the BLOB. * @exception SQLException If an error occurs. */ ! byte[] getBytes(long pos, int length) throws SQLException; /** * This method returns a stream that will read the bytes of the BLOB. *************** public interface Blob *** 74,80 **** * @return A stream that will read the bytes of the BLOB. * @exception SQLException If an error occurs. */ ! public InputStream getBinaryStream() throws SQLException; /** * This method returns the index into the BLOB at which the first instance --- 74,80 ---- * @return A stream that will read the bytes of the BLOB. * @exception SQLException If an error occurs. */ ! InputStream getBinaryStream() throws SQLException; /** * This method returns the index into the BLOB at which the first instance *************** public interface Blob *** 87,93 **** * pattern is not found. * @exception SQLException If an error occurs. */ ! public long position(byte[] pattern, long start) throws SQLException; /** * This method returns the index into the BLOB at which the first instance --- 87,93 ---- * pattern is not found. * @exception SQLException If an error occurs. */ ! long position(byte[] pattern, long start) throws SQLException; /** * This method returns the index into the BLOB at which the first instance *************** public interface Blob *** 102,131 **** * pattern is not found. * @exception SQLException If an error occurs. */ ! public long position(Blob pattern, long start) throws SQLException; /** * @exception SQLException If an error occurs. * @since 1.4 */ ! public int setBytes(long pos, byte[] bytes) throws SQLException; /** * @exception SQLException If an error occurs. * @since 1.4 */ ! public int setBytes(long pos, byte[] bytes, int offset, int len) throws SQLException; /** * @exception SQLException If an error occurs. * @since 1.4 */ ! public OutputStream setBinaryStream(long pos) throws SQLException; /** * @exception SQLException If an error occurs. * @since 1.4 */ ! public void truncate(long len) throws SQLException; } --- 102,131 ---- * pattern is not found. * @exception SQLException If an error occurs. */ ! long position(Blob pattern, long start) throws SQLException; /** * @exception SQLException If an error occurs. * @since 1.4 */ ! int setBytes(long pos, byte[] bytes) throws SQLException; /** * @exception SQLException If an error occurs. * @since 1.4 */ ! int setBytes(long pos, byte[] bytes, int offset, int len) throws SQLException; /** * @exception SQLException If an error occurs. * @since 1.4 */ ! OutputStream setBinaryStream(long pos) throws SQLException; /** * @exception SQLException If an error occurs. * @since 1.4 */ ! void truncate(long len) throws SQLException; } diff -Nrc3pad gcc-3.3.3/libjava/java/sql/CallableStatement.java gcc-3.4.0/libjava/java/sql/CallableStatement.java *** gcc-3.3.3/libjava/java/sql/CallableStatement.java 2002-06-21 05:39:21.000000000 +0000 --- gcc-3.4.0/libjava/java/sql/CallableStatement.java 2003-10-11 18:49:51.000000000 +0000 *************** public interface CallableStatement exten *** 59,65 **** * @param type The SQL type value from Types. * @exception SQLException If an error occurs. */ ! public void registerOutParameter(int parameterIndex, int sqlType) throws SQLException; /** --- 59,65 ---- * @param type The SQL type value from Types. * @exception SQLException If an error occurs. */ ! void registerOutParameter(int parameterIndex, int sqlType) throws SQLException; /** *************** public interface CallableStatement exten *** 71,77 **** * @param scale The scale of the value that will be returned. * @exception SQLException If an error occurs. */ ! public void registerOutParameter(int parameterIndex, int sqlType, int scale) throws SQLException; /** --- 71,77 ---- * @param scale The scale of the value that will be returned. * @exception SQLException If an error occurs. */ ! void registerOutParameter(int parameterIndex, int sqlType, int scale) throws SQLException; /** *************** public interface CallableStatement exten *** 82,88 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean wasNull() throws SQLException; /** * This method returns the value of the specified parameter as a Java --- 82,88 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean wasNull() throws SQLException; /** * This method returns the value of the specified parameter as a Java *************** public interface CallableStatement exten *** 92,98 **** * @return The parameter value as a String. * @exception SQLException If an error occurs. */ ! public String getString(int parameterIndex) throws SQLException; /** * This method returns the value of the specified parameter as a Java --- 92,98 ---- * @return The parameter value as a String. * @exception SQLException If an error occurs. */ ! String getString(int parameterIndex) throws SQLException; /** * This method returns the value of the specified parameter as a Java *************** public interface CallableStatement exten *** 102,108 **** * @return The parameter value as a boolean. * @exception SQLException If an error occurs. */ ! public boolean getBoolean(int parameterIndex) throws SQLException; /** * This method returns the value of the specified parameter as a Java --- 102,108 ---- * @return The parameter value as a boolean. * @exception SQLException If an error occurs. */ ! boolean getBoolean(int parameterIndex) throws SQLException; /** * This method returns the value of the specified parameter as a Java *************** public interface CallableStatement exten *** 112,118 **** * @return The parameter value as a byte. * @exception SQLException If an error occurs. */ ! public byte getByte(int parameterIndex) throws SQLException; /** * This method returns the value of the specified parameter as a Java --- 112,118 ---- * @return The parameter value as a byte. * @exception SQLException If an error occurs. */ ! byte getByte(int parameterIndex) throws SQLException; /** * This method returns the value of the specified parameter as a Java *************** public interface CallableStatement exten *** 122,128 **** * @return The parameter value as a short. * @exception SQLException If an error occurs. */ ! public short getShort(int parameterIndex) throws SQLException; /** * This method returns the value of the specified parameter as a Java --- 122,128 ---- * @return The parameter value as a short. * @exception SQLException If an error occurs. */ ! short getShort(int parameterIndex) throws SQLException; /** * This method returns the value of the specified parameter as a Java *************** public interface CallableStatement exten *** 132,138 **** * @return The parameter value as a int. * @exception SQLException If an error occurs. */ ! public int getInt(int parameterIndex) throws SQLException; /** * This method returns the value of the specified parameter as a Java --- 132,138 ---- * @return The parameter value as a int. * @exception SQLException If an error occurs. */ ! int getInt(int parameterIndex) throws SQLException; /** * This method returns the value of the specified parameter as a Java *************** public interface CallableStatement exten *** 142,148 **** * @return The parameter value as a long. * @exception SQLException If an error occurs. */ ! public long getLong(int parameterIndex) throws SQLException; /** * This method returns the value of the specified parameter as a Java --- 142,148 ---- * @return The parameter value as a long. * @exception SQLException If an error occurs. */ ! long getLong(int parameterIndex) throws SQLException; /** * This method returns the value of the specified parameter as a Java *************** public interface CallableStatement exten *** 152,158 **** * @return The parameter value as a float. * @exception SQLException If an error occurs. */ ! public float getFloat(int parameterIndex) throws SQLException; /** * This method returns the value of the specified parameter as a Java --- 152,158 ---- * @return The parameter value as a float. * @exception SQLException If an error occurs. */ ! float getFloat(int parameterIndex) throws SQLException; /** * This method returns the value of the specified parameter as a Java *************** public interface CallableStatement exten *** 162,168 **** * @return The parameter value as a double. * @exception SQLException If an error occurs. */ ! public double getDouble(int parameterIndex) throws SQLException; /** * This method returns the value of the specified parameter as a Java --- 162,168 ---- * @return The parameter value as a double. * @exception SQLException If an error occurs. */ ! double getDouble(int parameterIndex) throws SQLException; /** * This method returns the value of the specified parameter as a Java *************** public interface CallableStatement exten *** 175,181 **** * @deprecated Use getBigDecimal(int parameterIndex) * or getBigDecimal(String parameterName) instead. */ ! public BigDecimal getBigDecimal(int parameterIndex, int scale) throws SQLException; /** --- 175,181 ---- * @deprecated Use getBigDecimal(int parameterIndex) * or getBigDecimal(String parameterName) instead. */ ! BigDecimal getBigDecimal(int parameterIndex, int scale) throws SQLException; /** *************** public interface CallableStatement exten *** 186,192 **** * @return The parameter value as a byte array * @exception SQLException If an error occurs. */ ! public byte[] getBytes(int parameterIndex) throws SQLException; /** * This method returns the value of the specified parameter as a Java --- 186,192 ---- * @return The parameter value as a byte array * @exception SQLException If an error occurs. */ ! byte[] getBytes(int parameterIndex) throws SQLException; /** * This method returns the value of the specified parameter as a Java *************** public interface CallableStatement exten *** 196,202 **** * @return The parameter value as a java.sql.Date. * @exception SQLException If an error occurs. */ ! public Date getDate(int parameterIndex) throws SQLException; /** * This method returns the value of the specified parameter as a Java --- 196,202 ---- * @return The parameter value as a java.sql.Date. * @exception SQLException If an error occurs. */ ! Date getDate(int parameterIndex) throws SQLException; /** * This method returns the value of the specified parameter as a Java *************** public interface CallableStatement exten *** 206,212 **** * @return The parameter value as a java.sql.Time. * @exception SQLException If an error occurs. */ ! public Time getTime(int parameterIndex) throws SQLException; /** * This method returns the value of the specified parameter as a Java --- 206,212 ---- * @return The parameter value as a java.sql.Time. * @exception SQLException If an error occurs. */ ! Time getTime(int parameterIndex) throws SQLException; /** * This method returns the value of the specified parameter as a Java *************** public interface CallableStatement exten *** 216,222 **** * @return The parameter value as a java.sql.Timestamp. * @exception SQLException If an error occurs. */ ! public Timestamp getTimestamp(int parameterIndex) throws SQLException; /** * This method returns the value of the specified parameter as a Java --- 216,222 ---- * @return The parameter value as a java.sql.Timestamp. * @exception SQLException If an error occurs. */ ! Timestamp getTimestamp(int parameterIndex) throws SQLException; /** * This method returns the value of the specified parameter as a Java *************** public interface CallableStatement exten *** 227,233 **** * @exception SQLException If an error occurs. * @since 1.2 */ ! public Object getObject(int parameterIndex) throws SQLException; /** * This method returns the value of the specified parameter as a Java --- 227,233 ---- * @exception SQLException If an error occurs. * @since 1.2 */ ! Object getObject(int parameterIndex) throws SQLException; /** * This method returns the value of the specified parameter as a Java *************** public interface CallableStatement exten *** 238,244 **** * @exception SQLException If an error occurs. * @since 1.2 */ ! public BigDecimal getBigDecimal(int parameterIndex) throws SQLException; /** * This method returns the value of the specified parameter as a Java --- 238,244 ---- * @exception SQLException If an error occurs. * @since 1.2 */ ! BigDecimal getBigDecimal(int parameterIndex) throws SQLException; /** * This method returns the value of the specified parameter as a Java *************** public interface CallableStatement exten *** 250,256 **** * @exception SQLException If an error occurs. * @since 1.2 */ ! public Object getObject(int index, Map map) throws SQLException; /** * This method returns the value of the specified parameter as a Java --- 250,256 ---- * @exception SQLException If an error occurs. * @since 1.2 */ ! Object getObject(int index, Map map) throws SQLException; /** * This method returns the value of the specified parameter as a Java *************** public interface CallableStatement exten *** 261,267 **** * @exception SQLException If an error occurs. * @since 1.2 */ ! public Ref getRef(int index) throws SQLException; /** * This method returns the value of the specified parameter as a Java --- 261,267 ---- * @exception SQLException If an error occurs. * @since 1.2 */ ! Ref getRef(int index) throws SQLException; /** * This method returns the value of the specified parameter as a Java *************** public interface CallableStatement exten *** 272,278 **** * @exception SQLException If an error occurs. * @since 1.2 */ ! public Blob getBlob(int index) throws SQLException; /** * This method returns the value of the specified parameter as a Java --- 272,278 ---- * @exception SQLException If an error occurs. * @since 1.2 */ ! Blob getBlob(int index) throws SQLException; /** * This method returns the value of the specified parameter as a Java *************** public interface CallableStatement exten *** 283,289 **** * @exception SQLException If an error occurs. * @since 1.2 */ ! public Clob getClob(int index) throws SQLException; /** * This method returns the value of the specified parameter as a Java --- 283,289 ---- * @exception SQLException If an error occurs. * @since 1.2 */ ! Clob getClob(int index) throws SQLException; /** * This method returns the value of the specified parameter as a Java *************** public interface CallableStatement exten *** 294,300 **** * @exception SQLException If an error occurs. * @since 1.2 */ ! public Array getArray(int index) throws SQLException; /** * This method returns the value of the specified parameter as a Java --- 294,300 ---- * @exception SQLException If an error occurs. * @since 1.2 */ ! Array getArray(int index) throws SQLException; /** * This method returns the value of the specified parameter as a Java *************** public interface CallableStatement exten *** 306,312 **** * @exception SQLException If an error occurs. * @since 1.2 */ ! public Date getDate(int parameterIndex, Calendar cal) throws SQLException; /** * This method returns the value of the specified parameter as a Java --- 306,312 ---- * @exception SQLException If an error occurs. * @since 1.2 */ ! Date getDate(int parameterIndex, Calendar cal) throws SQLException; /** * This method returns the value of the specified parameter as a Java *************** public interface CallableStatement exten *** 318,324 **** * @exception SQLException If an error occurs. * @since 1.2 */ ! public Time getTime(int parameterIndex, Calendar cal) throws SQLException; /** * This method returns the value of the specified parameter as a Java --- 318,324 ---- * @exception SQLException If an error occurs. * @since 1.2 */ ! Time getTime(int parameterIndex, Calendar cal) throws SQLException; /** * This method returns the value of the specified parameter as a Java *************** public interface CallableStatement exten *** 329,335 **** * @exception SQLException If an error occurs. * @since 1.2 */ ! public Timestamp getTimestamp(int parameterIndex, Calendar cal) throws SQLException; /** --- 329,335 ---- * @exception SQLException If an error occurs. * @since 1.2 */ ! Timestamp getTimestamp(int parameterIndex, Calendar cal) throws SQLException; /** *************** public interface CallableStatement exten *** 342,348 **** * @exception SQLException If an error occurs. * @since 1.2 */ ! public void registerOutParameter(int paramIndex, int sqlType, String typeName) throws SQLException; --- 342,348 ---- * @exception SQLException If an error occurs. * @since 1.2 */ ! void registerOutParameter(int paramIndex, int sqlType, String typeName) throws SQLException; *************** public interface CallableStatement exten *** 355,361 **** * @exception SQLException If an error occurs. * @since 1.4 */ ! public void registerOutParameter(String parameterName, int sqlType) throws SQLException; /** --- 355,361 ---- * @exception SQLException If an error occurs. * @since 1.4 */ ! void registerOutParameter(String parameterName, int sqlType) throws SQLException; /** *************** public interface CallableStatement exten *** 369,375 **** * @exception SQLException If an error occurs. * @since 1.4 */ ! public void registerOutParameter(String parameterName, int sqlType, int scale) throws SQLException; --- 369,375 ---- * @exception SQLException If an error occurs. * @since 1.4 */ ! void registerOutParameter(String parameterName, int sqlType, int scale) throws SQLException; *************** public interface CallableStatement exten *** 386,651 **** * @exception SQLException If an error occurs. * @since 1.4 */ ! public void registerOutParameter(String parameterName, int sqlType, String typeName) throws SQLException; /** * @since 1.4 */ ! public URL getURL(int parameterIndex) throws SQLException; /** * @since 1.4 */ ! public void setURL(String parameterName, URL val) throws SQLException; /** * @since 1.4 */ ! public void setNull(String parameterName, int sqlType) throws SQLException; /** * @since 1.4 */ ! public void setBoolean(String parameterName, boolean x) throws SQLException; /** * @since 1.4 */ ! public void setByte(String parameterName, byte x) throws SQLException; /** * @since 1.4 */ ! public void setShort(String parameterName, short x) throws SQLException; /** * @since 1.4 */ ! public void setInt(String parameterName, int x) throws SQLException; /** * @since 1.4 */ ! public void setLong(String parameterName, long x) throws SQLException; /** * @since 1.4 */ ! public void setFloat(String parameterName, float x) throws SQLException; /** * @since 1.4 */ ! public void setDouble(String parameterName, double x) throws SQLException; /** * @since 1.4 */ ! public void setBigDecimal(String parameterName, BigDecimal x) throws SQLException; /** * @since 1.4 */ ! public void setString(String parameterName, String x) throws SQLException; /** * @since 1.4 */ ! public void setBytes(String parameterName, byte[] x) throws SQLException; /** * @since 1.4 */ ! public void setDate(String parameterName, Date x) throws SQLException; /** * @since 1.4 */ ! public void setTime(String parameterName, Time x) throws SQLException; /** * @since 1.4 */ ! public void setTimestamp(String parameterName, Timestamp x) throws SQLException; /** * @since 1.4 */ ! public void setAsciiStream(String parameterName, InputStream x, int length) throws SQLException; /** * @since 1.4 */ ! public void setBinaryStream(String parameterName, InputStream x, int length) throws SQLException; /** * @since 1.4 */ ! public void setObject(String parameterName, Object x, int targetSqlType, int scale) throws SQLException; /** * @since 1.4 */ ! public void setObject(String parameterName, Object x, int targetSqlType) throws SQLException; /** * @since 1.4 */ ! public void setObject(String parameterName, Object x) throws SQLException; /** * @since 1.4 */ ! public void setCharacterStream(String parameterName, Reader reader, int length) throws SQLException; /** * @since 1.4 */ ! public void setDate(String parameterName, Date x, Calendar cal) throws SQLException; /** * @since 1.4 */ ! public void setTime(String parameterName, Time x, Calendar cal) throws SQLException; /** * @since 1.4 */ ! public void setTimestamp(String parameterName, Timestamp x, Calendar cal) throws SQLException; /** * @since 1.4 */ ! public void setNull(String parameterName, int sqlType, String typeName) throws SQLException; /** * @since 1.4 */ ! public String getString(String parameterName) throws SQLException; /** * @since 1.4 */ ! public boolean getBoolean(String parameterName) throws SQLException; /** * @since 1.4 */ ! public byte getByte(String parameterName) throws SQLException; /** * @since 1.4 */ ! public short getShort(String parameterName) throws SQLException; /** * @since 1.4 */ ! public int getInt(String parameterName) throws SQLException; /** * @since 1.4 */ ! public long getLong(String parameterName) throws SQLException; /** * @since 1.4 */ ! public float getFloat(String parameterName) throws SQLException; /** * @since 1.4 */ ! public double getDouble(String parameterName) throws SQLException; /** * @since 1.4 */ ! public byte[] getBytes(String parameterName) throws SQLException; /** * @since 1.4 */ ! public Date getDate(String parameterName) throws SQLException; /** * @since 1.4 */ ! public Time getTime(String parameterName) throws SQLException; /** * @since 1.4 */ ! public Timestamp getTimestamp(String parameterName) throws SQLException; /** * @since 1.4 */ ! public Object getObject(String parameterName) throws SQLException; /** * @since 1.4 */ ! public BigDecimal getBigDecimal(String parameterName) throws SQLException; /** * @since 1.4 */ ! public Object getObject(String parameterName, Map map) throws SQLException; /** * @since 1.4 */ ! public Ref getRef(String parameterName) throws SQLException; /** * @since 1.4 */ ! public Blob getBlob(String parameterName) throws SQLException; /** * @since 1.4 */ ! public Clob getClob(String parameterName) throws SQLException; /** * @since 1.4 */ ! public Array getArray(String parameterName) throws SQLException; /** * @since 1.4 */ ! public Date getDate(String parameterName, Calendar cal) throws SQLException; /** * @since 1.4 */ ! public Time getTime(String parameterName, Calendar cal) throws SQLException; /** * @since 1.4 */ ! public Timestamp getTimestamp(String parameterName, Calendar cal) throws SQLException; /** * @since 1.4 */ ! public URL getURL(String parameterName) throws SQLException; } --- 386,651 ---- * @exception SQLException If an error occurs. * @since 1.4 */ ! void registerOutParameter(String parameterName, int sqlType, String typeName) throws SQLException; /** * @since 1.4 */ ! URL getURL(int parameterIndex) throws SQLException; /** * @since 1.4 */ ! void setURL(String parameterName, URL val) throws SQLException; /** * @since 1.4 */ ! void setNull(String parameterName, int sqlType) throws SQLException; /** * @since 1.4 */ ! void setBoolean(String parameterName, boolean x) throws SQLException; /** * @since 1.4 */ ! void setByte(String parameterName, byte x) throws SQLException; /** * @since 1.4 */ ! void setShort(String parameterName, short x) throws SQLException; /** * @since 1.4 */ ! void setInt(String parameterName, int x) throws SQLException; /** * @since 1.4 */ ! void setLong(String parameterName, long x) throws SQLException; /** * @since 1.4 */ ! void setFloat(String parameterName, float x) throws SQLException; /** * @since 1.4 */ ! void setDouble(String parameterName, double x) throws SQLException; /** * @since 1.4 */ ! void setBigDecimal(String parameterName, BigDecimal x) throws SQLException; /** * @since 1.4 */ ! void setString(String parameterName, String x) throws SQLException; /** * @since 1.4 */ ! void setBytes(String parameterName, byte[] x) throws SQLException; /** * @since 1.4 */ ! void setDate(String parameterName, Date x) throws SQLException; /** * @since 1.4 */ ! void setTime(String parameterName, Time x) throws SQLException; /** * @since 1.4 */ ! void setTimestamp(String parameterName, Timestamp x) throws SQLException; /** * @since 1.4 */ ! void setAsciiStream(String parameterName, InputStream x, int length) throws SQLException; /** * @since 1.4 */ ! void setBinaryStream(String parameterName, InputStream x, int length) throws SQLException; /** * @since 1.4 */ ! void setObject(String parameterName, Object x, int targetSqlType, int scale) throws SQLException; /** * @since 1.4 */ ! void setObject(String parameterName, Object x, int targetSqlType) throws SQLException; /** * @since 1.4 */ ! void setObject(String parameterName, Object x) throws SQLException; /** * @since 1.4 */ ! void setCharacterStream(String parameterName, Reader reader, int length) throws SQLException; /** * @since 1.4 */ ! void setDate(String parameterName, Date x, Calendar cal) throws SQLException; /** * @since 1.4 */ ! void setTime(String parameterName, Time x, Calendar cal) throws SQLException; /** * @since 1.4 */ ! void setTimestamp(String parameterName, Timestamp x, Calendar cal) throws SQLException; /** * @since 1.4 */ ! void setNull(String parameterName, int sqlType, String typeName) throws SQLException; /** * @since 1.4 */ ! String getString(String parameterName) throws SQLException; /** * @since 1.4 */ ! boolean getBoolean(String parameterName) throws SQLException; /** * @since 1.4 */ ! byte getByte(String parameterName) throws SQLException; /** * @since 1.4 */ ! short getShort(String parameterName) throws SQLException; /** * @since 1.4 */ ! int getInt(String parameterName) throws SQLException; /** * @since 1.4 */ ! long getLong(String parameterName) throws SQLException; /** * @since 1.4 */ ! float getFloat(String parameterName) throws SQLException; /** * @since 1.4 */ ! double getDouble(String parameterName) throws SQLException; /** * @since 1.4 */ ! byte[] getBytes(String parameterName) throws SQLException; /** * @since 1.4 */ ! Date getDate(String parameterName) throws SQLException; /** * @since 1.4 */ ! Time getTime(String parameterName) throws SQLException; /** * @since 1.4 */ ! Timestamp getTimestamp(String parameterName) throws SQLException; /** * @since 1.4 */ ! Object getObject(String parameterName) throws SQLException; /** * @since 1.4 */ ! BigDecimal getBigDecimal(String parameterName) throws SQLException; /** * @since 1.4 */ ! Object getObject(String parameterName, Map map) throws SQLException; /** * @since 1.4 */ ! Ref getRef(String parameterName) throws SQLException; /** * @since 1.4 */ ! Blob getBlob(String parameterName) throws SQLException; /** * @since 1.4 */ ! Clob getClob(String parameterName) throws SQLException; /** * @since 1.4 */ ! Array getArray(String parameterName) throws SQLException; /** * @since 1.4 */ ! Date getDate(String parameterName, Calendar cal) throws SQLException; /** * @since 1.4 */ ! Time getTime(String parameterName, Calendar cal) throws SQLException; /** * @since 1.4 */ ! Timestamp getTimestamp(String parameterName, Calendar cal) throws SQLException; /** * @since 1.4 */ ! URL getURL(String parameterName) throws SQLException; } diff -Nrc3pad gcc-3.3.3/libjava/java/sql/Clob.java gcc-3.4.0/libjava/java/sql/Clob.java *** gcc-3.3.3/libjava/java/sql/Clob.java 2002-06-21 05:39:21.000000000 +0000 --- gcc-3.4.0/libjava/java/sql/Clob.java 2003-10-11 18:49:51.000000000 +0000 *************** public interface Clob *** 57,63 **** * @exception SQLException If an error occurs. * @since 1.2 */ ! public long length() throws SQLException; /** * This method returns the specified portion of the CLOB as a --- 57,63 ---- * @exception SQLException If an error occurs. * @since 1.2 */ ! long length() throws SQLException; /** * This method returns the specified portion of the CLOB as a *************** public interface Clob *** 70,76 **** * @exception SQLException If an error occurs. * @since 1.2 */ ! public String getSubString(long pos, int length) throws SQLException; /** * This method returns a character stream that reads the contents of the --- 70,76 ---- * @exception SQLException If an error occurs. * @since 1.2 */ ! String getSubString(long pos, int length) throws SQLException; /** * This method returns a character stream that reads the contents of the *************** public interface Clob *** 80,86 **** * @exception SQLException If an error occurs. * @since 1.2 */ ! public Reader getCharacterStream() throws SQLException; /** * This method returns a byte stream that reads the contents of the --- 80,86 ---- * @exception SQLException If an error occurs. * @since 1.2 */ ! Reader getCharacterStream() throws SQLException; /** * This method returns a byte stream that reads the contents of the *************** public interface Clob *** 90,96 **** * @exception SQLException If an error occurs. * @since 1.2 */ ! public InputStream getAsciiStream() throws SQLException; /** * This method returns the index into the CLOB of the first occurrence of --- 90,96 ---- * @exception SQLException If an error occurs. * @since 1.2 */ ! InputStream getAsciiStream() throws SQLException; /** * This method returns the index into the CLOB of the first occurrence of *************** public interface Clob *** 106,112 **** * @exception SQLException If an error occurs. * @since 1.2 */ ! public long position(String searchstr, long start) throws SQLException; /** * This method returns the index into the CLOB of the first occurrence of --- 106,112 ---- * @exception SQLException If an error occurs. * @since 1.2 */ ! long position(String searchstr, long start) throws SQLException; /** * This method returns the index into the CLOB of the first occurrence of *************** public interface Clob *** 122,152 **** * @exception SQLException If an error occurs. * @since 1.2 */ ! public long position(Clob searchstr, long start) throws SQLException; /** * @since 1.4 */ ! public int setString(long pos, String str) throws SQLException; /** * @since 1.4 */ ! public int setString(long pos, String str, int offset, int len) throws SQLException; /** * @since 1.4 */ ! public OutputStream setAsciiStream(long pos) throws SQLException; /** * @since 1.4 */ ! public Writer setCharacterStream(long pos) throws SQLException; /** * @since 1.4 */ ! public void truncate(long len) throws SQLException; } --- 122,152 ---- * @exception SQLException If an error occurs. * @since 1.2 */ ! long position(Clob searchstr, long start) throws SQLException; /** * @since 1.4 */ ! int setString(long pos, String str) throws SQLException; /** * @since 1.4 */ ! int setString(long pos, String str, int offset, int len) throws SQLException; /** * @since 1.4 */ ! OutputStream setAsciiStream(long pos) throws SQLException; /** * @since 1.4 */ ! Writer setCharacterStream(long pos) throws SQLException; /** * @since 1.4 */ ! void truncate(long len) throws SQLException; } diff -Nrc3pad gcc-3.3.3/libjava/java/sql/Connection.java gcc-3.4.0/libjava/java/sql/Connection.java *** gcc-3.3.3/libjava/java/sql/Connection.java 2002-06-21 05:39:21.000000000 +0000 --- gcc-3.4.0/libjava/java/sql/Connection.java 2003-10-11 18:49:51.000000000 +0000 *************** public interface Connection *** 51,64 **** * This transaction isolation level indicates that transactions are not * supported. */ ! public static final int TRANSACTION_NONE = 0; /** * This transaction isolation level indicates that one transaction can * read modifications by other transactions before the other transactions * have committed their changes. This could result in invalid reads. */ ! public static final int TRANSACTION_READ_UNCOMMITTED = 1; /** * This transaction isolation leve indicates that only committed data from --- 51,64 ---- * This transaction isolation level indicates that transactions are not * supported. */ ! int TRANSACTION_NONE = 0; /** * This transaction isolation level indicates that one transaction can * read modifications by other transactions before the other transactions * have committed their changes. This could result in invalid reads. */ ! int TRANSACTION_READ_UNCOMMITTED = 1; /** * This transaction isolation leve indicates that only committed data from *************** public interface Connection *** 66,72 **** * another transaction commits a change to that row, the first transaction * would retrieve the changed row on subsequent reads of the same row. */ ! public static final int TRANSACTION_READ_COMMITTED = 2; /** * This transaction isolation level indicates that only committed data from --- 66,72 ---- * another transaction commits a change to that row, the first transaction * would retrieve the changed row on subsequent reads of the same row. */ ! int TRANSACTION_READ_COMMITTED = 2; /** * This transaction isolation level indicates that only committed data from *************** public interface Connection *** 74,80 **** * a row will not be different on a subsequent read even if another * transaction commits a change. */ ! public static final int TRANSACTION_REPEATABLE_READ = 4; /** * This transaction isolation level indicates that only committed data from --- 74,80 ---- * a row will not be different on a subsequent read even if another * transaction commits a change. */ ! int TRANSACTION_REPEATABLE_READ = 4; /** * This transaction isolation level indicates that only committed data from *************** public interface Connection *** 84,90 **** * transactions will not affect the result set returned during subsequent * executions of the same WHERE clause in this transaction. */ ! public static final int TRANSACTION_SERIALIZABLE = 8; /** * This method creates a new SQL statement. The default result set type --- 84,90 ---- * transactions will not affect the result set returned during subsequent * executions of the same WHERE clause in this transaction. */ ! int TRANSACTION_SERIALIZABLE = 8; /** * This method creates a new SQL statement. The default result set type *************** public interface Connection *** 94,100 **** * @exception SQLException If an error occurs. * @see Statement */ ! public Statement createStatement() throws SQLException; /** * This method creates a new PreparedStatement for the specified --- 94,100 ---- * @exception SQLException If an error occurs. * @see Statement */ ! Statement createStatement() throws SQLException; /** * This method creates a new PreparedStatement for the specified *************** public interface Connection *** 107,113 **** * @exception SQLException If an error occurs. * @see PreparedStatement */ ! public PreparedStatement prepareStatement(String sql) throws SQLException; /** * This method creates a new CallableStatement for the --- 107,113 ---- * @exception SQLException If an error occurs. * @see PreparedStatement */ ! PreparedStatement prepareStatement(String sql) throws SQLException; /** * This method creates a new CallableStatement for the *************** public interface Connection *** 121,127 **** * @exception SQLException If an error occurs. * @see CallableStatement */ ! public CallableStatement prepareCall(String sql) throws SQLException; /** * This method converts the specified generic SQL statement into the --- 121,127 ---- * @exception SQLException If an error occurs. * @see CallableStatement */ ! CallableStatement prepareCall(String sql) throws SQLException; /** * This method converts the specified generic SQL statement into the *************** public interface Connection *** 131,137 **** * @return The native SQL statement. * @exception SQLException If an error occurs. */ ! public String nativeSQL(String sql) throws SQLException; /** * This method turns auto commit mode on or off. In auto commit mode, --- 131,137 ---- * @return The native SQL statement. * @exception SQLException If an error occurs. */ ! String nativeSQL(String sql) throws SQLException; /** * This method turns auto commit mode on or off. In auto commit mode, *************** public interface Connection *** 144,150 **** * @see commit * @see rollback */ ! public void setAutoCommit(boolean autoCommit) throws SQLException; /** * This method tests whether or not auto commit mode is currently enabled. --- 144,150 ---- * @see commit * @see rollback */ ! void setAutoCommit(boolean autoCommit) throws SQLException; /** * This method tests whether or not auto commit mode is currently enabled. *************** public interface Connection *** 159,165 **** * @see commit * @see rollback */ ! public boolean getAutoCommit() throws SQLException; /** * This method commits any SQL statements executed on this connection since --- 159,165 ---- * @see commit * @see rollback */ ! boolean getAutoCommit() throws SQLException; /** * This method commits any SQL statements executed on this connection since *************** public interface Connection *** 167,173 **** * * @exception SQLException If an error occurs. */ ! public void commit() throws SQLException; /** * This method rolls back any SQL statements executed on this connection --- 167,173 ---- * * @exception SQLException If an error occurs. */ ! void commit() throws SQLException; /** * This method rolls back any SQL statements executed on this connection *************** public interface Connection *** 175,188 **** * * @exception SQLException If an error occurs. */ ! public void rollback() throws SQLException; /** * This method immediately closes this database connection. * * @exception SQLException If an error occurs. */ ! public void close() throws SQLException; /** * This method tests whether or not this connection has been closed. --- 175,188 ---- * * @exception SQLException If an error occurs. */ ! void rollback() throws SQLException; /** * This method immediately closes this database connection. * * @exception SQLException If an error occurs. */ ! void close() throws SQLException; /** * This method tests whether or not this connection has been closed. *************** public interface Connection *** 191,197 **** * otherwise. * @exception SQLException If an error occurs. */ ! public boolean isClosed() throws SQLException; /** * This method returns the meta data for this database connection. --- 191,197 ---- * otherwise. * @exception SQLException If an error occurs. */ ! boolean isClosed() throws SQLException; /** * This method returns the meta data for this database connection. *************** public interface Connection *** 200,206 **** * @exception SQLException If an error occurs. * @see DatabaseMetaData */ ! public DatabaseMetaData getMetaData() throws SQLException; /** * This method turns read only mode on or off. It may not be called while --- 200,206 ---- * @exception SQLException If an error occurs. * @see DatabaseMetaData */ ! DatabaseMetaData getMetaData() throws SQLException; /** * This method turns read only mode on or off. It may not be called while *************** public interface Connection *** 210,216 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public void setReadOnly(boolean readOnly) throws SQLException; /** * This method tests whether or not this connection is in read only mode. --- 210,216 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! void setReadOnly(boolean readOnly) throws SQLException; /** * This method tests whether or not this connection is in read only mode. *************** public interface Connection *** 219,225 **** * otherwise. * @exception SQLException If an error occurs. */ ! public boolean isReadOnly() throws SQLException; /** * This method sets the name of the catalog in use by this connection. --- 219,225 ---- * otherwise. * @exception SQLException If an error occurs. */ ! boolean isReadOnly() throws SQLException; /** * This method sets the name of the catalog in use by this connection. *************** public interface Connection *** 229,235 **** * @param catalog The name of the catalog to use for this connection. * @exception SQLException If an error occurs. */ ! public void setCatalog(String catalog) throws SQLException; /** * This method returns the name of the catalog in use by this connection, --- 229,235 ---- * @param catalog The name of the catalog to use for this connection. * @exception SQLException If an error occurs. */ ! void setCatalog(String catalog) throws SQLException; /** * This method returns the name of the catalog in use by this connection, *************** public interface Connection *** 239,245 **** * exist or catalogs are not supported by this database. * @exception SQLException If an error occurs. */ ! public String getCatalog() throws SQLException; /** * This method sets the current transaction isolation mode. This must --- 239,245 ---- * exist or catalogs are not supported by this database. * @exception SQLException If an error occurs. */ ! String getCatalog() throws SQLException; /** * This method sets the current transaction isolation mode. This must *************** public interface Connection *** 248,254 **** * @param level The transaction isolation level. * @exception SQLException If an error occurs. */ ! public void setTransactionIsolation(int level) throws SQLException; /** * This method returns the current transaction isolation mode. This will --- 248,254 ---- * @param level The transaction isolation level. * @exception SQLException If an error occurs. */ ! void setTransactionIsolation(int level) throws SQLException; /** * This method returns the current transaction isolation mode. This will *************** public interface Connection *** 257,263 **** * @return The transaction isolation level. * @exception SQLException If an error occurs. */ ! public int getTransactionIsolation() throws SQLException; /** * This method returns the first warning that occurred on this connection, --- 257,263 ---- * @return The transaction isolation level. * @exception SQLException If an error occurs. */ ! int getTransactionIsolation() throws SQLException; /** * This method returns the first warning that occurred on this connection, *************** public interface Connection *** 268,281 **** * null if there have been no warnings. * @exception SQLException If an error occurs. */ ! public SQLWarning getWarnings() throws SQLException; /** * This method clears all warnings that have occurred on this connection. * * @exception SQLException If an error occurs. */ ! public void clearWarnings() throws SQLException; /** * This method creates a new SQL statement with the specified type and --- 268,281 ---- * null if there have been no warnings. * @exception SQLException If an error occurs. */ ! SQLWarning getWarnings() throws SQLException; /** * This method clears all warnings that have occurred on this connection. * * @exception SQLException If an error occurs. */ ! void clearWarnings() throws SQLException; /** * This method creates a new SQL statement with the specified type and *************** public interface Connection *** 290,296 **** * @see Statement * @see ResultSet */ ! public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException; /** --- 290,296 ---- * @see Statement * @see ResultSet */ ! Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException; /** *************** public interface Connection *** 310,316 **** * @see PreparedStatement * @see ResultSet */ ! public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException; /** --- 310,316 ---- * @see PreparedStatement * @see ResultSet */ ! PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException; /** *************** public interface Connection *** 330,336 **** * @see CallableStatement * @see ResultSet */ ! public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException; /** --- 330,336 ---- * @see CallableStatement * @see ResultSet */ ! CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException; /** *************** public interface Connection *** 341,347 **** * @return The SQL type to Java class mapping. * @exception SQLException If an error occurs. */ ! public Map getTypeMap() throws SQLException; /** * This method sets the mapping table for SQL types to Java classes. --- 341,347 ---- * @return The SQL type to Java class mapping. * @exception SQLException If an error occurs. */ ! Map getTypeMap() throws SQLException; /** * This method sets the mapping table for SQL types to Java classes. *************** public interface Connection *** 350,420 **** * @param map The new SQL mapping table. * @exception SQLException If an error occurs. */ ! public void setTypeMap(Map map) throws SQLException; /** * @since 1.4 */ ! public void setHoldability(int holdability) throws SQLException; /** * @since 1.4 */ ! public int getHoldability() throws SQLException; /** * @since 1.4 */ ! public Savepoint setSavepoint() throws SQLException; /** * @since 1.4 */ ! public Savepoint setSavepoint(String name) throws SQLException; /** * @since 1.4 */ ! public void rollback(Savepoint savepoint) throws SQLException; /** * @since 1.4 */ ! public void releaseSavepoint(Savepoint savepoint) throws SQLException; /** * @since 1.4 */ ! public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException; /** * @since 1.4 */ ! public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException; /** * @since 1.4 */ ! public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException; /** * @since 1.4 */ ! public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException; /** * @since 1.4 */ ! public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException; /** * @since 1.4 */ ! public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException; } --- 350,420 ---- * @param map The new SQL mapping table. * @exception SQLException If an error occurs. */ ! void setTypeMap(Map map) throws SQLException; /** * @since 1.4 */ ! void setHoldability(int holdability) throws SQLException; /** * @since 1.4 */ ! int getHoldability() throws SQLException; /** * @since 1.4 */ ! Savepoint setSavepoint() throws SQLException; /** * @since 1.4 */ ! Savepoint setSavepoint(String name) throws SQLException; /** * @since 1.4 */ ! void rollback(Savepoint savepoint) throws SQLException; /** * @since 1.4 */ ! void releaseSavepoint(Savepoint savepoint) throws SQLException; /** * @since 1.4 */ ! Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException; /** * @since 1.4 */ ! PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException; /** * @since 1.4 */ ! CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException; /** * @since 1.4 */ ! PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException; /** * @since 1.4 */ ! PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException; /** * @since 1.4 */ ! PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException; } diff -Nrc3pad gcc-3.3.3/libjava/java/sql/DatabaseMetaData.java gcc-3.4.0/libjava/java/sql/DatabaseMetaData.java *** gcc-3.3.3/libjava/java/sql/DatabaseMetaData.java 2002-06-21 05:39:22.000000000 +0000 --- gcc-3.4.0/libjava/java/sql/DatabaseMetaData.java 2003-10-13 05:03:39.000000000 +0000 *************** public interface DatabaseMetaData *** 42,270 **** /** * It is unknown whether or not the procedure returns a result. */ ! public static final int procedureResultUnknown = 0; /** * The procedure does not return a result. */ ! public static final int procedureNoResult = 1; /** * The procedure returns a result. */ ! public static final int procedureReturnsResult = 2; /** * The column type is unknown. */ ! public static final int procedureColumnUnknown = 0; /** * The column type is input. */ ! public static final int procedureColumnIn = 1; /** * The column type is input/output. */ ! public static final int procedureColumnInOut = 2; /** * The column type is output */ ! public static final int procedureColumnOut = 4; /** * The column is used for return values. */ ! public static final int procedureColumnReturn = 5; /** * The column is used for storing results */ ! public static final int procedureColumnResult = 3; /** * NULL values are not allowed. */ ! public static final int procedureNoNulls = 0; /** * NULL values are allowed. */ ! public static final int procedureNullable = 1; /** * It is unknown whether or not NULL values are allowed. */ ! public static final int procedureNullableUnknown = 2; /** * The column does not allow NULL */ ! public static final int columnNoNulls = 0; /** * The column does allow NULL */ ! public static final int columnNullable = 1; /** * It is unknown whether or not the column allows NULL */ ! public static final int columnNullableUnknown = 2; /** * The best row's scope is only guaranteed to be valid so long as the * row is actually being used. */ ! public static final int bestRowTemporary = 0; /** * The best row identifier is valid to the end of the transaction. */ ! public static final int bestRowTransaction = 1; /** * The best row identifier is valid to the end of the session. */ ! public static final int bestRowSession = 2; /** * The best row may or may not be a pseudo-column. */ ! public static final int bestRowUnknown = 0; /** * The best row identifier is not a pseudo-column. */ ! public static final int bestRowNotPseudo = 1; /** * The best row identifier is a pseudo-column. */ ! public static final int bestRowPseudo = 2; /** * It is unknown whether or not the version column is a pseudo-column. */ ! public static final int versionColumnUnknown = 0; /** * The version column is not a pseudo-column */ ! public static final int versionColumnNotPseudo = 1; /** * The version column is a pseudo-column */ ! public static final int versionColumnPseudo = 2; /** * Foreign key changes are cascaded in updates or deletes. */ ! public static final int importedKeyCascade = 0; /** * Column may not be updated or deleted in use as a foreign key. */ ! public static final int importedKeyRestrict = 1; /** * When primary key is updated or deleted, the foreign key is set to NULL. */ ! public static final int importedKeySetNull = 2; /** * If the primary key is a foreign key, it cannot be udpated or deleted. */ ! public static final int importedKeyNoAction = 3; /** * If the primary key is updated or deleted, the foreign key is set to * a default value. */ ! public static final int importedKeySetDefault = 4; /** * Wish I knew what this meant. */ ! public static final int importedKeyInitiallyDeferred = 5; /** * Wish I knew what this meant. */ ! public static final int importedKeyInitiallyImmediate = 6; /** * Wish I knew what this meant. */ ! public static final int importedKeyNotDeferrable = 7; /** * A NULL value is not allowed for this data type. */ ! public static final int typeNoNulls = 0; /** * A NULL value is allowed for this data type. */ ! public static final int typeNullable = 1; /** * It is unknown whether or not NULL values are allowed for this data type. */ ! public static final int typeNullableUnknown = 2; /** * Where clauses are not supported for this type. */ ! public static final int typePredNone = 0; /** * Only "WHERE..LIKE" style WHERE clauses are allowed on this data type. */ ! public static final int typePredChar = 1; /** * All WHERE clauses except "WHERE..LIKE" style are allowed on this data type. */ ! public static final int typePredBasic = 2; /** * Any type of WHERE clause is allowed for this data type. */ ! public static final int typeSearchable = 3; /** * This column contains table statistics. */ ! public static final short tableIndexStatistic = 0; /** * This table index is clustered. */ ! public static final short tableIndexClustered = 1; /** * This table index is hashed. */ ! public static final short tableIndexHashed = 2; /** * This table index is of another type. */ ! public static final short tableIndexOther = 3; ! public static final short attributeNoNulls = 0; ! public static final short attributeNullable = 1; ! public static final short attributeNullableUnknown = 2; ! public static final int sqlStateXOpen = 1; ! public static final int sqlStateSQL99 = 2; /** * This method tests whether or not all the procedures returned by --- 42,270 ---- /** * It is unknown whether or not the procedure returns a result. */ ! int procedureResultUnknown = 0; /** * The procedure does not return a result. */ ! int procedureNoResult = 1; /** * The procedure returns a result. */ ! int procedureReturnsResult = 2; /** * The column type is unknown. */ ! int procedureColumnUnknown = 0; /** * The column type is input. */ ! int procedureColumnIn = 1; /** * The column type is input/output. */ ! int procedureColumnInOut = 2; /** * The column type is output */ ! int procedureColumnOut = 4; /** * The column is used for return values. */ ! int procedureColumnReturn = 5; /** * The column is used for storing results */ ! int procedureColumnResult = 3; /** * NULL values are not allowed. */ ! int procedureNoNulls = 0; /** * NULL values are allowed. */ ! int procedureNullable = 1; /** * It is unknown whether or not NULL values are allowed. */ ! int procedureNullableUnknown = 2; /** * The column does not allow NULL */ ! int columnNoNulls = 0; /** * The column does allow NULL */ ! int columnNullable = 1; /** * It is unknown whether or not the column allows NULL */ ! int columnNullableUnknown = 2; /** * The best row's scope is only guaranteed to be valid so long as the * row is actually being used. */ ! int bestRowTemporary = 0; /** * The best row identifier is valid to the end of the transaction. */ ! int bestRowTransaction = 1; /** * The best row identifier is valid to the end of the session. */ ! int bestRowSession = 2; /** * The best row may or may not be a pseudo-column. */ ! int bestRowUnknown = 0; /** * The best row identifier is not a pseudo-column. */ ! int bestRowNotPseudo = 1; /** * The best row identifier is a pseudo-column. */ ! int bestRowPseudo = 2; /** * It is unknown whether or not the version column is a pseudo-column. */ ! int versionColumnUnknown = 0; /** * The version column is not a pseudo-column */ ! int versionColumnNotPseudo = 1; /** * The version column is a pseudo-column */ ! int versionColumnPseudo = 2; /** * Foreign key changes are cascaded in updates or deletes. */ ! int importedKeyCascade = 0; /** * Column may not be updated or deleted in use as a foreign key. */ ! int importedKeyRestrict = 1; /** * When primary key is updated or deleted, the foreign key is set to NULL. */ ! int importedKeySetNull = 2; /** * If the primary key is a foreign key, it cannot be udpated or deleted. */ ! int importedKeyNoAction = 3; /** * If the primary key is updated or deleted, the foreign key is set to * a default value. */ ! int importedKeySetDefault = 4; /** * Wish I knew what this meant. */ ! int importedKeyInitiallyDeferred = 5; /** * Wish I knew what this meant. */ ! int importedKeyInitiallyImmediate = 6; /** * Wish I knew what this meant. */ ! int importedKeyNotDeferrable = 7; /** * A NULL value is not allowed for this data type. */ ! int typeNoNulls = 0; /** * A NULL value is allowed for this data type. */ ! int typeNullable = 1; /** * It is unknown whether or not NULL values are allowed for this data type. */ ! int typeNullableUnknown = 2; /** * Where clauses are not supported for this type. */ ! int typePredNone = 0; /** * Only "WHERE..LIKE" style WHERE clauses are allowed on this data type. */ ! int typePredChar = 1; /** * All WHERE clauses except "WHERE..LIKE" style are allowed on this data type. */ ! int typePredBasic = 2; /** * Any type of WHERE clause is allowed for this data type. */ ! int typeSearchable = 3; /** * This column contains table statistics. */ ! short tableIndexStatistic = 0; /** * This table index is clustered. */ ! short tableIndexClustered = 1; /** * This table index is hashed. */ ! short tableIndexHashed = 2; /** * This table index is of another type. */ ! short tableIndexOther = 3; ! short attributeNoNulls = 0; ! short attributeNullable = 1; ! short attributeNullableUnknown = 2; ! int sqlStateXOpen = 1; ! int sqlStateSQL99 = 2; /** * This method tests whether or not all the procedures returned by *************** public interface DatabaseMetaData *** 274,280 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean allProceduresAreCallable() throws SQLException; /** * This method tests whether or not all the table returned by the --- 274,280 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean allProceduresAreCallable() throws SQLException; /** * This method tests whether or not all the table returned by the *************** public interface DatabaseMetaData *** 285,291 **** * * @exception SQLException If an error occurs. */ ! public boolean allTablesAreSelectable() throws SQLException; /** * This method returns the URL for this database. --- 285,291 ---- * * @exception SQLException If an error occurs. */ ! boolean allTablesAreSelectable() throws SQLException; /** * This method returns the URL for this database. *************** public interface DatabaseMetaData *** 294,300 **** * is not known. * @exception SQLException If an error occurs. */ ! public String getURL() throws SQLException; /** * This method returns the database username for this connection. --- 294,300 ---- * is not known. * @exception SQLException If an error occurs. */ ! String getURL() throws SQLException; /** * This method returns the database username for this connection. *************** public interface DatabaseMetaData *** 302,308 **** * @return The database username. * @exception SQLException If an error occurs. */ ! public String getUserName() throws SQLException; /** * This method tests whether or not the database is in read only mode. --- 302,308 ---- * @return The database username. * @exception SQLException If an error occurs. */ ! String getUserName() throws SQLException; /** * This method tests whether or not the database is in read only mode. *************** public interface DatabaseMetaData *** 311,317 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean isReadOnly() throws SQLException; /** * This method tests whether or not NULL's sort as high values. --- 311,317 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean isReadOnly() throws SQLException; /** * This method tests whether or not NULL's sort as high values. *************** public interface DatabaseMetaData *** 320,326 **** * otherwise. * @exception SQLException If an error occurs. */ ! public boolean nullsAreSortedHigh() throws SQLException; /** * This method tests whether or not NULL's sort as low values. --- 320,326 ---- * otherwise. * @exception SQLException If an error occurs. */ ! boolean nullsAreSortedHigh() throws SQLException; /** * This method tests whether or not NULL's sort as low values. *************** public interface DatabaseMetaData *** 329,335 **** * otherwise. * @exception SQLException If an error occurs. */ ! public boolean nullsAreSortedLow() throws SQLException; /** * This method tests whether or not NULL's sort as high values. --- 329,335 ---- * otherwise. * @exception SQLException If an error occurs. */ ! boolean nullsAreSortedLow() throws SQLException; /** * This method tests whether or not NULL's sort as high values. *************** public interface DatabaseMetaData *** 338,344 **** * otherwise. * @exception SQLException If an error occurs. */ ! public boolean nullsAreSortedAtStart() throws SQLException; /** * This method test whether or not NULL's are sorted to the end --- 338,344 ---- * otherwise. * @exception SQLException If an error occurs. */ ! boolean nullsAreSortedAtStart() throws SQLException; /** * This method test whether or not NULL's are sorted to the end *************** public interface DatabaseMetaData *** 348,354 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean nullsAreSortedAtEnd() throws SQLException; /** * This method returns the name of the database product. --- 348,354 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean nullsAreSortedAtEnd() throws SQLException; /** * This method returns the name of the database product. *************** public interface DatabaseMetaData *** 356,362 **** * @return The database product. * @exception SQLException If an error occurs. */ ! public String getDatabaseProductName() throws SQLException; /** * This method returns the version of the database product. --- 356,362 ---- * @return The database product. * @exception SQLException If an error occurs. */ ! String getDatabaseProductName() throws SQLException; /** * This method returns the version of the database product. *************** public interface DatabaseMetaData *** 364,370 **** * @return The version of the database product. * @exception SQLException If an error occurs. */ ! public String getDatabaseProductVersion() throws SQLException; /** * This method returns the name of the JDBC driver. --- 364,370 ---- * @return The version of the database product. * @exception SQLException If an error occurs. */ ! String getDatabaseProductVersion() throws SQLException; /** * This method returns the name of the JDBC driver. *************** public interface DatabaseMetaData *** 372,378 **** * @return The name of the JDBC driver. * @exception SQLException If an error occurs. */ ! public String getDriverName() throws SQLException; /** * This method returns the version of the JDBC driver. --- 372,378 ---- * @return The name of the JDBC driver. * @exception SQLException If an error occurs. */ ! String getDriverName() throws SQLException; /** * This method returns the version of the JDBC driver. *************** public interface DatabaseMetaData *** 380,400 **** * @return The version of the JDBC driver. * @exception SQLException If an error occurs. */ ! public String getDriverVersion() throws SQLException; /** * This method returns the major version number of the JDBC driver. * * @return The major version number of the JDBC driver. */ ! public int getDriverMajorVersion(); /** * This method returns the minor version number of the JDBC driver. * * @return The minor version number of the JDBC driver. */ ! public int getDriverMinorVersion(); /** * This method tests whether or not the database uses local files to --- 380,400 ---- * @return The version of the JDBC driver. * @exception SQLException If an error occurs. */ ! String getDriverVersion() throws SQLException; /** * This method returns the major version number of the JDBC driver. * * @return The major version number of the JDBC driver. */ ! int getDriverMajorVersion(); /** * This method returns the minor version number of the JDBC driver. * * @return The minor version number of the JDBC driver. */ ! int getDriverMinorVersion(); /** * This method tests whether or not the database uses local files to *************** public interface DatabaseMetaData *** 405,411 **** * * @exception SQLException If an error occurs. */ ! public boolean usesLocalFiles() throws SQLException; /** * This method tests whether or not the database uses a separate file for --- 405,411 ---- * * @exception SQLException If an error occurs. */ ! boolean usesLocalFiles() throws SQLException; /** * This method tests whether or not the database uses a separate file for *************** public interface DatabaseMetaData *** 416,422 **** * * @exception SQLException If an error occurs. */ ! public boolean usesLocalFilePerTable() throws SQLException; /** * This method tests whether or not the database supports identifiers --- 416,422 ---- * * @exception SQLException If an error occurs. */ ! boolean usesLocalFilePerTable() throws SQLException; /** * This method tests whether or not the database supports identifiers *************** public interface DatabaseMetaData *** 427,433 **** * * @exception SQLException If an error occurs. */ ! public boolean supportsMixedCaseIdentifiers() throws SQLException; /** * This method tests whether or not the database treats mixed case --- 427,433 ---- * * @exception SQLException If an error occurs. */ ! boolean supportsMixedCaseIdentifiers() throws SQLException; /** * This method tests whether or not the database treats mixed case *************** public interface DatabaseMetaData *** 437,443 **** * upper case, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean storesUpperCaseIdentifiers() throws SQLException; /** * This method tests whether or not the database treats mixed case --- 437,443 ---- * upper case, false otherwise. * @exception SQLException If an error occurs. */ ! boolean storesUpperCaseIdentifiers() throws SQLException; /** * This method tests whether or not the database treats mixed case *************** public interface DatabaseMetaData *** 447,453 **** * lower case, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean storesLowerCaseIdentifiers() throws SQLException; /** * This method tests whether or not the database stores mixed case --- 447,453 ---- * lower case, false otherwise. * @exception SQLException If an error occurs. */ ! boolean storesLowerCaseIdentifiers() throws SQLException; /** * This method tests whether or not the database stores mixed case *************** public interface DatabaseMetaData *** 457,463 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean storesMixedCaseIdentifiers() throws SQLException; /** * This method tests whether or not the database supports quoted identifiers --- 457,463 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean storesMixedCaseIdentifiers() throws SQLException; /** * This method tests whether or not the database supports quoted identifiers *************** public interface DatabaseMetaData *** 467,473 **** * identifiers, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException; /** * This method tests whether or not the database treats mixed case --- 467,473 ---- * identifiers, false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsMixedCaseQuotedIdentifiers() throws SQLException; /** * This method tests whether or not the database treats mixed case *************** public interface DatabaseMetaData *** 477,483 **** * as upper case, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean storesUpperCaseQuotedIdentifiers() throws SQLException; /** * This method tests whether or not the database treats mixed case --- 477,483 ---- * as upper case, false otherwise. * @exception SQLException If an error occurs. */ ! boolean storesUpperCaseQuotedIdentifiers() throws SQLException; /** * This method tests whether or not the database treats mixed case *************** public interface DatabaseMetaData *** 487,493 **** * as lower case, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean storesLowerCaseQuotedIdentifiers() throws SQLException; /** * This method tests whether or not the database stores mixed case --- 487,493 ---- * as lower case, false otherwise. * @exception SQLException If an error occurs. */ ! boolean storesLowerCaseQuotedIdentifiers() throws SQLException; /** * This method tests whether or not the database stores mixed case *************** public interface DatabaseMetaData *** 497,503 **** * identifiers, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean storesMixedCaseQuotedIdentifiers() throws SQLException; /** * This metohd returns the quote string for SQL identifiers. --- 497,503 ---- * identifiers, false otherwise. * @exception SQLException If an error occurs. */ ! boolean storesMixedCaseQuotedIdentifiers() throws SQLException; /** * This metohd returns the quote string for SQL identifiers. *************** public interface DatabaseMetaData *** 506,512 **** * is not supported. * @exception SQLException If an error occurs. */ ! public String getIdentifierQuoteString() throws SQLException; /** * This method returns a comma separated list of all the SQL keywords in --- 506,512 ---- * is not supported. * @exception SQLException If an error occurs. */ ! String getIdentifierQuoteString() throws SQLException; /** * This method returns a comma separated list of all the SQL keywords in *************** public interface DatabaseMetaData *** 515,521 **** * @return The list of SQL keywords not in SQL92. * @exception SQLException If an error occurs. */ ! public String getSQLKeywords() throws SQLException; /** * This method returns a comma separated list of math functions. --- 515,521 ---- * @return The list of SQL keywords not in SQL92. * @exception SQLException If an error occurs. */ ! String getSQLKeywords() throws SQLException; /** * This method returns a comma separated list of math functions. *************** public interface DatabaseMetaData *** 523,529 **** * @return The list of math functions. * @exception SQLException If an error occurs. */ ! public String getNumericFunctions() throws SQLException; /** * This method returns a comma separated list of string functions. --- 523,529 ---- * @return The list of math functions. * @exception SQLException If an error occurs. */ ! String getNumericFunctions() throws SQLException; /** * This method returns a comma separated list of string functions. *************** public interface DatabaseMetaData *** 531,537 **** * @return The list of string functions. * @exception SQLException If an error occurs. */ ! public String getStringFunctions() throws SQLException; /** * This method returns a comma separated list of of system functions. --- 531,537 ---- * @return The list of string functions. * @exception SQLException If an error occurs. */ ! String getStringFunctions() throws SQLException; /** * This method returns a comma separated list of of system functions. *************** public interface DatabaseMetaData *** 539,545 **** * @return A comma separated list of system functions. * @exception SQLException If an error occurs. */ ! public String getSystemFunctions() throws SQLException; /** * This method returns comma separated list of time/date functions. --- 539,545 ---- * @return A comma separated list of system functions. * @exception SQLException If an error occurs. */ ! String getSystemFunctions() throws SQLException; /** * This method returns comma separated list of time/date functions. *************** public interface DatabaseMetaData *** 547,553 **** * @return The list of time/date functions. * @exception SQLException If an error occurs. */ ! public String getTimeDateFunctions() throws SQLException; /** * This method returns the string used to escape wildcards in search strings. --- 547,553 ---- * @return The list of time/date functions. * @exception SQLException If an error occurs. */ ! String getTimeDateFunctions() throws SQLException; /** * This method returns the string used to escape wildcards in search strings. *************** public interface DatabaseMetaData *** 555,561 **** * @return The string used to escape wildcards in search strings. * @exception SQLException If an error occurs. */ ! public String getSearchStringEscape() throws SQLException; /** * This methods returns non-standard characters that can appear in --- 555,561 ---- * @return The string used to escape wildcards in search strings. * @exception SQLException If an error occurs. */ ! String getSearchStringEscape() throws SQLException; /** * This methods returns non-standard characters that can appear in *************** public interface DatabaseMetaData *** 564,570 **** * @return Non-standard characters that can appear in unquoted identifiers. * @exception SQLException If an error occurs. */ ! public String getExtraNameCharacters() throws SQLException; /** * This method tests whether or not the database supports --- 564,570 ---- * @return Non-standard characters that can appear in unquoted identifiers. * @exception SQLException If an error occurs. */ ! String getExtraNameCharacters() throws SQLException; /** * This method tests whether or not the database supports *************** public interface DatabaseMetaData *** 574,580 **** * otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsAlterTableWithAddColumn() throws SQLException; /** * This method tests whether or not the database supports --- 574,580 ---- * otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsAlterTableWithAddColumn() throws SQLException; /** * This method tests whether or not the database supports *************** public interface DatabaseMetaData *** 584,590 **** * otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsAlterTableWithDropColumn() throws SQLException; /** * This method tests whether or not column aliasing is supported. --- 584,590 ---- * otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsAlterTableWithDropColumn() throws SQLException; /** * This method tests whether or not column aliasing is supported. *************** public interface DatabaseMetaData *** 593,599 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsColumnAliasing() throws SQLException; /** * This method tests whether the concatenation of a NULL and non-NULL --- 593,599 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsColumnAliasing() throws SQLException; /** * This method tests whether the concatenation of a NULL and non-NULL *************** public interface DatabaseMetaData *** 604,610 **** * returns a NULL, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean nullPlusNonNullIsNull() throws SQLException; /** * Tests whether or not CONVERT is supported. --- 604,610 ---- * returns a NULL, false otherwise. * @exception SQLException If an error occurs. */ ! boolean nullPlusNonNullIsNull() throws SQLException; /** * Tests whether or not CONVERT is supported. *************** public interface DatabaseMetaData *** 613,619 **** * otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsConvert() throws SQLException; /** * This method tests whether or not CONVERT can be performed between the --- 613,619 ---- * otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsConvert() throws SQLException; /** * This method tests whether or not CONVERT can be performed between the *************** public interface DatabaseMetaData *** 625,631 **** * false otherwise. * @see Types */ ! public boolean supportsConvert(int fromType, int toType) throws SQLException; /** --- 625,631 ---- * false otherwise. * @see Types */ ! boolean supportsConvert(int fromType, int toType) throws SQLException; /** *************** public interface DatabaseMetaData *** 637,643 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsTableCorrelationNames() throws SQLException; /** * This method tests whether correlation names must be different from the --- 637,643 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsTableCorrelationNames() throws SQLException; /** * This method tests whether correlation names must be different from the *************** public interface DatabaseMetaData *** 647,653 **** * the table name, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsDifferentTableCorrelationNames() throws SQLException; /** * This method tests whether or not expressions are allowed in an --- 647,653 ---- * the table name, false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsDifferentTableCorrelationNames() throws SQLException; /** * This method tests whether or not expressions are allowed in an *************** public interface DatabaseMetaData *** 657,663 **** * lists, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsExpressionsInOrderBy() throws SQLException; /** * This method tests whether or ORDER BY on a non-selected column is --- 657,663 ---- * lists, false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsExpressionsInOrderBy() throws SQLException; /** * This method tests whether or ORDER BY on a non-selected column is *************** public interface DatabaseMetaData *** 667,673 **** * ORDER BY, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsOrderByUnrelated() throws SQLException; /** * This method tests whether or not GROUP BY is supported. --- 667,673 ---- * ORDER BY, false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsOrderByUnrelated() throws SQLException; /** * This method tests whether or not GROUP BY is supported. *************** public interface DatabaseMetaData *** 676,682 **** * otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsGroupBy() throws SQLException; /** * This method tests whether GROUP BY on a non-selected column is --- 676,682 ---- * otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsGroupBy() throws SQLException; /** * This method tests whether GROUP BY on a non-selected column is *************** public interface DatabaseMetaData *** 686,692 **** * GROUP BY, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsGroupByUnrelated() throws SQLException; /** * This method tests whether or not a GROUP BY can add columns not in the --- 686,692 ---- * GROUP BY, false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsGroupByUnrelated() throws SQLException; /** * This method tests whether or not a GROUP BY can add columns not in the *************** public interface DatabaseMetaData *** 696,702 **** * all columns in the select, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsGroupByBeyondSelect() throws SQLException; /** * This method tests whether or not the escape character is supported in --- 696,702 ---- * all columns in the select, false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsGroupByBeyondSelect() throws SQLException; /** * This method tests whether or not the escape character is supported in *************** public interface DatabaseMetaData *** 707,713 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsLikeEscapeClause() throws SQLException; /** * This method tests whether multiple result sets for a single statement are --- 707,713 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsLikeEscapeClause() throws SQLException; /** * This method tests whether multiple result sets for a single statement are *************** public interface DatabaseMetaData *** 717,723 **** * single statement, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsMultipleResultSets() throws SQLException; /** * This method test whether or not multiple transactions may be open --- 717,723 ---- * single statement, false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsMultipleResultSets() throws SQLException; /** * This method test whether or not multiple transactions may be open *************** public interface DatabaseMetaData *** 727,733 **** * connections are supported, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsMultipleTransactions() throws SQLException; /** * This method tests whether or not columns can be defined as NOT NULL. A --- 727,733 ---- * connections are supported, false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsMultipleTransactions() throws SQLException; /** * This method tests whether or not columns can be defined as NOT NULL. A *************** public interface DatabaseMetaData *** 737,743 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsNonNullableColumns() throws SQLException; /** * This method tests whether or not the minimum grammer for ODBC is supported. --- 737,743 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsNonNullableColumns() throws SQLException; /** * This method tests whether or not the minimum grammer for ODBC is supported. *************** public interface DatabaseMetaData *** 747,753 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsMinimumSQLGrammar() throws SQLException; /** * This method tests whether or not the core grammer for ODBC is supported. --- 747,753 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsMinimumSQLGrammar() throws SQLException; /** * This method tests whether or not the core grammer for ODBC is supported. *************** public interface DatabaseMetaData *** 756,762 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsCoreSQLGrammar() throws SQLException; /** * This method tests whether or not the extended grammer for ODBC is supported. --- 756,762 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsCoreSQLGrammar() throws SQLException; /** * This method tests whether or not the extended grammer for ODBC is supported. *************** public interface DatabaseMetaData *** 765,771 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsExtendedSQLGrammar() throws SQLException; /** * This method tests whether or not the ANSI92 entry level SQL --- 765,771 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsExtendedSQLGrammar() throws SQLException; /** * This method tests whether or not the ANSI92 entry level SQL *************** public interface DatabaseMetaData *** 776,782 **** * supported, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsANSI92EntryLevelSQL() throws SQLException; /** * This method tests whether or not the ANSI92 intermediate SQL --- 776,782 ---- * supported, false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsANSI92EntryLevelSQL() throws SQLException; /** * This method tests whether or not the ANSI92 intermediate SQL *************** public interface DatabaseMetaData *** 786,792 **** * supported, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsANSI92IntermediateSQL() throws SQLException; /** * This method tests whether or not the ANSI92 full SQL --- 786,792 ---- * supported, false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsANSI92IntermediateSQL() throws SQLException; /** * This method tests whether or not the ANSI92 full SQL *************** public interface DatabaseMetaData *** 796,802 **** * supported, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsANSI92FullSQL() throws SQLException; /** * This method tests whether or not the SQL integrity enhancement --- 796,802 ---- * supported, false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsANSI92FullSQL() throws SQLException; /** * This method tests whether or not the SQL integrity enhancement *************** public interface DatabaseMetaData *** 806,812 **** * supported, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsIntegrityEnhancementFacility() throws SQLException; /** * This method tests whether or not the database supports outer joins. --- 806,812 ---- * supported, false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsIntegrityEnhancementFacility() throws SQLException; /** * This method tests whether or not the database supports outer joins. *************** public interface DatabaseMetaData *** 815,821 **** * otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsOuterJoins() throws SQLException; /** * This method tests whether or not the database supports full outer joins. --- 815,821 ---- * otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsOuterJoins() throws SQLException; /** * This method tests whether or not the database supports full outer joins. *************** public interface DatabaseMetaData *** 824,830 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsFullOuterJoins() throws SQLException; /** * This method tests whether or not the database supports limited outer joins. --- 824,830 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsFullOuterJoins() throws SQLException; /** * This method tests whether or not the database supports limited outer joins. *************** public interface DatabaseMetaData *** 833,839 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsLimitedOuterJoins() throws SQLException; /** * This method returns the vendor's term for "schema". --- 833,839 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsLimitedOuterJoins() throws SQLException; /** * This method returns the vendor's term for "schema". *************** public interface DatabaseMetaData *** 841,847 **** * @return The vendor's term for schema. * @exception SQLException if an error occurs. */ ! public String getSchemaTerm() throws SQLException; /** * This method returns the vendor's term for "procedure". --- 841,847 ---- * @return The vendor's term for schema. * @exception SQLException if an error occurs. */ ! String getSchemaTerm() throws SQLException; /** * This method returns the vendor's term for "procedure". *************** public interface DatabaseMetaData *** 849,855 **** * @return The vendor's term for procedure. * @exception SQLException if an error occurs. */ ! public String getProcedureTerm() throws SQLException; /** * This method returns the vendor's term for "catalog". --- 849,855 ---- * @return The vendor's term for procedure. * @exception SQLException if an error occurs. */ ! String getProcedureTerm() throws SQLException; /** * This method returns the vendor's term for "catalog". *************** public interface DatabaseMetaData *** 857,863 **** * @return The vendor's term for catalog. * @exception SQLException if an error occurs. */ ! public String getCatalogTerm() throws SQLException; /** * This method tests whether a catalog name appears at the beginning of --- 857,863 ---- * @return The vendor's term for catalog. * @exception SQLException if an error occurs. */ ! String getCatalogTerm() throws SQLException; /** * This method tests whether a catalog name appears at the beginning of *************** public interface DatabaseMetaData *** 867,873 **** * false if it appears at the end. * @exception SQLException If an error occurs. */ ! public boolean isCatalogAtStart() throws SQLException; /** * This method returns the separator between the catalog name and the --- 867,873 ---- * false if it appears at the end. * @exception SQLException If an error occurs. */ ! boolean isCatalogAtStart() throws SQLException; /** * This method returns the separator between the catalog name and the *************** public interface DatabaseMetaData *** 876,882 **** * @return The separator between the catalog name and the table name. * @exception SQLException If an error occurs. */ ! public String getCatalogSeparator() throws SQLException; /** * This method tests whether a catalog name can appear in a data --- 876,882 ---- * @return The separator between the catalog name and the table name. * @exception SQLException If an error occurs. */ ! String getCatalogSeparator() throws SQLException; /** * This method tests whether a catalog name can appear in a data *************** public interface DatabaseMetaData *** 886,892 **** * manipulation statement, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsSchemasInDataManipulation() throws SQLException; /** * This method tests whether a catalog name can appear in a procedure --- 886,892 ---- * manipulation statement, false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsSchemasInDataManipulation() throws SQLException; /** * This method tests whether a catalog name can appear in a procedure *************** public interface DatabaseMetaData *** 896,902 **** * call, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsSchemasInProcedureCalls() throws SQLException; /** * This method tests whether a catalog name can appear in a table definition. --- 896,902 ---- * call, false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsSchemasInProcedureCalls() throws SQLException; /** * This method tests whether a catalog name can appear in a table definition. *************** public interface DatabaseMetaData *** 905,911 **** * definition, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsSchemasInTableDefinitions() throws SQLException; /** * This method tests whether a catalog name can appear in an index definition. --- 905,911 ---- * definition, false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsSchemasInTableDefinitions() throws SQLException; /** * This method tests whether a catalog name can appear in an index definition. *************** public interface DatabaseMetaData *** 914,920 **** * definition, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsSchemasInIndexDefinitions() throws SQLException; /** * This method tests whether a catalog name can appear in privilege definitions. --- 914,920 ---- * definition, false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsSchemasInIndexDefinitions() throws SQLException; /** * This method tests whether a catalog name can appear in privilege definitions. *************** public interface DatabaseMetaData *** 923,929 **** * definition, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException; /** * This method tests whether a catalog name can appear in a data --- 923,929 ---- * definition, false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsSchemasInPrivilegeDefinitions() throws SQLException; /** * This method tests whether a catalog name can appear in a data *************** public interface DatabaseMetaData *** 933,939 **** * manipulation statement, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsCatalogsInDataManipulation() throws SQLException; /** * This method tests whether a catalog name can appear in a procedure --- 933,939 ---- * manipulation statement, false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsCatalogsInDataManipulation() throws SQLException; /** * This method tests whether a catalog name can appear in a procedure *************** public interface DatabaseMetaData *** 943,949 **** * call, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsCatalogsInProcedureCalls() throws SQLException; /** * This method tests whether a catalog name can appear in a table definition. --- 943,949 ---- * call, false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsCatalogsInProcedureCalls() throws SQLException; /** * This method tests whether a catalog name can appear in a table definition. *************** public interface DatabaseMetaData *** 952,958 **** * definition, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsCatalogsInTableDefinitions() throws SQLException; /** * This method tests whether a catalog name can appear in an index definition. --- 952,958 ---- * definition, false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsCatalogsInTableDefinitions() throws SQLException; /** * This method tests whether a catalog name can appear in an index definition. *************** public interface DatabaseMetaData *** 961,967 **** * definition, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsCatalogsInIndexDefinitions() throws SQLException; /** * This method tests whether a catalog name can appear in privilege definitions. --- 961,967 ---- * definition, false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsCatalogsInIndexDefinitions() throws SQLException; /** * This method tests whether a catalog name can appear in privilege definitions. *************** public interface DatabaseMetaData *** 970,976 **** * definition, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException; /** * This method tests whether or not that database supports positioned --- 970,976 ---- * definition, false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException; /** * This method tests whether or not that database supports positioned *************** public interface DatabaseMetaData *** 980,986 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsPositionedDelete() throws SQLException; /** * This method tests whether or not that database supports positioned --- 980,986 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsPositionedDelete() throws SQLException; /** * This method tests whether or not that database supports positioned *************** public interface DatabaseMetaData *** 990,996 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsPositionedUpdate() throws SQLException; /** * This method tests whether or not SELECT FOR UPDATE is supported by the --- 990,996 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsPositionedUpdate() throws SQLException; /** * This method tests whether or not SELECT FOR UPDATE is supported by the *************** public interface DatabaseMetaData *** 1000,1006 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsSelectForUpdate() throws SQLException; /** * This method tests whether or not stored procedures are supported on --- 1000,1006 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsSelectForUpdate() throws SQLException; /** * This method tests whether or not stored procedures are supported on *************** public interface DatabaseMetaData *** 1010,1016 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsStoredProcedures() throws SQLException; /** * This method tests whether or not subqueries are allowed in comparisons. --- 1010,1016 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsStoredProcedures() throws SQLException; /** * This method tests whether or not subqueries are allowed in comparisons. *************** public interface DatabaseMetaData *** 1020,1026 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsSubqueriesInComparisons() throws SQLException; /** * This method tests whether or not subqueries are allowed in exists --- 1020,1026 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsSubqueriesInComparisons() throws SQLException; /** * This method tests whether or not subqueries are allowed in exists *************** public interface DatabaseMetaData *** 1031,1037 **** * expressions, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsSubqueriesInExists() throws SQLException; /** * This method tests whether subqueries are allowed in IN statements. --- 1031,1037 ---- * expressions, false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsSubqueriesInExists() throws SQLException; /** * This method tests whether subqueries are allowed in IN statements. *************** public interface DatabaseMetaData *** 1041,1047 **** * statements, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsSubqueriesInIns() throws SQLException; /** * This method tests whether or not subqueries are allowed in quantified --- 1041,1047 ---- * statements, false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsSubqueriesInIns() throws SQLException; /** * This method tests whether or not subqueries are allowed in quantified *************** public interface DatabaseMetaData *** 1052,1058 **** * expressions, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsSubqueriesInQuantifieds() throws SQLException; /** * This method test whether or not correlated subqueries are allowed. A --- 1052,1058 ---- * expressions, false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsSubqueriesInQuantifieds() throws SQLException; /** * This method test whether or not correlated subqueries are allowed. A *************** public interface DatabaseMetaData *** 1062,1068 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsCorrelatedSubqueries() throws SQLException; /** * This method tests whether or not the UNION statement is supported. --- 1062,1068 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsCorrelatedSubqueries() throws SQLException; /** * This method tests whether or not the UNION statement is supported. *************** public interface DatabaseMetaData *** 1071,1077 **** * otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsUnion() throws SQLException; /** * This method tests whether or not the UNION ALL statement is supported. --- 1071,1077 ---- * otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsUnion() throws SQLException; /** * This method tests whether or not the UNION ALL statement is supported. *************** public interface DatabaseMetaData *** 1080,1086 **** * otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsUnionAll() throws SQLException; /** * This method tests whether or not the database supports cursors --- 1080,1086 ---- * otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsUnionAll() throws SQLException; /** * This method tests whether or not the database supports cursors *************** public interface DatabaseMetaData *** 1090,1096 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsOpenCursorsAcrossCommit() throws SQLException; /** * This method tests whether or not the database supports cursors --- 1090,1096 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsOpenCursorsAcrossCommit() throws SQLException; /** * This method tests whether or not the database supports cursors *************** public interface DatabaseMetaData *** 1100,1106 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsOpenCursorsAcrossRollback() throws SQLException; /** * This method tests whether or not the database supports statements --- 1100,1106 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsOpenCursorsAcrossRollback() throws SQLException; /** * This method tests whether or not the database supports statements *************** public interface DatabaseMetaData *** 1110,1116 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsOpenStatementsAcrossCommit() throws SQLException; /** * This method tests whether or not the database supports statements --- 1110,1116 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsOpenStatementsAcrossCommit() throws SQLException; /** * This method tests whether or not the database supports statements *************** public interface DatabaseMetaData *** 1120,1126 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsOpenStatementsAcrossRollback() throws SQLException; /** * This method returns the number of hex characters allowed in an inline --- 1120,1126 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsOpenStatementsAcrossRollback() throws SQLException; /** * This method returns the number of hex characters allowed in an inline *************** public interface DatabaseMetaData *** 1130,1136 **** * either an unknown or unlimited number. * @exception SQLException If an error occurs. */ ! public int getMaxBinaryLiteralLength() throws SQLException; /** * This method returns the maximum length of a character literal. --- 1130,1136 ---- * either an unknown or unlimited number. * @exception SQLException If an error occurs. */ ! int getMaxBinaryLiteralLength() throws SQLException; /** * This method returns the maximum length of a character literal. *************** public interface DatabaseMetaData *** 1138,1144 **** * @return The maximum length of a character literal. * @exception SQLException If an error occurs. */ ! public int getMaxCharLiteralLength() throws SQLException; /** * This method returns the maximum length of a column name. --- 1138,1144 ---- * @return The maximum length of a character literal. * @exception SQLException If an error occurs. */ ! int getMaxCharLiteralLength() throws SQLException; /** * This method returns the maximum length of a column name. *************** public interface DatabaseMetaData *** 1146,1152 **** * @return The maximum length of a column name. * @exception SQLException If an error occurs. */ ! public int getMaxColumnNameLength() throws SQLException; /** * This method returns the maximum number of columns in a GROUP BY statement. --- 1146,1152 ---- * @return The maximum length of a column name. * @exception SQLException If an error occurs. */ ! int getMaxColumnNameLength() throws SQLException; /** * This method returns the maximum number of columns in a GROUP BY statement. *************** public interface DatabaseMetaData *** 1154,1160 **** * @return The maximum number of columns in a GROUP BY statement. * @exception SQLException If an error occurs. */ ! public int getMaxColumnsInGroupBy() throws SQLException; /** * This method returns the maximum number of columns in an index. --- 1154,1160 ---- * @return The maximum number of columns in a GROUP BY statement. * @exception SQLException If an error occurs. */ ! int getMaxColumnsInGroupBy() throws SQLException; /** * This method returns the maximum number of columns in an index. *************** public interface DatabaseMetaData *** 1162,1168 **** * @return The maximum number of columns in an index. * @exception SQLException If an error occurs. */ ! public int getMaxColumnsInIndex() throws SQLException; /** * This method returns the maximum number of columns in an ORDER BY statement. --- 1162,1168 ---- * @return The maximum number of columns in an index. * @exception SQLException If an error occurs. */ ! int getMaxColumnsInIndex() throws SQLException; /** * This method returns the maximum number of columns in an ORDER BY statement. *************** public interface DatabaseMetaData *** 1170,1176 **** * @return The maximum number of columns in an ORDER BY statement. * @exception SQLException If an error occurs. */ ! public int getMaxColumnsInOrderBy() throws SQLException; /** * This method returns the maximum number of columns in a SELECT statement. --- 1170,1176 ---- * @return The maximum number of columns in an ORDER BY statement. * @exception SQLException If an error occurs. */ ! int getMaxColumnsInOrderBy() throws SQLException; /** * This method returns the maximum number of columns in a SELECT statement. *************** public interface DatabaseMetaData *** 1178,1184 **** * @return The maximum number of columns in a SELECT statement. * @exception SQLException If an error occurs. */ ! public int getMaxColumnsInSelect() throws SQLException; /** * This method returns the maximum number of columns in a table. --- 1178,1184 ---- * @return The maximum number of columns in a SELECT statement. * @exception SQLException If an error occurs. */ ! int getMaxColumnsInSelect() throws SQLException; /** * This method returns the maximum number of columns in a table. *************** public interface DatabaseMetaData *** 1186,1192 **** * @return The maximum number of columns in a table. * @exception SQLException If an error occurs. */ ! public int getMaxColumnsInTable() throws SQLException; /** * This method returns the maximum number of connections this client --- 1186,1192 ---- * @return The maximum number of columns in a table. * @exception SQLException If an error occurs. */ ! int getMaxColumnsInTable() throws SQLException; /** * This method returns the maximum number of connections this client *************** public interface DatabaseMetaData *** 1195,1201 **** * @return The maximum number of database connections. * @SQLException If an error occurs. */ ! public int getMaxConnections() throws SQLException; /** * This method returns the maximum length of a cursor name. --- 1195,1201 ---- * @return The maximum number of database connections. * @SQLException If an error occurs. */ ! int getMaxConnections() throws SQLException; /** * This method returns the maximum length of a cursor name. *************** public interface DatabaseMetaData *** 1203,1209 **** * @return The maximum length of a cursor name. * @exception SQLException If an error occurs. */ ! public int getMaxCursorNameLength() throws SQLException; /** * This method returns the maximum length of an index. --- 1203,1209 ---- * @return The maximum length of a cursor name. * @exception SQLException If an error occurs. */ ! int getMaxCursorNameLength() throws SQLException; /** * This method returns the maximum length of an index. *************** public interface DatabaseMetaData *** 1211,1217 **** * @return The maximum length of an index. * @exception SQLException If an error occurs. */ ! public int getMaxIndexLength() throws SQLException; /** * This method returns the maximum length of a schema name. --- 1211,1217 ---- * @return The maximum length of an index. * @exception SQLException If an error occurs. */ ! int getMaxIndexLength() throws SQLException; /** * This method returns the maximum length of a schema name. *************** public interface DatabaseMetaData *** 1219,1225 **** * @return The maximum length of a schema name. * @exception SQLException If an error occurs. */ ! public int getMaxSchemaNameLength() throws SQLException; /** * This method returns the maximum length of a procedure name. --- 1219,1225 ---- * @return The maximum length of a schema name. * @exception SQLException If an error occurs. */ ! int getMaxSchemaNameLength() throws SQLException; /** * This method returns the maximum length of a procedure name. *************** public interface DatabaseMetaData *** 1227,1233 **** * @return The maximum length of a procedure name. * @exception SQLException If an error occurs. */ ! public int getMaxProcedureNameLength() throws SQLException; /** * This method returns the maximum length of a catalog name. --- 1227,1233 ---- * @return The maximum length of a procedure name. * @exception SQLException If an error occurs. */ ! int getMaxProcedureNameLength() throws SQLException; /** * This method returns the maximum length of a catalog name. *************** public interface DatabaseMetaData *** 1235,1241 **** * @return The maximum length of a catalog name. * @exception SQLException If an error occurs. */ ! public int getMaxCatalogNameLength() throws SQLException; /** * This method returns the maximum size of a row in bytes. --- 1235,1241 ---- * @return The maximum length of a catalog name. * @exception SQLException If an error occurs. */ ! int getMaxCatalogNameLength() throws SQLException; /** * This method returns the maximum size of a row in bytes. *************** public interface DatabaseMetaData *** 1243,1249 **** * @return The maximum size of a row. * @exception SQLException If an error occurs. */ ! public int getMaxRowSize() throws SQLException; /** * This method tests whether or not the maximum row size includes BLOB's --- 1243,1249 ---- * @return The maximum size of a row. * @exception SQLException If an error occurs. */ ! int getMaxRowSize() throws SQLException; /** * This method tests whether or not the maximum row size includes BLOB's *************** public interface DatabaseMetaData *** 1252,1258 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean doesMaxRowSizeIncludeBlobs() throws SQLException; /** * This method includes the maximum length of a SQL statement. --- 1252,1258 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean doesMaxRowSizeIncludeBlobs() throws SQLException; /** * This method includes the maximum length of a SQL statement. *************** public interface DatabaseMetaData *** 1260,1266 **** * @return The maximum length of a SQL statement. * @exception SQLException If an error occurs. */ ! public int getMaxStatementLength() throws SQLException; /** * This method returns the maximum number of statements that can be --- 1260,1266 ---- * @return The maximum length of a SQL statement. * @exception SQLException If an error occurs. */ ! int getMaxStatementLength() throws SQLException; /** * This method returns the maximum number of statements that can be *************** public interface DatabaseMetaData *** 1269,1275 **** * @return The maximum number of statements that can be active at any time. * @exception SQLException If an error occurs. */ ! public int getMaxStatements() throws SQLException; /** * This method returns the maximum length of a table name. --- 1269,1275 ---- * @return The maximum number of statements that can be active at any time. * @exception SQLException If an error occurs. */ ! int getMaxStatements() throws SQLException; /** * This method returns the maximum length of a table name. *************** public interface DatabaseMetaData *** 1277,1283 **** * @return The maximum length of a table name. * @exception SQLException If an error occurs. */ ! public int getMaxTableNameLength() throws SQLException; /** * This method returns the maximum number of tables that may be referenced --- 1277,1283 ---- * @return The maximum length of a table name. * @exception SQLException If an error occurs. */ ! int getMaxTableNameLength() throws SQLException; /** * This method returns the maximum number of tables that may be referenced *************** public interface DatabaseMetaData *** 1286,1292 **** * @return The maximum number of tables allowed in a SELECT statement. * @exception SQLException If an error occurs. */ ! public int getMaxTablesInSelect() throws SQLException; /** * This method returns the maximum length of a user name. --- 1286,1292 ---- * @return The maximum number of tables allowed in a SELECT statement. * @exception SQLException If an error occurs. */ ! int getMaxTablesInSelect() throws SQLException; /** * This method returns the maximum length of a user name. *************** public interface DatabaseMetaData *** 1294,1300 **** * @return The maximum length of a user name. * @exception SQLException If an error occurs. */ ! public int getMaxUserNameLength() throws SQLException; /** * This method returns the default transaction isolation level of the --- 1294,1300 ---- * @return The maximum length of a user name. * @exception SQLException If an error occurs. */ ! int getMaxUserNameLength() throws SQLException; /** * This method returns the default transaction isolation level of the *************** public interface DatabaseMetaData *** 1304,1310 **** * @exception SQLException If an error occurs. * @see Connection */ ! public int getDefaultTransactionIsolation() throws SQLException; /** * This method tests whether or not the database supports transactions. --- 1304,1310 ---- * @exception SQLException If an error occurs. * @see Connection */ ! int getDefaultTransactionIsolation() throws SQLException; /** * This method tests whether or not the database supports transactions. *************** public interface DatabaseMetaData *** 1313,1319 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsTransactions() throws SQLException; /** * This method tests whether or not the database supports the specified --- 1313,1319 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsTransactions() throws SQLException; /** * This method tests whether or not the database supports the specified *************** public interface DatabaseMetaData *** 1325,1331 **** * is supported, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsTransactionIsolationLevel(int level) throws SQLException; /** --- 1325,1331 ---- * is supported, false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsTransactionIsolationLevel(int level) throws SQLException; /** *************** public interface DatabaseMetaData *** 1336,1342 **** * same transaction, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsDataDefinitionAndDataManipulationTransactions() throws SQLException; /** --- 1336,1342 ---- * same transaction, false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsDataDefinitionAndDataManipulationTransactions() throws SQLException; /** *************** public interface DatabaseMetaData *** 1347,1353 **** * transactions, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsDataManipulationTransactionsOnly() throws SQLException; /** --- 1347,1353 ---- * transactions, false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsDataManipulationTransactionsOnly() throws SQLException; /** *************** public interface DatabaseMetaData *** 1358,1364 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean dataDefinitionCausesTransactionCommit() throws SQLException; /** * This method tests whether or not DDL statements are ignored in --- 1358,1364 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean dataDefinitionCausesTransactionCommit() throws SQLException; /** * This method tests whether or not DDL statements are ignored in *************** public interface DatabaseMetaData *** 1368,1374 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean dataDefinitionIgnoredInTransactions() throws SQLException; /** * This method returns a list of all the stored procedures matching the --- 1368,1374 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean dataDefinitionIgnoredInTransactions() throws SQLException; /** * This method returns a list of all the stored procedures matching the *************** public interface DatabaseMetaData *** 1399,1405 **** * @returns A ResultSet with all the requested procedures. * @exception SQLException If an error occurs. */ ! public ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) throws SQLException; /** --- 1399,1405 ---- * @returns A ResultSet with all the requested procedures. * @exception SQLException If an error occurs. */ ! ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) throws SQLException; /** *************** public interface DatabaseMetaData *** 1441,1447 **** * @returns A ResultSet with all the requested procedures. * @exception SQLException If an error occurs. */ ! public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLException; --- 1441,1447 ---- * @returns A ResultSet with all the requested procedures. * @exception SQLException If an error occurs. */ ! ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLException; *************** public interface DatabaseMetaData *** 1467,1473 **** * @returns A ResultSet with all the requested tables. * @exception SQLException If an error occurs. */ ! public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) throws SQLException; /** --- 1467,1473 ---- * @returns A ResultSet with all the requested tables. * @exception SQLException If an error occurs. */ ! ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) throws SQLException; /** *************** public interface DatabaseMetaData *** 1478,1484 **** * @return A ResultSet with all the requested schemas. * @exception SQLException If an error occurs. */ ! public ResultSet getSchemas() throws SQLException; /** * This method returns the list of database catalogs as a --- 1478,1484 ---- * @return A ResultSet with all the requested schemas. * @exception SQLException If an error occurs. */ ! ResultSet getSchemas() throws SQLException; /** * This method returns the list of database catalogs as a *************** public interface DatabaseMetaData *** 1488,1494 **** * @return A ResultSet with all the requested catalogs. * @exception SQLException If an error occurs. */ ! public ResultSet getCatalogs() throws SQLException; /** * This method returns the list of database table types as a --- 1488,1494 ---- * @return A ResultSet with all the requested catalogs. * @exception SQLException If an error occurs. */ ! ResultSet getCatalogs() throws SQLException; /** * This method returns the list of database table types as a *************** public interface DatabaseMetaData *** 1498,1504 **** * @return A ResultSet with all the requested table types. * @exception SQLException If an error occurs. */ ! public ResultSet getTableTypes() throws SQLException; /** * This method returns a list of the tables columns for --- 1498,1504 ---- * @return A ResultSet with all the requested table types. * @exception SQLException If an error occurs. */ ! ResultSet getTableTypes() throws SQLException; /** * This method returns a list of the tables columns for *************** public interface DatabaseMetaData *** 1541,1547 **** * @returns A ResultSet with all the requested tables. * @exception SQLException If an error occurs. */ ! public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException; /** --- 1541,1547 ---- * @returns A ResultSet with all the requested tables. * @exception SQLException If an error occurs. */ ! ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException; /** *************** public interface DatabaseMetaData *** 1573,1579 **** * @return A ResultSet with all the requested privileges. * @exception SQLException If an error occurs. */ ! public ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) throws SQLException; /** --- 1573,1579 ---- * @return A ResultSet with all the requested privileges. * @exception SQLException If an error occurs. */ ! ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) throws SQLException; /** *************** public interface DatabaseMetaData *** 1604,1610 **** * @return A ResultSet with all the requested privileges. * @exception SQLException If an error occurs. */ ! public ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) throws SQLException; /** --- 1604,1610 ---- * @return A ResultSet with all the requested privileges. * @exception SQLException If an error occurs. */ ! ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) throws SQLException; /** *************** public interface DatabaseMetaData *** 1642,1648 **** * @return A ResultSet with the best row identifier. * @exception SQLException If an error occurs. */ ! public ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) throws SQLException; /** --- 1642,1648 ---- * @return A ResultSet with the best row identifier. * @exception SQLException If an error occurs. */ ! ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) throws SQLException; /** *************** public interface DatabaseMetaData *** 1675,1681 **** * @return A ResultSet with the version columns. * @exception SQLException If an error occurs. */ ! public ResultSet getVersionColumns(String catalog, String schema, String table) throws SQLException; /** --- 1675,1681 ---- * @return A ResultSet with the version columns. * @exception SQLException If an error occurs. */ ! ResultSet getVersionColumns(String catalog, String schema, String table) throws SQLException; /** *************** public interface DatabaseMetaData *** 1701,1707 **** * @return A ResultSet with the primary key columns. * @exception SQLException If an error occurs. */ ! public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException; /** --- 1701,1707 ---- * @return A ResultSet with the primary key columns. * @exception SQLException If an error occurs. */ ! ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException; /** *************** public interface DatabaseMetaData *** 1746,1752 **** * * @exception SQLException If an error occurs. */ ! public ResultSet getImportedKeys(String catalog, String schema, String table) throws SQLException; /** --- 1746,1752 ---- * * @exception SQLException If an error occurs. */ ! ResultSet getImportedKeys(String catalog, String schema, String table) throws SQLException; /** *************** public interface DatabaseMetaData *** 1790,1796 **** * @return A ResultSet with the requested information * @exception SQLException If an error occurs. */ ! public ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException; /** --- 1790,1796 ---- * @return A ResultSet with the requested information * @exception SQLException If an error occurs. */ ! ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException; /** *************** public interface DatabaseMetaData *** 1842,1848 **** * @return A ResultSet with the requested information * @exception SQLException If an error occurs. */ ! public ResultSet getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) throws SQLException; --- 1842,1848 ---- * @return A ResultSet with the requested information * @exception SQLException If an error occurs. */ ! ResultSet getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) throws SQLException; *************** public interface DatabaseMetaData *** 1885,1891 **** * @return A ResultSet with the list of available data types. * @exception SQLException If an error occurs. */ ! public ResultSet getTypeInfo() throws SQLException; /** * This method returns information about a tables indices and statistics. --- 1885,1891 ---- * @return A ResultSet with the list of available data types. * @exception SQLException If an error occurs. */ ! ResultSet getTypeInfo() throws SQLException; /** * This method returns information about a tables indices and statistics. *************** public interface DatabaseMetaData *** 1929,1935 **** * @return A ResultSet with the requested index information * @exception SQLException If an error occurs. */ ! public ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) throws SQLException; /** --- 1929,1935 ---- * @return A ResultSet with the requested index information * @exception SQLException If an error occurs. */ ! ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) throws SQLException; /** *************** public interface DatabaseMetaData *** 1946,1952 **** * * @see ResultSet */ ! public boolean supportsResultSetType(int type) throws SQLException; /** * This method tests whether the specified result set type and result set --- 1946,1952 ---- * * @see ResultSet */ ! boolean supportsResultSetType(int type) throws SQLException; /** * This method tests whether the specified result set type and result set *************** public interface DatabaseMetaData *** 1961,1967 **** * @exception SQLException If an error occurs. * @see ResultSet */ ! public boolean supportsResultSetConcurrency(int type, int concurrency) throws SQLException; /** --- 1961,1967 ---- * @exception SQLException If an error occurs. * @see ResultSet */ ! boolean supportsResultSetConcurrency(int type, int concurrency) throws SQLException; /** *************** public interface DatabaseMetaData *** 1975,1981 **** * @exception SQLException If an error occurs. * @see ResultSet */ ! public boolean ownUpdatesAreVisible(int type) throws SQLException; /** * This method tests whether or not the specified result set type sees its --- 1975,1981 ---- * @exception SQLException If an error occurs. * @see ResultSet */ ! boolean ownUpdatesAreVisible(int type) throws SQLException; /** * This method tests whether or not the specified result set type sees its *************** public interface DatabaseMetaData *** 1988,1994 **** * @exception SQLException If an error occurs. * @see ResultSet */ ! public boolean ownDeletesAreVisible(int type) throws SQLException; /** * This method tests whether or not the specified result set type sees its --- 1988,1994 ---- * @exception SQLException If an error occurs. * @see ResultSet */ ! boolean ownDeletesAreVisible(int type) throws SQLException; /** * This method tests whether or not the specified result set type sees its *************** public interface DatabaseMetaData *** 2001,2007 **** * @exception SQLException If an error occurs. * @see ResultSet */ ! public boolean ownInsertsAreVisible(int type) throws SQLException; /** * This method tests whether or not the specified result set type sees --- 2001,2007 ---- * @exception SQLException If an error occurs. * @see ResultSet */ ! boolean ownInsertsAreVisible(int type) throws SQLException; /** * This method tests whether or not the specified result set type sees *************** public interface DatabaseMetaData *** 2014,2020 **** * @exception SQLException If an error occurs. * @see ResultSet */ ! public boolean othersUpdatesAreVisible(int type) throws SQLException; /** * This method tests whether or not the specified result set type sees --- 2014,2020 ---- * @exception SQLException If an error occurs. * @see ResultSet */ ! boolean othersUpdatesAreVisible(int type) throws SQLException; /** * This method tests whether or not the specified result set type sees *************** public interface DatabaseMetaData *** 2027,2033 **** * @exception SQLException If an error occurs. * @see ResultSet */ ! public boolean othersDeletesAreVisible(int type) throws SQLException; /** * This method tests whether or not the specified result set type sees --- 2027,2033 ---- * @exception SQLException If an error occurs. * @see ResultSet */ ! boolean othersDeletesAreVisible(int type) throws SQLException; /** * This method tests whether or not the specified result set type sees *************** public interface DatabaseMetaData *** 2040,2046 **** * @exception SQLException If an error occurs. * @see ResultSet */ ! public boolean othersInsertsAreVisible(int type) throws SQLException; /** * This method tests whether or not the specified result set type can detect --- 2040,2046 ---- * @exception SQLException If an error occurs. * @see ResultSet */ ! boolean othersInsertsAreVisible(int type) throws SQLException; /** * This method tests whether or not the specified result set type can detect *************** public interface DatabaseMetaData *** 2053,2059 **** * @exception SQLException If an error occurs. * @see ResultSet */ ! public boolean updatesAreDetected(int type) throws SQLException; /** * This method tests whether or not the specified result set type can detect --- 2053,2059 ---- * @exception SQLException If an error occurs. * @see ResultSet */ ! boolean updatesAreDetected(int type) throws SQLException; /** * This method tests whether or not the specified result set type can detect *************** public interface DatabaseMetaData *** 2066,2072 **** * @exception SQLException If an error occurs. * @see ResultSet */ ! public boolean deletesAreDetected(int type) throws SQLException; /** * This method tests whether or not the specified result set type can detect --- 2066,2072 ---- * @exception SQLException If an error occurs. * @see ResultSet */ ! boolean deletesAreDetected(int type) throws SQLException; /** * This method tests whether or not the specified result set type can detect *************** public interface DatabaseMetaData *** 2079,2085 **** * @exception SQLException If an error occurs. * @see ResultSet */ ! public boolean insertsAreDetected(int type) throws SQLException; /** * This method tests whether or not the database supports batch updates. --- 2079,2085 ---- * @exception SQLException If an error occurs. * @see ResultSet */ ! boolean insertsAreDetected(int type) throws SQLException; /** * This method tests whether or not the database supports batch updates. *************** public interface DatabaseMetaData *** 2088,2094 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean supportsBatchUpdates() throws SQLException; /** * This method returns the list of user defined data types in use. These --- 2088,2094 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean supportsBatchUpdates() throws SQLException; /** * This method returns the list of user defined data types in use. These *************** public interface DatabaseMetaData *** 2116,2122 **** * @return A ResultSet with the requested type information * @exception SQLException If an error occurs. */ ! public ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) throws SQLException; /** --- 2116,2122 ---- * @return A ResultSet with the requested type information * @exception SQLException If an error occurs. */ ! ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) throws SQLException; /** *************** public interface DatabaseMetaData *** 2126,2214 **** * @return The connection for this object. * @exception SQLException If an error occurs. */ ! public Connection getConnection() throws SQLException; /** * @since 1.4 */ ! public boolean supportsSavepoints() throws SQLException; /** * @since 1.4 */ ! public boolean supportsNamedParameters() throws SQLException; /** * @since 1.4 */ ! public boolean supportsMultipleOpenResults() throws SQLException; /** * @since 1.4 */ ! public boolean supportsGetGeneratedKeys() throws SQLException; /** * @since 1.4 */ ! public ResultSet getSuperTypes(String catalog, String schemaPattern, String typeNamePattern) throws SQLException; /** * @since 1.4 */ ! public ResultSet getSuperTables(String catalog, String schemaPattern, String tableNamePattern) throws SQLException; /** * @since 1.4 */ ! public ResultSet getAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern) throws SQLException; /** * @since 1.4 */ ! public boolean supportsResultSetHoldability(int holdability) throws SQLException; /** * @since 1.4 */ ! public int getResultSetHoldability() throws SQLException; /** * @since 1.4 */ ! public int getDatabaseMajorVersion() throws SQLException; /** * @since 1.4 */ ! public int getDatabaseMinorVersion() throws SQLException; /** * @since 1.4 */ ! public int getJDBCMajorVersion() throws SQLException; /** * @since 1.4 */ ! public int getJDBCMinorVersion() throws SQLException; /** * @since 1.4 */ ! public int getSQLStateType() throws SQLException; /** * @since 1.4 */ ! public boolean locatorsUpdateCopy() throws SQLException; /** * @since 1.4 */ ! public boolean supportsStatementPooling() throws SQLException; } --- 2126,2214 ---- * @return The connection for this object. * @exception SQLException If an error occurs. */ ! Connection getConnection() throws SQLException; /** * @since 1.4 */ ! boolean supportsSavepoints() throws SQLException; /** * @since 1.4 */ ! boolean supportsNamedParameters() throws SQLException; /** * @since 1.4 */ ! boolean supportsMultipleOpenResults() throws SQLException; /** * @since 1.4 */ ! boolean supportsGetGeneratedKeys() throws SQLException; /** * @since 1.4 */ ! ResultSet getSuperTypes(String catalog, String schemaPattern, String typeNamePattern) throws SQLException; /** * @since 1.4 */ ! ResultSet getSuperTables(String catalog, String schemaPattern, String tableNamePattern) throws SQLException; /** * @since 1.4 */ ! ResultSet getAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern) throws SQLException; /** * @since 1.4 */ ! boolean supportsResultSetHoldability(int holdability) throws SQLException; /** * @since 1.4 */ ! int getResultSetHoldability() throws SQLException; /** * @since 1.4 */ ! int getDatabaseMajorVersion() throws SQLException; /** * @since 1.4 */ ! int getDatabaseMinorVersion() throws SQLException; /** * @since 1.4 */ ! int getJDBCMajorVersion() throws SQLException; /** * @since 1.4 */ ! int getJDBCMinorVersion() throws SQLException; /** * @since 1.4 */ ! int getSQLStateType() throws SQLException; /** * @since 1.4 */ ! boolean locatorsUpdateCopy() throws SQLException; /** * @since 1.4 */ ! boolean supportsStatementPooling() throws SQLException; } diff -Nrc3pad gcc-3.3.3/libjava/java/sql/Date.java gcc-3.4.0/libjava/java/sql/Date.java *** gcc-3.3.3/libjava/java/sql/Date.java 2002-06-21 05:39:23.000000000 +0000 --- gcc-3.4.0/libjava/java/sql/Date.java 2003-04-19 21:17:50.000000000 +0000 *************** *** 1,5 **** /* Date.java -- Wrapper around java.util.Date ! Copyright (C) 1999, 2000 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Date.java -- Wrapper around java.util.Date ! Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,42 **** --- 37,43 ---- package java.sql; + import java.text.ParseException; import java.text.SimpleDateFormat; /** *************** public class Date extends java.util.Date *** 82,103 **** } /** * This method returns a new instance of this class by parsing a * date in JDBC format into a Java date. * * @param str The string to parse. ! * @return The resulting java.sql.Date value. */ ! public static Date valueOf(String str) { ! try { java.util.Date d = (java.util.Date) sdf.parseObject(str); ! return(new Date(d.getTime())); } ! catch(Exception e) { ! return(null); } } --- 83,176 ---- } /** + * This method always throws an IllegalArgumentException. + * + * @throws IllegalArgumentException when it's called. + * @deprecated + */ + public int getHours() throws IllegalArgumentException + { + throw new IllegalArgumentException(); + } + + /** + * This method always throws an IllegalArgumentException. + * + * @throws IllegalArgumentException when it's called. + * @deprecated + */ + public int getMinutes() throws IllegalArgumentException + { + throw new IllegalArgumentException(); + } + + /** + * This method always throws an IllegalArgumentException. + * + * @throws IllegalArgumentException when it's called. + * @deprecated + */ + public int getSeconds() throws IllegalArgumentException + { + throw new IllegalArgumentException(); + } + + /** + * This method always throws an IllegalArgumentException. + * + * @throws IllegalArgumentException when it's called. + * @deprecated + */ + public void setHours(int newValue) throws IllegalArgumentException + { + throw new IllegalArgumentException(); + } + + /** + * This method always throws an IllegalArgumentException. + * + * @throws IllegalArgumentException when it's called. + * @deprecated + */ + public void setMinutes(int newValue) throws IllegalArgumentException + { + throw new IllegalArgumentException(); + } + + /** + * This method always throws an IllegalArgumentException. + * + * @throws IllegalArgumentException when it's called. + * @deprecated + */ + public void setSeconds(int newValue) throws IllegalArgumentException + { + throw new IllegalArgumentException(); + } + + /** * This method returns a new instance of this class by parsing a * date in JDBC format into a Java date. * * @param str The string to parse. ! * @return The resulting java.sql.Date value. ! * ! * @deprecated */ ! public static Date valueOf (String str) { ! try { java.util.Date d = (java.util.Date) sdf.parseObject(str); ! ! if (d == null) ! throw new IllegalArgumentException(str); ! else ! return new Date(d.getTime()); } ! catch (ParseException e) { ! throw new IllegalArgumentException(str); } } *************** public class Date extends java.util.Date *** 105,113 **** * This method returns this date in JDBC format. * * @return This date as a string. */ public String toString() { ! return(sdf.format(this)); } } --- 178,188 ---- * This method returns this date in JDBC format. * * @return This date as a string. + * + * @deprecated */ public String toString() { ! return sdf.format(this); } } diff -Nrc3pad gcc-3.3.3/libjava/java/sql/Driver.java gcc-3.4.0/libjava/java/sql/Driver.java *** gcc-3.3.3/libjava/java/sql/Driver.java 2002-06-21 05:39:23.000000000 +0000 --- gcc-3.4.0/libjava/java/sql/Driver.java 2003-10-11 18:49:51.000000000 +0000 *************** public interface Driver *** 68,74 **** * connection, or null if the URL is not understood. * @exception SQLException If an error occurs. */ ! public Connection connect(String url, Properties info) throws SQLException; /** * This method tests whether or not the driver believes it can connect to --- 68,74 ---- * connection, or null if the URL is not understood. * @exception SQLException If an error occurs. */ ! Connection connect(String url, Properties info) throws SQLException; /** * This method tests whether or not the driver believes it can connect to *************** public interface Driver *** 81,89 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean acceptsURL(String url) throws SQLException; ! /** * This method returns an array of possible properties that could be * used to connect to the specified database. * --- 81,89 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean acceptsURL(String url) throws SQLException; ! /** * This method returns an array of possible properties that could be * used to connect to the specified database. * *************** public interface Driver *** 94,100 **** * database. This list may be empty. * @exception SQLException If an error occurs. */ ! public DriverPropertyInfo[] getPropertyInfo(String url, Properties properties) throws SQLException; /** --- 94,100 ---- * database. This list may be empty. * @exception SQLException If an error occurs. */ ! DriverPropertyInfo[] getPropertyInfo(String url, Properties properties) throws SQLException; /** *************** public interface Driver *** 102,115 **** * * @return The major version number of the driver. */ ! public int getMajorVersion(); /** * This method returns the minor version number of the driver. * * @return The minor version number of the driver. */ ! public int getMinorVersion(); /** * This method tests whether or not the driver is JDBC compliant. This --- 102,115 ---- * * @return The major version number of the driver. */ ! int getMajorVersion(); /** * This method returns the minor version number of the driver. * * @return The minor version number of the driver. */ ! int getMinorVersion(); /** * This method tests whether or not the driver is JDBC compliant. This *************** public interface Driver *** 119,123 **** * @return true if the driver has been certified JDBC compliant, * false otherwise. */ ! public boolean jdbcCompliant(); } --- 119,123 ---- * @return true if the driver has been certified JDBC compliant, * false otherwise. */ ! boolean jdbcCompliant(); } diff -Nrc3pad gcc-3.3.3/libjava/java/sql/DriverManager.java gcc-3.4.0/libjava/java/sql/DriverManager.java *** gcc-3.3.3/libjava/java/sql/DriverManager.java 2002-06-21 05:39:23.000000000 +0000 --- gcc-3.4.0/libjava/java/sql/DriverManager.java 2003-04-19 21:17:50.000000000 +0000 *************** *** 1,5 **** /* DriverManager.java -- Manage JDBC drivers ! Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* DriverManager.java -- Manage JDBC drivers ! Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** public class DriverManager *** 103,109 **** { Class.forName(driver_classname); // The driver registers itself } ! catch (Exception e) { ; } // Ignore not founds } } --- 103,112 ---- { Class.forName(driver_classname); // The driver registers itself } ! catch (Exception e) ! { ! // Ignore not founds ! } } } *************** public class DriverManager *** 209,217 **** * @param url The JDBC URL string to find a driver for. * * @return A Driver that can connect to the specified ! * URL, or null if a suitable driver cannot be found. * ! * @exception SQLException If an error occurs. */ public static Driver getDriver(String url) throws SQLException { --- 212,220 ---- * @param url The JDBC URL string to find a driver for. * * @return A Driver that can connect to the specified ! * URL. * ! * @exception SQLException If an error occurs, or no suitable driver can be found. */ public static Driver getDriver(String url) throws SQLException { *************** public class DriverManager *** 224,230 **** return d; } ! return null; } /** --- 227,233 ---- return d; } ! throw new SQLException("No driver found for " + url); } /** diff -Nrc3pad gcc-3.3.3/libjava/java/sql/ParameterMetaData.java gcc-3.4.0/libjava/java/sql/ParameterMetaData.java *** gcc-3.3.3/libjava/java/sql/ParameterMetaData.java 2002-06-21 05:39:23.000000000 +0000 --- gcc-3.4.0/libjava/java/sql/ParameterMetaData.java 2003-10-13 05:03:39.000000000 +0000 *************** package java.sql; *** 42,103 **** */ public interface ParameterMetaData { ! public static final int parameterNoNulls = 0; ! public static final int parameterNullable = 1; ! public static final int parameterNullableUnknown = 2; ! public static final int parameterModeUnknown = 0; ! public static final int parameterModeIn = 1; ! public static final int parameterModeInOut = 2; ! public static final int parameterModeOut = 4; /** * @since 1.4 */ ! public int getParameterCount() throws SQLException; /** * @since 1.4 */ ! public int isNullable(int param) throws SQLException; /** * @since 1.4 */ ! public boolean isSigned(int param) throws SQLException; /** * @since 1.4 */ ! public int getPrecision(int param) throws SQLException; /** * @since 1.4 */ ! public int getScale(int param) throws SQLException; /** * @since 1.4 */ ! public int getParameterType(int param) throws SQLException; /** * @since 1.4 */ ! public String getParameterTypeName(int param) throws SQLException; /** * @since 1.4 */ ! public String getParameterClassName(int param) throws SQLException; /** * @since 1.4 */ ! public int getParameterMode(int param) throws SQLException; } --- 42,103 ---- */ public interface ParameterMetaData { ! int parameterNoNulls = 0; ! int parameterNullable = 1; ! int parameterNullableUnknown = 2; ! int parameterModeUnknown = 0; ! int parameterModeIn = 1; ! int parameterModeInOut = 2; ! int parameterModeOut = 4; /** * @since 1.4 */ ! int getParameterCount() throws SQLException; /** * @since 1.4 */ ! int isNullable(int param) throws SQLException; /** * @since 1.4 */ ! boolean isSigned(int param) throws SQLException; /** * @since 1.4 */ ! int getPrecision(int param) throws SQLException; /** * @since 1.4 */ ! int getScale(int param) throws SQLException; /** * @since 1.4 */ ! int getParameterType(int param) throws SQLException; /** * @since 1.4 */ ! String getParameterTypeName(int param) throws SQLException; /** * @since 1.4 */ ! String getParameterClassName(int param) throws SQLException; /** * @since 1.4 */ ! int getParameterMode(int param) throws SQLException; } diff -Nrc3pad gcc-3.3.3/libjava/java/sql/PreparedStatement.java gcc-3.4.0/libjava/java/sql/PreparedStatement.java *** gcc-3.3.3/libjava/java/sql/PreparedStatement.java 2002-06-21 05:39:23.000000000 +0000 --- gcc-3.4.0/libjava/java/sql/PreparedStatement.java 2003-10-13 05:03:39.000000000 +0000 *************** public interface PreparedStatement exten *** 59,65 **** * @return The ResultSet of the SQL statement. * @exception SQLException If an error occurs. */ ! public ResultSet executeQuery() throws SQLException; /** * This method executes an SQL INSERT, UPDATE or DELETE statement. SQL --- 59,65 ---- * @return The ResultSet of the SQL statement. * @exception SQLException If an error occurs. */ ! ResultSet executeQuery() throws SQLException; /** * This method executes an SQL INSERT, UPDATE or DELETE statement. SQL *************** public interface PreparedStatement exten *** 69,75 **** * statements; or 0 for SQL statements that return nothing. * @exception SQLException If an error occurs. */ ! public int executeUpdate() throws SQLException; /** * This method populates the specified parameter with a SQL NULL value --- 69,75 ---- * statements; or 0 for SQL statements that return nothing. * @exception SQLException If an error occurs. */ ! int executeUpdate() throws SQLException; /** * This method populates the specified parameter with a SQL NULL value *************** public interface PreparedStatement exten *** 80,86 **** * * @exception SQLException If an error occurs. */ ! public void setNull(int parameterIndex, int sqlType) throws SQLException; /** * This method sets the specified parameter from the given Java --- 80,86 ---- * * @exception SQLException If an error occurs. */ ! void setNull(int parameterIndex, int sqlType) throws SQLException; /** * This method sets the specified parameter from the given Java *************** public interface PreparedStatement exten *** 90,96 **** * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! public void setBoolean(int parameterIndex, boolean x) throws SQLException; /** * This method sets the specified parameter from the given Java --- 90,96 ---- * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! void setBoolean(int parameterIndex, boolean x) throws SQLException; /** * This method sets the specified parameter from the given Java *************** public interface PreparedStatement exten *** 100,106 **** * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! public void setByte(int parameterIndex, byte x) throws SQLException; /** * This method sets the specified parameter from the given Java --- 100,106 ---- * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! void setByte(int parameterIndex, byte x) throws SQLException; /** * This method sets the specified parameter from the given Java *************** public interface PreparedStatement exten *** 110,116 **** * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! public void setShort(int parameterIndex, short x) throws SQLException; /** * This method sets the specified parameter from the given Java --- 110,116 ---- * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! void setShort(int parameterIndex, short x) throws SQLException; /** * This method sets the specified parameter from the given Java *************** public interface PreparedStatement exten *** 120,126 **** * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! public void setInt(int parameterIndex, int x) throws SQLException; /** * This method sets the specified parameter from the given Java --- 120,126 ---- * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! void setInt(int parameterIndex, int x) throws SQLException; /** * This method sets the specified parameter from the given Java *************** public interface PreparedStatement exten *** 130,136 **** * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! public void setLong(int parameterIndex, long x) throws SQLException; /** * This method sets the specified parameter from the given Java --- 130,136 ---- * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! void setLong(int parameterIndex, long x) throws SQLException; /** * This method sets the specified parameter from the given Java *************** public interface PreparedStatement exten *** 140,146 **** * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! public void setFloat(int parameterIndex, float x) throws SQLException; /** * This method sets the specified parameter from the given Java --- 140,146 ---- * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! void setFloat(int parameterIndex, float x) throws SQLException; /** * This method sets the specified parameter from the given Java *************** public interface PreparedStatement exten *** 150,156 **** * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! public void setDouble(int parameterIndex, double x) throws SQLException; /** * This method sets the specified parameter from the given Java --- 150,156 ---- * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! void setDouble(int parameterIndex, double x) throws SQLException; /** * This method sets the specified parameter from the given Java *************** public interface PreparedStatement exten *** 160,166 **** * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException; /** --- 160,166 ---- * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException; /** *************** public interface PreparedStatement exten *** 171,177 **** * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! public void setString(int parameterIndex, String x) throws SQLException; /** * This method sets the specified parameter from the given Java --- 171,177 ---- * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! void setString(int parameterIndex, String x) throws SQLException; /** * This method sets the specified parameter from the given Java *************** public interface PreparedStatement exten *** 181,187 **** * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! public void setBytes(int parameterIndex, byte[] x) throws SQLException; /** * This method sets the specified parameter from the given Java --- 181,187 ---- * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! void setBytes(int parameterIndex, byte[] x) throws SQLException; /** * This method sets the specified parameter from the given Java *************** public interface PreparedStatement exten *** 191,197 **** * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! public void setDate(int parameterIndex, Date x) throws SQLException; /** * This method sets the specified parameter from the given Java --- 191,197 ---- * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! void setDate(int parameterIndex, Date x) throws SQLException; /** * This method sets the specified parameter from the given Java *************** public interface PreparedStatement exten *** 201,207 **** * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! public void setTime(int parameterIndex, Time x) throws SQLException; /** * This method sets the specified parameter from the given Java --- 201,207 ---- * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! void setTime(int parameterIndex, Time x) throws SQLException; /** * This method sets the specified parameter from the given Java *************** public interface PreparedStatement exten *** 211,217 **** * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException; /** --- 211,217 ---- * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! void setTimestamp(int parameterIndex, Timestamp x) throws SQLException; /** *************** public interface PreparedStatement exten *** 223,229 **** * @param length The number of bytes in the stream. * @exception SQLException If an error occurs. */ ! public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException; /** --- 223,229 ---- * @param length The number of bytes in the stream. * @exception SQLException If an error occurs. */ ! void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException; /** *************** public interface PreparedStatement exten *** 236,242 **** * @exception SQLException If an error occurs. * @deprecated */ ! public void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException; /** --- 236,242 ---- * @exception SQLException If an error occurs. * @deprecated */ ! void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException; /** *************** public interface PreparedStatement exten *** 248,254 **** * @param length The number of bytes in the stream. * @exception SQLException If an error occurs. */ ! public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException; /** --- 248,254 ---- * @param length The number of bytes in the stream. * @exception SQLException If an error occurs. */ ! void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException; /** *************** public interface PreparedStatement exten *** 257,263 **** * * @exception SQLException If an error occurs. */ ! public void clearParameters() throws SQLException; /** * This method sets the specified parameter from the given Java --- 257,263 ---- * * @exception SQLException If an error occurs. */ ! void clearParameters() throws SQLException; /** * This method sets the specified parameter from the given Java *************** public interface PreparedStatement exten *** 270,276 **** * @exception SQLException If an error occurs. * @see Types */ ! public void setObject(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException; /** --- 270,276 ---- * @exception SQLException If an error occurs. * @see Types */ ! void setObject(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException; /** *************** public interface PreparedStatement exten *** 283,289 **** * @exception SQLException If an error occurs. * @see Types */ ! public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException; /** --- 283,289 ---- * @exception SQLException If an error occurs. * @see Types */ ! void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException; /** *************** public interface PreparedStatement exten *** 295,301 **** * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! public void setObject(int parameterIndex, Object x) throws SQLException; /** * This method executes a prepared SQL query. --- 295,301 ---- * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! void setObject(int parameterIndex, Object x) throws SQLException; /** * This method executes a prepared SQL query. *************** public interface PreparedStatement exten *** 306,318 **** * @return The result of the SQL statement. * @exception SQLException If an error occurs. */ ! public boolean execute() throws SQLException; /** * This method adds a set of parameters to the batch for JDBC 2.0. * @exception SQLException If an error occurs. */ ! public void addBatch() throws SQLException; /** * This method sets the specified parameter from the given Java --- 306,318 ---- * @return The result of the SQL statement. * @exception SQLException If an error occurs. */ ! boolean execute() throws SQLException; /** * This method adds a set of parameters to the batch for JDBC 2.0. * @exception SQLException If an error occurs. */ ! void addBatch() throws SQLException; /** * This method sets the specified parameter from the given Java *************** public interface PreparedStatement exten *** 323,329 **** * @param length The number of bytes in the stream. * @exception SQLException If an error occurs. */ ! public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException; /** --- 323,329 ---- * @param length The number of bytes in the stream. * @exception SQLException If an error occurs. */ ! void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException; /** *************** public interface PreparedStatement exten *** 335,341 **** * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! public void setRef(int i, Ref x) throws SQLException; /** * This method sets the specified parameter from the given Java --- 335,341 ---- * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! void setRef(int i, Ref x) throws SQLException; /** * This method sets the specified parameter from the given Java *************** public interface PreparedStatement exten *** 346,352 **** * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! public void setBlob(int i, Blob x) throws SQLException; /** * This method sets the specified parameter from the given Java --- 346,352 ---- * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! void setBlob(int i, Blob x) throws SQLException; /** * This method sets the specified parameter from the given Java *************** public interface PreparedStatement exten *** 357,363 **** * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! public void setClob(int i, Clob x) throws SQLException; /** * This method sets the specified parameter from the given Java --- 357,363 ---- * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! void setClob(int i, Clob x) throws SQLException; /** * This method sets the specified parameter from the given Java *************** public interface PreparedStatement exten *** 368,374 **** * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! public void setArray(int i, Array x) throws SQLException; /** * This method returns meta data for the result set from this statement. --- 368,374 ---- * @param value The value of the parameter. * @exception SQLException If an error occurs. */ ! void setArray(int i, Array x) throws SQLException; /** * This method returns meta data for the result set from this statement. *************** public interface PreparedStatement exten *** 376,382 **** * @return Meta data for the result set from this statement. * @exception SQLException If an error occurs. */ ! public ResultSetMetaData getMetaData() throws SQLException; /** * This method sets the specified parameter from the given Java --- 376,382 ---- * @return Meta data for the result set from this statement. * @exception SQLException If an error occurs. */ ! ResultSetMetaData getMetaData() throws SQLException; /** * This method sets the specified parameter from the given Java *************** public interface PreparedStatement exten *** 387,393 **** * @param calendar The Calendar to use for timezone and locale. * @exception SQLException If an error occurs. */ ! public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException; /** --- 387,393 ---- * @param calendar The Calendar to use for timezone and locale. * @exception SQLException If an error occurs. */ ! void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException; /** *************** public interface PreparedStatement exten *** 399,405 **** * @param calendar The Calendar to use for timezone and locale. * @exception SQLException If an error occurs. */ ! public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException; /** --- 399,405 ---- * @param calendar The Calendar to use for timezone and locale. * @exception SQLException If an error occurs. */ ! void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException; /** *************** public interface PreparedStatement exten *** 411,417 **** * @param calendar The Calendar to use for timezone and locale. * @exception SQLException If an error occurs. */ ! public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException; /** --- 411,417 ---- * @param calendar The Calendar to use for timezone and locale. * @exception SQLException If an error occurs. */ ! void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException; /** *************** public interface PreparedStatement exten *** 423,438 **** * @param name The name of the data type, for user defined types. * @exception SQLException If an error occurs. */ ! public void setNull(int paramIndex, int sqlType, String typeName) throws SQLException; /** * @since 1.4 */ ! public void setURL(int parameterIndex, URL x) throws SQLException; /** * @since 1.4 */ ! public ParameterMetaData getParameterMetaData() throws SQLException; } --- 423,438 ---- * @param name The name of the data type, for user defined types. * @exception SQLException If an error occurs. */ ! void setNull(int paramIndex, int sqlType, String typeName) throws SQLException; /** * @since 1.4 */ ! void setURL(int parameterIndex, URL x) throws SQLException; /** * @since 1.4 */ ! ParameterMetaData getParameterMetaData() throws SQLException; } diff -Nrc3pad gcc-3.3.3/libjava/java/sql/Ref.java gcc-3.4.0/libjava/java/sql/Ref.java *** gcc-3.3.3/libjava/java/sql/Ref.java 2002-06-21 05:39:23.000000000 +0000 --- gcc-3.4.0/libjava/java/sql/Ref.java 2003-10-13 05:03:39.000000000 +0000 *************** public interface Ref *** 56,75 **** * @exception SQLException If an error occurs. * @since 1.2 */ ! public String getBaseTypeName() throws SQLException; /** * @since 1.4 */ ! public Object getObject(Map map) throws SQLException; /** * @since 1.4 */ ! public Object getObject() throws SQLException; /** * @since 1.4 */ ! public void setObject(Object value) throws SQLException; } --- 56,75 ---- * @exception SQLException If an error occurs. * @since 1.2 */ ! String getBaseTypeName() throws SQLException; /** * @since 1.4 */ ! Object getObject(Map map) throws SQLException; /** * @since 1.4 */ ! Object getObject() throws SQLException; /** * @since 1.4 */ ! void setObject(Object value) throws SQLException; } diff -Nrc3pad gcc-3.3.3/libjava/java/sql/ResultSet.java gcc-3.4.0/libjava/java/sql/ResultSet.java *** gcc-3.3.3/libjava/java/sql/ResultSet.java 2002-06-21 05:39:23.000000000 +0000 --- gcc-3.4.0/libjava/java/sql/ResultSet.java 2003-10-11 18:49:51.000000000 +0000 *************** public interface ResultSet *** 64,111 **** /** * The rows will be processed in order from first to last. */ ! public static final int FETCH_FORWARD = 1000; /** * The rows will be processed in order from last to first. */ ! public static final int FETCH_REVERSE = 1001; /** * The rows will be processed in an unknown order */ ! public static final int FETCH_UNKNOWN = 1002; /** * This type of result set may only step forward through the rows returned. */ ! public static final int TYPE_FORWARD_ONLY = 1003; /** * This type of result set is scrollable and is not sensitive to changes * made by other statements. */ ! public static final int TYPE_SCROLL_INSENSITIVE = 1004; /** * This type of result set is scrollable and is also sensitive to changes * made by other statements. */ ! public static final int TYPE_SCROLL_SENSITIVE = 1005; /** * The concurrency mode of for the result set may not be modified. */ ! public static final int CONCUR_READ_ONLY = 1007; /** * The concurrency mode of for the result set may be modified. */ ! public static final int CONCUR_UPDATABLE = 1008; ! public static final int HOLD_CURSORS_OVER_COMMIT = 1; ! public static final int CLOSE_CURSORS_AT_COMMIT = 2; /** * This method advances to the next row in the result set. Any streams --- 64,111 ---- /** * The rows will be processed in order from first to last. */ ! int FETCH_FORWARD = 1000; /** * The rows will be processed in order from last to first. */ ! int FETCH_REVERSE = 1001; /** * The rows will be processed in an unknown order */ ! int FETCH_UNKNOWN = 1002; /** * This type of result set may only step forward through the rows returned. */ ! int TYPE_FORWARD_ONLY = 1003; /** * This type of result set is scrollable and is not sensitive to changes * made by other statements. */ ! int TYPE_SCROLL_INSENSITIVE = 1004; /** * This type of result set is scrollable and is also sensitive to changes * made by other statements. */ ! int TYPE_SCROLL_SENSITIVE = 1005; /** * The concurrency mode of for the result set may not be modified. */ ! int CONCUR_READ_ONLY = 1007; /** * The concurrency mode of for the result set may be modified. */ ! int CONCUR_UPDATABLE = 1008; ! int HOLD_CURSORS_OVER_COMMIT = 1; ! int CLOSE_CURSORS_AT_COMMIT = 2; /** * This method advances to the next row in the result set. Any streams *************** public interface ResultSet *** 115,128 **** * otherwise. * @exception SQLException If an error occurs. */ ! public boolean next() throws SQLException; /** * This method closes the result set and frees any associated resources. * * @exception SQLException If an error occurs. */ ! public void close() throws SQLException; /** * This method tests whether the value of the last column that was fetched --- 115,128 ---- * otherwise. * @exception SQLException If an error occurs. */ ! boolean next() throws SQLException; /** * This method closes the result set and frees any associated resources. * * @exception SQLException If an error occurs. */ ! void close() throws SQLException; /** * This method tests whether the value of the last column that was fetched *************** public interface ResultSet *** 132,138 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean wasNull() throws SQLException; /** * This method returns the value of the specified column as a Java --- 132,138 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean wasNull() throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 142,148 **** * @return The column value as a String. * @exception SQLException If an error occurs. */ ! public String getString(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Java --- 142,148 ---- * @return The column value as a String. * @exception SQLException If an error occurs. */ ! String getString(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 152,158 **** * @return The column value as a boolean. * @exception SQLException If an error occurs. */ ! public boolean getBoolean(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Java --- 152,158 ---- * @return The column value as a boolean. * @exception SQLException If an error occurs. */ ! boolean getBoolean(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 162,168 **** * @return The column value as a byte. * @exception SQLException If an error occurs. */ ! public byte getByte(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Java --- 162,168 ---- * @return The column value as a byte. * @exception SQLException If an error occurs. */ ! byte getByte(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 172,178 **** * @return The column value as a short. * @exception SQLException If an error occurs. */ ! public short getShort(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Java --- 172,178 ---- * @return The column value as a short. * @exception SQLException If an error occurs. */ ! short getShort(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 182,188 **** * @return The column value as a int. * @exception SQLException If an error occurs. */ ! public int getInt(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Java --- 182,188 ---- * @return The column value as a int. * @exception SQLException If an error occurs. */ ! int getInt(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 192,198 **** * @return The column value as a long. * @exception SQLException If an error occurs. */ ! public long getLong(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Java --- 192,198 ---- * @return The column value as a long. * @exception SQLException If an error occurs. */ ! long getLong(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 202,208 **** * @return The column value as a float. * @exception SQLException If an error occurs. */ ! public float getFloat(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Java --- 202,208 ---- * @return The column value as a float. * @exception SQLException If an error occurs. */ ! float getFloat(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 212,218 **** * @return The column value as a double. * @exception SQLException If an error occurs. */ ! public double getDouble(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Java --- 212,218 ---- * @return The column value as a double. * @exception SQLException If an error occurs. */ ! double getDouble(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 224,230 **** * @exception SQLException If an error occurs. * @deprecated */ ! public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException; /** --- 224,230 ---- * @exception SQLException If an error occurs. * @deprecated */ ! BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException; /** *************** public interface ResultSet *** 235,241 **** * @return The column value as a byte array * @exception SQLException If an error occurs. */ ! public byte[] getBytes(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Java --- 235,241 ---- * @return The column value as a byte array * @exception SQLException If an error occurs. */ ! byte[] getBytes(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 245,251 **** * @return The column value as a java.sql.Date. * @exception SQLException If an error occurs. */ ! public Date getDate(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Java --- 245,251 ---- * @return The column value as a java.sql.Date. * @exception SQLException If an error occurs. */ ! Date getDate(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 255,261 **** * @return The column value as a java.sql.Time. * @exception SQLException If an error occurs. */ ! public Time getTime(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Java --- 255,261 ---- * @return The column value as a java.sql.Time. * @exception SQLException If an error occurs. */ ! Time getTime(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 265,271 **** * @return The column value as a java.sql.Timestamp. * @exception SQLException If an error occurs. */ ! public Timestamp getTimestamp(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as an ASCII --- 265,271 ---- * @return The column value as a java.sql.Timestamp. * @exception SQLException If an error occurs. */ ! Timestamp getTimestamp(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as an ASCII *************** public interface ResultSet *** 278,284 **** * @return The column value as an ASCII InputStream. * @exception SQLException If an error occurs. */ ! public InputStream getAsciiStream(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Unicode UTF-8 --- 278,284 ---- * @return The column value as an ASCII InputStream. * @exception SQLException If an error occurs. */ ! InputStream getAsciiStream(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Unicode UTF-8 *************** public interface ResultSet *** 292,298 **** * @exception SQLException If an error occurs. * @deprecated Use getCharacterStream instead. */ ! public InputStream getUnicodeStream(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a raw byte --- 292,298 ---- * @exception SQLException If an error occurs. * @deprecated Use getCharacterStream instead. */ ! InputStream getUnicodeStream(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a raw byte *************** public interface ResultSet *** 305,311 **** * @return The column value as a raw byte InputStream. * @exception SQLException If an error occurs. */ ! public InputStream getBinaryStream(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Java --- 305,311 ---- * @return The column value as a raw byte InputStream. * @exception SQLException If an error occurs. */ ! InputStream getBinaryStream(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 315,321 **** * @return The column value as a String. * @exception SQLException If an error occurs. */ ! public String getString(String columnName) throws SQLException; /** * This method returns the value of the specified column as a Java --- 315,321 ---- * @return The column value as a String. * @exception SQLException If an error occurs. */ ! String getString(String columnName) throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 325,331 **** * @return The column value as a boolean. * @exception SQLException If an error occurs. */ ! public boolean getBoolean(String columnName) throws SQLException; /** * This method returns the value of the specified column as a Java --- 325,331 ---- * @return The column value as a boolean. * @exception SQLException If an error occurs. */ ! boolean getBoolean(String columnName) throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 335,341 **** * @return The column value as a byte. * @exception SQLException If an error occurs. */ ! public byte getByte(String columnName) throws SQLException; /** * This method returns the value of the specified column as a Java --- 335,341 ---- * @return The column value as a byte. * @exception SQLException If an error occurs. */ ! byte getByte(String columnName) throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 345,351 **** * @return The column value as a short. * @exception SQLException If an error occurs. */ ! public short getShort(String columnName) throws SQLException; /** * This method returns the value of the specified column as a Java --- 345,351 ---- * @return The column value as a short. * @exception SQLException If an error occurs. */ ! short getShort(String columnName) throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 355,361 **** * @return The column value as a int. * @exception SQLException If an error occurs. */ ! public int getInt(String columnName) throws SQLException; /** * This method returns the value of the specified column as a Java --- 355,361 ---- * @return The column value as a int. * @exception SQLException If an error occurs. */ ! int getInt(String columnName) throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 365,371 **** * @return The column value as a long. * @exception SQLException If an error occurs. */ ! public long getLong(String columnName) throws SQLException; /** * This method returns the value of the specified column as a Java --- 365,371 ---- * @return The column value as a long. * @exception SQLException If an error occurs. */ ! long getLong(String columnName) throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 375,381 **** * @return The column value as a float. * @exception SQLException If an error occurs. */ ! public float getFloat(String columnName) throws SQLException; /** * This method returns the value of the specified column as a Java --- 375,381 ---- * @return The column value as a float. * @exception SQLException If an error occurs. */ ! float getFloat(String columnName) throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 385,391 **** * @return The column value as a double. * @exception SQLException If an error occurs. */ ! public double getDouble(String columnName) throws SQLException; /** * This method returns the value of the specified column as a Java --- 385,391 ---- * @return The column value as a double. * @exception SQLException If an error occurs. */ ! double getDouble(String columnName) throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 396,402 **** * @exception SQLException If an error occurs. * @deprecated */ ! public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException; /** --- 396,402 ---- * @exception SQLException If an error occurs. * @deprecated */ ! BigDecimal getBigDecimal(String columnName, int scale) throws SQLException; /** *************** public interface ResultSet *** 407,413 **** * @return The column value as a byte array * @exception SQLException If an error occurs. */ ! public byte[] getBytes(String columnName) throws SQLException; /** * This method returns the value of the specified column as a Java --- 407,413 ---- * @return The column value as a byte array * @exception SQLException If an error occurs. */ ! byte[] getBytes(String columnName) throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 417,423 **** * @return The column value as a java.sql.Date. * @exception SQLException If an error occurs. */ ! public Date getDate(String columnName) throws SQLException; /** * This method returns the value of the specified column as a Java --- 417,423 ---- * @return The column value as a java.sql.Date. * @exception SQLException If an error occurs. */ ! Date getDate(String columnName) throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 427,433 **** * @return The column value as a java.sql.Time. * @exception SQLException If an error occurs. */ ! public Time getTime(String columnName) throws SQLException; /** * This method returns the value of the specified column as a Java --- 427,433 ---- * @return The column value as a java.sql.Time. * @exception SQLException If an error occurs. */ ! Time getTime(String columnName) throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 437,443 **** * @return The column value as a java.sql.Timestamp. * @exception SQLException If an error occurs. */ ! public Timestamp getTimestamp(String columnName) throws SQLException; /** * This method returns the value of the specified column as an ASCII --- 437,443 ---- * @return The column value as a java.sql.Timestamp. * @exception SQLException If an error occurs. */ ! Timestamp getTimestamp(String columnName) throws SQLException; /** * This method returns the value of the specified column as an ASCII *************** public interface ResultSet *** 450,456 **** * @return The column value as an ASCII InputStream. * @exception SQLException If an error occurs. */ ! public InputStream getAsciiStream(String columnName) throws SQLException; /** * This method returns the value of the specified column as a Unicode UTF-8 --- 450,456 ---- * @return The column value as an ASCII InputStream. * @exception SQLException If an error occurs. */ ! InputStream getAsciiStream(String columnName) throws SQLException; /** * This method returns the value of the specified column as a Unicode UTF-8 *************** public interface ResultSet *** 464,470 **** * @exception SQLException If an error occurs. * @deprecated Use getCharacterStream instead. */ ! public InputStream getUnicodeStream(String columnName) throws SQLException; /** * This method returns the value of the specified column as a raw byte --- 464,470 ---- * @exception SQLException If an error occurs. * @deprecated Use getCharacterStream instead. */ ! InputStream getUnicodeStream(String columnName) throws SQLException; /** * This method returns the value of the specified column as a raw byte *************** public interface ResultSet *** 477,483 **** * @return The column value as a raw byte InputStream. * @exception SQLException If an error occurs. */ ! public InputStream getBinaryStream(String columnName) throws SQLException; /** * This method returns the first SQL warning associated with this result --- 477,483 ---- * @return The column value as a raw byte InputStream. * @exception SQLException If an error occurs. */ ! InputStream getBinaryStream(String columnName) throws SQLException; /** * This method returns the first SQL warning associated with this result *************** public interface ResultSet *** 487,500 **** * there are no warnings. * @exception SQLException If an error occurs. */ ! public SQLWarning getWarnings() throws SQLException; /** * This method clears all warnings associated with this result set. * * @exception SQLException If an error occurs. */ ! public void clearWarnings() throws SQLException; /** * This method returns the name of the database cursor used by this --- 487,500 ---- * there are no warnings. * @exception SQLException If an error occurs. */ ! SQLWarning getWarnings() throws SQLException; /** * This method clears all warnings associated with this result set. * * @exception SQLException If an error occurs. */ ! void clearWarnings() throws SQLException; /** * This method returns the name of the database cursor used by this *************** public interface ResultSet *** 503,509 **** * @return The name of the database cursor used by this result set. * @exception SQLException If an error occurs. */ ! public String getCursorName() throws SQLException; /** * This method returns data about the columns returned as part of the --- 503,509 ---- * @return The name of the database cursor used by this result set. * @exception SQLException If an error occurs. */ ! String getCursorName() throws SQLException; /** * This method returns data about the columns returned as part of the *************** public interface ResultSet *** 512,518 **** * @return The ResultSetMetaData instance for this result set. * @exception SQLException If an error occurs. */ ! public ResultSetMetaData getMetaData() throws SQLException; /** * This method returns the value of the specified column as a Java --- 512,518 ---- * @return The ResultSetMetaData instance for this result set. * @exception SQLException If an error occurs. */ ! ResultSetMetaData getMetaData() throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 522,528 **** * @return The column value as an Object. * @exception SQLException If an error occurs. */ ! public Object getObject(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Java --- 522,528 ---- * @return The column value as an Object. * @exception SQLException If an error occurs. */ ! Object getObject(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 532,538 **** * @return The column value as an Object. * @exception SQLException If an error occurs. */ ! public Object getObject(String columnName) throws SQLException; /** * This method returns the column index of the specified named column. --- 532,538 ---- * @return The column value as an Object. * @exception SQLException If an error occurs. */ ! Object getObject(String columnName) throws SQLException; /** * This method returns the column index of the specified named column. *************** public interface ResultSet *** 541,547 **** * @return The index of the column. * @exception SQLException If an error occurs. */ ! public int findColumn(String columnName) throws SQLException; /** * This method returns the value of the specified column as a character --- 541,547 ---- * @return The index of the column. * @exception SQLException If an error occurs. */ ! int findColumn(String columnName) throws SQLException; /** * This method returns the value of the specified column as a character *************** public interface ResultSet *** 554,560 **** * @return The column value as an character Reader. * @exception SQLException If an error occurs. */ ! public Reader getCharacterStream(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a character --- 554,560 ---- * @return The column value as an character Reader. * @exception SQLException If an error occurs. */ ! Reader getCharacterStream(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a character *************** public interface ResultSet *** 567,573 **** * @return The column value as an character Reader. * @exception SQLException If an error occurs. */ ! public Reader getCharacterStream(String columnName) throws SQLException; /** * This method returns the value of the specified column as a Java --- 567,573 ---- * @return The column value as an character Reader. * @exception SQLException If an error occurs. */ ! Reader getCharacterStream(String columnName) throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 577,583 **** * @return The column value as a BigDecimal. * @exception SQLException If an error occurs. */ ! public BigDecimal getBigDecimal(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Java --- 577,583 ---- * @return The column value as a BigDecimal. * @exception SQLException If an error occurs. */ ! BigDecimal getBigDecimal(int columnIndex) throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 587,593 **** * @return The column value as a BigDecimal. * @exception SQLException If an error occurs. */ ! public BigDecimal getBigDecimal(String columnName) throws SQLException; /** * This method tests whether or not the cursor is before the first row --- 587,593 ---- * @return The column value as a BigDecimal. * @exception SQLException If an error occurs. */ ! BigDecimal getBigDecimal(String columnName) throws SQLException; /** * This method tests whether or not the cursor is before the first row *************** public interface ResultSet *** 597,603 **** * row, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean isBeforeFirst() throws SQLException; /** * This method tests whether or not the cursor is after the last row --- 597,603 ---- * row, false otherwise. * @exception SQLException If an error occurs. */ ! boolean isBeforeFirst() throws SQLException; /** * This method tests whether or not the cursor is after the last row *************** public interface ResultSet *** 607,613 **** * row, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean isAfterLast() throws SQLException; /** * This method tests whether or not the cursor is positioned on the first --- 607,613 ---- * row, false otherwise. * @exception SQLException If an error occurs. */ ! boolean isAfterLast() throws SQLException; /** * This method tests whether or not the cursor is positioned on the first *************** public interface ResultSet *** 617,623 **** * row, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean isFirst() throws SQLException; /** * This method tests whether or not the cursor is on the last row --- 617,623 ---- * row, false otherwise. * @exception SQLException If an error occurs. */ ! boolean isFirst() throws SQLException; /** * This method tests whether or not the cursor is on the last row *************** public interface ResultSet *** 627,633 **** * row, false otherwise. * @exception SQLException If an error occurs. */ ! public boolean isLast() throws SQLException; /** * This method repositions the cursor to before the first row in the --- 627,633 ---- * row, false otherwise. * @exception SQLException If an error occurs. */ ! boolean isLast() throws SQLException; /** * This method repositions the cursor to before the first row in the *************** public interface ResultSet *** 635,641 **** * * @exception SQLException If an error occurs. */ ! public void beforeFirst() throws SQLException; /** * This method repositions the cursor to after the last row in the result --- 635,641 ---- * * @exception SQLException If an error occurs. */ ! void beforeFirst() throws SQLException; /** * This method repositions the cursor to after the last row in the result *************** public interface ResultSet *** 643,649 **** * * @exception SQLException If an error occurs. */ ! public void afterLast() throws SQLException; /** * This method repositions the cursor on the first row in the --- 643,649 ---- * * @exception SQLException If an error occurs. */ ! void afterLast() throws SQLException; /** * This method repositions the cursor on the first row in the *************** public interface ResultSet *** 653,659 **** * false if there are no rows in the result set. * @exception SQLException If an error occurs. */ ! public boolean first() throws SQLException; /** * This method repositions the cursor on the last row in the result --- 653,659 ---- * false if there are no rows in the result set. * @exception SQLException If an error occurs. */ ! boolean first() throws SQLException; /** * This method repositions the cursor on the last row in the result *************** public interface ResultSet *** 663,669 **** * false if there are no rows in the result set. * @exception SQLException If an error occurs. */ ! public boolean last() throws SQLException; /** * This method returns the current row number in the cursor. Numbering --- 663,669 ---- * false if there are no rows in the result set. * @exception SQLException If an error occurs. */ ! boolean last() throws SQLException; /** * This method returns the current row number in the cursor. Numbering *************** public interface ResultSet *** 672,678 **** * @return The current row number, or 0 if there is not current row. * @exception SQLException If an error occurs. */ ! public int getRow() throws SQLException; /** * This method positions the result set to the specified absolute row. --- 672,678 ---- * @return The current row number, or 0 if there is not current row. * @exception SQLException If an error occurs. */ ! int getRow() throws SQLException; /** * This method positions the result set to the specified absolute row. *************** public interface ResultSet *** 686,692 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean absolute(int row) throws SQLException; /** * This method moves the result set position relative to the current row. --- 686,692 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean absolute(int row) throws SQLException; /** * This method moves the result set position relative to the current row. *************** public interface ResultSet *** 697,703 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean relative(int rows) throws SQLException; /** * This method moves the current position to the previous row in the --- 697,703 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean relative(int rows) throws SQLException; /** * This method moves the current position to the previous row in the *************** public interface ResultSet *** 707,713 **** * otherwise. * @exception SQLException If an error occurs. */ ! public boolean previous() throws SQLException; /** * This method provides a hint to the driver about which direction the --- 707,713 ---- * otherwise. * @exception SQLException If an error occurs. */ ! boolean previous() throws SQLException; /** * This method provides a hint to the driver about which direction the *************** public interface ResultSet *** 716,722 **** * @param direction The direction in which rows will be processed. (Values?) * @exception SQLException If an error occurs. */ ! public void setFetchDirection(int direction) throws SQLException; /** * This method returns the current fetch direction for this result set. --- 716,722 ---- * @param direction The direction in which rows will be processed. (Values?) * @exception SQLException If an error occurs. */ ! void setFetchDirection(int direction) throws SQLException; /** * This method returns the current fetch direction for this result set. *************** public interface ResultSet *** 724,730 **** * @return The fetch direction for this result set. * @exception SQLException If an error occurs. */ ! public int getFetchDirection() throws SQLException; /** * This method provides a hint to the driver about how many rows at a --- 724,730 ---- * @return The fetch direction for this result set. * @exception SQLException If an error occurs. */ ! int getFetchDirection() throws SQLException; /** * This method provides a hint to the driver about how many rows at a *************** public interface ResultSet *** 733,739 **** * @param rows The number of rows the driver should fetch per call. * @exception SQLException If an error occurs. */ ! public void setFetchSize(int rows) throws SQLException; /** * This method returns the current number of rows that will be fetched --- 733,739 ---- * @param rows The number of rows the driver should fetch per call. * @exception SQLException If an error occurs. */ ! void setFetchSize(int rows) throws SQLException; /** * This method returns the current number of rows that will be fetched *************** public interface ResultSet *** 742,748 **** * @return The current fetch size for this result set. * @exception SQLException If an error occurs. */ ! public int getFetchSize() throws SQLException; /** * This method returns the result set type of this result set. This will --- 742,748 ---- * @return The current fetch size for this result set. * @exception SQLException If an error occurs. */ ! int getFetchSize() throws SQLException; /** * This method returns the result set type of this result set. This will *************** public interface ResultSet *** 751,757 **** * @return The result set type. * @exception SQLException If an error occurs. */ ! public int getType() throws SQLException; /** * This method returns the concurrency type of this result set. This will --- 751,757 ---- * @return The result set type. * @exception SQLException If an error occurs. */ ! int getType() throws SQLException; /** * This method returns the concurrency type of this result set. This will *************** public interface ResultSet *** 760,766 **** * @return The result set concurrency type. * @exception SQLException If an error occurs. */ ! public int getConcurrency() throws SQLException; /** * This method tests whether or not the current row in the result set --- 760,766 ---- * @return The result set concurrency type. * @exception SQLException If an error occurs. */ ! int getConcurrency() throws SQLException; /** * This method tests whether or not the current row in the result set *************** public interface ResultSet *** 771,777 **** * otherwise. * @exception SQLException If an error occurs. */ ! public boolean rowUpdated() throws SQLException; /** * This method tests whether or not the current row in the result set --- 771,777 ---- * otherwise. * @exception SQLException If an error occurs. */ ! boolean rowUpdated() throws SQLException; /** * This method tests whether or not the current row in the result set *************** public interface ResultSet *** 782,788 **** * otherwise. * @exception SQLException If an error occurs. */ ! public boolean rowInserted() throws SQLException; /** * This method tests whether or not the current row in the result set --- 782,788 ---- * otherwise. * @exception SQLException If an error occurs. */ ! boolean rowInserted() throws SQLException; /** * This method tests whether or not the current row in the result set *************** public interface ResultSet *** 793,799 **** * otherwise. * @exception SQLException If an error occurs. */ ! public boolean rowDeleted() throws SQLException; /** * This method updates the specified column to have a NULL value. This --- 793,799 ---- * otherwise. * @exception SQLException If an error occurs. */ ! boolean rowDeleted() throws SQLException; /** * This method updates the specified column to have a NULL value. This *************** public interface ResultSet *** 803,809 **** * @return index The index of the column to update. * @exception SQLException If an error occurs. */ ! public void updateNull(int columnIndex) throws SQLException; /** * This method updates the specified column to have a boolean value. This --- 803,809 ---- * @return index The index of the column to update. * @exception SQLException If an error occurs. */ ! void updateNull(int columnIndex) throws SQLException; /** * This method updates the specified column to have a boolean value. This *************** public interface ResultSet *** 814,820 **** * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! public void updateBoolean(int columnIndex, boolean x) throws SQLException; /** * This method updates the specified column to have a byte value. This --- 814,820 ---- * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! void updateBoolean(int columnIndex, boolean x) throws SQLException; /** * This method updates the specified column to have a byte value. This *************** public interface ResultSet *** 825,831 **** * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! public void updateByte(int columnIndex, byte x) throws SQLException; /** * This method updates the specified column to have a short value. This --- 825,831 ---- * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! void updateByte(int columnIndex, byte x) throws SQLException; /** * This method updates the specified column to have a short value. This *************** public interface ResultSet *** 836,842 **** * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! public void updateShort(int columnIndex, short x) throws SQLException; /** * This method updates the specified column to have an int value. This --- 836,842 ---- * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! void updateShort(int columnIndex, short x) throws SQLException; /** * This method updates the specified column to have an int value. This *************** public interface ResultSet *** 847,853 **** * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! public void updateInt(int columnIndex, int x) throws SQLException; /** * This method updates the specified column to have a long value. This --- 847,853 ---- * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! void updateInt(int columnIndex, int x) throws SQLException; /** * This method updates the specified column to have a long value. This *************** public interface ResultSet *** 858,864 **** * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! public void updateLong(int columnIndex, long x) throws SQLException; /** * This method updates the specified column to have a float value. This --- 858,864 ---- * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! void updateLong(int columnIndex, long x) throws SQLException; /** * This method updates the specified column to have a float value. This *************** public interface ResultSet *** 869,875 **** * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! public void updateFloat(int columnIndex, float x) throws SQLException; /** * This method updates the specified column to have a double value. This --- 869,875 ---- * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! void updateFloat(int columnIndex, float x) throws SQLException; /** * This method updates the specified column to have a double value. This *************** public interface ResultSet *** 880,886 **** * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! public void updateDouble(int columnIndex, double x) throws SQLException; /** * This method updates the specified column to have a BigDecimal value. This --- 880,886 ---- * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! void updateDouble(int columnIndex, double x) throws SQLException; /** * This method updates the specified column to have a BigDecimal value. This *************** public interface ResultSet *** 891,897 **** * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException; /** --- 891,897 ---- * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException; /** *************** public interface ResultSet *** 903,909 **** * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! public void updateString(int columnIndex, String x) throws SQLException; /** * This method updates the specified column to have a byte array value. This --- 903,909 ---- * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! void updateString(int columnIndex, String x) throws SQLException; /** * This method updates the specified column to have a byte array value. This *************** public interface ResultSet *** 914,920 **** * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! public void updateBytes(int columnIndex, byte[] x) throws SQLException; /** * This method updates the specified column to have a java.sql.Date value. This --- 914,920 ---- * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! void updateBytes(int columnIndex, byte[] x) throws SQLException; /** * This method updates the specified column to have a java.sql.Date value. This *************** public interface ResultSet *** 925,931 **** * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! public void updateDate(int columnIndex, Date x) throws SQLException; /** * This method updates the specified column to have a java.sql.Time value. This --- 925,931 ---- * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! void updateDate(int columnIndex, Date x) throws SQLException; /** * This method updates the specified column to have a java.sql.Time value. This *************** public interface ResultSet *** 936,942 **** * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! public void updateTime(int columnIndex, Time x) throws SQLException; /** * This method updates the specified column to have a java.sql.Timestamp value. --- 936,942 ---- * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! void updateTime(int columnIndex, Time x) throws SQLException; /** * This method updates the specified column to have a java.sql.Timestamp value. *************** public interface ResultSet *** 947,953 **** * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException; /** --- 947,953 ---- * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! void updateTimestamp(int columnIndex, Timestamp x) throws SQLException; /** *************** public interface ResultSet *** 960,966 **** * @param length The length of the stream. * @exception SQLException If an error occurs. */ ! public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException; /** --- 960,966 ---- * @param length The length of the stream. * @exception SQLException If an error occurs. */ ! void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException; /** *************** public interface ResultSet *** 973,979 **** * @param length The length of the stream. * @exception SQLException If an error occurs. */ ! public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException; /** --- 973,979 ---- * @param length The length of the stream. * @exception SQLException If an error occurs. */ ! void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException; /** *************** public interface ResultSet *** 986,992 **** * @param length The length of the stream. * @exception SQLException If an error occurs. */ ! public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException; /** --- 986,992 ---- * @param length The length of the stream. * @exception SQLException If an error occurs. */ ! void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException; /** *************** public interface ResultSet *** 999,1005 **** * * @exception SQLException If an error occurs. */ ! public void updateObject(int columnIndex, Object x, int scale) throws SQLException; /** --- 999,1005 ---- * * @exception SQLException If an error occurs. */ ! void updateObject(int columnIndex, Object x, int scale) throws SQLException; /** *************** public interface ResultSet *** 1013,1019 **** * for numeric type objects. * @exception SQLException If an error occurs. */ ! public void updateObject(int columnIndex, Object x) throws SQLException; /** * This method updates the specified column to have a NULL value. This --- 1013,1019 ---- * for numeric type objects. * @exception SQLException If an error occurs. */ ! void updateObject(int columnIndex, Object x) throws SQLException; /** * This method updates the specified column to have a NULL value. This *************** public interface ResultSet *** 1023,1029 **** * @return name The name of the column to update. * @exception SQLException If an error occurs. */ ! public void updateNull(String columnName) throws SQLException; /** * This method updates the specified column to have a boolean value. This --- 1023,1029 ---- * @return name The name of the column to update. * @exception SQLException If an error occurs. */ ! void updateNull(String columnName) throws SQLException; /** * This method updates the specified column to have a boolean value. This *************** public interface ResultSet *** 1034,1040 **** * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! public void updateBoolean(String columnName, boolean x) throws SQLException; /** * This method updates the specified column to have a byte value. This --- 1034,1040 ---- * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! void updateBoolean(String columnName, boolean x) throws SQLException; /** * This method updates the specified column to have a byte value. This *************** public interface ResultSet *** 1045,1051 **** * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! public void updateByte(String columnName, byte x) throws SQLException; /** * This method updates the specified column to have a short value. This --- 1045,1051 ---- * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! void updateByte(String columnName, byte x) throws SQLException; /** * This method updates the specified column to have a short value. This *************** public interface ResultSet *** 1056,1062 **** * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! public void updateShort(String columnName, short x) throws SQLException; /** * This method updates the specified column to have an int value. This --- 1056,1062 ---- * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! void updateShort(String columnName, short x) throws SQLException; /** * This method updates the specified column to have an int value. This *************** public interface ResultSet *** 1067,1073 **** * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! public void updateInt(String columnName, int x) throws SQLException; /** * This method updates the specified column to have a long value. This --- 1067,1073 ---- * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! void updateInt(String columnName, int x) throws SQLException; /** * This method updates the specified column to have a long value. This *************** public interface ResultSet *** 1078,1084 **** * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! public void updateLong(String columnName, long x) throws SQLException; /** * This method updates the specified column to have a float value. This --- 1078,1084 ---- * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! void updateLong(String columnName, long x) throws SQLException; /** * This method updates the specified column to have a float value. This *************** public interface ResultSet *** 1089,1095 **** * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! public void updateFloat(String columnName, float x) throws SQLException; /** * This method updates the specified column to have a double value. This --- 1089,1095 ---- * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! void updateFloat(String columnName, float x) throws SQLException; /** * This method updates the specified column to have a double value. This *************** public interface ResultSet *** 1100,1106 **** * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! public void updateDouble(String columnName, double x) throws SQLException; /** * This method updates the specified column to have a BigDecimal value. This --- 1100,1106 ---- * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! void updateDouble(String columnName, double x) throws SQLException; /** * This method updates the specified column to have a BigDecimal value. This *************** public interface ResultSet *** 1111,1117 **** * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! public void updateBigDecimal(String columnName, BigDecimal x) throws SQLException; /** --- 1111,1117 ---- * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! void updateBigDecimal(String columnName, BigDecimal x) throws SQLException; /** *************** public interface ResultSet *** 1123,1129 **** * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! public void updateString(String columnName, String x) throws SQLException; /** * This method updates the specified column to have a byte array value. This --- 1123,1129 ---- * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! void updateString(String columnName, String x) throws SQLException; /** * This method updates the specified column to have a byte array value. This *************** public interface ResultSet *** 1134,1140 **** * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! public void updateBytes(String columnName, byte[] x) throws SQLException; /** * This method updates the specified column to have a java.sql.Date value. This --- 1134,1140 ---- * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! void updateBytes(String columnName, byte[] x) throws SQLException; /** * This method updates the specified column to have a java.sql.Date value. This *************** public interface ResultSet *** 1145,1151 **** * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! public void updateDate(String columnName, Date x) throws SQLException; /** * This method updates the specified column to have a java.sql.Time value. This --- 1145,1151 ---- * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! void updateDate(String columnName, Date x) throws SQLException; /** * This method updates the specified column to have a java.sql.Time value. This *************** public interface ResultSet *** 1156,1162 **** * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! public void updateTime(String columnName, Time x) throws SQLException; /** * This method updates the specified column to have a java.sql.Timestamp value. --- 1156,1162 ---- * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! void updateTime(String columnName, Time x) throws SQLException; /** * This method updates the specified column to have a java.sql.Timestamp value. *************** public interface ResultSet *** 1167,1173 **** * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! public void updateTimestamp(String columnName, Timestamp x) throws SQLException; /** --- 1167,1173 ---- * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! void updateTimestamp(String columnName, Timestamp x) throws SQLException; /** *************** public interface ResultSet *** 1180,1186 **** * @param length The length of the stream. * @exception SQLException If an error occurs. */ ! public void updateAsciiStream(String columnName, InputStream x, int length) throws SQLException; /** --- 1180,1186 ---- * @param length The length of the stream. * @exception SQLException If an error occurs. */ ! void updateAsciiStream(String columnName, InputStream x, int length) throws SQLException; /** *************** public interface ResultSet *** 1193,1199 **** * @param length The length of the stream. * @exception SQLException If an error occurs. */ ! public void updateBinaryStream(String columnName, InputStream x, int length) throws SQLException; /** --- 1193,1199 ---- * @param length The length of the stream. * @exception SQLException If an error occurs. */ ! void updateBinaryStream(String columnName, InputStream x, int length) throws SQLException; /** *************** public interface ResultSet *** 1207,1213 **** * * @exception SQLException If an error occurs. */ ! public void updateCharacterStream(String columnName, Reader reader, int length) throws SQLException; /** --- 1207,1213 ---- * * @exception SQLException If an error occurs. */ ! void updateCharacterStream(String columnName, Reader reader, int length) throws SQLException; /** *************** public interface ResultSet *** 1219,1225 **** * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! public void updateObject(String columnName, Object x, int scale) throws SQLException; /** --- 1219,1225 ---- * @param value The new value of the column. * @exception SQLException If an error occurs. */ ! void updateObject(String columnName, Object x, int scale) throws SQLException; /** *************** public interface ResultSet *** 1233,1239 **** * for numeric type objects. * @exception SQLException If an error occurs. */ ! public void updateObject(String columnName, Object x) throws SQLException; /** * This method inserts the current row into the database. The result set --- 1233,1239 ---- * for numeric type objects. * @exception SQLException If an error occurs. */ ! void updateObject(String columnName, Object x) throws SQLException; /** * This method inserts the current row into the database. The result set *************** public interface ResultSet *** 1242,1269 **** * * @exception SQLException If an error occurs. */ ! public void insertRow() throws SQLException; /** * This method updates the current row in the database. * * @exception SQLException If an error occurs. */ ! public void updateRow() throws SQLException; /** * This method deletes the current row in the database. * * @exception SQLException If an error occurs. */ ! public void deleteRow() throws SQLException; /** * This method refreshes the contents of the current row from the database. * * @exception SQLException If an error occurs. */ ! public void refreshRow() throws SQLException; /** * This method cancels any changes that have been made to a row. If --- 1242,1269 ---- * * @exception SQLException If an error occurs. */ ! void insertRow() throws SQLException; /** * This method updates the current row in the database. * * @exception SQLException If an error occurs. */ ! void updateRow() throws SQLException; /** * This method deletes the current row in the database. * * @exception SQLException If an error occurs. */ ! void deleteRow() throws SQLException; /** * This method refreshes the contents of the current row from the database. * * @exception SQLException If an error occurs. */ ! void refreshRow() throws SQLException; /** * This method cancels any changes that have been made to a row. If *************** public interface ResultSet *** 1272,1278 **** * * @exception SQLException If an error occurs. */ ! public void cancelRowUpdates() throws SQLException; /** * This method positions the result set to the "insert row", which allows --- 1272,1278 ---- * * @exception SQLException If an error occurs. */ ! void cancelRowUpdates() throws SQLException; /** * This method positions the result set to the "insert row", which allows *************** public interface ResultSet *** 1280,1286 **** * * @exception SQLException If an error occurs. */ ! public void moveToInsertRow() throws SQLException; /** * This method moves the result set position from the insert row back to --- 1280,1286 ---- * * @exception SQLException If an error occurs. */ ! void moveToInsertRow() throws SQLException; /** * This method moves the result set position from the insert row back to *************** public interface ResultSet *** 1288,1294 **** * * @exception SQLException If an error occurs. */ ! public void moveToCurrentRow() throws SQLException; /** * This method returns a the Statement that was used to --- 1288,1294 ---- * * @exception SQLException If an error occurs. */ ! void moveToCurrentRow() throws SQLException; /** * This method returns a the Statement that was used to *************** public interface ResultSet *** 1298,1304 **** * * @exception SQLException If an error occurs. */ ! public Statement getStatement() throws SQLException; /** * This method returns the value of the specified column as a Java --- 1298,1304 ---- * * @exception SQLException If an error occurs. */ ! Statement getStatement() throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 1309,1315 **** * @return The value of the column as an Object. * @exception SQLException If an error occurs. */ ! public Object getObject(int i, Map map) throws SQLException; /** * This method returns a Ref for the specified column which --- 1309,1315 ---- * @return The value of the column as an Object. * @exception SQLException If an error occurs. */ ! Object getObject(int i, Map map) throws SQLException; /** * This method returns a Ref for the specified column which *************** public interface ResultSet *** 1319,1325 **** * @return A Ref object for the column * @exception SQLException If an error occurs. */ ! public Ref getRef(int i) throws SQLException; /** * This method returns the specified column value as a BLOB. --- 1319,1325 ---- * @return A Ref object for the column * @exception SQLException If an error occurs. */ ! Ref getRef(int i) throws SQLException; /** * This method returns the specified column value as a BLOB. *************** public interface ResultSet *** 1328,1334 **** * @return The value of the column as a BLOB. * @exception SQLException If an error occurs. */ ! public Blob getBlob(int i) throws SQLException; /** * This method returns the specified column value as a CLOB. --- 1328,1334 ---- * @return The value of the column as a BLOB. * @exception SQLException If an error occurs. */ ! Blob getBlob(int i) throws SQLException; /** * This method returns the specified column value as a CLOB. *************** public interface ResultSet *** 1337,1343 **** * @return The value of the column as a CLOB. * @exception SQLException If an error occurs. */ ! public Clob getClob(int i) throws SQLException; /** * This method returns the specified column value as an Array. --- 1337,1343 ---- * @return The value of the column as a CLOB. * @exception SQLException If an error occurs. */ ! Clob getClob(int i) throws SQLException; /** * This method returns the specified column value as an Array. *************** public interface ResultSet *** 1346,1352 **** * @return The value of the column as an Array. * @exception SQLException If an error occurs. */ ! public Array getArray(int i) throws SQLException; /** * This method returns the value of the specified column as a Java --- 1346,1352 ---- * @return The value of the column as an Array. * @exception SQLException If an error occurs. */ ! Array getArray(int i) throws SQLException; /** * This method returns the value of the specified column as a Java *************** public interface ResultSet *** 1357,1363 **** * @return The value of the column as an Object. * @exception SQLException If an error occurs. */ ! public Object getObject(String colName, Map map) throws SQLException; /** * This method returns a Ref for the specified column which --- 1357,1363 ---- * @return The value of the column as an Object. * @exception SQLException If an error occurs. */ ! Object getObject(String colName, Map map) throws SQLException; /** * This method returns a Ref for the specified column which *************** public interface ResultSet *** 1367,1373 **** * @return A Ref object for the column * @exception SQLException If an error occurs. */ ! public Ref getRef(String colName) throws SQLException; /** * This method returns the specified column value as a BLOB. --- 1367,1373 ---- * @return A Ref object for the column * @exception SQLException If an error occurs. */ ! Ref getRef(String colName) throws SQLException; /** * This method returns the specified column value as a BLOB. *************** public interface ResultSet *** 1376,1382 **** * @return The value of the column as a BLOB. * @exception SQLException If an error occurs. */ ! public Blob getBlob(String colName) throws SQLException; /** * This method returns the specified column value as a CLOB. --- 1376,1382 ---- * @return The value of the column as a BLOB. * @exception SQLException If an error occurs. */ ! Blob getBlob(String colName) throws SQLException; /** * This method returns the specified column value as a CLOB. *************** public interface ResultSet *** 1385,1391 **** * @return The value of the column as a CLOB. * @exception SQLException If an error occurs. */ ! public Clob getClob(String colName) throws SQLException; /** * This method returns the specified column value as an Array. --- 1385,1391 ---- * @return The value of the column as a CLOB. * @exception SQLException If an error occurs. */ ! Clob getClob(String colName) throws SQLException; /** * This method returns the specified column value as an Array. *************** public interface ResultSet *** 1394,1400 **** * @return The value of the column as an Array. * @exception SQLException If an error occurs. */ ! public Array getArray(String colName) throws SQLException; /** * This method returns the specified column value as a --- 1394,1400 ---- * @return The value of the column as an Array. * @exception SQLException If an error occurs. */ ! Array getArray(String colName) throws SQLException; /** * This method returns the specified column value as a *************** public interface ResultSet *** 1407,1413 **** * @return The value of the column as a java.sql.Date. * @exception SQLException If an error occurs. */ ! public Date getDate(int columnIndex, Calendar cal) throws SQLException; /** * This method returns the specified column value as a --- 1407,1413 ---- * @return The value of the column as a java.sql.Date. * @exception SQLException If an error occurs. */ ! Date getDate(int columnIndex, Calendar cal) throws SQLException; /** * This method returns the specified column value as a *************** public interface ResultSet *** 1420,1426 **** * @return The value of the column as a java.sql.Date. * @exception SQLException If an error occurs. */ ! public Date getDate(String columnName, Calendar cal) throws SQLException; /** * This method returns the specified column value as a --- 1420,1426 ---- * @return The value of the column as a java.sql.Date. * @exception SQLException If an error occurs. */ ! Date getDate(String columnName, Calendar cal) throws SQLException; /** * This method returns the specified column value as a *************** public interface ResultSet *** 1433,1439 **** * @return The value of the column as a java.sql.Time. * @exception SQLException If an error occurs. */ ! public Time getTime(int columnIndex, Calendar cal) throws SQLException; /** * This method returns the specified column value as a --- 1433,1439 ---- * @return The value of the column as a java.sql.Time. * @exception SQLException If an error occurs. */ ! Time getTime(int columnIndex, Calendar cal) throws SQLException; /** * This method returns the specified column value as a *************** public interface ResultSet *** 1446,1452 **** * @return The value of the column as a java.sql.Time. * @exception SQLException If an error occurs. */ ! public Time getTime(String columnName, Calendar cal) throws SQLException; /** * This method returns the specified column value as a --- 1446,1452 ---- * @return The value of the column as a java.sql.Time. * @exception SQLException If an error occurs. */ ! Time getTime(String columnName, Calendar cal) throws SQLException; /** * This method returns the specified column value as a *************** public interface ResultSet *** 1459,1465 **** * @return The value of the column as a java.sql.Timestamp. * @exception SQLException If an error occurs. */ ! public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException; /** --- 1459,1465 ---- * @return The value of the column as a java.sql.Timestamp. * @exception SQLException If an error occurs. */ ! Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException; /** *************** public interface ResultSet *** 1475,1530 **** * * @exception SQLException If an error occurs. */ ! public Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException; /** * @since 1.4 */ ! public URL getURL(int columnIndex) throws SQLException; /** * @since 1.4 */ ! public URL getURL(String columnName) throws SQLException; /** * @since 1.4 */ ! public void updateRef(int columnIndex, Ref x) throws SQLException; /** * @since 1.4 */ ! public void updateRef(String columnName, Ref x) throws SQLException; /** * @since 1.4 */ ! public void updateBlob(int columnIndex, Blob x) throws SQLException; /** * @since 1.4 */ ! public void updateBlob(String columnName, Blob x) throws SQLException; /** * @since 1.4 */ ! public void updateClob(int columnIndex, Clob x) throws SQLException; /** * @since 1.4 */ ! public void updateClob(String columnName, Clob x) throws SQLException; /** * @since 1.4 */ ! public void updateArray(int columnIndex, Array x) throws SQLException; /** * @since 1.4 */ ! public void updateArray(String columnName, Array x) throws SQLException; } --- 1475,1530 ---- * * @exception SQLException If an error occurs. */ ! Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException; /** * @since 1.4 */ ! URL getURL(int columnIndex) throws SQLException; /** * @since 1.4 */ ! URL getURL(String columnName) throws SQLException; /** * @since 1.4 */ ! void updateRef(int columnIndex, Ref x) throws SQLException; /** * @since 1.4 */ ! void updateRef(String columnName, Ref x) throws SQLException; /** * @since 1.4 */ ! void updateBlob(int columnIndex, Blob x) throws SQLException; /** * @since 1.4 */ ! void updateBlob(String columnName, Blob x) throws SQLException; /** * @since 1.4 */ ! void updateClob(int columnIndex, Clob x) throws SQLException; /** * @since 1.4 */ ! void updateClob(String columnName, Clob x) throws SQLException; /** * @since 1.4 */ ! void updateArray(int columnIndex, Array x) throws SQLException; /** * @since 1.4 */ ! void updateArray(String columnName, Array x) throws SQLException; } diff -Nrc3pad gcc-3.3.3/libjava/java/sql/ResultSetMetaData.java gcc-3.4.0/libjava/java/sql/ResultSetMetaData.java *** gcc-3.3.3/libjava/java/sql/ResultSetMetaData.java 2002-06-21 05:39:23.000000000 +0000 --- gcc-3.4.0/libjava/java/sql/ResultSetMetaData.java 2003-10-11 18:49:51.000000000 +0000 *************** public interface ResultSetMetaData *** 51,67 **** /** * The column does not allow NULL's. */ ! public static final int columnNoNulls = 0; /** * The column allows NULL's. */ ! public static final int columnNullable = 1; /** * It is unknown whether or not the column allows NULL's. */ ! public static final int columnNullableUnknown = 2; /** * This method returns the number of columns in the result set. --- 51,67 ---- /** * The column does not allow NULL's. */ ! int columnNoNulls = 0; /** * The column allows NULL's. */ ! int columnNullable = 1; /** * It is unknown whether or not the column allows NULL's. */ ! int columnNullableUnknown = 2; /** * This method returns the number of columns in the result set. *************** public interface ResultSetMetaData *** 69,75 **** * @return The number of columns in the result set. * @exception SQLException If an error occurs. */ ! public int getColumnCount() throws SQLException; /** * This method test whether or not the column is an auto-increment column. --- 69,75 ---- * @return The number of columns in the result set. * @exception SQLException If an error occurs. */ ! int getColumnCount() throws SQLException; /** * This method test whether or not the column is an auto-increment column. *************** public interface ResultSetMetaData *** 80,86 **** * otherwise. * @exception SQLException If an error occurs. */ ! public boolean isAutoIncrement(int column) throws SQLException; /** * This method tests whether or not a column is case sensitive in its values. --- 80,86 ---- * otherwise. * @exception SQLException If an error occurs. */ ! boolean isAutoIncrement(int column) throws SQLException; /** * This method tests whether or not a column is case sensitive in its values. *************** public interface ResultSetMetaData *** 90,96 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean isCaseSensitive(int column) throws SQLException; /** * This method tests whether not the specified column can be used in --- 90,96 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean isCaseSensitive(int column) throws SQLException; /** * This method tests whether not the specified column can be used in *************** public interface ResultSetMetaData *** 101,107 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean isSearchable(int column) throws SQLException; /** * This method tests whether or not the column stores a monetary value. --- 101,107 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean isSearchable(int column) throws SQLException; /** * This method tests whether or not the column stores a monetary value. *************** public interface ResultSetMetaData *** 111,117 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean isCurrency(int column) throws SQLException; /** * This method returns a value indicating whether or not the specified --- 111,117 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean isCurrency(int column) throws SQLException; /** * This method returns a value indicating whether or not the specified *************** public interface ResultSetMetaData *** 123,129 **** * columnNullable, or columnNullableUnknown. * @exception SQLException If an error occurs. */ ! public int isNullable(int column) throws SQLException; /** * This method tests whether or not the value of the specified column --- 123,129 ---- * columnNullable, or columnNullableUnknown. * @exception SQLException If an error occurs. */ ! int isNullable(int column) throws SQLException; /** * This method tests whether or not the value of the specified column *************** public interface ResultSetMetaData *** 134,140 **** * otherwise. * @exception SQLException If an error occurs. */ ! public boolean isSigned(int column) throws SQLException; /** * This method returns the maximum number of characters that can be used --- 134,140 ---- * otherwise. * @exception SQLException If an error occurs. */ ! boolean isSigned(int column) throws SQLException; /** * This method returns the maximum number of characters that can be used *************** public interface ResultSetMetaData *** 145,151 **** * value for this column. * @exception SQLException If an error occurs. */ ! public int getColumnDisplaySize(int column) throws SQLException; /** * This method returns a string that should be used as a caption for this --- 145,151 ---- * value for this column. * @exception SQLException If an error occurs. */ ! int getColumnDisplaySize(int column) throws SQLException; /** * This method returns a string that should be used as a caption for this *************** public interface ResultSetMetaData *** 155,161 **** * @return A display string for the column. * @exception SQLException If an error occurs. */ ! public String getColumnLabel(int column) throws SQLException; /** * This method returns the name of the specified column. --- 155,161 ---- * @return A display string for the column. * @exception SQLException If an error occurs. */ ! String getColumnLabel(int column) throws SQLException; /** * This method returns the name of the specified column. *************** public interface ResultSetMetaData *** 164,170 **** * @return The name of the column. * @exception SQLException If an error occurs. */ ! public String getColumnName(int column) throws SQLException; /** * This method returns the name of the schema that contains the specified --- 164,170 ---- * @return The name of the column. * @exception SQLException If an error occurs. */ ! String getColumnName(int column) throws SQLException; /** * This method returns the name of the schema that contains the specified *************** public interface ResultSetMetaData *** 174,180 **** * @return The name of the schema that contains the column. * @exception SQLException If an error occurs. */ ! public String getSchemaName(int column) throws SQLException; /** * This method returns the precision of the specified column, which is the --- 174,180 ---- * @return The name of the schema that contains the column. * @exception SQLException If an error occurs. */ ! String getSchemaName(int column) throws SQLException; /** * This method returns the precision of the specified column, which is the *************** public interface ResultSetMetaData *** 184,190 **** * @return The precision of the specified column. * @exception SQLException If an error occurs. */ ! public int getPrecision(int column) throws SQLException; /** * This method returns the scale of the specified column, which is the --- 184,190 ---- * @return The precision of the specified column. * @exception SQLException If an error occurs. */ ! int getPrecision(int column) throws SQLException; /** * This method returns the scale of the specified column, which is the *************** public interface ResultSetMetaData *** 194,200 **** * @return The scale of the column. * @exception SQLException If an error occurs. */ ! public int getScale(int column) throws SQLException; /** * This method returns the name of the table containing the specified --- 194,200 ---- * @return The scale of the column. * @exception SQLException If an error occurs. */ ! int getScale(int column) throws SQLException; /** * This method returns the name of the table containing the specified *************** public interface ResultSetMetaData *** 204,210 **** * @return The name of the table containing the column. * @exception SQLException If an error occurs. */ ! public String getTableName(int column) throws SQLException; /** * This method returns the name of the catalog containing the specified --- 204,210 ---- * @return The name of the table containing the column. * @exception SQLException If an error occurs. */ ! String getTableName(int column) throws SQLException; /** * This method returns the name of the catalog containing the specified *************** public interface ResultSetMetaData *** 214,220 **** * @return The name of the catalog containing the column. * @exception SQLException If an error occurs. */ ! public String getCatalogName(int column) throws SQLException; /** * This method returns the SQL type of the specified column. This will --- 214,220 ---- * @return The name of the catalog containing the column. * @exception SQLException If an error occurs. */ ! String getCatalogName(int column) throws SQLException; /** * This method returns the SQL type of the specified column. This will *************** public interface ResultSetMetaData *** 225,231 **** * @exception SQLException If an error occurs. * @see Types */ ! public int getColumnType(int column) throws SQLException; /** * This method returns the name of the SQL type for this column. --- 225,231 ---- * @exception SQLException If an error occurs. * @see Types */ ! int getColumnType(int column) throws SQLException; /** * This method returns the name of the SQL type for this column. *************** public interface ResultSetMetaData *** 234,240 **** * @return The name of the SQL type for this column. * @exception SQLException If an error occurs. */ ! public String getColumnTypeName(int column) throws SQLException; /** * This method tests whether or not the specified column is read only. --- 234,240 ---- * @return The name of the SQL type for this column. * @exception SQLException If an error occurs. */ ! String getColumnTypeName(int column) throws SQLException; /** * This method tests whether or not the specified column is read only. *************** public interface ResultSetMetaData *** 244,250 **** * otherwise. * @exception SQLException If an error occurs. */ ! public boolean isReadOnly(int column) throws SQLException; /** * This method tests whether or not the column may be writable. This --- 244,250 ---- * otherwise. * @exception SQLException If an error occurs. */ ! boolean isReadOnly(int column) throws SQLException; /** * This method tests whether or not the column may be writable. This *************** public interface ResultSetMetaData *** 255,261 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean isWritable(int column) throws SQLException; /** * This method tests whether or not the column is writable. This --- 255,261 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean isWritable(int column) throws SQLException; /** * This method tests whether or not the column is writable. This *************** public interface ResultSetMetaData *** 266,272 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean isDefinitelyWritable(int column) throws SQLException; /** * This method returns the name of the Java class which will be used to --- 266,272 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean isDefinitelyWritable(int column) throws SQLException; /** * This method returns the name of the Java class which will be used to *************** public interface ResultSetMetaData *** 277,281 **** * this column. * @exception SQLException If an error occurs. */ ! public String getColumnClassName(int column) throws SQLException; } --- 277,281 ---- * this column. * @exception SQLException If an error occurs. */ ! String getColumnClassName(int column) throws SQLException; } diff -Nrc3pad gcc-3.3.3/libjava/java/sql/Savepoint.java gcc-3.4.0/libjava/java/sql/Savepoint.java *** gcc-3.3.3/libjava/java/sql/Savepoint.java 2002-06-21 05:39:24.000000000 +0000 --- gcc-3.4.0/libjava/java/sql/Savepoint.java 2003-10-11 18:49:51.000000000 +0000 *************** public interface Savepoint *** 46,55 **** /** * @since 1.4 */ ! public int getSavepointId() throws SQLException; /** * @since 1.4 */ ! public String getSavepointName() throws SQLException; } --- 46,55 ---- /** * @since 1.4 */ ! int getSavepointId() throws SQLException; /** * @since 1.4 */ ! String getSavepointName() throws SQLException; } diff -Nrc3pad gcc-3.3.3/libjava/java/sql/SQLData.java gcc-3.4.0/libjava/java/sql/SQLData.java *** gcc-3.3.3/libjava/java/sql/SQLData.java 2002-06-21 05:39:23.000000000 +0000 --- gcc-3.4.0/libjava/java/sql/SQLData.java 2003-10-11 18:49:51.000000000 +0000 *************** public interface SQLData *** 51,57 **** * @return The user defined data type name for this object. * @exception SQLException If an error occurs. */ ! public String getSQLTypeName() throws SQLException; /** * This method populates the data in the object from the specified stream. --- 51,57 ---- * @return The user defined data type name for this object. * @exception SQLException If an error occurs. */ ! String getSQLTypeName() throws SQLException; /** * This method populates the data in the object from the specified stream. *************** public interface SQLData *** 60,66 **** * @param name The data type name of the data on the stream. * @exception SQLException If an error occurs. */ ! public void readSQL(SQLInput stream, String typeName) throws SQLException; /** * This method writes the data in this object to the specified stream. --- 60,66 ---- * @param name The data type name of the data on the stream. * @exception SQLException If an error occurs. */ ! void readSQL(SQLInput stream, String typeName) throws SQLException; /** * This method writes the data in this object to the specified stream. *************** public interface SQLData *** 68,72 **** * @param stream The stream to write the data to. * @exception SQLException If an error occurs. */ ! public void writeSQL(SQLOutput stream) throws SQLException; } --- 68,72 ---- * @param stream The stream to write the data to. * @exception SQLException If an error occurs. */ ! void writeSQL(SQLOutput stream) throws SQLException; } diff -Nrc3pad gcc-3.3.3/libjava/java/sql/SQLInput.java gcc-3.4.0/libjava/java/sql/SQLInput.java *** gcc-3.3.3/libjava/java/sql/SQLInput.java 2002-06-21 05:39:24.000000000 +0000 --- gcc-3.4.0/libjava/java/sql/SQLInput.java 2003-10-11 18:49:51.000000000 +0000 *************** public interface SQLInput *** 59,65 **** * @return The value read from the stream as a String. * @exception SQLException If an error occurs. */ ! public String readString() throws SQLException; /** * This method reads the next item from the stream a Java --- 59,65 ---- * @return The value read from the stream as a String. * @exception SQLException If an error occurs. */ ! String readString() throws SQLException; /** * This method reads the next item from the stream a Java *************** public interface SQLInput *** 68,74 **** * @return The value read from the stream as a boolean. * @exception SQLException If an error occurs. */ ! public boolean readBoolean() throws SQLException; /** * This method reads the next item from the stream a Java --- 68,74 ---- * @return The value read from the stream as a boolean. * @exception SQLException If an error occurs. */ ! boolean readBoolean() throws SQLException; /** * This method reads the next item from the stream a Java *************** public interface SQLInput *** 77,83 **** * @return The value read from the stream as a byte. * @exception SQLException If an error occurs. */ ! public byte readByte() throws SQLException; /** * This method reads the next item from the stream a Java --- 77,83 ---- * @return The value read from the stream as a byte. * @exception SQLException If an error occurs. */ ! byte readByte() throws SQLException; /** * This method reads the next item from the stream a Java *************** public interface SQLInput *** 86,92 **** * @return The value read from the stream as a short. * @exception SQLException If an error occurs. */ ! public short readShort() throws SQLException; /** * This method reads the next item from the stream a Java --- 86,92 ---- * @return The value read from the stream as a short. * @exception SQLException If an error occurs. */ ! short readShort() throws SQLException; /** * This method reads the next item from the stream a Java *************** public interface SQLInput *** 95,101 **** * @return The value read from the stream as an int. * @exception SQLException If an error occurs. */ ! public int readInt() throws SQLException; /** * This method reads the next item from the stream a Java --- 95,101 ---- * @return The value read from the stream as an int. * @exception SQLException If an error occurs. */ ! int readInt() throws SQLException; /** * This method reads the next item from the stream a Java *************** public interface SQLInput *** 104,110 **** * @return The value read from the stream as a long. * @exception SQLException If an error occurs. */ ! public long readLong() throws SQLException; /** * This method reads the next item from the stream a Java --- 104,110 ---- * @return The value read from the stream as a long. * @exception SQLException If an error occurs. */ ! long readLong() throws SQLException; /** * This method reads the next item from the stream a Java *************** public interface SQLInput *** 113,119 **** * @return The value read from the stream as a float. * @exception SQLException If an error occurs. */ ! public float readFloat() throws SQLException; /** * This method reads the next item from the stream a Java --- 113,119 ---- * @return The value read from the stream as a float. * @exception SQLException If an error occurs. */ ! float readFloat() throws SQLException; /** * This method reads the next item from the stream a Java *************** public interface SQLInput *** 122,128 **** * @return The value read from the stream as a double. * @exception SQLException If an error occurs. */ ! public double readDouble() throws SQLException; /** * This method reads the next item from the stream a Java --- 122,128 ---- * @return The value read from the stream as a double. * @exception SQLException If an error occurs. */ ! double readDouble() throws SQLException; /** * This method reads the next item from the stream a Java *************** public interface SQLInput *** 131,137 **** * @return The value read from the stream as a BigDecimal. * @exception SQLException If an error occurs. */ ! public BigDecimal readBigDecimal() throws SQLException; /** * This method reads the next item from the stream a Java --- 131,137 ---- * @return The value read from the stream as a BigDecimal. * @exception SQLException If an error occurs. */ ! BigDecimal readBigDecimal() throws SQLException; /** * This method reads the next item from the stream a Java *************** public interface SQLInput *** 140,146 **** * @return The value read from the stream as a byte array. * @exception SQLException If an error occurs. */ ! public byte[] readBytes() throws SQLException; /** * This method reads the next item from the stream a Java --- 140,146 ---- * @return The value read from the stream as a byte array. * @exception SQLException If an error occurs. */ ! byte[] readBytes() throws SQLException; /** * This method reads the next item from the stream a Java *************** public interface SQLInput *** 149,155 **** * @return The value read from the stream as a java.sql.Date. * @exception SQLException If an error occurs. */ ! public Date readDate() throws SQLException; /** * This method reads the next item from the stream a Java --- 149,155 ---- * @return The value read from the stream as a java.sql.Date. * @exception SQLException If an error occurs. */ ! Date readDate() throws SQLException; /** * This method reads the next item from the stream a Java *************** public interface SQLInput *** 158,164 **** * @return The value read from the stream as a java.sql.Time. * @exception SQLException If an error occurs. */ ! public Time readTime() throws SQLException; /** * This method reads the next item from the stream a Java --- 158,164 ---- * @return The value read from the stream as a java.sql.Time. * @exception SQLException If an error occurs. */ ! Time readTime() throws SQLException; /** * This method reads the next item from the stream a Java *************** public interface SQLInput *** 167,173 **** * @return The value read from the stream as a java.sql.Timestamp. * @exception SQLException If an error occurs. */ ! public Timestamp readTimestamp() throws SQLException; /** * This method reads the next item from the stream a character --- 167,173 ---- * @return The value read from the stream as a java.sql.Timestamp. * @exception SQLException If an error occurs. */ ! Timestamp readTimestamp() throws SQLException; /** * This method reads the next item from the stream a character *************** public interface SQLInput *** 176,182 **** * @return The value read from the stream as a Reader. * @exception SQLException If an error occurs. */ ! public Reader readCharacterStream() throws SQLException; /** * This method reads the next item from the stream a ASCII text --- 176,182 ---- * @return The value read from the stream as a Reader. * @exception SQLException If an error occurs. */ ! Reader readCharacterStream() throws SQLException; /** * This method reads the next item from the stream a ASCII text *************** public interface SQLInput *** 185,191 **** * @return The value read from the stream as an InputStream. * @exception SQLException If an error occurs. */ ! public InputStream readAsciiStream() throws SQLException; /** * This method reads the next item from the stream a binary --- 185,191 ---- * @return The value read from the stream as an InputStream. * @exception SQLException If an error occurs. */ ! InputStream readAsciiStream() throws SQLException; /** * This method reads the next item from the stream a binary *************** public interface SQLInput *** 194,200 **** * @return The value read from the stream as an InputStream. * @exception SQLException If an error occurs. */ ! public InputStream readBinaryStream() throws SQLException; /** * This method reads the next item from the stream a Java --- 194,200 ---- * @return The value read from the stream as an InputStream. * @exception SQLException If an error occurs. */ ! InputStream readBinaryStream() throws SQLException; /** * This method reads the next item from the stream a Java *************** public interface SQLInput *** 203,209 **** * @return The value read from the stream as an Object. * @exception SQLException If an error occurs. */ ! public Object readObject() throws SQLException; /** * This method reads the next item from the stream a Java SQL --- 203,209 ---- * @return The value read from the stream as an Object. * @exception SQLException If an error occurs. */ ! Object readObject() throws SQLException; /** * This method reads the next item from the stream a Java SQL *************** public interface SQLInput *** 212,218 **** * @return The value read from the stream as an Ref. * @exception SQLException If an error occurs. */ ! public Ref readRef() throws SQLException; /** * This method reads the next item from the stream a Java SQL --- 212,218 ---- * @return The value read from the stream as an Ref. * @exception SQLException If an error occurs. */ ! Ref readRef() throws SQLException; /** * This method reads the next item from the stream a Java SQL *************** public interface SQLInput *** 221,227 **** * @return The value read from the stream as a Blob. * @exception SQLException If an error occurs. */ ! public Blob readBlob() throws SQLException; /** * This method reads the next item from the stream a Java SQL --- 221,227 ---- * @return The value read from the stream as a Blob. * @exception SQLException If an error occurs. */ ! Blob readBlob() throws SQLException; /** * This method reads the next item from the stream a Java SQL *************** public interface SQLInput *** 230,236 **** * @return The value read from the stream as a Clob. * @exception SQLException If an error occurs. */ ! public Clob readClob() throws SQLException; /** * This method reads the next item from the stream a Java SQL --- 230,236 ---- * @return The value read from the stream as a Clob. * @exception SQLException If an error occurs. */ ! Clob readClob() throws SQLException; /** * This method reads the next item from the stream a Java SQL *************** public interface SQLInput *** 239,245 **** * @return The value read from the stream as an Array. * @exception SQLException If an error occurs. */ ! public Array readArray() throws SQLException; /** * This method tests whether or not the last value read was a SQL --- 239,245 ---- * @return The value read from the stream as an Array. * @exception SQLException If an error occurs. */ ! Array readArray() throws SQLException; /** * This method tests whether or not the last value read was a SQL *************** public interface SQLInput *** 249,259 **** * false otherwise. * @exception SQLException If an error occurs. */ ! public boolean wasNull() throws SQLException; /** * @since 1.4 */ ! public URL readURL() throws SQLException; } --- 249,259 ---- * false otherwise. * @exception SQLException If an error occurs. */ ! boolean wasNull() throws SQLException; /** * @since 1.4 */ ! URL readURL() throws SQLException; } diff -Nrc3pad gcc-3.3.3/libjava/java/sql/SQLOutput.java gcc-3.4.0/libjava/java/sql/SQLOutput.java *** gcc-3.3.3/libjava/java/sql/SQLOutput.java 2002-06-21 05:39:24.000000000 +0000 --- gcc-3.4.0/libjava/java/sql/SQLOutput.java 2003-10-11 18:49:51.000000000 +0000 *************** public interface SQLOutput *** 59,65 **** * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! public void writeString(String x) throws SQLException; /** * This method writes the specified Java boolean --- 59,65 ---- * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! void writeString(String x) throws SQLException; /** * This method writes the specified Java boolean *************** public interface SQLOutput *** 68,74 **** * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! public void writeBoolean(boolean x) throws SQLException; /** * This method writes the specified Java byte --- 68,74 ---- * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! void writeBoolean(boolean x) throws SQLException; /** * This method writes the specified Java byte *************** public interface SQLOutput *** 77,83 **** * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! public void writeByte(byte x) throws SQLException; /** * This method writes the specified Java short --- 77,83 ---- * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! void writeByte(byte x) throws SQLException; /** * This method writes the specified Java short *************** public interface SQLOutput *** 86,92 **** * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! public void writeShort(short x) throws SQLException; /** * This method writes the specified Java int --- 86,92 ---- * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! void writeShort(short x) throws SQLException; /** * This method writes the specified Java int *************** public interface SQLOutput *** 95,101 **** * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! public void writeInt(int x) throws SQLException; /** * This method writes the specified Java long --- 95,101 ---- * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! void writeInt(int x) throws SQLException; /** * This method writes the specified Java long *************** public interface SQLOutput *** 104,110 **** * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! public void writeLong(long x) throws SQLException; /** * This method writes the specified Java float --- 104,110 ---- * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! void writeLong(long x) throws SQLException; /** * This method writes the specified Java float *************** public interface SQLOutput *** 113,119 **** * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! public void writeFloat(float x) throws SQLException; /** * This method writes the specified Java double --- 113,119 ---- * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! void writeFloat(float x) throws SQLException; /** * This method writes the specified Java double *************** public interface SQLOutput *** 122,128 **** * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! public void writeDouble(double x) throws SQLException; /** * This method writes the specified Java BigDecimal --- 122,128 ---- * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! void writeDouble(double x) throws SQLException; /** * This method writes the specified Java BigDecimal *************** public interface SQLOutput *** 131,137 **** * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! public void writeBigDecimal(BigDecimal x) throws SQLException; /** * This method writes the specified Java byte array --- 131,137 ---- * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! void writeBigDecimal(BigDecimal x) throws SQLException; /** * This method writes the specified Java byte array *************** public interface SQLOutput *** 140,146 **** * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! public void writeBytes(byte[] x) throws SQLException; /** * This method writes the specified Java java.sql.Date --- 140,146 ---- * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! void writeBytes(byte[] x) throws SQLException; /** * This method writes the specified Java java.sql.Date *************** public interface SQLOutput *** 149,155 **** * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! public void writeDate(Date x) throws SQLException; /** * This method writes the specified Java java.sql.Time --- 149,155 ---- * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! void writeDate(Date x) throws SQLException; /** * This method writes the specified Java java.sql.Time *************** public interface SQLOutput *** 158,164 **** * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! public void writeTime(Time x) throws SQLException; /** * This method writes the specified Java java.sql.Timestamp --- 158,164 ---- * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! void writeTime(Time x) throws SQLException; /** * This method writes the specified Java java.sql.Timestamp *************** public interface SQLOutput *** 167,173 **** * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! public void writeTimestamp(Timestamp x) throws SQLException; /** * This method writes the specified Java character stream --- 167,173 ---- * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! void writeTimestamp(Timestamp x) throws SQLException; /** * This method writes the specified Java character stream *************** public interface SQLOutput *** 176,182 **** * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! public void writeCharacterStream(Reader x) throws SQLException; /** * This method writes the specified ASCII text stream --- 176,182 ---- * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! void writeCharacterStream(Reader x) throws SQLException; /** * This method writes the specified ASCII text stream *************** public interface SQLOutput *** 185,191 **** * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! public void writeAsciiStream(InputStream x) throws SQLException; /** * This method writes the specified uninterpreted binary byte stream --- 185,191 ---- * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! void writeAsciiStream(InputStream x) throws SQLException; /** * This method writes the specified uninterpreted binary byte stream *************** public interface SQLOutput *** 194,200 **** * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! public void writeBinaryStream(InputStream x) throws SQLException; /** * This method writes the specified Java SQLData object --- 194,200 ---- * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! void writeBinaryStream(InputStream x) throws SQLException; /** * This method writes the specified Java SQLData object *************** public interface SQLOutput *** 203,209 **** * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! public void writeObject(SQLData x) throws SQLException; /** * This method writes the specified Java SQL Ref object --- 203,209 ---- * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! void writeObject(SQLData x) throws SQLException; /** * This method writes the specified Java SQL Ref object *************** public interface SQLOutput *** 212,218 **** * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! public void writeRef(Ref x) throws SQLException; /** * This method writes the specified Java SQL Blob object --- 212,218 ---- * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! void writeRef(Ref x) throws SQLException; /** * This method writes the specified Java SQL Blob object *************** public interface SQLOutput *** 221,227 **** * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! public void writeBlob(Blob x) throws SQLException; /** * This method writes the specified Java SQL Clob object --- 221,227 ---- * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! void writeBlob(Blob x) throws SQLException; /** * This method writes the specified Java SQL Clob object *************** public interface SQLOutput *** 230,236 **** * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! public void writeClob(Clob x) throws SQLException; /** * This method writes the specified Java SQL Struct object --- 230,236 ---- * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! void writeClob(Clob x) throws SQLException; /** * This method writes the specified Java SQL Struct object *************** public interface SQLOutput *** 239,245 **** * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! public void writeStruct(Struct x) throws SQLException; /** * This method writes the specified Java SQL Array object --- 239,245 ---- * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! void writeStruct(Struct x) throws SQLException; /** * This method writes the specified Java SQL Array object *************** public interface SQLOutput *** 248,257 **** * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! public void writeArray(Array x) throws SQLException; /** * @since 1.4 */ ! public void writeURL(URL x) throws SQLException; } --- 248,257 ---- * @param value The value to write to the stream. * @exception SQLException If an error occurs. */ ! void writeArray(Array x) throws SQLException; /** * @since 1.4 */ ! void writeURL(URL x) throws SQLException; } diff -Nrc3pad gcc-3.3.3/libjava/java/sql/Statement.java gcc-3.4.0/libjava/java/sql/Statement.java *** gcc-3.3.3/libjava/java/sql/Statement.java 2002-06-21 05:39:24.000000000 +0000 --- gcc-3.4.0/libjava/java/sql/Statement.java 2003-10-11 18:49:51.000000000 +0000 *************** package java.sql; *** 45,57 **** */ public interface Statement { ! public static final int CLOSE_CURRENT_RESULT = 1; ! public static final int KEEP_CURRENT_RESULT = 2; ! public static final int CLOSE_ALL_RESULTS = 3; ! public static final int SUCCESS_NO_INFO = -2; ! public static final int EXECUTE_FAILED = -3; ! public static final int RETURN_GENERATED_KEYS = 1; ! public static final int NO_GENERATED_KEYS = 2; /** * This method executes the specified SQL SELECT statement and returns a --- 45,57 ---- */ public interface Statement { ! int CLOSE_CURRENT_RESULT = 1; ! int KEEP_CURRENT_RESULT = 2; ! int CLOSE_ALL_RESULTS = 3; ! int SUCCESS_NO_INFO = -2; ! int EXECUTE_FAILED = -3; ! int RETURN_GENERATED_KEYS = 1; ! int NO_GENERATED_KEYS = 2; /** * This method executes the specified SQL SELECT statement and returns a *************** public interface Statement *** 61,67 **** * @return The result set of the SQL statement. * @exception SQLException If an error occurs. */ ! public ResultSet executeQuery(String sql) throws SQLException; /** * This method executes the specified SQL INSERT, UPDATE, or DELETE statement --- 61,67 ---- * @return The result set of the SQL statement. * @exception SQLException If an error occurs. */ ! ResultSet executeQuery(String sql) throws SQLException; /** * This method executes the specified SQL INSERT, UPDATE, or DELETE statement *************** public interface Statement *** 71,84 **** * @return The number of rows affected by the SQL statement. * @exception SQLException If an error occurs. */ ! public int executeUpdate(String sql) throws SQLException; /** * This method closes the statement and frees any associated resources. * * @exception SQLException If an error occurs. */ ! public void close() throws SQLException; /** * This method returns the maximum length of any column value in bytes. --- 71,84 ---- * @return The number of rows affected by the SQL statement. * @exception SQLException If an error occurs. */ ! int executeUpdate(String sql) throws SQLException; /** * This method closes the statement and frees any associated resources. * * @exception SQLException If an error occurs. */ ! void close() throws SQLException; /** * This method returns the maximum length of any column value in bytes. *************** public interface Statement *** 86,92 **** * @return The maximum length of any column value in bytes. * @exception SQLException If an error occurs. */ ! public int getMaxFieldSize() throws SQLException; /** * This method sets the limit for the maximum length of any column in bytes. --- 86,92 ---- * @return The maximum length of any column value in bytes. * @exception SQLException If an error occurs. */ ! int getMaxFieldSize() throws SQLException; /** * This method sets the limit for the maximum length of any column in bytes. *************** public interface Statement *** 94,100 **** * @param maxsize The new maximum length of any column in bytes. * @exception SQLException If an error occurs. */ ! public void setMaxFieldSize(int max) throws SQLException; /** * This method returns the maximum possible number of rows in a result set. --- 94,100 ---- * @param maxsize The new maximum length of any column in bytes. * @exception SQLException If an error occurs. */ ! void setMaxFieldSize(int max) throws SQLException; /** * This method returns the maximum possible number of rows in a result set. *************** public interface Statement *** 102,108 **** * @return The maximum possible number of rows in a result set. * @exception SQLException If an error occurs. */ ! public int getMaxRows() throws SQLException; /** * This method sets the maximum number of rows that can be present in a --- 102,108 ---- * @return The maximum possible number of rows in a result set. * @exception SQLException If an error occurs. */ ! int getMaxRows() throws SQLException; /** * This method sets the maximum number of rows that can be present in a *************** public interface Statement *** 111,117 **** * @param maxrows The maximum possible number of rows in a result set. * @exception SQLException If an error occurs. */ ! public void setMaxRows(int max) throws SQLException; /** * This method sets the local escape processing mode on or off. The --- 111,117 ---- * @param maxrows The maximum possible number of rows in a result set. * @exception SQLException If an error occurs. */ ! void setMaxRows(int max) throws SQLException; /** * This method sets the local escape processing mode on or off. The *************** public interface Statement *** 121,127 **** * false to disable it. * @exception SQLException If an error occurs. */ ! public void setEscapeProcessing(boolean enable) throws SQLException; /** * The method returns the number of seconds a statement may be in process --- 121,127 ---- * false to disable it. * @exception SQLException If an error occurs. */ ! void setEscapeProcessing(boolean enable) throws SQLException; /** * The method returns the number of seconds a statement may be in process *************** public interface Statement *** 130,136 **** * @return The SQL statement timeout in seconds. * @exception SQLException If an error occurs. */ ! public int getQueryTimeout() throws SQLException; /** * This method sets the number of seconds a statement may be in process --- 130,136 ---- * @return The SQL statement timeout in seconds. * @exception SQLException If an error occurs. */ ! int getQueryTimeout() throws SQLException; /** * This method sets the number of seconds a statement may be in process *************** public interface Statement *** 139,145 **** * @param timeout The new SQL statement timeout value. * @exception SQLException If an error occurs. */ ! public void setQueryTimeout(int seconds) throws SQLException; /** * This method cancels an outstanding statement, if the database supports --- 139,145 ---- * @param timeout The new SQL statement timeout value. * @exception SQLException If an error occurs. */ ! void setQueryTimeout(int seconds) throws SQLException; /** * This method cancels an outstanding statement, if the database supports *************** public interface Statement *** 147,153 **** * * @exception SQLException If an error occurs. */ ! public void cancel() throws SQLException; /** * This method returns the first SQL warning attached to this statement. --- 147,153 ---- * * @exception SQLException If an error occurs. */ ! void cancel() throws SQLException; /** * This method returns the first SQL warning attached to this statement. *************** public interface Statement *** 156,162 **** * @return The first SQL warning for this statement. * @exception SQLException If an error occurs. */ ! public SQLWarning getWarnings() throws SQLException; /** * This method clears any SQL warnings that have been attached to this --- 156,162 ---- * @return The first SQL warning for this statement. * @exception SQLException If an error occurs. */ ! SQLWarning getWarnings() throws SQLException; /** * This method clears any SQL warnings that have been attached to this *************** public interface Statement *** 164,170 **** * * @exception SQLException If an error occurs. */ ! public void clearWarnings() throws SQLException; /** * This method sets the cursor name that will be used by the result set. --- 164,170 ---- * * @exception SQLException If an error occurs. */ ! void clearWarnings() throws SQLException; /** * This method sets the cursor name that will be used by the result set. *************** public interface Statement *** 172,178 **** * @param name The cursor name to use for this statement. * @exception SQLException If an error occurs. */ ! public void setCursorName(String name) throws SQLException; /** * This method executes an arbitrary SQL statement of any time. The --- 172,178 ---- * @param name The cursor name to use for this statement. * @exception SQLException If an error occurs. */ ! void setCursorName(String name) throws SQLException; /** * This method executes an arbitrary SQL statement of any time. The *************** public interface Statement *** 183,189 **** * if an update count was returned. * @exception SQLException If an error occurs. */ ! public boolean execute(String sql) throws SQLException; /** * This method returns the result set of the SQL statement that was --- 183,189 ---- * if an update count was returned. * @exception SQLException If an error occurs. */ ! boolean execute(String sql) throws SQLException; /** * This method returns the result set of the SQL statement that was *************** public interface Statement *** 194,200 **** * @exception SQLException If an error occurs. * @see execute */ ! public ResultSet getResultSet() throws SQLException; /** * This method returns the update count of the SQL statement that was --- 194,200 ---- * @exception SQLException If an error occurs. * @see execute */ ! ResultSet getResultSet() throws SQLException; /** * This method returns the update count of the SQL statement that was *************** public interface Statement *** 205,211 **** * @exception SQLException If an error occurs. * @see execute */ ! public int getUpdateCount() throws SQLException; /** * This method advances the result set pointer to the next result set, --- 205,211 ---- * @exception SQLException If an error occurs. * @see execute */ ! int getUpdateCount() throws SQLException; /** * This method advances the result set pointer to the next result set, *************** public interface Statement *** 217,223 **** * @exception SQLException If an error occurs. * @see execute */ ! public boolean getMoreResults() throws SQLException; /** * This method informs the driver which direction the result set will --- 217,223 ---- * @exception SQLException If an error occurs. * @see execute */ ! boolean getMoreResults() throws SQLException; /** * This method informs the driver which direction the result set will *************** public interface Statement *** 226,232 **** * @param direction The direction the result set will be accessed in (?????) * @exception SQLException If an error occurs. */ ! public void setFetchDirection(int direction) throws SQLException; /** * This method returns the current direction that the driver thinks the --- 226,232 ---- * @param direction The direction the result set will be accessed in (?????) * @exception SQLException If an error occurs. */ ! void setFetchDirection(int direction) throws SQLException; /** * This method returns the current direction that the driver thinks the *************** public interface Statement *** 235,241 **** * @return The direction the result set will be accessed in (????) * @exception SQLException If an error occurs. */ ! public int getFetchDirection() throws SQLException; /** * This method informs the driver how many rows it should fetch from the --- 235,241 ---- * @return The direction the result set will be accessed in (????) * @exception SQLException If an error occurs. */ ! int getFetchDirection() throws SQLException; /** * This method informs the driver how many rows it should fetch from the *************** public interface Statement *** 245,251 **** * to populate the result set. * @exception SQLException If an error occurs. */ ! public void setFetchSize(int rows) throws SQLException; /** * This method returns the number of rows the driver believes should be --- 245,251 ---- * to populate the result set. * @exception SQLException If an error occurs. */ ! void setFetchSize(int rows) throws SQLException; /** * This method returns the number of rows the driver believes should be *************** public interface Statement *** 254,260 **** * @return The number of rows that will be fetched from the database at a time. * @exception SQLException If an error occurs. */ ! public int getFetchSize() throws SQLException; /** * This method returns the concurrency type of the result set for this --- 254,260 ---- * @return The number of rows that will be fetched from the database at a time. * @exception SQLException If an error occurs. */ ! int getFetchSize() throws SQLException; /** * This method returns the concurrency type of the result set for this *************** public interface Statement *** 265,271 **** * @exception SQLException If an error occurs. * @see ResultSet */ ! public int getResultSetConcurrency() throws SQLException; /** * This method returns the result set type for this statement. This will --- 265,271 ---- * @exception SQLException If an error occurs. * @see ResultSet */ ! int getResultSetConcurrency() throws SQLException; /** * This method returns the result set type for this statement. This will *************** public interface Statement *** 275,281 **** * @exception SQLException If an error occurs. * @see ResultSet */ ! public int getResultSetType() throws SQLException; /** * This method adds a SQL statement to a SQL batch. A driver is not --- 275,281 ---- * @exception SQLException If an error occurs. * @see ResultSet */ ! int getResultSetType() throws SQLException; /** * This method adds a SQL statement to a SQL batch. A driver is not *************** public interface Statement *** 284,290 **** * @param sql The sql statement to add to the batch. * @exception SQLException If an error occurs. */ ! public void addBatch(String sql) throws SQLException; /** * This method clears out any SQL statements that have been populated in --- 284,290 ---- * @param sql The sql statement to add to the batch. * @exception SQLException If an error occurs. */ ! void addBatch(String sql) throws SQLException; /** * This method clears out any SQL statements that have been populated in *************** public interface Statement *** 292,298 **** * * @exception SQLException If an error occurs. */ ! public void clearBatch() throws SQLException; /** * This method executes the SQL batch and returns an array of update --- 292,298 ---- * * @exception SQLException If an error occurs. */ ! void clearBatch() throws SQLException; /** * This method executes the SQL batch and returns an array of update *************** public interface Statement *** 303,309 **** * @return An array of update counts for this batch. * @exception SQLException If an error occurs. */ ! public int[] executeBatch() throws SQLException; /** * This method returns the Connection instance that was --- 303,309 ---- * @return An array of update counts for this batch. * @exception SQLException If an error occurs. */ ! int[] executeBatch() throws SQLException; /** * This method returns the Connection instance that was *************** public interface Statement *** 312,366 **** * @return The connection used to create this object. * @exception SQLException If an error occurs. */ ! public Connection getConnection() throws SQLException; /** * @since 1.4 */ ! public boolean getMoreResults(int current) throws SQLException; /** * @since 1.4 */ ! public ResultSet getGeneratedKeys() throws SQLException; /** * @since 1.4 */ ! public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException; /** * @since 1.4 */ ! public int executeUpdate(String sql, int[] columnIndexes) throws SQLException; /** * @since 1.4 */ ! public int executeUpdate(String sql, String[] columnNames) throws SQLException; /** * @since 1.4 */ ! public boolean execute(String sql, int autoGeneratedKeys) throws SQLException; /** * @since 1.4 */ ! public boolean execute(String sql, int[] columnIndexes) throws SQLException; /** * @since 1.4 */ ! public boolean execute(String sql, String[] columnNames) throws SQLException; /** * @since 1.4 */ ! public int getResultSetHoldability() throws SQLException; } --- 312,366 ---- * @return The connection used to create this object. * @exception SQLException If an error occurs. */ ! Connection getConnection() throws SQLException; /** * @since 1.4 */ ! boolean getMoreResults(int current) throws SQLException; /** * @since 1.4 */ ! ResultSet getGeneratedKeys() throws SQLException; /** * @since 1.4 */ ! int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException; /** * @since 1.4 */ ! int executeUpdate(String sql, int[] columnIndexes) throws SQLException; /** * @since 1.4 */ ! int executeUpdate(String sql, String[] columnNames) throws SQLException; /** * @since 1.4 */ ! boolean execute(String sql, int autoGeneratedKeys) throws SQLException; /** * @since 1.4 */ ! boolean execute(String sql, int[] columnIndexes) throws SQLException; /** * @since 1.4 */ ! boolean execute(String sql, String[] columnNames) throws SQLException; /** * @since 1.4 */ ! int getResultSetHoldability() throws SQLException; } diff -Nrc3pad gcc-3.3.3/libjava/java/sql/Struct.java gcc-3.4.0/libjava/java/sql/Struct.java *** gcc-3.3.3/libjava/java/sql/Struct.java 2002-06-21 05:39:24.000000000 +0000 --- gcc-3.4.0/libjava/java/sql/Struct.java 2003-10-11 18:49:51.000000000 +0000 *************** public interface Struct *** 55,61 **** * @return The SQL structured type name. * @exception SQLException If an error occurs. */ ! public String getSQLTypeName() throws SQLException; /** * This method returns the attributes of this SQL structured type. --- 55,61 ---- * @return The SQL structured type name. * @exception SQLException If an error occurs. */ ! String getSQLTypeName() throws SQLException; /** * This method returns the attributes of this SQL structured type. *************** public interface Struct *** 63,69 **** * @return The attributes of this structure type. * @exception SQLException If an error occurs. */ ! public Object[] getAttributes() throws SQLException; /** * This method returns the attributes of this SQL structured type. --- 63,69 ---- * @return The attributes of this structure type. * @exception SQLException If an error occurs. */ ! Object[] getAttributes() throws SQLException; /** * This method returns the attributes of this SQL structured type. *************** public interface Struct *** 73,77 **** * @return The attributes of this structure type. * @exception SQLException If a error occurs. */ ! public Object[] getAttributes(Map map) throws SQLException; } --- 73,77 ---- * @return The attributes of this structure type. * @exception SQLException If a error occurs. */ ! Object[] getAttributes(Map map) throws SQLException; } diff -Nrc3pad gcc-3.3.3/libjava/java/sql/Time.java gcc-3.4.0/libjava/java/sql/Time.java *** gcc-3.3.3/libjava/java/sql/Time.java 2002-06-21 05:39:24.000000000 +0000 --- gcc-3.4.0/libjava/java/sql/Time.java 2003-04-19 21:17:50.000000000 +0000 *************** *** 1,5 **** /* Time.java -- Wrapper around java.util.Date ! Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Time.java -- Wrapper around java.util.Date ! Copyright (C) 1999, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 38,43 **** --- 38,44 ---- package java.sql; + import java.text.ParseException; import java.text.SimpleDateFormat; /** *************** public class Time extends java.util.Date *** 55,78 **** */ private static SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss"); /** * This method returns a new instance of this class by parsing a * date in JDBC format into a Java date. * * @param str The string to parse. ! * @return The resulting java.sql.Time value. */ ! public static Time valueOf(String str) { try { java.util.Date d = (java.util.Date) sdf.parseObject(str); ! return new Time(d.getTime()); } ! catch (Exception e) { ! return null; } } --- 56,161 ---- */ private static SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss"); + /** + * This method always throws an IllegalArgumentException. + * + * @throws IllegalArgumentException when it's called. + * @deprecated + */ + public int getDate() throws IllegalArgumentException + { + throw new IllegalArgumentException(); + } + + /** + * This method always throws an IllegalArgumentException. + * + * @throws IllegalArgumentException when it's called. + * @deprecated + */ + public int getDay() throws IllegalArgumentException + { + throw new IllegalArgumentException(); + } + + /** + * This method always throws an IllegalArgumentException. + * + * @throws IllegalArgumentException when it's called. + * @deprecated + */ + public int getMonth() throws IllegalArgumentException + { + throw new IllegalArgumentException(); + } + + /** + * This method always throws an IllegalArgumentException. + * + * @throws IllegalArgumentException when it's called. + * @deprecated + */ + public int getYear() throws IllegalArgumentException + { + throw new IllegalArgumentException(); + } + + /** + * This method always throws an IllegalArgumentException. + * + * @throws IllegalArgumentException when it's called. + * @deprecated + */ + public void setDate(int newValue) throws IllegalArgumentException + { + throw new IllegalArgumentException(); + } + + /** + * This method always throws an IllegalArgumentException. + * + * @throws IllegalArgumentException when it's called. + * @deprecated + */ + public void setMonth(int newValue) throws IllegalArgumentException + { + throw new IllegalArgumentException(); + } + + /** + * This method always throws an IllegalArgumentException. + * + * @throws IllegalArgumentException when it's called. + * @deprecated + */ + public void setYear(int newValue) throws IllegalArgumentException + { + throw new IllegalArgumentException(); + } /** * This method returns a new instance of this class by parsing a * date in JDBC format into a Java date. * * @param str The string to parse. ! * @return The resulting java.sql.Time value. ! * ! * @deprecated */ ! public static Time valueOf (String str) { try { java.util.Date d = (java.util.Date) sdf.parseObject(str); ! ! if (d == null) ! throw new IllegalArgumentException(str); ! else ! return new Time(d.getTime()); } ! catch (ParseException e) { ! throw new IllegalArgumentException(str); } } *************** public class Time extends java.util.Date *** 110,120 **** * This method returns this date in JDBC format. * * @return This date as a string. */ ! public String ! toString() { ! return sdf.format(this); } } --- 193,204 ---- * This method returns this date in JDBC format. * * @return This date as a string. + * + * @deprecated */ ! public String toString () { ! return sdf.format (this); } } diff -Nrc3pad gcc-3.3.3/libjava/java/sql/Timestamp.java gcc-3.4.0/libjava/java/sql/Timestamp.java *** gcc-3.3.3/libjava/java/sql/Timestamp.java 2003-02-10 19:55:44.000000000 +0000 --- gcc-3.4.0/libjava/java/sql/Timestamp.java 2003-11-11 12:22:19.000000000 +0000 *************** exception statement from your version. * *** 38,43 **** --- 38,44 ---- package java.sql; + import java.text.ParseException; import java.text.SimpleDateFormat; /** *************** public class Timestamp extends java.util *** 57,67 **** /** * Used for parsing and formatting this date. */ ! // Millisecond will have to be close enough for now. ! private static SimpleDateFormat parse_sdf = ! new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSSS"); ! ! private static SimpleDateFormat format_sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); /** --- 58,64 ---- /** * Used for parsing and formatting this date. */ ! private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); /** *************** public class Timestamp extends java.util *** 78,91 **** */ public static Timestamp valueOf(String str) { try { ! Date d = (Date) parse_sdf.parseObject(str); ! return new Timestamp(d.getTime()); } ! catch (Exception e) { ! return null; } } --- 75,113 ---- */ public static Timestamp valueOf(String str) { + int nanos = 0; + int dot = str.indexOf('.'); + if (dot != -1) + { + if (str.lastIndexOf('.') != dot) + throw new IllegalArgumentException(str); + + int len = str.length() - dot - 1; + if (len < 1 || len > 9) + throw new IllegalArgumentException(str); + + nanos = Integer.parseInt(str.substring(dot + 1)); + for (int i = len; i < 9; i++) + nanos *= 10; + + str = str.substring(0, dot); + + } + try { ! java.util.Date d = (java.util.Date)sdf.parseObject(str); ! ! if (d == null) ! throw new IllegalArgumentException(str); ! ! Timestamp ts = new Timestamp(d.getTime() + nanos / 1000000); ! ts.nanos = nanos; ! return ts; } ! catch (ParseException e) { ! throw new IllegalArgumentException(str); } } *************** public class Timestamp extends java.util *** 128,134 **** */ public String toString() { ! return format_sdf.format(this) + "." + getNanos(); } /** --- 150,156 ---- */ public String toString() { ! return sdf.format(this) + "." + getNanos(); } /** *************** public class Timestamp extends java.util *** 202,210 **** */ public boolean equals(Object obj) { - if (obj == null) - return false; - if (!(obj instanceof Timestamp)) return false; --- 224,229 ---- diff -Nrc3pad gcc-3.3.3/libjava/java/text/AttributedCharacterIterator.java gcc-3.4.0/libjava/java/text/AttributedCharacterIterator.java *** gcc-3.3.3/libjava/java/text/AttributedCharacterIterator.java 2002-01-22 22:40:37.000000000 +0000 --- gcc-3.4.0/libjava/java/text/AttributedCharacterIterator.java 2003-10-15 13:57:00.000000000 +0000 *************** import java.util.Set; *** 44,344 **** import java.util.Map; /** ! * This interface extends the CharacterIterator interface ! * in order to support iteration over character attributes as well as ! * over the characters themselves. ! *

                ! * In addition to attributes of specific characters, this interface ! * supports the concept of the "attribute run", which is an attribute ! * that is defined for a particular value across an entire range of ! * characters or which is undefined over a range of characters. ! * ! * @version 0.0 ! * ! * @author Aaron M. Renn (arenn@urbanophile.com) ! */ ! public interface AttributedCharacterIterator extends CharacterIterator ! { ! ! /* ! * Inner Classes ! */ ! ! /** ! * This class defines attribute keys that are used as text attributes. ! */ ! public static class Attribute implements Serializable ! { ! ! /*************************************************************************/ ! ! /* ! * Static Variables ! */ ! ! /** ! * This is the attribute for the language of the text. The value of ! * attributes of this key type are instances of Locale. ! */ ! public static final Attribute LANGUAGE = new Attribute("LANGUAGE"); ! ! /** ! * This is the attribute for the reading form of text. This is used ! * for storing pronunciation along with the written text for languages ! * which need it. The value of attributes of this key type are ! * instances of Annotation which wrappers a String. ! */ ! public static final Attribute READING = new Attribute("READING"); ! ! /** ! * This is the attribute for input method segments. The value of attributes ! * of this key type are instances of Annotation which wrapper ! * a String. ! */ ! public static final Attribute INPUT_METHOD_SEGMENT = ! new Attribute("INPUT_METHOD_SEGMENT"); ! ! /*************************************************************************/ ! ! /* ! * Instance Variables ! */ ! ! /** ! * This is the name of the attribute key ! * @serial ! */ ! private String name; ! ! /*************************************************************************/ ! ! /* ! * Constructors ! */ ! ! /** ! * This method initializes a new instance of this class with the specified ! * name. ! * ! * @param name The name of this attribute key. ! */ ! protected ! Attribute(String name) ! { ! this.name = name; ! } ! ! /*************************************************************************/ ! ! /* ! * Instance Methods */ ! ! /** ! * This method returns the name of this attribute. ! * ! * @return The attribute name ! */ ! protected String ! getName() ! { ! return(name); ! } ! ! /*************************************************************************/ ! ! /** ! * This method resolves an instance of AttributedCharacterIterator.Attribute ! * that is being deserialized to one of the three pre-defined attribute ! * constants. It does this by comparing the names of the attributes. The ! * constant that the deserialized object resolves to is returned. ! * ! * @return The resolved contant value ! * ! * @exception InvalidObjectException If the object being deserialized cannot be resolved. ! */ ! protected Object ! readResolve() throws InvalidObjectException ! { ! if (this.equals(READING)) ! return(READING); ! ! if (this.equals(LANGUAGE)) ! return(LANGUAGE); ! ! if (this.equals(INPUT_METHOD_SEGMENT)) ! return(INPUT_METHOD_SEGMENT); ! ! throw new InvalidObjectException("Can't resolve Attribute: " + getName()); ! } ! ! /*************************************************************************/ ! ! /** ! * This method tests this object for equality against the specified object. ! * The two objects will be considered equal if and only if: ! *

                  ! *
                • The specified object is not null. ! *
                • The specified object is an instance of AttributedCharacterIterator.Attribute. ! *
                • The specified object has the same attribute name as this object. ! *
                ! * ! * @param The Object to test for equality against this object. ! * ! * @return true if the specified object is equal to this one, false otherwise. ! */ ! public final boolean ! equals(Object obj) ! { ! if (obj == this) ! return(true); ! else ! return(false); ! } ! ! /*************************************************************************/ ! ! /** ! * This method returns a hash value for this object. ! * ! * @return A hash value for this object. ! */ ! public final int ! hashCode() ! { ! return(super.hashCode()); ! } ! ! /*************************************************************************/ ! ! /** ! * This method returns a String representation of this object. ! * ! * @return A String representation of this object. ! */ ! public String ! toString() { ! return(getClass().getName() + "(" + getName() + ")"); ! } ! ! } // Inner class Attribute ! ! /*************************************************************************/ ! /* ! * Instance Methods ! */ ! /** ! * This method returns a list of all keys that are defined for the ! * text range. This can be an empty list if no attributes are defined. ! * ! * @return A list of keys ! */ ! public abstract Set ! getAllAttributeKeys(); ! /*************************************************************************/ ! /** ! * This method returns a Map of the attributed defined for ! * the current character. ! * ! * @return A Map of the attributes for the current character. ! */ ! public abstract Map ! getAttributes(); ! /*************************************************************************/ ! /** ! * This method returns the value of the specified attribute for the ! * current character. If the attribute is not defined for the current ! * character, null is returned. ! * ! * @param attrib The attribute to retrieve the value of. ! * ! * @return The value of the specified attribute ! */ ! public abstract Object ! getAttribute(AttributedCharacterIterator.Attribute attrib); ! /*************************************************************************/ ! /** ! * This method returns the index of the first character in the run that ! * contains all attributes defined for the current character. ! * ! * @return The start index of the run ! */ ! public abstract int ! getRunStart(); ! /*************************************************************************/ ! /** ! * This method returns the index of the first character in the run that ! * contains all attributes in the specified Set defined for ! * the current character. ! * ! * @param attribs The Set of attributes. ! * ! * @return The start index of the run. ! */ ! public abstract int ! getRunStart(Set attribs); ! /*************************************************************************/ ! /** ! * This method returns the index of the first character in the run that ! * contains the specified attribute defined for the current character. ! * ! * @param attrib The attribute. ! * ! * @return The start index of the run. ! */ ! public abstract int ! getRunStart(AttributedCharacterIterator.Attribute attrib); ! /*************************************************************************/ ! /** ! * This method returns the index of the character after the end of the run ! * that contains all attributed defined for the current character. ! * ! * @return The end index of the run. ! */ ! public abstract int ! getRunLimit(); ! /*************************************************************************/ ! /** ! * This method returns the index of the character after the end of the run ! * that contains all attributes in the specified Set defined ! * for the current character. ! * ! * @param attribs The Set of attributes. ! * ! * @return The end index of the run. ! */ ! public abstract int ! getRunLimit(Set attribs); ! /*************************************************************************/ ! /** ! * This methods returns the index of the character after the end of the run ! * that contains the specified attribute defined for the current character. ! * ! * @param attrib The attribute. ! * ! * @return The end index of the run. ! */ ! public abstract int ! getRunLimit(AttributedCharacterIterator.Attribute attrib); } // interface AttributedCharacterIterator - --- 44,268 ---- import java.util.Map; /** ! * This interface extends the CharacterIterator interface ! * in order to support iteration over character attributes as well as ! * over the characters themselves. ! *

                ! * In addition to attributes of specific characters, this interface ! * supports the concept of the "attribute run", which is an attribute ! * that is defined for a particular value across an entire range of ! * characters or which is undefined over a range of characters. ! * ! * @author Aaron M. Renn (arenn@urbanophile.com) */ ! public interface AttributedCharacterIterator extends CharacterIterator { ! /** ! * This class defines attribute keys that are used as text attributes. ! */ ! public static class Attribute implements Serializable ! { ! private static final long serialVersionUID = -9142742483513960612L; ! /** ! * This is the attribute for the language of the text. The value of ! * attributes of this key type are instances of Locale. ! */ ! public static final Attribute LANGUAGE = new Attribute ("LANGUAGE"); ! /** ! * This is the attribute for the reading form of text. This is used ! * for storing pronunciation along with the written text for languages ! * which need it. The value of attributes of this key type are ! * instances of Annotation which wrappers a String. ! */ ! public static final Attribute READING = new Attribute ("READING"); ! /** ! * This is the attribute for input method segments. The value of attributes ! * of this key type are instances of Annotation which wrapper ! * a String. ! */ ! public static final Attribute INPUT_METHOD_SEGMENT = ! new Attribute ("INPUT_METHOD_SEGMENT"); ! /** ! * This is the name of the attribute key ! * @serial ! */ ! private String name; ! /** ! * This method initializes a new instance of this class with the specified ! * name. ! * ! * @param name The name of this attribute key. ! */ ! protected Attribute (String name) ! { ! this.name = name; ! } ! /** ! * This method returns the name of this attribute. ! * ! * @return The attribute name ! */ ! protected String getName() ! { ! return name; ! } ! /** ! * This method resolves an instance of AttributedCharacterIterator.Attribute ! * that is being deserialized to one of the three pre-defined attribute ! * constants. It does this by comparing the names of the attributes. The ! * constant that the deserialized object resolves to is returned. ! * ! * @return The resolved contant value ! * ! * @exception InvalidObjectException If the object being deserialized cannot be resolved. ! */ ! protected Object readResolve() throws InvalidObjectException ! { ! if (this.equals (READING)) ! return READING; ! if (this.equals (LANGUAGE)) ! return LANGUAGE; ! if (this.equals (INPUT_METHOD_SEGMENT)) ! return INPUT_METHOD_SEGMENT; ! throw new InvalidObjectException ("Can't resolve Attribute: " + getName()); ! } ! ! /** ! * This method tests this object for equality against the specified object. ! * The two objects will be considered equal if and only if: ! *

                  ! *
                • The specified object is not null. ! *
                • The specified object is an instance of AttributedCharacterIterator.Attribute. ! *
                • The specified object has the same attribute name as this object. ! *
                ! * ! * @param The Object to test for equality against this object. ! * ! * @return true if the specified object is equal to this one, false otherwise. ! */ ! public final boolean equals (Object obj) ! { ! if (obj == this) ! return true; ! else ! return false; ! } ! /** ! * This method returns a hash value for this object. ! * ! * @return A hash value for this object. ! */ ! public final int hashCode() ! { ! return super.hashCode(); ! } ! /** ! * This method returns a String representation of this object. ! * ! * @return A String representation of this object. ! */ ! public String toString() ! { ! return getClass().getName() + "(" + getName() + ")"; ! } ! } // Inner class Attribute ! /** ! * This method returns a list of all keys that are defined for the ! * text range. This can be an empty list if no attributes are defined. ! * ! * @return A list of keys ! */ ! Set getAllAttributeKeys(); ! /** ! * This method returns a Map of the attributed defined for ! * the current character. ! * ! * @return A Map of the attributes for the current character. ! */ ! Map getAttributes(); ! /** ! * This method returns the value of the specified attribute for the ! * current character. If the attribute is not defined for the current ! * character, null is returned. ! * ! * @param attrib The attribute to retrieve the value of. ! * ! * @return The value of the specified attribute ! */ ! Object getAttribute (AttributedCharacterIterator.Attribute attrib); ! /** ! * This method returns the index of the first character in the run that ! * contains all attributes defined for the current character. ! * ! * @return The start index of the run ! */ ! int getRunStart(); ! /** ! * This method returns the index of the first character in the run that ! * contains all attributes in the specified Set defined for ! * the current character. ! * ! * @param attribs The Set of attributes. ! * ! * @return The start index of the run. ! */ ! int getRunStart (Set attribs); ! ! /** ! * This method returns the index of the first character in the run that ! * contains the specified attribute defined for the current character. ! * ! * @param attrib The attribute. ! * ! * @return The start index of the run. ! */ ! int getRunStart (AttributedCharacterIterator.Attribute attrib); ! ! /** ! * This method returns the index of the character after the end of the run ! * that contains all attributed defined for the current character. ! * ! * @return The end index of the run. ! */ ! int getRunLimit(); ! ! /** ! * This method returns the index of the character after the end of the run ! * that contains all attributes in the specified Set defined ! * for the current character. ! * ! * @param attribs The Set of attributes. ! * ! * @return The end index of the run. ! */ ! int getRunLimit (Set attribs); ! ! /** ! * This methods returns the index of the character after the end of the run ! * that contains the specified attribute defined for the current character. ! * ! * @param attrib The attribute. ! * ! * @return The end index of the run. ! */ ! int getRunLimit (AttributedCharacterIterator.Attribute attrib); } // interface AttributedCharacterIterator diff -Nrc3pad gcc-3.3.3/libjava/java/text/BreakIterator.java gcc-3.4.0/libjava/java/text/BreakIterator.java *** gcc-3.3.3/libjava/java/text/BreakIterator.java 2002-01-22 22:40:37.000000000 +0000 --- gcc-3.4.0/libjava/java/text/BreakIterator.java 2003-04-30 13:22:45.000000000 +0000 *************** public abstract class BreakIterator impl *** 77,82 **** --- 77,97 ---- } /** + * Create a clone of this object. + */ + public Object clone () + { + try + { + return super.clone(); + } + catch (CloneNotSupportedException e) + { + return null; + } + } + + /** * This method returns the index of the current text element boundary. * * @return The current text boundary. diff -Nrc3pad gcc-3.3.3/libjava/java/text/CharacterIterator.java gcc-3.4.0/libjava/java/text/CharacterIterator.java *** gcc-3.3.3/libjava/java/text/CharacterIterator.java 2002-01-22 22:40:37.000000000 +0000 --- gcc-3.4.0/libjava/java/text/CharacterIterator.java 2003-10-15 13:57:00.000000000 +0000 *************** package java.text; *** 45,105 **** * by the methods in this interface. Additionally, various methods allow * the index to be set. * - * @version 0.0 - * * @author Aaron M. Renn (arenn@urbanophile.com) */ public interface CharacterIterator extends Cloneable { - - /*************************************************************************/ - - /* - * Static Variables - */ - /** * This is a special constant value that is returned when the beginning or * end of the character range has been reached. */ ! public static final char DONE = '\uFFFF'; ! ! /*************************************************************************/ ! ! /* ! * Instance Methods ! */ /** * This method returns the character at the current index position * * @return The character at the current index position. */ ! public abstract char current (); ! ! /*************************************************************************/ /** * This method increments the current index and then returns the character * at the new index value. If the index is already at getEndIndex() - 1, * it will not be incremented. * ! * @return The character at the position of the incremented index value, or DONE if the index has reached getEndIndex() - 1 */ ! public abstract char next (); ! ! /*************************************************************************/ /** * This method decrements the current index and then returns the character * at the new index value. If the index value is already at the beginning * index, it will not be decremented. * ! * @return The character at the position of the decremented index value, or DONE if index was already equal to the beginning index value. */ ! public abstract char previous (); ! ! /*************************************************************************/ /** * This method sets the index value to the beginning of the range and returns --- 45,86 ---- * by the methods in this interface. Additionally, various methods allow * the index to be set. * * @author Aaron M. Renn (arenn@urbanophile.com) */ public interface CharacterIterator extends Cloneable { /** * This is a special constant value that is returned when the beginning or * end of the character range has been reached. */ ! char DONE = '\uFFFF'; /** * This method returns the character at the current index position * * @return The character at the current index position. */ ! char current(); /** * This method increments the current index and then returns the character * at the new index value. If the index is already at getEndIndex() - 1, * it will not be incremented. * ! * @return The character at the position of the incremented index value, ! * or DONE if the index has reached getEndIndex() - 1 */ ! char next(); /** * This method decrements the current index and then returns the character * at the new index value. If the index value is already at the beginning * index, it will not be decremented. * ! * @return The character at the position of the decremented index value, ! * or DONE if index was already equal to the beginning index value. */ ! char previous(); /** * This method sets the index value to the beginning of the range and returns *************** public interface CharacterIterator exten *** 107,115 **** * * @return The character at the beginning of the range, or DONE if the range is empty. */ ! public abstract char first (); ! ! /*************************************************************************/ /** * This method sets the index value to getEndIndex() - 1 and --- 88,94 ---- * * @return The character at the beginning of the range, or DONE if the range is empty. */ ! char first(); /** * This method sets the index value to getEndIndex() - 1 and *************** public interface CharacterIterator exten *** 118,135 **** * * @return The character at the end of the range, or DONE if the range is empty. */ ! public abstract char last (); ! ! /*************************************************************************/ /** * This method returns the current value of the index. * * @return The current index value */ ! public abstract int getIndex (); ! ! /*************************************************************************/ /** * This method sets the value of the index to the specified value, then --- 97,110 ---- * * @return The character at the end of the range, or DONE if the range is empty. */ ! char last(); /** * This method returns the current value of the index. * * @return The current index value */ ! int getIndex(); /** * This method sets the value of the index to the specified value, then *************** public interface CharacterIterator exten *** 139,147 **** * * @return The character at the new index value or DONE if the index value is equal to getEndIndex. */ ! public abstract char setIndex (int index) throws IllegalArgumentException; ! ! /*************************************************************************/ /** * This method returns the character position of the first character in the --- 114,120 ---- * * @return The character at the new index value or DONE if the index value is equal to getEndIndex. */ ! char setIndex (int index) throws IllegalArgumentException; /** * This method returns the character position of the first character in the *************** public interface CharacterIterator exten *** 149,157 **** * * @return The index of the first character in the range. */ ! public abstract int getBeginIndex (); ! ! /*************************************************************************/ /** * This method returns the character position of the end of the text range. --- 122,128 ---- * * @return The index of the first character in the range. */ ! int getBeginIndex(); /** * This method returns the character position of the end of the text range. *************** public interface CharacterIterator exten *** 161,174 **** * * @return The index of the end of the range. */ ! public abstract int getEndIndex (); ! ! /*************************************************************************/ /** * This method creates a copy of this CharacterIterator. * * @return A copy of this CharacterIterator. */ ! public abstract Object clone (); ! } --- 132,144 ---- * * @return The index of the end of the range. */ ! int getEndIndex(); /** * This method creates a copy of this CharacterIterator. * * @return A copy of this CharacterIterator. */ ! Object clone(); ! ! } // interface CharacterIterator diff -Nrc3pad gcc-3.3.3/libjava/java/text/CollationElementIterator.java gcc-3.4.0/libjava/java/text/CollationElementIterator.java *** gcc-3.3.3/libjava/java/text/CollationElementIterator.java 2001-12-18 17:27:43.000000000 +0000 --- gcc-3.4.0/libjava/java/text/CollationElementIterator.java 2004-01-07 18:40:07.000000000 +0000 *************** *** 1,79 **** ! // CollationElementIterator.java - Iterate over decomposed characters. ! /* Copyright (C) 1999, 2001 Free Software Foundation ! This file is part of libgcj. - This software is copyrighted work licensed under the terms of the - Libgcj License. Please consult the file "LIBGCJ_LICENSE" for - details. */ package java.text; - /** - * @author Tom Tromey - * @date March 25, 1999 - */ /* Written using "Java Class Libraries", 2nd edition, plus online * API docs for JDK 1.2 from http://www.javasoft.com. * Status: Believed complete and correct to JDK 1.1. */ public final class CollationElementIterator { ! public static final int NULLORDER = 0xffffffff; ! public int next () { ! if (index == text.length()) return NULLORDER; ! return collator.ceiNext(this); } ! // This one returns int while the others return short. ! public static final int primaryOrder (int order) { // From the JDK 1.2 spec. return order >>> 16; } ! public void reset () { ! index = 0; } ! public static final short secondaryOrder (int order) { // From the JDK 1.2 spec. return (short) ((order >>> 8) & 255); } ! public static final short tertiaryOrder (int order) { // From the JDK 1.2 spec. return (short) (order & 255); } ! // Non-public constructor. ! CollationElementIterator (String text, RuleBasedCollator collator) { this.text = text; ! this.index = 0; this.lookahead_set = false; this.lookahead = 0; - this.collator = collator; } ! // Text over which we iterate. ! String text; ! ! // Index of next character to examine in TEXT. ! int index; ! ! // A piece of lookahead. ! boolean lookahead_set; ! int lookahead; ! ! // The RuleBasedCollator which created this object. ! RuleBasedCollator collator; } --- 1,195 ---- ! /* CollationElementIterator.java -- Walks through collation elements ! Copyright (C) 1998, 1999, 2001, 2002, 2003 Free Software Foundation ! This file is part of GNU Classpath. ! GNU Classpath is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! GNU Classpath is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with GNU Classpath; see the file COPYING. If not, write to the ! Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ! 02111-1307 USA. ! ! Linking this library statically or dynamically with other modules is ! making a combined work based on this library. Thus, the terms and ! conditions of the GNU General Public License cover the whole ! combination. ! ! As a special exception, the copyright holders of this library give you ! permission to link this library with independent modules to produce an ! executable, regardless of the license terms of these independent ! modules, and to copy and distribute the resulting executable under ! terms of your choice, provided that you also meet, for each linked ! independent module, the terms and conditions of the license of that ! module. An independent module is a module which is not derived from ! or based on this library. If you modify this library, you may extend ! this exception to your version of the library, but you are not ! obligated to do so. If you do not wish to do so, delete this ! exception statement from your version. */ package java.text; /* Written using "Java Class Libraries", 2nd edition, plus online * API docs for JDK 1.2 from http://www.javasoft.com. * Status: Believed complete and correct to JDK 1.1. */ + /** + * This class walks through the character collation elements of a + * String as defined by the collation rules in an instance of + * RuleBasedCollator. There is no public constructor for + * this class. An instance is created by calling the + * getCollationElementIterator method on + * RuleBasedCollator. + * + * @author Aaron M. Renn + * @author Tom Tromey + * @author Guilhem Lavaux + */ public final class CollationElementIterator { ! /** ! * This is a constant value that is returned to indicate that the end of ! * the string was encountered. ! */ ! public static final int NULLORDER = -1; ! /** ! * This is the RuleBasedCollator this object was created from. ! */ ! RuleBasedCollator collator; ! ! /** ! * This is the String that is being iterated over. ! */ ! String text; ! ! /** ! * This is the index into the String where we are currently scanning. ! */ ! int textIndex; ! ! // A piece of lookahead. ! boolean lookahead_set; ! int lookahead; ! ! /** ! * This method initializes a new instance of CollationElementIterator ! * to iterate over the specified String using the rules in the ! * specified RuleBasedCollator. ! * ! * @param collator The RuleBasedCollation used for calculating collation values ! * @param text The String to iterate over. ! */ ! CollationElementIterator(RuleBasedCollator collator, String text) { ! this.collator = collator; ! ! setText (text); ! } ! ! /** ! * This method returns the collation ordering value of the next character sequence ! * in the string (it may be an extended character following collation rules). ! * This method will return NULLORDER if the ! * end of the string was reached. ! * ! * @return The collation ordering value. ! */ ! public int next() ! { ! if (textIndex == text.length()) return NULLORDER; ! ! return collator.ceiNext (this); } ! /** ! * This method returns the primary order value for the given collation ! * value. ! * ! * @param value The collation value returned from next() or previous(). ! * ! * @return The primary order value of the specified collation value. This is the high 16 bits. ! */ ! public static final int primaryOrder(int order) { // From the JDK 1.2 spec. return order >>> 16; } ! /** ! * This method resets the internal position pointer to read from the ! * beginning of the String again. ! */ ! public void reset() { ! textIndex = 0; } ! /** ! * This method returns the secondary order value for the given collation ! * value. ! * ! * @param value The collation value returned from next() or previous(). ! * ! * @return The secondary order value of the specified collation value. This is the bits 8-15. ! */ ! public static final short secondaryOrder(int order) { // From the JDK 1.2 spec. return (short) ((order >>> 8) & 255); } ! /** ! * This method returns the tertiary order value for the given collation ! * value. ! * ! * @param value The collation value returned from next() or previous(). ! * ! * @return The tertiary order value of the specified collation value. This is the low eight bits. ! */ ! public static final short tertiaryOrder(int order) { // From the JDK 1.2 spec. return (short) (order & 255); } ! /** ! * This method sets the String that it is iterating over ! * to the specified String. ! * ! * @param text The new String to iterate over. ! * ! * @since 1.2 ! */ ! public void setText(String text) { this.text = text; ! this.textIndex = 0; this.lookahead_set = false; this.lookahead = 0; } ! /** ! * This method returns the current offset into the String ! * that is being iterated over. ! * ! * @return The iteration index position. ! * ! * @since 1.2 ! */ ! public int getOffset() ! { ! return textIndex; ! } } diff -Nrc3pad gcc-3.3.3/libjava/java/text/CollationKey.java gcc-3.4.0/libjava/java/text/CollationKey.java *** gcc-3.3.3/libjava/java/text/CollationKey.java 2000-11-17 20:42:54.000000000 +0000 --- gcc-3.4.0/libjava/java/text/CollationKey.java 2004-01-07 18:40:08.000000000 +0000 *************** *** 1,44 **** ! // CollationKey.java - Sort key for locale-sensitive String. ! /* Copyright (C) 1999, 2000 Free Software Foundation ! This file is part of libgcj. - This software is copyrighted work licensed under the terms of the - Libgcj License. Please consult the file "LIBGCJ_LICENSE" for - details. */ package java.text; - /** - * @author Tom Tromey - * @date March 25, 1999 - */ /* Written using "Java Class Libraries", 2nd edition, plus online * API docs for JDK 1.2 from http://www.javasoft.com. * Status: Believed complete and correct. */ public final class CollationKey implements Comparable { ! public int compareTo (CollationKey target) { ! int max = Math.min(key.length, target.key.length); for (int i = 0; i < max; ++i) { ! if (key[i] != target.key[i]) ! return key[i] - target.key[i]; } ! return key.length - target.key.length; } ! public int compareTo (Object o) { ! return compareTo ((CollationKey) o); } public boolean equals (Object obj) { if (! (obj instanceof CollationKey)) --- 1,157 ---- ! /* CollationKey.java -- Precomputed collation value ! Copyright (C) 1998, 1999, 2000, 2003 Free Software Foundation, Inc. ! This file is part of GNU Classpath. ! GNU Classpath is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! GNU Classpath is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with GNU Classpath; see the file COPYING. If not, write to the ! Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ! 02111-1307 USA. ! ! Linking this library statically or dynamically with other modules is ! making a combined work based on this library. Thus, the terms and ! conditions of the GNU General Public License cover the whole ! combination. ! ! As a special exception, the copyright holders of this library give you ! permission to link this library with independent modules to produce an ! executable, regardless of the license terms of these independent ! modules, and to copy and distribute the resulting executable under ! terms of your choice, provided that you also meet, for each linked ! independent module, the terms and conditions of the license of that ! module. An independent module is a module which is not derived from ! or based on this library. If you modify this library, you may extend ! this exception to your version of the library, but you are not ! obligated to do so. If you do not wish to do so, delete this ! exception statement from your version. */ package java.text; /* Written using "Java Class Libraries", 2nd edition, plus online * API docs for JDK 1.2 from http://www.javasoft.com. * Status: Believed complete and correct. */ + /** + * This class represents a pre-computed series of bits representing a + * String for under a particular Collator. This + * value may be compared bitwise against another CollationKey + * representing a different String under the same + * Collator in a manner than is usually more efficient than + * using the raw Collator compare methods. There is overhead + * associated with calculating this value, so it is generally not + * advisable to compute CollationKey's unless multiple + * comparisons against a String will be done. (For example, + * in a sort routine). + *

                + * This class cannot be instantiated directly. Instead, a + * CollationKey is created by calling the + * getCollationKey method on an instance of Collator. + * + * @author Aaron M. Renn + * @author Tom Tromey + * @date March 25, 1999 + */ public final class CollationKey implements Comparable { ! /** ! * This is the Collator this object was created from. ! */ ! private Collator collator; ! ! /** ! * This is the String this object represents. ! */ ! private String originalText; ! ! /** ! * This is the bit value for this key. ! */ ! private int[] key; ! ! CollationKey(Collator collator, CollationElementIterator iter, ! String originalText, int strength) { ! this.collator = collator; ! this.originalText = originalText; ! ! // Compute size of required array. ! int size = 0; ! while (RuleBasedCollator.next(iter, strength) ! != CollationElementIterator.NULLORDER) ! ++size; ! ! iter.reset(); ! key = new int[size]; ! for (int i = 0; i < size; i++) ! key[i] = RuleBasedCollator.next(iter, strength); ! } ! ! /** ! * This method compares the specified object to this one. An integer is ! * returned which indicates whether the specified object is less than, ! * greater than, or equal to this object. ! * ! * @param ck The CollationKey to compare against this one. ! * ! * @return A negative integer if this object is less than the specified object, 0 if it is equal or a positive integer if it is greater than the specified object. ! */ ! public int compareTo (CollationKey ck) ! { ! int max = Math.min (key.length, ck.key.length); for (int i = 0; i < max; ++i) { ! if (key[i] != ck.key[i]) ! return key[i] - ck.key[i]; } ! return key.length - ck.key.length; } ! /** ! * This method compares the specified object to this one. The specified ! * object must be an instance of CollationKey or an exception ! * will be thrown. An integer is returned which indicates whether the ! * specified object is less than, greater than, or equal to this object. ! * ! * @param obj The Object to compare against this one. ! * ! * @return A negative integer if this object is less than the specified object, 0 if it is equal or a positive integer if it is greater than the specified object. ! */ ! public int compareTo (Object obj) { ! return compareTo ((CollationKey) obj); } + /** + * This method tests the specified Object for equality with + * this object. This will be true if and only if: + *

                + *

                  + *
                • The specified object must not be null + *
                • The specified object is an instance of CollationKey. + *
                • The specified object was created from the same Collator + * as this object. + *
                • The specified object has the same source string and bit key as + * this object. + *
                + * + * @param obj The Object to test for equality. + * + * @return true if the specified object is equal to this one, false otherwise. + */ public boolean equals (Object obj) { if (! (obj instanceof CollationKey)) *************** public final class CollationKey implemen *** 46,67 **** CollationKey ck = (CollationKey) obj; ! if (key.length != ck.key.length) return false; ! for (int i = 0; i < key.length; ++i) ! if (key[i] != ck.key[i]) ! return false; return true; } ! public String getSourceString () { return originalText; } ! public int hashCode () { // We just follow BitSet instead of thinking up something new. long h = originalText.hashCode(); --- 159,195 ---- CollationKey ck = (CollationKey) obj; ! if (ck.collator != collator) return false; ! if (!ck.getSourceString ().equals (getSourceString ())) ! return false; ! ! if (!ck.toByteArray ().equals (toByteArray ())) ! return false; return true; } ! /** ! * This method returns the String that this object was created ! * from. ! * ! * @return The source String for this object. ! */ ! public String getSourceString() { return originalText; } ! /** ! * This method returns a hash value for this object. The hash value ! * returned will be the hash code of the bit key so that identical bit ! * keys will return the same value. ! * ! * @return A hash value for this object. ! */ ! public int hashCode() { // We just follow BitSet instead of thinking up something new. long h = originalText.hashCode(); *************** public final class CollationKey implemen *** 69,76 **** h ^= key[i] * (i + 1); return (int) ((h >> 32) ^ h); } ! ! public byte[] toByteArray () { byte[] r = new byte[4 * key.length]; int off = 0; --- 197,209 ---- h ^= key[i] * (i + 1); return (int) ((h >> 32) ^ h); } ! ! /** ! * This method returns the collation bit sequence as a byte array. ! * ! * @param A byte array containing the collation bit sequence. ! */ ! public byte[] toByteArray() { byte[] r = new byte[4 * key.length]; int off = 0; *************** public final class CollationKey implemen *** 83,109 **** } return r; } - - CollationKey (CollationElementIterator iter, String originalText, - int strength) - { - this.originalText = originalText; - - // Compute size of required array. - int size = 0; - while (RuleBasedCollator.next(iter, strength) - != CollationElementIterator.NULLORDER) - ++size; - - iter.reset(); - key = new int[size]; - for (int i = 0; i < size; i++) - key[i] = RuleBasedCollator.next(iter, strength); - } - - // Original string. - private String originalText; - - // Collation key. - private int[] key; } --- 216,219 ---- diff -Nrc3pad gcc-3.3.3/libjava/java/text/DateFormat.java gcc-3.4.0/libjava/java/text/DateFormat.java *** gcc-3.3.3/libjava/java/text/DateFormat.java 2002-01-22 22:40:37.000000000 +0000 --- gcc-3.4.0/libjava/java/text/DateFormat.java 2003-12-02 13:13:23.000000000 +0000 *************** *** 1,5 **** /* DateFormat.java -- Class for formatting/parsing date/times ! Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* DateFormat.java -- Class for formatting/parsing date/times ! Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 38,44 **** package java.text; ! import java.util.*; /** * @author Per Bothner --- 38,50 ---- package java.text; ! import java.io.InvalidObjectException; ! import java.util.Calendar; ! import java.util.Date; ! import java.util.Locale; ! import java.util.MissingResourceException; ! import java.util.ResourceBundle; ! import java.util.TimeZone; /** * @author Per Bothner *************** public abstract class DateFormat extends *** 86,91 **** --- 92,188 ---- public static final int HOUR0_FIELD = 16; public static final int TIMEZONE_FIELD = 17; + + public static class Field extends Format.Field + { + static final long serialVersionUID = 7441350119349544720L; + + private int calendarField; + + public static final DateFormat.Field ERA + = new Field("era", Calendar.ERA); + public static final DateFormat.Field YEAR + = new Field("year", Calendar.YEAR); + public static final DateFormat.Field MONTH + = new Field("month", Calendar.MONTH); + public static final DateFormat.Field DAY_OF_MONTH + = new Field("day of month", Calendar.DAY_OF_MONTH); + public static final DateFormat.Field HOUR_OF_DAY1 + = new Field("hour of day 1", Calendar.HOUR_OF_DAY); + public static final DateFormat.Field HOUR_OF_DAY0 + = new Field("hour of day 0", Calendar.HOUR_OF_DAY); + public static final DateFormat.Field MINUTE + = new Field("minute", Calendar.MINUTE); + public static final DateFormat.Field SECOND + = new Field("second", Calendar.SECOND); + public static final DateFormat.Field MILLISECOND + = new Field("millisecond", Calendar.MILLISECOND); + public static final DateFormat.Field DAY_OF_WEEK + = new Field("day of week", Calendar.DAY_OF_WEEK); + public static final DateFormat.Field DAY_OF_YEAR + = new Field("day of year", Calendar.DAY_OF_YEAR); + public static final DateFormat.Field DAY_OF_WEEK_IN_MONTH + = new Field("day of week in month", Calendar.DAY_OF_WEEK_IN_MONTH); + public static final DateFormat.Field WEEK_OF_YEAR + = new Field("week of year", Calendar.WEEK_OF_YEAR); + public static final DateFormat.Field WEEK_OF_MONTH + = new Field("week of month", Calendar.WEEK_OF_MONTH); + public static final DateFormat.Field AM_PM + = new Field("am/pm", Calendar.AM_PM); + public static final DateFormat.Field HOUR1 + = new Field("hour1", Calendar.HOUR); + public static final DateFormat.Field HOUR0 + = new Field("hour0", Calendar.HOUR); + public static final DateFormat.Field TIME_ZONE + = new Field("timezone", Calendar.ZONE_OFFSET); + + public static final DateFormat.Field[] allFields = + { + ERA, YEAR, MONTH, DAY_OF_MONTH, HOUR_OF_DAY1, + HOUR_OF_DAY0, MINUTE, SECOND, MILLISECOND, + DAY_OF_WEEK, DAY_OF_YEAR, DAY_OF_WEEK_IN_MONTH, + WEEK_OF_YEAR, WEEK_OF_MONTH, AM_PM, HOUR1, HOUR0, + TIME_ZONE + }; + + // For deserialization + private Field() + { + super(""); + } + + protected Field(String name, int calendarField) + { + super(name); + this.calendarField = calendarField; + } + + public int getCalendarField() + { + return calendarField; + } + + public static Field ofCalendarField(int calendarField) + { + if (calendarField >= allFields.length || calendarField < 0) + throw new IllegalArgumentException("no such calendar field (" + + calendarField + ")"); + + return allFields[calendarField]; + } + + protected Object readResolve() throws InvalidObjectException + { + String s = getName(); + + for (int i=0;iDateFormat
                . */ *************** public abstract class DateFormat extends *** 101,107 **** *
                  *
                • Is not null. *
                • Is an instance of DateFormat. ! *
                • Has the same calendar and numberFormat field values as this object. *
                * * @param obj The object to test for equality against. --- 198,204 ---- *
                  *
                • Is not null. *
                • Is an instance of DateFormat. ! *
                • Has the same numberFormat field value as this object. *
                * * @param obj The object to test for equality against. *************** public abstract class DateFormat extends *** 111,120 **** */ public boolean equals (Object obj) { ! if (! (obj instanceof DateFormat)) return false; DateFormat d = (DateFormat) obj; ! return calendar.equals(d.calendar) && numberFormat.equals(d.numberFormat); } /** --- 208,219 ---- */ public boolean equals (Object obj) { ! if (!(obj instanceof DateFormat)) return false; + DateFormat d = (DateFormat) obj; ! ! return numberFormat.equals(d.numberFormat); } /** *************** public abstract class DateFormat extends *** 149,154 **** --- 248,257 ---- { if (obj instanceof Number) obj = new Date(((Number) obj).longValue()); + else if (! (obj instanceof Date)) + throw new IllegalArgumentException + ("Cannot format given Object as a Date"); + return format ((Date) obj, buf, pos); } *************** public abstract class DateFormat extends *** 467,476 **** */ public int hashCode () { - int hash = calendar.hashCode(); if (numberFormat != null) ! hash ^= numberFormat.hashCode(); ! return hash; } /** --- 570,579 ---- */ public int hashCode () { if (numberFormat != null) ! return numberFormat.hashCode(); ! else ! return 0; } /** diff -Nrc3pad gcc-3.3.3/libjava/java/text/DateFormatSymbols.java gcc-3.4.0/libjava/java/text/DateFormatSymbols.java *** gcc-3.3.3/libjava/java/text/DateFormatSymbols.java 2002-01-22 22:40:37.000000000 +0000 --- gcc-3.4.0/libjava/java/text/DateFormatSymbols.java 2003-08-26 22:42:36.000000000 +0000 *************** *** 1,5 **** /* ChoiceFormat.java -- Format over a range of numbers ! Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ChoiceFormat.java -- Format over a range of numbers ! Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** public class DateFormatSymbols implement *** 156,179 **** * locale): *

                *

                  ! *
                • 0 - era (G) ! *
                • 1 - year (y) ! *
                • 2 - month (M) ! *
                • 4 - hour out of 12, from 1-12 (h) ! *
                • 5 - hour out of 24, from 0-23 (H) ! *
                • 6 - minute (m) ! *
                • 7 - second (s) ! *
                • 8 - millisecond (S) ! *
                • 9 - date of week (E) ! *
                • 10 - date of year (D) ! *
                • 11 - day of week in month, eg. "4th Thur in Nov" (F) ! *
                • 12 - week in year (w) ! *
                • 13 - week in month (W) ! *
                • 14 - am/pm (a) ! *
                • 15 - hour out of 24, from 1-24 (k) ! *
                • 16 - hour out of 12, from 0-11 (K) ! *
                • 17 - time zone (z) *
                * * @return The format patter characters --- 156,179 ---- * locale): *

                *

                  ! *
                • 0 - era (G)
                • ! *
                • 1 - year (y)
                • ! *
                • 2 - month (M)
                • ! *
                • 3 - day of month (d)
                • ! *
                • 4 - hour out of 12, from 1-12 (h)
                • ! *
                • 5 - hour out of 24, from 0-23 (H)
                • ! *
                • 6 - minute (m)
                • ! *
                • 7 - second (s)
                • ! *
                • 8 - millisecond (S)
                • ! *
                • 9 - date of week (E)
                • ! *
                • 10 - date of year (D)
                • ! *
                • 11 - day of week in month, eg. "4th Thur in Nov" (F)
                • ! *
                • 12 - week in year (w)
                • ! *
                • 13 - week in month (W)
                • ! *
                • 14 - am/pm (a)
                • ! *
                • 15 - hour out of 24, from 1-24 (k)
                • ! *
                • 16 - hour out of 12, from 0-11 (K)
                • ! *
                • 17 - time zone (z)
                • *
                * * @return The format patter characters *************** public class DateFormatSymbols implement *** 295,318 **** * locale): *

                *

                  ! *
                • 0 - era (G) ! *
                • 1 - year (y) ! *
                • 2 - month (M) ! *
                • 4 - hour out of 12, from 1-12 (h) ! *
                • 5 - hour out of 24, from 0-23 (H) ! *
                • 6 - minute (m) ! *
                • 7 - second (s) ! *
                • 8 - millisecond (S) ! *
                • 9 - date of week (E) ! *
                • 10 - date of year (D) ! *
                • 11 - day of week in month, eg. "4th Thur in Nov" (F) ! *
                • 12 - week in year (w) ! *
                • 13 - week in month (W) ! *
                • 14 - am/pm (a) ! *
                • 15 - hour out of 24, from 1-24 (k) ! *
                • 16 - hour out of 12, from 0-11 (K) ! *
                • 17 - time zone (z) *
                * * @param localPatternChars The new format patter characters --- 295,318 ---- * locale): *

                *

                  ! *
                • 0 - era (G)
                • ! *
                • 1 - year (y)
                • ! *
                • 2 - month (M)
                • ! *
                • 3 - day of month (d)
                • ! *
                • 4 - hour out of 12, from 1-12 (h)
                • ! *
                • 5 - hour out of 24, from 0-23 (H)
                • ! *
                • 6 - minute (m)
                • ! *
                • 7 - second (s)
                • ! *
                • 8 - millisecond (S)
                • ! *
                • 9 - date of week (E)
                • ! *
                • 10 - date of year (D)
                • ! *
                • 11 - day of week in month, eg. "4th Thur in Nov" (F)
                • ! *
                • 12 - week in year (w)
                • ! *
                • 13 - week in month (W)
                • ! *
                • 14 - am/pm (a)
                • ! *
                • 15 - hour out of 24, from 1-24 (k)
                • ! *
                • 16 - hour out of 12, from 0-11 (K)
                • ! *
                • 17 - time zone (z)
                • *
                * * @param localPatternChars The new format patter characters diff -Nrc3pad gcc-3.3.3/libjava/java/text/DecimalFormat.java gcc-3.4.0/libjava/java/text/DecimalFormat.java *** gcc-3.3.3/libjava/java/text/DecimalFormat.java 2002-01-22 22:40:37.000000000 +0000 --- gcc-3.4.0/libjava/java/text/DecimalFormat.java 2003-11-19 12:06:38.000000000 +0000 *************** *** 1,5 **** /* DecimalFormat.java -- Formats and parses numbers ! Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* DecimalFormat.java -- Formats and parses numbers ! Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,42 **** --- 37,43 ---- package java.text; + import java.util.Currency; import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle; *************** public class DecimalFormat extends Numbe *** 202,207 **** --- 203,210 ---- } else if (c != syms.getExponential() && c != syms.getPatternSeparator() + && c != syms.getPercent() + && c != syms.getPerMill() && patChars.indexOf(c) != -1) throw new IllegalArgumentException ("unexpected special " + "character - index: " + index); *************** public class DecimalFormat extends Numbe *** 456,462 **** exponent = (long) Math.floor (Math.log(number) / Math.log(10)); if (minimumIntegerDigits > 0) exponent -= minimumIntegerDigits - 1; ! baseNumber = (long) (number / Math.pow(10.0, exponent)); } else baseNumber = number; --- 459,465 ---- exponent = (long) Math.floor (Math.log(number) / Math.log(10)); if (minimumIntegerDigits > 0) exponent -= minimumIntegerDigits - 1; ! baseNumber = (number / Math.pow(10.0, exponent)); } else baseNumber = number; *************** public class DecimalFormat extends Numbe *** 474,480 **** intPart = Math.floor(intPart / 10); // Append group separator if required. ! if (groupingUsed && count > 0 && count % groupingSize == 0) dest.insert(index, symbols.getGroupingSeparator()); dest.insert(index, (char) (symbols.getZeroDigit() + dig)); --- 477,483 ---- intPart = Math.floor(intPart / 10); // Append group separator if required. ! if (groupingUsed && count > 0 && groupingSize != 0 && count % groupingSize == 0) dest.insert(index, symbols.getGroupingSeparator()); dest.insert(index, (char) (symbols.getZeroDigit() + dig)); *************** public class DecimalFormat extends Numbe *** 602,608 **** } // Append group separator if required. ! if (groupingUsed && count > 0 && count % groupingSize == 0) dest.insert(index, symbols.getGroupingSeparator()); dest.insert(index, (char) (symbols.getZeroDigit() + dig)); --- 605,611 ---- } // Append group separator if required. ! if (groupingUsed && count > 0 && groupingSize != 0 && count % groupingSize == 0) dest.insert(index, symbols.getGroupingSeparator()); dest.insert(index, (char) (symbols.getZeroDigit() + dig)); *************** public class DecimalFormat extends Numbe *** 635,640 **** --- 638,656 ---- return dest; } + /** + * Returns the currency corresponding to the currency symbol stored + * in the instance of DecimalFormatSymbols used by this + * DecimalFormat. + * + * @return A new instance of Currency if + * the currency code matches a known one, null otherwise. + */ + public Currency getCurrency() + { + return symbols.getCurrency(); + } + public DecimalFormatSymbols getDecimalFormatSymbols () { return symbols; *************** public class DecimalFormat extends Numbe *** 693,700 **** int index = pos.getIndex(); StringBuffer buf = new StringBuffer (); ! // We have to check both prefixes, because one might be empty. ! // We want to pick the longest prefix that matches. boolean got_pos = str.startsWith(positivePrefix, index); String np = (negativePrefix != null ? negativePrefix --- 709,716 ---- int index = pos.getIndex(); StringBuffer buf = new StringBuffer (); ! // We have to check both prefixes, because one might be empty. We ! // want to pick the longest prefix that matches. boolean got_pos = str.startsWith(positivePrefix, index); String np = (negativePrefix != null ? negativePrefix *************** public class DecimalFormat extends Numbe *** 729,739 **** // FIXME: handle Inf and NaN. ! // FIXME: do we have to respect minimum/maxmimum digit stuff? ! // What about leading zeros? What about multiplier? int start_index = index; int max = str.length(); char zero = symbols.getZeroDigit(); int last_group = -1; boolean int_part = true; --- 745,758 ---- // FIXME: handle Inf and NaN. ! // FIXME: do we have to respect minimum digits? ! // What about leading zeros? What about multiplier? int start_index = index; int max = str.length(); + int last = index + maximumIntegerDigits; + if (last > 0 && max > last) + max = last; char zero = symbols.getZeroDigit(); int last_group = -1; boolean int_part = true; *************** public class DecimalFormat extends Numbe *** 745,751 **** // FIXME: what about grouping size? if (groupingUsed && c == symbols.getGroupingSeparator()) { ! if (last_group != -1 && (index - last_group) % groupingSize != 0) { pos.setErrorIndex(index); --- 764,771 ---- // FIXME: what about grouping size? if (groupingUsed && c == symbols.getGroupingSeparator()) { ! if (last_group != -1 ! && groupingSize != 0 && (index - last_group) % groupingSize != 0) { pos.setErrorIndex(index); *************** public class DecimalFormat extends Numbe *** 762,768 **** break; else if (c == symbols.getDecimalSeparator()) { ! if (last_group != -1 && (index - last_group) % groupingSize != 0) { pos.setErrorIndex(index); --- 782,789 ---- break; else if (c == symbols.getDecimalSeparator()) { ! if (last_group != -1 ! && groupingSize != 0 && (index - last_group) % groupingSize != 0) { pos.setErrorIndex(index); *************** public class DecimalFormat extends Numbe *** 849,854 **** --- 870,885 ---- return result; } + /** + * Sets the Currency on the + * DecimalFormatSymbols used, which also sets the + * currency symbols on those symbols. + */ + public void setCurrency(Currency currency) + { + symbols.setCurrency(currency); + } + public void setDecimalFormatSymbols (DecimalFormatSymbols newSymbols) { symbols = newSymbols; *************** public class DecimalFormat extends Numbe *** 866,887 **** public void setMaximumFractionDigits (int newValue) { ! maximumFractionDigits = Math.min(newValue, 340); } public void setMaximumIntegerDigits (int newValue) { ! maximumIntegerDigits = Math.min(newValue, 309); } public void setMinimumFractionDigits (int newValue) { ! minimumFractionDigits = Math.min(newValue, 340); } public void setMinimumIntegerDigits (int newValue) { ! minimumIntegerDigits = Math.min(newValue, 309); } public void setMultiplier (int newValue) --- 897,918 ---- public void setMaximumFractionDigits (int newValue) { ! super.setMaximumFractionDigits(Math.min(newValue, 340)); } public void setMaximumIntegerDigits (int newValue) { ! super.setMaximumIntegerDigits(Math.min(newValue, 309)); } public void setMinimumFractionDigits (int newValue) { ! super.setMinimumFractionDigits(Math.min(newValue, 340)); } public void setMinimumIntegerDigits (int newValue) { ! super.setMinimumIntegerDigits(Math.min(newValue, 309)); } public void setMultiplier (int newValue) diff -Nrc3pad gcc-3.3.3/libjava/java/text/DecimalFormatSymbols.java gcc-3.4.0/libjava/java/text/DecimalFormatSymbols.java *** gcc-3.3.3/libjava/java/text/DecimalFormatSymbols.java 2002-01-22 22:40:37.000000000 +0000 --- gcc-3.4.0/libjava/java/text/DecimalFormatSymbols.java 2003-11-27 09:49:22.000000000 +0000 *************** exception statement from your version. * *** 39,44 **** --- 39,45 ---- package java.text; import java.io.Serializable; + import java.util.Currency; import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle; *************** public final class DecimalFormatSymbols *** 157,162 **** --- 158,164 ---- percent = safeGetChar (res, "percent", '%'); perMill = safeGetChar (res, "perMill", '\u2030'); zeroDigit = safeGetChar (res, "zeroDigit", '0'); + locale = loc; } /** *************** public final class DecimalFormatSymbols *** 195,200 **** --- 197,214 ---- } /** + * Returns the currency corresponding to the currency symbol stored + * in the instance of DecimalFormatSymbols. + * + * @return A new instance of Currency if + * the currency code matches a known one. + */ + public Currency getCurrency () + { + return Currency.getInstance (currencySymbol); + } + + /** * This method returns the currency symbol in local format. For example, * "$" for Canadian dollars. * *************** public final class DecimalFormatSymbols *** 354,359 **** --- 368,383 ---- } /** + * This method sets the currency to the specified value. + * + * @param currency The new currency + */ + public void setCurrency (Currency currency) + { + setCurrencySymbol (currency.getSymbol()); + } + + /** * This method sets the currency symbol to the specified value. * * @param currencySymbol The new currency symbol *************** public final class DecimalFormatSymbols *** 557,569 **** /** * @serial This value represents the type of object being de-serialized. * 0 indicates a pre-Java 1.1.6 version, 1 indicates 1.1.6 or later. ! */ ! private int serialVersionOnStream = 1; /** * @serial This is the character used to represent 0. */ private char zeroDigit; private static final long serialVersionUID = 5772796243397350300L; private void readObject(ObjectInputStream stream) --- 581,600 ---- /** * @serial This value represents the type of object being de-serialized. * 0 indicates a pre-Java 1.1.6 version, 1 indicates 1.1.6 or later. ! * 0 indicates a pre-Java 1.1.6 version, 1 indicates 1.1.6 or later, ! * 2 indicates 1.4 or later ! */ ! private int serialVersionOnStream = 2; /** * @serial This is the character used to represent 0. */ private char zeroDigit; + /** + * @serial The locale of these currency symbols. + */ + private Locale locale; + private static final long serialVersionUID = 5772796243397350300L; private void readObject(ObjectInputStream stream) *************** public final class DecimalFormatSymbols *** 574,580 **** { monetarySeparator = decimalSeparator; exponential = 'E'; - serialVersionOnStream = 1; } } } --- 605,614 ---- { monetarySeparator = decimalSeparator; exponential = 'E'; } + if (serialVersionOnStream < 2) + locale = Locale.getDefault(); + + serialVersionOnStream = 2; } } diff -Nrc3pad gcc-3.3.3/libjava/java/text/FieldPosition.java gcc-3.4.0/libjava/java/text/FieldPosition.java *** gcc-3.3.3/libjava/java/text/FieldPosition.java 2002-01-22 22:40:37.000000000 +0000 --- gcc-3.4.0/libjava/java/text/FieldPosition.java 2003-12-02 15:56:52.000000000 +0000 *************** public class FieldPosition *** 65,70 **** --- 65,102 ---- private int end; /** + * This is the field attribute value. + */ + private Format.Field field_attribute; + + /** + * This method initializes a new instance of FieldPosition + * to have the specified field attribute. The attribute will be used as + * an id. + * + * @param field The field format attribute. + */ + public FieldPosition (Format.Field field) + { + this.field_attribute = field; + } + + /** + * This method initializes a new instance of FieldPosition + * to have the specified field attribute. The attribute will be used as + * an id is non null. The integer field id is only used if the Format.Field + * attribute is not used by the formatter. + * + * @param field The field format attribute. + * @param field_id The field identifier value. + */ + public FieldPosition (Format.Field field, int field_id) + { + this.field_attribute = field; + this.field_id = field_id; + } + + /** * This method initializes a new instance of FieldPosition to * have the specified field id. * *************** public class FieldPosition *** 85,90 **** --- 117,127 ---- return field_id; } + public Format.Field getFieldAttribute () + { + return field_attribute; + } + /** * This method returns the beginning index for this field. * *************** public class FieldPosition *** 131,139 **** *

                *

                  *
                • The specified object is not null. ! *
                • The specified object is an instance of FieldPosition. ! *
                • The specified object has the same field identifier and beginning ! * and ending index as this object. *
                * * @param obj The object to test for equality to this object. --- 168,176 ---- *

                *

                  *
                • The specified object is not null. ! *
                • The specified object has the same class as this object. ! *
                • The specified object has the same field identifier, field attribute ! * and beginning and ending index as this object. *
                * * @param obj The object to test for equality to this object. *************** public class FieldPosition *** 143,157 **** */ public boolean equals (Object obj) { ! if (! (obj instanceof FieldPosition)) return false; FieldPosition fp = (FieldPosition) obj; return (field_id == fp.field_id && begin == fp.begin && end == fp.end); } /** * This method returns a String representation of this * object. --- 180,219 ---- */ public boolean equals (Object obj) { ! if (this == obj) ! return true; ! ! if (obj == null || obj.getClass() != this.getClass()) return false; FieldPosition fp = (FieldPosition) obj; return (field_id == fp.field_id + && (field_attribute == fp.field_attribute + || (field_attribute != null + && field_attribute.equals(fp.field_attribute))) && begin == fp.begin && end == fp.end); } + + /** + * This method returns a hash value for this object + * + * @return A hash value for this object. + */ + public int hashCode () + { + int hash = 5; + + hash = 31 * hash + field_id; + hash = 31 * hash + begin; + hash = 31 * hash + end; + hash = 31 * hash + + (null == field_attribute ? 0 : field_attribute.hashCode()); + + return hash; + } + /** * This method returns a String representation of this * object. *************** public class FieldPosition *** 160,166 **** */ public String toString () { ! return (getClass ().getName () + "[field=" + getField () + ",beginIndex=" ! + getBeginIndex () + ",endIndex=" + getEndIndex () + "]"); } } --- 222,232 ---- */ public String toString () { ! return (getClass ().getName () ! + "[field=" + getField () ! + ",attribute=" + getFieldAttribute () ! + ",beginIndex=" + getBeginIndex () ! + ",endIndex=" + getEndIndex () ! + "]"); } } diff -Nrc3pad gcc-3.3.3/libjava/java/text/FormatCharacterIterator.java gcc-3.4.0/libjava/java/text/FormatCharacterIterator.java *** gcc-3.3.3/libjava/java/text/FormatCharacterIterator.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/text/FormatCharacterIterator.java 2003-11-27 09:43:02.000000000 +0000 *************** *** 0 **** --- 1,469 ---- + /* FormatCharacter.java -- Implementation of AttributedCharacterIterator for + formatters. + Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + package java.text; + + import java.util.Set; + import java.util.HashSet; + import java.util.Map; + import java.util.HashMap; + import java.util.Vector; + + + /** + * This class should not be put public and it is only intended to the + * classes of the java.text package. Its aim is to build a segmented + * character iterator by appending strings and adding attributes to + * portions of strings. The code intends to do some optimization + * concerning memory consumption and attribute access but at the + * end it is only an AttributedCharacterIterator. + * + * @author Guilhem Lavaux + * @date November 22, 2003 + */ + class FormatCharacterIterator implements AttributedCharacterIterator + { + private String formattedString; + private int charIndex; + private int attributeIndex; + private int[] ranges; + private HashMap[] attributes; + + /** + * This constructor builds an empty iterated strings. The attributes + * are empty and so is the string. However you may append strings + * and attributes to this iterator. + */ + FormatCharacterIterator() + { + formattedString = ""; + ranges = new int[0]; + attributes = new HashMap[0]; + } + + /** + * This constructor take a string s, a set of ranges + * and the corresponding attributes. This is used to build an iterator. + * The array ranges should be formatted as follow: + * each element of ranges specifies the index in the string + * until which the corresponding map of attributes at the same position + * is applied. For example, if you have: + *
                +    *   s = "hello";
                +    *   ranges = new int[] { 2, 6 };
                +    *   attributes = new HashMap[2];
                +    * 
                + * "he" will have the attributes attributes[0], + * "llo" the attributes[1]. + */ + FormatCharacterIterator (String s, int[] ranges, HashMap[] attributes) + { + formattedString = s; + this.ranges = ranges; + this.attributes = attributes; + } + + /* + * The following methods are inherited from AttributedCharacterIterator, + * and thus are already documented. + */ + + public Set getAllAttributeKeys() + { + if (attributes != null && attributes[attributeIndex] != null) + return attributes[attributeIndex].keySet(); + else + return new HashSet(); + } + + public Map getAttributes() + { + if (attributes != null && attributes[attributeIndex] != null) + return attributes[attributeIndex]; + else + return new HashMap(); + } + + public Object getAttribute (AttributedCharacterIterator.Attribute attrib) + { + if (attributes != null && attributes[attributeIndex] != null) + return attributes[attributeIndex].get (attrib); + else + return null; + } + + public int getRunLimit(Set reqAttrs) + { + if (attributes == null) + return formattedString.length(); + + int currentAttrIndex = attributeIndex; + Set newKeys; + + do + { + currentAttrIndex++; + if (currentAttrIndex == attributes.length) + return formattedString.length(); + if (attributes[currentAttrIndex] == null) + break; + newKeys = attributes[currentAttrIndex].keySet(); + } + while (newKeys.containsAll (reqAttrs)); + + return ranges[currentAttrIndex-1]; + } + + public int getRunLimit (AttributedCharacterIterator.Attribute attribute) + { + Set s = new HashSet(); + + s.add (attribute); + return getRunLimit (s); + } + + public int getRunLimit() + { + if (attributes == null) + return formattedString.length(); + if (attributes[attributeIndex] == null) + { + for (int i=attributeIndex+1;i 0) ? ranges[currentAttrIndex-1] : 0; + } + + public int getRunStart() + { + if (attributes == null) + return 0; + + if (attributes[attributeIndex] == null) + { + for (int i=attributeIndex;i>0;i--) + if (attributes[i] != null) + return ranges[attributeIndex-1]; + return 0; + } + + return getRunStart (attributes[attributeIndex].keySet()); + } + + public int getRunStart (AttributedCharacterIterator.Attribute attribute) + { + Set s = new HashSet(); + + s.add (attribute); + return getRunStart (s); + } + + public Object clone() + { + return new FormatCharacterIterator (formattedString, ranges, attributes); + } + + /* + * The following methods are inherited from CharacterIterator and thus + * are already documented. + */ + + public char current() + { + return formattedString.charAt (charIndex); + } + + public char first() + { + charIndex = 0; + attributeIndex = 0; + return formattedString.charAt (0); + } + + public int getBeginIndex() + { + return 0; + } + + public int getEndIndex() + { + return formattedString.length(); + } + + public int getIndex() + { + return charIndex; + } + + public char last() + { + charIndex = formattedString.length()-1; + if (attributes != null) + attributeIndex = attributes.length-1; + return formattedString.charAt (charIndex); + } + + public char next() + { + charIndex++; + if (charIndex >= formattedString.length()) + { + charIndex = getEndIndex(); + return DONE; + } + if (attributes != null) + { + if (charIndex >= ranges[attributeIndex]) + attributeIndex++; + } + return formattedString.charAt (charIndex); + } + + public char previous() + { + charIndex--; + if (charIndex < 0) + { + charIndex = 0; + return DONE; + } + + if (attributes != null) + { + if (charIndex < ranges[attributeIndex]) + attributeIndex--; + } + return formattedString.charAt (charIndex); + } + + public char setIndex (int position) + { + if (position < 0 || position > formattedString.length()) + throw new IllegalArgumentException ("position is out of range"); + + charIndex = position; + if (attributes != null) + { + for (attributeIndex=0;attributeIndex charIndex) + break; + attributeIndex--; + } + if (charIndex == formattedString.length()) + return DONE; + else + return formattedString.charAt (charIndex); + } + + /** + * This method merge the specified attributes and ranges with the + * internal tables. This method is in charge of the optimization + * of tables. Two following sets of attributes are never the same. + * + * @see #FormatCharacterIterator() + * + * @param attributes the new array attributes to apply to the string. + */ + protected void mergeAttributes (HashMap[] attributes, int[] ranges) + { + Vector new_ranges = new Vector(); + Vector new_attributes = new Vector(); + int i = 0, j = 0; + + while (i < this.ranges.length && j < ranges.length) + { + if (this.attributes[i] != null) + { + new_attributes.add (this.attributes[i]); + if (attributes[j] != null) + this.attributes[i].putAll (attributes[j]); + } + else + { + new_attributes.add (attributes[j]); + } + if (this.ranges[i] == ranges[j]) + { + new_ranges.add (new Integer (ranges[j])); + i++; + j++; + } + else if (this.ranges[i] < ranges[j]) + { + new_ranges.add (new Integer (this.ranges[i])); + i++; + } + else + { + new_ranges.add (new Integer (ranges[j])); + j++; + } + } + + if (i != this.ranges.length) + { + for (;inull
                the string will simply have no + * attributes. + */ + protected void append (String text, HashMap local_attributes) + { + int[] new_ranges = new int[ranges.length+1]; + HashMap[] new_attributes = new HashMap[attributes.length+1]; + + formattedString += text; + System.arraycopy (attributes, 0, new_attributes, 0, attributes.length); + System.arraycopy (ranges, 0, new_ranges, 0, ranges.length); + new_ranges[ranges.length] = formattedString.length(); + new_attributes[attributes.length] = local_attributes; + + ranges = new_ranges; + attributes = new_attributes; + } + + /** + * This method appends a string without attributes. It is completely + * equivalent to call {@link #append(String,HashMap)} with local_attributes + * equal to null. + * + * @param text The string to append to the iterator. + */ + protected void append (String text) + { + append (text, null); + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/text/Format.java gcc-3.4.0/libjava/java/text/Format.java *** gcc-3.3.3/libjava/java/text/Format.java 2002-11-10 22:06:48.000000000 +0000 --- gcc-3.4.0/libjava/java/text/Format.java 2003-12-11 16:12:47.000000000 +0000 *************** *** 1,5 **** /* Format.java -- Abstract superclass for formatting/parsing strings. ! Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Format.java -- Abstract superclass for formatting/parsing strings. ! Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 38,43 **** --- 38,47 ---- package java.text; + import java.util.Set; + import java.util.Map; + import java.util.HashSet; + import java.util.HashMap; import java.io.Serializable; /** *************** public abstract class Format implements *** 61,66 **** --- 65,80 ---- { static final long serialVersionUID = -299282585814624189L; + public static class Field extends AttributedCharacterIterator.Attribute + { + static final long serialVersionUID = 276966692217360283L; + + public Field(String name) + { + super(name); + } + } + /** * This method initializes a new instance of Format. * It performs no actions, but acts as a default constructor for *************** public abstract class Format implements *** 142,147 **** --- 156,166 ---- */ public abstract Object parseObject (String str, ParsePosition pos); + public AttributedCharacterIterator formatToCharacterIterator(Object obj) + { + return new FormatCharacterIterator(format(obj), null, null); + } + /** * Creates a copy of this object. * diff -Nrc3pad gcc-3.3.3/libjava/java/text/MessageFormat.java gcc-3.4.0/libjava/java/text/MessageFormat.java *** gcc-3.3.3/libjava/java/text/MessageFormat.java 2002-07-02 19:43:06.000000000 +0000 --- gcc-3.4.0/libjava/java/text/MessageFormat.java 2004-01-14 19:45:11.000000000 +0000 *************** final class MessageFormatElement *** 143,148 **** --- 143,150 ---- public class MessageFormat extends Format { + private static final long serialVersionUID = 6479157306784022952L; + // Helper that returns the text up to the next format opener. The // text is put into BUFFER. Returns index of character after end of // string. Throws IllegalArgumentException on error. *************** public class MessageFormat extends Forma *** 168,174 **** else if (c == '{') break; else if (c == '}') ! throw new IllegalArgumentException (); else buffer.append(c); } --- 170,176 ---- else if (c == '{') break; else if (c == '}') ! throw new IllegalArgumentException("Found '}' without '{'"); else buffer.append(c); } *************** public class MessageFormat extends Forma *** 243,249 **** } catch (NumberFormatException nfx) { ! throw new IllegalArgumentException (); } // Extract the element format. --- 245,251 ---- } catch (NumberFormatException nfx) { ! throw new IllegalArgumentException("Failed to parse integer string"); } // Extract the element format. *************** public class MessageFormat extends Forma *** 262,268 **** // Advance past the last terminator. if (index >= max || pat.charAt(index) != '}') ! throw new IllegalArgumentException (); ++index; // Now fetch trailing string. --- 264,270 ---- // Advance past the last terminator. if (index >= max || pat.charAt(index) != '}') ! throw new IllegalArgumentException("Missing '}' at end of message format"); ++index; // Now fetch trailing string. *************** public class MessageFormat extends Forma *** 347,353 **** for (int i = 0; i < elements.length; ++i) { if (elements[i].argNumber >= arguments.length) ! throw new IllegalArgumentException (); Object thisArg = arguments[elements[i].argNumber]; Format formatter = null; --- 349,356 ---- for (int i = 0; i < elements.length; ++i) { if (elements[i].argNumber >= arguments.length) ! throw new IllegalArgumentException("Not enough arguments given"); ! Object thisArg = arguments[elements[i].argNumber]; Format formatter = null; *************** public class MessageFormat extends Forma *** 357,363 **** { if (elements[i].formatClass != null && ! elements[i].formatClass.isInstance(thisArg)) ! throw new IllegalArgumentException (); formatter = elements[i].format; } else if (thisArg instanceof Number) --- 360,367 ---- { if (elements[i].formatClass != null && ! elements[i].formatClass.isInstance(thisArg)) ! throw new IllegalArgumentException("Wrong format class"); ! formatter = elements[i].format; } else if (thisArg instanceof Number) *************** public class MessageFormat extends Forma *** 452,462 **** * Creates a new MessageFormat object with * the specified pattern * ! * @param aPattern The Pattern */ ! public MessageFormat (String pattern) { ! locale = Locale.getDefault(); applyPattern (pattern); } --- 456,480 ---- * Creates a new MessageFormat object with * the specified pattern * ! * @param pattern The Pattern */ ! public MessageFormat(String pattern) { ! this(pattern, Locale.getDefault()); ! } ! ! /** ! * Creates a new MessageFormat object with ! * the specified pattern ! * ! * @param pattern The Pattern ! * @param locale The Locale to use ! * ! * @since 1.4 ! */ ! public MessageFormat(String pattern, Locale locale) ! { ! this.locale = locale; applyPattern (pattern); } *************** public class MessageFormat extends Forma *** 580,586 **** public void setFormats (Format[] newFormats) { if (newFormats.length < elements.length) ! throw new IllegalArgumentException (); int len = Math.min(newFormats.length, elements.length); for (int i = 0; i < len; ++i) elements[i].setFormat = newFormats[i]; --- 598,605 ---- public void setFormats (Format[] newFormats) { if (newFormats.length < elements.length) ! throw new IllegalArgumentException("Not enough format objects"); ! int len = Math.min(newFormats.length, elements.length); for (int i = 0; i < len; ++i) elements[i].setFormat = newFormats[i]; diff -Nrc3pad gcc-3.3.3/libjava/java/text/NumberFormat.java gcc-3.4.0/libjava/java/text/NumberFormat.java *** gcc-3.3.3/libjava/java/text/NumberFormat.java 2002-01-22 22:40:37.000000000 +0000 --- gcc-3.4.0/libjava/java/text/NumberFormat.java 2003-12-19 10:00:02.000000000 +0000 *************** *** 1,5 **** /* NumberFormat.java -- Formats and parses numbers ! Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* NumberFormat.java -- Formats and parses numbers ! Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 38,49 **** package java.text; ! import java.util.Locale; ! import java.util.ResourceBundle; ! import java.util.MissingResourceException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; ! import java.io.IOException; /** * This is the abstract superclass of all classes which format and --- 38,51 ---- package java.text; ! import java.io.InvalidObjectException; ! import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; ! import java.util.Currency; ! import java.util.Locale; ! import java.util.MissingResourceException; ! import java.util.ResourceBundle; /** * This is the abstract superclass of all classes which format and *************** public abstract class NumberFormat exten *** 79,84 **** --- 81,212 ---- */ public static final int FRACTION_FIELD = 1; + public static class Field extends Format.Field + { + static final long serialVersionUID = 7494728892700160890L; + + /** + * Attribute set to all characters containing digits of the integer + * part. + */ + public static final NumberFormat.Field INTEGER + = new Field("integer"); + + /** + * Attribute set to all characters containing digits of the fractional + * part. + */ + public static final NumberFormat.Field FRACTION + = new Field("fraction"); + + /** + * Attribute set to all characters containing digits of the exponential + * part. + */ + public static final NumberFormat.Field EXPONENT + = new Field("exponent"); + + /** + * Attribute set to all characters containing a decimal separator. + */ + public static final NumberFormat.Field DECIMAL_SEPARATOR + = new Field("decimal separator"); + + /** + * Attribute set to all characters containing a sign (plus or minus). + */ + public static final NumberFormat.Field SIGN + = new Field("sign"); + + /** + * Attribute set to all characters containing a grouping separator (e.g. + * a comma, a white space,...). + */ + public static final NumberFormat.Field GROUPING_SEPARATOR + = new Field("grouping separator"); + + /** + * Attribute set to all characters containing an exponential symbol (e.g. + * 'E') + */ + public static final NumberFormat.Field EXPONENT_SYMBOL + = new Field("exponent symbol"); + + /** + * Attribute set to all characters containing a percent symbol (e.g. '%') + */ + public static final NumberFormat.Field PERCENT + = new Field("percent"); + + /** + * Attribute set to all characters containing a permille symbol. + */ + public static final NumberFormat.Field PERMILLE + = new Field("permille"); + + /** + * Attribute set to all characters containing the currency unit. + */ + public static final NumberFormat.Field CURRENCY + = new Field("currency"); + + /** + * Attribute set to all characters containing the exponent sign. + */ + public static final NumberFormat.Field EXPONENT_SIGN + = new Field("exponent sign"); + + /** + * Private fields to register all fields contained in this descriptor. + */ + private static final NumberFormat.Field[] allFields = + { + INTEGER, FRACTION, EXPONENT, DECIMAL_SEPARATOR, SIGN, + GROUPING_SEPARATOR, EXPONENT_SYMBOL, PERCENT, + PERMILLE, CURRENCY, EXPONENT_SIGN + }; + + /** + * This constructor is only used by the deserializer. Without it, + * it would fail to construct a valid object. + */ + private Field() + { + super(""); + } + + /** + * Create a Field instance with the specified field name. + * + * @param field_name Field name for the new Field instance. + */ + protected Field(String field_name) + { + super (field_name); + } + + /** + * This function is used by the deserializer to know which object + * to use when it encounters an encoded NumberFormat.Field in a + * serialization stream. If the stream is valid it should return + * one of the above field. In the other case we throw an exception. + * + * @return a valid official NumberFormat.Field instance. + * + * @throws InvalidObjectException if the field name is invalid. + */ + protected Object readResolve() throws InvalidObjectException + { + String s = getName(); + for (int i = 0; i < allFields.length; i++) + if (s.equals(allFields[i].getName())) + return allFields[i]; + + throw new InvalidObjectException("no such NumberFormat field called " + + s); + } + } + /** * This method is a specialization of the format method that performs * a simple formatting of the specified long number. *************** public abstract class NumberFormat exten *** 326,331 **** --- 454,489 ---- } /** + * This method returns an integer formatting and parsing class for the + * default locale. This will be a concrete subclass of NumberFormat, + * but the actual class returned is dependent on the locale. + * + * @return An instance of an integer number formatter for the default locale. + * @since 1.4 + */ + public static final NumberFormat getIntegerInstance() + { + return getIntegerInstance (Locale.getDefault()); + } + + /** + * This method returns an integer formatting and parsing class for the + * default locale. This will be a concrete subclass of NumberFormat, + * but the actual class returned is dependent on the locale. + * + * @param locale the desired locale. + * + * @return An instance of an integer number formatter for the desired locale. + * @since 1.4 + */ + public static NumberFormat getIntegerInstance(Locale locale) + { + NumberFormat format = computeInstance (locale, "numberFormat", "#,##0"); + format.setParseIntegerOnly (true); + return format; + } + + /** * This method returns an instance of NumberFormat suitable * for formatting and parsing percentage values in the default locale. * *************** public abstract class NumberFormat exten *** 603,606 **** --- 761,804 ---- serialVersionOnStream = 1; stream.defaultWriteObject(); } + + /** + * Returns the currency used by this number format when formatting currency + * values. + * + * The default implementation throws UnsupportedOperationException. + * + * @return The used currency object, or null. + * + * @throws UnsupportedOperationException If the number format class doesn't + * implement currency formatting. + * + * @since 1.4 + */ + public Currency getCurrency() + { + throw new UnsupportedOperationException(); + } + + /** + * Sets the currency used by this number format when formatting currency + * values. + * + * The default implementation throws UnsupportedOperationException. + * + * @param currency The new currency to be used by this number format. + * + * @throws NullPointerException If currenc is null. + * @throws UnsupportedOperationException If the number format class doesn't + * implement currency formatting. + * + * @since 1.4 + */ + public void setCurreny(Currency currency) + { + if (currency == null) + throw new NullPointerException("currency may not be null"); + + throw new UnsupportedOperationException(); + } } diff -Nrc3pad gcc-3.3.3/libjava/java/text/RuleBasedCollator.java gcc-3.4.0/libjava/java/text/RuleBasedCollator.java *** gcc-3.3.3/libjava/java/text/RuleBasedCollator.java 2001-09-07 00:15:47.000000000 +0000 --- gcc-3.4.0/libjava/java/text/RuleBasedCollator.java 2004-01-07 18:40:08.000000000 +0000 *************** *** 1,12 **** ! // RuleBasedCollator.java - Concrete class for locale-based string compare. ! /* Copyright (C) 1999, 2000, 2001 Free Software Foundation ! This file is part of libgcj. ! This software is copyrighted work licensed under the terms of the ! Libgcj License. Please consult the file "LIBGCJ_LICENSE" for ! details. */ package java.text; --- 1,39 ---- ! /* RuleBasedCollator.java -- Concrete Collator Class ! Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. ! This file is part of GNU Classpath. ! GNU Classpath is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! GNU Classpath is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with GNU Classpath; see the file COPYING. If not, write to the ! Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ! 02111-1307 USA. ! ! Linking this library statically or dynamically with other modules is ! making a combined work based on this library. Thus, the terms and ! conditions of the GNU General Public License cover the whole ! combination. ! ! As a special exception, the copyright holders of this library give you ! permission to link this library with independent modules to produce an ! executable, regardless of the license terms of these independent ! modules, and to copy and distribute the resulting executable under ! terms of your choice, provided that you also meet, for each linked ! independent module, the terms and conditions of the license of that ! module. An independent module is a module which is not derived from ! or based on this library. If you modify this library, you may extend ! this exception to your version of the library, but you are not ! obligated to do so. If you do not wish to do so, delete this ! exception statement from your version. */ package java.text; *************** import java.util.Enumeration; *** 14,43 **** import java.util.Hashtable; import java.util.Vector; - /** - * @author Tom Tromey - * @date March 25, 1999 - */ /* Written using "Java Class Libraries", 2nd edition, plus online * API docs for JDK 1.2 from http://www.javasoft.com. * Status: Believed complete and correct */ ! final class RBCElement { ! String key; ! char relation; ! RBCElement (String key, char relation) { ! this.key = key; ! this.relation = relation; } - } ! public class RuleBasedCollator extends Collator ! { ! public Object clone () { RuleBasedCollator c = (RuleBasedCollator) super.clone (); c.map = (Hashtable) map.clone (); --- 41,327 ---- import java.util.Hashtable; import java.util.Vector; /* Written using "Java Class Libraries", 2nd edition, plus online * API docs for JDK 1.2 from http://www.javasoft.com. * Status: Believed complete and correct */ ! /** ! * This class is a concrete subclass of Collator suitable ! * for string collation in a wide variety of languages. An instance of ! * this class is normally returned by the getInstance method ! * of Collator with rules predefined for the requested ! * locale. However, an instance of this class can be created manually ! * with any desired rules. ! *

                ! * Rules take the form of a String with the following syntax ! *

                  ! *
                • Modifier: '@' ! *
                • Relation: '<' | ';' | ',' | '=' : ! *
                • Reset: '&' : ! *
                ! * The modifier character indicates that accents sort backward as is the ! * case with French. The modifier applies to all rules after ! * the modifier but before the next primary sequence. If placed at the end ! * of the sequence if applies to all unknown accented character. ! * The relational operators specify how the text ! * argument relates to the previous term. The relation characters have ! * the following meanings: ! *
                  ! *
                • '<' - The text argument is greater than the prior term at the primary ! * difference level. ! *
                • ';' - The text argument is greater than the prior term at the secondary ! * difference level. ! *
                • ',' - The text argument is greater than the prior term at the tertiary ! * difference level. ! *
                • '=' - The text argument is equal to the prior term ! *
                ! *

                ! * As for the text argument itself, this is any sequence of Unicode ! * characters not in the following ranges: 0x0009-0x000D, 0x0020-0x002F, ! * 0x003A-0x0040, 0x005B-0x0060, and 0x007B-0x007E. If these characters are ! * desired, they must be enclosed in single quotes. If any whitespace is ! * encountered, it is ignored. (For example, "a b" is equal to "ab"). ! *

                ! * The reset operation inserts the following rule at the point where the ! * text argument to it exists in the previously declared rule string. This ! * makes it easy to add new rules to an existing string by simply including ! * them in a reset sequence at the end. Note that the text argument, or ! * at least the first character of it, must be present somewhere in the ! * previously declared rules in order to be inserted properly. If this ! * is not satisfied, a ParseException will be thrown. ! *

                ! * This system of configuring RuleBasedCollator is needlessly ! * complex and the people at Taligent who developed it (along with the folks ! * at Sun who accepted it into the Java standard library) deserve a slow ! * and agonizing death. ! *

                ! * Here are a couple of example of rule strings: ! *

                ! * "< a < b < c" - This string says that a is greater than b which is ! * greater than c, with all differences being primary differences. ! *

                ! * "< a,A < b,B < c,C" - This string says that 'A' is greater than 'a' with ! * a tertiary strength comparison. Both 'b' and 'B' are greater than 'a' and ! * 'A' during a primary strength comparison. But 'B' is greater than 'b' ! * under a tertiary strength comparison. ! *

                ! * "< a < c & a < b " - This sequence is identical in function to the ! * "< a < b < c" rule string above. The '&' reset symbol indicates that ! * the rule "< b" is to be inserted after the text argument "a" in the ! * previous rule string segment. ! *

                ! * "< a < b & y < z" - This is an error. The character 'y' does not appear ! * anywhere in the previous rule string segment so the rule following the ! * reset rule cannot be inserted. ! *

                ! * "< a & A @ < e & E < f& F" - This sequence is equivalent to the following ! * "< a & A < E & e < f & F". ! *

                ! * For a description of the various comparison strength types, see the ! * documentation for the Collator class. ! *

                ! * As an additional complication to this already overly complex rule scheme, ! * if any characters precede the first rule, these characters are considered ! * ignorable. They will be treated as if they did not exist during ! * comparisons. For example, "- < a < b ..." would make '-' an ignorable ! * character such that the strings "high-tech" and "hightech" would ! * be considered identical. ! *

                ! * A ParseException will be thrown for any of the following ! * conditions: ! *

                  ! *
                • Unquoted punctuation characters in a text argument. ! *
                • A relational or reset operator not followed by a text argument ! *
                • A reset operator where the text argument is not present in ! * the previous rule string section. ! *
                ! * ! * @author Aaron M. Renn ! * @author Tom Tromey ! * @author Guilhem Lavaux ! */ ! public class RuleBasedCollator extends Collator { ! /** ! * This class describes what rank has a character (or a sequence of characters) ! * in the lexicographic order. Each element in a rule has a collation element. ! */ ! final class CollationElement ! { ! String key; ! char relation; ! CollationElement(String key, char relation) ! { ! this.key = key; ! this.relation = relation; ! } ! } ! ! // True if we are using French-style accent ordering. ! private boolean frenchAccents; ! ! /** ! * This the the original rule string. ! */ ! private String rules; ! ! // This maps strings onto collation values. ! private Hashtable map; ! ! // An entry in this hash means that more lookahead is required for ! // the prefix string. ! private Hashtable prefixes; ! ! /** ! * This method initializes a new instance of RuleBasedCollator ! * with the specified collation rules. Note that an application normally ! * obtains an instance of RuleBasedCollator by calling the ! * getInstance method of Collator. That method ! * automatically loads the proper set of rules for the desired locale. ! * ! * @param rules The collation rule string. ! * ! * @exception ParseException If the rule string contains syntax errors. ! */ ! public RuleBasedCollator(String rules) throws ParseException { ! if (rules.equals("")) ! throw new ParseException("empty rule set", 0); ! ! this.rules = rules; ! ! // We keep each rule in order in a vector. At the end we traverse ! // the vector and compute collation values from it. ! int insertion_index = 0; ! Vector vec = new Vector (); ! ! int index; ! StringBuffer argument = new StringBuffer(); ! int len = rules.length(); ! ! for (index = 0; index < len; ++index) ! { ! char c = rules.charAt(index); ! ! // Just skip whitespace. ! if (Character.isWhitespace(c)) ! continue; ! ! // Modifier. ! if (c == '@') ! { ! frenchAccents = true; ! continue; ! } ! ! // Check for relation or reset operator. ! if (! (c == '<' || c == ';' || c == ',' || c == '=' || c == '&')) ! throw new ParseException ("invalid character", index); ! ! ++index; ! while (index < len) ! { ! if (! Character.isWhitespace(rules.charAt(index))) ! break; ! ++index; ! } ! if (index == len) ! throw new ParseException ("missing argument", index); ! ! int save = index; ! index = text_argument (rules, index, argument); ! if (argument.length() == 0) ! throw new ParseException ("invalid character", save); ! String arg = argument.toString(); ! int item_index = -1; ! ! for (int j = 0; j < vec.size(); ++j) ! { ! CollationElement e = (CollationElement) vec.elementAt (j); ! ! if (arg.equals (e.key)) ! { ! item_index = j; ! break; ! } ! } ! ! if (c != '&') ! { ! // If the argument already appears in the vector, then we ! // must remove it in order to re-order. ! if (item_index != -1) ! { ! vec.removeElementAt(item_index); ! if (insertion_index >= item_index) ! --insertion_index; ! } ! CollationElement r = new CollationElement (arg, c); ! vec.insertElementAt(r, insertion_index); ! ++insertion_index; ! } ! else ! { ! // Reset. ! if (item_index == -1) ! throw ! new ParseException ("argument to reset not previously seen", ! save); ! insertion_index = item_index + 1; ! } ! ! // Ugly: in this case the resulting INDEX comes from ! // text_argument, which returns the index of the next ! // character we should examine. ! --index; ! } ! ! // Now construct a hash table that maps strings onto their ! // collation values. ! int primary = 0; ! int secondary = 0; ! int tertiary = 0; ! this.map = new Hashtable (); ! this.prefixes = new Hashtable (); ! Enumeration e = vec.elements(); ! while (e.hasMoreElements()) ! { ! CollationElement r = (CollationElement) e.nextElement(); ! switch (r.relation) ! { ! case '<': ! ++primary; ! secondary = 0; ! tertiary = 0; ! break; ! case ';': ! ++secondary; ! tertiary = 0; ! break; ! case ',': ! ++tertiary; ! break; ! case '=': ! break; ! } ! // This must match CollationElementIterator. ! map.put(r.key, new Integer (primary << 16 ! | secondary << 8 | tertiary)); ! ! // Make a map of all lookaheads we might need. ! for (int i = r.key.length() - 1; i >= 1; --i) ! prefixes.put(r.key.substring(0, i), Boolean.TRUE); ! } } ! /** ! * This method creates a copy of this object. ! * ! * @return A copy of this object. ! */ ! public Object clone() { RuleBasedCollator c = (RuleBasedCollator) super.clone (); c.map = (Hashtable) map.clone (); *************** public class RuleBasedCollator extends C *** 54,60 **** return cei.lookahead; } ! int save = cei.index; int max = cei.text.length(); String s = null; --- 338,344 ---- return cei.lookahead; } ! int save = cei.textIndex; int max = cei.text.length(); String s = null; *************** public class RuleBasedCollator extends C *** 83,89 **** } // Update state. ! cei.index = i; if (obj == null) { --- 367,373 ---- } // Update state. ! cei.textIndex = i; if (obj == null) { *************** public class RuleBasedCollator extends C *** 126,139 **** } } ! public int compare (String source, String target) { CollationElementIterator cs, ct; ! cs = new CollationElementIterator (source, this); ! ct = new CollationElementIterator (target, this); ! while (true) { int os = next (cs, strength); int ot = next (ct, strength); --- 410,435 ---- } } ! /** ! * This method returns an integer which indicates whether the first ! * specified String is less than, greater than, or equal to ! * the second. The value depends not only on the collation rules in ! * effect, but also the strength and decomposition settings of this object. ! * ! * @param source The first String to compare. ! * @param target A second String to compare to the first. ! * ! * @return A negative integer if source < target, a positive integer ! * if source > target, or 0 if source == target. ! */ ! public int compare(String source, String target) { CollationElementIterator cs, ct; ! cs = new CollationElementIterator(this, source); ! ct = new CollationElementIterator(this, target); ! for(;;) { int os = next (cs, strength); int ot = next (ct, strength); *************** public class RuleBasedCollator extends C *** 159,165 **** return 0; } ! public boolean equals (Object obj) { if (! (obj instanceof RuleBasedCollator) || ! super.equals(obj)) return false; --- 455,471 ---- return 0; } ! /** ! * This method tests this object for equality against the specified ! * object. This will be true if and only if the specified object is ! * another reference to this object. ! * ! * @param obj The Object to compare against this object. ! * ! * @return true if the specified object is equal to this object, ! * false otherwise. ! */ ! public boolean equals(Object obj) { if (! (obj instanceof RuleBasedCollator) || ! super.equals(obj)) return false; *************** public class RuleBasedCollator extends C *** 170,207 **** && rules.equals(rbc.rules)); } ! public CollationElementIterator getCollationElementIterator (String source) { ! StringBuffer expand = new StringBuffer (source.length()); ! int max = source.length(); ! for (int i = 0; i < max; ++i) ! decomposeCharacter (source.charAt(i), expand); ! return new CollationElementIterator (expand.toString(), this); } ! public CollationElementIterator getCollationElementIterator (CharacterIterator source) { ! StringBuffer expand = new StringBuffer (); ! for (char c = source.first (); c != CharacterIterator.DONE; ! c = source.next ()) ! decomposeCharacter (c, expand); ! return new CollationElementIterator (expand.toString(), this); } ! public CollationKey getCollationKey (String source) { ! return new CollationKey (getCollationElementIterator (source), source, ! strength); } ! public String getRules () { return rules; } ! public int hashCode () { return (frenchAccents ? 1231 : 1237 ^ rules.hashCode() --- 476,559 ---- && rules.equals(rbc.rules)); } ! /** ! * This method returns an instance for CollationElementIterator ! * for the specified String under the collation rules for this ! * object. ! * ! * @param source The String to return the ! * CollationElementIterator instance for. ! * ! * @return A CollationElementIterator for the specified ! * String. ! */ ! public CollationElementIterator getCollationElementIterator(String source) { ! int len = source.length(); ! StringBuffer expand = new StringBuffer(len); ! ! for (int index = 0; index < len; ++index) ! decomposeCharacter(source.charAt(index), expand); ! ! return new CollationElementIterator(this, expand.toString()); } ! /** ! * This method returns an instance of CollationElementIterator ! * for the String represented by the specified ! * CharacterIterator. ! * ! * @param source The CharacterIterator with the desired String. ! * ! * @return A CollationElementIterator for the specified String. ! */ ! public CollationElementIterator getCollationElementIterator(CharacterIterator source) { ! StringBuffer expand = new StringBuffer(""); ! ! // Right now we assume that we will read from the beginning of the string. ! for (char c = source.first(); c != CharacterIterator.DONE; ! c = source.next()) ! decomposeCharacter(c, expand); ! return new CollationElementIterator(this, expand.toString()); } ! /** ! * This method returns an instance of CollationKey for the ! * specified String. The object returned will have a ! * more efficient mechanism for its comparison function that could ! * provide speed benefits if multiple comparisons are performed, such ! * as during a sort. ! * ! * @param source The String to create a CollationKey for. ! * ! * @return A CollationKey for the specified String. ! */ ! public CollationKey getCollationKey(String source) { ! return new CollationKey(this, getCollationElementIterator(source), source, ! strength); } ! /** ! * This method returns a String containing the collation rules ! * for this object. ! * ! * @return The collation rules for this object. ! */ ! public String getRules() { return rules; } ! /** ! * This method returns a hash value for this object. ! * ! * @return A hash value for this object. ! */ ! public int hashCode() { return (frenchAccents ? 1231 : 1237 ^ rules.hashCode() *************** public class RuleBasedCollator extends C *** 212,219 **** private final boolean is_special (char c) { // Rules from JCL book. ! return ((c >= 0x0009 && c <= 0x000d) ! || (c >= 0x0020 && c <= 0x002f) || (c >= 0x003a && c <= 0x0040) || (c >= 0x005b && c <= 0x0060) || (c >= 0x007b && c <= 0x007e)); --- 564,570 ---- private final boolean is_special (char c) { // Rules from JCL book. ! return ((c >= 0x0021 && c <= 0x002f) || (c >= 0x003a && c <= 0x0040) || (c >= 0x005b && c <= 0x0060) || (c >= 0x007b && c <= 0x007e)); *************** public class RuleBasedCollator extends C *** 226,369 **** int len = rules.length(); while (index < len) { ! char c = rules.charAt(index); ! if (c == '\'' && index + 2 < len ! && rules.charAt(index + 2) == '\'' ! && is_special (rules.charAt(index + 1))) ! index += 2; ! else if (is_special (c) || Character.isWhitespace(c)) return index; ! result.append(c); ! ++index; } return index; } - public RuleBasedCollator (String rules) throws ParseException - { - this.rules = rules; - this.frenchAccents = false; - - // We keep each rule in order in a vector. At the end we traverse - // the vector and compute collation values from it. - int insertion_index = 0; - Vector vec = new Vector (); - - StringBuffer argument = new StringBuffer (); - - int len = rules.length(); - for (int index = 0; index < len; ++index) - { - char c = rules.charAt(index); - - // Just skip whitespace. - if (Character.isWhitespace(c)) - continue; - - // Modifier. - if (c == '@') - { - frenchAccents = true; - continue; - } - - // Check for relation or reset operator. - if (! (c == '<' || c == ';' || c == ',' || c == '=' || c == '&')) - throw new ParseException ("invalid character", index); - - ++index; - while (index < len) - { - if (! Character.isWhitespace(rules.charAt(index))) - break; - ++index; - } - if (index == len) - throw new ParseException ("missing argument", index); - - int save = index; - index = text_argument (rules, index, argument); - if (argument.length() == 0) - throw new ParseException ("invalid character", save); - String arg = argument.toString(); - int item_index = vec.indexOf(arg); - if (c != '&') - { - // If the argument already appears in the vector, then we - // must remove it in order to re-order. - if (item_index != -1) - { - vec.removeElementAt(item_index); - if (insertion_index >= item_index) - --insertion_index; - } - RBCElement r = new RBCElement (arg, c); - vec.insertElementAt(r, insertion_index); - ++insertion_index; - } - else - { - // Reset. - if (item_index == -1) - throw - new ParseException ("argument to reset not previously seen", - save); - insertion_index = item_index + 1; - } - - // Ugly: in this case the resulting INDEX comes from - // text_argument, which returns the index of the next - // character we should examine. - --index; - } - - // Now construct a hash table that maps strings onto their - // collation values. - int primary = 0; - int secondary = 0; - int tertiary = 0; - this.map = new Hashtable (); - this.prefixes = new Hashtable (); - Enumeration e = vec.elements(); - while (e.hasMoreElements()) - { - RBCElement r = (RBCElement) e.nextElement(); - switch (r.relation) - { - case '<': - ++primary; - secondary = 0; - tertiary = 0; - break; - case ';': - ++secondary; - tertiary = 0; - break; - case ',': - ++tertiary; - break; - case '=': - break; - } - // This must match CollationElementIterator. - map.put(r.key, new Integer (primary << 16 - | secondary << 8 | tertiary)); - - // Make a map of all lookaheads we might need. - for (int i = r.key.length() - 1; i >= 1; --i) - prefixes.put(r.key.substring(0, i), Boolean.TRUE); - } - } - - // True if we are using French-style accent ordering. - private boolean frenchAccents; - - // It's easier to just save the rules than to try to recreate them. - private String rules; - - // This maps strings onto collation values. - private Hashtable map; - // An entry in this hash means that more lookahead is required for - // the prefix string. - private Hashtable prefixes; } --- 577,598 ---- int len = rules.length(); while (index < len) { ! char c = rules.charAt (index); ! if (c == '\'' ! && index + 2 < len ! && rules.charAt (index + 2) == '\'') ! { ! result.append (rules.charAt (index + 1)); ! index += 2; ! } ! else if (is_special (c)) return index; ! else if (!Character.isWhitespace (c)) ! result.append (c); ! ! ++index; } return index; } } diff -Nrc3pad gcc-3.3.3/libjava/java/text/SimpleDateFormat.java gcc-3.4.0/libjava/java/text/SimpleDateFormat.java *** gcc-3.3.3/libjava/java/text/SimpleDateFormat.java 2002-01-22 22:40:37.000000000 +0000 --- gcc-3.4.0/libjava/java/text/SimpleDateFormat.java 2003-12-02 16:15:15.000000000 +0000 *************** *** 1,6 **** /* SimpleDateFormat.java -- A class for parsing/formating simple date constructs ! Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,6 ---- /* SimpleDateFormat.java -- A class for parsing/formating simple date constructs ! Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 39,52 **** package java.text; import java.util.Calendar; import java.util.Date; - import java.util.Enumeration; import java.util.GregorianCalendar; import java.util.Locale; import java.util.TimeZone; import java.util.SimpleTimeZone; - import java.util.Vector; import java.io.ObjectInputStream; import java.io.IOException; --- 39,52 ---- package java.text; + import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; + import java.util.Iterator; import java.util.Locale; import java.util.TimeZone; import java.util.SimpleTimeZone; import java.io.ObjectInputStream; import java.io.IOException; *************** public class SimpleDateFormat extends Da *** 71,77 **** } } ! private transient Vector tokens; private DateFormatSymbols formatData; // formatData private Date defaultCenturyStart; private transient int defaultCentury; --- 71,77 ---- } } ! private transient ArrayList tokens; private DateFormatSymbols formatData; // formatData private Date defaultCenturyStart; private transient int defaultCentury; *************** public class SimpleDateFormat extends Da *** 98,104 **** set2DigitYearStart(defaultCenturyStart); // Set up items normally taken care of by the constructor. ! tokens = new Vector(); compileFormat(pattern); } --- 98,104 ---- set2DigitYearStart(defaultCenturyStart); // Set up items normally taken care of by the constructor. ! tokens = new ArrayList(); compileFormat(pattern); } *************** public class SimpleDateFormat extends Da *** 117,142 **** field = formatData.getLocalPatternChars().indexOf(thisChar); if (field == -1) { current = null; ! if (Character.isLetter(thisChar)) { // Not a valid letter ! tokens.addElement(new FieldSizePair(-1,0)); } else if (thisChar == '\'') { // Quoted text section; skip to next single quote pos = pattern.indexOf('\'',i+1); if (pos == -1) { // This ought to be an exception, but spec does not // let us throw one. ! tokens.addElement(new FieldSizePair(-1,0)); } if ((pos+1 < pattern.length()) && (pattern.charAt(pos+1) == '\'')) { ! tokens.addElement(pattern.substring(i+1,pos+1)); } else { ! tokens.addElement(pattern.substring(i+1,pos)); } i = pos; } else { // A special character ! tokens.addElement(new Character(thisChar)); } } else { // A valid field --- 117,143 ---- field = formatData.getLocalPatternChars().indexOf(thisChar); if (field == -1) { current = null; ! if ((thisChar >= 'A' && thisChar <= 'Z') ! || (thisChar >= 'a' && thisChar <= 'z')) { // Not a valid letter ! tokens.add(new FieldSizePair(-1,0)); } else if (thisChar == '\'') { // Quoted text section; skip to next single quote pos = pattern.indexOf('\'',i+1); if (pos == -1) { // This ought to be an exception, but spec does not // let us throw one. ! tokens.add(new FieldSizePair(-1,0)); } if ((pos+1 < pattern.length()) && (pattern.charAt(pos+1) == '\'')) { ! tokens.add(pattern.substring(i+1,pos+1)); } else { ! tokens.add(pattern.substring(i+1,pos)); } i = pos; } else { // A special character ! tokens.add(new Character(thisChar)); } } else { // A valid field *************** public class SimpleDateFormat extends Da *** 144,165 **** current.size++; } else { current = new FieldSizePair(field,1); ! tokens.addElement(current); } } } } ! public String toString() { StringBuffer output = new StringBuffer(); ! Enumeration e = tokens.elements(); ! while (e.hasMoreElements()) { ! output.append(e.nextElement().toString()); } return output.toString(); } ! /** * Constructs a SimpleDateFormat using the default pattern for * the default locale. --- 145,166 ---- current.size++; } else { current = new FieldSizePair(field,1); ! tokens.add(current); } } } } ! public String toString() { StringBuffer output = new StringBuffer(); ! Iterator i = tokens.iterator(); ! while (i.hasNext()) { ! output.append(i.next().toString()); } return output.toString(); } ! /** * Constructs a SimpleDateFormat using the default pattern for * the default locale. *************** public class SimpleDateFormat extends Da *** 175,187 **** Locale locale = Locale.getDefault(); calendar = new GregorianCalendar(locale); computeCenturyStart(); ! tokens = new Vector(); formatData = new DateFormatSymbols(locale); pattern = (formatData.dateFormats[DEFAULT] + ' ' + formatData.timeFormats[DEFAULT]); compileFormat(pattern); numberFormat = NumberFormat.getInstance(locale); numberFormat.setGroupingUsed (false); } /** --- 176,189 ---- Locale locale = Locale.getDefault(); calendar = new GregorianCalendar(locale); computeCenturyStart(); ! tokens = new ArrayList(); formatData = new DateFormatSymbols(locale); pattern = (formatData.dateFormats[DEFAULT] + ' ' + formatData.timeFormats[DEFAULT]); compileFormat(pattern); numberFormat = NumberFormat.getInstance(locale); numberFormat.setGroupingUsed (false); + numberFormat.setParseIntegerOnly (true); } /** *************** public class SimpleDateFormat extends Da *** 202,213 **** super(); calendar = new GregorianCalendar(locale); computeCenturyStart(); ! tokens = new Vector(); formatData = new DateFormatSymbols(locale); compileFormat(pattern); this.pattern = pattern; numberFormat = NumberFormat.getInstance(locale); numberFormat.setGroupingUsed (false); } /** --- 204,216 ---- super(); calendar = new GregorianCalendar(locale); computeCenturyStart(); ! tokens = new ArrayList(); formatData = new DateFormatSymbols(locale); compileFormat(pattern); this.pattern = pattern; numberFormat = NumberFormat.getInstance(locale); numberFormat.setGroupingUsed (false); + numberFormat.setParseIntegerOnly (true); } /** *************** public class SimpleDateFormat extends Da *** 219,230 **** super(); calendar = new GregorianCalendar(); computeCenturyStart (); ! tokens = new Vector(); this.formatData = formatData; compileFormat(pattern); this.pattern = pattern; numberFormat = NumberFormat.getInstance(); numberFormat.setGroupingUsed (false); } // What is the difference between localized and unlocalized? The --- 222,234 ---- super(); calendar = new GregorianCalendar(); computeCenturyStart (); ! tokens = new ArrayList(); this.formatData = formatData; compileFormat(pattern); this.pattern = pattern; numberFormat = NumberFormat.getInstance(); numberFormat.setGroupingUsed (false); + numberFormat.setParseIntegerOnly (true); } // What is the difference between localized and unlocalized? The *************** public class SimpleDateFormat extends Da *** 261,267 **** */ public void applyPattern(String pattern) { ! tokens = new Vector(); compileFormat(pattern); this.pattern = pattern; } --- 265,271 ---- */ public void applyPattern(String pattern) { ! tokens = new ArrayList(); compileFormat(pattern); this.pattern = pattern; } *************** public class SimpleDateFormat extends Da *** 370,378 **** */ public boolean equals(Object o) { - if (o == null) - return false; - if (!super.equals(o)) return false; --- 374,379 ---- *************** public class SimpleDateFormat extends Da *** 381,390 **** SimpleDateFormat sdf = (SimpleDateFormat)o; ! if (!toPattern().equals(sdf.toPattern())) return false; ! if (!get2DigitYearStart().equals(sdf.get2DigitYearStart())) return false; if (!getDateFormatSymbols().equals(sdf.getDateFormatSymbols())) --- 382,391 ---- SimpleDateFormat sdf = (SimpleDateFormat)o; ! if (defaultCentury != sdf.defaultCentury) return false; ! if (!toPattern().equals(sdf.toPattern())) return false; if (!getDateFormatSymbols().equals(sdf.getDateFormatSymbols())) *************** public class SimpleDateFormat extends Da *** 393,398 **** --- 394,410 ---- return true; } + /** + * This method returns a hash value for this object. + * + * @return A hash value for this object. + */ + public int hashCode() + { + return super.hashCode() ^ toPattern().hashCode() ^ defaultCentury ^ + getDateFormatSymbols().hashCode(); + } + /** * Formats the date input according to the format string in use, *************** public class SimpleDateFormat extends Da *** 404,413 **** String temp; calendar.setTime(date); ! // go through vector, filling in fields where applicable, else toString ! Enumeration e = tokens.elements(); ! while (e.hasMoreElements()) { ! Object o = e.nextElement(); if (o instanceof FieldSizePair) { FieldSizePair p = (FieldSizePair) o; int beginIndex = buffer.length(); --- 416,425 ---- String temp; calendar.setTime(date); ! // go through ArrayList, filling in fields where applicable, else toString ! Iterator i = tokens.iterator(); ! while (i.hasNext()) { ! Object o = i.next(); if (o instanceof FieldSizePair) { FieldSizePair p = (FieldSizePair) o; int beginIndex = buffer.length(); *************** public class SimpleDateFormat extends Da *** 416,426 **** buffer.append(formatData.eras[calendar.get(Calendar.ERA)]); break; case YEAR_FIELD: ! temp = String.valueOf(calendar.get(Calendar.YEAR)); ! if (p.size < 4) ! buffer.append(temp.substring(temp.length()-2)); else ! buffer.append(temp); break; case MONTH_FIELD: if (p.size < 3) --- 428,442 ---- buffer.append(formatData.eras[calendar.get(Calendar.ERA)]); break; case YEAR_FIELD: ! // If we have two digits, then we truncate. Otherwise, we ! // use the size of the pattern, and zero pad. ! if (p.size == 2) ! { ! temp = String.valueOf(calendar.get(Calendar.YEAR)); ! buffer.append(temp.substring(temp.length() - 2)); ! } else ! withLeadingZeros(calendar.get(Calendar.YEAR), p.size, buffer); break; case MONTH_FIELD: if (p.size < 3) *************** public class SimpleDateFormat extends Da *** 567,572 **** --- 583,596 ---- while (++fmt_index < fmt_max && pattern.charAt(fmt_index) == ch) ; int fmt_count = fmt_index - first; + + // We might need to limit the number of digits to parse in + // some cases. We look to the next pattern character to + // decide. + boolean limit_digits = false; + if (fmt_index < fmt_max + && standardChars.indexOf(pattern.charAt(fmt_index)) >= 0) + limit_digits = true; --fmt_index; // We can handle most fields automatically: most either are *************** public class SimpleDateFormat extends Da *** 670,676 **** found_zone = true; saw_timezone = true; TimeZone tz = TimeZone.getTimeZone (strings[0]); - calendar.setTimeZone (tz); calendar.set (Calendar.ZONE_OFFSET, tz.getRawOffset ()); offset = 0; if (k > 2 && tz instanceof SimpleTimeZone) --- 694,699 ---- *************** public class SimpleDateFormat extends Da *** 699,704 **** --- 722,729 ---- if (is_numeric) { numberFormat.setMinimumIntegerDigits(fmt_count); + if (limit_digits) + numberFormat.setMaximumIntegerDigits(fmt_count); if (maybe2DigitYear) index = pos.getIndex(); Number n = numberFormat.parse(dateStr, pos); diff -Nrc3pad gcc-3.3.3/libjava/java/util/Arrays.java gcc-3.4.0/libjava/java/util/Arrays.java *** gcc-3.3.3/libjava/java/util/Arrays.java 2002-06-16 21:15:41.000000000 +0000 --- gcc-3.4.0/libjava/java/util/Arrays.java 2003-09-10 18:11:05.000000000 +0000 *************** *** 1,5 **** /* Arrays.java -- Utility class with methods to operate on arrays ! Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Arrays.java -- Utility class with methods to operate on arrays ! Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** public class Arrays *** 398,420 **** if (a1 == a2) return true; ! try ! { ! // If they're the same length, test each element ! if (a1.length == a2.length) ! { ! int i = a1.length; ! while (--i >= 0) ! if (a1[i] != a2[i]) ! return false; ! return true; ! } ! } ! catch (NullPointerException e) { ! // If one is null, we get a harmless NullPointerException } - return false; } --- 398,415 ---- if (a1 == a2) return true; ! if (null == a1 || null == a2) ! return false; ! ! // If they're the same length, test each element ! if (a1.length == a2.length) { ! int i = a1.length; ! while (--i >= 0) ! if (a1[i] != a2[i]) ! return false; ! return true; } return false; } *************** public class Arrays *** 433,453 **** if (a1 == a2) return true; ! try ! { ! // If they're the same length, test each element ! if (a1.length == a2.length) ! { ! int i = a1.length; ! while (--i >= 0) ! if (a1[i] != a2[i]) ! return false; ! return true; ! } ! } ! catch (NullPointerException e) { ! // If one is null, we get a harmless NullPointerException } return false; } --- 428,444 ---- if (a1 == a2) return true; ! if (null == a1 || null == a2) ! return false; ! ! // If they're the same length, test each element ! if (a1.length == a2.length) { ! int i = a1.length; ! while (--i >= 0) ! if (a1[i] != a2[i]) ! return false; ! return true; } return false; } *************** public class Arrays *** 467,487 **** if (a1 == a2) return true; ! try ! { ! // If they're the same length, test each element ! if (a1.length == a2.length) ! { ! int i = a1.length; ! while (--i >= 0) ! if (a1[i] != a2[i]) ! return false; ! return true; ! } ! } ! catch (NullPointerException e) { ! // If one is null, we get a harmless NullPointerException } return false; } --- 458,474 ---- if (a1 == a2) return true; ! if (null == a1 || null == a2) ! return false; ! ! // If they're the same length, test each element ! if (a1.length == a2.length) { ! int i = a1.length; ! while (--i >= 0) ! if (a1[i] != a2[i]) ! return false; ! return true; } return false; } *************** public class Arrays *** 501,521 **** if (a1 == a2) return true; ! try ! { ! // If they're the same length, test each element ! if (a1.length == a2.length) ! { ! int i = a1.length; ! while (--i >= 0) ! if (a1[i] != a2[i]) ! return false; ! return true; ! } ! } ! catch (NullPointerException e) { ! // If one is null, we get a harmless NullPointerException } return false; } --- 488,504 ---- if (a1 == a2) return true; ! if (null == a1 || null == a2) ! return false; ! ! // If they're the same length, test each element ! if (a1.length == a2.length) { ! int i = a1.length; ! while (--i >= 0) ! if (a1[i] != a2[i]) ! return false; ! return true; } return false; } *************** public class Arrays *** 535,555 **** if (a1 == a2) return true; ! try ! { ! // If they're the same length, test each element ! if (a1.length == a2.length) ! { ! int i = a1.length; ! while (--i >= 0) ! if (a1[i] != a2[i]) ! return false; ! return true; ! } ! } ! catch (NullPointerException e) { ! // If one is null, we get a harmless NullPointerException } return false; } --- 518,534 ---- if (a1 == a2) return true; ! if (null == a1 || null == a2) ! return false; ! ! // If they're the same length, test each element ! if (a1.length == a2.length) { ! int i = a1.length; ! while (--i >= 0) ! if (a1[i] != a2[i]) ! return false; ! return true; } return false; } *************** public class Arrays *** 569,589 **** if (a1 == a2) return true; ! try ! { ! // If they're the same length, test each element ! if (a1.length == a2.length) ! { ! int i = a1.length; ! while (--i >= 0) ! if (a1[i] != a2[i]) ! return false; ! return true; ! } ! } ! catch (NullPointerException e) { ! // If one is null, we get a harmless NullPointerException } return false; } --- 548,564 ---- if (a1 == a2) return true; ! if (null == a1 || null == a2) ! return false; ! ! // If they're the same length, test each element ! if (a1.length == a2.length) { ! int i = a1.length; ! while (--i >= 0) ! if (a1[i] != a2[i]) ! return false; ! return true; } return false; } *************** public class Arrays *** 603,624 **** if (a1 == a2) return true; // Must use Float.compare to take into account NaN, +-0. ! try ! { ! // If they're the same length, test each element ! if (a1.length == a2.length) ! { ! int i = a1.length; ! while (--i >= 0) ! if (Float.compare(a1[i], a2[i]) != 0) ! return false; ! return true; ! } ! } ! catch (NullPointerException e) { ! // If one is null, we get a harmless NullPointerException } return false; } --- 578,595 ---- if (a1 == a2) return true; + if (null == a1 || null == a2) + return false; + // Must use Float.compare to take into account NaN, +-0. ! // If they're the same length, test each element ! if (a1.length == a2.length) { ! int i = a1.length; ! while (--i >= 0) ! if (Float.compare(a1[i], a2[i]) != 0) ! return false; ! return true; } return false; } *************** public class Arrays *** 638,659 **** if (a1 == a2) return true; // Must use Double.compare to take into account NaN, +-0. ! try ! { ! // If they're the same length, test each element ! if (a1.length == a2.length) ! { ! int i = a1.length; ! while (--i >= 0) ! if (Double.compare(a1[i], a2[i]) != 0) ! return false; ! return true; ! } ! } ! catch (NullPointerException e) { ! // If one is null, we get a harmless NullPointerException } return false; } --- 609,626 ---- if (a1 == a2) return true; + if (null == a1 || null == a2) + return false; + // Must use Double.compare to take into account NaN, +-0. ! // If they're the same length, test each element ! if (a1.length == a2.length) { ! int i = a1.length; ! while (--i >= 0) ! if (Double.compare(a1[i], a2[i]) != 0) ! return false; ! return true; } return false; } *************** public class Arrays *** 674,694 **** if (a1 == a2) return true; ! try ! { ! // If they're the same length, test each element ! if (a1.length == a2.length) ! { ! int i = a1.length; ! while (--i >= 0) ! if (! AbstractCollection.equals(a1[i], a2[i])) ! return false; ! return true; ! } ! } ! catch (NullPointerException e) { ! // If one is null, we get a harmless NullPointerException } return false; } --- 641,657 ---- if (a1 == a2) return true; ! if (null == a1 || null == a2) ! return false; ! ! // If they're the same length, test each element ! if (a1.length == a2.length) { ! int i = a1.length; ! while (--i >= 0) ! if (! AbstractCollection.equals(a1[i], a2[i])) ! return false; ! return true; } return false; } diff -Nrc3pad gcc-3.3.3/libjava/java/util/Calendar.java gcc-3.4.0/libjava/java/util/Calendar.java *** gcc-3.3.3/libjava/java/util/Calendar.java 2002-08-31 05:27:15.000000000 +0000 --- gcc-3.4.0/libjava/java/util/Calendar.java 2003-12-09 16:17:01.000000000 +0000 *************** exception statement from your version. * *** 37,44 **** package java.util; import java.lang.reflect.InvocationTargetException; ! import java.io.*; /** * This class is an abstract base class for Calendars, which can be --- 37,48 ---- package java.util; + import java.lang.reflect.InvocationTargetException; ! import java.io.IOException; ! import java.io.ObjectInputStream; ! import java.io.ObjectOutputStream; ! import java.io.Serializable; /** * This class is an abstract base class for Calendars, which can be *************** public abstract class Calendar implement *** 361,371 **** static final long serialVersionUID = -1807547505821590642L; /** ! * The name of the resource bundle. */ private static final String bundleName = "gnu.java.locale.Calendar"; /** * Constructs a new Calendar with the default time zone and the default * locale. */ --- 365,385 ---- static final long serialVersionUID = -1807547505821590642L; /** ! * The name of the resource bundle. Used only by getBundle() */ private static final String bundleName = "gnu.java.locale.Calendar"; /** + * get resource bundle: + * The resources should be loaded via this method only. Iff an application + * uses this method, the resourcebundle is required. + */ + private static ResourceBundle getBundle(Locale locale) + { + return ResourceBundle.getBundle(bundleName, locale); + } + + /** * Constructs a new Calendar with the default time zone and the default * locale. */ *************** public abstract class Calendar implement *** 385,391 **** this.zone = zone; lenient = true; ! ResourceBundle rb = ResourceBundle.getBundle(bundleName, locale); firstDayOfWeek = ((Integer) rb.getObject("firstDayOfWeek")).intValue(); minimalDaysInFirstWeek = --- 399,405 ---- this.zone = zone; lenient = true; ! ResourceBundle rb = getBundle(locale); firstDayOfWeek = ((Integer) rb.getObject("firstDayOfWeek")).intValue(); minimalDaysInFirstWeek = *************** public abstract class Calendar implement *** 430,436 **** public static synchronized Calendar getInstance(TimeZone zone, Locale locale) { String calendarClassName = null; ! ResourceBundle rb = ResourceBundle.getBundle(bundleName, locale); calendarClassName = rb.getString("calendarClass"); if (calendarClassName != null) { --- 444,450 ---- public static synchronized Calendar getInstance(TimeZone zone, Locale locale) { String calendarClassName = null; ! ResourceBundle rb = getBundle(locale); calendarClassName = rb.getString("calendarClass"); if (calendarClassName != null) { *************** public abstract class Calendar implement *** 461,468 **** */ public static synchronized Locale[] getAvailableLocales() { ! ResourceBundle rb = ResourceBundle.getBundle(bundleName, ! new Locale("", "")); return (Locale[]) rb.getObject("availableLocales"); } --- 475,481 ---- */ public static synchronized Locale[] getAvailableLocales() { ! ResourceBundle rb = getBundle(new Locale("", "")); return (Locale[]) rb.getObject("availableLocales"); } *************** public abstract class Calendar implement *** 531,538 **** * if they are invalid. * @param field the time field. One of the time field constants. * @return the value of the specified field */ ! public final int get(int field) { // If the requested field is invalid, force all fields to be recomputed. if (!isSet[field]) --- 544,553 ---- * if they are invalid. * @param field the time field. One of the time field constants. * @return the value of the specified field + * + * @specnote Not final since JDK 1.4 */ ! public int get(int field) { // If the requested field is invalid, force all fields to be recomputed. if (!isSet[field]) *************** public abstract class Calendar implement *** 558,565 **** * the time in milliseconds. * @param field the time field. One of the time field constants * @param value the value to be set. */ ! public final void set(int field, int value) { isTimeSet = false; fields[field] = value; --- 573,582 ---- * the time in milliseconds. * @param field the time field. One of the time field constants * @param value the value to be set. + * + * @specnote Not final since JDK 1.4 */ ! public void set(int field, int value) { isTimeSet = false; fields[field] = value; diff -Nrc3pad gcc-3.3.3/libjava/java/util/Currency.java gcc-3.4.0/libjava/java/util/Currency.java *** gcc-3.3.3/libjava/java/util/Currency.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/util/Currency.java 2003-10-29 16:07:59.000000000 +0000 *************** *** 0 **** --- 1,189 ---- + /* Currency.java -- Representation of a currency + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + package java.util; + + import java.io.Serializable; + import java.util.ResourceBundle; + import java.util.Locale; + import java.text.NumberFormat; + + public final class Currency implements Serializable + { + static final long serialVersionUID = -158308464356906721L; + + private Locale locale; + private ResourceBundle res; + + // For deserialization + private Currency () + { + } + + private Currency (Locale loc) + { + this.locale = loc; + this.res = ResourceBundle.getBundle ("gnu.java.locale.LocaleInformation", locale); + } + + /** + * Returns the ISO4217 currency code of this currency. + * + * @return a String containing currency code. + */ + public String getCurrencyCode () + { + try + { + return res.getString ("intlCurrencySymbol"); + } + catch (Exception _) + { + return null; + } + } + + /** + * @return number of digits after decimal separator for this currency. + */ + public int getDefaultFractionDigits () + { + NumberFormat currency = NumberFormat.getCurrencyInstance (locale); + + return currency.getMaximumFractionDigits(); + } + + /** + * Builds a new currency instance for this locale. + * + * @param locale a Locale instance. + * + * @return a new Currency instance. + */ + public static Currency getInstance (Locale locale) + { + return new Currency (locale); + } + + /** + * Builds the currency corresponding to the specified currency code. + * + * @param currencyCode a string representing a currency code. + * + * @return a new Currency instance. + */ + public static Currency getInstance (String currencyCode) + { + Locale[] all_locales = Locale.getAvailableLocales (); + + for (int i=0;iString containing the ISO4217 currency code. + */ + public String toString() + { + try + { + return res.getString ("intlCurrencySymbol"); + } + catch (Exception _) + { + return "(unknown currency)"; + } + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/util/Date.java gcc-3.4.0/libjava/java/util/Date.java *** gcc-3.3.3/libjava/java/util/Date.java 2002-01-22 22:40:38.000000000 +0000 --- gcc-3.4.0/libjava/java/util/Date.java 2004-01-04 00:32:49.000000000 +0000 *************** public class Date implements Cloneable, *** 108,114 **** min).getTimeInMillis(); } ! /* * Creates a new Date Object representing the given time. * @deprecated use new GregorianCalendar(year+1900, month, * day) instead. --- 108,114 ---- min).getTimeInMillis(); } ! /** * Creates a new Date Object representing the given time. * @deprecated use new GregorianCalendar(year+1900, month, * day) instead. *************** public class Date implements Cloneable, *** 304,337 **** return format.format(this); } - private static int skipParens(String string, int offset) - { - int len = string.length(); - int p = 0; - int i; - - for (i = offset; i < len; ++i) - { - if (string.charAt(i) == '(') - ++p; - else if (string.charAt(i) == ')') - { - --p; - if (p == 0) - return i + 1; - // If we've encounted unbalanced parens, just return the - // leftover one as an ordinary character. It will be - // caught later in parsing and cause an - // IllegalArgumentException. - if (p < 0) - return i; - } - } - - // Not sure what to do if `p != 0' here. - return i; - } - private static int parseTz(String tok, char sign) throws IllegalArgumentException { --- 304,309 ---- *************** public class Date implements Cloneable, *** 408,427 **** // Trim out any nested stuff in parentheses now to make parsing easier. StringBuffer buf = new StringBuffer(); ! int off = 0; ! int openParenOffset, tmpMonth; ! while ((openParenOffset = string.indexOf('(', off)) >= 0) { ! // Copy part of string leading up to open paren. ! buf.append(string.substring(off, openParenOffset)); ! off = skipParens(string, openParenOffset); } ! buf.append(string.substring(off)); // Make all chars upper case to simplify comparisons later. // Also ignore commas; treat them as delimiters. ! StringTokenizer strtok = ! new StringTokenizer(buf.toString().toUpperCase(), " \t\n\r,"); while (strtok.hasMoreTokens()) { --- 380,404 ---- // Trim out any nested stuff in parentheses now to make parsing easier. StringBuffer buf = new StringBuffer(); ! int parenNesting = 0; ! int len = string.length(); ! for (int i = 0; i < len; i++) { ! char ch = string.charAt(i); ! if (ch >= 'a' && ch <= 'z') ! ch -= 'a' - 'A'; ! if (ch == '(') ! parenNesting++; ! else if (parenNesting == 0) ! buf.append(ch); ! else if (ch == ')') ! parenNesting--; } ! int tmpMonth; // Make all chars upper case to simplify comparisons later. // Also ignore commas; treat them as delimiters. ! StringTokenizer strtok = new StringTokenizer(buf.toString(), " \t\n\r,"); while (strtok.hasMoreTokens()) { *************** public class Date implements Cloneable, *** 436,491 **** { while (tok != null && tok.length() > 0) { ! // A colon or slash may be valid in the number. ! // Find the first of these before calling parseInt. ! int colon = tok.indexOf(':'); ! int slash = tok.indexOf('/'); ! int hyphen = tok.indexOf('-'); ! // We choose tok.length initially because it makes ! // processing simpler. ! int punctOffset = tok.length(); ! if (colon >= 0) ! punctOffset = Math.min(punctOffset, colon); ! if (slash >= 0) ! punctOffset = Math.min(punctOffset, slash); ! if (hyphen >= 0) ! punctOffset = Math.min(punctOffset, hyphen); ! // Following code relies on -1 being the exceptional ! // case. ! if (punctOffset == tok.length()) ! punctOffset = -1; ! ! int num; ! try ! { ! num = Integer.parseInt(punctOffset < 0 ? tok : ! tok.substring(0, punctOffset)); ! } ! catch (NumberFormatException ex) ! { ! throw new IllegalArgumentException(tok); ! } ! // TBD: Spec says year can be followed by a slash. That might ! // make sense if using YY/MM/DD formats, but it would fail in ! // that format for years <= 70. Also, what about 1900? That ! // is interpreted as the year 3800; seems that the comparison ! // should be num >= 1900 rather than just > 1900. ! // What about a year of 62 - 70? (61 or less could be a (leap) ! // second). 70/MM/DD cause an exception but 71/MM/DD is ok ! // even though there's no ambiguity in either case. ! // For the parse method, the spec as written seems too loose. ! // Until shown otherwise, we'll follow the spec as written. ! if (num > 70 && (punctOffset < 0 || punctOffset == slash)) ! year = num > 1900 ? num - 1900 : num; ! else if (punctOffset > 0 && punctOffset == colon) { if (hour < 0) hour = num; else minute = num; } ! else if (punctOffset > 0 && punctOffset == slash) { if (month < 0) month = num - 1; --- 413,471 ---- { while (tok != null && tok.length() > 0) { ! int punctOffset = tok.length(); ! int num = 0; ! int punct; ! for (int i = 0; ; i++) ! { ! if (i >= punctOffset) ! { ! punct = -1; ! break; ! } ! else ! { ! punct = tok.charAt(i); ! if (punct >= '0' && punct <= '9') ! { ! if (num > 999999999) // in case of overflow ! throw new IllegalArgumentException(tok); ! num = 10 * num + (punct - '0'); ! } ! else ! { ! punctOffset = i; ! break; ! } ! } ! ! } ! if (punct == ':') { if (hour < 0) hour = num; else minute = num; } ! else if ((num >= 70 ! && (punct == ' ' || punct == ',' ! || punct == '/' || punct < 0)) ! || (num < 70 && day >= 0 && month >= 0 && year < 0)) ! { ! if (num >= 100) ! year = num; ! else ! { ! int curYear = 1900 + new Date().getYear(); ! int firstYear = curYear - 80; ! year = firstYear / 100 * 100 + num; ! int yx = year; ! if (year < firstYear) ! year += 100; ! } ! } ! else if (punct == '/') { if (month < 0) month = num - 1; *************** public class Date implements Cloneable, *** 502,508 **** throw new IllegalArgumentException(tok); // Advance string if there's more to process in this token. ! if (punctOffset < 0 || punctOffset + 1 >= tok.length()) tok = null; else tok = tok.substring(punctOffset + 1); --- 482,488 ---- throw new IllegalArgumentException(tok); // Advance string if there's more to process in this token. ! if (punct < 0 || punctOffset + 1 >= tok.length()) tok = null; else tok = tok.substring(punctOffset + 1); *************** public class Date implements Cloneable, *** 573,594 **** throw new IllegalArgumentException(tok); } ! // Unspecified minutes and seconds should default to 0. if (minute < 0) minute = 0; if (second < 0) second = 0; // Throw exception if any other fields have not been recognized and set. ! if (year < 0 || month < 0 || day < 0 || hour < 0) throw new IllegalArgumentException("Missing field"); // Return the time in either local time or relative to GMT as parsed. // If no time-zone was specified, get the local one (in minutes) and // convert to milliseconds before adding to the UTC. ! return UTC(year, month, day, hour, minute, second) + (localTimezone ? ! new Date(year, month, day).getTimezoneOffset() * 60 * 1000: ! -timezone * 60 * 1000); } /** --- 553,581 ---- throw new IllegalArgumentException(tok); } ! // Unspecified hours, minutes, or seconds should default to 0. ! if (hour < 0) ! hour = 0; if (minute < 0) minute = 0; if (second < 0) second = 0; // Throw exception if any other fields have not been recognized and set. ! if (year < 0 || month < 0 || day < 0) throw new IllegalArgumentException("Missing field"); // Return the time in either local time or relative to GMT as parsed. // If no time-zone was specified, get the local one (in minutes) and // convert to milliseconds before adding to the UTC. ! GregorianCalendar cal ! = new GregorianCalendar(year, month, day, hour, minute, second); ! if (!localTimezone) ! { ! cal.set(Calendar.ZONE_OFFSET, timezone * 60 * 1000); ! cal.set(Calendar.DST_OFFSET, 0); ! } ! return cal.getTimeInMillis(); } /** diff -Nrc3pad gcc-3.3.3/libjava/java/util/GregorianCalendar.java gcc-3.4.0/libjava/java/util/GregorianCalendar.java *** gcc-3.3.3/libjava/java/util/GregorianCalendar.java 2002-03-23 16:12:03.000000000 +0000 --- gcc-3.4.0/libjava/java/util/GregorianCalendar.java 2003-12-30 19:56:49.000000000 +0000 *************** *** 1,5 **** /* java.util.GregorianCalendar ! Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* java.util.GregorianCalendar ! Copyright (C) 1998, 1999, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** public class GregorianCalendar extends C *** 78,88 **** static final long serialVersionUID = -8125100834729963327L; /** ! * The name of the resource bundle. */ private static final String bundleName = "gnu.java.locale.Calendar"; /** * Constructs a new GregorianCalender representing the current * time, using the default time zone and the default locale. */ --- 78,98 ---- static final long serialVersionUID = -8125100834729963327L; /** ! * The name of the resource bundle. Used only by getBundle() */ private static final String bundleName = "gnu.java.locale.Calendar"; /** + * get resource bundle: + * The resources should be loaded via this method only. Iff an application + * uses this method, the resourcebundle is required. --Fridi. + */ + private static ResourceBundle getBundle(Locale locale) + { + return ResourceBundle.getBundle(bundleName, locale); + } + + /** * Constructs a new GregorianCalender representing the current * time, using the default time zone and the default locale. */ *************** public class GregorianCalendar extends C *** 120,126 **** public GregorianCalendar(TimeZone zone, Locale locale) { super(zone, locale); ! ResourceBundle rb = ResourceBundle.getBundle(bundleName, locale); gregorianCutover = ((Date) rb.getObject("gregorianCutOver")).getTime(); setTimeInMillis(System.currentTimeMillis()); } --- 130,136 ---- public GregorianCalendar(TimeZone zone, Locale locale) { super(zone, locale); ! ResourceBundle rb = getBundle(locale); gregorianCutover = ((Date) rb.getObject("gregorianCutOver")).getTime(); setTimeInMillis(System.currentTimeMillis()); } *************** public class GregorianCalendar extends C *** 254,261 **** // // The additional leap year factor accounts for the fact that // a leap day is not seen on Jan 1 of the leap year. int gregOffset = (year / 400) - (year / 100) + 2; ! if (isLeapYear (year, true) && dayOfYear < 31 + 29) --gregOffset; time += gregOffset * (24 * 60 * 60 * 1000L); } --- 264,273 ---- // // The additional leap year factor accounts for the fact that // a leap day is not seen on Jan 1 of the leap year. + // And on and after the leap day, the leap day has already been + // included in dayOfYear. int gregOffset = (year / 400) - (year / 100) + 2; ! if (isLeapYear (year, true)) --gregOffset; time += gregOffset * (24 * 60 * 60 * 1000L); } *************** public class GregorianCalendar extends C *** 390,396 **** { hour = fields[HOUR]; if (isSet[AM_PM] && fields[AM_PM] == PM) ! hour += 12; } int minute = isSet[MINUTE] ? fields[MINUTE] : 0; --- 402,412 ---- { hour = fields[HOUR]; if (isSet[AM_PM] && fields[AM_PM] == PM) ! if (hour != 12) /* not Noon */ ! hour += 12; ! /* Fix the problem of the status of 12:00 AM (midnight). */ ! if (isSet[AM_PM] && fields[AM_PM] == AM && hour == 12) ! hour = 0; } int minute = isSet[MINUTE] ? fields[MINUTE] : 0; *************** public class GregorianCalendar extends C *** 599,605 **** // which day of the week are we (0..6), relative to getFirstDayOfWeek int relativeWeekday = (7 + fields[DAY_OF_WEEK] - getFirstDayOfWeek()) % 7; ! fields[WEEK_OF_MONTH] = (fields[DAY_OF_MONTH] - relativeWeekday + 6) / 7; int weekOfYear = (fields[DAY_OF_YEAR] - relativeWeekday + 6) / 7; --- 615,621 ---- // which day of the week are we (0..6), relative to getFirstDayOfWeek int relativeWeekday = (7 + fields[DAY_OF_WEEK] - getFirstDayOfWeek()) % 7; ! fields[WEEK_OF_MONTH] = (fields[DAY_OF_MONTH] - relativeWeekday + 12) / 7; int weekOfYear = (fields[DAY_OF_YEAR] - relativeWeekday + 6) / 7; diff -Nrc3pad gcc-3.3.3/libjava/java/util/HashMap.java gcc-3.4.0/libjava/java/util/HashMap.java *** gcc-3.3.3/libjava/java/util/HashMap.java 2002-11-10 22:06:49.000000000 +0000 --- gcc-3.4.0/libjava/java/util/HashMap.java 2003-12-07 23:00:49.000000000 +0000 *************** *** 1,6 **** /* HashMap.java -- a class providing a basic hashtable data structure, mapping Object --> Object ! Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,6 ---- /* HashMap.java -- a class providing a basic hashtable data structure, mapping Object --> Object ! Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** public class HashMap extends AbstractMap *** 223,229 **** public HashMap(Map m) { this(Math.max(m.size() * 2, DEFAULT_CAPACITY), DEFAULT_LOAD_FACTOR); ! putAllInternal(m); } /** --- 223,229 ---- public HashMap(Map m) { this(Math.max(m.size() * 2, DEFAULT_CAPACITY), DEFAULT_LOAD_FACTOR); ! putAll(m); } /** *************** public class HashMap extends AbstractMap *** 381,388 **** public void putAll(Map m) { Iterator itr = m.entrySet().iterator(); ! int msize = m.size(); ! while (msize-- > 0) { Map.Entry e = (Map.Entry) itr.next(); // Optimize in case the Entry is one of our own. --- 381,387 ---- public void putAll(Map m) { Iterator itr = m.entrySet().iterator(); ! while (itr.hasNext()) { Map.Entry e = (Map.Entry) itr.next(); // Optimize in case the Entry is one of our own. *************** public class HashMap extends AbstractMap *** 700,718 **** } /** ! * A simplified, more efficient internal implementation of putAll(). The ! * Map constructor and clone() should not call putAll or put, in order to ! * be compatible with the JDK implementation with respect to subclasses. * * @param m the map to initialize this from */ void putAllInternal(Map m) { Iterator itr = m.entrySet().iterator(); ! int msize = m.size(); ! size = msize; ! while (msize-- > 0) { Map.Entry e = (Map.Entry) itr.next(); Object key = e.getKey(); int idx = hash(key); --- 699,717 ---- } /** ! * A simplified, more efficient internal implementation of putAll(). clone() ! * should not call putAll or put, in order to be compatible with the JDK ! * implementation with respect to subclasses. * * @param m the map to initialize this from */ void putAllInternal(Map m) { Iterator itr = m.entrySet().iterator(); ! size = 0; ! while (itr.hasNext()) { + size++; Map.Entry e = (Map.Entry) itr.next(); Object key = e.getKey(); int idx = hash(key); *************** public class HashMap extends AbstractMap *** 808,813 **** --- 807,813 ---- // Read and use capacity, followed by key/value pairs. buckets = new HashEntry[s.readInt()]; int len = s.readInt(); + size = len; while (len-- > 0) { Object key = s.readObject(); diff -Nrc3pad gcc-3.3.3/libjava/java/util/Hashtable.java gcc-3.4.0/libjava/java/util/Hashtable.java *** gcc-3.3.3/libjava/java/util/Hashtable.java 2002-06-18 15:39:52.000000000 +0000 --- gcc-3.4.0/libjava/java/util/Hashtable.java 2003-12-07 23:00:49.000000000 +0000 *************** public class Hashtable extends Dictionar *** 234,240 **** public Hashtable(Map m) { this(Math.max(m.size() * 2, DEFAULT_CAPACITY), DEFAULT_LOAD_FACTOR); ! putAllInternal(m); } /** --- 234,240 ---- public Hashtable(Map m) { this(Math.max(m.size() * 2, DEFAULT_CAPACITY), DEFAULT_LOAD_FACTOR); ! putAll(m); } /** *************** public class Hashtable extends Dictionar *** 333,339 **** */ public synchronized boolean contains(Object value) { ! return containsValue(value); } /** --- 333,354 ---- */ public synchronized boolean contains(Object value) { ! for (int i = buckets.length - 1; i >= 0; i--) ! { ! HashEntry e = buckets[i]; ! while (e != null) ! { ! if (value.equals(e.value)) ! return true; ! e = e.next; ! } ! } ! ! // Must throw on null argument even if the table is empty ! if (value == null) ! throw new NullPointerException(); ! ! return false; } /** *************** public class Hashtable extends Dictionar *** 350,371 **** */ public boolean containsValue(Object value) { ! for (int i = buckets.length - 1; i >= 0; i--) ! { ! HashEntry e = buckets[i]; ! while (e != null) ! { ! if (value.equals(e.value)) ! return true; ! e = e.next; ! } ! } ! ! // Must throw on null argument even if the table is empty ! if (value == null) ! throw new NullPointerException(); ! ! return false; } /** --- 365,373 ---- */ public boolean containsValue(Object value) { ! // Delegate to older method to make sure code overriding it continues ! // to work. ! return contains(value); } /** *************** public class Hashtable extends Dictionar *** 510,516 **** { Iterator itr = m.entrySet().iterator(); ! for (int msize = m.size(); msize > 0; msize--) { Map.Entry e = (Map.Entry) itr.next(); // Optimize in case the Entry is one of our own. --- 512,518 ---- { Iterator itr = m.entrySet().iterator(); ! while (itr.hasNext()) { Map.Entry e = (Map.Entry) itr.next(); // Optimize in case the Entry is one of our own. *************** public class Hashtable extends Dictionar *** 850,869 **** } /** ! * A simplified, more efficient internal implementation of putAll(). The ! * Map constructor and clone() should not call putAll or put, in order to ! * be compatible with the JDK implementation with respect to subclasses. * * @param m the map to initialize this from */ void putAllInternal(Map m) { Iterator itr = m.entrySet().iterator(); ! int msize = m.size(); ! this.size = msize; ! for (; msize > 0; msize--) { Map.Entry e = (Map.Entry) itr.next(); Object key = e.getKey(); int idx = hash(key); --- 852,871 ---- } /** ! * A simplified, more efficient internal implementation of putAll(). clone() ! * should not call putAll or put, in order to be compatible with the JDK ! * implementation with respect to subclasses. * * @param m the map to initialize this from */ void putAllInternal(Map m) { Iterator itr = m.entrySet().iterator(); ! size = 0; ! while (itr.hasNext()) { + size++; Map.Entry e = (Map.Entry) itr.next(); Object key = e.getKey(); int idx = hash(key); diff -Nrc3pad gcc-3.3.3/libjava/java/util/IdentityHashMap.java gcc-3.4.0/libjava/java/util/IdentityHashMap.java *** gcc-3.3.3/libjava/java/util/IdentityHashMap.java 2002-06-16 21:15:42.000000000 +0000 --- gcc-3.4.0/libjava/java/util/IdentityHashMap.java 2003-12-09 16:17:01.000000000 +0000 *************** exception statement from your version. * *** 38,44 **** package java.util; ! import java.io.*; /** * This class provides a hashtable-backed implementation of the --- 38,47 ---- package java.util; ! import java.io.IOException; ! import java.io.ObjectInputStream; ! import java.io.ObjectOutputStream; ! import java.io.Serializable; /** * This class provides a hashtable-backed implementation of the diff -Nrc3pad gcc-3.3.3/libjava/java/util/jar/JarInputStream.java gcc-3.4.0/libjava/java/util/jar/JarInputStream.java *** gcc-3.3.3/libjava/java/util/jar/JarInputStream.java 2002-01-22 22:40:41.000000000 +0000 --- gcc-3.4.0/libjava/java/util/jar/JarInputStream.java 2003-10-27 11:02:43.000000000 +0000 *************** public class JarInputStream extends ZipI *** 116,122 **** } firstEntry = (JarEntry) super.getNextEntry(); } - closeEntry(); if (verify) { --- 116,121 ---- diff -Nrc3pad gcc-3.3.3/libjava/java/util/Locale.java gcc-3.4.0/libjava/java/util/Locale.java *** gcc-3.3.3/libjava/java/util/Locale.java 2002-11-27 22:41:07.000000000 +0000 --- gcc-3.4.0/libjava/java/util/Locale.java 2003-09-18 06:34:00.000000000 +0000 *************** public final class Locale implements Ser *** 231,239 **** // default locale. if (defaultLocale != null) { ! language = convertLanguage(language); ! country = country.toUpperCase(); ! variant = variant.toUpperCase(); } this.language = language; this.country = country; --- 231,239 ---- // default locale. if (defaultLocale != null) { ! language = convertLanguage(language).intern(); ! country = country.toUpperCase().intern(); ! variant = variant.toUpperCase().intern(); } this.language = language; this.country = country; *************** public final class Locale implements Ser *** 436,442 **** */ public String getISO3Language() { ! if ("".equals(language)) return ""; int index = ("aa,ab,af,am,ar,as,ay,az,ba,be,bg,bh,bi,bn,bo,br,ca,co,cs,cy,da," --- 436,442 ---- */ public String getISO3Language() { ! if (language == "") return ""; int index = ("aa,ab,af,am,ar,as,ay,az,ba,be,bg,bh,bi,bn,bo,br,ca,co,cs,cy,da," *************** public final class Locale implements Ser *** 472,478 **** */ public String getISO3Country() { ! if ("".equals(country)) return ""; int index = ("AD,AE,AF,AG,AI,AL,AM,AN,AO,AQ,AR,AS,AT,AU,AW,AZ,BA,BB,BD,BE,BF," --- 472,478 ---- */ public String getISO3Country() { ! if (country == "") return ""; int index = ("AD,AE,AF,AG,AI,AL,AM,AN,AO,AQ,AR,AS,AT,AU,AW,AZ,BA,BB,BD,BE,BF," *************** public final class Locale implements Ser *** 489,495 **** + "WS,YE,YT,YU,ZA,ZM,ZR,ZW") .indexOf(country); ! if (index % 3 != 0 || language.length() != 2) throw new MissingResourceException ("Can't find ISO3 country for " + country, "java.util.Locale", country); --- 489,495 ---- + "WS,YE,YT,YU,ZA,ZM,ZR,ZW") .indexOf(country); ! if (index % 3 != 0 || country.length() != 2) throw new MissingResourceException ("Can't find ISO3 country for " + country, "java.util.Locale", country); *************** public final class Locale implements Ser *** 520,526 **** * @return the language name of this locale localized to the default locale, * with the ISO code as backup */ ! public String getDisplayLanguage() { return getDisplayLanguage(defaultLocale); } --- 520,526 ---- * @return the language name of this locale localized to the default locale, * with the ISO code as backup */ ! public final String getDisplayLanguage() { return getDisplayLanguage(defaultLocale); } *************** public final class Locale implements Ser *** 558,564 **** * @return the country name of this locale localized to the given locale, * with the ISO code as backup */ ! public String getDisplayCountry() { return getDisplayCountry(defaultLocale); } --- 558,564 ---- * @return the country name of this locale localized to the given locale, * with the ISO code as backup */ ! public final String getDisplayCountry() { return getDisplayCountry(defaultLocale); } *************** public final class Locale implements Ser *** 596,602 **** * @return the variant code of this locale localized to the given locale, * with the ISO code as backup */ ! public String getDisplayVariant() { return getDisplayVariant(defaultLocale); } --- 596,602 ---- * @return the variant code of this locale localized to the given locale, * with the ISO code as backup */ ! public final String getDisplayVariant() { return getDisplayVariant(defaultLocale); } *************** public final class Locale implements Ser *** 635,641 **** * * @return String version of this locale, suitable for display to the user */ ! public String getDisplayName() { return getDisplayName(defaultLocale); } --- 635,641 ---- * * @return String version of this locale, suitable for display to the user */ ! public final String getDisplayName() { return getDisplayName(defaultLocale); } *************** public final class Locale implements Ser *** 723,734 **** */ public boolean equals(Object obj) { if (! (obj instanceof Locale)) return false; Locale l = (Locale) obj; ! return (language.equals(l.language) ! && country.equals(l.country) ! && variant.equals(l.variant)); } /** --- 723,741 ---- */ public boolean equals(Object obj) { + if (this == obj) + return true; if (! (obj instanceof Locale)) return false; Locale l = (Locale) obj; ! ! // ??? We might also want to add: ! // hashCode() == l.hashCode() ! // But this is a synchronized method. Is the overhead worth it? ! // Measure this to make a decision. ! return (language == l.language ! && country == l.country ! && variant == l.variant); } /** diff -Nrc3pad gcc-3.3.3/libjava/java/util/logging/ConsoleHandler.java gcc-3.4.0/libjava/java/util/logging/ConsoleHandler.java *** gcc-3.3.3/libjava/java/util/logging/ConsoleHandler.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/util/logging/ConsoleHandler.java 2003-06-21 10:31:55.000000000 +0000 *************** *** 0 **** --- 1,129 ---- + /* ConsoleHandler.java + -- a class for publishing log messages to System.err + + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. + + */ + + + package java.util.logging; + + /** + * A ConsoleHandler publishes log records to + * System.err. + * + *

                Configuration: Values of the subsequent + * LogManager properties are taken into consideration + * when a ConsoleHandler is initialized. + * If a property is not defined, or if it has an invalid + * value, a default is taken without an exception being thrown. + * + *

                  + * + *
                • java.util.logging.ConsoleHandler.level - specifies + * the initial severity level threshold. Default value: + * Level.INFO.
                • + * + *
                • java.util.logging.ConsoleHandler.filter - specifies + * the name of a Filter class. Default value: No Filter.
                • + * + *
                • java.util.logging.ConsoleHandler.formatter - specifies + * the name of a Formatter class. Default value: + * java.util.logging.SimpleFormatter.
                • + * + *
                • java.util.logging.ConsoleHandler.encoding - specifies + * the name of the character encoding. Default value: + * the default platform encoding. + * + *
                + * + * @author Sascha Brawer (brawer@acm.org) + */ + public class ConsoleHandler + extends StreamHandler + { + /** + * Constructs a StreamHandler that publishes + * log records to System.err. The initial + * configuration is determined by the LogManager + * properties described above. + */ + public ConsoleHandler() + { + super(System.err, "java.util.logging.ConsoleHandler", Level.INFO, + /* formatter */ null, SimpleFormatter.class); + } + + + /** + * Forces any data that may have been buffered to the underlying + * output device, but does not close System.err. + * + *

                In case of an I/O failure, the ErrorManager + * of this ConsoleHandler will be informed, but the caller + * of this method will not receive an exception. + */ + public void close() + { + flush(); + } + + + /** + * Publishes a LogRecord to the console, provided the + * record passes all tests for being loggable. + * + *

                Most applications do not need to call this method directly. + * Instead, they will use use a Logger, which will + * create LogRecords and distribute them to registered handlers. + * + *

                In case of an I/O failure, the ErrorManager + * of this SocketHandler will be informed, but the caller + * of this method will not receive an exception. + * + *

                The GNU implementation of ConsoleHandler.publish + * calls flush() for every request to publish a record, so + * they appear immediately on the console. + * + * @param record the log event to be published. + */ + public void publish(LogRecord record) + { + super.publish(record); + flush(); + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/util/logging/ErrorManager.java gcc-3.4.0/libjava/java/util/logging/ErrorManager.java *** gcc-3.3.3/libjava/java/util/logging/ErrorManager.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/util/logging/ErrorManager.java 2003-10-21 13:25:46.000000000 +0000 *************** *** 0 **** --- 1,197 ---- + /* ErrorManager.java + -- a class for dealing with errors that a Handler encounters + during logging + + Copyright (C) 2002, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. + + */ + + + package java.util.logging; + + /** + * An ErrorManager deals with errors that a Handler + * encounters while logging. + * + * @see Handler#setErrorManager(ErrorManager) + * + * @author Sascha Brawer (brawer@acm.org) + */ + public class ErrorManager + { + /* The values have been taken from Sun's public J2SE 1.4 API + * documentation. + * See http://java.sun.com/j2se/1.4/docs/api/constant-values.html + */ + + /** + * Indicates that there was a failure that does not readily + * fall into any of the other categories. + */ + public static final int GENERIC_FAILURE = 0; + + + /** + * Indicates that there was a problem upon writing to + * an output stream. + */ + public static final int WRITE_FAILURE = 1; + + + /** + * Indicates that there was a problem upon flushing + * an output stream. + */ + public static final int FLUSH_FAILURE = 2; + + + /** + * Indicates that there was a problem upon closing + * an output stream. + */ + public static final int CLOSE_FAILURE = 3; + + + /** + * Indicates that there was a problem upon opening + * an output stream. + */ + public static final int OPEN_FAILURE = 4; + + + /** + * Indicates that there was a problem upon formatting + * the message of a log record. + */ + public static final int FORMAT_FAILURE = 5; + + + /** + * Indicates whether the {@link #error} method of this ErrorManager + * has ever been used. + * + * Declared volatile in order to correctly support the + * double-checked locking idiom (once the revised Java Memory Model + * gets adopted); see Classpath bug #2944. + */ + private volatile boolean everUsed = false; + + + public ErrorManager() + { + } + + + /** + * Reports an error that occured upon logging. The default implementation + * emits the very first error to System.err, ignoring subsequent errors. + * + * @param message a message describing the error, or null if + * there is no suitable description. + * + * @param ex an exception, or null if the error is not + * related to an exception. + * + * @param errorCode one of the defined error codes, for example + * ErrorManager.CLOSE_FAILURE. + */ + public void error(String message, Exception ex, int errorCode) + { + if (everUsed) + return; + + synchronized (this) + { + /* The double check is intentional. If the first check was + * omitted, the monitor would have to be entered every time + * error() method was called. If the second check was + * omitted, the code below could be executed by multiple + * threads simultaneously. + * + * This is the 'double-checked locking' idiom, which is broken + * with the current version of the Java memory model. However, + * we assume that JVMs will have adopted a revised version of + * the Java Memory Model by the time GNU Classpath gains + * widespread acceptance. See Classpath bug #2944. + */ + if (everUsed) + return; + + everUsed = true; + } + + String codeMsg; + switch (errorCode) + { + case GENERIC_FAILURE: + codeMsg = "GENERIC_FAILURE"; + break; + + case WRITE_FAILURE: + codeMsg = "WRITE_FAILURE"; + break; + + case FLUSH_FAILURE: + codeMsg = "FLUSH_FAILURE"; + break; + + case CLOSE_FAILURE: + codeMsg = "CLOSE_FAILURE"; + break; + + case OPEN_FAILURE: + codeMsg = "OPEN_FAILURE"; + break; + + case FORMAT_FAILURE: + codeMsg = "FORMAT_FAILURE"; + break; + + default: + codeMsg = String.valueOf(errorCode); + break; + } + + System.err.println("Error upon logging: " + codeMsg); + if ((message != null) && (message.length() > 0)) + System.err.println(message); + + if (ex != null) + ex.printStackTrace(); + } + } + diff -Nrc3pad gcc-3.3.3/libjava/java/util/logging/FileHandler.java gcc-3.4.0/libjava/java/util/logging/FileHandler.java *** gcc-3.3.3/libjava/java/util/logging/FileHandler.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/util/logging/FileHandler.java 2003-06-21 10:31:55.000000000 +0000 *************** *** 0 **** --- 1,509 ---- + /* FileHandler.java + -- a class for publishing log messages to log files + + Copyright (C) 2002, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. + + */ + + package java.util.logging; + + import java.io.IOException; + import java.io.File; + import java.io.FileOutputStream; + + /** + * A FileHandler publishes log records to a set of log + * files. A maximum file size can be specified; as soon as a log file + * reaches the size limit, it is closed and the next file in the set + * is taken. + * + *

                Configuration: Values of the subsequent + * LogManager properties are taken into consideration + * when a FileHandler is initialized. If a property is + * not defined, or if it has an invalid value, a default is taken + * without an exception being thrown. + * + *

                  + * + *
                • java.util.FileHandler.level - specifies + * the initial severity level threshold. Default value: + * Level.ALL.
                • + * + *
                • java.util.FileHandler.filter - specifies + * the name of a Filter class. Default value: No Filter.
                • + * + *
                • java.util.FileHandler.formatter - specifies + * the name of a Formatter class. Default value: + * java.util.logging.XMLFormatter.
                • + * + *
                • java.util.FileHandler.encoding - specifies + * the name of the character encoding. Default value: + * the default platform encoding.
                • + * + *
                • java.util.FileHandler.limit - specifies the number + * of bytes a log file is approximately allowed to reach before it + * is closed and the handler switches to the next file in the + * rotating set. A value of zero means that files can grow + * without limit. Default value: 0 (unlimited growth).
                • + * + *
                • java.util.FileHandler.count - specifies the number + * of log files through which this handler cycles. Default value: + * 1.
                • + * + *
                • java.util.FileHandler.pattern - specifies a + * pattern for the location and name of the produced log files. + * See the section on file name + * patterns for details. Default value: + * "%h/java%u.log".
                • + * + *
                • java.util.FileHandler.append - specifies + * whether the handler will append log records to existing + * files, or whether the handler will clear log files + * upon switching to them. Default value: false, + * indicating that files will be cleared.
                • + * + *
                + * + *

                File Name Patterns: + * The name and location and log files are specified with pattern + * strings. The handler will replace the following character sequences + * when opening log files: + * + *

                  + *
                • / - replaced by the platform-specific path name + * separator. This value is taken from the system property + * file.separator.
                • + * + *
                • %t - replaced by the platform-specific location of + * the directory intended for temporary files. This value is + * taken from the system property java.io.tmpdir.
                • + * + *
                • %h - replaced by the location of the home + * directory of the current user. This value is taken from the + * system property file.separator.
                • + * + *
                • %g - replaced by a generation number for + * distinguisthing the individual items in the rotating set + * of log files. The generation number cycles through the + * sequence 0, 1, ..., count - 1.
                • + * + *
                • %u - replaced by a unique number for + * distinguisthing the output files of several concurrently + * running processes. The FileHandler starts + * with 0 when it tries to open a log file. If the file + * cannot be opened because it is currently in use, + * the unique number is incremented by one and opening + * is tried again. These steps are repeated until the + * opening operation succeeds. + * + *

                  FIXME: Is the following correct? Please review. The unique + * number is determined for each log file individually when it is + * opened upon switching to the next file. Therefore, it is not + * correct to assume that all log files in a rotating set bear the + * same unique number. + * + *

                  FIXME: The Javadoc for the Sun reference implementation + * says: "Note that the use of unique ids to avoid conflicts is + * only guaranteed to work reliably when using a local disk file + * system." Why? This needs to be mentioned as well, in case + * the reviewers decide the statement is true. Otherwise, + * file a bug report with Sun.

                • + * + *
                • %% - replaced by a single percent sign.
                • + *
                + * + *

                If the pattern string does not contain %g and + * count is greater than one, the handler will append + * the string .%g to the specified pattern. + * + *

                If the handler attempts to open a log file, this log file + * is being used at the time of the attempt, and the pattern string + * does not contain %u, the handler will append + * the string .%u to the specified pattern. This + * step is performed after any generation number has been + * appended. + * + *

                Examples for the GNU platform: + * + *

                  + * + *
                • %h/java%u.log will lead to a single log file + * /home/janet/java0.log, assuming count + * equals 1, the user's home directory is + * /home/janet, and the attempt to open the file + * succeeds.
                • + * + *
                • %h/java%u.log will lead to three log files + * /home/janet/java0.log.0, + * /home/janet/java0.log.1, and + * /home/janet/java0.log.2, + * assuming count equals 3, the user's home + * directory is /home/janet, and all attempts + * to open files succeed.
                • + * + *
                • %h/java%u.log will lead to three log files + * /home/janet/java0.log.0, + * /home/janet/java1.log.1, and + * /home/janet/java0.log.2, + * assuming count equals 3, the user's home + * directory is /home/janet, and the attempt + * to open /home/janet/java0.log.1 fails.
                • + * + *
                + * + * @author Sascha Brawer (brawer@acm.org) + */ + public class FileHandler + extends StreamHandler + { + /** + * The number of bytes a log file is approximately allowed to reach + * before it is closed and the handler switches to the next file in + * the rotating set. A value of zero means that files can grow + * without limit. + */ + private final int limit; + + + /** + * The number of log files through which this handler cycles. + */ + private final int count; + + + /** + * The pattern for the location and name of the produced log files. + * See the section on file name patterns + * for details. + */ + private final String pattern; + + + /** + * Indicates whether the handler will append log records to existing + * files (true), or whether the handler will clear log files + * upon switching to them (false). + */ + private final boolean append; + + + /** + * Constructs a FileHandler, taking all property values + * from the current {@link LogManager LogManager} configuration. + * + * @throws java.io.IOException FIXME: The Sun Javadoc says: "if + * there are IO problems opening the files." This conflicts + * with the general principle that configuration errors do + * not prohibit construction. Needs review. + * + * @throws SecurityException if a security manager exists and + * the caller is not granted the permission to control + * the logging infrastructure. + */ + public FileHandler() + throws IOException, SecurityException + { + this(/* pattern: use configiguration */ null, + + LogManager.getIntProperty("java.util.logging.FileHandler.limit", + /* default */ 0), + + LogManager.getIntProperty("java.util.logging.FileHandler.count", + /* default */ 1), + + LogManager.getBooleanProperty("java.util.logging.FileHandler.append", + /* default */ false)); + } + + + /* FIXME: Javadoc missing. */ + public FileHandler(String pattern) + throws IOException, SecurityException + { + this(pattern, + /* limit */ 0, + /* count */ 1, + /* append */ false); + } + + + /* FIXME: Javadoc missing. */ + public FileHandler(String pattern, boolean append) + throws IOException, SecurityException + { + this(pattern, + /* limit */ 0, + /* count */ 1, + append); + } + + + /* FIXME: Javadoc missing. */ + public FileHandler(String pattern, int limit, int count) + throws IOException, SecurityException + { + this(pattern, limit, count, + LogManager.getBooleanProperty( + "java.util.logging.FileHandler.append", + /* default */ false)); + } + + + /** + * Constructs a FileHandler given the pattern for the + * location and name of the produced log files, the size limit, the + * number of log files thorough which the handler will rotate, and + * the append property. All other property values are + * taken from the current {@link LogManager LogManager} + * configuration. + * + * @param pattern The pattern for the location and name of the + * produced log files. See the section on file name patterns for details. + * If pattern is null, the value is + * taken from the {@link LogManager LogManager} configuration + * property + * java.util.logging.FileHandler.pattern. + * However, this is a pecularity of the GNU implementation, + * and Sun's API specification does not mention what behavior + * is to be expected for null. Therefore, + * applications should not rely on this feature. + * + * @param limit specifies the number of bytes a log file is + * approximately allowed to reach before it is closed and the + * handler switches to the next file in the rotating set. A + * value of zero means that files can grow without limit. + * + * @param count specifies the number of log files through which this + * handler cycles. + * + * @param append specifies whether the handler will append log + * records to existing files (true), or whether the + * handler will clear log files upon switching to them + * (false). + * + * @throws java.io.IOException FIXME: The Sun Javadoc says: "if + * there are IO problems opening the files." This conflicts + * with the general principle that configuration errors do + * not prohibit construction. Needs review. + * + * @throws SecurityException if a security manager exists and + * the caller is not granted the permission to control + * the logging infrastructure. + *

                FIXME: This seems in contrast to all other handler + * constructors -- verify this by running tests against + * the Sun reference implementation. + */ + public FileHandler(String pattern, + int limit, + int count, + boolean append) + throws IOException, SecurityException + { + super(createFileStream(pattern, limit, count, append, + /* generation */ 0), + "java.util.logging.FileHandler", + /* default level */ Level.ALL, + /* formatter */ null, + /* default formatter */ XMLFormatter.class); + + if ((limit <0) || (count < 1)) + throw new IllegalArgumentException(); + + this.pattern = pattern; + this.limit = limit; + this.count = count; + this.append = append; + } + + + /* FIXME: Javadoc missing. */ + private static java.io.OutputStream createFileStream(String pattern, + int limit, + int count, + boolean append, + int generation) + { + String path; + int unique = 0; + + /* Throws a SecurityException if the caller does not have + * LoggingPermission("control"). + */ + LogManager.getLogManager().checkAccess(); + + /* Default value from the java.util.logging.FileHandler.pattern + * LogManager configuration property. + */ + if (pattern == null) + pattern = LogManager.getLogManager().getProperty( + "java.util.logging.FileHandler.pattern"); + if (pattern == null) + pattern = "%h/java%u.log"; + + do + { + path = replaceFileNameEscapes(pattern, generation, unique, count); + + try + { + File file = new File(path); + if (file.createNewFile()) + return new FileOutputStream(path, append); + } + catch (Exception ex) + { + ex.printStackTrace(); + } + + unique = unique + 1; + if (pattern.indexOf("%u") < 0) + pattern = pattern + ".%u"; + } + while (true); + } + + + /** + * Replaces the substrings "/" by the value of the + * system property "file.separator", "%t" + * by the value of the system property + * "java.io.tmpdir", "%h" by the value of + * the system property "user.home", "%g" + * by the value of generation, "%u" by the + * value of uniqueNumber, and "%%" by a + * single percent character. If pattern does + * not contain the sequence "%g", + * the value of generation will be appended to + * the result. + * + * @throws NullPointerException if one of the system properties + * "file.separator", + * "java.io.tmpdir", or + * "user.home" has no value and the + * corresponding escape sequence appears in + * pattern. + */ + private static String replaceFileNameEscapes(String pattern, + int generation, + int uniqueNumber, + int count) + { + StringBuffer buf = new StringBuffer(pattern); + String replaceWith; + boolean foundGeneration = false; + + int pos = 0; + do + { + // Uncomment the next line for finding bugs. + // System.out.println(buf.substring(0,pos) + '|' + buf.substring(pos)); + + if (buf.charAt(pos) == '/') + { + /* The same value is also provided by java.io.File.separator. */ + replaceWith = System.getProperty("file.separator"); + buf.replace(pos, pos + 1, replaceWith); + pos = pos + replaceWith.length() - 1; + continue; + } + + if (buf.charAt(pos) == '%') + { + switch (buf.charAt(pos + 1)) + { + case 't': + replaceWith = System.getProperty("java.io.tmpdir"); + break; + + case 'h': + replaceWith = System.getProperty("user.home"); + break; + + case 'g': + replaceWith = Integer.toString(generation); + foundGeneration = true; + break; + + case 'u': + replaceWith = Integer.toString(uniqueNumber); + break; + + case '%': + replaceWith = "%"; + break; + + default: + replaceWith = "??"; + break; // FIXME: Throw exception? + } + + buf.replace(pos, pos + 2, replaceWith); + pos = pos + replaceWith.length() - 1; + continue; + } + } + while (++pos < buf.length() - 1); + + if (!foundGeneration && (count > 1)) + { + buf.append('.'); + buf.append(generation); + } + + return buf.toString(); + } + + + /* FIXME: Javadoc missing, implementation incomplete. */ + public void publish(LogRecord record) + { + super.publish(record); + + /* FIXME: Decide when to switch over. How do we get to + * the number of bytes published so far? Two possibilities: + * 1. File.length, 2. have metering wrapper around + * output stream counting the number of written bytes. + */ + + /* FIXME: Switch over if needed! This implementation always + * writes into a single file, i.e. behaves as if limit + * always was zero. So, the implementation is somewhat + * functional but incomplete. + */ + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/util/logging/Filter.java gcc-3.4.0/libjava/java/util/logging/Filter.java *** gcc-3.3.3/libjava/java/util/logging/Filter.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/util/logging/Filter.java 2004-01-09 08:58:59.000000000 +0000 *************** *** 0 **** --- 1,68 ---- + /* Filter.java + -- an interface for filters that decide whether a LogRecord should + be published or discarded + + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. + + */ + + + package java.util.logging; + + /** + * By implementing the Filter interface, applications + * can control what is being logged based on arbitrary properties, + * not just the severity level. Both Handler and + * Logger allow to register Filters whose + * isLoggable method will be called when a + * LogRecord has passed the test based on the + * severity level. + * + * @author Sascha Brawer (brawer@acm.org) + */ + public interface Filter + { + /** + * Determines whether a LogRecord should be published or discarded. + * + * @param record the LogRecord to be inspected. + * + * @return true if the record should be published, + * false if it should be discarded. + */ + boolean isLoggable(LogRecord record); + } diff -Nrc3pad gcc-3.3.3/libjava/java/util/logging/Formatter.java gcc-3.4.0/libjava/java/util/logging/Formatter.java *** gcc-3.3.3/libjava/java/util/logging/Formatter.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/util/logging/Formatter.java 2003-06-21 10:31:55.000000000 +0000 *************** *** 0 **** --- 1,174 ---- + /* Formatter.java + -- a class for formatting log messages by localizing message texts + and performing substitution of parameters + + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. + + */ + + + package java.util.logging; + + import java.util.ResourceBundle; + import java.text.MessageFormat; + + /** + * A Formatter supports handlers by localizing + * message texts and by subsituting parameter values for their + * placeholders. + * + * @author Sascha Brawer (brawer@acm.org) + */ + public abstract class Formatter + { + /** + * Constructs a new Formatter. + */ + protected Formatter() + { + } + + + /** + * Formats a LogRecord into a string. Usually called by handlers + * which need a string for a log record, for example to append + * a record to a log file or to transmit a record over the network. + * + * @param record the log record for which a string form is requested. + */ + public abstract String format(LogRecord record); + + + /** + * Returns a string that handlers are supposed to emit before + * the first log record. The base implementation returns an + * empty string, but subclasses such as {@link XMLFormatter} + * override this method in order to provide a suitable header. + * + * @return a string for the header. + * + * @param handler the handler which will prepend the returned + * string in front of the first log record. This method + * may inspect certain properties of the handler, for + * example its encoding, in order to construct the header. + */ + public String getHead(Handler handler) + { + return ""; + } + + + /** + * Returns a string that handlers are supposed to emit after + * the last log record. The base implementation returns an + * empty string, but subclasses such as {@link XMLFormatter} + * override this method in order to provide a suitable tail. + * + * @return a string for the header. + * + * @param handler the handler which will append the returned + * string after the last log record. This method + * may inspect certain properties of the handler + * in order to construct the tail. + */ + public String getTail(Handler handler) + { + return ""; + } + + + /** + * Formats the message part of a log record. + * + *

                First, the Formatter localizes the record message to the + * default locale by looking up the message in the record's + * localization resource bundle. If this step fails because there + * is no resource bundle associated with the record, or because the + * record message is not a key in the bundle, the raw message is + * used instead. + * + *

                Second, the Formatter substitutes appropriate strings for + * the message parameters. If the record returns a non-empty + * array for getParameters() and the localized + * message string contains the character sequence "{0", the + * formatter uses java.text.MessageFormat to format + * the message. Otherwise, no parameter substitution is performed. + * + * @param record the log record to be localized and formatted. + * + * @return the localized message text where parameters have been + * substituted by suitable strings. + * + * @throws NullPointerException if record + * is null. + */ + public String formatMessage(LogRecord record) + { + String msg; + ResourceBundle bundle; + Object[] params; + + /* This will throw a NullPointerExceptionif record is null. */ + msg = record.getMessage(); + if (msg == null) + msg = ""; + + /* Try to localize the message. */ + bundle = record.getResourceBundle(); + if (bundle != null) + { + try + { + msg = bundle.getString(msg); + } + catch (java.util.MissingResourceException _) + { + } + } + + /* Format the message if there are parameters. */ + params = record.getParameters(); + if ((params != null) + && (params.length > 0) + && (msg.indexOf("{0") >= 0)) + { + msg = MessageFormat.format(msg, params); + } + + return msg; + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/util/logging/Handler.java gcc-3.4.0/libjava/java/util/logging/Handler.java *** gcc-3.3.3/libjava/java/util/logging/Handler.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/util/logging/Handler.java 2003-07-18 16:08:38.000000000 +0000 *************** *** 0 **** --- 1,390 ---- + /* Handler.java + -- a class for publishing log messages + + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. + + */ + + + package java.util.logging; + + import java.io.UnsupportedEncodingException; + import java.security.AccessController; + + /** + * A Handler publishes LogRecords to + * a sink, for example a file, the console or a network socket. + * There are different subclasses of Handler + * to deal with different kinds of sinks. + * + *

                FIXME: Are handlers thread-safe, or is the assumption that only + * loggers are, and a handler can belong only to one single logger? If + * the latter, should we enforce it? (Spec not clear). In any + * case, it needs documentation. + * + * @author Sascha Brawer (brawer@acm.org) + */ + public abstract class Handler + { + Formatter formatter; + Filter filter; + Level level; + ErrorManager errorManager; + String encoding; + + /** + * Constructs a Handler with a logging severity level of + * Level.ALL, no formatter, no filter, and + * an instance of ErrorManager managing errors. + * + *

                Specification Note: The specification of the + * JavaTM Logging API does not mention which character + * encoding is to be used by freshly constructed Handlers. The GNU + * implementation uses the default platform encoding, but other + * Java implementations might behave differently. + * + *

                Specification Note: While a freshly constructed + * Handler is required to have no filter according to the + * specification, null is not a valid parameter for + * Handler.setFormatter. Therefore, the following + * code will throw a java.lang.NullPointerException: + * + *

                Handler h = new MyConcreteSubclassOfHandler();
                + h.setFormatter(h.getFormatter());
                + * + * It seems strange that a freshly constructed Handler is not + * supposed to provide a Formatter, but this is what the specification + * says. + */ + { + level = Level.ALL; + } + + + /** + * Publishes a LogRecord to an appropriate sink, + * provided the record passes all tests for being loggable. The + * Handler will localize the message of the log + * record and substitute any message parameters. + * + *

                Most applications do not need to call this method directly. + * Instead, they will use use a {@link Logger}, which will + * create LogRecords and distribute them to registered handlers. + * + *

                In case of an I/O failure, the ErrorManager + * of this Handler will be informed, but the caller + * of this method will not receive an exception. + * + * @param record the log event to be published. + */ + public abstract void publish(LogRecord record); + + + /** + * Forces any data that may have been buffered to the underlying + * output device. + * + *

                In case of an I/O failure, the ErrorManager + * of this Handler will be informed, but the caller + * of this method will not receive an exception. + */ + public abstract void flush(); + + + /** + * Closes this Handler after having flushed + * the buffers. As soon as close has been called, + * a Handler should not be used anymore. Attempts + * to publish log records, to flush buffers, or to modify the + * Handler in any other way may throw runtime + * exceptions after calling close. + * + *

                In case of an I/O failure, the ErrorManager + * of this Handler will be informed, but the caller + * of this method will not receive an exception. + * + * @throws SecurityException if a security manager exists and + * the caller is not granted the permission to control + * the logging infrastructure. + */ + public abstract void close() + throws SecurityException; + + + /** + * Returns the Formatter which will be used to + * localize the text of log messages and to substitute + * message parameters. A Handler is encouraged, + * but not required to actually use an assigned + * Formatter. + * + * @return the Formatter being used, or + * null if this Handler + * does not use formatters and no formatter has + * ever been set by calling setFormatter. + */ + public Formatter getFormatter() + { + return formatter; + } + + + /** + * Sets the Formatter which will be used to + * localize the text of log messages and to substitute + * message parameters. A Handler is encouraged, + * but not required to actually use an assigned + * Formatter. + * + * @param formatter the new Formatter to use. + * + * @throws SecurityException if a security manager exists and + * the caller is not granted the permission to control + * the logging infrastructure. + * + * @throws NullPointerException if formatter is + * null. + */ + public void setFormatter(Formatter formatter) + throws SecurityException + { + LogManager.getLogManager().checkAccess(); + + /* Throws a NullPointerException if formatter is null. */ + formatter.getClass(); + + this.formatter = formatter; + } + + + /** + * Returns the character encoding which this handler uses for publishing + * log records. + * + * @param encoding the name of a character encoding, or null + * for the default platform encoding. + */ + public String getEncoding() + { + return encoding; + } + + + /** + * Sets the character encoding which this handler uses for publishing + * log records. The encoding of a Handler must be + * set before any log records have been published. + * + * @param encoding the name of a character encoding, or null + * for the default encoding. + * + * @exception SecurityException if a security manager exists and + * the caller is not granted the permission to control + * the logging infrastructure. + * + */ + public void setEncoding(String encoding) + throws SecurityException, UnsupportedEncodingException + { + /* Should any developer ever change this implementation, they are + * advised to have a look at StreamHandler.setEncoding(String), + * which overrides this method without calling super.setEncoding. + */ + LogManager.getLogManager().checkAccess(); + + /* Simple check for supported encodings. This is more expensive + * than it could be, but this method is overwritten by StreamHandler + * anyway. + */ + if (encoding != null) + new String(new byte[0], encoding); + + this.encoding = encoding; + } + + + /** + * Returns the Filter that currently controls which + * log records are being published by this Handler. + * + * @return the currently active Filter, or + * null if no filter has been associated. + * In the latter case, log records are filtered purely + * based on their severity level. + */ + public Filter getFilter() + { + return filter; + } + + + /** + * Sets the Filter for controlling which + * log records will be published by this Handler. + * + * @return the Filter to use, or + * null to filter log records purely based + * on their severity level. + */ + public void setFilter(Filter filter) + throws SecurityException + { + LogManager.getLogManager().checkAccess(); + this.filter = filter; + } + + + /** + * Returns the ErrorManager that currently deals + * with errors originating from this Handler. + * + * @exception SecurityException if a security manager exists and + * the caller is not granted the permission to control + * the logging infrastructure. + */ + public ErrorManager getErrorManager() + { + LogManager.getLogManager().checkAccess(); + + /* Developers wanting to change the subsequent code should + * have a look at Handler.reportError -- it also can create + * an ErrorManager, but does so without checking permissions + * to control the logging infrastructure. + */ + if (errorManager == null) + errorManager = new ErrorManager(); + + return errorManager; + } + + + public void setErrorManager(ErrorManager manager) + { + LogManager.getLogManager().checkAccess(); + + /* Make sure manager is not null. */ + manager.getClass(); + + this.errorManager = manager; + } + + + protected void reportError(String message, Exception ex, int code) + { + if (errorManager == null) + errorManager = new ErrorManager(); + + errorManager.error(message, ex, code); + } + + + /** + * Returns the severity level threshold for this Handler + * All log records with a lower severity level will be discarded; + * a log record of the same or a higher level will be published + * unless an installed Filter decides to discard it. + * + * @return the severity level below which all log messages + * will be discarded. + */ + public Level getLevel() + { + return level; + } + + + /** + * Sets the severity level threshold for this Handler. + * All log records with a lower severity level will be discarded; + * a log record of the same or a higher level will be published + * unless an installed Filter decides to discard it. + * + * @param level the severity level below which all log messages + * will be discarded. + * + * @exception SecurityException if a security manager exists and + * the caller is not granted the permission to control + * the logging infrastructure. + * + * @exception NullPointerException if level is + * null. + */ + public void setLevel(Level level) + { + LogManager.getLogManager().checkAccess(); + + /* Throw NullPointerException if level is null. */ + level.getClass(); + this.level = level; + } + + + /** + * Checks whether a LogRecord would be logged + * if it was passed to this Handler for publication. + * + *

                The Handler implementation considers a record as + * loggable if its level is greater than or equal to the severity + * level threshold. In a second step, if a {@link Filter} has + * been installed, its {@link Filter#isLoggable(LogRecord) isLoggable} + * method is invoked. Subclasses of Handler can override + * this method to impose their own constraints. + * + * @param record the LogRecord to be checked. + * + * @return true if record would + * be published by {@link #publish(LogRecord) publish}, + * false if it would be discarded. + * + * @see #setLevel(Level) + * @see #setFilter(Filter) + * @see Filter#isLoggable(LogRecord) + * + * @throws NullPointerException if record + * is null. + */ + public boolean isLoggable(LogRecord record) + { + if (record.getLevel().intValue() <= level.intValue()) + return false; + + if (filter != null) + return filter.isLoggable(record); + else + return true; + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/util/logging/Level.java gcc-3.4.0/libjava/java/util/logging/Level.java *** gcc-3.3.3/libjava/java/util/logging/Level.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/util/logging/Level.java 2003-06-21 10:31:55.000000000 +0000 *************** *** 0 **** --- 1,417 ---- + /* Level.java -- a class for indicating logging levels + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. + + */ + + + package java.util.logging; + + import java.util.ResourceBundle; + + + /** + * A class for indicating logging levels. A number of commonly used + * levels is pre-defined (such as java.util.logging.Level.INFO), + * and applications should utilize those whenever possible. For specialized + * purposes, however, applications can sub-class Level in order to define + * custom logging levels. + * + * @author Sascha Brawer + */ + public class Level + implements java.io.Serializable + { + /* The integer values are the same as in the Sun J2SE 1.4. + * They have been obtained with a test program. In J2SE 1.4.1, + * Sun has amended the API documentation; these values are now + * publicly documented. + */ + + /** + * The OFF level is used as a threshold for filtering + * log records, meaning that no message should be logged. + * + * @see Logger#setLevel(java.util.logging.Level) + */ + public static final Level OFF = new Level ("OFF", Integer.MAX_VALUE); + + /** + * Log records whose level is SEVERE indicate a serious + * failure that prevents normal program execution. Messages at this + * level should be understandable to an inexperienced, non-technical + * end user. Ideally, they explain in simple words what actions the + * user can take in order to resolve the problem. + */ + public static final Level SEVERE = new Level ("SEVERE", 1000); + + + /** + * Log records whose level is WARNING indicate a + * potential problem that does not prevent normal program execution. + * Messages at this level should be understandable to an + * inexperienced, non-technical end user. Ideally, they explain in + * simple words what actions the user can take in order to resolve + * the problem. + */ + public static final Level WARNING = new Level ("WARNING", 900); + + + /** + * Log records whose level is INFO are used in purely + * informational situations that do not constitute serious errors or + * potential problems. In the default logging configuration, INFO + * messages will be written to the system console. For this reason, + * the INFO level should be used only for messages that are + * important to end users and system administrators. Messages at + * this level should be understandable to an inexperienced, + * non-technical user. + */ + public static final Level INFO = new Level ("INFO", 800); + + + /** + * Log records whose level is CONFIG are used for + * describing the static configuration, for example the windowing + * environment, the operating system version, etc. + */ + public static final Level CONFIG = new Level ("CONFIG", 700); + + + /** + * Log records whose level is FINE are typically used + * for messages that are relevant for developers using + * the component generating log messages. Examples include minor, + * recoverable failures, or possible inefficiencies. + */ + public static final Level FINE = new Level ("FINE", 500); + + + /** + * Log records whose level is FINER are intended for + * rather detailed tracing, for example entering a method, returning + * from a method, or throwing an exception. + */ + public static final Level FINER = new Level ("FINER", 400); + + + /** + * Log records whose level is FINEST are used for + * highly detailed tracing, for example to indicate that a certain + * point inside the body of a method has been reached. + */ + public static final Level FINEST = new Level ("FINEST", 300); + + + /** + * The ALL level is used as a threshold for filtering + * log records, meaning that every message should be logged. + * + * @see Logger#setLevel(java.util.logging.Level) + */ + public static final Level ALL = new Level ("ALL", Integer.MIN_VALUE); + + + private static final Level[] knownLevels = { + ALL, FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE, OFF + }; + + + /** + * The name of the Level without localizing it, for example + * "WARNING". + */ + private String name; + + + /** + * The integer value of this Level. + */ + private int value; + + + /** + * The name of the resource bundle used for localizing the level + * name, or null if the name does not undergo + * localization. + */ + private String resourceBundleName; + + + /** + * Creates a logging level given a name and an integer value. + * It rarely is necessary to create custom levels, + * as most applications should be well served with one of the + * standard levels such as Level.CONFIG, + * Level.INFO, or Level.FINE. + * + * @param name the name of the level. + * + * @param value the integer value of the level. Please note + * that the JavaTM + * Logging API does not specify integer + * values for standard levels (such as + * Level.FINE). Therefore, a custom + * level should pass an integer value that + * is calculated at run-time, e.g. + * (Level.FINE.intValue() + Level.CONFIG.intValue()) + * / 2 for a level between FINE and CONFIG. + */ + protected Level(String name, int value) + { + this(name, value, null); + } + + + /** + * Create a logging level given a name, an integer value and a name + * of a resource bundle for localizing the level name. It rarely + * is necessary to create custom levels, as most applications + * should be well served with one of the standard levels such as + * Level.CONFIG, Level.INFO, or + * Level.FINE. + * + * @param name the name of the level. + * + * @param value the integer value of the level. Please note + * that the JavaTM + * Logging API does not specify integer + * values for standard levels (such as + * Level.FINE). Therefore, a custom + * level should pass an integer value that + * is calculated at run-time, e.g. + * (Level.FINE.intValue() + Level.CONFIG.intValue()) + * / 2 for a level between FINE and CONFIG. + * + * @param resourceBundleName the name of a resource bundle + * for localizing the level name, or null + * if the name does not need to be localized. + */ + protected Level(String name, int value, String resourceBundleName) + { + this.name = name; + this.value = value; + this.resourceBundleName = resourceBundleName; + } + + + static final long serialVersionUID = -8176160795706313070L; + + + /** + * Checks whether the Level has the same intValue as one of the + * pre-defined levels. If so, the pre-defined level object is + * returned. + * + *
                Since the resource bundle name is not taken into + * consideration, it is possible to resolve Level objects that have + * been de-serialized by another implementation, even if the other + * implementation uses a different resource bundle for localizing + * the names of pre-defined levels. + */ + private Object readResolve() + { + for (int i = 0; i < knownLevels.length; i++) + if (value == knownLevels[i].intValue()) + return knownLevels[i]; + + return this; + } + + + /** + * Returns the name of the resource bundle used for localizing the + * level name. + * + * @return the name of the resource bundle used for localizing the + * level name, or null if the name does not undergo + * localization. + */ + public String getResourceBundleName() + { + return resourceBundleName; + } + + + /** + * Returns the name of the Level without localizing it, for example + * "WARNING". + */ + public String getName() + { + return name; + } + + + /** + * Returns the name of the Level after localizing it, for example + * "WARNUNG". + */ + public String getLocalizedName() + { + String localizedName = null; + + if (resourceBundleName != null) + { + try + { + ResourceBundle b = ResourceBundle.getBundle(resourceBundleName); + localizedName = b.getString(name); + } + catch (Exception _) + { + } + } + + if (localizedName != null) + return localizedName; + else + return name; + } + + + /** + * Returns the name of the Level without localizing it, for example + * "WARNING". + */ + public final String toString() + { + return getName(); + } + + + /** + * Returns the integer value of the Level. + */ + public final int intValue() + { + return value; + } + + + /** + * Returns one of the standard Levels given either its name or its + * integer value. Custom subclasses of Level will not be returned + * by this method. + * + * @throws IllegalArgumentException if name is neither + * the name nor the integer value of one of the pre-defined standard + * logging levels. + * + * @throws NullPointerException if name is null. + * + */ + public static Level parse(String name) + throws IllegalArgumentException + { + /* This will throw a NullPointerException if name is null, + * as required by the API specification. + */ + name = name.intern(); + + for (int i = 0; i < knownLevels.length; i++) + { + if (name == knownLevels[i].name) + return knownLevels[i]; + } + + try + { + int num = Integer.parseInt(name); + for (int i = 0; i < knownLevels.length; i++) + if (num == knownLevels[i].value) + return knownLevels[i]; + } + catch (NumberFormatException _) + { + } + + String msg = "Not the name of a standard logging level: \"" + name + "\""; + throw new IllegalArgumentException(msg); + } + + + /** + * Checks whether this Level's integer value is equal to that of + * another object. + * + * @return true if other is an instance of + * java.util.logging.Level and has the same integer + * value, false otherwise. + */ + public boolean equals(Object other) + { + if (!(other instanceof Level)) + return false; + + return value == ((Level) other).value; + } + + + /** + * Returns a hash code for this Level which is based on its numeric + * value. + */ + public int hashCode() + { + return value; + } + + + /** + * Determines whether or not this Level is one of the standard + * levels specified in the Logging API. + * + *

                This method is package-private because it is not part + * of the logging API specification. However, an XMLFormatter + * is supposed to emit the numeric value for a custom log + * level, but the name for a pre-defined level. It seems + * cleaner to put this method to Level than to write some + * procedural code for XMLFormatter. + * + * @return true if this Level is a standard level, + * false otherwise. + */ + final boolean isStandardLevel() + { + for (int i = 0; i < knownLevels.length; i++) + if (knownLevels[i] == this) + return true; + + return false; + } + } + diff -Nrc3pad gcc-3.3.3/libjava/java/util/logging/Logger.java gcc-3.4.0/libjava/java/util/logging/Logger.java *** gcc-3.3.3/libjava/java/util/logging/Logger.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/util/logging/Logger.java 2003-08-31 16:52:16.000000000 +0000 *************** *** 0 **** --- 1,1189 ---- + /* Logger.java + -- a class for logging messages + + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. + + */ + + + package java.util.logging; + + import java.util.ResourceBundle; + import java.util.MissingResourceException; + import java.util.List; + + /** + * A Logger is used for logging information about events. Usually, there + * is a seprate logger for each subsystem or component, although there + * is a shared instance for components that make only occasional use of + * the logging framework. + * + *

                It is common to name a logger after the name of a corresponding + * Java package. Loggers are organized into a hierarchical namespace; + * for example, the logger "org.gnu.foo" is the + * parent of logger "org.gnu.foo.bar". + * + *

                A logger for a named subsystem can be obtained through {@link + * java.util.logging.Logger#getLogger(java.lang.String)}. However, + * only code which has been granted the permission to control the + * logging infrastructure will be allowed to customize that logger. + * Untrusted code can obtain a private, anonymous logger through + * {@link #getAnonymousLogger()} if it wants to perform any + * modifications to the logger. + * + *

                FIXME: Write more documentation. + * + * @author Sascha Brawer (brawer@acm.org) + */ + public class Logger + { + /** + * A logger provided to applications that make only occasional use + * of the logging framework, typically early prototypes. Serious + * products are supposed to create and use their own Loggers, so + * they can be controlled individually. + */ + public static final Logger global = getLogger("global"); + + + /** + * The name of the Logger, or null if the logger is + * anonymous. + * + *

                A previous version of the GNU Classpath implementation granted + * untrusted code the permission to control any logger whose name + * was null. However, test code revealed that the Sun J2SE 1.4 + * reference implementation enforces the security control for any + * logger that was not created through getAnonymousLogger, even if + * it has a null name. Therefore, a separate flag {@link + * Logger#anonymous} was introduced. + */ + private final String name; + + + /** + * The name of the resource bundle used for localization. + * + *

                This variable cannot be declared as final + * because its value can change as a result of calling + * getLogger(String,String). + */ + private String resourceBundleName; + + + /** + * The resource bundle used for localization. + * + *

                This variable cannot be declared as final + * because its value can change as a result of calling + * getLogger(String,String). + */ + private ResourceBundle resourceBundle; + + private Filter filter; + + private final List handlerList = new java.util.ArrayList(4); + private Handler[] handlers = new Handler[0]; + + /** + * Indicates whether or not this logger is anonymous. While + * a LoggingPermission is required for any modifications to + * a normal logger, untrusted code can obtain an anonymous logger + * and modify it according to its needs. + * + *

                A previous version of the GNU Classpath implementation + * granted access to every logger whose name was null. + * However, test code revealed that the Sun J2SE 1.4 reference + * implementation enforces the security control for any logger + * that was not created through getAnonymousLogger, even + * if it has a null name. + */ + private boolean anonymous; + + + private boolean useParentHandlers; + + private Level level; + + private Logger parent; + + /** + * Constructs a Logger for a subsystem. Most applications do not + * need to create new Loggers explicitly; instead, they should call + * the static factory methods + * {@link #getLogger(java.lang.String,java.lang.String) getLogger} + * (with ResourceBundle for localization) or + * {@link #getLogger(java.lang.String) getLogger} (without + * ResourceBundle), respectively. + * + * @param name the name for the logger, for example "java.awt" + * or "com.foo.bar". The name should be based on + * the name of the package issuing log records + * and consist of dot-separated Java identifiers. + * + * @param resourceBundleName the name of a resource bundle + * for localizing messages, or null + * to indicate that messages do not need to be localized. + * + * @throws java.util.MissingResourceException if + * resourceBundleName is not null + * and no such bundle could be located. + */ + protected Logger(String name, String resourceBundleName) + throws MissingResourceException + { + this.name = name; + this.resourceBundleName = resourceBundleName; + + if (resourceBundleName == null) + resourceBundle = null; + else + resourceBundle = ResourceBundle.getBundle(resourceBundleName); + + level = null; + + /* This is null when the root logger is being constructed, + * and the root logger afterwards. + */ + parent = LogManager.getLogManager().rootLogger; + + useParentHandlers = (parent != null); + } + + + + /** + * Finds a registered logger for a subsystem, or creates one in + * case no logger has been registered yet. + * + * @param name the name for the logger, for example "java.awt" + * or "com.foo.bar". The name should be based on + * the name of the package issuing log records + * and consist of dot-separated Java identifiers. + * + * @throws IllegalArgumentException if a logger for the subsystem + * identified by name has already been created, + * but uses a a resource bundle for localizing messages. + * + * @throws NullPointerException if name is + * null. + * + * @return a logger for the subsystem specified by name + * that does not localize messages. + */ + public static Logger getLogger(String name) + { + return getLogger(name, null); + } + + + /** + * Finds a registered logger for a subsystem, or creates one in case + * no logger has been registered yet. + * + *

                If a logger with the specified name has already been + * registered, the behavior depends on the resource bundle that is + * currently associated with the existing logger. + * + *

                • If the existing logger uses the same resource bundle as + * specified by resourceBundleName, the existing logger + * is returned.
                • + * + *
                • If the existing logger currently does not localize messages, + * the existing logger is modified to use the bundle specified by + * resourceBundleName. The existing logger is then + * returned. Therefore, all subsystems currently using this logger + * will produce localized messages from now on.
                • + * + *
                • If the existing logger already has an associated resource + * bundle, but a different one than specified by + * resourceBundleName, an + * IllegalArgumentException is thrown.
                + * + * @param name the name for the logger, for example "java.awt" + * or "org.gnu.foo". The name should be based on + * the name of the package issuing log records + * and consist of dot-separated Java identifiers. + * + * @param resourceBundleName the name of a resource bundle + * for localizing messages, or null + * to indicate that messages do not need to be localized. + * + * @return a logger for the subsystem specified by name. + * + * @throws java.util.MissingResourceException if + * resourceBundleName is not null + * and no such bundle could be located. + * + * @throws IllegalArgumentException if a logger for the subsystem + * identified by name has already been created, + * but uses a different resource bundle for localizing + * messages. + * + * @throws NullPointerException if name is + * null. + */ + public static Logger getLogger(String name, String resourceBundleName) + { + LogManager lm = LogManager.getLogManager(); + Logger result; + + /* Throw NullPointerException if name is null. */ + name.getClass(); + + /* Without synchronized(lm), it could happen that another thread + * would create a logger between our calls to getLogger and + * addLogger. While addLogger would indicate this by returning + * false, we could not be sure that this other logger was still + * existing when we called getLogger a second time in order + * to retrieve it -- note that LogManager is only allowed to + * keep weak references to registered loggers, so Loggers + * can be garbage collected at any time in general, and between + * our call to addLogger and our second call go getLogger + * in particular. + * + * Of course, we assume here that LogManager.addLogger etc. + * are synchronizing on the global LogManager object. There + * is a comment in the implementation of LogManager.addLogger + * referring to this comment here, so that any change in + * the synchronization of LogManager will be reflected here. + */ + synchronized (lm) + { + result = lm.getLogger(name); + if (result == null) + { + boolean couldBeAdded; + + result = new Logger(name, resourceBundleName); + couldBeAdded = lm.addLogger(result); + if (!couldBeAdded) + throw new IllegalStateException("cannot register new logger"); + } + else + { + /* The logger already exists. Make sure it uses + * the same resource bundle for localizing messages. + */ + String existingBundleName = result.getResourceBundleName(); + + /* The Sun J2SE 1.4 reference implementation will return the + * registered logger object, even if it does not have a resource + * bundle associated with it. However, it seems to change the + * resourceBundle of the registered logger to the bundle + * whose name was passed to getLogger. + */ + if ((existingBundleName == null) && (resourceBundleName != null)) + { + /* If ResourceBundle.getBundle throws an exception, the + * existing logger will be unchanged. This would be + * different if the assignment to resourceBundleName + * came first. + */ + result.resourceBundle = ResourceBundle.getBundle(resourceBundleName); + result.resourceBundleName = resourceBundleName; + return result; + } + + if ((existingBundleName != resourceBundleName) + && ((existingBundleName == null) + || !existingBundleName.equals(resourceBundleName))) + { + throw new IllegalArgumentException(); + } + } + } + + return result; + } + + + /** + * Creates a new, unnamed logger. Unnamed loggers are not + * registered in the namespace of the LogManager, and no special + * security permission is required for changing their state. + * Therefore, untrusted applets are able to modify their private + * logger instance obtained through this method. + * + *

                The parent of the newly created logger will the the root + * logger, from which the level threshold and the handlers are + * inherited. + */ + public static Logger getAnonymousLogger() + { + return getAnonymousLogger(null); + } + + + /** + * Creates a new, unnamed logger. Unnamed loggers are not + * registered in the namespace of the LogManager, and no special + * security permission is required for changing their state. + * Therefore, untrusted applets are able to modify their private + * logger instance obtained through this method. + * + *

                The parent of the newly created logger will the the root + * logger, from which the level threshold and the handlers are + * inherited. + * + * @param resourceBundleName the name of a resource bundle + * for localizing messages, or null + * to indicate that messages do not need to be localized. + * + * @throws java.util.MissingResourceException if + * resourceBundleName is not null + * and no such bundle could be located. + */ + public static Logger getAnonymousLogger(String resourceBundleName) + throws MissingResourceException + { + Logger result; + + result = new Logger(null, resourceBundleName); + result.anonymous = true; + return result; + } + + + /** + * Returns the name of the resource bundle that is being used for + * localizing messages. + * + * @return the name of the resource bundle used for localizing messages, + * or null if the parent's resource bundle + * is used for this purpose. + */ + public synchronized String getResourceBundleName() + { + return resourceBundleName; + } + + + /** + * Returns the resource bundle that is being used for localizing + * messages. + * + * @return the resource bundle used for localizing messages, + * or null if the parent's resource bundle + * is used for this purpose. + */ + public synchronized ResourceBundle getResourceBundle() + { + return resourceBundle; + } + + + /** + * Returns the severity level threshold for this Handler. + * All log records with a lower severity level will be discarded; + * a log record of the same or a higher level will be published + * unless an installed Filter decides to discard it. + * + * @return the severity level below which all log messages will be + * discarded, or null if the logger inherits + * the threshold from its parent. + */ + public synchronized Level getLevel() + { + return level; + } + + + /** + * Returns whether or not a message of the specified level + * would be logged by this logger. + * + * @throws NullPointerException if level + * is null. + */ + public synchronized boolean isLoggable(Level level) + { + if (this.level != null) + return this.level.intValue() <= level.intValue(); + + if (parent != null) + return parent.isLoggable(level); + else + return false; + } + + + /** + * Sets the severity level threshold for this Handler. + * All log records with a lower severity level will be discarded + * immediately. A log record of the same or a higher level will be + * published unless an installed Filter decides to + * discard it. + * + * @param level the severity level below which all log messages + * will be discarded, or null to + * indicate that the logger should inherit the + * threshold from its parent. + * + * @throws SecurityException if this logger is not anonymous, a + * security manager exists, and the caller is not granted + * the permission to control the logging infrastructure by + * having LoggingPermission("control"). Untrusted code can + * obtain an anonymous logger through the static factory method + * {@link #getAnonymousLogger(java.lang.String) getAnonymousLogger}. + */ + public synchronized void setLevel(Level level) + { + /* An application is allowed to control an anonymous logger + * without having the permission to control the logging + * infrastructure. + */ + if (!anonymous) + LogManager.getLogManager().checkAccess(); + + this.level = level; + } + + + public synchronized Filter getFilter() + { + return filter; + } + + + /** + * @throws SecurityException if this logger is not anonymous, a + * security manager exists, and the caller is not granted + * the permission to control the logging infrastructure by + * having LoggingPermission("control"). Untrusted code can + * obtain an anonymous logger through the static factory method + * {@link #getAnonymousLogger(java.lang.String) getAnonymousLogger}. + */ + public synchronized void setFilter(Filter filter) + throws SecurityException + { + /* An application is allowed to control an anonymous logger + * without having the permission to control the logging + * infrastructure. + */ + if (!anonymous) + LogManager.getLogManager().checkAccess(); + + this.filter = filter; + } + + + + + /** + * Returns the name of this logger. + * + * @return the name of this logger, or null if + * the logger is anonymous. + */ + public String getName() + { + /* Note that the name of a logger cannot be changed during + * its lifetime, so no synchronization is needed. + */ + return name; + } + + + /** + * Passes a record to registered handlers, provided the record + * is considered as loggable both by {@link #isLoggable(Level)} + * and a possibly installed custom {@link #setFilter(Filter) filter}. + * + *

                If the logger has been configured to use parent handlers, + * the record will be forwarded to the parent of this logger + * in addition to being processed by the handlers registered with + * this logger. + * + *

                The other logging methods in this class are convenience methods + * that merely create a new LogRecord and pass it to this method. + * Therefore, subclasses usually just need to override this single + * method for customizing the logging behavior. + * + * @param record the log record to be inspected and possibly forwarded. + */ + public synchronized void log(LogRecord record) + { + if (!isLoggable(record.getLevel())) + return; + + if ((filter != null) && !filter.isLoggable(record)) + return; + + /* If no logger name has been set for the log record, + * use the name of this logger. + */ + if (record.getLoggerName() == null) + record.setLoggerName(name); + + /* Avoid that some other thread is changing the logger hierarchy + * while we are traversing it. + */ + synchronized (LogManager.getLogManager()) + { + Logger curLogger = this; + + do + { + /* The Sun J2SE 1.4 reference implementation seems to call the + * filter only for the logger whose log method is called, + * never for any of its parents. Also, parent loggers publish + * log record whatever their level might be. This is pretty + * weird, but GNU Classpath tries to be as compatible as + * possible to the reference implementation. + */ + for (int i = 0; i < curLogger.handlers.length; i++) + curLogger.handlers[i].publish(record); + + if (curLogger.getUseParentHandlers() == false) + break; + + curLogger = curLogger.getParent(); + } + while (parent != null); + } + } + + + public void log(Level level, String message) + { + log(level, message, (Object[]) null); + } + + + public synchronized void log(Level level, + String message, + Object param) + { + StackTraceElement caller = getCallerStackFrame(); + logp(level, + caller.getClassName(), + caller.getMethodName(), + message, + param); + } + + + public synchronized void log(Level level, + String message, + Object[] params) + { + StackTraceElement caller = getCallerStackFrame(); + logp(level, + caller.getClassName(), + caller.getMethodName(), + message, + params); + } + + + public synchronized void log(Level level, + String message, + Throwable thrown) + { + StackTraceElement caller = getCallerStackFrame(); + logp(level, + caller.getClassName(), + caller.getMethodName(), + message, + thrown); + } + + + public synchronized void logp(Level level, + String sourceClass, + String sourceMethod, + String message) + { + logp(level, sourceClass, sourceMethod, message, + (Object[]) null); + } + + + public synchronized void logp(Level level, + String sourceClass, + String sourceMethod, + String message, + Object param) + { + logp(level, sourceClass, sourceMethod, message, + new Object[] { param }); + } + + + private synchronized ResourceBundle findResourceBundle() + { + if (resourceBundle != null) + return resourceBundle; + + if (parent != null) + return parent.findResourceBundle(); + + return null; + } + + + private synchronized void logImpl(Level level, + String sourceClass, + String sourceMethod, + String message, + Object[] params) + { + LogRecord rec = new LogRecord(level, message); + + rec.setResourceBundle(findResourceBundle()); + rec.setSourceClassName(sourceClass); + rec.setSourceMethodName(sourceMethod); + rec.setParameters(params); + + log(rec); + } + + + public synchronized void logp(Level level, + String sourceClass, + String sourceMethod, + String message, + Object[] params) + { + logImpl(level, sourceClass, sourceMethod, message, params); + } + + + public synchronized void logp(Level level, + String sourceClass, + String sourceMethod, + String message, + Throwable thrown) + { + LogRecord rec = new LogRecord(level, message); + + rec.setResourceBundle(resourceBundle); + rec.setSourceClassName(sourceClass); + rec.setSourceMethodName(sourceMethod); + rec.setThrown(thrown); + + log(rec); + } + + + public synchronized void logrb(Level level, + String sourceClass, + String sourceMethod, + String bundleName, + String message) + { + logrb(level, sourceClass, sourceMethod, bundleName, + message, (Object[]) null); + } + + + public synchronized void logrb(Level level, + String sourceClass, + String sourceMethod, + String bundleName, + String message, + Object param) + { + logrb(level, sourceClass, sourceMethod, bundleName, + message, new Object[] { param }); + } + + + public synchronized void logrb(Level level, + String sourceClass, + String sourceMethod, + String bundleName, + String message, + Object[] params) + { + LogRecord rec = new LogRecord(level, message); + + rec.setResourceBundleName(bundleName); + rec.setSourceClassName(sourceClass); + rec.setSourceMethodName(sourceMethod); + rec.setParameters(params); + + log(rec); + } + + + public synchronized void logrb(Level level, + String sourceClass, + String sourceMethod, + String bundleName, + String message, + Throwable thrown) + { + LogRecord rec = new LogRecord(level, message); + + rec.setResourceBundleName(bundleName); + rec.setSourceClassName(sourceClass); + rec.setSourceMethodName(sourceMethod); + rec.setThrown(thrown); + + log(rec); + } + + + public synchronized void entering(String sourceClass, + String sourceMethod) + { + if (isLoggable(Level.FINER)) + logp(Level.FINER, sourceClass, sourceMethod, "ENTRY"); + } + + + public synchronized void entering(String sourceClass, + String sourceMethod, + Object param) + { + if (isLoggable(Level.FINER)) + logp(Level.FINER, sourceClass, sourceMethod, "ENTRY {0}", param); + } + + + public synchronized void entering(String sourceClass, + String sourceMethod, + Object[] params) + { + if (isLoggable(Level.FINER)) + { + StringBuffer buf = new StringBuffer(80); + buf.append("ENTRY"); + for (int i = 0; i < params.length; i++) + { + buf.append(" {"); + buf.append(i); + buf.append('}'); + } + + logp(Level.FINER, sourceClass, sourceMethod, buf.toString(), params); + } + } + + + public synchronized void exiting(String sourceClass, + String sourceMethod) + { + if (isLoggable(Level.FINER)) + logp(Level.FINER, sourceClass, sourceMethod, "RETURN"); + } + + + public synchronized void exiting(String sourceClass, + String sourceMethod, + Object result) + { + if (isLoggable(Level.FINER)) + logp(Level.FINER, sourceClass, sourceMethod, "RETURN {0}", result); + } + + + public synchronized void throwing(String sourceClass, + String sourceMethod, + Throwable thrown) + { + if (isLoggable(Level.FINER)) + logp(Level.FINER, sourceClass, sourceMethod, "THROW", thrown); + } + + + /** + * Logs a message with severity level SEVERE, indicating a serious + * failure that prevents normal program execution. Messages at this + * level should be understandable to an inexperienced, non-technical + * end user. Ideally, they explain in simple words what actions the + * user can take in order to resolve the problem. + * + * @see Level#SEVERE + * + * @param message the message text, also used as look-up key if the + * logger is localizing messages with a resource + * bundle. While it is possible to pass + * null, this is not recommended, since + * a logging message without text is unlikely to be + * helpful. + */ + public synchronized void severe(String message) + { + if (isLoggable(Level.SEVERE)) + log(Level.SEVERE, message); + } + + + /** + * Logs a message with severity level WARNING, indicating a + * potential problem that does not prevent normal program execution. + * Messages at this level should be understandable to an + * inexperienced, non-technical end user. Ideally, they explain in + * simple words what actions the user can take in order to resolve + * the problem. + * + * @see Level#WARNING + * + * @param message the message text, also used as look-up key if the + * logger is localizing messages with a resource + * bundle. While it is possible to pass + * null, this is not recommended, since + * a logging message without text is unlikely to be + * helpful. + */ + public synchronized void warning(String message) + { + if (isLoggable(Level.WARNING)) + log(Level.WARNING, message); + } + + + /** + * Logs a message with severity level INFO. {@link Level#INFO} is + * intended for purely informational messages that do not indicate + * error or warning situations. In the default logging + * configuration, INFO messages will be written to the system + * console. For this reason, the INFO level should be used only for + * messages that are important to end users and system + * administrators. Messages at this level should be understandable + * to an inexperienced, non-technical user. + * + * @param message the message text, also used as look-up key if the + * logger is localizing messages with a resource + * bundle. While it is possible to pass + * null, this is not recommended, since + * a logging message without text is unlikely to be + * helpful. + */ + public synchronized void info(String message) + { + if (isLoggable(Level.INFO)) + log(Level.INFO, message); + } + + + /** + * Logs a message with severity level CONFIG. {@link Level#CONFIG} is + * intended for static configuration messages, for example about the + * windowing environment, the operating system version, etc. + * + * @param message the message text, also used as look-up key if the + * logger is localizing messages with a resource bundle. While + * it is possible to pass null, this is not + * recommended, since a logging message without text is unlikely + * to be helpful. + */ + public synchronized void config(String message) + { + if (isLoggable(Level.CONFIG)) + log(Level.CONFIG, message); + } + + + /** + * Logs a message with severity level FINE. {@link Level#FINE} is + * intended for messages that are relevant for developers using + * the component generating log messages. Examples include minor, + * recoverable failures, or possible inefficiencies. + * + * @param message the message text, also used as look-up key if the + * logger is localizing messages with a resource + * bundle. While it is possible to pass + * null, this is not recommended, since + * a logging message without text is unlikely to be + * helpful. + */ + public synchronized void fine(String message) + { + if (isLoggable(Level.FINE)) + log(Level.FINE, message); + } + + + /** + * Logs a message with severity level FINER. {@link Level#FINER} is + * intended for rather detailed tracing, for example entering a + * method, returning from a method, or throwing an exception. + * + * @param message the message text, also used as look-up key if the + * logger is localizing messages with a resource + * bundle. While it is possible to pass + * null, this is not recommended, since + * a logging message without text is unlikely to be + * helpful. + */ + public synchronized void finer(String message) + { + if (isLoggable(Level.FINER)) + log(Level.FINER, message); + } + + + /** + * Logs a message with severity level FINEST. {@link Level#FINEST} + * is intended for highly detailed tracing, for example reaching a + * certain point inside the body of a method. + * + * @param message the message text, also used as look-up key if the + * logger is localizing messages with a resource + * bundle. While it is possible to pass + * null, this is not recommended, since + * a logging message without text is unlikely to be + * helpful. + */ + public synchronized void finest(String message) + { + if (isLoggable(Level.FINEST)) + log(Level.FINEST, message); + } + + + /** + * Adds a handler to the set of handlers that get notified + * when a log record is to be published. + * + * @param handler the handler to be added. + * + * @throws NullPointerException if handler + * is null. + * + * @throws SecurityException if this logger is not anonymous, a + * security manager exists, and the caller is not granted + * the permission to control the logging infrastructure by + * having LoggingPermission("control"). Untrusted code can + * obtain an anonymous logger through the static factory method + * {@link #getAnonymousLogger(java.lang.String) getAnonymousLogger}. + */ + public synchronized void addHandler(Handler handler) + throws SecurityException + { + /* Throw a new NullPointerException if handler is null. */ + handler.getClass(); + + /* An application is allowed to control an anonymous logger + * without having the permission to control the logging + * infrastructure. + */ + if (!anonymous) + LogManager.getLogManager().checkAccess(); + + if (!handlerList.contains(handler)) + { + handlerList.add(handler); + handlers = getHandlers(); + } + } + + + /** + * Removes a handler from the set of handlers that get notified + * when a log record is to be published. + * + * @param handler the handler to be removed. + * + * @throws SecurityException if this logger is not anonymous, a + * security manager exists, and the caller is not granted the + * permission to control the logging infrastructure by having + * LoggingPermission("control"). Untrusted code can obtain an + * anonymous logger through the static factory method {@link + * #getAnonymousLogger(java.lang.String) getAnonymousLogger}. + * + * @throws NullPointerException if handler + * is null. + */ + public synchronized void removeHandler(Handler handler) + throws SecurityException + { + /* An application is allowed to control an anonymous logger + * without having the permission to control the logging + * infrastructure. + */ + if (!anonymous) + LogManager.getLogManager().checkAccess(); + + /* Throw a new NullPointerException if handler is null. */ + handler.getClass(); + + handlerList.remove(handler); + handlers = getHandlers(); + } + + + /** + * Returns the handlers currently registered for this Logger. + * When a log record has been deemed as being loggable, + * it will be passed to all registered handlers for + * publication. In addition, if the logger uses parent handlers + * (see {@link #getUseParentHandlers() getUseParentHandlers} + * and {@link #setUseParentHandlers(boolean) setUseParentHandlers}, + * the log record will be passed to the parent's handlers. + */ + public synchronized Handler[] getHandlers() + { + /* We cannot return our internal handlers array + * because we do not have any guarantee that the + * caller would not change the array entries. + */ + return (Handler[]) handlerList.toArray(new Handler[handlerList.size()]); + } + + + /** + * Returns whether or not this Logger forwards log records to + * handlers registered for its parent loggers. + * + * @return false if this Logger sends log records + * merely to Handlers registered with itself; + * true if this Logger sends log records + * not only to Handlers registered with itself, but also + * to those Handlers registered with parent loggers. + */ + public synchronized boolean getUseParentHandlers() + { + return useParentHandlers; + } + + + /** + * Sets whether or not this Logger forwards log records to + * handlers registered for its parent loggers. + * + * @param useParentHandlers false to let this + * Logger send log records merely to Handlers registered + * with itself; true to let this Logger + * send log records not only to Handlers registered + * with itself, but also to those Handlers registered with + * parent loggers. + * + * @throws SecurityException if this logger is not anonymous, a + * security manager exists, and the caller is not granted + * the permission to control the logging infrastructure by + * having LoggingPermission("control"). Untrusted code can + * obtain an anonymous logger through the static factory method + * {@link #getAnonymousLogger(java.lang.String) getAnonymousLogger}. + * + */ + public synchronized void setUseParentHandlers(boolean useParentHandlers) + { + /* An application is allowed to control an anonymous logger + * without having the permission to control the logging + * infrastructure. + */ + if (!anonymous) + LogManager.getLogManager().checkAccess(); + + this.useParentHandlers = useParentHandlers; + } + + + /** + * Returns the parent of this logger. By default, the parent is + * assigned by the LogManager by inspecting the logger's name. + * + * @return the parent of this logger (as detemined by the LogManager + * by inspecting logger names), the root logger if no other + * logger has a name which is a prefix of this logger's name, or + * null for the root logger. + */ + public synchronized Logger getParent() + { + return parent; + } + + + /** + * Sets the parent of this logger. Usually, applications do not + * call this method directly. Instead, the LogManager will ensure + * that the tree of loggers reflects the hierarchical logger + * namespace. Basically, this method should not be public at all, + * but the GNU implementation follows the API specification. + * + * @throws NullPointerException if parent is + * null. + * + * @throws SecurityException if this logger is not anonymous, a + * security manager exists, and the caller is not granted + * the permission to control the logging infrastructure by + * having LoggingPermission("control"). Untrusted code can + * obtain an anonymous logger through the static factory method + * {@link #getAnonymousLogger(java.lang.String) getAnonymousLogger}. + */ + public synchronized void setParent(Logger parent) + { + LogManager lm; + + /* Throw a new NullPointerException if parent is null. */ + parent.getClass(); + + lm = LogManager.getLogManager(); + + if (this == lm.rootLogger) + { + if (parent != null) + throw new IllegalArgumentException( + "only the root logger can have a null parent"); + this.parent = null; + return; + } + + /* An application is allowed to control an anonymous logger + * without having the permission to control the logging + * infrastructure. + */ + if (!anonymous) + LogManager.getLogManager().checkAccess(); + + this.parent = parent; + } + + /** + * Gets the StackTraceElement of the first class that is not this class. + * That should be the initial caller of a logging method. + * @return caller of the initial looging method + */ + private StackTraceElement getCallerStackFrame() + { + Throwable t = new Throwable(); + StackTraceElement[] stackTrace = t.getStackTrace(); + int index = 0; + // skip to stackentries until this class + while(!stackTrace[index].getClassName().equals(getClass().getName())){index++;} + // skip the stackentries of this class + while(stackTrace[index].getClassName().equals(getClass().getName())){index++;} + + return stackTrace[index]; + } + + } diff -Nrc3pad gcc-3.3.3/libjava/java/util/logging/LoggingPermission.java gcc-3.4.0/libjava/java/util/logging/LoggingPermission.java *** gcc-3.3.3/libjava/java/util/logging/LoggingPermission.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/util/logging/LoggingPermission.java 2003-06-21 10:31:55.000000000 +0000 *************** *** 0 **** --- 1,75 ---- + /* LoggingPermission.java -- a class for logging permissions. + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. + + */ + + + package java.util.logging; + + public final class LoggingPermission + extends java.security.BasicPermission + { + /** + * Creates a new LoggingPermission. + * + * @param name the name of the permission, which must be "control". + * + * @param actions the list of actions for the permission, which + * must be either null or an empty + * string. + * + * @exception IllegalArgumentException if name + * is not "control", or actions is + * neither null nor empty. + */ + public LoggingPermission(String name, String actions) + { + super("control", ""); + + if (!"control".equals(name)) + { + throw new IllegalArgumentException( + "name of LoggingPermission must be \"control\""); + } + + if ((actions != null) && (actions.length() != 0)) + { + throw new IllegalArgumentException( + "actions of LoggingPermissions must be null or empty"); + } + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/util/logging/logging.properties gcc-3.4.0/libjava/java/util/logging/logging.properties *** gcc-3.3.3/libjava/java/util/logging/logging.properties 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/util/logging/logging.properties 2003-11-25 01:57:29.000000000 +0000 *************** *** 0 **** --- 1,8 ---- + # Default logging properties. + # See javadoc in java.util.logging.LogManager to information on + # overriding these settings. Most of the defaults are compiled in, so + # this file is fairly minimal. + + # Send log records to System.err, default to INFO per documentation. + handlers = java.util.logging.ConsoleHandler + .level = INFO diff -Nrc3pad gcc-3.3.3/libjava/java/util/logging/LogManager.java gcc-3.4.0/libjava/java/util/logging/LogManager.java *** gcc-3.3.3/libjava/java/util/logging/LogManager.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/util/logging/LogManager.java 2004-01-09 08:58:59.000000000 +0000 *************** *** 0 **** --- 1,848 ---- + /* LogManager.java + -- a class for maintaining Loggers and managing configuration + properties + + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. + + */ + + package java.util.logging; + + import java.beans.PropertyChangeListener; + import java.beans.PropertyChangeSupport; + import java.io.IOException; + import java.io.InputStream; + import java.net.URL; + import java.util.Collections; + import java.util.Properties; + import java.util.Enumeration; + import java.util.Iterator; + import java.util.Map; + import java.util.StringTokenizer; + import java.lang.ref.WeakReference; + + /** + * The LogManager maintains a hierarchical namespace + * of Logger objects and manages properties for configuring the logging + * framework. There exists only one single LogManager + * per virtual machine. This instance can be retrieved using the + * static method {@link #getLogManager()}. + * + *

                Configuration Process: The global LogManager + * object is created and configured when the class + * java.util.logging.LogManager is initialized. + * The configuration process includes the subsequent steps: + * + *

                  + *
                1. If the system property java.util.logging.manager + * is set to the name of a subclass of + * java.util.logging.LogManager, an instance of + * that subclass is created and becomes the global LogManager. + * Otherwise, a new instance of LogManager is created.
                2. + * + *
                3. The LogManager constructor tries to create + * a new instance of the class specified by the system + * property java.util.logging.config.class. + * Typically, the constructor of this class will call + * LogManager.getLogManager().readConfiguration(java.io.InputStream) + * for configuring the logging framework. + * The configuration process stops at this point if + * the system property java.util.logging.config.class + * is set (irrespective of whether the class constructor + * could be called or an exception was thrown).
                4. + * + *
                5. If the system property java.util.logging.config.class + * is not set, the configuration parameters are read in from + * a file and passed to + * {@link #readConfiguration(java.io.InputStream)}. + * The name and location of this file are specified by the system + * property java.util.logging.config.file.
                6. + * + *
                7. If the system property java.util.logging.config.file + * is not set, however, the contents of the URL + * "{gnu.classpath.home.url}/logging.properties" are passed to + * {@link #readConfiguration(java.io.InputStream)}. + * Here, "{gnu.classpath.home.url}" stands for the value of + * the system property gnu.classpath.home.url.
                8. + *
                + * + * @author Sascha Brawer (brawer@acm.org) + */ + public class LogManager + { + /** + * The singleton LogManager instance. + */ + private static LogManager logManager; + + + /** + * The registered named loggers; maps the name of a Logger to + * a WeakReference to it. + */ + private Map loggers; + + final Logger rootLogger; + + + /** + * The properties for the logging framework which have been + * read in last. + */ + private Properties properties; + + /** + * A delegate object that provides support for handling + * PropertyChangeEvents. The API specification does not + * mention which bean should be the source in the distributed + * PropertyChangeEvents, but Mauve test code has determined that + * the Sun J2SE 1.4 reference implementation uses the LogManager + * class object. This is somewhat strange, as the class object + * is not the bean with which listeners have to register, but + * there is no reason for the GNU Classpath implementation to + * behave differently from the reference implementation in + * this case. + */ + private final PropertyChangeSupport pcs + = new PropertyChangeSupport(/* source bean */ LogManager.class); + + protected LogManager() + { + if (logManager != null) + throw new IllegalStateException( + "there can be only one LogManager; use LogManager.getLogManager()"); + + logManager = this; + loggers = new java.util.HashMap(); + rootLogger = new Logger("", null); + addLogger(rootLogger); + + /* Make sure that Logger.global has the rootLogger as its parent. + * + * Logger.global is set during class initialization of Logger, + * which may or may not be before this code is being executed. + * For example, on the Sun 1.3.1 and 1.4.0 JVMs, Logger.global + * has been set before this code is being executed. In contrast, + * Logger.global still is null on GCJ 3.2. Since the LogManager + * and Logger classes are mutually dependent, both behaviors are + * correct. + * + * This means that we cannot depend on Logger.global to have its + * value when this code executes, although that variable is final. + * Since Logger.getLogger will always return the same logger for + * the same name, the subsequent line works fine irrespective of + * the order in which classes are initialized. + */ + Logger.getLogger("global").setParent(rootLogger); + Logger.getLogger("global").setUseParentHandlers(true); + } + + + /** + * Returns the globally shared LogManager instance. + */ + public static LogManager getLogManager() + { + return logManager; + } + + static + { + makeLogManager(); + + /* The Javadoc description of the class explains + * what is going on here. + */ + Object configurator = createInstance( + System.getProperty("java.util.logging.config.class"), + /* must be instance of */ Object.class); + + try + { + if (configurator == null) + getLogManager().readConfiguration(); + } + catch (IOException ex) + { + /* FIXME: Is it ok to ignore exceptions here? */ + } + } + + + private static LogManager makeLogManager() + { + String managerClassName; + LogManager manager; + + managerClassName = System.getProperty("java.util.logging.manager"); + manager = (LogManager) createInstance(managerClassName, LogManager.class); + if (manager != null) + return manager; + + if (managerClassName != null) + System.err.println("WARNING: System property \"java.util.logging.manager\"" + + " should be the name of a subclass of java.util.logging.LogManager"); + + return new LogManager(); + } + + + /** + * Registers a listener which will be notified when the + * logging properties are re-read. + */ + public synchronized void addPropertyChangeListener(PropertyChangeListener listener) + { + /* do not register null. */ + listener.getClass(); + + pcs.addPropertyChangeListener(listener); + } + + + /** + * Unregisters a listener. + * + * If listener has not been registered previously, + * nothing happens. Also, no exception is thrown if + * listener is null. + */ + public synchronized void removePropertyChangeListener(PropertyChangeListener listener) + { + if (listener != null) + pcs.removePropertyChangeListener(listener); + } + + + /** + * Adds a named logger. If a logger with the same name has + * already been registered, the method returns false + * without adding the logger. + * + *

                The LogManager only keeps weak references + * to registered loggers. Therefore, names can become available + * after automatic garbage collection. + * + * @param logger the logger to be added. + * + * @return trueif logger was added, + * false otherwise. + * + * @throws NullPointerException if name is + * null. + */ + public synchronized boolean addLogger(Logger logger) + { + /* To developers thinking about to remove the 'synchronized' + * declaration from this method: Please read the comment + * in java.util.logging.Logger.getLogger(String, String) + * and make sure that whatever you change wrt. synchronization + * does not endanger thread-safety of Logger.getLogger. + * The current implementation of Logger.getLogger assumes + * that LogManager does its synchronization on the globally + * shared instance of LogManager. + */ + + String name; + WeakReference ref; + + /* This will throw a NullPointerException if logger is null, + * as required by the API specification. + */ + name = logger.getName(); + + ref = (WeakReference) loggers.get(name); + if (ref != null) + { + if (ref.get() != null) + return false; + + /* There has been a logger under this name in the past, + * but it has been garbage collected. + */ + loggers.remove(ref); + } + + /* Adding a named logger requires a security permission. */ + if ((name != null) && !name.equals("")) + checkAccess(); + + Logger parent = findAncestor(logger); + loggers.put(name, new WeakReference(logger)); + if (parent != logger.getParent()) + logger.setParent(parent); + + /* It can happen that existing loggers should be children of + * the newly added logger. For example, assume that there + * already exist loggers under the names "", "foo", and "foo.bar.baz". + * When adding "foo.bar", the logger "foo.bar.baz" should change + * its parent to "foo.bar". + */ + if (parent != rootLogger) + { + for (Iterator iter = loggers.keySet().iterator(); iter.hasNext();) + { + Logger possChild = (Logger) ((WeakReference) loggers.get(iter.next())).get(); + if ((possChild == null) || (possChild == logger) || (possChild.getParent() != parent)) + continue; + + if (!possChild.getName().startsWith(name)) + continue; + + if (possChild.getName().charAt(name.length()) != '.') + continue; + + possChild.setParent(logger); + } + } + + return true; + } + + + /** + * Finds the closest ancestor for a logger among the currently + * registered ones. For example, if the currently registered + * loggers have the names "", "foo", and "foo.bar", the result for + * "foo.bar.baz" will be the logger whose name is "foo.bar". + * + * @param child a logger for whose name no logger has been + * registered. + * + * @return the closest ancestor for child, + * or null if child + * is the root logger. + * + * @throws NullPointerException if child + * is null. + */ + private synchronized Logger findAncestor(Logger child) + { + String childName = child.getName(); + Logger best = rootLogger; + int bestNameLength = 0; + + Logger cand; + String candName; + int candNameLength; + + if (child == rootLogger) + return null; + + for (Iterator iter = loggers.keySet().iterator(); iter.hasNext();) + { + candName = (String) iter.next(); + candNameLength = candName.length(); + + if ((candNameLength > bestNameLength) + && childName.startsWith(candName) + && (childName.charAt(candNameLength) == '.')) + { + cand = (Logger) ((WeakReference) loggers.get(candName)).get(); + if ((cand == null) || (cand == child)) + continue; + + bestNameLength = candName.length(); + best = cand; + } + } + + return best; + } + + + /** + * Returns a Logger given its name. + * + * @param name the name of the logger. + * + * @return a named Logger, or null if there is no + * logger with that name. + * + * @throw java.lang.NullPointerException if name + * is null. + */ + public synchronized Logger getLogger(String name) + { + WeakReference ref; + + /* Throw a NullPointerException if name is null. */ + name.getClass(); + + ref = (WeakReference) loggers.get(name); + if (ref != null) + return (Logger) ref.get(); + else + return null; + } + + + /** + * Returns an Enumeration of currently registered Logger names. + * Since other threads can register loggers at any time, the + * result could be different any time this method is called. + * + * @return an Enumeration with the names of the currently + * registered Loggers. + */ + public synchronized Enumeration getLoggerNames() + { + return Collections.enumeration(loggers.keySet()); + } + + + /** + * Resets the logging configuration by removing all handlers for + * registered named loggers and setting their level to null. + * The level of the root logger will be set to Level.INFO. + * + * @throws SecurityException if a security manager exists and + * the caller is not granted the permission to control + * the logging infrastructure. + */ + public synchronized void reset() + throws SecurityException + { + /* Throw a SecurityException if the caller does not have the + * permission to control the logging infrastructure. + */ + checkAccess(); + + properties = new Properties(); + + Iterator iter = loggers.values().iterator(); + while (iter.hasNext()) + { + WeakReference ref; + Logger logger; + + ref = (WeakReference) iter.next(); + if (ref != null) + { + logger = (Logger) ref.get(); + + if (logger == null) + iter.remove(); + else if (logger != rootLogger) + logger.setLevel(null); + } + } + + rootLogger.setLevel(Level.INFO); + } + + + /** + * Configures the logging framework by reading a configuration file. + * The name and location of this file are specified by the system + * property java.util.logging.config.file. If this + * property is not set, the URL + * "{gnu.classpath.home.url}/logging.properties" is taken, where + * "{gnu.classpath.home.url}" stands for the value of the system + * property gnu.classpath.home.url. + * + *

                The task of configuring the framework is then delegated to + * {@link #readConfiguration(java.io.InputStream)}, which will + * notify registered listeners after having read the properties. + * + * @throws SecurityException if a security manager exists and + * the caller is not granted the permission to control + * the logging infrastructure, or if the caller is + * not granted the permission to read the configuration + * file. + * + * @throws IOException if there is a problem reading in the + * configuration file. + */ + public synchronized void readConfiguration() + throws IOException, SecurityException + { + String path; + InputStream inputStream; + + path = System.getProperty("java.util.logging.config.file"); + if ((path == null) || (path.length() == 0)) + { + String url = (System.getProperty("gnu.classpath.home.url") + + "/logging.properties"); + inputStream = new URL(url).openStream(); + } + else + { + inputStream = new java.io.FileInputStream(path); + } + + try + { + readConfiguration(inputStream); + } + finally + { + /* Close the stream in order to save + * resources such as file descriptors. + */ + inputStream.close(); + } + } + + + public synchronized void readConfiguration(InputStream inputStream) + throws IOException, SecurityException + { + Properties newProperties; + Enumeration keys; + + checkAccess(); + newProperties = new Properties(); + newProperties.load(inputStream); + this.properties = newProperties; + keys = newProperties.propertyNames(); + + while (keys.hasMoreElements()) + { + String key = ((String) keys.nextElement()).trim(); + String value = newProperties.getProperty(key); + + if (value == null) + continue; + + value = value.trim(); + + if("handlers".equals(key)) + { + StringTokenizer tokenizer = new StringTokenizer(value); + while(tokenizer.hasMoreTokens()) + { + String handlerName = tokenizer.nextToken(); + try + { + Class handlerClass = Class.forName(handlerName); + getLogger("").addHandler((Handler)handlerClass.newInstance()); + } + catch (ClassCastException ex) + { + System.err.println("[LogManager] class " + handlerName + " is not subclass of java.util.logging.Handler"); + } + catch (Exception ex) + { + //System.out.println("[LogManager.readConfiguration]"+ex); + } + } + } + + if (key.endsWith(".level")) + { + String loggerName = key.substring(0, key.length() - 6); + Logger logger = getLogger(loggerName); + if (logger != null) + { + try + { + logger.setLevel(Level.parse(value)); + } + catch (Exception _) + { + //System.out.println("[LogManager.readConfiguration] "+_); + } + continue; + } + } + } + + /* The API specification does not talk about the + * property name that is distributed with the + * PropertyChangeEvent. With test code, it could + * be determined that the Sun J2SE 1.4 reference + * implementation uses null for the property name. + */ + pcs.firePropertyChange(null, null, null); + } + + + /** + * Returns the value of a configuration property as a String. + */ + public synchronized String getProperty(String name) + { + if (properties != null) + return properties.getProperty(name); + else + return null; + } + + + /** + * Returns the value of a configuration property as an integer. + * This function is a helper used by the Classpath implementation + * of java.util.logging, it is not specified in the + * logging API. + * + * @param name the name of the configuration property. + * + * @param defaultValue the value that will be returned if the + * property is not defined, or if its value is not an integer + * number. + */ + static int getIntProperty(String name, int defaultValue) + { + try + { + return Integer.parseInt(getLogManager().getProperty(name)); + } + catch (Exception ex) + { + return defaultValue; + } + } + + + /** + * Returns the value of a configuration property as an integer, + * provided it is inside the acceptable range. + * This function is a helper used by the Classpath implementation + * of java.util.logging, it is not specified in the + * logging API. + * + * @param name the name of the configuration property. + * + * @param minValue the lowest acceptable value. + * + * @param maxValue the highest acceptable value. + * + * @param defaultValue the value that will be returned if the + * property is not defined, or if its value is not an integer + * number, or if it is less than the minimum value, + * or if it is greater than the maximum value. + */ + static int getIntPropertyClamped(String name, int defaultValue, + int minValue, int maxValue) + { + int val = getIntProperty(name, defaultValue); + if ((val < minValue) || (val > maxValue)) + val = defaultValue; + return val; + } + + + /** + * Returns the value of a configuration property as a boolean. + * This function is a helper used by the Classpath implementation + * of java.util.logging, it is not specified in the + * logging API. + * + * @param name the name of the configuration property. + * + * @param defaultValue the value that will be returned if the + * property is not defined, or if its value is neither + * "true" nor "false". + */ + static boolean getBooleanProperty(String name, boolean defaultValue) + { + try + { + return (new Boolean(getLogManager().getProperty(name))) + .booleanValue(); + } + catch (Exception ex) + { + return defaultValue; + } + } + + + /** + * Returns the value of a configuration property as a Level. + * This function is a helper used by the Classpath implementation + * of java.util.logging, it is not specified in the + * logging API. + * + * @param propertyName the name of the configuration property. + * + * @param defaultValue the value that will be returned if the + * property is not defined, or if + * {@link Level.parse(java.lang.String)} does not like + * the property value. + */ + static Level getLevelProperty(String propertyName, Level defaultValue) + { + try + { + return Level.parse(getLogManager().getProperty(propertyName)); + } + catch (Exception ex) + { + return defaultValue; + } + } + + + /** + * Returns the value of a configuration property as a Class. + * This function is a helper used by the Classpath implementation + * of java.util.logging, it is not specified in the + * logging API. + * + * @param propertyName the name of the configuration property. + * + * @param defaultValue the value that will be returned if the + * property is not defined, or if it does not specify + * the name of a loadable class. + */ + static final Class getClassProperty(String propertyName, Class defaultValue) + { + Class usingClass = null; + + try + { + String propertyValue = logManager.getProperty(propertyName); + if (propertyValue != null) + usingClass = Class.forName(propertyValue); + if (usingClass != null) + return usingClass; + } + catch (Exception _) + { + } + + return defaultValue; + } + + + static final Object getInstanceProperty(String propertyName, + Class ofClass, + Class defaultClass) + { + Class klass = getClassProperty(propertyName, defaultClass); + if (klass == null) + return null; + + try + { + Object obj = klass.newInstance(); + if (ofClass.isInstance(obj)) + return obj; + } + catch (Exception _) + { + } + + if (defaultClass == null) + return null; + + try + { + return defaultClass.newInstance(); + } + catch (java.lang.InstantiationException ex) + { + throw new RuntimeException(ex.getMessage()); + } + catch (java.lang.IllegalAccessException ex) + { + throw new RuntimeException(ex.getMessage()); + } + } + + + /** + * An instance of LoggingPermission("control") + * that is shared between calls to checkAccess(). + */ + private static final LoggingPermission controlPermission + = new LoggingPermission("control", null); + + + /** + * Checks whether the current security context allows changing + * the configuration of the logging framework. For the security + * context to be trusted, it has to be granted + * a LoggingPermission("control"). + * + * @throws SecurityException if a security manager exists and + * the caller is not granted the permission to control + * the logging infrastructure. + */ + public void checkAccess() + throws SecurityException + { + SecurityManager sm = System.getSecurityManager(); + if (sm != null) + sm.checkPermission(controlPermission); + } + + + /** + * Creates a new instance of a class specified by name. + * + * @param className the name of the class of which a new instance + * should be created. + * + * @param ofClass the class to which the new instance should + * be either an instance or an instance of a subclass. + * FIXME: This description is just terrible. + * + * @return the new instance, or null if + * className is null, if no class + * with that name could be found, if there was an error + * loading that class, or if the constructor of the class + * has thrown an exception. + */ + static final Object createInstance(String className, Class ofClass) + { + Class klass; + + if ((className == null) || (className.length() == 0)) + return null; + + try + { + klass = Class.forName(className); + if (!ofClass.isAssignableFrom(klass)) + return null; + + return klass.newInstance(); + } + catch (Exception _) + { + return null; + } + catch (java.lang.LinkageError _) + { + return null; + } + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/util/logging/LogRecord.java gcc-3.4.0/libjava/java/util/logging/LogRecord.java *** gcc-3.3.3/libjava/java/util/logging/LogRecord.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/util/logging/LogRecord.java 2003-06-21 10:31:54.000000000 +0000 *************** *** 0 **** --- 1,675 ---- + /* LogRecord.java + -- a class for the state associated with individual logging events + + Copyright (C) 2002, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. + + */ + + + package java.util.logging; + + import java.util.ResourceBundle; + + + /** + * A LogRecord contains the state for an individual + * event to be logged. + * + *

                As soon as a LogRecord instance has been handed over to the + * logging framework, applications should not manipulate it anymore. + * + * @author Sascha Brawer (brawer@acm.org) + */ + public class LogRecord + implements java.io.Serializable + { + /** + * The severity level of this LogRecord. + */ + private Level level; + + + /** + * The sequence number of this LogRecord. + */ + private long sequenceNumber; + + + /** + * The name of the class that issued the logging request, or + * null if this information could not be obtained. + */ + private String sourceClassName; + + + /** + * The name of the method that issued the logging request, or + * null if this information could not be obtained. + */ + private String sourceMethodName; + + + /** + * The message for this LogRecord before + * any localization or formatting. + */ + private String message; + + + /** + * An identifier for the thread in which this LogRecord + * was created. The identifier is not necessarily related to any + * thread identifiers used by the operating system. + */ + private int threadID; + + + /** + * The time when this LogRecord was created, + * in milliseconds since the beginning of January 1, 1970. + */ + private long millis; + + + /** + * The Throwable associated with this LogRecord, or + * null if the logged event is not related to an + * exception or error. + */ + private Throwable thrown; + + + /** + * The name of the logger where this LogRecord has + * originated, or null if this LogRecord + * does not originate from a Logger. + */ + private String loggerName; + + + /** + * The name of the resource bundle used for localizing log messages, + * or null if no bundle has been specified. + */ + private String resourceBundleName; + + private transient Object[] parameters; + + private transient ResourceBundle bundle; + + + /** + * Constructs a LogRecord given a severity level and + * an unlocalized message text. In addition, the sequence number, + * creation time (as returned by getMillis()) and + * thread ID are assigned. All other properties are set to + * null. + * + * @param level the severity level, for example Level.WARNING. + * + * @param message the message text (which will be used as key + * for looking up the localized message text + * if a resource bundle has been associated). + */ + public LogRecord(Level level, String message) + { + this.level = level; + this.message = message; + this.millis = System.currentTimeMillis(); + + /* A subclass of java.lang.Thread could override hashCode(), + * in which case the result would not be guaranteed anymore + * to be unique among all threads. While System.identityHashCode + * is not necessarily unique either, it at least cannot be + * overridden by user code. However, is might be a good idea + * to use something better for generating thread IDs. + */ + this.threadID = System.identityHashCode(Thread.currentThread()); + + sequenceNumber = allocateSeqNum(); + } + + + /** + * Determined with the serialver tool of the Sun J2SE 1.4. + */ + static final long serialVersionUID = 5372048053134512534L; + + private void readObject(java.io.ObjectInputStream in) + throws java.io.IOException, java.lang.ClassNotFoundException + { + in.defaultReadObject(); + + /* We assume that future versions will be downwards compatible, + * so we can ignore the versions. + */ + byte majorVersion = in.readByte(); + byte minorVersion = in.readByte(); + + int numParams = in.readInt(); + if (numParams >= 0) + { + parameters = new Object[numParams]; + for (int i = 0; i < numParams; i++) + parameters[i] = in.readObject(); + } + } + + + /** + * @serialData The default fields, followed by a major byte version + * number, followed by a minor byte version number, followed by + * information about the log record parameters. If + * parameters is null, the integer -1 is + * written, otherwise the length of the parameters + * array (which can be zero), followed by the result of calling + * {@link Object#toString() toString()} on the parameter (or + * null if the parameter is null). + * + *

                Specification Note: The Javadoc for the + * Sun reference implementation does not specify the version + * number. FIXME: Reverse-engineer the JDK and file a bug + * report with Sun, asking for amendment of the specification. + */ + private void writeObject(java.io.ObjectOutputStream out) + throws java.io.IOException + { + out.defaultWriteObject(); + + /* Major, minor version number: The Javadoc for J2SE1.4 does not + * specify the values. + */ + out.writeByte(0); + out.writeByte(0); + + if (parameters == null) + out.writeInt(-1); + else + { + out.writeInt(parameters.length); + for (int i = 0; i < parameters.length; i++) + { + if (parameters[i] == null) + out.writeObject(null); + else + out.writeObject(parameters[i].toString()); + } + } + } + + + /** + * Returns the name of the logger where this LogRecord + * has originated. + * + * @return the name of the source {@link Logger}, or + * null if this LogRecord + * does not originate from a Logger. + */ + public String getLoggerName() + { + return loggerName; + } + + + /** + * Sets the name of the logger where this LogRecord + * has originated. + * + *

                As soon as a LogRecord has been handed over + * to the logging framework, applications should not modify it + * anymore. Therefore, this method should only be called on + * freshly constructed LogRecords. + * + * @param name the name of the source logger, or null to + * indicate that this LogRecord does not + * originate from a Logger. + */ + public void setLoggerName(String name) + { + loggerName = name; + } + + + /** + * Returns the resource bundle that is used when the message + * of this LogRecord needs to be localized. + * + * @return the resource bundle used for localization, + * or null if this message does not need + * to be localized. + */ + public ResourceBundle getResourceBundle() + { + return bundle; + } + + + /** + * Sets the resource bundle that is used when the message + * of this LogRecord needs to be localized. + * + *

                As soon as a LogRecord has been handed over + * to the logging framework, applications should not modify it + * anymore. Therefore, this method should only be called on + * freshly constructed LogRecords. + * + * @param bundle the resource bundle to be used, or + * null to indicate that this + * message does not need to be localized. + */ + public void setResourceBundle(ResourceBundle bundle) + { + this.bundle = bundle; + + /* FIXME: Is there a way to infer the name + * of a resource bundle from a ResourceBundle object? + */ + this.resourceBundleName = null; + } + + + /** + * Returns the name of the resource bundle that is used when the + * message of this LogRecord needs to be localized. + * + * @return the name of the resource bundle used for localization, + * or null if this message does not need + * to be localized. + */ + public String getResourceBundleName() + { + return resourceBundleName; + } + + + /** + * Sets the name of the resource bundle that is used when the + * message of this LogRecord needs to be localized. + * + *

                As soon as a LogRecord has been handed over + * to the logging framework, applications should not modify it + * anymore. Therefore, this method should only be called on + * freshly constructed LogRecords. + * + * @param name the name of the resource bundle to be used, or + * null to indicate that this message + * does not need to be localized. + */ + public void setResourceBundleName(String name) + { + resourceBundleName = name; + bundle = null; + + try + { + if (resourceBundleName != null) + bundle = ResourceBundle.getBundle(resourceBundleName); + } + catch (java.util.MissingResourceException _) + { + } + } + + + /** + * Returns the level of the LogRecord. + * + *

                Applications should be aware of the possibility that the + * result is not necessarily one of the standard logging levels, + * since the logging framework allows to create custom subclasses + * of java.util.logging.Level. Therefore, filters + * should perform checks like theRecord.getLevel().intValue() + * == Level.INFO.intValue() instead of theRecord.getLevel() + * == Level.INFO. + */ + public Level getLevel() + { + return level; + } + + + /** + * Sets the severity level of this LogRecord to a new + * value. + * + *

                As soon as a LogRecord has been handed over + * to the logging framework, applications should not modify it + * anymore. Therefore, this method should only be called on + * freshly constructed LogRecords. + * + * @param level the new severity level, for example + * Level.WARNING. + */ + public void setLevel(Level level) + { + this.level = level; + } + + + /** + * The last used sequence number for any LogRecord. + */ + private static long lastSeqNum = 0; + + + /** + * Allocates a sequence number for a new LogRecord. This class + * method is only called by the LogRecord constructor. + */ + private synchronized static long allocateSeqNum() + { + lastSeqNum += 1; + return lastSeqNum; + } + + + /** + * Returns the sequence number of this LogRecord. + */ + public long getSequenceNumber() + { + return sequenceNumber; + } + + + /** + * Sets the sequence number of this LogRecord to a new + * value. + * + *

                As soon as a LogRecord has been handed over + * to the logging framework, applications should not modify it + * anymore. Therefore, this method should only be called on + * freshly constructed LogRecords. + * + * @param seqNum the new sequence number. + */ + public void setSequenceNumber(long seqNum) + { + this.sequenceNumber = seqNum; + } + + + /** + * Returns the name of the class where the event being logged + * has had its origin. This information can be passed as + * parameter to some logging calls, and in certain cases, the + * logging framework tries to determine an approximation + * (which may or may not be accurate). + * + * @return the name of the class that issued the logging request, + * or null if this information could not + * be obtained. + */ + public String getSourceClassName() + { + if (sourceClassName != null) + return sourceClassName; + + /* FIXME: Should infer this information from the call stack. */ + return null; + } + + + /** + * Sets the name of the class where the event being logged + * has had its origin. + * + *

                As soon as a LogRecord has been handed over + * to the logging framework, applications should not modify it + * anymore. Therefore, this method should only be called on + * freshly constructed LogRecords. + * + * @param sourceClassName the name of the class that issued the + * logging request, or null to indicate that + * this information could not be obtained. + */ + public void setSourceClassName(String sourceClassName) + { + this.sourceClassName = sourceClassName; + } + + + /** + * Returns the name of the method where the event being logged + * has had its origin. This information can be passed as + * parameter to some logging calls, and in certain cases, the + * logging framework tries to determine an approximation + * (which may or may not be accurate). + * + * @return the name of the method that issued the logging request, + * or null if this information could not + * be obtained. + */ + public String getSourceMethodName() + { + if (sourceMethodName != null) + return sourceMethodName; + + /* FIXME: Should infer this information from the call stack. */ + return null; + } + + + /** + * Sets the name of the method where the event being logged + * has had its origin. + * + *

                As soon as a LogRecord has been handed over + * to the logging framework, applications should not modify it + * anymore. Therefore, this method should only be called on + * freshly constructed LogRecords. + * + * @param sourceMethodName the name of the method that issued the + * logging request, or null to indicate that + * this information could not be obtained. + */ + public void setSourceMethodName(String sourceMethodName) + { + this.sourceMethodName = sourceMethodName; + } + + + /** + * Returns the message for this LogRecord before + * any localization or parameter substitution. + * + *

                A {@link Logger} will try to localize the message + * if a resource bundle has been associated with this + * LogRecord. In this case, the logger will call + * getMessage() and use the result as the key + * for looking up the localized message in the bundle. + * If no bundle has been associated, or if the result of + * getMessage() is not a valid key in the + * bundle, the logger will use the raw message text as + * returned by this method. + * + * @return the message text, or null if there + * is no message text. + */ + public String getMessage() + { + return message; + } + + + /** + * Sets the message for this LogRecord. + * + *

                A Logger will try to localize the message + * if a resource bundle has been associated with this + * LogRecord. In this case, the logger will call + * getMessage() and use the result as the key + * for looking up the localized message in the bundle. + * If no bundle has been associated, or if the result of + * getMessage() is not a valid key in the + * bundle, the logger will use the raw message text as + * returned by this method. + * + *

                It is possible to set the message to either an empty String or + * null, although this does not make the the message + * very helpful to human users. + * + * @param message the message text (which will be used as key + * for looking up the localized message text + * if a resource bundle has been associated). + */ + public void setMessage(String message) + { + this.message = message; + } + + + /** + * Returns the parameters to the log message. + * + * @return the parameters to the message, or null if + * the message has no parameters. + */ + public Object[] getParameters() + { + return parameters; + } + + + /** + * Sets the parameters to the log message. + * + *

                As soon as a LogRecord has been handed over + * to the logging framework, applications should not modify it + * anymore. Therefore, this method should only be called on + * freshly constructed LogRecords. + * + * @param parameters the parameters to the message, or null + * to indicate that the message has no parameters. + */ + public void setParameters(Object[] parameters) + { + this.parameters = parameters; + } + + + /** + * Returns an identifier for the thread in which this + * LogRecord was created. The identifier is not + * necessarily related to any thread identifiers used by the + * operating system. + * + * @return an identifier for the source thread. + */ + public int getThreadID() + { + return threadID; + } + + + /** + * Sets the identifier indicating in which thread this + * LogRecord was created. The identifier is not + * necessarily related to any thread identifiers used by the + * operating system. + * + *

                As soon as a LogRecord has been handed over + * to the logging framework, applications should not modify it + * anymore. Therefore, this method should only be called on + * freshly constructed LogRecords. + * + * @param threadID the identifier for the source thread. + */ + public void setThreadID(int threadID) + { + this.threadID = threadID; + } + + + /** + * Returns the time when this LogRecord was created. + * + * @return the time of creation in milliseconds since the beginning + * of January 1, 1970. + */ + public long getMillis() + { + return millis; + } + + + /** + * Sets the time when this LogRecord was created. + * + *

                As soon as a LogRecord has been handed over + * to the logging framework, applications should not modify it + * anymore. Therefore, this method should only be called on + * freshly constructed LogRecords. + * + * @param millis the time of creation in milliseconds since the + * beginning of January 1, 1970. + */ + public void setMillis(long millis) + { + this.millis = millis; + } + + + /** + * Returns the Throwable associated with this LogRecord, + * or null if the logged event is not related to an exception + * or error. + */ + public Throwable getThrown() + { + return thrown; + } + + + /** + * Associates this LogRecord with an exception or error. + * + *

                As soon as a LogRecord has been handed over + * to the logging framework, applications should not modify it + * anymore. Therefore, this method should only be called on + * freshly constructed LogRecords. + * + * @param thrown the exception or error to associate with, or + * null if this LogRecord + * should be made unrelated to an exception or error. + */ + public void setThrown(Throwable thrown) + { + this.thrown = thrown; + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/util/logging/MemoryHandler.java gcc-3.4.0/libjava/java/util/logging/MemoryHandler.java *** gcc-3.3.3/libjava/java/util/logging/MemoryHandler.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/util/logging/MemoryHandler.java 2003-06-21 10:31:55.000000000 +0000 *************** *** 0 **** --- 1,356 ---- + /* MemoryHandler.java + -- a class for buffering log messages in a memory buffer + + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. + + */ + + + package java.util.logging; + + /** + * A MemoryHandler maintains a circular buffer of + * log records. + * + *

                Configuration: Values of the subsequent + * LogManager properties are taken into consideration + * when a MemoryHandler is initialized. + * If a property is not defined, or if it has an invalid + * value, a default is taken without an exception being thrown. + * + *

                  + * + *
                • java.util.MemoryHandler.level - specifies + * the initial severity level threshold. Default value: + * Level.ALL.
                • + * + *
                • java.util.MemoryHandler.filter - specifies + * the name of a Filter class. Default value: No Filter.
                • + * + *
                • java.util.MemoryHandler.size - specifies the + * maximum number of log records that are kept in the circular + * buffer. Default value: 1000.
                • + * + *
                • java.util.MemoryHandler.push - specifies the + * pushLevel. Default value: + * Level.SEVERE.
                • + * + *
                • java.util.MemoryHandler.target - specifies the + * name of a subclass of {@link Handler} that will be used as the + * target handler. There is no default value for this property; + * if it is not set, the no-argument MemoryHandler constructor + * will throw an exception.
                • + * + *
                + * + * @author Sascha Brawer (brawer@acm.org) + */ + public class MemoryHandler + extends Handler + { + /** + * The storage area used for buffering the unpushed log records in + * memory. + */ + private final LogRecord[] buffer; + + + /** + * The current position in the circular buffer. For a new + * MemoryHandler, or immediately after {@link #push()} was called, + * the value of this variable is zero. Each call to {@link + * #publish(LogRecord)} will store the published LogRecord into + * buffer[position] before position is incremented by + * one. If position becomes greater than the size of the buffer, it + * is reset to zero. + */ + private int position; + + + /** + * The number of log records which have been published, but not + * pushed yet to the target handler. + */ + private int numPublished; + + + /** + * The push level threshold for this Handler. When a + * record is published whose severity level is greater than or equal + * to the pushLevel of this MemoryHandler, + * the {@link #push()} method will be invoked for pushing the buffer + * contents to the target Handler. + */ + private Level pushLevel; + + + /** + * The Handler to which log records are forwarded for actual + * publication. + */ + private final Handler target; + + + /** + * Constructs a MemoryHandler for keeping a circular + * buffer of LogRecords; the initial configuration is determined by + * the LogManager properties described above. + */ + public MemoryHandler() + { + this((Handler) LogManager.getInstanceProperty( + "java.util.logging.MemoryHandler.target", + Handler.class, /* default */ null), + LogManager.getIntPropertyClamped( + "java.util.logging.MemoryHandler.size", + /* default */ 1000, + /* minimum value */ 1, + /* maximum value */ Integer.MAX_VALUE), + LogManager.getLevelProperty( + "java.util.logging.MemoryHandler.push", + /* default push level */ Level.SEVERE)); + } + + + /** + * Constructs a MemoryHandler for keeping a circular + * buffer of LogRecords, given some parameters. The values of the + * other parameters are taken from LogManager properties, as + * described above. + * + * @param target the target handler that will receive those + * log records that are passed on for publication. + * + * @param size the number of log records that are kept in the buffer. + * The value must be a at least one. + * + * @param pushLevel the push level threshold for this + * MemoryHandler. When a record is published whose + * severity level is greater than or equal to + * pushLevel, the {@link #push()} method will be + * invoked in order to push the bufffer contents to + * target. + * + * @throws java.lang.IllegalArgumentException if size + * is negative or zero. The GNU implementation also throws + * an IllegalArgumentException if target or + * pushLevel are null, but the + * API specification does not prescribe what should happen + * in those cases. + */ + public MemoryHandler(Handler target, int size, Level pushLevel) + { + if ((target == null) || (size <= 0) || (pushLevel == null)) + throw new IllegalArgumentException(); + + buffer = new LogRecord[size]; + this.pushLevel = pushLevel; + this.target = target; + + setLevel(LogManager.getLevelProperty( + "java.util.logging.MemoryHandler.level", + /* default value */ Level.ALL)); + + setFilter((Filter) LogManager.getInstanceProperty( + "java.util.logging.MemoryHandler.filter", + /* must be instance of */ Filter.class, + /* default value */ null)); + } + + + /** + * Stores a LogRecord in a fixed-size circular buffer, + * provided the record passes all tests for being loggable. If the + * buffer is full, the oldest record will be discarded. + * + *

                If the record has a severity level which is greater than or + * equal to the pushLevel of this + * MemoryHandler, the {@link #push()} method will be + * invoked for pushing the buffer contents to the target + * Handler. + * + *

                Most applications do not need to call this method directly. + * Instead, they will use use a {@link Logger}, which will create + * LogRecords and distribute them to registered handlers. + * + * @param record the log event to be published. + */ + public void publish(LogRecord record) + { + if (!isLoggable(record)) + return; + + buffer[position] = record; + position = (position + 1) % buffer.length; + numPublished = numPublished + 1; + + if (record.getLevel().intValue() >= pushLevel.intValue()) + push(); + } + + + /** + * Pushes the contents of the memory buffer to the target + * Handler and clears the buffer. Note that + * the target handler will discard those records that do + * not satisfy its own severity level threshold, or that are + * not considered loggable by an installed {@link Filter}. + * + *

                In case of an I/O failure, the {@link ErrorManager} of the + * target Handler will be notified, but the caller of + * this method will not receive an exception. + */ + public void push() + { + int i; + + if (numPublished < buffer.length) + { + for (i = 0; i < position; i++) + target.publish(buffer[i]); + } + else + { + for (i = position; i < buffer.length; i++) + target.publish(buffer[i]); + for (i = 0; i < position; i++) + target.publish(buffer[i]); + } + + numPublished = 0; + position = 0; + } + + + /** + * Forces any data that may have been buffered by the target + * Handler to the underlying output device, but + * does not push the contents of the circular memory + * buffer to the target handler. + * + *

                In case of an I/O failure, the {@link ErrorManager} of the + * target Handler will be notified, but the caller of + * this method will not receive an exception. + * + * @see #push() + */ + public void flush() + { + target.flush(); + } + + + /** + * Closes this MemoryHandler and its associated target + * handler, discarding the contents of the memory buffer. However, + * any data that may have been buffered by the target + * Handler is forced to the underlying output device. + * + *

                As soon as close has been called, + * a Handler should not be used anymore. Attempts + * to publish log records, to flush buffers, or to modify the + * Handler in any other way may throw runtime + * exceptions after calling close.

                + * + *

                In case of an I/O failure, the ErrorManager of + * the associated target Handler will be informed, but + * the caller of this method will not receive an exception.

                + * + * @throws SecurityException if a security manager exists and + * the caller is not granted the permission to control + * the logging infrastructure. + * + * @see #push() + */ + public void close() + throws SecurityException + { + push(); + + /* This will check for LoggingPermission("control"). If the + * current security context does not grant this permission, + * push() has been executed, but this does not impose a + * security risk. + */ + target.close(); + } + + + + /** + * Returns the push level threshold for this Handler. + * When a record is published whose severity level is greater + * than or equal to the pushLevel of this + * MemoryHandler, the {@link #push()} method will be + * invoked for pushing the buffer contents to the target + * Handler. + * + * @return the push level threshold for automatic pushing. + */ + public Level getPushLevel() + { + return pushLevel; + } + + + /** + * Sets the push level threshold for this Handler. + * When a record is published whose severity level is greater + * than or equal to the pushLevel of this + * MemoryHandler, the {@link #push()} method will be + * invoked for pushing the buffer contents to the target + * Handler. + * + * @param pushLevel the push level threshold for automatic pushing. + * + * @exception SecurityException if a security manager exists and + * the caller is not granted the permission to control + * the logging infrastructure. + * + * @exception NullPointerException if pushLevel is + * null. + */ + public void setPushLevel(Level pushLevel) + { + LogManager.getLogManager().checkAccess(); + + /* Throws a NullPointerException if pushLevel is null. */ + pushLevel.getClass(); + + this.pushLevel = pushLevel; + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/util/logging/SimpleFormatter.java gcc-3.4.0/libjava/java/util/logging/SimpleFormatter.java *** gcc-3.3.3/libjava/java/util/logging/SimpleFormatter.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/util/logging/SimpleFormatter.java 2003-08-31 16:52:16.000000000 +0000 *************** *** 0 **** --- 1,122 ---- + /* SimpleFormatter.java + -- a class for formatting log records into short human-readable messages + + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. + + */ + + + package java.util.logging; + + import java.util.Date; + import java.text.DateFormat; + + /** + * A SimpleFormatter formats log records into + * short human-readable messages, typically one or two lines. + * + * @author Sascha Brawer (brawer@acm.org) + */ + public class SimpleFormatter + extends Formatter + { + /** + * Constructs a SimpleFormatter. + */ + public SimpleFormatter() + { + } + + + /** + * An instance of a DateFormatter that is used for formatting + * the time of a log record into a human-readable string, + * according to the rules of the current locale. The value + * is set after the first invocation of format, since it is + * common that a JVM will instantiate a SimpleFormatter without + * ever using it. + */ + private DateFormat dateFormat; + + /** + * The character sequence that is used to separate lines in the + * generated stream. Somewhat surprisingly, the Sun J2SE 1.4 + * reference implementation always uses UNIX line endings, even on + * platforms that have different line ending conventions (i.e., + * DOS). The GNU implementation does not replicate this bug. + * + * @see Sun bug parade, bug #4462871, + * "java.util.logging.SimpleFormatter uses hard-coded line separator". + */ + static final String lineSep = System.getProperty("line.separator"); + + + /** + * Formats a log record into a String. + * + * @param the log record to be formatted. + * + * @return a short human-readable message, typically one or two + * lines. Lines are separated using the default platform line + * separator. + * + * @throws NullPointerException if record + * is null. + */ + public String format(LogRecord record) + { + StringBuffer buf = new StringBuffer(180); + + if (dateFormat == null) + dateFormat = DateFormat.getDateTimeInstance(); + + buf.append(dateFormat.format(new Date(record.getMillis()))); + buf.append(' '); + buf.append(record.getSourceClassName()); + buf.append(' '); + buf.append(record.getSourceMethodName()); + buf.append(lineSep); + + buf.append(record.getLevel()); + buf.append(": "); + buf.append(formatMessage(record)); + + buf.append(lineSep); + + return buf.toString(); + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/util/logging/SocketHandler.java gcc-3.4.0/libjava/java/util/logging/SocketHandler.java *** gcc-3.3.3/libjava/java/util/logging/SocketHandler.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/util/logging/SocketHandler.java 2003-06-21 10:31:55.000000000 +0000 *************** *** 0 **** --- 1,225 ---- + /* SocketHandler.java + -- a class for publishing log messages to network sockets + + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. + + */ + + + package java.util.logging; + + + /** + * A SocketHandler publishes log records to + * a TCP/IP socket. + * + *

                Configuration: Values of the subsequent + * LogManager properties are taken into consideration + * when a SocketHandler is initialized. + * If a property is not defined, or if it has an invalid + * value, a default is taken without an exception being thrown. + * + *

                  + * + *
                • java.util.SocketHandler.level - specifies + * the initial severity level threshold. Default value: + * Level.ALL.
                • + * + *
                • java.util.SocketHandler.filter - specifies + * the name of a Filter class. Default value: No Filter.
                • + * + *
                • java.util.SocketHandler.formatter - specifies + * the name of a Formatter class. Default value: + * java.util.logging.XMLFormatter.
                • + * + *
                • java.util.SocketHandler.encoding - specifies + * the name of the character encoding. Default value: + * the default platform encoding. + * + *
                • java.util.SocketHandler.host - specifies + * the name of the host to which records are published. + * There is no default value for this property; if it is + * not set, the SocketHandler constructor will throw + * an exception.
                • + * + *
                • java.util.SocketHandler.port - specifies + * the TCP/IP port to which records are published. + * There is no default value for this property; if it is + * not set, the SocketHandler constructor will throw + * an exception.
                • + * + *
                + * + * @author Sascha Brawer (brawer@acm.org) + */ + public class SocketHandler + extends StreamHandler + { + /** + * Constructs a SocketHandler that publishes log + * records to a TCP/IP socket. Tthe initial configuration is + * determined by the LogManager properties described + * above. + * + * @throws java.io.IOException if the connection to the specified + * network host and port cannot be established. + * + * @throws java.lang.IllegalArgumentException if either the + * java.util.logging.SocketHandler.host + * or java.util.logging.SocketHandler.port + * LogManager properties is not defined, or specifies + * an invalid value. + */ + public SocketHandler() + throws java.io.IOException + { + this(LogManager.getLogManager().getProperty("java.util.logging.SocketHandler.host"), + getPortNumber()); + } + + + /** + * Constructs a SocketHandler that publishes log + * records to a TCP/IP socket. With the exception of the internet + * host and port, the initial configuration is determined by the + * LogManager properties described above. + * + * @param host the Internet host to which log records will be + * forwarded. + * + * @param port the port at the host which will accept a request + * for a TCP/IP connection. + * + * @throws java.io.IOException if the connection to the specified + * network host and port cannot be established. + * + * @throws java.lang.IllegalArgumentException if either + * host or port specify + * an invalid value. + */ + public SocketHandler(String host, int port) + throws java.io.IOException + { + super(createSocket(host, port), + "java.util.logging.SocketHandler", + /* default level */ Level.ALL, + /* formatter */ null, + /* default formatter */ XMLFormatter.class); + } + + + /** + * Retrieves the port number from the java.util.logging.SocketHandler.port + * LogManager property. + * + * @throws IllegalArgumentException if the property is not defined or + * does not specify an integer value. + */ + private static int getPortNumber() + { + try { + return Integer.parseInt(LogManager.getLogManager().getProperty("java.util.logging.SocketHandler.port")); + } catch (Exception ex) { + throw new IllegalArgumentException(); + } + } + + + /** + * Creates an OutputStream for publishing log records to an Internet + * host and port. This private method is a helper for use by the + * constructor of SocketHandler. + * + * @param host the Internet host to which log records will be + * forwarded. + * + * @param port the port at the host which will accept a request + * for a TCP/IP connection. + * + * @throws java.io.IOException if the connection to the specified + * network host and port cannot be established. + * + * @throws java.lang.IllegalArgumentException if either + * host or port specify + * an invalid value. + */ + private static java.io.OutputStream createSocket(String host, int port) + throws java.io.IOException, java.lang.IllegalArgumentException + { + java.net.Socket socket; + + if ((host == null) || (port < 1)) + throw new IllegalArgumentException(); + + socket = new java.net.Socket(host, port); + + socket.shutdownInput(); + + /* The architecture of the logging framework provides replaceable + * formatters. Because these formatters perform their task by + * returning one single String for each LogRecord to be formatted, + * there is no need to buffer. + */ + socket.setTcpNoDelay(true); + + return socket.getOutputStream(); + } + + + /** + * Publishes a LogRecord to the network socket, + * provided the record passes all tests for being loggable. + * In addition, all data that may have been buffered will + * be forced to the network stream. + * + *

                Most applications do not need to call this method directly. + * Instead, they will use a {@link Logger} instance, which will + * create LogRecords and distribute them to registered handlers. + * + *

                In case of an I/O failure, the ErrorManager + * of this SocketHandler will be informed, but the caller + * of this method will not receive an exception. + * + * @param record the log event to be published. + */ + public void publish(LogRecord record) + { + super.publish(record); + flush(); + } + } + diff -Nrc3pad gcc-3.3.3/libjava/java/util/logging/StreamHandler.java gcc-3.4.0/libjava/java/util/logging/StreamHandler.java *** gcc-3.3.3/libjava/java/util/logging/StreamHandler.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/util/logging/StreamHandler.java 2003-06-21 10:31:55.000000000 +0000 *************** *** 0 **** --- 1,524 ---- + /* StreamHandler.java + -- a class for publishing log messages to instances of java.io.OutputStream + + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. + + */ + + + package java.util.logging; + + import java.io.OutputStream; + import java.io.OutputStreamWriter; + import java.io.UnsupportedEncodingException; + import java.io.Writer; + + /** + * A StreamHandler publishes LogRecords to + * a instances of java.io.OutputStream. + * + * @author Sascha Brawer (brawer@acm.org) + */ + public class StreamHandler + extends Handler + { + private OutputStream out; + private Writer writer; + + + /** + * Indicates the current state of this StreamHandler. The value + * should be one of STATE_FRESH, STATE_PUBLISHED, or STATE_CLOSED. + */ + private int streamState = STATE_FRESH; + + + /** + * streamState having this value indicates that the StreamHandler + * has been created, but the publish(LogRecord) method has not been + * called yet. If the StreamHandler has been constructed without an + * OutputStream, writer will be null, otherwise it is set to a + * freshly created OutputStreamWriter. + */ + private static final int STATE_FRESH = 0; + + + /** + * streamState having this value indicates that the publish(LocRecord) + * method has been called at least once. + */ + private static final int STATE_PUBLISHED = 1; + + + /** + * streamState having this value indicates that the close() method + * has been called. + */ + private static final int STATE_CLOSED = 2; + + + /** + * Creates a StreamHandler without an output stream. + * Subclasses can later use {@link + * #setOutputStream(java.io.OutputStream)} to associate an output + * stream with this StreamHandler. + */ + public StreamHandler() + { + this(null, null); + } + + + /** + * Creates a StreamHandler that formats log messages + * with the specified Formatter and publishes them to the specified + * output stream. + * + * @param out the output stream to which the formatted log messages + * are published. + * + * @param formatter the Formatter that will be used + * to format log messages. + */ + public StreamHandler(OutputStream out, Formatter formatter) + { + this(out, "java.util.logging.StreamHandler", Level.INFO, + formatter, SimpleFormatter.class); + } + + + StreamHandler( + OutputStream out, + String propertyPrefix, + Level defaultLevel, + Formatter formatter, Class defaultFormatterClass) + { + this.level = LogManager.getLevelProperty(propertyPrefix + ".level", + defaultLevel); + + this.filter = (Filter) LogManager.getInstanceProperty( + propertyPrefix + ".filter", + /* must be instance of */ Filter.class, + /* default: new instance of */ null); + + if (formatter != null) + this.formatter = formatter; + else + this.formatter = (Formatter) LogManager.getInstanceProperty( + propertyPrefix + ".formatter", + /* must be instance of */ Formatter.class, + /* default: new instance of */ defaultFormatterClass); + + try + { + String enc = LogManager.getLogManager().getProperty(propertyPrefix + + ".encoding"); + + /* make sure enc actually is a valid encoding */ + if ((enc != null) && (enc.length() > 0)) + new String(new byte[0], enc); + + this.encoding = enc; + } + catch (Exception _) + { + } + + if (out != null) + { + try + { + changeWriter(out, getEncoding()); + } + catch (UnsupportedEncodingException uex) + { + /* This should never happen, since the validity of the encoding + * name has been checked above. + */ + throw new RuntimeException(uex.getMessage()); + } + } + } + + + private void checkOpen() + { + if (streamState == STATE_CLOSED) + throw new IllegalStateException(this.toString() + " has been closed"); + } + + private void checkFresh() + { + checkOpen(); + if (streamState != STATE_FRESH) + throw new IllegalStateException("some log records have been published to " + this); + } + + + private void changeWriter(OutputStream out, String encoding) + throws UnsupportedEncodingException + { + OutputStreamWriter writer; + + /* The logging API says that a null encoding means the default + * platform encoding. However, java.io.OutputStreamWriter needs + * another constructor for the default platform encoding, + * passing null would throw an exception. + */ + if (encoding == null) + writer = new OutputStreamWriter(out); + else + writer = new OutputStreamWriter(out, encoding); + + /* Closing the stream has side effects -- do this only after + * creating a new writer has been successful. + */ + if ((streamState != STATE_FRESH) || (this.writer != null)) + close(); + + this.writer = writer; + this.out = out; + this.encoding = encoding; + streamState = STATE_FRESH; + } + + + /** + * Sets the character encoding which this handler uses for publishing + * log records. The encoding of a StreamHandler must be + * set before any log records have been published. + * + * @param encoding the name of a character encoding, or null + * for the default encoding. + * + * @throws SecurityException if a security manager exists and + * the caller is not granted the permission to control the + * the logging infrastructure. + * + * @exception IllegalStateException if any log records have been + * published to this StreamHandler before. Please + * be aware that this is a pecularity of the GNU implementation. + * While the API specification indicates that it is an error + * if the encoding is set after records have been published, + * it does not mandate any specific behavior for that case. + */ + public void setEncoding(String encoding) + throws SecurityException, UnsupportedEncodingException + { + /* The inherited implementation first checks whether the invoking + * code indeed has the permission to control the logging infra- + * structure, and throws a SecurityException if this was not the + * case. + * + * Next, it verifies that the encoding is supported and throws + * an UnsupportedEncodingExcpetion otherwise. Finally, it remembers + * the name of the encoding. + */ + super.setEncoding(encoding); + + checkFresh(); + + /* If out is null, setEncoding is being called before an output + * stream has been set. In that case, we need to check that the + * encoding is valid, and remember it if this is the case. Since + * this is exactly what the inherited implementation of + * Handler.setEncoding does, we can delegate. + */ + if (out != null) + { + /* The logging API says that a null encoding means the default + * platform encoding. However, java.io.OutputStreamWriter needs + * another constructor for the default platform encoding, passing + * null would throw an exception. + */ + if (encoding == null) + writer = new OutputStreamWriter(out); + else + writer = new OutputStreamWriter(out, encoding); + } + } + + + /** + * Changes the output stream to which this handler publishes + * logging records. + * + * @throws SecurityException if a security manager exists and + * the caller is not granted the permission to control + * the logging infrastructure. + * + * @throws NullPointerException if out + * is null. + */ + protected void setOutputStream(OutputStream out) + throws SecurityException + { + LogManager.getLogManager().checkAccess(); + + /* Throw a NullPointerException if out is null. */ + out.getClass(); + + try + { + changeWriter(out, getEncoding()); + } + catch (UnsupportedEncodingException ex) + { + /* This seems quite unlikely to happen, unless the underlying + * implementation of java.io.OutputStreamWriter changes its + * mind (at runtime) about the set of supported character + * encodings. + */ + throw new RuntimeException(ex.getMessage()); + } + } + + + /** + * Publishes a LogRecord to the associated output + * stream, provided the record passes all tests for being loggable. + * The StreamHandler will localize the message of the + * log record and substitute any message parameters. + * + *

                Most applications do not need to call this method directly. + * Instead, they will use use a {@link Logger}, which will create + * LogRecords and distribute them to registered handlers. + * + *

                In case of an I/O failure, the ErrorManager + * of this Handler will be informed, but the caller + * of this method will not receive an exception. + * + *

                If a log record is being published to a + * StreamHandler that has been closed earlier, the Sun + * J2SE 1.4 reference can be observed to silently ignore the + * call. The GNU implementation, however, intentionally behaves + * differently by informing the ErrorManager associated + * with this StreamHandler. Since the condition + * indicates a programming error, the programmer should be + * informed. It also seems extremely unlikely that any application + * would depend on the exact behavior in this rather obscure, + * erroneous case -- especially since the API specification does not + * prescribe what is supposed to happen. + * + * @param record the log event to be published. + */ + public void publish(LogRecord record) + { + String formattedMessage; + + if (!isLoggable(record)) + return; + + if (streamState == STATE_FRESH) + { + try + { + writer.write(formatter.getHead(this)); + } + catch (java.io.IOException ex) + { + reportError(null, ex, ErrorManager.WRITE_FAILURE); + return; + } + catch (Exception ex) + { + reportError(null, ex, ErrorManager.GENERIC_FAILURE); + return; + } + + streamState = STATE_PUBLISHED; + } + + try + { + formattedMessage = formatter.format(record); + } + catch (Exception ex) + { + reportError(null, ex, ErrorManager.FORMAT_FAILURE); + return; + } + + try + { + writer.write(formattedMessage); + } + catch (Exception ex) + { + reportError(null, ex, ErrorManager.WRITE_FAILURE); + } + } + + + /** + * Checks whether or not a LogRecord would be logged + * if it was passed to this StreamHandler for publication. + * + *

                The StreamHandler implementation first checks + * whether a writer is present and the handler's level is greater + * than or equal to the severity level threshold. In a second step, + * if a {@link Filter} has been installed, its {@link + * Filter#isLoggable(LogRecord) isLoggable} method is + * invoked. Subclasses of StreamHandler can override + * this method to impose their own constraints. + * + * @param record the LogRecord to be checked. + * + * @return true if record would + * be published by {@link #publish(LogRecord) publish}, + * false if it would be discarded. + * + * @see #setLevel(Level) + * @see #setFilter(Filter) + * @see Filter#isLoggable(LogRecord) + * + * @throws NullPointerException if record is + * null. */ + public boolean isLoggable(LogRecord record) + { + return (writer != null) && super.isLoggable(record); + } + + + /** + * Forces any data that may have been buffered to the underlying + * output device. + * + *

                In case of an I/O failure, the ErrorManager + * of this Handler will be informed, but the caller + * of this method will not receive an exception. + * + *

                If a StreamHandler that has been closed earlier + * is closed a second time, the Sun J2SE 1.4 reference can be + * observed to silently ignore the call. The GNU implementation, + * however, intentionally behaves differently by informing the + * ErrorManager associated with this + * StreamHandler. Since the condition indicates a + * programming error, the programmer should be informed. It also + * seems extremely unlikely that any application would depend on the + * exact behavior in this rather obscure, erroneous case -- + * especially since the API specification does not prescribe what is + * supposed to happen. + */ + public void flush() + { + try + { + checkOpen(); + if (writer != null) + writer.flush(); + } + catch (Exception ex) + { + reportError(null, ex, ErrorManager.FLUSH_FAILURE); + } + } + + + /** + * Closes this StreamHandler after having forced any + * data that may have been buffered to the underlying output + * device. + * + *

                As soon as close has been called, + * a Handler should not be used anymore. Attempts + * to publish log records, to flush buffers, or to modify the + * Handler in any other way may throw runtime + * exceptions after calling close.

                + * + *

                In case of an I/O failure, the ErrorManager + * of this Handler will be informed, but the caller + * of this method will not receive an exception.

                + * + *

                If a StreamHandler that has been closed earlier + * is closed a second time, the Sun J2SE 1.4 reference can be + * observed to silently ignore the call. The GNU implementation, + * however, intentionally behaves differently by informing the + * ErrorManager associated with this + * StreamHandler. Since the condition indicates a + * programming error, the programmer should be informed. It also + * seems extremely unlikely that any application would depend on the + * exact behavior in this rather obscure, erroneous case -- + * especially since the API specification does not prescribe what is + * supposed to happen. + * + * @throws SecurityException if a security manager exists and + * the caller is not granted the permission to control + * the logging infrastructure. + */ + public void close() + throws SecurityException + { + LogManager.getLogManager().checkAccess(); + + try + { + /* Although flush also calls checkOpen, it catches + * any exceptions and reports them to the ErrorManager + * as flush failures. However, we want to report + * a closed stream as a close failure, not as a + * flush failure here. Therefore, we call checkOpen() + * before flush(). + */ + checkOpen(); + flush(); + + if (writer != null) + { + if (formatter != null) + { + /* Even if the StreamHandler has never published a record, + * it emits head and tail upon closing. An earlier version + * of the GNU Classpath implementation did not emitted + * anything. However, this had caused XML log files to be + * entirely empty instead of containing no log records. + */ + if (streamState == STATE_FRESH) + writer.write(formatter.getHead(this)); + if (streamState != STATE_CLOSED) + writer.write(formatter.getTail(this)); + } + streamState = STATE_CLOSED; + writer.close(); + } + } + catch (Exception ex) + { + reportError(null, ex, ErrorManager.CLOSE_FAILURE); + } + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/util/logging/XMLFormatter.java gcc-3.4.0/libjava/java/util/logging/XMLFormatter.java *** gcc-3.3.3/libjava/java/util/logging/XMLFormatter.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/util/logging/XMLFormatter.java 2004-01-09 08:58:59.000000000 +0000 *************** *** 0 **** --- 1,395 ---- + /* XMLFormatter.java + -- a class for formatting log messages into a standard XML format + + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. + + */ + + + package java.util.logging; + + import java.util.Date; + import java.util.ResourceBundle; + import java.text.MessageFormat; + import java.text.SimpleDateFormat; + + /** + * An XMLFormatter formats LogRecords into + * a standard XML format. + * + * @author Sascha Brawer (brawer@acm.org) + */ + public class XMLFormatter + extends Formatter + { + /** + * Constructs a new XMLFormatter. + */ + public XMLFormatter() + { + } + + + /** + * The character sequence that is used to separate lines in the + * generated XML stream. Somewhat surprisingly, the Sun J2SE 1.4 + * reference implementation always uses UNIX line endings, even on + * platforms that have different line ending conventions (i.e., + * DOS). The GNU Classpath implementation does not replicates this + * bug. + * + * See also the Sun bug parade, bug #4462871, + * "java.util.logging.SimpleFormatter uses hard-coded line separator". + */ + private static final String lineSep = SimpleFormatter.lineSep; + + + /** + * A DateFormat for emitting time in the ISO 8601 format. + * Since the API specification of SimpleDateFormat does not talk + * about its thread-safety, we cannot share a singleton instance. + */ + private final SimpleDateFormat iso8601 + = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); + + + /** + * Appends a line consisting of indentation, opening element tag, + * element content, closing element tag and line separator to + * a StringBuffer, provided that the element content is + * actually existing. + * + * @param buf the StringBuffer to which the line will be appended. + * + * @param indent the indentation level. + * + * @param tag the element tag name, for instance method. + * + * @param content the element content, or null to + * have no output whatsoever appended to buf. + */ + private static final void appendTag(StringBuffer buf, + int indent, + String tag, + String content) + { + int i; + + if (content == null) + return; + + for (i = 0; i < indent * 2; i++) + buf.append(' '); + + buf.append("<"); + buf.append(tag); + buf.append('>'); + + /* Append the content, but escape for XML by replacing + * '&', '<', '>' and all non-ASCII characters with + * appropriate escape sequences. + * The Sun J2SE 1.4 reference implementation does not + * escape non-ASCII characters. This is a bug in their + * implementation which has been reported in the Java + * bug parade as bug number (FIXME: Insert number here). + */ + for (i = 0; i < content.length(); i++) + { + char c = content.charAt(i); + switch (c) + { + case '&': + buf.append("&"); + break; + + case '<': + buf.append("<"); + break; + + case '>': + buf.append(">"); + break; + + default: + if (((c >= 0x20) && (c <= 0x7e)) + || (c == /* line feed */ 10) + || (c == /* carriage return */ 13)) + buf.append(c); + else + { + buf.append("&#"); + buf.append((int) c); + buf.append(';'); + } + break; + } /* switch (c) */ + } /* for i */ + + buf.append(""); + buf.append(lineSep); + } + + + /** + * Appends a line consisting of indentation, opening element tag, + * numeric element content, closing element tag and line separator + * to a StringBuffer. + * + * @param buf the StringBuffer to which the line will be appended. + * + * @param indent the indentation level. + * + * @param tag the element tag name, for instance method. + * + * @param content the element content. + */ + private static final void appendTag(StringBuffer buf, + int indent, + String tag, + long content) + { + appendTag(buf, indent, tag, Long.toString(content)); + } + + + public String format(LogRecord record) + { + StringBuffer buf = new StringBuffer(400); + Level level = record.getLevel(); + long millis = record.getMillis(); + Object[] params = record.getParameters(); + ResourceBundle bundle = record.getResourceBundle(); + String message; + + buf.append(""); + buf.append(lineSep); + + + appendTag(buf, 1, "date", iso8601.format(new Date(millis))); + appendTag(buf, 1, "millis", record.getMillis()); + appendTag(buf, 1, "sequence", record.getSequenceNumber()); + appendTag(buf, 1, "logger", record.getLoggerName()); + + if (level.isStandardLevel()) + appendTag(buf, 1, "level", level.toString()); + else + appendTag(buf, 1, "level", level.intValue()); + + appendTag(buf, 1, "class", record.getSourceClassName()); + appendTag(buf, 1, "method", record.getSourceMethodName()); + appendTag(buf, 1, "thread", record.getThreadID()); + + /* The Sun J2SE 1.4 reference implementation does not emit the + * message in localized form. This is in violation of the API + * specification. The GNU Classpath implementation intentionally + * replicates the buggy behavior of the Sun implementation, as + * different log files might be a big nuisance to users. + */ + try + { + record.setResourceBundle(null); + message = formatMessage(record); + } + finally + { + record.setResourceBundle(bundle); + } + appendTag(buf, 1, "message", message); + + /* The Sun J2SE 1.4 reference implementation does not + * emit key, catalog and param tags. This is in violation + * of the API specification. The Classpath implementation + * intentionally replicates the buggy behavior of the + * Sun implementation, as different log files might be + * a big nuisance to users. + * + * FIXME: File a bug report with Sun. Insert bug number here. + * + * + * key = record.getMessage(); + * if (key == null) + * key = ""; + * + * if ((bundle != null) && !key.equals(message)) + * { + * appendTag(buf, 1, "key", key); + * appendTag(buf, 1, "catalog", record.getResourceBundleName()); + * } + * + * if (params != null) + * { + * for (int i = 0; i < params.length; i++) + * appendTag(buf, 1, "param", params[i].toString()); + * } + */ + + /* FIXME: We have no way to obtain the stacktrace before free JVMs + * support the corresponding method in java.lang.Throwable. Well, + * it would be possible to parse the output of printStackTrace, + * but this would be pretty kludgy. Instead, we postpose the + * implementation until Throwable has made progress. + */ + Throwable thrown = record.getThrown(); + if (thrown != null) + { + buf.append(" "); + buf.append(lineSep); + + /* The API specification is not clear about what exactly + * goes into the XML record for a thrown exception: It + * could be the result of getMessage(), getLocalizedMessage(), + * or toString(). Therefore, it was necessary to write a + * Mauve testlet and run it with the Sun J2SE 1.4 reference + * implementation. It turned out that the we need to call + * toString(). + * + * FIXME: File a bug report with Sun, asking for clearer + * specs. + */ + appendTag(buf, 2, "message", thrown.toString()); + + /* FIXME: The Logging DTD specifies: + * + * + * + * However, java.lang.Throwable.getStackTrace() is + * allowed to return an empty array. So, what frame should + * be emitted for an empty stack trace? We probably + * should file a bug report with Sun, asking for the DTD + * to be changed. + */ + + buf.append(" "); + buf.append(lineSep); + } + + + buf.append(""); + buf.append(lineSep); + + return buf.toString(); + } + + + /** + * Returns a string that handlers are supposed to emit before + * the first log record. The base implementation returns an + * empty string, but subclasses such as {@link XMLFormatter} + * override this method in order to provide a suitable header. + * + * @return a string for the header. + * + * @param handler the handler which will prepend the returned + * string in front of the first log record. This method + * will inspect certain properties of the handler, for + * example its encoding, in order to construct the header. + */ + public String getHead(Handler h) + { + StringBuffer buf; + String encoding; + + buf = new StringBuffer(80); + buf.append(" 2) && encoding.startsWith("Cp")) + encoding = "windows-" + encoding.substring(2); + + buf.append(encoding); + + buf.append("\" standalone=\"no\"?>"); + buf.append(lineSep); + + /* SYSTEM is not a fully qualified URL so that validating + * XML parsers do not need to connect to the Internet in + * order to read in a log file. See also the Sun Bug Parade, + * bug #4372790, "Logging APIs: need to use relative URL for XML + * doctype". + */ + buf.append(""); + buf.append(lineSep); + buf.append(""); + buf.append(lineSep); + + return buf.toString(); + } + + + public String getTail(Handler h) + { + return "" + lineSep; + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/util/Map.java gcc-3.4.0/libjava/java/util/Map.java *** gcc-3.3.3/libjava/java/util/Map.java 2002-06-18 15:39:56.000000000 +0000 --- gcc-3.4.0/libjava/java/util/Map.java 2003-10-11 18:52:30.000000000 +0000 *************** public interface Map *** 85,91 **** * * @throws UnsupportedOperationException if clear is not supported */ ! public void clear(); /** * Returns true if this contains a mapping for the given key. --- 85,91 ---- * * @throws UnsupportedOperationException if clear is not supported */ ! void clear(); /** * Returns true if this contains a mapping for the given key. *************** public interface Map *** 96,102 **** * @throws NullPointerException if key is null but the map * does not permit null keys */ ! public boolean containsKey(Object key); /** * Returns true if this contains at least one mapping with the given value. --- 96,102 ---- * @throws NullPointerException if key is null but the map * does not permit null keys */ ! boolean containsKey(Object key); /** * Returns true if this contains at least one mapping with the given value. *************** public interface Map *** 107,113 **** * @param value the value to search for * @return true if the map contains the value */ ! public boolean containsValue(Object value); /** * Returns a set view of the mappings in this Map. Each element in the --- 107,113 ---- * @param value the value to search for * @return true if the map contains the value */ ! boolean containsValue(Object value); /** * Returns a set view of the mappings in this Map. Each element in the *************** public interface Map *** 123,129 **** * @return the set view of all mapping entries * @see Map.Entry */ ! public Set entrySet(); /** * Compares the specified object with this map for equality. Returns --- 123,129 ---- * @return the set view of all mapping entries * @see Map.Entry */ ! Set entrySet(); /** * Compares the specified object with this map for equality. Returns *************** public interface Map *** 136,142 **** * @return true if the object equals this map * @see Set#equals(Object) */ ! public boolean equals(Object o); /** * Returns the value mapped by the given key. Returns null if --- 136,142 ---- * @return true if the object equals this map * @see Set#equals(Object) */ ! boolean equals(Object o); /** * Returns the value mapped by the given key. Returns null if *************** public interface Map *** 149,155 **** * @throws NullPointerException if this map does not accept null keys * @see #containsKey(Object) */ ! public Object get(Object key); /** * Associates the given key to the given value (optional operation). If the --- 149,155 ---- * @throws NullPointerException if this map does not accept null keys * @see #containsKey(Object) */ ! Object get(Object key); /** * Associates the given key to the given value (optional operation). If the *************** public interface Map *** 167,173 **** * @throws NullPointerException if the map forbids null keys or values * @see #containsKey(Object) */ ! public Object put(Object key, Object value); /** * Returns the hash code for this map. This is the sum of all hashcodes --- 167,173 ---- * @throws NullPointerException if the map forbids null keys or values * @see #containsKey(Object) */ ! Object put(Object key, Object value); /** * Returns the hash code for this map. This is the sum of all hashcodes *************** public interface Map *** 178,191 **** * @return the hash code * @see Map.Entry#hashCode() */ ! public int hashCode(); /** * Returns true if the map contains no mappings. * * @return true if the map is empty */ ! public boolean isEmpty(); /** * Returns a set view of the keys in this Map. The set is backed by the --- 178,191 ---- * @return the hash code * @see Map.Entry#hashCode() */ ! int hashCode(); /** * Returns true if the map contains no mappings. * * @return true if the map is empty */ ! boolean isEmpty(); /** * Returns a set view of the keys in this Map. The set is backed by the *************** public interface Map *** 199,205 **** * * @return the set view of all keys */ ! public Set keySet(); /** * Copies all entries of the given map to this one (optional operation). If --- 199,205 ---- * * @return the set view of all keys */ ! Set keySet(); /** * Copies all entries of the given map to this one (optional operation). If *************** public interface Map *** 214,220 **** * if m is null. * @see #put(Object, Object) */ ! public void putAll(Map m); /** * Removes the mapping for this key if present (optional operation). If --- 214,220 ---- * if m is null. * @see #put(Object, Object) */ ! void putAll(Map m); /** * Removes the mapping for this key if present (optional operation). If *************** public interface Map *** 225,231 **** * @return the value the key mapped to, or null if not present * @throws UnsupportedOperationException if deletion is unsupported */ ! public Object remove(Object o); /** * Returns the number of key-value mappings in the map. If there are more --- 225,231 ---- * @return the value the key mapped to, or null if not present * @throws UnsupportedOperationException if deletion is unsupported */ ! Object remove(Object o); /** * Returns the number of key-value mappings in the map. If there are more *************** public interface Map *** 233,239 **** * * @return the number of mappings */ ! public int size(); /** * Returns a collection (or bag) view of the values in this Map. The --- 233,239 ---- * * @return the number of mappings */ ! int size(); /** * Returns a collection (or bag) view of the values in this Map. The *************** public interface Map *** 248,254 **** * * @return the collection view of all values */ ! public Collection values(); /** * A map entry (key-value pair). The Map.entrySet() method returns a set --- 248,254 ---- * * @return the collection view of all values */ ! Collection values(); /** * A map entry (key-value pair). The Map.entrySet() method returns a set *************** public interface Map *** 264,277 **** * @since 1.2 * @status updated to 1.4 */ ! public static interface Entry { /** * Get the key corresponding to this entry. * * @return the key */ ! public Object getKey(); /** * Get the value corresponding to this entry. If you already called --- 264,277 ---- * @since 1.2 * @status updated to 1.4 */ ! static interface Entry { /** * Get the key corresponding to this entry. * * @return the key */ ! Object getKey(); /** * Get the value corresponding to this entry. If you already called *************** public interface Map *** 279,285 **** * * @return the value */ ! public Object getValue(); /** * Replaces the value with the specified object (optional operation). --- 279,285 ---- * * @return the value */ ! Object getValue(); /** * Replaces the value with the specified object (optional operation). *************** public interface Map *** 294,300 **** * prevents it from existing in this map * @throws NullPointerException if the map forbids null values */ ! public Object setValue(Object value); /** --- 294,300 ---- * prevents it from existing in this map * @throws NullPointerException if the map forbids null values */ ! Object setValue(Object value); /** *************** public interface Map *** 307,313 **** * * @return the hash code */ ! public int hashCode(); /** * Compares the specified object with this entry. Returns true only if --- 307,313 ---- * * @return the hash code */ ! int hashCode(); /** * Compares the specified object with this entry. Returns true only if *************** public interface Map *** 324,329 **** * * @return true if it is equal */ ! public boolean equals(Object o); } } --- 324,329 ---- * * @return true if it is equal */ ! boolean equals(Object o); } } diff -Nrc3pad gcc-3.3.3/libjava/java/util/Observer.java gcc-3.4.0/libjava/java/util/Observer.java *** gcc-3.3.3/libjava/java/util/Observer.java 2002-06-16 21:15:42.000000000 +0000 --- gcc-3.4.0/libjava/java/util/Observer.java 2003-10-11 18:52:30.000000000 +0000 *************** public interface Observer *** 56,60 **** * @param observable the Observable object that changed * @param arg arbitrary information, usually relating to the change */ ! public void update(Observable observable, Object arg); } --- 56,60 ---- * @param observable the Observable object that changed * @param arg arbitrary information, usually relating to the change */ ! void update(Observable observable, Object arg); } diff -Nrc3pad gcc-3.3.3/libjava/java/util/prefs/AbstractPreferences.java gcc-3.4.0/libjava/java/util/prefs/AbstractPreferences.java *** gcc-3.3.3/libjava/java/util/prefs/AbstractPreferences.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/util/prefs/AbstractPreferences.java 2003-12-18 16:48:33.000000000 +0000 *************** *** 0 **** --- 1,1269 ---- + /* AbstractPreferences - Partial implementation of a Preference node + Copyright (C) 2001, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.util.prefs; + + import java.io.ByteArrayOutputStream; + import java.io.IOException; + import java.io.OutputStream; + import java.util.Iterator; + import java.util.HashMap; + import java.util.TreeSet; + import gnu.java.util.prefs.NodeWriter; + + /** + * Partial implementation of a Preference node. + * + * @since 1.4 + * @author Mark Wielaard (mark@klomp.org) + */ + public abstract class AbstractPreferences extends Preferences { + + // protected fields + + /** + * Object used to lock this preference node. Any thread only locks nodes + * downwards when it has the lock on the current node. No method should + * synchronize on the lock of any of its parent nodes while holding the + * lock on the current node. + */ + protected final Object lock = new Object(); + + /** + * Set to true in the contructor if the node did not exist in the backing + * store when this preference node object was created. Should be set in + * the contructor of a subclass. Defaults to false. Used to fire node + * changed events. + */ + protected boolean newNode = false; + + // private fields + + /** + * The parent preferences node or null when this is the root node. + */ + private final AbstractPreferences parent; + + /** + * The name of this node. + * Only when this is a root node (parent == null) the name is empty. + * It has a maximum of 80 characters and cannot contain any '/' characters. + */ + private final String name; + + /** True when this node has been remove, false otherwise. */ + private boolean removed = false; + + /** + * Holds all the child names and nodes of this node that have been + * accessed by earlier getChild() or childSpi() + * invocations and that have not been removed. + */ + private HashMap childCache = new HashMap(); + + // constructor + + /** + * Creates a new AbstractPreferences node with the given parent and name. + * + * @param parent the parent of this node or null when this is the root node + * @param name the name of this node, can not be null, only 80 characters + * maximum, must be empty when parent is null and cannot + * contain any '/' characters + * @exception IllegalArgumentException when name is null, greater then 80 + * characters, not the empty string but parent is null or + * contains a '/' character + */ + protected AbstractPreferences(AbstractPreferences parent, String name) { + if ( (name == null) // name should be given + || (name.length() > MAX_NAME_LENGTH) // 80 characters max + || (parent == null && name.length() != 0) // root has no name + || (parent != null && name.length() == 0) // all other nodes do + || (name.indexOf('/') != -1)) // must not contain '/' + throw new IllegalArgumentException("Illegal name argument '" + + name + + "' (parent is " + + parent == null ? "" : "not " + + "null)"); + this.parent = parent; + this.name = name; + } + + // identification methods + + /** + * Returns the absolute path name of this preference node. + * The absolute path name of a node is the path name of its parent node + * plus a '/' plus its own name. If the node is the root node and has no + * parent then its path name is "" and its absolute path name is "/". + */ + public String absolutePath() { + if (parent == null) + return "/"; + else + return parent.path() + '/' + name; + } + + /** + * Private helper method for absolutePath. Returns the empty string for a + * root node and otherwise the parentPath of its parent plus a '/'. + */ + private String path() { + if (parent == null) + return ""; + else + return parent.path() + '/' + name; + } + + /** + * Returns true if this node comes from the user preferences tree, false + * if it comes from the system preferences tree. + */ + public boolean isUserNode() { + AbstractPreferences root = this; + while (root.parent != null) + root = root.parent; + return root == Preferences.userRoot(); + } + + /** + * Returns the name of this preferences node. The name of the node cannot + * be null, can be mostly 80 characters and cannot contain any '/' + * characters. The root node has as name "". + */ + public String name() { + return name; + } + + /** + * Returns the String given by + * + * (isUserNode() ? "User":"System") + " Preference Node: " + absolutePath() + * + */ + public String toString() { + return (isUserNode() ? "User":"System") + + " Preference Node: " + + absolutePath(); + } + + /** + * Returns all known unremoved children of this node. + * + * @return All known unremoved children of this node + */ + protected final AbstractPreferences[] cachedChildren() + { + return (AbstractPreferences[]) childCache.values().toArray(); + } + + /** + * Returns all the direct sub nodes of this preferences node. + * Needs access to the backing store to give a meaningfull answer. + *

                + * This implementation locks this node, checks if the node has not yet + * been removed and throws an IllegalStateException when it + * has been. Then it creates a new TreeSet and adds any + * already cached child nodes names. To get any uncached names it calls + * childrenNamesSpi() and adds the result to the set. Finally + * it calls toArray() on the created set. When the call to + * childrenNamesSpi thows an BackingStoreException + * this method will not catch that exception but propagate the exception + * to the caller. + * + * @exception BackingStoreException when the backing store cannot be + * reached + * @exception IllegalStateException when this node has been removed + */ + public String[] childrenNames() throws BackingStoreException { + synchronized(lock) { + if (isRemoved()) + throw new IllegalStateException("Node removed"); + + TreeSet childrenNames = new TreeSet(); + + // First get all cached node names + childrenNames.addAll(childCache.keySet()); + + // Then add any others + String names[] = childrenNamesSpi(); + for (int i = 0; i < names.length; i++) { + childrenNames.add(names[i]); + } + + // And return the array of names + String[] children = new String[childrenNames.size()]; + childrenNames.toArray(children); + return children; + + } + } + + /** + * Returns a sub node of this preferences node if the given path is + * relative (does not start with a '/') or a sub node of the root + * if the path is absolute (does start with a '/'). + *

                + * This method first locks this node and checks if the node has not been + * removed, if it has been removed it throws an exception. Then if the + * path is relative (does not start with a '/') it checks if the path is + * legal (does not end with a '/' and has no consecutive '/' characters). + * Then it recursively gets a name from the path, gets the child node + * from the child-cache of this node or calls the childSpi() + * method to create a new child sub node. This is done recursively on the + * newly created sub node with the rest of the path till the path is empty. + * If the path is absolute (starts with a '/') the lock on this node is + * droped and this method is called on the root of the preferences tree + * with as argument the complete path minus the first '/'. + * + * @exception IllegalStateException if this node has been removed + * @exception IllegalArgumentException if the path contains two or more + * consecutive '/' characters, ends with a '/' charactor and is not the + * string "/" (indicating the root node) or any name on the path is more + * then 80 characters long + */ + public Preferences node(String path) { + synchronized(lock) { + if (isRemoved()) + throw new IllegalStateException("Node removed"); + + // Is it a relative path? + if (!path.startsWith("/")) { + + // Check if it is a valid path + if (path.indexOf("//") != -1 || path.endsWith("/")) + throw new IllegalArgumentException(path); + + return getNode(path); + } + } + + // path started with a '/' so it is absolute + // we drop the lock and start from the root (omitting the first '/') + Preferences root = isUserNode() ? userRoot() : systemRoot(); + return root.node(path.substring(1)); + + } + + /** + * Private helper method for node(). Called with this node + * locked. Returns this node when path is the empty string, if it is not + * empty the next node name is taken from the path (all chars till the + * next '/' or end of path string) and the node is either taken from the + * child-cache of this node or the childSpi() method is called + * on this node with the name as argument. Then this method is called + * recursively on the just constructed child node with the rest of the + * path. + * + * @param path should not end with a '/' character and should not contain + * consecutive '/' characters + * @exception IllegalArgumentException if path begins with a name that is + * larger then 80 characters. + */ + private Preferences getNode(String path) { + // if mark is dom then goto end + + // Empty String "" indicates this node + if (path.length() == 0) + return this; + + // Calculate child name and rest of path + String childName; + String childPath; + int nextSlash = path.indexOf('/'); + if (nextSlash == -1) { + childName = path; + childPath = ""; + } else { + childName = path.substring(0, nextSlash); + childPath = path.substring(nextSlash+1); + } + + // Get the child node + AbstractPreferences child; + child = (AbstractPreferences)childCache.get(childName); + if (child == null) { + + if (childName.length() > MAX_NAME_LENGTH) + throw new IllegalArgumentException(childName); + + // Not in childCache yet so create a new sub node + child = childSpi(childName); + // XXX - check if node is new + childCache.put(childName, child); + } + + // Lock the child and go down + synchronized(child.lock) { + return child.getNode(childPath); + } + } + + /** + * Returns true if the node that the path points to exists in memory or + * in the backing store. Otherwise it returns false or an exception is + * thrown. When this node is removed the only valid parameter is the + * empty string (indicating this node), the return value in that case + * will be false. + * + * @exception BackingStoreException when the backing store cannot be + * reached + * @exception IllegalStateException if this node has been removed + * and the path is not the empty string (indicating this node) + * @exception IllegalArgumentException if the path contains two or more + * consecutive '/' characters, ends with a '/' charactor and is not the + * string "/" (indicating the root node) or any name on the path is more + * then 80 characters long + */ + public boolean nodeExists(String path) throws BackingStoreException { + synchronized(lock) { + if (isRemoved() && path.length() != 0) + throw new IllegalStateException("Node removed"); + + // Is it a relative path? + if (!path.startsWith("/")) { + + // Check if it is a valid path + if (path.indexOf("//") != -1 || path.endsWith("/")) + throw new IllegalArgumentException(path); + + return existsNode(path); + } + } + + // path started with a '/' so it is absolute + // we drop the lock and start from the root (omitting the first '/') + Preferences root = isUserNode() ? userRoot() : systemRoot(); + return root.nodeExists(path.substring(1)); + + } + + private boolean existsNode(String path) throws BackingStoreException { + + // Empty String "" indicates this node + if (path.length() == 0) + return(!isRemoved()); + + // Calculate child name and rest of path + String childName; + String childPath; + int nextSlash = path.indexOf('/'); + if (nextSlash == -1) { + childName = path; + childPath = ""; + } else { + childName = path.substring(0, nextSlash); + childPath = path.substring(nextSlash+1); + } + + // Get the child node + AbstractPreferences child; + child = (AbstractPreferences)childCache.get(childName); + if (child == null) { + + if (childName.length() > MAX_NAME_LENGTH) + throw new IllegalArgumentException(childName); + + // Not in childCache yet so create a new sub node + child = getChild(childName); + + if (child == null) + return false; + + childCache.put(childName, child); + } + + // Lock the child and go down + synchronized(child.lock) { + return child.existsNode(childPath); + } + } + + /** + * Returns the child sub node if it exists in the backing store or null + * if it does not exist. Called (indirectly) by nodeExists() + * when a child node name can not be found in the cache. + *

                + * Gets the lock on this node, calls childrenNamesSpi() to + * get an array of all (possibly uncached) children and compares the + * given name with the names in the array. If the name is found in the + * array childSpi() is called to get an instance, otherwise + * null is returned. + * + * @exception BackingStoreException when the backing store cannot be + * reached + */ + protected AbstractPreferences getChild(String name) + throws BackingStoreException + { + synchronized(lock) { + // Get all the names (not yet in the cache) + String[] names = childrenNamesSpi(); + for (int i=0; i < names.length; i++) + if (name.equals(names[i])) + return childSpi(name); + + // No child with that name found + return null; + } + } + + /** + * Returns true if this node has been removed with the + * removeNode() method, false otherwise. + *

                + * Gets the lock on this node and then returns a boolean field set by + * removeNode methods. + */ + protected boolean isRemoved() { + synchronized(lock) { + return removed; + } + } + + /** + * Returns the parent preferences node of this node or null if this is + * the root of the preferences tree. + *

                + * Gets the lock on this node, checks that the node has not been removed + * and returns the parent given to the constructor. + * + * @exception IllegalStateException if this node has been removed + */ + public Preferences parent() { + synchronized(lock) { + if (isRemoved()) + throw new IllegalStateException("Node removed"); + + return parent; + } + } + + // export methods + + /** + * XXX + */ + public void exportNode(OutputStream os) + throws BackingStoreException, + IOException + { + NodeWriter nodeWriter = new NodeWriter(this, os); + nodeWriter.writePrefs(); + } + + /** + * XXX + */ + public void exportSubtree(OutputStream os) + throws BackingStoreException, + IOException + { + NodeWriter nodeWriter = new NodeWriter(this, os); + nodeWriter.writePrefsTree(); + } + + // preference entry manipulation methods + + /** + * Returns an (possibly empty) array with all the keys of the preference + * entries of this node. + *

                + * This method locks this node and checks if the node has not been + * removed, if it has been removed it throws an exception, then it returns + * the result of calling keysSpi(). + * + * @exception BackingStoreException when the backing store cannot be + * reached + * @exception IllegalStateException if this node has been removed + */ + public String[] keys() throws BackingStoreException { + synchronized(lock) { + if (isRemoved()) + throw new IllegalStateException("Node removed"); + + return keysSpi(); + } + } + + + /** + * Returns the value associated with the key in this preferences node. If + * the default value of the key cannot be found in the preferences node + * entries or something goes wrong with the backing store the supplied + * default value is returned. + *

                + * Checks that key is not null and not larger then 80 characters, + * locks this node, and checks that the node has not been removed. + * Then it calls keySpi() and returns + * the result of that method or the given default value if it returned + * null or throwed an exception. + * + * @exception IllegalArgumentException if key is larger then 80 characters + * @exception IllegalStateException if this node has been removed + * @exception NullPointerException if key is null + */ + public String get(String key, String defaultVal) { + if (key.length() > MAX_KEY_LENGTH) + throw new IllegalArgumentException(key); + + synchronized(lock) { + if (isRemoved()) + throw new IllegalStateException("Node removed"); + + String value; + try { + value = getSpi(key); + } catch (Throwable t) { + value = null; + } + + if (value != null) { + return value; + } else { + return defaultVal; + } + } + } + + /** + * Convenience method for getting the given entry as a boolean. + * When the string representation of the requested entry is either + * "true" or "false" (ignoring case) then that value is returned, + * otherwise the given default boolean value is returned. + * + * @exception IllegalArgumentException if key is larger then 80 characters + * @exception IllegalStateException if this node has been removed + * @exception NullPointerException if key is null + */ + public boolean getBoolean(String key, boolean defaultVal) { + String value = get(key, null); + + if ("true".equalsIgnoreCase(value)) + return true; + + if ("false".equalsIgnoreCase(value)) + return false; + + return defaultVal; + } + + /** + * Convenience method for getting the given entry as a byte array. + * When the string representation of the requested entry is a valid + * Base64 encoded string (without any other characters, such as newlines) + * then the decoded Base64 string is returned as byte array, + * otherwise the given default byte array value is returned. + * + * @exception IllegalArgumentException if key is larger then 80 characters + * @exception IllegalStateException if this node has been removed + * @exception NullPointerException if key is null + */ + public byte[] getByteArray(String key, byte[] defaultVal) { + String value = get(key, null); + + byte[] b = null; + if (value != null) { + b = decode64(value); + } + + if (b != null) + return b; + else + return defaultVal; + } + + /** + * Helper method for decoding a Base64 string as an byte array. + * Returns null on encoding error. This method does not allow any other + * characters present in the string then the 65 special base64 chars. + */ + private static byte[] decode64(String s) { + ByteArrayOutputStream bs = new ByteArrayOutputStream((s.length()/4)*3); + char[] c = new char[s.length()]; + s.getChars(0, s.length(), c, 0); + + // Convert from base64 chars + int endchar = -1; + for(int j = 0; j < c.length && endchar == -1; j++) { + if (c[j] >= 'A' && c[j] <= 'Z') { + c[j] -= 'A'; + } else if (c[j] >= 'a' && c[j] <= 'z') { + c[j] = (char) (c[j] + 26 - 'a'); + } else if (c[j] >= '0' && c[j] <= '9') { + c[j] = (char) (c[j] + 52 - '0'); + } else if (c[j] == '+') { + c[j] = 62; + } else if (c[j] == '/') { + c[j] = 63; + } else if (c[j] == '=') { + endchar = j; + } else { + return null; // encoding exception + } + } + + int remaining = endchar == -1 ? c.length : endchar; + int i = 0; + while (remaining > 0) { + // Four input chars (6 bits) are decoded as three bytes as + // 000000 001111 111122 222222 + + byte b0 = (byte) (c[i] << 2); + if (remaining >= 2) { + b0 += (c[i+1] & 0x30) >> 4; + } + bs.write(b0); + + if (remaining >= 3) { + byte b1 = (byte) ((c[i+1] & 0x0F) << 4); + b1 += (byte) ((c[i+2] & 0x3C) >> 2); + bs.write(b1); + } + + if (remaining >= 4) { + byte b2 = (byte) ((c[i+2] & 0x03) << 6); + b2 += c[i+3]; + bs.write(b2); + } + + i += 4; + remaining -= 4; + } + + return bs.toByteArray(); + } + + /** + * Convenience method for getting the given entry as a double. + * When the string representation of the requested entry can be decoded + * with Double.parseDouble() then that double is returned, + * otherwise the given default double value is returned. + * + * @exception IllegalArgumentException if key is larger then 80 characters + * @exception IllegalStateException if this node has been removed + * @exception NullPointerException if key is null + */ + public double getDouble(String key, double defaultVal) { + String value = get(key, null); + + if (value != null) { + try { + return Double.parseDouble(value); + } catch (NumberFormatException nfe) { /* ignore */ } + } + + return defaultVal; + } + + /** + * Convenience method for getting the given entry as a float. + * When the string representation of the requested entry can be decoded + * with Float.parseFloat() then that float is returned, + * otherwise the given default float value is returned. + * + * @exception IllegalArgumentException if key is larger then 80 characters + * @exception IllegalStateException if this node has been removed + * @exception NullPointerException if key is null + */ + public float getFloat(String key, float defaultVal) { + String value = get(key, null); + + if (value != null) { + try { + return Float.parseFloat(value); + } catch (NumberFormatException nfe) { /* ignore */ } + } + + return defaultVal; + } + + /** + * Convenience method for getting the given entry as an integer. + * When the string representation of the requested entry can be decoded + * with Integer.parseInt() then that integer is returned, + * otherwise the given default integer value is returned. + * + * @exception IllegalArgumentException if key is larger then 80 characters + * @exception IllegalStateException if this node has been removed + * @exception NullPointerException if key is null + */ + public int getInt(String key, int defaultVal) { + String value = get(key, null); + + if (value != null) { + try { + return Integer.parseInt(value); + } catch (NumberFormatException nfe) { /* ignore */ } + } + + return defaultVal; + } + + /** + * Convenience method for getting the given entry as a long. + * When the string representation of the requested entry can be decoded + * with Long.parseLong() then that long is returned, + * otherwise the given default long value is returned. + * + * @exception IllegalArgumentException if key is larger then 80 characters + * @exception IllegalStateException if this node has been removed + * @exception NullPointerException if key is null + */ + public long getLong(String key, long defaultVal) { + String value = get(key, null); + + if (value != null) { + try { + return Long.parseLong(value); + } catch (NumberFormatException nfe) { /* ignore */ } + } + + return defaultVal; + } + + /** + * Sets the value of the given preferences entry for this node. + * Key and value cannot be null, the key cannot exceed 80 characters + * and the value cannot exceed 8192 characters. + *

                + * The result will be immediatly visible in this VM, but may not be + * immediatly written to the backing store. + *

                + * Checks that key and value are valid, locks this node, and checks that + * the node has not been removed. Then it calls putSpi(). + * + * @exception NullPointerException if either key or value are null + * @exception IllegalArgumentException if either key or value are to large + * @exception IllegalStateException when this node has been removed + */ + public void put(String key, String value) { + if (key.length() > MAX_KEY_LENGTH + || value.length() > MAX_VALUE_LENGTH) + throw new IllegalArgumentException("key (" + + key.length() + ")" + + " or value (" + + value.length() + ")" + + " to large"); + synchronized(lock) { + if (isRemoved()) + throw new IllegalStateException("Node removed"); + + putSpi(key, value); + + // XXX - fire events + } + + } + + /** + * Convenience method for setting the given entry as a boolean. + * The boolean is converted with Boolean.toString(value) + * and then stored in the preference entry as that string. + * + * @exception NullPointerException if key is null + * @exception IllegalArgumentException if the key length is to large + * @exception IllegalStateException when this node has been removed + */ + public void putBoolean(String key, boolean value) { + put(key, String.valueOf(value)); + // XXX - Use when using 1.4 compatible Boolean + // put(key, Boolean.toString(value)); + } + + /** + * Convenience method for setting the given entry as an array of bytes. + * The byte array is converted to a Base64 encoded string + * and then stored in the preference entry as that string. + *

                + * Note that a byte array encoded as a Base64 string will be about 1.3 + * times larger then the original length of the byte array, which means + * that the byte array may not be larger about 6 KB. + * + * @exception NullPointerException if either key or value are null + * @exception IllegalArgumentException if either key or value are to large + * @exception IllegalStateException when this node has been removed + */ + public void putByteArray(String key, byte[] value) { + put(key, encode64(value)); + } + + /** + * Helper method for encoding an array of bytes as a Base64 String. + */ + private static String encode64(byte[] b) { + StringBuffer sb = new StringBuffer((b.length/3)*4); + + int i = 0; + int remaining = b.length; + char c[] = new char[4]; + while (remaining > 0) { + // Three input bytes are encoded as four chars (6 bits) as + // 00000011 11112222 22333333 + + c[0] = (char) ((b[i] & 0xFC) >> 2); + c[1] = (char) ((b[i] & 0x03) << 4); + if (remaining >= 2) { + c[1] += (char) ((b[i+1] & 0xF0) >> 4); + c[2] = (char) ((b[i+1] & 0x0F) << 2); + if (remaining >= 3) { + c[2] += (char) ((b[i+2] & 0xC0) >> 6); + c[3] = (char) (b[i+2] & 0x3F); + } else { + c[3] = 64; + } + } else { + c[2] = 64; + c[3] = 64; + } + + // Convert to base64 chars + for(int j = 0; j < 4; j++) { + if (c[j] < 26) { + c[j] += 'A'; + } else if (c[j] < 52) { + c[j] = (char) (c[j] - 26 + 'a'); + } else if (c[j] < 62) { + c[j] = (char) (c[j] - 52 + '0'); + } else if (c[j] == 62) { + c[j] = '+'; + } else if (c[j] == 63) { + c[j] = '/'; + } else { + c[j] = '='; + } + } + + sb.append(c); + i += 3; + remaining -= 3; + } + + return sb.toString(); + } + + /** + * Convenience method for setting the given entry as a double. + * The double is converted with Double.toString(double) + * and then stored in the preference entry as that string. + * + * @exception NullPointerException if the key is null + * @exception IllegalArgumentException if the key length is to large + * @exception IllegalStateException when this node has been removed + */ + public void putDouble(String key, double value) { + put(key, Double.toString(value)); + } + + /** + * Convenience method for setting the given entry as a float. + * The float is converted with Float.toString(float) + * and then stored in the preference entry as that string. + * + * @exception NullPointerException if the key is null + * @exception IllegalArgumentException if the key length is to large + * @exception IllegalStateException when this node has been removed + */ + public void putFloat(String key, float value) { + put(key, Float.toString(value)); + } + + /** + * Convenience method for setting the given entry as an integer. + * The integer is converted with Integer.toString(int) + * and then stored in the preference entry as that string. + * + * @exception NullPointerException if the key is null + * @exception IllegalArgumentException if the key length is to large + * @exception IllegalStateException when this node has been removed + */ + public void putInt(String key, int value) { + put(key, Integer.toString(value)); + } + + /** + * Convenience method for setting the given entry as a long. + * The long is converted with Long.toString(long) + * and then stored in the preference entry as that string. + * + * @exception NullPointerException if the key is null + * @exception IllegalArgumentException if the key length is to large + * @exception IllegalStateException when this node has been removed + */ + public void putLong(String key, long value) { + put(key, Long.toString(value)); + } + + /** + * Removes the preferences entry from this preferences node. + *

                + * The result will be immediatly visible in this VM, but may not be + * immediatly written to the backing store. + *

                + * This implementation checks that the key is not larger then 80 + * characters, gets the lock of this node, checks that the node has + * not been removed and calls removeSpi with the given key. + * + * @exception NullPointerException if the key is null + * @exception IllegalArgumentException if the key length is to large + * @exception IllegalStateException when this node has been removed + */ + public void remove(String key) { + if (key.length() > MAX_KEY_LENGTH) + throw new IllegalArgumentException(key); + + synchronized(lock) { + if (isRemoved()) + throw new IllegalStateException("Node removed"); + + removeSpi(key); + } + } + + /** + * Removes all entries from this preferences node. May need access to the + * backing store to get and clear all entries. + *

                + * The result will be immediatly visible in this VM, but may not be + * immediatly written to the backing store. + *

                + * This implementation locks this node, checks that the node has not been + * removed and calls keys() to get a complete array of keys + * for this node. For every key found removeSpi() is called. + * + * @exception BackingStoreException when the backing store cannot be + * reached + * @exception IllegalStateException if this node has been removed + */ + public void clear() throws BackingStoreException { + synchronized(lock) { + if (isRemoved()) + throw new IllegalStateException("Node Removed"); + + String[] keys = keys(); + for (int i = 0; i < keys.length; i++) { + removeSpi(keys[i]); + } + } + } + + /** + * Writes all preference changes on this and any subnode that have not + * yet been written to the backing store. This has no effect on the + * preference entries in this VM, but it makes sure that all changes + * are visible to other programs (other VMs might need to call the + * sync() method to actually see the changes to the backing + * store. + *

                + * Locks this node, calls the flushSpi() method, gets all + * the (cached - already existing in this VM) subnodes and then calls + * flushSpi() on every subnode with this node unlocked and + * only that particular subnode locked. + * + * @exception BackingStoreException when the backing store cannot be + * reached + */ + public void flush() throws BackingStoreException { + flushNode(false); + } + + /** + * Writes and reads all preference changes to and from this and any + * subnodes. This makes sure that all local changes are written to the + * backing store and that all changes to the backing store are visible + * in this preference node (and all subnodes). + *

                + * Checks that this node is not removed, locks this node, calls the + * syncSpi() method, gets all the subnodes and then calls + * syncSpi() on every subnode with this node unlocked and + * only that particular subnode locked. + * + * @exception BackingStoreException when the backing store cannot be + * reached + * @exception IllegalStateException if this node has been removed + */ + public void sync() throws BackingStoreException { + flushNode(true); + } + + + /** + * Private helper method that locks this node and calls either + * flushSpi() if sync is false, or + * flushSpi() if sync is true. Then it gets all + * the currently cached subnodes. For every subnode it calls this method + * recursively with this node no longer locked. + *

                + * Called by either flush() or sync() + */ + private void flushNode(boolean sync) throws BackingStoreException { + String[] keys = null; + synchronized(lock) { + if (sync) { + syncSpi(); + } else { + flushSpi(); + } + keys = (String[]) childCache.keySet().toArray(); + } + + if (keys != null) { + for (int i = 0; i < keys.length; i++) { + // Have to lock this node again to access the childCache + AbstractPreferences subNode; + synchronized(this) { + subNode = (AbstractPreferences) childCache.get(keys[i]); + } + + // The child could already have been removed from the cache + if (subNode != null) { + subNode.flushNode(sync); + } + } + } + } + + /** + * Removes this and all subnodes from the backing store and clears all + * entries. After removal this instance will not be useable (except for + * a few methods that don't throw a InvalidStateException), + * even when a new node with the same path name is created this instance + * will not be usable again. + *

                + * Checks that this is not a root node. If not it locks the parent node, + * then locks this node and checks that the node has not yet been removed. + * Then it makes sure that all subnodes of this node are in the child cache, + * by calling childSpi() on any children not yet in the cache. + * Then for all children it locks the subnode and removes it. After all + * subnodes have been purged the child cache is cleared, this nodes removed + * flag is set and any listeners are called. Finally this node is removed + * from the child cache of the parent node. + * + * @exception BackingStoreException when the backing store cannot be + * reached + * @exception IllegalStateException if this node has already been removed + * @exception UnsupportedOperationException if this is a root node + */ + public void removeNode() throws BackingStoreException { + // Check if it is a root node + if (parent == null) + throw new UnsupportedOperationException("Cannot remove root node"); + + synchronized(parent) { + synchronized(this) { + if (isRemoved()) + throw new IllegalStateException("Node Removed"); + + purge(); + } + parent.childCache.remove(name); + } + } + + /** + * Private helper method used to completely remove this node. + * Called by removeNode with the parent node and this node + * locked. + *

                + * Makes sure that all subnodes of this node are in the child cache, + * by calling childSpi() on any children not yet in the + * cache. Then for all children it locks the subnode and calls this method + * on that node. After all subnodes have been purged the child cache is + * cleared, this nodes removed flag is set and any listeners are called. + */ + private void purge() throws BackingStoreException + { + // Make sure all children have an AbstractPreferences node in cache + String children[] = childrenNamesSpi(); + for (int i = 0; i < children.length; i++) { + if (childCache.get(children[i]) == null) + childCache.put(children[i], childSpi(children[i])); + } + + // purge all children + Iterator i = childCache.values().iterator(); + while (i.hasNext()) { + AbstractPreferences node = (AbstractPreferences) i.next(); + synchronized(node) { + node.purge(); + } + } + + // Cache is empty now + childCache.clear(); + + // remove this node + removeNodeSpi(); + removed = true; + + // XXX - check for listeners + } + + // listener methods + + /** + * XXX + */ + public void addNodeChangeListener(NodeChangeListener listener) { + // XXX + } + + public void addPreferenceChangeListener(PreferenceChangeListener listener) { + // XXX + } + + public void removeNodeChangeListener(NodeChangeListener listener) { + // XXX + } + + public void removePreferenceChangeListener + (PreferenceChangeListener listener) + { + // XXX + } + + // abstract spi methods + + /** + * Returns the names of the sub nodes of this preference node. + * This method only has to return any not yet cached child names, + * but may return all names if that is easier. It must not return + * null when there are no children, it has to return an empty array + * in that case. Since this method must consult the backing store to + * get all the sub node names it may throw a BackingStoreException. + *

                + * Called by childrenNames() with this node locked. + */ + protected abstract String[] childrenNamesSpi() throws BackingStoreException; + + /** + * Returns a child note with the given name. + * This method is called by the node() method (indirectly + * through the getNode() helper method) with this node locked + * if a sub node with this name does not already exist in the child cache. + * If the child node did not aleady exist in the backing store the boolean + * field newNode of the returned node should be set. + *

                + * Note that this method should even return a non-null child node if the + * backing store is not available since it may not throw a + * BackingStoreException. + */ + protected abstract AbstractPreferences childSpi(String name); + + /** + * Returns an (possibly empty) array with all the keys of the preference + * entries of this node. + *

                + * Called by keys() with this node locked if this node has + * not been removed. May throw an exception when the backing store cannot + * be accessed. + * + * @exception BackingStoreException when the backing store cannot be + * reached + */ + abstract protected String[] keysSpi() throws BackingStoreException; + + /** + * Returns the value associated with the key in this preferences node or + * null when the key does not exist in this preferences node. + *

                + * Called by key() with this node locked after checking that + * key is valid, not null and that the node has not been removed. + * key() will catch any exceptions that this method throws. + */ + abstract protected String getSpi(String key); + + /** + * Sets the value of the given preferences entry for this node. + * The implementation is not required to propagate the change to the + * backing store immediatly. It may not throw an exception when it tries + * to write to the backing store and that operation fails, the failure + * should be registered so a later invocation of flush() + * or sync() can signal the failure. + *

                + * Called by put() with this node locked after checking that + * key and value are valid and non-null. + */ + abstract protected void putSpi(String key, String value); + + /** + * Removes the given key entry from this preferences node. + * The implementation is not required to propagate the change to the + * backing store immediatly. It may not throw an exception when it tries + * to write to the backing store and that operation fails, the failure + * should be registered so a later invocation of flush() + * or sync() can signal the failure. + *

                + * Called by remove() with this node locked after checking + * that the key is valid and non-null. + */ + abstract protected void removeSpi(String key); + + /** + * Writes all entries of this preferences node that have not yet been + * written to the backing store and possibly creates this node in the + * backing store, if it does not yet exist. Should only write changes to + * this node and not write changes to any subnodes. + * Note that the node can be already removed in this VM. To check if + * that is the case the implementation can call isRemoved(). + *

                + * Called (indirectly) by flush() with this node locked. + */ + abstract protected void flushSpi() throws BackingStoreException; + + /** + * Writes all entries of this preferences node that have not yet been + * written to the backing store and reads any entries that have changed + * in the backing store but that are not yet visible in this VM. + * Should only sync this node and not change any of the subnodes. + * Note that the node can be already removed in this VM. To check if + * that is the case the implementation can call isRemoved(). + *

                + * Called (indirectly) by sync() with this node locked. + */ + abstract protected void syncSpi() throws BackingStoreException; + + /** + * Clears this node from this VM and removes it from the backing store. + * After this method has been called the node is marked as removed. + *

                + * Called (indirectly) by removeNode() with this node locked + * after all the sub nodes of this node have already been removed. + */ + abstract protected void removeNodeSpi() throws BackingStoreException; + } diff -Nrc3pad gcc-3.3.3/libjava/java/util/prefs/BackingStoreException.java gcc-3.4.0/libjava/java/util/prefs/BackingStoreException.java *** gcc-3.3.3/libjava/java/util/prefs/BackingStoreException.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/util/prefs/BackingStoreException.java 2003-02-13 07:45:58.000000000 +0000 *************** *** 0 **** --- 1,104 ---- + /* BackingStoreException.java - chained exception thrown when backing store + fails + Copyright (C) 2001, 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package java.util.prefs; + + import java.io.ObjectOutputStream; + import java.io.ObjectInputStream; + import java.io.NotSerializableException; + + /** + * Chained exception thrown when backing store fails. This exception is + * only thrown from methods that actually have to access the backing store, + * such as clear(), keys(), childrenNames(), nodeExists(), removeNode(), + * flush(), sync(), exportNode(), exportSubTree(); normal operations + * do not throw BackingStoreExceptions. + * + *

                Note that although this class inherits the Serializable interface, an + * attempt to serialize will fail with a NotSerializableException. + * + * @author Mark Wielaard + * @since 1.4 + * @status updated to 1.4 + */ + public class BackingStoreException extends Exception + { + static final long serialVersionUID = 859796500401108469L; + + /** + * Creates a new exception with a descriptive message. + * + * @param message the message + */ + public BackingStoreException(String message) + { + super(message); + } + + /** + * Create a new exception with the given cause. + * + * @param cause the cause + */ + public BackingStoreException(Throwable cause) + { + super(cause); + } + + /** + * This class should not be serialized. + * + * @param o the output stream + */ + private void writeObject(ObjectOutputStream o) throws NotSerializableException + { + throw new NotSerializableException + ("java.util.prefs.BackingStoreException"); + } + + /** + * This class should not be serialized. + * + * @param i the input stream + */ + private void readObject(ObjectInputStream i) throws NotSerializableException + { + throw new NotSerializableException + ("java.util.prefs.BackingStoreException"); + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/util/prefs/InvalidPreferencesFormatException.java gcc-3.4.0/libjava/java/util/prefs/InvalidPreferencesFormatException.java *** gcc-3.3.3/libjava/java/util/prefs/InvalidPreferencesFormatException.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/util/prefs/InvalidPreferencesFormatException.java 2003-02-13 07:45:58.000000000 +0000 *************** *** 0 **** --- 1,115 ---- + /* InvalidPreferencesFormatException - indicates reading prefs from stream + failed + Copyright (C) 2001, 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package java.util.prefs; + + import java.io.ObjectOutputStream; + import java.io.ObjectInputStream; + import java.io.NotSerializableException; + + /** + * Indicates reading prefs from stream failed. Thrown by the + * importPreferences() method when the supplied input stream + * could not be read because it was not in the correct XML format. + * + *

                Note that although this class inherits the Serializable interface, an + * attempt to serialize will fail with a NotSerializableException. + * + * @author Mark Wielaard + * @see Preferences + * @since 1.4 + * @status updated to 1.4 + */ + public class InvalidPreferencesFormatException extends Exception + { + static final long serialVersionUID = -791715184232119669L; + + /** + * Creates a new exception with a descriptive message. The cause remains + * uninitialized. + * + * @param message the message + */ + public InvalidPreferencesFormatException(String message) + { + super(message); + } + + /** + * Creates a new exception with the given cause. + * + * @param cause the cause + */ + public InvalidPreferencesFormatException(Throwable cause) + { + super(cause); + } + + /** + * Creates a new exception with a descriptive message and a cause. + * + * @param message the message + * @param cause the cause + */ + public InvalidPreferencesFormatException(String message, Throwable cause) + { + super(message, cause); + } + + /** + * This class should not be serialized. + * + * @param o the output stream + */ + private void writeObject(ObjectOutputStream o) throws NotSerializableException + { + throw new NotSerializableException + ("java.util.prefs.InvalidPreferencesFormatException"); + } + + /** + * This class should not be serialized. + * + * @param i the input stream + */ + private void readObject(ObjectInputStream i) throws NotSerializableException + { + throw new NotSerializableException + ("java.util.prefs.InvalidPreferencesFormatException"); + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/util/prefs/NodeChangeEvent.java gcc-3.4.0/libjava/java/util/prefs/NodeChangeEvent.java *** gcc-3.3.3/libjava/java/util/prefs/NodeChangeEvent.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/util/prefs/NodeChangeEvent.java 2003-02-13 07:45:58.000000000 +0000 *************** *** 0 **** --- 1,91 ---- + /* NodeChangeEvent - ObjectEvent fired when a Preference node is added/removed + Copyright (C) 2001 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package java.util.prefs; + + import java.util.EventObject; + + /** + * ObjectEvent fired when a Preference node is added/removed. + * This event is only generated when a new subnode is added or a subnode is + * removed from a preference node. Changes in the entries of a preference node + * are indicated with a PreferenceChangeEvent. + * + * @since 1.4 + * @author Mark Wielaard (mark@klomp.org) + */ + public class NodeChangeEvent extends EventObject { + + private static final long serialVersionUID =8068949086596572957L; + + /** + * The sub node that was added or removed. + * Defined transient just like EventObject.source since + * this object should be serializable, but Preferences is in general not + * serializable. + */ + private final transient Preferences child; + + /** + * Creates a new NodeChangeEvent. + * + * @param parentNode The source preference node from which a subnode was + * added or removed + * @param childNode The preference node that was added or removed + */ + public NodeChangeEvent(Preferences parentNode, Preferences childNode) { + super(parentNode); + child = childNode; + } + + /** + * Returns the source parent preference node from which a subnode was + * added or removed. + */ + public Preferences getParent() { + return (Preferences) source; + } + + /** + * Returns the child preference subnode that was added or removed. + * To see wether it is still a valid preference node one has to call + * event.getChild().nodeExists(""). + */ + public Preferences getChild() { + return child; + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/util/prefs/NodeChangeListener.java gcc-3.4.0/libjava/java/util/prefs/NodeChangeListener.java *** gcc-3.3.3/libjava/java/util/prefs/NodeChangeListener.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/util/prefs/NodeChangeListener.java 2003-02-13 07:45:58.000000000 +0000 *************** *** 0 **** --- 1,64 ---- + /* NodeChangeListener - EventListener for Preferences node addition/removal + Copyright (C) 2001 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package java.util.prefs; + + import java.util.EventListener; + + /** + * EventListener for Preferences node addition/removal. + *

                + * Note that these events are only generated for the addition and removal + * of sub nodes from the preference node. Entry changes in the preference + * node can be monitored with a PreferenceChangeListener. + * + * @since 1.4 + * @author Mark Wielaard (mark@klomp.org) + */ + public interface NodeChangeListener extends EventListener { + + /** + * Fired when a sub node is added to the preference node. + */ + void childAdded(NodeChangeEvent event); + + /** + * Fired when a sub node is removed from the preference node. + */ + void childRemoved(NodeChangeEvent event); + + } diff -Nrc3pad gcc-3.3.3/libjava/java/util/prefs/PreferenceChangeEvent.java gcc-3.4.0/libjava/java/util/prefs/PreferenceChangeEvent.java *** gcc-3.3.3/libjava/java/util/prefs/PreferenceChangeEvent.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/util/prefs/PreferenceChangeEvent.java 2003-02-13 07:45:58.000000000 +0000 *************** *** 0 **** --- 1,105 ---- + /* PreferenceChangeEvent - ObjectEvent fired when a Preferences entry changes + Copyright (C) 2001 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package java.util.prefs; + + import java.util.EventObject; + + /** + * ObjectEvent fired when a Preferences entry changes. + * This event is generated when a entry is added, changed or removed. + * When an entry is removed then getNewValue will return null. + *

                + * Preference change events are only generated for entries in one particular + * preference node. Notification of subnode addition/removal is given by a + * NodeChangeEvent. + * + * @since 1.4 + * @author Mark Wielaard (mark@klomp.org) + */ + public class PreferenceChangeEvent extends EventObject { + + private static final long serialVersionUID = 793724513368024975L; + + /** + * The key of the changed entry. + */ + private final String key; + + /** + * The new value of the changed entry, or null when the entry was removed. + */ + private final String newValue; + + /** + * Creates a new PreferenceChangeEvent. + * + * @param node The source preference node for which an entry was added, + * changed or removed + * @param key The key of the entry that was added, changed or removed + * @param value The new value of the entry that was added or changed, or + * null when the entry was removed + */ + public PreferenceChangeEvent(Preferences node, String key, String value) { + super(node); + this.key = key; + this.newValue = value; + } + + /** + * Returns the source Preference node from which an entry was added, + * changed or removed. + */ + public Preferences getNode() { + return (Preferences) source; + } + + /** + * Returns the key of the entry that was added, changed or removed. + */ + public String getKey() { + return key; + } + + /** + * Returns the new value of the entry that was added or changed, or + * returns null when the entry was removed. + */ + public String getNewValue() { + return newValue; + } + } diff -Nrc3pad gcc-3.3.3/libjava/java/util/prefs/PreferenceChangeListener.java gcc-3.4.0/libjava/java/util/prefs/PreferenceChangeListener.java *** gcc-3.3.3/libjava/java/util/prefs/PreferenceChangeListener.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/util/prefs/PreferenceChangeListener.java 2003-02-13 07:45:58.000000000 +0000 *************** *** 0 **** --- 1,60 ---- + /* PreferenceChangeListener - EventListener for Preferences entry changes + Copyright (C) 2001 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package java.util.prefs; + + import java.util.EventListener; + + /** + * EventListener for Preferences entry addition, change or removal. + *

                + * Preference change events are only generated for entries in one particular + * preference node. Notification of subnode addition/removal can be monitored + * with a NodeChangeListener. + * + * @since 1.4 + * @author Mark Wielaard (mark@klomp.org) + */ + public interface PreferenceChangeListener extends EventListener { + + /** + * Fired when a entry has been added, changed or removed from the + * preference node. + */ + void preferenceChange(PreferenceChangeEvent event); + + } diff -Nrc3pad gcc-3.3.3/libjava/java/util/prefs/PreferencesFactory.java gcc-3.4.0/libjava/java/util/prefs/PreferencesFactory.java *** gcc-3.3.3/libjava/java/util/prefs/PreferencesFactory.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/util/prefs/PreferencesFactory.java 2003-06-17 13:01:21.000000000 +0000 *************** *** 0 **** --- 1,65 ---- + /* PreferencesFactory - Preferences system and user root factory interface + Copyright (C) 2001 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package java.util.prefs; + + /** + * Preferences system and user root factory interface. Defines how to get + * to the system and user root preferences objects. Should be implemented by + * new preferences backends. + * + * @since 1.4 + * @author Mark Wielaard (mark@klomp.org) + */ + public interface PreferencesFactory { + + /** + * Returns the system root preferences node. Should always return the + * same object. + */ + Preferences systemRoot(); + + /** + * Returns the user root preferences node. May return different objects + * depending on the user that called this method. The user may for example + * be determined by the current Thread or the Subject associated with the + * current AccessControllContext. + */ + Preferences userRoot(); + + } diff -Nrc3pad gcc-3.3.3/libjava/java/util/prefs/Preferences.java gcc-3.4.0/libjava/java/util/prefs/Preferences.java *** gcc-3.3.3/libjava/java/util/prefs/Preferences.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/java/util/prefs/Preferences.java 2003-12-09 16:17:01.000000000 +0000 *************** *** 0 **** --- 1,670 ---- + /* Preferences - Preference node containing key value entries and subnodes + Copyright (C) 2001 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package java.util.prefs; + + import java.io.InputStream; + import java.io.OutputStream; + import java.io.IOException; + + import java.security.AccessController; + import java.security.Permission; + import java.security.PrivilegedAction; + + import gnu.java.util.prefs.NodeReader; + + /** + * Preference node containing key value entries and subnodes. + *

                + * There are two preference node trees, a system tree which can be accessed + * by calling systemRoot() containing system preferences usefull + * for all users, and a user tree that can be accessed by calling + * userRoot() containing preferences that can differ between + * different users. How different users are identified is implementation + * depended. It can be determined by Thread, Access Control Context or Subject. + *

                + * This implementation uses the "java.util.prefs.PreferencesFactory" system + * property to find a class that implement PreferencesFactory + * and initialized that class (if it has a public no arguments contructor) + * to get at the actual system or user root. If the system property is not set, + * or the class cannot be initialized it uses the default implementation + * gnu.java.util.prefs.FileBasedFactory. + *

                + * Besides the two static method above to get the roots of the system and user + * preference node trees there are also two convenience methods to access the + * default preference node for a particular package an object is in. These are + * userNodeForPackage() and systemNodeForPackage(). + * Both methods take an Object as an argument so accessing preferences values + * can be as easy as calling Preferences.userNodeForPackage(this). + *

                + * Note that if a security manager is installed all static methods check for + * RuntimePermission("preferences"). But if this permission is + * given to the code then it can access and change all (user) preference nodes + * and entries. So you should be carefull not to store to sensitive information + * or make security decissions based on preference values since there is no + * more fine grained control over what preference values can be changed once + * code has been given the correct runtime permission. + *

                + * XXX + * + * @since 1.4 + * @author Mark Wielaard (mark@klomp.org) + */ + public abstract class Preferences { + + // Static Fields + + /** + * Default PreferencesFactory class used when the system property + * "java.util.prefs.PreferencesFactory" is not set. + *

                + * XXX - Currently set to MemoryBasedFactory, should be changed + * when FileBasedPreferences backend works. + */ + private static final String defaultFactoryClass + = "gnu.java.util.prefs.MemoryBasedFactory"; + + /** Permission needed to access system or user root. */ + private static final Permission prefsPermission + = new RuntimePermission("preferences"); + + /** + * The preferences factory object that supplies the system and user root. + * Set and returned by the getFactory() method. + */ + private static PreferencesFactory factory; + + /** Maximum node name length. 80 characters. */ + public static final int MAX_NAME_LENGTH = 80; + + /** Maximum entry key length. 80 characters. */ + public static final int MAX_KEY_LENGTH = 80; + + /** Maximum entry value length. 8192 characters. */ + public static final int MAX_VALUE_LENGTH = 8192; + + // Constructors + + /** + * Creates a new Preferences node. Can only be used by subclasses. + * Empty implementation. + */ + protected Preferences() {} + + // Static methods + + /** + * Returns the system preferences root node containing usefull preferences + * for all users. It is save to cache this value since it should always + * return the same preference node. + * + * @return the root system preference node + * @exception SecurityException when a security manager is installed and + * the caller does not have RuntimePermission("preferences"). + */ + public static Preferences systemRoot() throws SecurityException { + // Get the preferences factory and check for permission + PreferencesFactory factory = getFactory(); + + return factory.systemRoot(); + } + + /** + * Returns the user preferences root node containing preferences for the + * the current user. How different users are identified is implementation + * depended. It can be determined by Thread, Access Control Context or + * Subject. + * + * @return the root user preference node + * @exception SecurityException when a security manager is installed and + * the caller does not have RuntimePermission("preferences"). + */ + public static Preferences userRoot() throws SecurityException { + // Get the preferences factory and check for permission + PreferencesFactory factory = getFactory(); + return factory.userRoot(); + } + + /** + * Private helper method for systemRoot() and + * userRoot(). Checks security permission and instantiates the + * correct factory if it has not yet been set. + *

                + * When the preferences factory has not yet been set this method first + * tries to get the system propery "java.util.prefs.PreferencesFactory" + * and tries to initializes that class. If the system property is not set + * or initialization fails it returns an instance of the default factory + * gnu.java.util.prefs.FileBasedPreferencesFactory. + * + * @return the preferences factory to use + * @exception SecurityException when a security manager is installed and + * the caller does not have RuntimePermission("preferences"). + */ + private static PreferencesFactory getFactory() throws SecurityException { + + // First check for permission + SecurityManager sm = System.getSecurityManager(); + if (sm != null) { + sm.checkPermission(prefsPermission); + } + + // Get the factory + if (factory == null) { + // Caller might not have enough permissions + factory = (PreferencesFactory) AccessController.doPrivileged( + new PrivilegedAction() { + public Object run() { + PreferencesFactory pf = null; + String className = System.getProperty + ("java.util.prefs.PreferencesFactory"); + if (className != null) { + try { + Class fc = Class.forName(className); + Object o = fc.newInstance(); + pf = (PreferencesFactory) o; + } catch (ClassNotFoundException cnfe) + {/*ignore*/} + catch (InstantiationException ie) + {/*ignore*/} + catch (IllegalAccessException iae) + {/*ignore*/} + catch (ClassCastException cce) + {/*ignore*/} + } + return pf; + } + }); + + // Still no factory? Use our default. + if (factory == null) + { + try + { + Class cls = Class.forName (defaultFactoryClass); + factory = (PreferencesFactory) cls.newInstance(); + } + catch (Exception e) + { + throw new RuntimeException ("Couldn't load default factory" + + " '"+ defaultFactoryClass +"'"); + // XXX - when using 1.4 compatible throwables add cause + } + } + + } + + return factory; + } + + /** + * Returns the system preferences node for the package of an object. + * The package node name of the object is determined by dropping the + * class name of the object of the fully quallified class name and + * replacing all '.' to '/' in the package name. If the class of the + * object has no package then the package node name is "". + * The returened node is systemRoot().node(packageNodeName). + * + * @param o Object whose default system preference node is requested + * @returns system preferences node that should be used by object o + * @exception SecurityException when a security manager is installed and + * the caller does not have RuntimePermission("preferences"). + */ + public static Preferences systemNodeForPackage(Class c) + throws SecurityException + { + return nodeForPackage(c, systemRoot()); + } + + /** + * Returns the user preferences node for the package of an object. + * The package node name of the object is determined by dropping the + * class name of the object of the fully quallified class name and + * replacing all '.' to '/' in the package name. If the class of the + * object has no package then the package node name is "". + * The returened node is userRoot().node(packageNodeName). + * + * @param o Object whose default user preference node is requested + * @returns user preferences node that should be used by object o + * @exception SecurityException when a security manager is installed and + * the caller does not have RuntimePermission("preferences"). + */ + public static Preferences userNodeForPackage(Class c) + throws SecurityException + { + return nodeForPackage(c, userRoot()); + } + + /** + * Private helper method for systemNodeForPackage() and + * userNodeForPackage(). Given the correct system or user + * root it returns the correct Preference node for the package node name + * of the given object. + */ + private static Preferences nodeForPackage(Class c, Preferences root) { + // Get the package path + String className = c.getName(); + String packagePath; + int index = className.lastIndexOf('.'); + if(index == -1) { + packagePath = ""; + } else { + packagePath = className.substring(0,index).replace('.','/'); + } + + return root.node(packagePath); + } + + /** + * XXX + */ + public static void importPreferences(InputStream is) + throws InvalidPreferencesFormatException, + IOException + { + PreferencesFactory factory = getFactory(); + NodeReader reader = new NodeReader(is, factory); + reader.importPreferences(); + } + + // abstract methods (identification) + + /** + * Returns the absolute path name of this preference node. + * The absolute path name of a node is the path name of its parent node + * plus a '/' plus its own name. If the node is the root node and has no + * parent then its name is "" and its absolute path name is "/". + */ + abstract public String absolutePath(); + + /** + * Returns true if this node comes from the user preferences tree, false + * if it comes from the system preferences tree. + */ + abstract public boolean isUserNode(); + + /** + * Returns the name of this preferences node. The name of the node cannot + * be null, can be mostly 80 characters and cannot contain any '/' + * characters. The root node has as name "". + */ + abstract public String name(); + + /** + * Returns the String given by + * + * (isUserNode() ? "User":"System") + " Preference Node: " + absolutePath() + * + */ + abstract public String toString(); + + // abstract methods (navigation) + + /** + * Returns all the direct sub nodes of this preferences node. + * Needs access to the backing store to give a meaningfull answer. + * + * @exception BackingStoreException when the backing store cannot be + * reached + * @exception IllegalStateException when this node has been removed + */ + abstract public String[] childrenNames() throws BackingStoreException; + + /** + * Returns a sub node of this preferences node if the given path is + * relative (does not start with a '/') or a sub node of the root + * if the path is absolute (does start with a '/'). + * + * @exception IllegalStateException if this node has been removed + * @exception IllegalArgumentException if the path contains two or more + * consecutive '/' characters, ends with a '/' charactor and is not the + * string "/" (indicating the root node) or any name on the path is more + * then 80 characters long + */ + abstract public Preferences node(String path); + + /** + * Returns true if the node that the path points to exists in memory or + * in the backing store. Otherwise it returns false or an exception is + * thrown. When this node is removed the only valid parameter is the + * empty string (indicating this node), the return value in that case + * will be false. + * + * @exception BackingStoreException when the backing store cannot be + * reached + * @exception IllegalStateException if this node has been removed + * and the path is not the empty string (indicating this node) + * @exception IllegalArgumentException if the path contains two or more + * consecutive '/' characters, ends with a '/' charactor and is not the + * string "/" (indicating the root node) or any name on the path is more + * then 80 characters long + */ + abstract public boolean nodeExists(String path) + throws BackingStoreException; + + /** + * Returns the parent preferences node of this node or null if this is + * the root of the preferences tree. + * + * @exception IllegalStateException if this node has been removed + */ + abstract public Preferences parent(); + + // abstract methods (export) + + /** + * XXX + */ + abstract public void exportNode(OutputStream os) + throws BackingStoreException, + IOException; + + /** + * XXX + */ + abstract public void exportSubtree(OutputStream os) + throws BackingStoreException, + IOException; + + // abstract methods (preference entry manipulation) + + /** + * Returns an (possibly empty) array with all the keys of the preference + * entries of this node. + * + * @exception BackingStoreException when the backing store cannot be + * reached + * @exception IllegalStateException if this node has been removed + */ + abstract public String[] keys() throws BackingStoreException; + + /** + * Returns the value associated with the key in this preferences node. If + * the default value of the key cannot be found in the preferences node + * entries or something goes wrong with the backing store the supplied + * default value is returned. + * + * @exception IllegalArgumentException if key is larger then 80 characters + * @exception IllegalStateException if this node has been removed + * @exception NullPointerException if key is null + */ + abstract public String get(String key, String defaultVal); + + /** + * Convenience method for getting the given entry as a boolean. + * When the string representation of the requested entry is either + * "true" or "false" (ignoring case) then that value is returned, + * otherwise the given default boolean value is returned. + * + * @exception IllegalArgumentException if key is larger then 80 characters + * @exception IllegalStateException if this node has been removed + * @exception NullPointerException if key is null + */ + abstract public boolean getBoolean(String key, boolean defaultVal); + + /** + * Convenience method for getting the given entry as a byte array. + * When the string representation of the requested entry is a valid + * Base64 encoded string (without any other characters, such as newlines) + * then the decoded Base64 string is returned as byte array, + * otherwise the given default byte array value is returned. + * + * @exception IllegalArgumentException if key is larger then 80 characters + * @exception IllegalStateException if this node has been removed + * @exception NullPointerException if key is null + */ + abstract public byte[] getByteArray(String key, byte[] defaultVal); + + /** + * Convenience method for getting the given entry as a double. + * When the string representation of the requested entry can be decoded + * with Double.parseDouble() then that double is returned, + * otherwise the given default double value is returned. + * + * @exception IllegalArgumentException if key is larger then 80 characters + * @exception IllegalStateException if this node has been removed + * @exception NullPointerException if key is null + */ + abstract public double getDouble(String key, double defaultVal); + + /** + * Convenience method for getting the given entry as a float. + * When the string representation of the requested entry can be decoded + * with Float.parseFloat() then that float is returned, + * otherwise the given default float value is returned. + * + * @exception IllegalArgumentException if key is larger then 80 characters + * @exception IllegalStateException if this node has been removed + * @exception NullPointerException if key is null + */ + abstract public float getFloat(String key, float defaultVal); + + /** + * Convenience method for getting the given entry as an integer. + * When the string representation of the requested entry can be decoded + * with Integer.parseInt() then that integer is returned, + * otherwise the given default integer value is returned. + * + * @exception IllegalArgumentException if key is larger then 80 characters + * @exception IllegalStateException if this node has been removed + * @exception NullPointerException if key is null + */ + abstract public int getInt(String key, int defaultVal); + + /** + * Convenience method for getting the given entry as a long. + * When the string representation of the requested entry can be decoded + * with Long.parseLong() then that long is returned, + * otherwise the given default long value is returned. + * + * @exception IllegalArgumentException if key is larger then 80 characters + * @exception IllegalStateException if this node has been removed + * @exception NullPointerException if key is null + */ + abstract public long getLong(String key, long defaultVal); + + /** + * Sets the value of the given preferences entry for this node. + * Key and value cannot be null, the key cannot exceed 80 characters + * and the value cannot exceed 8192 characters. + *

                + * The result will be immediatly visible in this VM, but may not be + * immediatly written to the backing store. + * + * @exception NullPointerException if either key or value are null + * @exception IllegalArgumentException if either key or value are to large + * @exception IllegalStateException when this node has been removed + */ + abstract public void put(String key, String value); + + /** + * Convenience method for setting the given entry as a boolean. + * The boolean is converted with Boolean.toString(value) + * and then stored in the preference entry as that string. + * + * @exception NullPointerException if key is null + * @exception IllegalArgumentException if the key length is to large + * @exception IllegalStateException when this node has been removed + */ + abstract public void putBoolean(String key, boolean value); + + /** + * Convenience method for setting the given entry as an array of bytes. + * The byte array is converted to a Base64 encoded string + * and then stored in the preference entry as that string. + *

                + * Note that a byte array encoded as a Base64 string will be about 1.3 + * times larger then the original length of the byte array, which means + * that the byte array may not be larger about 6 KB. + * + * @exception NullPointerException if either key or value are null + * @exception IllegalArgumentException if either key or value are to large + * @exception IllegalStateException when this node has been removed + */ + abstract public void putByteArray(String key, byte[] value); + + /** + * Convenience method for setting the given entry as a double. + * The double is converted with Double.toString(double) + * and then stored in the preference entry as that string. + * + * @exception NullPointerException if the key is null + * @exception IllegalArgumentException if the key length is to large + * @exception IllegalStateException when this node has been removed + */ + abstract public void putDouble(String key, double value); + + /** + * Convenience method for setting the given entry as a float. + * The float is converted with Float.toString(float) + * and then stored in the preference entry as that string. + * + * @exception NullPointerException if the key is null + * @exception IllegalArgumentException if the key length is to large + * @exception IllegalStateException when this node has been removed + */ + abstract public void putFloat(String key, float value); + + /** + * Convenience method for setting the given entry as an integer. + * The integer is converted with Integer.toString(int) + * and then stored in the preference entry as that string. + * + * @exception NullPointerException if the key is null + * @exception IllegalArgumentException if the key length is to large + * @exception IllegalStateException when this node has been removed + */ + abstract public void putInt(String key, int value); + + /** + * Convenience method for setting the given entry as a long. + * The long is converted with Long.toString(long) + * and then stored in the preference entry as that string. + * + * @exception NullPointerException if the key is null + * @exception IllegalArgumentException if the key length is to large + * @exception IllegalStateException when this node has been removed + */ + abstract public void putLong(String key, long value); + + /** + * Removes the preferences entry from this preferences node. + *

                + * The result will be immediatly visible in this VM, but may not be + * immediatly written to the backing store. + * + * @exception NullPointerException if the key is null + * @exception IllegalArgumentException if the key length is to large + * @exception IllegalStateException when this node has been removed + */ + abstract public void remove(String key); + + // abstract methods (preference node manipulation) + + /** + * Removes all entries from this preferences node. May need access to the + * backing store to get and clear all entries. + *

                + * The result will be immediatly visible in this VM, but may not be + * immediatly written to the backing store. + * + * @exception BackingStoreException when the backing store cannot be + * reached + * @exception IllegalStateException if this node has been removed + */ + abstract public void clear() throws BackingStoreException; + + /** + * Writes all preference changes on this and any subnode that have not + * yet been written to the backing store. This has no effect on the + * preference entries in this VM, but it makes sure that all changes + * are visible to other programs (other VMs might need to call the + * sync() method to actually see the changes to the backing + * store. + * + * @exception BackingStoreException when the backing store cannot be + * reached + * @exception IllegalStateException if this node has been removed + */ + abstract public void flush() throws BackingStoreException; + + /** + * Writes and reads all preference changes to and from this and any + * subnodes. This makes sure that all local changes are written to the + * backing store and that all changes to the backing store are visible + * in this preference node (and all subnodes). + * + * @exception BackingStoreException when the backing store cannot be + * reached + * @exception IllegalStateException if this node has been removed + */ + abstract public void sync() throws BackingStoreException; + + /** + * Removes this and all subnodes from the backing store and clears all + * entries. After removal this instance will not be useable (except for + * a few methods that don't throw a InvalidStateException), + * even when a new node with the same path name is created this instance + * will not be usable again. The root (system or user) may never be removed. + *

                + * Note that according to the specification an implementation may delay + * removal of the node from the backing store till the flush() + * method is called. But the flush() method may throw a + * IllegalStateException when the node has been removed. + * So most implementations will actually remove the node and any subnodes + * from the backing store immediatly. + * + * @exception BackingStoreException when the backing store cannot be + * reached + * @exception IllegalStateException if this node has already been removed + * @exception UnsupportedOperationException if this is a root node + */ + abstract public void removeNode() throws BackingStoreException; + + // abstract methods (listeners) + + abstract public void addNodeChangeListener(NodeChangeListener listener); + + abstract public void addPreferenceChangeListener + (PreferenceChangeListener listener); + + abstract public void removeNodeChangeListener(NodeChangeListener listener); + + abstract public void removePreferenceChangeListener + (PreferenceChangeListener listener); + + } + diff -Nrc3pad gcc-3.3.3/libjava/java/util/Properties.java gcc-3.4.0/libjava/java/util/Properties.java *** gcc-3.3.3/libjava/java/util/Properties.java 2003-03-02 22:37:01.000000000 +0000 --- gcc-3.4.0/libjava/java/util/Properties.java 2003-08-26 22:42:36.000000000 +0000 *************** import java.io.OutputStreamWriter; *** 56,62 **** * here. This extends the example given in ListResourceBundle. * Create a file MyResource_de.properties with the following contents * and put it in the CLASSPATH. (The character ! * \u00e4 is the german ä) * *

                s1=3
                --- 56,62 ----
                   * here.  This extends the example given in ListResourceBundle.
                   * Create a file MyResource_de.properties with the following contents
                   * and put it in the CLASSPATH.  (The character
                !  * \u00e4 is the german umlaut)
                   *
                   * 
                  
                s1=3
                diff -Nrc3pad gcc-3.3.3/libjava/java/util/PropertyPermission.java gcc-3.4.0/libjava/java/util/PropertyPermission.java
                *** gcc-3.3.3/libjava/java/util/PropertyPermission.java	2002-06-18 15:39:58.000000000 +0000
                --- gcc-3.4.0/libjava/java/util/PropertyPermission.java	2003-04-29 11:36:34.000000000 +0000
                *************** public final class PropertyPermission ex
                *** 121,127 ****
                      super(name);
                      if (actions == null)
                        throw new IllegalArgumentException();
                !     setActions(actions.toLowerCase());
                    }
                  
                    /**
                --- 121,127 ----
                      super(name);
                      if (actions == null)
                        throw new IllegalArgumentException();
                !     setActions(actions);
                    }
                  
                    /**
                *************** public final class PropertyPermission ex
                *** 134,147 ****
                     */
                    private void setActions(String str)
                    {
                      if ("read".equals(str))
                        actions = READ;
                      else if ("write".equals(str))
                        actions = WRITE;
                      else if ("read,write".equals(str) || "write,read".equals(str))
                        actions = READ | WRITE;
                !     else
                !       throw new IllegalArgumentException("illegal action " + str);
                    }
                  
                    /**
                --- 134,170 ----
                     */
                    private void setActions(String str)
                    {
                +     // Initialising the class java.util.Locale ...
                +     //    tries to initialise the Locale.defaultLocale static
                +     //    which calls System.getProperty, 
                +     //    which calls SecurityManager.checkPropertiesAccess,
                +     //    which creates a PropertyPermission with action "read,write",
                +     //    which calls setActions("read,write").
                +     // If we now were to call toLowerCase on 'str',
                +     //    this would call Locale.getDefault() which returns null
                +     //       because Locale.defaultLocale hasn't been set yet
                +     //    then toLowerCase will fail with a null pointer exception.
                +     // 
                +     // The solution is to take a punt on 'str' being lower case, and
                +     // test accordingly.  If that fails, we convert 'str' to lower case 
                +     // and try the tests again.
                      if ("read".equals(str))
                        actions = READ;
                      else if ("write".equals(str))
                        actions = WRITE;
                      else if ("read,write".equals(str) || "write,read".equals(str))
                        actions = READ | WRITE;
                !     else {
                !       String lstr = str.toLowerCase();
                !       if ("read".equals(lstr))
                ! 	actions = READ;
                !       else if ("write".equals(lstr))
                ! 	actions = WRITE;
                !       else if ("read,write".equals(lstr) || "write,read".equals(lstr))
                ! 	actions = READ | WRITE;
                !       else
                ! 	throw new IllegalArgumentException("illegal action " + str);
                !     }
                    }
                  
                    /**
                diff -Nrc3pad gcc-3.3.3/libjava/java/util/PropertyResourceBundle.java gcc-3.4.0/libjava/java/util/PropertyResourceBundle.java
                *** gcc-3.3.3/libjava/java/util/PropertyResourceBundle.java	2002-06-18 15:39:59.000000000 +0000
                --- gcc-3.4.0/libjava/java/util/PropertyResourceBundle.java	2003-08-26 22:42:37.000000000 +0000
                *************** package java.util;
                *** 40,46 ****
                  
                  import java.io.IOException;
                  import java.io.InputStream;
                - import gnu.java.util.DoubleEnumeration;
                  
                  /**
                   * This class is a concrete ResourceBundle that gets it
                --- 40,45 ----
                *************** import gnu.java.util.DoubleEnumeration;
                *** 62,69 ****
                   * An example of a properties file for the german language is given
                   * here. This extends the example given in ListResourceBundle.
                   * Create a file MyResource_de.properties with the following contents
                !  * and put it in the CLASSPATH. (The char \u00e4 is the
                !  * german ä)
                   *
                   *
                  
                --- 61,68 ----
                   * An example of a properties file for the german language is given
                   * here. This extends the example given in ListResourceBundle.
                   * Create a file MyResource_de.properties with the following contents
                !  * and put it in the CLASSPATH. (The char \u00e4 is the
                !  * german umlaut)
                   *
                   *
                  
                diff -Nrc3pad gcc-3.3.3/libjava/java/util/regex/Matcher.java gcc-3.4.0/libjava/java/util/regex/Matcher.java
                *** gcc-3.3.3/libjava/java/util/regex/Matcher.java	2002-09-18 10:15:52.000000000 +0000
                --- gcc-3.4.0/libjava/java/util/regex/Matcher.java	2003-04-30 08:57:04.000000000 +0000
                *************** this exception to your version of the li
                *** 35,51 ****
                  obligated to do so.  If you do not wish to do so, delete this
                  exception statement from your version. */
                  
                ! // Stub class until java.util.regex is implemented.
                  package java.util.regex;
                  
                  public class Matcher
                  {
                !   public String replaceFirst(String replacement)
                    {
                !     throw new InternalError("Not implemented yet");
                    }
                !   public String replaceAll(String replacement)
                    {
                !     throw new InternalError("Not implemented yet");
                    }
                  }
                --- 35,222 ----
                  obligated to do so.  If you do not wish to do so, delete this
                  exception statement from your version. */
                  
                ! 
                  package java.util.regex;
                  
                + /**
                +  * @author Michael Koch
                +  * @since 1.4
                +  */
                  public class Matcher
                  {
                !   private Pattern pattern;
                !   
                !   /**
                !    * @param sb The target string buffer
                !    * @param replacement The replacement string
                !    *
                !    * @exception IllegalStateException If no match has yet been attempted,
                !    * or if the previous match operation failed
                !    * @exception IndexOutOfBoundsException If the replacement string refers
                !    * to a capturing group that does not exist in the pattern
                !    */
                !   public Matcher appendReplacement (StringBuffer sb, String replacement)
                !     throws IllegalStateException
                    {
                !     throw new Error("Not implemented");
                    }
                ! 
                !   /**
                !    * @param sb The target string buffer
                !    */
                !   public StringBuffer appendTail (StringBuffer sb)
                    {
                !     throw new Error("Not implemented");
                !   }
                !  
                !   /**
                !    * @exception IllegalStateException If no match has yet been attempted,
                !    * or if the previous match operation failed
                !    */
                !   public int end ()
                !     throws IllegalStateException
                !   {
                !     throw new Error ("Not implemented");
                !   }
                !   
                !   /**
                !    * @param group The index of a capturing group in this matcher's pattern
                !    *
                !    * @exception IllegalStateException If no match has yet been attempted,
                !    * or if the previous match operation failed
                !    * @exception IndexOutOfBoundsException If the replacement string refers
                !    * to a capturing group that does not exist in the pattern
                !    */
                !   public int end (int group)
                !     throws IllegalStateException
                !   {
                !     throw new Error ("Not implemented");
                !   }
                !  
                !   public boolean find ()
                !   {
                !     throw new Error ("Not implemented");
                !   }
                !   
                !   /**
                !    * @param start The index to start the new pattern matching
                !    *
                !    * @exception IndexOutOfBoundsException If the replacement string refers
                !    * to a capturing group that does not exist in the pattern
                !    */
                !   public boolean find (int start)
                !   {
                !     throw new Error ("Not implemented");
                !   }
                !  
                !   /**
                !    * @exception IllegalStateException If no match has yet been attempted,
                !    * or if the previous match operation failed
                !    */
                !   public String group ()
                !   {
                !     throw new Error ("Not implemented");
                !   }
                !   
                !   /**
                !    * @param group The index of a capturing group in this matcher's pattern
                !    *
                !    * @exception IllegalStateException If no match has yet been attempted,
                !    * or if the previous match operation failed
                !    * @exception IndexOutOfBoundsException If the replacement string refers
                !    * to a capturing group that does not exist in the pattern
                !    */
                !   public String group (int group)
                !     throws IllegalStateException
                !   {
                !     throw new Error ("Not implemented");
                !   }
                ! 
                !   /**
                !    * @param replacement The replacement string
                !    */
                !   public String replaceFirst (String replacement)
                !   {
                !     throw new Error ("Not implemented");
                !   }
                ! 
                !   /**
                !    * @param replacement The replacement string
                !    */
                !   public String replaceAll (String replacement)
                !   {
                !     throw new Error ("Not implemented");
                !   }
                !   
                !   public int groupCount ()
                !   {
                !     throw new Error("Not implemented");
                !   }
                !  
                !   public boolean lookingAt ()
                !   {
                !     throw new Error("Not implemented");
                !   }
                !   
                !   /**
                !    * Attempts to match the entire input sequence against the pattern. 
                !    *
                !    * If the match succeeds then more information can be obtained via the
                !    * start, end, and group methods.
                !    *
                !    * @see #start
                !    * @see #end
                !    * @see #group
                !    */
                !   public boolean matches ()
                !   {
                !     throw new Error("Not implemented");
                !   }
                !   
                !   /**
                !    * Returns the Pattern that is interpreted by this Matcher
                !    */
                !   public Pattern pattern ()
                !   {
                !     return pattern;
                !   }
                !   
                !   public Matcher reset ()
                !   {
                !     throw new Error ("Not implemented");
                !   }
                !   
                !   /**
                !    * @param input The new input character sequence
                !    */
                !   public Matcher reset (CharSequence input)
                !   {
                !     throw new Error ("Not implemented");
                !   }
                !   
                !   /**
                !    * @param group The index of a capturing group in this matcher's pattern
                !    *
                !    * @exception IllegalStateException If no match has yet been attempted,
                !    * or if the previous match operation failed
                !    */
                !   public int start ()
                !     throws IllegalStateException
                !   {
                !     throw new Error("Not implemented");
                !   }
                ! 
                !   /**
                !    * @param group The index of a capturing group in this matcher's pattern
                !    *
                !    * @exception IllegalStateException If no match has yet been attempted,
                !    * or if the previous match operation failed
                !    * @exception IndexOutOfBoundsException If the replacement string refers
                !    * to a capturing group that does not exist in the pattern
                !    */
                !   public int start (int group)
                !     throws IllegalStateException
                !   {
                !     throw new Error("Not implemented");
                    }
                  }
                diff -Nrc3pad gcc-3.3.3/libjava/java/util/regex/Pattern.java gcc-3.4.0/libjava/java/util/regex/Pattern.java
                *** gcc-3.3.3/libjava/java/util/regex/Pattern.java	2002-09-18 10:15:52.000000000 +0000
                --- gcc-3.4.0/libjava/java/util/regex/Pattern.java	2003-04-30 08:57:04.000000000 +0000
                *************** exception statement from your version. *
                *** 38,59 ****
                  // Stub class until java.util.regex is implemented.
                  package java.util.regex;
                  
                ! public class Pattern
                  {
                !   public static Pattern compile(String regex)
                    {
                !     throw new InternalError("Not implemented yet");
                    }
                !   public static boolean matches(String regex, CharSequence input) 
                    {
                !     throw new InternalError("Not implemented yet");
                    }
                !   public Matcher matcher(CharSequence input)
                    {
                !     throw new InternalError("Not implemented yet");
                    }
                !   public String[] split(CharSequence input, int limit)
                    {
                !     throw new InternalError("Not implemented yet");
                    }
                  }
                --- 38,151 ----
                  // Stub class until java.util.regex is implemented.
                  package java.util.regex;
                  
                ! import java.io.Serializable;
                ! 
                ! /**
                !  * @author Michael Koch
                !  * @since 1.4
                !  */
                ! public class Pattern implements Serializable
                  {
                !   private static final long serialVersionUID = 5073258162644648461L;
                !   
                !   public static final int CANON_EQ = 128;
                !   public static final int CASE_INSENSITIVE = 2;
                !   public static final int COMMENTS = 4;
                !   public static final int DOTALL = 32;
                !   public static final int MULTILINE = 8;
                !   public static final int UNICODE_CASE = 64;
                !   public static final int UNIX_LINES = 1;
                !   
                !   private String regex;
                !   private int flags;
                ! 
                !   private Pattern (String regex)
                !     throws PatternSyntaxException
                    {
                !     this (regex, 0);
                    }
                ! 
                !   private Pattern (String regex, int flags)
                !     throws PatternSyntaxException
                    {
                !     this.regex = regex;
                !     this.flags = flags;
                ! 
                !     throw new Error ("Not implemented");
                    }
                !  
                !   /**
                !    * @param regex The regular expression
                !    *
                !    * @exception PatternSyntaxException If the expression's syntax is invalid
                !    */
                !   public static Pattern compile (String regex)
                !     throws PatternSyntaxException
                    {
                !     throw new Error ("Not implemented");
                    }
                !   
                !   /**
                !    * @param regex The regular expression
                !    * @param flags The match flags, a bit mask
                !    *
                !    * @exception PatternSyntaxException If the expression's syntax is invalid
                !    * @exception IllegalArgumentException If bit values other than those
                !    * corresponding to the defined match flags are set in flags
                !    */
                !   public static Pattern compile (String regex, int flags)
                !     throws PatternSyntaxException
                    {
                !     // FIXME: check which flags are really accepted
                !     if ((flags & ~0xEF) != 0)
                !       throw new IllegalArgumentException ();
                !     
                !     return new Pattern (regex, flags); 
                !   }
                !   
                !   public int flags ()
                !   {
                !     return this.flags;
                !   }
                !   
                !   /**
                !    * @param regex The regular expression
                !    * @param input The character sequence to be matched
                !    *
                !    * @exception PatternSyntaxException If the expression's syntax is invalid
                !    */
                !   public static boolean matches (String regex, CharSequence input) 
                !   {
                !     throw new Error ("Not implemented");
                !   }
                !   
                !   /**
                !    * @param input The character sequence to be matched
                !    */
                !   public Matcher matcher (CharSequence input)
                !   {
                !     throw new Error ("Not implemented");
                !   }
                !   
                !   /**
                !    * @param input The character sequence to be matched
                !    */
                !   public String[] split (CharSequence input)
                !   {
                !     throw new Error ("Not implemented");
                !   }
                !   
                !   /**
                !    * @param input The character sequence to be matched
                !    * @param limit The result threshold
                !    */
                !   public String[] split (CharSequence input, int limit)
                !   {
                !     throw new Error ("Not implemented");
                !   }
                !   
                !   public String pattern ()
                !   {
                !     throw new Error ("Not implemented");
                    }
                  }
                diff -Nrc3pad gcc-3.3.3/libjava/java/util/regex/PatternSyntaxException.java gcc-3.4.0/libjava/java/util/regex/PatternSyntaxException.java
                *** gcc-3.3.3/libjava/java/util/regex/PatternSyntaxException.java	2002-09-18 10:15:52.000000000 +0000
                --- gcc-3.4.0/libjava/java/util/regex/PatternSyntaxException.java	2003-03-24 13:56:57.000000000 +0000
                *************** package java.util.regex;
                *** 44,49 ****
                --- 44,50 ----
                   */
                  public class PatternSyntaxException extends IllegalArgumentException
                  {
                +   private static final long serialVersionUID = -3864639126226059218L;
                  
                    /**
                     * Human readable escription of the syntax error.
                diff -Nrc3pad gcc-3.3.3/libjava/java/util/ResourceBundle.java gcc-3.4.0/libjava/java/util/ResourceBundle.java
                *** gcc-3.3.3/libjava/java/util/ResourceBundle.java	2002-12-08 23:38:02.000000000 +0000
                --- gcc-3.4.0/libjava/java/util/ResourceBundle.java	2003-04-29 11:36:34.000000000 +0000
                ***************
                *** 1,5 ****
                  /* ResourceBundle -- aids in loading resource bundles
                !    Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
                  
                  This file is part of GNU Classpath.
                  
                --- 1,5 ----
                  /* ResourceBundle -- aids in loading resource bundles
                !    Copyright (C) 1998, 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
                  
                  This file is part of GNU Classpath.
                  
                *************** public abstract class ResourceBundle
                *** 182,189 ****
                        catch (MissingResourceException ex)
                          {
                          }
                !     throw new MissingResourceException("Key not found",
                !                                        getClass().getName(), key);
                    }
                  
                    /**
                --- 182,190 ----
                        catch (MissingResourceException ex)
                          {
                          }
                !  
                !     throw new MissingResourceException("Key not found", getClass().getName(),
                ! 				       key);
                    }
                  
                    /**
                *************** public abstract class ResourceBundle
                *** 470,475 ****
                --- 471,477 ----
                      catch (Exception ex)
                        {
                          // ignore them all
                + 	foundBundle = null;
                        }
                      if (foundBundle == null)
                        {
                diff -Nrc3pad gcc-3.3.3/libjava/java/util/SimpleTimeZone.java gcc-3.4.0/libjava/java/util/SimpleTimeZone.java
                *** gcc-3.3.3/libjava/java/util/SimpleTimeZone.java	2002-06-18 15:40:00.000000000 +0000
                --- gcc-3.4.0/libjava/java/util/SimpleTimeZone.java	2003-12-19 11:01:05.000000000 +0000
                ***************
                *** 1,5 ****
                  /* java.util.SimpleTimeZone
                !    Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
                  
                  This file is part of GNU Classpath.
                  
                --- 1,5 ----
                  /* java.util.SimpleTimeZone
                !    Copyright (C) 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
                  
                  This file is part of GNU Classpath.
                  
                *************** exception statement from your version. *
                *** 38,45 ****
                  
                  package java.util;
                  
                - import java.text.DateFormatSymbols;
                - 
                  /**
                   * This class represents a simple time zone offset and handles
                   * daylight savings.  It can only handle one daylight savings rule, so
                --- 38,43 ----
                *************** public class SimpleTimeZone extends Time
                *** 88,93 ****
                --- 86,92 ----
                    private static final int DOW_IN_MONTH_MODE = 2;
                    private static final int DOW_GE_DOM_MODE = 3;
                    private static final int DOW_LE_DOM_MODE = 4;
                +   
                    /**
                     * The mode of the start rule. This takes one of the following values:
                     * 
                *************** public class SimpleTimeZone extends Time *** 391,397 **** * @param dayOfWeek The day of week where daylight savings start. * @param time The time in milliseconds standard time where daylight * savings start. ! * @see SimpleTimeZone */ public void setStartRule(int month, int day, int dayOfWeek, int time) { this.startMode = checkRule(month, day, dayOfWeek); --- 390,397 ---- * @param dayOfWeek The day of week where daylight savings start. * @param time The time in milliseconds standard time where daylight * savings start. ! * @see SimpleTimeZone ! */ public void setStartRule(int month, int day, int dayOfWeek, int time) { this.startMode = checkRule(month, day, dayOfWeek); *************** public class SimpleTimeZone extends Time *** 412,422 **** * * @param rawOffset The time offset from GMT. * @param id The identifier of this time zone. ! * @param Month The end month of daylight savings. * @param day A day in month, or a day of week in month. ! * @param DayOfWeek A day of week, when daylight savings ends. ! * @param Time A time in millis in standard time. ! * @see #setStartRule */ public void setEndRule(int month, int day, int dayOfWeek, int time) { this.endMode = checkRule(month, day, dayOfWeek); --- 412,423 ---- * * @param rawOffset The time offset from GMT. * @param id The identifier of this time zone. ! * @param month The end month of daylight savings. * @param day A day in month, or a day of week in month. ! * @param dayOfWeek A day of week, when daylight savings ends. ! * @param time A time in millis in standard time. ! * @see #setStartRule ! */ public void setEndRule(int month, int day, int dayOfWeek, int time) { this.endMode = checkRule(month, day, dayOfWeek); *************** public class SimpleTimeZone extends Time *** 488,494 **** /** * Returns the time zone offset to GMT in milliseconds, ignoring * day light savings. ! * @return the time zone offset. */ public int getRawOffset() { return rawOffset; --- 489,496 ---- /** * Returns the time zone offset to GMT in milliseconds, ignoring * day light savings. ! * @return the time zone offset. ! */ public int getRawOffset() { return rawOffset; *************** public class SimpleTimeZone extends Time *** 508,514 **** * milliseconds with respect to standard time. Typically this * is one hour, but for some time zones this may be half an our. * @return the daylight savings offset in milliseconds. ! * @since JDK1.1.4? */ public int getDSTSavings() { --- 510,517 ---- * milliseconds with respect to standard time. Typically this * is one hour, but for some time zones this may be half an our. * @return the daylight savings offset in milliseconds. ! * ! * @since 1.2 */ public int getDSTSavings() { *************** public class SimpleTimeZone extends Time *** 516,521 **** --- 519,540 ---- } /** + * Sets the daylight savings offset. This is a positive offset in + * milliseconds with respect to standard time. + * + * @param dstSavings the daylight savings offset in milliseconds. + * + * @since 1.2 + */ + public void setDSTSavings(int dstSavings) + { + if (dstSavings <= 0) + throw new IllegalArgumentException("illegal value for dstSavings"); + + this.dstSavings = dstSavings; + } + + /** * Returns if this time zone uses daylight savings time. * @return true, if we use daylight savings time, false otherwise. */ diff -Nrc3pad gcc-3.3.3/libjava/java/util/Timer.java gcc-3.4.0/libjava/java/util/Timer.java *** gcc-3.3.3/libjava/java/util/Timer.java 2002-03-03 11:02:04.000000000 +0000 --- gcc-3.4.0/libjava/java/util/Timer.java 2003-09-18 13:09:53.000000000 +0000 *************** public class Timer *** 601,607 **** * Tells the scheduler that the Timer task died * so there will be no more new tasks scheduled. */ ! protected void finalize() { queue.setNullOnEmpty(true); } --- 601,607 ---- * Tells the scheduler that the Timer task died * so there will be no more new tasks scheduled. */ ! protected void finalize() throws Throwable { queue.setNullOnEmpty(true); } diff -Nrc3pad gcc-3.3.3/libjava/java/util/TimeZone.java gcc-3.4.0/libjava/java/util/TimeZone.java *** gcc-3.3.3/libjava/java/util/TimeZone.java 2002-09-25 21:10:21.000000000 +0000 --- gcc-3.4.0/libjava/java/util/TimeZone.java 2003-12-18 16:43:02.000000000 +0000 *************** *** 1,5 **** /* java.util.TimeZone ! Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,6 ---- /* java.util.TimeZone ! Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ! Free Software Foundation, Inc. This file is part of GNU Classpath. *************** public abstract class TimeZone implement *** 80,774 **** /** * The default time zone, as returned by getDefault. */ ! private static TimeZone defaultZone; private static final long serialVersionUID = 3581463369166924961L; /** * Hashtable for timezones by ID. */ ! private static final Hashtable timezones = new Hashtable(); ! ! static ! { ! TimeZone tz; ! // Automatically generated by scripts/timezones.pl ! // XXX - Should we read this data from a file? ! tz = new SimpleTimeZone(-11000 * 3600, "MIT"); ! timezones.put("MIT", tz); ! timezones.put("Pacific/Apia", tz); ! timezones.put("Pacific/Midway", tz); ! timezones.put("Pacific/Niue", tz); ! timezones.put("Pacific/Pago_Pago", tz); ! tz = new SimpleTimeZone ! (-10000 * 3600, "America/Adak", ! Calendar.APRIL, 1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones.put("America/Adak", tz); ! tz = new SimpleTimeZone(-10000 * 3600, "HST"); ! timezones.put("HST", tz); ! timezones.put("Pacific/Fakaofo", tz); ! timezones.put("Pacific/Honolulu", tz); ! timezones.put("Pacific/Johnston", tz); ! timezones.put("Pacific/Rarotonga", tz); ! timezones.put("Pacific/Tahiti", tz); ! tz = new SimpleTimeZone(-9500 * 3600, "Pacific/Marquesas"); ! timezones.put("Pacific/Marquesas", tz); ! tz = new SimpleTimeZone ! (-9000 * 3600, "AST", ! Calendar.APRIL, 1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones.put("AST", tz); ! timezones.put("America/Anchorage", tz); ! timezones.put("America/Juneau", tz); ! timezones.put("America/Nome", tz); ! timezones.put("America/Yakutat", tz); ! tz = new SimpleTimeZone(-9000 * 3600, "Pacific/Gambier"); ! timezones.put("Pacific/Gambier", tz); ! tz = new SimpleTimeZone ! (-8000 * 3600, "PST", ! Calendar.APRIL, 1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones.put("PST", tz); ! timezones.put("PST8PDT", tz); ! timezones.put("America/Dawson", tz); ! timezones.put("America/Los_Angeles", tz); ! timezones.put("America/Tijuana", tz); ! timezones.put("America/Vancouver", tz); ! timezones.put("America/Whitehorse", tz); ! timezones.put("US/Pacific-New", tz); ! tz = new SimpleTimeZone(-8000 * 3600, "Pacific/Pitcairn"); ! timezones.put("Pacific/Pitcairn", tz); ! tz = new SimpleTimeZone ! (-7000 * 3600, "MST", ! Calendar.APRIL, 1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones.put("MST", tz); ! timezones.put("MST7MDT", tz); ! timezones.put("America/Boise", tz); ! timezones.put("America/Chihuahua", tz); ! timezones.put("America/Denver", tz); ! timezones.put("America/Edmonton", tz); ! timezones.put("America/Inuvik", tz); ! timezones.put("America/Mazatlan", tz); ! timezones.put("America/Shiprock", tz); ! timezones.put("America/Yellowknife", tz); ! tz = new SimpleTimeZone(-7000 * 3600, "MST7"); ! timezones.put("MST7", tz); ! timezones.put("PNT", tz); ! timezones.put("America/Dawson_Creek", tz); ! timezones.put("America/Hermosillo", tz); ! timezones.put("America/Phoenix", tz); ! tz = new SimpleTimeZone ! (-6000 * 3600, "CST", ! Calendar.APRIL, 1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones.put("CST", tz); ! timezones.put("CST6CDT", tz); ! timezones.put("America/Cambridge_Bay", tz); ! timezones.put("America/Cancun", tz); ! timezones.put("America/Chicago", tz); ! timezones.put("America/Menominee", tz); ! timezones.put("America/Merida", tz); ! timezones.put("America/Mexico_City", tz); ! timezones.put("America/Monterrey", tz); ! timezones.put("America/Rainy_River", tz); ! timezones.put("America/Winnipeg", tz); ! tz = new SimpleTimeZone(-6000 * 3600, "America/Belize"); ! timezones.put("America/Belize", tz); ! timezones.put("America/Costa_Rica", tz); ! timezones.put("America/El_Salvador", tz); ! timezones.put("America/Guatemala", tz); ! timezones.put("America/Managua", tz); ! timezones.put("America/Regina", tz); ! timezones.put("America/Swift_Current", tz); ! timezones.put("America/Tegucigalpa", tz); ! timezones.put("Pacific/Galapagos", tz); ! tz = new SimpleTimeZone ! (-6000 * 3600, "Pacific/Easter", ! Calendar.OCTOBER, 9, -Calendar.SUNDAY, 0 * 3600, ! Calendar.MARCH, 9, -Calendar.SUNDAY, 0 * 3600); ! timezones.put("Pacific/Easter", tz); ! tz = new SimpleTimeZone ! (-5000 * 3600, "America/Grand_Turk", ! Calendar.APRIL, 1, Calendar.SUNDAY, 0 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 0 * 3600); ! timezones.put("America/Grand_Turk", tz); ! timezones.put("America/Havana", tz); ! tz = new SimpleTimeZone(-5000 * 3600, "EST5"); ! timezones.put("EST5", tz); ! timezones.put("IET", tz); ! timezones.put("America/Bogota", tz); ! timezones.put("America/Cayman", tz); ! timezones.put("America/Eirunepe", tz); ! timezones.put("America/Guayaquil", tz); ! timezones.put("America/Indiana/Indianapolis", tz); ! timezones.put("America/Indiana/Knox", tz); ! timezones.put("America/Indiana/Marengo", tz); ! timezones.put("America/Indiana/Vevay", tz); ! timezones.put("America/Indianapolis", tz); ! timezones.put("America/Iqaluit", tz); ! timezones.put("America/Jamaica", tz); ! timezones.put("America/Lima", tz); ! timezones.put("America/Panama", tz); ! timezones.put("America/Pangnirtung", tz); ! timezones.put("America/Port-au-Prince", tz); ! timezones.put("America/Porto_Acre", tz); ! timezones.put("America/Rankin_Inlet", tz); ! tz = new SimpleTimeZone ! (-5000 * 3600, "EST", ! Calendar.APRIL, 1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones.put("EST", tz); ! timezones.put("EST5EDT", tz); ! timezones.put("America/Detroit", tz); ! timezones.put("America/Kentucky/Louisville", tz); ! timezones.put("America/Kentucky/Monticello", tz); ! timezones.put("America/Louisville", tz); ! timezones.put("America/Montreal", tz); ! timezones.put("America/Nassau", tz); ! timezones.put("America/New_York", tz); ! timezones.put("America/Nipigon", tz); ! timezones.put("America/Thunder_Bay", tz); ! tz = new SimpleTimeZone(-4000 * 3600, "PRT"); ! timezones.put("PRT", tz); ! timezones.put("America/Anguilla", tz); ! timezones.put("America/Antigua", tz); ! timezones.put("America/Aruba", tz); ! timezones.put("America/Barbados", tz); ! timezones.put("America/Boa_Vista", tz); ! timezones.put("America/Caracas", tz); ! timezones.put("America/Curacao", tz); ! timezones.put("America/Dominica", tz); ! timezones.put("America/Grenada", tz); ! timezones.put("America/Guadeloupe", tz); ! timezones.put("America/Guyana", tz); ! timezones.put("America/La_Paz", tz); ! timezones.put("America/Manaus", tz); ! timezones.put("America/Martinique", tz); ! timezones.put("America/Montserrat", tz); ! timezones.put("America/Port_of_Spain", tz); ! timezones.put("America/Porto_Velho", tz); ! timezones.put("America/Puerto_Rico", tz); ! timezones.put("America/Santo_Domingo", tz); ! timezones.put("America/St_Kitts", tz); ! timezones.put("America/St_Lucia", tz); ! timezones.put("America/St_Thomas", tz); ! timezones.put("America/St_Vincent", tz); ! timezones.put("America/Tortola", tz); ! tz = new SimpleTimeZone ! (-4000 * 3600, "America/Asuncion", ! Calendar.OCTOBER, 1, Calendar.SUNDAY, 0 * 3600, ! Calendar.FEBRUARY, -1, Calendar.SUNDAY, 0 * 3600); ! timezones.put("America/Asuncion", tz); ! tz = new SimpleTimeZone ! (-4000 * 3600, "America/Cuiaba", ! Calendar.OCTOBER, 2, Calendar.SUNDAY, 0 * 3600, ! Calendar.FEBRUARY, 3, Calendar.SUNDAY, 0 * 3600); ! timezones.put("America/Cuiaba", tz); ! tz = new SimpleTimeZone ! (-4000 * 3600, "America/Goose_Bay", ! Calendar.APRIL, 1, Calendar.SUNDAY, 60000, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 60000); ! timezones.put("America/Goose_Bay", tz); ! tz = new SimpleTimeZone ! (-4000 * 3600, "America/Glace_Bay", ! Calendar.APRIL, 1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones.put("America/Glace_Bay", tz); ! timezones.put("America/Halifax", tz); ! timezones.put("America/Thule", tz); ! timezones.put("Atlantic/Bermuda", tz); ! tz = new SimpleTimeZone ! (-4000 * 3600, "America/Santiago", ! Calendar.OCTOBER, 9, -Calendar.SUNDAY, 0 * 3600, ! Calendar.MARCH, 9, -Calendar.SUNDAY, 0 * 3600); ! timezones.put("America/Santiago", tz); ! timezones.put("Antarctica/Palmer", tz); ! tz = new SimpleTimeZone ! (-4000 * 3600, "Atlantic/Stanley", ! Calendar.SEPTEMBER, 2, Calendar.SUNDAY, 0 * 3600, ! Calendar.APRIL, 16, -Calendar.SUNDAY, 0 * 3600); ! timezones.put("Atlantic/Stanley", tz); ! tz = new SimpleTimeZone ! (-3500 * 3600, "CNT", ! Calendar.APRIL, 1, Calendar.SUNDAY, 60000, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 60000); ! timezones.put("CNT", tz); ! timezones.put("America/St_Johns", tz); ! tz = new SimpleTimeZone ! (-3000 * 3600, "America/Araguaina", ! Calendar.OCTOBER, 2, Calendar.SUNDAY, 0 * 3600, ! Calendar.FEBRUARY, 3, Calendar.SUNDAY, 0 * 3600); ! timezones.put("America/Araguaina", tz); ! timezones.put("America/Sao_Paulo", tz); ! tz = new SimpleTimeZone(-3000 * 3600, "AGT"); ! timezones.put("AGT", tz); ! timezones.put("America/Belem", tz); ! timezones.put("America/Buenos_Aires", tz); ! timezones.put("America/Catamarca", tz); ! timezones.put("America/Cayenne", tz); ! timezones.put("America/Cordoba", tz); ! timezones.put("America/Fortaleza", tz); ! timezones.put("America/Jujuy", tz); ! timezones.put("America/Maceio", tz); ! timezones.put("America/Mendoza", tz); ! timezones.put("America/Montevideo", tz); ! timezones.put("America/Paramaribo", tz); ! timezones.put("America/Recife", tz); ! timezones.put("America/Rosario", tz); ! tz = new SimpleTimeZone ! (-3000 * 3600, "America/Godthab", ! Calendar.MARCH, 30, -Calendar.SATURDAY, 22000 * 3600, ! Calendar.OCTOBER, 30, -Calendar.SATURDAY, 22000 * 3600); ! timezones.put("America/Godthab", tz); ! tz = new SimpleTimeZone ! (-3000 * 3600, "America/Miquelon", ! Calendar.APRIL, 1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones.put("America/Miquelon", tz); ! tz = new SimpleTimeZone(-2000 * 3600, "America/Noronha"); ! timezones.put("America/Noronha", tz); ! timezones.put("Atlantic/South_Georgia", tz); ! tz = new SimpleTimeZone ! (-1000 * 3600, "America/Scoresbysund", ! Calendar.MARCH, -1, Calendar.SUNDAY, 0 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 0 * 3600); ! timezones.put("America/Scoresbysund", tz); ! timezones.put("Atlantic/Azores", tz); ! tz = new SimpleTimeZone(-1000 * 3600, "Atlantic/Cape_Verde"); ! timezones.put("Atlantic/Cape_Verde", tz); ! timezones.put("Atlantic/Jan_Mayen", tz); ! tz = new SimpleTimeZone(0 * 3600, "GMT"); ! timezones.put("GMT", tz); ! timezones.put("UTC", tz); ! timezones.put("Africa/Abidjan", tz); ! timezones.put("Africa/Accra", tz); ! timezones.put("Africa/Bamako", tz); ! timezones.put("Africa/Banjul", tz); ! timezones.put("Africa/Bissau", tz); ! timezones.put("Africa/Casablanca", tz); ! timezones.put("Africa/Conakry", tz); ! timezones.put("Africa/Dakar", tz); ! timezones.put("Africa/El_Aaiun", tz); ! timezones.put("Africa/Freetown", tz); ! timezones.put("Africa/Lome", tz); ! timezones.put("Africa/Monrovia", tz); ! timezones.put("Africa/Nouakchott", tz); ! timezones.put("Africa/Ouagadougou", tz); ! timezones.put("Africa/Sao_Tome", tz); ! timezones.put("Africa/Timbuktu", tz); ! timezones.put("Atlantic/Reykjavik", tz); ! timezones.put("Atlantic/St_Helena", tz); ! timezones.put("Europe/Belfast", tz); ! timezones.put("Europe/Dublin", tz); ! timezones.put("Europe/London", tz); ! tz = new SimpleTimeZone ! (0 * 3600, "WET", ! Calendar.MARCH, -1, Calendar.SUNDAY, 1000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 1000 * 3600); ! timezones.put("WET", tz); ! timezones.put("Atlantic/Canary", tz); ! timezones.put("Atlantic/Faeroe", tz); ! timezones.put("Atlantic/Madeira", tz); ! timezones.put("Europe/Lisbon", tz); ! tz = new SimpleTimeZone(1000 * 3600, "Africa/Algiers"); ! timezones.put("Africa/Algiers", tz); ! timezones.put("Africa/Bangui", tz); ! timezones.put("Africa/Brazzaville", tz); ! timezones.put("Africa/Douala", tz); ! timezones.put("Africa/Kinshasa", tz); ! timezones.put("Africa/Lagos", tz); ! timezones.put("Africa/Libreville", tz); ! timezones.put("Africa/Luanda", tz); ! timezones.put("Africa/Malabo", tz); ! timezones.put("Africa/Ndjamena", tz); ! timezones.put("Africa/Niamey", tz); ! timezones.put("Africa/Porto-Novo", tz); ! timezones.put("Africa/Tunis", tz); ! tz = new SimpleTimeZone ! (1000 * 3600, "Africa/Windhoek", ! Calendar.SEPTEMBER, 1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.APRIL, 1, Calendar.SUNDAY, 2000 * 3600); ! timezones.put("Africa/Windhoek", tz); ! tz = new SimpleTimeZone ! (1000 * 3600, "CET", ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones.put("CET", tz); ! timezones.put("ECT", tz); ! timezones.put("MET", tz); ! timezones.put("Africa/Ceuta", tz); ! timezones.put("Arctic/Longyearbyen", tz); ! timezones.put("Europe/Amsterdam", tz); ! timezones.put("Europe/Andorra", tz); ! timezones.put("Europe/Belgrade", tz); ! timezones.put("Europe/Berlin", tz); ! timezones.put("Europe/Bratislava", tz); ! timezones.put("Europe/Brussels", tz); ! timezones.put("Europe/Budapest", tz); ! timezones.put("Europe/Copenhagen", tz); ! timezones.put("Europe/Gibraltar", tz); ! timezones.put("Europe/Ljubljana", tz); ! timezones.put("Europe/Luxembourg", tz); ! timezones.put("Europe/Madrid", tz); ! timezones.put("Europe/Malta", tz); ! timezones.put("Europe/Monaco", tz); ! timezones.put("Europe/Oslo", tz); ! timezones.put("Europe/Paris", tz); ! timezones.put("Europe/Prague", tz); ! timezones.put("Europe/Rome", tz); ! timezones.put("Europe/San_Marino", tz); ! timezones.put("Europe/Sarajevo", tz); ! timezones.put("Europe/Skopje", tz); ! timezones.put("Europe/Stockholm", tz); ! timezones.put("Europe/Tirane", tz); ! timezones.put("Europe/Vaduz", tz); ! timezones.put("Europe/Vatican", tz); ! timezones.put("Europe/Vienna", tz); ! timezones.put("Europe/Warsaw", tz); ! timezones.put("Europe/Zagreb", tz); ! timezones.put("Europe/Zurich", tz); ! tz = new SimpleTimeZone ! (2000 * 3600, "ART", ! Calendar.APRIL, -1, Calendar.FRIDAY, 0 * 3600, ! Calendar.SEPTEMBER, -1, Calendar.THURSDAY, 23000 * 3600); ! timezones.put("ART", tz); ! timezones.put("Africa/Cairo", tz); ! tz = new SimpleTimeZone(2000 * 3600, "CAT"); ! timezones.put("CAT", tz); ! timezones.put("Africa/Blantyre", tz); ! timezones.put("Africa/Bujumbura", tz); ! timezones.put("Africa/Gaborone", tz); ! timezones.put("Africa/Harare", tz); ! timezones.put("Africa/Johannesburg", tz); ! timezones.put("Africa/Kigali", tz); ! timezones.put("Africa/Lubumbashi", tz); ! timezones.put("Africa/Lusaka", tz); ! timezones.put("Africa/Maputo", tz); ! timezones.put("Africa/Maseru", tz); ! timezones.put("Africa/Mbabane", tz); ! timezones.put("Africa/Tripoli", tz); ! timezones.put("Europe/Riga", tz); ! timezones.put("Europe/Tallinn", tz); ! timezones.put("Europe/Vilnius", tz); ! tz = new SimpleTimeZone ! (2000 * 3600, "Asia/Amman", ! Calendar.MARCH, -1, Calendar.THURSDAY, 0 * 3600, ! Calendar.SEPTEMBER, -1, Calendar.THURSDAY, 0 * 3600); ! timezones.put("Asia/Amman", tz); ! tz = new SimpleTimeZone ! (2000 * 3600, "Asia/Beirut", ! Calendar.MARCH, -1, Calendar.SUNDAY, 0 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 0 * 3600); ! timezones.put("Asia/Beirut", tz); ! tz = new SimpleTimeZone ! (2000 * 3600, "Asia/Damascus", ! Calendar.APRIL, 1, 0, 0 * 3600, ! Calendar.OCTOBER, 1, 0, 0 * 3600); ! timezones.put("Asia/Damascus", tz); ! tz = new SimpleTimeZone ! (2000 * 3600, "Asia/Gaza", ! Calendar.APRIL, 3, Calendar.FRIDAY, 0 * 3600, ! Calendar.OCTOBER, 3, Calendar.FRIDAY, 0 * 3600); ! timezones.put("Asia/Gaza", tz); ! tz = new SimpleTimeZone ! (2000 * 3600, "Asia/Jerusalem", ! Calendar.APRIL, 1, 0, 1000 * 3600, ! Calendar.OCTOBER, 1, 0, 1000 * 3600); ! timezones.put("Asia/Jerusalem", tz); ! tz = new SimpleTimeZone ! (2000 * 3600, "EET", ! Calendar.MARCH, -1, Calendar.SUNDAY, 3000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 3000 * 3600); ! timezones.put("EET", tz); ! timezones.put("Asia/Istanbul", tz); ! timezones.put("Asia/Nicosia", tz); ! timezones.put("Europe/Athens", tz); ! timezones.put("Europe/Bucharest", tz); ! timezones.put("Europe/Chisinau", tz); ! timezones.put("Europe/Helsinki", tz); ! timezones.put("Europe/Istanbul", tz); ! timezones.put("Europe/Kiev", tz); ! timezones.put("Europe/Nicosia", tz); ! timezones.put("Europe/Simferopol", tz); ! timezones.put("Europe/Sofia", tz); ! timezones.put("Europe/Uzhgorod", tz); ! timezones.put("Europe/Zaporozhye", tz); ! tz = new SimpleTimeZone ! (2000 * 3600, "Europe/Kaliningrad", ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones.put("Europe/Kaliningrad", tz); ! timezones.put("Europe/Minsk", tz); ! tz = new SimpleTimeZone ! (3000 * 3600, "Asia/Baghdad", ! Calendar.APRIL, 1, 0, 3000 * 3600, ! Calendar.OCTOBER, 1, 0, 3000 * 3600); ! timezones.put("Asia/Baghdad", tz); ! tz = new SimpleTimeZone ! (3000 * 3600, "Europe/Moscow", ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones.put("Europe/Moscow", tz); ! timezones.put("Europe/Tiraspol", tz); ! tz = new SimpleTimeZone(3000 * 3600, "EAT"); ! timezones.put("EAT", tz); ! timezones.put("Africa/Addis_Ababa", tz); ! timezones.put("Africa/Asmera", tz); ! timezones.put("Africa/Dar_es_Salaam", tz); ! timezones.put("Africa/Djibouti", tz); ! timezones.put("Africa/Kampala", tz); ! timezones.put("Africa/Khartoum", tz); ! timezones.put("Africa/Mogadishu", tz); ! timezones.put("Africa/Nairobi", tz); ! timezones.put("Antarctica/Syowa", tz); ! timezones.put("Asia/Aden", tz); ! timezones.put("Asia/Bahrain", tz); ! timezones.put("Asia/Kuwait", tz); ! timezones.put("Asia/Qatar", tz); ! timezones.put("Asia/Riyadh", tz); ! timezones.put("Indian/Antananarivo", tz); ! timezones.put("Indian/Comoro", tz); ! timezones.put("Indian/Mayotte", tz); ! tz = new SimpleTimeZone(3500 * 3600, "Asia/Tehran"); ! timezones.put("Asia/Tehran", tz); ! tz = new SimpleTimeZone ! (4000 * 3600, "Asia/Baku", ! Calendar.MARCH, -1, Calendar.SUNDAY, 1000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 1000 * 3600); ! timezones.put("Asia/Baku", tz); ! tz = new SimpleTimeZone ! (4000 * 3600, "Asia/Aqtau", ! Calendar.MARCH, -1, Calendar.SUNDAY, 0 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 0 * 3600); ! timezones.put("Asia/Aqtau", tz); ! timezones.put("Asia/Tbilisi", tz); ! tz = new SimpleTimeZone ! (4000 * 3600, "Asia/Yerevan", ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones.put("Asia/Yerevan", tz); ! timezones.put("Europe/Samara", tz); ! tz = new SimpleTimeZone(4000 * 3600, "NET"); ! timezones.put("NET", tz); ! timezones.put("Asia/Dubai", tz); ! timezones.put("Asia/Muscat", tz); ! timezones.put("Indian/Mahe", tz); ! timezones.put("Indian/Mauritius", tz); ! timezones.put("Indian/Reunion", tz); ! tz = new SimpleTimeZone(4500 * 3600, "Asia/Kabul"); ! timezones.put("Asia/Kabul", tz); ! tz = new SimpleTimeZone ! (5000 * 3600, "Asia/Aqtobe", ! Calendar.MARCH, -1, Calendar.SUNDAY, 0 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 0 * 3600); ! timezones.put("Asia/Aqtobe", tz); ! tz = new SimpleTimeZone ! (5000 * 3600, "Asia/Bishkek", ! Calendar.MARCH, -1, Calendar.SUNDAY, 2500 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2500 * 3600); ! timezones.put("Asia/Bishkek", tz); ! tz = new SimpleTimeZone ! (5000 * 3600, "Asia/Yekaterinburg", ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones.put("Asia/Yekaterinburg", tz); ! tz = new SimpleTimeZone(5000 * 3600, "PLT"); ! timezones.put("PLT", tz); ! timezones.put("Asia/Ashgabat", tz); ! timezones.put("Asia/Dushanbe", tz); ! timezones.put("Asia/Karachi", tz); ! timezones.put("Asia/Samarkand", tz); ! timezones.put("Asia/Tashkent", tz); ! timezones.put("Indian/Chagos", tz); ! timezones.put("Indian/Kerguelen", tz); ! timezones.put("Indian/Maldives", tz); ! tz = new SimpleTimeZone(5500 * 3600, "IST"); ! timezones.put("IST", tz); ! timezones.put("Asia/Calcutta", tz); ! tz = new SimpleTimeZone(5750 * 3600, "Asia/Katmandu"); ! timezones.put("Asia/Katmandu", tz); ! tz = new SimpleTimeZone(6000 * 3600, "BST"); ! timezones.put("BST", tz); ! timezones.put("Antarctica/Mawson", tz); ! timezones.put("Asia/Colombo", tz); ! timezones.put("Asia/Dhaka", tz); ! timezones.put("Asia/Thimphu", tz); ! tz = new SimpleTimeZone ! (6000 * 3600, "Asia/Almaty", ! Calendar.MARCH, -1, Calendar.SUNDAY, 0 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 0 * 3600); ! timezones.put("Asia/Almaty", tz); ! tz = new SimpleTimeZone ! (6000 * 3600, "Asia/Novosibirsk", ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones.put("Asia/Novosibirsk", tz); ! timezones.put("Asia/Omsk", tz); ! tz = new SimpleTimeZone(6500 * 3600, "Asia/Rangoon"); ! timezones.put("Asia/Rangoon", tz); ! timezones.put("Indian/Cocos", tz); ! tz = new SimpleTimeZone(7000 * 3600, "VST"); ! timezones.put("VST", tz); ! timezones.put("Antarctica/Davis", tz); ! timezones.put("Asia/Bangkok", tz); ! timezones.put("Asia/Hovd", tz); ! timezones.put("Asia/Jakarta", tz); ! timezones.put("Asia/Phnom_Penh", tz); ! timezones.put("Asia/Saigon", tz); ! timezones.put("Asia/Vientiane", tz); ! timezones.put("Indian/Christmas", tz); ! tz = new SimpleTimeZone ! (7000 * 3600, "Asia/Krasnoyarsk", ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones.put("Asia/Krasnoyarsk", tz); ! tz = new SimpleTimeZone(8000 * 3600, "CTT"); ! timezones.put("CTT", tz); ! timezones.put("Antarctica/Casey", tz); ! timezones.put("Asia/Brunei", tz); ! timezones.put("Asia/Chungking", tz); ! timezones.put("Asia/Harbin", tz); ! timezones.put("Asia/Hong_Kong", tz); ! timezones.put("Asia/Kashgar", tz); ! timezones.put("Asia/Kuala_Lumpur", tz); ! timezones.put("Asia/Kuching", tz); ! timezones.put("Asia/Macao", tz); ! timezones.put("Asia/Manila", tz); ! timezones.put("Asia/Shanghai", tz); ! timezones.put("Asia/Singapore", tz); ! timezones.put("Asia/Taipei", tz); ! timezones.put("Asia/Ujung_Pandang", tz); ! timezones.put("Asia/Ulaanbaatar", tz); ! timezones.put("Asia/Urumqi", tz); ! timezones.put("Australia/Perth", tz); ! tz = new SimpleTimeZone ! (8000 * 3600, "Asia/Irkutsk", ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones.put("Asia/Irkutsk", tz); ! tz = new SimpleTimeZone(9000 * 3600, "JST"); ! timezones.put("JST", tz); ! timezones.put("Asia/Dili", tz); ! timezones.put("Asia/Jayapura", tz); ! timezones.put("Asia/Pyongyang", tz); ! timezones.put("Asia/Seoul", tz); ! timezones.put("Asia/Tokyo", tz); ! timezones.put("Pacific/Palau", tz); ! tz = new SimpleTimeZone ! (9000 * 3600, "Asia/Yakutsk", ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones.put("Asia/Yakutsk", tz); ! tz = new SimpleTimeZone ! (9500 * 3600, "Australia/Adelaide", ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones.put("Australia/Adelaide", tz); ! timezones.put("Australia/Broken_Hill", tz); ! tz = new SimpleTimeZone(9500 * 3600, "ACT"); ! timezones.put("ACT", tz); ! timezones.put("Australia/Darwin", tz); ! tz = new SimpleTimeZone(10000 * 3600, "Antarctica/DumontDUrville"); ! timezones.put("Antarctica/DumontDUrville", tz); ! timezones.put("Australia/Brisbane", tz); ! timezones.put("Australia/Lindeman", tz); ! timezones.put("Pacific/Guam", tz); ! timezones.put("Pacific/Port_Moresby", tz); ! timezones.put("Pacific/Saipan", tz); ! timezones.put("Pacific/Truk", tz); ! timezones.put("Pacific/Yap", tz); ! tz = new SimpleTimeZone ! (10000 * 3600, "Asia/Vladivostok", ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones.put("Asia/Vladivostok", tz); ! tz = new SimpleTimeZone ! (10000 * 3600, "Australia/Hobart", ! Calendar.OCTOBER, 1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones.put("Australia/Hobart", tz); ! tz = new SimpleTimeZone ! (10000 * 3600, "AET", ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones.put("AET", tz); ! timezones.put("Australia/Melbourne", tz); ! timezones.put("Australia/Sydney", tz); ! tz = new SimpleTimeZone ! (10500 * 3600, "Australia/Lord_Howe", ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, 500 * 3600); ! timezones.put("Australia/Lord_Howe", tz); ! tz = new SimpleTimeZone ! (11000 * 3600, "Asia/Magadan", ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones.put("Asia/Magadan", tz); ! tz = new SimpleTimeZone(11000 * 3600, "SST"); ! timezones.put("SST", tz); ! timezones.put("Pacific/Efate", tz); ! timezones.put("Pacific/Guadalcanal", tz); ! timezones.put("Pacific/Kosrae", tz); ! timezones.put("Pacific/Noumea", tz); ! timezones.put("Pacific/Ponape", tz); ! tz = new SimpleTimeZone(11500 * 3600, "Pacific/Norfolk"); ! timezones.put("Pacific/Norfolk", tz); ! tz = new SimpleTimeZone ! (12000 * 3600, "NST", ! Calendar.OCTOBER, 1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.MARCH, 3, Calendar.SUNDAY, 2000 * 3600); ! timezones.put("NST", tz); ! timezones.put("Antarctica/McMurdo", tz); ! timezones.put("Antarctica/South_Pole", tz); ! timezones.put("Pacific/Auckland", tz); ! tz = new SimpleTimeZone ! (12000 * 3600, "Asia/Anadyr", ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones.put("Asia/Anadyr", tz); ! timezones.put("Asia/Kamchatka", tz); ! tz = new SimpleTimeZone(12000 * 3600, "Pacific/Fiji"); ! timezones.put("Pacific/Fiji", tz); ! timezones.put("Pacific/Funafuti", tz); ! timezones.put("Pacific/Kwajalein", tz); ! timezones.put("Pacific/Majuro", tz); ! timezones.put("Pacific/Nauru", tz); ! timezones.put("Pacific/Tarawa", tz); ! timezones.put("Pacific/Wake", tz); ! timezones.put("Pacific/Wallis", tz); ! tz = new SimpleTimeZone ! (12750 * 3600, "Pacific/Chatham", ! Calendar.OCTOBER, 1, Calendar.SUNDAY, 2750 * 3600, ! Calendar.MARCH, 3, Calendar.SUNDAY, 2750 * 3600); ! timezones.put("Pacific/Chatham", tz); ! tz = new SimpleTimeZone(13000 * 3600, "Pacific/Enderbury"); ! timezones.put("Pacific/Enderbury", tz); ! timezones.put("Pacific/Tongatapu", tz); ! tz = new SimpleTimeZone(14000 * 3600, "Pacific/Kiritimati"); ! timezones.put("Pacific/Kiritimati", tz); ! } ! ! ! /* Look up default timezone */ ! static ! { ! if (Configuration.INIT_LOAD_LIBRARY) { ! System.loadLibrary("javautil"); ! } ! String tzid = System.getProperty("user.timezone"); ! ! if (tzid == null) ! tzid = getDefaultTimeZoneId(); ! ! if (tzid == null) ! tzid = "GMT"; ! defaultZone = getTimeZone(tzid); } /* This method returns us a time zone id string which is in the form . The GMT offset is in seconds, except where it is evenly divisible --- 81,789 ---- /** * The default time zone, as returned by getDefault. */ ! private static TimeZone defaultZone0; ! /* initialize this static field lazily to overhead if ! * it is not needed: ! */ ! private static synchronized TimeZone defaultZone() { ! /* Look up default timezone */ ! if (defaultZone0 == null) ! { ! if (Configuration.INIT_LOAD_LIBRARY) ! { ! System.loadLibrary("javautil"); ! } ! String tzid = System.getProperty("user.timezone"); ! ! if (tzid == null) ! tzid = getDefaultTimeZoneId(); ! ! if (tzid == null) ! tzid = "GMT"; ! ! defaultZone0 = getTimeZone(tzid); ! } ! return defaultZone0; ! } ! private static final long serialVersionUID = 3581463369166924961L; /** * Hashtable for timezones by ID. */ ! private static Hashtable timezones0; ! /* initialize this static field lazily to overhead if ! * it is not needed: ! */ ! private static synchronized Hashtable timezones() { ! if (timezones0==null) { ! Hashtable timezones = new Hashtable(); ! timezones0 = timezones; ! TimeZone tz; ! // Automatically generated by scripts/timezones.pl ! // XXX - Should we read this data from a file? ! tz = new SimpleTimeZone(-11000 * 3600, "MIT"); ! timezones0.put("MIT", tz); ! timezones0.put("Pacific/Apia", tz); ! timezones0.put("Pacific/Midway", tz); ! timezones0.put("Pacific/Niue", tz); ! timezones0.put("Pacific/Pago_Pago", tz); ! tz = new SimpleTimeZone ! (-10000 * 3600, "America/Adak", ! Calendar.APRIL, 1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones0.put("America/Adak", tz); ! tz = new SimpleTimeZone(-10000 * 3600, "HST"); ! timezones0.put("HST", tz); ! timezones0.put("Pacific/Fakaofo", tz); ! timezones0.put("Pacific/Honolulu", tz); ! timezones0.put("Pacific/Johnston", tz); ! timezones0.put("Pacific/Rarotonga", tz); ! timezones0.put("Pacific/Tahiti", tz); ! tz = new SimpleTimeZone(-9500 * 3600, "Pacific/Marquesas"); ! timezones0.put("Pacific/Marquesas", tz); ! tz = new SimpleTimeZone ! (-9000 * 3600, "AST", ! Calendar.APRIL, 1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones0.put("AST", tz); ! timezones0.put("America/Anchorage", tz); ! timezones0.put("America/Juneau", tz); ! timezones0.put("America/Nome", tz); ! timezones0.put("America/Yakutat", tz); ! tz = new SimpleTimeZone(-9000 * 3600, "Pacific/Gambier"); ! timezones0.put("Pacific/Gambier", tz); ! tz = new SimpleTimeZone ! (-8000 * 3600, "PST", ! Calendar.APRIL, 1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones0.put("PST", tz); ! timezones0.put("PST8PDT", tz); ! timezones0.put("America/Dawson", tz); ! timezones0.put("America/Los_Angeles", tz); ! timezones0.put("America/Tijuana", tz); ! timezones0.put("America/Vancouver", tz); ! timezones0.put("America/Whitehorse", tz); ! timezones0.put("US/Pacific-New", tz); ! tz = new SimpleTimeZone(-8000 * 3600, "Pacific/Pitcairn"); ! timezones0.put("Pacific/Pitcairn", tz); ! tz = new SimpleTimeZone ! (-7000 * 3600, "MST", ! Calendar.APRIL, 1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones0.put("MST", tz); ! timezones0.put("MST7MDT", tz); ! timezones0.put("America/Boise", tz); ! timezones0.put("America/Chihuahua", tz); ! timezones0.put("America/Denver", tz); ! timezones0.put("America/Edmonton", tz); ! timezones0.put("America/Inuvik", tz); ! timezones0.put("America/Mazatlan", tz); ! timezones0.put("America/Shiprock", tz); ! timezones0.put("America/Yellowknife", tz); ! tz = new SimpleTimeZone(-7000 * 3600, "MST7"); ! timezones0.put("MST7", tz); ! timezones0.put("PNT", tz); ! timezones0.put("America/Dawson_Creek", tz); ! timezones0.put("America/Hermosillo", tz); ! timezones0.put("America/Phoenix", tz); ! tz = new SimpleTimeZone ! (-6000 * 3600, "CST", ! Calendar.APRIL, 1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones0.put("CST", tz); ! timezones0.put("CST6CDT", tz); ! timezones0.put("America/Cambridge_Bay", tz); ! timezones0.put("America/Cancun", tz); ! timezones0.put("America/Chicago", tz); ! timezones0.put("America/Menominee", tz); ! timezones0.put("America/Merida", tz); ! timezones0.put("America/Mexico_City", tz); ! timezones0.put("America/Monterrey", tz); ! timezones0.put("America/Rainy_River", tz); ! timezones0.put("America/Winnipeg", tz); ! tz = new SimpleTimeZone(-6000 * 3600, "America/Belize"); ! timezones0.put("America/Belize", tz); ! timezones0.put("America/Costa_Rica", tz); ! timezones0.put("America/El_Salvador", tz); ! timezones0.put("America/Guatemala", tz); ! timezones0.put("America/Managua", tz); ! timezones0.put("America/Regina", tz); ! timezones0.put("America/Swift_Current", tz); ! timezones0.put("America/Tegucigalpa", tz); ! timezones0.put("Pacific/Galapagos", tz); ! tz = new SimpleTimeZone ! (-6000 * 3600, "Pacific/Easter", ! Calendar.OCTOBER, 9, -Calendar.SUNDAY, 0 * 3600, ! Calendar.MARCH, 9, -Calendar.SUNDAY, 0 * 3600); ! timezones0.put("Pacific/Easter", tz); ! tz = new SimpleTimeZone ! (-5000 * 3600, "America/Grand_Turk", ! Calendar.APRIL, 1, Calendar.SUNDAY, 0 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 0 * 3600); ! timezones0.put("America/Grand_Turk", tz); ! timezones0.put("America/Havana", tz); ! tz = new SimpleTimeZone(-5000 * 3600, "EST5"); ! timezones0.put("EST5", tz); ! timezones0.put("IET", tz); ! timezones0.put("America/Bogota", tz); ! timezones0.put("America/Cayman", tz); ! timezones0.put("America/Eirunepe", tz); ! timezones0.put("America/Guayaquil", tz); ! timezones0.put("America/Indiana/Indianapolis", tz); ! timezones0.put("America/Indiana/Knox", tz); ! timezones0.put("America/Indiana/Marengo", tz); ! timezones0.put("America/Indiana/Vevay", tz); ! timezones0.put("America/Indianapolis", tz); ! timezones0.put("America/Iqaluit", tz); ! timezones0.put("America/Jamaica", tz); ! timezones0.put("America/Lima", tz); ! timezones0.put("America/Panama", tz); ! timezones0.put("America/Pangnirtung", tz); ! timezones0.put("America/Port-au-Prince", tz); ! timezones0.put("America/Porto_Acre", tz); ! timezones0.put("America/Rankin_Inlet", tz); ! tz = new SimpleTimeZone ! (-5000 * 3600, "EST", ! Calendar.APRIL, 1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones0.put("EST", tz); ! timezones0.put("EST5EDT", tz); ! timezones0.put("America/Detroit", tz); ! timezones0.put("America/Kentucky/Louisville", tz); ! timezones0.put("America/Kentucky/Monticello", tz); ! timezones0.put("America/Louisville", tz); ! timezones0.put("America/Montreal", tz); ! timezones0.put("America/Nassau", tz); ! timezones0.put("America/New_York", tz); ! timezones0.put("America/Nipigon", tz); ! timezones0.put("America/Thunder_Bay", tz); ! tz = new SimpleTimeZone(-4000 * 3600, "PRT"); ! timezones0.put("PRT", tz); ! timezones0.put("America/Anguilla", tz); ! timezones0.put("America/Antigua", tz); ! timezones0.put("America/Aruba", tz); ! timezones0.put("America/Barbados", tz); ! timezones0.put("America/Boa_Vista", tz); ! timezones0.put("America/Caracas", tz); ! timezones0.put("America/Curacao", tz); ! timezones0.put("America/Dominica", tz); ! timezones0.put("America/Grenada", tz); ! timezones0.put("America/Guadeloupe", tz); ! timezones0.put("America/Guyana", tz); ! timezones0.put("America/La_Paz", tz); ! timezones0.put("America/Manaus", tz); ! timezones0.put("America/Martinique", tz); ! timezones0.put("America/Montserrat", tz); ! timezones0.put("America/Port_of_Spain", tz); ! timezones0.put("America/Porto_Velho", tz); ! timezones0.put("America/Puerto_Rico", tz); ! timezones0.put("America/Santo_Domingo", tz); ! timezones0.put("America/St_Kitts", tz); ! timezones0.put("America/St_Lucia", tz); ! timezones0.put("America/St_Thomas", tz); ! timezones0.put("America/St_Vincent", tz); ! timezones0.put("America/Tortola", tz); ! tz = new SimpleTimeZone ! (-4000 * 3600, "America/Asuncion", ! Calendar.OCTOBER, 1, Calendar.SUNDAY, 0 * 3600, ! Calendar.FEBRUARY, -1, Calendar.SUNDAY, 0 * 3600); ! timezones0.put("America/Asuncion", tz); ! tz = new SimpleTimeZone ! (-4000 * 3600, "America/Cuiaba", ! Calendar.OCTOBER, 2, Calendar.SUNDAY, 0 * 3600, ! Calendar.FEBRUARY, 3, Calendar.SUNDAY, 0 * 3600); ! timezones0.put("America/Cuiaba", tz); ! tz = new SimpleTimeZone ! (-4000 * 3600, "America/Goose_Bay", ! Calendar.APRIL, 1, Calendar.SUNDAY, 60000, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 60000); ! timezones0.put("America/Goose_Bay", tz); ! tz = new SimpleTimeZone ! (-4000 * 3600, "America/Glace_Bay", ! Calendar.APRIL, 1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones0.put("America/Glace_Bay", tz); ! timezones0.put("America/Halifax", tz); ! timezones0.put("America/Thule", tz); ! timezones0.put("Atlantic/Bermuda", tz); ! tz = new SimpleTimeZone ! (-4000 * 3600, "America/Santiago", ! Calendar.OCTOBER, 9, -Calendar.SUNDAY, 0 * 3600, ! Calendar.MARCH, 9, -Calendar.SUNDAY, 0 * 3600); ! timezones0.put("America/Santiago", tz); ! timezones0.put("Antarctica/Palmer", tz); ! tz = new SimpleTimeZone ! (-4000 * 3600, "Atlantic/Stanley", ! Calendar.SEPTEMBER, 2, Calendar.SUNDAY, 0 * 3600, ! Calendar.APRIL, 16, -Calendar.SUNDAY, 0 * 3600); ! timezones0.put("Atlantic/Stanley", tz); ! tz = new SimpleTimeZone ! (-3500 * 3600, "CNT", ! Calendar.APRIL, 1, Calendar.SUNDAY, 60000, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 60000); ! timezones0.put("CNT", tz); ! timezones0.put("America/St_Johns", tz); ! tz = new SimpleTimeZone ! (-3000 * 3600, "America/Araguaina", ! Calendar.OCTOBER, 2, Calendar.SUNDAY, 0 * 3600, ! Calendar.FEBRUARY, 3, Calendar.SUNDAY, 0 * 3600); ! timezones0.put("America/Araguaina", tz); ! timezones0.put("America/Sao_Paulo", tz); ! tz = new SimpleTimeZone(-3000 * 3600, "AGT"); ! timezones0.put("AGT", tz); ! timezones0.put("America/Belem", tz); ! timezones0.put("America/Buenos_Aires", tz); ! timezones0.put("America/Catamarca", tz); ! timezones0.put("America/Cayenne", tz); ! timezones0.put("America/Cordoba", tz); ! timezones0.put("America/Fortaleza", tz); ! timezones0.put("America/Jujuy", tz); ! timezones0.put("America/Maceio", tz); ! timezones0.put("America/Mendoza", tz); ! timezones0.put("America/Montevideo", tz); ! timezones0.put("America/Paramaribo", tz); ! timezones0.put("America/Recife", tz); ! timezones0.put("America/Rosario", tz); ! tz = new SimpleTimeZone ! (-3000 * 3600, "America/Godthab", ! Calendar.MARCH, 30, -Calendar.SATURDAY, 22000 * 3600, ! Calendar.OCTOBER, 30, -Calendar.SATURDAY, 22000 * 3600); ! timezones0.put("America/Godthab", tz); ! tz = new SimpleTimeZone ! (-3000 * 3600, "America/Miquelon", ! Calendar.APRIL, 1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones0.put("America/Miquelon", tz); ! tz = new SimpleTimeZone(-2000 * 3600, "America/Noronha"); ! timezones0.put("America/Noronha", tz); ! timezones0.put("Atlantic/South_Georgia", tz); ! tz = new SimpleTimeZone ! (-1000 * 3600, "America/Scoresbysund", ! Calendar.MARCH, -1, Calendar.SUNDAY, 0 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 0 * 3600); ! timezones0.put("America/Scoresbysund", tz); ! timezones0.put("Atlantic/Azores", tz); ! tz = new SimpleTimeZone(-1000 * 3600, "Atlantic/Cape_Verde"); ! timezones0.put("Atlantic/Cape_Verde", tz); ! timezones0.put("Atlantic/Jan_Mayen", tz); ! tz = new SimpleTimeZone(0 * 3600, "GMT"); ! timezones0.put("GMT", tz); ! timezones0.put("UTC", tz); ! timezones0.put("Africa/Abidjan", tz); ! timezones0.put("Africa/Accra", tz); ! timezones0.put("Africa/Bamako", tz); ! timezones0.put("Africa/Banjul", tz); ! timezones0.put("Africa/Bissau", tz); ! timezones0.put("Africa/Casablanca", tz); ! timezones0.put("Africa/Conakry", tz); ! timezones0.put("Africa/Dakar", tz); ! timezones0.put("Africa/El_Aaiun", tz); ! timezones0.put("Africa/Freetown", tz); ! timezones0.put("Africa/Lome", tz); ! timezones0.put("Africa/Monrovia", tz); ! timezones0.put("Africa/Nouakchott", tz); ! timezones0.put("Africa/Ouagadougou", tz); ! timezones0.put("Africa/Sao_Tome", tz); ! timezones0.put("Africa/Timbuktu", tz); ! timezones0.put("Atlantic/Reykjavik", tz); ! timezones0.put("Atlantic/St_Helena", tz); ! timezones0.put("Europe/Belfast", tz); ! timezones0.put("Europe/Dublin", tz); ! timezones0.put("Europe/London", tz); ! tz = new SimpleTimeZone ! (0 * 3600, "WET", ! Calendar.MARCH, -1, Calendar.SUNDAY, 1000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 1000 * 3600); ! timezones0.put("WET", tz); ! timezones0.put("Atlantic/Canary", tz); ! timezones0.put("Atlantic/Faeroe", tz); ! timezones0.put("Atlantic/Madeira", tz); ! timezones0.put("Europe/Lisbon", tz); ! tz = new SimpleTimeZone(1000 * 3600, "Africa/Algiers"); ! timezones0.put("Africa/Algiers", tz); ! timezones0.put("Africa/Bangui", tz); ! timezones0.put("Africa/Brazzaville", tz); ! timezones0.put("Africa/Douala", tz); ! timezones0.put("Africa/Kinshasa", tz); ! timezones0.put("Africa/Lagos", tz); ! timezones0.put("Africa/Libreville", tz); ! timezones0.put("Africa/Luanda", tz); ! timezones0.put("Africa/Malabo", tz); ! timezones0.put("Africa/Ndjamena", tz); ! timezones0.put("Africa/Niamey", tz); ! timezones0.put("Africa/Porto-Novo", tz); ! timezones0.put("Africa/Tunis", tz); ! tz = new SimpleTimeZone ! (1000 * 3600, "Africa/Windhoek", ! Calendar.SEPTEMBER, 1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.APRIL, 1, Calendar.SUNDAY, 2000 * 3600); ! timezones0.put("Africa/Windhoek", tz); ! tz = new SimpleTimeZone ! (1000 * 3600, "CET", ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones0.put("CET", tz); ! timezones0.put("ECT", tz); ! timezones0.put("MET", tz); ! timezones0.put("Africa/Ceuta", tz); ! timezones0.put("Arctic/Longyearbyen", tz); ! timezones0.put("Europe/Amsterdam", tz); ! timezones0.put("Europe/Andorra", tz); ! timezones0.put("Europe/Belgrade", tz); ! timezones0.put("Europe/Berlin", tz); ! timezones0.put("Europe/Bratislava", tz); ! timezones0.put("Europe/Brussels", tz); ! timezones0.put("Europe/Budapest", tz); ! timezones0.put("Europe/Copenhagen", tz); ! timezones0.put("Europe/Gibraltar", tz); ! timezones0.put("Europe/Ljubljana", tz); ! timezones0.put("Europe/Luxembourg", tz); ! timezones0.put("Europe/Madrid", tz); ! timezones0.put("Europe/Malta", tz); ! timezones0.put("Europe/Monaco", tz); ! timezones0.put("Europe/Oslo", tz); ! timezones0.put("Europe/Paris", tz); ! timezones0.put("Europe/Prague", tz); ! timezones0.put("Europe/Rome", tz); ! timezones0.put("Europe/San_Marino", tz); ! timezones0.put("Europe/Sarajevo", tz); ! timezones0.put("Europe/Skopje", tz); ! timezones0.put("Europe/Stockholm", tz); ! timezones0.put("Europe/Tirane", tz); ! timezones0.put("Europe/Vaduz", tz); ! timezones0.put("Europe/Vatican", tz); ! timezones0.put("Europe/Vienna", tz); ! timezones0.put("Europe/Warsaw", tz); ! timezones0.put("Europe/Zagreb", tz); ! timezones0.put("Europe/Zurich", tz); ! tz = new SimpleTimeZone ! (2000 * 3600, "ART", ! Calendar.APRIL, -1, Calendar.FRIDAY, 0 * 3600, ! Calendar.SEPTEMBER, -1, Calendar.THURSDAY, 23000 * 3600); ! timezones0.put("ART", tz); ! timezones0.put("Africa/Cairo", tz); ! tz = new SimpleTimeZone(2000 * 3600, "CAT"); ! timezones0.put("CAT", tz); ! timezones0.put("Africa/Blantyre", tz); ! timezones0.put("Africa/Bujumbura", tz); ! timezones0.put("Africa/Gaborone", tz); ! timezones0.put("Africa/Harare", tz); ! timezones0.put("Africa/Johannesburg", tz); ! timezones0.put("Africa/Kigali", tz); ! timezones0.put("Africa/Lubumbashi", tz); ! timezones0.put("Africa/Lusaka", tz); ! timezones0.put("Africa/Maputo", tz); ! timezones0.put("Africa/Maseru", tz); ! timezones0.put("Africa/Mbabane", tz); ! timezones0.put("Africa/Tripoli", tz); ! timezones0.put("Europe/Riga", tz); ! timezones0.put("Europe/Tallinn", tz); ! timezones0.put("Europe/Vilnius", tz); ! tz = new SimpleTimeZone ! (2000 * 3600, "Asia/Amman", ! Calendar.MARCH, -1, Calendar.THURSDAY, 0 * 3600, ! Calendar.SEPTEMBER, -1, Calendar.THURSDAY, 0 * 3600); ! timezones0.put("Asia/Amman", tz); ! tz = new SimpleTimeZone ! (2000 * 3600, "Asia/Beirut", ! Calendar.MARCH, -1, Calendar.SUNDAY, 0 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 0 * 3600); ! timezones0.put("Asia/Beirut", tz); ! tz = new SimpleTimeZone ! (2000 * 3600, "Asia/Damascus", ! Calendar.APRIL, 1, 0, 0 * 3600, ! Calendar.OCTOBER, 1, 0, 0 * 3600); ! timezones0.put("Asia/Damascus", tz); ! tz = new SimpleTimeZone ! (2000 * 3600, "Asia/Gaza", ! Calendar.APRIL, 3, Calendar.FRIDAY, 0 * 3600, ! Calendar.OCTOBER, 3, Calendar.FRIDAY, 0 * 3600); ! timezones0.put("Asia/Gaza", tz); ! tz = new SimpleTimeZone ! (2000 * 3600, "Asia/Jerusalem", ! Calendar.APRIL, 1, 0, 1000 * 3600, ! Calendar.OCTOBER, 1, 0, 1000 * 3600); ! timezones0.put("Asia/Jerusalem", tz); ! tz = new SimpleTimeZone ! (2000 * 3600, "EET", ! Calendar.MARCH, -1, Calendar.SUNDAY, 3000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 3000 * 3600); ! timezones0.put("EET", tz); ! timezones0.put("Asia/Istanbul", tz); ! timezones0.put("Asia/Nicosia", tz); ! timezones0.put("Europe/Athens", tz); ! timezones0.put("Europe/Bucharest", tz); ! timezones0.put("Europe/Chisinau", tz); ! timezones0.put("Europe/Helsinki", tz); ! timezones0.put("Europe/Istanbul", tz); ! timezones0.put("Europe/Kiev", tz); ! timezones0.put("Europe/Nicosia", tz); ! timezones0.put("Europe/Simferopol", tz); ! timezones0.put("Europe/Sofia", tz); ! timezones0.put("Europe/Uzhgorod", tz); ! timezones0.put("Europe/Zaporozhye", tz); ! tz = new SimpleTimeZone ! (2000 * 3600, "Europe/Kaliningrad", ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones0.put("Europe/Kaliningrad", tz); ! timezones0.put("Europe/Minsk", tz); ! tz = new SimpleTimeZone ! (3000 * 3600, "Asia/Baghdad", ! Calendar.APRIL, 1, 0, 3000 * 3600, ! Calendar.OCTOBER, 1, 0, 3000 * 3600); ! timezones0.put("Asia/Baghdad", tz); ! tz = new SimpleTimeZone ! (3000 * 3600, "Europe/Moscow", ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones0.put("Europe/Moscow", tz); ! timezones0.put("Europe/Tiraspol", tz); ! tz = new SimpleTimeZone(3000 * 3600, "EAT"); ! timezones0.put("EAT", tz); ! timezones0.put("Africa/Addis_Ababa", tz); ! timezones0.put("Africa/Asmera", tz); ! timezones0.put("Africa/Dar_es_Salaam", tz); ! timezones0.put("Africa/Djibouti", tz); ! timezones0.put("Africa/Kampala", tz); ! timezones0.put("Africa/Khartoum", tz); ! timezones0.put("Africa/Mogadishu", tz); ! timezones0.put("Africa/Nairobi", tz); ! timezones0.put("Antarctica/Syowa", tz); ! timezones0.put("Asia/Aden", tz); ! timezones0.put("Asia/Bahrain", tz); ! timezones0.put("Asia/Kuwait", tz); ! timezones0.put("Asia/Qatar", tz); ! timezones0.put("Asia/Riyadh", tz); ! timezones0.put("Indian/Antananarivo", tz); ! timezones0.put("Indian/Comoro", tz); ! timezones0.put("Indian/Mayotte", tz); ! tz = new SimpleTimeZone(3500 * 3600, "Asia/Tehran"); ! timezones0.put("Asia/Tehran", tz); ! tz = new SimpleTimeZone ! (4000 * 3600, "Asia/Baku", ! Calendar.MARCH, -1, Calendar.SUNDAY, 1000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 1000 * 3600); ! timezones0.put("Asia/Baku", tz); ! tz = new SimpleTimeZone ! (4000 * 3600, "Asia/Aqtau", ! Calendar.MARCH, -1, Calendar.SUNDAY, 0 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 0 * 3600); ! timezones0.put("Asia/Aqtau", tz); ! timezones0.put("Asia/Tbilisi", tz); ! tz = new SimpleTimeZone ! (4000 * 3600, "Asia/Yerevan", ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones0.put("Asia/Yerevan", tz); ! timezones0.put("Europe/Samara", tz); ! tz = new SimpleTimeZone(4000 * 3600, "NET"); ! timezones0.put("NET", tz); ! timezones0.put("Asia/Dubai", tz); ! timezones0.put("Asia/Muscat", tz); ! timezones0.put("Indian/Mahe", tz); ! timezones0.put("Indian/Mauritius", tz); ! timezones0.put("Indian/Reunion", tz); ! tz = new SimpleTimeZone(4500 * 3600, "Asia/Kabul"); ! timezones0.put("Asia/Kabul", tz); ! tz = new SimpleTimeZone ! (5000 * 3600, "Asia/Aqtobe", ! Calendar.MARCH, -1, Calendar.SUNDAY, 0 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 0 * 3600); ! timezones0.put("Asia/Aqtobe", tz); ! tz = new SimpleTimeZone ! (5000 * 3600, "Asia/Bishkek", ! Calendar.MARCH, -1, Calendar.SUNDAY, 2500 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2500 * 3600); ! timezones0.put("Asia/Bishkek", tz); ! tz = new SimpleTimeZone ! (5000 * 3600, "Asia/Yekaterinburg", ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones0.put("Asia/Yekaterinburg", tz); ! tz = new SimpleTimeZone(5000 * 3600, "PLT"); ! timezones0.put("PLT", tz); ! timezones0.put("Asia/Ashgabat", tz); ! timezones0.put("Asia/Dushanbe", tz); ! timezones0.put("Asia/Karachi", tz); ! timezones0.put("Asia/Samarkand", tz); ! timezones0.put("Asia/Tashkent", tz); ! timezones0.put("Indian/Chagos", tz); ! timezones0.put("Indian/Kerguelen", tz); ! timezones0.put("Indian/Maldives", tz); ! tz = new SimpleTimeZone(5500 * 3600, "IST"); ! timezones0.put("IST", tz); ! timezones0.put("Asia/Calcutta", tz); ! tz = new SimpleTimeZone(5750 * 3600, "Asia/Katmandu"); ! timezones0.put("Asia/Katmandu", tz); ! tz = new SimpleTimeZone(6000 * 3600, "BST"); ! timezones0.put("BST", tz); ! timezones0.put("Antarctica/Mawson", tz); ! timezones0.put("Asia/Colombo", tz); ! timezones0.put("Asia/Dhaka", tz); ! timezones0.put("Asia/Thimphu", tz); ! tz = new SimpleTimeZone ! (6000 * 3600, "Asia/Almaty", ! Calendar.MARCH, -1, Calendar.SUNDAY, 0 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 0 * 3600); ! timezones0.put("Asia/Almaty", tz); ! tz = new SimpleTimeZone ! (6000 * 3600, "Asia/Novosibirsk", ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones0.put("Asia/Novosibirsk", tz); ! timezones0.put("Asia/Omsk", tz); ! tz = new SimpleTimeZone(6500 * 3600, "Asia/Rangoon"); ! timezones0.put("Asia/Rangoon", tz); ! timezones0.put("Indian/Cocos", tz); ! tz = new SimpleTimeZone(7000 * 3600, "VST"); ! timezones0.put("VST", tz); ! timezones0.put("Antarctica/Davis", tz); ! timezones0.put("Asia/Bangkok", tz); ! timezones0.put("Asia/Hovd", tz); ! timezones0.put("Asia/Jakarta", tz); ! timezones0.put("Asia/Phnom_Penh", tz); ! timezones0.put("Asia/Saigon", tz); ! timezones0.put("Asia/Vientiane", tz); ! timezones0.put("Indian/Christmas", tz); ! tz = new SimpleTimeZone ! (7000 * 3600, "Asia/Krasnoyarsk", ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones0.put("Asia/Krasnoyarsk", tz); ! tz = new SimpleTimeZone(8000 * 3600, "CTT"); ! timezones0.put("CTT", tz); ! timezones0.put("Antarctica/Casey", tz); ! timezones0.put("Asia/Brunei", tz); ! timezones0.put("Asia/Chungking", tz); ! timezones0.put("Asia/Harbin", tz); ! timezones0.put("Asia/Hong_Kong", tz); ! timezones0.put("Asia/Kashgar", tz); ! timezones0.put("Asia/Kuala_Lumpur", tz); ! timezones0.put("Asia/Kuching", tz); ! timezones0.put("Asia/Macao", tz); ! timezones0.put("Asia/Manila", tz); ! timezones0.put("Asia/Shanghai", tz); ! timezones0.put("Asia/Singapore", tz); ! timezones0.put("Asia/Taipei", tz); ! timezones0.put("Asia/Ujung_Pandang", tz); ! timezones0.put("Asia/Ulaanbaatar", tz); ! timezones0.put("Asia/Urumqi", tz); ! timezones0.put("Australia/Perth", tz); ! tz = new SimpleTimeZone ! (8000 * 3600, "Asia/Irkutsk", ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones0.put("Asia/Irkutsk", tz); ! tz = new SimpleTimeZone(9000 * 3600, "JST"); ! timezones0.put("JST", tz); ! timezones0.put("Asia/Dili", tz); ! timezones0.put("Asia/Jayapura", tz); ! timezones0.put("Asia/Pyongyang", tz); ! timezones0.put("Asia/Seoul", tz); ! timezones0.put("Asia/Tokyo", tz); ! timezones0.put("Pacific/Palau", tz); ! tz = new SimpleTimeZone ! (9000 * 3600, "Asia/Yakutsk", ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones0.put("Asia/Yakutsk", tz); ! tz = new SimpleTimeZone ! (9500 * 3600, "Australia/Adelaide", ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones0.put("Australia/Adelaide", tz); ! timezones0.put("Australia/Broken_Hill", tz); ! tz = new SimpleTimeZone(9500 * 3600, "ACT"); ! timezones0.put("ACT", tz); ! timezones0.put("Australia/Darwin", tz); ! tz = new SimpleTimeZone(10000 * 3600, "Antarctica/DumontDUrville"); ! timezones0.put("Antarctica/DumontDUrville", tz); ! timezones0.put("Australia/Brisbane", tz); ! timezones0.put("Australia/Lindeman", tz); ! timezones0.put("Pacific/Guam", tz); ! timezones0.put("Pacific/Port_Moresby", tz); ! timezones0.put("Pacific/Saipan", tz); ! timezones0.put("Pacific/Truk", tz); ! timezones0.put("Pacific/Yap", tz); ! tz = new SimpleTimeZone ! (10000 * 3600, "Asia/Vladivostok", ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones0.put("Asia/Vladivostok", tz); ! tz = new SimpleTimeZone ! (10000 * 3600, "Australia/Hobart", ! Calendar.OCTOBER, 1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones0.put("Australia/Hobart", tz); ! tz = new SimpleTimeZone ! (10000 * 3600, "AET", ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones0.put("AET", tz); ! timezones0.put("Australia/Melbourne", tz); ! timezones0.put("Australia/Sydney", tz); ! tz = new SimpleTimeZone ! (10500 * 3600, "Australia/Lord_Howe", ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, 500 * 3600); ! timezones0.put("Australia/Lord_Howe", tz); ! tz = new SimpleTimeZone ! (11000 * 3600, "Asia/Magadan", ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones0.put("Asia/Magadan", tz); ! tz = new SimpleTimeZone(11000 * 3600, "SST"); ! timezones0.put("SST", tz); ! timezones0.put("Pacific/Efate", tz); ! timezones0.put("Pacific/Guadalcanal", tz); ! timezones0.put("Pacific/Kosrae", tz); ! timezones0.put("Pacific/Noumea", tz); ! timezones0.put("Pacific/Ponape", tz); ! tz = new SimpleTimeZone(11500 * 3600, "Pacific/Norfolk"); ! timezones0.put("Pacific/Norfolk", tz); ! tz = new SimpleTimeZone ! (12000 * 3600, "NST", ! Calendar.OCTOBER, 1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.MARCH, 3, Calendar.SUNDAY, 2000 * 3600); ! timezones0.put("NST", tz); ! timezones0.put("Antarctica/McMurdo", tz); ! timezones0.put("Antarctica/South_Pole", tz); ! timezones0.put("Pacific/Auckland", tz); ! tz = new SimpleTimeZone ! (12000 * 3600, "Asia/Anadyr", ! Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, ! Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); ! timezones0.put("Asia/Anadyr", tz); ! timezones0.put("Asia/Kamchatka", tz); ! tz = new SimpleTimeZone(12000 * 3600, "Pacific/Fiji"); ! timezones0.put("Pacific/Fiji", tz); ! timezones0.put("Pacific/Funafuti", tz); ! timezones0.put("Pacific/Kwajalein", tz); ! timezones0.put("Pacific/Majuro", tz); ! timezones0.put("Pacific/Nauru", tz); ! timezones0.put("Pacific/Tarawa", tz); ! timezones0.put("Pacific/Wake", tz); ! timezones0.put("Pacific/Wallis", tz); ! tz = new SimpleTimeZone ! (12750 * 3600, "Pacific/Chatham", ! Calendar.OCTOBER, 1, Calendar.SUNDAY, 2750 * 3600, ! Calendar.MARCH, 3, Calendar.SUNDAY, 2750 * 3600); ! timezones0.put("Pacific/Chatham", tz); ! tz = new SimpleTimeZone(13000 * 3600, "Pacific/Enderbury"); ! timezones0.put("Pacific/Enderbury", tz); ! timezones0.put("Pacific/Tongatapu", tz); ! tz = new SimpleTimeZone(14000 * 3600, "Pacific/Kiritimati"); ! timezones0.put("Pacific/Kiritimati", tz); ! } ! return timezones0; } + /* This method returns us a time zone id string which is in the form . The GMT offset is in seconds, except where it is evenly divisible *************** public abstract class TimeZone implement *** 796,801 **** --- 811,831 ---- int day, int dayOfWeek, int milliseconds); /** + * Get the time zone offset for the specified date, modified in case of + * daylight savings. This is the offset to add to UTC to get the local + * time. + * @param date the date represented in millisecends + * since January 1, 1970 00:00:00 GMT. + * @since 1.4 + */ + public int getOffset(long date) + { + return (inDaylightTime(new Date(date)) + ? getRawOffset() + getDSTSavings() + : getRawOffset()); + } + + /** * Gets the time zone offset, ignoring daylight savings. This is * the offset to add to UTC to get the local time. * @return the time zone offset in milliseconds. *************** public abstract class TimeZone implement *** 986,992 **** public static TimeZone getTimeZone(String ID) { // First check timezones hash ! TimeZone tz = (TimeZone) timezones.get(ID); if (tz != null) { if (tz.getID().equals(ID)) --- 1016,1022 ---- public static TimeZone getTimeZone(String ID) { // First check timezones hash ! TimeZone tz = (TimeZone) timezones().get(ID); if (tz != null) { if (tz.getID().equals(ID)) *************** public abstract class TimeZone implement *** 999,1005 **** // We also save the alias, so that we return the same // object again if getTimeZone is called with the same // alias. ! timezones.put(ID, tz); return tz; } --- 1029,1035 ---- // We also save the alias, so that we return the same // object again if getTimeZone is called with the same // alias. ! timezones().put(ID, tz); return tz; } *************** public abstract class TimeZone implement *** 1074,1080 **** public static String[] getAvailableIDs(int rawOffset) { int count = 0; ! Iterator iter = timezones.entrySet().iterator(); while (iter.hasNext()) { // Don't iterate the values, since we want to count --- 1104,1110 ---- public static String[] getAvailableIDs(int rawOffset) { int count = 0; ! Iterator iter = timezones().entrySet().iterator(); while (iter.hasNext()) { // Don't iterate the values, since we want to count *************** public abstract class TimeZone implement *** 1086,1092 **** String[] ids = new String[count]; count = 0; ! iter = timezones.entrySet().iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); --- 1116,1122 ---- String[] ids = new String[count]; count = 0; ! iter = timezones().entrySet().iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); *************** public abstract class TimeZone implement *** 1103,1109 **** public static String[] getAvailableIDs() { return (String[]) ! timezones.keySet().toArray(new String[timezones.size()]); } /** --- 1133,1139 ---- public static String[] getAvailableIDs() { return (String[]) ! timezones().keySet().toArray(new String[timezones().size()]); } /** *************** public abstract class TimeZone implement *** 1114,1125 **** */ public static TimeZone getDefault() { ! return defaultZone; } public static void setDefault(TimeZone zone) { ! defaultZone = zone; } /** --- 1144,1155 ---- */ public static TimeZone getDefault() { ! return defaultZone(); } public static void setDefault(TimeZone zone) { ! defaultZone0 = zone; } /** diff -Nrc3pad gcc-3.3.3/libjava/java/util/TreeMap.java gcc-3.4.0/libjava/java/util/TreeMap.java *** gcc-3.3.3/libjava/java/util/TreeMap.java 2003-01-03 17:02:06.000000000 +0000 --- gcc-3.4.0/libjava/java/util/TreeMap.java 2003-10-26 02:48:31.000000000 +0000 *************** public class TreeMap extends AbstractMap *** 533,539 **** * key's mapping. * * @param key the key used to locate the value ! * @param value the value to be stored in the HashMap * @return the prior mapping of the key, or null if there was none * @throws ClassCastException if key is not comparable to current map keys * @throws NullPointerException if key is null, but the comparator does --- 533,539 ---- * key's mapping. * * @param key the key used to locate the value ! * @param value the value to be stored in the Map * @return the prior mapping of the key, or null if there was none * @throws ClassCastException if key is not comparable to current map keys * @throws NullPointerException if key is null, but the comparator does *************** public class TreeMap extends AbstractMap *** 584,594 **** } /** ! * Copies all elements of the given map into this hashtable. If this table * already has a mapping for a key, the new mapping replaces the current * one. * ! * @param m the map to be hashed into this * @throws ClassCastException if a key in m is not comparable with keys * in the map * @throws NullPointerException if a key in m is null, and the comparator --- 584,594 ---- } /** ! * Copies all elements of the given map into this TreeMap. If this map * already has a mapping for a key, the new mapping replaces the current * one. * ! * @param m the map to be added * @throws ClassCastException if a key in m is not comparable with keys * in the map * @throws NullPointerException if a key in m is null, and the comparator *************** public class TreeMap extends AbstractMap *** 1374,1380 **** } /** ! * Iterate over HashMap's entries. This implementation is parameterized * to give a sequential view of keys, values, or entries. * * @author Eric Blake --- 1374,1380 ---- } /** ! * Iterate over TreeMap's entries. This implementation is parameterized * to give a sequential view of keys, values, or entries. * * @author Eric Blake diff -Nrc3pad gcc-3.3.3/libjava/java/util/WeakHashMap.java gcc-3.4.0/libjava/java/util/WeakHashMap.java *** gcc-3.3.3/libjava/java/util/WeakHashMap.java 2002-06-18 15:40:05.000000000 +0000 --- gcc-3.4.0/libjava/java/util/WeakHashMap.java 2003-08-01 21:30:14.000000000 +0000 *************** *** 1,6 **** /* WeakHashMap -- a hashtable that keeps only weak references to its keys, allowing the virtual machine to reclaim them ! Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,6 ---- /* WeakHashMap -- a hashtable that keeps only weak references to its keys, allowing the virtual machine to reclaim them ! Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** public class WeakHashMap extends Abstrac *** 544,549 **** --- 544,551 ---- // Check loadFactor for NaN as well. if (initialCapacity < 0 || ! (loadFactor > 0)) throw new IllegalArgumentException(); + if (initialCapacity == 0) + initialCapacity = 1; this.loadFactor = loadFactor; threshold = (int) (initialCapacity * loadFactor); theEntrySet = new WeakEntrySet(); diff -Nrc3pad gcc-3.3.3/libjava/java/util/zip/Checksum.java gcc-3.4.0/libjava/java/util/zip/Checksum.java *** gcc-3.3.3/libjava/java/util/zip/Checksum.java 2002-01-22 22:40:41.000000000 +0000 --- gcc-3.4.0/libjava/java/util/zip/Checksum.java 2003-10-11 18:52:31.000000000 +0000 *************** public interface Checksum *** 61,79 **** /** * Returns the data checksum computed so far. */ ! public long getValue (); /** * Resets the data checksum as if no update was ever called. */ ! public void reset (); /** * Adds one byte to the data checksum. * * @param bval the data value to add. The high byte of the int is ignored. */ ! public void update (int bval); /** * Adds the byte array to the data checksum. --- 61,79 ---- /** * Returns the data checksum computed so far. */ ! long getValue(); /** * Resets the data checksum as if no update was ever called. */ ! void reset(); /** * Adds one byte to the data checksum. * * @param bval the data value to add. The high byte of the int is ignored. */ ! void update (int bval); /** * Adds the byte array to the data checksum. *************** public interface Checksum *** 82,86 **** * @param off the offset in the buffer where the data starts * @param len the length of the data */ ! public void update (byte[] buf, int off, int len); } --- 82,86 ---- * @param off the offset in the buffer where the data starts * @param len the length of the data */ ! void update (byte[] buf, int off, int len); } diff -Nrc3pad gcc-3.3.3/libjava/java/util/zip/Deflater.java gcc-3.4.0/libjava/java/util/zip/Deflater.java *** gcc-3.3.3/libjava/java/util/zip/Deflater.java 2002-01-22 22:40:41.000000000 +0000 --- gcc-3.4.0/libjava/java/util/zip/Deflater.java 2003-05-27 06:34:29.000000000 +0000 *************** GNU Classpath is free software; you can *** 7,13 **** it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- 7,13 ---- it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *************** import gnu.gcj.RawData; *** 48,65 **** * and JCL book. * Believed complete and correct. */ - public class Deflater { public static final int BEST_COMPRESSION = 9; public static final int BEST_SPEED = 1; public static final int DEFAULT_COMPRESSION = -1; public static final int NO_COMPRESSION = 0; public static final int DEFAULT_STRATEGY = 0; public static final int FILTERED = 1; public static final int HUFFMAN_ONLY = 2; public static final int DEFLATED = 8; public int deflate (byte[] buf) --- 48,94 ---- * and JCL book. * Believed complete and correct. */ public class Deflater { + /** + * The best and slowest compression level. This tries to find very + * long and distant string repetitions. + */ public static final int BEST_COMPRESSION = 9; + /** + * The worst but fastest compression level. + */ public static final int BEST_SPEED = 1; + /** + * The default compression level. + */ public static final int DEFAULT_COMPRESSION = -1; + /** + * This level won't compress at all but output uncompressed blocks. + */ public static final int NO_COMPRESSION = 0; + /** + * The default strategy. + */ public static final int DEFAULT_STRATEGY = 0; + /** + * This strategy will only allow longer string repetitions. It is + * useful for random data with a small character set. + */ public static final int FILTERED = 1; + + /** + * This strategy will not look for string repetitions at all. It + * only encodes with Huffman trees (which means, that more common + * characters get a smaller encoding. + */ public static final int HUFFMAN_ONLY = 2; + /** + * The compression method. This is the only method supported so far. + * There is no need to use this constant at all. + */ public static final int DEFLATED = 8; public int deflate (byte[] buf) diff -Nrc3pad gcc-3.3.3/libjava/java/util/zip/DeflaterOutputStream.java gcc-3.4.0/libjava/java/util/zip/DeflaterOutputStream.java *** gcc-3.3.3/libjava/java/util/zip/DeflaterOutputStream.java 2002-01-22 22:40:41.000000000 +0000 --- gcc-3.4.0/libjava/java/util/zip/DeflaterOutputStream.java 2003-10-27 11:02:44.000000000 +0000 *************** GNU Classpath is free software; you can *** 7,13 **** it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- 7,13 ---- it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ! GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *************** import java.io.FilterOutputStream; *** 41,56 **** import java.io.OutputStream; import java.io.IOException; - /** - * @author Tom Tromey - * @date May 17, 1999 - */ - /* Written using on-line Java Platform 1.2 API Specification * and JCL book. * Believed complete and correct. */ public class DeflaterOutputStream extends FilterOutputStream { public void close () throws IOException --- 41,63 ---- import java.io.OutputStream; import java.io.IOException; /* Written using on-line Java Platform 1.2 API Specification * and JCL book. * Believed complete and correct. */ + /** + * This is a special FilterOutputStream deflating the bytes that are + * written through it. It uses the Deflater for deflating. + * + * A special thing to be noted is that flush() doesn't flush + * everything in Sun's JDK, but it does so in jazzlib. This is because + * Sun's Deflater doesn't have a way to flush() everything, without + * finishing the stream. + * + * @author Tom Tromey, Jochen Hoenicke + * @date Jan 11, 2001 + */ public class DeflaterOutputStream extends FilterOutputStream { public void close () throws IOException *************** public class DeflaterOutputStream extend *** 59,64 **** --- 66,76 ---- out.close(); } + /** + * Deflates everything in the def's input buffers. This will call + * def.deflate() until all bytes from the input buffers + * are processed. + */ protected void deflate () throws IOException { do *************** public class DeflaterOutputStream extend *** 70,100 **** while (! def.needsInput()); } public DeflaterOutputStream (OutputStream out) { this (out, new Deflater (), 512); } public DeflaterOutputStream (OutputStream out, Deflater defl) { this (out, defl, 512); } public DeflaterOutputStream(OutputStream out, Deflater defl, int bufsize) { super (out); buf = new byte[bufsize]; def = defl; } public void finish () throws IOException { ! if (inbufLength > 0) ! { ! def.setInput (inbuf, 0, inbufLength); ! deflate (); ! inbufLength = 0; ! } def.finish(); while (! def.finished ()) { --- 82,133 ---- while (! def.needsInput()); } + /** + * Creates a new DeflaterOutputStream with a default Deflater and + * default buffer size. + * @param out the output stream where deflated output should be written. + */ public DeflaterOutputStream (OutputStream out) { this (out, new Deflater (), 512); } + /** + * Creates a new DeflaterOutputStream with the given Deflater and + * default buffer size. + * @param out the output stream where deflated output should be written. + * @param defl the underlying deflater. + */ public DeflaterOutputStream (OutputStream out, Deflater defl) { this (out, defl, 512); } + /** + * Creates a new DeflaterOutputStream with the given Deflater and + * buffer size. + * @param out the output stream where deflated output should be written. + * @param defl the underlying deflater. + * @param bufsize the buffer size. + * @exception IllegalArgumentException if bufsize isn't positive. + */ public DeflaterOutputStream(OutputStream out, Deflater defl, int bufsize) { super (out); + if (bufsize <= 0) + throw new IllegalArgumentException("bufsize <= 0"); buf = new byte[bufsize]; def = defl; } + /** + * Finishes the stream by calling finish() on the deflater. This + * was the only way to ensure that all bytes are flushed in Sun's + * JDK. + */ public void finish () throws IOException { ! inbufWrite(); def.finish(); while (! def.finished ()) { *************** public class DeflaterOutputStream extend *** 107,134 **** public void write (int bval) throws IOException { if (inbuf == null) ! { ! inbuf = new byte[128]; ! } else if (inbufLength == inbuf.length) ! { ! def.setInput (inbuf, 0, inbufLength); ! deflate (); ! inbufLength = 0; ! } inbuf[inbufLength++] = (byte) bval; } public void write (byte[] buf, int off, int len) throws IOException { if (inbufLength > 0) { ! def.setInput (inbuf, 0, inbufLength); ! deflate (); inbufLength = 0; } - def.setInput (buf, off, len); - deflate (); } // Used, if needed, for write(int). --- 140,166 ---- public void write (int bval) throws IOException { if (inbuf == null) ! inbuf = new byte[128]; else if (inbufLength == inbuf.length) ! inbufWrite (); inbuf[inbufLength++] = (byte) bval; } public void write (byte[] buf, int off, int len) throws IOException { + inbufWrite (); + def.setInput (buf, off, len); + deflate (); + } + + private void inbufWrite () throws IOException + { if (inbufLength > 0) { ! int size = inbufLength; inbufLength = 0; + write (inbuf, 0, size); } } // Used, if needed, for write(int). diff -Nrc3pad gcc-3.3.3/libjava/java/util/zip/InflaterInputStream.java gcc-3.4.0/libjava/java/util/zip/InflaterInputStream.java *** gcc-3.3.3/libjava/java/util/zip/InflaterInputStream.java 2003-02-13 23:16:27.000000000 +0000 --- gcc-3.4.0/libjava/java/util/zip/InflaterInputStream.java 2003-10-15 14:02:37.000000000 +0000 *************** public class InflaterInputStream extends *** 70,80 **** this (in, infl, 512); } ! public InflaterInputStream (InputStream in, Inflater infl, int bufsize) { super (in); ! this.inf = infl; ! this.buf = new byte[bufsize]; } public int read () throws IOException --- 70,90 ---- this (in, infl, 512); } ! public InflaterInputStream (InputStream in, Inflater inf, int size) { super (in); ! ! if (in == null) ! throw new NullPointerException ("in may not be null"); ! ! if (inf == null) ! throw new NullPointerException ("inf may not be null"); ! ! if (size < 0) ! throw new IllegalArgumentException ("size may not be negative"); ! ! this.inf = inf; ! this.buf = new byte [size]; } public int read () throws IOException diff -Nrc3pad gcc-3.3.3/libjava/java/util/zip/Inflater.java gcc-3.4.0/libjava/java/util/zip/Inflater.java *** gcc-3.3.3/libjava/java/util/zip/Inflater.java 2002-01-22 22:40:41.000000000 +0000 --- gcc-3.4.0/libjava/java/util/zip/Inflater.java 2003-05-27 06:34:29.000000000 +0000 *************** *** 1,5 **** /* Inflater.java - Decompress a data stream ! Copyright (C) 1999, 2000 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Inflater.java - Decompress a data stream ! Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** package java.util.zip; *** 39,125 **** import gnu.gcj.RawData; - /** - * @author Tom Tromey - * @date May 17, 1999 - */ - /* Written using on-line Java Platform 1.2 API Specification * and JCL book. * Believed complete and correct. */ public class Inflater { ! public native void end (); protected void finalize () { end (); } public synchronized boolean finished () { return is_finished; } public native int getAdler (); public native int getRemaining (); public native int getTotalIn (); public native int getTotalOut (); public int inflate (byte[] buf) throws DataFormatException { return inflate (buf, 0, buf.length); } public native int inflate (byte[] buf, int off, int len) throws DataFormatException; private native void init (boolean noHeader); ! public Inflater () ! { ! this (false); ! } ! ! public Inflater (boolean noHeader) ! { ! init (noHeader); ! } ! public synchronized boolean needsDictionary () { return dict_needed; } public synchronized boolean needsInput () { return getRemaining () == 0; } public native void reset (); public void setDictionary (byte[] buf) { setDictionary (buf, 0, buf.length); } public native void setDictionary (byte[] buf, int off, int len); public void setInput (byte[] buf) { setInput (buf, 0, buf.length); } public native void setInput (byte[] buf, int off, int len); - - // The zlib stream. - private RawData zstream; - - // True if finished. - private boolean is_finished; - - // True if dictionary needed. - private boolean dict_needed; } --- 39,269 ---- import gnu.gcj.RawData; /* Written using on-line Java Platform 1.2 API Specification * and JCL book. * Believed complete and correct. */ + /** + * Inflater is used to decompress data that has been compressed according + * to the "deflate" standard described in rfc1950. + * + * The usage is as following. First you have to set some input with + * setInput(), then inflate() it. If inflate doesn't + * inflate any bytes there may be three reasons: + *
                  + *
                • needsInput() returns true because the input buffer is empty. + * You have to provide more input with setInput(). + * NOTE: needsInput() also returns true when, the stream is finished. + *
                • + *
                • needsDictionary() returns true, you have to provide a preset + * dictionary with setDictionary().
                • + *
                • finished() returns true, the inflater has finished.
                • + *
                + * Once the first output byte is produced, a dictionary will not be + * needed at a later stage. + * + * @author John Leuner, Jochen Hoenicke + * @author Tom Tromey + * @date May 17, 1999 + * @since JDK 1.1 + */ public class Inflater { ! // The zlib stream. ! private RawData zstream; ! ! // True if finished. ! private boolean is_finished; ! ! // True if dictionary needed. ! private boolean dict_needed; ! ! /** ! * Creates a new inflater. ! */ ! public Inflater () ! { ! this (false); ! } ! ! /** ! * Creates a new inflater. ! * @param nowrap true if no header and checksum field appears in the ! * stream. This is used for GZIPed input. For compatibility with ! * Sun JDK you should provide one byte of input more than needed in ! * this case. ! */ ! public Inflater (boolean noHeader) ! { ! init (noHeader); ! } + /** + * Finalizes this object. + */ protected void finalize () { end (); } + /** + * Frees all objects allocated by the inflater. There's no reason + * to call this, since you can just rely on garbage collection (even + * for the Sun implementation). Exists only for compatibility + * with Sun's JDK, where the compressor allocates native memory. + * If you call any method (even reset) afterwards the behaviour is + * undefined. + * @deprecated Just clear all references to inflater instead. + */ + public native void end (); + + /** + * Returns true, if the inflater has finished. This means, that no + * input is needed and no output can be produced. + */ public synchronized boolean finished () { return is_finished; } + /** + * Gets the adler checksum. This is either the checksum of all + * uncompressed bytes returned by inflate(), or if needsDictionary() + * returns true (and thus no output was yet produced) this is the + * adler checksum of the expected dictionary. + * @returns the adler checksum. + */ public native int getAdler (); + + /** + * Gets the number of unprocessed input. Useful, if the end of the + * stream is reached and you want to further process the bytes after + * the deflate stream. + * @return the number of bytes of the input which were not processed. + */ public native int getRemaining (); + + /** + * Gets the total number of processed compressed input bytes. + * @return the total number of bytes of processed input bytes. + */ public native int getTotalIn (); + + /** + * Gets the total number of output bytes returned by inflate(). + * @return the total number of output bytes. + */ public native int getTotalOut (); + /** + * Inflates the compressed stream to the output buffer. If this + * returns 0, you should check, whether needsDictionary(), + * needsInput() or finished() returns true, to determine why no + * further output is produced. + * @param buffer the output buffer. + * @return the number of bytes written to the buffer, 0 if no further + * output can be produced. + * @exception DataFormatException if deflated stream is invalid. + * @exception IllegalArgumentException if buf has length 0. + */ public int inflate (byte[] buf) throws DataFormatException { return inflate (buf, 0, buf.length); } + /** + * Inflates the compressed stream to the output buffer. If this + * returns 0, you should check, whether needsDictionary(), + * needsInput() or finished() returns true, to determine why no + * further output is produced. + * @param buffer the output buffer. + * @param off the offset into buffer where the output should start. + * @param len the maximum length of the output. + * @return the number of bytes written to the buffer, 0 if no further + * output can be produced. + * @exception DataFormatException if deflated stream is invalid. + * @exception IndexOutOfBoundsException if the off and/or len are wrong. + */ public native int inflate (byte[] buf, int off, int len) throws DataFormatException; private native void init (boolean noHeader); ! /** ! * Returns true, if a preset dictionary is needed to inflate the input. ! */ public synchronized boolean needsDictionary () { return dict_needed; } + /** + * Returns true, if the input buffer is empty. + * You should then call setInput().
                + * + * NOTE: This method also returns true when the stream is finished. + */ public synchronized boolean needsInput () { return getRemaining () == 0; } + /** + * Resets the inflater so that a new stream can be decompressed. All + * pending input and output will be discarded. + */ public native void reset (); + /** + * Sets the preset dictionary. This should only be called, if + * needsDictionary() returns true and it should set the same + * dictionary, that was used for deflating. The getAdler() + * function returns the checksum of the dictionary needed. + * @param buffer the dictionary. + * @exception IllegalStateException if no dictionary is needed. + * @exception IllegalArgumentException if the dictionary checksum is + * wrong. + */ public void setDictionary (byte[] buf) { setDictionary (buf, 0, buf.length); } + /** + * Sets the preset dictionary. This should only be called, if + * needsDictionary() returns true and it should set the same + * dictionary, that was used for deflating. The getAdler() + * function returns the checksum of the dictionary needed. + * @param buffer the dictionary. + * @param off the offset into buffer where the dictionary starts. + * @param len the length of the dictionary. + * @exception IllegalStateException if no dictionary is needed. + * @exception IllegalArgumentException if the dictionary checksum is + * wrong. + * @exception IndexOutOfBoundsException if the off and/or len are wrong. + */ public native void setDictionary (byte[] buf, int off, int len); + /** + * Sets the input. This should only be called, if needsInput() + * returns true. + * @param buffer the input. + * @exception IllegalStateException if no input is needed. + */ public void setInput (byte[] buf) { setInput (buf, 0, buf.length); } + /** + * Sets the input. This should only be called, if needsInput() + * returns true. + * @param buffer the input. + * @param off the offset into buffer where the input starts. + * @param len the length of the input. + * @exception IllegalStateException if no input is needed. + * @exception IndexOutOfBoundsException if the off and/or len are wrong. + */ public native void setInput (byte[] buf, int off, int len); } diff -Nrc3pad gcc-3.3.3/libjava/java/util/zip/ZipConstants.java gcc-3.4.0/libjava/java/util/zip/ZipConstants.java *** gcc-3.3.3/libjava/java/util/zip/ZipConstants.java 2002-06-15 18:31:13.000000000 +0000 --- gcc-3.4.0/libjava/java/util/zip/ZipConstants.java 2003-10-11 18:52:31.000000000 +0000 *************** package java.util.zip; *** 39,97 **** interface ZipConstants { ! /* The local file header */ ! public final static int LOCHDR = 30; ! public final static int LOCSIG = 'P'|('K'<<8)|(3<<16)|(4<<24); ! public final static int LOCVER = 4; ! public final static int LOCFLG = 6; ! public final static int LOCHOW = 8; ! public final static int LOCTIM = 10; ! public final static int LOCCRC = 14; ! public final static int LOCSIZ = 18; ! public final static int LOCLEN = 22; ! public final static int LOCNAM = 26; ! public final static int LOCEXT = 28; ! /* The Data descriptor */ ! public final static int EXTSIG = 'P'|('K'<<8)|(7<<16)|(8<<24); ! public final static int EXTHDR = 16; ! public final static int EXTCRC = 4; ! public final static int EXTSIZ = 8; ! public final static int EXTLEN = 12; ! /* The central directory file header */ ! public final static int CENSIG = 'P'|('K'<<8)|(1<<16)|(2<<24); ! public final static int CENHDR = 46; ! public final static int CENVEM = 4; ! public final static int CENVER = 6; ! public final static int CENFLG = 8; ! public final static int CENHOW = 10; ! public final static int CENTIM = 12; ! public final static int CENCRC = 16; ! public final static int CENSIZ = 20; ! public final static int CENLEN = 24; ! public final static int CENNAM = 28; ! public final static int CENEXT = 30; ! public final static int CENCOM = 32; ! public final static int CENDSK = 34; ! public final static int CENATT = 36; ! public final static int CENATX = 38; ! public final static int CENOFF = 42; ! /* The entries in the end of central directory */ ! public final static int ENDSIG = 'P'|('K'<<8)|(5<<16)|(6<<24); ! public final static int ENDHDR = 22; ! /* The following two fields are missing in SUN JDK */ ! final static int ENDNRD = 4; ! final static int ENDDCD = 6; ! public final static int ENDSUB = 8; ! public final static int ENDTOT = 10; ! public final static int ENDSIZ = 12; ! public final static int ENDOFF = 16; ! public final static int ENDCOM = 20; } --- 39,97 ---- interface ZipConstants { ! /* The local file header */ ! int LOCHDR = 30; ! int LOCSIG = 'P'|('K'<<8)|(3<<16)|(4<<24); ! int LOCVER = 4; ! int LOCFLG = 6; ! int LOCHOW = 8; ! int LOCTIM = 10; ! int LOCCRC = 14; ! int LOCSIZ = 18; ! int LOCLEN = 22; ! int LOCNAM = 26; ! int LOCEXT = 28; ! /* The Data descriptor */ ! int EXTSIG = 'P'|('K'<<8)|(7<<16)|(8<<24); ! int EXTHDR = 16; ! int EXTCRC = 4; ! int EXTSIZ = 8; ! int EXTLEN = 12; ! /* The central directory file header */ ! int CENSIG = 'P'|('K'<<8)|(1<<16)|(2<<24); ! int CENHDR = 46; ! int CENVEM = 4; ! int CENVER = 6; ! int CENFLG = 8; ! int CENHOW = 10; ! int CENTIM = 12; ! int CENCRC = 16; ! int CENSIZ = 20; ! int CENLEN = 24; ! int CENNAM = 28; ! int CENEXT = 30; ! int CENCOM = 32; ! int CENDSK = 34; ! int CENATT = 36; ! int CENATX = 38; ! int CENOFF = 42; ! /* The entries in the end of central directory */ ! int ENDSIG = 'P'|('K'<<8)|(5<<16)|(6<<24); ! int ENDHDR = 22; ! /* The following two fields are missing in SUN JDK */ ! int ENDNRD = 4; ! int ENDDCD = 6; ! int ENDSUB = 8; ! int ENDTOT = 10; ! int ENDSIZ = 12; ! int ENDOFF = 16; ! int ENDCOM = 20; } diff -Nrc3pad gcc-3.3.3/libjava/java/util/zip/ZipEntry.java gcc-3.4.0/libjava/java/util/zip/ZipEntry.java *** gcc-3.3.3/libjava/java/util/zip/ZipEntry.java 2003-02-21 17:01:44.000000000 +0000 --- gcc-3.4.0/libjava/java/util/zip/ZipEntry.java 2003-06-17 12:07:56.000000000 +0000 *************** this exception to your version of the li *** 35,43 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.util.zip; import java.util.Calendar; - import java.util.TimeZone; import java.util.Date; /** --- 35,44 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package java.util.zip; + import java.util.Calendar; import java.util.Date; /** diff -Nrc3pad gcc-3.3.3/libjava/java/util/zip/ZipFile.java gcc-3.4.0/libjava/java/util/zip/ZipFile.java *** gcc-3.3.3/libjava/java/util/zip/ZipFile.java 2003-02-21 12:36:59.000000000 +0000 --- gcc-3.4.0/libjava/java/util/zip/ZipFile.java 2003-11-26 21:55:27.000000000 +0000 *************** exception statement from your version. * *** 38,46 **** package java.util.zip; import java.io.BufferedInputStream; - import java.io.ByteArrayInputStream; import java.io.DataInput; - import java.io.DataInputStream; import java.io.File; import java.io.InputStream; import java.io.IOException; --- 38,44 ---- *************** public class ZipFile implements ZipConst *** 107,113 **** public ZipFile(File file) throws ZipException, IOException { this.raf = new RandomAccessFile(file, "r"); ! this.name = file.getName(); } /** --- 105,111 ---- public ZipFile(File file) throws ZipException, IOException { this.raf = new RandomAccessFile(file, "r"); ! this.name = file.getPath(); } /** *************** public class ZipFile implements ZipConst *** 136,142 **** ("OPEN_DELETE mode not supported yet in java.util.zip.ZipFile"); } this.raf = new RandomAccessFile(file, "r"); ! this.name = file.getName(); } /** --- 134,140 ---- ("OPEN_DELETE mode not supported yet in java.util.zip.ZipFile"); } this.raf = new RandomAccessFile(file, "r"); ! this.name = file.getPath(); } /** *************** public class ZipFile implements ZipConst *** 310,316 **** */ protected void finalize() throws IOException { ! if (!closed) close(); } /** --- 308,314 ---- */ protected void finalize() throws IOException { ! if (!closed && raf != null) close(); } /** *************** public class ZipFile implements ZipConst *** 440,446 **** } /** ! * Returns the name of this zip file. */ public String getName() { --- 438,444 ---- } /** ! * Returns the (path) name of this zip file. */ public String getName() { diff -Nrc3pad gcc-3.3.3/libjava/java/util/zip/ZipInputStream.java gcc-3.4.0/libjava/java/util/zip/ZipInputStream.java *** gcc-3.3.3/libjava/java/util/zip/ZipInputStream.java 2003-02-12 01:25:37.000000000 +0000 --- gcc-3.4.0/libjava/java/util/zip/ZipInputStream.java 2003-06-17 12:07:56.000000000 +0000 *************** this exception to your version of the li *** 35,45 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.util.zip; import java.io.EOFException; import java.io.InputStream; import java.io.IOException; - import java.util.Enumeration; /** * This is a FilterInputStream that reads the files in an zip archive --- 35,46 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package java.util.zip; + import java.io.EOFException; import java.io.InputStream; import java.io.IOException; /** * This is a FilterInputStream that reads the files in an zip archive diff -Nrc3pad gcc-3.3.3/libjava/java/util/zip/ZipOutputStream.java gcc-3.4.0/libjava/java/util/zip/ZipOutputStream.java *** gcc-3.3.3/libjava/java/util/zip/ZipOutputStream.java 2002-11-03 20:27:31.000000000 +0000 --- gcc-3.4.0/libjava/java/util/zip/ZipOutputStream.java 2003-06-17 12:07:56.000000000 +0000 *************** this exception to your version of the li *** 35,46 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.util.zip; ! import java.io.OutputStream; import java.io.IOException; ! import java.io.UnsupportedEncodingException; ! import java.util.Vector; import java.util.Enumeration; /** * This is a FilterOutputStream that writes the files into a zip --- 35,47 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package java.util.zip; ! import java.io.IOException; ! import java.io.OutputStream; import java.util.Enumeration; + import java.util.Vector; /** * This is a FilterOutputStream that writes the files into a zip diff -Nrc3pad gcc-3.3.3/libjava/javax/accessibility/AccessibleContext.java gcc-3.4.0/libjava/javax/accessibility/AccessibleContext.java *** gcc-3.3.3/libjava/javax/accessibility/AccessibleContext.java 2002-08-09 04:26:13.000000000 +0000 --- gcc-3.4.0/libjava/javax/accessibility/AccessibleContext.java 2003-02-19 11:44:23.000000000 +0000 *************** public abstract class AccessibleContext *** 72,78 **** = "AccessibleName"; /** ! * Constanat used when the accessible description has changed. Both the old * and new values are listed in the event. * * @see #getAccessibleDescription() --- 72,78 ---- = "AccessibleName"; /** ! * Constant used when the accessible description has changed. Both the old * and new values are listed in the event. * * @see #getAccessibleDescription() diff -Nrc3pad gcc-3.3.3/libjava/javax/accessibility/AccessibleEditableText.java gcc-3.4.0/libjava/javax/accessibility/AccessibleEditableText.java *** gcc-3.3.3/libjava/javax/accessibility/AccessibleEditableText.java 2002-08-09 04:26:13.000000000 +0000 --- gcc-3.4.0/libjava/javax/accessibility/AccessibleEditableText.java 2003-03-01 22:26:29.000000000 +0000 *************** public interface AccessibleEditableText *** 92,98 **** * @param end the end position, exclusive */ // XXX What happens if indices are out of bounds? ! String delete(int start, int end); /** * Cut the text between two points to the system clipboard. --- 92,98 ---- * @param end the end position, exclusive */ // XXX What happens if indices are out of bounds? ! void delete(int start, int end); /** * Cut the text between two points to the system clipboard. *************** public interface AccessibleEditableText *** 101,107 **** * @param end the end position, exclusive */ // XXX What happens if indices are out of bounds? ! String cut(int start, int end); /** * Paste the text from the system clipboard at the given index. --- 101,107 ---- * @param end the end position, exclusive */ // XXX What happens if indices are out of bounds? ! void cut(int start, int end); /** * Paste the text from the system clipboard at the given index. diff -Nrc3pad gcc-3.3.3/libjava/javax/accessibility/AccessibleHyperlink.java gcc-3.4.0/libjava/javax/accessibility/AccessibleHyperlink.java *** gcc-3.3.3/libjava/javax/accessibility/AccessibleHyperlink.java 2002-08-09 04:26:13.000000000 +0000 --- gcc-3.4.0/libjava/javax/accessibility/AccessibleHyperlink.java 2003-03-01 22:26:29.000000000 +0000 *************** public abstract class AccessibleHyperlin *** 106,112 **** * @return the link location * @see #getAccessibleActionCount() */ ! public abstract String getAccessibleActionObject(int i); /** * Get the anchor appropriate for the link, or null if the index is out of --- 106,112 ---- * @return the link location * @see #getAccessibleActionCount() */ ! public abstract Object getAccessibleActionObject(int i); /** * Get the anchor appropriate for the link, or null if the index is out of *************** public abstract class AccessibleHyperlin *** 119,125 **** * @return the link anchor object * @see #getAccessibleActionCount() */ ! public abstract String getAccessibleActionAnchor(int i); /** * Gets the character index where this link starts in the parent hypertext --- 119,125 ---- * @return the link anchor object * @see #getAccessibleActionCount() */ ! public abstract Object getAccessibleActionAnchor(int i); /** * Gets the character index where this link starts in the parent hypertext diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/CompositeName.java gcc-3.4.0/libjava/javax/naming/CompositeName.java *** gcc-3.3.3/libjava/javax/naming/CompositeName.java 2002-11-23 21:50:39.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/CompositeName.java 2003-06-27 13:06:50.000000000 +0000 *************** import java.util.Vector; *** 52,57 **** --- 52,59 ---- */ public class CompositeName implements Name, Cloneable, Serializable { + private static final long serialVersionUID = 1667768148915813118L; + public CompositeName () { elts = new Vector (); diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/CompoundName.java gcc-3.4.0/libjava/javax/naming/CompoundName.java *** gcc-3.3.3/libjava/javax/naming/CompoundName.java 2002-11-23 21:50:39.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/CompoundName.java 2003-11-11 12:22:20.000000000 +0000 *************** import java.util.Vector; *** 58,63 **** --- 58,65 ---- */ public class CompoundName implements Name, Cloneable, Serializable { + private static final long serialVersionUID = 3513100557083972036L; + private CompoundName (Properties syntax) { elts = new Vector (); *************** public class CompoundName implements Nam *** 140,152 **** // Otherwise, fall through. } // Quotes are only special at the start of a component. ! else if (new_element.length () == 0 && special == beginQuote) { quote = endQuote; i += special.length (); continue; } ! else if (new_element.length () == 0 && special == beginQuote2) { quote = endQuote2; i += special.length (); --- 142,158 ---- // Otherwise, fall through. } // Quotes are only special at the start of a component. ! else if (new_element.length () == 0 ! && special == beginQuote ! && beginQuote != null) { quote = endQuote; i += special.length (); continue; } ! else if (new_element.length () == 0 ! && special == beginQuote2 ! && beginQuote2 != null) { quote = endQuote2; i += special.length (); *************** public class CompoundName implements Nam *** 234,240 **** public int compareTo (Object obj) { ! if (obj == null || ! (obj instanceof CompoundName)) throw new ClassCastException ("CompoundName.compareTo() expected CompoundName"); CompoundName cn = (CompoundName) obj; int last = Math.min (cn.elts.size (), elts.size ()); --- 240,246 ---- public int compareTo (Object obj) { ! if (! (obj instanceof CompoundName)) throw new ClassCastException ("CompoundName.compareTo() expected CompoundName"); CompoundName cn = (CompoundName) obj; int last = Math.min (cn.elts.size (), elts.size ()); diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/Context.java gcc-3.4.0/libjava/javax/naming/Context.java *** gcc-3.3.3/libjava/javax/naming/Context.java 2002-11-23 21:50:39.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/Context.java 2003-10-11 19:06:21.000000000 +0000 *************** import java.util.Hashtable; *** 43,160 **** public interface Context { // Property with name of the inital context factory to use ! public static final String INITIAL_CONTEXT_FACTORY = "java.naming.factory.initial"; // Property with colon-separated list of object factories to use. ! public static final String OBJECT_FACTORIES = "java.naming.factory.object"; // Property with colon-separated list of state factories to use. ! public static final String STATE_FACTORIES = "java.naming.factory.state"; // Property with colon-separated list of package prefixes to use. ! public static final String URL_PKG_PREFIXES = "java.naming.factory.url.pkgs"; // Property with URL specifying configuration for the service // provider to use. ! public static final String PROVIDER_URL = "java.naming.provider.url"; // Property with the DNS host and domain names to use. ! public static final String DNS_URL = "java.naming.dns.url"; // Property with the authoritativeness of the service requested. ! public static final String AUTHORITATIVE = "java.naming.authoritative"; // Property with the batch size to use when returning data via the // service's protocol. ! public static final String BATCHSIZE = "java.naming.batchsize"; // Property defining how referrals encountered by the service // provider are to be processed. ! public static final String REFERRAL = "java.naming.referral"; // Property specifying the security protocol to use. ! public static final String SECURITY_PROTOCOL = "java.naming.security.protocol"; // Property specifying the security level to use. ! public static final String SECURITY_AUTHENTICATION = "java.naming.security.authentication"; // Property for the identity of the principal for authenticating // the caller to the service. ! public static final String SECURITY_PRINCIPAL = "java.naming.security.principal"; // Property specifying the credentials of the principal for // authenticating the caller to the service. ! public static final String SECURITY_CREDENTIALS = "java.naming.security.credentials"; // Property for specifying the preferred language to use with the // service. ! public static final String LANGUAGE = "java.naming.language"; // Property for the initial context constructor to use when searching // for other properties. ! public static final String APPLET = "java.naming.applet"; ! public void bind (Name name, Object obj) throws NamingException; ! public void bind (String name, Object obj) throws NamingException; ! public Object lookup (Name name) throws NamingException; ! public Object lookup (String name) throws NamingException; ! public void rebind (Name name, Object obj) throws NamingException; ! public void rebind (String name, Object obj) throws NamingException; ! public void unbind (Name name) throws NamingException; ! public void unbind (String name) throws NamingException; ! public void rename (Name oldName, Name newName) throws NamingException; ! public void rename (String oldName, String newName) throws NamingException; ! public NamingEnumeration list (Name name) throws NamingException; ! public NamingEnumeration list (String name) throws NamingException; ! public NamingEnumeration listBindings (Name name) throws NamingException; ! public NamingEnumeration listBindings (String name) throws NamingException; ! public void destroySubcontext (Name name) throws NamingException; ! public void destroySubcontext (String name) throws NamingException; ! public Context createSubcontext (Name name) throws NamingException; ! public Context createSubcontext (String name) throws NamingException; ! public Object lookupLink (Name name) throws NamingException; ! public Object lookupLink (String name) throws NamingException; ! public NameParser getNameParser (Name name) throws NamingException; ! public NameParser getNameParser (String name) throws NamingException; ! public Name composeName (Name name, Name prefix) throws NamingException; ! public String composeName (String name, String prefix) throws NamingException; ! public Object addToEnvironment (String propName, Object propVal) throws NamingException; ! public Object removeFromEnvironment (String propName) throws NamingException; ! public Hashtable getEnvironment () throws NamingException; ! public void close () throws NamingException; ! public String getNameInNamespace () throws NamingException; } --- 43,160 ---- public interface Context { // Property with name of the inital context factory to use ! String INITIAL_CONTEXT_FACTORY = "java.naming.factory.initial"; // Property with colon-separated list of object factories to use. ! String OBJECT_FACTORIES = "java.naming.factory.object"; // Property with colon-separated list of state factories to use. ! String STATE_FACTORIES = "java.naming.factory.state"; // Property with colon-separated list of package prefixes to use. ! String URL_PKG_PREFIXES = "java.naming.factory.url.pkgs"; // Property with URL specifying configuration for the service // provider to use. ! String PROVIDER_URL = "java.naming.provider.url"; // Property with the DNS host and domain names to use. ! String DNS_URL = "java.naming.dns.url"; // Property with the authoritativeness of the service requested. ! String AUTHORITATIVE = "java.naming.authoritative"; // Property with the batch size to use when returning data via the // service's protocol. ! String BATCHSIZE = "java.naming.batchsize"; // Property defining how referrals encountered by the service // provider are to be processed. ! String REFERRAL = "java.naming.referral"; // Property specifying the security protocol to use. ! String SECURITY_PROTOCOL = "java.naming.security.protocol"; // Property specifying the security level to use. ! String SECURITY_AUTHENTICATION = "java.naming.security.authentication"; // Property for the identity of the principal for authenticating // the caller to the service. ! String SECURITY_PRINCIPAL = "java.naming.security.principal"; // Property specifying the credentials of the principal for // authenticating the caller to the service. ! String SECURITY_CREDENTIALS = "java.naming.security.credentials"; // Property for specifying the preferred language to use with the // service. ! String LANGUAGE = "java.naming.language"; // Property for the initial context constructor to use when searching // for other properties. ! String APPLET = "java.naming.applet"; ! void bind (Name name, Object obj) throws NamingException; ! void bind (String name, Object obj) throws NamingException; ! Object lookup (Name name) throws NamingException; ! Object lookup (String name) throws NamingException; ! void rebind (Name name, Object obj) throws NamingException; ! void rebind (String name, Object obj) throws NamingException; ! void unbind (Name name) throws NamingException; ! void unbind (String name) throws NamingException; ! void rename (Name oldName, Name newName) throws NamingException; ! void rename (String oldName, String newName) throws NamingException; ! NamingEnumeration list (Name name) throws NamingException; ! NamingEnumeration list (String name) throws NamingException; ! NamingEnumeration listBindings (Name name) throws NamingException; ! NamingEnumeration listBindings (String name) throws NamingException; ! void destroySubcontext (Name name) throws NamingException; ! void destroySubcontext (String name) throws NamingException; ! Context createSubcontext (Name name) throws NamingException; ! Context createSubcontext (String name) throws NamingException; ! Object lookupLink (Name name) throws NamingException; ! Object lookupLink (String name) throws NamingException; ! NameParser getNameParser (Name name) throws NamingException; ! NameParser getNameParser (String name) throws NamingException; ! Name composeName (Name name, Name prefix) throws NamingException; ! String composeName (String name, String prefix) throws NamingException; ! Object addToEnvironment (String propName, Object propVal) throws NamingException; ! Object removeFromEnvironment (String propName) throws NamingException; ! Hashtable getEnvironment () throws NamingException; ! void close () throws NamingException; ! String getNameInNamespace () throws NamingException; } diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/directory/Attribute.java gcc-3.4.0/libjava/javax/naming/directory/Attribute.java *** gcc-3.3.3/libjava/javax/naming/directory/Attribute.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/directory/Attribute.java 2003-12-06 08:41:36.000000000 +0000 *************** exception statement from your version. * *** 38,70 **** package javax.naming.directory; - import javax.naming.*; import java.io.Serializable; /** * @author Warren Levy * @date June 14, 2001 */ - public interface Attribute extends Cloneable, Serializable { ! // FIXME: Need to set value from JNDI 1.1.1 fro interoperability. ! // public static final long serialVersionUID = ; ! public NamingEnumeration getAll() throws NamingException; ! public Object get() throws NamingException; ! public int size(); ! public String getID(); ! public boolean contains(Object attrVal); ! public boolean add(Object attrVal); ! public boolean remove(Object attrval); ! public void clear(); ! public DirContext getAttributeSyntaxDefinition() throws NamingException; ! public DirContext getAttributeDefinition() throws NamingException; ! public Object clone(); ! public boolean isOrdered(); ! public Object get(int ix) throws NamingException; ! public Object remove(int ix); ! public void add(int ix, Object attrVal); ! public Object set(int ix, Object attrVal); } --- 38,71 ---- package javax.naming.directory; import java.io.Serializable; + import javax.naming.Context; + import javax.naming.Name; + import javax.naming.NamingEnumeration; + import javax.naming.NamingException; /** * @author Warren Levy * @date June 14, 2001 */ public interface Attribute extends Cloneable, Serializable { ! long serialVersionUID = 8707690322213556804L; ! NamingEnumeration getAll() throws NamingException; ! Object get() throws NamingException; ! int size(); ! String getID(); ! boolean contains(Object attrVal); ! boolean add(Object attrVal); ! boolean remove(Object attrval); ! void clear(); ! DirContext getAttributeSyntaxDefinition() throws NamingException; ! DirContext getAttributeDefinition() throws NamingException; ! Object clone(); ! boolean isOrdered(); ! Object get(int ix) throws NamingException; ! Object remove(int ix); ! void add(int ix, Object attrVal); ! Object set(int ix, Object attrVal); } diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/directory/Attributes.java gcc-3.4.0/libjava/javax/naming/directory/Attributes.java *** gcc-3.3.3/libjava/javax/naming/directory/Attributes.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/directory/Attributes.java 2003-12-06 08:41:36.000000000 +0000 *************** exception statement from your version. * *** 38,45 **** package javax.naming.directory; - import javax.naming.*; import java.io.Serializable; /** * @author Warren Levy --- 38,47 ---- package javax.naming.directory; import java.io.Serializable; + import javax.naming.Context; + import javax.naming.Name; + import javax.naming.NamingEnumeration; /** * @author Warren Levy *************** import java.io.Serializable; *** 48,61 **** public interface Attributes extends Cloneable, Serializable { ! public boolean isCaseIgnored(); ! public int size(); ! public Attribute get(String attrID); ! public NamingEnumeration getAll(); ! public NamingEnumeration getIDs(); ! public Attribute put(String attrID, Object val); ! public Attribute put(Attribute attr); ! public Attribute remove(String attrID); ! public Object clone(); } --- 50,63 ---- public interface Attributes extends Cloneable, Serializable { ! boolean isCaseIgnored(); ! int size(); ! Attribute get(String attrID); ! NamingEnumeration getAll(); ! NamingEnumeration getIDs(); ! Attribute put(String attrID, Object val); ! Attribute put(Attribute attr); ! Attribute remove(String attrID); ! Object clone(); } diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/directory/BasicAttribute.java gcc-3.4.0/libjava/javax/naming/directory/BasicAttribute.java *** gcc-3.3.3/libjava/javax/naming/directory/BasicAttribute.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/directory/BasicAttribute.java 2003-06-27 13:06:50.000000000 +0000 *************** exception statement from your version. * *** 38,45 **** package javax.naming.directory; ! import javax.naming.*; ! import java.util.*; /** * @author Tom Tromey --- 38,48 ---- package javax.naming.directory; ! import java.util.NoSuchElementException; ! import java.util.Vector; ! import javax.naming.NamingEnumeration; ! import javax.naming.NamingException; ! import javax.naming.OperationNotSupportedException; /** * @author Tom Tromey *************** import java.util.*; *** 47,52 **** --- 50,57 ---- */ public class BasicAttribute implements Attribute { + private static final long serialVersionUID = 6743528196119291326L; + /** The ID of this attribute. */ protected String attrID; /** True if this attribute's values are ordered. */ *************** public class BasicAttribute implements A *** 159,164 **** --- 164,170 ---- } public Object get () + throws NamingException { if (values.size () == 0) throw new NoSuchElementException ("no values"); *************** public class BasicAttribute implements A *** 166,176 **** --- 172,184 ---- } public Object get (int index) + throws NamingException { return values.get (index); } public NamingEnumeration getAll () + throws NamingException { return new BasicAttributeEnumeration (); } diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/directory/BasicAttributes.java gcc-3.4.0/libjava/javax/naming/directory/BasicAttributes.java *** gcc-3.3.3/libjava/javax/naming/directory/BasicAttributes.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/directory/BasicAttributes.java 2003-06-27 13:06:50.000000000 +0000 *************** exception statement from your version. * *** 38,45 **** package javax.naming.directory; ! import javax.naming.*; ! import java.util.*; /** * @author Tom Tromey --- 38,47 ---- package javax.naming.directory; ! import java.util.NoSuchElementException; ! import java.util.Vector; ! import javax.naming.NamingEnumeration; ! import javax.naming.NamingException; /** * @author Tom Tromey *************** import java.util.*; *** 47,52 **** --- 49,56 ---- */ public class BasicAttributes implements Attributes { + private static final long serialVersionUID = 4980164073184639448L; + public BasicAttributes () { this (false); diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/directory/DirContext.java gcc-3.4.0/libjava/javax/naming/directory/DirContext.java *** gcc-3.3.3/libjava/javax/naming/directory/DirContext.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/directory/DirContext.java 2003-12-06 08:41:36.000000000 +0000 *************** exception statement from your version. * *** 38,44 **** package javax.naming.directory; ! import javax.naming.*; /** * @author Warren Levy --- 38,47 ---- package javax.naming.directory; ! import javax.naming.Context; ! import javax.naming.Name; ! import javax.naming.NamingEnumeration; ! import javax.naming.NamingException; /** * @author Warren Levy *************** import javax.naming.*; *** 47,80 **** public interface DirContext extends Context { ! public static final int ADD_ATTRIBUTE = 1; ! public static final int REPLACE_ATTRIBUTE = 2; ! public static final int REMOVE_ATTRIBUTE = 3; ! public Attributes getAttributes (String name) throws NamingException; ! public Attributes getAttributes (String name, String[] attrIds) throws NamingException; ! public Attributes getAttributes (Name name) throws NamingException; ! public Attributes getAttributes(Name name, String[] attrIds) throws NamingException; ! public void modifyAttributes(Name name, int mod_op, Attributes attrs) throws NamingException; ! public void modifyAttributes(String name, int mod_op, Attributes attrs) throws NamingException; ! public void modifyAttributes(Name name, ModificationItem[] mods) throws NamingException; ! public void modifyAttributes(String name, ModificationItem[] mods) throws NamingException; ! public void bind(Name name, Object obj, Attributes attrs) throws NamingException; ! public void bind(String name, Object obj, Attributes attrs) throws NamingException; ! public void rebind(Name name, Object obj, Attributes attrs) throws NamingException; ! public void rebind(String name, Object obj, Attributes attrs) throws NamingException; ! public DirContext createSubcontext(Name name, Attributes attrs) throws NamingException; ! public DirContext createSubcontext(String name, Attributes attrs) throws NamingException; ! public DirContext getSchema(Name name) throws NamingException; ! public DirContext getSchema(String name) throws NamingException; ! public DirContext getSchemaClassDefinition(Name name) throws NamingException; ! public DirContext getSchemaClassDefinition(String name) throws NamingException; ! public NamingEnumeration search(Name name, Attributes matchingAttributes, String[] attributesToReturn) throws NamingException; ! public NamingEnumeration search(String name, Attributes matchingAttributes, String[] attributesToReturn) throws NamingException; ! public NamingEnumeration search(Name name, Attributes matchingAttributes) throws NamingException; ! public NamingEnumeration search(String name, Attributes matchingAttributes) throws NamingException; ! public NamingEnumeration search(Name name, String filter, SearchControls cons) throws NamingException; ! public NamingEnumeration search(String name, String filter, SearchControls cons) throws NamingException; ! public NamingEnumeration search(Name name, String filterExpr, Object[] filterArgs, SearchControls cons) throws NamingException; ! public NamingEnumeration search(String name, String filterExpr, Object[] filterArgs, SearchControls cons) throws NamingException; } --- 50,83 ---- public interface DirContext extends Context { ! int ADD_ATTRIBUTE = 1; ! int REPLACE_ATTRIBUTE = 2; ! int REMOVE_ATTRIBUTE = 3; ! Attributes getAttributes (String name) throws NamingException; ! Attributes getAttributes (String name, String[] attrIds) throws NamingException; ! Attributes getAttributes (Name name) throws NamingException; ! Attributes getAttributes(Name name, String[] attrIds) throws NamingException; ! void modifyAttributes(Name name, int mod_op, Attributes attrs) throws NamingException; ! void modifyAttributes(String name, int mod_op, Attributes attrs) throws NamingException; ! void modifyAttributes(Name name, ModificationItem[] mods) throws NamingException; ! void modifyAttributes(String name, ModificationItem[] mods) throws NamingException; ! void bind(Name name, Object obj, Attributes attrs) throws NamingException; ! void bind(String name, Object obj, Attributes attrs) throws NamingException; ! void rebind(Name name, Object obj, Attributes attrs) throws NamingException; ! void rebind(String name, Object obj, Attributes attrs) throws NamingException; ! DirContext createSubcontext(Name name, Attributes attrs) throws NamingException; ! DirContext createSubcontext(String name, Attributes attrs) throws NamingException; ! DirContext getSchema(Name name) throws NamingException; ! DirContext getSchema(String name) throws NamingException; ! DirContext getSchemaClassDefinition(Name name) throws NamingException; ! DirContext getSchemaClassDefinition(String name) throws NamingException; ! NamingEnumeration search(Name name, Attributes matchingAttributes, String[] attributesToReturn) throws NamingException; ! NamingEnumeration search(String name, Attributes matchingAttributes, String[] attributesToReturn) throws NamingException; ! NamingEnumeration search(Name name, Attributes matchingAttributes) throws NamingException; ! NamingEnumeration search(String name, Attributes matchingAttributes) throws NamingException; ! NamingEnumeration search(Name name, String filter, SearchControls cons) throws NamingException; ! NamingEnumeration search(String name, String filter, SearchControls cons) throws NamingException; ! NamingEnumeration search(Name name, String filterExpr, Object[] filterArgs, SearchControls cons) throws NamingException; ! NamingEnumeration search(String name, String filterExpr, Object[] filterArgs, SearchControls cons) throws NamingException; } diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/directory/InitialDirContext.java gcc-3.4.0/libjava/javax/naming/directory/InitialDirContext.java *** gcc-3.3.3/libjava/javax/naming/directory/InitialDirContext.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/directory/InitialDirContext.java 2003-12-06 08:41:36.000000000 +0000 *************** exception statement from your version. * *** 38,45 **** package javax.naming.directory; - import javax.naming.*; import java.util.Hashtable; /** * @author Tom Tromey --- 38,51 ---- package javax.naming.directory; import java.util.Hashtable; + import javax.naming.Context; + import javax.naming.InitialContext; + import javax.naming.Name; + import javax.naming.NamingEnumeration; + import javax.naming.NamingException; + import javax.naming.NoInitialContextException; + import javax.naming.NotContextException; /** * @author Tom Tromey diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/directory/SearchResult.java gcc-3.4.0/libjava/javax/naming/directory/SearchResult.java *** gcc-3.3.3/libjava/javax/naming/directory/SearchResult.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/directory/SearchResult.java 2003-12-06 08:41:36.000000000 +0000 *************** exception statement from your version. * *** 37,44 **** package javax.naming.directory; ! import javax.naming.*; import java.io.Serializable; /** * @author Warren Levy --- 37,45 ---- package javax.naming.directory; ! import java.io.Serializable; + import javax.naming.Binding; /** * @author Warren Levy diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/event/EventContext.java gcc-3.4.0/libjava/javax/naming/event/EventContext.java *** gcc-3.3.3/libjava/javax/naming/event/EventContext.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/event/EventContext.java 2003-12-06 08:41:37.000000000 +0000 *************** exception statement from your version. * *** 37,43 **** package javax.naming.event; ! import javax.naming.*; /** * @author Warren Levy --- 37,46 ---- package javax.naming.event; ! ! import javax.naming.Context; ! import javax.naming.Name; ! import javax.naming.NamingException; /** * @author Warren Levy *************** import javax.naming.*; *** 46,59 **** public interface EventContext extends Context { ! public static final int OBJECT_SCOPE = 0; ! public static final int ONELEVEL_SCOPE = 1; ! public static final int SUBTREE_SCOPE = 2; ! public void addNamingListener(Name target, int scope, NamingListener l) throws NamingException; ! public void addNamingListener(String target, int scope, NamingListener l) throws NamingException; ! public void removeNamingListener(NamingListener l) throws NamingException; ! public boolean targetMustExist() throws NamingException; } --- 49,65 ---- public interface EventContext extends Context { ! int OBJECT_SCOPE = 0; ! int ONELEVEL_SCOPE = 1; ! int SUBTREE_SCOPE = 2; ! void addNamingListener (Name target, int scope, NamingListener l) throws NamingException; ! ! void addNamingListener (String target, int scope, NamingListener l) throws NamingException; ! ! void removeNamingListener (NamingListener l) throws NamingException; ! ! boolean targetMustExist() throws NamingException; } diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/event/EventDirContext.java gcc-3.4.0/libjava/javax/naming/event/EventDirContext.java *** gcc-3.3.3/libjava/javax/naming/event/EventDirContext.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/event/EventDirContext.java 2003-12-11 15:41:21.000000000 +0000 *************** this exception to your version of the li *** 35,61 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package javax.naming.event; ! import javax.naming.*; ! import javax.naming.directory.*; ! /** * @author Warren Levy * @date June 1, 2001 */ - public interface EventDirContext extends EventContext, DirContext { ! public void addNamingListener(Name target, String filter, SearchControls ctls, ! NamingListener l) throws NamingException; ! public void addNamingListener(String target, String filter, ! SearchControls ctls, NamingListener l) ! throws NamingException; ! public void addNamingListener(Name target, String filter, Object[] filterArgs, ! SearchControls ctls, NamingListener l) ! throws NamingException; ! public void addNamingListener(String target, String filter, ! Object[] filterArgs, SearchControls ctls, ! NamingListener l) throws NamingException; } --- 35,65 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.naming.event; ! ! import javax.naming.Name; ! import javax.naming.NamingException; ! import javax.naming.directory.DirContext; ! import javax.naming.directory.SearchControls; ! ! /** * @author Warren Levy * @date June 1, 2001 */ public interface EventDirContext extends EventContext, DirContext { ! void addNamingListener(Name target, String filter, SearchControls ctls, ! NamingListener l) throws NamingException; ! ! void addNamingListener(String target, String filter, SearchControls ctls, ! NamingListener l) throws NamingException; ! ! void addNamingListener(Name target, String filter, Object[] filterArgs, ! SearchControls ctls, NamingListener l) ! throws NamingException; ! ! void addNamingListener(String target, String filter, Object[] filterArgs, ! SearchControls ctls, NamingListener l) ! throws NamingException; } diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/event/NamespaceChangeListener.java gcc-3.4.0/libjava/javax/naming/event/NamespaceChangeListener.java *** gcc-3.3.3/libjava/javax/naming/event/NamespaceChangeListener.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/event/NamespaceChangeListener.java 2003-10-11 19:06:23.000000000 +0000 *************** package javax.naming.event; *** 45,51 **** public interface NamespaceChangeListener extends NamingListener { ! public void objectAdded(NamingEvent evt); ! public void objectRemoved(NamingEvent evt); ! public void objectRenamed(NamingEvent evt); } --- 45,51 ---- public interface NamespaceChangeListener extends NamingListener { ! void objectAdded(NamingEvent evt); ! void objectRemoved(NamingEvent evt); ! void objectRenamed(NamingEvent evt); } diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/event/NamingEvent.java gcc-3.4.0/libjava/javax/naming/event/NamingEvent.java *** gcc-3.3.3/libjava/javax/naming/event/NamingEvent.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/event/NamingEvent.java 2003-12-06 08:41:37.000000000 +0000 *************** exception statement from your version. * *** 37,44 **** package javax.naming.event; ! import javax.naming.*; import java.util.EventObject; /** * @author Warren Levy --- 37,45 ---- package javax.naming.event; ! import java.util.EventObject; + import javax.naming.Binding; /** * @author Warren Levy diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/event/NamingExceptionEvent.java gcc-3.4.0/libjava/javax/naming/event/NamingExceptionEvent.java *** gcc-3.3.3/libjava/javax/naming/event/NamingExceptionEvent.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/event/NamingExceptionEvent.java 2003-12-06 08:41:37.000000000 +0000 *************** exception statement from your version. * *** 37,44 **** package javax.naming.event; ! import javax.naming.*; import java.util.EventObject; /** * @author Warren Levy --- 37,47 ---- package javax.naming.event; ! import java.util.EventObject; + import javax.naming.Context; + import javax.naming.Name; + import javax.naming.NamingException; /** * @author Warren Levy diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/event/NamingListener.java gcc-3.4.0/libjava/javax/naming/event/NamingListener.java *** gcc-3.3.3/libjava/javax/naming/event/NamingListener.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/event/NamingListener.java 2003-10-11 19:06:23.000000000 +0000 *************** import java.util.EventListener; *** 46,50 **** public interface NamingListener extends EventListener { ! public void namingExceptionThrown(NamingExceptionEvent evt); } --- 46,50 ---- public interface NamingListener extends EventListener { ! void namingExceptionThrown(NamingExceptionEvent evt); } diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/event/ObjectChangeListener.java gcc-3.4.0/libjava/javax/naming/event/ObjectChangeListener.java *** gcc-3.3.3/libjava/javax/naming/event/ObjectChangeListener.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/event/ObjectChangeListener.java 2003-10-11 19:06:23.000000000 +0000 *************** package javax.naming.event; *** 45,49 **** public interface ObjectChangeListener extends NamingListener { ! public void objectChanged(NamingEvent evt); } --- 45,49 ---- public interface ObjectChangeListener extends NamingListener { ! void objectChanged(NamingEvent evt); } diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/InitialContext.java gcc-3.4.0/libjava/javax/naming/InitialContext.java *** gcc-3.3.3/libjava/javax/naming/InitialContext.java 2002-12-31 22:49:37.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/InitialContext.java 2003-10-29 14:54:00.000000000 +0000 *************** *** 1,5 **** /* InitialContext.java -- ! Copyright (C) 2000, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* InitialContext.java -- ! Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 38,43 **** --- 38,44 ---- package javax.naming; + import java.applet.Applet; import java.io.File; import java.io.FileInputStream; import java.io.IOException; *************** import java.net.URL; *** 46,53 **** import java.util.Enumeration; import java.util.Hashtable; import java.util.Properties; - import java.applet.Applet; - import java.util.Hashtable; import javax.naming.spi.NamingManager; public class InitialContext implements Context --- 47,52 ---- *************** public class InitialContext implements C *** 57,222 **** protected Hashtable myProps; public InitialContext (Hashtable environment) ! { ! init (environment); ! } protected InitialContext (boolean lazy) ! { ! if (! lazy) ! init (null); ! } ! ! public InitialContext () ! { init (null); ! } protected void init (Hashtable environment) ! { ! // FIXME: Is this enough? ! final String[] properties = { ! Context.DNS_URL, ! Context.INITIAL_CONTEXT_FACTORY, ! Context.OBJECT_FACTORIES, ! Context.PROVIDER_URL, ! Context.STATE_FACTORIES, ! Context.URL_PKG_PREFIXES, ! }; ! // Create myProps, cloning environment if needed. ! if (environment != null) ! myProps = (Hashtable) environment.clone (); ! else ! myProps = new Hashtable (); ! Applet napplet = (Applet) myProps.get (Context.APPLET); ! for (int i = properties.length - 1; i >= 0; i--) ! { ! Object o = myProps.get (properties[i]); ! if (o == null) ! { ! if (napplet != null) ! o = napplet.getParameter (properties[i]); ! if (o == null) ! o = System.getProperty (properties[i]); ! if (o != null) ! myProps.put (properties[i], o); ! } ! } ! ! try ! { ! Enumeration ep = Thread.currentThread().getContextClassLoader().getResources("jndi.naming"); ! while (ep.hasMoreElements ()) ! { ! URL url = (URL) ep.nextElement (); ! Properties p = new Properties (); ! try { ! InputStream is = url.openStream (); ! p.load (is); ! is.close (); ! } catch (IOException e) {} ! merge (myProps, p); ! } ! } ! catch (IOException e) {} ! String home = System.getProperty("gnu.classpath.home.url"); ! if (home != null) ! { ! String url = home + "/jndi.properties"; ! Properties p = new Properties (); ! try ! { ! InputStream is = new URL(url).openStream(); ! p.load (is); ! is.close (); ! } ! catch (IOException e) ! { ! // Ignore. ! } ! merge (myProps, p); ! } ! } // FIXME: Is this enough? private static final String[] colon_list = ! { ! Context.OBJECT_FACTORIES, ! Context.URL_PKG_PREFIXES, ! Context.STATE_FACTORIES ! }; private static void merge (Hashtable h1, Hashtable h2) ! { ! Enumeration e2 = h2.keys(); ! while (e2.hasMoreElements()) ! { ! String key2 = (String) e2.nextElement(); ! Object value1 = h1.get(key2); ! if (value1 == null) ! h1.put(key2, h2.get(key2)); ! else if (key2.compareTo(colon_list[0]) == 0 ! || key2.compareTo(colon_list[1]) == 0 ! || key2.compareTo(colon_list[2]) == 0 ! || key2.compareTo(colon_list[3]) == 0) ! { ! String value2 = (String) h2.get(key2); ! h1.put(key2, (String) value1 + ":" + value2); ! } ! } ! } protected Context getDefaultInitCtx () throws NamingException ! { ! if (! gotDefault) ! { ! defaultInitCtx = NamingManager.getInitialContext (myProps); ! gotDefault = true; ! } ! return defaultInitCtx; ! } protected Context getURLOrDefaultInitCtx (Name name) ! throws NamingException ! { ! if (name.size () > 0) ! return getURLOrDefaultInitCtx (name.get (0)); ! else ! return getDefaultInitCtx (); ! } protected Context getURLOrDefaultInitCtx (String name) ! throws NamingException ! { ! String scheme = null; ! if (NamingManager.hasInitialContextFactoryBuilder()) ! return getDefaultInitCtx(); ! int colon = name.indexOf(':'); ! int slash = name.indexOf('/'); ! if (colon > 0 && (slash == -1 || colon < slash)) ! scheme = name.substring(0, colon); ! if (scheme != null) ! { ! Context context = ! NamingManager.getURLContext(scheme, myProps); ! if (context != null) ! return context; ! } ! return getDefaultInitCtx(); ! } public void bind (Name name, Object obj) throws NamingException { --- 56,232 ---- protected Hashtable myProps; public InitialContext (Hashtable environment) ! throws NamingException ! { ! init (environment); ! } protected InitialContext (boolean lazy) ! throws NamingException ! { ! if (! lazy) init (null); ! } + public InitialContext () + throws NamingException + { + init (null); + } + + /** @since 1.3 */ protected void init (Hashtable environment) ! throws NamingException ! { ! // FIXME: Is this enough? ! final String[] properties = { ! Context.DNS_URL, ! Context.INITIAL_CONTEXT_FACTORY, ! Context.OBJECT_FACTORIES, ! Context.PROVIDER_URL, ! Context.STATE_FACTORIES, ! Context.URL_PKG_PREFIXES, ! }; ! // Create myProps, cloning environment if needed. ! if (environment != null) ! myProps = (Hashtable) environment.clone (); ! else ! myProps = new Hashtable (); ! Applet napplet = (Applet) myProps.get (Context.APPLET); ! for (int i = properties.length - 1; i >= 0; i--) ! { ! Object o = myProps.get (properties[i]); ! if (o == null) ! { ! if (napplet != null) ! o = napplet.getParameter (properties[i]); ! if (o == null) ! o = System.getProperty (properties[i]); ! if (o != null) ! myProps.put (properties[i], o); ! } ! } ! ! try ! { ! Enumeration ep = Thread.currentThread().getContextClassLoader().getResources("jndi.naming"); ! while (ep.hasMoreElements ()) ! { ! URL url = (URL) ep.nextElement (); ! Properties p = new Properties (); ! try ! { ! InputStream is = url.openStream (); ! p.load (is); ! is.close (); ! } ! catch (IOException e) ! { ! } ! merge (myProps, p); ! } ! } ! catch (IOException e) ! { ! } ! String home = System.getProperty("gnu.classpath.home.url"); ! if (home != null) ! { ! String url = home + "/jndi.properties"; ! Properties p = new Properties (); ! try ! { ! InputStream is = new URL(url).openStream(); ! p.load (is); ! is.close (); ! } ! catch (IOException e) ! { ! // Ignore. ! } ! merge (myProps, p); ! } ! } // FIXME: Is this enough? private static final String[] colon_list = ! { ! Context.OBJECT_FACTORIES, ! Context.URL_PKG_PREFIXES, ! Context.STATE_FACTORIES ! }; private static void merge (Hashtable h1, Hashtable h2) ! { ! Enumeration e2 = h2.keys(); ! while (e2.hasMoreElements()) ! { ! String key2 = (String) e2.nextElement(); ! Object value1 = h1.get(key2); ! if (value1 == null) ! h1.put(key2, h2.get(key2)); ! else if (key2.compareTo(colon_list[0]) == 0 ! || key2.compareTo(colon_list[1]) == 0 ! || key2.compareTo(colon_list[2]) == 0 ! || key2.compareTo(colon_list[3]) == 0) ! { ! String value2 = (String) h2.get(key2); ! h1.put(key2, (String) value1 + ":" + value2); ! } ! } ! } protected Context getDefaultInitCtx () throws NamingException ! { ! if (! gotDefault) ! { ! defaultInitCtx = NamingManager.getInitialContext (myProps); ! gotDefault = true; ! } ! return defaultInitCtx; ! } protected Context getURLOrDefaultInitCtx (Name name) ! throws NamingException ! { ! if (name.size () > 0) ! return getURLOrDefaultInitCtx (name.get (0)); ! else ! return getDefaultInitCtx (); ! } protected Context getURLOrDefaultInitCtx (String name) ! throws NamingException ! { ! String scheme = null; ! if (NamingManager.hasInitialContextFactoryBuilder()) return getDefaultInitCtx(); ! int colon = name.indexOf(':'); ! int slash = name.indexOf('/'); ! if (colon > 0 && (slash == -1 || colon < slash)) ! scheme = name.substring(0, colon); ! if (scheme != null) ! { ! Context context = ! NamingManager.getURLContext(scheme, myProps); ! if (context != null) ! return context; ! } ! ! return getDefaultInitCtx(); ! } public void bind (Name name, Object obj) throws NamingException { *************** public class InitialContext implements C *** 230,241 **** public Object lookup (Name name) throws NamingException { ! return getURLOrDefaultInitCtx (name).lookup (name); } public Object lookup (String name) throws NamingException { ! return getURLOrDefaultInitCtx (name).lookup (name); } public void rebind (Name name, Object obj) throws NamingException --- 240,267 ---- public Object lookup (Name name) throws NamingException { ! try ! { ! return getURLOrDefaultInitCtx (name).lookup (name); ! } ! catch (CannotProceedException cpe) ! { ! Context ctx = NamingManager.getContinuationContext (cpe); ! return ctx.lookup (cpe.getRemainingName()); ! } } public Object lookup (String name) throws NamingException { ! try ! { ! return getURLOrDefaultInitCtx (name).lookup (name); ! } ! catch (CannotProceedException cpe) ! { ! Context ctx = NamingManager.getContinuationContext (cpe); ! return ctx.lookup (cpe.getRemainingName()); ! } } public void rebind (Name name, Object obj) throws NamingException *************** public class InitialContext implements C *** 334,346 **** } public String composeName (String name, ! String prefix) throws NamingException { return getURLOrDefaultInitCtx (name).composeName (name, prefix); } public Object addToEnvironment (String propName, ! Object propVal) throws NamingException { return myProps.put (propName, propVal); } --- 360,372 ---- } public String composeName (String name, ! String prefix) throws NamingException { return getURLOrDefaultInitCtx (name).composeName (name, prefix); } public Object addToEnvironment (String propName, ! Object propVal) throws NamingException { return myProps.put (propName, propVal); } *************** public class InitialContext implements C *** 357,363 **** public void close () throws NamingException { ! throw new OperationNotSupportedException (); } public String getNameInNamespace () throws NamingException --- 383,390 ---- public void close () throws NamingException { ! myProps = null; ! defaultInitCtx = null; } public String getNameInNamespace () throws NamingException diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/ldap/ControlFactory.java gcc-3.4.0/libjava/javax/naming/ldap/ControlFactory.java *** gcc-3.3.3/libjava/javax/naming/ldap/ControlFactory.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/ldap/ControlFactory.java 2003-12-06 08:41:37.000000000 +0000 *************** exception statement from your version. * *** 38,46 **** package javax.naming.ldap; - import javax.naming.*; - import java.util.StringTokenizer; import java.util.Hashtable; /** * @author Tom Tromey --- 38,47 ---- package javax.naming.ldap; import java.util.Hashtable; + import java.util.StringTokenizer; + import javax.naming.Context; + import javax.naming.NamingException; /** * @author Tom Tromey diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/ldap/Control.java gcc-3.4.0/libjava/javax/naming/ldap/Control.java *** gcc-3.3.3/libjava/javax/naming/ldap/Control.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/ldap/Control.java 2003-10-11 19:06:23.000000000 +0000 *************** import java.io.Serializable; *** 46,55 **** public interface Control extends Serializable { ! public static final boolean CRITICAL = true; ! public static final boolean NONCRITICAL = false; ! public String getID(); ! public boolean isCritical(); ! public byte[] getEncodedValue(); } --- 46,55 ---- public interface Control extends Serializable { ! boolean CRITICAL = true; ! boolean NONCRITICAL = false; ! String getID(); ! boolean isCritical(); ! byte[] getEncodedValue(); } diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/ldap/ExtendedRequest.java gcc-3.4.0/libjava/javax/naming/ldap/ExtendedRequest.java *** gcc-3.3.3/libjava/javax/naming/ldap/ExtendedRequest.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/ldap/ExtendedRequest.java 2003-12-06 08:41:37.000000000 +0000 *************** exception statement from your version. * *** 37,44 **** package javax.naming.ldap; import java.io.Serializable; ! import javax.naming.*; /** * @author Warren Levy --- 37,45 ---- package javax.naming.ldap; + import java.io.Serializable; ! import javax.naming.NamingException; /** * @author Warren Levy *************** import javax.naming.*; *** 47,55 **** public interface ExtendedRequest extends Serializable { ! public String getID(); ! public byte[] getEncodedValue(); ! public ExtendedResponse createExtendedResponse(String id, byte[] berValue, int offset, int length) throws NamingException; --- 48,56 ---- public interface ExtendedRequest extends Serializable { ! String getID(); ! byte[] getEncodedValue(); ! ExtendedResponse createExtendedResponse(String id, byte[] berValue, int offset, int length) throws NamingException; diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/ldap/ExtendedResponse.java gcc-3.4.0/libjava/javax/naming/ldap/ExtendedResponse.java *** gcc-3.3.3/libjava/javax/naming/ldap/ExtendedResponse.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/ldap/ExtendedResponse.java 2003-10-11 19:06:23.000000000 +0000 *************** import java.io.Serializable; *** 46,51 **** public interface ExtendedResponse extends Serializable { ! public String getID(); ! public byte[] getEncodedValue(); } --- 46,51 ---- public interface ExtendedResponse extends Serializable { ! String getID(); ! byte[] getEncodedValue(); } diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/ldap/HasControls.java gcc-3.4.0/libjava/javax/naming/ldap/HasControls.java *** gcc-3.3.3/libjava/javax/naming/ldap/HasControls.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/ldap/HasControls.java 2003-12-06 08:41:37.000000000 +0000 *************** exception statement from your version. * *** 37,43 **** package javax.naming.ldap; ! import javax.naming.*; /** * @author Warren Levy --- 37,44 ---- package javax.naming.ldap; ! ! import javax.naming.NamingException; /** * @author Warren Levy *************** import javax.naming.*; *** 46,50 **** public interface HasControls { ! public Control[] getControls() throws NamingException; } --- 47,51 ---- public interface HasControls { ! Control[] getControls() throws NamingException; } diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/ldap/InitialLdapContext.java gcc-3.4.0/libjava/javax/naming/ldap/InitialLdapContext.java *** gcc-3.3.3/libjava/javax/naming/ldap/InitialLdapContext.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/ldap/InitialLdapContext.java 2003-12-06 08:41:37.000000000 +0000 *************** exception statement from your version. * *** 38,46 **** package javax.naming.ldap; - import javax.naming.*; - import javax.naming.directory.InitialDirContext; import java.util.Hashtable; /** * @author Tom Tromey --- 38,49 ---- package javax.naming.ldap; import java.util.Hashtable; + import javax.naming.Context; + import javax.naming.NamingException; + import javax.naming.NoInitialContextException; + import javax.naming.NotContextException; + import javax.naming.directory.InitialDirContext; /** * @author Tom Tromey diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/ldap/LdapContext.java gcc-3.4.0/libjava/javax/naming/ldap/LdapContext.java *** gcc-3.3.3/libjava/javax/naming/ldap/LdapContext.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/ldap/LdapContext.java 2003-12-06 08:41:37.000000000 +0000 *************** exception statement from your version. * *** 37,44 **** package javax.naming.ldap; ! import javax.naming.*; ! import javax.naming.directory.*; /** * @author Warren Levy --- 37,45 ---- package javax.naming.ldap; ! ! import javax.naming.NamingException; ! import javax.naming.directory.DirContext; /** * @author Warren Levy *************** import javax.naming.directory.*; *** 47,62 **** public interface LdapContext extends DirContext { ! public static final String CONTROL_FACTORIES = "java.naming.factory.control"; ! public ExtendedResponse extendedOperation(ExtendedRequest request) throws NamingException; ! public LdapContext newInstance(Control[] requestControls) throws NamingException; ! public void reconnect(Control[] connCtls) throws NamingException; ! public Control[] getConnectControls() throws NamingException; ! public void setRequestControls(Control[] requestControls) throws NamingException; ! public Control[] getRequestControls() throws NamingException; ! public Control[] getResponseControls() throws NamingException; } --- 48,63 ---- public interface LdapContext extends DirContext { ! String CONTROL_FACTORIES = "java.naming.factory.control"; ! ExtendedResponse extendedOperation(ExtendedRequest request) throws NamingException; ! LdapContext newInstance(Control[] requestControls) throws NamingException; ! void reconnect(Control[] connCtls) throws NamingException; ! Control[] getConnectControls() throws NamingException; ! void setRequestControls(Control[] requestControls) throws NamingException; ! Control[] getRequestControls() throws NamingException; ! Control[] getResponseControls() throws NamingException; } diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/ldap/LdapReferralException.java gcc-3.4.0/libjava/javax/naming/ldap/LdapReferralException.java *** gcc-3.3.3/libjava/javax/naming/ldap/LdapReferralException.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/ldap/LdapReferralException.java 2003-12-06 08:41:37.000000000 +0000 *************** exception statement from your version. * *** 37,44 **** package javax.naming.ldap; ! import javax.naming.*; import java.util.Hashtable; /** * @author Warren Levy --- 37,47 ---- package javax.naming.ldap; ! import java.util.Hashtable; + import javax.naming.Context; + import javax.naming.NamingException; + import javax.naming.ReferralException; /** * @author Warren Levy diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/ldap/UnsolicitedNotificationEvent.java gcc-3.4.0/libjava/javax/naming/ldap/UnsolicitedNotificationEvent.java *** gcc-3.3.3/libjava/javax/naming/ldap/UnsolicitedNotificationEvent.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/ldap/UnsolicitedNotificationEvent.java 2003-06-27 13:06:50.000000000 +0000 *************** exception statement from your version. * *** 37,51 **** package javax.naming.ldap; import java.util.EventObject; /** * @author Warren Levy * @date June 5, 2001 */ - public class UnsolicitedNotificationEvent extends EventObject { // Serialized fields. private UnsolicitedNotification notice; --- 37,53 ---- package javax.naming.ldap; + import java.util.EventObject; /** * @author Warren Levy * @date June 5, 2001 */ public class UnsolicitedNotificationEvent extends EventObject { + private static final long serialVersionUID = -2382603380799883705L; + // Serialized fields. private UnsolicitedNotification notice; diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/ldap/UnsolicitedNotification.java gcc-3.4.0/libjava/javax/naming/ldap/UnsolicitedNotification.java *** gcc-3.3.3/libjava/javax/naming/ldap/UnsolicitedNotification.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/ldap/UnsolicitedNotification.java 2003-12-06 08:41:37.000000000 +0000 *************** exception statement from your version. * *** 37,43 **** package javax.naming.ldap; ! import javax.naming.*; /** * @author Warren Levy --- 37,44 ---- package javax.naming.ldap; ! ! import javax.naming.NamingException; /** * @author Warren Levy *************** import javax.naming.*; *** 46,51 **** public interface UnsolicitedNotification extends ExtendedResponse, HasControls { ! public String[] getReferrals(); ! public NamingException getException(); } --- 47,52 ---- public interface UnsolicitedNotification extends ExtendedResponse, HasControls { ! String[] getReferrals(); ! NamingException getException(); } diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/ldap/UnsolicitedNotificationListener.java gcc-3.4.0/libjava/javax/naming/ldap/UnsolicitedNotificationListener.java *** gcc-3.3.3/libjava/javax/naming/ldap/UnsolicitedNotificationListener.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/ldap/UnsolicitedNotificationListener.java 2003-12-06 08:41:37.000000000 +0000 *************** exception statement from your version. * *** 37,43 **** package javax.naming.ldap; ! import javax.naming.event.*; /** * @author Warren Levy --- 37,44 ---- package javax.naming.ldap; ! ! import javax.naming.event.NamingListener; /** * @author Warren Levy *************** import javax.naming.event.*; *** 46,50 **** public interface UnsolicitedNotificationListener extends NamingListener { ! public void notificationReceived(UnsolicitedNotificationEvent evt); } --- 47,51 ---- public interface UnsolicitedNotificationListener extends NamingListener { ! void notificationReceived(UnsolicitedNotificationEvent evt); } diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/LinkRef.java gcc-3.4.0/libjava/javax/naming/LinkRef.java *** gcc-3.3.3/libjava/javax/naming/LinkRef.java 2002-11-23 21:50:39.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/LinkRef.java 2003-06-27 13:06:50.000000000 +0000 *************** import java.io.Serializable; *** 46,51 **** --- 46,53 ---- */ public class LinkRef extends Reference { + private static final long serialVersionUID = -5386290613498931298L; + public LinkRef (Name name) { this (name.toString ()); *************** public class LinkRef extends Reference *** 58,63 **** --- 60,66 ---- } public String getLinkName () + throws NamingException { StringRefAddr sra = (StringRefAddr) get (0); return (String) sra.getContent (); diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/Name.java gcc-3.4.0/libjava/javax/naming/Name.java *** gcc-3.3.3/libjava/javax/naming/Name.java 2002-10-04 08:48:03.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/Name.java 2003-10-11 19:06:21.000000000 +0000 *************** import java.io.Serializable; *** 62,86 **** */ public interface Name extends Cloneable, Serializable { ! static final long serialVersionUID = -3617482732056931635L; /** * Returns the number of components of this Name. * The returned number can be zero. */ ! public int size(); /** * Returns true if the number of components of this * Name is zero, false otherwise. */ ! public boolean isEmpty(); /** * Returns a non-null (but possibly empty) Enumeration of the * components of the Name as Strings. */ ! public Enumeration getAll(); /** * Gets the component at the given index. --- 62,86 ---- */ public interface Name extends Cloneable, Serializable { ! long serialVersionUID = -3617482732056931635L; /** * Returns the number of components of this Name. * The returned number can be zero. */ ! int size(); /** * Returns true if the number of components of this * Name is zero, false otherwise. */ ! boolean isEmpty(); /** * Returns a non-null (but possibly empty) Enumeration of the * components of the Name as Strings. */ ! Enumeration getAll(); /** * Gets the component at the given index. *************** public interface Name extends Cloneable, *** 88,94 **** * @exception ArrayIndexOutOfBoundsException if the given index is smaller * then zero or greater then or equal to size(). */ ! public String get(int i); /** * Returns the components till the given index as a Name. --- 88,94 ---- * @exception ArrayIndexOutOfBoundsException if the given index is smaller * then zero or greater then or equal to size(). */ ! String get(int i); /** * Returns the components till the given index as a Name. *************** public interface Name extends Cloneable, *** 98,104 **** * @exception ArrayIndexOutOfBoundsException if the given index is smaller * then zero or greater then or equal to size(). */ ! public Name getPrefix(int i); /** * Returns the components from the given index till the end as a --- 98,104 ---- * @exception ArrayIndexOutOfBoundsException if the given index is smaller * then zero or greater then or equal to size(). */ ! Name getPrefix(int i); /** * Returns the components from the given index till the end as a *************** public interface Name extends Cloneable, *** 109,115 **** * @exception ArrayIndexOutOfBoundsException if the given index is smaller * then zero or greater then or equal to size(). */ ! public Name getSuffix(int i); /** * Adds the given String component to the end of this --- 109,115 ---- * @exception ArrayIndexOutOfBoundsException if the given index is smaller * then zero or greater then or equal to size(). */ ! Name getSuffix(int i); /** * Adds the given String component to the end of this *************** public interface Name extends Cloneable, *** 119,125 **** * @exception InvalidNameException if the given String is not a * valid component for this Name. */ ! public Name add(String comp) throws InvalidNameException; /** * Inserts the given String component to this Name --- 119,125 ---- * @exception InvalidNameException if the given String is not a * valid component for this Name. */ ! Name add(String comp) throws InvalidNameException; /** * Inserts the given String component to this Name *************** public interface Name extends Cloneable, *** 131,137 **** * @exception InvalidNameException if the given String is not a * valid component for this Name. */ ! public Name add(int posn, String comp) throws InvalidNameException; /** * Adds all the components of the given Name to the end of this --- 131,137 ---- * @exception InvalidNameException if the given String is not a * valid component for this Name. */ ! Name add(int posn, String comp) throws InvalidNameException; /** * Adds all the components of the given Name to the end of this *************** public interface Name extends Cloneable, *** 141,147 **** * @exception InvalidNameException if any of the given components is not a * valid component for this Name. */ ! public Name addAll(Name suffix) throws InvalidNameException; /** * Inserts all the components of the given Name to this --- 141,147 ---- * @exception InvalidNameException if any of the given components is not a * valid component for this Name. */ ! Name addAll(Name suffix) throws InvalidNameException; /** * Inserts all the components of the given Name to this *************** public interface Name extends Cloneable, *** 153,159 **** * @exception InvalidNameException if any of the given components is not a * valid component for this Name. */ ! public Name addAll(int posn, Name n) throws InvalidNameException; /** * Removes the component at the given index from this Name. --- 153,159 ---- * @exception InvalidNameException if any of the given components is not a * valid component for this Name. */ ! Name addAll(int posn, Name n) throws InvalidNameException; /** * Removes the component at the given index from this Name. *************** public interface Name extends Cloneable, *** 162,180 **** * @exception InvalidNameException if the given String is not a * valid component for this Name. */ ! public Object remove(int posn) throws InvalidNameException; /** * Returns true if this Name starts with the * components of the given Name, false otherwise. */ ! public boolean startsWith(Name name); /** * Returns true if this Name ends with the * components of the given Name, false otherwise. */ ! public boolean endsWith(Name name); /** * Compares the given object to this Name. --- 162,180 ---- * @exception InvalidNameException if the given String is not a * valid component for this Name. */ ! Object remove(int posn) throws InvalidNameException; /** * Returns true if this Name starts with the * components of the given Name, false otherwise. */ ! boolean startsWith(Name name); /** * Returns true if this Name ends with the * components of the given Name, false otherwise. */ ! boolean endsWith(Name name); /** * Compares the given object to this Name. *************** public interface Name extends Cloneable, *** 187,198 **** * be compared. The definition of smaller, bigger and equal is up to the * actual implementing class. */ ! public int compareTo(Object obj); /** * Returns a clone of this Name. It will be a deep copy of * all the components of the Name so that changes to components * of the components does not change the component in this Name. */ ! public Object clone(); } --- 187,198 ---- * be compared. The definition of smaller, bigger and equal is up to the * actual implementing class. */ ! int compareTo(Object obj); /** * Returns a clone of this Name. It will be a deep copy of * all the components of the Name so that changes to components * of the components does not change the component in this Name. */ ! Object clone(); } diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/NameParser.java gcc-3.4.0/libjava/javax/naming/NameParser.java *** gcc-3.3.3/libjava/javax/naming/NameParser.java 2002-11-23 21:50:39.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/NameParser.java 2003-10-11 19:06:21.000000000 +0000 *************** package javax.naming; *** 40,46 **** public interface NameParser { ! public Name parse (String name) throws NamingException; } --- 40,46 ---- public interface NameParser { ! Name parse (String name) throws NamingException; } diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/NamingEnumeration.java gcc-3.4.0/libjava/javax/naming/NamingEnumeration.java *** gcc-3.3.3/libjava/javax/naming/NamingEnumeration.java 2002-11-23 21:50:39.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/NamingEnumeration.java 2003-10-11 19:06:21.000000000 +0000 *************** import java.util.Enumeration; *** 42,48 **** public interface NamingEnumeration extends Enumeration { ! public void close() throws NamingException; ! public boolean hasMore() throws NamingException; ! public Object next() throws NamingException; } --- 42,48 ---- public interface NamingEnumeration extends Enumeration { ! void close() throws NamingException; ! boolean hasMore() throws NamingException; ! Object next() throws NamingException; } diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/NamingException.java gcc-3.4.0/libjava/javax/naming/NamingException.java *** gcc-3.3.3/libjava/javax/naming/NamingException.java 2002-09-16 09:46:37.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/NamingException.java 2003-06-27 13:06:50.000000000 +0000 *************** import java.io.PrintWriter; *** 55,60 **** --- 55,61 ---- */ public class NamingException extends Exception { + private static final long serialVersionUID = -1299181962103167177L; /** * The root cause of this exception. Might be null. Set by calling diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/NamingSecurityException.java gcc-3.4.0/libjava/javax/naming/NamingSecurityException.java *** gcc-3.3.3/libjava/javax/naming/NamingSecurityException.java 2002-11-23 21:50:39.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/NamingSecurityException.java 2003-06-27 13:06:50.000000000 +0000 *************** package javax.naming; *** 40,47 **** import java.lang.Exception; ! public class NamingSecurityException extends NamingException { public NamingSecurityException () { super (); --- 40,49 ---- import java.lang.Exception; ! public abstract class NamingSecurityException extends NamingException { + private static final long serialVersionUID = 5855287647294685775L; + public NamingSecurityException () { super (); diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/Referenceable.java gcc-3.4.0/libjava/javax/naming/Referenceable.java *** gcc-3.3.3/libjava/javax/naming/Referenceable.java 2002-11-23 21:50:39.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/Referenceable.java 2003-10-11 19:06:21.000000000 +0000 *************** package javax.naming; *** 40,44 **** public interface Referenceable { ! public Reference getReference() throws NamingException; } --- 40,44 ---- public interface Referenceable { ! Reference getReference() throws NamingException; } diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/ReferralException.java gcc-3.4.0/libjava/javax/naming/ReferralException.java *** gcc-3.3.3/libjava/javax/naming/ReferralException.java 2002-11-23 21:50:39.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/ReferralException.java 2003-06-27 13:06:50.000000000 +0000 *************** import java.util.Hashtable; *** 48,53 **** --- 48,55 ---- public abstract class ReferralException extends NamingException { + private static final long serialVersionUID = -2881363844695698876L; + protected ReferralException () { super (); diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/spi/DirectoryManager.java gcc-3.4.0/libjava/javax/naming/spi/DirectoryManager.java *** gcc-3.3.3/libjava/javax/naming/spi/DirectoryManager.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/spi/DirectoryManager.java 2003-12-06 08:41:38.000000000 +0000 *************** exception statement from your version. * *** 38,48 **** package javax.naming.spi; ! import javax.naming.*; ! import javax.naming.directory.*; import java.util.Hashtable; import java.util.StringTokenizer; ! import java.util.Enumeration; /** * @author Tom Tromey --- 38,56 ---- package javax.naming.spi; ! import java.util.Enumeration; import java.util.Hashtable; import java.util.StringTokenizer; ! import javax.naming.CannotProceedException; ! import javax.naming.Context; ! import javax.naming.Name; ! import javax.naming.NamingException; ! import javax.naming.RefAddr; ! import javax.naming.Reference; ! import javax.naming.Referenceable; ! import javax.naming.StringRefAddr; ! import javax.naming.directory.Attributes; ! import javax.naming.directory.DirContext; /** * @author Tom Tromey diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/spi/DirObjectFactory.java gcc-3.4.0/libjava/javax/naming/spi/DirObjectFactory.java *** gcc-3.3.3/libjava/javax/naming/spi/DirObjectFactory.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/spi/DirObjectFactory.java 2003-12-06 08:41:38.000000000 +0000 *************** exception statement from your version. * *** 37,45 **** package javax.naming.spi; ! import javax.naming.*; ! import javax.naming.directory.*; import java.util.Hashtable; /** * @author Warren Levy --- 37,47 ---- package javax.naming.spi; ! import java.util.Hashtable; + import javax.naming.Context; + import javax.naming.Name; + import javax.naming.directory.Attributes; /** * @author Warren Levy *************** import java.util.Hashtable; *** 48,54 **** public interface DirObjectFactory extends ObjectFactory { ! public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes attrs) throws Exception; } --- 50,56 ---- public interface DirObjectFactory extends ObjectFactory { ! Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes attrs) throws Exception; } diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/spi/DirStateFactory.java gcc-3.4.0/libjava/javax/naming/spi/DirStateFactory.java *** gcc-3.3.3/libjava/javax/naming/spi/DirStateFactory.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/spi/DirStateFactory.java 2003-12-06 08:41:38.000000000 +0000 *************** exception statement from your version. * *** 37,45 **** package javax.naming.spi; ! import javax.naming.*; ! import javax.naming.directory.*; import java.util.Hashtable; /** * @author Warren Levy --- 37,48 ---- package javax.naming.spi; ! import java.util.Hashtable; + import javax.naming.Context; + import javax.naming.Name; + import javax.naming.NamingException; + import javax.naming.directory.Attributes; /** * @author Warren Levy *************** public interface DirStateFactory extends *** 72,78 **** } } ! public DirStateFactory.Result getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes inAttrs) --- 75,81 ---- } } ! DirStateFactory.Result getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes inAttrs) diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/spi/InitialContextFactoryBuilder.java gcc-3.4.0/libjava/javax/naming/spi/InitialContextFactoryBuilder.java *** gcc-3.3.3/libjava/javax/naming/spi/InitialContextFactoryBuilder.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/spi/InitialContextFactoryBuilder.java 2003-10-11 19:06:23.000000000 +0000 *************** import javax.naming.NamingException; *** 43,47 **** public interface InitialContextFactoryBuilder { ! public InitialContextFactory createInitialContextFactory (Hashtable environment) throws NamingException; } --- 43,48 ---- public interface InitialContextFactoryBuilder { ! InitialContextFactory createInitialContextFactory (Hashtable environment) ! throws NamingException; } diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/spi/InitialContextFactory.java gcc-3.4.0/libjava/javax/naming/spi/InitialContextFactory.java *** gcc-3.3.3/libjava/javax/naming/spi/InitialContextFactory.java 2002-11-23 21:50:40.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/spi/InitialContextFactory.java 2003-10-11 19:06:23.000000000 +0000 *************** import javax.naming.NamingException; *** 44,48 **** public interface InitialContextFactory { ! public Context getInitialContext (Hashtable environment) throws NamingException; } --- 44,48 ---- public interface InitialContextFactory { ! Context getInitialContext (Hashtable environment) throws NamingException; } diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/spi/NamingManager.java gcc-3.4.0/libjava/javax/naming/spi/NamingManager.java *** gcc-3.3.3/libjava/javax/naming/spi/NamingManager.java 2003-06-30 19:17:38.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/spi/NamingManager.java 2003-12-06 08:41:38.000000000 +0000 *************** exception statement from your version. * *** 38,45 **** package javax.naming.spi; ! import java.util.*; ! import javax.naming.*; public class NamingManager { --- 38,55 ---- package javax.naming.spi; ! import java.util.Enumeration; ! import java.util.Hashtable; ! import java.util.StringTokenizer; ! import javax.naming.CannotProceedException; ! import javax.naming.Context; ! import javax.naming.Name; ! import javax.naming.NamingException; ! import javax.naming.NoInitialContextException; ! import javax.naming.RefAddr; ! import javax.naming.Reference; ! import javax.naming.Referenceable; ! import javax.naming.StringRefAddr; public class NamingManager { *************** public class NamingManager *** 83,95 **** try { ! icf = (InitialContextFactory) Class.forName (java_naming_factory_initial).newInstance (); } catch (Exception exception) { NoInitialContextException e ! = new NoInitialContextException ("Can't load InitialContextFactory class: " ! + java_naming_factory_initial); e.setRootCause(exception); throw e; } --- 93,109 ---- try { ! icf = (InitialContextFactory)Class.forName ! (java_naming_factory_initial, true, ! Thread.currentThread().getContextClassLoader()) ! .newInstance (); } catch (Exception exception) { NoInitialContextException e ! = new NoInitialContextException ! ("Can't load InitialContextFactory class: " ! + java_naming_factory_initial); e.setRootCause(exception); throw e; } *************** public class NamingManager *** 125,131 **** String aTry = tokens.nextToken (); try { ! Class factoryClass = Class.forName (aTry + "." + scheme); ObjectFactory factory = (ObjectFactory) factoryClass.newInstance (); Object obj = factory.getObjectInstance (refInfo, name, --- 139,147 ---- String aTry = tokens.nextToken (); try { ! Class factoryClass = Class.forName (aTry + "." + scheme, ! true, ! Thread.currentThread().getContextClassLoader()); ObjectFactory factory = (ObjectFactory) factoryClass.newInstance (); Object obj = factory.getObjectInstance (refInfo, name, *************** public class NamingManager *** 227,233 **** if (fClass != null) { // Exceptions here are passed to the caller. ! Class k = Class.forName (fClass); factory = (ObjectFactory) k.newInstance (); } else --- 243,251 ---- if (fClass != null) { // Exceptions here are passed to the caller. ! Class k = Class.forName (fClass, ! true, ! Thread.currentThread().getContextClassLoader()); factory = (ObjectFactory) k.newInstance (); } else *************** public class NamingManager *** 271,277 **** while (tokens.hasMoreTokens ()) { String klassName = tokens.nextToken (); ! Class k = Class.forName (klassName); factory = (ObjectFactory) k.newInstance (); Object obj = factory.getObjectInstance (refInfo, name, nameCtx, environment); --- 289,297 ---- while (tokens.hasMoreTokens ()) { String klassName = tokens.nextToken (); ! Class k = Class.forName (klassName, ! true, ! Thread.currentThread().getContextClassLoader()); factory = (ObjectFactory) k.newInstance (); Object obj = factory.getObjectInstance (refInfo, name, nameCtx, environment); *************** public class NamingManager *** 314,321 **** // It is really unclear to me if this is right. try { ! Object obj = getObjectInstance (null, cpe.getAltName (), ! cpe.getAltNameCtx (), env); if (obj != null) return (Context) obj; } --- 334,343 ---- // It is really unclear to me if this is right. try { ! Object obj = getObjectInstance (cpe.getResolvedObj(), ! cpe.getAltName (), ! cpe.getAltNameCtx (), ! env); if (obj != null) return (Context) obj; } *************** public class NamingManager *** 323,328 **** --- 345,353 ---- { } + // fix stack trace for re-thrown exception (message confusing otherwise) + cpe.fillInStackTrace(); + throw cpe; } *************** public class NamingManager *** 337,343 **** String klassName = tokens.nextToken (); try { ! Class k = Class.forName (klassName); StateFactory factory = (StateFactory) k.newInstance (); Object o = factory.getStateToBind (obj, name, nameCtx, environment); --- 362,370 ---- String klassName = tokens.nextToken (); try { ! Class k = Class.forName (klassName, ! true, ! Thread.currentThread().getContextClassLoader()); StateFactory factory = (StateFactory) k.newInstance (); Object o = factory.getStateToBind (obj, name, nameCtx, environment); diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/spi/ObjectFactoryBuilder.java gcc-3.4.0/libjava/javax/naming/spi/ObjectFactoryBuilder.java *** gcc-3.3.3/libjava/javax/naming/spi/ObjectFactoryBuilder.java 2002-11-23 21:50:41.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/spi/ObjectFactoryBuilder.java 2003-12-06 08:41:38.000000000 +0000 *************** exception statement from your version. * *** 37,44 **** package javax.naming.spi; ! import javax.naming.*; import java.util.Hashtable; /** * @author Warren Levy --- 37,45 ---- package javax.naming.spi; ! import java.util.Hashtable; + import javax.naming.NamingException; /** * @author Warren Levy *************** import java.util.Hashtable; *** 47,53 **** public interface ObjectFactoryBuilder { ! public ObjectFactory createObjectFactory(Object obj, Hashtable environment) throws NamingException; } --- 48,54 ---- public interface ObjectFactoryBuilder { ! ObjectFactory createObjectFactory(Object obj, Hashtable environment) throws NamingException; } diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/spi/ObjectFactory.java gcc-3.4.0/libjava/javax/naming/spi/ObjectFactory.java *** gcc-3.3.3/libjava/javax/naming/spi/ObjectFactory.java 2002-11-23 21:50:41.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/spi/ObjectFactory.java 2003-10-11 19:06:23.000000000 +0000 *************** exception statement from your version. * *** 39,51 **** package javax.naming.spi; import java.util.Hashtable; ! import javax.naming.*; public interface ObjectFactory { ! public Object getObjectInstance (Object obj, ! Name name, ! Context nameCtx, ! Hashtable environment) ! throws Exception; } --- 39,50 ---- package javax.naming.spi; import java.util.Hashtable; ! import javax.naming.Context; ! import javax.naming.Name; public interface ObjectFactory { ! Object getObjectInstance (Object obj, Name name, Context nameCtx, ! Hashtable environment) ! throws Exception; } diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/spi/ResolveResult.java gcc-3.4.0/libjava/javax/naming/spi/ResolveResult.java *** gcc-3.3.3/libjava/javax/naming/spi/ResolveResult.java 2002-11-23 21:50:41.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/spi/ResolveResult.java 2003-12-06 08:41:38.000000000 +0000 *************** exception statement from your version. * *** 37,45 **** package javax.naming.spi; ! import javax.naming.*; ! import java.util.EventObject; import java.io.Serializable; /** * @author Warren Levy --- 37,48 ---- package javax.naming.spi; ! import java.io.Serializable; + import java.util.EventObject; + import javax.naming.Name; + import javax.naming.CompositeName; + import javax.naming.InvalidNameException; /** * @author Warren Levy diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/spi/Resolver.java gcc-3.4.0/libjava/javax/naming/spi/Resolver.java *** gcc-3.3.3/libjava/javax/naming/spi/Resolver.java 2002-11-23 21:50:41.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/spi/Resolver.java 2003-12-06 08:41:38.000000000 +0000 *************** exception statement from your version. * *** 37,43 **** package javax.naming.spi; ! import javax.naming.*; /** * @author Warren Levy --- 37,45 ---- package javax.naming.spi; ! ! import javax.naming.Name; ! import javax.naming.NamingException; /** * @author Warren Levy *************** import javax.naming.*; *** 46,53 **** public interface Resolver { ! public ResolveResult resolveToClass(Name name, Class contextType) throws NamingException; ! public ResolveResult resolveToClass(String name, Class contextType) throws NamingException; } --- 48,55 ---- public interface Resolver { ! ResolveResult resolveToClass(Name name, Class contextType) throws NamingException; ! ResolveResult resolveToClass(String name, Class contextType) throws NamingException; } diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/spi/StateFactory.java gcc-3.4.0/libjava/javax/naming/spi/StateFactory.java *** gcc-3.3.3/libjava/javax/naming/spi/StateFactory.java 2002-11-23 21:50:41.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/spi/StateFactory.java 2003-12-06 08:41:38.000000000 +0000 *************** exception statement from your version. * *** 37,44 **** package javax.naming.spi; ! import javax.naming.*; import java.util.Hashtable; /** * @author Warren Levy --- 37,47 ---- package javax.naming.spi; ! import java.util.Hashtable; + import javax.naming.Context; + import javax.naming.Name; + import javax.naming.NamingException; /** * @author Warren Levy *************** import java.util.Hashtable; *** 47,52 **** public interface StateFactory { ! public Object getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment) throws NamingException; } --- 50,55 ---- public interface StateFactory { ! Object getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment) throws NamingException; } diff -Nrc3pad gcc-3.3.3/libjava/javax/naming/StringRefAddr.java gcc-3.4.0/libjava/javax/naming/StringRefAddr.java *** gcc-3.3.3/libjava/javax/naming/StringRefAddr.java 2002-01-22 22:40:42.000000000 +0000 --- gcc-3.4.0/libjava/javax/naming/StringRefAddr.java 2003-06-27 13:06:50.000000000 +0000 *************** package javax.naming; *** 48,53 **** --- 48,54 ---- */ public class StringRefAddr extends RefAddr { + private static final long serialVersionUID = -8913762495138505527L; /** * The possibly null content of this RefAddr. diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/Attribute.java gcc-3.4.0/libjava/javax/print/attribute/Attribute.java *** gcc-3.3.3/libjava/javax/print/attribute/Attribute.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/Attribute.java 2003-10-11 19:15:08.000000000 +0000 *************** *** 0 **** --- 1,50 ---- + /* Attribute.java -- + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute; + + import java.io.Serializable; + + /** + * @author Michael Koch + */ + public interface Attribute extends Serializable + { + Class getCategory (); + + String getName (); + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/AttributeSet.java gcc-3.4.0/libjava/javax/print/attribute/AttributeSet.java *** gcc-3.3.3/libjava/javax/print/attribute/AttributeSet.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/AttributeSet.java 2003-10-11 19:15:08.000000000 +0000 *************** *** 0 **** --- 1,77 ---- + /* AttributeSet.java -- + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute; + + /** + * @author Michael Koch + */ + public interface AttributeSet + { + /** + * Adds the specified attribute value to this attribute set + * if it is not already present. + */ + boolean add (Attribute attribute); + + /** + * Adds all of the elements in the specified set to this attribute. + */ + boolean addAll (AttributeSet attributes); + + void clear (); + + boolean containsKey (Class category); + + boolean containsValue (Attribute attribute); + + boolean equals (Object obj); + + Attribute get (Class Category); + + int hashCode (); + + boolean isEmpty (); + + boolean remove (Attribute attribute); + + boolean remove (Class category); + + int size (); + + Attribute[] toArray (); + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/AttributeSetUtilities.java gcc-3.4.0/libjava/javax/print/attribute/AttributeSetUtilities.java *** gcc-3.3.3/libjava/javax/print/attribute/AttributeSetUtilities.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/AttributeSetUtilities.java 2003-12-23 10:21:31.000000000 +0000 *************** *** 0 **** --- 1,445 ---- + /* AttributeSetUtilities.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute; + + import java.io.Serializable; + + public final class AttributeSetUtilities + { + private static class UnmodifiableAttributeSet + implements AttributeSet, Serializable + { + private AttributeSet set; + + public UnmodifiableAttributeSet(AttributeSet attributeSet) + { + if (attributeSet == null) + throw new NullPointerException("attributeSet may not be null"); + + this.set = attributeSet; + } + + public boolean add(Attribute attribute) + { + throw new UnmodifiableSetException(); + } + + public boolean addAll(AttributeSet attributes) + { + throw new UnmodifiableSetException(); + } + + public void clear() + { + throw new UnmodifiableSetException(); + } + + public boolean containsKey(Class category) + { + return set.containsKey(category); + } + + public boolean containsValue(Attribute attribute) + { + return set.containsValue(attribute); + } + + public boolean equals(Object obj) + { + return set.equals(obj); + } + + public Attribute get(Class interfaceName) + { + return set.get(interfaceName); + } + + public int hashCode() + { + return set.hashCode(); + } + + public boolean isEmpty() + { + return set.isEmpty(); + } + + public boolean remove(Class category) + { + throw new UnmodifiableSetException(); + } + + public boolean remove(Attribute attribute) + { + throw new UnmodifiableSetException(); + } + + public int size() + { + return set.size(); + } + + public Attribute[] toArray() + { + return set.toArray(); + } + } + + public static class UnmodifiableDocAttributeSet + extends UnmodifiableAttributeSet + implements DocAttributeSet, Serializable + { + public UnmodifiableDocAttributeSet(DocAttributeSet attributeSet) + { + super(attributeSet); + } + } + + public static class UnmodifiablePrintJobAttributeSet + extends UnmodifiableAttributeSet + implements PrintJobAttributeSet, Serializable + { + public UnmodifiablePrintJobAttributeSet(PrintJobAttributeSet attributeSet) + { + super(attributeSet); + } + } + + public static class UnmodifiablePrintRequestAttributeSet + extends UnmodifiableAttributeSet + implements PrintRequestAttributeSet, Serializable + { + public UnmodifiablePrintRequestAttributeSet(PrintRequestAttributeSet attributeSet) + { + super(attributeSet); + } + } + + public static class UnmodifiablePrintServiceAttributeSet + extends UnmodifiableAttributeSet + implements PrintServiceAttributeSet, Serializable + { + public UnmodifiablePrintServiceAttributeSet(PrintServiceAttributeSet attributeSet) + { + super(attributeSet); + } + } + + public static class SynchronizedAttributeSet + implements AttributeSet, Serializable + { + private AttributeSet set; + + public SynchronizedAttributeSet(AttributeSet attributeSet) + { + if (attributeSet == null) + throw new NullPointerException("attributeSet may not be null"); + + this.set = attributeSet; + } + + public synchronized boolean add(Attribute attribute) + { + return set.add(attribute); + } + + public synchronized boolean addAll(AttributeSet attributes) + { + return set.addAll(attributes); + } + + public synchronized void clear() + { + set.clear(); + } + + public synchronized boolean containsKey(Class category) + { + return set.containsKey(category); + } + + public synchronized boolean containsValue(Attribute attribute) + { + return set.containsValue(attribute); + } + + public synchronized boolean equals(Object obj) + { + return set.equals(obj); + } + + public synchronized Attribute get(Class interfaceName) + { + return set.get(interfaceName); + } + + public synchronized int hashCode() + { + return set.hashCode(); + } + + public synchronized boolean isEmpty() + { + return set.isEmpty(); + } + + public synchronized boolean remove(Class category) + { + return set.remove(category); + } + + public synchronized boolean remove(Attribute attribute) + { + return set.remove(attribute); + } + + public synchronized int size() + { + return set.size(); + } + + public synchronized Attribute[] toArray() + { + return set.toArray(); + } + } + + public static class SynchronizedDocAttributeSet + extends SynchronizedAttributeSet + implements DocAttributeSet, Serializable + { + public SynchronizedDocAttributeSet(DocAttributeSet attributeSet) + { + super(attributeSet); + } + } + + public static class SynchronizedPrintJobAttributeSet + extends SynchronizedAttributeSet + implements PrintJobAttributeSet, Serializable + { + public SynchronizedPrintJobAttributeSet(PrintJobAttributeSet attributeSet) + { + super(attributeSet); + } + } + + public static class SynchronizedPrintRequestAttributeSet + extends SynchronizedAttributeSet + implements PrintRequestAttributeSet, Serializable + { + public SynchronizedPrintRequestAttributeSet(PrintRequestAttributeSet attributeSet) + { + super(attributeSet); + } + } + + public static class SynchronizedPrintServiceAttributeSet + extends SynchronizedAttributeSet + implements PrintServiceAttributeSet, Serializable + { + public SynchronizedPrintServiceAttributeSet(PrintServiceAttributeSet attributeSet) + { + super(attributeSet); + } + } + + /** + * Returns a synchronized view of the given attribute set. + * + * @return the sychronized attribute set + */ + public static AttributeSet synchronizedView(AttributeSet attributeSet) + { + return new SynchronizedAttributeSet(attributeSet); + } + + /** + * Returns a synchronized view of the given attribute set. + * + * @return the sychronized attribute set + */ + public static DocAttributeSet synchronizedView(DocAttributeSet attributeSet) + { + return new SynchronizedDocAttributeSet(attributeSet); + } + + /** + * Returns a synchronized view of the given attribute set. + * + * @return the sychronized attribute set + */ + public static PrintJobAttributeSet synchronizedView(PrintJobAttributeSet attributeSet) + { + return new SynchronizedPrintJobAttributeSet(attributeSet); + } + + /** + * Returns a synchronized view of the given attribute set. + * + * @return the sychronized attribute set + */ + public static PrintRequestAttributeSet synchronizedView(PrintRequestAttributeSet attributeSet) + { + return new SynchronizedPrintRequestAttributeSet(attributeSet); + } + + /** + * Returns a synchronized view of the given attribute set. + * + * @return the sychronized attribute set + */ + public static PrintServiceAttributeSet synchronizedView(PrintServiceAttributeSet attributeSet) + { + return new SynchronizedPrintServiceAttributeSet(attributeSet); + } + + /** + * Returns an unmodifiable view of the given attribute set. + * + * @return the sychronized attribute set + */ + public static AttributeSet unmodifiableView(AttributeSet attributeSet) + { + return new UnmodifiableAttributeSet(attributeSet); + } + + /** + * Returns an unmodifiable view of the given attribute set. + * + * @return the sychronized attribute set + */ + public static DocAttributeSet unmodifiableView(DocAttributeSet attributeSet) + { + return new UnmodifiableDocAttributeSet(attributeSet); + } + + /** + * Returns an unmodifiable view of the given attribute set. + * + * @return the sychronized attribute set + */ + public static PrintJobAttributeSet unmodifiableView(PrintJobAttributeSet attributeSet) + { + return new UnmodifiablePrintJobAttributeSet(attributeSet); + } + + /** + * Returns an unmodifiable view of the given attribute set. + * + * @return the sychronized attribute set + */ + public static PrintRequestAttributeSet unmodifiableView(PrintRequestAttributeSet attributeSet) + { + return new UnmodifiablePrintRequestAttributeSet(attributeSet); + } + + /** + * Returns an unmodifiable view of the given attribute set. + * + * @return the sychronized attribute set + */ + public static PrintServiceAttributeSet unmodifiableView(PrintServiceAttributeSet attributeSet) + { + return new UnmodifiablePrintServiceAttributeSet(attributeSet); + } + + /** + * Verifies that the given object is a Class that + * implements the given interface name. + * + * @return object casted to Class + * + * @exception ClassCastException if object is not a Class + * that implements interfaceName + * @exception NullPointerException if object is null + */ + public static Class verifyAttributeCategory(Object object, + Class interfaceName) + { + if (object == null) + throw new NullPointerException("object may not be null"); + + Class clazz = (Class) object; + + if (interfaceName.isAssignableFrom(clazz)) + return clazz; + + throw new ClassCastException(); + } + + /** + * Verifies that the given object is an attribute of the given interface. + * + * @return the object casted to Attribute + * + * @exception ClassCastException if object is no instance of interfaceName. + * @exception NullPointerException if object is null + */ + public static Attribute verifyAttributeValue(Object object, + Class interfaceName) + { + if (object == null) + throw new NullPointerException("object may not be null"); + + if (interfaceName.isInstance(object)) + return (Attribute) object; + + throw new ClassCastException(); + } + + /** + * Verifies that the category of attribute is equals to category. + * + * @param category the category the atteribute should be + * @param attribtue the attribute to verify + * + * @exception IllegalArgumentException if the categories are not equal + * @exception NullPointerException if category is null + */ + public static void verifyCategoryForValue(Class category, + Attribute attribute) + { + if (category == null) + throw new NullPointerException("object may not be null"); + + if (category.equals(attribute.getCategory())) + throw new IllegalArgumentException + ("category of attribute not equal to category"); + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/DateTimeSyntax.java gcc-3.4.0/libjava/javax/print/attribute/DateTimeSyntax.java *** gcc-3.3.3/libjava/javax/print/attribute/DateTimeSyntax.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/DateTimeSyntax.java 2003-12-21 11:10:54.000000000 +0000 *************** *** 0 **** --- 1,101 ---- + /* DateTimeSyntax.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute; + + import java.io.Serializable; + import java.util.Date; + + /** + * @author Michael Koch + */ + public abstract class DateTimeSyntax implements Cloneable, Serializable + { + private static final long serialVersionUID = -1400819079791208582L; + + private Date value; + + /** + * Creates a DateTimeSyntax with a given value. + * + * @param value the value for this syntax + * + * @exception NullPointerException if value is null + */ + protected DateTimeSyntax(Date value) + { + if (value == null) + throw new NullPointerException("value may not be null"); + + this.value = value; + } + + /** + * Returns the date value of this object. + * + * @return the date value + */ + public Date getValue() + { + return value; + } + + /** + * Tests if the given object is equal to this one. + * + * @param obj the object to test + * + * @return True if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if (! (obj instanceof DateTimeSyntax)) + return false; + + return value.equals(((DateTimeSyntax) obj).getValue()); + } + + /** + * Returns the hashcode for this object. + * + * @return the hashcode + */ + public int hashCode() + { + return value.hashCode(); + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/DocAttribute.java gcc-3.4.0/libjava/javax/print/attribute/DocAttribute.java *** gcc-3.3.3/libjava/javax/print/attribute/DocAttribute.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/DocAttribute.java 2003-12-21 11:10:54.000000000 +0000 *************** *** 0 **** --- 1,45 ---- + /* DocAttribute.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute; + + /** + * @author Michael Koch + */ + public interface DocAttribute extends Attribute + { + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/DocAttributeSet.java gcc-3.4.0/libjava/javax/print/attribute/DocAttributeSet.java *** gcc-3.3.3/libjava/javax/print/attribute/DocAttributeSet.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/DocAttributeSet.java 2003-12-21 11:10:54.000000000 +0000 *************** *** 0 **** --- 1,55 ---- + /* DocAttributeSet.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute; + + /** + * @author Michael Koch + */ + public interface DocAttributeSet extends AttributeSet + { + /** + * Adds the specified attribute value to this attribute set + * if it is not already present. + */ + boolean add (Attribute attribute); + + /** + * Adds all of the elements in the specified set to this attribute. + */ + boolean addAll (AttributeSet attributes); + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/EnumSyntax.java gcc-3.4.0/libjava/javax/print/attribute/EnumSyntax.java *** gcc-3.3.3/libjava/javax/print/attribute/EnumSyntax.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/EnumSyntax.java 2004-01-10 22:16:01.000000000 +0000 *************** *** 0 **** --- 1,146 ---- + /* EnumSyntax.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute; + + import java.io.Serializable; + + /** + * @author Michael Koch + */ + public abstract class EnumSyntax implements Cloneable, Serializable + { + private static final long serialVersionUID = -2739521845085831642L; + + private int value; + + /** + * Creates a EnumSyntax object. + * + * @param value the value to set + */ + protected EnumSyntax(int value) + { + this.value = value; + } + + /** + * Returns the value of this object. + * + * @return the value + */ + public int getValue() + { + return value; + } + + /** + * Clones this object. + * + * @return a clone of this object + */ + public Object clone() + { + try + { + return super.clone(); + } + catch (CloneNotSupportedException e) + { + // Cannot happen as we implement java.lang.Cloneable. + return null; + } + } + + /** + * Returns the hashcode for this object. + * + * @return the hashcode + */ + public int hashCode() + { + return value; + } + + /** + * Returns the string representation for this object. + * + * @return the string representation + */ + public String toString() + { + int index = value - getOffset(); + String[] table = getStringTable(); + + if (table != null + && index >= 0 + && index < table.length) + return table[index]; + + return "" + value; + } + + /** + * Returns a table with the enumeration values represented as strings + * for this object. + * + * The default implementation just returns null. + * + * @return the enumeration values as strings + */ + protected String[] getStringTable() + { + return null; + } + + /** + * Returns a table with the enumeration values for this object. + * + * The default implementation just returns null. + * + * @return the enumeration values + */ + protected EnumSyntax[] getEnumValueTable() + { + return null; + } + + public int getOffset() + { + return 0; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/HashAttributeSet.java gcc-3.4.0/libjava/javax/print/attribute/HashAttributeSet.java *** gcc-3.3.3/libjava/javax/print/attribute/HashAttributeSet.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/HashAttributeSet.java 2003-12-23 10:21:31.000000000 +0000 *************** *** 0 **** --- 1,366 ---- + /* HashAttributeSet.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute; + + import java.io.Serializable; + import java.util.HashMap; + import java.util.Iterator; + + public class HashAttributeSet implements AttributeSet, Serializable + { + private static final long serialVersionUID = 5311560590283707917L; + + private Class interfaceName; + private HashMap attributeMap = new HashMap(); + + /** + * Creates an empty HashAttributeSet object. + */ + public HashAttributeSet() + { + this(Attribute.class); + } + + /** + * Creates a HashAttributeSet object with the given + * attribute in it. + * + * @param attribute the attribute to put into the set + * + * @exception NullPointerException if attribute is null + */ + public HashAttributeSet(Attribute attribute) + { + this(attribute, Attribute.class); + } + + /** + * Creates a HashAttributeSet object with the given + * attributes in it. + * + * @param attributes the attributes to put into the set + * + * @exception NullPointerException If attributes is null + */ + public HashAttributeSet(Attribute[] attributes) + { + this(attributes, Attribute.class); + } + + /** + * Creates a HashAttributeSet object with the given + * attributes in it. + * + * @param attributes the attributes to put into the set + * + * @exception NullPointerException If attributes is null + */ + public HashAttributeSet(AttributeSet attributes) + { + this(attributes, Attribute.class); + } + + /** + * Creates an empty HashAttributeSet object. + * + * @param interfaceName the interface that all members must implement + * + * @exception NullPointerException if interfaceName is null + */ + protected HashAttributeSet(Class interfaceName) + { + if (interfaceName == null) + throw new NullPointerException("interfaceName may not be null"); + + this.interfaceName = interfaceName; + } + + /** + * Creates an empty HashAttributeSet object. + * + * @exception ClassCastException if attribute is not an interface of + * interfaceName + * @exception NullPointerException if attribute or interfaceName is null + */ + protected HashAttributeSet(Attribute attribute, Class interfaceName) + { + this(interfaceName); + + if (attribute == null) + throw new NullPointerException(); + + addInternal(attribute, interfaceName); + } + + /** + * Creates an empty HashAttributeSet object. + * + * @exception ClassCastException if any element of attributes is not an + * interface of interfaceName + * @exception NullPointerException if attributes or interfaceName is null + */ + protected HashAttributeSet(Attribute[] attributes, Class interfaceName) + { + this(interfaceName); + + if (attributes == null) + throw new NullPointerException(); + + for (int index = 0; index < attributes.length; index++) + addInternal(attributes[index], interfaceName); + } + + /** + * Creates an empty HashAttributeSet object. + * + * @exception ClassCastException if any element of attributes is not an + * interface of interfaceName + */ + public HashAttributeSet(AttributeSet attributes, Class interfaceName) + { + this(interfaceName); + + if (attributes != null) + addAllInternal(attributes, interfaceName); + } + + /** + * Adds the given attribute to the set. + * + * @param attribute the attribute to add + * + * @return true if the attribute set has changed, false otherwise + * + * @exception NullPointerException if attribute is null + * @exception UnmodifiableSetException if this attribute set does not + * support this action. + */ + public boolean add(Attribute attribute) + { + return addInternal(attribute, interfaceName); + } + + private boolean addInternal(Attribute attribute, Class interfaceName) + { + if (attribute == null) + throw new NullPointerException("attribute may not be null"); + + AttributeSetUtilities.verifyAttributeCategory(interfaceName, + this.interfaceName); + + Object old = attributeMap.put + (attribute.getCategory(), AttributeSetUtilities.verifyAttributeValue + (attribute, interfaceName)); + return !attribute.equals(old); + } + + /** + * Adds the given attributes to the set. + * + * @param attributes the attributes to add + * + * @return true if the attribute set has changed, false otherwise + * + * @exception UnmodifiableSetException if this attribute set does not + * support this action. + */ + public boolean addAll(AttributeSet attributes) + { + return addAllInternal(attributes, interfaceName); + } + + private boolean addAllInternal(AttributeSet attributes, Class interfaceName) + { + boolean modified = false; + Attribute[] array = attributes.toArray(); + + for (int index = 0; index < array.length; index++) + if (addInternal(array[index], interfaceName)) + modified = true; + + return modified; + } + + /** + * Removes all attributes from this attribute set. + * + * @exception UnmodifiableSetException if this attribute set does not + * support this action. + */ + public void clear() + { + attributeMap.clear(); + } + + /** + * Checks if this attribute set contains an entry with the given category. + * + * @param category the category to test for + * + * @result true if the category exists in this attribute set, false otherwise. + */ + public boolean containsKey(Class category) + { + return attributeMap.containsKey(category); + } + + /** + * Checks if this attribute set contains an entry with the given attribute. + * + * @param attribute the attribute to test for + * + * @result true if the attribute exists in this attribute set, + * false otherwise. + */ + public boolean containsValue(Attribute attribute) + { + return attributeMap.containsValue(attribute); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if (! (obj instanceof HashAttributeSet)) + return false; + + return attributeMap.equals(((HashAttributeSet) obj).attributeMap); + } + + /** + * Returns the attribute value that is connected to the given attribute + * category. If the attribute set does not contains the given category null + * will be returned. + * + * @param category the attribute category to return the attribute value for + * + * @return the attribute associated to category, or null + */ + public Attribute get(Class category) + { + return (Attribute) attributeMap.get(category); + } + + /** + * Returns the hashcode for this object. + * + * @return the hashcode + */ + public int hashCode() + { + return attributeMap.hashCode() + interfaceName.hashCode(); + } + + /** + * Checks if the attribute set is empty. + * + * @return true if the attribute set is empty, false otherwise + */ + public boolean isEmpty() + { + return attributeMap.isEmpty(); + } + + /** + * Removes the entry with the given attribute in it. + * + * @param attribute the attribute value of the entry to be removed + * + * @return true if the attribute set has changed, false otherwise. + * + * @exception UnmodifiableSetException if this attribute set does not + * support this action. + */ + public boolean remove(Attribute attribute) + { + if (attribute == null) + return false; + + return attributeMap.remove(attribute.getCategory()) != null; + } + + /** + * Removes the entry with the given category in it. + * + * @param category the category value of the entry to be removed + * + * @return true if the attribute set has changed, false otherwise. + */ + public boolean remove(Class category) + { + if (category == null) + return false; + + return attributeMap.remove(category) != null; + } + + /** + * Returns the number of elements in this attribute set. + * + * @return the number of elements. + */ + public int size() + { + return attributeMap.size(); + } + + /** + * Returns the content of the attribute set as an array + * + * @return an array of attributes + */ + public Attribute[] toArray() + { + int index = 0; + Iterator it = attributeMap.entrySet().iterator(); + Attribute[] array = new Attribute[size()]; + + while (it.hasNext()) + { + array[index] = (Attribute) it.next(); + index++; + } + + return array; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/HashDocAttributeSet.java gcc-3.4.0/libjava/javax/print/attribute/HashDocAttributeSet.java *** gcc-3.3.3/libjava/javax/print/attribute/HashDocAttributeSet.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/HashDocAttributeSet.java 2003-12-21 19:54:52.000000000 +0000 *************** *** 0 **** --- 1,94 ---- + /* HashDocAttributeSet.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute; + + import java.io.Serializable; + + public class HashDocAttributeSet extends HashAttributeSet + implements DocAttributeSet, Serializable + { + private static final long serialVersionUID = -1128534486061432528L; + + /** + * Creates an empty HashDocAttributeSet object. + */ + public HashDocAttributeSet() + { + super(DocAttribute.class); + } + + /** + * Creates a HashDocAttributeSet object with the given + * attribute in it. + * + * @param attribute the attriute tu put into the attribute set + * + * @exception NullPointerException if attribute is null + */ + public HashDocAttributeSet(DocAttribute attribute) + { + super(attribute, DocAttribute.class); + } + + /** + * Creates a HashDocAttributeSet object with the given + * attributes in it. + * + * @param attributes the attributes to put into the attribute set + * + * @exception NullPointerException if attributes is null + */ + public HashDocAttributeSet(DocAttribute[] attributes) + { + super(attributes, DocAttribute.class); + } + + /** + * Creates a HashDocAttributeSet object with the given + * attributes in it. + * + * @param attributes the attributes to put into the attribute set + * + * @exception ClassCastException if any element of attributes is not + * an instance of DocAttribute + */ + public HashDocAttributeSet(DocAttributeSet attributes) + { + super(attributes, DocAttribute.class); + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/HashPrintJobAttributeSet.java gcc-3.4.0/libjava/javax/print/attribute/HashPrintJobAttributeSet.java *** gcc-3.3.3/libjava/javax/print/attribute/HashPrintJobAttributeSet.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/HashPrintJobAttributeSet.java 2003-12-21 19:54:52.000000000 +0000 *************** *** 0 **** --- 1,94 ---- + /* HashPrintJobAttributeSet.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute; + + import java.io.Serializable; + + public class HashPrintJobAttributeSet extends HashAttributeSet + implements Serializable, PrintJobAttributeSet + { + private static final long serialVersionUID = -4204473656070350348L; + + /** + * Creates an empty HashPrintJobAttributeSet object. + */ + public HashPrintJobAttributeSet() + { + super(PrintJobAttribute.class); + } + + /** + * Creates a HashPrintJobAttributeSet object with the given + * attribute in it. + * + * @param attribute the attriute tu put into the attribute set + * + * @exception NullPointerException if attribute is null + */ + public HashPrintJobAttributeSet(PrintJobAttribute attribute) + { + super(attribute, PrintJobAttribute.class); + } + + /** + * Creates a HashPrintJobAttributeSet object with the given + * attributes in it. + * + * @param attributes the attributes to put into the attribute set + * + * @exception NullPointerException if attributes is null + */ + public HashPrintJobAttributeSet(PrintJobAttribute[] attributes) + { + super(attributes, PrintJobAttribute.class); + } + + /** + * Creates a HashPrintJobAttributeSet object with the given + * attributes in it. + * + * @param attributes the attributes to put into the attribute set + * + * @exception ClassCastException if any element of attributes is not + * an instance of PrintJobAttribute + */ + public HashPrintJobAttributeSet(PrintJobAttributeSet attributes) + { + super(attributes, PrintJobAttribute.class); + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/HashPrintRequestAttributeSet.java gcc-3.4.0/libjava/javax/print/attribute/HashPrintRequestAttributeSet.java *** gcc-3.3.3/libjava/javax/print/attribute/HashPrintRequestAttributeSet.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/HashPrintRequestAttributeSet.java 2003-12-21 19:54:52.000000000 +0000 *************** *** 0 **** --- 1,94 ---- + /* HashPrintRequestAttributeSet.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute; + + import java.io.Serializable; + + public class HashPrintRequestAttributeSet extends HashAttributeSet + implements Serializable, PrintRequestAttributeSet + { + private static final long serialVersionUID = 2364756266107751933L; + + /** + * Creates an empty HashPrintRequestAttributeSet object. + */ + public HashPrintRequestAttributeSet() + { + super(PrintRequestAttribute.class); + } + + /** + * Creates a HashPrintRequestAttributeSet object with the given + * attribute in it. + * + * @param attribute the attriute tu put into the attribute set + * + * @exception NullPointerException if attribute is null + */ + public HashPrintRequestAttributeSet(PrintRequestAttribute attribute) + { + super(attribute, PrintRequestAttribute.class); + } + + /** + * Creates a HashPrintRequestAttributeSet object with the given + * attributes in it. + * + * @param attributes the attributes to put into the attribute set + * + * @exception NullPointerException if attributes is null + */ + public HashPrintRequestAttributeSet(PrintRequestAttribute[] attributes) + { + super(attributes, PrintRequestAttribute.class); + } + + /** + * Creates a HashPrintRequestAttributeSet object with the given + * attributes in it. + * + * @param attributes the attributes to put into the attribute set + * + * @exception ClassCastException if any element of attributes is not + * an instance of PrintRequestAttribute + */ + public HashPrintRequestAttributeSet(PrintRequestAttributeSet attributes) + { + super(attributes, PrintRequestAttribute.class); + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/HashPrintServiceAttributeSet.java gcc-3.4.0/libjava/javax/print/attribute/HashPrintServiceAttributeSet.java *** gcc-3.3.3/libjava/javax/print/attribute/HashPrintServiceAttributeSet.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/HashPrintServiceAttributeSet.java 2003-12-21 19:54:52.000000000 +0000 *************** *** 0 **** --- 1,94 ---- + /* HashPrintServiceAttributeSet.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute; + + import java.io.Serializable; + + public class HashPrintServiceAttributeSet extends HashAttributeSet + implements Serializable, PrintServiceAttributeSet + { + private static final long serialVersionUID = 6642904616179203070L; + + /** + * Creates an empty HashPrintServiceAttributeSet object. + */ + public HashPrintServiceAttributeSet() + { + super(PrintServiceAttribute.class); + } + + /** + * Creates a HashPrintServiceAttributeSet object with the given + * attribute in it. + * + * @param attribute the attriute tu put into the attribute set + * + * @exception NullPointerException if attribute is null + */ + public HashPrintServiceAttributeSet(PrintServiceAttribute attribute) + { + super(attribute, PrintServiceAttribute.class); + } + + /** + * Creates a HashPrintServiceAttributeSet object with the given + * attributes in it. + * + * @param attributes the attributes to put into the attribute set + * + * @exception NullPointerException if attributes is null + */ + public HashPrintServiceAttributeSet(PrintServiceAttribute[] attributes) + { + super(attributes, PrintServiceAttribute.class); + } + + /** + * Creates a HashPrintServiceAttributeSet object with the given + * attributes in it. + * + * @param attributes the attributes to put into the attribute set + * + * @exception ClassCastException if any element of attributes is not + * an instance of PrintServiceAttribute + */ + public HashPrintServiceAttributeSet(PrintServiceAttributeSet attributes) + { + super(attributes, PrintServiceAttribute.class); + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/IntegerSyntax.java gcc-3.4.0/libjava/javax/print/attribute/IntegerSyntax.java *** gcc-3.3.3/libjava/javax/print/attribute/IntegerSyntax.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/IntegerSyntax.java 2003-12-21 11:10:54.000000000 +0000 *************** *** 0 **** --- 1,122 ---- + /* IntegerSyntax.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute; + + import java.io.Serializable; + + /** + * @author Michael Koch + */ + public abstract class IntegerSyntax implements Cloneable, Serializable + { + private int value; + + /** + * Creates a IntegerSyntax with the given value. + * + * @param value the value to set + */ + protected IntegerSyntax(int value) + { + this.value = value; + } + + /** + * Creates a IntegerSyntax with the given arguments. + * + * @param value the value to set + * @param lowerBound the lower bound for the value + * @param upperBound the upper bound for the value + * + * @exception IllegalArgumentException if value < lowerBound + * or value > upperBound + */ + protected IntegerSyntax(int value, int lowerBound, int upperBound) + { + if (value < lowerBound + || value > upperBound) + throw new IllegalArgumentException("value not in range"); + + this.value = value; + } + + /** + * Returns the value of this object. + * + * @return the value + */ + public int getValue() + { + return value; + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof IntegerSyntax)) + return false; + + return value == ((IntegerSyntax) obj).getValue(); + } + + /** + * Returns the hashcode for this object. + * + * @return the hashcode + */ + public int hashCode() + { + return value; + } + + /** + * Returns the string representation for this object. + * + * @return the string representation + */ + public String toString() + { + return "" + value; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/PrintJobAttribute.java gcc-3.4.0/libjava/javax/print/attribute/PrintJobAttribute.java *** gcc-3.3.3/libjava/javax/print/attribute/PrintJobAttribute.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/PrintJobAttribute.java 2003-12-21 11:44:02.000000000 +0000 *************** *** 0 **** --- 1,45 ---- + /* PrintJobAttribute.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute; + + /** + * @author Michael Koch + */ + public interface PrintJobAttribute extends Attribute + { + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/PrintJobAttributeSet.java gcc-3.4.0/libjava/javax/print/attribute/PrintJobAttributeSet.java *** gcc-3.3.3/libjava/javax/print/attribute/PrintJobAttributeSet.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/PrintJobAttributeSet.java 2003-12-21 11:44:02.000000000 +0000 *************** *** 0 **** --- 1,55 ---- + /* PrintJobAttributeSet.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute; + + /** + * @author Michael Koch + */ + public interface PrintJobAttributeSet extends AttributeSet + { + /** + * Adds the specified attribute value to this attribute set + * if it is not already present. + */ + boolean add (Attribute attribute); + + /** + * Adds all of the elements in the specified set to this attribute. + */ + boolean addAll (AttributeSet attributes); + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/PrintRequestAttribute.java gcc-3.4.0/libjava/javax/print/attribute/PrintRequestAttribute.java *** gcc-3.3.3/libjava/javax/print/attribute/PrintRequestAttribute.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/PrintRequestAttribute.java 2003-12-21 11:44:02.000000000 +0000 *************** *** 0 **** --- 1,45 ---- + /* PrintRequestAttribute.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute; + + /** + * @author Michael Koch + */ + public interface PrintRequestAttribute extends Attribute + { + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/PrintRequestAttributeSet.java gcc-3.4.0/libjava/javax/print/attribute/PrintRequestAttributeSet.java *** gcc-3.3.3/libjava/javax/print/attribute/PrintRequestAttributeSet.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/PrintRequestAttributeSet.java 2003-10-11 19:15:08.000000000 +0000 *************** *** 0 **** --- 1,55 ---- + /* PrintRequestAttributeSet.java -- + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute; + + /** + * @author Michael Koch + */ + public interface PrintRequestAttributeSet extends AttributeSet + { + /** + * Adds the specified attribute value to this attribute set + * if it is not already present. + */ + boolean add (Attribute attribute); + + /** + * Adds all of the elements in the specified set to this attribute. + */ + boolean addAll (AttributeSet attributes); + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/PrintServiceAttribute.java gcc-3.4.0/libjava/javax/print/attribute/PrintServiceAttribute.java *** gcc-3.3.3/libjava/javax/print/attribute/PrintServiceAttribute.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/PrintServiceAttribute.java 2003-12-21 11:44:02.000000000 +0000 *************** *** 0 **** --- 1,45 ---- + /* PrintServiceAttribute.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute; + + /** + * @author Michael Koch + */ + public interface PrintServiceAttribute extends Attribute + { + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/PrintServiceAttributeSet.java gcc-3.4.0/libjava/javax/print/attribute/PrintServiceAttributeSet.java *** gcc-3.3.3/libjava/javax/print/attribute/PrintServiceAttributeSet.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/PrintServiceAttributeSet.java 2003-12-21 11:44:02.000000000 +0000 *************** *** 0 **** --- 1,55 ---- + /* PrintServiceAttributeSet.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute; + + /** + * @author Michael Koch + */ + public interface PrintServiceAttributeSet extends AttributeSet + { + /** + * Adds the specified attribute value to this attribute set + * if it is not already present. + */ + boolean add (Attribute attribute); + + /** + * Adds all of the elements in the specified set to this attribute. + */ + boolean addAll (AttributeSet attributes); + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/ResolutionSyntax.java gcc-3.4.0/libjava/javax/print/attribute/ResolutionSyntax.java *** gcc-3.3.3/libjava/javax/print/attribute/ResolutionSyntax.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/ResolutionSyntax.java 2003-12-27 14:21:07.000000000 +0000 *************** *** 0 **** --- 1,220 ---- + /* ResolutionSyntax.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute; + + import java.io.Serializable; + + /** + * @author Michael Koch + */ + public abstract class ResolutionSyntax + implements Cloneable, Serializable + { + private static final long serialVersionUID = 2706743076526672017L; + + /** + * Constant for units of dots per centimeter. + */ + public static final int DPCM = 254; + + /** + * Constant for units of dots per inch + */ + public static final int DPI = 100; + + private int crossFeedResolution; + private int feedResolution; + + /** + * Creates a ResolutionSyntax object with the given arguments. + * + * @param crossFeedResolution the cross feed resolution + * @param feedResolution the feed resolution + * @param units the unit to use + * + * @exception IllegalArgumentException if preconditions fail + */ + public ResolutionSyntax(int crossFeedResolution, int feedResolution, + int units) + { + if (crossFeedResolution < 1 + || feedResolution < 1 + || units < 1) + throw new IllegalArgumentException("no argument may be less than 1"); + + this.crossFeedResolution = crossFeedResolution * units; + this.feedResolution = feedResolution * units; + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof ResolutionSyntax)) + return false; + + ResolutionSyntax tmp = (ResolutionSyntax) obj; + + return (crossFeedResolution == tmp.getCrossFeedResolutionDphi() + && feedResolution == tmp.getFeedResolutionDphi()); + } + + /** + * Returns the cross feed resolution in units. + * + * @return the resolution + * + * @exception IllegalArgumenException if units < 1 + */ + public int getCrossFeedResolution(int units) + { + if (units < 1) + throw new IllegalArgumentException("units may not be less then 1"); + + int rount = units / 2; + return (crossFeedResolution + units) / units; + } + + /** + * Returns the raw cross feed resolution in units. + * + * @return the raw resolution + */ + protected int getCrossFeedResolutionDphi() + { + return crossFeedResolution; + } + + /** + * Returns the feed resolution in units. + * + * @return the resolution + * + * @exception IllegalArgumenException if units < 1 + */ + public int getFeedResolution(int units) + { + if (units < 1) + throw new IllegalArgumentException("units may not be less then 1"); + + int rount = units / 2; + return (crossFeedResolution + units) / units; + } + + /** + * Returns the raw feed resolution in units. + * + * @return the raw resolution + */ + protected int getFeedResolutionDphi() + { + return feedResolution; + } + + /** + * Returns the resolution as two field array. Index 0 is the cross feed + * resolution, index 1 the feed resolution. + * + * @param units the units to use + * + * @return the array with the resolutions + */ + public int[] getResolution(int units) + { + int[] resolution = new int[2]; + resolution[0] = getCrossFeedResolution(units); + resolution[1] = getFeedResolution(units); + return resolution; + } + + /** + * Returns the hashcode for this object. + * + * @return the hashcode + */ + public int hashCode() + { + return crossFeedResolution + feedResolution; + } + + /** + * Checks of other is a lower or equal resolution. + * + * @param other the resolution to check against + * + * @return true if other describes a lower or equal resolution + */ + public boolean lessThanOrEquals(ResolutionSyntax other) + { + if (other == null) + throw new NullPointerException("other may not be null"); + + return (crossFeedResolution <= other.getCrossFeedResolutionDphi() + && feedResolution <= other.getFeedResolutionDphi()); + } + + /** + * Returns the string representation for this object. + * + * @return the string representation + */ + public String toString() + { + return toString(1, "dphi"); + } + + /** + * Returns the string representation for this object. + * + * @param units the units to use + * @param unitsName the name of the units + * + * @return the string representation + */ + public String toString(int units, String unitsName) + { + return ("" + getCrossFeedResolution(units) + + "x" + getFeedResolution(units) + + " " + unitsName); + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/SetOfIntegerSyntax.java gcc-3.4.0/libjava/javax/print/attribute/SetOfIntegerSyntax.java *** gcc-3.3.3/libjava/javax/print/attribute/SetOfIntegerSyntax.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/SetOfIntegerSyntax.java 2003-12-27 14:21:07.000000000 +0000 *************** *** 0 **** --- 1,253 ---- + /* SetOfIntegerSyntax.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute; + + import java.io.Serializable; + import java.util.Vector; + + /** + * @author Michael Koch + */ + public abstract class SetOfIntegerSyntax + implements Cloneable, Serializable + { + private static final long serialVersionUID = 3666874174847632203L; + + private int[][] members; + + private static int[][] normalize(Vector vecMembers) + { + // XXX: Perhaps we should merge ranges that overlap. + + int current = 0; + int[][] members = new int[vecMembers.size()][]; + + while (vecMembers.size() > 0) + { + // Search the lowest range. + int[] range = (int[]) vecMembers.elementAt(0); + + for (int index = 1; index < vecMembers.size(); index++) + { + int[] tmp = (int[]) vecMembers.elementAt(index); + + if (range[0] > tmp[0] + || (range[0] == tmp[0] + && range[0] > tmp[0])) + range = tmp; + } + + members[current] = range; + current++; + } + + return members; + } + + /** + * Creates a SetOfIntegerSyntax object. + * + * @param member the member value + * + * @exception IllegalArgumentException if member is < 0 + */ + protected SetOfIntegerSyntax(int member) + { + if (member < 0) + throw new IllegalArgumentException("member may not be less than 0"); + + this.members = new int[][]{{member, member}}; + } + + /** + * Creates a SetOfIntegerSyntax object. + * + * @param members the members to use in this set + * + * @exception IllegalArgumentException if any element is invalid + * @exception NullPointerException if any element of members is null + */ + protected SetOfIntegerSyntax(int[][] members) + { + Vector vecMembers = new Vector(); + + if (members != null) + { + for (int index = 0; index < members.length; index++) + { + int lower; + int upper; + + if (members[index].length == 1) + { + lower = members[index][0]; + upper = members[index][0]; + } + else if (members[index].length == 2) + { + lower = members[index][0]; + upper = members[index][1]; + } + else + throw new IllegalArgumentException("invalid member element"); + + if (lower <= upper && lower < 0) + throw new IllegalArgumentException("invalid member element"); + + if (lower <= upper) + { + int[] range = new int[2]; + range[0] = lower; + range[1] = upper; + vecMembers.add(range); + } + } + } + + this.members = normalize(vecMembers); + } + + /** + * Creates a SetOfIntegerSyntax object. + * + * @param lowerBound the lower bound value + * @param upperBound the upper bound value + * + * @exception IllegalArgumentException if lowerBound <= uppbound + * and lowerBound < 0 + */ + protected SetOfIntegerSyntax(int lowerBound, int upperBound) + { + if (lowerBound <= upperBound + && lowerBound < 0) + throw new IllegalArgumentException(); + + members = (lowerBound <= upperBound ? new int[][]{{lowerBound, upperBound}} + : new int[0][]); + } + + /** + * Checks if this set contains value. + * + * @param value the value to test for + * + * @return true if this set contains value, false otherwise + */ + public boolean contains(int value) + { + // This only works on a normalized member array. + for (int index = 0; index < members.length; index++) + { + if (value < members[index][0]) + return false; + else if (value < members[index][1]) + return true; + } + + return false; + } + + /** + * Checks if this set contains value. + * + * @param value the value to test for + * + * @return true if this set contains value, false otherwise + */ + public boolean contains(IntegerSyntax value) + { + return contains(value.getValue()); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if (! (obj instanceof SetOfIntegerSyntax)) + return false; + + throw new Error("not implemented"); + } + + /** + * Returns an array describing the members included in this set. + * + * @return the array with the members + */ + public int[][] getMembers() + { + throw new Error("not implemented"); + } + + /** + * Returns the hashcode for this object. + * + * @return the hashcode + */ + public int hashCode() + { + throw new Error("not implemented"); + } + + /** + * Returns the smallest value that is greater then x. + * + * @param x an integer value + * + * @return the next value + */ + public int next(int x) + { + throw new Error("not implemented"); + } + + /** + * Returns the string representation for this object. + * + * @return the string representation + */ + public String toString() + { + throw new Error("not implemented"); + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/Size2DSyntax.java gcc-3.4.0/libjava/javax/print/attribute/Size2DSyntax.java *** gcc-3.3.3/libjava/javax/print/attribute/Size2DSyntax.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/Size2DSyntax.java 2003-12-27 14:21:07.000000000 +0000 *************** *** 0 **** --- 1,225 ---- + /* Size2DSyntax.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute; + + import java.io.Serializable; + + /** + * @author Michael Koch + */ + public abstract class Size2DSyntax implements Cloneable, Serializable + { + /** + * Constant for units of dots per mircometer to describe an inch. + */ + public static final int INCH = 25400; + + /** + * Constant for units of dots per mircometer to describe a centimeter. + */ + public static final int MM = 1000; + + private int x; + private int y; + + /** + * Creates a Size2DSyntax object with the given arguments. + * + * @param x the size in x direction + * @param y the size in y direction + * @param units the units to use for the sizes + * + * @exception IllegalArgumentException if preconditions fail + */ + protected Size2DSyntax(float x, float y, int units) + { + if (x < 0.0f || y < 0.0f) + throw new IllegalArgumentException("x and/or y may not be less than 0"); + + if (units < 1) + throw new IllegalArgumentException("units may not be less then 1"); + + this.x = (int) (x * units + 0.5f); + this.y = (int) (y * units + 0.5f); + } + + /** + * Creates a Size2DSyntax object with the given arguments. + * + * @param x the size in x direction + * @param y the size in y direction + * @param units the units to use for the sizes + * + * @exception IllegalArgumentException if preconditions fail + */ + protected Size2DSyntax(int x, int y, int units) + { + if (x < 0 || y < 0) + throw new IllegalArgumentException("x and/or y may not be less then 0"); + + if (units < 1) + throw new IllegalArgumentException("units may not be less then 1"); + + this.x = x * units; + this.y = y * units; + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if (! (obj instanceof Size2DSyntax)) + return false; + + Size2DSyntax tmp = (Size2DSyntax) obj; + + return (x == tmp.getXMicrometers() + && y == tmp.getYMicrometers()); + } + + /** + * Return the size described in this object as a two field array. + * Index 0 contains the size in x direction, index 1 the size in + * y direction. + * + * @param units the units to use + * + * @return the array that describes the size + * + * @exception IllegalArgumentException if units < 1 + */ + public float[] getSize(int units) + { + float[] size = new float[2]; + size[0] = getX(units); + size[1] = getY(units); + return size; + } + + /** + * Return the size in x direction. + * + * @param units the units to use + * + * @return the size value + * + * @exception IllegalArgumentException if units < 1 + */ + public float getX(int units) + { + if (units < 1) + throw new IllegalArgumentException("units may not be less then 1"); + + return ((float) x) / ((float) units); + } + + /** + * Returns the size in x direction in mircometers. + * + * @return the size value + */ + protected int getXMicrometers() + { + return x; + } + + /** + * Return the size in y direction. + * + * @param units the units to use + * + * @return the size value + * + * @exception IllegalArgumentException if units < 1 + */ + public float getY(int units) + { + if (units < 1) + throw new IllegalArgumentException("units may not be less then 1"); + + return ((float) y) / ((float) units); + } + + /** + * Returns the size in y direction in mircometers. + * + * @return the size value + */ + protected int getYMicrometers() + { + return y; + } + + /** + * Returns the hashcode for this object. + * + * @return the hashcode + */ + public int hashCode() + { + return x + y; + } + + /** + * Returns the string representation for this object. + * + * @return the string representation + */ + public String toString() + { + return toString(1, "um"); + } + + /** + * Returns the string representation for this object. + * + * @param units the units to use + * @param unitsName the name of the units + * + * @return the string representation + */ + public String toString(int units, String unitsName) + { + return "" + getX(units) + "x" + getY(units) + " " + unitsName; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/Copies.java gcc-3.4.0/libjava/javax/print/attribute/standard/Copies.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/Copies.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/Copies.java 2003-12-27 14:21:08.000000000 +0000 *************** *** 0 **** --- 1,101 ---- + /* Copies.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import javax.print.attribute.IntegerSyntax; + import javax.print.attribute.PrintJobAttribute; + import javax.print.attribute.PrintRequestAttribute; + + /** + * @author Michael Koch + */ + public final class Copies extends IntegerSyntax + implements PrintJobAttribute, PrintRequestAttribute + { + private static final long serialVersionUID = -6426631521680023833L; + + /** + * Creates a Copies object. + * + * @param value the number of copies + * + * @exception IllegalArgumentException if value < 1 + */ + public Copies(int value) + { + super(value); + + if (value < 1) + throw new IllegalArgumentException("value may not be less than 1"); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof Copies)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class Copies itself + */ + public final Class getCategory() + { + return Copies.class; + } + + /** + * Returns name of this class. + * + * @return the string "copies" + */ + public final String getName() + { + return "copies"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/DateTimeAtCompleted.java gcc-3.4.0/libjava/javax/print/attribute/standard/DateTimeAtCompleted.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/DateTimeAtCompleted.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/DateTimeAtCompleted.java 2004-01-06 13:48:52.000000000 +0000 *************** *** 0 **** --- 1,95 ---- + /* DateTimeAtCompleted.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import java.util.Date; + import javax.print.attribute.DateTimeSyntax; + import javax.print.attribute.PrintJobAttribute; + + public final class DateTimeAtCompleted extends DateTimeSyntax + implements PrintJobAttribute + { + private static final long serialVersionUID = 6497399708058490000L; + + /** + * Creates a DateTimeAtCompleted object. + * + * @param value the date at completion time + * + * @exception NullPointerException if value is null + */ + public DateTimeAtCompleted(Date value) + { + super(value); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof DateTimeAtCompleted)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class DateTimeAtCompleted itself + */ + public final Class getCategory() + { + return DateTimeAtCompleted.class; + } + + /** + * Returns name of this class. + * + * @return the string "date-time-at-completed" + */ + public final String getName() + { + return "date-time-at-completed"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/DateTimeAtCreation.java gcc-3.4.0/libjava/javax/print/attribute/standard/DateTimeAtCreation.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/DateTimeAtCreation.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/DateTimeAtCreation.java 2004-01-06 13:48:52.000000000 +0000 *************** *** 0 **** --- 1,95 ---- + /* DateTimeAtCreation.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import java.util.Date; + import javax.print.attribute.DateTimeSyntax; + import javax.print.attribute.PrintJobAttribute; + + public final class DateTimeAtCreation extends DateTimeSyntax + implements PrintJobAttribute + { + private static final long serialVersionUID = -2923732231056647903L; + + /** + * Creates a DateTimeAtCreation object. + * + * @param value the date at creation time + * + * @exception NullPointerException if value is null + */ + public DateTimeAtCreation(Date value) + { + super(value); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof DateTimeAtCreation)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class DateTimeAtCreation itself + */ + public final Class getCategory() + { + return DateTimeAtCreation.class; + } + + /** + * Returns name of this class. + * + * @return the string "date-time-at-creation" + */ + public final String getName() + { + return "date-time-at-creation"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/DateTimeAtProcessing.java gcc-3.4.0/libjava/javax/print/attribute/standard/DateTimeAtProcessing.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/DateTimeAtProcessing.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/DateTimeAtProcessing.java 2004-01-06 13:48:52.000000000 +0000 *************** *** 0 **** --- 1,95 ---- + /* DateTimeAtProcessing.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import java.util.Date; + import javax.print.attribute.DateTimeSyntax; + import javax.print.attribute.PrintJobAttribute; + + public final class DateTimeAtProcessing extends DateTimeSyntax + implements PrintJobAttribute + { + private static final long serialVersionUID = -3710068197278263244L; + + /** + * Creates a DateTimeAtProcessing object. + * + * @param value the date at processing time + * + * @exception NullPointerException if value is null + */ + public DateTimeAtProcessing(Date value) + { + super(value); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof DateTimeAtProcessing)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class DateTimeAtProcessing itself + */ + public final Class getCategory() + { + return DateTimeAtProcessing.class; + } + + /** + * Returns name of this class. + * + * @return the string "date-time-at-processing" + */ + public final String getName() + { + return "date-time-at-processing"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/DocumentName.java gcc-3.4.0/libjava/javax/print/attribute/standard/DocumentName.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/DocumentName.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/DocumentName.java 2004-01-09 11:26:42.000000000 +0000 *************** *** 0 **** --- 1,95 ---- + /* DocumentName.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import java.util.Locale; + import javax.print.attribute.DocAttribute; + import javax.print.attribute.TextSyntax; + + public final class DocumentName extends TextSyntax + implements DocAttribute + { + private static final long serialVersionUID = 7883105848533280430L; + + /** + * Creates a DocumentName object. + * + * @param documentName the document name + * + * @exception NullPointerException if documentName is null + */ + public DocumentName(String documentName, Locale locale) + { + super(documentName, locale); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof DocumentName)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class DocumentName itself + */ + public final Class getCategory() + { + return DocumentName.class; + } + + /** + * Returns name of this class. + * + * @return the string "document-name" + */ + public final String getName() + { + return "document-name"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/JobHoldUntil.java gcc-3.4.0/libjava/javax/print/attribute/standard/JobHoldUntil.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/JobHoldUntil.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/JobHoldUntil.java 2004-01-09 11:26:42.000000000 +0000 *************** *** 0 **** --- 1,96 ---- + /* JobHoldUntil.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import java.util.Date; + import javax.print.attribute.DateTimeSyntax; + import javax.print.attribute.PrintJobAttribute; + import javax.print.attribute.PrintRequestAttribute; + + public final class JobHoldUntil extends DateTimeSyntax + implements PrintJobAttribute, PrintRequestAttribute + { + private static final long serialVersionUID = -1664471048860415024L; + + /** + * Creates a JobHoldUntil object. + * + * @param value the date to hold the job until + * + * @exception NullPointerException if value is null + */ + public JobHoldUntil(Date value) + { + super(value); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof JobHoldUntil)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class JobHoldUntil itself + */ + public final Class getCategory() + { + return JobHoldUntil.class; + } + + /** + * Returns name of this class. + * + * @return the string "job-hold-until" + */ + public final String getName() + { + return "job-hold-until"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/JobImpressionsCompleted.java gcc-3.4.0/libjava/javax/print/attribute/standard/JobImpressionsCompleted.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/JobImpressionsCompleted.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/JobImpressionsCompleted.java 2004-01-06 13:48:52.000000000 +0000 *************** *** 0 **** --- 1,100 ---- + /* JobImpressionsCompleted.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import javax.print.attribute.IntegerSyntax; + import javax.print.attribute.PrintJobAttribute; + + /** + * @author Michael Koch + */ + public final class JobImpressionsCompleted extends IntegerSyntax + implements PrintJobAttribute + { + private static final long serialVersionUID = 6722648442432393294L; + + /** + * Creates a JobImpressionsCompleted object. + * + * @param value the number of completed impressions + * + * @exception IllegalArgumentException if value < 0 + */ + public JobImpressionsCompleted(int value) + { + super(value); + + if (value < 0) + throw new IllegalArgumentException("value may not be less than 0"); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof JobImpressionsCompleted)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class JobImpressionsCompleted itself + */ + public final Class getCategory() + { + return JobImpressionsCompleted.class; + } + + /** + * Returns name of this class. + * + * @return the string "job-impressions-completed" + */ + public final String getName() + { + return "job-impressions"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/JobImpressions.java gcc-3.4.0/libjava/javax/print/attribute/standard/JobImpressions.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/JobImpressions.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/JobImpressions.java 2003-12-27 14:21:08.000000000 +0000 *************** *** 0 **** --- 1,101 ---- + /* JobImpressions.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import javax.print.attribute.IntegerSyntax; + import javax.print.attribute.PrintJobAttribute; + import javax.print.attribute.PrintRequestAttribute; + + /** + * @author Michael Koch + */ + public final class JobImpressions extends IntegerSyntax + implements PrintJobAttribute, PrintRequestAttribute + { + private static final long serialVersionUID = 8225537206784322464L; + + /** + * Creates a JobImpressions object. + * + * @param value the number of impressions + * + * @exception IllegalArgumentException if value < 0 + */ + public JobImpressions(int value) + { + super(value); + + if (value < 0) + throw new IllegalArgumentException("value may not be less than 0"); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof JobImpressions)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class JobImpressions itself + */ + public final Class getCategory() + { + return JobImpressions.class; + } + + /** + * Returns name of this class. + * + * @return the string "job-impressions" + */ + public final String getName() + { + return "job-impressions"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/JobKOctets.java gcc-3.4.0/libjava/javax/print/attribute/standard/JobKOctets.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/JobKOctets.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/JobKOctets.java 2004-01-06 13:48:52.000000000 +0000 *************** *** 0 **** --- 1,101 ---- + /* JobKOctets.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import javax.print.attribute.IntegerSyntax; + import javax.print.attribute.PrintJobAttribute; + import javax.print.attribute.PrintRequestAttribute; + + /** + * @author Michael Koch + */ + public final class JobKOctets extends IntegerSyntax + implements PrintJobAttribute, PrintRequestAttribute + { + private static final long serialVersionUID = -8959710146498202869L; + + /** + * Creates a JobKOctets object. + * + * @param value the number of K octets + * + * @exception IllegalArgumentException if value < 0 + */ + public JobKOctets(int value) + { + super(value); + + if (value < 0) + throw new IllegalArgumentException("value may not be less than 0"); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof JobKOctets)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class JobKOctets itself + */ + public final Class getCategory() + { + return JobKOctets.class; + } + + /** + * Returns name of this class. + * + * @return the string "job-k-octets" + */ + public final String getName() + { + return "job-k-octets"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/JobKOctetsProcessed.java gcc-3.4.0/libjava/javax/print/attribute/standard/JobKOctetsProcessed.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/JobKOctetsProcessed.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/JobKOctetsProcessed.java 2004-01-10 22:16:01.000000000 +0000 *************** *** 0 **** --- 1,100 ---- + /* JobKOctetsProcessed.java -- + Copyright (C) 2003, 2004 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import javax.print.attribute.IntegerSyntax; + import javax.print.attribute.PrintJobAttribute; + + /** + * @author Michael Koch + */ + public final class JobKOctetsProcessed extends IntegerSyntax + implements PrintJobAttribute + { + private static final long serialVersionUID = -6265238509657881806L; + + /** + * Creates a JobKOctetsProcessed object. + * + * @param value the number of processed K octets + * + * @exception IllegalArgumentException if value < 0 + */ + public JobKOctetsProcessed(int value) + { + super(value); + + if (value < 0) + throw new IllegalArgumentException("value may not be less than 0"); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof JobKOctetsProcessed)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class JobKOctetsProcessed itself + */ + public final Class getCategory() + { + return JobKOctetsProcessed.class; + } + + /** + * Returns name of this class. + * + * @return the string "job-k-octets-processed" + */ + public final String getName() + { + return "job-k-octets-processed"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/JobMediaSheetsCompleted.java gcc-3.4.0/libjava/javax/print/attribute/standard/JobMediaSheetsCompleted.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/JobMediaSheetsCompleted.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/JobMediaSheetsCompleted.java 2004-01-10 22:16:01.000000000 +0000 *************** *** 0 **** --- 1,100 ---- + /* JobMediaSheetsCompleted.java -- + Copyright (C) 2003, 2004 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import javax.print.attribute.IntegerSyntax; + import javax.print.attribute.PrintJobAttribute; + + /** + * @author Michael Koch + */ + public final class JobMediaSheetsCompleted extends IntegerSyntax + implements PrintJobAttribute + { + private static final long serialVersionUID = 1739595973810840475L; + + /** + * Creates a JobMediaSheetsCompleted object. + * + * @param value the number of completed media sheets for a print job + * + * @exception IllegalArgumentException if value < 0 + */ + public JobMediaSheetsCompleted(int value) + { + super(value); + + if (value < 0) + throw new IllegalArgumentException("value may not be less than 0"); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof JobMediaSheetsCompleted)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class JobMediaSheetsCompleted itself + */ + public final Class getCategory() + { + return JobMediaSheetsCompleted.class; + } + + /** + * Returns name of this class. + * + * @return the string "job-media-sheets-completed" + */ + public final String getName() + { + return "job-media-sheets-completed"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/JobMediaSheets.java gcc-3.4.0/libjava/javax/print/attribute/standard/JobMediaSheets.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/JobMediaSheets.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/JobMediaSheets.java 2003-12-27 14:21:08.000000000 +0000 *************** *** 0 **** --- 1,101 ---- + /* JobMediaSheets.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import javax.print.attribute.IntegerSyntax; + import javax.print.attribute.PrintJobAttribute; + import javax.print.attribute.PrintRequestAttribute; + + /** + * @author Michael Koch + */ + public class JobMediaSheets extends IntegerSyntax + implements PrintJobAttribute, PrintRequestAttribute + { + private static final long serialVersionUID = 408871131531979741L; + + /** + * Creates a JobMediaSheets object. + * + * @param value the number of media sheets for a print job + * + * @exception IllegalArgumentException if value < 0 + */ + public JobMediaSheets(int value) + { + super(value); + + if (value < 0) + throw new IllegalArgumentException("value may not be less than 0"); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof JobMediaSheets)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class JobMediaSheets itself + */ + public final Class getCategory() + { + return JobMediaSheets.class; + } + + /** + * Returns name of this class. + * + * @return the string "job-media-sheets" + */ + public final String getName() + { + return "job-media-sheets"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/JobMessageFromOperator.java gcc-3.4.0/libjava/javax/print/attribute/standard/JobMessageFromOperator.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/JobMessageFromOperator.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/JobMessageFromOperator.java 2004-01-09 11:26:42.000000000 +0000 *************** *** 0 **** --- 1,95 ---- + /* JobMessageFromOperator.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import java.util.Locale; + import javax.print.attribute.PrintJobAttribute; + import javax.print.attribute.TextSyntax; + + public final class JobMessageFromOperator extends TextSyntax + implements PrintJobAttribute + { + private static final long serialVersionUID = -4620751846003142047L; + + /** + * Creates a JobMessageFromOperator object. + * + * @param message the message + * + * @exception NullPointerException if message is null + */ + public JobMessageFromOperator(String message, Locale locale) + { + super(message, locale); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof JobMessageFromOperator)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class JobMessageFromOperator itself + */ + public final Class getCategory() + { + return JobMessageFromOperator.class; + } + + /** + * Returns name of this class. + * + * @return the string "job-message-from-operator" + */ + public final String getName() + { + return "job-message-from-operator"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/JobName.java gcc-3.4.0/libjava/javax/print/attribute/standard/JobName.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/JobName.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/JobName.java 2004-01-09 11:26:42.000000000 +0000 *************** *** 0 **** --- 1,96 ---- + /* JobName.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import java.util.Locale; + import javax.print.attribute.PrintJobAttribute; + import javax.print.attribute.PrintRequestAttribute; + import javax.print.attribute.TextSyntax; + + public final class JobName extends TextSyntax + implements PrintJobAttribute, PrintRequestAttribute + { + private static final long serialVersionUID = 4660359192078689545L; + + /** + * Creates a JobName object. + * + * @param jobName the job name + * + * @exception NullPointerException if jobName is null + */ + public JobName(String jobName, Locale locale) + { + super(jobName, locale); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof JobName)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class JobName itself + */ + public final Class getCategory() + { + return JobName.class; + } + + /** + * Returns name of this class. + * + * @return the string "job-name" + */ + public final String getName() + { + return "job-name"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/JobOriginatingUserName.java gcc-3.4.0/libjava/javax/print/attribute/standard/JobOriginatingUserName.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/JobOriginatingUserName.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/JobOriginatingUserName.java 2004-01-09 11:26:42.000000000 +0000 *************** *** 0 **** --- 1,95 ---- + /* JobOriginatingUserName.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import java.util.Locale; + import javax.print.attribute.PrintJobAttribute; + import javax.print.attribute.TextSyntax; + + public final class JobOriginatingUserName extends TextSyntax + implements PrintJobAttribute + { + private static final long serialVersionUID = -8052537926362933477L; + + /** + * Creates a JobOriginatingUserName object. + * + * @param userName the user name + * + * @exception NullPointerException if userName is null + */ + public JobOriginatingUserName(String userName, Locale locale) + { + super(userName, locale); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof JobOriginatingUserName)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class JobOriginatingUserName itself + */ + public final Class getCategory() + { + return JobOriginatingUserName.class; + } + + /** + * Returns name of this class. + * + * @return the string "job-originating-user-name" + */ + public final String getName() + { + return "job-originating-user-name"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/JobPriority.java gcc-3.4.0/libjava/javax/print/attribute/standard/JobPriority.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/JobPriority.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/JobPriority.java 2003-12-23 11:55:29.000000000 +0000 *************** *** 0 **** --- 1,98 ---- + /* JobPriority.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import javax.print.attribute.IntegerSyntax; + import javax.print.attribute.PrintJobAttribute; + import javax.print.attribute.PrintRequestAttribute; + + public final class JobPriority extends IntegerSyntax + implements PrintJobAttribute, PrintRequestAttribute + { + private static final long serialVersionUID = -4599900369040602769L; + + /** + * Creates a JobPriority object. + * + * @param value the priority + * + * @exception IllegalArgumentException if value < 1 or value > 100 + */ + public JobPriority(int value) + { + super(value); + + if (value < 1 || value > 100) + throw new IllegalArgumentException("value out of range"); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof JobPriority)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class JobPriority itself + */ + public final Class getCategory() + { + return JobPriority.class; + } + + /** + * Returns name of this class. + * + * @return the string "job-priority" + */ + public final String getName() + { + return "job-priority"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/JobPrioritySupported.java gcc-3.4.0/libjava/javax/print/attribute/standard/JobPrioritySupported.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/JobPrioritySupported.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/JobPrioritySupported.java 2004-01-06 13:48:52.000000000 +0000 *************** *** 0 **** --- 1,97 ---- + /* JobPrioritySupported.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import javax.print.attribute.IntegerSyntax; + import javax.print.attribute.SupportedValuesAttribute; + + public final class JobPrioritySupported extends IntegerSyntax + implements SupportedValuesAttribute + { + private static final long serialVersionUID = 2564840378013555894L; + + /** + * Creates a JobPrioritySupported object. + * + * @param value the priority + * + * @exception IllegalArgumentException if value < 1 or value > 100 + */ + public JobPrioritySupported(int value) + { + super(value); + + if (value < 1 || value > 100) + throw new IllegalArgumentException("value out of range"); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof JobPrioritySupported)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class JobPrioritySupported itself + */ + public final Class getCategory() + { + return JobPrioritySupported.class; + } + + /** + * Returns name of this class. + * + * @return the string "job-priority-supported" + */ + public final String getName() + { + return "job-priority-supported"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/NumberOfDocuments.java gcc-3.4.0/libjava/javax/print/attribute/standard/NumberOfDocuments.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/NumberOfDocuments.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/NumberOfDocuments.java 2003-12-27 14:21:08.000000000 +0000 *************** *** 0 **** --- 1,100 ---- + /* NumberOfDocuments.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import javax.print.attribute.IntegerSyntax; + import javax.print.attribute.PrintJobAttribute; + + /** + * @author Michael Koch + */ + public final class NumberOfDocuments extends IntegerSyntax + implements PrintJobAttribute + { + private static final long serialVersionUID = 7891881310684461097L; + + /** + * Creates a NumberOfDocuments object. + * + * @param value the number of documents + * + * @exception IllegalArgumentException if value < 0 + */ + public NumberOfDocuments(int value) + { + super(value); + + if (value < 0) + throw new IllegalArgumentException("value may not be less than 0"); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof NumberOfDocuments)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class NumberOfDocuments itself + */ + public final Class getCategory() + { + return NumberOfDocuments.class; + } + + /** + * Returns name of this class. + * + * @return the string "number-of-documents" + */ + public final String getName() + { + return "number-of-documents"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/NumberOfInterveningJobs.java gcc-3.4.0/libjava/javax/print/attribute/standard/NumberOfInterveningJobs.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/NumberOfInterveningJobs.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/NumberOfInterveningJobs.java 2003-12-27 14:21:08.000000000 +0000 *************** *** 0 **** --- 1,100 ---- + /* NumberOfInterveningJobs.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import javax.print.attribute.IntegerSyntax; + import javax.print.attribute.PrintJobAttribute; + + /** + * @author Michael Koch + */ + public final class NumberOfInterveningJobs extends IntegerSyntax + implements PrintJobAttribute + { + private static final long serialVersionUID = 2568141124844982746L; + + /** + * Creates a QueuedJobCount object. + * + * @param value the number of intervening jobs + * + * @exception IllegalArgumentException if value < 0 + */ + public NumberOfInterveningJobs(int value) + { + super(value); + + if (value < 0) + throw new IllegalArgumentException("value may not be less than 0"); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof NumberOfInterveningJobs)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class NumberOfInterveningJobs itself + */ + public final Class getCategory() + { + return NumberOfInterveningJobs.class; + } + + /** + * Returns name of this class. + * + * @return the string "number-of-intervening-jobs" + */ + public final String getName() + { + return "number-of-intervening-jobs"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/NumberUp.java gcc-3.4.0/libjava/javax/print/attribute/standard/NumberUp.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/NumberUp.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/NumberUp.java 2003-12-23 11:55:29.000000000 +0000 *************** *** 0 **** --- 1,100 ---- + /* NumberUp.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import javax.print.attribute.DocAttribute; + import javax.print.attribute.IntegerSyntax; + import javax.print.attribute.PrintJobAttribute; + import javax.print.attribute.PrintRequestAttribute; + + /** + * @author Michael Koch + */ + public final class NumberUp extends IntegerSyntax + implements DocAttribute, PrintJobAttribute, PrintRequestAttribute + { + private static final long serialVersionUID = -3040436486786527811L; + + /** + * Creates a NumberUp object. + * + * @param value the number of print-stream pages to print on a single side + * of a media + * + * @exception IllegalArgumentException if value < 1 + */ + public NumberUp(int value) + { + super(value); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof NumberUp)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class NumberUp itself + */ + public final Class getCategory() + { + return NumberUp.class; + } + + /** + * Returns name of this class. + * + * @return the string "number-up" + */ + public final String getName() + { + return "number-up"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/OutputDeviceAssigned.java gcc-3.4.0/libjava/javax/print/attribute/standard/OutputDeviceAssigned.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/OutputDeviceAssigned.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/OutputDeviceAssigned.java 2004-01-10 22:16:01.000000000 +0000 *************** *** 0 **** --- 1,95 ---- + /* OutputDeviceAssigned.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import java.util.Locale; + import javax.print.attribute.PrintJobAttribute; + import javax.print.attribute.TextSyntax; + + public final class OutputDeviceAssigned extends TextSyntax + implements PrintJobAttribute + { + private static final long serialVersionUID = 5486733778854271081L; + + /** + * Creates a OutputDeviceAssigned object. + * + * @param deviceName the user name + * + * @exception NullPointerException if deviceName is null + */ + public OutputDeviceAssigned(String deviceName, Locale locale) + { + super(deviceName, locale); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof OutputDeviceAssigned)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class OutputDeviceAssigned itself + */ + public final Class getCategory() + { + return OutputDeviceAssigned.class; + } + + /** + * Returns name of this class. + * + * @return the string "output-device-assigned" + */ + public final String getName() + { + return "output-device-assigned"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/PagesPerMinuteColor.java gcc-3.4.0/libjava/javax/print/attribute/standard/PagesPerMinuteColor.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/PagesPerMinuteColor.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/PagesPerMinuteColor.java 2003-12-27 14:21:08.000000000 +0000 *************** *** 0 **** --- 1,100 ---- + /* PagesPerMinuteColor.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import javax.print.attribute.IntegerSyntax; + import javax.print.attribute.PrintServiceAttribute; + + /** + * @author Michael Koch + */ + public final class PagesPerMinuteColor extends IntegerSyntax + implements PrintServiceAttribute + { + private static final long serialVersionUID = 1684993151687470944L; + + /** + * Creates a PagesPerMinuteColor object. + * + * @param value the number of pages per minute + * + * @exception IllegalArgumentException if value < 0 + */ + public PagesPerMinuteColor(int value) + { + super(value); + + if (value < 0) + throw new IllegalArgumentException("value may not be less than 0"); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof PagesPerMinuteColor)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class PagesPerMinuteColor itself + */ + public final Class getCategory() + { + return PagesPerMinuteColor.class; + } + + /** + * Returns name of this class. + * + * @return the string "pages-per-minute-color" + */ + public final String getName() + { + return "pages-per-minute-color"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/PagesPerMinute.java gcc-3.4.0/libjava/javax/print/attribute/standard/PagesPerMinute.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/PagesPerMinute.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/PagesPerMinute.java 2003-12-27 14:21:08.000000000 +0000 *************** *** 0 **** --- 1,100 ---- + /* PagesPerMinute.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import javax.print.attribute.IntegerSyntax; + import javax.print.attribute.PrintServiceAttribute; + + /** + * @author Michael Koch + */ + public final class PagesPerMinute extends IntegerSyntax + implements PrintServiceAttribute + { + private static final long serialVersionUID = -6366403993072862015L; + + /** + * Creates a PagesPerMinute object. + * + * @param value the number of pages per minute + * + * @exception IllegalArgumentException if value < 0 + */ + public PagesPerMinute(int value) + { + super(value); + + if (value < 0) + throw new IllegalArgumentException("value may not be less than 0"); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof PagesPerMinute)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class PagesPerMinute itself + */ + public final Class getCategory() + { + return PagesPerMinute.class; + } + + /** + * Returns name of this class. + * + * @return the string "pages-per-minute" + */ + public final String getName() + { + return "pages-per-minute"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/PrinterInfo.java gcc-3.4.0/libjava/javax/print/attribute/standard/PrinterInfo.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/PrinterInfo.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/PrinterInfo.java 2004-01-09 11:26:42.000000000 +0000 *************** *** 0 **** --- 1,95 ---- + /* PrinterInfo.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import java.util.Locale; + import javax.print.attribute.PrintServiceAttribute; + import javax.print.attribute.TextSyntax; + + public final class PrinterInfo extends TextSyntax + implements PrintServiceAttribute + { + private static final long serialVersionUID = 7765280618777599727L; + + /** + * Creates a PrinterInfo object. + * + * @param printerInfo the printer info + * + * @exception NullPointerException if printerInfo is null + */ + public PrinterInfo(String printerInfo, Locale locale) + { + super(printerInfo, locale); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof PrinterInfo)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class PrinterInfo itself + */ + public final Class getCategory() + { + return PrinterInfo.class; + } + + /** + * Returns name of this class. + * + * @return the string "printer-info" + */ + public final String getName() + { + return "printer-info"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/PrinterLocation.java gcc-3.4.0/libjava/javax/print/attribute/standard/PrinterLocation.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/PrinterLocation.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/PrinterLocation.java 2004-01-09 11:26:42.000000000 +0000 *************** *** 0 **** --- 1,95 ---- + /* PrinterLocation.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import java.util.Locale; + import javax.print.attribute.PrintServiceAttribute; + import javax.print.attribute.TextSyntax; + + public final class PrinterLocation extends TextSyntax + implements PrintServiceAttribute + { + private static final long serialVersionUID = -1598610039865566337L; + + /** + * Creates a PrinterLocation object. + * + * @param printerLocation the printer location + * + * @exception NullPointerException if printerLocation is null + */ + public PrinterLocation(String printerLocation, Locale locale) + { + super(printerLocation, locale); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof PrinterLocation)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class PrinterLocation itself + */ + public final Class getCategory() + { + return PrinterLocation.class; + } + + /** + * Returns name of this class. + * + * @return the string "printer-location" + */ + public final String getName() + { + return "printer-location"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/PrinterMakeAndModel.java gcc-3.4.0/libjava/javax/print/attribute/standard/PrinterMakeAndModel.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/PrinterMakeAndModel.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/PrinterMakeAndModel.java 2004-01-09 11:26:42.000000000 +0000 *************** *** 0 **** --- 1,95 ---- + /* PrinterMakeAndModel.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import java.util.Locale; + import javax.print.attribute.PrintServiceAttribute; + import javax.print.attribute.TextSyntax; + + public final class PrinterMakeAndModel extends TextSyntax + implements PrintServiceAttribute + { + private static final long serialVersionUID = 4580461489499351411L; + + /** + * Creates a PrinterMakeAndModel object. + * + * @param makeAndModel the make and model string + * + * @exception NullPointerException if makeAndModel is null + */ + public PrinterMakeAndModel(String makeAndModel, Locale locale) + { + super(makeAndModel, locale); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof PrinterMakeAndModel)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class PrinterMakeAndModel itself + */ + public final Class getCategory() + { + return PrinterMakeAndModel.class; + } + + /** + * Returns name of this class. + * + * @return the string "printer-make-and-model" + */ + public final String getName() + { + return "printer-make-and-model"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/PrinterMessageFromOperator.java gcc-3.4.0/libjava/javax/print/attribute/standard/PrinterMessageFromOperator.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/PrinterMessageFromOperator.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/PrinterMessageFromOperator.java 2004-01-09 11:26:42.000000000 +0000 *************** *** 0 **** --- 1,95 ---- + /* PrinterMessageFromOperator.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import java.util.Locale; + import javax.print.attribute.PrintServiceAttribute; + import javax.print.attribute.TextSyntax; + + public final class PrinterMessageFromOperator extends TextSyntax + implements PrintServiceAttribute + { + private static final long serialVersionUID = -4486871203218629318L; + + /** + * Creates a PrinterMessageFromOperator object. + * + * @param message the message + * + * @exception NullPointerException if message is null + */ + public PrinterMessageFromOperator(String message, Locale locale) + { + super(message, locale); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof PrinterMessageFromOperator)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class PrinterMessageFromOperator itself + */ + public final Class getCategory() + { + return PrinterMessageFromOperator.class; + } + + /** + * Returns name of this class. + * + * @return the string "printer-message-from-operator" + */ + public final String getName() + { + return "printer-message-from-operator"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/PrinterName.java gcc-3.4.0/libjava/javax/print/attribute/standard/PrinterName.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/PrinterName.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/PrinterName.java 2004-01-09 11:26:42.000000000 +0000 *************** *** 0 **** --- 1,95 ---- + /* PrinterName.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import java.util.Locale; + import javax.print.attribute.PrintServiceAttribute; + import javax.print.attribute.TextSyntax; + + public final class PrinterName extends TextSyntax + implements PrintServiceAttribute + { + private static final long serialVersionUID = 299740639137803127L; + + /** + * Creates a PrinterName object. + * + * @param printerName the printer name + * + * @exception NullPointerException if printerName is null + */ + public PrinterName(String printerName, Locale locale) + { + super(printerName, locale); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof PrinterName)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class PrinterName itself + */ + public final Class getCategory() + { + return PrinterName.class; + } + + /** + * Returns name of this class. + * + * @return the string "printer-name" + */ + public final String getName() + { + return "printer-name"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/QueuedJobCount.java gcc-3.4.0/libjava/javax/print/attribute/standard/QueuedJobCount.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/QueuedJobCount.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/QueuedJobCount.java 2003-12-27 14:21:08.000000000 +0000 *************** *** 0 **** --- 1,100 ---- + /* QueuedJobCount.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import javax.print.attribute.IntegerSyntax; + import javax.print.attribute.PrintServiceAttribute; + + /** + * @author Michael Koch + */ + public final class QueuedJobCount extends IntegerSyntax + implements PrintServiceAttribute + { + private static final long serialVersionUID = 7499723077864047742L; + + /** + * Creates a QueuedJobCount object. + * + * @param value the number of queued jobs + * + * @exception IllegalArgumentException if value < 0 + */ + public QueuedJobCount(int value) + { + super(value); + + if (value < 0) + throw new IllegalArgumentException("value may not be less than 0"); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof QueuedJobCount)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class QueuedJobCount itself + */ + public final Class getCategory() + { + return QueuedJobCount.class; + } + + /** + * Returns name of this class. + * + * @return the string "queued-job-count" + */ + public final String getName() + { + return "queued-job-count"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/standard/RequestingUserName.java gcc-3.4.0/libjava/javax/print/attribute/standard/RequestingUserName.java *** gcc-3.3.3/libjava/javax/print/attribute/standard/RequestingUserName.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/standard/RequestingUserName.java 2004-01-10 22:16:01.000000000 +0000 *************** *** 0 **** --- 1,95 ---- + /* RequestingUserName.java -- + Copyright (C) 2004 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute.standard; + + import java.util.Locale; + import javax.print.attribute.PrintRequestAttribute; + import javax.print.attribute.TextSyntax; + + public final class RequestingUserName extends TextSyntax + implements PrintRequestAttribute + { + private static final long serialVersionUID = -2683049894310331454L; + + /** + * Creates a RequestingUserName object. + * + * @param userName the job name + * + * @exception NullPointerException if userName is null + */ + public RequestingUserName(String userName, Locale locale) + { + super(userName, locale); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if(! (obj instanceof RequestingUserName)) + return false; + + return super.equals(obj); + } + + /** + * Returns category of this class. + * + * @return the class RequestingUserName itself + */ + public final Class getCategory() + { + return RequestingUserName.class; + } + + /** + * Returns name of this class. + * + * @return the string "requesting-user-name" + */ + public final String getName() + { + return "requesting-user-name"; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/SupportedValuesAttribute.java gcc-3.4.0/libjava/javax/print/attribute/SupportedValuesAttribute.java *** gcc-3.3.3/libjava/javax/print/attribute/SupportedValuesAttribute.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/SupportedValuesAttribute.java 2003-12-21 11:44:02.000000000 +0000 *************** *** 0 **** --- 1,45 ---- + /* Attribute.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute; + + /** + * @author Michael Koch + */ + public interface SupportedValuesAttribute extends Attribute + { + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/TextSyntax.java gcc-3.4.0/libjava/javax/print/attribute/TextSyntax.java *** gcc-3.3.3/libjava/javax/print/attribute/TextSyntax.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/TextSyntax.java 2003-12-21 11:10:54.000000000 +0000 *************** *** 0 **** --- 1,118 ---- + /* TextSyntax.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute; + + import java.io.Serializable; + import java.util.Locale; + + /** + * @author Michael Koch + */ + public abstract class TextSyntax implements Cloneable, Serializable + { + private static final long serialVersionUID = -8130648736378144102L; + + private String value; + private Locale locale; + + /** + * Creates a TextSyntax object with the given value + * and locale. + * + * @param value the value for this syntax + * @param locale the locale to use + * + * @exception NullPointerException if value is null + */ + protected TextSyntax(String value, Locale locale) + { + if (value == null) + throw new NullPointerException("value may not be null"); + + this.value = value; + this.locale = locale; + } + + /** + * Returns the value of this syntax object. + * + * @return the value + */ + public String getValue() + { + return value; + } + + /** + * Returns the locale of this syntax object. + * + * @return the locale + */ + public Locale getLocale() + { + return locale; + } + + /** + * Returns the hashcode for this object. + * + * @return the hashcode + */ + public int hashCode() + { + return value.hashCode() + locale.hashCode(); + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if (! (obj instanceof TextSyntax)) + return false; + + TextSyntax tmp = (TextSyntax) obj; + + return (value.equals(tmp.getValue()) + && locale.equals(tmp.getLocale())); + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/UnmodifiableSetException.java gcc-3.4.0/libjava/javax/print/attribute/UnmodifiableSetException.java *** gcc-3.3.3/libjava/javax/print/attribute/UnmodifiableSetException.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/UnmodifiableSetException.java 2003-12-21 11:10:54.000000000 +0000 *************** *** 0 **** --- 1,65 ---- + /* Attribute.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute; + + /** + * @author Michael Koch + * + * @since 1.4 + */ + public class UnmodifiableSetException extends RuntimeException + { + /** + * Creates a UnmodifiableSetException. + */ + public UnmodifiableSetException() + { + super(); + } + + /** + * Creates a UnmodifiableSetException + * with the given message. + * + * @param message the message for the exception + */ + public UnmodifiableSetException(String message) + { + super(message); + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/print/attribute/URISyntax.java gcc-3.4.0/libjava/javax/print/attribute/URISyntax.java *** gcc-3.3.3/libjava/javax/print/attribute/URISyntax.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/print/attribute/URISyntax.java 2003-12-23 10:21:31.000000000 +0000 *************** *** 0 **** --- 1,112 ---- + /* URISyntax.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.print.attribute; + + import java.io.Serializable; + import java.net.URI; + + /** + * @author Michael Koch + */ + public abstract class URISyntax + implements Cloneable, Serializable + { + private static final long serialVersionUID = -7842661210486401678L; + + private URI uri; + + /** + * Creates a URISyntax object. + * + * @param uri the URI value for the syntax + * + * @exception NullPointerException if uri is null + */ + protected URISyntax(URI uri) + { + if (uri == null) + throw new NullPointerException("uri may not be null"); + + this.uri = uri; + } + + /** + * Tests of obj is equal to this object. + * + * @param obj the object to test + * + * @returns true if both objects are equal, false otherwise. + */ + public boolean equals(Object obj) + { + if (! (obj instanceof URISyntax)) + return false; + + return uri.equals(((URISyntax) obj).getURI()); + } + + /** + * Returns the URI value of this syntax object. + * + * @return the URI + */ + public URI getURI() + { + return uri; + } + + /** + * Returns the hashcode for this object. + * + * @return the hashcode + */ + public int hashCode() + { + return uri.hashCode(); + } + + /** + * Returns the string representation for this object. + * + * @return the string representation + */ + public String toString() + { + return uri.toString(); + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/rmi/BAD_OPERATION.java gcc-3.4.0/libjava/javax/rmi/BAD_OPERATION.java *** gcc-3.3.3/libjava/javax/rmi/BAD_OPERATION.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/rmi/BAD_OPERATION.java 2003-03-29 21:23:25.000000000 +0000 *************** *** 0 **** --- 1,4 ---- + package javax.rmi; + + /** XXX - Stub till we have org.omg.CORBA */ + public class BAD_OPERATION extends Exception { } diff -Nrc3pad gcc-3.3.3/libjava/javax/rmi/CORBA/ClassDesc.java gcc-3.4.0/libjava/javax/rmi/CORBA/ClassDesc.java *** gcc-3.3.3/libjava/javax/rmi/CORBA/ClassDesc.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/rmi/CORBA/ClassDesc.java 2003-03-29 21:23:25.000000000 +0000 *************** *** 0 **** --- 1,55 ---- + /* ClassDesc.java -- + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package javax.rmi.CORBA; + + import java.io.Serializable; + + public class ClassDesc + implements Serializable + { + /* + * The following is serialized form required by Java API Doc + */ + private String repid; + private String codebase; + + public ClassDesc() + { + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/rmi/CORBA/ObjectImpl.java gcc-3.4.0/libjava/javax/rmi/CORBA/ObjectImpl.java *** gcc-3.3.3/libjava/javax/rmi/CORBA/ObjectImpl.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/rmi/CORBA/ObjectImpl.java 2003-03-29 21:23:25.000000000 +0000 *************** *** 0 **** --- 1,9 ---- + package javax.rmi.CORBA; + + /** XXX - Stub till we have org.omg.CORBA */ + public class ObjectImpl + { + public ObjectImpl _orb() { return null; } + public String object_to_string(ObjectImpl o) + throws javax.rmi.BAD_OPERATION { return null; } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/rmi/CORBA/PortableRemoteObjectDelegate.java gcc-3.4.0/libjava/javax/rmi/CORBA/PortableRemoteObjectDelegate.java *** gcc-3.3.3/libjava/javax/rmi/CORBA/PortableRemoteObjectDelegate.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/rmi/CORBA/PortableRemoteObjectDelegate.java 2003-03-29 21:23:25.000000000 +0000 *************** *** 0 **** --- 1,63 ---- + /* PortableRemoteObjectDelegate.java -- Interface supporting PortableRemoteObject + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package javax.rmi.CORBA; + + import java.rmi.*; + + /** + * A delegate is a singleton class that support delegation for method + * implementation in PortableRemoteObject. + */ + public interface PortableRemoteObjectDelegate + { + void connect(Remote target, Remote source) + throws RemoteException; + + void exportObject(Remote obj) + throws RemoteException; + + Object narrow(Object narrowFrom, Class narrowTo) + throws ClassCastException; + + Remote toStub(Remote obj) + throws NoSuchObjectException; + + void unexportObject(Remote obj) + throws NoSuchObjectException; + } diff -Nrc3pad gcc-3.3.3/libjava/javax/rmi/CORBA/StubDelegate.java gcc-3.4.0/libjava/javax/rmi/CORBA/StubDelegate.java *** gcc-3.3.3/libjava/javax/rmi/CORBA/StubDelegate.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/rmi/CORBA/StubDelegate.java 2003-03-29 21:23:25.000000000 +0000 *************** *** 0 **** --- 1,65 ---- + /* StubDelegate.java -- + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package javax.rmi.CORBA; + + import java.io.IOException; + import java.io.ObjectInputStream; + import java.io.ObjectOutputStream; + import java.rmi.RemoteException; + //import org.omg.CORBA.ORB; + + public interface StubDelegate + { + + // XXX javax.rmi.ORB -> org.omg.CORBA.ORB + void connect(Stub self, javax.rmi.ORB orb) + throws RemoteException; + + boolean equals(Stub self, Object obj); + + int hashCode(Stub self); + + void readObject(Stub self, ObjectInputStream s) + throws IOException, ClassNotFoundException; + + String toString(Stub self); + + void writeObject(Stub self, ObjectOutputStream s) + throws IOException; + } diff -Nrc3pad gcc-3.3.3/libjava/javax/rmi/CORBA/Stub.java gcc-3.4.0/libjava/javax/rmi/CORBA/Stub.java *** gcc-3.3.3/libjava/javax/rmi/CORBA/Stub.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/rmi/CORBA/Stub.java 2003-03-29 21:23:25.000000000 +0000 *************** *** 0 **** --- 1,120 ---- + /* Stub.java -- + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package javax.rmi.CORBA; + + import java.io.IOException; + import java.io.ObjectInputStream; + import java.io.ObjectOutputStream; + import java.io.Serializable; + import java.rmi.RemoteException; + //import org.omg.CORBA.ORB; + //import org.omg.CORBA_2_3.portable.ObjectImpl; + //import org.omg.CORBA.portable.ObjectImpl; + import gnu.javax.rmi.CORBA.DelegateFactory; + import gnu.javax.rmi.CORBA.GetDelegateInstanceException; + + public abstract class Stub extends ObjectImpl + implements Serializable + { + private transient StubDelegate delegate; + + protected Stub() + { + try + { + delegate = (StubDelegate)DelegateFactory.getInstance("Stub"); + } + catch(GetDelegateInstanceException e) + { + delegate = null; + } + } + + public int hashCode() + { + if(delegate != null) + return delegate.hashCode(this); + else + return 0; + } + + public boolean equals(Object obj) + { + if(delegate != null) + return delegate.equals(this, obj); + else + return false; + } + + public String toString() + { + String s = null; + if(delegate != null) + s = delegate.toString(this); + if(s == null) + s = super.toString(); + return s; + } + + // XXX javax.rmi.ORB -> org.omg.CORBA.ORB + public void connect(javax.rmi.ORB orb) + throws RemoteException + { + if(delegate != null) + delegate.connect(this, orb); + } + + /** + * The following two routines are required by serialized form of Java API doc. + */ + private void readObject(ObjectInputStream stream) + throws IOException, ClassNotFoundException + { + if(delegate != null) + delegate.readObject(this, stream); + } + + private void writeObject(ObjectOutputStream stream) + throws IOException + { + if(delegate != null) + delegate.writeObject(this, stream); + } + + } diff -Nrc3pad gcc-3.3.3/libjava/javax/rmi/CORBA/SystemException.java gcc-3.4.0/libjava/javax/rmi/CORBA/SystemException.java *** gcc-3.3.3/libjava/javax/rmi/CORBA/SystemException.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/rmi/CORBA/SystemException.java 2003-03-29 21:23:25.000000000 +0000 *************** *** 0 **** --- 1,4 ---- + package javax.rmi.CORBA; + + /** XXX - Stub till we have org.omg.CORBA */ + public class SystemException extends Exception { } diff -Nrc3pad gcc-3.3.3/libjava/javax/rmi/CORBA/Tie.java gcc-3.4.0/libjava/javax/rmi/CORBA/Tie.java *** gcc-3.3.3/libjava/javax/rmi/CORBA/Tie.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/rmi/CORBA/Tie.java 2003-03-29 21:23:25.000000000 +0000 *************** *** 0 **** --- 1,62 ---- + /* Tie.java -- + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package javax.rmi.CORBA; + + import java.rmi.Remote; + //import org.omg.CORBA.ORB; + //import org.omg.CORBA.portable.InvokeHandler; + + public interface Tie // XXX extends InvokeHandler + { + + void deactivate(); + + Remote getTarget(); + + // XXX javax.rmi.ORB -> org.omg.CORBA.ORB + javax.rmi.ORB orb(); + + // XXX javax.rmi.ORB -> org.omg.CORBA.ORB + void orb(javax.rmi.ORB orb); + + void setTarget(Remote target); + + // XXX Object -> org.omg.CORBA.Object + Object thisObject(); + } diff -Nrc3pad gcc-3.3.3/libjava/javax/rmi/CORBA/UtilDelegate.java gcc-3.4.0/libjava/javax/rmi/CORBA/UtilDelegate.java *** gcc-3.3.3/libjava/javax/rmi/CORBA/UtilDelegate.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/rmi/CORBA/UtilDelegate.java 2003-03-29 21:23:25.000000000 +0000 *************** *** 0 **** --- 1,84 ---- + /* UtilDelegate.java -- + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package javax.rmi.CORBA; + + import java.rmi.Remote; + import java.rmi.RemoteException; + import java.io.*; + //import org.omg.CORBA.ORB; + //import org.omg.CORBA.SystemException; + //import org.omg.CORBA.portable.InputStream; + //import org.omg.CORBA.portable.OutputStream; + + public interface UtilDelegate + { + + // XXX javax.rmi.ORB -> org.omg.CORBA.ORB + Object copyObject(Object obj, javax.rmi.ORB orb) throws RemoteException; + + // XXX javax.rmi.ORB -> org.omg.CORBA.ORB + Object[] copyObjects(Object obj[], javax.rmi.ORB orb) throws RemoteException; + + ValueHandler createValueHandler(); + + String getCodebase(Class clz); + + Tie getTie(Remote target); + + boolean isLocal(Stub stub) throws RemoteException; + + Class loadClass(String className, String remoteCodebase, + ClassLoader loader) throws ClassNotFoundException; + + RemoteException mapSystemException(SystemException ex); + + Object readAny(InputStream in); + + void registerTarget(Tie tie, Remote target); + + void unexportObject(Remote target); + + RemoteException wrapException(Throwable orig); + + void writeAbstractObject(OutputStream out, Object obj); + + void writeAny(OutputStream out, Object obj); + + void writeRemoteObject(OutputStream out, Object obj); + } diff -Nrc3pad gcc-3.3.3/libjava/javax/rmi/CORBA/Util.java gcc-3.4.0/libjava/javax/rmi/CORBA/Util.java *** gcc-3.3.3/libjava/javax/rmi/CORBA/Util.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/rmi/CORBA/Util.java 2003-03-29 21:23:25.000000000 +0000 *************** *** 0 **** --- 1,187 ---- + /* Util.java -- + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package javax.rmi.CORBA; + + import java.rmi.Remote; + import java.rmi.RemoteException; + import java.lang.Object; + import java.io.*; + //import org.omg.CORBA.*; + //import org.omg.CORBA.portable.InputStream; + //import org.omg.CORBA.portable.OutputStream; + import gnu.javax.rmi.CORBA.DelegateFactory; + import gnu.javax.rmi.CORBA.GetDelegateInstanceException; + + public class Util + { + + private static UtilDelegate delegate; + static + { + try + { + delegate = (UtilDelegate)DelegateFactory.getInstance("Util"); + } + catch(GetDelegateInstanceException e) + { + delegate = null; + } + } + + private Util() + { + } + + // XXX - javax.rmi.ORB -> org.omg.CORBA.ORB + public static Object copyObject(Object obj, javax.rmi.ORB orb) + throws RemoteException + { + if(delegate != null) + return delegate.copyObject(obj, orb); + else + return null; + } + + // XXX - javax.rmi.ORB -> org.omg.CORBA.ORB + public static Object[] copyObjects(Object obj[], javax.rmi.ORB orb) + throws RemoteException + { + if(delegate != null) + return delegate.copyObjects(obj, orb); + else + return null; + } + + public static ValueHandler createValueHandler() + { + if(delegate != null) + return delegate.createValueHandler(); + else + return null; + } + + public static String getCodebase(Class clz) + { + if(delegate != null) + return delegate.getCodebase(clz); + else + return null; + } + + public static Tie getTie(Remote target) + { + if(delegate != null) + return delegate.getTie(target); + else + return null; + } + + public static boolean isLocal(Stub stub) + throws RemoteException + { + if(delegate != null) + return delegate.isLocal(stub); + else + return false; + } + + public static Class loadClass(String className, String remoteCodebase, ClassLoader loader) + throws ClassNotFoundException + { + if(delegate != null) + return delegate.loadClass(className, remoteCodebase, loader); + else + throw new ClassNotFoundException(className + ": delegate == null"); + } + + public static RemoteException mapSystemException(SystemException ex) + { + if(delegate != null) + return delegate.mapSystemException(ex); + else + return null; + } + + public static Object readAny(InputStream in) + { + if(delegate != null) + return delegate.readAny(in); + else + return null; + } + + public static void registerTarget(Tie tie, Remote target) + { + if(delegate != null) + delegate.registerTarget(tie, target); + } + + public static void unexportObject(Remote target) + { + if(delegate != null) + delegate.unexportObject(target); + } + + public static RemoteException wrapException(Throwable orig) + { + if(delegate != null) + return delegate.wrapException(orig); + else + return null; + } + + public static void writeAbstractObject(OutputStream out, Object obj) + { + if(delegate != null) + delegate.writeAbstractObject(out, obj); + } + + public static void writeAny(OutputStream out, Object obj) + { + if(delegate != null) + delegate.writeAny(out, obj); + } + + public static void writeRemoteObject(OutputStream out, Object obj) + { + if(delegate != null) + delegate.writeRemoteObject(out, obj); + } + + } diff -Nrc3pad gcc-3.3.3/libjava/javax/rmi/CORBA/ValueHandler.java gcc-3.4.0/libjava/javax/rmi/CORBA/ValueHandler.java *** gcc-3.3.3/libjava/javax/rmi/CORBA/ValueHandler.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/rmi/CORBA/ValueHandler.java 2003-03-29 21:23:25.000000000 +0000 *************** *** 0 **** --- 1,63 ---- + /* ValueHandler.java -- + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package javax.rmi.CORBA; + + import java.io.*; + //import org.omg.CORBA.portable.InputStream; + //import org.omg.CORBA.portable.OutputStream; + //import org.omg.SendingContext.RunTime; + + public interface ValueHandler + { + + String getRMIRepositoryID(Class clz); + + // XXX Runtime -> RunTime + Runtime getRunTimeCodeBase(); + + boolean isCustomMarshaled(Class clz); + + // XXX Runtime -> RunTime + Serializable readValue(InputStream in, int offset, Class clz, + String repositoryID, Runtime sender); + + Serializable writeReplace(Serializable value); + + void writeValue(OutputStream out, Serializable value); + } diff -Nrc3pad gcc-3.3.3/libjava/javax/rmi/ORB.java gcc-3.4.0/libjava/javax/rmi/ORB.java *** gcc-3.3.3/libjava/javax/rmi/ORB.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/rmi/ORB.java 2003-03-29 21:23:25.000000000 +0000 *************** *** 0 **** --- 1,4 ---- + package javax.rmi; + + /** XXX - Stub till we have org.omg.CORBA */ + public class ORB { } diff -Nrc3pad gcc-3.3.3/libjava/javax/rmi/PortableRemoteObject.java gcc-3.4.0/libjava/javax/rmi/PortableRemoteObject.java *** gcc-3.3.3/libjava/javax/rmi/PortableRemoteObject.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/rmi/PortableRemoteObject.java 2003-03-29 21:23:25.000000000 +0000 *************** *** 0 **** --- 1,114 ---- + /* PortableRemoteObject.java -- + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package javax.rmi; + + import java.rmi.Remote; + import java.rmi.RemoteException; + import java.rmi.NoSuchObjectException; + import gnu.javax.rmi.CORBA.DelegateFactory; + import gnu.javax.rmi.CORBA.GetDelegateInstanceException; + import javax.rmi.CORBA.PortableRemoteObjectDelegate; + import javax.rmi.CORBA.Util; + + public class PortableRemoteObject + implements Remote /* why doc doesn't say should implement Remote */ + { + + private static PortableRemoteObjectDelegate delegate; + static + { + try + { + delegate = (PortableRemoteObjectDelegate)DelegateFactory.getInstance + ("PortableRemoteObject"); + } + catch(GetDelegateInstanceException e) + { + e.printStackTrace(); + delegate = null; + } + } + + protected PortableRemoteObject() + throws RemoteException + { + if(delegate != null) + exportObject((Remote)this); + } + + public static void connect(Remote target, Remote source) + throws RemoteException + { + if(delegate != null) + delegate.connect(target, source); + } + + public static void exportObject(Remote obj) + throws RemoteException + { + if(delegate != null) + delegate.exportObject(obj); + } + + public static Object narrow(Object narrowFrom, Class narrowTo) + throws ClassCastException + { + if(delegate != null) + return delegate.narrow(narrowFrom, narrowTo); + else + return null; + } + + public static Remote toStub(Remote obj) + throws NoSuchObjectException + { + if(delegate != null) + return delegate.toStub(obj); + else + return null; + } + + public static void unexportObject(Remote obj) + throws NoSuchObjectException + { + if(delegate != null) + delegate.unexportObject(obj); + } + + } diff -Nrc3pad gcc-3.3.3/libjava/javax/security/auth/x500/X500Principal.java gcc-3.4.0/libjava/javax/security/auth/x500/X500Principal.java *** gcc-3.3.3/libjava/javax/security/auth/x500/X500Principal.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/security/auth/x500/X500Principal.java 2003-06-27 16:11:27.000000000 +0000 *************** *** 0 **** --- 1,148 ---- + /* X500Principal.java -- X.500 principal. + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package javax.security.auth.x500; + + import java.io.ByteArrayInputStream; + import java.io.IOException; + import java.io.InputStream; + import java.io.NotActiveException; + import java.io.ObjectInputStream; + import java.io.ObjectOutputStream; + import java.io.Serializable; + + import java.security.Principal; + + import java.util.HashSet; + import java.util.LinkedList; + + import gnu.java.security.x509.X500DistinguishedName; + + public final class X500Principal implements Principal, Serializable + { + private static final long serialVersionUID = -500463348111345721L; + + // Constants and fields. + // ------------------------------------------------------------------------ + + public static final String CANONICAL = "CANONICAL"; + + public static final String RFC1779 = "RFC1779"; + + public static final String RFC2253 = "RFC2253"; + + private transient X500DistinguishedName name; + + // Constructors. + // ------------------------------------------------------------------------ + + public X500Principal(String name) + { + if (name == null) + throw new NullPointerException(); + this.name = new X500DistinguishedName(name); + } + + public X500Principal(byte[] encoded) + { + try + { + name = new X500DistinguishedName(encoded); + } + catch (IOException ioe) + { + throw new IllegalArgumentException(ioe.toString()); + } + } + + public X500Principal(InputStream encoded) + { + try + { + name = new X500DistinguishedName(encoded); + } + catch (IOException ioe) + { + throw new IllegalArgumentException(ioe.toString()); + } + } + + // Instance methods. + // ------------------------------------------------------------------------ + + public boolean equals(Object o) + { + return ((X500Principal) o).name.equals(name); + } + + public byte[] getEncoded() + { + return name.getEncoded(); + } + + public String getName() + { + return getName(RFC2253); + } + + public String getName(String format) + { + if (format.equalsIgnoreCase(RFC2253)) + return name.toRFC2253(); + else if (format.equalsIgnoreCase(RFC1779)) + return name.toRFC1779(); + else if (format.equalsIgnoreCase(CANONICAL)) + return name.toCanonical(); + throw new IllegalArgumentException("unsupported format " + format); + } + + // Serialization methods. + // ------------------------------------------------------------------------ + + private void writeObject(ObjectOutputStream out) throws IOException + { + out.writeObject(name.getEncoded()); + } + + private void readObject(ObjectInputStream in) + throws IOException, NotActiveException, ClassNotFoundException + { + byte[] buf = (byte[]) in.readObject(); + name = new X500DistinguishedName(buf); + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/sql/ConnectionEventListener.java gcc-3.4.0/libjava/javax/sql/ConnectionEventListener.java *** gcc-3.3.3/libjava/javax/sql/ConnectionEventListener.java 2002-06-21 05:39:26.000000000 +0000 --- gcc-3.4.0/libjava/javax/sql/ConnectionEventListener.java 2003-10-11 19:10:36.000000000 +0000 *************** public interface ConnectionEventListener *** 48,57 **** /** * @since 1.4 */ ! public void connectionClosed(ConnectionEvent event); /** * @since 1.4 */ ! public void connectionErrorOccurred(ConnectionEvent event); } --- 48,57 ---- /** * @since 1.4 */ ! void connectionClosed(ConnectionEvent event); /** * @since 1.4 */ ! void connectionErrorOccurred(ConnectionEvent event); } diff -Nrc3pad gcc-3.3.3/libjava/javax/sql/ConnectionPoolDataSource.java gcc-3.4.0/libjava/javax/sql/ConnectionPoolDataSource.java *** gcc-3.3.3/libjava/javax/sql/ConnectionPoolDataSource.java 2002-06-21 05:39:27.000000000 +0000 --- gcc-3.4.0/libjava/javax/sql/ConnectionPoolDataSource.java 2003-10-11 19:10:36.000000000 +0000 *************** public interface ConnectionPoolDataSourc *** 49,79 **** /** * @since 1.4 */ ! public PooledConnection getPooledConnection() throws SQLException; /** * @since 1.4 */ ! public PooledConnection getPooledConnection(String user, String password) throws SQLException; /** * @since 1.4 */ ! public PrintWriter getLogWriter() throws SQLException; /** * @since 1.4 */ ! public void setLogWriter(PrintWriter out) throws SQLException; /** * @since 1.4 */ ! public void setLoginTimeout(int seconds) throws SQLException; /** * @since 1.4 */ ! public int getLoginTimeout() throws SQLException; } --- 49,79 ---- /** * @since 1.4 */ ! PooledConnection getPooledConnection() throws SQLException; /** * @since 1.4 */ ! PooledConnection getPooledConnection(String user, String password) throws SQLException; /** * @since 1.4 */ ! PrintWriter getLogWriter() throws SQLException; /** * @since 1.4 */ ! void setLogWriter(PrintWriter out) throws SQLException; /** * @since 1.4 */ ! void setLoginTimeout(int seconds) throws SQLException; /** * @since 1.4 */ ! int getLoginTimeout() throws SQLException; } diff -Nrc3pad gcc-3.3.3/libjava/javax/sql/DataSource.java gcc-3.4.0/libjava/javax/sql/DataSource.java *** gcc-3.3.3/libjava/javax/sql/DataSource.java 2002-06-21 05:39:27.000000000 +0000 --- gcc-3.4.0/libjava/javax/sql/DataSource.java 2003-10-11 19:10:36.000000000 +0000 *************** public interface DataSource *** 50,80 **** /** * @since 1.4 */ ! public Connection getConnection() throws SQLException; /** * @since 1.4 */ ! public Connection getConnection(String username, String password) throws SQLException; /** * @since 1.4 */ ! public PrintWriter getLogWriter() throws SQLException; /** * @since 1.4 */ ! public void setLogWriter(PrintWriter out) throws SQLException; /** * @since 1.4 */ ! public void setLoginTimeout(int seconds) throws SQLException; /** * @since 1.4 */ ! public int getLoginTimeout() throws SQLException; } --- 50,80 ---- /** * @since 1.4 */ ! Connection getConnection() throws SQLException; /** * @since 1.4 */ ! Connection getConnection(String username, String password) throws SQLException; /** * @since 1.4 */ ! PrintWriter getLogWriter() throws SQLException; /** * @since 1.4 */ ! void setLogWriter(PrintWriter out) throws SQLException; /** * @since 1.4 */ ! void setLoginTimeout(int seconds) throws SQLException; /** * @since 1.4 */ ! int getLoginTimeout() throws SQLException; } diff -Nrc3pad gcc-3.3.3/libjava/javax/sql/PooledConnection.java gcc-3.4.0/libjava/javax/sql/PooledConnection.java *** gcc-3.3.3/libjava/javax/sql/PooledConnection.java 2002-06-21 05:39:27.000000000 +0000 --- gcc-3.4.0/libjava/javax/sql/PooledConnection.java 2003-10-11 19:10:36.000000000 +0000 *************** public interface PooledConnection *** 49,68 **** /** * @since 1.4 */ ! public Connection getConnection() throws SQLException; /** * @since 1.4 */ ! public void close() throws SQLException; /** * @since 1.4 */ ! public void addConnectionEventListener(ConnectionEventListener listener); /** * @since 1.4 */ ! public void removeConnectionEventListener(ConnectionEventListener listener); } --- 49,68 ---- /** * @since 1.4 */ ! Connection getConnection() throws SQLException; /** * @since 1.4 */ ! void close() throws SQLException; /** * @since 1.4 */ ! void addConnectionEventListener(ConnectionEventListener listener); /** * @since 1.4 */ ! void removeConnectionEventListener(ConnectionEventListener listener); } diff -Nrc3pad gcc-3.3.3/libjava/javax/sql/RowSetInternal.java gcc-3.4.0/libjava/javax/sql/RowSetInternal.java *** gcc-3.3.3/libjava/javax/sql/RowSetInternal.java 2002-06-21 05:39:27.000000000 +0000 --- gcc-3.4.0/libjava/javax/sql/RowSetInternal.java 2003-10-11 19:10:36.000000000 +0000 *************** public interface RowSetInternal *** 50,74 **** /** * @since 1.4 */ ! public Object[] getParams() throws SQLException; /** * @since 1.4 */ ! public Connection getConnection() throws SQLException; /** * @since 1.4 */ ! public void setMetaData(RowSetMetaData md) throws SQLException; /** * @since 1.4 */ ! public ResultSet getOriginal() throws SQLException; /** * @since 1.4 */ ! public ResultSet getOriginalRow() throws SQLException; } --- 50,74 ---- /** * @since 1.4 */ ! Object[] getParams() throws SQLException; /** * @since 1.4 */ ! Connection getConnection() throws SQLException; /** * @since 1.4 */ ! void setMetaData(RowSetMetaData md) throws SQLException; /** * @since 1.4 */ ! ResultSet getOriginal() throws SQLException; /** * @since 1.4 */ ! ResultSet getOriginalRow() throws SQLException; } diff -Nrc3pad gcc-3.3.3/libjava/javax/sql/RowSet.java gcc-3.4.0/libjava/javax/sql/RowSet.java *** gcc-3.3.3/libjava/javax/sql/RowSet.java 2002-06-21 05:39:27.000000000 +0000 --- gcc-3.4.0/libjava/javax/sql/RowSet.java 2003-10-11 19:10:36.000000000 +0000 *************** import java.util.Map; *** 58,361 **** */ public interface RowSet extends ResultSet { ! /** ! * @since 1.4 ! */ ! public String getUrl() throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setUrl(String url) throws SQLException; ! /** ! * @since 1.4 ! */ ! public String getDataSourceName(); ! /** ! * @since 1.4 ! */ ! public void setDataSourceName(String name) throws SQLException; ! /** ! * @since 1.4 ! */ ! public String getUsername(); ! /** ! * @since 1.4 ! */ ! public void setUsername(String name) throws SQLException; ! /** ! * @since 1.4 ! */ ! public String getPassword(); ! /** ! * @since 1.4 ! */ ! public void setPassword(String password) throws SQLException; ! /** ! * @since 1.4 ! */ ! public int getTransactionIsolation(); ! /** ! * @since 1.4 ! */ ! public void setTransactionIsolation(int level) throws SQLException; ! /** ! * @since 1.4 ! */ ! public Map getTypeMap() throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setTypeMap(Map map) throws SQLException; ! /** ! * @since 1.4 ! */ ! public String getCommand(); ! /** ! * @since 1.4 ! */ ! public void setCommand(String cmd) throws SQLException; ! /** ! * @since 1.4 ! */ ! public boolean isReadOnly(); ! /** ! * @since 1.4 ! */ ! public void setReadOnly(boolean value) throws SQLException; ! /** ! * @since 1.4 ! */ ! public int getMaxFieldSize() throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setMaxFieldSize(int max) throws SQLException; ! /** ! * @since 1.4 ! */ ! public int getMaxRows() throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setMaxRows(int max) throws SQLException; ! /** ! * @since 1.4 ! */ ! public boolean getEscapeProcessing() throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setEscapeProcessing(boolean enable) throws SQLException; ! /** ! * @since 1.4 ! */ ! public int getQueryTimeout() throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setQueryTimeout(int seconds) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setType(int type) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setConcurrency(int concurrency) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setNull(int parameterIndex, int sqlType) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setNull(int paramIndex, int sqlType, String typeName) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setBoolean(int parameterIndex, boolean x) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setByte(int parameterIndex, byte x) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setShort(int parameterIndex, short x) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setInt(int parameterIndex, int x) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setLong(int parameterIndex, long x) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setFloat(int parameterIndex, float x) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setDouble(int parameterIndex, double x) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setString(int parameterIndex, String x) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setBytes(int parameterIndex, byte[] x) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setDate(int parameterIndex, Date x) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setTime(int parameterIndex, Time x) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setObject(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setObject(int parameterIndex, Object x) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setRef(int i, Ref x) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setBlob(int i, Blob x) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setClob(int i, Clob x) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setArray(int i, Array x) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void clearParameters() throws SQLException; ! /** ! * @since 1.4 ! */ ! public void execute() throws SQLException; ! /** ! * @since 1.4 ! */ ! public void addRowSetListener(RowSetListener listener); ! /** ! * @since 1.4 ! */ ! public void removeRowSetListener(RowSetListener listener); } --- 58,187 ---- */ public interface RowSet extends ResultSet { ! String getUrl() throws SQLException; ! void setUrl(String url) throws SQLException; ! String getDataSourceName(); ! void setDataSourceName(String name) throws SQLException; ! String getUsername(); ! void setUsername(String name) throws SQLException; ! String getPassword(); ! void setPassword(String password) throws SQLException; ! int getTransactionIsolation(); ! void setTransactionIsolation(int level) throws SQLException; ! Map getTypeMap() throws SQLException; ! void setTypeMap(Map map) throws SQLException; ! String getCommand(); ! void setCommand(String cmd) throws SQLException; ! boolean isReadOnly(); ! void setReadOnly(boolean value) throws SQLException; ! int getMaxFieldSize() throws SQLException; ! void setMaxFieldSize(int max) throws SQLException; ! int getMaxRows() throws SQLException; ! void setMaxRows(int max) throws SQLException; ! boolean getEscapeProcessing() throws SQLException; ! void setEscapeProcessing(boolean enable) throws SQLException; ! int getQueryTimeout() throws SQLException; ! void setQueryTimeout(int seconds) throws SQLException; ! void setType(int type) throws SQLException; ! void setConcurrency(int concurrency) throws SQLException; ! void setNull(int parameterIndex, int sqlType) throws SQLException; ! void setNull(int paramIndex, int sqlType, String typeName) throws SQLException; ! void setBoolean(int parameterIndex, boolean x) throws SQLException; ! void setByte(int parameterIndex, byte x) throws SQLException; ! void setShort(int parameterIndex, short x) throws SQLException; ! void setInt(int parameterIndex, int x) throws SQLException; ! void setLong(int parameterIndex, long x) throws SQLException; ! void setFloat(int parameterIndex, float x) throws SQLException; ! void setDouble(int parameterIndex, double x) throws SQLException; ! void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException; ! void setString(int parameterIndex, String x) throws SQLException; ! void setBytes(int parameterIndex, byte[] x) throws SQLException; ! void setDate(int parameterIndex, Date x) throws SQLException; ! void setTime(int parameterIndex, Time x) throws SQLException; ! void setTimestamp(int parameterIndex, Timestamp x) throws SQLException; ! void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException; ! void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException; ! void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException; ! void setObject(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException; ! void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException; ! void setObject(int parameterIndex, Object x) throws SQLException; ! void setRef(int i, Ref x) throws SQLException; ! void setBlob(int i, Blob x) throws SQLException; ! void setClob(int i, Clob x) throws SQLException; ! void setArray(int i, Array x) throws SQLException; ! void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException; ! void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException; ! void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException; ! void clearParameters() throws SQLException; ! void execute() throws SQLException; ! void addRowSetListener(RowSetListener listener); ! void removeRowSetListener(RowSetListener listener); } diff -Nrc3pad gcc-3.3.3/libjava/javax/sql/RowSetListener.java gcc-3.4.0/libjava/javax/sql/RowSetListener.java *** gcc-3.3.3/libjava/javax/sql/RowSetListener.java 2002-06-21 05:39:27.000000000 +0000 --- gcc-3.4.0/libjava/javax/sql/RowSetListener.java 2003-10-11 19:10:36.000000000 +0000 *************** import java.util.EventListener; *** 45,62 **** */ public interface RowSetListener extends EventListener { ! /** ! * @since 1.4 ! */ ! public void rowSetChanged(RowSetEvent event); ! /** ! * @since 1.4 ! */ ! public void rowChanged(RowSetEvent event); ! /** ! * @since 1.4 ! */ ! public void cursorMoved(RowSetEvent event); } --- 45,53 ---- */ public interface RowSetListener extends EventListener { ! void rowSetChanged(RowSetEvent event); ! void rowChanged(RowSetEvent event); ! void cursorMoved(RowSetEvent event); } diff -Nrc3pad gcc-3.3.3/libjava/javax/sql/RowSetMetaData.java gcc-3.4.0/libjava/javax/sql/RowSetMetaData.java *** gcc-3.3.3/libjava/javax/sql/RowSetMetaData.java 2002-06-21 05:39:27.000000000 +0000 --- gcc-3.4.0/libjava/javax/sql/RowSetMetaData.java 2003-10-11 19:10:36.000000000 +0000 *************** import java.sql.SQLException; *** 46,147 **** */ public interface RowSetMetaData extends ResultSetMetaData { ! /** ! * @since 1.4 ! */ ! public void setColumnCount(int columnCount) throws SQLException; ! ! /** ! * @since 1.4 ! */ ! public void setAutoIncrement(int columnIndex, boolean property) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setCaseSensitive(int columnIndex, boolean property) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setSearchable(int columnIndex, boolean property) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setCurrency(int columnIndex, boolean property) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setNullable(int columnIndex, int property) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setSigned(int columnIndex, boolean property) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setColumnDisplaySize(int columnIndex, int size) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setColumnLabel(int columnIndex, String label) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setColumnName(int columnIndex, String columnName) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setSchemaName(int columnIndex, String schemaName) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setPrecision(int columnIndex, int precision) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setScale(int columnIndex, int scale) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setTableName(int columnIndex, String tableName) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setCatalogName(int columnIndex, String catalogName) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setColumnType(int columnIndex, int SQLType) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setColumnTypeName(int columnIndex, String typeName) throws SQLException; } --- 46,95 ---- */ public interface RowSetMetaData extends ResultSetMetaData { + void setColumnCount(int columnCount) throws SQLException; ! void setAutoIncrement(int columnIndex, boolean property) throws SQLException; ! void setCaseSensitive(int columnIndex, boolean property) throws SQLException; ! void setSearchable(int columnIndex, boolean property) throws SQLException; ! void setCurrency(int columnIndex, boolean property) throws SQLException; ! void setNullable(int columnIndex, int property) throws SQLException; ! void setSigned(int columnIndex, boolean property) throws SQLException; ! void setColumnDisplaySize(int columnIndex, int size) throws SQLException; ! void setColumnLabel(int columnIndex, String label) throws SQLException; ! void setColumnName(int columnIndex, String columnName) throws SQLException; ! void setSchemaName(int columnIndex, String schemaName) throws SQLException; ! void setPrecision(int columnIndex, int precision) throws SQLException; ! void setScale(int columnIndex, int scale) throws SQLException; ! void setTableName(int columnIndex, String tableName) throws SQLException; ! void setCatalogName(int columnIndex, String catalogName) throws SQLException; ! void setColumnType(int columnIndex, int SQLType) throws SQLException; ! void setColumnTypeName(int columnIndex, String typeName) throws SQLException; } diff -Nrc3pad gcc-3.3.3/libjava/javax/sql/RowSetReader.java gcc-3.4.0/libjava/javax/sql/RowSetReader.java *** gcc-3.3.3/libjava/javax/sql/RowSetReader.java 2002-06-21 05:39:27.000000000 +0000 --- gcc-3.4.0/libjava/javax/sql/RowSetReader.java 2003-10-11 19:10:36.000000000 +0000 *************** import java.sql.SQLException; *** 45,52 **** */ public interface RowSetReader { ! /** ! * @since 1.4 ! */ ! public void readData(RowSetInternal caller) throws SQLException; } --- 45,49 ---- */ public interface RowSetReader { ! void readData(RowSetInternal caller) throws SQLException; } diff -Nrc3pad gcc-3.3.3/libjava/javax/sql/RowSetWriter.java gcc-3.4.0/libjava/javax/sql/RowSetWriter.java *** gcc-3.3.3/libjava/javax/sql/RowSetWriter.java 2002-06-21 05:39:27.000000000 +0000 --- gcc-3.4.0/libjava/javax/sql/RowSetWriter.java 2003-10-11 19:10:36.000000000 +0000 *************** import java.sql.SQLException; *** 45,52 **** */ public interface RowSetWriter { ! /** ! * @since 1.4 ! */ ! public boolean writeData(RowSetInternal caller) throws SQLException; } --- 45,49 ---- */ public interface RowSetWriter { ! boolean writeData(RowSetInternal caller) throws SQLException; } diff -Nrc3pad gcc-3.3.3/libjava/javax/sql/XAConnection.java gcc-3.4.0/libjava/javax/sql/XAConnection.java *** gcc-3.3.3/libjava/javax/sql/XAConnection.java 2002-06-21 05:39:27.000000000 +0000 --- gcc-3.4.0/libjava/javax/sql/XAConnection.java 2003-10-11 19:10:36.000000000 +0000 *************** import javax.transaction.xa.XAResource; *** 46,53 **** */ public interface XAConnection extends PooledConnection { ! /** ! * @since 1.4 ! */ ! public XAResource getXAResource() throws SQLException; } --- 46,50 ---- */ public interface XAConnection extends PooledConnection { ! XAResource getXAResource() throws SQLException; } diff -Nrc3pad gcc-3.3.3/libjava/javax/sql/XADataSource.java gcc-3.4.0/libjava/javax/sql/XADataSource.java *** gcc-3.3.3/libjava/javax/sql/XADataSource.java 2002-06-21 05:39:27.000000000 +0000 --- gcc-3.4.0/libjava/javax/sql/XADataSource.java 2003-10-11 19:10:36.000000000 +0000 *************** import java.sql.SQLException; *** 46,79 **** */ public interface XADataSource { ! /** ! * @since 1.4 ! */ ! public XAConnection getXAConnection() throws SQLException; ! /** ! * @since 1.4 ! */ ! public XAConnection getXAConnection(String user, String password) throws SQLException; ! /** ! * @since 1.4 ! */ ! public PrintWriter getLogWriter() throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setLogWriter(PrintWriter out) throws SQLException; ! /** ! * @since 1.4 ! */ ! public void setLoginTimeout(int seconds) throws SQLException; ! /** ! * @since 1.4 ! */ ! public int getLoginTimeout() throws SQLException; } --- 46,61 ---- */ public interface XADataSource { ! XAConnection getXAConnection() throws SQLException; ! XAConnection getXAConnection(String user, String password) throws SQLException; ! PrintWriter getLogWriter() throws SQLException; ! void setLogWriter(PrintWriter out) throws SQLException; ! void setLoginTimeout(int seconds) throws SQLException; ! int getLoginTimeout() throws SQLException; } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/AbstractAction.java gcc-3.4.0/libjava/javax/swing/AbstractAction.java *** gcc-3.3.3/libjava/javax/swing/AbstractAction.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/AbstractAction.java 2004-01-09 10:18:47.000000000 +0000 *************** *** 1,5 **** /* AbstractAction.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* AbstractAction.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,55 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing; ! // Imports ! import java.awt.event.*; ! import java.beans.*; ! import java.io.*; ! import javax.swing.event.*; ! import java.util.*; /** * AbstractAction * @author Andrew Selkirk * @version 1.0 */ ! public abstract class AbstractAction implements Action, Cloneable, Serializable { //------------------------------------------------------------- // Variables -------------------------------------------------- --- 35,60 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; ! import java.beans.PropertyChangeListener; ! import java.io.IOException; ! import java.io.ObjectInputStream; ! import java.io.ObjectOutputStream; ! import java.io.Serializable; ! import java.util.HashMap; ! import javax.swing.event.SwingPropertyChangeSupport; /** * AbstractAction * @author Andrew Selkirk * @version 1.0 */ ! public abstract class AbstractAction ! implements Action, Cloneable, Serializable ! { ! static final long serialVersionUID = -6803159439231523484L; //------------------------------------------------------------- // Variables -------------------------------------------------- *************** public abstract class AbstractAction imp *** 204,215 **** public synchronized void removePropertyChangeListener(PropertyChangeListener listener) { changeSupport.removePropertyChangeListener(listener); } // removePropertyChangeListener() ! ! /** ! * actionPerformed ! * @param event TODO ! */ ! public abstract void actionPerformed(ActionEvent event); ! ! ! } // AbstractAction --- 209,212 ---- public synchronized void removePropertyChangeListener(PropertyChangeListener listener) { changeSupport.removePropertyChangeListener(listener); } // removePropertyChangeListener() ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/AbstractButton.java gcc-3.4.0/libjava/javax/swing/AbstractButton.java *** gcc-3.3.3/libjava/javax/swing/AbstractButton.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/AbstractButton.java 2003-07-14 05:33:30.000000000 +0000 *************** this exception to your version of the li *** 35,52 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package javax.swing; ! import java.awt.*; ! import java.awt.event.*; ! ! import javax.swing.event.*; ! import javax.swing.plaf.*; ! import javax.swing.text.*; ! import javax.accessibility.*; ! import java.util.*; ! import java.beans.*; /** * Provides basic button functionality --- 35,67 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ ! package javax.swing; ! import java.awt.Graphics; ! import java.awt.Image; ! import java.awt.Insets; ! import java.awt.ItemSelectable; ! import java.awt.Point; ! import java.awt.Rectangle; ! import java.awt.event.ActionEvent; ! import java.awt.event.ActionListener; ! import java.awt.event.FocusEvent; ! import java.awt.event.FocusListener; ! import java.awt.event.ItemEvent; ! import java.awt.event.ItemListener; ! import java.awt.event.MouseEvent; ! import java.beans.PropertyChangeListener; ! import javax.accessibility.AccessibleAction; ! import javax.accessibility.AccessibleIcon; ! import javax.accessibility.AccessibleStateSet; ! import javax.accessibility.AccessibleRelationSet; ! import javax.accessibility.AccessibleText; ! import javax.accessibility.AccessibleValue; ! import javax.swing.event.ChangeEvent; ! import javax.swing.event.ChangeListener; ! import javax.swing.plaf.ButtonUI; ! import javax.swing.text.AttributeSet; /** * Provides basic button functionality *************** import java.beans.*; *** 54,795 **** * @author Ronald Veldema (rveldema@cs.vu.nl) */ public abstract class AbstractButton extends JComponent ! implements ItemSelectable, SwingConstants { ! Icon default_icon, pressed_button, disabled_button, ! selected_button, disabled_selected_button, current_icon; ! String text; ! int vert_align = CENTER; ! int hori_align = CENTER; ! int hori_text_pos = CENTER; ! int vert_text_pos = CENTER; ! boolean paint_border = true, paint_focus; ! Action action_taken; ! ButtonModel model; ! Insets margin; ! public static final String FOCUS_PAINTED_CHANGED_PROPERTY = "focusPainted"; ! /** ! * AccessibleAbstractButton ! */ ! protected abstract class AccessibleAbstractButton ! extends AccessibleJComponent ! implements AccessibleAction, AccessibleValue, AccessibleText { ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! /** ! * Constructor AccessibleAbstractButton ! * @param component TODO ! */ ! protected AccessibleAbstractButton(AbstractButton component) { ! super(component); ! // TODO ! } // AccessibleAbstractButton() ! //------------------------------------------------------------- ! // Methods ---------------------------------------------------- ! //------------------------------------------------------------- ! /** ! * getAccessibleStateSet ! * @returns AccessibleStateSet ! */ ! public AccessibleStateSet getAccessibleStateSet() { ! return null; // TODO ! } // getAccessibleStateSet() ! /** ! * getAccessibleName ! * @returns String ! */ ! public String getAccessibleName() { ! return null; // TODO ! } // getAccessibleName() ! /** ! * getAccessibleIcon ! * @returns AccessibleIcon[] ! */ ! public AccessibleIcon[] getAccessibleIcon() { ! return null; // TODO ! } // getAccessibleIcon() ! /** ! * getAccessibleRelationSet ! * @returns AccessibleRelationSet ! */ ! public AccessibleRelationSet getAccessibleRelationSet() { ! return null; // TODO ! } // getAccessibleRelationSet() ! /** ! * getAccessibleAction ! * @returns AccessibleAction ! */ ! public AccessibleAction getAccessibleAction() { ! return null; // TODO ! } // getAccessibleAction() ! /** ! * getAccessibleValue ! * @returns AccessibleValue ! */ ! public AccessibleValue getAccessibleValue() { ! return null; // TODO ! } // getAccessibleValue() ! /** ! * getAccessibleActionCount ! * @returns int ! */ ! public int getAccessibleActionCount() { ! return 0; // TODO ! } // getAccessibleActionCount() ! /** ! * getAccessibleActionDescription ! * @param value0 TODO ! * @returns String ! */ ! public String getAccessibleActionDescription(int value0) { ! return null; // TODO ! } // getAccessibleActionDescription() ! /** ! * doAccessibleAction ! * @param value0 TODO ! * @returns boolean ! */ ! public boolean doAccessibleAction(int value0) { ! return false; // TODO ! } // doAccessibleAction() ! /** ! * getCurrentAccessibleValue ! * @returns Number ! */ ! public Number getCurrentAccessibleValue() { ! return null; // TODO ! } // getCurrentAccessibleValue() ! /** ! * setCurrentAccessibleValue ! * @param value0 TODO ! * @returns boolean ! */ ! public boolean setCurrentAccessibleValue(Number value0) { ! return false; // TODO ! } // setCurrentAccessibleValue() ! /** ! * getMinimumAccessibleValue ! * @returns Number ! */ ! public Number getMinimumAccessibleValue() { ! return null; // TODO ! } // getMinimumAccessibleValue() ! /** ! * getMaximumAccessibleValue ! * @returns Number ! */ ! public Number getMaximumAccessibleValue() { ! return null; // TODO ! } // getMaximumAccessibleValue() ! /** ! * getAccessibleText ! * @returns AccessibleText ! */ ! public AccessibleText getAccessibleText() { ! return null; // TODO ! } // getAccessibleText() ! /** ! * getIndexAtPoint ! * @param value0 TODO ! * @returns int ! */ ! public int getIndexAtPoint(Point value0) { ! return 0; // TODO ! } // getIndexAtPoint() ! /** ! * getCharacterBounds ! * @param value0 TODO ! * @returns Rectangle ! */ ! public Rectangle getCharacterBounds(int value0) { ! return null; // TODO ! } // getCharacterBounds() ! /** ! * getCharCount ! * @returns int ! */ ! public int getCharCount() { ! return 0; // TODO ! } // getCharCount() ! /** ! * getCaretPosition ! * @returns int ! */ ! public int getCaretPosition() { ! return 0; // TODO ! } // getCaretPosition() ! /** ! * getAtIndex ! * @param value0 TODO ! * @param value1 TODO ! * @returns String ! */ ! public String getAtIndex(int value0, int value1) { ! return null; // TODO ! } // getAtIndex() ! /** ! * getAfterIndex ! * @param value0 TODO ! * @param value1 TODO ! * @returns String ! */ ! public String getAfterIndex(int value0, int value1) { ! return null; // TODO ! } // getAfterIndex() ! /** ! * getBeforeIndex ! * @param value0 TODO ! * @param value1 TODO ! * @returns String ! */ ! public String getBeforeIndex(int value0, int value1) { ! return null; // TODO ! } // getBeforeIndex() ! /** ! * getCharacterAttribute ! * @param value0 TODO ! * @returns AttributeSet ! */ ! public AttributeSet getCharacterAttribute(int value0) { ! return null; // TODO ! } // getCharacterAttribute() - /** - * getSelectionStart - * @returns int - */ - public int getSelectionStart() { - return 0; // TODO - } // getSelectionStart() ! /** ! * getSelectionEnd ! * @returns int ! */ ! public int getSelectionEnd() { ! return 0; // TODO ! } // getSelectionEnd() - /** - * getSelectedText - * @returns String - */ - public String getSelectedText() { - return null; // TODO - } // getSelectedText() ! /** ! * getTextRectangle ! * @returns Rectangle ! */ ! private Rectangle getTextRectangle() { ! return null; // TODO ! } // getTextRectangle() ! } // AccessibleAbstractButton ! static private class JFocusListener implements FocusListener ! { ! AbstractButton c; ! JFocusListener(AbstractButton c) ! { ! this.c = c; ! } ! public void focusLost(FocusEvent event) ! { ! c.getModel().setArmed(false); ! System.out.println("LOST FOCUS"); ! if (c.isFocusPainted()) ! { ! c.repaint(); ! } ! } ! public void focusGained(FocusEvent event) ! { ! System.out.println("GAIN FOCUS"); ! } ! } ! /********************************************** ! * ! * ! * Constructors ! * ! * ! ****************/ ! AbstractButton() ! { ! this("",null); ! } ! AbstractButton(String text, ! Icon icon) ! { ! this.text = text; ! setIcon(icon); ! setAlignmentX(LEFT_ALIGNMENT); ! setAlignmentY(CENTER_ALIGNMENT); ! addFocusListener( new JFocusListener(this) ); ! setModel(new DefaultButtonModel(this)); ! updateUI(); // get a proper ui ! } ! /********************************************** ! * ! * ! * Actions etc ! * ! * ! ****************/ ! public ButtonModel getModel() ! { return model; } ! public void setModel(ButtonModel newModel) ! { model = newModel; } ! public String getActionCommand() ! { return getModel().getActionCommand(); } ! public void setActionCommand(String aCommand) ! { getModel().setActionCommand(aCommand); } ! public void addActionListener(ActionListener l) ! { getModel().addActionListener(l); } ! public void removeActionListener(ActionListener l) ! { getModel().removeActionListener(l); } ! public void addChangeListener(ChangeListener l) ! { getModel().addChangeListener(l); } ! public void removeChangeListener(ChangeListener l) ! { getModel().removeChangeListener(l); } ! public void addItemListener(ItemListener l) ! { getModel().addItemListener(l); } ! public void removeItemListener(ItemListener l) ! { getModel().removeItemListener(l); } ! public int getHorizontalAlignment() ! { return hori_align; } ! public int getHorizontalTextPosition() ! { return hori_text_pos; } ! public int getVerticalAlignment() ! { return vert_align; } ! public int getVerticalTextPosition() ! { return vert_text_pos; } ! protected void fireItemStateChanged(ItemEvent event) ! { getModel().fireItemStateChanged(event); } ! protected void fireStateChanged(ChangeEvent event) ! { getModel().fireStateChanged(event); } ! protected void fireActionPerformed(ActionEvent event) ! { getModel().fireActionPerformed(event); } ! public void setVerticalAlignment(int alignment) ! { vert_align = alignment; } ! public void setHorizontalAlignment(int alignment) ! { hori_align = alignment; } ! public void setVerticalTextPosition(int textPosition) ! { vert_text_pos = textPosition; } ! public void setHorizontalTextPosition(int textPosition) ! { hori_text_pos = textPosition; } ! public int getMnemonic() ! { return getModel().getMnemonic(); } ! public void setMnemonic(char mne) ! { getModel().setMnemonic(mne); } ! public void setMnemonic(int mne) ! { getModel().setMnemonic(mne); } ! public void setRolloverEnabled(boolean b) ! { getModel().setRollover(b); } ! public boolean isRolloverEnabled() ! { return getModel().isRollover(); } ! public boolean isBorderPainted() ! { return paint_border; } ! public void setBorderPainted(boolean b) ! { ! if (b != paint_border) ! { ! paint_border = b; ! revalidate(); ! repaint(); ! } ! } ! public Action getAction() ! { return action_taken; } ! public void setAction(Action a) ! { ! action_taken = a; ! revalidate(); ! repaint(); ! } ! public void setSelected(boolean b) ! { getModel().setSelected(b); } ! public boolean isSelected() ! { return getModel().isSelected(); } ! public Icon getIcon() ! { return default_icon; } ! public void setIcon(Icon defaultIcon) ! { ! if (default_icon == defaultIcon) ! return; ! default_icon = defaultIcon; ! if (default_icon != null) ! { ! // XXX FIXME - icons do not know their parent ! // default_icon.setParent(this); ! } ! revalidate(); ! repaint(); ! } ! public String getText() ! { return text; } ! public void setLabel(String label) ! { setText(label); } ! public String getLabel() ! { return getText(); } ! public void setText(String text) ! { ! this.text = text; ! revalidate(); ! repaint(); ! } ! public Insets getMargin() ! { return margin; } ! public void setMargin(Insets m) ! { ! margin = m; ! revalidate(); ! repaint(); ! } ! public void setEnabled(boolean b) ! { ! super.setEnabled(b); ! getModel().setEnabled(b); ! repaint(); ! } ! public Icon getPressedIcon() ! { return pressed_button; } ! public void setPressedIcon(Icon pressedIcon) ! { ! pressed_button = pressedIcon; ! revalidate(); ! repaint(); ! } ! public Icon getDisabledIcon() ! { return disabled_button; } ! public void setDisabledIcon(Icon disabledIcon) ! { ! disabled_button = disabledIcon; ! revalidate(); ! repaint(); ! } ! public boolean isFocusPainted() ! { return paint_focus; } ! public void setFocusPainted(boolean b) ! { ! boolean old = paint_focus; ! paint_focus = b; ! firePropertyChange(FOCUS_PAINTED_CHANGED_PROPERTY, ! old, ! b); ! if (hasFocus()) ! { ! revalidate(); ! repaint(); ! } ! } ! public boolean isFocusTraversable() ! { ! //Identifies whether or not this component can receive the focus. ! return true; ! } ! protected int checkHorizontalKey(int key, String exception) ! { ! // Verify that key is a legal value for the horizontalAlignment properties. ! return 0; ! } ! protected int checkVerticalKey(int key, String exception) ! { ! // Ensures that the key is a valid. ! return 0; ! } ! protected void configurePropertiesFromAction(Action a) ! { ! //Factory method which sets the ActionEvent source's properties according to values from the Action instance. ! } ! protected ActionListener createActionListener() ! { ! return new ActionListener() ! { ! public void actionPerformed(ActionEvent e) { } ! }; ! } ! protected PropertyChangeListener createActionPropertyChangeListener(Action a) ! { ! //Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance. ! return null; ! } ! protected ChangeListener createChangeListener() ! { ! // Subclasses that want to handle ChangeEvents differently can override this to return another ChangeListener implementation. ! return new ChangeListener() ! { ! public void stateChanged(ChangeEvent e) { } ! }; ! } ! protected ItemListener createItemListener() ! { ! return new ItemListener() ! { ! public void itemStateChanged(ItemEvent e) { } ! }; ! } ! public void doClick() ! { ! doClick(100); ! } ! public void doClick(int pressTime) ! { ! //Toolkit.tlkBeep (); ! //Programmatically perform a "click". ! } ! public Icon getDisabledSelectedIcon() ! { ! //Returns the icon used by the button when it's disabled and selected. ! return disabled_selected_button; ! } ! public Icon getRolloverIcon() ! { ! // Returns the rollover icon for the button. ! return null; ! } - Icon getRolloverSelectedIcon() - { - // Returns the rollover selection icon for the button. - return null; - } - Icon getSelectedIcon() - { - // Returns the selected icon for the button. - return selected_button; - } ! public Object[] getSelectedObjects() ! { ! //Returns an array (length 1) containing the label or null if the button is not selected. ! return null; ! } ! public boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h) ! { ! //This is overridden to return false if the current Icon's Image is not equal to the passed in Image img. ! return current_icon == img; ! } ! public boolean isContentAreaFilled() ! { ! // Checks whether the "content area" of the button should be filled. ! return false; ! } ! protected void paintBorder(Graphics g) ! { ! // Paint the button's border if BorderPainted property is true. ! if (isBorderPainted()) ! super.paintBorder(g); ! } ! protected String paramString() ! { ! // Returns a string representation of this AbstractButton. ! return "AbstractButton"; ! } ! public void setContentAreaFilled(boolean b) ! { ! //Sets whether the button should paint the content area or leave it transparent. ! } ! public void setDisabledSelectedIcon(Icon disabledSelectedIcon) ! { ! // Sets the disabled selection icon for the button. ! } ! public void setRolloverIcon(Icon rolloverIcon) ! { ! // Sets the rollover icon for the button. ! } ! public void setRolloverSelectedIcon(Icon rolloverSelectedIcon) ! { ! // Sets the rollover selected icon for the button. ! } ! public void setSelectedIcon(Icon selectedIcon) ! { ! // Sets the selected icon for the button. ! } ! public void setUI(ButtonUI ui) ! { // Sets the L&F object that renders this component. ! super.setUI(ui); ! } ! public ButtonUI getUI() ! { ! //Returns the L&F object that renders this component. ! return (ButtonUI) ui; ! } ! public void updateUI() ! { ! /* ! // Notification from the UIFactory that the L&F has changed. ! if (getUI() == null) ! { ! setUI(getUI()); ! } ! */ ! } ! protected void processActionEvent(ActionEvent e) ! { ! System.out.println("PROCESS-ACTION-EVENT: " + e); ! } ! protected void processMouseEvent(MouseEvent e) ! { ! // System.out.println("PROCESS-MOUSE-EVENT: " + e + ", PRESSED-IN-MODEL="+getModel().isPressed()); ! switch (e.getID()) ! { ! case MouseEvent.MOUSE_MOVED: ! { ! break; ! } ! case MouseEvent.MOUSE_PRESSED: ! { ! if (! isEnabled()) ! { ! System.out.println("button not enabled, ignoring press"); ! } ! else ! { ! System.out.println("telling model:press: " + getModel()); ! getModel().setPressed(true); ! repaint(); ! } ! break; ! } ! case MouseEvent.MOUSE_RELEASED: ! { ! if (! isEnabled()) ! { ! System.out.println("button not enabled, ignoring release"); ! } ! else ! { ! int flags = 0; ! System.out.println(" XXX--> " + getActionCommand()); ! fireActionPerformed(new ActionEvent(this, ! ActionEvent.ACTION_PERFORMED, ! getActionCommand(), ! flags)); ! //System.out.println("telling model:release"); ! getModel().setPressed(false); ! repaint(); ! } ! break; ! } ! case MouseEvent.MOUSE_CLICKED: ! { ! break; ! } ! } ! } } --- 69,801 ---- * @author Ronald Veldema (rveldema@cs.vu.nl) */ public abstract class AbstractButton extends JComponent ! implements ItemSelectable, SwingConstants { ! Icon default_icon, pressed_button, disabled_button, ! selected_button, disabled_selected_button, current_icon; ! String text; ! int vert_align = CENTER; ! int hori_align = CENTER; ! int hori_text_pos = CENTER; ! int vert_text_pos = CENTER; ! boolean paint_border = true, paint_focus; ! Action action_taken; ! ButtonModel model; ! Insets margin; + public static final String FOCUS_PAINTED_CHANGED_PROPERTY = "focusPainted"; ! /** ! * AccessibleAbstractButton ! */ ! protected abstract class AccessibleAbstractButton ! extends AccessibleJComponent ! implements AccessibleAction, AccessibleValue, AccessibleText { ! /** ! * Constructor AccessibleAbstractButton ! * @param component TODO ! */ ! protected AccessibleAbstractButton(AbstractButton component) { ! super(component); ! // TODO ! } // AccessibleAbstractButton() ! /** ! * getAccessibleStateSet ! * @returns AccessibleStateSet ! */ ! public AccessibleStateSet getAccessibleStateSet() { ! return null; // TODO ! } // getAccessibleStateSet() ! /** ! * getAccessibleName ! * @returns String ! */ ! public String getAccessibleName() { ! return null; // TODO ! } // getAccessibleName() + /** + * getAccessibleIcon + * @returns AccessibleIcon[] + */ + public AccessibleIcon[] getAccessibleIcon() { + return null; // TODO + } // getAccessibleIcon() ! /** ! * getAccessibleRelationSet ! * @returns AccessibleRelationSet ! */ ! public AccessibleRelationSet getAccessibleRelationSet() { ! return null; // TODO ! } // getAccessibleRelationSet() ! /** ! * getAccessibleAction ! * @returns AccessibleAction ! */ ! public AccessibleAction getAccessibleAction() { ! return null; // TODO ! } // getAccessibleAction() ! /** ! * getAccessibleValue ! * @returns AccessibleValue ! */ ! public AccessibleValue getAccessibleValue() { ! return null; // TODO ! } // getAccessibleValue() ! /** ! * getAccessibleActionCount ! * @returns int ! */ ! public int getAccessibleActionCount() { ! return 0; // TODO ! } // getAccessibleActionCount() ! /** ! * getAccessibleActionDescription ! * @param value0 TODO ! * @returns String ! */ ! public String getAccessibleActionDescription(int value0) { ! return null; // TODO ! } // getAccessibleActionDescription() ! /** ! * doAccessibleAction ! * @param value0 TODO ! * @returns boolean ! */ ! public boolean doAccessibleAction(int value0) { ! return false; // TODO ! } // doAccessibleAction() ! /** ! * getCurrentAccessibleValue ! * @returns Number ! */ ! public Number getCurrentAccessibleValue() { ! return null; // TODO ! } // getCurrentAccessibleValue() ! /** ! * setCurrentAccessibleValue ! * @param value0 TODO ! * @returns boolean ! */ ! public boolean setCurrentAccessibleValue(Number value0) { ! return false; // TODO ! } // setCurrentAccessibleValue() ! /** ! * getMinimumAccessibleValue ! * @returns Number ! */ ! public Number getMinimumAccessibleValue() { ! return null; // TODO ! } // getMinimumAccessibleValue() ! /** ! * getMaximumAccessibleValue ! * @returns Number ! */ ! public Number getMaximumAccessibleValue() { ! return null; // TODO ! } // getMaximumAccessibleValue() ! /** ! * getAccessibleText ! * @returns AccessibleText ! */ ! public AccessibleText getAccessibleText() { ! return null; // TODO ! } // getAccessibleText() ! /** ! * getIndexAtPoint ! * @param value0 TODO ! * @returns int ! */ ! public int getIndexAtPoint(Point value0) { ! return 0; // TODO ! } // getIndexAtPoint() ! /** ! * getCharacterBounds ! * @param value0 TODO ! * @returns Rectangle ! */ ! public Rectangle getCharacterBounds(int value0) { ! return null; // TODO ! } // getCharacterBounds() ! /** ! * getCharCount ! * @returns int ! */ ! public int getCharCount() { ! return 0; // TODO ! } // getCharCount() ! /** ! * getCaretPosition ! * @returns int ! */ ! public int getCaretPosition() { ! return 0; // TODO ! } // getCaretPosition() ! /** ! * getAtIndex ! * @param value0 TODO ! * @param value1 TODO ! * @returns String ! */ ! public String getAtIndex(int value0, int value1) { ! return null; // TODO ! } // getAtIndex() ! /** ! * getAfterIndex ! * @param value0 TODO ! * @param value1 TODO ! * @returns String ! */ ! public String getAfterIndex(int value0, int value1) { ! return null; // TODO ! } // getAfterIndex() ! /** ! * getBeforeIndex ! * @param value0 TODO ! * @param value1 TODO ! * @returns String ! */ ! public String getBeforeIndex(int value0, int value1) { ! return null; // TODO ! } // getBeforeIndex() ! /** ! * getCharacterAttribute ! * @param value0 TODO ! * @returns AttributeSet ! */ ! public AttributeSet getCharacterAttribute(int value0) { ! return null; // TODO ! } // getCharacterAttribute() ! /** ! * getSelectionStart ! * @returns int ! */ ! public int getSelectionStart() { ! return 0; // TODO ! } // getSelectionStart() ! /** ! * getSelectionEnd ! * @returns int ! */ ! public int getSelectionEnd() { ! return 0; // TODO ! } // getSelectionEnd() ! /** ! * getSelectedText ! * @returns String ! */ ! public String getSelectedText() { ! return null; // TODO ! } // getSelectedText() ! /** ! * getTextRectangle ! * @returns Rectangle ! */ ! private Rectangle getTextRectangle() { ! return null; // TODO ! } // getTextRectangle() ! } // AccessibleAbstractButton ! static private class JFocusListener implements FocusListener ! { ! AbstractButton c; + JFocusListener(AbstractButton c) + { + this.c = c; + } ! public void focusLost(FocusEvent event) ! { ! c.getModel().setArmed(false); + System.out.println("LOST FOCUS"); + if (c.isFocusPainted()) + { + c.repaint(); + } + } + public void focusGained(FocusEvent event) + { + System.out.println("GAIN FOCUS"); + } + } ! AbstractButton() ! { ! this("",null); ! } ! AbstractButton(String text, ! Icon icon) ! { ! this.text = text; ! setIcon(icon); ! setAlignmentX(LEFT_ALIGNMENT); ! setAlignmentY(CENTER_ALIGNMENT); ! addFocusListener( new JFocusListener(this) ); + setModel(new DefaultButtonModel(this)); ! updateUI(); // get a proper ui ! } ! public ButtonModel getModel() ! { return model; } ! public void setModel(ButtonModel newModel) ! { model = newModel; } ! public String getActionCommand() ! { return getModel().getActionCommand(); } ! public void setActionCommand(String aCommand) ! { getModel().setActionCommand(aCommand); } ! public void addActionListener(ActionListener l) ! { getModel().addActionListener(l); } ! public void removeActionListener(ActionListener l) ! { getModel().removeActionListener(l); } + public void addChangeListener(ChangeListener l) + { getModel().addChangeListener(l); } ! public void removeChangeListener(ChangeListener l) ! { getModel().removeChangeListener(l); } ! public void addItemListener(ItemListener l) ! { getModel().addItemListener(l); } ! public void removeItemListener(ItemListener l) ! { getModel().removeItemListener(l); } ! public int getHorizontalAlignment() ! { return hori_align; } ! public int getHorizontalTextPosition() ! { return hori_text_pos; } ! public int getVerticalAlignment() ! { return vert_align; } ! public int getVerticalTextPosition() ! { return vert_text_pos; } ! ! protected void fireItemStateChanged(ItemEvent event) ! { ! } ! ! protected void fireStateChanged(ChangeEvent event) ! { ! } ! ! protected void fireActionPerformed(ActionEvent event) ! { ! } + public void setVerticalAlignment(int alignment) + { vert_align = alignment; } ! public void setHorizontalAlignment(int alignment) ! { hori_align = alignment; } ! public void setVerticalTextPosition(int textPosition) ! { vert_text_pos = textPosition; } ! public void setHorizontalTextPosition(int textPosition) ! { hori_text_pos = textPosition; } ! public int getMnemonic() ! { return getModel().getMnemonic(); } + public void setMnemonic(char mne) + { getModel().setMnemonic(mne); } ! public void setMnemonic(int mne) ! { getModel().setMnemonic(mne); } ! public void setRolloverEnabled(boolean b) ! { getModel().setRollover(b); } ! public boolean isRolloverEnabled() ! { return getModel().isRollover(); } + public boolean isBorderPainted() + { return paint_border; } ! public void setBorderPainted(boolean b) ! { ! if (b != paint_border) ! { ! paint_border = b; ! revalidate(); ! repaint(); ! } ! } ! public Action getAction() ! { return action_taken; } ! public void setAction(Action a) ! { ! action_taken = a; ! revalidate(); ! repaint(); ! } + public void setSelected(boolean b) + { getModel().setSelected(b); } ! public boolean isSelected() ! { return getModel().isSelected(); } ! public Icon getIcon() ! { return default_icon; } ! public void setIcon(Icon defaultIcon) ! { ! if (default_icon == defaultIcon) ! return; + default_icon = defaultIcon; + if (default_icon != null) + { + // XXX FIXME - icons do not know their parent + // default_icon.setParent(this); + } + revalidate(); + repaint(); + } ! public String getText() ! { return text; } ! public void setLabel(String label) ! { setText(label); } ! public String getLabel() ! { return getText(); } ! public void setText(String text) ! { ! this.text = text; ! revalidate(); ! repaint(); ! } + public Insets getMargin() + { return margin; } ! public void setMargin(Insets m) ! { ! margin = m; ! revalidate(); ! repaint(); ! } ! public void setEnabled(boolean b) ! { ! super.setEnabled(b); ! getModel().setEnabled(b); ! repaint(); ! } ! public Icon getPressedIcon() ! { return pressed_button; } ! public void setPressedIcon(Icon pressedIcon) ! { ! pressed_button = pressedIcon; ! revalidate(); ! repaint(); ! } + public Icon getDisabledIcon() + { return disabled_button; } ! public void setDisabledIcon(Icon disabledIcon) ! { ! disabled_button = disabledIcon; ! revalidate(); ! repaint(); ! } + public boolean isFocusPainted() + { return paint_focus; } ! public void setFocusPainted(boolean b) ! { ! boolean old = paint_focus; ! paint_focus = b; + firePropertyChange(FOCUS_PAINTED_CHANGED_PROPERTY, + old, + b); + if (hasFocus()) + { + revalidate(); + repaint(); + } + } ! public boolean isFocusTraversable() ! { ! //Identifies whether or not this component can receive the focus. ! return true; ! } + protected int checkHorizontalKey(int key, String exception) + { + // Verify that key is a legal value for the horizontalAlignment properties. + return 0; + } ! protected int checkVerticalKey(int key, String exception) ! { ! // Ensures that the key is a valid. ! return 0; ! } + protected void configurePropertiesFromAction(Action a) + { + //Factory method which sets the ActionEvent source's properties according to values from the Action instance. + } ! protected ActionListener createActionListener() ! { ! return new ActionListener() ! { ! public void actionPerformed(ActionEvent e) { } ! }; ! } ! protected PropertyChangeListener createActionPropertyChangeListener(Action a) ! { ! //Factory method which creates the PropertyChangeListener used to update the ActionEvent source as properties change on its Action instance. ! return null; ! } + protected ChangeListener createChangeListener() + { + // Subclasses that want to handle ChangeEvents differently can override this to return another ChangeListener implementation. + return new ChangeListener() + { + public void stateChanged(ChangeEvent e) { } + }; + } + protected ItemListener createItemListener() + { + return new ItemListener() + { + public void itemStateChanged(ItemEvent e) { } + }; + } ! public void doClick() ! { ! doClick(100); ! } + public void doClick(int pressTime) + { + //Toolkit.tlkBeep (); + //Programmatically perform a "click". + } ! public Icon getDisabledSelectedIcon() ! { ! //Returns the icon used by the button when it's disabled and selected. ! return disabled_selected_button; ! } + public Icon getRolloverIcon() + { + // Returns the rollover icon for the button. + return null; + } ! Icon getRolloverSelectedIcon() ! { ! // Returns the rollover selection icon for the button. ! return null; ! } ! Icon getSelectedIcon() ! { ! // Returns the selected icon for the button. ! return selected_button; ! } + public Object[] getSelectedObjects() + { + //Returns an array (length 1) containing the label or null if the button is not selected. + return null; + } ! public boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h) ! { ! //This is overridden to return false if the current Icon's Image is not equal to the passed in Image img. ! return current_icon == img; ! } + public boolean isContentAreaFilled() + { + // Checks whether the "content area" of the button should be filled. + return false; + } ! protected void paintBorder(Graphics g) ! { ! // Paint the button's border if BorderPainted property is true. ! if (isBorderPainted()) ! super.paintBorder(g); ! } ! protected String paramString() ! { ! // Returns a string representation of this AbstractButton. ! return "AbstractButton"; ! } ! public void setContentAreaFilled(boolean b) ! { ! //Sets whether the button should paint the content area or leave it transparent. ! } ! public void setDisabledSelectedIcon(Icon disabledSelectedIcon) ! { ! // Sets the disabled selection icon for the button. ! } + public void setRolloverIcon(Icon rolloverIcon) + { + // Sets the rollover icon for the button. + } + public void setRolloverSelectedIcon(Icon rolloverSelectedIcon) + { + // Sets the rollover selected icon for the button. + } ! public void setSelectedIcon(Icon selectedIcon) ! { ! // Sets the selected icon for the button. ! } ! public void setUI(ButtonUI ui) ! { // Sets the L&F object that renders this component. ! super.setUI(ui); ! } ! public ButtonUI getUI() ! { ! //Returns the L&F object that renders this component. ! return (ButtonUI) ui; ! } ! public void updateUI() ! { ! /* ! // Notification from the UIFactory that the L&F has changed. ! if (getUI() == null) ! { ! setUI(getUI()); ! } ! */ ! } ! protected void processActionEvent(ActionEvent e) ! { ! System.out.println("PROCESS-ACTION-EVENT: " + e); ! } ! protected void processMouseEvent(MouseEvent e) ! { ! // System.out.println("PROCESS-MOUSE-EVENT: " + e + ", PRESSED-IN-MODEL="+getModel().isPressed()); ! ! switch (e.getID()) ! { ! case MouseEvent.MOUSE_MOVED: ! { ! break; ! } ! case MouseEvent.MOUSE_PRESSED: ! { ! if (! isEnabled()) ! { ! System.out.println("button not enabled, ignoring press"); ! } ! else ! { ! System.out.println("telling model:press: " + getModel()); ! getModel().setPressed(true); ! repaint(); ! } ! break; ! } ! ! case MouseEvent.MOUSE_RELEASED: ! { ! if (! isEnabled()) ! { ! System.out.println("button not enabled, ignoring release"); ! } ! else ! { ! int flags = 0; ! ! System.out.println(" XXX--> " + getActionCommand()); ! ! fireActionPerformed(new ActionEvent(this, ! ActionEvent.ACTION_PERFORMED, ! getActionCommand(), ! flags)); ! ! //System.out.println("telling model:release"); ! getModel().setPressed(false); ! repaint(); ! } ! break; ! } ! case MouseEvent.MOUSE_CLICKED: ! { ! break; ! } ! } ! } } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/AbstractCellEditor.java gcc-3.4.0/libjava/javax/swing/AbstractCellEditor.java *** gcc-3.3.3/libjava/javax/swing/AbstractCellEditor.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/AbstractCellEditor.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,53 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing; ! // Imports ! import java.io.*; ! import java.util.*; ! import javax.swing.event.*; /** * AbstractCellEditor * @author Andrew Selkirk * @version 1.0 */ ! public abstract class AbstractCellEditor implements CellEditor, Serializable { //------------------------------------------------------------- // Variables -------------------------------------------------- --- 35,58 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; ! import java.io.Serializable; ! import java.util.EventObject; ! import javax.swing.event.CellEditorListener; ! import javax.swing.event.ChangeEvent; ! import javax.swing.event.EventListenerList; /** * AbstractCellEditor * @author Andrew Selkirk * @version 1.0 */ ! public abstract class AbstractCellEditor ! implements CellEditor, Serializable ! { ! static final long serialVersionUID = -1048006551406220959L; //------------------------------------------------------------- // Variables -------------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/AbstractListModel.java gcc-3.4.0/libjava/javax/swing/AbstractListModel.java *** gcc-3.3.3/libjava/javax/swing/AbstractListModel.java 2002-10-10 12:08:37.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/AbstractListModel.java 2003-06-11 13:20:39.000000000 +0000 *************** exception statement from your version. * *** 37,46 **** package javax.swing; ! // Imports ! import java.io.*; ! import java.util.*; ! import javax.swing.event.*; /** * AbstractListModel --- 37,47 ---- package javax.swing; ! import java.io.Serializable; ! import java.util.EventListener; ! import javax.swing.event.EventListenerList; ! import javax.swing.event.ListDataListener; ! import javax.swing.event.ListDataEvent; /** * AbstractListModel *************** import javax.swing.event.*; *** 48,213 **** * @author Andrew Selkirk * @version 1.0 */ ! public abstract class AbstractListModel implements ListModel, Serializable { ! ! //------------------------------------------------------------- ! // Variables -------------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * listenerList ! */ ! protected EventListenerList listenerList = new EventListenerList(); ! ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Constructor AbstractListModel ! */ ! public AbstractListModel() { ! } // AbstractListModel() ! ! ! //------------------------------------------------------------- ! // Methods ---------------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * addListDataListener ! * @param listener TODO ! */ ! public void addListDataListener(ListDataListener listener) { ! listenerList.add(ListDataListener.class, (EventListener) listener); ! } // addListDataListener() ! ! /** ! * removeListDataListener ! * @param listener TODO ! */ ! public void removeListDataListener(ListDataListener listener) { ! listenerList.remove(ListDataListener.class, (EventListener) listener); ! } // removeListDataListener() ! ! /** ! * fireContentsChanged ! * @param source TODO ! * @param startIndex TODO ! * @param endIndex TODO ! */ ! protected void fireContentsChanged(Object source, int startIndex, int endIndex) { ! ! // Variables ! ListDataEvent event; ! EventListener[] listeners; ! ListDataListener listener; ! int index; ! ! // Create Event ! event = new ListDataEvent(source, ListDataEvent.CONTENTS_CHANGED, ! startIndex, endIndex); ! ! // Get Listeners ! listeners = listenerList.getListeners(ListDataListener.class); ! ! // Process Listeners ! for (index = 0; index < listeners.length; index++) { ! listener = (ListDataListener) listeners[index]; ! listener.contentsChanged(event); ! } // for ! ! } // fireContentsChanged() ! ! /** ! * fireIntervalAdded ! * @param source TODO ! * @param startIndex TODO ! * @param endIndex TODO ! */ ! protected void fireIntervalAdded(Object source, int startIndex, int endIndex) { ! // Variables ! ListDataEvent event; ! EventListener[] listeners; ! ListDataListener listener; ! int index; ! // Create Event ! event = new ListDataEvent(source, ListDataEvent.INTERVAL_ADDED, ! startIndex, endIndex); ! // Get Listeners ! listeners = listenerList.getListeners(ListDataListener.class); ! // Process Listeners ! for (index = 0; index < listeners.length; index++) { ! listener = (ListDataListener) listeners[index]; ! listener.intervalAdded(event); ! } // for ! } // fireIntervalAdded() ! /** ! * fireIntervalRemoved ! * @param source TODO ! * @param startIndex TODO ! * @param endIndex TODO ! */ ! protected void fireIntervalRemoved(Object source, int startIndex, int endIndex) { ! // Variables ! ListDataEvent event; ! EventListener[] listeners; ! ListDataListener listener; ! int index; ! // Create Event ! event = new ListDataEvent(source, ListDataEvent.INTERVAL_REMOVED, ! startIndex, endIndex); ! // Get Listeners ! listeners = listenerList.getListeners(ListDataListener.class); ! // Process Listeners ! for (index = 0; index < listeners.length; index++) { ! listener = (ListDataListener) listeners[index]; ! listener.intervalRemoved(event); ! } // for ! } // fireIntervalRemoved() ! /** ! * getListeners ! * @param listenerType TODO ! * @returns EventListener[] ! */ ! public EventListener[] getListeners(Class listenerType) { ! return listenerList.getListeners(listenerType); ! } // getListeners() ! /** ! * getListDataListeners ! */ ! public ListDataListener[] getListDataListeners() ! { ! // FIXME: implement this ! return null; ! } ! /** ! * getElementAt ! * @param index TODO ! * @returns Object ! */ ! public abstract Object getElementAt(int index); ! /** ! * getSize ! * @returns int ! */ ! public abstract int getSize(); ! } // AbstractListModel --- 49,192 ---- * @author Andrew Selkirk * @version 1.0 */ ! public abstract class AbstractListModel ! implements ListModel, Serializable ! { ! static final long serialVersionUID = -3285184064379168730L; ! /** ! * listenerList ! */ ! protected EventListenerList listenerList = new EventListenerList (); ! ! /** ! * Constructor AbstractListModel ! */ ! public AbstractListModel () ! { ! } ! /** ! * addListDataListener ! * @param listener TODO ! */ ! public void addListDataListener(ListDataListener listener) ! { ! listenerList.add (ListDataListener.class, listener); ! } ! /** ! * removeListDataListener ! * @param listener TODO ! */ ! public void removeListDataListener(ListDataListener listener) ! { ! listenerList.remove (ListDataListener.class, listener); ! } ! /** ! * fireContentsChanged ! * @param source TODO ! * @param startIndex TODO ! * @param endIndex TODO ! */ ! protected void fireContentsChanged(Object source, int startIndex, int endIndex) ! { ! // Variables ! ListDataEvent event; ! ListDataListener[] listeners; ! ListDataListener listener; ! int index; ! // Create Event ! event = new ListDataEvent(source, ListDataEvent.CONTENTS_CHANGED, ! startIndex, endIndex); ! // Get Listeners ! listeners = getListDataListeners (); ! // Process Listeners ! for (index = 0; index < listeners.length; index++) ! { ! listener = (ListDataListener) listeners[index]; ! listener.contentsChanged(event); ! } ! } ! /** ! * fireIntervalAdded ! * @param source TODO ! * @param startIndex TODO ! * @param endIndex TODO ! */ ! protected void fireIntervalAdded (Object source, int startIndex, int endIndex) ! { ! // Variables ! ListDataEvent event; ! ListDataListener[] listeners; ! ListDataListener listener; ! int index; ! // Create Event ! event = new ListDataEvent (source, ListDataEvent.INTERVAL_ADDED, startIndex, ! endIndex); ! // Get Listeners ! listeners = getListDataListeners (); ! // Process Listeners ! for (index = 0; index < listeners.length; index++) ! { ! listener = listeners [index]; ! listener.intervalAdded (event); ! } ! } ! /** ! * fireIntervalRemoved ! * @param source TODO ! * @param startIndex TODO ! * @param endIndex TODO ! */ ! protected void fireIntervalRemoved (Object source, int startIndex, ! int endIndex) ! { ! // Variables ! ListDataEvent event; ! ListDataListener[] listeners; ! ListDataListener listener; ! int index; ! // Create Event ! event = new ListDataEvent (source, ListDataEvent.INTERVAL_REMOVED, ! startIndex, endIndex); ! // Get Listeners ! listeners = getListDataListeners (); ! // Process Listeners ! for (index = 0; index < listeners.length; index++) ! { ! listener = listeners [index]; ! listener.intervalRemoved (event); ! } ! } + /** + * getListeners + * @param listenerType TODO + * @returns EventListener[] + */ + public EventListener[] getListeners (Class listenerType) + { + return listenerList.getListeners (listenerType); + } ! /** ! * getListDataListeners ! */ ! public ListDataListener[] getListDataListeners () ! { ! return (ListDataListener[]) getListeners (ListDataListener.class); ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/AbstractSet.java gcc-3.4.0/libjava/javax/swing/AbstractSet.java *** gcc-3.3.3/libjava/javax/swing/AbstractSet.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/AbstractSet.java 2004-01-09 10:18:47.000000000 +0000 *************** *** 1,5 **** /* AbstractSet.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* AbstractSet.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,43 **** package javax.swing; ! import java.util.*; /** * Empty --- 37,45 ---- package javax.swing; ! import java.util.AbstractCollection; ! import java.util.Collection; ! import java.util.Set; /** * Empty diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/Action.java gcc-3.4.0/libjava/javax/swing/Action.java *** gcc-3.3.3/libjava/javax/swing/Action.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/Action.java 2004-01-09 10:18:47.000000000 +0000 *************** *** 1,5 **** /* Action.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Action.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,45 **** package javax.swing; ! // Imports ! import java.awt.*; ! import java.awt.event.*; import java.beans.PropertyChangeListener; /** --- 37,43 ---- package javax.swing; ! import java.awt.event.ActionListener; import java.beans.PropertyChangeListener; /** *************** public interface Action extends ActionLi *** 56,82 **** /** * DEFAULT */ ! public static final String DEFAULT = "Default"; /** * LONG_DESCRIPTION */ ! public static final String LONG_DESCRIPTION = "LongDescription"; /** * NAME */ ! public static final String NAME = "Name"; /** * SHORT_DESCRIPTION */ ! public static final String SHORT_DESCRIPTION = "ShortDescription"; /** * SMALL_ICON */ ! public static final String SMALL_ICON = "SmallIcon"; //------------------------------------------------------------- --- 54,95 ---- /** * DEFAULT */ ! String DEFAULT = "Default"; /** * LONG_DESCRIPTION */ ! String LONG_DESCRIPTION = "LongDescription"; /** * NAME */ ! String NAME = "Name"; /** * SHORT_DESCRIPTION */ ! String SHORT_DESCRIPTION = "ShortDescription"; /** * SMALL_ICON */ ! String SMALL_ICON = "SmallIcon"; ! ! /** ! * ACCELERATOR_KEY ! */ ! String ACCELERATOR_KEY = "AcceleratorKey"; ! ! /** ! * ACTION_COMMAND_KEY ! */ ! String ACTION_COMMAND_KEY = "ActionCommandKey"; ! ! /** ! * MNEMONIC_KEY ! */ ! String MNEMONIC_KEY = "MnemonicKey"; //------------------------------------------------------------- *************** public interface Action extends ActionLi *** 88,125 **** * @param key TODO * @returns TODO */ ! public Object getValue(String key); /** * setValue * @param key TODO * @param value TODO */ ! public void putValue(String key, Object value); /** * isEnabled * @returns TODO */ ! public boolean isEnabled(); /** * setEnabled * @param b TODO */ ! public void setEnabled(boolean b); /** * addPropertyChangeListener * @param listener TODO */ ! public void addPropertyChangeListener(PropertyChangeListener listener); /** * removePropertyChangeListener * @param listener TODO */ ! public void removePropertyChangeListener(PropertyChangeListener listener); } // Action --- 101,138 ---- * @param key TODO * @returns TODO */ ! Object getValue(String key); /** * setValue * @param key TODO * @param value TODO */ ! void putValue(String key, Object value); /** * isEnabled * @returns TODO */ ! boolean isEnabled(); /** * setEnabled * @param b TODO */ ! void setEnabled(boolean b); /** * addPropertyChangeListener * @param listener TODO */ ! void addPropertyChangeListener(PropertyChangeListener listener); /** * removePropertyChangeListener * @param listener TODO */ ! void removePropertyChangeListener(PropertyChangeListener listener); } // Action diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/ActionMap.java gcc-3.4.0/libjava/javax/swing/ActionMap.java *** gcc-3.3.3/libjava/javax/swing/ActionMap.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/ActionMap.java 2004-01-09 10:18:47.000000000 +0000 *************** *** 1,5 **** /* ActionMap.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ActionMap.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,52 **** package javax.swing; ! // Imports ! import java.io.*; ! import java.util.*; /** * ActionMap * @author Andrew Selkirk * @version 1.0 */ ! public class ActionMap implements Serializable { //------------------------------------------------------------- // Variables -------------------------------------------------- --- 37,62 ---- package javax.swing; ! import java.io.IOException; ! import java.io.ObjectInputStream; ! import java.io.ObjectOutputStream; ! import java.io.Serializable; ! import java.util.Arrays; ! import java.util.Collection; ! import java.util.HashMap; ! import java.util.HashSet; ! import java.util.Iterator; ! import java.util.Map; ! import java.util.Set; /** * ActionMap * @author Andrew Selkirk * @version 1.0 */ ! public class ActionMap implements Serializable ! { ! static final long serialVersionUID = -6277518704513986346L; //------------------------------------------------------------- // Variables -------------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/border/AbstractBorder.java gcc-3.4.0/libjava/javax/swing/border/AbstractBorder.java *** gcc-3.3.3/libjava/javax/swing/border/AbstractBorder.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/border/AbstractBorder.java 2003-06-19 10:48:45.000000000 +0000 *************** *** 1,5 **** /* AbstractBorder.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* AbstractBorder.java -- ! Copyright (C) 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,122 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.border; ! import java.io.*; ! import java.awt.*; ! public abstract class AbstractBorder implements Border, Serializable { ! AbstractBorder() ! { ! } - public void paintBorder(Component c, - Graphics g, - int x, - int y, - int width, - int height) - { - System.out.println("HMMMMM, abstract-border.paintBorder"); - } - public Insets getBorderInsets(Component c, Insets insets) - { - if (insets == null) - insets = new Insets(0,0,0,0); - - insets.left = insets.top = insets.right = insets.bottom = 5; ! return insets; ! } - public Insets getBorderInsets(Component c) - { - return getBorderInsets(c, new Insets(0,0,0,0)); - } - public boolean isBorderOpaque() - { return false; } ! public Rectangle getInteriorRectangle(Component c, ! int x, ! int y, ! int width, ! int height) ! { ! return getInteriorRectangle(c, ! this, ! x, ! y, ! width, ! height); ! } - - public static Rectangle getInteriorRectangle(Component c, - Border b, - int x, - int y, - int width, - int height) - { - if(b != null) - { - Insets insets = b.getBorderInsets(c); - - int w = insets.right - insets.left; - int h = insets.top - insets.bottom; ! return new Rectangle(x + insets.left, ! y + insets.top, ! width - w, ! height - h); ! } ! else ! { ! return new Rectangle(x, ! y, ! width, ! height); ! } } - } --- 35,192 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.border; ! import java.awt.Component; ! import java.awt.Graphics; ! import java.awt.Insets; ! import java.awt.Rectangle; ! import java.io.Serializable; ! ! /** ! * An invisible zero-width border, serving as a base class for ! * implementing more interesting borders. ! * ! * @author Sascha Brawer (brawer@dandelis.ch) ! * @author Ronald Veldema (rveldema@cs.vu.nl) ! */ ! public abstract class AbstractBorder ! implements Border, Serializable { ! static final long serialVersionUID = -545885975315191844L; + /** + * Constructs a new AbstractBorder. + */ + public AbstractBorder () + { + } ! /** ! * Performs nothing, because the default implementation provided by ! * this class is an invisible, zero-width border. Subclasses will ! * likely want to override this method, but they are not required ! * for doing so. ! * ! * @param c the component whose border is to be painted. ! * @param g the graphics for painting. ! * @param x the horizontal position for painting the border. ! * @param y the vertical position for painting the border. ! * @param width the width of the available area for painting the border. ! * @param height the height of the available area for painting the border. ! */ ! public void paintBorder (Component c, Graphics g, ! int x, int y, int width, int height) ! { ! /* A previous version of Classpath had emitted a warning when ! * this method was called. The warning was removed because it is ! * perfectly legal for a subclass to not override the paintBorder ! * method. An example would be EmptyBorder. ! */ ! } + /** + * Measures the width of this border. + * + * @param c the component whose border is to be measured. + * + * @return an Insets object whose left, right, + * top and bottom fields indicate the + * width of the border at the respective edge, which is zero + * for the default implementation provided by AbstractButton. + * + * @see #getBorderInsets(java.awt.Component, java.awt.Insets) + */ + public Insets getBorderInsets (Component c) + { + return new Insets (0, 0, 0, 0); + } ! /** ! * Determines the insets of this border. The implementation provided ! * by AbstractButton sets the left, right, ! * top and bottom fields of the passed ! * insets parameter to zero. ! * ! * @param c the component whose border is to be measured. ! * ! * @return the same object that was passed for insets. ! * ! * @see #getBorderInsets() ! */ ! public Insets getBorderInsets (Component c, Insets insets) ! { ! insets.left = insets.right = insets.top = insets.bottom = 0; ! return insets; ! } ! /** ! * Determines whether or not this border is opaque. An opaque border ! * fills every pixel in its area when painting. Partially ! * translucent borders must return false, or ugly ! * artifacts can appear on screen. The default implementation ! * provided by AbstractBorder always returns false. ! * ! * @return false. ! */ ! public boolean isBorderOpaque () ! { ! return false; ! } ! ! ! /** ! * Returns a rectangle that covers the specified area minus this ! * border. Components that wish to determine an area into which ! * they can safely draw without intersecting with a border might ! * want to use this helper method. ! * ! * @param c the component in the center of this border. ! * @param x the horizontal position of the border. ! * @param y the vertical position of the border. ! * @param width the width of the available area for the border. ! * @param height the height of the available area for the border. ! */ ! public Rectangle getInteriorRectangle (Component c, ! int x, int y, int width, int height) ! { ! return getInteriorRectangle (c, this, x, y, width, height); ! } ! ! ! /** ! * Returns a rectangle that covers the specified area minus a ! * border. Components that wish to determine an area into which ! * they can safely draw without intersecting with a border might ! * want to use this helper method. ! * ! * @param c the component in the center of this border. ! * @param x the horizontal position of the border. ! * @param y the vertical position of the border. ! * @param width the width of the available area for the border. ! * @param height the height of the available area for the border. ! */ ! public static Rectangle getInteriorRectangle (Component c, Border b, ! int x, int y, int width, int height) ! { ! Insets borderInsets; ! ! if (b != null) ! { ! borderInsets = b.getBorderInsets (c); ! x += borderInsets.left; ! y += borderInsets.top; ! width -= borderInsets.left + borderInsets.right; ! height -= borderInsets.top + borderInsets.bottom; } + return new Rectangle (x, y, width, height); + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/border/BevelBorder.java gcc-3.4.0/libjava/javax/swing/border/BevelBorder.java *** gcc-3.3.3/libjava/javax/swing/border/BevelBorder.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/border/BevelBorder.java 2003-08-01 20:10:21.000000000 +0000 *************** *** 1,5 **** /* BevelBorder.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* BevelBorder.java -- ! Copyright (C) 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,75 **** package javax.swing.border; ! import java.awt.*; ! public class BevelBorder extends EmptyBorder { ! Color c; - public BevelBorder() - { - } ! ! public BevelBorder(int top, ! int left, ! int bottom, ! int right, ! Color color) { ! super(top, left, bottom, right); ! this.c = color; } ! public boolean isBorderOpaque() { ! return false; } ! ! public void paintBorder(Component c, ! Graphics g, ! int x, ! int y, ! int width, ! int height) { } } --- 37,568 ---- package javax.swing.border; ! import java.awt.Color; ! import java.awt.Component; ! import java.awt.Graphics; ! import java.awt.Insets; ! ! /** ! * A rectangular, two pixel thick border that causes the enclosed area ! * to appear as if it was raising out of or lowered into the screen. Some ! * LookAndFeels use this kind of border for rectangular buttons. ! * ! *

                A BevelBorder has a highlight and a shadow color. In the raised ! * variant, the highlight color is used for the top and left edges, ! * and the shadow color is used for the bottom and right edge. For an ! * image, see the documentation of the individual constructors. ! * ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ ! public class BevelBorder ! extends AbstractBorder { ! /** ! * Determined using the serialver tool ! * of Apple/Sun JDK 1.3.1 on MacOS X 10.1.5. ! */ ! static final long serialVersionUID = -1034942243356299676L; ! /** ! * Indicates that the BevelBorder looks like if the enclosed area was ! * raising out of the screen. ! */ ! public static final int RAISED = 0; ! ! ! /** ! * Indicates that the BevelBorder looks like if the enclosed area was ! * pressed into the screen. ! */ ! public static final int LOWERED = 1; ! ! ! /** ! * The type of this BevelBorder, which is either {@link #RAISED} ! * or {@link #LOWERED}. ! */ ! protected int bevelType; ! ! ! /** ! * The outer highlight color, or null to indicate that ! * the color shall be derived from the background of the component ! * whose border is being painted. ! */ ! protected Color highlightOuter; ! ! ! /** ! * The inner highlight color, or null to indicate that ! * the color shall be derived from the background of the component ! * whose border is being painted. ! */ ! protected Color highlightInner; ! ! ! /** ! * The outer shadow color, or null to indicate that the ! * color shall be derived from the background of the component whose ! * border is being painted. ! */ ! protected Color shadowOuter; ! ! ! /** ! * The inner shadow color, or null to indicate that the ! * color shall be derived from the background of the component whose ! * border is being painted. ! */ ! protected Color shadowInner; ! ! ! /** ! * Constructs a BevelBorder whose colors will be derived from the ! * background of the enclosed component. The background color is ! * retrieved each time the border is painted, so a BevelBorder ! * constructed by this method will automatically reflect a change ! * to the component’s background color. ! * ! *

                [An illustration showing raised and lowered BevelBorders] ! * ! * @param bevelType the desired appearance of the border. The value ! * must be either {@link #RAISED} or {@link #LOWERED}. ! * ! * @throws IllegalArgumentException if bevelType has ! * an unsupported value. ! */ ! public BevelBorder(int bevelType) ! { ! if ((bevelType != RAISED) && (bevelType != LOWERED)) ! throw new IllegalArgumentException(); ! ! this.bevelType = bevelType; ! } ! ! ! /** ! * Constructs a BevelBorder given its appearance type and two colors ! * for its highlight and shadow. ! * ! *

                [An illustration showing BevelBorders that were constructed
!    * with this method] ! * ! * @param bevelType the desired appearance of the border. The value ! * must be either {@link #RAISED} or {@link #LOWERED}. ! * ! * @param highlight the color that will be used for the inner ! * side of the highlighted edges (top and left if ! * if bevelType is {@link #RAISED}; bottom ! * and right otherwise). The color for the outer side ! * is a brightened version of this color. ! * ! * @param shadow the color that will be used for the outer ! * side of the shadowed edges (bottom and right ! * if bevelType is {@link #RAISED}; top ! * and left otherwise). The color for the inner side ! * is a brightened version of this color. ! * ! * @throws IllegalArgumentException if bevelType has ! * an unsupported value. ! * ! * @throws NullPointerException if highlight or ! * shadow is null. ! * ! * @see java.awt.Color.brighter() ! */ ! public BevelBorder(int bevelType, Color highlight, Color shadow) ! { ! this(bevelType, ! /* highlightOuter */ highlight.brighter(), ! /* highlightInner */ highlight, ! /* shadowOuter */ shadow, ! /* shadowInner */ shadow.brighter()); ! } ! ! ! /** ! * Constructs a BevelBorder given its appearance type and all ! * colors. ! * ! *

                [An illustration showing BevelBorders that were constructed
!    * with this method] ! * ! * @param bevelType the desired appearance of the border. The value ! * must be either {@link #RAISED} or {@link #LOWERED}. ! * ! * @param highlightOuter the color that will be used for the outer ! * side of the highlighted edges (top and left if ! * bevelType is {@link #RAISED}; bottom and ! * right otherwise). ! * ! * @param highlightInner the color that will be used for the inner ! * side of the highlighted edges. ! * ! * @param shadowOuter the color that will be used for the outer ! * side of the shadowed edges (bottom and right ! * if bevelType is {@link #RAISED}; top ! * and left otherwise). ! * ! * @param shadowInner the color that will be used for the inner ! * side of the shadowed edges. ! * ! * @throws IllegalArgumentException if bevelType has ! * an unsupported value. ! * ! * @throws NullPointerException if one of the passed colors ! * is null. ! */ ! public BevelBorder(int bevelType, ! Color highlightOuter, Color highlightInner, ! Color shadowOuter, Color shadowInner) ! { ! this(bevelType); // checks the validity of bevelType ! ! if ((highlightOuter == null) || (highlightInner == null) ! || (shadowOuter == null) || (shadowInner == null)) ! throw new NullPointerException(); ! ! this.highlightOuter = highlightOuter; ! this.highlightInner = highlightInner; ! this.shadowOuter = shadowOuter; ! this.shadowInner = shadowInner; ! } ! ! ! /** ! * Paints the border for a given component. ! * ! * @param c the component whose border is to be painted. ! * @param g the graphics for painting. ! * @param x the horizontal position for painting the border. ! * @param y the vertical position for painting the border. ! * @param width the width of the available area for painting the border. ! * @param height the height of the available area for painting the border. ! */ ! public void paintBorder(Component c, Graphics g, ! int x, int y, int width, int height) ! { ! switch (bevelType) { ! case RAISED: ! paintRaisedBevel(c, g, x, y, width, height); ! break; ! ! case LOWERED: ! paintLoweredBevel(c, g, x, y, width, height); ! break; } + } ! ! /** ! * Measures the width of this border. ! * ! * @param c the component whose border is to be measured. ! * ! * @return an Insets object whose left, right, ! * top and bottom fields indicate the ! * width of the border at the respective edge. ! * ! * @see #getBorderInsets(java.awt.Component, java.awt.Insets) ! */ ! public Insets getBorderInsets(Component c) ! { ! return new Insets(2, 2, 2, 2); ! } ! ! ! /** ! * Measures the width of this border, storing the results into a ! * pre-existing Insets object. ! * ! * @param insets an Insets object for holding the result values. ! * After invoking this method, the left, ! * right, top and ! * bottom fields indicate the width of the ! * border at the respective edge. ! * ! * @return the same object that was passed for insets. ! * ! * @see #getBorderInsets() ! */ ! public Insets getBorderInsets(Component c, Insets insets) ! { ! insets.left = insets.right = insets.top = insets.bottom = 2; ! return insets; ! } ! ! ! /** ! * Determines the color that will be used for the outer side of ! * highlighted edges when painting the border. If a highlight color ! * has been specified upon constructing the border, that color is ! * returned. Otherwise, the inner highlight color is brightened. ! * ! * @param c the component enclosed by this border. ! * ! * @see #getHighlightInnerColor(java.awt.Component) ! * @see java.awt.Color#brighter() ! */ ! public Color getHighlightOuterColor(Component c) ! { ! if (highlightOuter != null) ! return highlightOuter; ! else ! return getHighlightInnerColor(c).brighter(); ! } ! ! ! /** ! * Determines the color that will be used for the inner side of ! * highlighted edges when painting the border. If a highlight color ! * has been specified upon constructing the border, that color is ! * returned. Otherwise, the background color of the enclosed ! * component is brightened. ! * ! * @param c the component enclosed by this border. ! * ! * @see java.awt.Component#getBackground() ! * @see java.awt.Color#brighter() ! */ ! public Color getHighlightInnerColor(Component c) ! { ! if (highlightInner != null) ! return highlightInner; ! else ! return c.getBackground().brighter(); ! } ! ! ! /** ! * Determines the color that will be used for the inner side of ! * shadowed edges when painting the border. If a shadow color has ! * been specified upon constructing the border, that color is ! * returned. Otherwise, the background color of the enclosed ! * component is darkened. ! * ! * @param c the component enclosed by this border. ! * ! * @see java.awt.Component#getBackground() ! * @see java.awt.Color#darker() ! */ ! public Color getShadowInnerColor(Component c) ! { ! if (shadowInner != null) ! return shadowInner; ! else ! return c.getBackground().darker(); ! } ! ! ! /** ! * Determines the color that will be used for the outer side of ! * shadowed edges when painting the border. If a shadow color ! * has been specified upon constructing the border, that color is ! * returned. Otherwise, the inner shadow color is darkened. ! * ! * @param c the component enclosed by this border. ! * ! * @see #getShadowInnerColor(java.awt.Component) ! * @see java.awt.Color#darker() ! */ ! public Color getShadowOuterColor(Component c) ! { ! if (shadowOuter != null) ! return shadowOuter; ! else ! return getShadowInnerColor(c).darker(); ! } ! ! ! /** ! * Returns the color that will be used for the outer side of ! * highlighted edges when painting the border, or null ! * if that color will be derived from the background of the enclosed ! * Component. ! */ ! public Color getHighlightOuterColor() ! { ! return highlightOuter; ! } ! ! ! /** ! * Returns the color that will be used for the inner side of ! * highlighted edges when painting the border, or null ! * if that color will be derived from the background of the enclosed ! * Component. ! */ ! public Color getHighlightInnerColor() ! { ! return highlightInner; ! } ! ! ! /** ! * Returns the color that will be used for the inner side of ! * shadowed edges when painting the border, or null if ! * that color will be derived from the background of the enclosed ! * Component. ! */ ! public Color getShadowInnerColor() ! { ! return shadowInner; ! } ! ! ! /** ! * Returns the color that will be used for the outer side of ! * shadowed edges when painting the border, or null if ! * that color will be derived from the background of the enclosed ! * Component. ! */ ! public Color getShadowOuterColor() ! { ! return shadowOuter; ! } ! ! ! /** ! * Returns the appearance of this border, which is either {@link ! * #RAISED} or {@link #LOWERED}. ! */ ! public int getBevelType() ! { ! return bevelType; ! } ! ! ! /** ! * Determines whether this border fills every pixel in its area ! * when painting. ! * ! *

                If the border colors are derived from the background color of ! * the enclosed component, the result is true because ! * the derivation method always returns opaque colors. Otherwise, ! * the result depends on the opacity of the individual colors. ! * ! * @return true if the border is fully opaque, or ! * false if some pixels of the background ! * can shine through the border. ! */ ! public boolean isBorderOpaque() ! { ! /* If the colors are to be drived from the enclosed Component's ! * background color, the border is guaranteed to be fully opaque ! * because Color.brighten() and Color.darken() always return an ! * opaque color. ! */ ! return ! ((highlightOuter == null) || (highlightOuter.getAlpha() == 255)) ! && ((highlightInner == null) || (highlightInner.getAlpha() == 255)) ! && ((shadowInner == null) || (shadowInner.getAlpha() == 255)) ! && ((shadowOuter == null) ||(shadowOuter.getAlpha() == 255)); ! } ! ! ! /** ! * Paints a raised bevel border around a component. ! * ! * @param c the component whose border is to be painted. ! * @param g the graphics for painting. ! * @param x the horizontal position for painting the border. ! * @param y the vertical position for painting the border. ! * @param width the width of the available area for painting the border. ! * @param height the height of the available area for painting the border. ! */ ! protected void paintRaisedBevel(Component c, Graphics g, ! int x, int y, int width, int height) ! { ! paintBevel(g, x, y, width, height, ! getHighlightOuterColor(c), getHighlightInnerColor(c), ! getShadowInnerColor(c), getShadowOuterColor(c)); ! } ! ! ! /** ! * Paints a lowered bevel border around a component. ! * ! * @param c the component whose border is to be painted. ! * @param g the graphics for painting. ! * @param x the horizontal position for painting the border. ! * @param y the vertical position for painting the border. ! * @param width the width of the available area for painting the border. ! * @param height the height of the available area for painting the border. ! */ ! protected void paintLoweredBevel(Component c, Graphics g, ! int x, int y, int width, int height) ! { ! paintBevel(g, x, y, width, height, ! getShadowInnerColor(c), getShadowOuterColor(c), ! getHighlightInnerColor(c), getHighlightOuterColor(c)); ! } ! ! ! /** ! * Paints a two-pixel bevel in four colors. ! * ! *

                !    * @@@@@@@@@@@@
                !    * @..........#    @ = color a
                !    * @.        X#    . = color b
                !    * @.        X#    X = color c
                !    * @.XXXXXXXXX#    # = color d
                !    * ############
                ! * ! * @param g the graphics for painting. ! * @param x the horizontal position for painting the border. ! * @param y the vertical position for painting the border. ! * @param width the width of the available area for painting the border. ! * @param height the height of the available area for painting the border. ! * @param a the color for the outer side of the top and left edges. ! * @param b the color for the inner side of the top and left edges. ! * @param c the color for the inner side of the bottom and right edges. ! * @param d the color for the outer side of the bottom and right edges. ! */ ! private static void paintBevel(Graphics g, ! int x, int y, int width, int height, ! Color a, Color b, Color c, Color d) ! { ! Color oldColor; ! ! oldColor = g.getColor(); ! g.translate(x, y); ! width = width - 1; ! height = height - 1; ! ! try { ! /* To understand this code, it might be helpful to look at the ! * images that are included with the JavaDoc. They are located ! * in the "doc-files" subdirectory. ! */ ! g.setColor(a); ! g.drawLine(0, 0, width, 0); // a, horizontal ! g.drawLine(0, 1, 0, height); // a, vertical ! ! g.setColor(b); ! g.drawLine(1, 1, width - 1, 1); // b, horizontal ! g.drawLine(1, 2, 1, height - 1); // b, vertical ! ! g.setColor(c); ! g.drawLine(2, height - 1, width - 1, height - 1); // c, horizontal ! g.drawLine(width - 1, 2, width - 1, height - 2); // c, vertical ! ! g.setColor(d); ! g.drawLine(1, height, width, height); // d, horizontal ! g.drawLine(width, 1, width, height - 1); // d, vertical } ! finally { + g.translate(-x, -y); + g.setColor(oldColor); } + } } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/border/Border.java gcc-3.4.0/libjava/javax/swing/border/Border.java *** gcc-3.3.3/libjava/javax/swing/border/Border.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/border/Border.java 2003-10-12 13:20:49.000000000 +0000 *************** *** 1,5 **** /* Border.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Border.java -- ! Copyright (C) 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,52 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.border; ! import java.awt.*; public interface Border { ! public Insets getBorderInsets(Component c); ! public boolean isBorderOpaque(); ! public void paintBorder(Component c, ! Graphics g, ! int x, ! int y, ! int width, ! int height); } --- 35,105 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.border; ! import java.awt.Component; ! import java.awt.Graphics; ! import java.awt.Insets; ! + /** + * An public interface for decorative or spacing borders around a Component. + * + *

                To reduce memory consumption, several Components may share a + * single Border instance. {@link javax.swing.BorderFactory} is a + * factory class for producing commonly used shared borders. + * + * @see javax.swing.BorderFactory + * @see EmptyBorder + * @see CompoundBorder + * @see BevelBorder + * @see EtchedBorder + * @see LineBorder + * @see MatteBorder + * @see SoftBevelBorder + * @see TitledBorder + * @see AbstractBorder + * + * @author Ronald Veldema (rveldema@cs.vu.nl) + * @author Michael Koch (konqueror@gmx.de) + * @author Sascha Brawer (brawer@dandelis.ch) + */ public interface Border { ! /** ! * Paints the border for a given component. ! * ! * @param c the component whose border is to be painted. ! * @param g the graphics for painting. ! * @param x the horizontal position for painting the border. ! * @param y the vertical position for painting the border. ! * @param width the width of the available area for painting the border. ! * @param height the height of the available area for painting the border. ! */ ! void paintBorder(Component c, Graphics g, ! int x, int y, int width, int height); ! ! ! /** ! * Measures the width of this border. ! * ! * @param c the component whose border is to be measured. ! * ! * @return an Insets object whose left, right, ! * top and bottom fields indicate the ! * width of the border at the respective edge. ! */ ! Insets getBorderInsets(Component c); ! ! ! /** ! * Determines whether this border fills every pixel in its area ! * when painting. ! * ! * @return true if the border is fully opaque, or ! * false if some pixels of the background ! * can shine through the border. ! */ ! boolean isBorderOpaque(); } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/border/CompoundBorder.java gcc-3.4.0/libjava/javax/swing/border/CompoundBorder.java *** gcc-3.3.3/libjava/javax/swing/border/CompoundBorder.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/border/CompoundBorder.java 2003-06-19 10:48:45.000000000 +0000 *************** *** 1,5 **** /* CompoundBorder.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* CompoundBorder.java -- ! Copyright (C) 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,70 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.border; ! import java.awt.*; ! public class CompoundBorder extends AbstractBorder { ! public Insets getBorderInsets(Component c, ! Insets s) { ! if (s == null) ! s = new Insets(0,0,0,0); ! ! s.left = s.right = s.top = s.bottom = 5; ! ! return s; } ! ! public boolean isBorderOpaque() { ! return false; } ! ! public void paintBorder(Component c, ! Graphics g, ! int x, ! int y, ! int width, ! int height) { } } --- 35,257 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.border; ! import java.awt.Component; ! import java.awt.Graphics; ! import java.awt.Insets; ! /** ! * A Border that is composed of an interior and an exterior border, ! * where the interior border is tightly nested into the exterior. ! * ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ ! public class CompoundBorder ! extends AbstractBorder { + /** + * Determined using the serialver tool + * of Apple/Sun JDK 1.3.1 on MacOS X 10.1.5. + */ + static final long serialVersionUID = 9054540377030555103L; + + + /** + * The inside border, which is painted between the bordered + * Component and the outside border. It is valid for + * insideBorder to be null. + */ + protected Border insideBorder; + + + /** + * The outside border, which is painted outside both the + * bordered Component and the inside border. It is valid for + * outsideBorder to be null. + */ + protected Border outsideBorder; + + + /** + * Constructs a CompoundBorder whose inside and outside borders + * are both null. While this does not really make + * any sense (there exists a class EmptyBorder as well, and not + * every Component needs to have a border at all), the API + * specification requires the existence of this constructor. + * + * @see EmptyBorder + */ + public CompoundBorder () + { + this (null, null); + } + + + /** + * Constructs a CompoundBorder with the specified inside and + * outside borders. + * + * @param outsideBorder the outside border, which is painted to the + * outside of both insideBorder and the enclosed + * component. It is acceptable to pass null, in + * which case no outside border is painted. + * + * @param insideBorder the inside border, which is painted to + * between outsideBorder and the enclosed + * component. It is acceptable to pass null, in + * which case no inside border is painted. + */ + public CompoundBorder (Border outsideBorder, Border insideBorder) + { + this.outsideBorder = outsideBorder; + this.insideBorder = insideBorder; + } + + + /** + * Determines whether or not this border is opaque. An opaque + * border fills every pixel in its area when painting. Partially + * translucent borders must return false, or ugly + * artifacts can appear on screen. + * + * @return true if both the inside and outside borders + * are opaque, or false otherwise. + */ + public boolean isBorderOpaque () + { + /* While it would be safe to assume true for the opacity of + * a null border, this behavior would not be according to + * the API specification. Also, it is pathological to have + * null borders anyway. + */ + if ((insideBorder == null) || (outsideBorder == null)) + return false; + + return insideBorder.isBorderOpaque() + && outsideBorder.isBorderOpaque(); + } ! ! /** ! * Paints the compound border by first painting the outside border, ! * then painting the inside border tightly nested into the outside. ! * ! * @param c the component whose border is to be painted. ! * @param g the graphics for painting. ! * @param x the horizontal position for painting the border. ! * @param y the vertical position for painting the border. ! * @param width the width of the available area for painting the border. ! * @param height the height of the available area for painting the border. ! */ ! public void paintBorder(Component c, Graphics g, ! int x, int y, int width, int height) ! { ! /* If there is an outside border, paint it and reduce the ! * bounding box by its insets. ! */ ! if (outsideBorder != null) { ! Insets outsideInsets; ! ! outsideBorder.paintBorder(c, g, x, y, width, height); ! outsideInsets = outsideBorder.getBorderInsets(c); ! ! x += outsideInsets.left; ! y += outsideInsets.top; ! ! /* Reduce width and height by the respective extent of the ! * outside border. ! */ ! width -= outsideInsets.left + outsideInsets.right; ! height -= outsideInsets.top + outsideInsets.bottom; } ! ! if (insideBorder != null) ! insideBorder.paintBorder(c, g, x, y, width, height); ! } ! ! ! /** ! * Changes the specified insets to the insets of this border, ! * which is the sum of the insets of the inside and the outside ! * border. ! * ! * @param c the component in the center of this border. ! * @param insets an Insets object for holding the added insets. ! * ! * @return the insets object. ! */ ! public Insets getBorderInsets(Component c, Insets insets) ! { ! Insets borderInsets; ! ! if (insets == null) ! insets = new Insets (0,0,0,0); ! else ! insets.left = insets.right = insets.top = insets.bottom = 0; ! ! /* If there is an outside border, add it to insets. */ ! if (outsideBorder != null) { ! borderInsets = outsideBorder.getBorderInsets(c); ! insets.left += borderInsets.left; ! insets.right += borderInsets.right; ! insets.top += borderInsets.top; ! insets.bottom += borderInsets.bottom; } ! ! /* If there is an inside border, add it to insets. */ ! if (insideBorder != null) { + borderInsets = insideBorder.getBorderInsets(c); + insets.left += borderInsets.left; + insets.right += borderInsets.right; + insets.top += borderInsets.top; + insets.bottom += borderInsets.bottom; } + + return insets; + } + + + /** + * Determines the insets of this border, which is the sum of the + * insets of the inside and the outside border. + * + * @param c the component in the center of this border. + */ + public Insets getBorderInsets (Component c) + { + /* It is not clear why CompoundBorder does not simply inherit + * the implementation from AbstractBorder. However, we want + * to be compatible with the API specification, which overrides + * the getBorderInsets(Component) method. + */ + return getBorderInsets (c, null); + } + + + /** + * Returns the outside border, which is painted outside both the + * bordered Component and the inside border. It is valid for the + * result to be null. + */ + public Border getOutsideBorder () + { + return outsideBorder; + } + + + /** + * Returns the inside border, which is painted between the bordered + * Component and the outside border. It is valid for the result to + * be null. + */ + public Border getInsideBorder () + { + return insideBorder; + } } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/border/doc-files/BevelBorder-1.png gcc-3.4.0/libjava/javax/swing/border/doc-files/BevelBorder-1.png *** gcc-3.3.3/libjava/javax/swing/border/doc-files/BevelBorder-1.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/border/doc-files/BevelBorder-1.png 2003-06-19 10:48:46.000000000 +0000 *************** *** 0 **** --- 1,22 ---- + ‰PNG +  + IHDRô–§ÿí8gAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ {wr«·IDATxœí݈åÇñ½‘`Ë媠õT°¡hb*JLÎVK±˜HSúO«‰Vÿ=C±Ps‡K±\Žþåp þUÚ4 + £p'ž¨m£‰¤bQ¸(Ñ5Z‚H„ë‡ùÔ‡'³?²w·{³óìûEXfŸ{föÙyžùÎ3ÏÌ>é™™™©Òòµ¢ h=‚;$ˆà "¸@‚î ‚;$ˆà "¸@‚î ~¡ + $¬§§§è"Ì1jn]íUêà˜ÀÉ©( Ë@‚è¹]á®-¯ÄoŸxäÚÎOñ‚:量ø( + =wHÁDp€Ü AÜ©RVö»‘~²Ô_¡(E>-“»9ŽÙ + t *wþZ[¿ö$LóOË`n–€Ü AwHÁTätî¹ÍS'ßq¢rç¯%õËÓ2]‹¹e€®ð£Ÿý>~ûÌŸ~ݾž–é Ë@‚î ‚;$ˆà âi™ëä;NTîüñ´L…§eæ§e€Öh&xλúûwÆo_}qG«Rþ~ò´ºæœ–ÍcÓð á î@Ë4ŽÝD+,$ÆÜuêÔ©£G] + ”U){îwߟNèñ‡›Î{÷í©¢‹07×V—ü’ËVÏj'ŽOøþ?ðæ‡ï~ò·onß¾}pp°u%D)ep—©§‹.A+<5rçªëï.ºè£÷ß(ºs‘+öcûwœñäýßOÿíP®×Þ;üå—_ĽñÆ[_Jt‡²wyã@¹û¼¥íŸ.2žöâ2/_ÕèúR=ôW&þ €þùÉÿÔËsÑE-_¾¼Ue{õÅmJ¹æœügUß]˜[ + æ£ÄÁ(¯%ç-ë¿üú÷¦ÿÖ ÏÒ¥K9¢×–|b«ž`ùói›Ý¼¡ÂÓ2‰ª@1®X±þÆŸþnÑ¢³ëe˜ššZ–¹ãŽ;vïÞ}ìر…,ÊŽàæâK¿÷“_<¶øœo6È£ÎûØØ؆ .¸à‚«®ºêÞ{ïÝ·oßgŸ}¶`…DIÜ"wÁ·Ü¶£·ïâf2¿þúë>úèÍ7ßÜÛÛ{à 7<øàƒí.!JŠ1w eª‡‰¯ibàø½ßºå¶'ŸÝý›Ž + ‰ + úW_y‰b÷©S§j®5‘y衇/^<00°zõjý+¯¼r>åGJJ9·ÌÝ÷_;õt + OË|ôþóy&¤“ï8Íçwöóß3`ùªkWÿx¿cøòË/žÿëÐô¿þßÿÁ­<÷—û>ÿüó^xarrrÿþý8ãFÎ=÷ܵk×Þ”ñXæ–éZôÜŽ°hÑÙ + è/?7røÔÛ /¹Z¯ê•;RoÛ¶íã?žššzöÙgèßzë­šQžÝ™Jö$¥“?vìØùçŸÏÓ2݆àtë~¸ùëK.|ûðÓg/îÍýI½òu-=ztbbbß¾} + ÷õ¦(PúØؘÙÛ]lt ‚;ÐY¾óÝŸ_úí3ü0U½ò_f´¬^¼¢¼b½½zî RF”O˧ñÑ9—_~ùàààøøøñãÇ_zé¥mÛ¶ÝtÓMguVûŠ‡R ¸é¸îºë¶lÙòÌ3Ïœ-Sÿ‰©ÂÓ2óÀ˜;ÐxZ¦Û0, "¸@‚î ‚;$ˆª@WhÕÿŽ´yC~ËüOL‰àtž–é6 Ë@‚î ‚;$ˆà â†*ÐxZ¦ÛÜ®ÀÓ2݆aHÁDp€Ü AÜPºOËtzî zî@âüߢÛÜ”…ÿZšßmî@WQ]‚1wHÁDp€Ü AwHÁDp€Ü AwHÁDp€Ü AwHÁDp€•x>÷wßž*ºh£å«ø5¹+kpjä΢‹€6zlÿŽ¢‹”[)ƒû㿲êú»‹.Úå’ËV«Š‹.PnŒ¹@‚î ‚;$ˆà "¸@‚î ‚;$ˆà "¸@‚î ‚;$ˆà "¸@‚J9+$€®u$³dÉ’+V]–ŽÖ333St )›7oÞ¾}»—×®]»gÏEùb‹TÏÐÐÐÚLQ ç`îÚÒö©öŸx¤öµsçNEö‘‘‘{î¹çàÁƒ·ÞzëÄÄD»Ë37ÃÃÕì TTsP£££Š•ŠìZ^±bÅØØØš5k´ì@ßÓÓÓ×קþ²3ë­Bÿ²eË´ þ¾3¬\¹òÈ‘#“““ZÞ´iS_Fç å?qâ„Rz2ZÐ[%j-­âuõêDmMkyûNÉ}–W¬dñ=”gáÜ”ƒ‚¸£¹­_¿Þ¡ÓAV]ø­[·*ž:XW²ÑytPݺuêòk á¯ZÞ³g6¢P®eåñññ=-8F;Ûí·ß®uuJÐv|õ R6¯²)ÏÆõWåÔ²7fdßÔ@pPbŠª + ⊶îÔ+”ïÝ»×R@W¢^µ|O&^Ñ«8 + gˆ×g´ ·Î¦¥h¹^—\é:…¬\¹²’õúÇÆÆêm_%Ù¹sgQ÷TyÎÀ,ø(¤Õü“Á›üe“z÷“‰WÑŸ*M<¿¨ÏÒ'jÅŽ}ʾBÏ@¹,ÍädçðDyõ™ É”âDZŒ¹è. + Í궗"@Ï=wÝenÝüÒ¡ç "¸É¿„.ða)4‰šBé܇††ü(Òü dI%›Ù§’=ýZYûÚa^:}®ŽÀééi¿Ý»wï’%Kâ]’ØÎŒVôð + îkÖ¬ñ3ÊÊž + ظq£Ù<::ªÌþíF»¿W±ô•ýu<‡¯¿ðT§:a»¦töUý*elllݺuá‡3ªeŸÔý„\˜ÿ$.vxfN•ëöà™ª¼µ8=Ç­K n]; ":MñÃ2þõúDîb+Òyr5u…|¨„®Þ*]±2—'lÊ÷Iü‹5/ë€ Ź_¬Õ›œé­yk¿¢>\¹k#*çàà RâBZ|¯àØá·*sØ`îýýýNñÖaöŒŽâN®÷ª¿`n¯†*¨d¿ Ô²ëíyŸÀ¼[üõÝGv;q¯Ö)¹ ù”¨”žlŽÀø²inßÈ•èbèUËJñoýlµÊ㓱\ÑáÇ¡ÖÜZ©²)1´„ž›ÜoÕH¶nݪèòÎ{uSKpû Ñ ^|кJQÛpO é™ '3nBþ“Z©7¢W·Xgˆ›_XA,œããY”⃻§sSËÖNWmi_«)‡½êðݵk—¤ËÓ`ã^Ý¡ÐýhxÚû + Äž×M[«7Ó[%«Ñ¡ÓU¼†?©+&rƒÐ[)•<·J蓺yU¢Nz|…^óKiTŸ-:A¼Wµ«÷ªOWÏ?ÿ|%«MÕ…M^sÏWSþpbÓ«ßV²:ÉlÏh#JÑbi9W›güF•ÓŸ}ö²Òý}СC‡Vd”¨¯gU†Õ~üÑ.§ÎNåj̧‡Î¬ú“kczÕNVKP4P$ÑrC*Ù„‘a]·.]'ù¨×ZÞN¼}5HwÈ´¢7¢W‡¦ÆÓ¦ÜSñ‡ªm¸H-ßÍ+~XFG v„oí‡9õwÔÐ|:U]º¯¤eõ_|¬æò4ؾV÷ìÌ^݉:N…u4êø×_s3½…_«RŒ‚êI'œÁ³R„KrEÿʯ 殸ÝnàT*фјxX¦\šÙ«>U;Q•®Óa½=_Snu'úçã•ì„¡Ý® Ú½>h}f õ®@ÜÂà¨OñÕÆT$-ÇÁºrú°L¨SåtƒÉýÌ2–)p*Á—kc + ©ÓÓӊȪw€ŽŽ*úkÊjiú«/|ÝñŠ#OؾÕ–<áŒ3èµM­Òà¨tÅy˜Î7ÞõA¾\+ðYñÁ=77[ ð­ýî_£é¯ÚÝ:Št䇩8ã< ¶ïùšÃêñ‡V²éßrù×dÂÛxlĪ?. ƒê¢Oì v—3ô¾õ6>+x ÖåQSPoÝ'ƒÊWÃ2õ¾ŽÏR9]3{UÁÎýkŸö|<äò4à3}X=÷qÕ­H×—Þ69«”…ñ–P#îI8ÝÃîª>é,âå°º‡eª·éã!G_LTšxøÚ—,Éßki,×Æ<‘€N¢á–Uœ-÷[V%ªg]oF°xÅx¦É8e¶å,vr‚â‡e|’ÔA¢á^êÃÍ=t™UyžFÙ׿5óÔ£ÍÆ«;Ñã> ½Íz3½éØ8]ƒ®_¨KŸ®uöžÈè£s£äú¾¹M…Vèa\ T*§h-£Æߺñ^õ€rõ^õÞ³îÍjŽ½Jvªvg<>D=™_þö6µAí%5ø‚Úÿ#O¬æ·¼«UYŽézÕ²R\Ѿ>в›–/>âþ]¨µš×—¹#ߧí D¿õ17#yʵ1ïUuœU®hã[”Myô'7‹ù?ÃËq‡&¿†öæOov\€xÊÉÂÌÇÝÏp0¨«Ä¸ù*ƒs¾öÚk•¬ + ý¶:o:…-çÞ*ÈÆ[sg<œZµñO>ù$tˆ|57«¯Þ:ôhk1!]Öfãüξ…–•Rý „¿Eœ¢í7_¼…Ôü^õ5¬2Ìdû¡:O\YÕo]ûÚWá¯ñȆ6¨-‡3¥tÙÞäW¨¾Ê•Ð5¢”°Š/³BI÷ãbWo-×2}ýáô\fÿ¿BqŠ6tQ~ußËíþWۘÄtt!W·(”j7zÈ%ô“Ü ‹ÛUd´ìĸ¥¹Bã*7Œ8[ÜzR‘Á=Ð@-çRª5“'ð¹!dv8˜ÆG‹²åRÚÍßÂa. sÛ«³Úó:,u‡·>x¼'ãl>\gUøfÕÞÐV¹6V]õ3gjQZEmÆǃxÍc°f¥7Ù j–juDpo«ð[œ¿E‰¸CÔ _4#¾TŠ¯·R’þ|î#‹ëÒÙ%}"¥Ëy<7wÍ9`Æn<éwèBÅ?-h9‚;$ˆà "¸@‚î ‚;$ˆà "¸@‚î ‚;$ˆà "¸@‚î ‚;$ˆà "¸@‚î ‚;$ˆà "¸@‚î ÿtÚ¹íQÓ[IEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/border/doc-files/BevelBorder-2.png gcc-3.4.0/libjava/javax/swing/border/doc-files/BevelBorder-2.png *** gcc-3.3.3/libjava/javax/swing/border/doc-files/BevelBorder-2.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/border/doc-files/BevelBorder-2.png 2003-06-19 10:48:46.000000000 +0000 *************** *** 0 **** --- 1,14 ---- + ‰PNG +  + IHDRô–§ÿí8gAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ -$˜¨…ò ²IDATxœíÝ¿RÜJÆaÍÖæÀØ\LmpBL¶På6† OD'â 0ù©²ÍlÂlW`¸ã+`ßÒ[þ¶‘èïÖÖV™¸¿¿ÿ®ÖÎ{{«I”ÿíÛ·‘ø©¦©b`ôeuuî:ã´ÖH¼¼¼Tš_é± + èJôXM;Ö²Vkã¯øPrÐ1.qGi}eeÅóûû{·•~~~…n¥Uu1|~~>棩4mcž¾Ä´å²4à±~xñíü9w]r}}½½½­•¾?~ü¨˜ëbøòò²ÊÔ + ¾PŠzTÔ(¿š/..4IÌÊEøýý}kçQQ]jÀ±»±,Í\cõóæææµ7{| î­W:¼A}5ƒ÷Í”—x·ù:KAÛKéW}ƒª¢÷çÏŸd\¦vºŠêŠÅ÷Š×Žøvxx¨`= \~oSfM¥i5ÛÅÅŧ–¥Ùº¢F3|Á-œ‰wZËL­er£µLp LY»b®0q¬â|9ÉÜÜÜSóÔ´›››ž­Šíß]V'ðB@Ä*_Çß±¦õ›UÒUüŸøºMÁ@ëëëŠÑ«««ÇÇÇcM»³³£ûA¿öÝÌŠþƒÁàGWóõðB@g¸òÄööö\ ãùùù««+·–Q6¿U¸×Xê£v¾=°»»ë7®J‰À=tY'''ZDÙj~fÜtFÙ1þùÈ···‹‹‹*¿/--©äîÚsýlÑt²= ;Áùù¹Ê裏§*˜+”?µ,…õ§þéiÖðmI¨è­°~¯¬H]¾}ž»Ú}mmMù—\ÍW·e’ µLn´–Á¸x¡ + Ü !‚;$Dp€„h-` Wè/a¬×òã~u}èÞSzíoË´›[ÌxÊÔWà‡S¦ÕZ¦}ÐIy‰Z˘¿ä5Vp÷gÂî0CTîV€Vh.zã ïþ°»?Þ»¾¾^Ÿz/czd‹ £S'/eww×yºòK%‚;€ÎX]]½¾¾öÛ/..ÎÎΪÖW×5ÖŸíu¶½½=…æøÔ{|L?ûýþüü¼Â½²)Žjž777 + îž¡”ßß|ŸÚ6ÿ(^¨è Ï…Ö—––œè¯®_]]9ƒÊÚ;;;ŠòÊ£h~yy©¢·b´~*Q£<•?.¦©”¨ÀÑÑ‘&\[[»®Uõ½AŽõÓÙÚŸCpЊÂþ|£JÖ_¿~ubã«ë¸»»SQ]Ùü‘÷ƧÞÍOžÊ‰Jq7{çç皧Æ*²+Qÿõ¶prh-` Sl- ]TÄ>==UY[…nwÊáÎóz½ž¢¿âõ`0PY^Ú/ŠÎ‘âõ”_sÐ}B‰U]¯DgÐLÖݽª¿#¦Òý蟩™/ÛZ¦Ý”¢s)S_ ¦T?­ÝZfH› R¦•’ÂôñññÅÅ…‚µ ãÏ´xñÄ\___×=`ccCƧÞ777Ó•è¯HFûeVÉ]9ÐuKhôÍÔ!¼PÐ Š³*q+_^^zXá¸ýÕu¹»»SX×(•¾ý‘H—ñonnNNN4êm-涳³_‚԰½ÂǷ່à 3TˆVt.S†~u½Ýµ&tÓšª.›{ Z@–ÊÄ.6’ wcà«Î]AkHˆÖ2%wHˆà Ü !‚;$Dp€„îÁ"¸@BwHˆà ܧéöööÓ§Oþ25fG + 3Í྿¿ßëõ&2«Õš.¿^‹'²ˆ¡¼ aqq1ºß•óós%ƒF~ooo+¿V[Ýo{ýýÅÑÆ"܉û¬ñ!˜È¬¼á}k™ÿS†ž÷÷÷>FñW)Jï÷ûÞ^ýÔTúéü >â5wfým$znt¯Fclll830ŠTŸü]^^vo[¾ºüMçWèEÅ õruºã.¹¸¸˜ŸŸWˆo]úCM¾{÷Î]|­¬¬¸[eŽuŽŽ¶¶¶Ü)Áññ±2+½£öŽN›ìmTà‹Í}:¦ºaûHéî«ã«”“““èÓGcu”}S×_Å_ÊØ„XíèáS×çƒrêPznezƒÏ.=4ø슓 øŽ‡éÙÛÛÓ + ¸÷Š¢DèŽh:ׯ®®¾|ù¢«By4ʽ›Ÿ5òh”¿¯sŽŸš¼ªûgÑ°¯ + M®Qš0zËUÕ"|ù­¯¯;eôMú3]Õ=¬72xÀ›ìuÓ-Ák‰!6Áb‡Ì”Æ^Õæ<´öjr Sb{Ï7¶7~º³ïï@ïdMèóÁ»E‰îaÜÕ8šÏŸ2Ò}6ê¯{ÿñŠ9L7V»±—†ž¨ô¡ë{lô-¯lúuî*¿èªÐu¨R‰Š'*Ëè,ýՅꪕÓÓS÷gØÈóÌÌ=¹JÐÕ·r´/{÷h®`¡ÍMe磣#]KN)+R´èýÇÚ¯1JE¹è¬Köª7Š;ZóÆ$Q&ÕS¼ëd¢^>¡Ý(í²ògv”{Uû°½WÝMåååeUMwVùÔžoS~Á8šþYÕÇè°vTÓL”¢:¥¬ÅÒpãh~w‹ªoË<¬t-] º¹¹Y®)Q›Vf>88hWêüñ¢½ž;;;N/+冮˜ŸçfóÐcM¿ZFW .]Þ + Óso޼щ®(ð©¦x¡kR÷ ë9××j#Ï3ó×äšmLîD]'ŽÂºuý»—Ew§ëþÑ£+/]ŠF!úè + Îp_‹GrE_ÿʯ6ž¸}srÿ뮢‰Ú˜²Z¦[FÙ«¾U;Q]·Ã§öüPɨÃꃢý©Ý® Ú½‚¾³ÆqW ž`pÔR”ñfH“è¹Í^ùçߣø‘%ý»LÊôƒ».T÷t‘èäV©ÇåqytÆ«€ã2—þêÊQº. ׊´óµ4óò«Š£s+Ô¸ù¶?ËsµªÏ + _)Ïïàÿ¦XßïâgœÄ*Æ>Ô¯àbÝâ}”_^é¡Õ?ÛyžzOe~ssa<žüÚ6.<¥øßè›?z47‡°H÷;Ã2¿óÄVh8Þ7–¼eŠæ?ú꽦Ñ÷ª+ü’yhžê‰ªæ£¯ËSÈ»QsŽ;¥üjwíç¡ÆVÅxócV¬‰â~¹Úí¹5ÎL?8½‘YØXÍœ·©ÝLô¡êÒz\·µ2¥m”|Ðçû÷ïSãùùùßjšùUDùùå—0~¬Q©HLßV3O¿ßÿòåËÁÁA·ÛM[Y9žgeÌ–YÌ–)f˘ÛÛÛª!¸ƒÁ`œªJÜ/..¤û™¸Ë(M×V•©­·oßêóþþ^Ÿ§§§WWWÊ°¿¿¯Ìúáp8®'iÁå0WqX<ö¸Ã[o·Û–TyÐv·eïõz¡Ë²K…«Z©wvv¢•RÙ¬N)~•hzÚ–ÞªVôUužÙñ?99ÙÛÛÓ=ãææ&uùýTQÕ·”ýÓ§OêžzòîÝ;õÁJ«~Õ3¯½„¸À&!e<>>VBJ*GXÒ©„¾È;–P*!‹=j”_FIg¿ßO}çpᥭÎ#Üc,–æ¬-U®­úúððàDh±”ZETÄ=uùÝ7)x”¬w:5!‹¶ÊÙ÷ã…J)1Gqç…*l’Ñ?þøCšXÕêv‰¦´øîîN*ÜívÓ"———2J7Óü)ºÖLhKz}P£ + -ÖésÀöö¶MÒ‚§§§rÒU§jVq«¿q¾o@wØ$<“ªªñ¸‡½õì媋H|ÇÕ©²ŸQµ’àï¶ÆTÍ¿~ý:2g³-݇¶jkl?<<ünÙ™˜ë°Lã•oP—Æ鯹eï6—Ó + 4q)ýoP§ÇBìññqú„²~³*±–ûŸêû8ähû…ªÇÜ=Ü/cšg¤#ï¹ðî­¾Žó÷f˳eʆÙ2ßEÂzqqáál ôLe»Ý®”ºÕjM£³ª\™¥Î'''jñééiww×ãìgggU}«Ð+OÖ ”²ûí®ïªgš{É+à…*l GGG‘–’zøÅ ¹ÀÃáÐ3U”Í/B¥³Új§>Æjš ɴ߸Ê"ýЖ'øBéòþþ~¿ß||Ô­%æ¹Û+—”ËÒn·³‚1uÒF}Uñèä!*d!๗Íyî+ýÓ$‘{{{YK§üb¿±œ¦¬î½^OZ,7\7ñÜGÖ¼Và¹ÀÆp[“ƒADhÉpÀÅl«ƒAzëäxîͶÞÖŒ«y­ ¶L![¦lˆ-“²ñÜÃaO£±G.å ÀþWª»¡^9(±£Ð¸·Ùhç±e + Ù2eÃl™`M⹧⮭×××nB5 ‡C׬´„^•(ÿååeÚ½““YÃÝáæ.î ËÀ&±&ñܳ¢‰4X˜,*ë@fºèó¾æææFO~p˜„Eü… + q€MbMâ¹ìUÖDZÜÝkµZ[[[~°EÍ-è•,â%ñÜ«—ý”eÓxîsï[õMâ?þüüü,W]þû‚"ýˆ;”€›ît:oß¾½¾¾ž©l·ÛÕý UóÝÌËþŠîIßÕ·óós}Úy_(Ì–)fË” ³eÌúÄsOkžÐDÔ£ êÞÅÅ…ƒVªˆ:œ61wˆ-SÌ–)›õ™-³Ú?1M€xîüCf`m]4â¹g îPÄsOá…*@ îÂJLÂl™B`¶LÙ¬ÏlØx¡ + 3ÝÎÁL.Âä¨ëM~$»ã‚©•=::š{¨¯ù˜;l0#£®OàÕqØ{½žÃ:¶Ûm}*-˸Ìççç[[[³61_ðÜ`“ßmß9õÖ³ïìîཎœ¡ÞS‡=²EÁXÔÉ­œœœ8Ú:==•="KÜeq÷XÎ)¢É{ÊüyêÑm@õ(³ãɸÙõ¹¸…œwØ$©Ÿ>}rHô~¿wwW5¢®këÞÞ^U\”Å7XêL_[­ÖÎÎŽä5¬«Î‡‡i®+TBùXùÓH¿Ýn·Óéhk…¯êÇ·ë'/åV„²©Ã’x‡z×&õvCÄØ2«ƒØ2eCl#%•8J¯¥Œ!ÓŽº.×øÍ›7Ê ¹”ò:Ž˜4] + ±Ô¥ÑRa/îáàbÃáÐÿ`òmàððP²ëš}'°ÖGCѧ½vG† + ùN£›„ƒÞèSi;ûÕ·P3Óÿ‡ö°S!0[¦l˜-c¤¿å^¯'YŒa™,êºOOO’u%<2“…z·¸û À¥l”Å Õ¯:µUÊ.£”º)åNW½Ð’î:™½Ýn/TÙ+^¨À¦`özIRö«««‘qÛ?Ô(Üùærñ*U›"í„,¾ôû})ûþþþ§½¤FIXißÒ¦›Ž¼Wÿx®Q—ÒEþ ⛄R’Úét¼Ìtõòíh†r{€Å±ÔUðüü<è«JÂï6•Y¥¤ì–‰µ™.//u/‰€ìJ{Þ¥TO4(›Z‘Q[ÕÄ+Íÿ¼P€Í@:qö|óÈà¨ëâééÉÃ)ív[Þ´F^\\<<<ÜÜÜh“²GmÝn7"A*-e÷DøÔ^Õ¢¯ü···Êï²vó•S7 UJ•;³jó K©5­,b9ì&üCµs/›õs_·?1Á8ˆ-P xî…€ç^6ëã¹Ã¦À U€AÜ + q(Ä @˜-3½T_ÍFXZ<÷9S©²ìØ2ÍéknYy^mYÕl™æADz ³eŒ1Î$îŽò8«¸;"ÍÏ*î fUñÜ£TDc~ðÓ€c»WõÆÑlz½žÿ ëøúsÁû‰1wؼDÆ`08>>ît:6:ž»\x‡|‘ïííÉÑV6‡ŽqA‡€w öªvá•Íá\mU‡ søesœH ´iG}Uµ×5­VË*/£*QqÇQ6%”M•‡Å‘ß•žié¨Wƒ¸ÀÆ`÷üòòòîînßFÇs‡Î qïv»÷÷÷Ê#Ï=â¹ë«ŒÚäRÏ]Ƴ³³««+<<>~üø1–hµ…#Ç*ÅÝkšÌ¥ª·5ºü¶x=òáŸìííyõEÓëõdô»i~§•_ÝÖ§ímöß!C³&b1Ƶ‡`.Uù‡gûÖÌ¥þqŒ»–³¶2”Àóê8;;S¼ŠWE‘Q'ºMçúp8üüù³® + åÑ&¯Suww—åÑ&GÁšã«ŠWõ")JûªPqmRÁX-Wy´UMøò{÷î-Óÿ„‘_£éª^a=Ëà„²û¦[‚{Æ ~‚‰²Vd{U?ç¹±Wãh“…LÆæžÏ~o|õb Þ?ÞÞÉ*èóÁ»EF¯Æ0ëŽÊŽæóËó'Í#»ÏF}ƺ<ê˜e:ëv¶—Fž¨™}dbMÿ‹àgfõcîò_tUè:”W"÷D¾ŒÎò°èSª‡Vnoo½ža–gBå..ºúæGû²÷Šæ %T›|ç««+]K¶¤)júü%Í×Ø$W.ë’Ã^Õr#ÝQϳ"á“ê)Þc2ᤧOè#”ö@:ø³>¤{Uû°¹W½Lå`0¨ê£éÅ*Çíù&ʯ#GÓ_«ú]Ö\Õ¨YT¡-é(–ÒÙÑüî/ª’…Ó"-»Ž‚ZWC^0Ó«e¦™/..šÃƒ:Ü´ûÙívmOåFvÌÏsëyèa Yý°Œ®@]$º¼%Ó–¹ÝÝ]èR5Ò ]“º(­ç\_«Yž õ«¸ªâ6ê:± + ëjÔõïUÓEÊc)/]Š£ Öè + œáKM<’K}|ý+¿*Ìž¸}sòú뢉јtXf³˜f¯úVm£ºn‡ãöüH²â6ê°ú hj·+ƒv¯EÐwÖ8îâ9Š£Zq…:ÇÔ%¥S±®^ËÄ1UNŸ0:µÒÅ—Óa™ ë>LÉêÅÝÎWŒH’o¯9+´Ub¡«HW¾=â,Ï„úuÙKÜ£xÚ¨ØÞÞÎò·kâk¬‰4›‹aÐV«%µR‹º€ÝÏð¾õ5½+x ÖýÑE.oÝ7ƒª¾È'Œ§û.º¶VL³W%vö¯}Û‹¥è«Æž‰ïôQpˆIEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/border/doc-files/EmptyBorder-1.png gcc-3.4.0/libjava/javax/swing/border/doc-files/EmptyBorder-1.png *** gcc-3.3.3/libjava/javax/swing/border/doc-files/EmptyBorder-1.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/border/doc-files/EmptyBorder-1.png 2003-06-19 10:48:46.000000000 +0000 *************** *** 0 **** --- 1,43 ---- + ‰PNG +  + IHDR"ÈÃt{±gAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ (Èõ‘˜ IDATxœì] XUU×^Ì‚Š + Ί†€ ŸC*ä,%à”sèÿ©é§†åœX™ + ¦iù9 ’™ú‰Cš3b9d¨ àH& + ‚ + È(ÿ»Î¾œ±ìÂU/í÷¹Ïyö=gŸ}6÷ì÷¼k­½öÁ °°$$$t ÃgÝ ‰ŠI3 CÒLBBç4“Ð9$Í$$tI3 CÒLBBç4“Ð9$Í$$tI3 CÒLBBç4“Ð9$Í$$tI3 CÒLBBç4“Ð9$Í$$tI3 CÒLBBç4“Ð9$Í$$tƒr|³•Ay5%!ñ¬ ‹w½—osòutz I…4õ9™gç÷ÂöYwD≠i¦—H:öuîÝdlŸuG$ž’fúˆØ­£ëQÀV + Z¹Cv£¤™þ"&Ø…­4½€¤™žA•2)hzI3=ƒ*eRÐô’fú„R& íù‡¤™>¡„” HA{þ!i¦7(Uʤ =ç4Ó”*eRОsHšéþDʤ =Ï(çœF áAòµ.ÝE9+éjÆõó¢\¥VsgµŽZŽ(xº=•(圡/S‡Ÿn}¿áúž`Q®Ýa˜C/¿R«`òŽü-ˆrÿѤÑX1ǨhÜlß¾½Aƒ(c‹²¨€¯#FŒ°Ròl;\±!iV1áêêêëë‹Bxxx||¼»»;ÊØ¢Œ=¢ZTTTXX˜··7ø†ò3ìpņ¤YÅDõêÕQ¯„|¡Œ-)â&ªùûû?ºS¢Ü!iVñ‘žžN + ñÔ­ØSb§„î iVÁ 6! + ÁÁÁêVì–,Y¢î„ùÌzYÑ!úúœ´›w¯že5šOJpÿ·SÛDÙ²I3+{õh™òðð(,,ôóó›¤ûQÆ!Ðe8i"FGNåžD¹CôõüV‚y=ÿdÚȬªÛŒï°}\…xõ¢r``xx¸°¥” è( /ÕL?þÔj?(ñðªÇUÀÑ?á ¬$Áž¤o¦7¨Ýqø㈄ý8ú·Z» e’cO’fz!h¥úK){°ÝÝÝeŒñé@ÒLŸPª i!eO’fú„RM )“xÊ4Ó3”4)ezI3=C A“R¦4Ó?¨‚&¥L_ i¦PMJ™¾@ÒL/3µ´“R¦/ÉVúŠ¿]«lÛðY÷¢¢A&[=GøÇþÃDùÕ’fZâüÕ¿p’¡á¾††%ë<ºóÑsµ†ÚNñB©Ý(^íqWwnò}¸”’f:͹yšQklÄ_Q®dF†šC¦&šÊÙ¹\Gœ¢"¿@sV¹ôD4(.ýÏtI¹ó胸4Žr¡ˆÓʇç’f:Æ(ˆ$ ¨u%‡òžèÎ]:zšË`WNVrÍšv«ü¹ŽyªUƒ2²x¬£>>eÔ´âÂ¥’ W2åmüMî zemIÙ9äP›ìkò'+»,·Dé4Ó C `ËñhÍŸ,?;f˜Û€n”’N­š2Ó VÕ«ÙõhOq¿Ò‘Hß}:Ó«®T¥{A¶²\]- àrø€Ïç®Ð‚:v섳kÛŽ­©q=º—IC&ÿŠ:ž¯Õ[0égI” d¤Qà/ýß c´JeV3°kãªeÃ*òD^  ;îÒÝm”w“ŒÌÉzô•wí £Ì£TÕÝšWÖ&¡k3êø"¨1äTU|B¨"†ÓqQašbçÍÛté7—ò²YBoß) ŒÃTå%Ow«Ý÷_v®özGš¿†l­éÃ1ÜP½à›Uøû«£H£¤™6(•fªÀüÃx…@ùöæQ;* “î„ùkt{!=ˆ"󎔺’ÌÝÉîC20¥«íÈ¢ÝÛK6ãÈz¤›kKu'¢óìlL†¿Né÷i@wfé“Ë‹2hcR + Û¨ûO0ÙêÚѾPŒYôæ>À÷"C²_@FÖfÖ9ɘù5ß4ÌĦ:½¿ðü>ÎcQ-fyJši߬¤™x”fbpC@@’ רï»yï 5q¨ÅdÛ:‚îî¤F)ùc2²xgúÚ˜8:t2ÏÑÞ$áòî&/xöëJóV$QuŠ÷¦j=†œVßž„ûžlþôoÐL„1„µyô ýv‡E,2–¢£OSÒlÊ»NÕzNÿr«Ñ¦ë$ܳoÂ~"Cs~Üaò[hÙ¼vì•´&ZÁÄ]ÙQ”4+¤oV>ƒ…ým¶ï X}³¿d7lWí…”¾•nMoë½f¤·~‡ŽÝK¸Iië¯ÆP\3Ï%³a[®ÙŽCh’‚s»´¡e3¸òßµI !BHÁ"k îCôd;ÝíŶ° !nhþ\µúü†ž—¿ ¢;k¨ê«T¹5%ÍŒÍP­VÏ>»Û»“eùÿRÿHH5Ó¥ª™±1«è1Õ—w«¶QІ‚!žF•Ìhõ¦ËßïƒEçÏ\¤Ý‡~&#›±ƒ,›:²L ôq¿2Q8Kí\èàôÊ ™@;a¹=a¼QU<1‹€ëB‹ŽžfIÊŠ$“ZôàÝÝJ†UÈ~1™wqkQZ + QªYY›•4Ó¥úfY쒽ИFz3UÆÌΣœ+󦶄:AÁ¦ó(y '½^eÉ1‚!,‚¨b>MD>ðÁþ'é«~”(Àz§c+ÚÌWæÄ„ä~±…·`]Ä©´Qý­¾=J·ÎŽ¢;«XÐœôÍ™3ïýÅ ?nv„,iVÖf%Í´€ Yq©º‡ò8ž=Ž6裡Ë<‚ëÚ1Á@9Øi,ËY2ͬ[[æô¡8*¿™p¨IÄŒoT ÄÈš˜bV먧P±Ùg*6WV¼Nñ¯h]žsWÉÇ/‡Ò7·÷Ö°.mXÖŸLër<¦Îâ/ô<|ŠëÌG3™&i¦5äT¿ö‱ }8yŽ>ÛHƒ{Rènº‘Lq×)ìàý”t> + çêƒE—Î0ëÑžJØ`ø›ðFk"¿þ[0…†Î¤ÓhÓ^>jQ•"®KEüÔLˆ™²•È3u†¥ä”ˆ¯BÜDh/Ô ÚûÎP3ÈWŸÎ„î‘ÍxÊ¿Cv3Á4X°°·ì»Ÿ«ûŸ²¢Cª™6(®fëý®oÒÀî4~ íŒà¡µ¹D‡~Hœ0¼X+±«’{eP”äQìù¦Ò$Á'2–>\N¯º1+NžçÆ9$x~¾^ÐÄÑÚâÚŒ"&Ä@­S1t±PÖ8±¾½Âçì’Ü%r,Y ™Ò­úÓK-èØÉ‹ÎÎNç÷{rph|4lI5Ÿ1?î^ó/ù”j¦5d¤±L`ÏÇbâȼ2õvç¡F%¥²æ•ë,]uâó9m»´áP‡å%8FEæ"νžÄªƒMÁÚ…F÷£39(®ÚZˆ.7×È·7»h;ÇÍ¡‹Çgðù½É°™Ø¿éiy¦à)föó›)„üÙ¶˜Þ]Hô ²‹Óù¨™”}Žr¯SþoDÕP­„‰+¡$Í´„FÊl¹VMYˆ@ ÈK‹†1ßqøþ ~mÛ8³…ö'‘ ‘g#múš5šÞîOÛq„pþZºŸ¸…îï§Ì#<«V˜O6~¾#ßcÝÿnÝÎã4Ž›“©j;2mL3(}#Û^ú僟/õ¾mƒ†MBç*v¦r•G;Žq¦š:Òå¸ä%󆱊6“ç2c¬OÅLá)5‰2CÚiôeþK…c¶y?[‰PÈÚÁ“´.tG&^‰‰‰Žu;Ð*º—QJ’¡ºÇ`aŽŸGs'p#[ÿûcèa6å^£œKœ,’8±èÂÆT{¾G¯÷®$Pâ‘z”w£h¿)‡ã!AÜn2¨D5þÝéõO"N$lYâèÚœy.B)T¤bQȦߧdjL;¥ÙÙZ%'ߦÌãdÖÖ£S«î ß#i4–2¢%ŠG/—%7åÙÇ"6ôuêàá•5…R–%Ä}O©Ää²ù Ò¬‘/7ü} + ™ÍŒmé•æÿñ—<‹•¶žrãɤ.ÝšþûÉ´›SÃC]c>!# f`\‹ + s)·ˆr³8Ÿ#ešäåØBìªmœÿ¥Yç¢pLÌ%¨–$¾Žô¢KñäÔØ + î%Z›2Ñ«ÿÎZt·¶TfäB³²Aª™6PçÍ„ÑèäCûVhbЙå›é왟8!8'.bß + óRü±â ¾ÝÞ¦Éo±;·hí]Jš†h*1‹ Ù|jú‘yæaNç"秔¬`3ÞÅc)ZùH“MRÂO™+èƵ\†áºè“”J•šSí…>ž.p5jóÌ„T³²@ª™–Pg{1v›ÕçBJ:ûcדèì^º5µQë÷¨Ölì|ÜêL±Êsñæx¸èÃöSýwŽ‘¢Kr !LDõZyõö$³ÆTw99nâB ¤,‹Ž˜6ü Úy„û&¦ªÕÀ&M‹ãêëwq°¤ Õl1¬“}0®î%¥jfØ$ÊI3-¡ÉÞ0æØzk'ÍbÍ¡3iÙ&‚ûD¶S9]0?I3ŽK“2pì³|bV6M™µ‚#{ Ñ_ýïˆÊ®L'T³ìçÚŒv!2kÁ„4´hÒí*Û”¬ÿÛ‚O­kӊט ‚©´Ón¬oÆ<NöõK»éÁSg&öíÛ8ŒeqVWyKh I3퀔ÙXqÂ|˜~]ip/J»Á¿ªIÝÝȧ—3ûBÆšùââ³ÆàXLœ&î8k ÝšI9ט|N1½&QÈ€¾öàÁ§X\µ 9C+¾ÉiäÔ VÖùcó"cÁ´­8ý*#ÿ÷D'áÎedqè¿·; ñ¥®R€ šP3Óú¼>Í¢™6¤ûéö<Öý‚ªu9°Ú®®-9u¯ïØèeXƒ=ÚCÝ@Úi“ÇäܺA5F3åî„Púæß;j`üë>ƒ¯ÎÎté4ÇÞ–“*ÅB2ôGd~­üõîDv¦ÂlrÜNY§ÐÎmŒðì¨dªé³DY g!\Âßß? àÑC!!!#FŒpwwGwºë†š‚‘Úq­ŸÃ!Îr,áÌ%ÍR®‰ƒÙ¤ì×E“¹KŠŒ€„ $ Ź«(᧱o<¢*m¨Z·!>Í^yëñêɼr õA|ùÄûOЄ€XÊ<Þ©Û¨ˆÓD‰Ðö¨ ŸìÁ'ÂÑÚN=ڱɷ㻳t;êÄô³ôvn3vÜÎÖWçý6ïgrõÚ¯)ñ]¶H­}9PIÔ¡ëX[k¾Üüw4•uQÿOo©7÷400°DŽ((u>>éééø¡ñ‹GEEa?žˆ¤0M׿¾:ýÕ¡ø‘Y¾™ + âºò|¤)Îý«ÕÓŸ¢!38•))•±UaœáAW_¡ËÍ))€ÌVmý󮽧Á14’€Kø`d±…N%·7©g/ÏåßhbñШãÑLéÈ´/´«eó/ÉaýÆïXHÁùK¿°:ÙTç¥7 ÚDÍØ0³®ï±_Ÿíב©×wì?N£fÆ&ÿÔsÅ<f Eo%Ñ$—Ó>2ã逧ôyt_Ýr ÷7[Ü5Ü>±%åþbƒ p‹¿|VÝj‚c¤o§ÕKšÁ> †õ&¨åëëëª Hêø*Ði7T¥ckšÄÜ8 + û­Áž_ûˆR>ã´Œ¼¤ ¡_SòœÝ߆Á†ž¤Äèi”}36 + s; ¾z!ŒCóÒ¢œŒe›h^àØ?FSŒ%ÝÛÛØAîÃý…ÆL0 Üs¨E[ñ õýäp ö{ + 2~ß¿û°Õº›mT±Œåðáò5â :–8îÄñN.És‘“•Dä=ÿ¿Ê*m#ܶtûdK6Ï”0 U‡Âó8K}³ )ÎÊA ý›´[1¤¯ ܫѱ`¤7Oj‰D¡i v;¶'QÏ÷äÕÙòô.xn¸¥o0º;*¯òçdKž.3àÓq•}+ˆª¼B–¨òKç°ûçÇ€Œ£ì9n¢š“Á4˜¸0V#/¸*^e§ë˜Sü™¸cÇÜD???ooïÏJ;qw·w™ž–wPè½oÖIÁÓ¿®&Ýžx º¿D­›óòÍ×^áÇU+§Ìš~<ݸ÷-/F.HZö5GíÅûC~^È<)ž–! Z$²ì3q03°j›Â=Ÿ³jE]f;¾–ßþ¯vsÄjØuì>)Ë^V|±Ž¬G¢?wîq¼Z§•a=Žìô߯Ù!Ì»A9æ\°ö¥œk5^ŒHM/pîè7„ÿ„õ»x]OÃ:ÌR*-í¸|QáÿÓ¼^ª™x˜á©†^BBBttô£u°?>>^×=Ñ,I6¤…ï<¨¸ë¼gîš2#ˆ,½ùç…n˜Øs¤>u%ûl¦üÕ¢¤>&‘a(„.8ó¿å.ЫíéÌ&©ƒ 4´éõ*ùHóFƒ“çhåVnAD>xýeΨ(¬JÔ„~6oÀ+tTddñÌeŸóð^Âyýʤ6ÙLì0 bü š0ØÈÛC‰šlà+BÊX-ŸEB£——ìØÛ·o‡©ò—õ5,Ÿ7襚Á+Ãmpss#åA¸víÚ`EàöÀ¢ÐiD]’L¼´Œ†zò*LˆÀÍÛôéš»”ŸäÑÙ’¶f?›dÆ6üš ûÅ”º¼sŸÏ5/ù(Šò‹Y5ðšsp%¥¤Qn>§Ì‹´ãS1¼ü,2–mBúÏ› + 'rö‰½-Ÿ%r&ù¦æîë‚<öãSl¬Ø°Ôtµè=õí©v£¾á'RyR.ãHûöíQêCëìkRç‘©uìküRó`§±ði?ŒñôÄ£.7Ì~ÜJíq5ñÀÅðøÿöÎ:Š2Ûã—-!À€ + Jd‘]@‡ â + òÔAdÅyˆ(A=8<‡q + DÇ e@E‡E6ñ1Ȧ"û0 !ˆHHæëVWÚNÒ MWwW¼¿“Ó§ººªº õÏ]¾ûݯW¯/¶tظ™;PlšüGìK…r;[Á + Á€Ì_ÆÚèr§àc¢8ÇÿíTÖ»œóïpñe7ìݱö›…ݬBA÷y1ÒoÒ¹Ÿ>¶¡ÆÃYÔoП¸,¸aÜ6†ñ}l\7¨J`_±¦ÑßhÝ?£s§øÿl>B;¯ ð+.î±tþsæ”m©fÄ5ñW _Ò³3¢Q£ÆpqýKZðÜ‚Å_ѬÔÂF ×¼â6ÐŒv¨2±a;)) ¿è¼¼¼|/é¸YYÎj€Ån¤ÖN~:\Ê{ûSžè™‘q虇/زóvèê¶þtÃÈÓ&vƒ‰³²äîaÕˆÛê«V—>ø7Ñé,îüó6Ú?ˆê4æÑnňAYqbò}fP‡džõýÃÂ!•»uYlÇþúRÿr2s7^ë5iíý°r­™8~xp'ÍbA ñ\®qu[v)[6c›Ó}ØÚWÿÚ q—{™¼øèx'0¤ NÝ“¯ŒÒÈÇéÛkPdï—ß\w±nXéñÖÌ7lC¢ŸÅSÔ ? ½U;B5q>­™8åwIÛ)g6Åÿ_°ˆç✠+ t §_mÍûô *ÖìÌ©?g§E4Kô~XUˆË_ÞJaÖ¾°èÆ•.ÕíxkÝ°ðG¾¡Ð•YÆ®½<Ó¶O³>¬Tl}éñ@¾…¬.jÎÛxÊ÷æÁ+<ë™9„XÈhô[!uÏcÏ—’ù ÐC×|‘é)ÜÏçµ:%Ø/²‘†VD¥#ÃXÁåòP„ÍCá};ó~ÉgÊzk؆ùzêáÄÃGþñÐpóS˜2œ’ÿ¿õm]5,sí»«çÅ]=Ä/2óoš>çÚ—¿݈&Ýn¯Tl~'2³vº€‹åêDÆàKÏ…Ü­Ëñã›ØŒØØ;hôÓ´ùÛÃo¾¾"Lúì|öezeEÎñW>ä”:ÜB1Ap/¹Šª€Ó‰ºóN˜è¶à$[<Á}3ÿäî9Éî«ôßçŒK þ+Àö¶6Ÿ;ìzút5}¹žóÒrËg,aÃ÷«ØnïðÒ—qŸ›½2󘳱5¸¬gó~£+¯fæR,dðñó´rÃ¥Ò¹¬žæÕ›¸€Ð½Ñ¢… AN0w8XÖ=²V©…fð3ò&ÞF4³åê…#Ý©È5c"lÓ’&Ž xŒ‹×ÐsóXóâaÖt}d/–Ê'2”ð³ + Æœ"0w‚"6»b3/«Yç¼uWß·¡ì~±y_ßL^:’I߶—‹*æ/£Ù“ØÖ•]ÿ–\åÖ}Ç‹ÈŒ¹•…êÞTؽ»AÙ6ŒÖ§ÐÏKï³5KYÀƒ÷ .Â6¯c´Ó‚Aër…9 + UÙóæ›yXtë.p*¹VÀ9¶{þhzì„Æ<Äæ˜æÞŽ¶`Þ±ÄV™¹7ÓæFÂá”ü2¿³œƒ{7ïéo°‘A\ßÒ=™îq¼¹QböÇ—’(¢Ò%b<ž.]Ä¡]“†ïÅ6`#)͉¥G?niõF®ÆÌI[””ôüDv&½ 2s¢óŽ»ØÓ äà§ÏX4£úi äm[¹ã1’ôŽ©—˳e‡‘Û(o©[9€WÙ)‘“Ö°UEW–³ÂÁjÁúA0¼ DÒ ¼Q7s87ïv#ûv¡¯·Pça{Û߸yÌtúâkþ·tmGÊ9ò=eN¶«R¸x*/ý»nÓUm4F.7ÿ.û¾Â§ñÄÛü2¥¿® + Ô‰ŒiÚ󞸫‡Àé­ÔšY1•H(-“nKÓÇò$e<ôeSyÐÕÌwØì íÇgåcåÈh˜GGn*>ÍÌæSàfçÑ7ßÞ>0|ÊùX0rÍÿ,}¾à……ïL€Š¤~RàÉ<ú%màõíq'öà[6ã±JWQ³¬L ZµQŒL š}ÖÌÆq³ŠÄ†L€ñþúRÿRöýÑ‹ŽÈjèDúaÅð ¯Iý(¸á"Û—tûxy7|¬4<¶(ÃýtlÛÈK~Å7Dl° bÙüyi¿R‘ A¨Ð/ÌÚw‘¿¾Ô¿ürìHízõ+XUœF¾Z7p-'ÓwìçòŽ¥_Ÿ¸ª]Ä7ßæ<ûHÃ!}L“r8‹Ò³xŒË#)ɘ©Ì.ö‡¯h5W•™`Mã8¿à¥DŠŸ~ÿ½I=¯ä‹ˆI„´nÁ–z\†4mäKMpk ì ÁØ,¸5žDª(³ÜãlRðd{ì#n3;æg¹ËâÇ_Òè¡fÇØ–Ìlúb-{tÖ:ÔîȲšMbÍ ÎôôJLã••Ëà»|†’GsïG+*3oƸSYtâóF«Y~ UIDAT<#®Í…åôB®í¡ï3Žœ=úp>а=‡èÏ£oþó„iŸÒ¸k{î'×¥Û’‚5¸cÇ›ÿbµ”Mô‹ç™ÏÛéGÙy ´“ i{ ÙÄÅð€â®ÒsKÌ;!#DLˤ.ùç\M $žoâ@1ÑôôŸÌ¥n9Ãatï°j>ÈU3%9})º÷ˆšäI?ÂÓÛuöýÈ1˜”MŠCÈëqq3ùŽñŽŸà7Žë\kÞÂO?lZHµãÖο’ƒ¹ó­ _ñ µf¶`©Eò 0>' 9^‚f øVÛSp­1Õú).㪔V“c«ŽñX«Æò…îk½K†‹Ë ¶ »á€9‹8ËÿÃg­)ú][ßÔ³¶Å$úŸm Ö0K'Ö+¬MAaiY=ã×OŽáA-^S³¶çu¬Ã`²Z]ÀÕUð0aÙðÖþšÓa ­Bu¶QÇ!O½|ŒÎm½áàfõ£xTfv!åVgbòÂhÉZ#W$!óÁ`Ð}É)¦oYl¶±ø„uº©½ú~Þ¢•\oeõê!—{i!ÅÁ{Ç/#zÂäÔÆqÑ{ÒŒ¢á’_é_ ›«©0”Ï~¹šQ±«úÑPà—ë93‰š4,ã,X“Xz5¹Á?ÓàÞ®Øì×3£ÅÄqÛŸvFëS<ö³úŒ¢û‡òvQ‘çÈb7j͇dA=ñ’Ù€ÈLÍCm[ñD••̉Òå¦($ÇØ·3gµø“´ˆ”#Ý_á1âæo%B1ˆWB›¿ÔüF%À¨5 4xô£"K«­j¼ÂŸ„‹‹¡ïvq d˦å¸vRÕ1éZ¸${zÊùOÜoŽˆÞ`» Ñ9‹xÑ 2¬ß™bªU“_ÇÝÉ#fV?MýÏV„†ŸQ7sÙGíÚ¥=<$ë”höú]¿•_¥ Òª?Ä+ŒÕî_xQsj×ï£Ë¯º÷¦qtyÒé)³©}RÆЉl뮼Œ•|&ýqÚÕñÌÁ{oéÇâˆÍ¤ + ™46 ,Zâ U™=]xÖç,dƒ³úÍÒQf÷O¡­ÞÈÅÁ°lX5Är^òÿ¼€õ°ë9¯˜•Kc†q½'÷])ÊÃGxFvÊÔ*MuñŽVø~Y•™œ‹Ì¸QG×[ éÍã×2“v ÒpNb9*¯ó‡{‚Q aë†CsE¥ö + :„’¿Þ¹s+S™ùŒ:OB'NÁe¹Vÿ@ÃP ~vÐ?M©Mè¡7N*™KRXzƒÕ’U÷â…7üÀ¥ÀÒ!ËÚ ô¥rŸ + <ÃU‹cgÐþC?Qñ/Tr²Nø§ΡâüÖ­.~ð6 Æ‚‰Ê,8ÄÅp¢â«Í¥--`Íbëó+ÔõÏϹËU×ö¥sÆHò(dæHöæc"ÃéÃ>á¥Ü ¾4jþÒADÖkXTÔð¡áª± £2 ²lRX3j2÷Hq†«½¼>ø{ƒ{±Š 3€–ÖäªÜ‡Pû:C?-¦£Ïóú 5ëQÜd^©=jÀÞ57[N¦Ô”(ADS ¾p.)"s*4‚¨÷¾`µ ºÎl—ï¾`š´4M?jÚ=|”•Ë¥ŒÒ³€È¬)Á1¹ÇhÑ*Nœ`cÙktÕ­yãF43¬òNUg‹¦@|¿¬ÊÌÎQfd-AX›ûí\Ý–í6±i–Šv`A‡°`ÏÍ3–ÞM4Y¯®yé‚=ÐXlÞ~>•^OÛxëÔï*3ŸÑLc0gÁ­¯`vÒ³¸SdfòËF›–<±‘[½pJ]±~+O'C8åÖ£»Ø\¼dçñEFÞD7t--æRB•Y°ä$"‘þŠÛö~£{Ö¾&ï'C?¯?Ï}à²Xx²Ú ¤þ…°ÚìXæ7߶¹Ð\ÅS ôW¬‰-¢(äíéÜËqõ&W»8×G±õ¹¤#3‡óïÍà*GDk0kØ)­DH²&µÙ|í:È¢]¹f½¶F¾•Ae|ŠŠØøÜÖŸƒ4’(™éœÐ„ƒ1É…\Ò‚û‹,ûiÓȨÇ?^ÀK„â:[vòhÛ ÉÝÝçV+AGúÁG&žIV£œõbJxÑ|ÂÈpnÍ ]I7+^Tº&/NýØÌ£T+¦k‡ZW\B“ïåKi·Be°Ò\ýäqñ?8–“™£¤Ó¥ƒŠZ³ÆŠ¯Â\¿(¸Ž™Ù<†g23‡8nÔ5_m¦ë:qÞÿî­ƒè§%¿ðQßÎf·pkm4µfADk}áÜk«ŽµÐ»û†äý¥8zC†øMÖÎÎg¯rOeÇŘ½}ü¢1­iôý²*3¤Ì¼ÃmyŒua + + y¬ ÷<5é÷ái•™Ï¨Óèldú™ÔìãGŠ$•PC­™/Èß¼ß Õþ÷«Ö,„…§íçì´º± Á¾ ¥JhúÉ‘œ9ub{Êh¼ûF”*¡2s$™kßýåØ‘P^O]qGeæ<`Ä2VÏÃ^Õ 9•™ó€uáU š#P™9 Ë” jÐÊÌaX¦LPƒæTfNÂÔ jÐB•™“ð0e‚´ÐGeæÊ5e‚´GeæÊ5e‚´Geæ ¼˜2A Z(£5ΠðȾ†íoí“™» Ò¾—ízMZG&´³Ž±¶•Beæ  KBkR-™E·î’0`|ðîK©ê4*Ší¨ÌÅvTfŠb;*³jË’““ñìQTfÕlÚ´iU‘Ôhµ]èe`ïýöÐLc5'??æÌ™Ø9rdýúÜé›3gŽìiÙ²%Þ®ZµŠ ±õìÙSd‰ð)ÎÅ^{`ÿJ|„ý8wðàÁrÀøñãåâJù”øÿ^M©ˆôÕóÖMê$??{¡¢ÃV¬Xßž~(¯PE^^Þ‚ °³ƒ6ðvóæÍøÛ8ì­·ÞªoÙìß¿_Îa®9uêT9]N‘‹coø`#~…yY^KeÎJf†µ A!†€ ¼-q‰ÇÚ)ˆ‚2­°mmK{x­6¿z›d¦±Y5G¬¼Â!ܲeK=ä#làmE'â#ˆP\A9Ý:X,6¢££­WÅ *³jŽÄZòÚÒààÁƒò6Ä÷+ ÛÜ/âå`Å;š©æL˜0"Y¸p!ìÏàÁƒ%ý(¶hÎœ9â + ½zõßV gÝ}÷Ý8 ))©}ûö³fÍ‚AS™ùŒÊ¬ÚU@Epüæ΋mIo$''c{ÈÕFŽIFˆ…òóóe§d¡+¨[µjÕ¸qã$ïQÀÅÝ=RÅ ÚÜÛyd¬IM[g_Æœÿ~ñ¸Û>MûÝ…ÞÆ`#jî@}~nçØò³Å_eš;v\»vM¯}ùÄ~=ÁÂÓ2uÁ˜€r|qÏáGþâï·lùìJ\ºtigæÉ'Ÿ<{öìÒÒÒfuG¸¥ùüþñŸÿÕ?ÞýÛ¿·Ê4j¼7›Í£GÞwß}»wï~ꩧÎ;÷á‡nZ!QS„;P¦ÏÝ÷ů㟶nû|7¿õÖ[Ï?ÿüc=¶uëÖ‡~ø™gžiµZƒ.!jŠkî@ßÜy™8>ºö…ãßÝúû_ÿÆ÷.œýÛ_¼w5TèéÁû•Ý·oßî8W+óì³ÏÞ}÷ÝãããPè?øàƒûˆ£–}Ëìúò¾Oˆoð[î[æ§ï^êá ñªYï·øä“ß\ü—©Åÿüÿ–øþ¯žxýÂw>þøã×^{maaáÕW_½|ùòš ¹çž{<øhÆwbé[fhÑr*aË–Ïþé‘ç~øo3oÿÇKi¤ZåNêÓ§O¿ÿþû—.]ºpá‚‚þwÞé¸Ms6ÓÈž¤ôcòKKK÷Þ{/OË Â¨5ØgôÞ}û_ÛßR«üPFÃï½÷^«Õ:wîœâ^Ã¥ñÍfSJö–ÕD¸ÕòG_y\¯jÂ7ßYiµÊÿ:£aµâ•òÊz½Zî›WPTOË•“%{·xàÉÉÉùùù7n¼þúë§OŸ~ôÑGïºë®Áµ@¸qìß¿ÿäÉ“çÏŸÿè£ôúôÓO—]"”†§eJÃÓ2+ΧeòøOL OËôŒkîÀPài™aÃeˆp€€wˆp€€¸¡ + …~ýw$þS]îÀPài™aÃeˆp€€wˆp€€¸¡ + ž–6„;0xZfØpY"Ü Â"Ü n¨C§e† -wˆ–;œÿ )† áD–þµ4?lw`(¤”Çàš;D¸@@„;D¸@@„;D¸@@„;D¸@@„;D¸@@„;D¸@@„;D¸@@„;T×þÜ¿öxñ9"’¼ôBÙEê­–áΞGn`ãjî÷á@ÙEÀýøòe¨=®¹@@„;D¸@@„;D¸@@„;D¸@@„;D¸@@„;D¸@@„;D¸@@#ËËË¥}öÈHYF‰Õ·:*wã*[¹åº–ݳgOÙe©´2[îËŸ*± *ƒpâĉ;wŽïÝ»W¯7oÞ,»D+šššZXX(±•èÏŒÊ æ›'ÞÛþwŸÛ×qüÜÜÜ™3gfffŽ?~åÊ…û‘#GZ­Ö ËÓ›ééi½>Þjµ|M&?‹ŸL_óùE}–>Q3¦«:DË@ìÈF*d{x¢¼ýHÐåBjñãX®¹.Šf5ÛkÐAËÀpé­™_;´Ü  º¶Ü¯\¹Ò¸óÊ—o³&èñÙ7UÒŸ…»+.O~d¾Ìzk~~Þ÷düÐU{ù=¥çêø4WJÇ‹¼@ÅU·åîþ"òÑ–—‡JæææÆÛ ´„î°"Ù¹sg¾´ÓÓÓ™~ç–/³¥š½xñâ‘#G&&&:–ÿJ&?&õƒQ# + Ç©©©•žöm¯&M<Òf %ô'Fê¸ë:M¯>»§Oà¾J<½ªÆ•[(¹'vç$ù‘©ë’öoZXéw:èy§Öj,íyÄò>ºBá®-xaa!¥À§¼eÞÍÏâ ´S³§NÒÀââbz×½¥…øÏü¢ôçJ’UèÌÀúÁ¨Mí~à\0źš{é—Ðyþñ…Š×jµfff”×飗sÒi‡&óG;vLG‚Ñ•Vß·û2ë;¶2…áM¦¤V¥xÍë5õ"rèÐ!W–¼KêñÔíI*¶ë×#}O + }’¤ñ…oê?›Í¦¶Låûf~wÄP•pWÀ©íãV’[²Þú½µ¿ÛÈR#5¬:f‡_q5“µ‡hot7¡©Kh?ë…ïÍôÖJͤ?}ÉEÇ´LÖ—ÒëñãÇéúR:¤µi´|ÿ°¢ÜN¢W瓵V´†}’‘š®þR…wŸVSjÏú7‡>°iÀmdk·j=¦ÐŸFjŒ»,œÕ­—¥âMNNºzÕ°Æø§‰ÞfT×Zª¬ô›FÛRÍú&žh2L[lŸ¾µùO'Té©‚üÖâu¨MÂ}4jÓrE¨¦¼a¤1i^ñ‘Ò‘"î Ò;·%ÿŽI{®¢WŸ{‚üv˜üªtî®×ü–Y–J„»VºÖ‚¶cÅœÚ5ZïZƒnÅø‰%½«]BïæÛ¹šëÍŒwÅöÅjÆÔvVõ¤}OÓ«¬µ5*µpM¦1jJksñÏ‘­pá¥ý”0]6qW¢éWmúPïÆþèÂ\J + ÷/ª-@3æ Ÿ>¨ãfá+¿Un¹{ÏQ­¹³=ÕMW½ª:Ò»Z9é$ßë^ÇzÔ¢”€®G½úÏF¶³ÍdÎd´Æ4FÛÇä¥á©;­þ-¼¢Öã}ÛCtõêÕ=¼xñb~bmTé¢J:ûò”¸œÚ<Þ‘a Ö~ëe˜i=èä)ýxÖ&¡Jû”ϵi©: ù“ïS:Ò\šFsy9ùåkoUÕh!šÑ Ñ«†×Üé´(ç˜?T‰‹Ô÷5нJÜPõY­ƒÒc´Å§½ÅïzgÈwíæì^}ɪ?Õ–¯Ã¤ÝIQâ_²é#Üó/ý®vÔ4ûîÝ»S_Bi9>×®žî¯úšŒŽUÎ4~­Ré@¢iôYútmg©Õ¿ú† }$U/yéËjÀëM©êztê]ínϺ¹ß‹kÇXigÐsëU IGPÿj¼‘uÔ§Ð÷6ã}Uª‘iµ»vúõ5õ)^ RFEÒp>¬]°Bî¼i~]©té†Û¶kÒêrheê®ÍÉ»’6w ヺV©V²ÞM¡¬ÝPïjŒÆ»½åi´9å©Ê-e©K¥Zªk×¾;ÐÑTm¬|{²ÂcNékk.?ߊÊYo9Ëm‡UⲌûuÓNÒÈ6åüC2î=Ùµ¢ŠÔëºn.ùÄ9M¦‘E¤û–sãË­{_×G»¦FÙÅ;uó¡Úóõ¡éFk£íÊŒ’ÑHwÿßÈíºùKéŒ^Eòé¼7ÍÊþ².L¥Õ°¾fÚ%Üùu#û.¬+> »¿¾ä~ + }õ¹¿tùÛÝõéx©]]_øš—×¹»¢íM Q=º + ôêÓ¯ÔðÝT·üÕò•rýúõüÒ + TØá}“¿ðø@*¯8:"f¾Ã‘:nôêUÃY•âwE¸ä»2žQ§VšÌ÷º¼9RÒCyžÀû¦_Ó†çO_% + \€|—“e©JË]ï>Qòm+íNª ŸLMLLè]íEÍf³Ð=ê5|.ü©V›–œ?kÖ㛙΂tÌðý«4e:_*³Î |6?p× ùéýuü¯¼ü¼iê5¿Ñ82ü–7\•­Êû¹;ÉÓÊLgZ'>kÑH_Hïúü¬û…ûd9­Xœï}iÉZšÞÊ÷ê—ﮯ›çmò‰ï»;>Ø{Lú¯Oë%}£­Y?iktºÔ¦ySW±ù«‘ù¢¦‘…mrÈiåûÆ{z¾@1ªJwÐw¼}¿ÇW;ó›ØÚU›Šu7ûÚÏ›}ñ'=»ìÿâñ¹JËêû´%·Ã–CÓ®¢Míèå܃’¬hµ¿ùæ›ßõ z]ïbµ7jNº½´üd~‚p½ _IÏ¥ÅàxÓ«ÿlßD›_~š͢Ǜ¨[K7׎µßåöбT›,x¸û@ª–r~ á^;nˆä+ŽzÄFäO¶üœ^<ôçŽðuðB¿Ûô + €ðÕóÀ[áUâi@îáîáîáîáîáîáîáîáîáîáîáîáîáîáîáîáîáîáîáîáîáîáîÐÿ¼ËaZ ¶öIEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/border/doc-files/EtchedBorder-2.png gcc-3.4.0/libjava/javax/swing/border/doc-files/EtchedBorder-2.png *** gcc-3.3.3/libjava/javax/swing/border/doc-files/EtchedBorder-2.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/border/doc-files/EtchedBorder-2.png 2003-06-19 10:48:46.000000000 +0000 *************** *** 0 **** --- 1,12 ---- + ‰PNG +  + IHDRô–§ÿí8gAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ #YìŠûiIDATxœíݱRÜJÆq±µ¹ñØ~ìhCîd›ª6¿—`c Ü݈7ò­²Í0áFÀO`î°_é»>Õ–<3ˆÑèðÿ”¦%µ4­ÑQ«Õ´–*@.é{Ý#¸@BwHˆà Ü !‚;$Dp€„îÁ"¸@BwHˆà Ü !‚;$Dp€„îÁ"¸@BKÏÍÞÒÒR'»‚9˜ípsˆ„gÂþÚI.üžá91šC<\†h–€„º©¹ÿé?ÿáã?þKJ_)ÿü×ÿÊ„ÿþ7O¨f÷œ:x;[RúJó3¨=ó# jîÁ"¸@BwH¨›~î<À÷“›á`qˆ‡bæCŒ|^¶·Ì¢u0Èš2yo™gš¨Ï)/2yoÀh–€„îÁ"¸@Bô–yEè-“½eæÝ[¦ËÍ!,To¼JÓê4¸O†QI;´˜u4q‡ócñÑæ õPs7ê#Ï·àdñó-ø!Æ"£æ õÐ[†ú]™[ÉsˆûBÉcfô–IÞ2ÙQò˜Í2Á"¸@BwHˆÞ2Fo™ô(yÌŒÞ2)Ð[&;JÓ¢Y"¸@BwHˆà Ñ[fÀè-“%™Ñ[&zËdGÉcZ4Ë@BwHˆà Ü !zË ½eÒ£ä13zˤ@o™ì(yL‹fHˆà Ü !‚;$Do™£·Lz”;;Ó*‘•«ð»»» + Ö^FUu­¨ Çîƶ”¹æêãõõõ¼¿öôh–0$ªzßÜÜ\^^VutŽtUÕ‹ONN…777ËUööö”¸µµU._RìÖ•à²öĶñ?Ö”a×_«{wC☲uÅÜ`âÚzãáªWyóæÍcyj]·Ï([ÅîŸnkî2p vÝü±úëúÉêýý½ªÿï[/î2X[[SŒ^__FS­»¹¹©ëÁ§ÚOVôßÞÞžu7ç‡Þ2)Ð[&;JÞ~ýõטÞÙÙqó‹'–——///Ý[F‹ùA¨Â½æºRm5퉭­-?qUJî±Û:<<Ô&Ê^ó «ÓÃ&ë³ÁØF]™[Édž&ì³Á!îÊ"–|¯ÿÄô„ÛÛÛ>¨þ¾²²âN/7776—ëJpzzªúûÝÝb·BùcÿÙ4 ü‡*€i,êƒjÓçççªe+ROþ tooïÝ»wnv×´*ò/¹§sBpÄcƒü”. ªê ½wß?"11У‚;M±éqˆÞõð&&ôenobB_x”ð²cËÒWÊÜÆ–!¥¯”W;¶ &ÄUSh\f^ÂTu‘iG];Â{Jü‡*€;êúÆŽðž5wC¢z·B³êÝem½1»v÷à½kkkU1Ô{YaÅbÅx©“·²µµåe†ØQ’à`0F£ÑÕÕ•Gl?;;;99©Z£®kz„w¥øßMc¨÷L?}ú´¼¼¬p¯ÅÇ÷öö”çõõµ‚»3Ô„–÷˜ï½}çYÑ[æ¡·Lzsè-Óo›»¾ jâŠ× + Í + »µonnTÅ~ûö­f©F¯º¶ÇÓ\…o5ã7{h_ǵ˜‡(pâ·oßö÷÷uÍPÜו@+*Ö+ÿòCÑeÍ}Ú‡þýö7è}æݹ¢ Ö)ˆ”R^ÅƒÓÓSEäh–iŒº®‰»»;‡u·Ì4†z÷››|൜¨O(婹ŠìJ,G¨Çh¿/I‘]µì±ã¶Õ´ŒjåeÜ÷êñ(U³bÚJñ@•zEö•••«ÚlCôŽà`£Um___WÍ:Âñc kÉ ·°¯­­i]­¸»»[Žè«L"Qܹia­¥ÈîúÆ»™„ª†Aq6Æ}ô´Âq{Ôu¹»»ssÊêêêýý½ŒüòåËõõõáá¡f½¯En›››1¤¦ÙÝ>Æ‚"‚;€ÁP%ZѹL);DFŸ–ö ¬µ¢»ÖTuÝÜcG‘,‡ØI&Ð[æ¡·LzŒ-ƒ@›;$ÔM³ #w§Ç!†¥ËÛmÎÿAxÎçÍ2¨º î€A›;$Dp€„îÁ"¸@BwHhx]!=Ì[9NÛm­±Ø‹ŽÒ©}¸¿¿1*t¹?eb¹ÏšuzzZ¾¬½ÿ^2^ÓÞæÇƃLõ½/À”Ïåå¥B³þŽëa}Ê”9¯Æ•Ca·Ü[dtxxØÞg-æ×z9-9vÿÏkÄ2ù¹¹ÑÔß±sáhz‹Äoß¾•GYÓJQº®²Þa}¬ê‹®—×aÝÚÚzhU•¼pã¹µ« íP À SYˆfUc¿~ýµ×¯ß¹vܘ[®âvwwýeªzÌχ: Ä\­èigâeVúXÖ‘'!I'žNl¿ÛÅ;æ׸œµ×Òbš¥ÝSìÞÛÛ;::ŠM—G%Îy-æMè2°±±1ÄW¶Oû²y}Ó¸¶•Ós¶½½­Cãò×_M{ðÏŸ?ûy¤ï˜Öq_]]m|e'ê2à”“““È­Lo|SÔ]¿Ïõõõy~w$1¿ëÈ#Ê<]“þq7æzL}·QèoY%¬¾wU5­³HÓªOi1ÏÆM(bº]¦L¸Ïú¦Xʯ㿑a,¯¿Ú¢æ–»íšZœÞ¾ ðyîàòP_®ª!TÞµó.d#ïmy4ÛsU ® WE}Öâhz¤V…Ëʵf¿$S®2+ÑÍ\Q‰žP»æîü½õrÿfªúe@:¼ü•6v»ÔøÁ”¿‡ÆK{|y òŽiõÜ]íuÔŽs8âšç:nú'îÇtŸfå‰T~ÔiïlcÂ1%ÎOÿŽ,JñKrˬ<·Tî¶÷Áén fí­ƒT‹#‡Qºú>2õCë6ÜK6‚ûÃ#QcÑøÍ“Úm¿ú@맿*“˜ë–+Íu|T9Äb‘Uù}#^ÇuÔA\å+*O§Äõ5²ÒôÎÊ}n÷vá—)ÚŠ6§ÝÐ.i¼éø…4*O^Å5oÚ%ãšG£YÆ;ÖØŸöΓèùe¾ŸÕßÑhäÝ„Æ/Þs777«:Ç«RtFýô—Î=¿‹KœCU¿XË/ÍÒ&”¹¶¥|âž÷ââ"V_YYyóæÍù+߆ûºÑ‚¤êT÷»wÊ7 x¯Ñ´Œ¶¥­ollÄ­ÃÓO¶ÿ‚?Su×¾²&\zGGG>š~c™æ*¨ùŠècQÕ3—Òöövù˜º¤rsÛš2‰k¡ÖrUýøøøììÌ¿·“è°*1 + ßǨ«¯©­8ÃÏŸ?k—4­MÇoÌ;¯Š›E-é˜ + ¡|s›/žæ±-:´obÒ™àߺ_j5¶}Ö'öä/3Tžûûûn㎵þøãÈ-"Kœ‡S…NeoiYZZrdQÔ®¾¿Ÿ×³Ü×"ÖÒ*ZÌ*íÃÛ·o' :ÎpX/ꆋR´§Mõ]FU: ¾“sb\}ÛNÇ´,v}T“oÎ?˜²žáç4NWVºlëÈj®¢®"žŽÕß½{×þv¾e©êßžŽ»¾Ž??- + ?¼Ö¡Ç"è9¸»}C§‡~úúëìUÍÎçª4­ + ª6ú¨Ðé¦çI|¬¹‰:£TÝÖ©¨ª<•¹pýK•hße{ÉÙêz:畃›}|+ÿ¸á¨ê›-sxx¨M;^¨<ÔíìúèÎsåÄb1á‡~>½ã¡¢þ6Ú÷•âb *™A¶sk<¶‰'Iíú¸¾`c¦úeaxÿÄ4!U|T³SÅÇõèªn<Ñi3è7Þ‚ÐÊfåÒÌÿ¤ + ¬ªÏQÙ÷ÑTàk4‰ÄýÐŒ{ßÑÞ½[ˆ6÷—0Üé°ïyužnDž-Pú Pí*v;·nÛ¦ ë®´Á½}G’õå58??oÜ + D{€±Ò6ËÀk¶ÃºEp€„îÁ"¸@BwHˆà Ü !‚;$Dp€„îÁ"¸@BwHˆà Ü !‚;$Dp€„îÁ"¸@Bÿ‡ÅØÖlíõIEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/border/doc-files/LineBorder-1.png gcc-3.4.0/libjava/javax/swing/border/doc-files/LineBorder-1.png *** gcc-3.3.3/libjava/javax/swing/border/doc-files/LineBorder-1.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/border/doc-files/LineBorder-1.png 2003-06-19 10:48:46.000000000 +0000 *************** *** 0 **** --- 1,30 ---- + ‰PNG +  + IHDRôÈ‘{„¿gAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ ™±F¯TIDATxœí_lÇ}Ç÷ + ;Ñ?ÔU ¬rIº©(Æ"XFEú_ܘj i#ÙˆŸi°Q=Ø¢ @.Ã$ѧÂ.ŽòÒÃd“¨•‚¬ÄvQ›’¡T”ª$–#…’ Ãdàúõþªéx÷îxw<ÞîÎ}> ù™ÙÙ™ïüvvçw¥jµ@XüNր΃¸â ˆ;@€ ⠈;@€ ⠈;@€ ⠈;@€ ⠈;@€ ⠈;@€ H©Z­f]Ø,J¥RÖUØ(hT{Ü–u`s)´809eË2‚åЙˆÙZþ 3qðû‰˜´ÕÒ^ lÄòHù®JÙô/Oe]‘xì¡È¯°„òÃkwÕK¼åKƒý;þü+ÿÚ ÀÕÕU}v¤zíy’¹¶ö?fkùWé÷gÒ¹x[&°‰ ¾º{üá¿üÁm·}±^‚3gÎ Æ<ù䓯¾úê•+WºY=(:ˆ;@fÜõ'÷ýÅ_ýý¿û‡ ÒÈx¯T*?þø¶mÛ†††žyæ™'N|ôÑG]«$Ä K¾´í«}÷úÊup|Þ{ï½_|ñÑGíëë{àžþùÅÅÅÍ®!ÖÜ:†·LüY`çÝŸ-įËï÷}å±ï¾rêÕg?¸|ÎEJô¿¾ë¥Ý7oÞ¬™k1æرcwÜqÇèèèý÷ß/Ñßµk׆O¡¾eÒÏ^ + ÊFN$`ß2ßzðeÛ + _¬ª>mœÂ§Ÿþöô&W.üŸ%¾ç¡Cožzé“O>yã7–––^ýõwÞygÝB¶nÝ:22òHŒ=‰Å·LÏ‚å n»í‹îá­ŸNÿ·t‘²ÊM©?~íÚµ3gÎœ:uJBñâÅš…(Í«1Qü&¥½&åÊ•;ï¼³½÷UÒo¤ýÏð¶L>AÜr„ ößÛòGÿyþŸÓ_É*‹QøòåË‹‹‹'NœÜ+\³(ÅW*¤ì›ZgÈ'ˆ;@¾øÚŸ}[Ÿ2á£è¥zid•ÿuŒÂ²â¥òÒz ½,÷îUò oËäŽXÙ›eÇŽóóóW¯^}óÍ7?þÈ#Ü~ûí›W=(ˆ;@8ìÙ³çðáÃ'OžüøãõùÜsÏe]#È –eD–»=‰=vì˜Å´çÝ屇^IĤýϤÓà[& î=oËô,Ëâ ˆ;@€ îÂU€ž€·ez Ä 'àm™^ƒe€AÜqÄ @x  + Ðð¶L¯¸ô¼-Ók°, ˆ;@€ TzÞ–é5°ÜË pJ¥RÖU€ @ÜB¦Z­Z‰ï5w€žÀ©<ô¬¹â ˆ;@€ ⠈;@€ ⠈;@€ ⠸ü…<²vãË{ïýIÖµhUþâꮬk= â¹cåò={ïýñÅÕ¡ôÏu)ûŽsoŸûfÖÞ¥¨âÎoéÌù ÷ýpáÙÁíïxí®¬ëÒ>RvHÖµ€Þ¥âþÔá·³®l*¥óöê/ëj¨â ˆ;@€ ⠈;@€ ⠈;@€ H©Z­fvìR)«CC†Ý×:wãä¶s³e5fË–-»wïκ.¹&K˽z‹ ë› ›Á¡C‡GGG‡‡‡õyýúõ¬kT—ÉÉÉ¥¥¥ + îH@Àйх_S¨÷S<³³³ÓÓÓSSSO?ýôÙ³g%îû÷ï_\\Üìú´ÇÑ£Gõ922’UXs€b033#­”²+¼{÷îJ¥²oß>…MèK¥R¹\–½l‰õ¯¤_f¾²÷-ìýÕÕUÔ + ?ñÄåÍJ¯›Å”b°{w‹ Hw£ Ò”ËÊ·˜Ä±,c뻫O÷AÜ HÄMÍññq“NY™ðGŽ‘žšXGñê¼&M²÷ÇÆÆdò«÷­Â¯½öš + ‘”+,QžŸŸ-FÓhKvàÀåÕ” rìîAR2Ëå’)ÍÁƒõ­R*¬Èƒ1]i› îP`¤ªq©­õ’ò……ûJ‚®H}*ütŒŸÑ²˜ + ÏÇHˆÇcп–Liô¯Ë;77700 ¹DÇUÀMš”QŸö¯=ìíïïWšMn€º îP ¤˜çÎsÿÊFv #[¶l±Hš|ÊjY\Fåêëë³°Í¢ÛÍ­œAWAÜ È—A-MWxiiéèÑ£²‹eYK gff¢ØŠW¼™êëbY¬4M²»e•_Q@ÿÖÌ¥”J oeË_ºtÉŸlÒ(î*Z<ËŽ‘‹·eÖerròƇb¢xÁÄ ç©©)ÅØÖ + [Ei¦4É®e±Õͺ(—ËŠQ¸žI®xM!ÃÃÃQlõW*•zå«&³³³ýýýY=SÍrŽ _…4jnb²Eð&w6ɺ]\\´5?‹½™¾îû‹:–Ž¨ŒnU'‡`¹@‘ˆIDJdÛx£<=4YH!6Dzæ½…¤Yf{!z#`¹@oÑž™_8°ÜqÄŠÁhLK¥Rfï#fwè^_s·Wšj>‡ÂQDOßM¾{Ð*…±Ü5ûuö÷¤éÎåÛàà s”Æ|È5ïšY%»éz~~Þ9ŠÓD¢°bºSsñæ…ÎG1–Ì'[oÑ¡Õ&m†æ=}·jLÍÎÎ*‹m5´/Š±Sð±2kZ—5¨BÊå²¥w¾ 킱–±9æädzzZá<»/ï6lmDX¨aÍG£ú]C,ŠÖ4º—W1û÷ïn5¾0OK16Tm“šÝ + ѧuѺ1kë)¥´ÃéÓ÷™…÷Ž£vW,..V«ÕJ¥¢ÁÓ©»'{oû’mc…uyó6ÚÔÔ”*f.ü°Xô(}ºÙ8OßêÍååe5¸áŽpðàAÝØ™{nÛòîö@Zï-ùÿ“0IVÆÇÇ×bÌ7¡"m×»Ówñœ>}:ç[fºƒZcllÌydÔ§zD¦ö—v+l «Qf~ÞýËÀ¤Vƒ]¹¬ñ­¿|éøÄÄ„ + QF+DŸ + ¯ëE@E©v¥WOY•:ÞÍ“ qOûGv³±æçDë×s»l4)ÐÊ%9P/šÔjXj”ÚÊLzÆöIW̦n}úöš®?“r“–Ü›Œu«§,JiÚ퇣xnpäs¨§í¦Ž4icZòôí¨g9óÍqäÈ—F¸>ýéÖ;FK+{ª°ºOWÝ– ˜·‰Ž.«ŒÊ·°‰Zó凊D½ì7êß•••¡¡¡……s c7@jOõˆ×¹PÛZß©­¯-MÂÍ€"uø œÛȵRUÉ©zÍy©t6Y&d/î¾dµ‹Æ•b4+Ʀ¾„ VÏí²òš!—ròó8çœÑ-ËÈO¬+F—Kã»AÅ4·O+ÙöC›3èè–K#ßµ[{1“°Iü…šæsu´ÝÔ©&UÊD‡úÇmÕÓ·Uµ^ÅÌ|óË7ã]m®ì[èþZK ¥ + û–¸='°ËR'¢KÅÂjsi+X—<'ŽæÁQ ¥‰Yf“ôÝŸ\-YB¹î:‰eô=Mú1­Ö3[ó+ûªsss6GqgDñ¯‹Ñ˜Ô¨ówçv9ŠÇ¿†«MÎf¯ù%›Éã¸qãƺ•q3¶ 6nÖ}+ë ^Å4ÓøiãVyuM˜M§°»é6t+Y-à‹NcÜŠåÖln5 ÚD§Ü©&ÕNÜí‹É¢Ê1ËZí¬Ã9inP13Ä¥©zš·Tšé:±ƒ¨ªfÁ˜6™5Ú#ûnÖŦ=µŒ9n´{bõ‚-‰ìŽ‰âëPm—“L{Åh¶V.õ ¾RF‰ŒÒkî¬iZYº2Ím¤bLßmVNh‹UÀn%-oVd/SÖ.jDߢ‰>?mÖs»œ»Ä WB|£¸ŸÜ€Q¯÷÷÷û)kº^ÅÒG×Õ )±÷pìoqØ}tk-¾I + 1ÂÝ$ìì6Þ¤‡ Ö%Òž¾5üÌú®çé»uVsâ4Ë#ñ•ëÄV±éľÝçÙÄ£¯t,]0f(…Û8JxØý“µ› pÉh¹\¶†2g¼öC$¼6ªy•Xš.¹×| ùÖ ªÄi£Á ç~Ò~Äâ-²ÁŒnµ¥ãŒŸŠU³F §æX^^^[[³GU¶P¥}«¦×· + XGZŒ’Ùc(ô¯"Í4K”œ8ÓD[³¶ªvDe:h.R1f,»§šõ*VÌ + Žb‰witjö•+Ðþu%$âk&ó¨êí@t3l­¬§6ؤŽ´ºùß:ׯոÝTŽ®+…°.ð«ÅãŠY9JæQ³wüªvö€$i½ïwœ™“Š´+ÙdÝu¨ýku³wר¹Ô†ú´Õh®SÖ•.Me±  ë»ÓÉÒ£¬ÉqW³V]&{q7¶áª€E1n$Û4Xõ¼ºÁOïFTZÜ×=nbÍÝâýßâ²H7ªW,Q %6q%¸ñ¹q÷ñ¥'?¸ [™©n¬I›Ç?ŠÊ´­­í"]Ó5¨Xº5{ÇǺ>1 YdÍŽóëæÎÝ°9Ò¯F'òBãw“³º#/þÜÓ¯ 6ö˜Ü©­571Ùó«z;› + áÊ9[ÒMÔ&mÃÓwãŠu61eEðó"îÐA²:â ˆ;@€XÜWWW'''mWaóÞšÖýª›Ø–Š¬k‘S + Ý¿¶§Fu61Öz–b‹»ù ª— U_NÝDš®‘oîJ²®KN)tÿš}ûö={vxx8ëê@/R`q7SNŸö2™ï Ôy3»¸ æ¶ÌwÔi®NÌ甋Iø,«éŬI|_(¦ÐýkÛßu÷`;ã‹ëœŠK.Ü´‡†Æ¤sî¡Q]©TÆÆÆÌhrûSÌ••FÚô•Æ³mŒ< ö¯JPi ÓÓÓ*gnnNcÒ^o£ÊÀÀ€’™%«¼æJv™s¢dJ£a¬omH¯¬¬¸CØ~q÷#ô57 ¹ì–Ø~‡>Š÷­¨@•f•W¼%P!~5lçz"‹ããã*S%+;–¾:òyü.¶ÿE¥)™9BQùJ£H}ej¼mGe:Ÿ·¶ß'ћщëB/Í÷²õ©­c¹ VJãú:'= …£«îÌŒŠâÍÙº²mcáéÓ§e8×}iþžæææTŽ]èÊ«pY:«««*P¾¾¾è–å«4veiP+YFÊ®Ñkº£Ä ¦2út¾D|ÇUV¦FL9eWÀ‚Ë¢ + › fõw‡SUÛ¯€ïÅžþõ÷÷›ØÉTù–Þ_8Váæî\6©”Â&Z «_« —£VzÙblK/ÔÔ<ë<üΠ䟮Š»Ûà§Kß®T¡@«Ï»\9®™<¢>÷­K¯Aåîñ…$C#pbbÂO£€«OÍòÓì‹Id‘©%iVùGcÜfw}šQæ¨ç2Ð5š9k€fÈrSÚg“­7s㩼 çÝf¾ù›V,&íï©æö–töfhì¯jãûhÒ§™¨pä5`{§°ÙÐË­ÒÌY¬K/îPžÞÚÄÐ# ⠈;@€ ⠈;@€ ⠈;@€ ⠈;@€ ⠈;@€ ⠈;@€ â ÿ ¬‘\ÚEIEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/border/doc-files/MatteBorder-1.png gcc-3.4.0/libjava/javax/swing/border/doc-files/MatteBorder-1.png *** gcc-3.3.3/libjava/javax/swing/border/doc-files/MatteBorder-1.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/border/doc-files/MatteBorder-1.png 2003-06-19 10:48:46.000000000 +0000 *************** *** 0 **** --- 1,15 ---- + ‰PNG +  + IHDRô–§ÿí8gAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ "÷è‘’¦IDATxœìÝ}lSåðßéËvºîQºnn°1•7`ÆË Œ + ¢Âü!j$jäå! ˆÁ?T"*xÉõJ4ÞÅ8æx ‚»ƒ9y‘·1W7leë¶Ú®o§=ç9çö´æ&rqkaÐR¾Ÿ?H×´?Ξ/¿<=ÏópŠ¢$M¼/†Â !Ü’Â !Ü’Â !Ü’Â !Ü’Â !Ü’Â !Ü’Â !Ü’Â !Ü’Â qq•5Þô08„;@Ì<Ïöêú£Vi”‘ÅSxîxUiJEEÏózÞðý{¾=-3É].jí¥ •üÔ©åL’%¦0¦æêßB}ˆÆ=î˜ù |àÁ³ÛíeùÊãã²ËgVQÖÒÉÛM>;‰¾?^Äi)”N‚oQÕì…s9Q’«÷>ÕI[Ž5¥¿$+’¤Èì&çÀ¡þàõ!J¸[ Š¢ƒA›Í6zôèòW>£ÔLò÷‘­)ØÛv¦¹ñ³õ.—K„ÝûëΞ=/s|PÒDEâøEóç./7* + uv]e™(†ÚR%ôõcªÑ»‡;w€»…g + ªÏI[_l?‘à$ÑcµZ7}×qðWrúC½g“7HµCµÍ)©­Ù8_%&™¬T”Z·¶§‘$5¹Â37v¦¨?x}ˆ:w€hµÚÆÆFK¶^£Ñ.•ÒóZZZ¦¿×ñÍbá.SÃÑ‚RzöJO¡º6Z¶å §á)Ý"ŠìBûuO€L&K¨! …™ÚŸ²;SÔ¼>D;@ d9”8¬Ï-…h­{wïÚ\GŸßkÉoo¿ÜÓÓ§ 5×€ú±ý<à/ ÜbÄ#Íy999^ŸŸŒù¤Õ‡òËÛqÜ8mÅâw÷ &‘Ð]¼ô£×ôúÏ×d¬¤r¹ãÌž@E•\¨Ãá;”Mºi4óèê1ÿ•&ãøÄumŽçz÷Ï»²²r –ÒÂ1%—.^ìí«ÑiõAQÒêtR0º5—¨· sî± 5—’ºÊ†yû»Û¾^u¥¹Ö`~˜²ŠÕ†”‰äî¹ÔÒÖÛëèji&N7þ™5))—Ççv»¥àÍ7WAý˜êC”î1Õeñ¡äR ãwWAᘌ–Î6Ò¦§¡NÊ(˜½|sZšñ±¨ôiÖZ¢-Ô‡á‚pˆc²$©kâ% + 1ÎÀÝn¯ßë–˜B~'iSÈh¸XG2™žÜ@ãR×/µµµz½õ‡¥>ÄsîCSu5¼^~Ù¶PIá3—SÐqö†/ÍÓ_ ´Q™y]ùÏÎ\³…7¬V«Ùlæ8õo³>ÜtîC 5¤’îIE™‰L#“r(ÀBOºÎP–]Ü÷ + z©èñ1«ðx½'==}Ĉ}}}¨›õá ܆ʩPZEæDµ9U§•CåñK©iY¡çûú鼄ufY£?yòä[Ûþ}íÚ59ºb¨ÃÓ2CS“+Ô†ª'©ûŒ«çHÈám 1=Ëžõ{¿ÃáòÿëáɳÈú#êK}¸w€¡­ÞÙv犿úA/•5Þ»õé.ŒÄá…C+o|F›Úc»zúÜ…Ì4~âĉÙ&b7_C¯hô-Îó|ZvvŽ^—*Érø®™1õ&“ÝšîtòÞ ŸÄƒpˆ™ÇãÙ^]Ô*2’¢x + ϯ*M©¨¨àyþO¯Ó¾ÿaÏ·§åq&¹ËE­½´¡’Ÿ:µœI‘œ2KÒ=1>‰áƘÝn/ËW—]>³Š²ÆÞHÞnòÙIôýñ"NK¡t|‹ªf/œË‰’\½÷ð©NÚrD¨y,% ø¥ðýàr29„ñI¸[ Š¢ƒA›Í6zôèòW>£ÔLò÷‘­)ØÛv¦¹ñ³õ.—K„ÝûëΞ=/s|PÒDEâøEóç./7* + uv]ÃKó™zû ïoh˜a|:w€°ðLAõ9iëë’í'œ$z¬Vë¦ï:þJN¨÷lòÉ¡v¨¶9%µ5ç ¢ÄÄ “•ŠRËáÖvâ4‘ #[kÅûfŸÄÎ Z­¶±±Ñ’­×h4¤K¥ô¼–––éïu|s†X¸ËÔp´ ”ž}„ÒS¨®–m9ÈixJ·ˆ"»Ð~Ý “ÉjHƒ‘>,Ù:SŒOâ@çY%ës«‹s4ŽÖ½»wm®£Ož¦YSÆw÷Øó,ù…“*V憎äùð¥²ÎNÛik÷úíûß^6³µÕºv¯oõRNTw_Q?0L¾C1>‰á›’ââ7÷]>¶îPYù.l›£êsÛWÏ5·õ¯~q‰ÞÙKVLh=a·÷ΘU9cͪê·*§¿Óੲ˜–Ìžìò#Óñþ>îŒO‚À´ @ ´ZmQQÑÖ…šÂljè CëÇëç~LòK]½nsýßWøô âM¹sÖt´_9°o? Ø¿¼¶j,íXœ¹ié´9&ïÀ@'Æ'q sˆMŠ!£¬¬ìý"Gfffnù2r^&Ce%MªËé6çZÈTJ:ãÄIe_ÔÂÝE%ó7>ßkÉoo¿ÜÓÓ§$û\Æ'A ÜbÄ#Íy999^ŸŸŒù¤Õ‡òËÛqÜ8mÅâw÷ &‘Ð]¼ô£×ôúÏ×d¬¤r¹ãÌž@ÝÉ…ñI w€Ø± ¬hÒM£É˜GWù¯4Ç/ &¨ks<×»Þ•••c°”Ž)¹tñbo_N«Š’V§“‚÷ÇšKŒOÀœ;@lBÍeø€PæíïnûzÕ•æZƒùaÊ*VR&’»çRK[o¯£«¥™8ÝøgÖ¤¤\ŸÛí–‚7ß\%É`| ²9úY ‚Žß]…c2FX:ÛH›ªž:ÐI³—oNK3>0v•>ÍZëÀý[ŸÄpˆcœ-±PˆqÞèv{ý^·Äò;I›BFóÀÅ:’Éôä·º~©­­Õëõñ¾ð»ã“P0ç04EQWÃËá5ñá‘m •>Cp9goøÒ<ýJ•™÷ЕÿìÌ5[xƒÁjµšÍfŽãâ}ùwÆ'¡sš¤îIE™‰,r€œ(Ê¡ =év:CYvqß?(襢ÇÇü­Âãõz<žôôô#FôõõÅûòï8ŒOB¸ MĆçDµ9U§•CåñK©iY¡çûú鼄ufY£?yòä[Ûþ}íÚ5ùþø'†ñI@˜–šš\¡6T=!HÝg\=GBo[(xŒéY†ô¬ßû—/pø_OžEæ óæÍ+(h‘9­Ïë÷µß Ÿ„ÿ6†&ªÓê>…RøÓÂpgªNA„¾tô÷GúÖ àS8õt‰~Axž÷{YŠ÷µß Ÿ„pš¤¡¶¢¢aJdNYŠlK+)N‡#ò2§£Ÿã8ûÉjjj\.×È‘#ã{Ùw Æ'!܆&‰LmHÃg{†Rå&ËZ1ïÄþþþâââͧ$é~iK1> sîCÛµ÷Ä-¼ëðчýJÆ'!܆¶zg[¼/!¡ÝÑñyõƒÞ;W<‰!Ü¢phåÏhS{lWOŸ»™ÆOœ81#ÛDìækè¾åÂyžOËÎÎÑëR%YßU"3¦Þd²û@“šŒ¨ÿ×õ©¬ñ¦o„Á!Übæñx¶W×µJ£Œ¤(žÂsÇ«JS***xžÿÓëô†ïØóíiyœIîrQk/m¨ä§N-gRd§ÌþbDÔ¼>DáƘÝn/ËW—]>³Š²ÆÞHÞnòÙIôýñ"NK¡t|‹ªf/œË‰’\½÷ð©NÚrD¨y,% ø¥ðýàòÍŽBýÁëC”p· @ E ƒ6›môèÑå¯|F©™äï#[S°·íLsãg;ë].— »÷×={^æø ¤ ˆŠÄñ‹æÏ]^nTêìº.†—æ3õöAõcªÑCçž)¨>'m}ýA²ýD‚“DÕjÝô]ÇÁ_ÉéõžMÞ 9ÔÕ6§¤¶fã|A”˜d²RQj9ÜÚNœ&rtdk-Ô©>D;@ ´Zmcc£%[¯ÑhH—Jéy---Óßëøæ ±p—©áhA)=û¥§P]-ÛrÓð”nEv¡ýº'@&“%Ô# |Ø)ê^¢‡Î ²JÖçVçh­{wïÚ\GŸßkÉoo¿ÜÓÓ§ 5×€ú±ý<à/ ÜbÄ#Íy999^ŸŸŒù¤Õ‡òËÛqÜ8mÅâw÷ &‘Ð]¼ô£×ôúÏ×d¬¤r¹ãÌž@E•\¨Ãá;”Mºi4óèê1ÿ•&ãøÄumŽçz÷Ï»²²r –ÒÂ1%—.^ìí«ÑiõAQÒêtR0º5—¨· sî± 5—áB™·¿»íëUWšk æ‡)«XmH™HîžK-m½½Ž®–fâtãŸY“’bpy|n·[ + Þ|sÔ©>DéîÜOýøÏx_ÜwdõÌgue|PÜÞ‚Â1‚È t¶e–,PO褌‚ÙË7÷¬1=PBV±ó5@ úØB}.èÜ¢ÅØg@K,bœ7ºÝ^¿×-1…üNÒ¦Ñ3w˜.Kù‚´8Û³XŽþ&l8üï?æúi«ÕZ__ßþü%ËŽ»,5Ÿ…³çÓ½z³=Ãwm½{oþBæ3ƒ¤Ä;õŒA{ððSYÎ {öøN¥øƒè²ž€ëíL)ýz+m€€Ä qHÜw€€Ä qHÜw€€Ä qHÜw€€J¾+dYMY\oœ¤³|WÈ2ãþïIxÕ®7NÒi¸ÞÊr*âÀbÙsHÜw€€Ä qHÜw€€Ä qHÜw€€Ä qHÜw€€Ä qHÜw€€Ä qHÜw€€Ä qHÜúkÚj<®í­–IEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/border/doc-files/MatteBorder-2.png gcc-3.4.0/libjava/javax/swing/border/doc-files/MatteBorder-2.png *** gcc-3.3.3/libjava/javax/swing/border/doc-files/MatteBorder-2.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/border/doc-files/MatteBorder-2.png 2003-06-19 10:48:46.000000000 +0000 *************** *** 0 **** --- 1,30 ---- + ‰PNG +  + IHDRô–§ÿí8gAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ Q$¬JIDATxœíÝ_hcgzÇñ£v–Åvš)ÌV6m KÆÚ-dh‡ØJ7¥KÊZ*æ¢][ìŸ[[);¹ˆ$’\„•Ýæ¦Ù˹ëÅb™ÂÀ&-’“ L–Nl‡ºÉ…4Lv»³ÝìhRJ(³àþö<³g$,Ëúw^}?„ëWïùcgüœG¯ÎyNìððиåwF}€þ#¸€ƒîà ‚;8ˆà"¸€ƒîà ‚;8ˆà"¸€ƒb”@äÄb±QBïø‹Ãp¹#’£iÔ¿¶>«V«ù|~pÛO§ÓÉdrpÛw™;¢G™»þÝ~ç»áμðèø÷ØggþèÙ …€~Û¸çЯkÈÈÜôBi»_;c•Ëå¹¹9µµTÛèe&“™ñ•J¥î7^¯×766fggrè“á¾Q€HšŸŸ_YYQÈ®T*ŠÅétZ/———·¶¶Ô®Õj6l{{[Šòó>ëošÏQ×êÁËl6«‘ vþ@îz1==ÇÕX\\\__W£X,ªSAY_É»Åñ\.§M²»»ÞÚ­[·‚¶R~ÔéáXÉ>šÜœT£Ñðüp,­§©3LA?ü2<@Á]˹¹9{i_± æÀ6ÊK€žD÷ß­ct +•ÊÞÞžçgîêÔRmõ¨_T*tnooë6"e÷Á[ÊÙ+>›¨Qcè?™ F™¹Gújeôà°¯ù׸] ÓMOçŸ(ræçç•q'“IýŸ][[ËúÔ¯¶Þ²¼^¯Û_º"µ}°n‡ ³>ïN + ¯¸?ÈÂY#ž–ùö÷®Œö04¯¾xnÔ‡€>Kù¬­Ü|uuU¡<ÍA¿M¹³íÝËûús¬“‡9wýÑÖ=„uœ×¹cx˜ˆ›(Šé•J…È>*dîbzzšéòå5FÊã˜sŸ6çÞ—oѽ6αògd¯üé·Â/ß{çµÁõpµL[VÕË.yl²¿¿¯w†Îdv/RøÔδV¡PÐfggs¹EzÃœ;€þ+—ËŠÑ÷·|ݯ›Ífu>XXXP|O$;FÇÜœ”b±U S,VDjŠ)yÏçóU_÷Å{µ5¥ùZ±X,ê aW»ã¸˜–p"õz=“ÉXÕ0Åôt:½··Ô›ÝÙÙñü ÞƒUô–Ö + o$|={ð„…u¦ezCpp"6¥Ç‹ˆµTòÔóîÔ _ypp 17›Íf××××ÖÖî½!¸#ªÞ{絡õ´~Ú[óÓ»ù + T9þÒÒÒ½Þm4ÉdR©ýææf÷_â Átžš® ®––’[Aö|>¿»»Û‘¯•ªÉ»²ò¦™ôðå¡étZƒ‹Å¢}° + 6ýœDpÇ:ÇnWº—J¥ÖÖÖ2>ϯåÛ”¹Û37Ѓ‹&Û^=iìûXÏ?ƒ¹ªw ɹ¯ýæoõöíÛ7nÜ8sæ̨}ÄèÖªaáš_Ǫÿ¥<›¼ú"’Áýê[¯Œú&Ç£­¿í¯>öÝcm¢ñËÚ/~öïŸþêú/~öÁç>W\__W èßb,Ü«jF%’Ácî¿oýç/þ + åZþ×O?øõ¯ÿ7üîO<1ª&G$k˹Më·‹ÞÝ™{økCeèïVþAý³ÿùÕ½6xæÌ™ëׯŸð¨¨-‰Ì}3ýÀ\ü¡Ç~Zûq‡1úän3³'ßWËD8¸wæ½iú=wþØôð|ê _ü½ݾÐ4¸|ùòÜÜœ‚{2™|òÉ'ÏŸ?ÿàƒöñh1L + ‡5Éçó‹>Ú­ºÀ 'è3™Ì‚]”Ùh4²Ù¬eÁ“¡œGmôÙ—þðOþòoþñÔ~·Ã»?婧ž:}úôÙ³gŸyæ™K—.}úé§C;H Y¡P©ªvSíþÒÉCgp…ƒt:].—ëµT{p»+wôߧþÆ7_›šùR7ƒßÿý—^zIYüÔÔÔã?þÜsÏu“ bLØݤ±XÌî)õüzVDLKµ½; ¾bºòwkkiU + lÝ™™™àZI½Tüµ-(ݶ‰DâXçÅñðj_¹\Î*‘©­ž~ýøã,ÂÓ2Ž–™â®&Ž¿8õûßøæ«oþðï~þñAЩ ÿ•Gþ@±ûöíÛmתø.^¼xêÔ)ýUŸ?^Aÿ‘Géýè1`v+éêêj&“Q,V[¡ÙŠˆmmm©]«ÕÔ©è¼â›žž¶aóóóêÔKý×FÔi÷¸zw>ØYm\ZZ²"ÀÁ  sÝ1Ûˆ•¥´#ôB·ÑZÏ$ÜEpG'­·§^}ë•.¿íøü©©¿xúïwÿ9_ûÉÿgâôå¯ÿèGßÿì³ÏÞ~ûm%Po¼ñÆÕ«WÛ®«1—|Ï>ûìý÷߯?Å?÷…'j©-34×ÖÖÔØÝÝU,¶”Ùæµõ–¢°’wÇõ¿Ï‚¬–ußöö¶ÍÅëL°³³cqYÑ\=Z* + ÛºÁݪ¦›ºc ¸c€î»ïó–~áÊ¿?ø· + :••[¤~þùç?ùä“Ë—/¿ùæ› + ô}ôQÛhÌ}ž%¥]&ãƯÿÕ³áa\-3Á—“SSSž?tÚò^s á‘Öè~¶¤sݱ¶GhoÚ©Û˜sÇÀûZVÿ=púáÖ·”•ë¯ôå—_þðï_¿þúë¯?ýôÓŠ|üñÇúÀ®×ØŒ ›:WÐTêò©S)|°´¹víZ0—bEÄd766¼;õdº×6Öa°íÈ¥¥}¤èí‡2w ×ÿø¯µT + ïyß¿×Åô¿õ©­,þÒ¥K•JEy½2÷á(ŽÉ®jUpWÐÌår6K“õé]µ-’...–J¥xŸ·I§¶Ú^°XòwG™L¦‡µ&Ó2úÀ®H9Ö*víy÷W@*¦k•jµÇyt“ˆÌ@‚{ˆ”¶[-FïîRb‰D"HØÃýjk•ª¯ó-HMÂÁÐWËàx¸Zæ$»ZÆŠ;Z™05 + …‚~´t:­öææf½^Ïf³Jç+•ŠT§•V/‹©Tʪïª3¸È½sE0£ß¡•xÂiLË ª¸Zf(.Û=ŸV®ÝóKþ®­­YÕ›x1Á=¨ + î + ñ³³³vÓS¸Áúˆà wý-Âu¬Š`èŒà Ÿ”³—J¥………z½~dåô t½TR|0ÎLa _¨è'{G:ÞÙÙé\Q'{LGÐS©Tï6øãu™;€…Ëu¾¬x¯ÞRæžH$,sl[¬{Dü.qµ Ž‡«eN±«eÚ*—Ë™L&x,†Âú„ÔO7dîˆ*®–O©TJÙº]ô2 *[w}6´B¾è€/TÀAwpÁÄÕ28®–9‰I¸Zc‚/TIJ‡ð˜–Aqï"p$2wDñè€ÌDpÜÀAwpÁÄÕ2zÔT>sÞ{çµAïÂUdîà ‚;8ˆà"¸€ƒîà ‚;8ˆà¿Õh4òù|ÒW*•:Œ,ù†tXÇGpà> ÖÖŽÅb + ßFnllÌû2¾{ÜòõýPû…›˜D¥Ì³³³ÕjuqqQ õLOO¯­­y~ö­—Z*@§R)©×ëÁZ²»»k+–Ëåýý}­®aZ]ô²R©è- ›šš* + «««ÚŽ¶`«¯¬¬h|ÓñT}Ú‚ÞÕR=:h#ZËo¿”»ÜDRf ÊŠžŠ¿j(¤ªçàà X,ÎÍÍiŒ"²ÞÊårzW^=z×V¯û²Ùìúúº‚ï†ooooggGkYd÷üm9¾ÎétZo©­mnooëdL°;mG{TC©*FÜ™–IŠ˜ + £›››j+ «mùµâ¸rm…T…`õ(IW6mÓ,EŸÆ///++"ë¥Fj],Ù·¼»‰"µÆïùÔÐËà-­¢íèbÛQÎÁÞ¼y38U Á@$Yn»¼víZ2™L$6Ó–½¥¤;‹Y¦¯­k9¾Q»Z­j©Ð¿°°`jèe0ÆÚÁµºN!Á»ÙöT1wN±‹X”D×jµó!v•Ý*¿VÞ­ßw•’Û×°ÚŽNÖ©Fx³ÖÎ"jŒd¦sî´±±aw0+¢¶òt›–ÙÚÚR¶ëaÔo߯ê| ø®·ÐÕ°oes¹œNËËË…BÁÎÖìHÛÑ.´e…õƒƒ-5x?q3‚;€è ¨b«}et*.+¹VÈÖKeâ6Ͳ¹¹© lÔ¤+”«­†rsEvEmµíûÒ ÓÖÒÖ<ÿ›U· ƒÎà”þ‡·c§Õ¨fÛMl„ÅbßþÞ•V¼úÖ+Z~õ±ïöûˆp4ýò{ûÍ¿úâ9-Gøï }G=÷qÆœ;8ˆàbÎ@˜3gdîà ‚;8(ÂÓ2vÍ  ™;8(™;€ gÅ­¢Ë¨e칈¤l6;77g´ ü7ù|¾Z­y§wÑS*•¬`ïáá¡ìM§Ó£>¨{* + w8ÚÆÆÆââ¢=wi~~~ssÓJò*Ê+‹Åb333Á³ôôR¡_i¾Ê÷m€VÌU;“ÉÌøìYKú ž˜O ûL|DPgðAA[ÓZ¶}ëiÚ—­èùñ½Ã³ý9w=úÎ…w½‹¼ðhÛ~ñpiÆ”O V«Þe5 ggg­È—â¸NöÈ$åûKKKj+”[m/ ÞÞÞÞÚÚR(שBgŽr¹¬½eÏPµG‚h˜¶®¶£ÛÖÔÈú‚aêÜÙÙÑ»¬¶Î + +¾Áþ²îFæÀŠª + âVŽQI½Â´"¬½¥ «N-Õ^ó…W´U¬pÙ§@l' 5ôÒ†iŒ^ëZÝ`+,lqµþååe­ÔŒ´/{ãñøë¼ÜD"fð@TϪF01<ü¨é±J„ääùÓ2SSSÖV£›,,,„?IŒ‚;€èQ®„Z1]íjµjÏÈVf­m0U6­~KÕd«ØÖtÚPÞ­¬¼áS#ü,ì0Ô½«\þÚµká“M+ èðÌ¿Aˆäœ;•Ü —Ïçoݺe3Ýž?ab‰s±X´Ç¢zwfQºÙšÂ®­b³1:OèsÀÌÌŒwça m×R¿N!‰DÂó³~›poKGR*•âñø0¿SäÃ:E<¬Ã=#üBÕ´½‰É&Á»¼³IÙ}2™¬T*6'^Å.^<òiJÚ—ö¨Gø,ì¶"™¹€ç§Õ­ßR*Èöð|»Ö3A—Û›c™s0¹šƒ§§:†ÌÀäê-Í2wpÁDp=I_+Æb±!×xÕ® îà ‚;€Hj4AF»ùSy±ÕhL$ûûûž_Ø + 4=Áºê±*Ác%!­dÕg5í>¦r¹lÑÒêÌØ»^;µ ¬a·Pi¤íNËp…Èa"¸ˆ$ÅÍ¥¥¥íím+©e¡PH¥R•JE±[mE|ÅëÅÅEõx~ÁÈ`] µ›››ZKc´–m'¼}ÅñÕÕUmD+ÚF´TûÈ*Ú”ÀvT©þ³D¸@$ÍÏÏ[ÆÝÝÝõõu…ÔZ­¦ˆ¼³³cea¬Lc±XTxÕ»APÞØØлêQ¿eâ6&—Ë…OêTз‚36@{Ô6µJ‡ëâ­´¤«Qj¯jG:+غƒú]´Cæ ’‚Ûý­‚£"éÜÜÜÁÁÁÙ³g÷­Ú0++îÍPXˆÝ2#{ ëµ$ã@k?ŒÄ:i7³Z—`‚ê—óížž½w4ÿugîÑ÷ƒ¹œ9÷w~çÌXû=¿{›:<< „BøÅ {B!Ä]!üpÆpÅ~¡ì8bœü‚w§£ÌX çœ{ ßø²î ]ç5 ¿“ ƒBâ.„è + "‘¹±±1–Q° /Ö€õÑJ¶nôlSGcF¶®\½v½”···ii3>F}bضwB_$46¸EG¡[F_˜Tì=aH<ÆÜÉWë‹ao¢k’ûwëÙ?:*ÄeFÓJ|„®Ý2 À³3¶BDLª*ê777Q@Ž³¼h4nê¦[°>é½£†~n‡¼±!llj³´¤NÑ'†‡³®¾¤Üöξ8…à[¸?… Œí?5—}èö¸fäžèÝÊ¢ºKdÔvÂt¸[Æ?lLÊ5k®WŒÍâÙÀÈ.BW@1ÞB(¡³‹†ÀÈbçkÓ\O_6fª .‡¼ÁŒ«äãL&Ãæo·¢íôô4Êp…y¢Z­Ò é“ 9û±ñ;硃dÁ.ûtøíúa˜»²ðñÝ\Vï"f.¿p~PlÜM8jÂÝI EpˆÿèŽ ®G»šÅEð¦÷B³Ä&\[¹g˜4t;¶…7;†ÖÞÐ;Æж/šÙq‹EH?þ÷q5?λ£= 5w!D¿DCÑ£d@+£ýÈe´mkoÆÎG™µþv#‚¶BŠøÐBœH4¹\.Ž¡B‘»BtÄè/ŸhÍ]ÄÄåÎZnNîü¾®¹‹D‘»H*ùµp?¾ûö«ÇW£Ý2Má“úµZ­ç5h>ÔÓv­ÃÞÉì­—À µ“Üa˜} …BS³õõuûà+ ¸³ÃÞù(ìÞÞÞôôôÒÒR‡û÷ûDkîBÿ±éezfccƒ™ ³u²«`|Àʉç͸ !ú›Äa.è‚6Ðe ’¹b˜9‡Wä˜$hˆ˜ù|ž#Œ‰»¢/¼IfÁÜ€‰ + rLøtsŠ1xÏl“PÖ07)<Ÿo²Évb»%«5w!D_x“8Ì‚³hÈ'­PàW=\ + ‡¡ì1®‡Û·o‡|2µ$à 1 qIåÝ·_­&z/´·/ñ2q˜eÚÐv ¡, ¡‘c’À”†JôOî@â.ZÓ‰<…ö„ĆvËŒÐGDÄ\p‡°îîî"òeN.¢¡1Ô¢™2—zÙEÈ_,!»¿ º™ÉdƒsÑ1…µ©7»n‘Å)l2^w÷ Æ3f@ƒŸ\ø3½?†rùrQˆeÞcÌÊ6Kðq#qmh­Ý¾ + –蟇ÙJΉÁ¹4äKDý¸,°÷T[lÓ„%§{/!žô“hE4üìÖÀòþÏÿÇ7¯üðæÍ›gÏžígT|ˆ)‰‘»¯1y™8,”5,q$2r¿þæËÃÂÉááè¯ý•G¿ß•‹ƒß4~ý«_|òÛ¿þÕûŸû\ Âù|~p#ÃÇËÄa±-Ž‰w1âüÏíÿüÍý;¤ÇÿþåûøÃïݳ?þø°&ÄÉ!‘Ë2ŠÜc#ºFܹ»‹ˆÐß©ý#ýÓßýö(‡gÏž½qãFŸ£Rn!Ú¢È] ŒÓ¤'þâÑ_6~ÖÂWÊîƒ~Hâš{ëo$ÄI°¸w»ò+z#ô;·¾lzhjþ _ü“Û¼ZŠ±\½z5NCÜgggŸ|òÉGyäÁàhEœœ¨Äa.PÖ××s¹œ}äªÃT=Ãg J¥ïð9[TNOOÕµÒˆó¥?ûê7¾õO§¾ðÇ-lðo£\.?õÔSgÎœ9wîÜ3Ïù$¶AŠ“Fÿ‰Ã\ð o|Øu°ž›ùÎd2èˆ[*¹q½Cè[¤¸‘¸‹ÁóÀ™‡¾ùWÇÆ¿Ô‰ñ{ï½÷â‹/"Š{ì±Çž{î¹½ìFÞ%ÛÝÝe[›¾1jÏ ŽÍõ º¦+þD°§ÝóÞ!îµUáy\=T«Õ¦M$î¢ ¯\zØýïÝ·_u?Õê‹cúÍï\>söœ[ Ñâ‰'î½÷Þ£ZAÖ/^¼‰¿ï¾û ÷—.]‚ôòˈcÀ³Äaè”ÙÁ˜> GØ + ´åÚHp'¹ µÕzF¿8Ë~qD™¡=á“P莭ð˸ sZäãÙl6ëþàÁšG%¶L𚻈èJ×ß|¹Ã»Ÿ?5ö·Oÿxë_Šÿø¿HüÏ¿üõŸþôGŸ~úé[o½…¿ì×_ýúõëMÛÂæŠáÙgŸ½ÿþûñOå ƒ{'V¹eFχÙÁÃA1Œb6>|Ëǯ8<ø·žyáŸlÂ_ƒ– 8`8‡AH¾Ûæ뉻8Fî¹çó½péÚ¿–øx*9uê•úùçŸÿøã¯^½úÆo@è?üðæN`óC`vRr›üÍ›7¿þwϺfÚ-3,¸qãÆk¯½öôÓO·HNðÑG1”ӛѩMóZ$c¡Fv¹¼ + c['ét:0 5øÛ°ZÜÔºÃ83™ F…)ñ8×4ø.Ú¸c›30öç7uŸ­e~ë™ß”¿ƒý5:ü³wcײšÂ0e f©£¶*)rqðå¿ú{ÂÁŽ²¦Û€2¢ø+W®àŸâzDîñ Ttg‰Ã`ÆÁÛ•újµj“ˆÑ9s G¾Áƒžñ-ìHPÆ©ßÆ×Õ.O÷+£ëè/Lü„ªö¹…Î×ÜC\~á|ÐÓÙ׮]ƒÊã ŽŸ}ö+•8l¤ð,qÛºƒï<‰X?ߢ+ÚI‘»uÎ.\¸eg,ñâÅaJÜ…g‰Ã¢m;O"ƒ¬“¶CRä.º#þÈ=ŠrËÑEî"© j©$Z£Ý2´[F![ßᆦpç_[3fè¹—À µÛÜ^­Ç†ñDº[*;„ÉŽzÊ´$îBÿé!½“tÕ]t%î¡Œ`ƒEâ.„è Ÿ‡qÌh‹&vÇ:Ÿ“²ýÚñØc4c˜ß"McSzΖÜÝPIePù^¢5Ê-Ó̉‡Æ1ƒ + ‡æI¢àNÎ,Èe.—s‡ííí± S}ál6›…8.,,4 ·I4Fs4AóZ­Æ4aè…r<55ò¶½½P|›8¬P(Ð £åð,Ìãng„jã#Ú2ŽûÅÚW«UÌjè eÌ%6• =ü„Îâ«…òÌ + ‰»H*Ú-3"ø—8Ì]ᚉûí)vÇ,`°a ŽŽÜ‰á82‚uˆÄ]Ѿ&]e,ZsBô…g‰ÃB ‡CÞ)mÏ‹à‚ÀMãÞUF°Á¢È]Ñž%‹Âõ}®&µ <àj— v©}ˆO#KÜ…=-£x¹‰Ãpl4¡Äaî«iJEÎçónÊ-· ßOä\ÌÐh7qXÔ/)h¿½½Jf%ØÕbëŸïfBóJ¥‚ÀŸc¶–öG:xÓw‹ßpà(·Œèå–éå–I"öE©™™øö¾á©¹‹¤¢Ý2" î¹\.”Rxô‘¸ !DbKä;@´[F!}zii)0Ñ7>➟Ÿ‡ÍÞÞžm¶¶¶Ø°R©ììì 9ÌÐøX«Õp + fccc+++ù|~àÍs¹ìCã©àgqD æ8A+/Žån$îBˆä™¢ õ„þ¢IEÍîîn©TJ§Ó°"ãT¡PÀY=jp–Í÷ ËËË«««ß5ÃöövµZE+*{`š1>怅…œB>7771ØÁX? ü G0HÔ`ªŠ¸kYF‘H ˜Ñr¹Œ2eÆ×ÐqÄÚTH0j¤#šæ2KÉûl6 -†"ã#,у}ÆÝ! Ô°ß6 €öšÀ¦úA æ ;Â[·nÙ©"f$îBˆDBnzÜßߟÍd2\i + O!èN¥RŒôQƒ¶Œñ ÊõzGHÿôô4+QÀGkÃ2Í1…س°l:UăÄ]áÜÄ‚ ºÑh´X¡ì"º?<…Ûª3BrÞ†…L¬DÁu˲EPÊ"L­¹ !ÊhÍ]!•JÛwéá#¤a> + ˆ÷iÀ„ÀÐ\”Ç |×.P“2 Àk{‰€J{¡ohEÿ¬ õņÑ÷ïö;´æ.„è‘ï]x縻xåÒÃMë!ânjÆy + VfïbÈÉÉI&ù‚Žcà+“ïÏÍÍ¡ )gn/onnnll@Ê1U`æ¨T*¨Á)¾C•¯ + l ?pNo(,¬*«Õ*ÎÂeÌ + 9ÃñþXw£È]á PUˆ8Ó1"¨‡LCay + "‹JQ^2¸ لـ+1' ð‘f°ÁGÛ–yƒ™X˜/qe}6›EC›3’7{'&&bÎó.qB$(¦}!j`ÞªaFìËB¯Ujû"§À,ËŒ±ŒB'N¦§§Ý+‰Q@â.„HˆÁPCÓQ®×ë|G6"k4_aŠhõ ÕÛÂ&ô†iq7¢ò + î»°]` œE,¿¿¿ïN6Q`ÐâÇA"×Ü•É]ˆN±X¼}û6Wº³`ÂÀ¹T*ñµ¨ÁU”N¼AvÙ„«1˜'p0>>ÜyHÓV¨Ç’ÉdõsÁ½)ÉúúúÄÄDœ÷Tù²‘Dô²ÿâ UÒô!&.‚wød¢ûÙÙÙZ­Æ5· 7/¶}›úBh8Äwa7%‘‘»B&¬ŽÞ¥„Èöð~»èLС“‘}8VkîBˆ“ ¤Ù¾=Õ3¹ !N.½…ù‰@‘»BxˆÄ]!ü‰¸˜93™ÌÎÎN`23A£­±mQÃ,Á°aJHf‚¬˜Ó‘Ï1U*:Á‘yfhÀðè”@±ÀG¨`Éîpt3DƉÄ]‘H ›sss›››L‰ãÊÊÊüü|­Vƒv£ Ň^ÏÌÌ &0 #m[Jm¹\F+Ø ý¸þ¡ãù|NÐNpD¹m¸ÂØ…ÍRÿ»D´R‘H¦¦¦˜ qkkkuu’Úh4 ÈÕj•ia˜¦±T*A^qÖŠòÚÚ΢õŒÄiS(Ü •}&œ¡z„O4i±/ž©%™¬¡=:EG˜Øö¸~‹f(rB$û¸?38BIÓéôîîî¹sçÜÇViÆ´bneÛu6t3Mº5ÝŽ3þäw!D"š3¯ 7r3DœA:ãkÆË|;æóy˜Á§˜ñBÏÔ’Ñ^hÀøG›$’½ãºá¨rnÊÉ8ò² “I !D· çëG=3¹óm‹†PÖÆ\.chz£Ñ€ÐCÖ+• + ŒCËîÁÅ›~’ïa=+[,Ñ°SÞ§B†ƒÃ îï,†Ç°ÿÖ„Wܺu«V«áÈPj| Ùloo»6!ÐlPæ + >ËQ38ÁÑ­ŒÖÕEtT10Ì”¿B1tþsI'0}‹´ìÉBâ.„8épõ¼iáä"qBÑn!„ð‰»BxˆÄ]!dIEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/border/doc-files/MatteBorder-4.png gcc-3.4.0/libjava/javax/swing/border/doc-files/MatteBorder-4.png *** gcc-3.3.3/libjava/javax/swing/border/doc-files/MatteBorder-4.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/border/doc-files/MatteBorder-4.png 2003-06-19 10:48:46.000000000 +0000 *************** *** 0 **** --- 1,20 ---- + ‰PNG +  + IHDRô–§ÿí8gAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ *3^†2D“IDATxœìpUžÇß$„LH`&$@@ 9’¨ (Â?wOWƒZ§U§&qÁõXªLÜòÝ3ä¸òOg&w¬·Üe†««:Ù“LPPþ™  èIYLV’Dù3ò¿»gî7ýÜÞÉ$ “ÉLfzæû)ªëõë÷޼̷¿ýú׿ÖØív ´ˆôøˆ;„ wA î‚@Ü ¸@q€â!ÄBˆ;„ ¤ªC£Ñz + ÞƒoàÜ*±«“@ÿ·ù£ŒŸohhÈÊÊ*((ðÓø¡Í˜@O/Y¿ù+çÝío.þ&_v„’Ê›L&Úæææúcð¼¼¼ÊÊJŒÀ¹¼dË–-•2ä¯ùn||<½h·ººš×Ð.YoÚ¦¦¦òJ1›Í4rJJŠŸ&òÀ¹¼„ {yy9Š‹‹FcQQÒÒÒHÍ×®][__Ï›Y,–ŠŠ + ª$Ñoooç• .ë9Ëe”.Ô¾°°ðÈ‘#£öã„w€—­ÖëõT A'e§m~~>í’(“¸+>ŸšñJ2ã\ÁI¾]„ÛÙ¤ &~M¼âð$Ö\è ^ ç]å(‡¤œäÞ¥F)“W¢HâÉûûkê¡J Ã6êý» ½/Ùp2ìUUUdÏéG£Ufgg“”SË7â•Tnooç‹55V†¥q*dÒdø°`XÒ¹«:ZxݧQ"Á ãa´Lˆ‘™™YTTTPPPVVV^^žžžÎd“εžc2™x8cii©âßé¬àæï”eÿý¡J€—eÖm:Ø €QcÇ[K=à{¶Èð2íêêj‹ÅBZì¼C¾›Ç½xú‚Õ¯Áš;ÀgÜÌb+a0`Ô@œ;=°näææÂz + 8w€¿ðn)ø„@> M>kîá_s÷Éß›zŸàç×.*¬,-õÍMßt´]jn:7vl±Á`xñÅ}7A,`q<¨P¥¸ÿÈÁ v#£¯5}ú̹ ã´ .¯OdRßýìQçÏÕjÇéõ£ÆD‹6›$Ú%ÚJLm}zbã®Z×ÁÃuü„çµýþ.㳌ãCvT¸aý¡åê’rÚ^¿rN|ÐêÕ«ÝwŒÕŠû@ñêìì|o÷áŠ:qR,]'vÎ8óÅêùc—.]ªÕjôŠŠù°üãNÛæ%Ú®XÙ…ë쵕Ú{îY,‰6Q²K’C¿†$lÇÿâytû-ÇçCÿªâßIÐ{ºÚnÖfúôé ,p7ŠÇL\çz¥?é…J—š¤ Ÿ{Q³q¿èRƒh :T+îNH’ÔÜÜœ1Íž9O¿øþÕL—Ì¢bY×UÖÝÌ„îi"©So÷#«³^¥DÛN]foÖk^2¶¯·G´ÙIÅlÒ÷mÂy|bLä-ÆWÐ'¦&Ï}àJý×nÚ¤¤¤8‡Lx͵k×¢ö<ã\3qýK†ûkfäõ¤æÛ7—:×ÌÛü%¢e@ bq_jàCÉñŽÍŽ/=î?ëŸ"G3¿20IËàkʃžxßñ·:W/b÷¹é4?-;vüäÃe›]–bŽ;–ššJâž••õÐC-[¶lÊ”)Ïé/P¯›^€QÄMâ0gèŒn4ssséW_)ãI‚‘ÀŸ*..æwª««‹ŠŠ¨233Óß$ qð13fßûðÓïÇÄNtÓ†¾ê¥¥¥O<ñDRRÒ¢E‹^~ùå}ûöuttŒÚ$Á(C¿qÒVÚ29uŒ¿ÓÅ|§§§ÓñJ8OŸNBO qÀK“æ?òìêâgxÒøÌ™3ï¼ó¹xN·bÅŠ×_ïîQ555t5F^IßHêO5$©d™ÙŸY¢-âÊÎSÛ›ÍfÞ—¶Tf²ôó¡âe¨=o Ä¼{ˆósO\åÉO‘§«žô&äQñ² ­»Þl’ñº©<»ãà‡ÿpõrRI¢Ÿ±p&i· CöªÙºukLL Á²eËHô.\èýìÿ!é$Ý$_\PP@×az½žä›¯‡P ‰r}}=íR™¶ÙÙÙF£‘~ÑÔ…Ž’Úæää˜L&ÞR–Æ$‰/))¡É1uq~TÕMÞ1~”S¾ËO0|}&99Y©m îÀƒO]tú¾š[…Br¢ct?}êߎ|´¥þÛøœ;¶ÿ»===G¥ïÞN:5d_j³OæÕW_MHH ¯ôç;±×pé5#ÿ¨5ó6»Þˆ@´Ì° Uå¹yI I…IÜIFùSH………<3;VÚÒoä•ÉÎÚ`009ÇïBšKæ·$¹§¤ìT¦Á©‹"ß2?2fLôʵož8T|îäJ%¹r®Ôo¼ñFkkë±cǺmÛ¶ÚÚÚK—.íܹ󩧞r“œàòåËÚÅõ‡*w0JÈÊî)sçÎ}QÆÑñÄ Ryúλ¹ ÙÅN"FÊî|³Tqè$ýô[æϵñ*ίaR⦜+=Ä¥ ]ðÑ9O)七`g‰ÌæÍ›IÙ¹—ߺuë­»QD‘fÏ“ˆ îë'Â-¯™&€‰’5ͺM'¼èèÈSxpƒëª`TðJÌM9*Mð̓»U:y .àÜZñUËàDË€Ñ2‚¨UÜqa @°Á£ovT£Ñ NêÂ%Ö§ðD1<Ô¸A­Ë2¢q ¸àQÂç™ñ<ðœN&“©¡¡Áóǵ:wA°z + Æ“|¥¦¦’W"ÖÉVól_´ëlØ•c¼·ùÃMÓ& õ:wˆ{¸ã«|/ƒk[fX˜Ífž¨]©!զ݊Š + rÙÎ-IôÉÝ——— †œœ*§§§çÊ(m†• ¸A­â.`Y&ìA´L@âë¼ Ãóë’ÅæéÀ”C$èJ0jÃ=xrr²ó‰Á|…ZÅ]tû¾7À¨¡$ó ÃÊÜ Zqܾª Èó”î´uY–’ÆÆFç×êºÄÛÐhxy‹w¨õ†jÙ^Ï_ + UÊÊÊxÀâ-}7i·QF©±Êî5juîwÕʯ£ þç3ÎOœ(B\YYÉ_ºd6› —x¥å©Á<Ç‹$bá rË€áÜ2#!LrË(/Jerº.Rp,>juî Z&h!qÏÍÍmhhàïÏ ôtˆ;À÷ŒZ"_p3ÔzC€ î‚@Ü A´ ˆ– a-‚ÜPª„«$àf`Y¨þìb g@PçÔ + ô7@ÜÞb½èßñu³ü;~HqŒ€ƒ\k"£¯5}ú̹ ã´ .¯OdRß]íQçÏÕjÇéõ£ÆD‹6›$Ú%ÚJŽ·ñ|ôé‰ÁoMžqøŒÎÎÎ÷v®¨'Å2»½sÆ™/VÏ»téR­V; ]ṪåpÚ6/ÑvÅÊ.\g¯­ÔÞsÏbI´‰’]’úFÄà$IjnnΘfÏœ§_|ÿj¦KfQ±¬ë*ënfB÷4‘ŒÔ»·û‘ÕY¯Ò¢m÷ÞC§.³·?ë5/Û×Û#Úì¢h·ám<#Ñ2`·Ûûûû›ššfÎœ¹xÝû,zëiaM'ú¯×V}}üý]‡­VkooïGŸ¨©9kÓhûÅÈ>Á.j´<¸ê¹Å±v;»|åÒzA Ûnð’ä£VçŽH ‚ + I^IÙ}F|ç…9¬é+ÖkaBg]]Ýë¿¿¸ÿ[fé!o~¢«Ÿµ9|ÓŠÙ{Ì¿y°W%¡_²Ù—ÎO:tá;¦‰E‡²Ë+3ø‚µ:w/È ˜ˆŒŒ<~üx’>*""‚‰fqSÏŸ?ïÿ·ŠI² а‡æ³ì¿bqcÙZöôÛû5Z—$Ò¹ï~èìc‰‰IdØIìþ]‚s)juîtíè)þ‚ÍFŠ,µÜ©ÑvaïGeEXñÏÙwßqõZóÔ¤i3­¬Ø½ãð;ÿ%'ãòå¦ÓuW_yï“|úþ ê~½·{ãÝt9®D‡g—ÈÌüµŠ»ˆ%9‚ŒÙ©©›öÕyù`ÆtöÙŸØ9ʨ¿ÙÞdZûumëÆg LèÊzüï\ø²¹ùú²V.{éW»7¯¼·ðh—ÀV¦²Ç³î²võóe™@ÿ!‚Z—e,ËLDFF¦¤¤¼ópÄ =;z‘|厨UﲋŸN›¶ñå¢Ã¿Ýð鶦Mœ²â¥‹ß5~ºïÖÑôXÞ¯WÏb;›ðú“?‰Ÿ˜ØÕÑe÷!ªuîø# È3>##ãÍ”¶ &LYü4³Ô³˜‰L?‹ED[-7&OIb‰ó٘؅‹2þkÏ?½q…Í~ð7wtJҴᆱ¿v­Q¾E­Î]ðA†Ô—0yêœ9sbãƳØi,2ŠÝø¡ëâ,~Þcÿôñ²_þ–I"뼚úä¿>ÿøŠÖ³‡Ù•?Ì^ù\¿Ø×/y­ì•••[¶lq.¸iV¨UÜËö~è)!õÛìq‰3YìTÖt²§ö@ì1©—Ùl¬ó‡«ïõœ-gµûf$Ïnnn¹ð¹ùO‡v^½Ú9fØK†ëuCCÑ#G˜¬àEEC¿ãÁÍ¡F­Ë2wÕ®ëz gŽàÜ 2ß’d%ÖÛzõÊÿü*:Z›üע.•õZ™F`7®ýñ|íì9·G¶}}ÛÌYw<úÒÅýÛÛ­bÿЙgÜ`4iKšNª’’’™™éÒÀl6WWWÓ¡ììl½^ï|ˆêé(UÒ!þ + o:=ðsssy ߥ2¿\føÿG­Î}ˆtE`TØö··z + ±9ÒØÁÞ××ßÖn>#y||RÇåZÍ4¬ã2?=ë¹¢qãbo›µ€Íÿ¹tá@__ŸÊNÔÔÔ0Y”‰Á®¼  `íÚµ$ýTÈÊÊr>D²žžž^^^^RRBêN5©©©å2T ]jf2™¨o^^h^©:T+ÁaØEGÎQ"‘×ÄhcoÜèêéºá|豰ȱ,vrÇ7˜%þì56ïav¥zÏž=QQQÞ}\qq1msrrÈk»"½6 Ô ¢¢¢ªªŠ|:·á’l²áU2iiiüÄ ÔPA9Oµ¯¯¯§J&›}ïæX îï±ÛeM—•]æʤéQÑãEÁÖ+jš–2¡Ÿi&LÛxlWïÑÿ`gÿ¯îäg“'OöÇ»IÜ™,â489q¥F9Ê×pH»IýéÜ@­¬êPAÑq¾>㲤£. îïqH¹ ë»`“IøâŒÍ.ITyÃb!¡ÿfßïXKÉL¾sigWWggg\\\|||KK‹ÏçÃ帬¬ŒÎ:ííí\ÁZ­V^Þ²e _²ollä5Tàš¨õ†* àI%yÁ]rHº#a/:{ÄèqºŽöö––6.žõv°ñãXDÔÉ“'÷ž¬fÍ]ãâ&Œð£M&Ó`-N“ÉËË#Îï¸ò¥ ½Á``²…7›Í´›““STTÄO F£±°°p„³ +  îïq¬Ã¦‹\ßå÷lØä´Ž½±qº˜8]{k[›µ»ïÐÎÛïz€M^°fÍšéÓÏÛ4‘Ý]]#ù\²äÜw+ú®Ä´Ð!RpRv¾öBZo±Xø!ÒnN§¢¾äßiKç :ZZZÊm>)¾òAÔE¥Ñ2š>¦ÑhÖm:áEÇí›&±ƒÖŸ + »ÀÕ``Ñéûj2Ž{ÑqÇ[Kr5‡Ö‹­üB´Û¸¦ËwVåä_ŽrLœÞÒÖF õ"˜}îÊg»/njjjmm½åØ8]ƒ×쬹¼Gt¼XÃ!ë‚มÊ×ÜEž¶W´se',m­dæšO–›Íf«ÕšØi‡w€÷ˆ‚$:ܺü‹›ùQâÉË;·ìîÈ°§¦¦~ùõ)Q„%÷;Xsxw‰@U|îó™ îoÑͲxЂeA xYfû]ŽÇ l~n¢_:nt%$Lê4c˜mBfëna]-,RË"£ZNšo›Í欖Κkkk;::n6¬#kW­’˜ 㻎ïö—ÔíÜý®ãTŠZ»Ýî­µIŽ­\°ÉPØÇjÇ÷Z-½céŠ&ßû 7‰§+š29ISWWçaº"Œ@ðóþêõú´´´@Ï%èP«s÷wº"Œ@SPPššš•••žžN[%Ç@“”ò‡ªUÜÁ&*‰FæÔñ–,ž®ˆê[ZÚâ´1ŽtEšž®h³á¿/]ºdóìGÆø3F£‘çm§‹Tž·}íÚµžÔM)**‚¸{ŠÃ‡:Ë&?÷l— Ž'ž»;;í’=&N'ˆö6kwí¡ìû,qîš5k~™}¿6v¼‡éŠ0>ÁLIIÉòåËóóóÿ¿½3ÖiäŠÂð¸cW‘ˆŸÀP¤W)åÌÅÖNÊTà*é€:…á <~/Ú*M€:…¡Ž6@!e¥Í¯ûk¯&¶1^=w¿¯]Ÿ¹çÞY´úç̱çœ,T‚ìv».Ë.•W_«Õô ›b룤_a¾nϤ;1Is5>88¨ÜÙC²Ôø™ >"È´š¼¼¾-#{Ù1 ú^r“îªæÜÿõç&–+úóýûW_}-uË>üõúõ«ß{÷Íwë+++³”+b}€yóã¯óÞâ—Ÿ¾h—ˆËóî4°ºâ£&H[×ÖÖ\èQ:®€,Ž÷[­–Æ’rW|Ôä^¯w~~.)×­BwŽ<ÏeÑ)Y²P0ÒÓ4°¯ÖÑâ^MƒqšŒý~_g5YcÝöóýcý›ÊFîs.WÄú•Cª*w‘^õ’i)¬OIdeÔQãïEG»¸{_û†¡A졪9ú}]P^»›qÇ~~{{{rŒuƒýeo£Ñ(¹HeÅ}ÎåŠX`™‘bºM¶QŒ#±7ž3~Ëj—è(¯ÕÕU5˜e‘­­­ekôQմ̼˱>À2£¼ÓéHÓG»ÏµbjEÖh§ãMËî`üYìâ&Mºm(îVTî]'|ÆÑLí¢³NËL¿ÜÞÞê©¢Ìདྷâþæç?²õ‹`}€48::zxxp¦; ÎRswÇÎ>eQfYM²kgc$Áz¨×ëYè”ýTH.»Ä½Ùlf!êwÂ}"º’³³³F£Qæwª•ìÄU„NLé±À/TÍÄ—˜œŸñÍ&E÷;;;ƒÁÀ9™¢‹¼øl=í¥å³:KB%#w€,„Õã‰‰ì ºžŽß f\di_Ž­êªÿI³›h/úBþˆÜàËåea~% rHÄ Aw¨;8Öjµ’k¼,jkÄ Aw¨$÷÷÷±FãÍÍMÞlrÆf³yuu•…ÊÀ.Ð-ÑWW Ö—„t%È·×tô{Lyž{]gÆüCxmê <ð+Tšéít,Vˆ,Ä*‰t³Õjõz=€Ô±Óéìîîi·ÆR|éõöö¶,Y(}-µÝnW^š#/¯S\_:Þn·µˆ½ˆŽûF2-¥ ð±Jeù½Dø)$T’ÍÍM—¹¸¸899‘¤‡C)r¿ß¿¸Lãññ±äUg£(Ÿžžê¬,²;÷œÃÃÃâ @F‰¾ Îx‚vÔšr™ò»xW³ÑYðµ©6Ò]Á¾óú[L‚È*I|Ýߥ¤ëëë×××Å×V=M–âïÙe|6ObÇb¥É¢ås¯³üâˆ;T©¹ëº¸p£3à + œ%âÒ_;^vw$;¶ÛmMÓrÅG ½KKŽïâ Žß}ŒE"½»žžºB_€£xû–É‚Ó2.&ð¹(w»;gT² £õz]vWrw·ƒÀHÕÆýý}M–¦‡C ½d=ÏsMI»gŸ’?±ü¤{€Ønã”7õ÷´ ¨pðq (ûß ‹cÑÿ× )îîþ(¥ÖÇ‘9———Å9#ÈE7ÍÑØ|ǧi‹ÆqËS[Œ_U ,²ä/ÀÂQøï”N"ú)eÙ«â_:ΞO, \]w€á×2 ‚¸$â ˆ;@‚ î ‚¸$â ˆ;@‚ î ‚¸$â ˆ;@‚ î ‚¸$â ˆ;@‚ î ‚¸$â ˆ;@‚ î ‚¸$â ˆ;@‚ü9 gv:+e<IEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/border/doc-files/MatteBorder-5.png gcc-3.4.0/libjava/javax/swing/border/doc-files/MatteBorder-5.png *** gcc-3.3.3/libjava/javax/swing/border/doc-files/MatteBorder-5.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/border/doc-files/MatteBorder-5.png 2003-06-19 10:48:46.000000000 +0000 *************** *** 0 **** --- 1,33 ---- + ‰PNG +  + IHDRô–§ÿí8gAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ +{žçÔ‚IDATxœìpUžÇß$„ü…$ °Á$€‚œ ꊆ€àîé*¨uZuj‚+žÇRpËRtÏ$Ç•`­gÂë­w$V]Õéž$A‰òÏ€€¢ „²VVˆ$ ù3Ý3÷þio§g2™ÌL&Óߧ¨®7¯ßû½_™oÿúõë_[‡`†aÌEØP;À0 Ãw†aÂâÎ0 cBX܆aL‹;Ã0Œ aqg†1!,î Ã0&„ÅaÆ„°¸3 Øw†abáôŒá°X,Cí‚ïð/Ž ¹3†ÄaL†úk 0û÷ïlj[Ÿ-d+ôÛ¬  ÀÏ3:œ„‘~›•(ø3êëëq°k×®$û:Fg† 8+×}©ý¸eÃÜЯÊe‡ùT>ô¸ö«ï¥¥¥Øæææ†+V¬ðçD8P8rgÆ/ ˆ‰ + ÅÅÅøØÚÚ + ³( €âÇ@^QƒöbK{…2§§§£233óĉº.êXÂ#øÅí©eyy9õÅeWk¤ìâÇ =·äYPïW ‹ ×fnG÷8Ëiii~}×Åa¿€Æ•••-[¶ ª‡2¶²2ÔY’¶… R3ì}øá‡IëëëqÀ®ªªª„„„å˗뺸Šî81qôÍÈÈ ¾¨qµ†½Œ£#Bèóòò`åM›6©6Ñ&C¡¨¨§4ËÏÏG ¤º$”³YÖN(aЂÞhƒtrÖ‚)î<-Ã0Œ_@³ ¤ÐDb¹TZ]@å¶mÛPF*@׬YC h„¦¹SSSIÍ)|ÖvÑÍf@|±Uu:K rrr`ÖÕDQ ?¡Â4î… `‡Ü Цh\(;¶ð“â®Æéè…fT ãtî|ã`µNjuœ®i øÞÜ`,î Ãø "m…"sñññTFAxQP½k%V#\×½nA3 + ´µPA«×ZkÊÕÕÕÔ§œ!ðÑÕ&ÜVG§‚î@t¾Á,ÒÕ¨eŒ…“ŠzOŸ½94¿êå 3`Œûwk²)ÄeŠ¦!”ø]»¦€í]¨@½SRUÔ—••¡€ {é: ®®NÛ…tS[Pm’ŒŽ²Cá¶Îu„êŸØK-©v‘M¸‡½Úf8H¹::E§…ö«Ð‚Æê;U + 4íCf›¡ŒÜ ½Z™ñG@W‰„ÚJ/W˘5&¥9kš¯HLLîâY¡È.BW4€bRx ¡„ήPŠ,z?7Móék„rª ]ÖYC3š%‡—––fffRwrn·¢oVVÊ0…óDEE5CG²I ;…Qãw:yp’ + ê´—GçC¹* Ͼ|d¨Fg‚ÌÖóõÇF« CM¸½©!ÂÝ AóÑZÍ¢Ip·÷B…2Å.$¸je½BšÂ@ ¾°¦úàÙF‡ýŽEÍT? + + ýøï£Ùü`ÞõžsgÆ_\CѾd€Vº6ðG.]ûz¶æeìÜW3ÏG"ðRH&xðDchrssƒq#4@päÎ0 ã¡?£…çÜ™ ±uã< éfã>ÁoÖ9w&áÈ1,Öó½>ÆO¼^-ãzR¿ªªÊç9hz¨§ß¹õN¦o£ÅUor‡á웟Ÿï¶YII‰úà+ÐBL/G§Gaëëë³²²Ö¬Yãåú}?á9w†aÌš^ÆgJKK)3P–N(=à + e‡ÄÓÍ ÀâÎ0Œ_˜&q˜ Am Ëp’rÅPæºÚð&Ç$ŽˆÙé‚ //< ,î Ãø…i‡©àÜ€ä˜ÚÀ¦6§ï¹ + j]Ö0mRxz¾IM¶´[²<çÎ0Œ_˜&q˜ + ö¢#=i…‚îáRÔeÑZ°Z­:›”ZÎPŽ„ ÀâΖø)A«q½ê[)1eâ0•,…~}ÐeYÐyŽ“Ni¨ÄXÁÉ= XÜÏx#Oº5!A£ek¯ì©cž­ºòû…ÚšqÏï¿üö½ÚšäUŸyS³ùþ^¿‹Õ»$^-ãè#"bšp‡°ÖÔÔ ò¥œ\(¸†ÆP7j€ šRæ’ÞAvò@v½t33318Í!:&aukM7‡Èb + j2^íêøƒf” mÔó“þ”Þ€>êrùÒ¤•éƒP.8PV³6,îL?xÖn³ + ã=fJ¦VÒ9C(18M iAKDý¸,Pï©zX¦‰–tzPï%çA~ˆ‰ñ„kø9Ð*§¾‡íg•o466¦¤¤øã=ÄdÄÈݬ1™2q˜.k˜á0dä¾ååqCíÂ0ÂõÛ^¹ñÊ€,´^­kjøº­å»¦†Ó#GáB8///p2C)‡mr|0¤¸ÿÀžU½>†G66üåøÉÓ£c¢fÍš5*!IÈÝnû9Â"Îœ>“0&bD¤d·Ë’CÆV’dÿð“#«ß¯Õ®öÇ>w¨å¿ÔÙs»í¨rÝúýÕËg!åØ^¹tZ’z ´dÉÏ݆ñÊ{oñjoo{û¾ªsÒ¸X\ó¶O>ùù’#çÏŸÕ«WDô½wÜ>=É~É*Î^¯.Žºóι²d—d‡,;õË-ÃÖþçÏAÐýÚ'¡YõôÎŽ–¾Ú¤¤¤Ìœ9Ó“¯ó¬þ™õqÏï×Õ$¯ú̇šÕ»$] ¯–a ‡aÅ]ƒ,ËMMMs&9²¦'̽g‰ˆO±¢ã²¸Ñ$l7~hd P§®-É~ð>‹M²oß¹÷ØEñƧ]åóFvwuJvTÌ.»™ ÎöÁˆð~ì«$$¥§Þ|梁¯<´Á•²vÏ466FìxJ[3fåîïŠïÑÖL^sЛšo6Ì×ÖL_÷¯–aL€Å}å±Þ™"œ7çÅÖ/¼î?å_ª¬f~©w’(1‡æ”]ÒP _ûëµÕ³ÅÝ:ÍÈX;jü¾²uº©•C‡¥§§Cܳ³³xà L˜0ÁkŸþ + zõyuÀ‹a•8L ”’’’ÜÜ\õ‘+/Sø =UTTDwè9[Tfeeõ54§`Ìä©w=øä;ѱc<´ÁocÛ¶m=öXrròìÙ³_|ñÅÊÊʶ¶¶ 9É 7üO¦À°F»Ö²[ ß™™™ˆ–TÒÂyŒ¡÷â†Å úÒ܈ø1¹ i«jãb/‹-ÊÚô$†£^øf´ s<䣽999Ú/\ü¸R355µ¯Ä–žsg‚€ëJ³ß]ÓßRH"2:þgOüû ê¾ù!ŸvÛÏwíz«³³óàÁƒøËÞ½{÷±cÇÜöE›J…W^yeìرø©,UÐÞ‰³r·®×ä5}¨™¾N#‚WË “%SGÅô`eS ‡oéñ+röUËtá›Ô…¾ j ÇЀ†q4ÐÉw¿yÇ|€ÅDFŒˆ\¼|ѽEôx*MJýúë¯777:thÏž=úsçι5‚6(e%%-“çÕ2¡ƒÉ‡é|ƒÿªj[7¨^ûmôÕÒÏyÇthÃi ¯Æ<-à :óî[‹IÉ3\w!*ǵùæÍ›kkk¿ûî»wß}÷‰'žðœàâÅ‹Êù¶Æ† ( U‡ļ­ + ‡Q5BŠìÒôº.Œõ Œ¤§§ e¢ª»µ†áàgff&¼Â)ñ8Íiл8¨Ö·‡(ö§#Õ>[Kù TËt¤ô=¨ß†—G‘Ýu.Ë-䥬ÁYª¯¥J¹3Áà¶;Ç!¼oõÕšþ”ʈâ+++ñóC\È=xŽ2Çd‰ÃÐŒœWgê+**Ô$bdœr`DzƒYv88 + Õ”±ËË·ñ h•§ö1´ë7L2q˜3ÛÉžUúuîLPð~Î]ÇÖó„O9³Ž9•Ç[›ÍF•ÎÄa[–j›bZ†‡!ž8Œúj÷>‰˜?G1 úu‰#w&Ô™§°nÝ:(;Åòëׯï¿DL–8̵¯÷IÄ‚ ëD¿.qäÎ ŒàGî®PÊ_ÿí³FîL‘;cT5UâZëeÀ«e†aLˆQÅ/lfÈ¡gë½\âZù×o3Ê:àó(Bqu ¹½<û\ j—Tz %cèë)S0ª¸K‹;Ã0ÞâCz/JB0 .b@â®ËXŒ*î6›}¨]`Ɖ™‡‘Ïè‹.êŠuzNJWõGM1FÍ(Ì÷¦Ñ->gKî£ÞP•$÷áN ò½¸Öpn™AYÀ ñÐ8Ê B‰Ã„ò$‘ø1gä277W›8¬¾¾žºPª/ìÍÉÉ8._¾¼®®NÛÅ5FwtA÷ªª*J†QHŽ322tÖª««ñŠ¯&ËÏϧfð–ÜS¡Ü8ÚåŒPm|D_Ê„£=p„ö8«a,”q.QS‰:¡‡Ý^š.ÏL 0ª¸ÛxZfØëeBó%ÓÎÆÐœ‰öÕ]4eCŠÁ1öÄ0Á¼Ä¨â.y|ßÃ0Aì‰Ã€2‚£Î¹K6¯jf&X˜,q˜Äã0HwJ=çó"pA Mã> Œ`Ũâ^¶Óû—2 3ˆPâ0È–š8 •t‹U¸„®B™‚‡c/Íe Mâ0ØŒfeeù8Œ^oD‰Ã\­©é½ÈIè;öBèÕÄaV¹Ð‹Aз߸£—(¨5ŽÞó-cF–Yý~­òh&Øð7Ϩ@Ëè‰mâ0lëêêt‰Ã´¢F t‰Ã ÈyyyÚ”[Ú.ô~"mAÛg h´6q˜«5º¤ öÕÕÕºÄaês3ÚhTûôn&t///Çù€|V[ª_‚ðâM߾Àùe˜Á¹eüsËõE©B93ÑÛû†Ö%o0jäÎ0¼Z† ÷ÜÜ\]JáЇÅa¦‚–È7€õ†*Ã0 ãw†aÂâÎ0 cBxµ 30xµŒ?ðj&hð UÆø™Ý›aLOË0ƃöj/&¤áÈ1*¬ï ãw†a|Åz~píÇO\û¦†Åa?سJ_ÙØð—ã'OŽ‰š5kÖ¨„$!w»íê‹8súTTTLB˜ˆ‘’Ý.K[Ùù6ž?9âúÖÆ{X܆ íííooßWuN+ŽöÉ'?_2cäüùó£¢¢zµ‹ˆþ â£÷ŽÛ§'Ù/YÅÙ+âÕÅQwÞ9W–ì’ìe§¾3~ÂâÎ0L`e¹©©iÎ$GÖô„¹÷,ñ©""Vt\7š„íÆ,áêÝuã¡%ÙÞg±Iöí;÷»(Þø´«|ÞÈî®NÉî$‡ßÆã7¼Z†a˜àp8zzznºé¦¹Ï¾#"G‹Î«¢áHÏ•Ú꯿óþ>«ÕÚÕÕõáÇ»kjNÙ-Q=Rx·Í!Y¢ºÿ¾gæÆ:ââ¥ï¡õ6Âv‡_’ì7FÜy¥Ä²2“²ý¤ôæóÓD×¢«UØÚÏ;÷ÚÎïúF´v"6?ÒÑ#Zœ|â©;Ês—M’m=²Ý1FòÞ³ß + K˜$9•]™™á¸¿5r—øÙ J„‡‡>|89!",,LŒˆqÏœ9s×ëçÿ·ZÈJfÌËþFÄ»kÅ“o첄E‰¸d›M>ýí÷íÝ"));Ä޿˹û‹Q#w\» µ Ãü»Š,_½.¡Örvç‡e…»EÑ/ĽwÜz¹±ibò¤É³WmߺïOí¿Í™sñbÃñs—_zûã~òž³gÏýzçÕwàrÜb“œ1»Œ`žƒ7¿1ª¸K<%Ç0!ÆÔôô—+뼸gNŠøôÏâtñ¢ˆ¿ÛÒPºü«ÚæÕO [Gö£ÿ4óìMMWÜ»xÁ ¿Ú¾nñ]ù;lbqºx4ûvkGMË õq˜£NËØxZ†aB‰ððð´´´7 ›œ ž{^º5â¾·ÄùO&MÍXýbá¾ß­údóZ•4aÑ ç¿½ðIåÇ¢­á‘¿^2El}dôkÿ4qLRG[+{1läÎ bŒŒ5gÎœ i-£Gž0÷IÑZ'¢Çˆ„)",ÒÚz}ü„d‘4CŒˆ5{Îïøüg×/‰©÷ÿæNHžôí·uWy•D`1jä.Ùø!† 1äî±ã'N›6-6n”ˆ$Â#Äõï;Î.§?ò/-øÇß Yí—Óÿ·ç]Ô|jŸ¸ôÇ©‹Ÿé鑺{dŸ•}ÿþýÚ‚‡6à + £Š{ÙÎ/†Ú†a\{쎰¸¤›DìDÑp´³vwì­¹KØí¢ýûËUowžªµ•“S§65]=ûYùŸ÷¾{ùrSøˆO!X,ÒëúúúEÁ Ý¿ãÁÃ.cÔi™Õï×®Üxe¨½Žð7Ïô‚oY¶K²èj¾|é~•ú· D|ºè² + ‹M\oüÓ™Ú©Ón oùê'7M¹õáÎïÚrÍÚ&õ¸Ï<ã’’l¡éPí´´´¬¬,]ƒòòò'N`ײeË´»P½¨Ä.zç5Nd077—jè#Ê°¿Paà_ÆÐcÔÈÝMº"&(lþû[†Ú&±;ÓØm6GwwOË5kÊäÔQ‰ÉmkEx¤°„‰¶‹bTJö3…11±?™2SÌø…|vwww·Êjjj„"ÊÀ5*_»víòåË!ý(dggkwAÖ333+**6mÚ„º£&==½B|D³ÒÒRô]±b + °@•†Ã°âÎ0LÈà Ø%gÎI†È[¢£b¯_ïèì¸î\øÐÙ*ÂGŠØñm_ïv‘ôóWÅôÅ¥;v숈ˆðm¸¢¢"lsrrkëvA¯‹‹‹Ñ ªªªººq:…á$axµBFFÔÔóBûºº:T + %Ø÷ÍÏ¡…Åaßq8MW”Ý&9ƒw”¡é‘£$›½K²4Ü&l="jìè‰7_8ô~×Áÿ§þïÜÑOÇ?ïJ„¸ EÄa‘¸Z£î¥9h7Ôç·:«ƒ‚ªã4?£›Ò1,î ÃøŽSÊmŠ¾Ûì²M¶ÙhrÆîeT^om…Ð]ù{ÑÓ!Ò²Ro›ßÞÑÑÞÞ—˜˜xõêÕ€ûCr\VV†³Îµk×HÁµ{­V+• + + hÊþÂ… Tƒiº90ê U†aBJâ(+î²SÒ {Qhï”"câÛ®]»zµ%>>Qtµ‰Q1",âèÑ£;Ö=µôö˜¸Ñ~]ZZêªÅ + +V¬@ Nw\ij…€Ð %„///ÇÇœœœÂÂB:%”””äççûéUèÀâÎ0Œï8ça éé»òž »’Ö±«=6.>:.þZsK‹õF÷Þwo¹ý^1~æÒ¥KSRÎØ-á7::ü!9Åݪ¾«kZ° + e§¹h}kk+í‚vÇÇÇ«»Ðñ;¶8O`ï¶mÛ(̇â«¡‹AWËX†ð©0‹ÅòìËG|è¸ååqbϪ•Ç†ÝÂÕP`öñ»kæö¡ãÖóçj6ÖóÍïýRYþè°“¦+wV•ä_Îrt\BkK &Œ&7/~úÆÙ} ÍÍÍýÚþãñ~Íž?ðœ;Ã0¾#9_¬á”u›ÍyC•æÜ%JÛ+9HÙAkK3‚¹¦£åååV«uìرCëöp€Åaß‘l²äŒÖÁ»d£e3?Hd”¬fîÕjíÑÚçµchì„(ªoåOl­¯m­ÙùôËäØiÛ½{æ½|OÏòòr“vEÄè~ìúÛ××788Øésé:²š¹·Ú®ˆø]ÎôôôÀÀÀÈÈH±XÔ1õèBlRÖæE³*îÛÛ;ÏR£ÑZrZ« Á²]‘úWWÏ÷ÔìŠroØ®èÊÌw<ØiîW&>@73??oßvݤڷýâÅ‹>©})•Jˆ{³ÔòК`í„÷ž«¡Q{ãyóÉ“êójÏñÞígÕGë›K?|›üñsrêÜ… ¾û,ÿö‰&튈ÐÍÌÎÎOMM%Á rnnζìRyeñ¹\N÷ iQlý(éWš¯†Ë3©áJLÒ\µ'&& + WöÐM€zr5|OÞ"¨3½QP4Ír|÷ìZË“ ïm.ÒÕ=÷íà?·§]Ñ£‡{Ž÷IÝ’g›ÇŽõ,ÿöӹ϶¶¶òù|3vEÄh’ËW~iõ7¾þdÏ~‰x½=ïX@ «5@ÚzöìY=JÇuPóýÑÑQµ%åv|Ôà………›7oJÊu©Ð•£\.«G©' †‘¦†ç*Ž‚;šÓt˜:õ©«­«Âx µ¬“Ù̽ÅvEÄÈRU‰¸Mz•ÔK¦¥°þH"«NÕž + ÔOôWï+$ľ`¨‘ÖPÕý˜Îµ¡¼vãNëù]ºtISß`ÙÛßßßæJ ™÷Û ›‘bºL¶QŽœnŒ¤µñÔhò[VOI'jVoo¯Ûj4dhh¨Û + }du[¦ÕvEÄèf”ƒ—J%iºòh×¹VN­ÌZííxeÓêw2þR<ÅEštÙPÞ­¬ÜºÞðiD#µŠ>õ¶ÌÁ×€û÷ï뮢É{&Åýò7&‡ªA|€8¸víÚúúºwº“°aâÄYjîêØÉ‹]”f¢Iv=Å»1’`Ý + …$TÊÞ/%W¿Ä½X,&!ë÷†ûžèLæççûûûÛùj&+1A¡S|tð U³çKLÞoòÍ&e÷###•JÅ{2õSüðâKkìi-­¨‰é®N—ÉÌ iuãF‡DöUO¯MéÚ—c³ú…*ÀGÒì"Ú>‘ÿ2wx}9\šŸ ÈÜ"qˆÄ²ÇHàs¹\›=^:µ4â!ˆ;d’µµµÔ£ñÞ½{Ix³ÉÅbñÎ;Ip¶AcÚ“ÎU]‚5Æ–v‚ü1`OG¿ÇT.—DGûÌx€„×¢~Ê ¿B¥‘^NÇz‡Èv‚¸@&‘nŽŽŽ.,,ØRÇR©466V©T¤ÝjKñ¥×ÃÃÃêI‚ad:×R;77§Y£YŽS_:>99© šè :ªí É(”NÀK¤.•í¯%£ImÿrëÖ­™™IêÊÊŠyqqq-`›ÆëׯK^õi*ʳ³³úT=êw&î1W¯^­¿¨S¢oÃЊŠ©)<o7-‘„_‹j!]<·U‹½ s€L’¾îoG)éÀÀÀÝ»wÏŸ?_ÿÚª‡©§þyvu¾tŸÄë&ë{^õ<ÛoN€¸@&‘šÛ×ÅÆÞWâ,w’îüÚù²«#yâä䤆iŒ>²ã£„ÞÖ’«x€ówS“H¯®û†ýÎÐ'à,ÞsÛI‡·el&ðª(w¹;ï¨$AF …‚úíäîj]®ããã,M_YY‘ÐKÖËå²ïÚvO^lþ¤ö“®â~w°EãEý=mª]@»gèþ¿QñøñãJ¥¢£”RëÇ]cnß¾]?fš¢ ƒÆ¨í|·‡)ˆŽõ=û-ÑxVm “–¿Gé¿·t’Ñ`Ëž-wxÝñîùžÂÙqˆž–ˆÄ Bw€AÜ"qˆÄ Bw€AÜ"qˆÄ Bw€AÜ"qˆÄ Bw€AÜ"qˆÄ Bw€AÜ"qˆÄ Bw€AÜ"äfÙ—ÞZ¶ÜÏIEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/border/doc-files/MatteBorder-6.png gcc-3.4.0/libjava/javax/swing/border/doc-files/MatteBorder-6.png *** gcc-3.3.3/libjava/javax/swing/border/doc-files/MatteBorder-6.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/border/doc-files/MatteBorder-6.png 2003-06-19 10:48:46.000000000 +0000 *************** *** 0 **** --- 1,23 ---- + ‰PNG +  + IHDR{–°ñ¿´gAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ (8þ-ŸËæIDATxœí pTUšÇOçA:I'Ý‚Ã+ ºJ‚Žˆ…`@‚®Ø*§vuuvÖÇŽ‚媫kÂÔÌŽîŒ Tù jnMíêÎJ‘‡Y”A†yÈ$’…!Ýé$ÝI§ûÞ¾ûÝûŶ ÐIšîÛ}“ÿ¯¨®ÓçÞóÝË…ó¿ß9ýó™E  Iñ¾À0ŠÐ(@? 8ý€âôŠÐ(@? 8ý€âôŠÐ(@? 8ý€âôŠÐ(@? 8ý€âôŠÐSw5™Lñº4ˆ Øâ¤Ä÷ò<·?¾7tcýË·Äû@üÁ¨ +  P G(@? 8ý€âôŠÐ(@? 8ý€âôŠÐ(@? 8ý€âôŠÐ8ïVëž»"Þ·0¬ùÙËçã} À¨RqTv<Ö·&9í\óׇ¾8ša¾á†²l¹Bî¹hS%)õøÑ#fs†Í625%M + dI‘éS’xÛþ'Þ­ƒý0öÅŒ}m@¿Vq~ˆÛí~ã½]ÕõÒ™BQÜã¾øtÁÔ³fÍ2›Í?8/5ý«>xçPàšÜÀ™vqâ¼xa¾ùÇ?ž)KIVdYíT°}ÈPPY–[ZZf\©Ì½Æ6ó¶Â:A¤f + ÏYÑÕ"ü]½'™’uo×} Šï¹Ãä—ïmÙùçÓ╽ö[Fôx»¥€"IJ@¾È¶˜°Þ>Çð3ÇŠ¢ø|¾æææñãÇÏ|ä-‘–-º[Eó~ßùºšûÞzwW{{»×ë}ÿÃí‡ ˜Ì>)¹Ç¯H&ó} ïxhf¦¢ˆÓg¾¥æ÷Ó \¡ìÊ>ƒÂð>Ž¬9úï}!ýî®Í^—ð»ëëë_úŸ†þ"\Ýô–Þïñ §ú.ož7y³ýÅ…^¿$û}r@™55牓”$IjwÒ}ßá°Þ>ƒÂð>Nrrò¾}ûòm©III"%MXÆ?~üÖmøï!kïã$“¸{ª(½NXFˆíuâW>2%™…%ßï—žüÖÝ#rsóéÕM=L}“Ë}ßá°Þ>ƒÂð>N @Ý@n픨ä<±åýM«¶‹Õ÷Š97M;{®eLþ•ã¦Ï¯~oý®/Ý¿]:ãôéæCõgŸ}ãÃyà¶'êŸÞÒõÄM4î0ù%õí-Óký‚W8쇷À 0¼â“ + žÛÚ¸ç™3ÆŠ¿G×ÌKýëuÍËÔ9žøéá÷/yôÚŸµ´œŸ=gþì•¿÷üü[Ë÷züb~XR|c»ÇÇ£ØÌ>g(Œª&Nœø»{’ÆÙÄÞ±ãÙi©wü»hØvåäÂ'žYµëõǶ½¶B˜sGÏ[Ùp²iÛÖEGóâåO/˜$Ö/Î~éþ›sFæz::Ât'Øo€A1|œéY3fÌøÍDgvvöè™W£H)l“DRZ»«3ot¾È*R2o˜>ã?6zgç1yá‹·wtþ•'O6ž;×Úo¢HØÜ¿—f((Ž{Få9r¤§«[d^)’S©Sy>ͼùÑÅ¿ü@H=B–„÷lÁý¯þ}ê Ž#»FÉòäù9k>èñÉêN°@”ŠCȾ€’dÉ/2Lj¯÷t7íÏœv·½j`›ûÛ³Ÿo²ZG¦çO7aò—ÇŽoµ§$§úüRrJŠäX-ì ?#Ô 7u½ß/{gëþðxÓÍéyS„µ@}uË~ÑyîËãuçÏ;Ï? L)Ó­1"½ÝÝÕÙÙ)ù.¾°öe€cxÅ ¨Ñ÷Ô”žŸ³­}ì¸ Y9ù§ëDrš0%‰ŽÓ"klñC«2224éZ1õ^ùÄöžžž÷%Ø Š[qd9 Ijè½$SÏ2¥›3;;=ÝžNIVD·K$™yǶ‹€È½ëqÍ=âLíæÍ›SSSa?*ö,FÇQ5è> …Þk^ܬŒ0gyÛ]ÞSËÞʼ[Wd¹ºéÿÞ—oNO¯¯¯ÏËË3™L°™öˆ £ú8ôê–üÚÛÛý2´±C€zUvº\ÔÁŽmý½ðyÄĹþj–Ûãq»Ý‹%''§µµö/Ó>‘aTÅ¡ÎC]ˆ‡ ~õ5®NUP/rwKiVªomuZÌéÂÛ¡ÎV$¥jÔ(ØŠ}"ðŠã—ÕW·¶ÿ®öêV‚ý*øA`~—×ïp8 + + + >;ðgIè öˆFÇÙ´å³Zí¬þö£b€È0ªâ¨ Rb†š)– Rbm_èð|ˆ£*ò1õžHH «8?ù˜Âƒç„¡ 8ÈÇ<8õ·ª ÈÇ<PÞÇA>¦ðàù€„Âð>ò1…Ï$†÷q)<Ãîù´7ÄÖ¾uRlíu ¯8ù˜úcØ=ŸXF<ñ²/ Ã+Îwù˜šÞÚè›é¦%»^Ìï“î|¸bô¼•ûý·gÎœ¿sJÙâåO¿ôW÷\—}õ”©VkNKKkŸÀÿ¡ž" + Ã+Ž@>¦þÎÏ‘‰ÆPPäcê‡áú|B#¦,yYœÚ®Fœ?B•ÇŽ;PïüÉ›ÒÒÒvìÞ7~LÞµ×ßä“|ê>BIjd@[Ïg¬õœ>ó­Å’­nÛªmPï¿ÐP`H(Ž@>¦þ–Ï‘ ˆáÈÇÔÃöù 2 1¼â Sx†óó Î[þëµeë¿Y}¯hzuÚŽ_Œjzõú¯ÞyêÁ›-×䊚_ÍØ»"nxö½ŽfŽ ˜=®72@â}…àãDc+ò1…ÏgrAÁGǽ³žÙñè¿mZù¾Ø÷ʼÞ<™’’z Î1®äŸÄÈ©ÅKýÇ¿™Meöœù¿xóÓ»¦¥ßZ¾÷þ·[B#葧³ £*Ž¢h‰sH + ç- Ž”š–%ù^IÍÇ$ü>aÅù˜¼{ßGþXðãa’ ÏG|4Î&úF<³j×ëm{m…0玞·²ádÓ¶­ŠŽæÅËŸ^0I¬_œýÒý7çŒÌõtt`ú&ºUq)LodÀO&íz±püœ‡ûDX²¬jdÀˆì¦ÏØ÷§è ˜»ðλ%éÜ9c"%&FUäc + žO/ZdÀUW]•iÉê èüÖÓð©È¹fñ/?˜ýó×Õés·°džãÈ.qæóÉóòù¤Ë‰ ؽ{wEEEh!Ì9à £þ÷’´ßÔ~¥¦+P´‚úƒB—Û­ÈJºÅJC g{WÝηÅ×ûEîÕ%%%?/½Íœ™5Lò1áù|Ohd@óÁîºí½‘€PýF÷‘*Q·uÜ„É--­'>±µóí³g[’S8B£Q‘S§NíÙ³Gh²²jÕª‹žæÐÐƨñ8ÚÚÂ@oh–„.õ®6TœGºÅ¦ÆkI]éõ‡ö^=¿€ó19Žx߸Nàù0ä¦hÏAxgÏüáñ´4ó„ëg«‘Þvaê ˜|Õ”dçŸ4mÑʆֵµwDðS݆ è“„†¤dâĉsçÎís‚Ýn¯­­¥C¥¥¥6›-ôÕÓQª¤Ct‚Ð4‹ .[¶Œkø+•Éþíƒ a}äc + žÐ72àðáÃBS + âBÿeÅŠeee¤GT(..=DO¾¨¨¨ªªjíÚµT æTSPPP¥AúJ§mܸ‘Ú._¾œ + d+ˆaù˜Â‚ç£sdÀêÕ«éséÒ¥ä•ô9D"²fÍ:¡ººº¦¦†<vXÒrXj4 + Y­‚5TŠ9AT)4·(²ûŒ;FU!Sx†óóQÕ¹ hK´/þVF˜³¼í.oŠwëƒ"ã + Ž —oNO¯¯¯Qd)ŽÐ”…­ –I§„&($IT G¦¼¼œÒè,¨8<¼ê3"3FUœ˜æc ç|UjdojÓ;™%¨L5©©jd€×åÊʲÛúûëî[©F$§·6•dÙb±øýþXD°FlÚ´©´´ÔårñlNÐÍ¡£4žårEE95t´©©‰k¨ÀB3d0ªâÄv×%ê®°oØ|U¼ ¼¬MâÈj Pod@G[[k«ÓjÍQ#²282`ËÁÆKnÌ°d_æ¥7nÜx¡@jçBZÃSË<2bhFc.¡9;v»¾’ËC~ ë SÐßVq~H¬w]‚}íJ¥Î^‘ÐH,:Úmóv^w¦Åšn±¶9œÎö®žoO¹qŽÈ»¶¤¤dìØãSòeFИˆ¨ + ŠNð%:D²BrÃC' rvø ŠÕj ¢¶äéÐ'‰­¬¬ä‰!y›÷·*S7@¡1ó#Ïí áºç®}‡Ë²LÎgCCCVVV?».i¿”Þ]—^ýDXÍÂþÏ <ÞuI]­·c÷ç}|ØïcÿpD>Îú—oÚ$KmA{ƒã‡/@åt‹ª³•$”«çÿ´ëÄ®æææD|~è0v½LŒú[UXçc‚}Ãå«Bd@"cøQU¬w]‚}ÃíJ¥Fzön¤ïœ>V—×ï÷÷FÜQ<'N÷;¼0¼â$''Óà9ß–þý®Kûªæþö›V·ÈÖæ(xץα³¾w×¥u+ï–l¿ãtp×¥¶6Wpäûƒ²Ÿ€ çÈ€ÄÇðŠë|L°o°|UÖI˜jId ¯8"öù˜`ß`ùª@cø™ãXïºûØ• + D‘¡àãÄ:ìî߀K3'æù˜`€(1$GÄ>ì ?#bŸ öˆ†WœXïºûDc+N¬w]‚}¢‹Qçqb½ëìƒÈàGm6[aaa¼ï%1ªë|L°"`ÅŠÅÅÅEEEôÜ’"©¨¨Ø½{·þ×5ªë]—`ß üìù?Åúë~3ó¢õ6làýŒŸzê©ÚÚZRœ²²2ÞH4áÍLõßgǸ>Nló1Á>,k×®¥Lr#´}ÿ*++9‡ «UÉ fÅ£¯¤GäQ©ü”FhCnÂÒ`× u(Õ B0_C_ƒmy£å ÷o'U¢†Á­KyV{„ úoÛnXʼnq>&؃…º1çÉcÈ›Žk‚)_¨0ÀédnlH­¬V+—©0#äp%à®ìF9Žõ®K° y+4h"¡!ƒÝ‘÷A>©OñßÑô 7á4¤eä¡ÿ¾ èëE[Ñ™tÎ&LCªðÂÔÔÔDþ—ÎnŽ!GÍ—Ë&°" ¢¢‚F¦ÁLx¤ìbÄP G9ñ h ÖH ¸ ¦HÈcÊÉÉZª¼K9/TOŠSTT$4ÿ¨²²òRöéNhÌE+' ™Ë}r9Äñ×q梀<±2À°@òƒŠ‹‹«««yHÚ„#húýI›®EW¤† ˜ÀÓ> Kh¾ª Ôó#ˆ|¹Pžh$‘Ã:s ÀP…ô‚³èÅûFb|‹È"£ P€~@qˆÅ44™Lú¯oŠ×¥¡8ý€â5\.Wp%÷©S§„È+¹‹ŠŠjkk…¶©/ãÖÛRMYYŸÃ Çy½øn ^ùÍA€v»Ð'¯±â8`‡.Êу\àøC:“/GŸ¡ëÈuŠ@ԠμhÑ¢àºmú\µjUiiiuu5 + •I†HDn¿ývÞ7‡õ…áþ_YYI­èjÅvB퓸<ùä“d„²ú¤2«[ÈÝ_‚ηÙl|KQý‚_Lj………¼ôiÏž=kÖ¬¡~ÞØØH2QUUåÒàÅÜ«W¯¦>OGƒJ±víZ:J5TÏ> ŸS^^ªJTIJÄ‹­øº"Ù¤&aâwx%]Bh®]”.DRÅmcõ,.|¢FpU¯ó¦îMã—ÇOŸ>=4™O£šÐ¸ªìw˜Ã C×£‡Ö ö>㲊@Ô ‰á5M¼¼›gUÈÅ eaw†=ö,x_>nHc%:ΡC¼.œÔ‡ _x>=þ .%ç«“‡u©;ä`‡ÛêLœGU¼º€¡¹-¼û'ˆ„Ö·srr¨žwÆá-µ–kôYÛ½lÙ2:™„†b¤>¤54V¢“ûLåˆïÆnÁEê¼Ñ×se˜_”'¤ã³BIâð×q"Þÿ×bN[[[uu5}òW’úÚ眚ššÐsú@MH­è*ó¬—/<ŒÐghå…5—ºÄ…w¥ñÜ­pQÈQ + ¦v!ß'Ì67†Š@"Â32ÝûÂÐ@qúߪúÅè P€~@qúÅè P€~@qúÅè P€~@qúÅè P€~@qúÅè P€~@qúÅè P€~ü?ÖÕÞ_8×aaIEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/border/doc-files/SoftBevelBorder-1.png gcc-3.4.0/libjava/javax/swing/border/doc-files/SoftBevelBorder-1.png *** gcc-3.3.3/libjava/javax/swing/border/doc-files/SoftBevelBorder-1.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/border/doc-files/SoftBevelBorder-1.png 2003-06-19 10:48:46.000000000 +0000 *************** *** 0 **** --- 1,17 ---- + ‰PNG +  + IHDRôÈ‘{„¿gAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ' cÃâ6lIDATxœíÝoˆ÷}Çñ½"'·èT'Ø5ŠO¢1S,)®‰h…­sc÷K$Q—>icÛøéI— + bë¹7§£ê$ìùa)Âg + + ¶ + {Š¯8j¢Z2nhqà¤Øùs‰K.®æSÿÏîÝíÝíÞÌ|÷ýz°ÌÍΟßîoæ3¿™ùíÜÐÒÒRËo”]@ïîáîáîáîáîáîáîáîáîáîáîáîáîáîáîáîáîÐÐÒÒRÙeÐ/CCCea£È¨õÙRvôW­Ã1ÀÁ©,\–€€h¹á+ÇÎåÿüæ³_¨þ¨ñ^듲Ðr€€wˆp€€wˆ;@du¿鮵þe)³· =X7¨Ê[<•»A=¯Üªõ„é¾· Ö§ä®ý·ß+·õõ­¿Û[vVAå®[õ+ÕÇ5wˆp¯1.}Fåbƒw¨Ì;éj›pYvÝ|Y¶²÷T©ÜèaåÒ[f`ñl` |þÿ*ÿçþû·{5æÿìòc^þ—¯Ò[¦ + ¸,îáî½eêŠÞ2Ñ[&¡·ÌºÑ[ènzw:„l¦ö>-½óeª‰pzfåì&­°™w rö~ñ¨^oܸ±¸¸¸}ûö²‹ƒZªe¸?ñµ - ùï4~x¾´óôÊ:ÿÝçË.Âú|¡PòOßq÷ŸÝ·¦E\½²ð‹Ÿþ×û¿zû?}óŸ˜:yòäøøxO ‰AQËp7%cÝ‘ì+P2–]„5+”¹›dÿßk?»òóÿV”ëõ—?yóÃ÷¡‡êq10jÙ[F-w'{ÝÃQ ½{ïb}óî-£¯Å)¹Öfo¹Úo jC}þëç:N ú¹Ö?*Ð?¸þ«å¸}ûö·ß~{ƒ¥¢·ÌÀªq˽îÉŽ•Õ+Ù×jøS;Gîºÿ' ÿ±Â4;vì¸té’^{²Æþõiùþõ­è¾[z¶®?VÁ˜€r|n÷Á‡þôï·lùärÌÏÏïÌ<þøã§NZ\\ÜÌâ¡îw 4ŸùÝ?ø“¿ø§›oùí¦Qã½Ùl>ú裷ß~û®]»ž|òÉÓ§O¿ÿþû›VHÔá”éS·îK_þöÖmŸéfâ7Þxã¹çž{ä‘G¶nÝúàƒ>ýôÓ­V«ß%DMÕøš;P5í—‰ïëâÂñomý/}ù[gNýÍÏß¹˜F*ô?ÏÊî7ntœ«•yæ™gn¾ùæÑÑÑ}ûö)ôï¹çž”‘Ô¸·L€ªô–éȽeÜP-ô–YÙ‡þúì¿N,üÏÿ·Ä÷~ñèkg¾ñÁ¼úê«sss¯¼òÊùóçW]È­·Þºÿþ‡3¾Ko™E˨„-[>ùG‡žýÞ¿M½ùƒN#Õ*wRŸ8qâÝwߟŸ?s挂þ­·Þê¸Ms*ÓÈzRº›üâââm·ÝFo™AC¸¢ûoßñ£7;üBO­ò ¿óÎ;­VëôéÓŠ{ w\”Æ7›M (ÙûZfTáTËïýþŸëUMøFãËM£Vù_f4¬V¼R^Y¯ WË}ó + Šj£· P9Y²w뮻råÊk¯½vâĉ‡~ø¦›nê_ñP „;ÇÞ½{;öòË/_¿~]¯O=õTÙ%Biè-S&zËt4˜½eòøOL ½eÖkîÀ@ ·Ì á² D¸@@„;D¸@@ÜPBûýÉ^¹ï–~­ A¸Þ2ƒ†Ë2áîáqCô–4„;0è-3h¸,îáî7T@o™ACË¢åçCŠAC¸‘¥-MÄÂ)å1 ¸æîáîáîáîáîáîáîáÕ2Üç¿Sv záÇ?š/»õé;î.»=p÷½üGP”©®ÿ¬ã‡çÏÿîóe—ýrçg÷=ñ5ÂX¿Z†»’]¯÷ÞÿDÙA_(Ùõúü×Ï•] ÆjyY°2Â"Ü Â"Ü Â"Ü Â"Ü Â"Ü Â"Ü  ¡¥¥¥ÒÖ=4TÖªÃ(±úVFån\e+·\—2ÃÃûwï.»,•VfË}é#%–}B墎=ºsçÎÑÑÑ={öèõêÕ«e—hYsss% Ïs'£rƒùʱ¾?gÿ›Ïvþ?-333'Ožœšš:räÈ… î‡jµZý.ÏúLNNêuÿþýe€kîêazzZY©d×ðîÝ»›Íæ< aýÐÐжmÛÔ^öÄúSѯf¾ÔÞ÷jï_ºtI j mË蘡éu 1C øœ "hd:QÐÒ4——ï1…uyÆF–ï©<›pP + q§¹’ÉÏèYœÂ³ñÁŒô§'Ó4ú3Íû /ìرCÇ­WéP¡€fÔ«ÿôÍÞ‘‘MÓç/`Y„;€zPb^¼x1ý©6rº02<<ì‘èò.«gI3j®­[·zXÝ,D§:B¬ål*Â@=¨ ®µ2]Ãsss“““j«e­€žžžnd­xwS}UžÅKÓaCínµÊ¯f4 ?;Î¥)5ÞU[þòåËùƒM;M ³Š5~Êž©DoXÕÄÄĵk׎fÙ7œ§¦¦4Æ?­ðU”n–¦Øõ,¾£ã„ζmÛ¦1^®I®ñ:„ìÙ³§‘µú›ÍærËWIfffFFFʺ§Zæ˜ÔN‰]!­ã˜|¼Ë_6©u?::Újµ|M&?‹{¦¯ÚQëÒ5cºªSA´ÜÔÉŽLa¤Bv=ÊÛ].¤?Žåš;€Á¢hV³½½´Ü –õ5ók‡–;T×–û… ¿òåÛ,…Éúz|öM•ôgáîŠË“™/³Þšõ=wºj/¿§ô\W~s¥t¼È T\u[î~^D>ÚòRw¨dfff´M_KèV$;wîÌ—vrrR#ÓïÜòevWªééé³gÏ:thll¬cù/dòcÒs0jDá811±\oßöjÒÄCmúZB¯±0RÇ]×izõÜOñ~V‰§WÕ¸r %÷Ä~8I~dztIû'-|éw:X÷N­¯±´þˆå­ºBá®-xnn.¥ÀÜG¼eÞÍÏâ ô ¦gÌ?~\ é]?-(-Äæ¥?—;¬@g^é{ァ6µŸç‚)ÖÕÜK¿„Îó/T¼V«555¥¼N«^ÊI§šÌ«8|ø°Ž%þ,bTZ}ÞîˬÏØʆ7™’Z•âo^¯é)"pe¹ã]V§Çž¤b»~=Ò7ñ¤ðL’4¾ðIýg³ÙÔ–©|ßÌÏŽªî + 8µ}ÜJrKÖ[¿÷±öwYj¤†UÇìpãË!®f²öí~Lhz$´»Çzá{2ëk% gÒŸ¾ä¢cŒÚ ¦ëCéõÈ‘#Št})ÒÚ4Z¾XQîC¢W擵Vô û$#5]ý¡ + ï6>ª¦Ôžõo}`Ñ€ÛÈþÔnÕzLá9|©1~4`á¬n­´(o||ÜÅЫ†5Æ?Mô6£ò¸ÖRe¥ß4ºØ–jÖ7ñD“idÚbÓøô©Íê8¡JOmä·‡Ú$üŒFmZ®Õ”7Œ4&Í«1>R:RÄO‚ôNçmÉ¿cÒžë…èÕçßž ¿¦ÿ„*»ë5¿e–¥á®/]ß‚¶cÅœÚ5úÞõ ºãKzW»„ÞÍ·s5×ëïŠí‹ÕŒ©í¬êIûž¦W+X3j9jTjášLcÔ”ÖæâŸ#[áÂKû)aºlâG‰¦_µi¥Þ½êÂ\J + ?_T[€fÌ>­¨ãfá+¿Un¹{ÏQ­ùa{*ª›®zUu¤wõå¤SüS÷:Ö£¥t=êÕ6²m*s2£oLc´ýxL~Qžø¸•?…7°BÔz¼o{hE/^ÜÑȳgÏæ'ÖF•.ª¤#±/O‰Ë©mÀãÖ±`í·^™¾<¥³ïÂÚ$´QiŸò9¢6-U‡$Òã}J'CšKÓh./'¿|í­ª-D3z!zÕðª;åóJµ‘¸H=ÿºW‰ª>«uPzŒ¶ø´·ø]ï ùG»9»W^²êOµåë0iwR”ø—lZ…›`þå±ßÕŽšfßµkWz–PGZŽOƵ«§û«¾&£c•³@' …ßC«T:h­Kk×v–Zý+ÿ`¸ðŒ¤ªñ%/}X ø{Sªº‚zWû€Û³®…Fî÷âÚ1–Ûô¹õª…¤#¨5ÞÈÔ§Ð÷6ã}Uª‘ékwíôêcj-^ RFEÒp>¬]°ÂÓYÝyÓ*üºRéÒ ·mW¥¯Ë  /S‡pmNÞ•´ø±0>¨ë+Õ—¬wS(k7Ô»£ñnoymNù€Fj£r ÏhZ¦fY¡_¼kЫñ^¶óo’U"ÜMûƒ¿>}ÝÚÊ—»ÒâÄì~™ª'_ãNs]»v---åKÚ×ZlþŸ8_¼éÌdü–{\¤¹4‹O**ƒN»Œ/°.]týHÕÂÈô(¾5} + ŨŸ£­ÓX:î¶W™j3ÿ…ëÏ.&eézK*¤à¯Ei7Vú’‘Ž"N³û²Lû2Ý–tûd¢ÑÅWáS–ºTz¿¥ºvíûA:šª•¯qOVè椑¾°êòó­¨ü˜µ–³ÜvX%.Ëø¹nÚIÙ¦œï$ã§'»VT‘z]ÓÍ%Ÿ8ç¯É4²ˆô³åÜørëÞ×ÁµjÃÔ(;ûqݬT{¾Všn´6ڮ̸“ŒFúñÿÜ®›¿tÎèU$ŸÎ{Ó¬ì/ëRÁTZ ëc¦]¿ndŸ¥‘=ŠOÇÂî¯/ù¹N…gõù~éò·קã¥vu­:¿ðU/¯5rw;DÛ›¢ztèÕ§_©)໩n1ø£å+åòåËù¥VTØá}“¿Ð} •ÇWœ + "d¾Ã‘Üè¯W gUŠkÜáfïÊxFZi2ßëòVäHI ò<÷M¿¦ Ïk_! + \€ü#'ËR•–»5Þ}¢äÛVÚT>™Ó»Ú‹šÍfáñ@ª×üñ¹ð§ZmZrþ¬YhŒof: Ò1Ã÷¯Ò”é|¹£BȪÌ:'ðÙ@þ<ÀÍOïãååOäMS¯ùÆ‘á·¼áªlUÞÏý<}™é C߉ÏZ4Ò×Ò»>?ë~á>YN_¬Wç{_Z²–¦·òOõË?®¯›þ6ùÄ÷Ýì=&ýW‡ÆGõ’‚¾Ñ֬Ο´5:]jÓ¼éQ±ù«‘ù¢¦‘…mrÀéË÷÷Ô¿@1ªJwÐw¼}¿ÇW;ó›ØÚT›Šu7ûÚÏ›}ñ'õ]öÿñx\¡å•ú>mÉí°¥Ð´«¨FS;z)×Q}¢“}í¯¿þzÇwÝT¯k]¬öFíÀéO×£—–ŸÌ=׺ð嬻´èo`zõŸíÛ€hóËOS Y´ñxuk©ãæÚ±ö»Ü:–j“wHÕRÎ!ÜkÇ ‘|ÅQ؈üÉ–ûéÅÃóÜQ¾^xî6OÀFøêyà­ˆp€€*Ñ[Ð[„;D¸@@„;D¸@@„;D¸@@„;D¸@@„;D¸@@„;D¸@@„;D¸@@„;D¸@@„;D¸@@„;D¸@@„;D¸@@„;D¸@@„;D¸@@„;D¸@@„;D¸@@„;D¸@@„;D¸@@„;D¸@@„;D¸@@„;D¸@@„;D¸@@„;D¸@@„;ô)ÉyÁ…¥ IEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/border/doc-files/SoftBevelBorder-2.png gcc-3.4.0/libjava/javax/swing/border/doc-files/SoftBevelBorder-2.png *** gcc-3.3.3/libjava/javax/swing/border/doc-files/SoftBevelBorder-2.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/border/doc-files/SoftBevelBorder-2.png 2003-06-19 10:48:46.000000000 +0000 *************** *** 0 **** --- 1,9 ---- + ‰PNG +  + IHDRô–§ÿí8gAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ!9Z®ªMsIDATxœíÝ¿RÜXÆa±µ¹ñØ\éÚ`BÖÙf†ªÉÇ7'2D‚ã 0ùTÙf˜p‚-ÌW0ÜûŽÞšoŽ¥¦iŒºÕúø=¥>}ô÷HŸNŽVîîî*@.ë{Ý#¸@BwHˆà Ü !‚;$Dp€„îÁ"¸@BwHˆà Ü !‚;$Dp€„îÁ"¸@BwHh¥“w¨®¬¬<}!˜·§”5E<¼áï]-ˆ³jÉ==:SÄKŽ0J÷?üú¯o>þø_RúJùíç” ?üò¿ª¾øŸ ÿýóoåÇÿüò)}¥ìÿZ&T~üãïÓ‹iÐæ Ü !‚;$Dp€„:ë + Écœ%ç®ß]Lñò{b#™E÷–i÷â e)Õ||_/Ræ‘LG³ $Dp€„îÁ¢·ÌsAo™ôè-ƒÒ|{Ëôدã™kwb™Óbé×Ñ›vç4 @³ $Dp€„îÁ¢·ÌsAo™ôè-ƒÒ¢{Ë´gâÝ`³›ýºí±·LE<»G„fzË`*še ¡NkîOÀoÉ ½þK?hèEŒ¥BÍ"¸@Bý÷–áÿŒžØ_¥ÇÞ2ñŒú-b$ÓoÌÃRõ–Á\Ð[SÑ, Ü !‚;$Dp€„è-3ô–IÞ2è½er¢·L~ô–ÁT4Ë@BwHˆà Ü !zË ½eÒ£· :Do™œè-“½e0Í2Á"¸@BwHˆÞ2ƒAo™ôè-ƒÑ[&'zËäGoLE³ $Dp€„îÁ¢·Ì`Ð[&=zË Cô–ɉÞ2ùÑ[SÑ, Ü !‚;$Dp€„è-3ô–IÞ2è½er¢·L~ô–ÁT4Ë@BwH¨ÓfÙ5ÚZçaJûíçÏŸõ÷ýû÷eâîîî?kíü××ךEù_¿~‰_jš+&f_×€Ps0GµFâùù¹‚øÄüJßÛÛk|«€®D«yµ®·µÇox:­¹·éðµ/]=A}p±|FnRŸN Wæåo™é¿· CaÌÃRõ–¡ˆçâÙ;;ûôéÓùù¹jÙŠÔ³?Ýßßõê•›Ý5­Šü<·tAî’¸o‚é6 ªÞ@oHˆà õÿ&&,FobÂbð&&”ºlso÷¡·Ìb´»¬Ìil™öŠè-³.¥ç:¶ fÄUШ7Ìãê"u}âï)Ñæ`À&Žº>ÅÄÞS¢æ`HTïVhV½»¬­7Fx÷Àî¼wss³*†z/+ì‘-fŒ—:y-;;;Î3ÄŽ’wƒñöíÛ¯_¿zÄöÓÓÓãããª5꺾][[«êÞ•â7¡ÞcØ}F««« + ÷ʦ8¾¿¿¯e^^^*¸{šP~ùÞÛ>¯.ƒ{ûy)OP£ýsNcË´WÄÔŘp)=Ë'¨ªž«&®x­ÐaÚ£®«ŠýòåKeP°Çʦ ÅôóósU½•ÙoöP˜öË=>}ú¤¿þ&ßÞ½{wttä%ûNàXßß¿ùö–içi÷â e1)UfêÓîÅAÊbRžÅ_å““Eäh–iŒº®‰››…uM¸e¦1Ô»ƒ»x.'*ÅZ¾–©oÙ•XŽ 6 Æ‚"‚;€ÁP%ZѹL);DFŸ–ök’4£»ÖTuÝÜG‘,‡ØI&0¶ÌsÁØ2é1¶ JÕÜyCfz10 Ý~ü¨ ð0Ê[Y‰:ÑÑt®_\\üþûïº*”G_é£Òyô•GéŒ%ÇGÍ^Õ£—îê#ï1]{ ¥y÷íùSæQºÏFýõâÞ0‡éÆf7ŽÒĵ‘>q{âˆÍ¾GxÎúosWýEW…ß“¢ê‰ê2:Ë#Eu¡ºiåèèÈoEi䙲pÏ®tõg=Ú—½jXªy)Xø½éª;èZrJÙ¢Uï~«Ýð_©*Cþ«Â^ÕáFqG[Þ˜%ê¤úï6™¨¤—¿Ð'îTù÷¥RUÃöQõËnÎÏÏ«º4U:J÷ù6¿O'JÓ«ºŒök5-D)Z SÊV,M7JóÁ=ªþ,,ót¼~S+º¼¼\¯)Q»VfÞÛÛk7êüñª½ãñØée£ÜÄ óï¹å,z,¡þ›etê"Ñå­0í0÷êÕ+¿ÂüKMñBפîšÖï\_«ŒZrÜ)5áG»³hÿjlaU<7ÿÌŠ-QÜ/7»½´Æ™éßNodÖ6¶G çi*f·/ëpm=.ÈëZ™Ò6Kž ZÏh4ÒEîÌîqì'xnlª=•)óæ½(^‡Î­á=ª:òªÀªúýMWVVøM"®ðvÕˆñ¨ó XKÜçÊÿÜ䘑R å?ÃP4þ$îƒ~K=0ùƒ»k…e ÎÚi*ËÏŠîÓ:Ÿ},p€g¨ÿbtŽà Ü !‚;$Dp€„îÁ"¸@BwHˆà Ü !‚;$Dp€„îÁ"¸@BwHˆà Ü !‚;$Dp€„þ½Ž?° CIEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/border/doc-files/SoftBevelBorder-3.png gcc-3.4.0/libjava/javax/swing/border/doc-files/SoftBevelBorder-3.png *** gcc-3.3.3/libjava/javax/swing/border/doc-files/SoftBevelBorder-3.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/border/doc-files/SoftBevelBorder-3.png 2003-06-19 10:48:46.000000000 +0000 *************** *** 0 **** --- 1,13 ---- + ‰PNG +  + IHDRô–§ÿí8gAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ ‹bÊŒ‚IDATxœí»R#Ë–†‹‰ñ¡Ÿ€Í€bŒcj·7­ˆãÓc Ìc!¬cölüäÇ–yŒ 5OÐðÝýÌê^“]% t«Ô÷ŠÒª¼©.­ÊL­Üyyy) /þmÝ €Åƒ¸dâ!ˆ;@† dâ!ˆ;@† dâ!ˆ;@† dâ!ˆ;@† dâ!; YCuggçý…À²yϹæ7–D†àßUWÕ†ó~uæo8<€!eaâþ/þñŸ¿|ýëÿ`Y—åŸûÔð—¿ÿoQÞüïèÿúÛ?Ó¯ÿý÷¿`Y—åê©¡8ÿë¿>ߊ!èsÈÄ Cw€ AÜ2daS!ÆÙp<•âͧ‰S¼ù¼óCf¬z¶L}–eXŠåð¶YX–a˜Ý2‚¸dâ!ˆ;@†0[f[`¶Lö0[R–;[fó:¶œú$–%˼ŽµQŸœ@· @† dâ!Ì–Ù˜-“=Ì–”UÏ–©gbm°Ù™ý¾]ãl™:œâÙ™Cš™-S¡[ C깿Þ%_¥éþ/§øUš~Ša£ÀsÈÄ CÖ?[†!þyç|•5ΖáÏÈzOñ¬Tr—ÁäÁá?þøCŸŸ?N½^ï÷’zú§§'eQúß~û-Œ–(WlÌ^W=Í`0øþýûÑÑQ·ÛMkY;ëŸ-Ë`£fËÀRØÊÙ2wwwEMp‡Ãá$U•¸_^^J÷+â.£4]{•w®º>~ü¨Ï‡‡}žŸŸ___+Ááá¡KèG£Ñ¤–¤Wæ ¨̈=îðÖÛí¶%U´ÝmÙûý~è²ìRá¢Tê½½½(G¹”·R¦¿H4=­KÞ«ZôUe^\\Øñ?;;;88Ð3ãöö6uùýVQ”g”ýË—/jžZòéÓ'µÁ¯ÚVù*gQG q€&!e<==Õ†”TŽ°¤Súztt$ïXB© Y$èÑQ£ô2J:ƒAê;‡ /mu9àîc±4WêRáÚ«¯Þ-–R+‹Ê‘¸§.¿Û&Œ’õN§£*dÑ^9û~½P.m,PÜP€&!ýúõ«4±(Õ9ìMiñýý½T¸Ûí¦Y®®®d”n¦éSÜu3*™R—ôú¨DZ¬Ó÷€ÝÝ]ë¤ÏÏÏ夫L•¬ìV!ãbÇKwhîIUÕ¸ßÃÞzepÕY$¾“ÊT^÷ϨXIð«u…1Uó?~ŒMY¯KÏ¡’§Û_Í; í–© é0‚º.5‚új±Œ ®íA ±ûÇ'yèSòzdUb-÷?Õ÷IÈÑö€ªûÜÝÝ/cšf¬#ï¹ðn­¾Nò÷ß ³eò„Ù2ù³•³e¦ a½¼¼tw¶z®¼ÝnWJÝjµfÑY®ÄRç³³3Õøüü¼¿¿ï~ö‹‹‹¢|THè•¦Ò g”²{t×Ï•3˳ä 0  + áää$¶¥¤î~ñ†\àÑhä™*JæPé¬öÚ©¾šú†dÚ#®²H§ÔåÉ0.Pº|xx8 žžžôh‰yîöÊ%å²´ÛíJƘ:i£¾*{4r,ôOLïˆ + É?\^e®¸Ô]ì…ü‰é=Q!9ů2ߟ˜j·Û6ü‰i + ’ȃƒ‰¬¥S~±G,gÉ«'A¿ß—Ë —ÇÇFƒçó°©ý?ò|nnn†Ã¡œe)õŒÊ^”¾öþþ¾»ÝÝ߲̖®Ä2aR‚WÑc W½±e±e²§±e !0[&O˜-“?Ì–©ð'&€ AÜ2„U˜ƒJ_ë2˜Ò»9ñÜÇ–¼Qà¹@c¸+©‡ÃaDh©à€‹•½é½Óã¹×ëúX2©ä‚Ø2yBl™üÙâÔMˆç{=ªp.ö¿RÝ µÊA‰…Æ­­üvQ0[&O˜-“?Û:[fC⹧⮽777®B%ŒF#—¬m ½ + Qú«««´yggg²8†»Ã,\Üé–€&±!ñÜ+%Di°0Y”×ÌôüÐçCÉíí­Þ$üà0 Ëø âMbCâ¹mU¥Š4»›×jµvvvü6`‹ª[Ò,â9ñÜ‹_=úó¦ñÜÞ¶â§ÄûöíååE®ºü÷%Eú wÈ/6Ýét>~üxss3WÞn·«çA«äÕÄËþ†æIßÕ¶^¯§O;ïK…Ù2yÂl™üÙšԔ͉瞖<¥Š(G Ô¼ËËK­T58­báϽ1Ï={Ï}½bšñÜ+ðU˜ƒ}'ž{Ä2xî) ¨dâ!¬ÄÔX‰){X‰ ±eò„Ø2ù³­±e`FP€9¨<à—Á\¾Èô¨ëuÞ‡ÝqÁT‚òžœœ,<Ô×b¡ÏÌبëSxsö~¿ï°Žív[ŸÚ–eRâ^¯ç^²5‚çMB~·}çÔ[¯Dxw`wïuäôõž:ì‘,2Æ¢N®åììÌiT×ùù¹ì1Xâ.‹Ã¸ÇrNMÞSæ{%*G•£ÄŽ'ãZd×çòrBÜ 1HR¿|ùâèƒÁàþþ¾¨E]×Þƒƒƒ¢ ¸(‹ÿn±Ô#.˜¾¶Z­½½=ÉkXW™Ò\¨ ¥w@`¥O#ýv»ÝN§£½¾(_#\¯ß ¼D”kJ¦Kâê]»ÔÚ†ˆ;±e6bËäÏVŽ JI%ŽÒk)cÈ´£®Ë5þðáƒH.¥¼Ž#&M—ÂF,ui´TØ‹{8¸Øh4ò?˜ü8>>–ìºd? ¬õQQ´ÄÛ^»£‚2žœœøI£‡„ƒÞèSÛvö‹Ÿ¡ffÿí`¶Lž0[&¶r¶ŒôW¢Üï÷%‹Ñ-S‰º®ççgɺ6Ü3S õnq÷€sÙ(‹7T¾ÊÔ^)»ŒR꺔{ûUuöBKzêTìív{©Ê^0  + MÁíõ’¤ì×××cã¶ÿQ¢4rçëËeÄPªvŶ7dñ`0HÙ¿”Èè%5ÒHÂÚö ­ºîÈ{õ—5)]äoÙ îÐ $”’ÔN§ãe¦‹_GG+(åéé©;XK]{½^ÑW…„1Æ6•X¹¤ìî–‰µ™®®®ô,‰€ìÚv¼s©œ¨.P2Õ"£öªŠ7š ¨@3ÎFÜGo{¾y$pÔuñüüìî”v»-oÚ#///oooµËÙ£´n·‘ µ-e÷DøÔ^”¢¯ôwwwJï¼vó•R •K…;±Js§s©Uµ,c9ì:›Ïf¡ÑñÜa6?žû¦ý‰ &±þØ2°Ö[V±e …Ù2yÂl™üÙÊÙ20; ¨dâ!ˆ;@† îÂl™mÙ2Ù³šÙ2•!ôe0×°üÊâ¹GÀȹr­‘EΖ©Ïa¶Ìj¨OYYÒl™zEÌ–Y cn%fË”8ã\âî(óŠ»#Òl©¸,›uÅs\]ø ÀoŽí^”OG³é÷ûþ7¬ã¸‘ÚëÏ%'úÜ 9x‰ŒápxzzÚétlt88£­dãŒï@íEéÂ+™Ã¸Ø¢ æð/Jæ8‘hm¤õUÅÞ”´Z-«¼Œ*DÙCFÉ´¡d*<,Žü®í¹–Žz3ˆ;4»çWWW÷÷÷‡‡‡6:žûh4r‰{·Û}xxPyîÏ]_eÔ.çŠxî2^\\\__+ãññ±#A¿Æs¯„ç•'®Œ···Ê¡%Õ*%g_¹dT¶(¥,~oˆd+8Vˆ;4©°ä[þ²<ë?~Ø8)ž»ÝêâgD߈çîd•x¿¥Ï]Š_iÆþþ~Q æîfìîîFòÙwvv¼,T<ÜM´Ùç^/eu5Ô‡1—z©^#¨«aÌ­´}#¨Ï]þòÝÝ\ãºì?ã¹;˜»ô½H⹧1ܵáà#€°:â¹{U¦ˆõ8;®Ñ‹ê©µîyç}5,w¶L=M}–ÕXŠE0Óܘú,,«±äŽã¹Ky¥é³Äs·ªÊ÷²¥NG#¢úÉɉÔVF‰¸Œi*\ïÑTiýØW—âAYé$©LRô†×Hªd¼¿¿÷vôzýSRjŒÓíؚבÝënO*y î0Œ²4fËd±e¶bËd+1AʺeX'3{8Å b1Ý2/% ) + 6N1@³à] CPÈÄ Cw€ AÜ2qÈÄ Cw€ AÜ×ÉÓÓÓŸþ«ÀÆ™‚ƱNqïõz‹úGûÇÝ~;5b±•eàŸxõEÓï÷eô»izoŸžž*½š­O/Ú[o¿C†VªXñz.3âS°¢üÃ+ÇÖ,¤üIŒ½ ¿ÿîsŸŽÊÝjµü{õU¹¼âøðáƒÏx¥åN¬ÏŠÑ¥UìnFåt:‡F“UÈߣ£#¯<ë»Ë1ß°ŠÊ¼Är·^ïüëׯþ: ööö$ñõèÒ^ LÿýwmHÜÛí¶ƒý+q´9 + øüù³%¸¹¹QbÙWz-è'û7Jøâç¯S=°}¦ôôÕù•åöö6ÖôÑ^e?Ôõ)ýÕ©ŒŸÍŽõ6ur}=(¥N¥KKí|ué¥ÁW×jÖV†xYj€@ñª(2êB·¢éZFß¾}Ó]¡4Úåuªîïï+i´ËQð£äøªìE¹HŠ¶}W(»v)c¬–«4Ú«*|û}úôÉ–ÙÂدQuQ®úXIà ÿd·M·0ŒAüd£¨Uýœ—ÚQS ]2ëG¾ò{ã«[ðññôAVF_>,2z5†yTål¾üzý¤id÷Õ¨ÏX—G ³LWš]9Jc/ÔŠ}l{âˆÍþ‹`›YŸ»üݺå•È=‘/£«<,úÔꮕ»»;¯gXI3¥pg—]üô£}Û{Es‰…6Tš|çëëkÝK¶¤)ªº÷+õŽ×Ø%W.ë’Ã^”r#ÝQË+YÂ'Õ[¼ûdÂIOßÐÇþ(´ógsHªŽaý¨z™ÊápX”gÓ‹UN:òu”^g0Φ¿å9º*¹.Q!²¨@[Ò^,mWÎæ«¿¨HN‹mÙuT»*z||ô‚™^-3M|yyYïÔõãªÝÎn·k{Ú)7¶a~ŸÛÌSÈú»etê&Ñí-™¶ÌíïïëB÷ÚäBz¡{RÏmë=×÷j%Í”ò•]ÅFvuŸX…u7êþ÷*‹é"å±”—nE‹QktNð½$^ɽ€º'*°òÆ퇓N­rMôƤÝ2Íb–£êGµ:ézN:òc©d·Q§Õ'EÇS‡] tx-‚~²Æy—/PU‹ Ô5¦&i;ëâ×n™8§Jé F—VºørÚ-3eÝg€Y¿¸ÛùŠÉ@òí5g…öJ,téηG\I3¥|Ýö÷ÈžV*vww+éÛ%ñ5ÖDêÕE7h«Õ’Z©FÝÀngxßúš>ÜQëöè&—·î‡AQÞäSúÓý” + ]Û(f9ª;û×~ìÅRôEíÈÅOúÈ^©®~©ºô|é«J˜ýùŒøia‹= ÛÝí®Ó§½:/zŠx;²ëú¬ŸÊR½·ùeŸ>ŽâW–ìÇZ`Q¬_Üu£ÊÝÓM¢‹[^ýq¹<ºâåàØçÒ§îÙuc¸W¤žf*6Ín£j±«({¼S»ëV/ËéœÝ{z¹N ôØÚ¤º"WQv.Û¢§‹»"¥~¯äÞk¢Û”º–áÙ=??[VÔ<ÿ¢)?y]¤GÕ³~T}´ øÙÅ4öÈÅ)#»ÑW]Bž­¨ ¿ByÃï‚{BRËK-äuš@'Z‡Z'Ë}âÚ¥mY|ZeQùÚö¥¥ÂÓk¬HÎZ”–VTyù±_Ókµ(¯ + ß)ÓÀÿ³Æþ~»ŸqË})‡à¢m1åÁ+½´úk=ͤq*ã¸(ÍÎx¼1xØ6nxylšb€ªñÙaçôòaTÉñ¤Ô†‡vg¡þ>Tia‘ŒÀ¿fEK¤ûi³ë¥U®L¿Ø^I¬Xi + g4fg#ë°·7äSIj©3Kš@^O«ÕÒMîÄžqì[An illustration of EmptyBorder] ! * ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ ! public class EmptyBorder ! extends AbstractBorder { ! /** ! * Determined using the serialver tool ! * of Apple/Sun JDK 1.3.1 on MacOS X 10.1.5. ! */ ! static final long serialVersionUID = -8116076291731988694L; ! /** ! * The number of pixels required at the left edge. ! */ ! protected int left; ! /** ! * The number of pixels required at the right edge. ! */ ! protected int right; ! /** ! * The number of pixels required at the top edge. ! */ ! protected int top; ! ! ! /** ! * The number of pixels required at the bottom edge. ! */ ! protected int bottom; + + /** + * Constructs an empty border given the number of pixels required + * on each side. + * + * @param top the number of pixels that the border will need + * for its top edge. + * + * @param left the number of pixels that the border will need + * for its left edge. + * + * @param bottom the number of pixels that the border will need + * for its bottom edge. + * + * @param right the number of pixels that the border will need + * for its right edge. + */ + public EmptyBorder(int top, int left, int bottom, int right) + { + this.top = top; + this.left = left; + this.bottom = bottom; + this.right = right; + } + + + /** + * Constructs an empty border given the number of pixels required + * on each side, passed in an Insets object. + * + * @param borderInsets the Insets for the new border. + */ + public EmptyBorder(Insets borderInsets) + { + this(borderInsets.top, borderInsets.left, + borderInsets.bottom, borderInsets.right); + } + + + /** + * Performs nothing because an EmptyBorder does not paint any + * pixels. While the inherited implementation provided by + * {@link AbstractBorder#paintBorder} is a no-op as well, + * it is overwritten in order to match the API of the Sun + * reference implementation. + * + * @param c the component whose border is to be painted. + * @param g the graphics for painting. + * @param x the horizontal position for painting the border. + * @param y the vertical position for painting the border. + * @param width the width of the available area for painting the border. + * @param height the height of the available area for painting the border. + */ + public void paintBorder(Component c, Graphics g, + int x, int y, int width, int height) + { + } + + + /** + * Measures the width of this border. + * + * @param c the component whose border is to be measured. + * + * @return an Insets object whose left, right, + * top and bottom fields indicate the + * width of the border at the respective edge. + * + * @see #getBorderInsets(java.awt.Component, java.awt.Insets) + */ + public Insets getBorderInsets(Component c) + { + return getBorderInsets(c, null); + } + + + /** + * Measures the width of this border, storing the results into a + * pre-existing Insets object. + * + * @param insets an Insets object for holding the result values. + * After invoking this method, the left, + * right, top and + * bottom fields indicate the width of the + * border at the respective edge. + * + * @return the same object that was passed for insets. + * + * @see #getBorderInsets() + */ + public Insets getBorderInsets(Component c, Insets insets) + { + if (insets == null) + insets = new Insets(0, 0, 0, 0); + + insets.left = left; + insets.right = right; + insets.top = top; + insets.bottom = bottom; + return insets; + } + + + /** + * Measures the width of this border. + * + * @return an Insets object whose left, right, + * top and bottom fields indicate the + * width of the border at the respective edge. + * + * @see #getBorderInsets(java.awt.Component, java.awt.Insets) + */ + public Insets getBorderInsets() + { + return getBorderInsets(null, null); + } + + + /** + * Determines whether this border fills every pixel in its area + * when painting. Since an empty border does not paint any pixels + * whatsoever, the result is false. + * + * @return false. + */ + public boolean isBorderOpaque() + { + /* The inherited implementation of AbstractBorder.isBorderOpaque() + * would also return false. It is not clear why this is overriden + * in the Sun implementation, at least not from just reading the + * JavaDoc. + */ + return false; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/border/EtchedBorder.java gcc-3.4.0/libjava/javax/swing/border/EtchedBorder.java *** gcc-3.3.3/libjava/javax/swing/border/EtchedBorder.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/border/EtchedBorder.java 2003-08-01 20:10:21.000000000 +0000 *************** *** 1,5 **** /* EtchedBorder.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* EtchedBorder.java -- ! Copyright (C) 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,75 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.border; ! import java.awt.*; ! public class EtchedBorder extends EmptyBorder { ! Color c; - public EtchedBorder() - { - } ! ! public EtchedBorder(int top, ! int left, ! int bottom, ! int right, ! Color color) { ! super(top, left, bottom, right); ! this.c = color; } ! public boolean isBorderOpaque() { ! return false; } ! ! public void paintBorder(Component c, ! Graphics g, ! int x, ! int y, ! int width, ! int height) { } } --- 35,411 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.border; ! import java.awt.Color; ! import java.awt.Component; ! import java.awt.Graphics; ! import java.awt.Insets; ! ! /** ! * A border that looks like an engraving etched into the background ! * surface, or (in its raised variant) coming out of the surface ! * plane. Using different constructors, it is possible to either ! * explicitly specify the border colors, or to let the colors derive ! * from the background color of the enclosed Component. ! * ! *

                [An illustration of the two EtchedBorder variants] ! * ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ ! public class EtchedBorder ! extends AbstractBorder { ! /** ! * Determined using the serialver tool ! * of Apple/Sun JDK 1.3.1 on MacOS X 10.1.5. ! */ ! static final long serialVersionUID = 4001244046866360638L; ! ! ! /** ! * Indicates that the border appears as coming out of the ! * background. ! */ ! public static final int RAISED = 0; ! /** ! * Indicates that the border appears as engraved into the ! * background. ! */ ! public static final int LOWERED = 1; ! ! ! /** ! * The type of this EtchedBorder, which is either {@link #RAISED} ! * or {@link #LOWERED}. ! */ ! protected int etchType; ! ! ! /** ! * The highlight color, or null to indicate that the ! * color shall be derived from the background of the enclosed ! * component. ! */ ! protected Color highlight; ! ! ! /** ! * The shadow color, or null to indicate that the ! * color shall be derived from the background of the enclosed ! * component. ! */ ! protected Color shadow; ! ! ! /** ! * Constructs a lowered EtchedBorder. The colors will be derived ! * from the background color of the enclosed Component when the ! * border gets painted. ! */ ! public EtchedBorder() ! { ! this(LOWERED); ! } ! ! ! /** ! * Constructs an EtchedBorder with the specified appearance. The ! * colors will be derived from the background color of the enclosed ! * Component when the border gets painted. ! * ! *

                [An illustration of the two EtchedBorder variants] ! * ! * @param etchType the desired appearance of the border. The value ! * must be either {@link #RAISED} or {@link #LOWERED}. ! * ! * @throws IllegalArgumentException if etchType has ! * an unsupported value. ! */ ! public EtchedBorder(int etchType) ! { ! if ((etchType != RAISED) && (etchType != LOWERED)) ! throw new IllegalArgumentException(); ! ! this.etchType = etchType; ! ! /* The highlight and shadow fields already have a null value ! * when the constructor gets called, so there is no need to ! * assign a value here. ! */ ! } ! ! ! /** ! * Constructs a lowered EtchedBorder, explicitly selecting the ! * colors that will be used for highlight and shadow. ! * ! * @param highlight the color that will be used for painting ! * the highlight part of the border. ! * ! * @param shadow the color that will be used for painting ! * the shadow part of the border. ! * ! * @see #EtchedBorder(int, Color, Color) ! */ ! public EtchedBorder(Color highlight, Color shadow) ! { ! this(LOWERED, highlight, shadow); ! } ! ! ! /** ! * Constructs an EtchedBorder with the specified appearance, ! * explicitly selecting the colors that will be used for ! * highlight and shadow. ! * ! *

                [An illustration that shows which pixels get painted
!    * in what color] ! * ! * @param etchType the desired appearance of the border. The value ! * must be either {@link #RAISED} or {@link #LOWERED}. ! * ! * @param highlight the color that will be used for painting ! * the highlight part of the border. ! * ! * @param shadow the color that will be used for painting ! * the shadow part of the border. ! * ! * @throws IllegalArgumentException if etchType has ! * an unsupported value. ! */ ! public EtchedBorder(int etchType, Color highlight, Color shadow) ! { ! this(etchType); // Checks the validity of the value. ! this.highlight = highlight; ! this.shadow = shadow; ! } ! ! ! /** ! * Paints the border for a given component. ! * ! * @param c the component whose border is to be painted. ! * @param g the graphics for painting. ! * @param x the horizontal position for painting the border. ! * @param y the vertical position for painting the border. ! * @param width the width of the available area for painting the border. ! * @param height the height of the available area for painting the border. ! */ ! public void paintBorder(Component c, Graphics g, ! int x, int y, int width, int height) ! { ! switch (etchType) { ! case RAISED: ! paintEtchedBorder(g, x, y, width, height, ! getHighlightColor(c), getShadowColor(c)); ! break; ! ! case LOWERED: ! paintEtchedBorder(g, x, y, width, height, ! getShadowColor(c), getHighlightColor(c)); ! break; } + } + + + /** + * Measures the width of this border. + * + * @param c the component whose border is to be measured. + * + * @return an Insets object whose left, right, + * top and bottom fields indicate the + * width of the border at the respective edge. + * + * @see #getBorderInsets(java.awt.Component, java.awt.Insets) + */ + public Insets getBorderInsets(Component c) + { + return new Insets(2, 2, 2, 2); + } ! ! /** ! * Measures the width of this border, storing the results into a ! * pre-existing Insets object. ! * ! * @param insets an Insets object for holding the result values. ! * After invoking this method, the left, ! * right, top and ! * bottom fields indicate the width of the ! * border at the respective edge. ! * ! * @return the same object that was passed for insets. ! * ! * @see #getBorderInsets() ! */ ! public Insets getBorderInsets(Component c, Insets insets) ! { ! insets.left = insets.right = insets.top = insets.bottom = 2; ! return insets; ! } ! ! ! /** ! * Determines whether this border fills every pixel in its area ! * when painting. ! * ! *

                If the border colors are derived from the background color of ! * the enclosed component, the result is true because ! * the derivation method always returns opaque colors. Otherwise, ! * the result depends on the opacity of the individual colors. ! * ! * @return true if the border is fully opaque, or ! * false if some pixels of the background ! * can shine through the border. ! */ ! public boolean isBorderOpaque() ! { ! /* If the colors are to be drived from the enclosed Component's ! * background color, the border is guaranteed to be fully opaque ! * because Color.brighten() and Color.darken() always return an ! * opaque color. ! */ ! return ! ((highlight == null) || (highlight.getAlpha() == 255)) ! && ((shadow == null) || (shadow.getAlpha() == 255)); ! } ! ! ! /** ! * Returns the appearance of this EtchedBorder, which is either ! * {@link #RAISED} or {@link #LOWERED}. ! */ ! public int getEtchType() ! { ! return etchType; ! } ! ! ! /** ! * Determines the color that will be used for highlighted parts when ! * painting the border around a given component. If a highlight ! * color has been specified upon constructing the border, that color ! * is returned. Otherwise, the background color of the enclosed ! * component is brightened. ! * ! * @param c the component enclosed by this border. ! * ! * @see java.awt.Component#getBackground() ! * @see java.awt.Color#brighter() ! */ ! public Color getHighlightColor(Component c) ! { ! if (highlight != null) ! return highlight; ! else ! return c.getBackground().brighter(); ! } ! ! ! /** ! * Returns the color that will be used for highlighted parts when ! * painting the border, or null if that color will be ! * derived from the background of the enclosed Component. ! */ ! public Color getHighlightColor() ! { ! return highlight; ! } ! ! ! /** ! * Determines the color that will be used for shadowed parts when ! * painting the border around a given component. If a shadow color ! * has been specified upon constructing the border, that color is ! * returned. Otherwise, the background color of the enclosed ! * component is darkened. ! * ! * @param c the component enclosed by this border. ! * ! * @see java.awt.Component#getBackground() ! * @see java.awt.Color#darker() ! */ ! public Color getShadowColor(Component c) ! { ! if (shadow != null) ! return shadow; ! else ! return c.getBackground().darker(); ! } ! ! ! /** ! * Returns the color that will be used for shadowed parts when ! * painting the border, or null if that color will be ! * derived from the background of the enclosed Component. ! */ ! public Color getShadowColor() ! { ! return shadow; ! } ! ! ! /** ! * Paints a two-pixel etching in two colors. ! * ! *

                !    * @@@@@@@@@@@.
                !    * @.........@.    @ = color a
                !    * @.        @.    . = color b
                !    * @.        @.
                !    * @@@@@@@@@@@.
                !    * ............
                ! * ! * @param g the graphics for painting. ! * @param x the horizontal position for painting the border. ! * @param y the vertical position for painting the border. ! * @param width the width of the available area for painting the border. ! * @param height the height of the available area for painting the border. ! * @param a one of the two colors. ! * @param b the second of the two colors. ! */ ! private static void paintEtchedBorder(Graphics g, ! int x, int y, int width, int height, ! Color a, Color b) ! { ! Color oldColor; ! ! oldColor = g.getColor(); ! g.translate(x, y); ! width = width - 1; ! height = height - 1; ! ! try { ! /* To understand this code, it might be helpful to look at the ! * images that are included with the JavaDoc. They are located ! * in the "doc-files" subdirectory. EtchedBorder-2.png might ! * be especially informative. ! */ ! g.setColor(a); ! g.drawRect(0, 0, width - 1, height - 1); ! ! g.setColor(b); ! g.drawLine(1, 1, width - 2, 1); // top edge ! g.drawLine(1, 2, 1, height - 2); // left edge ! g.drawLine(0, height, width, height); // bottom edge ! g.drawLine(width, 0, width, height - 1); // right edge } ! finally { + g.translate(-x, -y); + g.setColor(oldColor); } + } } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/border/LineBorder.java gcc-3.4.0/libjava/javax/swing/border/LineBorder.java *** gcc-3.3.3/libjava/javax/swing/border/LineBorder.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/border/LineBorder.java 2003-08-26 22:42:37.000000000 +0000 *************** *** 1,5 **** /* LineBorder.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* LineBorder.java -- ! Copyright (C) 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,75 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.border; ! import java.awt.*; ! public class LineBorder extends EmptyBorder { ! Color c; - public LineBorder() - { - } ! public LineBorder(int top, ! int left, ! int bottom, ! int right, ! Color color) ! { ! super(top, left, bottom, right); ! this.c = color; ! } ! public boolean isBorderOpaque() { ! return false; } ! ! public void paintBorder(Component c, ! Graphics g, ! int x, ! int y, ! int width, ! int height) { } } --- 35,343 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.border; ! import java.awt.Color; ! import java.awt.Component; ! import java.awt.Graphics; ! import java.awt.Insets; ! ! /** ! * A border that consists of a line whose thickness and color can be ! * specified. There also is a variant with rounded corners. ! * ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ ! public class LineBorder ! extends AbstractBorder { ! /** ! * Determined using the serialver tool ! * of Apple/Sun JDK 1.3.1 on MacOS X 10.1.5. ! */ ! static final long serialVersionUID = -787563427772288970L; + /** + * A shared instance of a black, one pixel thick, plain LineBorder. + * The singleton object is lazily created by {@link + * #createBlackLineBorder()} upon its first invocation. + */ + private static LineBorder blackLineBorder; + + + /** + * A shared instance of a gray, one pixel thick, plain LineBorder. + * The singleton object is lazily created by {@link + * #createBlackGrayBorder()} upon its first invocation. + */ + private static LineBorder grayLineBorder; + + + /** + * The width of the line in pixels. + */ + protected int thickness; + + + /** + * The color of the line. + */ + protected Color lineColor; + + + /** + * Indicates whether the line is drawn with rounded corners + * (true) or not ((false). + */ + protected boolean roundedCorners; + + + /** + * Constructs a LineBorder given its color. The border will be one + * pixel thick and have plain corners. + * + * @param color the color for drawing the border. + * + * @see #LineBorder(java.awt.Color, int, boolean) + */ + public LineBorder(Color color) + { + this(color, /* thickness */ 1, /* roundedCorners */ false); + } + + + /** + * Constructs a LineBorder given its color and thickness. The + * border will have plain corners. + * + * @param color the color for drawing the border. + * @param thickness the width of the line in pixels. + * + * @see #LineBorder(java.awt.Color, int, boolean) + */ + public LineBorder(Color color, int thickness) + { + this (color, thickness, /* roundedCorners */ false); + } + + + /** + * Constructs a LineBorder given its color, thickness, and whether + * it has rounded corners. + * + *

                [An illustration of two LineBorders] + * + *

                Note that the enlarged view in the right-hand picture shows + * that the implementation draws one more pixel than specified, + * provided that roundedCorders is true + * and anti-aliasing is turned on while painting. While this might + * be considered a bug, the Sun reference implementation (at least + * JDK 1.3.1 on Apple MacOS X 10.1.5) can be observed to fill + * exactly the same pixels as shown above. The GNU Classpath + * LineBorder replicates the observed behavior of the Sun + * implementation. + * + * @param color the color for drawing the border. + * @param thickness the width of the line in pixels. + * @param roundedCorners true for rounded corners, + * false for plain corners. + * + * @since 1.3 + */ + // For the bug mentioned in the JavaDoc, please see also the comment + // in the paintBorder method below. + // + public LineBorder(Color color, int thickness, boolean roundedCorners) + { + if ((color == null) || (thickness < 0)) + throw new IllegalArgumentException(); + + this.lineColor = color; + this.thickness = thickness; + this.roundedCorners = roundedCorners; + } + + + /** + * Returns a black, one pixel thick, plain LineBorder. The method + * may always return the same (singleton) LineBorder instance. + */ + public static Border createBlackLineBorder() + { + /* Swing is not designed to be thread-safe, so there is no + * need to synchronize the access to the global variable. + */ + if (blackLineBorder == null) + blackLineBorder = new LineBorder(Color.black); ! return blackLineBorder; ! } ! ! ! /** ! * Returns a gray, one pixel thick, plain LineBorder. The method ! * may always return the same (singleton) LineBorder instance. ! */ ! public static Border createGrayLineBorder() ! { ! /* Swing is not designed to be thread-safe, so there is no ! * need to synchronize the access to the global variable. ! */ ! if (grayLineBorder == null) ! grayLineBorder = new LineBorder(Color.gray); ! ! return grayLineBorder; ! } ! ! ! /** ! * Paints the line border around a given Component. ! * ! * @param c the component whose border is to be painted. ! * @param g the graphics for painting. ! * @param x the horizontal position for painting the border. ! * @param y the vertical position for painting the border. ! * @param width the width of the available area for painting the border. ! * @param height the height of the available area for painting the border. ! */ ! public void paintBorder(Component c, Graphics g, ! int x, int y, int width, int height) ! { ! Color oldColor = g.getColor(); ! try { ! g.setColor(lineColor); ! ! /* If width and height were not adjusted, the border would ! * appear one pixel too large in both directions. ! */ ! width -= 1; ! height -= 1; ! ! /* Blurred, too large appearance ! * ----------------------------- ! * While Java 2D has introduced line strokes of arbitrary width, ! * it seems desirable to keep this code independent of Java 2D. ! * Therefore, multiple nested rectangles (or rounded rectangles) ! * are drawn in order to simulate a line whose thickness is ! * greater than one pixel. ! * ! * This hack causes a blurred appearance when anti-aliasing is ! * on. Interestingly enough, though, the Sun JDK 1.3.1 (at least ! * on MacOS X 10.1.5) shows exactly the same appearance under ! * this condition. It thus seems likely that Sun does the same ! * hack for simulating thick lines. For this reason, the ! * blurred appearance seems acceptable -- especially since GNU ! * Classpath tries to be compatible with the Sun reference ! * implementation. ! */ ! for (int i = 0; i < thickness; i++) ! { ! if (roundedCorners) ! g.drawRoundRect(x, y, width, height, thickness, thickness); ! else ! g.drawRect(x, y, width, height); ! ! x += 1; ! y += 1; ! width -= 2; ! height -= 2; ! } } ! finally { + g.setColor(oldColor); } + } + + + /** + * Measures the width of this border. + * + * @param c the component whose border is to be measured. + * + * @return an Insets object whose left, right, + * top and bottom fields indicate the + * width of the border at the respective edge, which is the + * thickness of the line. + * + * @see #getBorderInsets(java.awt.Component, java.awt.Insets) + */ + public Insets getBorderInsets(Component c) + { + return new Insets(thickness, thickness, thickness, thickness); + } + + + /** + * Measures the width of this border, storing the results into a + * pre-existing Insets object. + * + * @param insets an Insets object for holding the result values. + * After invoking this method, the left, + * right, top and + * bottom fields indicate the width of the + * border at the respective edge, which is the thickness + * of the line. + * + * @return the same object that was passed for insets. + * + * @see #getBorderInsets() + */ + public Insets getBorderInsets(Component c, Insets insets) + { + insets.left = insets.right = insets.top = insets.bottom = thickness; + return insets; + } + + + /** + * Returns the color of the line. + */ + public Color getLineColor() + { + return lineColor; + } + + + /** + * Returns the thickness of the line in pixels. + */ + public int getThickness() + { + return thickness; + } + + + /** + * Returns whether this LineBorder os drawm with rounded + * or with plain corners. + * + * @return true if the corners are rounded, + * false if the corners are plain. + */ + public boolean getRoundedCorners() + { + return roundedCorners; + } + + + /** + * Determines whether this border fills every pixel in its area + * when painting. + * + * @return true if the corners are plain and the line + * color is fully opaque; false if the corners + * are rounded or the line color is partially transparent. + */ + public boolean isBorderOpaque() + { + return (!roundedCorners) && (lineColor.getAlpha() == 255); + } } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/border/MatteBorder.java gcc-3.4.0/libjava/javax/swing/border/MatteBorder.java *** gcc-3.3.3/libjava/javax/swing/border/MatteBorder.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/border/MatteBorder.java 2003-09-25 14:38:01.000000000 +0000 *************** *** 1,5 **** /* MatteBorder.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* MatteBorder.java -- ! Copyright (C) 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,75 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.border; ! import java.awt.*; ! public class MatteBorder extends EmptyBorder { ! Color c; ! public MatteBorder() { } ! ! public MatteBorder(int top, ! int left, ! int bottom, ! int right, ! Color color) { ! super(top, left, bottom, right); ! this.c = color; } ! public boolean isBorderOpaque() { ! return false; } ! ! public void paintBorder(Component c, ! Graphics g, ! int x, ! int y, ! int width, ! int height) { } } --- 35,404 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.border; ! import java.awt.Color; ! import java.awt.Component; ! import java.awt.Graphics; ! import java.awt.Insets; ! import javax.swing.Icon; ! ! /** ! * A border that is filled with either a solid color or with repeated ! * icon tiles. ! * ! *

                [Two MatteBorders] ! * ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ ! public class MatteBorder ! extends EmptyBorder { ! /** ! * Determined using the serialver tool ! * of Apple/Sun JDK 1.3.1 on MacOS X 10.1.5. ! */ ! static final long serialVersionUID = 4422248989617298224L; ! ! ! /** ! * The color that is used for filling the border, or ! * null if the border is filled with repetitions of a ! * tile icon. ! * ! * @see #tileIcon ! */ ! protected Color color; ! ! ! /** ! * The icon is used for filling the border with a tile, or ! * null if the border is filled with a solid ! * color. ! * ! * @see #color ! */ ! protected Icon tileIcon; ! ! ! /** ! * Constructs a MatteBorder given the width on each side ! * and a fill color. ! * ! *

                [A picture of a MatteBorder made by this constructor] ! * ! * @param top the width of the border at its top edge. ! * @param left the width of the border at its left edge. ! * @param bottom the width of the border at its bottom edge. ! * @param right the width of the border at its right edge. ! * @param matteColor the color for filling the border. ! */ ! public MatteBorder(int top, int left, int bottom, int right, ! Color matteColor) ! { ! super(top, left, bottom, right); ! if (matteColor == null) ! throw new IllegalArgumentException(); ! ! this.color = matteColor; ! } ! ! ! /** ! * Constructs a MatteBorder given its insets and fill color. ! * ! *

                [A picture of a MatteBorder made by this constructor] ! * ! * @param borderInsets an Insets object whose top, ! * left, bottom and right ! * fields indicate the with of the border at the respective ! * edge. ! * ! * @param matteColor the color for filling the border. ! */ ! public MatteBorder(Insets borderInsets, Color matteColor) ! { ! this(borderInsets.top, borderInsets.left, ! borderInsets.bottom, borderInsets.right, ! matteColor); ! } ! ! ! /** ! * Constructs a MatteBorder given the width on each side ! * and an icon for tiling the border area. ! * ! *

                [A picture of a MatteBorder made by this constructor] ! * ! * @param top the width of the border at its top edge. ! * @param left the width of the border at its left edge. ! * @param bottom the width of the border at its bottom edge. ! * @param right the width of the border at its right edge. ! * @param tileIcon an icon for tiling the border area. ! */ ! public MatteBorder(int top, int left, int bottom, int right, ! Icon tileIcon) ! { ! super(top, left, bottom, right); ! ! if (tileIcon == null) ! throw new IllegalArgumentException(); ! ! this.tileIcon = tileIcon; ! } ! ! ! /** ! * Constructs a MatteBorder given its insets and an icon ! * for tiling the border area. ! * ! *

                [A picture of a MatteBorder made by this constructor] ! * ! * @param borderInsets an Insets object whose top, ! * left, bottom and right ! * fields indicate the with of the border at the respective ! * edge. ! * ! * @param tileIcon an icon for tiling the border area. ! */ ! public MatteBorder(Insets borderInsets, Icon tileIcon) ! { ! this(borderInsets.top, borderInsets.left, ! borderInsets.bottom, borderInsets.right, ! tileIcon); ! } ! ! ! /** ! * Constructs a MatteBorder given an icon for tiling the ! * border area. The icon width is used for the border insets ! * at the left and right edge, the icon height for the top and ! * bottom edge. ! * ! *

                [A picture of a MatteBorder made by this constructor] ! * ! * @param tileIcon an icon for tiling the border area. ! */ ! public MatteBorder(Icon tileIcon) ! { ! this(-1, -1, -1, -1, tileIcon); ! } ! ! ! /** ! * Paints the border for a given component. ! * ! * @param c the component whose border is to be painted. ! * @param g the graphics for painting. ! * @param x the horizontal position for painting the border. ! * @param y the vertical position for painting the border. ! * @param width the width of the available area for painting the border. ! * @param height the height of the available area for painting the border. ! */ ! public void paintBorder(Component c, Graphics g, ! int x, int y, int width, int height) ! { ! Insets i = getBorderInsets(); ! paintEdge(c, g, x, y, width, i.top, 0, 0); // top edge ! paintEdge(c, g, x, y + height - i.bottom, // bottom edge ! width, i.bottom, ! 0, height - i.bottom); ! paintEdge(c, g, x, y + i.top, // left edge ! i.left, height - i.top, ! 0, i.top); ! paintEdge(c, g, x + width - i.right, y + i.top, // right edge ! i.right, height - i.bottom, ! width - i.right, i.top); ! } ! ! ! /** ! * Measures the width of this border. ! * ! * @param c the component whose border is to be measured. ! * ! * @return an Insets object whose left, right, ! * top and bottom fields indicate the ! * width of the border at the respective edge. ! * ! * @see #getBorderInsets(java.awt.Component, java.awt.Insets) ! */ ! public Insets getBorderInsets(Component c) ! { ! /* There is no obvious reason for overriding this method, but we ! * try to have exactly the same API as the Sun reference ! * implementation. ! */ ! return this.getBorderInsets(c, null); ! } ! ! ! /** ! * Measures the width of this border, storing the results into a ! * pre-existing Insets object. ! * ! * @param insets an Insets object for holding the result values. ! * After invoking this method, the left, ! * right, top and ! * bottom fields indicate the width of the ! * border at the respective edge. ! * ! * @return the same object that was passed for insets. ! * ! * @see #getBorderInsets() ! */ ! public Insets getBorderInsets(Component c, Insets insets) ! { ! if (insets == null) ! insets = new Insets(0, 0, 0, 0); ! ! if ((tileIcon != null) ! && (top < 0) && (left < 0) ! && (right < 0) && (bottom < 0)) { + insets.left = insets.right = tileIcon.getIconWidth(); + insets.top = insets.bottom = tileIcon.getIconHeight(); + return insets; } ! /* Copy top, left, bottom and right into the respective ! * field of insets. ! */ ! return super.getBorderInsets(c, insets); ! } ! ! ! /** ! * Measures the width of this border. ! * ! * @return an Insets object whose left, right, ! * top and bottom fields indicate the ! * width of the border at the respective edge. ! * ! * @see #getBorderInsets(java.awt.Component, java.awt.Insets) ! */ ! public Insets getBorderInsets() ! { ! /* The inherited implementation of EmptyBorder.isBorderOpaque() ! * would do the same. It is not clear why this is overriden in the ! * Sun implementation, at least not from just reading the JavaDoc. ! */ ! return this.getBorderInsets(null, null); ! } ! ! ! /** ! * Returns the color that is used for filling the border, or ! * null if the border is filled with repetitions of a ! * tile icon. ! */ ! public Color getMatteColor() ! { ! return color; ! } ! ! ! /** ! * Returns the icon is used for tiling the border, or ! * null if the border is filled with a color instead of ! * an icon. ! */ ! public Icon getTileIcon() ! { ! return tileIcon; ! } ! ! ! /** ! * Determines whether this border fills every pixel in its area ! * when painting. ! * ! * @return true if the border is filled with an ! * opaque color; false if it is filled with ! * a semi-transparent color or with an icon. ! */ ! public boolean isBorderOpaque() ! { ! return (color != null) && (color.getAlpha() == 255); ! } ! ! ! /** ! * Paints a rectangular area of the border. This private helper ! * method is called once for each of the border edges ! * by {@link #paintBorder}. ! * ! * @param c the component whose border is being painted. ! * @param g the graphics for painting. ! * @param x the horizontal position of the rectangular area. ! * @param y the vertical position of the rectangular area. ! * @param width the width of the rectangular area. ! * @param height the height of the rectangular area. ! * @param dx the x displacement for repeating the tile. ! * @param dy the y displacement for repeating the tile. ! */ ! private void paintEdge(Component c, Graphics g, ! int x, int y, int width, int height, ! int dx, int dy) ! { ! Color oldColor; ! int iconWidth, iconHeight; ! Graphics clipped; ! ! if ((width <= 0) || (height <= 0)) ! return; ! ! /* Paint a colored rectangle if desired. */ ! if (color != null) { ! oldColor = g.getColor(); ! try ! { ! g.setColor(color); ! g.fillRect(x, y, width, height); ! } ! finally ! { ! g.setColor(oldColor); ! } ! return; } ! /* Determine the width and height of the icon. Some icons return ! * -1 if it is an image whose dimensions have not yet been ! * retrieved. There is not much we can do about this, but we ! * should at least avoid entering the paint loop below ! * with negative increments. ! */ ! iconWidth = tileIcon.getIconWidth(); ! iconHeight = tileIcon.getIconHeight(); ! if ((iconWidth <= 0) || (iconHeight <= 0)) ! return; ! ! dx = dx % iconWidth; ! dy = dy % iconHeight; ! ! clipped = g.create(); ! try { ! clipped.setClip(x, y, width, height); ! for (int ty = y - dy; ty < y + height; ty += iconHeight) ! for (int tx = x - dx; tx < x + width; tx += iconWidth) ! tileIcon.paintIcon(c, clipped, tx, ty); } ! finally { + clipped.dispose(); } + } } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/border/SoftBevelBorder.java gcc-3.4.0/libjava/javax/swing/border/SoftBevelBorder.java *** gcc-3.3.3/libjava/javax/swing/border/SoftBevelBorder.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/border/SoftBevelBorder.java 2003-08-01 20:10:21.000000000 +0000 *************** *** 0 **** --- 1,329 ---- + /* SoftBevelBorder.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.swing.border; + + import java.awt.Color; + import java.awt.Component; + import java.awt.Graphics; + import java.awt.Insets; + + + /** + * A rectangular, three pixel thick border that looks like a BevelBorder + * with slightly softened corners. + * + *

                Like BevelBorder, SoftBevelBorder has a highlight and a shadow + * color. In the raised variant, the highlight color is used for the + * top and left edges, and the shadow color is used for the bottom and + * right edge. In the lowered variant, color usage is reversed. For + * an image, see the documentation of the individual constructors. + * + * @author Sascha Brawer (brawer@dandelis.ch) + */ + public class SoftBevelBorder + extends BevelBorder + { + /** + * Determined using the serialver tool + * of Sun JDK 1.4.1_01 on GNU/Linux 2.4.20. Interestingly, + * the Apple/Sun JDK 1.3.1 on MacOS X 10.1.5 gives a different + * value, namely -6658357140774549493L. + */ + static final long serialVersionUID = 5248789787305979975L; + + + /** + * Constructs a SoftBevelBorder whose colors will be derived from the + * background of the enclosed component. The background color is + * retrieved each time the border is painted, so a SoftBevelBorder + * constructed by this method will automatically reflect a change + * to the component’s background color. + * + *

                [An illustration showing raised and lowered SoftBevelBorders] + * + * @param bevelType the desired appearance of the border. The value + * must be either {@link BevelBorder#RAISED} + * or {@link BevelBorder#LOWERED}. + * + * @throws IllegalArgumentException if bevelType has + * an unsupported value. + */ + public SoftBevelBorder(int bevelType) + { + super(bevelType); + } + + + /** + * Constructs a SoftBevelBorder given its appearance type and two + * colors for its highlight and shadow. + * + *

                [An illustration showing SoftBevelBorders that were
+    * constructed with this method] + * + * @param bevelType the desired appearance of the border. The value + * must be either {@link BevelBorder#RAISED} or {@link + * BevelBorder#LOWERED}. + * + * @param highlight the color that will be used for the inner side + * of the highlighted edges (top and left if if + * bevelType is {@link BevelBorder#RAISED}; + * bottom and right otherwise). The color for the outer side + * is a brightened version of this color. + * + * @param shadow the color that will be used for the outer side of + * the shadowed edges (bottom and right if + * bevelType is {@link BevelBorder#RAISED}; top + * and left otherwise). The color for the inner side is a + * brightened version of this color. + * + * @throws IllegalArgumentException if bevelType has an + * unsupported value. + * + * @throws NullPointerException if highlight or + * shadow is null. + * + * @see java.awt.Color.brighter() + */ + public SoftBevelBorder(int bevelType, Color highlight, Color shadow) + { + this(bevelType, + /* highlightOuter */ highlight.brighter(), + /* highlightInner */ highlight, + /* shadowOuter */ shadow, + /* shadowInner */ shadow.brighter()); + } + + + /** + * Constructs a SoftBevelBorder given its appearance type and all + * colors. + * + *

                [An illustration showing SoftBevelBorders that were
+    * constructed with this method] + * + * @param bevelType the desired appearance of the border. The value + * must be either {@link BevelBorder#RAISED} or {@link + * BevelBorder#LOWERED}. + * + * @param highlightOuter the color that will be used for the outer + * side of the highlighted edges (top and left if + * bevelType is {@link BevelBorder#RAISED}; + * bottom and right otherwise). + * + * @param highlightInner the color that will be used for the inner + * side of the highlighted edges. + * + * @param shadowOuter the color that will be used for the outer side + * of the shadowed edges (bottom and right if + * bevelType is {@link BevelBorder#RAISED}; top + * and left otherwise). + * + * @param shadowInner the color that will be used for the inner + * side of the shadowed edges. + * + * @throws IllegalArgumentException if bevelType has + * an unsupported value. + * + * @throws NullPointerException if one of the passed colors + * is null. + */ + public SoftBevelBorder(int bevelType, + Color highlightOuter, Color highlightInner, + Color shadowOuter, Color shadowInner) + { + super(bevelType, + highlightOuter, highlightInner, + shadowOuter, shadowInner); + } + + + /** + * Paints the border for a given component. + * + * @param c the component whose border is to be painted. + * @param g the graphics for painting. + * @param x the horizontal position for painting the border. + * @param y the vertical position for painting the border. + * @param width the width of the available area for painting the border. + * @param height the height of the available area for painting the border. + */ + public void paintBorder(Component c, Graphics g, + int x, int y, int width, int height) + { + switch (bevelType) + { + case RAISED: + paintSoftBevel(g, x, y, width, height, + getHighlightOuterColor(c), getHighlightInnerColor(c), + getShadowInnerColor(c), getShadowOuterColor(c)); + break; + + case LOWERED: + paintSoftBevel(g, x, y, width, height, + getShadowOuterColor(c), getShadowInnerColor(c), + getHighlightInnerColor(c), getHighlightOuterColor(c)); + break; + } + } + + + /** + * Measures the width of this border. + * + * @param c the component whose border is to be measured. + * + * @return an Insets object whose left, right, + * top and bottom fields indicate the + * width of the border at the respective edge. + * + * @see #getBorderInsets(java.awt.Component, java.awt.Insets) + */ + public Insets getBorderInsets(Component c) + { + return new Insets(3, 3, 3, 3); + } + + + /** + * Measures the width of this border, storing the results into a + * pre-existing Insets object. + * + * @param insets an Insets object for holding the result values. + * After invoking this method, the left, + * right, top and + * bottom fields indicate the width of the + * border at the respective edge. + * + * @return the same object that was passed for insets. + * + * @see #getBorderInsets() + */ + public Insets getBorderInsets(Component c, Insets insets) + { + insets.left = insets.right = insets.top = insets.bottom = 3; + return insets; + } + + + /** + * Determines whether this border fills every pixel in its area + * when painting. + * + *

                The enlarged view (see documentation for constructors) shows + * that a SoftBevelBorder does not paint all pixels. Therefore, + * this method always returns false. + * + * @return false. + */ + public boolean isBorderOpaque() + { + return false; + } + + + /** + * Paints a soft bevel in four colors. + * + *

                +    * @@@@@@@@@@@.
                +    * @@.........#    @ = color a
                +    * @..        #    . = color b
                +    * @.         #    X = color c
                +    * ..        X#    # = color d
                +    * . ##########
                + * + * @param g the graphics for painting. + * @param x the horizontal position for painting the border. + * @param y the vertical position for painting the border. + * @param width the width of the available area for painting the border. + * @param height the height of the available area for painting the border. + * @param a the color for the outer side of the top and left edges. + * @param b the color for the inner side of the top and left edges. + * @param c the color for the inner side of the bottom and right edges. + * @param d the color for the outer side of the bottom and right edges. + */ + private static void paintSoftBevel(Graphics g, + int x, int y, int width, int height, + Color a, Color b, Color c, Color d) + { + Color oldColor; + + oldColor = g.getColor(); + g.translate(x, y); + width = width - 1; + height = height - 1; + + try + { + /* To understand this code, it might be helpful to look at the + * images that are included with the JavaDoc, especially + * SoftBevelBorder-3.png. They are located in the "doc-files" + * subdirectory. + */ + g.setColor(a); + g.drawLine(0, 0, width - 1, 0); // a, horizontal + g.drawLine(0, 1, 2, 1); // a, horizontal + g.drawLine(0, 2, 0, height - 1); // a, vertical + + g.setColor(b); + g.drawLine(width, 0, width, 0); // b, horizontal + g.drawLine(2, 1, width - 1, 1); // b, horizontal + g.drawLine(1, 2, 2, 2); // b, horizontal + g.drawLine(1, 3, 1, height - 1); // b, vertical + g.drawLine(0, height - 1, 0, height); // b, vertical + + g.setColor(c); + g.drawLine(width - 1, height - 1, // c, one pixel + width - 1, height - 1); + + g.setColor(d); + g.drawLine(2, height, width, height); // d, horizontal + g.drawLine(width, 2, width, height - 1); // d, vertical + } + finally + { + g.translate(-x, -y); + g.setColor(oldColor); + } + } + } + diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/border/TitledBorder.java gcc-3.4.0/libjava/javax/swing/border/TitledBorder.java *** gcc-3.3.3/libjava/javax/swing/border/TitledBorder.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/border/TitledBorder.java 2003-06-19 10:48:45.000000000 +0000 *************** *** 1,5 **** /* TitledBorder.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* TitledBorder.java -- ! Copyright (C) 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,68 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.border; ! import java.awt.*; ! public class TitledBorder extends AbstractBorder { ! ! public Insets getBorderInsets(Component c, ! Insets s) { ! s.left = s.right = s.top = s.bottom = 5; ! return s; } ! public boolean isBorderOpaque() { ! return false; } ! ! public void paintBorder(Component c, ! Graphics g, ! int x, ! int y, ! int width, ! int height) { } } - --- 35,1155 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.border; ! import java.awt.Color; ! import java.awt.Component; ! import java.awt.Dimension; ! import java.awt.Font; ! import java.awt.FontMetrics; ! import java.awt.Graphics; ! import java.awt.Insets; ! import java.awt.Rectangle; ! import java.awt.Shape; ! import javax.swing.UIManager; ! ! /** ! * A border that paints a title on top of another border. ! * ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ ! public class TitledBorder ! extends AbstractBorder { ! /** ! * A value for the titlePosition property that vertically ! * positions the title text at the default vertical position, which ! * is in the middle of the top line of the border. ! * ! * @see #getTitlePosition() ! * @see #setTitlePosition(int) ! */ ! public static final int DEFAULT_POSITION = 0; ! ! ! /** ! * A value for the titlePosition property that vertically ! * positions the title text above the top line of the border. ! * ! * @see #getTitlePosition() ! * @see #setTitlePosition(int) ! */ ! public static final int ABOVE_TOP = 1; ! ! ! /** ! * A value for the titlePosition property that vertically ! * positions the title text at the middle of the top line ! * of the border. ! * ! * @see #getTitlePosition() ! * @see #setTitlePosition(int) ! */ ! public static final int TOP = 2; ! ! ! /** ! * A value for the titlePosition property that vertically ! * positions the title text below the top line of the border. ! * ! * @see #getTitlePosition() ! * @see #setTitlePosition(int) ! */ ! public static final int BELOW_TOP = 3; ! ! ! /** ! * A value for the titlePosition property that vertically ! * positions the title text above the bottom line of the border. ! * ! * @see #getTitlePosition() ! * @see #setTitlePosition(int) ! */ ! public static final int ABOVE_BOTTOM = 4; ! ! ! /** ! * A value for the titlePosition property that vertically ! * positions the title text at the center of the bottom line ! * of the border. ! * ! * @see #getTitlePosition() ! * @see #setTitlePosition(int) ! */ ! public static final int BOTTOM = 5; ! ! ! /** ! * A value for the titlePosition property that vertically ! * positions the title text below the bottom line of the border. ! * ! * @see #getTitlePosition() ! * @see #setTitlePosition(int) ! */ ! public static final int BELOW_BOTTOM = 6; ! ! ! /** ! * A value for the titleJustification property that ! * horizontally aligns the title text with either the left or the ! * right edge of the border, depending on the orientation of the ! * component nested into the border. If the component orientation ! * is left-to-right, the title text is aligned with the left edge; ! * otherwise, it is aligned with the right edge. This is the same ! * behavior as with {@link #LEADING}. ! * ! * @see #getTitleJustification() ! * @see #setTitleJustification(int) ! * @see java.awt.ComponentOrientation#isLeftToRight() ! */ ! public static final int DEFAULT_JUSTIFICATION = 0; ! ! ! /** ! * A value for the titleJustification property that ! * horizontally aligns the title text with the left-hand edge of ! * the border. ! * ! * @see #getTitleJustification() ! * @see #setTitleJustification(int) ! */ ! public static final int LEFT = 1; ! ! ! /** ! * A value for the titleJustification property that ! * horizontally aligns the title text with the center of the border. ! * ! * @see #getTitleJustification() ! * @see #setTitleJustification(int) ! */ ! public static final int CENTER = 2; ! ! ! /** ! * A value for the titleJustification property that ! * horizontally aligns the title text with the right-hand edge of ! * the border. ! * ! * @see #getTitleJustification() ! * @see #setTitleJustification(int) ! */ ! public static final int RIGHT = 3; ! ! ! /** ! * A value for the titleJustification property that ! * horizontally aligns the title text with either the left or the ! * right edge of the border, depending on the orientation of the ! * component nested into the border. If the component orientation ! * is left-to-right, the title text is aligned with the left edge; ! * otherwise, it is aligned with the right edge. This is the same ! * behavior as with {@link #DEFAULT_JUSTIFICATION}. ! * ! * @see #getTitleJustification() ! * @see #setTitleJustification(int) ! * @see java.awt.ComponentOrientation#isLeftToRight() ! */ ! public static final int LEADING = 4; ! ! ! /** ! * A value for the titleJustification property that ! * horizontally aligns the title text with either the right or the ! * left edge of the border, depending on the orientation of the ! * component nested into the border. If the component orientation ! * is left-to-right, the title text is aligned with the right edge; ! * otherwise, it is aligned with the left edge. ! * ! * @see #getTitleJustification() ! * @see #setTitleJustification(int) ! * @see java.awt.ComponentOrientation#isLeftToRight() ! */ ! public static final int TRAILING = 5; ! ! ! /** ! * The number of pixels between the inside of {@link #border} ! * and the bordered component. ! */ ! protected static final int EDGE_SPACING = 2; ! ! ! /** ! * The number of pixels between the outside of this TitledBorder ! * and the beginning (if left-aligned) or end (if right-aligned) ! * of the title text. ! */ ! protected static final int TEXT_INSET_H = 5; ! ! ! /** ! * The number of pixels between the title text and {@link #border}. ! * This value is only relevant if the title text does not intersect ! * {@link #border}. No intersection occurs if {@link #titlePosition} ! * is one of {@link #ABOVE_TOP}, {@link #BELOW_TOP}, {@link #ABOVE_BOTTOM}, ! * or {@link #BELOW_BOTTOM}. ! */ ! protected static final int TEXT_SPACING = 2; ! ! ! /** ! * Determined using the serialver tool of Apple/Sun JDK 1.3.1 ! * on MacOS X 10.1.5. ! */ ! static final long serialVersionUID = 8012999415147721601L; ! ! ! /** ! * The title, or null to display no title. ! */ ! protected String title; ! ! ! /** ! * The border underneath the title. If this value is ! * null, the border will be retrieved from the {@link ! * javax.swing.UIManager}’s defaults table using the key ! * "TitledBorder.border". ! */ ! protected Border border; ! ! ! /** ! * The vertical position of the title text relative to the border, ! * which is one of {@link #ABOVE_TOP}, {@link #TOP}, {@link ! * #BELOW_TOP}, {@link #ABOVE_BOTTOM}, {@link #BOTTOM}, {@link ! * #BELOW_BOTTOM}, or {@link #DEFAULT_POSITION}. ! */ ! protected int titlePosition; ! ! ! /** ! * The horizontal alignment of the title text in relation to the ! * border, which is one of {@link #LEFT}, {@link #CENTER}, {@link ! * #RIGHT}, {@link #LEADING}, {@link #TRAILING}, or {@link ! * #DEFAULT_JUSTIFICATION}. ! */ ! protected int titleJustification; ! ! ! /** ! * The font for displaying the title text. If this value is ! * null, the font will be retrieved from the {@link ! * javax.swing.UIManager}’s defaults table using the key ! * "TitledBorder.font". ! */ ! protected Font titleFont; ! ! ! /** ! * The color for displaying the title text. If this value is ! * null, the color will be retrieved from the {@link ! * javax.swing.UIManager}’s defaults table using the key ! * "TitledBorder.titleColor". ! */ ! protected Color titleColor; ! ! ! /** ! * Constructs a TitledBorder given the text of its title. ! * ! * @param title the title text, or null to use no title text. ! */ ! public TitledBorder(String title) ! { ! this(/* border */ null, ! title, DEFAULT_JUSTIFICATION, DEFAULT_POSITION, ! /* titleFont */ null, /* titleColor */ null); ! } ! ! ! /** ! * Constructs an initially untitled TitledBorder given another border. ! * ! * @param border the border underneath the title, or null ! * to use a default from the current look and feel. ! */ ! public TitledBorder(Border border) ! { ! this(border, /* title */ "", DEFAULT_JUSTIFICATION, DEFAULT_POSITION, ! /* titleFont */ null, /* titleColor */ null); ! } ! ! ! /** ! * Constructs a TitledBorder given its border and title text. ! * ! * @param border the border underneath the title, or null ! * to use a default from the current look and feel. ! * ! * @param title the title text, or null to use no title ! * text. ! */ ! public TitledBorder(Border border, String title) ! { ! this(border, title, DEFAULT_JUSTIFICATION, DEFAULT_POSITION, ! /* titleFont */ null, /* titleColor */ null); ! } ! ! ! /** ! * Constructs a TitledBorder given its border, title text, horizontal ! * alignment, and vertical position. ! * ! * @param border the border underneath the title, or null ! * to use a default from the current look and feel. ! * ! * @param title the title text, or null to use no title ! * text. ! * ! * @param titleJustification the horizontal alignment of the title ! * text in relation to the border. The value must be one of ! * {@link #LEFT}, {@link #CENTER}, {@link #RIGHT}, {@link #LEADING}, ! * {@link #TRAILING}, or {@link #DEFAULT_JUSTIFICATION}. ! ! * @param titlePosition the vertical position of the title text ! * in relation to the border. The value must be one of ! * {@link #ABOVE_TOP}, {@link #TOP}, {@link #BELOW_TOP}, ! * {@link #ABOVE_BOTTOM}, {@link #BOTTOM}, {@link #BELOW_BOTTOM}, ! * or {@link #DEFAULT_POSITION}. ! * ! * @throws IllegalArgumentException if titleJustification ! * or titlePosition have an unsupported value. ! */ ! public TitledBorder(Border border, String title, int titleJustification, ! int titlePosition) ! { ! this(border, title, titleJustification, titlePosition, ! /* titleFont */ null, /* titleColor */ null); ! } ! ! ! /** ! * Constructs a TitledBorder given its border, title text, horizontal ! * alignment, vertical position, and font. ! * ! * @param border the border underneath the title, or null ! * to use a default from the current look and feel. ! * ! * @param title the title text, or null to use no title ! * text. ! * ! * @param titleJustification the horizontal alignment of the title ! * text in relation to the border. The value must be one of ! * {@link #LEFT}, {@link #CENTER}, {@link #RIGHT}, {@link #LEADING}, ! * {@link #TRAILING}, or {@link #DEFAULT_JUSTIFICATION}. ! * ! * @param titlePosition the vertical position of the title text ! * in relation to the border. The value must be one of ! * {@link #ABOVE_TOP}, {@link #TOP}, {@link #BELOW_TOP}, ! * {@link #ABOVE_BOTTOM}, {@link #BOTTOM}, {@link #BELOW_BOTTOM}, ! * or {@link #DEFAULT_POSITION}. ! * ! * @param titleFont the font for the title text, or null ! * to use a default from the current look and feel. ! * ! * @throws IllegalArgumentException if titleJustification ! * or titlePosition have an unsupported value. ! */ ! public TitledBorder(Border border, String title, int titleJustification, ! int titlePosition, Font titleFont) ! { ! this(border, title, titleJustification, titlePosition, titleFont, ! /* titleColor */ null); ! } ! ! ! /** ! * Constructs a TitledBorder given its border, title text, horizontal ! * alignment, vertical position, font, and color. ! * ! * @param border the border underneath the title, or null ! * to use a default from the current look and feel. ! * ! * @param title the title text, or null to use no title ! * text. ! * ! * @param titleJustification the horizontal alignment of the title ! * text in relation to the border. The value must be one of ! * {@link #LEFT}, {@link #CENTER}, {@link #RIGHT}, {@link #LEADING}, ! * {@link #TRAILING}, or {@link #DEFAULT_JUSTIFICATION}. ! * ! * @param titlePosition the vertical position of the title text ! * in relation to the border. The value must be one of ! * {@link #ABOVE_TOP}, {@link #TOP}, {@link #BELOW_TOP}, ! * {@link #ABOVE_BOTTOM}, {@link #BOTTOM}, {@link #BELOW_BOTTOM}, ! * or {@link #DEFAULT_POSITION}. ! * ! * @param titleFont the font for the title text, or null ! * to use a default from the current look and feel. ! * ! * @param titleColor the color for the title text, or null ! * to use a default from the current look and feel. ! * ! * @throws IllegalArgumentException if titleJustification ! * or titlePosition have an unsupported value. ! */ ! public TitledBorder(Border border, String title, int titleJustification, ! int titlePosition, Font titleFont, Color titleColor) ! { ! this.border = border; ! this.title = title; ! ! /* Invoking the setter methods ensures that the newly constructed ! * TitledBorder has valid property values. ! */ ! setTitleJustification(titleJustification); ! setTitlePosition(titlePosition); ! ! this.titleFont = titleFont; ! this.titleColor = titleColor; ! } ! ! ! /** ! * Paints the border and the title text. ! * ! * @param c the component whose border is to be painted. ! * @param g the graphics for painting. ! * @param x the horizontal position for painting the border. ! * @param y the vertical position for painting the border. ! * @param width the width of the available area for painting the border. ! * @param height the height of the available area for painting the border. ! */ ! public void paintBorder(Component c, Graphics g, ! int x, int y, int width, int height) ! { ! Measurements mes = getMeasurements(c); ! Font oldFont = g.getFont(); ! Color oldColor = g.getColor(); ! ! /** ! * A local helper class for painting the border without changing ! * any pixels inside the rectangle of the title text. ! */ ! class BorderPainter { ! private Component c; ! private Border b; ! private int x, y, width, height; ! ! /** ! * Constructs a BorderPainter. ! * ! * @param c the component whose border is being painted. ! * @param b the border object. ! * @param x the x coordinate of the rectangle delimiting the border. ! * @param y the y coordinate of the rectangle delimiting the border. ! * @param width the width of the rectangle delimiting the border. ! * @param height the width of the rectangle delimiting the border. ! */ ! public BorderPainter(Component c, Border b, ! int x, int y, int width, int height) ! { ! this.c = c; ! this.b = b; ! this.x = x; ! this.y = y; ! this.width = width; ! this.height = height; ! } ! ! ! /** ! * Paints the entire border. ! */ ! public void paint(Graphics g) ! { ! if (b != null) ! b.paintBorder(c, g, x, y, width - 1, height - 1); ! } ! ! ! /** ! * Paints the border, clipping the drawing operation to a ! * given rectangular area. ! */ ! private void paint(Graphics g, ! int clipX, int clipY, int clipWidth, int clipHeight) ! { ! Shape oldClip = g.getClip(); ! try ! { ! g.clipRect(clipX, clipY, clipWidth, clipHeight); ! paint(g); ! } ! finally ! { ! g.setClip(oldClip); ! } ! } ! ! ! /** ! * Paints the border without affecting a given rectangular area. ! * This is used for painting the border without drawing anything ! * underneath the title text. ! * ! *

                Since we do not want to introduce unnecessary dependencies ! * on Java 2D, we perform the clipping without constructive geometry ! * (provided by java.awt.geom.Area). Instead, the border’s ! * bounding rectangle is split into smaller parts, which are then ! * clipped and painted individually.: ! * ! *

                !        *    +--------------------+          +--------------------+
                !        *    |                    |          |        1           |
                !        *    |   +--------+       |          +---+--------+-------+
                !        *    |   | hole   |       |  |====>  | 2 | hole   |   3   |
                !        *    |   +--------+       |          |---+--------+-------+
                !        *    |                    |          |        4           |
                !        *    +--------------------+          +--------------------+
                ! * ! */ ! public void paintExcept(Graphics g, ! int holeX, int holeY, int holeWidth, int holeHeight) ! { ! int stripeHeight; ! ! stripeHeight = holeY - y; ! if (stripeHeight > 0) ! paint(g, x, y, width, stripeHeight); // patch #1 in the image above ! ! stripeHeight = holeHeight; ! if (stripeHeight > 0) ! { ! paint(g, x, holeY, holeX - x, stripeHeight); // patches #2 and #3 ! paint(g, holeX + holeWidth, holeY, width - (holeX + holeWidth), stripeHeight); ! } ! ! stripeHeight = height - (holeY - y + holeHeight); ! if (stripeHeight > 0) ! paint(g, x, y + height - stripeHeight, width, stripeHeight); // #4 ! } ! }; ! ! BorderPainter bp; ! int textX, textY, borderWidth, borderHeight; ! ! borderWidth = width - (mes.borderSpacing.left + mes.borderSpacing.right); ! borderHeight = height - (mes.borderSpacing.top + mes.borderSpacing.bottom); ! bp = new BorderPainter(c, getBorder(), ! x + mes.borderSpacing.left, y + mes.borderSpacing.top, ! borderWidth, borderHeight); ! ! switch (getRealTitleJustification(c)) ! { ! case LEFT: ! textX = x + TEXT_INSET_H; ! break; ! ! case CENTER: ! textX = x + (borderWidth - mes.textWidth) / 2; ! break; ! ! case RIGHT: ! textX = x + borderWidth - (mes.textWidth + TEXT_INSET_H); ! break; ! ! default: ! throw new IllegalStateException(); ! } ! ! switch (titlePosition) ! { ! case ABOVE_TOP: ! textY = y; ! break; ! ! case TOP: ! case DEFAULT_POSITION: ! default: ! textY = y + mes.borderSpacing.top + mes.borderInsets.top - mes.textAscent; ! break; ! ! case BELOW_TOP: ! textY = y + mes.borderSpacing.top + mes.borderInsets.top + TEXT_SPACING; ! break; ! ! case ABOVE_BOTTOM: ! textY = y + height - mes.borderSpacing.bottom - mes.borderInsets.bottom ! - TEXT_SPACING - (mes.textAscent + mes.textDescent); ! break; ! ! case BOTTOM: ! case BELOW_BOTTOM: ! textY = y + height - (mes.textAscent + mes.textDescent); ! break; ! } ! ! if (mes.trimmedText == null) ! bp.paint(g); ! else ! { ! try ! { ! g.setFont(mes.font); ! g.setColor(getTitleColor()); ! g.drawString(mes.trimmedText, textX, textY + mes.textAscent); ! } ! finally ! { ! g.setFont(oldFont); ! g.setColor(oldColor); ! } ! bp.paintExcept(g, textX - 2, textY, ! mes.textWidth + 2, mes.textAscent + mes.textDescent); ! } ! } ! ! ! /** ! * Measures the width of this border. ! * ! * @param c the component whose border is to be measured. ! * ! * @return an Insets object whose left, right, ! * top and bottom fields indicate the ! * width of the border at the respective edge. ! * ! * @see #getBorderInsets(java.awt.Component, java.awt.Insets) ! */ ! public Insets getBorderInsets(Component c) ! { ! return getBorderInsets(c, new Insets(0, 0, 0, 0)); ! } ! ! ! /** ! * Measures the width of this border, storing the results into a ! * pre-existing Insets object. ! * ! * @param insets an Insets object for holding the result values. ! * After invoking this method, the left, ! * right, top and ! * bottom fields indicate the width of the ! * border at the respective edge. ! * ! * @return the same object that was passed for insets. ! * ! * @see #getBorderInsets() ! */ ! public Insets getBorderInsets(Component c, Insets insets) ! { ! return getMeasurements(c).getContentInsets(insets); ! } ! ! ! /** ! * Returns false, indicating that there are pixels inside ! * the area of this border where the background shines through. ! * ! * @return false. ! */ ! public boolean isBorderOpaque() ! { ! /* Note that the AbstractBorder.isBorderOpaque would also return ! * false, so there is actually no need to override the inherited ! * implementation. However, GNU Classpath strives for exact ! * compatibility with the Sun reference implementation, which ! * overrides isBorderOpaque for unknown reasons. ! */ ! return false; ! } ! ! ! /** ! * Returns the text of the title. ! * ! * @return the title text, or null if no title is ! * displayed. ! */ ! public String getTitle() ! { ! return title; ! } ! ! ! /** ! * Retrieves the border underneath the title. If no border has been ! * set, or if it has been set tonull, the current ! * {@link javax.swing.LookAndFeel} will be asked for a border ! * using the key "TitledBorder.border". ! * ! * @return a border, or null if the current LookAndFeel ! * does not provide a border for the key ! * "TitledBorder.border". ! * ! * @see javax.swing.UIManager#getBorder(Object) ! */ ! public Border getBorder() ! { ! if (border != null) ! return border; ! ! return UIManager.getBorder("TitledBorder.border"); ! } ! ! ! /** ! * Returns the vertical position of the title text in relation ! * to the border. ! * ! * @return one of the values {@link #ABOVE_TOP}, {@link #TOP}, ! * {@link #BELOW_TOP}, {@link #ABOVE_BOTTOM}, {@link #BOTTOM}, ! * {@link #BELOW_BOTTOM}, or {@link #DEFAULT_POSITION}. ! */ ! public int getTitlePosition() ! { ! return titlePosition; ! } ! ! ! /** ! * Returns the horizontal alignment of the title text in relation to ! * the border. ! * ! * @return one of the values {@link #LEFT}, {@link #CENTER}, {@link ! * #RIGHT}, {@link #LEADING}, {@link #TRAILING}, or {@link ! * #DEFAULT_JUSTIFICATION}. ! */ ! public int getTitleJustification() ! { ! return titleJustification; ! } ! ! ! /** ! * Retrieves the font for displaying the title text. If no font has ! * been set, or if it has been set tonull, the current ! * {@link javax.swing.LookAndFeel} will be asked for a font ! * using the key "TitledBorder.font". ! * ! * @return a font, or null if the current LookAndFeel ! * does not provide a font for the key ! * "TitledBorder.font". ! * ! * @see javax.swing.UIManager#getFont(Object) ! */ ! public Font getTitleFont() ! { ! if (titleFont != null) ! return titleFont; ! ! return UIManager.getFont("TitledBorder.font"); ! } ! ! ! /** ! * Retrieves the color for displaying the title text. If no color has ! * been set, or if it has been set tonull, the current ! * {@link javax.swing.LookAndFeel} will be asked for a color ! * using the key "TitledBorder.titleColor". ! * ! * @return a color, or null if the current LookAndFeel ! * does not provide a color for the key ! * "TitledBorder.titleColor". ! * ! * @see javax.swing.UIManager#getColor(Object) ! */ ! public Color getTitleColor() ! { ! if (titleColor != null) ! return titleColor; ! ! return UIManager.getColor("TitledBorder.titleColor"); ! } ! ! ! /** ! * Sets the text of the title. ! * ! * @param title the new title text, or null for displaying ! * no text at all. ! */ ! public void setTitle(String title) ! { ! // Swing borders are not JavaBeans, thus no need to fire an event. ! this.title = title; ! } ! ! ! /** ! * Sets the border underneath the title. ! * ! * @param border a border, or null to use the ! * border that is supplied by the current LookAndFeel. ! * ! * @see #getBorder() ! */ ! public void setBorder(Border border) ! { ! // Swing borders are not JavaBeans, thus no need to fire an event. ! this.border = border; ! } ! ! ! /** ! * Sets the vertical position of the title text in relation ! * to the border. ! * ! * @param titlePosition one of the values {@link #ABOVE_TOP}, ! * {@link #TOP}, {@link #BELOW_TOP}, {@link #ABOVE_BOTTOM}, ! * {@link #BOTTOM}, {@link #BELOW_BOTTOM}, ! * or {@link #DEFAULT_POSITION}. ! * ! * @throws IllegalArgumentException if an unsupported value is passed ! * for titlePosition. ! */ ! public void setTitlePosition(int titlePosition) ! { ! if ((titlePosition < DEFAULT_POSITION) || (titlePosition > BELOW_BOTTOM)) ! throw new IllegalArgumentException(); ! ! // Swing borders are not JavaBeans, thus no need to fire an event. ! this.titlePosition = titlePosition; ! } ! ! ! /** ! * Sets the horizontal alignment of the title text in relation to the border. ! * ! * @param titleJustification the new alignment, which must be one of ! * {@link #LEFT}, {@link #CENTER}, {@link #RIGHT}, {@link #LEADING}, ! * {@link #TRAILING}, or {@link #DEFAULT_JUSTIFICATION}. ! * ! * @throws IllegalArgumentException if an unsupported value is passed ! * for titleJustification. ! */ ! public void setTitleJustification(int titleJustification) ! { ! if ((titleJustification < DEFAULT_JUSTIFICATION) ! || (titleJustification > TRAILING)) ! throw new IllegalArgumentException(); ! ! // Swing borders are not JavaBeans, thus no need to fire an event. ! this.titleJustification = titleJustification; ! } ! ! ! /** ! * Sets the font for displaying the title text. ! * ! * @param titleFont the font, or null to use the font ! * provided by the current {@link javax.swing.LookAndFeel}. ! * ! * @see #getTitleFont() ! */ ! public void setTitleFont(Font titleFont) ! { ! // Swing borders are not JavaBeans, thus no need to fire an event. ! this.titleFont = titleFont; ! } ! ! ! /** ! * Sets the color for displaying the title text. ! * ! * @param titleColor the color, or null to use the color ! * provided by the current {@link javax.swing.LookAndFeel}. ! * ! * @see #getTitleColor() ! */ ! public void setTitleColor(Color titleColor) ! { ! // Swing borders are not JavaBeans, thus no need to fire an event. ! this.titleColor = titleColor; ! } ! ! ! /** ! * Calculates the minimum size needed for displaying the border ! * and its title. ! * ! * @param c the Component for which this TitledBorder consitutes ! * a border. ! */ ! public Dimension getMinimumSize(Component c) ! { ! return getMeasurements(c).getMinimumSize(); ! } ! ! ! /** ! * Returns the font that is used for displaying the title text for ! * a given Component. ! * ! * @param c the Component for which this TitledBorder is the border. ! * ! * @return The font returned by {@link #getTitleFont()}, or a fallback ! * if {@link #getTitleFont()} returned null. ! */ ! protected Font getFont(Component c) ! { ! Font f; ! ! f = getTitleFont(); ! if (f != null) ! return f; ! ! return new Font("Dialog", Font.PLAIN, 12); ! } ! ! ! /** ! * Returns the horizontal alignment of the title text in relation to ! * the border, mapping the component-dependent alignment constants ! * {@link #LEADING}, {@link #TRAILING} and {@link #DEFAULT_JUSTIFICATION} ! * to the correct value according to the embedded component’s ! * orientation. ! * ! * @param c the Component for which this TitledBorder is the border. ! * ! * @return one of the values {@link #LEFT}, {@link #CENTER}, or {@link ! * #RIGHT}. ! */ ! private int getRealTitleJustification(Component c) ! { ! switch (titleJustification) ! { ! case DEFAULT_JUSTIFICATION: ! case LEADING: ! if ((c == null) || c.getComponentOrientation().isLeftToRight()) ! return LEFT; ! else ! return RIGHT; ! ! case TRAILING: ! if ((c == null) || c.getComponentOrientation().isLeftToRight()) ! return RIGHT; ! else ! return LEFT; ! ! default: ! return titleJustification; ! } ! } ! ! ! /** ! * Performs various measurements for the current state of this TitledBorder ! * and the given Component. ! */ ! private Measurements getMeasurements(Component c) ! { ! Measurements m = new Measurements(); ! FontMetrics fmet; ! ! m.font = getFont(c); ! fmet = c.getFontMetrics(m.font); ! m.border = getBorder(); ! if (m.border != null) ! m.borderInsets = m.border.getBorderInsets(c); ! else ! m.borderInsets = new Insets(0, 0, 0, 0); ! ! if (title != null) ! { ! m.trimmedText = title.trim(); ! if (m.trimmedText.length() == 0) ! m.trimmedText = null; } + m.textAscent = fmet.getAscent(); + m.textDescent = fmet.getDescent(); + if (m.trimmedText != null) + m.textWidth = fmet.stringWidth(m.trimmedText) + 3; + + m.edgeSpacing = new Insets(EDGE_SPACING, EDGE_SPACING, EDGE_SPACING, EDGE_SPACING); + m.borderSpacing = new Insets(0, 0, 0, 0); + + switch (titlePosition) + { + case ABOVE_TOP: + m.borderSpacing.top += m.textAscent + m.textDescent + TEXT_SPACING; + break; + + case BELOW_TOP: + m.edgeSpacing.top += m.textAscent + m.textDescent + TEXT_SPACING; + break; + + case ABOVE_BOTTOM: + m.edgeSpacing.bottom += m.textAscent + m.textDescent + TEXT_SPACING; + break; + + case BOTTOM: + m.edgeSpacing.bottom += Math.max(m.textAscent - m.borderInsets.bottom, 0); + m.borderSpacing.bottom += m.textDescent; + break; + + case BELOW_BOTTOM: + m.borderSpacing.bottom += m.textAscent + m.textDescent + TEXT_SPACING; + break; + + default: + m.borderSpacing.top += m.textAscent; + } + + return m; + } + + + /** + * A private helper class for holding the result of measuring the + * distances of a TitledBorder. While it would be possible to cache + * these objects, it does not seem to be worth the effort. Note that + * invalidating the cache would be tricky, especially since there is + * no notification mechanism that would inform the cache when + * border has changed, so it would return different insets. + */ + private static class Measurements + { + /** + * The font used for displaying the title text. Note that it can + * well be that the TitledBorder’s font is null, + * which means that the font is to be retrieved from the current + * LookAndFeel. In this case, this font field will + * contain the result of the retrieval. Therefore, it is safe + * to assume that his font field will never have + * a null value. + */ + Font font; + + + /** + * The number of pixels between the base line and the top of the + * text box. + */ + int textAscent; + + + /** + * The number of pixels between the base line and the bottom of + * the text box. + */ + int textDescent; + + + /** + * The title text after removing leading and trailing white space + * characters. If the title consists only of white space, the + * value of trimmedText will be null. + */ + String trimmedText; + + + /** + * The width of the trimmed title text in pixels. + */ + int textWidth; + + + /** + * The border that constitues the "interior" border + * underneath the title text. + */ + Border border; + + + /** + * The distance between the TitledBorder and the interior border. + */ + Insets borderSpacing; + + /** + * The width of the interior border, as returned by + * border.getBorderInsets(). + */ + Insets borderInsets; + ! /** ! * The distance between the interior border and the nested ! * Component for which this TitledBorder is a border. ! */ ! Insets edgeSpacing; ! ! ! /** ! * Determines the insets of the nested component when it has a ! * TitledBorder as its border. Used by {@link ! * TitledBorder#getBorderInsets()}. ! * ! * @param i an Insets object for storing the results into, or ! * null to cause the creation of a ! * new instance. ! * ! * @return the i object, or a new Insets object ! * if null was passed for i. ! */ ! public Insets getContentInsets(Insets i) { ! if (i == null) ! i = new Insets(0, 0, 0, 0); ! i.left = borderSpacing.left + borderInsets.left + edgeSpacing.left; ! i.right = borderSpacing.right + borderInsets.right + edgeSpacing.right; ! i.top = borderSpacing.top + borderInsets.top + edgeSpacing.top; ! i.bottom = borderSpacing.bottom + borderInsets.bottom + edgeSpacing.bottom; ! return i; } ! ! ! /** ! * Calculates the minimum size needed for displaying the border ! * and its title. Used by {@link TitledBorder#getMiminumSize()}. ! */ ! public Dimension getMinimumSize() { + int width; + Insets insets; + + insets = getContentInsets(null); + width = Math.max(insets.left + insets.right, textWidth + 2 * TEXT_INSET_H); + return new Dimension(width, insets.top + insets.bottom); } + } } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/BorderFactory.java gcc-3.4.0/libjava/javax/swing/BorderFactory.java *** gcc-3.3.3/libjava/javax/swing/BorderFactory.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/BorderFactory.java 2003-06-11 13:20:39.000000000 +0000 *************** *** 1,331 **** ! package javax.swing; ! ! import java.awt.*; ! import java.awt.font.*; ! import javax.swing.border.*; ! ! ! public class BorderFactory ! { ! public static Border createLineBorder(Color color) ! { /* ! Creates a line border withe the specified color. ! ! Parameters: ! color - a Color to use for the lineReturns: ! the Border object ! createLineBorder ! */ ! return null; ! } ! ! public static Border createLineBorder(Color color, ! int thickness) ! { /* ! ! Creates a line border withe the specified color and width. The width applies to all 4 sides of the border. To specify widths individually for the top, bottom, left, and right, use createMatteBorder(int,int,int,int,Color). ! ! Parameters: ! color - a Color to use for the linethickness - an int specifying the width in pixelsReturns: ! the Border object ! createRaisedBevelBorder ! */ ! return null; ! } ! ! ! public static Border createRaisedBevelBorder() ! { /* ! ! Created a border with a raised beveled edge, using brighter shades of the component's current background color for highlighting, and darker shading for shadows. (In a raised border, highlights are on top and shadows are underneath.) ! ! Returns: ! the Border object ! createLoweredBevelBorder ! ! */ ! return null; ! } ! ! public static Border createLoweredBevelBorder() ! { /* ! ! Created a border with a lowered beveled edge, using brighter shades of the component's current background color for highlighting, and darker shading for shadows. (In a lowered border, shadows are on top and highlights are underneath.) ! ! Returns: ! the Border object ! createBevelBorder ! ! */ ! return null; ! } ! ! public static Border createBevelBorder(int type) ! ! { /* ! Create a beveled border of the specified type, using brighter shades of the component's current background color for highlighting, and darker shading for shadows. (In a lowered border, shadows are on top and highlights are underneath.). ! ! Parameters: ! type - an int specifying either BevelBorder.LOWERED or BevelBorder.LOWEREDReturns: ! the Border object ! createBevelBorder ! ! */ ! return null; ! } ! ! public static Border createBevelBorder(int type, ! Color highlight, ! Color shadow) ! { /* ! ! Create a beveled border of the specified type, using the specified highlighting and shadowing. The outer edge of the highlighted area uses a brighter shade of the highlight color. The inner edge of the shadow area uses a brighter shade of the shadaw color. ! ! Parameters: ! type - an int specifying either BevelBorder.LOWERED or BevelBorder.LOWEREDhighlight - a Color object for highlightsshadow - a Color object for shadowsReturns: ! the Border object ! createBevelBorder ! ! */ ! return null; ! } ! ! public static Border createBevelBorder(int type, ! Color highlightOuter, ! Color highlightInner, ! Color shadowOuter, ! Color shadowInner) ! { /* ! ! Create a beveled border of the specified type, using the specified colors for the inner and outer highlight and shadow areas. ! ! Parameters: ! type - an int specifying either BevelBorder.LOWERED or BevelBorder.LOWEREDhighlightOuter - a Color object for the outer edge of the highlight areahighlightInner - a Color object for the inner edge of the highlight areashadowOuter - a Color object for the outer edge of the shadow areashadowInner - a Color object for the inner edge of the shadow areaReturns: ! the Border object ! createEtchedBorder ! */ ! return null; ! } ! ! ! public static Border createEtchedBorder() ! { /* ! ! Create a border with an "etched" look using the component's current background color for highlighting and shading. ! ! Returns: ! the Border object ! createEtchedBorder ! ! */ ! return null; ! } ! ! public static Border createEtchedBorder(Color highlight, ! Color shadow) ! { /* ! ! Create a border with an "etched" look using the specified highlighting and shading colors. ! ! Parameters: ! highlight - a Color object for the border highlightsshadow - a Color object for the border shadowsReturns: ! the Border object ! createTitledBorder ! ! */ ! return null; ! } ! ! public static TitledBorder createTitledBorder(String title) ! { /* ! Create a new title border specifying the text of the title, using the default border (etched), using the default text position (sitting on the top line) and default justification (left) and using the default font and text color determined by the current look and feel. ! ! Parameters: ! title - a String containing the text of the titleReturns: ! the TitledBorder object ! createTitledBorder ! ! */ ! return null; ! } ! ! public static TitledBorder createTitledBorder(Border border) ! { /* ! ! Create a new title border with an empty title specifying the border object, using the default text position (sitting on the top line) and default justification (left) and using the default font, text color, and border determined by the current look and feel. (The Motif and Windows look and feels use an etched border; The Java look and feel use a gray border.) ! ! Parameters: ! border - the Border object to add the title toReturns: ! the TitledBorder object ! createTitledBorder ! ! */ ! return null; ! } ! ! public static TitledBorder createTitledBorder(Border border, ! String title) ! { /* ! ! Add a title to an existing border, specifying the text of the title, using the default positioning (sitting on the top line) and default justification (left) and using the default font and text color determined by the current look and feel. ! ! Parameters: ! border - the Border object to add the title totitle - a String containing the text of the titleReturns: ! the TitledBorder object ! createTitledBorder ! ! */ ! return null; ! } ! ! public static TitledBorder createTitledBorder(Border border, ! String title, ! int titleJustification, ! int titlePosition) ! { /* ! ! Add a title to an existing border, specifying the text of the title along with its positioning, using the default font and text color determined by the current look and feel. ! ! Parameters: ! border - the Border object to add the title totitle - a String containing the text of the titletitleJustification - an int specifying the left/right position of the title -- one of TitledBorder.LEFT, TitledBorder.CENTER, or TitledBorder.RIGHT, TitledBorder.DEFAULT_JUSTIFICATION (left).titlePosition - an int specifying the vertical position of the text in relation to the border -- one of: TitledBorder.ABOVE_TOP, TitledBorder.TOP (sitting on the top line), TitledBorder.BELOW_TOP, TitledBorder.ABOVE_BOTTOM, TitledBorder.BOTTOM (sitting on the bottom line), TitledBorder.BELOW_BOTTOM, or TitledBorder.DEFAULT_POSITION (top).Returns: ! the TitledBorder object ! createTitledBorder ! ! */ ! return null; ! } ! ! public static TitledBorder createTitledBorder(Border border, ! String title, ! int titleJustification, ! int titlePosition, ! Font titleFont) ! { /* ! ! Add a title to an existing border, specifying the text of the title along with its positioning and font, using the default text color determined by the current look and feel. ! Parameters: ! border - the Border object to add the title totitle - a String containing the text of the titletitleJustification - an int specifying the left/right position of the title -- one of TitledBorder.LEFT, TitledBorder.CENTER, or TitledBorder.RIGHT, TitledBorder.DEFAULT_JUSTIFICATION (left).titlePosition - an int specifying the vertical position of the text in relation to the border -- one of: TitledBorder.ABOVE_TOP, TitledBorder.TOP (sitting on the top line), TitledBorder.BELOW_TOP, TitledBorder.ABOVE_BOTTOM, TitledBorder.BOTTOM (sitting on the bottom line), TitledBorder.BELOW_BOTTOM, or TitledBorder.DEFAULT_POSITION (top).titleFont - a Font object specifying the title fontReturns: ! the TitledBorder object ! createTitledBorder ! */ ! return null; ! } ! public static TitledBorder createTitledBorder(Border border, ! String title, ! int titleJustification, ! int titlePosition, ! Font titleFont, ! Color titleColor) ! { /* ! Add a title to an existing border, specifying the text of the title along with its positioning, font, and color. ! Parameters: ! border - the Border object to add the title totitle - a String containing the text of the titletitleJustification - an int specifying the left/right position of the title -- one of TitledBorder.LEFT, TitledBorder.CENTER, or TitledBorder.RIGHT, TitledBorder.DEFAULT_JUSTIFICATION (left).titlePosition - an int specifying the vertical position of the text in relation to the border -- one of: TitledBorder.ABOVE_TOP, TitledBorder.TOP (sitting on the top line), TitledBorder.BELOW_TOP, TitledBorder.ABOVE_BOTTOM, TitledBorder.BOTTOM (sitting on the bottom line), TitledBorder.BELOW_BOTTOM, or TitledBorder.DEFAULT_POSITION (top).titleFont - a Font object specifying the title fonttitleColor - a Color object specifying the title colorReturns: ! the TitledBorder object ! createEmptyBorder ! */ ! return null; ! } - public static Border createEmptyBorder() - { /* ! Creates an empty border that takes up no space. (The width of the top, bottom, left, and right sides are all zero.) ! Returns: ! the Border object ! createEmptyBorder ! */ return null; ! } ! public static Border createEmptyBorder(int top, ! int left, ! int bottom, ! int right) ! { /* ! Creates an empty border that takes up no space but which does no drawing, specifying the width of the top, left, bottom, and right sides. ! Parameters: ! top - an int specifying the width of the top in pixelsleft - an int specifying the width of the left side in pixelsbottom - an int specifying the width of the right side in pixelsright - an int specifying the width of the bottom in pixelsReturns: ! the Border object ! createCompoundBorder ! */ ! return null; ! } ! public static CompoundBorder createCompoundBorder() ! { /* ! Create a compound border with a null inside edge and a null outside edge. ! Returns: ! the CompoundBorder object ! createCompoundBorder ! */ ! return null; ! } ! public static CompoundBorder createCompoundBorder(Border outsideBorder, ! Border insideBorder) ! { /* ! Create a compound border specifying the border objects to use for the outside and inside edges. ! Parameters: ! outsideBorder - a Border object for the outer edge of the compound borderinsideBorder - a Border object for the inner edge of the compound borderReturns: ! the CompoundBorder object ! createMatteBorder ! */ ! return null; ! } ! public static MatteBorder createMatteBorder(int top, ! int left, ! int bottom, ! int right, ! Color color) ! { /* ! Create a matte-look border using a solid color. (The difference between this border and a line border is that you can specify the individual border dimensions.) ! Parameters: ! top - an int specifying the width of the top in pixelsleft - an int specifying the width of the left side in pixelsbottom - an int specifying the width of the right side in pixelsright - an int specifying the width of the bottom in pixelscolor - a Color to use for the borderReturns: ! the MatteBorder object ! createMatteBorder ! */ ! return null; ! } ! public static MatteBorder createMatteBorder(int top, ! int left, ! int bottom, ! int right, ! Icon tileIcon) ! { /* ! Create a matte-look border that consists of multiple tiles of a specified icon. Multiple copies of the icon are placed side-by-side to fill up the border area. ! Note: ! If the icon doesn't load, the border area is painted gray. ! Parameters: ! top - an int specifying the width of the top in pixelsleft - an int specifying the width of the left side in pixelsbottom - an int specifying the width of the right side in pixelsright - an int specifying the width of the bottom in pixelstileIcon - the Icon object used for the border tilesReturns: ! the MatteBorder object ! */ ! return null; ! } } --- 1,443 ---- ! /* BorderFactory.java ! Copyright (C) 2002 Free Software Foundation, Inc. ! This file is part of GNU Classpath. ! GNU Classpath is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! GNU Classpath is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with GNU Classpath; see the file COPYING. If not, write to the ! Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ! 02111-1307 USA. ! Linking this library statically or dynamically with other modules is ! making a combined work based on this library. Thus, the terms and ! conditions of the GNU General Public License cover the whole ! combination. ! As a special exception, the copyright holders of this library give you ! permission to link this library with independent modules to produce an ! executable, regardless of the license terms of these independent ! modules, and to copy and distribute the resulting executable under ! terms of your choice, provided that you also meet, for each linked ! independent module, the terms and conditions of the license of that ! module. An independent module is a module which is not derived from ! or based on this library. If you modify this library, you may extend ! this exception to your version of the library, but you are not ! obligated to do so. If you do not wish to do so, delete this ! exception statement from your version. */ ! package javax.swing; ! import java.awt.Color; ! import java.awt.Font; ! import javax.swing.border.BevelBorder; ! import javax.swing.border.Border; ! import javax.swing.border.CompoundBorder; ! import javax.swing.border.EmptyBorder; ! import javax.swing.border.EtchedBorder; ! import javax.swing.border.LineBorder; ! import javax.swing.border.MatteBorder; ! import javax.swing.border.TitledBorder; ! public class BorderFactory ! { ! /** ! * Creates a line border withe the specified color. ! * ! * @param color A color to use for the line. ! * ! * @return The Border object ! */ ! public static Border createLineBorder(Color color) ! { return null; ! } ! /** ! * Creates a line border withe the specified color and width. The width ! * applies to all 4 sides of the border. To specify widths individually for ! * the top, bottom, left, and right, use ! * createMatteBorder(int,int,int,int,Color). ! * ! * @param color A color to use for the line. ! * @param thickness An int specifying the width in pixels. ! * ! * @return The Border object ! */ ! public static Border createLineBorder (Color color, int thickness) ! { ! return new LineBorder (color, thickness); ! } ! /** ! * Created a border with a raised beveled edge, using brighter shades of ! * the component's current background color for highlighting, and darker ! * shading for shadows. (In a raised border, highlights are on top and ! * shadows are underneath.) ! * ! * @return The Border object ! */ ! public static Border createRaisedBevelBorder () ! { ! return new BevelBorder (BevelBorder.RAISED); ! } ! /** ! * Created a border with a lowered beveled edge, using brighter shades of ! * the component's current background color for highlighting, and darker ! * shading for shadows. (In a lowered border, shadows are on top and ! * highlights are underneath.) ! * ! * @return The Border object ! */ ! public static Border createLoweredBevelBorder () ! { ! return new BevelBorder (BevelBorder.LOWERED); ! } ! /** ! * Create a beveled border of the specified type, using brighter shades of ! * the component's current background color for highlighting, and darker ! * shading for shadows. (In a lowered border, shadows are on top and ! * highlights are underneath.). ! * ! * @param type An int specifying either BevelBorder.LOWERED or ! * BevelBorder.RAISED ! * ! * @Return The Border object ! */ ! public static Border createBevelBorder (int type) ! { ! return new BevelBorder (type); ! } ! /** ! * Create a beveled border of the specified type, using the specified ! * highlighting and shadowing. The outer edge of the highlighted area uses ! * a brighter shade of the highlight color. The inner edge of the shadow ! * area uses a brighter shade of the shadaw color. ! * ! * @param type An int specifying either BevelBorder.LOWERED or ! * BevelBorder.RAISED ! * @param highlight A Color object for highlights ! * @param shadow A Color object for shadows ! * ! * @return The Border object ! */ ! public static Border createBevelBorder (int type, Color highlight, ! Color shadow) ! { ! return new BevelBorder (type, highlight, shadow); ! } ! /** ! * Create a beveled border of the specified type, using the specified colors ! * for the inner and outer highlight and shadow areas. ! * ! * @param type An int specifying either BevelBorder.LOWERED or ! * BevelBorder.RAISED ! * @param highlightOuter A Color object for the outer edge of the ! * highlight area ! * @param highlightInner A Color object for the inner edge of the ! * highlight area ! * @param shadowOuter A Color object for the outer edge of the shadow area ! * @param shadowInner A Color object for the inner edge of the shadow area ! * ! * @return The Border object ! */ ! public static Border createBevelBorder (int type, Color highlightOuter, ! Color highlightInner, ! Color shadowOuter, Color shadowInner) ! { ! return new BevelBorder (type, highlightOuter, highlightInner, shadowOuter, ! shadowInner); ! } ! /** ! * Create a border with an "etched" look using the component's current ! * background color for highlighting and shading. ! * ! * @return The Border object ! */ ! public static Border createEtchedBorder () ! { ! return new EtchedBorder (); ! } + /** + * Create a border with an "etched" look using the component's current + * background color for highlighting and shading. + * + * @return The Border object + */ + public static Border createEtchedBorder (int etchType) + { + return new EtchedBorder (etchType); + } ! /** ! * Create a border with an "etched" look using the specified highlighting and ! * shading colors. ! * ! * @param highlight A Color object for the border highlights ! * @param shadow A Color object for the border shadows ! * ! * @return The Border object ! */ ! public static Border createEtchedBorder (Color highlight, Color shadow) ! { ! return new EtchedBorder (highlight, shadow); ! } ! /** ! * Create a border with an "etched" look using the specified highlighting and ! * shading colors. ! * ! * @param highlight A Color object for the border highlights ! * @param shadow A Color object for the border shadows ! * ! * @return The Border object ! */ ! public static Border createEtchedBorder (int etchType, Color highlight, ! Color shadow) ! { ! return new EtchedBorder (etchType, highlight, shadow); ! } ! /** ! * Create a new title border specifying the text of the title, using the ! * default border (etched), using the default text position (sitting on the ! * top line) and default justification (left) and using the default font and ! * text color determined by the current look and feel. ! * ! * @param title A String containing the text of the title ! * ! * @return The TitledBorder object ! */ ! public static TitledBorder createTitledBorder (String title) ! { ! return new TitledBorder (title); ! } + /** + * Create a new title border with an empty title specifying the border + * object, using the default text position (sitting on the top line) and + * default justification (left) and using the default font, text color, + * and border determined by the current look and feel. (The Motif and Windows + * look and feels use an etched border; The Java look and feel use a + * gray border.) + * + * @param border The Border object to add the title to + * + * @return The TitledBorder object + */ + public static TitledBorder createTitledBorder (Border border) + { + return new TitledBorder (border); + } ! /** ! * Add a title to an existing border, specifying the text of the title, using ! * the default positioning (sitting on the top line) and default ! * justification (left) and using the default font and text color determined ! * by the current look and feel. ! * ! * @param order The Border object to add the title to ! * @param title A String containing the text of the title ! * ! * @return The TitledBorder object ! */ ! public static TitledBorder createTitledBorder (Border border, String title) ! { ! return new TitledBorder (border, title); ! } ! /** ! * Add a title to an existing border, specifying the text of the title along ! * with its positioning, using the default font and text color determined by ! * the current look and feel. ! * ! * @param border The Border object to add the title to ! * @param title A String containing the text of the title ! * @param titleJustification An int specifying the left/right position of ! * the title -- one of TitledBorder.LEFT, TitledBorder.CENTER, or ! * TitledBorder.RIGHT, TitledBorder.DEFAULT_JUSTIFICATION (left). ! * @param titlePosition An int specifying the vertical position of the text ! * in relation to the border -- one of: TitledBorder.ABOVE_TOP, ! * TitledBorder.TOP (sitting on the top line), TitledBorder.BELOW_TOP, ! * TitledBorder.ABOVE_BOTTOM, TitledBorder.BOTTOM (sitting on the bottom ! * line), TitledBorder.BELOW_BOTTOM, or TitledBorder.DEFAULT_POSITION (top). ! * ! * @return The TitledBorder object ! */ ! public static TitledBorder createTitledBorder (Border border, String title, ! int titleJustification, ! int titlePosition) ! { ! return new TitledBorder (border, title, titleJustification, titlePosition); ! } ! /** ! * Add a title to an existing border, specifying the text of the title along ! * with its positioning and font, using the default text color determined by ! * the current look and feel. ! * ! * @param border - the Border object to add the title to ! * @param title - a String containing the text of the title ! * @param titleJustification - an int specifying the left/right position of ! * the title -- one of TitledBorder.LEFT, TitledBorder.CENTER, or ! * TitledBorder.RIGHT, TitledBorder.DEFAULT_JUSTIFICATION (left). ! * @param titlePosition - an int specifying the vertical position of the ! * text in relation to the border -- one of: TitledBorder.ABOVE_TOP, ! * TitledBorder.TOP (sitting on the top line), TitledBorder.BELOW_TOP, ! * TitledBorder.ABOVE_BOTTOM, TitledBorder.BOTTOM (sitting on the bottom ! * line), TitledBorder.BELOW_BOTTOM, or TitledBorder.DEFAULT_POSITION (top). ! * @param titleFont - a Font object specifying the title font ! * ! * @return The TitledBorder object ! */ ! public static TitledBorder createTitledBorder (Border border, String title, ! int titleJustification, ! int titlePosition, ! Font titleFont) ! { ! return new TitledBorder (border, title, titleJustification, titlePosition, ! titleFont); ! } ! /** ! * Add a title to an existing border, specifying the text of the title along ! * with its positioning, font, and color. ! * ! * @param border - the Border object to add the title to ! * @param title - a String containing the text of the title ! * @param titleJustification - an int specifying the left/right position of ! * the title -- one of TitledBorder.LEFT, TitledBorder.CENTER, or ! * TitledBorder.RIGHT, TitledBorder.DEFAULT_JUSTIFICATION (left). ! * @param titlePosition - an int specifying the vertical position of the text ! * in relation to the border -- one of: TitledBorder.ABOVE_TOP, ! * TitledBorder.TOP (sitting on the top line), TitledBorder.BELOW_TOP, ! * TitledBorder.ABOVE_BOTTOM, TitledBorder.BOTTOM (sitting on the bottom ! * line), TitledBorder.BELOW_BOTTOM, or TitledBorder.DEFAULT_POSITION (top). ! * @param titleFont - a Font object specifying the title font ! * @param titleColor - a Color object specifying the title color ! * ! * @return The TitledBorder object ! */ ! public static TitledBorder createTitledBorder (Border border, ! String title, ! int titleJustification, ! int titlePosition, ! Font titleFont, ! Color titleColor) ! { ! return new TitledBorder (border, title, titleJustification, titlePosition, ! titleFont, titleColor); ! } ! /** ! * Creates an empty border that takes up no space. (The width of the top, ! * bottom, left, and right sides are all zero.) ! * ! * @return The Border object ! */ ! public static Border createEmptyBorder () ! { ! return new EmptyBorder (0, 0, 0, 0); ! } ! /** ! * Creates an empty border that takes up no space but which does no drawing, ! * specifying the width of the top, left, bottom, and right sides. ! * ! * @param top An int specifying the width of the top in pixels ! * @param left An int specifying the width of the left side in pixels ! * @param bottom An int specifying the width of the right side in pixels ! * @param right An int specifying the width of the bottom in pixels ! * ! * @return The Border object ! */ ! public static Border createEmptyBorder (int top, int left, int bottom, ! int right) ! { ! return new EmptyBorder (top, left, bottom, right); ! } ! /** ! * Create a compound border with a null inside edge and a null outside edge. ! * ! * @return The CompoundBorder object ! */ ! public static CompoundBorder createCompoundBorder () ! { ! return new CompoundBorder (); ! } ! /** ! * Create a compound border specifying the border objects to use for the ! * outside and inside edges. ! * ! * @param outsideBorder A Border object for the outer edge of the ! * compound border ! * @param insideBorder A Border object for the inner edge of the ! * compound border ! * ! * @return The CompoundBorder object ! */ ! public static CompoundBorder createCompoundBorder (Border outsideBorder, ! Border insideBorder) ! { ! return new CompoundBorder (outsideBorder, insideBorder); ! } ! /** ! * Create a matte-look border using a solid color. (The difference between ! * this border and a line border is that you can specify the individual ! * border dimensions.) ! * ! * @param top An int specifying the width of the top in pixels ! * @param left An int specifying the width of the left side in pixels ! * @param bottom An int specifying the width of the right side in pixels ! * @param right An int specifying the width of the bottom in pixels ! * @param color A Color to use for the border ! * ! * @return The MatteBorder object ! */ ! public static MatteBorder createMatteBorder (int top, int left, int bottom, ! int right, Color color) ! { ! return new MatteBorder (top, left, bottom, right, color); ! } + /** + * Create a matte-look border that consists of multiple tiles of a specified + * icon. Multiple copies of the icon are placed side-by-side to fill up the + * border area. + * + * Note: + * If the icon doesn't load, the border area is painted gray. + * + * @param top An int specifying the width of the top in pixels + * @param left An int specifying the width of the left side in pixels + * @param bottom An int specifying the width of the right side in pixels + * @param right An int specifying the width of the bottom in pixels + * @param tileIcon The Icon object used for the border tiles + * + * @return The MatteBorder object + */ + public static MatteBorder createMatteBorder (int top, int left, int bottom, + int right, Icon tileIcon) + { + return new MatteBorder (top, left, bottom, right, tileIcon); + } } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/BoundedRangeModel.java gcc-3.4.0/libjava/javax/swing/BoundedRangeModel.java *** gcc-3.3.3/libjava/javax/swing/BoundedRangeModel.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/BoundedRangeModel.java 2004-01-09 10:18:47.000000000 +0000 *************** *** 1,5 **** /* BoundedRangeModel.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* BoundedRangeModel.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,44 **** package javax.swing; ! // Imports ! import javax.swing.event.*; /** * BoundedRangeModel --- 37,43 ---- package javax.swing; ! import javax.swing.event.ChangeListener; /** * BoundedRangeModel *************** public interface BoundedRangeModel { *** 55,115 **** * getValue * @returns int */ ! public int getValue(); /** * setValue * @param value TODO */ ! public void setValue(int value); /** * getMinimum * @returns int */ ! public int getMinimum(); /** * setMinimum * @param minimum TODO */ ! public void setMinimum(int minimum); /** * getMaximum * @returns int */ ! public int getMaximum(); /** * setMaximum * @param maximum TODO */ ! public void setMaximum(int maximum); /** * getValueIsAdjusting * @returns boolean */ ! public boolean getValueIsAdjusting(); /** * setValueIsAdjusting * @param adjusting TODO */ ! public void setValueIsAdjusting(boolean adjusting); /** * getExtent * @returns int */ ! public int getExtent(); /** * setExtent * @param extent TODO */ ! public void setExtent(int extent); /** * setRangeProperties --- 54,114 ---- * getValue * @returns int */ ! int getValue(); /** * setValue * @param value TODO */ ! void setValue(int value); /** * getMinimum * @returns int */ ! int getMinimum(); /** * setMinimum * @param minimum TODO */ ! void setMinimum(int minimum); /** * getMaximum * @returns int */ ! int getMaximum(); /** * setMaximum * @param maximum TODO */ ! void setMaximum(int maximum); /** * getValueIsAdjusting * @returns boolean */ ! boolean getValueIsAdjusting(); /** * setValueIsAdjusting * @param adjusting TODO */ ! void setValueIsAdjusting(boolean adjusting); /** * getExtent * @returns int */ ! int getExtent(); /** * setExtent * @param extent TODO */ ! void setExtent(int extent); /** * setRangeProperties *************** public interface BoundedRangeModel { *** 119,138 **** * @param max TODO * @param adjusting TODO */ ! public void setRangeProperties(int value, int extent, int min, int max, boolean adjusting); /** * addChangeListener * @param listener TODO */ ! public void addChangeListener(ChangeListener listener); /** * removeChangeListener * @param listener TODO */ ! public void removeChangeListener(ChangeListener listener); } // BoundedRangeModel --- 118,137 ---- * @param max TODO * @param adjusting TODO */ ! void setRangeProperties(int value, int extent, int min, int max, boolean adjusting); /** * addChangeListener * @param listener TODO */ ! void addChangeListener(ChangeListener listener); /** * removeChangeListener * @param listener TODO */ ! void removeChangeListener(ChangeListener listener); } // BoundedRangeModel diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/Box.java gcc-3.4.0/libjava/javax/swing/Box.java *** gcc-3.3.3/libjava/javax/swing/Box.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/Box.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,48 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing; /** * Needs some work I guess.... * * @author Ronald Veldema (rveldema@cs.vu.nl) */ ! public class Box extends JComponent { Box(int a) { --- 35,51 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; + import javax.accessibility.Accessible; + /** * Needs some work I guess.... * * @author Ronald Veldema (rveldema@cs.vu.nl) */ ! public class Box extends JComponent implements Accessible { Box(int a) { diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/BoxLayout.java gcc-3.4.0/libjava/javax/swing/BoxLayout.java *** gcc-3.3.3/libjava/javax/swing/BoxLayout.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/BoxLayout.java 2003-11-24 16:55:43.000000000 +0000 *************** *** 1,5 **** /* BoxLayout.java -- A layout for swing components. ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* BoxLayout.java -- A layout for swing components. ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,43 **** package javax.swing; ! import java.awt.*; /** * A layout for swing components. --- 37,51 ---- package javax.swing; ! import java.awt.AWTError; ! import java.awt.Component; ! import java.awt.ComponentOrientation; ! import java.awt.Container; ! import java.awt.Dimension; ! import java.awt.GridLayout; ! import java.awt.LayoutManager2; ! import java.io.Serializable; ! /** * A layout for swing components. *************** import java.awt.*; *** 46,148 **** * * @author Ronald Veldema (rveldema@cs.vu.nl) */ ! public class BoxLayout implements LayoutManager2 { ! GridLayout gridbag; ! ! final static int X_AXIS = 0; ! final static int Y_AXIS = 1; ! int way = X_AXIS; ! BoxLayout(JComponent p, ! int way) ! { ! int width = 0; ! int height = 0; ! this.way = way; ! if (way == X_AXIS) ! { ! width = 1; ! } ! else ! { ! height = 1; ! } ! ! gridbag = new GridLayout(width, height); ! } ! ! BoxLayout(int way) ! { ! this(null,way); ! } ! ! public void addLayoutComponent(String name, Component comp) ! { ! if (way == X_AXIS) ! { ! gridbag.setColumns( gridbag.getColumns() + 1); ! } ! else ! { ! gridbag.setRows( gridbag.getRows() + 1); ! } ! } ! public void removeLayoutComponent(Component comp) ! { ! gridbag.removeLayoutComponent(comp); ! if (way == X_AXIS) ! { ! gridbag.setColumns( gridbag.getColumns() - 1); ! } else ! { ! gridbag.setRows( gridbag.getRows() - 1); ! } ! } ! public Dimension preferredLayoutSize(Container parent) ! { ! return gridbag.preferredLayoutSize(parent); ! } ! public Dimension minimumLayoutSize(Container parent) ! { ! return gridbag.minimumLayoutSize(parent); ! } ! public void layoutContainer(Container parent) ! { ! gridbag.layoutContainer(parent); ! } ! public void addLayoutComponent ( Component child, Object constraints ) ! { ! addLayoutComponent("", child); ! } ! public float getLayoutAlignmentX ( Container parent ) ! { ! return 0; ! } ! public float getLayoutAlignmentY ( Container parent ) ! { ! return 0; ! } ! public void invalidateLayout ( Container parent ) ! { ! } ! public Dimension maximumLayoutSize ( Container parent ) ! { ! return preferredLayoutSize(parent); ! } } --- 54,290 ---- * * @author Ronald Veldema (rveldema@cs.vu.nl) */ ! public class BoxLayout implements LayoutManager2, Serializable { ! /** ! * Specifies that components are laid out left to right. ! */ ! public static final int X_AXIS = 0; ! /** ! * Specifies that components are laid out top to bottom. ! */ ! public static final int Y_AXIS = 1; ! /** ! * Specifies that components are laid out in the direction of a line of text. ! */ ! public static final int LINE_AXIS = 2; ! /** ! * Sepcifies that components are laid out in the direction of the line flow. ! */ ! public static final int PAGE_AXIS = 3; ! /* ! * Needed for serialization. ! */ ! private static final long serialVersionUID = -2474455742719112368L; ! /* ! * The container given to the constructor. ! */ ! private Container container; ! ! /* ! * Internal layout. ! */ ! private GridLayout grid; ! /* ! * Current type of component layouting. Defaults to X_AXIS. ! */ ! private int way = X_AXIS; ! /** ! * Constructs a BoxLayout object. ! * ! * @param container The container that needs to be laid out. ! * @param way The orientation of the components. ! * ! * @exception AWTError If way has an invalid value. ! */ ! public BoxLayout(Container container, int way) ! { ! int width = 0; ! int height = 0; ! ComponentOrientation orientation = container.getComponentOrientation(); ! ! this.container = container; ! this.way = way; ! ! switch (way) ! { ! case X_AXIS: ! width = 1; ! break; ! case Y_AXIS: ! height = 1; ! break; ! case LINE_AXIS: ! if (orientation.isHorizontal()) ! height = 1; else ! width = 1; ! break; ! case PAGE_AXIS: ! if (!orientation.isHorizontal()) ! height = 1; ! else ! width = 1; ! break; ! default: ! throw new AWTError("Invalid value for way"); ! } ! grid = new GridLayout(width, height); ! } ! /** ! * Adds a component to the layout. ! * ! * @param name The name of the component to add. ! * @param component the component to add to the layout. ! */ ! public void addLayoutComponent(String name, Component component) ! { ! if (way == X_AXIS ! || (way == LINE_AXIS ! && component.getComponentOrientation().isHorizontal()) ! || (way == PAGE_AXIS ! && !component.getComponentOrientation().isHorizontal())) ! grid.setColumns(grid.getColumns() + 1); ! else ! grid.setRows(grid.getRows() + 1); ! } ! /** ! * Removes a component from the layout. ! * ! * @param component The component to remove from the layout. ! */ ! public void removeLayoutComponent(Component component) ! { ! grid.removeLayoutComponent(component); ! if (way == X_AXIS ! || (way == LINE_AXIS ! && component.getComponentOrientation().isHorizontal()) ! || (way == PAGE_AXIS ! && !component.getComponentOrientation().isHorizontal())) ! grid.setColumns(grid.getColumns() - 1); ! else ! grid.setRows(grid.getRows() - 1); ! } ! /** ! * Returns the preferred size of the layout. ! * ! * @param parent The container that needs to be laid out. ! * ! * @return The dimension of the layout. ! */ ! public Dimension preferredLayoutSize(Container parent) ! { ! if (parent != container) ! throw new AWTError("invalid parent"); ! ! return grid.preferredLayoutSize(parent); ! } ! /** ! * Returns the minimum size of the layout. ! * ! * @param parent The container that needs to be laid out. ! * ! * @return The dimension of the layout. ! */ ! public Dimension minimumLayoutSize(Container parent) ! { ! if (parent != container) ! throw new AWTError("invalid parent"); ! ! return grid.minimumLayoutSize(parent); ! } ! /** ! * Lays out the specified container using this layout. ! * ! * @param parent The container that needs to be laid out. ! */ ! public void layoutContainer(Container parent) ! { ! if (parent != container) ! throw new AWTError("invalid parent"); ! ! grid.layoutContainer(parent); ! } ! /** ! * Adds a component to the layout. ! * ! * @param child The component to add to the layout. ! * @param constraints The constraints for the component in the layout. ! */ ! public void addLayoutComponent(Component child, Object constraints) ! { ! addLayoutComponent("", child); ! } ! ! /** ! * Returns the alignment along the X axis for the container. ! * ! * @param parent The container that needs to be laid out. ! * ! * @return The alignment. ! */ ! public float getLayoutAlignmentX(Container parent) ! { ! if (parent != container) ! throw new AWTError("invalid parent"); ! ! return 0; ! } ! ! /** ! * Returns the alignment along the Y axis for the container. ! * ! * @param parent The container that needs to be laid out. ! * ! * @return The alignment. ! */ ! public float getLayoutAlignmentY(Container parent) ! { ! if (parent != container) ! throw new AWTError("invalid parent"); ! ! return 0; ! } ! ! /** ! * Invalidates the layout. ! * ! * @param parent The container that needs to be laid out. ! */ ! public void invalidateLayout(Container parent) ! { ! if (parent != container) ! throw new AWTError("invalid parent"); ! } ! ! /** ! * Returns the maximum size of the layout gived the components ! * in the given container. ! * ! * @param parent The container that needs to be laid out. ! * ! * @return The dimension of the layout. ! */ ! public Dimension maximumLayoutSize(Container parent) ! { ! if (parent != container) ! throw new AWTError("invalid parent"); ! ! return preferredLayoutSize(parent); ! } } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/ButtonGroup.java gcc-3.4.0/libjava/javax/swing/ButtonGroup.java *** gcc-3.3.3/libjava/javax/swing/ButtonGroup.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/ButtonGroup.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,49 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package javax.swing; ! import java.io.*; ! import java.util.*; ! import javax.swing.event.*; public class ButtonGroup implements Serializable { Vector v = new Vector(); ButtonModel sel; --- 35,51 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ ! package javax.swing; + import java.io.Serializable; + import java.util.Enumeration; + import java.util.Vector; public class ButtonGroup implements Serializable { + static final long serialVersionUID = 4259076101881721375L; + Vector v = new Vector(); ButtonModel sel; diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/ButtonModel.java gcc-3.4.0/libjava/javax/swing/ButtonModel.java *** gcc-3.3.3/libjava/javax/swing/ButtonModel.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/ButtonModel.java 2004-01-09 10:18:47.000000000 +0000 *************** *** 1,5 **** /* ButtonModel.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ButtonModel.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,45 **** package javax.swing; ! import java.awt.*; ! import java.awt.event.*; ! import javax.swing.event.*; public interface ButtonModel extends ItemSelectable { --- 37,46 ---- package javax.swing; ! import java.awt.ItemSelectable; ! import java.awt.event.ActionListener; ! import java.awt.event.ItemListener; ! import javax.swing.event.ChangeListener; public interface ButtonModel extends ItemSelectable { *************** public interface ButtonModel extends Ite *** 76,87 **** void setSelected(boolean b); boolean isSelected(); - - - // there are not in the spec !! - - - void fireItemStateChanged(ItemEvent event); - void fireStateChanged(ChangeEvent event); - void fireActionPerformed(ActionEvent event); } --- 77,80 ---- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/CellEditor.java gcc-3.4.0/libjava/javax/swing/CellEditor.java *** gcc-3.3.3/libjava/javax/swing/CellEditor.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/CellEditor.java 2004-01-09 10:18:47.000000000 +0000 *************** *** 1,5 **** /* CellEditor.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* CellEditor.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,45 **** package javax.swing; ! // Imports ! import java.util.*; ! import javax.swing.event.*; /** * CellEditor --- 37,44 ---- package javax.swing; ! import java.util.EventObject; ! import javax.swing.event.CellEditorListener; /** * CellEditor *************** public interface CellEditor { *** 56,99 **** * getCellEditorValue * @returns Object */ ! public Object getCellEditorValue(); /** * isCellEditable * @param event TODO * @returns boolean */ ! public boolean isCellEditable(EventObject event); /** * shouldSelectCell * @param event TODO * @returns boolean */ ! public boolean shouldSelectCell(EventObject event); /** * stopCellEditing * @returns boolean */ ! public boolean stopCellEditing(); /** * cancelCellEditing */ ! public void cancelCellEditing(); /** * addCellEditorListener * @param value0 TODO */ ! public void addCellEditorListener(CellEditorListener listener); /** * removeCellEditorListener * @param listener TODO */ ! public void removeCellEditorListener(CellEditorListener listener); } // CellEditor --- 55,98 ---- * getCellEditorValue * @returns Object */ ! Object getCellEditorValue(); /** * isCellEditable * @param event TODO * @returns boolean */ ! boolean isCellEditable(EventObject event); /** * shouldSelectCell * @param event TODO * @returns boolean */ ! boolean shouldSelectCell(EventObject event); /** * stopCellEditing * @returns boolean */ ! boolean stopCellEditing(); /** * cancelCellEditing */ ! void cancelCellEditing(); /** * addCellEditorListener * @param value0 TODO */ ! void addCellEditorListener(CellEditorListener listener); /** * removeCellEditorListener * @param listener TODO */ ! void removeCellEditorListener(CellEditorListener listener); } // CellEditor diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/CellRendererPane.java gcc-3.4.0/libjava/javax/swing/CellRendererPane.java *** gcc-3.3.3/libjava/javax/swing/CellRendererPane.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/CellRendererPane.java 2004-01-09 10:18:47.000000000 +0000 *************** *** 1,5 **** /* CellRendererPane.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* CellRendererPane.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,46 **** package javax.swing; ! // Imports ! import java.awt.*; ! import java.io.*; ! import javax.accessibility.*; /** * CellRendererPane --- 37,51 ---- package javax.swing; ! import java.awt.Component; ! import java.awt.Container; ! import java.awt.Graphics; ! import java.awt.Rectangle; ! import java.io.IOException; ! import java.io.ObjectOutputStream; ! import javax.accessibility.Accessible; ! import javax.accessibility.AccessibleContext; ! import javax.accessibility.AccessibleRole; /** * CellRendererPane diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/colorchooser/AbstractColorChooserPanel.java gcc-3.4.0/libjava/javax/swing/colorchooser/AbstractColorChooserPanel.java *** gcc-3.3.3/libjava/javax/swing/colorchooser/AbstractColorChooserPanel.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/colorchooser/AbstractColorChooserPanel.java 2003-06-11 13:20:40.000000000 +0000 *************** this exception to your version of the li *** 35,47 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.colorchooser; ! // Imports ! import java.awt.*; ! import java.io.*; ! import javax.swing.*; ! import javax.swing.event.*; /** * AbstractColorChooserPanel --- 35,48 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.colorchooser; ! import java.awt.Color; ! import java.awt.Graphics; ! import javax.swing.Icon; ! import javax.swing.JColorChooser; ! import javax.swing.JPanel; /** * AbstractColorChooserPanel diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/colorchooser/ColorChooserComponentFactory.java gcc-3.4.0/libjava/javax/swing/colorchooser/ColorChooserComponentFactory.java *** gcc-3.3.3/libjava/javax/swing/colorchooser/ColorChooserComponentFactory.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/colorchooser/ColorChooserComponentFactory.java 2003-06-11 13:20:40.000000000 +0000 *************** this exception to your version of the li *** 35,44 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.colorchooser; ! // Imports ! import javax.swing.*; /** * ColorChooserComponentFactory --- 35,44 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.colorchooser; ! import javax.swing.JComponent; /** * ColorChooserComponentFactory diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/colorchooser/ColorSelectionModel.java gcc-3.4.0/libjava/javax/swing/colorchooser/ColorSelectionModel.java *** gcc-3.3.3/libjava/javax/swing/colorchooser/ColorSelectionModel.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/colorchooser/ColorSelectionModel.java 2003-10-12 13:20:50.000000000 +0000 *************** this exception to your version of the li *** 35,45 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.colorchooser; ! // Imports ! import java.awt.*; ! import javax.swing.event.*; /** * ColorSelectionModel --- 35,45 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.colorchooser; ! import java.awt.Color; ! import javax.swing.event.ChangeListener; /** * ColorSelectionModel *************** public interface ColorSelectionModel { *** 56,80 **** * getSelectedColor * @returns Color */ ! public abstract Color getSelectedColor(); /** * setSelectedColor * @param color TODO */ ! public abstract void setSelectedColor(Color color); /** * addChangeListener * @param listener TODO */ ! public abstract void addChangeListener(ChangeListener listener); /** * removeChangeListener * @param listener TODO */ ! public abstract void removeChangeListener(ChangeListener listener); } // ColorSelectionModel --- 56,80 ---- * getSelectedColor * @returns Color */ ! Color getSelectedColor(); /** * setSelectedColor * @param color TODO */ ! void setSelectedColor(Color color); /** * addChangeListener * @param listener TODO */ ! void addChangeListener(ChangeListener listener); /** * removeChangeListener * @param listener TODO */ ! void removeChangeListener(ChangeListener listener); } // ColorSelectionModel diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/colorchooser/DefaultColorSelectionModel.java gcc-3.4.0/libjava/javax/swing/colorchooser/DefaultColorSelectionModel.java *** gcc-3.3.3/libjava/javax/swing/colorchooser/DefaultColorSelectionModel.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/colorchooser/DefaultColorSelectionModel.java 2003-07-14 05:33:30.000000000 +0000 *************** *** 1,4 **** ! /* BoundedRangeModel.java -- Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,4 ---- ! /* DefaultColorSelectionModel.java -- Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,46 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.colorchooser; ! // Imports ! import java.awt.*; ! import java.io.*; ! import javax.swing.event.*; /** * DefaultColorSelectionModel --- 35,48 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.colorchooser; ! import java.awt.Color; ! import java.io.Serializable; ! import javax.swing.event.ChangeEvent; ! import javax.swing.event.ChangeListener; ! import javax.swing.event.EventListenerList; /** * DefaultColorSelectionModel *************** import javax.swing.event.*; *** 48,137 **** * @version 1.0 */ public class DefaultColorSelectionModel ! implements ColorSelectionModel, Serializable { ! ! //------------------------------------------------------------- ! // Variables -------------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * changeEvent ! */ ! protected transient ChangeEvent changeEvent; ! ! /** ! * listenerList ! */ ! protected EventListenerList listenerList; ! ! /** ! * selectedColor ! */ ! private Color selectedColor; ! ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! /** ! * Constructor DefaultColorSelectionModel ! */ ! public DefaultColorSelectionModel() { ! // TODO ! } // DefaultColorSelectionModel() ! /** ! * Constructor DefaultColorSelectionModel ! * @param color TODO ! */ ! public DefaultColorSelectionModel(Color color) { ! // TODO ! } // DefaultColorSelectionModel() ! //------------------------------------------------------------- ! // Methods ---------------------------------------------------- ! //------------------------------------------------------------- ! /** ! * getSelectedColor ! * @returns Color ! */ ! public Color getSelectedColor() { ! return null; // TODO ! } // getSelectedColor() ! /** ! * setSelectedColor ! * @param color TODO ! */ ! public void setSelectedColor(Color color) { ! // TODO ! } // setSelectedColor() ! /** ! * addChangeListener ! * @param listener TODO ! */ ! public void addChangeListener(ChangeListener listener) { ! // TODO ! } // addChangeListener() ! /** ! * removeChangeListener ! * @param listener TODO ! */ ! public void removeChangeListener(ChangeListener listener) { ! // TODO ! } // removeChangeListener() ! /** ! * fireStateChanged ! */ ! protected void fireStateChanged() { ! // TODO ! } // fireStateChanged() ! } // DefaultColorSelectionModel --- 50,141 ---- * @version 1.0 */ public class DefaultColorSelectionModel ! implements ColorSelectionModel, Serializable ! { ! private static final long serialVersionUID = -8117143602864778804L; ! private Color selectedColor; ! protected transient ChangeEvent changeEvent = new ChangeEvent (this); ! protected EventListenerList listenerList = new EventListenerList (); + /** + * Creates a new color selection model. + */ + public DefaultColorSelectionModel() + { + this (Color.white); + } ! /** ! * Creates a new color selection model with a given selected color. ! * ! * @param color The selected color. ! */ ! public DefaultColorSelectionModel (Color color) ! { ! super(); ! this.selectedColor = color; ! } ! /** ! * Returns the selected color. ! * ! * @return The selected color. ! */ ! public Color getSelectedColor() ! { ! return selectedColor; ! } ! /** ! * @param color The color to set. ! */ ! public void setSelectedColor (Color color) ! { ! this.selectedColor = color; ! } ! /** ! * Adds a listener to this model. ! * ! * @param listener The listener to add. ! */ ! public void addChangeListener (ChangeListener listener) ! { ! listenerList.add (ChangeListener.class, listener); ! } ! /** ! * Removes a listener from this model. ! * ! * @param listener The listener to remove. ! */ ! public void removeChangeListener (ChangeListener listener) ! { ! listenerList.remove (ChangeListener.class, listener); ! } ! /** ! * Returns all currently added ChangeListener objects. ! * ! * @return Array of ChangeListener objects. ! */ ! public ChangeListener[] getChangeListeners() ! { ! return (ChangeListener[]) listenerList.getListeners (ChangeListener.class); ! } + /** + * Calls all the stateChanged() method of all added + * ChangeListener objects with changeEvent + * as argument. + */ + protected void fireStateChanged() + { + ChangeListener[] listeners = getChangeListeners(); ! for (int i = 0; i < listeners.length; i++) ! listeners [i].stateChanged (changeEvent); ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/ComboBoxEditor.java gcc-3.4.0/libjava/javax/swing/ComboBoxEditor.java *** gcc-3.3.3/libjava/javax/swing/ComboBoxEditor.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/ComboBoxEditor.java 2004-01-09 10:18:47.000000000 +0000 *************** *** 1,5 **** /* ComboBoxEditor.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ComboBoxEditor.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,45 **** package javax.swing; ! // Imports ! import java.awt.*; ! import java.awt.event.*; /** * ComboBoxEditor --- 37,44 ---- package javax.swing; ! import java.awt.Component; ! import java.awt.event.ActionListener; /** * ComboBoxEditor *************** public interface ComboBoxEditor { *** 56,91 **** * getEditorComponent * @returns Component */ ! public Component getEditorComponent(); /** * setItem * @param item TODO */ ! public void setItem(Object item); /** * getItem * @returns Object */ ! public Object getItem(); /** * selectAll */ ! public void selectAll(); /** * addActionListener * @param listener TODO */ ! public void addActionListener(ActionListener listener); /** * removeActionListener * @param listener TODO */ ! public void removeActionListener(ActionListener listener); } // ComboBoxEditor --- 55,90 ---- * getEditorComponent * @returns Component */ ! Component getEditorComponent(); /** * setItem * @param item TODO */ ! void setItem(Object item); /** * getItem * @returns Object */ ! Object getItem(); /** * selectAll */ ! void selectAll(); /** * addActionListener * @param listener TODO */ ! void addActionListener(ActionListener listener); /** * removeActionListener * @param listener TODO */ ! void removeActionListener(ActionListener listener); } // ComboBoxEditor diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/ComboBoxModel.java gcc-3.4.0/libjava/javax/swing/ComboBoxModel.java *** gcc-3.3.3/libjava/javax/swing/ComboBoxModel.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/ComboBoxModel.java 2003-10-12 13:20:49.000000000 +0000 *************** public interface ComboBoxModel extends L *** 52,64 **** * setSelectedItem * @param item TODO */ ! public void setSelectedItem(Object item); /** * getSelectedItem * @returns Object */ ! public Object getSelectedItem(); } // ComboBoxModel --- 52,64 ---- * setSelectedItem * @param item TODO */ ! void setSelectedItem(Object item); /** * getSelectedItem * @returns Object */ ! Object getSelectedItem(); } // ComboBoxModel diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/DebugGraphics.java gcc-3.4.0/libjava/javax/swing/DebugGraphics.java *** gcc-3.3.3/libjava/javax/swing/DebugGraphics.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/DebugGraphics.java 2004-01-09 10:18:47.000000000 +0000 *************** *** 1,5 **** /* DebugGraphics.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* DebugGraphics.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,47 **** package javax.swing; ! // Imports ! import java.awt.*; ! import java.awt.image.*; ! import java.io.*; ! import java.text.*; /** * DebugGraphics --- 37,52 ---- package javax.swing; ! import java.awt.Color; ! import java.awt.Font; ! import java.awt.FontMetrics; ! import java.awt.Graphics; ! import java.awt.Image; ! import java.awt.Rectangle; ! import java.awt.Shape; ! import java.awt.image.ImageObserver; ! import java.io.PrintStream; ! import java.text.AttributedCharacterIterator; /** * DebugGraphics diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/DefaultBoundedRangeModel.java gcc-3.4.0/libjava/javax/swing/DefaultBoundedRangeModel.java *** gcc-3.3.3/libjava/javax/swing/DefaultBoundedRangeModel.java 2002-10-10 12:08:37.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/DefaultBoundedRangeModel.java 2004-01-07 14:42:03.000000000 +0000 *************** *** 1,5 **** ! /* DefaultBoundedRangeModel.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,6 ---- ! /* DefaultBoundedRangeModel.java -- Default implementation ! of BoundedRangeModel. ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,347 **** package javax.swing; ! // Imports ! import java.io.*; ! import java.util.*; ! import javax.swing.event.*; /** ! * DefaultBoundedRangeModel ! * @author Andrew Selkirk ! * @version 1.0 */ ! public class DefaultBoundedRangeModel implements BoundedRangeModel, Serializable { - //------------------------------------------------------------- - // Variables -------------------------------------------------- - //------------------------------------------------------------- ! /** ! * changeEvent ! */ ! protected transient ChangeEvent changeEvent = new ChangeEvent(this); - /** - * listenerList - */ - protected EventListenerList listenerList = new EventListenerList(); ! /** ! * value ! */ ! private int value; - /** - * extent - */ - private int extent; ! /** ! * minimum ! */ ! private int minimum; - /** - * maximum - */ - private int maximum; ! /** ! * isAdjusting ! */ ! private boolean isAdjusting; ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- - /** - * Constructor DefaultBoundedRangeModel - */ - public DefaultBoundedRangeModel() { - setRangeProperties(0, 0, 0, 100, false); - } // DefaultBoundedRangeModel() ! /** ! * Constructor DefaultBoundedRangeModel ! * @param value TODO ! * @param extent TODO ! * @param minimum TODO ! * @param maximum TODO ! */ ! public DefaultBoundedRangeModel(int value, int extent, ! int minimum, int maximum) { ! setRangeProperties(value, extent, minimum, maximum, false); ! } // DefaultBoundedRangeModel() ! //------------------------------------------------------------- ! // Methods ---------------------------------------------------- ! //------------------------------------------------------------- - /** - * toString - * @returns String - */ - public String toString() { - return null; // TODO - } // toString() ! /** ! * getValue ! * @returns int ! */ ! public int getValue() { ! return value; ! } // getValue() - /** - * setValue - * @param value TODO - */ - public void setValue(int value) { - - // Validate Constraints - if (minimum > value || value > (value + extent) || - (value + extent) > maximum) { - throw new IllegalArgumentException("Invalid value property set"); - } // if - - // Set Value - this.value = value; ! // Notification ! fireStateChanged(); ! } // setValue() ! /** ! * getExtent ! * @returns int ! */ ! public int getExtent() { ! return extent; ! } // getExtent() - /** - * setExtent - * @param extent TODO - */ - public void setExtent(int extent) { ! // Validate Constraints ! if (minimum > value || value > (value + extent) || ! (value + extent) > maximum) { ! throw new IllegalArgumentException("Invalid extent property set"); ! } // if ! ! // Set Extent ! this.extent = extent; ! ! // Notification ! fireStateChanged(); - } // setExtent() ! /** ! * getMinimum ! * @returns int ! */ ! public int getMinimum() { ! return minimum; ! } // getMinimum() - /** - * setMinimum - * @param minimum TODO - */ - public void setMinimum(int minimum) { - - // Validate Constraints - if (minimum > value || value > (value + extent) || - (value + extent) > maximum) { - throw new IllegalArgumentException("Invalid minimum property set"); - } // if - - // Set Minimum - this.minimum = minimum; - - // Notification - fireStateChanged(); ! } // setMinimum() ! /** ! * getMaximum ! * @returns int ! */ ! public int getMaximum() { ! return maximum; ! } // getMaximum() - /** - * setMaximum - * @param maximum TODO - */ - public void setMaximum(int maximum) { - - // Validate Constraints - if (minimum > value || value > (value + extent) || - (value + extent) > maximum) { - throw new IllegalArgumentException("Invalid maximum property set"); - } // if ! // Set Maximum ! this.maximum = maximum; - // Notification - fireStateChanged(); ! } // setMaximum() ! /** ! * getValueIsAdjusting ! * @returns boolean ! */ ! public boolean getValueIsAdjusting() { ! return isAdjusting; ! } // getValueIsAdjusting() - /** - * setValueIsAdjusting - * @param isAdjusting TODO - */ - public void setValueIsAdjusting(boolean isAdjusting) { - - // Set isAdjusting - this.isAdjusting = isAdjusting; ! // Notification ! fireStateChanged(); - } // setValueIsAdjusting() ! /** ! * setRangeProperties ! * @param value TODO ! * @param extent TODO ! * @param minimum TODO ! * @param maximum TODO ! * @param isAdjusting TODO ! */ ! public void setRangeProperties(int value, int extent, int minimum, ! int maximum, boolean isAdjusting) { ! ! // Validate Constraints ! if (minimum > value || value > (value + extent) || ! (value + extent) > maximum) { ! throw new IllegalArgumentException("Invalid property set"); ! } // if ! // Set Data ! this.value = value; ! this.extent = extent; ! this.minimum = minimum; ! this.maximum = maximum; ! this.isAdjusting = isAdjusting; ! ! // Notification ! fireStateChanged(); ! } // setRangeProperties() - /** - * addChangeListener - * @param listener TODO - */ - public void addChangeListener(ChangeListener listener) { - listenerList.add(ChangeListener.class, listener); - } // addChangeListener() ! /** ! * removeChangeListener ! * @param listener TODO ! */ ! public void removeChangeListener(ChangeListener listener) { ! listenerList.remove(ChangeListener.class, listener); ! } // removeChangeListener() - /** - * fireStateChanged - */ - protected void fireStateChanged() { ! // Variables ! ChangeListener listener; ! EventListener[] listeners; ! int index; ! // Get Listeners ! listeners = listenerList.getListeners(ChangeListener.class); ! // Process Listeners ! for (index = 0; index < listeners.length; index++) { ! listener = (ChangeListener) listeners[index]; ! listener.stateChanged(changeEvent); ! } // for - } // fireStateChanged() ! /** ! * getListeners ! * @param c TODO ! * @returns EventListener[] ! */ ! public EventListener[] getListeners(Class c) { ! return listenerList.getListeners(c); ! } // getListeners() - /** - * getChangeListeners - */ - public ChangeListener[] getChangeListeners() - { - // FIXME: implement this - return null; - } ! } // DefaultBoundedRangeModel --- 38,468 ---- package javax.swing; ! import java.io.Serializable; ! import java.util.EventListener; ! import javax.swing.event.ChangeEvent; ! import javax.swing.event.ChangeListener; ! import javax.swing.event.EventListenerList; ! /** ! * A default implementation of BoundedRangeModel. ! * ! * @author Andrew Selkirk ! * @author Sascha Brawer */ ! public class DefaultBoundedRangeModel ! implements BoundedRangeModel, Serializable ! { ! /** ! * The identifier of this class in object serialization. Verified ! * using the serialver tool of Sun J2SE 1.4.1_01. ! */ ! static final long serialVersionUID = 5034068491295259790L; ! /** ! * An event that is sent to all registered {@link ChangeListener}s ! * when the state of this range model has changed. ! * ! *

                The event object is created on demand, the first time it ! * is actually needed. ! * ! * @see #fireStateChanged() ! */ ! protected transient ChangeEvent changeEvent; ! /** ! * The list of the currently registered EventListeners. ! */ ! protected EventListenerList listenerList = new EventListenerList(); ! /** ! * The current value of the range model, which is always between ! * {@link #minimum} and ({@link #maximum} - {@link #extent}). In a ! * scroll bar visualization of a {@link BoundedRangeModel}, the ! * value is displayed as the position of the thumb. ! */ ! private int value; ! /** ! * The current extent of the range model, which is a number greater ! * than or equal to zero. In a scroll bar visualization of a {@link ! * BoundedRangeModel}, the extent is displayed as the ! * size of the thumb. ! */ ! private int extent; ! /** ! * The current minimum value of the range model, which is always ! * less than or equal to {@link #maximum}. ! */ ! private int minimum; ! /** ! * The current maximum value of the range model, which is always ! * greater than or equal to {@link #minimum}. ! */ ! private int maximum; ! /** ! * A property that indicates whether the value of this {@link ! * BoundedRangeModel} is going to change in the immediate future. ! */ ! private boolean isAdjusting; ! /** ! * Constructs a DefaultBoundedRangeModel with default ! * values for the properties. The properties value, ! * extent and minimum will be initialized ! * to zero; maximum will be set to 100; the property ! * valueIsAdjusting will be false. ! */ ! public DefaultBoundedRangeModel() ! { ! // The fields value, extent, minimum have the default value 0, and ! // isAdjusting is already false. These fields no not need to be ! // set explicitly. ! maximum = 100; ! } ! /** ! * Constructs a DefaultBoundedRangeModel with the ! * specified values for some properties. ! * ! * @param value the initial value of the range model, which must be ! * a number between minimum and (maximum - ! * extent). In a scroll bar visualization of a {@link ! * BoundedRangeModel}, the value is displayed as the ! * position of the thumb. ! * ! * @param extent the initial extent of the range model, which is a ! * number greater than or equal to zero. In a scroll bar ! * visualization of a {@link BoundedRangeModel}, the ! * extent is displayed as the size of the thumb. ! * ! * @param minimum the initial minimal value of the range model. ! * ! * @param maximum the initial maximal value of the range model. ! * ! * @throws IllegalArgumentException if the following condition is ! * not satisfied: minimum <= value <= value + extent <= ! * maximum. ! */ ! public DefaultBoundedRangeModel(int value, int extent, int minimum, ! int maximum) ! { ! if (!(minimum <= value && extent >= 0 && (value + extent) <= maximum)) ! throw new IllegalArgumentException(); ! this.value = value; ! this.extent = extent; ! this.minimum = minimum; ! this.maximum = maximum; ! // The isAdjusting field already has a false value by default. ! } ! /** ! * Returns a string with all relevant properties of this range ! * model. ! */ ! public String toString() ! { ! return getClass().getName() ! + "[value=" + value ! + ", extent=" + extent ! + ", min=" + minimum ! + ", max=" + maximum ! + ", adj=" + isAdjusting ! + ']'; ! } ! /** ! * Returns the current value of this bounded range model. In a ! * scroll bar visualization of a {@link BoundedRangeModel}, the ! * value is displayed as the position of the thumb. ! */ ! public int getValue() ! { ! return value; ! } ! /** ! * Changes the current value of this bounded range model. In a ! * scroll bar visualization of a {@link BoundedRangeModel}, the ! * value is displayed as the position of the thumb; ! * changing the value of a scroll bar’s model ! * thus moves the thumb to a different position. ! */ ! public void setValue(int value) ! { ! value = Math.max(minimum, value); ! if (value + extent > maximum) ! value = maximum - extent; ! if (value != this.value) ! { ! this.value = value; ! fireStateChanged(); ! } ! } ! /** ! * Returns the current extent of this bounded range model, which is ! * a number greater than or equal to zero. In a scroll bar ! * visualization of a {@link BoundedRangeModel}, the ! * extent is displayed as the size of the thumb. ! */ ! public int getExtent() ! { ! return extent; ! } ! /** ! * Changes the current extent of this bounded range model. In a ! * scroll bar visualization of a {@link BoundedRangeModel}, the ! * extent is displayed as the size of the thumb. ! * ! * @param extent the new extent of the range model, which is a ! * number greater than or equal to zero. ! */ ! public void setExtent(int extent) ! { ! extent = Math.max(extent, 0); ! if (value + extent > maximum) ! extent = maximum - value; ! if (extent != this.extent) ! { ! this.extent = extent; ! fireStateChanged(); ! } ! } ! /** ! * Returns the current minimal value of this bounded range model. ! */ ! public int getMinimum() ! { ! return minimum; ! } ! /** ! * Changes the current minimal value of this bounded range model. ! * ! * @param minimum the new minimal value. ! */ ! public void setMinimum(int minimum) ! { ! int value, maximum; ! maximum = Math.max(minimum, this.maximum); ! value = Math.max(minimum, this.value); ! setRangeProperties(value, extent, minimum, maximum, isAdjusting); ! } ! /** ! * Returns the current maximal value of this bounded range model. ! */ ! public int getMaximum() ! { ! return maximum; ! } ! /** ! * Changes the current maximal value of this bounded range model. ! * ! * @param maximum the new maximal value. ! */ ! public void setMaximum(int maximum) ! { ! int value, extent, minimum; ! minimum = Math.min(this.minimum, maximum); ! extent = Math.min(this.extent, maximum - minimum); ! value = Math.min(this.value, maximum - extent); ! setRangeProperties(value, extent, minimum, maximum, isAdjusting); ! } ! /** ! * Returns whether or not the value of this bounded range model is ! * going to change in the immediate future. Scroll bars set this ! * property to true while the thumb is being dragged ! * around; when the mouse is relased, they set the property to ! * false and post a final {@link ChangeEvent}. ! * ! * @returns true if the value will change soon again; ! * false if the value will probably not change soon. ! */ ! public boolean getValueIsAdjusting() ! { ! return isAdjusting; ! } + /** + * Specifies whether or not the value of this bounded range model is + * going to change in the immediate future. Scroll bars set this + * property to true while the thumb is being dragged + * around; when the mouse is relased, they set the property to + * false. + * + * @param isAdjusting true if the value will change + * soon again; false if the value will probably not + * change soon. + */ + public void setValueIsAdjusting(boolean isAdjusting) + { + if (isAdjusting == this.isAdjusting) + return; + + this.isAdjusting = isAdjusting; + fireStateChanged(); + } ! ! /** ! * setRangeProperties ! * ! * @param value the new value of the range model. In a scroll bar ! * visualization of a {@link BoundedRangeModel}, the ! * value is displayed as the position of the thumb. ! * ! * @param extent the new extent of the range model, which is a ! * number greater than or equal to zero. In a scroll bar ! * visualization of a {@link BoundedRangeModel}, the ! * extent is displayed as the size of the thumb. ! * ! * @param minimum the new minimal value of the range model. ! * ! * @param maximum the new maximal value of the range model. ! ! * @param isAdjusting whether or not the value of this bounded range ! * model is going to change in the immediate future. Scroll bars set ! * this property to true while the thumb is being ! * dragged around; when the mouse is relased, they set the property ! * to false. ! */ ! public void setRangeProperties(int value, int extent, int minimum, ! int maximum, boolean isAdjusting) ! { ! minimum = Math.min(Math.min(minimum, maximum), value); ! maximum = Math.max(value, maximum); ! if (extent + value > maximum) ! extent = maximum - value; ! extent = Math.max(0, extent); ! ! if ((value == this.value) ! && (extent == this.extent) ! && (minimum == this.minimum) ! && (maximum == this.maximum) ! && (isAdjusting == this.isAdjusting)) ! return; ! ! this.value = value; ! this.extent = extent; ! this.minimum = minimum; ! this.maximum = maximum; ! this.isAdjusting = isAdjusting; ! ! fireStateChanged(); ! } ! ! ! /** ! * Subscribes a ChangeListener to state changes. ! * ! * @param listener the listener to be subscribed. ! */ ! public void addChangeListener(ChangeListener listener) ! { ! listenerList.add(ChangeListener.class, listener); ! } ! ! ! /** ! * Cancels the subscription of a ChangeListener. ! * ! * @param listener the listener to be unsubscribed. ! */ ! public void removeChangeListener(ChangeListener listener) ! { ! listenerList.remove(ChangeListener.class, listener); ! } ! ! ! /** ! * Sends a {@link ChangeEvent} to any registered {@link ! * ChangeListener}s. ! * ! * @see #addChangeListener(ChangeListener) ! * @see #removeChangeListener(ChangeListener) ! */ ! protected void fireStateChanged() ! { ! Object[] listeners; ! ! listeners = listenerList.getListenerList(); ! for (int i = listeners.length - 2; i >= 0; i -= 2) ! if (listeners[i] == ChangeListener.class) ! { ! if (changeEvent == null) ! changeEvent = new ChangeEvent(this); ! ((ChangeListener) listeners[i + 1]).stateChanged(changeEvent); ! } ! } ! ! ! /** ! * Retrieves the current listeners of the specified class. ! * ! * @param c the class of listeners; usually {@link ! * ChangeListener}.class. ! * ! * @return an array with the currently subscribed listeners, or ! * an empty array if there are currently no listeners. ! * ! * @since 1.3 ! */ ! public EventListener[] getListeners(Class listenerType) ! { ! return listenerList.getListeners(listenerType); ! } ! ! ! /** ! * Returns all ChangeListeners that are currently ! * subscribed for changes to this ! * DefaultBoundedRangeModel. ! * ! * @return an array with the currently subscribed listeners, or ! * an empty array if there are currently no listeners. ! * ! * @since 1.4 ! */ ! public ChangeListener[] getChangeListeners() ! { ! return (ChangeListener[]) getListeners(ChangeListener.class); ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/DefaultButtonModel.java gcc-3.4.0/libjava/javax/swing/DefaultButtonModel.java *** gcc-3.3.3/libjava/javax/swing/DefaultButtonModel.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/DefaultButtonModel.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,50 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing; ! import java.util.*; ! import java.awt.event.*; ! import java.awt.*; ! import javax.swing.event.*; ! public ! class DefaultButtonModel implements ButtonModel, java.io.Serializable { Vector actions = new Vector(); Vector items = new Vector(); --- 35,59 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; ! import java.awt.event.ActionEvent; ! import java.awt.event.ActionListener; ! import java.awt.event.ItemEvent; ! import java.awt.event.ItemListener; ! import java.io.Serializable; ! import java.util.EventListener; ! import java.util.Vector; ! import javax.swing.event.ChangeEvent; ! import javax.swing.event.ChangeListener; ! import javax.swing.event.EventListenerList; ! public class DefaultButtonModel ! implements ButtonModel, Serializable { + static final long serialVersionUID = -5342609566534980231L; + Vector actions = new Vector(); Vector items = new Vector(); diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/DefaultCellEditor.java gcc-3.4.0/libjava/javax/swing/DefaultCellEditor.java *** gcc-3.3.3/libjava/javax/swing/DefaultCellEditor.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/DefaultCellEditor.java 2004-01-09 10:18:47.000000000 +0000 *************** *** 1,5 **** /* DefaultCellEditor.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* DefaultCellEditor.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,56 **** package javax.swing; ! // Imports ! import java.awt.*; ! import java.awt.event.*; ! import java.io.*; ! import java.util.*; ! import javax.swing.table.*; ! import javax.swing.tree.*; /** * DefaultCellEditor * @author Andrew Selkirk * @version 1.0 */ ! public class DefaultCellEditor extends AbstractCellEditor implements TableCellEditor, TreeCellEditor { //------------------------------------------------------------- // Classes ---------------------------------------------------- --- 37,62 ---- package javax.swing; ! import java.awt.Component; ! import java.awt.event.ActionEvent; ! import java.awt.event.ActionListener; ! import java.awt.event.ItemEvent; ! import java.awt.event.ItemListener; ! import java.io.Serializable; ! import java.util.EventObject; ! import javax.swing.table.TableCellEditor; ! import javax.swing.tree.TreeCellEditor; /** * DefaultCellEditor * @author Andrew Selkirk * @version 1.0 */ ! public class DefaultCellEditor ! extends AbstractCellEditor ! implements TableCellEditor, TreeCellEditor ! { ! static final long serialVersionUID = 3564035141373880027L; //------------------------------------------------------------- // Classes ---------------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/DefaultCellRenderer.java gcc-3.4.0/libjava/javax/swing/DefaultCellRenderer.java *** gcc-3.3.3/libjava/javax/swing/DefaultCellRenderer.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/DefaultCellRenderer.java 2004-01-09 10:18:47.000000000 +0000 *************** *** 1,5 **** /* DefaultCellRenderer.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* DefaultCellRenderer.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,48 **** package javax.swing; - import java.awt.*; - - // this is what SUN basically told us to do so: // no icon though as that's not implemented yet.... public class DefaultCellRenderer extends JLabel implements ListCellRenderer { public Component getListCellRendererComponent(JList list, --- 37,47 ---- package javax.swing; // this is what SUN basically told us to do so: // no icon though as that's not implemented yet.... + import java.awt.Component; + public class DefaultCellRenderer extends JLabel implements ListCellRenderer { public Component getListCellRendererComponent(JList list, diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/DefaultComboBoxModel.java gcc-3.4.0/libjava/javax/swing/DefaultComboBoxModel.java *** gcc-3.3.3/libjava/javax/swing/DefaultComboBoxModel.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/DefaultComboBoxModel.java 2004-01-09 10:18:47.000000000 +0000 *************** *** 1,5 **** /* DefaultComboBoxModel.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* DefaultComboBoxModel.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,45 **** package javax.swing; ! // Imports ! import java.io.*; ! import java.util.*; /** * DefaultComboBoxModel --- 37,44 ---- package javax.swing; ! import java.io.Serializable; ! import java.util.Vector; /** * DefaultComboBoxModel *************** import java.util.*; *** 47,53 **** * @version 1.0 */ public class DefaultComboBoxModel extends AbstractListModel ! implements MutableComboBoxModel, Serializable { //------------------------------------------------------------- // Variables -------------------------------------------------- --- 46,54 ---- * @version 1.0 */ public class DefaultComboBoxModel extends AbstractListModel ! implements MutableComboBoxModel, Serializable ! { ! static final long serialVersionUID = 6698657703676921904L; //------------------------------------------------------------- // Variables -------------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/DefaultDesktopManager.java gcc-3.4.0/libjava/javax/swing/DefaultDesktopManager.java *** gcc-3.3.3/libjava/javax/swing/DefaultDesktopManager.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/DefaultDesktopManager.java 2004-01-09 10:18:47.000000000 +0000 *************** *** 1,5 **** /* DefaultDesktopManager.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* DefaultDesktopManager.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,52 **** package javax.swing; ! // Imports ! import java.awt.*; ! import java.io.*; /** * DefaultDesktopManager * @author Andrew Selkirk * @version 1.0 */ ! public class DefaultDesktopManager implements DesktopManager, Serializable { //------------------------------------------------------------- // Variables -------------------------------------------------- --- 37,53 ---- package javax.swing; ! import java.awt.Rectangle; ! import java.io.Serializable; /** * DefaultDesktopManager * @author Andrew Selkirk * @version 1.0 */ ! public class DefaultDesktopManager implements DesktopManager, Serializable ! { ! static final long serialVersionUID = 4657624909838017887L; //------------------------------------------------------------- // Variables -------------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/DefaultFocusManager.java gcc-3.4.0/libjava/javax/swing/DefaultFocusManager.java *** gcc-3.3.3/libjava/javax/swing/DefaultFocusManager.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/DefaultFocusManager.java 2004-01-09 10:18:47.000000000 +0000 *************** *** 1,5 **** /* DefaultFocusManager.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* DefaultFocusManager.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,46 **** package javax.swing; ! // Imports ! import java.awt.*; ! import java.awt.event.*; ! import java.util.*; /** * DefaultFocusManager --- 37,46 ---- package javax.swing; ! import java.awt.Component; ! import java.awt.Container; ! import java.awt.event.KeyEvent; ! import java.util.Stack; /** * DefaultFocusManager diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/DefaultListCellRenderer.java gcc-3.4.0/libjava/javax/swing/DefaultListCellRenderer.java *** gcc-3.3.3/libjava/javax/swing/DefaultListCellRenderer.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/DefaultListCellRenderer.java 2004-01-09 10:18:47.000000000 +0000 *************** *** 1,5 **** /* DefaultListCellRenderer.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* DefaultListCellRenderer.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,47 **** package javax.swing; ! // Imports ! import java.awt.*; ! import java.io.*; ! import javax.swing.border.*; ! import javax.swing.plaf.*; /** * DefaultListCellRenderer --- 37,46 ---- package javax.swing; ! import java.awt.Component; ! import java.awt.Rectangle; ! import java.io.Serializable; ! import javax.swing.border.Border; /** * DefaultListCellRenderer *************** import javax.swing.plaf.*; *** 49,55 **** * @version 1.0 */ public class DefaultListCellRenderer extends JLabel ! implements ListCellRenderer, Serializable { //------------------------------------------------------------- // Classes ---------------------------------------------------- --- 48,56 ---- * @version 1.0 */ public class DefaultListCellRenderer extends JLabel ! implements ListCellRenderer, Serializable ! { ! static final long serialVersionUID = 7708947179685189462L; //------------------------------------------------------------- // Classes ---------------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/DefaultListModel.java gcc-3.4.0/libjava/javax/swing/DefaultListModel.java *** gcc-3.3.3/libjava/javax/swing/DefaultListModel.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/DefaultListModel.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,51 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing; ! // Imports ! import java.util.*; /** * DefaultListModel * @author Andrew Selkirk * @version 1.0 */ ! public class DefaultListModel extends AbstractListModel { //------------------------------------------------------------- // Variables -------------------------------------------------- --- 35,55 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; ! import java.util.ArrayList; ! import java.util.Enumeration; ! import java.util.NoSuchElementException; ! import java.util.Vector; /** * DefaultListModel * @author Andrew Selkirk * @version 1.0 */ ! public class DefaultListModel extends AbstractListModel ! { //------------------------------------------------------------- // Variables -------------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/DefaultListSelectionModel.java gcc-3.4.0/libjava/javax/swing/DefaultListSelectionModel.java *** gcc-3.3.3/libjava/javax/swing/DefaultListSelectionModel.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/DefaultListSelectionModel.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,46 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing; ! import javax.swing.event.*; ! import java.util.*; ! public class DefaultListSelectionModel implements ListSelectionModel { int mode = SINGLE_SELECTION; --- 35,50 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; ! import java.io.Serializable; ! import java.util.EventListener; ! import java.util.Vector; ! import javax.swing.event.EventListenerList; ! import javax.swing.event.ListSelectionListener; ! public class DefaultListSelectionModel implements Cloneable, ListSelectionModel, Serializable { int mode = SINGLE_SELECTION; diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/DefaultSingleSelectionModel.java gcc-3.4.0/libjava/javax/swing/DefaultSingleSelectionModel.java *** gcc-3.3.3/libjava/javax/swing/DefaultSingleSelectionModel.java 2002-10-10 12:08:37.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/DefaultSingleSelectionModel.java 2003-04-29 09:26:29.000000000 +0000 *************** exception statement from your version. * *** 37,188 **** package javax.swing; ! // Imports ! import java.io.*; ! import java.util.*; ! import javax.swing.event.*; /** * DefaultSingleSelectionModel * @author Andrew Selkirk * @version 1.0 */ ! public class DefaultSingleSelectionModel implements ! SingleSelectionModel, Serializable { ! ! //------------------------------------------------------------- ! // Variables -------------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * changeEvent ! */ ! protected transient ChangeEvent changeEvent = new ChangeEvent(this); ! ! /** ! * listenerList ! */ ! protected EventListenerList listenerList= new EventListenerList(); ! ! /** ! * index ! */ ! private int index = -1; ! ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Constructor DefaultSingleSelectionModel ! */ ! public DefaultSingleSelectionModel() { ! // TODO ! } // DefaultSingleSelectionModel() ! ! ! //------------------------------------------------------------- ! // Methods ---------------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * getSelectedIndex ! * @returns int ! */ ! public int getSelectedIndex() { ! return index; ! } // getSelectedIndex() ! ! /** ! * setSelectedIndex ! * @param index TODO ! */ ! public void setSelectedIndex(int index) { ! ! // Set Data ! this.index = index; ! ! // Notify Listeners ! fireStateChanged(); ! } // setSelectedIndex() ! /** ! * clearSelection ! */ ! public void clearSelection() { ! // Set Data ! index = -1; ! // Notify Listeners ! fireStateChanged(); ! } // clearSelection() ! /** ! * isSelected ! * @returns boolean ! */ ! public boolean isSelected() { ! return (index == -1); ! } // isSelected() ! /** ! * addChangeListener ! * @param listener TODO ! */ ! public void addChangeListener(ChangeListener listener) { ! listenerList.add(ChangeListener.class, listener); ! } // addChangeListener() ! /** ! * removeChangeListener ! * @param listener TODO ! */ ! public void removeChangeListener(ChangeListener listener) { ! listenerList.remove(ChangeListener.class, listener); ! } // removeChangeListener() ! /** ! * fireStateChanged ! */ ! protected void fireStateChanged() { ! // Variables ! ChangeListener listener; ! EventListener[] listeners; ! int index; ! // Get Listeners ! listeners = listenerList.getListeners(ChangeListener.class); ! // Process Listeners ! for (index = 0; index < listeners.length; index++) { ! listener = (ChangeListener) listeners[index]; ! listener.stateChanged(changeEvent); ! } // for ! } // fireStateChanged() ! /** ! * getListeners ! * @param listenerClass TODO ! * @returns EventListener[] ! */ ! public EventListener[] getListeners(Class listenerClass) { ! return listenerList.getListeners(listenerClass); ! } // getListeners() ! /** ! * getChangeListeners ! */ ! public ChangeListener[] getChangeListeners() ! { ! // FIXME: implement this ! return null; ! } ! } // DefaultSingleSelectionModel --- 37,177 ---- package javax.swing; ! import java.io.Serializable; ! import java.util.EventListener; ! import javax.swing.event.ChangeEvent; ! import javax.swing.event.ChangeListener; ! import javax.swing.event.EventListenerList; /** * DefaultSingleSelectionModel * @author Andrew Selkirk * @version 1.0 */ ! public class DefaultSingleSelectionModel ! implements SingleSelectionModel, Serializable ! { ! static final long serialVersionUID = 3676229404753786004L; ! /** ! * changeEvent ! */ ! protected transient ChangeEvent changeEvent = new ChangeEvent (this); ! /** ! * listenerList ! */ ! protected EventListenerList listenerList= new EventListenerList (); ! /** ! * index ! */ ! private int index = -1; ! /** ! * Constructor DefaultSingleSelectionModel ! */ ! public DefaultSingleSelectionModel () ! { ! } ! /** ! * getSelectedIndex ! * @returns int ! */ ! public int getSelectedIndex () ! { ! return index; ! } ! /** ! * setSelectedIndex ! * @param index TODO ! */ ! public void setSelectedIndex (int index) ! { ! // Set Data ! this.index = index; ! // Notify Listeners ! fireStateChanged (); ! } ! /** ! * clearSelection ! */ ! public void clearSelection () ! { ! // Set Data ! index = -1; ! // Notify Listeners ! fireStateChanged (); ! } ! /** ! * isSelected ! * @returns boolean ! */ ! public boolean isSelected () ! { ! return (index == -1); ! } ! /** ! * addChangeListener ! * @param listener TODO ! */ ! public void addChangeListener (ChangeListener listener) ! { ! listenerList.add (ChangeListener.class, listener); ! } ! /** ! * removeChangeListener ! * @param listener TODO ! */ ! public void removeChangeListener (ChangeListener listener) ! { ! listenerList.remove (ChangeListener.class, listener); ! } ! /** ! * fireStateChanged ! */ ! protected void fireStateChanged () ! { ! // Variables ! ChangeListener listener; ! ChangeListener[] listeners; ! int index; ! // Get Listeners ! listeners = getChangeListeners (); ! // Process Listeners ! for (index = 0; index < listeners.length; index++) ! { ! listener = listeners [index]; ! listener.stateChanged (changeEvent); ! } ! } + /** + * getListeners + * @param listenerClass TODO + * @returns EventListener[] + */ + public EventListener[] getListeners (Class listenerClass) + { + return listenerList.getListeners (listenerClass); + } ! /** ! * getChangeListeners ! */ ! public ChangeListener[] getChangeListeners () ! { ! return (ChangeListener[]) getListeners (ChangeListener.class); ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/DesktopManager.java gcc-3.4.0/libjava/javax/swing/DesktopManager.java *** gcc-3.3.3/libjava/javax/swing/DesktopManager.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/DesktopManager.java 2003-10-12 13:20:49.000000000 +0000 *************** public interface DesktopManager { *** 52,106 **** * openFrame * @param frame TODO */ ! public void openFrame(JInternalFrame frame); /** * closeFrame * @param frame TODO */ ! public void closeFrame(JInternalFrame frame); /** * maximizeFrame * @param frame TODO */ ! public void maximizeFrame(JInternalFrame frame); /** * minimizeFrame * @param frame TODO */ ! public void minimizeFrame(JInternalFrame frame); /** * iconifyFrame * @param frame TODO */ ! public void iconifyFrame(JInternalFrame frame); /** * deiconifyFrame * @param frame TODO */ ! public void deiconifyFrame(JInternalFrame frame); /** * activateFrame * @param frame TODO */ ! public void activateFrame(JInternalFrame vframe); /** * deactivateFrame * @param frame TODO */ ! public void deactivateFrame(JInternalFrame frame); /** * beginDraggingFrame * @param frame TODO */ ! public void beginDraggingFrame(JComponent frame); /** * dragFrame --- 52,106 ---- * openFrame * @param frame TODO */ ! void openFrame(JInternalFrame frame); /** * closeFrame * @param frame TODO */ ! void closeFrame(JInternalFrame frame); /** * maximizeFrame * @param frame TODO */ ! void maximizeFrame(JInternalFrame frame); /** * minimizeFrame * @param frame TODO */ ! void minimizeFrame(JInternalFrame frame); /** * iconifyFrame * @param frame TODO */ ! void iconifyFrame(JInternalFrame frame); /** * deiconifyFrame * @param frame TODO */ ! void deiconifyFrame(JInternalFrame frame); /** * activateFrame * @param frame TODO */ ! void activateFrame(JInternalFrame vframe); /** * deactivateFrame * @param frame TODO */ ! void deactivateFrame(JInternalFrame frame); /** * beginDraggingFrame * @param frame TODO */ ! void beginDraggingFrame(JComponent frame); /** * dragFrame *************** public interface DesktopManager { *** 108,127 **** * @param x TODO * @param y TODO */ ! public void dragFrame(JComponent frame, int x, int y); /** * endDraggingFrame * @param frame TODO */ ! public void endDraggingFrame(JComponent frame); /** * beginResizingFrame * @param frame TODO * @param direction TODO */ ! public void beginResizingFrame(JComponent frame, int direction); /** * resizeFrame --- 108,127 ---- * @param x TODO * @param y TODO */ ! void dragFrame(JComponent frame, int x, int y); /** * endDraggingFrame * @param frame TODO */ ! void endDraggingFrame(JComponent frame); /** * beginResizingFrame * @param frame TODO * @param direction TODO */ ! void beginResizingFrame(JComponent frame, int direction); /** * resizeFrame *************** public interface DesktopManager { *** 131,144 **** * @param width TODO * @param height TODO */ ! public void resizeFrame(JComponent frame, int x, int y, int width, int height); /** * endResizingFrame * @param frame TODO */ ! public void endResizingFrame(JComponent frame); /** * setBoundsForFrame --- 131,144 ---- * @param width TODO * @param height TODO */ ! void resizeFrame(JComponent frame, int x, int y, int width, int height); /** * endResizingFrame * @param frame TODO */ ! void endResizingFrame(JComponent frame); /** * setBoundsForFrame *************** public interface DesktopManager { *** 148,154 **** * @param width TODO * @param height TODO */ ! public void setBoundsForFrame(JComponent frame, int x, int y, int width, int height); --- 148,154 ---- * @param width TODO * @param height TODO */ ! void setBoundsForFrame(JComponent frame, int x, int y, int width, int height); diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/AncestorEvent.java gcc-3.4.0/libjava/javax/swing/event/AncestorEvent.java *** gcc-3.3.3/libjava/javax/swing/event/AncestorEvent.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/AncestorEvent.java 2003-07-14 05:33:30.000000000 +0000 *************** this exception to your version of the li *** 35,140 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.event; ! // Imports ! import javax.swing.*; ! import java.awt.*; /** - * Ancestor Event * @author Andrew Selkirk * @author Ronald Veldema */ ! public class AncestorEvent extends AWTEvent { ! ! //------------------------------------------------------------- ! // Constants -------------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * ANCESTOR_ADDED constant ! */ ! public static int ANCESTOR_ADDED = 0; ! ! /** ! * ANCESTOR_MOVED constant ! */ ! public static int ANCESTOR_MOVED = 1; ! ! /** ! * ANCESTOR_REMOVED constant ! */ ! public static int ANCESTOR_REMOVED = 2; ! ! ! //------------------------------------------------------------- ! // Variables -------------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Source component ! */ ! private JComponent sourceComponent = null; ! ! /** ! * Ancestor ! */ ! private Container ancestor = null; ! ! /** ! * Ancestor Parent ! */ ! private Container ancestorParent = null; ! ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Constructor AncestorEvent ! * @param source Source component ! * @param id ID ! * @param ancestor ancestor ! * @param ancestorParent parent ancestor ! */ ! public AncestorEvent(JComponent source, int id, Container ancestor, ! Container ancestorParent) { ! super(source, id); ! this.sourceComponent = source; ! this.ancestor = ancestor; ! this.ancestorParent = ancestorParent; ! } // AncestorEvent() ! ! ! //------------------------------------------------------------- ! // Methods ---------------------------------------------------- ! //------------------------------------------------------------- ! /** ! * Get ancestor ! * @return ancestor ! */ ! public Container getAncestor() { ! return ancestor; ! } // getAncestor() ! /** ! * Get ancestor parent ! * @return ancestor parent ! */ ! public Container getAncestorParent() { ! return ancestorParent; ! } // getAncestorParent() ! /** ! * Get component ! * @return component ! */ ! public JComponent getComponent() { ! return sourceComponent; ! } // getComponent() ! } // AncestorEvent --- 35,99 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.event; ! import java.awt.AWTEvent; ! import java.awt.Container; ! import javax.swing.JComponent; /** * @author Andrew Selkirk * @author Ronald Veldema */ ! public class AncestorEvent extends AWTEvent ! { ! private static final long serialVersionUID = -8079801679695605002L; ! ! public static final int ANCESTOR_ADDED = 1; ! public static final int ANCESTOR_REMOVED = 2; ! public static final int ANCESTOR_MOVED = 3; ! private JComponent sourceComponent; ! private Container ancestor; ! private Container ancestorParent; ! /** ! * @param source Source component ! * @param id ID ! * @param ancestor ancestor ! * @param ancestorParent parent ancestor ! */ ! public AncestorEvent(JComponent source, int id, Container ancestor, ! Container ancestorParent) ! { ! super(source, id); ! this.sourceComponent = source; ! this.ancestor = ancestor; ! this.ancestorParent = ancestorParent; ! } ! /** ! * Returns the ancestor of this event. ! */ ! public Container getAncestor() ! { ! return ancestor; ! } + /** + * Returns the ancester parent of this event. + */ + public Container getAncestorParent() + { + return ancestorParent; + } ! /** ! * Returns the source of this event. ! */ ! public JComponent getComponent() ! { ! return sourceComponent; ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/AncestorListener.java gcc-3.4.0/libjava/javax/swing/event/AncestorListener.java *** gcc-3.3.3/libjava/javax/swing/event/AncestorListener.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/AncestorListener.java 2003-10-12 13:25:59.000000000 +0000 *************** public interface AncestorListener extend *** 51,69 **** * Ancestor Added * @param event Ancestor Event */ ! public void ancestorAdded(AncestorEvent event); /** * Ancestor Removed * @param event Ancestor Event */ ! public void ancestorRemoved(AncestorEvent event); /** * Ancestor Moved * @param event Ancestor Event */ ! public void ancestorMoved(AncestorEvent event); } // AncestorListener --- 51,69 ---- * Ancestor Added * @param event Ancestor Event */ ! void ancestorAdded(AncestorEvent event); /** * Ancestor Removed * @param event Ancestor Event */ ! void ancestorRemoved(AncestorEvent event); /** * Ancestor Moved * @param event Ancestor Event */ ! void ancestorMoved(AncestorEvent event); } // AncestorListener diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/CaretListener.java gcc-3.4.0/libjava/javax/swing/event/CaretListener.java *** gcc-3.3.3/libjava/javax/swing/event/CaretListener.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/CaretListener.java 2003-10-12 13:25:59.000000000 +0000 *************** package javax.swing.event; *** 41,47 **** import java.util.EventListener; /** ! * CaretListener interface * @author Andrew Selkirk */ public interface CaretListener extends EventListener { --- 41,47 ---- import java.util.EventListener; /** ! * CaretListener public interface * @author Andrew Selkirk */ public interface CaretListener extends EventListener { *************** public interface CaretListener extends E *** 50,56 **** * Caret position has been updated * @param event Caret Event */ ! public void caretUpdate(CaretEvent event); } // CaretListener --- 50,56 ---- * Caret position has been updated * @param event Caret Event */ ! void caretUpdate(CaretEvent event); } // CaretListener diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/CellEditorListener.java gcc-3.4.0/libjava/javax/swing/event/CellEditorListener.java *** gcc-3.3.3/libjava/javax/swing/event/CellEditorListener.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/CellEditorListener.java 2003-10-12 13:25:59.000000000 +0000 *************** package javax.swing.event; *** 41,47 **** import java.util.EventListener; /** ! * CellEditorListener interface * @author Andrew Selkirk */ public interface CellEditorListener extends EventListener { --- 41,47 ---- import java.util.EventListener; /** ! * CellEditorListener public interface * @author Andrew Selkirk */ public interface CellEditorListener extends EventListener { *************** public interface CellEditorListener exte *** 50,62 **** * Editing has been canceled * @param event Change Event */ ! public void editingCanceled(ChangeEvent event); /** * Editing has been stopped * @param event Change Event */ ! public void editingStopped(ChangeEvent event); } // CellEditorListener --- 50,62 ---- * Editing has been canceled * @param event Change Event */ ! void editingCanceled(ChangeEvent event); /** * Editing has been stopped * @param event Change Event */ ! void editingStopped(ChangeEvent event); } // CellEditorListener diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/ChangeListener.java gcc-3.4.0/libjava/javax/swing/event/ChangeListener.java *** gcc-3.3.3/libjava/javax/swing/event/ChangeListener.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/ChangeListener.java 2003-10-12 13:25:59.000000000 +0000 *************** public interface ChangeListener extends *** 51,57 **** * State changed * @param event Change Event */ ! public void stateChanged(ChangeEvent event); } // ChangeListener --- 51,57 ---- * State changed * @param event Change Event */ ! void stateChanged(ChangeEvent event); } // ChangeListener diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/DocumentEvent.java gcc-3.4.0/libjava/javax/swing/event/DocumentEvent.java *** gcc-3.3.3/libjava/javax/swing/event/DocumentEvent.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/DocumentEvent.java 2004-01-10 21:07:43.000000000 +0000 *************** *** 1,5 **** /* DocumentEvent.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* DocumentEvent.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,47 **** package javax.swing.event; ! // Imports ! import javax.swing.text.*; /** ! * DocumentEvent interface * @author Andrew Selkirk * @author Ronald Veldema */ --- 37,47 ---- package javax.swing.event; ! import javax.swing.text.Document; ! import javax.swing.text.Element; /** ! * DocumentEvent public interface * @author Andrew Selkirk * @author Ronald Veldema */ *************** public interface DocumentEvent { *** 52,60 **** //------------------------------------------------------------- /** ! * ElementChange interface */ ! public static interface ElementChange { //------------------------------------------------------------- // Methods ---------------------------------------------------- --- 52,60 ---- //------------------------------------------------------------- /** ! * ElementChange public interface */ ! public interface ElementChange { //------------------------------------------------------------- // Methods ---------------------------------------------------- *************** public interface DocumentEvent { *** 64,88 **** * getIndex * @returns int */ ! public int getIndex(); /** * getElement * @returns Element */ ! public Element getElement(); /** * getChildrenRemoved * @returns Element[] */ ! public Element[] getChildrenRemoved(); /** * getChildrenAdded * @returns Element[] */ ! public Element[] getChildrenAdded(); } // ElementChange --- 64,88 ---- * getIndex * @returns int */ ! int getIndex(); /** * getElement * @returns Element */ ! Element getElement(); /** * getChildrenRemoved * @returns Element[] */ ! Element[] getChildrenRemoved(); /** * getChildrenAdded * @returns Element[] */ ! Element[] getChildrenAdded(); } // ElementChange *************** public interface DocumentEvent { *** 90,96 **** /** * EventType */ ! public static final class EventType { //------------------------------------------------------------- // Variables -------------------------------------------------- --- 90,96 ---- /** * EventType */ ! class EventType { //------------------------------------------------------------- // Variables -------------------------------------------------- *************** public interface DocumentEvent { *** 99,115 **** /** * INSERT */ ! public static final EventType INSERT = new EventType("INSERT"); // TODO /** * REMOVE */ ! public static final EventType REMOVE = new EventType("REMOVE"); // TODO /** * CHANGE */ ! public static final EventType CHANGE = new EventType("CHANGE"); // TODO /** * typeString --- 99,115 ---- /** * INSERT */ ! EventType INSERT = new EventType("INSERT"); // TODO /** * REMOVE */ ! EventType REMOVE = new EventType("REMOVE"); // TODO /** * CHANGE */ ! EventType CHANGE = new EventType("CHANGE"); // TODO /** * typeString *************** public interface DocumentEvent { *** 154,185 **** * getType * @returns EventType */ ! public EventType getType(); /** * getOffset * @returns int */ ! public int getOffset(); /** * getLength * @returns int */ ! public int getLength(); /** * getDocument * @returns Document */ ! public Document getDocument(); /** * getChange * @param element TODO * @returns ElementChange */ ! public ElementChange getChange(Element element); } // DocumentEvent --- 154,185 ---- * getType * @returns EventType */ ! EventType getType(); /** * getOffset * @returns int */ ! int getOffset(); /** * getLength * @returns int */ ! int getLength(); /** * getDocument * @returns Document */ ! Document getDocument(); /** * getChange * @param element TODO * @returns ElementChange */ ! ElementChange getChange(Element element); } // DocumentEvent diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/DocumentListener.java gcc-3.4.0/libjava/javax/swing/event/DocumentListener.java *** gcc-3.3.3/libjava/javax/swing/event/DocumentListener.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/DocumentListener.java 2003-10-12 13:25:59.000000000 +0000 *************** package javax.swing.event; *** 40,46 **** import java.util.EventListener; /** ! * DocumentListener interface * @author Andrew Selkirk * @author Ronald Veldema */ --- 40,46 ---- import java.util.EventListener; /** ! * DocumentListener public interface * @author Andrew Selkirk * @author Ronald Veldema */ *************** public interface DocumentListener extend *** 50,68 **** * Changed update * @param event Document Event */ ! public void changedUpdate(DocumentEvent event); /** * Insert update * @param event Document Event */ ! public void insertUpdate(DocumentEvent event); /** * Remove update * @param event Document Event */ ! public void removeUpdate(DocumentEvent event); } // DocumentListener --- 50,68 ---- * Changed update * @param event Document Event */ ! void changedUpdate(DocumentEvent event); /** * Insert update * @param event Document Event */ ! void insertUpdate(DocumentEvent event); /** * Remove update * @param event Document Event */ ! void removeUpdate(DocumentEvent event); } // DocumentListener diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/EventListenerList.java gcc-3.4.0/libjava/javax/swing/event/EventListenerList.java *** gcc-3.3.3/libjava/javax/swing/event/EventListenerList.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/EventListenerList.java 2004-01-07 14:42:04.000000000 +0000 *************** *** 1,5 **** /* EventListenerList.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* EventListenerList.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,241 **** package javax.swing.event; - // Imports import java.io.Serializable; import java.util.EventListener; /** ! * EventListenerList ! * @author Andrew Selkirk */ ! public class EventListenerList extends Object ! implements Serializable { ! ! //------------------------------------------------------------- ! // Variables -------------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Listener list ! */ ! protected Object[] listenerList = null; ! ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * EventListenerList constructor ! */ ! public EventListenerList() { ! listenerList = new Object[0]; ! } // EventListenerList() ! ! ! //------------------------------------------------------------- ! // Methods ---------------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Add Listener ! * @param t Class type ! * @param listener Listener to add ! */ ! public void add(Class t, EventListener listener) { ! ! // Variables ! Object[] list; ! int index; ! Class checkClass; ! EventListener checkListener; - // Create New list in anticipation that listener is not present - list = new Object[listenerList.length + 2]; ! // Search through list looking for listener ! for (index = 0; index < listenerList.length; index += 2) { ! checkClass = (Class) listenerList[index]; ! checkListener = (EventListener) listenerList[index + 1]; ! if (checkClass.equals(t) == true && ! checkListener.equals(listener) == true) { ! return; ! } // if ! } // for ! ! // Add Listener ! list[listenerList.length] = t; ! list[listenerList.length + 1] = listener; ! // Replace Listener List ! listenerList = list; - } // add() ! /** ! * Get the total number of listeners ! * @return Count of listeners ! */ ! public int getListenerCount() { ! return (int) listenerList.length / 2; ! } // getListenerCount ! /** ! * Get the number of listeners of a particular type ! * @param t Class type to count ! * @returns Count of the specified listeners ! */ ! public int getListenerCount(Class t) { ! // Variables ! int index; ! int count; ! String name; ! // Loop through entire list ! count = 0; ! name = t.getName(); ! for (index = 0; index < listenerList.length; index += 2) { ! if (((Class) listenerList[index]).getName().equals(name) == true) { ! count += 1; ! } ! } // for: index ! // Return Count ! return count; - } // getListenerCount() ! /** ! * Get a list of listenerType/listener pairs ! * @returns Listener list ! */ ! public Object[] getListenerList() { ! return listenerList; ! } // getListenerList() ! ! /** ! * Get list of listeners of a particular type ! * @param c Class type ! * @returns List of listeners of the specified type ! */ ! public EventListener[] getListeners(Class c) { - // Variables - int count; - EventListener[] list; - String name; - int index; ! // Get count of listeners ! count = getListenerCount(c); ! // Create Event Listener list ! list = new EventListener[count]; - // Construct List - count = 0; - name = c.getName(); - for (index = 0; index < listenerList.length; index += 2) { - if (((Class) listenerList[index]).getName().equals(name) == true) { - list[count] = (EventListener) listenerList[index]; - count += 1; - } // if - } // for: index ! // Return List ! return list; - } // getListeners() ! /** ! * Remove a listener ! * @param t Class type ! * @param listener Listener to be removed ! */ ! public void remove(Class t, EventListener listener) { ! // Variables ! Object[] list; ! int index; ! Class checkClass; ! EventListener checkListener; ! int pointer; ! boolean found; - // Create New list in anticipation that listener is not present - if (listenerList.length == 0) { - return; - } // if - list = new Object[listenerList.length - 2]; ! // Search through list looking for listener ! pointer = 0; ! found = false; ! for (index = 0; index < listenerList.length - 2; index += 2) { ! checkClass = (Class) listenerList[index]; ! checkListener = (EventListener) listenerList[index + 1]; ! if (checkClass.equals(t) == false || ! checkListener.equals(listener) == false) { ! list[pointer] = checkClass; ! list[pointer + 1] = checkListener; ! pointer += 2; ! } else { ! found = true; ! } // if ! } // for ! // Replace Listener List ! if (found == true) { ! listenerList = list; ! } // if ! } // remove() ! /** ! * Get a string representation ! * @returns String representation ! */ ! public String toString() { ! return null; // TODO ! } // toString() ! } // EventListenerList --- 37,302 ---- package javax.swing.event; import java.io.Serializable; + import java.lang.reflect.Array; import java.util.EventListener; + /** ! * A utility class for keeping track of {@link EventListener}s. ! * ! *

                Example for using this class: ! * ! *

                 import java.util.EventListener;
                !  * import javax.swing.event.EventListenerList;
                !  *
                !  * class Foo
                !  * {
                !  *   protected final EventListenerList listeners = new EventListenerList();
                !  *   protected BarClosedEvent barClosedEvent = null;
                !  *
                !  *   public void addBarListener(BarListener l)
                !  *   {
                !  *     listeners.add(BarListener.class, l);
                !  *   }
                !  *
                !  *   public void removeBarListener(BarListener l)
                !  *   {
                !  *     listeners.remove(BarListener.class, l);
                !  *   }
                !  *
                !  *   protected void fireBarClosedEvent()
                !  *   {
                !  *     Object[] l = listeners.getListenerList();
                !  *
                !  *     for (int i = l.length - 2; i >= 0; i -= 2)
                !  *       if (l[i] == BarListener.class)
                !  *         {
                !  *           // Create the event on demand, when it is needed the first time.
                !  *           if (barClosedEvent == null)
                !  *             barClosedEvent = new BarClosedEvent(this);
                !  *
                !  *           ((BarClosedListener) l[i + 1]).barClosed(barClosedEvent);
                !  *         }
                !  *   }
                !  * }
                ! * ! * @author Andrew Selkirk ! * @author Sascha Brawer */ ! public class EventListenerList ! implements Serializable ! { ! /** ! * An ID for serializing instances of this class; verified with the ! * serialver tool of Sun J2SE 1.4.1_01. ! */ ! static final long serialVersionUID = -5677132037850737084L; ! /** ! * An empty array that is shared by all instances of this class that ! * have no listeners. ! */ ! private static final Object[] NO_LISTENERS = new Object[0]; ! ! ! /** ! * An array with all currently registered listeners. The array has ! * twice as many elements as there are listeners. For an even ! * integer i, listenerList[i] indicates ! * the registered class, and listenerList[i+1] is the ! * listener. ! */ ! protected transient Object[] listenerList = NO_LISTENERS; ! ! /** ! * EventListenerList constructor ! */ ! public EventListenerList() ! { ! } ! /** ! * Registers a listener of a specific type. ! * ! * @param t the type of the listener. ! * ! * @param listener the listener to add, which must be an instance of ! * t, or of a subclass of t. ! * ! * @throws IllegalArgumentException if listener is not ! * an instance of t (or a subclass thereof). ! * ! * @throws Exception if t is null. ! */ ! public void add(Class t, EventListener listener) ! { ! int oldLength; ! Object[] newList; ! if (listener == null) ! return; ! if (!t.isInstance(listener)) ! throw new IllegalArgumentException(); ! oldLength = listenerList.length; ! newList = new Object[oldLength + 2]; ! if (oldLength > 0) ! System.arraycopy(listenerList, 0, newList, 0, oldLength); ! newList[oldLength] = t; ! newList[oldLength + 1] = listener; ! listenerList = newList; ! } ! /** ! * Determines the number of listeners. ! */ ! public int getListenerCount() ! { ! return listenerList.length / 2; ! } ! /** ! * Determines the number of listeners of a particular class. ! * ! * @param t the type of listeners to be counted. In order to get ! * counted, a subscribed listener must be exactly of class ! * t. Thus, subclasses of t will not be ! * counted. ! */ ! public int getListenerCount(Class t) ! { ! int result = 0; ! for (int i = 0; i < listenerList.length; i += 2) ! if (t == listenerList[i]) ! ++result; ! return result; ! } ! /** ! * Get a list of listenerType/listener pairs ! * @returns Listener list ! */ ! public Object[] getListenerList() ! { ! return listenerList; ! } ! /** ! * Retrieves the currently subscribed listeners of a particular ! * type. For a listener to be returned, it must have been ! * registered with exactly the type c; subclasses are ! * not considered equal. ! * ! *

                The returned array can always be cast to c[]. ! * Since it is a newly allocated copy, the caller may arbitrarily ! * modify the array. ! * ! * @param c the class which was passed to {@link #add}. ! * ! * @throws ClassCastException if c does not implement ! * the {@link EventListener} interface. ! * ! * @throws NullPointerException if c is ! * null. ! * ! * @returns an array of c whose elements are the ! * currently subscribed listeners of the specified type. If there ! * are no such listeners, an empty array is returned. ! * ! * @since 1.3 ! */ ! public EventListener[] getListeners(Class c) ! { ! int count, f; ! EventListener[] result; ! count = getListenerCount(c); ! result = (EventListener[]) Array.newInstance(c, count); ! f = 0; ! for (int i = 0; i < listenerList.length; i += 2) ! if (listenerList[i] == c) ! result[f++] = (EventListener) listenerList[i + 1]; ! ! return result; ! } ! /** ! * Removes a listener of a specific type. ! * ! * @param t the type of the listener. ! * ! * @param listener the listener to remove, which must be an instance ! * of t, or of a subclass of t. ! * ! * @throws IllegalArgumentException if listener is not ! * an instance of t (or a subclass thereof). ! * ! * @throws Exception if t is null. ! */ ! public void remove(Class t, EventListener listener) ! { ! Object[] oldList, newList; ! int oldLength; ! if (listener == null) ! return; ! if (!t.isInstance(listener)) ! throw new IllegalArgumentException(); ! oldList = listenerList; ! oldLength = oldList.length; ! for (int i = 0; i < oldLength; i += 2) ! if (oldList[i] == t && oldList[i + 1] == listener) ! { ! if (oldLength == 2) ! newList = NO_LISTENERS; ! else ! { ! newList = new Object[oldLength - 2]; ! if (i > 0) ! System.arraycopy(oldList, 0, newList, 0, i); ! if (i < oldLength - 2) ! System.arraycopy(oldList, i + 2, newList, i, ! oldLength - 2 - i); ! } ! listenerList = newList; ! return; ! } ! } ! /** ! * Returns a string representation of this object that may be useful ! * for debugging purposes. ! */ ! public String toString() ! { ! StringBuffer buf = new StringBuffer("EventListenerList: "); ! buf.append(listenerList.length / 2); ! buf.append(" listeners: "); ! for (int i = 0; i < listenerList.length; i += 2) ! { ! buf.append(" type "); ! buf.append(((Class) listenerList[i]).getName()); ! buf.append(" listener "); ! buf.append(listenerList[i + 1]); ! } ! return buf.toString(); ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/HyperlinkEvent.java gcc-3.4.0/libjava/javax/swing/event/HyperlinkEvent.java *** gcc-3.3.3/libjava/javax/swing/event/HyperlinkEvent.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/HyperlinkEvent.java 2003-06-27 12:41:52.000000000 +0000 *************** this exception to your version of the li *** 35,195 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.event; ! // Imports ! import java.net.*; ! import java.util.*; /** - * HyperlinkEvent * @author Andrew Selkirk * @author Ronald Veldema */ ! public class HyperlinkEvent extends EventObject { ! ! //------------------------------------------------------------- ! // Classes ---------------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * EventType ! */ ! public static final class EventType { ! ! //------------------------------------------------------------- ! // Variables -------------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * ENTERED ! */ ! public static final EventType ENTERED = new EventType("ENTERED"); // TODO ! ! /** ! * EXITED ! */ ! public static final EventType EXITED = new EventType("EXITED"); // TODO ! ! /** ! * ACTIVATED ! */ ! public static final EventType ACTIVATED = new EventType("ACTIVATED"); // TODO ! ! /** ! * type ! */ ! private String type; ! ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Constructor EventType ! * @param type TODO ! */ ! private EventType(String type) { ! this.type = type; ! } // EventType() ! ! ! //------------------------------------------------------------- ! // Methods ---------------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * toString ! * @returns String ! */ ! public String toString() { ! return type; // TODO ! } // toString() ! ! ! } // EventType ! ! ! //------------------------------------------------------------- ! // Variables -------------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * type ! */ ! private EventType type; ! ! /** ! * url ! */ ! private URL url; ! ! /** ! * description ! */ ! private String description; ! ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Constructor HyperlinkEvent ! * @param source TODO ! * @param type TODO ! * @param url TODO ! */ ! public HyperlinkEvent(Object source, EventType type, URL url) { ! super(source); ! this.type = type; ! this.url = url; ! this.description = null; ! } // HyperlinkEvent() ! /** ! * Constructor HyperlinkEvent ! * @param source TODO ! * @param type TODO ! * @param url TODO ! * @param description TODO ! */ ! public HyperlinkEvent(Object source, EventType type, URL url, String description) { ! super(source); ! this.type = type; ! this.url = url; ! this.description = null; ! } // HyperlinkEvent() ! //------------------------------------------------------------- ! // Methods ---------------------------------------------------- ! //------------------------------------------------------------- ! /** ! * getURL ! * @returns URL ! */ ! public URL getURL() { ! return url; ! } // getURL() ! /** ! * getEventType ! * @returns EventType ! */ ! public EventType getEventType() { ! return type; ! } // getEventType() ! /** ! * getDescription ! * @returns String ! */ ! public String getDescription() { ! return description; ! } // getDescription() ! } // HyperlinkEvent --- 35,161 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.event; ! import java.net.URL; ! import java.util.EventObject; ! import javax.swing.text.Element; /** * @author Andrew Selkirk * @author Ronald Veldema */ ! public class HyperlinkEvent extends EventObject ! { ! public static final class EventType ! { ! public static final EventType ENTERED = new EventType("ENTERED"); // TODO ! public static final EventType EXITED = new EventType("EXITED"); // TODO ! public static final EventType ACTIVATED = new EventType("ACTIVATED"); // TODO ! ! private String type; ! /** ! * Creates a new Event type. ! * ! * @param type String representing the event type. ! */ ! private EventType(String type) ! { ! this.type = type; ! } + /** + * Returns a String of this object. + */ + public String toString() + { + return type; + } + } ! private static final long serialVersionUID = -2054640811732867012L; ! ! private EventType type; ! private URL url; ! private String description; ! private Element element; ! /** ! * Creates a new HyperlinkEvent with the given arguments. ! * ! * @param source The object this link is associated to. ! * @param type The type of event. ! * @param url The URL this link pointing too. ! */ ! public HyperlinkEvent(Object source, EventType type, URL url) ! { ! this (source, type, url, null, null); ! } ! /** ! * Creates a new HyperlinkEvent with the given arguments. ! * ! * @param source The object this link is associated to. ! * @param type The type of event. ! * @param url The URL this link pointing too. ! * @param description The description for this link. ! */ ! public HyperlinkEvent(Object source, EventType type, URL url, ! String description) ! { ! this (source, type, url, description, null); ! } ! ! /** ! * Creates a new HyperlinkEvent with the given arguments. ! * ! * @param source The object this link is associated to. ! * @param type The type of event. ! * @param url The URL this link pointing too. ! * @param description The description for this link. ! * @param element The element in the document representing the anchor. ! */ ! public HyperlinkEvent(Object source, EventType type, URL url, ! String description, Element element) ! { ! super(source); ! this.type = type; ! this.url = url; ! this.description = description; ! this.element = element; ! } ! /** ! * Returns the element of the document repesenting this anchor. ! */ ! public Element getSourceElement() ! { ! return element; ! } ! ! /** ! * Returns the URL of this event. ! */ ! public URL getURL() ! { ! return url; ! } + /** + * Returns the type of this event. + */ + public EventType getEventType() + { + return type; + } ! /** ! * Returns the description of this event. ! */ ! public String getDescription() ! { ! return description; ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/HyperlinkListener.java gcc-3.4.0/libjava/javax/swing/event/HyperlinkListener.java *** gcc-3.3.3/libjava/javax/swing/event/HyperlinkListener.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/HyperlinkListener.java 2003-10-12 13:25:59.000000000 +0000 *************** public interface HyperlinkListener exten *** 51,57 **** * Hyperlink updated * @param event Hyperlink Event */ ! public void hyperlinkUpdate(HyperlinkEvent event); } // HyperlinkListener --- 51,57 ---- * Hyperlink updated * @param event Hyperlink Event */ ! void hyperlinkUpdate(HyperlinkEvent event); } // HyperlinkListener diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/InternalFrameAdapter.java gcc-3.4.0/libjava/javax/swing/event/InternalFrameAdapter.java *** gcc-3.3.3/libjava/javax/swing/event/InternalFrameAdapter.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/InternalFrameAdapter.java 2003-06-11 13:20:40.000000000 +0000 *************** this exception to your version of the li *** 35,48 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.event; /** * InternalFrameAdapter * @author Andrew Selkirk */ ! public class InternalFrameAdapter extends Object ! implements InternalFrameListener { //------------------------------------------------------------- // Initialization --------------------------------------------- --- 35,49 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.event; /** * InternalFrameAdapter * @author Andrew Selkirk */ ! public abstract class InternalFrameAdapter implements InternalFrameListener ! { //------------------------------------------------------------- // Initialization --------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/InternalFrameEvent.java gcc-3.4.0/libjava/javax/swing/event/InternalFrameEvent.java *** gcc-3.3.3/libjava/javax/swing/event/InternalFrameEvent.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/InternalFrameEvent.java 2003-07-14 05:33:30.000000000 +0000 *************** this exception to your version of the li *** 35,114 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.event; - // Imports import java.awt.AWTEvent; import javax.swing.JInternalFrame; /** - * InternalFrameEvent * @author Andrew Selkirk */ ! public class InternalFrameEvent extends AWTEvent { ! ! //------------------------------------------------------------- ! // Constants -------------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Internal frame activated event ! */ ! public static int INTERNAL_FRAME_ACTIVATED = 25554; ! ! /** ! * Internal frame closed event ! */ ! public static int INTERNAL_FRAME_CLOSED = 25551; ! ! /** ! * Internal frame closing event ! */ ! public static int INTERNAL_FRAME_CLOSING = 25550; ! /** ! * Internal frame deactivated event ! */ ! public static int INTERNAL_FRAME_DEACTIVATED = 25555; ! /** ! * Internal frame deiconifed event ! */ ! public static int INTERNAL_FRAME_DEICONIFIED = 25553; ! /** ! * Internal frame frame first event ! */ ! public static int INTERNAL_FRAME_FIRST = 25549; ! /** ! * Internal frame iconified event ! */ ! public static int INTERNAL_FRAME_ICONIFIED = 2552; ! /** ! * Internal frame last event ! */ ! public static int INTERNAL_FRAME_LAST = 25555; ! /** ! * Internal frame opened event ! */ ! public static int INTERNAL_FRAME_OPENED = 25550; ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! /** ! * Constructor InternalFrameEvent ! * @param source JInternalFrame ! * @param id Event ID ! */ ! public InternalFrameEvent(JInternalFrame source, int id) { ! super(source, id); ! } // InternalFrameEvent() ! } // InternalFrameEvent --- 35,114 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.event; import java.awt.AWTEvent; import javax.swing.JInternalFrame; /** * @author Andrew Selkirk */ ! public class InternalFrameEvent extends AWTEvent ! { ! private static final long serialVersionUID = -5204823611874873183L; ! /** ! * Internal frame activated event ! */ ! public static final int INTERNAL_FRAME_ACTIVATED = 25554; ! /** ! * Internal frame closed event ! */ ! public static final int INTERNAL_FRAME_CLOSED = 25551; ! /** ! * Internal frame closing event ! */ ! public static final int INTERNAL_FRAME_CLOSING = 25550; ! /** ! * Internal frame deactivated event ! */ ! public static final int INTERNAL_FRAME_DEACTIVATED = 25555; ! /** ! * Internal frame deiconifed event ! */ ! public static final int INTERNAL_FRAME_DEICONIFIED = 25553; ! /** ! * Internal frame frame first event ! */ ! public static final int INTERNAL_FRAME_FIRST = 25549; + /** + * Internal frame iconified event + */ + public static final int INTERNAL_FRAME_ICONIFIED = 25552; ! /** ! * Internal frame last event ! */ ! public static final int INTERNAL_FRAME_LAST = 25555; ! /** ! * Internal frame opened event ! */ ! public static final int INTERNAL_FRAME_OPENED = 25549; + /** + * Creates a JInternalFrameEvent object. + * + * @param source The source of this event. + * @param id Then event ID of this event. + */ + public InternalFrameEvent(JInternalFrame source, int id) + { + super(source, id); + } ! /** ! * Returns the JInternalFrame object stored in this event. ! */ ! public JInternalFrame getInternalFrame() ! { ! return (JInternalFrame) source; ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/InternalFrameListener.java gcc-3.4.0/libjava/javax/swing/event/InternalFrameListener.java *** gcc-3.3.3/libjava/javax/swing/event/InternalFrameListener.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/InternalFrameListener.java 2003-10-12 13:25:59.000000000 +0000 *************** package javax.swing.event; *** 41,47 **** import java.util.EventListener; /** ! * InternalFrameListener interface * @author Andrew Selkirk */ public interface InternalFrameListener extends EventListener { --- 41,47 ---- import java.util.EventListener; /** ! * InternalFrameListener public interface * @author Andrew Selkirk */ public interface InternalFrameListener extends EventListener { *************** public interface InternalFrameListener e *** 50,92 **** * Internal frame activated * @param event Internal Frame Event */ ! public void internalFrameActivated(InternalFrameEvent event); /** * Internal frame closed * @param event Internal Frame Event */ ! public void internalFrameClosed(InternalFrameEvent event); /** * Internal frame closing * @param event Internal Frame Event */ ! public void internalFrameClosing(InternalFrameEvent event); /** * Internal frame deactivated * @param event Internal Frame Event */ ! public void internalFrameDeactivated(InternalFrameEvent event); /** * Internal frame deiconified * @param event Internal Frame Event */ ! public void internalFrameDeiconified(InternalFrameEvent event); /** * Internal frame iconified * @param event Internal Frame Event */ ! public void internalFrameIconified(InternalFrameEvent event); /** * Internal frame opened * @param event Internal Frame Event */ ! public void internalFrameOpened(InternalFrameEvent event); } // InternalFrameListener --- 50,92 ---- * Internal frame activated * @param event Internal Frame Event */ ! void internalFrameActivated(InternalFrameEvent event); /** * Internal frame closed * @param event Internal Frame Event */ ! void internalFrameClosed(InternalFrameEvent event); /** * Internal frame closing * @param event Internal Frame Event */ ! void internalFrameClosing(InternalFrameEvent event); /** * Internal frame deactivated * @param event Internal Frame Event */ ! void internalFrameDeactivated(InternalFrameEvent event); /** * Internal frame deiconified * @param event Internal Frame Event */ ! void internalFrameDeiconified(InternalFrameEvent event); /** * Internal frame iconified * @param event Internal Frame Event */ ! void internalFrameIconified(InternalFrameEvent event); /** * Internal frame opened * @param event Internal Frame Event */ ! void internalFrameOpened(InternalFrameEvent event); } // InternalFrameListener diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/ListDataEvent.java gcc-3.4.0/libjava/javax/swing/event/ListDataEvent.java *** gcc-3.3.3/libjava/javax/swing/event/ListDataEvent.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/ListDataEvent.java 2003-06-27 12:41:52.000000000 +0000 *************** this exception to your version of the li *** 35,139 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.event; - // Imports import java.util.EventObject; /** - * ListDataEvent * @author Andrew Selkirk * @author Ronald Veldema */ ! public class ListDataEvent extends EventObject { ! ! //------------------------------------------------------------- ! // Constants -------------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Contents changed ! */ ! public static int CONTENTS_CHANGED = 0; ! ! /** ! * Internal added ! */ ! public static int INTERVAL_ADDED = 1; ! ! /** ! * Interval removed ! */ ! public static int INTERVAL_REMOVED = 2; ! ! ! //------------------------------------------------------------- ! // Variables -------------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * type ! */ ! private int type = 0; ! ! /** ! * index0 ! */ ! private int index0 = 0; ! ! /** ! * index1 ! */ ! private int index1 = 0; ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! /** ! * Constructor ListDataEvent ! * @param source Source ! * @param type Event type ! * @param index0 Bottom of range ! * @param index1 Top of range ! */ ! public ListDataEvent(Object source, int type, ! int index0, int index1) { ! super(source); ! this.type = type; ! this.index0 = index0; ! this.index1 = index1; ! } // ListDataEvent() ! ! ! //------------------------------------------------------------- ! // Methods ---------------------------------------------------- ! //------------------------------------------------------------- ! /** ! * getIndex0 ! * @returns index0 ! */ ! public int getIndex0() { ! return index0; ! } // getIndex0() ! ! /** ! * getIndex1 ! * @returns index1 ! */ ! public int getIndex1() { ! return index1; ! } // getIndex1() ! ! /** ! * Event type ! * @returns Event type ! */ ! public int getType() { ! return type; ! } // getType() ! } // ListDataEvent --- 35,98 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.event; import java.util.EventObject; /** * @author Andrew Selkirk * @author Ronald Veldema */ ! public class ListDataEvent extends EventObject ! { ! private static final long serialVersionUID = 2510353260071004774L; ! ! public static final int CONTENTS_CHANGED = 0; ! public static final int INTERVAL_ADDED = 1; ! public static final int INTERVAL_REMOVED = 2; ! private int type = 0; ! private int index0 = 0; ! private int index1 = 0; ! /** ! * Creates a ListDataEvent object. ! * ! * @param source The source of the event. ! * @param type The type of the event ! * @param index0 Bottom of range ! * @param index1 Top of range ! */ ! public ListDataEvent(Object source, int type, int index0, int index1) ! { ! super(source); ! this.type = type; ! this.index0 = index0; ! this.index1 = index1; ! } ! /** ! * Returns the bottom index. ! */ ! public int getIndex0() ! { ! return index0; ! } + /** + * Returns the top index. + */ + public int getIndex1() + { + return index1; + } ! /** ! * Returns the type of this event. ! */ ! public int getType() ! { ! return type; ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/ListDataListener.java gcc-3.4.0/libjava/javax/swing/event/ListDataListener.java *** gcc-3.3.3/libjava/javax/swing/event/ListDataListener.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/ListDataListener.java 2003-10-12 13:25:59.000000000 +0000 *************** package javax.swing.event; *** 41,47 **** import java.util.EventListener; /** ! * ListDataListener interface * @author Andrew Selkirk * @author Ronald Veldema */ --- 41,47 ---- import java.util.EventListener; /** ! * ListDataListener public interface * @author Andrew Selkirk * @author Ronald Veldema */ *************** public interface ListDataListener extend *** 51,69 **** * Contents Changed * @param event ListDataEvent Event */ ! public void contentsChanged(ListDataEvent event); /** * Interval Added * @param event ListDataEvent Event */ ! public void intervalAdded(ListDataEvent event); /** * Interval Removed * @param event ListDataEvent Event */ ! public void intervalRemoved(ListDataEvent event); } // ListDataListener --- 51,69 ---- * Contents Changed * @param event ListDataEvent Event */ ! void contentsChanged(ListDataEvent event); /** * Interval Added * @param event ListDataEvent Event */ ! void intervalAdded(ListDataEvent event); /** * Interval Removed * @param event ListDataEvent Event */ ! void intervalRemoved(ListDataEvent event); } // ListDataListener diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/ListSelectionListener.java gcc-3.4.0/libjava/javax/swing/event/ListSelectionListener.java *** gcc-3.3.3/libjava/javax/swing/event/ListSelectionListener.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/ListSelectionListener.java 2003-10-12 13:25:59.000000000 +0000 *************** package javax.swing.event; *** 41,47 **** import java.util.EventListener; /** ! * ListSelectionListener interface * @author Andrew Selkirk * @author Ronald Veldema */ --- 41,47 ---- import java.util.EventListener; /** ! * ListSelectionListener public interface * @author Andrew Selkirk * @author Ronald Veldema */ *************** public interface ListSelectionListener e *** 51,57 **** * Value changed * @param event List Selection Event */ ! public void valueChanged(ListSelectionEvent event); } // ListSelectionListener --- 51,57 ---- * Value changed * @param event List Selection Event */ ! void valueChanged(ListSelectionEvent event); } // ListSelectionListener diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/MenuDragMouseListener.java gcc-3.4.0/libjava/javax/swing/event/MenuDragMouseListener.java *** gcc-3.3.3/libjava/javax/swing/event/MenuDragMouseListener.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/MenuDragMouseListener.java 2003-10-12 13:25:59.000000000 +0000 *************** package javax.swing.event; *** 41,47 **** import java.util.EventListener; /** ! * MenuDragMouseListener interface * @author Andrew Selkirk */ public interface MenuDragMouseListener extends EventListener { --- 41,47 ---- import java.util.EventListener; /** ! * MenuDragMouseListener public interface * @author Andrew Selkirk */ public interface MenuDragMouseListener extends EventListener { *************** public interface MenuDragMouseListener e *** 50,74 **** * Menu drag mouse dragged * @param event Menu Drag Mouse Event */ ! public void menuDragMouseDragged(MenuDragMouseEvent event); /** * Menu drag mouse entered * @param event Menu Drag Mouse Event */ ! public void menuDragMouseEntered(MenuDragMouseEvent event); /** * Menu drag mouse exited * @param event Menu Drag Mouse Event */ ! public void menuDragMouseExited(MenuDragMouseEvent event); /** * Menu drag mouse released * @param event Menu Drag Mouse Event */ ! public void menuDragMouseReleased(MenuDragMouseEvent event); } // MenuDragMouseListener --- 50,74 ---- * Menu drag mouse dragged * @param event Menu Drag Mouse Event */ ! void menuDragMouseDragged(MenuDragMouseEvent event); /** * Menu drag mouse entered * @param event Menu Drag Mouse Event */ ! void menuDragMouseEntered(MenuDragMouseEvent event); /** * Menu drag mouse exited * @param event Menu Drag Mouse Event */ ! void menuDragMouseExited(MenuDragMouseEvent event); /** * Menu drag mouse released * @param event Menu Drag Mouse Event */ ! void menuDragMouseReleased(MenuDragMouseEvent event); } // MenuDragMouseListener diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/MenuKeyListener.java gcc-3.4.0/libjava/javax/swing/event/MenuKeyListener.java *** gcc-3.3.3/libjava/javax/swing/event/MenuKeyListener.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/MenuKeyListener.java 2003-10-12 13:25:59.000000000 +0000 *************** package javax.swing.event; *** 41,47 **** import java.util.EventListener; /** ! * MenuKeyListener interface * @author Andrew Selkirk */ public interface MenuKeyListener extends EventListener { --- 41,47 ---- import java.util.EventListener; /** ! * MenuKeyListener public interface * @author Andrew Selkirk */ public interface MenuKeyListener extends EventListener { *************** public interface MenuKeyListener extends *** 50,68 **** * Menu key pressed * @param event Menu Key Event */ ! public void menuKeyPressed(MenuKeyEvent event); /** * Menu key released * @param event Menu Key Event */ ! public void menuKeyReleased(MenuKeyEvent event); /** * Menu key typed * @param event Menu Key Event */ ! public void menuKeyTyped(MenuKeyEvent event); } // MenuKeyListener --- 50,68 ---- * Menu key pressed * @param event Menu Key Event */ ! void menuKeyPressed(MenuKeyEvent event); /** * Menu key released * @param event Menu Key Event */ ! void menuKeyReleased(MenuKeyEvent event); /** * Menu key typed * @param event Menu Key Event */ ! void menuKeyTyped(MenuKeyEvent event); } // MenuKeyListener diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/MenuListener.java gcc-3.4.0/libjava/javax/swing/event/MenuListener.java *** gcc-3.3.3/libjava/javax/swing/event/MenuListener.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/MenuListener.java 2003-10-12 13:25:59.000000000 +0000 *************** package javax.swing.event; *** 41,47 **** import java.util.EventListener; /** ! * MenuListener interface * @author Andrew Selkirk */ public interface MenuListener extends EventListener { --- 41,47 ---- import java.util.EventListener; /** ! * MenuListener public interface * @author Andrew Selkirk */ public interface MenuListener extends EventListener { *************** public interface MenuListener extends Ev *** 50,68 **** * Menu canceled * @param event Menu Event */ ! public void menuCanceled(MenuEvent event); /** * Menu deselected * @param event Menu Event */ ! public void menuDeselected(MenuEvent event); /** * Menu selected * @param event Menu Event */ ! public void menuSelected(MenuEvent event); } // MenuListener --- 50,68 ---- * Menu canceled * @param event Menu Event */ ! void menuCanceled(MenuEvent event); /** * Menu deselected * @param event Menu Event */ ! void menuDeselected(MenuEvent event); /** * Menu selected * @param event Menu Event */ ! void menuSelected(MenuEvent event); } // MenuListener diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/MouseInputAdapter.java gcc-3.4.0/libjava/javax/swing/event/MouseInputAdapter.java *** gcc-3.3.3/libjava/javax/swing/event/MouseInputAdapter.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/MouseInputAdapter.java 2003-06-11 13:20:40.000000000 +0000 *************** this exception to your version of the li *** 35,43 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.event; - // Imports import java.awt.event.MouseEvent; /** --- 35,43 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.event; import java.awt.event.MouseEvent; /** diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/MouseInputListener.java gcc-3.4.0/libjava/javax/swing/event/MouseInputListener.java *** gcc-3.3.3/libjava/javax/swing/event/MouseInputListener.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/MouseInputListener.java 2003-10-12 13:25:59.000000000 +0000 *************** import java.awt.event.MouseListener; *** 42,48 **** import java.awt.event.MouseMotionListener; /** ! * MouseInputListener interface * @author Andrew Selkirk */ public interface MouseInputListener extends MouseListener, --- 42,48 ---- import java.awt.event.MouseMotionListener; /** ! * MouseInputListener public interface * @author Andrew Selkirk */ public interface MouseInputListener extends MouseListener, diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/PopupMenuListener.java gcc-3.4.0/libjava/javax/swing/event/PopupMenuListener.java *** gcc-3.3.3/libjava/javax/swing/event/PopupMenuListener.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/PopupMenuListener.java 2003-10-12 13:25:59.000000000 +0000 *************** package javax.swing.event; *** 41,47 **** import java.util.EventListener; /** ! * PopupMenuListener interface * @author Andrew Selkirk */ public interface PopupMenuListener extends EventListener { --- 41,47 ---- import java.util.EventListener; /** ! * PopupMenuListener public interface * @author Andrew Selkirk */ public interface PopupMenuListener extends EventListener { *************** public interface PopupMenuListener exten *** 50,68 **** * Popup Menu Canceled * @param event Popup Menu Event */ ! public void popupMenuCanceled(PopupMenuEvent event); /** * Popup Menu will become invisible * @param event Popup Menu Event */ ! public void popupMenuWillBecomeInvisible(PopupMenuEvent event); /** * Popup Menu will become visible * @param event Popup Menu Event */ ! public void popupMenuWillBecomeVisible(PopupMenuEvent event); } // PopupMenuListener --- 50,68 ---- * Popup Menu Canceled * @param event Popup Menu Event */ ! void popupMenuCanceled(PopupMenuEvent event); /** * Popup Menu will become invisible * @param event Popup Menu Event */ ! void popupMenuWillBecomeInvisible(PopupMenuEvent event); /** * Popup Menu will become visible * @param event Popup Menu Event */ ! void popupMenuWillBecomeVisible(PopupMenuEvent event); } // PopupMenuListener diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/SwingPropertyChangeSupport.java gcc-3.4.0/libjava/javax/swing/event/SwingPropertyChangeSupport.java *** gcc-3.3.3/libjava/javax/swing/event/SwingPropertyChangeSupport.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/SwingPropertyChangeSupport.java 2004-01-10 21:07:43.000000000 +0000 *************** *** 1,5 **** /* SwingPropertyChangeSupport.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* SwingPropertyChangeSupport.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,46 **** package javax.swing.event; ! // Imports ! import java.beans.*; ! import java.io.*; ! import java.util.*; /** * SwingPropertyChangeSupport --- 37,50 ---- package javax.swing.event; ! import java.beans.PropertyChangeEvent; ! import java.beans.PropertyChangeListener; ! import java.beans.PropertyChangeSupport; ! import java.io.IOException; ! import java.io.ObjectInputStream; ! import java.io.ObjectOutputStream; ! import java.util.EventListener; ! import java.util.Hashtable; /** * SwingPropertyChangeSupport *************** import java.util.*; *** 49,54 **** --- 53,60 ---- public final class SwingPropertyChangeSupport extends PropertyChangeSupport { + private static final long serialVersionUID = 7162625831330845068L; + //------------------------------------------------------------- // Variables -------------------------------------------------- //------------------------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/TableColumnModelListener.java gcc-3.4.0/libjava/javax/swing/event/TableColumnModelListener.java *** gcc-3.3.3/libjava/javax/swing/event/TableColumnModelListener.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/TableColumnModelListener.java 2003-10-12 13:25:59.000000000 +0000 *************** package javax.swing.event; *** 41,47 **** import java.util.EventListener; /** ! * TableColumnModelListener interface * @author Andrew Selkirk */ public interface TableColumnModelListener extends EventListener { --- 41,47 ---- import java.util.EventListener; /** ! * TableColumnModelListener public interface * @author Andrew Selkirk */ public interface TableColumnModelListener extends EventListener { *************** public interface TableColumnModelListene *** 50,80 **** * Column added * @param event Table Column Model Event */ ! public void columnAdded(TableColumnModelEvent event); /** * Column margin changed * @param event Change Event */ ! public void columnMarginChanged(ChangeEvent event); /** * Column moved * @param event Table Column Model Event */ ! public void columnMoved(TableColumnModelEvent event); /** * Column removed * @param event Table Column Model Event */ ! public void columnRemoved(TableColumnModelEvent event); /** * Column selection changed * @param event List Selection Event */ ! public void columnSelectionChanged(ListSelectionEvent event); } // TableColumnModelListener --- 50,80 ---- * Column added * @param event Table Column Model Event */ ! void columnAdded(TableColumnModelEvent event); /** * Column margin changed * @param event Change Event */ ! void columnMarginChanged(ChangeEvent event); /** * Column moved * @param event Table Column Model Event */ ! void columnMoved(TableColumnModelEvent event); /** * Column removed * @param event Table Column Model Event */ ! void columnRemoved(TableColumnModelEvent event); /** * Column selection changed * @param event List Selection Event */ ! void columnSelectionChanged(ListSelectionEvent event); } // TableColumnModelListener diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/TableModelEvent.java gcc-3.4.0/libjava/javax/swing/event/TableModelEvent.java *** gcc-3.3.3/libjava/javax/swing/event/TableModelEvent.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/TableModelEvent.java 2003-06-27 12:41:52.000000000 +0000 *************** this exception to your version of the li *** 35,204 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.event; - // Imports import java.util.EventObject; import javax.swing.table.TableModel; /** - * TableModelEvent * @author Andrew Selkirk */ ! public class TableModelEvent extends EventObject { ! ! //------------------------------------------------------------- ! // Constants -------------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * ALL_COLUMNS ! */ ! public static int ALL_COLUMNS = -1; ! ! /** ! * DELETE ! */ ! public static int DELETE = -1; ! ! /** ! * HEADER_ROW ! */ ! public static int HEADER_ROW = -1; ! ! /** ! * INSERT ! */ ! public static int INSERT = 1; ! ! /** ! * UPDATE ! */ ! public static int UPDATE = 0; ! ! ! //------------------------------------------------------------- ! // Variables -------------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * column ! */ ! protected int column = 0; ! ! /** ! * firstRow ! */ ! protected int firstRow = 0; ! ! /** ! * lastRow ! */ ! protected int lastRow = 0; ! ! /** ! * type ! */ ! protected int type = 0; ! ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Constructor TableModelEvent ! * @param source Source object ! */ ! public TableModelEvent(TableModel source) { ! this(source, 0, source.getRowCount(), ALL_COLUMNS, UPDATE); ! } // TableModelEvent() ! ! /** ! * Constructor TableModelEvent ! * @param source Source table model ! * @param row Updated row ! */ ! public TableModelEvent(TableModel source, int row) { ! this(source, row, row, ALL_COLUMNS, UPDATE); ! } // TableModelEvent() ! ! /** ! * Constructor TableModelEvent ! * @param source Source table model ! * @param firstRow First row of update ! * @param lastRow Last row of update ! */ ! public TableModelEvent(TableModel source, int firstRow, ! int lastRow) { ! this(source, firstRow, lastRow, ALL_COLUMNS, UPDATE); ! } // TableModelEvent() ! /** ! * Constructor TableModelEvent ! * @param source Source table model ! * @param firstRow First row of update ! * @param lastRow Last row of update ! * @param column Affected column ! */ ! public TableModelEvent(TableModel source, int firstRow, ! int lastRow, int column) { ! this(source, firstRow, lastRow, column, UPDATE); ! } // TableModelEvent() ! /** ! * Constructor TableModelEvent ! * @param source Source table model ! * @param firstRow First row of update ! * @param lastRow Last row of update ! * @param column Affected column ! * @param type Type of change ! */ ! public TableModelEvent(TableModel source, int firstRow, ! int lastRow, int column, int type) { ! super(source); ! this.firstRow = firstRow; ! this.lastRow = lastRow; ! this.column = column; ! this.type = type; ! } // TableModelEvent() ! //------------------------------------------------------------- ! // Methods ---------------------------------------------------- ! //------------------------------------------------------------- ! /** ! * getColumn ! * @returns column ! */ ! public int getColumn() { ! return column; ! } // getColumn() ! /** ! * getFirstRow ! * @returns row ! */ ! public int getFirstRow() { ! return firstRow; ! } // getFirstRow() ! /** ! * getLastRow ! * @returns row ! */ ! public int getLastRow() { ! return lastRow; ! } // getLastRow() ! /** ! * Get type ! * @returns Type of event ! */ ! public int getType() { ! return type; ! } // getType() ! } // TableModelEvent --- 35,157 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.event; import java.util.EventObject; import javax.swing.table.TableModel; /** * @author Andrew Selkirk */ ! public class TableModelEvent extends EventObject ! { ! private static final long serialVersionUID = -7849342674552212824L; ! ! public static final int ALL_COLUMNS = -1; ! public static final int DELETE = -1; ! public static final int HEADER_ROW = -1; ! public static final int INSERT = 1; ! public static final int UPDATE = 0; ! protected int column = 0; ! protected int firstRow = 0; ! protected int lastRow = 0; ! protected int type = 0; ! /** ! * Creates a TableModelEvent event. ! * ! * @param source The source object ! */ ! public TableModelEvent(TableModel source) ! { ! this(source, 0, source.getRowCount(), ALL_COLUMNS, UPDATE); ! } + /** + * Creates a TableModelEvent event. + * + * @param source The source object + * @param row The updated row + */ + public TableModelEvent(TableModel source, int row) + { + this(source, row, row, ALL_COLUMNS, UPDATE); + } ! /** ! * Creates a TableModelEvent event. ! * ! * @param source The source object ! * @param firstRow The first row of update ! * @param lastRow The last row of update ! */ ! public TableModelEvent(TableModel source, int firstRow, int lastRow) ! { ! this(source, firstRow, lastRow, ALL_COLUMNS, UPDATE); ! } ! /** ! * Creates a TableModelEvent event. ! * ! * @param source The source object ! * @param firstRow The first row of update ! * @param lastRow The last row of update ! * @param column The affected column ! */ ! public TableModelEvent(TableModel source, int firstRow, int lastRow, int column) ! { ! this(source, firstRow, lastRow, column, UPDATE); ! } ! /** ! * Creates a TableModelEvent event. ! * ! * @param source The source object ! * @param firstRow The first row of update ! * @param lastRow The last row of update ! * @param column The affected column ! * @param type The type of change ! */ ! public TableModelEvent(TableModel source, int firstRow, int lastRow, int column, int type) ! { ! super(source); ! this.firstRow = firstRow; ! this.lastRow = lastRow; ! this.column = column; ! this.type = type; ! } ! /** ! * Returns the affected column of this event. ! */ ! public int getColumn() ! { ! return column; ! } ! /** ! * Returns the first affected row of this event. ! */ ! public int getFirstRow() ! { ! return firstRow; ! } + /** + * Returns the last affected row of this event. + */ + public int getLastRow() + { + return lastRow; + } ! /** ! * Returns the type of change of this event. ! */ ! public int getType() ! { ! return type; ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/TableModelListener.java gcc-3.4.0/libjava/javax/swing/event/TableModelListener.java *** gcc-3.3.3/libjava/javax/swing/event/TableModelListener.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/TableModelListener.java 2003-10-12 13:25:59.000000000 +0000 *************** package javax.swing.event; *** 40,46 **** import java.util.EventListener; /** ! * TableModelListener interface * @author Andrew Selkirk */ public interface TableModelListener extends EventListener { --- 40,46 ---- import java.util.EventListener; /** ! * TableModelListener public interface * @author Andrew Selkirk */ public interface TableModelListener extends EventListener { *************** public interface TableModelListener exte *** 49,55 **** * Table changed * @param event Table Model Event */ ! public void tableChanged(TableModelEvent event); } // TableModelListener --- 49,55 ---- * Table changed * @param event Table Model Event */ ! void tableChanged(TableModelEvent event); } // TableModelListener diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/TreeExpansionListener.java gcc-3.4.0/libjava/javax/swing/event/TreeExpansionListener.java *** gcc-3.3.3/libjava/javax/swing/event/TreeExpansionListener.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/TreeExpansionListener.java 2003-10-12 13:25:59.000000000 +0000 *************** package javax.swing.event; *** 41,47 **** import java.util.EventListener; /** ! * TreeExpansionListener interface * @author Andrew Selkirk */ public interface TreeExpansionListener extends EventListener { --- 41,47 ---- import java.util.EventListener; /** ! * TreeExpansionListener public interface * @author Andrew Selkirk */ public interface TreeExpansionListener extends EventListener { *************** public interface TreeExpansionListener e *** 50,62 **** * Tree collapsed * @param event Tree Expansion Event */ ! public void treeCollapsed(TreeExpansionEvent event); /** * Tree expanded * @param event Tree Expansion Event */ ! public void treeExpanded(TreeExpansionEvent event); } // TreeExpansionListener --- 50,62 ---- * Tree collapsed * @param event Tree Expansion Event */ ! void treeCollapsed(TreeExpansionEvent event); /** * Tree expanded * @param event Tree Expansion Event */ ! void treeExpanded(TreeExpansionEvent event); } // TreeExpansionListener diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/TreeModelListener.java gcc-3.4.0/libjava/javax/swing/event/TreeModelListener.java *** gcc-3.3.3/libjava/javax/swing/event/TreeModelListener.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/TreeModelListener.java 2003-10-12 13:25:59.000000000 +0000 *************** package javax.swing.event; *** 41,47 **** import java.util.EventListener; /** ! * TreeModelListener interface * @author Andrew Selkirk */ public interface TreeModelListener extends EventListener { --- 41,47 ---- import java.util.EventListener; /** ! * TreeModelListener public interface * @author Andrew Selkirk */ public interface TreeModelListener extends EventListener { *************** public interface TreeModelListener exten *** 50,74 **** * Tree nodes changed * @param event Tree Model Event */ ! public void treeNodesChanged(TreeModelEvent event); /** * Tree nodes inserted * @param event Tree Model Event */ ! public void treeNodesInserted(TreeModelEvent event); /** * Tree nodes removed * @param event Tree Model Event */ ! public void treeNodesRemoved(TreeModelEvent event); /** * Tree structured changed * @param event Tree Model Event */ ! public void treeStructureChanged(TreeModelEvent event); } // TreeModelListener --- 50,74 ---- * Tree nodes changed * @param event Tree Model Event */ ! void treeNodesChanged(TreeModelEvent event); /** * Tree nodes inserted * @param event Tree Model Event */ ! void treeNodesInserted(TreeModelEvent event); /** * Tree nodes removed * @param event Tree Model Event */ ! void treeNodesRemoved(TreeModelEvent event); /** * Tree structured changed * @param event Tree Model Event */ ! void treeStructureChanged(TreeModelEvent event); } // TreeModelListener diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/TreeSelectionEvent.java gcc-3.4.0/libjava/javax/swing/event/TreeSelectionEvent.java *** gcc-3.3.3/libjava/javax/swing/event/TreeSelectionEvent.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/TreeSelectionEvent.java 2004-01-10 21:07:43.000000000 +0000 *************** *** 1,5 **** /* TreeSelectionEvent.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* TreeSelectionEvent.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,45 **** package javax.swing.event; ! // Imports ! import java.util.*; ! import javax.swing.tree.*; /** * TreeSelectionEvent --- 37,44 ---- package javax.swing.event; ! import java.util.EventObject; ! import javax.swing.tree.TreePath; /** * TreeSelectionEvent diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/TreeSelectionListener.java gcc-3.4.0/libjava/javax/swing/event/TreeSelectionListener.java *** gcc-3.3.3/libjava/javax/swing/event/TreeSelectionListener.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/TreeSelectionListener.java 2003-10-12 13:25:59.000000000 +0000 *************** package javax.swing.event; *** 41,47 **** import java.util.EventListener; /** ! * TreeSelectionListener interface * @author Andrew Selkirk */ public interface TreeSelectionListener extends EventListener { --- 41,47 ---- import java.util.EventListener; /** ! * TreeSelectionListener public interface * @author Andrew Selkirk */ public interface TreeSelectionListener extends EventListener { *************** public interface TreeSelectionListener e *** 50,56 **** * Value changed * @param event Tree Selection Event */ ! public void valueChanged(TreeSelectionEvent event); } // TreeSelectionListener --- 50,56 ---- * Value changed * @param event Tree Selection Event */ ! void valueChanged(TreeSelectionEvent event); } // TreeSelectionListener diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/TreeWillExpandListener.java gcc-3.4.0/libjava/javax/swing/event/TreeWillExpandListener.java *** gcc-3.3.3/libjava/javax/swing/event/TreeWillExpandListener.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/TreeWillExpandListener.java 2003-10-12 13:25:59.000000000 +0000 *************** this exception to your version of the li *** 35,62 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.event; - // Imports import java.util.EventListener; /** - * TreeWillExpandListener interface * @author Andrew Selkirk */ ! public interface TreeWillExpandListener extends EventListener { ! ! /** ! * Tree will collapse ! * @param event Tree Expansion Event ! */ ! public void treeWillCollapse(TreeExpansionEvent event); ! ! /** ! * Tree will expand ! * @param event Tree Expansion Event ! */ ! public void treeWillExpand(TreeExpansionEvent event); ! ! } // TreeWillExpandListener --- 35,64 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.event; import java.util.EventListener; + import javax.swing.tree.ExpandVetoException; /** * @author Andrew Selkirk */ ! public interface TreeWillExpandListener extends EventListener ! { ! /** ! * Invoked whenever a node in the tree is about to be collapsed. ! * ! * @param event The tree expansion Event ! */ ! void treeWillCollapse(TreeExpansionEvent event) ! throws ExpandVetoException; ! /** ! * Invoked whenever a node in the tree is about to be expanded. ! * ! * @param event The tree expansion Event ! */ ! void treeWillExpand(TreeExpansionEvent event) ! throws ExpandVetoException; ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/UndoableEditEvent.java gcc-3.4.0/libjava/javax/swing/event/UndoableEditEvent.java *** gcc-3.3.3/libjava/javax/swing/event/UndoableEditEvent.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/UndoableEditEvent.java 2004-01-10 21:07:43.000000000 +0000 *************** *** 1,5 **** /* UndoableEditEvent.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* UndoableEditEvent.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,45 **** package javax.swing.event; ! // Imports ! import java.util.*; ! import javax.swing.undo.*; /** * UndoableEditEvent --- 37,44 ---- package javax.swing.event; ! import java.util.EventObject; ! import javax.swing.undo.UndoableEdit; /** * UndoableEditEvent *************** import javax.swing.undo.*; *** 48,53 **** --- 47,54 ---- */ public class UndoableEditEvent extends EventObject { + private static final long serialVersionUID = 4418044561759134484L; + //------------------------------------------------------------- // Variables -------------------------------------------------- //------------------------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/event/UndoableEditListener.java gcc-3.4.0/libjava/javax/swing/event/UndoableEditListener.java *** gcc-3.3.3/libjava/javax/swing/event/UndoableEditListener.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/event/UndoableEditListener.java 2003-10-12 13:25:59.000000000 +0000 *************** package javax.swing.event; *** 41,47 **** import java.util.EventListener; /** ! * UndoableEditListener interface * @author Andrew Selkirk * @author Ronald Veldema */ --- 41,47 ---- import java.util.EventListener; /** ! * UndoableEditListener public interface * @author Andrew Selkirk * @author Ronald Veldema */ *************** public interface UndoableEditListener ex *** 51,57 **** * Undoable edit has happened * @param event Undoable Edit Event */ ! public void undoableEditHappened(UndoableEditEvent event); } // UndoableEditListener --- 51,57 ---- * Undoable edit has happened * @param event Undoable Edit Event */ ! void undoableEditHappened(UndoableEditEvent event); } // UndoableEditListener diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/filechooser/FileFilter.java gcc-3.4.0/libjava/javax/swing/filechooser/FileFilter.java *** gcc-3.3.3/libjava/javax/swing/filechooser/FileFilter.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/filechooser/FileFilter.java 2003-06-11 13:20:40.000000000 +0000 *************** this exception to your version of the li *** 35,44 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.filechooser; ! // Imports ! import java.io.*; /** * FileFilter --- 35,44 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.filechooser; ! import java.io.File; /** * FileFilter diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/filechooser/FileSystemView.java gcc-3.4.0/libjava/javax/swing/filechooser/FileSystemView.java *** gcc-3.3.3/libjava/javax/swing/filechooser/FileSystemView.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/filechooser/FileSystemView.java 2003-06-11 13:20:40.000000000 +0000 *************** this exception to your version of the li *** 35,44 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.filechooser; ! // Imports ! import java.io.*; /** * FileSystemView --- 35,46 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.filechooser; ! import java.io.File; ! import java.io.IOException; ! import javax.swing.Icon; /** * FileSystemView diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/filechooser/FileView.java gcc-3.4.0/libjava/javax/swing/filechooser/FileView.java *** gcc-3.3.3/libjava/javax/swing/filechooser/FileView.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/filechooser/FileView.java 2003-06-11 13:20:40.000000000 +0000 *************** this exception to your version of the li *** 35,45 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.filechooser; ! // Imports ! import java.io.*; ! import javax.swing.*; /** * FileView --- 35,45 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.filechooser; ! import java.io.File; ! import javax.swing.Icon; /** * FileView diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/FocusManager.java gcc-3.4.0/libjava/javax/swing/FocusManager.java *** gcc-3.3.3/libjava/javax/swing/FocusManager.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/FocusManager.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,52 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing; ! // Imports ! import java.awt.*; ! import java.awt.event.*; /** * FocusManager * @author Andrew Selkirk * @version 1.0 */ ! public abstract class FocusManager { //------------------------------------------------------------- // Classes ---------------------------------------------------- --- 35,54 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; ! import java.awt.Component; ! import java.awt.DefaultKeyboardFocusManager; ! import java.awt.event.KeyEvent; /** * FocusManager * @author Andrew Selkirk * @version 1.0 */ ! public abstract class FocusManager extends DefaultKeyboardFocusManager ! { //------------------------------------------------------------- // Classes ---------------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/Icon.java gcc-3.4.0/libjava/javax/swing/Icon.java *** gcc-3.3.3/libjava/javax/swing/Icon.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/Icon.java 2004-01-09 10:18:47.000000000 +0000 *************** *** 1,5 **** /* Icon.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Icon.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,43 **** package javax.swing; ! import java.awt.*; public interface Icon { --- 37,44 ---- package javax.swing; ! import java.awt.Component; ! import java.awt.Graphics; public interface Icon { diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/ImageIcon.java gcc-3.4.0/libjava/javax/swing/ImageIcon.java *** gcc-3.3.3/libjava/javax/swing/ImageIcon.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/ImageIcon.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,46 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package javax.swing; - - import java.awt.*; - import java.awt.image.*; public class ImageIcon implements Icon { --- 35,52 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; + import java.awt.Component; + import java.awt.Graphics; + import java.awt.Image; + import java.awt.MediaTracker; + import java.awt.Toolkit; + import java.io.Serializable; + import java.net.URL; + import javax.accessibility.Accessible; + import javax.accessibility.AccessibleContext; public class ImageIcon implements Icon { diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/InputMap.java gcc-3.4.0/libjava/javax/swing/InputMap.java *** gcc-3.3.3/libjava/javax/swing/InputMap.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/InputMap.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,52 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing; ! // Imports ! import java.util.*; ! import java.io.*; /** * InputMap * @author Andrew Selkirk * @version 1.0 */ ! public class InputMap implements Serializable { //------------------------------------------------------------- // Variables -------------------------------------------------- --- 35,62 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; ! import java.io.IOException; ! import java.io.ObjectInputStream; ! import java.io.ObjectOutputStream; ! import java.io.Serializable; ! import java.util.Arrays; ! import java.util.Iterator; ! import java.util.HashMap; ! import java.util.HashSet; ! import java.util.Map; ! import java.util.Set; /** * InputMap * @author Andrew Selkirk * @version 1.0 */ ! public class InputMap implements Serializable ! { ! static final long serialVersionUID = -5429059542008604257L; //------------------------------------------------------------- // Variables -------------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JApplet.java gcc-3.4.0/libjava/javax/swing/JApplet.java *** gcc-3.3.3/libjava/javax/swing/JApplet.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JApplet.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,52 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package javax.swing; - - import java.applet.*; - import java.awt.*; - import java.awt.event.*; import javax.accessibility.AccessibleContext; - import javax.accessibility.AccessibleRole; - import javax.accessibility.AccessibleState; - import javax.accessibility.AccessibleStateSet; - public class JApplet extends Applet { --- 35,53 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; + import java.applet.Applet; + import java.awt.BorderLayout; + import java.awt.Component; + import java.awt.Container; + import java.awt.Dimension; + import java.awt.Graphics; + import java.awt.LayoutManager; + import java.awt.event.KeyEvent; + import java.awt.event.WindowEvent; import javax.accessibility.AccessibleContext; public class JApplet extends Applet { diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JButton.java gcc-3.4.0/libjava/javax/swing/JButton.java *** gcc-3.3.3/libjava/javax/swing/JButton.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JButton.java 2004-01-09 10:18:47.000000000 +0000 *************** *** 1,5 **** /* JButton.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* JButton.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,46 **** package javax.swing; ! import java.awt.*; ! import java.awt.event.*; ! import javax.swing.plaf.*; ! import javax.accessibility.*; /** * An instance of JButton can be added to a panel, frame etc --- 37,45 ---- package javax.swing; ! import javax.accessibility.Accessible; ! import javax.accessibility.AccessibleContext; ! import javax.swing.plaf.ButtonUI; /** * An instance of JButton can be added to a panel, frame etc *************** import javax.accessibility.*; *** 49,54 **** --- 48,55 ---- */ public class JButton extends AbstractButton implements Accessible { + private static final long serialVersionUID = -1907255238954382202L; + boolean def, is_def; diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JCheckBox.java gcc-3.4.0/libjava/javax/swing/JCheckBox.java *** gcc-3.3.3/libjava/javax/swing/JCheckBox.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JCheckBox.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,46 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing; ! import java.awt.*; ! import java.awt.event.*; ! import javax.swing.plaf.*; ! import javax.accessibility.*; /** * An instance of JCheckbox can be added to a panel, frame etc --- 35,44 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; ! import javax.accessibility.AccessibleContext; /** * An instance of JCheckbox can be added to a panel, frame etc diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JCheckBoxMenuItem.java gcc-3.4.0/libjava/javax/swing/JCheckBoxMenuItem.java *** gcc-3.3.3/libjava/javax/swing/JCheckBoxMenuItem.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JCheckBoxMenuItem.java 2004-01-09 10:18:47.000000000 +0000 *************** *** 1,5 **** /* JCheckBoxMenuItem.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* JCheckBoxMenuItem.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,52 **** package javax.swing; ! // Imports ! import java.io.*; ! import javax.accessibility.*; /** * JCheckBoxMenuItem * @author Andrew Selkirk * @version 1.0 */ ! public class JCheckBoxMenuItem extends JMenuItem implements SwingConstants, Accessible { //------------------------------------------------------------- // Classes ---------------------------------------------------- --- 37,55 ---- package javax.swing; ! import java.io.IOException; ! import java.io.ObjectOutputStream; ! import javax.accessibility.Accessible; ! import javax.accessibility.AccessibleContext; ! import javax.accessibility.AccessibleRole; /** * JCheckBoxMenuItem * @author Andrew Selkirk * @version 1.0 */ ! public class JCheckBoxMenuItem extends JMenuItem implements SwingConstants, Accessible ! { //------------------------------------------------------------- // Classes ---------------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JColorChooser.java gcc-3.4.0/libjava/javax/swing/JColorChooser.java *** gcc-3.3.3/libjava/javax/swing/JColorChooser.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JColorChooser.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,49 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing; ! // Imports ! import java.awt.*; ! import java.awt.event.*; ! import java.io.*; ! import javax.accessibility.*; ! import javax.swing.colorchooser.*; ! import javax.swing.plaf.*; /** * JColorChooser --- 35,54 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; ! import java.awt.Color; ! import java.awt.Component; ! import java.awt.event.ActionListener; ! import java.io.IOException; ! import java.io.ObjectOutputStream; ! import javax.accessibility.Accessible; ! import javax.accessibility.AccessibleContext; ! import javax.accessibility.AccessibleRole; ! import javax.swing.colorchooser.AbstractColorChooserPanel; ! import javax.swing.colorchooser.ColorSelectionModel; ! import javax.swing.plaf.ColorChooserUI; /** * JColorChooser diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JComboBox.java gcc-3.4.0/libjava/javax/swing/JComboBox.java *** gcc-3.3.3/libjava/javax/swing/JComboBox.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JComboBox.java 2003-10-12 13:20:49.000000000 +0000 *************** this exception to your version of the li *** 35,43 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing; - // Imports import java.awt.*; import java.awt.event.*; import java.beans.*; --- 35,43 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; import java.awt.*; import java.awt.event.*; import java.beans.*; *************** import javax.swing.plaf.*; *** 52,59 **** * @author Andrew Selkirk * @version 1.0 */ ! public class JComboBox extends JComponent implements ItemSelectable, ! ListDataListener, ActionListener, Accessible { //------------------------------------------------------------- // Classes ---------------------------------------------------- --- 52,62 ---- * @author Andrew Selkirk * @version 1.0 */ ! public class JComboBox extends JComponent ! implements ItemSelectable, ListDataListener, ActionListener, Accessible ! { ! private static final long serialVersionUID = 5654585963292734470L; ! //------------------------------------------------------------- // Classes ---------------------------------------------------- *************** public class JComboBox extends JComponen *** 229,235 **** * @param value1 TODO * @returns int */ ! public abstract int selectionForKey(char value0, ComboBoxModel value1); } // KeySelectionManager --- 232,238 ---- * @param value1 TODO * @returns int */ ! int selectionForKey(char value0, ComboBoxModel value1); } // KeySelectionManager *************** public class JComboBox extends JComponen *** 766,771 **** --- 769,775 ---- /** * isFocusTraversable * @returns boolean + * @deprecated */ public boolean isFocusTraversable() { return false; // TODO diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JComponent.java gcc-3.4.0/libjava/javax/swing/JComponent.java *** gcc-3.3.3/libjava/javax/swing/JComponent.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JComponent.java 2003-06-19 16:30:09.000000000 +0000 *************** this exception to your version of the li *** 35,55 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package javax.swing; ! import java.awt.*; ! import java.awt.peer.*; ! import java.awt.event.*; ! import java.io.*; ! ! import javax.swing.event.*; ! import javax.swing.border.*; ! import javax.swing.plaf.*; ! ! import java.util.*; ! import java.beans.*; ! import javax.accessibility.*; /** * Every component in swing inherits from this class (JLabel, JButton, etc). --- 35,77 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ ! package javax.swing; ! import java.awt.AWTEvent; ! import java.awt.Color; ! import java.awt.Component; ! import java.awt.Container; ! import java.awt.Dimension; ! import java.awt.FlowLayout; ! import java.awt.Font; ! import java.awt.Graphics; ! import java.awt.Insets; ! import java.awt.Point; ! import java.awt.Rectangle; ! import java.awt.event.ActionListener; ! import java.awt.event.ContainerEvent; ! import java.awt.event.ContainerListener; ! import java.awt.event.FocusEvent; ! import java.awt.event.FocusListener; ! import java.awt.event.KeyEvent; ! import java.awt.event.MouseEvent; ! import java.awt.peer.LightweightPeer; ! import java.beans.PropertyChangeListener; ! import java.beans.PropertyVetoException; ! import java.beans.VetoableChangeListener; ! import java.io.Serializable; ! import java.util.Vector; ! import java.util.Hashtable; ! import javax.accessibility.Accessible; ! import javax.accessibility.AccessibleContext; ! import javax.accessibility.AccessibleExtendedComponent; ! import javax.accessibility.AccessibleRole; ! import javax.accessibility.AccessibleStateSet; ! import javax.swing.event.AncestorListener; ! import javax.swing.event.EventListenerList; ! import javax.swing.border.Border; ! import javax.swing.plaf.ComponentUI; /** * Every component in swing inherits from this class (JLabel, JButton, etc). *************** import javax.accessibility.*; *** 61,66 **** --- 83,89 ---- */ public abstract class JComponent extends Container implements Serializable { + static final long serialVersionUID = -5242478962609715464L; /** * accessibleContext */ *************** public abstract class JComponent extends *** 92,107 **** * AccessibleFocusHandler */ protected class AccessibleFocusHandler implements FocusListener { - - //------------------------------------------------------------- - // Variables -------------------------------------------------- - //------------------------------------------------------------- - - - //------------------------------------------------------------- - // Initialization --------------------------------------------- - //------------------------------------------------------------- - /** * Constructor AccessibleFocusHandler * @param component TODO --- 115,120 ---- *************** public abstract class JComponent extends *** 110,120 **** // TODO } // AccessibleFocusHandler() - - //------------------------------------------------------------- - // Methods ---------------------------------------------------- - //------------------------------------------------------------- - /** * focusGained * @param event TODO --- 123,128 ---- *************** public abstract class JComponent extends *** 130,153 **** public void focusLost(FocusEvent valevent) { // TODO } // focusLost() - - } // AccessibleFocusHandler /** * AccessibleContainerHandler */ protected class AccessibleContainerHandler implements ContainerListener { - - //------------------------------------------------------------- - // Variables -------------------------------------------------- - //------------------------------------------------------------- - - - //------------------------------------------------------------- - // Initialization --------------------------------------------- - //------------------------------------------------------------- - /** * Constructor AccessibleContainerHandler * @param component TODO --- 138,149 ---- *************** public abstract class JComponent extends *** 156,166 **** // TODO } // AccessibleContainerHandler() - - //------------------------------------------------------------- - // Methods ---------------------------------------------------- - //------------------------------------------------------------- - /** * componentAdded * @param event TODO --- 152,157 ---- *************** public abstract class JComponent extends *** 176,190 **** public void componentRemoved(ContainerEvent valevent) { // TODO } // componentRemoved() - - } // AccessibleContainerHandler - - //------------------------------------------------------------- - // Variables -------------------------------------------------- - //------------------------------------------------------------- - /** * accessibleContainerHandler */ --- 167,174 ---- *************** public abstract class JComponent extends *** 195,205 **** */ protected FocusListener accessibleFocusHandler; - - //------------------------------------------------------------- - // Initialization --------------------------------------------- - //------------------------------------------------------------- - /** * Constructor AccessibleJComponent * @param component TODO --- 179,184 ---- *************** public abstract class JComponent extends *** 209,219 **** // TODO } // AccessibleJComponent() - - //------------------------------------------------------------- - // Methods ---------------------------------------------------- - //------------------------------------------------------------- - /** * addPropertyChangeListener * @param listener TODO --- 188,193 ---- *************** public abstract class JComponent extends *** 303,309 **** //updateUI(); // get a proper ui } - // protected EventListenerList listenerList public boolean contains(int x, int y) { --- 277,282 ---- *************** public abstract class JComponent extends *** 311,324 **** return super.contains(x,y); } - public void addNotify() { //Notification to this component that it now has a parent component. super.addNotify(); } - Hashtable get_prop_hash() { if (prop_hash == null) --- 284,295 ---- *************** public abstract class JComponent extends *** 350,356 **** public void putClientProperty(Object key, Object value) { get_prop_hash().put(key, value); } - public void removeAncestorListener(AncestorListener listener) { get_ancestor_list().removeElement(listener); } --- 321,326 ---- *************** public abstract class JComponent extends *** 381,387 **** //super.computeVisibleRect(rect); } - public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue) { //Reports a bound property change. --- 351,356 ---- *************** public abstract class JComponent extends *** 422,428 **** // Reports a bound property change. } - protected void fireVetoableChange(String propertyName, Object oldValue, Object newValue) { // Support for reporting constrained property changes. --- 391,396 ---- *************** public abstract class JComponent extends *** 634,649 **** } } - - - /********************************************************************* - * - * - * tooltips: - * - * - **************************************/ - public JToolTip createToolTip() { if (tooltip == null) --- 602,607 ---- *************** public abstract class JComponent extends *** 663,677 **** public String getToolTipText(MouseEvent event) { return tool_tip_text; } - /********************************************************************* - * - * - * things to do with visibility: - * - * - **************************************/ - - public Container getTopLevelAncestor() { // Returns the top-level ancestor of this component (either the containing Window or Applet), or null if this component has not been added to any container. --- 621,626 ---- *************** public abstract class JComponent extends *** 929,935 **** // If true this component will automatically scroll its contents when dragged, if contained in a component that supports scrolling, such as JViewport } - public void setDebugGraphicsOptions(int debugOptions) { // Enables or disables diagnostic information about every graphics operation performed within the component or one of its children. --- 878,883 ---- *************** public abstract class JComponent extends *** 953,958 **** --- 901,907 ---- revalidate(); repaint(); } + public void setBackground(Color bg) { super.setBackground(bg); *************** public abstract class JComponent extends *** 1019,1034 **** paint(g); } - - - /****************************************** - * - * - * UI management - * - * - *********/ - public String getUIClassID() { /// Return the UIDefaults key used to look up the name of the swing. --- 968,973 ---- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JDesktopPane.java gcc-3.4.0/libjava/javax/swing/JDesktopPane.java *** gcc-3.3.3/libjava/javax/swing/JDesktopPane.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JDesktopPane.java 2004-01-09 10:18:47.000000000 +0000 *************** *** 1,5 **** /* JDesktopPane.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* JDesktopPane.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,53 **** package javax.swing; ! // Imports ! import java.io.*; ! import javax.accessibility.*; ! import javax.swing.plaf.*; /** * JDesktopPane * @author Andrew Selkirk * @version 1.0 */ ! public class JDesktopPane extends JLayeredPane implements Accessible { //------------------------------------------------------------- // Classes ---------------------------------------------------- --- 37,56 ---- package javax.swing; ! import java.io.IOException; ! import java.io.ObjectOutputStream; ! import javax.accessibility.Accessible; ! import javax.accessibility.AccessibleContext; ! import javax.accessibility.AccessibleRole; ! import javax.swing.plaf.DesktopPaneUI; /** * JDesktopPane * @author Andrew Selkirk * @version 1.0 */ ! public class JDesktopPane extends JLayeredPane implements Accessible ! { //------------------------------------------------------------- // Classes ---------------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JDialog.java gcc-3.4.0/libjava/javax/swing/JDialog.java *** gcc-3.3.3/libjava/javax/swing/JDialog.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JDialog.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,50 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package javax.swing; ! import java.awt.*; ! import java.awt.event.*; import javax.accessibility.Accessible; import javax.accessibility.AccessibleContext; - import javax.accessibility.AccessibleRole; - import javax.accessibility.AccessibleState; - import javax.accessibility.AccessibleStateSet; /** * Unlike JComponent derivatives, JDialog inherits from --- 35,55 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ ! package javax.swing; + import java.awt.BorderLayout; + import java.awt.Component; + import java.awt.Container; + import java.awt.Dialog; + import java.awt.Dimension; + import java.awt.Frame; + import java.awt.Graphics; + import java.awt.LayoutManager; + import java.awt.event.KeyEvent; + import java.awt.event.WindowEvent; import javax.accessibility.Accessible; import javax.accessibility.AccessibleContext; /** * Unlike JComponent derivatives, JDialog inherits from diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JEditorPane.java gcc-3.4.0/libjava/javax/swing/JEditorPane.java *** gcc-3.3.3/libjava/javax/swing/JEditorPane.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JEditorPane.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,49 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing; ! import java.io.*; ! import java.net.*; ! import javax.swing.text.*; ! import javax.swing.event.*; ! import java.awt.event.*; ! import java.awt.*; ! import javax.accessibility.*; public class JEditorPane extends JTextComponent { --- 35,53 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; ! import java.awt.Dimension; ! import java.awt.event.KeyEvent; ! import java.io.InputStream; ! import java.net.URL; ! import javax.accessibility.AccessibleContext; ! import javax.swing.text.EditorKit; ! import javax.swing.text.JTextComponent; ! import javax.swing.text.PlainEditorKit; ! import javax.swing.event.HyperlinkEvent; ! import javax.swing.event.HyperlinkListener; public class JEditorPane extends JTextComponent { diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JFileChooser.java gcc-3.4.0/libjava/javax/swing/JFileChooser.java *** gcc-3.3.3/libjava/javax/swing/JFileChooser.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JFileChooser.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,51 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing; ! // Imports ! import java.awt.*; ! import java.awt.event.*; ! import java.io.*; ! import java.util.*; ! import javax.accessibility.*; ! import javax.swing.filechooser.*; import javax.swing.filechooser.FileFilter; ! import javax.swing.plaf.*; /** * JFileChooser --- 35,56 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; ! import java.awt.Component; ! import java.awt.event.ActionListener; ! import java.io.File; ! import java.io.IOException; ! import java.io.ObjectOutputStream; ! import java.util.Vector; ! import javax.accessibility.Accessible; ! import javax.accessibility.AccessibleContext; ! import javax.accessibility.AccessibleRole; import javax.swing.filechooser.FileFilter; ! import javax.swing.filechooser.FileSystemView; ! import javax.swing.filechooser.FileView; ! import javax.swing.plaf.FileChooserUI; /** * JFileChooser diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JFormattedTextField.java gcc-3.4.0/libjava/javax/swing/JFormattedTextField.java *** gcc-3.3.3/libjava/javax/swing/JFormattedTextField.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JFormattedTextField.java 2003-06-11 13:20:39.000000000 +0000 *************** *** 0 **** --- 1,231 ---- + /* JFormattedTextField.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package javax.swing; + + import java.awt.event.FocusEvent; + import java.io.Serializable; + import java.text.Format; + import java.text.ParseException; + import javax.swing.text.Document; + import javax.swing.text.DocumentFilter; + import javax.swing.text.NavigationFilter; + + /** + * @author Michael Koch + * @since 1.4 + */ + public class JFormattedTextField extends JTextField + { + public abstract static class AbstractFormatter implements Serializable + { + public AbstractFormatter () + { + //Do nothing here. + } + + protected Object clone () + { + throw new InternalError ("not implemented"); + } + + protected Action[] getActions () + { + throw new InternalError ("not implemented"); + } + + protected DocumentFilter getDocumentFilter () + { + throw new InternalError ("not implemented"); + } + + protected JFormattedTextField getFormattedTextField () + { + throw new InternalError ("not implemented"); + } + + protected NavigationFilter getNavigationFilter () + { + throw new InternalError ("not implemented"); + } + + public void install (JFormattedTextField ftf) + { + throw new InternalError ("not implemented"); + } + + public void uninstall () + { + throw new InternalError ("not implemented"); + } + + protected void invalidEdit () + { + throw new InternalError ("not implemented"); + } + + protected void setEditValid () + { + throw new InternalError ("not implemented"); + } + + public abstract Object stringToValue (String text); + + public abstract String valueToString (Object value); + } + + public abstract static class AbstractFormatterFactory + { + public AbstractFormatterFactory () + { + // Do nothing here. + } + + public abstract AbstractFormatter getFormatter (JFormattedTextField tf); + } + + public static final int COMMIT = 0; + public static final int COMMIT_OR_REVERT = 1; + public static final int REVERT = 2; + public static final int PERSIST = 3; + + public JFormattedTextField () + { + throw new InternalError ("not implemented"); + } + + public JFormattedTextField (Format format) + { + throw new InternalError ("not implemented"); + } + + public JFormattedTextField (AbstractFormatter formatter) + { + throw new InternalError ("not implemented"); + } + + public JFormattedTextField (AbstractFormatterFactory factory) + { + throw new InternalError ("not implemented"); + } + + public JFormattedTextField (AbstractFormatterFactory factory, Object value) + { + throw new InternalError ("not implemented"); + } + + public JFormattedTextField (Object value) + { + throw new InternalError ("not implemented"); + } + + public void commitEdit () + { + throw new InternalError ("not implemented"); + } + + public Action[] getActions () + { + throw new InternalError ("not implemented"); + } + + public int getFocusLostBehaviour () + { + throw new InternalError ("not implemented"); + } + + public AbstractFormatter getFormatter () + { + throw new InternalError ("not implemented"); + } + + public AbstractFormatterFactory getFormatterFactory () + { + throw new InternalError ("not implemented"); + } + + public String getUIClassID () + { + throw new InternalError ("not implemented"); + } + + public Object getValue () + { + throw new InternalError ("not implemented"); + } + + protected void invalidEdit () + { + throw new InternalError ("not implemented"); + } + + public boolean isEditValid () + { + throw new InternalError ("not implemented"); + } + + protected void processFocusEvent (FocusEvent evt) + { + throw new InternalError ("not implemented"); + } + + public void setDocument (Document document) + { + throw new InternalError ("not implemented"); + } + + public void setLostFocusBehavior (int behavior) + { + throw new InternalError ("not implemented"); + } + + protected void setFormatter (AbstractFormatter formatter) + { + throw new InternalError ("not implemented"); + } + + public void setFormatterFactory (AbstractFormatterFactory factory) + { + throw new InternalError ("not implemented"); + } + + public void setValue (Object value) + { + throw new InternalError ("not implemented"); + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JFrame.java gcc-3.4.0/libjava/javax/swing/JFrame.java *** gcc-3.3.3/libjava/javax/swing/JFrame.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JFrame.java 2003-11-22 00:03:35.000000000 +0000 *************** this exception to your version of the li *** 35,49 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package javax.swing; ! import java.awt.*; ! import java.awt.event.*; import javax.accessibility.AccessibleContext; - import javax.accessibility.AccessibleRole; - import javax.accessibility.AccessibleState; - import javax.accessibility.AccessibleStateSet; /** * Unlike JComponent derivatives, JFrame inherits from --- 35,54 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ ! package javax.swing; + import java.awt.BorderLayout; + import java.awt.Component; + import java.awt.Container; + import java.awt.Dimension; + import java.awt.Frame; + import java.awt.Graphics; + import java.awt.GraphicsConfiguration; + import java.awt.LayoutManager; + import java.awt.event.KeyEvent; + import java.awt.event.WindowEvent; import javax.accessibility.AccessibleContext; /** * Unlike JComponent derivatives, JFrame inherits from *************** public class JFrame extends Frame *** 144,150 **** JRootPane createRootPane() { return new JRootPane(); } ! Container getContentPane() { return getRootPane().getContentPane(); } void setContentPane(Container contentPane) --- 149,155 ---- JRootPane createRootPane() { return new JRootPane(); } ! public Container getContentPane() { return getRootPane().getContentPane(); } void setContentPane(Container contentPane) diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JInternalFrame.java gcc-3.4.0/libjava/javax/swing/JInternalFrame.java *** gcc-3.3.3/libjava/javax/swing/JInternalFrame.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JInternalFrame.java 2003-06-19 16:30:09.000000000 +0000 *************** this exception to your version of the li *** 35,45 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing; ! /** ! * STUBBED ! */ public class JInternalFrame extends JComponent /*implements Accessible, WindowConstants, RootPaneContainer*/ { } // class JInternalFrame --- 35,61 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; ! ! import java.awt.Component; ! import java.awt.Container; ! import javax.accessibility.Accessible; ! public class JInternalFrame extends JComponent /*implements Accessible, WindowConstants, RootPaneContainer*/ { + private static final long serialVersionUID = -5425177187760785402L; + + public static final String CONTENT_PANE_PROPERTY = "contentPane"; + public static final String MENU_BAR_PROPERTY = "JMenuBar"; + public static final String TITLE_PROPERTY = "title"; + public static final String LAYERED_PANE_PROPERTY = "layeredPane"; + public static final String ROOT_PANE_PROPERTY = "rootPane"; + public static final String GLASS_PANE_PROPERTY = "glassPane"; + public static final String FRAME_ICON_PROPERTY = "frameIcon"; + public static final String IS_SELECTED_PROPERTY = "selected"; + public static final String IS_CLOSED_PROPERTY = "closed"; + public static final String IS_MAXIMUM_PROPERTY = "maximum"; + public static final String IS_ICON_PROPERTY = "icon"; } // class JInternalFrame diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JLabel.java gcc-3.4.0/libjava/javax/swing/JLabel.java *** gcc-3.3.3/libjava/javax/swing/JLabel.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JLabel.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,53 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package javax.swing; - - import java.awt.*; - import javax.swing.plaf.*; import javax.accessibility.AccessibleContext; ! import javax.accessibility.AccessibleRole; ! import javax.accessibility.AccessibleState; ! import javax.accessibility.AccessibleStateSet; ! ! public class JLabel extends JComponent implements SwingConstants { String text; Icon icon; --- 35,50 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; + import java.awt.Component; + import java.awt.Image; + import javax.accessibility.Accessible; import javax.accessibility.AccessibleContext; ! import javax.swing.plaf.LabelUI; ! public class JLabel extends JComponent implements Accessible, SwingConstants { String text; Icon icon; diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JLayeredPane.java gcc-3.4.0/libjava/javax/swing/JLayeredPane.java *** gcc-3.3.3/libjava/javax/swing/JLayeredPane.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JLayeredPane.java 2004-01-09 22:52:18.000000000 +0000 *************** *** 1,5 **** /* JLayeredPane.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* JLayeredPane.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,58 **** package javax.swing; ! import java.awt.*; ! public class JLayeredPane extends JComponent { - JLayeredPane() - { - } ! protected void addImpl(Component comp, Object constraints, int index) ! { ! super.addImpl(comp, constraints, index); ! comp.validate(); ! comp.repaint(); ! } ! } --- 37,575 ---- package javax.swing; ! import java.awt.Component; ! import java.util.Hashtable; ! import java.util.Iterator; ! import java.util.Map; ! import java.util.TreeMap; ! import javax.accessibility.Accessible; ! /** ! *

                The "Layered Pane" is a container which divides its children into 6 (or ! * more) disjoint sets. the pre-defined sets are:

                ! * ! *
                  ! *
                • "Frame Content"
                • ! *
                • "Default"
                • ! *
                • "Palette"
                • ! *
                • "Modal"
                • ! *
                • "Popup"
                • ! *
                • "Drag"
                • ! *
                ! * ! *

                A child is in exactly one of these layers at any time, though there may ! * be other layers if someone creates them.

                ! * ! *

                The purpose of this class is to translate this view of "layers" into a ! * contiguous array of components: the one held in our ancestor, ! * {@link java.awt.Container}.

                ! * ! *

                There is a precise set of words we will use to refer to numbers within ! * this class:

                ! * ! *
                ! *
                Component Index:
                ! *
                An offset into the component array held in our ancestor, ! * {@link java.awt.Container}, from [0 .. component.length). The drawing ! * rule with indices is that 0 is drawn last.
                ! * ! *
                Layer Number:
                ! *
                A general int specifying a layer within this component. Negative ! * numbers are drawn first, then layer 0, then positive numbered layers, in ! * ascending order.
                ! * ! *
                Position:
                ! *
                An offset into a layer's "logical drawing order". Layer position 0 ! * is drawn last. Layer position -1 is a synonym for the first layer ! * position (the logical "bottom").
                ! * ! *

                Note: the layer numbering order is the reverse of the ! * component indexing and position order

                ! * ! * @author Graydon Hoare ! */ ! ! public class JLayeredPane extends JComponent implements Accessible { + public static String LAYER_PROPERTY = "LAYER_PROPERTY"; + + public static Integer FRAME_CONTENT_LAYER = new Integer (-30000); + + public static Integer DEFAULT_LAYER = new Integer (0); + public static Integer PALETTE_LAYER = new Integer (100); + public static Integer MODAL_LAYER = new Integer (200); + public static Integer POPUP_LAYER = new Integer (300); + public static Integer DRAG_LAYER = new Integer (400); + + TreeMap layers; // Layer Number (Integer) -> Layer Size (Integer) + Hashtable componentToLayer; // Component -> Layer Number (Integer) + + JLayeredPane() + { + layers = new TreeMap (); + componentToLayer = new Hashtable (); + } + + + /** + * Looks up the layer a child component is currently assigned to. + * + * @param c the component to look up. + * @return the layer the component is currently assigned to, in this container. + * @throws IllegalArgumentException if the component is not a child of this container. + */ + + protected Integer getLayer (Component c) + { + if (! componentToLayer.containsKey (c)) + throw new IllegalArgumentException (); + return (Integer) componentToLayer.get (c); + } + + /** + *

                Returns a pair of ints representing a half-open interval + * [top, bottom), which is the range of component indices + * the provided layer number corresponds to.

                + * + *

                Note that "bottom" is not included in the interval of + * component indices in this layer: a layer with 0 elements in it has + * ret[0] == ret[1].

                + * + * @param layer the layer to look up. + * @return the half-open range of indices this layer spans. + * @throws IllegalArgumentException if layer does not refer to an active layer + * in this container. + */ + + protected int[] layerToRange (Integer layer) + { + int[] ret = new int[2]; + ret[1] = getComponents ().length; + Iterator i = layers.entrySet ().iterator (); + while (i.hasNext()) + { + Map.Entry pair = (Map.Entry) i.next(); + Integer layerNum = (Integer) pair.getKey (); + Integer layerSz = (Integer) pair.getValue (); + if (layerNum == layer) + { + ret[0] = ret[1] - layerSz.intValue (); + return ret; + } + else + { + ret[1] -= layerSz.intValue (); + } + } + // should have found the layer during iteration + throw new IllegalArgumentException (); + } + + /** + * Increments the recorded size of a given layer. + * + * @param layer the layer number to increment. + * @see #incrLayer() + */ + + protected void incrLayer(Integer layer) + { + int sz = 1; + if (layers.containsKey (layer)) + sz += ((Integer)(layers.get (layer))).intValue (); + layers.put (layer, new Integer(sz)); + } + + /** + * Decrements the recorded size of a given layer. + * + * @param layer the layer number to decrement. + * @see #decrLayer() + */ + + protected void decrLayer(Integer layer) + { + int sz = 0; + if (layers.containsKey (layer)) + sz = ((Integer)(layers.get (layer))).intValue () - 1; + layers.put (layer, new Integer(sz)); + } + + /** + * Return the greatest layer number currently in use, in this container. + * This number may legally be positive or negative. + * + * @return the least layer number. + * @see #lowestLayer() + */ + + public int highestLayer() + { + if (layers.size() == 0) + return 0; + return ((Integer)(layers.lastKey ())).intValue (); + } + + /** + * Return the least layer number currently in use, in this container. + * This number may legally be positive or negative. + * + * @return the least layer number. + * @see #highestLayer() + */ ! public int lowestLayer() ! { ! if (layers.size() == 0) ! return 0; ! return ((Integer)(layers.firstKey ())).intValue (); ! } ! ! /** ! * Moves a component to the "front" of its layer. The "front" is a ! * synonym for position 0, which is also the last position drawn in each ! * layer, so is usually the component which occludes the most other ! * components in its layer. ! * ! * @param c the component to move to the front of its layer. ! * @throws IllegalArgumentException if the component is not a child of ! * this container. ! * @see #moveToBack() ! */ ! ! public void moveToFront(Component c) ! { ! setPosition (c, 0); ! } ! ! /** ! *

                Moves a component to the "back" of its layer. The "back" is a ! * synonym for position N-1 (also known as position -1), where N is the ! * size of the layer.

                ! * ! *

                The "back" of a layer is the first position drawn, so the component at ! * the "back" is usually the component which is occluded by the most ! * other components in its layer.

                ! * ! * @param c the component to move to the back of its layer. ! * @throws IllegalArgumentException if the component is not a child of ! * this container. ! * @see #moveToFront() ! */ ! ! public void moveToBack(Component c) ! { ! setPosition (c, -1); ! } ! ! /** ! * Return the position of a component within its layer. Positions are assigned ! * from the "front" (position 0) to the "back" (position N-1), and drawn from ! * the back towards the front. ! * ! * @param c the component to get the position of. ! * @throws IllegalArgumentException if the component is not a child of ! * this container. ! * @see #setPosition() ! */ ! ! public int getPosition(Component c) ! { ! Integer layer = getLayer (c); ! int[] range = layerToRange (layer); ! int top = range[0]; ! int bot = range[1]; ! Component[] comps = getComponents (); ! for (int i = top; i < bot; ++i) ! { ! if (comps[i] == c) ! return i - top; ! } ! // should have found it ! throw new IllegalArgumentException (); ! } ! ! /** ! * Change the position of a component within its layer. Positions are assigned ! * from the "front" (position 0) to the "back" (position N-1), and drawn from ! * the back towards the front. ! * ! * @param c the component to change the position of. ! * @param position the position to assign the component to. ! * @throws IllegalArgumentException if the component is not a child of ! * this container. ! * @see #getPosition() ! */ ! ! public void setPosition(Component c, int position) ! { ! Integer layer = getLayer (c); ! int[] range = layerToRange (layer); ! if (range[0] == range[1]) ! throw new IllegalArgumentException (); ! ! int top = range[0]; ! int bot = range[1]; ! if (position == -1) ! position = (bot - top) - 1; ! int targ = top + position; ! int curr = -1; ! ! Component[] comps = getComponents(); ! for (int i = top; i < bot; ++i) ! { ! if (comps[i] == c) ! { ! curr = i; ! break; ! } ! } ! if (curr == -1) ! // should have found it ! throw new IllegalArgumentException (); ! ! super.swapComponents (curr, targ); ! validate(); ! repaint(); ! } ! ! /** ! * Return an array of all components within a layer of this ! * container. Components are ordered front-to-back, with the "front" ! * element (which draws last) at position 0 of the returned array. ! * ! * @param layer the layer to return components from. ! * @return the components in the layer. ! */ ! ! public Component[] getComponentsInLayer(int layer) ! { ! int[] range = layerToRange (getObjectForLayer (layer)); ! if (range[0] == range[1]) ! return new Component[0]; ! else ! { ! Component[] comps = getComponents (); ! int sz = range[1] - range[0]; ! Component[] nc = new Component[sz]; ! for (int i = 0; i < sz; ++i) ! nc[i] = comps[range[0] + i]; ! return nc; ! } ! } ! ! /** ! * Return the number of components within a layer of this ! * container. ! * ! * @param layer the layer count components in. ! * @return the number of components in the layer. ! */ ! ! public int getComponentCountInLayer(int layer) ! { ! int[] range = layerToRange (getObjectForLayer (layer)); ! if (range[0] == range[1]) ! return 0; ! else ! return (range[1] - range[0]); ! } ! ! /** ! * Return a hashtable mapping child components of this container to ! * Integer objects representing the component's layer assignments. ! */ ! ! protected Hashtable getComponentToLayer() ! { ! return componentToLayer; ! } ! ! /** ! * Return the index of a component within the underlying (contiguous) ! * array of children. This is a "raw" number which does not represent the ! * child's position in a layer, but rather its position in the logical ! * drawing order of all children of the container. ! * ! * @param c the component to look up. ! * @return the external index of the component. ! * @throws IllegalArgumentException if the component is not a child of ! * this container. ! */ ! ! public int getIndexOf(Component c) ! { ! Integer layer = getLayer (c); ! int[] range = layerToRange (layer); ! Component[] comps = getComponents(); ! for (int i = range[0]; i < range[1]; ++i) ! { ! if (comps[i] == c) ! return i; ! } ! // should have found the component during iteration ! throw new IllegalArgumentException (); ! } ! ! /** ! * Return an Integer object which holds the same int value as the ! * parameter. This is strictly an optimization to minimize the number of ! * identical Integer objects which we allocate. ! * ! * @param layer the layer number as an int. ! * @return the layer number as an Integer, possibly shared. ! */ ! ! protected Integer getObjectForLayer(int layer) ! { ! switch (layer) ! { ! case -30000: ! return FRAME_CONTENT_LAYER; ! ! case 0: ! return DEFAULT_LAYER; ! ! case 100: ! return PALETTE_LAYER; ! ! case 200: ! return MODAL_LAYER; ! ! case 300: ! return POPUP_LAYER; ! ! case 400: ! return DRAG_LAYER; ! ! default: ! break; ! } ! ! return new Integer(layer); ! } ! ! /** ! * Computes an index at which to request the superclass {@link ! * java.awt.Container} inserts a component, given an abstract layer and ! * position number. ! * ! * @param layer the layer in which to insert a component. ! * @param position the position in the layer at which to insert a component. ! * @return the index at which to insert the component. ! */ ! ! protected int insertIndexForLayer(int layer, int position) ! { ! ! Integer lobj = getObjectForLayer (layer); ! if (! layers.containsKey(lobj)) ! layers.put (lobj, new Integer (0)); ! int[] range = layerToRange (lobj); ! if (range[0] == range[1]) ! return range[0]; ! int top = range[0]; ! int bot = range[1]; ! ! if (position == -1 || position > (bot - top)) ! return bot; ! else ! return top + position; ! } ! ! /** ! * Removes a child from this container. The child is specified by ! * index. After removal, the child no longer occupies a layer. ! * ! * @param index the index of the child component to remove. ! */ ! public void remove (int index) ! { ! Component c = getComponent (index); ! Integer layer = getLayer (c); ! decrLayer (layer); ! componentToLayer.remove (c); ! super.remove (index); ! } ! ! /** ! * Removes a child from this container. The child is specified directly. ! * After removal, the child no longer occupies a layer. ! * ! * @param comp the child to remove. ! */ ! ! public void remove (Component comp) ! { ! remove (getIndexOf (comp)); ! } ! ! /** ! *

                Set the layer property for a component, within this container. The ! * component will be implicitly mapped to the bottom-most position in the ! * layer, but only if added after calling this method.

                ! * ! *

                Read that carefully: this method should be called before the ! * component is added to the container.

                ! * ! * @param c the component to set the layer property for. ! * @param layer the layer number to assign to the component. ! */ ! ! public void setLayer(Component c, int layer) ! { ! componentToLayer.put (c, getObjectForLayer (layer)); ! } ! ! /** ! * Set the layer and position of a component, within this container. ! * ! * @param c the child component to set the layer property for. ! * @param layer the layer number to assign to the component. ! * @param position the position number to assign to the component. ! */ ! ! public void setLayer(Component c, ! int layer, ! int position) ! { ! componentToLayer.put (c, getObjectForLayer (layer)); ! setPosition(c, position); ! validate(); ! repaint(); ! } ! ! /** ! * Overrides the default implementation from {@link java.awt.Container} ! * such that layerConstraint is interpreted as an {@link ! * Integer}, specifying the layer to which the component will be added ! * (at the bottom position). ! * ! * @param comp the component to add. ! * @param layerConstraint an integer specifying the layer to add the component to. ! * @param index an ignored parameter, for compatibility. ! */ ! ! protected void addImpl(Component comp, Object layerConstraint, int index) ! { ! Integer layer; ! if (layerConstraint != null && layerConstraint instanceof Integer) ! layer = (Integer) layerConstraint; ! else if (componentToLayer.containsKey (comp)) ! layer = (Integer) componentToLayer.remove (comp); ! else ! layer = DEFAULT_LAYER; ! ! int newIdx = insertIndexForLayer(layer.intValue (), -1); ! ! componentToLayer.put (comp, layer); ! incrLayer (layer); ! ! super.addImpl(comp, null, newIdx); ! validate(); ! repaint(); ! } } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JList.java gcc-3.4.0/libjava/javax/swing/JList.java *** gcc-3.3.3/libjava/javax/swing/JList.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JList.java 2003-06-11 13:20:39.000000000 +0000 *************** *** 1,5 **** /* JList.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* JList.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,55 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package javax.swing; - - import javax.swing.event.*; - - import java.awt.*; - import javax.swing.plaf.*; - import java.util.*; import javax.accessibility.AccessibleContext; ! import javax.accessibility.AccessibleRole; ! import javax.accessibility.AccessibleState; ! import javax.accessibility.AccessibleStateSet; ! public class JList extends JComponent implements Scrollable { Color select_back, select_fore; ListCellRenderer render; --- 35,55 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; + import java.awt.Color; + import java.awt.Dimension; + import java.awt.Rectangle; + import java.util.Vector; + import javax.accessibility.Accessible; import javax.accessibility.AccessibleContext; ! import javax.swing.event.ListDataEvent; ! import javax.swing.event.ListDataListener; ! import javax.swing.event.ListSelectionListener; ! import javax.swing.plaf.ListUI; ! public class JList extends JComponent implements Accessible, Scrollable { Color select_back, select_fore; ListCellRenderer render; *************** public class JList extends JComponent im *** 143,156 **** public void setListData(final Vector listData) { ! // XXX - FIXME Don't also name this AL, workaround for gcj 3.1. ! class ALData extends AbstractListModel { public int getSize() { return listData.size(); } public Object getElementAt(int i) { return listData.elementAt(i); } }; ! setModel (new ALData()); } --- 143,155 ---- public void setListData(final Vector listData) { ! class AL extends AbstractListModel { public int getSize() { return listData.size(); } public Object getElementAt(int i) { return listData.elementAt(i); } }; ! setModel (new AL()); } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JMenuBar.java gcc-3.4.0/libjava/javax/swing/JMenuBar.java *** gcc-3.3.3/libjava/javax/swing/JMenuBar.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JMenuBar.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,42 **** --- 35,48 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; + import java.awt.Component; + import java.awt.event.KeyEvent; + import java.awt.event.MouseEvent; + import javax.accessibility.Accessible; + public class JMenuBar extends JComponent { JMenuBar() diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JMenuItem.java gcc-3.4.0/libjava/javax/swing/JMenuItem.java *** gcc-3.3.3/libjava/javax/swing/JMenuItem.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JMenuItem.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,50 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing; ! // Imports ! import java.awt.*; ! import java.awt.event.*; ! import java.beans.*; ! import java.io.*; ! import javax.accessibility.*; ! import javax.swing.event.*; ! import javax.swing.plaf.*; /** * JMenuItem --- 35,60 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; ! import java.awt.Component; ! import java.awt.event.KeyEvent; ! import java.awt.event.MouseEvent; ! import java.beans.PropertyChangeListener; ! import java.io.IOException; ! import java.io.ObjectInputStream; ! import java.io.ObjectOutputStream; ! import javax.accessibility.Accessible; ! import javax.accessibility.AccessibleContext; ! import javax.accessibility.AccessibleRole; ! import javax.swing.event.ChangeEvent; ! import javax.swing.event.ChangeListener; ! import javax.swing.event.MenuDragMouseEvent; ! import javax.swing.event.MenuDragMouseListener; ! import javax.swing.event.MenuKeyEvent; ! import javax.swing.event.MenuKeyListener; ! import javax.swing.plaf.MenuItemUI; /** * JMenuItem diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JMenu.java gcc-3.4.0/libjava/javax/swing/JMenu.java *** gcc-3.3.3/libjava/javax/swing/JMenu.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JMenu.java 2004-01-09 10:18:47.000000000 +0000 *************** *** 1,5 **** /* JMenu.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* JMenu.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,57 **** package javax.swing; ! // Imports ! import java.awt.*; ! import java.awt.event.*; ! import java.beans.*; ! import java.io.*; ! import java.util.*; ! import javax.accessibility.*; ! import javax.swing.event.*; /** * JMenu * @author Andrew Selkirk * @version 1.0 */ ! public class JMenu extends JMenuItem implements Accessible, MenuElement { //------------------------------------------------------------- // Classes ---------------------------------------------------- --- 37,70 ---- package javax.swing; ! import java.awt.Component; ! import java.awt.Point; ! import java.awt.event.KeyEvent; ! import java.awt.event.WindowAdapter; ! import java.awt.event.WindowEvent; ! import java.beans.PropertyChangeListener; ! import java.io.IOException; ! import java.io.ObjectOutputStream; ! import java.io.Serializable; ! import java.util.Hashtable; ! import javax.accessibility.Accessible; ! import javax.accessibility.AccessibleContext; ! import javax.accessibility.AccessibleRole; ! import javax.accessibility.AccessibleSelection; ! import javax.swing.event.MenuEvent; ! import javax.swing.event.MenuListener; ! import javax.swing.event.ChangeListener; /** * JMenu * @author Andrew Selkirk * @version 1.0 */ ! public class JMenu ! extends JMenuItem ! implements Accessible, MenuElement ! { ! static final long serialVersionUID = 4227225638931828014L; //------------------------------------------------------------- // Classes ---------------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JOptionPane.java gcc-3.4.0/libjava/javax/swing/JOptionPane.java *** gcc-3.3.3/libjava/javax/swing/JOptionPane.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JOptionPane.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,48 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing; ! import java.awt.*; ! import javax.swing.plaf.*; import javax.accessibility.AccessibleContext; ! import javax.accessibility.AccessibleRole; ! import javax.accessibility.AccessibleState; ! import javax.accessibility.AccessibleStateSet; public class JOptionPane extends JComponent { --- 35,50 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; ! import java.awt.BorderLayout; ! import java.awt.Component; ! import java.awt.Dialog; ! import java.awt.Frame; ! import javax.accessibility.Accessible; import javax.accessibility.AccessibleContext; ! import javax.swing.plaf.OptionPaneUI; public class JOptionPane extends JComponent { diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JPanel.java gcc-3.4.0/libjava/javax/swing/JPanel.java *** gcc-3.3.3/libjava/javax/swing/JPanel.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JPanel.java 2004-01-09 10:18:47.000000000 +0000 *************** *** 1,5 **** /* JPanel.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* JPanel.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,56 **** package javax.swing; ! import java.awt.*; ! import javax.swing.plaf.*; ! import javax.accessibility.AccessibleContext; ! import javax.accessibility.AccessibleRole; ! import javax.accessibility.AccessibleState; ! import javax.accessibility.AccessibleStateSet; /** * An instance of JPanel can be added to a panel, frame etc * * @author Ronald Veldema (rveldema@cs.vu.nl) */ ! public class JPanel extends JComponent { public JPanel() { --- 37,55 ---- package javax.swing; ! import java.awt.FlowLayout; ! import java.awt.LayoutManager; ! import javax.accessibility.Accessible; import javax.accessibility.AccessibleContext; ! import javax.swing.plaf.PanelUI; ! /** * An instance of JPanel can be added to a panel, frame etc * * @author Ronald Veldema (rveldema@cs.vu.nl) */ ! public class JPanel extends JComponent implements Accessible { public JPanel() { diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JPasswordField.java gcc-3.4.0/libjava/javax/swing/JPasswordField.java *** gcc-3.3.3/libjava/javax/swing/JPasswordField.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JPasswordField.java 2004-01-09 10:18:47.000000000 +0000 *************** *** 1,5 **** /* JPasswordField.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* JPasswordField.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,46 **** package javax.swing; ! // Imports ! import java.io.*; ! import javax.accessibility.*; ! import javax.swing.text.*; /** * JPasswordField --- 37,48 ---- package javax.swing; ! import java.io.IOException; ! import java.io.ObjectOutputStream; ! import javax.accessibility.AccessibleContext; ! import javax.accessibility.AccessibleRole; ! import javax.swing.text.BadLocationException; ! import javax.swing.text.Document; /** * JPasswordField *************** public class JPasswordField extends JTex *** 218,223 **** --- 220,226 ---- /** * getText * @returns String + * @deprecated */ public String getText() { return null; // TODO *************** public class JPasswordField extends JTex *** 229,234 **** --- 232,238 ---- * @param length TODO * @exception BadLocationException TODO * @returns String + * @deprecated */ public String getText(int offset, int length) throws BadLocationException { return null; // TODO diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JPopupMenu.java gcc-3.4.0/libjava/javax/swing/JPopupMenu.java *** gcc-3.3.3/libjava/javax/swing/JPopupMenu.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JPopupMenu.java 2004-01-09 10:18:47.000000000 +0000 *************** *** 1,5 **** /* JPopupMenu.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* JPopupMenu.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,57 **** package javax.swing; ! // Imports ! import java.awt.*; ! import java.awt.event.*; ! import java.beans.*; ! import java.io.*; ! import javax.accessibility.*; ! import javax.swing.event.*; ! import javax.swing.plaf.*; /** * JPopupMenu * @author Andrew Selkirk * @version 1.0 */ ! public class JPopupMenu extends JComponent implements Accessible, MenuElement { //------------------------------------------------------------- // Classes ---------------------------------------------------- --- 37,65 ---- package javax.swing; ! import java.awt.Component; ! import java.awt.Dimension; ! import java.awt.Graphics; ! import java.awt.Insets; ! import java.awt.event.KeyEvent; ! import java.awt.event.MouseEvent; ! import java.beans.PropertyChangeListener; ! import java.io.IOException; ! import java.io.ObjectInputStream; ! import java.io.ObjectOutputStream; ! import javax.accessibility.Accessible; ! import javax.accessibility.AccessibleContext; ! import javax.accessibility.AccessibleRole; ! import javax.swing.event.PopupMenuListener; ! import javax.swing.plaf.PopupMenuUI; /** * JPopupMenu * @author Andrew Selkirk * @version 1.0 */ ! public class JPopupMenu extends JComponent implements Accessible, MenuElement ! { //------------------------------------------------------------- // Classes ---------------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JProgressBar.java gcc-3.4.0/libjava/javax/swing/JProgressBar.java *** gcc-3.3.3/libjava/javax/swing/JProgressBar.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JProgressBar.java 2004-01-09 10:18:47.000000000 +0000 *************** *** 1,5 **** /* JProgressBar.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* JProgressBar.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,55 **** package javax.swing; ! // Imports ! import java.awt.*; ! import java.io.*; ! import javax.accessibility.*; ! import javax.swing.event.*; ! import javax.swing.plaf.*; /** * JProgressBar * @author Andrew Selkirk * @version 1.0 */ ! public class JProgressBar extends JComponent implements SwingConstants, Accessible { //------------------------------------------------------------- // Classes ---------------------------------------------------- --- 37,61 ---- package javax.swing; ! import java.awt.Graphics; ! import java.io.IOException; ! import java.io.ObjectOutputStream; ! import javax.accessibility.Accessible; ! import javax.accessibility.AccessibleContext; ! import javax.accessibility.AccessibleRole; ! import javax.accessibility.AccessibleStateSet; ! import javax.accessibility.AccessibleValue; ! import javax.swing.event.ChangeEvent; ! import javax.swing.event.ChangeListener; ! import javax.swing.plaf.ProgressBarUI; /** * JProgressBar * @author Andrew Selkirk * @version 1.0 */ ! public class JProgressBar extends JComponent implements SwingConstants, Accessible ! { //------------------------------------------------------------- // Classes ---------------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JRadioButton.java gcc-3.4.0/libjava/javax/swing/JRadioButton.java *** gcc-3.3.3/libjava/javax/swing/JRadioButton.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JRadioButton.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,46 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing; ! import java.awt.*; ! import java.awt.event.*; ! import javax.swing.plaf.*; ! import javax.accessibility.*; public class JRadioButton extends JToggleButton { --- 35,44 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; ! import javax.accessibility.AccessibleContext; public class JRadioButton extends JToggleButton { diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JRadioButtonMenuItem.java gcc-3.4.0/libjava/javax/swing/JRadioButtonMenuItem.java *** gcc-3.3.3/libjava/javax/swing/JRadioButtonMenuItem.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JRadioButtonMenuItem.java 2004-01-10 21:07:43.000000000 +0000 *************** *** 1,5 **** /* JRadioButtonMenuItem.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* JRadioButtonMenuItem.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,52 **** package javax.swing; ! // Imports ! import java.io.*; ! import javax.accessibility.*; /** * JRadioButtonMenuItem * @author Andrew Selkirk * @version 1.0 */ ! public class JRadioButtonMenuItem extends JMenuItem implements Accessible { //------------------------------------------------------------- // Classes ---------------------------------------------------- --- 37,55 ---- package javax.swing; ! import java.io.IOException; ! import java.io.ObjectOutputStream; ! import javax.accessibility.Accessible; ! import javax.accessibility.AccessibleContext; ! import javax.accessibility.AccessibleRole; /** * JRadioButtonMenuItem * @author Andrew Selkirk * @version 1.0 */ ! public class JRadioButtonMenuItem extends JMenuItem implements Accessible ! { //------------------------------------------------------------- // Classes ---------------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JRootPane.java gcc-3.4.0/libjava/javax/swing/JRootPane.java *** gcc-3.3.3/libjava/javax/swing/JRootPane.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JRootPane.java 2003-11-22 00:03:35.000000000 +0000 *************** this exception to your version of the li *** 35,49 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package javax.swing; ! import java.awt.*; ! import java.awt.event.*; ! import javax.accessibility.AccessibleContext; ! import javax.accessibility.AccessibleRole; ! import javax.accessibility.AccessibleState; ! import javax.accessibility.AccessibleStateSet; /** * This class is where JComponents are added to. --- 35,52 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ ! package javax.swing; ! import java.awt.BorderLayout; ! import java.awt.Component; ! import java.awt.Container; ! import java.awt.Dimension; ! import java.awt.LayoutManager; ! import java.awt.LayoutManager2; ! import java.io.Serializable; ! import javax.accessibility.Accessible; ! import javax.accessibility.AccessibleComponent; /** * This class is where JComponents are added to. *************** public class JRootPane extends JComponen *** 116,122 **** public void setContentPane(Container p) { contentPane = p; ! getLayeredPane().add(contentPane, 0); } protected void addImpl(Component comp, --- 119,125 ---- public void setContentPane(Container p) { contentPane = p; ! getLayeredPane().add(contentPane, JLayeredPane.FRAME_CONTENT_LAYER); } protected void addImpl(Component comp, diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JScrollBar.java gcc-3.4.0/libjava/javax/swing/JScrollBar.java *** gcc-3.3.3/libjava/javax/swing/JScrollBar.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JScrollBar.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,42 **** --- 35,46 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; + import java.awt.Adjustable; + import java.awt.event.AdjustmentListener; + import javax.accessibility.Accessible; public class JScrollBar extends JComponent { diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JScrollPane.java gcc-3.4.0/libjava/javax/swing/JScrollPane.java *** gcc-3.3.3/libjava/javax/swing/JScrollPane.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JScrollPane.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,47 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package javax.swing; ! import java.awt.*; ! import javax.swing.plaf.*; ! public class JScrollPane extends JComponent { protected JViewport columnHeader; protected JViewport rowHeader; --- 35,48 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ ! package javax.swing; + import java.awt.Component; + import javax.accessibility.Accessible; + import javax.swing.plaf.ScrollPaneUI; ! public class JScrollPane extends JComponent implements Accessible, ScrollPaneConstants { protected JViewport columnHeader; protected JViewport rowHeader; diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JSeparator.java gcc-3.4.0/libjava/javax/swing/JSeparator.java *** gcc-3.3.3/libjava/javax/swing/JSeparator.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JSeparator.java 2004-01-10 21:07:43.000000000 +0000 *************** *** 1,5 **** /* JSeparator.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* JSeparator.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,46 **** package javax.swing; ! // Imports ! import java.io.*; ! import javax.accessibility.*; ! import javax.swing.plaf.*; /** * JSeparator --- 37,48 ---- package javax.swing; ! import java.io.IOException; ! import java.io.ObjectOutputStream; ! import javax.accessibility.Accessible; ! import javax.accessibility.AccessibleContext; ! import javax.accessibility.AccessibleRole; ! import javax.swing.plaf.SeparatorUI; /** * JSeparator *************** import javax.swing.plaf.*; *** 48,54 **** * @version 1.0 */ public class JSeparator extends JComponent ! implements SwingConstants, Accessible { //------------------------------------------------------------- // Classes ---------------------------------------------------- --- 50,57 ---- * @version 1.0 */ public class JSeparator extends JComponent ! implements SwingConstants, Accessible ! { //------------------------------------------------------------- // Classes ---------------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JSlider.java gcc-3.4.0/libjava/javax/swing/JSlider.java *** gcc-3.3.3/libjava/javax/swing/JSlider.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JSlider.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,55 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing; ! // Imports ! import java.io.*; ! import java.util.*; ! import javax.accessibility.*; ! import javax.swing.event.*; ! import javax.swing.plaf.*; /** * JSlider * @author Andrew Selkirk * @version 1.0 */ ! public class JSlider extends JComponent implements SwingConstants, Accessible { //------------------------------------------------------------- // Classes ---------------------------------------------------- --- 35,67 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; ! import java.io.IOException; ! import java.io.ObjectOutputStream; ! import java.io.Serializable; ! import java.util.Dictionary; ! import java.util.Hashtable; ! import javax.accessibility.Accessible; ! import javax.accessibility.AccessibleContext; ! import javax.accessibility.AccessibleRole; ! import javax.accessibility.AccessibleStateSet; ! import javax.accessibility.AccessibleValue; ! import javax.swing.event.ChangeEvent; ! import javax.swing.event.ChangeListener; ! import javax.swing.plaf.SliderUI; /** * JSlider * @author Andrew Selkirk * @version 1.0 */ ! public class JSlider ! extends JComponent ! implements SwingConstants, Accessible ! { ! static final long serialVersionUID = -1441275936141218479L; //------------------------------------------------------------- // Classes ---------------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JSplitPane.java gcc-3.4.0/libjava/javax/swing/JSplitPane.java *** gcc-3.3.3/libjava/javax/swing/JSplitPane.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JSplitPane.java 2004-01-10 21:07:43.000000000 +0000 *************** *** 1,5 **** /* JSplitPane.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* JSplitPane.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,47 **** package javax.swing; ! // Imports ! import java.awt.*; ! import java.io.*; ! import javax.accessibility.*; ! import javax.swing.plaf.*; /** * JSplitPane --- 37,52 ---- package javax.swing; ! import java.awt.Component; ! import java.awt.Graphics; ! import java.io.IOException; ! import java.io.ObjectOutputStream; ! import javax.accessibility.Accessible; ! import javax.accessibility.AccessibleContext; ! import javax.accessibility.AccessibleRole; ! import javax.accessibility.AccessibleStateSet; ! import javax.accessibility.AccessibleValue; ! import javax.swing.plaf.SplitPaneUI; /** * JSplitPane diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JTabbedPane.java gcc-3.4.0/libjava/javax/swing/JTabbedPane.java *** gcc-3.3.3/libjava/javax/swing/JTabbedPane.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JTabbedPane.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,53 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package javax.swing; - - import java.util.*; - import javax.swing.plaf.*; - import java.awt.*; import javax.accessibility.AccessibleContext; ! import javax.accessibility.AccessibleRole; ! import javax.accessibility.AccessibleState; ! import javax.accessibility.AccessibleStateSet; ! public class JTabbedPane extends JComponent { class Tab { --- 35,52 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; + import java.awt.Component; + import java.util.Vector; + import javax.accessibility.Accessible; import javax.accessibility.AccessibleContext; ! import javax.swing.event.ChangeEvent; ! import javax.swing.event.ChangeListener; ! import javax.swing.plaf.TabbedPaneUI; ! public class JTabbedPane extends JComponent implements Accessible, SwingConstants { class Tab { diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JTable.java gcc-3.4.0/libjava/javax/swing/JTable.java *** gcc-3.3.3/libjava/javax/swing/JTable.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JTable.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,46 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing; ! /** ! * STUBBED ! */ public class JTable extends JComponent ! /*implements TableModelListener, Scrollable, TableColumnModelListener, ! ListSelectionListener, CellEditorListener, Accessible*/ { } // class JTable --- 35,210 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; ! ! import java.awt.Color; ! import java.awt.Component; ! import java.awt.Dimension; ! import java.awt.Rectangle; ! import java.util.Hashtable; ! import java.util.Vector; ! import javax.accessibility.Accessible; ! import javax.swing.event.ChangeEvent; ! import javax.swing.event.CellEditorListener; ! import javax.swing.event.ListSelectionEvent; ! import javax.swing.event.ListSelectionListener; ! import javax.swing.event.TableColumnModelEvent; ! import javax.swing.event.TableColumnModelListener; ! import javax.swing.event.TableModelEvent; ! import javax.swing.event.TableModelListener; ! import javax.swing.table.JTableHeader; ! import javax.swing.table.TableModel; ! import javax.swing.table.TableCellEditor; ! import javax.swing.table.TableColumnModel; ! public class JTable extends JComponent ! implements TableModelListener, Scrollable, TableColumnModelListener, ! ListSelectionListener, CellEditorListener, Accessible { + public static final int AUTO_RESIZE_ALL_COLUMNS = 4; + public static final int AUTO_RESIZE_LAST_COLUMN = 3; + public static final int AUTO_RESIZE_NEXT_COLUMN = 1; + public static final int AUTO_RESIZE_OFF = 0; + public static final int AUTO_RESIZE_SUBSEQUENT_COLUMNS = 2; + + public JTable () + { + throw new Error ("Not implemented"); + } + + public JTable (int numRows, int numColumns) + { + throw new Error ("Not implemented"); + } + + public JTable (Object[][] rowData, Object[] columnNames) + { + throw new Error ("Not implemented"); + } + + public JTable (TableModel dm) + { + throw new Error ("Not implemented"); + } + + public JTable (TableModel dm, TableColumnModel cm) + { + throw new Error ("Not implemented"); + } + + public JTable (TableModel dm, TableColumnModel cm, ListSelectionModel sm) + { + throw new Error ("Not implemented"); + } + + public JTable (Vector rowData, Vector columnNames) + { + throw new Error ("Not implemented"); + } + + public void columnAdded (TableColumnModelEvent event) + { + throw new Error ("Not implemented"); + } + + public void columnMarginChanged (ChangeEvent event) + { + throw new Error ("Not implemented"); + } + + public void columnMoved (TableColumnModelEvent event) + { + throw new Error ("Not implemented"); + } + + public void columnRemoved (TableColumnModelEvent event) + { + throw new Error ("Not implemented"); + } + + public void columnSelectionChanged (ListSelectionEvent event) + { + throw new Error ("Not implemented"); + } + + public void editingCanceled (ChangeEvent event) + { + throw new Error ("Not implemented"); + } + + public void editingStopped (ChangeEvent event) + { + throw new Error ("Not implemented"); + } + + public TableColumnModel getColumnModel () + { + throw new Error ("Not implemented"); + } + + public Dimension getPreferredScrollableViewportSize () + { + throw new Error ("Not implemented"); + } + + public int getScrollableBlockIncrement (Rectangle visibleRect, int orientation, int direction) + { + throw new Error ("Not implemented"); + } + + public boolean getScrollableTracksViewportHeight () + { + throw new Error ("Not implemented"); + } + + public boolean getScrollableTracksViewportWidth () + { + throw new Error ("Not implemented"); + } + + public int getScrollableUnitIncrement (Rectangle visibleRect, int orientation, int direction) + { + throw new Error ("Not implemented"); + } + + public int getSelectedRow () + { + throw new Error ("Not implemented"); + } + + public ListSelectionModel getSelectionModel () + { + throw new Error ("Not implemented"); + } + + public void tableChanged (TableModelEvent event) + { + throw new Error ("Not implemented"); + } + + public void setModel (TableModel model) + { + throw new Error ("Not implemented"); + } + + public void setSelectionMode (int selectionMode) + { + throw new Error ("Not implemented"); + } + + public void setSelectionModel (ListSelectionModel model) + { + throw new Error ("Not implemented"); + } + + public void setShowGrid (boolean showGrid) + { + throw new Error ("Not implemented"); + } + + public void valueChanged (ListSelectionEvent event) + { + throw new Error ("Not implemented"); + } } // class JTable diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JTextField.java gcc-3.4.0/libjava/javax/swing/JTextField.java *** gcc-3.3.3/libjava/javax/swing/JTextField.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JTextField.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,46 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package javax.swing; ! import java.awt.event.*; ! import java.util.*; ! import javax.accessibility.*; public class JTextField extends JEditorPane { --- 35,48 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ ! package javax.swing; ! import java.awt.event.ActionListener; ! import java.util.Vector; ! import javax.accessibility.AccessibleStateSet; ! import javax.swing.text.Document; ! import javax.swing.text.JTextComponent; public class JTextField extends JEditorPane { diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JTextPane.java gcc-3.4.0/libjava/javax/swing/JTextPane.java *** gcc-3.3.3/libjava/javax/swing/JTextPane.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JTextPane.java 2004-01-10 21:07:43.000000000 +0000 *************** *** 1,5 **** /* JTextPane.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* JTextPane.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,46 **** package javax.swing; ! // Imports ! import java.awt.*; ! import java.io.*; ! import javax.swing.text.*; /** * JTextPane --- 37,52 ---- package javax.swing; ! import java.awt.Component; ! import java.io.IOException; ! import java.io.ObjectOutputStream; ! import javax.swing.text.AttributeSet; ! import javax.swing.text.Document; ! import javax.swing.text.EditorKit; ! import javax.swing.text.MutableAttributeSet; ! import javax.swing.text.Style; ! import javax.swing.text.StyledDocument; ! import javax.swing.text.StyledEditorKit; /** * JTextPane diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JToggleButton.java gcc-3.4.0/libjava/javax/swing/JToggleButton.java *** gcc-3.3.3/libjava/javax/swing/JToggleButton.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JToggleButton.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,48 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing; ! import java.awt.*; ! import java.awt.event.*; ! import javax.swing.plaf.*; ! import javax.accessibility.*; ! public class JToggleButton extends AbstractButton { public JToggleButton() { --- 35,48 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; ! import javax.accessibility.Accessible; ! import javax.accessibility.AccessibleContext; ! import javax.swing.plaf.ButtonUI; ! public class JToggleButton extends AbstractButton implements Accessible { public JToggleButton() { diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JToolBar.java gcc-3.4.0/libjava/javax/swing/JToolBar.java *** gcc-3.3.3/libjava/javax/swing/JToolBar.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JToolBar.java 2004-01-10 21:07:43.000000000 +0000 *************** *** 1,5 **** /* JToolBar.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* JToolBar.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,48 **** package javax.swing; ! // Imports ! import java.awt.*; ! import java.beans.*; ! import java.io.*; ! import javax.accessibility.*; ! import javax.swing.plaf.*; /** * JToolBar --- 37,55 ---- package javax.swing; ! import java.awt.Dimension; ! import java.awt.Component; ! import java.awt.Container; ! import java.awt.Graphics; ! import java.awt.Insets; ! import java.beans.PropertyChangeListener; ! import java.io.IOException; ! import java.io.ObjectOutputStream; ! import javax.accessibility.Accessible; ! import javax.accessibility.AccessibleContext; ! import javax.accessibility.AccessibleRole; ! import javax.accessibility.AccessibleStateSet; ! import javax.swing.plaf.ToolBarUI; /** * JToolBar *************** import javax.swing.plaf.*; *** 50,56 **** * @version 1.0 */ public class JToolBar extends JComponent ! implements SwingConstants, Accessible { //------------------------------------------------------------- // Classes ---------------------------------------------------- --- 57,64 ---- * @version 1.0 */ public class JToolBar extends JComponent ! implements SwingConstants, Accessible ! { //------------------------------------------------------------- // Classes ---------------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JToolTip.java gcc-3.4.0/libjava/javax/swing/JToolTip.java *** gcc-3.3.3/libjava/javax/swing/JToolTip.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JToolTip.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,46 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package javax.swing; ! import java.awt.*; ! public class JToolTip extends JComponent { String text; --- 35,47 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ ! package javax.swing; + import javax.accessibility.Accessible; + import javax.accessibility.AccessibleContext; ! public class JToolTip extends JComponent implements Accessible { String text; diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JTree.java gcc-3.4.0/libjava/javax/swing/JTree.java *** gcc-3.3.3/libjava/javax/swing/JTree.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JTree.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,45 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing; ! import java.awt.*; ! import javax.swing.plaf.*; ! import javax.accessibility.*; public class JTree extends JComponent implements Scrollable, Accessible { --- 35,62 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; ! import java.awt.Dimension; ! import java.awt.Rectangle; ! import java.io.Serializable; ! import java.util.Hashtable; ! import java.util.Vector; ! import javax.accessibility.Accessible; ! import javax.accessibility.AccessibleContext; ! import javax.swing.event.TreeModelEvent; ! import javax.swing.event.TreeModelListener; ! import javax.swing.event.TreeSelectionEvent; ! import javax.swing.event.TreeSelectionListener; ! import javax.swing.plaf.TreeUI; ! import javax.swing.tree.DefaultTreeSelectionModel; ! import javax.swing.tree.TreeCellEditor; ! import javax.swing.tree.TreeCellRenderer; ! import javax.swing.tree.TreeModel; ! import javax.swing.tree.TreeNode; ! import javax.swing.tree.TreePath; ! import javax.swing.tree.TreeSelectionModel; public class JTree extends JComponent implements Scrollable, Accessible { diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JViewport.java gcc-3.4.0/libjava/javax/swing/JViewport.java *** gcc-3.3.3/libjava/javax/swing/JViewport.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JViewport.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,45 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package javax.swing; ! import javax.swing.plaf.*; ! import java.awt.*; public class JViewport extends JComponent { --- 35,51 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ ! package javax.swing; + import java.awt.Component; + import java.awt.Container; + import java.awt.Graphics; + import java.awt.Image; + import java.awt.Point; + import java.awt.Rectangle; + import javax.accessibility.Accessible; + import javax.swing.plaf.ViewportUI; public class JViewport extends JComponent { diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/JWindow.java gcc-3.4.0/libjava/javax/swing/JWindow.java *** gcc-3.3.3/libjava/javax/swing/JWindow.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/JWindow.java 2003-06-27 12:41:52.000000000 +0000 *************** *** 1,5 **** /* JWindow.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* JWindow.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,45 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing; ! import java.awt.*; ! import java.awt.event.*; ! import javax.accessibility.*; /** * Unlike JComponent derivatives, JWindow inherits from --- 35,56 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; ! import java.awt.BorderLayout; ! import java.awt.Component; ! import java.awt.Container; ! import java.awt.Dimension; ! import java.awt.Frame; ! import java.awt.Graphics; ! import java.awt.GraphicsConfiguration; ! import java.awt.LayoutManager; ! import java.awt.Window; ! import java.awt.event.KeyEvent; ! import java.awt.event.WindowEvent; ! import javax.accessibility.Accessible; ! import javax.accessibility.AccessibleContext; /** * Unlike JComponent derivatives, JWindow inherits from *************** public class JWindow extends Window impl *** 67,72 **** --- 78,88 ---- * *************/ + public JWindow() + { + this(null); + } + // huuu ? public JWindow(Frame f) { diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/KeyStroke.java gcc-3.4.0/libjava/javax/swing/KeyStroke.java *** gcc-3.3.3/libjava/javax/swing/KeyStroke.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/KeyStroke.java 2003-06-11 13:20:39.000000000 +0000 *************** exception statement from your version. * *** 37,52 **** package javax.swing; ! // Imports ! import java.awt.event.*; ! import java.io.*; /** * KeyStroke * @author Andrew Selkirk * @version 1.0 */ ! public class KeyStroke implements Serializable { //------------------------------------------------------------- // Variables -------------------------------------------------- --- 37,54 ---- package javax.swing; ! import java.awt.AWTKeyStroke; ! import java.awt.event.KeyEvent; ! import java.io.Serializable; /** * KeyStroke * @author Andrew Selkirk * @version 1.0 */ ! public class KeyStroke implements Serializable ! { ! static final long serialVersionUID = -9060180771037902530L; //------------------------------------------------------------- // Variables -------------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/ListCellRenderer.java gcc-3.4.0/libjava/javax/swing/ListCellRenderer.java *** gcc-3.3.3/libjava/javax/swing/ListCellRenderer.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/ListCellRenderer.java 2004-01-10 21:07:43.000000000 +0000 *************** *** 1,5 **** /* ListCellRenderer.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ListCellRenderer.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,47 **** package javax.swing; ! import java.awt.*; public interface ListCellRenderer { ! public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, --- 37,47 ---- package javax.swing; ! import java.awt.Component; public interface ListCellRenderer { ! Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/ListModel.java gcc-3.4.0/libjava/javax/swing/ListModel.java *** gcc-3.3.3/libjava/javax/swing/ListModel.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/ListModel.java 2004-01-10 21:07:43.000000000 +0000 *************** *** 1,5 **** /* ListModel.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ListModel.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,43 **** package javax.swing; ! import javax.swing.event.*; public interface ListModel { --- 37,43 ---- package javax.swing; ! import javax.swing.event.ListDataListener; public interface ListModel { diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/ListSelectionModel.java gcc-3.4.0/libjava/javax/swing/ListSelectionModel.java *** gcc-3.3.3/libjava/javax/swing/ListSelectionModel.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/ListSelectionModel.java 2003-10-12 13:20:49.000000000 +0000 *************** this exception to your version of the li *** 35,50 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package javax.swing; ! import javax.swing.event.*; public interface ListSelectionModel { ! final static int SINGLE_SELECTION = 0; ! final static int SINGLE_INTERVAL_SELECTION = 1; ! final static int MULTIPLE_INTERVAL_SELECTION = 1; void setSelectionMode(int a); int getSelectionMode(); --- 35,50 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; ! import javax.swing.event.ListSelectionListener; public interface ListSelectionModel { ! int SINGLE_SELECTION = 0; ! int SINGLE_INTERVAL_SELECTION = 1; ! int MULTIPLE_INTERVAL_SELECTION = 1; void setSelectionMode(int a); int getSelectionMode(); diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/LookAndFeel.java gcc-3.4.0/libjava/javax/swing/LookAndFeel.java *** gcc-3.3.3/libjava/javax/swing/LookAndFeel.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/LookAndFeel.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,43 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing; ! import javax.swing.text.*; public abstract class LookAndFeel { --- 35,45 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; ! import java.awt.Component; ! import javax.swing.text.JTextComponent; public abstract class LookAndFeel { diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/MenuElement.java gcc-3.4.0/libjava/javax/swing/MenuElement.java *** gcc-3.3.3/libjava/javax/swing/MenuElement.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/MenuElement.java 2004-01-10 21:07:43.000000000 +0000 *************** *** 1,5 **** /* MenuElement.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* MenuElement.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,45 **** package javax.swing; ! // Imports ! import java.awt.*; ! import java.awt.event.*; /** * MenuElement --- 37,45 ---- package javax.swing; ! import java.awt.Component; ! import java.awt.event.KeyEvent; ! import java.awt.event.MouseEvent; /** * MenuElement *************** public interface MenuElement { *** 58,64 **** * @param path TODO * @param manager TODO */ ! public void processMouseEvent(MouseEvent event, MenuElement[] path, MenuSelectionManager manager); /** --- 58,64 ---- * @param path TODO * @param manager TODO */ ! void processMouseEvent(MouseEvent event, MenuElement[] path, MenuSelectionManager manager); /** *************** public interface MenuElement { *** 67,92 **** * @param path TODO * @param manager TODO */ ! public abstract void processKeyEvent(KeyEvent event, MenuElement[] path, MenuSelectionManager manager); /** * menuSelectionChanged * @param included TODO */ ! public abstract void menuSelectionChanged(boolean included); /** * getSubElements * @returns MenuElement[] */ ! public abstract MenuElement[] getSubElements(); /** * getComponent * @returns Component */ ! public abstract Component getComponent(); } // MenuElement --- 67,92 ---- * @param path TODO * @param manager TODO */ ! void processKeyEvent(KeyEvent event, MenuElement[] path, MenuSelectionManager manager); /** * menuSelectionChanged * @param included TODO */ ! void menuSelectionChanged(boolean included); /** * getSubElements * @returns MenuElement[] */ ! MenuElement[] getSubElements(); /** * getComponent * @returns Component */ ! Component getComponent(); } // MenuElement diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/MenuSelectionManager.java gcc-3.4.0/libjava/javax/swing/MenuSelectionManager.java *** gcc-3.3.3/libjava/javax/swing/MenuSelectionManager.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/MenuSelectionManager.java 2003-06-19 16:30:09.000000000 +0000 *************** this exception to your version of the li *** 35,44 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing; ! /** ! * STUBBED ! */ public class MenuSelectionManager { } // class MenuSelectionManager --- 35,76 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; ! ! import javax.swing.event.ChangeEvent; ! import javax.swing.event.ChangeListener; ! import javax.swing.event.EventListenerList; ! public class MenuSelectionManager { + protected ChangeEvent changeEvent; + + protected EventListenerList listenerList = new EventListenerList (); + + protected void fireStateChanged () + { + ChangeListener[] listeners = getChangeListeners (); + + for (int i = 0; i < listeners.length; i++) + { + listeners [i].stateChanged (new ChangeEvent (this)); + } + } + + public void addChangeListener (ChangeListener listener) + { + listenerList.add (ChangeListener.class, listener); + } + + public void removeChangeListener (ChangeListener listener) + { + listenerList.remove (ChangeListener.class, listener); + } + + /** @since 1.4 */ + public ChangeListener[] getChangeListeners () + { + return (ChangeListener[]) listenerList.getListeners (ChangeListener.class); + } } // class MenuSelectionManager diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/MutableComboBoxModel.java gcc-3.4.0/libjava/javax/swing/MutableComboBoxModel.java *** gcc-3.3.3/libjava/javax/swing/MutableComboBoxModel.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/MutableComboBoxModel.java 2003-10-12 13:20:49.000000000 +0000 *************** public interface MutableComboBoxModel ex *** 52,77 **** * addElement * @param object TODO */ ! public void addElement(Object object); /** * removeElementAt * @param index TODO */ ! public void removeElementAt(int index); /** * insertElementAt * @param object TODO * @param index TODO */ ! public void insertElementAt(Object object, int index); /** * removeElement * @param object TODO */ ! public void removeElement(Object object); } // MutableComboBoxModel --- 52,77 ---- * addElement * @param object TODO */ ! void addElement(Object object); /** * removeElementAt * @param index TODO */ ! void removeElementAt(int index); /** * insertElementAt * @param object TODO * @param index TODO */ ! void insertElementAt(Object object, int index); /** * removeElement * @param object TODO */ ! void removeElement(Object object); } // MutableComboBoxModel diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/OverlayLayout.java gcc-3.4.0/libjava/javax/swing/OverlayLayout.java *** gcc-3.3.3/libjava/javax/swing/OverlayLayout.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/OverlayLayout.java 2004-01-10 21:07:43.000000000 +0000 *************** *** 1,5 **** /* OverlayLayout.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* OverlayLayout.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,52 **** package javax.swing; ! // Imports ! import java.awt.*; ! import java.io.*; /** * OverlayLayout * @author Andrew Selkirk * @version 1.0 */ ! public class OverlayLayout implements LayoutManager2, Serializable { //------------------------------------------------------------- // Variables -------------------------------------------------- --- 37,57 ---- package javax.swing; ! import java.awt.Component; ! import java.awt.Container; ! import java.awt.Dimension; ! import java.awt.LayoutManager2; ! import java.io.Serializable; /** * OverlayLayout * @author Andrew Selkirk * @version 1.0 */ ! public class OverlayLayout ! implements LayoutManager2, Serializable ! { ! static final long serialVersionUID = 18082829169631543L; //------------------------------------------------------------- // Variables -------------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/ActionMapUIResource.java gcc-3.4.0/libjava/javax/swing/plaf/ActionMapUIResource.java *** gcc-3.3.3/libjava/javax/swing/plaf/ActionMapUIResource.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/ActionMapUIResource.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,5 **** /* ActionMapUIResource.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ActionMapUIResource.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,62 **** package javax.swing.plaf; ! // Imports ! import javax.swing.*; /** ! * ActionMapUIResource ! * @author Andrew Selkirk ! * @version 1.0 */ ! public class ActionMapUIResource extends ActionMap implements UIResource { ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Constructor ActionMapUIResource ! */ ! public ActionMapUIResource() { ! // TODO ! } // ActionMapUIResource() ! ! ! } // ActionMapUIResource --- 37,64 ---- package javax.swing.plaf; ! import javax.swing.ActionMap; ! /** ! * An ActionMap that implements the {@link UIResource} ! * interface to indicate that it belongs to a pluggable ! * LookAndFeel. ! * ! * @see javax.swing.ActionMap ! * ! * @author Andrew Selkirk ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public class ActionMapUIResource ! extends ActionMap ! implements UIResource ! { ! /** ! * Constructs a new ActionMapUIResource. ! */ ! public ActionMapUIResource() ! { ! /* The constructor does nothing. */ ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicBorders.java gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicBorders.java *** gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicBorders.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicBorders.java 2003-08-01 20:10:22.000000000 +0000 *************** *** 1,42 **** package javax.swing.plaf.basic; import java.awt.Color; /** ! * STUBBED */ public class BasicBorders { public static class ButtonBorder { ! } // class ButtonBorder public static class FieldBorder { public FieldBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight) { } ! } // class FieldBorder public static class MarginBorder { ! } // class MarginBorder public static class MenuBarBorder { public MenuBarBorder(Color shadow, Color highlight) { } ! } // class MenuBarBorder public static class RadioButtonBorder { ! } // class RadioButtonBorder public static class RolloverButtonBorder { ! } // class RolloverButtonBorder public static class SplitPaneBorder { public SplitPaneBorder(Color highlight, Color shadow) { } ! } // class SplitPaneBorder public static class ToggleButtonBorder { ! } // class ToggleButtonBorder ! } // class BasicBorders --- 1,1815 ---- + /* BasicBorders.java + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.swing.plaf.basic; + import java.awt.Color; + import java.awt.Component; + import java.awt.Graphics; + import java.awt.Insets; + import java.awt.Rectangle; + import java.io.Serializable; + import javax.swing.AbstractButton; + import javax.swing.ButtonModel; + import javax.swing.JButton; + import javax.swing.JPopupMenu; + import javax.swing.JSplitPane; + import javax.swing.JToolBar; + import javax.swing.UIDefaults; + import javax.swing.UIManager; + import javax.swing.border.AbstractBorder; + import javax.swing.border.BevelBorder; + import javax.swing.border.Border; + import javax.swing.plaf.UIResource; + import javax.swing.plaf.BorderUIResource; + import javax.swing.text.JTextComponent; + + /** ! * Provides various borders for the Basic look and feel. ! * ! * @author Sascha Brawer (brawer@dandelis.ch) */ public class BasicBorders { + /** + * A MarginBorder that gets shared by multiple components. + * Created on demand by the private helper function {@link + * #getMarginBorder()}. + */ + private static MarginBorder sharedMarginBorder; + + + /** + * Returns a border for drawing push buttons. + * + *

                The colors of the border are retrieved from the + * UIDefaults of the currently active look and feel + * using the keys “Button.shadow”, + * “Button.darkShadow”, + * “Button.light”, and + * “Button.highlight”. + * + *

                [A screen shot of the returned border] + * + * @return a {@link + * javax.swing.plaf.BorderUIResource#CompoundBorderUIResource} + * whose outer border is a {@link #ButtonBorder} and whose + * inner border is a {@link #MarginBorder}. + */ + public static Border getButtonBorder() + { + UIDefaults defaults; + Border outer; + + defaults = UIManager.getLookAndFeelDefaults(); + + /* The keys for UIDefaults have been determined by writing a + * test program that dumps the UIDefaults to stdout; that program + * was run on a JDK 1.4.1_01 for GNU/Linux. Note that in the API, + * the key "light" is usually called "highlight", and "highlight" + * is usually called "lightHighlight". + */ + outer = new ButtonBorder(defaults.getColor("Button.shadow"), + defaults.getColor("Button.darkShadow"), + defaults.getColor("Button.light"), + defaults.getColor("Button.highlight")); + + /* While the inner border is shared between multiple buttons, + * we do not share the outer border because ButtonBorders store + * their border colors. We cannot guarantee that the colors + * (which come from UIDefaults) are unchanged between invocations + * of getButtonBorder. We could store the last colors, and share + * the button border if the colors are the same as in the last + * invocation, but it probably is not worth the effort. + */ + return new BorderUIResource.CompoundBorderUIResource( + outer, + /* inner */ getMarginBorder()); + } + + + /** + * Returns a border for drawing radio buttons. + * + *

                The colors of the border are retrieved from the + * UIDefaults of the currently active look and feel + * using the keys “RadioButton.shadow”, + * “RadioButton.darkShadow”, + * “RadioButton.light”, and + * “RadioButton.highlight”. + * + *

                [A screen shot of the returned border] + * + * @return a {@link + * javax.swing.plaf.BorderUIResource#CompoundBorderUIResource} + * whose outer border is a {@link #RadioButtonBorder} and whose + * inner border is a {@link #MarginBorder}. + */ + public static Border getRadioButtonBorder() + { + UIDefaults defaults; + Border outer; + + defaults = UIManager.getLookAndFeelDefaults(); + + /* The keys for UIDefaults have been determined by writing a + * test program that dumps the UIDefaults to stdout; that program + * was run on a JDK 1.4.1_01 for GNU/Linux. Note that in the API, + * the key "light" is usually called "highlight", and "highlight" + * is usually called "lightHighlight". + */ + outer = new RadioButtonBorder( + defaults.getColor("RadioButton.shadow"), + defaults.getColor("RadioButton.darkShadow"), + defaults.getColor("RadioButton.light"), + defaults.getColor("RadioButton.highlight")); + + /* While the inner border is shared between multiple buttons, we + * do not share the outer border because RadioButtonBorders, being + * ButtonBorders, store their border colors. We cannot guarantee + * that the colors (which come from UIDefaults) are unchanged + * between invocations of getButtonBorder. We could store the last + * colors, and share the button border if the colors are the same + * as in the last invocation, but it probably is not worth the + * effort. + */ + return new BorderUIResource.CompoundBorderUIResource( + outer, + /* inner */ getMarginBorder()); + } + + + /** + * Returns a border for drawing toggle buttons. + * + *

                The colors of the border are retrieved from the + * UIDefaults of the currently active look and feel + * using the keys “ToggleButton.shadow”, + * “ToggleButton.darkShadow”, + * “ToggleButton.light”, and + * “ToggleButton.highlight”. + * + *

                [A screen shot of the returned border] + * + * @return a {@link + * javax.swing.plaf.BorderUIResource#CompoundBorderUIResource} + * whose outer border is a {@link #ToggleButtonBorder} and whose + * inner border is a {@link #MarginBorder}. + */ + public static Border getToggleButtonBorder() + { + UIDefaults defaults; + Border outer; + + defaults = UIManager.getLookAndFeelDefaults(); + + /* The keys for UIDefaults have been determined by writing a + * test program that dumps the UIDefaults to stdout; that program + * was run on a JDK 1.4.1_01 for GNU/Linux. Note that in the API, + * the key "light" is usually called "highlight", and "highlight" + * is usually called "lightHighlight". + */ + outer = new ToggleButtonBorder( + defaults.getColor("ToggleButton.shadow"), + defaults.getColor("ToggleButton.darkShadow"), + defaults.getColor("ToggleButton.light"), + defaults.getColor("ToggleButton.highlight")); + + /* While the inner border is shared between multiple buttons, we + * do not share the outer border because ToggleButtonBorders, being + * ButtonBorders, store their border colors. We cannot guarantee + * that the colors (which come from UIDefaults) are unchanged + * between invocations of getButtonBorder. We could store the last + * colors, and share the button border if the colors are the same + * as in the last invocation, but it probably is not worth the + * effort. + */ + return new BorderUIResource.CompoundBorderUIResource( + outer, + /* inner */ getMarginBorder()); + } + + + /** + * Returns a border for drawing a two-pixel thick separator line + * below menu bars. + * + *

                The colors of the border are retrieved from the + * UIDefaults of the currently active look and feel + * using the keys “MenuBar.shadow” and + * “MenuBar.highlight”. + * + *

                [A screen shot of a JMenuBar with this border] + * + * @return a {@link #MenuBarBorder}. + * + * @see javax.swing.JMenuBar + */ + public static Border getMenuBarBorder() + { + UIDefaults defaults; + + /* See comment in methods above for why this border is not shared. */ + defaults = UIManager.getLookAndFeelDefaults(); + return new MenuBarBorder(defaults.getColor("MenuBar.shadow"), + defaults.getColor("MenuBar.highlight")); + } + + + /** + * Returns a border for drawing a one-pixel thick border around + * split panes that are interrupted where the divider joins the + * border. + * + *

                The colors of the border are retrieved from the + * UIDefaults of the currently active look and feel + * using the keys “SplitPane.darkShadow” and + * “SplitPane.highlight”. + * + *

                [A screen shot for JSplitPane.HORIZONTAL_SPLIT] + * + *

                [A screen shot for JSplitPane.VERTICAL_SPLIT] + * + * @return a {@link #SplitPaneBorder}. + * + * @see javax.swing.JSplitPane + * @see #getSplitPaneDividerBorder() + */ + public static Border getSplitPaneBorder() + { + UIDefaults defaults; + + /* See comment in methods above for why this border is not shared. */ + defaults = UIManager.getLookAndFeelDefaults(); + return new SplitPaneBorder(defaults.getColor("SplitPane.highlight"), + defaults.getColor("SplitPane.darkShadow")); + } + + + /** + * Returns a border for drawing a one-pixel thick border around + * the divider of split panes. + * + *

                The colors of the edges that are adjacent to the child components + * of the JSplitPane are retrieved from the + * UIDefaults of the currently active look and feel + * using the keys “SplitPane.darkShadow” and + * “SplitPane.highlight”. The color of the + * other two edges is the background color of the divider. + * + *

                + + * + * @return an instance of SplitPaneDividerBorder, which is + * not a public API class of this package. + * + * @see javax.swing.JSplitPane + * @see javax.swing.plaf.basic.BasicSplitPaneDivider + * @see #getSplitPaneBorder() + * + * @since 1.3 + */ + public static Border getSplitPaneDividerBorder() + { + UIDefaults defaults; + + /* See comment in methods above for why this border is not shared. */ + defaults = UIManager.getLookAndFeelDefaults(); + return new SplitPaneDividerBorder( + defaults.getColor("SplitPane.highlight"), + defaults.getColor("SplitPane.darkShadow")); + } + + + /** + * Returns a border for drawing a border around a text field + * that makes the field appear as etched into the surface. + * + *

                The colors of the border are retrieved from the + * UIDefaults of the currently active look and feel + * using the keys “TextField.shadow”, + * “TextField.darkShadow”, + * “TextField.light”, and + * “TextField.highlight”. + * + *

                [A screen shot of a border returned by
+    * this method] + * + * @return an instance of + * {@link javax.swing.plaf.basic.BasicBorders$FieldBorder}. + * + * @see javax.swing.JTextField + * @see javax.swing.text.JTextComponent + */ + public static Border getTextFieldBorder() + { + UIDefaults defaults; + + /* See comment in methods above for why this border is not shared. */ + defaults = UIManager.getLookAndFeelDefaults(); + return new FieldBorder( + defaults.getColor("TextField.shadow"), + defaults.getColor("TextField.darkShadow"), + defaults.getColor("TextField.light"), + defaults.getColor("TextField.highlight")); + } + + + /** + * Returns a two-pixel thick, green + * LineBorderUIResource. This is so ugly that look and + * feels better use different borders for their progress bars, or + * they will look really terrible. + * + *

                [A screen shot of a border returned by this method] + */ + public static Border getProgressBarBorder() + { + /* There does not seem to exist a way to parametrize the color + * or thickness of the border through UIDefaults. + */ + return new BorderUIResource.LineBorderUIResource(Color.green, 2); + } + + + /** + * Returns a border that is composed of a raised bevel border and a + * one-pixel thick line border. + * + *

                [A screen shot of a border returned by this method] + * + *

                The colors of the border are retrieved from the + * UIDefaults of the currently active look and feel + * using the keys “InternalFrame.borderShadow”, + * “InternalFrame.borderDarkShadow”, + * “InternalFrame.borderLight”, + * “InternalFrame.borderHighlight”, and + * (for the inner one-pixel thick line) + * “InternalFrame.borderColor”. + */ + public static Border getInternalFrameBorder() + { + UIDefaults defaults; + Color shadow, darkShadow, highlight, lightHighlight, line; + + /* See comment in methods above for why this border is not shared. */ + defaults = UIManager.getLookAndFeelDefaults(); + + shadow = defaults.getColor("InternalFrame.borderShadow"); + darkShadow = defaults.getColor("InternalFrame.borderDarkShadow"); + highlight = defaults.getColor("InternalFrame.borderLight"); + lightHighlight = defaults.getColor("InternalFrame.borderHighlight"); + line = defaults.getColor("InternalFrame.borderColor"); + + return new BorderUIResource.CompoundBorderUIResource( + /* outer border */ + new BorderUIResource.BevelBorderUIResource( + BevelBorder.RAISED, + (highlight != null) ? highlight : Color.lightGray, + (lightHighlight != null) ? lightHighlight : Color.white, + (darkShadow != null) ? darkShadow : Color.black, + (shadow != null) ? shadow : Color.gray), + + /* inner border */ + new BorderUIResource.LineBorderUIResource( + (line != null) ? line : Color.lightGray)); + } + + + /** + * Returns a shared MarginBorder. + */ + static Border getMarginBorder() // intentionally not public + { + /* Swing is not designed to be thread-safe, so there is no + * need to synchronize the access to the global variable. + */ + if (sharedMarginBorder == null) + sharedMarginBorder = new MarginBorder(); + + return sharedMarginBorder; + } + + + /** + * A border whose appearance depends on the state of + * the enclosed button. + * + *

                [A screen shot of this border] + * + * @see javax.swing.plaf.basic.BasicGraphicsUtils#drawBezel + * + * @author Sascha Brawer (brawer@dandelis.ch) + */ public static class ButtonBorder + extends AbstractBorder + implements Serializable, UIResource { ! /** ! * Determined using the serialver tool ! * of Apple/Sun JDK 1.3.1 on MacOS X 10.1.5. ! */ ! static final long serialVersionUID = -157053874580739687L; ! ! ! /** ! * The color for drawing the shaded parts of the border. ! * @see javax.swing.plaf.basic.BasicGraphicsUtils#drawBezel ! */ ! protected Color shadow; ! ! ! /** ! * The color for drawing the dark shaded parts of the border. ! * @see javax.swing.plaf.basic.BasicGraphicsUtils#drawBezel ! */ ! protected Color darkShadow; ! ! ! /** ! * The color for drawing the highlighted parts of the border. ! * @see javax.swing.plaf.basic.BasicGraphicsUtils#drawBezel ! */ ! protected Color highlight; ! ! ! /** ! * The color for drawing the bright highlighted parts of the border. ! * @see javax.swing.plaf.basic.BasicGraphicsUtils#drawBezel ! */ ! protected Color lightHighlight; ! ! ! /** ! * Constructs a new border for drawing a button in the Basic ! * look and feel. ! * ! * @param shadow the shadow color. ! * @param darkShadow a darker variant of the shadow color. ! * @param highlight the highlight color. ! * @param lightHighlight a brighter variant of the highlight color. ! */ ! public ButtonBorder(Color shadow, Color darkShadow, ! Color highlight, Color lightHighlight) ! { ! /* These colors usually come from the UIDefaults of the current ! * look and feel. Use fallback values if the colors are not ! * supplied. The API specification is silent about what ! * behavior is expected for null colors, so users should not ! * rely on this fallback (which is why it is not documented in ! * the above Javadoc). ! */ ! this.shadow = (shadow != null) ? shadow : Color.gray; ! this.darkShadow = (darkShadow != null) ? darkShadow : Color.black; ! this.highlight = (highlight != null) ? highlight : Color.lightGray; ! this.lightHighlight = (lightHighlight != null) ! ? lightHighlight ! : Color.white; ! } ! ! ! /** ! * Paints the ButtonBorder around a given component. ! * ! * @param c the component whose border is to be painted. ! * @param g the graphics for painting. ! * @param x the horizontal position for painting the border. ! * @param y the vertical position for painting the border. ! * @param width the width of the available area for painting the border. ! * @param height the height of the available area for painting the border. ! * ! * @see javax.swing.plaf.basic.BasicGraphicsUtils#drawBezel ! */ ! public void paintBorder(Component c, Graphics g, ! int x, int y, int width, int height) ! { ! ButtonModel bmodel = null; ! ! if (c instanceof AbstractButton) ! bmodel = ((AbstractButton) c).getModel(); ! ! BasicGraphicsUtils.drawBezel( ! g, x, y, width, height, ! /* pressed */ (bmodel != null) ! && /* mouse button pressed */ bmodel.isPressed() ! && /* mouse inside */ bmodel.isArmed(), ! /* default */ (c instanceof JButton) ! && ((JButton) c).isDefaultButton(), ! shadow, darkShadow, highlight, lightHighlight); ! } ! ! ! /** ! * Measures the width of this border. ! * ! *

                Although the thickness of the actually painted border ! * depends on the state of the enclosed component, this ! * measurement always returns the same amount of pixels. Indeed, ! * it would be rather confusing if a button was appearing to ! * change its size depending on whether it is pressed or not. ! * ! * @param c the component whose border is to be measured. ! * ! * @return an Insets object whose left, ! * right, top and ! * bottom fields indicate the width of the ! * border at the respective edge. ! * ! * @see #getBorderInsets(java.awt.Component, java.awt.Insets) ! */ ! public Insets getBorderInsets(Component c) ! { ! /* There is no obvious reason for overriding this method, but we ! * try to have exactly the same API as the Sun reference ! * implementation. ! */ ! return getBorderInsets(c, null); ! } ! ! ! /** ! * Measures the width of this border, storing the results into a ! * pre-existing Insets object. ! * ! *

                Although the thickness of the actually painted border ! * depends on the state of the enclosed component, this ! * measurement always returns the same amount of pixels. Indeed, ! * it would be rather confusing if a button was appearing to ! * change its size depending on whether it is pressed or not. ! * ! * @param insets an Insets object for holding the result values. ! * After invoking this method, the left, ! * right, top and ! * bottom fields indicate the width of the ! * border at the respective edge. ! * ! * @return the same object that was passed for insets. ! * ! * @see #getBorderInsets() ! */ ! public Insets getBorderInsets(Component c, Insets insets) ! { ! /* The exact amount has been determined using a test program ! * that was run on the Sun reference implementation. With ! * Apple/Sun JDK 1.3.1 on MacOS X 10.1.5, the result is ! * [3, 3, 3, 3]. With Sun JDK 1.4.1_01 on Linux/x86, the ! * result is [2, 3, 3, 3]. We use the values from the 1.4.1_01 ! * release. ! */ ! if (insets == null) ! return new Insets(2, 3, 3, 3); ! ! insets.top = 2; ! insets.bottom = insets.left = insets.right = 3; ! return insets; ! } ! } ! ! ! /** ! * A border that makes its enclosed component appear as lowered ! * into the surface. Typically used for text fields. ! * ! *

                [A screen shot of this border] ! * ! * @see javax.swing.plaf.basic.BasicGraphicsUtils#drawEtchedRect ! * ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ public static class FieldBorder + extends AbstractBorder + implements UIResource { + /** + * Determined using the serialver tool + * of Apple/Sun JDK 1.3.1 on MacOS X 10.1.5. + */ + static final long serialVersionUID = 949220756998454908L; + + + /** + * The color for drawing the outer half of the top and left + * edges. + */ + protected Color shadow; + + + /** + * The color for drawing the inner half of the top and left + * edges. + */ + protected Color darkShadow; + + + /** + * The color for drawing the inner half of the bottom and right + * edges. + */ + protected Color highlight; + + + /** + * The color for drawing the outer half of the bottom and right + * edges. + */ + protected Color lightHighlight; + + + /** + * Constructs a new border for drawing a text field in the Basic + * look and feel. + * + * @param shadow the color for drawing the outer half + * of the top and left edges. + * + * @param darkShadow the color for drawing the inner half + * of the top and left edges. + * + * @param highlight the color for drawing the inner half + * of the bottom and right edges. + * + * @param lightHighlight the color for drawing the outer half + * of the bottom and right edges. + */ public FieldBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight) { + /* These colors usually come from the UIDefaults of the current + * look and feel. Use fallback values if the colors are not + * supplied. The API specification is silent about what + * behavior is expected for null colors, so users should not + * rely on this fallback (which is why it is not documented in + * the above Javadoc). + */ + this.shadow = (shadow != null) ? shadow : Color.gray; + this.darkShadow = (darkShadow != null) ? darkShadow : Color.black; + this.highlight = (highlight != null) ? highlight : Color.lightGray; + this.lightHighlight = (lightHighlight != null) + ? lightHighlight : Color.white; } ! ! ! /** ! * Paints the FieldBorder around a given component. ! * ! * @param c the component whose border is to be painted. ! * @param g the graphics for painting. ! * @param x the horizontal position for painting the border. ! * @param y the vertical position for painting the border. ! * @param width the width of the available area for painting the border. ! * @param height the height of the available area for painting the border. ! * ! * @see javax.swing.plaf.basic.BasicGraphicsUtils#drawEtchedRect ! */ ! public void paintBorder(Component c, Graphics g, ! int x, int y, int width, int height) ! { ! BasicGraphicsUtils.drawEtchedRect(g, x, y, width, height, ! shadow, darkShadow, ! highlight, lightHighlight); ! } ! ! ! /** ! * Measures the width of this border. ! * ! * @param c the component whose border is to be measured. ! * If c is an instance of {@link ! * javax.swing.text.JTextComponent}, its margin is ! * added to the border size. ! * ! * @return an Insets object whose left, ! * right, top and ! * bottom fields indicate the width of the ! * border at the respective edge. ! * ! * @see #getBorderInsets(java.awt.Component, java.awt.Insets) ! */ ! public Insets getBorderInsets(Component c) ! { ! return getBorderInsets(c, null); ! } ! ! ! /** ! * Measures the width of this border, storing the results into a ! * pre-existing Insets object. ! * ! * @param c the component whose border is to be measured. ! * If c is an instance of {@link ! * javax.swing.text.JTextComponent}, its margin is ! * added to the border size. ! * ! * @param insets an Insets object for holding the result values. ! * After invoking this method, the left, ! * right, top and ! * bottom fields indicate the width of the ! * border at the respective edge. ! * ! * @return the same object that was passed for insets. ! * ! * @see #getBorderInsets() ! */ ! public Insets getBorderInsets(Component c, Insets insets) ! { ! if (insets == null) ! insets = new Insets(2, 2, 2, 2); ! else ! insets.top = insets.left = insets.bottom = insets.right = 2; ! ! if (c instanceof JTextComponent) ! { ! Insets margin = ((JTextComponent) c).getMargin(); ! insets.top += margin.top; ! insets.left += margin.left; ! insets.bottom += margin.bottom; ! insets.right += margin.right; ! } ! ! return insets; ! } ! } ! ! ! /** ! * An invisible, but spacing border whose margin is determined ! * by calling the getMargin() method of the enclosed ! * component. If the enclosed component has no such method, ! * this border will not occupy any space. ! * ! *

                [An illustration that shows how MarginBorder
!    * determines its borders] ! * ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ public static class MarginBorder + extends AbstractBorder + implements Serializable, UIResource { ! /** ! * Determined using the serialver tool ! * of Apple/Sun JDK 1.3.1 on MacOS X 10.1.5. ! */ ! static final long serialVersionUID = -3035848353448896090L; ! ! ! /** ! * Constructs a new MarginBorder. ! */ ! public MarginBorder() ! { ! } ! ! ! /** ! * Measures the width of this border. ! * ! * @param c the component whose border is to be measured. ! * ! * @return an Insets object whose left, right, ! * top and bottom fields indicate the ! * width of the border at the respective edge. ! * ! * @see #getBorderInsets(java.awt.Component, java.awt.Insets) ! */ ! public Insets getBorderInsets(Component c) ! { ! return getBorderInsets(c, new Insets(0, 0, 0, 0)); ! } ! ! ! /** ! * Determines the insets of this border by calling the ! * getMargin() method of the enclosed component. The ! * resulting margin will be stored into the the left, ! * right, top and bottom ! * fields of the passed insets parameter. ! * ! *

                Unfortunately, getMargin() is not a method of ! * {@link javax.swing.JComponent} or some other common superclass ! * of things with margins. While reflection could be used to ! * determine the existence of this method, this would be slow on ! * many virtual machines. Therefore, the current implementation ! * knows about {@link javax.swing.AbstractButton#getMargin()}, ! * {@link javax.swing.JPopupMenu#getMargin()}, {@link ! * javax.swing.JToolBar#getMargin()}, and {@link ! * javax.swing.text.JTextComponent}. If c is an ! * instance of a known class, the respective ! * getMargin() method is called to determine the ! * correct margin. Otherwise, a zero-width margin is returned. ! * ! * @param c the component whose border is to be measured. ! * ! * @return the same object that was passed for insets, ! * but with changed fields. ! */ ! public Insets getBorderInsets(Component c, Insets insets) ! { ! Insets margin = null; ! ! /* This is terrible object-oriented design. See the above Javadoc ! * for an excuse. ! */ ! if (c instanceof AbstractButton) ! margin = ((AbstractButton) c).getMargin(); ! else if (c instanceof JPopupMenu) ! margin = ((JPopupMenu) c).getMargin(); ! else if (c instanceof JToolBar) ! margin = ((JToolBar) c).getMargin(); ! else if (c instanceof JTextComponent) ! margin = ((JTextComponent) c).getMargin(); ! ! if (margin == null) ! insets.top = insets.left = insets.bottom = insets.right = 0; ! else ! { ! insets.top = margin.top; ! insets.left = margin.left; ! insets.bottom = margin.bottom; ! insets.right = margin.right; ! } ! ! return insets; ! } ! } ! ! ! /** ! * A border for drawing a separator line below JMenuBar. ! * ! *

                [A screen shot of a JMenuBar with this border] ! * ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ public static class MenuBarBorder + extends AbstractBorder + implements UIResource { + /** + * Determined using the serialver tool + * of Apple/Sun JDK 1.3.1 on MacOS X 10.1.5. + */ + static final long serialVersionUID = -6909056571935227506L; + + + /** + * The shadow color, which is used for the upper line of the + * two-pixel thick bottom edge. + */ + private Color shadow; + + + /** + * The highlight color, which is used for the lower line of the + * two-pixel thick bottom edge. + */ + private Color highlight; + + + /** + * Constructs a new MenuBarBorder for drawing a JMenuBar in + * the Basic look and feel. + * + *

                [A screen shot of a JMenuBar with this
+      * border] + * + * @param shadow the shadow color, which is used for the upper + * line of the two-pixel thick bottom edge. + * + * @param highlight the shadow color, which is used for the lower + * line of the two-pixel thick bottom edge. + */ public MenuBarBorder(Color shadow, Color highlight) { + /* These colors usually come from the UIDefaults of the current + * look and feel. Use fallback values if the colors are not + * supplied. The API specification is silent about what + * behavior is expected for null colors, so users should not + * rely on this fallback (which is why it is not documented in + * the above Javadoc). + */ + this.shadow = (shadow != null) ? shadow : Color.gray; + this.highlight = (highlight != null) ? highlight : Color.white; } ! ! ! /** ! * Paints the MenuBarBorder around a given component. ! * ! * @param c the component whose border is to be painted, usually ! * an instance of {@link javax.swing.JMenuBar}. ! * ! * @param g the graphics for painting. ! * @param x the horizontal position for painting the border. ! * @param y the vertical position for painting the border. ! * @param width the width of the available area for painting the border. ! * @param height the height of the available area for painting the border. ! */ ! public void paintBorder(Component c, Graphics g, ! int x, int y, int width, int height) ! { ! Color oldColor; ! ! /* To understand this code, it might be helpful to look at the ! * image "BasicBorders.MenuBarBorder-1.png" that is included ! * with the JavaDoc. It is located in the "doc-files" ! * subdirectory. ! */ ! oldColor = g.getColor(); ! y = y + height - 2; ! try ! { ! g.setColor(shadow); ! g.drawLine(x, y, x + width - 2, y); ! g.drawLine(x, y + 1, x, y + 1); ! g.drawLine(x + width - 2, y + 1, x + width - 2, y + 1); ! ! g.setColor(highlight); ! g.drawLine(x + 1, y + 1, x + width - 3, y + 1); ! g.drawLine(x + width - 1, y, x + width - 1, y + 1); ! } ! finally ! { ! g.setColor(oldColor); ! } ! } ! ! ! /** ! * Measures the width of this border. ! * ! * @param c the component whose border is to be measured. ! * ! * @return an Insets object whose left, ! * right, top and ! * bottom fields indicate the width of the ! * border at the respective edge. ! * ! * @see #getBorderInsets(java.awt.Component, java.awt.Insets) ! */ ! public Insets getBorderInsets(Component c) ! { ! /* There is no obvious reason for overriding this method, but we ! * try to have exactly the same API as the Sun reference ! * implementation. ! */ ! return getBorderInsets(c, null); ! } ! ! ! /** ! * Measures the width of this border, storing the results into a ! * pre-existing Insets object. ! * ! * @param insets an Insets object for holding the result values. ! * After invoking this method, the left, ! * right, top and ! * bottom fields indicate the width of the ! * border at the respective edge. ! * ! * @return the same object that was passed for insets. ! * ! * @see #getBorderInsets() ! */ ! public Insets getBorderInsets(Component c, Insets insets) ! { ! /* The exact amount has been determined using a test program ! * that was run on the Apple/Sun JDK 1.3.1 on MacOS X, and the ! * Sun JDK 1.4.1_01 on GNU/Linux for x86. Both gave [0,0,2,0], ! * which was expected from looking at the screen shot. ! */ ! if (insets == null) ! return new Insets(0, 0, 2, 0); ! ! insets.left = insets.right = insets.top = 0; ! insets.bottom = 2; ! return insets; ! } ! } ! ! ! /** ! * A border for drawing radio buttons in the Basic look and feel. ! * ! *

                [A screen shot of this border] ! * ! *

                Note about the screen shot: Normally, the ! * borderPainted property is false for ! * JRadioButtons. For this screen shot, it has been set to ! * true so the borders get drawn. Also, a ! * concretization of the Basic look and would typically provide ! * icons for the various states of radio buttons. ! * ! *

                Note that the focus rectangle is invisible If the radio button ! * is currently selected. While it might be debatable whether this ! * makes a lot of sense, this behavior can be observed in the Sun ! * reference implementation (in JDK 1.3.1 and 1.4.1). The Classpath ! * implementation tries to exactly replicate the JDK appearance. ! * ! * @see javax.swing.plaf.basic.BasicGraphicsUtils#drawBezel ! * ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ public static class RadioButtonBorder + extends ButtonBorder { ! /** ! * Determined using the serialver tool ! * of Apple/Sun JDK 1.3.1 on MacOS X 10.1.5. ! */ ! static final long serialVersionUID = 1596945751743747369L; ! ! ! /** ! * Constructs a new border for drawing a JRadioButton in ! * the Basic look and feel. ! * ! * @param shadow the shadow color. ! * @param darkShadow a darker variant of the shadow color. ! * @param highlight the highlight color. ! * @param lightHighlight a brighter variant of the highlight color. ! */ ! public RadioButtonBorder(Color shadow, Color darkShadow, ! Color highlight, Color lightHighlight) ! { ! /* The superclass ButtonBorder substitutes null arguments ! * with fallback colors. ! */ ! super(shadow, darkShadow, highlight, lightHighlight); ! } ! ! ! /** ! * Paints the RadioButtonBorder around a given component. ! * ! *

                The Sun implementation always seems to draw exactly ! * the same border, irrespective of the state of the button. ! * This is rather surprising, but GNU Classpath emulates the ! * observable behavior. ! * ! * @param c the component whose border is to be painted. ! * @param g the graphics for painting. ! * @param x the horizontal position for painting the border. ! * @param y the vertical position for painting the border. ! * @param width the width of the available area for painting the border. ! * @param height the height of the available area for painting the border. ! * ! * @see javax.swing.plaf.basic.BasicGraphicsUtils#drawBezel ! */ ! public void paintBorder(Component c, Graphics g, ! int x, int y, int width, int height) ! { ! AbstractButton button = null; ! ButtonModel bmodel = null; ! boolean lowered = false; ! boolean focused = false; ! ! if (c instanceof AbstractButton) ! { ! button = (AbstractButton) c; ! bmodel = button.getModel(); ! } ! ! if (bmodel != null) ! { ! lowered = button.isSelected() ! || (/* mouse inside */ bmodel.isArmed() && bmodel.isPressed()); ! focused = button.hasFocus() && button.isFocusPainted(); ! } ! ! if (lowered) ! BasicGraphicsUtils.drawLoweredBezel(g, x, y, width, height, ! shadow, darkShadow, ! highlight, lightHighlight); ! else ! BasicGraphicsUtils.drawBezel(g, x, y, width, height, ! /* isPressed */ false, ! /* isPefault */ focused, ! shadow, darkShadow, ! highlight, lightHighlight); ! } ! ! ! /** ! * Measures the width of this border. ! * ! * @param c the component whose border is to be measured. ! * ! * @return an Insets object whose left, ! * right, top and ! * bottom fields indicate the width of the ! * border at the respective edge. ! * ! * @see #getBorderInsets(java.awt.Component, java.awt.Insets) ! */ ! public Insets getBorderInsets(Component c) ! { ! /* There is no obvious reason for overriding this method, but we ! * try to have exactly the same API as the Sun reference ! * implementation. ! */ ! return getBorderInsets(c, null); ! } ! ! ! /** ! * Measures the width of this border, storing the results into a ! * pre-existing Insets object. ! * ! * @param insets an Insets object for holding the result values. ! * After invoking this method, the left, ! * right, top and ! * bottom fields indicate the width of the ! * border at the respective edge. ! * ! * @return the same object that was passed for insets. ! * ! * @see #getBorderInsets() ! */ ! public Insets getBorderInsets(Component c, Insets insets) ! { ! /* The exact amount has been determined using a test program ! * that was run on the Apple/Sun JDK 1.3.1 on MacOS X, and the ! * Sun JDK 1.4.1_01 on GNU/Linux for x86. Both gave [2,2,2,2]. ! */ ! if (insets == null) ! return new Insets(2, 2, 2, 2); ! ! insets.left = insets.right = insets.top = insets.bottom = 2; ! return insets; ! } ! } ! ! ! /** ! * A one-pixel thick border for rollover buttons, for example in ! * tool bars. ! * ! * @since 1.4 ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ public static class RolloverButtonBorder + extends ButtonBorder { ! /** ! * Determined using the serialver tool ! * of Sun JDK 1.4.1_01 on GNU/Linux 2.4.20 for x86. ! */ ! static final long serialVersionUID = 1976364864896996846L; ! ! ! /** ! * Constructs a new border for drawing a roll-over button ! * in the Basic look and feel. ! * ! * @param shadow the shadow color. ! * @param darkShadow a darker variant of the shadow color. ! * @param highlight the highlight color. ! * @param lightHighlight a brighter variant of the highlight color. ! */ ! public RolloverButtonBorder(Color shadow, Color darkShadow, ! Color highlight, Color lightHighlight) ! { ! super(shadow, darkShadow, highlight, lightHighlight); ! } ! ! ! /** ! * Paints the border around a rollover button. If c ! * is not an {@link javax.swing.AbstractButton} whose model ! * returns true for {@link ! * javax.swing.ButtonModel#isRollver}, nothing gets painted at ! * all. ! * ! * @param c the button whose border is to be painted. ! * @param g the graphics for painting. ! * @param x the horizontal position for painting the border. ! * @param y the vertical position for painting the border. ! * @param width the width of the available area for painting the border. ! * @param height the height of the available area for painting the border. ! */ ! public void paintBorder(Component c, Graphics g, ! int x, int y, int width, int height) ! { ! ButtonModel bmodel = null; ! boolean drawPressed; ! Color oldColor = g.getColor(); ! int x2, y2; ! ! if (c instanceof AbstractButton) ! bmodel = ((AbstractButton) c).getModel(); ! ! /* Draw nothing if c is not a rollover button. */ ! if ((bmodel == null) || !bmodel.isRollover()) ! return; ! ! /* Draw nothing if the mouse is pressed, but outside the button. */ ! if (bmodel.isPressed() && !bmodel.isArmed()) ! return; ! ! drawPressed = bmodel.isSelected() || bmodel.isPressed(); ! x2 = x + width - 1; ! y2 = y + height - 1; ! ! try ! { ! g.setColor(drawPressed ? shadow : lightHighlight); ! g.drawLine(x, y, x2 - 1, y); // top edge ! g.drawLine(x, y + 1, x, y2 - 1); // left edge ! ! g.setColor(drawPressed ? lightHighlight : shadow); ! g.drawLine(x, y2, x2, y2); // bottom edge ! g.drawLine(x2, y, x2, y2 - 1); // right edge ! } ! finally ! { ! g.setColor(oldColor); ! } ! } ! } ! ! ! /** ! * A border for JSplitPanes in the Basic look and feel. The divider ! * in the middle of the JSplitPane has its own border class, of which ! * an instance can be obtained with {@link #getSplitPaneDividerBorder()}. ! * ! *

                [A screen shot for JSplitPane.HORIZONTAL_SPLIT] ! * ! *

                [A screen shot for JSplitPane.VERTICAL_SPLIT] ! * ! *

                In contrast to the other borders of the Basic look and feel, ! * this class is not serializable. While this might be unintended, ! * GNU Classpath follows the specification in order to be fully ! * compatible with the Sun reference implementation. ! * ! *

                In the Sun JDK, the bottom edge of the divider also gets ! * painted if the orientation of the enclosed JSplitPane is ! * JSplitPane.VERTICAL_SPLIT (at least in versions ! * 1.3.1 and 1.4.1). GNU Classpath does not replicate this bug. A ! * report has been filed with Sun (bug ID 4885629). ! * ! *

                Note that the bottom left pixel of the border has a different ! * color depending on the orientation of the enclosed JSplitPane. ! * Although this is visually inconsistent, Classpath replicates the ! * appearance of the Sun reference implementation. A bug report has ! * been filed with Sun (review ID 188774). ! * ! * @see {@link #getSplitPaneBorder()} ! * @see {@link #getSplitPaneDividerBorder()} ! * ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ public static class SplitPaneBorder + implements Border, UIResource { + /** + * Indicates that the top edge shall be not be painted + * by {@link #paintRect(java.awt.Graphics, int, int, int, int, int)}. + */ + private static final int SUPPRESS_TOP = 1; + + + /** + * Indicates that the left edge shall be not be painted + * by {@link #paintRect(java.awt.Graphics, int, int, int, int, int)}. + */ + private static final int SUPPRESS_LEFT = 2; + + + /** + * Indicates that the bottom edge shall be not be painted + * by {@link #paintRect(java.awt.Graphics, int, int, int, int, int)}. + */ + private static final int SUPPRESS_BOTTOM = 4; + + + /** + * Indicates that the right edge shall be not be painted + * by {@link #paintRect(java.awt.Graphics, int, int, int, int, int)}. + */ + private static final int SUPPRESS_RIGHT = 8; + + + /** + * The color for drawing the bottom and right edges of the border. + */ + protected Color highlight; + + + /** + * The color for drawing the top and left edges of the border. + */ + protected Color shadow; + + + /** + * Constructs a new border for drawing a JSplitPane in the Basic + * look and feel. The divider in the middle of the JSplitPane has + * its own border class, SplitPaneDividerBorder. + * + * @param shadow the shadow color. + * @param highlight the highlight color. + */ public SplitPaneBorder(Color highlight, Color shadow) { + /* These colors usually come from the UIDefaults of the current + * look and feel. Use fallback values if the colors are not + * supplied. The API specification is silent about what + * behavior is expected for null colors, so users should not + * rely on this fallback (which is why it is not documented in + * the above Javadoc). + */ + this.shadow = (shadow != null) ? shadow : Color.black; + this.highlight = (highlight != null) ? highlight : Color.white; } ! ! ! /** ! * Paints the border around a JSplitPane. ! * ! *

                [A screen shot for JSplitPane.HORIZONTAL_SPLIT] ! * ! *

                [A screen shot for JSplitPane.VERTICAL_SPLIT] ! * ! * @param c the JSplitPane whose border is to be painted. ! * @param g the graphics for painting. ! * @param x the horizontal position for painting the border. ! * @param y the vertical position for painting the border. ! * @param width the width of the available area for painting the border. ! * @param height the height of the available area for painting the border. ! */ ! public void paintBorder(Component c, Graphics g, ! int x, int y, int width, int height) ! { ! JSplitPane splitPane; ! Component content; ! ! if (!(c instanceof JSplitPane)) ! return; ! ! splitPane = (JSplitPane) c; ! switch (splitPane.getOrientation()) ! { ! case JSplitPane.HORIZONTAL_SPLIT: ! if ((content = splitPane.getLeftComponent()) != null) ! paintRect(g, SUPPRESS_RIGHT, true, x, y, content.getBounds()); ! if ((content = splitPane.getRightComponent()) != null) ! paintRect(g, SUPPRESS_LEFT, true, x, y, content.getBounds()); ! break; ! ! case JSplitPane.VERTICAL_SPLIT: ! if ((content = splitPane.getTopComponent()) != null) ! paintRect(g, SUPPRESS_BOTTOM, false, x, y, content.getBounds()); ! if ((content = splitPane.getBottomComponent()) != null) ! paintRect(g, SUPPRESS_TOP, false, x, y, content.getBounds()); ! break; ! } ! } ! ! ! /** ! * Paints a border around a child of a JSplitPane, ! * omitting some of the edges. ! * ! * @param g the graphics for painting. ! * ! * @param suppress a bit mask indicating the set of suppressed ! * edges, for example SUPPRESS_TOP | SUPPRESS_RIGHT. ! * ! * @param x the x coordinate of the SplitPaneBorder. ! * ! * @param y the y coordinate of the SplitPaneBorder. ! * ! * @param shadeBottomLeftPixel true to paint the ! * bottom left pixel in the shadow color, ! * false for the highlight color. The Basic ! * look and feel uses the highlight color for the bottom ! * left pixel of the border of a JSplitPane whose ! * orientation is VERTICAL_SPLIT, and the shadow color ! * otherwise. While this might be a strange distinction, ! * Classpath tries to look identical to the reference ! * implementation. A bug report has been filed with Sun; ! * its review ID is 188774. We currently replicate the ! * Sun behavior. ! * ! * @param rect the bounds of the child of JSplitPane whose ! * border is to be painted. ! */ ! private void paintRect(Graphics g, int suppress, ! boolean shadeBottomLeftPixel, ! int x, int y, ! Rectangle rect) ! { ! if (rect == null) ! return; ! ! /* On each edge, the border exceeds the enclosed child by one ! * pixel. See the image "BasicBorders.SplitPaneBorder-1.png" in ! * the directory "doc-files". ! */ ! x += rect.x - 1; ! y += rect.y - 1; ! int right = x + rect.width + 1; ! int bottom = y + rect.height + 1; ! ! Color oldColor = g.getColor(); ! try ! { ! g.setColor(shadow); ! if ((suppress & SUPPRESS_TOP) == 0) ! g.drawLine(x, y, right, y); ! if ((suppress & SUPPRESS_LEFT) == 0) ! g.drawLine(x, y, x, bottom); ! else ! g.drawLine(x, bottom, x, bottom); // one pixel ! ! g.setColor(highlight); ! if ((suppress & SUPPRESS_BOTTOM) == 0) ! g.drawLine(x + (shadeBottomLeftPixel ? 1 : 0), bottom, right, bottom); ! else if (!shadeBottomLeftPixel) ! g.drawLine(x, bottom, x, bottom); // one pixel ! ! if ((suppress & SUPPRESS_RIGHT) == 0) ! g.drawLine(right, y, right, bottom); ! } ! finally ! { ! g.setColor(oldColor); ! } ! } ! ! ! /** ! * Measures the width of this border. ! * ! * @param c the component whose border is to be measured, usually ! * an instance of {@link javax.swing.JSplitPane}. ! * ! * @return an Insets object whose left, ! * right, top and ! * bottom fields indicate the width of the ! * border at the respective edge. ! */ ! public Insets getBorderInsets(Component c) ! { ! return new Insets(1, 1, 1, 1); ! } ! ! ! /** ! * Determines whether this border fills every pixel in its area ! * when painting. ! * ! * @return false because this border does not ! * paint over the pixels where the divider joins ! * the border. ! */ ! public boolean isBorderOpaque() ! { ! /* Strangely, the Sun implementation (tested with JDK 1.3.1 and ! * 1.4.1_01) seems to always return true. It could be a bug, ! * but without knowing the details of their implementation, it is ! * hard to decide. ! */ ! return false; ! } ! } ! ! ! /** ! * A border for the divider inside a JSplitPane. ! * ! *

                [A screen shot of this border] ! * ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ ! private static class SplitPaneDividerBorder ! implements Border, UIResource, Serializable ! { ! /** ! * The highlight color, which is drawn on the left or top edge ! * depending on the orientation of the JSplitPanel. ! */ ! protected Color highlight; ! ! ! /** ! * The highlight color, which is drawn on the right or bottom edge ! * depending on the orientation of the JSplitPanel. ! */ ! protected Color shadow; ! ! ! /** ! * Constructs a new border for drawing the divider of a JSplitPane ! * in the Basic look and feel. The outer parts of the JSplitPane have ! * their own border class, SplitPaneBorder. ! * ! * @param shadow the shadow color. ! * @param highlight the highlight color. ! */ ! public SplitPaneDividerBorder(Color highlight, Color shadow) ! { ! this.highlight = (highlight != null) ? highlight : Color.white; ! this.shadow = (shadow != null) ? shadow : Color.black; ! } ! ! ! /** ! * Paints the border around the divider of a JSplitPane. ! * ! *

                [A picture that shows which pixels
!      * get painted in what color] ! * ! * @param c the JSplitPane whose divider’s border ! * is to be painted. ! * @param g the graphics for painting. ! * @param x the horizontal position for painting the border. ! * @param y the vertical position for painting the border. ! * @param width the width of the available area for painting the border. ! * @param height the height of the available area for painting the border. ! */ ! public void paintBorder(Component c, Graphics g, ! int x, int y, int width, int height) ! { ! Color oldColor, dcol; ! int x2, y2; ! JSplitPane sp; ! ! sp = getSplitPane(c); ! if (sp == null) ! return; ! ! x2 = x + width - 1; ! y2 = y + height - 1; ! oldColor = g.getColor(); ! dcol = c.getBackground(); ! try ! { ! switch (sp.getOrientation()) ! { ! case JSplitPane.HORIZONTAL_SPLIT: ! g.setColor(dcol); ! g.drawLine(x + 1, y, x2 - 1, y); ! g.drawLine(x + 1, y2, x2 - 1, y2); ! g.setColor(sp.getLeftComponent() != null ? highlight : dcol); ! g.drawLine(x, y, x, y2); ! g.setColor(sp.getRightComponent() != null ? shadow : dcol); ! g.drawLine(x2, y, x2, y2); ! break; ! ! case JSplitPane.VERTICAL_SPLIT: ! g.setColor(dcol); ! g.drawLine(x, y + 1, x, y2 - 1); ! g.drawLine(x2, y + 1, x2, y2 - 1); ! g.setColor(sp.getTopComponent() != null ? highlight : dcol); ! g.drawLine(x, y, x2, y); ! g.setColor(sp.getBottomComponent() != null ? shadow : dcol); ! g.drawLine(x, y2, x2, y2); ! break; ! } ! } ! finally ! { ! g.setColor(oldColor); ! } ! } ! ! ! /** ! * Measures the width of this border. ! * ! * @param c the component whose border is to be measured, usually ! * an instance of {@link javax.swing.JSplitPane}. ! * ! * @return an Insets object whose left, ! * right, top and ! * bottom fields indicate the width of the ! * border at the respective edge. ! */ ! public Insets getBorderInsets(Component c) ! { ! return new Insets(1, 1, 1, 1); ! } ! ! ! /** ! * Determines whether this border fills every pixel in its area ! * when painting. ! * ! * @return true if both highlight and shadow ! * color are fully opaque. ! */ ! public boolean isBorderOpaque() ! { ! return (highlight.getAlpha() == 255) && (shadow.getAlpha() == 255); ! } ! ! ! /** ! * Determines the JSplitPane whose divider is being painted. ! * ! * @param c an instance of BasicSplitPaneDivider. ! * ! * @return a JSplitPane, or null if ! * c is not an instance of {@link ! * javax.swing.plaf.basic.BasicSplitPaneDivider}. ! */ ! private JSplitPane getSplitPane(Component c) ! { ! if (c instanceof BasicSplitPaneDivider) ! return (((BasicSplitPaneDivider) c).getBasicSplitPaneUI()) ! .getSplitPane(); ! else ! return null; ! } ! } ! ! ! /** ! * A border for toggle buttons in the Basic look and feel. ! * ! *

                [A screen shot of this border] ! * ! *

                The Sun implementation always seems to draw exactly ! * the same border, irrespective of the state of the button. ! * This is rather surprising, but GNU Classpath emulates the ! * observable behavior. ! * ! * @see javax.swing.plaf.basic.BasicGraphicsUtils#drawBezel ! * ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ public static class ToggleButtonBorder + extends ButtonBorder { ! /** ! * Determined using the serialver tool ! * of Apple/Sun JDK 1.3.1 on MacOS X 10.1.5. ! */ ! static final long serialVersionUID = -3528666548001058394L; ! ! ! /** ! * Constructs a new border for drawing a JToggleButton in ! * the Basic look and feel. ! * ! * @param shadow the shadow color. ! * @param darkShadow a darker variant of the shadow color. ! * @param highlight the highlight color. ! * @param lightHighlight a brighter variant of the highlight color. ! */ ! public ToggleButtonBorder(Color shadow, Color darkShadow, ! Color highlight, Color lightHighlight) ! { ! /* The superclass ButtonBorder substitutes null arguments ! * with fallback colors. ! */ ! super(shadow, darkShadow, highlight, lightHighlight); ! } ! ! ! /** ! * Paints the ToggleButtonBorder around a given component. ! * ! *

                The Sun implementation always seems to draw exactly ! * the same border, irrespective of the state of the button. ! * This is rather surprising, but GNU Classpath emulates the ! * observable behavior. ! * ! * @param c the component whose border is to be painted. ! * @param g the graphics for painting. ! * @param x the horizontal position for painting the border. ! * @param y the vertical position for painting the border. ! * @param width the width of the available area for painting the border. ! * @param height the height of the available area for painting the border. ! * ! * @see javax.swing.plaf.basic.BasicGraphicsUtils#drawBezel ! */ ! public void paintBorder(Component c, Graphics g, ! int x, int y, int width, int height) ! { ! /* The author of this code tried various variants for setting ! * the state of the enclosed JToggleButton, but it seems that ! * the drawn border is always identical. Weird, because this ! * means that the user does not see whether the JToggleButton ! * is selected or not. ! */ ! BasicGraphicsUtils.drawBezel(g, x, y, width, height, ! /* pressed */ false, ! /* default */ false, ! shadow, darkShadow, ! highlight, lightHighlight); ! } ! ! ! /** ! * Measures the width of this border. ! * ! * @param c the component whose border is to be measured. ! * ! * @return an Insets object whose left, ! * right, top and ! * bottom fields indicate the width of the ! * border at the respective edge. ! * ! * @see #getBorderInsets(java.awt.Component, java.awt.Insets) ! */ ! public Insets getBorderInsets(Component c) ! { ! /* There is no obvious reason for overriding this method, but we ! * try to have exactly the same API as the Sun reference ! * implementation. ! */ ! return getBorderInsets(c, null); ! } ! ! ! /** ! * Measures the width of this border, storing the results into a ! * pre-existing Insets object. ! * ! * @param insets an Insets object for holding the result values. ! * After invoking this method, the left, ! * right, top and ! * bottom fields indicate the width of the ! * border at the respective edge. ! * ! * @return the same object that was passed for insets. ! * ! * @see #getBorderInsets() ! */ ! public Insets getBorderInsets(Component c, Insets insets) ! { ! /* The exact amount has been determined using a test program ! * that was run on the Apple/Sun JDK 1.3.1 on MacOS X, and the ! * Sun JDK 1.4.1_01 on GNU/Linux for x86. Both gave [2,2,2,2]. ! */ ! if (insets == null) ! return new Insets(2, 2, 2, 2); ! ! insets.left = insets.right = insets.top = insets.bottom = 2; ! return insets; ! } ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicButtonUI.java gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicButtonUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicButtonUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicButtonUI.java 2004-01-10 21:59:30.000000000 +0000 *************** *** 1,9 **** ! package javax.swing.plaf.basic; ! import javax.swing.*; ! import javax.swing.plaf.*; ! import java.awt.*; public class BasicButtonUI extends ButtonUI { --- 1,55 ---- ! /* BasicButtonUI.java ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. ! This file is part of GNU Classpath. ! ! GNU Classpath is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! GNU Classpath is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package javax.swing.plaf.basic; + + import java.awt.Color; + import java.awt.Dimension; + import java.awt.Font; + import java.awt.FontMetrics; + import java.awt.Graphics; + import java.awt.Insets; + import java.awt.Rectangle; + import javax.swing.AbstractButton; + import javax.swing.JComponent; + import javax.swing.SwingUtilities; + import javax.swing.plaf.ButtonUI; + import javax.swing.plaf.ComponentUI; public class BasicButtonUI extends ButtonUI { *************** public class BasicButtonUI extends Butto *** 36,49 **** public Dimension getPreferredSize(JComponent c) { AbstractButton b = (AbstractButton)c; ! Dimension d = BasicGraphicsUtils.getPreferredSize(b, ! gap, ! b.getText(), ! b.getIcon(), ! b.getVerticalAlignment(), ! b.getHorizontalAlignment(), ! b.getHorizontalTextPosition(), ! b.getVerticalTextPosition()); // System.out.println("^^^^^^^^^^^^^^^^^^^^^^ BASIC-PREF="+d + ",T="+b.text); return d; } --- 82,88 ---- public Dimension getPreferredSize(JComponent c) { AbstractButton b = (AbstractButton)c; ! Dimension d = BasicGraphicsUtils.getPreferredButtonSize(b, gap); // System.out.println("^^^^^^^^^^^^^^^^^^^^^^ BASIC-PREF="+d + ",T="+b.text); return d; } *************** public class BasicButtonUI extends Butto *** 61,67 **** g.setFont(f); ! FontMetrics fm = SwingUtilities.getFontMetrics(f); Insets i = c.getInsets(); --- 100,106 ---- g.setFont(f); ! FontMetrics fm = g.getFontMetrics(f); Insets i = c.getInsets(); *************** public class BasicButtonUI extends Butto *** 160,166 **** g.setFont(f); ! FontMetrics fm = SwingUtilities.getFontMetrics(f); g.setColor(c.isEnabled() ? textColor : disabledTextColor); --- 199,205 ---- g.setFont(f); ! FontMetrics fm = g.getFontMetrics(f); g.setColor(c.isEnabled() ? textColor : disabledTextColor); diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicCheckBoxUI.java gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicCheckBoxUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicCheckBoxUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicCheckBoxUI.java 2004-01-10 21:59:30.000000000 +0000 *************** *** 1,9 **** ! package javax.swing.plaf.basic; ! import javax.swing.*; ! import javax.swing.plaf.*; ! import java.awt.*; public class BasicCheckBoxUI extends BasicRadioButtonUI { --- 1,50 ---- ! /* BasicCheckBoxUI.java ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. ! This file is part of GNU Classpath. ! ! GNU Classpath is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! GNU Classpath is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package javax.swing.plaf.basic; + + import java.awt.Component; + import java.awt.Dimension; + import java.awt.Graphics; + import java.awt.Rectangle; + import javax.swing.AbstractButton; + import javax.swing.JComponent; + import javax.swing.plaf.ComponentUI; public class BasicCheckBoxUI extends BasicRadioButtonUI { *************** public class BasicCheckBoxUI extends Bas *** 19,33 **** public Dimension getPreferredSize(JComponent c) { AbstractButton b = (AbstractButton)c; ! Dimension d = BasicGraphicsUtils.getPreferredSize(b, ! gap, ! b.getText(), ! b.getIcon(), ! b.getVerticalAlignment(), ! b.getHorizontalAlignment(), ! b.getHorizontalTextPosition(), ! b.getVerticalTextPosition()); ! //System.out.println("^^^^^^^^^^^^^^^^^^^^^^ BASIC-PREF="+d + ",T="+b.text); return d; } --- 60,66 ---- public Dimension getPreferredSize(JComponent c) { AbstractButton b = (AbstractButton)c; ! Dimension d = BasicGraphicsUtils.getPreferredButtonSize(b, gap); //System.out.println("^^^^^^^^^^^^^^^^^^^^^^ BASIC-PREF="+d + ",T="+b.text); return d; } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicDefaults.java gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicDefaults.java *** gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicDefaults.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicDefaults.java 2003-11-27 09:09:13.000000000 +0000 *************** *** 1,8 **** package javax.swing.plaf.basic; ! import javax.swing.*; ! import java.awt.*; ! import javax.swing.border.*; class BasicBorder extends MatteBorder { --- 1,49 ---- + /* BasicDefaults.java + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.swing.plaf.basic; ! import java.awt.Color; ! import java.awt.Component; ! import java.awt.Graphics; ! import java.awt.Insets; ! import javax.swing.UIDefaults; ! import javax.swing.border.MatteBorder; class BasicBorder extends MatteBorder { *************** class BasicBorder extends MatteBorder *** 10,16 **** BasicBorder() { ! super(5,5,5,5, null); } public void paintBorder(Component c, --- 51,57 ---- BasicBorder() { ! super(5,5,5,5, Color.black); } public void paintBorder(Component c, *************** class PanelBorder extends MatteBorder *** 34,40 **** { PanelBorder() { ! super(5,5,5,5, null); } public void paintBorder(Component c, --- 75,81 ---- { PanelBorder() { ! super(5,5,5,5, Color.black); } public void paintBorder(Component c, *************** public class BasicDefaults extends UIDef *** 54,80 **** public BasicDefaults() { // System.out.println("BasicDefaults !!!!!!!!!!!!!!!!!!!!!!!!!"); ! put("JButton", new BasicButtonUI()); ! put("JLabel", new BasicLabelUI()); ! put("JPanel", new BasicPanelUI()); ! put("JCheckBox", new BasicCheckBoxUI()); ! put("JRadioButton", new BasicRadioButtonUI()); ! put("JToggleButton", new BasicToggleButtonUI()); ! put("JOptionPane", new BasicOptionPaneUI()); ! put("JList", new BasicListUI()); ! put("JTree", new BasicTreeUI()); ! put("JTextComponent", new BasicTextUI()); ! put("JTabbedPane", new BasicTabbedPaneUI()); ! put("JScrollPane", new BasicScrollPaneUI()); ! put("JViewport", new BasicViewportUI()); ! put("JButton.border", new BasicBorder()); ! put("JPanel.border", new PanelBorder()); ! put("JToggleButton.border", new PanelBorder()); ! put("JCheckBox.border", new PanelBorder()); ! put("JRadioButton.border", new PanelBorder()); } } --- 95,124 ---- public BasicDefaults() { // System.out.println("BasicDefaults !!!!!!!!!!!!!!!!!!!!!!!!!"); ! put("JButton", "javax.swing.plaf.basic.BasicButtonUI"); ! put("JLabel", "javax.swing.plaf.basic.BasicLabelUI"); ! put("JPanel", "javax.swing.plaf.basic.BasicPanelUI"); ! put("JCheckBox", "javax.swing.plaf.basic.BasicCheckBoxUI"); ! put("JRadioButton", "javax.swing.plaf.basic.BasicRadioButtonUI"); ! put("JToggleButton", "javax.swing.plaf.basic.BasicToggleButtonUI"); ! put("JOptionPane", "javax.swing.plaf.basic.BasicOptionPaneUI"); ! put("JList", "javax.swing.plaf.basic.BasicListUI"); ! put("JTree", "javax.swing.plaf.basic.BasicTreeUI"); ! put("JTextComponent", "javax.swing.plaf.basic.BasicTextUI"); ! put("JTabbedPane", "javax.swing.plaf.basic.BasicTabbedPaneUI"); ! put("JScrollPane", "javax.swing.plaf.basic.BasicScrollPaneUI"); ! put("JViewport", "javax.swing.plaf.basic.BasicViewportUI"); ! put("JButton.border", "javax.swing.plaf.basic.BasicBorder"); ! put("JPanel.border", "javax.swing.plaf.basic.PanelBorder"); ! put("JToggleButton.border", "javax.swing.plaf.basic.PanelBorder"); ! put("JCheckBox.border", "javax.swing.plaf.basic.PanelBorder"); ! put("JRadioButton.border", "javax.swing.plaf.basic.PanelBorder"); ! ! put("AbstractUndoableEdit.undoText", "Undo"); ! put("AbstractUndoableEdit.redoText", "Redo"); } } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicGraphicsUtils.java gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicGraphicsUtils.java *** gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicGraphicsUtils.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicGraphicsUtils.java 2003-08-01 20:10:22.000000000 +0000 *************** *** 1,77 **** package javax.swing.plaf.basic; ! import java.awt.*; ! import javax.swing.*; public class BasicGraphicsUtils ! { ! public static Dimension getPreferredSize(JComponent b, ! int gap, ! String text, ! Icon icon, ! int va, ! int ha, ! int htp, ! int vtp) { ! JComponent c = b; ! // this is a staight copy from BasicButtonUI.paint() ! // ! Rectangle tr = new Rectangle(); ! Rectangle ir = new Rectangle(); ! Rectangle vr = new Rectangle(); ! Font f = c.getFont(); ! FontMetrics fm = SwingUtilities.getFontMetrics(f); - Insets i = c.getInsets(); ! vr.x = i.left; ! vr.y = i.top; ! vr.width = b.getWidth() - (i.right + i.left); ! vr.height = b.getHeight() - (i.bottom + i.top); - // System.out.println(" VIEW-RECT-BUTTON="+vr+", insets="+i); ! String tt = SwingUtilities.layoutCompoundLabel(b, ! fm, ! text, ! icon, ! va, ! ha, ! vtp, ! htp, ! vr, ! ir, ! tr, ! gap); ! ! Rectangle r = ir.union(tr); ! ! Insets insets = b.getInsets(); ! r.width += insets.left + insets.right; ! r.height += insets.top + insets.bottom; ! // System.out.println("COMPUTED SIZE FOR PREF_SIZE="+r); ! return r.getSize(); } ! public static void drawString(Graphics g, ! String text, ! int underlinedChar, ! int x, ! int y) { ! g.drawString(text, x, y); } - } --- 1,636 ---- + /* BasicGraphicsUtils.java + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + package javax.swing.plaf.basic; + import java.awt.Color; + import java.awt.Dimension; + import java.awt.Font; + import java.awt.FontMetrics; + import java.awt.Graphics; + import java.awt.Graphics2D; + import java.awt.Insets; + import java.awt.Rectangle; ! import java.awt.font.FontRenderContext; ! import java.awt.font.LineMetrics; ! import java.awt.font.TextLayout; + import java.awt.geom.Rectangle2D; + import javax.swing.AbstractButton; + import javax.swing.SwingUtilities; + + + /** + * A utility class providing commonly used drawing and measurement + * routines. + * + * @author Sascha Brawer (brawer@dandelis.ch) + */ public class BasicGraphicsUtils ! { ! /** ! * Constructor. It is utterly unclear why this class should ! * be constructable, but this is what the API specification ! * says. ! */ ! public BasicGraphicsUtils() ! { ! } ! ! ! /** ! * Draws a rectangle that appears etched into the surface, given ! * four colors that are used for drawing. ! * ! *

                [An illustration that shows which pixels
!    * get painted in what color] ! * ! * @param g the graphics into which the rectangle is drawn. ! * @param x the x coordinate of the rectangle. ! * @param y the y coordinate of the rectangle. ! * @param width the width of the rectangle in pixels. ! * @param height the height of the rectangle in pixels. ! * ! * @param shadow the color that will be used for painting ! * the outer side of the top and left edges. ! * ! * @param darkShadow the color that will be used for painting ! * the inner side of the top and left edges. ! * ! * @param highlight the color that will be used for painting ! * the inner side of the bottom and right edges. ! * ! * @param lightHighlight the color that will be used for painting ! * the outer side of the bottom and right edges. ! * ! * @see #getEtchedInsets() ! * @see javax.swing.border.EtchedBorder ! */ ! public static void drawEtchedRect(Graphics g, ! int x, int y, int width, int height, ! Color shadow, Color darkShadow, ! Color highlight, Color lightHighlight) ! { ! Color oldColor; ! int x2, y2; ! ! oldColor = g.getColor(); ! x2 = x + width - 1; ! y2 = y + height - 1; ! ! try { ! /* To understand this code, it might be helpful to look at the ! * image "BasicGraphicsUtils-1.png" that is included with the ! * JavaDoc. The file is located in the "doc-files" subdirectory. ! * ! * (x2, y2) is the coordinate of the most right and bottom pixel ! * to be painted. ! */ ! g.setColor(shadow); ! g.drawLine(x, y, x2 - 1, y); // top, outer ! g.drawLine(x, y + 1, x, y2 - 1); // left, outer ! g.setColor(darkShadow); ! g.drawLine(x + 1, y + 1, x2 - 2, y + 1); // top, inner ! g.drawLine(x + 1, y + 2, x + 1, y2 - 2); // left, inner ! ! g.setColor(highlight); ! g.drawLine(x + 1, y2 - 1, x2 - 1, y2 - 1); // bottom, inner ! g.drawLine(x2 - 1, y + 1, x2 - 1, y2 - 2); // right, inner ! g.setColor(lightHighlight); ! g.drawLine(x, y2, x2, y2); // bottom, outer ! g.drawLine(x2, y, x2, y2 - 1); // right, outer ! } ! finally ! { ! g.setColor(oldColor); ! } ! } ! ! ! /** ! * Determines the width of the border that gets painted by ! * {@link #drawEtchedRect}. ! * ! * @return an Insets object whose top, ! * left, bottom and ! * right field contain the border width at the ! * respective edge in pixels. ! */ ! public static Insets getEtchedInsets() ! { ! return new Insets(2, 2, 2, 2); ! } ! /** ! * Draws a rectangle that appears etched into the surface, given ! * two colors that are used for drawing. ! * ! *

                [An illustration that shows which pixels
!    * get painted in what color] ! * ! * @param g the graphics into which the rectangle is drawn. ! * @param x the x coordinate of the rectangle. ! * @param y the y coordinate of the rectangle. ! * @param width the width of the rectangle in pixels. ! * @param height the height of the rectangle in pixels. ! * ! * @param shadow the color that will be used for painting the outer ! * side of the top and left edges, and for the inner side of ! * the bottom and right ones. ! * ! * @param highlight the color that will be used for painting the ! * inner side of the top and left edges, and for the outer ! * side of the bottom and right ones. ! * ! * @see #getGrooveInsets() ! * @see javax.swing.border.EtchedBorder ! */ ! public static void drawGroove(Graphics g, ! int x, int y, int width, int height, ! Color shadow, Color highlight) ! { ! /* To understand this, it might be helpful to look at the image ! * "BasicGraphicsUtils-2.png" that is included with the JavaDoc, ! * and to compare it with "BasicGraphicsUtils-1.png" which shows ! * the pixels painted by drawEtchedRect. These image files are ! * located in the "doc-files" subdirectory. ! */ ! drawEtchedRect(g, x, y, width, height, ! /* outer topLeft */ shadow, ! /* inner topLeft */ highlight, ! /* inner bottomRight */ shadow, ! /* outer bottomRight */ highlight); ! } ! /** ! * Determines the width of the border that gets painted by ! * {@link #drawGroove}. ! * ! * @return an Insets object whose top, ! * left, bottom and ! * right field contain the border width at the ! * respective edge in pixels. ! */ ! public static Insets getGrooveInsets() ! { ! return new Insets(2, 2, 2, 2); ! } ! ! /** ! * Draws a border that is suitable for buttons of the Basic look and ! * feel. ! * ! *

                [An illustration that shows which pixels
!    * get painted in what color] ! * ! * @param g the graphics into which the rectangle is drawn. ! * @param x the x coordinate of the rectangle. ! * @param y the y coordinate of the rectangle. ! * @param width the width of the rectangle in pixels. ! * @param height the height of the rectangle in pixels. ! * ! * @param isPressed true to draw the button border ! * with a pressed-in appearance; false for ! * normal (unpressed) appearance. ! * ! * @param isDefault true to draw the border with ! * the appearance it has when hitting the enter key in a ! * dialog will simulate a click to this button; ! * false for normal appearance. ! * ! * @param shadow the shadow color. ! * @param darkShadow a darker variant of the shadow color. ! * @param highlight the highlight color. ! * @param lightHighlight a brighter variant of the highlight color. ! */ ! public static void drawBezel(Graphics g, ! int x, int y, int width, int height, ! boolean isPressed, boolean isDefault, ! Color shadow, Color darkShadow, ! Color highlight, Color lightHighlight) ! { ! Color oldColor = g.getColor(); ! /* To understand this, it might be helpful to look at the image ! * "BasicGraphicsUtils-3.png" that is included with the JavaDoc, ! * and to compare it with "BasicGraphicsUtils-1.png" which shows ! * the pixels painted by drawEtchedRect. These image files are ! * located in the "doc-files" subdirectory. ! */ ! try ! { ! if ((isPressed == false) && (isDefault == false)) ! { ! drawEtchedRect(g, x, y, width, height, ! lightHighlight, highlight, ! shadow, darkShadow); ! } ! ! if ((isPressed == true) && (isDefault == false)) ! { ! g.setColor(shadow); ! g.drawRect(x + 1, y + 1, width - 2, height - 2); ! } ! ! if ((isPressed == false) && (isDefault == true)) ! { ! g.setColor(darkShadow); ! g.drawRect(x, y, width - 1, height - 1); ! drawEtchedRect(g, x + 1, y + 1, width - 2, height - 2, ! lightHighlight, highlight, ! shadow, darkShadow); ! } ! ! if ((isPressed == true) && (isDefault == true)) ! { ! g.setColor(darkShadow); ! g.drawRect(x, y, width - 1, height - 1); ! g.setColor(shadow); ! g.drawRect(x + 1, y + 1, width - 3, height - 3); ! } ! } ! finally ! { ! g.setColor(oldColor); } + } + + + /** + * Draws a rectangle that appears lowered into the surface, given + * four colors that are used for drawing. + * + *

                [An illustration that shows which pixels
+    * get painted in what color] + * + *

                Compatibility with the Sun reference + * implementation: The Sun reference implementation seems + * to ignore the x and y arguments, at + * least in JDK 1.3.1 and 1.4.1_01. The method always draws the + * rectangular area at location (0, 0). A bug report has been filed + * with Sun; its “bug ID” is 4880003. The GNU Classpath + * implementation behaves correctly, thus not replicating this bug. + * + * @param g the graphics into which the rectangle is drawn. + * @param x the x coordinate of the rectangle. + * @param y the y coordinate of the rectangle. + * @param width the width of the rectangle in pixels. + * @param height the height of the rectangle in pixels. + * + * @param shadow the color that will be used for painting + * the inner side of the top and left edges. + * + * @param darkShadow the color that will be used for painting + * the outer side of the top and left edges. + * + * @param highlight the color that will be used for painting + * the inner side of the bottom and right edges. + * + * @param lightHighlight the color that will be used for painting + * the outer side of the bottom and right edges. + */ + public static void drawLoweredBezel(Graphics g, + int x, int y, int width, int height, + Color shadow, Color darkShadow, + Color highlight, Color lightHighlight) + { + /* Like drawEtchedRect, but swapping darkShadow and shadow. + * + * To understand this, it might be helpful to look at the image + * "BasicGraphicsUtils-4.png" that is included with the JavaDoc, + * and to compare it with "BasicGraphicsUtils-1.png" which shows + * the pixels painted by drawEtchedRect. These image files are + * located in the "doc-files" subdirectory. + */ + drawEtchedRect(g, x, y, width, height, + darkShadow, shadow, + highlight, lightHighlight); + } + + + /** + * Draws a String at the given location, underlining the first + * occurence of a specified character. The algorithm for determining + * the underlined position is not sensitive to case. If the + * character is not part of text, the text will be + * drawn without underlining. Drawing is performed in the current + * color and font of g. + * + *

                [An illustration showing how to use the
+    * method] + * + * @param g the graphics into which the String is drawn. + * + * @param text the String to draw. + * + * @param underlinedChar the character whose first occurence in + * text will be underlined. It is not clear + * why the API specification declares this argument to be + * of type int instead of char. + * While this would allow to pass Unicode characters outside + * Basic Multilingual Plane 0 (U+0000 .. U+FFFE), at least + * the GNU Classpath implementation does not underline + * anything if underlinedChar is outside + * the range of char. + * + * @param x the x coordinate of the text, as it would be passed to + * {@link java.awt.Graphics#drawString(java.lang.String, + * int, int)}. + * + * @param y the y coordinate of the text, as it would be passed to + * {@link java.awt.Graphics#drawString(java.lang.String, + * int, int)}. + */ + public static void drawString(Graphics g, String text, + int underlinedChar, int x, int y) + { + int index = -1; ! /* It is intentional that lower case is used. In some languages, ! * the set of lowercase characters is larger than the set of ! * uppercase ones. Therefore, it is good practice to use lowercase ! * for such comparisons (which really means that the author of this ! * code can vaguely remember having read some Unicode techreport ! * with this recommendation, but is too lazy to look for the URL). ! */ ! if ((underlinedChar >= 0) || (underlinedChar <= 0xffff)) ! index = text.toLowerCase().indexOf( ! Character.toLowerCase((char) underlinedChar)); ! ! drawStringUnderlineCharAt(g, text, index, x, y); ! } ! ! ! /** ! * Draws a String at the given location, underlining the character ! * at the specified index. Drawing is performed in the current color ! * and font of g. ! * ! *

                [An illustration showing how to use the
!    * method] ! * ! * @param g the graphics into which the String is drawn. ! * ! * @param text the String to draw. ! * ! * @param underlinedIndex the index of the underlined character in ! * text. If underlinedIndex falls ! * outside the range [0, text.length() - 1], the ! * text will be drawn without underlining anything. ! * ! * @param x the x coordinate of the text, as it would be passed to ! * {@link java.awt.Graphics#drawString(java.lang.String, ! * int, int)}. ! * ! * @param y the y coordinate of the text, as it would be passed to ! * {@link java.awt.Graphics#drawString(java.lang.String, ! * int, int)}. ! * ! * @since 1.4 ! */ ! public static void drawStringUnderlineCharAt(Graphics g, String text, ! int underlinedIndex, ! int x, int y) ! { ! Graphics2D g2; ! Rectangle2D.Double underline; ! FontRenderContext frc; ! FontMetrics fmet; ! LineMetrics lineMetrics; ! Font font; ! TextLayout layout; ! double underlineX1, underlineX2; ! boolean drawUnderline; ! int textLength; ! ! textLength = text.length(); ! if (textLength == 0) ! return; ! ! drawUnderline = (underlinedIndex >= 0) && (underlinedIndex < textLength); ! ! if (!(g instanceof Graphics2D)) { ! /* Fall-back. This is likely to produce garbage for any text ! * containing right-to-left (Hebrew or Arabic) characters, even ! * if the underlined character is left-to-right. ! */ ! g.drawString(text, x, y); ! if (drawUnderline) ! { ! fmet = g.getFontMetrics(); ! g.fillRect( ! /* x */ x + fmet.stringWidth(text.substring(0, underlinedIndex)), ! /* y */ y + fmet.getDescent() - 1, ! /* width */ fmet.charWidth(text.charAt(underlinedIndex)), ! /* height */ 1); ! } ! ! return; } + g2 = (Graphics2D) g; + font = g2.getFont(); + frc = g2.getFontRenderContext(); + lineMetrics = font.getLineMetrics(text, frc); + layout = new TextLayout(text, font, frc); + /* Draw the text. */ + layout.draw(g2, x, y); + if (!drawUnderline) + return; + underlineX1 = x + layout.getLogicalHighlightShape( + underlinedIndex, underlinedIndex).getBounds2D().getX(); + underlineX2 = x + layout.getLogicalHighlightShape( + underlinedIndex + 1, underlinedIndex + 1).getBounds2D().getX(); + underline = new Rectangle2D.Double(); + if (underlineX1 < underlineX2) + { + underline.x = underlineX1; + underline.width = underlineX2 - underlineX1; + } + else + { + underline.x = underlineX2; + underline.width = underlineX1 - underlineX2; + } + + underline.height = lineMetrics.getUnderlineThickness(); + underline.y = lineMetrics.getUnderlineOffset(); + if (underline.y == 0) + { + /* Some fonts do not specify an underline offset, although they + * actually should do so. In that case, the result of calling + * lineMetrics.getUnderlineOffset() will be zero. Since it would + * look very ugly if the underline was be positioned immediately + * below the baseline, we check for this and move the underline + * below the descent, as shown in the following ASCII picture: + * + * ##### ##### # + * # # # # + * # # # # + * # # # # + * ##### ###### ---- baseline (0) + * # + * # + * ------------------###----------- lineMetrics.getDescent() + */ + underline.y = lineMetrics.getDescent(); + } + underline.y += y; + g2.fill(underline); + } + + + /** + * Draws a rectangle, simulating a dotted stroke by painting only + * every second pixel along the one-pixel thick edge. The color of + * those pixels is the current color of the Graphics g. + * Any other pixels are left unchanged. + * + *

                [An illustration that shows which pixels
+    * get painted] + * + * @param g the graphics into which the rectangle is drawn. + * @param x the x coordinate of the rectangle. + * @param y the y coordinate of the rectangle. + * @param width the width of the rectangle in pixels. + * @param height the height of the rectangle in pixels. + */ + public static void drawDashedRect(Graphics g, + int x, int y, int width, int height) + { + int right = x + width - 1; + int bottom = y + height - 1; + + /* Draw the top and bottom edge of the dotted rectangle. */ + for (int i = x; i <= right; i += 2) + { + g.drawLine(i, y, i, y); + g.drawLine(i, bottom, i, bottom); + } + + /* Draw the left and right edge of the dotted rectangle. */ + for (int i = y; i <= bottom; i += 2) + { + g.drawLine(x, i, x, i); + g.drawLine(right, i, right, i); + } + } + + + /** + * Determines the preferred width and height of an AbstractButton, + * given the gap between the button’s text and icon. + * + * @param b the button whose preferred size is determined. + * + * @param textIconGap the gap between the button’s text and + * icon. + * + * @return a Dimension object whose width + * and height fields indicate the preferred + * extent in pixels. + * + * @see javax.swing.SwingUtilities#layoutCompoundLabel + */ + public static Dimension getPreferredButtonSize(AbstractButton b, + int textIconGap) + { + Rectangle contentRect; + Rectangle viewRect; + Rectangle iconRect = new Rectangle(); + Rectangle textRect = new Rectangle(); + Insets insets = b.getInsets(); + + /* For determining the ideal size, do not assume a size restriction. */ + viewRect = new Rectangle(0, 0, + /* width */ Integer.MAX_VALUE, + /* height */ Integer.MAX_VALUE); + + /* java.awt.Toolkit.getFontMetrics is deprecated. However, it + * seems not obvious how to get to the correct FontMetrics object + * otherwise. The real problem probably is that the method + * javax.swing.SwingUtilities.layoutCompundLabel should take a + * LineMetrics, not a FontMetrics argument. But fixing this that + * would change the public API. + */ + SwingUtilities.layoutCompoundLabel( + b, // for the component orientation + b.getToolkit().getFontMetrics(b.getFont()), // see comment above + b.getText(), + b.getIcon(), + b.getVerticalAlignment(), + b.getHorizontalAlignment(), + b.getVerticalTextPosition(), + b.getHorizontalTextPosition(), + viewRect, iconRect, textRect, + textIconGap); + + + /* +------------------------+ +------------------------+ + * | | | | + * | ICON | | CONTENTCONTENTCONTENT | + * | TEXTTEXTTEXT | --> | CONTENTCONTENTCONTENT | + * | TEXTTEXTTEXT | | CONTENTCONTENTCONTENT | + * +------------------------+ +------------------------+ + */ + contentRect = textRect.union(iconRect); + + return new Dimension(insets.left + contentRect.width + insets.right, + insets.top + contentRect.height + insets.bottom); + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicIconFactory.java gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicIconFactory.java *** gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicIconFactory.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicIconFactory.java 2003-05-10 08:14:36.000000000 +0000 *************** *** 1,3 **** --- 1,41 ---- + /* BasicIconFactory.java + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.swing.plaf.basic; import java.io.Serializable; *************** import javax.swing.Icon; *** 7,12 **** --- 45,52 ---- */ public class BasicIconFactory implements Serializable { + static final long serialVersionUID = 5605588811185324383L; + public BasicIconFactory() { } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicLabelUI.java gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicLabelUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicLabelUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicLabelUI.java 2003-07-13 15:29:11.000000000 +0000 *************** *** 1,21 **** ! package javax.swing.plaf.basic; ! import javax.swing.*; ! import javax.swing.plaf.*; ! import java.awt.*; public class BasicLabelUI extends LabelUI { int gap = 3; - Color foreground; public static ComponentUI createUI(final JComponent c) { return new BasicLabelUI(); } ! public void installUI(final JComponent c) { super.installUI(c); --- 1,69 ---- ! /* BasicLabelUI.java ! Copyright (C) 2002 Free Software Foundation, Inc. ! This file is part of GNU Classpath. ! ! GNU Classpath is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package javax.swing.plaf.basic; + + import java.awt.Color; + import java.awt.Dimension; + import java.awt.Font; + import java.awt.FontMetrics; + import java.awt.Graphics; + import java.awt.Insets; + import java.awt.Rectangle; + import java.beans.PropertyChangeEvent; + import java.beans.PropertyChangeListener; + import javax.swing.JComponent; + import javax.swing.JLabel; + import javax.swing.SwingUtilities; + import javax.swing.plaf.ComponentUI; + import javax.swing.plaf.LabelUI; public class BasicLabelUI extends LabelUI + implements PropertyChangeListener { int gap = 3; Color foreground; public static ComponentUI createUI(final JComponent c) { return new BasicLabelUI(); } ! public void installUI(final JComponent c) { super.installUI(c); *************** public class BasicLabelUI extends LabelU *** 27,32 **** --- 75,84 ---- public Dimension getPreferredSize(JComponent c) { JLabel b = (JLabel)c; + /* + We cannot use this method because it is not part of the + official Swing API. + Dimension d = BasicGraphicsUtils.getPreferredSize(b, gap, b.getText(), *************** public class BasicLabelUI extends LabelU *** 36,42 **** b.getHorizontalTextPosition(), b.getVerticalTextPosition()); System.out.println("JLABEL->^^^^^^^^^^^^^^^^^^^^^^ BASIC-PREF="+d + ",T="+b.getText()); ! return d; } --- 88,95 ---- b.getHorizontalTextPosition(), b.getVerticalTextPosition()); System.out.println("JLABEL->^^^^^^^^^^^^^^^^^^^^^^ BASIC-PREF="+d + ",T="+b.getText()); ! */ ! return new Dimension(100, 30); } *************** public class BasicLabelUI extends LabelU *** 52,58 **** g.setFont(f); ! FontMetrics fm = SwingUtilities.getFontMetrics(f); Insets i = c.getInsets(); --- 105,111 ---- g.setFont(f); ! FontMetrics fm = g.getFontMetrics(f); Insets i = c.getInsets(); *************** public class BasicLabelUI extends LabelU *** 139,158 **** g.drawLine(0,0,100,100); ! BasicGraphicsUtils.drawString(g, ! text, ! 0, ! 0,//textRect.x, ! 0);//textRect.y); } - } - - - - - - - - - --- 192,202 ---- g.drawLine(0,0,100,100); ! BasicGraphicsUtils.drawString(g, text, 0, 0 /*textRect.x*/, 0 /*textRect.y*/); } + public void propertyChange (PropertyChangeEvent event) + { + throw new Error ("Not implemented"); + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicListUI.java gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicListUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicListUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicListUI.java 2004-01-10 21:59:30.000000000 +0000 *************** *** 1,10 **** ! package javax.swing.plaf.basic; ! import javax.swing.plaf.*; ! import javax.swing.*; ! import java.awt.*; public class BasicListUI extends ListUI { int gap_between_cells; --- 1,55 ---- ! /* BasicListUI.java ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. ! This file is part of GNU Classpath. ! ! GNU Classpath is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! GNU Classpath is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with GNU Classpath; see the file COPYING. If not, write to the ! Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ! 02111-1307 USA. ! ! Linking this library statically or dynamically with other modules is ! making a combined work based on this library. Thus, the terms and ! conditions of the GNU General Public License cover the whole ! combination. ! ! As a special exception, the copyright holders of this library give you ! permission to link this library with independent modules to produce an ! executable, regardless of the license terms of these independent ! modules, and to copy and distribute the resulting executable under ! terms of your choice, provided that you also meet, for each linked ! independent module, the terms and conditions of the license of that ! module. An independent module is a module which is not derived from ! or based on this library. If you modify this library, you may extend ! this exception to your version of the library, but you are not ! obligated to do so. If you do not wish to do so, delete this ! exception statement from your version. */ + package javax.swing.plaf.basic; + + import java.awt.Color; + import java.awt.Component; + import java.awt.Dimension; + import java.awt.Graphics; + import java.awt.Point; + import java.awt.Rectangle; + import javax.swing.JComponent; + import javax.swing.JList; + import javax.swing.ListCellRenderer; + import javax.swing.plaf.ComponentUI; + import javax.swing.plaf.ListUI; + public class BasicListUI extends ListUI { int gap_between_cells; *************** public class BasicListUI extends ListUI *** 121,132 **** a.y += dim.height + gap_between_cells; } } - } - - - - - --- 166,184 ---- a.y += dim.height + gap_between_cells; } } + public int locationToIndex(JList list, Point location) + { + throw new Error ("Not implemented"); + } + public Point indexToLocation(JList list, int index) + { + throw new Error ("Not implemented"); + } + public Rectangle getCellBounds(JList list, int index1, int index2) + { + throw new Error ("Not implemented"); + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicLookAndFeel.java gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicLookAndFeel.java *** gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicLookAndFeel.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicLookAndFeel.java 2003-07-13 15:29:11.000000000 +0000 *************** import javax.swing.text.JTextComponent; *** 64,69 **** --- 64,71 ---- public abstract class BasicLookAndFeel extends LookAndFeel implements Serializable { + static final long serialVersionUID = -6096995660290287879L; + /** * Constructor BasicLookAndFeel */ diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicOptionPaneUI.java gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicOptionPaneUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicOptionPaneUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicOptionPaneUI.java 2004-01-10 21:59:30.000000000 +0000 *************** *** 1,10 **** package javax.swing.plaf.basic; ! import java.awt.*; ! import java.awt.event.*; ! import javax.swing.*; ! import javax.swing.plaf.*; ! import javax.accessibility.*; public class BasicOptionPaneUI extends OptionPaneUI { --- 1,54 ---- + /* BasicOptionPaneUI.java + Copyright (C) 2002, 2004 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.swing.plaf.basic; ! import java.awt.Component; ! import java.awt.Dimension; ! import java.awt.LayoutManager; ! import java.awt.event.ActionEvent; ! import java.awt.event.ActionListener; ! import javax.swing.JButton; ! import javax.swing.JComponent; ! import javax.swing.JLabel; ! import javax.swing.JOptionPane; ! import javax.swing.plaf.ComponentUI; ! import javax.swing.plaf.OptionPaneUI; public class BasicOptionPaneUI extends OptionPaneUI { *************** public class BasicOptionPaneUI extends O *** 26,32 **** System.out.println(" -------------: " + pane); ! JLabel message = pane.msg != null ? new JLabel((String)pane.msg) : null; JButton ok_button = new JButton("Ok"); ok_button.addActionListener(new ActionListener() --- 70,76 ---- System.out.println(" -------------: " + pane); ! JLabel message = null; JButton ok_button = new JButton("Ok"); ok_button.addActionListener(new ActionListener() *************** public class BasicOptionPaneUI extends O *** 45,55 **** } }); ! if (pane.args != null) { ! for (int i=0; iImplementation status: We do not have a real implementation yet. + * Currently, it is mostly a stub to allow compiling other parts of + * the javax.swing.plaf.basic package, although some parts are already + * functional. + * + * @author Sascha Brawer (brawer@dandelis.ch) + */ + public class BasicSplitPaneDivider + extends Container + implements PropertyChangeListener + { + /** + * Determined using the serialver tool + * of Apple/Sun JDK 1.3.1 on MacOS X 10.1.5. + */ + static final long serialVersionUID = 1463404307042803342L; + + + /** + * The width and height of the little buttons for showing and + * hiding parts of a JSplitPane in a single mouse click. + */ + protected static final int ONE_TOUCH_SIZE = 6; + + + // FIXME: Javadoc. + protected static final int ONE_TOUCH_OFFSET = 2; + + + /** + * An object that performs the tasks associated with an ongoing drag + * operation, or null if the user is currently not + * dragging the divider. + */ + protected DragController dragger; + + + /** + * The delegate object that is responsible for the UI of the + * JSplitPane that contains this divider. + */ + protected BasicSplitPaneUI splitPaneUI; + + + /** + * The thickness of the divider in pixels. + */ + protected int dividerSize; + + + /** + * A divider that is used for layout purposes. + */ + protected Component hiddenDivider; + + + /** + * The JSplitPane containing this divider. + */ + protected JSplitPane splitPane; + + + /** + * The listener for handling mouse events from both the divider + * and the containing JSplitPane. + * + *

                The reason for also handling MouseEvents from the containing + * JSplitPane is that users should be able to start + * a drag gesture from inside the JSplitPane, but slightly outisde + * the divider. + */ + protected MouseHandler mouseHandler = new MouseHandler(); + + + /** + * The current orientation of the containing JSplitPane, + * which is either {@link javax.swing.JSplitPane#HORIZONTAL_SPLIT} + * or {@link javax.swing.JSplitPane#VERTICAL_SPLIT}. + */ + protected int orientation; + + + /** + * The button for showing and hiding the left (or top) component + * of the JSplitPane. + */ + protected JButton leftButton; + + + /** + * The button for showing and hiding the right (or bottom) component + * of the JSplitPane. + */ + protected JButton rightButton; + + + /** + * The border of this divider. Typically, this will be an instance of + * {@link javax.swing.plaf.basic.BasicBorders.SplitPaneDividerBorder}. + * + * @see #getBorder() + * @see #setBorder(javax.swing.border.Border) + */ + private Border border; + + + /** + * Constructs a new divider. + * + * @param ui the UI delegate of the enclosing + * JSplitPane. + */ + public BasicSplitPaneDivider(BasicSplitPaneUI ui) + { + setBasicSplitPaneUI(ui); + } + + + /** + * Sets the delegate object that is responsible for the UI of the + * {@link javax.swing.JSplitPane} containing this divider. + * + * @param newUI the UI delegate, or null to release + * the connection to the current delegate. + */ + public void setBasicSplitPaneUI(BasicSplitPaneUI newUI) + { + /* Remove the connection to the existing JSplitPane. */ + if (splitPane != null) + { + splitPane.removePropertyChangeListener(this); + splitPane.removeMouseListener(mouseHandler); + splitPane.removeMouseMotionListener(mouseHandler); + splitPane = null; + } + + /* Establish the connection to the new JSplitPane. */ + splitPaneUI = newUI; + if (splitPaneUI != null) + splitPane = newUI.getSplitPane(); + if (splitPane != null) + { + splitPane.addPropertyChangeListener(this); + splitPane.addMouseListener(mouseHandler); + splitPane.addMouseMotionListener(mouseHandler); + orientation = splitPane.getOrientation(); + } + } + + + /** + * Returns the delegate object that is responsible for the UI of the + * {@link javax.swing.JSplitPane} containing this divider. + */ + public BasicSplitPaneUI getBasicSplitPaneUI() + { + return splitPaneUI; + } + + + /** + * Sets the thickness of the divider. + * + * @param newSize the new width or height in pixels. + */ + public void setDividerSize(int newSize) + { + this.dividerSize = newSize; + } + + + /** + * Retrieves the thickness of the divider. + */ + public int getDividerSize() + { + return dividerSize; + } + + + /** + * Sets the border of this divider. + * + * @param border the new border. Typically, this will be an instance of + * {@link javax.swing.plaf.basic.BasicBorders.SplitPaneDividerBorder}. + * + * @since 1.3 + */ + public void setBorder(Border border) + { + Border oldValue = this.border; + this.border = border; + firePropertyChange("border", oldValue, border); + } + + + /** + * Retrieves the border of this divider. + * + * @return the current border, or null if no border + * has been set. + * + * @since 1.3 + */ + public Border getBorder() + { + return border; + } + + + /** + * Retrieves the insets of the divider. If a border has been + * installed on the divider, the result of calling its + * getBorderInsets method is returned. Otherwise, + * the inherited implementation will be invoked. + * + * @see javax.swing.border.Border#getBorderInsets(java.awt.Component) + */ + public Insets getInsets() + { + if (border != null) + return border.getBorderInsets(this); + else + return super.getInsets(); + } + + + /** + * Returns the preferred size of this divider, which is + * dividerSize by dividerSize + * pixels. + */ + public Dimension getPreferredSize() + { + return new Dimension(dividerSize, dividerSize); + } + + + /** + * Returns the minimal size of this divider, which is + * dividerSize by dividerSize + * pixels. + */ + public Dimension getMinimumSize() + { + return getPreferredSize(); + } + + + /** + * Processes events from the JSplitPane that contains + * this divider. + */ + public void propertyChange(PropertyChangeEvent e) + { + // FIXME: Not yet implemented. + } + + + /** + * Paints the divider by painting its border. + */ + public void paint(Graphics g) + { + Dimension dividerSize; + + super.paint(g); + if (border != null) + { + dividerSize = getSize(); + border.paintBorder(this, g, 0, 0, dividerSize.width, dividerSize.height); + //System.out.println(dividerSize); + //g.setColor(java.awt.Color.white); + //g.drawRect(0, 0, 5, 5); + } + } + + + /** + * Reacts to changes of the oneToughExpandable + * property of the containing JSplitPane. + */ + protected void oneTouchExpandableChanged() + { + // FIXME: Not yet implemented. + } + + + /** + * Creates a button for showing and hiding the left (or top) + * part of a JSplitPane. + */ + protected JButton createLeftOneTouchButton() + { + return new OneTouchButton(/* left */ true); + } + + + /** + * Creates a button for showing and hiding the right (or bottom) + * part of a JSplitPane. + */ + protected JButton createRightOneTouchButton() + { + return new OneTouchButton(/* left */ false); + } + + + /** + * Prepares the divider for dragging by calling the + * startDragging method of the UI delegate of the + * enclosing JSplitPane. + * + * @see BasicSplitPaneUI#startDragging() + */ + protected void prepareForDragging() + { + if (splitPaneUI != null) + splitPaneUI.startDragging(); + } + + + /** + * Drags the divider to a given location by calling the + * dragDividerTo method of the UI delegate of the + * enclosing JSplitPane. + * + * @param location the new location of the divider. + * + * @see BasicSplitPaneUI#dragDividerTo(int location) + */ + protected void dragDividerTo(int location) + { + if (splitPaneUI != null) + splitPaneUI.dragDividerTo(location); + } + + + /** + * Finishes a dragging gesture by calling the + * finishDraggingTo method of the UI delegate of the + * enclosing JSplitPane. + * + * @param location the new, final location of the divider. + * + * @see BasicSplitPaneUI#finishDraggingTo(int location) + */ + protected void finishDraggingTo(int location) + { + if (splitPaneUI != null) + splitPaneUI.finishDraggingTo(location); + } + + + /** + * The listener for handling mouse events from both the divider + * and the containing JSplitPane. + * + *

                The reason for also handling MouseEvents from the containing + * JSplitPane is that users should be able to start + * a drag gesture from inside the JSplitPane, but slightly outisde + * the divider. + * + * @author Sascha Brawer (brawer@dandelis.ch) + */ + protected class MouseHandler + extends MouseAdapter + implements MouseMotionListener + { + + public void mousePressed(MouseEvent e) + { + // FIXME: Not yet implemented. + } + + + public void mouseReleased(MouseEvent e) + { + // FIXME: Not yet implemented. + } + + + /** + * Repeatedly invoked when the user is dragging the mouse cursor + * while having pressed a mouse button. + */ + public void mouseDragged(MouseEvent e) + { + // FIXME: Not yet implemented. + } + + + /** + * Repeatedly invoked when the user is dragging the mouse cursor + * without having pressed a mouse button. + */ + public void mouseMoved(MouseEvent e) + { + // FIXME: Not yet implemented. + } + } + + + /** + * A small button for showing and hiding parts of a + * JSplitPane with a single mouse click. + * + * @author Sascha Brawer (brawer@dandelis.ch) + */ + private static class OneTouchButton + extends JButton + { + OneTouchButton(boolean left) + { + // FIXME: Set various properties of the button. + // Make sure it looks identical to the small + // buttons of the Sun reference implementation. + // The size should also be the same. + if (left) + setText("<"); + else + setText(">"); + + Dimension butSize = new Dimension(ONE_TOUCH_SIZE, ONE_TOUCH_SIZE); + setMinimumSize(butSize); + setMaximumSize(butSize); + setPreferredSize(butSize); + + setBorderPainted(false); + } + } + + + /** + * Performs the tasks associated with an ongoing drag + * operation. + * + * @author Sascha Brawer (brawer@dandelis.ch) + */ + protected class DragController + { + // FIXME: Not yet implemented. + protected DragController(MouseEvent e) + { + } + + protected boolean isValid() + { + // FIXME: Not yet implemented. + return true; + } + + protected int positionForMouseEvent(MouseEvent e) + { + return 0; + } + + protected int getNeededLocation(int x, int y) + { + return 0; + } + + protected void continueDrag(int newX, int newY) + { + } + + protected void completeDrag(int x, int y) + { + } + + protected void completeDrag(MouseEvent e) + { + } + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicSplitPaneUI.java gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicSplitPaneUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicSplitPaneUI.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicSplitPaneUI.java 2003-06-24 09:48:42.000000000 +0000 *************** *** 0 **** --- 1,309 ---- + /* BasicSplitPaneUI.java + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.swing.plaf.basic; + + import java.awt.Component; + import java.awt.Dimension; + import java.awt.Graphics; + import java.awt.Insets; + import java.awt.event.ActionListener; + import java.awt.event.FocusListener; + import java.beans.PropertyChangeListener; + import javax.swing.JComponent; + import javax.swing.JSplitPane; + import javax.swing.KeyStroke; + import javax.swing.plaf.ComponentUI; + import javax.swing.plaf.SplitPaneUI; + + /** + * FIXME: Stubbed to allow compiling other classes, + * no real implementation. + */ + public class BasicSplitPaneUI + extends SplitPaneUI + { + protected static final String NON_CONTINUOUS_DIVIDER + = "nonContinuousDivider"; + + protected static int KEYBOARD_DIVIDER_MOVE_OFFSET; + + protected JSplitPane splitPane; + protected BasicSplitPaneDivider divider; + protected PropertyChangeListener propertyChangeListener; + protected FocusListener focusListener; + protected int dividerSize; + protected Component nonContinuousLayoutDivider; + protected boolean draggingHW; + protected int beginDragDividerLocation; + protected KeyStroke upKey; + protected KeyStroke downKey; + protected KeyStroke leftKey; + protected KeyStroke rightKey; + protected KeyStroke homeKey; + protected KeyStroke endKey; + protected KeyStroke dividerResizeToggleKey; + protected ActionListener keyboardUpLeftListener; + protected ActionListener keyboardDownRightListener; + protected ActionListener keyboardHomeListener; + protected ActionListener keyboardEndListener; + protected ActionListener keyboardResizeToggleListener; + + public static ComponentUI createUI(JComponent c) + { + BasicSplitPaneUI newUI; + + newUI = new BasicSplitPaneUI(); + newUI.installUI(c); + return newUI; + } + + public BasicSplitPaneUI() + { + propertyChangeListener = createPropertyChangeListener(); + focusListener = createFocusListener(); + } + + public void installUI(JComponent c) + { + } + + protected void installDefaults() + { + } + + protected void installListeners() + { + } + + protected void installKeyboardListeners() + { + } + + protected void installKeyboardActions() + { + } + + public void uninstallUI(JComponent c) + { + } + + protected void uninstallDefaults() + { + } + + protected void uninstallListeners() + { + } + + protected void uninstallKeyboardActions() + { + } + + protected PropertyChangeListener createPropertyChangeListener() + { + return null; + } + + protected FocusListener createFocusListener() + { + return null; + } + + protected ActionListener createKeyboardUpLeftListener() + { + return null; + } + + protected ActionListener createKeyboardDownRightListener() + { + return null; + } + + protected ActionListener createKeyboardHomeListener() + { + return null; + } + + protected ActionListener createKeyboardEndListener() + { + return null; + } + + protected ActionListener createKeyboardResizeToggleListener() + { + return null; + } + + public int getOrientation() + { + return splitPane.getOrientation(); + } + + public void setOrientation(int orientation) + { + } + + + public boolean isContinuousLayout() + { + return false; + } + + public void setContinuousLayout(boolean b) + { + } + + public int getLastDragLocation() + { + return 0; + } + + public void setLastDragLocation(int l) + { + } + + + public BasicSplitPaneDivider getDivider() + { + return divider; + } + + + protected Component createDefaultNonContinuousLayoutDivider() + { + return null; + } + + protected void setNonContinuousLayoutDivider(Component newDivider) + { + setNonContinuousLayoutDivider(newDivider, true /* false? */); + } + + protected void setNonContinuousLayoutDivider(Component newDivider, + boolean rememberSizes) + { + nonContinuousLayoutDivider = newDivider; + } + + public Component getNonContinuousLayoutDivider() + { + return nonContinuousLayoutDivider; + } + + public JSplitPane getSplitPane() + { + return splitPane; + } + + public BasicSplitPaneDivider createDefaultDivider() + { + return null; + } + + public void resetToPreferredSizes(JSplitPane jc) + { + } + + public void setDividerLocation(JSplitPane jc, int location) + { + } + + public int getDividerLocation(JSplitPane jc) + { + return 0; + } + + public int getMinimumDividerLocation(JSplitPane jc) + { + return 0; + } + + public int getMaximumDividerLocation(JSplitPane jc) + { + return 0; + } + + public void finishedPaintingChildren(JSplitPane jc, Graphics g) + { + } + + public void paint(Graphics g, JComponent jc) + { + } + + public Dimension getPreferredSize(JComponent jc) + { + return null; + } + + public Dimension getMinimumSize(JComponent jc) + { + return null; + } + + public Dimension getMaximumSize(JComponent jc) + { + return null; + } + + public Insets getInsets(JComponent jc) + { + return new Insets(0, 0, 0, 0); + } + + protected void resetLayoutManager() + { + } + + protected void startDragging() + { + } + + protected void dragDividerTo(int location) + { + } + + protected void finishDraggingTo(int location) + { + } + + protected int getDividerBorderSize() + { + return 0; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicTabbedPaneUI.java gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicTabbedPaneUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicTabbedPaneUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicTabbedPaneUI.java 2003-07-13 15:29:11.000000000 +0000 *************** *** 1,10 **** package javax.swing.plaf.basic; ! import javax.swing.*; ! import java.awt.*; ! import javax.swing.plaf.*; ! public class BasicTabbedPaneUI extends TabbedPaneUI { public static ComponentUI createUI(final JComponent c) { --- 1,55 ---- + /* BasicTabbedPaneUI.java + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.swing.plaf.basic; ! import java.awt.Component; ! import java.awt.Dimension; ! import java.awt.Insets; ! import java.awt.Rectangle; ! import javax.swing.JComponent; ! import javax.swing.JTabbedPane; ! import javax.swing.SwingConstants; ! import javax.swing.plaf.ComponentUI; ! import javax.swing.plaf.TabbedPaneUI; ! public class BasicTabbedPaneUI extends TabbedPaneUI ! implements SwingConstants { public static ComponentUI createUI(final JComponent c) { diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicTextUI.java gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicTextUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicTextUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicTextUI.java 2003-07-13 15:29:11.000000000 +0000 *************** *** 1,17 **** package javax.swing.plaf.basic; ! import javax.swing.text.*; ! import javax.swing.plaf.*; ! import java.awt.*; ! import javax.swing.*; public class BasicTextUI extends TextUI { int gap = 3; ! View view = new RootView(); Color textColor, disabledTextColor, normalBackgroundColor; EditorKit kit = new DefaultEditorKit(); class RootView extends View { RootView() --- 1,74 ---- + /* BasicTextUI.java + Copyright (C) 2002, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.swing.plaf.basic; ! import java.awt.Color; ! import java.awt.Dimension; ! import java.awt.Graphics; ! import java.awt.Point; ! import java.awt.Rectangle; ! import javax.swing.JComponent; ! import javax.swing.plaf.ComponentUI; ! import javax.swing.plaf.TextUI; ! import javax.swing.text.BadLocationException; ! import javax.swing.text.DefaultEditorKit; ! import javax.swing.text.EditorKit; ! import javax.swing.text.Element; ! import javax.swing.text.JTextComponent; ! import javax.swing.text.Position; ! import javax.swing.text.View; ! import javax.swing.text.ViewFactory; public class BasicTextUI extends TextUI + implements ViewFactory { int gap = 3; ! View view = null; // was: new RootView(); Color textColor, disabledTextColor, normalBackgroundColor; EditorKit kit = new DefaultEditorKit(); + /* ***************************************************************** + * This View is way too incomplete to be of any use. To avoid errors + * when compiling with the Sun JDK, it has been commented out. + * -- Sascha Brawer (brawer@dandelis.ch) + * + * (begin of commented out section) class RootView extends View { RootView() *************** public class BasicTextUI extends TextUI *** 30,35 **** --- 87,94 ---- } } } + * (end of commented out section) + *************************************************************** */ public BasicTextUI() { *************** public class BasicTextUI extends TextUI *** 90,95 **** --- 149,155 ---- Position.Bias b, int direction, Position.Bias[] biasRet) + throws BadLocationException { return 0; } *************** public class BasicTextUI extends TextUI *** 100,110 **** --- 160,172 ---- } public Rectangle modelToView(JTextComponent t, int pos) + throws BadLocationException { return modelToView(t, pos, null); } public Rectangle modelToView(JTextComponent t, int pos, Position.Bias bias) + throws BadLocationException { return null; } *************** public class BasicTextUI extends TextUI *** 118,126 **** { return 0; } - } - - - - --- 180,189 ---- { return 0; } + public View create (Element elem) + { + // subclasses have to implement this to get this functionality + return null; + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicToggleButtonUI.java gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicToggleButtonUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicToggleButtonUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicToggleButtonUI.java 2004-01-10 21:59:30.000000000 +0000 *************** *** 1,9 **** ! package javax.swing.plaf.basic; ! import javax.swing.*; ! import javax.swing.plaf.*; ! import java.awt.*; public class BasicToggleButtonUI extends BasicButtonUI { --- 1,49 ---- ! /* BasicToggleButtonUI.java ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. ! This file is part of GNU Classpath. + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package javax.swing.plaf.basic; + + import java.awt.Dimension; + import java.awt.Graphics; + import java.awt.Rectangle; + import javax.swing.AbstractButton; + import javax.swing.JComponent; + import javax.swing.plaf.ComponentUI; public class BasicToggleButtonUI extends BasicButtonUI { *************** public class BasicToggleButtonUI extends *** 20,33 **** public Dimension getPreferredSize(JComponent c) { AbstractButton b = (AbstractButton)c; ! Dimension d = BasicGraphicsUtils.getPreferredSize(b, ! gap, ! b.getText(), ! b.getIcon(), ! b.getVerticalAlignment(), ! b.getHorizontalAlignment(), ! b.getHorizontalTextPosition(), ! b.getVerticalTextPosition()); //System.out.println("^^^^^^^^^^^^^^^^^^^^^^ BASIC-PREF="+d + ",T="+b.text); return d; --- 60,66 ---- public Dimension getPreferredSize(JComponent c) { AbstractButton b = (AbstractButton)c; ! Dimension d = BasicGraphicsUtils.getPreferredButtonSize(b, gap); //System.out.println("^^^^^^^^^^^^^^^^^^^^^^ BASIC-PREF="+d + ",T="+b.text); return d; diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicTreeUI.java gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicTreeUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicTreeUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicTreeUI.java 2003-08-26 22:42:37.000000000 +0000 *************** *** 1,7 **** package javax.swing.plaf.basic; ! import javax.swing.plaf.*; ! public class BasicTreeUI extends TreeUI { } --- 1,236 ---- + /* BasicTreeUI.java + Copyright (C) 2002, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.swing.plaf.basic; ! import java.awt.Rectangle; ! import javax.swing.JTree; ! import javax.swing.plaf.TreeUI; ! import javax.swing.tree.TreePath; ! ! /** ! * A delegate providing the user interface for JTree ! * according to the Basic look and feel. The current implementation ! * of GNU Classpath does really work; it is just a stub that allows ! * compiling the code. ! * ! * @see javax.swing.JTree ! * ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ ! public class BasicTreeUI ! extends TreeUI { + /** + * Determines the geometric extent of the label that is + * drawn for a path. + * + * @param tree the JTree for which this delegate + * object provides the user interface. + * + * @param path the path whose label extent is requested. + * + * @return a rectangle enclosing the label, or null + * if path contains invalid nodes. + */ + public Rectangle getPathBounds(JTree tree, TreePath path) + { + return null; // FIXME: not implemented + } + + + /** + * Creates a TreePath for the specified row. + * + * @param tree the JTree for which this delegate + * object provides the user interface. + * + * @param row the index of the row, which should be a number + * in the range [0, getRowCount(tree) - 1]. + * + * @return a TreePath for the specified row, or + * null if row is outside + * the valid range. + */ + public TreePath getPathForRow(JTree tree, int row) + { + return null; // FIXME: not implemented + } + + + /** + * Determines in which row a TreePath is currently + * being displayed. + * + * @param tree the JTree for which this delegate + * object provides the user interface. + * + * @param path the path for which the caller wants to know + * in which row it is being displayed. + * + * @return a number in the range [0, getRowCount(tree) + * - 1] if the path is currently on display; + * -1 if the path is not shown to the + * user. + */ + public int getRowForPath(JTree tree, TreePath path) + { + return -1; // FIXME: not implemented + } + + + /** + * Counts how many rows are currently displayed. + * + * @param tree the JTree for which this delegate + * object provides the user interface. + * + * @return the number of visible rows. + */ + public int getRowCount(JTree tree) + { + return 0; // FIXME: not implemented + } + + + /** + * Finds the path that is closest to the specified position. + * + *

                [A screen shot of a JTree] + * + *

                As shown by the above illustration, the bounds of the + * closest path do not necessarily need to contain the passed + * location. + * + * @param tree the JTree for which this delegate + * object provides the user interface. + * + * @param x the horizontal location, relative to the origin + * of tree. + * + * @param y the vertical location, relative to the origin + * of tree. + * + * @return the closest path, or null if the + * tree is currenlty not displaying any paths at all. + */ + public TreePath getClosestPathForLocation(JTree tree, + int x, int y) + { + return null; // FIXME: not implemented + } + + + /** + * Determines whether the user is currently editing a tree cell. + * + * @param tree the JTree for which this delegate + * object provides the user interface. + * + * @see #getEditingPath + */ + public boolean isEditing(JTree tree) + { + return false; // FIXME: not implemented + } + + + /** + * Stops editing a tree cell, committing the entered value into the + * tree’s model. If no editing session is active, or if the + * active editor does not agree to stopping, nothing happens. In + * some look and feels, this action happens when the user has + * pressed the enter key. + * + * @param tree the JTree for which this delegate + * object provides the user interface. + * + * @return false if the editing still goes on because + * the cell editor has objected to stopping the session; + * true if editing has been stopped. + */ + public boolean stopEditing(JTree tree) + { + return true; // FIXME: not implemented + } + + + /** + * Cancels editing a tree cell, discarding any entered value. + * If no editing session is active, nothing happens. The cell + * editor is not given an opportunity to veto the canceling. + * In some look and feels, this action happens when the user has + * pressed the escape key. + * + * @param tree the JTree for which this delegate + * object provides the user interface. + */ + public void cancelEditing(JTree tree) + { + // FIXME: not implemented + } + + + /** + * Starts a session to edit a tree cell. If the cell editor + * rejects editing the cell, it will just be selected. + * + * @param tree the JTree for which this delegate + * object provides the user interface. + * + * @param path the cell to edit. + */ + public void startEditingAtPath(JTree tree, TreePath path) + { + // FIXME: not implemented + } + + + /** + * Retrieves the tree cell that is currently being edited. + * + * @return the currently edited path, or null + * if no editing session is currently active. + */ + public TreePath getEditingPath(JTree tree) + { + return null; // FIXME: not implemented + } } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicViewportUI.java gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicViewportUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/basic/BasicViewportUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/BasicViewportUI.java 2004-01-10 21:59:30.000000000 +0000 *************** *** 1,8 **** package javax.swing.plaf.basic; ! import javax.swing.plaf.*; ! import javax.swing.*; ! import java.awt.*; public class BasicViewportUI extends ViewportUI { --- 1,48 ---- + /* BasicViewportUI.java + Copyright (C) 2002, 2004 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.swing.plaf.basic; ! import java.awt.Dimension; ! import java.awt.Graphics; ! import javax.swing.JComponent; ! import javax.swing.plaf.ComponentUI; ! import javax.swing.plaf.ViewportUI; public class BasicViewportUI extends ViewportUI { diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicBorders-1.png gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicBorders-1.png *** gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicBorders-1.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicBorders-1.png 2003-06-24 09:48:42.000000000 +0000 *************** *** 0 **** --- 1,4 ---- + ‰PNG +  + IHDRxP]ù&ÞgAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ60°zéû%IDATxœíÜANÃ0@Áq/rôp2#à¸àG 3뤵ž¾¼p¢Œ9çÁ~O¿½€ÿBèˆÐ¡#BG„Ž:"tDèˆÐ¡#BGÆ×OïÆ[—òXVO=Ÿ—®¾®kéú¿ê<ÏÕ[l¡o´º‘ + :"tDèˆÐ¡#BG„Ž:"tDèÈÚ1é’óåÜ÷ã?ëz½vÿ…‰ŽlœèOó¸ë÷¯Ç=62Ñ¡#BG„Ž:"tDèˆÐ¡#BG„Ž:²ý˜4;‡¼s&:²q¢ƒçCÄDG„Ž:"tDèˆÐ¡#BG„Ž:"tDèˆ/ÐÜné#4 =?¬¯‡w ÍwØ£#BG„Ž:"tDèˆÐ¡#BG„Ž:òÞ!"Û& BWIEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicBorders-2.png gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicBorders-2.png *** gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicBorders-2.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicBorders-2.png 2003-06-24 09:48:43.000000000 +0000 *************** *** 0 **** --- 1,4 ---- + ‰PNG +  + IHDR,ÈݽKgAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ tsá¸IDATxœíÝQNÂ@EQÇ°/Xz»²j ýÍeÚsVð>zÊÇ0¶m{:ïõ8:BL„!ÄD1BL„!ÄD1BL„!ÄD1BL„!ÄD1BL„!ÄD1BL„!ÄD1BL„!ÄD1BL„óþ?ᣞÀ«˜÷1þtª ·/õ + xÖÄ'!ìÃÄ'!ìƒ!&Bˆ‰b"„˜!&Bˆ‰b"„˜!&Bˆ‰b"„˜!&Bˆ‰b"„˜!&Bˆ‰b"„˜!&Bˆ‰b"„˜!&Bˆ‰b"„˜!&Bˆ}Ìe-צ1é}IEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicBorders.ButtonBorder-1.png gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicBorders.ButtonBorder-1.png *** gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicBorders.ButtonBorder-1.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicBorders.ButtonBorder-1.png 2003-06-19 10:48:46.000000000 +0000 *************** *** 0 **** --- 1,6 ---- + ‰PNG +  + IHDR,ª˜åSgAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ28'¥PZIDATxœíÝÏKT]Çñ¹*ˆh¡.ÌÀ "pW´Q ÃEààVpå¶ÕÒ‹B¨u;‚Ëv*ˆ b‚¡¿À4ôùâ%‘G{æú8ÞÏ=ó}¿Vã0É9qÞs®w~Üèôô4@§F=À;"Ĉ#B@Œ1"Ĉ#B@Œ1"Ĉ#B@Œ1"Ĉ#B@Œ1"Ĉ#B@Œ1"Ĉ#B@Œ1"Ĉ#B@,Êþa¢(RËþ + ¯S ‘ÙÙYõ¤žžõÊãp#BT¹ìÿ9C„€bDˆ! F„€bDˆ! F„€bDˆ! F„€bDˆ! F„€bDˆ! F„€ba|ùoåóyõ®'Š¢›|÷qpß›Ä×õV–»M¡PP!©Š$вî)£"8Ĉ#B@Œ1'fðß&&&jkkïÞ½Û××÷ìÙ³Ëùøñcÿ“'OÒ^õ!ÂD\­ËÅÅÅGÍÏÏ¿}ûvzzúÎ;ÿzÌÇþö¦¦¦ì¿èéÓ§·<Ò*Ááh"¶.mQæóùß¿Ûº<::ºü˜²ërccã6ÇXI===ccc¥RÉæn÷,,,ìïﯬ¬ÌÍÍÙ÷ï߯¯¯?¿ssÓZÝÛÛ³{lšvûÛ™ì_%7 Ø “Š×åË—/ß¼ycëÒnÛú{üøñööv±Xìî.íþÃÃÃõõu{|kkk¼.wvv¶¶¶l·Ìþób?~ü8>>¶Íßnþü¹­­íäääÕ«WñÃÃÃ<°Öa{{»Ý¶iÚ!ƒý«_¿~íîîZ„¡LVˆ¯Çɺ\]]ýþý»=›¼~ýº««+¾³¥¥ettôÊÇúô©¦¦fmmmyyÙŽìùÈž¤âÿ”E„I¹Z—?þ´Ñ 577Ÿßùüùó+l“²™ÚÆÆF{®IiˆU„“rµ.혹··W= + /ˆ0)Öer÷îݳ?€Õ£gGSâj]ÎÌÌŒŒŒ¨v”غ_ZZšœœT¥Œ©©©Ëw~ýúõÊ/ÞÿåË—øÆ‹/ì—‹Å[cU!ÂDX—×UWW×ÔÔ¤Eˆ0=A¬Ë+?|èóc~©!Âò\­ËjW–ay¬KÜ*ÎŽbDˆy<õvxém¾Áqaöß<]Y}Õš[î"d[@Öð7! F„€bDˆ! F„€bDˆ! F„€bîÞ;âšoò~Woó ‘»M@W)©Èg>Þ¿ó_’š°F[#4…BA=„ò*¸!„²zÛcüMˆ! F„€bNOÌ\—«kÖçüÍW‹0o׬÷6_-"L*¾fýØØX©T²5š;»6ýþþþÊÊÊÜÜœýxñšõvÿæææôôôÞÞžÝ_³þÛ™P^¥ô6_!G¯ÇÉ5ëÏy›¯&åêšõ9ó"¤\]³>ço¾BD˜”·kÖ{›¯'fRâêšõ9ó½ "LÉàààÌÌÌÈȈz )ñ6ß›ˆ²9Š¢Ê~žÀ¦,ùE©T*‹É¯˜m³Ž?×sÃÏÚ/‘|ŠâºóÍý™rÅ?>’ñEÎN˜ž ®Y_AÞæû¿qb¦Ÿ×ÆÀýôUQ®g|úöÊ•+ú0®*8/Â=£N¸¹ª+}ssS-wk¶HÂÝ} + ë ÊÕú¶m—ËeÏo¡÷ßh]^^Vy·ÛµV¼¼}ûÖšðRÑ2îS¼T*äóùB¡  ït:­VKá¾¾¾nqßóÏ@ûLLL‹Åv»m%:PßÖëõ8~§F¸gÂôôt­V³3ýýJùp‰Â]ibÃäwvvh¼iA¸gÂöövµZU:÷ÿÈÆÒ„S{eeEmy5óÕÀ×Wïïœf³9¶ + 8'Â=+vwwâÖ'ëú÷Áκ6„¿|„;8ˆÑ2à ÂD¸gÎÖÖV.—»yófÜ0B„;8ˆpîà ÂD¸€ƒwpá"ÜÀA„{†=þ|_ÛïÞ½Óv·Û»RF‚‰Ã2äýû÷_~ùe8Ð?~|çÎøj`Th¹gÈÅ‹ïß¿|;55uûöíë`t÷lQš+Óm[A¯¸µ:F…pÏ– ñN³pÛ…¸+€1Éår¶ñìÙ3%»"þÅ‹ׯ_·VèÁ=0 7T³Báü­·¶¶æææè“Išðßè“Úíö·ß~ËÇ!ܳ‚£þŸ + «·ýÀÖÖÖÍ›7¿ûî»?þøcôõB*1Z&[¢Œ– æÄ°(¯‡5Zˆˆnp-w FΰðI± å"ÜÀAtËdË_kD|ìß?GE2ç¯;¨=¸ƒŠQ"ܳ%Êh™±V(3-ƒ1£[D¸écóA^½z5îŠ ¹è–ÒçÆÏž=‹»H4Zîà æÉŠèsËDŸáQpæ ºe²…Ñ2qa´ ÆŒn eææævwwm[ú6Þú ™h¹©ÑjµÖÖÖ¶··Ëår>ŸWÉááaô@ᤘ"¾V«ÅXÕÕÕˆ{öÔ³§‡ðýU# + ÂH%ßÊÊŠ¾NMMÅ]ÄÑgš¹¹¹v»],#bZ:d„ÕŠ áž-Ì-—!Î-S©TZ­ÖááaP¢¸?k½à,Â=[-—!Ž–)•Jj¢†K²U«U]ç<ÿ3M½^·òµµ5"m¨Då»»»ÚMg,ŸÏÛn:ÐΡøÚ¶»áÝ–——uJ†J666ÊåòÂÂÂúúz¡PÐg&mÄ÷{GÅh e@J¨!q×(-ŸrVgCŠ`+ïv»*T+š=ÿ®€‚[%Šlåµ…¸•ÌÏÏ·£÷ + úv»]«Õtˆ^Piîù¡¿··§Ä×ËÚ·:*ž_ø”w eÔÞ´ÆfÆÙIP¿zõJI­V¹•+uŠÁÖs¥5›M…ò“'O<¿½¯àÖÎÊîJ¥233ãù‘­ì¶­psssʧK©~ª}µLÑ;ôãE· v÷OñT.—×ÖÖ‚r'ï~’Zù®ÈVæªI®PئÖISp/..ê§AwÖgŸ}fÁˆÒ`Û6¬D9n¯¯3¬¯>TʧåVvü-÷Bâþk =ii<ŽT©TªV«jnïììXËzàn + e5ÒWVVÔÀ·í¬K£="4ÆuV•ÝžßŠW¡]'fggíeg|ÖM?–_nÑrï¹;”YcøwÃh™¸ e´L6[èÇQ¬«U>11áù¼f³9p75ð>ûÿ¥Lמv Ž + šáõz]— + k`iOëäÑUA’´ö´ë‡â~¿Û0Ä?q˜Î&ánôOjtŽœ?}U”Ñ29¦¯*;óQFËD<óýó Ø£LÖ}vXÏFù¼Û¿ÏÀ®-Çú»âïsp*Ê z½¾ãÓ†¾Õ†ŸOÀ#Ü”±NÛ¶±zi¿q¢[H™b±X.—mÔv«ÕÒ·FÙžb Kü=¼ÜP X߈þ"Ñ{ó¹¡:\C?ó6ÎÝÈ\XX¨×ëöм=Q Â=AÆ¿¡–¢ [H ¥»Ýî + ãõ ú“w=•ìiUœ` b86Òî@jÔjµ©©©xWçH¦•••ÕÕÕO^äNøÞjµÊå²m+ÜõS¥¼.Z:ÏѧیXqb´ J…»-Öáùýx + £lÎ÷;,ÝnWÉ®W.ïììè[›KÒ„;2jiNOO«hSYeyl›0@gcooÏJlÅpNLLXLëâ§oõ5|¢´›vh46‘¯±fûòò²}«×Ô+ëX{»ms@ÙüÀ+ÞMÖá£í ½—UÌ´Ñ¡[&[˜[&.C\‰I±^©Tl^C%‘‚&x`5St‘S:×ëu}š úU‚ÙÛõUÛ‹‹‹VþäÉ“`ÛVù°)m±ŽUŸJæç烩ƒõ + zñÍÍM½‹ŽÕ¥Tïho§s>;;«û+ WVŽÛjVØl6µƒM@fóMZâztáž-¬Ä—!®Ä¤`0{­DxɽìX[[Ó%MíùÙ­œõüÙÛ•­áÙÛmg•+Xí¤YƒÚfa³ç{õH?Úð)Í-šè:½ÚÁ5Ô‹EÛÁ^YýÐ6Y¼êX…»Mìùl‚x}=n¦³a¡[H„š‡¯|Ê)ÇÆxœJ0íW0?ûÜÜœõ¢ôÌíž ̶m·®Ï¦s888P(+:õ°Ž·o߆_¹¿ + ý`[vuQ3_i®|׆‚Þæ¦åÞ+-ƒâkµš]«áR‹¯T*ÙÚ¡öm6fÒ%Í–Í›šš + –.Q>¨)­ >ᾨΘö× ÔRí¯ ¤J‚Þ˜ãærÐgýH— ýV@‘­mkÎkÃÜçhÏååe]ôÖ'Oc9é w/ ˧å + „4R.t:(Sݺ͢¹P(xþy°ÂþÙÛ;Ö–½n·ÛJí²Ïó[âÇMš¿¸¸hwJí••Ñ+ B]zífi0nU6y§¾ZŸû¦ŸLe¸{‰Š6;FGí>5Kñ•ðÿ#bÝå=sµ« ®—Ø2L¶^2!˜!Y‡¨=n7<ƒÌ v b îë¯@øÒNpíiK¾sÿöŸ–¾é´³þT±WûdÖ¹vÚˆgn' ýÌ«U¨( ÷ü&ÿ³,Æ/­-wœ £eâ2ÄÑ2ž¿&œKËJ`w 5‚á=‹ÛôèG¸©~Æ2Ü™Iúî@j7èG¸©A÷ ¢#ܳ…¹eâ2Ĺe%ú°ÙÙÙð·=w˜O0àÔ!Â=[-—᎖wÌäì'Ï«n7-zz·‚©ÛO˜Ã}à{u»ÝV«µ´´”ÌÊ w }Þ½{·¿¿ùòå«W¯Æ]—dQÔž¹óJÙ}ª˜V¸ëB¢·Kf¸3q>OŸ>½~ýúÝ»wã®HüÖÖÖ&|6ÙŽ¾ZóüððÐ&v××B¡ 4 + —÷LN ’àEì5m¾``RÏ{Ùkêk2§!ܤ˜šÏëëëj;÷̦\¶‰Ýçççmj£íÅÅÅz½nó³÷¿ vб 6)ü 辰¯Éœ•“pbµZ­X,*Á{šáÁ¼ê•J%¾ÚYå6kãÀiÅlÒG{¸g¹Úž÷ + ¦šIæÜmô¹g £eââêh$áž-Œ–‰ £eÆLmöV«5;;Ûívwww£ßeµÙªÕêââbÏ4ÙD¾ l¼§2ÜmM“¸k ¹êõz¹\.•JŠõSõ‰kg«XßØØPÐ÷t»‡ÙL¿º è>_–¾pïéMá™ÖW|á 5çççÛí¶Zî…BÁÂ7<Â=8¶gCûÛ + «¶œ¡çO¯íþ÷R²w:‘ÿžg•¾p§Í$GÏs§Ñú¹S%rÕgÛÑ…Šl…LÐ!³´´”ÌÁ0Ÿ”¾pÇxØÂ@J-,,¨µÞ³¾RDj¶ë@µßÃK,¥áž-QFË0ì(0ZfüÔ`?sWxJ[ëa„{¶ô–éÅAÉxJ-ƒ‘â!&pá¢[ÀÙE¿ñÞ{/§§WêtX -wçò!‚Q¼ïöö¶MÙl ÜÍ&jï?6˜·]? ¶Ã/.?î­¾ÑÀw Ìùz + [¾ã9ZîÙÒ?Z¦%ã)9[ƒôèèèåË—ûûûž?«ûóçÏ'''Ó;\o(fff왣è‡(—WWWËnsÚéÝg˜S~mmÍ<ÃÛ‡pϘþ”$§$‚ .ܺu«ÛízÏêþøñ㌇ûîîn°LRµZm4:!ÊúàCCP¾¾¾~xxhÏ(©}}§ + ½¦-̤6µ= eóÕ¹*‘K¥’çOuÎeíc«Aé´ƒ.$ª˜¶óù¼ksÊ[¹ê£ŠÙ‡û-†uZè–ÒäâÅ‹÷ïß¾UZݾ};Æú$JÃW÷õ÷Ò±®Ü·,’T…9_‡IôéÝûEœSÞ‚µ9mÎõûŒpRFi4ÕôŠûX«“ ›››ŠÈJ¥¢,îéâPnªP?µô•+W¼Ð“«Ú¹íë×èÓ»÷‹8§¼þšyßpŸœ¢[Hk¼ÿý÷4Û‡EYŸÀiω–;>Öx§ÙÞÃz?†šÌQŸDYûTínÏï²·{°§ªõÑ«2ªÒ S5á?¹Ï©ÐrϘþ»v”$§$2eú/¿üÒßAœq•JeooOA¬+ŸZâÖ£2-¯¡øÉašÑ§wï}NùÙÙY[!dˆ7TOºY<Ì>ØcDÎsZÄþ_òTõ“y·¾lEª‚øàà 껣Ûíªõmýõ6äfgg'bç¸T{\õ æ”___?g}N!Êc0¾_8ñ8Ï7Ònët:áQ¡Ífs(/îŽ_ZZŠ~ ¢Åßr€!²žôá®kzæé݃žôñß°%ÜÀAŒ–îà ÂD¸€ƒwpá"Ü‘2² Í V´9yuÀyÌ-ƒ”9yÎëQ¬h¤-÷ìÚÜܼ~ýúëׯã®È¥R©P(xþrj€7ÃÃCÛ¨ú<ÿ¡ÁééiK%¨ñn³‹M{eý„oè Tž‡Î¹Î¼ÎÜËh¹g‘båÁƒÏŸÿµªçÞÞÞäädÜ5òzŸŸW¬{~‚çóùW¯^Ù3Ü A&ê`ë–YkÝóìöSµîmý[+Ç®áæüû÷ï_¼x1ž_­ß›7otòõ»\»víÞ½{úe㪠\6Ήl»ßÿ]÷?ºîܹ®g§Óñþ^­è«ÕjJÿþ,Nb?Rp«ÄfþÓÁOµa;諶mðëÿùçŸqþ¶Ó_D—1ý @fÐrÏåÈ7^¾|yttd%_ýu|è™Éfh²µÍsssj¤Û² a63Ô懺páBŒ¹ðç†K—.é/’Ì+.RpÏ–Ï?ÿüÑ£G÷îÝ{ðàÁ¯¿þªˆßÚÚRaÜõÀ[°…ƒ=ôK³Ù ~j…>ÔnF#|`”m&''Ÿ={6‚ZGòúõë/¾øB±þÃ?èo‘Ìó´ã†jYÄw:üQmظ«3˜­;l·ª¯íð¤©*TÖ+ýs¹\Ðçîù+Ú(Ù[>!tÎuæuþõW Ù1"Lù‹ëúÜ[Ú8?ÂD· 8ˆpîà ÂD¸€ƒwpá"ÜÀA„;8ˆpîà ÂD¸€ƒwpá"ÜÀA„;8ˆpîà ÂD¸€ƒwpá"ÜÀA„;8ˆpîà ÂD¸€ƒwpá"ÜÀA„;8ˆpîà ÂD¸€ƒwpá"ÜÀAÿM@í¼í¼NÙIEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicBorders.MarginBorder-1.png gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicBorders.MarginBorder-1.png *** gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicBorders.MarginBorder-1.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicBorders.MarginBorder-1.png 2003-06-19 10:48:46.000000000 +0000 *************** *** 0 **** --- 1,58 ---- + ‰PNG +  + IHDREÈðOd¸gAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ ѱ8 IDATxœì]{lÇ}Þ×ÝÞ‹ä‘¢¨E‘¶,¿ɉ­¸vcÉ)b×N Ó M#©HÔ(` -Š¶¨+ nãþ“J +  ‚* ìHª›Ô6\[rl+qlK²ümÙ"õ)’GÞsßýn~ähywd¤ãÝ‘wš‡ÅìììÌìÎ|óý~3sw²çy’€€@C@™é + T ‚ÏÁgÆà³€@ã@ðY@ q ø, Ð8|h> 4Ÿ‚ÏÁgÆà³€@ã@ðY@ q ø, Ð8|h> 4Ÿ‚ÏÁgÆà³€@ã@ðY@ q Wð÷=eY®TVW*ÂDmúYø!~ýw + †©ëÁ™®…ÀlD¥´PØÛµÃßûÙÙsgº ÁçLþÕóø“½3]F†às&Û¶óü‹o‰(‰Š˜Ü‚ϵ8 &#J ‰¨Ÿkg + ‰¨Ÿ«.Î!ÑÕƒàsÕág‚h*Að¹º(g‚h*Að¹º(g‚hj@ð¹Š()Î!ÑÕ€às1™8*(Ñ[·n­àæyd… Ë«Æþýûy}x•I§tõJA·OqïÞ½{W¯^H$zzzŠ“ý”¡Œrë‚ÏÕB:=yêÂ×/Á§kñ<†)òºk;Ÿ›D½ëÛ¶m+ âÇËÎvùòå/¿ü2Ž%¯‚Æ7nܲe ŠxôÑG.H°›¡ìÒë ^åPÙÜ ¯ÿöÝðôydÓ÷&K6<<¼víZ¼FtÍM›6!ý§6lˆ3ìÚµ«d2ôfzù¸„ÄÔ²à‘{öìéîîF Ž#ùP HrèÐ!ÄàH1ÈGdè¯ÒS(sÔª¸«V­¢r·0 €Ê)é*ÝÈkˆxœÒ3"dU²,JÀocûöí¨9ÕóĉH@ÏH šPeè”FœÒƒSzjäC‘µG¥È(ôyaóæÍ2tGôÑ;vp+±··—8IâÓ¡/ú“Ñ%Ÿ{À)"qIº2bbС)fݺuHƒ#ˆÜÔêðáÃHî!O„'«*#§ë½÷Þ{àÀ‰é3ÂIÖ/S y冺–,«ocß¾}|(éf B ¨Ìr”ˆ²`Aà¥ÑcÒƒpJovûå·×,„àó,:zú1º,ú%·ÑÑe׬YÓ¡›¢ÓCUÐ yo–+è€N%&¡`ÔÎ;ׯ_ôD¡%K– ¥ ,¸»8R)DK?(Ä“ÞNVU²‡‘-é¼Ä4E ØÂ+‰:CJŒHüQ’e àm ʯ¢tÿ@€SsT%∠+ Pæ¨9OÉKD}Êsòg Ÿg)Ö3Lvµ¥¥…è…œ?£¿„±&n@V¬XÑ××ÇÓƒ ¸D9!Z†£;YU‰áGü#H á„$LÇÁ¾LàmðR(ÀG“²Ÿ}¶Aðy@ƒ€@Za4B@&K©AJÈ‹,Ë~{² ©L0 €S¤éé鑘W ‡“÷ip˜&±Q'Ž0žyn4_M~2ئ®* &U„äú§²E[¼þÅeM ä†ÑŸ¢VTŸl§H¼Œ d/Ðâz| ¡§¦70ÙÄ[}`ú.8Ges«wärÆûÇzéóÔÓÿÇçþù—ÿÂãÏœðßÂ'¥$ÖMOœ8Á§‚<ߤyz”ŒOóÐ¥‚hv‡;´<=MÿhÊ + T§SêÍÉ _ÁUqU½ñ)1>Æ ÂP„D‰ÉeàÏX²¬‚ù°‚·PgºwxxXŸã•ç“s¸Ê ̧Óè*ç0EÖ•"c…?¬‚¹Õ;lÛYûõœz…ùñǾõÐwD’ªømÔbà_-Ρ—ÁŸžbhÉS\."a@9q/”R2S>—SÕbB–¬ùeMÜ + ÷â.bõ¥“†Ó˜‡!€~K³ ~祖 µúéÓGð¹Šøås{ü'“]]¸ }ïÏ¿«ij-«TàñrÛ²É5v–”NÂ䆰ƒØÐ[¿=r9÷ŸËªlÅ ø\˜Z¢KŠó¬ÉZm¬Œ²0Ð|û• “Y%5†às}`2‰®#q¨*Åg1¿]]ÜÿGw‚ºÅñõ­µ‚̇àsuÒ‚º‘`8x>#õhl>WÅ-ÄY J|®: + $Zˆ³@õ ø\ ø%Zˆ³@õ ø\ p‰â,PU>×$ÑBœª + ±þ\;|ã½;n¿AðY b?‰€@ã R|®ðÿ?_%¸jÿ¹^Œ×³‚ÏeâéÛ;¦NàNœœpÙQ)JSY|oÙàùø%«áOV²tD~ííþJTJ Š|® + ˆ6¶ç)²ì²£ÄH¢ÊcTqOly—nñçP)Jü™«ÌÎÈsØKàúL¸E(s=@ð¹*P™)¬É²"Kƒ¦ JœÈÚ†ëÎ9¸êxRÂrçéê—ÚÃY + (rL• k¦Ii¿û™©ÉyöŽÚnÎõ†,7$˨Ls@AéMš‚Á… 1b ן«‚<AãüQ:“s†-ç™s™;Â7D×›TOemhöu­;±Ü“9Ûr½e±À¢n[Ó#‘ àL¦ÊÀ(è7Ýß%Œ_çVÆõE!µU×LOú¯3)¤¹½Y_5'$1›¢8OÙ1¿]ð¤SøÏèúà$äwØr¥Ìˆ¦D9¨ÈLD:4jŽØ.N¿Ð½Ÿ>—>k8ºúHw³ézÐÌŽ ÚÖtyŒBξQ.ËT N씓Wã.fG˜Q²ÝcikIH»­9ø~Òì + kK£ß$Œˆ*ßÕ¢/ + kd_øiü§‡®’ö­=ÄzÕL¢$Ÿy×AŒS9ç–X ª)Ïög^ÊÝ ¼5búÓß À?’¼¹¢%¸¢)ˆÈS9ðÑŒó룘vv7‰³éyiÛû4cõemXòMªòQÆza ëO¹@W#Š|ssðÕ¡HþŹa(vX‘Ÿ:›¾¯=tWkÈö&´çŸ|®ÄzÕìŸ@‚wzÞpšwÆu0óãô‹ìqºo¹.Þo8½Y»5 ¼:l|cQlYTûÕ@Ôzi0÷Έù·×¶tEBH Ž}š¶Àç+ª†4V 9å8M ¼¨ÏáÜÑѱcU[Rض]O˜ÙõÁçÊ€\VvQX›Pz3ö ã¼éÜPÃs8g8ßéj‚ç¿zNHl7¯#ç¨|¸¾OP‘?LYÍå³MA¹ßr`ß~¹#²0¤Z®÷qÆ:ž¶noÞ×êk†—W]ÿí8µ½±e*kü*ò̯K³müp}²;ñ”/wCM飌ÇlÚG‹}€ù #➶Њæ ,óŸJÂ.x´»™?ÚB]ÕUye\3aÀ>¯ék˜ŸË‡{iLjt&k¿=jÞ ËXIæBÃeÍ9à•Ô¢*OŸKßßî‰hDZEšð™'ËÖ™ÞMšÏ^Èü²?ûlöXÚ’Ø̹Û¯€B»V&.;»ùùR‰’ØË8±3¶ÛT@ìË] , kkpûYÃ9“u`“e2îú + ˜ÍövùPÆg‰`‘¾0˜½…­?A S¶ÛT½¨tp(§:›è*ß%2ÙÆ/Úz>ç¼–0:™óÌYô^Òze07'¨þa«ãÜ S\–A~̃–”e-zCZ›5%¯ùîlá$—Øt¼Ûš‚´‡?L[°Àáê÷fmЗÞ5^}u0—´Ü&x ~yUàó´@´ì7óûC q`WOX˽,sŽƒqÊüí®¦®šu=Îÿ’dƽ£V~G¿á,hð¥AèÏHÒ…œ“v½QÛ(ùués7Ç·4¡À|zœÒÖ®eÑTÒzG‹~Át>׬w†UòÒùl–;¾È韯v<ï¡y‘W†r'³ö}m!gsÆ‹´=v†!mð˜ý|.Üq‹.Zø17¨žËÙ×;o8­šJ¼—4áB“2+S.ùhl[(Hµ²E¿­9gûTÖþíˆñúròd­¼— à©séÛ=–²@B‰¦ë}ÄÂ×DpzáÌc|ùã¹a¿÷ˉ팳Óa„oÑdÈòßô4#ú›âŽ$MAÅ••ëõê?oݺµ‚‹¢ÈŠþ<µ 0”îlÑA3ÐdþÙéÔá¤ùëÁ\ÛVVdw¢·ìwGù”ý³÷ÄõîˆÖ›±ÿù£Äß8¼ç|Œ + ©—nù¿O ™ù»_È™%FËÞñ0äúxÆ>4j6©òúF‡ GÍïÇ–øÇöŠêàI·Æ'³Îÿdš†GÝÎ6“üôTêFæD°ë†ÕÓiÍT¶›ÕõÊç‡òé¹l'‰uëÖalmmݼy³ÄþX §7nle ?+/NæωepŠÈ½{÷öôô G„ƒ|(fÅŠô¥ôGçˆ)ÈðJÁvYÉôI-éäׄàâ‚ ¥-ð¹ä—¥\ßÈ|w\?³÷œOïÊ%íßOή…ú¤ËÃ÷'û’·6ßOYð´iÌ æ¹Ó)Åà)îŽç×ÒžødÚþ½£û³žnˆhíºö(n²Õ«W#Œ#"q¤¶.NÆQÜ Š{KÉ®…ÝuäÈ‘š?÷´0Ã|Æ‹÷ìÙ³}ûö;v{%ö¯ˆìîîÆK÷'Û²e‹?]BSía@€šw-_¾œþ÷1È 1«V­¢´Òàˆ0b¨[\)¸½ + öµ1ReN,ÜÚÿЖØ욦Èx–´ãáÙp§W[«³d“Il^¿~=z úz‚?™ÄÚÔŸNéŽÓŸKÔß Sж3ð®­Ìð|ÞÞ5 «`ïîÝ»ÁX„qDüš5kè’mÚ´iíÚüOXƒ¨ôÏÝ”šdÆ téÀˆßµkzµÚ—(ñ’%Kè?»q„_DCJA†þâ2Á7lg]o~P[àëIšŠ'}¶%8hºmð~À¿,L7‚HAE~kÄH;n‹§|÷x9cJ»®~ÌÖ¥1¦å<½Ÿ¹)Nþ±¥q¨.cÉ™ ë:¨ÊŸf¬¥ ·c|Ad“–Ÿ®_Þü$mc¤¨½ï\Üdü¿ãéïià¦d Z­‰6å9 Ó%jbÄиoÛ¶ ù =ú þ(±>†þ&±n×òÁ§‰Yä?¯g˜ìjKK ðöý uå— ±ÅLãZfX__O.‚K”µ.˘Vò+ÌaU^ Ü MYàp+³Tó¿ À Hå'Ø=6õmç×·Ê~C€¿ÉJ‚Z üãL=ÁßĈÁX@ƒ8F(v«Å{ ï¼kÕ f˜Ïñ–1âEc,ô¯ÉöíÛ‡”GáØøåC,ÆTr„À)9Ƹ„–ƒV#ž·7M{¢ dˆÀÎ;q,{¦w –¾Ÿ|ÁpÞJä¿& çùQó¼é,‹@!U¾Dciü§K ×K:ù]Y?<™œ,ÿ¹b—Ö›0F¬ŒëOÞ2çßojƒ–bì¥ïn }u~ä1XøôÅÌÎRõ³2?:™ìÍØg,mlŠkìôù訹8¤gR?— qöEË ,#1jíxµÞF äo²)’Q?©Ý d²QãÒ1ÄaŒ‡¢ÿ/îˆÛé?åI®ë3loƒoxÅ­­­k<œ–¤4¬&žŒ,.¾ ¶ñç€S´lf ô¸]bN5yã”eÑÔõ‰20þ [ùµ"ø¨A‚ ÄÁ>ÍÚ-šÒ¤)Yö½e|&z.k;’ôÖ¨ùÔÙ ÓÔÐX¨ú½sBóu7ÆJ^umRiyÞ5‘@H‘6(|³3†{Ÿ»˜…—~&k“ãý×Kš¯`綎§¬®ˆ6b¹¯ åŽ/)ÿwÆ•#0 :C—h¸Ö1Uù~ï(ÍÛeܼÌG‡¤LÇõ¸¼÷3€{à˜¿ÉJêóZJ†QmÊ/‘ÍÌ»ˆA>«W¯¦ÞBé‘mA$g f4>^ÔfÅï“p×hŠ4$Îä ]N½ þôÓÍà™ºÜ’ ß'!>k²ôøñÄ#]ÍQM1Ýÿéϼš0@¤{âúÊV½+¤AâæŽk&È <8l@uý³_÷Í m\ &Žm´¦m*.[¬‚gŽ±:í°}ÔÛÈ©3#ù¥‹¹w’æY#¿2ßnÞ^€õþnÒ\ÞÔÕü·©‡M÷Ò¯t`HßÚœPplÖ”ƒ £'¬½<˜ûˆ‰3YžT`~ß ä‡$UùLsÐô<Å“ý`¨Æ_œ,n²’ -EC»N%s ÞâO_ÜÈoŸºÜ + BüÞÐL‚ÿÞíy~ {}40?¤ÌýˆÙÏ°ZØ.èÍ=Í$­žˆö¹¸r~˜¶ §þY«‡æ†ìˆ4iùæä604ühÒCÛBNN$ó†ÎØŸwÆ`WûZU‘šÿöÉÈ›#i8(ãlÇaN0ÿ}Œ³¦ º}GJûîhÞQG)wlxç‰Ñüo9Þ±”E[A=YZ;?:GSh·Ù°å¾ž0ŠÉ 02ÃÆ™Q-?F³r‘ë‚ÏÿÏÞµÇUçûÞ÷®V’%K²%üƒŸ‚šWœØ B0Ø&Å„ )i=ÐqL;PÓNÓ m``Ò!“v’ؤ…†Ô4…ðŠÍ`0Ûà·å‡l=W»wï«ß9ÿîÕÕ®´–%íjWñ?;;wïž{ÏÙýïwþÇùÿÿŒÈKLYÇ~î³ÆV7…o¬¾×Ý_⯣ðXÚ:”2¡oô€ùºúàÕ“)’¹gÆÆvþùÓ®ë'¯¨fîñ/L + œÜ‹Æ|Wx¡ßFŸÜà“Süã¾>f½ÿã¬*ÈὬkÕx_Z€NžÎ¢øŠÉ¬JIœ{¼Út wðºÎfðlç:MNX6$<ú5Xwìò³ñaAgó1FETë£É¯ÔiæÁ¤9Å/ÃZžP¶v§C²±Ù¦g²) ‡Ÿ2úÄáWÕ20{Ó®NÿüHbvXmÂv íWÔ-–ÂeaÖð‹â«© Âj½Æ °Y²ˆè4 ù/ + ?>Är­ýrÊa66Æ`ێħ|‘¥¥5×N¥:øH0Ë@òÓ¨–Vû“¶ƒ~aWãn°f…Ôˆ"él„N©£IÎÒH©Låó¾}û(äCàQ~ßG_Qˆüˆ£äOa¿nÝ:´Ù¶m[</:– ‡ÎJ­ÏUû€á¶ †pyÜ·~FlATC7Ál6…Ì +kü:Ïßp²ÑÔt§„ÅárܓضqãF÷æÞI$Ÿ\ÿ¶ãdÊÙZŽS$=´S¬ÊG·iL™‹â¾?oÝÝ]?³ + êñÍ!Ú Ç›AD›Qš¬’‰ òó¯È/ðÍ4(ÌtË”ðô€bf¥7«%ÈÕiŒçªÿ›§twÏ×:RzÖ$ÈdJÚ4ø›Cš$brÁH|܉m±¼hg~Tƒ¹.ð\±Lê•Xºd À)'C†R# Á#0<¢r¢'~Àt—whŒgÝ ÇtüÅI 1¿¯ÂкÃp\è]Ž¦§±HÿÃh¨Ôx~á…(p+Ívø_Ü ; + — ÆÞ° + Cï¢?Et⯧Úå Îãæù}åx†o©;âË3:ÈIÁó’‹d·N°1/¢îI0ßXLeeë/±P½ç…Yý ´f›#ëÃYß5;#fQ„¯ê}òòI¿n‰.æînüg€ÉYâr˜Ü­Q>®n AÛOØý#$þ/Šj†ý½½Ý0ÅßíNS pJÀ0y}¡ä9UøóÁ>ÊÃq± + ½\ P"JÂÁ{'ïDO—{Ÿ |»wïÞ P˜°û`à1ÀÍñ¼å÷•C”Éã&àóÆ–´´´x0Æ‘ÊοMÿrþypéÎÁŸÑÁüéнóå(í¨á‹d";ëÙ‚ ›Õ>êMG "hì2mÀ*Uê3Kã¾övÕíœu (Û‡S,ʹEeñ5Æó;]:n œ7øäUf%’ãésá»®˜ÄÌ!óèÑOF“_v¸òìöe±:¡"”jhòóÂ<›G^²[à·*CöNƒ~…gƒbøÝ'‡r —xqXqùgJ%’Ï®¿šR ¡Ã@![ÅhÑǘÝÙ”´k:«p >ym$|Ä$Š ½T.å÷U˜ˆñnt0T¯WâÙ€Šy!YNö&Íç÷Ó­©~…òŸ E³Íåd)måÊL¯Z üãKÒ"ÈcRXó-ˆhAY„ø•Ñààd+IÜÅåâ´J yQLk×-€³Æ'û¹5î34yÝq¦TX‡u`6]½Ú‡¸òWƒ¿˜…¡ƒ§®’’%(–,v« Ävï€kÁâœCàʾÊw\ ÚWa"5ÁýØÕÕUž¡Ý¥Ã3¹)‘…¢äi6¥°xðƒœ²'[m\¶‘Šåƒ®>®¸šåØBù}&ôH + },UžSÑ^Ⱥµ.¢!f¿P¸¹)UYŒô–îô®„Û9…yd…!Éá{bDTiFP1œþª×¶@»½KPÚ/ˆ¨A¾»&Q„  xêlãœa;1YšÓ¦Hé÷z #ëšvG(rk¹Z•í?#p=¿ô©‘®¿šdÙÒW”9ÓÚÚÇñ„ö ‘K¶´{œÉy0È©‰«ènùFr~_½¯TýâIDAT…‰dƒ{Ÿ»¯|¨ÔñÛdçP²8Ћÿ¨££C8]ºEá7?T_‚óL/¯O`T`|~3üÒͯ„Ü5¯òÌv¨ÈnŒ~Ê´ëÖž>sIÜâ+Ò^…–ÿØ©oëNC›¸,î7 + .2—Ï®#Ú-U>}‘rS + §77sôT©x&ÊOX+i_”hI2!¿AßÑÝ¡†s0¯6ç¼=ÐC&p$‹Ù•änÃ~£S¿ª6àµpú+ær0J™0e›J¯eûó¤e¾@–%OÖ‘¶¦@:'– †÷ÖN½Ïf«PPÎ!®·ñ-xþ¬Ê×âWj5 6ø{»éÖšæÈŒ zZ<§NöÅ ´%åg¹–U_äf§…î±}t+Ï•Nø¥„ç¡ÜÔNV‹Y0¿t"yI•oZP±œûÎáÌöî´_gˆbÝb‰Ñ¢8É$‡¡'-‡ÂBÑ#)ëüˆz!þv6ÐE…7;ôÇúÖψ±-r,–eu4eý®=ÙeØWù,A˜Ró $^÷6b¤ØòùO™Æ + Ïe·^U)4hIjW {}Îé+jüu<ÏQáÙÈ™›ˆL1†pÞÜ“>œ4¯žÈÄr±•jG¤I—†ILH–ø‚ôg¨Ê\3÷É"PÚeÚ†R$¦¾.Ðöš6ìöO“f5_'ÔñÕ)‘.ËÆÜ’ÿlµ_hZŸ¥Ê¥2ß.@* !SÜ(yŠ4Ÿ/]gu¦Çû Í6âfÒ»È]ó¤ùÛöda¯¬ Bê<„ UøodqZ´tœ]@&¥úõ“©w:õ Gû,žeÕà“/«QUúé¡Þ‡>é:eØäNÃ=®œˆ±íŸYä6³£—¹»aœÇòEïJ9aÀ|§¡¾4Ý‚H‹:ªRRåá¹mãDQ¢`’ëð(¹‹Æ®@v—ˆ]ˆÀãºõv‡N8dÒX|f(º¿=Þ·µK÷IâœßÃÝΈ_Aá®TKÙYcfX2ç„ÕŒÛ,ι²>ˆ}û“®·:û×Æf•…m’Æ–Á0}ç)œÞÁO¢ØÞ3º„V¡‹3œq  + ÆóPYëÖ­{ì±ÇÌÅÛ|È…AÎËýëÒ<ñàùß“©Kã¾Ww“–ýòñäöÜ»³ãåÉ¿rÕ$¶/t¯™®jíæ6¹de?šÑ:M>‘¶þí@OÂb›Z­¨F©^“[ø¾V$ÑòdÚ®âñÞUk"²º%‚eÒß_P_Tå›Ç+™¤mçÿN¦.âù˜–ÈnêË–R IG™2¿³Ç˜î‡úÄ Ê²p?zS;r6?¡, @2aéñÀ£R²:žÅ¦JÅs •ÅQ<ò‚Ùö¨Å9°r!Bon ÛP’Ui²&Ò­I\D’R ·§í{Ó ~Æp¾& ˜k|ÓhÔ)Ë©å¥M'³;<Úû%1È÷Öiôcî°Ï ô÷îZsåüþDŸ) + ­Š/· + § Ÿe1|ªÝ+Ç_] ‹#çªâ ɦ¬ã¬¿š^BV·l8„~;;ÄöÁmò)Üvœ¬‹‹Ö¥ÄlE„A{q²{S„Ùñl);æÆ™qEZe}ùf•ôÀۨ܇û»Ÿv}œ0 ü+¢Xg¿ô™¦[ìß¿¿<‹Œ€* Ï^õ YÞöÁS`õb””/“XÔÎçÛJ–/DáX²Ú]Üwmq4NöËÛ¶‰ÍÀŽSÅNÃ&xK€UnhàhU%9;…{Ýw&Œgön:™:/¬®›ósE½¢¶(œ + û¥‡Ÿnð»É&Uv|؈³8FIø¥Ÿ_íÂØKž$ÊÜðO/8±Åa¶e´äªÖ,ÛIv'XIM%/÷Ø«6Ë|cW~Dµkà~DKèÞŽ& ®ÔkœVïœÑùXsÚŸ*(>léãKgãÃÉ㕶Æ×pÙÁ jrNõèIOªíi«Ç°¯«NÒdE ŠÑæÆÉÁ„å¼Û¾$æ3²ÚÃX¹²˜;.tp íVTË6³+‘EÎA5~é#³ã#»äsÊvö&ÍiÅ—Y|{,mÁôeáŸÎ€¬üE)"•Wüy!¨âÞìk‰W)9š²1=ŒÆ®?l"1w¼Ï’Õå[ŸD×Ó|÷Ù‰ÇlBõú¿½ÅçÓFƒg#ðÃ^V¤Ù¯ä˜Ü€å ¾±s­&%-'®JC­3 ÏÓ»š§3á;”í±Â3$ÌÄcîxP}ß=·\vñœò]Æ㎉¥të•€HDã×þV§Í|C¯Ty…4à]£ÉiÛé1£i‹ÅcY¿|ù,p¬bjQI,óªFouè˜X‘Ë©Ò$(Ûºí´ø•9!u¬¦í ÉÜq¡Æ†Zü™‹.œ=†÷,âú3ieƒ2> + 4O©«~ÇŠ:žð˜Ð.A)Ê1¡G)Ÿ.‡¥Øf”M~yPI§[ÔòݽFsP©×ä|¿´ÎÍì”åìNÐÍ_:Þ—°°ò‹ l£,\¸ :s0pý¹â˜;.”èK ºü $íŽë !%S—¹|õ휓ƒ2 + ÆSß»g¬ú+ºkÝ¿¾µy‡÷L>’‰F‰g¶m)ëxÚZѼ^9Œã“ië“>óÒ*µ8åõIìJ9H†&ÿ­Yqoy“1)`ORAÌÂㄇÊ{&ÉDå«oçÀðÍûï*†šÎË“†Bò˜™»Sü¬<à”IËù¬L³&ÅyQÍXli´iï+7Œ×ÖÑl_Ò<–²RŽsm]ðÙýWùæ~±_´Ï + eî¸9Àò‘<¶T¢ø0büÆç.Á’ú( #Ä81Ú"™ˆª…L (­ ×Üû÷r¼Ü$­¤í„dÑ'±…«zÒ©ìïf6­”Ÿ"-ŒjKkü«ê‚š(|Ø“¾ì®û†H¾, + UsÇ…èÿùåÏÿ ÿOQÁ,”8ÃÎßywg)û&]¹ô¢ûî¹¥¨0&ê¸ÙÆÎÞiÇWß®R¥NÃ,žìNýÒ¸ß/±ºäïO–3;æ¤ì̦VUŠtÜqÆÀ£}&Tæ̪­Žá?)¶LöÒ8ä?ƒñ7¬\Rú~OKÕhÀìÄnxòg´_ß¼÷ÊõáLóÅ‹ñqùÃOâ ^ó®ÿ5»ñ)ÖlÝÖÌâ… + p¾Ã°}‘Ø5?‰¯è*´ HâìeËïÜ´mwÂxôͦ_¹¼ÏrÜð¥5›¶­ßyê+_­Ÿ=×6ž?ïë¿ßþÀ®Že¼_Ÿ,Z%”Ï^*[æŽ Íš9¥2ÙKSÏ ü à€}÷­¯<ò‹¾¼†Ð Š55ãd×ဨ·ÙO>J͈Ûí†}ù½ß:wÙò_Ý}+¾µl9ZB ¯üöSG>|ÿÇ·^'$ºoüÆ#á¦æ«~òÐæ7žýò + ½» 35Þ“Ý]Ý´\‹°Ê;»{ ßé6—;K’*;ÿ¹¬È<°ùõºóçâè·jõëO=Šc¼ãüîW^"YŠf[~úý]¯¼ˆãc;ßGËØõ7ãxF@YpÕµÛý‹]›^„¦x`Ë%Ÿé<|SÃ’¿¹SÆ÷ßÔööpCHï¹í=îÖþIu>K.•ÏE¡÷7>÷þÆç‡úVïé¦àx¦c˜¾þh,ÝÓM D?¶Ãoðyañ]÷Þ¹ñµ)ͬn©é8–-t9øúSßÙ³wÎl?•´1ñÿí]l׆ǬñúX@€‹l“UQ + ­Ô¦&©šÊR…QoŠÚª€ÒŸ Œ¢´)7ÀEZ„Ô‚Õ$­Ô¨˜JM. Šˆ  + nRA r$J¥“D$!?¶IÛ`oÞ·|íö2³ž=~­FgÎ|sÎ7ÇçÝïœñÌÙLÉsg;²¨˜*Òsh 6&ç¥þqðý½¯4åáÔ=Ë + ™­x´ZE¸Æ<Ù†åàÂëGV­ß€Cø¬ìÜ€›-ÇÏŽ§Ó=?ûþ+?ßÁ#\ÃòÓËïÿÝ/í}ᡇžþ'r~òäS-uÕí›·xŸÅ3 ·Cãµ_nÅ<¶ëÌEÏo÷ïØŠap®f×f†øÜßûò7¶þÂóÃé/ì –€ ö•óýkǯð¡ýÑçv¼{c|ÃÞ=|<ïX÷žÅï^Øúøæç_úÓšÿ ¾¾ßãRÛŠÎ3’Ê^pº(ò|&´ž/¼"§#ü.¹åèÕaÄêâ%ðe¬Ú¦eËZZiõæÄÇc_¼¯õžæÖËo@ö¯]¹Ñwulûª3ÉÅ/;þ½¦†¥ÉÄ'7'ðyh^ _á + åç + Z°â¨˜ç=äîŸßž#ã™MsjÄ•ºÿúÑ5©äÜêÌÿ¥ö¼5üÝÆzÈþȇÿø¼¹®úKõÕ+çÖz>¼¤çè¨ÔõÃD ÔÞÀšH§ëý_À:=4z}<}áÚÍųg]ŸHß‹ÉóÂZ3ûö¢ºŽÅõÉDáU½…ƒhþ\˜¢gyUñ# kÓU™•LêfUu4Ö02Ž1öœDÕÉOF<_ÌMµ‰‘ÌïH‡¿Àˆ3Òs…a'U™ÿ-{™¥Bœ[ƒøÂÙ³®Œ/©IìZ1ÄntðæĜꪆDfü%1ϤçŠÄ^Þ÷×úm¬IÜòçÕÉDæ·é ö†dÂ¥y“Dz®lþ÷kUøC¦½êÌŠc¥/T(@÷·K¡j¦agÈß·üTÌzNRZ»ÿý_ÿn[µ¢œoÛˆ™†þ_U&nÝn~fº.#=— (ùíw>øcÏ«ZéVD‡ô\ a(ÙóÐSˆÑ!=—g¦ÿÒ!…hÒsäXp&—ßûH!ZD„ô9ÁàL¢EDHÏÑ’œ‰B´ˆé9Zrƒ3QˆQ =GHÞàL¢EHÏR(8…h:ÒsT ÎD!Z„ŽÞLjŠÑѱÿ¼Çtÿ›oíùí_˜^ùÀ}Ï>ý¦Sóš–.šÿDœÐûq'™¬¹ÿË-L fùsê,_ˆpÑx[wž…péYwž]`×®]!.™‚¢P`inœw1è!JÀ.¯… ¨¼uÁ7ŽmÞÖÀJF]HwvvB¼Æ p€Wgj‡“(9,ÙüLJ(fŽ/r[/Ë ØÓ—Súß>,Òáni.ñÆé7Û¾¾™Ÿ-]¿)d¶qãFtÍÞÞÞ 1±E\ò|aX€ + šíÛ·fˆNY‡ØE&èè,¡µµõâÅÌïÝárP2r`ƒ-à òqšW}}}fOh–媙¡|úƒ-ʧÌÁ‰ô[œË¯À&o]4°DVk`——IPNWWW°Ual.lé3«f›ÀÌŽÂ6ŽÛŠ™È¡Øe#³p;¥´–¥çr0I=³³îôA'cǵ^b¢ÅÖº,ûœBß²CH`7íwqJšÕÄL½Ø¢SÂxpp0KÏ<Š|¤)BÓUÐU:ÆM½ØR¢Á AN°jbíyëÊÒsnk½m÷ÉjUk¨GÑH0‡µÀ¥¼…Säô‡-c_@´´ê‚™%–ž5ÞŽ)?ò)t4•J1Ákù¾Ú!$8ÞF'cÅ0ìK—.™}KK éùA̶¡¸ÊÚÝÝÍÁ0ÁècÚáááuëÖïf‚}G¬MX šÅª³œ¼'2?Ø2…,c‚ô# tÄ®S§NñÞL^³Ã‡Ã?LÛ8$ˆ<òA»œ{~Ä8Óº24̉.*2áa»ÿ~+÷«QÒ˜ßïr_–FE0Ãœ3x+ ƨšq/—¼u¥áÛÁv᫳›í€mÂø:NËyÕ6ýöüû¦X»v¶ ·Ì‰/wâpKs‰IŽ·1ê³`ˉnÞA v-¼p°g‡²JÀnÚŸTÛŸ›öСåp°Ê)¥w;¨2Ó'Š6KÌu5í>½Û#yúÊðUbbÑY#ÕܺŠ·Q‚ ž9$æÐ=xö…‚Ä  Á%˜áxE(Ÿãà%ŽÛã<Þ–žËÁ$õLØq‹Û GRT“,_ A{æP‡ÁœÜÒ8åæ¹ìÜVÎd\Í¥Ï'ï¡"u‚·¬x!P&oä5Ër•sfÎïXEV[…Žô\ILIÏ1$8ÞLŽI]ø + `äD€e°­8ÂÒ³Þ¯wщËVŸ¸ÕÅ©2N˜ƒ_3éYLŠBgŤ.Êx†‹ÙÓým!\Bz´ÞPT öÔ3Ý\ñïÚõ[°¡¡®ùÞ%L?ºvÍævL›‹"6h½¡¸“JÍi^Öxäèß²ò¯]»qþBæ ­êêįwÿt:\΢ñv„üxãwŠüzûcßü*_N„óHϹB´yAçP{™ýÎ#=GËwæ Ñ + Î" + ¤çhiZº(7D+8‹ˆž#'7D+8‹ˆž#'+D+8‹èžËA0D+8‹èžË…hg)Òs™`ˆVp‘¢çÃÊBtÇc_ÓÓ"RôüvùK&k¦Û Gbúüvˆ¿º"„˜*‘DT©Zˆ¸{1j„,„;èþ¶î = áÒ³î = áÒ³î = áÒ³î = áÒ³î = áÒ³î = áÒ³î = áÒ³î = áÒ³î = áÒ³îð9ÃÕC‹ (›IEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicBorders.MenuBarBorder-1.png gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicBorders.MenuBarBorder-1.png *** gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicBorders.MenuBarBorder-1.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicBorders.MenuBarBorder-1.png 2003-06-21 12:02:11.000000000 +0000 *************** *** 0 **** --- 1,30 ---- + ‰PNG +  + IHDRôŒ²ÌÅgAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ)ÄའËIDATxœíÝ]L”ÙÇq¤Pt‘W]_º*Pc¬Ñ n³ÉêÝMcãU¯„è…&À6½ickã•2jª1¾DÙØfCS…ÍjÓxøRµ¦…©TcÙF_ÑÑ•UT¤ÿαOfg€ç™ç™ùÏ÷s±9œyžsºþ8œ9sžQýýýi]ÒÝÀ~„;(D¸€B„;(D¸€B„;(D¸€B„;(D¸€B„;(D¸€B„;(D¸€B„;(D¸€B„;(D¸€B„;(D¸€B„;(D¸€B„;(D¸€B„;(D¸€B£úûûÝÃÀFåöœ°þ’Z†ÛÊ©S§ÜB|»=:±, + î.K‘Õ'#Ü@!Uá~õêÕGŵ‹ÖÖÖîîî¸v±Kè7TT]] M933sÓ¦M»víZ¾|ùœ9s¶nݺ~ýú%K–ØØxĦ¯+VXeé÷»€8I¾p¿páÂG}´hÑ")§§ÿï7™3gfggÇ©ñ!XýÖÖÖΛ7oîܹ¶Œb—|á.f̘±`Áëˉ'feeE\sñâŶ¶¶Â‘fnDãÆùóç;;;MèGô{åÊ•£GÞ¼yS.‰ŸOº²²ÒÌߣÉÅr—Ü+ÍæççÖ—4kj¤Á8}w îòg4Ä2VRSü­ɬÀDo«3 &&ë­é|ø-Cl“{׬Ycš ?_v°¾â‡7Tà[L›eá‘.˽fÞ&“t™þÛ>¶áK¹pðð‰ÛCÐ<dôªU«JJJvîÜ9¢{ËËËåçÁÂï¼XÒ¿²²òM‡ùzYÆvÎ{þüïŸlø©Ûà2³xbTUU™ESÈÍÍmjj2»eä2óF¨Ä½¼j&õÖê|t¡¢¢Â¼ã*5VpØסC‡¤ Ó`~ ³ÞÕ¿?~¯ûñ¯é™4ám[~c?€TæÀcËÞìWGGG~~¾Ìß Í¦—öööa.—ËO‚ºº:™¿Én‰ò‘oe—Z–9öÅ%Iv)ø/Ü €ø~‚i8ŸcŒÌ¦Í6ÇÆÆF³õeøo„ú|>Ivóa()»•ìi©3s÷·ÿñõî”™Ó'Uüâc»ZŽ3wq’3÷¯Ÿ<ûSÝëË@ç=ÞV [J„û§Ÿîùæ[ìh¹ÚéÖ`ÀúÃýôß®~Ùv;¢Òß²;Í”‡{×퇟ÿåÑõÎû_?yæüxÀš÷¹¿xÑ÷‡Ú³}}¯¢_’Ê–+×?ü`¶ó£`8pÂÒˆ§2Û‡FcGG‡9Ó1~{Õc¡yæþÅ_ÿ)3÷Á^õÿûº“ƒàpoÌ—m·{¾éÍ~ˆ'¬HF2ï–h–ywøl=â„ws°»9¼×ãñ¤…õ>a·.³nôz½¦lz©¨¨0×8¶ó=%ö¹7ý«ãÓÏN›rÎØѹã²eF/éÿóÕ‹?x–-]¼ö¹#•¹»,SRRÒÜÜlŽ + Ô>v옩1ŸW’8nhhWͱ½æ2óqÓ… š£ÞåbÉk¹LR^*åF)Èe’ã>ŸOjäKiÖ|W.3'É8öï]íÌ=Üí»A«üã…?üÙÇ暈NKO×¼*`&Ó%¯%©­ã#N]—t.//7çˆIô766ÊÔ;ú¨ws¸XSS“Ün*¥Ù•+WÖÔÔ˜–ÍO¿ßoA〔H·;wYåiSÆ›Â;ãÇæŽ{Ë¥p™ä¯9¾±¬¬ìÑ£×q꺀ĺ™­§Eõn.3¿˜»L¥Ô˜ÇìÕÕÕI›òª$»TJâ;ö ¦D¸ß»ÿØ*Oš˜ãâH$“ÑM!¥¥¥;vìpøpˆ\#ÓùðÜú´Ð«l + RcR¾¾¾^’½°°°9„™»ÍÌyaÆäw{ + €Ä$½sçÎU«VÉÌÚŠãÁ.–+evoX<Ü+7z½Þð}¥«RÜ´&Ë]’ìfY&âÙLñ¦ÍýÁÃ'/^ô™rÎØÑ£³2Ý×IÎ644Hj766š²Äqô©ë"H.ËKEEEÁ`йyóf¿ßèÐ!y)/Äj­¼¼¼¢¢Â4"eIv³Þ: Þ1 ½[Æ–vrr0kîOLùÉã;­-ÇmiÖF ûWÄU¢}ˆI™Ä w#öˆŸ4åGï|hÊ÷ï\ëüê\̃²Y‚ÿHF‰¾æûiýŸüê7Vk¿ûí¦Ø´‹¼´Jôp]gç«óOMU;J]ÕïshªÿÚ¾ZÞ¿êÏ8I$éùK»¢\Ç)c‰”1„DÊB"e !‘2†HCH¤Œ!$RÆ)c‰”1„DÊB"e !‘2†HCH¤Œ!$RÆ)c‰”1„DÊB"e !‘²ˆâOF"­]ýQÆ¢‘—™ÝüNcc£nDI-Z´(cûâë(‘2†(¹Œ —B"e !‘2†HCH¤Œ!$RÆ)c‰”1„DÊB"e !‘2†HCH¤Œ!$RÆ)c‰”1„DÊB"e !‘2†HCH¤Œ!$RÆ)Sþñ_eò×Z“Jû‡ŒÕ+·ì_›njjJoݲ²2‹I[$ âÏI‡'„V·Ü¥û?P‹Åü($MÝïÒ°‚?ªZwƒ_×>ž‡¤‚cB"e !‘2†HChµ··744Ü¿_»®¹{÷.*×®"}A¯ßG¹Â¬]» ¼råŠv-]³k×®[·niW‘¾ ×ýu´«.^¼8oÞ¼ 6hB¹+§CøðáÃæææ‚‚‚óçÏ/\¸0???ß»woðàÁ ,èׯŸ,–´1KܼyµMŸ>}êÔ©ÒòöíÛ;wîà³´´täÈ‘ÒxéÒ¥‰'>þüÓ§O8 + ½zÝR©ÿÛ·o®ÿ´xñâ>}úd¾Ú’Ó¯£“|þüùÇ/_¾üñãÇÁƒ«««¿~ýzîܹuëÖá~Å2I³ÄÙ³g;†—º7¢7‘ÆÚÚZÜÄ8¨ŠŠŠwïÞIãjjjŽ?ŽãÕ«×-Åúqi^v¨¯¯ß·oZT ÷YN? gÎœ9a„ââb\ïׯ_Ÿ8q¢®®nÊ”)˜…–Ó§O/Y²ÄÛ¸fÍí™|xee¥V©I¥XÿþýqæÑrûöí“'Ob0‰wŲ}—Ó!tzüøqß¾}ñÎ&_g̘ñèÑ£ñãÇ{õjtC"¸›Ñ;Èô³gÏ®]»†:_¼x9³ð¬Y³JìT—êõêÕöíÛ7mÚTRR¢PkOÊé×Q't·¸äæm­µµµ¿ÍÛ¨Wãoa5nÜ8L`Ô·~ýúaÆmÙ²=ˆv]©úcý?~ܺuëÒ¥K̓=LÂ_&MšTTTtáÂL¿yó&Ïž=;i£v¥ÿÁ8 + ƒUÜ —/_ž;w®e?F 0gÎŒ¦pgc®vI±þïß¿Çb±Q£FaL®]ràëè/xÄUUUUWWã½—ÕªUò/ª“6f‰¶¶6 Pñ¬ž6mÚüùóÑRZZ:tèPÔ‰‡ nkŒ 0î5¯ÓÙ&ÅúÛÛÛ¯_¿>dÈÕ«WËŠ555#FŒP­ÝO¹ÂmÛ¶™éh4zêÔ)ôÁ………yyy4fƒºººüüüŸ?~ùòeàÀÒØ»wïýû÷¿ÿ^Zp×¢lL=zT³ÖdºTpÿ7¥TdÑ]•%Š‹‹SlÔUPP€Ï^½záÆuÍ2÷´ÜÁÙ)èõû(§Cè|· V_û»·â`EŠ’l˜Ž4§CÜ ÜÊÓúƒ [CÁ(|BÂîÿÖ‹–¬ú£kØ÷uG¨BPZ¿Oå—àö}Y"¢xôê(È»IfÒÁ1C¤Œ!$RÆ)c‰”1„DÊB"e !‘2†HCH¤Œ!$RÆ)c‰”1„DÊB"e !‘2†HCH¤Œ!$RÆ)c‰”1„DÊB"e !‘2†H™òÿjíš(áÿñß„M±¢l ù$$"‹cB"u !‘2†HCH¤Œ!$RÆ)c‰”1„DÊBŠŠŠH$‹Å2¶ÇÆÆFìŸÙ¹;œŠT^lëNaiC…ò¯[ZZ0OÝzT„*„‡þÛ¦]H¶Ø±cGÆ:ˆôàb544XvQ­„0ׄ'„Òw¶µµµÉS0¯˜ÕÜÜ\RR‚–±cÇbëÿ=®y„âsРAøŠYX-•••Ò²råJÙVd;räˆ_õ{kì_±#ÔàZØ;ËU§îl‘÷Øe9L9(ÉC"'Jvê-ŸR§ù”^Ã[ž÷*Èö±©,ïhþ,7nÜ°ìžõÉ“'ø,**údž |ÅcÆŒ‰F£èwåQ‰ÅÙdu´TUUÉF0aVEêL]å¼ + æ-œ!DÞ]†U˜ÀW¹)¥Ë¯­­ÅpBþ€O,ƒ'§¬ˆY´`yyeB¿‹±ZðÇx<.›Â’øÜ»w¯_5Kðä•»0»Æ~‘O<Ï´ðÎ’Uí&¡‘%Q³É‡X ËcLÈ)’g”_GÑ Ó/8Ëp-#õ']×uz¼ÜLÒ~ö“e÷¯ {|(¯dVÇÃ-Ñ1겞<òUî4b@â|†H‹é°e…Í`}¢H“Ù‘ë(0ò1cBï,ÔéjÁ6¥r^ÞÌÆeøgv‡O,ßCcB93fàç-ÃÌ’«¬â«'½ + æ:]˜ÿ§^éàï<2:cs¶¸Þ‹¤?v.&-fÄ"-–£w÷·f玼GáZØ9«“…塇͚š¥Å¹¯ ð–‘:ïU‡0‡(Â9&$ + †HCH¤Œ!$RÆ)c‰”1„DÊB"e !‘2†HCH¤Œ!$RÆ)c‰”1„DÊB"e !‘²ï\»#é1IEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicBorders.SplitPaneBorder-1.png gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicBorders.SplitPaneBorder-1.png *** gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicBorders.SplitPaneBorder-1.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicBorders.SplitPaneBorder-1.png 2003-06-21 12:02:11.000000000 +0000 *************** *** 0 **** --- 1,41 ---- + ‰PNG +  + IHDRÈ鎩gAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ + 8ÿ÷— IDATxœímhd×yǯŠµ$œ)8•D»!„°+Å…˜6D;i¼´¤D-4'’\oÀý"©J÷K4Â`—*‰†„zŒ¡´‹F´¤u\ЪÙb§ÔÉøC»)ŒÛmÜ:Ö®Kc’5Lÿ¾Ïãsï7Í̽wîÌÿÇ2œ9÷¼Ý£ÙçyÎÛsFªÕª'„BÔø…´ „¢¿bB@ŠA!D)!„¤„BbB@ŠA!D)!„¤„BbB@ŠA!D)!„¤„BbB@ŠA!D)!„¤„BbB@ŠA!D)!„¤„BbB@Š! ŠÅâÂÂB.—ÛÙÙI¥9ŸPäÈÈH>ŸG`Çëׯ#Ÿí—|tt4>>Ž\½jª§î"mîJ»ƒÏÉÉ ÄÜüüüôôôòòò­[·VWWnÃææf“§»»»ø\ZZê dq¼ÑÁÁAg ‹¢î"}ª"fÖ××Ñϧ§§_ô‰>¥ì›œœ,•Jåryll ’Oñ‰0óº 1„K(’ÂÊ,H7ddÀêEù¨Åj\÷á/ (°}̧P(¸å£4“†à«+àÔ]©t—q ©¤ØÉçóèh˜ŠGGG4!hE"M.—CH˜–ȈOˆÄ·SÑÜÜÊ÷üù + d©T*ü + hi`ŒãêBŒÌšö136ûÞÞš±¶¶æ–¯hÏžøŠ\”}=4Õ]B¤OÚšiX í ) ×w dH¯fÛ õ|!*„Æ,AÊ àZ©(Ù« &CᨴZ3½ùµT}{ÖóMàªc˜3À†¹µ£ñ0œF_ë&ë ê.!RD#†$ØÙÙ™™™Ð0ªkÓÈšºf¨Z²YÏ—t¸¥Múlllx¾»~ýúññ±kÿ6¯«%hÌèè(ÄÚÖCÔ]B¤LÚšið¡] Átà3Ö}Jrss³êÏz{¾9Ìi + ÷Q¯Þ¤yÕŸ.‡C]´p¦ÁK#—‘4«­ + >E4¬¹ ŒŒ¤§>°œž›Àê.!RG¿ÑØ ¡uWS!hø´P(p52«Z“\¡é”jcIÇÙæ¥uZÅEù¬ˆ5RÒ± 6yÒHÒÙJ¬W[ø­›¬KÔ]B¤ÎHÕÿo#Ò"ŸÏollà¯pýúuNnÄ]ã‰gÞ;€Ûö;ÎÞ%ê.!@çú…ÄdG—ò´OdœºKˆøЈ!eº4H‡ u— Å „"€¶« + !„ Å;ù|¾‘Ó´[·nÍÌÌР¶Ìqrr‚–ã³'¥5÷LW·3ÕuBô)†49òÙÜÜœžž†tãa«Ì¹†–÷JºñƒmHmu=&ÕͲCm]/•J”w“““ôÍ`sÍú‹ ·ÄðDUÕßzÏ|ò4VÈ•ý:xµ“YQ¯sÕš¯Ï?ÒŽùl Ïd1}Õ÷ÁSæÝ¡®Û8kyݳíw>C‡¬ÙlFÝ×iä™nHºNˆ8bˆS 4‡)kÊå2ÏÓâas¯féÌñ´ é"Âb˜1&q ì(t°ÒX»B=Ö6À„%¦å¥C ÏyáÓ< ™Q_­ + ¦wÒnºˆ¾ŒL1X±|¯b`$„¯91ή"¤b‡òÅd¹nÆgó£³®Ã8J1ÊƘh·¨·¨×9B“@HÑ@öj'{-/ Á×謯ÙM±‘V=O0Ui¨—ìe‡¹ë„ˆpKN›´“’Æ2YqIÖuëÖ¦k¶hó + G×-KX\\Œû˜qŽêÚ)pºNˆÞ¢Åç„°ÕÔ|>ðááa]™âîÆaÞ"¹°°055Åië­­-ûŒz­ ooo{þ< $ÃGGG¨qnn®Q›y:hpó5RÕ[¢¼/-/‹íÜñ©®¢WH1$×!ãFFF ª¼ˆ`â,¶{Õð¼Ïòò2·oródÍÚÚbð‰p›»wvww‘Åî±AQÜ:33ƒK£[*‘k||‚¢­Q2šäh/ºé”ªk>ÍGWê:!z‹N>' + o%£«ç6³Ðœ¤ìc ÝB´éç‘×¹ö[’–8žíàêT)Z˵öÚ®¢K¤“ni7äÌ@‚c`“0°ÁÙÝ1‘Ý®¢K¤œ¬{£ÑíZý‰‘õ®¢c¤„BÐâsƸuëŒh­U¶‰ºKˆbè vvvFFFÜ}5†ëTÉÆÇÇ‘lƧÑGËâæÍçó©ÒÖÖÖb{­¸Pw +R }Áîîîôô4Ö6âäädyy™'lK¥¾¶R®Cº w§ÿÏÊÊÊÖÖV;§ú + u—±"Å4GGG°ai~ÒY4SÄ7—\î!)Š0È)„y0bjjŠ;ô£uñÓ󅹧¦~EÉ°¦¹ëŸ¥qaDŽûP¢(ú GuÉÈGu—)Ž'Ž!&ê…­\.OûÐgs§szzj;sæççé¾­êï ¿6óÈfY,€’=ßSê2ßMæE¹ëÜBBNߢ~Õ]}Õ]Bô&$ìM:JâáÛýý}ˆºöl~` + °˜«X,Â8å jÏa}V`4/Kž˜˜°SZ9Ÿíím0Æ' + ‡åËì6ϦÒñŒb4žWGŒŽŽz5Ÿñ¡î"¤¥}/l”Dn ·ÕÃ8…H¢»È;>¢ÜñÎ⇎vÊ¡ñ›ÏçQÝíÛ·9ÿ‰Ò¾ÀŽQw ‘ + R ‰ÑЦ6تôèÀ­–È…ÄF®Õiöìîî.S"M;ºR©4òævxxˆÒš/ç¶é°‡¨»„H‡ôf±†úbcçCðÑÝ¿]`ÀεdKKKŒt}Bpª¤êOš› BF'ÍY…çÛ­ÑÛ Ø*k’ç;°«{@¨ñq÷U´Fu—  “Ï)Ц¶ºÉÌ(¶y‰‘‘H"Á.ý7°Ø–Žá:ðØ%ê.!FŠ!óPÒÙÆJÑu—-Ñ n™çàà@„µºKˆ–hÄ „"€v% Ü5Ÿv+„ƒ€F B!hÄ „"€ƒBˆR B!H1!„ Å&o¼ñFÚMèœä¯î"¤Ò¡P(|èCzî¹çÒnHç|þóŸøá‡ô£%P—ºKˆ$ÑÉ礌{â‰'( ðyï½÷¦Ý¢yýõ׿ûÝï~ûÛß~衇®\¹rîܹ8jQw ‘éúð*ž~úéAwß}÷òòòOúSuW;ÄÑ]BôpKŽ;wîÀ`4û@ðÝsÏ=鶪cð6o1×s+XÝ%Dj¤­™†ŽŸÿüçßüæ7)`§ÝœÎ¹té’ç˸›7oÆW‹ºKˆäш!hßÿýçÏŸO»-òä“Oær¹dÌ^u—I"Å „"€¶« + !„ Å „"€ƒBˆZcHŽ‘‘‘´›/=ÿ-©Ç„H|N”1 qõ˜É#Å4û?p¿þðŸ¿11ž/éâãýö¦öÏßüVà­~ï¼ØzLˆ.уBˆR B!H1!„ Å „"€Ö¾’c°W¹Ç¦·/¨"RÛ•”¡½z½ý¯ݯ’¡®hÉå¯_fàê£W-ÜMÌ`tÎÛ?¡z»’„èOÒÜ®úÈŸdà¦Æ§þô´›0¼<òµG *C7¤LH-ÅAcU·³³ƒÏ¥¥%72ŸÏ_ô‰¦?99A¤Ÿœœ´Èë>ÈeöëgEçú…lM)„î.>wî\ÈÒï!!°¾¾SE1!Ŷ»»ëE„õáá¡+÷] 666 3BŠ‘ø1à)òž©®\.‡Ïƒƒƒ_`øbhÍ`Ït ‘ ´ôm”0;;K¹ëÖ-šùˆ/‹&Ó¿µµåùR~llÌÊA.ä • má9úÀ­ >å($ö÷¤„±stt´¼¼Œ¬~Xî×àëôô4Ìyne`“KHHˆõýý}×Ø·¡=Ó`”€ŒPî‡êBáxŠ¯ÇÇÇI¿vf‘bHzÈ:ћȮ>z5¦˜ÌÍÕg¸W›aò—ËeèññqÚòŒÇrœª²žÚ‚lnnBЯ­­qÜ…ÓMÈ‹b§¦¦Õ…b9¿„c|ÃÁBŠ!iêzÊÑ5†øêr……—]=1Ü»’8käÎNòPOØ0ÂÍ2::Ú¨Lä]\\d±.´¬K´¸ !RƒBv½}ž)/W¡18À°£çmf¤„©1??ù¾°°Ë嶷·Ï”weeºdƧebhŽµµµN›9th*I/œð!ëëëœ8b`ll¬T*qW’qѪO9˜°Õˆh`uu•«Óˆ1¡_·®B¡€*íŽQRÛˆ922’¡n=é%n{mtò9[;bµÆÐ>ïlwŽ¬1$úwOõ€[NNN¦¦¦0n¸pá7•Ëå6— EŠÅ"Æ •Jr?ŒF§ÞÄY‘bhAÏCÝø^U!úýÝ›“{{*=¤¼»ŒÜtà2ÃÜÜq6s¸È€bxþŸžl™æþO~éLY~¸öÊåç7š§!1ÔE#†ö鋃g!k Í÷t^¾òƒP ôÄÕ'>Þ¬ÄFÖB‘M²¡RäO¿½¨uçÎW_}õ¾ûîK»9B;Ú®Ú[¯•o¾ðwo¼þÒ¼ø÷ïyÏ{®]»–v‹„" 4bx—ÿ½ý_¯ýøßþû?_Äçÿ¼òâ[oýÌ}úàƒ¦Õ0!„H)†·G?8ø (ƒ7ÿïõFiî»ï¾|ä#=©.£>0BĺÚ"s«Íõ2"ÓH1xc8÷ÉWÊÿÒ$ÍäääÉÉIOÈÈWÒYÉú®¤wn_I"[hám><=ÿàïþÙ]w½·Q‚7nLù<üðÃ×®]{õÕW“lžB$‰F ïðÁ_ùõßyè/Ÿþë?j2¡„ACÁáóçÏ_ºt)—Ë}⟸çž{l©g&4Nƒ3}ÏzgÝË>E|hÄð.ïÿÀ‡?ûÅoŒŽ°Ä/¼ðÂW¾ò•Ï|æ3£££ŸúÔ§¾üå/ëâ@!Údקýô¼ì“>ºEhÄàGé³_|ê™küã—ß½ì + ãcçrÿÎ;usø<öØcï{ßû8†€ÂÀ"©V ÑïÀÞç*;J]öÉ;>yÛüü¼çÜúé,™eÌçó ³–ÕÕU¦‘뤎ɆKŒ®½Ò½öì3þæ›o~ÿûßÇïø{ßûÞóÏ?ß²Ù÷Þ{/~©—|ø³–Ïœá¤þîéN%ÁZ:::¢'THü½½=ÆÐYD9ì*<å-lLFx333¼õ‰!ë‘ ÿ•‰Œ tÀææ&bðŲK‘ŒN¶õªc20b¸ÿ“_ºÜZw›Åå®»Þû› O<÷›/þë_Y$F”ò?þøO~ò“7n<óÌ3P¡ý9Ò\óñüÝ®v B»’Ίv%eêüá åíFÐœô Çë 6aòGoýä ¥R Ù‰bçæævwwY2µÈññ±yç 5††` €ïÿÀ‡£0Àoñ«_ýêÍ›7_zé¥o}ë[ŸûÜçš8Ìxùå—¹d-ÄÙÍu–——oß¾ÍÈÐœT*¨Ž¼È­ŸLÆ‘s11 q±XD™x + ­€HüMî )†f|ô×~ÿW?úÛ:4I}ð…/|á;ßù4ôÄÖÖ~‘Љ5Rˆ~†ò½ä³´´„ÿ u¯ðÜñA #\á* ¯v¢È-1ÔûûûÐ + .\8òш¡¤ZÐ\+„8wî†Ã°\^{íµgŸ}öñÇ¿téÒÝwß_ó„ès ß···ðÿÂDy£ÄH‰Q'…æçç‘óù¼{A + ±HH–†ÄÈ­À©$dlÿ^%k åŸ+W®Ü¹sçàààÆ=öXÚ"i £ñû‡Ä?<ññ¸«‰¡ƒ"!òù¼¹VÝÚÚÊù ÐN7/999É;ØM]Âb;¸FÍKëθžW­CÒdtµ9D¬«Í!²ºÚB«Íµ}/^\[[ÛÙÙá5ŸW*•ÍÍúnŒ-Ëáá!]ãA—xþ5m¼š×30¼··Ç;A»E™ßÖötFÆTtCÏ«–bHíJ:+Ú•4x`”ÀË;ž˜˜Øßß÷ü+<ß)·{´1;;ËG´å‘˜‚…)gff¶··¡¢wGóRèz`õü~ŠÅ"” + ¯ µÙ9”AzÞ ÁªÝôJ`^DòšR¾›ÒÜ[¬Ïk˜}õœë¬ë¾óÆáJVŠA‘4¼¤áöíÛ÷«>ˆäõœc>° + ……#¡}!±‹Àññq]ˆ§vw4/þä  ¨Ž—ü P*•PÑÂÂÒ =ž"&TÚòò2¯v`zzŽN˜¾\.C܇J°¼ˆG$ê…Ôf9x5**¼”ïh"Y_#$ðjŠÁLÑWð|]Èîê`â«9ZcB$ 'Ž m!ÇÇÇÝ9ÞõFQÍq9ícSOkkk¹\ÊB|ee¢Ÿ²HvxxÈd¸(Ê F‘‹1ñÔC¡Š¬»45"=¥9êâ5Al-GÌM€,ÈëùbÝÒ¸…£ÔKe ½²z&¶´ßùí Å „ˆ‘ºë¢ï§§§ž³”Ë´yí>gŒ$Ú´‚‘‰!yé[èîh211á9WLSÜøÐ~ëÞ5§ÈC‰a­[ ¨×«ÝDdƒÎbqXã¦qe7Â6Å|åæëçÑWp»«¾j)!DŒp]”‚’@üApsæ:&°¹ÛÂÝ$`s ¸+‰’7zwt]PøêêjÕb=ºôí¶åpF‰m‰ %ܾ}›awÇ-z›øâ…ƒŒh3oj¯j°Ûiu_Áí®&);@k I“ÑÕæÚ•tf†uµV<¤$+¿Bp^~aaaeeÅó—ÉÞç ùán×vFáLÎÜÜ\£°ë)‹C+Ø |®-s¥Š¨+Nyþ ³¿¿Ïµe|EiP\pKààÃF @ ÌdÄØ¥‘ˆ‡VÃ[S" ê|}ÖØ°[ý¼¨×º«IÊbHíJ:+Ú•”i ô÷öö8ƒ%5ä/¤*­iˆ]û›âé… o{–x#´€Iέ8u¯w†: Ýíæµ,ШˆRž«Ü\ fipÅ_ñ”“EÜV‹¯Ü›„4£££îEÖ¦„PøÄÄ + Dc¸üÀº|êÞwwDF·^m†K&x…ÐëÛ+v,Þ^ã ©yWBèe3ª²èeSŠ¡}Þñ®Q Yü»ÇŠPH»!=ã$õïÐ(¤uî¬hÄ „è z¾µ&u8tàÀá&“cý†ƒ¢/htø9»ŒeeˆB»’„BÐCrè&¯áDw‘94•”4ƒº+éò×/»1W½Ú«˜¬/>¿Ã°îJYDSIB!H1!„ Å „"€Öú.EfšG¾öHo |êŸÂ¿PdF÷ÿ¥KhMÈÅ'†Vw\®>z•&î?³ºö#ê¡]IÉÑhwÊ`ÇÛ |yIíJêsÅ@Ôº‚wÝ´4†ÎŽÌ5E4F´‰F ISgWRt¿Jcb“ãÜc‚,--5‘Ý)^™9´hAé0–——Ç}è”n·º–C<%Aú#‘øäÝ;Ô + ^m€…GÈ…0oIc^n~OC ž è uff†u±Lóm'\¤„ñùÎK+¡!† gÌÊÊ + „u]· x + ¹©Íë0=ß¹t/‹¦3QzÆF™(¹‰{Q«Ž¬¡lPx±Xô‚¾N…!Å „ˆºŒ¦+$ˆcˆéB¡m—Ø„Ò#%ä8}êñæ2”@?ؼh—p‚ôxÚh‘#T;Jöü¡ jç-¡ñ½xv‘bBÄ /¢±Ùr¹'pšÜ´Ó’ÙÙY÷25·üæµC£@ìïïCIh¸Ð->'MÑuÈ,ÆĆz,ëlooÃfç?„òÆÆÆêêj>Ÿ?Óü>l|äÅX&?„;òbè@ÉŽ’Q ÝÆܤvVVVx[¿Š(R ‰2‡F=6@ó︴´YÌK1w"5¿ÙØóu ì}Œ3NOO¡fff<P(XÚšO£I!·v¦ájjor)ô3ÈûÄû“Á–tqüœÔcÝ“Ö9;IÀ™“݈çå”­›ºº„ÚÂb¼¦÷ü„ ;´ l5‹R Bˆ¸èÃ#füŠ’aæCºV#Ÿ}©ÐTwÕ KƒÄ‡Þ¢÷$óåÇñ “q€bŒñi£<å» gÌr5¬ñxý‹5˜Ñm?Œt3v\W÷H1!â‚› Ü)»¹C‰ ‹7}xØ-š—Þ–|,‹]Ì`¾’loo¯X,šÐ‡Î@ Ð0çh:‰çÚ\]eôjgÈââ"OK X;_Mè‰åÏÍÍ1 GE÷ °:¯vVÃöé"#Å7^–¯†zŽbûMAZÆŽëê|BÄ„W©TÚÞÞ†ä*úìïïCÒyµSОï‘ÑãiŒ™˜˜°sp´ÙQæêê*µD!ËôœÔôšGaŠz!L‘ÑÑQÏ·¸[6›*Äu´g«ÈŽÚ­åV ÚIéLíÅö + Ï—ÚüJo€h'4%š„2­PÊazˈ÷=k]½BŠA<4@™3'&a)¦½ÆÎöÖcè•Ù + Ðæ’u†»n¨WÜx4 âñˆáÜ—K“–Cd£ + j²ÐS ;hÑã“seè+ + SlnÆÎêêM% !â‚'Ÿ]©mæ?L`£w¼F%T*•èä•Ò¨ua%C‹ Œ,&ins" †y(#¯mˆ:ÚC!nË­ + ´„s\ô%…ém¤GÉ, + õè×q]= *„±áú#âÌRÕ7üMd#pzzÊ=?Ü·Ã’ÑÄ^÷‰ + +›8iÖg@uBoëj)!DÒP1ôp{¥è-Z|îG¢Ž…3Ao ™ÞZy€]6´¨WûšÞÎL‰Î°YÂÓÓSWr.²y à?ç«ÁQ + äôe÷xµiÍjmæ”ó¹h¶;FØ´5l"Õfl£#hèN¤Z.ÖhÓ©M + ±Îäë7z…&¸3ãW#3Åóóó|Çè ¯õL£† ÑçhWRÁ ËårÕ—MuÏã„à)!ÏŸ¬tïQá!~î·ƒ01Á“8”éøDØ=ÎzPÃ=’cç#´sÌr|gg‡‡€P滹lïv¨v‚.‹È‹Æ´ìÃ<9Å×n¶Kç­|úQhéÝ¡QÄès¤ú W„Q”@´ÑÄõ‡¼Tò^CÓ + æêkbbö) Û¹¹9 AÉÃôæ€GÿCÇîQÚøø¸ë\¬9ô%°²²bÛ´FŒå5OÖÃüìïï#=ß——ôrÐÀýˆÈeûߺGŒ…p¤å†Qï>«Ï2·‘Ô¯fû³|^ÙRß4j˜}ŽC1;; q3åñ¡fË &7ë:Y„Äáì‡ÍxT*7…Ìå|.ÆÈNefíBÍ,..BørO7­õõõu˜ð!ß퉕à·U0l + ,_’:ºaÜ«Yè0ÃÍ9ú¡Qih*Â-4¡‘ ªÙ¹s¼}X#^ + ’nlBœ;ÊQ;š%ƒŠCéÉ+Ρ  Ýñ"D6……2BâóÀ½ hºýâ$ '”Êå2lyzÆwÍyh“סw\ø¥;šPE´ Ï4+rèÃ1+ñ *‚ðu]â4oŠ·hrù0á(Á\#œé2ú¢A{P»ÑœùÐã ýÕh^H *R ©áúw#!q ÇíÈMƒØQ—6Ë·%ÖR©KBjr%´¹sB…ÉOÕx¦AwC¡Ie(HzMðjk》"í—)D†bH NDйί5¶IDATßïÉÉ ¥ LÑÐ̾ÍWÐh¥`m2ULŽ`kóTQ£ìT!²@øV*•ããcϹ/¥.h9ʤ£46€l¢r3Ã… Žcˆ}åûÒƒ?ý¸å@c5y †: yÝeN²‘º… ýôfc1Íg8†#º§L ‰ïƒïb“'æ*ÀÁn”¤ÙnÊ€{X£ÛU͆­ÖÛ”iaíd÷˜ÚJfq7ž"%ÊtKó:Ú®jmàR0Y|ôÙr»ªÙìÖV¸û”ÙÙö ¾š3—º[WC›†C>B‰CÃ/NC¹)e¢oÑÉ甩{–‘v´ + ûÆÆþRôµÛñšgÝãõí·ª%yÀ-Å‘R ÀCÚ @ úC ìÐjm.ƒ 1¨H1dš®ÝøBˆö‘bB@»’„BbB@ŠA!D)!„¤„BbB@ŠA!D)!„¤„BbB@ŠA!D)!„¤„BbB@ŠA!D)!„¤„BbB@ŠA!D€ÿeSéi* KIEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicBorders.SplitPaneBorder-2.png gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicBorders.SplitPaneBorder-2.png *** gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicBorders.SplitPaneBorder-2.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicBorders.SplitPaneBorder-2.png 2003-06-21 12:02:11.000000000 +0000 *************** *** 0 **** --- 1,17 ---- + ‰PNG +  + IHDRÈ鎩gAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ + '*¼hI·IDATxœíÝohW~ÆñqIvÉ‹F2É‹-x+‹ÖK,e M¨}ÓIIYKt¡yÑ]IIübûFR_”æM$að–*‰†]Z'ÈΛPš ‰¾Ù&EC6¥‰¤B¿„“íf›¬í–ÔÇóD§sî?ý»wîÝï#FçÎœ9÷^ùüæœ9sΑ­­­€m¿ÒêÚ !0"@„Àˆ B`D €!0"@„Àˆ B`D €!0"@„Àˆ B`D €!0"@„ÀˆÙÚÚju:Å‘#GZ]´þ÷¡=ÝÑêt*\( mòöÀCOe}ï­Ié„”ä•Ç²)Éw~œ¤±k´!î1"@„Àˆî}å‡;Èò¨$þ$І•”·Êñ* [<ôn×þÕF%퉮$@„C» Ká°¢EˆÂ¡ÅˆÆÉä§Ö¨$F§n|ï(î1ä­Ê,:èŒJBqЕˆ B`D•”F§t&¾w£’òƨ¤Ũ$]I€!0"@„QIùatJgâ{Gá0*)oŒJêPŒJBqЕˆ B`D•”F§t&¾w£’òƨ¤Ũ$]I€!0"@„QIùatJgâ{Gá0*)w5F§\½zÕ'NœÛ¤Ž”Û•„â + !0"@„Àˆ0*)?ŒNéL|ï(F%åÊuAUç~tο1¯â Y·iu¾w  Ñ•”Ÿ­T«K¼=ýçùÞQ,´òVYG”]]âP"6 @h1"@„QI€¡õÊî10*éà;E¡Ñ•ˆ‘– W-Ð#?ô¶è(­|Žáé?ÿI ϾK/üŃ­.äªe7ŸÕb(J` Å £ðäóÎjM‚Ö(Œ`9|øNQh ”-,Ú µ+½té’~g'''O§*÷ßØØÐ!Úÿøñã!ñ”Ž + »?öŠQIšërª,qyyY êþJŸšš*{UÁ@‰~UÇîé\¥ÔÞ Þ¹h1ȃ¯ôC+áÔ©Snܸq×ùJ_XXûJŸ™™IÒËÿîîîŽÒ±ey:Š„c³çÒ†_u+¤éïóP 0hºÕÕÕ‘‘mèªiiIõµ/ÿûúút-¯Š[JQ0KÚ_‰ªÖuHÈÊM‡ÉÉIUôÞGM¨ ×ûeçRæzU¿®­­åý¶ ‹ÀÐzÜ™<|øNËè’}}]ôÑ£G}-ït5T;T¨®w´°ééiUôãããn7TÒÎ:JÇ*ÛÞÞÞZçR¶î\R†M|‡‡ ¡õÁrøð–q¯Q¶GÈÜÉã8šÙCºººjå©c‡††œ­š ;ž »ÇÍg-ãJ\×õá瞎õ]h5ÔìhxÙ:@Ë ¨~,•J³³³{:vttT±¤?µãΊãããû-fÇ)@WÒ»ÿü· Ïó½ñϽ;µó~Ì>611áŽ#otww¯¬¬xT’vóMc… + ½êÆD¸Q¹166æ»ÓJ •~ÕsÍÍÍéÙ§"P_¦ÄP`xï­|úWÛe`ð\I<ùŒ=i»ï´¥¸Õ±±±ÑÛÛ«vÃÉ“'=¸h}}}—·EÔnØÜÜT½¯0Pë©7ìUZ ‡^ëk 4ZÛ}§ûªµs «ø¥¥¥ÙÙÙååe]Ý«–ßýMãéééžžßfжÍ,ig!0´^Û]]âÀøNw¯ÖÄ;R¡‰Ð$Ü|Dh1ìàÁoݾ©uëÖ­O>ùäرc­.4]ÃíDϼÓØúèOZg5Ó§øô3GÛzáO^пª/±ÚS†«6›Zï,ýµ‚Áçÿû‹Zû;vìÚµk½Æ§×bH2«~f + a·pàä䤷}–±±1ïÃsÑûV€QIùO¢÷Å¿\þ‡Éõÿø²ðà·Æß~ý¯>ÿüó7ß|Sǯ½öڻᄏãî¹çý¥žIùϺÎ蔄‘‹‡W;|ï­íJÒÕÒêêªgBU???ïO‹¤ª\×UzÕ«°y7ψ×ßßïU?µ³êzí¦ÿJJÔÚÐnŠÓÓÓJѯÊÖ©vó$ÛüŸÚ·b´rvÇ_ý½Áü䟦?ø׿ ‰j ¸–¿páÂgŸ}våÊ•×_]AâêÕ«U3Ñ>¯¦’t´kx ¢ê¨$~ÕF%uÇÕõªåÊ:e pªfõò + ËË˺ä¯\õÓk6¬¬¬x¢$%*Û³gÏ^¾|Ù9;Š¬­­íoþ%Xî1´Š + úwï×î«|I­ý->ÿüó~øáµk×^zé¥'žx¢Î„}ô‘oYHu·WÔ¹yó¦ËàÔÆææ¦B‚[ IŪŸÞÍ-åD¥hC;/,,(O½ª¨ DýÍï:†z¾ñ[ô›ßø}5êì£xðÝï~÷å—_V„Pœ˜™™Ñ_¤"Gn…Ú™ë÷•Ôðð°þƒT]ÂóRJû¨‘Ù ‘l?Q”ÍY)Ž‹‹‹Š + 'Ož\MÑb8ÃêG…2'NœPsXW.Ÿ~úéÛo¿}áÂ…3gÎÜyçÍ+ÐæT¿ÏÎÎêÿE¨Êkí¬=Õªp§ÐÀÀ€ŽÕ“““ÙÚ”IHTíïÜ´³ŽRTpW’ÔFóßÜ¡U€{ ïœÇúSö`ê™gž¹uëÖÒÒÒ•+WΟ?ßêByS–âñ¶ªòÊ8essSuº^:uêÔ7¼†ÏÔÔÔÚÚÚÜÜœ^:ž + ¹é",,ΣmE?è–ž`TRk5piÏv‚üµÃ÷Þn¸¡Í ÅpÈ0*©CµtTfØî1"@„Àˆn>çÛ€ª“æÀ@Ñòƨ¤ÕÁs%¡pèJD €]IÀáwî™wš}ŠZ«i•J¥$]#a¯9rÄ«2°`ûÐÂS·‰VÏ6h+-ëJÚÚÖª´Ê{o½˜ý×êâ /ßùqô¯“ܸqCí]†ë§'XÕÅøÑ£G•Òßßï¹T/]ºÔÛÛ›M Ç*eppÐûMŒŒhO¯ ªññq%j‡……g¢ŸÚNÒ5‚¼§Oêù©¼¡£¼§O§Ÿ>6ÌäÚÉZa«ø~xè©ì¿挶öÊcÑ¿Nâesæçç½â¦~NMM ,--©Þ׶¢…êúÓ§O»ÇÉaÀ\M{vUíã•A³‘#IãÁè訧ãv&ú©í°rC-ÊJð)´¿'UJÃ?Âá€æêëëóüØËËË333ªŽ×××U›/..ÞH©) W§§§U5ëÕP¡ÏÎÎêU¥(Ý-ï311‘ JTÀPÎaQyê:«2hÏd{­P5)tRHÅÇ6ë³(ˆÖ·naýή®®$­…{{{×ÖÖNž<™]8Á»…ÙBâŽ};>ÐWúÞΦ최¡´ŒÀ ¹ VWWUM_¾|Y—öîñ×»×jNÒ&E’ÞBHÒ.… 8::ªÝ´^ÒIÚ³¤Ã§¦¦*ÏâÜnðO§$i_–ήöJ­ºn=øØG`Ð\j”J¥£Gªvž˜˜ðšúU‰ÚPâ@*ÜRv' «ÖVcÇbTpøåPkç`iiÉ­ŠÝ\þã  + £ÎðS47Ÿ ÂÍçü´Ãèäï…Ã=†¼±‚[‡b7]I€!0"Üch¾ 4ÃÕ«Wk½tâÄ oœûѹZû\üþEoT½Î&&&ö[:´CÞ*ï63.¥#p·¹¶ÉÉI…œZÿ¼RÛŽ+0kŸR©äUzj¥`— ¹«BJg¦`ÛððpºÛólïÐ@ÜcÐ,^ryddÄk5{Å…ÕÕU/­/£t¥$ÕVc«/¸¯Õhk{ppÐÓh‡… kM—­tïà…úûû}.çÉ + ÏU4—ê÷ùùy¯¸àŸ2::ªÊºlg «1÷õõ©=‘¤3è)hÿ‰‰‰°|´‹®ºtåÙ½ÜôÐЂ2÷Z¡úµ™o½¨ šKUùéÓ§½üŽªcUÓsssª£½¤Zåú9^ÃÙóåuww÷ôôhC9èÚÿøñã^ÚA—RÉöbpµî~—Ý˺)6èì}©æ½ñâ"0h®²µ”K¥’;pΞ=»ïÿ[õ€[x’À=9¡îÞå"ÌUU. íÛÎuî”í Ã]T`ßÖF%€fiÃGÌü0‚Êúúz­Û 0h Ê^Ý·ÜFª­ŠÔ† €ÃU4—Ú o¼ñF­ÐІ šÈSV”J¥þT­1Hž<Ãóåy#Iï„#ÛÂDû–Í-;»†ÓëR–XJíx:¿£ ··×]ïÉ.ÏÕ(Íâ)+&&&¶¶¶VVVôëŽuz__ßÒÒ’GMMM90ØRÊiø™çƒpnsss:…bC’ŽgUJÕë¼´KÓÓÓ>cww·>“ƒd•€fQ$Û®ñU­'é mÕźv®œÆÎSìùg’Ɔ0¯êé”UκÌW ›½ê¯5gŸZ*¾Tφç¦_q˳'…¹üܾñnn „—´›gÔÏÐúÑ«~/:Ê=f¥m¡ðzû§·ùÀlùµáÄìû>×Á4‹ÿ¨rwÝíJ~IuñtÊ»UëÙ†Sá°0C˜+I»ÍÏÏ/,,„J_1C)ÚÁæn (&ù¹¶l¬ + …L¶Ÿu°¡¡!?-¡lÃóÕæ™ø”ÿÙ³g}ˆ[EªîÝðé’íg5Â8]èê[oÖoM)ž9Êå2¸ïsO>hU^+++³³³ª¹R‹‹‹ªé’í§ “tZl%V>žæ”žžžðœ¯Ù•çØؘ£…ªBç™dž ö¬y®Lu^U¦ÚY]]]IzŽc±B²í…»:\g%ªœ®½\þ¹¹¹$­µý«gT9)U$å>Hùxÿp Þï^ÏÕ(Íâ‡|ìž“PúšNjO~W©ll½š + 9ª[vyËÁ1#{ßBW²é*’ªc¥+Å}_YuJ®*[§p$+{UÍ_Ñë§ûÊô„¬´[öÀýëàèJÐ,~ò9[k‡Ë]ûñ7ÏŽW+‡ÍÍÍÊÎÓU¶rsÔ©%ä¬(¢mê__n»#Kæezنʉö”I¶äá*‰û¸<—x%ï/¾ö×þÊÙY‰6*gôÛ÷¹` š&;‘{–¶Ò ÿPekãúõëóãq;ÞÐn¾ÄžHUVV¡óÄ»©rÏÑná‚Z{†—•PÈbn7x;¼¤ò‡y¼Ý­¯Äl\ñ,ßdö±eÙt”Šä¬B˜Ô†?™ìû8W£ðä3€æò5o²]ƒ'é¨$Ïa§KòƒÜ2Ýqú¼lT½6dYžªó|¸Ól3º)PëChì¹vÀ o ^‰Æâæs‘4ö§ˆBOkï¶åpý…2KKK|Úm­±=Sh¬lŸiv8š»eëRÖßšíx5ûkH9ÕV‘¯I¦Ã7Ë]¢e‰.CÕÙü³o!Û!ëEZÂéôQø3É)œ®¾l¸¶·*z„üQWöä†âUö4¼ÏÈ£’Š¡§HÒÅ{=ü.I×[OÒA~)Ì ¡öâç›T†’}5{ŠÁÁAÏ¡¯O 3÷K:£^Rj _©ÅOH…¸—Åö| ;~ÔÞÙÃc²Û@AŠ¡§H¶—ÒuHX\\ôzë¡´a&€pÉßÓÓã±pOŽS²¯†ü•³‡Ã;md[³³³^x¯s“e?UG£pRÛ‹Aîo¼³ßrv((C1´ùÔŽU­œ³#²=Ù‹…Dí9™r;`ÇËÆ´èë_U ½ª&‹~õñÝs*¡‚Ÿßc]9®Bô†£Ópó¹Úsj쨒¡¡!Å-µc´[vnÅ›Ê"… âj÷ 5¯[ ®â]ïþjÝsÎèss ptôá¡ù¥Ï–~!tZ í¨rîõ0µ€ÂÃõë×U[pj­ôž­«<Õï:ÝÍ›7v™ƒcF6EERDQè*4•íJ + ‰ŠaÒãðTgeÓœyÖIn%è’ß š=5<ÄKeXO)>94&Ûw¼EÑ—5 Ñi íH5”ïåº*TÅÔžS „þ(—ǽReOö‡™ª®áµË:WAųØûŽˆgT1VSså>®ìm½åpêªï]aÌ·aBJý¶‹ßr­÷- …„Gá“í1”[m<µ@ÈÇw’u‰í_+‡«ú¨$3Tï"I»›B&ÙWw®ê3†‘»î[ ŸLVÕ¡«:°¬q“ýËv.k!¹*»g­ÂáÉç6UõY¶C6µÀ>4ï·N~l(C`(6¦Ø%UýeClÕþØq4Й Åæõ:O   €£’ B`D €!0"@„Àˆ B`D €!0"@„Àˆ B`Dþ)?¡köÃBIEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicBorders.SplitPaneDividerBorder-1.png gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicBorders.SplitPaneDividerBorder-1.png *** gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicBorders.SplitPaneDividerBorder-1.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicBorders.SplitPaneDividerBorder-1.png 2003-06-21 12:02:11.000000000 +0000 *************** *** 0 **** --- 1,21 ---- + ‰PNG +  + IHDRÈ鎩gAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ + !»”Ïõ`IDATxœíohd×yƯ'Yš]‘`¶à²+ZÃbJ´j(^Ú`­ÒÚlI‰$jˆ?„H“4ëo•Ô/©óe%±)!ZµLÜÄ«…~h©gÚÒØq`V‰C½m­‚)µЊ$­7MbmK1Åí“ûx÷Üù£‘4Ò½3óûa†3çžsî¹ãÕûœ÷}‡nݺ•Üæ—Šî” „"ˆ@ a€„"ˆ@ a€„"ˆ@ a€„"ˆ@ a€„"ˆ@ a€„"ˆ@ a€„"ˆ@ a€„"ˆ@ a€„"ˆ@ a€„"ˆ@ a€„"ˆºuëVÑ}€ByúÜßâ¡çZ]Y]]Õçììl6sqqñlJcùëׯ«ŠÊŸû¬,øÜÜ\¶Êòò²2ççç³å³ÈîKEÖSÚÜKjq:E vû±z„ + Æ«FÙ!ãEÏrÑ®rôèÑVmª®×”Ô¬ìþŽ÷‚,”qÏ ZÍ ÚÔõ.ôöö¶¦]ï[ƒ0@I™šš’}Ÿžžž˜˜XYYÙUݹ¹9iÉXÊŽ…¥ {ífò®V~`Pø·¿:ð[ÜûÉ6½ÊïôÙ³g=QPâÔ©S>t¤„D¢V«ùõå誗ƒôÕ«L¹Ä™3gôyäÈ‘ùùù«W¯*áÍçÆ{¹˜n‘]qpxÁ `à)ô·6\¿~}ddD’0::êÃE›››nT*•jµªyÃÖÖÖêêê… wÂååÊ•++++’ íeå;ÔûEo3LNNjÞpÝì7ˆ`ó"ˆ@ a€„"ˆ@ ‚÷ßüÏô-¾û¯u^x·8›û„ýÀŒÊEÓœmhìöÜ `4Þ—Y×x?;KÈûtŒOÇb›ššJ2Q?³…P,T\\\tÚw™ŸŸw\'µ¥$€A§Ø¥¤‰‰‰k×®9N§,þ³Ï>ë;Ë“)¯×ëº:22’¤¾QUÌñÆÆÆõS…eëUL + ¡LUTBŤËËËÊÑW5;44¤TÌN¶1}m`) ŠÄÓYpÙîÑÑQgæpÊîÏÍÍɦ«Œ”`mmMCþƨŸŽÙ ZÊ”x\¼xQ'''¯¥$©®(±±±‘‹9(YpGÔ©T*7oÞtf.§[[[šIx–´ˆú陇k9S9J¨pµZU›º*UP¦Ôâðž°A 0lß×Sfgg5ÆoÂs5Ee4ÈjFV$’TNBÚ‰½§V«I4#ñìC{( Ù÷•••ééièƒ)oUX%5«ð¢ÐÔÔ”êªâââbˆÊ933£FBf§Âª%UðR’*¬­=„öt¾òÔßô-ùLó¥›#GŽœ;wnkkkccCé'žxÂ&;€óᇾyó¦—€ú\ŠjݸqãÂ… §NR1UÑçÕ«W_}õÕO|⚨Mµpüøqyr›j ah§’²½à…ƒ0”‹¥¥¥ìW …ú#'90Êö¤{Ëyýõ׳9÷ÜsOPì1@ÂDà+ ºÉbJcæavàïаù Ýdh¨øQeè@OSÒƒÝ]õݵA‡yžçyú\ôõ¡çžüñ“ÙŒówïVNEöœ6p* JEI…AüÑŸ¾Ttvæ«Ÿ)º ]†Ígˆ(Wè¹U €¹ºƒàü]çúlooãio0c€"Ê0<<Üù‰²+W®¨JSo¬IêU­ÙS·H´o$ÛšúÙ¾o}{#Ûš˜žžv¯œß¦J.s"e?=Ùf å¢Ww›s<ô\.£qÀØ­œþpÂ3à»Í³³³333Iíyiiijjª“1¾Ê8¸[ã¥ëׯW*zÓ¤AfT6ýÒ¥K¶æ3 Á5·ò“TB”?::š?ºÜšz¨.IôU ¶rÞæÒÂŒ¡\,Åݽòô¹è¿xTØE’Ô\ö¿¢Ÿ|¼Stw›'N8,³ãçl§È²gGÖÙ%¼Lä  ª"#«}(¢2$·-¾£¼¹ÀÈȈ¹áh̓qýõ…¹‹ûæ¯j¹±ožm(s8Å‘¨Õ”f*Ê×휓mMߊ€Ú7õüÆÅ_åA `4Q°9“mÕtAvÓ‘yï³Z­®ÞF_•©„2Cu}½xñ¢ì¬®ÊÔÊž:Ž›Œ»m·#»¹° + ,§\LiìŒ.%éP=Ì ¼ÐdS{òäÉƾ¹˜4C9* §ÐWÝ7Içz"ådµÊ¸K6èFÓ&ǯV³úô,Êè¡ÊÔ‘J“Û³"ýVº…CS„Þ†ðD{†¥$8<º»KßjYz²ñññ$Û#›(Ó6??/Ó¦t­VKÒñ²CîÈÖ+_öQÖ6ì.HWddU%ÉÄ]___YYQ™jŠÚQ­$µøªëZë–ëŒs4‰ !ƒðÀEu  » ; ™ÁÕú_H Þúߟµ*s÷Ýwß{ï½]¹]Ïí67‡SI»dÀO%%éÖñÄÄD½^ßí¢üâââÒÒR!g + ¼õAƒ0ìÀ±Žœ¸çþmþs›2šœú`Àþo×맒ޡáTÒÁݪi·žƒnP*ØcØ™S§§øÃ?»ãŽ÷¶*ðâ‹/Ž¤|úÓŸ~æ™gnܸq˜Ýè._¾l?t~ÓÍ.í†2.¯···§§§‡š9Á^]]U¾_s þæÆÆÆ‚ºà]®Ñ_û²V¾ßkêtO »ÆÛ؈Ž;öÌ:âWí·ÿà“_yþoÿ¤Í‚’& —R”þЇ>ôàƒêßÙG>ò‘÷¿ÿý‡ØS€Æ~â$2¾gÏžÕÚ9úTzffÆî”c·Õ£££¡¢kŸ>}Ú^óB™°6¥Šöb­Ìjµj÷~;¬s!5µ¼¼\«Õ¤U“““jS ågy} ÂÐ)<~êãŸúÚsýÇ7ßüÁŽ…¿—ò¥/})IG"’‡Cˆ­ÐëاŒ»ý§Ú}©L³ý=ØCuð%§böuš¤eJû•iUÉù›3Á»œ”#¸ÒSËj¡0HTòرc¾QÖaŸê6õÏÚ ÄRÒo-ldÿÛs;¿|ôW>þ©¯¿;z+B‚¡ÉÁ»ßýîVµêõú¾ð…~ô£ï{ßû>ö±=öØcÒŒ=÷ ñ;½áÍ^ØQ"ë®.ø’Ëž=UéG{¦¡Y LhD‰VÁÝvl'4ÒôÅŒa§•›¼à¶×w›ß{çÑsÿùÚß/n¾úŽë•_ÿßþù/¿õÖ[ßþö·5WýÆ7¾ñòË/7­«2ÿ˜òùÏþø€þY?˜’ݵîÕÝæœJÚ%»Û|ýúuYóù`eeE†kœ¾´´¤±ùââbXß×h½V«)SÇÆÆÂHsssddDå=P›ããã*#µh<æ¤ø{Ô¯DpWç <­b…†¨{jV¶ÙéHŸÑóÂðáû϶¹îf•,wÜñÞß~ì¥o.¿ò¯2ï¼óN[ù/~ñ‹?ýéO_|ñÅ^xA"Ñ*—Ê<“’¤§]x৞z*áTÒîáTRO#[ì á«]]ɾËëÓ^H]@V{yyyzzÚ^ð-„*ó%}U¢R©(íU©Æ›êÏ*4b§{JÌÍÍ9³½» ‡]³Ã¾®x@*'=ïD¯@$ ßåëš1üÓ _nUæ‡?üa½^×,AR¡t›Öü?¢×…'z{c`…¡‘œ:G¡ÉΪwôL§é‚Ê„Y…û4ktºg‡t¼HÑØ«>aØÒM:ü õÇ/…NH$4cÈ]Eöv/„rT«ÕpÕ·ûxh@ôüRR±H:/¬¿ö¹”_T|é%ý{Õ¸CŸo¿ýöu`àpÔèœÃmØC1œIyôÑG¥ + žCÝ#€þ¡»þ®–’öE×õô:ï,%5ËOf)épî0P0c(½¾ÇðœJÚ%ì1@©ˆÜ sˆ@ ‚=€Aç³v- + z+þò±ûvUÞïšõ÷Kde¦¼§’ŠîÂ.(çoXœJêEÊ Ùhh•J%¸Ã›måú4T ‰àyIr211¼ÙïEðÈ´ì#¹^¯ï¶¢þYªÁÇa²‡[—tÆþª{K!ö§’v §’úŒÕÇøTB"1>>ÞÞ¦;ÊB’ñ¼äyÆéÓ§——ñ + êÊÊŠÚÉzc…ö”}áV/PôÐ?ȸ‡´,¾BcG[s|·œ{m} aÚü鹂_sv7`g«¹pG;:›ƒ²ù}i5è¨mcccÎÉ’çÞª5˜-ߪÕUÎôô´ËøqNîJŠ;cÕjÕèSé$õÑä’¡ç­AŸ¹Às»¢ìÂ…Çþ²¹¶˜IºäKŽË655¥üF{¤VýiçHö¡-4cp;!$œ¤ÂÞ³C]eª¼Ì¨l½§Ò$I‹xÕšœœt\9•wt9õJåÕ‚ÒÙ’4.P¨k3}éÒ%ÕRÕr;Ùö¥êž±ƒXK£ÒYÉlJxßÔ~¢vm”t) ›ÂË—/Ë {Y)ú\|·Æº.¦OÇÒñü I%A¶XŸ!á\1¬8%é@^Ÿ'Nœ° UKKÖÁF.‚›ÚÜÜÜT³µZm;Å-¨MuÃF]Qíëªr”ïþ»ŒÝ€‡ö•)ÁpP + ÜÆ`öÔaÝT7 + ?×nÿ/0c€ÂÊmŠÚ¥¶ìøfŠL³ ®/åâ»íˆÌ¢{ÕŽw)š†„kƒäAV;·3‘‹à&+<22²±±1::š-ébÊÉŠŠ2w\ÛqÅà6—Ó9»ý¹² åâBLÑÝÙ+=ýw|÷;_Ëþw ÷:8î‰)º;‡‡ì¦ï2¬6aóÊ|gWW‚µõpØCé6cgÕmeCeÄ5—mmmµªî–uS+–»ç¹KhÄ·pô7¯økÀ.ðäÀ-¸¼¦’ Wœ››S1rØ8‰„ªçŽœðÆvÙtÇÚí,O ª‘àÓt `óŠÁcö‰‰‰Z­æ„̴̱sVVVÆÆÆ…Í3i'|µR©,,,èª=]K”PyÕÒU% G…UÅå›öAù¾»ïµ±±á{¹o{ Ö P$sssõzÝ.eÍ5´_^^^__¿p႘æÊ«°‘Ú¿éÌÌŒ3eÇ5Ø_OÑ_²¡¹‚yêªÃ>·¹»g“““ ­´§,þü¥a€"±$ÚÕöåË—‡††g¦/ + 5ú²¶—éááaÕ•$øk®ýï.%PËššh + âô~¯7a¡\ôênsŽçï:@9=ºÛœcw›m¾ý)C\©Td‘5êט= yG¼A“Û±BxiI¼Üæî–ݽV«I4ØûSõ8C¹h<•Ôx^¥ä9%yY!ôªl¿O‡9­Ÿ¬ßXXX]–-öÒþdÐ4­C&&&æææ¦Sdß5cÐ$À!Ò”399Ùjþ‘»{’.. ò:R‚0@wyíµ×dÔJ¢ Ðhô³¶¶&k~éÒ%}Öëuë­­-}õÙ¤° + ”]òÖB’Ƽ 5UW ]‘qw¾÷666Ôšò³g“”Ö­5Éùî!<œ¾²*$’‡ì×ÿî8Ç‚’ãàÆÙ¯²æNç$álŠs|¢4IWBõlÐZXÊÙzY¿4—Í—iö 9DžÁatö¬ÜûÜól T¼>’ä™DÑ})„Š!;9( ³)E÷¢xŠ÷l¥a€ÂØÞÞö1¤cÇŽÍÌÌ´Úò ï”nô|gWNG{î’ï¾Ú÷Ænq ½;ùà7(Œ‰‰‰jµjWHÓÓÓöcшTèSB²¶¶fOCCCÞ=¶«Œµ;·hõÖB'ø^µZÍ V*ur·\NÙs + ‡=(tÍêõºÉû}c™{åøÕåÜä@©ˆ>=$Wù0Wðv…4cxxXWíSÏÅìS¯•Ï>©‘O²f_u^^^v¯ìe/ÉL&B¯²úTÞs—ìÉ(õGí«bðÇ—«ÒÅß³›Ü(¿¥ì÷ ”ùÉíטuÉîlôë)Nøˆªß?ðá(×}óÍ7“ô¸”Kª€Ï…ºáÅ嫼Ûñá(縘„ÁUN§(ßÇ^ýU }UfðÚ­;†î¶.©€¾†;ê^¹*‡ý‹w Â…‘}ƒAæÒÖÖ–úVjåí»Q\̶ÕÂà—Ž¥lnnªŒòÕ‚ÒY©„ûú’4@9NëjãA)t™x÷êVjÜ­¾£ê*­þg»­´ZSukžÓ*™­RZØc€ÂQ–•Èønoo/,,8ß»Åw¸a0žâɇÇìÃÃÃ9‡K­=z4¹í"I7 9ÉmíêáÅ‹¯¥¸W¾Wpûê)‚ëf»ZSûöûíœP¥´°ÇÅ°ººzùòe©ÂTŠŒux}kkË ¯ÎwÒZ.ö§7«½²$yhZÅ; + î€î5ºÛ³×U%B¯”h´ìj-Ûm‹“Òž@xˤWÞ›C Ξ=«ÑúÄÄÄäääÍ›7¥aeIé`L5foՂݵºªºì· ê å% ÞÇö¶G’N#lÖõA]™™qÈw¯ñ­ïÙÙY€s·½›íÈBz@R + í—œwí3Ä6ÀÞ =wîœ$áêÕ«o¼ñÆ#jyccãÆŸûÜç¼}êÔ©¬Wyøᇓôt“2Ÿxâ‰3gÎø^*ìfUàñÇ?räˆ7ŸþyõJª4,lGëŽúÔ³Üwß} ˉª¿úê«ê‰¾^ºtéøñãÙ*¥…Ü \ Éò2f-6Ÿ \„PÌ ‚D 0@ÂD 0@ÂD 0@ÂD 0@ÂD 0@ÂD 0@ÂD 0@ÂD 0@ÂD 0@ÂD 0@ÂD 0@ÄÿÁnÿJ3·µIEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicBorders.ToggleButtonBorder-1.png gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicBorders.ToggleButtonBorder-1.png *** gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicBorders.ToggleButtonBorder-1.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicBorders.ToggleButtonBorder-1.png 2003-06-21 12:02:11.000000000 +0000 *************** *** 0 **** --- 1,20 ---- + ‰PNG +  + IHDR‡h VgAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ $4I›3±IDATxœíÝkhÍÇqg“1—i ¹æ>-%Ö˜HSˆV. O\"å¹BB†QrÏò@{ (|ÈÎÎ;vì”)SzöìÙÂO‡¿@*M{ôèQpÉŸ={öÏŸ?µQQQQÜ@Ûùùù­=€ëׯ—••ååå9s¦ººzûöíñžYUU¥œFµ–#•f3fL°Ñ¹sçþýûO˜0!òèíÛ·¼uëÖoß¾?~ÅŠ_¾|ÑÎ#GŽìÞ½ûëׯšAmÞ¼ùÖ­[ñv†;vìäÉ“¿ÿÞ¸q£ÎàÈCšƒ]¸paÎœ9ÁïëÙ³g28p ¦¦FOøñãGmmí‹/"·•VÌá:tèàÁƒ{÷î}øðáÒ¥K?þÜ6_«4Å]%^½zuêÔ)v#GŽÔÃå˗늾hÑ"-rtÐNˆ«W¯Ö!5ðçΰà¨ZêÝ»·zÐUܸqÁ!Ö¯_¿ž:uêÊ•+ã C˽°´´tæÌ™zxüøñ`;æð–,Y¼jß¾}YYYºçܼy“ïúi©$€æK:uÒd&x8~üx-oîÝ»§ëúˆ#‚:üÿ¥Ž¹3LGu7X»v­¶uèÛ·oøýC† 9qâ„êÒ=¤}ûö-^°­Ô‰6ºuë¦5ÿžAH%²³³¿ÿ^WW§NµéÚµkŸ>}tºkªì Þˆ¹3Lg­â9zôhp4Ê AƒÖ­[7oÞ<ÍÙ&NœÞ¯ùÕ¯_¿š;¼ü±3 k•Ð]¢G/^Ô¶ÖÖšÌLš4©_¿~Ô´çÎ;Z¼|ùR·‚˜;#?N¯^½ªªª‚S_çwÔ'ºté’&iÁ›ÅªîÉ“'ºìß¿ÿÝ»wÁôr-壶c¯Õ¿(ÿRiÚÛ·o‡ ÖÈtÙÖ*\ëÅ‹k  •wð+Ø7lØ ×j¥^XX¨ÙTNNN¼M“¶lÙríÚµùóçkE±iӦ𡊊Š²²2­ø—-[¦™˜ö”——k±¾`Á‚üüü¼¼¼àisçÎ={öìš5k"·ã ÍÒí;ÙchBbÿ_„V®æ7á뢮«¸æH:#u0`@“/©­­íÞ½{Ô + ¤]ÛWš8if5tèÐÆw†uéÒEå4þé4—ÓM©cÇŽ‘;uGÒOÈÚndxA#*9±ßŠœ²'$k•¸4Õ©®®Ö5»²²Òé¤]Ãœ'òáÎ;Õynn®N©’’’ ‰˜;£h¾ä|ºð¿ÞDR á6"·ÿš…TâÒ¼EÓ¡–|„… ÖÔÔh½~ýú¢¢¢Fv"õ‘J+*hàìDêcYX2ñ®’ÿ/-—q©ß@4WÆ¥Â-‡µ + `!ÀB*€…T ©R,¤XH° + `!ÀB*€…T ©R,¤XH° + `!ÀB*€…T ©R,¤XH°¤ÇïWIöÐvRö„Lƒ»J}ƒd™. î*@*Hƒ» + + H° + `!ÀB*€…T ©R,¤XH° + `!ÀB*€…T ©R,¤XH° + `!ÀB*€…T ©R,¤XH° + `!ÀB*€å?õ«¢Ÿ×Øâ™IEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-1.png gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-1.png *** gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-1.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-1.png 2003-06-19 10:48:46.000000000 +0000 *************** *** 0 **** --- 1,20 ---- + ‰PNG +  + IHDRhÈJììØgAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ &jù„¯KIDATxœíÝ?LgÆñÝ“]¸q°(’ÎP8M¤d¤PDÂ4æ:@ráÆ"]K@y…ØEJÉMtRW)NŠHg óI À ë..,° + + ß“ù‘÷fÿáyÙwwf—ï§X;ÌÌÎ;Ͼï̼ïæ?~ü˜K{´‚€7‚€7‚€7‚€7‚€7‚€7‚€7‚€7‚€7‚€7‚€7‚€7‚€7‚€7‚€7‚€7‚€7‚€7‚€7‚€7‚€7‚€7‚€7‚€·ÁQ,»»»ONN.·øèèèììlý› iòõÿäàààÀÀÀ¥þ½½½ÞÞÞ£££®®®:·@sÔ[ãÐa¿¹¹9>>®iÿVõ( + ù|^å•ókMkžéééžžEÆÂÂB[ iê ŽÕÕÕ®ˆ¦Õl™‹LMMÝ»w¯rþ±±1ŠÂE ÚS=jΪ) ›ê Ž­­-×ÄPÝaffFÕŽŽMTddDŠ -ØÑÓÛ·o«æRç–hš†\U¹àD©RFa±¶¶¦‡U7´œzƒCAàbBµk¤hzbb"Õ,*OšNNNª\«}Èû÷ï­ê 5|¬ÏÊÊŠVr||¬i;Í©‰ÅÅEêOÖ`)[D3ç¢ó®D *nêÜMSopˆÂBIQ믪V”•(8â‹)GvwwëßÍà>µ;¦§§uäWþÉ®¹Ä›!j¹¨9ÓÑÑ¡¼Ðcî¯FUR´„Á‘‹În( ,.VŒ(JÜÌÊøSÙ&8\)trààà-pp¬¯¯çóù¡¡¡°«)Ô8x#8x#8x#8x#8x#8x#8x#8x §§§;;;‡‡‡šþðღ‹Åb¨•È”`ÜÎÎξüòËxX¼xñâÑ£GAV S‚Õ8®_¿þôéS÷´««ëáÇ¡V SBžãPR¸Ï"Š’€+!ƒÃU:¨nííZµäóy›ØÞÞVj(>^¿~Ý××då…A›J˜“£ + ·žõõõÁÁAÚ)Yÿ}ÒÆÆÆwß}Ç?µ„ Žù—N?ÈQ’VIîß/)zð«&ùwŸ}õÕWOž<á¢já0”ûí·ßúé'%HÚÛ‚Œ"8PBañìÙ³\4½$íÍAF(aÕ ›¦ÒZüŸ«n*¨%üUdS’“£§§§¯^½züøqÿóçÏ;;;ÝM}€æ>Synÿÿüo¼ä_?KI#JþûÏ»ñ’oÞ©¼ª’KàÆwïÞ}÷î¦oÞ¼©é$Ká + ¢©ÀÁÀÁÀÁÀWU®Šä·œ¯¯¯ Ý¿ÿåË—ß.´¤f_UqýhŠ² ÔU !š*¼…¬q$G»&jpH5ÞÞB6Uþ?¦Ô¿~þ6àúQËŸgCËp6Ôì«*_WUÐd4Ux#8PÎúÅÞ¹s'í Av¥s9YÖßß¿½½öV Ó¨qðÖì¾*É{L ö¹è,©>èW³O}(ÅbQ©¡ŒÐ1¿»»«§Ö§¶ (¡oÈîîn}¿Y·««s• »îùZƒV¾¶¶¦WѲŠi½¢½œöùÀÀ€¬Ü­Ya#ýXáââ¢f°ÎrÖïÖÒ¤ÑWÁ¬L_\®‡¸}øâÃ^ËËËŠKü¹(t ç¢Ñ7tÜÆGß°™U®ƒÖvšU¬Ç Ýw«Š›þ´QRØa¯°ÐîÕ 6P£^HmC›ÁÖ¬‰Ê Ð 6؇jY‡uÏÏE•àCµzå…BS%ôáÓ×Ú›ˆýN¬n×Eͯ¡öˆµ,ÊÆæˆwf³i›­±[øuÀ»‘ÄÊXcçýû÷ñ5Wn€ÅMkÂ’KÕ%…²C + ë¿ßèÁú¦²a¬ŒuWI{£R྽µ7Ü°F•£oTÒT¥@»N‘a×YlàRSëþ}öú“Ù´ÖèÕm°+´t°‹8Ö¢´¥.îÎÁúÌmDô%éÚäW$ÐÛÛk#kX¡¾‘ÏçíœB­Fœ–Õ"ª¯Ù/NØéL­G‡t­ˆÕr±ÓœV_PÕ£êØÅò[÷T‰£9µ1züæ›o4Ñ„n¸Ü9ÚÚ‚ß9ª¯GU³ã‡ÄU¾¬r¬Ê’Or?ˆwññìF»xr’n'}úª´¶à{^_eú˜Æ[ÚÜÊJÔ8Z[ð‡‚CÕévrÀ-ç8ç.ÁÎÍÍÅË T"8p.~ïc|¼/ª‡¨Dpࣜ#9‚çh’ 9®ª´¶öÞóe'}¡J7$@_•v°¯ + LÕÁ5.ÃN•µøÜÐŒÁQõµŠÅ¢ý m6‹¦©‚r>|8<<¼yóæ;wÒÞ–lÑa|érÁ+ + )½\6ƒƒ[ÎQîÕ«W}}}?N{CÒ·¼¼l÷w[=ºŸæ¶9ôØÛÛë.HÅËËnHwVôhë´[Ñݬ²×²uê1›¿hCp5ékeeEßùe#w阷9†‡‡ã¿G­é±±1>Þ·->ƒ–±A=.x-ëð¦ÇlöN&8€šfffÔXP:”UܸSSSñÛ~PÚѨÚκÕ+4gÙð®e¯e«mB?×Ëa°vp0 ®ª´®ª4™êj‰ ¨}¡Gò3¦vG¿#jÑ”ÝÚ_Uå¯ÞgMÀ›zµþ’/¨™µ¬,Zöâ­7½"¦ìTHFp9¨B•w¿Æl$>±¹¹9<<¼±±¡Goo¯Õ8âwp¸eË&4¿HjC4æ¢ñ5]ùZJ£££†¿ÏË"8]™½­SGûtĦ“ÿŠ•â`kkË5RÆÇdzyÑä“Ò »ýhQ###ªe$׫’ª6’¨ïHb™Òì¾*HKò¾*ëëëCCC÷ïßùòeã· -©±WU*ÏöSÒœ®ª ¡¸ªÀÁÀWUae ®F w)Ô8€*677­ëª›¨:› ´Q¹¬wÃ~˾leåµ^ºê U}Eg0RVh?ÊWk‘Ëil_•Êëð”4§är_¤§§§‡‡‡¹hTŽÎÎÎÖ½dDOOݯ•|ósssÿïðÎ%Ʊ_ û£|A›*•gò)ÉNI×®]{ðàA±XÌý5*Ç‹/®xpìíí¹á¹¦§§ …‚ýäâêꪻ¶íÊWVVNNNìþ®‹ïQÐ:m@0ûé¼Ü_ý_Üí§:ÚGGGsÑííñc^óØ(dz!Í Ò†iº££Ã–µ1A¬\Û£ ³Ê‹½‹P»…¦ + þïúõëOŸ>uOu$<|ø0ÅíÉ”Bd>RÙrq‘¡L±ãÜ¥*ÌG*ɇ稔pL»9ÕúÈÔõþK(¡¤pU …ˆ¢$ÕÍÉëÏ655¥ã¼¬Ú¯cR…öËÏúæ¿}ûv.vG©f¶ñ®Ùõ^U°ÝóƒÖ8*ÏÀQ’’Ä”¿üòKeƒüŠSå_¹RU5keTeCïh~²gzPdhm + ¯c[ NLLŒŽŽjc.n† ØèAOŽëäVÿJÐ-Ö1K7€Ù=vî@‡«òããã:_Ü~<ÅÎØ¥™ÝÝÝ„'#´ êÚ7&ÈÊÊJÛãác8ÍÛh\VÀ÷Ustt¿2½¸¸dµñÓãããÉTL¸!5¡Ä ²= Ñð`g.ÂŽzéá9Ü™‹æŸ|%8x㪠+ ooooooG‰ª(¹ÁšÜHJ + ´=zÇ–¸xÌ‚FŒ¤´¢FÕ8ÖÖÖúúúÞ¾}Û õ×ctt´··7 …¢ŠC¡P899± ÷»~{{{ÝÝÝ*tè¨Òa½\•D9r+|@ÇzhŸkÏkÿ§½!hgákúÈ>{ölgçÏQ0÷÷÷;;;ƒ¿„¯²3‡‡‡¹(:::Þ¼yc÷펌Œ¸ãMábc±Y-#U4쯪•ØØ*6F“eM¼rvvöúõëæ¼µJïÞ½ÓÎ×{¹{÷î“'OôfÓÚ´³€ý^~ÿýw}XÓ~CU£ýýý§§§Vòõ×_ga0˜²¾CÖ›ÈÆMÑa¯¦‡*6¤JœõbºD_¦k×®¥ ñúÎ7ôÉfš£¥… ŽÏ?ÿüùó窫©ò믿*>Ö××Uð%B±Xl×\t•dqqÑýÕ + 4[¡Pˆ/˜d$%µŒ¶··°Õ‰¼}ûö‹/¾PdüðÃú_dsÿ£Õ…?9jñ¡æÀ?þ¨ïÞàëÂÆ€µÎѪ}h:Þ1Y…Ê%K>Ÿwç8rÑHJJZ£Ng„ö¹ö¼ö¿þ ¤„nõ5#í7Ì,P?‚€7îàààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààí“êa)…[üFIEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-2.png gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-2.png *** gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-2.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-2.png 2003-06-19 10:48:46.000000000 +0000 *************** *** 0 **** --- 1,20 ---- + ‰PNG +  + IHDRhÈJììØgAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ9È8ЃIDATxœíÝ?L[çÆqûŠ YZ#†v«Ú¥R + Òe¨„YÂÝÀR†,¸ÒŠDï’ᎉ¥ªTãL®d*Ý°Äl\ ÉÀÂ`gk†7 CîÓó#§Ç ~ñ±Ï1|?ƒõúõ9æpˆŸ¼ï{Îû:ùáǸø[Ô`𜜜œœœœœœœœœœœœœœœœœœœœœ…µZmtt´^¯_o÷l6»²²Òýaè›d÷_9===55uíÿÑÑÑøøxµZM§Ó] €þè¶Å¡}¥RYXXPYŸkz + …d2©úÖíµ‚ÆÊÚfyyyllL‘±¾¾Þå‘è›nƒckk+íQ¹X,ªÛ²êyüøq&“iÝ~~~^¢pÑŽöTÚ²mʈ§nƒcww×ïb¨íÏçÕÜH¥R*´Ý~nnNŠ í8æÑÓ/¾øB-—.@ßôäªÊ¥J…Åöö¶ZÖÜ0pº j5X'Eå\.—ðZ­ƒ¦KKKªW§ÆZòûï¿[ÓÀ`øÐr¹¬79==UÙ†9U(‹ªÔKÖaiÚE'¼q ¿F;*nº<}ÓmpˆÂBIqÙ«jV4Õ(8‚»T«UåÈááa÷G ?B¸CýŽååe}ò[_²k.Ánˆz.êΤR)å…;5ÖH0BŽ„7º¡€° ¸ZÍ£(ñ7V¿p‚À­Â$7ÎÎBŽd2933îÛˆZœœœœœœœœ…ggg'''*¿ÿ^åZ­Ö›ˆ•Ð&¹ŸŸõÕWÁ°xþüù£GBys±Z‹ãÎ;OŸ>õŸ¦Ó釆õæb%Ì1%…¿â¹BDQ⛈0ƒÃotÐÜn¶¡PÞ%™LZa_©¡øxýúõÄÄD(oŽ°°hÂÎਂƒ”1çô7zùòå·ß~Kg— 38þù¯ÿ+ú÷ß©‰ª&ñŸkþk­ÂNþÜççç_ýõ“'O¸(†ËpšýòË/'''?üðƒ$êcALh °xöìYÂ[^ õá ¦4°æ†•ità2þä77 \†«*·E'ƒ£gggÇÇÇ{{{‹‹‹“““###þM}€/œû8L'cûÔô¢¦£3ß»wïÞ»wïÝ»w*òÉ'*w²n!º*œœœœqUå¶èü–ó™™™û÷ï¿xñ¢÷Ç…Ôï«*þW=À™GŸÑUàŒà@3›ûå—_F} ˆ¯h.Ç"Î&''÷÷÷£> + Ä-Îú=W¥óèg‘àªÊMÀ™GŸÑUAƒéé飣#+« §Ñâ‰ÁQ\ØÜÜ,•J•J%—Ë¥R)ÕÔëu?D€ Z¸”â#ŸÏG}ˆ#Z¸°àYYYÑ#_‰€«qUe°…~æÕ=QŸE~¢¤‹ÄÍÔÛo«ïæ;ÓщÐÏüôôt¥R ÖðÇB+Æ8Ð@©±¶¶ö! ê#BhÉdì’ + pGqÁnÙ¨×ë¹\®T*ùõ/_¾Œî S´8Ð@Í 5:¢> + ÄWUg‘`®ÊMâ™o½ÇÜnëâqÓÐUAƒz½^©Tê+è‘+hBp Úkkk‡ôT‹¨ 1Bp ¿ß\…àSÀÇåX4Èd2¹\nww7áÍ—ÕÓB¡ vcâªÊ`ëÅ\ÇÖÖ–ÊsssꭨѡàP¹û£ÅÁ\•ÁÆ™G$ãÀ%‹ÉQâˆ1\Èçóétš•{Ð ‚lÝ =Öj5­×ë m -‚ ¹\ÎÊ»»»ëëëLrC+®ª ¶ÐÏüèè¨ZŸ~ú©ÊcccÙlöððk±hÂ\•› Ä3¯~Êìì¬Ý'jý”à2‚€¡«‚j\,//[þ'æZhP,Õ=ÙÜÜôŸ² Zh öEµZµ®ŠÊ¤Ú"8Ð@m uU‚ãŒd£WU[èg~xx8NÏÎÎú5|¯ + Z1We°…~æår™eGq5º*¸à_‚]]] Ö"hEpàBp}Ààz_4ÑŠàÀn-Gç\ K‚ÎqUe°Ýì3ß4èÛ  $ÃsUnÎ|Ø×D¨C×yÓ̆ndÀÐìýû÷'''Qâ‹à@³½½½‰‰‰ÅÅŨ$J¶h³-ž¨‚+m©TöØtž££#5+´j–——mG«Ñ£¿Wp3»¡®P(è©6Ðû¨ÍfU9>>n…ø#8€66=årymmM[ö=á-; Êt:m1±ººªPPÍÒÒ’²@eÕ[Íìì¬ + ¶—â@¡>K>Ÿ×.zC[²@¼zõ*•JémíiðžÝ8#8€6lvŸ>äoÞ¼Q + ,,,X½>ù™LFokMè¥b±¨¼}µ ´±ráñãǶ"^U.ØŽV¹½½öT*½ª=Ú½3ƒrm+ÌÁÑ6ÔŒÉõg>túð+;ú<«)¡|Û¶€: + …ùùyõ#±õÓÓÇ"ÆŸg¬‚Õ(#ìýÕÑãúúºdP¾7«*7g>tê\¨`_ ;>>~Y'BxeÊÊÊŠõ\ÞZ¥RI• + ½šñ(,” *XËBï©-§¦¦¬4æQ½ß®‰?º*@êY¨]0<<œL&KKKm7ÓG݆9m8C»¨çb;ª1â7ì ñ´™2Hña¡îŒ¶Ô6¶ÌšÊŠ’>ýz]ãÎQ  }’OOO›4òoŸ[ñ$¼ÒÔO± ßjµj#~÷ÄF=T\ŠQeÿ ‹ž¾üfá 8_‘ßÖÙÉPeë6J„+W4ÁÁ ­ßsU•ÎçªìììÌÌÌÜ¿ÿÅ‹½?. ¤Þ^U¡&ª®ª §¸ªÀÁÀWUcM®^ w-´8€6ì~­àÚ« ïö+.N{š*µ½Ýñá:üYµZMÛÛä·âªÊmÑÉU•³³³ããã½½½ÅÅÅÉÉÉ‘‘‘(gOD×âh»lOÍsÙím—íÑiÏçóŠ½aÓ}bWÿ¬k¬ÔO¡vUZGò©‰OM†††õŸ*2>|áñD®iõ _.—k]t#áÍ ŸŸŸ·™)þwií«ÈоÁ[–M„Ó£‹z¬h ¤ð› + EI¤‡±¦Õ7|[[[M‹n›À¦ÊÄÇÙôMl:¬â@[êͯøYö¶±ýÞo‚ üFÍ \à@3ktÐܸ‚ O¨ù`Ë:í¨GuFÔ—iúªÍ¶ôæm[.‘ up´uŽšøÔtLyñã?¶^Y„O}\.—ÍfÕ¹pƒÐÆÚW‘¡Ð±‰ö—mi—`1Ú%†ƒ£¡]ŽíþMÐvÕ<®7€©¹¡†€-óekó”ËåNvÔö¶R±â@¡ Ëááa<‡?ÿ‡ðDý«à¯…øç¾Í‚—ZUЇ¿ó}ƒÍ‡………ÞdOqãpjqXGãý¹¸ì~°@ppÆUÎÎÎÎÎÎŽW/â´éI\²dp{°æh[á2¥R)áÝíק£âªW-Žíí퉉‰·oßöèý»‘ÍfÇÇÇÞr,j8 + …z½n…eO»·ottT•þ + .¶ú›-èf5Ê‘aOÛ%[¢¢s®3¯óõà& ¿Å¡²Ïž=;88PùÕ«W###¡ÿWM gÎÎÎ*2^:¤R©7oÞؽÃsssþçMábëÁY+#á54ìUµJl¦³-ÙdYl†œŸŸ¿~ýº?¿Z«wïÞéäëw¹wïÞ“'OôËFu$¸ÉBœ÷ò믿êkÔ¿P= + gµZM|\T6ãÉçóJ–Þ$±— + ª9==Mx«3ù¯ª`èQe[Ç)øþ¿ýö[”¿m#ýEôw ñ¯ H˜-ýœœ<>>>;;³šo¾ù&‹Á4M%²ÉE¶ŒŠ>öêz¨qa+¬ÙôÇk,Ü644a€Û;wïÞÕ_$žiŽfp|öÙgj««òóÏ?+>vvvTâ‹[[[cž„w•¤X,ú¯Zåúúº6+ + Áý9‘WPÏh¿GÝ‘·oß~þù犌ï¾ûN‹xž ºðG->Ôøþûïõoèï + [ÖV‚UëCåàähU*G”,ÉdÒã©©)¥FÓ‚×q£s®3¯ó¯¿©aZý¥®þöà6#88ãÎQÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎþé%-ùÑÕ\îIEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-3.png gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-3.png *** gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-3.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-3.png 2003-06-19 10:48:46.000000000 +0000 *************** *** 0 **** --- 1,60 ---- + ‰PNG +  + IHDRô,ºÙÖŸgAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ9› i IDATxœíOLÉÕö›Oö‹ØX,&ɳ°i ±¥°˜ØÀ«( yá$r0‘ÞocÉd“…±Ù$Hl&¯À‘2#}‘%6à#Ù{a)ã×›dfa= ¤Éïóõ3ÔÝ}/}oWÿ¹}ŸŸª[]]]]NŸª>uºíÍ›7žBˆrñò.€B÷H¸ !D ‘pBˆ"á.„%DÂ]!Jˆ„»B” w!„(!îBQB$Ü…¢„H¸ !D ‘pBˆ"á.„%DÂ]!Jˆ„»B” w!„(!îBQB$Ü…¢„H¸ !D q Ü+•JWW×ÞÞ^c§ŽŽÞ¹s'y1„BÚ’Cu`` ¯¯¯a½½½ÝÓÓ³³³sîܹ„%BA’jîÍ›››×¯_G2š*üììl[[âÃ鑆‘frr²»»b}nn.aI„B’ + ÷•••s>/,,T*•iŸ‰‰‰þþþpú±±1}<p"â?RF> „B4FRáþàÁ³œ|jj + j{{{;‘éGFFð¢'vûàggg'f K"„ŠµL—«x@ ¯®®Bs§Ú.„Â9I…;„µåо¹ ƒðøø¸çkèá­7oÞD|¥R¡^½zE^”†žžžäKmèE‹‹‹Je3ï~0×4a!ÊÛd,//#“ÝÝ]„ùj……Dâg§ ±ç¯³›œˆGBÂ’ˆâ€v·Û·Ð…øÎY9*Ô—ììì ³µ··Û=?qE·"_’jîо!Ðùvtkk #ëׯ#k‚ÚnÔsœbÖd ÂCå×M™˜››cƒNNN¶µµmû žÆ!¦šÖÜ××Wã˜/š ¡†#ÌNhSÍdëÌ™3™"z©ìµDÙHþ|ØØØÀP‰<åߎ¡.E‰Ê>¸î“¼¢  ? ‰ñ˜ãÏÒð ï÷‰ì$µu|¯¦æ‰Ì<©‰GžŽÂDž˜Sr®iú¤%àDòÇ'Æ4)NumÂj;ä8ǹI O îe‚Ê2m¨¸ÜAÝy;”z¨ó˜·¡ç0Ÿ + ñÇéf§A¶ÈÜ\e@³„aiqb¤ý®͈áîùF1S£xƒ†S‹°¡ºxñâ™3g<]®ö + L5 :@¸ÏÎÎB(Sõ&æÌB=³³³S›ŸE âF¸ a $åLÿ!ùüFÊ»™±Q•æ¢yß4›±pd…ŸKKK´¯µ À §§§¡³ÇÑøàÑ R” y…Ž1ûÔ<_¼B1_ðáî决]ò D#Ûäoã¹¥.¼®(DóâÀq˜ÍúúúÐÐÐàààÚÚšÃlEsÁ]öRIr \ONNòtåu®««ëæ͛ܢ!D9æ.Ü333Ã}jó\\\D¶vÌÀÀ${BÉÎIvQ2´æ.ÜÓÞÞ^¯é˱„…/d=Ôùä/ä»»»—VˆÜ‘p©Š«÷Ÿz*J‰³e™ýýýÇ?þáׯ_#ìvV.„">Î^¨\¸pÁè÷ïß¿víš“Ì…BÔ…3ÍýäÉ“wïÞ5?1+¿zõª«ÌE“²¾¾ÞÖÖ644”wA„h9\ZË@š›•Vzˆ{‡™ !„ˆKán”w©íB‘/n¬e0õfàÑ£GìñOŸ>½|ù²“Ì…+ÜnXBg¦FpÐ¥»'QR0Ì8’wß}×áJÚþþþ³gÏlë©ŽŽ9ð"3ÜXË@püÿ|þô_Gb¯üM1yÅü÷¯þnGüϯ¿CáÙÜo¿ýö­[·Z7ÉzJˆ|‘ûá}üñÇP±oß¾ ‰ì*OYO ‘/î­ú½{÷<߯:¤¼Ãœe=%DŽH¸·:TÛNIy—Ú.DöH¸·4Fm'®”÷¶C¾õ­oë©6‘!uµ×ÆƆǺ(N_¨ŠÓõB•6->¼qãFooïüü¼›õ‡|©«þÓx.Š€S¯!›¿ÿê’ñ_?VL13²#¼É+^ØZÆ‹âÔ©S—.]zùò%§OŸF82Yc„K¥˜lb¼zä»y~õêU½)Z–¢uIïuºÈ w!Z—ô^§‹Ü‘p¢EIéuº(îB´(ÿùÏ>úè£ùùy„{{{=zôÝï~7ïB gÈZ¦Uˆ´–!ëëëCCCƒƒƒkkk®®¥þ#5Ú:ŒóÖ!kk™z-pű` 7l-“*áR©õÙúBxZ–BˆRâTsæì®hF]X­ï + '­?88¨)%ÒÜ…¢„H¸ !D ÉÚZ¦®÷øâXœÔ|fÖ2j}·8©çÍÍÍs>ïíímoo÷÷÷»,¥È‰¬­e\^NÒ,Ö2" ®çJ¥ÒÓÓŽðÄÄÄÌÌ $ûÀÀ€ž¾å ŸªBˆÜ™žž†Â™åá‹/ê#·eBÂ]|éòüùóyDd + 4÷ááá~ŸW¯^MNNNMMå](á wñåÖó¼K!²¦»»{nnb}Æú;ä{Þ…εŒ- + ôô‘‘‘ÙÙYþÜØØЫÔ2!k™æ¦˜5/k™lH£ž···¡Ñ'-™(N…{lß2Þ®`ÍDZ–É^¸Wó-£Öw…êYÔ@Ë2­ÎÀÀ”5†i —oy„NÐ ÕÖeqqqiiisss||¼½½Ý;ÜÃ’w¹D 3œ;wNkîeBš»ø + ˆxõ&|Ìç] + áiî­ËuŸ;wîà¿v¯Q2d-ÓÜ$¯ù½½=Lɹ@ܧT*µ¾[ÖóÀÀ@___ò¦ÅA¾eÊ@ß2£££ù¸«žÜ· JÂý“‘‡L¸»»{dd¤îÜëOAÏŸñdp­øȇˆ¤ÐkîP@ª š6‹žžžl^øÄO?>>^íYïl@²ÏÌ̼±È»D_ñàÁƒJ¥yhzzzii VWWñ|Êfkå’Oüô5:°iSè5÷kÁP ÆÆÆööö0Î1¼wvv2,Z, èq];ï‚Ôz1Me + H__ŸqE˵#[‘GëStB²ÏÎÎâEÍš§ ÙÊÊ + žúø ½ž÷¸éƒ0¥ZLµ³êµ$aaðøáÄÿq æÃŽK0gÞEøºY‚ÊÔ{—’QhÍj2GzÿÙ³g¡ÙFÙ' ÃÃÃÔïAz$ƒFSººº˜ ¸ƒ¬8œ"cgA 0 þÛ Óq + ïù#Ø + è˜qʬ+Üfé]±^ð؆ìC QsssPÒQ<³]> Ôjœ‚4t“‚G>d+¼)T/ˆAd> 2\µT×ñÉ“'žïœ Ðí"òA ñaöXÆG^7cð°‘dÉ(´p'Q7oÞ\^^Fƒœñ/^¼ÀØÀØÃÀ3J¿<€nŠ¡âùº?¤?†¥QŒa8> ƒ Å¥ñ Œm½s{ñŠ¤wh‘‚Ì™ î²ÉÎ'NR¬\ßü±à£ÕùÕˆZ5Z-%ä „¨Ò‰‰ F"%æp¨sêò¨Æ­­-ä€Ç$D'úÆÔÔ"ѨØ@ š/|:êgË'P0¤o;Š½Ã€b›©sß J¾®Û:-ˆÓe™+ D8yƒÊÁŒ‘ iŽ`^Q)öü÷iöŒDxaa£†³à3gÎ01ò¡@ÇdC£:C%+p€ààEë­#vŒ=±¥ƒL/‰âqÒÍôö NŽ]· ¿C‹óuŽHAãWoö8?›ö¡,f<¨4ïÐ#Qí\îð|uØÌ“P«ßF/æÒG †M8 @@{~Kœ®àg k¯lT{ëËçwàº1*æKÖ3ê + 7bïb+øÃ^Ĥ ¬e0` õ !!é ¹S‡ÂK½ÈÅJ¤DE†,@&œ¼S ´cŒögŸ…x + Ùp涠11‘·ñAõ?`š§ U*ÆÊ$µLx€[™’{reÅ»xñ"Ú‹‹˜ÍP®aºÇ–Â)§Xht<ø)ú‘ òD;†çÎBƒVÁChD»‰ùT¶¯këéqxõêUµÒÆÏ$É—˜::!›—ƦP/ÕEÃú…*ÁŒ#™¯ÎŽ=Å&œ‚§Æ'bººº (1„0~Ξ=‹~ŒñlǘÓí³Ä.d.WNmQöÄù¼ñ|ñ„XþÀ¡@©"Ëpìý&ÒÄŒmðÞÝÝMõºuúäɈc”6ŽàcÃq•œ¯4Ñ@}B[§HE>hY;†/ogq…‡¬€pG$§†pÙp‰@$rµÇL=Ã¥­»ŽêW7+þâ‰Ð£ #¤§§‡?ãìǨƒF†.ËÁÃy=ßÒ=˜æ + v 9ÄGà,ÄC‚Cì"Ï@¿G‚˜:à³Á^–Òtlâ\¢ap_(g (áêê*$ 9 ؇8‡>ühø!È9§áú ÙØØÀíàÜ Â\»ƒ,ãʺ…«=˜ÀYS7Ä@ŽCúÛ—C{Õ^1Cöç§ÍY( *è¸(_À„K›¨ââÁ—¨¶æîI¸—ˆ¦qùË·jqRê¤öR©qŒeäBµ˜ðYf]²1ƒ¿ lO[\~‚CPÞކƊS?È-‹#À•s(ìŽ lçõ)Y=c¤ Ëñ±„"qŒ`>ÁW2I&Xs7|lO®xÒÛ—‰ ìSç¤=Í8÷¨º;6s0xÌG' aoh¶¸éói ` €ª€¼£ô¡Ô+àö%HŸ°Ï/ÚÈéšòÀeä>}GSS;)ŠùHCß <×#W6èOvÀxÎ a?h\gçd.ŽÂátBc + ‰Ö‡’9‹$Ü›šfîaÏ_Œ§Ö‰Ÿôëé5̈Nh‚Æç;ákÀe£Áö®åùÚ_ 囨é-ÓP×3”„½¡¡ä¸—ž;SÂõ`rÕÌò%ìóË|žÅ;ônh\ÁÔöÀ /s¿œ$ñeL䥹ŽÏe=¹l¼„ È„èü AWõaa²7—Ä‹“¯Xì¢.šI¸|lAÿ²_–zþzz¤×0#‹9þ1Œ#0ÊzÄà©´B‰ÆhD†Æº ¦™®‹áÍ€œž›CaohîŒá-Ô[?[†‚ÉúIè?Ç9FÆ…}~ÙW4±a{à‚Üç + À¹¨vHgzìB‹Pj#Œ>€|xE3ÛC2ô"[­m6c + ŒÖ|ñâ²…àF¶lúj~Ðø:]…Ÿ}N+ó´ÃO¨Dý¾‹ì,‹!œÓd;TÃ>¶j§Œ\dˆtFíϹÆT;Û°74ÆIJÉw¨¦áZD;T³ÁU=Ó„Ì;Ü ¦™r ß2ÍMòšOõˆ|ËdCÂzFC›éo ÞMùD®4™æ.$×ÜÓp-"Í=ÖsñýOˆ$4Óš»p‹\‹´8o-åó.ˆH ÷ÖE®E„ç¿‚¢õÁÔÔÔ“'OÆÆÆ + å‚B4Œ„{ë"×"Âó77cÍööv~X¸PFS¢1$Ü[-¿ïpÐfff Â‡ óE3"k™æ¦˜5/k™lpõ%¦©©)ÚÂŽŒŒôôôlmmÉȽÈZ¦¹Ñ—˜Z'õÌ ÒfC}ê¹/«È-Ëïõë×ÏŸ??}úôùóçó.‹Èš™™™‹/ÒñwÌæ]"á†&ðç.ÒæáÇ—/_¾qãFÞ9@¥ôUwæÌ™€?5ѼHs¢¥ xÁÓÕr Í]ˆ–’Ÿ71ä]"᧚û•¿"~CÄ$ü}†_çÈŒ$_çñIXϲj/+Íô%&Q$_bJ‡_b5h¸ž¹Eyooo||Ü|HÖÓ e!Z¨íÚ²TJôBUˆEz¹‘æ.„%$Í;èDk¢Ö"²ö-#ò¢Æ–ôõõõ¡¡¡ÁÁÁµµ5W×RÈ‘ºÜ8o}QÒµ– ¿ÇWL61Å´–QL61BxZs¢eÙßßüøñóçÏ=ß¿•J%ïB gÈZFˆåĉW®\¡@§¡û÷ïÓ=¤(ÒÜ…hQNžðá‡jµ½|ÈZ¦ÕÁ¨¾}û6•w·«®’ïÍÂàà`ÞEî‘æÞêå]ÆB” wñ¥É„Œ%„(²–ij[P¬¯¯ H¸ Qœiîm¢ØÔn¾ÁÁÁrKöË—/ÿîw¿³c?~ŒHüG‡L‘ äÿÅ_|ðÁï½÷Þôôô?ÿùO'e" n„»¬#D VWW!1?ÿüóËðá‡~ÿû߯vÔ÷†dÿóŸÿ|éÒ¥üã?ùÉO’dU/¨XT/*9Ë‹ŠâãÒZFò]€Ä¹wïåæ“'O:::ÜæajÿøÁ~ðóŸÿü‡?ü!Ôç?þñøÿË_þèÔÿ×"‚Øó? ͳpÈóå»É pÊ7¿ùÍßüæ7.\ˆSdûãÿù£HÈ·(›çÏÜkU^¾|‰œGFFpÅ[·n §qÑtÈR¤Â_ÿú×Û·oÛâlhhÈùUúä5ç/¾ø2ýk_ûþúé§ÑF@#fzzhñ¿ýíoù‹_ür™‘ùË_ ±Ž”øÄ)É£Gà-ãߧilÁ'>FÄß½{÷{ßû^ª×ÅGÂ]¤DLooï³gÏö÷÷óÎ;綠¬ÿío4:Âè4hÊn¨öýв¡Ô3¥ç‹c<˜ ðÿ£>ÂsÂœ‹œè'xà‘`ÇPåÇ£ÂdeÖåpppðôéS†O:…jOéB¢¹p?æõ^èÃÁmmmSSSwîÜY\\ÄÏëׯonn"%’é³ñÕxë­·æççoݺuïÞ½ßÿþ÷ñëëëˆLõ¢jP·/ù@²C¾ÿèG? + $ƒd7ÿãyš¶Çcà½÷Þû׿þ…®ø£Ý»åóÏ?ÿú׿±þ³Ÿý žv%‹fAÂý3335Ž.--y¾pϨ4Í-âOœH½³}Óâú8Uo["SI§r£ö¹Ëµ­\øÀ¨v“\*? + €‡ + .TïãaP±ï¿ÿ¾ÄºÖ&¦"HTctt´§§ññqhå³³³{{{ LúàÐöövWW"ù@sßô¡vïù²þ¬5úBQ( + ŠxçoS#Á\ + ýüùó¯„,ŽBîðÁ¨[”Cj‡W]âÃõÏ_–yχKCÙ€ŠEõJ²‹î7ÙkkkÙ éÚÜØBC¬ãÆ!â+• + 4ñááaˆìÄ{þ² ${{{;yHp¤Ç\ÉðTÀÑ……< ’ñþÈdww7pQ{%4{^¾|ɘ² cåó.ˆiòÆŸ|òI1ßä\»vÍ.'„¸w¸°Þï éCüÉCËËˈ¡ÔFs&À„qÈ‹ªÆÏ>û,Ï{> + Ú­ã°­…Çå2h.q|}âœÏôô´çKmèàPÒGFFg!Òüo€'Näø¨“…-ŽKáž‹Dc@_YYéöÁÏÍÍÍ……s”‘sssH6;;kŸ¸···½½ç)YGÄAB´8î_¨RÄïìì¼ÿþûH4Æðð0Ä4„8shñÛFˆ„¬‡ôokk£… éëëƒd7¯X‹ -(Ð + zÕ&Dk"oŽU©øÈ’]ÑŒH¸ !D ÑÇ:„¢„H¸ !D ‘pBˆ"á.„%DÂ]!Jˆ„»B” w!„(!îBQB$Ü…¢„H¸ !D q Ü+•JWW×ÞÞ^c§ŽŽÞ¹s'y1D.¨õ…(&|Ë ôõõ5P¶¶¶áÄÄD{{;þG¦Ÿ™™AšÝÝÝååep + "!0È–DdZ_ˆÂ’Tsðà™Pcˆb´CqÃðæ—EÃðkvPëp¢ùRgggÌωB¡Ö¢°¤b-Sãõd†ôêêêÊÊÊØØXWù¢Ö¢$îüFÃ獵§1%Gx||Üóu´ð«¶›7o"¾R©˜oR¿zõŠJœh.ÔúB—„Ë:\<ÝÝÝE˜/ÇàǦqˆÓóÀ)HìùŸ¨618±Ú*­(2j}! + KRá0¤1ž«…‚ˆÁð¶OÙÙÙñß­‰¦C­/D1q Ü766ªY;@} Œ[jsíííT÷ÞøÆ y1D.¨õ…(&n>½½½ u ƒöØ”ˆ“xssÓþ)šµ¾ÄpBQ(ä8L!Jˆ„»B”ÇÂ}}}½­­mhhÈm¶¢)Pë Q¤¹ !D ‘pBˆ"á.„%Ä™pßßßüøñóçÏ~ýú5•JÅUæ¢à¨õ…(ÎìÜ.\¸`éû÷ï_»vÍIæ¢à¨õ…(Î4÷“'OÞ½{×üþøãçÏŸß¾}ã<ﲈ¬Që— ÷VCúÞ½{žÿ% Œó¼‹#2E­_b$Ü[*n K}k5Ôú%F½¥1Š‘úÖR¨õˬeZ…ÈWjûûûÏž={øðá7z{{ççç;::Ì^¤ø9«õ Nz­/ + ‹;w~Gïýé¿Ž¤¸ò7ŤÇ^‹âÔ©S—.]zùò%§OŸF82YÂWœùÓ‘“W<Åd“}ë‹¢e!„(!îBQB$Ü…¢„H¸ !D ‘µL«PcúúúúÐÐÐàààÚÚZc9«õ Nz­/ + KÖÖ2ÿÕ‘7òßùõcÅÔÇ:"¦½„CâXËÿ‘Â× [ˈr£e!„(!.5w!â 5Wh&$j Í]!Jˆ„»B”YË´ + E°–©QÑNj^Ö2e%k­ÖELëˆbZˈ4µŒˆDË2BQBŠb-£©zRšåÐ#àùóçÓÈ\µ~Y)Šp9ÒÛÛûèÑ£¼K!òA­_V´,#„%$kYPħ˜õ,k™¼PÍ‹äo-ã°-‚¬e„¬eD$Z–iu¶··F?ó-ȵ~‰Ñ ÕÖeqqqiiisss||¼½½1{{{f¨‹r£Ö/=îâ+0ȧ¦¦ò.…ȇ„­XJ­ìâÙCþûIDATÕ…„{ërÝçÎ;øîܹ¼‹#2¥Ü­ÉÀÀÀÆÆFÌS¸$…SR,V¶ÈZ¦™H£ž1Ç ÿM |J¥R[»%yÍ'o}C¡4w wOÖ2͈[k™ÑÑQŒ;¦±á†µ J2==)¿xˆáööv¨Ÿ333u_ Nê›> ‹Ë˜$±–qÕúù‚‡Óää$žRž?#1=aii 7ˆb¿½½d¸_Óap"k Š0ß=ØÉnÞ¼‰ + ™EÌîîîÊÊÊøøøÈÈÈòòrOOf<äwßÇP8kTeµMö²åOœ•Ï Ç£p½ÙÇ3:{FÞ‰ t*,íËÉ2­ôøP·ŸŽý>ŒÁã“#ÉÃb8\=_?`Œ1 Ç„ÏB1Îú@Œ_x#Ùù¤Ç(}]]]TÿÑ¡yÞ‡¯›EnýøðPÛ/^¼€¤† a<¤3n"˜õ‰C håx‡KRH Ù=11ÑÝÝíù= ‰'2ruuõœGƒÿÔöâ¯ùäBá„{9Æ3oÁ\3¸€‘Yœ2¤ E ®¡3`‘Á¥ëµŠ¶Æ#ãaÆÛëæ­ ž¯xö£ñøÇ(Å6:ÎÅ!ÆÌÍÍ…cÂgáZf&¶Dú;G1‡ (eÌ“C>‘o/Ã×uWyÑ4Që êõ±€Î€áS­öpwc5Ïj7Ê8ê=ÊóÇ)"ù$èëëc¶Ý>\¦ÏäæÇå Õˆ÷6WþˆˆÿÕŒgTk`<ó(Ç3›c͆CÂшöCs2 ŸÃv zFà,ŽI~äÀw2Œçj½'0žwvvðÔàØó±“[Ì«ÕLøÍd¸æãì8w»v¾¢C«dÔºD'* ]¼Ŋ\#¯3ôù bÑ‘Ð"È5Œ¼åcÇØçò,;ÏpÎcccñ^’XûºqˆÓÂ4ÑÊá±`bìsîŽ6ª6v .f}8<1Ü’'â,#aÐÙð¨àbRRiÀ …‡4HÉçG]m” ŵ–iöñÌ¥Uô Ã>.Uµ2DâÖZ&<ç#KñIÕ·LWW†ú$†bœ”\ÁXʼn´y@ÍCwC€ã<!pš¹ñº#7å›UØ1áþ©åAqAææÜpiãWNkW­Ÿ/(íîî.+aŽ&Ófz QŽÖäº9WÒÍä*<")lj°ÉpÁ'“;KDq715õxöü!íù(ÚiÙ£%NꮯFátÁ¼M2ï‹0Z2+ñ ¡7Q™Baø»p …éééñµ9t'( + ŒaäˆaCØg¡QlÒ',òjë¿ róæMÌÕЫM†áÒƪ—Ä8lýÜ·ÆY' §‰\˜*ÇjUq…{“Žg2Áƒ˜S9[^Ç)CœK8—CU£žÿÔY]]ÅS‡F¹÷o£seÊ;Ÿ·‡ŒÅ}ñÍjÞèe¸5Æõ-> Íqìùº®òø0lËwDBa„òn×pøºPäÖ q¹C5ɲ#‹a<ÕÕÏÂ#$0zkÄÎòêÏ6Ÿj…S†¬çÆ–eªÕ3â1=¢ ZYYF‰4ˆŒ¿U§Zë‡Ë©ªn‰ßÒk}QXŠ«¹{NŽÂâØUL½V÷2¸b †1C¢™æFø Î^m%F­_bä[¦™HÉ· †77õAƒÃ$¯Íz‚ÃR©­ÝâÄ·LÂÖ…¥ÐË2"@Ë2®J¥e™ìI¾,#JL¡—eDªpi5l W@€¢NMMEºå±Ýøœ;wŽïÌ#3Y\\„–Úßßó•¸q[V©T¸O=þŽDœË­Ô1ÓgóÖÞaŠ<%,F" ÀOAðe©YÇC€o©†‚ô¦ìÍ´C5ìi«vÊÈÎé,0ÞR"|•zwL¤±CO—€“áz»„v¨æEòªÉ[ßû&¦ðøj`\ÇtV_ŒäøµUù–i&Ò¨g:%¶WëµÖo™¼H^óÉ[_–fÒÜEš;†7?.œ°TÒܳ'¹æž¼õEaiŽ5w‘ÆÎþx·WìMóÂjýÒ#á޺إ¶%¾4ëV@­_z$Ü[—˜nÔD)Që— ÷ÖEðVF­_zd-ÓL³že-“…ªù€­D4晪eiß2ÂÆ­oWdà[FD’Ä·L9ˆtÎ^Û¯:_9Ö¦Œëö>Ü#¯ÕÀ‡2@Ë2Â{ýúõóçÏOŸ>}þüù¼Ë"²¦¬­QÛðÒSíÄiàs.оeDª<|øðòåË7nÜÈ» "JÓúKKKg}èÒƒ‡<Ó)»ãOO1²ãÎ Œ“ügžô7`ÌŠת÷ÃÙ á.„(PŸ———é ÊŽ‡\¦c÷ááaãúÍó]ŒÍÌÌÐ?{8C$À¹###t + _ãZáϹ¢÷6ƒ¼[IˆâB¿Ùà5ÜøUŸ˜˜°…/#žNØ#ÝŠÑå/D6Rœ‡®þðCÈÿKL²¨·_brE_b‘$ù“(1Y[Ë„ßì+&yŒ¬eZYËÔ:ûââb___¥RÙÞÞŽÿ–•¾&''ÇÆÆN"¡#ßâ(ïEY–Bˆ4àRøèè(?†ÿD~N}eeçÖ>1ü9—" SH!DscBÇ|bÅ677‡‡‡766 ¹÷ôôPs·-Ü͹Òó «üÒŽçÁáðµøœKH¸ !PØ ‰ÈüÃW£5€È~ðàY1ðj$ÜEÖÈìGdÉÈÈ´õ8ßW + c>Ö˜Á—Úœ“¿o‘ mÕ½‹¬¯¯ ®­­5–³Z¿à¤×ú¢°¤k-£˜âÄx)ÇZF1ÙÄÈZFx²–BˆR"á.„%D/T….ìXLƒÐŽwQiîBˆæfss³ÍwÙh‘Éè¨=|®ñÛŽ£&lgeÇW»tä…"¯hð D.úT;¥.d-Ó*DÚKìïï?{öìáÇ7nÜèíퟟïèè¨×äK­_|Òký¯ÈOs7Ðèîî®á òóvd›õû£W3…¬ýŠO5ûËȆDF6†¬eZ%Æ‹âĉW®\Aÿóýzß¿¿±á]´ûUŒãEá°õ $»µ“““³³³¸Èú••#ÓMüòòòÞÞ÷(ÕVP'…>tjn†¢¿#‚—––FGG=ßÕÁõë×͉HC) !ž(Âxöð\ú”g<ʃ‚qÀ»HXZ–iiNže±‘¤ˆ¤{íð‚I|÷îabú”ç&Xú´Itÿ>î­ƳQÖ0Ô1às-ŽÈ”²¶>}„MLL@Ûª´ç+׈ÄQjОµs‰7|Ââ5¾{÷01}Ê£-Ú}œø9pouŒúV&ÅMÄD­²¾ß§¹ÜÈD"á.¾Tßʤ¸‰ø”²õ¹ú1;; •9ŽñIœoŸBïöü%{$ŽãÞ=p.ŠÂ HǺ† + ïÆuð¸ÊG¤Gíæ^[[û÷¿ÿÝpÎJdDz­ÿÿo(õ¿*pÅœË) ’«1xnQ(#†k)<…ê9ËËË4­a-!M O;~ff†Ë&f¥ÞNfòvvv¸òÃ9/mÊ`_‚§˜ø$83…Lž‰È'Í@­ß,¤Ñú_Q¤ML´yçZöèè(áÝÝÝ„¯T*о¹^O“›­­­˜«78ú8Êc|Êã¡’°<Ç“üù`H½¬"1›[­ßt¤×úEš²mÓ¹°°à$[ÛbÊ{üÍüÀó}Êã©à¤<µÑö!D9áJºÛïš6ìÞݬ¤×ëS¾a$Ü…¢„ÈZF!Jˆ„û"]ù·AƧOmÿD¢IQë‹2!—¿G¨½ëwiiÉó_¤dT‘-j}Q&ÒÒÜWWW/_¾üù矧”FGG{zz<ßáT°ÙÙÙ½½=ÌWÒ···»ººiœE@}£}•Qî0ÚÏú¸rÑéÔ<ê­ËÕÕúù’oë‹‚à^sG—ºwïÞãÇ~òäIGG‡óKÔKÀ‘éðð0¶çáööö/^ð-öÈȈôÜF}ÍóU6…~GôD‰Vèž>}šö­UãåË—hÜÑ¥K—nݺ…[Îæºj}Òš­/Š…C³ÊO>ù)ïŠàÚµkv9wvv¼C?pÜ$655…ñÿæpÏaè"†{¸yÌì(‹Ü–à³Ï>Ëóž‚vAë8lkµ¾Z_—š;úPooï³gÏö÷÷óÎ;ïÁaEÀ"•6ªôÁ‰‰6Ô4îQ¶¡mlò'NœÈQØÙšã©S§Ð.iF­oÓj­/ŠˆóÇt–÷ß] + ™#ì<'`M¿šTͦ¦F팑ðo|ož¥»á”­­­8º[¾PsD+ -²lµ~È«õE¡pÿBõ­·ÞšŸŸÇä ú‹óü@ÏËܺ=a{Û"VVVÚÚÚ̪+èëëÛÞÞ®æ¿P æQÿh´Z$³ëªõ‹@^­/ + …v¨V¥ö÷E¹Që‹fGÂ]!Jˆv¨ + !D ‘pBˆ"á.„%DÂ]!Jˆ„»B” w!„(!îBQB$Ü…¢„H¸ !D ‘pBˆ"á.„%DÂ]!Jˆ„»B” w!„(!îBQB$Ü…¢„H¸ !D ‘pBˆ"á.„%DÂ]!Jˆ„»B” w!„(!îBQBþƒL¿¢k\`óIEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-4.png gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-4.png *** gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-4.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-4.png 2003-06-19 10:48:46.000000000 +0000 *************** *** 0 **** --- 1,15 ---- + ‰PNG +  + IHDRhÈJììØgAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ8 ¿•?IDATxœíÝ?L×ÞÆñÝ+»pã`Q$¡pšH +#]ŠHØy;XÉ…ˆôV±”·p»¸%‹ä&z¥®R\ ("½¦:_ ¸ ¡`ÝÅ…vCAáûd~äÜÙx{vgÿ|?Åjö03;;ì<{ÎÌœ³ÙOŸ>eÀÇßÒÞí‡àààààààààààààààààààààààààààààààààààààààààààààààà-@p‹ÅþþþÓÓÓ«-žÏççææêß M“­ÿ' ïß¿?<<|åƒ?—Ë÷õõÕ¹%š£Þ‡û­­­‰‰ Mëø·ªG¡PÈf³*¯œ_ó(hlZóÌÌÌ (2ëÜMSop¬­­õE4½´´¤fË|dzzúÞ½{•ó+P.ZОêQsVM­©ÞàØÞÞvM ÕfggUÝèééÑDÕùÇÆÆô¨˜Ð‚=½}û¶j.un €¦iÈU•KN”*eëëëªqXu@Û©78.&Tk°FŠ¦'''3QÍ¢ò¤éÔÔ”ÊÕ¨±Ú‡|øðÁªÚçú¬®®j%'''š¶ÓœšXZZR¡þd –²E4s&:¯áJ´ â¦Î-Ð4õ‡(,”µþªjEY‰‚#¾Èññ±rdoo¯þ-ÐîãP»cffFG~åŸìšK¼¢–‹š3===Ê =fþjÔX%@[™è솂àrň¢Äͬ܉?Ðú€®B'7ÞÞÇÆÆF6› »Z-…ooooooooÁ‚ãììlww÷èèHÓ?~Ôt±X µr-%X'·óóó¯¿þ:/_¾|üøq•h)Ájׯ_öì™{Ú××÷èÑ£P+ÐRBžãPR¸Ï"Š’€+Ð:B‡«tPÝ:Ûµ kÉf³6±³³£ÔP|¼yófpp0ÈÊ + ƒ6!”0'G|([œ×ÿhssóû￧±‰ZBÇÿþãßñÂÿûçß)I«$ó¯ÿ‰—dþ¿Õ + “ü»ÏÏÏ¿ù曧OŸrQ µpÊýöÛoGGG?ÿü³$ímA‹"8PBañüùóL4½$íÍA‹"8Pª6M¥µø/WÝ0T:P WUºE’“£ggg‡‡‡¯_¿~òäÉÐÐЋ/z{{ÝM}€æ>Syná_%3Ì<ÌPÒˆ’ÿãn¼äïÿÜ­¼ª’IàÆwïÞ}ÿþ½¦oÞ¼©é$K¡ ÑTààààààà«*Ý"ù-ç###Ÿ×Wk¼¤;ƒCÑ933£ ÍDu±……+_YYÑ.Ò„JT¾¿¿¯Ù´ÇÔ¬³Ù´ íCUL4mg‹â³MMMi— + •œœœ¬­­MNNŽ­®®ær9Õõ4‘ÞûNŠ«*(¡·>ýŸbÒÞ¢t,Gt kohB‡·•‹EêðÖa¯§óóó + •(”V2::êN-+J"j³ÌÎÎj­PI‘‰åàà@i¢ÕÚS-•ÎöDp „¾'íK²ËÙNÐAþöí[¥€jV®#_»H‡·µæô§¥¥%ðÛÛÛ™¨ž¢PÐÌÊ5ú2Q(lA+\__ï‹(¦õW•èÑ*zÉO ¤‹“£¸`gòôÑWÍYrWÞ‘çö>K¿²Cq ãYU ðUëÚi + …ññqýÕ5ñ¾øâ ›pWµÝ´MX‰2ÂÖ¯=¬ÇÅÅE%H»œ–¦ÆúX·Ë—^C©q¡F‡ª {{{V#¨:›xU.æææT1±ͬص[`\%B{U¹‰j*´ ¶ÕDì´HSÞ\\UéA®ªtgÍ¢E†j·nÝÊDaªöHÕÙT1)Dì˜W^hN[PK¹êÂbȺ iNkø(qT¹Ó<šÓ²IQÒŒ÷BÈNnÉW¥kO¹g{>ÉU•„{¾òs» ÌšëM–ú `VeÐ{¿ä¼æ±®ÄªeKY¡eDÝ[>Îq „ûÐg¢zµ;owrrÒüI½Æš¤íP9OÕæ^‡µ9Çú|«^½Ñ„žjBiRvsºÁVñ¶i»^Ø.çùÑL4UPBÕéÉÉI»+ayyYO …BÇ´Ì + #€µ·à{Þîã°%ÇÆÆÔZ±¥íNGÀpU¥½¿ª$AS”,›››•—cSÌš²¯¢F¨¼ù(¸»k\˜íëëKwäžÖ4777??ÿÙ­:`Çòò²š~6­àÐ_• ÊhíçäÝŽn@3qUôéTpØ@>™è,©>èÝÙ§>”b±¨ÔPFè˜ßÛÛÓSëSÛ”Ð7d¿¾ß¬ÛU7Vl7‰koX‰Þ¬Â[·nY(XõTñ¥Ù4C¡P°ÎòƪSSSöTëÔšµ¬­ÇÎIg#Ö¿êÄgÓ„5‚4½¶¶¦×² ³m¢qè«Ò Ž¦È˜žž¶þú”ëCìn$í* + Pù ª…¹¶†}Cš·òíím7m#Y·zÈg>¢’ÑÑQ×=_kÐÊ×××õ*ZV1­W´—Ó>Ö‚• 5+#l¤+\ZZÒ ÖYÎúÝZš4ú*#€u‚€#€é‹Ëõ·_|Áî±²²¢¸ÔÁŸ‰rAÇp&}CÇm|ô ›Yå:hm§YEÀz Ú}·ª¸éOk%…ö + í^Í`5ê…Ô6´lÍš¨ÜÍ`ƒ}X¡–UpX÷üLT©±>ôX«W^(4UPB>}­½Øï$tauø.jn| µG¬eQ66G¼3›MÛlňÝÂrr¢Þ$VÆ;>|ˆ¯¹r(nZ–\ªž()”šPˆXÿýF×8”Ð7• ce¬»JÚ•÷í­½á†5ª}£’v *ÚuŠ »Îb—šZ÷ïë°×ŸÜȦµ6@¯nƒ}X¡¥ƒ]ı¥-uywÞ ”Ðgîøøx3¢/I×&ï66’@.—³‘5¬ÐFßÈf³vN¡V#NËjÕ×ì'ìt¦Ö£CºÖ@Äj¹ØiN«/¨êQuìbù­ˆ{ªÄÑœÚ=~÷ÝwšhB7\îmoÁïÕ×£ªÙñC¢›o«k£²ä³Üâ]~<»ÑÀ.߀Ì_£„¤ÛIŸ¾*í-øž×W™>¦ñ–6·r 5Žö¼Æ¡àPuº“†œA#pË9.¸K°óóóñrB•\ˆßûï‹ê!*¸À(çHŽàÀš$HŽ«*í­³÷|ÙIßF¨ÒÍ ÐW¥ì«SupËÇÅ°“De->7ôÆ%cpT}­b±h?CÛšƒEÓTA¹?ݼyóÎ;ioKkÑa|årÁ+ + )½\k·œ£ÜëׯŸ>nøû¼*‚­«eoëÔÑ>±éä¿b¥8ØÞÞv”‰‰‰Ö¼hòYé‡Ýþ ´©±±1Õ2’ŒëUIÕ IÔw$±–Òì¾*HKò¾*###þ|w÷ÏQ0z{{ƒ¿„¯²3GGG™(zzzÞ¾}k÷펹ãMábc±Y-#U4쯪•ØØ*6F“eM¼r~~þæ͛漵Jïß¿×Î×{¹{÷îÓ§OõfÓÚt²€ý^~ÿýw}XÓ~CU<~ü8¾ö#àÖÅø^dvvVÉò)êq$ö'…‚J¬¤fpÕ„Í GMÛÀMñõÿñÇi¾ÛRúèÿð¿ Hȇ>£CCC‡‡‡gggVòí·ß¶Â`0e}‡¬7‘›¢Ã^MU.lH•8ëÅt…¾L×®]K1@ãõ7nè?ÒšiŽ¶28¾üòË/^¨z¬¦Ê¯¿þªøØØØPaÀ—Åb±A\3ÑU’¥¥%÷W+\\\Ôl…B!¾`’‘”Ô2ÚÙÙiÀV'òîÝ»¯¾úJ‘ñã?êÑšûí.üÉQ‹5~úé'}÷_6¬uŽVíCÓñŽÉ*TŽ(Y²Ù¬;Ç‘‰FRRjÔuºEhŸkÏkÿë¿@j AèV_S1ÒyÃÌõ#8xãÎQÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞþb½d Ÿ5IEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-5.png gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-5.png *** gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-5.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-5.png 2003-06-19 10:48:46.000000000 +0000 *************** *** 0 **** --- 1,30 ---- + ‰PNG +  + IHDRôdÿ¥U*gAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ 88ËOCIDATxœì tTUšÇ+©ÊVY*•}_a [*‹ à6Žphu춛ÖîqvÛ™QÀ±gŽsÎqìc{ô°8=¶ (ŒŠAeG$d!ûR©,•J*Éü«¾äæñªêÕ«-çýœœ—[w¯Ôÿ~wû*`ppPÅáp8e8Öàp8ŽïáâÎáp8 + „‹;‡Ãá(.@¸¸s8ŽáâÎáp8 + „‹;‡Ãá(.@¸¸s8ŽáâÎáp8 + „‹;‡Ãá(.@¸¸s8ŽáâÎáp8 + „‹;‡Ãá(.@¸¸s8ŽáâÎáp8 + „‹;‡Ãá(.@¸¸s8ŽáâÎáp8 + „‹;‡Ãá(.@¸¸s8ŽáâÎáp8 + „‹;‡Ãá(.@¸¸s8ŽáâÎáp8 + $`ppp¬ëÀ¹Ö):Þpüt ÂBÕO/Ÿ8ÖÕQ8¼·9>A3Ö ZÛÍˌͭæÎ.K—É¢Ö†©#´šˆð ôdmJb˜Fíx3004ö¨ä”Å’¨Õ⻕!¢ ¸WºK Æ^tEcKOg·¥Ûd  + G?h5ºÈà´$mrB˜Ãj7µšK*;ð€È>©GÞÛŸ äÿžþþÁ¯O4}ñU]}SD4& #%|J®îÁ;ÓD/mú Œl(ðÛe¹y1. ýýOvu[ððO¿ÉËÍŠ½úâkg[ÌxHŠý·ßÏÎêె¿~\…ÈîÚÕÓ\-ºâèɦý_Õ×6š$¢¡+PÖ¤œ¨¥÷dxS‡Ãs+îeUïl/ƒµî2¦Å2X^Ýiìè³w!ÿ»«râ¸(mèõ×chÝ;ÛJ›äuEeMæ7\Ü9œëëOªäðÝ™–M–AªèÏàÀÉ9ºô-~Rµ°¬›ÛÌÐýêÚ®JÚM=ýròlïèÛ¶§jåÏrüYqß#Õ Ú.“ý€Þp«+8εŽ¸Üøö¶R¶Oœ’öÔ/r“âÃFbĪ²Ó#èq``°¬ºó\±¡¶¡ÛeÎGO4Ïž——«ó}¥ýƒ¨+RÑMHŒ Æa]Ñß?XZÕaë + ©¥ŽÇ`6yðX¬LŸ*ïzœr®#”öïÕÑÙ÷öû#r6§ î±ÅY!Ájgñr³"íÇñîGåë×L—ÈðÚAÔsg¢+²ƒƒœ~U«&Ž‹ÂÏ(Õï§Ç•ÛÂQñCjžb0NŸ>‡ ø*ÏC‡áw~~~tt´¯òs”vÎýÓ¢ZXFôœ™þÄÃ9¾âCïGŸ]öa†þCÔ¿|(GBÙ9X·nÉ¢*++¿åç¿dÉÄßµk²õzýBxÀK*›4 „ÅÁŸ,œÕ… Á8‘MâaË–-ö ý„°C¨¢¨Ã:öÕ–ƒ¢,wSåÈwMìÏïLõUÎ7N9󣡷Ïz23ëgÄŽÏ”kì ¢®X$¹Wì+ºM–ÚFS›¡·µÝŒǸ˜„˜Ð´d­œ´]&ËåÚ®æ6s»±/2"H¯ ŽÁOtp˜äÚ…[©zÌý½½ÖwŸD¦ÀþþÁâ + ccs¹·?=%£`x˜¬…[í궠 T€…;ûØFˆŒÐ¸ü×7™*kºZ æ˜è”–$«cýÊúõëU²-h¨â#rVV–œøÐVéx(,,\¾|9 åÈaÆ Ï<ó r[³fÍÊ•+Yé‡l¸kÎcü€µ^QQZ­´!³zÞã²CÖ®]‹º-^¼x÷îÝä¯(q?q¾•}~²Ò§OÒû*çø˜ÐÅw§mß[­²?Wmù°|Ýêi͵k‹ºbÚ$?N6}(îÔ…ÖKåýâå†Ü¬È‡ïËÈJ‹p–*ùÙáºGëÍ6åñÇgg$\½Iàqª=®|~¸Ne;?¾ñÅYx8ümãž/¯´{…Ñ&dG®zt¼.2؇ݸù"tYòâkg…¾¾v–Ä0VSß½}oÕ¥Fa`~ž~Ù’ì¨áQjô!K“ôY„ ‚$­X±¢  Ò|êÔ)ØÂPáƒR|üƳ ¦d’ŸŸæÌ* ÏPv<£ Í›7Óú ÒJùMÀh…E}H^1ldff + # tTžÌy´%â… ™Hb‚Z¡™x¦‰BðŒ@DÃðƒvQ4a‡PYx¦ñiçΈÖÞÞŽÆ"]*¿Q E‰û¥Šö|çÍI¾ÍüŽyIߟm-¿Ü‰ç†æžÝûk®åó‚~í + û¾ª#ÑtHIeǾuaýšé í_í³ lØ$>!ŽnP{–JÄ{Wü¦Á>]÷ÊçûضÕ,Ä›ÆzÆwgZ¶ì(§Y£ÓÚ`˯…‘áä + ž¿00ØÔ2rO'Vâó" ’Üžºë‹[qÖÅ™ýû©¾r àCF¡+„@q~õHά©1B…ŠÓ‡LÕ»µøìEë¿é%í¨•}_Áü¤‡Ew¦ýí‚!‘Š‰Á¨Y0Åé}`ÏR1̽ýÛ÷Z¯þÞ{깉le£«Ûòú–bšœAå­¿w¡xÛƳÆΟ¨²(LÜï[˜¢uµ¸z¾õ^ þÓÆ¥G,[’ÍôQí_;K—0›+qw‰ûSB§˜î C$rfë3*›s%&ÂÐâÂÂBË2«ÊLfz@Uažc„`Æ(dÍ…AÍ^ð* + ¾qãF²¯E!ˆ¬^VbYa4ˆ¯ú{«–¸vWÝÅ$Ø­ + QËÜs—{槤Æ.×uz¨Ö¥x‰¨+´¡þ=¸ vv~œCÛ/Ѧ;­í½¢W»MÖÛdôœ.oßÕãTB,–Aˆïo~>~Ñ]iÂ5ëp­fÍ“´aCݵï«zá(áqc=«'Ƙü<ý³¿ž,ܪÅ\£ =×7ñ¥„ªª*¡B%!stZÆ,­¯\¹’ÅG8“{Z›"½¨Ù…ñ UÙ–t„Ù¨ F v ‡$ꬲ 7DŸ­ð„ù -¯3¡'ÐŒ7´„bR¹T[„CÐaÔ£‹ÐcÂ:;Ä·(GÜÉ£ á?[U­¶.ΰs {\©“ôÖ2&»"FìÙ9*Ÿ=òF´´‰ýiYÕŽn–™§g©„hÔÏ­Ê»aZ¬ýK¡!ê9ùCn®n¹Dº±ž‘•¾êÑñögXb‡Öôͽí|R–@iÍaóæÍøÿ4(jx•d첑eƒ”%¼väÑ!°š1Z ” Å´ß>EfþC¸YÅôz=4”vD´O€päF+iyE€¡Ú"9)u{{;Dñ0Þ؇PZ<#µEµÑ!ø ¡G5ŸVxDâ[”³,#įj†¹?ìw²Ù-ýƒ[v”ÿáɼ1PiÇ´bB“ö›œAA0½«k­wƒŸn xøÞŒˆpÇ?úa¦Œ D.IKÒ>ÿdÞüÙCs Œ‚ç/µû)•C„'ÇE^|ÞXŽKè0¥—™0ï`˜{Ñ1M¿jkaa¡ðH d¥3ç_˜: £0{P”¸G† [?ùòŠ¹×ï_-ôÐ}l î̆În){\xÿ¸ämÔœ¾%d¦¹íä \«™;3Žý “³³ËõB» ’ÕµC«Ì³}æ>00྅©Ãÿ›Í²üx–Êž£'†ÞôazÊÈÕ!ï+Ü;±¿uÝ!´@™[Zz`GÑé "ÎÎ’ã™Î†Cyéž!»ˆ)TÞ56T6¾  ¿É»/%±ÏV¹Þ»§JÞÁØv:LÉòG4ŠOæ<Ý«¢sñT.µ¿åO „7i©tº~E!¨çŒ3Fa»UQâîµÞêZÄ€å»aÓE9§Ù¼AªY¶$Û>ÜáaÕ©¢#‡ÌðCÇ%Vf¾9Ù̾ônB–'R¥c]¬þãÍäl÷õ÷ž/–{_®³Ë20¼ÞÓæhIªC0¢ײ]¤¾¾/ÿJšÌT½½ý5uŽ¿x«®Ñt±|Èùâ]·$ ¿ ÀûÆêu#‡,Çäˆêh²sçNºó©6œéº½ + %ݸq#D–i1чªuæ„1Éß]ô·Ï„®­" + a©TvÞÁØŸH‚Èt™HesCî½ ÇÈœeRTT$tYCÎs„ë)œmÀ`‡Ž¯X±m'}GYr¦¼ÇâŽÞÁ`ëñ Z¼ñ>ljltˆp¼¬ªs}á9iÙ{fLÖß4ÃÁuG{BCÔÜ>䮶ۛÿSâp™¾´²cÏ+ôƒš|¼¿æùWOmþ°\fVÏéÛ½Ÿ®¶ÅbøäËš?½{‰…Ø;q„!¼}o•Ã+¾‡Ž5°ã(ã2"¼O%q^ùÓùOÕ\}f©Å`þïw‹éãâó®ò¦éecA²à»1´;«ž€´AaÉ8…C"Èá “<ØËÐ8òR€æu€|á:wr­E. fBù Ä”é&—*¶hÑ"R0È:yfî½(ÂÙU,üèjœåA'íè ùNo|‚NË`¨Ä˜æñ:—‡ºå#ÿìY«;ìéÓ§Û¿4sJÌÏÌúë'•d:CCßÙVQËH OM + KKÒF†Õ7™jMˆÚzß8ø»2/”´K¯É·ÍNØ´ž{ÁH\WxnÁœ„ÔDmrB4¢¾Éê›ðÐñª|X¨ú‘û2]äèœü<ýc‹³Þû¸’LNXåÛöTí;\gý‚ìdmzJ8ì܆fSCsÊ-«î hò]„cºZ0UOë˜'­ÝxöÖ¢"ƒ0E¸Ta4û4š€øØjì‰s­y¹º©tì6/Þš/¾ªÇOnV䤜(h"Ã@þî\Ë7'‡ÆãYSc2R®Û;qÍ/'yé°wþìÄ8ýU]ýÂù/tHR¼¾È¹?ób©‘üdu›ú??2âëCé¯oîÀŒÊ}}K1×­¿_%•lƒAzåC㜹vð,•Êj•kžx8çm¥WLøù¬è*ÿìÐhÌxNżl,ª´lIö+oœ§‘À ›—`:àÍWnrVÛkM Ó•yï‚ÆQ Ò + ŒÇní3¡•rÍHÞ`Tï`ô Ì;˜Ã/üƒš!íºuë„ÛöÐ×nC.ÃÒÜ‚ä‘ȽpàW¼wæHesž rÏo½Oou ½ˆi¿ym4Ÿ{î9gå–””à÷B_~ùe‘ÄO™ýïÏå“ÛîɽµÄ¸ÐœÌˆÉ9š ÈÁ·gšÏüèúßvúžœ‚ŠíÜwÙáýÆà À…sï¾-Ù'ß³cíŠÌÇlàౡ+`‘š9ùqsgÆ¥'»±« Õüó寮ÿIy3'Píy³â¼3.á™íR + &ŇÝ3?ùb™Ưè£î¿=õÖ›âí¿‰Â³T"¦MŒ~ééióJ*F¾P óÌi} ËÙ’Ž7%0}|á©)[?*¿â£)ãBÎÊiÃSb{¼wA[1¶±hä†öR*`Ÿ ùçU‰¬Ikvv6ýI¥Cq'÷^€äËÙ¨#tªã Zd*!ª´{÷îQ÷/ÔÐ2k*F-mæ‹åÆVƒ¹³Ëb2÷£btÁúhk¡r„®¯<ȹ¦¾= eLŠÏ6Z æâ2cj’Ƭ½òâM©o4ÁÚE­ôº` ·q1!.ÚÝT~Z-úš=•íK.×v×6v'Å…e¤†Ëüqo«²]s­o2Õ5õ˜z,(S%?½Ý£>Å"gX¡/ô|´Láå­"ûLhÔ~¼‘y‰If‹®}ürCUÚ=? _èAæÓ!QQQo½õ–³W;F£}bbâ /¼°jÕª°0§Ë1º9׊ã!ë7{´_ê±ú›gy~5_:g‰*<æ9/7KŸÉ‰~P«´šÐôduJb„Ãj·v˜Ëkº@b¿TƒãÞÛ¿ ç¿ž¡¡‘¯Ž·~þecSk¿‹d*UPfjäŒ\íý·§‹>Úô~%ÙPà7+r òbÝú»?žèí³ ð/¿ÎËÕkDŸ¾øjiK»ä„ð?ünŽë¬ömþÛGµ@v׬šå¶h +ŽœhÝûeSC‹ÉE2tÊš–½ü®L_Šãp8ŽlŽ²¶û­m•°Öݦ´XFªêzŒÝƒöâ.äKj¦NŠV‡_{=†Ö½µµ¢UZWÔÔ÷b~ÃÅùֹö¤J + ß–¶oú RE?†…OÏÑf¤ªñ•–¤†eÝÖi†î×5ô~_Þeê’’gW÷àÖ]µE?Í dÅý«®HT÷š,èô†G]Ááp®~d(îeUÆ7·V°}âÔ¤ˆ§~ž›œ1ž"N‘EÁáá‘ʺž3e††æ>·99Þ6N|^®Öÿ• ¢®HCW<2%)>\˜†uÅÐÐHEm·­+\-Ýp¼³ÉýG›a%`šøüSy×â,s !·?¯îžÁ7ß—³ñ,Ó‡…*¥ÊÕkìÇñö‡UëVÏv‘áÕƒ¨+ÎEWd‡†8=üªTM¯+T¿—šMl GÁ©y‹Á`8uê‹/öWžÀ÷üüü˜˜å9áÈíœû'`Q8+-òñsü+Äí†?½èÇ ‡¨+~ñ@Ž eçp¼`íÚµ$‹R¨©©Az|—žaa!Ò—””àAV¢N§[b|¤°IsPPbXüÈâY Y¼ŒÙÙÙ”!ÅÅÅöa‡PD P‡µ6ì«-YYî¦~Ëáo[Ù÷ߞ毜¯Ÿ[úƒa`Ðz23ëëçÄMÎ’jìO¢®Xêr¯Ø_ô™, -¦NÃ@G—Žñ±a‰±áé)j)Ïöš,zÛ:Í]ÆAMTˆN‹¯˜Ð—k=Õo°þñŸ‚Ä944RVmlië7 e¤FbŒŒôOáQc{û,(`1ÆžA¶4Q*·ÿÀM­¦šúÞƒ96& ¥'KêØ€²nÝ:…d *†ôH¬×륤‡¶ÂHG`ãÆ+W®DRŽÖ¯_ÿÌ3Ï ·Õ«W±ÒØðÔœÇøk½ººµ*²!±z¾ã¶CÖ¬Yƒº-[¶lçÎ^ä/+q?~¶ƒýÿèÓ#gOÓù+ç„Øðew¦oÛ]§°?WPµvÕ,•êê5„E]1kZ'›ÆîAwò\Ç…ªî¡añrC®^óà=™úô(gC%?=Ô¸ïH“Ù¦¼"þøìœÄË7 ¼~j×¾KŸjTØÎoxq‡¾iÙõÅ¥Nã€0Ù”lÍOÖjBýØØ ›ÏC—…1/¾zZøãkkæ¹Æê›ú¶í®ý¡Â(ŒÌÏÓ­(ÌŽ¥®!ÃŽnP{÷”ˆw?ªÙÿu³}<ºîå×Ïþæ‘)l«Yˆ/õŽoKÛ‹·WѬQÈ©s°å×ÀÈpr/Ð@ž àÙ€*AŒ R°1Éš†âS¨-T + …¤‡ºá;šr€°’&2Û 0’‘ê±ôÐG&sök&ÈE‹2thíM õ–y± ä õ‡¿hÑ"Š„øÒÔ1eQ È‘[¶lA­ÐtÅà;˜‹ˆ:ñè´¥K—ÒPN£‘ƒŠô ‘•¸WÔŽ+ZJb„‹”^ôØO'­{í æ×øqÏáÆëgÇe¦Fú·Юpˆ&Rµ  >=E³·½Ó|àhówg:V-yïãZ‡7é?üô"i´Rt÷âÔ9Óuȧ§Ï‚Ç+k{ʪ¯æz÷”ØìLÙ3RÔ“õšÖŽþªºž>“uºc0ÂÖ~åù‚ð0Ç6ž6ö¦ëfLÑÖ]ê;Sf ˜;oN ¯¤³Y๊®·¶UÐEåé“£Ó“ÕØN~ßI»)M­ý{¿jºë–T× $I0ukl@⡉Z­õ,´ * !†Š‘-ÏÒ 7-!‹æ)}I„­PÓ °IóªU«H7}oAà pZA…©†4E€RCyi8ÆÐØ€V#íEä€ð + NM¦‰BÐ!HŒ>TØæ´å#ò÷áá‘Ööñ{:qº0¿•¼ïÖ´’ÏëmÅYgþýgúË1€¹]!ŠóˇræÍŒ*T¼.lê¤è-e§Ï[ÿL¿/ïB­ìû + æ'–Þžþ÷‹GE*6& £fÁ §÷½{ŠaÚ¶Ûzõ÷Þ[Ó–,Lb+½}–׊Ëhr•ßw¤éî%âmï»h~’Â6¢0q¿gIªÚÝâ>êù—wËñ—6)#jEa6[ÐGµ_|õ4]JÀlr¢ÄÝ$jìG:Åt_ã"g¶>£°9ç€Pbr L-Þ¸q#Œe‰Ue&3PU˜ç!Øðƒ! + BsaP³…| + †‚oØ°ìkQ +Æ–•XV0bàÁ§Þª%®ÞUcO1 v«"”·Å<å®E©cÿcû>9ЈR|DÔêðÀÜ„ ;??Þ¡í‰(€éNG×€èÓ>“õ6…3¤í»zý”‹eâûëŸM^zGºpÍ:R­Zýø4uÄhwíù²I¸JxÝXïê‰1&?O÷쯦 ·j1WÀèBá¦Ö ¾”P[[+”B¨$dŽN+˜¥õñ¢¢"–ñLîimZˆëEÈ.Œ_¨Â¶¤#Ì–@M0Z°9$ÙPg…M¸!úl…‡À „G¡åu&ôÚ‚ñ†–G¨?’¡”“'O"%ÒÛÇPJ*—j‹x:ŒztzLXa‡øùˆ;yt!g«*•ÖÅv®a×¾K.½µL®ˆÕ…zwŽÊ/ÄÅŒÿ"Ú;ÅþBTÁ¬jGOµIÌÓ»§„¨”AÏ=‘wݬ8ûÂÔ òG5Ý(\Ýr‹ëÆz‡>=ò‰‡'ÛŸaMŒ]Ó7 c´óKY^q¤5‡Í›7ã;þÒ tŠ±ýU’EPbCoƒ”=>r9ìÈ£C`5c´@((;;Ši¿}ŠÌü‡p³Šét:h(íˆ2hŸñÈVÒò:KCµÅã¤Ô]]]q¤GbDbHÀxcCÏ"ŒÔÕF‡à;„1Ô|Záuˆ‘ϲŒ€ªæþ°ßÉf· o¯úý“y( ® žÐŠ }LÚor†„Ãô®k°Þ >vª=88èÁ»3£"Ýÿðî)!aaJ‡›¥ÄÜ™±ûÆ–ã=Òh×õ BOþ<7ÄÑ,Aè0rv³õn…MÐ!RK²|aÆR<í¸R¸ººÚÇ!¾S:–#Ta¡ëra)$¬..=¡¶H/ºÄD£K lê‚ÎÎNQzQ …i¹†=‹qC…¨Ú¬ªÂºùË »|Ä]¸ÓÒîÊ ¤ú¦¾~ÛÚ%þ3]ü˸ﶴ“ßw³Éªºž½_5ÝqSŠ‡õ Þu…1 u»zë.9=ÐB,¿+sý¦óþúD[é‹æ'-žŸãjîåÝS‰‰?Ù&AÜ¥7ÖS0Å9iÑUhK@ÈüxeÔIIï"h%ÇYzg#‡ÄR|Ä=B°²Œ¹jwÏ FÂà¿–TWÖZ7Т£BþûßæJ, ÆÔÊå“^ùó9ú±dO}ÁŒØøï[JGÔÆîÁhMÀOC÷õ[Žl?r¢µ±Åäðì¹Còrµ+ + ³ñ[ c¥Ï4„)ÑžÃ7]—p÷’ÔX­ã.õî)‰h}åLܽk,çGât8*\Iä#ÇÅ„¶F7²Z:ú¥ˆ»×LÎÒÜvcÒG¬ó÷Áá-Û«žýåt·O±8ûû/öŒŒ‰†§fº# &tE@Å}xxdëîÚÃß´ Ž]¹ SÆD‡h5¡ýæ¡Zwöì-7$¦%E|ðI]…m”UØ6$kùêx룅٠ç&øñ))¨TãÝm¿$âcc9?®Ø$Æ5òw“¥i7Œ:fjh6ådÖC@áßeœ:×IÃÉùJãáo[n¾>Ñõ#±1¡äsy·ùw÷Ž¦qvÚÚ9YQLÜëzç,addÛ‘ÖM B?™—Ùe \»—_?+¡¶šçŸœq®¼ë‹#MgÊ d[,#›Þ¯êé³8[òòî)·»Ç5 ±—MüÒXçÊ ŸÓ2 + ÛåoþìP#Ý6 + a¡Ê•Ë'±ßß]g0º9Ç–n`ìcjï:1sûáùYF¡šz°qÐî~£¿ø¿ $vJÛî:DúÖ…ˆ¼\íÓ+§¾ôO³& r(ÙSßapµðíÝS.舻h©ÍýÑBΰÜ&cŽ´zÔ’sþ%Ý ˜×e¹­‰0Û’’*ˆœY‰û¼Y±!csêæ¶~˜Ò.qúdíM×®˜ÌC-©v½‚"‹ƒ›‘ÀØ3ª2Qž¿KóúÙqìü\g×l[Os»O„~˜+á‘[Ò“ÕÏ?™·hþè£àÙ ]zÊ!“ã"/~o,Ç-t˜r¢ká%ä °° -«2 Œ²wMdˆp±õã/.™þj¡îÉd[p¥?zú\ÙãÂøÇ\žÑFÍé-É +Ýc'‘jÕ¹ñìG˜œ=½î‚<•¬k]ežší7GðÁÁA÷,I ûÛli“tàÇ»§ì9r|ô÷‚>ÌH¿:ä{c…{'ö×£®9„1sKKvÎ ’[]Šg#Lgáqt‹ᢢ"¤JÞj + ›Y]PP€ïäÝ—±Ï¤¸¸XgÃþž*UEPº0EyR&Ta”ˆÊC£‘žŽðã;™—ØKZ­V¸³ºsçNÈúz½Þ;w‘•¸ƒ»­·ºG1`ù®ßt^Êi6_P‡«VfÛÇ;<¬:sJLTä¨~àh‹‹•™¯O´±—ÞMÑ{#%P:ÖÈê?ßø^ÊvßÐÐÈÙ2©¸=½–á±õžNGKRÝ‚E¸–í–è¨åØõ}éWÒ$>500TßèøÅ[-¦óU£Îï¸)Yø2ß«ÓŽ²œ#ªWˆÝùTŒ¹Õ¥ëBô)ÔsÆ kÖ¬!GZLôKJJ–-[æÌ R’¿-ºèoŸ ][Eã0¤!a¥ ®t‡1K—.¥G(“Å‹£Âd_“›r+O7¶Ø¥\òÉ.D82áAÄ»1Ö¦õø4@×—?ˆ;š‡QÎë´è;)kp‰‹ ®ƒWÖö¬ÛxƵì;s¦ën˜ãຣ=áaÊûnuWÛíwÊ.ÓWÔtïÚw‰Â3¦h%ºD)¾ñµ¥Ý }ßû•ÓõÔ䣽õÏ¿rróU‹°zNÛìýìP£°-ËðÇ_Ôÿéí ,ÆÞ‰# ám»k^ñ=p´™G™”åûSBæå?ýä@Ãðåg–Ú æÿy»ŒÂo»ñ2oš>6¤Þõˆ¡ÝYõdô + K*±ƒDöÀ³ÒF^ + `^È®3q'×ZäÒÀa&”r@Jgnr©&äþEaf袲¥ + S&YYY¨9²Eå bëÖ­[fƒåF¾Ï„xô6’€â‡Ó2å0œzýz*ô59õÈGþéÓVwسg϶ÿhîŒØŸÝ¯ÿÛÇ5d:CCßÚZ QËLLKŽHOVk"CšZM -&DC“œüÃ}YçÊ»\¯É·ÌOÜ{¤‰{ÁH\»ñÌâ‰iIê”ÄhDS«Õ7ácÍTùˆpåC÷d¹ÉÑ9ùyºG–éßý¨†LNXå[wÕî9Ôh}AvŠ:#5vns›©¹­åVÖuS2é.­óÖ™:ZÇÀ$†üí™ö¯OŒŽÇófÆf¦^6¶y÷ÔåÕ¶vŇŸ]Ĩ?kZÌ”ìh˜ûåµÝG¾kc&yá¢CJ>6Vaô鑤ûÇÏvüùÝòçÆk5¡³g×4"/ZBÙ 09•ôa&.Êr+ÔþH<J(M"+ÖSßg(‚©?ó1 |wŒ™ÖÈcƒ½{~ûÞHC4…í¿…|ª¡…7nôhÛ¤´´ôÑG]¾|ùK/½d/ñK&%Æ…o¯2Œ8Ä” ÷ß¾ƒãáûõo¾Wá6¥JüÛS¶l¯ª¾h­OoŸe÷>ÇÞÇ`'®þÅ4ö.šŸ¯»¬+ _ø"ÿ…INðÀùC÷f¯0’Ÿ¬>ÓÐg‡Ç}c(ýÕC“ÍØ1P¹¯—!rí*ñ﫼¦›m0@=0É™kïžRX­rÕãæ¼µµâR³ _Ÿ¼Ì?;43‡S1‹*­(Ì~ùõ³4rc8nó¬R½ñò Îj{•Cë "ϽB˜÷.¨yÑ¢H=C¿Z™¢¶!¥ý®±Ñh|î¹çœ•[^^ŽïÛm`†e¨hÆ”˜ÿx.ŸÜv7»Ü[KŠÏÉŠšžã¥ÉÀ€|SÚVúƒû?SØé¿r*¶cÏE‡÷CC‚—,Hºó–¿¼gÇÚÿœÙÀþ£ÍBWÀ"4Qªùñ çÆg¤x°«Wýëog¼÷q-y3'PíçÅß{:]B˜íR + &'Dܵ(å|¥Ưh‡9Ü{kÚÍ7$Ø¿‰Â»§DÌšóÒÓ³0æ•W¿P óÌi¾OïlIǗƘ>¾ðÔŒ-V]òÓ”q!¤ O·1É{æ÷ÛX2òC{)°Ï„üs¹­’§üËÀàpK[“ma¤­Ã ‹2N–“å‘',é´wšÏW; æž^‹É<„NˆÕ†êb¬…bȺ¾ò"çú¦>ô0”19A<Ûh7˜Ë*iÉj³öÊ‹_JS‹ Ö.j¥Ó†b¸ s+О>õÁ'u¢×ì)l/uºØÐ×ÐÒ—‘™)ñâ¾4Va»æÚÔjjlí7õ[P.¦Júu_haÚíò½ÐCdð‘·[áë;¼À>²‹¥ßþ§U{Q5¨ÂRšædËúk@Ä^8ëì†Q‹¼¯ZµŠf7ÅÝd2½óÎ;ÎÊ=zô(öIII/¼ðÂÿ·w÷( DQ†«Á-dVn'قإÓ=Ød 6ilÒº7xàÀ0‰ |ßy8U_‡‰+ôýÚﳶ»X,fí7@´ Lbª.{ꨢÿã!ÐõzÝ“wÇ{2= }õµ’ÌPm=Cì”!Lïv»™ÃåpŠ÷¯ž {7ܾ>Ý_{wà]&îíñùóÏß}{y¸àžÀ‰ÒàFÜ"¹-È™;@ q$îÄ ¸w€@âH܉;@ q$îÄ ¸w€@âH܉;@ q$îÄ ¸w€@âH܉;@ q$îÄ ¸w€@ß‚ßå ¥ßIEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-7.png gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-7.png *** gcc-3.3.3/libjava/javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-7.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/basic/doc-files/BasicGraphicsUtils-7.png 2003-06-19 10:48:46.000000000 +0000 *************** *** 0 **** --- 1,14 ---- + ‰PNG +  + IHDRhÈJììØgAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ7àp£¹ »IDATxœíÝ1LgÇñó+2diˆÚ­öÐ.•*PÞ •‚§Ž€Ô!KT\é‰0¾C + I†w¤l¯T“LÝ CÌ–JA , ¦[3D¸YxïýßÞ{±ÁøïÎgûû¬óù¹óá‡ûù¹çîñÎÏÏðø[¿7Àà!8¸Ün7‚€ÁÀààFpp#8¸Ün7‚€ÁÀààFpp#8¸Ün7‚€ÁÀààFpp#8¸Ün7‚€[Áq||\*•šÍæõŸŸŸ_YYé}3d¦p~~Þã*Êåò½{÷®½óLMM5b±Øã–ÈF¯-íöõz}aaAÓÚÿ­é±¶¶V(4¿½¼Ê(hlZe–––&''ëëë=n €Ìô›››Å¦«Õª[ž„=z433Ó^þûï¿W (\´ =Õ£J^˜2ò©×àØÝÝ1ÔvX^^Vsc||\–Ÿ››Ó£bB N†ôôóÏ?WË¥Ç-™TΪtè(UÊ(,¶¶¶Ôâ°æ€Ókp(¢˜P«ÁR4]©T‚°eÑÞiº¸¸¨ù:¨±Ö‡üùçŸÖô0Î{S«Õ´’““M[7§&ªÕªfê%;`iYD…ƒ°_#š£7=n €Ìô¢°PR\öªš-sñE†rd¿÷-®ãÐqÇÒÒ’öüö—ìœKü0DG.:œW^è1øë Æ)BÁ„½ +  ‚ÎŽCŠ’¨°r'þ@þ%F + ƒÜ¸ÜŽíííB¡ðí·ß&»Z¹B‹€ÁÀàà–XpœžžîííiúÇš>>>Njår%±ë8ÎÎξüòËxX¼|ùòÁƒ‰¬@®$Öâ¸qãÆÓ§O£§ÅbñþýûI­@®$ÙÇ¡¤ˆ~ÔG!¢(Ipåò#Éàˆ47€á6–ÈZ + …‚M¼~ýZ©¡øxûöíôôtþGK™v”ɸ Уd:GõÏzázâó)“Ÿ2ívvv¾ùæŽ.Ñ¥$ƒãÿü->óßÿú»}ûÙ[P&Õ2-ÁÑy=-ÎÎξúê«Çs ]â0¿üòËÑÑÑO?ý¤é÷¶`0£NañìÙ³ ü%%H¿7ƒàuÖÜ°ièÁ1Ң憡Ñ.¥~V%ø¸c2)•éæ¬JÐÖ9zzzzxxøêÕ«‡Þ½{÷ùóçÜýWJæ:Ž ãå”ÉasóæÍ;wî¼ÿ^ÓŸ|ò‰¦»\#.™C»Õe¥ УÄZAw&R&?e€k£s€[ÂcUÚñÕ—1êHìP¥CO>2F] mIöq´®[…”PH}Ün7‚€[’£Ö‡< .ªLǪ ÔÒ–ÝXdƒº@²«‚l¸êÂÆÅ~ñÅém† WpKì‡|.{‰`Êu 0VeQHcU†uTqب+—Ë6­ =íïö` $ÙâÀ`ÙØØxñâE½^¯T*ãããšÓl6£: ÅÿS|,//÷{+0hqŒ®…ÐÊÊŠ¹%\²»¯ + ²á­ žè˜EÑEIšˆaúuÁ‘-o]”Ëåz½Þ¹ Ђ±*ÃÆ[JÕÕÕó˜ô¶ Cƒ±*éûº˜™™±S*@÷¸"htÙ%v + VñÍßÙÙéÛ6a@p_•aã­ 57â©t#õ³*Gƨ d€±*éûºh¿ÆÜ.›œœLu 1иrtÔ5›Íz½Þ Ù„±‚ÎŽQ§öÅêêê~Hzª ‹~oò‹àu + ˆèzsMÄŸ—a¬Ê¨›™™©T*»»»A8^VO×ÖÖÔî 0VeØ\c¬Š‚cssSÓsss:ZQ£CÁ¡é ¶Š±*ƺ@«2lº¯ EŒ…6io!†cU†S7u±¼¼\,ùå\Wg!8>>¶nÑf³I׺ÁX•aã­ EF¥R±éÝÝÝõõu¹áJŒU6Þº(•JjeܺuKÓ“““óóóûûûœ‹EgŒUNÝ×…ŽSfggí:Q;N‰ÿŒ p!.uj\,--YÃî“@sW"8F]µZÕáÉÆÆFô”ÕŽQ§öE£Ñ°CM“èÁ1êÔÖСJ¼_ƒ>)\‰±*ÃÆ[·oß.‹³³³Ñî«‚+1VeØxëBÁQ«ÕøÙQ¸$s¨bÿŽ sȃîë":ûäÉ“ø|BWâ"‹ÑuY¸ð/+Ñ9:º¸´×–z__£.ÄZzò‘1êic¬Êp¢.*~åÁ‡öööŽŽŽú½!‚W¯^MOO?|ø°ß‚App#8¸%Ù9j=pÈê©J,88Û—ÔÒÆ}U† u p_•áD] UtŽpã¾*ƺ@«2„¨ ¤±*ɺ@ªèãàFppãÀ_-\iÈøÛãÐÜ./»Gár”I° òC±²²¢G{º´´T*•ÊåòÔÔ”;Ü£WÚýM*´¶z½¾¶¶¦uö¼ÉÝÊt¬J7½ý”é½LÐõééééáá¡ý‡ý*ÇÄÄD±XìfY\I‘ñäÉ“™™}¤Ú·WWW=ztpp |~~¾÷Ÿ}U¾¨ý2Ò{é]’Øö+¤~V¥›2…{û)“R™vcccß}÷}%Ú¯r¼|ù’à0v» ¼ƒ„¦µ“Ço¡—ú¬tб¹¹©_qP©Tô¨™ËËËÚ­  G-»¾¾®Å•Ax«Íjµª’šÖ£V¥&ƒöÿÅÅÅ–††Ö¬WUAZ§BG[¢’Z¡Ö£M:99Ñj5ß + ëU=Í&8èi7nÜxúôiôTÿ÷ïßïãö䇥€vÅZ­f{xÜZh5d·§µ ‚ð·ãµ”–ÕÞn»´•Zɽ{÷¢5¨Œe„–Ò1‹–RÖX“!*£5èUÅe–¦££ŠRFo­e£8Óúõ.Ž€DpŒ:%EÔÄPˆ(Júº9y¡=3÷yí–Ú¥[^ÝÚÚRèk_û¿}ÃkÖ^­™š¸uëV6X¬´Ã­¼µŸk)­ß#*©5_¸ –A6Çf*w,³¢ê³‰ö˜KÁ1ê¢FÍYÄç(Þ¼y=UƒÅÚšŽbEñöBüU{Œ^½,‰2CpàšqjJaG†¾Õ£[dFgIfggõÅ®_M;¸ˆN¯ª€¦www£Ü´ˆ + k‘ lžhúÌ.Š€õõu+¦ùñ»Û6Ø"öhs"ÖĈÞÈ&²9Ñ›ÝÝê)“Ÿ2í¶··ËårÞ‚£¿×qh_µÈˆ:Gƒ¿z:µÃW*ÍŒwŽZgªí½Ö1¡ˆQy=Ú"ÖŸj+×ÓZ­¦ÔhYÊfª²ÔfQÅѱŒu©DÛ ¥ìžáñ˜ÛßßOù3û¯ìîVO™ü”} ííÚ¥µC*lïÕ}™×CvŠDGj,œœœáw¾¦;\ßuá`—²EŠ¡öW•_z¬V«z,•J‹‹‹¶U©;ON7oA™ü”AgñNŠ………øKF#¾k¿íÓ6ž+°´%Úmƒ&2{_†K—²î‰Ë¾íí¤F‡“&Ù°s´ÚNmFf×àÜ8«ÀàøH9Ô23q´ + Â6ªfF— £†aõ‰.û¿Ð‹/‚°Ÿ,£­ò*­ÇÖÖÖôôô»wïRZ/æç秦¦‚ðT–kkkÍfÓ&–BAØ+V*•4Óžá…=v.j’(Gn‡âã rBŸ¼>ÿøõË@‚’oqèŸõÙ³g{{{š~óæÍÄÄDâoáÕ2T|vvÖÎ~ÛÉóßÿÝ.›‹ö4…‹^ÚÙÙ±VF64ìUµJìrãããZ­fYÓÞ 9;;{ûömÚÚeÞ¿¯*Ð_tçÎÇǯGà©Ý_ýUÿ¦ýþƒ.ðàÁƒøv6 Å„×êÙ(&;nOí%…Âyxž<‡D¯j + èQÓ6ªýÓøã?úù7Lõ¢ÚI°®1â’lqè¿óîÝ»‡‡‡§§§6ç믿ÎÃUÌ-'·í´¼]M¬Ý^‡j\´Œ>\t ccc}ŒÑx{çæÍ›ª—|f:T’Áñ駟>þ\ cªüüóÏŠíímÍLð-’¢†Ãæææd(Ï’ØE»ÆfÚ/¯D#Œ]ÜÍ[èøèõë׉nµÃ»wï>ûì3EÆ?ü Ég-`p%ß9jñ¡ÃüQߺ‰¯?:æWØ5j}Ä %[Ê%K¡Pˆú8‚¿~(%ê.Í3}òúüU ª R‰ãÊÑKÙ࢖_U®+G¸Ün7‚€ÁÀààFpp#8¸Ün7‚€ÁÀààFpp#8¸Ün7‚€ÁÀààFpp#8¸Ün7‚€ÁÀààFpp#8¸Ün7‚€ÁÀààFpp#8¸Ün7‚€Û»«Üô•=IEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/BorderUIResource.java gcc-3.4.0/libjava/javax/swing/plaf/BorderUIResource.java *** gcc-3.3.3/libjava/javax/swing/plaf/BorderUIResource.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/BorderUIResource.java 2003-08-01 20:10:21.000000000 +0000 *************** *** 1,5 **** /* BorderUIResource.java ! Copyright (C) 1999 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* BorderUIResource.java ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,42 **** --- 37,43 ---- package javax.swing.plaf; + import javax.swing.border.*; import javax.swing.Icon; import java.io.Serializable; *************** import java.awt.Font; *** 47,275 **** import java.awt.Color; /** * @serial * @serialField delegate Border the Border wrapped ! * @author Brian Jones */ public class BorderUIResource ! extends Object ! implements Border, UIResource, Serializable { ! private Border delegate; /** ! * Creates a UIResource wrapper for a Border ! * object. ! * ! * @param delegate the border to be wrapped */ ! public BorderUIResource(Border delegate) ! { ! this.delegate = delegate; } ! /** */ ! public static Border getEtchedBorderUIResource() { ! return null; } /** */ ! public static Border getLoweredBevelBorderUIResource() { ! return null; } ! /** */ ! public static Border getRaisedBevelBorderUIResource() { ! return null; } ! /** */ ! public static Border getBlackLineBorderUIResource() { ! return null; } ! /** */ ! public void paintBorder(Component c, Graphics g, int x, int y, ! int width, int height) { } ! /** */ ! public Insets getBorderInsets(Component c) { ! return null; } ! /** */ ! public boolean isBorderOpaque() { ! return false; } ! /** ! * @serial */ ! public static class BevelBorderUIResource ! extends BevelBorder ! implements UIResource, Serializable { ! public BevelBorderUIResource(int bevelType) ! { ! ! } ! ! public BevelBorderUIResource(int bevelType, ! Color highlight, ! Color shadow) ! { ! this(bevelType); ! } ! public BevelBorderUIResource(int bevelType, ! Color highlightOuter, ! Color highlightInner, ! Color shadowOuter, ! Color shadowInner) ! { ! this(bevelType); ! } } ! /** ! * @serial */ ! public static class CompoundBorderUIResource ! extends CompoundBorder ! implements UIResource, Serializable { ! public CompoundBorderUIResource(Border outsideBorder, ! Border insideBorder) ! { ! ! } } ! /** ! * @serial */ ! public static class EmptyBorderUIResource ! extends EmptyBorder ! implements UIResource, Serializable { ! public EmptyBorderUIResource(int top, int left, int bottom, int right) ! { ! this(new Insets(top,left,bottom,right)); ! } ! ! public EmptyBorderUIResource(Insets insets) ! { ! ! } } ! /** ! * @serial */ ! public static class EtchedBorderUIResource ! extends EtchedBorder ! implements UIResource, Serializable { ! public EtchedBorderUIResource() { } ! public EtchedBorderUIResource(int etchType) ! { ! ! } ! public EtchedBorderUIResource(Color highlight, Color shadow) ! { ! ! } ! public EtchedBorderUIResource(int etchType, Color highlight, ! Color shadow) ! { - } } ! /** ! * @serial */ ! public static class LineBorderUIResource ! extends LineBorder ! implements UIResource, Serializable { ! public LineBorderUIResource(Color color) ! { ! ! } ! public LineBorderUIResource(Color color, ! int thickness) ! { ! ! } } ! /** ! * @serial */ ! public static class MatteBorderUIResource ! extends MatteBorder ! implements UIResource, Serializable { ! public MatteBorderUIResource(int top, int left, int bottom, ! int right, Color color) ! { ! ! } ! public MatteBorderUIResource(int top, int left, int bottom, ! int right, Icon tileIcon) ! { ! ! } ! public MatteBorderUIResource(Icon tileIcon) ! { ! ! } } ! /** ! * @serial */ ! public static class TitledBorderUIResource ! extends TitledBorder ! implements UIResource, Serializable { ! TitledBorderUIResource(String title) ! { ! ! } ! TitledBorderUIResource(Border border) ! { ! ! } ! TitledBorderUIResource(Border border, String title) ! { - } - TitledBorderUIResource(Border border, String title, - int titleJustification, int titlePosition) - { ! } ! TitledBorderUIResource(Border border, String title, ! int titleJustification, int titlePosition, ! Font titleFont) ! { - } - TitledBorderUIResource(Border border, String title, - int titleJustification, int titlePosition, - Font titleFont, Color titleColor) - { ! } } } --- 48,911 ---- import java.awt.Color; /** + * A wrapper for {@link javax.swing.border.Border} that also + * implements the {@link UIResource} marker interface. This is useful + * for implementing pluggable look-and-feels: When switching the + * current LookAndFeel, only those borders are replaced that are + * marked as {@link UIResource}. For this reason, a look-and-feel + * should always install borders that implement + * UIResource, such as the borders provided by this + * class. + * * @serial * @serialField delegate Border the Border wrapped ! * ! * @author Brian Jones (cbj@gnu.org) ! * @author Sascha Brawer (brawer@dandelis.ch) */ public class BorderUIResource ! extends Object ! implements Border, UIResource, Serializable { ! /** ! * Verified using the serialver tool ! * of Apple/Sun JDK 1.3.1 on MacOS X 10.1.5. ! */ ! static final long serialVersionUID = -3440553684010079691L; ! ! ! /** ! * A shared instance of an {@link EtchedBorderUIResource}, or ! * null if the {@link #getEtchedBorderUIResource()} ! * method has not yet been called. ! */ ! private static Border etchedBorderUIResource; ! ! ! /** ! * A shared instance of a {@link BevelBorderUIResource} whose ! * bevelType is {@link ! * javax.swing.border.BevelBorder#LOWERED}, or null if ! * the {@link #getLoweredBevelBorderUIResource()} has not yet been ! * called. ! */ ! private static Border loweredBevelBorderUIResource; ! ! ! /** ! * A shared instance of a {@link BevelBorderUIResource} whose ! * bevelType is {@link ! * javax.swing.border.BevelBorder#RAISED}, or null if ! * the {@link #getRaisedBevelBorderUIResource()} has not yet been ! * called. ! */ ! private static Border raisedBevelBorderUIResource; ! ! ! /** ! * A shared instance of a {@link LineBorderUIResource} for ! * a one-pixel thick black line, or null if ! * the {@link #getBlackLineBorderUIResource()} has not yet been ! * called. ! */ ! private static Border blackLineBorderUIResource; ! ! ! /** ! * Returns a shared instance of an etched border which also ! * is marked as an {@link UIResource}. ! * ! * @see javax.swing.border.EtchedBorder ! */ ! public static Border getEtchedBorderUIResource() ! { ! /* Swing is not designed to be thread-safe, so there is no ! * need to synchronize the access to the global variable. ! */ ! if (etchedBorderUIResource == null) ! etchedBorderUIResource = new EtchedBorderUIResource(); ! return etchedBorderUIResource; ! } ! ! ! /** ! * Returns a shared instance of {@link BevelBorderUIResource} whose ! * bevelType is {@link ! * javax.swing.border.BevelBorder#LOWERED}. ! * ! * @see javax.swing.border.BevelBorder ! */ ! public static Border getLoweredBevelBorderUIResource() ! { ! /* Swing is not designed to be thread-safe, so there is no ! * need to synchronize the access to the global variable. ! */ ! if (loweredBevelBorderUIResource == null) ! loweredBevelBorderUIResource = new BevelBorderUIResource( ! BevelBorder.LOWERED); ! return loweredBevelBorderUIResource; ! } ! ! ! /** ! * Returns a shared instance of {@link BevelBorderUIResource} whose ! * bevelType is {@link ! * javax.swing.border.BevelBorder#RAISED}. ! * ! * @see javax.swing.border.BevelBorder ! */ ! public static Border getRaisedBevelBorderUIResource() ! { ! /* Swing is not designed to be thread-safe, so there is no ! * need to synchronize the access to the global variable. ! */ ! if (raisedBevelBorderUIResource == null) ! raisedBevelBorderUIResource = new BevelBorderUIResource( ! BevelBorder.RAISED); ! return raisedBevelBorderUIResource; ! } ! ! ! /** ! * Returns a shared instance of {@link LineBorderUIResource} for ! * a black, one-pixel width border. ! * ! * @see javax.swing.border.LineBorder ! */ ! public static Border getBlackLineBorderUIResource() ! { ! /* Swing is not designed to be thread-safe, so there is no ! * need to synchronize the access to the global variable. ! */ ! if (blackLineBorderUIResource == null) ! blackLineBorderUIResource = new LineBorderUIResource(Color.black); ! return blackLineBorderUIResource; ! } ! ! ! /** ! * The wrapped border. ! */ ! private Border delegate; ! ! ! /** ! * Constructs a BorderUIResource for wrapping ! * a Border object. ! * ! * @param delegate the border to be wrapped. ! */ ! public BorderUIResource(Border delegate) ! { ! if (delegate == null) ! throw new IllegalArgumentException(); ! ! this.delegate = delegate; ! } ! ! ! /** ! * Paints the border around an enclosed component by calling ! * the paintBorder method of the wrapped delegate. ! * ! * @param c the component whose border is to be painted. ! * @param g the graphics for painting. ! * @param x the horizontal position for painting the border. ! * @param y the vertical position for painting the border. ! * @param width the width of the available area for painting the border. ! * @param height the height of the available area for painting the border. ! */ ! public void paintBorder(Component c, Graphics g, ! int x, int y, int width, int height) ! { ! delegate.paintBorder(c, g, x, y, width, height); ! } ! ! ! /** ! * Measures the width of this border by calling the ! * getBorderInsets method of the wrapped ! * delegate. ! * ! * @param c the component whose border is to be measured. ! * ! * @return an Insets object whose left, right, ! * top and bottom fields indicate the ! * width of the border at the respective edge. ! */ ! public Insets getBorderInsets(Component c) ! { ! return delegate.getBorderInsets(c); ! } ! ! ! /** ! * Determines whether this border fills every pixel in its area ! * when painting by calling the isBorderOpaque ! * method of the wrapped delegate. ! * ! * @return true if the border is fully opaque, or ! * false if some pixels of the background ! * can shine through the border. ! */ ! public boolean isBorderOpaque() ! { ! return delegate.isBorderOpaque(); ! } ! + /** + * A {@link javax.swing.border.BevelBorder} that also implements the + * {@link UIResource} marker interface. This is useful for + * implementing pluggable look-and-feels: When switching the current + * LookAndFeel, only those borders are replaced that are marked as + * {@link UIResource}. For this reason, a look-and-feel should + * always install borders that implement UIResource, + * such as the borders provided by this class. + * + * @author Brian Jones (cbj@gnu.org) + * @author Sascha Brawer (brawer@dandelis.ch) + */ + public static class BevelBorderUIResource + extends BevelBorder + implements UIResource, Serializable + { /** ! * Constructs a BevelBorderUIResource whose colors will be derived ! * from the background of the enclosed component. The background ! * color is retrieved each time the border is painted, so a border ! * constructed by this method will automatically reflect a change ! * to the component’s background color. ! * ! *

                [An illustration showing raised and lowered BevelBorders] ! * ! * @param bevelType the desired appearance of the border. The value ! * must be either {@link javax.swing.border.BevelBorder#RAISED} ! * or {@link javax.swing.border.BevelBorder#LOWERED}. ! * ! * @throws IllegalArgumentException if bevelType has ! * an unsupported value. */ ! public BevelBorderUIResource(int bevelType) ! { ! super(bevelType); } ! ! /** + * Constructs a BevelBorderUIResource given its appearance type + * and two colors for its highlight and shadow. + * + *

                [An illustration showing BevelBorders that were
+      * constructed with this method] + * + * @param bevelType the desired appearance of the border. The value + * must be either {@link javax.swing.border.BevelBorder#RAISED} + * or {@link javax.swing.border.BevelBorder#LOWERED}. + * + * @param highlight the color that will be used for the inner side + * of the highlighted edges (top and left if if + * bevelType is {@link + * javax.swing.border.BevelBorder#RAISED}; bottom and right + * otherwise). The color for the outer side is a brightened + * version of this color. + * + * @param shadow the color that will be used for the outer side of + * the shadowed edges (bottom and right if + * bevelType is {@link + * javax.swing.border.BevelBorder#RAISED}; top and left + * otherwise). The color for the inner side is a brightened + * version of this color. + * + * @throws IllegalArgumentException if bevelType has + * an unsupported value. + * + * @throws NullPointerException if highlight or + * shadow is null. */ ! public BevelBorderUIResource(int bevelType, ! Color highlight, ! Color shadow) ! { ! super(bevelType, highlight, shadow); } + /** + * Constructs a BevelBorderUIResource given its appearance type + * and all its colors. + * + *

                [An illustration showing BevelBorders that
+      * were constructed with this method] + * + * @param bevelType the desired appearance of the border. The value + * must be either {@link javax.swing.border.BevelBorder#RAISED} + * or {@link javax.swing.border.BevelBorder#LOWERED}. + * + * @param highlightOuter the color that will be used for the outer + * side of the highlighted edges (top and left if + * bevelType is {@link + * javax.swing.border.BevelBorder#RAISED}; bottom and right + * otherwise). + * + * @param highlightInner the color that will be used for the inner + * side of the highlighted edges. + * + * @param shadowOuter the color that will be used for the outer + * side of the shadowed edges (bottom and right if + * bevelType is {@link + * javax.swing.border.BevelBorder#RAISED}; top and left + * otherwise). + * + * @param shadowInner the color that will be used for the inner + * side of the shadowed edges. + * + * @throws IllegalArgumentException if bevelType has + * an unsupported value. + * + * @throws NullPointerException if one of the passed colors + * is null. */ ! public BevelBorderUIResource(int bevelType, ! Color highlightOuter, ! Color highlightInner, ! Color shadowOuter, ! Color shadowInner) ! { ! super(bevelType, ! highlightOuter, highlightInner, ! shadowOuter, shadowInner); } ! } ! ! ! /** ! * A {@link javax.swing.border.CompoundBorder} that also implements the ! * {@link UIResource} marker interface. This is useful for ! * implementing pluggable look-and-feels: When switching the current ! * LookAndFeel, only those borders are replaced that are marked as ! * {@link UIResource}. For this reason, a look-and-feel should ! * always install borders that implement UIResource, ! * such as the borders provided by this class. ! * ! * @author Brian Jones (cbj@gnu.org) ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ ! public static class CompoundBorderUIResource ! extends CompoundBorder ! implements UIResource, Serializable ! { /** + * Constructs a CompoundBorderUIResource with the specified inside + * and outside borders. + * + * @param outsideBorder the outside border, which is painted to the + * outside of both insideBorder and the enclosed + * component. It is acceptable to pass null, in + * which case no outside border is painted. + * + * @param insideBorder the inside border, which is painted to + * between outsideBorder and the enclosed + * component. It is acceptable to pass null, in + * which case no inside border is painted. */ ! public CompoundBorderUIResource(Border outsideBorder, ! Border insideBorder) ! { ! super(outsideBorder, insideBorder); } ! } ! ! ! /** ! * An {@link javax.swing.border.EmptyBorder} that also implements the ! * {@link UIResource} marker interface. This is useful for ! * implementing pluggable look-and-feels: When switching the current ! * LookAndFeel, only those borders are replaced that are marked as ! * {@link UIResource}. For this reason, a look-and-feel should ! * always install borders that implement UIResource, ! * such as the borders provided by this class. ! * ! *

                [An illustration of EmptyBorder] ! * ! * @author Brian Jones (cbj@gnu.org) ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ ! public static class EmptyBorderUIResource ! extends EmptyBorder ! implements UIResource, Serializable ! { /** + * Constructs an empty border given the number of pixels required + * on each side. + * + * @param top the number of pixels that the border will need + * for its top edge. + * + * @param left the number of pixels that the border will need + * for its left edge. + * + * @param bottom the number of pixels that the border will need + * for its bottom edge. + * + * @param right the number of pixels that the border will need + * for its right edge. */ ! public EmptyBorderUIResource(int top, int left, int bottom, int right) ! { ! super(top, left, bottom, right); } ! ! /** + * Constructs an empty border given the number of pixels required + * on each side, passed in an Insets object. + * + * @param insets the Insets for the new border. */ ! public EmptyBorderUIResource(Insets insets) ! { ! super(insets); ! } ! } ! ! ! /** ! * An {@link javax.swing.border.EtchedBorder} that also implements the ! * {@link UIResource} marker interface. This is useful for ! * implementing pluggable look-and-feels: When switching the current ! * LookAndFeel, only those borders are replaced that are marked as ! * {@link UIResource}. For this reason, a look-and-feel should ! * always install borders that implement UIResource, ! * such as the borders provided by this class. ! * ! *

                [An illustration of the two EtchedBorder
!    * variants] ! * ! * @author Brian Jones (cbj@gnu.org) ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ ! public static class EtchedBorderUIResource ! extends EtchedBorder ! implements UIResource, Serializable ! { /** + * Constructs an EtchedBorderUIResource that appears lowered into + * the surface. The colors will be derived from the background + * color of the enclosed Component when the border gets painted. */ ! public EtchedBorderUIResource() ! { ! super(); } ! ! /** + * Constructs an EtchedBorderUIResource with the specified + * appearance. The colors will be derived from the background + * color of the enclosed Component when the border gets painted. + * + *

                [An illustration of the two
+      * EtchedBorder variants] + * + * @param etchType the desired appearance of the border. The value + * must be either {@link javax.swing.border.EtchedBorder#RAISED} + * or {@link javax.swing.border.EtchedBorder#LOWERED}. + * + * @throws IllegalArgumentException if etchType has + * an unsupported value. */ ! public EtchedBorderUIResource(int etchType) ! { ! super(etchType); } ! ! /** ! * Constructs a lowered EtchedBorderUIResource, explicitly ! * selecting the colors that will be used for highlight and ! * shadow. ! * ! * @param highlight the color that will be used for painting ! * the highlight part of the border. ! * ! * @param shadow the color that will be used for painting ! * the shadow part of the border. ! * ! * @see #EtchedBorderUIResource(int, Color, Color) */ ! public EtchedBorderUIResource(Color highlight, Color shadow) { ! super(highlight, shadow); } ! ! /** ! * Constructs an EtchedBorderUIResource with the specified ! * appearance, explicitly selecting the colors that will be used ! * for highlight and shadow. ! * ! *

                [An illustration that shows which pixels get
!      * painted in what color] ! * ! * @param etchType the desired appearance of the border. The value ! * must be either {@link javax.swing.border.EtchedBorder#RAISED} ! * or {@link javax.swing.border.EtchedBorder#LOWERED}. ! * ! * @param highlight the color that will be used for painting ! * the highlight part of the border. ! * ! * @param shadow the color that will be used for painting ! * the shadow part of the border. ! * ! * @throws IllegalArgumentException if etchType has ! * an unsupported value. */ ! public EtchedBorderUIResource(int etchType, ! Color highlight, Color shadow) { ! super(etchType, highlight, shadow); } ! } ! ! ! /** ! * A {@link javax.swing.border.LineBorder} that also implements the ! * {@link UIResource} marker interface. This is useful for ! * implementing pluggable look-and-feels: When switching the current ! * LookAndFeel, only those borders are replaced that are marked as ! * {@link UIResource}. For this reason, a look-and-feel should ! * always install borders that implement UIResource, ! * such as the borders provided by this class. ! * ! *

                [An illustration of two LineBorders] />
!    *
!    * @author Brian Jones (cbj@gnu.org)
!    * @author Sascha Brawer (brawer@dandelis.ch)
!    */
!   public static class LineBorderUIResource
!     extends LineBorder
!     implements UIResource, Serializable
!   {
      /**
!      * Constructs a LineBorderUIResource given its color.  The border
!      * will be one pixel thick and have plain corners.
!      *
!      * @param color the color for drawing the border.
       */
!     public LineBorderUIResource(Color color)
      {
!       super(color); 
      }
!     
!     
      /**
!      * Constructs a LineBorder given its color and thickness.  The
!      * border will have plain corners.
!      *
!      * @param color the color for drawing the border.
!      * @param thickness the width of the line in pixels.
       */
!     public LineBorderUIResource(Color color, int thickness)
      {
!       super(color, thickness);
!     }
!     
!     
!     /* Note: Since JDK1.3, javax.swing.border.LineBorder also has a
!      * constructor which accepts a value for the roundedCorners
!      * property. However, as of JDK1.4.1, the LineBorderUIResource
!      * subclass does not have a corresponding constructor.
!      * 
!      * A request for enhancing the Swing API has been filed with Sun:
!      * http://developer.java.sun.com/developer/bugParade/bugs/4879999.html
!      */
!   }
  
  
+   /**
+    * A {@link javax.swing.border.MatteBorder} that also implements the
+    * {@link UIResource} marker interface.  This is useful for
+    * implementing pluggable look-and-feels: When switching the current
+    * LookAndFeel, only those borders are replaced that are marked as
+    * {@link UIResource}.  For this reason, a look-and-feel should
+    * always install borders that implement <code>UIResource</code>,
+    * such as the borders provided by this class.
+    *
+    * <p><img src= + * + * @param top the width of the border at its top edge. + * @param left the width of the border at its left edge. + * @param bottom the width of the border at its bottom edge. + * @param right the width of the border at its right edge. + * @param matteColor the color for filling the border. + */ + public MatteBorderUIResource(int top, int left, + int bottom, int right, + Color color) + { + super(top, left, bottom, right, color); } ! ! /** ! * Constructs a MatteBorderUIResource given the width on each side ! * and an icon for tiling the border area. ! * ! *

                [A picture of a MatteBorder made by this
!      * constructor] ! * ! * @param top the width of the border at its top edge. ! * @param left the width of the border at its left edge. ! * @param bottom the width of the border at its bottom edge. ! * @param right the width of the border at its right edge. ! * @param tileIcon an icon for tiling the border area. */ ! public MatteBorderUIResource(int top, int left, ! int bottom, int right, ! Icon tileIcon) { ! super(top, left, bottom, right, tileIcon); } ! ! /** ! * Constructs a MatteBorderUIResource given an icon for tiling the ! * border area. The icon width is used for the border insets at ! * the left and right edge, the icon height for the top and bottom ! * edge. ! * ! *

                [A picture of a MatteBorder made by this
!      * constructor] ! * ! * @param tileIcon an icon for tiling the border area. */ ! public MatteBorderUIResource(Icon tileIcon) { ! super(tileIcon); } ! } ! ! ! /** ! * A {@link javax.swing.border.TitledBorder} that also implements the ! * {@link UIResource} marker interface. This is useful for ! * implementing pluggable look-and-feels: When switching the current ! * LookAndFeel, only those borders are replaced that are marked as ! * {@link UIResource}. For this reason, a look-and-feel should ! * always install borders that implement UIResource, ! * such as the borders provided by this class. ! * ! * @author Brian Jones (cbj@gnu.org) ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ ! public static class TitledBorderUIResource ! extends TitledBorder ! implements UIResource, Serializable ! { /** ! * Constructs a TitledBorderUIResource given the text of its title. ! * ! * @param title the title text, or null to use no ! * title text. */ ! public TitledBorderUIResource(String title) { ! super(title); ! } ! ! ! /** ! * Constructs an initially untitled TitledBorderUIResource ! * given another border. ! * ! * @param border the border underneath the title, or ! * null to use a default from ! * the current look and feel. ! */ ! public TitledBorderUIResource(Border border) ! { ! super(border); ! } ! ! ! /** ! * Constructs a TitledBorder given its border and title text. ! * ! * @param border the border underneath the title, or ! * null to use a default from ! * the current look and feel. ! * ! * @param title the title text, or null ! * to use no title text. ! */ ! public TitledBorderUIResource(Border border, String title) ! { ! super(border, title); ! } ! /** ! * Constructs a TitledBorderUIResource given its border, title ! * text, horizontal alignment, and vertical position. ! * ! * @param border the border underneath the title, or ! * null to use a default ! * from the current look and feel. ! * ! * @param title the title text, or null ! * to use no title text. ! * ! * @param titleJustification the horizontal alignment of the title ! * text in relation to the border. The value must be one of ! * {@link javax.swing.border.TitledBorder#LEFT}, ! * {@link javax.swing.border.TitledBorder#CENTER}, ! * {@link javax.swing.border.TitledBorder#RIGHT}, ! * {@link javax.swing.border.TitledBorder#LEADING}, ! * {@link javax.swing.border.TitledBorder#TRAILING}, or ! * {@link javax.swing.border.TitledBorder#DEFAULT_JUSTIFICATION}. ! * ! * @param titlePosition the vertical position of the title text ! * in relation to the border. The value must be one of ! * {@link javax.swing.border.TitledBorder#ABOVE_TOP}, ! * {@link javax.swing.border.TitledBorder#TOP}, ! * {@link javax.swing.border.TitledBorder#BELOW_TOP}, ! * {@link javax.swing.border.TitledBorder#ABOVE_BOTTOM}, ! * {@link javax.swing.border.TitledBorder#BOTTOM}, ! * {@link javax.swing.border.TitledBorder#BELOW_BOTTOM}, ! * or {@link javax.swing.border.TitledBorder#DEFAULT_POSITION}. ! * ! * @throws IllegalArgumentException if titleJustification ! * or titlePosition have an unsupported value. ! */ ! public TitledBorderUIResource(Border border, String title, ! int titleJustification, ! int titlePosition) ! { ! super(border, title, titleJustification, titlePosition); ! } ! /** ! * Constructs a TitledBorder given its border, title text, ! * horizontal alignment, vertical position, and font. ! * ! * @param border the border underneath the title, or ! * null to use a default ! * from the current look and feel. ! * ! * @param title the title text, or null ! * to use no title text. ! * ! * @param titleJustification the horizontal alignment of the title ! * text in relation to the border. The value must be one of ! * {@link javax.swing.border.TitledBorder#LEFT}, ! * {@link javax.swing.border.TitledBorder#CENTER}, ! * {@link javax.swing.border.TitledBorder#RIGHT}, ! * {@link javax.swing.border.TitledBorder#LEADING}, ! * {@link javax.swing.border.TitledBorder#TRAILING}, or ! * {@link javax.swing.border.TitledBorder#DEFAULT_JUSTIFICATION}. ! * ! * @param titlePosition the vertical position of the title text ! * in relation to the border. The value must be one of ! * {@link javax.swing.border.TitledBorder#ABOVE_TOP}, ! * {@link javax.swing.border.TitledBorder#TOP}, ! * {@link javax.swing.border.TitledBorder#BELOW_TOP}, ! * {@link javax.swing.border.TitledBorder#ABOVE_BOTTOM}, ! * {@link javax.swing.border.TitledBorder#BOTTOM}, ! * {@link javax.swing.border.TitledBorder#BELOW_BOTTOM}, ! * or {@link javax.swing.border.TitledBorder#DEFAULT_POSITION}. ! * ! * @param titleFont the font for the title text, or null ! * to use a default from the current look and feel. ! * ! * @throws IllegalArgumentException if titleJustification ! * or titlePosition have an unsupported value. ! */ ! public TitledBorderUIResource(Border border, String title, ! int titleJustification, ! int titlePosition, ! Font titleFont) ! { ! super(border, title, titleJustification, titlePosition, ! titleFont); } + + + /** + * Constructs a TitledBorder given its border, title text, + * horizontal alignment, vertical position, font, and color. + * + * @param border the border underneath the title, or + * null to use a default + * from the current look and feel. + * + * @param title the title text, or null + * to use no title text. + * + * @param titleJustification the horizontal alignment of the title + * text in relation to the border. The value must be one of + * {@link javax.swing.border.TitledBorder#LEFT}, + * {@link javax.swing.border.TitledBorder#CENTER}, + * {@link javax.swing.border.TitledBorder#RIGHT}, + * {@link javax.swing.border.TitledBorder#LEADING}, + * {@link javax.swing.border.TitledBorder#TRAILING}, or + * {@link javax.swing.border.TitledBorder#DEFAULT_JUSTIFICATION}. + * + * @param titlePosition the vertical position of the title text + * in relation to the border. The value must be one of + * {@link javax.swing.border.TitledBorder#ABOVE_TOP}, + * {@link javax.swing.border.TitledBorder#TOP}, + * {@link javax.swing.border.TitledBorder#BELOW_TOP}, + * {@link javax.swing.border.TitledBorder#ABOVE_BOTTOM}, + * {@link javax.swing.border.TitledBorder#BOTTOM}, + * {@link javax.swing.border.TitledBorder#BELOW_BOTTOM}, + * or {@link javax.swing.border.TitledBorder#DEFAULT_POSITION}. + * + * @param titleFont the font for the title text, or null + * to use a default from the current look and feel. + * + * @param titleColor the color for the title text, or null + * to use a default from the current look and feel. + * + * @throws IllegalArgumentException if titleJustification + * or titlePosition have an unsupported value. + */ + public TitledBorderUIResource(Border border, String title, + int titleJustification, int titlePosition, + Font titleFont, Color titleColor) + { + super(border, title, titleJustification, titlePosition, + titleFont, titleColor); + } + } } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/ButtonUI.java gcc-3.4.0/libjava/javax/swing/plaf/ButtonUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/ButtonUI.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/ButtonUI.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,5 **** package javax.swing.plaf; ! public class ButtonUI extends ComponentUI { } --- 1,52 ---- + /* ButtonUI.java + Copyright (C) 2002, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.swing.plaf; ! /** ! * An abstract base class for delegates that implement the pluggable ! * look and feel for a JButton. ! * ! * @see javax.swing.JButton ! * ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ ! public abstract class ButtonUI ! extends ComponentUI { } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/ColorChooserUI.java gcc-3.4.0/libjava/javax/swing/plaf/ColorChooserUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/ColorChooserUI.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/ColorChooserUI.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,5 **** /* ColorChooserUI.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ColorChooserUI.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 38,59 **** package javax.swing.plaf; /** ! * ColorChooserUI ! * @author Andrew Selkirk ! * @version 1.0 */ ! public abstract class ColorChooserUI extends ComponentUI { ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Constructor ColorChooserUI ! */ ! public ColorChooserUI() { ! // TODO ! } // ColorChooserUI() ! - } // ColorChooserUI --- 38,60 ---- package javax.swing.plaf; /** ! * An abstract base class for delegates that implement the pluggable ! * look and feel for a JColorChooser. ! * ! * @see javax.swing.JColorChooser ! * ! * @author Andrew Selkirk ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public abstract class ColorChooserUI ! extends ComponentUI ! { ! /** ! * Constructs a ColorChooserUI. ! */ ! public ColorChooserUI() ! { ! /* The constructor does not do anything. */ ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/ColorUIResource.java gcc-3.4.0/libjava/javax/swing/plaf/ColorUIResource.java *** gcc-3.3.3/libjava/javax/swing/plaf/ColorUIResource.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/ColorUIResource.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,24 **** package javax.swing.plaf; import java.awt.Color; /** ! * STUBBED */ ! public class ColorUIResource extends Color implements UIResource { ! public ColorUIResource(Color c) { ! super(c.getRGB()); } ! public ColorUIResource(float r, float g, float b) { ! super(r, g, b, 1.0f); } ! public ColorUIResource(int rgb) { ! super(rgb, false); } ! public ColorUIResource(int r, int g, int b) { ! super(r, g, b, 255); } ! } // class ColorUIResource --- 1,114 ---- + /* ColorUIResource.java + Copyright (C) 2002, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.swing.plaf; + import java.awt.Color; + + /** ! * A Color that is marked as UIResource, which indicates that ! * the color has been installed by a pluggable LookAndFeel. Such colors ! * are replaced when the LookAndFeel changes. ! * ! * @see java.awt.Color ! * ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public class ColorUIResource ! extends Color ! implements UIResource { ! /** ! * Constructs a ColorUIResource using the specified ! * red, green, and blue values, which must be given as integers in ! * the range of 0-255. The alpha channel value will default to 255, ! * meaning that the color is fully opaque. ! * ! * @param r the red intensity, which must be in the range [0 .. 255]. ! * @param g the green intensity, which must be in the range [0 .. 255]. ! * @param b the blue intensity, which must be in the range [0 .. 255]. ! */ ! public ColorUIResource(int r, int g, int b) { ! super(r, g, b); } ! ! ! /** ! * Consructs a ColorUIResource using the specified ! * RGB value. The blue value is in bits 0-7, green in bits 8-15, and ! * red in bits 16-23. The other bits are ignored. The alpha value is set ! * to 255, meaning that the color is fully opaque. ! * ! * @param rgb the rgb value, as discussed above. ! */ ! public ColorUIResource(int rgb) { ! super(rgb); } ! ! ! /** ! * Constructs a ColorUIResource using the specified ! * red, green, and blue intensities, which must be given as floats in ! * the range of 0-1. The alpha channel value will default to 1.0f, ! * meaning that the color is fully opaque. ! * ! * @param r the red intensity, which must be in the range [0.0 .. 1.0]. ! * @param g the green intensity, which must be in the range [0.0 .. 1.0]. ! * @param b the blue intensity, which must be in the range [0.0 .. 1.0]. ! */ ! public ColorUIResource(float r, float g, float b) { ! super(r, g, b); } ! ! ! /** ! * Constructs a ColorUIResource, using the intensities ! * of another color. ! * ! * @param c the color whose intensities will be considered when ! * constructing this ColorUIResource. ! */ ! public ColorUIResource(Color c) { ! super(c.getRGB()); } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/ComboBoxUI.java gcc-3.4.0/libjava/javax/swing/plaf/ComboBoxUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/ComboBoxUI.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/ComboBoxUI.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,5 **** /* ComboBoxUI.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ComboBoxUI.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,88 **** package javax.swing.plaf; ! // Imports ! import javax.swing.*; /** ! * ComboBoxUI ! * @author Andrew Selkirk ! * @version 1.0 */ ! public abstract class ComboBoxUI extends ComponentUI { ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Constructor ComboBoxUI ! */ ! public ComboBoxUI() { ! // TODO ! } // ComboBoxUI() ! ! ! //------------------------------------------------------------- ! // Methods ---------------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * setPopupVisible ! * @param combobox TODO ! * @param visible TODO ! */ ! public abstract void setPopupVisible(JComboBox combobox, boolean visible); ! ! /** ! * isPopupVisible ! * @param combobox TODO ! * @returns boolean ! */ ! public abstract boolean isPopupVisible(JComboBox combobox); ! ! /** ! * isFocusTraversable ! * @param combobox TODO ! * @returns boolean ! */ ! public abstract boolean isFocusTraversable(JComboBox combobox); ! } // ComboBoxUI --- 37,96 ---- package javax.swing.plaf; ! import javax.swing.JComboBox; /** ! * An abstract base class for delegates that implement the pluggable ! * look and feel for a JButton. ! * ! * @see javax.swing.JComboBox ! * ! * @author Andrew Selkirk ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public abstract class ComboBoxUI ! extends ComponentUI ! { ! /** ! * Constructs a new ComboBoxUI. ! */ ! public ComboBoxUI() ! { ! } ! ! ! /** ! * Sets the visibility of the popup button. ! * ! * @param c the JComboBox whose popup ! * is shown or hidden. ! * ! * @param visible true to show the popup, false ! * to hide it. ! */ ! public abstract void setPopupVisible(JComboBox c, boolean visible); ! /** ! * Determines whether the popup button is currently visible. ! * ! * @param c the JComboBox whose popup visibility ! * is retrieved. ! * ! * @return true if the popup button is currently ! * visible, false otherwise. ! */ ! public abstract boolean isPopupVisible(JComboBox c); ! ! ! /** ! * Determines whether the combo box can receive input focus. ! * ! * @param c JComboBox whose focus traversability ! * is to be retrieved. ! * ! * @returns true if c can receive ! * input focus, false otherwise. ! */ ! public abstract boolean isFocusTraversable(JComboBox c); ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/ComponentInputMapUIResource.java gcc-3.4.0/libjava/javax/swing/plaf/ComponentInputMapUIResource.java *** gcc-3.3.3/libjava/javax/swing/plaf/ComponentInputMapUIResource.java 2002-08-09 04:26:11.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/ComponentInputMapUIResource.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,5 **** /* ComponentInputMapUIResource.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ComponentInputMapUIResource.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,64 **** package javax.swing.plaf; ! // Imports ! import javax.swing.*; /** ! * ComponentInputMapUIResource ! * @author Andrew Selkirk ! * @version 1.0 */ ! public class ComponentInputMapUIResource extends ComponentInputMap implements UIResource { ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Constructor ComponentInputMapUIResource ! * @param component TODO ! */ ! public ComponentInputMapUIResource(JComponent component) { ! super(component); ! // TODO ! } // ComponentInputMapUIResource() ! - } // ComponentInputMapUIResource --- 37,70 ---- package javax.swing.plaf; ! import javax.swing.ComponentInputMap; ! import javax.swing.JComponent; ! /** ! * A ComponentInputMap that implements the {@link UIResource} ! * interface to indicate that it belongs to a pluggable ! * LookAndFeel. ! * ! * @see javax.swing.ComponentInputMap ! * @see javax.swing.InputMap ! * ! * @author Andrew Selkirk ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public class ComponentInputMapUIResource ! extends ComponentInputMap ! implements UIResource ! { ! /** ! * Constructs a new ComponentInputMapUIResource. ! * ! * @param component the JComponent associated with ! * this InputMap. ! */ ! public ComponentInputMapUIResource(JComponent component) ! { ! super(component); ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/ComponentUI.java gcc-3.4.0/libjava/javax/swing/plaf/ComponentUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/ComponentUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/ComponentUI.java 2003-08-01 20:10:21.000000000 +0000 *************** *** 1,88 **** package javax.swing.plaf; ! import java.awt.*; ! import javax.swing.border.*; ! import javax.swing.*; - import javax.accessibility.*; public abstract class ComponentUI - implements UIResource // ?? { ! boolean contains(JComponent c, int x, int y) ! { ! return c.inside(x,y); ! } - // this SHOULD thow an error: - public static ComponentUI createUI(JComponent c) - { - Exception e = new Exception("createUI from ComponentUI should never be called"); - e.printStackTrace(); - System.exit(1); - return null; - } ! public Accessible getAccessibleChild(JComponent c, int i) ! { ! //Return the nth Accessible child of the object. ! return null; ! } - public int getAccessibleChildrenCount(JComponent c) - { - //Returns the number of accessible children in the object. - return 0; - } ! public Dimension getMaximumSize(JComponent c) { ! return getPreferredSize(c); } - public Dimension getMinimumSize(JComponent c) - { - return getPreferredSize(c); - } ! public Dimension getPreferredSize(JComponent c) ! { ! return null; ! } - public void installUI(JComponent c) - { - String id = c.getUIClassID() + ".border"; ! Border s = UIManager.getBorder( id ); ! ! if (s != null) ! { ! c.setBorder( s ); ! //System.out.println("OK-INSTALL: " + this + ", ID=" + id + ",B="+s); ! } ! else ! { ! ///System.out.println("FAIL-INSTALL: " + this + ", " + id); ! } ! } ! public void paint(Graphics g, JComponent c) ! { ! // System.out.println("UI-COMPONENT-> unimplemented paint: " + c + ", UI="+this); ! } - public void uninstallUI(JComponent c) - { - } ! public void update(Graphics g, JComponent c) { ! if (c.isOpaque()) { ! g.setColor(c.getBackground()); ! g.fillRect(0, 0, c.getWidth(),c.getHeight()); ! } ! paint(g, c); ! } ! } - --- 1,328 ---- + /* ComponentUI.java + Copyright (C) 2002, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.swing.plaf; ! import java.awt.Dimension; ! import java.awt.Graphics; ! import javax.accessibility.Accessible; ! import javax.swing.JComponent; + /** + * The abstract base class for all delegates that provide the + * pluggable look and feel for Swing components. User applications + * should not need to access this class; it is internal to Swing + * and the look-and-feel implementations. + * + *

                [UML diagram illustrating the architecture for pluggable
+  * look and feels] + * + *

                Components such as {@link javax.swing.JSlider} do not directly + * implement operations related to the look and feel of the user + * interface, such as painting or layout. Instead, they use a delegate + * object for all such tasks. In the case of JSlider, the + * user interface would be provided by some concrete subclass of + * {@link javax.swing.plaf.SliderUI}. + * + *

                Soon after its creation, a ComponentUI will be sent + * an {@link #installUI} message. The ComponentUI will + * react by setting properties such as the border or the background + * color of the JComponent for which it provides its + * services. Soon before the end of its lifecycle, the + * ComponentUI will receive an {@link #uninstallUI} + * message, at which time the ComponentUI is expected to + * undo any changes. + * + *

                Note that the ui of a JComponent + * changes whenever the user switches between look and feels. For + * example, the ui property of a JSlider + * could change from an instance of MetalSliderUI to an + * instance of FooSliderUI. This switch can happen at any + * time, but it will always be performed from inside the Swing thread. + * + * @author Sascha Brawer (brawer@dandelis.ch) + */ public abstract class ComponentUI { ! /** ! * Constructs a new UI delegate. ! */ ! public ComponentUI() ! { ! } ! ! ! /** ! * Sets up the specified component so it conforms the the design ! * guidelines of the implemented look and feel. When the look and ! * feel changes, a ComponentUI delegate is created. ! * The delegate object then receives an installUI ! * message. ! * ! *

                This method should perform the following tasks: ! * ! *

                ! * ! * @param c the component for which this delegate will provide ! * services. ! * ! * @see #uninstallUI ! * @see javax.swing.JComponent#setUI ! * @see javax.swing.JComponent#updateUI ! */ ! public void installUI(JComponent c) ! { ! // The default implementation does not change any properties. ! } ! /** ! * Puts the specified component into the state it had before ! * {@link #installUI} was called. ! * ! * @param c the component for which this delegate has provided ! * services. ! * ! * @see #installUI ! * @see javax.swing.JComponent#setUI ! * @see javax.swing.JComponent#updateUI ! */ ! public void uninstallUI(JComponent c) ! { ! // The default implementation does not change any properties. ! } ! /** ! * Paints the component according to the design guidelines ! * of the look and feel. Most subclasses will want to override ! * this method. ! * ! * @param g the graphics for painting. ! * ! * @param c the component for which this delegate performs ! * services. ! */ ! public void paint(Graphics g, JComponent c) ! { ! } ! ! ! /** ! * Fills the specified component with its background color ! * (unless the opaque property is false) ! * before calling {@link #paint}. ! * ! *

                It is unlikely that a subclass needs to override this method. ! * The actual rendering should be performed by the {@link #paint} ! * method. ! * ! * @param g the graphics for painting. ! * ! * @param c the component for which this delegate performs ! * services. ! * ! * @see #paint ! * @see javax.swing.JComponent#paintComponent ! */ ! public void update(Graphics g, JComponent c) ! { ! if (c.isOpaque()) { ! g.setColor(c.getBackground()); ! g.fillRect(0, 0, c.getWidth(), c.getHeight()); } + paint(g, c); + } + + + /** + * Determines the preferred size of a component. The default + * implementation returns null, which means that + * c’s layout manager should be asked to + * calculate the preferred size. + * + * @param c the component for which this delegate performs services. + * + * @return the preferred size, or null to indicate that + * c’s layout manager should be asked + * for the preferred size. + */ + public Dimension getPreferredSize(JComponent c) + { + return null; + } + + + /** + * Determines the minimum size of a component. The default + * implementation calls {@link #getPreferredSize}, but subclasses + * might want to override this. + * + * @param c the component for which this delegate performs services. + * + * @return the minimum size, or null to indicate that + * c’s layout manager should be asked + * to calculate the minimum size. + */ + public Dimension getMinimumSize(JComponent c) + { + return getPreferredSize(c); + } ! /** ! * Determines the maximum size of a component. The default ! * implementation calls {@link #getPreferredSize}, but subclasses ! * might want to override this. ! * ! * @param c the component for which this delegate performs services. ! * ! * @return the maximum size, or null to indicate that ! * c’s layout manager should be asked ! * to calculate the maximum size. ! */ ! public Dimension getMaximumSize(JComponent c) ! { ! return getPreferredSize(c); ! } ! /** ! * Determines whether a click into the component at a specified ! * location is considered as having hit the component. The default ! * implementation checks whether the point falls into the ! * component’s bounding rectangle. Some subclasses might want ! * to override this, for example in the case of a rounded button. ! * ! * @param c the component for which this delegate performs services. ! * ! * @param x the x coordinate of the point, relative to the local ! * coordinate system of the component. Zero would be be ! * component’s left edge, irrespective of the location ! * inside its parent. ! * ! * @param y the y coordinate of the point, relative to the local ! * coordinate system of the component. Zero would be be ! * component’s top edge, irrespective of the location ! * inside its parent. ! */ ! public boolean contains(JComponent c, int x, int y) ! { ! /* JComponent.contains calls the ui delegate for hit ! * testing. Therefore, endless mutual recursion would result if we ! * called c.contains(x, y) here. ! * ! * The previous Classpath implementation called the deprecated ! * method java.awt.Component.inside. In the Sun implementation, it ! * can be observed that inside, other than contains, does not call ! * the ui delegate. But that inside() behaves different to ! * contains() clearly is in violation of the method contract, and ! * it is not something that a good implementation should rely upon ! * -- even if Classpath ends up being forced to replicate this ! * apparent bug of the Sun implementation. ! */ ! return (x >= 0) && (x < c.getWidth()) ! && (y >= 0) && (y < c.getHeight()); ! } ! ! ! /** ! * Creates a delegate object for the specified component. Users ! * should use the createUI method of a suitable ! * subclass. The implementation of ComponentUI ! * always throws an error. ! * ! * @param c the component for which a UI delegate is requested. ! */ ! public static ComponentUI createUI(JComponent c) ! { ! throw new Error( ! "javax.swing.plaf.ComponentUI does not implement createUI; call " ! + "createUI on a subclass."); ! } ! ! /** ! * Counts the number of accessible children in the component. The ! * default implementation delegates the inquiry to the {@link ! * javax.accessibility.AccessibleContext} of c. ! * ! * @param c the component whose accessible children ! * are to be counted. ! */ ! public int getAccessibleChildrenCount(JComponent c) ! { ! return c.getAccessibleContext().getAccessibleChildrenCount(); ! } ! /** ! * Returns the specified accessible child of the component. The ! * default implementation delegates the inquiry to the {@link ! * javax.accessibility.AccessibleContext} of c. ! * ! * @param i the index of the accessible child, starting at zero. ! * ! * @param c the component whose i-th accessible child ! * is requested. ! */ ! public Accessible getAccessibleChild(JComponent c, int i) ! { ! return c.getAccessibleContext().getAccessibleChild(i); ! } } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/DesktopIconUI.java gcc-3.4.0/libjava/javax/swing/plaf/DesktopIconUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/DesktopIconUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/DesktopIconUI.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,5 **** /* DesktopIconUI.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* DesktopIconUI.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 38,59 **** package javax.swing.plaf; /** ! * DesktopIconUI ! * @author Andrew Selkirk ! * @version 1.0 */ ! public abstract class DesktopIconUI extends ComponentUI { ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Constructor DesktopIconUI ! */ ! public DesktopIconUI() { ! // TODO ! } // DesktopIconUI() ! ! ! } // DesktopIconUI --- 38,56 ---- package javax.swing.plaf; /** ! * An abstract base class for delegates that implement the pluggable ! * look and feel for a desktop icon. ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public abstract class DesktopIconUI ! extends ComponentUI ! { ! /** ! * Constructs a new DesktopIconUI. ! */ ! public DesktopIconUI() ! { ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/DesktopPaneUI.java gcc-3.4.0/libjava/javax/swing/plaf/DesktopPaneUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/DesktopPaneUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/DesktopPaneUI.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,5 **** /* DesktopPaneUI.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* DesktopPaneUI.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 38,59 **** package javax.swing.plaf; /** ! * DesktopPaneUI ! * @author Andrew Selkirk ! * @version 1.0 */ ! public abstract class DesktopPaneUI extends ComponentUI { ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Constructor DesktopPaneUI ! */ ! public DesktopPaneUI() { ! // TODO ! } // DesktopPaneUI() ! - } // DesktopPaneUI --- 38,59 ---- package javax.swing.plaf; /** ! * An abstract base class for delegates that implement the pluggable ! * look and feel for a JDesktopPane. ! * ! * @see javax.swing.JDesktopPane ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public abstract class DesktopPaneUI ! extends ComponentUI ! { ! /** ! * Constructs a new DesktopPaneUI. ! */ ! public DesktopPaneUI() ! { ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/DimensionUIResource.java gcc-3.4.0/libjava/javax/swing/plaf/DimensionUIResource.java *** gcc-3.3.3/libjava/javax/swing/plaf/DimensionUIResource.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/DimensionUIResource.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,12 **** package javax.swing.plaf; import java.awt.Dimension; /** ! * STUBBED */ ! public class DimensionUIResource extends Dimension implements UIResource { ! public DimensionUIResource(int w, int h) { ! super(w, h); } ! } // class DimensionUIResource --- 1,68 ---- + /* DimensionUIResource.java + Copyright (C) 2002, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.swing.plaf; + import java.awt.Dimension; + /** ! * A Dimension that is marked as UIResource, which ! * indicates that it has been installed by a pluggable ! * LookAndFeel. Such dimensions are replaced when the LookAndFeel ! * changes. ! * ! * @see java.awt.Dimension ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public class DimensionUIResource ! extends Dimension ! implements UIResource { ! /** ! * Constructs a new DimensionUIResource, given its width and height. ! * ! * @param width the width in pixels. ! * @param height the height in pixels. ! */ ! public DimensionUIResource(int width, int height) { ! super(width, height); } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/doc-files/ComponentUI-1.dia gcc-3.4.0/libjava/javax/swing/plaf/doc-files/ComponentUI-1.dia *** gcc-3.3.3/libjava/javax/swing/plaf/doc-files/ComponentUI-1.dia 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/doc-files/ComponentUI-1.dia 2003-06-24 20:17:27.000000000 +0000 *************** *** 0 **** --- 1,12 ---- + ‹í][sÛ6~ϯÐ(¯*D\ Tq:›Ì´Óf÷¡ÍK_4´DÉl)RKR‰½ûÛ÷€”dÙ)‚í8Ff’˜&øáHøxxn8|÷Óõ*|‰‹2ɳ‹!FÁpg³|ždË‹áç?~þAzÿæÝ<‰~„¿Ë"Z àŠ¬ÔGëªZÿ8ýú¥7eTåJ“ *ãñÿ¢4Æ0h<|xõ<ª¢æQUÉ妊Y´Š/†—Ñìïe‘o²ùöŠYžæÅàK”^ ß.ê?Ãñûwã;ׇZGë¸Ø£¬Öy™À¹êf}ïÜýëô¿ÛS%œÉ–ïßþƒ½m¦Üþ¢×üÕ**–I¶…*â(m>A’Ò÷S\:AI NP’rºÎ‹ªˆ’j‹t™çie XUlâ¾På,Ja=„û,’ªÊI±ˆÒò¨ã;tê7˲Hæ-D<8uÿª¯É¼ºš^Û¸àÆàKR&—i¼—!É*K„›^Vßí&™ÇeÛ·{xòþ•WÛ³ãÑoOŸ’k|Tµ¥ÑM\lÁ>ܪµÁö;Ù2½›_þϪ­Ô¿WQ6Šùà‡Á‡üzx«˜A-'ó‹á¿ƒ–O(pkí>ï:ßÛaL9ˆ‹@ˆ°ïòiÀËË=f Ø2w˜Øbb9a 1*Ȉb„… }çˆÓx5åE¶WȯAkþ?`?#ˆ„Ä é*N–WÕ( + bq.z«ò¼˜ÇÅ´~¢ýt+¯ò¯ÓOË^št|Ë8öacö²@80&àÔ ùªÄ9¡e#ÌظážØÔé&Üõp€hôfq’eÌ›sþ˜GL™Ç‘ä°~”»à€i¬ ý|aŠÜ(9c)OPÌ”¬- ‘rC¯Å"^À—úÜôúüé7`ÖÇ4*Ë#Ü¢¦Ü + G'ÄHq 6Á >’(tB+3;8"á‚O±¾0G\°~ÔöWg•…+VVqçš÷P-°À\çE—0:šïmÖë".ËéþDiäÑtbæà'GÜ)çcî|‡bî »¥4ù2wˆÛU>_ÄE^Ä&kÕAý§·¹WŽ,É,¿>.ò=©õƒE´JÒ›‹á*ÏòrÍâá ¬n´ß*³¹òc¾)P=c3ÂL%¥å\ë<½YåÅú*™™Lg9ÛL?Tô­s•ps?ÍÙß é„Ö¬¹ zÎb9‰Fl{hHÚ.¹È;Œu€wwÙZmû3ép6î᪟/ä­ºo‰´<ÐÞ÷Ã8›UºÓ?h»Ž’g7Ü Ô¥$Mª]-Î6«-ù ×ôqÍ£'c’]ÅE†ð,ž|O·Ÿ­·ÿŸM\Üœ-O}MËY¾Åkð?©ƒÒû1ý)½tCÁ_ŠHkÉÒ†ŠQºù–Œè¿“½‹xâ¦èÄ5 >WñjFÕù|Ù݆›-ÝXfêÆ*ðG8@Xa晼Ža6ÁQÇH°þà>­´ž-E›hÜy®íïi2‹×à×Ú9¡Þ±u(¥÷l½gë=[ïÙzÏöI=Ûñ·fAþƒ…¥É·ú¡)ÉMMI°ËäH"ÁÝØ‘J§BÄD›µÍ§TØßB-ª«i-Ú)9ƒk&{x: y¯Fµ7Ͳ×E·Î ÞÍrÏ¿92ÊÒþ|bÃs–g¬µ¾+îÿbpeó탸Êë¬ÜàöìÅPì>ø‘Kðöv÷|PÀs0ï9>–0.€`ºF¦ÎDZ + ' 1QCb*P¨§ÐÌ4¸Oº ìÄîÊN„8\ç¸[ûDâç_>—è].ŸKô—÷¸¼Çå=.ŸKô¹DŸKô¹DŸK4Ì%º[•™›U9«ZòõäxÝ= ’¬¬¢4ýü«Hø‡Ä÷óðêèeª£Mæ’WH^!y…ô]ÖÀìü-Éâ#9šÐ8yÉéX.²3Æõ–.©BÊ':¢s5!Ò±YƒÈI–MãlÞšÆ<”¸5u£LR7ÀžÙº÷fÿ3y¬G"Oܽ„Ú$òˆòG|]!Š4NæQD¹"ðÕ:¡ÊNoÀl°%ïÛ\W-*öàÔÃG|qÛ8co5$Ú§W8×6Hí"’ëf Ý$\¢4Yf«ci~{}}"‹ý¯¼:¦ •±‚¤:ÕÌF + ÑPPâDM$k @N°B¡>Æ)⨃„¥ØIlÒto‡}Ž[üs—ƒM2˜ƒhKxؾY“ëè6œFow©¾GÒ@ ^“-@"ìO¶¨Nwô,+°5xJu7V•›`ýd®z*˜ ØyÃcìf—wÓPÁŒkOѯ£Å¸Âƽb@¹ŽXÿÆÝm80@q]Aȹ ³êÛ¿¢/Ñ5*¿ÂÁcÙVÒ±bňœ¥X —ÐMáÉ3VmåظM ň2]¼vsÓS ‰j ¥"|BaEêc°|•aW6k)vç~,ñüÛ±šÝX¾8ÐúýX¾:ÐWúê@_è÷c=ÿ~,lÜ¢ŽRÈnW:Û®$ˆÐR‡Õ&0…ª  'û³ŽˆÝ6,OŠÅñxg›žabtû­ZÇÓ5àöœ¿ñêt¨ŠÙtŸ¥¨N¹ë>+Ȧûl€¨ tð + cÓæ›]Ýg-ÄîlãÈñ‘,ËH·É*X@†vÅ»-$¸ÉbË;¢ y÷8á-»Åk‰qY.î ŒuÖÈ¢Ô" + žÞ + aÂ]\¸ BÎ'D!Jq8‚ubÄQï!K±Ÿ¦8S ÔûwÕüD˜5´°Àd#j“ + áÈP¤ÄRˆ ‘ˆÖS`°„pe ؈ÝÁ;ã^ãgý•Éllõͯ|°Õ[}°Õ[}°Õ[}°õÙƒ­Ò"ØÚÄÁ5t”Ä'q¥„†$uŸ6I|m X—§‚­÷Ån!“4ˆ´©ø`:óÇ‘ÄŠ9j%§T + Åê §#¢y¬œ|XHý4û?Üæ_Âþ¢löIFD Eîjÿk ¥ x½ÿ£>–zG(w¶ÿÃBìîýÏŸZüWQê“‹>¹è“‹>¹è“‹>¹è“‹>¹øüÉEXy3¿I]z3 $©½™Ýàzån;»…ؾ~ý2‹ÛÔ¯ #¨pDº$C 7¤#9é³~}¥}†×T¿n±Äßo¢‘Wï·a$\u|€UQ $¯;>ÄêcðÎ <þîøèC±ÛFèY¼ué3Â0â-‰ÆÐ"ѨÜîÉëÌ/Pãº)¥fŽßùÁྑ£)Áˆšèš×s0b2C×ísDê–‚S|lƒ[Oö€ás¼¢äÂŽîÌ­Òè&.¶?Ãße­Þ¿ù?ö˜ÇÁ‚® \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/doc-files/ComponentUI-1.png gcc-3.4.0/libjava/javax/swing/plaf/doc-files/ComponentUI-1.png *** gcc-3.3.3/libjava/javax/swing/plaf/doc-files/ComponentUI-1.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/doc-files/ComponentUI-1.png 2003-06-24 20:17:27.000000000 +0000 *************** *** 0 **** --- 1,90 ---- + ‰PNG +  + IHDR¼&I"þ§ pHYsœœ”SÝtIMEÓ %ï,Uø IDATxÚìy\ÔÕþÿÏfØwYô + + H’i¥¹sA½n…»üôºu ëkæ ¯eiYfjê½nhn¡Ùr³ÂµL-ÜA”Ü1$\‘E˜æüþ8vîÇ™a`öy=>ð3ŸÏùœÏçs>ïó:ï³|Î(¥â€$@B<†„ý'‚þç675êÒÆ» #ÅÛä“H$lÃÛÛ›âççG)uss£”²ýÉÉÉƺ<»¥ôÆÓ§OW©TìR©ÌÏÏ_´h >ÅPèyŸÇŽS làÛàwãëë«ûVbbb̘÷j<Òúà§FÄT¶¿¹÷â“ þ•wÎüE8JÇKGî›ØD[m¶ÄF Ì.b:ëQÏœ·‹0{îh8!„?ñôô$„ܺu«9…óyï½÷œAHNNæöÛüûÅU¶ß¤YC$–‚ ˆÍÁYCë% –õ'„««+·´'Ÿ|’û3l£¦¦ÆØ÷Ë6nÞ¼¹}ûvnùr¹œm”••±/^¬©©A.—GDD=z”Õܬa:¬7k¾‰¦L¨ÚÚZ¦Ð„ŒŒŒú¬æÒ¥K†’mIãªzj†ó¸ƒ¨»èi”óêììÌe;))IKq›—GéСƒ¡œt½Å²ls³Þ©EÉÊÊš5k/¿ !Û¶mk×®Ý[o½õòË/gffæååùûû ‚ðý÷ß8ÐÅg#îž…oèÙvìØñâ‹/j)eë×ÐDA©T6í’¥‚ùÒ0èççWQQѦM›ÚÚÚ;wîXÂh­8ÄF MöÖ¶ˆ’’’ŠŠ + BHQQ‘þ©ðùçŸïµ ‚ÀžY³ÂÒä\f)~Dl´@)AÿR€…ÖDÑQ—³h[­5°ù-Nmþ²‘º† ‚âããc,‡ÊÂQ{ù¼2Òx0ëË´?ºh²ak ¡»aÒŽÂø•.[GÀøX „0‰‹mÀ^¯&(·î«ë¡y,‚RzêÔ)ÛÌûöí‹ŽŽV{QµµµZSA„Î;³ŸR©´™E8뎘q‚bsì8˜þ±µ’œœ\TTĶ‡ ¦P(!K—.%„ÄÇdzýîîîƺiÛ¶mùž!C†°m…BÁ 4ˆ5ý¤2¬Š¡yç†âÑwS ÞǃØÜ;–“#šÿâ/)Müyì;6KhËB¡YÅÔûmu dMö>Ž…zML´Øt‚ Ì;—í—ËåóçÏ÷óó3ñFDDB6mÚÔ§OŸ§Ÿ~Z„9sæ°C·nÝ’HšÕnò¸:š,GÔ£Ž¦ÉPGýrDff&Ë|²\.—ê#FŒèÙ³§Q賓¤„m<ÿüó{öìyã7ø07BÈýû÷ !Ë–-c?³²²ø‰ìËü“'O6/G˜Û_°øÑdÉhl–NÎóÏ?ÿþý>}úôë×ÉdVV–ŽAÍóê3­Ó5*]inåååâŸGŽQ3þ>}ú4g¶€¦Ø}ð“ÉæÌáï¹®®nàÀlª;6=ŽZ°ƒ~ÿý÷mÛ¶5Дs:žPëÝÿ9aÎþýûš4‘’ÕÕ#†^ß!Iàèèhúψ³åüñÇ|»ººÚÕÕ•ÿô÷÷¿wïž80Ÿ0‰÷Áãîë3–5š0‹BöÀæ±cˆ“€“€Ï¿Á’ÀXó-ÿI}Cj›^*•–——³N &eiiiSlª™¯Bÿ¡Ùpc%\^í\­ SØàü6V9¹ÖgãKéÙom*¦£©?M·Ä’RÿFTîö fmaB»#lÁ&ZY` ™ + ¬yƒRš’’"AÀÿj˜Ç~ªë³>uÄô5RÁÖ¤. lɃ6û¬5–b ì«Æܹsõ™ý×ÖÔ±Q¶` uÄd5PGÔ)a Hä€<¬Ês2³|øpÑ¢E,oݺEþìº{÷nBB;K÷gdF¥cÇŽâACsçÎeì¶)¥•••<Œq3yQ»Ÿ#GŽLš4‰§Ë•+WnݺåààÀ/^¼¸  €<>}߸}û6¶¢¢B-B8##ƒÇ,—˽¼¼4‡o™åÙŨT*Ó¿;ó·7 ¤°œ›´k°Û‰vš¹Jc3Ñ\íu + `Iu + KÀàcç ®v†ZµL·AŒâ‘ÛψŒŒ$„8::BØ4lâ˜ôôtAõ7Px‘J + æƒÚX•æ{‘ú,ú¬â…¡5Kø Šy}Æ™x•ÚúÞ¢ñ@IÑ8¡¶Æ¯¶Q§0 + «h¨š´Á‡ÃH8m°`á^¤Éú0KKKýüüô¯>@,¥"·hÑ"BH\\Í´uëVÆÓÓ“O`N)upp` éXµž™ Ì÷óv:v!x‘¶3¾RÚ£GìììÇæ›jjT°óXBI` u + {sKžø Ú /ãÇwssÓzè›o¾ùî»ï¸sªé¥š`|¬Á¤lݺ•}ˆÁÞë_|áçç÷ì³ÏBÆŽ[XXÈ5ŠróæMÒÕÕUŸ1ï¨SXG°C#ÕžÈZêð´¿?Ô)€½ƒmm°€’@¬À¬´Ešar‹õÜ%&HT[PRõiÅ` Ö÷òØœ;w&''SJÝÜÜvîÜÉÂôìÙ3""‚´þä“OØ)Æ S*•”ÒÁƒ³`ûöí㯟Eh5I i¶W¯^ˆˆ` mTVVvêÔ‰²dÉBÈöíÛ;F)MLLä§H¥ÒœœaTT”æ%,5kJ¥>>>|õ_J©ŸŸæææ&—Ë‹‹‹ !555âY + )¥7nÜ`?[´hÁ#çZ~‚h·•JÅC´mÛ–=$6dÈ”””)S¦PJ#""4 ˪­¡É$&&Þ»wOÿh5Ö P(ªªª!¡¡¡;vìÝ»7í³oß>BH~~þÒ¥K !]ºtQKMÔÔÔ6mÚX£5˜X­Àjkk›óœÓ§O¿{÷®µ<¼¹¬Ábï±õËí³†i¥ã›õGÿqxÜÝ&/<­F^5[¯&&ßD4{ † ` ÖšIýÍd> ¦¾ p/šìÙ†S m°`(k1bkŸP©T¬É²eË–¾¾¾cÆŒñòò + cߧvíÚµOŸ>r¹ü—_~!„Œ7ŽÒµkW›OÓW_}•2f̶ìÖôéÓÇŽKéÓ§!dÉ’%cÇŽeIÔ·o_žPìÜ¡C‡þ÷¿ÿ}úé§ÍST ×,³uú ¬GÇÓÓ³²²’ïT(R©tÛ¶m#FŒpuu%„°%£***æÌ™óᇠ+ ‚PYYéééiz¿AG{ƒŽ‚¶i~ÃþýûA;vlhhhïÞ½Ÿþù_~ùeàÀ,À¦M›nÞ¼ùÞ{ï‘?§´òòò*//'„(•J©TJšÑd§ù8ú?E£­!,,ìÚµkZ5jÒ5¶ùÇ,^¤þOÑè’¢>S Nº´‚Ñ.u + `“Ö £c“­;ËHJJÒÿDÛ@óïܹÓäÚGc¯e6m`·rìØ1ñN™L–àííÍ~VWW³ VÈÌÌäçvéÒ¥¬¬ìúõëVýîår¹ø­ˆ_[gŒˆÆ…”””Bbcÿ·ðвeËjkkyrÝ¿Ÿ×6¯\¹BáãÇbcc³²²Ø%.]ºdú|ÕĦQ°é:…ÉhNBb–wì‹|í0uèùK/½¤O .´Ak ”ÚªA‚À>)¸yó&s8aaab/m\¼x‘²zõꬬ,f.Ìÿ`^ÂÑ£G¹ãyóæMñ·æ|Æzý†æ”Í–WÊÀohžßÐ$aø_Òëhi<”eûÙ?㎹ÕqìlÁ‚S§Nm8;;oÛ¶M„èèèúˆÎ;‹=|ø0 **jÊ”)ÿùÏXU|ݺu„)S¦¬[·ŽEÈ*–6â7X†6—N:mØ°Â6$ɸqãºuëÆ ø Óß~û-7þù%k† V©T—.]š5kÖÌ™3Ù!öQZ^^^TT‹}Ûh ~ƒÙs°Žò~ƒ‘ý†F½Qד‘‘1lØ°{öLÖÜXCß`HXïÆöíÛ7mÚ$ÂöíÛ¬Í ‚ð׿þÕÇÇçí·ßn°¢o˜^™ S§øæ›o†οãÓ'Có0S¦Li0 ÛNNN^³fÍÿûÿOó(LÁR¬áÌ™3 ,PËÇNNNr¹Ü°/ì‹/¾0RBvE5š<Á}LG“–VÍ-)Xæ¢E‹þýï³=#GŽ$„±ñ}:¸uë–åäE£~ÞØŒ-p¬IXõI¡PB^ýuµ¶îsëêêx§0«•Íž=ûÃ?$¢Q¹ØÈåò-Ì’•_ÿ\n®Å2Ì<%‘ØRRR”J¥Ö–fŽŽŽuuuÖh + üY,|M”fXƒ¡›(XÃœ¬ÔÄÞ®…WYͤ –Ú› —ËœœLÙàÑ4ïÕHƒQ²ÁÚŒ#""Îœ9£vèÒ¥Kâm|Ô«R±jAÄaŒçÀ«D³Ø>h?gC-Ó¦©ßk–±ÑÚµçúõë¡¡¡úÇc¦ hƒe±xñâôôôÔÔÔwß}÷Ì™3làÌ‹/¾8oÞ<ãæhCcµ¡9ž„m(((W»PTT”››[aa¡ÚL{ÐSÀƱñ!íbW@<| „7 j¦Àü‰ .ääähNºm°/¿¡±ñDþ¬ašþë 3Õø-ÑRßül¤&Ö¼³Ü!CuYÁoMÖ`¹Â@L>ÊÖ` ÖàÍ‚`bŸÖ` Ö` @_Ðúdû³TéÿŠa m¦&~;()¬À¬Àì©.`¨š¬À¬À€¾HÌ~Ø0lšÀæ?¸ÁïÚ,Òš`éºOQ›3Êæ+™6¨ lB—£G._¾|÷îÝlâÆÝ»w.\¸@)õ÷÷g;çÍ›3räHžvžžž3fÌGÈIOO'„°˜ÃÂÂغƒ„­[·ž={ÖŒo­%É>Á^¹r%?Ô±cGö\<Œqïü¨åöz(¥iiiûöíã ÁÂdffJ¥RJiÏž=ŧ³íÁƒ«=—8B~¨®®ŽÅ,·ñ´ &~pBHdd¤øYFÍ·ùìXâ0š÷iÛ¶8m¸sçέ[·~øá‡W^yÅÃÃcòäÉ”ÒvíÚ1Ÿ«_¿~®®®Ó¦Mûå—_ø¬‘ŒÏ>ûŒÏ + E)}â‰'Ärƒ`3±˜-ZäææÆ‚mØ°!;;Û\O}ùòeñtzíÚµãÛšaŒåØš½@åO¸k×®!C†49ž”––²éì°NaÁd ¨aÂl.çú¾—á7šg¨«<)Ä6*¶hƒö€Ö'kE‚$° + žb›¦AÇÖ@ˆ& 7øÜ+qöÏ‘3°SW)­÷sø MÄŒKų)ë6oÞœžžîââ">Äfq÷ðð „L˜0¡±v kPÏÓ§Nbóòùñ===ÕBFFF†……7N¡PšX Î;çââ2eÊ”I“&ÕÔÔð ŽÉŸ³WUUÕÔÔlÙ²…4rªvXƒ:kÖ¬yçw!*•Šía=‡*•ÊËË‹í9þ}úh|L3X§ êM÷>ýôS­Î„ƒƒCEEÅ£T“HlòûUhƒÕ”bÍÚ`#µöhÀ Ó<-XøRD()LDÓ&„†5زiÔe3a Vi¶ + ü}1ø¨ 4,h€5XÐ fÐk°ks»hÁn=k[Ö†Ö­[óm6mƒþáQô5m`34hn7Ú`)úGQ(l¡jµÙ<ØÈOJiFFFAAA}³y°?Ø6‹PíBõÍ%bïXÚÜ.”Òòòr6Ò—RZZZšžž¾wï^f÷îÝ_~ù%!äÀjÖpâÄ þ³´´T¡æD0ýû÷g{6lØ o ib.,¨¤ÐGÌ”ƒ”;v«Ô£ÝÌió Ù…i·³yÀ‹°k°k¨aÂí¯¯®k¥ŸdA¬¡žœÍF¾nÝ:ö¦¿ýö[>¥¹kÆ5<ÆíÛ· !îîî:thÕªÕ§Ÿ~:bÄBH·nÝÄóý´iÓ†PSSCùꫯ:vìh–i£{‘VÔ2:…Mü°`ÛstÀo°k¶S§Ðk°k°€:Ò€4㞀] D›¼€¼+-@P&#IM` ͹J}çp&8x ÔËòåË•JåîÝ»‰h¡ö£Gúûû‹) + 6o³X¦ÃÂÂîÞ½[^^ž0~üø .°AAAþþþiii<ä©S§æÍ›§T*cbb!#GŽ¬­­U›Jôرcžžž2™lÆŒõÝáÇ !‹/Æ‹3€lkÑÕªŸ4m_­ŽØ¾}ûØ$¼„èèhJi¯^½X®"„äææªÅ&BffæÙ³gÙ—í”ÒôìÙ“e{ñUÄÉÉÉìçàÁƒµÎú¬v®Úmh}"¼åF[…þV<`À•JåààÀv~ðÁIIIâC„«W¯^¾|Y-6J©D"yæ™g!ׯ_9räÑ£GYvß7nÜpuue?ËËË™RJ£¢¢ ¦—†#GŽ\¹reÒ¤I·nÝ"„ìÝ»Wë!J©ƒƒCXXóóY˜Å‹Ëåò‚‚///BHJJ + ËsæÌ©O![·n½}ûvRR’XØÝVTT0K¨ï! ¦–¹\ž˜˜8tèPösæÌ™”ÒË—/k*))™5k–86©T'‘Hx=Rš™™¹råJ¹\îêêªYpÕ8xð`xx8¤ÁÄÒ°k×.3ºP©TÛ·oïô÷÷‡_iAÒзoߢ¢"s™È¦M›<==ûõ맻²ƒipi°íŠ3hô + %è¡°C¬wŠSÀ1ø”bê—ôÁOV™0eûaò¹o"„ ói@`‰ÄFc¬±ýÒè//í¢• š„ܹ]¬;@LG$’)0×r-ð€vZ… G + £SUUÅFLܼyÓÛÛ»¤¤¤¸¸ø¿ÿý¯ ./ðlƒŽ;®Y³F©T~õÕW&¸\·nÝŽ=ZWWÇì‡R²~ýúB IÏž=÷íÛGiÓ¦MyyyPPPHHÈ’%K~ýõWòø + ¤ÁÁÁ×®]5jÔ–-[‚‚‚Ο?/“É|||:wî¬øµ×^[´hQ§N>ýôÓ²²2WW×K—.µk׎xå•WÖ®]‹|eíxyy:uêÕW_•H$cÆŒa/·²²ÒÙÙùÒ¥KmÛ¶U3 Í¿<°Ø<4ÿ2‹"„;v¬[·nýúõcÆóóó_~ùå={ö ­Áœ>}:11‘òÙgŸ¹¹¹QJ ´ÿþÐÐÐvíÚÕÕÕñ%%%aaaÛ·oÿúë¯'Nœýæ›o–••=xð@3ðªU«(¥)))¯½öZ~~~ïÞ½³³³322ú÷ïOquu7o^JJ + r—US^^Þ­[·ãÇ·oß>???99Y*•®^½º¶¶6$$$;;{̘1Ÿ~úéêÕ«§L™2lØ0BH```uu5!D307I“& ‚À>[!D*•Þ¹sçóÏ?ŽŽvuuÍÍÍe_£Û“Í7Ô‡fHK£AM(fHÓ g3¤Á_š!€¥AG§@eeåõë×›mfffƒ—X°`^ªUðþûï7íijgÏZæ]¿~M?g×Ò ˆÈÍÍ%„¬_¿žÍ±#SPP v¢««khhhFFÆ÷ßÏ&wb(•J¾½eË–3fðù%† ¢a§NjkksssýüüŠ‹‹ !ï¼ó›k ˜€‹/2¸xñâ®]»‚‚‚!ÅÅÅj½nÝ:'''± K$’yóæõêÕK.—ÇÆÆòŽŽŽbû©©©GÈ.ñÔSOñ9«V­š;w.!äÚµk|ðÖCšð&íƒFDD‚pçν{÷òkñCü)òóó‹ŠŠºwï®ù\¡¡¡ÎÎÎ6ór›Û ɧúÒ“iÓ¦-[¶¬   ´´´OŸ>zÊþ—˜7oÞüùó›;–ÍzÐœv/Jé{ï½wèСøøøTVVÚ@^’Éd³gÏ^µj•a£5W3$z( è¡°hÌ% ×@üdâœ#ø&Zë3 !OP·KøþûïÏ›7Ï”þþþxAÄ + z(|(¥‚o"^•…·5h¶,ðj?¯ßñV­ëUY{ ¬¦­ÁĺðX9ßÁž*¬=bþüùÖÞX`/m fÑèƒF„–îr7éaÑÖ€¶[¯P”íWûgw^ƒO‚îa4# IDATuÉ™þìرCw€ŒŒŒýû÷óŸØFuuuVVV}êÆ°o¢ x‡}ûöE[€@4×Ó!ÚV©å{¶oß~æÌBHRR;ôöÛokíiNJJêÕ«?ùA¾¾¾¬Ã»¶¶VøÀ<ÌÖ­[Ù7¾uuu‰D­iC"‘ðCüÆ6mÚÄ•…ß*¿C¶”&Úlz‚#+/õ¬bØv…â×_íÑ£GNLIIùꫯÊÊÊuÖíÛ·[µjeŸ + ‰­åRÌÝfZ÷llÌ5×–Äž-›Rêìì¼~ýú &„„„ 0`Ó¦M|¯ô&%%±Àšð­[·...fS±Óù!¶gÚ´i]»v ¹qãFttt«V­&Ož<~üxòçÄAjgÁd­6¡®m§€åJC—.]N:¥™™ ¹¿¿ÿ·ß~Ëꜿýö«…æåå‰÷ðJ¯‹‹K‡´ÞÃýû÷Ù!vº¸¾ÍöüòË/uuuÏ>û,!äÊ•+………?ÿüó_|Á<[~°.]àãµlXÌÔÖðx…‚å·àà`™LöÓO?=óÌ3|'ÿ[VVæããC)íׯßÛo¿Ý§O¶Ÿ}4¡×ý£­Á m v® ––t¶2®A›4¨ýÔý·^?ÒÐli°ê Fš]M,Jl¥òO¤RiPPL&ïd©¯û¯8dcÙ±c뚢”lÞ¼Ù××w„ ·nÝâßÛ/^¼ØÙÙÙÑÑqúôé¬àçŸfJ´`ÁÿÜÜÜ^½zñVµCS§NåM (iMŸCŒ$yç¨f̶êp™Y + …Ùl(&†Â挨®®¾zõªxúÐÙ³g ‚ðóÏ?ó6^DìرÃÛÛ{Ú´iëׯç­j‡žxâ ÞÄlL ìŒk@…¦*¦¬_X Œ†M)ñÏ+Vêsbƒs·a=!T(Ì•;D¦ÿ„D„±cÇŽ92))éàÁƒS§N½råŠx†NÆ믿.öSòóó}||ÆŒ“}íÚµmÛ¶ñOªŸzê©]»vM:µ¤¤„G(Buuµ‹‹ ‹Y|:?¤aÑÚ¸/Æž*vR¤£BÑȬhÒ€ + ÆeïÞ½-[¶tvvþøãÏ;×®]»+W®üå/aG•J¥ŽZ?Äæ:@…ØQCƒmOʼ}ùå—gÍšåîî^TTäïï_SSÃü¹çžÛ³gÏòåË:ôí·ßº»»×ÖÖ²C³fÍzï½÷!ÿú׿~üñÇçž{Ϊ»®á5]ðÉ×ø4j\ø>+¼ÚDïâ©Öxqªc67K`þüù×®]ûôÓO !2™ÌÏÏRÊæ‰ëÛ·onnîßþö·œœœçŸ^©T^¼x155uÉ’%„œœœ6mÚœù„­˜Æ/7lØ°øøx¥RÉ¢"„ n¹‰ILL<|øpqqqAAA×®]-á–ì¼BÁŸ½GÙÙÙFML ©P@ÐCi°¬Ä´i@ç%° mB^úæ™ñ†Ï‘3M>ÚL¢I ¤A_°Ê#j ‡i@Mm  =[øtc¨î‰f¶eBÀ#Ô–‡·4A@k1*X=ŸèVYYÙ¡C‡öíÛ“?{ˆÅgéˆÒ< ÒŒnÙ ºƒ©í™5k–‹‹‹‡‡Ç?ü Õdë³`£ºYàŸ»téòÛo¿={ö¹çžS{À\¾|™R:þ|i+>E¥R ¯˜™×_m¨T*GGGfšwîܩψ׮][[[Û¶mÛþýû‹ÃtïÞ=/ïÑ(£œœœèèèòòògžy†ØÁ€ÔÙ³g/Z´hñâÅo¼ñwØÆ©S§îܹSZZ:~üxÍËÊÊØFÛ¶m7lØPQQÁ>x‘H5Ü¿äÈ‘}ô‘áË ”F%Vk[®{ûöíÀÀÀÈÈÈ>ú¨ªªêïÿ{mmíõë×úˆRú—¿ü¥¨¨ˆŸ›““Ãüßÿý_Û¶mùYÆ 5jÔ°aÃ4¯rüøqösîܹ+W®çOJé¡C‡øµÞáÇ !ÿú׿4^ºt‰ûÏþöϜ9CD³›Š£0}{Gw™©6I!›Â°k×®ZQJù|žœåË—gdd°7n”H$⬨y¹Áƒ³Ÿ£GV“ñ†Ž;¬ïAÄ™ÆéxXÍ”©Øh†lµ‰Ïë›ÿ›ÔßœùÏþS-@ƒìo»ví´*—ÖëÖwZƒ5! °;ˇ÷ˆ<€Ö€¶¼½½Ì2`í`.)x HÒ€4,ŒkÿÃ’óÐZ ¯i¶B—.]ôÙ‰f`Ý‚À²ñðáÃÙ‡‚ lÞ¼yÙ²e<‡§¥¥)•J¶““C öññ9yò$‹„íä#¯ËËËÙþ~ýú:tˆï÷ÝwYübù€ˆ˜Ù0ä •X­m ‚ ,^¼xöìÙ,ÓnÚ´éóÏ??pà?Ê¿ÅÿŸ®5€f`¾Í6®\¹Ò¯_¿k×®iF¨ã5aȤÒ`"i°®×i@…` + Ðy þÇ™ó–{oðìà5 HÒ°bÐy €×€4 HÀÈ ¯i@¤i@€ à€íOëŽq}ð€i*VêXÂ]^°)ÁmÎU´žûþû0êk‡ÁˆíѬö½kÞ¹\.÷ññ‘Éd°x Àˆ‚põêÕÊÊʈˆˆÍ›7—••ñ(>Ô©S'þ­·ÞZ²d dûöíuuuÇŽã&&&² ñßS§NI¥Ò›7o²ås !'Nœ ”RJ£¢¢xlÇŽKOO¿uë–ø>Å·A‘J¥UUUx}†±Žõ:– 9èx#qqqÁÁÁ P©Tlç|””$>D¹zõêåË—Õb£”J$’gžy†rýúõ‘#G=z”…agq¸qㆫ«+ûY^^ž––Æö‹¥ý\»ví¡C‡´Þa}†„WÜ«hÐD¬KÝ€a¥¡mÛ¶*•êÆ<OŸ>]ë!vtÈ!âH† ¢T*SRR!S¦LÉÏϧ”*ŠˆˆˆE‹©ù⟃ Ò* Ì/¨««Óq‡°Iß¿|ùr¥R¹{÷n¶ÓÅÅ…rôèQñ!…B‘žž®ö’ÂÂÂîÞ½[^^ž0~üø .°AAAþþþiii<ð©S§æÍ›§T*cbb!#GŽ¬­­Õ­\x‹Æ“¹\ž˜˜8tèPösæÌ™”ÒË—/k*))™5k–86©T'‘HØNA(¥™™™+W®”Ëå®®®õIƒJ¥:xð`xx¸¦48::feemܸ±¾;„4˜A’““ùk.**Ú¹s'?*>äææF)ݹsç°aÃx$ + …¢gÏžÞÞÞ¬BÈßâÒ¥K?ùä???±q 6,>>^©T²¨!ƒ†4˜E:vì¨P(z÷î]UUåééÉö‡††ª5jÔáÇ !UUUûöícç:::æçç+Š¥K—ò8»té¦é&ˆzxxÈd²ÔÔTJi›6mÄG)¥:îÒ`iØ·o_yy9ûM)íÕ««ŠBrssÕb!33óìÙ³R©”Å9`À€ž={2@Ó8ØFrr2¤Á,Òзoߢ¢"sÕ7mÚäééÙ¯_?Í– T9-Q(¥R©”RêããÃ~VWW³Þ#ñ!??¿ŠŠ + Jijj*dæÌ™nnnñññr¹œR\\¬P(؉555õICPP‹Y\¡Å‹74ÔÖÖúúúšK¦OŸþàÁƒ»wï²J%ÇßßÒ`‰ÒpäÈ‘+W®Lš4‰õíÝ»Wë!J©ƒƒsYõ’²xñb¹\^PPàååEIIIáÎÂœ9sê“BÈÖ­[oß¾””i0q…ÂV»á€ž4<ä‰jXb2>\\\\PPеkW yÂ' Š³”q »ví2ãí8p@¥Rmß¾e¼`Ê\€Ò€œ94°nb£ ¿ÖJ´ >Ë}ð“õ=DÙ~¼Èÿá“€4ð¤i@¤Ø±ÑÒ<¢ñ ÛÙúˆA¬rܗɵãÓMcyçÌ“Îð€%«W¾ƒt€×ÀcäœU° sYÀìÀk@% ŽŽŽ÷ïß'„tìØqÍš5J¥ò«¯¾2Áu»uë†wlܼyÓÛÛ»¤¤¤¸¸ø¿ÿý¯ ®Èæ.qwwgÓ²ùPm~:,3HƒJ¥jѢņ úöíûꫯJ$’1cÆŒ3fÉ’%iiicÇŽeé>}útAÆŽËÞ }úôaÛšÇÇõíÛwÏž=l»k×®ÞÞÞ}úôéÙ³'!„-©¬6mÚ”——…„„Œ9R„ªª*þÆ[¶lìëëÛ­[·1cÆÌ;×ËËkàÀaaa*•J-07¹\îààðË/¿tïÞ]Í¢²³³Ÿ{î9BˆL& $„”——Û[š«ÏòÔp¿]“:/Ùü±^^^·nÝrssשּׁ¬ô÷÷?{öl¿~ýnܸÁvÖ÷—þÛßþöûï¿×ìµ×^ ~óÍ7ù¼µ»U«î¼lü jÂ,O&ÇÎ;¯X±¢Gâ7œ={öìAƒ½ùæ› nß¾½f`fŸþù?ÿùϤ¤¤   ¼¼<±E½òÊ+O=õTJJ + ¿® ÇñÅÿøã“æOý:/ñ:L! §OŸ>|øï¿ÿ±víÚ„„ñûNNNþë_ÿzõêU''§nݺ}ôÑG»víò÷÷ÏÈÈxçwrssÅ/•vvvž7o[…Ql7lÛÛÛûÒ¥KÛ“OOÏ»wﺸ¸h-är¹““¥tîܹ:t˜6mšf`f‘‘‘÷îÝsrr"„Ì™3GlQ~~~7nÜðôôdáüñÇŸ~ú©´´444tÞ¼yv" ¦è¼\³fÍüùó !—/_îÖ­[bbbûöíóóó“““¥RéêÕ«§L™’ýæ›oNœ8qË–-ãÇ߸qãéÓ§««« !šwìØÑ¿BȤI“Aˆ‰‰ÉËËcW¬¨¨`~ [X;Ÿ}ö[ÊlРA………­Zµj×®[ùR öÆAxóÍ7Ç7hÐ ÍÀÌ< + CBBjjjNŸ>½eË5‹jß¾ý;w’““¦M›¶fÍGGG» ¶\¡ ¼wïÞôéÓÿýï7A/år¹éó6¼ ôô§´´4$$„'¶?mÕk`­»MãpAðóó³]0/×€4 HÒ°1ixÿý÷›vâÙ³g sýúõ‡â¥Z:¾8¨¬¬¼~ýzÓ¢ÍÌÌÔç¦gÁ‚†&šÈÂ… µ&›6mÚ;wúöí«#’§žzªÁ …††®\¹Ò<ÙÀ7ù_ ÝÏkÖ¬ ÕÜŸ””TVV¦ûŠC† Ñç Þó¨Q£ ÛÍùÎ;ïØ’:4E.^¼(‚ /^ܵkWPP!¤¸¸XÍJÖ­[ÇF¡r˜.ôêÕK.—ÇÆÆòýëׯ8xð {m555âù%4#\µjÕܹs !×®]ûàƒ!³fÍ2K:Úçœqü+8ArssÙ«äƒYøÑ‚‚µSSS !ßÿ½J¥âû·oßξq$„lÙ²eÆŒ®hŒbÐb ò lì&@´» Öâ8`\‡õö‹‡°n­C‘‘‘;wîTÛÉÆ>``‚ÙLºÑ—&ÌlM‹F>=±•ÎK6öÏ?ÞXwÆB&4ß/³žq f2q WŒk6& ËÍi}TƒG¨Õµ6¬MÀQhkh8§YKW…SÀBž76Z@>4X eûÙ?Aø¶½•¢¢ºÚ‹/ÊKo‚°ÿþo¿ý6!!A¶¬Q}Ÿíûøø°ð………ÎÎÎ|öC‡ÙíüÔ( uh–×ðÄO°œÌú£¢¢XÃaxx8Ëä|ÏĉÈŸqß»woÏž=ŽŽŽõÅœ0|øðýû÷BØß7Brrr$ ëì`—`S<$$$ÄÅÅÕÖÖB233vïÞžž>eÊ”¸¸¸¨¨(www~H|cëׯwuuU©T|¿ÃÞ½{³¾ bgká‹n†äm†¸%c·57õ^LÛ ÉŒc Ïò ÍCW®\ÉÉÉ3f äË/¿¼{÷îk¯½FD} + lÃÑÑQ&“1€ª®®vuu•H$¼‡ò±$¢´uëÖìóGGÇšš©TªR©¸ú°ø!ñ=B6mÚ4eÊ~óww÷ªª*3¾z|^,ÔwÐí5\¸pòÒK/}òÉ'lŽ£Gfdd°!¬"Àö,\¸ð¥—^bg9::>xð 33³¸¸x̘1lÂØØX¾‘‘‘Ìc`™ˆœ9sF"‘œ?ž—ä>>>l|Ô•+W|||fÏž‘‘’——·k×.~«mÛ¶%„°Cl»±Õ«W;88°Ú + ÛÃï²yófx ð,=?l³ÝÎKJé;wؼ>Mñ¼ÃÙÙÙÝ»w7¯Ã¯X(–ÓC!BÓt4µwÙ¼º`^Ì0®¡Qx£Þ(ƃúJ-{s°! vP‰„Ÿ~ú©¼¼|øðáƈÜƆ ÆFkñiõñrUc§ + Ö1Æ»Óx÷ß#Îê¬[Ž÷Æq²²²ØôÇüt~ˆï‰íÔ©Ó¥K—xGïÓ<˺¼T²l¼5}3¤ñZuÜ¿ø¢¼cŒw§ñî«ž={ªu°iöÆýÏãú³Ÿ>yòdÞcÇö„„„(ŠÁƒ‹;êÄ9;K¯Ç3S3¤V¯ÁÎu½bËI;j†ìÒ¥‹ñ*·¼cŒw§ñî+qƒwˉ{ãË–-[±bÅòåËùé¼ïï0`À‹/¾HáuäÏŽ1qŸ¼+Bë§èð ï5ˆÇºÈd²û÷ïß»w/..N3é¬Æëé5˜77·àà`Í)Cš¼ +Ÿ-Çq°}¯á_ÿúWHH_ØŠ¹ ß}÷Ý /¼pïÞ=&Õ‚ lÞ¼yÙ²e,@EE…%[’L&3Œ.Àk°$—AsÛö° Š?þøã¹çž[½zõœ9sÄûÇWZZÊ–´Z½zõ°aÃ&OžìææöÆoB¼¼¼`¯†- búÎ6ìRY4VTTðq¬|ÿÝ»w™¸»»³oiØt]ÀØ£5ÕÁØUë\MKj8X”4‚˜˜ÈÆ®sòóóÛ·o¿aÃBÈäÉ“CBBAˆ‹‹kεrss“““¡¶'jÆózb£­ØjbšSZ·níèèÈ>Œ!„”””PJ?.‘HÄÀnnnr¹<55•ýܺu+¥ôôéÓ¤k¨wîÜyÎœ9üûÜððð7ŠÅ‚ÃËÇ#h~eÌG(hâÃ]mFòÎQþOüm †‡}?kF‡9&&¦¦¦†ü¹(»¸ÛòÒ¥KlÉæòòòÿûß, Ëÿ—.]bã”x<š‡/^¬P(:t耼j–÷kQƒ ÖT)eľϽsçß#Ö¶mÛ?þø#33³uëÖcÆŒ9uê}e|ûöí¤¤$GGÇ{÷î=óÌ3j‡† æèèÈDa†U¨¤Á:ì†m :ôÎ;õULØBŸþ¹Ž¨êêê¸Ó!ÆÕÕ•ª"v06ÆÒD_Ü:u°&i ~2Òšº¯ÕÌüŒ3*~}Jæk@@³a›ŠËd6KZƒ¥tff¦>1‹¨Yøp ñy·YßPˆü………]»v­ÁfTþ¥©>m¦lyÑö4“Ý’‘Ú>00)k×®e#ÍøzÓ111|]µ•#ø_ŠZs±lBˆÚÖ„-[¶Ì˜1ƒÇÌO燴ÆcØF + Ó€ + ° À†–‘?ùJJJx–Ö‘ÓØRÔâŲ9%%%â !&LX±bY¼’5;$ŽgéÒ¥x/¨P3W(,ÔÔTýÕAÏ + ELG˪à B@£1»×p÷î݇ÚCRCxŒ:::Ñœ¼L Õ¬%1ºwï¾{÷nBH||üüaí£`! üÐÐЭ[·ÖÕÕñ6^xûí·Ù¬¢¾¾¾555¡¡¡lΡO?ý´ÿþ)))GŽ4h!äàÁƒl,¬U¹’À€þÞ¾}Û†‡~:´eË–R©ôÞ½{ìÓÛªª*©TúÙgŸ988ÔÕÕ±ÜîêêÊ»l×®]»uëÖ¨¨¨O>ù„ÇÃ>ÛC…Ø ·nݲí\¹r%¥tâĉ-Z´øüóÏGŒñÙgŸ%''¿úê«sæÌ9þ<ÿ4†{'OžŒŠŠâ1ÔÕÕ…‡‡oÞ¼yÈ!`›têÔ©¶¶677W< ¡90Asôx„‚Z„–ù¼üñDZcÇêêêêêê~úé§õë×O:5==)ÅÈ‘#»ví:eÊøáÇ999j1Èåòððð#GŽ¬[·.%%Ūß>* ^œ)¥íÚµ#õÌ}Æ6&L˜0a„ââbµö9ñ…[·nyyy‰#´@‚ƒƒ™S°iÓ&Bȯ¿þJILL$„\»vMóÙŸ~úiq:° òìÙ³Öþö1®Áæ°éq 3nŒk@…`Ü + …à›ˆD±j0s 0¼4Àª€‚_ôò°™¬¢gÅ“ÄAò‰a`S<ØvZ¡€Fcó/@0…Ë@¬|}PH†wÔ6 Àetü„4`ï.ƒÍ;šè2ضã€ÎKýŒ‚4 /v5è + ¤i@¤i@€!`>H€ÉmƒgdH + ¤i@¤i@€uƒicQÀàO¶Kû IDATë&c!”! ÀÆM B€4 HÒ€4 HÒ°y0CzõÅfF7šý[EJÂk@ŒŠ«««L&ëÒ¥ ¤õj ºŠÖsßÿ}JiBBûyêÔ)[ªýZ¹¹¹ÿøÇ?~ÿýw›|:¬^e­Í”RÍ;—Ëå>>>2™LGÓ™ X®i*Mšœ¼h†´z¯! àêÕ«•••›7o.++ã9P|¨S§N,ü[o½µdÉÉöíÛëêêŽ;Æ#LLLd⿧N’J¥7oÞÌÉÉa'ž8q‚RJ)ŠŠâ±;v,==ýÖ­[âûß!D*•VUU‰xzzÊd²3fhÖ¼=BHddäÍ›7«««ho/ýáÇâd§”¥¦¦¦¤¤(•Ê¡C‡ª½žnj'ªý´â<`ç膸¸¸ààà¨T*¶óƒ>HJJ"„\½zõòåËj±QJ%É3ÏÒ >‘ÿ„4Ø 4ÈåòÄÄDæIBfÎœI)½|ù²æ¡’’’Y³f‰c“J¥qqq‰„íduïÌÌÌ•+WÊårWW×ú¤A¥R]TTôüóÏBnß¾-—Ë! Àœ…^QQQ¿~ýºwïîààÀVÇÈËËsuuU›;³gÏžiii-[¶|XWW׺ukoooq°ãÇ?ùä“l;33óüùó>>>âEL%‰Q ³<¡éû1µà•••|'[ðêÕW_]±bßÓ¹sç´´4Vîر#))‰òÙgŸ7Žhð¯B¡H$|:IñQ}^Sl´` ³<‰'PR»yA***¼¼¼(¥Û·oÿþûï)¥/¼ð¨Q£öïßÿñǦ¥¥ñŸ3gŽƒƒC~~þÎ;ËËË}||ªªª²³³X€ 6üøãëׯoÑ¢…fr ‚ uÈ“þ³sæL=£j¬©À´¬>_ tHÃ/¿ü2pà@þ377÷ĉZ½øâ‹”ÒœœµxX€ððpJiyyù‰'Ö¯_Ÿ@4›ç?'Ož\Ÿ4<ù䓬@ëmhJƒæFïÞ½µÓ¤Òiø_n9}ú4¥´¬¬ŒRêââH)}çw4±š9¥´]»vì\¶S| Jijj*+´Õ´@üsÛ¶m”Ræ_DFFŠ2ÂÂÂê»CÝ1ó ¹\΢Zºt)Û9nܸú¢‚4Ø'h+ÒÒ )•J«««%‰ÙëznnnÕÕÕÍib4W + š!Ñ iƒÈåò 6˜ëêÌ_ ”ÖÖÖr]ÀÔE&¤ßPÀkð@SÁGÙ$ïü^½8sÞ¸á›Ll4*/ð¤i@¤i@x ”0ìpcƒ\6Ù°k¯i@`h®¦§u}=Ì©e- ú20¥T&“¹»»«µ)jÜM´/‚L&»ÿþ½{÷4§Þ×}E'ÛÀüqð€…2zôè_ýuúôéìg¿~ý:$.ó³³³ ¿þúëgŸ}V|â¿þõ¯ØØX±Ê|÷Ýw/¼ð½{÷ÈŸScoÞ¼yÙ²e,@EEÜâŠh3zÅâÎKAîݻ׫W¯‹/ªT*^Œ;;;×ÔÔ888°•2^xá…sçÎݸqƒ())yî¹çŠŠŠæÌ™ÃVñcûÝÜÜJKK]\\AX¹reVVÖ·ß~ëææ&“ÉÔÜ„ú¼¯ ³<¡BLG‹-Ο?¿lÙ²7Þxƒï¬­­%„888( + //¯k×®Š]‰   ÂŠŠŠqlAAAwïÞõòò"„¸»»—••Bd2uåÊ•ˆˆ¤<*ÀÒùúë¯ÿùÏ²í¢¢¢€€êêê;wzxx9r¤uëÖÓ¦MsttK€ ‰‰‰<G•ŸŸß¾}{¶ºÇäÉ“CBBAˆ‹‹ã.\¸0nÜ8‰D²jÕ*¤<*¨PXh…º^*ð€ù@3$U/-x<– 4ä=€ + Ò€4 HÒ€4¤Pø.¯i@¤i@¤iØ( Ô'§p§p§Nà4À€HAÖfê&- €Óá«{-–¦M‹Ø ­[·&„ܼySŸÀ®®®k×®5jTMMŸŸR˜] VÁi€ÓìEôÎìÌPmCÌõ,ºî… ¢¢¢Æ·wïÞÒÒRh€ÓáÕ8 ÀÄNƒþ¡!À`L qž¸p1b}œ'NBâããÙÏ#F°‘‘‘”ÒŒŒ gB>úè#¶'>>þ/ù‹L&+**òððм“œœµHþïÿþÒ¶m[ö³U«V„… ²ŸÃ† #„Œ5Šo«= û¹gÏqœÇgGSRR(¥J¥rîܹC‡]¹r% U_*:tHÕðáõ&©ŽÔxøð!pÑ¢E0?`) •&ëˆ-i¢%¼ŒM33ˆO\\\=ÄG-ZD)U(-[¶tpp¸víÚýû÷uŸEILLä7¶wïÞú*Ù[·n¥”nÙ²%&&FíЖ-[(¥«W¯öôôT*•”ÒììlBHAAÁÉ“'µ> ûéïïÿ¨FåàÀphôèÑìèàÁƒt¤R)ûL)­¬¬ll6J‘`ÆÀZap€}: ¿üò ¥tàÀ¬hW;š››ËêÍ6l ”víÚUŸ³^|ñE~c999IÓÉ,_¾œ7cBÂÃÃÙé7n,//—H$'Nœ ”®_¿žRš ÃiÐú°ÜE˜ÁÚ}Y¸ø‘»ðBÒ$¶µ1°+ÐÒ»t¢££AØ·oß#“É–-[Ö­[7oooAœœœ‚‚‚^yåÛxÞÜÜÜ 6ÀŽ°ìApòóóÙÏîÝ» ‚°{÷n >>^„?þø#77W„€€ aÓ`¹=zôüùó¡¡¡ýúõ#„(Š§Ÿ~ÚÛÛ»GG-//§”Êåò’’’´´4•Jµ~ýú§Ÿ~ÚÉÉÉÛÛ{ܸq¥¥¥,ž””AÞ}÷ÝñãÇ»»»Ÿ:ujÞ¼yþþþîîî_|ñ!$##C„þýû¯X±"((ÈÛÛ›í'„4ó‡~øÆo´lÙÒÍÍmÕªUìPMMÍ»ï¾*‘HbccÏœ9Óà)#FŒèܹóÔ©Saǘûœ§žzꫯ¾ºxñâ‘#G‚ƒƒ Äúè#ö³gÏž„#GŽh†dµóqãƱŸ2™ŒâááA)U*•nnn„ýû÷SJããã !óæÍ£”Ο?Ÿòúë¯SJH™:uªJ¥zøð!!D=cþî»ï(¥ëׯ'„Œ=šRºlÙ2BÈСC)¥ + …‚âää¤ûJiZZ!äå—_6vÂ"›ÓhŽUco‚“ššJyï½÷øcΚ5‹òã?VWWK$BHqq1µi!y稡þYEît ‚ 4ÿë|Á7Ñ4¥Ž\.÷ððP(÷ïß÷óó#„8::ªTªêêjµÀNNN + …¢²²ÒÃÃrøðáÞ½{wéÒåäÉ“_ýõèÑ£‡úý÷ßß¾};00ÐÛÛûÁƒ‚ DDDäåå;99UUUI$’3gÎÄÆÆÆÇÇ8p Á˜“’’¾ûî;BHïÞ½>¼wïÞH¥R¥R)¾Ã¨¨¨ .è8…Ò£Gììì£GvíÚÕ¨ikK–œƒA0ÍÆØhÁVÝP{œ–-[Þ»w¯¨¨¨uëÖ„ººº-Z´lÙòÊ•+iii¯¾úê!CvîÜiãÙÓ Ç*r‡ítOlÛ¶M¡PŒ5Šy „Õ«W³Ì°oß>™LV[[{îܹ?þøÒ¥KÇ'„|ùå—UUU‹-êÝ»÷èÑ£?NÙ²e !dÒ¤I„O?ý”2qâDA~ýõׂ‚‚§Ÿ~:&&fÓ¦M„!C†¨Tª={ötíÚõoûÛO?ýDi0æ &B®]»vøðáV­Z±Ü8jÔ(BÈ¢E‹>|X]]““³gÏݧBNœ8AùþûïQ²`vìGp®_¿NéÔ©!dß¾}r¹üäÉ“ááá¾¾¾GŽ!„ð¾ X… úIVÝÒpèС¸¸877·Ã‡2ä‰'ž8r䈓““±S-44ôƹ¹¹qqqva%hi@KŻ½ Z,랧¡wïÞl#>>¾ªªÊ4-,,3fL`` 20‚ÐÒ`5- - hi@Khi0˜Ü zaŠî |§ € §A/Ð •‚ 6º'§Ví4\¼xÑÑîرCmOuuuß¾}³²²ôŒ¡²²òïÿ»———§§gs¦%ÉËË3T›Õ¡C‡úöí[]]m ¶"ø& + ¾‰ÆÞæ?A06>>>Ÿìß¿ŸRXXØ­[7ggg¶L% ö¾,Jú€™†'žx‚m,^¼8**ê?ÿù»»;_eÏž=ÑÑÑŽŽŽlvBHxx83wösÁ‚QQQëÖ­sssck5mÛ¶M„¤¤$ìÞ½{,dçÎ7nÜاOBÈ©S§bcc%I§NÚ¶m{éÒ¥ÿ•…Æþî»ïVTTTVV¾ýöÛ„ìììðððððð7zxx$''kÞ¡æSÄÆÆBÄw¨ù„œœœÎ;K$’:°Ö&NœèììÀæe#„ôîÝ{ݺu;wV/¿ÿ{÷U™øqü9sÈ Ñ E"QAsµ²4I[]5ïÕ*n&ëšm¹vOkÍ5kÓÚ.(¬¶Zf)j^@´^^P\SûyÉ ^pUä:À0ÌóûãÔ¼¦™a Ïû¯™3çòÌ3gÎùžçœóœ[± ²>L¤^_sogsÃÁý ‚#Ç©7………?>KHÊ + !zôè±fÍšÊÊJµ»h!DZZZppppppZZÚ¦M›¢££—/_îë뛘˜˜˜˜Ø£G§¿ŽíTN !DRRRxx¸Á`HLL´X,nþ^jÓ‡Ÿý ßOƒúœÛ×UUUƒAí ýÓO?ýî»ïBBBfÎœi;¡ÝT‹E¡Ñhìfe» Ÿëׯ !ÄC=4{öìøøø-[¶$$$:5<<|çÎêFáÔ©S5ÍÙ±„ŽßÂi íf¥ÓéÊÊʼ½½­Ÿž8q"77·ººú®»îŠUÆ6mÚ4X×Uõ·&ÜÀ + Cnpùª§ŸøVõÓÀá†6v§²“™™ùÐCÙ-«]»vYYY;w¶Ž¦ÕjM&“ÅbQˬ(JuuµF£QK®Ûñ{ÙMåøM“““§L™b]JrròäÉ“Ýü½æ¯ÿ8ôÓàܱcÇì*½C‡j?êjt}óÍ7/\¸àïïÿøã[#¹:æÀÕG-ìܹóÛo¿B¤¦¦ª2D«ÕÞwß}ׯ_W‡,[¶ì/ù‹úzØ°aƒöòò9rä AƒœFד'O.\¸0(((??Ö¬YBˆŒŒ ë¢Õç%´ûNKh÷-„‡êׯŸN§ëرãÑ£G«««çÏŸ?iÒ¤)S¦¬\¹ÒZ¼3f¤¤¤4Ÿ¸MbhnØ ÜÐÁîïo7•ã8AAAƒA}(¥5Ž,Z´(((( àoû›Zªðððõë×çææ + !¾üòKudµFh÷ëØNåô›&&&¾÷Þ{·ß~»F£éÙ³ç€Üÿ½šÛ¦–†Ú“¦NúÑG:ùu³’r×®];wž5kÖúõë+++#""æÎ;a„ºZDý}‹Ë—/Ÿ Ñ¡Žnt’èèh)¥µË#)ett´N§;uêÔG}d;æÔ©S###«ªª\ÌÍvœÊÊÊøøøÛn»­ªªjÑ¢E¶£åççŸ?Þh4 + !fÎœ©ÑhnôôATTTjjêÆ#""\ŒÖ»woõI•···Éd’R>õÔS;vtÿÁ,,,üþûïõz½uà¬Y³† ’——WQQ‘žžîôXÿå—_6›Í¶Ï½üõ¯}ñâEÛ;;[lk¬´´TJi4ýüüRSS­:9­yÛ:BäææÞsÏ=lšQã + §'~i rz¢YýÜî•Öá*Á-—"§OŸü·¿ýÍ××·Wц©a£Ñ¸`Á‚ëׯ/Y²¤Ù^ÈÅÝjkQ¨£`ÑÄZþZÈF¾/ùàƒí*Z'|}}çÍ›ÇoÝÜ4—ÐP¯íÆõ7sZzàH ¡¡9#6¶ƒO?تµÎƒ‚‚ŠŠŠj-44ôòåË‚ž'=÷[rÈCG©0—=B6Ž×¥7†”æºCÜüüüºŠ tžÁ¦!\R „x*»ÛÒœÞvåέk5Å×ûéØØØ´´´òòrõ­Ó¥Ûq§_¿~©©©&“iÆ qqqêƒûj½•Îeê|%‘R²ªàÄ™3g[Opv·Š9Þ–æxÛ•‹[×l9½M®V—.]jß¾ýöíÛÕ·5ÝôeËqœ3fLš4É`0¼ð jw:¢æ[鬷Š¹³,ÐÒ€:O Brƒ§k.·\º¾oM=$µŽ 71·&IDATöÿºqãƳgÏšL&__ßýë_ƒ¶Ón*3¼É2ßTý7«[.|ðÁ%K–ÄÄÄ|óÍ7Ç/))i+[þqšXhΉ¡®Ö·æSQ´4xµëÖÌÌÌŠŠ + ‹ÅRZZzêÔ©Áƒ»žjùòåQQQZ­¶U«V¶Ã¯_¿žàïï0}útkO)¡¡¡¡¡¡O<ñ„ë×àÂŽ;ºwï®Õj|ðÁF’hijÝÒÞ๠N¬^½ÚÏϯ}ûöjï¶111+W®tûöíûä“O®Y³¦ººúÚµkÖá999-[¶¼Ö~)¦N*„p|Ì®ÙlnÙ²eMO´Jí•¡´´ô®»îZ¸pá­:ËÜªè ¸Y„4ðFÇêäÉ“ê‹'NÔ4ŽS^^^Æ 6l˜úVíÕ1,,ÌnZÛ·Ö×Nº9Õ¿þõ¯o¾ù¦±õÊ@hhšGÕüÞuž<ÒŽ;ÔôÊ€fþ/ã¾êùOÈ3¦øe8+  Í•‚[ª94k)ŠòÇ?þQ}½iÓ&EQvîÜéz|Ÿ¶nÝúÀùùùãǯ«æææþÂ3’œÐq!dSÉ4Œòòò´´´ûï¿ÕªUBˆþýû§¥¥Mžvâââ„ï¼óÎ /¼°`Á‚3f!ìJ¸k×.uÚ9sæ<õÔS<òÈ'Ÿ|âXf»¥ûí·ŽSÕZžÆ¬ÁºhÈ+¢¸æ£¾*¶™tîxê_´Qvî¤(ŠÉdŠŠŠŠŠŠÚ¸q£”R«ÕšL&‹Åb0Ìf³B§ÓUTTèt:ÇÞŠ\¼µ˜œœà…ß}÷ÝîÝ»;vì8`À€Š#~~~Š¢äçç«C¤”AAAáááBˆ¤¤$EQ~ó›ßðëÈôéÓ…‹/^ºtéÕ«WCBBFŒqÏ=÷!>úè#!„zçmtt´¢(¹¹¹‹eØ°aƒaÓ¦MóæÍB$&& + !L&Ó€4ÍW_}õÍ7ß(ŠÒ·o_u)üãEéß¿ÿ•+WJKK?ûì3£Ñ8|øðÐÐPu„5kÖ©…ùðÃÅOO¥AÃãš qÿE=ÿš†{úúõëGŽÙ\VŒ¹¦AJùÕW_½õÖ[Öó ?üð–-[Ž9Òµk׈ˆˆ~ø!;;ûÞ{ïÍÍÍ0`ÀŽ;:Ô½{w³Ùìïï_YYyéÒ¥ÐÐÐnݺ}÷Ýw)))O>ùdaaám·ÝæããS^^n6›[´h¡(JII‰V«B<ôÐCÛ·oÿòË/­¸8p`ffæµk×Nž<Ù§OŸ°°°‹/6Xý4®iÐdåääÜ}÷Ý:îÎ;ïTŸqš––œ––VÓTvãìÚµ+22222rÙ²eþþþjçN“&Mòöö^±bEMóIJJ + 7 ‰‰‰‹eåÊ•Š¢Œ5Jí_ëêÕ«NKˆ›ˆ&C‡ݾ}»”R}àKaa¡ZÿBˆ?üáBˆåË—«¿šBíã+22RJù§?ý©²²rèСjƒÁÙ³g…&LBI)ÕgÝ}öÙgãÆSƒu&ƒVßnÙ²%33ó¯ýkË–-if ¥€G¶4ètº²²2ooo맽 ص4¸ÓSB­}¸Ùw‚c iipÿ'Þ±cÇþð‡ .F//¯öíÛ?ðÀO?ýt·nݪ««ËÊÊ®^½Ô¢E‹òòò‚‚‚Ûn»mÕªUÓ¦M3 Ï?ÿüæÍ›7oÞ¼nÝ:µÿ®Â§Ÿ~úË/¿¼zõª¿¿§N¾øâ‹ÈÈHµaÓ¦MÖËòóóÿú׿nÞ¼ùúõëmÛ¶1bÄ+¯¼l4[´ha±XòóóCBBhi¸%èÀÍ8tèP¿~ýrrrn¿ýö´´´.]º¨½ h4k? ¡¡¡—/_V·àjóµÝ8ƒ ²Aíó`Íš5Š¢L›6ÍihHLL¬¨¨X¸páùóçãââ¬Ù 2D«ÕöéÓgÓ¦M·Ýv›c f8õàƒ?~ÜéGZ­Ö¶ÇLÛ»'&L˜ ¶%!fÎœi;UPPPJJŠãÜ222솄††ªÝŒÚñõõ­®®æ§¡¥€çµ4 i·4P?´48Å5 À-®NOpxÜrü xFh4y¹Gä¡£MðKñËÖÎVà9Âhq1 + {t×õÃ5 ü˜Ô¢5=Àã —È „jO *r¡€Ú¹Ð€»‰Ü@hÀÝÄ@n 4ànb 7x"úi@? h¸0Ášæ¢rè§4„@h„@h„@h„B 4€:D7Ò€†Úå(ìt<- €Ð €Ð €Ð „@h„@h€š)ŠB%x.OìCšUŽÐ €Ð €Ð €Ð@h„POtT4ytkè‰QÀÖlx*NOB 4ª]»víÚµssdƒÁ°|ùr£ÑXPPЫW/jMƼyóäOH…x + …³pÿšumi×@ܪïrCË=vìXtttBBBzzº¢   ¾¿B̳^·*ŠÂV«~ÿæ Ãd2éõz???£ÑØ=V9ZРÛ&sÕ¤G|—èèh!ĪU« + + + ì?1êUÏž=·nÝj4Fã–-[âââl?Ý¿ÿþýû pñâŧŸ~Z8nܸ½{÷VVVJê:l§´´T¯× !ÊÊÊ,XàÎ] + Béѹmâ;v¬ü¹½{÷ + !âããÕ·cÇŽUÇŒŠŠ’R¦¦¦º˜JñÆo¨Câãão¿ýv£Ñ˜——çïïïX’œœ»™üùÏBtèÐA}"„˜?¾úvôèÑBˆG}ÔúÚo¿úê+ÛyîÙ³GýtêÔ©RJ³ÙüÒK/=òÈ#K–,q±AT?Ú¹s§í¬ÆŒã´J]ÔFii©u†Ö «£šäbÎ5ÕžcµÄÄÄÛüÌ3Ïð_hÚ>û쳜œ³ÙÑ©S')åÁƒ?ùäëwß}÷Ýwß=nܸÎ;/]ºÔ××·¨¨hÍš5û÷ï÷ööVeøðá.æoýS+Š2gÎœZ—XkyÐл4g7TAAA=zô¸ÿþûm?]°`”²ªªªM›6æôéÓ×®]óööv=•bРAÖ‚¥§§×tÔûñÇK)W¬Xk÷ÑŠ+¤”ï½÷^‹-Ìfsjjª”r×®]Bˆ“'OîÛ·ÏéwQ߶nÝúÇ4­ÑXG°f Ç{LýtØ°aµ†õ@JѶm[)eIIÉÖaM#»¹ svQ{vK,((RÆÄÄ4ž­ + [­úþ› !ª««¥”:Ý÷äëõz)¥Åb©i=?~¼:dèСîüGçàz‰µ–§^WKV¹ŸÕU€› ß|ó”ò7¿ùºk·ûôÀêÑíÒ¥K¥”÷Üs;S9ÒZ°œœëf¢&ÁÁÁo¿ý¶µC©N¾lÙ²¢¢"N·wï^)eRR’í%Wµîž­C¬›¿É“'«=öØcµ†ëÛ®]»J)óòòn¢Ý 5-Èõœkª=»Ñþ÷¿ÿI)ï»ï>BC³ + «V­RÞ‚ƒƒCCCÓÓÓ¥”«W¯®iÝ ³X,Rʬ¬,½^yöìÙ + ®—Xky „x@h8xð u&………êQiQQ‘"44T=>R¾øâ‹îLµ|ùr)åÔ©SEQ· F£±cÇŽv‹öññqü›6m².âÓO?µmHÿío«¾ÍÌ̬黸 Bˆ•+Wªo‹ŠŠÌf³šB¤”QQQ5ÍÊVAAADDÄMÔ¡ëBº^PMs + + rQ{v‹èرãÕ«WíFvq®„ÐÐ4Bƒ"..nË–-eeeååå[·níÙ³§ëFGÿ?þØh4^¾|ù™gž5j”:Nûöíký¹³Dן …ÂÝ˪õz½Édª®®®õè¿É{î¹çÔ«%üüüÊËË·M¢y÷³)¹{Âcÿæ7-99yõêÕÙÙÙ&“©ÿþŸ|òI«V­öìÙcmbôÜÕ’UÎÝHÃ]&“I±téÒføÝÍf³V«µRYYùÐC9& yÊÍÍ3gNÏž=¯]»–••õúë¯:tˆšijé“n±- üÍY-YåÜÁ-—À-œž4}¿¤­Å£Ûi궙„Ð!„È=BãêÌ¡£ž=ÿ[".¦~ÛÀ¥”Š¢|'sY?oTW%Îsë­«RÇ]grz¡¡¡€ÐÜCçN€Æ¥«×x÷Ш§‚tÊŽ&Œ–@hà¦ôêÕ«W¯^µŽ¦(ŠG?“Ðhšê|=fÌEQ¾øâ‹òòr³Ù|þüùuëÖåææ + !rrrrrræ[Øiä)„ЀAx¼Õ«W+Š2a„âââñãÇ«Q Ö¾ýö[!Ä”)SfÏž}ðàÁðððÑ£GÇÅŹX‹Ö­[§(ʈ#ŠŠŠ®^½jGJùðÃ+Š²sçΔ”EQÞzë-ÛÉ_yå•âââF~QNí(Oÿ¨“ØË¥[°rq!¤ºÝT?µX,%%%k×®MLL ?þ|}f̘1ëÖ­ûüóχª×ëóóó÷îÝÛ±cǸ¸8Û¸^½Å ^>é8‰í×3¼éS\zËïÖs_M·\:æ¿}ûö©ÙÑËË«ªªª²²ÒËË«¢¢Â`0x{{WTT¸þHqéÒ¥÷ßÅŠyyyêçŸþïÿ{M?º¯¯oyyyyy¹íGï¾ûî_þò—Ñ£G¯]»Váíí­ÕjËÊʬÃú~á + vC?bß¼JK€›TPP°mÛ6­VûÊ+¯ìÚµëý÷ß?wîœÙl^³f¢(½{÷VG‹‰‰QåàÁƒ&“)77÷رcŽGoŸþ¹¢(}úô9qâDeeåÿû߃r §¤ kkS=„ÇBüßÿýŸ"66¶Ö„aaa¯½öÚ¹s礔EEEBˆ%K–¸XzXX˜âÊ•+Bu|•ŸŸŸ¢°°P}[YYi4¶rEGG !Nœ8¡¾U_ÜqÇQù„7Ãd28qbß¾}Bˆ€€€>}úh4šiÓ¦uïÞ}öìÙê! :¦º5ìÙ³g@@@JJJÛ¶mç6qâD!Ä×_ݹsgooïîÝ»«ú‹/^¼xqÆŒ6lèÝ»·F£Qå…^pQ°„„!ÄgŸ}غukëð÷Þ{oÛ¶m£Gîß¿ÿäÉ“½¼¼^zé%Ûˆ0wîÜ€€Îex¨={ö¤¤¤Œ5J§Ó3&99yÏž=µ~tï½÷†……éõzEQ ôÏþóúõë.tøðáqãÆuêÔ©}ûöK—.µŸ}öîÝ›žž>xð`e+.. ô÷÷/))©©E·S§N?üðùsçÚ·o_TT¤~”’’’˜˜Ÿ™™éú{Ýu×]ßÿýñãÇ;wî¬FEEÝqǧOŸœžhªGÈƶ¹æôÛlYµmÛöñÇÏËËÛ½{wïÞ½ÛµkײeËiÓ¦;V«ÕöîÝÛd2õîÝ; À`0¼óÎ;&L8wîœÓÃÄ 6¼úê«ÞÞÞ&$$äwÞá@ ¥´4ÀS[Pÿ&Zhi ¥4<{и|'sˆCÔƒÓš¹µ ¥¸…–?“{D:J5Ü|íQ hÂhiàIâb”¸ºR P[bP/'7„¨=1BÔžTä€Ðµ'r@hw¹ 4€»‰Ü4<úi੉ÁšE‰‹á*µëªÄQ ø%x2 x`<,I4ÉÕ•ç„Á#pz¡¡¡€~xÖ6Ka«Ü2´4B 4B 4B 4€{tTE¡P‡è| hªhi„@h„4^RÊ&sºúV}—Zî¼yóäOÈ:àÖâyqàBȆÞéº_ç&“I¯×ûùùÆz-URRRddd|||”¿^·*<å ¥ytüöÛoŸ:uÊl6—””lÚ´©sçÎBˆ””)eaa¡uäo¿ýÖd2µnݺ¦©ºuëVUU%¥\¾|¹:ÉsÏ='¥\¸p¡cI""">ÿüó+W®TWWegg«â'N”R;vLmРAj™Ã„­[·–R¾ÿþûŽßeÿþýû÷ï×ëõ/¿üòùóçÍfsNNNll¬u„qãÆíÝ»·²²RÚˆŽŽv,[vvvvvv‹-–/_n4óóógÎœYS•ÖTBˆÒÒR½^/„(++[°`ã´j™ýüü/^|åÊ•ªªªìììnݺµmÛvóæÍ&“éôéÓýû÷ÿñ¯®ÑüùÏ>räHUUUqqñºuëÚ·o¯~”››ûûßÿ~À€ÖÊwQ*ìЬÝthèÑ£ÇøñãÛ¶m«Óé,¥´X,êþ)//OJ¹qãFuÌ×^{MJ9jÔ(S !|}}O:%¥<~üøÆ¥”£GvZ5^<ðÀ:.00ðW¿ú•u¯væÌ)å¸qãÔ¤¢–yÑ¢EBˆ>úÈb±´lÙÒñ»¨oÏž=;zôhƒÁ/¥4›Íj©ŠŠŠ¬iC1lØ0¡AýhëÖ­ÑÑÑ~~~|ð”rçÎ7T‡NGvº £G4ÈÛÛ»_¿~êmÛ¶µoß¾{÷î֯СC‹Å"¥|íµ× C§NJKK¥”ýúõ»ÑR¹³ÎÔ÷êʸeû ª7:tè°uëV‹ÅRTTtöìYÛOcbbÔ·3fÌPwfÖ=®‹©TP>ÜEõðáÃÓÒÒÌfóÿûß©S§ªåBˆÄÄD)åáÇսÝû¬:ü™gžq,†^¯Ÿ5kV=|}}u:Ú*`2™¬yâÂ… Rʪªª´´4!Ä’%KÔ*** Ɔ°°0õ0=++K¯×GFFZ÷£.BC«V­´Zm§NvìØ!¥\¶lÙMÔa]…½^þüy)åéÓ§ããã½½½}||ºuëv÷Ýw«cVWWK)½¼¼j-¡ 4€Ðp3¡¡K—.»wﮪª:qâDÿþýŸ|òɲ²²üüü-Z¨#¤§§«“ÜqǵNõè£J)¿þúkF£^µPVV&¥Üºu«zí›uÑZ­öÿøÇáÇM&SUUÕÉ“'-Z`]ÄÔ©SÕñ{õê¥ÎJ}ûüóÏ׺u:Äßßÿã?6—/_~æ™gF¥~ª^àtVªâââÔÔTÛlqCuèºî‡ëI‡/¾øâÊ•+RÊëׯgff>üðÃêGñññgÎœ1›Íÿþ÷¿]—ŠÐ4g\‡ w¯ä0`ÀöíÛÏŸ?o½€®ùHNN^½zuvv¶Édêß¿ÿ'Ÿ|ÒªU«={öÜsÏ=Nw™¢yß“"¹{h¢¸{îÚ¼ysZZZ÷îÝ›áwÏÍÍ3gιsçÊËËW­Z•••ç41!Ú´iÓ¦MVMð “Ìúi@Ý¢¥hªhiî¥v2;hi¶ÆhütT„¹GØZÁ3ÄÅ(Mru‹!»Ãpz¡¡¡€Ð  Ñ#${¼wÂF^<úW¡@óÂsnOrAÓÆé @h„¨Õ™3gÎœ9C=„ MùÉš5k¬GŽ©t=íÚµkÿùϺ¹õuIIɳÏ>{çwúøøh4ÿN:mÞ¼Ùn4Kˆˆˆˆˆ¸‰ïXÓw¾)@h€N›6­ººZ±qãÆŒŒ ÛO¯_¿žàïï0}úôªª*!ÄرcÇŽûôÓO+Š²zõêýû÷÷íÛ·eË–&00pèС'Nœp\P›6m-Z”™™YQQa±XJKKO:5xð`×Å[¾|yTT”V«mÕªU­B„†††††>ñÄ^^^f³™ßp•ª¹FŠ¢p“lÅÅ8ß2¨ÙÿùÏ&Nœ8{öìùó燅…-Z´è‰'žBH)srrzõêÕ¥K—#GŽõêÕkß¾}Öigk±X´Z­F£QSˆíhëׯOHH(++SÇìÒ¥ËsÏ=7aÂëá¾:šíë¾}ûîÞ½ûàÁƒqqq¶ÕZ°ªª*Nç´œ5-«nÿM5Õ9@K–pÿý÷/\¸ð±ÇëÒ¥Ëï~÷;ëGiiiBˆ£G*Š$„Ø¿EE…Ýž|òIEQ:wîüÜsϽõÖ[jtp\ÐÈ‘#KKK¥”ÕÕÕYYYíÚµ›8qb`` ‹²íÙ³GѵkW»áµLM ÖÖ&5ÊhµZ~w€Ðàf$%% !Ö®]›œœl;|Ö¬Y:tP%))Éh4oÛ¶M£Ñ!¢¢¢„úÓŸöìÙ³{÷n!Ä?þñ¹s熆†ªÓØ-åÅ_ÌÈȸråŠ"666>>^1qâD›={¶âÕW_-,,1b„;³óþûï !üñk×®<þøãBˆ×_œž€àôÐTÞðÿ&ê´4B 48â,¸¦¸õ¸¦–@h„@h„@h„Bp݉@(ŠB%·[c@Áé @h„@h„@h„B 4BhhÿŒ l›ÜtIEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/doc-files/TreeUI-1.png gcc-3.4.0/libjava/javax/swing/plaf/doc-files/TreeUI-1.png *** gcc-3.3.3/libjava/javax/swing/plaf/doc-files/TreeUI-1.png 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/doc-files/TreeUI-1.png 2003-06-27 12:41:52.000000000 +0000 *************** *** 0 **** --- 1,30 ---- + ‰PNG +  + IHDR,ú”í¤gAMAÙBÖO¡ pHYs  šœ$tEXtSoftwareQuickTime 6.0.2 (Mac OS X)Ån*tIMEÓ9&:ß… IDATxœì Tg»Ç'!aQ– Pías…âŠH•V\¨ + øI­¢÷³¸´÷öh­íwÔöª­Uk]8§çX·Rm¥Ë±¶z½T{•"ÚÖÒ•Š Xdìë܇LoŠI«¼“Éó;ž8ófæÍLÈ?Ïó¼3ï?<š¦)AÈÁ'}âê „0(B! ŠAƒ"D „0(B! ŠAƒ"D „0(B! ŠAƒ"D „0(B! ŠAƒ"D „0(B! ŠAƒ"D „0(B! ŠAƒ"D „0(B! ŠAƒ"D „0(B! øïòx<²€0ÿ$¸,ÒÐþù‰ƒ_…ÁtAƒ"Dþƒ!)P„B!‚Eˆ „aÅè¨-<0žžžr¹ü·ß~[½zµL&+,,,**‹Å¡¡¡jµúùçŸçóñ{qnØ(ººº¯¾újöìÙ 6‰D:ÔëõŸ|òILLÌøñã=<<ô:Ýå˹:ÎÝÝuˆ85¬¸Xou ß|ó HkÒ¤IB¡ÐÞF­J}ëvÙ÷?\jTjªL»ÿûõî9Tà ÿ0¸&lŒ„çÏŸÿý÷m¨T*Jn•ÿoÎ9©\­ÒŒ={õÌÓè‰$‚tl!”‚PïAʬªu†œ‹WŠþ¸©ÔR<¡0"vf¡HÕØP/k¨úëžÈËÝj÷€€€Q£F={–Y­¨¨:tè–-[V­ZÕÆèׯ_~~>#BˆiáááþþþL{qq±Éd‚èÿÎ;°jß°aéS§ŠŠŠ&L˜ÀlVRR¢×7•š Æ°°°_~ùåúõëpTÝröˆËÁFz{{766ÂÂ_ð„¾Jh†’˨¥Pª´*­Á`0ÒFÇçS>6é(0uêÔÊÊÊ£GZ"ž]¼¼¼ €œ>}úµk׬†‚@Àuuu+V¬ @¼µyL°Q„ÁÁÁUUU° Ó›hÊW&£àŸ´Á$—)T + ¨j<ÚDñ&7w¿È˶Óœ9s:&“‹: ''„š’’røðáæízzzº¹Ù‰´Ò…°Q„‰D*•Â‚Jghhh”™‘ˤ + •Zm2Ð<›‡—Eëý=xý‚üívéþýû!$BcZ ”ùùùA„T(ï½÷Ó¨Óé@ÒË–-Û¸qã¹sçš÷0~üx€_~ù%,›Ì<ÆsF\6Š"ammJ¥–+” + ¹¼±±¡±Q®ÖhM4ÍðBžQ£¬º]tïæOTµÄÏ×n'ãÆÛ¾}»Õe‰Õ«W?ûì³111Ï=÷ÓšŒˆˆHHH8räÈk¯½Ö|cíž={–.] Û0C5Òå°ñŽ™Û·oúiÖ¿f=ÿþ‘ïÆ=—æÅMé´ + …LúàÞ­ú¿nÕ²à@¿ÑQñÆ÷êÕ«]/'—ËE"‘U#^ËàëëëÛû*NÞ1C6^'‹ÅJùõ7OÍÃÊûîVß½¥i¬õ{6dô´ÙO>ù¤··wÇ:·U Ð’)óEKÎ+! E`0Ð7nÜh¬‘•6–‡‡>9=5aР>>>8L‚p6¦£”ùòÝ­[e‰`` + ¯Àt” ,!ÒÍ  ÂÆÑQq)P„B6Ìt´Æ@œ ®‰­1§ƒü H×Ì 5FÇÀ‚°4BêxñâÅ{÷îÙ>5`À€øøø¨¨(»;v‰5¤²ÐZúÙµk×K/½ѵçÔVºóµ6ÀR‚Æòòòì>ÂhIT§­1 ›]µjÕÕ«Wû÷ï_RR"‰þüóOhçw^xá… £]~|-Äé`©”””ƒÊd²æ¾¾¾Ðî`¯NZcÌ;·OŸ>7oÞdæ^0 + ì<è—8€½ÃO<ñÄСC­¡ÚìÕkŒŸ~ú ²Ù5kÖXf?…‡‡[õŸ‘‘7räÈÏ>ûŒi±uÇh—_†m‡ˆ«ÁÞHL™2ŠCÆê‚2ß{ -Žwin2.V®¥ø<Ê`j“5Fqq1Ä«áÇ;èÉ’%°D¶ôôô´´4ÆãÎ;‰„qÄ°m¡õËX±bÅž={ mvww·í°ƒïâÌ°7={öœýôÓÔÔTfY­V{yýsgéÏ?ÿ ¹È‘‡8XÑ+¨òúÌÉã»ö° ‚"$7ÓQfFÂÁƒ‡:eÊ”6Þ†RUUÃÜÀ)­«¹}§¢¦¾Ö¨§øbo¡—O‘F½[ø(7M£F©×–ÖG÷ïú™ïhlášpS„ 2™ìÊ•+šNž<9&&¦Õk†J¥䚟ÿãßK!%8z´ÐËË(J5Ô½r“\êSiu&ŠÏÓñè}ƒ¬vðöööôô|æ™göîÝËLlhlášptT.—ýõ×»wï.--e&³·„ÉdþVr{ÁÂ?7ÆÓW¬rV«©êzZ­3)ÊÈy|Í7šŒ>bë_w‚:wîÜ… rrr²²²Úxxƒþã?:xn'ྪªª:Ôš…OÑÐ ð…‚*šÒÁ:(³iN + Ô›(žÖhM&Og0´è‚‚‚üÌÀ2hrĈOž<ÉÐ2hÐ èÚcccAT ¤Ó§OŸ9sCBB8êÚ¶mìräÈ‘>úD_(ºÃÃÃ!ööë×϶g»½µÌ„Ë5!ƒH$jcMO.¯÷ôꩤ)‰rã5=B ¨ÒÒj½´Jÿ Üø&ÝYNC† O3|Ü“’’”fö›/*‚Z~üñGžV-&L°ê!33³oß¾ÑÑÑ 4X½vít˜Ë‹/†þu:Ýܹsßxㆆ†üü|Popp0,ØíÙª7„pY„¾¾¾í…XP'm zú5(‰2)…®É¢Fm¤Õ~£Ú¨ÓSFš¯VÓb7Ý@-K—.…ÜrÓ¦MóæÍëÑ£ÇôéÓ)ól`P $–V-¶=0Y.—(si Ý° 3ç5uêÔ'N@ñùòË/ÃS÷ïß·Û³Uo;ᦠÐë„TÓt^Ú_¤ÒRÅ×Q + MS0TjxrQ¡1)UµÆ(’ˆµzGi3ÐÅXMM (j3¦Ý¶€êêU»‚âããëêêJKK¡&„”211‘™ ùâ‹/¾þúë ÑÏ?ÿ¼¥žg›"tà“ï•Z©w÷­k¤BŠg dT}ƒ©^f+Œ<‘OP°›¿-­yÞ½GQv\§ ï5 ‰äðáàÿãÇÏœ9Š:½^¿uëVˆÉ¶-Ë—/‡<3##öŽ¥Ì;;vì€Òj?Yvv6Ó‘pÑ¢E°#c‘j÷µ:pú¸90Ó16o~;8ø‰úasü½|(>¥ÑQBOJЃ2_ koUßÍÿ¶‡¢,fÔS©³þå`€§9pjµµµ½zõ²ä„¶- + …´ä Ã¦û¤Ò–Ì8¼VÛÁ‚p3v #¨ÍDKB?* ¬Rr©úfî¯]»â§ÿtÌ«ëçµ×>ܽ{÷vÜÒªÝÄÃVh·gÄ)@þƒRÑØ7h¤&˜n¨¨¼zô ¯¾x|lô«S&÷ž¿gè#ò© {ÒÑüÏÙ³#†NNžÖ£GÒGÔ}`:Jò`]!A\å¶5a-(B! Ì<Ú[ Ýùz í-ØÖ„á¦ÑÞ¢½  ÂÍtÔYì-ÐÏ¡¸*BöÛ[ ŸBq[„ Œ½E^^^«“z›Û[xJØ—nšÔ+•6··húÉû–ì-òóóA‡ãÆËÊÊZ¼xñc>3„#¸Ê% + "öcÇŽ=~üxdd$ó“½qqq#GŽl~¶~°×·ß~ J†\úúõëÿùÏBBB-ZÄ<›™™ ÛÃSçÏŸï‚÷aÜ„ { Ç›)__N BºÉÞBg„È×ùjÈ’orhá “ÁîÌú}ûö¥¦¦¦¤¤ÀjIIÉ™3g.\¸Àü\á’%K†^PPžžž––Æì¢ÊÎÎ>yòäöíÛãã㙽@º°ã|˜˜™íï¿ÿy5ǹ­]»R»¶LƒøÛÞÂãÁ)(¥åYÛ[¨õù jÚ£e{‹?ü”³iÓ&¦ÅòºåååU^ºt TÚ|»–UÛ™999 ,€H{øðáÖßÄàf:Ê{ + )…ȶråJ(ó˜ !˜¥Óéhš^¶lÄa¨3.\ØÞÂM²ÁÞÂê)È!·nÝefýúõ;wîlïáUVV©………)•JÈc;p‚ áæ3ãqØ[XÑØØ(‹õz=Ä´öNÒ· •J™‘ž.ï˜!7#aÇxöV0×å…f:ÜI—+! ŠðÐÞ!ùT=é(Ú[°äáj{DèÊ  Âåë„â „080óhot?äë1´·`X„›"D{‹ö‚"$7ÓQg±·@ŠÛ3Œ½ÅÎ;óòò@Z­nÏØ[ýáŠ[ÑÄÄiÓ^Hœ4#êéñBƒ§J¦{X]/këéí- †´¬VTTˆÅâ½{÷vñY!œƒË"d`ì-vïÞ]ZZªÑhlÙÜÞâé¸1ž¾b•»°ZMU×7··àh¾]{ …Bqùòåû÷ï3«YYY |Îþ¤§Ž1xð`»S4§†û"dè{ («’’’Ž;Ƭž8qbÚ´iÌrnnî˜1c"""f̘Q^^-eee£ÿŸ¨¨¨mÛ¶Qöü/šdlÞ¼öš={öºuëºò­AHã*" + + Z´h‘ÅT¢%±·0Qjcûì-æϟψ°   <<Ür§uzzú»ï¾[RR³qãFh ½ffß¾}ÕÕÕÉÉÉ”ÙÿâÒ¥K™™™o¿ý6³£Å #!!Dï_|±cÇŽ.|gâps`¦9"‘¨–‡Íí-4&ÊgÇÞBÿ ÜZ²·˜:u*è­°°ðèÑ£ ,8}ú44‚Ò H‚Š`yñâÅC† • ¤wïÞMMM…™éövý/ƒŒ®{?ÖÁåHØýöB¡pÎœ9÷ž?Þ’‹BQj™| :3”yn!d§o½õ3œÓ’ÿNàà<ÜŒ„í- #0aÂòåË‚¿ßÛøøøºººÒÒR¨ !6‚ä¼½½ Tw“&MZ¶l³Y[ü/üüü ¸4hP»N + a9Ü!){ ¢îöíÛgÎœii-A «©©ÉÎΆÆS§NåääÔÖÖŽ=VA™kÖ¬iÕÿ´ mFF„÷œÂN¸yÇLÇx¬öM÷H¥½zõr¼Y«þ + …blÇÌ5€wÌ„›‘°c•Vg¢øö-*æΟ‘‘ñØNA¬a»‹Š¼¼<æwçÜ9ÙÜ¢ÂC(P¾4%SQRis‹ + MóìZT@‹¿t3Î!BÆ¢bàÀ¡ö‹ + ž}‹ + ¡§À®E…†~5ÍÚµkÓÒÒÊÊÊ H2OiµZXž3gŽUË›o¾Ù•g‹¸ Î$   &:Þì‹ + šR›ÚgQÁ°dÉ’áǤ§§ƒ7 + hÏÏÏOIIðméÚ“E\çawZT0Øuš°r£°Û‚ í…í"ôõõm×èèß=ý ”ÀD„Ö:=e¤ùÿ×Þ¹ÇD•Ýq|xê¢Î‚Q²n% qu›ÕòXZkXÀ®®u×ÜkÓZÀ¶4M7…ipÿªåÕ4M ·Éê&£n²»`©µ]M}´®2&â·ÙZ ‚(L¿Ü£wÇ;€ræܹ|?!7çž{Ι3×ùÌïÜ™;?{{ÝÖRTX”LË–-ÃBÔS-M6ŠakÑq%”˜¢Â;Ó„ÛíÖd£ðÎOAˆ>Œ+¡”"ƒKrr²&ÓDJJŠ&®55¥¥¥ãÖdb\ õúîvwöE„Ü°¨)*¦Ì Ž~:l›´´4‹â¡gC ÐEŒ/Úó11Õ@ñ™8sæŒh Ë8÷šÐÿ¤·8ÙØñÉgW?=Ò¾ç·ß5Ù…_|¸595yöïþtá74VÕ¯/8ñÎÛó* + Ýáa_“·íL䌰µËŸÕ ý***°®FÁ¢|ö»sçÎñœ ß²cÇl½§”››;R—––x’••…—5tjnnVaWÚµk—8IàFuu5Ž¢ýŠ+êëë¡ + j„{ (hÚ`ùó4@ãÚÚZ4ƒ¨Áf³¡ç•xDtÁh¨íá*FÛ¿yy9&–˜˜è«³7NCB¦·øèpëé ®w³,^4Ó2ää-¼w¾¼xè»gØ^xëpÿ½AçE× ×Ýw6Ì ö<ƒïí¹ÔÜÞó—²ïa.\ØÖÖ¦îVÐq*üÌ(âõ-^Ö‘‘‘Bõ}â^ëh‰”-JLKMMEûŒŒ hƒ²ˆcðºÂ M1`ll,h& Æ/,,„äYxŽ„Ÿ8„^h†¡D{ ŽQù oN/0º„þOoá°Ç_»Ù·6ÿØÚåsbçL»ÝsjøW§†‡À@üõõ ¤éôek÷­ÎþYQS4‡ñ&-"a||ü’%KÆv. ‰P˦ VŠ—¸8$¶¨ÉÏÏGYD?Ä"ìzŽC0b—¦ Lý¡Õñ±Ô„ðëÖ­ƒuâ "P0®„Ó[¼”8+ç Û¦­'ëv®X‘<û†«¿éòí±3þó«Õ)ÏL]–4kJxðÇÿ¸ºaÕ\\Z†¾“2ïûÏ=5%dÍ/Ù±Í<Ç´Z­%%%BE¼­lÛ¶M׉™t|Y/–sx¹ÃÄ"Äu9Š€ƒh&,ÂVÔˆ6 b…‰2FrŠå(šy·^¾|‘V Åø8™bƒäååÁ@ âÙ >«ÁР¸e3Òp­c´Â¢=»ÿü³ýÀU÷_ÿç>tݽïK÷O ”|vwËþîwÝ/9á~ÿü`Éá[ØùÑ#=O½‰¿ðРK5¯¢Ð{,ãùØé¥?å]Åßži û¸g#NîN-?ݶ$rzØ¢yÖys§ý÷ðk¨±N ½rð{(ül}Ü+‹£ïžÈ-½'ÙÙÙyüøqÏnâÐ÷bP—‹bE*ÆÁúÏ@‡2j –ˆZj{Ô¨^¡‡½Û £PH +@Ùòð]TVVâšPìŠ0 + ¨Aw1šçÄÄ%"¶>8k>¸·­é£¨¨8&fÎÍEoÏ|êi5½Eh„EùvÂ=”ÞâÄ‘Þb}æ#™¼G½mm`À}««ö£‹LÄÀ›ÚÊa0õmkâ ¯{U•ÍJU|ÙàÙ^Ôx+ï6ŠðÏ\\ŒÙ¢¥:>¦!¢ëH½ ‹q—£úÐÞbtpùç-– 7ÐìŒò£F?÷ÊðIjF³%Ü3ú²sÌ&aOw×7žIî‹qw¶¶ÿk׃ôöU+£°…é-L®BÔ·a1ÛrTz þŠ‚¿¢„Ù$Ô%¤„’¤ÛÖ1%ò£Q"á䆑P"Œ„„H†"JHˆd(!!’¡„„H†"JHˆd(¡NDÙ³ f€"³ýŠÂo¸ÝîK—.Éž1Œ„:éêêJOO c”P'mmmj‚Bt#ÿæé@¼0&&[«ÕÚÚÚŠ­ìÞÀ-FB=¨™ EJ_ÙÓ!ü(p‘P ƒb×Á‘P"Œ„cæܹs7n©{ãããQFìI‘F~ + ¸H(p8[¶l)((0T_Ý0J„‘ÉPBB$C ‘ %$D2”ÉPBB$C ‘ %$D2”ÉPBB$C ‘ %$D2†È1ˆiËÔû¶qòÄPÈ„nÙ³ D†ˆ„–üÃá…€›91ò#!!“JHˆd(!!’¡„„H†"JHˆd(!!’¡„~"))©®®N_ßòòò´´4ŸN‡J芊Š"##SSSõuÏÏÏw:UUU¾œ1 ”ÐTTTdee¡`·Ûƒ‚‚œ + (@NïÆ¢(#"„¢‘‘Áÿô¬dök# fàž?¾÷ÑÜÜ\µŒU(\jnn¶Ùl.— R¡€z”¼ûÂO´©®®F䌊Š*++C$DÌÉÉéèè@D°çDä`”{GõRO< ´(b+ăB•••âoXAbb"××׋Ýììlµ;üÔ½¦%†…êG#›Jrrò“tG$éŸ555h€CŸùq“ ¡ç+I”±ELKOÔ'IDATU@»X¦bëÙ»%ú¡¯¨ÁêT„˜ J8áÀø‹PÆÕÊÍ + åcÏÚÚZ°Õô¢1Pµ-Qãç™ÿÀfüANN¶"$zc·ÛóòòÄUŸJff¦¸€»qqqh#&&ƒ×„þ ¬¬,))©¥¥Ec@eBB‚g½ø4Õ¢„GQ#¾!¤f…‘ÐO@6ËÃ9GÇår9N›‚¨Á.¢â“ô%%$D2¼c†ÉPBB$C ‘ %$D2”ÉPBB$C ‘ %$D2”ÉPBB$C ‘ %$D2”ÉPBB$C ‘ %$D2”ÉPBB$C ‘ %$D2”ÉPBB$C ‘ %$D2”ÉPBB$C ‘Ìÿ¢Å˜Îð'^RIEND®B`‚ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/FileChooserUI.java gcc-3.4.0/libjava/javax/swing/plaf/FileChooserUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/FileChooserUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/FileChooserUI.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,5 **** /* FileChooserUI.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* FileChooserUI.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,111 **** package javax.swing.plaf; ! // Imports ! import java.io.*; ! import javax.swing.*; ! import javax.swing.filechooser.*; import javax.swing.filechooser.FileFilter; /** ! * FileChooserUI ! * @author Andrew Selkirk ! * @version 1.0 */ ! public abstract class FileChooserUI extends ComponentUI { ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! /** ! * Constructor FileChooserUI ! */ ! public FileChooserUI() { ! // TODO ! } // FileChooserUI() ! //------------------------------------------------------------- ! // Methods ---------------------------------------------------- ! //------------------------------------------------------------- - /** - * getAcceptAllFileFilter - * @param chooser TODO - * @returns FileFilter - */ - public abstract FileFilter getAcceptAllFileFilter(JFileChooser chooser); ! /** ! * getFileView ! * @param chooser TODO ! * @returns FileView ! */ ! public abstract FileView getFileView(JFileChooser chooser); - /** - * getApproveButtonText - * @param chooser TODO - * @returns String - */ - public abstract String getApproveButtonText(JFileChooser chooser); ! /** ! * getDialogTitle ! * @param chooser TODO ! * @returns String ! */ ! public abstract String getDialogTitle(JFileChooser chooser); - /** - * rescanCurrentDirectory - * @param value0 TODO - */ - public abstract void rescanCurrentDirectory(JFileChooser chooser); ! /** ! * ensureFileIsVisible ! * @param chooser TODO ! * @param file TODO ! */ ! public abstract void ensureFileIsVisible(JFileChooser chooser, File file); ! } // FileChooserUI --- 37,136 ---- package javax.swing.plaf; ! import java.io.File; ! import javax.swing.JFileChooser; import javax.swing.filechooser.FileFilter; + import javax.swing.filechooser.FileView; /** ! * An abstract base class for delegates that implement the pluggable ! * look and feel for a JFileChooser. ! * ! * @see javax.swing.JFileChooser ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public abstract class FileChooserUI ! extends ComponentUI ! { ! /** ! * Constructs a new FileChooserUI. ! */ ! public FileChooserUI() ! { ! } ! ! /** ! * Returns a FileFilter that accepts every file. While ! * the filtering itself is not specific to any look and feel, the ! * text returned by FileFilter.getDescription() need ! * not be the same across all look and feels. ! * ! * @param chooser the JFileChooser for which ! * a FileFilter is requested. ! * ! * @see javax.swing.JFileChooser#getAcceptAllFileFilter ! * @see javax.swing.filechooser.FileFilter#getDescription ! */ ! public abstract FileFilter getAcceptAllFileFilter(JFileChooser chooser); ! /** ! * Returns a view to a file, which is able to retrieve its name, ! * icon, and other properties that are relevant for presenting ! * the file to the user. ! * ! * @param chooser the JFileChooser for which ! * a FileFilter is requested. ! */ ! public abstract FileView getFileView(JFileChooser chooser); ! /** ! * Determines which text is appropriate for the approve button ! * according to the design guidelines of the implemented ! * look and feel. ! * ! * @param chooser the JFileChooser whose ! * button text is requested. ! * ! * @see javax.swing.JFileChoose#getApproveButtonText ! */ ! public abstract String getApproveButtonText(JFileChooser chooser); ! /** ! * Determines which text is appropriate for the title bar of a ! * JFileChooser according to the design guidelines of ! * the implemented look and feel. ! * ! * @param chooser the JFileChooser whose ! * dialog title is requested. ! * ! * @see javax.swing.JFileChoose#getDialogtitle ! */ ! public abstract String getDialogTitle(JFileChooser chooser); ! /** ! * Refreshes the currently displayed directory. ! * ! * @param chooser the JFileChooser whose ! * dialog title needs re-scanning. ! */ ! public abstract void rescanCurrentDirectory(JFileChooser chooser); ! /** ! * Ensures that a specified file is visible in the ! * JFileChooser ! * ! * @param chooser the JFileChooser that ! * should display the file file. ! * ! * @param file the file that needs to be made visible. ! */ ! public abstract void ensureFileIsVisible(JFileChooser chooser, File file); ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/FontUIResource.java gcc-3.4.0/libjava/javax/swing/plaf/FontUIResource.java *** gcc-3.3.3/libjava/javax/swing/plaf/FontUIResource.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/FontUIResource.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,16 **** package javax.swing.plaf; import java.awt.Font; /** ! * STUBBED */ ! public class FontUIResource extends Font implements UIResource { ! public FontUIResource(Font f) ! { ! super(f.getName(), f.getStyle(), f.getSize()); ! } public FontUIResource(String name, int style, int size) { super(name, style, size); } ! } // class FontUIResource --- 1,101 ---- + /* FontUIResource.java + Copyright (C) 2002, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.swing.plaf; + import java.awt.Font; + + /** ! * A font that is marked as UIResource, which ! * indicates that it has been installed by a pluggable ! * LookAndFeel. Such dimensions are replaced when the LookAndFeel ! * changes. ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public class FontUIResource ! extends Font ! implements UIResource { ! /** ! * Constructs a new FontUIResource given ! * the name, style and size of the font. ! * ! * @param name the name of the font. A number of ! * “logical” names are supported by any Java ! * implementation. These are ! * “Dialog”, ! * “DialogInput”, ! * “Monospaced”, ! * “Serif”, and ! * “SansSerif”. ! * ! * @param style the style of the font, for instance {@link ! * java.awt.Font#BOLD} or {@link java.awt.Font#PLAIN}. ! * ! * @param size the size of the font in typographic points, for ! * instance 10, 12 or 13. Designers of LookAndFeels should be ! * aware that some languages (like Japanese and Chinese) have ! * glyphs that are too complex to be legible at small point ! * sizes. ! */ public FontUIResource(String name, int style, int size) { super(name, style, size); } ! ! ! /** ! * Constructs a new FontUIResource given ! * an existing font. ! * ! * @param f the font that serves as a template. ! */ ! public FontUIResource(Font f) ! { ! /* This implementation will get rid of many font properties, ! * such as skewing, values of multiple master design axes, ! * etc., unless they get encoded into the name. It probably ! * is not a problem for LookAndFeels because user interfaces ! * are usually not very advanced with respect to typography. ! */ ! super(f.getName(), f.getStyle(), f.getSize()); ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/IconUIResource.java gcc-3.4.0/libjava/javax/swing/plaf/IconUIResource.java *** gcc-3.3.3/libjava/javax/swing/plaf/IconUIResource.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/IconUIResource.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,25 **** package javax.swing.plaf; import java.awt.Component; import java.awt.Graphics; import java.io.Serializable; import javax.swing.Icon; /** ! * STUBBED */ ! public class IconUIResource implements Icon, UIResource, Serializable { public IconUIResource(Icon delegate) { } public void paintIcon(Component c, Graphics g, int x, int y) { } public int getIconWidth() { ! return 0; } public int getIconHeight() { ! return 0; } ! } // class IconUIResource --- 1,122 ---- + /* IconUIResource.java + Copyright (C) 2002, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.swing.plaf; + import java.awt.Component; import java.awt.Graphics; import java.io.Serializable; import javax.swing.Icon; + + /** ! * An icon that is marked as UIResource, which ! * indicates that it has been installed by a pluggable ! * LookAndFeel. Such icons are replaced when the LookAndFeel ! * changes. ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public class IconUIResource ! implements Icon, UIResource, Serializable { + /** + * Verified using the serialver tool of Sun JDK 1.4.1_01 + * on GNU/Linux 2.4.18. + */ + static final long serialVersionUID = 3327049506004830542L; + + + /** + * The icon that is wrapped by this IconUIResource. + */ + private Icon delegate; + + + /** + * Constructs a IconUIResource that wraps another + * icon. All messages are forwarded to the delegate icon. + * + * @param delegate the icon that is wrapped by this + * IconUIResource. + */ public IconUIResource(Icon delegate) { + this.delegate = delegate; } + + + /** + * Paints the icon by asking the delegate icon to paint itself. + * + * @param c the Component whose icon is being painted. Some icons + * use this argument to retrieve properties like the + * background color. + * + * @param g the graphics into which the icon will be painted. + * + * @param x the horizontal position of the icon. + * + * @param y the vertical position of the icon. + */ public void paintIcon(Component c, Graphics g, int x, int y) { + delegate.paintIcon(c, g, x, y); } + + + /** + * Returns the width of the icon in pixels. The implementation + * determines and returns the width of the delegate icon. + */ public int getIconWidth() { ! return delegate.getIconWidth(); } + + + /** + * Returns the height of the icon in pixels. The implementation + * determines and returns the height of the delegate icon. + */ public int getIconHeight() { ! return delegate.getIconHeight(); } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/InputMapUIResource.java gcc-3.4.0/libjava/javax/swing/plaf/InputMapUIResource.java *** gcc-3.3.3/libjava/javax/swing/plaf/InputMapUIResource.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/InputMapUIResource.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,5 **** /* InputMapUIResource.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* InputMapUIResource.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,62 **** package javax.swing.plaf; ! // Imports ! import javax.swing.*; /** ! * InputMapUIResource ! * @author Andrew Selkirk ! * @version 1.0 */ ! public class InputMapUIResource extends InputMap implements UIResource { ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Constructor InputMapUIResource ! */ ! public InputMapUIResource() { ! // TODO ! } // InputMapUIResource() ! - } // InputMapUIResource --- 37,63 ---- package javax.swing.plaf; ! import javax.swing.InputMap; ! /** ! * An InputMap that is marked as UIResource, ! * which indicates that it has been installed by a pluggable ! * LookAndFeel. Such dimensions are replaced when the LookAndFeel ! * changes. ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public class InputMapUIResource ! extends InputMap ! implements UIResource ! { ! /** ! * Constructs a new InputMapUIResource. ! */ ! public InputMapUIResource() ! { ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/InsetsUIResource.java gcc-3.4.0/libjava/javax/swing/plaf/InsetsUIResource.java *** gcc-3.3.3/libjava/javax/swing/plaf/InsetsUIResource.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/InsetsUIResource.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,12 **** package javax.swing.plaf; import java.awt.Insets; /** ! * STUBBED */ ! public class InsetsUIResource extends Insets implements UIResource { public InsetsUIResource(int top, int left, int bottom, int right) { super(top, left, bottom, right); } ! } // class InsetsUIResource --- 1,77 ---- + /* InsetsUIResource.java + Copyright (C) 2002, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.swing.plaf; + import java.awt.Insets; + import java.io.Serializable; + + /** ! * An Insets that is marked as UIResource, ! * which indicates that it has been installed by a pluggable ! * LookAndFeel. Such insets are replaced when the LookAndFeel changes. ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public class InsetsUIResource ! extends Insets ! implements Cloneable, UIResource, Serializable { + /** + * Determined using the serialver tool + * of Apple/Sun JDK 1.3.1 on MacOS X 10.1.5. + */ + static final long serialVersionUID = 5622110143266315421L; + + + /** + * Constructs a new InsetsUIResource given the + * inset at each edge. + * + * @param top the inset at the top, in pixels. + * @param left the inset at the left, in pixels. + * @param bottom the inset at the bottom, in pixels. + * @param right the inset at the right, in pixels. + */ public InsetsUIResource(int top, int left, int bottom, int right) { super(top, left, bottom, right); } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/InternalFrameUI.java gcc-3.4.0/libjava/javax/swing/plaf/InternalFrameUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/InternalFrameUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/InternalFrameUI.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,5 **** /* InternalFrameUI.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* InternalFrameUI.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,59 **** package javax.swing.plaf; /** ! * InternalFrameUI ! * @author Andrew Selkirk ! * @version 1.0 */ ! public abstract class InternalFrameUI extends ComponentUI { ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Constructor InternalFrameUI ! */ ! public InternalFrameUI() { ! // TODO ! } // InternalFrameUI() ! ! ! } // InternalFrameUI --- 37,59 ---- package javax.swing.plaf; + /** ! * An abstract base class for delegates that implement the pluggable ! * look and feel for a JInternalFrame. ! * ! * @see javax.swing.JInternalFrame ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public abstract class InternalFrameUI ! extends ComponentUI ! { ! /** ! * Constructs a new InternalFrameUI. ! */ ! public InternalFrameUI() ! { ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/LabelUI.java gcc-3.4.0/libjava/javax/swing/plaf/LabelUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/LabelUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/LabelUI.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,6 **** ! package javax.swing.plaf; ! public class LabelUI extends ComponentUI { } --- 1,59 ---- ! /* LabelUI.java ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. + This file is part of GNU Classpath. ! GNU Classpath is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! GNU Classpath is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with GNU Classpath; see the file COPYING. If not, write to the ! Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ! 02111-1307 USA. ! ! Linking this library statically or dynamically with other modules is ! making a combined work based on this library. Thus, the terms and ! conditions of the GNU General Public License cover the whole ! combination. ! ! As a special exception, the copyright holders of this library give you ! permission to link this library with independent modules to produce an ! executable, regardless of the license terms of these independent ! modules, and to copy and distribute the resulting executable under ! terms of your choice, provided that you also meet, for each linked ! independent module, the terms and conditions of the license of that ! module. An independent module is a module which is not derived from ! or based on this library. If you modify this library, you may extend ! this exception to your version of the library, but you are not ! obligated to do so. If you do not wish to do so, delete this ! exception statement from your version. */ ! ! ! package javax.swing.plaf; ! ! /** ! * An abstract base class for delegates that implement the pluggable ! * look and feel for a JLabel. ! * ! * @see javax.swing.JLabel ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ ! public abstract class LabelUI ! extends ComponentUI { + /** + * Constructs a new LabelUI. + */ + public LabelUI() + { + } } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/ListUI.java gcc-3.4.0/libjava/javax/swing/plaf/ListUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/ListUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/ListUI.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,6 **** package javax.swing.plaf; ! public class ListUI extends ComponentUI { } --- 1,114 ---- + /* ListUI.java + Copyright (C) 2002, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.swing.plaf; + import java.awt.Point; + import java.awt.Rectangle; + import javax.swing.JList; ! ! /** ! * An abstract base class for delegates that implement the pluggable ! * look and feel for a JList. ! * ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ ! public abstract class ListUI ! extends ComponentUI { + /** + * Constructs a new ListUI. + */ + public ListUI() + { + } + + + /** + * Determines the cell index which is the closest to the specified + * location. The find out whether the returned cell actually + * contains the location, the caller should also use {@link + * #getCellBounds}. + * + * @param list the JList for which this delegate object + * provides the pluggable user interface. + * + * @param location a point in the JList coordinate + * system. + * + * @return the index of the closest cell, or -1 if the list model + * is empty. + */ + public abstract int locationToIndex(JList index, Point location); + + + /** + * Determines the location of the specified cell. + * + * @param list the JList for which this delegate object + * provides the pluggable user interface. + * + * @param index the zero-based index of the cell whose location shall be + * determined. + * + * @return the position of the top left corner of the cell in the + * JList coordinate system, or null + * if cell does not designate a valid cell. + */ + public abstract Point indexToLocation(JList list, int index); + + + /** + * Determines the bounding box of the rectangle spanned by + * two list indices. + * + * @param list the JList for which this delegate object + * provides the pluggable user interface. + * + * @param index1 the zero-based index of the first cell. + * + * @param index2 the zero-based index of the second cell. + * + * @return the spanned rectangle, or null if either + * index1 or index2 does not + * designate a valid cell. + */ + public abstract Rectangle getCellBounds(JList list, + int index1, int index2); } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/MenuBarUI.java gcc-3.4.0/libjava/javax/swing/plaf/MenuBarUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/MenuBarUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/MenuBarUI.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,5 **** /* MenuBarUI.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* MenuBarUI.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,59 **** package javax.swing.plaf; /** ! * MenuBarUI ! * @author Andrew Selkirk ! * @version 1.0 */ ! public abstract class MenuBarUI extends ComponentUI { ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Constructor MenuBarUI ! */ ! public MenuBarUI() { ! // TODO ! } // MenuBarUI() ! ! ! } // MenuBarUI --- 37,59 ---- package javax.swing.plaf; + /** ! * An abstract base class for delegates that implement the pluggable ! * look and feel for a JMenuBar. ! * ! * @see javax.swing.JMenuBar ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public abstract class MenuBarUI ! extends ComponentUI ! { ! /** ! * Constructs a new MenuBarUI. ! */ ! public MenuBarUI() ! { ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/MenuItemUI.java gcc-3.4.0/libjava/javax/swing/plaf/MenuItemUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/MenuItemUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/MenuItemUI.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,5 **** /* MenuItemUI.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* MenuItemUI.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,59 **** package javax.swing.plaf; /** ! * MenuItemUI ! * @author Andrew Selkirk ! * @version 1.0 */ ! public abstract class MenuItemUI extends ButtonUI { ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Constructor MenuItemUI ! */ ! public MenuItemUI() { ! // TODO ! } // MenuItemUI() ! ! ! } // MenuItemUI --- 37,59 ---- package javax.swing.plaf; + /** ! * An abstract base class for delegates that implement the pluggable ! * look and feel for a JMenuItem. ! * ! * @see javax.swing.JMenuItem ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public abstract class MenuItemUI ! extends ButtonUI ! { ! /** ! * Constructs a new MenuItemUI. ! */ ! public MenuItemUI() ! { ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/metal/MetalLookAndFeel.java gcc-3.4.0/libjava/javax/swing/plaf/metal/MetalLookAndFeel.java *** gcc-3.3.3/libjava/javax/swing/plaf/metal/MetalLookAndFeel.java 2002-08-09 04:45:29.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/metal/MetalLookAndFeel.java 2003-10-12 13:26:01.000000000 +0000 *************** *** 1,11 **** ! package javax.swing.plaf.metal; ! import javax.swing.*; ! import javax.swing.plaf.*; ! import javax.swing.plaf.basic.*; ! public class MetalLookAndFeel extends LookAndFeel { public boolean isNativeLookAndFeel() { return true; } public boolean isSupportedLookAndFeel() { return true; } --- 1,49 ---- ! /* MetalLookAndFeel.java ! Copyright (C) 2002 Free Software Foundation, Inc. ! This file is part of GNU Classpath. + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. ! GNU Classpath is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with GNU Classpath; see the file COPYING. If not, write to the ! Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ! 02111-1307 USA. ! ! Linking this library statically or dynamically with other modules is ! making a combined work based on this library. Thus, the terms and ! conditions of the GNU General Public License cover the whole ! combination. ! ! As a special exception, the copyright holders of this library give you ! permission to link this library with independent modules to produce an ! executable, regardless of the license terms of these independent ! modules, and to copy and distribute the resulting executable under ! terms of your choice, provided that you also meet, for each linked ! independent module, the terms and conditions of the license of that ! module. An independent module is a module which is not derived from ! or based on this library. If you modify this library, you may extend ! this exception to your version of the library, but you are not ! obligated to do so. If you do not wish to do so, delete this ! exception statement from your version. */ ! ! ! ! package javax.swing.plaf.metal; ! ! import javax.swing.UIDefaults; ! import javax.swing.plaf.basic.BasicDefaults; ! import javax.swing.plaf.basic.BasicLookAndFeel; ! ! public class MetalLookAndFeel extends BasicLookAndFeel { public boolean isNativeLookAndFeel() { return true; } public boolean isSupportedLookAndFeel() { return true; } *************** public class MetalLookAndFeel extends Lo *** 28,31 **** // Returns the default values for this look and feel. return LAF_defaults; } ! }; --- 66,69 ---- // Returns the default values for this look and feel. return LAF_defaults; } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/OptionPaneUI.java gcc-3.4.0/libjava/javax/swing/plaf/OptionPaneUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/OptionPaneUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/OptionPaneUI.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,6 **** package javax.swing.plaf; - import javax.accessibility.*; ! public class OptionPaneUI extends ComponentUI { } --- 1,75 ---- + /* OptionPaneUI.java + Copyright (C) 2002, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + package javax.swing.plaf; ! import javax.swing.JOptionPane; ! ! /** ! * An abstract base class for delegates that implement the pluggable ! * look and feel for a JOptionPane. ! * ! * @see javax.swing.JOptionPane ! * ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ ! public abstract class OptionPaneUI ! extends ComponentUI { + /** + * Gives keyboard input focus to the component that represents + * the default value. + * + * @param pane the JOptionPane for which this delegate + * object provides the pluggable user interface. + */ + public abstract void selectInitialValue(JOptionPane pane); + + + /** + * Determines whether the user has provided custom components + * for the options or the message. + * + * @param pane the JOptionPane for which this delegate + * object provides the pluggable user interface. + * + * @return true if the user has supplied any custom + * components; false if all components are + * provided by Swing or a LookAndFeel. + */ + public abstract boolean containsCustomComponents(JOptionPane pane); } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/PanelUI.java gcc-3.4.0/libjava/javax/swing/plaf/PanelUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/PanelUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/PanelUI.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,6 **** ! package javax.swing.plaf; ! public class PanelUI extends ComponentUI { } --- 1,58 ---- ! /* PanelUI.java ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. + This file is part of GNU Classpath. ! GNU Classpath is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! GNU Classpath is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with GNU Classpath; see the file COPYING. If not, write to the ! Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ! 02111-1307 USA. ! ! Linking this library statically or dynamically with other modules is ! making a combined work based on this library. Thus, the terms and ! conditions of the GNU General Public License cover the whole ! combination. ! ! As a special exception, the copyright holders of this library give you ! permission to link this library with independent modules to produce an ! executable, regardless of the license terms of these independent ! modules, and to copy and distribute the resulting executable under ! terms of your choice, provided that you also meet, for each linked ! independent module, the terms and conditions of the license of that ! module. An independent module is a module which is not derived from ! or based on this library. If you modify this library, you may extend ! this exception to your version of the library, but you are not ! obligated to do so. If you do not wish to do so, delete this ! exception statement from your version. */ ! ! ! package javax.swing.plaf; ! ! /** ! * An abstract base class for delegates that implement the pluggable ! * look and feel for a JPanel. ! * ! * @see javax.swing.JPanel ! * ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ ! public abstract class PanelUI ! extends ComponentUI { + /** + * Constructs a new PanelUI. + */ + public PanelUI() + { + } } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/PopupMenuUI.java gcc-3.4.0/libjava/javax/swing/plaf/PopupMenuUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/PopupMenuUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/PopupMenuUI.java 2003-06-27 12:41:52.000000000 +0000 *************** *** 1,5 **** /* PopupMenuUI.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* PopupMenuUI.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,76 **** package javax.swing.plaf; ! // Imports ! import java.awt.event.*; /** ! * PopupMenuUI ! * @author Andrew Selkirk ! * @version 1.0 */ ! public abstract class PopupMenuUI extends ComponentUI { ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Constructor PopupMenuUI ! */ ! public PopupMenuUI() { ! // TODO ! } // PopupMenuUI() ! - //------------------------------------------------------------- - // Methods ---------------------------------------------------- - //------------------------------------------------------------- ! /** ! * isPopupTrigger ! * @param event TODO ! * @returns boolean ! */ ! public boolean isPopupTrigger(MouseEvent event) { ! return false; // TODO ! } // isPopupTrigger() ! } // PopupMenuUI --- 37,116 ---- package javax.swing.plaf; ! import java.awt.event.MouseEvent; ! import javax.swing.JPopupMenu; ! import javax.swing.Popup; ! import javax.swing.PopupFactory; ! /** ! * An abstract base class for delegates that implement the pluggable ! * look and feel for a JPopupMenu. ! * ! * @see javax.swing.JPopupMenu ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public abstract class PopupMenuUI ! extends ComponentUI ! { ! /** ! * Constructs a new PopupMenuUI. ! */ ! public PopupMenuUI() ! { ! } ! /** ! * Tests whether or not a mouse event triggers a popup menu. ! * ! *

                The default implementation calls ! * event.isPopupTrigger(), which checks for the gesture ! * that is common for the platform on which the application runs. If ! * a look and feel wants to employ non-standard conventions for ! * triggering a popup menu, it can override this method. ! * ! * @param event the event to check. ! * ! * @return true if the event triggers a popup menu; ! * false otherwise. ! * ! * @since 1.3 ! */ ! public boolean isPopupTrigger(MouseEvent event) ! { ! return event.isPopupTrigger(); ! } ! /** ! * Creates a Popup for displaying the popup menu. The ! * default implementation uses the {@link javax.swing.PopupFactory} ! * for retrieving a suitable Popup, but subclasses ! * might want to override this method if a LookAndFeel needs special ! * Popups. ! * ! * @param popup the JPopupMenu for whose display ! * a Popup is needed. ! * ! * @param x the horizontal position where the popup will be ! * displayed. ! * ! * @param y the vertical position where the popup will be ! * displayed. ! * ! * @return a Popup for showing and hiding ! * the menu. ! * ! * @since 1.4 ! */ ! public Popup getPopup(JPopupMenu popup, int x, int y) ! { ! return PopupFactory.getSharedInstance().getPopup( ! /* origin/owner of the popup */ popup.getInvoker(), ! /* contents */ popup, ! x, y); ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/ProgressBarUI.java gcc-3.4.0/libjava/javax/swing/plaf/ProgressBarUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/ProgressBarUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/ProgressBarUI.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,5 **** /* ProgressBarUI.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ProgressBarUI.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,59 **** package javax.swing.plaf; /** ! * ProgressBarUI ! * @author Andrew Selkirk ! * @version 1.0 */ ! public abstract class ProgressBarUI extends ComponentUI { ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Constructor ProgressBarUI ! */ ! public ProgressBarUI() { ! // TODO ! } // ProgressBarUI() ! ! ! } // ProgressBarUI --- 37,59 ---- package javax.swing.plaf; + /** ! * An abstract base class for delegates that implement the pluggable ! * look and feel for a JProgressBar. ! * ! * @see javax.swing.JProgressBar ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public abstract class ProgressBarUI ! extends ComponentUI ! { ! /** ! * Constructs a new ProgressBarUI. ! */ ! public ProgressBarUI() ! { ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/RootPaneUI.java gcc-3.4.0/libjava/javax/swing/plaf/RootPaneUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/RootPaneUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/RootPaneUI.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,5 **** /* RootPaneUI.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* RootPaneUI.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 38,59 **** package javax.swing.plaf; /** ! * RootPaneUI ! * @author Andrew Selkirk ! * @version 1.0 */ ! public abstract class RootPaneUI extends ComponentUI { ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Constructor RootPaneUI ! */ ! public RootPaneUI() { ! // TODO ! } // RootPaneUI() ! ! ! } // RootPaneUI --- 38,58 ---- package javax.swing.plaf; /** ! * An abstract base class for delegates that implement the pluggable ! * look and feel for a JRootPane. ! * ! * @see javax.swing.JRootPane ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public abstract class RootPaneUI ! extends ComponentUI ! { ! /** ! * Constructs a new RootPaneUI. ! */ ! public RootPaneUI() ! { ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/ScrollBarUI.java gcc-3.4.0/libjava/javax/swing/plaf/ScrollBarUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/ScrollBarUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/ScrollBarUI.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,5 **** /* ScrollBarUI.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ScrollBarUI.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 38,59 **** package javax.swing.plaf; /** ! * ScrollBarUI ! * @author Andrew Selkirk ! * @version 1.0 */ ! public abstract class ScrollBarUI extends ComponentUI { ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Constructor ScrollBarUI ! */ ! public ScrollBarUI() { ! // TODO ! } // ScrollBarUI() ! ! ! } // ScrollBarUI --- 38,58 ---- package javax.swing.plaf; /** ! * An abstract base class for delegates that implement the pluggable ! * look and feel for a JScrollBar. ! * ! * @see javax.swing.JScrollBar ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public abstract class ScrollBarUI ! extends ComponentUI ! { ! /** ! * Constructs a new ScrollBarUI. ! */ ! public ScrollBarUI() ! { ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/ScrollPaneUI.java gcc-3.4.0/libjava/javax/swing/plaf/ScrollPaneUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/ScrollPaneUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/ScrollPaneUI.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,5 **** /* ScrollPaneUI.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ScrollPaneUI.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,59 **** package javax.swing.plaf; /** ! * ScrollPaneUI ! * @author Andrew Selkirk ! * @version 1.0 */ ! public abstract class ScrollPaneUI extends ComponentUI { ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Constructor ScrollPaneUI ! */ ! public ScrollPaneUI() { ! // TODO ! } // ScrollPaneUI() ! ! ! } // ScrollPaneUI --- 37,59 ---- package javax.swing.plaf; + /** ! * An abstract base class for delegates that implement the pluggable ! * look and feel for a JScrollPane. ! * ! * @see javax.swing.JScrollPane ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public abstract class ScrollPaneUI ! extends ComponentUI ! { ! /** ! * Constructs a new ScrollPaneUI. ! */ ! public ScrollPaneUI() ! { ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/SeparatorUI.java gcc-3.4.0/libjava/javax/swing/plaf/SeparatorUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/SeparatorUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/SeparatorUI.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,5 **** /* SeparatorUI.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* SeparatorUI.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 38,59 **** package javax.swing.plaf; /** ! * SeparatorUI ! * @author Andrew Selkirk ! * @version 1.0 */ ! public abstract class SeparatorUI extends ComponentUI { ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Constructor SeparatorUI ! */ ! public SeparatorUI() { ! // TODO ! } // SeparatorUI() ! ! ! } // SeparatorUI --- 38,58 ---- package javax.swing.plaf; /** ! * An abstract base class for delegates that implement the pluggable ! * look and feel for a JSeparator. ! * ! * @see javax.swing.JSeparator ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public abstract class SeparatorUI ! extends ComponentUI ! { ! /** ! * Constructs a new SeparatorUI. ! */ ! public SeparatorUI() ! { ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/SliderUI.java gcc-3.4.0/libjava/javax/swing/plaf/SliderUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/SliderUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/SliderUI.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,5 **** /* SliderUI.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* SliderUI.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,59 **** package javax.swing.plaf; /** ! * SliderUI ! * @author Andrew Selkirk ! * @version 1.0 */ ! public abstract class SliderUI extends ComponentUI { ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Constructor SliderUI ! */ ! public SliderUI() { ! // TODO ! } // SliderUI() ! ! ! } // SliderUI --- 37,59 ---- package javax.swing.plaf; + /** ! * An abstract base class for delegates that implement the pluggable ! * look and feel for a JSlider. ! * ! * @see javax.swing.JSlider ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public abstract class SliderUI ! extends ComponentUI ! { ! /** ! * Constructs a new SliderUI. ! */ ! public SliderUI() ! { ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/SpinnerUI.java gcc-3.4.0/libjava/javax/swing/plaf/SpinnerUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/SpinnerUI.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/SpinnerUI.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 0 **** --- 1,59 ---- + /* SpinnerUI.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.swing.plaf; + + + /** + * An abstract base class for delegates that implement the pluggable + * look and feel for a JSpinner. + * + * @since 1.4 + * @see javax.swing.JSpinner + * + * @author Sascha Brawer (brawer@dandelis.ch) + */ + public abstract class SpinnerUI + extends ComponentUI + { + /** + * Constructs a new SpinnerUI. + */ + public SpinnerUI() + { + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/SplitPaneUI.java gcc-3.4.0/libjava/javax/swing/plaf/SplitPaneUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/SplitPaneUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/SplitPaneUI.java 2003-06-27 12:41:52.000000000 +0000 *************** *** 1,5 **** /* SplitPaneUI.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* SplitPaneUI.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,111 **** package javax.swing.plaf; - // Imports - import java.awt.*; - import javax.swing.*; ! /** ! * SplitPaneUI ! * @author Andrew Selkirk ! * @version 1.0 ! */ ! public abstract class SplitPaneUI extends ComponentUI { - //------------------------------------------------------------- - // Initialization --------------------------------------------- - //------------------------------------------------------------- ! /** ! * Constructor SplitPaneUI ! */ ! public SplitPaneUI() { ! // TODO ! } // SplitPaneUI() ! //------------------------------------------------------------- ! // Methods ---------------------------------------------------- ! //------------------------------------------------------------- - /** - * resetToPreferredSizes - * @param splitpane TODO - */ - public abstract void resetToPreferredSizes(JSplitPane splitpane); ! /** ! * setDividerLocation ! * @param splitpane TODO ! * @param location TODO ! */ ! public abstract void setDividerLocation(JSplitPane splitpane, ! int location); - /** - * getDividerLocation - * @param splitpane TODO - * @returns int - */ - public abstract int getDividerLocation(JSplitPane splitpane); ! /** ! * getMinimumDividerLocation ! * @param splitpane TODO ! * @returns int ! */ ! public abstract int getMinimumDividerLocation(JSplitPane splitpane); - /** - * getMaximumDividerLocation - * @param splitpane TODO - * @returns int - */ - public abstract int getMaximumDividerLocation(JSplitPane splitpane); ! /** ! * finishedPaintingChildren ! * @param splitpane TODO ! * @param graphics TODO ! */ ! public abstract void finishedPaintingChildren(JSplitPane splitpane, ! Graphics graphics); ! } // SplitPaneUI --- 37,133 ---- package javax.swing.plaf; ! import java.awt.Graphics; ! import javax.swing.JSplitPane; ! /** ! * An abstract base class for delegates that implement the pluggable ! * look and feel for a JSplitPane. ! * ! * @see javax.swing.JSplitPane ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ ! public abstract class SplitPaneUI ! extends ComponentUI ! { ! /** ! * Constructs a new SplitPaneUI. ! */ ! public SplitPaneUI() ! { ! } ! /** ! * Moves the divider to the location which best respects ! * the preferred sizes of the children. ! * ! * @param pane the JSplitPane for thich this ! * delegate provides the look and feel. ! */ ! public abstract void resetToPreferredSizes(JSplitPane pane); ! /** ! * Moves the divider to the specified location. ! * ! * @param pane the JSplitPane for thich this ! * delegate provides the look and feel. ! * ! * @param location the new location of the divider. ! */ ! public abstract void setDividerLocation(JSplitPane pane, ! int location); ! /** ! * Determines the current location of the divider. ! * ! * @param pane the JSplitPane for thich this ! * delegate provides the look and feel. ! * ! * @return the current location of the divider. ! */ ! public abstract int getDividerLocation(JSplitPane pane); ! ! ! /** ! * Determines the minimum location of the divider. ! * ! * @param pane the JSplitPane for thich this ! * delegate provides the look and feel. ! * ! * @return the leftmost (or topmost) possible location ! * of the divider. ! */ ! public abstract int getMinimumDividerLocation(JSplitPane pane); ! /** ! * Determines the maximum location of the divider. ! * ! * @param pane the JSplitPane for thich this ! * delegate provides the look and feel. ! * ! * @return the bottommost (or rightmost) possible location ! * of the divider. ! */ ! public abstract int getMaximumDividerLocation(JSplitPane pane); ! /** ! * Called by the JSplitPane after it has finished ! * painting its children. ! * ! * @param pane the JSplitPane for thich this ! * delegate provides the look and feel. ! * ! * @param g the Graphics used for painting. ! */ ! public abstract void finishedPaintingChildren(JSplitPane pane, ! Graphics g); ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/TabbedPaneUI.java gcc-3.4.0/libjava/javax/swing/plaf/TabbedPaneUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/TabbedPaneUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/TabbedPaneUI.java 2003-06-27 12:41:52.000000000 +0000 *************** *** 1,23 **** package javax.swing.plaf; ! import java.awt.*; ! import javax.swing.*; ! public class TabbedPaneUI extends ComponentUI { ! public Rectangle getTabBounds(JTabbedPane pane, int index) ! { ! return null; ! } ! public int getTabRunCount(JTabbedPane pane) ! { ! return 0; ! } ! public int tabForCoordinate(JTabbedPane pane, int x, int y) ! { ! return 0; ! } } --- 1,111 ---- + /* TabbedPaneUI.java + Copyright (C) 2002, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.swing.plaf; ! import java.awt.Rectangle; ! import javax.swing.JTabbedPane; ! ! /** ! * An abstract base class for delegates that implement the pluggable ! * look and feel for a JTabbedPane. ! * ! * @see javax.swing.JTabbedPane ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ ! public abstract class TabbedPaneUI ! extends ComponentUI { ! /** ! * Constructs a new TabbedPaneUI. ! */ ! public TabbedPaneUI() ! { ! } ! ! ! /** ! * Determines which tab lies at a given position. ! * ! * @param pane the JTabbedPane for which this ! * delegate object provides the user interface. ! * ! * @param x the horizontal position, where zero is the left ! * edge of pane. ! * ! * @param y the vertical position, where zero is the top ! * edge of pane. ! * ! * @return the zero-based index of the tab, or -1 if no ! * tab is at the specified position. ! */ ! public abstract int tabForCoordinate(JTabbedPane pane, ! int x, int y); ! ! /** ! * Calculates the bounding box of a tab. ! * ! * @param pane the JTabbedPane for which this ! * delegate object provides the user interface. ! * ! * @param index the index of the tab, which must be an integer ! * in the range [0 .. pane.getTabCount() - 1]. ! * ! * @return the bounding box of the index-th tab, ! * in the coordinate system of pane. ! */ ! public abstract Rectangle getTabBounds(JTabbedPane pane, int index); ! ! /** ! * Determines how many runs are used to display tabs. ! * ! * @param pane the JTabbedPane for which this ! * delegate object provides the user interface. ! * ! * @return the number of tab runs. ! * ! * @see javax.swing.JTabbedPane#getTabRunCount() ! */ ! public abstract int getTabRunCount(JTabbedPane pane); } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/TableHeaderUI.java gcc-3.4.0/libjava/javax/swing/plaf/TableHeaderUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/TableHeaderUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/TableHeaderUI.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,5 **** /* TableHeaderUI.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* TableHeaderUI.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,59 **** package javax.swing.plaf; /** ! * TableHeaderUI ! * @author Andrew Selkirk ! * @version 1.0 */ ! public abstract class TableHeaderUI extends ComponentUI { ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Constructor TableHeaderUI ! */ ! public TableHeaderUI() { ! // TODO ! } // TableHeaderUI() ! ! ! } // TableHeaderUI --- 37,59 ---- package javax.swing.plaf; + /** ! * An abstract base class for delegates that implement the pluggable ! * look and feel for a JTableHeader. ! * ! * @see javax.swing.table.JTableHeader ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public abstract class TableHeaderUI ! extends ComponentUI ! { ! /** ! * Constructs a new TableHeaderUI. ! */ ! public TableHeaderUI() ! { ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/TableUI.java gcc-3.4.0/libjava/javax/swing/plaf/TableUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/TableUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/TableUI.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,5 **** /* TableUI.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* TableUI.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,59 **** package javax.swing.plaf; /** ! * TableUI ! * @author Andrew Selkirk ! * @version 1.0 */ ! public abstract class TableUI extends ComponentUI { ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Constructor TableUI ! */ ! public TableUI() { ! // TODO ! } // TableUI() ! ! ! } // TableUI --- 37,59 ---- package javax.swing.plaf; + /** ! * An abstract base class for delegates that implement the pluggable ! * look and feel for a JTable. ! * ! * @see javax.swing.JTable ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public abstract class TableUI ! extends ComponentUI ! { ! /** ! * Constructs a new TableUI. ! */ ! public TableUI() ! { ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/TextUI.java gcc-3.4.0/libjava/javax/swing/plaf/TextUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/TextUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/TextUI.java 2003-06-27 12:41:52.000000000 +0000 *************** *** 1,26 **** package javax.swing.plaf; ! import javax.swing.text.*; ! import java.awt.*; ! public abstract class TextUI extends ComponentUI { ! public TextUI() ! { ! } ! ! public abstract void damageRange(JTextComponent t, int p0, int p1); ! public abstract void damageRange(JTextComponent t, int p0, int p1, Position.Bias firstBias, Position.Bias secondBias); ! public abstract EditorKit getEditorKit(JTextComponent t); ! public abstract int getNextVisualPositionFrom(JTextComponent t, ! int pos, ! Position.Bias b, ! int direction, ! Position.Bias[] biasRet); ! public abstract View getRootView(JTextComponent t); ! public abstract Rectangle modelToView(JTextComponent t, int pos); ! public abstract Rectangle modelToView(JTextComponent t, int pos, Position.Bias bias); ! public abstract int viewToModel(JTextComponent t, Point pt); ! public abstract int viewToModel(JTextComponent t, Point pt, Position.Bias[] biasReturn); } --- 1,284 ---- + /* TextUI.java + Copyright (C) 2002, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.swing.plaf; ! import java.awt.Point; ! import java.awt.Rectangle; ! import javax.swing.text.BadLocationException; ! import javax.swing.text.EditorKit; ! import javax.swing.text.JTextComponent; ! import javax.swing.text.Position; ! import javax.swing.text.View; ! ! /** ! * An abstract base class for delegates that provide the user ! * interface for text editors. ! * ! * @see javax.swing.text.JTextComponent ! * ! * @author Ronald Veldema (rveldema@cs.vu.nl) ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ ! public abstract class TextUI ! extends ComponentUI { ! /** ! * Constructs a new TextUI. ! */ ! public TextUI() ! { ! } ! ! ! /** ! * Calculates the geometric extent of the character at the ! * given offset. ! * ! * @param tc the JTextComponent for which this ! * delegate object provides the user interface. ! * ! * @param pos the zero-based index of the character into the ! * document model. ! * ! * @return the bounding box of the character at index ! * pos, in view coordinates. ! * ! * @throws BadLocationException if pos does not ! * designate a valid position in the document model. ! * ! * @see javax.swing.text.View#modelToView(int, ! * javax.swing.text.Position.Bias, int, ! * javax.swing.text.position.Bias, java.awt.Shape) ! */ ! public abstract Rectangle modelToView(JTextComponent tc, int pos) ! throws BadLocationException; ! ! ! /** ! * Calculates the geometric extent of the character at the ! * given offset. ! * ! * @param tc the JTextComponent for which this ! * delegate object provides the user interface. ! * ! * @param pos the zero-based index of the character into the ! * document model. ! * ! * @param bias whether to take the character before or after the ! * caret position indicated by pos. The value ! * must be either {@link ! * javax.swing.text.Position.Bias#Backward} or {@link ! * javax.swing.text.Position.Bias#Forward}. ! * ! * @return the bounding box of the character at index ! * pos, in view coordinates. ! * ! * @throws BadLocationException if pos does not ! * designate a valid position in the document model. ! * ! * @see javax.swing.text.View#modelToView(int, ! * javax.swing.text.Position.Bias, int, ! * javax.swing.text.position.Bias, java.awt.Shape) ! */ ! public abstract Rectangle modelToView(JTextComponent tc, int pos, ! Position.Bias bias) ! throws BadLocationException; ! ! ! /** ! * Finds the caret position which is closest to the specified visual ! * location. ! * ! * @param tc the JTextComponent for which this ! * delegate object provides the user interface. ! * ! * @param loc the position in view coordinates. ! * ! * @return the caret position which is closest to loc. ! * ! * @see #viewToModel(JTextComponent, Point, Position.Bias[]) ! */ ! public abstract int viewToModel(JTextComponent t, Point pt); ! ! ! /** ! * Finds the caret position which is closest to the specified visual ! * location. ! * ! * @param tc the JTextComponent for which this ! * delegate object provides the user interface. ! * ! * @param loc the position in view coordinates. ! * ! * @param outBias an array whose size must be at least one. ! * After the call, outBias[0] will indicate ! * whether loc is in the glyph before ! * (Position.Bias.Backward) or after ! * (Position.Bias.Forward) the returned ! * caret position. ! * ! * @return the caret position which is closest to loc. ! */ ! public abstract int viewToModel(JTextComponent tc, Point loc, ! Position.Bias[] outBias); + + + /** + * Calculates the caret position that is visually next to the given + * position. This is useful to determine where to move the caret + * after the user has pressed an arrow key. + * + * @param tc the JTextComponent for which this + * delegate object provides the user interface. + * + * @param pos the current caret position, a zero-based index + * into the document model. + * + * @param bias whether to take the character before or after the + * caret position indicated by pos. The value + * must be either {@link + * javax.swing.text.Position.Bias#Backward} or {@link + * javax.swing.text.Position.Bias#Forward}. + * + * @param direction the visual direction. Pass + * {@link javax.swing.SwingConstants#WEST} for the left + * arrow key, {@link javax.swing.SwingConstants#EAST} + * for the right arrow key, {@link + * javax.swing.SwingConstants#NORTH} for the up arrow + * key, or {@link javax.swing.SwingConstants#SOUTH} + * for the down arrow key. + * + * @throws BadLocationException if pos does not + * designate a valid position in the document model. + * + * @throws IllegalArgumentException if direction + * is not one of Position.Bias.Forward + * or Position.Biad.Backward. + */ + public abstract int getNextVisualPositionFrom(JTextComponent tc, + int pos, + Position.Bias bias, + int direction, + Position.Bias[] outBias) + throws BadLocationException; + + + /** + * Repaints a range of characters. + * + * @param tc the JTextComponent for which this + * delegate object provides the user interface. + * + * @param start the first character in the range that needs + * painting, indicated as an index into the document model. + * + * @param end the last character in the range that needs + * painting, indicated as an index into the document model. + * end must be greater than or equal to + * start. + */ + public abstract void damageRange(JTextComponent tc, int start, int end); + + + /** + * Repaints a range of characters, also specifying the bias for the + * start and end of the range. + * + * @param tc the JTextComponent for which this + * delegate object provides the user interface. + * + * @param start the first character in the range that needs + * painting, indicated as an index into the document model. + * + * @param end the last character in the range that needs + * painting, indicated as an index into the document model. + * end must be greater than or equal to + * start. + */ + public abstract void damageRange(JTextComponent tc, + int start, int end, + Position.Bias startBias, + Position.Bias endBias); + + + /** + * Retrieves the EditorKit managing policies and + * persistent state. + * + * @param tc the JTextComponent for which this + * delegate object provides the user interface. + * + * @return the EditorKit used by tc. + */ + public abstract EditorKit getEditorKit(JTextComponent tc); + + + /** + * Retrieves the root of the view tree that visually presents + * the text. + * + * @param tc the JTextComponent for which this + * delegate object provides the user interface. + * + * @return the root View used by tc. + */ + public abstract View getRootView(JTextComponent tc); + + + /** + * Returns a String for presenting a tool tip at the specified + * location. + * + * @param tc the JTextComponent for which this + * delegate object provides the user interface. + * + * @param loc the location for which the tool tip is requested. + * + * @return the text for the tool tip, or null to + * display no tool tip. + * + * @since 1.4 + */ + public String getToolTipText(JTextComponent tc, Point loc) + { + return null; + } } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/ToolBarUI.java gcc-3.4.0/libjava/javax/swing/plaf/ToolBarUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/ToolBarUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/ToolBarUI.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,5 **** /* ToolBarUI.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ToolBarUI.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,59 **** package javax.swing.plaf; /** ! * ToolBarUI ! * @author Andrew Selkirk ! * @version 1.0 */ ! public abstract class ToolBarUI extends ComponentUI { ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Constructor ToolBarUI ! */ ! public ToolBarUI() { ! // TODO ! } // ToolBarUI() ! ! ! } // ToolBarUI --- 37,59 ---- package javax.swing.plaf; + /** ! * An abstract base class for delegates that implement the pluggable ! * look and feel for a JToolBar. ! * ! * @see javax.swing.JToolBar ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public abstract class ToolBarUI ! extends ComponentUI ! { ! /** ! * Constructs a new ToolBarUI. ! */ ! public ToolBarUI() ! { ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/ToolTipUI.java gcc-3.4.0/libjava/javax/swing/plaf/ToolTipUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/ToolTipUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/ToolTipUI.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,5 **** /* ToolTipUI.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ToolTipUI.java -- ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,59 **** package javax.swing.plaf; /** ! * ToolTipUI ! * @author Andrew Selkirk ! * @version 1.0 */ ! public abstract class ToolTipUI extends ComponentUI { ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Constructor ToolTipUI ! */ ! public ToolTipUI() { ! // TODO ! } // ToolTipUI() ! ! ! } // ToolTipUI --- 37,59 ---- package javax.swing.plaf; + /** ! * An abstract base class for delegates that implement the pluggable ! * look and feel for a JToolTip. ! * ! * @see javax.swing.JToolTip ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public abstract class ToolTipUI ! extends ComponentUI ! { ! /** ! * Constructs a new ToolTipUI. ! */ ! public ToolTipUI() ! { ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/TreeUI.java gcc-3.4.0/libjava/javax/swing/plaf/TreeUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/TreeUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/TreeUI.java 2003-08-26 22:42:37.000000000 +0000 *************** *** 1,6 **** package javax.swing.plaf; ! public class TreeUI extends ComponentUI { } --- 1,211 ---- + /* TreeUI.java + Copyright (C) 2002, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.swing.plaf; + import java.awt.Rectangle; + import javax.swing.JTree; + import javax.swing.tree.TreePath; + ! /** ! * An abstract base class for delegates that provide the user ! * interface for JTree. ! * ! * @see javax.swing.JTree ! * ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ ! public abstract class TreeUI ! extends ComponentUI { + /** + * Constructs a new TreeUI. + */ + public TreeUI() + { + } + + + /** + * Determines the geometric extent of the label that is + * drawn for a path. + * + * @param tree the JTree for which this delegate + * object provides the user interface. + * + * @param path the path whose label extent is requested. + * + * @return a rectangle enclosing the label, or null + * if path contains invalid nodes. + */ + public abstract Rectangle getPathBounds(JTree tree, TreePath path); + + + /** + * Creates a TreePath for the specified row. + * + * @param tree the JTree for which this delegate + * object provides the user interface. + * + * @param row the index of the row, which should be a number + * in the range [0, getRowCount(tree) - 1]. + * + * @return a TreePath for the specified row, or + * null if row is outside + * the valid range. + */ + public abstract TreePath getPathForRow(JTree tree, int row); + + + /** + * Determines in which row a TreePath is currently + * being displayed. + * + * @param tree the JTree for which this delegate + * object provides the user interface. + * + * @param path the path for which the caller wants to know + * in which row it is being displayed. + * + * @return a number in the range [0, getRowCount(tree) + * - 1] if the path is currently on display; + * -1 if the path is not shown to the + * user. + */ + public abstract int getRowForPath(JTree tree, TreePath path); + + + /** + * Counts how many rows are currently displayed. + * + * @param tree the JTree for which this delegate + * object provides the user interface. + * + * @return the number of visible rows. + */ + public abstract int getRowCount(JTree tree); + + + /** + * Finds the path that is closest to the specified position. + * + *

                [A screen shot of a JTree] + * + *

                As shown by the above illustration, the bounds of the + * closest path do not necessarily need to contain the passed + * location. + * + * @param tree the JTree for which this delegate + * object provides the user interface. + * + * @param x the horizontal location, relative to the origin + * of tree. + * + * @param y the vertical location, relative to the origin + * of tree. + * + * @return the closest path, or null if the + * tree is currenlty not displaying any paths at all. + */ + public abstract TreePath getClosestPathForLocation(JTree tree, + int x, int y); + + + /** + * Determines whether the user is currently editing a tree cell. + * + * @param tree the JTree for which this delegate + * object provides the user interface. + * + * @see #getEditingPath + */ + public abstract boolean isEditing(JTree tree); + + + /** + * Stops editing a tree cell, committing the entered value into the + * tree’s model. If no editing session is active, or if the + * active editor does not agree to stopping, nothing happens. In + * some look and feels, this action happens when the user has + * pressed the enter key. + * + * @param tree the JTree for which this delegate + * object provides the user interface. + * + * @return false if the editing still goes on because + * the cell editor has objected to stopping the session; + * true if editing has been stopped. + */ + public abstract boolean stopEditing(JTree tree); + + + /** + * Cancels editing a tree cell, discarding any entered value. + * If no editing session is active, nothing happens. The cell + * editor is not given an opportunity to veto the canceling. + * In some look and feels, this action happens when the user has + * pressed the escape key. + * + * @param tree the JTree for which this delegate + * object provides the user interface. + */ + public abstract void cancelEditing(JTree tree); + + + /** + * Starts a session to edit a tree cell. If the cell editor + * rejects editing the cell, it will just be selected. + * + * @param tree the JTree for which this delegate + * object provides the user interface. + * + * @param path the cell to edit. + */ + public abstract void startEditingAtPath(JTree tree, TreePath path); + + + /** + * Retrieves the tree cell that is currently being edited. + * + * @return the currently edited path, or null + * if no editing session is currently active. + */ + public abstract TreePath getEditingPath(JTree tree); } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/UIResource.java gcc-3.4.0/libjava/javax/swing/plaf/UIResource.java *** gcc-3.3.3/libjava/javax/swing/plaf/UIResource.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/UIResource.java 2003-10-12 13:26:00.000000000 +0000 *************** exception statement from your version. * *** 39,46 **** package javax.swing.plaf; /** ! * This interface is used to designate which objects were created by ! * ComponentUI delegates. When uninstalling the user interface * renderer with ComponentUI.uninstallUI() the renderer * property is set to null. *
                --- 39,46 ---- package javax.swing.plaf; /** ! * This public interface is used to designate which objects were created by ! * ComponentUI delegates. When uninstalling the user public interface * renderer with ComponentUI.uninstallUI() the renderer * property is set to null. *
                diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/plaf/ViewportUI.java gcc-3.4.0/libjava/javax/swing/plaf/ViewportUI.java *** gcc-3.3.3/libjava/javax/swing/plaf/ViewportUI.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/plaf/ViewportUI.java 2003-06-25 12:39:15.000000000 +0000 *************** *** 1,6 **** package javax.swing.plaf; ! public class ViewportUI extends ComponentUI { } --- 1,60 ---- + /* ViewportUI.java + Copyright (C) 2002, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.swing.plaf; ! /** ! * An abstract base class for delegates that implement the pluggable ! * look and feel for a JViewport. ! * ! * @see javax.swing.JViewport ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) ! */ ! public abstract class ViewportUI ! extends ComponentUI { + /** + * Constructs a new ViewportUI. + */ + public ViewportUI() + { + } } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/PopupFactory.java gcc-3.4.0/libjava/javax/swing/PopupFactory.java *** gcc-3.3.3/libjava/javax/swing/PopupFactory.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/PopupFactory.java 2003-06-27 12:41:52.000000000 +0000 *************** *** 0 **** --- 1,139 ---- + /* PopupFactory.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package javax.swing; + + import java.awt.Component; + + + /** + * A factory for Popup objects. These are used to + * managed little windows that float over everything else, + * typically containing a popup menu. + * + * @since 1.4 + * + * @author Sascha Brawer (brawer@dandelis.ch) + */ + public class PopupFactory + { + /** + * The shared factory object. + * + * @see #getSharedFactory + * @see #setSharedFactory + */ + private static PopupFactory sharedFactory; + + + /** + * Constructs a new PopupFactory. Usually, a single + * PopupFactory is shared among multiple consumers + * of Popup. Use {@link #getSharedInstance} to retrieve + * the current factory. + */ + public PopupFactory() + { + } + + + /** + * Sets the shared factory. + * + * @param factory the PopupFactory that future invocations of + * {@link #getSharedInstance} will return. + * + * @throws IllegalArgumentException if factory + * is null. + */ + public static void setSharedInstance(PopupFactory factory) + { + if (factory == null) + throw new IllegalArgumentException(); + + /* Swing is not designed to be thread-safe, so there is no + * need to synchronize the access to the global variable. + */ + sharedFactory = factory; + } + + + /** + * Retrieves the shared factory, creating a new factory if + * necessary. + * + * @return a PopupFactory that can be used + * to create Popup objects. + */ + public static PopupFactory getSharedInstance() + { + /* Swing is not designed to be thread-safe, so there is no + * need to synchronize the access to the global variable. + */ + if (sharedFactory == null) + sharedFactory = new PopupFactory(); + + return sharedFactory; + } + + + /** + * Creates a new Popup given its owner, + * contents and the screen position where the popup + * will appear. + * + * @param owner the Component to which x and + * y are relative, or null for + * placing the popup relative to the origin of the screen. + * + * @param contents the contents that will be displayed inside + * the Popup. + * + * @param x the horizontal position where the Popup will appear. + * + * @param y the vertical position where the Popup will appear. + * + * @throws IllegalArgumentException if contents + * is null. + */ + public Popup getPopup(Component owner, Component contents, + int x, int y) + { + return new Popup.JWindowPopup(owner, contents, x, y); + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/Popup.java gcc-3.4.0/libjava/javax/swing/Popup.java *** gcc-3.3.3/libjava/javax/swing/Popup.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/Popup.java 2003-06-27 12:41:52.000000000 +0000 *************** *** 0 **** --- 1,189 ---- + /* Popup.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package javax.swing; + + import java.awt.Component; + + + /** + * Manages a popup window that displays a Component on top of + * everything else. + * + *

                To obtain an instance of Popup, use the + * {@link javax.swing.PopupFactory}. + * + * @since 1.4 + * + * @author Sascha Brawer (brawer@dandelis.ch) + */ + public class Popup + { + /** + * Constructs a new Popup given its owner, + * contents and the screen position where the popup + * will appear. + * + * @param owner the Component to which x and + * y are relative, or null for + * placing the popup relative to the origin of the screen. + * + * @param contents the contents that will be displayed inside + * the Popup. + * + * @param x the horizontal position where the Popup will appear. + * + * @param y the vertical position where the Popup will appear. + * + * @throws IllegalArgumentException if contents + * is null. + */ + protected Popup(Component owner, Component contents, + int x, int y) + { + if (contents == null) + throw new IllegalArgumentException(); + + // The real stuff happens in the implementation of subclasses, + // for instance JWindowPopup. + } + + + /** + * Constructs a new Popup. + */ + protected Popup() + { + } + + + /** + * Displays the Popup on the screen. Nothing happens + * if it is currently shown. + */ + public void show() + { + // Implemented by subclasses, for instance JWindowPopup. + } + + + /** + * Removes the Popup from the screen. Nothing happens + * if it is currently hidden. + */ + public void hide() + { + // Implemented by subclasses, for instance JWindowPopup. + } + + + /** + * A Popup that uses a JWindow for + * displaying its contents. + * + * @see PopupFactory#getPopup + * + * @author Sascha Brawer (brawer@dandelis.ch) + */ + static class JWindowPopup + extends Popup + { + /** + * The JWindow used for displaying the contents + * of the popup. + */ + JWindow window; + + + /** + * Constructs a new JWindowPopup given its owner, + * contents and the screen position where the popup + * will appear. + * + * @param owner the Component to which x and + * y are relative, or null for + * placing the popup relative to the origin of the screen. + * + * @param contents the contents that will be displayed inside + * the Popup. + * + * @param x the horizontal position where the Popup will appear. + * + * @param y the vertical position where the Popup will appear. + * + * @throws IllegalArgumentException if contents + * is null. + */ + public JWindowPopup(Component owner, Component contents, + int x, int y) + { + /* Checks whether contents is null. */ + super(owner, contents, x, y); + + window = new JWindow(); + window.getRootPane().add(contents); + window.setLocation(x, y); + window.pack(); + } + + + /** + * Displays the popup’s JWindow on the screen. + * Nothing happens if it is already visible. + */ + public void show() + { + window.show(); + } + + + /** + * Removes the popup’s JWindow from the + * screen. Nothing happens if it is currently not visible. + */ + public void hide() + { + /* Calling dispose() instead of hide() will conserve native + * system resources, for example memory in an X11 server. + * They will automatically be re-allocated by a call to + * show(). + */ + window.dispose(); + } + } + } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/ProgressMonitorInputStream.java gcc-3.4.0/libjava/javax/swing/ProgressMonitorInputStream.java *** gcc-3.3.3/libjava/javax/swing/ProgressMonitorInputStream.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/ProgressMonitorInputStream.java 2004-01-10 21:07:43.000000000 +0000 *************** *** 1,5 **** /* ProgressMonitorInputStream.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ProgressMonitorInputStream.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,45 **** package javax.swing; ! // Imports ! import java.awt.*; ! import java.io.*; /** * ProgressMonitorInputStream --- 37,46 ---- package javax.swing; ! import java.awt.Component; ! import java.io.FilterInputStream; ! import java.io.InputStream; ! import java.io.IOException; /** * ProgressMonitorInputStream diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/ProgressMonitor.java gcc-3.4.0/libjava/javax/swing/ProgressMonitor.java *** gcc-3.3.3/libjava/javax/swing/ProgressMonitor.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/ProgressMonitor.java 2004-01-10 21:07:43.000000000 +0000 *************** *** 1,5 **** /* ProgressMonitor.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ProgressMonitor.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,44 **** package javax.swing; ! // Imports ! import java.awt.*; /** * ProgressMonitor --- 37,43 ---- package javax.swing; ! import java.awt.Component; /** * ProgressMonitor diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/Renderer.java gcc-3.4.0/libjava/javax/swing/Renderer.java *** gcc-3.3.3/libjava/javax/swing/Renderer.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/Renderer.java 2004-01-10 21:07:43.000000000 +0000 *************** *** 1,5 **** /* Renderer.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Renderer.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,44 **** package javax.swing; ! // Imports ! import java.awt.*; /** * Renderer --- 37,43 ---- package javax.swing; ! import java.awt.Component; /** * Renderer *************** public interface Renderer { *** 56,68 **** * @param value TODO * @param selected TODO */ ! public void setValue(Object value, boolean selected); /** * getComponent * @returns Component */ ! public Component getComponent(); } // Renderer --- 55,67 ---- * @param value TODO * @param selected TODO */ ! void setValue(Object value, boolean selected); /** * getComponent * @returns Component */ ! Component getComponent(); } // Renderer diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/RepaintManager.java gcc-3.4.0/libjava/javax/swing/RepaintManager.java *** gcc-3.3.3/libjava/javax/swing/RepaintManager.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/RepaintManager.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,45 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing; ! // Imports ! import java.awt.*; ! import java.util.*; /** * RepaintManager --- 35,49 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; ! import java.awt.Component; ! import java.awt.Dimension; ! import java.awt.Image; ! import java.awt.Rectangle; ! import java.util.Hashtable; ! import java.util.Vector; /** * RepaintManager diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/RootPaneContainer.java gcc-3.4.0/libjava/javax/swing/RootPaneContainer.java *** gcc-3.3.3/libjava/javax/swing/RootPaneContainer.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/RootPaneContainer.java 2004-01-10 21:07:43.000000000 +0000 *************** *** 1,5 **** /* RootPaneContainer.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* RootPaneContainer.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,44 **** package javax.swing; ! // Imports ! import java.awt.*; /** * RootPaneContainer --- 37,44 ---- package javax.swing; ! import java.awt.Container; ! import java.awt.Component; /** * RootPaneContainer *************** public interface RootPaneContainer { *** 55,97 **** * getRootPane * @returns JRootPane */ ! public JRootPane getRootPane(); /** * setContentPane * @param contentPane TODO */ ! public void setContentPane(Container contentPane); /** * getContentPane * @returns Container */ ! public Container getContentPane(); /** * setLayeredPane * @param layeredPane TODO */ ! public void setLayeredPane(JLayeredPane layeredPane); /** * getLayeredPane * @returns JLayeredPane */ ! public JLayeredPane getLayeredPane(); /** * setGlassPane * @param glassPane TODO */ ! public void setGlassPane(Component glassPane); /** * getGlassPane * @returns Component */ ! public Component getGlassPane(); } // RootPaneContainer --- 55,97 ---- * getRootPane * @returns JRootPane */ ! JRootPane getRootPane(); /** * setContentPane * @param contentPane TODO */ ! void setContentPane(Container contentPane); /** * getContentPane * @returns Container */ ! Container getContentPane(); /** * setLayeredPane * @param layeredPane TODO */ ! void setLayeredPane(JLayeredPane layeredPane); /** * getLayeredPane * @returns JLayeredPane */ ! JLayeredPane getLayeredPane(); /** * setGlassPane * @param glassPane TODO */ ! void setGlassPane(Component glassPane); /** * getGlassPane * @returns Component */ ! Component getGlassPane(); } // RootPaneContainer diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/Scrollable.java gcc-3.4.0/libjava/javax/swing/Scrollable.java *** gcc-3.3.3/libjava/javax/swing/Scrollable.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/Scrollable.java 2004-01-10 21:07:43.000000000 +0000 *************** *** 1,5 **** /* Scrollable.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Scrollable.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,43 **** package javax.swing; ! import java.awt.*; public interface Scrollable { --- 37,44 ---- package javax.swing; ! import java.awt.Dimension; ! import java.awt.Rectangle; public interface Scrollable { diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/ScrollPaneConstants.java gcc-3.4.0/libjava/javax/swing/ScrollPaneConstants.java *** gcc-3.3.3/libjava/javax/swing/ScrollPaneConstants.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/ScrollPaneConstants.java 2003-10-12 13:20:49.000000000 +0000 *************** public interface ScrollPaneConstants { *** 51,157 **** /** * VIEWPORT */ ! public static final String VIEWPORT = "VIEWPORT"; /** * VERTICAL_SCROLLBAR */ ! public static final String VERTICAL_SCROLLBAR = "VERTICAL_SCROLLBAR"; /** * HORIZONTAL_SCROLLBAR */ ! public static final String HORIZONTAL_SCROLLBAR = "HORIZONTAL_SCROLLBAR"; /** * ROW_HEADER */ ! public static final String ROW_HEADER = "ROW_HEADER"; /** * COLUMN_HEADER */ ! public static final String COLUMN_HEADER = "COLUMN_HEADER"; /** * LOWER_LEFT_CORNER */ ! public static final String LOWER_LEFT_CORNER = "LOWER_LEFT_CORNER"; /** * LOWER_RIGHT_CORNER */ ! public static final String LOWER_RIGHT_CORNER = "LOWER_RIGHT_CORNER"; /** * UPPER_LEFT_CORNER */ ! public static final String UPPER_LEFT_CORNER = "UPPER_LEFT_CORNER"; /** * UPPER_RIGHT_CORNER */ ! public static final String UPPER_RIGHT_CORNER = "UPPER_RIGHT_CORNER"; /** * LOWER_LEADING_CORNER */ ! public static final String LOWER_LEADING_CORNER = "LOWER_LEADING_CORNER"; /** * LOWER_TRAILING_CORNER */ ! public static final String LOWER_TRAILING_CORNER = "LOWER_TRAILING_CORNER"; /** * UPPER_LEADING_CORNER */ ! public static final String UPPER_LEADING_CORNER = "UPPER_LEADING_CORNER"; /** * UPPER_TRAILING_CORNER */ ! public static final String UPPER_TRAILING_CORNER = "UPPER_TRAILING_CORNER"; /** * VERTICAL_SCROLLBAR_POLICY */ ! public static final String VERTICAL_SCROLLBAR_POLICY = "VERTICAL_SCROLLBAR_POLICY"; /** * HORIZONTAL_SCROLLBAR_POLICY */ ! public static final String HORIZONTAL_SCROLLBAR_POLICY = "HORIZONTAL_SCROLLBAR_POLICY"; /** * VERTICAL_SCROLLBAR_AS_NEEDED */ ! public static final int VERTICAL_SCROLLBAR_AS_NEEDED = 20; /** * VERTICAL_SCROLLBAR_NEVER */ ! public static final int VERTICAL_SCROLLBAR_NEVER = 21; /** * VERTICAL_SCROLLBAR_ALWAYS */ ! public static final int VERTICAL_SCROLLBAR_ALWAYS = 22; /** * HORIZONTAL_SCROLLBAR_AS_NEEDED */ ! public static final int HORIZONTAL_SCROLLBAR_AS_NEEDED = 30; /** * HORIZONTAL_SCROLLBAR_NEVER */ ! public static final int HORIZONTAL_SCROLLBAR_NEVER = 31; /** * HORIZONTAL_SCROLLBAR_ALWAYS */ ! public static final int HORIZONTAL_SCROLLBAR_ALWAYS = 32; } // ScrollPaneConstants --- 51,157 ---- /** * VIEWPORT */ ! String VIEWPORT = "VIEWPORT"; /** * VERTICAL_SCROLLBAR */ ! String VERTICAL_SCROLLBAR = "VERTICAL_SCROLLBAR"; /** * HORIZONTAL_SCROLLBAR */ ! String HORIZONTAL_SCROLLBAR = "HORIZONTAL_SCROLLBAR"; /** * ROW_HEADER */ ! String ROW_HEADER = "ROW_HEADER"; /** * COLUMN_HEADER */ ! String COLUMN_HEADER = "COLUMN_HEADER"; /** * LOWER_LEFT_CORNER */ ! String LOWER_LEFT_CORNER = "LOWER_LEFT_CORNER"; /** * LOWER_RIGHT_CORNER */ ! String LOWER_RIGHT_CORNER = "LOWER_RIGHT_CORNER"; /** * UPPER_LEFT_CORNER */ ! String UPPER_LEFT_CORNER = "UPPER_LEFT_CORNER"; /** * UPPER_RIGHT_CORNER */ ! String UPPER_RIGHT_CORNER = "UPPER_RIGHT_CORNER"; /** * LOWER_LEADING_CORNER */ ! String LOWER_LEADING_CORNER = "LOWER_LEADING_CORNER"; /** * LOWER_TRAILING_CORNER */ ! String LOWER_TRAILING_CORNER = "LOWER_TRAILING_CORNER"; /** * UPPER_LEADING_CORNER */ ! String UPPER_LEADING_CORNER = "UPPER_LEADING_CORNER"; /** * UPPER_TRAILING_CORNER */ ! String UPPER_TRAILING_CORNER = "UPPER_TRAILING_CORNER"; /** * VERTICAL_SCROLLBAR_POLICY */ ! String VERTICAL_SCROLLBAR_POLICY = "VERTICAL_SCROLLBAR_POLICY"; /** * HORIZONTAL_SCROLLBAR_POLICY */ ! String HORIZONTAL_SCROLLBAR_POLICY = "HORIZONTAL_SCROLLBAR_POLICY"; /** * VERTICAL_SCROLLBAR_AS_NEEDED */ ! int VERTICAL_SCROLLBAR_AS_NEEDED = 20; /** * VERTICAL_SCROLLBAR_NEVER */ ! int VERTICAL_SCROLLBAR_NEVER = 21; /** * VERTICAL_SCROLLBAR_ALWAYS */ ! int VERTICAL_SCROLLBAR_ALWAYS = 22; /** * HORIZONTAL_SCROLLBAR_AS_NEEDED */ ! int HORIZONTAL_SCROLLBAR_AS_NEEDED = 30; /** * HORIZONTAL_SCROLLBAR_NEVER */ ! int HORIZONTAL_SCROLLBAR_NEVER = 31; /** * HORIZONTAL_SCROLLBAR_ALWAYS */ ! int HORIZONTAL_SCROLLBAR_ALWAYS = 32; } // ScrollPaneConstants diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/ScrollPaneLayout.java gcc-3.4.0/libjava/javax/swing/ScrollPaneLayout.java *** gcc-3.3.3/libjava/javax/swing/ScrollPaneLayout.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/ScrollPaneLayout.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,53 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing; ! // Imports ! import java.awt.*; ! import java.io.*; ! import javax.swing.plaf.*; /** * ScrollPaneLayout * @author Andrew Selkirk * @version 1.0 */ ! public class ScrollPaneLayout implements LayoutManager, ScrollPaneConstants, Serializable { //------------------------------------------------------------- // Classes ---------------------------------------------------- --- 35,59 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; ! import java.awt.Component; ! import java.awt.Container; ! import java.awt.Dimension; ! import java.awt.LayoutManager; ! import java.awt.Rectangle; ! import java.io.Serializable; /** * ScrollPaneLayout * @author Andrew Selkirk * @version 1.0 */ ! public class ScrollPaneLayout ! implements LayoutManager, ScrollPaneConstants, Serializable ! { ! static final long serialVersionUID = -4480022884523193743L; //------------------------------------------------------------- // Classes ---------------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/SingleSelectionModel.java gcc-3.4.0/libjava/javax/swing/SingleSelectionModel.java *** gcc-3.3.3/libjava/javax/swing/SingleSelectionModel.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/SingleSelectionModel.java 2004-01-10 21:07:43.000000000 +0000 *************** *** 1,5 **** /* SingleSelectionModel.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* SingleSelectionModel.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,44 **** package javax.swing; ! // Imports ! import javax.swing.event.*; /** * SingleSelectionModel --- 37,43 ---- package javax.swing; ! import javax.swing.event.ChangeListener; /** * SingleSelectionModel *************** public interface SingleSelectionModel { *** 55,90 **** * getSelectedIndex * @returns int */ ! public int getSelectedIndex(); /** * setSelectedIndex * @param index TODO */ ! public void setSelectedIndex(int index); /** * clearSelection */ ! public void clearSelection(); /** * isSelected * @returns boolean */ ! public boolean isSelected(); /** * addChangeListener * @param listener TODO */ ! public void addChangeListener(ChangeListener listener); /** * removeChangeListener * @param listener TODO */ ! public void removeChangeListener(ChangeListener listener); } // SingleSelectionModel --- 54,89 ---- * getSelectedIndex * @returns int */ ! int getSelectedIndex(); /** * setSelectedIndex * @param index TODO */ ! void setSelectedIndex(int index); /** * clearSelection */ ! void clearSelection(); /** * isSelected * @returns boolean */ ! boolean isSelected(); /** * addChangeListener * @param listener TODO */ ! void addChangeListener(ChangeListener listener); /** * removeChangeListener * @param listener TODO */ ! void removeChangeListener(ChangeListener listener); } // SingleSelectionModel diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/SizeRequirements.java gcc-3.4.0/libjava/javax/swing/SizeRequirements.java *** gcc-3.3.3/libjava/javax/swing/SizeRequirements.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/SizeRequirements.java 2003-06-11 13:20:39.000000000 +0000 *************** this exception to your version of the li *** 35,51 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing; ! // Imports ! import java.io.*; /** * SizeRequirements * @author Andrew Selkirk * @version 1.0 */ ! public class SizeRequirements implements Serializable { //------------------------------------------------------------- // Variables -------------------------------------------------- --- 35,53 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; ! import java.io.Serializable; /** * SizeRequirements * @author Andrew Selkirk * @version 1.0 */ ! public class SizeRequirements implements Serializable ! { ! static final long serialVersionUID = 9217749429906736553L; //------------------------------------------------------------- // Variables -------------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/SpinnerModel.java gcc-3.4.0/libjava/javax/swing/SpinnerModel.java *** gcc-3.3.3/libjava/javax/swing/SpinnerModel.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/SpinnerModel.java 2003-10-12 13:20:49.000000000 +0000 *************** *** 0 **** --- 1,54 ---- + /* SpinnerModel.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package javax.swing; + + import javax.swing.event.ChangeListener; + + /** + * @since 1.4 + */ + public interface SpinnerModel + { + void setValue (Object value); + public Object getValue (); + public Object getNextValue (); + public Object getPreviousValue (); + void addChangeListener (ChangeListener listener); + void removeChangeListener (ChangeListener listener); + } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/SwingConstants.java gcc-3.4.0/libjava/javax/swing/SwingConstants.java *** gcc-3.3.3/libjava/javax/swing/SwingConstants.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/SwingConstants.java 2003-10-12 13:20:49.000000000 +0000 *************** this exception to your version of the li *** 35,65 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package javax.swing; - ! public interface SwingConstants { ! public static final int CENTER = 0; ! public static final int TOP = 1; ! public static final int LEFT = 2; ! public static final int BOTTOM = 3; ! public static final int RIGHT = 4; ! public static final int NORTH = 1; ! public static final int NORTH_EAST = 2; ! public static final int EAST = 3; ! public static final int SOUTH_EAST = 4; ! public static final int SOUTH = 5; ! public static final int SOUTH_WEST = 6; ! public static final int WEST = 7; ! public static final int NORTH_WEST = 8; ! public static final int HORIZONTAL = 0; ! public static final int VERTICAL = 1; ! public static final int LEADING = 10; ! public static final int TRAILING = 11; } --- 35,64 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; ! public interface SwingConstants { ! int CENTER = 0; ! int TOP = 1; ! int LEFT = 2; ! int BOTTOM = 3; ! int RIGHT = 4; ! int NORTH = 1; ! int NORTH_EAST = 2; ! int EAST = 3; ! int SOUTH_EAST = 4; ! int SOUTH = 5; ! int SOUTH_WEST = 6; ! int WEST = 7; ! int NORTH_WEST = 8; ! int HORIZONTAL = 0; ! int VERTICAL = 1; ! int LEADING = 10; ! int TRAILING = 11; } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/SwingUtilities.java gcc-3.4.0/libjava/javax/swing/SwingUtilities.java *** gcc-3.3.3/libjava/javax/swing/SwingUtilities.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/SwingUtilities.java 2003-07-14 05:33:30.000000000 +0000 *************** this exception to your version of the li *** 35,113 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package javax.swing; ! import java.awt.*; ! public class SwingUtilities { ! ! public static FontMetrics getFontMetrics ( Font font ) { ! return Toolkit.getDefaultToolkit().getFontMetrics(font); ! } ! ! static JRootPane getRootPane(Component a) ! { ! if (a instanceof JRootPane) ! return (JRootPane) a; ! a = a.getParent(); ! ! if (a != null) ! { ! return getRootPane(a); ! } ! return null; ! } ! static void updateComponentTreeUI(JFrame comp) ! { ! } ! static public String layoutCompoundLabel(JComponent c, ! FontMetrics fm, ! String text, ! Icon i, ! int vert_a, ! int hor_i, ! int vert_text_pos, ! int hor_text_pos, ! Rectangle vr, ! Rectangle ir, ! Rectangle tr, ! int gap) ! { ! // view rect 'vr' already ok, ! // we need to compute ir (icon rect) and tr (text-rect) ! int next_x = 0;//vr.x; ! int next_y = 0;//vr.y; ! ir.height = ir.width = ir.y = ir.x = 0; ! if (i != null) ! { ! ir.x = vr.x; ! ir.y = vr.y; ! ir.width = i.getIconWidth(); ! ir.height = i.getIconWidth(); ! next_x += gap + i.getIconWidth(); ! next_y += gap + i.getIconHeight(); ! } ! tr.x = next_x; ! tr.y = vr.y + (vr.height/2); ! tr.width = fm.stringWidth(text); ! tr.height = fm.getHeight() + fm.getAscent()/2; - return text; - } } --- 35,128 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ ! package javax.swing; + import java.awt.Component; + import java.awt.Container; + import java.awt.EventQueue; + import java.awt.Font; + import java.awt.FontMetrics; + import java.awt.Graphics; + import java.awt.Insets; + import java.awt.Point; + import java.awt.Rectangle; + import java.awt.Toolkit; + import java.awt.Window; + import java.awt.event.KeyEvent; + import java.awt.event.MouseEvent; + import java.lang.reflect.InvocationTargetException; + import javax.accessibility.Accessible; + import javax.accessibility.AccessibleStateSet; ! public class SwingUtilities implements SwingConstants { ! public static FontMetrics getFontMetrics (Font font) ! { ! return Toolkit.getDefaultToolkit ().getFontMetrics (font); ! } ! public static JRootPane getRootPane (Component a) ! { ! if (a instanceof JRootPane) ! return (JRootPane) a; ! a = a.getParent(); ! if (a != null) ! { ! return getRootPane(a); ! } ! ! return null; ! } ! public static void updateComponentTreeUI(JFrame comp) ! { ! } ! public static String layoutCompoundLabel(JComponent c, ! FontMetrics fm, ! String text, ! Icon i, ! int vert_a, ! int hor_i, ! int vert_text_pos, ! int hor_text_pos, ! Rectangle vr, ! Rectangle ir, ! Rectangle tr, ! int gap) ! { ! // view rect 'vr' already ok, ! // we need to compute ir (icon rect) and tr (text-rect) ! int next_x = 0;//vr.x; ! int next_y = 0;//vr.y; ! ir.height = ir.width = ir.y = ir.x = 0; ! if (i != null) ! { ! ir.x = vr.x; ! ir.y = vr.y; ! ir.width = i.getIconWidth(); ! ir.height = i.getIconWidth(); ! next_x += gap + i.getIconWidth(); ! next_y += gap + i.getIconHeight(); ! } ! tr.x = next_x; ! tr.y = vr.y + (vr.height/2); ! tr.width = fm.stringWidth(text); ! tr.height = fm.getHeight() + fm.getAscent()/2; ! ! return text; ! } } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/table/AbstractTableModel.java gcc-3.4.0/libjava/javax/swing/table/AbstractTableModel.java *** gcc-3.3.3/libjava/javax/swing/table/AbstractTableModel.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/table/AbstractTableModel.java 2003-10-08 15:29:52.000000000 +0000 *************** this exception to your version of the li *** 35,314 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.table; ! // Imports ! import java.io.*; ! import java.util.*; ! import javax.swing.event.*; /** * AbstractTableModel * @author Andrew Selkirk */ ! public abstract class AbstractTableModel implements TableModel, Serializable { ! ! //------------------------------------------------------------- ! // Variables -------------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * listenerList ! */ ! protected EventListenerList listenerList = new EventListenerList(); ! ! ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * Constructor AbstractTableModel ! */ ! public AbstractTableModel() { ! // TODO ! } // AbstractTableModel() ! ! ! //------------------------------------------------------------- ! // Methods ---------------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * getColumnName ! * @param value0 TODO ! * @returns String ! */ ! public String getColumnName(int columnIndex) { ! ! // Variables ! int index; ! int left; ! int base; ! int multiplier; ! StringBuffer buffer; ! boolean foundFirst; ! ! // Ok, this is not the best solution in the world ! // and it does produce wrong answers starting 1378 ! // but it's a start. I sure hope there is a more ! // simple algorithm. I started with a base 10 to ! // base 26 converter and later found that there ! // were so many are exceptions that it has morphed ! // into a pile of goop. ! ! // NOTE2: I have a working algorithm which is much ! // much simplier and works for all values...I'll ! // be adding it soon... ! ! // Process Exponent levels ! buffer = new StringBuffer(); ! left = columnIndex; ! foundFirst = false; ! for (index = 6; index >= 0; index--) { ! base = (int) (Math.pow(26, index)); ! if (index > 1) { ! base = base + (int) (Math.pow(26, index - 1)); ! } ! if (base <= left) { ! multiplier = left / base; ! if (foundFirst == false && index > 0) { ! buffer.append((char) (multiplier + 64)); ! } else { ! buffer.append((char) (multiplier + 65)); ! } ! left = left - (base * multiplier); ! foundFirst = true; ! } else if (foundFirst == true || index == 0) { ! buffer.append('A'); ! } ! } // for ! ! // Return Column Name ! return buffer.toString(); ! } // getColumnName() ! /** ! * findColumn ! * @param value0 TODO ! * @returns int ! */ ! public int findColumn(String columnName) { ! // Variables ! int index; ! String name; ! int count; ! // Process Columns ! count = getColumnCount(); ! for (index = 0; index < count; index++) { ! name = getColumnName(index); ! if (columnName.equals(name) == true) { ! return index; ! } // if ! } // for ! // Unable to Locate ! return -1; ! } // findColumn() ! /** ! * getColumnClass ! * @param value0 TODO ! * @returns Class ! */ ! public Class getColumnClass(int columnIndex) { ! return Object.class; ! } // getColumnClass() ! /** ! * isCellEditable ! * @param value0 TODO ! * @param value1 TODO ! * @returns boolean ! */ ! public boolean isCellEditable(int rowIndex, int columnIndex) { ! return false; ! } // isCellEditable() ! /** ! * setValueAt ! * @param value0 TODO ! * @param value1 TODO ! * @param value2 TODO ! */ ! public void setValueAt(Object value, int rowIndex, int columnIndex) { ! // Do nothing... ! } // setValueAt() ! /** ! * addTableModelListener ! * @param value0 TODO ! */ ! public void addTableModelListener(TableModelListener listener) { ! listenerList.add(TableModelListener.class, listener); ! } // addTableModelListener() ! /** ! * removeTableModelListener ! * @param value0 TODO ! */ ! public void removeTableModelListener(TableModelListener listener) { ! listenerList.remove(TableModelListener.class, listener); ! } // removeTableModelListener() ! /** ! * fireTableDataChanged ! */ ! public void fireTableDataChanged() { ! fireTableChanged(new TableModelEvent(this)); ! } // fireTableDataChanged() ! /** ! * fireTableStructureChanged ! */ ! public void fireTableStructureChanged() { ! fireTableChanged(new TableModelEvent(this, ! TableModelEvent.HEADER_ROW)); ! } // fireTableStructureChanged() ! /** ! * fireTableRowsInserted ! * @param value0 TODO ! * @param value1 TODO ! */ ! public void fireTableRowsInserted(int firstRow, int lastRow) { ! fireTableChanged(new TableModelEvent(this, firstRow, lastRow, ! TableModelEvent.ALL_COLUMNS, TableModelEvent.INSERT)); ! } // fireTableRowsInserted() ! /** ! * fireTableRowsUpdated ! * @param value0 TODO ! * @param value1 TODO ! */ ! public void fireTableRowsUpdated(int firstRow, int lastRow) { ! fireTableChanged(new TableModelEvent(this, firstRow, lastRow, ! TableModelEvent.ALL_COLUMNS, TableModelEvent.UPDATE)); ! } // fireTableRowsUpdated() ! /** ! * fireTableRowsDeleted ! * @param value0 TODO ! * @param value1 TODO ! */ ! public void fireTableRowsDeleted(int firstRow, int lastRow) { ! fireTableChanged(new TableModelEvent(this, firstRow, lastRow, ! TableModelEvent.ALL_COLUMNS, TableModelEvent.DELETE)); ! } // fireTableRowsDeleted() ! /** ! * fireTableCellUpdated ! * @param value0 TODO ! * @param value1 TODO ! */ ! public void fireTableCellUpdated(int row, int column) { ! fireTableChanged(new TableModelEvent(this, row, row, column)); ! } // fireTableCellUpdated() ! /** ! * fireTableChanged ! * @param value0 TODO ! */ ! public void fireTableChanged(TableModelEvent event) { ! // Variables ! Object[] list; ! int index; ! TableModelListener listener; ! ! // Get Listener List ! list = listenerList.getListenerList(); ! ! for (index = 0; index < list.length; index += 2) { ! ! // Get Listener ! listener = (TableModelListener) list[index + 1]; ! ! // Notify Listener ! listener.tableChanged(event); ! } // for: index ! ! } // fireTableChanged() ! ! /** ! * getListeners ! * @param value0 TODO ! * @returns EventListener[] ! */ ! public EventListener[] getListeners(Class listenerType) { ! return listenerList.getListeners(listenerType); ! } // getListeners() ! /** ! * getValueAt ! * @param value0 TODO ! * @param value1 TODO ! * @returns Object ! */ ! public abstract Object getValueAt(int row, int column); ! /** ! * getColumnCount ! * @returns int ! */ ! public abstract int getColumnCount(); ! /** ! * getRowCount ! * @returns int ! */ ! public abstract int getRowCount(); } // AbstractTableModel - --- 35,295 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.table; ! import java.io.Serializable; ! import java.util.EventListener; ! import javax.swing.event.EventListenerList; ! import javax.swing.event.TableModelEvent; ! import javax.swing.event.TableModelListener; /** * AbstractTableModel + * * @author Andrew Selkirk */ ! public abstract class AbstractTableModel implements TableModel, Serializable ! { ! static final long serialVersionUID = -5798593159423650347L; ! /** ! * listenerList ! */ ! protected EventListenerList listenerList = new EventListenerList(); ! /** ! * Constructor AbstractTableModel ! */ ! public AbstractTableModel() ! { ! // TODO ! } ! /** ! * Get the name of the column for this index. If you do not override ! * this methode, you'll get something like: 0, A; 1, B; ...; AA; AB; ! * ... ! * ! * @param columnIndex The index of the column. ! * ! * @return The name of the column. ! */ ! public String getColumnName (int columnIndex) ! { ! int index = columnIndex + 1; ! StringBuffer buffer = new StringBuffer(); ! while (index > 0) ! { ! buffer.insert (0, (char) ('A' + ((index - 1) % 26))); ! index = (index - 1) / 26; ! } ! ! // Return column name. ! return buffer.toString(); ! } ! /** ! * Return the index of the given name. ! * ! * @param columnName The name of the column. ! * ! * @return The index of the column, -1 if not found. ! */ ! public int findColumn (String columnName) ! { ! int count = getColumnCount(); ! ! for (int index = 0; index < count; index++) ! { ! String name = getColumnName (index); ! ! if (name.equals (columnName)) ! return index; ! } ! // Unable to locate. ! return -1; ! } ! /** ! * Returns the class of a comlumn. ! * ! * @param columnIndex The index of the column. ! * ! * @return The class type of the column. ! */ ! public Class getColumnClass (int columnIndex) ! { ! return Object.class; ! } ! /** ! * Tells whether a cell is editable. ! * ! * @param rowIndex The row of the cell. ! * @param columnIndex The index of the cell. ! * ! * @return True if cell is editable. ! */ ! public boolean isCellEditable (int rowIndex, int columnIndex) ! { ! return false; ! } ! /** ! * Sets a cell to a value. ! * ! * @param value New value of cell. ! * @param rowIndex The row of the cell. ! * @param columnIndex The column of the cell. ! */ ! public void setValueAt (Object value, int rowIndex, int columnIndex) ! { ! // Do nothing... ! } ! /** ! * Add a TableModelListener. ! * ! * @param listener The listener to add. ! */ ! public void addTableModelListener (TableModelListener listener) ! { ! listenerList.add (TableModelListener.class, listener); ! } ! /** ! * Removes a TableModelListener. ! * ! * @param listener The listener to remove. ! */ ! public void removeTableModelListener (TableModelListener listener) ! { ! listenerList.remove (TableModelListener.class, listener); ! } ! /** ! * Return all registered TableModelListener objects. ! * ! * @return Array of TableModelListener objects. ! * ! * @since 1.4 ! */ ! public TableModelListener[] getTableModelListeners() ! { ! return (TableModelListener[]) ! listenerList.getListeners (TableModelListener.class); ! } ! /** ! * fireTableDataChanged ! */ ! public void fireTableDataChanged() ! { ! fireTableChanged (new TableModelEvent (this)); ! } ! /** ! * fireTableStructureChanged ! */ ! public void fireTableStructureChanged() ! { ! fireTableChanged (new TableModelEvent (this, TableModelEvent.HEADER_ROW)); ! } ! /** ! * fireTableRowsInserted ! * @param value0 TODO ! * @param value1 TODO ! */ ! public void fireTableRowsInserted (int firstRow, int lastRow) ! { ! fireTableChanged (new TableModelEvent (this, firstRow, lastRow, ! TableModelEvent.ALL_COLUMNS, ! TableModelEvent.INSERT)); ! } ! /** ! * fireTableRowsUpdated ! * @param value0 TODO ! * @param value1 TODO ! */ ! public void fireTableRowsUpdated (int firstRow, int lastRow) ! { ! fireTableChanged (new TableModelEvent (this, firstRow, lastRow, ! TableModelEvent.ALL_COLUMNS, ! TableModelEvent.UPDATE)); ! } ! /** ! * fireTableRowsDeleted ! * @param value0 TODO ! * @param value1 TODO ! */ ! public void fireTableRowsDeleted(int firstRow, int lastRow) ! { ! fireTableChanged (new TableModelEvent (this, firstRow, lastRow, ! TableModelEvent.ALL_COLUMNS, ! TableModelEvent.DELETE)); ! } ! /** ! * fireTableCellUpdated ! * @param value0 TODO ! * @param value1 TODO ! */ ! public void fireTableCellUpdated (int row, int column) ! { ! fireTableChanged (new TableModelEvent (this, row, row, column)); ! } ! /** ! * fireTableChanged ! * @param value0 TODO ! */ ! public void fireTableChanged (TableModelEvent event) ! { ! int index; ! TableModelListener listener; ! Object[] list = listenerList.getListenerList(); ! for (index = 0; index < list.length; index += 2) ! { ! listener = (TableModelListener) list [index + 1]; ! listener.tableChanged (event); ! } ! } ! /** ! * getListeners ! * @param value0 TODO ! * @return EventListener[] ! */ ! public EventListener[] getListeners (Class listenerType) ! { ! return listenerList.getListeners (listenerType); ! } ! /** ! * getValueAt ! * @param value0 TODO ! * @param value1 TODO ! * @return Object ! */ ! public abstract Object getValueAt (int row, int column); ! /** ! * getColumnCount ! * @return int ! */ ! public abstract int getColumnCount(); + /** + * getRowCount + * @return int + */ + public abstract int getRowCount(); } // AbstractTableModel diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/table/DefaultTableCellRenderer.java gcc-3.4.0/libjava/javax/swing/table/DefaultTableCellRenderer.java *** gcc-3.3.3/libjava/javax/swing/table/DefaultTableCellRenderer.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/table/DefaultTableCellRenderer.java 2003-06-11 13:20:41.000000000 +0000 *************** *** 1,14 **** --- 1,57 ---- + /* DefaultTableCellRenderer.java + Copyright (C) 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + package javax.swing.table; + import java.awt.Component; import java.io.Serializable; import javax.swing.JLabel; import javax.swing.JTable; + import javax.swing.border.Border; + /** * STUBBED */ public class DefaultTableCellRenderer extends JLabel implements TableCellRenderer, Serializable { + static final long serialVersionUID = 7878911414715528324L; + public static class UIResource extends DefaultTableCellRenderer implements javax.swing.plaf.UIResource { diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/table/DefaultTableColumnModel.java gcc-3.4.0/libjava/javax/swing/table/DefaultTableColumnModel.java *** gcc-3.3.3/libjava/javax/swing/table/DefaultTableColumnModel.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/table/DefaultTableColumnModel.java 2003-06-11 13:20:41.000000000 +0000 *************** this exception to your version of the li *** 35,55 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.table; ! // Imports ! import java.beans.*; ! import java.io.*; ! import java.util.*; ! import javax.swing.*; ! import javax.swing.event.*; /** * DefaultTableColumnModel * @author Andrew Selkirk * @version 1.0 */ ! public class DefaultTableColumnModel implements TableColumnModel, PropertyChangeListener, ListSelectionListener, Serializable { //------------------------------------------------------------- // Variables -------------------------------------------------- --- 35,67 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.table; ! import java.beans.PropertyChangeEvent; ! import java.beans.PropertyChangeListener; ! import java.io.Serializable; ! import java.util.Enumeration; ! import java.util.EventListener; ! import java.util.Vector; ! import javax.swing.ListSelectionModel; ! import javax.swing.event.ChangeEvent; ! import javax.swing.event.EventListenerList; ! import javax.swing.event.ListSelectionEvent; ! import javax.swing.event.ListSelectionListener; ! import javax.swing.event.TableColumnModelEvent; ! import javax.swing.event.TableColumnModelListener; /** * DefaultTableColumnModel * @author Andrew Selkirk * @version 1.0 */ ! public class DefaultTableColumnModel ! implements TableColumnModel, PropertyChangeListener, ! ListSelectionListener, Serializable ! { ! static final long serialVersionUID = 6580012493508960512L; //------------------------------------------------------------- // Variables -------------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/table/DefaultTableModel.java gcc-3.4.0/libjava/javax/swing/table/DefaultTableModel.java *** gcc-3.3.3/libjava/javax/swing/table/DefaultTableModel.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/table/DefaultTableModel.java 2003-10-12 13:33:31.000000000 +0000 *************** this exception to your version of the li *** 35,52 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.table; ! // Imports ! import java.io.*; ! import java.util.*; ! import javax.swing.event.*; /** * DefaultTableModel * @author Andrew Selkirk */ ! public class DefaultTableModel extends AbstractTableModel implements Serializable { //------------------------------------------------------------- // Variables -------------------------------------------------- --- 35,55 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.table; ! import java.io.Serializable; ! import java.util.Vector; ! import javax.swing.event.TableModelEvent; /** * DefaultTableModel * @author Andrew Selkirk */ ! public class DefaultTableModel extends AbstractTableModel ! implements Serializable ! { ! static final long serialVersionUID = 6680042567037222321L; //------------------------------------------------------------- // Variables -------------------------------------------------- *************** public class DefaultTableModel extends A *** 107,113 **** Vector data; Vector rowData; int rowIndex; - int columnIndex; int numColumns; // Create Data --- 110,115 ---- *************** public class DefaultTableModel extends A *** 177,183 **** // Variables int rowIndex; - int columnIndex; int numRows; int numColumns; Vector columnVector; --- 179,184 ---- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/table/JTableHeader.java gcc-3.4.0/libjava/javax/swing/table/JTableHeader.java *** gcc-3.3.3/libjava/javax/swing/table/JTableHeader.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/table/JTableHeader.java 2003-06-11 16:36:11.000000000 +0000 *************** *** 0 **** --- 1,82 ---- + /* JTableHeader.java + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package javax.swing.table; + + import java.awt.Color; + import java.awt.Cursor; + import java.awt.Dimension; + import java.awt.Font; + import java.awt.FontMetrics; + import java.awt.Point; + import java.awt.Rectangle; + import java.awt.event.FocusListener; + import java.util.Locale; + import javax.accessibility.Accessible; + import javax.accessibility.AccessibleComponent; + import javax.accessibility.AccessibleContext; + import javax.accessibility.AccessibleRole; + import javax.accessibility.AccessibleStateSet; + import javax.swing.JComponent; + import javax.swing.JTable; + import javax.swing.event.ChangeEvent; + import javax.swing.event.ListSelectionEvent; + import javax.swing.event.TableColumnModelEvent; + import javax.swing.event.TableColumnModelListener; + import javax.swing.plaf.TableHeaderUI; + + public class JTableHeader + { + protected class AccessibleJTableHeader + { + protected class AccessibleJTableHeaderEntry + { + } + } + + private static final long serialVersionUID = 5144633983372967710L; + + protected TableColumnModel columnModel; + protected TableColumn draggedColumn; + protected int draggedDistance; + protected boolean reorderingAllowed; + protected boolean resizingAllowed; + protected TableColumn resizingColumn; + protected JTable table; + protected boolean updateTableInRealTime; + } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/table/TableCellEditor.java gcc-3.4.0/libjava/javax/swing/table/TableCellEditor.java *** gcc-3.3.3/libjava/javax/swing/table/TableCellEditor.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/table/TableCellEditor.java 2003-10-12 13:33:31.000000000 +0000 *************** import javax.swing.JTable; *** 43,49 **** import javax.swing.CellEditor; /** ! * TableCellEditor interface * @author Andrew Selkirk */ public interface TableCellEditor extends CellEditor { --- 43,49 ---- import javax.swing.CellEditor; /** ! * TableCellEditor public interface * @author Andrew Selkirk */ public interface TableCellEditor extends CellEditor { *************** public interface TableCellEditor extends *** 57,63 **** * @param column Column of cell * @returns Component */ ! public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column); --- 57,63 ---- * @param column Column of cell * @returns Component */ ! Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column); diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/table/TableCellRenderer.java gcc-3.4.0/libjava/javax/swing/table/TableCellRenderer.java *** gcc-3.3.3/libjava/javax/swing/table/TableCellRenderer.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/table/TableCellRenderer.java 2003-10-12 13:33:31.000000000 +0000 *************** import java.awt.Component; *** 42,48 **** import javax.swing.JTable; /** ! * TableCellRenderer interface * @author Andrew Selkirk */ public interface TableCellRenderer { --- 42,48 ---- import javax.swing.JTable; /** ! * TableCellRenderer public interface * @author Andrew Selkirk */ public interface TableCellRenderer { *************** public interface TableCellRenderer { *** 57,63 **** * @param column Column of cell * @returns Component */ ! public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column); --- 57,63 ---- * @param column Column of cell * @returns Component */ ! Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column); diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/table/TableColumn.java gcc-3.4.0/libjava/javax/swing/table/TableColumn.java *** gcc-3.3.3/libjava/javax/swing/table/TableColumn.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/table/TableColumn.java 2003-06-11 13:20:41.000000000 +0000 *************** this exception to your version of the li *** 35,53 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.table; ! // Imports ! import java.beans.*; ! import java.io.*; ! import javax.swing.event.*; /** * TableColumn * @author Andrew Selkirk * @version 1.0 */ ! public class TableColumn implements Serializable { //------------------------------------------------------------- // Variables -------------------------------------------------- --- 35,55 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.table; ! import java.beans.PropertyChangeListener; ! import java.io.Serializable; ! import javax.swing.event.SwingPropertyChangeSupport; /** * TableColumn * @author Andrew Selkirk * @version 1.0 */ ! public class TableColumn implements Serializable ! { ! static final long serialVersionUID = -6113660025878112608L; //------------------------------------------------------------- // Variables -------------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/table/TableColumnModel.java gcc-3.4.0/libjava/javax/swing/table/TableColumnModel.java *** gcc-3.3.3/libjava/javax/swing/table/TableColumnModel.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/table/TableColumnModel.java 2003-10-12 13:33:31.000000000 +0000 *************** import javax.swing.ListSelectionModel; *** 43,49 **** import javax.swing.event.TableColumnModelListener; /** ! * TableColumnModel interface * @author Andrew Selkirk */ public interface TableColumnModel { --- 43,49 ---- import javax.swing.event.TableColumnModelListener; /** ! * TableColumnModel public interface * @author Andrew Selkirk */ public interface TableColumnModel { *************** public interface TableColumnModel { *** 52,167 **** * addColumn * @param column TableColumn */ ! public void addColumn(TableColumn column); /** * removeColumn * @param column TableColumn */ ! public void removeColumn(TableColumn column); /** * moveColumn * @param columnIndex Index of column to move * @param newIndex New index of column */ ! public void moveColumn(int columnIndex, int newIndex); /** * setColumnMargin * @param margin Margin of column */ ! public void setColumnMargin(int margin); /** * getColumnCount * @returns Column count */ ! public int getColumnCount(); /** * getColumns * @returns Enumeration of columns */ ! public Enumeration getColumns(); /** * getColumnIndex * @param columnIdentifier Column id */ ! public int getColumnIndex(Object columnIdentifier); /** * getColumn * @param columnIndex Index of column */ ! public TableColumn getColumn(int columnIndex); /** * getColumnMargin * @returns Column margin */ ! public int getColumnMargin(); /** * getColumnIndexAtX * @returns Column index as position x */ ! public int getColumnIndexAtX(int xPosition); /** * getTotalColumnWidth * @returns Total column width */ ! public int getTotalColumnWidth(); /** * setColumnSelectionAllowed * @param value Set column selection */ ! public void setColumnSelectionAllowed(boolean value); /** * getColumnSelectionAllowed * @returns true if column selection allowed, false otherwise */ ! public boolean getColumnSelectionAllowed(); /** * getSelectedColumns * @returns Selected columns */ ! public int[] getSelectedColumns(); /** * getSelectedColumnCount * @returns Count of selected columns */ ! public int getSelectedColumnCount(); /** * setSelectionModel * @param model ListSelectionModel */ ! public void setSelectionModel(ListSelectionModel model); /** * getSelectionModel * @param column TableColumn */ ! public ListSelectionModel getSelectionModel(); /** * addColumnModelListener * @param listener TableColumnModelListener */ ! public void addColumnModelListener(TableColumnModelListener listener); /** * removeColumnModelListener * @param listener TableColumnModelListener */ ! public void removeColumnModelListener(TableColumnModelListener listener); } // TableColumnModel --- 52,167 ---- * addColumn * @param column TableColumn */ ! void addColumn(TableColumn column); /** * removeColumn * @param column TableColumn */ ! void removeColumn(TableColumn column); /** * moveColumn * @param columnIndex Index of column to move * @param newIndex New index of column */ ! void moveColumn(int columnIndex, int newIndex); /** * setColumnMargin * @param margin Margin of column */ ! void setColumnMargin(int margin); /** * getColumnCount * @returns Column count */ ! int getColumnCount(); /** * getColumns * @returns Enumeration of columns */ ! Enumeration getColumns(); /** * getColumnIndex * @param columnIdentifier Column id */ ! int getColumnIndex(Object columnIdentifier); /** * getColumn * @param columnIndex Index of column */ ! TableColumn getColumn(int columnIndex); /** * getColumnMargin * @returns Column margin */ ! int getColumnMargin(); /** * getColumnIndexAtX * @returns Column index as position x */ ! int getColumnIndexAtX(int xPosition); /** * getTotalColumnWidth * @returns Total column width */ ! int getTotalColumnWidth(); /** * setColumnSelectionAllowed * @param value Set column selection */ ! void setColumnSelectionAllowed(boolean value); /** * getColumnSelectionAllowed * @returns true if column selection allowed, false otherwise */ ! boolean getColumnSelectionAllowed(); /** * getSelectedColumns * @returns Selected columns */ ! int[] getSelectedColumns(); /** * getSelectedColumnCount * @returns Count of selected columns */ ! int getSelectedColumnCount(); /** * setSelectionModel * @param model ListSelectionModel */ ! void setSelectionModel(ListSelectionModel model); /** * getSelectionModel * @param column TableColumn */ ! ListSelectionModel getSelectionModel(); /** * addColumnModelListener * @param listener TableColumnModelListener */ ! void addColumnModelListener(TableColumnModelListener listener); /** * removeColumnModelListener * @param listener TableColumnModelListener */ ! void removeColumnModelListener(TableColumnModelListener listener); } // TableColumnModel diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/table/TableModel.java gcc-3.4.0/libjava/javax/swing/table/TableModel.java *** gcc-3.3.3/libjava/javax/swing/table/TableModel.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/table/TableModel.java 2003-10-12 13:33:31.000000000 +0000 *************** package javax.swing.table; *** 41,47 **** import javax.swing.event.TableModelListener; /** ! * TableModel interface * @author Andrew Selkirk */ public interface TableModel { --- 41,47 ---- import javax.swing.event.TableModelListener; /** ! * TableModel public interface * @author Andrew Selkirk */ public interface TableModel { *************** public interface TableModel { *** 50,76 **** * getRowCount * @returns row count */ ! public int getRowCount(); /** * getColumnCount * @returns column count */ ! public int getColumnCount(); /** * getColumnName * @param columnIndex Column index * @returns Column name */ ! public String getColumnName(int columnIndex); /** * getColumnClass * @param columnIndex Column index * @returns Column class */ ! public Class getColumnClass(int columnIndex); /** * isCellEditable --- 50,76 ---- * getRowCount * @returns row count */ ! int getRowCount(); /** * getColumnCount * @returns column count */ ! int getColumnCount(); /** * getColumnName * @param columnIndex Column index * @returns Column name */ ! String getColumnName(int columnIndex); /** * getColumnClass * @param columnIndex Column index * @returns Column class */ ! Class getColumnClass(int columnIndex); /** * isCellEditable *************** public interface TableModel { *** 78,84 **** * @param columnIndex Column index * @returns true if editable, false otherwise */ ! public boolean isCellEditable(int rowIndex, int columnIndex); /** * getValueAt --- 78,84 ---- * @param columnIndex Column index * @returns true if editable, false otherwise */ ! boolean isCellEditable(int rowIndex, int columnIndex); /** * getValueAt *************** public interface TableModel { *** 86,92 **** * @param columnIndex Column index * @returns Value at specified indices */ ! public Object getValueAt(int rowIndex, int columnIndex); /** * setValueAt --- 86,92 ---- * @param columnIndex Column index * @returns Value at specified indices */ ! Object getValueAt(int rowIndex, int columnIndex); /** * setValueAt *************** public interface TableModel { *** 94,112 **** * @param rowIndex Row index * @param columnIndex Column index */ ! public void setValueAt(Object aValue, int rowIndex, int columnIndex); /** * addTableModelListener * @param listener TableModelListener */ ! public void addTableModelListener(TableModelListener listener); /** * removeTableModelListener * @param listener TableModelListener */ ! public void removeTableModelListener(TableModelListener listener); } // TableModel --- 94,112 ---- * @param rowIndex Row index * @param columnIndex Column index */ ! void setValueAt(Object aValue, int rowIndex, int columnIndex); /** * addTableModelListener * @param listener TableModelListener */ ! void addTableModelListener(TableModelListener listener); /** * removeTableModelListener * @param listener TableModelListener */ ! void removeTableModelListener(TableModelListener listener); } // TableModel diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/text/AbstractDocument.java gcc-3.4.0/libjava/javax/swing/text/AbstractDocument.java *** gcc-3.3.3/libjava/javax/swing/text/AbstractDocument.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/text/AbstractDocument.java 2004-01-10 21:07:44.000000000 +0000 *************** *** 1,5 **** /* AbstractDocument.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* AbstractDocument.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,46 **** package javax.swing.text; ! import javax.swing.event.*; ! import javax.swing.undo.*; ! import java.util.*; ! import javax.swing.tree.*; public abstract class AbstractDocument implements Document { --- 37,53 ---- package javax.swing.text; ! import java.util.Dictionary; ! import java.util.Enumeration; ! import java.util.EventListener; ! import java.util.Vector; ! import javax.swing.event.DocumentEvent; ! import javax.swing.event.DocumentListener; ! import javax.swing.event.EventListenerList; ! import javax.swing.event.UndoableEditEvent; ! import javax.swing.event.UndoableEditListener; ! import javax.swing.tree.TreeNode; ! import javax.swing.undo.UndoableEdit; public abstract class AbstractDocument implements Document { *************** public abstract class AbstractDocument i *** 102,120 **** public int getStartOffset() { return 0; } } ! public interface Content { ! public Position createPosition(int offset) throws BadLocationException; ! public int length(); ! public UndoableEdit insertString(int where, String str) throws BadLocationException; ! public UndoableEdit remove(int where, int nitems) throws BadLocationException; ! public String getString(int where, int len) throws BadLocationException; ! public void getChars(int where, int len, Segment txt) throws BadLocationException; } class DefaultDocumentEvent implements DocumentEvent { ! int len, off; public Document getDocument() { return AbstractDocument.this; } public int getLength() { return len; } public int getOffset() { return off; } --- 109,127 ---- public int getStartOffset() { return 0; } } ! interface Content { ! Position createPosition(int offset) throws BadLocationException; ! int length(); ! UndoableEdit insertString(int where, String str) throws BadLocationException; ! UndoableEdit remove(int where, int nitems) throws BadLocationException; ! String getString(int where, int len) throws BadLocationException; ! void getChars(int where, int len, Segment txt) throws BadLocationException; } class DefaultDocumentEvent implements DocumentEvent { ! public int len, off; public Document getDocument() { return AbstractDocument.this; } public int getLength() { return len; } public int getOffset() { return off; } *************** public abstract class AbstractDocument i *** 226,232 **** } ! Dictionary getDocumentProperties() { return null; } --- 233,239 ---- } ! public Dictionary getDocumentProperties() { return null; } *************** public abstract class AbstractDocument i *** 241,247 **** return content.length(); } ! EventListener[] getListeners(Class listenerType) { return null; } --- 248,254 ---- return content.length(); } ! public EventListener[] getListeners(Class listenerType) { return null; } *************** public abstract class AbstractDocument i *** 314,324 **** { } ! void readLock() { } ! void readUnlock() { } --- 321,331 ---- { } ! public void readLock() { } ! public void readUnlock() { } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/text/AttributeSet.java gcc-3.4.0/libjava/javax/swing/text/AttributeSet.java *** gcc-3.3.3/libjava/javax/swing/text/AttributeSet.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/text/AttributeSet.java 2004-01-10 21:07:44.000000000 +0000 *************** *** 1,5 **** /* AttributeSet.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* AttributeSet.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,44 **** package javax.swing.text; ! import java.util.*; ! public interface AttributeSet { --- 37,43 ---- package javax.swing.text; ! import java.util.Enumeration; public interface AttributeSet { diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/text/BadLocationException.java gcc-3.4.0/libjava/javax/swing/text/BadLocationException.java *** gcc-3.3.3/libjava/javax/swing/text/BadLocationException.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/text/BadLocationException.java 2003-03-21 09:18:31.000000000 +0000 *************** package javax.swing.text; *** 40,46 **** public class BadLocationException extends Exception { ! BadLocationException() ! { ! } } --- 40,64 ---- public class BadLocationException extends Exception { ! int offset; ! ! /** ! * Constructs a BadLocationException ! * ! * @param str A string indicating what was wrong with the arguments ! * @param offset Offset within the document that was requested >= 0 ! */ ! public BadLocationException (String str, int offset) ! { ! super (str); ! this.offset = offset; ! } ! ! /** ! * Returns the offset into the document that was not legal ! */ ! public int offsetRequested () ! { ! return offset; ! } } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/text/Caret.java gcc-3.4.0/libjava/javax/swing/text/Caret.java *** gcc-3.3.3/libjava/javax/swing/text/Caret.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/text/Caret.java 2004-01-10 21:07:44.000000000 +0000 *************** *** 1,5 **** /* Caret.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Caret.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,62 **** package javax.swing.text; ! import java.awt.*; ! import javax.swing.event.*; public interface Caret { ! void addChangeListener(ChangeListener l); ! void deinstall(JTextComponent c); ! int getBlinkRate(); ! int getDot(); ! Point getMagicaretPosition(); ! int getMark(); ! void install(JTextComponent c); ! boolean isSelectionVisible(); ! boolean isVisible(); ! void moveDot(int dot); ! void paint(Graphics g); ! void removeChangeListener(ChangeListener l); ! void setBlinkRate(int rate); ! void setDot(int dot); ! void setMagicCaretPosition(Point p); ! void setSelectionVisible(boolean v); ! void setVisible(boolean v); } --- 37,79 ---- package javax.swing.text; ! import java.awt.Graphics; ! import java.awt.Point; ! import javax.swing.event.ChangeListener; public interface Caret { ! void addChangeListener(ChangeListener l); ! ! void deinstall(JTextComponent c); ! ! int getBlinkRate(); ! ! int getDot(); ! ! Point getMagicCaretPosition(); ! ! int getMark(); ! ! void install(JTextComponent c); ! ! boolean isSelectionVisible(); ! ! boolean isVisible(); ! ! void moveDot(int dot); ! ! void paint(Graphics g); ! ! void removeChangeListener(ChangeListener l); ! ! void setBlinkRate(int rate); ! ! void setDot(int dot); ! ! void setMagicCaretPosition(Point p); ! ! void setSelectionVisible(boolean v); ! ! void setVisible(boolean v); } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/text/ComponentView.java gcc-3.4.0/libjava/javax/swing/text/ComponentView.java *** gcc-3.3.3/libjava/javax/swing/text/ComponentView.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/text/ComponentView.java 2004-01-10 21:07:44.000000000 +0000 *************** *** 1,5 **** /* ComponentView.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ComponentView.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,43 **** package javax.swing.text; ! import java.awt.*; public class ComponentView extends View { --- 37,45 ---- package javax.swing.text; ! import java.awt.Component; ! import java.awt.Graphics; ! import java.awt.Shape; public class ComponentView extends View { *************** public class ComponentView extends View *** 46,52 **** super(elem); } - protected Component createComponent() { return null; --- 48,53 ---- *************** public class ComponentView extends View *** 57,63 **** return 0; } ! public Component getComponent() { return null; } --- 58,64 ---- return 0; } ! public final Component getComponent() { return null; } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/text/DefaultCaret.java gcc-3.4.0/libjava/javax/swing/text/DefaultCaret.java *** gcc-3.3.3/libjava/javax/swing/text/DefaultCaret.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/text/DefaultCaret.java 2004-01-10 21:07:44.000000000 +0000 *************** *** 1,5 **** /* DefaultCaret.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* DefaultCaret.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,46 **** package javax.swing.text; ! import java.awt.*; ! import java.util.*; ! import java.awt.event.*; ! import javax.swing.event.*; public class DefaultCaret extends Rectangle implements Caret, FocusListener, MouseListener, MouseMotionListener --- 37,56 ---- package javax.swing.text; ! import java.awt.Color; ! import java.awt.Graphics; ! import java.awt.Point; ! import java.awt.Rectangle; ! import java.awt.Shape; ! import java.awt.event.FocusEvent; ! import java.awt.event.FocusListener; ! import java.awt.event.MouseEvent; ! import java.awt.event.MouseListener; ! import java.awt.event.MouseMotionListener; ! import java.util.EventListener; ! import java.util.Vector; ! import javax.swing.event.ChangeListener; ! import javax.swing.event.EventListenerList; public class DefaultCaret extends Rectangle implements Caret, FocusListener, MouseListener, MouseMotionListener *************** public class DefaultCaret extends Rectan *** 104,110 **** Point magic = null; public void setMagicCaretPosition(Point p) { magic = p; } ! public Point getMagicaretPosition() { return magic; } --- 114,120 ---- Point magic = null; public void setMagicCaretPosition(Point p) { magic = p; } ! public Point getMagicCaretPosition() { return magic; } *************** public class DefaultCaret extends Rectan *** 167,172 **** repaint(); } } - - - --- 177,179 ---- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/text/DefaultEditorKit.java gcc-3.4.0/libjava/javax/swing/text/DefaultEditorKit.java *** gcc-3.3.3/libjava/javax/swing/text/DefaultEditorKit.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/text/DefaultEditorKit.java 2004-01-10 21:07:44.000000000 +0000 *************** *** 1,5 **** /* DefaultEditorKit.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* DefaultEditorKit.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,47 **** package javax.swing.text; ! import javax.swing.*; ! import java.io.*; public class DefaultEditorKit extends EditorKit { void deinstall(JEditorPane c) { // Called when the kit is being removed from the JEditorPane. --- 37,99 ---- package javax.swing.text; ! import java.io.InputStream; ! import java.io.OutputStream; ! import java.io.Reader; ! import java.io.Writer; ! import javax.swing.Action; ! import javax.swing.JEditorPane; public class DefaultEditorKit extends EditorKit { + public static final String backwardAction = "caret-backward"; + public static final String beepAction = "beep"; + public static final String beginAction = "caret-begin"; + public static final String beginLineAction = "caret-begin-line"; + public static final String beginParagraphAction = "caret-begin-paragraph"; + public static final String beginWordAction = "caret-begin-word"; + public static final String copyAction = "copy-to-clipboard"; + public static final String cutAction = "cut-to-clipboard"; + public static final String defaultKeyTypedAction = "default-typed"; + public static final String deleteNextCharAction = "delete-next"; + public static final String deletePrevCharAction = "delete-previous"; + public static final String downAction = "caret-down"; + public static final String endAction = "caret-end"; + public static final String endLineAction = "caret-end-line"; + public static final String endOfLineStringProperty = "__EndOfLine__"; + public static final String endParagraphAction = "caret-end-paragraph"; + public static final String endWordAction = "caret-end-word"; + public static final String forwardAction = "caret-forward"; + public static final String insertBreakAction = "insert-break"; + public static final String insertContentAction = "insert-content"; + public static final String insertTabAction = "insert-tab"; + public static final String nextWordAction = "caret-next-word"; + public static final String pageDownAction = "page-down"; + public static final String pageUpAction = "page-up"; + public static final String pasteAction = "paste-from-clipboard"; + public static final String previousWordAction = "caret-previous-word"; + public static final String readOnlyAction = "set-read-only"; + public static final String selectAllAction = "select-all"; + public static final String selectionBackwardAction = "selection-backward"; + public static final String selectionBeginAction = "selection-begin"; + public static final String selectionBeginLineAction = "selection-begin-line"; + public static final String selectionBeginParagraphAction = "selection-begin-paragraph"; + public static final String selectionBeginWordAction = "selection-begin-word"; + public static final String selectionDownAction = "selection-down"; + public static final String selectionEndAction = "selection-end"; + public static final String selectionEndLineAction = "selection-end-line"; + public static final String selectionEndParagraphAction = "selection-end-paragraph"; + public static final String selectionEndWordAction = "selection-end-word"; + public static final String selectionForwardAction = "selection-forward"; + public static final String selectionNextWordAction = "selection-next-word"; + public static final String selectionPreviousWordAction = "selection-previous-word"; + public static final String selectionUpAction = "selection-up"; + public static final String selectLineAction = "select-line"; + public static final String selectParagraphAction = "select-paragraph"; + public static final String selectWordAction = "select-word"; + public static final String upAction = "caret-up"; + public static final String writableAction = "set-writable"; + void deinstall(JEditorPane c) { // Called when the kit is being removed from the JEditorPane. diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/text/DocumentFilter.java gcc-3.4.0/libjava/javax/swing/text/DocumentFilter.java *** gcc-3.3.3/libjava/javax/swing/text/DocumentFilter.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/text/DocumentFilter.java 2003-03-17 09:09:39.000000000 +0000 *************** *** 0 **** --- 1,43 ---- + /* DocumentFilter.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package javax.swing.text; + + public class DocumentFilter + { + } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/text/Document.java gcc-3.4.0/libjava/javax/swing/text/Document.java *** gcc-3.3.3/libjava/javax/swing/text/Document.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/text/Document.java 2004-01-10 21:07:44.000000000 +0000 *************** *** 1,5 **** /* Document.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Document.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,62 **** package javax.swing.text; ! ! import javax.swing.event.*; public interface Document { ! void addDocumentListener(DocumentListener listener); ! void addUndoableEditListener(UndoableEditListener listener); ! Position createPosition(int offs); ! Element getDefaultRootElement(); ! Position getEndPosition(); ! int getLength(); ! Object getProperty(Object key); ! Element[] getRootElements(); ! Position getStartPosition(); ! String getText(int offset, int length); ! void getText(int offset, int length, Segment txt); ! void insertString(int offset, String str, AttributeSet a); ! void putProperty(Object key, Object value); ! void remove(int offs, int len); ! void removeDocumentListener(DocumentListener listener); ! void removeUndoableEditListener(UndoableEditListener listener); ! void render(Runnable r); } --- 37,66 ---- package javax.swing.text; ! import javax.swing.event.DocumentListener; ! import javax.swing.event.UndoableEditListener; public interface Document { ! String StreamDescriptionProperty = "stream"; ! ! String TitleProperty = "text"; ! ! void addDocumentListener(DocumentListener listener); ! void addUndoableEditListener(UndoableEditListener listener); ! Position createPosition(int offs); ! Element getDefaultRootElement(); ! Position getEndPosition(); ! int getLength(); ! Object getProperty(Object key); ! Element[] getRootElements(); ! Position getStartPosition(); ! String getText(int offset, int length); ! void getText(int offset, int length, Segment txt); ! void insertString(int offset, String str, AttributeSet a); ! void putProperty(Object key, Object value); ! void remove(int offs, int len); ! void removeDocumentListener(DocumentListener listener); ! void removeUndoableEditListener(UndoableEditListener listener); ! void render(Runnable r); } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/text/EditorKit.java gcc-3.4.0/libjava/javax/swing/text/EditorKit.java *** gcc-3.3.3/libjava/javax/swing/text/EditorKit.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/text/EditorKit.java 2004-01-10 21:07:44.000000000 +0000 *************** *** 1,5 **** /* EditorKit.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* EditorKit.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,44 **** package javax.swing.text; ! import javax.swing.*; ! import java.io.*; public abstract class EditorKit implements Cloneable { --- 37,48 ---- package javax.swing.text; ! import java.io.InputStream; ! import java.io.OutputStream; ! import java.io.Reader; ! import java.io.Writer; ! import javax.swing.Action; ! import javax.swing.JEditorPane; public abstract class EditorKit implements Cloneable { diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/text/GapContent.java gcc-3.4.0/libjava/javax/swing/text/GapContent.java *** gcc-3.3.3/libjava/javax/swing/text/GapContent.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/text/GapContent.java 2004-01-10 21:07:44.000000000 +0000 *************** *** 1,5 **** /* GapContent.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* GapContent.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** package javax.swing.text; *** 40,47 **** // too lazy to make a real gapcontent. // lets just use a stringbuffer instead. ! import javax.swing.undo.*; ! public class GapContent implements AbstractDocument.Content { --- 40,46 ---- // too lazy to make a real gapcontent. // lets just use a stringbuffer instead. ! import javax.swing.undo.UndoableEdit; public class GapContent implements AbstractDocument.Content { diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/text/JTextComponent.java gcc-3.4.0/libjava/javax/swing/text/JTextComponent.java *** gcc-3.3.3/libjava/javax/swing/text/JTextComponent.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/text/JTextComponent.java 2003-06-24 09:51:28.000000000 +0000 *************** import java.awt.AWTEvent; *** 41,55 **** import java.awt.Component; import java.awt.Dimension; import java.awt.Image; import java.awt.Rectangle; import java.awt.Point; ! import javax.accessibility.*; import javax.swing.Icon; import javax.swing.JComponent; import javax.swing.KeyStroke; import javax.swing.Scrollable; import javax.swing.UIManager; ! import javax.swing.event.*; import javax.swing.plaf.TextUI; public abstract class JTextComponent extends JComponent --- 41,63 ---- import java.awt.Component; import java.awt.Dimension; import java.awt.Image; + import java.awt.Insets; import java.awt.Rectangle; import java.awt.Point; ! import javax.accessibility.Accessible; ! import javax.accessibility.AccessibleContext; ! import javax.accessibility.AccessibleRole; ! import javax.accessibility.AccessibleStateSet; ! import javax.accessibility.AccessibleText; import javax.swing.Icon; import javax.swing.JComponent; import javax.swing.KeyStroke; import javax.swing.Scrollable; import javax.swing.UIManager; ! import javax.swing.event.CaretEvent; ! import javax.swing.event.CaretListener; ! import javax.swing.event.DocumentEvent; ! import javax.swing.event.DocumentListener; import javax.swing.plaf.TextUI; public abstract class JTextComponent extends JComponent *************** public abstract class JTextComponent ext *** 377,382 **** --- 385,396 ---- return null; } + public Insets getMargin() + { + // FIXME: Not implemented. + return null; + } + public void setText(String text) { getDocument().remove(0,doc.getLength()); diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/text/Keymap.java gcc-3.4.0/libjava/javax/swing/text/Keymap.java *** gcc-3.3.3/libjava/javax/swing/text/Keymap.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/text/Keymap.java 2004-01-10 21:07:44.000000000 +0000 *************** *** 1,5 **** /* Keymap.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Keymap.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,43 **** package javax.swing.text; ! import javax.swing.*; public interface Keymap { --- 37,44 ---- package javax.swing.text; ! import javax.swing.Action; ! import javax.swing.KeyStroke; public interface Keymap { diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/text/MutableAttributeSet.java gcc-3.4.0/libjava/javax/swing/text/MutableAttributeSet.java *** gcc-3.3.3/libjava/javax/swing/text/MutableAttributeSet.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/text/MutableAttributeSet.java 2004-01-10 21:07:44.000000000 +0000 *************** *** 1,5 **** /* MutableAttributeSet.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* MutableAttributeSet.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,44 **** package javax.swing.text; ! // Imports ! import java.util.*; /** * MutableAttributeSet --- 37,43 ---- package javax.swing.text; ! import java.util.Enumeration; /** * MutableAttributeSet *************** public interface MutableAttributeSet ext *** 56,92 **** * @param name TODO * @param value TODO */ ! public void addAttribute(Object name, Object value); /** * addAttributes * @param attributes TODO */ ! public void addAttributes(AttributeSet attributes); /** * removeAttribute * @param name TODO */ ! public void removeAttribute(Object name); /** * removeAttributes * @param names TODO */ ! public void removeAttributes(Enumeration names); /** * removeAttributes * @param attributes TODO */ ! public void removeAttributes(AttributeSet attributes); /** * setResolveParent * @param parent TODO */ ! public void setResolveParent(AttributeSet parent); } // MutableAttributeSet --- 55,91 ---- * @param name TODO * @param value TODO */ ! void addAttribute(Object name, Object value); /** * addAttributes * @param attributes TODO */ ! void addAttributes(AttributeSet attributes); /** * removeAttribute * @param name TODO */ ! void removeAttribute(Object name); /** * removeAttributes * @param names TODO */ ! void removeAttributes(Enumeration names); /** * removeAttributes * @param attributes TODO */ ! void removeAttributes(AttributeSet attributes); /** * setResolveParent * @param parent TODO */ ! void setResolveParent(AttributeSet parent); } // MutableAttributeSet diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/text/NavigationFilter.java gcc-3.4.0/libjava/javax/swing/text/NavigationFilter.java *** gcc-3.3.3/libjava/javax/swing/text/NavigationFilter.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/text/NavigationFilter.java 2003-03-17 09:09:39.000000000 +0000 *************** *** 0 **** --- 1,43 ---- + /* NavigationFilter.java -- + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + package javax.swing.text; + + public class NavigationFilter + { + } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/text/PlainEditorKit.java gcc-3.4.0/libjava/javax/swing/text/PlainEditorKit.java *** gcc-3.3.3/libjava/javax/swing/text/PlainEditorKit.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/text/PlainEditorKit.java 2004-01-10 21:07:44.000000000 +0000 *************** *** 1,5 **** /* PlainEditorKit.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* PlainEditorKit.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,44 **** package javax.swing.text; ! import javax.swing.*; ! import java.io.*; public class PlainEditorKit extends EditorKit { --- 37,48 ---- package javax.swing.text; ! import java.io.InputStream; ! import java.io.OutputStream; ! import java.io.Reader; ! import java.io.Writer; ! import javax.swing.Action; ! import javax.swing.JEditorPane; public class PlainEditorKit extends EditorKit { diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/text/Segment.java gcc-3.4.0/libjava/javax/swing/text/Segment.java *** gcc-3.3.3/libjava/javax/swing/text/Segment.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/text/Segment.java 2004-01-10 21:07:44.000000000 +0000 *************** *** 1,5 **** /* Segment.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Segment.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,45 **** package javax.swing.text; - import java.util.*; - - public class Segment implements Cloneable, CharacterIterator { char[] array; --- 37,42 ---- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/text/StyledDocument.java gcc-3.4.0/libjava/javax/swing/text/StyledDocument.java *** gcc-3.3.3/libjava/javax/swing/text/StyledDocument.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/text/StyledDocument.java 2004-01-10 21:07:44.000000000 +0000 *************** *** 1,5 **** /* StyledDcoument.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* StyledDcoument.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,44 **** package javax.swing.text; ! // Imports ! import java.awt.*; /** * StyledDocument --- 37,44 ---- package javax.swing.text; ! import java.awt.Color; ! import java.awt.Font; /** * StyledDocument *************** public interface StyledDocument extends *** 57,76 **** * @param rent TODO * @returns Style */ ! public Style addStyle(String nm, Style parent); /** * removeStyle * @param nm TODO */ ! public void removeStyle(String nm); /** * getStyle * @param nm TODO * @returns Style */ ! public Style getStyle(String nm); /** * setCharacterAttributes --- 57,76 ---- * @param rent TODO * @returns Style */ ! Style addStyle(String nm, Style parent); /** * removeStyle * @param nm TODO */ ! void removeStyle(String nm); /** * getStyle * @param nm TODO * @returns Style */ ! Style getStyle(String nm); /** * setCharacterAttributes *************** public interface StyledDocument extends *** 79,85 **** * @param set TODO * @param replace TODO */ ! public void setCharacterAttributes(int offset, int length, AttributeSet set, boolean replace); /** --- 79,85 ---- * @param set TODO * @param replace TODO */ ! void setCharacterAttributes(int offset, int length, AttributeSet set, boolean replace); /** *************** public interface StyledDocument extends *** 89,95 **** * @param set TODO * @param replace TODO */ ! public void setParagraphAttributes(int offset, int length, AttributeSet set, boolean replace); /** --- 89,95 ---- * @param set TODO * @param replace TODO */ ! void setParagraphAttributes(int offset, int length, AttributeSet set, boolean replace); /** *************** public interface StyledDocument extends *** 97,145 **** * @param position TODO * @returns Style */ ! public Style getLogicalStyle(int position); /** * setLogicalStyle * @param position TODO * @param style TODO */ ! public void setLogicalStyle(int position, Style style); /** * getParagraphElement * @param position TODO * @returns Element */ ! public abstract Element getParagraphElement(int position); /** * getCharacterElement * @param position TODO * @returns Element */ ! public Element getCharacterElement(int position); /** * getForeground * @param set TODO * @returns Color */ ! public Color getForeground(AttributeSet set); /** * getBackground * @param set TODO * @returns Color */ ! public Color getBackground(AttributeSet set); /** * getFont * @param set TODO * @returns Font */ ! public Font getFont(AttributeSet set); } // StyledDocument --- 97,145 ---- * @param position TODO * @returns Style */ ! Style getLogicalStyle(int position); /** * setLogicalStyle * @param position TODO * @param style TODO */ ! void setLogicalStyle(int position, Style style); /** * getParagraphElement * @param position TODO * @returns Element */ ! Element getParagraphElement(int position); /** * getCharacterElement * @param position TODO * @returns Element */ ! Element getCharacterElement(int position); /** * getForeground * @param set TODO * @returns Color */ ! Color getForeground(AttributeSet set); /** * getBackground * @param set TODO * @returns Color */ ! Color getBackground(AttributeSet set); /** * getFont * @param set TODO * @returns Font */ ! Font getFont(AttributeSet set); } // StyledDocument diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/text/StyledEditorKit.java gcc-3.4.0/libjava/javax/swing/text/StyledEditorKit.java *** gcc-3.3.3/libjava/javax/swing/text/StyledEditorKit.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/text/StyledEditorKit.java 2004-01-10 21:07:44.000000000 +0000 *************** *** 1,5 **** /* StyledEditorKit.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* StyledEditorKit.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,56 **** package javax.swing.text; ! // Imports ! import java.awt.*; ! import java.awt.event.*; ! import java.beans.*; ! import java.io.*; ! import javax.swing.*; ! import javax.swing.event.*; /** * StyledEditorKit * @author Andrew Selkirk * @version 1.0 */ ! public class StyledEditorKit extends DefaultEditorKit { //------------------------------------------------------------- // Classes ---------------------------------------------------- --- 37,64 ---- package javax.swing.text; ! import java.awt.Color; ! import java.awt.event.ActionEvent; ! import java.beans.PropertyChangeEvent; ! import java.beans.PropertyChangeListener; ! import java.io.InputStream; ! import java.io.OutputStream; ! import java.io.Reader; ! import java.io.Serializable; ! import java.io.Writer; ! import javax.swing.Action; ! import javax.swing.JEditorPane; ! import javax.swing.event.CaretEvent; ! import javax.swing.event.CaretListener; /** * StyledEditorKit * @author Andrew Selkirk * @version 1.0 */ ! public class StyledEditorKit extends DefaultEditorKit ! { ! static final long serialVersionUID = 7002391892985555948L; //------------------------------------------------------------- // Classes ---------------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/text/Style.java gcc-3.4.0/libjava/javax/swing/text/Style.java *** gcc-3.3.3/libjava/javax/swing/text/Style.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/text/Style.java 2004-01-10 21:07:44.000000000 +0000 *************** *** 1,5 **** /* Style.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* Style.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,43 **** package javax.swing.text; ! import javax.swing.event.*; public interface Style { --- 37,43 ---- package javax.swing.text; ! import javax.swing.event.ChangeListener; public interface Style { diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/text/TextAction.java gcc-3.4.0/libjava/javax/swing/text/TextAction.java *** gcc-3.3.3/libjava/javax/swing/text/TextAction.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/text/TextAction.java 2004-01-10 21:07:44.000000000 +0000 *************** *** 1,5 **** /* TextAction.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* TextAction.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,45 **** package javax.swing.text; ! // Imports ! import java.awt.event.*; ! import javax.swing.*; /** * TextAction --- 37,45 ---- package javax.swing.text; ! import java.awt.event.ActionEvent; ! import javax.swing.AbstractAction; ! import javax.swing.Action; /** * TextAction diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/text/ViewFactory.java gcc-3.4.0/libjava/javax/swing/text/ViewFactory.java *** gcc-3.3.3/libjava/javax/swing/text/ViewFactory.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/text/ViewFactory.java 2003-10-12 13:33:32.000000000 +0000 *************** exception statement from your version. * *** 37,44 **** package javax.swing.text; - public interface ViewFactory { ! public View create(Element elem); } --- 37,43 ---- package javax.swing.text; public interface ViewFactory { ! View create (Element elem); } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/text/View.java gcc-3.4.0/libjava/javax/swing/text/View.java *** gcc-3.3.3/libjava/javax/swing/text/View.java 2002-08-09 04:26:12.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/text/View.java 2004-01-10 21:07:44.000000000 +0000 *************** *** 1,5 **** /* View.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* View.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,45 **** package javax.swing.text; ! import java.awt.*; ! import javax.swing.*; ! import java.util.*; public abstract class View implements SwingConstants { --- 37,46 ---- package javax.swing.text; ! import java.awt.Graphics; ! import java.awt.Shape; ! import java.util.Vector; ! import javax.swing.SwingConstants; public abstract class View implements SwingConstants { diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/Timer.java gcc-3.4.0/libjava/javax/swing/Timer.java *** gcc-3.3.3/libjava/javax/swing/Timer.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/Timer.java 2003-06-24 09:48:40.000000000 +0000 *************** this exception to your version of the li *** 35,54 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package javax.swing; ! import java.awt.event.*; ! import java.util.*; ! public class Timer { int ticks; static boolean verbose; boolean running; boolean repeat_ticks = true; long interval, init_delay; - Vector actions = new Vector(); class Waker extends Thread { --- 35,59 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ ! package javax.swing; + import java.awt.event.ActionEvent; + import java.awt.event.ActionListener; + import java.io.Serializable; + import java.util.EventListener; + import java.util.Vector; + import javax.swing.event.EventListenerList; ! public class Timer implements Serializable { + protected EventListenerList listenerList = new EventListenerList(); + int ticks; static boolean verbose; boolean running; boolean repeat_ticks = true; long interval, init_delay; class Waker extends Thread { *************** public class Timer *** 82,104 **** public void addActionListener(ActionListener listener) { ! actions.addElement(listener); } public void removeActionListener(ActionListener listener) { ! actions.removeElement(listener); } ! void fireActionPerformed() { ! for (int i=0;i " + ui + ", for " + target); ! return ui; ! } ! public static void installLookAndFeel(String name, String className) ! // Creates a new look and feel and adds it to the current array. ! { ! } ! public static void installLookAndFeel(LookAndFeelInfo info) ! // Adds the specified look and feel to the current array and then calls setInstalledLookAndFeels(javax.swing.UIManager.LookAndFeelInfo[]). ! { ! } ! public static Object put(Object key, Object value) ! // Stores an object in the defaults table. ! { ! return getLookAndFeel().getDefaults().put(key,value); ! } ! public static void removePropertyChangeListener(PropertyChangeListener listener) ! // Remove a PropertyChangeListener from the listener list. ! { ! } ! public static void setInstalledLookAndFeels(UIManager.LookAndFeelInfo[] infos) ! // Replaces the current array of installed LookAndFeelInfos. ! { ! } ! public static void setLookAndFeel(LookAndFeel newLookAndFeel) ! { ! if (look_and_feel != null) ! look_and_feel.uninitialize(); ! // Set the current default look and feel using a LookAndFeel object. ! look_and_feel = newLookAndFeel; ! look_and_feel.initialize(); ! ! // revalidate(); ! // repaint(); ! } ! public static void setLookAndFeel(String className) ! throws ClassNotFoundException, ! InstantiationException, ! IllegalAccessException, ! UnsupportedLookAndFeelException ! { ! // Set the current default look and feel using a class name. ! Class c = Class.forName(className); ! LookAndFeel a = (LookAndFeel) c.newInstance(); // throws class-cast-exception ! setLookAndFeel(a); ! } } --- 35,300 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; ! import java.awt.Color; ! import java.awt.Dimension; ! import java.awt.Font; ! import java.awt.Insets; ! import java.beans.PropertyChangeListener; ! import java.io.Serializable; ! import javax.swing.border.Border; ! import javax.swing.plaf.ComponentUI; ! import javax.swing.plaf.metal.MetalLookAndFeel; public class UIManager implements Serializable { ! public static class LookAndFeelInfo ! { ! String name, clazz; ! LookAndFeelInfo(String name, ! String clazz) ! { ! this.name = name; ! this.clazz = clazz; } ! String getName() { return name; } ! String getClassName() { return clazz; } ! } + private static final long serialVersionUID = -5547433830339189365L; + + static LookAndFeelInfo [] installed = { + new LookAndFeelInfo ("Metal", "javax.swing.plaf.metal.MetalLookAndFeel") + }; + + static LookAndFeel[] aux_installed; + + static LookAndFeel look_and_feel = new MetalLookAndFeel(); ! public UIManager() ! { ! // Do nothing here. ! } ! public static void addPropertyChangeListener (PropertyChangeListener listener) ! { ! // FIXME ! } ! public static void removePropertyChangeListener (PropertyChangeListener listener) ! // Remove a PropertyChangeListener from the listener list. ! { ! // FIXME ! } ! /** ! * @since 1.4 ! */ ! public static PropertyChangeListener[] getPropertyChangeListeners () ! { ! // FIXME ! throw new Error ("Not implemented"); ! } ! ! public static void addAuxiliaryLookAndFeel (LookAndFeel l) ! { ! // Add a LookAndFeel to the list of auxiliary look and feels. ! if (aux_installed == null) ! { ! aux_installed = new LookAndFeel[1]; ! aux_installed[0] = l; ! return; ! } ! LookAndFeel[] T = new LookAndFeel[ aux_installed.length+1 ]; ! System.arraycopy(aux_installed, 0, T, 0, aux_installed.length); ! aux_installed = T; ! aux_installed[aux_installed.length-1] = l; ! } ! public static boolean removeAuxiliaryLookAndFeel(LookAndFeel laf) ! { ! if (aux_installed == null) ! return false; ! for (int i=0;i"TitledBorder.font". ! */ ! public static Font getFont(Object key) ! { ! return (Font) getLookAndFeel().getDefaults().get(key); ! } ! public static Icon getIcon(Object key) ! // Returns an Icon from the defaults table. ! { ! return (Icon) getLookAndFeel().getDefaults().get(key); ! } ! ! public static Insets getInsets(Object key) ! // Returns an Insets object from the defaults table. ! { ! return (Insets) getLookAndFeel().getDefaults().getInsets(key); ! } ! public static LookAndFeelInfo[] getInstalledLookAndFeels() ! { ! return installed; ! } + public static int getInt(Object key) + { + Integer x = (Integer) getLookAndFeel().getDefaults().get(key); + if (x == null) + return 0; + return x.intValue(); + } ! public static LookAndFeel getLookAndFeel() ! { ! return look_and_feel; ! } + /** + * Returns the UIDefaults table of the currently active + * look and feel. + */ + public static UIDefaults getLookAndFeelDefaults() + { + return getLookAndFeel().getDefaults(); + } ! public static String getString(Object key) ! // Returns a string from the defaults table. ! { ! return (String) getLookAndFeel().getDefaults().get(key); ! } ! ! public static String getSystemLookAndFeelClassName() ! // Returns the name of the LookAndFeel class that implements the native systems look and feel if there is one, otherwise the name of the default cross platform LookAndFeel class. ! { ! return getCrossPlatformLookAndFeelClassName(); ! } ! public static ComponentUI getUI(JComponent target) ! // Returns the L&F object that renders the target component. ! { ! ComponentUI ui = getDefaults().getUI(target); ! //System.out.println("GET-UI-> " + ui + ", for " + target); ! return ui; ! } ! public static void installLookAndFeel(String name, String className) ! // Creates a new look and feel and adds it to the current array. ! { ! } ! ! public static void installLookAndFeel(LookAndFeelInfo info) ! // Adds the specified look and feel to the current array and then calls setInstalledLookAndFeels(javax.swing.UIManager.LookAndFeelInfo[]). ! { ! } + public static Object put(Object key, Object value) + // Stores an object in the defaults table. + { + return getLookAndFeel().getDefaults().put(key,value); + } + public static void setInstalledLookAndFeels(UIManager.LookAndFeelInfo[] infos) + // Replaces the current array of installed LookAndFeelInfos. + { + } + + public static void setLookAndFeel(LookAndFeel newLookAndFeel) + { + if (look_and_feel != null) + look_and_feel.uninitialize(); + + // Set the current default look and feel using a LookAndFeel object. + look_and_feel = newLookAndFeel; + look_and_feel.initialize(); + + //revalidate(); + //repaint(); + } + + public static void setLookAndFeel (String className) + throws ClassNotFoundException, InstantiationException, IllegalAccessException, + UnsupportedLookAndFeelException + { + // Set the current default look and feel using a class name. + Class c = Class.forName(className); + LookAndFeel a = (LookAndFeel) c.newInstance(); // throws class-cast-exception + setLookAndFeel(a); + } } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/undo/AbstractUndoableEdit.java gcc-3.4.0/libjava/javax/swing/undo/AbstractUndoableEdit.java *** gcc-3.3.3/libjava/javax/swing/undo/AbstractUndoableEdit.java 2002-08-09 04:26:13.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/undo/AbstractUndoableEdit.java 2003-11-26 22:23:40.000000000 +0000 *************** *** 1,5 **** ! /* AbstractTableModel.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- ! /* AbstractUndoableEdit.java ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,214 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.undo; - // Imports import java.io.Serializable; /** ! * AbstractUndoableEdit ! * @author Andrew Selkirk */ ! public class AbstractUndoableEdit extends Object ! implements UndoableEdit, ! Serializable { - //------------------------------------------------------------- - // Constants -------------------------------------------------- - //------------------------------------------------------------- ! /** ! * String returned by getRedoPresentationName() ! */ ! protected static String RedoName = "Redo"; - /** - * String returned by getUndoPresentationName() - */ - protected static String UndoName = "Undo"; - //------------------------------------------------------------- - // Variables -------------------------------------------------- - //------------------------------------------------------------- ! /** ! * TODO ! */ ! private boolean hasBeenDone = false; - /** - * The edit is alive - */ - private boolean alive = true; - //------------------------------------------------------------- - // Initialization --------------------------------------------- - //------------------------------------------------------------- ! /** ! * Create new AbstractUndoableEdit ! */ ! public AbstractUndoableEdit() { ! } // AbstractUndoableEdit() ! //------------------------------------------------------------- ! // Interface: UndoableEdit ------------------------------------ ! //------------------------------------------------------------- - /** - * addEdit - * @param anEdit TODO - * @returns TODO - */ - public boolean addEdit(UndoableEdit anEdit) { - return false; - } // addEdit() ! /** ! * canRedo() ! * @returns true if redoable, false otherwise ! */ ! public boolean canRedo() { ! if (alive == true && hasBeenDone == false) { ! return true; ! } // if ! return false; ! } // canRedo() - /** - * canUndo() - * @returns true if undoable, false otherwise - */ - public boolean canUndo() { - if (alive == true && hasBeenDone == true) { - return true; - } // if - return false; - } // canUndo() ! /** ! * die ! */ ! public void die() { ! alive = false; ! } // die() - /** - * getPresentation - * @returns TODO - */ - public String getPresentationName() { - return ""; - } // getPresentationName() ! /** ! * getRedoPresentationName ! * @returns TODO ! */ ! public String getRedoPresentationName() { ! if (getPresentationName().equals("") == true) { ! return RedoName; ! } else { ! return RedoName + " " + getPresentationName(); ! } ! } // getRedoPresentationName() ! /** ! * getUndoPresentationName ! * @returns TODO ! */ ! public String getUndoPresentationName() { ! if (getPresentationName().equals("") == true) { ! return UndoName; ! } else { ! return UndoName + " " + getPresentationName(); ! } ! } // getUndoPresentationName() ! /** ! * isSignificant ! * @returns true ! */ ! public boolean isSignificant() { ! return true; ! } // isSignificant() - /** - * redo - * @throws CannotRedoException TODO - */ - public void redo() throws CannotRedoException { - if (canRedo() == false) { - throw new CannotRedoException(); - } - hasBeenDone = true; - } // redo() ! /** ! * replaceEdit ! * @param anEdit TODO ! * @returns TODO ! */ ! public boolean replaceEdit(UndoableEdit anEdit) { ! return false; ! } // replaceEdit() ! /** ! * String representation ! * @returns String representation ! */ ! public String toString() { ! return null; // TODO ! } // toString() ! /** ! * undo ! * @throws CannotUndoException TODO ! */ ! public void undo() throws CannotUndoException { ! if (canUndo() == false) { ! throw new CannotUndoException(); ! } ! hasBeenDone = false; ! } // undo() ! } // AbstractUndoableEdit --- 35,323 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.undo; import java.io.Serializable; + import javax.swing.UIManager; + /** ! * A default implementation of UndoableEdit that can be ! * used as a base for implementing editing operations. ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public class AbstractUndoableEdit ! implements UndoableEdit, Serializable ! { ! /** ! * The serialization ID. Verified using the serialver ! * tool of Apple/Sun JDK 1.3.1 on MacOS X 10.1.5, and Sun JDK ! * 1.4.1_01 on GNU/Linux. ! */ ! static final long serialVersionUID = 580150227676302096L; ! /** ! * The constant string “Undo”, which was returned by ! * {@link #getUndoPresentationName()} on early versions of the ! * platform. However, this field has become obsolete with version ! * 1.3.1. That method now retrieves a localized string from the ! * {@link javax.swing.UIManager}, using the key ! * “AbstractUndoableEdit.undoText”. ! */ ! protected static final String UndoName = "Undo"; + /** + * The constant string “Redo”, which was returned by + * {@link #getRedoPresentationName()} on early versions of the + * platform. However, this field has become obsolete with version + * 1.3.1. That method now retrieves a localized string from the + * {@link javax.swing.UIManager}, using the key + * “AbstractUndoableEdit.redoText”. + */ + protected static final String RedoName = "Redo"; ! /** ! * Indicates whether this editing action has been executed. A value ! * of true means that the action was performed, or that ! * a redo operation was successful. A value of false ! * means that the action has not yet performed, or that an undo ! * operation was successful. ! */ ! private boolean hasBeenDone; + /** + * Indicates whether this editing action is still alive. The value + * is set to true by the constructor, and to + * false by the {@link #die()} method. + */ + private boolean alive; ! /** ! * Constructs a new AbstractUndoableEdit. The initial ! * state is that the editing action is alive, and ! * hasBeenDone is true. ! */ ! public AbstractUndoableEdit() ! { ! // The API specification is not clear, but Mauve test code has ! // determined that hasBeenDone is initially set to true. ! alive = hasBeenDone = true; ! } ! /** ! * Undoes this editing action. ! * ! * @throws CannotUndoException if {@link #canUndo()} returns ! * false, for example because this action has already ! * been undone. ! * ! * @see #canUndo() ! * @see #redo() ! */ ! public void undo() ! throws CannotUndoException ! { ! if (!canUndo()) ! throw new CannotUndoException(); ! hasBeenDone = false; ! } ! ! ! /** ! * Determines whether it would be possible to undo this editing ! * action. ! * ! * @return true to indicate that this action can be ! * undone, false otherwise. ! * ! * @see #undo() ! * @see #canRedo() ! */ ! public boolean canUndo() ! { ! return alive && hasBeenDone; ! } ! ! ! /** ! * Redoes this editing action. ! * ! * @throws CannotRedoException if {@link #canRedo()} returns ! * false, for example because this action has not ! * yet been undone. ! * ! * @see #canRedo() ! * @see #undo() ! */ ! public void redo() ! throws CannotRedoException ! { ! if (!canRedo()) ! throw new CannotRedoException(); ! hasBeenDone = true; ! } ! ! ! /** ! * Determines whether it would be possible to redo this editing ! * action. ! * ! * @return true to indicate that this action can be ! * redone, false otherwise. ! * ! * @see #redo() ! * @see #canUndo() ! */ ! public boolean canRedo() ! { ! return alive && !hasBeenDone; ! } ! /** ! * Informs this edit action that it will no longer be used. Some ! * actions might use this information to release resources, for ! * example open files. Called by {@link UndoManager} before this ! * action is removed from the edit queue. ! */ ! public void die() ! { ! alive = false; ! } ! /** ! * Incorporates another editing action into this one, thus forming a ! * combined action. ! * ! *

                The default implementation always returns false, ! * indicating that the editing action could not be incorporated. ! * ! * @param edit the editing action to be incorporated. ! */ ! public boolean addEdit(UndoableEdit edit) ! { ! return false; ! } ! ! ! /** ! * Incorporates another editing action into this one, thus forming a ! * combined action that replaces the argument action. ! * ! *

                The default implementation always returns false, ! * indicating that the argument action should not be replaced. ! * ! * @param edit the editing action to be replaced. ! */ ! public boolean replaceEdit(UndoableEdit edit) ! { ! return false; ! } ! ! ! /** ! * Determines whether this editing action is significant enough for ! * being seperately undoable by the user. A typical significant ! * action would be the resizing of an object. However, changing the ! * selection in a text document would usually not be considered ! * significant. ! * ! *

                The default implementation returns true. ! * ! * @return true to indicate that the action is ! * significant enough for being separately undoable, or ! * false otherwise. ! */ ! public boolean isSignificant() ! { ! return true; ! } ! ! ! /** ! * Returns a human-readable, localized name that describes this ! * editing action and can be displayed to the user. ! * ! *

                The default implementation returns an empty string. ! */ ! public String getPresentationName() ! { ! return ""; ! } ! /** ! * Calculates a localized name for presenting the undo action to the ! * user. ! * ! *

                The default implementation returns the concatenation of the ! * string “Undo” and the action name, which is ! * determined by calling {@link #getPresentationName()}. ! * ! *

                The string “Undo” is retrieved from the {@link ! * javax.swing.UIManager}, using the key ! * “AbstractUndoableEdit.undoText”. This ! * allows the text to be localized. ! */ ! public String getUndoPresentationName() ! { ! String msg, pres; ! msg = UIManager.getString("AbstractUndoableEdit.undoText"); ! if (msg == null) ! msg = UndoName; ! pres = getPresentationName(); ! if ((pres == null) || (pres.length() == 0)) ! return msg; ! else ! return msg + ' ' + pres; ! } ! /** ! * Calculates a localized name for presenting the redo action to the ! * user. ! * ! *

                The default implementation returns the concatenation of the ! * string “Redo” and the action name, which is ! * determined by calling {@link #getPresentationName()}. ! * ! *

                The string “Redo” is retrieved from the {@link ! * javax.swing.UIManager}, using the key ! * “AbstractUndoableEdit.redoText”. This ! * allows the text to be localized. ! */ ! public String getRedoPresentationName() ! { ! String msg, pres; ! msg = UIManager.getString("AbstractUndoableEdit.redoText"); ! if (msg == null) ! msg = RedoName; ! pres = getPresentationName(); ! if ((pres == null) || (pres.length() == 0)) ! return msg; ! else ! return msg + ' ' + pres; ! } ! public String toString() ! { ! return super.toString() ! + " hasBeenDone: " + hasBeenDone ! + " alive: " + alive; ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/undo/CannotRedoException.java gcc-3.4.0/libjava/javax/swing/undo/CannotRedoException.java *** gcc-3.3.3/libjava/javax/swing/undo/CannotRedoException.java 2002-08-09 04:26:13.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/undo/CannotRedoException.java 2003-11-26 22:23:40.000000000 +0000 *************** *** 1,5 **** ! /* AbstractTableModel.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- ! /* CannotRedoException.java ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 38,54 **** package javax.swing.undo; /** ! * CannotRedoException ! * @author Andrew Selkirk */ ! public class CannotRedoException extends RuntimeException { ! ! /** ! * Create exception ! */ ! public CannotRedoException() { ! super(); ! } // CannotRedoException() ! ! ! } // CannotRedoException --- 38,56 ---- package javax.swing.undo; /** ! * An exception which indicates that an editing action cannot be ! * redone. ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public class CannotRedoException ! extends RuntimeException ! { ! /** ! * Constructs a new instance of a CannotRedoException. ! */ ! public CannotRedoException() ! { ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/undo/CannotUndoException.java gcc-3.4.0/libjava/javax/swing/undo/CannotUndoException.java *** gcc-3.3.3/libjava/javax/swing/undo/CannotUndoException.java 2002-08-09 04:26:13.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/undo/CannotUndoException.java 2003-11-26 22:23:40.000000000 +0000 *************** *** 1,5 **** ! /* AbstractTableModel.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- ! /* CannotUndoException.java ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,54 **** package javax.swing.undo; /** ! * CannotUndoException ! * @author Andrew Selkirk */ ! public class CannotUndoException extends RuntimeException { ! ! /** ! * Create exception ! */ ! public CannotUndoException() { ! super(); ! } // CannotUndoException() ! ! ! } // CannotUndoException --- 37,57 ---- package javax.swing.undo; + /** ! * An exception which indicates that an editing action cannot be ! * undone. ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public class CannotUndoException ! extends RuntimeException ! { ! /** ! * Constructs a new instance of a CannotUndoException. ! */ ! public CannotUndoException() ! { ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/undo/CompoundEdit.java gcc-3.4.0/libjava/javax/swing/undo/CompoundEdit.java *** gcc-3.3.3/libjava/javax/swing/undo/CompoundEdit.java 2002-08-09 04:26:13.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/undo/CompoundEdit.java 2004-01-11 12:40:49.000000000 +0000 *************** *** 1,5 **** ! /* AbstractTableModel.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- ! /* CompoundEdit.java -- Combines multiple UndoableEdits. ! Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,282 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.undo; - // Imports import java.util.Vector; /** ! * CompoundEdit ! * @author Andrew Selkirk */ ! public class CompoundEdit extends AbstractUndoableEdit { ! ! //------------------------------------------------------------- ! // Variables -------------------------------------------------- ! //------------------------------------------------------------- ! ! /** ! * The collection of UndoableEdits undone/redone en ! * masse by this CompoundEdit ! */ ! protected Vector edits = new Vector(); ! ! /** ! * TODO ! */ ! private boolean inProgress = false; ! - //------------------------------------------------------------- - // Initialization --------------------------------------------- - //------------------------------------------------------------- ! /** ! * Create new Compound Edit ! */ ! public CompoundEdit() { ! } // CompoundEdit() ! //------------------------------------------------------------- ! // Interface: UndoableEdit ------------------------------------ ! //------------------------------------------------------------- - /** - * addEdit - * @param anEdit TODO - * @returns TODO - */ - public boolean addEdit(UndoableEdit anEdit) { ! // Variables ! UndoableEdit lastEdit; ! if (inProgress == true) { ! // Get Last Edit ! lastEdit = lastEdit(); - // Check for null - if (lastEdit != null) { ! if (lastEdit.addEdit(anEdit) == false) { ! if (lastEdit.replaceEdit(anEdit) == false) { ! edits.add(anEdit); ! } ! } ! } // if: lastEdit ! return true; - } else { - return false; - } - } // addEdit() ! /** ! * canRedo ! * @returns TODO ! */ ! public boolean canRedo() { ! if (isInProgress() == true || super.canRedo() == false) { ! return false; ! } ! return true; ! } // canRedo() ! /** ! * canUndo ! * @returns TODO ! */ ! public boolean canUndo() { ! if (isInProgress() == true || super.canUndo() == false) { ! return false; ! } ! return true; ! } // canUndo() - /** - * die - */ - public void die() { ! // Variables ! int index; ! UndoableEdit current; ! // Loop through all contained UndoableEdits ! for (index = edits.size() - 1; index >= 0; index--) { ! current = (UndoableEdit) edits.elementAt(index); ! current.die(); ! } // for: index ! } // die() ! /** ! * end ! */ ! public void end() { ! inProgress = false; ! } // end() ! /** ! * getPresentationName ! * @returns TODO ! */ ! public String getPresentationName() { ! if (edits.size() == 0) { ! return super.getPresentationName(); ! } else { ! return lastEdit().getPresentationName(); ! } ! } // getPresentationName() ! /** ! * getRedoPresentationName ! * @returns TODO ! */ ! public String getRedoPresentationName() { ! if (edits.size() == 0) { ! return super.getRedoPresentationName(); ! } else { ! return lastEdit().getRedoPresentationName(); ! } ! } // getRedoPresentationName() ! /** ! * getUndoPresentationName ! * @returns TODO ! */ ! public String getUndoPresentationName() { ! if (edits.size() == 0) { ! return super.getUndoPresentationName(); ! } else { ! return lastEdit().getUndoPresentationName(); ! } ! } // getUndoPresentationName() - /** - * isInProgress - * @returns TODO - */ - public boolean isInProgress() { - return inProgress; - } // isInProgress() - /** - * isSignigicant - * @returns TODO - */ - public boolean isSignificant() { ! // Variables ! int index; ! UndoableEdit current; - // Check each edit - for (index = 0; index < edits.size(); index++) { - current = (UndoableEdit) edits.elementAt(index); - if (current.isSignificant() == true) { - return true; - } - } // for: index ! return false; - } // isSignificant() ! /** ! * lastEdit ! * @returns TODO ! */ ! protected UndoableEdit lastEdit() { ! if (edits.size() == 0) { ! return null; ! } ! return (UndoableEdit) edits.elementAt(edits.size() - 1); ! } // lastEdit() - /** - * redo - * @throws CannotRedoException TODO - */ - public void redo() throws CannotRedoException { ! // Variables ! int index; ! UndoableEdit current; ! // Loop through all contained UndoableEdits ! for (index = 0; index < edits.size(); index++) { ! current = (UndoableEdit) edits.elementAt(index); ! current.redo(); ! } // for: index ! } // redo() ! /** ! * String representation ! * @returns String representation ! */ ! public String toString() { ! return null; // TODO ! } // toString() - /** - * undo - * @throws CannotUndoException TODO - */ - public void undo() throws CannotUndoException { ! // Variables ! int index; ! UndoableEdit current; ! // Loop through all contained UndoableEdits ! for (index = edits.size() - 1; index >= 0; index--) { ! current = (UndoableEdit) edits.elementAt(index); ! current.undo(); ! } // for: index - } // undo() ! } // CompoundEdit --- 35,399 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.undo; import java.util.Vector; /** ! * An editing action that consists of multiple ! * UndoableEdits. ! * ! *

                The use of a CompoundEdit is divided in two separate ! * phases. ! * ! *

                1. In the first phase, the CompoundEdit is ! * initialized. After a new instance of CompoundEdit has ! * been created, {@link #addEdit(UndoableEdit)} is called for each ! * element of the compound. To terminate the initialization phase, ! * call {@link #end()}.
                2. ! * ! *
                3. In the second phase, the the CompoundEdit can be ! * used, typically by invoking {@link #undo()} and {@link ! * #redo()}.
                ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public class CompoundEdit ! extends AbstractUndoableEdit ! { ! /** ! * The identifier of this class in object serialization. Determined ! * using the serialver tool of Sun J2SE 1.4.1_01. ! */ ! private static final long serialVersionUID = -6512679249930119683L; ! /** ! * The UndoableEdits being combined into a compound ! * editing action. ! */ ! protected Vector edits; ! /** ! * Indicates whether the creation of this CompoundEdit is still in ! * progress. Initially, the value of this flag is ! * true. The {@link #end()} method changes the flag to ! * false. ! */ ! private boolean inProgress; ! /** ! * Constructs a new CompoundEdit. ! */ ! public CompoundEdit() ! { ! edits = new Vector(); ! inProgress = true; ! } ! ! /** ! * Undoes all edits that are part of of this ! * CompoundEdit. The compound elements will receive the ! * undo message in the reverse order of addition. ! * ! * @throws CannotUndoException if {@link #canUndo()} returns ! * false. This can happen if {@link #end()} has not ! * been called on this CompoundEdit, or if this edit ! * has already been undone. ! * ! * @see #canUndo() ! * @see #redo() ! */ ! public void undo() ! throws CannotUndoException ! { ! // AbstractUndoableEdit.undo() will throw a CannotUndoException if ! // canUndo returns false. ! super.undo(); ! for (int i = edits.size() - 1; i >= 0; i--) ! ((UndoableEdit) edits.elementAt(i)).undo(); ! } ! /** ! * Redoes all edits that are part of of this ! * CompoundEdit. The compound elements will receive the ! * undo message in the same order as they were added. ! * ! * @throws CannotRedoException if {@link #canRedo()} returns ! * false. This can happen if {@link #end()} has not ! * been called on this CompoundEdit, or if this edit ! * has already been redone. ! * ! * @see #canRedo() ! * @see #undo() ! */ ! public void redo() ! throws CannotRedoException ! { ! // AbstractUndoableEdit.redo() will throw a CannotRedoException if ! // canRedo returns false. ! super.redo(); ! for (int i = 0; i < edits.size(); i++) ! ((UndoableEdit) edits.elementAt(i)).redo(); ! } ! ! /** ! * Returns the the UndoableEdit that was last added to ! * this compound. ! */ ! protected UndoableEdit lastEdit() ! { ! if (edits.size() == 0) ! return null; ! else ! return (UndoableEdit) edits.elementAt(edits.size() - 1); ! } ! /** ! * Informs this edit action, and all compound edits, that they will ! * no longer be used. Some actions might use this information to ! * release resources such as open files. Called by {@link ! * UndoManager} before this action is removed from the edit queue. ! * ! *

                The compound elements will receive the ! * die message in the reverse order of addition. ! */ ! public void die() ! { ! for (int i = edits.size() - 1; i >= 0; i--) ! ((UndoableEdit) edits.elementAt(i)).die(); ! super.die(); ! } ! /** ! * Incorporates another editing action into this one, thus forming a ! * combined edit. ! * ! *

                If this edit’s {@link #end()} method has been called ! * before, false is returned immediately. Otherwise, ! * the {@linkplain #lastEdit() last added edit} is given the ! * opportunity to {@linkplain UndoableEdit#addEdit(UndoableEdit) ! * incorporate} edit. If this fails, edit ! * is given the opportunity to {@linkplain ! * UndoableEdit#replaceEdit(UndoableEdit) replace} the last added ! * edit. If this fails as well, edit gets added as a ! * new compound to {@link #edits}. ! * ! * @param edit the editing action being added. ! * ! * @return true if edit could somehow be ! * incorporated; false if edit has not ! * been incorporated because {@link #end()} was called before. ! */ ! public boolean addEdit(UndoableEdit edit) ! { ! UndoableEdit last; ! // If end has been called before, do nothing. ! if (!inProgress) ! return false; ! last = lastEdit(); ! // If edit is the very first edit, just add it to the list. ! if (last == null) ! { ! edits.add(edit); ! return true; ! } ! // Try to incorporate edit into last. ! if (last.addEdit(edit)) ! return true; ! // Try to replace last by edit. ! if (edit.replaceEdit(last)) ! { ! edits.set(edits.size() - 1, edit); ! return true; ! } ! // If everything else has failed, add edit to the list of compound ! // edits. ! edits.add(edit); ! return true; ! } + /** + * Informs this CompoundEdit that its construction + * phase has been completed. After this method has been called, + * {@link #undo()} and {@link #redo()} may be called, {@link + * #isInProgress()} will return false, and all attempts + * to {@linkplain #addEdit(UndoableEdit) add further edits} will + * fail. + */ + public void end() + { + inProgress = false; + } ! /** ! * Determines whether it would be possible to undo this editing ! * action. The result will be true if {@link #end()} ! * has been called on this CompoundEdit, {@link #die()} ! * has not yet been called, and the edit has not been undone ! * already. ! * ! * @return true to indicate that this action can be ! * undone; false otherwise. ! * ! * @see #undo() ! * @see #canRedo() ! */ ! public boolean canUndo() ! { ! return !inProgress && super.canUndo(); ! } ! /** ! * Determines whether it would be possible to redo this editing ! * action. The result will be true if {@link #end()} ! * has been called on this CompoundEdit, {@link #die()} ! * has not yet been called, and the edit has not been redone ! * already. ! * ! * @return true to indicate that this action can be ! * redone; false otherwise. ! * ! * @see #redo() ! * @see #canUndo() ! */ ! public boolean canRedo() ! { ! return !inProgress && super.canRedo(); ! } ! /** ! * Determines whether the initial construction phase of this ! * CompoundEdit is still in progress. During this ! * phase, edits {@linkplain #addEdit(UndoableEdit) may be ! * added}. After initialization has been terminated by calling ! * {@link #end()}, {@link #undo()} and {@link #redo()} can be used. ! * ! * @return true if the initialization phase is still in ! * progress; false if {@link #end()} has been called. ! * ! * @see #end() ! */ ! public boolean isInProgress() ! { ! return inProgress; ! } ! /** ! * Determines whether this editing action is significant enough for ! * being seperately undoable by the user. A typical significant ! * action would be the resizing of an object. However, changing the ! * selection in a text document would usually not be considered ! * significant. ! * ! *

                A CompoundEdit is significant if any of its ! * elements are significant. ! */ ! public boolean isSignificant() ! { ! for (int i = edits.size() - 1; i >= 0; i--) ! if (((UndoableEdit) edits.elementAt(i)).isSignificant()) ! return true; ! return false; ! } ! ! /** ! * Returns a human-readable, localized name that describes this ! * editing action and can be displayed to the user. ! * ! *

                The implementation delegates the call to the {@linkplain ! * #lastEdit() last added edit action}. If no edit has been added ! * yet, the inherited implementation will be invoked, which always ! * returns an empty string. ! */ ! public String getPresentationName() ! { ! UndoableEdit last; ! last = lastEdit(); ! if (last == null) ! return super.getPresentationName(); ! else ! return last.getPresentationName(); ! } ! /** ! * Calculates a localized message text for presenting the undo ! * action to the user. ! * ! *

                The implementation delegates the call to the {@linkplain ! * #lastEdit() last added edit action}. If no edit has been added ! * yet, the {@linkplain ! * AbstractUndoableEdit#getUndoPresentationName() inherited ! * implementation} will be invoked. ! */ ! public String getUndoPresentationName() ! { ! UndoableEdit last; ! last = lastEdit(); ! if (last == null) ! return super.getUndoPresentationName(); ! else ! return last.getUndoPresentationName(); ! } + /** + * Calculates a localized message text for presenting the redo + * action to the user. + * + *

                The implementation delegates the call to the {@linkplain + * #lastEdit() last added edit action}. If no edit has been added + * yet, the {@linkplain + * AbstractUndoableEdit#getRedoPresentationName() inherited + * implementation} will be invoked. + */ + public String getRedoPresentationName() + { + UndoableEdit last; ! last = lastEdit(); ! if (last == null) ! return super.getRedoPresentationName(); ! else ! return last.getRedoPresentationName(); ! } ! ! ! /** ! * Calculates a string that may be useful for debugging. ! */ ! public String toString() ! { ! return super.toString() ! + " inProgress: " + inProgress ! + " edits: " + edits; ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/undo/StateEditable.java gcc-3.4.0/libjava/javax/swing/undo/StateEditable.java *** gcc-3.3.3/libjava/javax/swing/undo/StateEditable.java 2002-08-09 04:26:13.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/undo/StateEditable.java 2004-01-10 23:11:56.000000000 +0000 *************** *** 1,5 **** ! /* AbstractTableModel.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- ! /* StateEditable.java -- Interface for collaborating with StateEdit. ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,62 **** package javax.swing.undo; - // Imports import java.util.Hashtable; /** ! * StateEditable interface ! * @author Andrew Selkirk */ ! public interface StateEditable { - /** - * Restore State - * @param state State - */ - public void restoreState(Hashtable state); ! /** ! * Store State ! * @param state State ! */ ! public void storeState(Hashtable state); ! } // StateEditable --- 37,112 ---- package javax.swing.undo; import java.util.Hashtable; + /** ! * The interface for objects whose state can be undone or redone by a ! * {@link StateEdit} action. ! * ! *

                The following example shows how to write a class that implements ! * this interface. ! * ! *

                 class Foo
                !  *   implements StateEditable
                !  * {
                !  *   private String name;
                !  *
                !  *   public void setName(String n) { name = n; }
                !  *
                !  *   public void restoreState(Hashtable h)
                !  *   {
                !  *     if (h.containsKey("name"))
                !  *       setName((String) h.get("name"));
                !  *   }
                !  *
                !  *   public void storeState(Hashtable s)
                !  *   {
                !  *     s.put("name", name);
                !  *   }
                !  * }
                ! * ! * @see StateEdit ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public interface StateEditable ! { ! /** ! * The ID of the Java source file in Sun’s Revision Control ! * System (RCS). This certainly should not be part of the API ! * specification. But in order to be API-compatible with ! * Sun’s reference implementation, GNU Classpath also has to ! * provide this field. However, we do not try to match its value. ! */ ! String RCSID = ""; ! /** ! * Performs an edit action, taking any editable state information ! * from the specified hash table. ! * ! *

                Note to implementors of this interface: To increase ! * efficiency, the StateEdit class {@linkplan ! * StateEdit#removeRedundantState() removes redundant state ! * information}. Therefore, implementations of this interface must be ! * prepared for the case where certain keys were stored into the ! * table by {@link #storeState}, but are not present anymore ! * when the restoreState method gets called. ! * ! * @param state a hash table containing the relevant state ! * information. ! */ ! void restoreState(Hashtable state); ! /** ! * Stores any editable state information into the specified hash ! * table. ! * ! * @param state a hash table for storing relevant state ! * information. ! */ ! void storeState(Hashtable state); ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/undo/StateEdit.java gcc-3.4.0/libjava/javax/swing/undo/StateEdit.java *** gcc-3.3.3/libjava/javax/swing/undo/StateEdit.java 2002-08-09 04:26:13.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/undo/StateEdit.java 2003-11-26 22:23:40.000000000 +0000 *************** *** 1,5 **** ! /* AbstractTableModel.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- ! /* StateEdit.java -- UndoableEdit for StateEditable implementations. ! Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,151 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.undo; ! // Imports ! import java.util.*; /** ! * StateEdit ! * @author Andrew Selkirk */ ! public class StateEdit extends AbstractUndoableEdit { - //------------------------------------------------------------- - // Variables -------------------------------------------------- - //------------------------------------------------------------- ! /** ! * RCSID ! */ ! protected static final String RCSID = ""; // TODO - /** - * object - */ - protected StateEditable object; ! /** ! * preState ! */ ! protected Hashtable preState; - /** - * postState - */ - protected Hashtable postState; ! /** ! * undoRedoName ! */ ! protected String undoRedoName; ! //------------------------------------------------------------- ! // Initialization --------------------------------------------- ! //------------------------------------------------------------- - /** - * Constructor StateEdit - * @param value0 TODO - */ - public StateEdit(StateEditable value0) { - // TODO - } // StateEdit() ! /** ! * Constructor StateEdit ! * @param value0 TODO ! * @param value1 TODO ! */ ! public StateEdit(StateEditable value0, String value1) { ! // TODO ! } // StateEdit() ! //------------------------------------------------------------- ! // Methods ---------------------------------------------------- ! //------------------------------------------------------------- - /** - * init - * @param value0 TODO - * @param value1 TODO - */ - protected void init(StateEditable value0, String value1) { - // TODO - } // init() ! /** ! * end ! */ ! public void end() { ! // TODO ! } // end() - /** - * undo - */ - public void undo() { - // TODO - } // undo() ! /** ! * redo ! */ ! public void redo() { ! // TODO ! } // redo() - /** - * getPresentationName - * @returns String - */ - public String getPresentationName() { - return null; // TODO - } // getPresentationName() ! /** ! * removeRedundantState ! */ ! protected void removeRedundantState() { ! // TODO ! } // removeRedundantState() ! } // StateEdit --- 35,261 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.undo; ! import java.util.Hashtable; ! import java.util.Iterator; /** ! * A helper class, making it easy to support undo and redo. ! * ! *

                The following example shows how to use this class. ! * ! *

                  Foo foo; // class Foo implements {@link StateEditable}
                !  *  StateEdit edit;
                !  *
                !  *  edit = new StateEdit(foo, "Name Change");
                !  *  foo.setName("Jane Doe");
                !  *  edit.end();
                !  *  undoManager.addEdit(edit);
                ! * ! *

                If Foo’s implementation of {@link ! * StateEditable} considers the name as part of the editable state, ! * the user can now choose “Undo Name Change” or ! * “Redo Name Change” from the respective menu. No ! * further undo support is needed from the application. ! * ! *

                The following explains what happens in the example. ! * ! *

                1. When a StateEdit is created, the associated ! * {@link StateEditable} gets asked to store its state into a hash ! * table, {@link #preState}.
                2. ! * ! *
                3. The application will now perform some changes to the edited ! * object. This typically happens by invoking methods on the edited ! * object.
                4. ! * ! *
                5. The editing phase is terminated by invoking the {@link #end()} ! * method of the StateEdit. The end() method ! * does two things. ! * ! *
                  • The edited object receives a second request for storing ! * its state. This time, it will use a different hash table, {@link ! * #postState}.
                  • ! * ! *
                  • To increase efficiency, the StateEdit now removes ! * any entries from {@link #preState} and {@link #postState} that have ! * the same key, and whose values are equal. Equality is determined ! * by invoking the equals method inherited from ! * {@link java.lang.Object}.
                6. ! * ! *
                7. When the user later chooses to undo the StateEdit, ! * the edited object is asked to {@linkplain StateEditable#restoreState ! * restore its state} from the {@link #preState} table. Similarly, ! * when the user chooses to redo the StateEdit, ! * the edited object gets asked to restore its state from the {@link ! * #postState}.
                ! * ! * @author Andrew Selkirk (aselkirk@sympatico.ca) ! * @author Sascha Brawer (brawer@dandelis.ch) */ ! public class StateEdit ! extends AbstractUndoableEdit ! { ! /** ! * The ID of the Java source file in Sun’s Revision Control ! * System (RCS). This certainly should not be part of the API ! * specification. But in order to be API-compatible with ! * Sun’s reference implementation, GNU Classpath also has to ! * provide this field. However, we do not try to match its value. ! */ ! protected static final String RCSID = ""; ! /** ! * The object which is being edited by this StateEdit. ! */ ! protected StateEditable object; ! /** ! * The state of object at the time of constructing ! * this StateEdit. ! */ ! protected Hashtable preState; ! /** ! * The state of object at the time when {@link #end()} ! * was called. ! */ ! protected Hashtable postState; ! /** ! * A human-readable name for this edit action. ! */ ! protected String undoRedoName; ! /** ! * Constructs a StateEdit, specifying the object whose ! * state is being edited. ! * ! * @param obj the object whose state is being edited by this ! * StateEdit. ! */ ! public StateEdit(StateEditable obj) ! { ! init(obj, null); ! } ! /** ! * Constructs a StateEdit, specifying the object whose ! * state is being edited. ! * ! * @param obj the object whose state is being edited by this ! * StateEdit. ! * ! * @param name the human-readable name of the editing action. ! */ ! public StateEdit(StateEditable obj, String name) ! { ! init(obj, name); ! } ! /** ! * Initializes this StateEdit. The edited object will ! * be asked to store its current state into {@link #preState}. ! * ! * @param obj the object being edited. ! * ! * @param name the human-readable name of the editing action. ! */ ! protected void init(StateEditable obj, String name) ! { ! object = obj; ! undoRedoName = name; ! preState = new Hashtable(); ! postState = new Hashtable(); ! obj.storeState(preState); ! } ! /** ! * Informs this StateEdit that all edits are finished. ! * The edited object will be asked to store its state into {@link ! * #postState}, and any redundant entries will get removed from ! * {@link #preState} and {@link #postState}. ! */ ! public void end() ! { ! object.storeState(postState); ! removeRedundantState(); ! } ! /** ! * Undoes this edit operation. The edited object will be asked to ! * {@linkplain StateEditable#restoreState restore its state} from ! * {@link #preState}. ! * ! * @throws CannotUndoException if {@link #canUndo()} returns ! * false, for example because this action has already ! * been undone. ! */ ! public void undo() ! { ! super.undo(); ! object.restoreState(preState); ! } ! /** ! * Redoes this edit operation. The edited object will be asked to ! * {@linkplain StateEditable#restoreState restore its state} from ! * {@link #postState}. ! * ! * @throws CannotRedoException if {@link #canRedo()} returns ! * false, for example because this action has not yet ! * been undone. ! */ ! public void redo() ! { ! super.redo(); ! object.restoreState(postState); ! } ! ! ! /** ! * Returns a human-readable, localized name that describes this ! * editing action and can be displayed to the user. ! * ! * @return the name, or null if no presentation ! * name is available. ! */ ! public String getPresentationName() ! { ! return undoRedoName; ! } ! ! ! /** ! * Removes all redundant entries from the pre- and post-edit state ! * hash tables. An entry is considered redundant if it is present ! * both before and after the edit, and if the two values are equal. ! */ ! protected void removeRedundantState() ! { ! Iterator i = preState.keySet().iterator(); ! while (i.hasNext()) ! { ! Object key = i.next(); ! if (postState.containsKey(key)) ! { ! if (preState.get(key).equals(postState.get(key))) ! { ! i.remove(); ! postState.remove(key); ! } ! } ! } ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/undo/UndoableEdit.java gcc-3.4.0/libjava/javax/swing/undo/UndoableEdit.java *** gcc-3.3.3/libjava/javax/swing/undo/UndoableEdit.java 2002-08-09 04:26:13.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/undo/UndoableEdit.java 2003-10-12 13:33:32.000000000 +0000 *************** exception statement from your version. * *** 38,44 **** package javax.swing.undo; /** ! * UndoableEdit interface * @author Andrew Selkirk */ public interface UndoableEdit { --- 38,44 ---- package javax.swing.undo; /** ! * UndoableEdit public interface * @author Andrew Selkirk */ public interface UndoableEdit { *************** public interface UndoableEdit { *** 48,114 **** * @param anEdit TODO * @returns TODO */ ! public boolean addEdit(UndoableEdit anEdit); /** * canRedo * @returns TODO */ ! public boolean canRedo(); /** * canRedo * @returns TODO */ ! public boolean canUndo(); /** * die */ ! public void die(); /** * getPresentationName * @returns TODO */ ! public String getPresentationName(); /** * getRedoPresentationName * @returns TODO */ ! public String getRedoPresentationName(); /** * getUndoPresentationName * @returns TODO */ ! public String getUndoPresentationName(); /** * isSignificant * @returns TODO */ ! public boolean isSignificant(); /** * redo * @throws CannotRedoException TODO */ ! public void redo() throws CannotRedoException; /** * replaceEdit * @param anEdit TODO * @returns TODO */ ! public boolean replaceEdit(UndoableEdit anEdit); /** * undo * @throws CannotUndoException TODO */ ! public void undo() throws CannotUndoException; } // UndoableEdit --- 48,114 ---- * @param anEdit TODO * @returns TODO */ ! boolean addEdit(UndoableEdit anEdit); /** * canRedo * @returns TODO */ ! boolean canRedo(); /** * canRedo * @returns TODO */ ! boolean canUndo(); /** * die */ ! void die(); /** * getPresentationName * @returns TODO */ ! String getPresentationName(); /** * getRedoPresentationName * @returns TODO */ ! String getRedoPresentationName(); /** * getUndoPresentationName * @returns TODO */ ! String getUndoPresentationName(); /** * isSignificant * @returns TODO */ ! boolean isSignificant(); /** * redo * @throws CannotRedoException TODO */ ! void redo() throws CannotRedoException; /** * replaceEdit * @param anEdit TODO * @returns TODO */ ! boolean replaceEdit(UndoableEdit anEdit); /** * undo * @throws CannotUndoException TODO */ ! void undo() throws CannotUndoException; } // UndoableEdit diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/undo/UndoableEditSupport.java gcc-3.4.0/libjava/javax/swing/undo/UndoableEditSupport.java *** gcc-3.3.3/libjava/javax/swing/undo/UndoableEditSupport.java 2002-08-09 04:26:13.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/undo/UndoableEditSupport.java 2004-01-07 14:42:04.000000000 +0000 *************** *** 1,5 **** ! /* AbstractTableModel.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- ! /* UndoableEditSupport.java -- ! Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** this exception to your version of the li *** 35,170 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.undo; ! // Imports ! import java.util.*; ! import javax.swing.event.*; /** ! * UndoableEditSupport ! * @author Andrew Selkirk */ ! public class UndoableEditSupport { - //------------------------------------------------------------- - // Variables -------------------------------------------------- - //------------------------------------------------------------- ! /** ! * updateLevel ! */ ! protected int updateLevel; - /** - * compoundEdit - */ - protected CompoundEdit compoundEdit; ! /** ! * listeners ! */ ! protected Vector listeners = new Vector(); - /** - * realSource - */ - protected Object realSource; - //------------------------------------------------------------- - // Initialization --------------------------------------------- - //------------------------------------------------------------- ! /** ! * Constructor UndoableEditSupport ! */ ! public UndoableEditSupport() { ! // TODO ! } // UndoableEditSupport() - /** - * Constructor UndoableEditSupport - * @param object TODO - */ - public UndoableEditSupport(Object object) { - realSource = object; - } // UndoableEditSupport() - //------------------------------------------------------------- - // Methods ---------------------------------------------------- - //------------------------------------------------------------- ! /** ! * toString ! * @returns String ! */ ! public String toString() { ! return null; // TODO ! } // toString() - /** - * addUndoableEditListener - * @param value0 TODO - */ - public synchronized void addUndoableEditListener(UndoableEditListener value0) { - // TODO - } // addUndoableEditListener() ! /** ! * removeUndoableEditListener ! * @param value0 TODO ! */ ! public synchronized void removeUndoableEditListener(UndoableEditListener value0) { ! // TODO ! } // removeUndoableEditListener() - /** - * _postEdit - * @param value0 TODO - */ - protected void _postEdit(UndoableEdit value0) { - // TODO - } // _postEdit() ! /** ! * postEdit ! * @param value0 TODO ! */ ! public synchronized void postEdit(UndoableEdit value0) { ! // TODO ! } // postEdit() - /** - * getUpdateLevel - * @returns int - */ - public int getUpdateLevel() { - return 0; // TODO - } // getUpdateLevel() ! /** ! * beginUpdate ! */ ! public synchronized void beginUpdate() { ! // TODO ! } // beginUpdate() - /** - * createCompoundEdit - * @returns CompoundEdit - */ - protected CompoundEdit createCompoundEdit() { - return null; // TODO - } // createCompoundEdit() ! /** ! * endUpdate ! */ ! public synchronized void endUpdate() { ! // TODO ! } // endUpdate() ! } // UndoableEditSupport --- 35,271 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.undo; ! import java.util.Iterator; ! import java.util.Vector; ! import javax.swing.event.UndoableEditEvent; ! import javax.swing.event.UndoableEditListener; ! /** ! * A helper class for supporting {@link ! * javax.swing.event.UndoableEditListener}. ! * ! * @author
                Andrew Selkirk ! * @author Sascha Brawer */ ! public class UndoableEditSupport ! { ! /** ! * The number of times that {@link #beginUpdate()} has been called ! * without a matching call to {@link #endUpdate()}. ! */ ! protected int updateLevel; ! /** ! * compoundEdit ! */ ! protected CompoundEdit compoundEdit; ! /** ! * The currently registered listeners. ! */ ! protected Vector listeners = new Vector(); + /** + * The source of the broadcast UndoableEditEvents. + */ + protected Object realSource; ! /** ! * Constructs a new helper for broadcasting UndoableEditEvents. The ! * events will indicate the newly constructed ! * UndoableEditSupport instance as their source. ! * ! * @see #UndoableEditSupport(java.lang.Object) ! */ ! public UndoableEditSupport() ! { ! realSource = this; ! } + /** + * Constructs a new helper for broadcasting UndoableEditEvents. + * + * @param realSource the source of the UndoableEditEvents that will + * be broadcast by this helper. If realSource is + * null, the events will indicate the newly constructed + * UndoableEditSupport instance as their source. + */ + public UndoableEditSupport(Object realSource) + { + if (realSource == null) + realSource = this; + this.realSource = realSource; + } ! /** ! * Returns a string representation of this object that may be useful ! * for debugging. ! */ ! public String toString() ! { ! // Note that often, this.realSource == this. Therefore, dumping ! // realSource without additional checks may lead to infinite ! // recursion. See Classpath bug #7119. ! return super.toString() + " updateLevel: " + updateLevel ! + " listeners: " + listeners + " compoundEdit: " + compoundEdit; ! } ! /** ! * Registers a listener. ! * ! * @param val the listener to be added. ! */ ! public synchronized void addUndoableEditListener(UndoableEditListener val) ! { ! listeners.add(val); ! } ! /** ! * Unregisters a listener. ! * @param val the listener to be removed. ! */ ! public synchronized void removeUndoableEditListener(UndoableEditListener val) ! { ! listeners.removeElement(val); ! } ! /** ! * Returns an array containing the currently registered listeners. ! */ ! public synchronized UndoableEditListener[] getUndoableEditListeners() ! { ! UndoableEditListener[] result = new UndoableEditListener[listeners.size()]; ! return (UndoableEditListener[]) listeners.toArray(result); ! } ! /** ! * Notifies all registered listeners that an {@link ! * UndoableEditEvent} has occured. ! * ! *

                Lack of Thread Safety: It is not safe to call ! * this method from concurrent threads, unless the call is protected ! * by a synchronization on this UndoableEditSupport ! * instance. ! * ! * @param edit the edit action to be posted. ! */ ! protected void _postEdit(UndoableEdit edit) ! { ! UndoableEditEvent event; ! Iterator iter; + // Do nothing if we have no listeners. + if (listeners.isEmpty()) + return; ! event = new UndoableEditEvent(realSource, edit); ! ! // We clone the vector because this allows listeners to register ! // or unregister listeners in their undoableEditHappened method. ! // Otherwise, this would throw exceptions (in the case of ! // Iterator, a java.util.ConcurrentModificationException; in the ! // case of a direct loop over the Vector elements, some ! // index-out-of-bounds exception). ! iter = ((Vector) listeners.clone()).iterator(); ! while (iter.hasNext()) ! ((UndoableEditListener) iter.next()).undoableEditHappened(event); ! } ! ! ! /** ! * If {@link #beginEdit} has been called (so that the current ! * update level is greater than zero), adds the specified edit ! * to {@link #compoundEdit}. Otherwise, notify listeners of the ! * edit by calling {@link #_postEdit(UndoableEdit)}. ! * ! *

                Thread Safety: It is safe to call this method from any ! * thread without external synchronization. ! * ! * @param edit the edit action to be posted. ! */ ! public synchronized void postEdit(UndoableEdit edit) ! { ! if (compoundEdit != null) ! compoundEdit.addEdit(edit); ! else ! _postEdit(edit); ! } ! ! ! /** ! * Returns the current update level. ! */ ! public int getUpdateLevel() ! { ! return updateLevel; ! } ! ! ! /** ! * Starts a (possibly nested) update session. If the current update ! * level is zero, {@link #compoundEdit} is set to the result of the ! * {@link #createCompoundEdit} method. In any case, the update level ! * is increased by one. ! * ! *

                Thread Safety: It is safe to call this method from any ! * thread without external synchronization. ! */ ! public synchronized void beginUpdate() ! { ! if (compoundEdit == null) ! compoundEdit = createCompoundEdit(); ! ++updateLevel; ! } ! ! ! /** ! * Creates a new instance of {@link #CompoundEdit}. Called by {@link ! * #beginUpdate}. If a subclass wants {@link #beginUpdate} to work ! * on a specific {@link #compoundEdit}, it should override this ! * method. ! * ! * @returns a newly created instance of {@link #CompoundEdit}. ! */ ! protected CompoundEdit createCompoundEdit() ! { ! return new CompoundEdit(); ! } ! ! ! /** ! * Ends an update session. If the terminated session was the ! * outermost session, {@link #compoundEdit} will receive an ! * end message, and {@link #_postEdit} gets called in ! * order to notify any listeners. Finally, the ! * compoundEdit is discarded. ! * ! *

                Thread Safety: It is safe to call this method from any ! * thread without external synchronization. ! */ ! public synchronized void endUpdate() ! { ! if (updateLevel == 0) ! throw new IllegalStateException(); ! ! if (--updateLevel > 0) ! return; ! ! compoundEdit.end(); ! _postEdit(compoundEdit); ! compoundEdit = null; ! } ! } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/undo/UndoManager.java gcc-3.4.0/libjava/javax/swing/undo/UndoManager.java *** gcc-3.3.3/libjava/javax/swing/undo/UndoManager.java 2002-08-09 04:26:13.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/undo/UndoManager.java 2003-06-11 13:20:41.000000000 +0000 *************** this exception to your version of the li *** 35,44 **** obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.undo; ! // Imports ! import javax.swing.event.*; /** * UndoManager --- 35,45 ---- obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing.undo; ! import javax.swing.event.UndoableEditEvent; ! import javax.swing.event.UndoableEditListener; /** * UndoManager diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/UnsupportedLookAndFeelException.java gcc-3.4.0/libjava/javax/swing/UnsupportedLookAndFeelException.java *** gcc-3.3.3/libjava/javax/swing/UnsupportedLookAndFeelException.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/UnsupportedLookAndFeelException.java 2003-03-21 09:18:31.000000000 +0000 *************** package javax.swing; *** 40,46 **** public class UnsupportedLookAndFeelException extends Exception { ! UnsupportedLookAndFeelException(String a) { super(a); } --- 40,46 ---- public class UnsupportedLookAndFeelException extends Exception { ! public UnsupportedLookAndFeelException(String a) { super(a); } diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/ViewportLayout.java gcc-3.4.0/libjava/javax/swing/ViewportLayout.java *** gcc-3.3.3/libjava/javax/swing/ViewportLayout.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/ViewportLayout.java 2004-01-10 21:07:43.000000000 +0000 *************** *** 1,5 **** /* ViewportLayout.java -- ! Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. --- 1,5 ---- /* ViewportLayout.java -- ! Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. *************** exception statement from your version. * *** 37,52 **** package javax.swing; ! // Imports ! import java.awt.*; ! import java.io.*; /** * ViewportLayout * @author Andrew Selkirk * @version 1.0 */ ! public class ViewportLayout implements LayoutManager, Serializable { //------------------------------------------------------------- // Initialization --------------------------------------------- --- 37,56 ---- package javax.swing; ! import java.awt.Component; ! import java.awt.Container; ! import java.awt.Dimension; ! import java.awt.LayoutManager; ! import java.io.Serializable; /** * ViewportLayout * @author Andrew Selkirk * @version 1.0 */ ! public class ViewportLayout implements LayoutManager, Serializable ! { ! static final long serialVersionUID = -788225906076097229L; //------------------------------------------------------------- // Initialization --------------------------------------------- diff -Nrc3pad gcc-3.3.3/libjava/javax/swing/WindowConstants.java gcc-3.4.0/libjava/javax/swing/WindowConstants.java *** gcc-3.3.3/libjava/javax/swing/WindowConstants.java 2002-08-09 04:26:10.000000000 +0000 --- gcc-3.4.0/libjava/javax/swing/WindowConstants.java 2003-10-12 13:20:49.000000000 +0000 *************** public interface WindowConstants { *** 51,67 **** /** * DO_NOTHING_ON_CLOSE */ ! public static final int DO_NOTHING_ON_CLOSE = 0; /** * HIDE_ON_CLOSE */ ! public static final int HIDE_ON_CLOSE = 1; /** * DISPOSE_ON_CLOSE */ ! public static final int DISPOSE_ON_CLOSE = 2; } // WindowConstants --- 51,72 ---- /** * DO_NOTHING_ON_CLOSE */ ! int DO_NOTHING_ON_CLOSE = 0; /** * HIDE_ON_CLOSE */ ! int HIDE_ON_CLOSE = 1; /** * DISPOSE_ON_CLOSE */ ! int DISPOSE_ON_CLOSE = 2; ! ! /** ! * EXIT_ON_CLOSE ! */ ! int EXIT_ON_CLOSE =3; } // WindowConstants diff -Nrc3pad gcc-3.3.3/libjava/javax/transaction/Status.java gcc-3.4.0/libjava/javax/transaction/Status.java *** gcc-3.3.3/libjava/javax/transaction/Status.java 2002-11-26 22:48:42.000000000 +0000 --- gcc-3.4.0/libjava/javax/transaction/Status.java 2003-10-11 19:18:24.000000000 +0000 *************** package javax.transaction; *** 45,58 **** public interface Status { ! public static final int STATUS_ACTIVE = 0; ! public static final int STATUS_MARKED_ROLLBACK = 1; ! public static final int STATUS_PREPARED = 2; ! public static final int STATUS_COMMITTED = 3; ! public static final int STATUS_ROLLEDBACK = 4; ! public static final int STATUS_UNKNOWN = 5; ! public static final int STATUS_NO_TRANSACTION = 6; ! public static final int STATUS_PREPARING = 7; ! public static final int STATUS_COMMITTING = 8; ! public static final int STATUS_ROLLING_BACK = 9; } --- 45,58 ---- public interface Status { ! int STATUS_ACTIVE = 0; ! int STATUS_MARKED_ROLLBACK = 1; ! int STATUS_PREPARED = 2; ! int STATUS_COMMITTED = 3; ! int STATUS_ROLLEDBACK = 4; ! int STATUS_UNKNOWN = 5; ! int STATUS_NO_TRANSACTION = 6; ! int STATUS_PREPARING = 7; ! int STATUS_COMMITTING = 8; ! int STATUS_ROLLING_BACK = 9; } diff -Nrc3pad gcc-3.3.3/libjava/javax/transaction/Synchronization.java gcc-3.4.0/libjava/javax/transaction/Synchronization.java *** gcc-3.3.3/libjava/javax/transaction/Synchronization.java 2002-11-26 22:48:42.000000000 +0000 --- gcc-3.4.0/libjava/javax/transaction/Synchronization.java 2003-10-11 19:18:24.000000000 +0000 *************** package javax.transaction; *** 45,50 **** public interface Synchronization { ! public void beforeCompletion(); ! public void afterCompletion(int status); } --- 45,50 ---- public interface Synchronization { ! void beforeCompletion(); ! void afterCompletion(int status); } diff -Nrc3pad gcc-3.3.3/libjava/javax/transaction/Transaction.java gcc-3.4.0/libjava/javax/transaction/Transaction.java *** gcc-3.3.3/libjava/javax/transaction/Transaction.java 2002-11-26 22:48:42.000000000 +0000 --- gcc-3.4.0/libjava/javax/transaction/Transaction.java 2003-10-11 19:18:24.000000000 +0000 *************** import javax.transaction.xa.XAResource; *** 47,70 **** public interface Transaction { ! public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, SystemException; ! public boolean delistResource(XAResource xaRes, int flag) throws IllegalStateException, SystemException; ! public boolean enlistResource(XAResource xaRes) throws RollbackException, IllegalStateException, SystemException; ! public int getStatus() throws SystemException; ! public void registerSynchronization(Synchronization sync) throws RollbackException, IllegalStateException, SystemException; ! public void rollback() throws IllegalStateException, SystemException; ! public void setRollbackOnly() throws IllegalStateException, SystemException; } --- 47,70 ---- public interface Transaction { ! void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, SystemException; ! boolean delistResource(XAResource xaRes, int flag) throws IllegalStateException, SystemException; ! boolean enlistResource(XAResource xaRes) throws RollbackException, IllegalStateException, SystemException; ! int getStatus() throws SystemException; ! void registerSynchronization(Synchronization sync) throws RollbackException, IllegalStateException, SystemException; ! void rollback() throws IllegalStateException, SystemException; ! void setRollbackOnly() throws IllegalStateException, SystemException; } diff -Nrc3pad gcc-3.3.3/libjava/javax/transaction/TransactionManager.java gcc-3.4.0/libjava/javax/transaction/TransactionManager.java *** gcc-3.3.3/libjava/javax/transaction/TransactionManager.java 2002-11-26 22:48:42.000000000 +0000 --- gcc-3.4.0/libjava/javax/transaction/TransactionManager.java 2003-10-11 19:18:24.000000000 +0000 *************** package javax.transaction; *** 45,72 **** public interface TransactionManager { ! public void begin() throws NotSupportedException, SystemException; ! public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException; ! public int getStatus() throws SystemException; ! public Transaction getTransaction() throws SystemException; ! public void resume(Transaction tobj) throws InvalidTransactionException, IllegalStateException, SystemException; ! public void rollback() throws IllegalStateException, SecurityException, SystemException; ! public void setRollbackOnly() throws IllegalStateException, SystemException; ! public void setTransactionTimeout(int seconds) throws SystemException; ! public Transaction suspend() throws SystemException; } --- 45,72 ---- public interface TransactionManager { ! void begin() throws NotSupportedException, SystemException; ! void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException; ! int getStatus() throws SystemException; ! Transaction getTransaction() throws SystemException; ! void resume(Transaction tobj) throws InvalidTransactionException, IllegalStateException, SystemException; ! void rollback() throws IllegalStateException, SecurityException, SystemException; ! void setRollbackOnly() throws IllegalStateException, SystemException; ! void setTransactionTimeout(int seconds) throws SystemException; ! Transaction suspend() throws SystemException; } diff -Nrc3pad gcc-3.3.3/libjava/javax/transaction/UserTransaction.java gcc-3.4.0/libjava/javax/transaction/UserTransaction.java *** gcc-3.3.3/libjava/javax/transaction/UserTransaction.java 2002-11-26 22:48:42.000000000 +0000 --- gcc-3.4.0/libjava/javax/transaction/UserTransaction.java 2003-10-11 19:18:24.000000000 +0000 *************** package javax.transaction; *** 45,64 **** public interface UserTransaction { ! public void begin() throws NotSupportedException, SystemException; ! public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException; ! public void rollback() throws IllegalStateException, SecurityException, SystemException; ! public void setRollbackOnly() throws IllegalStateException, SystemException; ! public int getStatus() throws SystemException; ! public void setTransactionTimeout(int seconds) throws SystemException; } --- 45,64 ---- public interface UserTransaction { ! void begin() throws NotSupportedException, SystemException; ! void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException; ! void rollback() throws IllegalStateException, SecurityException, SystemException; ! void setRollbackOnly() throws IllegalStateException, SystemException; ! int getStatus() throws SystemException; ! void setTransactionTimeout(int seconds) throws SystemException; } diff -Nrc3pad gcc-3.3.3/libjava/javax/transaction/xa/XAResource.java gcc-3.4.0/libjava/javax/transaction/xa/XAResource.java *** gcc-3.3.3/libjava/javax/transaction/xa/XAResource.java 2002-11-26 22:48:42.000000000 +0000 --- gcc-3.4.0/libjava/javax/transaction/xa/XAResource.java 2003-10-11 19:18:24.000000000 +0000 *************** package javax.transaction.xa; *** 44,69 **** public interface XAResource { ! public static final int TMENDRSCAN = 8388608; ! public static final int TMFAIL = 536870912; ! public static final int TMJOIN = 2097152; ! public static final int TMNOFLAGS = 0; ! public static final int TMONEPHASE = 1073741824; ! public static final int TMRESUME = 134217728; ! public static final int TMSTARTRSCAN = 16777216; ! public static final int TMSUCCESS = 67108864; ! public static final int TMSUSPEND = 33554432; ! public static final int XA_RDONLY = 3; ! public static final int XA_OK = 0; ! public void commit(Xid xid, boolean onePhase) throws XAException; ! public void end(Xid xid, int flags) throws XAException; ! public void forget(Xid xid) throws XAException; ! public int getTransactionTimeout() throws XAException; ! public boolean isSameRM(XAResource xares) throws XAException; ! public int prepare(Xid xid) throws XAException; ! public Xid[] recover(int flag) throws XAException; ! public void rollback(Xid xid) throws XAException; ! public boolean setTransactionTimeout(int seconds) throws XAException; ! public void start(Xid xid, int flags) throws XAException; } --- 44,69 ---- public interface XAResource { ! int TMENDRSCAN = 8388608; ! int TMFAIL = 536870912; ! int TMJOIN = 2097152; ! int TMNOFLAGS = 0; ! int TMONEPHASE = 1073741824; ! int TMRESUME = 134217728; ! int TMSTARTRSCAN = 16777216; ! int TMSUCCESS = 67108864; ! int TMSUSPEND = 33554432; ! int XA_RDONLY = 3; ! int XA_OK = 0; ! void commit(Xid xid, boolean onePhase) throws XAException; ! void end(Xid xid, int flags) throws XAException; ! void forget(Xid xid) throws XAException; ! int getTransactionTimeout() throws XAException; ! boolean isSameRM(XAResource xares) throws XAException; ! int prepare(Xid xid) throws XAException; ! Xid[] recover(int flag) throws XAException; ! void rollback(Xid xid) throws XAException; ! boolean setTransactionTimeout(int seconds) throws XAException; ! void start(Xid xid, int flags) throws XAException; } diff -Nrc3pad gcc-3.3.3/libjava/javax/transaction/xa/Xid.java gcc-3.4.0/libjava/javax/transaction/xa/Xid.java *** gcc-3.3.3/libjava/javax/transaction/xa/Xid.java 2002-11-26 22:48:42.000000000 +0000 --- gcc-3.4.0/libjava/javax/transaction/xa/Xid.java 2003-10-11 19:18:24.000000000 +0000 *************** package javax.transaction.xa; *** 44,53 **** public interface Xid { ! public static final int MAXGTRIDSIZE = 64; ! public static final int MAXBQUALSIZE = 64; ! public int getFormatId(); ! public byte[] getGlobalTransactionId(); ! public byte[] getBranchQualifier(); } --- 44,53 ---- public interface Xid { ! int MAXGTRIDSIZE = 64; ! int MAXBQUALSIZE = 64; ! int getFormatId(); ! byte[] getGlobalTransactionId(); ! byte[] getBranchQualifier(); } diff -Nrc3pad gcc-3.3.3/libjava/jni/classpath/jcl.c gcc-3.4.0/libjava/jni/classpath/jcl.c *** gcc-3.3.3/libjava/jni/classpath/jcl.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/classpath/jcl.c 2003-10-08 15:49:32.000000000 +0000 *************** *** 0 **** --- 1,140 ---- + /* jcl.c + Copyright (C) 1998 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + #include + #include + #include + + #ifndef __GNUC__ + #define __attribute__(x) /* nothing */ + #endif + + static char errstr[4098]; // this way the memory is pre-allocated, so that we do not have to worry if we are out of memory. + + JNIEXPORT void JNICALL JCL_ThrowException(JNIEnv * env, char * className, char * errMsg) { + jclass excClass; + if((*env)->ExceptionOccurred(env)) { + (*env)->ExceptionClear(env); + } + excClass = (*env)->FindClass(env, className); + if(excClass == NULL) { + jclass errExcClass; + errExcClass = (*env)->FindClass(env, "java/lang/ClassNotFoundException"); + if(errExcClass == NULL) { + errExcClass = (*env)->FindClass(env, "java/lang/InternalError"); + if(errExcClass == NULL) { + sprintf(errstr,"JCL: Utterly failed to throw exeption %s with message %s.",className,errMsg); + fprintf(stderr, errstr); + return; + } + } + sprintf(errstr,"JCL: Failed to throw exception %s with message %s: could not find exception class.", className, errMsg); + (*env)->ThrowNew(env, errExcClass, errstr); + } + (*env)->ThrowNew(env, excClass, errMsg); + } + + JNIEXPORT void * JNICALL JCL_malloc(JNIEnv * env, size_t size) { + void * mem = malloc(size); + if(mem == NULL) { + JCL_ThrowException(env, "java/lang/OutOfMemoryError", "malloc() failed."); + return NULL; + } + return mem; + } + + JNIEXPORT void * JNICALL JCL_realloc(JNIEnv *env, void *ptr, size_t size) + { + ptr = realloc(ptr, size); + if (ptr == 0) + { + JCL_ThrowException(env, "java/lang/OutOfMemoryError", + "malloc() failed."); + return NULL; + } + return(ptr); + } + + JNIEXPORT void JNICALL JCL_free(JNIEnv * env __attribute__((unused)), + void * p) + { + if(p != NULL) { + free(p); + } + } + + JNIEXPORT char * JNICALL JCL_jstring_to_cstring(JNIEnv * env, jstring s) { + char* cstr; + if(s == NULL) { + JCL_ThrowException(env, "java/lang/NullPointerException","Null string"); + return NULL; + } + cstr = (char*)(*env)->GetStringUTFChars(env, s, NULL); + if(cstr == NULL) { + JCL_ThrowException(env, "java/lang/InternalError", "GetStringUTFChars() failed."); + return NULL; + } + return cstr; + } + + JNIEXPORT void JNICALL JCL_free_cstring(JNIEnv * env, jstring s, char * cstr) { + (*env)->ReleaseStringUTFChars(env, s, cstr); + } + + JNIEXPORT jint JNICALL JCL_MonitorEnter(JNIEnv * env, jobject o) { + jint retval = (*env)->MonitorEnter(env,o); + if(retval != 0) { + JCL_ThrowException(env, "java/lang/InternalError", "MonitorEnter() failed."); + } + return retval; + } + + JNIEXPORT jint JNICALL JCL_MonitorExit(JNIEnv * env, jobject o) { + jint retval = (*env)->MonitorExit(env,o); + if(retval != 0) { + JCL_ThrowException(env, "java/lang/InternalError", "MonitorExit() failed."); + } + return retval; + } + + JNIEXPORT jclass JNICALL JCL_FindClass(JNIEnv * env, char * className) { + jclass retval = (*env)->FindClass(env,className); + if(retval == NULL) { + JCL_ThrowException(env, "java/lang/ClassNotFoundException", className); + } + return retval; + } diff -Nrc3pad gcc-3.3.3/libjava/jni/classpath/jcl.h gcc-3.4.0/libjava/jni/classpath/jcl.h *** gcc-3.3.3/libjava/jni/classpath/jcl.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/classpath/jcl.h 2003-01-31 17:54:14.000000000 +0000 *************** *** 0 **** --- 1,64 ---- + /* jcl.h + Copyright (C) 1998 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + #ifndef __JCL_H__ + #define __JCL_H__ + + #include + #include + #include + + JNIEXPORT jclass JNICALL JCL_FindClass(JNIEnv * env, char * className); + JNIEXPORT void JNICALL JCL_ThrowException(JNIEnv * env, char * className, char * errMsg); + JNIEXPORT void * JNICALL JCL_malloc(JNIEnv *env, size_t size); + JNIEXPORT void * JNICALL JCL_realloc(JNIEnv *env, void *ptr, size_t size); + JNIEXPORT void JNICALL JCL_free(JNIEnv *env, void * p); + JNIEXPORT char * JNICALL JCL_jstring_to_cstring(JNIEnv *env, jstring s); + JNIEXPORT void JNICALL JCL_free_cstring(JNIEnv *env, jstring s, char * cstr); + JNIEXPORT jint JNICALL JCL_MonitorEnter(JNIEnv *env, jobject o); + JNIEXPORT jint JNICALL JCL_MonitorExit(JNIEnv *env, jobject o); + + #define JCL_RETHROW_EXCEPTION(env) if((*(env))->ExceptionOccurred((env)) != NULL) return NULL; + + /* Simple debug macro */ + #ifdef DEBUG + #define DBG(x) fprintf(stderr, (x)); + #else + #define DBG(x) + #endif + + #endif diff -Nrc3pad gcc-3.3.3/libjava/jni/classpath/jnilink.c gcc-3.4.0/libjava/jni/classpath/jnilink.c *** gcc-3.3.3/libjava/jni/classpath/jnilink.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/classpath/jnilink.c 2003-01-31 17:54:14.000000000 +0000 *************** *** 0 **** --- 1,117 ---- + /* JNILINK 1.1: JNI version. + Copyright (C) 1998 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #include "jnilink.h" + #include + #include + + #include + + #define GETCLASS(c) *(jclass*)(c) + + JNIEXPORT jclass JNICALL + LINK_RelinkClass (JNIEnv * env, linkedClass * c, char * name) { + jclass found; + LINK_UnlinkClass(env,*c); + + found = (*env)->FindClass(env,name); + if(found == NULL) + return NULL; + + *c = JCL_malloc(env,sizeof(jclass)); + if(*c == NULL) + return NULL; + + GETCLASS(*c) = (*env)->NewGlobalRef(env,found); + return GETCLASS(*c); + } + + JNIEXPORT jclass JNICALL + LINK_RelinkKnownClass(JNIEnv * env, linkedClass * c, jclass newClass) { + LINK_UnlinkClass(env,*c); + + *c = JCL_malloc(env,sizeof(jclass)); + if(*c == NULL) + return NULL; + + GETCLASS(*c) = (*env)->NewGlobalRef(env,newClass); + return newClass; + } + + JNIEXPORT jmethodID JNICALL + LINK_RelinkMethod (JNIEnv * env, jmethodID * m, linkedClass c, + char * name, char * sig) { + *m = (*env)->GetMethodID(env,GETCLASS(c),name,sig); + return *m; + } + + JNIEXPORT jmethodID JNICALL + LINK_RelinkStaticMethod(JNIEnv * env, jmethodID * m, linkedClass c, + char * name, char * sig) { + *m = (*env)->GetStaticMethodID(env,GETCLASS(c),name,sig); + return *m; + } + + JNIEXPORT jfieldID JNICALL + LINK_RelinkField (JNIEnv * env, jfieldID * f, linkedClass c, + char * name, char * sig) { + *f = (*env)->GetFieldID(env,GETCLASS(c),name,sig); + return *f; + } + + JNIEXPORT jfieldID JNICALL + LINK_RelinkStaticField (JNIEnv * env, jfieldID * f, linkedClass c, + char * name, char * sig) { + *f = (*env)->GetStaticFieldID(env,GETCLASS(c),name,sig); + return *f; + } + + + /* These are for when the class referencing the symbols is unloaded; it + destroys any object references + * the linker might have kept around. + */ + JNIEXPORT void JNICALL LINK_UnlinkClass (JNIEnv * env, linkedClass * c) { + if(*c != NULL) { + if(GETCLASS(*c) != NULL) + (*env)->DeleteGlobalRef(env,GETCLASS(*c)); + JCL_free(env,*c); + *c = NULL; + } + } + diff -Nrc3pad gcc-3.3.3/libjava/jni/classpath/jnilink.h gcc-3.4.0/libjava/jni/classpath/jnilink.h *** gcc-3.3.3/libjava/jni/classpath/jnilink.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/classpath/jnilink.h 2003-01-31 17:54:14.000000000 +0000 *************** *** 0 **** --- 1,86 ---- + /* JNILINK 1.1: JNI version. + Copyright (C) 1998 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #ifndef __JNILINK_H__ + #define __JNILINK_H__ + + #include + + typedef void* linkedClass; + + #define LINK_LinkClass(env,c,name) ((c)==NULL ? LINK_ReallyLinkClass((env),&(c),(name)) : (c)) + #define LINK_LinkKnownClass(env,c,newClass) ((c)==NULL ? LINK_ReallyLinkKnownClass((env),&(c),(newClass)) : (c)) + #define LINK_LinkMethod(env,m,c,name,sig) ((m)==NULL ? LINK_RelinkMethod((env),&(m),(c),(name),(sig)) : (m)) + #define LINK_LinkStaticMethod(env,m,c,name,sig) ((m)==NULL ? LINK_RelinkStaticMethod((env),&(m),(c),(name),(sig)) : (m)) + #define LINK_LinkField(env,f,c,name,sig) ((m)==NULL ? LINK_RelinkField((env),&(f),(c),(name),(sig)) : (f)) + #define LINK_LinkStaticField(env,f,c,name,sig) ((m)==NULL ? LINK_RelinkStaticField((env),&(f),(c),(name),(sig)) : (f)) + + #define LINK_LinkConstructor(env,m,c,sig) ((m)==NULL ? LINK_RelinkMethod((env),&(m),(c),"",(sig)) : (m)) + + JNIEXPORT jclass JNICALL + LINK_ReallyLinkClass (JNIEnv * env, linkedClass * c, + char * name); + JNIEXPORT jclass JNICALL + LINK_ReallyLinkKnownClass(JNIEnv * env, linkedClass * c, + jclass newClass); + JNIEXPORT jclass JNICALL + LINK_RelinkClass (JNIEnv * env, linkedClass * c, + char * name); + JNIEXPORT jclass JNICALL + LINK_RelinkKnownClass (JNIEnv * env, linkedClass * c, + jclass newClass); + JNIEXPORT jmethodID JNICALL + LINK_RelinkMethod (JNIEnv * env, jmethodID * m, linkedClass c, + char * name, char * sig); + JNIEXPORT jmethodID JNICALL + LINK_RelinkStaticMethod(JNIEnv * env, jmethodID * m, linkedClass c, + char * name, char * sig); + JNIEXPORT jfieldID JNICALL + LINK_RelinkField (JNIEnv * env, jfieldID * f, linkedClass c, + char * name, char * sig); + JNIEXPORT jfieldID JNICALL + LINK_RelinkStaticField (JNIEnv * env, jfieldID * f, linkedClass c, + char * name, char * sig); + + /* These are for when the class referencing the symbols is unloaded; it + destroys any object references + * the linker might have kept around. + */ + JNIEXPORT void JNICALL LINK_UnlinkClass (JNIEnv * env, linkedClass * c); + + #endif diff -Nrc3pad gcc-3.3.3/libjava/jni/classpath/native_state.c gcc-3.4.0/libjava/jni/classpath/native_state.c *** gcc-3.3.3/libjava/jni/classpath/native_state.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/classpath/native_state.c 2003-01-31 17:54:14.000000000 +0000 *************** *** 0 **** --- 1,247 ---- + /* Magical NSA API -- Associate a C ptr with an instance of an object + Copyright (C) 1998, 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + #include + #include + #include "native_state.h" + + #define DEFAULT_TABLE_SIZE 97 + + struct state_table * + init_state_table_with_size (JNIEnv *env, jclass clazz, jint size) + { + struct state_table *table; + jfieldID hash; + jclass clazz_g; + + hash = (*env)->GetFieldID (env, clazz, "native_state", "I"); + if (hash == NULL) + return NULL; + + clazz_g = (*env)->NewGlobalRef (env, clazz); + if (clazz_g == NULL) + return NULL; + + table = (struct state_table *) malloc (sizeof (struct state_table)); + table->size = size; + table->head = (struct state_node **) calloc (sizeof (struct state_node *), + table->size); + table->hash = hash; + table->clazz = clazz_g; + + return table; + } + + struct state_table * + init_state_table (JNIEnv *env, jclass clazz) + { + return init_state_table_with_size (env, clazz, DEFAULT_TABLE_SIZE); + } + + static void * + remove_node (struct state_node **head, jint obj_id) + { + struct state_node *back_ptr = NULL; + struct state_node *node = *head; + + while (node != NULL) + { + if (node->key == obj_id) + { + void *return_value; + if (back_ptr == NULL) + *head = node->next; + else + back_ptr->next = node->next; + return_value = node->c_state; + free (node); + return return_value; + } + back_ptr = node; + node = node->next; + } + + return NULL; + } + + static void * + get_node (struct state_node **head, jint obj_id) + { + struct state_node *back_ptr = NULL; + struct state_node *node = *head; + + while (node != NULL) + { + if (node->key == obj_id) + { + /* Move the node we found to the front of the list. */ + if (back_ptr != NULL) + { + back_ptr->next = node->next; + node->next = *head; + *head = node; + } + + /* Return the match. */ + return node->c_state; + } + + back_ptr = node; + node = node->next; + } + + return NULL; + } + + static void + add_node (struct state_node **head, jint obj_id, void *state) + { + struct state_node *node = *head; + struct state_node *back_ptr = NULL; + + struct state_node *new_node; + + if (node != NULL) + { + while (node->next != NULL && obj_id != node->key) + { + back_ptr = node; + node = node->next; + } + + if (node->key == obj_id) + { + /* If we're updating a node, move it to the front of the + list. */ + if (back_ptr != NULL) + { + back_ptr->next = node->next; + node->next = *head; + } + node->c_state = state; + return; + } + } + + new_node = (struct state_node *) malloc (sizeof (struct state_node)); + new_node->key = obj_id; + new_node->c_state = state; + new_node->next = *head; + *head = new_node; + } + + void + set_state_oid (JNIEnv *env, jobject lock, struct state_table *table, + jint obj_id, void *state) + { + jint hash; + + hash = obj_id % table->size; + + (*env)->MonitorEnter (env, lock); + add_node (&table->head[hash], obj_id, state); + (*env)->MonitorExit (env, lock); + } + + void * + get_state_oid (JNIEnv *env, jobject lock, struct state_table *table, + jint obj_id) + { + jint hash; + void *return_value; + + hash = obj_id % table->size; + + (*env)->MonitorEnter (env, lock); + return_value = get_node (&table->head[hash], obj_id); + (*env)->MonitorExit (env, lock); + + return return_value; + } + + void * + remove_state_oid (JNIEnv *env, jobject lock, struct state_table *table, + jint obj_id) + { + jint hash; + void *return_value; + + hash = obj_id % table->size; + + (*env)->MonitorEnter (env, lock); + return_value = remove_node (&table->head[hash], obj_id); + (*env)->MonitorExit (env, lock); + + return return_value; + } + + int + set_state (JNIEnv *env, jobject obj, struct state_table *table, void *state) + { + jint obj_id; + obj_id = (*env)->GetIntField (env, obj, table->hash); + + if ((*env)->ExceptionOccurred (env) != NULL) + return -1; + + set_state_oid (env, table->clazz, table, obj_id, state); + return 0; + } + + void * + get_state (JNIEnv *env, jobject obj, struct state_table *table) + { + jint obj_id; + obj_id = (*env)->GetIntField (env, obj, table->hash); + + if ((*env)->ExceptionOccurred (env) != NULL) + return NULL; + + return get_state_oid (env, table->clazz, table, obj_id); + } + + void * + remove_state_slot (JNIEnv *env, jobject obj, struct state_table *table) + { + jint obj_id; + obj_id = (*env)->GetIntField (env, obj, table->hash); + + if ((*env)->ExceptionOccurred (env) != NULL) + return NULL; + + return remove_state_oid (env, table->clazz, table, obj_id); + } diff -Nrc3pad gcc-3.3.3/libjava/jni/classpath/native_state.h gcc-3.4.0/libjava/jni/classpath/native_state.h *** gcc-3.3.3/libjava/jni/classpath/native_state.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/classpath/native_state.h 2003-01-31 17:54:14.000000000 +0000 *************** *** 0 **** --- 1,71 ---- + /* Magical NSA API -- Associate a C ptr with an instance of an object + Copyright (C) 1998 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + #ifndef JCL_NATIVE_STATE + #define JCL_NATIVE_STATE + + #include + + struct state_table + { + jint size; /* number of slots, should be prime */ + jfieldID hash; /* field containing System.identityHashCode(this) */ + jclass clazz; /* lock aquired for reading/writing nodes */ + struct state_node **head; + }; + + struct state_node + { + jint key; + void *c_state; + struct state_node *next; + }; + + struct state_table * init_state_table_with_size (JNIEnv *, jclass, jint); + struct state_table * init_state_table (JNIEnv *, jclass); + + /* lowlevel api */ + void set_state_oid (JNIEnv *, jobject, struct state_table *, jint, void *); + void * get_state_oid (JNIEnv *, jobject, struct state_table *, jint); + void * remove_state_oid (JNIEnv *, jobject, struct state_table *, jint); + + /* highlevel api */ + int set_state (JNIEnv *, jobject, struct state_table *, void *); + void * get_state (JNIEnv *, jobject, struct state_table *); + void * remove_state_slot (JNIEnv *, jobject, struct state_table *); + + #endif diff -Nrc3pad gcc-3.3.3/libjava/jni/classpath/primlib.c gcc-3.4.0/libjava/jni/classpath/primlib.c *** gcc-3.3.3/libjava/jni/classpath/primlib.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/classpath/primlib.c 2003-01-31 17:54:14.000000000 +0000 *************** *** 0 **** --- 1,463 ---- + /* primlib.c + Copyright (C) 1998 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + #include + #include + #include + + static jclass nativeWrapClass[PRIMLIB_NUMTYPES] = {NULL,NULL,NULL, NULL,NULL,NULL, + NULL,NULL,NULL, NULL,NULL,NULL}; + + static jclass nativeTypeClass[PRIMLIB_NUMTYPES] = {NULL,NULL,NULL, NULL,NULL,NULL, + NULL,NULL,NULL, NULL,NULL,NULL}; + + static jmethodID nativeWrapClassConstructor[PRIMLIB_NUMTYPES] = {NULL,NULL,NULL, NULL,NULL,NULL, + NULL,NULL,NULL, NULL,NULL,NULL}; + + static jmethodID nativeWrapClassAccessor[PRIMLIB_NUMTYPES] = {NULL,NULL,NULL, NULL,NULL,NULL, + NULL,NULL,NULL, NULL,NULL,NULL}; + + static char * nativeWrapClassName[PRIMLIB_NUMTYPES] = { + NULL, + NULL, + "java/lang/Boolean", + "java/lang/Byte", + "java/lang/Character", + "java/lang/Short", + "java/lang/Integer", + "java/lang/Long", + "java/lang/Float", + "java/lang/Double", + "java/lang/Void", + NULL + }; + + static char * nativeWrapClassConstructorSig[PRIMLIB_NUMTYPES] = { + NULL, + NULL, + "(Z)V", + "(B)V", + "(C)V", + "(S)V", + "(I)V", + "(J)V", + "(F)V", + "(D)V", + "()V", + NULL + }; + + static char * nativeWrapClassAccessorName[PRIMLIB_NUMTYPES] = { + NULL, + NULL, + "booleanValue", + "byteValue", + "charValue", + "shortValue", + "intValue", + "longValue", + "floatValue", + "doubleValue", + NULL, + NULL + }; + + static char * nativeWrapClassAccessorSig[PRIMLIB_NUMTYPES] = { + NULL, + NULL, + "()Z", + "()B", + "()C", + "()S", + "()I", + "()J", + "()F", + "()D", + NULL, + NULL + }; + + + JNIEXPORT jclass JNICALL PRIMLIB_GetNativeWrapClass(JNIEnv * env, int reflectType) { + return LINK_LinkClass(env,nativeWrapClass[reflectType],nativeWrapClassName[reflectType]); + } + + static jclass ActuallyGetNativeTypeClass(JNIEnv * env, int reflectType) { + jclass wrapClass; + jfieldID typeField; + + wrapClass = PRIMLIB_GetNativeWrapClass(env, reflectType); + if(wrapClass == NULL) + return NULL; + typeField = (*env)->GetStaticFieldID(env, wrapClass, "TYPE", "Ljava/lang/Class"); + if(typeField == NULL) + return NULL; + return (*env)->GetStaticObjectField(env, wrapClass, typeField); + } + + JNIEXPORT jclass JNICALL PRIMLIB_GetNativeTypeClass(JNIEnv * env, int reflectType) { + return LINK_LinkKnownClass(env, nativeTypeClass[reflectType], ActuallyGetNativeTypeClass(env,reflectType)); + } + + JNIEXPORT jmethodID JNICALL PRIMLIB_GetNativeWrapClassConstructor(JNIEnv * env, int reflectType) { + PRIMLIB_GetNativeWrapClass(env,reflectType); + return LINK_LinkConstructor(env, nativeWrapClassConstructor[reflectType], nativeWrapClass[reflectType], nativeWrapClassConstructorSig[reflectType]); + } + + JNIEXPORT jmethodID JNICALL PRIMLIB_GetNativeWrapClassAccessor(JNIEnv * env, int reflectType) { + PRIMLIB_GetNativeWrapClass(env,reflectType); + return LINK_LinkMethod(env, nativeWrapClassAccessor[reflectType], nativeWrapClass[reflectType], nativeWrapClassAccessorName[reflectType], nativeWrapClassAccessorSig[reflectType]); + } + + + + JNIEXPORT jobject JNICALL PRIMLIB_WrapBoolean(JNIEnv * env, jboolean b) { + jmethodID construct = PRIMLIB_GetNativeWrapClassConstructor(env, PRIMLIB_BOOLEAN); + JCL_RETHROW_EXCEPTION(env); + return (*env)->NewObject(env, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_BOOLEAN), construct, b); + } + + JNIEXPORT jobject JNICALL PRIMLIB_WrapByte (JNIEnv * env, jbyte b) { + jmethodID construct = PRIMLIB_GetNativeWrapClassConstructor(env, PRIMLIB_BYTE); + JCL_RETHROW_EXCEPTION(env); + return (*env)->NewObject(env, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_BYTE), construct, b); + } + + JNIEXPORT jobject JNICALL PRIMLIB_WrapChar (JNIEnv * env, jchar c) { + jmethodID construct = PRIMLIB_GetNativeWrapClassConstructor(env, PRIMLIB_CHAR); + JCL_RETHROW_EXCEPTION(env); + return (*env)->NewObject(env, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_CHAR), construct, c); + } + + JNIEXPORT jobject JNICALL PRIMLIB_WrapShort (JNIEnv * env, jshort s) { + jmethodID construct = PRIMLIB_GetNativeWrapClassConstructor(env, PRIMLIB_SHORT); + JCL_RETHROW_EXCEPTION(env); + return (*env)->NewObject(env, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_SHORT), construct, s); + } + + JNIEXPORT jobject JNICALL PRIMLIB_WrapInt (JNIEnv * env, jint i) { + jmethodID construct = PRIMLIB_GetNativeWrapClassConstructor(env, PRIMLIB_INT); + JCL_RETHROW_EXCEPTION(env); + return (*env)->NewObject(env, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_INT), construct, i); + } + + JNIEXPORT jobject JNICALL PRIMLIB_WrapLong (JNIEnv * env, jlong l) { + jmethodID construct = PRIMLIB_GetNativeWrapClassConstructor(env, PRIMLIB_LONG); + JCL_RETHROW_EXCEPTION(env); + return (*env)->NewObject(env, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_LONG), construct, l); + } + + JNIEXPORT jobject JNICALL PRIMLIB_WrapFloat (JNIEnv * env, jfloat f) { + jmethodID construct = PRIMLIB_GetNativeWrapClassConstructor(env, PRIMLIB_FLOAT); + JCL_RETHROW_EXCEPTION(env); + return (*env)->NewObject(env, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_FLOAT), construct, f); + } + + JNIEXPORT jobject JNICALL PRIMLIB_WrapDouble (JNIEnv * env, jdouble d) { + jmethodID construct = PRIMLIB_GetNativeWrapClassConstructor(env, PRIMLIB_DOUBLE); + JCL_RETHROW_EXCEPTION(env); + return (*env)->NewObject(env, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_DOUBLE), construct, d); + } + + + JNIEXPORT jboolean JNICALL PRIMLIB_UnwrapBoolean(JNIEnv * env, jobject obj) { + if((*env)->IsInstanceOf(env, obj, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_BOOLEAN))) { + return PRIMLIB_GetBooleanObjectValue(env, obj); + } else { + JCL_ThrowException(env, "java/lang/IllegalArgumentException", "Argument not of correct type."); + return JNI_FALSE; + } + } + + JNIEXPORT jbyte JNICALL PRIMLIB_UnwrapByte(JNIEnv * env, jobject obj) { + if((*env)->IsInstanceOf(env, obj, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_BYTE))) { + return PRIMLIB_GetByteObjectValue(env, obj); + } else { + JCL_ThrowException(env, "java/lang/IllegalArgumentException", "Argument not of correct type."); + return 0; + } + } + + JNIEXPORT jshort JNICALL PRIMLIB_UnwrapShort(JNIEnv * env, jobject obj) { + if((*env)->IsInstanceOf(env, obj, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_SHORT))) { + return PRIMLIB_GetShortObjectValue(env, obj); + } else if((*env)->IsInstanceOf(env, obj, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_BYTE))) { + return (jshort)PRIMLIB_GetByteObjectValue(env, obj); + } else { + JCL_ThrowException(env, "java/lang/IllegalArgumentException", "Argument not of correct type."); + return 0; + } + } + + JNIEXPORT jchar JNICALL PRIMLIB_UnwrapChar(JNIEnv * env, jobject obj) { + if((*env)->IsInstanceOf(env, obj, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_CHAR))) { + return PRIMLIB_GetCharObjectValue(env, obj); + } else { + JCL_ThrowException(env, "java/lang/IllegalArgumentException", "Argument not of correct type."); + return 0; + } + } + + JNIEXPORT jint JNICALL PRIMLIB_UnwrapInt(JNIEnv * env, jobject obj) { + if((*env)->IsInstanceOf(env, obj, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_INT))) { + return PRIMLIB_GetIntObjectValue(env, obj); + } else if((*env)->IsInstanceOf(env, obj, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_SHORT))) { + return (jint)PRIMLIB_GetShortObjectValue(env, obj); + } else if((*env)->IsInstanceOf(env, obj, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_CHAR))) { + return (jint)PRIMLIB_GetCharObjectValue(env, obj); + } else if((*env)->IsInstanceOf(env, obj, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_BYTE))) { + return (jint)PRIMLIB_GetByteObjectValue(env, obj); + } else { + JCL_ThrowException(env, "java/lang/IllegalArgumentException", "Argument not of correct type."); + return 0; + } + } + + JNIEXPORT jlong JNICALL PRIMLIB_UnwrapLong(JNIEnv * env, jobject obj) { + if((*env)->IsInstanceOf(env, obj, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_LONG))) { + return PRIMLIB_GetLongObjectValue(env, obj); + } else if((*env)->IsInstanceOf(env, obj, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_INT))) { + return (jlong)PRIMLIB_GetIntObjectValue(env, obj); + } else if((*env)->IsInstanceOf(env, obj, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_SHORT))) { + return (jlong)PRIMLIB_GetShortObjectValue(env, obj); + } else if((*env)->IsInstanceOf(env, obj, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_CHAR))) { + return (jlong)PRIMLIB_GetCharObjectValue(env, obj); + } else if((*env)->IsInstanceOf(env, obj, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_BYTE))) { + return (jlong)PRIMLIB_GetByteObjectValue(env, obj); + } else { + JCL_ThrowException(env, "java/lang/IllegalArgumentException", "Argument not of correct type."); + return 0; + } + } + + JNIEXPORT jfloat JNICALL PRIMLIB_UnwrapFloat(JNIEnv * env, jobject obj) { + if((*env)->IsInstanceOf(env, obj, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_FLOAT))) { + return PRIMLIB_GetFloatObjectValue(env, obj); + } else if((*env)->IsInstanceOf(env, obj, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_LONG))) { + return (jfloat)PRIMLIB_GetLongObjectValue(env, obj); + } else if((*env)->IsInstanceOf(env, obj, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_INT))) { + return (jfloat)PRIMLIB_GetIntObjectValue(env, obj); + } else if((*env)->IsInstanceOf(env, obj, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_SHORT))) { + return (jfloat)PRIMLIB_GetShortObjectValue(env, obj); + } else if((*env)->IsInstanceOf(env, obj, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_CHAR))) { + return (jfloat)PRIMLIB_GetCharObjectValue(env, obj); + } else if((*env)->IsInstanceOf(env, obj, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_BYTE))) { + return (jfloat)PRIMLIB_GetByteObjectValue(env, obj); + } else { + JCL_ThrowException(env, "java/lang/IllegalArgumentException", "Argument not of correct type."); + return 0; + } + } + + JNIEXPORT jdouble JNICALL PRIMLIB_UnwrapDouble(JNIEnv * env, jobject obj) { + if((*env)->IsInstanceOf(env, obj, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_DOUBLE))) { + return PRIMLIB_GetDoubleObjectValue(env, obj); + } else if((*env)->IsInstanceOf(env, obj, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_FLOAT))) { + return (jdouble)PRIMLIB_GetFloatObjectValue(env, obj); + } else if((*env)->IsInstanceOf(env, obj, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_LONG))) { + return (jdouble)PRIMLIB_GetLongObjectValue(env, obj); + } else if((*env)->IsInstanceOf(env, obj, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_INT))) { + return (jdouble)PRIMLIB_GetIntObjectValue(env, obj); + } else if((*env)->IsInstanceOf(env, obj, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_SHORT))) { + return (jdouble)PRIMLIB_GetShortObjectValue(env, obj); + } else if((*env)->IsInstanceOf(env, obj, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_CHAR))) { + return (jdouble)PRIMLIB_GetCharObjectValue(env, obj); + } else if((*env)->IsInstanceOf(env, obj, PRIMLIB_GetNativeWrapClass(env, PRIMLIB_BYTE))) { + return (jdouble)PRIMLIB_GetByteObjectValue(env, obj); + } else { + JCL_ThrowException(env, "java/lang/IllegalArgumentException", "Argument not of correct type."); + return 0; + } + } + + JNIEXPORT jint JNICALL PRIMLIB_GetReflectiveWrapperType(JNIEnv * env, jobject obj) { + jclass typeClass; + if(obj == NULL) { + return PRIMLIB_NULL; + } + + typeClass = PRIMLIB_GetNativeWrapClass(env, PRIMLIB_DOUBLE); + if((*env)->IsInstanceOf(env, obj, typeClass)) { + return PRIMLIB_DOUBLE; + } + typeClass = PRIMLIB_GetNativeWrapClass(env, PRIMLIB_FLOAT); + if((*env)->IsInstanceOf(env, obj, typeClass)) { + return PRIMLIB_FLOAT; + } + typeClass = PRIMLIB_GetNativeWrapClass(env, PRIMLIB_LONG); + if((*env)->IsInstanceOf(env, obj, typeClass)) { + return PRIMLIB_LONG; + } + typeClass = PRIMLIB_GetNativeWrapClass(env, PRIMLIB_INT); + if((*env)->IsInstanceOf(env, obj, typeClass)) { + return PRIMLIB_INT; + } + typeClass = PRIMLIB_GetNativeWrapClass(env, PRIMLIB_CHAR); + if((*env)->IsInstanceOf(env, obj, typeClass)) { + return PRIMLIB_CHAR; + } + typeClass = PRIMLIB_GetNativeWrapClass(env, PRIMLIB_SHORT); + if((*env)->IsInstanceOf(env, obj, typeClass)) { + return PRIMLIB_SHORT; + } + typeClass = PRIMLIB_GetNativeWrapClass(env, PRIMLIB_BYTE); + if((*env)->IsInstanceOf(env, obj, typeClass)) { + return PRIMLIB_BYTE; + } + typeClass = PRIMLIB_GetNativeWrapClass(env, PRIMLIB_BOOLEAN); + if((*env)->IsInstanceOf(env, obj, typeClass)) { + return PRIMLIB_BOOLEAN; + } + typeClass = PRIMLIB_GetNativeWrapClass(env, PRIMLIB_VOID); + if((*env)->IsInstanceOf(env, obj, typeClass)) { + return PRIMLIB_VOID; + } + return PRIMLIB_OBJECT; + } + + JNIEXPORT jint JNICALL PRIMLIB_GetReflectiveType(JNIEnv * env, jclass returnType) { + jclass typeClass = PRIMLIB_GetNativeTypeClass(env, PRIMLIB_DOUBLE); + if((*env)->IsAssignableFrom(env, returnType, typeClass)) { + return PRIMLIB_DOUBLE; + } + typeClass = PRIMLIB_GetNativeTypeClass(env, PRIMLIB_FLOAT); + if((*env)->IsAssignableFrom(env, returnType, typeClass)) { + return PRIMLIB_FLOAT; + } + typeClass = PRIMLIB_GetNativeTypeClass(env, PRIMLIB_LONG); + if((*env)->IsAssignableFrom(env, returnType, typeClass)) { + return PRIMLIB_LONG; + } + typeClass = PRIMLIB_GetNativeTypeClass(env, PRIMLIB_INT); + if((*env)->IsAssignableFrom(env, returnType, typeClass)) { + return PRIMLIB_INT; + } + typeClass = PRIMLIB_GetNativeTypeClass(env, PRIMLIB_CHAR); + if((*env)->IsAssignableFrom(env, returnType, typeClass)) { + return PRIMLIB_CHAR; + } + typeClass = PRIMLIB_GetNativeTypeClass(env, PRIMLIB_SHORT); + if((*env)->IsAssignableFrom(env, returnType, typeClass)) { + return PRIMLIB_SHORT; + } + typeClass = PRIMLIB_GetNativeTypeClass(env, PRIMLIB_BYTE); + if((*env)->IsAssignableFrom(env, returnType, typeClass)) { + return PRIMLIB_BYTE; + } + typeClass = PRIMLIB_GetNativeTypeClass(env, PRIMLIB_BOOLEAN); + if((*env)->IsAssignableFrom(env, returnType, typeClass)) { + return PRIMLIB_BOOLEAN; + } + typeClass = PRIMLIB_GetNativeTypeClass(env, PRIMLIB_VOID); + if((*env)->IsAssignableFrom(env, returnType, typeClass)) { + return PRIMLIB_VOID; + } + return PRIMLIB_OBJECT; + } + + + JNIEXPORT jboolean JNICALL PRIMLIB_GetBooleanObjectValue(JNIEnv * env, jobject obj) { + jmethodID acc = PRIMLIB_GetNativeWrapClassAccessor(env, PRIMLIB_BOOLEAN); + return (*env)->CallBooleanMethod(env, obj, acc); + } + + JNIEXPORT jbyte JNICALL PRIMLIB_GetByteObjectValue(JNIEnv * env, jobject obj) { + jmethodID acc = PRIMLIB_GetNativeWrapClassAccessor(env, PRIMLIB_BYTE); + return (*env)->CallByteMethod(env, obj, acc); + } + + JNIEXPORT jshort JNICALL PRIMLIB_GetShortObjectValue(JNIEnv * env, jobject obj) { + jmethodID acc = PRIMLIB_GetNativeWrapClassAccessor(env, PRIMLIB_SHORT); + return (*env)->CallShortMethod(env, obj, acc); + } + + JNIEXPORT jchar JNICALL PRIMLIB_GetCharObjectValue(JNIEnv * env, jobject obj) { + jmethodID acc = PRIMLIB_GetNativeWrapClassAccessor(env, PRIMLIB_CHAR); + return (*env)->CallCharMethod(env, obj, acc); + } + + JNIEXPORT jint JNICALL PRIMLIB_GetIntObjectValue(JNIEnv * env, jobject obj) { + jmethodID acc = PRIMLIB_GetNativeWrapClassAccessor(env, PRIMLIB_INT); + return (*env)->CallIntMethod(env, obj, acc); + } + + JNIEXPORT jlong JNICALL PRIMLIB_GetLongObjectValue(JNIEnv * env, jobject obj) { + jmethodID acc = PRIMLIB_GetNativeWrapClassAccessor(env, PRIMLIB_LONG); + return (*env)->CallLongMethod(env, obj, acc); + } + + JNIEXPORT jfloat JNICALL PRIMLIB_GetFloatObjectValue(JNIEnv * env, jobject obj) { + jmethodID acc = PRIMLIB_GetNativeWrapClassAccessor(env, PRIMLIB_FLOAT); + return (*env)->CallFloatMethod(env, obj, acc); + } + + JNIEXPORT jdouble JNICALL PRIMLIB_GetDoubleObjectValue(JNIEnv * env, jobject obj) { + jmethodID acc = PRIMLIB_GetNativeWrapClassAccessor(env, PRIMLIB_DOUBLE); + return (*env)->CallDoubleMethod(env, obj, acc); + } + + + + JNIEXPORT jvalue JNICALL PRIMLIB_UnwrapJValue(JNIEnv* env, jobject obj, jclass classType) { + jvalue retval; + jint objType = PRIMLIB_GetReflectiveType(env, classType); + if(objType == PRIMLIB_BOOLEAN) { + retval.z = PRIMLIB_UnwrapBoolean(env,obj); + } else if(objType == PRIMLIB_BYTE) { + retval.b = PRIMLIB_UnwrapByte(env,obj); + } else if(objType == PRIMLIB_CHAR) { + retval.c = PRIMLIB_UnwrapChar(env,obj); + } else if(objType == PRIMLIB_SHORT) { + retval.s = PRIMLIB_UnwrapShort(env,obj); + } else if(objType == PRIMLIB_INT) { + retval.i = PRIMLIB_UnwrapInt(env,obj); + } else if(objType == PRIMLIB_LONG) { + retval.j = PRIMLIB_UnwrapLong(env,obj); + } else if(objType == PRIMLIB_FLOAT) { + retval.f = PRIMLIB_UnwrapFloat(env,obj); + } else if(objType == PRIMLIB_DOUBLE) { + retval.d = PRIMLIB_UnwrapDouble(env,obj); + } else { + if(obj != NULL && !(*env)->IsInstanceOf(env, obj, classType)) { + JCL_ThrowException(env, "java/lang/IllegalArgumentException", "Argument not of correct object type."); + return retval; + } + retval.l = obj; + } + return retval; + } + diff -Nrc3pad gcc-3.3.3/libjava/jni/classpath/primlib.h gcc-3.4.0/libjava/jni/classpath/primlib.h *** gcc-3.3.3/libjava/jni/classpath/primlib.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/classpath/primlib.h 2003-01-31 17:54:14.000000000 +0000 *************** *** 0 **** --- 1,102 ---- + /* primlib.h + Copyright (C) 1998 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + #ifndef __PRIMLIB_H__ + #define __PRIMLIB_H__ + + #include + + #define PRIMLIB_UNKNOWN 0 + #define PRIMLIB_OBJECT 1 + #define PRIMLIB_BOOLEAN 2 + #define PRIMLIB_BYTE 3 + #define PRIMLIB_CHAR 4 + #define PRIMLIB_SHORT 5 + #define PRIMLIB_INT 6 + #define PRIMLIB_LONG 7 + #define PRIMLIB_FLOAT 8 + #define PRIMLIB_DOUBLE 9 + #define PRIMLIB_VOID 10 + #define PRIMLIB_NULL 11 + #define PRIMLIB_NUMTYPES 12 + + /* Low-level primitive class accessor functions. */ + JNIEXPORT jclass JNICALL PRIMLIB_GetNativeWrapClass(JNIEnv * env, int reflectType); + JNIEXPORT jclass JNICALL PRIMLIB_GetNativeTypeClass(JNIEnv * env, int reflectType); + JNIEXPORT jmethodID JNICALL PRIMLIB_GetNativeWrapClassConstructor(JNIEnv * env, int reflectType); + JNIEXPORT jmethodID JNICALL PRIMLIB_GetNativeWrapClassAccessor(JNIEnv * env, int reflectType); + + /* Type discovery functions: WrapperType finds out j.l.Boolean/Byte/etc., and + Type finds out j.l.Boolean.TYPE, etc. + */ + JNIEXPORT jint JNICALL PRIMLIB_GetReflectiveWrapperType(JNIEnv * env, jobject obj); + JNIEXPORT jint JNICALL PRIMLIB_GetReflectiveType(JNIEnv * env, jclass returnType); + + /* Constructor functions. */ + JNIEXPORT jobject JNICALL PRIMLIB_WrapBoolean(JNIEnv * env, jboolean b); + JNIEXPORT jobject JNICALL PRIMLIB_WrapByte (JNIEnv * env, jbyte b); + JNIEXPORT jobject JNICALL PRIMLIB_WrapChar (JNIEnv * env, jchar c); + JNIEXPORT jobject JNICALL PRIMLIB_WrapShort (JNIEnv * env, jshort s); + JNIEXPORT jobject JNICALL PRIMLIB_WrapInt (JNIEnv * env, jint i); + JNIEXPORT jobject JNICALL PRIMLIB_WrapLong (JNIEnv * env, jlong l); + JNIEXPORT jobject JNICALL PRIMLIB_WrapFloat (JNIEnv * env, jfloat f); + JNIEXPORT jobject JNICALL PRIMLIB_WrapDouble (JNIEnv * env, jdouble d); + + /* Widening conversion unwrapping functions. */ + JNIEXPORT jboolean JNICALL PRIMLIB_UnwrapBoolean(JNIEnv * env, jobject obj); + JNIEXPORT jbyte JNICALL PRIMLIB_UnwrapByte (JNIEnv * env, jobject obj); + JNIEXPORT jshort JNICALL PRIMLIB_UnwrapShort (JNIEnv * env, jobject obj); + JNIEXPORT jchar JNICALL PRIMLIB_UnwrapChar (JNIEnv * env, jobject obj); + JNIEXPORT jint JNICALL PRIMLIB_UnwrapInt (JNIEnv * env, jobject obj); + JNIEXPORT jlong JNICALL PRIMLIB_UnwrapLong (JNIEnv * env, jobject obj); + JNIEXPORT jfloat JNICALL PRIMLIB_UnwrapFloat (JNIEnv * env, jobject obj); + JNIEXPORT jdouble JNICALL PRIMLIB_UnwrapDouble (JNIEnv * env, jobject obj); + + /* Simple unwrapping functions. Objects *must* be of correct type. */ + JNIEXPORT jboolean JNICALL PRIMLIB_GetBooleanObjectValue(JNIEnv * env, jobject obj); + JNIEXPORT jbyte JNICALL PRIMLIB_GetByteObjectValue (JNIEnv * env, jobject obj); + JNIEXPORT jshort JNICALL PRIMLIB_GetShortObjectValue (JNIEnv * env, jobject obj); + JNIEXPORT jchar JNICALL PRIMLIB_GetCharObjectValue (JNIEnv * env, jobject obj); + JNIEXPORT jint JNICALL PRIMLIB_GetIntObjectValue (JNIEnv * env, jobject obj); + JNIEXPORT jlong JNICALL PRIMLIB_GetLongObjectValue (JNIEnv * env, jobject obj); + JNIEXPORT jfloat JNICALL PRIMLIB_GetFloatObjectValue (JNIEnv * env, jobject obj); + JNIEXPORT jdouble JNICALL PRIMLIB_GetDoubleObjectValue (JNIEnv * env, jobject obj); + + /* jvalue conversion: Unwrap obj to the type of classType, with widening conversion. */ + JNIEXPORT jvalue JNICALL PRIMLIB_UnwrapJValue(JNIEnv* env, jobject obj, jclass classType); + + #endif diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gdkfont.h gcc-3.4.0/libjava/jni/gtk-peer/gdkfont.h *** gcc-3.3.3/libjava/jni/gtk-peer/gdkfont.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gdkfont.h 2003-12-31 08:58:31.000000000 +0000 *************** *** 0 **** --- 1,93 ---- + #ifndef __GDKFONT_H__ + #define __GDKFONT_H__ + + /* gdkfont.h -- Some global stuff related to fonts and glyphs + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + #include "gtkcairopeer.h" + + #include + #include + #include + #include + + extern struct state_table *native_font_state_table; + extern struct state_table *native_glyphvector_state_table; + + #define NSA_FONT_INIT(env, clazz) \ + native_font_state_table = init_state_table (env, clazz) + + #define NSA_GET_FONT_PTR(env, obj) \ + get_state (env, obj, native_font_state_table) + + #define NSA_SET_FONT_PTR(env, obj, ptr) \ + set_state (env, obj, native_font_state_table, (void *)ptr) + + #define NSA_DEL_FONT_PTR(env, obj) \ + remove_state_slot (env, obj, native_font_state_table) + + + #define NSA_GV_INIT(env, clazz) \ + native_glyphvector_state_table = init_state_table (env, clazz) + + #define NSA_GET_GV_PTR(env, obj) \ + get_state (env, obj, native_glyphvector_state_table) + + #define NSA_SET_GV_PTR(env, obj, ptr) \ + set_state (env, obj, native_glyphvector_state_table, (void *)ptr) + + #define NSA_DEL_GV_PTR(env, obj) \ + remove_state_slot (env, obj, native_glyphvector_state_table) + + struct peerfont + { + PangoFont *font; + PangoFontDescription *desc; + PangoContext *ctx; + }; + + struct glyphvec + { + /* the GList is list of PangoGlyphItems, each of which is a pair of 1 + PangoItem and 1 PangoGlyphString. */ + GList *glyphitems; + PangoFontDescription *desc; + PangoFont *font; + PangoContext *ctx; + }; + + #endif /* __GDKFONT_H__ */ diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeer.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeer.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeer.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeer.c 2003-11-20 22:44:01.000000000 +0000 *************** *** 0 **** --- 1,167 ---- + /* gnu_java_awt_GdkFont.c + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + #include "gdkfont.h" + #include "gnu_java_awt_peer_gtk_GdkClasspathFontPeer.h" + + struct state_table *native_font_state_table; + + /* + rough sketch of the mapping between java and + pango text objects: + + Font <-> - PangoFont + - PangoFontDescription + - PangoContext + + GlyphVector <-> - GList of PangoGlyphItem + - PangoFontDescription + - PangoContext + + FontRenderContext <-> stays in plain java + + */ + + enum java_awt_font_style { + java_awt_font_PLAIN = 0, + java_awt_font_BOLD = 1, + java_awt_font_ITALIC = 2 + }; + + enum java_awt_font_baseline { + java_awt_font_ROMAN_BASELINE = 0, + java_awt_font_CENTER_BASELINE = 1, + java_awt_font_HANGING_BASELINE = 2 + }; + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkClasspathFontPeer_initStaticState + (JNIEnv *env, jclass clazz) + { + NSA_FONT_INIT (env, clazz); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkClasspathFontPeer_initState + (JNIEnv *env, jobject self) + { + struct peerfont *pfont = NULL; + + gdk_threads_enter (); + g_assert (self != NULL); + pfont = (struct peerfont *) g_malloc0 (sizeof (struct peerfont)); + g_assert (pfont != NULL); + NSA_SET_FONT_PTR (env, self, pfont); + gdk_threads_leave (); + } + + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkClasspathFontPeer_dispose + (JNIEnv *env, jobject self) + { + struct peerfont *pfont = NULL; + + gdk_threads_enter (); + pfont = (struct peerfont *)NSA_DEL_FONT_PTR (env, self); + g_assert (pfont != NULL); + if (pfont->ctx != NULL) + g_object_unref (pfont->ctx); + if (pfont->font != NULL) + g_object_unref (pfont->font); + if (pfont->desc != NULL) + pango_font_description_free (pfont->desc); + g_free (pfont); + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkClasspathFontPeer_setFont + (JNIEnv *env, jobject self, jstring family_name_str, jint style_int, jint size) + { + struct peerfont *pfont = NULL; + PangoFontMap *map = NULL; + char const *family_name = NULL; + + gdk_threads_enter (); + enum java_awt_font_style style = (enum java_awt_font_style) style_int; + + g_assert (self != NULL); + pfont = (struct peerfont *)NSA_GET_FONT_PTR (env, self); + g_assert (pfont != NULL); + + if (pfont->ctx != NULL) + g_object_unref (pfont->ctx); + if (pfont->font != NULL) + g_object_unref (pfont->font); + if (pfont->desc != NULL) + pango_font_description_free (pfont->desc); + + pfont->desc = pango_font_description_new (); + g_assert (pfont->desc != NULL); + + family_name = (*env)->GetStringUTFChars(env, family_name_str, 0); + g_assert (family_name != NULL); + pango_font_description_set_family (pfont->desc, family_name); + (*env)->ReleaseStringUTFChars(env, family_name_str, family_name); + + pango_font_description_set_size (pfont->desc, size * PANGO_SCALE); + + if (style & java_awt_font_BOLD) + pango_font_description_set_weight (pfont->desc, PANGO_WEIGHT_BOLD); + + if (style & java_awt_font_ITALIC) + pango_font_description_set_style (pfont->desc, PANGO_STYLE_ITALIC); + + /* + FIXME: these are possibly wrong, and should in any case + probably be cached between calls. + */ + + map = pango_ft2_font_map_for_display (); + g_assert (map != NULL); + + if (pfont->ctx == NULL) + pfont->ctx = pango_ft2_font_map_create_context (PANGO_FT2_FONT_MAP (map)); + g_assert (pfont->ctx != NULL); + + if (pfont->font != NULL) + g_object_unref (pfont->font); + + pfont->font = pango_font_map_load_font (map, pfont->ctx, pfont->desc); + g_assert (pfont->font != NULL); + + gdk_threads_leave (); + } + + diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeerMetrics.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeerMetrics.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeerMetrics.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeerMetrics.c 2003-12-31 08:58:31.000000000 +0000 *************** *** 0 **** --- 1,92 ---- + /* gnu_java_awt_peer_gtk_GdkClasspathFontPeerMetrics.c + Copyright (C) 1999, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + #include + + #include "gdkfont.h" + #include "gnu_java_awt_peer_gtk_GdkClasspathFontPeerMetrics.h" + + #define ASCENT 0 + #define MAX_ASCENT 1 + #define DESCENT 2 + #define MAX_DESCENT 3 + #define MAX_ADVANCE 4 + #define NUM_METRICS 5 + + JNIEXPORT jintArray JNICALL Java_gnu_java_awt_peer_gtk_GdkClasspathFontPeerMetrics_initState + (JNIEnv *env, jobject self, jobject font) + { + jintArray array; + jint *metrics; + struct peerfont *pf = NULL; + + pf = NSA_GET_FONT_PTR(env, font); + g_assert (pf != NULL); + + array = (*env)->NewIntArray (env, NUM_METRICS); + metrics = (*env)->GetIntArrayElements (env, array, NULL); + + gdk_threads_enter (); + + #define DOUBLE_TO_26_6(d) ((FT_F26Dot6)((d) * 63.0)) + #define DOUBLE_FROM_26_6(t) (((double)((t) >> 6)) \ + + ((double)((t) & 0x3F) / 63.0)) + + double pointsize = pango_font_description_get_size (pf->desc); + pointsize /= (double) PANGO_SCALE; + + FT_Face face = pango_ft2_font_get_face (pf->font); + FT_Set_Char_Size( face, + DOUBLE_TO_26_6 (pointsize), + DOUBLE_TO_26_6 (pointsize), + 0, 0); + + metrics[ASCENT] = ceil (DOUBLE_FROM_26_6(face->size->metrics.ascender)); + metrics[MAX_ASCENT] = metrics[ASCENT]; + metrics[DESCENT] = floor (DOUBLE_FROM_26_6(face->size->metrics.descender)); + if (metrics[DESCENT] < 0) + metrics[DESCENT] = - metrics[DESCENT]; + metrics[MAX_DESCENT] = metrics[DESCENT]; + metrics[MAX_ADVANCE] = ceil (DOUBLE_FROM_26_6(face->size->metrics.max_advance)); + + gdk_threads_leave (); + + (*env)->ReleaseIntArrayElements (env, array, metrics, 0); + + return array; + } + diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontMetrics.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontMetrics.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontMetrics.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontMetrics.c 2003-12-02 21:00:05.000000000 +0000 *************** *** 0 **** --- 1,130 ---- + /* gdkfontmetrics.c + Copyright (C) 1999, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + #include "gtkpeer.h" + #include "gnu_java_awt_peer_gtk_GdkFontMetrics.h" + #include + + #define ASCENT 0 + #define MAX_ASCENT 1 + #define DESCENT 2 + #define MAX_DESCENT 3 + #define MAX_ADVANCE 4 + #define NUM_METRICS 5 + + JNIEXPORT jintArray JNICALL Java_gnu_java_awt_peer_gtk_GdkFontMetrics_initState + (JNIEnv *env, jobject obj __attribute__((unused)), jstring fname, jint size) + { + jintArray array; + jint *metrics; + const char *font_name; + PangoFontDescription *font_desc; + PangoContext *context; + PangoFontMetrics *pango_metrics; + + array = (*env)->NewIntArray (env, NUM_METRICS); + + metrics = (*env)->GetIntArrayElements (env, array, NULL); + font_name = (*env)->GetStringUTFChars (env, fname, NULL); + + gdk_threads_enter (); + + font_desc = pango_font_description_from_string (font_name); + pango_font_description_set_size (font_desc, size * PANGO_SCALE); + + context = gdk_pango_context_get(); + pango_context_set_font_description (context, font_desc); + + pango_metrics = pango_context_get_metrics (context, font_desc, NULL); + + metrics[ASCENT] = + pango_font_metrics_get_ascent (pango_metrics) / PANGO_SCALE; + metrics[MAX_ASCENT] = metrics[ASCENT]; + metrics[DESCENT] = + pango_font_metrics_get_descent (pango_metrics) / PANGO_SCALE; + metrics[MAX_DESCENT] = metrics[DESCENT]; + metrics[MAX_ADVANCE] = + pango_font_metrics_get_approximate_char_width (pango_metrics) / PANGO_SCALE; + + pango_font_metrics_unref (pango_metrics); + + pango_font_description_free (font_desc); + + gdk_threads_leave (); + + (*env)->ReleaseStringUTFChars (env, fname, font_name); + (*env)->ReleaseIntArrayElements (env, array, metrics, 0); + + return array; + } + + JNIEXPORT jint JNICALL Java_gnu_java_awt_peer_gtk_GdkFontMetrics_stringWidth + (JNIEnv *env, jobject obj __attribute__((unused)), + jstring fname, jint size, jstring str) + { + PangoFontDescription *font_desc; + PangoContext *context; + PangoLayout *layout; + int width = 0; + const char *cstr; + const char *font_name; + + cstr = (*env)->GetStringUTFChars (env, str, NULL); + font_name = (*env)->GetStringUTFChars (env, fname, NULL); + + gdk_threads_enter (); + + font_desc = pango_font_description_from_string (font_name); + pango_font_description_set_size (font_desc, size * PANGO_SCALE); + + context = gdk_pango_context_get(); + pango_context_set_font_description (context, font_desc); + + layout = pango_layout_new (context); + + pango_layout_set_text (layout, cstr, -1); + pango_layout_get_pixel_size (layout, &width, NULL); + + pango_font_description_free (font_desc); + + gdk_threads_leave (); + + (*env)->ReleaseStringUTFChars (env, fname, font_name); + (*env)->ReleaseStringUTFChars (env, str, cstr); + + return width; + } diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGlyphVector.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGlyphVector.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGlyphVector.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGlyphVector.c 2003-11-20 22:44:01.000000000 +0000 *************** *** 0 **** --- 1,660 ---- + /* gdkglyphvector.c + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + #include "gdkfont.h" + #include "gnu_java_awt_peer_gtk_GdkGlyphVector.h" + + struct state_table *native_glyphvector_state_table; + + typedef struct { + double x; + double y; + double width; + double height; + } rect_t; + + #define DOUBLE_TO_26_6(d) ((FT_F26Dot6)((d) * 63.0)) + #define DOUBLE_FROM_26_6(t) (((double)((t) >> 6)) \ + + ((double)((t) & 0x3F) / 63.0)) + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGlyphVector_initStaticState + (JNIEnv *env, jclass clazz) + { + NSA_GV_INIT (env, clazz); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGlyphVector_initState + (JNIEnv *env, jobject self, jobject font, jobject ctx) + { + struct glyphvec *vec = NULL; + struct peerfont *pfont = NULL; + + gdk_threads_enter (); + g_assert (font != NULL); + pfont = (struct peerfont *)NSA_GET_FONT_PTR (env, font); + g_assert (pfont != NULL); + g_assert (pfont->ctx != NULL); + g_assert (pfont->desc != NULL); + + g_assert (self != NULL); + vec = (struct glyphvec *) g_malloc0 (sizeof (struct glyphvec)); + g_assert (vec != NULL); + + vec->desc = pango_font_describe (pfont->font); + g_assert (vec->desc != NULL); + + vec->font = pfont->font; + g_object_ref (vec->font); + + vec->ctx = pfont->ctx; + g_object_ref (vec->ctx); + + NSA_SET_GV_PTR (env, self, vec); + gdk_threads_leave (); + } + + static void free_glyphitems (GList *list) + { + GList *i = NULL; + PangoGlyphItem *gi = NULL; + + for (i = g_list_first (list); i != NULL; i = g_list_next (i)) + { + g_assert (i->data != NULL); + gi = (PangoGlyphItem *)i->data; + + if (gi->glyphs != NULL) + pango_glyph_string_free (gi->glyphs); + + if (gi->item != NULL) + g_free (gi->item); + } + g_list_free (list); + } + + static void seek_glyphstring_idx (GList *list, int idx, + int *nidx, + PangoGlyphString **gs, + PangoFont **fnt) + { + GList *i = NULL; + PangoGlyphItem *gi = NULL; + + g_assert (list != NULL); + g_assert (gs != NULL); + g_assert (nidx != NULL); + + int begin = 0; + for (i = g_list_first (list); i != NULL; i = g_list_next (i)) + { + g_assert (i->data != NULL); + gi = (PangoGlyphItem *)i->data; + + g_assert (gi->glyphs != NULL); + + if (begin <= idx && idx < begin + gi->glyphs->num_glyphs) + { + *gs = gi->glyphs; + *nidx = idx - begin; + if (fnt && gi->item) + *fnt = gi->item->analysis.font; + return; + } + else + { + begin += gi->glyphs->num_glyphs; + } + } + *gs = NULL; + *nidx = -1; + } + + static void seek_glyph_idx (GList *list, int idx, + PangoGlyphInfo **g, + PangoFont **fnt) + { + PangoGlyphString *gs = NULL; + int nidx = -1; + + g_assert (list != NULL); + g_assert (g != NULL); + + seek_glyphstring_idx (list, idx, &nidx, &gs, fnt); + + g_assert (gs != NULL); + g_assert (nidx != -1); + g_assert (nidx < gs->num_glyphs); + g_assert (gs->glyphs != NULL); + + *g = gs->glyphs + nidx; + } + + static void union_rects (rect_t *r1, + const rect_t *r2) + { + rect_t r; + + g_assert (r1 != NULL); + g_assert (r2 != NULL); + + /* + x is the left edge of the rect, + y is the top edge of the rect + */ + + #ifndef min + #define min(x,y) ((x) < (y) ? (x) : (y)) + #endif + + #ifndef max + #define max(x,y) ((x) < (y) ? (y) : (x)) + #endif + + r.x = min(r1->x, r2->x); + + r.y = min(r1->y, r2->y); + + r.width = max(r1->x + r1->width, + r2->x + r2->width) - r.x; + + r.height = max(r1->y + r1->height, + r2->y + r2->height) - r.y; + + *r1 = r; + } + + static jdoubleArray rect_to_array (JNIEnv *env, const rect_t *r) + { + /* We often return rectangles as arrays : { x, y, w, h } */ + jdoubleArray ret; + double *rp = NULL; + g_assert (r != NULL); + ret = (*env)->NewDoubleArray (env, 4); + rp = (*env)->GetDoubleArrayElements (env, ret, NULL); + g_assert (rp != NULL); + rp[0] = r->x; + /* freetype and pango's view of space is upside down from java2d's */ + rp[1] = r->y * -1; + rp[2] = r->width; + rp[3] = r->height; + (*env)->ReleaseDoubleArrayElements (env, ret, rp, 0); + return ret; + } + + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGlyphVector_dispose + (JNIEnv *env, jobject self) + { + struct glyphvec *vec = NULL; + + gdk_threads_enter (); + g_assert (self != NULL); + vec = (struct glyphvec *)NSA_DEL_GV_PTR (env, self); + g_assert (vec != NULL); + + if (vec->glyphitems != NULL) + { + free_glyphitems (vec->glyphitems); + vec->glyphitems = NULL; + } + + if (vec->desc != NULL) + pango_font_description_free (vec->desc); + + if (vec->ctx != NULL) + g_object_unref (vec->ctx); + + g_free (vec); + gdk_threads_leave (); + } + + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGlyphVector_setChars + (JNIEnv *env, jobject self, jstring chars) + { + struct glyphvec *vec = NULL; + gchar *str = NULL; + GList *items = NULL, *item = NULL; + PangoGlyphItem *gi; + PangoAttrList *attrs = NULL; + gint len = 0; + + gdk_threads_enter (); + g_assert (self != NULL); + vec = (struct glyphvec *)NSA_GET_GV_PTR (env, self); + g_assert (vec != NULL); + g_assert (vec->desc != NULL); + g_assert (vec->ctx != NULL); + + len = (*gdk_env)->GetStringUTFLength (env, chars); + str = (gchar *)(*env)->GetStringUTFChars (env, chars, NULL); + g_assert (str != NULL); + + /* step 1: set our FontFescription in the context, then "itemize" the + text */ + + attrs = pango_attr_list_new (); + g_assert (attrs != NULL); + + pango_context_set_font_description (vec->ctx, vec->desc); + + items = pango_itemize (vec->ctx, str, 0, len, attrs, NULL); + g_assert (items != NULL); + + /* + step 2: for each item: + - shape the item into a glyphstring + - store the (item, glyphstring) pair in the vec->glyphitems list + */ + + if (vec->glyphitems != NULL) + { + free_glyphitems (vec->glyphitems); + vec->glyphitems = NULL; + } + + for (item = g_list_first (items); item != NULL; item = g_list_next (item)) + { + g_assert (item->data != NULL); + + gi = NULL; + gi = g_malloc0 (sizeof(PangoGlyphItem)); + g_assert (gi != NULL); + + gi->item = (PangoItem *)item->data; + gi->glyphs = pango_glyph_string_new (); + g_assert (gi->glyphs != NULL); + + pango_shape (str + gi->item->offset, + gi->item->length, + &(gi->item->analysis), + gi->glyphs); + + vec->glyphitems = g_list_append (vec->glyphitems, gi); + } + + /* + ownership of each item has been transferred to glyphitems, + but the list should be freed. + */ + + g_list_free (items); + pango_attr_list_unref (attrs); + + (*env)->ReleaseStringUTFChars (env, chars, str); + gdk_threads_leave (); + } + + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGlyphVector_setGlyphCodes + (JNIEnv *env, jobject self, jintArray codes) + { + struct glyphvec *vec = NULL; + + gdk_threads_enter (); + g_assert (self != NULL); + vec = (struct glyphvec *)NSA_GET_GV_PTR (env, self); + g_assert (vec != NULL); + + /* + FIXME: setting glyph codes doesn't seem particularly plausible at the + moment. + */ + + gdk_threads_leave (); + + } + + + JNIEXPORT jint JNICALL Java_gnu_java_awt_peer_gtk_GdkGlyphVector_glyphCode + (JNIEnv *env, jobject self, jint idx) + { + struct glyphvec *vec = NULL; + PangoGlyphInfo *gi = NULL; + jint ret = 0; + + gdk_threads_enter (); + g_assert (self != NULL); + vec = (struct glyphvec *)NSA_GET_GV_PTR (env, self); + g_assert (vec != NULL); + g_assert (vec->glyphitems != NULL); + + seek_glyph_idx (vec->glyphitems, idx, &gi, NULL); + g_assert (gi != NULL); + ret = gi->glyph; + gdk_threads_leave (); + + return (jint)(ret); + } + + + JNIEXPORT jint JNICALL Java_gnu_java_awt_peer_gtk_GdkGlyphVector_numGlyphs + (JNIEnv *env, jobject self) + { + GList *i = NULL; + PangoGlyphItem *gi = NULL; + struct glyphvec *vec = NULL; + jint count = 0; + + gdk_threads_enter (); + g_assert (self != NULL); + vec = (struct glyphvec *)NSA_GET_GV_PTR (env, self); + g_assert (vec != NULL); + + for (i = g_list_first (vec->glyphitems); i != NULL; i = g_list_next (i)) + { + g_assert (i->data != NULL); + gi = (PangoGlyphItem *)i->data; + g_assert (gi->glyphs != NULL); + count += gi->glyphs->num_glyphs; + } + gdk_threads_leave (); + + return count; + } + + + JNIEXPORT jint JNICALL Java_gnu_java_awt_peer_gtk_GdkGlyphVector_glyphCharIndex + (JNIEnv *env, jobject self, jint idx) + { + /* + FIXME: this is not correct, rather it assumes a (broken) 1:1 + glyph:char model. it can be implemented in terms of bytes (also + broken) using pango's current interface, or perhaps in terms of + characters if some better byte->character conversion operator is + found. for the time being we leave it broken. + */ + return idx; + } + + + JNIEXPORT jdoubleArray JNICALL Java_gnu_java_awt_peer_gtk_GdkGlyphVector_allInkExtents + (JNIEnv *env, jobject self) + { + struct glyphvec *vec = NULL; + int j; + GList *i; + PangoGlyphItem *gi = NULL; + rect_t rect = {0,0,0,0}; + rect_t tmp; + jdoubleArray ret; + double x = 0, y = 0; + double pointsize; + FT_Face face; + + gdk_threads_enter (); + g_assert (self != NULL); + vec = (struct glyphvec *)NSA_GET_GV_PTR (env, self); + g_assert (vec != NULL); + g_assert (vec->glyphitems != NULL); + + pointsize = pango_font_description_get_size (vec->desc); + pointsize /= (double) PANGO_SCALE; + + for (i = g_list_first (vec->glyphitems); i != NULL; i = g_list_next (i)) + { + g_assert (i->data != NULL); + gi = (PangoGlyphItem *)i->data; + g_assert (gi->glyphs != NULL); + + face = pango_ft2_font_get_face (gi->item->analysis.font); + FT_Set_Char_Size( face, + DOUBLE_TO_26_6 (pointsize), + DOUBLE_TO_26_6 (pointsize), + 0, 0); + + for (j = 0; j < gi->glyphs->num_glyphs; ++j) + { + FT_Load_Glyph (face, gi->glyphs->glyphs[j].glyph, FT_LOAD_DEFAULT); + /* FIXME: this needs to change for vertical layouts */ + tmp.x = x + DOUBLE_FROM_26_6 (face->glyph->metrics.horiBearingX); + tmp.y = y + DOUBLE_FROM_26_6 (face->glyph->metrics.horiBearingY); + tmp.width = DOUBLE_FROM_26_6 (face->glyph->metrics.width); + tmp.height = DOUBLE_FROM_26_6 (face->glyph->metrics.height); + union_rects (&rect, &tmp); + x += DOUBLE_FROM_26_6 (face->glyph->advance.x); + y += DOUBLE_FROM_26_6 (face->glyph->advance.y); + } + } + + ret = rect_to_array (env, &rect); + gdk_threads_leave (); + return ret; + } + + + JNIEXPORT jdoubleArray JNICALL Java_gnu_java_awt_peer_gtk_GdkGlyphVector_allLogicalExtents + (JNIEnv *env, jobject self) + { + struct glyphvec *vec = NULL; + int j; + GList *i; + PangoGlyphItem *gi = NULL; + rect_t rect = {0,0,0,0}; + rect_t tmp; + jdoubleArray ret; + double x = 0, y = 0; + double pointsize; + FT_Face face; + + gdk_threads_enter (); + g_assert (self != NULL); + vec = (struct glyphvec *)NSA_GET_GV_PTR (env, self); + g_assert (vec != NULL); + g_assert (vec->glyphitems != NULL); + + pointsize = pango_font_description_get_size (vec->desc); + pointsize /= (double) PANGO_SCALE; + + for (i = g_list_first (vec->glyphitems); i != NULL; i = g_list_next (i)) + { + g_assert (i->data != NULL); + gi = (PangoGlyphItem *)i->data; + g_assert (gi->glyphs != NULL); + + face = pango_ft2_font_get_face (gi->item->analysis.font); + FT_Set_Char_Size( face, + DOUBLE_TO_26_6 (pointsize), + DOUBLE_TO_26_6 (pointsize), + 0, 0); + + for (j = 0; j < gi->glyphs->num_glyphs; ++j) + { + FT_Load_Glyph (face, gi->glyphs->glyphs[j].glyph, FT_LOAD_DEFAULT); + + /* FIXME: also, this is probably not the correct set of metrics; + the "logical bounds" are some fancy combination of hori + advance and height such that it's good for inverting as a + highlight. revisit. */ + + tmp.x = x; + tmp.y = y; + tmp.width = DOUBLE_FROM_26_6 (face->glyph->advance.x); + tmp.height = DOUBLE_FROM_26_6 (face->glyph->advance.y); + union_rects (&rect, &tmp); + x += DOUBLE_FROM_26_6 (face->glyph->advance.x); + y += DOUBLE_FROM_26_6 (face->glyph->advance.y); + } + } + + ret = rect_to_array (env, &rect); + gdk_threads_leave (); + return ret; + } + + + JNIEXPORT jdoubleArray JNICALL Java_gnu_java_awt_peer_gtk_GdkGlyphVector_glyphLogicalExtents + (JNIEnv *env, jobject self, jint idx) + { + struct glyphvec *vec = NULL; + rect_t rect = {0,0,0,0}; + PangoGlyphInfo *gi = NULL; + PangoFont *font = NULL; + jdoubleArray ret; + double pointsize; + FT_Face face; + + gdk_threads_enter (); + g_assert (self != NULL); + vec = (struct glyphvec *)NSA_GET_GV_PTR (env, self); + g_assert (vec != NULL); + g_assert (vec->glyphitems != NULL); + + seek_glyph_idx (vec->glyphitems, idx, &gi, &font); + g_assert (gi != NULL); + g_assert (font != NULL); + + pointsize = pango_font_description_get_size (vec->desc); + pointsize /= (double) PANGO_SCALE; + face = pango_ft2_font_get_face (font); + FT_Set_Char_Size( face, + DOUBLE_TO_26_6 (pointsize), + DOUBLE_TO_26_6 (pointsize), + 0, 0); + + FT_Load_Glyph (face, gi->glyph, FT_LOAD_DEFAULT); + + /* FIXME: this is probably not the correct set of metrics; + the "logical bounds" are some fancy combination of hori + advance and height such that it's good for inverting as a + highlight. revisit. */ + + rect.x = 0; + rect.y = 0; + rect.width = DOUBLE_FROM_26_6 (face->glyph->advance.x); + rect.height = DOUBLE_FROM_26_6 (face->glyph->advance.y); + + ret = rect_to_array (env, &rect); + gdk_threads_leave (); + return ret; + } + + + JNIEXPORT jdoubleArray JNICALL Java_gnu_java_awt_peer_gtk_GdkGlyphVector_glyphInkExtents + (JNIEnv *env, jobject self, jint idx) + { + struct glyphvec *vec = NULL; + rect_t rect = {0,0,0,0}; + PangoGlyphInfo *gi = NULL; + PangoFont *font = NULL; + jdoubleArray ret; + double pointsize; + FT_Face face; + + gdk_threads_enter (); + g_assert (self != NULL); + vec = (struct glyphvec *)NSA_GET_GV_PTR (env, self); + g_assert (vec != NULL); + g_assert (vec->glyphitems != NULL); + + seek_glyph_idx (vec->glyphitems, idx, &gi, &font); + g_assert (gi != NULL); + g_assert (font != NULL); + + pointsize = pango_font_description_get_size (vec->desc); + pointsize /= (double) PANGO_SCALE; + face = pango_ft2_font_get_face (font); + FT_Set_Char_Size( face, + DOUBLE_TO_26_6 (pointsize), + DOUBLE_TO_26_6 (pointsize), + 0, 0); + + FT_Load_Glyph (face, gi->glyph, FT_LOAD_DEFAULT); + /* FIXME: this needs to change for vertical layouts */ + rect.x = DOUBLE_FROM_26_6 (face->glyph->metrics.horiBearingX); + rect.y = DOUBLE_FROM_26_6 (face->glyph->metrics.horiBearingY); + rect.width = DOUBLE_FROM_26_6 (face->glyph->metrics.width); + rect.height = DOUBLE_FROM_26_6 (face->glyph->metrics.height); + + ret = rect_to_array (env, &rect); + gdk_threads_leave (); + return ret; + } + + + JNIEXPORT jboolean JNICALL Java_gnu_java_awt_peer_gtk_GdkGlyphVector_glyphIsHorizontal + (JNIEnv *env, jobject self, jint idx) + { + struct glyphvec *vec = NULL; + PangoDirection dir; + + gdk_threads_enter (); + g_assert (self != NULL); + vec = (struct glyphvec *)NSA_GET_GV_PTR (env, self); + g_assert (vec != NULL); + g_assert (vec->desc != NULL); + g_assert (vec->ctx != NULL); + + /* + FIXME: this is an approximation; it's not clear to me whether + glyphs themselves are horizontal or vertical so much as the + writing system or writing context. pango thinks it's a context + issue, so we use that for now. + */ + + dir = pango_context_get_base_dir (vec->ctx); + + gdk_threads_leave (); + + return + ((dir == PANGO_DIRECTION_LTR) || + (dir == PANGO_DIRECTION_RTL)); + } + + + JNIEXPORT jboolean JNICALL Java_gnu_java_awt_peer_gtk_GdkGlyphVector_isEqual + (JNIEnv *env, jobject self, jobject other) + { + struct glyphvec *vec1 = NULL, *vec2 = NULL; + jboolean eq = 0; + + gdk_threads_enter (); + g_assert (self != NULL); + vec1 = (struct glyphvec *)NSA_GET_GV_PTR (env, self); + vec2 = (struct glyphvec *)NSA_GET_GV_PTR (env, other); + g_assert (vec1 != NULL); + g_assert (vec2 != NULL); + + /* FIXME: is there some more advantageous definition of equality for + glyph vectors? */ + eq = (vec1 == vec2); + + gdk_threads_leave (); + return eq; + } + + diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c 2003-12-31 08:58:31.000000000 +0000 *************** *** 0 **** --- 1,1159 ---- + /* gnu_java_awt_peer_gtk_GdkGraphics2d.c + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + #include "gtkcairopeer.h" + #include "gdkfont.h" + #include "gnu_java_awt_peer_gtk_GdkGraphics2D.h" + #include + #include + #include + + #include + #include + + #include + + #include + #include + + struct state_table *native_graphics2d_state_table; + + #define NSA_G2D_INIT(env, clazz) \ + native_graphics2d_state_table = init_state_table (env, clazz) + + #define NSA_GET_G2D_PTR(env, obj) \ + get_state (env, obj, native_graphics2d_state_table) + + #define NSA_SET_G2D_PTR(env, obj, ptr) \ + set_state (env, obj, native_graphics2d_state_table, (void *)ptr) + + #define NSA_DEL_G2D_PTR(env, obj) \ + remove_state_slot (env, obj, native_graphics2d_state_table) + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_initStaticState + (JNIEnv *env, jclass clazz) + { + NSA_G2D_INIT (env, clazz); + } + + /* these public final constants are part of the java2d public API, so we + write them explicitly here to save fetching them from the constant pool + all the time. */ + + #ifndef min + #define min(x,y) ((x) < (y) ? (x) : (y)) + #endif + + enum java_awt_alpha_composite_rule + { + java_awt_alpha_composite_CLEAR = 1, + java_awt_alpha_composite_SRC = 2, + java_awt_alpha_composite_SRC_OVER = 3, + java_awt_alpha_composite_DST_OVER = 4, + java_awt_alpha_composite_SRC_IN = 5, + java_awt_alpha_composite_DST_IN = 6, + java_awt_alpha_composite_SRC_OUT = 7, + java_awt_alpha_composite_DST_OUT = 8, + java_awt_alpha_composite_DST = 9, + java_awt_alpha_composite_SRC_ATOP = 10, + java_awt_alpha_composite_DST_ATOP = 11, + java_awt_alpha_composite_XOR = 12 + }; + + enum java_awt_basic_stroke_join_rule + { + java_awt_basic_stroke_JOIN_MITER = 0, + java_awt_basic_stroke_JOIN_ROUND = 1, + java_awt_basic_stroke_JOIN_BEVEL = 2 + }; + + enum java_awt_basic_stroke_cap_rule + { + java_awt_basic_stroke_CAP_BUTT = 0, + java_awt_basic_stroke_CAP_ROUND = 1, + java_awt_basic_stroke_CAP_SQUARE = 2 + }; + + enum java_awt_geom_path_iterator_winding_rule + { + java_awt_geom_path_iterator_WIND_EVEN_ODD = 0, + java_awt_geom_path_iterator_WIND_NON_ZERO = 1 + }; + + + static void + grab_current_drawable (GtkWidget *widget, GdkDrawable **draw, GdkWindow **win) + { + g_assert (widget != NULL); + g_assert (draw != NULL); + g_assert (win != NULL); + + if (GTK_IS_WINDOW (widget)) + { + *win = find_gtk_layout (widget)->bin_window; + } + else if (GTK_IS_LAYOUT (widget)) + { + *win = GTK_LAYOUT (widget)->bin_window; + } + else + { + *win = widget->window; + } + + *draw = *win; + gdk_window_get_internal_paint_info (*win, draw, 0, 0); + g_object_ref (*draw); + } + + + static int + x_server_has_render_extension (void) + { + int ev = 0, err = 0; + return (int) XRenderQueryExtension (GDK_DISPLAY (), &ev, &err); + } + + + static void + init_graphics2d_as_pixbuf (struct graphics2d *gr) + { + gint width, height; + gint bits_per_sample = 8; + gint total_channels = 4; + gboolean has_alpha = TRUE; + + g_assert (gr != NULL); + g_assert (gr->drawable != NULL); + + if (gr->debug) printf ("initializing graphics2d as pixbuf\n"); + gdk_drawable_get_size (gr->drawable, &width, &height); + gr->drawbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, + has_alpha, bits_per_sample, + width, height); + g_assert (gr->drawbuf != NULL); + g_assert (gdk_pixbuf_get_bits_per_sample (gr->drawbuf) == bits_per_sample); + g_assert (gdk_pixbuf_get_n_channels (gr->drawbuf) == total_channels); + + gr->surface = cairo_surface_create_for_image (gdk_pixbuf_get_pixels (gr->drawbuf), + CAIRO_FORMAT_ARGB32, + gdk_pixbuf_get_width (gr->drawbuf), + gdk_pixbuf_get_height (gr->drawbuf), + gdk_pixbuf_get_rowstride (gr->drawbuf)); + g_assert (gr->surface != NULL); + g_assert (gr->cr != NULL); + cairo_set_target_surface (gr->cr, gr->surface); + } + + static void + init_graphics2d_as_renderable (struct graphics2d *gr) + { + Drawable draw; + Display * dpy; + Visual * vis; + + g_assert (gr != NULL); + g_assert (gr->drawable != NULL); + + gr->drawbuf = NULL; + + if (gr->debug) printf ("initializing graphics2d as renderable\n"); + draw = gdk_x11_drawable_get_xid (gr->drawable); + + dpy = gdk_x11_drawable_get_xdisplay (gr->drawable); + g_assert (dpy != NULL); + + vis = gdk_x11_visual_get_xvisual (gdk_drawable_get_visual (gr->drawable)); + g_assert (vis != NULL); + + gr->surface = cairo_xlib_surface_create (dpy, draw, vis, + CAIRO_FORMAT_ARGB32, + DefaultColormap (dpy, DefaultScreen (dpy))); + g_assert (gr->surface != NULL); + g_assert (gr->cr != NULL); + cairo_set_target_surface (gr->cr, gr->surface); + } + + static void + begin_drawing_operation (struct graphics2d * gr) + { + gdk_threads_enter (); + if (gr->drawbuf) + { + + gint drawable_width, drawable_height; + gint pixbuf_width, pixbuf_height; + gint width, height; + + gdk_drawable_get_size (gr->drawable, &drawable_width, &drawable_height); + pixbuf_width = gdk_pixbuf_get_width (gr->drawbuf); + pixbuf_height = gdk_pixbuf_get_height (gr->drawbuf); + width = min (drawable_width, pixbuf_width); + height = min (drawable_height, pixbuf_height); + + gdk_pixbuf_get_from_drawable (gr->drawbuf, /* destination pixbuf */ + gr->drawable, + NULL, /* colormap */ + 0, 0, 0, 0, + width, height); + + if (gr->debug) printf ("copied (%d, %d) pixels from GDK drawable to pixbuf\n", + width, height); + } + } + + static void + end_drawing_operation (struct graphics2d * gr) + { + if (gr->drawbuf) + { + gint drawable_width, drawable_height; + gint pixbuf_width, pixbuf_height; + gint width, height; + + gdk_drawable_get_size (gr->drawable, &drawable_width, &drawable_height); + pixbuf_width = gdk_pixbuf_get_width (gr->drawbuf); + pixbuf_height = gdk_pixbuf_get_height (gr->drawbuf); + width = min (drawable_width, pixbuf_width); + height = min (drawable_height, pixbuf_height); + + gdk_draw_pixbuf (gr->drawable, NULL, gr->drawbuf, + 0, 0, 0, 0, + width, height, + GDK_RGB_DITHER_NORMAL, 0, 0); + + if (gr->debug) printf ("copied (%d, %d) pixels from pixbuf to GDK drawable\n", + width, height); + } + gdk_threads_leave (); + } + + + static void + update_pattern_transform (struct graphics2d *gr) + { + double a, b, c, d, tx, ty; + cairo_matrix_t *mat = NULL; + + g_assert (gr != NULL); + if (gr->pattern == NULL) + return; + + return; + /* temporarily disabled: ambiguous behavior */ + /* cairo_get_matrix (gr->cr, &a, &b, &c, &d, &tx, &ty); */ + mat = cairo_matrix_create (); + g_assert (mat != NULL); + cairo_matrix_set_affine (mat, a, b, c, d, tx, ty); + cairo_surface_set_matrix (gr->pattern, mat); + cairo_matrix_destroy (mat); + } + + static void + check_for_debug (struct graphics2d *gr) + { + gr->debug = (gboolean)(getenv("DEBUGJ2D") != NULL); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_copyState + (JNIEnv *env, jobject obj, jobject old) + { + struct graphics2d *g = NULL, *g_old = NULL; + + g = (struct graphics2d *) malloc (sizeof (struct graphics2d)); + g_assert (g != NULL); + memset (g, 0, sizeof(struct graphics2d)); + + g_old = (struct graphics2d *) NSA_GET_G2D_PTR (env, old); + g_assert (g_old != NULL); + + if (g_old->debug) printf ("copying state from existing graphics2d\n"); + + g->drawable = g_old->drawable; + g->debug = g_old->debug; + + gdk_threads_enter (); + g_object_ref (g->drawable); + + g->cr = cairo_create(); + g_assert (g->cr != NULL); + + if (x_server_has_render_extension ()) + init_graphics2d_as_renderable (g); + else + init_graphics2d_as_pixbuf (g); + + cairo_surface_set_filter (g->surface, CAIRO_FILTER_FAST); + + gdk_threads_leave (); + + NSA_SET_G2D_PTR (env, obj, g); + } + + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_initState__II + (JNIEnv *env, jobject obj, jint width, jint height) + { + struct graphics2d *gr; + + gdk_threads_enter (); + + gr = (struct graphics2d *) malloc (sizeof (struct graphics2d)); + g_assert (gr != NULL); + memset (gr, 0, sizeof(struct graphics2d)); + + check_for_debug (gr); + + if (gr->debug) printf ("constructing offscreen drawable of size (%d,%d)\n", + width, height); + + gr->drawable = (GdkDrawable *) gdk_pixmap_new (NULL, width, height, + gdk_rgb_get_visual ()->depth); + g_assert (gr->drawable != NULL); + + gr->cr = cairo_create(); + g_assert (gr->cr != NULL); + + if (x_server_has_render_extension ()) + init_graphics2d_as_renderable (gr); + else + init_graphics2d_as_pixbuf (gr); + + gdk_threads_leave (); + if (gr->debug) printf ("constructed offscreen drawable of size (%d,%d)\n", + width, height); + NSA_SET_G2D_PTR (env, obj, gr); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_gdkDrawDrawable + (JNIEnv *env, jobject self, jobject other, jint x, jint y) + { + struct graphics2d *src = NULL, *dst = NULL; + gint s_height, s_width, d_height, d_width, height, width; + GdkGC *gc; + + src = (struct graphics2d *)NSA_GET_G2D_PTR (env, other); + dst = (struct graphics2d *)NSA_GET_G2D_PTR (env, self); + g_assert (src != NULL); + g_assert (dst != NULL); + + if (src->debug) printf ("copying from offscreen drawable\n"); + + gdk_threads_enter (); + gdk_drawable_get_size (src->drawable, &s_width, &s_height); + gdk_drawable_get_size (dst->drawable, &d_width, &d_height); + width = min (s_width, d_width); + height = min (s_width, d_height); + + gc = gdk_gc_new (dst->drawable); + g_assert (gc != NULL); + + gdk_draw_drawable(dst->drawable, gc, src->drawable, + 0, 0, x, y, width, height); + gdk_flush (); + + g_object_unref (gc); + + if (src->debug) printf ("copied %d x %d pixels from offscreen drawable\n", width, height); + gdk_threads_leave (); + } + + static jintArray + current_colors_of_widget (GtkWidget *widget, JNIEnv *env) + { + GdkColor color; + jintArray array; + jint *rgb; + + g_assert (widget != NULL); + g_assert (env != NULL); + + color = widget->style->fg[GTK_STATE_NORMAL]; + array = (*env)->NewIntArray (env, 6); + + rgb = (*env)->GetIntArrayElements (env, array, NULL); + rgb[0] = color.red >> 8; + rgb[1] = color.green >> 8; + rgb[2] = color.blue >> 8; + + color = widget->style->bg[GTK_STATE_NORMAL]; + rgb[3] = color.red >> 8; + rgb[4] = color.green >> 8; + rgb[5] = color.blue >> 8; + + (*env)->ReleaseIntArrayElements (env, array, rgb, 0); + + return array; + } + + JNIEXPORT jintArray JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_initState__Lgnu_java_awt_peer_gtk_GtkComponentPeer_2 + (JNIEnv *env, jobject obj, jobject peer) + { + struct graphics2d *gr = NULL; + GtkWidget *widget = NULL; + void *ptr = NULL; + jintArray color; + + ptr = NSA_GET_PTR (env, peer); + g_assert (ptr != NULL); + gdk_threads_enter (); + + gr = (struct graphics2d *) malloc (sizeof (struct graphics2d)); + g_assert (gr != NULL); + memset (gr, 0, sizeof(struct graphics2d)); + + check_for_debug (gr); + + gr->cr = cairo_create(); + g_assert (gr->cr != NULL); + + widget = GTK_WIDGET (ptr); + g_assert (widget != NULL); + + grab_current_drawable (widget, &(gr->drawable), &(gr->win)); + g_assert (gr->drawable != NULL); + + if (x_server_has_render_extension ()) + init_graphics2d_as_renderable (gr); + else + init_graphics2d_as_pixbuf (gr); + + color = current_colors_of_widget (widget, env); + + gdk_threads_leave (); + NSA_SET_G2D_PTR (env, obj, gr); + return color; + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_dispose + (JNIEnv *env, jobject obj) + { + struct graphics2d *gr = NULL; + + gr = (struct graphics2d *) NSA_DEL_G2D_PTR (env, obj); + if (gr == NULL) + return; /* dispose has been called more than once */ + + gdk_threads_enter (); + + if (gr->surface) + cairo_surface_destroy (gr->surface); + + cairo_destroy (gr->cr); + + if (gr->drawbuf) + g_object_unref (gr->drawbuf); + + g_object_unref (gr->drawable); + + if (gr->pattern) + cairo_surface_destroy (gr->pattern); + + if (gr->pattern_pixels) + free (gr->pattern_pixels); + + if (gr->debug) printf ("disposed of graphics2d\n"); + free (gr); + + gdk_threads_leave (); + } + + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_setGradient + (JNIEnv *env, jobject obj, + jdouble x1, jdouble y1, + jdouble x2, jdouble y2, + jint r1, jint g1, jint b1, jint a1, + jint r2, jint g2, jint b2, jint a2, + jboolean cyclic) + { + struct graphics2d *gr = NULL; + cairo_surface_t *surf = NULL; + cairo_matrix_t *mat = NULL; + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + g_assert (gr != NULL); + + if (gr->debug) printf ("setGradient (%f,%f) -> (%f,%f); (%d,%d,%d,%d) -> (%d,%d,%d,%d)\n", + x1, y1, + x2, y2, + r1, g1, b1, a1, + r2, g2, b2, a2); + + cairo_save (gr->cr); + + if (cyclic) + surf = cairo_surface_create_similar (gr->surface, CAIRO_FORMAT_ARGB32, 3, 2); + else + surf = cairo_surface_create_similar (gr->surface, CAIRO_FORMAT_ARGB32, 2, 2); + g_assert (surf != NULL); + + cairo_set_target_surface (gr->cr, surf); + + cairo_identity_matrix (gr->cr); + + cairo_set_rgb_color (gr->cr, r1 / 255.0, g1 / 255.0, b1 / 255.0); + cairo_set_alpha (gr->cr, a1 / 255.0); + cairo_rectangle (gr->cr, 0, 0, 1, 2); + cairo_fill (gr->cr); + + cairo_set_rgb_color (gr->cr, r2 / 255.0, g2 / 255.0, b2 / 255.0); + cairo_set_alpha (gr->cr, a2 / 255.0); + cairo_rectangle (gr->cr, 1, 0, 1, 2); + cairo_fill (gr->cr); + + if (cyclic) + { + cairo_set_rgb_color (gr->cr, r1 / 255.0, g1 / 255.0, b1 / 255.0); + cairo_set_alpha (gr->cr, a1 / 255.0); + cairo_rectangle (gr->cr, 2, 0, 1, 2); + cairo_fill (gr->cr); + } + + mat = cairo_matrix_create (); + g_assert (mat != NULL); + + /* + consider the vector [x2 - x1, y2 - y1] = [p,q] + + this is a line in space starting at an 'origin' x1, y1. + + it can also be thought of as a "transformed" unit vector in either the + x or y directions. we have just *drawn* our gradient as a unit vector + (well, a 2-3x unit vector) in the x dimension. so what we want to know + is which transformation turns our existing unit vector into [p,q]. + + which means solving for M in + + [p,q] = M[1,0] + + [p,q] = |a b| [1,0] + |c d| + + [p,q] = [a,c], with b = d = 0. + + what does this mean? it means that our gradient is 1-dimensional; as + you move through the x axis of our 2 or 3 pixel gradient from logical + x positions 0 to 1, the transformation of your x coordinate under the + matrix M causes you to accumulate both x and y values in fill + space. the y value of a gradient coordinate is ignored, since the + gradient is one dimensional. which is correct. + + unfortunately we want the opposite transformation, it seems, because of + the way cairo is going to use this transformation. I'm a bit confused by + that, but it seems to work right, so we take reciprocals of values and + negate offsets. oh well. + + */ + + double a = (x2 - x1 == 0.) ? 0. : ((cyclic ? 3.0 : 2.0) / (x2 - x1)); + double c = (y2 - y1 == 0.) ? 0. : (1. / (y2 - y1)); + double dx = (x1 == 0.) ? 0. : 1. / x1; + double dy = (y1 == 0.) ? 0. : 1. / y1; + + cairo_matrix_set_affine (mat, + a, 0., + c, 0., + dx, dy); + + cairo_surface_set_matrix (surf, mat); + cairo_matrix_destroy (mat); + cairo_surface_set_filter (surf, CAIRO_FILTER_BILINEAR); + + /* FIXME: repeating gradients (not to mention hold gradients) don't seem to work. */ + /* cairo_surface_set_repeat (surf, cyclic ? 1 : 0); */ + + if (gr->pattern) + cairo_surface_destroy (gr->pattern); + + if (gr->pattern_pixels) + { + free (gr->pattern_pixels); + gr->pattern_pixels = NULL; + } + + gr->pattern = surf; + + cairo_restore (gr->cr); + cairo_set_pattern (gr->cr, gr->pattern); + + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_setTexturePixels + (JNIEnv *env, jobject obj, jintArray jarr, jint w, jint h, jint stride) + { + struct graphics2d *gr = NULL; + jint *jpixels = NULL; + + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + g_assert (gr != NULL); + + if (gr->debug) printf ("setTexturePixels (%d pixels, %dx%d, stride: %d)\n", + (*env)->GetArrayLength (env, jarr), w, h, stride); + + if (gr->pattern) + cairo_surface_destroy (gr->pattern); + + if (gr->pattern_pixels) + free (gr->pattern_pixels); + + gr->pattern = NULL; + gr->pattern_pixels = NULL; + + gr->pattern_pixels = (char *) malloc (h * stride * 4); + g_assert (gr->pattern_pixels != NULL); + + jpixels = (*env)->GetIntArrayElements (env, jarr, NULL); + g_assert (jpixels != NULL); + memcpy (gr->pattern_pixels, jpixels, h * stride * 4); + (*env)->ReleaseIntArrayElements (env, jarr, jpixels, 0); + + gr->pattern = cairo_surface_create_for_image (gr->pattern_pixels, + CAIRO_FORMAT_ARGB32, + w, h, stride * 4); + g_assert (gr->pattern != NULL); + cairo_surface_set_repeat (gr->pattern, 1); + cairo_set_pattern (gr->cr, gr->pattern); + + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_drawPixels + (JNIEnv *env, jobject obj, jintArray java_pixels, + jint w, jint h, jint stride, jdoubleArray java_matrix) + { + struct graphics2d *gr = NULL; + jint *native_pixels = NULL; + jdouble *native_matrix = NULL; + + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + g_assert (gr != NULL); + + if (gr->debug) printf ("drawPixels (%d pixels, %dx%d, stride: %d)\n", + (*env)->GetArrayLength (env, java_pixels), w, h, stride); + + native_pixels = (*env)->GetIntArrayElements (env, java_pixels, NULL); + native_matrix = (*env)->GetDoubleArrayElements (env, java_matrix, NULL); + g_assert (native_pixels != NULL); + g_assert (native_matrix != NULL); + g_assert ((*env)->GetArrayLength (env, java_matrix) == 6); + + begin_drawing_operation (gr); + + { + cairo_matrix_t *mat = NULL; + cairo_surface_t *surf = cairo_surface_create_for_image ((char *)native_pixels, + CAIRO_FORMAT_ARGB32, + w, h, stride * 4); + mat = cairo_matrix_create (); + cairo_matrix_set_affine (mat, + native_matrix[0], native_matrix[1], + native_matrix[2], native_matrix[3], + native_matrix[4], native_matrix[5]); + cairo_surface_set_matrix (surf, mat); + if (native_matrix[0] != 1. + || native_matrix[1] != 0. + || native_matrix[2] != 0. + || native_matrix[3] != 1.) + { + cairo_surface_set_filter (surf, CAIRO_FILTER_BILINEAR); + cairo_surface_set_filter (gr->surface, CAIRO_FILTER_BILINEAR); + } + else + { + cairo_surface_set_filter (surf, CAIRO_FILTER_FAST); + cairo_surface_set_filter (gr->surface, CAIRO_FILTER_FAST); + } + cairo_show_surface (gr->cr, surf, w, h); + cairo_surface_set_filter (gr->surface, CAIRO_FILTER_FAST); + cairo_matrix_destroy (mat); + cairo_surface_destroy (surf); + } + + end_drawing_operation (gr); + + (*env)->ReleaseIntArrayElements (env, java_pixels, native_pixels, 0); + (*env)->ReleaseDoubleArrayElements (env, java_matrix, native_matrix, 0); + + } + + /* passthrough methods to cairo */ + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSave + (JNIEnv *env, jobject obj) + { + struct graphics2d *gr = NULL; + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + g_assert (gr != NULL); + if (gr->debug) printf ("cairo_save\n"); + cairo_save (gr->cr); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoRestore + (JNIEnv *env, jobject obj) + { + struct graphics2d *gr = NULL; + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + g_assert (gr != NULL); + if (gr->debug) printf ("cairo_restore\n"); + cairo_restore (gr->cr); + update_pattern_transform (gr); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetMatrix + (JNIEnv *env, jobject obj, jdoubleArray java_matrix) + { + struct graphics2d *gr = NULL; + jdouble *native_matrix = NULL; + + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + g_assert (gr != NULL); + + native_matrix = (*env)->GetDoubleArrayElements (env, java_matrix, NULL); + g_assert (native_matrix != NULL); + g_assert ((*env)->GetArrayLength (env, java_matrix) == 6); + + if (gr->debug) printf ("cairo_set_matrix [ %f, %f, %f, %f, %f, %f ]\n", + native_matrix[0], native_matrix[1], + native_matrix[2], native_matrix[3], + native_matrix[4], native_matrix[5]); + + { + cairo_matrix_t * mat = cairo_matrix_create (); + cairo_matrix_set_affine (mat, + native_matrix[0], native_matrix[1], + native_matrix[2], native_matrix[3], + native_matrix[4], native_matrix[5]); + cairo_set_matrix (gr->cr, mat); + cairo_matrix_destroy (mat); + } + + (*env)->ReleaseDoubleArrayElements (env, java_matrix, native_matrix, 0); + update_pattern_transform (gr); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetFont + (JNIEnv *env, jobject obj, jobject font) + { + struct graphics2d *gr = NULL; + struct peerfont *pfont = NULL; + cairo_font_t *ft = NULL; + FT_Face face = NULL; + + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + g_assert (gr != NULL); + + pfont = (struct peerfont *)NSA_GET_FONT_PTR (env, font); + g_assert (pfont != NULL); + + gdk_threads_enter (); + + face = pango_ft2_font_get_face (pfont->font); + g_assert (face != NULL); + + ft = cairo_ft_font_create_for_ft_face (face); + g_assert (ft != NULL); + + if (gr->debug) printf ("cairo_set_font '%s'\n", face->family_name); + + cairo_set_font (gr->cr, ft); + + cairo_scale_font (gr->cr, + pango_font_description_get_size (pfont->desc) / + (double)PANGO_SCALE); + + cairo_font_destroy (ft); + + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoShowGlyphs + (JNIEnv *env, jobject obj, jintArray java_codes, jfloatArray java_posns) + { + struct graphics2d *gr = NULL; + cairo_glyph_t *glyphs = NULL; + jfloat *native_posns = NULL; + jint *native_codes = NULL; + jint i; + jint ncodes, nposns; + + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + g_assert (gr != NULL); + + native_codes = (*env)->GetIntArrayElements (env, java_codes, NULL); + native_posns = (*env)->GetFloatArrayElements (env, java_posns, NULL); + g_assert (native_codes != NULL); + g_assert (native_posns != NULL); + + ncodes = (*env)->GetArrayLength (env, java_codes); + nposns = (*env)->GetArrayLength (env, java_posns); + g_assert (2 * ncodes == nposns); + + if (gr->debug) printf ("cairo_show_glyphs (%d glyphs)\n", ncodes); + + glyphs = malloc (sizeof(cairo_glyph_t) * ncodes); + g_assert (glyphs); + + for (i = 0; i < ncodes; ++i) + { + glyphs[i].index = native_codes[i]; + glyphs[i].x = (double) native_posns[2*i]; + glyphs[i].y = (double) native_posns[2*i + 1]; + if (gr->debug) printf ("cairo_show_glyphs (glyph %d (code %d) : %f,%f)\n", + i, glyphs[i].index, glyphs[i].x, glyphs[i].y); + } + + (*env)->ReleaseIntArrayElements (env, java_codes, native_codes, 0); + (*env)->ReleaseFloatArrayElements (env, java_posns, native_posns, 0); + + begin_drawing_operation (gr); + cairo_show_glyphs (gr->cr, glyphs, ncodes); + end_drawing_operation (gr); + + free(glyphs); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetOperator + (JNIEnv *env, jobject obj, jint op) + { + struct graphics2d *gr = NULL; + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + g_assert (gr != NULL); + if (gr->debug) printf ("cairo_set_operator %d\n", op); + switch ((enum java_awt_alpha_composite_rule) op) + { + case java_awt_alpha_composite_CLEAR: + cairo_set_operator (gr->cr, CAIRO_OPERATOR_CLEAR); + break; + + case java_awt_alpha_composite_SRC: + cairo_set_operator (gr->cr, CAIRO_OPERATOR_SRC); + break; + + case java_awt_alpha_composite_SRC_OVER: + cairo_set_operator (gr->cr, CAIRO_OPERATOR_OVER); + break; + + case java_awt_alpha_composite_DST_OVER: + cairo_set_operator (gr->cr, CAIRO_OPERATOR_OVER_REVERSE); + break; + + case java_awt_alpha_composite_SRC_IN: + cairo_set_operator (gr->cr, CAIRO_OPERATOR_IN); + break; + + case java_awt_alpha_composite_DST_IN: + cairo_set_operator (gr->cr, CAIRO_OPERATOR_IN_REVERSE); + break; + + case java_awt_alpha_composite_SRC_OUT: + cairo_set_operator (gr->cr, CAIRO_OPERATOR_OUT); + break; + + case java_awt_alpha_composite_DST_OUT: + cairo_set_operator (gr->cr, CAIRO_OPERATOR_OUT_REVERSE); + break; + + case java_awt_alpha_composite_DST: + cairo_set_operator (gr->cr, CAIRO_OPERATOR_DST); + break; + + case java_awt_alpha_composite_SRC_ATOP: + cairo_set_operator (gr->cr, CAIRO_OPERATOR_ATOP); + break; + + case java_awt_alpha_composite_DST_ATOP: + cairo_set_operator (gr->cr, CAIRO_OPERATOR_ATOP_REVERSE); + break; + + case java_awt_alpha_composite_XOR: + cairo_set_operator (gr->cr, CAIRO_OPERATOR_XOR); + break; + } + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetRGBColor + (JNIEnv *env, jobject obj, jdouble r, jdouble g, jdouble b) + { + struct graphics2d *gr = NULL; + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + g_assert (gr != NULL); + + /* this is a very weird fact: GDK Pixbufs and RENDER drawables consider + colors in opposite pixel order. I have no idea why. thus when you + draw to a PixBuf, you must exchange the R and B components of your + color. */ + + if (gr->debug) printf ("cairo_set_rgb_color (%f, %f, %f)\n", r, g, b); + + if (gr->drawbuf) + cairo_set_rgb_color (gr->cr, b, g, r); + else + cairo_set_rgb_color (gr->cr, r, g, b); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetAlpha + (JNIEnv *env, jobject obj, jdouble a) + { + struct graphics2d *gr = NULL; + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + g_assert (gr != NULL); + if (gr->debug) printf ("cairo_set_alpha %f\n", a); + cairo_set_alpha (gr->cr, a); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetFillRule + (JNIEnv *env, jobject obj, jint rule) + { + struct graphics2d *gr = NULL; + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + if (gr->debug) printf ("cairo_set_fill_rule %d\n", rule); + g_assert (gr != NULL); + switch ((enum java_awt_geom_path_iterator_winding_rule) rule) + { + case java_awt_geom_path_iterator_WIND_NON_ZERO: + cairo_set_fill_rule (gr->cr, CAIRO_FILL_RULE_WINDING); + break; + case java_awt_geom_path_iterator_WIND_EVEN_ODD: + cairo_set_fill_rule (gr->cr, CAIRO_FILL_RULE_EVEN_ODD); + break; + } + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetLineWidth + (JNIEnv *env, jobject obj, jdouble width) + { + struct graphics2d *gr = NULL; + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + g_assert (gr != NULL); + if (gr->debug) printf ("cairo_set_line_width %f\n", width); + cairo_set_line_width (gr->cr, width); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetLineCap + (JNIEnv *env, jobject obj, jint cap) + { + struct graphics2d *gr = NULL; + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + g_assert (gr != NULL); + if (gr->debug) printf ("cairo_set_line_cap %d\n", cap); + switch ((enum java_awt_basic_stroke_cap_rule) cap) + { + case java_awt_basic_stroke_CAP_BUTT: + cairo_set_line_cap (gr->cr, CAIRO_LINE_CAP_BUTT); + break; + + case java_awt_basic_stroke_CAP_ROUND: + cairo_set_line_cap (gr->cr, CAIRO_LINE_CAP_ROUND); + break; + + case java_awt_basic_stroke_CAP_SQUARE: + cairo_set_line_cap (gr->cr, CAIRO_LINE_CAP_SQUARE); + break; + } + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetLineJoin + (JNIEnv *env, jobject obj, jint join) + { + struct graphics2d *gr = NULL; + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + g_assert (gr != NULL); + if (gr->debug) printf ("cairo_set_line_join %d\n", join); + switch ((enum java_awt_basic_stroke_join_rule) join) + { + case java_awt_basic_stroke_JOIN_MITER: + cairo_set_line_join (gr->cr, CAIRO_LINE_JOIN_MITER); + break; + + case java_awt_basic_stroke_JOIN_ROUND: + cairo_set_line_join (gr->cr, CAIRO_LINE_JOIN_ROUND); + break; + + case java_awt_basic_stroke_JOIN_BEVEL: + cairo_set_line_join (gr->cr, CAIRO_LINE_JOIN_BEVEL); + break; + } + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetDash + (JNIEnv *env, jobject obj, jdoubleArray dashes, jint ndash, jdouble offset) + { + struct graphics2d *gr = NULL; + jdouble *dasharr = NULL; + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + g_assert (gr != NULL); + if (gr->debug) printf ("cairo_set_dash\n"); + dasharr = (*env)->GetDoubleArrayElements (env, dashes, NULL); + g_assert (dasharr != NULL); + cairo_set_dash (gr->cr, dasharr, ndash, offset); + (*env)->ReleaseDoubleArrayElements (env, dashes, dasharr, 0); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetMiterLimit + (JNIEnv *env, jobject obj, jdouble miter) + { + struct graphics2d *gr = NULL; + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + g_assert (gr != NULL); + if (gr->debug) printf ("cairo_set_miter_limit %f\n", miter); + cairo_set_miter_limit (gr->cr, miter); + } + + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoNewPath + (JNIEnv *env, jobject obj) + { + struct graphics2d *gr = NULL; + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + g_assert (gr != NULL); + if (gr->debug) printf ("cairo_new_path\n"); + cairo_new_path (gr->cr); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoMoveTo + (JNIEnv *env, jobject obj, jdouble x, jdouble y) + { + struct graphics2d *gr = NULL; + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + g_assert (gr != NULL); + if (gr->debug) printf ("cairo_move_to (%f, %f)\n", x, y); + cairo_move_to (gr->cr, x, y); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoLineTo + (JNIEnv *env, jobject obj, jdouble x, jdouble y) + { + struct graphics2d *gr = NULL; + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + g_assert (gr != NULL); + if (gr->debug) printf ("cairo_line_to (%f, %f)\n", x, y); + cairo_line_to (gr->cr, x, y); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoCurveTo + (JNIEnv *env, jobject obj, jdouble x1, jdouble y1, jdouble x2, jdouble y2, jdouble x3, jdouble y3) + { + struct graphics2d *gr = NULL; + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + g_assert (gr != NULL); + if (gr->debug) printf ("cairo_curve_to (%f, %f), (%f, %f), (%f, %f)\n", x1, y1, x2, y2, x3, y3); + cairo_curve_to (gr->cr, x1, y1, x2, y2, x3, y3); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoRelMoveTo + (JNIEnv *env, jobject obj, jdouble dx, jdouble dy) + { + struct graphics2d *gr = NULL; + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + g_assert (gr != NULL); + if (gr->debug) printf ("cairo_rel_move_to (%f, %f)\n", dx, dy); + cairo_rel_move_to (gr->cr, dx, dy); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoRelLineTo + (JNIEnv *env, jobject obj, jdouble dx, jdouble dy) + { + struct graphics2d *gr = NULL; + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + g_assert (gr != NULL); + if (gr->debug) printf ("cairo_rel_line_to (%f, %f)\n", dx, dy); + cairo_rel_line_to (gr->cr, dx, dy); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoRelCurveTo + (JNIEnv *env, jobject obj, jdouble dx1, jdouble dy1, jdouble dx2, jdouble dy2, jdouble dx3, jdouble dy3) + { + struct graphics2d *gr = NULL; + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + g_assert (gr != NULL); + if (gr->debug) printf ("cairo_rel_curve_to (%f, %f), (%f, %f), (%f, %f)\n", dx1, dy1, dx2, dy2, dx3, dy3); + cairo_rel_curve_to (gr->cr, dx1, dy1, dx2, dy2, dx3, dy3); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoRectangle + (JNIEnv *env, jobject obj, jdouble x, jdouble y, jdouble width, jdouble height) + { + struct graphics2d *gr = NULL; + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + g_assert (gr != NULL); + if (gr->debug) printf ("cairo_rectangle (%f, %f) (%f, %f)\n", x, y, width, height); + cairo_rectangle (gr->cr, x, y, width, height); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoClosePath + (JNIEnv *env, jobject obj) + { + struct graphics2d *gr = NULL; + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + g_assert (gr != NULL); + if (gr->debug) printf ("cairo_close_path\n"); + cairo_close_path (gr->cr); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoStroke + (JNIEnv *env, jobject obj) + { + struct graphics2d *gr = NULL; + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + g_assert (gr != NULL); + if (gr->debug) printf ("cairo_stroke\n"); + begin_drawing_operation (gr); + cairo_stroke (gr->cr); + end_drawing_operation (gr); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoFill + (JNIEnv *env, jobject obj) + { + struct graphics2d *gr = NULL; + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + g_assert (gr != NULL); + if (gr->debug) printf ("cairo_fill\n"); + begin_drawing_operation (gr); + cairo_fill (gr->cr); + end_drawing_operation (gr); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoClip + (JNIEnv *env, jobject obj) + { + struct graphics2d *gr = NULL; + gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj); + g_assert (gr != NULL); + if (gr->debug) printf ("cairo_clip\n"); + cairo_clip (gr->cr); + } + diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c 2003-10-08 23:38:45.000000000 +0000 *************** *** 0 **** --- 1,517 ---- + /* gdkgraphics.c + Copyright (C) 1999 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + #include "gtkpeer.h" + #include "gnu_java_awt_peer_gtk_GdkGraphics.h" + #include + #include + + #define GDK_STABLE_IS_PIXMAP(d) (GDK_IS_PIXMAP(d)) + + GdkPoint * + translate_points (JNIEnv *env, jintArray xpoints, jintArray ypoints, + jint npoints, jint x_offset, jint y_offset); + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics_copyState + (JNIEnv *env, jobject obj, jobject old) + { + struct graphics *g, *g_old; + + g = (struct graphics *) malloc (sizeof (struct graphics)); + g_old = (struct graphics *) NSA_GET_PTR (env, old); + + *g = *g_old; + + gdk_threads_enter (); + + g->gc = gdk_gc_new (g->drawable); + gdk_gc_copy (g->gc, g_old->gc); + + if (GDK_STABLE_IS_PIXMAP (g->drawable)) + gdk_pixmap_ref (g->drawable); + else /* GDK_IS_WINDOW (g->drawable) */ + gdk_window_ref (g->drawable); + + gdk_colormap_ref (g->cm); + + gdk_threads_leave (); + + NSA_SET_PTR (env, obj, g); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics_initState__II + (JNIEnv *env, jobject obj, jint width, jint height) + { + struct graphics *g; + + g = (struct graphics *) malloc (sizeof (struct graphics)); + g->x_offset = g->y_offset = 0; + + gdk_threads_enter (); + g->drawable = (GdkDrawable *) gdk_pixmap_new (NULL, width, height, + gdk_rgb_get_visual ()->depth); + g->cm = gdk_rgb_get_cmap (); + gdk_colormap_ref (g->cm); + g->gc = gdk_gc_new (g->drawable); + gdk_threads_leave (); + + NSA_SET_PTR (env, obj, g); + } + + /* copy the native state of the peer (GtkWidget *) to the native state + of the graphics object */ + JNIEXPORT jintArray JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics_initState__Lgnu_java_awt_peer_gtk_GtkComponentPeer_2 + (JNIEnv *env, jobject obj, jobject peer) + { + struct graphics *g = (struct graphics *) malloc (sizeof (struct graphics)); + void *ptr; + GtkWidget *widget; + GdkColor color; + jintArray array; + jint *rgb; + + ptr = NSA_GET_PTR (env, peer); + g->x_offset = g->y_offset = 0; + + gdk_threads_enter (); + + widget = GTK_WIDGET (ptr); + + if (GTK_IS_WINDOW (widget)) + { + g->drawable = find_gtk_layout (widget)->bin_window; + } + else if (GTK_IS_LAYOUT (widget)) + { + g->drawable = (GdkDrawable *) GTK_LAYOUT (widget)->bin_window; + } + else + { + g->drawable = (GdkDrawable *) widget->window; + } + + gdk_window_ref (g->drawable); + g->cm = gtk_widget_get_colormap (widget); + gdk_colormap_ref (g->cm); + g->gc = gdk_gc_new (g->drawable); + gdk_gc_copy (g->gc, widget->style->fg_gc[GTK_STATE_NORMAL]); + color = widget->style->fg[GTK_STATE_NORMAL]; + + gdk_threads_leave (); + + array = (*env)->NewIntArray (env, 3); + rgb = (*env)->GetIntArrayElements (env, array, NULL); + rgb[0] = color.red >> 8; + rgb[1] = color.green >> 8; + rgb[2] = color.blue >> 8; + (*env)->ReleaseIntArrayElements (env, array, rgb, 0); + + NSA_SET_PTR (env, obj, g); + + return array; + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics_dispose + (JNIEnv *env, jobject obj) + { + struct graphics *g; + + g = (struct graphics *) NSA_DEL_PTR (env, obj); + + if (!g) return; /* dispose has been called more than once */ + + gdk_threads_enter (); + XFlush (GDK_DISPLAY ()); + + gdk_gc_destroy (g->gc); + + if (GDK_STABLE_IS_PIXMAP (g->drawable)) + gdk_pixmap_unref (g->drawable); + else /* GDK_IS_WINDOW (g->drawable) */ + gdk_window_unref (g->drawable); + + gdk_colormap_unref (g->cm); + + gdk_threads_leave (); + + free (g); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics_translateNative + (JNIEnv *env, jobject obj, jint x, jint y) + { + struct graphics *g; + + g = (struct graphics *) NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + + g->x_offset += x; + g->y_offset += y; + + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics_drawString + (JNIEnv *env, jobject obj, jstring str, jint x, jint y, + jstring fname, jint size) + { + struct graphics *g; + const char *cstr; + const char *font_name; + int baseline_y; + PangoFontDescription *font_desc; + PangoContext *context; + PangoLayout *layout; + PangoLayoutIter *iter; + + g = (struct graphics *) NSA_GET_PTR (env, obj); + + cstr = (*env)->GetStringUTFChars (env, str, NULL); + font_name = (*env)->GetStringUTFChars (env, fname, NULL); + + gdk_threads_enter (); + + font_desc = pango_font_description_from_string (font_name); + pango_font_description_set_size (font_desc, size * PANGO_SCALE); + + context = gdk_pango_context_get(); + pango_context_set_font_description (context, font_desc); + + layout = pango_layout_new (context); + + pango_layout_set_text (layout, cstr, -1); + iter = pango_layout_get_iter (layout); + + baseline_y = pango_layout_iter_get_baseline (iter); + + gdk_draw_layout (g->drawable, g->gc, + x + g->x_offset, y + g->y_offset - (baseline_y / PANGO_SCALE), layout); + + pango_font_description_free (font_desc); + pango_layout_iter_free (iter); + + gdk_threads_leave (); + + (*env)->ReleaseStringUTFChars (env, fname, font_name); + (*env)->ReleaseStringUTFChars (env, str, cstr); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics_drawLine + (JNIEnv *env, jobject obj, jint x, jint y, jint x2, jint y2) + { + struct graphics *g; + + g = (struct graphics *) NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + gdk_draw_line (g->drawable, g->gc, + x + g->x_offset, y + g->y_offset, + x2 + g->x_offset, y2 + g->y_offset); + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics_fillRect + (JNIEnv *env, jobject obj, jint x, jint y, jint width, jint height) + { + struct graphics *g; + + g = (struct graphics *) NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + gdk_draw_rectangle (g->drawable, g->gc, TRUE, + x + g->x_offset, y + g->y_offset, width, height); + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics_drawRect + (JNIEnv *env, jobject obj, jint x, jint y, jint width, jint height) + { + struct graphics *g; + + g = (struct graphics *) NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + gdk_draw_rectangle (g->drawable, g->gc, FALSE, + x + g->x_offset, y + g->y_offset, width, height); + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics_copyArea + (JNIEnv *env, jobject obj, jint x, jint y, + jint width, jint height, jint dx, jint dy) + { + struct graphics *g; + + g = (struct graphics *) NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + gdk_window_copy_area ((GdkWindow *)g->drawable, + g->gc, + x + g->x_offset + dx, y + g->y_offset + dy, + (GdkWindow *)g->drawable, + x + g->x_offset, y + g->y_offset, + width, height); + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics_copyPixmap + (JNIEnv *env, jobject obj, jobject offscreen, + jint x, jint y, jint width, jint height) + { + struct graphics *g1, *g2; + + g1 = (struct graphics *) NSA_GET_PTR (env, obj); + g2 = (struct graphics *) NSA_GET_PTR (env, offscreen); + + gdk_threads_enter (); + gdk_window_copy_area ((GdkWindow *)g1->drawable, + g1->gc, + x + g1->x_offset, y + g1->y_offset, + (GdkWindow *)g2->drawable, + 0 + g2->x_offset, 0 + g2->y_offset, + width, height); + gdk_threads_leave (); + } + + + + + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics_clearRect + (JNIEnv *env, jobject obj, jint x, jint y, jint width, jint height) + { + struct graphics *g; + + g = (struct graphics *) NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + gdk_window_clear_area ((GdkWindow *)g->drawable, + x + g->x_offset, y + g->y_offset, width, height); + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics_setFunction + (JNIEnv *env, jobject obj, jint func) + { + struct graphics *g; + g = (struct graphics *) NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + gdk_gc_set_function (g->gc, func); + gdk_threads_leave (); + } + + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics_setFGColor + (JNIEnv *env, jobject obj, jint red, jint green, jint blue) + { + GdkColor color; + struct graphics *g; + + color.red = red << 8; + color.green = green << 8; + color.blue = blue << 8; + + g = (struct graphics *) NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + gdk_color_alloc (g->cm, &color); + gdk_gc_set_foreground (g->gc, &color); + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics_drawArc + (JNIEnv *env, jobject obj, jint x, jint y, jint width, jint height, + jint angle1, jint angle2) + { + struct graphics *g; + + g = (struct graphics *) NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + gdk_draw_arc (g->drawable, g->gc, FALSE, + x + g->x_offset, y + g->y_offset, + width, height, angle1 << 6, angle2 << 6); + gdk_threads_leave (); + } + + GdkPoint * + translate_points (JNIEnv *env, jintArray xpoints, jintArray ypoints, + jint npoints, jint x_offset, jint y_offset) + { + GdkPoint *points; + jint *x, *y; + int i; + + /* allocate one more point than necessary, in case we need to tack + on an extra due to the semantics of Java polygons. */ + points = g_malloc (sizeof (GdkPoint) * (npoints + 1)); + + x = (*env)->GetIntArrayElements (env, xpoints, NULL); + y = (*env)->GetIntArrayElements (env, ypoints, NULL); + + for (i = 0; i < npoints; i++) + { + points[i].x = x[i] + x_offset; + points[i].y = y[i] + y_offset; + } + + (*env)->ReleaseIntArrayElements (env, xpoints, x, JNI_ABORT); + (*env)->ReleaseIntArrayElements (env, ypoints, y, JNI_ABORT); + + return points; + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics_drawPolyline + (JNIEnv *env, jobject obj, jintArray xpoints, jintArray ypoints, + jint npoints) + { + struct graphics *g; + GdkPoint *points; + + g = (struct graphics *) NSA_GET_PTR (env, obj); + points = translate_points (env, xpoints, ypoints, npoints, + g->x_offset, g->y_offset); + + gdk_threads_enter (); + gdk_draw_lines (g->drawable, g->gc, points, npoints); + gdk_threads_leave (); + + g_free (points); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics_drawPolygon + (JNIEnv *env, jobject obj, jintArray xpoints, jintArray ypoints, + jint npoints) + { + struct graphics *g; + GdkPoint *points; + + g = (struct graphics *) NSA_GET_PTR (env, obj); + points = translate_points (env, xpoints, ypoints, npoints, + g->x_offset, g->y_offset); + + /* make sure the polygon is closed, per Java semantics. + if it's not, we close it. */ + if (points[0].x != points[npoints-1].x || points[0].y != points[npoints-1].y) + points[npoints++] = points[0]; + + gdk_threads_enter (); + gdk_draw_lines (g->drawable, g->gc, points, npoints); + gdk_threads_leave (); + + g_free (points); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics_fillPolygon + (JNIEnv *env, jobject obj, jintArray xpoints, jintArray ypoints, + jint npoints) + { + struct graphics *g; + GdkPoint *points; + + g = (struct graphics *) NSA_GET_PTR (env, obj); + points = translate_points (env, xpoints, ypoints, npoints, + g->x_offset, g->y_offset); + gdk_threads_enter (); + gdk_draw_polygon (g->drawable, g->gc, TRUE, points, npoints); + gdk_threads_leave (); + + g_free (points); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics_fillArc + (JNIEnv *env, jobject obj, jint x, jint y, jint width, jint height, + jint angle1, jint angle2) + { + struct graphics *g; + + g = (struct graphics *) NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + gdk_draw_arc (g->drawable, g->gc, TRUE, + x + g->x_offset, y + g->y_offset, + width, height, angle1 << 6, angle2 << 6); + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics_drawOval + (JNIEnv *env, jobject obj, jint x, jint y, jint width, jint height) + { + struct graphics *g; + + g = (struct graphics *) NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + gdk_draw_arc (g->drawable, g->gc, FALSE, + x + g->x_offset, y + g->y_offset, + width, height, 0, 23040); + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics_fillOval + (JNIEnv *env, jobject obj, jint x, jint y, jint width, jint height) + { + struct graphics *g; + + g = (struct graphics *) NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + gdk_draw_arc (g->drawable, g->gc, TRUE, + x + g->x_offset, y + g->y_offset, + width, height, 0, 23040); + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics_setClipRectangle + (JNIEnv *env, jobject obj, jint x, jint y, jint width, jint height) + { + struct graphics *g; + GdkRectangle rectangle; + + g = (struct graphics *) NSA_GET_PTR (env, obj); + + rectangle.x = x + g->x_offset; + rectangle.y = y + g->y_offset; + rectangle.width = width; + rectangle.height = height; + + gdk_threads_enter (); + gdk_gc_set_clip_rectangle (g->gc, &rectangle); + gdk_threads_leave (); + } diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c 2003-12-01 18:05:32.000000000 +0000 *************** *** 0 **** --- 1,236 ---- + /* gdkpixbufdecoder.c + Copyright (C) 1999, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #include + #include + #include + + #include "gtkpeer.h" + #include "gnu_java_awt_peer_gtk_GdkPixbufDecoder.h" + + struct state_table *native_pixbufdecoder_state_table; + + #define NSA_PB_INIT(env, clazz) \ + native_pixbufdecoder_state_table = init_state_table (env, clazz) + + #define NSA_GET_PB_PTR(env, obj) \ + get_state (env, obj, native_pixbufdecoder_state_table) + + #define NSA_SET_PB_PTR(env, obj, ptr) \ + set_state (env, obj, native_pixbufdecoder_state_table, (void *)ptr) + + #define NSA_DEL_PB_PTR(env, obj) \ + remove_state_slot (env, obj, native_pixbufdecoder_state_table) + + + jmethodID areaPreparedID; + jmethodID areaUpdatedID; + + static void + area_prepared (GdkPixbufLoader *loader, + jobject *decoder) + { + jint width, height; + + GdkPixbuf *pixbuf = gdk_pixbuf_loader_get_pixbuf (loader); + if (pixbuf == NULL) + return; + + width = gdk_pixbuf_get_width (pixbuf); + height = gdk_pixbuf_get_height (pixbuf), + + gdk_threads_leave (); + + g_assert (decoder != NULL); + + (*gdk_env)->CallVoidMethod (gdk_env, + *decoder, + areaPreparedID, + width, height); + + gdk_threads_enter (); + } + + static void + area_updated (GdkPixbufLoader *loader, + gint x, gint y, + gint width, gint height, + jobject *decoder) + { + jint stride_bytes, stride_pixels, n_channels, n_pixels; + int i, px; + jintArray jpixels; + jint *java_pixels; + guchar *gdk_pixels; + + GdkPixbuf *pixbuf_no_alpha = NULL; + GdkPixbuf *pixbuf = NULL; + + pixbuf_no_alpha = gdk_pixbuf_loader_get_pixbuf (loader); + if (pixbuf_no_alpha == NULL) + return; + + pixbuf = gdk_pixbuf_add_alpha(pixbuf_no_alpha, FALSE, 0, 0, 0); + g_assert (gdk_pixbuf_get_has_alpha (pixbuf)); + + stride_bytes = gdk_pixbuf_get_rowstride (pixbuf); + n_channels = gdk_pixbuf_get_n_channels (pixbuf); + stride_pixels = stride_bytes / n_channels; + n_pixels = height * stride_pixels; + gdk_pixels = gdk_pixbuf_get_pixels (pixbuf); + + jpixels = (*gdk_env)->NewIntArray (gdk_env, n_pixels); + java_pixels = (*gdk_env)->GetIntArrayElements (gdk_env, jpixels, NULL); + + memcpy (java_pixels, + gdk_pixels + (y * stride_bytes), + (height * stride_bytes)); + + for (i = 0; i < n_pixels; ++i) + { + px = java_pixels[i]; + + /* move alpha around (GdkPixbufLoader results are AGBR not GBRA, in + the lsb sense) */ + /* px = ((px >> 24) & 0xff) | ((px << 8) & 0xffffff00); */ + + /* it appears to require a full byte swap, now, not just a shift to + the A channel. why did this change? don't know. */ + px = ((px >> 8) & 0x00ff00ff) | ((px << 8) & 0xff00ff00); + px = ((px >> 16) & 0x0000ffff) | ((px << 16) & 0xffff0000); + + java_pixels[i] = px; + } + + g_object_unref (pixbuf); + + gdk_threads_leave (); + + (*gdk_env)->ReleaseIntArrayElements (gdk_env, jpixels, java_pixels, 0); + (*gdk_env)->CallVoidMethod (gdk_env, + *decoder, + areaUpdatedID, + (jint) x, (jint) y, + (jint) width, (jint) height, + jpixels, + stride_pixels); + gdk_threads_enter (); + } + + static void + closed (GdkPixbufLoader *loader __attribute__((unused)), jobject *decoder) + { + gdk_threads_leave (); + (*gdk_env)->DeleteGlobalRef (gdk_env, *decoder); + free (decoder); + gdk_threads_enter (); + } + + + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkPixbufDecoder_initState + (JNIEnv *env, jobject obj) + { + GdkPixbufLoader *loader = NULL; + jobject *decoder = NULL; + + decoder = (jobject *) malloc (sizeof (jobject)); + g_assert (decoder != NULL); + *decoder = (*env)->NewGlobalRef (env, obj); + + gdk_threads_enter (); + loader = gdk_pixbuf_loader_new (); + g_assert (loader != NULL); + g_signal_connect (loader, "area-prepared", G_CALLBACK (area_prepared), decoder); + g_signal_connect (loader, "area-updated", G_CALLBACK (area_updated), decoder); + g_signal_connect (loader, "closed", G_CALLBACK (closed), decoder); + gdk_threads_leave (); + + NSA_SET_PB_PTR (env, obj, loader); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkPixbufDecoder_initStaticState + (JNIEnv *env, jclass clazz) + { + areaPreparedID = (*env)->GetMethodID (env, clazz, + "areaPrepared", + "(II)V"); + + areaUpdatedID = (*env)->GetMethodID (env, clazz, + "areaUpdated", + "(IIII[II)V"); + NSA_PB_INIT (env, clazz); + } + + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkPixbufDecoder_finish + (JNIEnv *env, jobject obj) + { + GdkPixbufLoader *loader = NULL; + + loader = (GdkPixbufLoader *)NSA_DEL_PB_PTR (env, obj); + if (loader == NULL) + return; + + gdk_threads_enter (); + gdk_pixbuf_loader_close (loader, NULL); + g_object_unref (loader); + gdk_threads_leave (); + } + + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkPixbufDecoder_pumpBytes + (JNIEnv *env, jobject obj, jbyteArray jarr, jint len) + { + GdkPixbufLoader *loader = NULL; + jbyte *bytes = NULL; + + if (len < 1) + return; + + bytes = (*gdk_env)->GetByteArrayElements (gdk_env, jarr, NULL); + g_assert (bytes != NULL); + loader = (GdkPixbufLoader *)NSA_GET_PB_PTR (env, obj); + g_assert (loader != NULL); + + gdk_threads_enter (); + gdk_pixbuf_loader_write (loader, bytes, len, NULL); + gdk_threads_leave (); + + (*gdk_env)->ReleaseByteArrayElements (gdk_env, jarr, bytes, 0); + } diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c 2003-12-13 01:15:47.000000000 +0000 *************** *** 0 **** --- 1,156 ---- + /* gtkbuttonpeer.c -- Native implementation of GtkButtonPeer + Copyright (C) 1998, 1999 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #include "gtkpeer.h" + #include "gnu_java_awt_peer_gtk_GtkComponentPeer.h" + #include "gnu_java_awt_peer_gtk_GtkButtonPeer.h" + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkButtonPeer_create + (JNIEnv *env, jobject obj) + { + GtkWidget *button; + + /* Create global reference and save it for future use */ + NSA_SET_GLOBAL_REF (env, obj); + + gdk_threads_enter (); + + button = gtk_button_new(); + gtk_widget_show (button); + + gdk_threads_leave (); + + NSA_SET_PTR (env, obj, button); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkButtonPeer_connectJObject + (JNIEnv *env, jobject obj) + { + void *ptr; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + + gtk_widget_realize (GTK_WIDGET (ptr)); + + connect_awt_hook (env, obj, 1, GTK_BUTTON(ptr)->event_window); + + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkButtonPeer_connectSignals + (JNIEnv *env, jobject obj) + { + /* FIXME: Do we need to connect any signals here? Otherwise just do not + override parent method. */ + + /* Connect the superclass signals. */ + Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals (env, obj); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkButtonPeer_gtkSetFont + (JNIEnv *env, jobject obj, jstring name, jint style, jint size) + { + const char *font_name; + void *ptr; + GtkWidget *button; + GtkWidget *label; + PangoFontDescription *font_desc; + + ptr = NSA_GET_PTR (env, obj); + + button = GTK_WIDGET (ptr); + label = gtk_bin_get_child (GTK_BIN(button)); + + if (!label) + return; + + font_name = (*env)->GetStringUTFChars (env, name, NULL); + + gdk_threads_enter(); + + font_desc = pango_font_description_from_string (font_name); + pango_font_description_set_size (font_desc, size * PANGO_SCALE); + + if (style & AWT_STYLE_BOLD) + pango_font_description_set_weight (font_desc, PANGO_WEIGHT_BOLD); + + if (style & AWT_STYLE_ITALIC) + pango_font_description_set_style (font_desc, PANGO_STYLE_OBLIQUE); + + gtk_widget_modify_font (GTK_WIDGET(label), font_desc); + + pango_font_description_free (font_desc); + + gdk_threads_leave(); + + (*env)->ReleaseStringUTFChars (env, name, font_name); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkButtonPeer_gtkWidgetSetForeground + (JNIEnv *env, jobject obj, jint red, jint green, jint blue) + { + GdkColor color; + GtkWidget *label; + void *ptr; + + ptr = NSA_GET_PTR (env, obj); + + color.red = (red / 255.0) * 65535; + color.green = (green / 255.0) * 65535; + color.blue = (blue / 255.0) * 65535; + + gdk_threads_enter (); + + label = gtk_bin_get_child (GTK_BIN(ptr)); + + if (!label) + return; + + gtk_widget_modify_fg (label, GTK_STATE_NORMAL, &color); + gtk_widget_modify_fg (label, GTK_STATE_ACTIVE, &color); + gtk_widget_modify_fg (label, GTK_STATE_PRELIGHT, &color); + + gdk_threads_leave (); + } diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCanvasPeer.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCanvasPeer.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCanvasPeer.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCanvasPeer.c 2003-12-13 01:15:47.000000000 +0000 *************** *** 0 **** --- 1,59 ---- + /* gtkcanvaspeer.c -- Native implementation of GtkCanvasPeer + Copyright (C) 1999 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #include "gtkpeer.h" + #include "gnu_java_awt_peer_gtk_GtkCanvasPeer.h" + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkCanvasPeer_create + (JNIEnv *env, jobject obj) + { + gpointer widget; + + /* Create global reference and save it for future use */ + NSA_SET_GLOBAL_REF (env, obj); + + gdk_threads_enter (); + + widget = gtk_type_new (gtk_drawing_area_get_type ()); + + gdk_threads_leave (); + + NSA_SET_PTR (env, obj, widget); + } + + diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer.c 2003-12-13 01:15:47.000000000 +0000 *************** *** 0 **** --- 1,78 ---- + /* gtkmenuitempeer.c -- Native implementation of GtkMenuItemPeer + Copyright (C) 1999 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #include "gtkpeer.h" + #include "gnu_java_awt_peer_gtk_GtkMenuItemPeer.h" + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer_create + (JNIEnv *env, jobject obj, jstring label) + { + GtkWidget *widget; + const char *str; + + /* Create global reference and save it for future use */ + NSA_SET_GLOBAL_REF (env, obj); + + str = (*env)->GetStringUTFChars (env, label, NULL); + + gdk_threads_enter (); + + widget = gtk_check_menu_item_new_with_label (str); + gtk_check_menu_item_set_show_toggle (GTK_CHECK_MENU_ITEM (widget), 1); + gtk_widget_show (widget); + + gdk_threads_leave (); + + (*env)->ReleaseStringUTFChars (env, label, str); + + NSA_SET_PTR (env, obj, widget); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer_setState + (JNIEnv *env, jobject obj, jboolean state) + { + void *ptr; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (ptr), state); + gdk_threads_leave (); + } diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c 2003-12-13 01:15:47.000000000 +0000 *************** *** 0 **** --- 1,177 ---- + /* gtkcheckboxpeer.c -- Native implementation of GtkCheckboxPeer + Copyright (C) 1998, 1999, 2002, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #include "gtkpeer.h" + #include "gnu_java_awt_peer_gtk_GtkCheckboxPeer.h" + #include "gnu_java_awt_peer_gtk_GtkComponentPeer.h" + + static void item_toggled (GtkToggleButton *item, jobject peer); + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkCheckboxGroupPeer_dispose + (JNIEnv *env, jobject obj) + { + /* The actual underlying widget is owned by a different class. So + we just clean up the hash table here. */ + NSA_DEL_PTR (env, obj); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkCheckboxGroupPeer_remove + (JNIEnv *env, jobject obj, jobject checkbox) + { + GtkRadioButton *button; + void *ptr; + GSList *list; + + ptr = NSA_GET_PTR (env, checkbox); + gdk_threads_enter (); + button = GTK_RADIO_BUTTON (ptr); + + /* Update the group to point to some other widget in the group. We + have to do this because Gtk doesn't have a separate object to + represent a radio button's group. */ + for (list = gtk_radio_button_group (button); list != NULL; + list = list->next) + { + if (list->data != button) + break; + } + + gdk_threads_leave (); + + NSA_SET_PTR (env, obj, list ? list->data : NULL); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_nativeCreate + (JNIEnv *env, jobject obj, jobject group, jboolean state) + { + GtkWidget *button; + + /* Create global reference and save it for future use */ + NSA_SET_GLOBAL_REF (env, obj); + + gdk_threads_enter (); + + if (group == NULL) + button = gtk_check_button_new_with_label (""); + else + { + void *native_group = NSA_GET_PTR (env, group); + button = gtk_radio_button_new_with_label_from_widget (native_group, ""); + if (native_group == NULL) + { + /* Set the native group so we can use the correct value the + next time around. FIXME: this doesn't work! */ + NSA_SET_PTR (env, group, button); + } + } + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), state); + + gdk_threads_leave (); + + NSA_SET_PTR (env, obj, button); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_connectSignals + (JNIEnv *env, jobject obj) + { + void *ptr = NSA_GET_PTR (env, obj); + jobject *gref = NSA_GET_GLOBAL_REF (env, obj); + g_assert (gref); + + gdk_threads_enter (); + + g_signal_connect (G_OBJECT (ptr), "toggled", + GTK_SIGNAL_FUNC (item_toggled), *gref); + + gdk_threads_leave (); + + /* Connect the superclass signals. */ + Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals (env, obj); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_nativeSetCheckboxGroup + (JNIEnv *env, jobject obj, jobject group) + { + GtkRadioButton *button; + void *native_group, *ptr; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + + /* FIXME: we can't yet switch between a checkbutton and a + radiobutton. However, AWT requires this. For now we just + crash. */ + + button = GTK_RADIO_BUTTON (ptr); + + native_group = NSA_GET_PTR (env, group); + if (native_group == NULL) + gtk_radio_button_set_group (button, NULL); + else + gtk_radio_button_set_group (button, + gtk_radio_button_group + (GTK_RADIO_BUTTON (native_group))); + + gdk_threads_leave (); + + /* If the native group wasn't set on the new CheckboxGroup, then set + it now so that the right thing will happen with the next + radiobutton. The native state for a CheckboxGroup is a pointer + to one of the widgets in the group. We are careful to keep this + always pointing at a live widget; whenever a widget is destroyed + (or otherwise removed from the group), the CheckboxGroup peer is + notified. */ + if (native_group == NULL) + NSA_SET_PTR (env, group, native_group); + } + + static void + item_toggled (GtkToggleButton *item, jobject peer) + { + //g_print ("toggled\n"); + (*gdk_env)->CallVoidMethod (gdk_env, peer, + postItemEventID, + peer, + item->active ? + (jint) AWT_ITEM_SELECTED : + (jint) AWT_ITEM_DESELECTED); + } diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c 2004-01-05 21:18:06.000000000 +0000 *************** *** 0 **** --- 1,293 ---- + /* gtkchoicepeer.c -- Native implementation of GtkChoicePeer + Copyright (C) 1998, 1999 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #include "gtkpeer.h" + #include "gnu_java_awt_peer_gtk_GtkChoicePeer.h" + + static void connect_choice_item_selectable_hook (JNIEnv *env, + jobject peer_obj, + GtkItem *menuitem, + const char *label); + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkChoicePeer_create + (JNIEnv *env, jobject obj) + { + GtkWidget *menu; + GtkOptionMenu *option_menu; + GtkRequisition child_requisition; + + /* Create global reference and save it for future use */ + NSA_SET_GLOBAL_REF (env, obj); + + gdk_threads_enter (); + + option_menu = GTK_OPTION_MENU (gtk_option_menu_new ()); + menu = gtk_menu_new (); + gtk_widget_show (menu); + + gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu), menu); + + gtk_widget_size_request (gtk_menu_item_new_with_label (""), + &child_requisition); + option_menu->width = child_requisition.width; + option_menu->height = child_requisition.height; + + gdk_threads_leave (); + + NSA_SET_PTR (env, obj, option_menu); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkChoicePeer_append + (JNIEnv *env, jobject obj, jobjectArray items) + { + gpointer ptr; + GtkMenu *menu; + jsize count, i; + int need_set_history = 0; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + + menu = GTK_MENU (gtk_option_menu_get_menu (GTK_OPTION_MENU (ptr))); + + /* Are we adding the first element? */ + if (gtk_option_menu_get_history (GTK_OPTION_MENU (ptr)) < 0) + need_set_history = 1; + + count = (*env)->GetArrayLength (env, items); + + for (i = 0; i < count; i++) + { + jobject item; + const char *label; + GtkWidget *menuitem; + + item = (*env)->GetObjectArrayElement (env, items, i); + label = (*env)->GetStringUTFChars (env, item, NULL); + + menuitem = gtk_menu_item_new_with_label (label); + gtk_menu_append (menu, menuitem); + gtk_widget_show (menuitem); + + connect_choice_item_selectable_hook (env, obj, + GTK_ITEM (menuitem), label); + + (*env)->ReleaseStringUTFChars (env, item, label); + } + + /* If we just added the first element select it. */ + if (need_set_history) + gtk_option_menu_set_history (GTK_OPTION_MENU (ptr), 0); + + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkChoicePeer_nativeAdd + (JNIEnv *env, jobject obj, jstring item, jint index) + { + void *ptr; + const char *label; + GtkWidget *menu, *menuitem; + int current; + int need_set_history = 0; + + ptr = NSA_GET_PTR (env, obj); + + label = (*env)->GetStringUTFChars (env, item, 0); + + gdk_threads_enter (); + + current = gtk_option_menu_get_history (GTK_OPTION_MENU (ptr)); + + /* Are we adding the first element or below or at the currently + selected one? */ + if ((current < 0) || (current >= index)) + need_set_history = 1; + + menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (ptr)); + menuitem = gtk_menu_item_new_with_label (label); + gtk_menu_insert (GTK_MENU (menu), menuitem, index); + gtk_widget_show (menuitem); + + connect_choice_item_selectable_hook (env, obj, GTK_ITEM (menuitem), label); + + /* If we just added the first element select it. + If we added at of below the currently selected position make + the first item the selected one. */ + if (need_set_history) + gtk_option_menu_set_history (GTK_OPTION_MENU (ptr), 0); + + gdk_threads_leave (); + + (*env)->ReleaseStringUTFChars (env, item, label); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkChoicePeer_nativeRemove + (JNIEnv *env, jobject obj, jint index) + { + void *ptr; + GtkContainer *menu; + GtkWidget *menuitem; + GList *children; + int need_set_history = 0; + int i, from, to; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + + menu = GTK_CONTAINER (gtk_option_menu_get_menu (GTK_OPTION_MENU (ptr))); + children = gtk_container_children (menu); + + if (index == -1) + { + /* Remove all elements (removeAll) */ + from = g_list_length (children) - 1; + to = 0; + + /* Select the first item to prevent spurious activate signals */ + gtk_option_menu_set_history (GTK_OPTION_MENU (ptr), 0); + } + else + { + /* Remove the specific index element */ + from = index; + to = index; + + /* Are we removing the currently selected element? */ + if (gtk_option_menu_get_history (GTK_OPTION_MENU (ptr)) == index) + need_set_history = 1; + } + + for (i = from; i >= to; i--) + { + menuitem = GTK_WIDGET (g_list_nth (children, i)->data); + gtk_container_remove (menu, menuitem); + gtk_widget_destroy (menuitem); + } + + /* If we just removed the currently selected element and there are + still elements left in the list, make the first item the selected one. */ + if (need_set_history && gtk_container_children (menu)) + gtk_option_menu_set_history (GTK_OPTION_MENU (ptr), 0); + + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkChoicePeer_select + (JNIEnv *env, jobject obj, jint index) + { + void *ptr; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + gtk_option_menu_set_history (GTK_OPTION_MENU (ptr), index); + gdk_threads_leave (); + } + + JNIEXPORT jint JNICALL + Java_gnu_java_awt_peer_gtk_GtkChoicePeer_getHistory + (JNIEnv *env, jobject obj) + { + void *ptr; + int index; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + + index = gtk_option_menu_get_history (GTK_OPTION_MENU (ptr)); + + gdk_threads_leave (); + + return index; + } + + static void + item_activate (GtkItem *item __attribute__((unused)), + struct item_event_hook_info *ie) + { + gdk_threads_leave (); + + jstring label = (*gdk_env)->NewStringUTF (gdk_env, ie->label); + (*gdk_env)->CallVoidMethod (gdk_env, ie->peer_obj, + choicePostItemEventID, + label, + (jint) AWT_ITEM_SELECTED); + gdk_threads_enter (); + } + + static void + item_removed (gpointer data, + GClosure gc __attribute__((unused))) + { + struct item_event_hook_info *ie = data; + + free ((void *) ie->label); + free (ie); + } + + static void + connect_choice_item_selectable_hook (JNIEnv *env, + jobject peer_obj, + GtkItem *menuitem, + const char *label) + { + struct item_event_hook_info *ie; + jobject *peer_objGlobPtr; + + ie = (struct item_event_hook_info *) + malloc (sizeof (struct item_event_hook_info)); + + peer_objGlobPtr = NSA_GET_GLOBAL_REF (env, peer_obj); + g_assert (peer_objGlobPtr); + + ie->peer_obj = *peer_objGlobPtr; + ie->label = strdup (label); + + g_signal_connect_data (G_OBJECT (menuitem), "activate", + GTK_SIGNAL_FUNC (item_activate), ie, + (GClosureNotify) item_removed, 0); + } diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c 2003-12-11 13:50:51.000000000 +0000 *************** *** 0 **** --- 1,183 ---- + /* gtkclipboard.c + Copyright (C) 1998, 1999 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #include "gtkpeer.h" + #include "gnu_java_awt_peer_gtk_GtkClipboard.h" + + jmethodID stringSelectionReceivedID; + jmethodID stringSelectionHandlerID; + jmethodID selectionClearID; + + void selection_received (GtkWidget *, GtkSelectionData *, guint, gpointer); + void selection_get (GtkWidget *, GtkSelectionData *, guint, guint, gpointer); + gint selection_clear (GtkWidget *, GdkEventSelection *); + + GtkWidget *clipboard; + jobject cb_obj; + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkClipboard_initNativeState (JNIEnv *env, + jobject obj) + { + if (!stringSelectionReceivedID) + { + jclass gtkclipboard; + + gtkclipboard = (*env)->FindClass (env, + "gnu/java/awt/peer/gtk/GtkClipboard"); + stringSelectionReceivedID = (*env)->GetMethodID (env, gtkclipboard, + "stringSelectionReceived", + "(Ljava/lang/String;)V"); + stringSelectionHandlerID = (*env)->GetMethodID (env, gtkclipboard, + "stringSelectionHandler", + "()Ljava/lang/String;"); + selectionClearID = (*env)->GetMethodID (env, gtkclipboard, + "selectionClear", "()V"); + } + + cb_obj = (*env)->NewGlobalRef (env, obj); + + gdk_threads_enter (); + clipboard = gtk_window_new (GTK_WINDOW_TOPLEVEL); + + g_signal_connect (G_OBJECT(clipboard), "selection_received", + GTK_SIGNAL_FUNC (selection_received), NULL); + + g_signal_connect (G_OBJECT(clipboard), "selection_clear_event", + GTK_SIGNAL_FUNC (selection_clear), NULL); + + gtk_selection_add_target (clipboard, GDK_SELECTION_PRIMARY, + GDK_TARGET_STRING, 0); + + g_signal_connect (G_OBJECT(clipboard), "selection_get", + GTK_SIGNAL_FUNC (selection_get), NULL); + + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkClipboard_requestStringConversion + (JNIEnv *env __attribute__((unused)), jclass clazz __attribute__((unused))) + { + gdk_threads_enter (); + gtk_selection_convert (clipboard, GDK_SELECTION_PRIMARY, + GDK_TARGET_STRING, GDK_CURRENT_TIME); + gdk_threads_leave (); + } + + void + selection_received (GtkWidget *widget __attribute__((unused)), + GtkSelectionData *selection_data __attribute__((unused)), + guint time __attribute__((unused)), + gpointer data __attribute__((unused))) + { + /* Check to see if retrieval succeeded */ + if (selection_data->length < 0 + || selection_data->type != GDK_SELECTION_TYPE_STRING) + { + (*gdk_env)->CallVoidMethod (gdk_env, cb_obj, stringSelectionReceivedID, + NULL); + } + else + { + char *str = (char *) selection_data->data; + + (*gdk_env)->CallVoidMethod (gdk_env, cb_obj, stringSelectionReceivedID, + (*gdk_env)->NewStringUTF (gdk_env, str)); + } + + return; + } + + void + selection_get (GtkWidget *widget __attribute__((unused)), + GtkSelectionData *selection_data, + guint info __attribute__((unused)), + guint time __attribute__((unused)), + gpointer data __attribute__((unused))) + { + jstring jstr; + const char *utf; + jsize utflen; + + jstr = (*gdk_env)->CallObjectMethod (gdk_env, cb_obj, + stringSelectionHandlerID); + + if (!jstr) + { + gtk_selection_data_set (selection_data, + GDK_TARGET_STRING, 8, NULL, 0); + return; + } + + utflen = (*gdk_env)->GetStringUTFLength (gdk_env, jstr); + utf = (*gdk_env)->GetStringUTFChars (gdk_env, jstr, NULL); + + gtk_selection_data_set (selection_data, GDK_TARGET_STRING, 8, + (char *)utf, utflen); + + (*gdk_env)->ReleaseStringUTFChars (gdk_env, jstr, utf); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkClipboard_selectionGet + (JNIEnv *env, jclass clazz __attribute__((unused))) + { + GdkWindow *owner; + + gdk_threads_enter (); + + /* if we already own the clipboard, we need to tell the old data object + that we're no longer going to be using him */ + owner = gdk_selection_owner_get (GDK_SELECTION_PRIMARY); + if (owner && owner == clipboard->window) + (*env)->CallVoidMethod (env, cb_obj, selectionClearID); + + gtk_selection_owner_set (clipboard, GDK_SELECTION_PRIMARY, GDK_CURRENT_TIME); + + gdk_threads_leave (); + } + + gint + selection_clear (GtkWidget *widget __attribute__((unused)), + GdkEventSelection *event __attribute__((unused))) + { + (*gdk_env)->CallVoidMethod (gdk_env, cb_obj, selectionClearID); + + return TRUE; + } diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c 2004-01-05 21:13:46.000000000 +0000 *************** *** 0 **** --- 1,653 ---- + /* gtkcomponentpeer.c -- Native implementation of GtkComponentPeer + Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #include "gtkpeer.h" + #include "gnu_java_awt_peer_gtk_GtkComponentPeer.h" + #include + + static GtkWidget *find_fg_color_widget (GtkWidget *widget); + static GtkWidget *find_bg_color_widget (GtkWidget *widget); + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkGenericPeer_dispose + (JNIEnv *env, jobject obj) + { + void *ptr; + + /* Remove entries from state tables */ + NSA_DEL_GLOBAL_REF (env, obj); + ptr = NSA_DEL_PTR (env, obj); + + gdk_threads_enter (); + + /* For now the native state for any object must be a widget. + However, a subclass could override dispose() if required. */ + gtk_widget_destroy (GTK_WIDGET (ptr)); + + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetSetCursor + (JNIEnv *env, jobject obj, jint type) + { + void *ptr; + GtkWidget *widget; + GdkCursorType gdk_cursor_type; + GdkCursor *gdk_cursor; + + ptr = NSA_GET_PTR (env, obj); + + switch (type) + { + case AWT_CROSSHAIR_CURSOR: + gdk_cursor_type = GDK_CROSSHAIR; + break; + case AWT_TEXT_CURSOR: + gdk_cursor_type = GDK_XTERM; + break; + case AWT_WAIT_CURSOR: + gdk_cursor_type = GDK_WATCH; + break; + case AWT_SW_RESIZE_CURSOR: + gdk_cursor_type = GDK_BOTTOM_LEFT_CORNER; + break; + case AWT_SE_RESIZE_CURSOR: + gdk_cursor_type = GDK_BOTTOM_RIGHT_CORNER; + break; + case AWT_NW_RESIZE_CURSOR: + gdk_cursor_type = GDK_TOP_LEFT_CORNER; + break; + case AWT_NE_RESIZE_CURSOR: + gdk_cursor_type = GDK_TOP_RIGHT_CORNER; + break; + case AWT_N_RESIZE_CURSOR: + gdk_cursor_type = GDK_TOP_SIDE; + break; + case AWT_S_RESIZE_CURSOR: + gdk_cursor_type = GDK_BOTTOM_SIDE; + break; + case AWT_W_RESIZE_CURSOR: + gdk_cursor_type = GDK_LEFT_SIDE; + break; + case AWT_E_RESIZE_CURSOR: + gdk_cursor_type = GDK_RIGHT_SIDE; + break; + case AWT_HAND_CURSOR: + gdk_cursor_type = GDK_HAND2; + break; + case AWT_MOVE_CURSOR: + gdk_cursor_type = GDK_FLEUR; + break; + default: + gdk_cursor_type = GDK_LEFT_PTR; + } + + gdk_threads_enter (); + + widget = GTK_WIDGET(ptr); + + gdk_cursor = gdk_cursor_new (gdk_cursor_type); + gdk_window_set_cursor (widget->window, gdk_cursor); + gdk_cursor_destroy (gdk_cursor); + + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkComponentPeer_requestFocus + (JNIEnv *env, jobject obj) + { + void *ptr; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + gtk_widget_grab_focus (GTK_WIDGET (ptr)); + gdk_threads_leave (); + } + + /* + * Find the origin of a widget's window. + */ + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetGetLocationOnScreen + (JNIEnv * env, jobject obj, jintArray jpoint) + { + void *ptr; + jint *point; + + ptr = NSA_GET_PTR (env, obj); + point = (*env)->GetIntArrayElements (env, jpoint, 0); + + gdk_threads_enter (); + + gdk_window_get_origin (GTK_WIDGET (ptr)->window, point, point+1); + + if (!GTK_IS_CONTAINER (ptr)) + { + *point += GTK_WIDGET(ptr)->allocation.x; + *(point+1) += GTK_WIDGET(ptr)->allocation.y; + } + + gdk_threads_leave (); + + (*env)->ReleaseIntArrayElements(env, jpoint, point, 0); + } + + /* + * Find this widget's current size. + */ + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetGetDimensions + (JNIEnv *env, jobject obj, jintArray jdims) + { + void *ptr; + jint *dims; + GtkRequisition requisition; + + ptr = NSA_GET_PTR (env, obj); + + dims = (*env)->GetIntArrayElements (env, jdims, 0); + dims[0] = dims[1] = 0; + + gdk_threads_enter (); + + gtk_widget_size_request (GTK_WIDGET (ptr), &requisition); + + dims[0] = requisition.width; + dims[1] = requisition.height; + + gdk_threads_leave (); + + (*env)->ReleaseIntArrayElements (env, jdims, dims, 0); + } + + /* + * Find this widget's preferred size. + */ + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetGetPreferredDimensions + (JNIEnv *env, jobject obj, jintArray jdims) + { + void *ptr; + jint *dims; + GtkRequisition current_req; + GtkRequisition natural_req; + + ptr = NSA_GET_PTR (env, obj); + + dims = (*env)->GetIntArrayElements (env, jdims, 0); + dims[0] = dims[1] = 0; + + gdk_threads_enter (); + + /* Save the widget's current size request. */ + gtk_widget_size_request (GTK_WIDGET (ptr), ¤t_req); + + /* Get the widget's "natural" size request. */ + gtk_widget_set_size_request (GTK_WIDGET (ptr), -1, -1); + gtk_widget_size_request (GTK_WIDGET (ptr), &natural_req); + + /* Reset the widget's size request. */ + gtk_widget_set_size_request (GTK_WIDGET (ptr), + current_req.width, current_req.height); + + dims[0] = natural_req.width; + dims[1] = natural_req.height; + + gdk_threads_leave (); + + (*env)->ReleaseIntArrayElements (env, jdims, dims, 0); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetSetUsize (JNIEnv *env, + jobject obj, jint w, jint h) + { + void *ptr; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + gtk_widget_set_usize (GTK_WIDGET (ptr), w, h); + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkComponentPeer_setNativeBounds + (JNIEnv *env, jobject obj, jint x, jint y, jint width, jint height) + { + GtkWidget *widget; + void *ptr; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + + widget = GTK_WIDGET (ptr); + if (GTK_IS_VIEWPORT (widget->parent)) + { + gtk_widget_set_usize (widget, width, height); + } + else + { + gtk_widget_set_usize (widget, width, height); + gtk_layout_move (GTK_LAYOUT (widget->parent), widget, x, y); + } + + gdk_threads_leave (); + } + + JNIEXPORT jintArray JNICALL + Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetGetBackground + (JNIEnv *env, jobject obj) + { + void *ptr; + jintArray array; + int *rgb; + GdkColor bg; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + bg = GTK_WIDGET (ptr)->style->bg[GTK_STATE_NORMAL]; + gdk_threads_leave (); + + array = (*env)->NewIntArray (env, 3); + rgb = (*env)->GetIntArrayElements (env, array, NULL); + /* convert color data from 16 bit values down to 8 bit values */ + rgb[0] = bg.red >> 8; + rgb[1] = bg.green >> 8; + rgb[2] = bg.blue >> 8; + (*env)->ReleaseIntArrayElements (env, array, rgb, 0); + + return array; + } + + JNIEXPORT jintArray JNICALL + Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetGetForeground + (JNIEnv *env, jobject obj) + { + void *ptr; + jintArray array; + jint *rgb; + GdkColor fg; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + fg = GTK_WIDGET (ptr)->style->fg[GTK_STATE_NORMAL]; + gdk_threads_leave (); + + array = (*env)->NewIntArray (env, 3); + rgb = (*env)->GetIntArrayElements (env, array, NULL); + /* convert color data from 16 bit values down to 8 bit values */ + rgb[0] = fg.red >> 8; + rgb[1] = fg.green >> 8; + rgb[2] = fg.blue >> 8; + (*env)->ReleaseIntArrayElements (env, array, rgb, 0); + + return array; + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetSetBackground + (JNIEnv *env, jobject obj, jint red, jint green, jint blue) + { + GdkColor normal_color; + GdkColor active_color; + GtkWidget *widget; + void *ptr; + + ptr = NSA_GET_PTR (env, obj); + + normal_color.red = (red / 255.0) * 65535; + normal_color.green = (green / 255.0) * 65535; + normal_color.blue = (blue / 255.0) * 65535; + + /* This calculation only approximates the active colors produced by + Sun's AWT. */ + active_color.red = 0.85 * (red / 255.0) * 65535; + active_color.green = 0.85 * (green / 255.0) * 65535; + active_color.blue = 0.85 * (blue / 255.0) * 65535; + + gdk_threads_enter (); + + widget = find_bg_color_widget (GTK_WIDGET (ptr)); + + gtk_widget_modify_bg (widget, GTK_STATE_NORMAL, &normal_color); + gtk_widget_modify_bg (widget, GTK_STATE_ACTIVE, &active_color); + gtk_widget_modify_bg (widget, GTK_STATE_PRELIGHT, &normal_color); + + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetSetForeground + (JNIEnv *env, jobject obj, jint red, jint green, jint blue) + { + GdkColor color; + GtkWidget *widget; + void *ptr; + + ptr = NSA_GET_PTR (env, obj); + + color.red = (red / 255.0) * 65535; + color.green = (green / 255.0) * 65535; + color.blue = (blue / 255.0) * 65535; + + gdk_threads_enter (); + + widget = find_fg_color_widget (GTK_WIDGET (ptr)); + + gtk_widget_modify_fg (widget, GTK_STATE_NORMAL, &color); + gtk_widget_modify_fg (widget, GTK_STATE_ACTIVE, &color); + gtk_widget_modify_fg (widget, GTK_STATE_PRELIGHT, &color); + + gdk_threads_leave (); + } + + void + set_visible (GtkWidget *widget, jboolean visible) + { + if (visible) + gtk_widget_show (widget); + else + gtk_widget_hide (widget); + } + + GtkLayout * + find_gtk_layout (GtkWidget *parent) + { + if (GTK_IS_WINDOW (parent)) + { + GList *children = gtk_container_children + (GTK_CONTAINER (GTK_BIN (parent)->child)); + + if (GTK_IS_MENU_BAR (children->data)) + return GTK_LAYOUT (children->next->data); + else /* GTK_IS_LAYOUT (children->data) */ + return GTK_LAYOUT (children->data); + } + + return NULL; + } + + #define WIDGET_CLASS(w) GTK_WIDGET_CLASS (GTK_OBJECT (w)->klass) + + void + set_parent (GtkWidget *widget, GtkContainer *parent) + { + if (GTK_IS_WINDOW (parent)) + { + GList *children = gtk_container_children + (GTK_CONTAINER (GTK_BIN (parent)->child)); + + if (GTK_IS_MENU_BAR (children->data)) + gtk_layout_put (GTK_LAYOUT (children->next->data), widget, 0, 0); + else /* GTK_IS_LAYOUT (children->data) */ + gtk_layout_put (GTK_LAYOUT (children->data), widget, 0, 0); + } + else + if (GTK_IS_SCROLLED_WINDOW (parent)) + { + /* if (WIDGET_CLASS (widget)->set_scroll_adjustments_signal) */ + /* gtk_container_add (GTK_CONTAINER (parent), widget); */ + /* else */ + /* { */ + gtk_scrolled_window_add_with_viewport + (GTK_SCROLLED_WINDOW (parent), widget); + gtk_viewport_set_shadow_type (GTK_VIEWPORT (widget->parent), + GTK_SHADOW_NONE); + /* } */ + + } + /* gtk_layout_put */ + /* (GTK_LAYOUT (GTK_BIN (parent)->child), widget, 0, 0); */ + + /* if (GTK_IS_SCROLLED_WINDOW (parent)) */ + /* gtk_layout_put */ + /* (GTK_LAYOUT (GTK_BIN (GTK_BIN (parent)->child)->child), widget, 0, 0); */ + else + gtk_layout_put (GTK_LAYOUT (parent), widget, 0, 0); + } + + JNIEXPORT jboolean JNICALL + Java_gnu_java_awt_peer_gtk_GtkComponentPeer_isEnabled + (JNIEnv *env, jobject obj) + { + void *ptr; + jboolean ret_val; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + ret_val = GTK_WIDGET_IS_SENSITIVE (GTK_WIDGET (ptr)); + gdk_threads_leave (); + + return ret_val; + } + + JNIEXPORT jboolean JNICALL + Java_gnu_java_awt_peer_gtk_GtkComponentPeer_modalHasGrab + (JNIEnv *env __attribute__((unused)), jclass clazz __attribute__((unused))) + { + GtkWidget *widget; + jboolean retval; + + gdk_threads_enter (); + widget = gtk_grab_get_current (); + retval = (widget && GTK_IS_WINDOW (widget) && GTK_WINDOW (widget)->modal); + gdk_threads_leave (); + + return retval; + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkComponentPeer_set__Ljava_lang_String_2Ljava_lang_String_2 + (JNIEnv *env, jobject obj, jstring jname, jstring jvalue) + { + const char *name; + const char *value; + void *ptr; + + ptr = NSA_GET_PTR (env, obj); + name = (*env)->GetStringUTFChars (env, jname, NULL); + value = (*env)->GetStringUTFChars (env, jvalue, NULL); + + gdk_threads_enter(); + g_object_set(ptr, name, value, NULL); + gdk_threads_leave(); + + (*env)->ReleaseStringUTFChars (env, jname, name); + (*env)->ReleaseStringUTFChars (env, jvalue, value); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkComponentPeer_set__Ljava_lang_String_2Z + (JNIEnv *env, jobject obj, jstring jname, jboolean value) + { + const char *name; + void *ptr; + + ptr = NSA_GET_PTR (env, obj); + + name = (*env)->GetStringUTFChars (env, jname, NULL); + + gdk_threads_enter(); + g_object_set(ptr, name, value, NULL); + gdk_threads_leave(); + + (*env)->ReleaseStringUTFChars (env, jname, name); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkComponentPeer_set__Ljava_lang_String_2I + (JNIEnv *env, jobject obj, jstring jname, jint value) + { + const char *name; + void *ptr; + + ptr = NSA_GET_PTR (env, obj); + name = (*env)->GetStringUTFChars (env, jname, NULL); + + gdk_threads_enter(); + g_object_set(ptr, name, value, NULL); + gdk_threads_leave(); + + (*env)->ReleaseStringUTFChars (env, jname, name); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkComponentPeer_set__Ljava_lang_String_2F + (JNIEnv *env, jobject obj, jstring jname, jfloat value) + { + const char *name; + void *ptr; + + ptr = NSA_GET_PTR (env, obj); + name = (*env)->GetStringUTFChars (env, jname, NULL); + + gdk_threads_enter(); + g_object_set(ptr, name, value, NULL); + gdk_threads_leave(); + + (*env)->ReleaseStringUTFChars (env, jname, name); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkComponentPeer_set__Ljava_lang_String_2Ljava_lang_Object_2 + (JNIEnv *env, jobject obj1, jstring jname, jobject obj2) + { + const char *name; + void *ptr1, *ptr2; + + ptr1 = NSA_GET_PTR (env, obj1); + ptr2 = NSA_GET_PTR (env, obj2); + + name = (*env)->GetStringUTFChars (env, jname, NULL); + + /* special case to catch where we need to set the parent */ + if (!strcmp (name, "parent")) + { + gdk_threads_enter (); + set_parent (GTK_WIDGET (ptr1), GTK_CONTAINER (ptr2)); + gdk_threads_leave (); + + (*env)->ReleaseStringUTFChars (env, jname, name); + return; + } + + gdk_threads_enter(); + g_object_set(ptr1, name, ptr2, NULL); + gdk_threads_leave(); + + (*env)->ReleaseStringUTFChars (env, jname, name); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectJObject + (JNIEnv *env, jobject obj) + { + void *ptr; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + + gtk_widget_realize (GTK_WIDGET (ptr)); + + connect_awt_hook (env, obj, 1, GTK_WIDGET (ptr)->window); + + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals + (JNIEnv *env, jobject obj) + { + void *ptr = NSA_GET_PTR (env, obj); + jobject *gref = NSA_GET_GLOBAL_REF (env, obj); + g_assert (gref); + + gdk_threads_enter (); + + gtk_widget_realize (GTK_WIDGET (ptr)); + + /* FIXME: We could check here if this is a scrolled window with a + single child that does not have an associated jobject. This + means that it is one of our wrapped widgets like List or TextArea + and thus we could connect the signal to the child without having + to specialize this method. */ + + /* Connect EVENT signal, which happens _before_ any specific signal. */ + + g_signal_connect (GTK_OBJECT (ptr), "event", + G_CALLBACK (pre_event_handler), *gref); + + gdk_threads_leave (); + } + + static GtkWidget * + find_fg_color_widget (GtkWidget *widget) + { + GtkWidget *fg_color_widget; + + if (GTK_IS_EVENT_BOX (widget)) + fg_color_widget = gtk_bin_get_child (GTK_BIN(widget)); + else + fg_color_widget = widget; + + return fg_color_widget; + } + + static GtkWidget * + find_bg_color_widget (GtkWidget *widget) + { + GtkWidget *bg_color_widget; + + if (GTK_IS_WINDOW (widget)) + { + GtkWidget *vbox; + GList* children; + + children = gtk_container_get_children(GTK_CONTAINER(widget)); + vbox = children->data; + + children = gtk_container_get_children(GTK_CONTAINER(vbox)); + bg_color_widget = children->data; + } + else + bg_color_widget = widget; + + return bg_color_widget; + } + diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c 2004-01-05 21:41:21.000000000 +0000 *************** *** 0 **** --- 1,86 ---- + /* gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c -- Native + implementation of GtkEmbeddedWindowPeer + Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #include "gtkpeer.h" + #include "gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.h" + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer_create + (JNIEnv *env, jobject obj, jlong socket_id) + { + GtkWidget *window; + GtkWidget *vbox, *layout; + + /* Create global reference and save it for future use */ + NSA_SET_GLOBAL_REF (env, obj); + + gdk_threads_enter (); + + window = gtk_plug_new ((GdkNativeWindow) socket_id); + + vbox = gtk_vbox_new (0, 0); + layout = gtk_layout_new (NULL, NULL); + gtk_box_pack_end (GTK_BOX (vbox), layout, 1, 1, 0); + gtk_container_add (GTK_CONTAINER (window), vbox); + + gtk_widget_show (layout); + gtk_widget_show (vbox); + + gdk_threads_leave (); + + NSA_SET_PTR (env, obj, window); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer_construct + (JNIEnv *env, jobject obj, jlong socket_id) + { + void *ptr; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + + if (GTK_WIDGET_REALIZED (GTK_WIDGET (ptr))) + g_printerr ("ERROR: GtkPlug is already realized\n"); + + gtk_plug_construct (GTK_PLUG (ptr), (GdkNativeWindow) socket_id); + + gdk_threads_leave (); + } diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c 2004-01-13 20:54:46.000000000 +0000 *************** *** 0 **** --- 1,1176 ---- + /* gtkevents.c -- GDK/GTK event handlers + Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #include "gtkpeer.h" + #include + #include + #include + #include + + /* A widget can be composed of multipled windows, so we need to hook + events on all of them. */ + struct event_hook_info + { + jobject *peer_obj; + int nwindows; + /* array of pointers to (GdkWindow *) */ + GdkWindow ***windows; + }; + + static jint + button_to_awt_mods (int button) + { + switch (button) + { + case 1: + return AWT_BUTTON1_MASK; + case 2: + return AWT_BUTTON2_MASK; + case 3: + return AWT_BUTTON3_MASK; + } + + return 0; + } + + static jint + state_to_awt_mods (guint state) + { + jint result = 0; + + if (state & GDK_SHIFT_MASK) + result |= AWT_SHIFT_MASK; + if (state & GDK_CONTROL_MASK) + result |= AWT_CTRL_MASK; + if (state & GDK_MOD1_MASK) + result |= AWT_ALT_MASK; + + return result; + } + + /* Modifier key events need special treatment. In Sun's peer + implementation, when a modifier key is pressed, the KEY_PRESSED + event has that modifier in its modifiers list. The corresponding + KEY_RELEASED event's modifier list does not contain the modifier. + For example, pressing and releasing the shift key will produce a + key press event with modifiers=Shift, and a key release event with + no modifiers. GDK's key events behave in the exact opposite way, + so this translation code is needed. */ + jint + keyevent_state_to_awt_mods (GdkEvent *event) + { + jint result = 0; + guint state; + + if (event->type == GDK_KEY_PRESS) + { + state = event->key.state; + + if (event->key.keyval == GDK_Shift_L + || event->key.keyval == GDK_Shift_R) + result |= AWT_SHIFT_MASK; + else + { + if (state & GDK_SHIFT_MASK) + result |= AWT_SHIFT_MASK; + } + + if (event->key.keyval == GDK_Control_L + || event->key.keyval == GDK_Control_R) + result |= AWT_CTRL_MASK; + else + { + if (state & GDK_CONTROL_MASK) + result |= AWT_CTRL_MASK; + } + + if (event->key.keyval == GDK_Alt_L + || event->key.keyval == GDK_Alt_R) + result |= AWT_ALT_MASK; + else + { + if (state & GDK_MOD1_MASK) + result |= AWT_ALT_MASK; + } + } + else if (event->type == GDK_KEY_RELEASE) + { + state = event->key.state; + + if (event->key.keyval != GDK_Shift_L + && event->key.keyval != GDK_Shift_R) + { + if (state & GDK_SHIFT_MASK) + result |= AWT_SHIFT_MASK; + } + if (event->key.keyval != GDK_Control_L + && event->key.keyval != GDK_Control_R) + { + if (state & GDK_CONTROL_MASK) + result |= AWT_CTRL_MASK; + } + + if (event->key.keyval != GDK_Alt_L + && event->key.keyval != GDK_Alt_R) + { + if (state & GDK_MOD1_MASK) + result |= AWT_ALT_MASK; + } + } + + return result; + } + + /* Get the first keyval in the keymap for this event's keycode. The + first keyval corresponds roughly to Java's notion of a virtual + key. Returns the uppercase version of the first keyval. */ + static guint + get_first_keyval_from_keymap (GdkEvent *event) + { + guint keyval; + guint *keyvals; + gint n_entries; + + if (!gdk_keymap_get_entries_for_keycode (NULL, + event->key.hardware_keycode, + NULL, + &keyvals, + &n_entries)) + { + g_warning ("No keyval found for hardware keycode %d\n", + event->key.hardware_keycode); + /* Try to recover by using the keyval in the event structure. */ + keyvals = &(event->key.keyval); + } + keyval = keyvals[0]; + g_free (keyvals); + + return gdk_keyval_to_upper (keyval); + } + + #ifdef __GNUC__ + __inline + #endif + static jint + keysym_to_awt_keycode (GdkEvent *event) + { + guint ukeyval; + guint state; + + ukeyval = get_first_keyval_from_keymap (event); + state = event->key.state; + + /* VK_A through VK_Z */ + if (ukeyval >= GDK_A && ukeyval <= GDK_Z) + return ukeyval; + + /* VK_0 through VK_9 */ + if (ukeyval >= GDK_0 && ukeyval <= GDK_9) + return ukeyval; + + switch (ukeyval) + { + case GDK_Return: + case GDK_KP_Enter: + return VK_ENTER; + case GDK_BackSpace: + return VK_BACK_SPACE; + case GDK_Tab: + return VK_TAB; + case GDK_Cancel: + return VK_CANCEL; + case GDK_Clear: + return VK_CLEAR; + case GDK_Shift_L: + case GDK_Shift_R: + return VK_SHIFT; + case GDK_Control_L: + case GDK_Control_R: + return VK_CONTROL; + case GDK_Alt_L: + case GDK_Alt_R: + return VK_ALT; + case GDK_Pause: + return VK_PAUSE; + case GDK_Caps_Lock: + return VK_CAPS_LOCK; + case GDK_Escape: + return VK_ESCAPE; + case GDK_space: + return VK_SPACE; + case GDK_KP_Page_Up: + /* For keys on the numeric keypad, the JVM produces one of two + virtual keys, depending on the num lock state. */ + if (state & GDK_MOD2_MASK) + return VK_NUMPAD9; + else + return VK_PAGE_UP; + case GDK_Page_Up: + return VK_PAGE_UP; + case GDK_KP_Page_Down: + if (state & GDK_MOD2_MASK) + return VK_NUMPAD3; + else + return VK_PAGE_DOWN; + case GDK_Page_Down: + return VK_PAGE_DOWN; + case GDK_KP_End: + if (state & GDK_MOD2_MASK) + return VK_NUMPAD1; + else + return VK_END; + case GDK_End: + return VK_END; + case GDK_KP_Home: + if (state & GDK_MOD2_MASK) + return VK_NUMPAD7; + else + return VK_HOME; + case GDK_Home: + return VK_HOME; + case GDK_KP_Begin: + if (state & GDK_MOD2_MASK) + return VK_NUMPAD5; + else + return VK_UNDEFINED; + case GDK_Left: + return VK_LEFT; + case GDK_Up: + return VK_UP; + case GDK_Right: + return VK_RIGHT; + case GDK_Down: + return VK_DOWN; + case GDK_comma: + return VK_COMMA; + case GDK_minus: + return VK_MINUS; + case GDK_period: + return VK_PERIOD; + case GDK_slash: + return VK_SLASH; + /* + return VK_0; + return VK_1; + return VK_2; + return VK_3; + return VK_4; + return VK_5; + return VK_6; + return VK_7; + return VK_8; + return VK_9; + */ + case GDK_semicolon: + return VK_SEMICOLON; + case GDK_equal: + return VK_EQUALS; + /* + return VK_A; + return VK_B; + return VK_C; + return VK_D; + return VK_E; + return VK_F; + return VK_G; + return VK_H; + return VK_I; + return VK_J; + return VK_K; + return VK_L; + return VK_M; + return VK_N; + return VK_O; + return VK_P; + return VK_Q; + return VK_R; + return VK_S; + return VK_T; + return VK_U; + return VK_V; + return VK_W; + return VK_X; + return VK_Y; + return VK_Z; + */ + case GDK_bracketleft: + return VK_OPEN_BRACKET; + case GDK_backslash: + return VK_BACK_SLASH; + case GDK_bracketright: + return VK_CLOSE_BRACKET; + case GDK_KP_0: + return VK_NUMPAD0; + case GDK_KP_1: + return VK_NUMPAD1; + case GDK_KP_2: + return VK_NUMPAD2; + case GDK_KP_3: + return VK_NUMPAD3; + case GDK_KP_4: + return VK_NUMPAD4; + case GDK_KP_5: + return VK_NUMPAD5; + case GDK_KP_6: + return VK_NUMPAD6; + case GDK_KP_7: + return VK_NUMPAD7; + case GDK_KP_8: + return VK_NUMPAD8; + case GDK_KP_9: + return VK_NUMPAD9; + case GDK_KP_Multiply: + return VK_MULTIPLY; + case GDK_KP_Add: + return VK_ADD; + /* + return VK_SEPARATER; + */ + case GDK_KP_Separator: + return VK_SEPARATOR; + case GDK_KP_Subtract: + return VK_SUBTRACT; + case GDK_KP_Decimal: + return VK_DECIMAL; + case GDK_KP_Divide: + return VK_DIVIDE; + case GDK_KP_Delete: + if (state & GDK_MOD2_MASK) + return VK_DECIMAL; + else + return VK_DELETE; + case GDK_Delete: + return VK_DELETE; + case GDK_Num_Lock: + return VK_NUM_LOCK; + case GDK_Scroll_Lock: + return VK_SCROLL_LOCK; + case GDK_F1: + return VK_F1; + case GDK_F2: + return VK_F2; + case GDK_F3: + return VK_F3; + case GDK_F4: + return VK_F4; + case GDK_F5: + return VK_F5; + case GDK_F6: + return VK_F6; + case GDK_F7: + return VK_F7; + case GDK_F8: + return VK_F8; + case GDK_F9: + return VK_F9; + case GDK_F10: + return VK_F10; + case GDK_F11: + return VK_F11; + case GDK_F12: + return VK_F12; + case GDK_F13: + return VK_F13; + case GDK_F14: + return VK_F14; + case GDK_F15: + return VK_F15; + case GDK_F16: + return VK_F16; + case GDK_F17: + return VK_F17; + case GDK_F18: + return VK_F18; + case GDK_F19: + return VK_F19; + case GDK_F20: + return VK_F20; + case GDK_F21: + return VK_F21; + case GDK_F22: + return VK_F22; + case GDK_F23: + return VK_F23; + case GDK_F24: + return VK_F24; + case GDK_Print: + return VK_PRINTSCREEN; + case GDK_KP_Insert: + if (state & GDK_MOD2_MASK) + return VK_NUMPAD0; + else + return VK_INSERT; + case GDK_Insert: + return VK_INSERT; + case GDK_Help: + return VK_HELP; + case GDK_Meta_L: + case GDK_Meta_R: + return VK_META; + case GDK_grave: + return VK_BACK_QUOTE; + case GDK_apostrophe: + return VK_QUOTE; + case GDK_KP_Up: + if (state & GDK_MOD2_MASK) + return VK_NUMPAD8; + else + return VK_KP_UP; + case GDK_KP_Down: + if (state & GDK_MOD2_MASK) + return VK_NUMPAD2; + else + return VK_KP_DOWN; + case GDK_KP_Left: + if (state & GDK_MOD2_MASK) + return VK_NUMPAD4; + else + return VK_KP_LEFT; + case GDK_KP_Right: + if (state & GDK_MOD2_MASK) + return VK_NUMPAD6; + else + return VK_KP_RIGHT; + case GDK_dead_grave: + return VK_DEAD_GRAVE; + case GDK_dead_acute: + return VK_DEAD_ACUTE; + case GDK_dead_circumflex: + return VK_DEAD_CIRCUMFLEX; + case GDK_dead_tilde: + return VK_DEAD_TILDE; + case GDK_dead_macron: + return VK_DEAD_MACRON; + case GDK_dead_breve: + return VK_DEAD_BREVE; + case GDK_dead_abovedot: + return VK_DEAD_ABOVEDOT; + case GDK_dead_diaeresis: + return VK_DEAD_DIAERESIS; + case GDK_dead_abovering: + return VK_DEAD_ABOVERING; + case GDK_dead_doubleacute: + return VK_DEAD_DOUBLEACUTE; + case GDK_dead_caron: + return VK_DEAD_CARON; + case GDK_dead_cedilla: + return VK_DEAD_CEDILLA; + case GDK_dead_ogonek: + return VK_DEAD_OGONEK; + case GDK_dead_iota: + return VK_DEAD_IOTA; + case GDK_dead_voiced_sound: + return VK_DEAD_VOICED_SOUND; + case GDK_dead_semivoiced_sound: + return VK_DEAD_SEMIVOICED_SOUND; + case GDK_ampersand: + return VK_AMPERSAND; + case GDK_asterisk: + return VK_ASTERISK; + case GDK_quotedbl: + return VK_QUOTEDBL; + case GDK_less: + return VK_LESS; + case GDK_greater: + return VK_GREATER; + case GDK_braceleft: + return VK_BRACELEFT; + case GDK_braceright: + return VK_BRACERIGHT; + case GDK_at: + return VK_AT; + case GDK_colon: + return VK_COLON; + case GDK_asciicircum: + return VK_CIRCUMFLEX; + case GDK_dollar: + return VK_DOLLAR; + case GDK_EuroSign: + return VK_EURO_SIGN; + case GDK_exclam: + return VK_EXCLAMATION_MARK; + case GDK_exclamdown: + return VK_INVERTED_EXCLAMATION_MARK; + case GDK_parenleft: + return VK_LEFT_PARENTHESIS; + case GDK_numbersign: + return VK_NUMBER_SIGN; + case GDK_plus: + return VK_PLUS; + case GDK_parenright: + return VK_RIGHT_PARENTHESIS; + case GDK_underscore: + return VK_UNDERSCORE; + /* + return VK_FINAL; + return VK_CONVERT; + return VK_NONCONVERT; + return VK_ACCEPT; + */ + case GDK_Mode_switch: + return VK_MODECHANGE; + /* + return VK_KANA; + */ + case GDK_Kanji: + return VK_KANJI; + /* + return VK_ALPHANUMERIC; + */ + case GDK_Katakana: + return VK_KATAKANA; + case GDK_Hiragana: + return VK_HIRAGANA; + /* + return VK_FULL_WIDTH; + return VK_HALF_WIDTH; + return VK_ROMAN_CHARACTERS; + return VK_ALL_CANDIDATES; + */ + case GDK_PreviousCandidate: + return VK_PREVIOUS_CANDIDATE; + case GDK_Codeinput: + return VK_CODE_INPUT; + /* + return VK_JAPANESE_KATAKANA; + return VK_JAPANESE_HIRAGANA; + return VK_JAPANESE_ROMAN; + */ + case GDK_Kana_Lock: + return VK_KANA_LOCK; + /* + return VK_INPUT_METHOD_ON_OFF; + return VK_CUT; + return VK_COPY; + return VK_PASTE; + return VK_UNDO; + return VK_AGAIN; + return VK_FIND; + return VK_PROPS; + return VK_STOP; + return VK_COMPOSE; + return VK_ALT_GRAPH; + */ + default: + return VK_UNDEFINED; + } + } + + static jint + keysym_to_awt_keylocation (GdkEvent *event) + { + guint ukeyval; + + ukeyval = get_first_keyval_from_keymap (event); + + /* VK_A through VK_Z */ + if (ukeyval >= GDK_A && ukeyval <= GDK_Z) + return AWT_KEY_LOCATION_STANDARD; + + /* VK_0 through VK_9 */ + if (ukeyval >= GDK_0 && ukeyval <= GDK_9) + return AWT_KEY_LOCATION_STANDARD; + + switch (ukeyval) + { + case GDK_Shift_L: + case GDK_Control_L: + case GDK_Alt_L: + case GDK_Meta_L: + return AWT_KEY_LOCATION_LEFT; + + case GDK_Shift_R: + case GDK_Control_R: + case GDK_Alt_R: + case GDK_Meta_R: + return AWT_KEY_LOCATION_RIGHT; + + case GDK_Return: + case GDK_BackSpace: + case GDK_Tab: + case GDK_Cancel: + case GDK_Clear: + case GDK_Pause: + case GDK_Caps_Lock: + case GDK_Escape: + case GDK_space: + case GDK_Page_Up: + case GDK_Page_Down: + case GDK_End: + case GDK_Home: + case GDK_Left: + case GDK_Up: + case GDK_Right: + case GDK_Down: + case GDK_comma: + case GDK_minus: + case GDK_period: + case GDK_slash: + case GDK_semicolon: + case GDK_equal: + case GDK_bracketleft: + case GDK_backslash: + case GDK_bracketright: + case GDK_Delete: + case GDK_Scroll_Lock: + case GDK_F1: + case GDK_F2: + case GDK_F3: + case GDK_F4: + case GDK_F5: + case GDK_F6: + case GDK_F7: + case GDK_F8: + case GDK_F9: + case GDK_F10: + case GDK_F11: + case GDK_F12: + case GDK_F13: + case GDK_F14: + case GDK_F15: + case GDK_F16: + case GDK_F17: + case GDK_F18: + case GDK_F19: + case GDK_F20: + case GDK_F21: + case GDK_F22: + case GDK_F23: + case GDK_F24: + case GDK_Print: + case GDK_Insert: + case GDK_Help: + case GDK_grave: + case GDK_apostrophe: + case GDK_dead_grave: + case GDK_dead_acute: + case GDK_dead_circumflex: + case GDK_dead_tilde: + case GDK_dead_macron: + case GDK_dead_breve: + case GDK_dead_abovedot: + case GDK_dead_diaeresis: + case GDK_dead_abovering: + case GDK_dead_doubleacute: + case GDK_dead_caron: + case GDK_dead_cedilla: + case GDK_dead_ogonek: + case GDK_dead_iota: + case GDK_dead_voiced_sound: + case GDK_dead_semivoiced_sound: + case GDK_ampersand: + case GDK_asterisk: + case GDK_quotedbl: + case GDK_less: + case GDK_greater: + case GDK_braceleft: + case GDK_braceright: + case GDK_at: + case GDK_colon: + case GDK_asciicircum: + case GDK_dollar: + case GDK_EuroSign: + case GDK_exclam: + case GDK_exclamdown: + case GDK_parenleft: + case GDK_numbersign: + case GDK_plus: + case GDK_parenright: + case GDK_underscore: + case GDK_Mode_switch: + case GDK_Kanji: + case GDK_Katakana: + case GDK_Hiragana: + case GDK_PreviousCandidate: + case GDK_Codeinput: + case GDK_Kana_Lock: + return AWT_KEY_LOCATION_STANDARD; + + case GDK_KP_Enter: + case GDK_KP_Page_Up: + case GDK_KP_Page_Down: + case GDK_KP_End: + case GDK_KP_Home: + case GDK_KP_Begin: + case GDK_KP_0: + case GDK_KP_1: + case GDK_KP_2: + case GDK_KP_3: + case GDK_KP_4: + case GDK_KP_5: + case GDK_KP_6: + case GDK_KP_7: + case GDK_KP_8: + case GDK_KP_9: + case GDK_KP_Multiply: + case GDK_KP_Add: + case GDK_KP_Separator: + case GDK_KP_Subtract: + case GDK_KP_Decimal: + case GDK_KP_Divide: + case GDK_KP_Delete: + case GDK_Num_Lock: + case GDK_KP_Insert: + case GDK_KP_Up: + case GDK_KP_Down: + case GDK_KP_Left: + case GDK_KP_Right: + return AWT_KEY_LOCATION_NUMPAD; + + default: + return AWT_KEY_LOCATION_UNKNOWN; + } + } + + static jchar + keyevent_to_awt_keychar (GdkEvent *event) + { + if (event->key.length > 0) + { + /* Translate GDK carriage return to Java linefeed. */ + if (event->key.string[0] == 13) + return VK_ENTER; + else + return event->key.string[0]; + } + else + { + switch (event->key.keyval) + { + case GDK_BackSpace: + return VK_BACK_SPACE; + case GDK_Tab: + return VK_TAB; + case GDK_Delete: + case GDK_KP_Delete: + return VK_DELETE; + default: + return AWT_KEY_CHAR_UNDEFINED; + } + } + } + + /* Checks if keyval triggers a KEY_TYPED event on the source widget. + This function identifies special keyvals that don't trigger + GtkIMContext "commit" signals, but that do trigger Java KEY_TYPED + events. */ + static int + generates_key_typed_event (GdkEvent *event, GtkWidget *source) + { + guint keyval; + + if (!GTK_IS_ENTRY (source) + && !GTK_IS_TEXT_VIEW (source)) + return event->key.length ? 1 : 0; + + keyval = event->key.keyval; + + return (keyval == GDK_Escape + || keyval == GDK_BackSpace + || keyval == GDK_Delete + || keyval == GDK_KP_Delete + || keyval == GDK_Return + || keyval == GDK_KP_Enter + || (keyval == GDK_Tab + && GTK_IS_TEXT_VIEW(source))) ? 1 : 0; + } + + void + awt_event_handler (GdkEvent *event) + { + /* keep synthetic AWT events from being processed recursively */ + if (event->type & SYNTHETIC_EVENT_MASK && event->type != GDK_NOTHING) + { + event->type ^= SYNTHETIC_EVENT_MASK; + } + + gtk_main_do_event (event); + } + + gboolean + pre_event_handler (GtkWidget *widget, GdkEvent *event, jobject peer) + { + GtkWidget *event_widget; + static guint32 button_click_time = 0; + static GdkWindow *button_window = NULL; + static guint button_number = -1; + static jint click_count = 1; + + /* If it is not a focus change event, the widget must be realized already. + If not, ignore the event (Gtk+ will do the same). */ + if (!(event->type == GDK_FOCUS_CHANGE || GTK_WIDGET_REALIZED(widget))) + return FALSE; + + /* Do not handle propagated events. AWT has its own propagation rules */ + gdk_window_get_user_data (event->any.window, (void **) &event_widget); + if (event_widget != widget) + return FALSE; + + /* We only care about input events */ + if (!(event->type == GDK_BUTTON_PRESS + || event->type == GDK_BUTTON_RELEASE + || event->type == GDK_ENTER_NOTIFY + || event->type == GDK_LEAVE_NOTIFY + || event->type == GDK_CONFIGURE + || event->type == GDK_EXPOSE + || event->type == GDK_KEY_PRESS + || event->type == GDK_KEY_RELEASE + || event->type == GDK_FOCUS_CHANGE + || event->type == GDK_MOTION_NOTIFY)) + { + return FALSE; + } + /* g_print("event %u widget %s peer %p\n", + event->type, gtk_widget_get_name (widget), peer); */ + + /* If it has no jobject associated we can send no AWT event */ + if (!peer) + return FALSE; + + /* for all input events, which have a window with a jobject attached, + send the AWT input event corresponding to the Gtk event off to Java */ + + /* keep track of clickCount ourselves, since the AWT allows more + than a triple click to occur */ + if (event->type == GDK_BUTTON_PRESS) + { + if ((event->button.time < (button_click_time + MULTI_CLICK_TIME)) + && (event->button.window == button_window) + && (event->button.button == button_number)) + click_count++; + else + click_count = 1; + + button_click_time = event->button.time; + button_window = event->button.window; + button_number = event->button.button; + } + + switch (event->type) + { + case GDK_BUTTON_PRESS: + (*gdk_env)->CallVoidMethod (gdk_env, peer, + postMouseEventID, + AWT_MOUSE_PRESSED, + (jlong)event->button.time, + state_to_awt_mods (event->button.state) | + button_to_awt_mods (event->button.button), + (jint)event->button.x, + (jint)event->button.y, + click_count, + (event->button.button == 3) ? JNI_TRUE : + JNI_FALSE); + break; + case GDK_BUTTON_RELEASE: + { + int width, height; + + (*gdk_env)->CallVoidMethod (gdk_env, peer, + postMouseEventID, + AWT_MOUSE_RELEASED, + (jlong)event->button.time, + state_to_awt_mods (event->button.state) | + button_to_awt_mods (event->button.button), + (jint)event->button.x, + (jint)event->button.y, + click_count, + JNI_FALSE); + + /* check to see if the release occured in the window it was pressed + in, and if so, generate an AWT click event */ + gdk_window_get_size (event->any.window, &width, &height); + if (event->button.x >= 0 + && event->button.y >= 0 + && event->button.x <= width + && event->button.y <= height) + { + (*gdk_env)->CallVoidMethod (gdk_env, peer, + postMouseEventID, + AWT_MOUSE_CLICKED, + (jlong)event->button.time, + state_to_awt_mods (event->button.state) | + button_to_awt_mods (event->button.button), + (jint)event->button.x, + (jint)event->button.y, + click_count, + JNI_FALSE); + } + } + break; + case GDK_MOTION_NOTIFY: + (*gdk_env)->CallVoidMethod (gdk_env, peer, postMouseEventID, + AWT_MOUSE_MOVED, + (jlong)event->motion.time, + state_to_awt_mods (event->motion.state), + (jint)event->motion.x, + (jint)event->motion.y, + 0, + JNI_FALSE); + + if (event->motion.state & (GDK_BUTTON1_MASK + | GDK_BUTTON2_MASK + | GDK_BUTTON3_MASK + | GDK_BUTTON4_MASK + | GDK_BUTTON5_MASK)) + { + (*gdk_env)->CallVoidMethod (gdk_env, peer, + postMouseEventID, + AWT_MOUSE_DRAGGED, + (jlong)event->motion.time, + state_to_awt_mods (event->motion.state), + (jint)event->motion.x, + (jint)event->motion.y, + 0, + JNI_FALSE); + } + break; + case GDK_ENTER_NOTIFY: + (*gdk_env)->CallVoidMethod (gdk_env, peer, postMouseEventID, + AWT_MOUSE_ENTERED, + (jlong)event->crossing.time, + state_to_awt_mods (event->crossing.state), + (jint)event->crossing.x, + (jint)event->crossing.y, + 0, + JNI_FALSE); + break; + case GDK_LEAVE_NOTIFY: + if (event->crossing.mode == GDK_CROSSING_NORMAL) + (*gdk_env)->CallVoidMethod (gdk_env, peer, + postMouseEventID, + AWT_MOUSE_EXITED, + (jlong)event->crossing.time, + state_to_awt_mods (event->crossing.state), + (jint)event->crossing.x, + (jint)event->crossing.y, + 0, + JNI_FALSE); + break; + case GDK_CONFIGURE: + { + /* GtkWidget *widget; + + gdk_window_get_user_data (event->any.window, (void **) &widget); */ + + if (widget && GTK_WIDGET_TOPLEVEL (widget)) + { + /* Configure events are not posted to the AWT event + queue, and as such, the gdk/gtk peer functions will + be called back before postConfigureEvent + returns. */ + gdk_threads_leave (); + + (*gdk_env)->CallVoidMethod (gdk_env, peer, + postConfigureEventID, + (jint) event->configure.x, + (jint) event->configure.y, + (jint) event->configure.width, + (jint) event->configure.height); + gdk_threads_enter (); + } + } + break; + case GDK_EXPOSE: + { + (*gdk_env)->CallVoidMethod (gdk_env, peer, + postExposeEventID, + (jint)event->expose.area.x, + (jint)event->expose.area.y, + (jint)event->expose.area.width, + (jint)event->expose.area.height); + } + break; + case GDK_FOCUS_CHANGE: + (*gdk_env)->CallVoidMethod (gdk_env, peer, + postFocusEventID, + (jint) (event->focus_change.in) ? + AWT_FOCUS_GAINED : AWT_FOCUS_LOST, + JNI_FALSE); + break; + case GDK_KEY_PRESS: + case GDK_KEY_RELEASE: + { + GdkWindow *obj_window; + jobject *focus_obj_ptr = NULL; + int generates_key_typed = 0; + + /* A widget with a grab will get key events */ + if (!GTK_IS_WINDOW (widget)) + focus_obj_ptr = &peer; + else + { + GtkWindow *window; + + /* Check if we have an enabled focused widget in this window. + If not don't handle the event. */ + window = GTK_WINDOW (widget); + if (!window->focus_widget + || !GTK_WIDGET_IS_SENSITIVE (window->focus_widget) + || !window->focus_widget->window) + return FALSE; + + /* TextArea peers are attached to the scrolled window + that contains the GtkTextView, not to the text view + itself. Same for List. */ + if (GTK_IS_TEXT_VIEW (window->focus_widget) + || GTK_IS_CLIST (window->focus_widget)) + { + obj_window = gtk_widget_get_parent (window->focus_widget)->window; + } + else if (GTK_IS_BUTTON (window->focus_widget)) + /* GtkButton events go to the "event_window" and this is what + we registered when the button was created. */ + obj_window = GTK_BUTTON (window->focus_widget)->event_window; + else + obj_window = window->focus_widget->window; + + gdk_property_get (obj_window, + gdk_atom_intern ("_GNU_GTKAWT_ADDR", FALSE), + gdk_atom_intern ("CARDINAL", FALSE), + 0, + sizeof (jobject), + FALSE, + NULL, + NULL, + NULL, + (guchar **)&focus_obj_ptr); + + /* If the window has no jobject attached we can't send anything */ + if (!focus_obj_ptr) + return FALSE; + + /* Should we generate an AWT_KEY_TYPED event? */ + generates_key_typed = generates_key_typed_event (event, window->focus_widget); + } + + if (event->type == GDK_KEY_PRESS) + { + (*gdk_env)->CallVoidMethod (gdk_env, *focus_obj_ptr, + postKeyEventID, + (jint) AWT_KEY_PRESSED, + (jlong) event->key.time, + keyevent_state_to_awt_mods (event), + keysym_to_awt_keycode (event), + keyevent_to_awt_keychar (event), + keysym_to_awt_keylocation (event)); + + if (generates_key_typed) + { + (*gdk_env)->CallVoidMethod (gdk_env, *focus_obj_ptr, + postKeyEventID, + (jint) AWT_KEY_TYPED, + (jlong) event->key.time, + state_to_awt_mods (event->key.state), + VK_UNDEFINED, + keyevent_to_awt_keychar (event), + AWT_KEY_LOCATION_UNKNOWN); + } + } + else /* GDK_KEY_RELEASE */ + { + (*gdk_env)->CallVoidMethod (gdk_env, *focus_obj_ptr, + postKeyEventID, + (jint) AWT_KEY_RELEASED, + (jlong) event->key.time, + keyevent_state_to_awt_mods (event), + keysym_to_awt_keycode (event), + keyevent_to_awt_keychar (event), + keysym_to_awt_keylocation (event)); + } + } + break; + default: + break; + } + + return FALSE; + } + + static void + attach_jobject (GdkWindow *window, jobject *obj) + { + GdkAtom addr_atom = gdk_atom_intern ("_GNU_GTKAWT_ADDR", FALSE); + GdkAtom type_atom = gdk_atom_intern ("CARDINAL", FALSE); + + gdk_window_set_events (window, + gdk_window_get_events (window) + | GDK_POINTER_MOTION_MASK + | GDK_BUTTON_MOTION_MASK + | GDK_BUTTON_PRESS_MASK + | GDK_BUTTON_RELEASE_MASK + | GDK_KEY_PRESS_MASK + | GDK_KEY_RELEASE_MASK + | GDK_ENTER_NOTIFY_MASK + | GDK_LEAVE_NOTIFY_MASK + | GDK_STRUCTURE_MASK + | GDK_KEY_PRESS_MASK + | GDK_FOCUS_CHANGE_MASK); + + // g_print("storing obj %p property on window %p\n", obj, window); + gdk_property_change (window, + addr_atom, + type_atom, + 8, + GDK_PROP_MODE_REPLACE, + (guchar *)obj, + sizeof (jobject)); + } + + void + connect_awt_hook (JNIEnv *env, jobject peer_obj, int nwindows, ...) + { + va_list ap; + jobject *obj; + //void *ptr = NSA_GET_PTR (env, peer_obj); + + obj = NSA_GET_GLOBAL_REF (env, peer_obj); + //g_print("Connection obj %s\n", gtk_widget_get_name (GTK_WIDGET (ptr))); + g_assert (obj); + + va_start (ap, nwindows); + { + int i; + for (i = 0; i < nwindows; i++) + { + GdkWindow* attach = (va_arg (ap, GdkWindow *)); + attach_jobject(attach, obj); + } + } + va_end (ap); + } + diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c 2004-01-08 21:12:25.000000000 +0000 *************** *** 0 **** --- 1,247 ---- + /* gtkfiledialogpeer.c -- Native implementation of GtkFileDialogPeer + Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #include "gtkpeer.h" + #include "gnu_java_awt_peer_gtk_GtkComponentPeer.h" + #include "gnu_java_awt_peer_gtk_GtkFileDialogPeer.h" + + static void window_closed (GtkDialog *dialog, + gint responseId, + jobject peer_obj); + static void ok_clicked (GtkButton *button, + jobject peer_obj); + static void cancel_clicked (GtkButton *button, + jobject peer_obj); + + /* + * Make a new file selection dialog + */ + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkFileDialogPeer_create + (JNIEnv *env, jobject obj) + { + gpointer widget; + + /* Create global reference and save it for future use */ + NSA_SET_GLOBAL_REF (env, obj); + + gdk_threads_enter (); + + widget = gtk_file_selection_new (""); + /* GtkFileSelect is not modal by default */ + gtk_window_set_modal (GTK_WINDOW (widget), TRUE); + + /* We must add this window to the group so input in the others are + disable while it is being shown */ + gtk_window_group_add_window (global_gtk_window_group, GTK_WINDOW (widget)); + + gdk_threads_leave (); + + NSA_SET_PTR (env, obj, widget); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkFileDialogPeer_connectJObject + (JNIEnv *env, jobject obj) + { + void *ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + + gtk_widget_realize (GTK_WIDGET (ptr)); + + connect_awt_hook (env, obj, 1, GTK_WIDGET (ptr)->window); + + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkFileDialogPeer_connectSignals + (JNIEnv *env, jobject obj) + { + void *ptr = NSA_GET_PTR (env, obj); + jobject *gref = NSA_GET_GLOBAL_REF (env, obj); + g_assert (gref); + + gdk_threads_enter (); + + gtk_widget_realize (GTK_WIDGET (ptr)); + + /* connect buttons to handlers */ + + g_signal_connect (G_OBJECT (GTK_DIALOG (ptr)), + "response", + GTK_SIGNAL_FUNC (window_closed), *gref); + + g_signal_connect (G_OBJECT (GTK_FILE_SELECTION (ptr)->ok_button), + "clicked", + GTK_SIGNAL_FUNC (ok_clicked), *gref); + + g_signal_connect (G_OBJECT (GTK_FILE_SELECTION (ptr)->cancel_button), + "clicked", + GTK_SIGNAL_FUNC (cancel_clicked), *gref); + + gdk_threads_leave (); + + /* Connect the superclass signals. */ + Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals (env, obj); + } + + /* + * Set the filename in the file selection dialog. + */ + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkFileDialogPeer_nativeSetFile + (JNIEnv *env, jobject obj, jstring filename) + { + void *ptr; + const char *str; + + ptr = NSA_GET_PTR (env, obj); + + str = (*env)->GetStringUTFChars (env, filename, 0); + + gdk_threads_enter (); + + gtk_file_selection_set_filename (GTK_FILE_SELECTION (ptr), str); + + gdk_threads_leave (); + + (*env)->ReleaseStringUTFChars (env, filename, str); + } + + static void + window_closed (GtkDialog *dialog __attribute__((unused)), + gint responseId, + jobject peer_obj) + { + static int isIDSet = 0; + static jmethodID disposeID; + void *ptr; + + // We only need this for the case when the user closed the window + if (responseId != GTK_RESPONSE_DELETE_EVENT) + return; + + ptr = NSA_GET_PTR (gdk_env, peer_obj); + + if (!isIDSet) + { + jclass cx = (*gdk_env)->GetObjectClass (gdk_env, peer_obj); + disposeID = (*gdk_env)->GetMethodID (gdk_env, cx, "gtkDisposeFileDialog", "()V"); + isIDSet = 1; + } + + gdk_threads_leave (); + + /* We can dispose of the dialog now (and unblock show) */ + (*gdk_env)->CallVoidMethod (gdk_env, peer_obj, disposeID); + + gdk_threads_enter (); + } + + static void + ok_clicked (GtkButton *button __attribute__((unused)), + jobject peer_obj) + { + static int isIDSet = 0; + static jmethodID gtkSetFilenameID; + static jmethodID hideID; + void *ptr; + G_CONST_RETURN gchar *fileName; + + ptr = NSA_GET_PTR (gdk_env, peer_obj); + + fileName = gtk_file_selection_get_filename ( + GTK_FILE_SELECTION (GTK_WIDGET (ptr))); + + if (!isIDSet) + { + jclass cx = (*gdk_env)->GetObjectClass (gdk_env, peer_obj); + hideID = (*gdk_env)->GetMethodID (gdk_env, cx, "gtkHideFileDialog", "()V"); + gtkSetFilenameID = (*gdk_env)->GetMethodID (gdk_env, cx, + "gtkSetFilename", "(Ljava.lang.String;)V"); + isIDSet = 1; + } + + gdk_threads_leave (); + + /* Set the Java object field 'file' with this value. */ + jstring str_fileName = (*gdk_env)->NewStringUTF (gdk_env, fileName); + (*gdk_env)->CallVoidMethod (gdk_env, peer_obj, gtkSetFilenameID, str_fileName); + + /* We can hide the dialog now (and unblock show) */ + (*gdk_env)->CallVoidMethod (gdk_env, peer_obj, hideID); + + gdk_threads_enter (); + } + + static void + cancel_clicked (GtkButton *button __attribute__((unused)), + jobject peer_obj) + { + static int isIDSet = 0; + static jmethodID gtkSetFilenameID; + static jmethodID hideID; + void *ptr; + + ptr = NSA_GET_PTR (gdk_env, peer_obj); + + if (!isIDSet) + { + jclass cx = (*gdk_env)->GetObjectClass (gdk_env, peer_obj); + hideID = (*gdk_env)->GetMethodID (gdk_env, cx, "gtkHideFileDialog", "()V"); + gtkSetFilenameID = (*gdk_env)->GetMethodID (gdk_env, cx, + "gtkSetFilename", "(Ljava.lang.String;)V"); + isIDSet = 1; + } + + gdk_threads_leave (); + + /* Set the Java object field 'file' with the null value. */ + (*gdk_env)->CallVoidMethod (gdk_env, peer_obj, gtkSetFilenameID, NULL); + + /* We can hide the dialog now (and unblock show) */ + (*gdk_env)->CallVoidMethod (gdk_env, peer_obj, hideID); + + gdk_threads_enter (); + } + + diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImagePainter.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImagePainter.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImagePainter.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImagePainter.c 2003-10-08 15:49:33.000000000 +0000 *************** *** 0 **** --- 1,160 ---- + /* gtkimagepainter.c + Copyright (C) 1999 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + #include "gtkpeer.h" + #include "gnu_java_awt_peer_gtk_GtkImagePainter.h" + #include + #include + + #define SWAPU32(w) \ + (((w) << 24) | (((w) & 0xff00) << 8) | (((w) >> 8) & 0xff00) | ((w) >> 24)) + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkImagePainter_drawPixels + (JNIEnv *env, jobject obj __attribute__((unused)), jobject gc_obj, + jint bg_red, jint bg_green, jint bg_blue, jint x, jint y, jint width, + jint height, jintArray jpixels, jint offset, jint scansize, + jdoubleArray jaffine) + { + struct graphics *g; + jint *pixels, *elems; + guchar *packed; + int i; + jsize num_pixels; + guchar *j_rgba, *c_rgb; + + g = (struct graphics *) NSA_GET_PTR (env, gc_obj); + + elems = (*env)->GetIntArrayElements (env, jpixels, NULL); + num_pixels = (*env)->GetArrayLength (env, jpixels); + + /* get a copy of the pixel data so we can modify it */ + pixels = malloc (sizeof (jint) * num_pixels); + memcpy (pixels, elems, sizeof (jint) * num_pixels); + + (*env)->ReleaseIntArrayElements (env, jpixels, elems, 0); + + #ifndef WORDS_BIGENDIAN + /* convert pixels from 0xBBGGRRAA to 0xAARRGGBB */ + for (i = 0; i < num_pixels; i++) + pixels[i] = SWAPU32 ((unsigned)pixels[i]); + #endif + + packed = (guchar *) malloc (sizeof (guchar) * 3 * num_pixels); + j_rgba = (guchar *) pixels; + c_rgb = packed; + + /* copy over pixels in DirectColorModel format to 24 bit RGB image data, + and process the alpha channel */ + for (i = 0; i < num_pixels; i++) + { + jint ialpha = *j_rgba++; + + switch (ialpha) + { + case 0: /* full transparency */ + *c_rgb++ = bg_red; + *c_rgb++ = bg_green; + *c_rgb++ = bg_blue; + j_rgba += 3; + break; + case 255: /* opaque */ + *c_rgb++ = *j_rgba++; + *c_rgb++ = *j_rgba++; + *c_rgb++ = *j_rgba++; + break; + default: /* compositing required */ + { + jfloat alpha = ialpha / 255.0; + jfloat comp_alpha = 1.0 - alpha; + + *c_rgb++ = *j_rgba++ * alpha + bg_red * comp_alpha; + *c_rgb++ = *j_rgba++ * alpha + bg_green * comp_alpha; + *c_rgb++ = *j_rgba++ * alpha + bg_blue * comp_alpha; + } + break; + } + } + + if (jaffine) + { + jdouble *affine; + ArtAlphaGamma *alphagamma = NULL; + art_u8 *dst; + int new_width, new_height; + + affine = (*env)->GetDoubleArrayElements (env, jaffine, NULL); + + new_width = abs (width * affine[0]); + new_height = abs (height * affine[3]); + + dst = (art_u8 *) malloc (sizeof (art_u8) * 3 * (new_width * new_height)); + + art_rgb_affine (dst, + 0, 0, + new_width, new_height, + new_width * 3, + (art_u8 *) packed + offset * 3, + width, height, + scansize * 3, + affine, + ART_FILTER_NEAREST, + alphagamma); + + (*env)->ReleaseDoubleArrayElements (env, jaffine, affine, JNI_ABORT); + + free (packed); + packed = (guchar *) dst; + + width = scansize = new_width; + height = new_height; + offset = 0; + } + + gdk_threads_enter (); + + gdk_draw_rgb_image (g->drawable, + g->gc, + x + g->x_offset, + y + g->y_offset, + width, height, GDK_RGB_DITHER_NORMAL, + packed + offset * 3, scansize * 3); + + gdk_threads_leave (); + + free (pixels); + free (packed); + } diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c 2003-12-13 01:15:47.000000000 +0000 *************** *** 0 **** --- 1,111 ---- + /* gtklabelpeer.c -- Native implementation of GtkLabelPeer + Copyright (C) 1998, 1999 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #include "gtkpeer.h" + #include "gnu_java_awt_peer_gtk_GtkLabelPeer.h" + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkLabelPeer_create + (JNIEnv *env, jobject obj, jstring text, jfloat xalign) + { + GtkWidget *label; + GtkWidget *ebox; + GtkContainer *ebox_container; + const char *str; + + /* Create global reference and save it for future use */ + NSA_SET_GLOBAL_REF (env, obj); + + str = (*env)->GetStringUTFChars (env, text, 0); + + gdk_threads_enter (); + + ebox = gtk_event_box_new (); + ebox_container = GTK_CONTAINER (ebox); + label = gtk_label_new (str); + gtk_misc_set_alignment (GTK_MISC (label), xalign, 0.5); + gtk_container_add (ebox_container, label); + gtk_widget_show (label); + + gdk_threads_leave (); + + (*env)->ReleaseStringUTFChars (env, text, str); + + NSA_SET_PTR (env, obj, ebox); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkLabelPeer_setText + (JNIEnv *env, jobject obj, jstring text) + { + const char *str; + void *ptr; + GtkWidget *label; + + ptr = NSA_GET_PTR (env, obj); + + str = (*env)->GetStringUTFChars (env, text, 0); + + gdk_threads_enter (); + + label = gtk_bin_get_child (GTK_BIN(ptr)); + + gtk_label_set_label (GTK_LABEL (label), str); + + gdk_threads_leave (); + + (*env)->ReleaseStringUTFChars (env, text, str); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkLabelPeer_nativeSetAlignment + (JNIEnv *env, jobject obj, jfloat xalign) + { + void *ptr; + GtkWidget *label; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + + label = gtk_bin_get_child (GTK_BIN(ptr)); + + gtk_misc_set_alignment (GTK_MISC (label), xalign, 0.5); + + gdk_threads_leave (); + } diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c 2003-12-13 01:15:47.000000000 +0000 *************** *** 0 **** --- 1,347 ---- + /* gtklistpeer.c -- Native implementation of GtkListPeer + Copyright (C) 1998, 1999 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #include "gtkpeer.h" + #include "gnu_java_awt_peer_gtk_GtkComponentPeer.h" + #include "gnu_java_awt_peer_gtk_GtkListPeer.h" + + static void item_select (GtkCList *list __attribute__((unused)), + int row, int col __attribute__((unused)), + GdkEventButton *event __attribute__((unused)), + jobject peer_obj); + static void item_unselect (GtkCList *list __attribute__((unused)), + int row, + int col __attribute__((unused)), + GdkEventButton *event __attribute__((unused)), + jobject peer_obj); + + #define CLIST_FROM_SW(obj) (GTK_CLIST(GTK_SCROLLED_WINDOW (obj)->container.child)) + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkListPeer_create + (JNIEnv *env, jobject obj) + { + GtkWidget *list, *sw; + + /* Create global reference and save it for future use */ + NSA_SET_GLOBAL_REF (env, obj); + + gdk_threads_enter (); + + list = gtk_clist_new (1); + gtk_widget_show (list); + sw = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), + GTK_POLICY_AUTOMATIC, + GTK_POLICY_AUTOMATIC); + gtk_container_add (GTK_CONTAINER (sw), list); + + gdk_threads_leave (); + + NSA_SET_PTR (env, obj, sw); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkListPeer_connectJObject + (JNIEnv *env, jobject obj) + { + void *ptr; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + + gtk_widget_realize (GTK_WIDGET (ptr)); + + connect_awt_hook (env, obj, 1, GTK_WIDGET (ptr)->window); + + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkListPeer_connectSignals + (JNIEnv *env, jobject obj) + { + GtkCList *list; + void *ptr = NSA_GET_PTR (env, obj); + jobject *gref = NSA_GET_GLOBAL_REF (env, obj); + g_assert (gref); + + gdk_threads_enter (); + + gtk_widget_realize (GTK_WIDGET (ptr)); + + /* connect selectable hook */ + + list = CLIST_FROM_SW (ptr); + + g_signal_connect (G_OBJECT (list), "select_row", + GTK_SIGNAL_FUNC (item_select), *gref); + + g_signal_connect (G_OBJECT (list), "unselect_row", + GTK_SIGNAL_FUNC (item_unselect), *gref); + + /* Connect the superclass signals. */ + /* FIXME: Cannot do that here or it will get the sw and not the list. + We must a generic way of doing this. */ + /* Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals (env, peer_obj); */ + g_signal_connect (GTK_OBJECT (list), "event", + G_CALLBACK (pre_event_handler), *gref); + + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkListPeer_append + (JNIEnv *env, jobject obj, jobjectArray items) + { + void *ptr; + GtkCList *list; + jint count, i; + + ptr = NSA_GET_PTR (env, obj); + + count = (*env)->GetArrayLength (env, items); + + gdk_threads_enter (); + list = CLIST_FROM_SW (ptr); + for (i = 0; i < count; i++) + { + const char *text; + jobject item; + + item = (*env)->GetObjectArrayElement (env, items, i); + + text = (*env)->GetStringUTFChars (env, item, NULL); + gtk_clist_append (list, (char **)&text); + (*env)->ReleaseStringUTFChars (env, item, text); + } + + gtk_clist_columns_autosize (list); + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkListPeer_add + (JNIEnv *env, jobject obj, jstring text, jint index) + { + void *ptr; + const char *str; + + ptr = NSA_GET_PTR (env, obj); + str = (*env)->GetStringUTFChars (env, text, NULL); + + gdk_threads_enter (); + gtk_clist_insert (CLIST_FROM_SW (ptr), index, (char **)&str); + gdk_threads_leave (); + + (*env)->ReleaseStringUTFChars (env, text, str); + } + + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkListPeer_delItems + (JNIEnv *env, jobject obj, jint start, jint end) + { + void *ptr; + GtkCList *list; + jint i; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + list = CLIST_FROM_SW (ptr); + + if (end == -1) /* special case for removing all rows */ + gtk_clist_clear (list); + else + { + gtk_clist_freeze (list); + for (i = end; i >= start; i--) + gtk_clist_remove (list, i); + gtk_clist_thaw (list); + } + + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkListPeer_select + (JNIEnv *env, jobject obj, jint index) + { + void *ptr; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + gtk_clist_select_row (CLIST_FROM_SW (ptr), index, 0); + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkListPeer_deselect + (JNIEnv *env, jobject obj, jint index) + { + void *ptr; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + gtk_clist_unselect_row (CLIST_FROM_SW (ptr), index, 0); + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkListPeer_getSize + (JNIEnv *env, jobject obj, jint rows, jintArray jdims) + { + void *ptr; + jint *dims; + GtkWidget *list; + GtkScrolledWindow *sw; + GtkRequisition myreq; + + dims = (*env)->GetIntArrayElements (env, jdims, NULL); + dims[0] = dims[1] = 0; + + if (rows < 3) + rows = 3; + + ptr = NSA_GET_PTR (env, obj); + gdk_threads_enter (); + + list = GTK_WIDGET (CLIST_FROM_SW (ptr)); + sw = GTK_SCROLLED_WINDOW (ptr); + + gtk_widget_size_request(GTK_WIDGET(sw), &myreq); + dims[1]=myreq.height; + dims[0]=myreq.width; + + gdk_threads_leave (); + + (*env)->ReleaseIntArrayElements (env, jdims, dims, 0); + } + + + JNIEXPORT jintArray JNICALL + Java_gnu_java_awt_peer_gtk_GtkListPeer_getSelectedIndexes + (JNIEnv *env, jobject obj) + { + void *ptr; + GtkCList *list; + jintArray selection; + jint *sel; + GList *child; + jint count, i; + + ptr = NSA_GET_PTR (env, obj); + gdk_threads_enter (); + + list = CLIST_FROM_SW (ptr); + count = g_list_length (list->selection); + + selection = (*env)->NewIntArray (env, count); + sel = (*env)->GetIntArrayElements (env, selection, NULL); + + for (i = 0, child = list->selection; i < count; i++) + { + sel[i] = GPOINTER_TO_INT (child->data); + child = g_list_next (child); + } + gdk_threads_leave (); + + (*env)->ReleaseIntArrayElements (env, selection, sel, 0); + + return selection; + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkListPeer_makeVisible + (JNIEnv *env, jobject obj, jint index) + { + void *ptr; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + gtk_clist_moveto (CLIST_FROM_SW (ptr), index, 0, 0.5, 0.5); + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkListPeer_setMultipleMode + (JNIEnv *env, jobject obj, jboolean mode) + { + void *ptr; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + gtk_clist_set_selection_mode (CLIST_FROM_SW (ptr), + mode ? GTK_SELECTION_MULTIPLE : + GTK_SELECTION_SINGLE); + gdk_threads_leave (); + } + + static void + item_select (GtkCList *list __attribute__((unused)), + int row, int col __attribute__((unused)), + GdkEventButton *event __attribute__((unused)), + jobject peer_obj) + { + //g_print ("select_row\n"); + (*gdk_env)->CallVoidMethod (gdk_env, peer_obj, + postListItemEventID, + row, + (jint) AWT_ITEM_SELECTED); + } + + static void + item_unselect (GtkCList *list __attribute__((unused)), + int row, + int col __attribute__((unused)), + GdkEventButton *event __attribute__((unused)), + jobject peer_obj) + { + //g_print ("unselect_row\n"); + (*gdk_env)->CallVoidMethod (gdk_env, peer_obj, + postListItemEventID, + row, + (jint) AWT_ITEM_DESELECTED); + } + diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c 2004-01-13 20:54:46.000000000 +0000 *************** *** 0 **** --- 1,209 ---- + /* gtkmainthread.c -- Native implementation of GtkMainThread + Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #include "gtkpeer.h" + #include "gnu_java_awt_peer_gtk_GtkMainThread.h" + #include "gthread-jni.h" + + #ifdef JVM_SUN + struct state_table *native_state_table; + struct state_table *native_global_ref_table; + #endif + + jmethodID setBoundsCallbackID; + + jmethodID postActionEventID; + jmethodID postMenuActionEventID; + jmethodID postMouseEventID; + jmethodID postConfigureEventID; + jmethodID postExposeEventID; + jmethodID postKeyEventID; + jmethodID postFocusEventID; + jmethodID postAdjustmentEventID; + jmethodID postItemEventID; + jmethodID choicePostItemEventID; + jmethodID postListItemEventID; + jmethodID postTextEventID; + jmethodID postWindowEventID; + + JNIEnv *gdk_env; + + #ifdef PORTABLE_NATIVE_SYNC + JavaVM *gdk_vm; + #endif + + GtkWindowGroup *global_gtk_window_group; + + /* + * Call gtk_init. It is very important that this happen before any other + * gtk calls. + */ + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkMainThread_gtkInit (JNIEnv *env, jclass clazz) + { + int argc = 1; + char **argv; + char *homedir, *rcpath = NULL; + /* jclass gtkgenericpeer; */ + jclass gtkcomponentpeer, gtkchoicepeer, gtkwindowpeer, gtkscrollbarpeer, gtklistpeer, + gtkmenuitempeer, gtktextcomponentpeer, window; + + NSA_INIT (env, clazz); + + /* GTK requires a program's argc and argv variables, and requires that they + be valid. */ + + argv = (char **) malloc (sizeof (char *) * 2); + argv[0] = ""; + argv[1] = NULL; + + /* until we have JDK 1.2 JNI, assume we have a VM with threads that + match what GLIB was compiled for */ + #ifdef PORTABLE_NATIVE_SYNC + (*env)->GetJavaVM( env, &gdk_vm ); + g_thread_init ( &g_thread_jni_functions ); + printf("called gthread init\n"); + #else + g_thread_init ( NULL ); + #endif + + /* From GDK 2.0 onwards we have to explicitly call gdk_threads_init */ + gdk_threads_init(); + + gtk_init (&argc, &argv); + + gdk_rgb_init (); + gtk_widget_set_default_colormap (gdk_rgb_get_cmap ()); + gtk_widget_set_default_visual (gdk_rgb_get_visual ()); + + /* Make sure queued calls don't get sent to GTK/GDK while + we're shutting down. */ + atexit (gdk_threads_enter); + + gdk_env = env; + gdk_event_handler_set ((GdkEventFunc)awt_event_handler, NULL, NULL); + + if ((homedir = getenv ("HOME"))) + { + rcpath = (char *) malloc (strlen (homedir) + strlen (RC_FILE) + 2); + sprintf (rcpath, "%s/%s", homedir, RC_FILE); + } + + gtk_rc_parse ((rcpath) ? rcpath : RC_FILE); + + if (rcpath) + free (rcpath); + + free (argv); + + /* setup cached IDs for posting GTK events to Java */ + /* gtkgenericpeer = (*env)->FindClass (env, */ + /* "gnu/java/awt/peer/gtk/GtkGenericPeer"); */ + + window = (*env)->FindClass (env, "java/awt/Window"); + + gtkcomponentpeer = (*env)->FindClass (env, + "gnu/java/awt/peer/gtk/GtkComponentPeer"); + gtkchoicepeer = (*env)->FindClass (env, + "gnu/java/awt/peer/gtk/GtkChoicePeer"); + gtkwindowpeer = (*env)->FindClass (env, + "gnu/java/awt/peer/gtk/GtkWindowPeer"); + gtkscrollbarpeer = (*env)->FindClass (env, + "gnu/java/awt/peer/gtk/GtkScrollbarPeer"); + gtklistpeer = (*env)->FindClass (env, "gnu/java/awt/peer/gtk/GtkListPeer"); + gtkmenuitempeer = (*env)->FindClass (env, + "gnu/java/awt/peer/gtk/GtkMenuItemPeer"); + gtktextcomponentpeer = (*env)->FindClass (env, + "gnu/java/awt/peer/gtk/GtkTextComponentPeer"); + /* gdkColor = (*env)->FindClass (env, */ + /* "gnu/java/awt/peer/gtk/GdkColor"); */ + /* gdkColorID = (*env)->GetMethodID (env, gdkColor, "", "(III)V"); */ + /* postActionEventID = (*env)->GetMethodID (env, gtkgenericpeer, */ + /* "postActionEvent", */ + /* "(Ljava/lang/String;I)V"); */ + + setBoundsCallbackID = (*env)->GetMethodID (env, window, + "setBoundsCallback", + "(IIII)V"); + + postMenuActionEventID = (*env)->GetMethodID (env, gtkmenuitempeer, + "postMenuActionEvent", + "()V"); + postMouseEventID = (*env)->GetMethodID (env, gtkcomponentpeer, + "postMouseEvent", "(IJIIIIZ)V"); + postConfigureEventID = (*env)->GetMethodID (env, gtkwindowpeer, + "postConfigureEvent", "(IIII)V"); + postWindowEventID = (*env)->GetMethodID (env, gtkwindowpeer, + "postWindowEvent", + "(ILjava/awt/Window;I)V"); + postExposeEventID = (*env)->GetMethodID (env, gtkcomponentpeer, + "postExposeEvent", "(IIII)V"); + postKeyEventID = (*env)->GetMethodID (env, gtkcomponentpeer, + "postKeyEvent", "(IJIICI)V"); + postFocusEventID = (*env)->GetMethodID (env, gtkcomponentpeer, + "postFocusEvent", "(IZ)V"); + postAdjustmentEventID = (*env)->GetMethodID (env, gtkscrollbarpeer, + "postAdjustmentEvent", + "(II)V"); + postItemEventID = (*env)->GetMethodID (env, gtkcomponentpeer, + "postItemEvent", + "(Ljava/lang/Object;I)V"); + choicePostItemEventID = (*env)->GetMethodID (env, gtkchoicepeer, + "choicePostItemEvent", + "(Ljava/lang/String;I)V"); + postListItemEventID = (*env)->GetMethodID (env, gtklistpeer, + "postItemEvent", + "(II)V"); + postTextEventID = (*env)->GetMethodID (env, gtktextcomponentpeer, + "postTextEvent", + "()V"); + global_gtk_window_group = gtk_window_group_new (); + } + + /* + * Run gtk_main and block. + */ + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkMainThread_gtkMain + (JNIEnv *env __attribute__((unused)), jobject obj __attribute__((unused))) + { + gdk_threads_enter (); + gtk_main (); + gdk_threads_leave (); + } diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuBarPeer.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuBarPeer.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuBarPeer.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuBarPeer.c 2003-12-13 01:15:47.000000000 +0000 *************** *** 0 **** --- 1,86 ---- + /* gtkmenubarpeer.c -- Native implementation of GtkMenuBarPeer + Copyright (C) 1999 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #include "gtkpeer.h" + #include "gnu_java_awt_peer_gtk_GtkMenuBarPeer.h" + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkMenuBarPeer_create + (JNIEnv *env, jobject obj) + { + GtkWidget *widget; + + /* Create global reference and save it for future use */ + NSA_SET_GLOBAL_REF (env, obj); + + gdk_threads_enter (); + + widget = gtk_menu_bar_new (); + gtk_widget_show (widget); + + gdk_threads_leave (); + + NSA_SET_PTR (env, obj, widget); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkMenuBarPeer_addMenu + (JNIEnv *env, jobject obj, jobject menupeer) + { + void *mbar, *menu; + + mbar = NSA_GET_PTR (env, obj); + menu = NSA_GET_PTR (env, menupeer); + + gdk_threads_enter (); + gtk_menu_bar_append (GTK_MENU_BAR (mbar), GTK_WIDGET (menu)); + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkMenuBarPeer_delMenu + (JNIEnv *env, jobject obj, jint index) + { + void *ptr; + GList *list; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + list = gtk_container_children (GTK_CONTAINER (ptr)); + list = g_list_nth (list, index); + gtk_container_remove (GTK_CONTAINER (ptr), GTK_WIDGET (list->data)); + gdk_threads_leave (); + } diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.c 2003-12-13 01:15:47.000000000 +0000 *************** *** 0 **** --- 1,112 ---- + /* gtkmenuitempeer.c -- Native implementation of GtkMenuItemPeer + Copyright (C) 1999 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #include "gtkpeer.h" + #include "gnu_java_awt_peer_gtk_GtkMenuItemPeer.h" + #include "gnu_java_awt_peer_gtk_GtkComponentPeer.h" + + static void item_activate (GtkMenuItem *item __attribute__((unused)), + jobject *peer_obj); + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkMenuItemPeer_create + (JNIEnv *env, jobject obj, jstring label) + { + GtkWidget *widget; + const char *str; + jobject *gref; + + /* Create global reference and save it for future use */ + NSA_SET_GLOBAL_REF (env, obj); + gref = NSA_GET_GLOBAL_REF (env, obj); + + str = (*env)->GetStringUTFChars (env, label, NULL); + + gdk_threads_enter (); + + if (strcmp (str, "-") == 0) /* "-" signals that we need a separator */ + widget = gtk_menu_item_new (); + else + widget = gtk_menu_item_new_with_label (str); + + /* Connect activate hook */ + g_signal_connect (G_OBJECT (widget), "activate", + GTK_SIGNAL_FUNC (item_activate), *gref); + + gtk_widget_show (widget); + + gdk_threads_leave (); + + (*env)->ReleaseStringUTFChars (env, label, str); + + NSA_SET_PTR (env, obj, widget); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkMenuItemPeer_setLabel + (JNIEnv *env, jobject obj, jstring label) + { + void *ptr; + const char *str; + + ptr = NSA_GET_PTR (env, obj); + + str = (*env)->GetStringUTFChars (env, label, NULL); + + gdk_threads_enter (); + + if (strcmp (str, "-") == 0) /* "-" signals that we need a separator */ + gtk_container_remove (GTK_CONTAINER (ptr), GTK_BIN (ptr)->child); + else + { + GtkAccelLabel *accel_label = GTK_ACCEL_LABEL (GTK_BIN (ptr)->child); + + gtk_label_set_text (GTK_LABEL (accel_label), str); + gtk_accel_label_refetch (accel_label); + } + + gdk_threads_leave (); + + (*env)->ReleaseStringUTFChars (env, label, str); + } + + static void + item_activate (GtkMenuItem *item __attribute__((unused)), jobject *peer_obj) + { + (*gdk_env)->CallVoidMethod (gdk_env, *peer_obj, + postMenuActionEventID); + } + diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c 2003-12-13 01:15:47.000000000 +0000 *************** *** 0 **** --- 1,158 ---- + /* gtkmenupeer.c -- Native implementation of GtkMenuPeer + Copyright (C) 1999 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #include "gtkpeer.h" + #include "gnu_java_awt_peer_gtk_GtkMenuPeer.h" + + static void + accel_attach (GtkMenuItem *menu_item, + gpointer *user_data __attribute__((unused))) + { + GtkAccelGroup *accel; + + accel = gtk_menu_get_accel_group (GTK_MENU (menu_item->submenu)); + _gtk_accel_group_attach (accel, + G_OBJECT (gtk_widget_get_toplevel (GTK_WIDGET(menu_item)))); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkMenuPeer_setupAccelGroup + (JNIEnv *env, jobject obj, jobject parent) + { + void *ptr1, *ptr2; + + ptr1 = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + if (!parent) + { + gtk_menu_set_accel_group (GTK_MENU (GTK_MENU_ITEM (ptr1)->submenu), + gtk_accel_group_new ()); + + if (GTK_WIDGET_REALIZED (GTK_WIDGET (ptr1))) + accel_attach (GTK_MENU_ITEM (ptr1), NULL); + else + g_signal_connect (G_OBJECT (ptr1), + "realize", + GTK_SIGNAL_FUNC (accel_attach), + NULL); + } + else + { + GtkAccelGroup *parent_accel; + + ptr2 = NSA_GET_PTR (env, parent); + parent_accel = gtk_menu_get_accel_group (GTK_MENU (GTK_MENU_ITEM (ptr2)->submenu)); + + gtk_menu_set_accel_group (GTK_MENU (GTK_MENU_ITEM (ptr1)->submenu), + parent_accel); + } + + gdk_threads_leave (); + } + + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkMenuPeer_create + (JNIEnv *env, jobject obj, jstring label) + { + GtkWidget *menu_title, *menu; + const char *str; + + /* Create global reference and save it for future use */ + NSA_SET_GLOBAL_REF (env, obj); + + str = (*env)->GetStringUTFChars (env, label, NULL); + + gdk_threads_enter (); + + menu = gtk_menu_new (); + + menu_title = gtk_menu_item_new_with_label (str); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_title), menu); + + gtk_widget_show (menu); + gtk_widget_show (menu_title); + + NSA_SET_PTR (env, obj, menu_title); + + gdk_threads_leave (); + + (*env)->ReleaseStringUTFChars (env, label, str); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkMenuPeer_addItem + (JNIEnv *env, jobject obj, jobject menuitempeer, jint key, jboolean shift) + { + void *ptr1, *ptr2; + GtkMenu *menu; + + ptr1 = NSA_GET_PTR (env, obj); + ptr2 = NSA_GET_PTR (env, menuitempeer); + + gdk_threads_enter (); + + menu = GTK_MENU (GTK_MENU_ITEM (ptr1)->submenu); + gtk_menu_append (menu, GTK_WIDGET (ptr2)); + + if (key) + { + gtk_widget_add_accelerator (GTK_WIDGET (ptr2), "activate", + gtk_menu_get_accel_group (menu), key, + (GDK_CONTROL_MASK + | ((shift) ? GDK_SHIFT_MASK : 0)), + GTK_ACCEL_VISIBLE); + } + + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkMenuPeer_delItem + (JNIEnv *env, jobject obj, jint index) + { + void *ptr; + GList *list; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + list = gtk_container_children (GTK_CONTAINER (ptr)); + list = g_list_nth (list, index); + gtk_container_remove (GTK_CONTAINER (ptr), GTK_WIDGET (list->data)); + gdk_threads_leave (); + } + + diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPanelPeer.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPanelPeer.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPanelPeer.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPanelPeer.c 2003-12-13 01:15:47.000000000 +0000 *************** *** 0 **** --- 1,138 ---- + /* gtkpanelpeer.c -- Native implementation of GtkPanelPeer + Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #include "gtkpeer.h" + #include "gnu_java_awt_peer_gtk_GtkComponentPeer.h" + #include "gnu_java_awt_peer_gtk_GtkPanelPeer.h" + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkPanelPeer_create + (JNIEnv *env, jobject obj) + { + gpointer widget; + + /* Create global reference and save it for future use */ + NSA_SET_GLOBAL_REF (env, obj); + + gdk_threads_enter (); + + widget = gtk_layout_new (NULL, NULL); + + gdk_threads_leave (); + + NSA_SET_PTR (env, obj, widget); + } + + typedef struct _GtkLayoutChild GtkLayoutChild; + + struct _GtkLayoutChild { + GtkWidget *widget; + gint x; + gint y; + }; + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkPanelPeer_connectJObject + (JNIEnv *env, jobject obj) + { + void *ptr; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + gtk_widget_realize (GTK_WIDGET (ptr)); + connect_awt_hook (env, obj, 1, GTK_LAYOUT (ptr)->bin_window); + + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkPanelPeer_connectSignals + (JNIEnv *env, jobject obj) + { + void *ptr = NSA_GET_PTR (env, obj); + jobject *gref = NSA_GET_GLOBAL_REF (env, obj); + g_assert (gref); + + gdk_threads_enter (); + gtk_widget_realize (GTK_WIDGET (ptr)); + + /* FIXME: If we don't need this then remove this method. */ + /* g_signal_connect (G_OBJECT (ptr), "size_request", GTK_SIGNAL_FUNC (sr), */ + /* NULL); */ + gdk_threads_leave (); + + /* Connect the superclass signals. */ + Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals (env, obj); + } + + /* FIXME: The following doesn't seem to be used. + Is not declared as a native function in GtkPanelPeer.java */ + /* + * Make a new panel. + */ + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkPanelPeer_gtkPanelNew + (JNIEnv *env, jobject obj, jobject parent_obj) + { + GtkWidget *layout; + void *parent; + + /* Create global reference and save it for future use */ + NSA_SET_GLOBAL_REF (env, obj); + + parent = NSA_GET_PTR (env, parent_obj); + + gdk_threads_enter (); + + layout = gtk_layout_new (NULL, NULL); + + set_parent (layout, GTK_CONTAINER (parent)); + + gtk_widget_realize (layout); + + connect_awt_hook (env, obj, 1, GTK_LAYOUT (layout)->bin_window); + + set_visible (layout, 1); + + gdk_threads_leave (); + + NSA_SET_PTR (env, obj, layout); + } + + diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c 2003-10-08 15:49:33.000000000 +0000 *************** *** 0 **** --- 1,97 ---- + /* gtkpopupmenupeer.c -- Native implementation of GtkPopupMenuPeer + Copyright (C) 1999 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #include "gtkpeer.h" + #include "gnu_java_awt_peer_gtk_GtkPopupMenuPeer.h" + + struct pos + { + gint x; + gint y; + }; + + void + menu_pos (GtkMenu *menu __attribute__((unused)), + gint *x, gint *y, + gboolean *push_in, + gpointer user_data) + { + struct pos *p = (struct pos *) user_data; + + *x = p->x; + *y = p->y; + *push_in = TRUE; + } + + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkPopupMenuPeer_show + (JNIEnv *env, jobject obj, jint x, jint y, jlong time) + { + void *ptr; + struct pos *p; + + ptr = NSA_GET_PTR (env, obj); + + p = g_malloc (sizeof (struct pos)); + p->x = x; + p->y = y; + + gdk_threads_enter (); + gtk_menu_popup (GTK_MENU (GTK_MENU_ITEM (ptr)->submenu), + NULL, NULL, menu_pos, p, 3, time); + gdk_threads_leave (); + + g_free (p); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkPopupMenuPeer_setupAccelGroup + (JNIEnv *env, jobject obj, jobject parent) + { + void *ptr1, *ptr2; + GtkMenu *menu; + + ptr1 = NSA_GET_PTR (env, obj); + ptr2 = NSA_GET_PTR (env, parent); + + gdk_threads_enter (); + menu = GTK_MENU (GTK_MENU_ITEM (ptr1)->submenu); + gtk_menu_set_accel_group (menu, gtk_accel_group_new ()); + _gtk_accel_group_attach (gtk_menu_get_accel_group (menu), + G_OBJECT (gtk_widget_get_toplevel (ptr2))); + gdk_threads_leave (); + } diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c 2003-12-13 01:15:47.000000000 +0000 *************** *** 0 **** --- 1,233 ---- + /* gtkscrollbarpeer.c -- Native implementation of GtkScrollbarPeer + Copyright (C) 1998, 1999 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #include "gtkpeer.h" + #include "gnu_java_awt_peer_gtk_GtkComponentPeer.h" + #include "gnu_java_awt_peer_gtk_GtkScrollbarPeer.h" + + struct range_scrollbar + { + GtkRange *range; + jobject *scrollbar; + }; + + static void + post_change_event (GtkRange *range, + struct range_scrollbar *rs) + { + GtkAdjustment *adj; + adj = gtk_range_get_adjustment (range); + (*gdk_env)->CallVoidMethod (gdk_env, *(rs->scrollbar), postAdjustmentEventID, + AWT_ADJUSTMENT_TRACK, (jint) adj->value); + + } + + static void + post_adjustment_event (GtkRange *range, GtkScrollType scroll, + struct range_scrollbar *rs) + { + jint type; + GtkAdjustment *adj; + + adj = gtk_range_get_adjustment (range); + + switch (scroll) + { + case GTK_SCROLL_STEP_UP: + case GTK_SCROLL_STEP_RIGHT: + case GTK_SCROLL_STEP_FORWARD: + type = AWT_ADJUSTMENT_UNIT_INCREMENT; + break; + case GTK_SCROLL_STEP_DOWN: + case GTK_SCROLL_STEP_LEFT: + case GTK_SCROLL_STEP_BACKWARD: + type = AWT_ADJUSTMENT_UNIT_DECREMENT; + break; + case GTK_SCROLL_PAGE_UP: + case GTK_SCROLL_PAGE_RIGHT: + case GTK_SCROLL_PAGE_FORWARD: + type = AWT_ADJUSTMENT_BLOCK_INCREMENT; + break; + case GTK_SCROLL_PAGE_DOWN: + case GTK_SCROLL_PAGE_LEFT: + case GTK_SCROLL_PAGE_BACKWARD: + type = AWT_ADJUSTMENT_BLOCK_DECREMENT; + break; + case GTK_SCROLL_JUMP: + case GTK_SCROLL_NONE: /* Apparently generated when slider is dragged. */ + type = AWT_ADJUSTMENT_TRACK; + break; + default: /* Can this happen? If so, is this right? */ + return; + } + + (*gdk_env)->CallVoidMethod (gdk_env, *(rs->scrollbar), postAdjustmentEventID, + type, (jint) adj->value); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkScrollbarPeer_create + (JNIEnv *env, jobject obj, jint orientation, jint value, + jint min, jint max, jint step_incr, jint page_incr, jint visible_amount) + { + GtkWidget *sb; + GtkObject *adj; + + /* Create global reference and save it for future use */ + NSA_SET_GLOBAL_REF (env, obj); + + gdk_threads_enter (); + + adj = gtk_adjustment_new (value, min, max, + step_incr, page_incr, + visible_amount); + + sb = (orientation) ? gtk_vscrollbar_new (GTK_ADJUSTMENT (adj)) : + gtk_hscrollbar_new (GTK_ADJUSTMENT (adj)); + + gdk_threads_leave (); + + NSA_SET_PTR (env, obj, sb); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkScrollbarPeer_connectJObject + (JNIEnv *env, jobject obj) + { + void *ptr; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + + gtk_widget_realize (GTK_WIDGET (ptr)); + + connect_awt_hook (env, obj, 1, GTK_SCROLLBAR (ptr)->range); + + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkScrollbarPeer_connectSignals + (JNIEnv *env, jobject obj) + { + struct range_scrollbar *rs; + void *ptr = NSA_GET_PTR (env, obj); + jobject *gref = NSA_GET_GLOBAL_REF (env, obj); + g_assert (gref); + + rs = (struct range_scrollbar *) malloc (sizeof (struct range_scrollbar)); + + gdk_threads_enter (); + + gtk_widget_realize (GTK_WIDGET (ptr)); + + rs->range = GTK_RANGE (ptr); + rs->scrollbar = gref; + + g_signal_connect (G_OBJECT (GTK_RANGE (ptr)), + "move-slider", + GTK_SIGNAL_FUNC (post_adjustment_event), rs); + + g_signal_connect (G_OBJECT (GTK_RANGE (ptr)), + "value-changed", + GTK_SIGNAL_FUNC (post_change_event), rs); + + gdk_threads_leave (); + + /* Connect the superclass signals. */ + Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals (env, obj); + } + + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkScrollbarPeer_setLineIncrement + (JNIEnv *env, jobject obj, jint amount) + { + void *ptr; + GtkAdjustment *adj; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + + adj = GTK_RANGE (ptr)->adjustment; + adj->step_increment = amount; + gtk_adjustment_changed (adj); + + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkScrollbarPeer_setPageIncrement + (JNIEnv *env, jobject obj, jint amount) + { + void *ptr; + GtkAdjustment *adj; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + + adj = GTK_RANGE (ptr)->adjustment; + adj->page_increment = amount; + gtk_adjustment_changed (adj); + + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkScrollbarPeer_setValues + (JNIEnv *env, jobject obj, jint value, jint visible, jint min, jint max) + { + void *ptr; + GtkAdjustment *adj; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + + adj = GTK_RANGE (ptr)->adjustment; + adj->value = value; + adj->page_size = visible; + adj->lower = min; + adj->upper = max; + gtk_adjustment_changed (adj); + + gdk_threads_leave (); + } diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.c 2004-01-05 21:35:33.000000000 +0000 *************** *** 0 **** --- 1,193 ---- + /* gtkscrollpanepeer.c -- Native implementation of GtkScrollPanePeer + Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #include "gtkpeer.h" + #include "gnu_java_awt_peer_gtk_GtkScrollPanePeer.h" + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkScrollPanePeer_create + (JNIEnv *env, jobject obj, int width, int height) + { + GtkWidget *sw; + + /* Create global reference and save it for future use */ + NSA_SET_GLOBAL_REF (env, obj); + + gdk_threads_enter (); + + sw = gtk_scrolled_window_new (NULL, NULL); + + gtk_widget_set_size_request (sw, width, height); + + gdk_threads_leave (); + + NSA_SET_PTR (env, obj, sw); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkScrollPanePeer_setScrollPosition + (JNIEnv *env, jobject obj, jint x, jint y) + { + GtkAdjustment *hadj, *vadj; + GtkScrolledWindow *sw; + void *ptr; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + sw = GTK_SCROLLED_WINDOW (ptr); + + hadj = gtk_scrolled_window_get_hadjustment (sw); + vadj = gtk_scrolled_window_get_vadjustment (sw); + + gtk_adjustment_set_value (hadj, x); + gtk_adjustment_set_value (vadj, y); + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkScrollPanePeer_gtkScrolledWindowSetHScrollIncrement + (JNIEnv *env, jobject obj, jint u) + { + GtkAdjustment *hadj; + GtkScrolledWindow *sw; + void *ptr; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + sw = GTK_SCROLLED_WINDOW(ptr); + + hadj = gtk_scrolled_window_get_hadjustment (sw); + hadj->step_increment = u; + + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkScrollPanePeer_gtkScrolledWindowSetVScrollIncrement + (JNIEnv *env, jobject obj, jint u) + { + GtkAdjustment *vadj; + GtkScrolledWindow *sw; + void *ptr; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + sw = GTK_SCROLLED_WINDOW(ptr); + + vadj = gtk_scrolled_window_get_hadjustment (sw); + vadj->step_increment = u; + + gdk_threads_leave (); + } + + JNIEXPORT jint JNICALL + Java_gnu_java_awt_peer_gtk_GtkScrollPanePeer_getHScrollbarHeight + (JNIEnv *env, jobject obj) + { + void *ptr; + GtkScrolledWindow *sw; + GtkRequisition requisition; + jint height = 0; + jint spacing = 0; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + sw = GTK_SCROLLED_WINDOW (ptr); + + gtk_widget_size_request (sw->hscrollbar, &requisition); + gtk_widget_style_get (GTK_WIDGET (sw), "scrollbar_spacing", &spacing, NULL); + height = requisition.height + spacing; + + gdk_threads_leave (); + + return height; + } + + JNIEXPORT jint JNICALL + Java_gnu_java_awt_peer_gtk_GtkScrollPanePeer_getVScrollbarWidth + (JNIEnv *env, jobject obj) + { + void *ptr; + GtkScrolledWindow *sw; + GtkRequisition requisition; + jint width = 0; + jint spacing = 0; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + sw = GTK_SCROLLED_WINDOW (ptr); + + gtk_widget_size_request (sw->vscrollbar, &requisition); + gtk_widget_style_get (GTK_WIDGET (sw), "scrollbar_spacing", &spacing, NULL); + width = requisition.width + spacing; + + gdk_threads_leave (); + + return width; + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkScrollPanePeer_setPolicy + (JNIEnv *env, jobject obj, jint policy) + { + void *ptr; + + ptr = NSA_GET_PTR (env, obj); + + switch (policy) + { + case AWT_SCROLLPANE_SCROLLBARS_AS_NEEDED: + policy = GTK_POLICY_AUTOMATIC; + break; + case AWT_SCROLLPANE_SCROLLBARS_ALWAYS: + policy = GTK_POLICY_ALWAYS; + break; + case AWT_SCROLLPANE_SCROLLBARS_NEVER: + policy = GTK_POLICY_NEVER; + break; + } + + gdk_threads_enter (); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (ptr), policy, policy); + gdk_threads_leave (); + } diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c 2004-01-13 20:58:33.000000000 +0000 *************** *** 0 **** --- 1,222 ---- + /* gtktextareapeer.c -- Native implementation of GtkTextAreaPeer + Copyright (C) 1998, 1999, 2003 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #include "gtkpeer.h" + #include "gnu_java_awt_peer_gtk_GtkTextAreaPeer.h" + + #define TEXT_FROM_SW(obj) (GTK_TEXT_VIEW(GTK_SCROLLED_WINDOW (obj)->container.child)) + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_create + (JNIEnv *env, jobject obj, + jint textview_width, jint textview_height, jint scroll) + { + GtkWidget *text, *sw; + + /* Create global reference and save it for future use */ + NSA_SET_GLOBAL_REF (env, obj); + + gdk_threads_enter (); + + text = gtk_text_view_new (); + gtk_widget_set_size_request (text, textview_width, textview_height); + gtk_widget_show (text); + + sw = gtk_scrolled_window_new (NULL, NULL); + gtk_container_add (GTK_CONTAINER (sw), text); + + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), + /* horizontal scrollbar */ + (scroll == AWT_TEXTAREA_SCROLLBARS_BOTH + || scroll == AWT_TEXTAREA_SCROLLBARS_HORIZONTAL_ONLY) ? + GTK_POLICY_ALWAYS : GTK_POLICY_NEVER, + /* vertical scrollbar */ + (scroll == AWT_TEXTAREA_SCROLLBARS_BOTH + || scroll == AWT_TEXTAREA_SCROLLBARS_VERTICAL_ONLY) ? + GTK_POLICY_ALWAYS : GTK_POLICY_NEVER); + + gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (text), + (scroll == AWT_TEXTAREA_SCROLLBARS_BOTH + || scroll == AWT_TEXTAREA_SCROLLBARS_HORIZONTAL_ONLY) + ? GTK_WRAP_NONE : GTK_WRAP_WORD); + + gdk_threads_leave (); + + NSA_SET_PTR (env, obj, sw); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_insert + (JNIEnv *env, jobject obj, jstring contents, jint position) + { + GtkTextBuffer *buf; + GtkTextIter iter; + GtkWidget *text; + void *ptr; + const char *str; + int pos=position; + + ptr = NSA_GET_PTR (env, obj); + str = (*env)->GetStringUTFChars (env, contents, NULL); + + gdk_threads_enter (); + + text = GTK_WIDGET (TEXT_FROM_SW (ptr)); + + buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text)); + gtk_text_buffer_get_iter_at_offset (buf, &iter, pos); + gtk_text_buffer_insert (buf, &iter, str, strlen (str)); + + gdk_threads_leave (); + + (*env)->ReleaseStringUTFChars (env, contents, str); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_replaceRange + (JNIEnv *env, jobject obj, jstring contents, jint start, jint end) + { + GtkWidget *text; + GtkTextBuffer *buf; + GtkTextIter iter, startIter, endIter; + void *ptr; + const char *str; + int mystart = start; + int myend = end; + + ptr = NSA_GET_PTR (env, obj); + str = (*env)->GetStringUTFChars (env, contents, NULL); + + gdk_threads_enter (); + + text = GTK_WIDGET (TEXT_FROM_SW (ptr)); + + buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text)); + + gtk_text_buffer_get_iter_at_offset (buf, &startIter, mystart); + gtk_text_buffer_get_iter_at_offset (buf, &endIter, myend); + gtk_text_buffer_delete (buf, &startIter, &endIter); + + gtk_text_buffer_get_iter_at_offset (buf, &iter, mystart); + gtk_text_buffer_insert(buf, &iter, str, strlen (str)); + + gdk_threads_leave (); + (*env)->ReleaseStringUTFChars (env, contents, str); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_gtkSetFont + (JNIEnv *env, jobject obj, jstring name, jint style, jint size) + { + const char *font_name; + void *ptr; + GtkWidget *text; + PangoFontDescription *font_desc; + + ptr = NSA_GET_PTR (env, obj); + + text = GTK_WIDGET (TEXT_FROM_SW (ptr)); + + font_name = (*env)->GetStringUTFChars (env, name, NULL); + + gdk_threads_enter(); + + font_desc = pango_font_description_from_string (font_name); + pango_font_description_set_size (font_desc, size * PANGO_SCALE); + + if (style & AWT_STYLE_BOLD) + pango_font_description_set_weight (font_desc, PANGO_WEIGHT_BOLD); + + if (style & AWT_STYLE_ITALIC) + pango_font_description_set_style (font_desc, PANGO_STYLE_OBLIQUE); + + gtk_widget_modify_font (GTK_WIDGET(text), font_desc); + + pango_font_description_free (font_desc); + + gdk_threads_leave(); + + (*env)->ReleaseStringUTFChars (env, name, font_name); + } + + JNIEXPORT jint JNICALL + Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_getHScrollbarHeight + (JNIEnv *env, jobject obj) + { + void *ptr; + GtkScrolledWindow *sw; + GtkRequisition requisition; + jint height = 0; + jint spacing = 0; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + sw = GTK_SCROLLED_WINDOW (ptr); + + gtk_widget_size_request (sw->hscrollbar, &requisition); + gtk_widget_style_get (GTK_WIDGET (sw), "scrollbar_spacing", &spacing, NULL); + height = requisition.height + spacing; + + gdk_threads_leave (); + + return height; + } + + JNIEXPORT jint JNICALL + Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_getVScrollbarWidth + (JNIEnv *env, jobject obj) + { + void *ptr; + GtkScrolledWindow *sw; + GtkRequisition requisition; + jint width = 0; + jint spacing = 0; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + sw = GTK_SCROLLED_WINDOW (ptr); + + gtk_widget_size_request (sw->vscrollbar, &requisition); + gtk_widget_style_get (GTK_WIDGET (sw), "scrollbar_spacing", &spacing, NULL); + width = requisition.width + spacing; + + gdk_threads_leave (); + + return width; + } diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c 2003-12-13 01:15:47.000000000 +0000 *************** *** 0 **** --- 1,509 ---- + /* gtktextcomponentpeer.c -- Native implementation of GtkTextComponentPeer + Copyright (C) 1998, 1999 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #include "gtkpeer.h" + #include "gnu_java_awt_peer_gtk_GtkComponentPeer.h" + #include "gnu_java_awt_peer_gtk_GtkTextComponentPeer.h" + + static void textcomponent_commit_cb (GtkIMContext *context, + const gchar *str, + jobject peer); + + static void textcomponent_changed_cb (GtkEditable *editable, + jobject peer); + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_connectSignals + (JNIEnv *env, jobject obj) + { + GtkTextView *text = NULL; + GtkTextBuffer *buf; + void *ptr = NSA_GET_PTR (env, obj); + jobject *gref = NSA_GET_GLOBAL_REF (env, obj); + g_assert (gref); + + gdk_threads_enter (); + + if (GTK_IS_ENTRY(ptr)) + { + g_signal_connect (GTK_ENTRY (ptr)->im_context, "commit", + G_CALLBACK (textcomponent_commit_cb), *gref); + + g_signal_connect (GTK_EDITABLE (ptr), "changed", + G_CALLBACK (textcomponent_changed_cb), *gref); + + gdk_threads_leave (); + + /* Connect the superclass signals. */ + Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals (env, *gref); + } + else + { + if (GTK_IS_SCROLLED_WINDOW (ptr)) + { + text = GTK_TEXT_VIEW (GTK_SCROLLED_WINDOW (ptr)->container.child); + } + else if (GTK_IS_TEXT_VIEW (ptr)) + { + text = GTK_TEXT_VIEW (ptr); + } + + if (text) + { + g_signal_connect (text->im_context, "commit", + G_CALLBACK (textcomponent_commit_cb), *gref); + + buf = gtk_text_view_get_buffer (text); + if (buf) + g_signal_connect (buf, "changed", + G_CALLBACK (textcomponent_changed_cb), *gref); + + /* Connect the superclass signals. */ + /* FIXME: Cannot do that here or it will get the sw and not the list. + We must a generic way of doing this. */ + /* Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals (env, + obj); */ + g_signal_connect (GTK_OBJECT (text), "event", + G_CALLBACK (pre_event_handler), *gref); + + gdk_threads_leave (); + } + } + } + + JNIEXPORT jint JNICALL + Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_getCaretPosition + (JNIEnv *env, jobject obj) + { + void *ptr; + int pos = 0; + GtkEditable *editable; // type of GtkEntry (TextField) + GtkWidget *text = NULL; // type of GtkTextView (TextArea) + GtkTextBuffer *buf; + GtkTextMark *mark; + GtkTextIter iter; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + + if (GTK_IS_EDITABLE (ptr)) + { + editable = GTK_EDITABLE (ptr); + pos = gtk_editable_get_position (editable); + } + else + { + if (GTK_IS_SCROLLED_WINDOW (ptr)) + { + text = GTK_WIDGET (GTK_TEXT_VIEW (GTK_SCROLLED_WINDOW (ptr)->container.child)); + } + else if (GTK_IS_TEXT_VIEW (ptr)) + { + text = GTK_WIDGET (ptr); + } + + if (text) + { + buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text)); + mark = gtk_text_buffer_get_insert (buf); + gtk_text_buffer_get_iter_at_mark (buf, &iter, mark); + pos = gtk_text_iter_get_offset (&iter); + } + } + + gdk_threads_leave (); + + return pos; + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_setCaretPosition + (JNIEnv *env, jobject obj, jint pos) + { + void *ptr; + GtkEditable *editable; // type of GtkEntry (TextField) + GtkWidget *text = NULL; // type of GtkTextView (TextArea) + GtkTextBuffer *buf; + GtkTextIter iter; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + if (GTK_IS_EDITABLE (ptr)) + { + editable = GTK_EDITABLE (ptr); + gtk_editable_set_position (editable, pos); + } + else + { + if (GTK_IS_SCROLLED_WINDOW (ptr)) + { + text = GTK_WIDGET (GTK_TEXT_VIEW (GTK_SCROLLED_WINDOW (ptr)->container.child)); + } + else if (GTK_IS_TEXT_VIEW (ptr)) + { + text = GTK_WIDGET (ptr); + } + + if (text) + { + buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text)); + gtk_text_buffer_get_iter_at_offset (buf, &iter, pos); + gtk_text_buffer_place_cursor (buf, &iter); + } + } + + gdk_threads_leave (); + } + + JNIEXPORT jint JNICALL + Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_getSelectionStart + (JNIEnv *env, jobject obj) + { + void *ptr; + int pos = 0; + GtkEditable *editable; // type of GtkEntry (TextField) + GtkWidget *text = NULL; // type of GtkTextView (TextArea) + GtkTextBuffer *buf; + GtkTextIter start; + GtkTextIter end; + int starti, endi; + GtkTextMark *mark; + GtkTextIter iter; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + + if (GTK_IS_EDITABLE (ptr)) + { + editable = GTK_EDITABLE (ptr); + if (gtk_editable_get_selection_bounds (editable, &starti, &endi)) + pos = starti; + else + pos = gtk_editable_get_position (editable); + } + else + { + if (GTK_IS_SCROLLED_WINDOW (ptr)) + { + text = GTK_WIDGET (GTK_TEXT_VIEW (GTK_SCROLLED_WINDOW (ptr)->container.child)); + } + else if (GTK_IS_TEXT_VIEW (ptr)) + { + text = GTK_WIDGET (ptr); + } + + if (text) + { + buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text)); + if (gtk_text_buffer_get_selection_bounds(buf, &start, &end)) + pos = gtk_text_iter_get_offset (&start); + else + { + mark = gtk_text_buffer_get_insert (buf); + gtk_text_buffer_get_iter_at_mark (buf, &iter, mark); + pos = gtk_text_iter_get_offset (&iter); + } + } + } + + gdk_threads_leave (); + + return pos; + } + + JNIEXPORT jint JNICALL + Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_getSelectionEnd + (JNIEnv *env, jobject obj) + { + void *ptr; + int pos = 0; + GtkEditable *editable; // type of GtkEntry (TextField) + GtkWidget *text = NULL; // type of GtkTextView (TextArea) + GtkTextBuffer *buf; + GtkTextIter start; + GtkTextIter end; + int starti, endi; + GtkTextMark *mark; + GtkTextIter iter; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + + if (GTK_IS_EDITABLE (ptr)) + { + editable = GTK_EDITABLE (ptr); + if (gtk_editable_get_selection_bounds (editable, &starti, &endi)) + pos = endi; + else + pos = gtk_editable_get_position (editable); + } + else + { + if (GTK_IS_SCROLLED_WINDOW (ptr)) + { + text = GTK_WIDGET (GTK_TEXT_VIEW (GTK_SCROLLED_WINDOW (ptr)->container.child)); + } + else if (GTK_IS_TEXT_VIEW (ptr)) + { + text = GTK_WIDGET (ptr); + } + + if (text) + { + buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text)); + if (gtk_text_buffer_get_selection_bounds(buf, &start, &end)) + pos = gtk_text_iter_get_offset (&end); + else + { + mark = gtk_text_buffer_get_insert (buf); + gtk_text_buffer_get_iter_at_mark (buf, &iter, mark); + pos = gtk_text_iter_get_offset (&iter); + } + } + } + + gdk_threads_leave (); + + return pos; + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_select + (JNIEnv *env, jobject obj, jint start, jint end) + { + void *ptr; + GtkEditable *editable; // type of GtkEntry (TextField) + GtkWidget *text = NULL; // type of GtkTextView (TextArea) + GtkTextBuffer *buf; + GtkTextIter iter; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + + + if (GTK_IS_EDITABLE (ptr)) + { + editable = GTK_EDITABLE (ptr); + gtk_editable_select_region (editable, start, end); + } + else + { + if (GTK_IS_SCROLLED_WINDOW (ptr)) + { + text = GTK_WIDGET (GTK_TEXT_VIEW (GTK_SCROLLED_WINDOW (ptr)->container.child)); + } + else if (GTK_IS_TEXT_VIEW (ptr)) + { + text = GTK_WIDGET (ptr); + } + + if (text) + { + buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text)); + gtk_text_buffer_get_iter_at_offset (buf, &iter, start); + /* quickly move both 'insert' and 'selection_bound' to the + same position */ + gtk_text_buffer_place_cursor (buf, &iter); + gtk_text_buffer_get_iter_at_offset (buf, &iter, end); + gtk_text_buffer_move_mark_by_name (buf, "selection_bound", &iter); + } + } + + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_setEditable + (JNIEnv *env, jobject obj, jboolean state) + { + void *ptr; + GtkEditable *editable; // type of GtkEntry (TextField) + GtkWidget *text = NULL; // type of GtkTextView (TextArea) + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + + if (GTK_IS_EDITABLE (ptr)) + { + editable = GTK_EDITABLE (ptr); + gtk_editable_set_editable (editable, state); + } + else + { + if (GTK_IS_SCROLLED_WINDOW (ptr)) + { + text = GTK_WIDGET (GTK_TEXT_VIEW (GTK_SCROLLED_WINDOW (ptr)->container.child)); + } + else if (GTK_IS_TEXT_VIEW (ptr)) + { + text = GTK_WIDGET (ptr); + } + + if (text) + { + gtk_text_view_set_editable (GTK_TEXT_VIEW (text), state); + } + } + + gdk_threads_leave (); + } + + JNIEXPORT jstring JNICALL + Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_getText + (JNIEnv *env, jobject obj) + { + void *ptr; + char *contents = NULL; + jstring jcontents; + GtkEditable *editable; // type of GtkEntry (TextField) + GtkWidget *text = NULL; // type of GtkTextView (TextArea) + GtkTextBuffer *buf; + GtkTextIter start, end; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + + if (GTK_IS_EDITABLE (ptr)) + { + editable = GTK_EDITABLE (ptr); + contents = gtk_editable_get_chars (editable, 0, -1); + } + else + { + if (GTK_IS_SCROLLED_WINDOW (ptr)) + { + text = GTK_WIDGET (GTK_TEXT_VIEW (GTK_SCROLLED_WINDOW (ptr)->container.child)); + } + else if (GTK_IS_TEXT_VIEW (ptr)) + { + text = GTK_WIDGET (ptr); + } + + if (text) + { + buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text)); + gtk_text_buffer_get_start_iter (buf, &start); + gtk_text_buffer_get_end_iter (buf, &end); + contents = gtk_text_buffer_get_text (buf, &start, &end, FALSE); + } + } + + gdk_threads_leave (); + + jcontents = (*env)->NewStringUTF (env, contents); + g_free (contents); + + return jcontents; + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_setText + (JNIEnv *env, jobject obj, jstring contents) + { + void *ptr; + const char *str; + GtkWidget *text = NULL; // type of GtkTextView (TextArea) + GtkTextBuffer *buf; + + ptr = NSA_GET_PTR (env, obj); + str = (*env)->GetStringUTFChars (env, contents, NULL); + + gdk_threads_enter (); + + if (GTK_IS_EDITABLE (ptr)) + { + gtk_entry_set_text (GTK_ENTRY (ptr), str); + } + else + { + if (GTK_IS_SCROLLED_WINDOW (ptr)) + { + text = GTK_WIDGET (GTK_TEXT_VIEW (GTK_SCROLLED_WINDOW (ptr)->container.child)); + } + else if (GTK_IS_TEXT_VIEW (ptr)) + { + text = GTK_WIDGET (ptr); + } + + if (text) + { + buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text)); + gtk_text_buffer_set_text (buf, str, strlen (str)); + } + } + + gdk_threads_leave (); + + (*env)->ReleaseStringUTFChars (env, contents, str); + } + + static void + textcomponent_commit_cb (GtkIMContext *context __attribute__((unused)), + const gchar *str, + jobject peer) + { + /* str is a \0-terminated UTF-8 encoded character. */ + gunichar2 *jc = g_utf8_to_utf16 (str, -1, NULL, NULL, NULL); + GdkEvent *event = gtk_get_current_event (); + + if (jc) + (*gdk_env)->CallVoidMethod (gdk_env, peer, + postKeyEventID, + (jint) AWT_KEY_TYPED, + (jlong) event->key.time, + keyevent_state_to_awt_mods (event), + VK_UNDEFINED, + (jchar) jc[0], + AWT_KEY_LOCATION_UNKNOWN); + g_free (jc); + gdk_event_free (event); + } + + static void + textcomponent_changed_cb (GtkEditable *editable __attribute__((unused)), + jobject peer) + { + (*gdk_env)->CallVoidMethod (gdk_env, peer, postTextEventID); + } diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c 2003-12-13 01:15:47.000000000 +0000 *************** *** 0 **** --- 1,140 ---- + /* gtktextfieldpeer.c -- Native implementation of GtkTextFieldPeer + Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #include "gtkpeer.h" + #include "gnu_java_awt_peer_gtk_GtkTextFieldPeer.h" + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_create + (JNIEnv *env, jobject obj) + { + GtkWidget *widget; + + /* Create global reference and save it for future use */ + NSA_SET_GLOBAL_REF (env, obj); + + gdk_threads_enter (); + + widget = gtk_entry_new (); + + gdk_threads_leave (); + + NSA_SET_PTR (env, obj, widget); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_gtkEntryGetSize + (JNIEnv *env, jobject obj, jintArray jdims) + { + void *ptr; + jint *dims; + GtkRequisition myreq; + GtkWidget *entry; + + ptr = NSA_GET_PTR (env, obj); + dims = (*env)->GetIntArrayElements (env, jdims, 0); + + gdk_threads_enter (); + + entry = GTK_WIDGET (ptr); + gtk_widget_size_request(entry, &myreq); + dims[0]=myreq.width; + dims[1]=myreq.height; + + gdk_threads_leave (); + + (*env)->ReleaseIntArrayElements (env, jdims, dims, 0); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_setEchoChar + (JNIEnv *env, jobject obj, jchar c) + { + void *ptr; + GtkEntry *entry; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + + entry = GTK_ENTRY (ptr); + + if (c!=0) + { + /* gtk_entry_set_echo_char (entry, c); */ + gtk_entry_set_visibility (entry, FALSE); + } + else + gtk_entry_set_visibility (entry, TRUE); + + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_gtkSetFont + (JNIEnv *env, jobject obj, jstring name, jint style, jint size) + { + const char *font_name; + void *ptr; + GtkWidget *entry; + PangoFontDescription *font_desc; + + ptr = NSA_GET_PTR (env, obj); + + entry = GTK_WIDGET (ptr); + font_name = (*env)->GetStringUTFChars (env, name, NULL); + + gdk_threads_enter(); + + font_desc = pango_font_description_from_string (font_name); + pango_font_description_set_size (font_desc, size * PANGO_SCALE); + + if (style & AWT_STYLE_BOLD) + pango_font_description_set_weight (font_desc, PANGO_WEIGHT_BOLD); + + if (style & AWT_STYLE_ITALIC) + pango_font_description_set_style (font_desc, PANGO_STYLE_OBLIQUE); + + gtk_widget_modify_font (GTK_WIDGET(entry), font_desc); + + pango_font_description_free (font_desc); + + gdk_threads_leave(); + + (*env)->ReleaseStringUTFChars (env, name, font_name); + } diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c 2003-10-08 15:49:33.000000000 +0000 *************** *** 0 **** --- 1,90 ---- + /* gtktoolkit.c -- Native portion of GtkToolkit + Copyright (C) 1998, 1999 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #include "gtkpeer.h" + #include "gnu_java_awt_peer_gtk_GtkToolkit.h" + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkToolkit_beep + (JNIEnv *env __attribute__((unused)), jobject obj __attribute__((unused))) + { + gdk_threads_enter (); + gdk_beep (); + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkToolkit_sync + (JNIEnv *env __attribute__((unused)), jobject obj __attribute__((unused))) + { + gdk_threads_enter (); + gdk_flush (); + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkToolkit_getScreenSizeDimensions + (JNIEnv *env __attribute__((unused)), jobject obj __attribute__((unused)), + jintArray jdims) + { + jint *dims = (*env)->GetIntArrayElements (env, jdims, 0); + + gdk_threads_enter (); + + dims[0] = gdk_screen_width (); + dims[1] = gdk_screen_height (); + + gdk_threads_leave (); + + (*env)->ReleaseIntArrayElements(env, jdims, dims, 0); + } + + JNIEXPORT jint JNICALL + Java_gnu_java_awt_peer_gtk_GtkToolkit_getScreenResolution + (JNIEnv *env __attribute__((unused)), jobject obj __attribute__((unused))) + { + jint res; + + gdk_threads_enter (); + + res = gdk_screen_width () / (gdk_screen_width_mm () / 25.4); + + gdk_threads_leave (); + return res; + } + diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c *** gcc-3.3.3/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c 2004-01-13 20:54:46.000000000 +0000 *************** *** 0 **** --- 1,699 ---- + /* gtkwindowpeer.c -- Native implementation of GtkWindowPeer + Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #include "gtkpeer.h" + #include "gnu_java_awt_peer_gtk_GtkComponentPeer.h" + #include "gnu_java_awt_peer_gtk_GtkWindowPeer.h" + #include "gnu_java_awt_peer_gtk_GtkFramePeer.h" + #include + #include + #include + + static void window_get_frame_extents (GtkWidget *window, + int *top, int *left, + int *bottom, int *right); + + static void request_frame_extents (GtkWidget *window); + + static int property_notify_predicate (Display *xdisplay, + XEvent *event, + XPointer window_id); + + static void window_delete_cb (GtkWidget *widget, GdkEvent *event, + jobject peer); + static void window_destroy_cb (GtkWidget *widget, GdkEvent *event, + jobject peer); + static void window_show_cb (GtkWidget *widget, jobject peer); + static gboolean window_focus_in_cb (GtkWidget * widget, + GdkEventFocus *event, + jobject peer); + static gboolean window_focus_out_cb (GtkWidget * widget, + GdkEventFocus *event, + jobject peer); + static gboolean window_window_state_cb (GtkWidget *widget, + GdkEvent *event, + jobject peer); + static jint window_get_new_state (GtkWidget *widget); + static gboolean window_property_changed_cb (GtkWidget *widget, + GdkEventProperty *event, + jobject peer); + + /* + * Make a new window. + */ + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkWindowPeer_create + (JNIEnv *env, jobject obj, jint type, jboolean decorated, + jint width, jint height, jobject parent, jintArray jinsets) + { + GtkWidget *window_widget; + GtkWindow *window; + void *window_parent; + GtkWidget *vbox; + GtkWidget *layout; + int top = 0; + int left = 0; + int bottom = 0; + int right = 0; + jint *insets; + + insets = (*env)->GetIntArrayElements (env, jinsets, 0); + insets[0] = insets[1] = insets[2] = insets[3] = 0; + + /* Create global reference and save it for future use */ + NSA_SET_GLOBAL_REF (env, obj); + + gdk_threads_enter (); + + window_widget = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = GTK_WINDOW (window_widget); + + /* Keep this window in front of its parent, if it has one. */ + if (parent) + { + window_parent = NSA_GET_PTR (env, parent); + gtk_window_set_transient_for (window, GTK_WINDOW(window_parent)); + } + + gtk_window_set_decorated (window, decorated); + + gtk_window_set_type_hint (window, type); + + gtk_window_group_add_window (global_gtk_window_group, window); + + vbox = gtk_vbox_new (0, 0); + layout = gtk_layout_new (NULL, NULL); + gtk_box_pack_end (GTK_BOX (vbox), layout, 1, 1, 0); + gtk_container_add (GTK_CONTAINER (window_widget), vbox); + + gtk_widget_show (layout); + gtk_widget_show (vbox); + gtk_widget_realize (window_widget); + + if (decorated) + window_get_frame_extents (window_widget, &top, &left, &bottom, &right); + + gtk_window_set_default_size (window, + MAX (1, width - left - right), + MAX (1, height - top - bottom)); + + /* We must set this window's size requisition. Otherwise when a + resize is queued (when gtk_widget_queue_resize is called) the + window will snap to its default requisition of 0x0. If we omit + this call, Frames and Dialogs shrink to degenerate 1x1 windows + when their resizable property changes. */ + gtk_widget_set_size_request (window_widget, + MAX (1, width - left - right), + MAX (1, height - top - bottom)); + + insets[0] = top; + insets[1] = left; + insets[2] = bottom; + insets[3] = right; + + gdk_threads_leave (); + + (*env)->ReleaseIntArrayElements (env, jinsets, insets, 0); + + NSA_SET_PTR (env, obj, window_widget); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkWindowPeer_nativeSetVisible + (JNIEnv *env, jobject obj, jboolean visible) + { + void *ptr; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + + if (visible) + gtk_widget_show (GTK_WIDGET (ptr)); + else + gtk_widget_hide (GTK_WIDGET (ptr)); + + XFlush (GDK_DISPLAY ()); + + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkWindowPeer_connectJObject + (JNIEnv *env, jobject obj) + { + void *ptr; + GtkWidget* vbox, *layout; + GList* children; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + + children = gtk_container_get_children(GTK_CONTAINER(ptr)); + vbox = children->data; + + if(!GTK_IS_VBOX(vbox)) + { + printf("*** this is not a vbox\n"); + } + children = gtk_container_get_children(GTK_CONTAINER(vbox)); + layout = children->data; + + if(!GTK_IS_LAYOUT(layout)) + { + printf("*** widget is not a layout ***"); + } + + gtk_widget_realize (layout); + + connect_awt_hook (env, obj, 1, GTK_LAYOUT (layout)->bin_window); + + gtk_widget_realize (ptr); + + connect_awt_hook (env, obj, 1, GTK_WIDGET (ptr)->window); + + g_signal_connect (G_OBJECT (ptr), "property-notify-event", + G_CALLBACK (window_property_changed_cb), obj); + + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkWindowPeer_connectSignals + (JNIEnv *env, jobject obj) + { + void *ptr = NSA_GET_PTR (env, obj); + jobject *gref = NSA_GET_GLOBAL_REF (env, obj); + g_assert (gref); + + gdk_threads_enter (); + + gtk_widget_realize (ptr); + + /* Connect signals for window event support. */ + g_signal_connect (G_OBJECT (ptr), "delete-event", + G_CALLBACK (window_delete_cb), *gref); + + g_signal_connect (G_OBJECT (ptr), "destroy-event", + G_CALLBACK (window_destroy_cb), *gref); + + g_signal_connect (G_OBJECT (ptr), "show", + G_CALLBACK (window_show_cb), *gref); + + g_signal_connect (G_OBJECT (ptr), "focus-in-event", + G_CALLBACK (window_focus_in_cb), *gref); + + g_signal_connect (G_OBJECT (ptr), "focus-out-event", + G_CALLBACK (window_focus_out_cb), *gref); + + g_signal_connect (G_OBJECT (ptr), "window-state-event", + G_CALLBACK (window_window_state_cb), *gref); + + gdk_threads_leave (); + + /* Connect the superclass signals. */ + Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals (env, obj); + } + + /* + * Set a frame's title + */ + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkWindowPeer_setTitle + (JNIEnv *env, jobject obj, jstring title) + { + void *ptr; + const char *str; + + ptr = NSA_GET_PTR (env, obj); + + str = (*env)->GetStringUTFChars (env, title, NULL); + + gdk_threads_enter (); + gtk_window_set_title (GTK_WINDOW (ptr), str); + gdk_threads_leave (); + + (*env)->ReleaseStringUTFChars (env, title, str); + } + + /* + * Lower the z-level of a window. + */ + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkWindowPeer_toBack (JNIEnv *env, + jobject obj) + { + void *ptr; + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + gdk_window_lower (GTK_WIDGET (ptr)->window); + + XFlush (GDK_DISPLAY ()); + gdk_threads_leave (); + } + + /* + * Raise the z-level of a window. + */ + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkWindowPeer_toFront (JNIEnv *env, + jobject obj) + { + void *ptr; + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + gdk_window_raise (GTK_WIDGET (ptr)->window); + + XFlush (GDK_DISPLAY ()); + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkWindowPeer_setBoundsCallback + (JNIEnv *env __attribute__((unused)), jobject obj __attribute__((unused)), + jobject window, jint x, jint y, jint width, jint height) + { + /* Circumvent package-private access to call Window's + setBoundsCallback method. */ + (*gdk_env)->CallVoidMethod (gdk_env, window, setBoundsCallbackID, + x, y, width, height); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkWindowPeer_setSize + (JNIEnv *env, jobject obj, jint width, jint height) + { + void *ptr = NSA_GET_PTR (env, obj); + + /* Avoid GTK runtime assertion failures. */ + width = (width < 1) ? 1 : width; + height = (height < 1) ? 1 : height; + + gdk_threads_enter (); + gtk_widget_set_size_request (GTK_WIDGET(ptr), width, height); + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkWindowPeer_nativeSetBounds + (JNIEnv *env, jobject obj, jint x, jint y, jint width, jint height) + { + void *ptr = NSA_GET_PTR (env, obj); + + /* Avoid GTK runtime assertion failures. */ + width = (width < 1) ? 1 : width; + height = (height < 1) ? 1 : height; + + gdk_threads_enter (); + gtk_window_move (GTK_WINDOW(ptr), x, y); + /* Need to change the widget's request size. */ + gtk_widget_set_size_request (GTK_WIDGET(ptr), width, height); + /* Also need to call gtk_window_resize. If the resize is requested + by the program and the window's "resizable" property is true then + the size request will not be honoured. */ + gtk_window_resize (GTK_WINDOW (ptr), width, height); + gdk_threads_leave (); + } + + JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_GtkFramePeer_setMenuBarPeer + (JNIEnv *env, jobject obj, jobject menubar) + { + void *wptr, *mptr; + GtkBox *box; + + if (!menubar) return; + + wptr = NSA_GET_PTR (env, obj); + mptr = NSA_GET_PTR (env, menubar); + + if (!mptr) return; /* this case should remove a menu */ + + gdk_threads_enter (); + box = GTK_BOX (GTK_BIN (wptr)->child); + gtk_box_pack_start (box, GTK_WIDGET (mptr), 0, 0, 0); + gdk_threads_leave (); + } + + JNIEXPORT jint JNICALL + Java_gnu_java_awt_peer_gtk_GtkFramePeer_getMenuBarHeight + (JNIEnv *env, jobject obj) + { + void *ptr; + GList *children; + jint height = 0; + + ptr = NSA_GET_PTR (env, obj); + + gdk_threads_enter (); + children = gtk_container_children (GTK_CONTAINER (GTK_BIN (ptr)->child)); + if (g_list_length (children) == 2) + { + GtkWidget *menubar = GTK_WIDGET (children->data); + height = menubar->allocation.height; + + } + gdk_threads_leave (); + + return height; + } + + static void + window_get_frame_extents (GtkWidget *window, + int *top, int *left, int *bottom, int *right) + { + unsigned long *extents = NULL; + + /* Guess frame extents in case _NET_FRAME_EXTENTS is not + supported. */ + *top = 23; + *left = 6; + *bottom = 6; + *right = 6; + + /* Request that the window manager set window's + _NET_FRAME_EXTENTS property. */ + request_frame_extents (window); + + /* Attempt to retrieve window's frame extents. */ + if (gdk_property_get (window->window, + gdk_atom_intern ("_NET_FRAME_EXTENTS", FALSE), + gdk_atom_intern ("CARDINAL", FALSE), + 0, + sizeof (unsigned long) * 4, + FALSE, + NULL, + NULL, + NULL, + (guchar **)&extents)) + { + *left = extents [0]; + *right = extents [1]; + *top = extents [2]; + *bottom = extents [3]; + } + } + + static Atom extents_atom = 0; + + /* Requests that the window manager set window's + _NET_FRAME_EXTENTS property. */ + static void + request_frame_extents (GtkWidget *window) + { + const char *request_str = "_NET_REQUEST_FRAME_EXTENTS"; + GdkAtom request_extents = gdk_atom_intern (request_str, FALSE); + + /* Check if the current window manager supports + _NET_REQUEST_FRAME_EXTENTS. */ + if (gdk_net_wm_supports (request_extents)) + { + GdkDisplay *display = gtk_widget_get_display (window); + Display *xdisplay = GDK_DISPLAY_XDISPLAY (display); + + GdkWindow *root_window = gdk_get_default_root_window (); + Window xroot_window = GDK_WINDOW_XID (root_window); + + Atom extents_request_atom = + gdk_x11_get_xatom_by_name_for_display (display, request_str); + + XEvent xevent; + XEvent notify_xevent; + + unsigned long window_id = GDK_WINDOW_XID (GDK_DRAWABLE(window->window)); + + if (!extents_atom) + { + const char *extents_str = "_NET_FRAME_EXTENTS"; + extents_atom = + gdk_x11_get_xatom_by_name_for_display (display, extents_str); + } + + xevent.xclient.type = ClientMessage; + xevent.xclient.message_type = extents_request_atom; + xevent.xclient.display = xdisplay; + xevent.xclient.window = window_id; + xevent.xclient.format = 32; + xevent.xclient.data.l[0] = 0; + xevent.xclient.data.l[1] = 0; + xevent.xclient.data.l[2] = 0; + xevent.xclient.data.l[3] = 0; + xevent.xclient.data.l[4] = 0; + + XSendEvent (xdisplay, xroot_window, False, + (SubstructureRedirectMask | SubstructureNotifyMask), + &xevent); + + XIfEvent(xdisplay, ¬ify_xevent, + property_notify_predicate, (XPointer) &window_id); + } + } + + static int + property_notify_predicate (Display *xdisplay __attribute__((unused)), + XEvent *event, + XPointer window_id) + { + unsigned long *window = (unsigned long *) window_id; + + if (event->xany.type == PropertyNotify + && event->xany.window == *window + && event->xproperty.atom == extents_atom) + return True; + + return False; + } + + static void + window_delete_cb (GtkWidget *widget __attribute__((unused)), + GdkEvent *event __attribute__((unused)), + jobject peer) + { + (*gdk_env)->CallVoidMethod (gdk_env, peer, + postWindowEventID, + (jint) AWT_WINDOW_CLOSING, + (jobject) NULL, (jint) 0); + } + + static void + window_destroy_cb (GtkWidget *widget __attribute__((unused)), + GdkEvent *event __attribute__((unused)), + jobject peer) + { + (*gdk_env)->CallVoidMethod (gdk_env, peer, + postWindowEventID, + (jint) AWT_WINDOW_CLOSED, + (jobject) NULL, (jint) 0); + } + + static void + window_show_cb (GtkWidget *widget __attribute__((unused)), + jobject peer) + { + (*gdk_env)->CallVoidMethod (gdk_env, peer, + postWindowEventID, + (jint) AWT_WINDOW_OPENED, + (jobject) NULL, (jint) 0); + } + + static gboolean + window_focus_in_cb (GtkWidget * widget __attribute__((unused)), + GdkEventFocus *event __attribute__((unused)), + jobject peer) + { + /* FIXME: when hiding then showing, we get two sets of + (LOST_FOCUS/DEACTIVATED, ACTIVATED/GAINED_FOCUS) events. */ + (*gdk_env)->CallVoidMethod (gdk_env, peer, + postWindowEventID, + (jint) AWT_WINDOW_ACTIVATED, + (jobject) NULL, (jint) 0); + + (*gdk_env)->CallVoidMethod (gdk_env, peer, + postWindowEventID, + (jint) AWT_WINDOW_GAINED_FOCUS, + (jobject) NULL, (jint) 0); + return TRUE; + } + + static gboolean + window_focus_out_cb (GtkWidget * widget __attribute__((unused)), + GdkEventFocus *event __attribute__((unused)), + jobject peer) + { + (*gdk_env)->CallVoidMethod (gdk_env, peer, + postWindowEventID, + (jint) AWT_WINDOW_LOST_FOCUS, + (jobject) NULL, (jint) 0); + + (*gdk_env)->CallVoidMethod (gdk_env, peer, + postWindowEventID, + (jint) AWT_WINDOW_DEACTIVATED, + (jobject) NULL, (jint) 0); + return TRUE; + } + + static gboolean + window_window_state_cb (GtkWidget *widget, + GdkEvent *event, + jobject peer) + { + jint new_state; + + /* Handle WINDOW_ICONIFIED and WINDOW_DEICONIFIED events. */ + if (event->window_state.changed_mask & GDK_WINDOW_STATE_ICONIFIED) + { + /* We've either been iconified or deiconified. */ + if (event->window_state.new_window_state & GDK_WINDOW_STATE_ICONIFIED) + { + /* We've been iconified. */ + (*gdk_env)->CallVoidMethod (gdk_env, peer, + postWindowEventID, + (jint) AWT_WINDOW_ICONIFIED, + (jobject) NULL, (jint) 0); + } + else + { + /* We've been deiconified. */ + (*gdk_env)->CallVoidMethod (gdk_env, peer, + postWindowEventID, + (jint) AWT_WINDOW_DEICONIFIED, + (jobject) NULL, (jint) 0); + } + } + + /* Post a WINDOW_STATE_CHANGED event, passing the new frame state to + GtkWindowPeer. */ + new_state = AWT_FRAME_STATE_NORMAL; + + if (event->window_state.new_window_state & GDK_WINDOW_STATE_ICONIFIED) + new_state |= AWT_FRAME_STATE_ICONIFIED; + + new_state |= window_get_new_state (widget); + + (*gdk_env)->CallVoidMethod (gdk_env, peer, + postWindowEventID, + (jint) AWT_WINDOW_STATE_CHANGED, + (jobject) NULL, new_state); + return TRUE; + } + + static jint + window_get_new_state (GtkWidget *widget) + { + GdkDisplay *display = gtk_widget_get_display(widget); + jint new_state = AWT_FRAME_STATE_NORMAL; + Atom type; + gint format; + gulong atom_count; + gulong bytes_after; + Atom *atom_list = NULL; + gulong i; + + XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), GDK_WINDOW_XID (widget->window), + gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_STATE"), + 0, G_MAXLONG, False, XA_ATOM, &type, &format, &atom_count, + &bytes_after, (guchar **)&atom_list); + + if (type != None) + { + Atom maxvert = gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_STATE_MAXIMIZED_VERT"); + Atom maxhorz = gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_STATE_MAXIMIZED_HORZ"); + + i = 0; + while (i < atom_count) + { + if (atom_list[i] == maxhorz) + new_state |= AWT_FRAME_STATE_MAXIMIZED_HORIZ; + else if (atom_list[i] == maxvert) + new_state |= AWT_FRAME_STATE_MAXIMIZED_VERT; + + ++i; + } + + XFree (atom_list); + } + return new_state; + } + + static gboolean + window_property_changed_cb (GtkWidget *widget __attribute__((unused)), + GdkEventProperty *event, + jobject peer) + { + unsigned long *extents; + + static int id_set = 0; + static jmethodID postInsetsChangedEventID; + + if (!id_set) + { + jclass gtkwindowpeer = (*gdk_env)->FindClass (gdk_env, + "gnu/java/awt/peer/gtk/GtkWindowPeer"); + postInsetsChangedEventID = (*gdk_env)->GetMethodID (gdk_env, + gtkwindowpeer, + "postInsetsChangedEvent", + "(IIII)V"); + } + + if (gdk_atom_intern ("_NET_FRAME_EXTENTS", FALSE) == event->atom + && gdk_property_get (event->window, + gdk_atom_intern ("_NET_FRAME_EXTENTS", FALSE), + gdk_atom_intern ("CARDINAL", FALSE), + 0, + sizeof (unsigned long) * 4, + FALSE, + NULL, + NULL, + NULL, + (guchar **)&extents)) + (*gdk_env)->CallVoidMethod (gdk_env, peer, + postInsetsChangedEventID, + (jint) extents[2], /* top */ + (jint) extents[0], /* left */ + (jint) extents[3], /* bottom */ + (jint) extents[1]); /* right */ + + return FALSE; + } diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gthread-jni.c gcc-3.4.0/libjava/jni/gtk-peer/gthread-jni.c *** gcc-3.3.3/libjava/jni/gtk-peer/gthread-jni.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gthread-jni.c 2003-10-08 15:49:33.000000000 +0000 *************** *** 0 **** --- 1,499 ---- + /* gthread-jni.c -- JNI threading routines for GLIB + Copyright (C) 1998 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + /************************************************************************/ + /* Header */ + /************************************************************************/ + + /* + * Julian Dolby (dolby@us.ibm.com) + * February 7, 2003 + * + * This code implements the GThreadFunctions interface for GLIB using + * Java threading primitives. All of the locking and conditional variable + * functionality required by GThreadFunctions is implemented using the + * monitor and wait/notify functionality of Java objects. The thread- + * local fucntionality uses the java.lang.ThreadLocal class. + * + * This code is designed to be portable in that it makes no assumptions + * about the underlying VM beyond that it implements the JNI functionality + * that this code uses. + * + * The one piece that does not really work is trylock for mutexes. The + * Java locking model does not include such functionality, and I do not + * see how to implement it without knowing something about how the VM + * implements locking. + * + * NOTES: + * + * I have tested it only on JikesRVM---the CVS head as of early February + * 2003. + * + * Currently, use of this code is governed by the configuration option + * --enable-portable-native-sync + * + */ + + + /************************************************************************/ + /* Global data */ + /************************************************************************/ + + #include "gthread-jni.h" + + /* The VM handle. This is set in GtkToolkitMain.gtkInit */ + JavaVM *gdk_vm; + + + /************************************************************************/ + /* Utilities to reflect exceptions back to the VM */ + /************************************************************************/ + + /* This function checks for a pending exception, and rethrows it with + * a wrapper RuntimeException to deal with possible type problems (in + * case some calling piece of code does not expect the exception being + * thrown) and to include the given extra message. + */ + static void maybe_rethrow(JNIEnv *gdk_env, char *message, char *file, int line) { + jthrowable cause; + + /* rethrow if an exception happened */ + if ((cause = (*gdk_env)->ExceptionOccurred(gdk_env)) != NULL) { + jstring jmessage; + jclass obj_class; + jobject obj; + jmethodID ctor; + + /* allocate local message in Java */ + int len = strlen(message) + strlen(file) + 25; + char buf[ len ]; + bzero(buf, len); + sprintf(buf, "%s (at %s:%d)", message, file, line); + jmessage = (*gdk_env)->NewStringUTF(gdk_env, buf); + + /* create RuntimeException wrapper object */ + obj_class = (*gdk_env)->FindClass (gdk_env, "java/lang/RuntimeException"); + ctor = (*gdk_env)->GetMethodID(gdk_env, obj_class, "", "(Ljava/langString;Ljava/lang/Throwable)V"); + obj = (*gdk_env)->NewObject (gdk_env, obj_class, ctor, jmessage, cause); + + /* throw it */ + (*gdk_env)->Throw(gdk_env, (jthrowable)obj); + } + } + + /* This macro is used to include a source location in the exception message */ + #define MAYBE_RETHROW(_class, _message) \ + maybe_rethrow(_class, _message, __FILE__, __LINE__) + + + /************************************************************************/ + /* Utilities to allocate and free java.lang.Objects */ + /************************************************************************/ + + /* Both the mutexes and the condition variables are java.lang.Object objects, + * which this method allocates and returns a global ref. Note that global + * refs must be explicitly freed (isn't C fun?). + */ + static jobject *allocatePlainObject() { + jclass obj_class; + jobject *obj; + JNIEnv *gdk_env; + jmethodID ctor; + + (*gdk_vm)->GetEnv(gdk_vm, (void **)&gdk_env, JNI_VERSION_1_1); + + obj_class = (*gdk_env)->FindClass (gdk_env, "java/lang/Object"); + MAYBE_RETHROW(gdk_env, "cannot find Object"); + + ctor = (*gdk_env)->GetMethodID(gdk_env, obj_class, "", "()V"); + MAYBE_RETHROW(gdk_env, "cannot find constructor"); + + obj = (jobject *) g_malloc (sizeof (jobject)); + *obj = (*gdk_env)->NewObject (gdk_env, obj_class, ctor); + MAYBE_RETHROW(gdk_env, "cannot allocate object"); + + *obj = (*gdk_env)->NewGlobalRef (gdk_env, *obj); + MAYBE_RETHROW(gdk_env, "cannot make global ref"); + + return obj; + } + + /* Frees a Java object given a global ref (isn't C fun?) */ + static void freePlainObject(jobject *obj) { + JNIEnv *gdk_env; + + if (obj) { + (*gdk_vm)->GetEnv(gdk_vm, (void **)&gdk_env, JNI_VERSION_1_1); + + (*gdk_env)->DeleteGlobalRef (gdk_env, *obj); + MAYBE_RETHROW(gdk_env, "cannot delete global ref"); + + g_free (obj); + } + } + + + /************************************************************************/ + /* Locking code */ + /************************************************************************/ + + /* Lock a Java object */ + static void takeLock(JNIEnv *gdk_env, void *mutex) { + (*gdk_env)->MonitorEnter (gdk_env, *((jobject *)mutex)); + MAYBE_RETHROW(gdk_env, "cannot get lock"); + } + + /* Unlock a Java object */ + static void releaseLock(JNIEnv *gdk_env, void *mutex) { + (*gdk_env)->MonitorExit (gdk_env, *((jobject *)mutex)); + MAYBE_RETHROW(gdk_env, "cannot release lock"); + } + + /* Create a mutex, which is a java.lang.Object for us */ + static GMutex *g_mutex_new_jni_impl (void) { + return (GMutex*) allocatePlainObject(); + } + + /* Lock a mutex. */ + static void g_mutex_lock_jni_impl (GMutex *mutex __attribute__((unused))) { + JNIEnv *gdk_env; + + (*gdk_vm)->GetEnv(gdk_vm, (void **)&gdk_env, JNI_VERSION_1_1); + + takeLock(gdk_env, mutex); + } + + /* Try to lock a mutex. Actually, do not try because Java objects + * do not provide such an interface. To be at least minimally correct, + * pretend we tried and failed. + */ + static gboolean g_mutex_trylock_jni_impl + (GMutex *mutex __attribute__((unused))) + { + // Shall we implement this in a JikesRVM-specific way under a flag? + return FALSE; + } + + /* Unlock a mutex. */ + static void g_mutex_unlock_jni_impl (GMutex *mutex) { + JNIEnv *gdk_env; + + (*gdk_vm)->GetEnv(gdk_vm, (void **)&gdk_env, JNI_VERSION_1_1); + + releaseLock(gdk_env, mutex); + } + + /* Free a mutex (isn't C fun?) */ + static void g_mutex_free_jni_impl (GMutex *mutex) + { + freePlainObject( (jobject*)mutex ); + } + + + /************************************************************************/ + /* Condition variable code */ + /************************************************************************/ + + /* Create a new condition variable. This is a java.lang.Object for us. */ + static GCond *g_cond_new_jni_impl () { + return (GCond*)allocatePlainObject(); + } + + /* Signal on a condition variable. This is simply calling Object.notify + * for us. + */ + static void g_cond_signal_jni_impl (GCond *cond) { + jclass lcl_class; + jmethodID signal_mth; + JNIEnv *gdk_env; + + (*gdk_vm)->GetEnv(gdk_vm, (void **)&gdk_env, JNI_VERSION_1_1); + + lcl_class = (*gdk_env)->FindClass (gdk_env, "java.lang.Object"); + MAYBE_RETHROW(gdk_env, "cannot find Object"); + + signal_mth = (*gdk_env)->GetMethodID(gdk_env, lcl_class, "notify", "()V"); + MAYBE_RETHROW(gdk_env, "cannot find Object."); + + /* Must have locked an object to call notify */ + takeLock(gdk_env, cond); + + (*gdk_env)->CallVoidMethod(gdk_env, *(jobject*)cond, signal_mth); + MAYBE_RETHROW(gdk_env, "cannot signal mutex"); + + releaseLock(gdk_env, cond); + } + + /* Broadcast to all waiting on a condition variable. This is simply + * calling Object.notifyAll for us. + */ + static void g_cond_broadcast_jni_impl (GCond *cond) { + jclass lcl_class; + jmethodID bcast_mth; + JNIEnv *gdk_env; + + (*gdk_vm)->GetEnv(gdk_vm, (void **)&gdk_env, JNI_VERSION_1_1); + + lcl_class = (*gdk_env)->FindClass (gdk_env, "java.lang.Object"); + MAYBE_RETHROW(gdk_env, "cannot find Object"); + + bcast_mth = (*gdk_env)->GetMethodID(gdk_env, lcl_class, "notifyAll", "()V"); + MAYBE_RETHROW(gdk_env, "cannot find Object."); + + /* Must have locked an object to call notifyAll */ + takeLock(gdk_env, cond); + + (*gdk_env)->CallVoidMethod(gdk_env, *(jobject*)cond, bcast_mth); + MAYBE_RETHROW(gdk_env, "cannot broadcast to mutex"); + + releaseLock(gdk_env, cond); + } + + + /* Wait on a condition variable. For us, this simply means call + * Object.wait. + */ + static void g_cond_wait_jni_impl + (GCond *cond, GMutex *mutex __attribute__((unused))) + { + jclass lcl_class; + jmethodID wait_mth; + JNIEnv *gdk_env; + + (*gdk_vm)->GetEnv(gdk_vm, (void **)&gdk_env, JNI_VERSION_1_1); + + lcl_class = (*gdk_env)->FindClass (gdk_env, "java.lang.Object"); + MAYBE_RETHROW(gdk_env, "cannot find Object"); + + wait_mth = (*gdk_env)->GetMethodID(gdk_env, lcl_class, "wait", "()V"); + MAYBE_RETHROW(gdk_env, "cannot find Object."); + + /* Must have locked an object to call wait */ + takeLock(gdk_env, cond); + + (*gdk_env)->CallVoidMethod(gdk_env, *(jobject*)cond, wait_mth); + MAYBE_RETHROW(gdk_env, "cannot wait on mutex"); + + releaseLock(gdk_env, cond); + } + + /* Wait on a condition vairable until a timeout. This is a little tricky + * for us. We first call Object.wait(J) giving it the appropriate timeout + * value. On return, we check whether an InterruptedException happened. If + * so, that is Java-speak for wait timing out. + */ + static gboolean + g_cond_timed_wait_jni_impl + (GCond *cond, GMutex *mutex __attribute__((unused)), + GTimeVal *end_time) + { + jclass lcl_class; + jmethodID wait_mth; + JNIEnv *gdk_env; + jlong time; + jthrowable cause; + + (*gdk_vm)->GetEnv(gdk_vm, (void **)&gdk_env, JNI_VERSION_1_1); + + lcl_class = (*gdk_env)->FindClass (gdk_env, "java.lang.Object"); + MAYBE_RETHROW(gdk_env, "cannot find Object"); + + wait_mth = (*gdk_env)->GetMethodID(gdk_env, lcl_class, "wait", "(J)V"); + MAYBE_RETHROW(gdk_env, "cannot find Object."); + + time = end_time->tv_sec*1000; + time += end_time->tv_usec/1000; + + /* Must have locked an object to call wait */ + takeLock(gdk_env, cond); + + (*gdk_env)->CallVoidMethod(gdk_env, *(jobject*)cond, wait_mth, time); + + if ((cause = (*gdk_env)->ExceptionOccurred(gdk_env)) != NULL) { + jclass intr = (*gdk_env)->FindClass (gdk_env, "java.lang.InterruptedException"); + if ( (*gdk_env)->IsInstanceOf(gdk_env, cause, intr) ) { + releaseLock(gdk_env, cond); + return FALSE; + } else { + MAYBE_RETHROW(gdk_env, "error in timed wait"); + } + } + + releaseLock(gdk_env, cond); + + return TRUE; + } + + /* Free a condition variable. (isn't C fun?) */ + static void g_cond_free_jni_impl (GCond *cond) { + freePlainObject( (jobject*)cond ); + } + + + /************************************************************************/ + /* Thread-local data code */ + /************************************************************************/ + + /* Create a new thread-local key. We use java.lang.ThreadLocal objects + * for this. + */ + static GPrivate *g_private_new_jni_impl + (GDestroyNotify notify __attribute__((unused))) + { + jclass lcl_class; + jobject *local; + JNIEnv *gdk_env; + jmethodID ctor; + + (*gdk_vm)->GetEnv(gdk_vm, (void **)&gdk_env, JNI_VERSION_1_1); + + lcl_class = (*gdk_env)->FindClass (gdk_env, "java.lang.ThreadLocal"); + MAYBE_RETHROW(gdk_env, "cannot find ThreadLocal"); + + ctor = (*gdk_env)->GetMethodID(gdk_env, lcl_class, "", "()V"); + MAYBE_RETHROW(gdk_env, "cannot find ThreadLocal."); + + local = (jobject *) g_malloc (sizeof (jobject)); + *local = (*gdk_env)->NewObject(gdk_env, lcl_class, ctor); + MAYBE_RETHROW(gdk_env, "cannot allocate a ThreadLocal"); + + *local = ((*gdk_env)->NewGlobalRef (gdk_env, *local)); + MAYBE_RETHROW(gdk_env, "cannot create a GlobalRef"); + + return (GPrivate*) local; + } + + /* Get this thread's value for a thread-local key. This is simply + * ThreadLocal.get for us. + */ + static gpointer g_private_get_jni_impl (GPrivate *private) { + jclass lcl_class; + jobject lcl_obj; + JNIEnv *gdk_env; + jmethodID get_mth; + jclass int_class; + jmethodID val_mth; + jint int_val; + + (*gdk_vm)->GetEnv(gdk_vm, (void **)&gdk_env, JNI_VERSION_1_1); + + lcl_class = (*gdk_env)->FindClass (gdk_env, "java.lang.ThreadLocal"); + MAYBE_RETHROW(gdk_env, "cannot find ThreadLocal"); + + get_mth = (*gdk_env)->GetMethodID(gdk_env, lcl_class, "get", "()Ljava/lang/Object;"); + MAYBE_RETHROW(gdk_env, "cannot find ThreadLocal."); + + lcl_obj = (*gdk_env)->CallObjectMethod(gdk_env, *(jobject*)private, get_mth); + MAYBE_RETHROW(gdk_env, "cannot find thread-local object"); + + int_class = (*gdk_env)->FindClass (gdk_env, "java.lang.Integer"); + MAYBE_RETHROW(gdk_env, "cannot find Integer"); + + val_mth = (*gdk_env)->GetMethodID(gdk_env, int_class, "intValue", "()I"); + MAYBE_RETHROW(gdk_env, "cannot find Integer."); + + int_val = (*gdk_env)->CallIntMethod(gdk_env, lcl_obj, val_mth); + MAYBE_RETHROW(gdk_env, "cannot get thread local value"); + + return (gpointer) int_val; + } + + /* Set this thread's value for a thread-local key. This is simply + * ThreadLocal.set for us. + */ + static void g_private_set_jni_impl (GPrivate *private, gpointer data) { + jclass lcl_class, int_class; + jobject lcl_obj; + JNIEnv *gdk_env; + jmethodID new_int, set_mth; + + (*gdk_vm)->GetEnv(gdk_vm, (void **)&gdk_env, JNI_VERSION_1_1); + + int_class = (*gdk_env)->FindClass (gdk_env, "java.lang.Integer"); + MAYBE_RETHROW(gdk_env, "cannot find Integer"); + + new_int = (*gdk_env)->GetMethodID(gdk_env, int_class, "", "(I)V"); + MAYBE_RETHROW(gdk_env, "cannot find Integer."); + + lcl_obj = (*gdk_env)->NewObject(gdk_env, int_class, new_int, (jint)data); + MAYBE_RETHROW(gdk_env, "cannot create an Integer"); + + lcl_class = (*gdk_env)->FindClass (gdk_env, "java.lang.ThreadLocal"); + MAYBE_RETHROW(gdk_env, "cannot find ThreadLocal"); + + set_mth = (*gdk_env)->GetMethodID(gdk_env, lcl_class, "set", "(Ljava/lang/Object;)V"); + MAYBE_RETHROW(gdk_env, "cannot find ThreadLocal."); + + (*gdk_env)->CallVoidMethod(gdk_env, *(jobject*)private, set_mth, lcl_obj); + MAYBE_RETHROW(gdk_env, "cannot set thread local value"); + } + + + /************************************************************************/ + /* GLIB interface */ + /************************************************************************/ + + /* set of function pointers to give to glib. */ + GThreadFunctions g_thread_jni_functions = + { + g_mutex_new_jni_impl, /* mutex_new */ + g_mutex_lock_jni_impl, /* mutex_lock */ + g_mutex_trylock_jni_impl, /* mutex_try_lock */ + g_mutex_unlock_jni_impl, /* mutex_unlock */ + g_mutex_free_jni_impl, /* mutex_free */ + g_cond_new_jni_impl, /* cond_new */ + g_cond_signal_jni_impl, /* cond_signal */ + g_cond_broadcast_jni_impl, /* cond_broadcast */ + g_cond_wait_jni_impl, /* cond_wait */ + g_cond_timed_wait_jni_impl, /* cond_timed_wait */ + g_cond_free_jni_impl, /* cond_free */ + g_private_new_jni_impl, /* private_new */ + g_private_get_jni_impl, /* private_get */ + g_private_set_jni_impl, /* private_set */ + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL + }; + + /* ??? */ + void gdk_threads_wake () { + + } diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gthread-jni.h gcc-3.4.0/libjava/jni/gtk-peer/gthread-jni.h *** gcc-3.3.3/libjava/jni/gtk-peer/gthread-jni.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gthread-jni.h 2003-06-30 23:53:29.000000000 +0000 *************** *** 0 **** --- 1,48 ---- + /* gthread-jni.h + Copyright (C) 1998, 2002 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + #ifndef __GTHREADJNI_H__ + #define __GTHREADJNI_H__ + + #include + #include + #include "gtkpeer.h" + + extern GThreadFunctions g_thread_jni_functions; + extern JavaVM *gdk_vm; + + #endif /* __GTHREADJNI_H__ */ diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gtkcairopeer.h gcc-3.4.0/libjava/jni/gtk-peer/gtkcairopeer.h *** gcc-3.3.3/libjava/jni/gtk-peer/gtkcairopeer.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gtkcairopeer.h 2003-12-31 08:58:31.000000000 +0000 *************** *** 0 **** --- 1,78 ---- + #ifndef __GTKCAIROPEER_H__ + #define __GTKCAIROPEER_H__ + + /* gtkcairopeer.h -- Some global variables and #defines + Copyright (C) 1998, 1999 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + #include "gtkpeer.h" + #include + #include + + /* + A graphics2d struct is both simpler and uglier than a graphics + struct. + + Most of the graphics2d drawing state is held in the referenced cairo_t + and corresponding cairo_surface_t, so we can ignore it. + + In addition to the cairo_t, we need to hold an extra reference to the + underlying GdkDrawable so its refcount matches the lifecycle of the java + Graphics object which is peering with us; also a reference to a byte + buffer and cairo_surface_t which contain the pattern you're drawing from + (if it exists). + + Finally, it is possible that we are using a non-RENDER capable X server, + therefore we will be drawing to an cairo_surface_t which is actually a + pixbuf. When this is the case, the pointer to a GdkPixbuf will be + non-NULL and any drawing operation needs to be bracketed by pixbuf + load/save operations. If the GdkPixbuf pointer is NULL, we will treat + the cairo_surface_t as RENDER-capable. + */ + + struct graphics2d + { + cairo_t *cr; + cairo_surface_t *surface; + GdkDrawable *drawable; + GdkWindow *win; + GdkPixbuf *drawbuf; + char *pattern_pixels; + cairo_surface_t *pattern; + gboolean debug; + }; + + #endif /* __GTKCAIROPEER_H */ diff -Nrc3pad gcc-3.3.3/libjava/jni/gtk-peer/gtkpeer.h gcc-3.4.0/libjava/jni/gtk-peer/gtkpeer.h *** gcc-3.3.3/libjava/jni/gtk-peer/gtkpeer.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/jni/gtk-peer/gtkpeer.h 2003-12-23 19:24:00.000000000 +0000 *************** *** 0 **** --- 1,431 ---- + /* gtkpeer.h -- Some global variables and #defines + Copyright (C) 1998, 1999 Free Software Foundation, Inc. + + This file is part of GNU Classpath. + + GNU Classpath is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Classpath is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Classpath; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. */ + + + #include + #include + #include + #include + #include + #include "native_state.h" + + #include + + #define RC_FILE ".classpath-gtkrc" + #define JVM_SUN + /* + #define JVM_JAPHAR + */ + + #ifndef __GTKPEER_H__ + #define __GTKPEER_H__ + + #ifndef __GNUC__ + #define __attribute__(x) /* nothing */ + #endif + + #ifdef JVM_SUN + + extern struct state_table *native_state_table; + extern struct state_table *native_global_ref_table; + + #define NSA_INIT(env, clazz) \ + do {native_state_table = init_state_table (env, clazz); \ + native_global_ref_table = init_state_table (env, clazz);} while (0) + + #define NSA_GET_PTR(env, obj) \ + get_state (env, obj, native_state_table) + + #define NSA_SET_PTR(env, obj, ptr) \ + set_state (env, obj, native_state_table, (void *)ptr) + + #define NSA_DEL_PTR(env, obj) \ + remove_state_slot (env, obj, native_state_table) + + #define NSA_GET_GLOBAL_REF(env, obj) \ + get_state (env, obj, native_global_ref_table) + + #define NSA_SET_GLOBAL_REF(env, obj) \ + do {jobject *globRefPtr; \ + globRefPtr = (jobject *) malloc (sizeof (jobject)); \ + *globRefPtr = (*env)->NewGlobalRef (env, obj); \ + set_state (env, obj, native_global_ref_table, (void *)globRefPtr);} while (0) + + #define NSA_DEL_GLOBAL_REF(env, obj) \ + do {jobject *globRefPtr = get_state (env, obj, native_global_ref_table); \ + remove_state_slot (env, obj, native_global_ref_table); \ + (*env)->DeleteGlobalRef (env, *globRefPtr); \ + free (globRefPtr);} while (0) + + #endif /* JVM_SUN */ + + struct graphics + { + GdkDrawable *drawable; + GdkGC *gc; + GdkColormap *cm; + jint x_offset, y_offset; + }; + + #define AWT_DEFAULT_CURSOR 0 + #define AWT_CROSSHAIR_CURSOR 1 + #define AWT_TEXT_CURSOR 2 + #define AWT_WAIT_CURSOR 3 + #define AWT_SW_RESIZE_CURSOR 4 + #define AWT_SE_RESIZE_CURSOR 5 + #define AWT_NW_RESIZE_CURSOR 6 + #define AWT_NE_RESIZE_CURSOR 7 + #define AWT_N_RESIZE_CURSOR 8 + #define AWT_S_RESIZE_CURSOR 9 + #define AWT_W_RESIZE_CURSOR 10 + #define AWT_E_RESIZE_CURSOR 11 + #define AWT_HAND_CURSOR 12 + #define AWT_MOVE_CURSOR 13 + + #define SYNTHETIC_EVENT_MASK (1 << 10) + + #define AWT_SHIFT_MASK (1 << 0) + #define AWT_CTRL_MASK (1 << 1) + #define AWT_META_MASK (1 << 2) + #define AWT_ALT_MASK (1 << 3) + + #define AWT_BUTTON1_MASK (1 << 4) + #define AWT_BUTTON2_MASK AWT_ALT_MASK + #define AWT_BUTTON3_MASK AWT_META_MASK + + #define MULTI_CLICK_TIME 250 + /* as opposed to a MULTI_PASS_TIME :) */ + + #define AWT_MOUSE_CLICKED 500 + #define AWT_MOUSE_PRESSED 501 + #define AWT_MOUSE_RELEASED 502 + #define AWT_MOUSE_MOVED 503 + #define AWT_MOUSE_ENTERED 504 + #define AWT_MOUSE_EXITED 505 + #define AWT_MOUSE_DRAGGED 506 + + #define AWT_ADJUSTMENT_UNIT_INCREMENT 1 + #define AWT_ADJUSTMENT_UNIT_DECREMENT 2 + #define AWT_ADJUSTMENT_BLOCK_DECREMENT 3 + #define AWT_ADJUSTMENT_BLOCK_INCREMENT 4 + #define AWT_ADJUSTMENT_TRACK 5 + + #define AWT_SCROLLPANE_SCROLLBARS_AS_NEEDED 0 + #define AWT_SCROLLPANE_SCROLLBARS_ALWAYS 1 + #define AWT_SCROLLPANE_SCROLLBARS_NEVER 2 + + #define AWT_LABEL_LEFT 0 + #define AWT_LABEL_CENTER 1 + #define AWT_LABEL_RIGHT 2 + + #define AWT_TEXTAREA_SCROLLBARS_BOTH 0 + #define AWT_TEXTAREA_SCROLLBARS_VERTICAL_ONLY 1 + #define AWT_TEXTAREA_SCROLLBARS_HORIZONTAL_ONLY 2 + + #define AWT_ITEM_SELECTED 1 + #define AWT_ITEM_DESELECTED 2 + + #define AWT_KEY_TYPED 400 + #define AWT_KEY_PRESSED 401 + #define AWT_KEY_RELEASED 402 + + #define AWT_KEY_CHAR_UNDEFINED 0 + + #define AWT_KEY_LOCATION_UNKNOWN 0 + #define AWT_KEY_LOCATION_STANDARD 1 + #define AWT_KEY_LOCATION_LEFT 2 + #define AWT_KEY_LOCATION_RIGHT 3 + #define AWT_KEY_LOCATION_NUMPAD 4 + + /* Virtual Keys */ + /* This list should be kept in the same order as the VK_ field + declarations in KeyEvent.java. */ + #define VK_ENTER '\n' + #define VK_BACK_SPACE '\b' + #define VK_TAB '\t' + #define VK_CANCEL 3 + #define VK_CLEAR 12 + #define VK_SHIFT 16 + #define VK_CONTROL 17 + #define VK_ALT 18 + #define VK_PAUSE 19 + #define VK_CAPS_LOCK 20 + #define VK_ESCAPE 27 + #define VK_SPACE ' ' + #define VK_PAGE_UP 33 + #define VK_PAGE_DOWN 34 + #define VK_END 35 + #define VK_HOME 36 + #define VK_LEFT 37 + #define VK_UP 38 + #define VK_RIGHT 39 + #define VK_DOWN 40 + #define VK_COMMA ',' + #define VK_MINUS '-' + #define VK_PERIOD '.' + #define VK_SLASH '/' + #define VK_0 '0' + #define VK_1 '1' + #define VK_2 '2' + #define VK_3 '3' + #define VK_4 '4' + #define VK_5 '5' + #define VK_6 '6' + #define VK_7 '7' + #define VK_8 '8' + #define VK_9 '9' + #define VK_SEMICOLON ';' + #define VK_EQUALS '=' + #define VK_A 'A' + #define VK_B 'B' + #define VK_C 'C' + #define VK_D 'D' + #define VK_E 'E' + #define VK_F 'F' + #define VK_G 'G' + #define VK_H 'H' + #define VK_I 'I' + #define VK_J 'J' + #define VK_K 'K' + #define VK_L 'L' + #define VK_M 'M' + #define VK_N 'N' + #define VK_O 'O' + #define VK_P 'P' + #define VK_Q 'Q' + #define VK_R 'R' + #define VK_S 'S' + #define VK_T 'T' + #define VK_U 'U' + #define VK_V 'V' + #define VK_W 'W' + #define VK_X 'X' + #define VK_Y 'Y' + #define VK_Z 'Z' + #define VK_OPEN_BRACKET '[' + #define VK_BACK_SLASH '\\' + #define VK_CLOSE_BRACKET ']' + #define VK_NUMPAD0 96 + #define VK_NUMPAD1 97 + #define VK_NUMPAD2 98 + #define VK_NUMPAD3 99 + #define VK_NUMPAD4 100 + #define VK_NUMPAD5 101 + #define VK_NUMPAD6 102 + #define VK_NUMPAD7 103 + #define VK_NUMPAD8 104 + #define VK_NUMPAD9 105 + #define VK_MULTIPLY 106 + #define VK_ADD 107 + #define VK_SEPARATER 108 + #define VK_SEPARATOR 108 + #define VK_SUBTRACT 109 + #define VK_DECIMAL 110 + #define VK_DIVIDE 111 + #define VK_DELETE 127 + #define VK_NUM_LOCK 144 + #define VK_SCROLL_LOCK 145 + #define VK_F1 112 + #define VK_F2 113 + #define VK_F3 114 + #define VK_F4 115 + #define VK_F5 116 + #define VK_F6 117 + #define VK_F7 118 + #define VK_F8 119 + #define VK_F9 120 + #define VK_F10 121 + #define VK_F11 122 + #define VK_F12 123 + #define VK_F13 61440 + #define VK_F14 61441 + #define VK_F15 61442 + #define VK_F16 61443 + #define VK_F17 61444 + #define VK_F18 61445 + #define VK_F19 61446 + #define VK_F20 61447 + #define VK_F21 61448 + #define VK_F22 61449 + #define VK_F23 61450 + #define VK_F24 61451 + #define VK_PRINTSCREEN 154 + #define VK_INSERT 155 + #define VK_HELP 156 + #define VK_META 157 + #define VK_BACK_QUOTE 192 + #define VK_QUOTE 222 + #define VK_KP_UP 224 + #define VK_KP_DOWN 225 + #define VK_KP_LEFT 226 + #define VK_KP_RIGHT 227 + #define VK_DEAD_GRAVE 128 + #define VK_DEAD_ACUTE 129 + #define VK_DEAD_CIRCUMFLEX 130 + #define VK_DEAD_TILDE 131 + #define VK_DEAD_MACRON 132 + #define VK_DEAD_BREVE 133 + #define VK_DEAD_ABOVEDOT 134 + #define VK_DEAD_DIAERESIS 135 + #define VK_DEAD_ABOVERING 136 + #define VK_DEAD_DOUBLEACUTE 137 + #define VK_DEAD_CARON 138 + #define VK_DEAD_CEDILLA 139 + #define VK_DEAD_OGONEK 140 + #define VK_DEAD_IOTA 141 + #define VK_DEAD_VOICED_SOUND 142 + #define VK_DEAD_SEMIVOICED_SOUND 143 + #define VK_AMPERSAND 150 + #define VK_ASTERISK 151 + #define VK_QUOTEDBL 152 + #define VK_LESS 153 + #define VK_GREATER 160 + #define VK_BRACELEFT 161 + #define VK_BRACERIGHT 162 + #define VK_AT 512 + #define VK_COLON 513 + #define VK_CIRCUMFLEX 514 + #define VK_DOLLAR 515 + #define VK_EURO_SIGN 516 + #define VK_EXCLAMATION_MARK 517 + #define VK_INVERTED_EXCLAMATION_MARK 518 + #define VK_LEFT_PARENTHESIS 519 + #define VK_NUMBER_SIGN 520 + #define VK_PLUS 521 + #define VK_RIGHT_PARENTHESIS 522 + #define VK_UNDERSCORE 523 + #define VK_FINAL 24 + #define VK_CONVERT 28 + #define VK_NONCONVERT 29 + #define VK_ACCEPT 30 + #define VK_MODECHANGE 31 + #define VK_KANA 21 + #define VK_KANJI 25 + #define VK_ALPHANUMERIC 240 + #define VK_KATAKANA 241 + #define VK_HIRAGANA 242 + #define VK_FULL_WIDTH 243 + #define VK_HALF_WIDTH 244 + #define VK_ROMAN_CHARACTERS 245 + #define VK_ALL_CANDIDATES 256 + #define VK_PREVIOUS_CANDIDATE 257 + #define VK_CODE_INPUT 258 + #define VK_JAPANESE_KATAKANA 259 + #define VK_JAPANESE_HIRAGANA 260 + #define VK_JAPANESE_ROMAN 261 + #define VK_KANA_LOCK 262 + #define VK_INPUT_METHOD_ON_OFF 263 + #define VK_CUT 65489 + #define VK_COPY 65485 + #define VK_PASTE 65487 + #define VK_UNDO 65483 + #define VK_AGAIN 65481 + #define VK_FIND 65488 + #define VK_PROPS 65482 + #define VK_STOP 65480 + #define VK_COMPOSE 65312 + #define VK_ALT_GRAPH 65406 + #define VK_UNDEFINED 0 + + #define AWT_FOCUS_LOST 1004 + #define AWT_FOCUS_GAINED 1005 + + #define AWT_WINDOW_OPENED 200 + #define AWT_WINDOW_CLOSING 201 + #define AWT_WINDOW_CLOSED 202 + #define AWT_WINDOW_ICONIFIED 203 + #define AWT_WINDOW_DEICONIFIED 204 + #define AWT_WINDOW_ACTIVATED 205 + #define AWT_WINDOW_DEACTIVATED 206 + #define AWT_WINDOW_GAINED_FOCUS 207 + #define AWT_WINDOW_LOST_FOCUS 208 + #define AWT_WINDOW_STATE_CHANGED 209 + + #define AWT_FRAME_STATE_NORMAL 0 + #define AWT_FRAME_STATE_ICONIFIED 1 + #define AWT_FRAME_STATE_MAXIMIZED_HORIZ 2 + #define AWT_FRAME_STATE_MAXIMIZED_VERT 4 + #define AWT_FRAME_STATE_MAXIMIZED_BOTH 6 + + #define AWT_STYLE_PLAIN 0 + #define AWT_STYLE_BOLD 1 + #define AWT_STYLE_ITALIC 2 + + extern jmethodID setBoundsCallbackID; + + extern jmethodID postActionEventID; + extern jmethodID postMenuActionEventID; + extern jmethodID postMouseEventID; + extern jmethodID postConfigureEventID; + extern jmethodID postExposeEventID; + extern jmethodID postKeyEventID; + extern jmethodID postFocusEventID; + extern jmethodID postAdjustmentEventID; + extern jmethodID choicePostItemEventID; + extern jmethodID postItemEventID; + extern jmethodID postListItemEventID; + extern jmethodID postTextEventID; + extern jmethodID postWindowEventID; + + extern jmethodID syncAttrsID; + extern jclass gdkColor; + extern jmethodID gdkColorID; + extern JNIEnv *gdk_env; + + extern GtkWindowGroup *global_gtk_window_group; + + void awt_event_handler (GdkEvent *event); + + gboolean pre_event_handler (GtkWidget *widget, + GdkEvent *event, + jobject peer); + + void connect_awt_hook (JNIEnv *env, jobject peer_obj, int nwindows, ...); + + void set_visible (GtkWidget *widget, jboolean visible); + void set_parent (GtkWidget *widget, GtkContainer *parent); + GtkLayout *find_gtk_layout (GtkWidget *parent); + + jint keyevent_state_to_awt_mods (GdkEvent *event); + + struct item_event_hook_info + { + jobject peer_obj; + const char *label; + }; + + #endif /* __GTKPEER_H */ diff -Nrc3pad gcc-3.3.3/libjava/jni.cc gcc-3.4.0/libjava/jni.cc *** gcc-3.3.3/libjava/jni.cc 2003-02-12 23:39:12.000000000 +0000 --- gcc-3.4.0/libjava/jni.cc 2003-11-18 17:56:33.000000000 +0000 *************** details. */ *** 35,44 **** #include #include #include - #include #include #include #include #include #include --- 35,47 ---- #include #include #include #include #include #include + #include + #include + #include + #include #include #include *************** static jobject *** 384,389 **** --- 387,408 ---- return _Jv_JNI_PopLocalFrame (env, result, MARK_USER); } + // Make sure an array's type is compatible with the type of the + // destination. + template + static bool + _Jv_JNI_check_types (JNIEnv *env, JArray *array, jclass K) + { + jclass klass = array->getClass()->getComponentType(); + if (__builtin_expect (klass != K, false)) + { + env->ex = new java::lang::IllegalAccessError (); + return false; + } + else + return true; + } + // Pop a `system' frame from the stack. This is `extern "C"' as it is // used by the compiler. extern "C" void *************** _Jv_JNI_PopSystemFrame (JNIEnv *env) *** 399,404 **** --- 418,435 ---- } } + template T extract_from_jvalue(jvalue const & t); + template<> jboolean extract_from_jvalue(jvalue const & jv) { return jv.z; } + template<> jbyte extract_from_jvalue(jvalue const & jv) { return jv.b; } + template<> jchar extract_from_jvalue(jvalue const & jv) { return jv.c; } + template<> jshort extract_from_jvalue(jvalue const & jv) { return jv.s; } + template<> jint extract_from_jvalue(jvalue const & jv) { return jv.i; } + template<> jlong extract_from_jvalue(jvalue const & jv) { return jv.j; } + template<> jfloat extract_from_jvalue(jvalue const & jv) { return jv.f; } + template<> jdouble extract_from_jvalue(jvalue const & jv) { return jv.d; } + template<> jobject extract_from_jvalue(jvalue const & jv) { return jv.l; } + + // This function is used from other template functions. It wraps the // return value appropriately; we specialize it so that object returns // are turned into local references. *************** wrap_value (JNIEnv *, T value) *** 411,417 **** // This specialization is used for jobject, jclass, jstring, jarray, // etc. ! template static T * wrap_value (JNIEnv *env, T *value) { --- 442,448 ---- // This specialization is used for jobject, jclass, jstring, jarray, // etc. ! template static T * wrap_value (JNIEnv *env, T *value) { *************** static jclass *** 472,478 **** java::lang::ClassLoader *loader = NULL; if (env->klass != NULL) ! loader = env->klass->getClassLoader (); if (loader == NULL) { --- 503,509 ---- java::lang::ClassLoader *loader = NULL; if (env->klass != NULL) ! loader = env->klass->getClassLoaderInternal (); if (loader == NULL) { *************** static T *** 736,744 **** obj = unwrap (obj); klass = unwrap (klass); - if (style == normal) - id = _Jv_LookupDeclaredMethod (obj->getClass (), id->name, id->signature); - jclass decl_class = klass ? klass : obj->getClass (); JvAssert (decl_class != NULL); --- 767,772 ---- *************** static T *** 758,772 **** return_type = klass; jvalue result; ! jthrowable ex = _Jv_CallAnyMethodA (obj, return_type, id, ! style == constructor, ! arg_types, args, &result); ! ! if (ex != NULL) ! env->ex = ex; ! // We cheat a little here. FIXME. ! return wrap_value (env, * (T *) &result); } catch (jthrowable t) { --- 786,797 ---- return_type = klass; jvalue result; ! _Jv_CallAnyMethodA (obj, return_type, id, ! style == constructor, ! style == normal, ! arg_types, args, &result); ! return wrap_value (env, extract_from_jvalue(result)); } catch (jthrowable t) { *************** static T *** 799,807 **** obj = unwrap (obj); klass = unwrap (klass); - if (style == normal) - id = _Jv_LookupDeclaredMethod (obj->getClass (), id->name, id->signature); - jclass decl_class = klass ? klass : obj->getClass (); JvAssert (decl_class != NULL); --- 824,829 ---- *************** static T *** 828,842 **** } jvalue result; ! jthrowable ex = _Jv_CallAnyMethodA (obj, return_type, id, ! style == constructor, ! arg_types, arg_copy, &result); ! ! if (ex != NULL) ! env->ex = ex; ! // We cheat a little here. FIXME. ! return wrap_value (env, * (T *) &result); } catch (jthrowable t) { --- 850,861 ---- } jvalue result; ! _Jv_CallAnyMethodA (obj, return_type, id, ! style == constructor, ! style == normal, ! arg_types, arg_copy, &result); ! return wrap_value (env, extract_from_jvalue(result)); } catch (jthrowable t) { *************** static void *** 854,862 **** obj = unwrap (obj); klass = unwrap (klass); - if (style == normal) - id = _Jv_LookupDeclaredMethod (obj->getClass (), id->name, id->signature); - jclass decl_class = klass ? klass : obj->getClass (); JvAssert (decl_class != NULL); --- 873,878 ---- *************** static void *** 874,885 **** if (style == constructor) return_type = klass; ! jthrowable ex = _Jv_CallAnyMethodA (obj, return_type, id, ! style == constructor, ! arg_types, args, NULL); ! ! if (ex != NULL) ! env->ex = ex; } catch (jthrowable t) { --- 890,899 ---- if (style == constructor) return_type = klass; ! _Jv_CallAnyMethodA (obj, return_type, id, ! style == constructor, ! style == normal, ! arg_types, args, NULL); } catch (jthrowable t) { *************** static void *** 904,912 **** (JNICALL _Jv_JNI_CallAnyVoidMethodA) (JNIEnv *env, jobject obj, jclass klass, jmethodID id, jvalue *args) { - if (style == normal) - id = _Jv_LookupDeclaredMethod (obj->getClass (), id->name, id->signature); - jclass decl_class = klass ? klass : obj->getClass (); JvAssert (decl_class != NULL); --- 918,923 ---- *************** static void *** 928,939 **** arg_copy[i].l = unwrap (args[i].l); } ! jthrowable ex = _Jv_CallAnyMethodA (obj, return_type, id, ! style == constructor, ! arg_types, args, NULL); ! ! if (ex != NULL) ! env->ex = ex; } catch (jthrowable t) { --- 939,948 ---- arg_copy[i].l = unwrap (args[i].l); } ! _Jv_CallAnyMethodA (obj, return_type, id, ! style == constructor, ! style == normal, ! arg_types, args, NULL); } catch (jthrowable t) { *************** static jfieldID *** 1170,1176 **** // FIXME: what if field_class == NULL? ! java::lang::ClassLoader *loader = clazz->getClassLoader (); while (clazz != NULL) { // We acquire the class lock so that fields aren't resolved --- 1179,1185 ---- // FIXME: what if field_class == NULL? ! java::lang::ClassLoader *loader = clazz->getClassLoaderInternal (); while (clazz != NULL) { // We acquire the class lock so that fields aren't resolved *************** static const char * *** 1289,1300 **** (JNICALL _Jv_JNI_GetStringUTFChars) (JNIEnv *env, jstring string, jboolean *isCopy) { - string = unwrap (string); - jsize len = JvGetStringUTFLength (string); try { char *r = (char *) _Jv_Malloc (len + 1); ! JvGetStringUTFRegion (string, 0, len, r); r[len] = '\0'; if (isCopy) --- 1298,1311 ---- (JNICALL _Jv_JNI_GetStringUTFChars) (JNIEnv *env, jstring string, jboolean *isCopy) { try { + string = unwrap (string); + if (string == NULL) + return NULL; + jsize len = JvGetStringUTFLength (string); char *r = (char *) _Jv_Malloc (len + 1); ! JvGetStringUTFRegion (string, 0, string->length(), r); r[len] = '\0'; if (isCopy) *************** static JArray * *** 1446,1457 **** } } ! template static T * ! (JNICALL _Jv_JNI_GetPrimitiveArrayElements) (JNIEnv *, JArray *array, jboolean *isCopy) { array = unwrap (array); T *elts = elements (array); if (isCopy) { --- 1457,1470 ---- } } ! template static T * ! (JNICALL _Jv_JNI_GetPrimitiveArrayElements) (JNIEnv *env, JArray *array, jboolean *isCopy) { array = unwrap (array); + if (! _Jv_JNI_check_types (env, array, K)) + return NULL; T *elts = elements (array); if (isCopy) { *************** static T * *** 1462,1486 **** return elts; } ! template static void ! (JNICALL _Jv_JNI_ReleasePrimitiveArrayElements) (JNIEnv *, JArray *array, T *, jint /* mode */) { array = unwrap (array); // Note that we ignore MODE. We can do this because we never copy // the array elements. My reading of the JNI documentation is that // this is an option for the implementor. unmark_for_gc (array, global_ref_table); } ! template static void (JNICALL _Jv_JNI_GetPrimitiveArrayRegion) (JNIEnv *env, JArray *array, jsize start, jsize len, T *buf) { array = unwrap (array); // The cast to unsigned lets us save a comparison. if (start < 0 || len < 0 --- 1475,1502 ---- return elts; } ! template static void ! (JNICALL _Jv_JNI_ReleasePrimitiveArrayElements) (JNIEnv *env, JArray *array, T *, jint /* mode */) { array = unwrap (array); + _Jv_JNI_check_types (env, array, K); // Note that we ignore MODE. We can do this because we never copy // the array elements. My reading of the JNI documentation is that // this is an option for the implementor. unmark_for_gc (array, global_ref_table); } ! template static void (JNICALL _Jv_JNI_GetPrimitiveArrayRegion) (JNIEnv *env, JArray *array, jsize start, jsize len, T *buf) { array = unwrap (array); + if (! _Jv_JNI_check_types (env, array, K)) + return; // The cast to unsigned lets us save a comparison. if (start < 0 || len < 0 *************** static void *** 1504,1515 **** } } ! template static void (JNICALL _Jv_JNI_SetPrimitiveArrayRegion) (JNIEnv *env, JArray *array, jsize start, jsize len, T *buf) { array = unwrap (array); // The cast to unsigned lets us save a comparison. if (start < 0 || len < 0 --- 1520,1533 ---- } } ! template static void (JNICALL _Jv_JNI_SetPrimitiveArrayRegion) (JNIEnv *env, JArray *array, jsize start, jsize len, T *buf) { array = unwrap (array); + if (! _Jv_JNI_check_types (env, array, K)) + return; // The cast to unsigned lets us save a comparison. if (start < 0 || len < 0 *************** void *** 1696,1719 **** // Direct byte buffers. static jobject ! (JNICALL _Jv_JNI_NewDirectByteBuffer) (JNIEnv *, void *, jlong) { ! // For now we don't support this. ! return NULL; } static void * ! (JNICALL _Jv_JNI_GetDirectBufferAddress) (JNIEnv *, jobject) { ! // For now we don't support this. ! return NULL; } static jlong ! (JNICALL _Jv_JNI_GetDirectBufferCapacity) (JNIEnv *, jobject) { ! // For now we don't support this. ! return -1; } --- 1714,1741 ---- // Direct byte buffers. static jobject ! (JNICALL _Jv_JNI_NewDirectByteBuffer) (JNIEnv *, void *address, jlong length) { ! using namespace gnu::gcj; ! using namespace java::nio; ! return new DirectByteBufferImpl (reinterpret_cast (address), ! length); } static void * ! (JNICALL _Jv_JNI_GetDirectBufferAddress) (JNIEnv *, jobject buffer) { ! using namespace java::nio; ! DirectByteBufferImpl* bb = static_cast (buffer); ! return reinterpret_cast (bb->address); } static jlong ! (JNICALL _Jv_JNI_GetDirectBufferCapacity) (JNIEnv *, jobject buffer) { ! using namespace java::nio; ! DirectByteBufferImpl* bb = static_cast (buffer); ! return bb->capacity(); } *************** _Jv_LookupJNIMethod (jclass klass, _Jv_U *** 2090,2098 **** function = _Jv_FindSymbolInExecutable (buf + 1); } } ! #else /* WIN32 */ ! args_size; /* Dummy statement to avoid unused parameter warning */ ! #endif /* ! WIN32 */ if (function == NULL) { --- 2112,2118 ---- function = _Jv_FindSymbolInExecutable (buf + 1); } } ! #endif /* WIN32 */ if (function == NULL) { *************** static jint *** 2359,2365 **** return 0; } ! JNIEXPORT jint JNICALL JNI_GetDefaultJavaVMInitArgs (void *args) { jint version = * (jint *) args; --- 2379,2385 ---- return 0; } ! jint JNICALL JNI_GetDefaultJavaVMInitArgs (void *args) { jint version = * (jint *) args; *************** JNI_GetDefaultJavaVMInitArgs (void *args *** 2376,2382 **** return 0; } ! JNIEXPORT jint JNICALL JNI_CreateJavaVM (JavaVM **vm, void **penv, void *args) { JvAssert (! the_vm); --- 2396,2402 ---- return 0; } ! jint JNICALL JNI_CreateJavaVM (JavaVM **vm, void **penv, void *args) { JvAssert (! the_vm); *************** JNI_CreateJavaVM (JavaVM **vm, void **pe *** 2441,2447 **** return 0; } ! JNIEXPORT jint JNICALL JNI_GetCreatedJavaVMs (JavaVM **vm_buffer, jsize buf_len, jsize *n_vms) { if (buf_len <= 0) --- 2461,2467 ---- return 0; } ! jint JNICALL JNI_GetCreatedJavaVMs (JavaVM **vm_buffer, jsize buf_len, jsize *n_vms) { if (buf_len <= 0) *************** struct JNINativeInterface _Jv_JNIFunctio *** 2688,2725 **** _Jv_JNI_NewPrimitiveArray, // NewLongArray _Jv_JNI_NewPrimitiveArray, // NewFloatArray _Jv_JNI_NewPrimitiveArray, // NewDoubleArray ! _Jv_JNI_GetPrimitiveArrayElements, // GetBooleanArrayElements ! _Jv_JNI_GetPrimitiveArrayElements, // GetByteArrayElements ! _Jv_JNI_GetPrimitiveArrayElements, // GetCharArrayElements ! _Jv_JNI_GetPrimitiveArrayElements, // GetShortArrayElements ! _Jv_JNI_GetPrimitiveArrayElements, // GetIntArrayElements ! _Jv_JNI_GetPrimitiveArrayElements, // GetLongArrayElements ! _Jv_JNI_GetPrimitiveArrayElements, // GetFloatArrayElements ! _Jv_JNI_GetPrimitiveArrayElements, // GetDoubleArrayElements ! _Jv_JNI_ReleasePrimitiveArrayElements, // ReleaseBooleanArrayElements ! _Jv_JNI_ReleasePrimitiveArrayElements, // ReleaseByteArrayElements ! _Jv_JNI_ReleasePrimitiveArrayElements, // ReleaseCharArrayElements ! _Jv_JNI_ReleasePrimitiveArrayElements, // ReleaseShortArrayElements ! _Jv_JNI_ReleasePrimitiveArrayElements, // ReleaseIntArrayElements ! _Jv_JNI_ReleasePrimitiveArrayElements, // ReleaseLongArrayElements ! _Jv_JNI_ReleasePrimitiveArrayElements, // ReleaseFloatArrayElements ! _Jv_JNI_ReleasePrimitiveArrayElements, // ReleaseDoubleArrayElements ! _Jv_JNI_GetPrimitiveArrayRegion, // GetBooleanArrayRegion ! _Jv_JNI_GetPrimitiveArrayRegion, // GetByteArrayRegion ! _Jv_JNI_GetPrimitiveArrayRegion, // GetCharArrayRegion ! _Jv_JNI_GetPrimitiveArrayRegion, // GetShortArrayRegion ! _Jv_JNI_GetPrimitiveArrayRegion, // GetIntArrayRegion ! _Jv_JNI_GetPrimitiveArrayRegion, // GetLongArrayRegion ! _Jv_JNI_GetPrimitiveArrayRegion, // GetFloatArrayRegion ! _Jv_JNI_GetPrimitiveArrayRegion, // GetDoubleArrayRegion ! _Jv_JNI_SetPrimitiveArrayRegion, // SetBooleanArrayRegion ! _Jv_JNI_SetPrimitiveArrayRegion, // SetByteArrayRegion ! _Jv_JNI_SetPrimitiveArrayRegion, // SetCharArrayRegion ! _Jv_JNI_SetPrimitiveArrayRegion, // SetShortArrayRegion ! _Jv_JNI_SetPrimitiveArrayRegion, // SetIntArrayRegion ! _Jv_JNI_SetPrimitiveArrayRegion, // SetLongArrayRegion ! _Jv_JNI_SetPrimitiveArrayRegion, // SetFloatArrayRegion ! _Jv_JNI_SetPrimitiveArrayRegion, // SetDoubleArrayRegion _Jv_JNI_RegisterNatives, // RegisterNatives _Jv_JNI_UnregisterNatives, // UnregisterNatives _Jv_JNI_MonitorEnter, // MonitorEnter --- 2708,2777 ---- _Jv_JNI_NewPrimitiveArray, // NewLongArray _Jv_JNI_NewPrimitiveArray, // NewFloatArray _Jv_JNI_NewPrimitiveArray, // NewDoubleArray ! _Jv_JNI_GetPrimitiveArrayElements, ! // GetBooleanArrayElements ! _Jv_JNI_GetPrimitiveArrayElements, ! // GetByteArrayElements ! _Jv_JNI_GetPrimitiveArrayElements, ! // GetCharArrayElements ! _Jv_JNI_GetPrimitiveArrayElements, ! // GetShortArrayElements ! _Jv_JNI_GetPrimitiveArrayElements, ! // GetIntArrayElements ! _Jv_JNI_GetPrimitiveArrayElements, ! // GetLongArrayElements ! _Jv_JNI_GetPrimitiveArrayElements, ! // GetFloatArrayElements ! _Jv_JNI_GetPrimitiveArrayElements, ! // GetDoubleArrayElements ! _Jv_JNI_ReleasePrimitiveArrayElements, ! // ReleaseBooleanArrayElements ! _Jv_JNI_ReleasePrimitiveArrayElements, ! // ReleaseByteArrayElements ! _Jv_JNI_ReleasePrimitiveArrayElements, ! // ReleaseCharArrayElements ! _Jv_JNI_ReleasePrimitiveArrayElements, ! // ReleaseShortArrayElements ! _Jv_JNI_ReleasePrimitiveArrayElements, ! // ReleaseIntArrayElements ! _Jv_JNI_ReleasePrimitiveArrayElements, ! // ReleaseLongArrayElements ! _Jv_JNI_ReleasePrimitiveArrayElements, ! // ReleaseFloatArrayElements ! _Jv_JNI_ReleasePrimitiveArrayElements, ! // ReleaseDoubleArrayElements ! _Jv_JNI_GetPrimitiveArrayRegion, ! // GetBooleanArrayRegion ! _Jv_JNI_GetPrimitiveArrayRegion, ! // GetByteArrayRegion ! _Jv_JNI_GetPrimitiveArrayRegion, ! // GetCharArrayRegion ! _Jv_JNI_GetPrimitiveArrayRegion, ! // GetShortArrayRegion ! _Jv_JNI_GetPrimitiveArrayRegion, ! // GetIntArrayRegion ! _Jv_JNI_GetPrimitiveArrayRegion, ! // GetLongArrayRegion ! _Jv_JNI_GetPrimitiveArrayRegion, ! // GetFloatArrayRegion ! _Jv_JNI_GetPrimitiveArrayRegion, ! // GetDoubleArrayRegion ! _Jv_JNI_SetPrimitiveArrayRegion, ! // SetBooleanArrayRegion ! _Jv_JNI_SetPrimitiveArrayRegion, ! // SetByteArrayRegion ! _Jv_JNI_SetPrimitiveArrayRegion, ! // SetCharArrayRegion ! _Jv_JNI_SetPrimitiveArrayRegion, ! // SetShortArrayRegion ! _Jv_JNI_SetPrimitiveArrayRegion, ! // SetIntArrayRegion ! _Jv_JNI_SetPrimitiveArrayRegion, ! // SetLongArrayRegion ! _Jv_JNI_SetPrimitiveArrayRegion, ! // SetFloatArrayRegion ! _Jv_JNI_SetPrimitiveArrayRegion, ! // SetDoubleArrayRegion _Jv_JNI_RegisterNatives, // RegisterNatives _Jv_JNI_UnregisterNatives, // UnregisterNatives _Jv_JNI_MonitorEnter, // MonitorEnter diff -Nrc3pad gcc-3.3.3/libjava/libart.m4 gcc-3.4.0/libjava/libart.m4 *** gcc-3.3.3/libjava/libart.m4 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/libart.m4 2003-08-04 18:27:27.000000000 +0000 *************** *** 0 **** --- 1,168 ---- + # Configure paths for LIBART + # Raph Levien 98-11-18 + # stolen from Manish Singh 98-9-30 + # stolen back from Frank Belew + # stolen from Manish Singh + # Shamelessly stolen from Owen Taylor + + dnl AM_PATH_LIBART([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) + dnl Test for LIBART, and define LIBART_CFLAGS and LIBART_LIBS + dnl + AC_DEFUN(AM_PATH_LIBART, + [dnl + dnl Get the cflags and libraries from the libart-config script + dnl + AC_ARG_WITH(libart-prefix,[ --with-libart-prefix=PFX Prefix where LIBART is installed (optional)], + libart_prefix="$withval", libart_prefix="") + AC_ARG_WITH(libart-exec-prefix,[ --with-libart-exec-prefix=PFX Exec prefix where LIBART is installed (optional)], + libart_exec_prefix="$withval", libart_exec_prefix="") + AC_ARG_ENABLE(libarttest, [ --disable-libarttest Do not try to compile and run a test LIBART program], + , enable_libarttest=yes) + + if test x$libart_exec_prefix != x ; then + libart_args="$libart_args --exec-prefix=$libart_exec_prefix" + if test x${LIBART_CONFIG+set} != xset ; then + LIBART_CONFIG=$libart_exec_prefix/bin/libart-config + fi + fi + if test x$libart_prefix != x ; then + libart_args="$libart_args --prefix=$libart_prefix" + if test x${LIBART_CONFIG+set} != xset ; then + LIBART_CONFIG=$libart_prefix/bin/libart-config + fi + fi + + AC_PATH_PROG(LIBART_CONFIG, libart2-config, no) + if test "$LIBART_CONFIG" = "no" ; then + AC_PATH_PROG(LIBART_CONFIG, libart-config, no) + fi + min_libart_version=ifelse([$1], ,0.2.5,$1) + AC_MSG_CHECKING(for LIBART - version >= $min_libart_version) + no_libart="" + if test "$LIBART_CONFIG" = "no" ; then + no_libart=yes + else + LIBART_CFLAGS=`$LIBART_CONFIG $libartconf_args --cflags` + LIBART_LIBS=`$LIBART_CONFIG $libartconf_args --libs` + + libart_major_version=`$LIBART_CONFIG $libart_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + libart_minor_version=`$LIBART_CONFIG $libart_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + libart_micro_version=`$LIBART_CONFIG $libart_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_libarttest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $LIBART_CFLAGS" + LIBS="$LIBS $LIBART_LIBS" + dnl + dnl Now check if the installed LIBART is sufficiently new. (Also sanity + dnl checks the results of libart-config to some extent + dnl + rm -f conf.libarttest + AC_TRY_RUN([ + #include + #include + #include + #include + + char* + my_strdup (char *str) + { + char *new_str; + + if (str) + { + new_str = malloc ((strlen (str) + 1) * sizeof(char)); + strcpy (new_str, str); + } + else + new_str = NULL; + + return new_str; + } + + int main () + { + int major, minor, micro; + char *tmp_version; + + system ("touch conf.libarttest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = my_strdup("$min_libart_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_libart_version"); + exit(1); + } + + if (($libart_major_version > major) || + (($libart_major_version == major) && ($libart_minor_version > minor)) || + (($libart_major_version == major) && ($libart_minor_version == minor) && ($libart_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** 'libart-config --version' returned %d.%d.%d, but the minimum version\n", $libart_major_version, $libart_minor_version, $libart_micro_version); + printf("*** of LIBART required is %d.%d.%d. If libart-config is correct, then it is\n", major, minor, micro); + printf("*** best to upgrade to the required version.\n"); + printf("*** If libart-config was wrong, set the environment variable LIBART_CONFIG\n"); + printf("*** to point to the correct copy of libart-config, and remove the file\n"); + printf("*** config.cache before re-running configure\n"); + return 1; + } + } + + ],, no_libart=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_libart" = x ; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$LIBART_CONFIG" = "no" ; then + echo "*** The libart-config script installed by LIBART could not be found" + echo "*** If LIBART was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the LIBART_CONFIG environment variable to the" + echo "*** full path to libart-config." + else + if test -f conf.libarttest ; then + : + else + echo "*** Could not run LIBART test program, checking why..." + CFLAGS="$CFLAGS $LIBART_CFLAGS" + LIBS="$LIBS $LIBART_LIBS" + AC_TRY_LINK([ + #include + #include + ], [ return 0; ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding LIBART or finding the wrong" + echo "*** version of LIBART. If it is not finding LIBART, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means LIBART was incorrectly installed" + echo "*** or that you have moved LIBART since it was installed. In the latter case, you" + echo "*** may want to edit the libart-config script: $LIBART_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + LIBART_CFLAGS="" + LIBART_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(LIBART_CFLAGS) + AC_SUBST(LIBART_LIBS) + rm -f conf.libarttest + ]) diff -Nrc3pad gcc-3.3.3/libjava/libgcj.pc.in gcc-3.4.0/libjava/libgcj.pc.in *** gcc-3.3.3/libjava/libgcj.pc.in 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/libgcj.pc.in 2003-07-09 07:11:11.000000000 +0000 *************** *** 0 **** --- 1,10 ---- + prefix=@prefix@ + exec_prefix=@exec_prefix@ + libdir=@libdir@ + includedir=@includedir@ + + Name: libgcj + Description: libgcj + Version: @GCJVERSION@ + Libs: -L${libdir} -lgcj + Cflags: -I${includedir} diff -Nrc3pad gcc-3.3.3/libjava/libltdl/acconfig.h gcc-3.4.0/libjava/libltdl/acconfig.h *** gcc-3.3.3/libjava/libltdl/acconfig.h 2000-02-14 21:59:58.000000000 +0000 --- gcc-3.4.0/libjava/libltdl/acconfig.h 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,15 **** - /* Some of these are defined here, not in configure.in, because - they're AC_DEFINEd in two different places, which causes two - defines to appear. Some C compilers might now appreciate it... */ - - /* Define if you have the libdl library or equivalent. */ - #undef HAVE_LIBDL - - /* Define if you have the GNU dld library. */ - #undef HAVE_DLD - - /* Define if you have the shl_load function. */ - #undef HAVE_SHL_LOAD - - /* Define if you are using the Boehm GC. */ - #undef HAVE_BOEHM_GC --- 0 ---- diff -Nrc3pad gcc-3.3.3/libjava/libltdl/acinclude.m4 gcc-3.4.0/libjava/libltdl/acinclude.m4 *** gcc-3.3.3/libjava/libltdl/acinclude.m4 2000-09-10 08:04:40.000000000 +0000 --- gcc-3.4.0/libjava/libltdl/acinclude.m4 2003-12-16 21:48:24.000000000 +0000 *************** *** 1,5 **** ! ## libtool.m4 - Configure libtool for the host system. -*-Shell-script-*- ! ## Copyright (C) 1996-1999,2000 Free Software Foundation, Inc. ## Originally by Gordon Matzigkeit , 1996 ## ## This program is free software; you can redistribute it and/or modify --- 1,6 ---- ! # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- ! ## Copyright 1996, 1997, 1998, 1999, 2000, 2001 ! ## Free Software Foundation, Inc. ## Originally by Gordon Matzigkeit , 1996 ## ## This program is free software; you can redistribute it and/or modify *************** *** 21,33 **** ## configuration script generated by Autoconf, you may include it under ## the same distribution terms that you use for the rest of that program. ! # serial 45 AC_PROG_LIBTOOL ! AC_DEFUN(AC_PROG_LIBTOOL,[AC_REQUIRE([_AC_PROG_LIBTOOL]) dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. --- 22,54 ---- ## configuration script generated by Autoconf, you may include it under ## the same distribution terms that you use for the rest of that program. ! # serial 47 AC_PROG_LIBTOOL ! ! ! # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) ! # ----------------------------------------------------------- ! # If this macro is not defined by Autoconf, define it here. ! m4_ifdef([AC_PROVIDE_IFELSE], ! [], ! [m4_define([AC_PROVIDE_IFELSE], ! [m4_ifdef([AC_PROVIDE_$1], ! [$2], [$3])])]) ! ! ! # AC_PROG_LIBTOOL ! # --------------- ! AC_DEFUN([AC_PROG_LIBTOOL], ! [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX + ])]) + dnl And a similar setup for Fortran 77 support + AC_PROVIDE_IFELSE([AC_PROG_F77], + [AC_LIBTOOL_F77], + [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. *************** dnl AC_LIBTOOL_GCJ immediately, otherwis *** 36,85 **** AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], ! [AC_LIBTOOL_GCJ], ! [ifdef([AC_PROG_GCJ], ! [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ ! ])]) ! ifdef([A][M_PROG_GCJ], ! [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ ! ])])])])]) ! AC_DEFUN(_AC_PROG_LIBTOOL, [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl - # Save cache, so that ltconfig can load it - AC_CACHE_SAVE - - # Actually configure libtool. ac_aux_dir is where install-sh is found. - AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ - MAGIC="$MAGIC" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ - LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \ - AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \ - objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \ - deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \ - ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ - $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \ - || AC_MSG_ERROR([libtool configure failed]) - - # Reload cache, that may have been modified by ltconfig - AC_CACHE_LOAD - # This can be used to rebuild libtool when needed ! LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl ! # Redirect the config.log output again, so that the ltconfig log is not ! # clobbered by the next message. ! exec 5>>./config.log ! ]) ! AC_DEFUN(AC_LIBTOOL_SETUP, ! [AC_PREREQ(2.13)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl --- 57,99 ---- AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], ! [AC_LIBTOOL_GCJ], ! [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], ! [AC_LIBTOOL_GCJ], ! [ifdef([AC_PROG_GCJ], ! [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ! ifdef([A][M_PROG_GCJ], ! [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ! ifdef([LT_AC_PROG_GCJ], ! [define([LT_AC_PROG_GCJ], ! defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ! ])])# AC_PROG_LIBTOOL ! ! # _AC_PROG_LIBTOOL ! # ---------------- ! AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl + AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed ! LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl ! # Prevent multiple expansion ! define([AC_PROG_LIBTOOL], []) ! ])# _AC_PROG_LIBTOOL ! ! # AC_LIBTOOL_SETUP ! # ---------------- ! AC_DEFUN([AC_LIBTOOL_SETUP], ! [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl *************** AC_REQUIRE([AC_PROG_CC])dnl *** 89,94 **** --- 103,109 ---- AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl + AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! *************** AC_REQUIRE([AC_OBJEXT])dnl *** 96,143 **** AC_REQUIRE([AC_EXEEXT])dnl dnl # Only perform the check for file, if the check method requires it ! case "$deplibs_check_method" in file_magic*) ! if test "$file_magic_cmd" = '${MAGIC}'; then AC_PATH_MAGIC fi ;; esac ! AC_CHECK_TOOL(RANLIB, ranlib, :) ! AC_CHECK_TOOL(STRIP, strip, :) ! # Check for any special flags to pass to ltconfig. ! libtool_flags="--cache-file=$cache_file" ! test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" ! test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" ! test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" ! test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" ! test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" ! ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], ! [libtool_flags="$libtool_flags --enable-dlopen"]) ! ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], ! [libtool_flags="$libtool_flags --enable-win32-dll"]) ! AC_ARG_ENABLE(libtool-lock, ! [ --disable-libtool-lock avoid locking (might break parallel builds)]) ! test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" ! test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" ! AC_ARG_WITH(pic, ! [ --with-pic try to use only PIC/non-PIC objects [default=use both]], ! pic_mode="$withval", pic_mode=default) ! test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic" ! test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" # Some flags need to be propagated to the compiler or linker for good # libtool support. ! case "$host" in *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then ! case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" ;; --- 111,480 ---- AC_REQUIRE([AC_EXEEXT])dnl dnl + AC_LIBTOOL_SYS_MAX_CMD_LEN + AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE + AC_LIBTOOL_OBJDIR + + AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl + _LT_AC_PROG_ECHO_BACKSLASH + + case $host_os in + aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; + esac + + # Sed substitution that helps us do robust quoting. It backslashifies + # metacharacters that are still active within double-quoted strings. + Xsed='sed -e s/^X//' + [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] + + # Same as above, but do not quote variable references. + [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] + + # Sed substitution to delay expansion of an escaped shell variable in a + # double_quote_subst'ed string. + delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + + # Sed substitution to avoid accidental globbing in evaled expressions + no_glob_subst='s/\*/\\\*/g' + + # Constants: + rm="rm -f" + + # Global variables: + default_ofile=libtool + can_build_shared=yes + + # All known linkers require a `.a' archive for static linking (except M$VC, + # which needs '.lib'). + libext=a + ltmain="$ac_aux_dir/ltmain.sh" + ofile="$default_ofile" + with_gnu_ld="$lt_cv_prog_gnu_ld" + + AC_CHECK_TOOL(AR, ar, false) + AC_CHECK_TOOL(RANLIB, ranlib, :) + AC_CHECK_TOOL(STRIP, strip, :) + + old_CC="$CC" + old_CFLAGS="$CFLAGS" + + # Set sane defaults for various variables + test -z "$AR" && AR=ar + test -z "$AR_FLAGS" && AR_FLAGS=cru + test -z "$AS" && AS=as + test -z "$CC" && CC=cc + test -z "$LTCC" && LTCC=$CC + test -z "$DLLTOOL" && DLLTOOL=dlltool + test -z "$LD" && LD=ld + test -z "$LN_S" && LN_S="ln -s" + test -z "$MAGIC_CMD" && MAGIC_CMD=file + test -z "$NM" && NM=nm + test -z "$SED" && SED=sed + test -z "$OBJDUMP" && OBJDUMP=objdump + test -z "$RANLIB" && RANLIB=: + test -z "$STRIP" && STRIP=: + test -z "$ac_objext" && ac_objext=o + + # Determine commands to create old-style static archives. + old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' + old_postinstall_cmds='chmod 644 $oldlib' + old_postuninstall_cmds= + + if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" + ;; + *) + old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + fi + # Only perform the check for file, if the check method requires it ! case $deplibs_check_method in file_magic*) ! if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac ! AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) ! AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], ! enable_win32_dll=yes, enable_win32_dll=no) ! AC_ARG_ENABLE([libtool-lock], ! [AC_HELP_STRING([--disable-libtool-lock], ! [avoid locking (might break parallel builds)])]) ! test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes ! AC_ARG_WITH([pic], ! [AC_HELP_STRING([--with-pic], ! [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], ! [pic_mode="$withval"], ! [pic_mode=default]) ! test -z "$pic_mode" && pic_mode=default ! ! # Use C for the default configuration in the libtool script ! tagname= ! AC_LIBTOOL_LANG_C_CONFIG ! _LT_AC_TAGCONFIG ! ])# AC_LIBTOOL_SETUP ! ! ! # _LT_AC_SYS_COMPILER ! # ------------------- ! AC_DEFUN([_LT_AC_SYS_COMPILER], ! [AC_REQUIRE([AC_PROG_CC])dnl ! ! # If no C compiler was specified, use CC. ! LTCC=${LTCC-"$CC"} ! ! # Allow CC to be a program name with arguments. ! compiler=$CC ! ])# _LT_AC_SYS_COMPILER ! ! ! # _LT_AC_SYS_LIBPATH_AIX ! # ---------------------- ! # Links a minimal program and checks the executable ! # for the system default hardcoded library path. In most cases, ! # this is /usr/lib:/lib, but when the MPI compilers are used ! # the location of the communication and MPI libs are included too. ! # If we don't find anything, use the default library path according ! # to the aix ld manual. ! AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], ! [AC_LINK_IFELSE(AC_LANG_PROGRAM,[ ! aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } ! }'` ! # Check for a 64-bit object if we didn't find anything. ! if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } ! }'`; fi],[]) ! if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ! ])# _LT_AC_SYS_LIBPATH_AIX ! ! ! # _LT_AC_SHELL_INIT(ARG) ! # ---------------------- ! AC_DEFUN([_LT_AC_SHELL_INIT], ! [ifdef([AC_DIVERSION_NOTICE], ! [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], ! [AC_DIVERT_PUSH(NOTICE)]) ! $1 ! AC_DIVERT_POP ! ])# _LT_AC_SHELL_INIT ! ! ! # _LT_AC_PROG_ECHO_BACKSLASH ! # -------------------------- ! # Add some code to the start of the generated configure script which ! # will find an echo command which doesn't interpret backslashes. ! AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], ! [_LT_AC_SHELL_INIT([ ! # Check that we are running under the correct shell. ! SHELL=${CONFIG_SHELL-/bin/sh} ! ! case X$ECHO in ! X*--fallback-echo) ! # Remove one level of quotation (which was required for Make). ! ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ! ;; ! esac ! ! echo=${ECHO-echo} ! if test "X[$]1" = X--no-reexec; then ! # Discard the --no-reexec flag, and continue. ! shift ! elif test "X[$]1" = X--fallback-echo; then ! # Avoid inline document here, it may be left over ! : ! elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then ! # Yippee, $echo works! ! : ! else ! # Restart under the correct shell. ! exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} ! fi ! ! if test "X[$]1" = X--fallback-echo; then ! # used as fallback echo ! shift ! cat </dev/null && ! echo_test_string="`eval $cmd`" && ! (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null ! then ! break ! fi ! done ! fi ! ! if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && ! echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && ! test "X$echo_testing_string" = "X$echo_test_string"; then ! : ! else ! # The Solaris, AIX, and Digital Unix default echo programs unquote ! # backslashes. This makes it impossible to quote backslashes using ! # echo "$something" | sed 's/\\/\\\\/g' ! # ! # So, first we look for a working echo in the user's PATH. ! ! lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ! for dir in $PATH /usr/ucb; do ! IFS="$lt_save_ifs" ! if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && ! test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && ! echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && ! test "X$echo_testing_string" = "X$echo_test_string"; then ! echo="$dir/echo" ! break ! fi ! done ! IFS="$lt_save_ifs" ! ! if test "X$echo" = Xecho; then ! # We didn't find a better echo, so look for alternatives. ! if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && ! echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && ! test "X$echo_testing_string" = "X$echo_test_string"; then ! # This shell has a builtin print -r that does the trick. ! echo='print -r' ! elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && ! test "X$CONFIG_SHELL" != X/bin/ksh; then ! # If we have ksh, try running configure again with it. ! ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} ! export ORIGINAL_CONFIG_SHELL ! CONFIG_SHELL=/bin/ksh ! export CONFIG_SHELL ! exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} ! else ! # Try using printf. ! echo='printf %s\n' ! if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && ! echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && ! test "X$echo_testing_string" = "X$echo_test_string"; then ! # Cool, printf works ! : ! elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && ! test "X$echo_testing_string" = 'X\t' && ! echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && ! test "X$echo_testing_string" = "X$echo_test_string"; then ! CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL ! export CONFIG_SHELL ! SHELL="$CONFIG_SHELL" ! export SHELL ! echo="$CONFIG_SHELL [$]0 --fallback-echo" ! elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && ! test "X$echo_testing_string" = 'X\t' && ! echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && ! test "X$echo_testing_string" = "X$echo_test_string"; then ! echo="$CONFIG_SHELL [$]0 --fallback-echo" ! else ! # maybe with a smaller string... ! prev=: ! ! for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do ! if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null ! then ! break ! fi ! prev="$cmd" ! done ! ! if test "$prev" != 'sed 50q "[$]0"'; then ! echo_test_string=`eval $prev` ! export echo_test_string ! exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} ! else ! # Oops. We lost completely, so just stick with echo. ! echo=echo ! fi ! fi ! fi ! fi ! fi ! fi ! ! # Copy echo and quote the copy suitably for passing to libtool from ! # the Makefile, instead of quoting the original, which is used later. ! ECHO=$echo ! if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ! ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" ! fi ! ! AC_SUBST(ECHO) ! ])])# _LT_AC_PROG_ECHO_BACKSLASH ! ! ! # _LT_AC_LOCK ! # ----------- ! AC_DEFUN([_LT_AC_LOCK], ! [AC_ARG_ENABLE([libtool-lock], ! [AC_HELP_STRING([--disable-libtool-lock], ! [avoid locking (might break parallel builds)])]) ! test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. ! case $host in ! ia64-*-hpux*) ! # Find out which ABI we are using. ! echo 'int i;' > conftest.$ac_ext ! if AC_TRY_EVAL(ac_compile); then ! case `/usr/bin/file conftest.$ac_objext` in ! *ELF-32*) ! HPUX_IA64_MODE="32" ! ;; ! *ELF-64*) ! HPUX_IA64_MODE="64" ! ;; ! esac ! fi ! rm -rf conftest* ! ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then ! if test "$lt_cv_prog_gnu_ld" = yes; then ! case `/usr/bin/file conftest.$ac_objext` in ! *32-bit*) ! LD="${LD-ld} -melf32bsmip" ! ;; ! *N32*) ! LD="${LD-ld} -melf32bmipn32" ! ;; ! *64-bit*) ! LD="${LD-ld} -melf64bmip" ! ;; ! esac ! else ! case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *************** case "$host" in *** 148,153 **** --- 485,533 ---- LD="${LD-ld} -64" ;; esac + fi + fi + rm -rf conftest* + ;; + + x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case "`/usr/bin/file conftest.o`" in + *32-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac fi rm -rf conftest* ;; *************** case "$host" in *** 157,348 **** SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, ! [AC_LANG_SAVE ! AC_LANG_C AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) ! AC_LANG_RESTORE]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; ! ! ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], ! [*-*-cygwin* | *-*-mingw*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) - - # recent cygwin and mingw systems supply a stub DllMain which the user - # can override, but on older systems we have to supply one - AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain, - [AC_TRY_LINK([], - [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); - DllMain (0, 0, 0);], - [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])]) - - case "$host/$CC" in - *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) - # old mingw systems require "-dll" to link a DLL, while more recent ones - # require "-mdll" - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -mdll" - AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch, - [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])]) - CFLAGS="$SAVE_CFLAGS" ;; - *-*-cygwin*) - # cygwin systems need to pass --dll to the linker, and not link - # crt.o which will require a WinMain@16 definition. - lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; - esac ;; ]) esac ]) ! # AC_LIBTOOL_DLOPEN - enable checks for dlopen support ! AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) - # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's - AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) ! # AC_ENABLE_SHARED - implement the --enable-shared flag ! # Usage: AC_ENABLE_SHARED[(DEFAULT)] ! # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to ! # `yes'. ! AC_DEFUN(AC_ENABLE_SHARED, [dnl ! define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl ! AC_ARG_ENABLE(shared, ! changequote(<<, >>)dnl ! << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], ! changequote([, ])dnl ! [p=${PACKAGE-default} ! case "$enableval" in ! yes) enable_shared=yes ;; ! no) enable_shared=no ;; ! *) ! enable_shared=no ! # Look at the argument we got. We use all the common list separators. ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," ! for pkg in $enableval; do ! if test "X$pkg" = "X$p"; then ! enable_shared=yes ! fi ! done ! IFS="$ac_save_ifs" ! ;; ! esac], ! enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl ]) ! # AC_DISABLE_SHARED - set the default shared flag to --disable-shared ! AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl ! AC_ENABLE_SHARED(no)]) ! # AC_ENABLE_STATIC - implement the --enable-static flag ! # Usage: AC_ENABLE_STATIC[(DEFAULT)] ! # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to ! # `yes'. ! AC_DEFUN(AC_ENABLE_STATIC, [dnl ! define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl ! AC_ARG_ENABLE(static, ! changequote(<<, >>)dnl ! << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], ! changequote([, ])dnl ! [p=${PACKAGE-default} ! case "$enableval" in ! yes) enable_static=yes ;; ! no) enable_static=no ;; ! *) ! enable_static=no ! # Look at the argument we got. We use all the common list separators. ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," ! for pkg in $enableval; do ! if test "X$pkg" = "X$p"; then ! enable_static=yes fi ! done ! IFS="$ac_save_ifs" ! ;; ! esac], ! enable_static=AC_ENABLE_STATIC_DEFAULT)dnl ]) - # AC_DISABLE_STATIC - set the default static flag to --disable-static - AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_ENABLE_STATIC(no)]) ! # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag ! # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] ! # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to ! # `yes'. ! AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl ! define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl ! AC_ARG_ENABLE(fast-install, ! changequote(<<, >>)dnl ! << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], ! changequote([, ])dnl ! [p=${PACKAGE-default} ! case "$enableval" in ! yes) enable_fast_install=yes ;; ! no) enable_fast_install=no ;; ! *) enable_fast_install=no ! # Look at the argument we got. We use all the common list separators. ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," ! for pkg in $enableval; do ! if test "X$pkg" = "X$p"; then ! enable_fast_install=yes fi ! done ! IFS="$ac_save_ifs" ;; - esac], - enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl - ]) ! # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install ! AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl ! AC_ENABLE_FAST_INSTALL(no)]) ! # AC_LIBTOOL_PICMODE - implement the --with-pic flag ! # Usage: AC_LIBTOOL_PICMODE[(MODE)] ! # Where MODE is either `yes' or `no'. If omitted, it defaults to ! # `both'. ! AC_DEFUN(AC_LIBTOOL_PICMODE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl ! pic_mode=ifelse($#,1,$1,default)]) ! # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library ! AC_DEFUN(AC_PATH_TOOL_PREFIX, ! [AC_MSG_CHECKING([for $1]) ! AC_CACHE_VAL(lt_cv_path_MAGIC, ! [case "$MAGIC" in ! /*) ! lt_cv_path_MAGIC="$MAGIC" # Let the user override the test with a path. ;; ! ?:/*) ! ac_cv_path_MAGIC="$MAGIC" # Let the user override the test with a dos path. ;; *) ! ac_save_MAGIC="$MAGIC" ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then ! lt_cv_path_MAGIC="$ac_dir/$1" if test -n "$file_magic_test_file"; then ! case "$deplibs_check_method" in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" ! MAGIC="$lt_cv_path_MAGIC" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | ! egrep "$file_magic_regex" > /dev/null; then : else cat <&2 --- 537,1885 ---- SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, ! [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) ! AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; ! AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], ! [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac + + need_locks="$enable_libtool_lock" + + ])# _LT_AC_LOCK + + + # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, + # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) + # ---------------------------------------------------------------- + # Check whether the given compiler option works + AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], + [AC_CACHE_CHECK([$1], [$2], + [$2=no + ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s conftest.err; then + $2=yes + fi + fi + $rm conftest* ]) ! if test x"[$]$2" = xyes; then ! ifelse([$5], , :, [$5]) ! else ! ifelse([$6], , :, [$6]) ! fi ! ])# AC_LIBTOOL_COMPILER_OPTION ! # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, ! # [ACTION-SUCCESS], [ACTION-FAILURE]) ! # ------------------------------------------------------------ ! # Check whether the given compiler option works ! AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], ! [AC_CACHE_CHECK([$1], [$2], ! [$2=no ! save_LDFLAGS="$LDFLAGS" ! LDFLAGS="$LDFLAGS $3" ! printf "$lt_simple_link_test_code" > conftest.$ac_ext ! if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then ! # The compiler can only warn and ignore the option if not recognized ! # So say no if there are warnings ! if test -s conftest.err; then ! # Append any errors to the config.log. ! cat conftest.err 1>&AS_MESSAGE_LOG_FD ! else ! $2=yes ! fi ! fi ! $rm conftest* ! LDFLAGS="$save_LDFLAGS" ]) ! if test x"[$]$2" = xyes; then ! ifelse([$4], , :, [$4]) ! else ! ifelse([$5], , :, [$5]) ! fi ! ])# AC_LIBTOOL_LINKER_OPTION ! ! # AC_LIBTOOL_SYS_MAX_CMD_LEN ! # -------------------------- ! AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], ! [# find the maximum length of command line arguments ! AC_MSG_CHECKING([the maximum length of command line arguments]) ! AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl ! i=0 ! testring="ABCD" ! ! case $build_os in ! msdosdjgpp*) ! # On DJGPP, this test can blow up pretty badly due to problems in libc ! # (any single argument exceeding 2000 bytes causes a buffer overrun ! # during glob expansion). Even if it were fixed, the result of this ! # check would be larger than it should be. ! lt_cv_sys_max_cmd_len=12288; # 12K is about right ! ;; ! ! gnu*) ! # Under GNU Hurd, this test is not required because there is ! # no limit to the length of command line arguments. ! # Libtool will interpret -1 as no limit whatsoever ! lt_cv_sys_max_cmd_len=-1; ! ;; ! ! cygwin* | mingw*) ! # On Win9x/ME, this test blows up -- it succeeds, but takes ! # about 5 minutes as the teststring grows exponentially. ! # Worse, since 9x/ME are not pre-emptively multitasking, ! # you end up with a "frozen" computer, even though with patience ! # the test eventually succeeds (with a max line length of 256k). ! # Instead, let's just punt: use the minimum linelength reported by ! # all of the supported platforms: 8192 (on NT/2K/XP). ! lt_cv_sys_max_cmd_len=8192; ! ;; ! ! *) ! # If test is not a shell built-in, we'll probably end up computing a ! # maximum length that is only half of the actual maximum length, but ! # we can't tell. ! while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \ ! = "XX$testring") >/dev/null 2>&1 && ! new_result=`expr "X$testring" : ".*" 2>&1` && ! lt_cv_sys_max_cmd_len=$new_result && ! test $i != 17 # 1/2 MB should be enough ! do ! i=`expr $i + 1` ! testring=$testring$testring ! done ! testring= ! # Add a significant safety factor because C++ compilers can tack on massive ! # amounts of additional arguments before passing them to the linker. ! # It appears as though 1/2 is a usable value. ! lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ! ;; ! esac ! ]) ! if test -n $lt_cv_sys_max_cmd_len ; then ! AC_MSG_RESULT($lt_cv_sys_max_cmd_len) ! else ! AC_MSG_RESULT(none) ! fi ! ])# AC_LIBTOOL_SYS_MAX_CMD_LEN ! ! ! # _LT_AC_CHECK_DLFCN ! # -------------------- ! AC_DEFUN([_LT_AC_CHECK_DLFCN], ! [AC_CHECK_HEADERS(dlfcn.h)dnl ! ])# _LT_AC_CHECK_DLFCN ! ! ! # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, ! # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) ! # ------------------------------------------------------------------ ! AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], ! [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl ! if test "$cross_compiling" = yes; then : ! [$4] ! else ! lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 ! lt_status=$lt_dlunknown ! cat > conftest.$ac_ext < ! #endif ! ! #include ! ! #ifdef RTLD_GLOBAL ! # define LT_DLGLOBAL RTLD_GLOBAL ! #else ! # ifdef DL_GLOBAL ! # define LT_DLGLOBAL DL_GLOBAL ! # else ! # define LT_DLGLOBAL 0 ! # endif ! #endif ! ! /* We may have to define LT_DLLAZY_OR_NOW in the command line if we ! find out it does not work in some platform. */ ! #ifndef LT_DLLAZY_OR_NOW ! # ifdef RTLD_LAZY ! # define LT_DLLAZY_OR_NOW RTLD_LAZY ! # else ! # ifdef DL_LAZY ! # define LT_DLLAZY_OR_NOW DL_LAZY ! # else ! # ifdef RTLD_NOW ! # define LT_DLLAZY_OR_NOW RTLD_NOW ! # else ! # ifdef DL_NOW ! # define LT_DLLAZY_OR_NOW DL_NOW ! # else ! # define LT_DLLAZY_OR_NOW 0 ! # endif ! # endif ! # endif ! # endif ! #endif ! ! #ifdef __cplusplus ! extern "C" void exit (int); ! #endif ! ! void fnord() { int i=42;} ! int main () ! { ! void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); ! int status = $lt_dlunknown; ! ! if (self) ! { ! if (dlsym (self,"fnord")) status = $lt_dlno_uscore; ! else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; ! /* dlclose (self); */ ! } ! ! exit (status); ! }] ! EOF ! if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then ! (./conftest; exit; ) 2>/dev/null ! lt_status=$? ! case x$lt_status in ! x$lt_dlno_uscore) $1 ;; ! x$lt_dlneed_uscore) $2 ;; ! x$lt_unknown|x*) $3 ;; ! esac ! else : ! # compilation failed ! $3 ! fi ! fi ! rm -fr conftest* ! ])# _LT_AC_TRY_DLOPEN_SELF ! ! ! # AC_LIBTOOL_DLOPEN_SELF ! # ------------------- ! AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], ! [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl ! if test "x$enable_dlopen" != xyes; then ! enable_dlopen=unknown ! enable_dlopen_self=unknown ! enable_dlopen_self_static=unknown ! else ! lt_cv_dlopen=no ! lt_cv_dlopen_libs= ! ! case $host_os in ! beos*) ! lt_cv_dlopen="load_add_on" ! lt_cv_dlopen_libs= ! lt_cv_dlopen_self=yes ! ;; ! ! mingw* | pw32*) ! lt_cv_dlopen="LoadLibrary" ! lt_cv_dlopen_libs= ! ;; ! ! cygwin*) ! lt_cv_dlopen="dlopen" ! lt_cv_dlopen_libs= ! ;; ! ! darwin*) ! # if libdl is installed we need to link against it ! AC_CHECK_LIB([dl], [dlopen], ! [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ ! lt_cv_dlopen="dyld" ! lt_cv_dlopen_libs= ! lt_cv_dlopen_self=yes ! ]) ! ;; ! ! *) ! AC_CHECK_FUNC([shl_load], ! [lt_cv_dlopen="shl_load"], ! [AC_CHECK_LIB([dld], [shl_load], ! [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], ! [AC_CHECK_FUNC([dlopen], ! [lt_cv_dlopen="dlopen"], ! [AC_CHECK_LIB([dl], [dlopen], ! [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], ! [AC_CHECK_LIB([svld], [dlopen], ! [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], ! [AC_CHECK_LIB([dld], [dld_link], ! [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ! ]) ! ]) ! ]) ! ]) ! ]) ! ;; ! esac ! ! if test "x$lt_cv_dlopen" != xno; then ! enable_dlopen=yes ! else ! enable_dlopen=no ! fi ! ! case $lt_cv_dlopen in ! dlopen) ! save_CPPFLAGS="$CPPFLAGS" ! test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" ! ! save_LDFLAGS="$LDFLAGS" ! eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" ! ! save_LIBS="$LIBS" ! LIBS="$lt_cv_dlopen_libs $LIBS" ! ! AC_CACHE_CHECK([whether a program can dlopen itself], ! lt_cv_dlopen_self, [dnl ! _LT_AC_TRY_DLOPEN_SELF( ! lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, ! lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ! ]) ! ! if test "x$lt_cv_dlopen_self" = xyes; then ! LDFLAGS="$LDFLAGS $link_static_flag" ! AC_CACHE_CHECK([whether a statically linked program can dlopen itself], ! lt_cv_dlopen_self_static, [dnl ! _LT_AC_TRY_DLOPEN_SELF( ! lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, ! lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ! ]) fi ! ! CPPFLAGS="$save_CPPFLAGS" ! LDFLAGS="$save_LDFLAGS" ! LIBS="$save_LIBS" ! ;; ! esac ! ! case $lt_cv_dlopen_self in ! yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; ! *) enable_dlopen_self=unknown ;; ! esac ! ! case $lt_cv_dlopen_self_static in ! yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; ! *) enable_dlopen_self_static=unknown ;; ! esac ! fi ! ])# AC_LIBTOOL_DLOPEN_SELF ! ! ! # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) ! # --------------------------------- ! # Check to see if options -c and -o are simultaneously supported by compiler ! AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], ! [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl ! AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], ! [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], ! [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no ! $rm -r conftest 2>/dev/null ! mkdir conftest ! cd conftest ! mkdir out ! printf "$lt_simple_compile_test_code" > conftest.$ac_ext ! ! # According to Tom Tromey, Ian Lance Taylor reported there are C compilers ! # that will create temporary files in the current directory regardless of ! # the output directory. Thus, making CWD read-only will cause this test ! # to fail, enabling locking or at least warning the user not to do parallel ! # builds. ! chmod -w . ! ! lt_compiler_flag="-o out/conftest2.$ac_objext" ! # Insert the option either (1) after the last *FLAGS variable, or ! # (2) before a word containing "conftest.", or (3) at the end. ! # Note that $ac_compile itself does not contain backslashes and begins ! # with a dollar sign (not a hyphen), so the echo should work correctly. ! lt_compile=`echo "$ac_compile" | $SED \ ! -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ ! -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ ! -e 's:$: $lt_compiler_flag:'` ! (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) ! (eval "$lt_compile" 2>out/conftest.err) ! ac_status=$? ! cat out/conftest.err >&AS_MESSAGE_LOG_FD ! echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD ! if (exit $ac_status) && test -s out/conftest2.$ac_objext ! then ! # The compiler can only warn and ignore the option if not recognized ! # So say no if there are warnings ! if test ! -s out/conftest.err; then ! _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes ! fi ! fi ! chmod u+w . ! $rm conftest* out/* ! rmdir out ! cd .. ! rmdir conftest ! $rm conftest* ]) + ])# AC_LIBTOOL_PROG_CC_C_O + # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) + # ----------------------------------------- + # Check to see if we can do hard links to lock some files if needed + AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], + [AC_REQUIRE([_LT_AC_LOCK])dnl ! hard_links="nottested" ! if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then ! # do not overwrite the value of need_locks provided by the user ! AC_MSG_CHECKING([if we can lock with hard links]) ! hard_links=yes ! $rm conftest* ! ln conftest.a conftest.b 2>/dev/null && hard_links=no ! touch conftest.a ! ln conftest.a conftest.b 2>&5 || hard_links=no ! ln conftest.a conftest.b 2>/dev/null && hard_links=no ! AC_MSG_RESULT([$hard_links]) ! if test "$hard_links" = no; then ! AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) ! need_locks=warn ! fi ! else ! need_locks=no ! fi ! ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS ! ! ! # AC_LIBTOOL_OBJDIR ! # ----------------- ! AC_DEFUN([AC_LIBTOOL_OBJDIR], ! [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], ! [rm -f .libs 2>/dev/null ! mkdir .libs 2>/dev/null ! if test -d .libs; then ! lt_cv_objdir=.libs ! else ! # MS-DOS does not allow filenames that begin with a dot. ! lt_cv_objdir=_libs ! fi ! rmdir .libs 2>/dev/null]) ! objdir=$lt_cv_objdir ! ])# AC_LIBTOOL_OBJDIR ! ! ! # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) ! # ---------------------------------------------- ! # Check hardcoding attributes. ! AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], ! [AC_MSG_CHECKING([how to hardcode library paths into programs]) ! _LT_AC_TAGVAR(hardcode_action, $1)= ! if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ ! test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \ ! test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then ! ! # We can hardcode non-existant directories. ! if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && ! # If the only mechanism to avoid hardcoding is shlibpath_var, we ! # have to relink, otherwise we might link with an installed library ! # when we should be linking with a yet-to-be-installed one ! ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && ! test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then ! # Linking always hardcodes the temporary library directory. ! _LT_AC_TAGVAR(hardcode_action, $1)=relink ! else ! # We can link without hardcoding, and we can hardcode nonexisting dirs. ! _LT_AC_TAGVAR(hardcode_action, $1)=immediate ! fi ! else ! # We cannot hardcode anything, or else we can only hardcode existing ! # directories. ! _LT_AC_TAGVAR(hardcode_action, $1)=unsupported ! fi ! AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) ! ! if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then ! # Fast installation is not supported enable_fast_install=no ! elif test "$shlibpath_overrides_runpath" = yes || ! test "$enable_shared" = no; then ! # Fast installation is not necessary ! enable_fast_install=needless ! fi ! ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH ! ! ! # AC_LIBTOOL_SYS_LIB_STRIP ! # ------------------------ ! AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], ! [striplib= ! old_striplib= ! AC_MSG_CHECKING([whether stripping libraries is possible]) ! if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then ! test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" ! test -z "$striplib" && striplib="$STRIP --strip-unneeded" ! AC_MSG_RESULT([yes]) ! else ! # FIXME - insert some real tests, host_os isn't really good enough ! case $host_os in ! darwin*) ! if test -n "$STRIP" ; then ! striplib="$STRIP -x" ! AC_MSG_RESULT([yes]) ! else ! AC_MSG_RESULT([no]) ! fi ! ;; ! *) ! AC_MSG_RESULT([no]) ! ;; ! esac ! fi ! ])# AC_LIBTOOL_SYS_LIB_STRIP ! ! ! # AC_LIBTOOL_SYS_DYNAMIC_LINKER ! # ----------------------------- ! # PORTME Fill in your ld.so characteristics ! AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], ! [AC_MSG_CHECKING([dynamic linker characteristics]) ! library_names_spec= ! libname_spec='lib$name' ! soname_spec= ! shrext=".so" ! postinstall_cmds= ! postuninstall_cmds= ! finish_cmds= ! finish_eval= ! shlibpath_var= ! shlibpath_overrides_runpath=unknown ! version_type=none ! dynamic_linker="$host_os ld.so" ! sys_lib_dlsearch_path_spec="/lib /usr/lib" ! if test "$GCC" = yes; then ! sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` ! if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then ! # if the path contains ";" then we assume it to be the separator ! # otherwise default to the standard path separator (i.e. ":") - it is ! # assumed that no part of a normal pathname contains ";" but that should ! # okay in the real world where ";" in dirpaths is itself problematic. ! sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ! else ! sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ! fi ! else ! sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" ! fi ! need_lib_prefix=unknown ! hardcode_into_libs=no ! ! # when you set need_version to no, make sure it does not cause -set_version ! # flags to be left without arguments ! need_version=unknown ! ! case $host_os in ! aix3*) ! version_type=linux ! library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' ! shlibpath_var=LIBPATH ! ! # AIX 3 has no versioning support, so we append a major version to the name. ! soname_spec='${libname}${release}${shared_ext}$major' ! ;; ! ! aix4* | aix5*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! hardcode_into_libs=yes ! if test "$host_cpu" = ia64; then ! # AIX 5 supports IA64 ! library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' ! shlibpath_var=LD_LIBRARY_PATH ! else ! # With GCC up to 2.95.x, collect2 would create an import file ! # for dependence libraries. The import file would start with ! # the line `#! .'. This would cause the generated library to ! # depend on `.', always an invalid library. This was fixed in ! # development snapshots of GCC prior to 3.0. ! case $host_os in ! aix4 | aix4.[[01]] | aix4.[[01]].*) ! if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' ! echo ' yes ' ! echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then ! : ! else ! can_build_shared=no ! fi ! ;; ! esac ! # AIX (on Power*) has no versioning support, so currently we can not hardcode correct ! # soname into executable. Probably we can add versioning support to ! # collect2, so additional links can be useful in future. ! if test "$aix_use_runtimelinking" = yes; then ! # If using run time linking (on AIX 4.2 or later) use lib.so ! # instead of lib.a to let people know that these are not ! # typical AIX shared libraries. ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! else ! # We preserve .a as extension for shared libraries through AIX4.2 ! # and later when we are not doing run time linking. ! library_names_spec='${libname}${release}.a $libname.a' ! soname_spec='${libname}${release}${shared_ext}$major' fi ! shlibpath_var=LIBPATH ! fi ;; ! amigaos*) ! library_names_spec='$libname.ixlibrary $libname.a' ! # Create ${libname}_ixlibrary.a entries in /sys/libs. ! finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' ! ;; ! beos*) ! library_names_spec='${libname}${shared_ext}' ! dynamic_linker="$host_os ld.so" ! shlibpath_var=LIBRARY_PATH ! ;; + bsdi4*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; ! cygwin* | mingw* | pw32*) ! version_type=windows ! shrext=".dll" ! need_version=no ! need_lib_prefix=no ! ! case $GCC,$host_os in ! yes,cygwin* | yes,mingw* | yes,pw32*) ! library_names_spec='$libname.dll.a' ! # DLL is installed to $(libdir)/../bin by postinstall_cmds ! postinstall_cmds='base_file=`basename \${file}`~ ! dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ ! dldir=$destdir/`dirname \$dlpath`~ ! test -d \$dldir || mkdir -p \$dldir~ ! $install_prog $dir/$dlname \$dldir/$dlname' ! postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ! dlpath=$dir/\$dldll~ ! $rm \$dlpath' ! shlibpath_overrides_runpath=yes ! ! case $host_os in ! cygwin*) ! # Cygwin DLLs use 'cyg' prefix rather than 'lib' ! soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ! sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib" ! ;; ! mingw*) ! # MinGW DLLs use traditional 'lib' prefix ! soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ! sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` ! if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then ! # It is most probably a Windows format PATH printed by ! # mingw gcc, but we are running on Cygwin. Gcc prints its search ! # path with ; separators, and with drive letters. We can handle the ! # drive letters (cygwin fileutils understands them), so leave them, ! # especially as we might pass files found there to a mingw objdump, ! # which wouldn't understand a cygwinified path. Ahh. ! sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ! else ! sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ! fi ! ;; ! pw32*) ! # pw32 DLLs use 'pw' prefix rather than 'lib' ! library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ! ;; ! esac ! ;; ! ! *) ! library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ! ;; ! esac ! dynamic_linker='Win32 ld.exe' ! # FIXME: first we should search . and the directory the executable is in ! shlibpath_var=PATH ;; ! ! darwin* | rhapsody*) ! dynamic_linker="$host_os dyld" ! version_type=darwin ! need_lib_prefix=no ! need_version=no ! # FIXME: Relying on posixy $() will cause problems for ! # cross-compilation, but unfortunately the echo tests do not ! # yet detect zsh echo's removal of \ escapes. ! library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' ! soname_spec='${libname}${release}${major}$shared_ext' ! shlibpath_overrides_runpath=yes ! shlibpath_var=DYLD_LIBRARY_PATH ! shrext='$(test .$module = .yes && echo .so || echo .dylib)' ! # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. ! if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then ! sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` ! fi ! sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ! ;; ! ! dgux*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! ;; ! ! freebsd1*) ! dynamic_linker=no ! ;; ! ! freebsd*) ! objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` ! version_type=freebsd-$objformat ! case $version_type in ! freebsd-elf*) ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' ! need_version=no ! need_lib_prefix=no ! ;; ! freebsd-*) ! library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' ! need_version=yes ! ;; ! esac ! shlibpath_var=LD_LIBRARY_PATH ! case $host_os in ! freebsd2*) ! shlibpath_overrides_runpath=yes ! ;; ! freebsd3.[01]* | freebsdelf3.[01]*) ! shlibpath_overrides_runpath=yes ! hardcode_into_libs=yes ! ;; ! *) # from 3.2 on ! shlibpath_overrides_runpath=no ! hardcode_into_libs=yes ! ;; ! esac ! ;; ! ! gnu*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! hardcode_into_libs=yes ;; + + hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case "$host_cpu" in + ia64*) + shrext='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + + irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; *) ! case $LD in # libtool.m4 will add one of these switches to LD ! *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") ! libsuff= shlibsuff= libmagic=32-bit;; ! *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") ! libsuff=32 shlibsuff=N32 libmagic=N32;; ! *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") ! libsuff=64 shlibsuff=64 libmagic=64-bit;; ! *) libsuff= shlibsuff= libmagic=never-match;; ! esac ! ;; ! esac ! shlibpath_var=LD_LIBRARY${shlibsuff}_PATH ! shlibpath_overrides_runpath=no ! sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" ! sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" ! hardcode_into_libs=yes ! ;; ! ! # No shared lib support for Linux oldld, aout, or coff. ! linux*oldld* | linux*aout* | linux*coff*) ! dynamic_linker=no ! ;; ! ! # This must be Linux ELF. ! linux*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=no ! # This implies no fast_install, which is unacceptable. ! # Some rework will be needed to allow for fast_install ! # before this can be enabled. ! hardcode_into_libs=yes ! ! # We used to test for /lib/ld.so.1 and disable shared libraries on ! # powerpc, because MkLinux only supported shared libraries with the ! # GNU dynamic linker. Since this was broken with cross compilers, ! # most powerpc-linux boxes support dynamic linking these days and ! # people can always --disable-shared, the test was removed, and we ! # assume the GNU/Linux dynamic linker is in use. ! dynamic_linker='GNU/Linux ld.so' ! ;; ! ! netbsd*) ! version_type=sunos ! need_lib_prefix=no ! need_version=no ! if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' ! dynamic_linker='NetBSD (a.out) ld.so' ! else ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! dynamic_linker='NetBSD ld.elf_so' ! fi ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! hardcode_into_libs=yes ! ;; ! ! newsos6) ! version_type=linux ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! ;; ! ! nto-qnx) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! ;; ! ! openbsd*) ! version_type=sunos ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' ! shlibpath_var=LD_LIBRARY_PATH ! if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then ! case $host_os in ! openbsd2.[[89]] | openbsd2.[[89]].*) ! shlibpath_overrides_runpath=no ! ;; ! *) ! shlibpath_overrides_runpath=yes ! ;; ! esac ! else ! shlibpath_overrides_runpath=yes ! fi ! ;; ! ! os2*) ! libname_spec='$name' ! shrext=".dll" ! need_lib_prefix=no ! library_names_spec='$libname${shared_ext} $libname.a' ! dynamic_linker='OS/2 ld.exe' ! shlibpath_var=LIBPATH ! ;; ! ! osf3* | osf4* | osf5*) ! version_type=osf ! need_lib_prefix=no ! need_version=no ! soname_spec='${libname}${release}${shared_ext}$major' ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! shlibpath_var=LD_LIBRARY_PATH ! sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" ! sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ! ;; ! ! sco3.2v5*) ! version_type=osf ! soname_spec='${libname}${release}${shared_ext}$major' ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! shlibpath_var=LD_LIBRARY_PATH ! ;; ! ! solaris*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! hardcode_into_libs=yes ! # ldd complains unless libraries are executable ! postinstall_cmds='chmod +x $lib' ! ;; ! ! sunos4*) ! version_type=sunos ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' ! finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! if test "$with_gnu_ld" = yes; then ! need_lib_prefix=no ! fi ! need_version=yes ! ;; ! ! sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) ! version_type=linux ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! case $host_vendor in ! sni) ! shlibpath_overrides_runpath=no ! need_lib_prefix=no ! export_dynamic_flag_spec='${wl}-Blargedynsym' ! runpath_var=LD_RUN_PATH ! ;; ! siemens) ! need_lib_prefix=no ! ;; ! motorola) ! need_lib_prefix=no ! need_version=no ! shlibpath_overrides_runpath=no ! sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ! ;; ! esac ! ;; ! ! sysv4*MP*) ! if test -d /usr/nec ;then ! version_type=linux ! library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' ! soname_spec='$libname${shared_ext}.$major' ! shlibpath_var=LD_LIBRARY_PATH ! fi ! ;; ! ! uts4*) ! version_type=linux ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! ;; ! ! *) ! dynamic_linker=no ! ;; ! esac ! AC_MSG_RESULT([$dynamic_linker]) ! test "$dynamic_linker" = no && can_build_shared=no ! ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER ! ! ! # _LT_AC_TAGCONFIG ! # ---------------- ! AC_DEFUN([_LT_AC_TAGCONFIG], ! [AC_ARG_WITH([tags], ! [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], ! [include additional configurations @<:@automatic@:>@])], ! [tagnames="$withval"]) ! ! if test -f "$ltmain" && test -n "$tagnames"; then ! if test ! -f "${ofile}"; then ! AC_MSG_WARN([output file `$ofile' does not exist]) ! fi ! ! if test -z "$LTCC"; then ! eval "`$SHELL ${ofile} --config | grep '^LTCC='`" ! if test -z "$LTCC"; then ! AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) ! else ! AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) ! fi ! fi ! ! # Extract list of available tagged configurations in $ofile. ! # Note that this assumes the entire list is on one line. ! available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` ! ! lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," ! for tagname in $tagnames; do ! IFS="$lt_save_ifs" ! # Check whether tagname contains only valid characters ! case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in ! "") ;; ! *) AC_MSG_ERROR([invalid tag name: $tagname]) ! ;; ! esac ! ! if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null ! then ! AC_MSG_ERROR([tag name \"$tagname\" already exists]) ! fi ! ! # Update the list of available tags. ! if test -n "$tagname"; then ! echo appending configuration tag \"$tagname\" to $ofile ! ! case $tagname in ! CXX) ! if test -n "$CXX" && test "X$CXX" != "Xno"; then ! AC_LIBTOOL_LANG_CXX_CONFIG ! else ! tagname="" ! fi ! ;; ! ! F77) ! if test -n "$F77" && test "X$F77" != "Xno"; then ! AC_LIBTOOL_LANG_F77_CONFIG ! else ! tagname="" ! fi ! ;; ! ! GCJ) ! if test -n "$GCJ" && test "X$GCJ" != "Xno"; then ! AC_LIBTOOL_LANG_GCJ_CONFIG ! else ! tagname="" ! fi ! ;; ! ! RC) ! AC_LIBTOOL_LANG_RC_CONFIG ! ;; ! ! *) ! AC_MSG_ERROR([Unsupported tag name: $tagname]) ! ;; ! esac ! ! # Append the new tag name to the list of available tags. ! if test -n "$tagname" ; then ! available_tags="$available_tags $tagname" ! fi ! fi ! done ! IFS="$lt_save_ifs" ! ! # Now substitute the updated list of available tags. ! if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then ! mv "${ofile}T" "$ofile" ! chmod +x "$ofile" ! else ! rm -f "${ofile}T" ! AC_MSG_ERROR([unable to update list of available tagged configurations.]) ! fi ! fi ! ])# _LT_AC_TAGCONFIG ! ! ! # AC_LIBTOOL_DLOPEN ! # ----------------- ! # enable checks for dlopen support ! AC_DEFUN([AC_LIBTOOL_DLOPEN], ! [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ! ])# AC_LIBTOOL_DLOPEN ! ! ! # AC_LIBTOOL_WIN32_DLL ! # -------------------- ! # declare package support for building win32 dll's ! AC_DEFUN([AC_LIBTOOL_WIN32_DLL], ! [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ! ])# AC_LIBTOOL_WIN32_DLL ! ! ! # AC_ENABLE_SHARED([DEFAULT]) ! # --------------------------- ! # implement the --enable-shared flag ! # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. ! AC_DEFUN([AC_ENABLE_SHARED], ! [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl ! AC_ARG_ENABLE([shared], ! [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], ! [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], ! [p=${PACKAGE-default} ! case $enableval in ! yes) enable_shared=yes ;; ! no) enable_shared=no ;; ! *) ! enable_shared=no ! # Look at the argument we got. We use all the common list separators. ! lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," ! for pkg in $enableval; do ! IFS="$lt_save_ifs" ! if test "X$pkg" = "X$p"; then ! enable_shared=yes ! fi ! done ! IFS="$lt_save_ifs" ! ;; ! esac], ! [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ! ])# AC_ENABLE_SHARED ! ! ! # AC_DISABLE_SHARED ! # ----------------- ! #- set the default shared flag to --disable-shared ! AC_DEFUN([AC_DISABLE_SHARED], ! [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl ! AC_ENABLE_SHARED(no) ! ])# AC_DISABLE_SHARED ! ! ! # AC_ENABLE_STATIC([DEFAULT]) ! # --------------------------- ! # implement the --enable-static flag ! # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. ! AC_DEFUN([AC_ENABLE_STATIC], ! [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl ! AC_ARG_ENABLE([static], ! [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], ! [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], ! [p=${PACKAGE-default} ! case $enableval in ! yes) enable_static=yes ;; ! no) enable_static=no ;; ! *) ! enable_static=no ! # Look at the argument we got. We use all the common list separators. ! lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," ! for pkg in $enableval; do ! IFS="$lt_save_ifs" ! if test "X$pkg" = "X$p"; then ! enable_static=yes ! fi ! done ! IFS="$lt_save_ifs" ! ;; ! esac], ! [enable_static=]AC_ENABLE_STATIC_DEFAULT) ! ])# AC_ENABLE_STATIC ! ! ! # AC_DISABLE_STATIC ! # ----------------- ! # set the default static flag to --disable-static ! AC_DEFUN([AC_DISABLE_STATIC], ! [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl ! AC_ENABLE_STATIC(no) ! ])# AC_DISABLE_STATIC ! ! ! # AC_ENABLE_FAST_INSTALL([DEFAULT]) ! # --------------------------------- ! # implement the --enable-fast-install flag ! # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. ! AC_DEFUN([AC_ENABLE_FAST_INSTALL], ! [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl ! AC_ARG_ENABLE([fast-install], ! [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], ! [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], ! [p=${PACKAGE-default} ! case $enableval in ! yes) enable_fast_install=yes ;; ! no) enable_fast_install=no ;; ! *) ! enable_fast_install=no ! # Look at the argument we got. We use all the common list separators. ! lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," ! for pkg in $enableval; do ! IFS="$lt_save_ifs" ! if test "X$pkg" = "X$p"; then ! enable_fast_install=yes ! fi ! done ! IFS="$lt_save_ifs" ! ;; ! esac], ! [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ! ])# AC_ENABLE_FAST_INSTALL ! ! ! # AC_DISABLE_FAST_INSTALL ! # ----------------------- ! # set the default to --disable-fast-install ! AC_DEFUN([AC_DISABLE_FAST_INSTALL], ! [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl ! AC_ENABLE_FAST_INSTALL(no) ! ])# AC_DISABLE_FAST_INSTALL ! ! ! # AC_LIBTOOL_PICMODE([MODE]) ! # -------------------------- ! # implement the --with-pic flag ! # MODE is either `yes' or `no'. If omitted, it defaults to `both'. ! AC_DEFUN([AC_LIBTOOL_PICMODE], ! [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl ! pic_mode=ifelse($#,1,$1,default) ! ])# AC_LIBTOOL_PICMODE ! ! ! # AC_PROG_EGREP ! # ------------- ! # This is predefined starting with Autoconf 2.54, so this conditional ! # definition can be removed once we require Autoconf 2.54 or later. ! m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], ! [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], ! [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 ! then ac_cv_prog_egrep='grep -E' ! else ac_cv_prog_egrep='egrep' ! fi]) ! EGREP=$ac_cv_prog_egrep ! AC_SUBST([EGREP]) ! ])]) ! ! ! # AC_PATH_TOOL_PREFIX ! # ------------------- ! # find a file program which can recognise shared library ! AC_DEFUN([AC_PATH_TOOL_PREFIX], ! [AC_REQUIRE([AC_PROG_EGREP])dnl ! AC_MSG_CHECKING([for $1]) ! AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, ! [case $MAGIC_CMD in ! [[\\/*] | ?:[\\/]*]) ! lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ! ;; ! *) ! lt_save_MAGIC_CMD="$MAGIC_CMD" ! lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then ! lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then ! case $deplibs_check_method in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" ! MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | ! $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *************** EOF *** 363,407 **** break fi done ! IFS="$ac_save_ifs" ! MAGIC="$ac_save_MAGIC" ;; esac]) ! MAGIC="$lt_cv_path_MAGIC" ! if test -n "$MAGIC"; then ! AC_MSG_RESULT($MAGIC) else AC_MSG_RESULT(no) fi ! ]) ! # AC_PATH_MAGIC - find a file program which can recognise a shared library ! AC_DEFUN(AC_PATH_MAGIC, ! [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl ! AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH) ! if test -z "$lt_cv_path_MAGIC"; then if test -n "$ac_tool_prefix"; then ! AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH) else ! MAGIC=: fi fi ! ]) ! # AC_PROG_LD - find the path to the GNU or non-GNU linker ! AC_DEFUN(AC_PROG_LD, ! [AC_ARG_WITH(gnu-ld, ! [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], ! test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld ! if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. ! AC_MSG_CHECKING([for ld used by GCC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw --- 1900,1950 ---- break fi done ! IFS="$lt_save_ifs" ! MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) ! MAGIC_CMD="$lt_cv_path_MAGIC_CMD" ! if test -n "$MAGIC_CMD"; then ! AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ! ])# AC_PATH_TOOL_PREFIX ! # AC_PATH_MAGIC ! # ------------- ! # find a file program which can recognise a shared library ! AC_DEFUN([AC_PATH_MAGIC], ! [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) ! if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then ! AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else ! MAGIC_CMD=: fi fi ! ])# AC_PATH_MAGIC ! # AC_PROG_LD ! # ---------- ! # find the path to the GNU or non-GNU linker ! AC_DEFUN([AC_PROG_LD], ! [AC_ARG_WITH([gnu-ld], ! [AC_HELP_STRING([--with-gnu-ld], ! [assume the C compiler uses GNU ld @<:@default=no@:>@])], ! [test "$withval" = no || with_gnu_ld=yes], ! [with_gnu_ld=no]) ! AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld ! if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. ! AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw *************** if test "$ac_cv_prog_gcc" = yes; then *** 409,424 **** *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac ! case "$ac_prog" in # Accept absolute paths. ! changequote(,)dnl ! [\\/]* | [A-Za-z]:[\\/]*) ! re_direlt='/[^/][^/]*/\.\./' ! changequote([,])dnl # Canonicalize the path of ld ! ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ! ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; --- 1952,1965 ---- *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac ! case $ac_prog in # Accept absolute paths. ! [[\\/]]* | ?:[[\\/]]*) ! re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the path of ld ! ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ! ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; *************** elif test "$with_gnu_ld" = yes; then *** 436,463 **** else AC_MSG_CHECKING([for non-GNU ld]) fi ! AC_CACHE_VAL(ac_cv_path_LD, [if test -z "$LD"; then ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then ! ac_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. ! if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break ! else test "$with_gnu_ld" != yes && break ! fi fi done ! IFS="$ac_save_ifs" else ! ac_cv_path_LD="$LD" # Let the user override the test with a path. fi]) ! LD="$ac_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) else --- 1977,2008 ---- else AC_MSG_CHECKING([for non-GNU ld]) fi ! AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then ! lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do + IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then ! lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. ! case `"$lt_cv_path_LD" -v 2>&1 &1 &5; then ! ac_cv_prog_gnu_ld=yes ! else ! ac_cv_prog_gnu_ld=no ! fi]) ! with_gnu_ld=$ac_cv_prog_gnu_ld ! ]) ! # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker # -- PORTME Some linkers may need a different reload flag. ! AC_DEFUN(AC_PROG_LD_RELOAD_FLAG, ! [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag, ! [lt_cv_ld_reload_flag='-r']) reload_flag=$lt_cv_ld_reload_flag ! test -n "$reload_flag" && reload_flag=" $reload_flag" ! ]) ! # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics ! AC_DEFUN(AC_DEPLIBS_CHECK_METHOD, ! [AC_CACHE_CHECK([how to recognise dependant libraries], lt_cv_deplibs_check_method, ! [lt_cv_file_magic_cmd='${MAGIC}' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support --- 2010,2061 ---- fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_PROG_LD_GNU ! ])# AC_PROG_LD ! ! # AC_PROG_LD_GNU ! # -------------- ! AC_DEFUN([AC_PROG_LD_GNU], ! [AC_REQUIRE([AC_PROG_EGREP])dnl ! AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. ! case `"$LD" -v 2>&1 /dev/null; then ! case "$host_cpu" in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. ! changequote(,)dnl ! lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' ! changequote([, ])dnl lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; --- 2079,2117 ---- ;; bsdi4*) ! lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; ! cygwin* | mingw* | pw32*) ! # win32_libid is a shell function defined in ltmain.sh ! lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' ! lt_cv_file_magic_cmd='win32_libid' ;; ! darwin* | rhapsody*) ! # this will be overwritten by pass_all, but leave it in just in case ! lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' ! lt_cv_file_magic_cmd='/usr/bin/file -L' ! case "$host_os" in ! rhapsody* | darwin1.[[012]]) ! lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System` ! ;; ! *) # Darwin 1.3 on ! lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' ! ;; ! esac ! lt_cv_deplibs_check_method=pass_all ! ;; ! ! freebsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then ! case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. ! lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; *************** gnu*) *** 550,579 **** lt_cv_deplibs_check_method=pass_all ;; ! hpux10.20*) ! # TODO: Does this work for hpux-11 too? ! lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_cmd=/usr/bin/file ! lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; ! irix5* | irix6*) ! case "$host_os" in ! irix5*) # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" ;; *) ! case "$LD" in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac # this will be overridden with pass_all, but let us keep it just in case ! changequote(,)dnl ! lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" ! changequote([, ])dnl ;; esac lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` --- 2125,2163 ---- lt_cv_deplibs_check_method=pass_all ;; ! hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file ! case "$host_cpu" in ! ia64*) ! lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' ! lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ! ;; ! hppa*64*) ! [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] ! lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ! ;; ! *) ! lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' ! lt_cv_file_magic_test_file=/usr/lib/libc.sl ! ;; ! esac ;; ! irix5* | irix6* | nonstopux*) ! case $host_os in ! irix5* | nonstopux*) # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" ;; *) ! case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac # this will be overridden with pass_all, but let us keep it just in case ! lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1" ;; esac lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` *************** irix5* | irix6*) *** 581,607 **** ;; # This must be Linux ELF. ! linux-gnu*) ! case "$host_cpu" in ! alpha* | i*86 | powerpc* | sparc* | ia64* ) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM ! changequote(,)dnl ! lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; ! changequote([, ])dnl esac lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` ;; netbsd*) ! if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then : else ! changequote(,)dnl ! lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' ! changequote([, ])dnl ! lt_cv_file_magic_cmd='/usr/bin/file -L' ! lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` fi ;; --- 2165,2206 ---- ;; # This must be Linux ELF. ! linux*) ! case $host_cpu in ! alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh*) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM ! lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; esac lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` ;; netbsd*) ! if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then ! lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else ! lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' ! fi ! ;; ! ! newos6*) ! lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' ! lt_cv_file_magic_cmd=/usr/bin/file ! lt_cv_file_magic_test_file=/usr/lib/libnls.so ! ;; ! ! nto-qnx) ! lt_cv_deplibs_check_method=unknown ! ;; ! ! openbsd*) ! lt_cv_file_magic_cmd=/usr/bin/file ! lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ! if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then ! lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' ! else ! lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' fi ;; *************** solaris*) *** 622,733 **** ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) ! case "$host_vendor" in ncr) lt_cv_deplibs_check_method=pass_all ;; ! motorola) ! changequote(,)dnl ! lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' ! changequote([, ])dnl ! lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; esac ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method ! ]) ! # AC_PROG_NM - find the path to a BSD-compatible name lister ! AC_DEFUN(AC_PROG_NM, ! [AC_MSG_CHECKING([for BSD-compatible nm]) ! AC_CACHE_VAL(ac_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. ! ac_cv_path_NM="$NM" else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do test -z "$ac_dir" && ac_dir=. ! tmp_nm=$ac_dir/${ac_tool_prefix}nm ! if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file ! if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then ! ac_cv_path_NM="$tmp_nm -B" ! break ! elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ! ac_cv_path_NM="$tmp_nm -p" break ! else ! ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but ! continue # so that we can try to find one that supports BSD flags ! fi fi done ! IFS="$ac_save_ifs" ! test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm fi]) ! NM="$ac_cv_path_NM" ! AC_MSG_RESULT([$NM]) ! ]) ! # AC_CHECK_LIBM - check for math library ! AC_DEFUN(AC_CHECK_LIBM, [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= ! case "$host" in ! *-*-beos* | *-*-cygwin*) ! # These system don't have libm ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") ! AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") ;; *) ! AC_CHECK_LIB(m, main, LIBM="-lm") ;; esac ! ]) ! # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for ! # the libltdl convenience library and INCLTDL to the include flags for ! # the libltdl header and adds --enable-ltdl-convenience to the ! # configure arguments. Note that LIBLTDL and INCLTDL are not ! # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not ! # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed ! # with '${top_builddir}/' and INCLTDL will be prefixed with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and # top_srcdir appropriately in the Makefiles. ! AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl ! case "$enable_ltdl_convenience" in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la ! INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) ! ]) ! # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for ! # the libltdl installable library and INCLTDL to the include flags for ! # the libltdl header and adds --enable-ltdl-install to the configure ! # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is ! # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed ! # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will ! # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed ! # with '${top_srcdir}/' (note the single quotes!). If your package is ! # not flat and you're not using automake, define top_builddir and ! # top_srcdir appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. ! AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl ! AC_CHECK_LIB(ltdl, main, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) --- 2221,2366 ---- ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) ! case $host_vendor in ! motorola) ! lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' ! lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ! ;; ncr) lt_cv_deplibs_check_method=pass_all ;; ! sequent) ! lt_cv_file_magic_cmd='/bin/file' ! lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ! ;; ! sni) ! lt_cv_file_magic_cmd='/bin/file' ! lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" ! lt_cv_file_magic_test_file=/lib/libc.so ! ;; ! siemens) ! lt_cv_deplibs_check_method=pass_all ;; esac ;; + + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method ! test -z "$deplibs_check_method" && deplibs_check_method=unknown ! ])# AC_DEPLIBS_CHECK_METHOD ! # AC_PROG_NM ! # ---------- ! # find the path to a BSD-compatible name lister ! AC_DEFUN([AC_PROG_NM], ! [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. ! lt_cv_path_NM="$NM" else ! lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. ! tmp_nm="$ac_dir/${ac_tool_prefix}nm" ! if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file ! case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in ! */dev/null* | *'Invalid file or object type'*) ! lt_cv_path_NM="$tmp_nm -B" break ! ;; ! *) ! case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in ! */dev/null*) ! lt_cv_path_NM="$tmp_nm -p" ! break ! ;; ! *) ! lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but ! continue # so that we can try to find one that supports BSD flags ! ;; ! esac ! esac fi done ! IFS="$lt_save_ifs" ! test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) ! NM="$lt_cv_path_NM" ! ])# AC_PROG_NM ! ! # AC_CHECK_LIBM ! # ------------- ! # check for math library ! AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= ! case $host in ! *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) ! # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") ! AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) ! AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ! ])# AC_CHECK_LIBM ! ! # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) ! # ----------------------------------- ! # sets LIBLTDL to the link flags for the libltdl convenience library and ! # LTDLINCL to the include flags for the libltdl header and adds ! # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL ! # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If ! # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will ! # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and # top_srcdir appropriately in the Makefiles. ! AC_DEFUN([AC_LIBLTDL_CONVENIENCE], ! [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl ! case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la ! LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) ! # For backwards non-gettext consistent compatibility... ! INCLTDL="$LTDLINCL" ! ])# AC_LIBLTDL_CONVENIENCE ! ! # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) ! # ----------------------------------- ! # sets LIBLTDL to the link flags for the libltdl installable library and ! # LTDLINCL to the include flags for the libltdl header and adds ! # --enable-ltdl-install to the configure arguments. Note that LIBLTDL ! # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If ! # DIRECTORY is not provided and an installed libltdl is not found, it is ! # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/' ! # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single ! # quotes!). If your package is not flat and you're not using automake, ! # define top_builddir and top_srcdir appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. ! AC_DEFUN([AC_LIBLTDL_INSTALLABLE], ! [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl ! AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) *************** AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEF *** 738,1080 **** if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la ! INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" ! INCLTDL= fi ! ]) - # If this macro is not defined by Autoconf, define it here. - ifdef([AC_PROVIDE_IFELSE], - [], - [define([AC_PROVIDE_IFELSE], - [ifdef([AC_PROVIDE_$1], - [$2], [$3])])]) ! # AC_LIBTOOL_CXX - enable support for C++ libraries ! AC_DEFUN(AC_LIBTOOL_CXX,[AC_REQUIRE([_AC_LIBTOOL_CXX])]) ! AC_DEFUN(_AC_LIBTOOL_CXX, ! [AC_REQUIRE([AC_PROG_LIBTOOL]) ! AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PROG_CXXCPP]) ! LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh" ! lt_save_CC="$CC" ! lt_save_CFLAGS="$CFLAGS" ! dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC ! dnl is set to the C++ compiler. ! AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \ ! MAGIC="$MAGIC" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ ! LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \ ! AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \ ! objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \ ! deplibs_check_method="$deplibs_check_method" \ ! file_magic_cmd="$file_magic_cmd" \ ! ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \ ! --build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \ ! || AC_MSG_ERROR([libtool tag configuration failed]) ! CC="$lt_save_CC" ! CFLAGS="$lt_save_CFLAGS" - # Redirect the config.log output again, so that the ltconfig log is not - # clobbered by the next message. - exec 5>>./config.log - ]) ! # AC_LIBTOOL_GCJ - enable support for GCJ libraries ! AC_DEFUN(AC_LIBTOOL_GCJ,[AC_REQUIRE([_AC_LIBTOOL_GCJ])]) ! AC_DEFUN(_AC_LIBTOOL_GCJ, ! [AC_REQUIRE([AC_PROG_LIBTOOL]) ! AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], ! [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], ! [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], ! [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])]) ! LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh" ! lt_save_CC="$CC" ! lt_save_CFLAGS="$CFLAGS" ! dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC ! dnl is set to the C++ compiler. ! AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="" \ ! MAGIC="$MAGIC" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ ! LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \ ! AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \ ! objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \ ! deplibs_check_method="$deplibs_check_method" \ ! file_magic_cmd="$file_magic_cmd" \ ! ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \ ! --build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \ ! || AC_MSG_ERROR([libtool tag configuration failed]) ! CC="$lt_save_CC" ! CFLAGS="$lt_save_CFLAGS" - # Redirect the config.log output again, so that the ltconfig log is not - # clobbered by the next message. - exec 5>>./config.log - ]) ! dnl old names ! AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl ! AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl ! AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl ! AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl ! AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl ! AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl ! AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl - dnl This is just to silence aclocal about the macro not being used - ifelse([AC_DISABLE_FAST_INSTALL])dnl ! AC_DEFUN([LT_AC_PROG_GCJ],[ ! AC_CHECK_TOOL(GCJ, gcj, no) ! test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" ! AC_SUBST(GCJFLAGS) ! ]) ! ## ltdl.m4 - Configure ltdl for the target system. -*-Shell-script-*- ! ## Copyright (C) 1999-2000 Free Software Foundation, Inc. ! ## ! ## This program is free software; you can redistribute it and/or modify ! ## it under the terms of the GNU General Public License as published by ! ## the Free Software Foundation; either version 2 of the License, or ! ## (at your option) any later version. ! ## ! ## This program is distributed in the hope that it will be useful, but ! ## WITHOUT ANY WARRANTY; without even the implied warranty of ! ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! ## General Public License for more details. ! ## ! ## You should have received a copy of the GNU General Public License ! ## along with this program; if not, write to the Free Software ! ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! ## ! ## As a special exception to the GNU General Public License, if you ! ## distribute this file as part of a program that contains a ! ## configuration script generated by Autoconf, you may include it under ! ## the same distribution terms that you use for the rest of that program. ! # serial 1 AC_LIB_LTDL ! AC_DEFUN(AC_LIB_LTDL, ! [AC_PREREQ(2.13)dnl ! AC_REQUIRE([AC_PROG_CC])dnl ! AC_REQUIRE([AC_C_CONST])dnl ! AC_REQUIRE([AC_C_INLINE])dnl ! dnl AC_LIB_LTDL must perform all the checks necessary for compilation ! dnl of the ltdl objects -- including compiler checks (above) and header ! dnl checks (below). ! AC_REQUIRE([AC_HEADER_STDC])dnl ! AC_CHECK_HEADERS(malloc.h memory.h stdlib.h stdio.h ctype.h dlfcn.h dl.h dld.h) ! AC_CHECK_HEADERS(string.h strings.h, break) ! AC_CHECK_FUNCS(strchr index, break) ! AC_CHECK_FUNCS(strrchr rindex, break) ! AC_CHECK_FUNCS(strcmp) ! AC_REQUIRE([AC_LTDL_ENABLE_INSTALL])dnl ! AC_REQUIRE([AC_LTDL_SHLIBEXT])dnl ! AC_REQUIRE([AC_LTDL_SHLIBPATH])dnl ! AC_REQUIRE([AC_LTDL_SYSSEARCHPATH])dnl ! AC_REQUIRE([AC_LTDL_OBJDIR])dnl ! AC_REQUIRE([AC_LTDL_DLPREOPEN])dnl ! AC_REQUIRE([AC_LTDL_DLLIB])dnl ! AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])dnl ! ]) ! AC_DEFUN(AC_LTDL_ENABLE_INSTALL, ! [AC_ARG_ENABLE(ltdl-install, ! [ --enable-ltdl-install install libltdl]) - AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno) - AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno) - ])]) - AC_DEFUN(AC_LTDL_SNARF_CONFIG, - [# Read the libtool configuration - rm -f conftest - ./libtool --config > conftest - . ./conftest - rm -f conftest - ]) ! AC_DEFUN(AC_LTDL_SHLIBEXT, ! [AC_REQUIRE([AC_LTDL_SNARF_CONFIG])dnl ! AC_CACHE_CHECK([which extension is used for shared libraries], ! libltdl_cv_shlibext, [dnl ! ( ! last= ! for spec in $library_names_spec; do ! last="$spec" ! done ! changequote(, ) ! echo "$last" | sed 's/\[.*\]//;s/^[^.]*//;s/\$.*$//;s/\.$//' > conftest ! changequote([, ]) ! ) ! libltdl_cv_shlibext=`cat conftest` ! rm -f conftest ! ]) ! if test -n "$libltdl_cv_shlibext"; then ! AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext", ! [Define to the extension used for shared libraries, say, ".so". ]) fi ! ]) ! AC_DEFUN(AC_LTDL_SHLIBPATH, ! [AC_REQUIRE([AC_LTDL_SNARF_CONFIG])dnl ! AC_CACHE_CHECK([which variable specifies run-time library path], ! libltdl_cv_shlibpath_var, [libltdl_cv_shlibpath_var="$shlibpath_var"]) ! if test -n "$libltdl_cv_shlibpath_var"; then ! AC_DEFINE_UNQUOTED(LTDL_SHLIBPATH_VAR, "$libltdl_cv_shlibpath_var", ! [Define to the name of the environment variable that determines the dynamic library search path. ]) fi - ]) ! AC_DEFUN(AC_LTDL_SYSSEARCHPATH, ! [AC_REQUIRE([AC_LTDL_SNARF_CONFIG])dnl ! AC_CACHE_CHECK([for the default library search path], ! libltdl_cv_sys_search_path, [libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec"]) ! if test -n "$libltdl_cv_sys_search_path"; then ! case "$host" in ! *-*-mingw*) pathsep=";" ;; ! *) pathsep=":" ;; ! esac ! sys_search_path= ! for dir in $libltdl_cv_sys_search_path; do ! if test -z "$sys_search_path"; then ! sys_search_path="$dir" else ! sys_search_path="$sys_search_path$pathsep$dir" fi ! done ! AC_DEFINE_UNQUOTED(LTDL_SYSSEARCHPATH, "$sys_search_path", ! [Define to the system default library search path. ]) fi ]) ! AC_DEFUN(AC_LTDL_OBJDIR, ! [AC_CACHE_CHECK([for objdir], ! libltdl_cv_objdir, [libltdl_cv_objdir="$objdir" ! if test -n "$objdir"; then ! : else ! rm -f .libs 2>/dev/null ! mkdir .libs 2>/dev/null ! if test -d .libs; then ! libltdl_cv_objdir=.libs ! else ! # MS-DOS does not allow filenames that begin with a dot. ! libltdl_cv_objdir=_libs ! fi ! rmdir .libs 2>/dev/null ! fi]) ! AC_DEFINE_UNQUOTED(LTDL_OBJDIR, "$libltdl_cv_objdir/", ! [Define to the sub-directory in which libtool stores uninstalled libraries. ]) ! ]) ! AC_DEFUN(AC_LTDL_DLPREOPEN, ! [AC_REQUIRE([AC_LTDL_GLOBAL_SYMBOL_PIPE])dnl ! AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen], ! libltdl_cv_preloaded_symbols, [dnl ! if test -n "$global_symbol_pipe"; then ! libltdl_cv_preloaded_symbols=yes ! else ! libltdl_cv_preloaded_symbols=no fi ! ]) ! if test x"$libltdl_cv_preloaded_symbols" = x"yes"; then ! AC_DEFINE(HAVE_PRELOADED_SYMBOLS, 1, ! [Define if libtool can extract symbol lists from object files. ]) fi ! ]) ! AC_DEFUN(AC_LTDL_DLLIB, ! [LIBADD_DL= ! AC_CHECK_LIB(dl, dlopen, [AC_DEFINE(HAVE_LIBDL, 1, ! [Define if you have the libdl library or equivalent. ]) LIBADD_DL="-ldl"], ! [AC_CHECK_FUNC(dlopen, [AC_DEFINE(HAVE_LIBDL, 1, ! [Define if you have the libdl library or equivalent.])], ! [AC_CHECK_LIB(svld, dlopen, [AC_DEFINE(HAVE_LIBDL, 1, ! [Define if you have the libdl library or equivalent.]) LIBADD_DL="-lsvld"] ! )])]) ! AC_CHECK_FUNC(shl_load, [AC_DEFINE(HAVE_SHL_LOAD, 1, ! [Define if you have the shl_load function.])], ! [AC_CHECK_LIB(dld, shl_load, ! [AC_DEFINE(HAVE_SHL_LOAD, 1, ! [Define if you have the shl_load function.]) ! LIBADD_DL="$LIBADD_DL -ldld"]) ]) ! AC_CHECK_LIB(dld, dld_link, [AC_DEFINE(HAVE_DLD, 1, ! [Define if you have the GNU dld library.])dnl ! test "x$ac_cv_lib_dld_shl_load" = yes || LIBADD_DL="$LIBADD_DL -ldld"]) ! AC_SUBST(LIBADD_DL) ! if test "x$ac_cv_func_dlopen" = xyes || test "x$ac_cv_lib_dl_dlopen" = xyes; then ! LIBS_SAVE="$LIBS" ! LIBS="$LIBS $LIBADD_DL" ! AC_CHECK_FUNCS(dlerror) ! LIBS="$LIBS_SAVE" fi ! ]) ! AC_DEFUN(AC_LTDL_GLOBAL_SYMBOL_PIPE, ! [dnl Check for command to grab the raw symbol name followed ! dnl by C symbol name from nm. ! AC_REQUIRE([AC_CANONICAL_HOST])dnl ! AC_REQUIRE([AC_PROG_NM])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. ! AC_MSG_CHECKING([command to parse $NM output]) ! AC_CACHE_VAL(ac_cv_sys_global_symbol_pipe, ! [# These are sane defaults that work on at least a few old systems. ! # {They come from Ultrix. What could be older than Ultrix?!! ;)} - changequote(,)dnl # Character class describing NM global symbol codes. ! ac_symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. ! ac_sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform the above into a raw symbol and a C symbol. ! ac_symxfrm='\1 \2\3 \3' # Transform an extracted symbol line into a proper C declaration ! ac_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" # Define system-specific variables. ! case "$host_os" in aix*) ! ac_symcode='[BCDT]' ;; ! cygwin* | mingw*) ! ac_symcode='[ABCDGISTW]' ;; ! hpux*) ! ac_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'" ;; ! irix*) ! ac_symcode='[BCDEGRST]' ;; ! solaris*) ! ac_symcode='[BDT]' ;; esac # If we're using GNU nm, then use its standard symbol codes. ! if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then ! ac_symcode='[ABCDGISTW]' ! fi ! changequote([,])dnl # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do ! ac_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($ac_symcode\)[ ][ ]*\($ac_symprfx\)$ac_sympat$/$ac_symxfrm/p'" # Check to see that the pipe works correctly. ! ac_pipe_works=no ! rm -f conftest.$ac_ext cat > conftest.$ac_ext </dev/null; then : ! else ! AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) ! _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no ! fi ! fi + # + # Check to make sure the static flag actually works. + # + AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], + _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), + $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), + [], + [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) ! ## CAVEAT EMPTOR: ! ## There is no encapsulation within the following macros, do not change ! ## the running order or otherwise move them around unless you know exactly ! ## what you are doing... ! AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) ! AC_LIBTOOL_PROG_COMPILER_PIC($1) ! AC_LIBTOOL_PROG_CC_C_O($1) ! AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) ! AC_LIBTOOL_PROG_LD_SHLIBS($1) ! AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) ! AC_LIBTOOL_SYS_LIB_STRIP ! AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) ! AC_LIBTOOL_DLOPEN_SELF($1) ! ! # Report which librarie types wil actually be built ! AC_MSG_CHECKING([if libtool supports shared libraries]) ! AC_MSG_RESULT([$can_build_shared]) ! ! AC_MSG_CHECKING([whether to build shared libraries]) ! test "$can_build_shared" = "no" && enable_shared=no ! ! # On AIX, shared libraries and static libraries use the same namespace, and ! # are all built from PIC. ! case "$host_os" in ! aix3*) ! test "$enable_shared" = yes && enable_static=no ! if test -n "$RANLIB"; then ! archive_cmds="$archive_cmds~\$RANLIB \$lib" ! postinstall_cmds='$RANLIB $lib' ! fi ! ;; ! ! aix4*) ! if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then ! test "$enable_shared" = yes && enable_static=no ! fi ! ;; ! darwin* | rhapsody*) ! if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then ! _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ! case "$host_os" in ! rhapsody* | darwin1.[[012]]) ! _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' ! ;; ! *) # Darwin 1.3 on ! test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' ! ;; ! esac ! # FIXME: Relying on posixy $() will cause problems for ! # cross-compilation, but unfortunately the echo tests do not ! # yet detect zsh echo's removal of \ escapes. Also zsh mangles ! # `"' quotes if we put them in here... so don't! ! output_verbose_link_cmd='echo' ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring' ! _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' ! # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ! _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ! _LT_AC_TAGVAR(hardcode_direct, $1)=no ! _LT_AC_TAGVAR(hardcode_automatic, $1)=yes ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported ! _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' ! _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ! fi ! ;; ! esac ! AC_MSG_RESULT([$enable_shared]) ! ! AC_MSG_CHECKING([whether to build static libraries]) ! # Make sure either enable_shared or enable_static is yes. ! test "$enable_shared" = yes || enable_static=yes ! AC_MSG_RESULT([$enable_static]) ! ! AC_LIBTOOL_CONFIG($1) ! ! AC_LANG_POP ! CC="$lt_save_CC" ! ])# AC_LIBTOOL_LANG_C_CONFIG ! ! ! # AC_LIBTOOL_LANG_CXX_CONFIG ! # -------------------------- ! # Ensure that the configuration vars for the C compiler are ! # suitably defined. Those variables are subsequently used by ! # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. ! AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) ! AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], ! [AC_LANG_PUSH(C++) ! AC_REQUIRE([AC_PROG_CXX]) ! AC_REQUIRE([AC_PROG_CXXCPP]) ! ! _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ! _LT_AC_TAGVAR(allow_undefined_flag, $1)= ! _LT_AC_TAGVAR(always_export_symbols, $1)=no ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)= ! _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= ! _LT_AC_TAGVAR(hardcode_direct, $1)=no ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= ! _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= ! _LT_AC_TAGVAR(hardcode_minus_L, $1)=no ! _LT_AC_TAGVAR(hardcode_automatic, $1)=no ! _LT_AC_TAGVAR(module_cmds, $1)= ! _LT_AC_TAGVAR(module_expsym_cmds, $1)= ! _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown ! _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds ! _LT_AC_TAGVAR(no_undefined_flag, $1)= ! _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= ! _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no ! ! # Dependencies to place before and after the object being linked: ! _LT_AC_TAGVAR(predep_objects, $1)= ! _LT_AC_TAGVAR(postdep_objects, $1)= ! _LT_AC_TAGVAR(predeps, $1)= ! _LT_AC_TAGVAR(postdeps, $1)= ! _LT_AC_TAGVAR(compiler_lib_search_path, $1)= ! ! # Source file extension for C++ test sources. ! ac_ext=cc ! ! # Object file extension for compiled C++ test sources. ! objext=o ! _LT_AC_TAGVAR(objext, $1)=$objext ! ! # Code to be used in simple compile tests ! lt_simple_compile_test_code="int some_variable = 0;\n" ! ! # Code to be used in simple link tests ! lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' ! ! # ltmain only uses $CC for tagged configurations so make sure $CC is set. ! _LT_AC_SYS_COMPILER ! ! # Allow CC to be a program name with arguments. ! lt_save_CC=$CC ! lt_save_LD=$LD ! lt_save_GCC=$GCC ! GCC=$GXX ! lt_save_with_gnu_ld=$with_gnu_ld ! lt_save_path_LD=$lt_cv_path_LD ! if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then ! lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx ! else ! unset lt_cv_prog_gnu_ld fi ! if test -n "${lt_cv_path_LDCXX+set}"; then ! lt_cv_path_LD=$lt_cv_path_LDCXX ! else ! unset lt_cv_path_LD ! fi ! test -z "${LDCXX+set}" || LD=$LDCXX ! CC=${CXX-"c++"} ! compiler=$CC ! _LT_AC_TAGVAR(compiler, $1)=$CC ! cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` ! # We don't want -fno-exception wen compiling C++ code, so set the ! # no_builtin_flag separately ! if test "$GXX" = yes; then ! _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ! else ! _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi ! if test "$GXX" = yes; then ! # Set up default GNU C++ configuration ! ! AC_PROG_LD ! ! # Check if GNU C++ uses GNU ld as the underlying linker, since the ! # archiving commands below assume that GNU ld is being used. ! if test "$with_gnu_ld" = yes; then ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ! ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' ! _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' ! ! # If archive_cmds runs LD, not CC, wlarc should be empty ! # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to ! # investigate it a little bit more. (MM) ! wlarc='${wl}' ! ! # ancient GNU ld didn't support --whole-archive et. al. ! if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ ! grep 'no-whole-archive' > /dev/null; then ! _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else ! _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi ! else ! with_gnu_ld=no ! wlarc= ! ! # A generic and very simple default shared library creation ! # command for GNU C++ for the case where it uses the native ! # linker, instead of GNU ld. If possible, this setting should ! # overridden to take advantage of the native linker features on ! # the platform it is being used on. ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' ! fi ! ! # Commands to make compiler produce verbose output that lists ! # what "hidden" libraries, object files and flags are used when ! # linking a shared library. ! output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' ! ! else ! GXX=no ! with_gnu_ld=no ! wlarc= fi + + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GXX" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + else + # We have old collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # -bexpall does not export symbols beginning with underscore (_) + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds it's shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + darwin* | rhapsody*) + if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + case "$host_os" in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' + ;; + *) # Darwin 1.3 on + test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' + ;; + esac + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' + + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + fi + ;; + + dgux*) + case $cc_basename in + ec++) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + freebsd[12]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + freebsd-elf*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + freebsd*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + ;; + gnu*) + ;; + hpux9*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + case "$host_cpu" in + hppa*64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + ;; + *) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case "$host_cpu" in + hppa*64*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + ia64*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC) + case "$host_cpu" in + hppa*64*|ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case "$host_cpu" in + ia64*|hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + irix5* | irix6*) + case $cc_basename in + CC) + # SGI C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + linux*) + case $cc_basename in + KCC) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc) + # Intel C++ + with_gnu_ld=yes + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + cxx) + # Compaq C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + m88k*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + mvs*) + case $cc_basename in + cxx) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + osf3*) + case $cc_basename in + KCC) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' + ;; + RCC) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ + $rm $lib.exp' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + sco*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + case $cc_basename in + CC) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + lcc) + # Lucid + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The C++ compiler is used as linker so we must use $wl + # flag to pass the commands to the underlying system + # linker. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + fi + ;; + esac + ;; + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + tandem*) + case $cc_basename in + NCC) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) + test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + + _LT_AC_TAGVAR(GCC, $1)="$GXX" + _LT_AC_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + AC_LIBTOOL_POSTDEP_PREDEP($1) + AC_LIBTOOL_PROG_COMPILER_PIC($1) + AC_LIBTOOL_PROG_CC_C_O($1) + AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) + AC_LIBTOOL_PROG_LD_SHLIBS($1) + AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + AC_LIBTOOL_SYS_LIB_STRIP + AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) + AC_LIBTOOL_DLOPEN_SELF($1) + + AC_LIBTOOL_CONFIG($1) + + AC_LANG_POP + CC=$lt_save_CC + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ldcxx=$with_gnu_ld + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld + ])# AC_LIBTOOL_LANG_CXX_CONFIG + + # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) + # ------------------------ + # Figure out "hidden" library dependencies from verbose + # compiler output when linking a shared library. + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ + dnl we can't use the lt_simple_compile_test_code here, + dnl because it contains code intended for an executable, + dnl not a library. It's possible we should let each + dnl tag define a new lt_????_link_test_code variable, + dnl but it's only used here... + ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" ! ifelse([$1], [], ! [#! $SHELL ! ! # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. ! # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) ! # NOTE: Changes made to this file will be lost: look at ltmain.sh. ! # ! # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 ! # Free Software Foundation, Inc. ! # ! # This file is part of GNU Libtool: ! # Originally by Gordon Matzigkeit , 1996 ! # ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2 of the License, or ! # (at your option) any later version. ! # ! # This program is distributed in the hope that it will be useful, but ! # WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! # General Public License for more details. ! # ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! # ! # As a special exception to the GNU General Public License, if you ! # distribute this file as part of a program that contains a ! # configuration script generated by Autoconf, you may include it under ! # the same distribution terms that you use for the rest of that program. ! ! # A sed program that does not truncate output. ! SED=$lt_SED ! ! # Sed that helps us avoid accidentally triggering echo(1) options like -n. ! Xsed="$SED -e s/^X//" ! ! # The HP-UX ksh and POSIX shell print the target directory to stdout ! # if CDPATH is set. ! if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi ! ! # The names of the tagged configurations supported by this script. ! available_tags= ! ! # ### BEGIN LIBTOOL CONFIG], ! [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) ! ! # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: ! ! # Shell to use when invoking shell scripts. ! SHELL=$lt_SHELL ! ! # Whether or not to build shared libraries. ! build_libtool_libs=$enable_shared ! ! # Whether or not to build static libraries. ! build_old_libs=$enable_static ! ! # Whether or not to add -lc for building shared libraries. ! build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) ! ! # Whether or not to disallow shared libs when runtime libs are static ! allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) ! ! # Whether or not to optimize for fast installation. ! fast_install=$enable_fast_install ! ! # The host system. ! host_alias=$host_alias ! host=$host ! ! # An echo program that does not interpret backslashes. ! echo=$lt_echo ! ! # The archiver. ! AR=$lt_AR ! AR_FLAGS=$lt_AR_FLAGS ! ! # A C compiler. ! LTCC=$lt_LTCC ! ! # A language-specific compiler. ! CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) ! ! # Is the compiler the GNU C compiler? ! with_gcc=$_LT_AC_TAGVAR(GCC, $1) ! ! # An ERE matcher. ! EGREP=$lt_EGREP ! ! # The linker used to build libraries. ! LD=$lt_[]_LT_AC_TAGVAR(LD, $1) ! ! # Whether we need hard or soft links. ! LN_S=$lt_LN_S ! ! # A BSD-compatible nm program. ! NM=$lt_NM ! ! # A symbol stripping program ! STRIP=$STRIP ! ! # Used to examine libraries when file_magic_cmd begins "file" ! MAGIC_CMD=$MAGIC_CMD ! ! # Used on cygwin: DLL creation program. ! DLLTOOL="$DLLTOOL" ! ! # Used on cygwin: object dumper. ! OBJDUMP="$OBJDUMP" ! ! # Used on cygwin: assembler. ! AS="$AS" ! ! # The name of the directory that contains temporary libtool files. ! objdir=$objdir ! ! # How to create reloadable object files. ! reload_flag=$lt_reload_flag ! reload_cmds=$lt_reload_cmds ! ! # How to pass a linker flag through the compiler. ! wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) ! ! # Object file suffix (normally "o"). ! objext="$ac_objext" ! ! # Old archive suffix (normally "a"). ! libext="$libext" ! ! # Shared library suffix (normally ".so"). ! shrext='$shrext' ! ! # Executable file suffix (normally ""). ! exeext="$exeext" ! ! # Additional compiler flags for building library objects. ! pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) ! pic_mode=$pic_mode ! ! # What is the maximum length of a command? ! max_cmd_len=$lt_cv_sys_max_cmd_len ! ! # Does compiler simultaneously support -c and -o options? ! compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) ! ! # Must we lock files when doing compilation ? ! need_locks=$lt_need_locks ! ! # Do we need the lib prefix for modules? ! need_lib_prefix=$need_lib_prefix ! ! # Do we need a version for libraries? ! need_version=$need_version ! ! # Whether dlopen is supported. ! dlopen_support=$enable_dlopen ! ! # Whether dlopen of programs is supported. ! dlopen_self=$enable_dlopen_self ! ! # Whether dlopen of statically linked programs is supported. ! dlopen_self_static=$enable_dlopen_self_static ! ! # Compiler flag to prevent dynamic linking. ! link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) ! ! # Compiler flag to turn off builtin functions. ! no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) ! ! # Compiler flag to allow reflexive dlopens. ! export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) ! ! # Compiler flag to generate shared objects directly from archives. ! whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) ! ! # Compiler flag to generate thread-safe objects. ! thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) ! ! # Library versioning type. ! version_type=$version_type ! ! # Format of library name prefix. ! libname_spec=$lt_libname_spec ! ! # List of archive names. First name is the real one, the rest are links. ! # The last name is the one that the linker finds with -lNAME. ! library_names_spec=$lt_library_names_spec ! ! # The coded name of the library, if different from the real name. ! soname_spec=$lt_soname_spec ! ! # Commands used to build and install an old-style archive. ! RANLIB=$lt_RANLIB ! old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) ! old_postinstall_cmds=$lt_old_postinstall_cmds ! old_postuninstall_cmds=$lt_old_postuninstall_cmds ! ! # Create an old-style archive from a shared archive. ! old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) ! ! # Create a temporary old-style archive to link instead of a shared archive. ! old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) ! ! # Commands used to build and install a shared archive. ! archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) ! archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) ! postinstall_cmds=$lt_postinstall_cmds ! postuninstall_cmds=$lt_postuninstall_cmds ! ! # Commands used to build a loadable module (assumed same as above if empty) ! module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) ! module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) ! ! # Commands to strip libraries. ! old_striplib=$lt_old_striplib ! striplib=$lt_striplib ! ! # Dependencies to place before the objects being linked to create a ! # shared library. ! predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) ! ! # Dependencies to place after the objects being linked to create a ! # shared library. ! postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) ! ! # Dependencies to place before the objects being linked to create a ! # shared library. ! predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) ! ! # Dependencies to place after the objects being linked to create a ! # shared library. ! postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) ! ! # The library search path used internally by the compiler when linking ! # a shared library. ! compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) ! ! # Method to check whether dependent libraries are shared objects. ! deplibs_check_method=$lt_deplibs_check_method ! ! # Command to use when deplibs_check_method == file_magic. ! file_magic_cmd=$lt_file_magic_cmd ! ! # Flag that allows shared libraries with undefined symbols to be built. ! allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) ! ! # Flag that forces no undefined symbols. ! no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) ! ! # Commands used to finish a libtool library installation in a directory. ! finish_cmds=$lt_finish_cmds ! ! # Same as above, but a single script fragment to be evaled but not shown. ! finish_eval=$lt_finish_eval ! ! # Take the output of nm and produce a listing of raw symbols and C names. ! global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe ! ! # Transform the output of nm in a proper C declaration ! global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl ! ! # Transform the output of nm in a C name address pair ! global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address ! ! # This is the shared library runtime path variable. ! runpath_var=$runpath_var ! ! # This is the shared library path variable. ! shlibpath_var=$shlibpath_var ! ! # Is shlibpath searched before the hard-coded library search path? ! shlibpath_overrides_runpath=$shlibpath_overrides_runpath ! ! # How to hardcode a shared library path into an executable. ! hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) ! ! # Whether we should hardcode library paths into libraries. ! hardcode_into_libs=$hardcode_into_libs ! ! # Flag to hardcode \$libdir into a binary during linking. ! # This must work even if \$libdir does not exist. ! hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) ! ! # If ld is used when linking, flag to hardcode \$libdir into ! # a binary during linking. This must work even if \$libdir does ! # not exist. ! hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) ! ! # Whether we need a single -rpath flag with a separated argument. ! hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) ! ! # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the ! # resulting binary. ! hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) ! ! # Set to yes if using the -LDIR flag during linking hardcodes DIR into the ! # resulting binary. ! hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) ! ! # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into ! # the resulting binary. ! hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) ! ! # Set to yes if building a shared library automatically hardcodes DIR into the library ! # and all subsequent libraries and executables linked against it. ! hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) ! ! # Variables whose values should be saved in libtool wrapper scripts and ! # restored at relink time. ! variables_saved_for_relink="$variables_saved_for_relink" ! ! # Whether libtool must link a program against all its dependency libraries. ! link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) ! ! # Compile-time system search path for libraries ! sys_lib_search_path_spec=$lt_sys_lib_search_path_spec ! ! # Run-time system search path for libraries ! sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec ! ! # Fix the shell variable \$srcfile for the compiler. ! fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" ! ! # Set to yes if exported symbols are required. ! always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) ! ! # The commands to list exported symbols. ! export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) ! ! # The commands to extract the exported symbol list from a shared archive. ! extract_expsyms_cmds=$lt_extract_expsyms_cmds ! ! # Symbols that should not be listed in the preloaded symbols. ! exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) ! ! # Symbols that must always be exported. ! include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ! ! ifelse([$1],[], ! [# ### END LIBTOOL CONFIG], ! [# ### END LIBTOOL TAG CONFIG: $tagname]) ! ! __EOF__ ! ! ifelse([$1],[], [ ! case $host_os in ! aix3*) ! cat <<\EOF >> "$cfgfile" ! ! # AIX sometimes has problems with the GCC collect2 program. For some ! # reason, if we set the COLLECT_NAMES environment variable, the problems ! # vanish in a puff of smoke. ! if test "X${COLLECT_NAMES+set}" != Xset; then ! COLLECT_NAMES= ! export COLLECT_NAMES fi ! EOF ! ;; ! esac ! # We use sed instead of cat because bash on DJGPP gets confused if ! # if finds mixed CR/LF and LF-only lines. Since sed operates in ! # text mode, it properly converts lines to CR/LF. This bash problem ! # is reportedly fixed, but why not run on old versions too? ! sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) ! ! mv -f "$cfgfile" "$ofile" || \ ! (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") ! chmod +x "$ofile" ]) ! else ! # If there is no Makefile yet, we rely on a make rule to execute ! # `config.status --recheck' to rerun these tests and create the ! # libtool script then. ! test -f Makefile && make "$ltmain" ! fi ! ])# AC_LIBTOOL_CONFIG ! ! # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) ! # ------------------------------------------- ! AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], ! [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl ! ! _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= ! ! if test "$GCC" = yes; then ! _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ! ! AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], ! lt_cv_prog_compiler_rtti_exceptions, ! [-fno-rtti -fno-exceptions], [], ! [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ! ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI ! ! # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE ! # --------------------------------- ! AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], ! [AC_REQUIRE([AC_CANONICAL_HOST]) ! AC_REQUIRE([AC_PROG_NM]) ! AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. ! AC_MSG_CHECKING([command to parse $NM output from $compiler object]) ! AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], ! [ ! # These are sane defaults that work on at least a few old systems. ! # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. ! symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. ! sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform the above into a raw symbol and a C symbol. ! symxfrm='\1 \2\3 \3' # Transform an extracted symbol line into a proper C declaration ! lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" ! ! # Transform an extracted symbol line into symbol name and symbol address ! lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. ! case $host_os in aix*) ! symcode='[[BCDT]]' ;; ! cygwin* | mingw* | pw32*) ! symcode='[[ABCDGISTW]]' ;; ! hpux*) # Its linker distinguishes data from code symbols ! if test "$host_cpu" = ia64; then ! symcode='[[ABCDEGRST]]' ! fi ! lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" ! lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; ! irix* | nonstopux*) ! symcode='[[BCDEGRST]]' ;; ! osf*) ! symcode='[[BCDEGQRST]]' ! ;; ! solaris* | sysv5*) ! symcode='[[BDT]]' ! ;; ! sysv4) ! symcode='[[DFNSTU]]' ! ;; ! esac ! ! # Handle CRLF in mingw tool chain ! opt_cr= ! case $build_os in ! mingw*) ! opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. ! case `$NM -V 2>&1` in ! *GNU* | *'with BFD'*) ! symcode='[[ABCDGISTW]]' ;; ! esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do ! # Write the raw and C identifiers. ! lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. ! pipe_works=no ! ! rm -f conftest* cat > conftest.$ac_ext < $ac_nlist) && test -s "$ac_nlist"; then ! # Try sorting and uniquifying the output. ! if sort "$ac_nlist" | uniq > "$ac_nlist"T; then ! mv -f "$ac_nlist"T "$ac_nlist" else ! rm -f "$ac_nlist"T fi # Make sure that we snagged all the symbols we need. ! if egrep ' nm_test_var$' "$ac_nlist" >/dev/null; then ! if egrep ' nm_test_func$' "$ac_nlist" >/dev/null; then ! cat < conftest.c #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. ! eval "$ac_global_symbol_to_cdecl"' < "$ac_nlist" >> conftest.c' ! cat <> conftest.c #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else --- 4380,4412 ---- #ifdef __cplusplus } #endif ! int main(){nm_test_var='a';nm_test_func();return(0);} EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. ! nlist=conftest.nm ! if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. ! if sort "$nlist" | uniq > "$nlist"T; then ! mv -f "$nlist"T "$nlist" else ! rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. ! if grep ' nm_test_var$' "$nlist" >/dev/null; then ! if grep ' nm_test_func$' "$nlist" >/dev/null; then ! cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. ! eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' ! cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else *************** const struct { *** 1125,1137 **** const char *name; lt_ptr_t address; } ! changequote(,)dnl ! lt_preloaded_symbols[] = ! changequote([,])dnl { EOF ! sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$ac_nlist" >> conftest.c ! cat <<\EOF >> conftest.c {0, (lt_ptr_t) 0} }; --- 4419,4429 ---- const char *name; lt_ptr_t address; } ! lt_preloaded_symbols[[]] = { EOF ! $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext ! cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; *************** EOF *** 1141,1289 **** EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext ! ac_save_LIBS="$LIBS" ! ac_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" ! CFLAGS="$CFLAGS$no_builtin_flag" ! if AC_TRY_EVAL(ac_link) && test -s conftest; then ! ac_pipe_works=yes ! else ! echo "configure: failed program was:" >&AC_FD_CC ! cat conftest.c >&AC_FD_CC fi ! LIBS="$ac_save_LIBS" ! CFLAGS="$ac_save_CFLAGS" else ! echo "cannot find nm_test_func in $ac_nlist" >&AC_FD_CC fi else ! echo "cannot find nm_test_var in $ac_nlist" >&AC_FD_CC fi else ! echo "cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC fi else ! echo "$progname: failed program was:" >&AC_FD_CC ! cat conftest.c >&AC_FD_CC fi ! rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. ! if test "$ac_pipe_works" = yes; then ! if test x"$ac_symprfx" = x"_"; then ! ac_cv_sys_symbol_underscore=yes ! else ! ac_cv_sys_symbol_underscore=no ! fi break else ! ac_cv_sys_global_symbol_pipe= fi done ]) ! ac_result=yes ! if test -z "$ac_cv_sys_global_symbol_pipe"; then ! ac_result=no fi ! AC_MSG_RESULT($ac_result) ]) ! AC_DEFUN(AC_LTDL_SYMBOL_USCORE, ! [dnl does the compiler prefix global symbols with an underscore? ! AC_REQUIRE([AC_LTDL_GLOBAL_SYMBOL_PIPE])dnl ! AC_MSG_CHECKING([for _ prefix in compiled symbols]) ! AC_CACHE_VAL(ac_cv_sys_symbol_underscore, ! [ac_cv_sys_symbol_underscore=no ! cat > conftest.$ac_ext < $ac_nlist) && test -s "$ac_nlist"; then ! # See whether the symbols have a leading underscore. ! if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then ! ac_cv_sys_symbol_underscore=yes else ! if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then ! : else ! echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC fi fi else ! echo "configure: cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC fi ! else ! echo "configure: failed program was:" >&AC_FD_CC ! cat conftest.c >&AC_FD_CC fi ! rm -rf conftest* ]) ! AC_MSG_RESULT($ac_cv_sys_symbol_underscore) ! AC_LTDL_DLSYM_USCORE ]) ! AC_DEFUN(AC_LTDL_DLSYM_USCORE, ! [AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])dnl ! if test x"$ac_cv_sys_symbol_underscore" = xyes; then ! if test x"$ac_cv_func_dlopen" = xyes || ! test x"$ac_cv_lib_dl_dlopen" = xyes ; then ! AC_CACHE_CHECK([whether we have to add an underscore for dlsym], ! libltdl_cv_need_uscore, [dnl ! AC_TRY_RUN([ ! #if HAVE_DLFCN_H ! #include ! #endif ! #include ! #ifdef RTLD_GLOBAL ! # define LTDL_GLOBAL RTLD_GLOBAL ! #else ! # ifdef DL_GLOBAL ! # define LTDL_GLOBAL DL_GLOBAL ! # else ! # define LTDL_GLOBAL 0 ! # endif ! #endif ! /* We may have to define LTDL_LAZY_OR_NOW in the command line if we ! find out it does not work in some platform. */ ! #ifndef LTDL_LAZY_OR_NOW ! # ifdef RTLD_LAZY ! # define LTDL_LAZY_OR_NOW RTLD_LAZY ! # else ! # ifdef DL_LAZY ! # define LTDL_LAZY_OR_NOW DL_LAZY ! # else ! # ifdef RTLD_NOW ! # define LTDL_LAZY_OR_NOW RTLD_NOW ! # else ! # ifdef DL_NOW ! # define LTDL_LAZY_OR_NOW DL_NOW ! # else ! # define LTDL_LAZY_OR_NOW 0 ! # endif ! # endif ! # endif ! # endif #endif ! fnord() { int i=42;} ! main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); ! if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); ! if(ptr1 && !ptr2) { dlclose(self); exit(0); } } exit(1); } ! ], libltdl_cv_need_uscore=no, libltdl_cv_need_uscore=yes, ! libltdl_cv_need_uscore=cross ! )]) fi fi if test x"$libltdl_cv_need_uscore" = xyes; then AC_DEFINE(NEED_USCORE, 1, ! [Define if dlsym() requires a leading underscode in symbol names. ]) fi ! ]) --- 4433,6309 ---- EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext ! lt_save_LIBS="$LIBS" ! lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" ! CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" ! if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then ! pipe_works=yes fi ! LIBS="$lt_save_LIBS" ! CFLAGS="$lt_save_CFLAGS" else ! echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else ! echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else ! echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else ! echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD ! cat conftest.$ac_ext >&5 fi ! rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. ! if test "$pipe_works" = yes; then break else ! lt_cv_sys_global_symbol_pipe= fi done ]) + if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= + fi + if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) + else + AC_MSG_RESULT(ok) + fi + ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE ! ! # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) ! # --------------------------------------- ! AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], ! [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= ! ! AC_MSG_CHECKING([for $compiler option to produce PIC]) ! ifelse([$1],[CXX],[ ! # C++ specific cases for pic, static, wl, etc. ! if test "$GXX" = yes; then ! _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ! ! case $host_os in ! aix*) ! # All AIX code is PIC. ! if test "$host_cpu" = ia64; then ! # AIX 5 now supports IA64 processor ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ! fi ! ;; ! amigaos*) ! # FIXME: we need at least 68020 code to build shared libraries, but ! # adding the `-m68020' flag to GCC prevents building anything better, ! # like `-m68040'. ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ! ;; ! beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) ! # PIC is the default for these OSes. ! ;; ! mingw* | os2* | pw32*) ! # This hack is so that the source file can tell whether it is being ! # built for inclusion in a dll (and should export symbols for example). ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ! ;; ! darwin* | rhapsody*) ! # PIC is the default on this platform ! # Common symbols not allowed in MH_DYLIB files ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ! ;; ! *djgpp*) ! # DJGPP does not support shared libraries at all ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ! ;; ! sysv4*MP*) ! if test -d /usr/nec; then ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic ! fi ! ;; ! hpux*) ! # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but ! # not for PA HP-UX. ! case "$host_cpu" in ! hppa*64*|ia64*) ! ;; ! *) ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ! ;; ! esac ! ;; ! *) ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ! ;; ! esac ! else ! case $host_os in ! aix4* | aix5*) ! # All AIX code is PIC. ! if test "$host_cpu" = ia64; then ! # AIX 5 now supports IA64 processor ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ! else ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' ! fi ! ;; ! chorus*) ! case $cc_basename in ! cxch68) ! # Green Hills C++ Compiler ! # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ! ;; ! esac ! ;; ! dgux*) ! case $cc_basename in ! ec++) ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ! ;; ! ghcx) ! # Green Hills C++ Compiler ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ! ;; ! *) ! ;; ! esac ! ;; ! freebsd*) ! # FreeBSD uses GNU C++ ! ;; ! hpux9* | hpux10* | hpux11*) ! case $cc_basename in ! CC) ! _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" ! if test "$host_cpu" != ia64; then ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ! fi ! ;; ! aCC) ! _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" ! case "$host_cpu" in ! hppa*64*|ia64*) ! # +Z the default ! ;; ! *) ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ! ;; ! esac ! ;; ! *) ! ;; ! esac ! ;; ! irix5* | irix6* | nonstopux*) ! case $cc_basename in ! CC) ! _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ! # CC pic flag -KPIC is the default. ! ;; ! *) ! ;; ! esac ! ;; ! linux*) ! case $cc_basename in ! KCC) ! # KAI C++ Compiler ! _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ! ;; ! icpc) ! # Intel C++ ! _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ! ;; ! cxx) ! # Compaq C++ ! # Make sure the PIC flag is empty. It appears that all Alpha ! # Linux and Compaq Tru64 Unix objects are PIC. ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ! ;; ! *) ! ;; ! esac ! ;; ! lynxos*) ! ;; ! m88k*) ! ;; ! mvs*) ! case $cc_basename in ! cxx) ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ! ;; ! *) ! ;; ! esac ! ;; ! netbsd*) ! ;; ! osf3* | osf4* | osf5*) ! case $cc_basename in ! KCC) ! _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ! ;; ! RCC) ! # Rational C++ 2.4.1 ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ! ;; ! cxx) ! # Digital/Compaq C++ ! _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ! # Make sure the PIC flag is empty. It appears that all Alpha ! # Linux and Compaq Tru64 Unix objects are PIC. ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ! ;; ! *) ! ;; ! esac ! ;; ! psos*) ! ;; ! sco*) ! case $cc_basename in ! CC) ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ! ;; ! *) ! ;; ! esac ! ;; ! solaris*) ! case $cc_basename in ! CC) ! # Sun C++ 4.2, 5.x and Centerline C++ ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ! _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ! ;; ! gcx) ! # Green Hills C++ Compiler ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ! ;; ! *) ! ;; ! esac ! ;; ! sunos4*) ! case $cc_basename in ! CC) ! # Sun C++ 4.x ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ! ;; ! lcc) ! # Lucid ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ! ;; ! *) ! ;; ! esac ! ;; ! tandem*) ! case $cc_basename in ! NCC) ! # NonStop-UX NCC 3.20 ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ! ;; ! *) ! ;; ! esac ! ;; ! unixware*) ! ;; ! vxworks*) ! ;; ! *) ! _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ! ;; ! esac ! fi ! ], ! [ ! if test "$GCC" = yes; then ! _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ! ! case $host_os in ! aix*) ! # All AIX code is PIC. ! if test "$host_cpu" = ia64; then ! # AIX 5 now supports IA64 processor ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ! fi ! ;; ! ! amigaos*) ! # FIXME: we need at least 68020 code to build shared libraries, but ! # adding the `-m68020' flag to GCC prevents building anything better, ! # like `-m68040'. ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ! ;; ! ! beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) ! # PIC is the default for these OSes. ! ;; ! ! mingw* | pw32* | os2*) ! # This hack is so that the source file can tell whether it is being ! # built for inclusion in a dll (and should export symbols for example). ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ! ;; ! ! darwin* | rhapsody*) ! # PIC is the default on this platform ! # Common symbols not allowed in MH_DYLIB files ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ! ;; ! ! msdosdjgpp*) ! # Just because we use GCC doesn't mean we suddenly get shared libraries ! # on systems that don't support them. ! _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ! enable_shared=no ! ;; ! ! sysv4*MP*) ! if test -d /usr/nec; then ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic ! fi ! ;; ! ! hpux*) ! # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but ! # not for PA HP-UX. ! case "$host_cpu" in ! hppa*64*|ia64*) ! # +Z the default ! ;; ! *) ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ! ;; ! esac ! ;; ! ! *) ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ! ;; ! esac ! else ! # PORTME Check for flag to pass linker flags through the system compiler. ! case $host_os in ! aix*) ! _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ! if test "$host_cpu" = ia64; then ! # AIX 5 now supports IA64 processor ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ! else ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' ! fi ! ;; ! ! mingw* | pw32* | os2*) ! # This hack is so that the source file can tell whether it is being ! # built for inclusion in a dll (and should export symbols for example). ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ! ;; ! ! hpux9* | hpux10* | hpux11*) ! _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ! # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but ! # not for PA HP-UX. ! case "$host_cpu" in ! hppa*64*|ia64*) ! # +Z the default ! ;; ! *) ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ! ;; ! esac ! # Is there a better lt_prog_compiler_static that works with the bundled CC? ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ! ;; ! ! irix5* | irix6* | nonstopux*) ! _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ! # PIC (with -KPIC) is the default. ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ! ;; ! ! newsos6) ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ! ;; ! ! linux*) ! case $CC in ! icc|ecc) ! _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ! ;; ! ccc) ! _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ! # All Alpha code is PIC. ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ! ;; ! esac ! ;; ! ! osf3* | osf4* | osf5*) ! _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ! # All OSF/1 code is PIC. ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ! ;; ! ! sco3.2v5*) ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' ! ;; ! ! solaris*) ! _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ! ;; ! ! sunos4*) ! _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ! ;; ! ! sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) ! _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ! ;; ! ! sysv4*MP*) ! if test -d /usr/nec ;then ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ! fi ! ;; ! ! uts4*) ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ! _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ! ;; ! ! *) ! _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ! ;; ! esac ! fi ! ]) ! AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) ! ! # ! # Check to make sure the PIC flag actually works. ! # ! if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then ! AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], ! _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), ! [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], ! [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in ! "" | " "*) ;; ! *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; ! esac], ! [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ! _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi ! case "$host_os" in ! # For platforms which do not support PIC, -DPIC is meaningless: ! *djgpp*) ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ! ;; ! *) ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ! ;; ! esac ]) ! ! # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) ! # ------------------------------------ ! # See if the linker supports building shared libraries. ! AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], ! [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ! ifelse([$1],[CXX],[ ! _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ! case $host_os in ! aix4* | aix5*) ! # If we're using GNU nm, then we don't want the "-C" option. ! # -C means demangle to AIX nm, but means don't demangle with GNU nm ! if $NM -V 2>&1 | grep 'GNU' > /dev/null; then ! _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else ! _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' ! fi ! ;; ! pw32*) ! _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ! ;; ! cygwin* | mingw*) ! _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' ! ;; ! *) ! _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ! ;; ! esac ! ],[ ! runpath_var= ! _LT_AC_TAGVAR(allow_undefined_flag, $1)= ! _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no ! _LT_AC_TAGVAR(archive_cmds, $1)= ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)= ! _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= ! _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= ! _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= ! _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= ! _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= ! _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= ! _LT_AC_TAGVAR(hardcode_direct, $1)=no ! _LT_AC_TAGVAR(hardcode_minus_L, $1)=no ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported ! _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown ! _LT_AC_TAGVAR(hardcode_automatic, $1)=no ! _LT_AC_TAGVAR(module_cmds, $1)= ! _LT_AC_TAGVAR(module_expsym_cmds, $1)= ! _LT_AC_TAGVAR(always_export_symbols, $1)=no ! _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ! # include_expsyms should be a list of space-separated symbols to be *always* ! # included in the symbol list ! _LT_AC_TAGVAR(include_expsyms, $1)= ! # exclude_expsyms can be an extended regexp of symbols to exclude ! # it will be wrapped by ` (' and `)$', so one must not match beginning or ! # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', ! # as well as any symbol that contains `d'. ! _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" ! # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out ! # platforms (ab)use it in PIC code, but their linkers get confused if ! # the symbol is explicitly referenced. Since portable code cannot ! # rely on this symbol name, it's probably fine to never include it in ! # preloaded symbol tables. ! extract_expsyms_cmds= ! ! case $host_os in ! cygwin* | mingw* | pw32*) ! # FIXME: the MSVC++ port hasn't been tested in a loooong time ! # When not using gcc, we currently assume that we are using ! # Microsoft Visual C++. ! if test "$GCC" != yes; then ! with_gnu_ld=no ! fi ! ;; ! openbsd*) ! with_gnu_ld=no ! ;; ! esac ! ! _LT_AC_TAGVAR(ld_shlibs, $1)=yes ! if test "$with_gnu_ld" = yes; then ! # If archive_cmds runs LD, not CC, wlarc should be empty ! wlarc='${wl}' ! ! # See if GNU ld supports shared libraries. ! case $host_os in ! aix3* | aix4* | aix5*) ! # On AIX/PPC, the GNU linker is very broken ! if test "$host_cpu" != ia64; then ! _LT_AC_TAGVAR(ld_shlibs, $1)=no ! cat <&2 ! ! *** Warning: the GNU linker, at least up to release 2.9.1, is reported ! *** to be unable to reliably create shared libraries on AIX. ! *** Therefore, libtool is disabling shared libraries support. If you ! *** really care for shared libraries, you may want to modify your PATH ! *** so that a non-GNU linker is found, and then restart. ! ! EOF ! fi ! ;; ! ! amigaos*) ! _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ! _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ! ! # Samuel A. Falvo II reports ! # that the semantics of dynamic libraries on AmigaOS, at least up ! # to version 4, is to share data among multiple programs linked ! # with the same dynamic library. Since this doesn't match the ! # behavior of shared libraries on other platforms, we can't use ! # them. ! _LT_AC_TAGVAR(ld_shlibs, $1)=no ! ;; ! ! beos*) ! if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then ! _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported ! # Joseph Beckenbach says some releases of gcc ! # support --undefined. This deserves some investigation. FIXME ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ! _LT_AC_TAGVAR(ld_shlibs, $1)=no ! fi ! ;; ! ! cygwin* | mingw* | pw32*) ! # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, ! # as there is no search path for DLLs. ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ! _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported ! _LT_AC_TAGVAR(always_export_symbols, $1)=no ! _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ! _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' ! ! if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' ! # If the export-symbols file already is a .def file (1st line ! # is EXPORTS), use it as is; otherwise, prepend... ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ! cp $export_symbols $output_objdir/$soname.def; ! else ! echo EXPORTS > $output_objdir/$soname.def; ! cat $export_symbols >> $output_objdir/$soname.def; ! fi~ ! $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' ! else ! ld_shlibs=no ! fi ! ;; ! ! netbsd*) ! if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' ! wlarc= ! else ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ! fi ! ;; ! ! solaris* | sysv5*) ! if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ! _LT_AC_TAGVAR(ld_shlibs, $1)=no ! cat <&2 ! ! *** Warning: The releases 2.8.* of the GNU linker cannot reliably ! *** create shared libraries on Solaris systems. Therefore, libtool ! *** is disabling shared libraries support. We urge you to upgrade GNU ! *** binutils to release 2.9.1 or newer. Another option is to modify ! *** your PATH or compiler configuration so that the native linker is ! *** used, and then restart. ! ! EOF ! elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ! else ! _LT_AC_TAGVAR(ld_shlibs, $1)=no ! fi ! ;; ! ! sunos4*) ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' ! wlarc= ! _LT_AC_TAGVAR(hardcode_direct, $1)=yes ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! ;; ! ! *) ! if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ! else ! _LT_AC_TAGVAR(ld_shlibs, $1)=no ! fi ! ;; ! esac ! ! if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then ! runpath_var=LD_RUN_PATH ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' ! _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' ! # ancient GNU ld didn't support --whole-archive et. al. ! if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then ! _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' ! else ! _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi fi else ! # PORTME fill in a description of your system's linker (not GNU ld) ! case $host_os in ! aix3*) ! _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported ! _LT_AC_TAGVAR(always_export_symbols, $1)=yes ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' ! # Note: this linker hardcodes the directories in LIBPATH if there ! # are no directories specified by -L. ! _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ! if test "$GCC" = yes && test -z "$link_static_flag"; then ! # Neither direct hardcoding nor static linking is supported with a ! # broken collect2. ! _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported ! fi ! ;; ! ! aix4* | aix5*) ! if test "$host_cpu" = ia64; then ! # On IA64, the linker does run time linking by default, so we don't ! # have to do anything special. ! aix_use_runtimelinking=no ! exp_sym_flag='-Bexport' ! no_entry_flag="" ! else ! # If we're using GNU nm, then we don't want the "-C" option. ! # -C means demangle to AIX nm, but means don't demangle with GNU nm ! if $NM -V 2>&1 | grep 'GNU' > /dev/null; then ! _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' ! else ! _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' ! fi ! aix_use_runtimelinking=no ! ! # Test if we are trying to use run time linking or normal ! # AIX style linking. If -brtl is somewhere in LDFLAGS, we ! # need to do runtime linking. ! case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) ! for ld_flag in $LDFLAGS; do ! if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then ! aix_use_runtimelinking=yes ! break ! fi ! done ! esac ! ! exp_sym_flag='-bexport' ! no_entry_flag='-bnoentry' ! fi ! ! # When large executables or shared objects are built, AIX ld can ! # have problems creating the table of contents. If linking a library ! # or program results in "error TOC overflow" add -mminimal-toc to ! # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not ! # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. ! ! _LT_AC_TAGVAR(archive_cmds, $1)='' ! _LT_AC_TAGVAR(hardcode_direct, $1)=yes ! _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' ! _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ! ! if test "$GCC" = yes; then ! case $host_os in aix4.[012]|aix4.[012].*) ! # We only want to do this on AIX 4.2 and lower, the check ! # below for broken collect2 doesn't work under 4.3+ ! collect2name=`${CC} -print-prog-name=collect2` ! if test -f "$collect2name" && \ ! strings "$collect2name" | grep resolve_lib_name >/dev/null ! then ! # We have reworked collect2 ! _LT_AC_TAGVAR(hardcode_direct, $1)=yes ! else ! # We have old collect2 ! _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported ! # It fails to find uninstalled libraries when the uninstalled ! # path is not listed in the libpath. Setting hardcode_minus_L ! # to unsupported forces relinking ! _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ! _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= ! fi ! esac ! shared_flag='-shared' ! else ! # not using gcc ! if test "$host_cpu" = ia64; then ! # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release ! # chokes on -Wl,-G. The following line is correct: ! shared_flag='-G' ! else ! if test "$aix_use_runtimelinking" = yes; then ! shared_flag='${wl}-G' ! else ! shared_flag='${wl}-bM:SRE' ! fi ! fi ! fi ! ! # It seems that -bexpall does not export symbols beginning with ! # underscore (_), so it is better to generate a list of symbols to export. ! _LT_AC_TAGVAR(always_export_symbols, $1)=yes ! if test "$aix_use_runtimelinking" = yes; then ! # Warning - without using the other runtime loading flags (-brtl), ! # -berok will link without error, but may produce a broken library. ! _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' ! # Determine the default libpath from the value encoded in an empty executable. ! _LT_AC_SYS_LIBPATH_AIX ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" ! else ! if test "$host_cpu" = ia64; then ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' ! _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" ! else ! # Determine the default libpath from the value encoded in an empty executable. ! _LT_AC_SYS_LIBPATH_AIX ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" ! # Warning - without using the other run time loading flags, ! # -berok will link without error, but may produce a broken library. ! _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' ! _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' ! # -bexpall does not export symbols beginning with underscore (_) ! _LT_AC_TAGVAR(always_export_symbols, $1)=yes ! # Exported symbols can be pulled into shared objects from archives ! _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' ! _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ! # This is similar to how AIX traditionally builds it's shared libraries. ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' ! fi ! fi ! ;; ! ! amigaos*) ! _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ! _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ! # see comment about different semantics on the GNU ld section ! _LT_AC_TAGVAR(ld_shlibs, $1)=no ! ;; ! ! bsdi4*) ! _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ! ;; ! ! cygwin* | mingw* | pw32*) ! # When not using gcc, we currently assume that we are using ! # Microsoft Visual C++. ! # hardcode_libdir_flag_spec is actually meaningless, as there is ! # no search path for DLLs. ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' ! _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported ! # Tell ltmain to make .lib files, not .a files. ! libext=lib ! # Tell ltmain to make .dll files, not .so files. ! shrext=".dll" ! # FIXME: Setting linknames here is a bad hack. ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' ! # The linker will automatically build a .lib file if we build a DLL. ! _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' ! # FIXME: Should let the user specify the lib program. ! _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' ! fix_srcfile_path='`cygpath -w "$srcfile"`' ! _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ! ;; ! ! darwin* | rhapsody*) ! if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then ! _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ! case "$host_os" in ! rhapsody* | darwin1.[[012]]) ! _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' ! ;; ! *) # Darwin 1.3 on ! test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' ! ;; ! esac ! # FIXME: Relying on posixy $() will cause problems for ! # cross-compilation, but unfortunately the echo tests do not ! # yet detect zsh echo's removal of \ escapes. Also zsh mangles ! # `"' quotes if we put them in here... so don't! ! lt_int_apple_cc_single_mod=no ! output_verbose_link_cmd='echo' ! if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then ! lt_int_apple_cc_single_mod=yes ! fi ! if test "X$lt_int_apple_cc_single_mod" = Xyes ; then ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' ! else ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' ! fi ! _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' ! # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's ! if test "X$lt_int_apple_cc_single_mod" = Xyes ; then ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ! else ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ! fi ! _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ! _LT_AC_TAGVAR(hardcode_direct, $1)=no ! _LT_AC_TAGVAR(hardcode_automatic, $1)=yes ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported ! _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' ! _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ! fi ! ;; ! ! dgux*) ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! ;; ! ! freebsd1*) ! _LT_AC_TAGVAR(ld_shlibs, $1)=no ! ;; ! ! # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor ! # support. Future versions do this automatically, but an explicit c++rt0.o ! # does not break anything, and helps significantly (at the cost of a little ! # extra space). ! freebsd2.2*) ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ! _LT_AC_TAGVAR(hardcode_direct, $1)=yes ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! ;; ! ! # Unfortunately, older versions of FreeBSD 2 do not have this feature. ! freebsd2*) ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' ! _LT_AC_TAGVAR(hardcode_direct, $1)=yes ! _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! ;; ! ! # FreeBSD 3 and greater uses gcc -shared to do shared libraries. ! freebsd*) ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ! _LT_AC_TAGVAR(hardcode_direct, $1)=yes ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! ;; ! ! hpux9*) ! if test "$GCC" = yes; then ! _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ! else ! _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ! fi ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' ! _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ! _LT_AC_TAGVAR(hardcode_direct, $1)=yes ! ! # hardcode_minus_L: Not really in the search PATH, ! # but as the default location of the library. ! _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ! _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ! ;; ! ! hpux10* | hpux11*) ! if test "$GCC" = yes -a "$with_gnu_ld" = no; then ! case "$host_cpu" in ! hppa*64*|ia64*) ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ! ;; ! *) ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ! ;; ! esac ! else ! case "$host_cpu" in ! hppa*64*|ia64*) ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ! ;; ! *) ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ! ;; ! esac ! fi ! if test "$with_gnu_ld" = no; then ! case "$host_cpu" in ! hppa*64*) ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' ! _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ! _LT_AC_TAGVAR(hardcode_direct, $1)=no ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! ;; ! ia64*) ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ! _LT_AC_TAGVAR(hardcode_direct, $1)=no ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! ! # hardcode_minus_L: Not really in the search PATH, ! # but as the default location of the library. ! _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ! ;; ! *) ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' ! _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ! _LT_AC_TAGVAR(hardcode_direct, $1)=yes ! _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ! ! # hardcode_minus_L: Not really in the search PATH, ! # but as the default location of the library. ! _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ! ;; ! esac ! fi ! ;; ! ! irix5* | irix6* | nonstopux*) ! if test "$GCC" = yes; then ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ! else ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' ! fi ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ! _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ! _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ! ;; ! ! netbsd*) ! if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out ! else ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF ! fi ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ! _LT_AC_TAGVAR(hardcode_direct, $1)=yes ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! ;; ! ! newsos6) ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! _LT_AC_TAGVAR(hardcode_direct, $1)=yes ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ! _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! ;; ! ! openbsd*) ! _LT_AC_TAGVAR(hardcode_direct, $1)=yes ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ! _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ! else ! case $host_os in ! openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ! ;; ! *) ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ! ;; ! esac ! fi ! ;; ! ! os2*) ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ! _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ! _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported ! _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' ! _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ! ;; ! ! osf3*) ! if test "$GCC" = yes; then ! _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ! else ! _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' ! fi ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ! _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ! ;; ! ! osf4* | osf5*) # as osf3* with the addition of -msym flag ! if test "$GCC" = yes; then ! _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ! else ! _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ ! $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' ! ! # Both c and cxx compiler support -rpath directly ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ! fi ! _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ! ;; ! ! sco3.2v5*) ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' ! runpath_var=LD_RUN_PATH ! hardcode_runpath_var=yes ! ;; ! ! solaris*) ! _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' ! if test "$GCC" = yes; then ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ ! $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' ! else ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ ! $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' ! fi ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! case $host_os in ! solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; ! *) # Supported since Solaris 2.6 (maybe 2.5.1?) ! _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; ! esac ! _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ! ;; ! ! sunos4*) ! if test "x$host_vendor" = xsequent; then ! # Use $CC to link under sequent, because it throws in some extra .o ! # files that make .init and .fini sections work. ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' ! else ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' ! fi ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ! _LT_AC_TAGVAR(hardcode_direct, $1)=yes ! _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! ;; ! ! sysv4) ! case $host_vendor in ! sni) ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ! ;; ! siemens) ! ## LD is ld it makes a PLAMLIB ! ## CC just makes a GrossModule. ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' ! _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' ! _LT_AC_TAGVAR(hardcode_direct, $1)=no ! ;; ! motorola) ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ! ;; ! esac ! runpath_var='LD_RUN_PATH' ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! ;; ! ! sysv4.3*) ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ! ;; ! ! sysv4*MP*) ! if test -d /usr/nec; then ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! runpath_var=LD_RUN_PATH ! hardcode_runpath_var=yes ! _LT_AC_TAGVAR(ld_shlibs, $1)=yes ! fi ! ;; ! ! sysv4.2uw2*) ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' ! _LT_AC_TAGVAR(hardcode_direct, $1)=yes ! _LT_AC_TAGVAR(hardcode_minus_L, $1)=no ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! hardcode_runpath_var=yes ! runpath_var=LD_RUN_PATH ! ;; ! ! sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) ! _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' ! if test "$GCC" = yes; then ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ! else ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ! fi ! runpath_var='LD_RUN_PATH' ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! ;; ! ! sysv5*) ! _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' ! # $CC -shared without GNU ld will not create a library from C++ ! # object files and a static libstdc++, better avoid it by now ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ ! $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! runpath_var='LD_RUN_PATH' ! ;; ! ! uts4*) ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! ;; ! ! *) ! _LT_AC_TAGVAR(ld_shlibs, $1)=no ! ;; ! esac fi ! ]) ! AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) ! test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no ! ! variables_saved_for_relink="PATH $shlibpath_var $runpath_var" ! if test "$GCC" = yes; then ! variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi ! ! # ! # Do we need to explicitly link libc? ! # ! case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in ! x|xyes) ! # Assume -lc should be added ! _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ! ! if test "$enable_shared" = yes && test "$GCC" = yes; then ! case $_LT_AC_TAGVAR(archive_cmds, $1) in ! *'~'*) ! # FIXME: we may have to deal with multi-command sequences. ! ;; ! '$CC '*) ! # Test whether the compiler implicitly links with -lc since on some ! # systems, -lgcc has to come before -lc. If gcc already passes -lc ! # to ld, don't add -lc before -lgcc. ! AC_MSG_CHECKING([whether -lc should be explicitly linked in]) ! $rm conftest* ! printf "$lt_simple_compile_test_code" > conftest.$ac_ext ! ! if AC_TRY_EVAL(ac_compile) 2>conftest.err; then ! soname=conftest ! lib=conftest ! libobjs=conftest.$ac_objext ! deplibs= ! wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) ! compiler_flags=-v ! linker_flags=-v ! verstring= ! output_objdir=. ! libname=conftest ! lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) ! _LT_AC_TAGVAR(allow_undefined_flag, $1)= ! if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) ! then ! _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ! else ! _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ! fi ! _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag ! else ! cat conftest.err 1>&5 ! fi ! $rm conftest* ! AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ! ;; ! esac ! fi ! ;; ! esac ! ])# AC_LIBTOOL_PROG_LD_SHLIBS ! ! ! # _LT_AC_FILE_LTDLL_C ! # ------------------- ! # Be careful that the start marker always follows a newline. ! AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ ! # /* ltdll.c starts here */ ! # #define WIN32_LEAN_AND_MEAN ! # #include ! # #undef WIN32_LEAN_AND_MEAN ! # #include ! # ! # #ifndef __CYGWIN__ ! # # ifdef __CYGWIN32__ ! # # define __CYGWIN__ __CYGWIN32__ ! # # endif ! # #endif ! # ! # #ifdef __cplusplus ! # extern "C" { ! # #endif ! # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); ! # #ifdef __cplusplus ! # } ! # #endif ! # ! # #ifdef __CYGWIN__ ! # #include ! # DECLARE_CYGWIN_DLL( DllMain ); ! # #endif ! # HINSTANCE __hDllInstance_base; ! # ! # BOOL APIENTRY ! # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) ! # { ! # __hDllInstance_base = hInst; ! # return TRUE; ! # } ! # /* ltdll.c ends here */ ! ])# _LT_AC_FILE_LTDLL_C ! ! ! # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) ! # --------------------------------- ! AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) ! ! ! # old names ! AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) ! AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) ! AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) ! AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) ! AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) ! AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) ! AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) ! ! # This is just to silence aclocal about the macro not being used ! ifelse([AC_DISABLE_FAST_INSTALL]) ! ! AC_DEFUN([LT_AC_PROG_GCJ], ! [AC_CHECK_TOOL(GCJ, gcj, no) ! test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" ! AC_SUBST(GCJFLAGS) ]) ! ! AC_DEFUN([LT_AC_PROG_RC], ! [AC_CHECK_TOOL(RC, windres, no) ]) ! ############################################################ ! # NOTE: This macro has been submitted for inclusion into # ! # GNU Autoconf as AC_PROG_SED. When it is available in # ! # a released version of Autoconf we should remove this # ! # macro and use it instead. # ! ############################################################ ! # LT_AC_PROG_SED ! # -------------- ! # Check for a fully-functional sed program, that truncates ! # as few characters as possible. Prefer GNU sed if found. ! AC_DEFUN([LT_AC_PROG_SED], ! [AC_MSG_CHECKING([for a sed that does not truncate output]) ! AC_CACHE_VAL(lt_cv_path_SED, ! [# Loop through the user's path and test for sed and gsed. ! # Then use that list of sed's as ones to test for truncation. ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for lt_ac_prog in sed gsed; do ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then ! lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" ! fi ! done ! done ! done ! lt_ac_max=0 ! lt_ac_count=0 ! # Add /usr/xpg4/bin/sed as it is typically found on Solaris ! # along with /bin/sed that truncates output. ! for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do ! test ! -f $lt_ac_sed && break ! cat /dev/null > conftest.in ! lt_ac_count=0 ! echo $ECHO_N "0123456789$ECHO_C" >conftest.in ! # Check for GNU sed and select it if it is found. ! if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then ! lt_cv_path_SED=$lt_ac_sed ! break ! fi ! while true; do ! cat conftest.in conftest.in >conftest.tmp ! mv conftest.tmp conftest.in ! cp conftest.in conftest.nl ! echo >>conftest.nl ! $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break ! cmp -s conftest.out conftest.nl || break ! # 10000 chars as input seems more than enough ! test $lt_ac_count -gt 10 && break ! lt_ac_count=`expr $lt_ac_count + 1` ! if test $lt_ac_count -gt $lt_ac_max; then ! lt_ac_max=$lt_ac_count ! lt_cv_path_SED=$lt_ac_sed ! fi ! done ! done ! SED=$lt_cv_path_SED ! ]) ! AC_MSG_RESULT([$SED]) ! ]) ! ## ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*- ! ## Copyright (C) 1999-2000 Free Software Foundation, Inc. ! ## ! ## This program is free software; you can redistribute it and/or modify ! ## it under the terms of the GNU General Public License as published by ! ## the Free Software Foundation; either version 2 of the License, or ! ## (at your option) any later version. ! ## ! ## This program is distributed in the hope that it will be useful, but ! ## WITHOUT ANY WARRANTY; without even the implied warranty of ! ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! ## General Public License for more details. ! ## ! ## You should have received a copy of the GNU General Public License ! ## along with this program; if not, write to the Free Software ! ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! ## ! ## As a special exception to the GNU General Public License, if you ! ## distribute this file as part of a program that contains a ! ## configuration script generated by Autoconf, you may include it under ! ## the same distribution terms that you use for the rest of that program. ! # serial 6 AC_LIB_LTDL ! # AC_WITH_LTDL ! # ------------ ! # Clients of libltdl can use this macro to allow the installer to ! # choose between a shipped copy of the ltdl sources or a preinstalled ! # version of the library. ! AC_DEFUN([AC_WITH_LTDL], ! [AC_REQUIRE([AC_LIB_LTDL]) ! AC_SUBST([LIBLTDL]) ! AC_SUBST([INCLTDL]) ! # Unless the user asks us to check, assume no installed ltdl exists. ! use_installed_libltdl=no ! ! AC_ARG_WITH([included_ltdl], ! [ --with-included-ltdl use the GNU ltdl sources included here]) ! ! if test "x$with_included_ltdl" != xyes; then ! # We are not being forced to use the included libltdl sources, so ! # decide whether there is a useful installed version we can use. ! AC_CHECK_HEADER([ltdl.h], ! [AC_CHECK_LIB([ltdl], [lt_dlcaller_register], ! [with_included_ltdl=no], ! [with_included_ltdl=yes]) ! ]) ! fi ! ! if test "x$enable_ltdl_install" != xyes; then ! # If the user did not specify an installable libltdl, then default ! # to a convenience lib. ! AC_LIBLTDL_CONVENIENCE ! fi ! ! if test "x$with_included_ltdl" = xno; then ! # If the included ltdl is not to be used. then Use the ! # preinstalled libltdl we found. ! AC_DEFINE([HAVE_LTDL], 1, ! [Define this if a modern libltdl is already installed]) ! LIBLTDL=-lltdl ! fi ! ! # Report our decision... ! AC_MSG_CHECKING([whether to use included libltdl]) ! AC_MSG_RESULT([$with_included_ltdl]) ! ! AC_CONFIG_SUBDIRS([libltdl]) ! ])# AC_WITH_LTDL ! ! ! # AC_LIB_LTDL ! # ----------- ! # Perform all the checks necessary for compilation of the ltdl objects ! # -- including compiler checks and header checks. ! AC_DEFUN([AC_LIB_LTDL], ! [AC_PREREQ(2.50) ! AC_REQUIRE([AC_PROG_CC]) ! AC_REQUIRE([AC_C_CONST]) ! AC_REQUIRE([AC_HEADER_STDC]) ! AC_REQUIRE([AC_HEADER_DIRENT]) ! AC_REQUIRE([_LT_AC_CHECK_DLFCN]) ! AC_REQUIRE([AC_LTDL_ENABLE_INSTALL]) ! AC_REQUIRE([AC_LTDL_SHLIBEXT]) ! AC_REQUIRE([AC_LTDL_SHLIBPATH]) ! AC_REQUIRE([AC_LTDL_SYSSEARCHPATH]) ! AC_REQUIRE([AC_LTDL_OBJDIR]) ! AC_REQUIRE([AC_LTDL_DLPREOPEN]) ! AC_REQUIRE([AC_LTDL_DLLIB]) ! AC_REQUIRE([AC_LTDL_SYMBOL_USCORE]) ! AC_REQUIRE([AC_LTDL_DLSYM_USCORE]) ! AC_REQUIRE([AC_LTDL_SYS_DLOPEN_DEPLIBS]) ! AC_REQUIRE([AC_LTDL_FUNC_ARGZ]) ! ! AC_CHECK_HEADERS([assert.h ctype.h errno.h malloc.h memory.h stdlib.h \ ! stdio.h unistd.h]) ! AC_CHECK_HEADERS([dl.h sys/dl.h dld.h mach-o/dyld.h]) ! AC_CHECK_HEADERS([string.h strings.h], [break]) ! ! AC_CHECK_FUNCS([strchr index], [break]) ! AC_CHECK_FUNCS([strrchr rindex], [break]) ! AC_CHECK_FUNCS([memcpy bcopy], [break]) ! AC_CHECK_FUNCS([memmove strcmp]) ! AC_CHECK_FUNCS([closedir opendir readdir]) ! ])# AC_LIB_LTDL ! ! ! # AC_LTDL_ENABLE_INSTALL ! # ---------------------- ! AC_DEFUN([AC_LTDL_ENABLE_INSTALL], ! [AC_ARG_ENABLE([ltdl-install], ! [AC_HELP_STRING([--enable-ltdl-install], [install libltdl])]) ! ! AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno) ! AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno) ! ])])# AC_LTDL_ENABLE_INSTALL ! ! ! # AC_LTDL_SYS_DLOPEN_DEPLIBS ! # -------------------------- ! AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], ! [AC_REQUIRE([AC_CANONICAL_HOST]) ! AC_CACHE_CHECK([whether deplibs are loaded by dlopen], ! [libltdl_cv_sys_dlopen_deplibs], ! [# PORTME does your system automatically load deplibs for dlopen? ! # or its logical equivalent (e.g. shl_load for HP-UX < 11) ! # For now, we just catch OSes we know something about -- in the ! # future, we'll try test this programmatically. ! libltdl_cv_sys_dlopen_deplibs=unknown ! case "$host_os" in ! aix3*|aix4.1.*|aix4.2.*) ! # Unknown whether this is true for these versions of AIX, but ! # we want this `case' here to explicitly catch those versions. ! libltdl_cv_sys_dlopen_deplibs=unknown ! ;; ! aix[[45]]*) ! libltdl_cv_sys_dlopen_deplibs=yes ! ;; ! darwin*) ! # Assuming the user has installed a libdl from somewhere, this is true ! # If you are looking for one http://www.opendarwin.org/projects/dlcompat ! libltdl_cv_sys_dlopen_deplibs=yes ! ;; ! gnu*) ! libltdl_cv_sys_dlopen_deplibs=yes ! ;; ! hpux10*|hpux11*) ! libltdl_cv_sys_dlopen_deplibs=yes ! ;; ! irix[[12345]]*|irix6.[[01]]*) ! # Catch all versions of IRIX before 6.2, and indicate that we don't ! # know how it worked for any of those versions. ! libltdl_cv_sys_dlopen_deplibs=unknown ! ;; ! irix*) ! # The case above catches anything before 6.2, and it's known that ! # at 6.2 and later dlopen does load deplibs. ! libltdl_cv_sys_dlopen_deplibs=yes ! ;; ! linux*) ! libltdl_cv_sys_dlopen_deplibs=yes ! ;; ! netbsd*) ! libltdl_cv_sys_dlopen_deplibs=yes ! ;; ! openbsd*) ! libltdl_cv_sys_dlopen_deplibs=yes ! ;; ! osf[[1234]]*) ! # dlopen did load deplibs (at least at 4.x), but until the 5.x series, ! # it did *not* use an RPATH in a shared library to find objects the ! # library depends on, so we explictly say `no'. ! libltdl_cv_sys_dlopen_deplibs=no ! ;; ! osf5.0|osf5.0a|osf5.1) ! # dlopen *does* load deplibs and with the right loader patch applied ! # it even uses RPATH in a shared library to search for shared objects ! # that the library depends on, but there's no easy way to know if that ! # patch is installed. Since this is the case, all we can really ! # say is unknown -- it depends on the patch being installed. If ! # it is, this changes to `yes'. Without it, it would be `no'. ! libltdl_cv_sys_dlopen_deplibs=unknown ! ;; ! osf*) ! # the two cases above should catch all versions of osf <= 5.1. Read ! # the comments above for what we know about them. ! # At > 5.1, deplibs are loaded *and* any RPATH in a shared library ! # is used to find them so we can finally say `yes'. ! libltdl_cv_sys_dlopen_deplibs=yes ! ;; ! solaris*) ! libltdl_cv_sys_dlopen_deplibs=yes ! ;; ! esac ! ]) ! if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then ! AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1], ! [Define if the OS needs help to load dependent libraries for dlopen().]) ! fi ! ])# AC_LTDL_SYS_DLOPEN_DEPLIBS ! ! ! # AC_LTDL_SHLIBEXT ! # ---------------- ! AC_DEFUN([AC_LTDL_SHLIBEXT], ! [AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) ! AC_CACHE_CHECK([which extension is used for loadable modules], ! [libltdl_cv_shlibext], ! [ ! # Here in libltdl for libgcj we don't build modules for darwin. ! # So we say no. Then the extension gets .dylib which is the right ! # thing for shared libraries on darwin. ! case "$host_os" in ! darwin*) ! module=no ! ;; ! *) ! module=yes ! ;; ! esac ! eval libltdl_cv_shlibext=$shrext ! ]) ! if test -n "$libltdl_cv_shlibext"; then ! AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext", ! [Define to the extension used for shared libraries, say, ".so".]) ! fi ! ])# AC_LTDL_SHLIBEXT ! ! ! # AC_LTDL_SHLIBPATH ! # ----------------- ! AC_DEFUN([AC_LTDL_SHLIBPATH], ! [AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) ! AC_CACHE_CHECK([which variable specifies run-time library path], ! [libltdl_cv_shlibpath_var], [libltdl_cv_shlibpath_var="$shlibpath_var"]) ! if test -n "$libltdl_cv_shlibpath_var"; then ! AC_DEFINE_UNQUOTED(LTDL_SHLIBPATH_VAR, "$libltdl_cv_shlibpath_var", ! [Define to the name of the environment variable that determines the dynamic library search path.]) ! fi ! ])# AC_LTDL_SHLIBPATH ! ! ! # AC_LTDL_SYSSEARCHPATH ! # --------------------- ! AC_DEFUN([AC_LTDL_SYSSEARCHPATH], ! [AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) ! AC_CACHE_CHECK([for the default library search path], ! [libltdl_cv_sys_search_path], ! [libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec"]) ! if test -n "$libltdl_cv_sys_search_path"; then ! sys_search_path= ! for dir in $libltdl_cv_sys_search_path; do ! if test -z "$sys_search_path"; then ! sys_search_path="$dir" ! else ! sys_search_path="$sys_search_path$PATH_SEPARATOR$dir" ! fi ! done ! AC_DEFINE_UNQUOTED(LTDL_SYSSEARCHPATH, "$sys_search_path", ! [Define to the system default library search path.]) ! fi ! ])# AC_LTDL_SYSSEARCHPATH ! ! ! # AC_LTDL_OBJDIR ! # -------------- ! AC_DEFUN([AC_LTDL_OBJDIR], ! [AC_CACHE_CHECK([for objdir], ! [libltdl_cv_objdir], ! [libltdl_cv_objdir="$objdir" ! if test -n "$objdir"; then ! : ! else ! rm -f .libs 2>/dev/null ! mkdir .libs 2>/dev/null ! if test -d .libs; then ! libltdl_cv_objdir=.libs ! else ! # MS-DOS does not allow filenames that begin with a dot. ! libltdl_cv_objdir=_libs ! fi ! rmdir .libs 2>/dev/null ! fi ! ]) ! AC_DEFINE_UNQUOTED(LTDL_OBJDIR, "$libltdl_cv_objdir/", ! [Define to the sub-directory in which libtool stores uninstalled libraries.]) ! ])# AC_LTDL_OBJDIR ! ! ! # AC_LTDL_DLPREOPEN ! # ----------------- ! AC_DEFUN([AC_LTDL_DLPREOPEN], ! [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE]) ! AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen], ! [libltdl_cv_preloaded_symbols], ! [if test -n "$lt_cv_sys_global_symbol_pipe"; then ! libltdl_cv_preloaded_symbols=yes ! else ! libltdl_cv_preloaded_symbols=no ! fi ! ]) ! if test x"$libltdl_cv_preloaded_symbols" = xyes; then ! AC_DEFINE(HAVE_PRELOADED_SYMBOLS, 1, ! [Define if libtool can extract symbol lists from object files.]) ! fi ! ])# AC_LTDL_DLPREOPEN ! ! ! # AC_LTDL_DLLIB ! # ------------- ! AC_DEFUN([AC_LTDL_DLLIB], ! [LIBADD_DL= ! AC_SUBST(LIBADD_DL) ! AC_LANG_PUSH([C]) ! ! AC_CHECK_FUNC([shl_load], ! [AC_DEFINE([HAVE_SHL_LOAD], [1], ! [Define if you have the shl_load function.])], ! [AC_CHECK_LIB([dld], [shl_load], ! [AC_DEFINE([HAVE_SHL_LOAD], [1], ! [Define if you have the shl_load function.]) ! LIBADD_DL="$LIBADD_DL -ldld"], ! [AC_CHECK_LIB([dl], [dlopen], ! [AC_DEFINE([HAVE_LIBDL], [1], ! [Define if you have the libdl library or equivalent.]) ! LIBADD_DL="-ldl" libltdl_cv_lib_dl_dlopen="yes"], ! [AC_TRY_LINK([#if HAVE_DLFCN_H ! # include #endif + ], + [dlopen(0, 0);], + [AC_DEFINE([HAVE_LIBDL], [1], + [Define if you have the libdl library or equivalent.]) libltdl_cv_func_dlopen="yes"], + [AC_CHECK_LIB([svld], [dlopen], + [AC_DEFINE([HAVE_LIBDL], [1], + [Define if you have the libdl library or equivalent.]) + LIBADD_DL="-lsvld" libltdl_cv_func_dlopen="yes"], + [AC_CHECK_LIB([dld], [dld_link], + [AC_DEFINE([HAVE_DLD], [1], + [Define if you have the GNU dld library.]) + LIBADD_DL="$LIBADD_DL -ldld"], + [AC_CHECK_FUNC([_dyld_func_lookup], + [AC_DEFINE([HAVE_DYLD], [1], + [Define if you have the _dyld_func_lookup function.])]) + ]) + ]) + ]) + ]) + ]) + ]) ! if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes ! then ! lt_save_LIBS="$LIBS" ! LIBS="$LIBS $LIBADD_DL" ! AC_CHECK_FUNCS([dlerror]) ! LIBS="$lt_save_LIBS" ! fi ! AC_LANG_POP ! ])# AC_LTDL_DLLIB ! ! ! # AC_LTDL_SYMBOL_USCORE ! # --------------------- ! # does the compiler prefix global symbols with an underscore? ! AC_DEFUN([AC_LTDL_SYMBOL_USCORE], ! [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE]) ! AC_CACHE_CHECK([for _ prefix in compiled symbols], ! [ac_cv_sys_symbol_underscore], ! [ac_cv_sys_symbol_underscore=no ! cat > conftest.$ac_ext < $ac_nlist) && test -s "$ac_nlist"; then ! # See whether the symbols have a leading underscore. ! if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then ! ac_cv_sys_symbol_underscore=yes ! else ! if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then ! : ! else ! echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC ! fi ! fi ! else ! echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC ! fi ! else ! echo "configure: failed program was:" >&AC_FD_CC ! cat conftest.c >&AC_FD_CC ! fi ! rm -rf conftest* ! ]) ! ])# AC_LTDL_SYMBOL_USCORE ! ! ! # AC_LTDL_DLSYM_USCORE ! # -------------------- ! AC_DEFUN([AC_LTDL_DLSYM_USCORE], ! [AC_REQUIRE([AC_LTDL_SYMBOL_USCORE]) ! if test x"$ac_cv_sys_symbol_underscore" = xyes; then ! if test x"$libltdl_cv_func_dlopen" = xyes || ! test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then ! AC_CACHE_CHECK([whether we have to add an underscore for dlsym], ! [libltdl_cv_need_uscore], ! [libltdl_cv_need_uscore=unknown ! save_LIBS="$LIBS" ! LIBS="$LIBS $LIBADD_DL" ! _LT_AC_TRY_DLOPEN_SELF( ! [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes], ! [], [libltdl_cv_need_uscore=cross]) ! LIBS="$save_LIBS" ! ]) fi fi if test x"$libltdl_cv_need_uscore" = xyes; then AC_DEFINE(NEED_USCORE, 1, ! [Define if dlsym() requires a leading underscore in symbol names.]) fi ! ])# AC_LTDL_DLSYM_USCORE ! ! # AC_LTDL_FUNC_ARGZ ! # ----------------- ! AC_DEFUN([AC_LTDL_FUNC_ARGZ], ! [AC_CHECK_HEADERS([argz.h]) ! ! AC_CHECK_TYPES([error_t], ! [], ! [AC_DEFINE([error_t], [int], ! [Define to a type to use for `error_t' if it is not otherwise available.])], ! [#if HAVE_ARGZ_H ! # include ! #endif]) ! ! AC_CHECK_FUNCS([argz_append argz_create_sep argz_insert argz_next argz_stringify]) ! ])# AC_LTDL_FUNC_ARGZ diff -Nrc3pad gcc-3.3.3/libjava/libltdl/aclocal.m4 gcc-3.4.0/libjava/libltdl/aclocal.m4 *** gcc-3.3.3/libjava/libltdl/aclocal.m4 2004-02-14 20:34:20.000000000 +0000 --- gcc-3.4.0/libjava/libltdl/aclocal.m4 2004-04-19 02:23:04.000000000 +0000 *************** *** 1,23 **** ! dnl aclocal.m4 generated automatically by aclocal 1.4 ! dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. ! dnl This file is free software; the Free Software Foundation ! dnl gives unlimited permission to copy and/or distribute it, ! dnl with or without modifications, as long as this notice is preserved. ! dnl This program is distributed in the hope that it will be useful, ! dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without ! dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A ! dnl PARTICULAR PURPOSE. ! # serial 45 AC_PROG_LIBTOOL ! AC_DEFUN(AC_PROG_LIBTOOL,[AC_REQUIRE([_AC_PROG_LIBTOOL]) dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. --- 1,45 ---- ! # generated automatically by aclocal 1.7.9 -*- Autoconf -*- ! # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 ! # Free Software Foundation, Inc. ! # This file is free software; the Free Software Foundation ! # gives unlimited permission to copy and/or distribute it, ! # with or without modifications, as long as this notice is preserved. ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY, to the extent permitted by law; without ! # even the implied warranty of MERCHANTABILITY or FITNESS FOR A ! # PARTICULAR PURPOSE. + # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- ! # serial 47 AC_PROG_LIBTOOL ! ! ! # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) ! # ----------------------------------------------------------- ! # If this macro is not defined by Autoconf, define it here. ! m4_ifdef([AC_PROVIDE_IFELSE], ! [], ! [m4_define([AC_PROVIDE_IFELSE], ! [m4_ifdef([AC_PROVIDE_$1], ! [$2], [$3])])]) ! ! ! # AC_PROG_LIBTOOL ! # --------------- ! AC_DEFUN([AC_PROG_LIBTOOL], ! [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX + ])]) + dnl And a similar setup for Fortran 77 support + AC_PROVIDE_IFELSE([AC_PROG_F77], + [AC_LIBTOOL_F77], + [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. *************** dnl AC_LIBTOOL_GCJ immediately, otherwis *** 26,75 **** AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], ! [AC_LIBTOOL_GCJ], ! [ifdef([AC_PROG_GCJ], ! [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ ! ])]) ! ifdef([A][M_PROG_GCJ], ! [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ ! ])])])])]) ! AC_DEFUN(_AC_PROG_LIBTOOL, [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl - # Save cache, so that ltconfig can load it - AC_CACHE_SAVE - - # Actually configure libtool. ac_aux_dir is where install-sh is found. - AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ - MAGIC="$MAGIC" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ - LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \ - AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \ - objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \ - deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \ - ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ - $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \ - || AC_MSG_ERROR([libtool configure failed]) - - # Reload cache, that may have been modified by ltconfig - AC_CACHE_LOAD - # This can be used to rebuild libtool when needed ! LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl ! # Redirect the config.log output again, so that the ltconfig log is not ! # clobbered by the next message. ! exec 5>>./config.log ! ]) ! AC_DEFUN(AC_LIBTOOL_SETUP, ! [AC_PREREQ(2.13)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl --- 48,90 ---- AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], ! [AC_LIBTOOL_GCJ], ! [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], ! [AC_LIBTOOL_GCJ], ! [ifdef([AC_PROG_GCJ], ! [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ! ifdef([A][M_PROG_GCJ], ! [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ! ifdef([LT_AC_PROG_GCJ], ! [define([LT_AC_PROG_GCJ], ! defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ! ])])# AC_PROG_LIBTOOL ! ! # _AC_PROG_LIBTOOL ! # ---------------- ! AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl + AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed ! LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl ! # Prevent multiple expansion ! define([AC_PROG_LIBTOOL], []) ! ])# _AC_PROG_LIBTOOL ! ! # AC_LIBTOOL_SETUP ! # ---------------- ! AC_DEFUN([AC_LIBTOOL_SETUP], ! [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl *************** AC_REQUIRE([AC_PROG_CC])dnl *** 79,84 **** --- 94,100 ---- AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl + AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! *************** AC_REQUIRE([AC_OBJEXT])dnl *** 86,133 **** AC_REQUIRE([AC_EXEEXT])dnl dnl # Only perform the check for file, if the check method requires it ! case "$deplibs_check_method" in file_magic*) ! if test "$file_magic_cmd" = '${MAGIC}'; then AC_PATH_MAGIC fi ;; esac ! AC_CHECK_TOOL(RANLIB, ranlib, :) ! AC_CHECK_TOOL(STRIP, strip, :) ! # Check for any special flags to pass to ltconfig. ! libtool_flags="--cache-file=$cache_file" ! test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" ! test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" ! test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" ! test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" ! test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" ! ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], ! [libtool_flags="$libtool_flags --enable-dlopen"]) ! ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], ! [libtool_flags="$libtool_flags --enable-win32-dll"]) ! AC_ARG_ENABLE(libtool-lock, ! [ --disable-libtool-lock avoid locking (might break parallel builds)]) ! test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" ! test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" ! AC_ARG_WITH(pic, ! [ --with-pic try to use only PIC/non-PIC objects [default=use both]], ! pic_mode="$withval", pic_mode=default) ! test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic" ! test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" # Some flags need to be propagated to the compiler or linker for good # libtool support. ! case "$host" in *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then ! case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" ;; --- 102,471 ---- AC_REQUIRE([AC_EXEEXT])dnl dnl + AC_LIBTOOL_SYS_MAX_CMD_LEN + AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE + AC_LIBTOOL_OBJDIR + + AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl + _LT_AC_PROG_ECHO_BACKSLASH + + case $host_os in + aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; + esac + + # Sed substitution that helps us do robust quoting. It backslashifies + # metacharacters that are still active within double-quoted strings. + Xsed='sed -e s/^X//' + [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] + + # Same as above, but do not quote variable references. + [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] + + # Sed substitution to delay expansion of an escaped shell variable in a + # double_quote_subst'ed string. + delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + + # Sed substitution to avoid accidental globbing in evaled expressions + no_glob_subst='s/\*/\\\*/g' + + # Constants: + rm="rm -f" + + # Global variables: + default_ofile=libtool + can_build_shared=yes + + # All known linkers require a `.a' archive for static linking (except M$VC, + # which needs '.lib'). + libext=a + ltmain="$ac_aux_dir/ltmain.sh" + ofile="$default_ofile" + with_gnu_ld="$lt_cv_prog_gnu_ld" + + AC_CHECK_TOOL(AR, ar, false) + AC_CHECK_TOOL(RANLIB, ranlib, :) + AC_CHECK_TOOL(STRIP, strip, :) + + old_CC="$CC" + old_CFLAGS="$CFLAGS" + + # Set sane defaults for various variables + test -z "$AR" && AR=ar + test -z "$AR_FLAGS" && AR_FLAGS=cru + test -z "$AS" && AS=as + test -z "$CC" && CC=cc + test -z "$LTCC" && LTCC=$CC + test -z "$DLLTOOL" && DLLTOOL=dlltool + test -z "$LD" && LD=ld + test -z "$LN_S" && LN_S="ln -s" + test -z "$MAGIC_CMD" && MAGIC_CMD=file + test -z "$NM" && NM=nm + test -z "$SED" && SED=sed + test -z "$OBJDUMP" && OBJDUMP=objdump + test -z "$RANLIB" && RANLIB=: + test -z "$STRIP" && STRIP=: + test -z "$ac_objext" && ac_objext=o + + # Determine commands to create old-style static archives. + old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' + old_postinstall_cmds='chmod 644 $oldlib' + old_postuninstall_cmds= + + if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" + ;; + *) + old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + fi + # Only perform the check for file, if the check method requires it ! case $deplibs_check_method in file_magic*) ! if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac ! AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) ! AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], ! enable_win32_dll=yes, enable_win32_dll=no) ! AC_ARG_ENABLE([libtool-lock], ! [AC_HELP_STRING([--disable-libtool-lock], ! [avoid locking (might break parallel builds)])]) ! test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes ! AC_ARG_WITH([pic], ! [AC_HELP_STRING([--with-pic], ! [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], ! [pic_mode="$withval"], ! [pic_mode=default]) ! test -z "$pic_mode" && pic_mode=default ! ! # Use C for the default configuration in the libtool script ! tagname= ! AC_LIBTOOL_LANG_C_CONFIG ! _LT_AC_TAGCONFIG ! ])# AC_LIBTOOL_SETUP ! ! ! # _LT_AC_SYS_COMPILER ! # ------------------- ! AC_DEFUN([_LT_AC_SYS_COMPILER], ! [AC_REQUIRE([AC_PROG_CC])dnl ! ! # If no C compiler was specified, use CC. ! LTCC=${LTCC-"$CC"} ! ! # Allow CC to be a program name with arguments. ! compiler=$CC ! ])# _LT_AC_SYS_COMPILER ! ! ! # _LT_AC_SYS_LIBPATH_AIX ! # ---------------------- ! # Links a minimal program and checks the executable ! # for the system default hardcoded library path. In most cases, ! # this is /usr/lib:/lib, but when the MPI compilers are used ! # the location of the communication and MPI libs are included too. ! # If we don't find anything, use the default library path according ! # to the aix ld manual. ! AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], ! [AC_LINK_IFELSE(AC_LANG_PROGRAM,[ ! aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } ! }'` ! # Check for a 64-bit object if we didn't find anything. ! if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } ! }'`; fi],[]) ! if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ! ])# _LT_AC_SYS_LIBPATH_AIX ! ! ! # _LT_AC_SHELL_INIT(ARG) ! # ---------------------- ! AC_DEFUN([_LT_AC_SHELL_INIT], ! [ifdef([AC_DIVERSION_NOTICE], ! [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], ! [AC_DIVERT_PUSH(NOTICE)]) ! $1 ! AC_DIVERT_POP ! ])# _LT_AC_SHELL_INIT ! ! ! # _LT_AC_PROG_ECHO_BACKSLASH ! # -------------------------- ! # Add some code to the start of the generated configure script which ! # will find an echo command which doesn't interpret backslashes. ! AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], ! [_LT_AC_SHELL_INIT([ ! # Check that we are running under the correct shell. ! SHELL=${CONFIG_SHELL-/bin/sh} ! ! case X$ECHO in ! X*--fallback-echo) ! # Remove one level of quotation (which was required for Make). ! ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ! ;; ! esac ! ! echo=${ECHO-echo} ! if test "X[$]1" = X--no-reexec; then ! # Discard the --no-reexec flag, and continue. ! shift ! elif test "X[$]1" = X--fallback-echo; then ! # Avoid inline document here, it may be left over ! : ! elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then ! # Yippee, $echo works! ! : ! else ! # Restart under the correct shell. ! exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} ! fi ! ! if test "X[$]1" = X--fallback-echo; then ! # used as fallback echo ! shift ! cat </dev/null && ! echo_test_string="`eval $cmd`" && ! (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null ! then ! break ! fi ! done ! fi ! ! if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && ! echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && ! test "X$echo_testing_string" = "X$echo_test_string"; then ! : ! else ! # The Solaris, AIX, and Digital Unix default echo programs unquote ! # backslashes. This makes it impossible to quote backslashes using ! # echo "$something" | sed 's/\\/\\\\/g' ! # ! # So, first we look for a working echo in the user's PATH. ! ! lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ! for dir in $PATH /usr/ucb; do ! IFS="$lt_save_ifs" ! if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && ! test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && ! echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && ! test "X$echo_testing_string" = "X$echo_test_string"; then ! echo="$dir/echo" ! break ! fi ! done ! IFS="$lt_save_ifs" ! ! if test "X$echo" = Xecho; then ! # We didn't find a better echo, so look for alternatives. ! if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && ! echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && ! test "X$echo_testing_string" = "X$echo_test_string"; then ! # This shell has a builtin print -r that does the trick. ! echo='print -r' ! elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && ! test "X$CONFIG_SHELL" != X/bin/ksh; then ! # If we have ksh, try running configure again with it. ! ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} ! export ORIGINAL_CONFIG_SHELL ! CONFIG_SHELL=/bin/ksh ! export CONFIG_SHELL ! exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} ! else ! # Try using printf. ! echo='printf %s\n' ! if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && ! echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && ! test "X$echo_testing_string" = "X$echo_test_string"; then ! # Cool, printf works ! : ! elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && ! test "X$echo_testing_string" = 'X\t' && ! echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && ! test "X$echo_testing_string" = "X$echo_test_string"; then ! CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL ! export CONFIG_SHELL ! SHELL="$CONFIG_SHELL" ! export SHELL ! echo="$CONFIG_SHELL [$]0 --fallback-echo" ! elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && ! test "X$echo_testing_string" = 'X\t' && ! echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && ! test "X$echo_testing_string" = "X$echo_test_string"; then ! echo="$CONFIG_SHELL [$]0 --fallback-echo" ! else ! # maybe with a smaller string... ! prev=: ! ! for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do ! if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null ! then ! break ! fi ! prev="$cmd" ! done ! ! if test "$prev" != 'sed 50q "[$]0"'; then ! echo_test_string=`eval $prev` ! export echo_test_string ! exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} ! else ! # Oops. We lost completely, so just stick with echo. ! echo=echo ! fi ! fi ! fi ! fi ! fi ! fi ! ! # Copy echo and quote the copy suitably for passing to libtool from ! # the Makefile, instead of quoting the original, which is used later. ! ECHO=$echo ! if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ! ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" ! fi ! ! AC_SUBST(ECHO) ! ])])# _LT_AC_PROG_ECHO_BACKSLASH ! ! ! # _LT_AC_LOCK ! # ----------- ! AC_DEFUN([_LT_AC_LOCK], ! [AC_ARG_ENABLE([libtool-lock], ! [AC_HELP_STRING([--disable-libtool-lock], ! [avoid locking (might break parallel builds)])]) ! test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. ! case $host in ! ia64-*-hpux*) ! # Find out which ABI we are using. ! echo 'int i;' > conftest.$ac_ext ! if AC_TRY_EVAL(ac_compile); then ! case `/usr/bin/file conftest.$ac_objext` in ! *ELF-32*) ! HPUX_IA64_MODE="32" ! ;; ! *ELF-64*) ! HPUX_IA64_MODE="64" ! ;; ! esac ! fi ! rm -rf conftest* ! ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then ! if test "$lt_cv_prog_gnu_ld" = yes; then ! case `/usr/bin/file conftest.$ac_objext` in ! *32-bit*) ! LD="${LD-ld} -melf32bsmip" ! ;; ! *N32*) ! LD="${LD-ld} -melf32bmipn32" ! ;; ! *64-bit*) ! LD="${LD-ld} -melf64bmip" ! ;; ! esac ! else ! case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *************** case "$host" in *** 138,143 **** --- 476,524 ---- LD="${LD-ld} -64" ;; esac + fi + fi + rm -rf conftest* + ;; + + x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case "`/usr/bin/file conftest.o`" in + *32-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac fi rm -rf conftest* ;; *************** case "$host" in *** 147,338 **** SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, ! [AC_LANG_SAVE ! AC_LANG_C AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) ! AC_LANG_RESTORE]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; ! ! ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], ! [*-*-cygwin* | *-*-mingw*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) - - # recent cygwin and mingw systems supply a stub DllMain which the user - # can override, but on older systems we have to supply one - AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain, - [AC_TRY_LINK([], - [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); - DllMain (0, 0, 0);], - [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])]) - - case "$host/$CC" in - *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) - # old mingw systems require "-dll" to link a DLL, while more recent ones - # require "-mdll" - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -mdll" - AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch, - [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])]) - CFLAGS="$SAVE_CFLAGS" ;; - *-*-cygwin*) - # cygwin systems need to pass --dll to the linker, and not link - # crt.o which will require a WinMain@16 definition. - lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; - esac ;; ]) esac ]) ! # AC_LIBTOOL_DLOPEN - enable checks for dlopen support ! AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) - # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's - AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) ! # AC_ENABLE_SHARED - implement the --enable-shared flag ! # Usage: AC_ENABLE_SHARED[(DEFAULT)] ! # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to ! # `yes'. ! AC_DEFUN(AC_ENABLE_SHARED, [dnl ! define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl ! AC_ARG_ENABLE(shared, ! changequote(<<, >>)dnl ! << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], ! changequote([, ])dnl ! [p=${PACKAGE-default} ! case "$enableval" in ! yes) enable_shared=yes ;; ! no) enable_shared=no ;; ! *) ! enable_shared=no ! # Look at the argument we got. We use all the common list separators. ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," ! for pkg in $enableval; do ! if test "X$pkg" = "X$p"; then ! enable_shared=yes ! fi ! done ! IFS="$ac_save_ifs" ! ;; ! esac], ! enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl ]) ! # AC_DISABLE_SHARED - set the default shared flag to --disable-shared ! AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl ! AC_ENABLE_SHARED(no)]) ! # AC_ENABLE_STATIC - implement the --enable-static flag ! # Usage: AC_ENABLE_STATIC[(DEFAULT)] ! # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to ! # `yes'. ! AC_DEFUN(AC_ENABLE_STATIC, [dnl ! define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl ! AC_ARG_ENABLE(static, ! changequote(<<, >>)dnl ! << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], ! changequote([, ])dnl ! [p=${PACKAGE-default} ! case "$enableval" in ! yes) enable_static=yes ;; ! no) enable_static=no ;; ! *) ! enable_static=no ! # Look at the argument we got. We use all the common list separators. ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," ! for pkg in $enableval; do ! if test "X$pkg" = "X$p"; then ! enable_static=yes fi ! done ! IFS="$ac_save_ifs" ! ;; ! esac], ! enable_static=AC_ENABLE_STATIC_DEFAULT)dnl ]) - # AC_DISABLE_STATIC - set the default static flag to --disable-static - AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_ENABLE_STATIC(no)]) ! # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag ! # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] ! # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to ! # `yes'. ! AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl ! define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl ! AC_ARG_ENABLE(fast-install, ! changequote(<<, >>)dnl ! << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], ! changequote([, ])dnl ! [p=${PACKAGE-default} ! case "$enableval" in ! yes) enable_fast_install=yes ;; ! no) enable_fast_install=no ;; ! *) enable_fast_install=no ! # Look at the argument we got. We use all the common list separators. ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," ! for pkg in $enableval; do ! if test "X$pkg" = "X$p"; then ! enable_fast_install=yes fi ! done ! IFS="$ac_save_ifs" ;; - esac], - enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl - ]) ! # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install ! AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl ! AC_ENABLE_FAST_INSTALL(no)]) ! # AC_LIBTOOL_PICMODE - implement the --with-pic flag ! # Usage: AC_LIBTOOL_PICMODE[(MODE)] ! # Where MODE is either `yes' or `no'. If omitted, it defaults to ! # `both'. ! AC_DEFUN(AC_LIBTOOL_PICMODE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl ! pic_mode=ifelse($#,1,$1,default)]) ! # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library ! AC_DEFUN(AC_PATH_TOOL_PREFIX, ! [AC_MSG_CHECKING([for $1]) ! AC_CACHE_VAL(lt_cv_path_MAGIC, ! [case "$MAGIC" in ! /*) ! lt_cv_path_MAGIC="$MAGIC" # Let the user override the test with a path. ;; ! ?:/*) ! ac_cv_path_MAGIC="$MAGIC" # Let the user override the test with a dos path. ;; *) ! ac_save_MAGIC="$MAGIC" ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then ! lt_cv_path_MAGIC="$ac_dir/$1" if test -n "$file_magic_test_file"; then ! case "$deplibs_check_method" in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" ! MAGIC="$lt_cv_path_MAGIC" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | ! egrep "$file_magic_regex" > /dev/null; then : else cat <&2 --- 528,1876 ---- SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, ! [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) ! AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; ! AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], ! [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac + + need_locks="$enable_libtool_lock" + + ])# _LT_AC_LOCK + + + # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, + # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) + # ---------------------------------------------------------------- + # Check whether the given compiler option works + AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], + [AC_CACHE_CHECK([$1], [$2], + [$2=no + ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s conftest.err; then + $2=yes + fi + fi + $rm conftest* ]) ! if test x"[$]$2" = xyes; then ! ifelse([$5], , :, [$5]) ! else ! ifelse([$6], , :, [$6]) ! fi ! ])# AC_LIBTOOL_COMPILER_OPTION ! # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, ! # [ACTION-SUCCESS], [ACTION-FAILURE]) ! # ------------------------------------------------------------ ! # Check whether the given compiler option works ! AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], ! [AC_CACHE_CHECK([$1], [$2], ! [$2=no ! save_LDFLAGS="$LDFLAGS" ! LDFLAGS="$LDFLAGS $3" ! printf "$lt_simple_link_test_code" > conftest.$ac_ext ! if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then ! # The compiler can only warn and ignore the option if not recognized ! # So say no if there are warnings ! if test -s conftest.err; then ! # Append any errors to the config.log. ! cat conftest.err 1>&AS_MESSAGE_LOG_FD ! else ! $2=yes ! fi ! fi ! $rm conftest* ! LDFLAGS="$save_LDFLAGS" ]) ! if test x"[$]$2" = xyes; then ! ifelse([$4], , :, [$4]) ! else ! ifelse([$5], , :, [$5]) ! fi ! ])# AC_LIBTOOL_LINKER_OPTION ! ! # AC_LIBTOOL_SYS_MAX_CMD_LEN ! # -------------------------- ! AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], ! [# find the maximum length of command line arguments ! AC_MSG_CHECKING([the maximum length of command line arguments]) ! AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl ! i=0 ! testring="ABCD" ! ! case $build_os in ! msdosdjgpp*) ! # On DJGPP, this test can blow up pretty badly due to problems in libc ! # (any single argument exceeding 2000 bytes causes a buffer overrun ! # during glob expansion). Even if it were fixed, the result of this ! # check would be larger than it should be. ! lt_cv_sys_max_cmd_len=12288; # 12K is about right ! ;; ! ! gnu*) ! # Under GNU Hurd, this test is not required because there is ! # no limit to the length of command line arguments. ! # Libtool will interpret -1 as no limit whatsoever ! lt_cv_sys_max_cmd_len=-1; ! ;; ! ! cygwin* | mingw*) ! # On Win9x/ME, this test blows up -- it succeeds, but takes ! # about 5 minutes as the teststring grows exponentially. ! # Worse, since 9x/ME are not pre-emptively multitasking, ! # you end up with a "frozen" computer, even though with patience ! # the test eventually succeeds (with a max line length of 256k). ! # Instead, let's just punt: use the minimum linelength reported by ! # all of the supported platforms: 8192 (on NT/2K/XP). ! lt_cv_sys_max_cmd_len=8192; ! ;; ! ! *) ! # If test is not a shell built-in, we'll probably end up computing a ! # maximum length that is only half of the actual maximum length, but ! # we can't tell. ! while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \ ! = "XX$testring") >/dev/null 2>&1 && ! new_result=`expr "X$testring" : ".*" 2>&1` && ! lt_cv_sys_max_cmd_len=$new_result && ! test $i != 17 # 1/2 MB should be enough ! do ! i=`expr $i + 1` ! testring=$testring$testring ! done ! testring= ! # Add a significant safety factor because C++ compilers can tack on massive ! # amounts of additional arguments before passing them to the linker. ! # It appears as though 1/2 is a usable value. ! lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ! ;; ! esac ! ]) ! if test -n $lt_cv_sys_max_cmd_len ; then ! AC_MSG_RESULT($lt_cv_sys_max_cmd_len) ! else ! AC_MSG_RESULT(none) ! fi ! ])# AC_LIBTOOL_SYS_MAX_CMD_LEN ! ! ! # _LT_AC_CHECK_DLFCN ! # -------------------- ! AC_DEFUN([_LT_AC_CHECK_DLFCN], ! [AC_CHECK_HEADERS(dlfcn.h)dnl ! ])# _LT_AC_CHECK_DLFCN ! ! ! # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, ! # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) ! # ------------------------------------------------------------------ ! AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], ! [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl ! if test "$cross_compiling" = yes; then : ! [$4] ! else ! lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 ! lt_status=$lt_dlunknown ! cat > conftest.$ac_ext < ! #endif ! ! #include ! ! #ifdef RTLD_GLOBAL ! # define LT_DLGLOBAL RTLD_GLOBAL ! #else ! # ifdef DL_GLOBAL ! # define LT_DLGLOBAL DL_GLOBAL ! # else ! # define LT_DLGLOBAL 0 ! # endif ! #endif ! ! /* We may have to define LT_DLLAZY_OR_NOW in the command line if we ! find out it does not work in some platform. */ ! #ifndef LT_DLLAZY_OR_NOW ! # ifdef RTLD_LAZY ! # define LT_DLLAZY_OR_NOW RTLD_LAZY ! # else ! # ifdef DL_LAZY ! # define LT_DLLAZY_OR_NOW DL_LAZY ! # else ! # ifdef RTLD_NOW ! # define LT_DLLAZY_OR_NOW RTLD_NOW ! # else ! # ifdef DL_NOW ! # define LT_DLLAZY_OR_NOW DL_NOW ! # else ! # define LT_DLLAZY_OR_NOW 0 ! # endif ! # endif ! # endif ! # endif ! #endif ! ! #ifdef __cplusplus ! extern "C" void exit (int); ! #endif ! ! void fnord() { int i=42;} ! int main () ! { ! void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); ! int status = $lt_dlunknown; ! ! if (self) ! { ! if (dlsym (self,"fnord")) status = $lt_dlno_uscore; ! else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; ! /* dlclose (self); */ ! } ! ! exit (status); ! }] ! EOF ! if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then ! (./conftest; exit; ) 2>/dev/null ! lt_status=$? ! case x$lt_status in ! x$lt_dlno_uscore) $1 ;; ! x$lt_dlneed_uscore) $2 ;; ! x$lt_unknown|x*) $3 ;; ! esac ! else : ! # compilation failed ! $3 ! fi ! fi ! rm -fr conftest* ! ])# _LT_AC_TRY_DLOPEN_SELF ! ! ! # AC_LIBTOOL_DLOPEN_SELF ! # ------------------- ! AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], ! [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl ! if test "x$enable_dlopen" != xyes; then ! enable_dlopen=unknown ! enable_dlopen_self=unknown ! enable_dlopen_self_static=unknown ! else ! lt_cv_dlopen=no ! lt_cv_dlopen_libs= ! ! case $host_os in ! beos*) ! lt_cv_dlopen="load_add_on" ! lt_cv_dlopen_libs= ! lt_cv_dlopen_self=yes ! ;; ! ! mingw* | pw32*) ! lt_cv_dlopen="LoadLibrary" ! lt_cv_dlopen_libs= ! ;; ! ! cygwin*) ! lt_cv_dlopen="dlopen" ! lt_cv_dlopen_libs= ! ;; ! ! darwin*) ! # if libdl is installed we need to link against it ! AC_CHECK_LIB([dl], [dlopen], ! [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ ! lt_cv_dlopen="dyld" ! lt_cv_dlopen_libs= ! lt_cv_dlopen_self=yes ! ]) ! ;; ! ! *) ! AC_CHECK_FUNC([shl_load], ! [lt_cv_dlopen="shl_load"], ! [AC_CHECK_LIB([dld], [shl_load], ! [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], ! [AC_CHECK_FUNC([dlopen], ! [lt_cv_dlopen="dlopen"], ! [AC_CHECK_LIB([dl], [dlopen], ! [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], ! [AC_CHECK_LIB([svld], [dlopen], ! [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], ! [AC_CHECK_LIB([dld], [dld_link], ! [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ! ]) ! ]) ! ]) ! ]) ! ]) ! ;; ! esac ! ! if test "x$lt_cv_dlopen" != xno; then ! enable_dlopen=yes ! else ! enable_dlopen=no ! fi ! ! case $lt_cv_dlopen in ! dlopen) ! save_CPPFLAGS="$CPPFLAGS" ! test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" ! ! save_LDFLAGS="$LDFLAGS" ! eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" ! ! save_LIBS="$LIBS" ! LIBS="$lt_cv_dlopen_libs $LIBS" ! ! AC_CACHE_CHECK([whether a program can dlopen itself], ! lt_cv_dlopen_self, [dnl ! _LT_AC_TRY_DLOPEN_SELF( ! lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, ! lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ! ]) ! ! if test "x$lt_cv_dlopen_self" = xyes; then ! LDFLAGS="$LDFLAGS $link_static_flag" ! AC_CACHE_CHECK([whether a statically linked program can dlopen itself], ! lt_cv_dlopen_self_static, [dnl ! _LT_AC_TRY_DLOPEN_SELF( ! lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, ! lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ! ]) fi ! ! CPPFLAGS="$save_CPPFLAGS" ! LDFLAGS="$save_LDFLAGS" ! LIBS="$save_LIBS" ! ;; ! esac ! ! case $lt_cv_dlopen_self in ! yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; ! *) enable_dlopen_self=unknown ;; ! esac ! ! case $lt_cv_dlopen_self_static in ! yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; ! *) enable_dlopen_self_static=unknown ;; ! esac ! fi ! ])# AC_LIBTOOL_DLOPEN_SELF ! ! ! # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) ! # --------------------------------- ! # Check to see if options -c and -o are simultaneously supported by compiler ! AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], ! [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl ! AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], ! [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], ! [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no ! $rm -r conftest 2>/dev/null ! mkdir conftest ! cd conftest ! mkdir out ! printf "$lt_simple_compile_test_code" > conftest.$ac_ext ! ! # According to Tom Tromey, Ian Lance Taylor reported there are C compilers ! # that will create temporary files in the current directory regardless of ! # the output directory. Thus, making CWD read-only will cause this test ! # to fail, enabling locking or at least warning the user not to do parallel ! # builds. ! chmod -w . ! ! lt_compiler_flag="-o out/conftest2.$ac_objext" ! # Insert the option either (1) after the last *FLAGS variable, or ! # (2) before a word containing "conftest.", or (3) at the end. ! # Note that $ac_compile itself does not contain backslashes and begins ! # with a dollar sign (not a hyphen), so the echo should work correctly. ! lt_compile=`echo "$ac_compile" | $SED \ ! -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ ! -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ ! -e 's:$: $lt_compiler_flag:'` ! (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) ! (eval "$lt_compile" 2>out/conftest.err) ! ac_status=$? ! cat out/conftest.err >&AS_MESSAGE_LOG_FD ! echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD ! if (exit $ac_status) && test -s out/conftest2.$ac_objext ! then ! # The compiler can only warn and ignore the option if not recognized ! # So say no if there are warnings ! if test ! -s out/conftest.err; then ! _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes ! fi ! fi ! chmod u+w . ! $rm conftest* out/* ! rmdir out ! cd .. ! rmdir conftest ! $rm conftest* ]) + ])# AC_LIBTOOL_PROG_CC_C_O + # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) + # ----------------------------------------- + # Check to see if we can do hard links to lock some files if needed + AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], + [AC_REQUIRE([_LT_AC_LOCK])dnl ! hard_links="nottested" ! if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then ! # do not overwrite the value of need_locks provided by the user ! AC_MSG_CHECKING([if we can lock with hard links]) ! hard_links=yes ! $rm conftest* ! ln conftest.a conftest.b 2>/dev/null && hard_links=no ! touch conftest.a ! ln conftest.a conftest.b 2>&5 || hard_links=no ! ln conftest.a conftest.b 2>/dev/null && hard_links=no ! AC_MSG_RESULT([$hard_links]) ! if test "$hard_links" = no; then ! AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) ! need_locks=warn ! fi ! else ! need_locks=no ! fi ! ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS ! ! ! # AC_LIBTOOL_OBJDIR ! # ----------------- ! AC_DEFUN([AC_LIBTOOL_OBJDIR], ! [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], ! [rm -f .libs 2>/dev/null ! mkdir .libs 2>/dev/null ! if test -d .libs; then ! lt_cv_objdir=.libs ! else ! # MS-DOS does not allow filenames that begin with a dot. ! lt_cv_objdir=_libs ! fi ! rmdir .libs 2>/dev/null]) ! objdir=$lt_cv_objdir ! ])# AC_LIBTOOL_OBJDIR ! ! ! # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) ! # ---------------------------------------------- ! # Check hardcoding attributes. ! AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], ! [AC_MSG_CHECKING([how to hardcode library paths into programs]) ! _LT_AC_TAGVAR(hardcode_action, $1)= ! if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ ! test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \ ! test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then ! ! # We can hardcode non-existant directories. ! if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && ! # If the only mechanism to avoid hardcoding is shlibpath_var, we ! # have to relink, otherwise we might link with an installed library ! # when we should be linking with a yet-to-be-installed one ! ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && ! test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then ! # Linking always hardcodes the temporary library directory. ! _LT_AC_TAGVAR(hardcode_action, $1)=relink ! else ! # We can link without hardcoding, and we can hardcode nonexisting dirs. ! _LT_AC_TAGVAR(hardcode_action, $1)=immediate ! fi ! else ! # We cannot hardcode anything, or else we can only hardcode existing ! # directories. ! _LT_AC_TAGVAR(hardcode_action, $1)=unsupported ! fi ! AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) ! ! if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then ! # Fast installation is not supported enable_fast_install=no ! elif test "$shlibpath_overrides_runpath" = yes || ! test "$enable_shared" = no; then ! # Fast installation is not necessary ! enable_fast_install=needless ! fi ! ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH ! ! ! # AC_LIBTOOL_SYS_LIB_STRIP ! # ------------------------ ! AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], ! [striplib= ! old_striplib= ! AC_MSG_CHECKING([whether stripping libraries is possible]) ! if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then ! test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" ! test -z "$striplib" && striplib="$STRIP --strip-unneeded" ! AC_MSG_RESULT([yes]) ! else ! # FIXME - insert some real tests, host_os isn't really good enough ! case $host_os in ! darwin*) ! if test -n "$STRIP" ; then ! striplib="$STRIP -x" ! AC_MSG_RESULT([yes]) ! else ! AC_MSG_RESULT([no]) ! fi ! ;; ! *) ! AC_MSG_RESULT([no]) ! ;; ! esac ! fi ! ])# AC_LIBTOOL_SYS_LIB_STRIP ! ! ! # AC_LIBTOOL_SYS_DYNAMIC_LINKER ! # ----------------------------- ! # PORTME Fill in your ld.so characteristics ! AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], ! [AC_MSG_CHECKING([dynamic linker characteristics]) ! library_names_spec= ! libname_spec='lib$name' ! soname_spec= ! shrext=".so" ! postinstall_cmds= ! postuninstall_cmds= ! finish_cmds= ! finish_eval= ! shlibpath_var= ! shlibpath_overrides_runpath=unknown ! version_type=none ! dynamic_linker="$host_os ld.so" ! sys_lib_dlsearch_path_spec="/lib /usr/lib" ! if test "$GCC" = yes; then ! sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` ! if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then ! # if the path contains ";" then we assume it to be the separator ! # otherwise default to the standard path separator (i.e. ":") - it is ! # assumed that no part of a normal pathname contains ";" but that should ! # okay in the real world where ";" in dirpaths is itself problematic. ! sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ! else ! sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ! fi ! else ! sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" ! fi ! need_lib_prefix=unknown ! hardcode_into_libs=no ! ! # when you set need_version to no, make sure it does not cause -set_version ! # flags to be left without arguments ! need_version=unknown ! ! case $host_os in ! aix3*) ! version_type=linux ! library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' ! shlibpath_var=LIBPATH ! ! # AIX 3 has no versioning support, so we append a major version to the name. ! soname_spec='${libname}${release}${shared_ext}$major' ! ;; ! ! aix4* | aix5*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! hardcode_into_libs=yes ! if test "$host_cpu" = ia64; then ! # AIX 5 supports IA64 ! library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' ! shlibpath_var=LD_LIBRARY_PATH ! else ! # With GCC up to 2.95.x, collect2 would create an import file ! # for dependence libraries. The import file would start with ! # the line `#! .'. This would cause the generated library to ! # depend on `.', always an invalid library. This was fixed in ! # development snapshots of GCC prior to 3.0. ! case $host_os in ! aix4 | aix4.[[01]] | aix4.[[01]].*) ! if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' ! echo ' yes ' ! echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then ! : ! else ! can_build_shared=no ! fi ! ;; ! esac ! # AIX (on Power*) has no versioning support, so currently we can not hardcode correct ! # soname into executable. Probably we can add versioning support to ! # collect2, so additional links can be useful in future. ! if test "$aix_use_runtimelinking" = yes; then ! # If using run time linking (on AIX 4.2 or later) use lib.so ! # instead of lib.a to let people know that these are not ! # typical AIX shared libraries. ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! else ! # We preserve .a as extension for shared libraries through AIX4.2 ! # and later when we are not doing run time linking. ! library_names_spec='${libname}${release}.a $libname.a' ! soname_spec='${libname}${release}${shared_ext}$major' fi ! shlibpath_var=LIBPATH ! fi ;; ! amigaos*) ! library_names_spec='$libname.ixlibrary $libname.a' ! # Create ${libname}_ixlibrary.a entries in /sys/libs. ! finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' ! ;; ! beos*) ! library_names_spec='${libname}${shared_ext}' ! dynamic_linker="$host_os ld.so" ! shlibpath_var=LIBRARY_PATH ! ;; ! ! bsdi4*) ! version_type=linux ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' ! shlibpath_var=LD_LIBRARY_PATH ! sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" ! sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" ! # the default ld.so.conf also contains /usr/contrib/lib and ! # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow ! # libtool to hard-code these into programs ! ;; + cygwin* | mingw* | pw32*) + version_type=windows + shrext=".dll" + need_version=no + need_lib_prefix=no ! case $GCC,$host_os in ! yes,cygwin* | yes,mingw* | yes,pw32*) ! library_names_spec='$libname.dll.a' ! # DLL is installed to $(libdir)/../bin by postinstall_cmds ! postinstall_cmds='base_file=`basename \${file}`~ ! dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ ! dldir=$destdir/`dirname \$dlpath`~ ! test -d \$dldir || mkdir -p \$dldir~ ! $install_prog $dir/$dlname \$dldir/$dlname' ! postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ! dlpath=$dir/\$dldll~ ! $rm \$dlpath' ! shlibpath_overrides_runpath=yes ! ! case $host_os in ! cygwin*) ! # Cygwin DLLs use 'cyg' prefix rather than 'lib' ! soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ! sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib" ! ;; ! mingw*) ! # MinGW DLLs use traditional 'lib' prefix ! soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ! sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` ! if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then ! # It is most probably a Windows format PATH printed by ! # mingw gcc, but we are running on Cygwin. Gcc prints its search ! # path with ; separators, and with drive letters. We can handle the ! # drive letters (cygwin fileutils understands them), so leave them, ! # especially as we might pass files found there to a mingw objdump, ! # which wouldn't understand a cygwinified path. Ahh. ! sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ! else ! sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ! fi ! ;; ! pw32*) ! # pw32 DLLs use 'pw' prefix rather than 'lib' ! library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ! ;; ! esac ! ;; ! ! *) ! library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ! ;; ! esac ! dynamic_linker='Win32 ld.exe' ! # FIXME: first we should search . and the directory the executable is in ! shlibpath_var=PATH ;; ! ! darwin* | rhapsody*) ! dynamic_linker="$host_os dyld" ! version_type=darwin ! need_lib_prefix=no ! need_version=no ! # FIXME: Relying on posixy $() will cause problems for ! # cross-compilation, but unfortunately the echo tests do not ! # yet detect zsh echo's removal of \ escapes. ! library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' ! soname_spec='${libname}${release}${major}$shared_ext' ! shlibpath_overrides_runpath=yes ! shlibpath_var=DYLD_LIBRARY_PATH ! shrext='$(test .$module = .yes && echo .so || echo .dylib)' ! # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. ! if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then ! sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` ! fi ! sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ! ;; ! ! dgux*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! ;; ! ! freebsd1*) ! dynamic_linker=no ! ;; ! ! freebsd*) ! objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` ! version_type=freebsd-$objformat ! case $version_type in ! freebsd-elf*) ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' ! need_version=no ! need_lib_prefix=no ! ;; ! freebsd-*) ! library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' ! need_version=yes ! ;; ! esac ! shlibpath_var=LD_LIBRARY_PATH ! case $host_os in ! freebsd2*) ! shlibpath_overrides_runpath=yes ! ;; ! freebsd3.[01]* | freebsdelf3.[01]*) ! shlibpath_overrides_runpath=yes ! hardcode_into_libs=yes ! ;; ! *) # from 3.2 on ! shlibpath_overrides_runpath=no ! hardcode_into_libs=yes ! ;; ! esac ! ;; ! ! gnu*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! hardcode_into_libs=yes ! ;; ! ! hpux9* | hpux10* | hpux11*) ! # Give a soname corresponding to the major version so that dld.sl refuses to ! # link against other versions. ! version_type=sunos ! need_lib_prefix=no ! need_version=no ! case "$host_cpu" in ! ia64*) ! shrext='.so' ! hardcode_into_libs=yes ! dynamic_linker="$host_os dld.so" ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! if test "X$HPUX_IA64_MODE" = X32; then ! sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" ! else ! sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" ! fi ! sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ! ;; ! hppa*64*) ! shrext='.sl' ! hardcode_into_libs=yes ! dynamic_linker="$host_os dld.sl" ! shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH ! shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" ! sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ! ;; ! *) ! shrext='.sl' ! dynamic_linker="$host_os dld.sl" ! shlibpath_var=SHLIB_PATH ! shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! ;; ! esac ! # HP-UX runs *really* slowly unless shared libraries are mode 555. ! postinstall_cmds='chmod 555 $lib' ;; + + irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; *) ! case $LD in # libtool.m4 will add one of these switches to LD ! *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") ! libsuff= shlibsuff= libmagic=32-bit;; ! *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") ! libsuff=32 shlibsuff=N32 libmagic=N32;; ! *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") ! libsuff=64 shlibsuff=64 libmagic=64-bit;; ! *) libsuff= shlibsuff= libmagic=never-match;; ! esac ! ;; ! esac ! shlibpath_var=LD_LIBRARY${shlibsuff}_PATH ! shlibpath_overrides_runpath=no ! sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" ! sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" ! hardcode_into_libs=yes ! ;; ! ! # No shared lib support for Linux oldld, aout, or coff. ! linux*oldld* | linux*aout* | linux*coff*) ! dynamic_linker=no ! ;; ! ! # This must be Linux ELF. ! linux*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=no ! # This implies no fast_install, which is unacceptable. ! # Some rework will be needed to allow for fast_install ! # before this can be enabled. ! hardcode_into_libs=yes ! ! # We used to test for /lib/ld.so.1 and disable shared libraries on ! # powerpc, because MkLinux only supported shared libraries with the ! # GNU dynamic linker. Since this was broken with cross compilers, ! # most powerpc-linux boxes support dynamic linking these days and ! # people can always --disable-shared, the test was removed, and we ! # assume the GNU/Linux dynamic linker is in use. ! dynamic_linker='GNU/Linux ld.so' ! ;; ! ! netbsd*) ! version_type=sunos ! need_lib_prefix=no ! need_version=no ! if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' ! dynamic_linker='NetBSD (a.out) ld.so' ! else ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! dynamic_linker='NetBSD ld.elf_so' ! fi ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! hardcode_into_libs=yes ! ;; ! ! newsos6) ! version_type=linux ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! ;; ! ! nto-qnx) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! ;; ! ! openbsd*) ! version_type=sunos ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' ! shlibpath_var=LD_LIBRARY_PATH ! if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then ! case $host_os in ! openbsd2.[[89]] | openbsd2.[[89]].*) ! shlibpath_overrides_runpath=no ! ;; ! *) ! shlibpath_overrides_runpath=yes ! ;; ! esac ! else ! shlibpath_overrides_runpath=yes ! fi ! ;; ! ! os2*) ! libname_spec='$name' ! shrext=".dll" ! need_lib_prefix=no ! library_names_spec='$libname${shared_ext} $libname.a' ! dynamic_linker='OS/2 ld.exe' ! shlibpath_var=LIBPATH ! ;; ! ! osf3* | osf4* | osf5*) ! version_type=osf ! need_lib_prefix=no ! need_version=no ! soname_spec='${libname}${release}${shared_ext}$major' ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! shlibpath_var=LD_LIBRARY_PATH ! sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" ! sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ! ;; ! ! sco3.2v5*) ! version_type=osf ! soname_spec='${libname}${release}${shared_ext}$major' ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! shlibpath_var=LD_LIBRARY_PATH ! ;; ! ! solaris*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! hardcode_into_libs=yes ! # ldd complains unless libraries are executable ! postinstall_cmds='chmod +x $lib' ! ;; ! ! sunos4*) ! version_type=sunos ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' ! finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! if test "$with_gnu_ld" = yes; then ! need_lib_prefix=no ! fi ! need_version=yes ! ;; ! ! sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) ! version_type=linux ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! case $host_vendor in ! sni) ! shlibpath_overrides_runpath=no ! need_lib_prefix=no ! export_dynamic_flag_spec='${wl}-Blargedynsym' ! runpath_var=LD_RUN_PATH ! ;; ! siemens) ! need_lib_prefix=no ! ;; ! motorola) ! need_lib_prefix=no ! need_version=no ! shlibpath_overrides_runpath=no ! sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ! ;; ! esac ! ;; ! ! sysv4*MP*) ! if test -d /usr/nec ;then ! version_type=linux ! library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' ! soname_spec='$libname${shared_ext}.$major' ! shlibpath_var=LD_LIBRARY_PATH ! fi ! ;; ! ! uts4*) ! version_type=linux ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! ;; ! ! *) ! dynamic_linker=no ! ;; ! esac ! AC_MSG_RESULT([$dynamic_linker]) ! test "$dynamic_linker" = no && can_build_shared=no ! ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER ! ! ! # _LT_AC_TAGCONFIG ! # ---------------- ! AC_DEFUN([_LT_AC_TAGCONFIG], ! [AC_ARG_WITH([tags], ! [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], ! [include additional configurations @<:@automatic@:>@])], ! [tagnames="$withval"]) ! ! if test -f "$ltmain" && test -n "$tagnames"; then ! if test ! -f "${ofile}"; then ! AC_MSG_WARN([output file `$ofile' does not exist]) ! fi ! ! if test -z "$LTCC"; then ! eval "`$SHELL ${ofile} --config | grep '^LTCC='`" ! if test -z "$LTCC"; then ! AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) ! else ! AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) ! fi ! fi ! ! # Extract list of available tagged configurations in $ofile. ! # Note that this assumes the entire list is on one line. ! available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` ! ! lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," ! for tagname in $tagnames; do ! IFS="$lt_save_ifs" ! # Check whether tagname contains only valid characters ! case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in ! "") ;; ! *) AC_MSG_ERROR([invalid tag name: $tagname]) ! ;; ! esac ! ! if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null ! then ! AC_MSG_ERROR([tag name \"$tagname\" already exists]) ! fi ! ! # Update the list of available tags. ! if test -n "$tagname"; then ! echo appending configuration tag \"$tagname\" to $ofile ! ! case $tagname in ! CXX) ! if test -n "$CXX" && test "X$CXX" != "Xno"; then ! AC_LIBTOOL_LANG_CXX_CONFIG ! else ! tagname="" ! fi ! ;; ! ! F77) ! if test -n "$F77" && test "X$F77" != "Xno"; then ! AC_LIBTOOL_LANG_F77_CONFIG ! else ! tagname="" ! fi ! ;; ! ! GCJ) ! if test -n "$GCJ" && test "X$GCJ" != "Xno"; then ! AC_LIBTOOL_LANG_GCJ_CONFIG ! else ! tagname="" ! fi ! ;; ! ! RC) ! AC_LIBTOOL_LANG_RC_CONFIG ! ;; ! ! *) ! AC_MSG_ERROR([Unsupported tag name: $tagname]) ! ;; ! esac ! ! # Append the new tag name to the list of available tags. ! if test -n "$tagname" ; then ! available_tags="$available_tags $tagname" ! fi ! fi ! done ! IFS="$lt_save_ifs" ! ! # Now substitute the updated list of available tags. ! if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then ! mv "${ofile}T" "$ofile" ! chmod +x "$ofile" ! else ! rm -f "${ofile}T" ! AC_MSG_ERROR([unable to update list of available tagged configurations.]) ! fi ! fi ! ])# _LT_AC_TAGCONFIG ! ! ! # AC_LIBTOOL_DLOPEN ! # ----------------- ! # enable checks for dlopen support ! AC_DEFUN([AC_LIBTOOL_DLOPEN], ! [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ! ])# AC_LIBTOOL_DLOPEN ! ! ! # AC_LIBTOOL_WIN32_DLL ! # -------------------- ! # declare package support for building win32 dll's ! AC_DEFUN([AC_LIBTOOL_WIN32_DLL], ! [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ! ])# AC_LIBTOOL_WIN32_DLL ! ! ! # AC_ENABLE_SHARED([DEFAULT]) ! # --------------------------- ! # implement the --enable-shared flag ! # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. ! AC_DEFUN([AC_ENABLE_SHARED], ! [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl ! AC_ARG_ENABLE([shared], ! [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], ! [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], ! [p=${PACKAGE-default} ! case $enableval in ! yes) enable_shared=yes ;; ! no) enable_shared=no ;; ! *) ! enable_shared=no ! # Look at the argument we got. We use all the common list separators. ! lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," ! for pkg in $enableval; do ! IFS="$lt_save_ifs" ! if test "X$pkg" = "X$p"; then ! enable_shared=yes ! fi ! done ! IFS="$lt_save_ifs" ! ;; ! esac], ! [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ! ])# AC_ENABLE_SHARED ! ! ! # AC_DISABLE_SHARED ! # ----------------- ! #- set the default shared flag to --disable-shared ! AC_DEFUN([AC_DISABLE_SHARED], ! [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl ! AC_ENABLE_SHARED(no) ! ])# AC_DISABLE_SHARED ! ! ! # AC_ENABLE_STATIC([DEFAULT]) ! # --------------------------- ! # implement the --enable-static flag ! # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. ! AC_DEFUN([AC_ENABLE_STATIC], ! [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl ! AC_ARG_ENABLE([static], ! [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], ! [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], ! [p=${PACKAGE-default} ! case $enableval in ! yes) enable_static=yes ;; ! no) enable_static=no ;; ! *) ! enable_static=no ! # Look at the argument we got. We use all the common list separators. ! lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," ! for pkg in $enableval; do ! IFS="$lt_save_ifs" ! if test "X$pkg" = "X$p"; then ! enable_static=yes ! fi ! done ! IFS="$lt_save_ifs" ! ;; ! esac], ! [enable_static=]AC_ENABLE_STATIC_DEFAULT) ! ])# AC_ENABLE_STATIC ! ! ! # AC_DISABLE_STATIC ! # ----------------- ! # set the default static flag to --disable-static ! AC_DEFUN([AC_DISABLE_STATIC], ! [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl ! AC_ENABLE_STATIC(no) ! ])# AC_DISABLE_STATIC ! ! ! # AC_ENABLE_FAST_INSTALL([DEFAULT]) ! # --------------------------------- ! # implement the --enable-fast-install flag ! # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. ! AC_DEFUN([AC_ENABLE_FAST_INSTALL], ! [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl ! AC_ARG_ENABLE([fast-install], ! [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], ! [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], ! [p=${PACKAGE-default} ! case $enableval in ! yes) enable_fast_install=yes ;; ! no) enable_fast_install=no ;; ! *) ! enable_fast_install=no ! # Look at the argument we got. We use all the common list separators. ! lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," ! for pkg in $enableval; do ! IFS="$lt_save_ifs" ! if test "X$pkg" = "X$p"; then ! enable_fast_install=yes ! fi ! done ! IFS="$lt_save_ifs" ! ;; ! esac], ! [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ! ])# AC_ENABLE_FAST_INSTALL ! ! ! # AC_DISABLE_FAST_INSTALL ! # ----------------------- ! # set the default to --disable-fast-install ! AC_DEFUN([AC_DISABLE_FAST_INSTALL], ! [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl ! AC_ENABLE_FAST_INSTALL(no) ! ])# AC_DISABLE_FAST_INSTALL ! ! ! # AC_LIBTOOL_PICMODE([MODE]) ! # -------------------------- ! # implement the --with-pic flag ! # MODE is either `yes' or `no'. If omitted, it defaults to `both'. ! AC_DEFUN([AC_LIBTOOL_PICMODE], ! [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl ! pic_mode=ifelse($#,1,$1,default) ! ])# AC_LIBTOOL_PICMODE ! ! ! # AC_PROG_EGREP ! # ------------- ! # This is predefined starting with Autoconf 2.54, so this conditional ! # definition can be removed once we require Autoconf 2.54 or later. ! m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], ! [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], ! [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 ! then ac_cv_prog_egrep='grep -E' ! else ac_cv_prog_egrep='egrep' ! fi]) ! EGREP=$ac_cv_prog_egrep ! AC_SUBST([EGREP]) ! ])]) ! ! ! # AC_PATH_TOOL_PREFIX ! # ------------------- ! # find a file program which can recognise shared library ! AC_DEFUN([AC_PATH_TOOL_PREFIX], ! [AC_REQUIRE([AC_PROG_EGREP])dnl ! AC_MSG_CHECKING([for $1]) ! AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, ! [case $MAGIC_CMD in ! [[\\/*] | ?:[\\/]*]) ! lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ! ;; ! *) ! lt_save_MAGIC_CMD="$MAGIC_CMD" ! lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then ! lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then ! case $deplibs_check_method in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" ! MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | ! $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *************** EOF *** 353,397 **** break fi done ! IFS="$ac_save_ifs" ! MAGIC="$ac_save_MAGIC" ;; esac]) ! MAGIC="$lt_cv_path_MAGIC" ! if test -n "$MAGIC"; then ! AC_MSG_RESULT($MAGIC) else AC_MSG_RESULT(no) fi ! ]) ! # AC_PATH_MAGIC - find a file program which can recognise a shared library ! AC_DEFUN(AC_PATH_MAGIC, ! [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl ! AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH) ! if test -z "$lt_cv_path_MAGIC"; then if test -n "$ac_tool_prefix"; then ! AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH) else ! MAGIC=: fi fi ! ]) ! # AC_PROG_LD - find the path to the GNU or non-GNU linker ! AC_DEFUN(AC_PROG_LD, ! [AC_ARG_WITH(gnu-ld, ! [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], ! test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld ! if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. ! AC_MSG_CHECKING([for ld used by GCC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw --- 1891,1941 ---- break fi done ! IFS="$lt_save_ifs" ! MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) ! MAGIC_CMD="$lt_cv_path_MAGIC_CMD" ! if test -n "$MAGIC_CMD"; then ! AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ! ])# AC_PATH_TOOL_PREFIX ! # AC_PATH_MAGIC ! # ------------- ! # find a file program which can recognise a shared library ! AC_DEFUN([AC_PATH_MAGIC], ! [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) ! if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then ! AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else ! MAGIC_CMD=: fi fi ! ])# AC_PATH_MAGIC ! # AC_PROG_LD ! # ---------- ! # find the path to the GNU or non-GNU linker ! AC_DEFUN([AC_PROG_LD], ! [AC_ARG_WITH([gnu-ld], ! [AC_HELP_STRING([--with-gnu-ld], ! [assume the C compiler uses GNU ld @<:@default=no@:>@])], ! [test "$withval" = no || with_gnu_ld=yes], ! [with_gnu_ld=no]) ! AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld ! if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. ! AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw *************** if test "$ac_cv_prog_gcc" = yes; then *** 399,414 **** *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac ! case "$ac_prog" in # Accept absolute paths. ! changequote(,)dnl ! [\\/]* | [A-Za-z]:[\\/]*) ! re_direlt='/[^/][^/]*/\.\./' ! changequote([,])dnl # Canonicalize the path of ld ! ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ! ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; --- 1943,1956 ---- *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac ! case $ac_prog in # Accept absolute paths. ! [[\\/]]* | ?:[[\\/]]*) ! re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the path of ld ! ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ! ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; *************** elif test "$with_gnu_ld" = yes; then *** 426,453 **** else AC_MSG_CHECKING([for non-GNU ld]) fi ! AC_CACHE_VAL(ac_cv_path_LD, [if test -z "$LD"; then ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then ! ac_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. ! if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break ! else test "$with_gnu_ld" != yes && break ! fi fi done ! IFS="$ac_save_ifs" else ! ac_cv_path_LD="$LD" # Let the user override the test with a path. fi]) ! LD="$ac_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) else --- 1968,1999 ---- else AC_MSG_CHECKING([for non-GNU ld]) fi ! AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then ! lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do + IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then ! lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. ! case `"$lt_cv_path_LD" -v 2>&1 &1 &5; then ! ac_cv_prog_gnu_ld=yes ! else ! ac_cv_prog_gnu_ld=no ! fi]) ! with_gnu_ld=$ac_cv_prog_gnu_ld ! ]) ! # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker # -- PORTME Some linkers may need a different reload flag. ! AC_DEFUN(AC_PROG_LD_RELOAD_FLAG, ! [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag, ! [lt_cv_ld_reload_flag='-r']) reload_flag=$lt_cv_ld_reload_flag ! test -n "$reload_flag" && reload_flag=" $reload_flag" ! ]) ! # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics ! AC_DEFUN(AC_DEPLIBS_CHECK_METHOD, ! [AC_CACHE_CHECK([how to recognise dependant libraries], lt_cv_deplibs_check_method, ! [lt_cv_file_magic_cmd='${MAGIC}' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support --- 2001,2052 ---- fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_PROG_LD_GNU ! ])# AC_PROG_LD ! ! # AC_PROG_LD_GNU ! # -------------- ! AC_DEFUN([AC_PROG_LD_GNU], ! [AC_REQUIRE([AC_PROG_EGREP])dnl ! AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. ! case `"$LD" -v 2>&1 /dev/null; then ! case "$host_cpu" in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. ! changequote(,)dnl ! lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' ! changequote([, ])dnl lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; --- 2070,2108 ---- ;; bsdi4*) ! lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; ! cygwin* | mingw* | pw32*) ! # win32_libid is a shell function defined in ltmain.sh ! lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' ! lt_cv_file_magic_cmd='win32_libid' ;; ! darwin* | rhapsody*) ! # this will be overwritten by pass_all, but leave it in just in case ! lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' ! lt_cv_file_magic_cmd='/usr/bin/file -L' ! case "$host_os" in ! rhapsody* | darwin1.[[012]]) ! lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System` ! ;; ! *) # Darwin 1.3 on ! lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' ! ;; ! esac ! lt_cv_deplibs_check_method=pass_all ! ;; ! ! freebsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then ! case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. ! lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; *************** gnu*) *** 540,569 **** lt_cv_deplibs_check_method=pass_all ;; ! hpux10.20*) ! # TODO: Does this work for hpux-11 too? ! lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_cmd=/usr/bin/file ! lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; ! irix5* | irix6*) ! case "$host_os" in ! irix5*) # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" ;; *) ! case "$LD" in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac # this will be overridden with pass_all, but let us keep it just in case ! changequote(,)dnl ! lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" ! changequote([, ])dnl ;; esac lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` --- 2116,2154 ---- lt_cv_deplibs_check_method=pass_all ;; ! hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file ! case "$host_cpu" in ! ia64*) ! lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' ! lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ! ;; ! hppa*64*) ! [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] ! lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ! ;; ! *) ! lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' ! lt_cv_file_magic_test_file=/usr/lib/libc.sl ! ;; ! esac ;; ! irix5* | irix6* | nonstopux*) ! case $host_os in ! irix5* | nonstopux*) # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" ;; *) ! case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac # this will be overridden with pass_all, but let us keep it just in case ! lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1" ;; esac lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` *************** irix5* | irix6*) *** 571,597 **** ;; # This must be Linux ELF. ! linux-gnu*) ! case "$host_cpu" in ! alpha* | i*86 | powerpc* | sparc* | ia64* ) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM ! changequote(,)dnl ! lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; ! changequote([, ])dnl esac lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` ;; netbsd*) ! if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then : else ! changequote(,)dnl ! lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' ! changequote([, ])dnl ! lt_cv_file_magic_cmd='/usr/bin/file -L' ! lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` fi ;; --- 2156,2197 ---- ;; # This must be Linux ELF. ! linux*) ! case $host_cpu in ! alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh*) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM ! lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; esac lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` ;; netbsd*) ! if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then ! lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else ! lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' ! fi ! ;; ! ! newos6*) ! lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' ! lt_cv_file_magic_cmd=/usr/bin/file ! lt_cv_file_magic_test_file=/usr/lib/libnls.so ! ;; ! ! nto-qnx) ! lt_cv_deplibs_check_method=unknown ! ;; ! ! openbsd*) ! lt_cv_file_magic_cmd=/usr/bin/file ! lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ! if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then ! lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' ! else ! lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' fi ;; *************** solaris*) *** 612,723 **** ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) ! case "$host_vendor" in ncr) lt_cv_deplibs_check_method=pass_all ;; ! motorola) ! changequote(,)dnl ! lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' ! changequote([, ])dnl ! lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; esac ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method ! ]) ! # AC_PROG_NM - find the path to a BSD-compatible name lister ! AC_DEFUN(AC_PROG_NM, ! [AC_MSG_CHECKING([for BSD-compatible nm]) ! AC_CACHE_VAL(ac_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. ! ac_cv_path_NM="$NM" else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do test -z "$ac_dir" && ac_dir=. ! tmp_nm=$ac_dir/${ac_tool_prefix}nm ! if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file ! if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then ! ac_cv_path_NM="$tmp_nm -B" ! break ! elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ! ac_cv_path_NM="$tmp_nm -p" break ! else ! ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but ! continue # so that we can try to find one that supports BSD flags ! fi fi done ! IFS="$ac_save_ifs" ! test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm fi]) ! NM="$ac_cv_path_NM" ! AC_MSG_RESULT([$NM]) ! ]) ! # AC_CHECK_LIBM - check for math library ! AC_DEFUN(AC_CHECK_LIBM, [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= ! case "$host" in ! *-*-beos* | *-*-cygwin*) ! # These system don't have libm ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") ! AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") ;; *) ! AC_CHECK_LIB(m, main, LIBM="-lm") ;; esac ! ]) ! # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for ! # the libltdl convenience library and INCLTDL to the include flags for ! # the libltdl header and adds --enable-ltdl-convenience to the ! # configure arguments. Note that LIBLTDL and INCLTDL are not ! # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not ! # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed ! # with '${top_builddir}/' and INCLTDL will be prefixed with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and # top_srcdir appropriately in the Makefiles. ! AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl ! case "$enable_ltdl_convenience" in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la ! INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) ! ]) ! # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for ! # the libltdl installable library and INCLTDL to the include flags for ! # the libltdl header and adds --enable-ltdl-install to the configure ! # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is ! # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed ! # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will ! # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed ! # with '${top_srcdir}/' (note the single quotes!). If your package is ! # not flat and you're not using automake, define top_builddir and ! # top_srcdir appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. ! AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl ! AC_CHECK_LIB(ltdl, main, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) --- 2212,2357 ---- ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) ! case $host_vendor in ! motorola) ! lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' ! lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ! ;; ncr) lt_cv_deplibs_check_method=pass_all ;; ! sequent) ! lt_cv_file_magic_cmd='/bin/file' ! lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ! ;; ! sni) ! lt_cv_file_magic_cmd='/bin/file' ! lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" ! lt_cv_file_magic_test_file=/lib/libc.so ! ;; ! siemens) ! lt_cv_deplibs_check_method=pass_all ;; esac ;; + + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method ! test -z "$deplibs_check_method" && deplibs_check_method=unknown ! ])# AC_DEPLIBS_CHECK_METHOD ! # AC_PROG_NM ! # ---------- ! # find the path to a BSD-compatible name lister ! AC_DEFUN([AC_PROG_NM], ! [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. ! lt_cv_path_NM="$NM" else ! lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. ! tmp_nm="$ac_dir/${ac_tool_prefix}nm" ! if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file ! case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in ! */dev/null* | *'Invalid file or object type'*) ! lt_cv_path_NM="$tmp_nm -B" break ! ;; ! *) ! case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in ! */dev/null*) ! lt_cv_path_NM="$tmp_nm -p" ! break ! ;; ! *) ! lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but ! continue # so that we can try to find one that supports BSD flags ! ;; ! esac ! esac fi done ! IFS="$lt_save_ifs" ! test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) ! NM="$lt_cv_path_NM" ! ])# AC_PROG_NM ! ! # AC_CHECK_LIBM ! # ------------- ! # check for math library ! AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= ! case $host in ! *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) ! # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") ! AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) ! AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ! ])# AC_CHECK_LIBM ! ! # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) ! # ----------------------------------- ! # sets LIBLTDL to the link flags for the libltdl convenience library and ! # LTDLINCL to the include flags for the libltdl header and adds ! # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL ! # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If ! # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will ! # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and # top_srcdir appropriately in the Makefiles. ! AC_DEFUN([AC_LIBLTDL_CONVENIENCE], ! [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl ! case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la ! LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) ! # For backwards non-gettext consistent compatibility... ! INCLTDL="$LTDLINCL" ! ])# AC_LIBLTDL_CONVENIENCE ! ! # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) ! # ----------------------------------- ! # sets LIBLTDL to the link flags for the libltdl installable library and ! # LTDLINCL to the include flags for the libltdl header and adds ! # --enable-ltdl-install to the configure arguments. Note that LIBLTDL ! # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If ! # DIRECTORY is not provided and an installed libltdl is not found, it is ! # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/' ! # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single ! # quotes!). If your package is not flat and you're not using automake, ! # define top_builddir and top_srcdir appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. ! AC_DEFUN([AC_LIBLTDL_INSTALLABLE], ! [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl ! AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) *************** AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEF *** 728,1049 **** if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la ! INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" ! INCLTDL= fi ! ]) - # If this macro is not defined by Autoconf, define it here. - ifdef([AC_PROVIDE_IFELSE], - [], - [define([AC_PROVIDE_IFELSE], - [ifdef([AC_PROVIDE_$1], - [$2], [$3])])]) ! # AC_LIBTOOL_CXX - enable support for C++ libraries ! AC_DEFUN(AC_LIBTOOL_CXX,[AC_REQUIRE([_AC_LIBTOOL_CXX])]) ! AC_DEFUN(_AC_LIBTOOL_CXX, ! [AC_REQUIRE([AC_PROG_LIBTOOL]) ! AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PROG_CXXCPP]) ! LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh" ! lt_save_CC="$CC" ! lt_save_CFLAGS="$CFLAGS" ! dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC ! dnl is set to the C++ compiler. ! AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \ ! MAGIC="$MAGIC" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ ! LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \ ! AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \ ! objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \ ! deplibs_check_method="$deplibs_check_method" \ ! file_magic_cmd="$file_magic_cmd" \ ! ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \ ! --build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \ ! || AC_MSG_ERROR([libtool tag configuration failed]) ! CC="$lt_save_CC" ! CFLAGS="$lt_save_CFLAGS" - # Redirect the config.log output again, so that the ltconfig log is not - # clobbered by the next message. - exec 5>>./config.log - ]) ! # AC_LIBTOOL_GCJ - enable support for GCJ libraries ! AC_DEFUN(AC_LIBTOOL_GCJ,[AC_REQUIRE([_AC_LIBTOOL_GCJ])]) ! AC_DEFUN(_AC_LIBTOOL_GCJ, ! [AC_REQUIRE([AC_PROG_LIBTOOL]) ! AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], ! [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], ! [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], ! [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])]) ! LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh" ! lt_save_CC="$CC" ! lt_save_CFLAGS="$CFLAGS" ! dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC ! dnl is set to the C++ compiler. ! AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="" \ ! MAGIC="$MAGIC" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ ! LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \ ! AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \ ! objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \ ! deplibs_check_method="$deplibs_check_method" \ ! file_magic_cmd="$file_magic_cmd" \ ! ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \ ! --build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \ ! || AC_MSG_ERROR([libtool tag configuration failed]) ! CC="$lt_save_CC" ! CFLAGS="$lt_save_CFLAGS" - # Redirect the config.log output again, so that the ltconfig log is not - # clobbered by the next message. - exec 5>>./config.log - ]) ! dnl old names ! AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl ! AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl ! AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl ! AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl ! AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl ! AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl ! AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl - dnl This is just to silence aclocal about the macro not being used - ifelse([AC_DISABLE_FAST_INSTALL])dnl ! AC_DEFUN([LT_AC_PROG_GCJ],[ ! AC_CHECK_TOOL(GCJ, gcj, no) ! test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" ! AC_SUBST(GCJFLAGS) ! ]) ! # serial 1 AC_LIB_LTDL ! AC_DEFUN(AC_LIB_LTDL, ! [AC_PREREQ(2.13)dnl ! AC_REQUIRE([AC_PROG_CC])dnl ! AC_REQUIRE([AC_C_CONST])dnl ! AC_REQUIRE([AC_C_INLINE])dnl ! dnl AC_LIB_LTDL must perform all the checks necessary for compilation ! dnl of the ltdl objects -- including compiler checks (above) and header ! dnl checks (below). ! AC_REQUIRE([AC_HEADER_STDC])dnl ! AC_CHECK_HEADERS(malloc.h memory.h stdlib.h stdio.h ctype.h dlfcn.h dl.h dld.h) ! AC_CHECK_HEADERS(string.h strings.h, break) ! AC_CHECK_FUNCS(strchr index, break) ! AC_CHECK_FUNCS(strrchr rindex, break) ! AC_CHECK_FUNCS(strcmp) ! AC_REQUIRE([AC_LTDL_ENABLE_INSTALL])dnl ! AC_REQUIRE([AC_LTDL_SHLIBEXT])dnl ! AC_REQUIRE([AC_LTDL_SHLIBPATH])dnl ! AC_REQUIRE([AC_LTDL_SYSSEARCHPATH])dnl ! AC_REQUIRE([AC_LTDL_OBJDIR])dnl ! AC_REQUIRE([AC_LTDL_DLPREOPEN])dnl ! AC_REQUIRE([AC_LTDL_DLLIB])dnl ! AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])dnl ! ]) ! AC_DEFUN(AC_LTDL_ENABLE_INSTALL, ! [AC_ARG_ENABLE(ltdl-install, ! [ --enable-ltdl-install install libltdl]) - AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno) - AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno) - ])]) - AC_DEFUN(AC_LTDL_SNARF_CONFIG, - [# Read the libtool configuration - rm -f conftest - ./libtool --config > conftest - . ./conftest - rm -f conftest - ]) ! AC_DEFUN(AC_LTDL_SHLIBEXT, ! [AC_REQUIRE([AC_LTDL_SNARF_CONFIG])dnl ! AC_CACHE_CHECK([which extension is used for shared libraries], ! libltdl_cv_shlibext, [dnl ! ( ! last= ! for spec in $library_names_spec; do ! last="$spec" ! done ! changequote(, ) ! echo "$last" | sed 's/\[.*\]//;s/^[^.]*//;s/\$.*$//;s/\.$//' > conftest ! changequote([, ]) ! ) ! libltdl_cv_shlibext=`cat conftest` ! rm -f conftest ! ]) ! if test -n "$libltdl_cv_shlibext"; then ! AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext", ! [Define to the extension used for shared libraries, say, ".so". ]) fi ! ]) ! AC_DEFUN(AC_LTDL_SHLIBPATH, ! [AC_REQUIRE([AC_LTDL_SNARF_CONFIG])dnl ! AC_CACHE_CHECK([which variable specifies run-time library path], ! libltdl_cv_shlibpath_var, [libltdl_cv_shlibpath_var="$shlibpath_var"]) ! if test -n "$libltdl_cv_shlibpath_var"; then ! AC_DEFINE_UNQUOTED(LTDL_SHLIBPATH_VAR, "$libltdl_cv_shlibpath_var", ! [Define to the name of the environment variable that determines the dynamic library search path. ]) fi - ]) ! AC_DEFUN(AC_LTDL_SYSSEARCHPATH, ! [AC_REQUIRE([AC_LTDL_SNARF_CONFIG])dnl ! AC_CACHE_CHECK([for the default library search path], ! libltdl_cv_sys_search_path, [libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec"]) ! if test -n "$libltdl_cv_sys_search_path"; then ! case "$host" in ! *-*-mingw*) pathsep=";" ;; ! *) pathsep=":" ;; ! esac ! sys_search_path= ! for dir in $libltdl_cv_sys_search_path; do ! if test -z "$sys_search_path"; then ! sys_search_path="$dir" else ! sys_search_path="$sys_search_path$pathsep$dir" fi ! done ! AC_DEFINE_UNQUOTED(LTDL_SYSSEARCHPATH, "$sys_search_path", ! [Define to the system default library search path. ]) fi ]) ! AC_DEFUN(AC_LTDL_OBJDIR, ! [AC_CACHE_CHECK([for objdir], ! libltdl_cv_objdir, [libltdl_cv_objdir="$objdir" ! if test -n "$objdir"; then ! : else ! rm -f .libs 2>/dev/null ! mkdir .libs 2>/dev/null ! if test -d .libs; then ! libltdl_cv_objdir=.libs ! else ! # MS-DOS does not allow filenames that begin with a dot. ! libltdl_cv_objdir=_libs ! fi ! rmdir .libs 2>/dev/null ! fi]) ! AC_DEFINE_UNQUOTED(LTDL_OBJDIR, "$libltdl_cv_objdir/", ! [Define to the sub-directory in which libtool stores uninstalled libraries. ]) ! ]) ! AC_DEFUN(AC_LTDL_DLPREOPEN, ! [AC_REQUIRE([AC_LTDL_GLOBAL_SYMBOL_PIPE])dnl ! AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen], ! libltdl_cv_preloaded_symbols, [dnl ! if test -n "$global_symbol_pipe"; then ! libltdl_cv_preloaded_symbols=yes ! else ! libltdl_cv_preloaded_symbols=no fi ! ]) ! if test x"$libltdl_cv_preloaded_symbols" = x"yes"; then ! AC_DEFINE(HAVE_PRELOADED_SYMBOLS, 1, ! [Define if libtool can extract symbol lists from object files. ]) fi ! ]) ! AC_DEFUN(AC_LTDL_DLLIB, ! [LIBADD_DL= ! AC_CHECK_LIB(dl, dlopen, [AC_DEFINE(HAVE_LIBDL, 1, ! [Define if you have the libdl library or equivalent. ]) LIBADD_DL="-ldl"], ! [AC_CHECK_FUNC(dlopen, [AC_DEFINE(HAVE_LIBDL, 1, ! [Define if you have the libdl library or equivalent.])], ! [AC_CHECK_LIB(svld, dlopen, [AC_DEFINE(HAVE_LIBDL, 1, ! [Define if you have the libdl library or equivalent.]) LIBADD_DL="-lsvld"] ! )])]) ! AC_CHECK_FUNC(shl_load, [AC_DEFINE(HAVE_SHL_LOAD, 1, ! [Define if you have the shl_load function.])], ! [AC_CHECK_LIB(dld, shl_load, ! [AC_DEFINE(HAVE_SHL_LOAD, 1, ! [Define if you have the shl_load function.]) ! LIBADD_DL="$LIBADD_DL -ldld"]) ]) ! AC_CHECK_LIB(dld, dld_link, [AC_DEFINE(HAVE_DLD, 1, ! [Define if you have the GNU dld library.])dnl ! test "x$ac_cv_lib_dld_shl_load" = yes || LIBADD_DL="$LIBADD_DL -ldld"]) ! AC_SUBST(LIBADD_DL) ! if test "x$ac_cv_func_dlopen" = xyes || test "x$ac_cv_lib_dl_dlopen" = xyes; then ! LIBS_SAVE="$LIBS" ! LIBS="$LIBS $LIBADD_DL" ! AC_CHECK_FUNCS(dlerror) ! LIBS="$LIBS_SAVE" fi ! ]) ! AC_DEFUN(AC_LTDL_GLOBAL_SYMBOL_PIPE, ! [dnl Check for command to grab the raw symbol name followed ! dnl by C symbol name from nm. ! AC_REQUIRE([AC_CANONICAL_HOST])dnl ! AC_REQUIRE([AC_PROG_NM])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. ! AC_MSG_CHECKING([command to parse $NM output]) ! AC_CACHE_VAL(ac_cv_sys_global_symbol_pipe, ! [# These are sane defaults that work on at least a few old systems. ! # {They come from Ultrix. What could be older than Ultrix?!! ;)} - changequote(,)dnl # Character class describing NM global symbol codes. ! ac_symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. ! ac_sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform the above into a raw symbol and a C symbol. ! ac_symxfrm='\1 \2\3 \3' # Transform an extracted symbol line into a proper C declaration ! ac_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" # Define system-specific variables. ! case "$host_os" in aix*) ! ac_symcode='[BCDT]' ;; ! cygwin* | mingw*) ! ac_symcode='[ABCDGISTW]' ;; ! hpux*) ! ac_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'" ;; ! irix*) ! ac_symcode='[BCDEGRST]' ;; ! solaris*) ! ac_symcode='[BDT]' ;; esac # If we're using GNU nm, then use its standard symbol codes. ! if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then ! ac_symcode='[ABCDGISTW]' ! fi ! changequote([,])dnl # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do ! ac_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($ac_symcode\)[ ][ ]*\($ac_symprfx\)$ac_sympat$/$ac_symxfrm/p'" # Check to see that the pipe works correctly. ! ac_pipe_works=no ! rm -f conftest.$ac_ext cat > conftest.$ac_ext </dev/null; then : ! else ! AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) ! _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no ! fi ! fi + # + # Check to make sure the static flag actually works. + # + AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], + _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), + $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), + [], + [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) ! AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) ! AC_LIBTOOL_PROG_COMPILER_PIC($1) ! AC_LIBTOOL_PROG_CC_C_O($1) ! AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) ! AC_LIBTOOL_PROG_LD_SHLIBS($1) ! AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) ! AC_LIBTOOL_SYS_LIB_STRIP ! AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) ! AC_LIBTOOL_DLOPEN_SELF($1) ! ! # Report which librarie types wil actually be built ! AC_MSG_CHECKING([if libtool supports shared libraries]) ! AC_MSG_RESULT([$can_build_shared]) ! ! AC_MSG_CHECKING([whether to build shared libraries]) ! test "$can_build_shared" = "no" && enable_shared=no ! ! # On AIX, shared libraries and static libraries use the same namespace, and ! # are all built from PIC. ! case "$host_os" in ! aix3*) ! test "$enable_shared" = yes && enable_static=no ! if test -n "$RANLIB"; then ! archive_cmds="$archive_cmds~\$RANLIB \$lib" ! postinstall_cmds='$RANLIB $lib' ! fi ! ;; ! ! aix4*) ! if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then ! test "$enable_shared" = yes && enable_static=no ! fi ! ;; ! darwin* | rhapsody*) ! if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then ! _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ! case "$host_os" in ! rhapsody* | darwin1.[[012]]) ! _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' ! ;; ! *) # Darwin 1.3 on ! test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' ! ;; ! esac ! # FIXME: Relying on posixy $() will cause problems for ! # cross-compilation, but unfortunately the echo tests do not ! # yet detect zsh echo's removal of \ escapes. Also zsh mangles ! # `"' quotes if we put them in here... so don't! ! output_verbose_link_cmd='echo' ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring' ! _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' ! # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ! _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ! _LT_AC_TAGVAR(hardcode_direct, $1)=no ! _LT_AC_TAGVAR(hardcode_automatic, $1)=yes ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported ! _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' ! _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ! fi ! ;; ! esac ! AC_MSG_RESULT([$enable_shared]) ! ! AC_MSG_CHECKING([whether to build static libraries]) ! # Make sure either enable_shared or enable_static is yes. ! test "$enable_shared" = yes || enable_static=yes ! AC_MSG_RESULT([$enable_static]) ! ! AC_LIBTOOL_CONFIG($1) ! ! AC_LANG_POP ! CC="$lt_save_CC" ! ])# AC_LIBTOOL_LANG_C_CONFIG ! ! ! # AC_LIBTOOL_LANG_CXX_CONFIG ! # -------------------------- ! # Ensure that the configuration vars for the C compiler are ! # suitably defined. Those variables are subsequently used by ! # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. ! AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) ! AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], ! [AC_LANG_PUSH(C++) ! AC_REQUIRE([AC_PROG_CXX]) ! AC_REQUIRE([AC_PROG_CXXCPP]) ! ! _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ! _LT_AC_TAGVAR(allow_undefined_flag, $1)= ! _LT_AC_TAGVAR(always_export_symbols, $1)=no ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)= ! _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= ! _LT_AC_TAGVAR(hardcode_direct, $1)=no ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= ! _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= ! _LT_AC_TAGVAR(hardcode_minus_L, $1)=no ! _LT_AC_TAGVAR(hardcode_automatic, $1)=no ! _LT_AC_TAGVAR(module_cmds, $1)= ! _LT_AC_TAGVAR(module_expsym_cmds, $1)= ! _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown ! _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds ! _LT_AC_TAGVAR(no_undefined_flag, $1)= ! _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= ! _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no ! ! # Dependencies to place before and after the object being linked: ! _LT_AC_TAGVAR(predep_objects, $1)= ! _LT_AC_TAGVAR(postdep_objects, $1)= ! _LT_AC_TAGVAR(predeps, $1)= ! _LT_AC_TAGVAR(postdeps, $1)= ! _LT_AC_TAGVAR(compiler_lib_search_path, $1)= ! ! # Source file extension for C++ test sources. ! ac_ext=cc ! ! # Object file extension for compiled C++ test sources. ! objext=o ! _LT_AC_TAGVAR(objext, $1)=$objext ! ! # Code to be used in simple compile tests ! lt_simple_compile_test_code="int some_variable = 0;\n" ! ! # Code to be used in simple link tests ! lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' ! ! # ltmain only uses $CC for tagged configurations so make sure $CC is set. ! _LT_AC_SYS_COMPILER ! ! # Allow CC to be a program name with arguments. ! lt_save_CC=$CC ! lt_save_LD=$LD ! lt_save_GCC=$GCC ! GCC=$GXX ! lt_save_with_gnu_ld=$with_gnu_ld ! lt_save_path_LD=$lt_cv_path_LD ! if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then ! lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx ! else ! unset lt_cv_prog_gnu_ld fi ! if test -n "${lt_cv_path_LDCXX+set}"; then ! lt_cv_path_LD=$lt_cv_path_LDCXX ! else ! unset lt_cv_path_LD ! fi ! test -z "${LDCXX+set}" || LD=$LDCXX ! CC=${CXX-"c++"} ! compiler=$CC ! _LT_AC_TAGVAR(compiler, $1)=$CC ! cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` ! # We don't want -fno-exception wen compiling C++ code, so set the ! # no_builtin_flag separately ! if test "$GXX" = yes; then ! _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ! else ! _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi ! if test "$GXX" = yes; then ! # Set up default GNU C++ configuration ! ! AC_PROG_LD ! ! # Check if GNU C++ uses GNU ld as the underlying linker, since the ! # archiving commands below assume that GNU ld is being used. ! if test "$with_gnu_ld" = yes; then ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ! ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' ! _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' ! ! # If archive_cmds runs LD, not CC, wlarc should be empty ! # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to ! # investigate it a little bit more. (MM) ! wlarc='${wl}' ! ! # ancient GNU ld didn't support --whole-archive et. al. ! if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ ! grep 'no-whole-archive' > /dev/null; then ! _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else ! _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi ! else ! with_gnu_ld=no ! wlarc= ! ! # A generic and very simple default shared library creation ! # command for GNU C++ for the case where it uses the native ! # linker, instead of GNU ld. If possible, this setting should ! # overridden to take advantage of the native linker features on ! # the platform it is being used on. ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' ! fi ! ! # Commands to make compiler produce verbose output that lists ! # what "hidden" libraries, object files and flags are used when ! # linking a shared library. ! output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' ! ! else ! GXX=no ! with_gnu_ld=no ! wlarc= fi + + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GXX" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + else + # We have old collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # -bexpall does not export symbols beginning with underscore (_) + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds it's shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + darwin* | rhapsody*) + if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + case "$host_os" in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' + ;; + *) # Darwin 1.3 on + test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' + ;; + esac + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' + + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + fi + ;; + + dgux*) + case $cc_basename in + ec++) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + freebsd[12]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + freebsd-elf*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + freebsd*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + ;; + gnu*) + ;; + hpux9*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + case "$host_cpu" in + hppa*64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + ;; + *) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case "$host_cpu" in + hppa*64*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + ia64*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC) + case "$host_cpu" in + hppa*64*|ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case "$host_cpu" in + ia64*|hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + irix5* | irix6*) + case $cc_basename in + CC) + # SGI C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + linux*) + case $cc_basename in + KCC) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc) + # Intel C++ + with_gnu_ld=yes + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + cxx) + # Compaq C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + m88k*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + mvs*) + case $cc_basename in + cxx) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + osf3*) + case $cc_basename in + KCC) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' + ;; + RCC) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ + $rm $lib.exp' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + sco*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + case $cc_basename in + CC) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + lcc) + # Lucid + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The C++ compiler is used as linker so we must use $wl + # flag to pass the commands to the underlying system + # linker. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + fi + ;; + esac + ;; + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + tandem*) + case $cc_basename in + NCC) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) + test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + + _LT_AC_TAGVAR(GCC, $1)="$GXX" + _LT_AC_TAGVAR(LD, $1)="$LD" + + AC_LIBTOOL_POSTDEP_PREDEP($1) + AC_LIBTOOL_PROG_COMPILER_PIC($1) + AC_LIBTOOL_PROG_CC_C_O($1) + AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) + AC_LIBTOOL_PROG_LD_SHLIBS($1) + AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + AC_LIBTOOL_SYS_LIB_STRIP + AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) + AC_LIBTOOL_DLOPEN_SELF($1) + + AC_LIBTOOL_CONFIG($1) + + AC_LANG_POP + CC=$lt_save_CC + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ldcxx=$with_gnu_ld + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld + ])# AC_LIBTOOL_LANG_CXX_CONFIG + + # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) + # ------------------------ + # Figure out "hidden" library dependencies from verbose + # compiler output when linking a shared library. + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ + dnl we can't use the lt_simple_compile_test_code here, + dnl because it contains code intended for an executable, + dnl not a library. It's possible we should let each + dnl tag define a new lt_????_link_test_code variable, + dnl but it's only used here... + ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" ! ifelse([$1], [], ! [#! $SHELL ! ! # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. ! # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) ! # NOTE: Changes made to this file will be lost: look at ltmain.sh. ! # ! # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 ! # Free Software Foundation, Inc. ! # ! # This file is part of GNU Libtool: ! # Originally by Gordon Matzigkeit , 1996 ! # ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2 of the License, or ! # (at your option) any later version. ! # ! # This program is distributed in the hope that it will be useful, but ! # WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! # General Public License for more details. ! # ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! # ! # As a special exception to the GNU General Public License, if you ! # distribute this file as part of a program that contains a ! # configuration script generated by Autoconf, you may include it under ! # the same distribution terms that you use for the rest of that program. ! ! # A sed program that does not truncate output. ! SED=$lt_SED ! ! # Sed that helps us avoid accidentally triggering echo(1) options like -n. ! Xsed="$SED -e s/^X//" ! ! # The HP-UX ksh and POSIX shell print the target directory to stdout ! # if CDPATH is set. ! if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi ! ! # The names of the tagged configurations supported by this script. ! available_tags= ! ! # ### BEGIN LIBTOOL CONFIG], ! [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) ! ! # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: ! ! # Shell to use when invoking shell scripts. ! SHELL=$lt_SHELL ! ! # Whether or not to build shared libraries. ! build_libtool_libs=$enable_shared ! ! # Whether or not to build static libraries. ! build_old_libs=$enable_static ! ! # Whether or not to add -lc for building shared libraries. ! build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) ! ! # Whether or not to disallow shared libs when runtime libs are static ! allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) ! ! # Whether or not to optimize for fast installation. ! fast_install=$enable_fast_install ! ! # The host system. ! host_alias=$host_alias ! host=$host ! ! # An echo program that does not interpret backslashes. ! echo=$lt_echo ! ! # The archiver. ! AR=$lt_AR ! AR_FLAGS=$lt_AR_FLAGS ! ! # A C compiler. ! LTCC=$lt_LTCC ! ! # A language-specific compiler. ! CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) ! ! # Is the compiler the GNU C compiler? ! with_gcc=$_LT_AC_TAGVAR(GCC, $1) ! ! # An ERE matcher. ! EGREP=$lt_EGREP ! ! # The linker used to build libraries. ! LD=$lt_[]_LT_AC_TAGVAR(LD, $1) ! ! # Whether we need hard or soft links. ! LN_S=$lt_LN_S ! ! # A BSD-compatible nm program. ! NM=$lt_NM ! ! # A symbol stripping program ! STRIP=$STRIP ! ! # Used to examine libraries when file_magic_cmd begins "file" ! MAGIC_CMD=$MAGIC_CMD ! ! # Used on cygwin: DLL creation program. ! DLLTOOL="$DLLTOOL" ! ! # Used on cygwin: object dumper. ! OBJDUMP="$OBJDUMP" ! ! # Used on cygwin: assembler. ! AS="$AS" ! ! # The name of the directory that contains temporary libtool files. ! objdir=$objdir ! ! # How to create reloadable object files. ! reload_flag=$lt_reload_flag ! reload_cmds=$lt_reload_cmds ! ! # How to pass a linker flag through the compiler. ! wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) ! ! # Object file suffix (normally "o"). ! objext="$ac_objext" ! ! # Old archive suffix (normally "a"). ! libext="$libext" ! ! # Shared library suffix (normally ".so"). ! shrext='$shrext' ! ! # Executable file suffix (normally ""). ! exeext="$exeext" ! ! # Additional compiler flags for building library objects. ! pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) ! pic_mode=$pic_mode ! ! # What is the maximum length of a command? ! max_cmd_len=$lt_cv_sys_max_cmd_len ! ! # Does compiler simultaneously support -c and -o options? ! compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) ! ! # Must we lock files when doing compilation ? ! need_locks=$lt_need_locks ! ! # Do we need the lib prefix for modules? ! need_lib_prefix=$need_lib_prefix ! ! # Do we need a version for libraries? ! need_version=$need_version ! ! # Whether dlopen is supported. ! dlopen_support=$enable_dlopen ! ! # Whether dlopen of programs is supported. ! dlopen_self=$enable_dlopen_self ! ! # Whether dlopen of statically linked programs is supported. ! dlopen_self_static=$enable_dlopen_self_static ! ! # Compiler flag to prevent dynamic linking. ! link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) ! ! # Compiler flag to turn off builtin functions. ! no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) ! ! # Compiler flag to allow reflexive dlopens. ! export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) ! ! # Compiler flag to generate shared objects directly from archives. ! whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) ! ! # Compiler flag to generate thread-safe objects. ! thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) ! ! # Library versioning type. ! version_type=$version_type ! ! # Format of library name prefix. ! libname_spec=$lt_libname_spec ! ! # List of archive names. First name is the real one, the rest are links. ! # The last name is the one that the linker finds with -lNAME. ! library_names_spec=$lt_library_names_spec ! ! # The coded name of the library, if different from the real name. ! soname_spec=$lt_soname_spec ! ! # Commands used to build and install an old-style archive. ! RANLIB=$lt_RANLIB ! old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) ! old_postinstall_cmds=$lt_old_postinstall_cmds ! old_postuninstall_cmds=$lt_old_postuninstall_cmds ! ! # Create an old-style archive from a shared archive. ! old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) ! ! # Create a temporary old-style archive to link instead of a shared archive. ! old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) ! ! # Commands used to build and install a shared archive. ! archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) ! archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) ! postinstall_cmds=$lt_postinstall_cmds ! postuninstall_cmds=$lt_postuninstall_cmds ! ! # Commands used to build a loadable module (assumed same as above if empty) ! module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) ! module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) ! ! # Commands to strip libraries. ! old_striplib=$lt_old_striplib ! striplib=$lt_striplib ! ! # Dependencies to place before the objects being linked to create a ! # shared library. ! predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) ! ! # Dependencies to place after the objects being linked to create a ! # shared library. ! postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) ! ! # Dependencies to place before the objects being linked to create a ! # shared library. ! predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) ! ! # Dependencies to place after the objects being linked to create a ! # shared library. ! postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) ! ! # The library search path used internally by the compiler when linking ! # a shared library. ! compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) ! ! # Method to check whether dependent libraries are shared objects. ! deplibs_check_method=$lt_deplibs_check_method ! ! # Command to use when deplibs_check_method == file_magic. ! file_magic_cmd=$lt_file_magic_cmd ! ! # Flag that allows shared libraries with undefined symbols to be built. ! allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) ! ! # Flag that forces no undefined symbols. ! no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) ! ! # Commands used to finish a libtool library installation in a directory. ! finish_cmds=$lt_finish_cmds ! ! # Same as above, but a single script fragment to be evaled but not shown. ! finish_eval=$lt_finish_eval ! ! # Take the output of nm and produce a listing of raw symbols and C names. ! global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe ! ! # Transform the output of nm in a proper C declaration ! global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl ! ! # Transform the output of nm in a C name address pair ! global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address ! ! # This is the shared library runtime path variable. ! runpath_var=$runpath_var ! ! # This is the shared library path variable. ! shlibpath_var=$shlibpath_var ! ! # Is shlibpath searched before the hard-coded library search path? ! shlibpath_overrides_runpath=$shlibpath_overrides_runpath ! ! # How to hardcode a shared library path into an executable. ! hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) ! ! # Whether we should hardcode library paths into libraries. ! hardcode_into_libs=$hardcode_into_libs ! ! # Flag to hardcode \$libdir into a binary during linking. ! # This must work even if \$libdir does not exist. ! hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) ! ! # If ld is used when linking, flag to hardcode \$libdir into ! # a binary during linking. This must work even if \$libdir does ! # not exist. ! hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) ! ! # Whether we need a single -rpath flag with a separated argument. ! hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) ! ! # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the ! # resulting binary. ! hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) ! ! # Set to yes if using the -LDIR flag during linking hardcodes DIR into the ! # resulting binary. ! hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) ! ! # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into ! # the resulting binary. ! hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) ! ! # Set to yes if building a shared library automatically hardcodes DIR into the library ! # and all subsequent libraries and executables linked against it. ! hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) ! ! # Variables whose values should be saved in libtool wrapper scripts and ! # restored at relink time. ! variables_saved_for_relink="$variables_saved_for_relink" ! ! # Whether libtool must link a program against all its dependency libraries. ! link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) ! ! # Compile-time system search path for libraries ! sys_lib_search_path_spec=$lt_sys_lib_search_path_spec ! ! # Run-time system search path for libraries ! sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec ! ! # Fix the shell variable \$srcfile for the compiler. ! fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" ! ! # Set to yes if exported symbols are required. ! always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) ! ! # The commands to list exported symbols. ! export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) ! ! # The commands to extract the exported symbol list from a shared archive. ! extract_expsyms_cmds=$lt_extract_expsyms_cmds ! ! # Symbols that should not be listed in the preloaded symbols. ! exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) ! ! # Symbols that must always be exported. ! include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ! ! ifelse([$1],[], ! [# ### END LIBTOOL CONFIG], ! [# ### END LIBTOOL TAG CONFIG: $tagname]) ! ! __EOF__ ! ! ifelse([$1],[], [ ! case $host_os in ! aix3*) ! cat <<\EOF >> "$cfgfile" ! ! # AIX sometimes has problems with the GCC collect2 program. For some ! # reason, if we set the COLLECT_NAMES environment variable, the problems ! # vanish in a puff of smoke. ! if test "X${COLLECT_NAMES+set}" != Xset; then ! COLLECT_NAMES= ! export COLLECT_NAMES fi ! EOF ! ;; ! esac ! # We use sed instead of cat because bash on DJGPP gets confused if ! # if finds mixed CR/LF and LF-only lines. Since sed operates in ! # text mode, it properly converts lines to CR/LF. This bash problem ! # is reportedly fixed, but why not run on old versions too? ! sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) ! ! mv -f "$cfgfile" "$ofile" || \ ! (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") ! chmod +x "$ofile" ]) ! else ! # If there is no Makefile yet, we rely on a make rule to execute ! # `config.status --recheck' to rerun these tests and create the ! # libtool script then. ! test -f Makefile && make "$ltmain" ! fi ! ])# AC_LIBTOOL_CONFIG ! ! # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) ! # ------------------------------------------- ! AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], ! [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl ! ! _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= ! ! if test "$GCC" = yes; then ! _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ! ! AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], ! lt_cv_prog_compiler_rtti_exceptions, ! [-fno-rtti -fno-exceptions], [], ! [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ! ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI ! ! # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE ! # --------------------------------- ! AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], ! [AC_REQUIRE([AC_CANONICAL_HOST]) ! AC_REQUIRE([AC_PROG_NM]) ! AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. ! AC_MSG_CHECKING([command to parse $NM output from $compiler object]) ! AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], ! [ ! # These are sane defaults that work on at least a few old systems. ! # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. ! symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. ! sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform the above into a raw symbol and a C symbol. ! symxfrm='\1 \2\3 \3' # Transform an extracted symbol line into a proper C declaration ! lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" ! ! # Transform an extracted symbol line into symbol name and symbol address ! lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. ! case $host_os in aix*) ! symcode='[[BCDT]]' ;; ! cygwin* | mingw* | pw32*) ! symcode='[[ABCDGISTW]]' ;; ! hpux*) # Its linker distinguishes data from code symbols ! if test "$host_cpu" = ia64; then ! symcode='[[ABCDEGRST]]' ! fi ! lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" ! lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; ! irix* | nonstopux*) ! symcode='[[BCDEGRST]]' ;; ! osf*) ! symcode='[[BCDEGQRST]]' ! ;; ! solaris* | sysv5*) ! symcode='[[BDT]]' ! ;; ! sysv4) ! symcode='[[DFNSTU]]' ! ;; ! esac ! ! # Handle CRLF in mingw tool chain ! opt_cr= ! case $build_os in ! mingw*) ! opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. ! case `$NM -V 2>&1` in ! *GNU* | *'with BFD'*) ! symcode='[[ABCDGISTW]]' ;; ! esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do ! # Write the raw and C identifiers. ! lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. ! pipe_works=no ! ! rm -f conftest* cat > conftest.$ac_ext < $ac_nlist) && test -s "$ac_nlist"; then ! # Try sorting and uniquifying the output. ! if sort "$ac_nlist" | uniq > "$ac_nlist"T; then ! mv -f "$ac_nlist"T "$ac_nlist" else ! rm -f "$ac_nlist"T fi # Make sure that we snagged all the symbols we need. ! if egrep ' nm_test_var$' "$ac_nlist" >/dev/null; then ! if egrep ' nm_test_func$' "$ac_nlist" >/dev/null; then ! cat < conftest.c #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. ! eval "$ac_global_symbol_to_cdecl"' < "$ac_nlist" >> conftest.c' ! cat <> conftest.c #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else --- 4359,4391 ---- #ifdef __cplusplus } #endif ! int main(){nm_test_var='a';nm_test_func();return(0);} EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. ! nlist=conftest.nm ! if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. ! if sort "$nlist" | uniq > "$nlist"T; then ! mv -f "$nlist"T "$nlist" else ! rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. ! if grep ' nm_test_var$' "$nlist" >/dev/null; then ! if grep ' nm_test_func$' "$nlist" >/dev/null; then ! cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. ! eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' ! cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else *************** const struct { *** 1094,1106 **** const char *name; lt_ptr_t address; } ! changequote(,)dnl ! lt_preloaded_symbols[] = ! changequote([,])dnl { EOF ! sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$ac_nlist" >> conftest.c ! cat <<\EOF >> conftest.c {0, (lt_ptr_t) 0} }; --- 4398,4408 ---- const char *name; lt_ptr_t address; } ! lt_preloaded_symbols[[]] = { EOF ! $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext ! cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; *************** EOF *** 1110,1330 **** EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext ! ac_save_LIBS="$LIBS" ! ac_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" ! CFLAGS="$CFLAGS$no_builtin_flag" ! if AC_TRY_EVAL(ac_link) && test -s conftest; then ! ac_pipe_works=yes ! else ! echo "configure: failed program was:" >&AC_FD_CC ! cat conftest.c >&AC_FD_CC fi ! LIBS="$ac_save_LIBS" ! CFLAGS="$ac_save_CFLAGS" else ! echo "cannot find nm_test_func in $ac_nlist" >&AC_FD_CC fi else ! echo "cannot find nm_test_var in $ac_nlist" >&AC_FD_CC fi else ! echo "cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC fi else ! echo "$progname: failed program was:" >&AC_FD_CC ! cat conftest.c >&AC_FD_CC fi ! rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. ! if test "$ac_pipe_works" = yes; then ! if test x"$ac_symprfx" = x"_"; then ! ac_cv_sys_symbol_underscore=yes ! else ! ac_cv_sys_symbol_underscore=no ! fi break else ! ac_cv_sys_global_symbol_pipe= fi done ]) ! ac_result=yes ! if test -z "$ac_cv_sys_global_symbol_pipe"; then ! ac_result=no fi ! AC_MSG_RESULT($ac_result) ]) ! AC_DEFUN(AC_LTDL_SYMBOL_USCORE, ! [dnl does the compiler prefix global symbols with an underscore? ! AC_REQUIRE([AC_LTDL_GLOBAL_SYMBOL_PIPE])dnl ! AC_MSG_CHECKING([for _ prefix in compiled symbols]) ! AC_CACHE_VAL(ac_cv_sys_symbol_underscore, ! [ac_cv_sys_symbol_underscore=no ! cat > conftest.$ac_ext < $ac_nlist) && test -s "$ac_nlist"; then ! # See whether the symbols have a leading underscore. ! if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then ! ac_cv_sys_symbol_underscore=yes else ! if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then ! : else ! echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC fi fi else ! echo "configure: cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC fi ! else ! echo "configure: failed program was:" >&AC_FD_CC ! cat conftest.c >&AC_FD_CC fi ! rm -rf conftest* ]) ! AC_MSG_RESULT($ac_cv_sys_symbol_underscore) ! AC_LTDL_DLSYM_USCORE ]) ! AC_DEFUN(AC_LTDL_DLSYM_USCORE, ! [AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])dnl ! if test x"$ac_cv_sys_symbol_underscore" = xyes; then ! if test x"$ac_cv_func_dlopen" = xyes || ! test x"$ac_cv_lib_dl_dlopen" = xyes ; then ! AC_CACHE_CHECK([whether we have to add an underscore for dlsym], ! libltdl_cv_need_uscore, [dnl ! AC_TRY_RUN([ ! #if HAVE_DLFCN_H ! #include ! #endif ! #include ! #ifdef RTLD_GLOBAL ! # define LTDL_GLOBAL RTLD_GLOBAL ! #else ! # ifdef DL_GLOBAL ! # define LTDL_GLOBAL DL_GLOBAL ! # else ! # define LTDL_GLOBAL 0 ! # endif ! #endif ! /* We may have to define LTDL_LAZY_OR_NOW in the command line if we ! find out it does not work in some platform. */ ! #ifndef LTDL_LAZY_OR_NOW ! # ifdef RTLD_LAZY ! # define LTDL_LAZY_OR_NOW RTLD_LAZY ! # else ! # ifdef DL_LAZY ! # define LTDL_LAZY_OR_NOW DL_LAZY ! # else ! # ifdef RTLD_NOW ! # define LTDL_LAZY_OR_NOW RTLD_NOW ! # else ! # ifdef DL_NOW ! # define LTDL_LAZY_OR_NOW DL_NOW ! # else ! # define LTDL_LAZY_OR_NOW 0 ! # endif ! # endif ! # endif ! # endif #endif ! fnord() { int i=42;} ! main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); ! if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); ! if(ptr1 && !ptr2) { dlclose(self); exit(0); } } exit(1); } ! ], libltdl_cv_need_uscore=no, libltdl_cv_need_uscore=yes, ! libltdl_cv_need_uscore=cross ! )]) fi fi if test x"$libltdl_cv_need_uscore" = xyes; then AC_DEFINE(NEED_USCORE, 1, ! [Define if dlsym() requires a leading underscode in symbol names. ]) fi ! ]) ! # Define a conditional. ! AC_DEFUN(AM_CONDITIONAL, ! [AC_SUBST($1_TRUE) ! AC_SUBST($1_FALSE) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= ! fi]) ! # Do all the work for Automake. This macro actually does too much -- ! # some checks are only needed if your package does certain things. ! # But this isn't really a big deal. ! # serial 1 ! dnl Usage: ! dnl AM_INIT_AUTOMAKE(package,version, [no-define]) ! AC_DEFUN(AM_INIT_AUTOMAKE, ! [AC_REQUIRE([AC_PROG_INSTALL]) ! PACKAGE=[$1] ! AC_SUBST(PACKAGE) ! VERSION=[$2] ! AC_SUBST(VERSION) ! dnl test to see if srcdir already configured ! if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi ! ifelse([$3],, ! AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) ! AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) ! AC_REQUIRE([AM_SANITY_CHECK]) ! AC_REQUIRE([AC_ARG_PROGRAM]) ! dnl FIXME This is truly gross. ! missing_dir=`cd $ac_aux_dir && pwd` ! AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) ! AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) ! AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) ! AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) ! AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) ! AC_REQUIRE([AC_PROG_MAKE_SET])]) # # Check to make sure that the build environment is sane. # ! AC_DEFUN(AM_SANITY_CHECK, [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 ! echo timestamp > conftestfile # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( ! set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` ! if test "[$]*" = "X"; then # -L didn't work. ! set X `ls -t $srcdir/configure conftestfile` fi ! if test "[$]*" != "X $srcdir/configure conftestfile" \ ! && test "[$]*" != "X conftestfile $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a --- 4412,6555 ---- EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext ! lt_save_LIBS="$LIBS" ! lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" ! CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" ! if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then ! pipe_works=yes fi ! LIBS="$lt_save_LIBS" ! CFLAGS="$lt_save_CFLAGS" else ! echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else ! echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else ! echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else ! echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD ! cat conftest.$ac_ext >&5 fi ! rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. ! if test "$pipe_works" = yes; then break else ! lt_cv_sys_global_symbol_pipe= fi done ]) + if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= + fi + if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) + else + AC_MSG_RESULT(ok) + fi + ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE + + + # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) + # --------------------------------------- + AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], + [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= + + AC_MSG_CHECKING([for $compiler option to produce PIC]) + ifelse([$1],[CXX],[ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux*) + case $cc_basename in + KCC) + # KAI C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + icpc) + # Intel C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + cxx) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC) + # Rational C++ 2.4.1 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx) + # Digital/Compaq C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + sco*) + case $cc_basename in + CC) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + *) + ;; + esac + ;; + solaris*) + case $cc_basename in + CC) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC) + # Sun C++ 4.x + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc) + # Lucid + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC) + # NonStop-UX NCC 3.20 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + unixware*) + ;; + vxworks*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi + ], + [ + if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + newsos6) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + linux*) + case $CC in + icc|ecc) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + ccc) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + sco3.2v5*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' + ;; + + solaris*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sunos4*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + uts4*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi + ]) + AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) ! # ! # Check to make sure the PIC flag actually works. ! # ! if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then ! AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], ! _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), ! [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], ! [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in ! "" | " "*) ;; ! *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; ! esac], ! [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ! _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi ! case "$host_os" in ! # For platforms which do not support PIC, -DPIC is meaningless: ! *djgpp*) ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ! ;; ! *) ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ! ;; ! esac ]) ! ! # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) ! # ------------------------------------ ! # See if the linker supports building shared libraries. ! AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], ! [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ! ifelse([$1],[CXX],[ ! _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ! case $host_os in ! aix4* | aix5*) ! # If we're using GNU nm, then we don't want the "-C" option. ! # -C means demangle to AIX nm, but means don't demangle with GNU nm ! if $NM -V 2>&1 | grep 'GNU' > /dev/null; then ! _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else ! _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' ! fi ! ;; ! pw32*) ! _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ! ;; ! cygwin* | mingw*) ! _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' ! ;; ! *) ! _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ! ;; ! esac ! ],[ ! runpath_var= ! _LT_AC_TAGVAR(allow_undefined_flag, $1)= ! _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no ! _LT_AC_TAGVAR(archive_cmds, $1)= ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)= ! _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= ! _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= ! _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= ! _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= ! _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= ! _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= ! _LT_AC_TAGVAR(hardcode_direct, $1)=no ! _LT_AC_TAGVAR(hardcode_minus_L, $1)=no ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported ! _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown ! _LT_AC_TAGVAR(hardcode_automatic, $1)=no ! _LT_AC_TAGVAR(module_cmds, $1)= ! _LT_AC_TAGVAR(module_expsym_cmds, $1)= ! _LT_AC_TAGVAR(always_export_symbols, $1)=no ! _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ! # include_expsyms should be a list of space-separated symbols to be *always* ! # included in the symbol list ! _LT_AC_TAGVAR(include_expsyms, $1)= ! # exclude_expsyms can be an extended regexp of symbols to exclude ! # it will be wrapped by ` (' and `)$', so one must not match beginning or ! # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', ! # as well as any symbol that contains `d'. ! _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" ! # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out ! # platforms (ab)use it in PIC code, but their linkers get confused if ! # the symbol is explicitly referenced. Since portable code cannot ! # rely on this symbol name, it's probably fine to never include it in ! # preloaded symbol tables. ! extract_expsyms_cmds= ! ! case $host_os in ! cygwin* | mingw* | pw32*) ! # FIXME: the MSVC++ port hasn't been tested in a loooong time ! # When not using gcc, we currently assume that we are using ! # Microsoft Visual C++. ! if test "$GCC" != yes; then ! with_gnu_ld=no ! fi ! ;; ! openbsd*) ! with_gnu_ld=no ! ;; ! esac ! ! _LT_AC_TAGVAR(ld_shlibs, $1)=yes ! if test "$with_gnu_ld" = yes; then ! # If archive_cmds runs LD, not CC, wlarc should be empty ! wlarc='${wl}' ! ! # See if GNU ld supports shared libraries. ! case $host_os in ! aix3* | aix4* | aix5*) ! # On AIX/PPC, the GNU linker is very broken ! if test "$host_cpu" != ia64; then ! _LT_AC_TAGVAR(ld_shlibs, $1)=no ! cat <&2 ! ! *** Warning: the GNU linker, at least up to release 2.9.1, is reported ! *** to be unable to reliably create shared libraries on AIX. ! *** Therefore, libtool is disabling shared libraries support. If you ! *** really care for shared libraries, you may want to modify your PATH ! *** so that a non-GNU linker is found, and then restart. ! ! EOF ! fi ! ;; ! ! amigaos*) ! _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ! _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ! ! # Samuel A. Falvo II reports ! # that the semantics of dynamic libraries on AmigaOS, at least up ! # to version 4, is to share data among multiple programs linked ! # with the same dynamic library. Since this doesn't match the ! # behavior of shared libraries on other platforms, we can't use ! # them. ! _LT_AC_TAGVAR(ld_shlibs, $1)=no ! ;; ! ! beos*) ! if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then ! _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported ! # Joseph Beckenbach says some releases of gcc ! # support --undefined. This deserves some investigation. FIXME ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ! _LT_AC_TAGVAR(ld_shlibs, $1)=no ! fi ! ;; ! ! cygwin* | mingw* | pw32*) ! # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, ! # as there is no search path for DLLs. ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ! _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported ! _LT_AC_TAGVAR(always_export_symbols, $1)=no ! _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ! _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' ! ! if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' ! # If the export-symbols file already is a .def file (1st line ! # is EXPORTS), use it as is; otherwise, prepend... ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ! cp $export_symbols $output_objdir/$soname.def; ! else ! echo EXPORTS > $output_objdir/$soname.def; ! cat $export_symbols >> $output_objdir/$soname.def; ! fi~ ! $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' ! else ! ld_shlibs=no ! fi ! ;; ! ! netbsd*) ! if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' ! wlarc= ! else ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ! fi ! ;; ! ! solaris* | sysv5*) ! if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ! _LT_AC_TAGVAR(ld_shlibs, $1)=no ! cat <&2 ! ! *** Warning: The releases 2.8.* of the GNU linker cannot reliably ! *** create shared libraries on Solaris systems. Therefore, libtool ! *** is disabling shared libraries support. We urge you to upgrade GNU ! *** binutils to release 2.9.1 or newer. Another option is to modify ! *** your PATH or compiler configuration so that the native linker is ! *** used, and then restart. ! ! EOF ! elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ! else ! _LT_AC_TAGVAR(ld_shlibs, $1)=no ! fi ! ;; ! ! sunos4*) ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' ! wlarc= ! _LT_AC_TAGVAR(hardcode_direct, $1)=yes ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! ;; ! ! *) ! if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ! else ! _LT_AC_TAGVAR(ld_shlibs, $1)=no ! fi ! ;; ! esac ! ! if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then ! runpath_var=LD_RUN_PATH ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' ! _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' ! # ancient GNU ld didn't support --whole-archive et. al. ! if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then ! _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' ! else ! _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi fi else ! # PORTME fill in a description of your system's linker (not GNU ld) ! case $host_os in ! aix3*) ! _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported ! _LT_AC_TAGVAR(always_export_symbols, $1)=yes ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' ! # Note: this linker hardcodes the directories in LIBPATH if there ! # are no directories specified by -L. ! _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ! if test "$GCC" = yes && test -z "$link_static_flag"; then ! # Neither direct hardcoding nor static linking is supported with a ! # broken collect2. ! _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported ! fi ! ;; ! ! aix4* | aix5*) ! if test "$host_cpu" = ia64; then ! # On IA64, the linker does run time linking by default, so we don't ! # have to do anything special. ! aix_use_runtimelinking=no ! exp_sym_flag='-Bexport' ! no_entry_flag="" ! else ! # If we're using GNU nm, then we don't want the "-C" option. ! # -C means demangle to AIX nm, but means don't demangle with GNU nm ! if $NM -V 2>&1 | grep 'GNU' > /dev/null; then ! _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' ! else ! _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' ! fi ! aix_use_runtimelinking=no ! ! # Test if we are trying to use run time linking or normal ! # AIX style linking. If -brtl is somewhere in LDFLAGS, we ! # need to do runtime linking. ! case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) ! for ld_flag in $LDFLAGS; do ! if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then ! aix_use_runtimelinking=yes ! break ! fi ! done ! esac ! ! exp_sym_flag='-bexport' ! no_entry_flag='-bnoentry' ! fi ! ! # When large executables or shared objects are built, AIX ld can ! # have problems creating the table of contents. If linking a library ! # or program results in "error TOC overflow" add -mminimal-toc to ! # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not ! # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. ! ! _LT_AC_TAGVAR(archive_cmds, $1)='' ! _LT_AC_TAGVAR(hardcode_direct, $1)=yes ! _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' ! _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ! ! if test "$GCC" = yes; then ! case $host_os in aix4.[012]|aix4.[012].*) ! # We only want to do this on AIX 4.2 and lower, the check ! # below for broken collect2 doesn't work under 4.3+ ! collect2name=`${CC} -print-prog-name=collect2` ! if test -f "$collect2name" && \ ! strings "$collect2name" | grep resolve_lib_name >/dev/null ! then ! # We have reworked collect2 ! _LT_AC_TAGVAR(hardcode_direct, $1)=yes ! else ! # We have old collect2 ! _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported ! # It fails to find uninstalled libraries when the uninstalled ! # path is not listed in the libpath. Setting hardcode_minus_L ! # to unsupported forces relinking ! _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ! _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= ! fi ! esac ! shared_flag='-shared' ! else ! # not using gcc ! if test "$host_cpu" = ia64; then ! # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release ! # chokes on -Wl,-G. The following line is correct: ! shared_flag='-G' ! else ! if test "$aix_use_runtimelinking" = yes; then ! shared_flag='${wl}-G' ! else ! shared_flag='${wl}-bM:SRE' ! fi ! fi ! fi ! ! # It seems that -bexpall does not export symbols beginning with ! # underscore (_), so it is better to generate a list of symbols to export. ! _LT_AC_TAGVAR(always_export_symbols, $1)=yes ! if test "$aix_use_runtimelinking" = yes; then ! # Warning - without using the other runtime loading flags (-brtl), ! # -berok will link without error, but may produce a broken library. ! _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' ! # Determine the default libpath from the value encoded in an empty executable. ! _LT_AC_SYS_LIBPATH_AIX ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" ! else ! if test "$host_cpu" = ia64; then ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' ! _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" ! else ! # Determine the default libpath from the value encoded in an empty executable. ! _LT_AC_SYS_LIBPATH_AIX ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" ! # Warning - without using the other run time loading flags, ! # -berok will link without error, but may produce a broken library. ! _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' ! _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' ! # -bexpall does not export symbols beginning with underscore (_) ! _LT_AC_TAGVAR(always_export_symbols, $1)=yes ! # Exported symbols can be pulled into shared objects from archives ! _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' ! _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ! # This is similar to how AIX traditionally builds it's shared libraries. ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' ! fi ! fi ! ;; ! ! amigaos*) ! _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ! _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ! # see comment about different semantics on the GNU ld section ! _LT_AC_TAGVAR(ld_shlibs, $1)=no ! ;; ! ! bsdi4*) ! _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ! ;; ! ! cygwin* | mingw* | pw32*) ! # When not using gcc, we currently assume that we are using ! # Microsoft Visual C++. ! # hardcode_libdir_flag_spec is actually meaningless, as there is ! # no search path for DLLs. ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' ! _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported ! # Tell ltmain to make .lib files, not .a files. ! libext=lib ! # Tell ltmain to make .dll files, not .so files. ! shrext=".dll" ! # FIXME: Setting linknames here is a bad hack. ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' ! # The linker will automatically build a .lib file if we build a DLL. ! _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' ! # FIXME: Should let the user specify the lib program. ! _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' ! fix_srcfile_path='`cygpath -w "$srcfile"`' ! _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ! ;; ! ! darwin* | rhapsody*) ! if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then ! _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ! case "$host_os" in ! rhapsody* | darwin1.[[012]]) ! _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' ! ;; ! *) # Darwin 1.3 on ! test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' ! ;; ! esac ! # FIXME: Relying on posixy $() will cause problems for ! # cross-compilation, but unfortunately the echo tests do not ! # yet detect zsh echo's removal of \ escapes. Also zsh mangles ! # `"' quotes if we put them in here... so don't! ! lt_int_apple_cc_single_mod=no ! output_verbose_link_cmd='echo' ! if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then ! lt_int_apple_cc_single_mod=yes ! fi ! if test "X$lt_int_apple_cc_single_mod" = Xyes ; then ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' ! else ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' ! fi ! _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' ! # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's ! if test "X$lt_int_apple_cc_single_mod" = Xyes ; then ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ! else ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ! fi ! _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ! _LT_AC_TAGVAR(hardcode_direct, $1)=no ! _LT_AC_TAGVAR(hardcode_automatic, $1)=yes ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported ! _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' ! _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ! fi ! ;; ! ! dgux*) ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! ;; ! ! freebsd1*) ! _LT_AC_TAGVAR(ld_shlibs, $1)=no ! ;; ! ! # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor ! # support. Future versions do this automatically, but an explicit c++rt0.o ! # does not break anything, and helps significantly (at the cost of a little ! # extra space). ! freebsd2.2*) ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ! _LT_AC_TAGVAR(hardcode_direct, $1)=yes ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! ;; ! ! # Unfortunately, older versions of FreeBSD 2 do not have this feature. ! freebsd2*) ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' ! _LT_AC_TAGVAR(hardcode_direct, $1)=yes ! _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! ;; ! ! # FreeBSD 3 and greater uses gcc -shared to do shared libraries. ! freebsd*) ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ! _LT_AC_TAGVAR(hardcode_direct, $1)=yes ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! ;; ! ! hpux9*) ! if test "$GCC" = yes; then ! _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ! else ! _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ! fi ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' ! _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ! _LT_AC_TAGVAR(hardcode_direct, $1)=yes ! ! # hardcode_minus_L: Not really in the search PATH, ! # but as the default location of the library. ! _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ! _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ! ;; ! ! hpux10* | hpux11*) ! if test "$GCC" = yes -a "$with_gnu_ld" = no; then ! case "$host_cpu" in ! hppa*64*|ia64*) ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ! ;; ! *) ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ! ;; ! esac ! else ! case "$host_cpu" in ! hppa*64*|ia64*) ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ! ;; ! *) ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ! ;; ! esac ! fi ! if test "$with_gnu_ld" = no; then ! case "$host_cpu" in ! hppa*64*) ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' ! _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ! _LT_AC_TAGVAR(hardcode_direct, $1)=no ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! ;; ! ia64*) ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ! _LT_AC_TAGVAR(hardcode_direct, $1)=no ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! ! # hardcode_minus_L: Not really in the search PATH, ! # but as the default location of the library. ! _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ! ;; ! *) ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' ! _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ! _LT_AC_TAGVAR(hardcode_direct, $1)=yes ! _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ! ! # hardcode_minus_L: Not really in the search PATH, ! # but as the default location of the library. ! _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ! ;; ! esac ! fi ! ;; ! ! irix5* | irix6* | nonstopux*) ! if test "$GCC" = yes; then ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ! else ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' ! fi ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ! _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ! _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ! ;; ! ! netbsd*) ! if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out ! else ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF ! fi ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ! _LT_AC_TAGVAR(hardcode_direct, $1)=yes ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! ;; ! ! newsos6) ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! _LT_AC_TAGVAR(hardcode_direct, $1)=yes ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ! _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! ;; ! ! openbsd*) ! _LT_AC_TAGVAR(hardcode_direct, $1)=yes ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ! _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ! else ! case $host_os in ! openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ! ;; ! *) ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ! ;; ! esac ! fi ! ;; ! ! os2*) ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ! _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ! _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported ! _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' ! _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ! ;; ! ! osf3*) ! if test "$GCC" = yes; then ! _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ! else ! _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' ! fi ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ! _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ! ;; ! ! osf4* | osf5*) # as osf3* with the addition of -msym flag ! if test "$GCC" = yes; then ! _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ! else ! _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ ! $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' ! ! # Both c and cxx compiler support -rpath directly ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ! fi ! _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ! ;; ! ! sco3.2v5*) ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' ! runpath_var=LD_RUN_PATH ! hardcode_runpath_var=yes ! ;; ! ! solaris*) ! _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' ! if test "$GCC" = yes; then ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ ! $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' ! else ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ ! $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' ! fi ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! case $host_os in ! solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; ! *) # Supported since Solaris 2.6 (maybe 2.5.1?) ! _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; ! esac ! _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ! ;; ! ! sunos4*) ! if test "x$host_vendor" = xsequent; then ! # Use $CC to link under sequent, because it throws in some extra .o ! # files that make .init and .fini sections work. ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' ! else ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' ! fi ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ! _LT_AC_TAGVAR(hardcode_direct, $1)=yes ! _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! ;; ! ! sysv4) ! case $host_vendor in ! sni) ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ! ;; ! siemens) ! ## LD is ld it makes a PLAMLIB ! ## CC just makes a GrossModule. ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' ! _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' ! _LT_AC_TAGVAR(hardcode_direct, $1)=no ! ;; ! motorola) ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ! ;; ! esac ! runpath_var='LD_RUN_PATH' ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! ;; ! ! sysv4.3*) ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ! ;; ! ! sysv4*MP*) ! if test -d /usr/nec; then ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! runpath_var=LD_RUN_PATH ! hardcode_runpath_var=yes ! _LT_AC_TAGVAR(ld_shlibs, $1)=yes ! fi ! ;; ! ! sysv4.2uw2*) ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' ! _LT_AC_TAGVAR(hardcode_direct, $1)=yes ! _LT_AC_TAGVAR(hardcode_minus_L, $1)=no ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! hardcode_runpath_var=yes ! runpath_var=LD_RUN_PATH ! ;; ! ! sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) ! _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' ! if test "$GCC" = yes; then ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ! else ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ! fi ! runpath_var='LD_RUN_PATH' ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! ;; ! ! sysv5*) ! _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' ! # $CC -shared without GNU ld will not create a library from C++ ! # object files and a static libstdc++, better avoid it by now ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' ! _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ ! $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! runpath_var='LD_RUN_PATH' ! ;; ! ! uts4*) ! _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ! _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ! ;; ! ! *) ! _LT_AC_TAGVAR(ld_shlibs, $1)=no ! ;; ! esac fi ! ]) ! AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) ! test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no ! ! variables_saved_for_relink="PATH $shlibpath_var $runpath_var" ! if test "$GCC" = yes; then ! variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi ! ! # ! # Do we need to explicitly link libc? ! # ! case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in ! x|xyes) ! # Assume -lc should be added ! _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ! ! if test "$enable_shared" = yes && test "$GCC" = yes; then ! case $_LT_AC_TAGVAR(archive_cmds, $1) in ! *'~'*) ! # FIXME: we may have to deal with multi-command sequences. ! ;; ! '$CC '*) ! # Test whether the compiler implicitly links with -lc since on some ! # systems, -lgcc has to come before -lc. If gcc already passes -lc ! # to ld, don't add -lc before -lgcc. ! AC_MSG_CHECKING([whether -lc should be explicitly linked in]) ! $rm conftest* ! printf "$lt_simple_compile_test_code" > conftest.$ac_ext ! ! if AC_TRY_EVAL(ac_compile) 2>conftest.err; then ! soname=conftest ! lib=conftest ! libobjs=conftest.$ac_objext ! deplibs= ! wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) ! compiler_flags=-v ! linker_flags=-v ! verstring= ! output_objdir=. ! libname=conftest ! lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) ! _LT_AC_TAGVAR(allow_undefined_flag, $1)= ! if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) ! then ! _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ! else ! _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ! fi ! _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag ! else ! cat conftest.err 1>&5 ! fi ! $rm conftest* ! AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ! ;; ! esac ! fi ! ;; ! esac ! ])# AC_LIBTOOL_PROG_LD_SHLIBS ! ! ! # _LT_AC_FILE_LTDLL_C ! # ------------------- ! # Be careful that the start marker always follows a newline. ! AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ ! # /* ltdll.c starts here */ ! # #define WIN32_LEAN_AND_MEAN ! # #include ! # #undef WIN32_LEAN_AND_MEAN ! # #include ! # ! # #ifndef __CYGWIN__ ! # # ifdef __CYGWIN32__ ! # # define __CYGWIN__ __CYGWIN32__ ! # # endif ! # #endif ! # ! # #ifdef __cplusplus ! # extern "C" { ! # #endif ! # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); ! # #ifdef __cplusplus ! # } ! # #endif ! # ! # #ifdef __CYGWIN__ ! # #include ! # DECLARE_CYGWIN_DLL( DllMain ); ! # #endif ! # HINSTANCE __hDllInstance_base; ! # ! # BOOL APIENTRY ! # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) ! # { ! # __hDllInstance_base = hInst; ! # return TRUE; ! # } ! # /* ltdll.c ends here */ ! ])# _LT_AC_FILE_LTDLL_C ! ! ! # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) ! # --------------------------------- ! AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) ! ! ! # old names ! AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) ! AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) ! AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) ! AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) ! AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) ! AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) ! AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) ! ! # This is just to silence aclocal about the macro not being used ! ifelse([AC_DISABLE_FAST_INSTALL]) ! ! AC_DEFUN([LT_AC_PROG_GCJ], ! [AC_CHECK_TOOL(GCJ, gcj, no) ! test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" ! AC_SUBST(GCJFLAGS) ]) ! ! AC_DEFUN([LT_AC_PROG_RC], ! [AC_CHECK_TOOL(RC, windres, no) ]) ! # NOTE: This macro has been submitted for inclusion into # ! # GNU Autoconf as AC_PROG_SED. When it is available in # ! # a released version of Autoconf we should remove this # ! # macro and use it instead. # ! # LT_AC_PROG_SED ! # -------------- ! # Check for a fully-functional sed program, that truncates ! # as few characters as possible. Prefer GNU sed if found. ! AC_DEFUN([LT_AC_PROG_SED], ! [AC_MSG_CHECKING([for a sed that does not truncate output]) ! AC_CACHE_VAL(lt_cv_path_SED, ! [# Loop through the user's path and test for sed and gsed. ! # Then use that list of sed's as ones to test for truncation. ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for lt_ac_prog in sed gsed; do ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then ! lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" ! fi ! done ! done ! done ! lt_ac_max=0 ! lt_ac_count=0 ! # Add /usr/xpg4/bin/sed as it is typically found on Solaris ! # along with /bin/sed that truncates output. ! for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do ! test ! -f $lt_ac_sed && break ! cat /dev/null > conftest.in ! lt_ac_count=0 ! echo $ECHO_N "0123456789$ECHO_C" >conftest.in ! # Check for GNU sed and select it if it is found. ! if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then ! lt_cv_path_SED=$lt_ac_sed ! break ! fi ! while true; do ! cat conftest.in conftest.in >conftest.tmp ! mv conftest.tmp conftest.in ! cp conftest.in conftest.nl ! echo >>conftest.nl ! $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break ! cmp -s conftest.out conftest.nl || break ! # 10000 chars as input seems more than enough ! test $lt_ac_count -gt 10 && break ! lt_ac_count=`expr $lt_ac_count + 1` ! if test $lt_ac_count -gt $lt_ac_max; then ! lt_ac_max=$lt_ac_count ! lt_cv_path_SED=$lt_ac_sed ! fi ! done ! done ! SED=$lt_cv_path_SED ! ]) ! AC_MSG_RESULT([$SED]) ! ]) ! # serial 6 AC_LIB_LTDL ! # AC_WITH_LTDL ! # ------------ ! # Clients of libltdl can use this macro to allow the installer to ! # choose between a shipped copy of the ltdl sources or a preinstalled ! # version of the library. ! AC_DEFUN([AC_WITH_LTDL], ! [AC_REQUIRE([AC_LIB_LTDL]) ! AC_SUBST([LIBLTDL]) ! AC_SUBST([INCLTDL]) ! # Unless the user asks us to check, assume no installed ltdl exists. ! use_installed_libltdl=no ! ! AC_ARG_WITH([included_ltdl], ! [ --with-included-ltdl use the GNU ltdl sources included here]) ! ! if test "x$with_included_ltdl" != xyes; then ! # We are not being forced to use the included libltdl sources, so ! # decide whether there is a useful installed version we can use. ! AC_CHECK_HEADER([ltdl.h], ! [AC_CHECK_LIB([ltdl], [lt_dlcaller_register], ! [with_included_ltdl=no], ! [with_included_ltdl=yes]) ! ]) ! fi ! ! if test "x$enable_ltdl_install" != xyes; then ! # If the user did not specify an installable libltdl, then default ! # to a convenience lib. ! AC_LIBLTDL_CONVENIENCE ! fi ! ! if test "x$with_included_ltdl" = xno; then ! # If the included ltdl is not to be used. then Use the ! # preinstalled libltdl we found. ! AC_DEFINE([HAVE_LTDL], 1, ! [Define this if a modern libltdl is already installed]) ! LIBLTDL=-lltdl ! fi ! ! # Report our decision... ! AC_MSG_CHECKING([whether to use included libltdl]) ! AC_MSG_RESULT([$with_included_ltdl]) ! ! AC_CONFIG_SUBDIRS([libltdl]) ! ])# AC_WITH_LTDL ! ! ! # AC_LIB_LTDL ! # ----------- ! # Perform all the checks necessary for compilation of the ltdl objects ! # -- including compiler checks and header checks. ! AC_DEFUN([AC_LIB_LTDL], ! [AC_PREREQ(2.50) ! AC_REQUIRE([AC_PROG_CC]) ! AC_REQUIRE([AC_C_CONST]) ! AC_REQUIRE([AC_HEADER_STDC]) ! AC_REQUIRE([AC_HEADER_DIRENT]) ! AC_REQUIRE([_LT_AC_CHECK_DLFCN]) ! AC_REQUIRE([AC_LTDL_ENABLE_INSTALL]) ! AC_REQUIRE([AC_LTDL_SHLIBEXT]) ! AC_REQUIRE([AC_LTDL_SHLIBPATH]) ! AC_REQUIRE([AC_LTDL_SYSSEARCHPATH]) ! AC_REQUIRE([AC_LTDL_OBJDIR]) ! AC_REQUIRE([AC_LTDL_DLPREOPEN]) ! AC_REQUIRE([AC_LTDL_DLLIB]) ! AC_REQUIRE([AC_LTDL_SYMBOL_USCORE]) ! AC_REQUIRE([AC_LTDL_DLSYM_USCORE]) ! AC_REQUIRE([AC_LTDL_SYS_DLOPEN_DEPLIBS]) ! AC_REQUIRE([AC_LTDL_FUNC_ARGZ]) ! ! AC_CHECK_HEADERS([assert.h ctype.h errno.h malloc.h memory.h stdlib.h \ ! stdio.h unistd.h]) ! AC_CHECK_HEADERS([dl.h sys/dl.h dld.h mach-o/dyld.h]) ! AC_CHECK_HEADERS([string.h strings.h], [break]) ! ! AC_CHECK_FUNCS([strchr index], [break]) ! AC_CHECK_FUNCS([strrchr rindex], [break]) ! AC_CHECK_FUNCS([memcpy bcopy], [break]) ! AC_CHECK_FUNCS([memmove strcmp]) ! AC_CHECK_FUNCS([closedir opendir readdir]) ! ])# AC_LIB_LTDL ! ! ! # AC_LTDL_ENABLE_INSTALL ! # ---------------------- ! AC_DEFUN([AC_LTDL_ENABLE_INSTALL], ! [AC_ARG_ENABLE([ltdl-install], ! [AC_HELP_STRING([--enable-ltdl-install], [install libltdl])]) ! ! AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno) ! AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno) ! ])])# AC_LTDL_ENABLE_INSTALL ! ! ! # AC_LTDL_SYS_DLOPEN_DEPLIBS ! # -------------------------- ! AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], ! [AC_REQUIRE([AC_CANONICAL_HOST]) ! AC_CACHE_CHECK([whether deplibs are loaded by dlopen], ! [libltdl_cv_sys_dlopen_deplibs], ! [# PORTME does your system automatically load deplibs for dlopen? ! # or its logical equivalent (e.g. shl_load for HP-UX < 11) ! # For now, we just catch OSes we know something about -- in the ! # future, we'll try test this programmatically. ! libltdl_cv_sys_dlopen_deplibs=unknown ! case "$host_os" in ! aix3*|aix4.1.*|aix4.2.*) ! # Unknown whether this is true for these versions of AIX, but ! # we want this `case' here to explicitly catch those versions. ! libltdl_cv_sys_dlopen_deplibs=unknown ! ;; ! aix[[45]]*) ! libltdl_cv_sys_dlopen_deplibs=yes ! ;; ! darwin*) ! # Assuming the user has installed a libdl from somewhere, this is true ! # If you are looking for one http://www.opendarwin.org/projects/dlcompat ! libltdl_cv_sys_dlopen_deplibs=yes ! ;; ! gnu*) ! libltdl_cv_sys_dlopen_deplibs=yes ! ;; ! hpux10*|hpux11*) ! libltdl_cv_sys_dlopen_deplibs=yes ! ;; ! irix[[12345]]*|irix6.[[01]]*) ! # Catch all versions of IRIX before 6.2, and indicate that we don't ! # know how it worked for any of those versions. ! libltdl_cv_sys_dlopen_deplibs=unknown ! ;; ! irix*) ! # The case above catches anything before 6.2, and it's known that ! # at 6.2 and later dlopen does load deplibs. ! libltdl_cv_sys_dlopen_deplibs=yes ! ;; ! linux*) ! libltdl_cv_sys_dlopen_deplibs=yes ! ;; ! netbsd*) ! libltdl_cv_sys_dlopen_deplibs=yes ! ;; ! openbsd*) ! libltdl_cv_sys_dlopen_deplibs=yes ! ;; ! osf[[1234]]*) ! # dlopen did load deplibs (at least at 4.x), but until the 5.x series, ! # it did *not* use an RPATH in a shared library to find objects the ! # library depends on, so we explictly say `no'. ! libltdl_cv_sys_dlopen_deplibs=no ! ;; ! osf5.0|osf5.0a|osf5.1) ! # dlopen *does* load deplibs and with the right loader patch applied ! # it even uses RPATH in a shared library to search for shared objects ! # that the library depends on, but there's no easy way to know if that ! # patch is installed. Since this is the case, all we can really ! # say is unknown -- it depends on the patch being installed. If ! # it is, this changes to `yes'. Without it, it would be `no'. ! libltdl_cv_sys_dlopen_deplibs=unknown ! ;; ! osf*) ! # the two cases above should catch all versions of osf <= 5.1. Read ! # the comments above for what we know about them. ! # At > 5.1, deplibs are loaded *and* any RPATH in a shared library ! # is used to find them so we can finally say `yes'. ! libltdl_cv_sys_dlopen_deplibs=yes ! ;; ! solaris*) ! libltdl_cv_sys_dlopen_deplibs=yes ! ;; ! esac ! ]) ! if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then ! AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1], ! [Define if the OS needs help to load dependent libraries for dlopen().]) ! fi ! ])# AC_LTDL_SYS_DLOPEN_DEPLIBS ! ! ! # AC_LTDL_SHLIBEXT ! # ---------------- ! AC_DEFUN([AC_LTDL_SHLIBEXT], ! [AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) ! AC_CACHE_CHECK([which extension is used for loadable modules], ! [libltdl_cv_shlibext], ! [ ! # Here in libltdl for libgcj we don't build modules for darwin. ! # So we say no. Then the extension gets .dylib which is the right ! # thing for shared libraries on darwin. ! case "$host_os" in ! darwin*) ! module=no ! ;; ! *) ! module=yes ! ;; ! esac ! eval libltdl_cv_shlibext=$shrext ! ]) ! if test -n "$libltdl_cv_shlibext"; then ! AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext", ! [Define to the extension used for shared libraries, say, ".so".]) ! fi ! ])# AC_LTDL_SHLIBEXT ! ! ! # AC_LTDL_SHLIBPATH ! # ----------------- ! AC_DEFUN([AC_LTDL_SHLIBPATH], ! [AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) ! AC_CACHE_CHECK([which variable specifies run-time library path], ! [libltdl_cv_shlibpath_var], [libltdl_cv_shlibpath_var="$shlibpath_var"]) ! if test -n "$libltdl_cv_shlibpath_var"; then ! AC_DEFINE_UNQUOTED(LTDL_SHLIBPATH_VAR, "$libltdl_cv_shlibpath_var", ! [Define to the name of the environment variable that determines the dynamic library search path.]) ! fi ! ])# AC_LTDL_SHLIBPATH ! ! ! # AC_LTDL_SYSSEARCHPATH ! # --------------------- ! AC_DEFUN([AC_LTDL_SYSSEARCHPATH], ! [AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) ! AC_CACHE_CHECK([for the default library search path], ! [libltdl_cv_sys_search_path], ! [libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec"]) ! if test -n "$libltdl_cv_sys_search_path"; then ! sys_search_path= ! for dir in $libltdl_cv_sys_search_path; do ! if test -z "$sys_search_path"; then ! sys_search_path="$dir" ! else ! sys_search_path="$sys_search_path$PATH_SEPARATOR$dir" ! fi ! done ! AC_DEFINE_UNQUOTED(LTDL_SYSSEARCHPATH, "$sys_search_path", ! [Define to the system default library search path.]) ! fi ! ])# AC_LTDL_SYSSEARCHPATH ! ! ! # AC_LTDL_OBJDIR ! # -------------- ! AC_DEFUN([AC_LTDL_OBJDIR], ! [AC_CACHE_CHECK([for objdir], ! [libltdl_cv_objdir], ! [libltdl_cv_objdir="$objdir" ! if test -n "$objdir"; then ! : ! else ! rm -f .libs 2>/dev/null ! mkdir .libs 2>/dev/null ! if test -d .libs; then ! libltdl_cv_objdir=.libs ! else ! # MS-DOS does not allow filenames that begin with a dot. ! libltdl_cv_objdir=_libs ! fi ! rmdir .libs 2>/dev/null ! fi ! ]) ! AC_DEFINE_UNQUOTED(LTDL_OBJDIR, "$libltdl_cv_objdir/", ! [Define to the sub-directory in which libtool stores uninstalled libraries.]) ! ])# AC_LTDL_OBJDIR ! ! ! # AC_LTDL_DLPREOPEN ! # ----------------- ! AC_DEFUN([AC_LTDL_DLPREOPEN], ! [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE]) ! AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen], ! [libltdl_cv_preloaded_symbols], ! [if test -n "$lt_cv_sys_global_symbol_pipe"; then ! libltdl_cv_preloaded_symbols=yes ! else ! libltdl_cv_preloaded_symbols=no ! fi ! ]) ! if test x"$libltdl_cv_preloaded_symbols" = xyes; then ! AC_DEFINE(HAVE_PRELOADED_SYMBOLS, 1, ! [Define if libtool can extract symbol lists from object files.]) ! fi ! ])# AC_LTDL_DLPREOPEN ! ! ! # AC_LTDL_DLLIB ! # ------------- ! AC_DEFUN([AC_LTDL_DLLIB], ! [LIBADD_DL= ! AC_SUBST(LIBADD_DL) ! AC_LANG_PUSH([C]) ! ! AC_CHECK_FUNC([shl_load], ! [AC_DEFINE([HAVE_SHL_LOAD], [1], ! [Define if you have the shl_load function.])], ! [AC_CHECK_LIB([dld], [shl_load], ! [AC_DEFINE([HAVE_SHL_LOAD], [1], ! [Define if you have the shl_load function.]) ! LIBADD_DL="$LIBADD_DL -ldld"], ! [AC_CHECK_LIB([dl], [dlopen], ! [AC_DEFINE([HAVE_LIBDL], [1], ! [Define if you have the libdl library or equivalent.]) ! LIBADD_DL="-ldl" libltdl_cv_lib_dl_dlopen="yes"], ! [AC_TRY_LINK([#if HAVE_DLFCN_H ! # include #endif + ], + [dlopen(0, 0);], + [AC_DEFINE([HAVE_LIBDL], [1], + [Define if you have the libdl library or equivalent.]) libltdl_cv_func_dlopen="yes"], + [AC_CHECK_LIB([svld], [dlopen], + [AC_DEFINE([HAVE_LIBDL], [1], + [Define if you have the libdl library or equivalent.]) + LIBADD_DL="-lsvld" libltdl_cv_func_dlopen="yes"], + [AC_CHECK_LIB([dld], [dld_link], + [AC_DEFINE([HAVE_DLD], [1], + [Define if you have the GNU dld library.]) + LIBADD_DL="$LIBADD_DL -ldld"], + [AC_CHECK_FUNC([_dyld_func_lookup], + [AC_DEFINE([HAVE_DYLD], [1], + [Define if you have the _dyld_func_lookup function.])]) + ]) + ]) + ]) + ]) + ]) + ]) ! if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes ! then ! lt_save_LIBS="$LIBS" ! LIBS="$LIBS $LIBADD_DL" ! AC_CHECK_FUNCS([dlerror]) ! LIBS="$lt_save_LIBS" ! fi ! AC_LANG_POP ! ])# AC_LTDL_DLLIB ! ! ! # AC_LTDL_SYMBOL_USCORE ! # --------------------- ! # does the compiler prefix global symbols with an underscore? ! AC_DEFUN([AC_LTDL_SYMBOL_USCORE], ! [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE]) ! AC_CACHE_CHECK([for _ prefix in compiled symbols], ! [ac_cv_sys_symbol_underscore], ! [ac_cv_sys_symbol_underscore=no ! cat > conftest.$ac_ext < $ac_nlist) && test -s "$ac_nlist"; then ! # See whether the symbols have a leading underscore. ! if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then ! ac_cv_sys_symbol_underscore=yes ! else ! if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then ! : ! else ! echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC ! fi ! fi ! else ! echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC ! fi ! else ! echo "configure: failed program was:" >&AC_FD_CC ! cat conftest.c >&AC_FD_CC ! fi ! rm -rf conftest* ! ]) ! ])# AC_LTDL_SYMBOL_USCORE ! ! ! # AC_LTDL_DLSYM_USCORE ! # -------------------- ! AC_DEFUN([AC_LTDL_DLSYM_USCORE], ! [AC_REQUIRE([AC_LTDL_SYMBOL_USCORE]) ! if test x"$ac_cv_sys_symbol_underscore" = xyes; then ! if test x"$libltdl_cv_func_dlopen" = xyes || ! test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then ! AC_CACHE_CHECK([whether we have to add an underscore for dlsym], ! [libltdl_cv_need_uscore], ! [libltdl_cv_need_uscore=unknown ! save_LIBS="$LIBS" ! LIBS="$LIBS $LIBADD_DL" ! _LT_AC_TRY_DLOPEN_SELF( ! [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes], ! [], [libltdl_cv_need_uscore=cross]) ! LIBS="$save_LIBS" ! ]) fi fi if test x"$libltdl_cv_need_uscore" = xyes; then AC_DEFINE(NEED_USCORE, 1, ! [Define if dlsym() requires a leading underscore in symbol names.]) fi ! ])# AC_LTDL_DLSYM_USCORE ! # AC_LTDL_FUNC_ARGZ ! # ----------------- ! AC_DEFUN([AC_LTDL_FUNC_ARGZ], ! [AC_CHECK_HEADERS([argz.h]) ! AC_CHECK_TYPES([error_t], ! [], ! [AC_DEFINE([error_t], [int], ! [Define to a type to use for `error_t' if it is not otherwise available.])], ! [#if HAVE_ARGZ_H ! # include ! #endif]) ! ! AC_CHECK_FUNCS([argz_append argz_create_sep argz_insert argz_next argz_stringify]) ! ])# AC_LTDL_FUNC_ARGZ ! ! # AM_CONDITIONAL -*- Autoconf -*- ! ! # Copyright 1997, 2000, 2001 Free Software Foundation, Inc. ! ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! # serial 5 ! ! AC_PREREQ(2.52) ! ! # AM_CONDITIONAL(NAME, SHELL-CONDITION) ! # ------------------------------------- ! # Define a conditional. ! AC_DEFUN([AM_CONDITIONAL], ! [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], ! [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl ! AC_SUBST([$1_TRUE]) ! AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= ! fi ! AC_CONFIG_COMMANDS_PRE( ! [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then ! AC_MSG_ERROR([conditional "$1" was never defined. ! Usually this means the macro was only invoked conditionally.]) ! fi])]) ! # Do all the work for Automake. -*- Autoconf -*- ! # This macro actually does too much some checks are only needed if ! # your package does certain things. But this isn't really a big deal. ! # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 ! # Free Software Foundation, Inc. ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! # serial 10 ! ! AC_PREREQ([2.54]) ! ! # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow ! # the ones we care about. ! m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl ! ! # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) ! # AM_INIT_AUTOMAKE([OPTIONS]) ! # ----------------------------------------------- ! # The call with PACKAGE and VERSION arguments is the old style ! # call (pre autoconf-2.50), which is being phased out. PACKAGE ! # and VERSION should now be passed to AC_INIT and removed from ! # the call to AM_INIT_AUTOMAKE. ! # We support both call styles for the transition. After ! # the next Automake release, Autoconf can make the AC_INIT ! # arguments mandatory, and then we can depend on a new Autoconf ! # release and drop the old call support. ! AC_DEFUN([AM_INIT_AUTOMAKE], ! [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl ! AC_REQUIRE([AC_PROG_INSTALL])dnl ! # test to see if srcdir already configured ! if test "`cd $srcdir && pwd`" != "`pwd`" && ! test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi ! ! # test whether we have cygpath ! if test -z "$CYGPATH_W"; then ! if (cygpath --version) >/dev/null 2>/dev/null; then ! CYGPATH_W='cygpath -w' ! else ! CYGPATH_W=echo ! fi ! fi ! AC_SUBST([CYGPATH_W]) ! ! # Define the identity of the package. ! dnl Distinguish between old-style and new-style calls. ! m4_ifval([$2], ! [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl ! AC_SUBST([PACKAGE], [$1])dnl ! AC_SUBST([VERSION], [$2])], ! [_AM_SET_OPTIONS([$1])dnl ! AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl ! AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl ! ! _AM_IF_OPTION([no-define],, ! [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) ! AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl ! ! # Some tools Automake needs. ! AC_REQUIRE([AM_SANITY_CHECK])dnl ! AC_REQUIRE([AC_ARG_PROGRAM])dnl ! AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) ! AM_MISSING_PROG(AUTOCONF, autoconf) ! AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) ! AM_MISSING_PROG(AUTOHEADER, autoheader) ! AM_MISSING_PROG(MAKEINFO, makeinfo) ! AM_MISSING_PROG(AMTAR, tar) ! AM_PROG_INSTALL_SH ! AM_PROG_INSTALL_STRIP ! # We need awk for the "check" target. The system "awk" is bad on ! # some platforms. ! AC_REQUIRE([AC_PROG_AWK])dnl ! AC_REQUIRE([AC_PROG_MAKE_SET])dnl ! AC_REQUIRE([AM_SET_LEADING_DOT])dnl ! ! _AM_IF_OPTION([no-dependencies],, ! [AC_PROVIDE_IFELSE([AC_PROG_CC], ! [_AM_DEPENDENCIES(CC)], ! [define([AC_PROG_CC], ! defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl ! AC_PROVIDE_IFELSE([AC_PROG_CXX], ! [_AM_DEPENDENCIES(CXX)], ! [define([AC_PROG_CXX], ! defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ! ]) ! ]) ! ! ! # When config.status generates a header, we must update the stamp-h file. ! # This file resides in the same directory as the config header ! # that is generated. The stamp files are numbered to have different names. ! ! # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the ! # loop where config.status creates the headers, so we can generate ! # our stamp files there. ! AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], ! [# Compute $1's index in $config_headers. ! _am_stamp_count=1 ! for _am_header in $config_headers :; do ! case $_am_header in ! $1 | $1:* ) ! break ;; ! * ) ! _am_stamp_count=`expr $_am_stamp_count + 1` ;; ! esac ! done ! echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) ! ! # Copyright 2002 Free Software Foundation, Inc. ! ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! ! # AM_AUTOMAKE_VERSION(VERSION) ! # ---------------------------- ! # Automake X.Y traces this macro to ensure aclocal.m4 has been ! # generated from the m4 files accompanying Automake X.Y. ! AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) ! ! # AM_SET_CURRENT_AUTOMAKE_VERSION ! # ------------------------------- ! # Call AM_AUTOMAKE_VERSION so it can be traced. ! # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. ! AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], ! [AM_AUTOMAKE_VERSION([1.7.9])]) ! ! # Helper functions for option handling. -*- Autoconf -*- ! ! # Copyright 2001, 2002 Free Software Foundation, Inc. ! ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! # serial 2 ! ! # _AM_MANGLE_OPTION(NAME) ! # ----------------------- ! AC_DEFUN([_AM_MANGLE_OPTION], ! [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) ! ! # _AM_SET_OPTION(NAME) ! # ------------------------------ ! # Set option NAME. Presently that only means defining a flag for this option. ! AC_DEFUN([_AM_SET_OPTION], ! [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) ! ! # _AM_SET_OPTIONS(OPTIONS) ! # ---------------------------------- ! # OPTIONS is a space-separated list of Automake options. ! AC_DEFUN([_AM_SET_OPTIONS], ! [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) ! ! # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) ! # ------------------------------------------- ! # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. ! AC_DEFUN([_AM_IF_OPTION], ! [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # # Check to make sure that the build environment is sane. # ! # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. ! ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! # serial 3 ! ! # AM_SANITY_CHECK ! # --------------- ! AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 ! echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( ! set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` ! if test "$[*]" = "X"; then # -L didn't work. ! set X `ls -t $srcdir/configure conftest.file` fi ! rm -f conftest.file ! if test "$[*]" != "X $srcdir/configure conftest.file" \ ! && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a *************** if ( *** 1334,1340 **** alias in your environment]) fi ! test "[$]2" = conftestfile ) then # Ok. --- 6559,6565 ---- alias in your environment]) fi ! test "$[2]" = conftest.file ) then # Ok. *************** else *** 1343,1396 **** AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi - rm -f conftest* AC_MSG_RESULT(yes)]) ! dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) ! dnl The program must properly implement --version. ! AC_DEFUN(AM_MISSING_PROG, ! [AC_MSG_CHECKING(for working $2) ! # Run test in a subshell; some versions of sh will print an error if ! # an executable is not found, even if stderr is redirected. ! # Redirect stdin to placate older versions of autoconf. Sigh. ! if ($2 --version) < /dev/null > /dev/null 2>&1; then ! $1=$2 ! AC_MSG_RESULT(found) else ! $1="$3/missing $2" ! AC_MSG_RESULT(missing) fi ! AC_SUBST($1)]) ! # Like AC_CONFIG_HEADER, but automatically create stamp file. ! AC_DEFUN(AM_CONFIG_HEADER, ! [AC_PREREQ([2.12]) ! AC_CONFIG_HEADER([$1]) ! dnl When config.status generates a header, we must update the stamp-h file. ! dnl This file resides in the same directory as the config header ! dnl that is generated. We must strip everything past the first ":", ! dnl and everything past the last "/". ! AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl ! ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, ! <>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, ! <>; do ! case " <<$>>CONFIG_HEADERS " in ! *" <<$>>am_file "*<<)>> ! echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx ! ;; ! esac ! am_indx=`expr "<<$>>am_indx" + 1` ! done<<>>dnl>>) ! changequote([,]))]) # Add --enable-maintainer-mode option to configure. # From Jim Meyering ! # serial 1 ! AC_DEFUN(AM_MAINTAINER_MODE, [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default AC_ARG_ENABLE(maintainer-mode, --- 6568,7140 ---- AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) ! # -*- Autoconf -*- ! ! ! # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. ! ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! # serial 3 ! ! # AM_MISSING_PROG(NAME, PROGRAM) ! # ------------------------------ ! AC_DEFUN([AM_MISSING_PROG], ! [AC_REQUIRE([AM_MISSING_HAS_RUN]) ! $1=${$1-"${am_missing_run}$2"} ! AC_SUBST($1)]) ! ! ! # AM_MISSING_HAS_RUN ! # ------------------ ! # Define MISSING if not defined so far and test if it supports --run. ! # If it does, set am_missing_run to use it, otherwise, to nothing. ! AC_DEFUN([AM_MISSING_HAS_RUN], ! [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl ! test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" ! # Use eval to expand $SHELL ! if eval "$MISSING --run true"; then ! am_missing_run="$MISSING --run " else ! am_missing_run= ! AC_MSG_WARN([`missing' script is too old or missing]) fi ! ]) ! # AM_AUX_DIR_EXPAND ! # Copyright 2001 Free Software Foundation, Inc. ! ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets ! # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to ! # `$srcdir', `$srcdir/..', or `$srcdir/../..'. ! # ! # Of course, Automake must honor this variable whenever it calls a ! # tool from the auxiliary directory. The problem is that $srcdir (and ! # therefore $ac_aux_dir as well) can be either absolute or relative, ! # depending on how configure is run. This is pretty annoying, since ! # it makes $ac_aux_dir quite unusable in subdirectories: in the top ! # source directory, any form will work fine, but in subdirectories a ! # relative path needs to be adjusted first. ! # ! # $ac_aux_dir/missing ! # fails when called from a subdirectory if $ac_aux_dir is relative ! # $top_srcdir/$ac_aux_dir/missing ! # fails if $ac_aux_dir is absolute, ! # fails when called from a subdirectory in a VPATH build with ! # a relative $ac_aux_dir ! # ! # The reason of the latter failure is that $top_srcdir and $ac_aux_dir ! # are both prefixed by $srcdir. In an in-source build this is usually ! # harmless because $srcdir is `.', but things will broke when you ! # start a VPATH build or use an absolute $srcdir. ! # ! # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, ! # iff we strip the leading $srcdir from $ac_aux_dir. That would be: ! # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` ! # and then we would define $MISSING as ! # MISSING="\${SHELL} $am_aux_dir/missing" ! # This will work as long as MISSING is not called from configure, because ! # unfortunately $(top_srcdir) has no meaning in configure. ! # However there are other variables, like CC, which are often used in ! # configure, and could therefore not use this "fixed" $ac_aux_dir. ! # ! # Another solution, used here, is to always expand $ac_aux_dir to an ! # absolute PATH. The drawback is that using absolute paths prevent a ! # configured tree to be moved without reconfiguration. ! ! # Rely on autoconf to set up CDPATH properly. ! AC_PREREQ([2.50]) ! ! AC_DEFUN([AM_AUX_DIR_EXPAND], [ ! # expand $ac_aux_dir to an absolute path ! am_aux_dir=`cd $ac_aux_dir && pwd` ! ]) ! ! # AM_PROG_INSTALL_SH ! # ------------------ ! # Define $install_sh. ! ! # Copyright 2001 Free Software Foundation, Inc. ! ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! AC_DEFUN([AM_PROG_INSTALL_SH], ! [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl ! install_sh=${install_sh-"$am_aux_dir/install-sh"} ! AC_SUBST(install_sh)]) ! ! # AM_PROG_INSTALL_STRIP ! ! # Copyright 2001 Free Software Foundation, Inc. ! ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! # One issue with vendor `install' (even GNU) is that you can't ! # specify the program used to strip binaries. This is especially ! # annoying in cross-compiling environments, where the build's strip ! # is unlikely to handle the host's binaries. ! # Fortunately install-sh will honor a STRIPPROG variable, so we ! # always use install-sh in `make install-strip', and initialize ! # STRIPPROG with the value of the STRIP variable (set by the user). ! AC_DEFUN([AM_PROG_INSTALL_STRIP], ! [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl ! # Installed binaries are usually stripped using `strip' when the user ! # run `make install-strip'. However `strip' might not be the right ! # tool to use in cross-compilation environments, therefore Automake ! # will honor the `STRIP' environment variable to overrule this program. ! dnl Don't test for $cross_compiling = yes, because it might be `maybe'. ! if test "$cross_compiling" != no; then ! AC_CHECK_TOOL([STRIP], [strip], :) ! fi ! INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" ! AC_SUBST([INSTALL_STRIP_PROGRAM])]) ! ! # -*- Autoconf -*- ! # Copyright (C) 2003 Free Software Foundation, Inc. ! ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! # serial 1 ! ! # Check whether the underlying file-system supports filenames ! # with a leading dot. For instance MS-DOS doesn't. ! AC_DEFUN([AM_SET_LEADING_DOT], ! [rm -rf .tst 2>/dev/null ! mkdir .tst 2>/dev/null ! if test -d .tst; then ! am__leading_dot=. ! else ! am__leading_dot=_ ! fi ! rmdir .tst 2>/dev/null ! AC_SUBST([am__leading_dot])]) ! ! # serial 5 -*- Autoconf -*- ! ! # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. ! ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! ! # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be ! # written in clear, in which case automake, when reading aclocal.m4, ! # will think it sees a *use*, and therefore will trigger all it's ! # C support machinery. Also note that it means that autoscan, seeing ! # CC etc. in the Makefile, will ask for an AC_PROG_CC use... ! ! ! ! # _AM_DEPENDENCIES(NAME) ! # ---------------------- ! # See how the compiler implements dependency checking. ! # NAME is "CC", "CXX", "GCJ", or "OBJC". ! # We try a few techniques and use that to set a single cache variable. ! # ! # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was ! # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular ! # dependency, and given that the user is not expected to run this macro, ! # just rely on AC_PROG_CC. ! AC_DEFUN([_AM_DEPENDENCIES], ! [AC_REQUIRE([AM_SET_DEPDIR])dnl ! AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl ! AC_REQUIRE([AM_MAKE_INCLUDE])dnl ! AC_REQUIRE([AM_DEP_TRACK])dnl ! ! ifelse([$1], CC, [depcc="$CC" am_compiler_list=], ! [$1], CXX, [depcc="$CXX" am_compiler_list=], ! [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], ! [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], ! [depcc="$$1" am_compiler_list=]) ! ! AC_CACHE_CHECK([dependency style of $depcc], ! [am_cv_$1_dependencies_compiler_type], ! [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then ! # We make a subdir and do the tests there. Otherwise we can end up ! # making bogus files that we don't know about and never remove. For ! # instance it was reported that on HP-UX the gcc test will end up ! # making a dummy file named `D' -- because `-MD' means `put the output ! # in D'. ! mkdir conftest.dir ! # Copy depcomp to subdir because otherwise we won't find it if we're ! # using a relative directory. ! cp "$am_depcomp" conftest.dir ! cd conftest.dir ! # We will build objects and dependencies in a subdirectory because ! # it helps to detect inapplicable dependency modes. For instance ! # both Tru64's cc and ICC support -MD to output dependencies as a ! # side effect of compilation, but ICC will put the dependencies in ! # the current directory while Tru64 will put them in the object ! # directory. ! mkdir sub ! ! am_cv_$1_dependencies_compiler_type=none ! if test "$am_compiler_list" = ""; then ! am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` ! fi ! for depmode in $am_compiler_list; do ! # Setup a source with many dependencies, because some compilers ! # like to wrap large dependency lists on column 80 (with \), and ! # we should not choose a depcomp mode which is confused by this. ! # ! # We need to recreate these files for each test, as the compiler may ! # overwrite some of them when testing with obscure command lines. ! # This happens at least with the AIX C compiler. ! : > sub/conftest.c ! for i in 1 2 3 4 5 6; do ! echo '#include "conftst'$i'.h"' >> sub/conftest.c ! : > sub/conftst$i.h ! done ! echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf ! ! case $depmode in ! nosideeffect) ! # after this tag, mechanisms are not by side-effect, so they'll ! # only be used when explicitly requested ! if test "x$enable_dependency_tracking" = xyes; then ! continue ! else ! break ! fi ! ;; ! none) break ;; ! esac ! # We check with `-c' and `-o' for the sake of the "dashmstdout" ! # mode. It turns out that the SunPro C++ compiler does not properly ! # handle `-M -o', and we need to detect this. ! if depmode=$depmode \ ! source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ ! depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ ! $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ ! >/dev/null 2>conftest.err && ! grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && ! grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ! ${MAKE-make} -s -f confmf > /dev/null 2>&1; then ! # icc doesn't choke on unknown options, it will just issue warnings ! # (even with -Werror). So we grep stderr for any message ! # that says an option was ignored. ! if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else ! am_cv_$1_dependencies_compiler_type=$depmode ! break ! fi ! fi ! done ! ! cd .. ! rm -rf conftest.dir ! else ! am_cv_$1_dependencies_compiler_type=none ! fi ! ]) ! AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) ! AM_CONDITIONAL([am__fastdep$1], [ ! test "x$enable_dependency_tracking" != xno \ ! && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ! ]) ! ! ! # AM_SET_DEPDIR ! # ------------- ! # Choose a directory name for dependency files. ! # This macro is AC_REQUIREd in _AM_DEPENDENCIES ! AC_DEFUN([AM_SET_DEPDIR], ! [AC_REQUIRE([AM_SET_LEADING_DOT])dnl ! AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ! ]) ! ! ! # AM_DEP_TRACK ! # ------------ ! AC_DEFUN([AM_DEP_TRACK], ! [AC_ARG_ENABLE(dependency-tracking, ! [ --disable-dependency-tracking Speeds up one-time builds ! --enable-dependency-tracking Do not reject slow dependency extractors]) ! if test "x$enable_dependency_tracking" != xno; then ! am_depcomp="$ac_aux_dir/depcomp" ! AMDEPBACKSLASH='\' ! fi ! AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) ! AC_SUBST([AMDEPBACKSLASH]) ! ]) ! ! # Generate code to set up dependency tracking. -*- Autoconf -*- ! ! # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. ! ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! #serial 2 ! ! # _AM_OUTPUT_DEPENDENCY_COMMANDS ! # ------------------------------ ! AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], ! [for mf in $CONFIG_FILES; do ! # Strip MF so we end up with the name of the file. ! mf=`echo "$mf" | sed -e 's/:.*$//'` ! # Check whether this is an Automake generated Makefile or not. ! # We used to match only the files named `Makefile.in', but ! # some people rename them; so instead we look at the file content. ! # Grep'ing the first line is not enough: some people post-process ! # each Makefile.in and add a new line on top of each file to say so. ! # So let's grep whole file. ! if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then ! dirpart=`AS_DIRNAME("$mf")` ! else ! continue ! fi ! grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue ! # Extract the definition of DEP_FILES from the Makefile without ! # running `make'. ! DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` ! test -z "$DEPDIR" && continue ! # When using ansi2knr, U may be empty or an underscore; expand it ! U=`sed -n -e '/^U = / s///p' < "$mf"` ! test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" ! # We invoke sed twice because it is the simplest approach to ! # changing $(DEPDIR) to its actual value in the expansion. ! for file in `sed -n -e ' ! /^DEP_FILES = .*\\\\$/ { ! s/^DEP_FILES = // ! :loop ! s/\\\\$// ! p ! n ! /\\\\$/ b loop ! p ! } ! /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ ! sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do ! # Make sure the directory exists. ! test -f "$dirpart/$file" && continue ! fdir=`AS_DIRNAME(["$file"])` ! AS_MKDIR_P([$dirpart/$fdir]) ! # echo "creating $dirpart/$file" ! echo '# dummy' > "$dirpart/$file" ! done ! done ! ])# _AM_OUTPUT_DEPENDENCY_COMMANDS ! ! ! # AM_OUTPUT_DEPENDENCY_COMMANDS ! # ----------------------------- ! # This macro should only be invoked once -- use via AC_REQUIRE. ! # ! # This code is only required when automatic dependency tracking ! # is enabled. FIXME. This creates each `.P' file that we will ! # need in order to bootstrap the dependency handling code. ! AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], ! [AC_CONFIG_COMMANDS([depfiles], ! [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], ! [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ! ]) ! ! # Check to see how 'make' treats includes. -*- Autoconf -*- ! ! # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. ! ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! # serial 2 ! ! # AM_MAKE_INCLUDE() ! # ----------------- ! # Check to see how make treats includes. ! AC_DEFUN([AM_MAKE_INCLUDE], ! [am_make=${MAKE-make} ! cat > confinc << 'END' ! am__doit: ! @echo done ! .PHONY: am__doit ! END ! # If we don't find an include directive, just comment out the code. ! AC_MSG_CHECKING([for style of include used by $am_make]) ! am__include="#" ! am__quote= ! _am_result=none ! # First try GNU make style include. ! echo "include confinc" > confmf ! # We grep out `Entering directory' and `Leaving directory' ! # messages which can occur if `w' ends up in MAKEFLAGS. ! # In particular we don't look at `^make:' because GNU make might ! # be invoked under some other name (usually "gmake"), in which ! # case it prints its new name instead of `make'. ! if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then ! am__include=include ! am__quote= ! _am_result=GNU ! fi ! # Now try BSD make style include. ! if test "$am__include" = "#"; then ! echo '.include "confinc"' > confmf ! if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then ! am__include=.include ! am__quote="\"" ! _am_result=BSD ! fi ! fi ! AC_SUBST([am__include]) ! AC_SUBST([am__quote]) ! AC_MSG_RESULT([$_am_result]) ! rm -f confinc confmf ! ]) ! ! # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- ! ! # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. ! ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! AC_PREREQ([2.52]) ! ! # serial 6 ! ! # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. ! AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Add --enable-maintainer-mode option to configure. # From Jim Meyering ! # Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) ! # any later version. ! ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ! # 02111-1307, USA. ! ! # serial 2 ! ! AC_DEFUN([AM_MAINTAINER_MODE], [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default AC_ARG_ENABLE(maintainer-mode, *************** AC_DEFUN(AM_MAINTAINER_MODE, *** 1398,1407 **** (and sometimes confusing) to the casual installer], USE_MAINTAINER_MODE=$enableval, USE_MAINTAINER_MODE=no) ! AC_MSG_RESULT($USE_MAINTAINER_MODE) ! AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST(MAINT)dnl ] ) --- 7142,7153 ---- (and sometimes confusing) to the casual installer], USE_MAINTAINER_MODE=$enableval, USE_MAINTAINER_MODE=no) ! AC_MSG_RESULT([$USE_MAINTAINER_MODE]) ! AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST(MAINT)dnl ] ) + AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + diff -Nrc3pad gcc-3.3.3/libjava/libltdl/ChangeLog gcc-3.4.0/libjava/libltdl/ChangeLog *** gcc-3.3.3/libjava/libltdl/ChangeLog 2004-02-14 20:20:14.000000000 +0000 --- gcc-3.4.0/libjava/libltdl/ChangeLog 2004-04-19 01:59:50.000000000 +0000 *************** *** 1,30 **** ! 2004-02-14 Release Manager ! ! * GCC 3.3.3 Released. ! ! 2003-10-16 Release Manager ! ! * GCC 3.3.2 Released. ! ! 2003-08-04 Release Manager ! ! * GCC 3.3.1 Released. ! ! 2003-08-04 Release Manager ! ! * GCC 3.3.1 Released. ! ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. 2002-04-28 Mark Mitchell --- 1,16 ---- ! 2004-04-18 Release Manager ! * GCC 3.4.0 released. ! 2004-02-22 Matthias Klose ! * config.guess: Update from version 2003-10-07 to 2004-02-16. ! * config.sub: Update from version 2003-10-07 to 2004-02-16. ! 2003-08-07 Rainer Orth ! * configure.in: Don't initialize GCINCS to boehm-gc/include. ! * Regenerate. 2002-04-28 Mark Mitchell diff -Nrc3pad gcc-3.3.3/libjava/libltdl/config.guess gcc-3.4.0/libjava/libltdl/config.guess *** gcc-3.3.3/libjava/libltdl/config.guess 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/libltdl/config.guess 2004-02-22 14:43:12.000000000 +0000 *************** *** 0 **** --- 1,1450 ---- + #! /bin/sh + # Attempt to guess a canonical system name. + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + + timestamp='2004-02-16' + + # This file is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2 of the License, or + # (at your option) any later version. + # + # This program is distributed in the hope that it will be useful, but + # WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + # General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + # + # As a special exception to the GNU General Public License, if you + # distribute this file as part of a program that contains a + # configuration script generated by Autoconf, you may include it under + # the same distribution terms that you use for the rest of that program. + + # Originally written by Per Bothner . + # Please send patches to . Submit a context + # diff and a properly formatted ChangeLog entry. + # + # This script attempts to guess a canonical system name similar to + # config.sub. If it succeeds, it prints the system name on stdout, and + # exits with 0. Otherwise, it exits with 1. + # + # The plan is that this can be called by configure scripts if you + # don't specify an explicit build system type. + + me=`echo "$0" | sed -e 's,.*/,,'` + + usage="\ + Usage: $0 [OPTION] + + Output the configuration name of the system \`$me' is run on. + + Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + + Report bugs and patches to ." + + version="\ + GNU config.guess ($timestamp) + + Originally written by Per Bothner. + Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Free Software Foundation, Inc. + + This is free software; see the source for copying conditions. There is NO + warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + + help=" + Try \`$me --help' for more information." + + # Parse command line + while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac + done + + if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 + fi + + trap 'exit 1' 1 2 15 + + # CC_FOR_BUILD -- compiler used by this script. Note that the use of a + # compiler to aid in system detection is discouraged as it requires + # temporary files to be created and, as you can see below, it is a + # headache to deal with in a portable fashion. + + # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still + # use `HOST_CC' if defined, but it is deprecated. + + # Portable tmp directory creation inspired by the Autoconf team. + + set_cc_for_build=' + trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; + trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; + : ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; + dummy=$tmp/dummy ; + tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; + case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac ;' + + # This is needed to find uname on a Pyramid OSx when run in the BSD universe. + # (ghazi@noc.rutgers.edu 1994-08-24) + if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH + fi + + UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown + UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown + UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown + UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + + # Note: order is significant - the case branches are not exclusive. + + case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; + amd64:OpenBSD:*:*) + echo x86_64-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + cats:OpenBSD:*:*) + echo arm-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + macppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvmeppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pegasos:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mipseb-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit 0 ;; + macppc:MirBSD:*:*) + echo powerppc-unknown-mirbsd${UNAME_RELEASE} + exit 0 ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit 0 ;; + alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha*:OpenVMS:*:*) + echo alpha-hp-vms + exit 0 ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit 0;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit 0 ;; + DRS?6000:UNIX_SV:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7 && exit 0 ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #ifdef __cplusplus + #include /* for printf() prototype */ + int main (int argc, char *argv[]) { + #else + int main (argc, argv) int argc; char *argv[]; { + #endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } + EOF + $CC_FOR_BUILD -o $dummy $dummy.c \ + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && exit 0 + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit 0 ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } + EOF + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } + EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + # avoid double evaluation of $set_cc_for_build + test -n "$CC_FOR_BUILD" || eval $set_cc_for_build + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } + EOF + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + *:UNICOS/mp:*:*) + echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + # Determine whether the default compiler uses glibc. + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #if __GLIBC__ >= 2 + LIBC=gnu + #else + LIBC= + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + # GNU/KFreeBSD systems have a "k" prefix to indicate we are using + # FreeBSD's kernel, but not the complete OS. + case ${LIBC} in gnu) kernel_only='k' ;; esac + echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} + exit 0 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; + x86:Interix*:[34]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' + exit 0 ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit 0 ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit 0 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit 0 ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit 0 ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit 0 ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit 0 ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit 0 ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit 0 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit 0 ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit 0 ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit 0 ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit 0 ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #ifdef __INTEL_COMPILER + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit 0 ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit 0 ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit 0 ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit 0 ;; + i*86:*:5:[78]*) + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit 0 ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit 0 ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit 0 ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit 0 ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Darwin:*:*) + case `uname -p` in + *86) UNAME_PROCESSOR=i686 ;; + powerpc) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit 0 ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit 0 ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit 0 ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit 0 ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit 0 ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit 0 ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit 0 ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit 0 ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit 0 ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; + esac + + #echo '(No uname command or uname output not recognized.)' 1>&2 + #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + + eval $set_cc_for_build + cat >$dummy.c < + # include + #endif + main () + { + #if defined (sony) + #if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); + #else + #include + printf ("m68k-sony-newsos%s\n", + #ifdef NEWSOS4 + "4" + #else + "" + #endif + ); exit (0); + #endif + #endif + + #if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); + #endif + + #if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); + #endif + + #if defined (NeXT) + #if !defined (__ARCHITECTURE__) + #define __ARCHITECTURE__ "m68k" + #endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); + #endif + + #if defined (MULTIMAX) || defined (n16) + #if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); + #else + #if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); + #else + printf ("ns32k-encore-bsd\n"); exit (0); + #endif + #endif + #endif + + #if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); + #endif + + #if defined (sequent) + #if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); + #endif + #if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); + #endif + #endif + + #if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + + #endif + + #if defined (vax) + # if !defined (ultrix) + # include + # if defined (BSD) + # if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); + # else + # if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); + # else + printf ("vax-dec-bsd\n"); exit (0); + # endif + # endif + # else + printf ("vax-dec-bsd\n"); exit (0); + # endif + # else + printf ("vax-dec-ultrix\n"); exit (0); + # endif + #endif + + #if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); + #endif + + exit (1); + } + EOF + + $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 + + # Apollos put the system type in the environment. + + test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + + # Convex versions that predate uname can use getsysinfo(1) + + if [ -x /usr/convex/getsysinfo ] + then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac + fi + + cat >&2 < in order to provide the needed + information to handle your system. + + config.guess timestamp = $timestamp + + uname -m = `(uname -m) 2>/dev/null || echo unknown` + uname -r = `(uname -r) 2>/dev/null || echo unknown` + uname -s = `(uname -s) 2>/dev/null || echo unknown` + uname -v = `(uname -v) 2>/dev/null || echo unknown` + + /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` + /bin/uname -X = `(/bin/uname -X) 2>/dev/null` + + hostinfo = `(hostinfo) 2>/dev/null` + /bin/universe = `(/bin/universe) 2>/dev/null` + /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` + /bin/arch = `(/bin/arch) 2>/dev/null` + /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` + /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + + UNAME_MACHINE = ${UNAME_MACHINE} + UNAME_RELEASE = ${UNAME_RELEASE} + UNAME_SYSTEM = ${UNAME_SYSTEM} + UNAME_VERSION = ${UNAME_VERSION} + EOF + + exit 1 + + # Local variables: + # eval: (add-hook 'write-file-hooks 'time-stamp) + # time-stamp-start: "timestamp='" + # time-stamp-format: "%:y-%02m-%02d" + # time-stamp-end: "'" + # End: diff -Nrc3pad gcc-3.3.3/libjava/libltdl/config-h.in gcc-3.4.0/libjava/libltdl/config-h.in *** gcc-3.3.3/libjava/libltdl/config-h.in 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/libltdl/config-h.in 2004-04-19 02:23:04.000000000 +0000 *************** *** 0 **** --- 1,193 ---- + /* config-h.in. Generated from configure.ac by autoheader. */ + + /* Define to 1 if you have the `argz_append' function. */ + #undef HAVE_ARGZ_APPEND + + /* Define to 1 if you have the `argz_create_sep' function. */ + #undef HAVE_ARGZ_CREATE_SEP + + /* Define to 1 if you have the header file. */ + #undef HAVE_ARGZ_H + + /* Define to 1 if you have the `argz_insert' function. */ + #undef HAVE_ARGZ_INSERT + + /* Define to 1 if you have the `argz_next' function. */ + #undef HAVE_ARGZ_NEXT + + /* Define to 1 if you have the `argz_stringify' function. */ + #undef HAVE_ARGZ_STRINGIFY + + /* Define to 1 if you have the header file. */ + #undef HAVE_ASSERT_H + + /* Define to 1 if you have the `bcopy' function. */ + #undef HAVE_BCOPY + + /* Define to 1 if you have the `closedir' function. */ + #undef HAVE_CLOSEDIR + + /* Define to 1 if you have the header file. */ + #undef HAVE_CTYPE_H + + /* Define to 1 if you have the header file, and it defines `DIR'. + */ + #undef HAVE_DIRENT_H + + /* Define if you have the GNU dld library. */ + #undef HAVE_DLD + + /* Define to 1 if you have the header file. */ + #undef HAVE_DLD_H + + /* Define to 1 if you have the `dlerror' function. */ + #undef HAVE_DLERROR + + /* Define to 1 if you have the header file. */ + #undef HAVE_DLFCN_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_DL_H + + /* Define if you have the _dyld_func_lookup function. */ + #undef HAVE_DYLD + + /* Define to 1 if you have the header file. */ + #undef HAVE_ERRNO_H + + /* Define to 1 if the system has the type `error_t'. */ + #undef HAVE_ERROR_T + + /* Define to 1 if you have the `index' function. */ + #undef HAVE_INDEX + + /* Define to 1 if you have the header file. */ + #undef HAVE_INTTYPES_H + + /* Define if you have the libdl library or equivalent. */ + #undef HAVE_LIBDL + + /* Define to 1 if you have the header file. */ + #undef HAVE_MACH_O_DYLD_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_MALLOC_H + + /* Define to 1 if you have the `memcpy' function. */ + #undef HAVE_MEMCPY + + /* Define to 1 if you have the `memmove' function. */ + #undef HAVE_MEMMOVE + + /* Define to 1 if you have the header file. */ + #undef HAVE_MEMORY_H + + /* Define to 1 if you have the header file, and it defines `DIR'. */ + #undef HAVE_NDIR_H + + /* Define to 1 if you have the `opendir' function. */ + #undef HAVE_OPENDIR + + /* Define if libtool can extract symbol lists from object files. */ + #undef HAVE_PRELOADED_SYMBOLS + + /* Define to 1 if you have the `readdir' function. */ + #undef HAVE_READDIR + + /* Define to 1 if you have the `rindex' function. */ + #undef HAVE_RINDEX + + /* Define if you have the shl_load function. */ + #undef HAVE_SHL_LOAD + + /* Define to 1 if you have the header file. */ + #undef HAVE_STDINT_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_STDIO_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_STDLIB_H + + /* Define to 1 if you have the `strchr' function. */ + #undef HAVE_STRCHR + + /* Define to 1 if you have the `strcmp' function. */ + #undef HAVE_STRCMP + + /* Define to 1 if you have the header file. */ + #undef HAVE_STRINGS_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_STRING_H + + /* Define to 1 if you have the `strrchr' function. */ + #undef HAVE_STRRCHR + + /* Define to 1 if you have the header file, and it defines `DIR'. + */ + #undef HAVE_SYS_DIR_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_SYS_DL_H + + /* Define to 1 if you have the header file, and it defines `DIR'. + */ + #undef HAVE_SYS_NDIR_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_SYS_STAT_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_SYS_TYPES_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_UNISTD_H + + /* Define if the OS needs help to load dependent libraries for dlopen(). */ + #undef LTDL_DLOPEN_DEPLIBS + + /* Define to the sub-directory in which libtool stores uninstalled libraries. + */ + #undef LTDL_OBJDIR + + /* Define to the name of the environment variable that determines the dynamic + library search path. */ + #undef LTDL_SHLIBPATH_VAR + + /* Define to the extension used for shared libraries, say, ".so". */ + #undef LTDL_SHLIB_EXT + + /* Define to the system default library search path. */ + #undef LTDL_SYSSEARCHPATH + + /* Define if dlsym() requires a leading underscore in symbol names. */ + #undef NEED_USCORE + + /* Define to the address where bug reports for this package should be sent. */ + #undef PACKAGE_BUGREPORT + + /* Define to the full name of this package. */ + #undef PACKAGE_NAME + + /* Define to the full name and version of this package. */ + #undef PACKAGE_STRING + + /* Define to the one symbol short name of this package. */ + #undef PACKAGE_TARNAME + + /* Define to the version of this package. */ + #undef PACKAGE_VERSION + + /* Define to 1 if you have the ANSI C header files. */ + #undef STDC_HEADERS + + /* Define to empty if `const' does not conform to ANSI C. */ + #undef const + + /* Define to a type to use for `error_t' if it is not otherwise available. */ + #undef error_t + + /* Define as `__inline' if that's what the C compiler calls it, or to nothing + if it is not supported. */ + #undef inline diff -Nrc3pad gcc-3.3.3/libjava/libltdl/config.h.in gcc-3.4.0/libjava/libltdl/config.h.in *** gcc-3.3.3/libjava/libltdl/config.h.in 2000-09-10 08:04:40.000000000 +0000 --- gcc-3.4.0/libjava/libltdl/config.h.in 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,98 **** - /* config.h.in. Generated automatically from configure.in by autoheader. */ - - /* Define to empty if the keyword does not work. */ - #undef const - - /* Define as __inline if that's what the C compiler calls it. */ - #undef inline - - /* Define if you have the ANSI C header files. */ - #undef STDC_HEADERS - - /* Define if you are using the Boehm GC. */ - #undef HAVE_BOEHM_GC - - /* Define if you have the dlerror function. */ - #undef HAVE_DLERROR - - /* Define if you have the index function. */ - #undef HAVE_INDEX - - /* Define if you have the rindex function. */ - #undef HAVE_RINDEX - - /* Define if you have the strchr function. */ - #undef HAVE_STRCHR - - /* Define if you have the strcmp function. */ - #undef HAVE_STRCMP - - /* Define if you have the strrchr function. */ - #undef HAVE_STRRCHR - - /* Define if you have the header file. */ - #undef HAVE_CTYPE_H - - /* Define if you have the header file. */ - #undef HAVE_DL_H - - /* Define if you have the header file. */ - #undef HAVE_DLD_H - - /* Define if you have the header file. */ - #undef HAVE_DLFCN_H - - /* Define if you have the header file. */ - #undef HAVE_MALLOC_H - - /* Define if you have the header file. */ - #undef HAVE_MEMORY_H - - /* Define if you have the header file. */ - #undef HAVE_STDIO_H - - /* Define if you have the header file. */ - #undef HAVE_STDLIB_H - - /* Define if you have the header file. */ - #undef HAVE_STRING_H - - /* Define if you have the header file. */ - #undef HAVE_STRINGS_H - - /* Define to the extension used for shared libraries, say, .so. */ - #undef LTDL_SHLIB_EXT - - /* Define to the name of the environment variable that determines the dynamic library search path. */ - #undef LTDL_SHLIBPATH_VAR - - /* Define to the system default library search path. */ - #undef LTDL_SYSSEARCHPATH - - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ - #undef LTDL_OBJDIR - - /* Define if libtool can extract symbol lists from object files. */ - #undef HAVE_PRELOADED_SYMBOLS - - /* Define if you have the libdl library or equivalent. */ - #undef HAVE_LIBDL - - /* Define if you have the libdl library or equivalent. */ - #undef HAVE_LIBDL - - /* Define if you have the libdl library or equivalent. */ - #undef HAVE_LIBDL - - /* Define if you have the shl_load function. */ - #undef HAVE_SHL_LOAD - - /* Define if you have the shl_load function. */ - #undef HAVE_SHL_LOAD - - /* Define if you have the GNU dld library. */ - #undef HAVE_DLD - - /* Define if dlsym() requires a leading underscode in symbol names. */ - #undef NEED_USCORE - --- 0 ---- diff -Nrc3pad gcc-3.3.3/libjava/libltdl/config.sub gcc-3.4.0/libjava/libltdl/config.sub *** gcc-3.3.3/libjava/libltdl/config.sub 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/libltdl/config.sub 2004-02-22 14:43:12.000000000 +0000 *************** *** 0 **** --- 1,1545 ---- + #! /bin/sh + # Configuration validation subroutine script. + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + + timestamp='2004-02-16' + + # This file is (in principle) common to ALL GNU software. + # The presence of a machine in this file suggests that SOME GNU software + # can handle that machine. It does not imply ALL GNU software can. + # + # This file is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2 of the License, or + # (at your option) any later version. + # + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place - Suite 330, + # Boston, MA 02111-1307, USA. + + # As a special exception to the GNU General Public License, if you + # distribute this file as part of a program that contains a + # configuration script generated by Autoconf, you may include it under + # the same distribution terms that you use for the rest of that program. + + # Please send patches to . Submit a context + # diff and a properly formatted ChangeLog entry. + # + # Configuration subroutine to validate and canonicalize a configuration type. + # Supply the specified configuration type as an argument. + # If it is invalid, we print an error message on stderr and exit with code 1. + # Otherwise, we print the canonical config type on stdout and succeed. + + # This file is supposed to be the same for all GNU packages + # and recognize all the CPU types, system types and aliases + # that are meaningful with *any* GNU software. + # Each package is responsible for reporting which valid configurations + # it does not support. The user should be able to distinguish + # a failure to support a valid configuration from a meaningless + # configuration. + + # The goal of this file is to map all the various variations of a given + # machine specification into a single specification in the form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM + # or in some cases, the newer four-part form: + # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM + # It is wrong to echo any other type of specification. + + me=`echo "$0" | sed -e 's,.*/,,'` + + usage="\ + Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + + Canonicalize a configuration name. + + Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + + Report bugs and patches to ." + + version="\ + GNU config.sub ($timestamp) + + Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Free Software Foundation, Inc. + + This is free software; see the source for copying conditions. There is NO + warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + + help=" + Try \`$me --help' for more information." + + # Parse command line + while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit 0;; + + * ) + break ;; + esac + done + + case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; + esac + + # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). + # Here we must recognize all the valid KERNEL-OS combinations. + maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` + case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ + kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; + esac + + ### Let's recognize common machines as not being operating systems so + ### that things like config.sub decstation-3100 work. We also + ### recognize some manufacturers as not being operating systems, so we + ### can provide default operating systems below. + case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + esac + + # Decode aliases for certain CPU-COMPANY combinations. + case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | m32r | m68000 | m68k | m88k | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | msp430 \ + | ns16k | ns32k \ + | openrisc | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ + | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xscale | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* \ + | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | m32r-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | msp430-* \ + | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ + | xtensa-* \ + | ymp-* \ + | z8k-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + cr16c) + basic_machine=cr16c-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; + # I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nv1) + basic_machine=nv1-cray + os=-unicosmp + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + or32 | or32-*) + basic_machine=or32-unknown + os=-coff + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparc | sparcv9 | sparcv9b) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + esac + + # Here we canonicalize certain aliases for manufacturers. + case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; + esac + + # Decode manufacturer-specific aliases for certain operating systems. + + if [ x"$os" != x"" ] + then + case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; + esac + else + + # Here we handle the default operating systems that come with various machines. + # The value should be what the vendor currently ships out the door with their + # machine or put another way, the most popular os provided with the machine. + + # Note that if you're going to try to match "-MANUFACTURER" here (say, + # "-sun"), then you have to tell the case statement up towards the top + # that MANUFACTURER isn't an operating system. Otherwise, code above + # will signal an error saying that MANUFACTURER isn't an operating + # system, and we'll never get to this point. + + case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; + esac + fi + + # Here we handle the case where we know the os, and the CPU type, but not the + # manufacturer. We pick the logical manufacturer. + vendor=unknown + case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; + esac + + echo $basic_machine$os + exit 0 + + # Local variables: + # eval: (add-hook 'write-file-hooks 'time-stamp) + # time-stamp-start: "timestamp='" + # time-stamp-format: "%:y-%02m-%02d" + # time-stamp-end: "'" + # End: diff -Nrc3pad gcc-3.3.3/libjava/libltdl/configure gcc-3.4.0/libjava/libltdl/configure *** gcc-3.3.3/libjava/libltdl/configure 2004-02-14 20:34:20.000000000 +0000 --- gcc-3.4.0/libjava/libltdl/configure 2004-04-19 02:23:04.000000000 +0000 *************** *** 1,47 **** #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.13 ! # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ! # Defaults: ! ac_help= ac_default_prefix=/usr/local ! # Any additions from configure.in: ! ac_help="$ac_help ! --with-auxdir=DIR path to autoconf auxiliary files" ! ac_help="$ac_help ! --enable-maintainer-mode enable make rules and dependencies not useful ! (and sometimes confusing) to the casual installer" ! ac_help="$ac_help ! --enable-shared[=PKGS] build shared libraries [default=yes]" ! ac_help="$ac_help ! --enable-static[=PKGS] build static libraries [default=yes]" ! ac_help="$ac_help ! --enable-fast-install[=PKGS] optimize for fast installation [default=yes]" ! ac_help="$ac_help ! --with-gnu-ld assume the C compiler uses GNU ld [default=no]" ! ac_help="$ac_help ! --disable-libtool-lock avoid locking (might break parallel builds)" ! ac_help="$ac_help ! --with-pic try to use only PIC/non-PIC objects [default=use both]" ! ac_help="$ac_help ! --enable-java-gc=TYPE choose garbage collector [boehm]" ! ac_help="$ac_help ! --enable-ltdl-install install libltdl" # Initialize some variables set by options. # The variables have the same names as the options, with # dashes changed to underlines. ! build=NONE ! cache_file=./config.cache exec_prefix=NONE - host=NONE no_create= - nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE --- 1,480 ---- #! /bin/sh # Guess values for system-dependent variables and create Makefiles. ! # Generated by GNU Autoconf 2.57 for libltdl 1.2. ! # ! # Report bugs to . # + # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 + # Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. + ## --------------------- ## + ## M4sh Initialization. ## + ## --------------------- ## ! # Be Bourne compatible ! if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then ! emulate sh ! NULLCMD=: ! # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which ! # is contrary to our usage. Disable this feature. ! alias -g '${1+"$@"}'='"$@"' ! elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then ! set -o posix ! fi ! ! # Support unset when possible. ! if (FOO=FOO; unset FOO) >/dev/null 2>&1; then ! as_unset=unset ! else ! as_unset=false ! fi ! ! ! # Work around bugs in pre-3.0 UWIN ksh. ! $as_unset ENV MAIL MAILPATH ! PS1='$ ' ! PS2='> ' ! PS4='+ ' ! ! # NLS nuisances. ! for as_var in \ ! LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ ! LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ ! LC_TELEPHONE LC_TIME ! do ! if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then ! eval $as_var=C; export $as_var ! else ! $as_unset $as_var ! fi ! done ! ! # Required to use basename. ! if expr a : '\(a\)' >/dev/null 2>&1; then ! as_expr=expr ! else ! as_expr=false ! fi ! ! if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then ! as_basename=basename ! else ! as_basename=false ! fi ! ! ! # Name of the executable. ! as_me=`$as_basename "$0" || ! $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ ! X"$0" : 'X\(//\)$' \| \ ! X"$0" : 'X\(/\)$' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X/"$0" | ! sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } ! /^X\/\(\/\/\)$/{ s//\1/; q; } ! /^X\/\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! ! ! # PATH needs CR, and LINENO needs CR and PATH. ! # Avoid depending upon Character Ranges. ! as_cr_letters='abcdefghijklmnopqrstuvwxyz' ! as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' ! as_cr_Letters=$as_cr_letters$as_cr_LETTERS ! as_cr_digits='0123456789' ! as_cr_alnum=$as_cr_Letters$as_cr_digits ! ! # The user is always right. ! if test "${PATH_SEPARATOR+set}" != set; then ! echo "#! /bin/sh" >conf$$.sh ! echo "exit 0" >>conf$$.sh ! chmod +x conf$$.sh ! if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then ! PATH_SEPARATOR=';' ! else ! PATH_SEPARATOR=: ! fi ! rm -f conf$$.sh ! fi ! ! ! as_lineno_1=$LINENO ! as_lineno_2=$LINENO ! as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` ! test "x$as_lineno_1" != "x$as_lineno_2" && ! test "x$as_lineno_3" = "x$as_lineno_2" || { ! # Find who we are. Look in the path if we contain no path at all ! # relative or not. ! case $0 in ! *[\\/]* ) as_myself=$0 ;; ! *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break ! done ! ! ;; ! esac ! # We did not find ourselves, most probably we were run as `sh COMMAND' ! # in which case we are not to be found in the path. ! if test "x$as_myself" = x; then ! as_myself=$0 ! fi ! if test ! -f "$as_myself"; then ! { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 ! { (exit 1); exit 1; }; } ! fi ! case $CONFIG_SHELL in ! '') ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for as_base in sh bash ksh sh5; do ! case $as_dir in ! /*) ! if ("$as_dir/$as_base" -c ' ! as_lineno_1=$LINENO ! as_lineno_2=$LINENO ! as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` ! test "x$as_lineno_1" != "x$as_lineno_2" && ! test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then ! $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } ! $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } ! CONFIG_SHELL=$as_dir/$as_base ! export CONFIG_SHELL ! exec "$CONFIG_SHELL" "$0" ${1+"$@"} ! fi;; ! esac ! done ! done ! ;; ! esac ! ! # Create $as_me.lineno as a copy of $as_myself, but with $LINENO ! # uniformly replaced by the line number. The first 'sed' inserts a ! # line-number line before each line; the second 'sed' does the real ! # work. The second script uses 'N' to pair each line-number line ! # with the numbered line, and appends trailing '-' during ! # substitution so that $LINENO is not a special case at line end. ! # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the ! # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) ! sed '=' <$as_myself | ! sed ' ! N ! s,$,-, ! : loop ! s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, ! t loop ! s,-$,, ! s,^['$as_cr_digits']*\n,, ! ' >$as_me.lineno && ! chmod +x $as_me.lineno || ! { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 ! { (exit 1); exit 1; }; } ! ! # Don't try to exec as it changes $[0], causing all sort of problems ! # (the dirname of $[0] is not the place where we might find the ! # original and so on. Autoconf is especially sensible to this). ! . ./$as_me.lineno ! # Exit status is that of the last command. ! exit ! } ! ! ! case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in ! *c*,-n*) ECHO_N= ECHO_C=' ! ' ECHO_T=' ' ;; ! *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; ! *) ECHO_N= ECHO_C='\c' ECHO_T= ;; ! esac ! ! if expr a : '\(a\)' >/dev/null 2>&1; then ! as_expr=expr ! else ! as_expr=false ! fi ! ! rm -f conf$$ conf$$.exe conf$$.file ! echo >conf$$.file ! if ln -s conf$$.file conf$$ 2>/dev/null; then ! # We could just check for DJGPP; but this test a) works b) is more generic ! # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). ! if test -f conf$$.exe; then ! # Don't use ln at all; we don't have any links ! as_ln_s='cp -p' ! else ! as_ln_s='ln -s' ! fi ! elif ln conf$$.file conf$$ 2>/dev/null; then ! as_ln_s=ln ! else ! as_ln_s='cp -p' ! fi ! rm -f conf$$ conf$$.exe conf$$.file ! ! if mkdir -p . 2>/dev/null; then ! as_mkdir_p=: ! else ! as_mkdir_p=false ! fi ! ! as_executable_p="test -f" ! ! # Sed expression to map a string onto a valid CPP name. ! as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" ! ! # Sed expression to map a string onto a valid variable name. ! as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" ! ! ! # IFS ! # We need space, tab and new line, in precisely that order. ! as_nl=' ! ' ! IFS=" $as_nl" ! ! # CDPATH. ! $as_unset CDPATH ! ! ! ! # Check that we are running under the correct shell. ! SHELL=${CONFIG_SHELL-/bin/sh} ! ! case X$ECHO in ! X*--fallback-echo) ! # Remove one level of quotation (which was required for Make). ! ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ! ;; ! esac ! ! echo=${ECHO-echo} ! if test "X$1" = X--no-reexec; then ! # Discard the --no-reexec flag, and continue. ! shift ! elif test "X$1" = X--fallback-echo; then ! # Avoid inline document here, it may be left over ! : ! elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then ! # Yippee, $echo works! ! : ! else ! # Restart under the correct shell. ! exec $SHELL "$0" --no-reexec ${1+"$@"} ! fi ! ! if test "X$1" = X--fallback-echo; then ! # used as fallback echo ! shift ! cat </dev/null && ! echo_test_string="`eval $cmd`" && ! (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null ! then ! break ! fi ! done ! fi ! ! if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && ! echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && ! test "X$echo_testing_string" = "X$echo_test_string"; then ! : ! else ! # The Solaris, AIX, and Digital Unix default echo programs unquote ! # backslashes. This makes it impossible to quote backslashes using ! # echo "$something" | sed 's/\\/\\\\/g' ! # ! # So, first we look for a working echo in the user's PATH. ! ! lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ! for dir in $PATH /usr/ucb; do ! IFS="$lt_save_ifs" ! if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && ! test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && ! echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && ! test "X$echo_testing_string" = "X$echo_test_string"; then ! echo="$dir/echo" ! break ! fi ! done ! IFS="$lt_save_ifs" ! ! if test "X$echo" = Xecho; then ! # We didn't find a better echo, so look for alternatives. ! if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && ! echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && ! test "X$echo_testing_string" = "X$echo_test_string"; then ! # This shell has a builtin print -r that does the trick. ! echo='print -r' ! elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && ! test "X$CONFIG_SHELL" != X/bin/ksh; then ! # If we have ksh, try running configure again with it. ! ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} ! export ORIGINAL_CONFIG_SHELL ! CONFIG_SHELL=/bin/ksh ! export CONFIG_SHELL ! exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} ! else ! # Try using printf. ! echo='printf %s\n' ! if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && ! echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && ! test "X$echo_testing_string" = "X$echo_test_string"; then ! # Cool, printf works ! : ! elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && ! test "X$echo_testing_string" = 'X\t' && ! echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && ! test "X$echo_testing_string" = "X$echo_test_string"; then ! CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL ! export CONFIG_SHELL ! SHELL="$CONFIG_SHELL" ! export SHELL ! echo="$CONFIG_SHELL $0 --fallback-echo" ! elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && ! test "X$echo_testing_string" = 'X\t' && ! echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && ! test "X$echo_testing_string" = "X$echo_test_string"; then ! echo="$CONFIG_SHELL $0 --fallback-echo" ! else ! # maybe with a smaller string... ! prev=: ! ! for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do ! if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null ! then ! break ! fi ! prev="$cmd" ! done ! ! if test "$prev" != 'sed 50q "$0"'; then ! echo_test_string=`eval $prev` ! export echo_test_string ! exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} ! else ! # Oops. We lost completely, so just stick with echo. ! echo=echo ! fi ! fi ! fi ! fi ! fi ! fi ! ! # Copy echo and quote the copy suitably for passing to libtool from ! # the Makefile, instead of quoting the original, which is used later. ! ECHO=$echo ! if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ! ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" ! fi ! ! ! ! ! tagnames=`echo "$tagnames,CXX" | sed 's/^,//'` ! ! tagnames=`echo "$tagnames,F77" | sed 's/^,//'` ! ! # Name of the host. ! # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, ! # so uname gets run too. ! ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` ! ! exec 6>&1 ! ! # ! # Initializations. ! # ac_default_prefix=/usr/local ! ac_config_libobj_dir=. ! cross_compiling=no ! subdirs= ! MFLAGS= ! MAKEFLAGS= ! SHELL=${CONFIG_SHELL-/bin/sh} ! ! # Maximum number of lines to put in a shell here document. ! # This variable seems obsolete. It should probably be removed, and ! # only ac_max_sed_lines should be used. ! : ${ac_max_here_lines=38} ! ! # Identity of this package. ! PACKAGE_NAME='libltdl' ! PACKAGE_TARNAME='libltdl' ! PACKAGE_VERSION='1.2' ! PACKAGE_STRING='libltdl 1.2' ! PACKAGE_BUGREPORT='bug-libtool@gnu.org' ! ! ac_unique_file="ltdl.c" ! # Factoring default headers for most tests. ! ac_includes_default="\ ! #include ! #if HAVE_SYS_TYPES_H ! # include ! #endif ! #if HAVE_SYS_STAT_H ! # include ! #endif ! #if STDC_HEADERS ! # include ! # include ! #else ! # if HAVE_STDLIB_H ! # include ! # endif ! #endif ! #if HAVE_STRING_H ! # if !STDC_HEADERS && HAVE_MEMORY_H ! # include ! # endif ! # include ! #endif ! #if HAVE_STRINGS_H ! # include ! #endif ! #if HAVE_INTTYPES_H ! # include ! #else ! # if HAVE_STDINT_H ! # include ! # endif ! #endif ! #if HAVE_UNISTD_H ! # include ! #endif" ! ! ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB DLLTOOL ac_ct_DLLTOOL AS ac_ct_AS OBJDUMP ac_ct_OBJDUMP CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBTOOL_DEPS INSTALL_LTDL_TRUE INSTALL_LTDL_FALSE CONVENIENCE_LTDL_TRUE CONVENIENCE_LTDL_FALSE LIBADD_DL LIBOBJS LTLIBOBJS' ! ac_subst_files='' # Initialize some variables set by options. + ac_init_help= + ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. ! cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE *************** program_suffix=NONE *** 49,60 **** program_transform_name=s,x,x, silent= site= - sitefile= srcdir= - target=NONE verbose= x_includes=NONE x_libraries=NONE bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' --- 482,497 ---- program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE + + # Installation directory options. + # These are left unexpanded so users can "make install exec_prefix=/foo" + # and all the variables that are supposed to be based on exec_prefix + # by default will actually change. + # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' *************** oldincludedir='/usr/include' *** 68,84 **** infodir='${prefix}/info' mandir='${prefix}/man' - # Initialize some other variables. - subdirs= - MFLAGS= MAKEFLAGS= - SHELL=${CONFIG_SHELL-/bin/sh} - # Maximum number of lines to put in a shell here document. - ac_max_here_lines=12 - ac_prev= for ac_option do - # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" --- 505,513 ---- *************** do *** 86,144 **** continue fi ! case "$ac_option" in ! -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; ! *) ac_optarg= ;; ! esac # Accept the important Cygnus configure options, so we can diagnose typos. ! case "$ac_option" in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) ! bindir="$ac_optarg" ;; -build | --build | --buil | --bui | --bu) ! ac_prev=build ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) ! build="$ac_optarg" ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) ! cache_file="$ac_optarg" ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) ! datadir="$ac_optarg" ;; -disable-* | --disable-*) ! ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. ! if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then ! { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } ! fi ! ac_feature=`echo $ac_feature| sed 's/-/_/g'` ! eval "enable_${ac_feature}=no" ;; -enable-* | --enable-*) ! ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. ! if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then ! { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } ! fi ! ac_feature=`echo $ac_feature| sed 's/-/_/g'` ! case "$ac_option" in ! *=*) ;; *) ac_optarg=yes ;; esac ! eval "enable_${ac_feature}='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ --- 515,573 ---- continue fi ! ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. ! case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) ! bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ! ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) ! build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) ! cache_file=$ac_optarg ;; ! ! --config-cache | -C) ! cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) ! datadir=$ac_optarg ;; -disable-* | --disable-*) ! ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. ! expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && ! { echo "$as_me: error: invalid feature name: $ac_feature" >&2 ! { (exit 1); exit 1; }; } ! ac_feature=`echo $ac_feature | sed 's/-/_/g'` ! eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ! ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. ! expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && ! { echo "$as_me: error: invalid feature name: $ac_feature" >&2 ! { (exit 1); exit 1; }; } ! ac_feature=`echo $ac_feature | sed 's/-/_/g'` ! case $ac_option in ! *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac ! eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ *************** do *** 147,242 **** -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) ! exec_prefix="$ac_optarg" ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; ! -help | --help | --hel | --he) ! # Omit some internal or obsolete options to make the list less imposing. ! # This message is too long to be a string in the A/UX 3.1 sh. ! cat << EOF ! Usage: configure [options] [host] ! Options: [defaults in brackets after descriptions] ! Configuration: ! --cache-file=FILE cache test results in FILE ! --help print this message ! --no-create do not create output files ! --quiet, --silent do not print \`checking...' messages ! --site-file=FILE use FILE as the site file ! --version print the version of autoconf that created configure ! Directory and file names: ! --prefix=PREFIX install architecture-independent files in PREFIX ! [$ac_default_prefix] ! --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX ! [same as prefix] ! --bindir=DIR user executables in DIR [EPREFIX/bin] ! --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] ! --libexecdir=DIR program executables in DIR [EPREFIX/libexec] ! --datadir=DIR read-only architecture-independent data in DIR ! [PREFIX/share] ! --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] ! --sharedstatedir=DIR modifiable architecture-independent data in DIR ! [PREFIX/com] ! --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] ! --libdir=DIR object code libraries in DIR [EPREFIX/lib] ! --includedir=DIR C header files in DIR [PREFIX/include] ! --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] ! --infodir=DIR info documentation in DIR [PREFIX/info] ! --mandir=DIR man documentation in DIR [PREFIX/man] ! --srcdir=DIR find the sources in DIR [configure dir or ..] ! --program-prefix=PREFIX prepend PREFIX to installed program names ! --program-suffix=SUFFIX append SUFFIX to installed program names ! --program-transform-name=PROGRAM ! run sed PROGRAM on installed program names ! EOF ! cat << EOF ! Host type: ! --build=BUILD configure for building on BUILD [BUILD=HOST] ! --host=HOST configure for HOST [guessed] ! --target=TARGET configure for TARGET [TARGET=HOST] ! Features and packages: ! --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) ! --enable-FEATURE[=ARG] include FEATURE [ARG=yes] ! --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] ! --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) ! --x-includes=DIR X include files are in DIR ! --x-libraries=DIR X library files are in DIR ! EOF ! if test -n "$ac_help"; then ! echo "--enable and --with options recognized:$ac_help" ! fi ! exit 0 ;; -host | --host | --hos | --ho) ! ac_prev=host ;; -host=* | --host=* | --hos=* | --ho=*) ! host="$ac_optarg" ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) ! includedir="$ac_optarg" ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) ! infodir="$ac_optarg" ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) ! libdir="$ac_optarg" ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) ! libexecdir="$ac_optarg" ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ --- 576,622 ---- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) ! exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; ! -help | --help | --hel | --he | -h) ! ac_init_help=long ;; ! -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ! ac_init_help=recursive ;; ! -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ! ac_init_help=short ;; -host | --host | --hos | --ho) ! ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) ! host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) ! includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) ! infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) ! libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) ! libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ *************** EOF *** 245,263 **** -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) ! localstatedir="$ac_optarg" ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) ! mandir="$ac_optarg" ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ ! | --no-cr | --no-c) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ --- 625,643 ---- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) ! localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) ! mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ ! | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ *************** EOF *** 271,296 **** -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) ! oldincludedir="$ac_optarg" ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ! prefix="$ac_optarg" ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) ! program_prefix="$ac_optarg" ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) ! program_suffix="$ac_optarg" ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ --- 651,676 ---- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) ! oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ! prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) ! program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) ! program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ *************** EOF *** 307,313 **** | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) ! program_transform_name="$ac_optarg" ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) --- 687,693 ---- | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) ! program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) *************** EOF *** 317,323 **** ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) ! sbindir="$ac_optarg" ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ --- 697,703 ---- ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) ! sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ *************** EOF *** 328,390 **** | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) ! sharedstatedir="$ac_optarg" ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) ! site="$ac_optarg" ;; ! ! -site-file | --site-file | --site-fil | --site-fi | --site-f) ! ac_prev=sitefile ;; ! -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) ! sitefile="$ac_optarg" ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ! srcdir="$ac_optarg" ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) ! sysconfdir="$ac_optarg" ;; -target | --target | --targe | --targ | --tar | --ta | --t) ! ac_prev=target ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) ! target="$ac_optarg" ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; ! -version | --version | --versio | --versi | --vers) ! echo "configure generated by autoconf version 2.13" ! exit 0 ;; -with-* | --with-*) ! ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. ! if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then ! { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } ! fi ac_package=`echo $ac_package| sed 's/-/_/g'` ! case "$ac_option" in ! *=*) ;; *) ac_optarg=yes ;; esac ! eval "with_${ac_package}='$ac_optarg'" ;; -without-* | --without-*) ! ac_package=`echo $ac_option|sed -e 's/-*without-//'` # Reject names that are not valid shell variable names. ! if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then ! { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } ! fi ! ac_package=`echo $ac_package| sed 's/-/_/g'` ! eval "with_${ac_package}=no" ;; --x) # Obsolete; use --with-x. --- 708,764 ---- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) ! sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) ! site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ! srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) ! sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ! ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) ! target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; ! -version | --version | --versio | --versi | --vers | -V) ! ac_init_version=: ;; -with-* | --with-*) ! ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. ! expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && ! { echo "$as_me: error: invalid package name: $ac_package" >&2 ! { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` ! case $ac_option in ! *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac ! eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ! ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. ! expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && ! { echo "$as_me: error: invalid package name: $ac_package" >&2 ! { (exit 1); exit 1; }; } ! ac_package=`echo $ac_package | sed 's/-/_/g'` ! eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. *************** EOF *** 395,493 **** ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) ! x_includes="$ac_optarg" ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) ! x_libraries="$ac_optarg" ;; ! -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ;; *) ! if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then ! echo "configure: warning: $ac_option: invalid host type" 1>&2 ! fi ! if test "x$nonopt" != xNONE; then ! { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ! fi ! nonopt="$ac_option" ;; esac done if test -n "$ac_prev"; then ! { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } ! fi ! ! trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 ! ! # File descriptor usage: ! # 0 standard input ! # 1 file creation ! # 2 errors and warnings ! # 3 some systems may open it to /dev/tty ! # 4 used on the Kubota Titan ! # 6 checking for... messages and results ! # 5 compiler messages saved in config.log ! if test "$silent" = yes; then ! exec 6>/dev/null ! else ! exec 6>&1 fi - exec 5>./config.log ! echo "\ ! This file contains any messages produced by compilers while ! running configure, to aid debugging if configure makes a mistake. ! " 1>&5 ! # Strip out --no-create and --no-recursion so they do not pile up. ! # Also quote any args containing shell metacharacters. ! ac_configure_args= ! for ac_arg do ! case "$ac_arg" in ! -no-create | --no-create | --no-creat | --no-crea | --no-cre \ ! | --no-cr | --no-c) ;; ! -no-recursion | --no-recursion | --no-recursio | --no-recursi \ ! | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; ! *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ! ac_configure_args="$ac_configure_args '$ac_arg'" ;; ! *) ac_configure_args="$ac_configure_args $ac_arg" ;; esac done ! # NLS nuisances. ! # Only set these to C if already set. These must not be set unconditionally ! # because not all systems understand e.g. LANG=C (notably SCO). ! # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! ! # Non-C LC_CTYPE values break the ctype check. ! if test "${LANG+set}" = set; then LANG=C; export LANG; fi ! if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi ! if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi ! if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi ! # confdefs.h avoids OS command line length limits that DEFS can exceed. ! rm -rf conftest* confdefs.h ! # AIX cpp loses on an empty file, so make sure it contains at least a newline. ! echo > confdefs.h - # A filename unique to this package, relative to the directory that - # configure is in, which we can look for to find out if srcdir is correct. - ac_unique_file=ltdl.c # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ! ac_prog=$0 ! ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` ! test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. --- 769,878 ---- ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) ! x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) ! x_libraries=$ac_optarg ;; ! -*) { echo "$as_me: error: unrecognized option: $ac_option ! Try \`$0 --help' for more information." >&2 ! { (exit 1); exit 1; }; } ;; + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + *) ! # FIXME: should be removed in autoconf 3.0. ! echo "$as_me: WARNING: you should use --build, --host, --target" >&2 ! expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && ! echo "$as_me: WARNING: invalid host type: $ac_option" >&2 ! : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ! ac_option=--`echo $ac_prev | sed 's/_/-/g'` ! { echo "$as_me: error: missing argument to $ac_option" >&2 ! { (exit 1); exit 1; }; } fi ! # Be sure to have absolute paths. ! for ac_var in exec_prefix prefix ! do ! eval ac_val=$`echo $ac_var` ! case $ac_val in ! [\\/$]* | ?:[\\/]* | NONE | '' ) ;; ! *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 ! { (exit 1); exit 1; }; };; ! esac ! done ! # Be sure to have absolute paths. ! for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ ! localstatedir libdir includedir oldincludedir infodir mandir do ! eval ac_val=$`echo $ac_var` ! case $ac_val in ! [\\/$]* | ?:[\\/]* ) ;; ! *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 ! { (exit 1); exit 1; }; };; esac done ! # There might be people who depend on the old broken behavior: `$host' ! # used to hold the argument of --host etc. ! # FIXME: To remove some day. ! build=$build_alias ! host=$host_alias ! target=$target_alias ! # FIXME: To remove some day. ! if test "x$host_alias" != x; then ! if test "x$build_alias" = x; then ! cross_compiling=maybe ! echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. ! If a cross compiler is detected then cross compile mode will be used." >&2 ! elif test "x$build_alias" != "x$host_alias"; then ! cross_compiling=yes ! fi ! fi ! ! ac_tool_prefix= ! test -n "$host_alias" && ac_tool_prefix=$host_alias- ! ! test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ! ac_confdir=`(dirname "$0") 2>/dev/null || ! $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X"$0" : 'X\(//\)[^/]' \| \ ! X"$0" : 'X\(//\)$' \| \ ! X"$0" : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X"$0" | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. *************** else *** 497,647 **** fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then ! { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } else ! { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } fi fi ! srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` ! # Prefer explicitly selected file to automatically selected ones. ! if test -z "$sitefile"; then ! if test -z "$CONFIG_SITE"; then ! if test "x$prefix" != xNONE; then ! CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else ! CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi - else - CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then ! echo "loading site script $ac_site_file" . "$ac_site_file" fi done if test -r "$cache_file"; then ! echo "loading cache $cache_file" ! . $cache_file else ! echo "creating cache $cache_file" ! > $cache_file fi ac_ext=c - # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ! ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ! cross_compiling=$ac_cv_prog_cc_cross - ac_exeext= - ac_objext=o - if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' - ' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi - else - ac_n= ac_c='\c' ac_t= - fi - echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 - echo "configure:557: checking for Cygwin environment" >&5 - if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_cygwin=yes - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_cygwin=no - fi - rm -f conftest* - rm -f conftest* - fi - echo "$ac_t""$ac_cv_cygwin" 1>&6 - CYGWIN= - test "$ac_cv_cygwin" = yes && CYGWIN=yes - echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 - echo "configure:590: checking for mingw32 environment" >&5 - if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_mingw32=yes - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_mingw32=no - fi - rm -f conftest* - rm -f conftest* - fi - echo "$ac_t""$ac_cv_mingw32" 1>&6 - MINGW32= - test "$ac_cv_mingw32" = yes && MINGW32=yes - # Check whether --with-auxdir or --without-auxdir was given. - if test "${with_auxdir+set}" = set; then - withval="$with_auxdir" - ac_aux_dir= - for ac_dir in $with_auxdir $srcdir/$with_auxdir; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi - done - if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $with_auxdir $srcdir/$with_auxdir" 1>&2; exit 1; } - fi - ac_config_guess=$ac_aux_dir/config.guess - ac_config_sub=$ac_aux_dir/config.sub - ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. ! else ! ac_aux_dir= ! for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" --- 882,1493 ---- fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then ! { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 ! { (exit 1); exit 1; }; } else ! { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 ! { (exit 1); exit 1; }; } fi fi ! (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || ! { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 ! { (exit 1); exit 1; }; } ! srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ! ac_env_build_alias_set=${build_alias+set} ! ac_env_build_alias_value=$build_alias ! ac_cv_env_build_alias_set=${build_alias+set} ! ac_cv_env_build_alias_value=$build_alias ! ac_env_host_alias_set=${host_alias+set} ! ac_env_host_alias_value=$host_alias ! ac_cv_env_host_alias_set=${host_alias+set} ! ac_cv_env_host_alias_value=$host_alias ! ac_env_target_alias_set=${target_alias+set} ! ac_env_target_alias_value=$target_alias ! ac_cv_env_target_alias_set=${target_alias+set} ! ac_cv_env_target_alias_value=$target_alias ! ac_env_CC_set=${CC+set} ! ac_env_CC_value=$CC ! ac_cv_env_CC_set=${CC+set} ! ac_cv_env_CC_value=$CC ! ac_env_CFLAGS_set=${CFLAGS+set} ! ac_env_CFLAGS_value=$CFLAGS ! ac_cv_env_CFLAGS_set=${CFLAGS+set} ! ac_cv_env_CFLAGS_value=$CFLAGS ! ac_env_LDFLAGS_set=${LDFLAGS+set} ! ac_env_LDFLAGS_value=$LDFLAGS ! ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ! ac_cv_env_LDFLAGS_value=$LDFLAGS ! ac_env_CPPFLAGS_set=${CPPFLAGS+set} ! ac_env_CPPFLAGS_value=$CPPFLAGS ! ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ! ac_cv_env_CPPFLAGS_value=$CPPFLAGS ! ac_env_CPP_set=${CPP+set} ! ac_env_CPP_value=$CPP ! ac_cv_env_CPP_set=${CPP+set} ! ac_cv_env_CPP_value=$CPP ! ac_env_CXX_set=${CXX+set} ! ac_env_CXX_value=$CXX ! ac_cv_env_CXX_set=${CXX+set} ! ac_cv_env_CXX_value=$CXX ! ac_env_CXXFLAGS_set=${CXXFLAGS+set} ! ac_env_CXXFLAGS_value=$CXXFLAGS ! ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} ! ac_cv_env_CXXFLAGS_value=$CXXFLAGS ! ac_env_CXXCPP_set=${CXXCPP+set} ! ac_env_CXXCPP_value=$CXXCPP ! ac_cv_env_CXXCPP_set=${CXXCPP+set} ! ac_cv_env_CXXCPP_value=$CXXCPP ! ac_env_F77_set=${F77+set} ! ac_env_F77_value=$F77 ! ac_cv_env_F77_set=${F77+set} ! ac_cv_env_F77_value=$F77 ! ac_env_FFLAGS_set=${FFLAGS+set} ! ac_env_FFLAGS_value=$FFLAGS ! ac_cv_env_FFLAGS_set=${FFLAGS+set} ! ac_cv_env_FFLAGS_value=$FFLAGS ! # ! # Report the --help message. ! # ! if test "$ac_init_help" = "long"; then ! # Omit some internal or obsolete options to make the list less imposing. ! # This message is too long to be a string in the A/UX 3.1 sh. ! cat <<_ACEOF ! \`configure' configures libltdl 1.2 to adapt to many kinds of systems. ! ! Usage: $0 [OPTION]... [VAR=VALUE]... ! ! To assign environment variables (e.g., CC, CFLAGS...), specify them as ! VAR=VALUE. See below for descriptions of some of the useful variables. ! ! Defaults for the options are specified in brackets. ! ! Configuration: ! -h, --help display this help and exit ! --help=short display options specific to this package ! --help=recursive display the short help of all the included packages ! -V, --version display version information and exit ! -q, --quiet, --silent do not print \`checking...' messages ! --cache-file=FILE cache test results in FILE [disabled] ! -C, --config-cache alias for \`--cache-file=config.cache' ! -n, --no-create do not create output files ! --srcdir=DIR find the sources in DIR [configure dir or \`..'] ! ! _ACEOF ! ! cat <<_ACEOF ! Installation directories: ! --prefix=PREFIX install architecture-independent files in PREFIX ! [$ac_default_prefix] ! --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX ! [PREFIX] ! ! By default, \`make install' will install all the files in ! \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify ! an installation prefix other than \`$ac_default_prefix' using \`--prefix', ! for instance \`--prefix=\$HOME'. ! ! For better control, use the options below. ! ! Fine tuning of the installation directories: ! --bindir=DIR user executables [EPREFIX/bin] ! --sbindir=DIR system admin executables [EPREFIX/sbin] ! --libexecdir=DIR program executables [EPREFIX/libexec] ! --datadir=DIR read-only architecture-independent data [PREFIX/share] ! --sysconfdir=DIR read-only single-machine data [PREFIX/etc] ! --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] ! --localstatedir=DIR modifiable single-machine data [PREFIX/var] ! --libdir=DIR object code libraries [EPREFIX/lib] ! --includedir=DIR C header files [PREFIX/include] ! --oldincludedir=DIR C header files for non-gcc [/usr/include] ! --infodir=DIR info documentation [PREFIX/info] ! --mandir=DIR man documentation [PREFIX/man] ! _ACEOF ! ! cat <<\_ACEOF ! ! Program names: ! --program-prefix=PREFIX prepend PREFIX to installed program names ! --program-suffix=SUFFIX append SUFFIX to installed program names ! --program-transform-name=PROGRAM run sed PROGRAM on installed program names ! ! System types: ! --build=BUILD configure for building on BUILD [guessed] ! --host=HOST cross-compile to build programs to run on HOST [BUILD] ! _ACEOF ! fi ! ! if test -n "$ac_init_help"; then ! case $ac_init_help in ! short | recursive ) echo "Configuration of libltdl 1.2:";; ! esac ! cat <<\_ACEOF ! ! Optional Features: ! --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) ! --enable-FEATURE[=ARG] include FEATURE [ARG=yes] ! --enable-maintainer-mode enable make rules and dependencies not useful ! (and sometimes confusing) to the casual installer ! --disable-dependency-tracking Speeds up one-time builds ! --enable-dependency-tracking Do not reject slow dependency extractors ! --enable-shared[=PKGS] ! build shared libraries [default=yes] ! --enable-static[=PKGS] ! build static libraries [default=yes] ! --enable-fast-install[=PKGS] ! optimize for fast installation [default=yes] ! --disable-libtool-lock avoid locking (might break parallel builds) ! --enable-ltdl-install install libltdl ! ! Optional Packages: ! --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] ! --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) ! --with-gnu-ld assume the C compiler uses GNU ld [default=no] ! --with-pic try to use only PIC/non-PIC objects [default=use ! both] ! --with-tags[=TAGS] ! include additional configurations [automatic] ! ! Some influential environment variables: ! CC C compiler command ! CFLAGS C compiler flags ! LDFLAGS linker flags, e.g. -L if you have libraries in a ! nonstandard directory ! CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have ! headers in a nonstandard directory ! CPP C preprocessor ! CXX C++ compiler command ! CXXFLAGS C++ compiler flags ! CXXCPP C++ preprocessor ! F77 Fortran 77 compiler command ! FFLAGS Fortran 77 compiler flags ! ! Use these variables to override the choices made by `configure' or to help ! it to find libraries and programs with nonstandard names/locations. ! ! Report bugs to . ! _ACEOF ! fi ! ! if test "$ac_init_help" = "recursive"; then ! # If there are subdirs, report their specific --help. ! ac_popdir=`pwd` ! for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue ! test -d $ac_dir || continue ! ac_builddir=. ! ! if test "$ac_dir" != .; then ! ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` ! # A "../" for each directory in $ac_dir_suffix. ! ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` ! else ! ac_dir_suffix= ac_top_builddir= ! fi ! ! case $srcdir in ! .) # No --srcdir option. We are building in place. ! ac_srcdir=. ! if test -z "$ac_top_builddir"; then ! ac_top_srcdir=. else ! ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` ! fi ;; ! [\\/]* | ?:[\\/]* ) # Absolute path. ! ac_srcdir=$srcdir$ac_dir_suffix; ! ac_top_srcdir=$srcdir ;; ! *) # Relative path. ! ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ! ac_top_srcdir=$ac_top_builddir$srcdir ;; ! esac ! # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be ! # absolute. ! ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ! ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ! ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ! ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` ! ! cd $ac_dir ! # Check for guested configure; otherwise get Cygnus style configure. ! if test -f $ac_srcdir/configure.gnu; then ! echo ! $SHELL $ac_srcdir/configure.gnu --help=recursive ! elif test -f $ac_srcdir/configure; then ! echo ! $SHELL $ac_srcdir/configure --help=recursive ! elif test -f $ac_srcdir/configure.ac || ! test -f $ac_srcdir/configure.in; then ! echo ! $ac_configure --help ! else ! echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 ! fi ! cd "$ac_popdir" ! done ! fi ! ! test -n "$ac_init_help" && exit 0 ! if $ac_init_version; then ! cat <<\_ACEOF ! libltdl configure 1.2 ! generated by GNU Autoconf 2.57 ! ! Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 ! Free Software Foundation, Inc. ! This configure script is free software; the Free Software Foundation ! gives unlimited permission to copy, distribute and modify it. ! _ACEOF ! exit 0 ! fi ! exec 5>config.log ! cat >&5 <<_ACEOF ! This file contains any messages produced by compilers while ! running configure, to aid debugging if configure makes a mistake. ! ! It was created by libltdl $as_me 1.2, which was ! generated by GNU Autoconf 2.57. Invocation command line was ! ! $ $0 $@ ! ! _ACEOF ! { ! cat <<_ASUNAME ! ## --------- ## ! ## Platform. ## ! ## --------- ## ! ! hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` ! uname -m = `(uname -m) 2>/dev/null || echo unknown` ! uname -r = `(uname -r) 2>/dev/null || echo unknown` ! uname -s = `(uname -s) 2>/dev/null || echo unknown` ! uname -v = `(uname -v) 2>/dev/null || echo unknown` ! ! /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` ! /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` ! ! /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` ! /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` ! /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` ! hostinfo = `(hostinfo) 2>/dev/null || echo unknown` ! /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` ! /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` ! /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` ! ! _ASUNAME ! ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! echo "PATH: $as_dir" ! done ! ! } >&5 ! ! cat >&5 <<_ACEOF ! ! ! ## ----------- ## ! ## Core tests. ## ! ## ----------- ## ! ! _ACEOF ! ! ! # Keep a trace of the command line. ! # Strip out --no-create and --no-recursion so they do not pile up. ! # Strip out --silent because we don't want to record it for future runs. ! # Also quote any args containing shell meta-characters. ! # Make two passes to allow for proper duplicate-argument suppression. ! ac_configure_args= ! ac_configure_args0= ! ac_configure_args1= ! ac_sep= ! ac_must_keep_next=false ! for ac_pass in 1 2 ! do ! for ac_arg ! do ! case $ac_arg in ! -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; ! -q | -quiet | --quiet | --quie | --qui | --qu | --q \ ! | -silent | --silent | --silen | --sile | --sil) ! continue ;; ! *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ! ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; ! esac ! case $ac_pass in ! 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; ! 2) ! ac_configure_args1="$ac_configure_args1 '$ac_arg'" ! if test $ac_must_keep_next = true; then ! ac_must_keep_next=false # Got value, back to normal. ! else ! case $ac_arg in ! *=* | --config-cache | -C | -disable-* | --disable-* \ ! | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ ! | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ ! | -with-* | --with-* | -without-* | --without-* | --x) ! case "$ac_configure_args0 " in ! "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; ! esac ! ;; ! -* ) ac_must_keep_next=true ;; ! esac ! fi ! ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" ! # Get rid of the leading space. ! ac_sep=" " ! ;; ! esac ! done ! done ! $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } ! $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } ! ! # When interrupted or exit'd, cleanup temporary files, and complete ! # config.log. We remove comments because anyway the quotes in there ! # would cause problems or look ugly. ! # WARNING: Be sure not to use single quotes in there, as some shells, ! # such as our DU 5.0 friend, will then `close' the trap. ! trap 'exit_status=$? ! # Save into config.log some information that might help in debugging. ! { ! echo ! ! cat <<\_ASBOX ! ## ---------------- ## ! ## Cache variables. ## ! ## ---------------- ## ! _ASBOX ! echo ! # The following way of writing the cache mishandles newlines in values, ! { ! (set) 2>&1 | ! case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in ! *ac_space=\ *) ! sed -n \ ! "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; ! s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ! ;; ! *) ! sed -n \ ! "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ! ;; ! esac; ! } ! echo ! ! cat <<\_ASBOX ! ## ----------------- ## ! ## Output variables. ## ! ## ----------------- ## ! _ASBOX ! echo ! for ac_var in $ac_subst_vars ! do ! eval ac_val=$`echo $ac_var` ! echo "$ac_var='"'"'$ac_val'"'"'" ! done | sort ! echo ! ! if test -n "$ac_subst_files"; then ! cat <<\_ASBOX ! ## ------------- ## ! ## Output files. ## ! ## ------------- ## ! _ASBOX ! echo ! for ac_var in $ac_subst_files ! do ! eval ac_val=$`echo $ac_var` ! echo "$ac_var='"'"'$ac_val'"'"'" ! done | sort ! echo ! fi ! ! if test -s confdefs.h; then ! cat <<\_ASBOX ! ## ----------- ## ! ## confdefs.h. ## ! ## ----------- ## ! _ASBOX ! echo ! sed "/^$/d" confdefs.h | sort ! echo fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status + ' 0 + for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal + done + ac_signal=0 + + # confdefs.h avoids OS command line length limits that DEFS can exceed. + rm -rf conftest* confdefs.h + # AIX cpp loses on an empty file, so make sure it contains at least a newline. + echo >confdefs.h + + # Predefined preprocessor variables. + + cat >>confdefs.h <<_ACEOF + #define PACKAGE_NAME "$PACKAGE_NAME" + _ACEOF + + + cat >>confdefs.h <<_ACEOF + #define PACKAGE_TARNAME "$PACKAGE_TARNAME" + _ACEOF + + + cat >>confdefs.h <<_ACEOF + #define PACKAGE_VERSION "$PACKAGE_VERSION" + _ACEOF + + + cat >>confdefs.h <<_ACEOF + #define PACKAGE_STRING "$PACKAGE_STRING" + _ACEOF + + + cat >>confdefs.h <<_ACEOF + #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" + _ACEOF + + + # Let the site file select an alternate cache file if it wants to. + # Prefer explicitly selected file to automatically selected ones. + if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then ! { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 ! echo "$as_me: loading site script $ac_site_file" >&6;} ! sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then ! # Some versions of bash will fail to source /dev/null (special ! # files actually), so we avoid doing that. ! if test -f "$cache_file"; then ! { echo "$as_me:$LINENO: loading cache $cache_file" >&5 ! echo "$as_me: loading cache $cache_file" >&6;} ! case $cache_file in ! [\\/]* | ?:[\\/]* ) . $cache_file;; ! *) . ./$cache_file;; ! esac ! fi else ! { echo "$as_me:$LINENO: creating cache $cache_file" >&5 ! echo "$as_me: creating cache $cache_file" >&6;} ! >$cache_file ! fi ! ! # Check that the precious variables saved in the cache have kept the same ! # value. ! ac_cache_corrupted=false ! for ac_var in `(set) 2>&1 | ! sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do ! eval ac_old_set=\$ac_cv_env_${ac_var}_set ! eval ac_new_set=\$ac_env_${ac_var}_set ! eval ac_old_val="\$ac_cv_env_${ac_var}_value" ! eval ac_new_val="\$ac_env_${ac_var}_value" ! case $ac_old_set,$ac_new_set in ! set,) ! { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 ! echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ! ac_cache_corrupted=: ;; ! ,set) ! { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 ! echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ! ac_cache_corrupted=: ;; ! ,);; ! *) ! if test "x$ac_old_val" != "x$ac_new_val"; then ! { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 ! echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ! { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 ! echo "$as_me: former value: $ac_old_val" >&2;} ! { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 ! echo "$as_me: current value: $ac_new_val" >&2;} ! ac_cache_corrupted=: ! fi;; ! esac ! # Pass precious variables to config.status. ! if test "$ac_new_set" = set; then ! case $ac_new_val in ! *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ! ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; ! *) ac_arg=$ac_var=$ac_new_val ;; ! esac ! case " $ac_configure_args " in ! *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. ! *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; ! esac ! fi ! done ! if $ac_cache_corrupted; then ! { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 ! echo "$as_me: error: changes in the environment can compromise the build" >&2;} ! { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 ! echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} ! { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ! ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ! ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_c_compiler_gnu ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ## ------------------------------- ## ! ## Libltdl specific configuration. ## ! ## ------------------------------- ## ! ! ac_aux_dir= ! for ac_dir in . $srcdir/.; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" *************** for ac_dir in $srcdir $srcdir/.. $srcdir *** 650,683 **** ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break fi done if test -z "$ac_aux_dir"; then ! { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } ! fi ! ac_config_guess=$ac_aux_dir/config.guess ! ac_config_sub=$ac_aux_dir/config.sub ! ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. ! fi ! ! ! # This is another blatant hack to work around automake bugs. ! mkinstalldirs="$ac_aux_dir/mkinstalldirs" if test -z "$enable_ltdl_install$enable_ltdl_convenience"; then ! if test -f ${srcdir}/ltconfig && test -f ${srcdir}/ltmain.sh; then # if libltdl is libtoolized, it is assumed to be stand-alone and # installed unless the command line overrides it (tested above) enable_ltdl_install=yes else ! echo "configure: warning: *** The top-level configure must select either" 1>&2 ! echo "configure: warning: *** A""C_LIBLTDL_INSTALLABLE or A""C_LIBLTDL_CONVENIENCE." 1>&2 ! { echo "configure: error: *** Maybe you want to --enable-ltdl-install?" 1>&2; exit 1; } fi fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: --- 1496,1538 ---- ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break fi done if test -z "$ac_aux_dir"; then ! { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in . $srcdir/." >&5 ! echo "$as_me: error: cannot find install-sh or install.sh in . $srcdir/." >&2;} ! { (exit 1); exit 1; }; } fi ! ac_config_guess="$SHELL $ac_aux_dir/config.guess" ! ac_config_sub="$SHELL $ac_aux_dir/config.sub" ! ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. if test -z "$enable_ltdl_install$enable_ltdl_convenience"; then ! if test -f ${srcdir}/ltmain.sh; then # if libltdl is libtoolized, it is assumed to be stand-alone and # installed unless the command line overrides it (tested above) enable_ltdl_install=yes else ! { echo "$as_me:$LINENO: WARNING: *** The top-level configure must select either" >&5 ! echo "$as_me: WARNING: *** The top-level configure must select either" >&2;} ! { echo "$as_me:$LINENO: WARNING: *** A\"\"C_LIBLTDL_INSTALLABLE or A\"\"C_LIBLTDL_CONVENIENCE." >&5 ! echo "$as_me: WARNING: *** A\"\"C_LIBLTDL_INSTALLABLE or A\"\"C_LIBLTDL_CONVENIENCE." >&2;} ! { { echo "$as_me:$LINENO: error: *** Maybe you want to --enable-ltdl-install?" >&5 ! echo "$as_me: error: *** Maybe you want to --enable-ltdl-install?" >&2;} ! { (exit 1); exit 1; }; } fi fi + + ## ------------------------ ## + ## Automake Initialisation. ## + ## ------------------------ ## + am__api_version="1.7" # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: *************** fi *** 685,924 **** # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. ! echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:694: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then ! if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" ! for ac_dir in $PATH; do ! # Account for people who put trailing slashes in PATH elements. ! case "$ac_dir/" in ! /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; ! *) ! # OSF1 and SCO ODT 3.0 have their own names for install. ! # Don't use installbsd from OSF since it installs stuff as root ! # by default. ! for ac_prog in ginstall scoinst install; do ! if test -f $ac_dir/$ac_prog; then ! if test $ac_prog = install && ! grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then ! # AIX install. It has an incompatible calling convention. ! : ! else ! ac_cv_path_install="$ac_dir/$ac_prog -c" ! break 2 ! fi ! fi done ! ;; ! esac ! done ! IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then ! INSTALL="$ac_cv_path_install" else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. ! INSTALL="$ac_install_sh" fi fi ! echo "$ac_t""$INSTALL" 1>&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' ! test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ! echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 ! echo "configure:747: checking whether build environment is sane" >&5 # Just in case sleep 1 ! echo timestamp > conftestfile # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( ! set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` if test "$*" = "X"; then # -L didn't work. ! set X `ls -t $srcdir/configure conftestfile` fi ! if test "$*" != "X $srcdir/configure conftestfile" \ ! && test "$*" != "X conftestfile $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". ! { echo "configure: error: ls -t appears to fail. Make sure there is not a broken ! alias in your environment" 1>&2; exit 1; } fi ! test "$2" = conftestfile ) then # Ok. : else ! { echo "configure: error: newly created file is older than distributed files! ! Check your system clock" 1>&2; exit 1; } ! fi ! rm -f conftest* ! echo "$ac_t""yes" 1>&6 ! if test "$program_transform_name" = s,x,x,; then ! program_transform_name= ! else ! # Double any \ or $. echo might interpret backslashes. ! cat <<\EOF_SED > conftestsed ! s,\\,\\\\,g; s,\$,$$,g ! EOF_SED ! program_transform_name="`echo $program_transform_name|sed -f conftestsed`" ! rm -f conftestsed fi test "$program_prefix" != NONE && ! program_transform_name="s,^,${program_prefix},; $program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && ! program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" - # sed with no file args requires a program. - test "$program_transform_name" = "" && program_transform_name="s,x,x," ! echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:804: checking whether ${MAKE-make} sets \${MAKE}" >&5 ! set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` ! if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftestmake <<\EOF all: ! @echo 'ac_maketemp="${MAKE}"' ! EOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. ! eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi ! rm -f conftestmake fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then ! echo "$ac_t""yes" 1>&6 SET_MAKE= else ! echo "$ac_t""no" 1>&6 SET_MAKE="MAKE=${MAKE-make}" fi ! PACKAGE=libltdl ! ! VERSION=1.1 ! if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then ! { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } fi ! missing_dir=`cd $ac_aux_dir && pwd` ! echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 ! echo "configure:843: checking for working aclocal" >&5 ! # Run test in a subshell; some versions of sh will print an error if ! # an executable is not found, even if stderr is redirected. ! # Redirect stdin to placate older versions of autoconf. Sigh. ! if (aclocal --version) < /dev/null > /dev/null 2>&1; then ! ACLOCAL=aclocal ! echo "$ac_t""found" 1>&6 else ! ACLOCAL="$missing_dir/missing aclocal" ! echo "$ac_t""missing" 1>&6 ! fi ! echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 ! echo "configure:856: checking for working autoconf" >&5 ! # Run test in a subshell; some versions of sh will print an error if ! # an executable is not found, even if stderr is redirected. ! # Redirect stdin to placate older versions of autoconf. Sigh. ! if (autoconf --version) < /dev/null > /dev/null 2>&1; then ! AUTOCONF=autoconf ! echo "$ac_t""found" 1>&6 else ! AUTOCONF="$missing_dir/missing autoconf" ! echo "$ac_t""missing" 1>&6 fi - echo $ac_n "checking for working automake""... $ac_c" 1>&6 - echo "configure:869: checking for working automake" >&5 - # Run test in a subshell; some versions of sh will print an error if - # an executable is not found, even if stderr is redirected. - # Redirect stdin to placate older versions of autoconf. Sigh. - if (automake --version) < /dev/null > /dev/null 2>&1; then - AUTOMAKE=automake - echo "$ac_t""found" 1>&6 - else - AUTOMAKE="$missing_dir/missing automake" - echo "$ac_t""missing" 1>&6 fi ! echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 ! echo "configure:882: checking for working autoheader" >&5 ! # Run test in a subshell; some versions of sh will print an error if ! # an executable is not found, even if stderr is redirected. ! # Redirect stdin to placate older versions of autoconf. Sigh. ! if (autoheader --version) < /dev/null > /dev/null 2>&1; then ! AUTOHEADER=autoheader ! echo "$ac_t""found" 1>&6 else ! AUTOHEADER="$missing_dir/missing autoheader" ! echo "$ac_t""missing" 1>&6 fi ! echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 ! echo "configure:895: checking for working makeinfo" >&5 ! # Run test in a subshell; some versions of sh will print an error if ! # an executable is not found, even if stderr is redirected. ! # Redirect stdin to placate older versions of autoconf. Sigh. ! if (makeinfo --version) < /dev/null > /dev/null 2>&1; then ! MAKEINFO=makeinfo ! echo "$ac_t""found" 1>&6 else ! MAKEINFO="$missing_dir/missing makeinfo" ! echo "$ac_t""missing" 1>&6 fi ! echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 ! echo "configure:912: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no ! fi - echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 - if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= --- 1540,1916 ---- # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install + # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. ! echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 ! echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then ! if test "${ac_cv_path_install+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! # Account for people who put trailing slashes in PATH elements. ! case $as_dir/ in ! ./ | .// | /cC/* | \ ! /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ! /usr/ucb/* ) ;; ! *) ! # OSF1 and SCO ODT 3.0 have their own names for install. ! # Don't use installbsd from OSF since it installs stuff as root ! # by default. ! for ac_prog in ginstall scoinst install; do ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then ! if test $ac_prog = install && ! grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then ! # AIX install. It has an incompatible calling convention. ! : ! elif test $ac_prog = install && ! grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then ! # program-specific install script used by HP pwplus--don't use. ! : ! else ! ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" ! break 3 ! fi ! fi done ! done ! ;; ! esac ! done ! fi if test "${ac_cv_path_install+set}" = set; then ! INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. ! INSTALL=$ac_install_sh fi fi ! echo "$as_me:$LINENO: result: $INSTALL" >&5 ! echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' ! test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ! echo "$as_me:$LINENO: checking whether build environment is sane" >&5 ! echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 ! echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( ! set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. ! set X `ls -t $srcdir/configure conftest.file` fi ! rm -f conftest.file ! if test "$*" != "X $srcdir/configure conftest.file" \ ! && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". ! { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken ! alias in your environment" >&5 ! echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken ! alias in your environment" >&2;} ! { (exit 1); exit 1; }; } fi ! test "$2" = conftest.file ) then # Ok. : else ! { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! ! Check your system clock" >&5 ! echo "$as_me: error: newly created file is older than distributed files! ! Check your system clock" >&2;} ! { (exit 1); exit 1; }; } fi + echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6 test "$program_prefix" != NONE && ! program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && ! program_transform_name="s,\$,$program_suffix,;$program_transform_name" ! # Double any \ or $. echo might interpret backslashes. ! # By default was `s,x,x', remove it if useless. ! cat <<\_ACEOF >conftest.sed ! s/[\\$]/&&/g;s/;s,x,x,$// ! _ACEOF ! program_transform_name=`echo $program_transform_name | sed -f conftest.sed` ! rm conftest.sed ! # expand $ac_aux_dir to an absolute path ! am_aux_dir=`cd $ac_aux_dir && pwd` ! ! test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" ! # Use eval to expand $SHELL ! if eval "$MISSING --run true"; then ! am_missing_run="$MISSING --run " else ! am_missing_run= ! { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 ! echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} ! fi ! ! for ac_prog in gawk mawk nawk awk ! do ! # Extract the first word of "$ac_prog", so it can be a program name with args. ! set dummy $ac_prog; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_AWK+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if test -n "$AWK"; then ! ac_cv_prog_AWK="$AWK" # Let the user override the test. ! else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_AWK="$ac_prog" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! ! fi ! fi ! AWK=$ac_cv_prog_AWK ! if test -n "$AWK"; then ! echo "$as_me:$LINENO: result: $AWK" >&5 ! echo "${ECHO_T}$AWK" >&6 ! else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! fi ! ! test -n "$AWK" && break ! done ! ! echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 ! echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 ! set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` ! if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.make <<\_ACEOF all: ! @echo 'ac_maketemp="$(MAKE)"' ! _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. ! eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi ! rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then ! echo "$as_me:$LINENO: result: yes" >&5 ! echo "${ECHO_T}yes" >&6 SET_MAKE= else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi + rm -rf .tst 2>/dev/null + mkdir .tst 2>/dev/null + if test -d .tst; then + am__leading_dot=. + else + am__leading_dot=_ + fi + rmdir .tst 2>/dev/null ! # test to see if srcdir already configured ! if test "`cd $srcdir && pwd`" != "`pwd`" && ! test -f $srcdir/config.status; then ! { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 ! echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} ! { (exit 1); exit 1; }; } ! fi ! # test whether we have cygpath ! if test -z "$CYGPATH_W"; then ! if (cygpath --version) >/dev/null 2>/dev/null; then ! CYGPATH_W='cygpath -w' ! else ! CYGPATH_W=echo ! fi fi + # Define the identity of the package. + PACKAGE=libltdl + VERSION=1.2 ! ! # Some tools Automake needs. ! ! ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} ! ! ! AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} ! ! ! AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} ! ! ! AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} ! ! ! MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} ! ! ! AMTAR=${AMTAR-"${am_missing_run}tar"} ! ! install_sh=${install_sh-"$am_aux_dir/install-sh"} ! ! # Installed binaries are usually stripped using `strip' when the user ! # run `make install-strip'. However `strip' might not be the right ! # tool to use in cross-compilation environments, therefore Automake ! # will honor the `STRIP' environment variable to overrule this program. ! if test "$cross_compiling" != no; then ! if test -n "$ac_tool_prefix"; then ! # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. ! set dummy ${ac_tool_prefix}strip; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_STRIP+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! if test -n "$STRIP"; then ! ac_cv_prog_STRIP="$STRIP" # Let the user override the test. ! else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_STRIP="${ac_tool_prefix}strip" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! fi ! fi ! STRIP=$ac_cv_prog_STRIP ! if test -n "$STRIP"; then ! echo "$as_me:$LINENO: result: $STRIP" >&5 ! echo "${ECHO_T}$STRIP" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi fi + if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. + set dummy strip; ac_word=$2 + echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 + if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ! test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" ! fi ! fi ! ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP ! if test -n "$ac_ct_STRIP"; then ! echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 ! echo "${ECHO_T}$ac_ct_STRIP" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi ! STRIP=$ac_ct_STRIP else ! STRIP="$ac_cv_prog_STRIP" ! fi ! fi + INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" + # We need awk for the "check" target. The system "awk" is bad on + # some platforms. + ac_config_headers="$ac_config_headers config.h:config-h.in" ! echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 ! echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no ! fi; ! echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 ! echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6 if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= *************** else *** 927,1144 **** MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE - ! # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:938: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_CC="gcc" ! break ! fi ! done ! IFS="$ac_save_ifs" fi fi ! CC="$ac_cv_prog_CC" if test -n "$CC"; then ! echo "$ac_t""$CC" 1>&6 else ! echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:968: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ! ac_prog_rejected=yes ! continue ! fi ! ac_cv_prog_CC="cc" ! break ! fi ! done ! IFS="$ac_save_ifs" if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift ! if test $# -gt 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ! set dummy "$ac_dir/$ac_word" "$@" ! shift ! ac_cv_prog_CC="$@" fi fi fi fi ! CC="$ac_cv_prog_CC" if test -n "$CC"; then ! echo "$ac_t""$CC" 1>&6 else ! echo "$ac_t""no" 1>&6 fi ! if test -z "$CC"; then ! case "`uname -s`" in ! *win32* | *WIN32*) ! # Extract the first word of "cl", so it can be a program name with args. ! set dummy cl; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1019: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_CC="cl" ! break ! fi ! done ! IFS="$ac_save_ifs" fi fi ! CC="$ac_cv_prog_CC" if test -n "$CC"; then ! echo "$ac_t""$CC" 1>&6 else ! echo "$ac_t""no" 1>&6 fi ! ;; ! esac fi ! test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi ! echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ! echo "configure:1051: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ! ac_ext=c ! # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ! cross_compiling=$ac_cv_prog_cc_cross ! cat > conftest.$ac_ext << EOF - #line 1062 "configure" - #include "confdefs.h" ! main(){return(0);} ! EOF ! if { (eval echo configure:1067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! ac_cv_prog_cc_works=yes ! # If we can't run a trivial program, we are probably using a cross compiler. ! if (./conftest; exit) 2>/dev/null; then ! ac_cv_prog_cc_cross=no else ! ac_cv_prog_cc_cross=yes fi - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no fi ! rm -fr conftest* ! ac_ext=c ! # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ! cross_compiling=$ac_cv_prog_cc_cross ! echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 ! if test $ac_cv_prog_cc_works = no; then ! { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi - echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 - echo "configure:1093: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 - echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 - cross_compiling=$ac_cv_prog_cc_cross ! echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:1098: checking whether we are using GNU C" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ! ac_cv_prog_gcc=yes else ! ac_cv_prog_gcc=no fi fi ! echo "$ac_t""$ac_cv_prog_gcc" 1>&6 ! if test $ac_cv_prog_gcc = yes; then ! GCC=yes else ! GCC= fi ! ac_test_CFLAGS="${CFLAGS+set}" ! ac_save_CFLAGS="$CFLAGS" ! CFLAGS= ! echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:1126: checking whether ${CC-cc} accepts -g" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! echo 'void f(){}' > conftest.c ! if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ac_cv_prog_cc_g=yes else ! ac_cv_prog_cc_g=no ! fi ! rm -f conftest* fi ! ! echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 if test "$ac_test_CFLAGS" = set; then ! CFLAGS="$ac_save_CFLAGS" elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" --- 1919,2569 ---- MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi + MAINT=$MAINTAINER_MODE_TRUE ! ! ## ------------------ ## ! ## C compiler checks. ## ! ## ------------------ ## ! ac_ext=c ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ! ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_c_compiler_gnu ! if test -n "$ac_tool_prefix"; then ! # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. ! set dummy ${ac_tool_prefix}gcc; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_CC+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if test -n "$CC"; then ! ac_cv_prog_CC="$CC" # Let the user override the test. ! else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_CC="${ac_tool_prefix}gcc" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! ! fi ! fi ! CC=$ac_cv_prog_CC ! if test -n "$CC"; then ! echo "$as_me:$LINENO: result: $CC" >&5 ! echo "${ECHO_T}$CC" >&6 ! else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! fi ! ! fi ! if test -z "$ac_cv_prog_CC"; then ! ac_ct_CC=$CC ! # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_ac_ct_CC+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if test -n "$ac_ct_CC"; then ! ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. ! else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_ac_ct_CC="gcc" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! ! fi ! fi ! ac_ct_CC=$ac_cv_prog_ac_ct_CC ! if test -n "$ac_ct_CC"; then ! echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 ! echo "${ECHO_T}$ac_ct_CC" >&6 ! else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! fi ! ! CC=$ac_ct_CC ! else ! CC="$ac_cv_prog_CC" ! fi ! ! if test -z "$CC"; then ! if test -n "$ac_tool_prefix"; then ! # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. ! set dummy ${ac_tool_prefix}cc; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_CC+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_CC="${ac_tool_prefix}cc" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! fi fi ! CC=$ac_cv_prog_CC if test -n "$CC"; then ! echo "$as_me:$LINENO: result: $CC" >&5 ! echo "${ECHO_T}$CC" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! fi ! ! fi ! if test -z "$ac_cv_prog_CC"; then ! ac_ct_CC=$CC ! # Extract the first word of "cc", so it can be a program name with args. ! set dummy cc; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_ac_ct_CC+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if test -n "$ac_ct_CC"; then ! ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. ! else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_ac_ct_CC="cc" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! ! fi ! fi ! ac_ct_CC=$ac_cv_prog_ac_ct_CC ! if test -n "$ac_ct_CC"; then ! echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 ! echo "${ECHO_T}$ac_ct_CC" >&6 ! else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! fi ! ! CC=$ac_ct_CC ! else ! CC="$ac_cv_prog_CC" fi + fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_CC+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ! ac_prog_rejected=yes ! continue ! fi ! ac_cv_prog_CC="cc" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift ! if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ! ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi ! CC=$ac_cv_prog_CC if test -n "$CC"; then ! echo "$as_me:$LINENO: result: $CC" >&5 ! echo "${ECHO_T}$CC" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi ! fi ! if test -z "$CC"; then ! if test -n "$ac_tool_prefix"; then ! for ac_prog in cl ! do ! # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ! set dummy $ac_tool_prefix$ac_prog; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_CC+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_CC="$ac_tool_prefix$ac_prog" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! fi fi ! CC=$ac_cv_prog_CC if test -n "$CC"; then ! echo "$as_me:$LINENO: result: $CC" >&5 ! echo "${ECHO_T}$CC" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi ! ! test -n "$CC" && break ! done ! fi ! if test -z "$CC"; then ! ac_ct_CC=$CC ! for ac_prog in cl ! do ! # Extract the first word of "$ac_prog", so it can be a program name with args. ! set dummy $ac_prog; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_ac_ct_CC+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if test -n "$ac_ct_CC"; then ! ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. ! else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_ac_ct_CC="$ac_prog" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 fi ! done ! done ! ! fi ! fi ! ac_ct_CC=$ac_cv_prog_ac_ct_CC ! if test -n "$ac_ct_CC"; then ! echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 ! echo "${ECHO_T}$ac_ct_CC" >&6 ! else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi ! test -n "$ac_ct_CC" && break ! done ! CC=$ac_ct_CC ! fi ! fi ! test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH ! See \`config.log' for more details." >&5 ! echo "$as_me: error: no acceptable C compiler found in \$PATH ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } ! ! # Provide some information about the compiler. ! echo "$as_me:$LINENO:" \ ! "checking for C compiler version" >&5 ! ac_compiler=`set X $ac_compile; echo $2` ! { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 ! (eval $ac_compiler --version &5) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } ! { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 ! (eval $ac_compiler -v &5) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } ! { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 ! (eval $ac_compiler -V &5) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } ! ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! int ! main () ! { ! ! ; ! return 0; ! } ! _ACEOF ! ac_clean_files_save=$ac_clean_files ! ac_clean_files="$ac_clean_files a.out a.exe b.out" ! # Try to create an executable without -o first, disregard a.out. ! # It will help us diagnose broken compilers, and finding out an intuition ! # of exeext. ! echo "$as_me:$LINENO: checking for C compiler default output" >&5 ! echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ! ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` ! if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 ! (eval $ac_link_default) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; then ! # Find the output, starting from the most likely. This scheme is ! # not robust to junk in `.', hence go to wildcards (a.*) only as a last ! # resort. ! ! # Be careful to initialize this variable, since it used to be cached. ! # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ! ac_cv_exeext= ! # b.out is created by i960 compilers. ! for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out ! do ! test -f "$ac_file" || continue ! case $ac_file in ! *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ! ;; ! conftest.$ac_ext ) ! # This is the source file. ! ;; ! [ab].out ) ! # We found the default executable, but exeext='' is most ! # certainly right. ! break;; ! *.* ) ! ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` ! # FIXME: I believe we export ac_cv_exeext for Libtool, ! # but it would be cool to find out if it's true. Does anybody ! # maintain Libtool? --akim. ! export ac_cv_exeext ! break;; ! * ) ! break;; ! esac ! done ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! { { echo "$as_me:$LINENO: error: C compiler cannot create executables ! See \`config.log' for more details." >&5 ! echo "$as_me: error: C compiler cannot create executables ! See \`config.log' for more details." >&2;} ! { (exit 77); exit 77; }; } ! fi ! ! ac_exeext=$ac_cv_exeext ! echo "$as_me:$LINENO: result: $ac_file" >&5 ! echo "${ECHO_T}$ac_file" >&6 ! ! # Check the compiler produces executables we can run. If not, either ! # the compiler is broken, or we cross compile. ! echo "$as_me:$LINENO: checking whether the C compiler works" >&5 ! echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 ! # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 ! # If not cross compiling, check that we can run a simple program. ! if test "$cross_compiling" != yes; then ! if { ac_try='./$ac_file' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! cross_compiling=no else ! if test "$cross_compiling" = maybe; then ! cross_compiling=yes ! else ! { { echo "$as_me:$LINENO: error: cannot run C compiled programs. ! If you meant to cross compile, use \`--host'. ! See \`config.log' for more details." >&5 ! echo "$as_me: error: cannot run C compiled programs. ! If you meant to cross compile, use \`--host'. ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } ! fi fi fi ! echo "$as_me:$LINENO: result: yes" >&5 ! echo "${ECHO_T}yes" >&6 ! rm -f a.out a.exe conftest$ac_cv_exeext b.out ! ac_clean_files=$ac_clean_files_save ! # Check the compiler produces executables we can run. If not, either ! # the compiler is broken, or we cross compile. ! echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 ! echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 ! echo "$as_me:$LINENO: result: $cross_compiling" >&5 ! echo "${ECHO_T}$cross_compiling" >&6 ! ! echo "$as_me:$LINENO: checking for suffix of executables" >&5 ! echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; then ! # If both `conftest.exe' and `conftest' are `present' (well, observable) ! # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will ! # work properly (i.e., refer to `conftest.exe'), while it won't with ! # `rm'. ! for ac_file in conftest.exe conftest conftest.*; do ! test -f "$ac_file" || continue ! case $ac_file in ! *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; ! *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` ! export ac_cv_exeext ! break;; ! * ) break;; ! esac ! done ! else ! { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link ! See \`config.log' for more details." >&5 ! echo "$as_me: error: cannot compute suffix of executables: cannot compile and link ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } fi ! rm -f conftest$ac_cv_exeext ! echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 ! echo "${ECHO_T}$ac_cv_exeext" >&6 ! ! rm -f conftest.$ac_ext ! EXEEXT=$ac_cv_exeext ! ac_exeext=$EXEEXT ! echo "$as_me:$LINENO: checking for suffix of object files" >&5 ! echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 ! if test "${ac_cv_objext+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! int ! main () ! { ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.o conftest.obj ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; then ! for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do ! case $ac_file in ! *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; ! *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` ! break;; ! esac ! done else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile ! See \`config.log' for more details." >&5 ! echo "$as_me: error: cannot compute suffix of object files: cannot compile ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } fi + + rm -f conftest.$ac_cv_objext conftest.$ac_ext fi + echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 + echo "${ECHO_T}$ac_cv_objext" >&6 + OBJEXT=$ac_cv_objext + ac_objext=$OBJEXT + echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 + echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 + if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ ! int ! main () ! { ! #ifndef __GNUC__ ! choke me ! #endif ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_compiler_gnu=yes else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_compiler_gnu=no fi + rm -f conftest.$ac_objext conftest.$ac_ext + ac_cv_c_compiler_gnu=$ac_compiler_gnu ! fi ! echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 ! echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 ! GCC=`test $ac_compiler_gnu = yes && echo yes` ! ac_test_CFLAGS=${CFLAGS+set} ! ac_save_CFLAGS=$CFLAGS ! CFLAGS="-g" ! echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 ! echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 ! if test "${ac_cv_prog_cc_g+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! int ! main () ! { ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_prog_cc_g=no fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 ! echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then ! CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" *************** else *** 1152,1388 **** CFLAGS= fi fi ! ! echo $ac_n "checking for working const""... $ac_c" 1>&6 ! echo "configure:1158: checking for working const" >&5 ! if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext <j = 5; } ! { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ ! const int foo = 10; } ! ; return 0; } ! EOF ! if { (eval echo configure:1212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* ! ac_cv_c_const=yes else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! ac_cv_c_const=no fi rm -f conftest* fi ! echo "$ac_t""$ac_cv_c_const" 1>&6 if test $ac_cv_c_const = no; then ! cat >> confdefs.h <<\EOF ! #define const ! EOF fi ! echo $ac_n "checking for inline""... $ac_c" 1>&6 ! echo "configure:1233: checking for inline" >&5 ! if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do ! cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* ac_cv_c_inline=$ac_kw; break else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 fi ! rm -f conftest* done fi ! ! echo "$ac_t""$ac_cv_c_inline" 1>&6 ! case "$ac_cv_c_inline" in inline | yes) ;; ! no) cat >> confdefs.h <<\EOF ! #define inline ! EOF ;; ! *) cat >> confdefs.h </dev/null 2>&1; then : ! else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi - echo $ac_n "checking host system type""... $ac_c" 1>&6 - echo "configure:1350: checking host system type" >&5 ! host_alias=$host ! case "$host_alias" in ! NONE) ! case $nonopt in ! NONE) ! if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : ! else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } ! fi ;; ! *) host_alias=$nonopt ;; ! esac ;; ! esac ! host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` ! host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` ! host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` ! host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ! echo "$ac_t""$host" 1>&6 ! echo $ac_n "checking build system type""... $ac_c" 1>&6 ! echo "configure:1371: checking build system type" >&5 - build_alias=$build - case "$build_alias" in - NONE) - case $nonopt in - NONE) build_alias=$host_alias ;; - *) build_alias=$nonopt ;; - esac ;; - esac - build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` - build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` - build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` - build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - echo "$ac_t""$build" 1>&6 # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then --- 2577,3328 ---- CFLAGS= fi fi ! echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 ! echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 ! if test "${ac_cv_prog_cc_stdc+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! ac_cv_prog_cc_stdc=no ! ac_save_CC=$CC ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #include ! #include ! #include ! #include ! /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ ! struct buf { int x; }; ! FILE * (*rcsopen) (struct buf *, struct stat *, int); ! static char *e (p, i) ! char **p; ! int i; ! { ! return p[i]; } ! static char *f (char * (*g) (char **, int), char **p, ...) ! { ! char *s; ! va_list v; ! va_start (v,p); ! s = g (p, va_arg (v,int)); ! va_end (v); ! return s; } ! int test (int i, double x); ! struct s1 {int (*f) (int a);}; ! struct s2 {int (*f) (double a);}; ! int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); ! int argc; ! char **argv; ! int ! main () ! { ! return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ! ; ! return 0; } ! _ACEOF ! # Don't try gcc -ansi; that turns off useful extensions and ! # breaks some systems' header files. ! # AIX -qlanglvl=ansi ! # Ultrix and OSF/1 -std1 ! # HP-UX 10.20 and later -Ae ! # HP-UX older versions -Aa -D_HPUX_SOURCE ! # SVR4 -Xc -D__EXTENSIONS__ ! for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" ! do ! CC="$ac_save_CC $ac_arg" ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_prog_cc_stdc=$ac_arg ! break ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! fi ! rm -f conftest.$ac_objext ! done ! rm -f conftest.$ac_ext conftest.$ac_objext ! CC=$ac_save_CC ! ! fi ! ! case "x$ac_cv_prog_cc_stdc" in ! x|xno) ! echo "$as_me:$LINENO: result: none needed" >&5 ! echo "${ECHO_T}none needed" >&6 ;; ! *) ! echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 ! echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 ! CC="$CC $ac_cv_prog_cc_stdc" ;; ! esac ! ! # Some people use a C++ compiler to compile C. Since we use `exit', ! # in C++ we need to declare it. In case someone uses the same compiler ! # for both compiling C and C++ we need to have the C++ compiler decide ! # the declaration of exit, since it's the most demanding environment. ! cat >conftest.$ac_ext <<_ACEOF ! #ifndef __cplusplus ! choke me ! #endif ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! for ac_declaration in \ ! '' \ ! 'extern "C" void std::exit (int) throw (); using std::exit;' \ ! 'extern "C" void std::exit (int); using std::exit;' \ ! 'extern "C" void exit (int) throw ();' \ ! 'extern "C" void exit (int);' \ ! 'void exit (int);' ! do ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! $ac_declaration ! #include ! int ! main () ! { ! exit (42); ! ; ! return 0; } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 ! continue ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! $ac_declaration ! int ! main () ! { ! exit (42); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! break else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! fi + rm -f conftest.$ac_objext conftest.$ac_ext + done rm -f conftest* + if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h fi ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! ac_ext=c ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ! ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_c_compiler_gnu ! DEPDIR="${am__leading_dot}deps" ! ! ac_config_commands="$ac_config_commands depfiles" ! ! ! am_make=${MAKE-make} ! cat > confinc << 'END' ! am__doit: ! @echo done ! .PHONY: am__doit ! END ! # If we don't find an include directive, just comment out the code. ! echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 ! echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 ! am__include="#" ! am__quote= ! _am_result=none ! # First try GNU make style include. ! echo "include confinc" > confmf ! # We grep out `Entering directory' and `Leaving directory' ! # messages which can occur if `w' ends up in MAKEFLAGS. ! # In particular we don't look at `^make:' because GNU make might ! # be invoked under some other name (usually "gmake"), in which ! # case it prints its new name instead of `make'. ! if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then ! am__include=include ! am__quote= ! _am_result=GNU ! fi ! # Now try BSD make style include. ! if test "$am__include" = "#"; then ! echo '.include "confinc"' > confmf ! if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then ! am__include=.include ! am__quote="\"" ! _am_result=BSD ! fi ! fi ! ! ! echo "$as_me:$LINENO: result: $_am_result" >&5 ! echo "${ECHO_T}$_am_result" >&6 ! rm -f confinc confmf ! ! # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. ! if test "${enable_dependency_tracking+set}" = set; then ! enableval="$enable_dependency_tracking" ! ! fi; ! if test "x$enable_dependency_tracking" != xno; then ! am_depcomp="$ac_aux_dir/depcomp" ! AMDEPBACKSLASH='\' ! fi ! ! ! if test "x$enable_dependency_tracking" != xno; then ! AMDEP_TRUE= ! AMDEP_FALSE='#' ! else ! AMDEP_TRUE='#' ! AMDEP_FALSE= ! fi ! ! ! ! ! depcc="$CC" am_compiler_list= ! ! echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 ! echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 ! if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then ! # We make a subdir and do the tests there. Otherwise we can end up ! # making bogus files that we don't know about and never remove. For ! # instance it was reported that on HP-UX the gcc test will end up ! # making a dummy file named `D' -- because `-MD' means `put the output ! # in D'. ! mkdir conftest.dir ! # Copy depcomp to subdir because otherwise we won't find it if we're ! # using a relative directory. ! cp "$am_depcomp" conftest.dir ! cd conftest.dir ! # We will build objects and dependencies in a subdirectory because ! # it helps to detect inapplicable dependency modes. For instance ! # both Tru64's cc and ICC support -MD to output dependencies as a ! # side effect of compilation, but ICC will put the dependencies in ! # the current directory while Tru64 will put them in the object ! # directory. ! mkdir sub ! ! am_cv_CC_dependencies_compiler_type=none ! if test "$am_compiler_list" = ""; then ! am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` ! fi ! for depmode in $am_compiler_list; do ! # Setup a source with many dependencies, because some compilers ! # like to wrap large dependency lists on column 80 (with \), and ! # we should not choose a depcomp mode which is confused by this. ! # ! # We need to recreate these files for each test, as the compiler may ! # overwrite some of them when testing with obscure command lines. ! # This happens at least with the AIX C compiler. ! : > sub/conftest.c ! for i in 1 2 3 4 5 6; do ! echo '#include "conftst'$i'.h"' >> sub/conftest.c ! : > sub/conftst$i.h ! done ! echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf ! ! case $depmode in ! nosideeffect) ! # after this tag, mechanisms are not by side-effect, so they'll ! # only be used when explicitly requested ! if test "x$enable_dependency_tracking" = xyes; then ! continue ! else ! break ! fi ! ;; ! none) break ;; ! esac ! # We check with `-c' and `-o' for the sake of the "dashmstdout" ! # mode. It turns out that the SunPro C++ compiler does not properly ! # handle `-M -o', and we need to detect this. ! if depmode=$depmode \ ! source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ ! depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ ! $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ ! >/dev/null 2>conftest.err && ! grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && ! grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ! ${MAKE-make} -s -f confmf > /dev/null 2>&1; then ! # icc doesn't choke on unknown options, it will just issue warnings ! # (even with -Werror). So we grep stderr for any message ! # that says an option was ignored. ! if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else ! am_cv_CC_dependencies_compiler_type=$depmode ! break ! fi ! fi ! done ! ! cd .. ! rm -rf conftest.dir ! else ! am_cv_CC_dependencies_compiler_type=none ! fi ! ! fi ! echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 ! echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 ! CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type ! ! ! ! if ! test "x$enable_dependency_tracking" != xno \ ! && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then ! am__fastdepCC_TRUE= ! am__fastdepCC_FALSE='#' ! else ! am__fastdepCC_TRUE='#' ! am__fastdepCC_FALSE= ! fi ! ! ! ! echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 ! echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 ! if test "${ac_cv_c_const+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! int ! main () ! { ! /* FIXME: Include the comments suggested by Paul. */ ! #ifndef __cplusplus ! /* Ultrix mips cc rejects this. */ ! typedef int charset[2]; ! const charset x; ! /* SunOS 4.1.1 cc rejects this. */ ! char const *const *ccp; ! char **p; ! /* NEC SVR4.0.2 mips cc rejects this. */ ! struct point {int x, y;}; ! static struct point const zero = {0,0}; ! /* AIX XL C 1.02.0.0 rejects this. ! It does not let you subtract one const X* pointer from another in ! an arm of an if-expression whose if-part is not a constant ! expression */ ! const char *g = "string"; ! ccp = &g + (g ? g-g : 0); ! /* HPUX 7.0 cc rejects these. */ ! ++ccp; ! p = (char**) ccp; ! ccp = (char const *const *) p; ! { /* SCO 3.2v4 cc rejects this. */ ! char *t; ! char const *s = 0 ? (char *) 0 : (char const *) 0; ! ! *t++ = 0; ! } ! { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ ! int x[] = {25, 17}; ! const int *foo = &x[0]; ! ++foo; ! } ! { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ ! typedef const int *iptr; ! iptr p = 0; ! ++p; ! } ! { /* AIX XL C 1.02.0.0 rejects this saying ! "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ ! struct s { int j; const int *ap[3]; }; ! struct s *b; b->j = 5; ! } ! { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ ! const int foo = 10; ! } ! #endif ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_c_const=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_c_const=no ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 ! echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then ! ! cat >>confdefs.h <<\_ACEOF ! #define const ! _ACEOF fi ! echo "$as_me:$LINENO: checking for inline" >&5 ! echo $ECHO_N "checking for inline... $ECHO_C" >&6 ! if test "${ac_cv_c_inline+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #ifndef __cplusplus ! typedef int foo_t; ! static $ac_kw foo_t static_foo () {return 0; } ! $ac_kw foo_t foo () {return 0; } ! #endif ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ac_cv_c_inline=$ac_kw; break else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext done fi ! echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 ! echo "${ECHO_T}$ac_cv_c_inline" >&6 ! case $ac_cv_c_inline in inline | yes) ;; ! no) ! cat >>confdefs.h <<\_ACEOF ! #define inline ! _ACEOF ;; ! *) cat >>confdefs.h <<_ACEOF #define inline $ac_cv_c_inline ! _ACEOF ;; esac + ## ----------------------- ## + ## Libtool initialisation. ## + ## ----------------------- ## + + # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" p=${PACKAGE-default} ! case $enableval in ! yes) enable_shared=yes ;; ! no) enable_shared=no ;; ! *) ! enable_shared=no ! # Look at the argument we got. We use all the common list separators. ! lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," ! for pkg in $enableval; do ! IFS="$lt_save_ifs" ! if test "X$pkg" = "X$p"; then ! enable_shared=yes ! fi ! done ! IFS="$lt_save_ifs" ! ;; ! esac else enable_shared=yes ! fi; # Check whether --enable-static or --disable-static was given. if test "${enable_static+set}" = set; then enableval="$enable_static" p=${PACKAGE-default} ! case $enableval in ! yes) enable_static=yes ;; ! no) enable_static=no ;; ! *) ! enable_static=no ! # Look at the argument we got. We use all the common list separators. ! lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," ! for pkg in $enableval; do ! IFS="$lt_save_ifs" ! if test "X$pkg" = "X$p"; then ! enable_static=yes ! fi ! done ! IFS="$lt_save_ifs" ! ;; ! esac else enable_static=yes ! fi; # Check whether --enable-fast-install or --disable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval="$enable_fast_install" p=${PACKAGE-default} ! case $enableval in ! yes) enable_fast_install=yes ;; ! no) enable_fast_install=no ;; ! *) ! enable_fast_install=no ! # Look at the argument we got. We use all the common list separators. ! lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," ! for pkg in $enableval; do ! IFS="$lt_save_ifs" ! if test "X$pkg" = "X$p"; then ! enable_fast_install=yes ! fi ! done ! IFS="$lt_save_ifs" ! ;; ! esac else enable_fast_install=yes + fi; + + # Make sure we can run config.sub. + $ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 + echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + + echo "$as_me:$LINENO: checking build system type" >&5 + echo $ECHO_N "checking build system type... $ECHO_C" >&6 + if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_cv_build_alias=$build_alias + test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` + test -z "$ac_cv_build_alias" && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 + echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } + ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 + echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + fi + echo "$as_me:$LINENO: result: $ac_cv_build" >&5 + echo "${ECHO_T}$ac_cv_build" >&6 + build=$ac_cv_build + build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ! echo "$as_me:$LINENO: checking host system type" >&5 ! echo $ECHO_N "checking host system type... $ECHO_C" >&6 ! if test "${ac_cv_host+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! ac_cv_host_alias=$host_alias ! test -z "$ac_cv_host_alias" && ! ac_cv_host_alias=$ac_cv_build_alias ! ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || ! { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 ! echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} ! { (exit 1); exit 1; }; } ! fi + echo "$as_me:$LINENO: result: $ac_cv_host" >&5 + echo "${ECHO_T}$ac_cv_host" >&6 + host=$ac_cv_host + host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ! echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 ! echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 ! if test "${lt_cv_path_SED+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! # Loop through the user's path and test for sed and gsed. ! # Then use that list of sed's as ones to test for truncation. ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for lt_ac_prog in sed gsed; do ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then ! lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" ! fi ! done ! done ! done ! lt_ac_max=0 ! lt_ac_count=0 ! # Add /usr/xpg4/bin/sed as it is typically found on Solaris ! # along with /bin/sed that truncates output. ! for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do ! test ! -f $lt_ac_sed && break ! cat /dev/null > conftest.in ! lt_ac_count=0 ! echo $ECHO_N "0123456789$ECHO_C" >conftest.in ! # Check for GNU sed and select it if it is found. ! if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then ! lt_cv_path_SED=$lt_ac_sed ! break ! fi ! while true; do ! cat conftest.in conftest.in >conftest.tmp ! mv conftest.tmp conftest.in ! cp conftest.in conftest.nl ! echo >>conftest.nl ! $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break ! cmp -s conftest.out conftest.nl || break ! # 10000 chars as input seems more than enough ! test $lt_ac_count -gt 10 && break ! lt_ac_count=`expr $lt_ac_count + 1` ! if test $lt_ac_count -gt $lt_ac_max; then ! lt_ac_max=$lt_ac_count ! lt_cv_path_SED=$lt_ac_sed ! fi ! done ! done ! SED=$lt_cv_path_SED ! fi ! echo "$as_me:$LINENO: result: $SED" >&5 ! echo "${ECHO_T}$SED" >&6 ! ! echo "$as_me:$LINENO: checking for egrep" >&5 ! echo $ECHO_N "checking for egrep... $ECHO_C" >&6 ! if test "${ac_cv_prog_egrep+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if echo a | (grep -E '(a|b)') >/dev/null 2>&1 ! then ac_cv_prog_egrep='grep -E' ! else ac_cv_prog_egrep='egrep' ! fi ! fi ! echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 ! echo "${ECHO_T}$ac_cv_prog_egrep" >&6 ! EGREP=$ac_cv_prog_egrep # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then *************** if test "${with_gnu_ld+set}" = set; then *** 1390,1402 **** test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no ! fi ! ac_prog=ld ! if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. ! echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 ! echo "configure:1400: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw --- 3330,3341 ---- test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no ! fi; ac_prog=ld ! if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. ! echo "$as_me:$LINENO: checking for ld used by $CC" >&5 ! echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw *************** echo "configure:1400: checking for ld us *** 1404,1417 **** *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac ! case "$ac_prog" in # Accept absolute paths. ! [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path of ld ! ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ! ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; --- 3343,3356 ---- *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac ! case $ac_prog in # Accept absolute paths. ! [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path of ld ! ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ! ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; *************** echo "configure:1400: checking for ld us *** 1425,1562 **** ;; esac elif test "$with_gnu_ld" = yes; then ! echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 ! echo "configure:1430: checking for GNU ld" >&5 else ! echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 ! echo "configure:1433: checking for non-GNU ld" >&5 fi ! if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else if test -z "$LD"; then ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then ! ac_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. ! if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break ! else test "$with_gnu_ld" != yes && break ! fi fi done ! IFS="$ac_save_ifs" else ! ac_cv_path_LD="$LD" # Let the user override the test with a path. fi fi ! LD="$ac_cv_path_LD" if test -n "$LD"; then ! echo "$ac_t""$LD" 1>&6 else ! echo "$ac_t""no" 1>&6 fi ! test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } ! echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 ! echo "configure:1468: checking if the linker ($LD) is GNU ld" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. ! if $LD -v 2>&1 &5; then ! ac_cv_prog_gnu_ld=yes ! else ! ac_cv_prog_gnu_ld=no ! fi fi ! ! echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 ! with_gnu_ld=$ac_cv_prog_gnu_ld ! echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 ! echo "configure:1485: checking for $LD option to reload object files" >&5 ! if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else lt_cv_ld_reload_flag='-r' fi ! ! echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6 reload_flag=$lt_cv_ld_reload_flag ! test -n "$reload_flag" && reload_flag=" $reload_flag" ! echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 ! echo "configure:1497: checking for BSD-compatible nm" >&5 ! if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$NM"; then # Let the user override the test. ! ac_cv_path_NM="$NM" else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do test -z "$ac_dir" && ac_dir=. ! tmp_nm=$ac_dir/${ac_tool_prefix}nm ! if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file ! if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then ! ac_cv_path_NM="$tmp_nm -B" ! break ! elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ! ac_cv_path_NM="$tmp_nm -p" break ! else ! ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but ! continue # so that we can try to find one that supports BSD flags ! fi fi done ! IFS="$ac_save_ifs" ! test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm fi fi ! NM="$ac_cv_path_NM" ! echo "$ac_t""$NM" 1>&6 ! ! echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 ! echo "configure:1535: checking whether ln -s works" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! rm -f conftestdata ! if ln -s X conftestdata 2>/dev/null ! then ! rm -f conftestdata ! ac_cv_prog_LN_S="ln -s" ! else ! ac_cv_prog_LN_S=ln ! fi ! fi ! LN_S="$ac_cv_prog_LN_S" ! if test "$ac_cv_prog_LN_S" = "ln -s"; then ! echo "$ac_t""yes" 1>&6 else ! echo "$ac_t""no" 1>&6 fi ! echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 ! echo "configure:1556: checking how to recognise dependant libraries" >&5 ! if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! lt_cv_file_magic_cmd='${MAGIC}' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support --- 3364,3514 ---- ;; esac elif test "$with_gnu_ld" = yes; then ! echo "$as_me:$LINENO: checking for GNU ld" >&5 ! echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else ! echo "$as_me:$LINENO: checking for non-GNU ld" >&5 ! echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi ! if test "${lt_cv_path_LD+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then ! lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do + IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then ! lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. ! case `"$lt_cv_path_LD" -v 2>&1 &5 ! echo "${ECHO_T}$LD" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi ! test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 ! echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} ! { (exit 1); exit 1; }; } ! echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 ! echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 ! if test "${lt_cv_prog_gnu_ld+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. ! case `"$LD" -v 2>&1 &5 ! echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 ! with_gnu_ld=$lt_cv_prog_gnu_ld ! echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 ! echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 ! if test "${lt_cv_ld_reload_flag+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_reload_flag='-r' fi ! echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 ! echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 reload_flag=$lt_cv_ld_reload_flag ! case $reload_flag in ! "" | " "*) ;; ! *) reload_flag=" $reload_flag" ;; ! esac ! reload_cmds='$LD$reload_flag -o $output$reload_objs' ! echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 ! echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 ! if test "${lt_cv_path_NM+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then # Let the user override the test. ! lt_cv_path_NM="$NM" else ! lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. ! tmp_nm="$ac_dir/${ac_tool_prefix}nm" ! if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file ! case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in ! */dev/null* | *'Invalid file or object type'*) ! lt_cv_path_NM="$tmp_nm -B" break ! ;; ! *) ! case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in ! */dev/null*) ! lt_cv_path_NM="$tmp_nm -p" ! break ! ;; ! *) ! lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but ! continue # so that we can try to find one that supports BSD flags ! ;; ! esac ! esac fi done ! IFS="$lt_save_ifs" ! test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi + echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 + echo "${ECHO_T}$lt_cv_path_NM" >&6 + NM="$lt_cv_path_NM" ! echo "$as_me:$LINENO: checking whether ln -s works" >&5 ! echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 ! LN_S=$as_ln_s ! if test "$LN_S" = "ln -s"; then ! echo "$as_me:$LINENO: result: yes" >&5 ! echo "${ECHO_T}yes" >&6 else ! echo "$as_me:$LINENO: result: no, using $LN_S" >&5 ! echo "${ECHO_T}no, using $LN_S" >&6 fi ! echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 ! echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 ! if test "${lt_cv_deplibs_check_method+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support *************** lt_cv_deplibs_check_method='unknown' *** 1565,1577 **** # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. ! # 'file_magic [regex]' -- check by looking for files in library path ! # which responds to the $file_magic_cmd with a given egrep regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. ! case "$host_os" in ! aix4*) lt_cv_deplibs_check_method=pass_all ;; --- 3517,3529 ---- # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. ! # 'file_magic [[regex]]' -- check by looking for files in library path ! # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. ! case $host_os in ! aix4* | aix5*) lt_cv_deplibs_check_method=pass_all ;; *************** beos*) *** 1580,1603 **** ;; bsdi4*) ! lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' ! lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; ! cygwin* | mingw*) ! lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' ! lt_cv_file_magic_cmd='${OBJDUMP} -f' ;; ! freebsd* ) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then ! case "$host_cpu" in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. ! lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' ! lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac --- 3532,3571 ---- ;; bsdi4*) ! lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' ! lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; ! cygwin* | mingw* | pw32*) ! # win32_libid is a shell function defined in ltmain.sh ! lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' ! lt_cv_file_magic_cmd='win32_libid' ;; ! darwin* | rhapsody*) ! # this will be overwritten by pass_all, but leave it in just in case ! lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' ! lt_cv_file_magic_cmd='/usr/bin/file -L' ! case "$host_os" in ! rhapsody* | darwin1.[012]) ! lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System` ! ;; ! *) # Darwin 1.3 on ! lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' ! ;; ! esac ! lt_cv_deplibs_check_method=pass_all ! ;; ! ! freebsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then ! case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. ! lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' ! lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac *************** gnu*) *** 1610,1661 **** lt_cv_deplibs_check_method=pass_all ;; ! hpux10.20*) ! # TODO: Does this work for hpux-11 too? ! lt_cv_deplibs_check_method='file_magic (s0-90-90-9|PA-RISC0-9.0-9) shared library' lt_cv_file_magic_cmd=/usr/bin/file ! lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; ! irix5* | irix6*) ! case "$host_os" in ! irix5*) # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" ;; *) ! case "$LD" in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac # this will be overridden with pass_all, but let us keep it just in case ! lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" ! ;; esac lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. ! linux-gnu*) ! case "$host_cpu" in ! alpha* | i*86 | powerpc* | sparc* | ia64* ) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM ! lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; ! esac lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` ;; netbsd*) ! if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then : else ! lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' ! lt_cv_file_magic_cmd='/usr/bin/file -L' ! lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` fi ;; --- 3578,3659 ---- lt_cv_deplibs_check_method=pass_all ;; ! hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file ! case "$host_cpu" in ! ia64*) ! lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' ! lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ! ;; ! hppa*64*) ! lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' ! lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ! ;; ! *) ! lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' ! lt_cv_file_magic_test_file=/usr/lib/libc.sl ! ;; ! esac ;; ! irix5* | irix6* | nonstopux*) ! case $host_os in ! irix5* | nonstopux*) # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" ;; *) ! case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac # this will be overridden with pass_all, but let us keep it just in case ! lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" ! ;; esac lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. ! linux*) ! case $host_cpu in ! alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh*) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM ! lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; ! esac lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` ;; netbsd*) ! if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then ! lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else ! lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' ! fi ! ;; ! ! newos6*) ! lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' ! lt_cv_file_magic_cmd=/usr/bin/file ! lt_cv_file_magic_test_file=/usr/lib/libnls.so ! ;; ! ! nto-qnx) ! lt_cv_deplibs_check_method=unknown ! ;; ! ! openbsd*) ! lt_cv_file_magic_cmd=/usr/bin/file ! lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ! if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then ! lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' ! else ! lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' fi ;; *************** solaris*) *** 1676,1795 **** ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) ! case "$host_vendor" in ncr) lt_cv_deplibs_check_method=pass_all ;; ! motorola) ! lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' ! lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; esac ;; esac fi ! ! echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6 file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method ! echo $ac_n "checking for object suffix""... $ac_c" 1>&6 ! echo "configure:1699: checking for object suffix" >&5 ! if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! rm -f conftest* ! echo 'int i = 1;' > conftest.$ac_ext ! if { (eval echo configure:1705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! for ac_file in conftest.*; do ! case $ac_file in ! *.c) ;; ! *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;; esac done else ! { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; } fi rm -f conftest* fi ! echo "$ac_t""$ac_cv_objext" 1>&6 ! OBJEXT=$ac_cv_objext ! ac_objext=$ac_cv_objext ! echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 ! echo "configure:1725: checking for executable suffix" >&5 ! if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! if test "$CYGWIN" = yes || test "$MINGW32" = yes; then ! ac_cv_exeext=.exe else ! rm -f conftest* ! echo 'int main () { return 0; }' > conftest.$ac_ext ! ac_cv_exeext= ! if { (eval echo configure:1735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then ! for file in conftest.*; do ! case $file in ! *.c | *.o | *.obj | *.ilk | *.pdb) ;; ! *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; ! esac done else ! { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } fi ! rm -f conftest* ! test x"${ac_cv_exeext}" = x && ac_cv_exeext=no fi fi ! EXEEXT="" ! test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} ! echo "$ac_t""${ac_cv_exeext}" 1>&6 ! ac_exeext=$EXEEXT ! if test $host != $build; then ! ac_tool_prefix=${host_alias}- else ! ac_tool_prefix= fi # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! ! # Only perform the check for file, if the check method requires it ! case "$deplibs_check_method" in ! file_magic*) ! if test "$file_magic_cmd" = '${MAGIC}'; then ! echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 ! echo "configure:1768: checking for ${ac_tool_prefix}file" >&5 ! if eval "test \"`echo '$''{'lt_cv_path_MAGIC'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! case "$MAGIC" in ! /*) ! lt_cv_path_MAGIC="$MAGIC" # Let the user override the test with a path. ;; ! ?:/*) ! ac_cv_path_MAGIC="$MAGIC" # Let the user override the test with a dos path. ;; *) ! ac_save_MAGIC="$MAGIC" ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="/usr/bin:$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then ! lt_cv_path_MAGIC="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then ! case "$deplibs_check_method" in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" ! MAGIC="$lt_cv_path_MAGIC" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | ! egrep "$file_magic_regex" > /dev/null; then : else cat <&2 --- 3674,6256 ---- ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) ! case $host_vendor in ! motorola) ! lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' ! lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ! ;; ncr) lt_cv_deplibs_check_method=pass_all ;; ! sequent) ! lt_cv_file_magic_cmd='/bin/file' ! lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ! ;; ! sni) ! lt_cv_file_magic_cmd='/bin/file' ! lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" ! lt_cv_file_magic_test_file=/lib/libc.so ! ;; ! siemens) ! lt_cv_deplibs_check_method=pass_all ;; esac ;; + + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; esac fi ! echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 ! echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method + test -z "$deplibs_check_method" && deplibs_check_method=unknown ! ! ! ! # If no C compiler was specified, use CC. ! LTCC=${LTCC-"$CC"} ! ! # Allow CC to be a program name with arguments. ! compiler=$CC ! ! # Check whether --enable-libtool-lock or --disable-libtool-lock was given. ! if test "${enable_libtool_lock+set}" = set; then ! enableval="$enable_libtool_lock" ! ! fi; ! test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes ! ! # Some flags need to be propagated to the compiler or linker for good ! # libtool support. ! case $host in ! ia64-*-hpux*) ! # Find out which ABI we are using. ! echo 'int i;' > conftest.$ac_ext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; then ! case `/usr/bin/file conftest.$ac_objext` in ! *ELF-32*) ! HPUX_IA64_MODE="32" ! ;; ! *ELF-64*) ! HPUX_IA64_MODE="64" ! ;; ! esac ! fi ! rm -rf conftest* ! ;; ! *-*-irix6*) ! # Find out which ABI we are using. ! echo '#line 3752 "configure"' > conftest.$ac_ext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; then ! if test "$lt_cv_prog_gnu_ld" = yes; then ! case `/usr/bin/file conftest.$ac_objext` in ! *32-bit*) ! LD="${LD-ld} -melf32bsmip" ! ;; ! *N32*) ! LD="${LD-ld} -melf32bmipn32" ! ;; ! *64-bit*) ! LD="${LD-ld} -melf64bmip" ! ;; ! esac ! else ! case `/usr/bin/file conftest.$ac_objext` in ! *32-bit*) ! LD="${LD-ld} -32" ! ;; ! *N32*) ! LD="${LD-ld} -n32" ! ;; ! *64-bit*) ! LD="${LD-ld} -64" ! ;; ! esac ! fi ! fi ! rm -rf conftest* ! ;; ! ! x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) ! # Find out which ABI we are using. ! echo 'int i;' > conftest.$ac_ext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; then ! case "`/usr/bin/file conftest.o`" in ! *32-bit*) ! case $host in ! x86_64-*linux*) ! LD="${LD-ld} -m elf_i386" ! ;; ! ppc64-*linux*) ! LD="${LD-ld} -m elf32ppclinux" ! ;; ! s390x-*linux*) ! LD="${LD-ld} -m elf_s390" ! ;; ! sparc64-*linux*) ! LD="${LD-ld} -m elf32_sparc" ! ;; ! esac ! ;; ! *64-bit*) ! case $host in ! x86_64-*linux*) ! LD="${LD-ld} -m elf_x86_64" ! ;; ! ppc*-*linux*|powerpc*-*linux*) ! LD="${LD-ld} -m elf64ppc" ! ;; ! s390*-*linux*) ! LD="${LD-ld} -m elf64_s390" ! ;; ! sparc*-*linux*) ! LD="${LD-ld} -m elf64_sparc" ! ;; ! esac ! ;; esac + fi + rm -rf conftest* + ;; + + *-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 + echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 + if test "${lt_cv_cc_needs_belf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + + int + main () + { + + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + lt_cv_cc_needs_belf=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_cc_needs_belf=no + fi + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + + fi + echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 + echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; + *-*-cygwin* | *-*-mingw* | *-*-pw32*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. + set dummy ${ac_tool_prefix}dlltool; ac_word=$2 + echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 + if test "${ac_cv_prog_DLLTOOL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + + fi + fi + DLLTOOL=$ac_cv_prog_DLLTOOL + if test -n "$DLLTOOL"; then + echo "$as_me:$LINENO: result: $DLLTOOL" >&5 + echo "${ECHO_T}$DLLTOOL" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + fi + + fi + if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. + set dummy dlltool; ac_word=$2 + echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 + if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + + test -z "$ac_cv_prog_ac_ct_DLLTOOL" && ac_cv_prog_ac_ct_DLLTOOL="false" + fi + fi + ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL + if test -n "$ac_ct_DLLTOOL"; then + echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 + echo "${ECHO_T}$ac_ct_DLLTOOL" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + fi + + DLLTOOL=$ac_ct_DLLTOOL + else + DLLTOOL="$ac_cv_prog_DLLTOOL" + fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. + set dummy ${ac_tool_prefix}as; ac_word=$2 + echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 + if test "${ac_cv_prog_AS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AS="${ac_tool_prefix}as" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + + fi + fi + AS=$ac_cv_prog_AS + if test -n "$AS"; then + echo "$as_me:$LINENO: result: $AS" >&5 + echo "${ECHO_T}$AS" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + fi + + fi + if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. + set dummy as; ac_word=$2 + echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 + if test "${ac_cv_prog_ac_ct_AS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AS="as" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + + test -z "$ac_cv_prog_ac_ct_AS" && ac_cv_prog_ac_ct_AS="false" + fi + fi + ac_ct_AS=$ac_cv_prog_ac_ct_AS + if test -n "$ac_ct_AS"; then + echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 + echo "${ECHO_T}$ac_ct_AS" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + fi + + AS=$ac_ct_AS + else + AS="$ac_cv_prog_AS" + fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. + set dummy ${ac_tool_prefix}objdump; ac_word=$2 + echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 + if test "${ac_cv_prog_OBJDUMP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + + fi + fi + OBJDUMP=$ac_cv_prog_OBJDUMP + if test -n "$OBJDUMP"; then + echo "$as_me:$LINENO: result: $OBJDUMP" >&5 + echo "${ECHO_T}$OBJDUMP" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + fi + + fi + if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. + set dummy objdump; ac_word=$2 + echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 + if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + + test -z "$ac_cv_prog_ac_ct_OBJDUMP" && ac_cv_prog_ac_ct_OBJDUMP="false" + fi + fi + ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP + if test -n "$ac_ct_OBJDUMP"; then + echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 + echo "${ECHO_T}$ac_ct_OBJDUMP" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + fi + + OBJDUMP=$ac_ct_OBJDUMP + else + OBJDUMP="$ac_cv_prog_OBJDUMP" + fi + + ;; + + esac + + need_locks="$enable_libtool_lock" + + + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 + echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 + # On Suns, sometimes $CPP names a directory. + if test -n "$CPP" && test -d "$CPP"; then + CPP= + fi + if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false + for ac_c_preproc_warn_flag in '' yes + do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #ifdef __STDC__ + # include + #else + # include + #endif + Syntax error + _ACEOF + if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi + else + ac_cpp_err=yes + fi + if test -z "$ac_cpp_err"; then + : + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. + continue + fi + rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include + _ACEOF + if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi + else + ac_cpp_err=yes + fi + if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. + continue + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. + ac_preproc_ok=: + break + fi + rm -f conftest.err conftest.$ac_ext + + done + # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. + rm -f conftest.err conftest.$ac_ext + if $ac_preproc_ok; then + break + fi + + done + ac_cv_prog_CPP=$CPP + + fi + CPP=$ac_cv_prog_CPP + else + ac_cv_prog_CPP=$CPP + fi + echo "$as_me:$LINENO: result: $CPP" >&5 + echo "${ECHO_T}$CPP" >&6 + ac_preproc_ok=false + for ac_c_preproc_warn_flag in '' yes + do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #ifdef __STDC__ + # include + #else + # include + #endif + Syntax error + _ACEOF + if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi + else + ac_cpp_err=yes + fi + if test -z "$ac_cpp_err"; then + : + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. + continue + fi + rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include + _ACEOF + if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi + else + ac_cpp_err=yes + fi + if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. + continue + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. + ac_preproc_ok=: + break + fi + rm -f conftest.err conftest.$ac_ext + + done + # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. + rm -f conftest.err conftest.$ac_ext + if $ac_preproc_ok; then + : + else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check + See \`config.log' for more details." >&5 + echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check + See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + echo "$as_me:$LINENO: checking for ANSI C header files" >&5 + echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 + if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include + #include + #include + #include + + int + main () + { + + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_stdc=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no + fi + rm -f conftest.$ac_objext conftest.$ac_ext + + if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : + else + ac_cv_header_stdc=no + fi + rm -f conftest* + + fi + + if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : + else + ac_cv_header_stdc=no + fi + rm -f conftest* + + fi + + if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : + else + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include + #if ((' ' & 0x0FF) == 0x020) + # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') + # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) + #else + # define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) + # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) + #endif + + #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) + int + main () + { + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (0); + } + _ACEOF + rm -f conftest$ac_exeext + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : + else + echo "$as_me: program exited with status $ac_status" >&5 + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ( exit $ac_status ) + ac_cv_header_stdc=no + fi + rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi + fi + fi + echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 + echo "${ECHO_T}$ac_cv_header_stdc" >&6 + if test $ac_cv_header_stdc = yes; then + + cat >>confdefs.h <<\_ACEOF + #define STDC_HEADERS 1 + _ACEOF + + fi + + # On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + + for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` + echo "$as_me:$LINENO: checking for $ac_header" >&5 + echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 + if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + $ac_includes_default + + #include <$ac_header> + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" + fi + rm -f conftest.$ac_objext conftest.$ac_ext + fi + echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 + echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF + + fi + + done + + + + for ac_header in dlfcn.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` + if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 + echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 + if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + fi + echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 + echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + else + # Is the header compilable? + echo "$as_me:$LINENO: checking $ac_header usability" >&5 + echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + $ac_includes_default + #include <$ac_header> + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no + fi + rm -f conftest.$ac_objext conftest.$ac_ext + echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 + echo "${ECHO_T}$ac_header_compiler" >&6 + + # Is the header present? + echo "$as_me:$LINENO: checking $ac_header presence" >&5 + echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <$ac_header> + _ACEOF + if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi + else + ac_cpp_err=yes + fi + if test -z "$ac_cpp_err"; then + ac_header_preproc=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no + fi + rm -f conftest.err conftest.$ac_ext + echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 + echo "${ECHO_T}$ac_header_preproc" >&6 + + # So? What about this header? + case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 + echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 + echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX + ## ------------------------------------ ## + ## Report this to bug-autoconf@gnu.org. ## + ## ------------------------------------ ## + _ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 + echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 + echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 + echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX + ## ------------------------------------ ## + ## Report this to bug-autoconf@gnu.org. ## + ## ------------------------------------ ## + _ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + esac + echo "$as_me:$LINENO: checking for $ac_header" >&5 + echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 + if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + eval "$as_ac_Header=$ac_header_preproc" + fi + echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 + echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + + fi + if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF + + fi + + done + + ac_ext=cc + ac_cpp='$CXXCPP $CPPFLAGS' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + if test -n "$ac_tool_prefix"; then + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. + set dummy $ac_tool_prefix$ac_prog; ac_word=$2 + echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 + if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + + fi + fi + CXX=$ac_cv_prog_CXX + if test -n "$CXX"; then + echo "$as_me:$LINENO: result: $CXX" >&5 + echo "${ECHO_T}$CXX" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + fi + + test -n "$CXX" && break done + fi + if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 + if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ! if test -n "$ac_ct_CXX"; then ! ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. ! else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_ac_ct_CXX="$ac_prog" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! ! fi ! fi ! ac_ct_CXX=$ac_cv_prog_ac_ct_CXX ! if test -n "$ac_ct_CXX"; then ! echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 ! echo "${ECHO_T}$ac_ct_CXX" >&6 ! else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! fi ! ! test -n "$ac_ct_CXX" && break ! done ! test -n "$ac_ct_CXX" || ac_ct_CXX="g++" ! ! CXX=$ac_ct_CXX ! fi ! ! ! # Provide some information about the compiler. ! echo "$as_me:$LINENO:" \ ! "checking for C++ compiler version" >&5 ! ac_compiler=`set X $ac_compile; echo $2` ! { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 ! (eval $ac_compiler --version &5) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } ! { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 ! (eval $ac_compiler -v &5) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } ! { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 ! (eval $ac_compiler -V &5) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } ! ! echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 ! echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 ! if test "${ac_cv_cxx_compiler_gnu+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! int ! main () ! { ! #ifndef __GNUC__ ! choke me ! #endif ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_compiler_gnu=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_compiler_gnu=no ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! ac_cv_cxx_compiler_gnu=$ac_compiler_gnu ! ! fi ! echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 ! echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 ! GXX=`test $ac_compiler_gnu = yes && echo yes` ! ac_test_CXXFLAGS=${CXXFLAGS+set} ! ac_save_CXXFLAGS=$CXXFLAGS ! CXXFLAGS="-g" ! echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 ! echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 ! if test "${ac_cv_prog_cxx_g+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! int ! main () ! { ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_prog_cxx_g=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_prog_cxx_g=no ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext fi + echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 + echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 + if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS + elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi + else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi + fi + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' + do + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + $ac_declaration + #include + int + main () + { + exit (42); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + continue + fi + rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + $ac_declaration + int + main () + { + exit (42); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + fi + rm -f conftest.$ac_objext conftest.$ac_ext + done rm -f conftest* + if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h fi ! ac_ext=cc ! ac_cpp='$CXXCPP $CPPFLAGS' ! ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ! ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ! ! depcc="$CXX" am_compiler_list= ! ! echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 ! echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 ! if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then ! # We make a subdir and do the tests there. Otherwise we can end up ! # making bogus files that we don't know about and never remove. For ! # instance it was reported that on HP-UX the gcc test will end up ! # making a dummy file named `D' -- because `-MD' means `put the output ! # in D'. ! mkdir conftest.dir ! # Copy depcomp to subdir because otherwise we won't find it if we're ! # using a relative directory. ! cp "$am_depcomp" conftest.dir ! cd conftest.dir ! # We will build objects and dependencies in a subdirectory because ! # it helps to detect inapplicable dependency modes. For instance ! # both Tru64's cc and ICC support -MD to output dependencies as a ! # side effect of compilation, but ICC will put the dependencies in ! # the current directory while Tru64 will put them in the object ! # directory. ! mkdir sub + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + : > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # (even with -Werror). So we grep stderr for any message + # that says an option was ignored. + if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done ! cd .. ! rm -rf conftest.dir else ! am_cv_CXX_dependencies_compiler_type=none ! fi ! ! fi ! echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 ! echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 ! CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type ! ! ! ! if ! test "x$enable_dependency_tracking" != xno \ ! && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then ! am__fastdepCXX_TRUE= ! am__fastdepCXX_FALSE='#' else ! am__fastdepCXX_TRUE='#' ! am__fastdepCXX_FALSE= ! fi ! ! ! ac_ext=cc ! ac_cpp='$CXXCPP $CPPFLAGS' ! ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ! ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ! echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 ! echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 ! if test -z "$CXXCPP"; then ! if test "${ac_cv_prog_CXXCPP+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! # Double quotes because CXXCPP needs to be expanded ! for CXXCPP in "$CXX -E" "/lib/cpp" ! do ! ac_preproc_ok=false ! for ac_cxx_preproc_warn_flag in '' yes ! do ! # Use a header file that comes with gcc, so configuring glibc ! # with a fresh cross-compiler works. ! # Prefer to if __STDC__ is defined, since ! # exists even on freestanding compilers. ! # On the NeXT, cc -E runs the code through the compiler's parser, ! # not just through cpp. "Syntax error" is here to catch this case. ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #ifdef __STDC__ ! # include ! #else ! # include ! #endif ! Syntax error ! _ACEOF ! if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } >/dev/null; then ! if test -s conftest.err; then ! ac_cpp_err=$ac_cxx_preproc_warn_flag ! else ! ac_cpp_err= ! fi ! else ! ac_cpp_err=yes ! fi ! if test -z "$ac_cpp_err"; then ! : ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! # Broken: fails on valid input. ! continue ! fi ! rm -f conftest.err conftest.$ac_ext ! ! # OK, works on sane cases. Now check whether non-existent headers ! # can be detected and how. ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #include ! _ACEOF ! if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } >/dev/null; then ! if test -s conftest.err; then ! ac_cpp_err=$ac_cxx_preproc_warn_flag ! else ! ac_cpp_err= ! fi ! else ! ac_cpp_err=yes ! fi ! if test -z "$ac_cpp_err"; then ! # Broken: success on invalid input. ! continue ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! # Passes both tests. ! ac_preproc_ok=: ! break ! fi ! rm -f conftest.err conftest.$ac_ext ! ! done ! # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. ! rm -f conftest.err conftest.$ac_ext ! if $ac_preproc_ok; then ! break ! fi ! done + ac_cv_prog_CXXCPP=$CXXCPP + + fi + CXXCPP=$ac_cv_prog_CXXCPP + else + ac_cv_prog_CXXCPP=$CXXCPP + fi + echo "$as_me:$LINENO: result: $CXXCPP" >&5 + echo "${ECHO_T}$CXXCPP" >&6 + ac_preproc_ok=false + for ac_cxx_preproc_warn_flag in '' yes + do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #ifdef __STDC__ + # include + #else + # include + #endif + Syntax error + _ACEOF + if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag else ! ac_cpp_err= fi ! else ! ac_cpp_err=yes fi + if test -z "$ac_cpp_err"; then + : + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. + continue fi + rm -f conftest.err conftest.$ac_ext ! # OK, works on sane cases. Now check whether non-existent headers ! # can be detected and how. ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #include ! _ACEOF ! if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } >/dev/null; then ! if test -s conftest.err; then ! ac_cpp_err=$ac_cxx_preproc_warn_flag ! else ! ac_cpp_err= ! fi ! else ! ac_cpp_err=yes ! fi ! if test -z "$ac_cpp_err"; then ! # Broken: success on invalid input. ! continue ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! # Passes both tests. ! ac_preproc_ok=: ! break ! fi ! rm -f conftest.err conftest.$ac_ext ! ! done ! # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. ! rm -f conftest.err conftest.$ac_ext ! if $ac_preproc_ok; then ! : else ! { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check ! See \`config.log' for more details." >&5 ! echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } ! fi ! ! ac_ext=cc ! ac_cpp='$CXXCPP $CPPFLAGS' ! ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ! ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ! ! ! ac_ext=f ! ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ! ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_f77_compiler_gnu ! if test -n "$ac_tool_prefix"; then ! for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 ! do ! # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ! set dummy $ac_tool_prefix$ac_prog; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_F77+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if test -n "$F77"; then ! ac_cv_prog_F77="$F77" # Let the user override the test. ! else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_F77="$ac_tool_prefix$ac_prog" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! ! fi ! fi ! F77=$ac_cv_prog_F77 ! if test -n "$F77"; then ! echo "$as_me:$LINENO: result: $F77" >&5 ! echo "${ECHO_T}$F77" >&6 ! else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! fi ! ! test -n "$F77" && break ! done ! fi ! if test -z "$F77"; then ! ac_ct_F77=$F77 ! for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 ! do ! # Extract the first word of "$ac_prog", so it can be a program name with args. ! set dummy $ac_prog; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_ac_ct_F77+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if test -n "$ac_ct_F77"; then ! ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. ! else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_ac_ct_F77="$ac_prog" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! ! fi fi + ac_ct_F77=$ac_cv_prog_ac_ct_F77 + if test -n "$ac_ct_F77"; then + echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 + echo "${ECHO_T}$ac_ct_F77" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + fi + + test -n "$ac_ct_F77" && break + done + + F77=$ac_ct_F77 + fi + + + # Provide some information about the compiler. + echo "$as_me:5490:" \ + "checking for Fortran 77 compiler version" >&5 + ac_compiler=`set X $ac_compile; echo $2` + { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + + # If we don't use `.F' as extension, the preprocessor is not run on the + # input file. + ac_save_ext=$ac_ext + ac_ext=F + echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 + echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 + if test "${ac_cv_f77_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + program main + #ifndef __GNUC__ + choke me + #endif + + end + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no + fi + rm -f conftest.$ac_objext conftest.$ac_ext + ac_cv_f77_compiler_gnu=$ac_compiler_gnu + + fi + echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 + echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 + ac_ext=$ac_save_ext + G77=`test $ac_compiler_gnu = yes && echo yes` + ac_test_FFLAGS=${FFLAGS+set} + ac_save_FFLAGS=$FFLAGS + FFLAGS= + echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 + echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 + if test "${ac_cv_prog_f77_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + FFLAGS=-g + cat >conftest.$ac_ext <<_ACEOF + program main + + end + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_f77_g=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_prog_f77_g=no + fi + rm -f conftest.$ac_objext conftest.$ac_ext + + fi + echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 + echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 + if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS + elif test $ac_cv_prog_f77_g = yes; then + if test "$G77" = yes; then + FFLAGS="-g -O2" + else + FFLAGS="-g" + fi + else + if test "$G77" = yes; then + FFLAGS="-O2" + else + FFLAGS= + fi + fi + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + + # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! ! # find the maximum length of command line arguments ! echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 ! echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6 ! if test "${lt_cv_sys_max_cmd_len+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! i=0 ! testring="ABCD" ! ! case $build_os in ! msdosdjgpp*) ! # On DJGPP, this test can blow up pretty badly due to problems in libc ! # (any single argument exceeding 2000 bytes causes a buffer overrun ! # during glob expansion). Even if it were fixed, the result of this ! # check would be larger than it should be. ! lt_cv_sys_max_cmd_len=12288; # 12K is about right ! ;; ! ! gnu*) ! # Under GNU Hurd, this test is not required because there is ! # no limit to the length of command line arguments. ! # Libtool will interpret -1 as no limit whatsoever ! lt_cv_sys_max_cmd_len=-1; ! ;; ! ! cygwin* | mingw*) ! # On Win9x/ME, this test blows up -- it succeeds, but takes ! # about 5 minutes as the teststring grows exponentially. ! # Worse, since 9x/ME are not pre-emptively multitasking, ! # you end up with a "frozen" computer, even though with patience ! # the test eventually succeeds (with a max line length of 256k). ! # Instead, let's just punt: use the minimum linelength reported by ! # all of the supported platforms: 8192 (on NT/2K/XP). ! lt_cv_sys_max_cmd_len=8192; ! ;; ! ! *) ! # If test is not a shell built-in, we'll probably end up computing a ! # maximum length that is only half of the actual maximum length, but ! # we can't tell. ! while (test "X"`$CONFIG_SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \ ! = "XX$testring") >/dev/null 2>&1 && ! new_result=`expr "X$testring" : ".*" 2>&1` && ! lt_cv_sys_max_cmd_len=$new_result && ! test $i != 17 # 1/2 MB should be enough ! do ! i=`expr $i + 1` ! testring=$testring$testring ! done ! testring= ! # Add a significant safety factor because C++ compilers can tack on massive ! # amounts of additional arguments before passing them to the linker. ! # It appears as though 1/2 is a usable value. ! lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ! ;; ! esac ! ! fi ! ! if test -n $lt_cv_sys_max_cmd_len ; then ! echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 ! echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6 ! else ! echo "$as_me:$LINENO: result: none" >&5 ! echo "${ECHO_T}none" >&6 ! fi ! ! ! ! ! # Check for command to grab the raw symbol name followed by C symbol from nm. ! echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 ! echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 ! if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! ! # These are sane defaults that work on at least a few old systems. ! # [They come from Ultrix. What could be older than Ultrix?!! ;)] ! ! # Character class describing NM global symbol codes. ! symcode='[BCDEGRST]' ! ! # Regexp to match symbols that can be accessed directly from C. ! sympat='\([_A-Za-z][_A-Za-z0-9]*\)' ! ! # Transform the above into a raw symbol and a C symbol. ! symxfrm='\1 \2\3 \3' ! ! # Transform an extracted symbol line into a proper C declaration ! lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" ! ! # Transform an extracted symbol line into symbol name and symbol address ! lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ! ! # Define system-specific variables. ! case $host_os in ! aix*) ! symcode='[BCDT]' ;; ! cygwin* | mingw* | pw32*) ! symcode='[ABCDGISTW]' ! ;; ! hpux*) # Its linker distinguishes data from code symbols ! if test "$host_cpu" = ia64; then ! symcode='[ABCDEGRST]' ! fi ! lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" ! lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ! ;; ! irix* | nonstopux*) ! symcode='[BCDEGRST]' ! ;; ! osf*) ! symcode='[BCDEGQRST]' ! ;; ! solaris* | sysv5*) ! symcode='[BDT]' ! ;; ! sysv4) ! symcode='[DFNSTU]' ! ;; ! esac ! ! # Handle CRLF in mingw tool chain ! opt_cr= ! case $build_os in ! mingw*) ! opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ! ;; ! esac ! ! # If we're using GNU nm, then use its standard symbol codes. ! case `$NM -V 2>&1` in ! *GNU* | *'with BFD'*) ! symcode='[ABCDGISTW]' ;; ! esac ! ! # Try without a prefix undercore, then with it. ! for ac_symprfx in "" "_"; do ! ! # Write the raw and C identifiers. ! lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" ! ! # Check to see that the pipe works correctly. ! pipe_works=no ! ! rm -f conftest* ! cat > conftest.$ac_ext <&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; then ! # Now try to grab the symbols. ! nlist=conftest.nm ! if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 ! (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && test -s "$nlist"; then ! # Try sorting and uniquifying the output. ! if sort "$nlist" | uniq > "$nlist"T; then ! mv -f "$nlist"T "$nlist" ! else ! rm -f "$nlist"T ! fi ! ! # Make sure that we snagged all the symbols we need. ! if grep ' nm_test_var$' "$nlist" >/dev/null; then ! if grep ' nm_test_func$' "$nlist" >/dev/null; then ! cat < conftest.$ac_ext ! #ifdef __cplusplus ! extern "C" { ! #endif ! ! EOF ! # Now generate the symbol file. ! eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' ! ! cat <> conftest.$ac_ext ! #if defined (__STDC__) && __STDC__ ! # define lt_ptr_t void * ! #else ! # define lt_ptr_t char * ! # define const ! #endif ! ! /* The mapping between symbol names and symbols. */ ! const struct { ! const char *name; ! lt_ptr_t address; ! } ! lt_preloaded_symbols[] = ! { ! EOF ! $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext ! cat <<\EOF >> conftest.$ac_ext ! {0, (lt_ptr_t) 0} ! }; ! ! #ifdef __cplusplus ! } ! #endif ! EOF ! # Now try linking the two files. ! mv conftest.$ac_objext conftstm.$ac_objext ! lt_save_LIBS="$LIBS" ! lt_save_CFLAGS="$CFLAGS" ! LIBS="conftstm.$ac_objext" ! CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && test -s conftest${ac_exeext}; then ! pipe_works=yes ! fi ! LIBS="$lt_save_LIBS" ! CFLAGS="$lt_save_CFLAGS" ! else ! echo "cannot find nm_test_func in $nlist" >&5 ! fi ! else ! echo "cannot find nm_test_var in $nlist" >&5 ! fi ! else ! echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 ! fi ! else ! echo "$progname: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! fi ! rm -f conftest* conftst* ! ! # Do not use the global_symbol_pipe unless it works. ! if test "$pipe_works" = yes; then ! break ! else ! lt_cv_sys_global_symbol_pipe= ! fi ! done ! ! fi ! ! if test -z "$lt_cv_sys_global_symbol_pipe"; then ! lt_cv_sys_global_symbol_to_cdecl= ! fi ! if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then ! echo "$as_me:$LINENO: result: failed" >&5 ! echo "${ECHO_T}failed" >&6 ! else ! echo "$as_me:$LINENO: result: ok" >&5 ! echo "${ECHO_T}ok" >&6 ! fi ! ! echo "$as_me:$LINENO: checking for objdir" >&5 ! echo $ECHO_N "checking for objdir... $ECHO_C" >&6 ! if test "${lt_cv_objdir+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! rm -f .libs 2>/dev/null ! mkdir .libs 2>/dev/null ! if test -d .libs; then ! lt_cv_objdir=.libs ! else ! # MS-DOS does not allow filenames that begin with a dot. ! lt_cv_objdir=_libs ! fi ! rmdir .libs 2>/dev/null ! fi ! echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 ! echo "${ECHO_T}$lt_cv_objdir" >&6 ! objdir=$lt_cv_objdir ! ! ! ! ! ! case $host_os in ! aix3*) ! # AIX sometimes has problems with the GCC collect2 program. For some ! # reason, if we set the COLLECT_NAMES environment variable, the problems ! # vanish in a puff of smoke. ! if test "X${COLLECT_NAMES+set}" != Xset; then ! COLLECT_NAMES= ! export COLLECT_NAMES ! fi ;; + esac + + # Sed substitution that helps us do robust quoting. It backslashifies + # metacharacters that are still active within double-quoted strings. + Xsed='sed -e s/^X//' + sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' + + # Same as above, but do not quote variable references. + double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' + + # Sed substitution to delay expansion of an escaped shell variable in a + # double_quote_subst'ed string. + delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + + # Sed substitution to avoid accidental globbing in evaled expressions + no_glob_subst='s/\*/\\\*/g' + + # Constants: + rm="rm -f" + + # Global variables: + default_ofile=libtool + can_build_shared=yes + + # All known linkers require a `.a' archive for static linking (except M$VC, + # which needs '.lib'). + libext=a + ltmain="$ac_aux_dir/ltmain.sh" + ofile="$default_ofile" + with_gnu_ld="$lt_cv_prog_gnu_ld" + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. + set dummy ${ac_tool_prefix}ar; ac_word=$2 + echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 + if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + + fi + fi + AR=$ac_cv_prog_AR + if test -n "$AR"; then + echo "$as_me:$LINENO: result: $AR" >&5 + echo "${ECHO_T}$AR" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + fi + + fi + if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. + set dummy ar; ac_word=$2 + echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 + if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + + test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false" + fi + fi + ac_ct_AR=$ac_cv_prog_ac_ct_AR + if test -n "$ac_ct_AR"; then + echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 + echo "${ECHO_T}$ac_ct_AR" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + fi + + AR=$ac_ct_AR + else + AR="$ac_cv_prog_AR" + fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. + set dummy ${ac_tool_prefix}ranlib; ac_word=$2 + echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 + if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + + fi + fi + RANLIB=$ac_cv_prog_RANLIB + if test -n "$RANLIB"; then + echo "$as_me:$LINENO: result: $RANLIB" >&5 + echo "${ECHO_T}$RANLIB" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + fi + + fi + if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. + set dummy ranlib; ac_word=$2 + echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 + if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" + fi + fi + ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB + if test -n "$ac_ct_RANLIB"; then + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 + echo "${ECHO_T}$ac_ct_RANLIB" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + fi + + RANLIB=$ac_ct_RANLIB + else + RANLIB="$ac_cv_prog_RANLIB" + fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. + set dummy ${ac_tool_prefix}strip; ac_word=$2 + echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 + if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + + fi + fi + STRIP=$ac_cv_prog_STRIP + if test -n "$STRIP"; then + echo "$as_me:$LINENO: result: $STRIP" >&5 + echo "${ECHO_T}$STRIP" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + fi + + fi + if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. + set dummy strip; ac_word=$2 + echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 + if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + + test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" + fi + fi + ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP + if test -n "$ac_ct_STRIP"; then + echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 + echo "${ECHO_T}$ac_ct_STRIP" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + fi + + STRIP=$ac_ct_STRIP + else + STRIP="$ac_cv_prog_STRIP" + fi + + + old_CC="$CC" + old_CFLAGS="$CFLAGS" + + # Set sane defaults for various variables + test -z "$AR" && AR=ar + test -z "$AR_FLAGS" && AR_FLAGS=cru + test -z "$AS" && AS=as + test -z "$CC" && CC=cc + test -z "$LTCC" && LTCC=$CC + test -z "$DLLTOOL" && DLLTOOL=dlltool + test -z "$LD" && LD=ld + test -z "$LN_S" && LN_S="ln -s" + test -z "$MAGIC_CMD" && MAGIC_CMD=file + test -z "$NM" && NM=nm + test -z "$SED" && SED=sed + test -z "$OBJDUMP" && OBJDUMP=objdump + test -z "$RANLIB" && RANLIB=: + test -z "$STRIP" && STRIP=: + test -z "$ac_objext" && ac_objext=o + + # Determine commands to create old-style static archives. + old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' + old_postinstall_cmds='chmod 644 $oldlib' + old_postuninstall_cmds= + + if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" + ;; *) ! old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" ! ;; ! esac ! old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" ! fi ! ! # Only perform the check for file, if the check method requires it ! case $deplibs_check_method in ! file_magic*) ! if test "$file_magic_cmd" = '$MAGIC_CMD'; then ! echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 ! echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 ! if test "${lt_cv_path_MAGIC_CMD+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! case $MAGIC_CMD in ! [\\/*] | ?:[\\/]*) ! lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ! ;; ! *) ! lt_save_MAGIC_CMD="$MAGIC_CMD" ! lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ! ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then ! lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then ! case $deplibs_check_method in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" ! MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | ! $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *************** EOF *** 1810,1857 **** break fi done ! IFS="$ac_save_ifs" ! MAGIC="$ac_save_MAGIC" ;; esac fi ! MAGIC="$lt_cv_path_MAGIC" ! if test -n "$MAGIC"; then ! echo "$ac_t""$MAGIC" 1>&6 else ! echo "$ac_t""no" 1>&6 fi ! if test -z "$lt_cv_path_MAGIC"; then if test -n "$ac_tool_prefix"; then ! echo $ac_n "checking for file""... $ac_c" 1>&6 ! echo "configure:1830: checking for file" >&5 ! if eval "test \"`echo '$''{'lt_cv_path_MAGIC'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! case "$MAGIC" in ! /*) ! lt_cv_path_MAGIC="$MAGIC" # Let the user override the test with a path. ! ;; ! ?:/*) ! ac_cv_path_MAGIC="$MAGIC" # Let the user override the test with a dos path. ;; ! *) ! ac_save_MAGIC="$MAGIC" ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="/usr/bin:$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then ! lt_cv_path_MAGIC="$ac_dir/file" if test -n "$file_magic_test_file"; then ! case "$deplibs_check_method" in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" ! MAGIC="$lt_cv_path_MAGIC" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | ! egrep "$file_magic_regex" > /dev/null; then : else cat <&2 --- 6271,6318 ---- break fi done ! IFS="$lt_save_ifs" ! MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi ! MAGIC_CMD="$lt_cv_path_MAGIC_CMD" ! if test -n "$MAGIC_CMD"; then ! echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 ! echo "${ECHO_T}$MAGIC_CMD" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi ! if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then ! echo "$as_me:$LINENO: checking for file" >&5 ! echo $ECHO_N "checking for file... $ECHO_C" >&6 ! if test "${lt_cv_path_MAGIC_CMD+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! case $MAGIC_CMD in ! [\\/*] | ?:[\\/]*) ! lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; ! *) ! lt_save_MAGIC_CMD="$MAGIC_CMD" ! lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ! ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then ! lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then ! case $deplibs_check_method in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" ! MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | ! $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *************** EOF *** 1872,1892 **** break fi done ! IFS="$ac_save_ifs" ! MAGIC="$ac_save_MAGIC" ;; esac fi ! MAGIC="$lt_cv_path_MAGIC" ! if test -n "$MAGIC"; then ! echo "$ac_t""$MAGIC" 1>&6 else ! echo "$ac_t""no" 1>&6 fi else ! MAGIC=: fi fi --- 6333,6355 ---- break fi done ! IFS="$lt_save_ifs" ! MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi ! MAGIC_CMD="$lt_cv_path_MAGIC_CMD" ! if test -n "$MAGIC_CMD"; then ! echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 ! echo "${ECHO_T}$MAGIC_CMD" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi else ! MAGIC_CMD=: fi fi *************** fi *** 1894,2884 **** ;; esac ! # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. ! set dummy ${ac_tool_prefix}ranlib; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1901: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! if test -n "$RANLIB"; then ! ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" ! break ! fi ! done ! IFS="$ac_save_ifs" fi fi ! RANLIB="$ac_cv_prog_RANLIB" ! if test -n "$RANLIB"; then ! echo "$ac_t""$RANLIB" 1>&6 else ! echo "$ac_t""no" 1>&6 fi ! if test -z "$ac_cv_prog_RANLIB"; then ! if test -n "$ac_tool_prefix"; then ! # Extract the first word of "ranlib", so it can be a program name with args. ! set dummy ranlib; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1933: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! if test -n "$RANLIB"; then ! ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_RANLIB="ranlib" ! break ! fi ! done ! IFS="$ac_save_ifs" ! test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" fi fi ! RANLIB="$ac_cv_prog_RANLIB" ! if test -n "$RANLIB"; then ! echo "$ac_t""$RANLIB" 1>&6 else ! echo "$ac_t""no" 1>&6 fi else ! RANLIB=":" fi fi ! # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. ! set dummy ${ac_tool_prefix}strip; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1968: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! if test -n "$STRIP"; then ! ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_STRIP="${ac_tool_prefix}strip" ! break fi ! done ! IFS="$ac_save_ifs" fi fi ! STRIP="$ac_cv_prog_STRIP" ! if test -n "$STRIP"; then ! echo "$ac_t""$STRIP" 1>&6 else ! echo "$ac_t""no" 1>&6 fi ! if test -z "$ac_cv_prog_STRIP"; then ! if test -n "$ac_tool_prefix"; then ! # Extract the first word of "strip", so it can be a program name with args. ! set dummy strip; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2000: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! if test -n "$STRIP"; then ! ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_STRIP="strip" ! break fi ! done ! IFS="$ac_save_ifs" ! test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":" fi fi ! STRIP="$ac_cv_prog_STRIP" ! if test -n "$STRIP"; then ! echo "$ac_t""$STRIP" 1>&6 else ! echo "$ac_t""no" 1>&6 fi else ! STRIP=":" fi fi ! # Check for any special flags to pass to ltconfig. ! libtool_flags="--cache-file=$cache_file" ! test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" ! test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" ! test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" ! test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" ! test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" ! libtool_flags="$libtool_flags --enable-win32-dll" ! # Check whether --enable-libtool-lock or --disable-libtool-lock was given. ! if test "${enable_libtool_lock+set}" = set; then ! enableval="$enable_libtool_lock" ! : fi ! test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" ! test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" ! # Check whether --with-pic or --without-pic was given. ! if test "${with_pic+set}" = set; then ! withval="$with_pic" ! pic_mode="$withval" else ! pic_mode=default fi ! test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic" ! test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" ! # Some flags need to be propagated to the compiler or linker for good ! # libtool support. ! case "$host" in ! *-*-irix6*) ! # Find out which ABI we are using. ! echo '#line 2067 "configure"' > conftest.$ac_ext ! if { (eval echo configure:2068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! case "`/usr/bin/file conftest.o`" in ! *32-bit*) ! LD="${LD-ld} -32" ! ;; ! *N32*) ! LD="${LD-ld} -n32" ! ;; ! *64-bit*) ! LD="${LD-ld} -64" ! ;; ! esac fi - rm -rf conftest* - ;; ! *-*-sco3.2v5*) ! # On SCO OpenServer 5, we need -belf to get full-featured binaries. ! SAVE_CFLAGS="$CFLAGS" ! CFLAGS="$CFLAGS -belf" ! echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 ! echo "configure:2089: checking whether the C compiler needs -belf" >&5 ! if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! ! ac_ext=c ! # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ! cross_compiling=$ac_cv_prog_cc_cross ! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! lt_cv_cc_needs_belf=yes else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! lt_cv_cc_needs_belf=no fi ! rm -f conftest* ! ac_ext=c ! # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ! cross_compiling=$ac_cv_prog_cc_cross fi ! echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 ! if test x"$lt_cv_cc_needs_belf" != x"yes"; then ! # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf ! CFLAGS="$SAVE_CFLAGS" fi ;; ! *-*-cygwin* | *-*-mingw*) ! # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. ! set dummy ${ac_tool_prefix}dlltool; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2139: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! if test -n "$DLLTOOL"; then ! ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. ! else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" ! break fi done ! IFS="$ac_save_ifs" fi fi ! DLLTOOL="$ac_cv_prog_DLLTOOL" ! if test -n "$DLLTOOL"; then ! echo "$ac_t""$DLLTOOL" 1>&6 else ! echo "$ac_t""no" 1>&6 fi ! if test -z "$ac_cv_prog_DLLTOOL"; then ! if test -n "$ac_tool_prefix"; then ! # Extract the first word of "dlltool", so it can be a program name with args. ! set dummy dlltool; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2171: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! if test -n "$DLLTOOL"; then ! ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_DLLTOOL="dlltool" ! break fi done ! IFS="$ac_save_ifs" ! test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false" fi fi ! DLLTOOL="$ac_cv_prog_DLLTOOL" ! if test -n "$DLLTOOL"; then ! echo "$ac_t""$DLLTOOL" 1>&6 else ! echo "$ac_t""no" 1>&6 fi ! else ! DLLTOOL="false" fi fi ! # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. ! set dummy ${ac_tool_prefix}as; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2206: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! if test -n "$AS"; then ! ac_cv_prog_AS="$AS" # Let the user override the test. else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_AS="${ac_tool_prefix}as" ! break fi done ! IFS="$ac_save_ifs" fi fi ! AS="$ac_cv_prog_AS" ! if test -n "$AS"; then ! echo "$ac_t""$AS" 1>&6 else ! echo "$ac_t""no" 1>&6 fi ! if test -z "$ac_cv_prog_AS"; then ! if test -n "$ac_tool_prefix"; then ! # Extract the first word of "as", so it can be a program name with args. ! set dummy as; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2238: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! if test -n "$AS"; then ! ac_cv_prog_AS="$AS" # Let the user override the test. else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_AS="as" ! break fi ! done ! IFS="$ac_save_ifs" ! test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false" fi fi ! AS="$ac_cv_prog_AS" ! if test -n "$AS"; then ! echo "$ac_t""$AS" 1>&6 else ! echo "$ac_t""no" 1>&6 fi else ! AS="false" fi fi ! # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. ! set dummy ${ac_tool_prefix}objdump; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2273: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! if test -n "$OBJDUMP"; then ! ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" ! break ! fi ! done ! IFS="$ac_save_ifs" fi fi ! OBJDUMP="$ac_cv_prog_OBJDUMP" ! if test -n "$OBJDUMP"; then ! echo "$ac_t""$OBJDUMP" 1>&6 else ! echo "$ac_t""no" 1>&6 fi ! if test -z "$ac_cv_prog_OBJDUMP"; then ! if test -n "$ac_tool_prefix"; then ! # Extract the first word of "objdump", so it can be a program name with args. ! set dummy objdump; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2305: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! if test -n "$OBJDUMP"; then ! ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_OBJDUMP="objdump" ! break ! fi ! done ! IFS="$ac_save_ifs" ! test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false" fi fi ! OBJDUMP="$ac_cv_prog_OBJDUMP" ! if test -n "$OBJDUMP"; then ! echo "$ac_t""$OBJDUMP" 1>&6 else ! echo "$ac_t""no" 1>&6 fi else ! OBJDUMP="false" fi fi ! # recent cygwin and mingw systems supply a stub DllMain which the user ! # can override, but on older systems we have to supply one ! echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6 ! echo "configure:2341: checking if libtool should supply DllMain function" >&5 ! if eval "test \"`echo '$''{'lt_cv_need_dllmain'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! lt_cv_need_dllmain=no ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! lt_cv_need_dllmain=yes ! fi ! rm -f conftest* fi - echo "$ac_t""$lt_cv_need_dllmain" 1>&6 ! case "$host/$CC" in ! *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) ! # old mingw systems require "-dll" to link a DLL, while more recent ones ! # require "-mdll" ! SAVE_CFLAGS="$CFLAGS" ! CFLAGS="$CFLAGS -mdll" ! echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6 ! echo "configure:2375: checking how to link DLLs" >&5 ! if eval "test \"`echo '$''{'lt_cv_cc_dll_switch'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! lt_cv_cc_dll_switch=-mdll ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! lt_cv_cc_dll_switch=-dll fi ! rm -f conftest* fi ! echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6 ! CFLAGS="$SAVE_CFLAGS" ;; ! *-*-cygwin*) ! # cygwin systems need to pass --dll to the linker, and not link ! # crt.o which will require a WinMain@16 definition. ! lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; esac ;; - esac - # Save cache, so that ltconfig can load it - cat > confcache <<\EOF - # This file is a shell script that caches the results of configure - # tests run on this system so they can be shared between configure - # scripts and configure runs. It is not useful on other systems. - # If it contains results you don't want to keep, you may remove or edit it. # ! # By default, configure uses ./config.cache as the cache file, ! # creating it if it does not exist already. You can give configure ! # the --cache-file=FILE option to use a different cache file; that is ! # what configure does when it calls configure scripts in ! # subdirectories, so they share the cache. ! # Giving --cache-file=/dev/null disables caching, for debugging configure. ! # config.status only pays attention to the cache file if you give it the ! # --recheck option to rerun configure. # ! EOF ! # The following way of writing the cache mishandles newlines in values, ! # but we know of no workaround that is simple, portable, and efficient. ! # So, don't put newlines in cache variables' values. ! # Ultrix sh set writes to stderr and can't be redirected directly, ! # and sets the high bit in the cache file unless we assign to the vars. ! (set) 2>&1 | ! case `(ac_space=' '; set | grep ac_space) 2>&1` in ! *ac_space=\ *) ! # `set' does not quote correctly, so add quotes (double-quote substitution ! # turns \\\\ into \\, and sed turns \\ into \). ! sed -n \ ! -e "s/'/'\\\\''/g" \ ! -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ;; *) ! # `set' quotes correctly as required by POSIX, so do not add quotes. ! sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ;; ! esac >> confcache ! if cmp -s $cache_file confcache; then ! : else ! if test -w $cache_file; then ! echo "updating cache $cache_file" ! cat confcache > $cache_file else ! echo "not updating unwritable cache $cache_file" fi fi - rm -f confcache ! # Actually configure libtool. ac_aux_dir is where install-sh is found. ! AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ ! MAGIC="$MAGIC" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ ! LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \ ! AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \ ! objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \ ! deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \ ! ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ ! $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \ ! || { echo "configure: error: libtool configure failed" 1>&2; exit 1; } ! # Reload cache, that may have been modified by ltconfig ! if test -r "$cache_file"; then ! echo "loading cache $cache_file" ! . $cache_file else ! echo "creating cache $cache_file" ! > $cache_file fi ! # This can be used to rebuild libtool when needed ! LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh" ! # Always use our own libtool. ! LIBTOOL='$(SHELL) $(top_builddir)/libtool' ! # Redirect the config.log output again, so that the ltconfig log is not ! # clobbered by the next message. ! exec 5>>./config.log ! ! ! - echo $ac_n "checking for garbage collector to use""... $ac_c" 1>&6 - echo "configure:2499: checking for garbage collector to use" >&5 - # Check whether --enable-java-gc or --disable-java-gc was given. - if test "${enable_java_gc+set}" = set; then - enableval="$enable_java_gc" - - GC=$enableval else ! GC=boehm fi ! GCINCS= ! if test "$GC" = "boehm"; then ! GCINCS='-I$(top_srcdir)/../../boehm-gc/include' ! GCINCS="$GCINCS `cat ../../boehm-gc/boehm-cflags`" ! cat >> confdefs.h <<\EOF ! #define HAVE_BOEHM_GC 1 ! EOF fi - echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 - echo "configure:2522: checking how to run the C preprocessor" >&5 - # On Suns, sometimes $CPP names a directory. - if test -n "$CPP" && test -d "$CPP"; then - CPP= fi ! if test -z "$CPP"; then ! if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! # This must be in double quotes, not single quotes, because CPP may get ! # substituted into the Makefile and "${CC-cc}" will confuse make. ! CPP="${CC-cc} -E" ! # On the NeXT, cc -E runs the code through the compiler's parser, ! # not just through cpp. ! cat > conftest.$ac_ext < ! Syntax Error ! EOF ! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ! if test -z "$ac_err"; then ! : else ! echo "$ac_err" >&5 ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! CPP="${CC-cc} -E -traditional-cpp" ! cat > conftest.$ac_ext < ! Syntax Error ! EOF ! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ! if test -z "$ac_err"; then ! : else ! echo "$ac_err" >&5 ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! CPP="${CC-cc} -nologo -E" ! cat > conftest.$ac_ext < ! Syntax Error ! EOF ! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ! if test -z "$ac_err"; then ! : else ! echo "$ac_err" >&5 ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! CPP=/lib/cpp fi ! rm -f conftest* fi ! rm -f conftest* fi ! rm -f conftest* ! ac_cv_prog_CPP="$CPP" fi ! CPP="$ac_cv_prog_CPP" else ! ac_cv_prog_CPP="$CPP" fi ! echo "$ac_t""$CPP" 1>&6 ! # Read the libtool configuration ! rm -f conftest ! ./libtool --config > conftest ! . ./conftest ! rm -f conftest ! # Check for command to grab the raw symbol name followed by C symbol from nm. ! echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6 ! echo "configure:2609: checking command to parse $NM output" >&5 ! if eval "test \"`echo '$''{'ac_cv_sys_global_symbol_pipe'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! # These are sane defaults that work on at least a few old systems. ! # {They come from Ultrix. What could be older than Ultrix?!! ;)} ! # Character class describing NM global symbol codes. ! ac_symcode='[BCDEGRST]' ! # Regexp to match symbols that can be accessed directly from C. ! ac_sympat='\([_A-Za-z][_A-Za-z0-9]*\)' ! # Transform the above into a raw symbol and a C symbol. ! ac_symxfrm='\1 \2\3 \3' ! # Transform an extracted symbol line into a proper C declaration ! ac_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" ! # Define system-specific variables. ! case "$host_os" in ! aix*) ! ac_symcode='[BCDT]' ;; ! cygwin* | mingw*) ! ac_symcode='[ABCDGISTW]' ;; ! hpux*) ! ac_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'" ;; ! irix*) ! ac_symcode='[BCDEGRST]' ;; solaris*) ! ac_symcode='[BDT]' ;; esac ! # If we're using GNU nm, then use its standard symbol codes. ! if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then ! ac_symcode='[ABCDGISTW]' fi ! # Try without a prefix undercore, then with it. ! for ac_symprfx in "" "_"; do ! ac_cv_sys_global_symbol_pipe="sed -n -e 's/^.* \($ac_symcode\) *\($ac_symprfx\)$ac_sympat$/$ac_symxfrm/p'" ! # Check to see that the pipe works correctly. ! ac_pipe_works=no ! rm -f conftest.$ac_ext ! cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - # Now try to grab the symbols. - ac_nlist=conftest.nm ! if { (eval echo configure:2676: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then ! # Try sorting and uniquifying the output. ! if sort "$ac_nlist" | uniq > "$ac_nlist"T; then ! mv -f "$ac_nlist"T "$ac_nlist" ! else ! rm -f "$ac_nlist"T ! fi ! # Make sure that we snagged all the symbols we need. ! if egrep ' nm_test_var$' "$ac_nlist" >/dev/null; then ! if egrep ' nm_test_func$' "$ac_nlist" >/dev/null; then ! cat < conftest.c #ifdef __cplusplus ! extern "C" { #endif ! EOF ! # Now generate the symbol file. ! eval "$ac_global_symbol_to_cdecl"' < "$ac_nlist" >> conftest.c' ! ! cat <> conftest.c ! #if defined (__STDC__) && __STDC__ ! # define lt_ptr_t void * #else ! # define lt_ptr_t char * ! # define const #endif ! /* The mapping between symbol names and symbols. */ ! const struct { ! const char *name; ! lt_ptr_t address; } ! lt_preloaded_symbols[] = { ! EOF ! sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$ac_nlist" >> conftest.c ! cat <<\EOF >> conftest.c ! {0, (lt_ptr_t) 0} ! }; #ifdef __cplusplus } #endif ! EOF ! # Now try linking the two files. ! mv conftest.$ac_objext conftstm.$ac_objext ! ac_save_LIBS="$LIBS" ! ac_save_CFLAGS="$CFLAGS" ! LIBS="conftstm.$ac_objext" ! CFLAGS="$CFLAGS$no_builtin_flag" ! if { (eval echo configure:2728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ! ac_pipe_works=yes ! else ! echo "configure: failed program was:" >&5 ! cat conftest.c >&5 ! fi ! LIBS="$ac_save_LIBS" ! CFLAGS="$ac_save_CFLAGS" ! else ! echo "cannot find nm_test_func in $ac_nlist" >&5 ! fi ! else ! echo "cannot find nm_test_var in $ac_nlist" >&5 ! fi ! else ! echo "cannot run $ac_cv_sys_global_symbol_pipe" >&5 ! fi ! else ! echo "$progname: failed program was:" >&5 ! cat conftest.c >&5 ! fi ! rm -rf conftest* conftst* ! # Do not use the global_symbol_pipe unless it works. ! if test "$ac_pipe_works" = yes; then ! if test x"$ac_symprfx" = x"_"; then ! ac_cv_sys_symbol_underscore=yes ! else ! ac_cv_sys_symbol_underscore=no ! fi ! break else ! ac_cv_sys_global_symbol_pipe= fi - done fi - ac_result=yes - if test -z "$ac_cv_sys_global_symbol_pipe"; then - ac_result=no fi ! echo "$ac_t""$ac_result" 1>&6 ! echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 ! echo "configure:2774: checking for ANSI C header files" >&5 ! if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < ! #include ! #include ! #include EOF ! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ! if test -z "$ac_err"; then ! rm -rf conftest* ! ac_cv_header_stdc=yes else ! echo "$ac_err" >&5 ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! ac_cv_header_stdc=no fi - rm -f conftest* ! if test $ac_cv_header_stdc = yes; then ! # SunOS 4.x string.h does not declare mem*, contrary to ANSI. ! cat > conftest.$ac_ext < ! EOF ! if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "memchr" >/dev/null 2>&1; then ! : else ! rm -rf conftest* ! ac_cv_header_stdc=no fi - rm -f conftest* fi ! if test $ac_cv_header_stdc = yes; then ! # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. ! cat > conftest.$ac_ext < ! EOF ! if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "free" >/dev/null 2>&1; then ! : else ! rm -rf conftest* ! ac_cv_header_stdc=no fi ! rm -f conftest* fi ! if test $ac_cv_header_stdc = yes; then ! # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. ! if test "$cross_compiling" = yes; then ! : else ! cat > conftest.$ac_ext < ! #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') ! #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) ! #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) ! int main () { int i; for (i = 0; i < 256; i++) ! if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); ! exit (0); } ! EOF ! if { (eval echo configure:2854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ! then ! : else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -fr conftest* ! ac_cv_header_stdc=no fi ! rm -fr conftest* fi fi fi ! echo "$ac_t""$ac_cv_header_stdc" 1>&6 ! if test $ac_cv_header_stdc = yes; then ! cat >> confdefs.h <<\EOF ! #define STDC_HEADERS 1 ! EOF fi # Check whether --enable-ltdl-install or --disable-ltdl-install was given. if test "${enable_ltdl_install+set}" = set; then enableval="$enable_ltdl_install" - : - fi --- 6357,18978 ---- ;; esac ! enable_dlopen=no ! enable_win32_dll=yes ! ! # Check whether --enable-libtool-lock or --disable-libtool-lock was given. ! if test "${enable_libtool_lock+set}" = set; then ! enableval="$enable_libtool_lock" ! ! fi; ! test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes ! ! ! # Check whether --with-pic or --without-pic was given. ! if test "${with_pic+set}" = set; then ! withval="$with_pic" ! pic_mode="$withval" else ! pic_mode=default ! fi; ! test -z "$pic_mode" && pic_mode=default ! ! # Use C for the default configuration in the libtool script ! tagname= ! lt_save_CC="$CC" ! ac_ext=c ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ! ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_c_compiler_gnu ! ! ! # Source file extension for C test sources. ! ac_ext=c ! ! # Object file extension for compiled C test sources. ! objext=o ! objext=$objext ! ! # Code to be used in simple compile tests ! lt_simple_compile_test_code="int some_variable = 0;\n" ! ! # Code to be used in simple link tests ! lt_simple_link_test_code='int main(){return(0);}\n' ! ! ! # If no C compiler was specified, use CC. ! LTCC=${LTCC-"$CC"} ! ! # Allow CC to be a program name with arguments. ! compiler=$CC ! ! ! # ! # Check for any special shared library compilation flags. ! # ! lt_prog_cc_shlib= ! if test "$GCC" = no; then ! case $host_os in ! sco3.2v5*) ! lt_prog_cc_shlib='-belf' ! ;; ! esac fi + if test -n "$lt_prog_cc_shlib"; then + { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5 + echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;} + if echo "$old_CC $old_CFLAGS " | grep "[ ]$lt_prog_cc_shlib[ ]" >/dev/null; then : + else + { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5 + echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;} + lt_cv_prog_cc_can_build_shared=no + fi fi ! ! ! # ! # Check to make sure the static flag actually works. ! # ! echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5 ! echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6 ! if test "${lt_prog_compiler_static_works+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! lt_prog_compiler_static_works=no ! save_LDFLAGS="$LDFLAGS" ! LDFLAGS="$LDFLAGS $lt_prog_compiler_static" ! printf "$lt_simple_link_test_code" > conftest.$ac_ext ! if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then ! # The compiler can only warn and ignore the option if not recognized ! # So say no if there are warnings ! if test -s conftest.err; then ! # Append any errors to the config.log. ! cat conftest.err 1>&5 ! else ! lt_prog_compiler_static_works=yes ! fi ! fi ! $rm conftest* ! LDFLAGS="$save_LDFLAGS" ! fi + echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 + echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 + if test x"$lt_prog_compiler_static_works" = xyes; then + : + else + lt_prog_compiler_static= + fi ! ! ! ! lt_prog_compiler_no_builtin_flag= ! ! if test "$GCC" = yes; then ! lt_prog_compiler_no_builtin_flag=' -fno-builtin' ! ! echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 ! echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 ! if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! lt_cv_prog_compiler_rtti_exceptions=no ! ac_outfile=conftest.$ac_objext ! printf "$lt_simple_compile_test_code" > conftest.$ac_ext ! lt_compiler_flag="-fno-rtti -fno-exceptions" ! # Insert the option either (1) after the last *FLAGS variable, or ! # (2) before a word containing "conftest.", or (3) at the end. ! # Note that $ac_compile itself does not contain backslashes and begins ! # with a dollar sign (not a hyphen), so the echo should work correctly. ! # The option is referenced via a variable to avoid confusing sed. ! lt_compile=`echo "$ac_compile" | $SED \ ! -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ ! -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ ! -e 's:$: $lt_compiler_flag:'` ! (eval echo "\"\$as_me:6495: $lt_compile\"" >&5) ! (eval "$lt_compile" 2>conftest.err) ! ac_status=$? ! cat conftest.err >&5 ! echo "$as_me:6499: \$? = $ac_status" >&5 ! if (exit $ac_status) && test -s "$ac_outfile"; then ! # The compiler can only warn and ignore the option if not recognized ! # So say no if there are warnings ! if test ! -s conftest.err; then ! lt_cv_prog_compiler_rtti_exceptions=yes ! fi ! fi ! $rm conftest* ! ! fi ! echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 ! echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 ! ! if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then ! lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else ! : fi + fi ! ! lt_prog_compiler_wl= ! lt_prog_compiler_pic= ! lt_prog_compiler_static= ! ! echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 ! echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ! ! if test "$GCC" = yes; then ! lt_prog_compiler_wl='-Wl,' ! lt_prog_compiler_static='-static' ! ! case $host_os in ! aix*) ! # All AIX code is PIC. ! if test "$host_cpu" = ia64; then ! # AIX 5 now supports IA64 processor ! lt_prog_compiler_static='-Bstatic' ! fi ! ;; ! ! amigaos*) ! # FIXME: we need at least 68020 code to build shared libraries, but ! # adding the `-m68020' flag to GCC prevents building anything better, ! # like `-m68040'. ! lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ! ;; ! ! beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) ! # PIC is the default for these OSes. ! ;; ! ! mingw* | pw32* | os2*) ! # This hack is so that the source file can tell whether it is being ! # built for inclusion in a dll (and should export symbols for example). ! lt_prog_compiler_pic='-DDLL_EXPORT' ! ;; ! ! darwin* | rhapsody*) ! # PIC is the default on this platform ! # Common symbols not allowed in MH_DYLIB files ! lt_prog_compiler_pic='-fno-common' ! ;; ! ! msdosdjgpp*) ! # Just because we use GCC doesn't mean we suddenly get shared libraries ! # on systems that don't support them. ! lt_prog_compiler_can_build_shared=no ! enable_shared=no ! ;; ! ! sysv4*MP*) ! if test -d /usr/nec; then ! lt_prog_compiler_pic=-Kconform_pic ! fi ! ;; ! ! hpux*) ! # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but ! # not for PA HP-UX. ! case "$host_cpu" in ! hppa*64*|ia64*) ! # +Z the default ! ;; ! *) ! lt_prog_compiler_pic='-fPIC' ! ;; ! esac ! ;; ! ! *) ! lt_prog_compiler_pic='-fPIC' ! ;; ! esac ! else ! # PORTME Check for flag to pass linker flags through the system compiler. ! case $host_os in ! aix*) ! lt_prog_compiler_wl='-Wl,' ! if test "$host_cpu" = ia64; then ! # AIX 5 now supports IA64 processor ! lt_prog_compiler_static='-Bstatic' ! else ! lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' ! fi ! ;; ! ! mingw* | pw32* | os2*) ! # This hack is so that the source file can tell whether it is being ! # built for inclusion in a dll (and should export symbols for example). ! lt_prog_compiler_pic='-DDLL_EXPORT' ! ;; ! ! hpux9* | hpux10* | hpux11*) ! lt_prog_compiler_wl='-Wl,' ! # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but ! # not for PA HP-UX. ! case "$host_cpu" in ! hppa*64*|ia64*) ! # +Z the default ! ;; ! *) ! lt_prog_compiler_pic='+Z' ! ;; ! esac ! # Is there a better lt_prog_compiler_static that works with the bundled CC? ! lt_prog_compiler_static='${wl}-a ${wl}archive' ! ;; ! ! irix5* | irix6* | nonstopux*) ! lt_prog_compiler_wl='-Wl,' ! # PIC (with -KPIC) is the default. ! lt_prog_compiler_static='-non_shared' ! ;; ! ! newsos6) ! lt_prog_compiler_pic='-KPIC' ! lt_prog_compiler_static='-Bstatic' ! ;; ! ! linux*) ! case $CC in ! icc|ecc) ! lt_prog_compiler_wl='-Wl,' ! lt_prog_compiler_pic='-KPIC' ! lt_prog_compiler_static='-static' ! ;; ! ccc) ! lt_prog_compiler_wl='-Wl,' ! # All Alpha code is PIC. ! lt_prog_compiler_static='-non_shared' ! ;; ! esac ! ;; ! ! osf3* | osf4* | osf5*) ! lt_prog_compiler_wl='-Wl,' ! # All OSF/1 code is PIC. ! lt_prog_compiler_static='-non_shared' ! ;; ! ! sco3.2v5*) ! lt_prog_compiler_pic='-Kpic' ! lt_prog_compiler_static='-dn' ! ;; ! ! solaris*) ! lt_prog_compiler_wl='-Wl,' ! lt_prog_compiler_pic='-KPIC' ! lt_prog_compiler_static='-Bstatic' ! ;; ! ! sunos4*) ! lt_prog_compiler_wl='-Qoption ld ' ! lt_prog_compiler_pic='-PIC' ! lt_prog_compiler_static='-Bstatic' ! ;; ! ! sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) ! lt_prog_compiler_wl='-Wl,' ! lt_prog_compiler_pic='-KPIC' ! lt_prog_compiler_static='-Bstatic' ! ;; ! ! sysv4*MP*) ! if test -d /usr/nec ;then ! lt_prog_compiler_pic='-Kconform_pic' ! lt_prog_compiler_static='-Bstatic' ! fi ! ;; ! ! uts4*) ! lt_prog_compiler_pic='-pic' ! lt_prog_compiler_static='-Bstatic' ! ;; ! ! *) ! lt_prog_compiler_can_build_shared=no ! ;; ! esac ! fi ! ! echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 ! echo "${ECHO_T}$lt_prog_compiler_pic" >&6 ! ! # ! # Check to make sure the PIC flag actually works. ! # ! if test -n "$lt_prog_compiler_pic"; then ! echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 ! echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6 ! if test "${lt_prog_compiler_pic_works+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! lt_prog_compiler_pic_works=no ! ac_outfile=conftest.$ac_objext ! printf "$lt_simple_compile_test_code" > conftest.$ac_ext ! lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ! # Insert the option either (1) after the last *FLAGS variable, or ! # (2) before a word containing "conftest.", or (3) at the end. ! # Note that $ac_compile itself does not contain backslashes and begins ! # with a dollar sign (not a hyphen), so the echo should work correctly. ! # The option is referenced via a variable to avoid confusing sed. ! lt_compile=`echo "$ac_compile" | $SED \ ! -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ ! -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ ! -e 's:$: $lt_compiler_flag:'` ! (eval echo "\"\$as_me:6727: $lt_compile\"" >&5) ! (eval "$lt_compile" 2>conftest.err) ! ac_status=$? ! cat conftest.err >&5 ! echo "$as_me:6731: \$? = $ac_status" >&5 ! if (exit $ac_status) && test -s "$ac_outfile"; then ! # The compiler can only warn and ignore the option if not recognized ! # So say no if there are warnings ! if test ! -s conftest.err; then ! lt_prog_compiler_pic_works=yes ! fi ! fi ! $rm conftest* ! fi + echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 + echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6 + if test x"$lt_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac else ! lt_prog_compiler_pic= ! lt_prog_compiler_can_build_shared=no fi + fi + case "$host_os" in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; + esac ! echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 ! echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 ! if test "${lt_cv_prog_compiler_c_o+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! lt_cv_prog_compiler_c_o=no ! $rm -r conftest 2>/dev/null ! mkdir conftest ! cd conftest ! mkdir out ! printf "$lt_simple_compile_test_code" > conftest.$ac_ext ! ! # According to Tom Tromey, Ian Lance Taylor reported there are C compilers ! # that will create temporary files in the current directory regardless of ! # the output directory. Thus, making CWD read-only will cause this test ! # to fail, enabling locking or at least warning the user not to do parallel ! # builds. ! chmod -w . ! ! lt_compiler_flag="-o out/conftest2.$ac_objext" ! # Insert the option either (1) after the last *FLAGS variable, or ! # (2) before a word containing "conftest.", or (3) at the end. ! # Note that $ac_compile itself does not contain backslashes and begins ! # with a dollar sign (not a hyphen), so the echo should work correctly. ! lt_compile=`echo "$ac_compile" | $SED \ ! -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ ! -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ ! -e 's:$: $lt_compiler_flag:'` ! (eval echo "\"\$as_me:6794: $lt_compile\"" >&5) ! (eval "$lt_compile" 2>out/conftest.err) ! ac_status=$? ! cat out/conftest.err >&5 ! echo "$as_me:6798: \$? = $ac_status" >&5 ! if (exit $ac_status) && test -s out/conftest2.$ac_objext ! then ! # The compiler can only warn and ignore the option if not recognized ! # So say no if there are warnings ! if test ! -s out/conftest.err; then ! lt_cv_prog_compiler_c_o=yes ! fi ! fi ! chmod u+w . ! $rm conftest* out/* ! rmdir out ! cd .. ! rmdir conftest ! $rm conftest* ! ! fi ! echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 ! echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 ! ! ! hard_links="nottested" ! if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then ! # do not overwrite the value of need_locks provided by the user ! echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 ! echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 ! hard_links=yes ! $rm conftest* ! ln conftest.a conftest.b 2>/dev/null && hard_links=no ! touch conftest.a ! ln conftest.a conftest.b 2>&5 || hard_links=no ! ln conftest.a conftest.b 2>/dev/null && hard_links=no ! echo "$as_me:$LINENO: result: $hard_links" >&5 ! echo "${ECHO_T}$hard_links" >&6 ! if test "$hard_links" = no; then ! { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 ! echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} ! need_locks=warn ! fi else ! need_locks=no ! fi ! ! echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 ! echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 ! ! runpath_var= ! allow_undefined_flag= ! enable_shared_with_static_runtimes=no ! archive_cmds= ! archive_expsym_cmds= ! old_archive_From_new_cmds= ! old_archive_from_expsyms_cmds= ! export_dynamic_flag_spec= ! whole_archive_flag_spec= ! thread_safe_flag_spec= ! hardcode_libdir_flag_spec= ! hardcode_libdir_flag_spec_ld= ! hardcode_libdir_separator= ! hardcode_direct=no ! hardcode_minus_L=no ! hardcode_shlibpath_var=unsupported ! link_all_deplibs=unknown ! hardcode_automatic=no ! module_cmds= ! module_expsym_cmds= ! always_export_symbols=no ! export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ! # include_expsyms should be a list of space-separated symbols to be *always* ! # included in the symbol list ! include_expsyms= ! # exclude_expsyms can be an extended regexp of symbols to exclude ! # it will be wrapped by ` (' and `)$', so one must not match beginning or ! # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', ! # as well as any symbol that contains `d'. ! exclude_expsyms="_GLOBAL_OFFSET_TABLE_" ! # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out ! # platforms (ab)use it in PIC code, but their linkers get confused if ! # the symbol is explicitly referenced. Since portable code cannot ! # rely on this symbol name, it's probably fine to never include it in ! # preloaded symbol tables. ! extract_expsyms_cmds= ! ! case $host_os in ! cygwin* | mingw* | pw32*) ! # FIXME: the MSVC++ port hasn't been tested in a loooong time ! # When not using gcc, we currently assume that we are using ! # Microsoft Visual C++. ! if test "$GCC" != yes; then ! with_gnu_ld=no fi ! ;; ! openbsd*) ! with_gnu_ld=no ! ;; ! esac ! ! ld_shlibs=yes ! if test "$with_gnu_ld" = yes; then ! # If archive_cmds runs LD, not CC, wlarc should be empty ! wlarc='${wl}' ! ! # See if GNU ld supports shared libraries. ! case $host_os in ! aix3* | aix4* | aix5*) ! # On AIX/PPC, the GNU linker is very broken ! if test "$host_cpu" != ia64; then ! ld_shlibs=no ! cat <&2 ! ! *** Warning: the GNU linker, at least up to release 2.9.1, is reported ! *** to be unable to reliably create shared libraries on AIX. ! *** Therefore, libtool is disabling shared libraries support. If you ! *** really care for shared libraries, you may want to modify your PATH ! *** so that a non-GNU linker is found, and then restart. ! ! EOF ! fi ! ;; ! ! amigaos*) ! archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' ! hardcode_libdir_flag_spec='-L$libdir' ! hardcode_minus_L=yes ! ! # Samuel A. Falvo II reports ! # that the semantics of dynamic libraries on AmigaOS, at least up ! # to version 4, is to share data among multiple programs linked ! # with the same dynamic library. Since this doesn't match the ! # behavior of shared libraries on other platforms, we can't use ! # them. ! ld_shlibs=no ! ;; ! ! beos*) ! if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then ! allow_undefined_flag=unsupported ! # Joseph Beckenbach says some releases of gcc ! # support --undefined. This deserves some investigation. FIXME ! archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ! else ! ld_shlibs=no ! fi ! ;; ! ! cygwin* | mingw* | pw32*) ! # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, ! # as there is no search path for DLLs. ! hardcode_libdir_flag_spec='-L$libdir' ! allow_undefined_flag=unsupported ! always_export_symbols=no ! enable_shared_with_static_runtimes=yes ! export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' ! ! if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then ! archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' ! # If the export-symbols file already is a .def file (1st line ! # is EXPORTS), use it as is; otherwise, prepend... ! archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ! cp $export_symbols $output_objdir/$soname.def; ! else ! echo EXPORTS > $output_objdir/$soname.def; ! cat $export_symbols >> $output_objdir/$soname.def; ! fi~ ! $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' ! else ! ld_shlibs=no ! fi ! ;; ! ! netbsd*) ! if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then ! archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' ! wlarc= ! else ! archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ! archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ! fi ! ;; ! ! solaris* | sysv5*) ! if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ! ld_shlibs=no ! cat <&2 ! ! *** Warning: The releases 2.8.* of the GNU linker cannot reliably ! *** create shared libraries on Solaris systems. Therefore, libtool ! *** is disabling shared libraries support. We urge you to upgrade GNU ! *** binutils to release 2.9.1 or newer. Another option is to modify ! *** your PATH or compiler configuration so that the native linker is ! *** used, and then restart. ! ! EOF ! elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then ! archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ! archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ! else ! ld_shlibs=no ! fi ! ;; ! ! sunos4*) ! archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' ! wlarc= ! hardcode_direct=yes ! hardcode_shlibpath_var=no ! ;; ! ! *) ! if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then ! archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ! archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ! else ! ld_shlibs=no ! fi ! ;; ! esac ! ! if test "$ld_shlibs" = yes; then ! runpath_var=LD_RUN_PATH ! hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' ! export_dynamic_flag_spec='${wl}--export-dynamic' ! # ancient GNU ld didn't support --whole-archive et. al. ! if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then ! whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' ! else ! whole_archive_flag_spec= ! fi ! fi ! else ! # PORTME fill in a description of your system's linker (not GNU ld) ! case $host_os in ! aix3*) ! allow_undefined_flag=unsupported ! always_export_symbols=yes ! archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' ! # Note: this linker hardcodes the directories in LIBPATH if there ! # are no directories specified by -L. ! hardcode_minus_L=yes ! if test "$GCC" = yes && test -z "$link_static_flag"; then ! # Neither direct hardcoding nor static linking is supported with a ! # broken collect2. ! hardcode_direct=unsupported ! fi ! ;; ! ! aix4* | aix5*) ! if test "$host_cpu" = ia64; then ! # On IA64, the linker does run time linking by default, so we don't ! # have to do anything special. ! aix_use_runtimelinking=no ! exp_sym_flag='-Bexport' ! no_entry_flag="" ! else ! # If we're using GNU nm, then we don't want the "-C" option. ! # -C means demangle to AIX nm, but means don't demangle with GNU nm ! if $NM -V 2>&1 | grep 'GNU' > /dev/null; then ! export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' ! else ! export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' ! fi ! aix_use_runtimelinking=no ! ! # Test if we are trying to use run time linking or normal ! # AIX style linking. If -brtl is somewhere in LDFLAGS, we ! # need to do runtime linking. ! case $host_os in aix4.[23]|aix4.[23].*|aix5*) ! for ld_flag in $LDFLAGS; do ! if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then ! aix_use_runtimelinking=yes ! break ! fi ! done ! esac ! ! exp_sym_flag='-bexport' ! no_entry_flag='-bnoentry' ! fi ! ! # When large executables or shared objects are built, AIX ld can ! # have problems creating the table of contents. If linking a library ! # or program results in "error TOC overflow" add -mminimal-toc to ! # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not ! # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. ! ! archive_cmds='' ! hardcode_direct=yes ! hardcode_libdir_separator=':' ! link_all_deplibs=yes ! ! if test "$GCC" = yes; then ! case $host_os in aix4.012|aix4.012.*) ! # We only want to do this on AIX 4.2 and lower, the check ! # below for broken collect2 doesn't work under 4.3+ ! collect2name=`${CC} -print-prog-name=collect2` ! if test -f "$collect2name" && \ ! strings "$collect2name" | grep resolve_lib_name >/dev/null ! then ! # We have reworked collect2 ! hardcode_direct=yes ! else ! # We have old collect2 ! hardcode_direct=unsupported ! # It fails to find uninstalled libraries when the uninstalled ! # path is not listed in the libpath. Setting hardcode_minus_L ! # to unsupported forces relinking ! hardcode_minus_L=yes ! hardcode_libdir_flag_spec='-L$libdir' ! hardcode_libdir_separator= ! fi ! esac ! shared_flag='-shared' ! else ! # not using gcc ! if test "$host_cpu" = ia64; then ! # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release ! # chokes on -Wl,-G. The following line is correct: ! shared_flag='-G' ! else ! if test "$aix_use_runtimelinking" = yes; then ! shared_flag='${wl}-G' ! else ! shared_flag='${wl}-bM:SRE' ! fi ! fi ! fi ! ! # It seems that -bexpall does not export symbols beginning with ! # underscore (_), so it is better to generate a list of symbols to export. ! always_export_symbols=yes ! if test "$aix_use_runtimelinking" = yes; then ! # Warning - without using the other runtime loading flags (-brtl), ! # -berok will link without error, but may produce a broken library. ! allow_undefined_flag='-berok' ! # Determine the default libpath from the value encoded in an empty executable. ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! int ! main () ! { ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ! aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } ! }'` ! # Check for a 64-bit object if we didn't find anything. ! if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } ! }'`; fi ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ! ! hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" ! archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" ! else ! if test "$host_cpu" = ia64; then ! hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' ! allow_undefined_flag="-z nodefs" ! archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" ! else ! # Determine the default libpath from the value encoded in an empty executable. ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! int ! main () ! { ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ! aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } ! }'` ! # Check for a 64-bit object if we didn't find anything. ! if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } ! }'`; fi ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! fi + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + # -bexpall does not export symbols beginning with underscore (_) + always_export_symbols=yes + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec=' ' + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds it's shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + + bsdi4*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes=yes + ;; + + darwin* | rhapsody*) + if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then + archive_cmds_need_lc=no + case "$host_os" in + rhapsody* | darwin1.[012]) + allow_undefined_flag='-undefined suppress' + ;; + *) # Darwin 1.3 on + test -z ${LD_TWOLEVEL_NAMESPACE} && allow_undefined_flag='-flat_namespace -undefined suppress' + ;; + esac + # FIXME: Relying on posixy $() will cause problems for + # cross-compilation, but unfortunately the echo tests do not + # yet detect zsh echo's removal of \ escapes. Also zsh mangles + # `"' quotes if we put them in here... so don't! + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_cmds='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + archive_cmds='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + module_cmds='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='-all_load $convenience' + link_all_deplibs=yes + fi + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + freebsd1*) + ld_shlibs=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd*) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10* | hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case "$host_cpu" in + hppa*64*|ia64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case "$host_cpu" in + hppa*64*|ia64*) + archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + ;; + *) + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + case "$host_cpu" in + hppa*64*) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld='+b $libdir' + hardcode_libdir_separator=: + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + ia64*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=no + hardcode_shlibpath_var=no + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + *) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld='-rpath $libdir' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + link_all_deplibs=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + openbsd*) + hardcode_direct=yes + hardcode_shlibpath_var=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + hardcode_libdir_separator=: + ;; + + sco3.2v5*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ;; + + solaris*) + no_undefined_flag=' -z text' + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4.2uw2*) + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=no + hardcode_shlibpath_var=no + hardcode_runpath_var=yes + runpath_var=LD_RUN_PATH + ;; + + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) + no_undefined_flag='${wl}-z ${wl}text' + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv5*) + no_undefined_flag=' -z text' + # $CC -shared without GNU ld will not create a library from C++ + # object files and a static libstdc++, better avoid it by now + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + hardcode_libdir_flag_spec= + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + fi + + echo "$as_me:$LINENO: result: $ld_shlibs" >&5 + echo "${ECHO_T}$ld_shlibs" >&6 + test "$ld_shlibs" = no && can_build_shared=no + + variables_saved_for_relink="PATH $shlibpath_var $runpath_var" + if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi ! ! # ! # Do we need to explicitly link libc? ! # ! case "x$archive_cmds_need_lc" in ! x|xyes) ! # Assume -lc should be added ! archive_cmds_need_lc=yes ! ! if test "$enable_shared" = yes && test "$GCC" = yes; then ! case $archive_cmds in ! *'~'*) ! # FIXME: we may have to deal with multi-command sequences. ! ;; ! '$CC '*) ! # Test whether the compiler implicitly links with -lc since on some ! # systems, -lgcc has to come before -lc. If gcc already passes -lc ! # to ld, don't add -lc before -lgcc. ! echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 ! echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 ! $rm conftest* ! printf "$lt_simple_compile_test_code" > conftest.$ac_ext ! ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } 2>conftest.err; then ! soname=conftest ! lib=conftest ! libobjs=conftest.$ac_objext ! deplibs= ! wl=$lt_prog_compiler_wl ! compiler_flags=-v ! linker_flags=-v ! verstring= ! output_objdir=. ! libname=conftest ! lt_save_allow_undefined_flag=$allow_undefined_flag ! allow_undefined_flag= ! if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 ! (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } ! then ! archive_cmds_need_lc=no ! else ! archive_cmds_need_lc=yes ! fi ! allow_undefined_flag=$lt_save_allow_undefined_flag ! else ! cat conftest.err 1>&5 ! fi ! $rm conftest* ! echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 ! echo "${ECHO_T}$archive_cmds_need_lc" >&6 ! ;; ! esac ! fi ! ;; ! esac ! ! echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 ! echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 ! hardcode_action= ! if test -n "$hardcode_libdir_flag_spec" || \ ! test -n "$runpath_var " || \ ! test "X$hardcode_automatic"="Xyes" ; then ! ! # We can hardcode non-existant directories. ! if test "$hardcode_direct" != no && ! # If the only mechanism to avoid hardcoding is shlibpath_var, we ! # have to relink, otherwise we might link with an installed library ! # when we should be linking with a yet-to-be-installed one ! ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && ! test "$hardcode_minus_L" != no; then ! # Linking always hardcodes the temporary library directory. ! hardcode_action=relink ! else ! # We can link without hardcoding, and we can hardcode nonexisting dirs. ! hardcode_action=immediate ! fi else ! # We cannot hardcode anything, or else we can only hardcode existing ! # directories. ! hardcode_action=unsupported fi + echo "$as_me:$LINENO: result: $hardcode_action" >&5 + echo "${ECHO_T}$hardcode_action" >&6 + if test "$hardcode_action" = relink; then + # Fast installation is not supported + enable_fast_install=no + elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless + fi ! striplib= ! old_striplib= ! echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 ! echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 ! if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then ! test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" ! test -z "$striplib" && striplib="$STRIP --strip-unneeded" ! echo "$as_me:$LINENO: result: yes" >&5 ! echo "${ECHO_T}yes" >&6 else ! # FIXME - insert some real tests, host_os isn't really good enough ! case $host_os in ! darwin*) ! if test -n "$STRIP" ; then ! striplib="$STRIP -x" ! echo "$as_me:$LINENO: result: yes" >&5 ! echo "${ECHO_T}yes" >&6 ! else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! fi ! ;; ! *) ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! ;; ! esac ! fi ! ! echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 ! echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 ! library_names_spec= ! libname_spec='lib$name' ! soname_spec= ! shrext=".so" ! postinstall_cmds= ! postuninstall_cmds= ! finish_cmds= ! finish_eval= ! shlibpath_var= ! shlibpath_overrides_runpath=unknown ! version_type=none ! dynamic_linker="$host_os ld.so" ! sys_lib_dlsearch_path_spec="/lib /usr/lib" ! if test "$GCC" = yes; then ! sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` ! if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then ! # if the path contains ";" then we assume it to be the separator ! # otherwise default to the standard path separator (i.e. ":") - it is ! # assumed that no part of a normal pathname contains ";" but that should ! # okay in the real world where ";" in dirpaths is itself problematic. ! sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ! else ! sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ! fi else ! sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" ! fi ! need_lib_prefix=unknown ! hardcode_into_libs=no ! ! # when you set need_version to no, make sure it does not cause -set_version ! # flags to be left without arguments ! need_version=unknown ! ! case $host_os in ! aix3*) ! version_type=linux ! library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' ! shlibpath_var=LIBPATH ! ! # AIX 3 has no versioning support, so we append a major version to the name. ! soname_spec='${libname}${release}${shared_ext}$major' ! ;; ! ! aix4* | aix5*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! hardcode_into_libs=yes ! if test "$host_cpu" = ia64; then ! # AIX 5 supports IA64 ! library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' ! shlibpath_var=LD_LIBRARY_PATH ! else ! # With GCC up to 2.95.x, collect2 would create an import file ! # for dependence libraries. The import file would start with ! # the line `#! .'. This would cause the generated library to ! # depend on `.', always an invalid library. This was fixed in ! # development snapshots of GCC prior to 3.0. ! case $host_os in ! aix4 | aix4.[01] | aix4.[01].*) ! if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' ! echo ' yes ' ! echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then ! : ! else ! can_build_shared=no ! fi ! ;; ! esac ! # AIX (on Power*) has no versioning support, so currently we can not hardcode correct ! # soname into executable. Probably we can add versioning support to ! # collect2, so additional links can be useful in future. ! if test "$aix_use_runtimelinking" = yes; then ! # If using run time linking (on AIX 4.2 or later) use lib.so ! # instead of lib.a to let people know that these are not ! # typical AIX shared libraries. ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! else ! # We preserve .a as extension for shared libraries through AIX4.2 ! # and later when we are not doing run time linking. ! library_names_spec='${libname}${release}.a $libname.a' ! soname_spec='${libname}${release}${shared_ext}$major' fi ! shlibpath_var=LIBPATH ! fi ! ;; ! ! amigaos*) ! library_names_spec='$libname.ixlibrary $libname.a' ! # Create ${libname}_ixlibrary.a entries in /sys/libs. ! finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' ! ;; ! ! beos*) ! library_names_spec='${libname}${shared_ext}' ! dynamic_linker="$host_os ld.so" ! shlibpath_var=LIBRARY_PATH ! ;; ! ! bsdi4*) ! version_type=linux ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' ! shlibpath_var=LD_LIBRARY_PATH ! sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" ! sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" ! # the default ld.so.conf also contains /usr/contrib/lib and ! # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow ! # libtool to hard-code these into programs ! ;; ! ! cygwin* | mingw* | pw32*) ! version_type=windows ! shrext=".dll" ! need_version=no ! need_lib_prefix=no ! ! case $GCC,$host_os in ! yes,cygwin* | yes,mingw* | yes,pw32*) ! library_names_spec='$libname.dll.a' ! # DLL is installed to $(libdir)/../bin by postinstall_cmds ! postinstall_cmds='base_file=`basename \${file}`~ ! dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ ! dldir=$destdir/`dirname \$dlpath`~ ! test -d \$dldir || mkdir -p \$dldir~ ! $install_prog $dir/$dlname \$dldir/$dlname' ! postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ! dlpath=$dir/\$dldll~ ! $rm \$dlpath' ! shlibpath_overrides_runpath=yes ! ! case $host_os in ! cygwin*) ! # Cygwin DLLs use 'cyg' prefix rather than 'lib' ! soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ! sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib" ! ;; ! mingw*) ! # MinGW DLLs use traditional 'lib' prefix ! soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ! sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` ! if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then ! # It is most probably a Windows format PATH printed by ! # mingw gcc, but we are running on Cygwin. Gcc prints its search ! # path with ; separators, and with drive letters. We can handle the ! # drive letters (cygwin fileutils understands them), so leave them, ! # especially as we might pass files found there to a mingw objdump, ! # which wouldn't understand a cygwinified path. Ahh. ! sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ! else ! sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ! fi ! ;; ! pw32*) ! # pw32 DLLs use 'pw' prefix rather than 'lib' ! library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' ! ;; ! esac ! ;; ! ! *) ! library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ! ;; ! esac ! dynamic_linker='Win32 ld.exe' ! # FIXME: first we should search . and the directory the executable is in ! shlibpath_var=PATH ! ;; ! ! darwin* | rhapsody*) ! dynamic_linker="$host_os dyld" ! version_type=darwin ! need_lib_prefix=no ! need_version=no ! # FIXME: Relying on posixy $() will cause problems for ! # cross-compilation, but unfortunately the echo tests do not ! # yet detect zsh echo's removal of \ escapes. ! library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' ! soname_spec='${libname}${release}${major}$shared_ext' ! shlibpath_overrides_runpath=yes ! shlibpath_var=DYLD_LIBRARY_PATH ! shrext='$(test .$module = .yes && echo .so || echo .dylib)' ! # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. ! if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then ! sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` ! fi ! sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ! ;; ! ! dgux*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! ;; ! ! freebsd1*) ! dynamic_linker=no ! ;; ! ! freebsd*) ! objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` ! version_type=freebsd-$objformat ! case $version_type in ! freebsd-elf*) ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' ! need_version=no ! need_lib_prefix=no ! ;; ! freebsd-*) ! library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' ! need_version=yes ! ;; ! esac ! shlibpath_var=LD_LIBRARY_PATH ! case $host_os in ! freebsd2*) ! shlibpath_overrides_runpath=yes ! ;; ! freebsd3.01* | freebsdelf3.01*) ! shlibpath_overrides_runpath=yes ! hardcode_into_libs=yes ! ;; ! *) # from 3.2 on ! shlibpath_overrides_runpath=no ! hardcode_into_libs=yes ! ;; ! esac ! ;; ! ! gnu*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! hardcode_into_libs=yes ! ;; ! ! hpux9* | hpux10* | hpux11*) ! # Give a soname corresponding to the major version so that dld.sl refuses to ! # link against other versions. ! version_type=sunos ! need_lib_prefix=no ! need_version=no ! case "$host_cpu" in ! ia64*) ! shrext='.so' ! hardcode_into_libs=yes ! dynamic_linker="$host_os dld.so" ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! if test "X$HPUX_IA64_MODE" = X32; then ! sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" ! else ! sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" ! fi ! sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ! ;; ! hppa*64*) ! shrext='.sl' ! hardcode_into_libs=yes ! dynamic_linker="$host_os dld.sl" ! shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH ! shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" ! sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ! ;; ! *) ! shrext='.sl' ! dynamic_linker="$host_os dld.sl" ! shlibpath_var=SHLIB_PATH ! shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! ;; ! esac ! # HP-UX runs *really* slowly unless shared libraries are mode 555. ! postinstall_cmds='chmod 555 $lib' ! ;; ! ! irix5* | irix6* | nonstopux*) ! case $host_os in ! nonstopux*) version_type=nonstopux ;; ! *) ! if test "$lt_cv_prog_gnu_ld" = yes; then ! version_type=linux ! else ! version_type=irix ! fi ;; ! esac ! need_lib_prefix=no ! need_version=no ! soname_spec='${libname}${release}${shared_ext}$major' ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' ! case $host_os in ! irix5* | nonstopux*) ! libsuff= shlibsuff= ! ;; ! *) ! case $LD in # libtool.m4 will add one of these switches to LD ! *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") ! libsuff= shlibsuff= libmagic=32-bit;; ! *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") ! libsuff=32 shlibsuff=N32 libmagic=N32;; ! *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") ! libsuff=64 shlibsuff=64 libmagic=64-bit;; ! *) libsuff= shlibsuff= libmagic=never-match;; ! esac ! ;; ! esac ! shlibpath_var=LD_LIBRARY${shlibsuff}_PATH ! shlibpath_overrides_runpath=no ! sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" ! sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" ! hardcode_into_libs=yes ! ;; ! ! # No shared lib support for Linux oldld, aout, or coff. ! linux*oldld* | linux*aout* | linux*coff*) ! dynamic_linker=no ! ;; ! ! # This must be Linux ELF. ! linux*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=no ! # This implies no fast_install, which is unacceptable. ! # Some rework will be needed to allow for fast_install ! # before this can be enabled. ! hardcode_into_libs=yes ! ! # We used to test for /lib/ld.so.1 and disable shared libraries on ! # powerpc, because MkLinux only supported shared libraries with the ! # GNU dynamic linker. Since this was broken with cross compilers, ! # most powerpc-linux boxes support dynamic linking these days and ! # people can always --disable-shared, the test was removed, and we ! # assume the GNU/Linux dynamic linker is in use. ! dynamic_linker='GNU/Linux ld.so' ! ;; ! ! netbsd*) ! version_type=sunos ! need_lib_prefix=no ! need_version=no ! if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' ! dynamic_linker='NetBSD (a.out) ld.so' ! else ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! dynamic_linker='NetBSD ld.elf_so' ! fi ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! hardcode_into_libs=yes ! ;; ! ! newsos6) ! version_type=linux ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! ;; ! ! nto-qnx) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! ;; ! ! openbsd*) ! version_type=sunos ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' ! shlibpath_var=LD_LIBRARY_PATH ! if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then ! case $host_os in ! openbsd2.[89] | openbsd2.[89].*) ! shlibpath_overrides_runpath=no ! ;; ! *) ! shlibpath_overrides_runpath=yes ! ;; ! esac ! else ! shlibpath_overrides_runpath=yes ! fi ! ;; ! ! os2*) ! libname_spec='$name' ! shrext=".dll" ! need_lib_prefix=no ! library_names_spec='$libname${shared_ext} $libname.a' ! dynamic_linker='OS/2 ld.exe' ! shlibpath_var=LIBPATH ! ;; ! ! osf3* | osf4* | osf5*) ! version_type=osf ! need_lib_prefix=no ! need_version=no ! soname_spec='${libname}${release}${shared_ext}$major' ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! shlibpath_var=LD_LIBRARY_PATH ! sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" ! sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ! ;; ! ! sco3.2v5*) ! version_type=osf ! soname_spec='${libname}${release}${shared_ext}$major' ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! shlibpath_var=LD_LIBRARY_PATH ! ;; ! ! solaris*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! hardcode_into_libs=yes ! # ldd complains unless libraries are executable ! postinstall_cmds='chmod +x $lib' ! ;; ! ! sunos4*) ! version_type=sunos ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' ! finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! if test "$with_gnu_ld" = yes; then ! need_lib_prefix=no ! fi ! need_version=yes ! ;; ! ! sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) ! version_type=linux ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! case $host_vendor in ! sni) ! shlibpath_overrides_runpath=no ! need_lib_prefix=no ! export_dynamic_flag_spec='${wl}-Blargedynsym' ! runpath_var=LD_RUN_PATH ! ;; ! siemens) ! need_lib_prefix=no ! ;; ! motorola) ! need_lib_prefix=no ! need_version=no ! shlibpath_overrides_runpath=no ! sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ! ;; ! esac ! ;; ! ! sysv4*MP*) ! if test -d /usr/nec ;then ! version_type=linux ! library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' ! soname_spec='$libname${shared_ext}.$major' ! shlibpath_var=LD_LIBRARY_PATH ! fi ! ;; ! ! uts4*) ! version_type=linux ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! ;; ! ! *) ! dynamic_linker=no ! ;; ! esac ! echo "$as_me:$LINENO: result: $dynamic_linker" >&5 ! echo "${ECHO_T}$dynamic_linker" >&6 ! test "$dynamic_linker" = no && can_build_shared=no ! ! if test "x$enable_dlopen" != xyes; then ! enable_dlopen=unknown ! enable_dlopen_self=unknown ! enable_dlopen_self_static=unknown ! else ! lt_cv_dlopen=no ! lt_cv_dlopen_libs= ! ! case $host_os in ! beos*) ! lt_cv_dlopen="load_add_on" ! lt_cv_dlopen_libs= ! lt_cv_dlopen_self=yes ! ;; ! ! mingw* | pw32*) ! lt_cv_dlopen="LoadLibrary" ! lt_cv_dlopen_libs= ! ;; ! ! cygwin*) ! lt_cv_dlopen="dlopen" ! lt_cv_dlopen_libs= ! ;; ! ! darwin*) ! # if libdl is installed we need to link against it ! echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 ! echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 ! if test "${ac_cv_lib_dl_dlopen+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! ac_check_lib_save_LIBS=$LIBS ! LIBS="-ldl $LIBS" ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! /* Override any gcc2 internal prototype to avoid an error. */ ! #ifdef __cplusplus ! extern "C" ! #endif ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char dlopen (); ! int ! main () ! { ! dlopen (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_lib_dl_dlopen=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_lib_dl_dlopen=no fi + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 ! echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 ! if test $ac_cv_lib_dl_dlopen = yes; then ! lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else ! ! lt_cv_dlopen="dyld" ! lt_cv_dlopen_libs= ! lt_cv_dlopen_self=yes ! fi + ;; + + *) + echo "$as_me:$LINENO: checking for shl_load" >&5 + echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 + if test "${ac_cv_func_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char shl_load (); below. ! Prefer to if __STDC__ is defined, since ! exists even on freestanding compilers. */ ! #ifdef __STDC__ ! # include ! #else ! # include ! #endif ! /* Override any gcc2 internal prototype to avoid an error. */ ! #ifdef __cplusplus ! extern "C" ! { ! #endif ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char shl_load (); ! /* The GNU C library defines this for functions which it implements ! to always fail with ENOSYS. Some functions are actually named ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub_shl_load) || defined (__stub___shl_load) ! choke me ! #else ! char (*f) () = shl_load; ! #endif ! #ifdef __cplusplus ! } ! #endif ! ! int ! main () ! { ! return f != shl_load; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_func_shl_load=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_func_shl_load=no fi + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi + echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 + echo "${ECHO_T}$ac_cv_func_shl_load" >&6 + if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" + else + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 + echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 + if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-ldld $LIBS" + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + /* Override any gcc2 internal prototype to avoid an error. */ + #ifdef __cplusplus + extern "C" + #endif + /* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + char shl_load (); + int + main () + { + shl_load (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_shl_load=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_lib_dld_shl_load=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! LIBS=$ac_check_lib_save_LIBS ! fi ! echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 ! echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 ! if test $ac_cv_lib_dld_shl_load = yes; then ! lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" ! else ! echo "$as_me:$LINENO: checking for dlopen" >&5 ! echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 ! if test "${ac_cv_func_dlopen+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char dlopen (); below. ! Prefer to if __STDC__ is defined, since ! exists even on freestanding compilers. */ ! #ifdef __STDC__ ! # include ! #else ! # include ! #endif ! /* Override any gcc2 internal prototype to avoid an error. */ ! #ifdef __cplusplus ! extern "C" ! { ! #endif ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char dlopen (); ! /* The GNU C library defines this for functions which it implements ! to always fail with ENOSYS. Some functions are actually named ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub_dlopen) || defined (__stub___dlopen) ! choke me ! #else ! char (*f) () = dlopen; ! #endif ! #ifdef __cplusplus ! } ! #endif ! int ! main () ! { ! return f != dlopen; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_func_dlopen=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_func_dlopen=no fi + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + fi + echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 + echo "${ECHO_T}$ac_cv_func_dlopen" >&6 + if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" + else + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 + echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 + if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-ldl $LIBS" + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ ! /* Override any gcc2 internal prototype to avoid an error. */ ! #ifdef __cplusplus ! extern "C" ! #endif ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char dlopen (); ! int ! main () ! { ! dlopen (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_lib_dl_dlopen=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_lib_dl_dlopen=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! LIBS=$ac_check_lib_save_LIBS ! fi ! echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 ! echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 ! if test $ac_cv_lib_dl_dlopen = yes; then ! lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else ! echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 ! echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 ! if test "${ac_cv_lib_svld_dlopen+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! ac_check_lib_save_LIBS=$LIBS ! LIBS="-lsvld $LIBS" ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! /* Override any gcc2 internal prototype to avoid an error. */ ! #ifdef __cplusplus ! extern "C" ! #endif ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char dlopen (); ! int ! main () ! { ! dlopen (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_lib_svld_dlopen=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_lib_svld_dlopen=no fi + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi + echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 + echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 + if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" + else + echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 + echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 + if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-ldld $LIBS" + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ ! /* Override any gcc2 internal prototype to avoid an error. */ ! #ifdef __cplusplus ! extern "C" ! #endif ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char dld_link (); ! int ! main () ! { ! dld_link (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_lib_dld_dld_link=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_lib_dld_dld_link=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! LIBS=$ac_check_lib_save_LIBS ! fi ! echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 ! echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 ! if test $ac_cv_lib_dld_dld_link = yes; then ! lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" ! fi ! ! ! fi ! ! ! fi ! ! ! fi ! ! ! fi ! ! ! fi ! ! ;; ! esac ! ! if test "x$lt_cv_dlopen" != xno; then ! enable_dlopen=yes ! else ! enable_dlopen=no fi ! case $lt_cv_dlopen in ! dlopen) ! save_CPPFLAGS="$CPPFLAGS" ! test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" ! save_LDFLAGS="$LDFLAGS" ! eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" ! ! save_LIBS="$LIBS" ! LIBS="$lt_cv_dlopen_libs $LIBS" ! ! echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 ! echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 ! if test "${lt_cv_dlopen_self+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if test "$cross_compiling" = yes; then : ! lt_cv_dlopen_self=cross ! else ! lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 ! lt_status=$lt_dlunknown ! cat > conftest.$ac_ext < ! #endif ! #include ! ! #ifdef RTLD_GLOBAL ! # define LT_DLGLOBAL RTLD_GLOBAL ! #else ! # ifdef DL_GLOBAL ! # define LT_DLGLOBAL DL_GLOBAL ! # else ! # define LT_DLGLOBAL 0 ! # endif ! #endif ! ! /* We may have to define LT_DLLAZY_OR_NOW in the command line if we ! find out it does not work in some platform. */ ! #ifndef LT_DLLAZY_OR_NOW ! # ifdef RTLD_LAZY ! # define LT_DLLAZY_OR_NOW RTLD_LAZY ! # else ! # ifdef DL_LAZY ! # define LT_DLLAZY_OR_NOW DL_LAZY ! # else ! # ifdef RTLD_NOW ! # define LT_DLLAZY_OR_NOW RTLD_NOW ! # else ! # ifdef DL_NOW ! # define LT_DLLAZY_OR_NOW DL_NOW ! # else ! # define LT_DLLAZY_OR_NOW 0 ! # endif ! # endif ! # endif ! # endif ! #endif ! ! #ifdef __cplusplus ! extern "C" void exit (int); ! #endif ! ! void fnord() { int i=42;} ! int main () ! { ! void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); ! int status = $lt_dlunknown; ! ! if (self) ! { ! if (dlsym (self,"fnord")) status = $lt_dlno_uscore; ! else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; ! /* dlclose (self); */ ! } ! ! exit (status); ! } EOF ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then ! (./conftest; exit; ) 2>/dev/null ! lt_status=$? ! case x$lt_status in ! x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; ! x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; ! x$lt_unknown|x*) lt_cv_dlopen_self=no ;; ! esac ! else : ! # compilation failed ! lt_cv_dlopen_self=no ! fi ! fi ! rm -fr conftest* ! ! ! fi ! echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 ! echo "${ECHO_T}$lt_cv_dlopen_self" >&6 ! ! if test "x$lt_cv_dlopen_self" = xyes; then ! LDFLAGS="$LDFLAGS $link_static_flag" ! echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 ! echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 ! if test "${lt_cv_dlopen_self_static+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! if test "$cross_compiling" = yes; then : ! lt_cv_dlopen_self_static=cross ! else ! lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 ! lt_status=$lt_dlunknown ! cat > conftest.$ac_ext < ! #endif ! ! #include ! ! #ifdef RTLD_GLOBAL ! # define LT_DLGLOBAL RTLD_GLOBAL ! #else ! # ifdef DL_GLOBAL ! # define LT_DLGLOBAL DL_GLOBAL ! # else ! # define LT_DLGLOBAL 0 ! # endif ! #endif ! ! /* We may have to define LT_DLLAZY_OR_NOW in the command line if we ! find out it does not work in some platform. */ ! #ifndef LT_DLLAZY_OR_NOW ! # ifdef RTLD_LAZY ! # define LT_DLLAZY_OR_NOW RTLD_LAZY ! # else ! # ifdef DL_LAZY ! # define LT_DLLAZY_OR_NOW DL_LAZY ! # else ! # ifdef RTLD_NOW ! # define LT_DLLAZY_OR_NOW RTLD_NOW ! # else ! # ifdef DL_NOW ! # define LT_DLLAZY_OR_NOW DL_NOW ! # else ! # define LT_DLLAZY_OR_NOW 0 ! # endif ! # endif ! # endif ! # endif ! #endif ! ! #ifdef __cplusplus ! extern "C" void exit (int); ! #endif ! ! void fnord() { int i=42;} ! int main () ! { ! void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); ! int status = $lt_dlunknown; ! ! if (self) ! { ! if (dlsym (self,"fnord")) status = $lt_dlno_uscore; ! else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; ! /* dlclose (self); */ ! } ! ! exit (status); ! } ! EOF ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then ! (./conftest; exit; ) 2>/dev/null ! lt_status=$? ! case x$lt_status in ! x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; ! x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; ! x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; ! esac ! else : ! # compilation failed ! lt_cv_dlopen_self_static=no ! fi fi ! rm -fr conftest* ! fi + echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 + echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 + fi ! CPPFLAGS="$save_CPPFLAGS" ! LDFLAGS="$save_LDFLAGS" ! LIBS="$save_LIBS" ! ;; ! esac ! ! case $lt_cv_dlopen_self in ! yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; ! *) enable_dlopen_self=unknown ;; ! esac ! ! case $lt_cv_dlopen_self_static in ! yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; ! *) enable_dlopen_self_static=unknown ;; ! esac ! fi ! ! ! # Report which librarie types wil actually be built ! echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 ! echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 ! echo "$as_me:$LINENO: result: $can_build_shared" >&5 ! echo "${ECHO_T}$can_build_shared" >&6 ! ! echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 ! echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 ! test "$can_build_shared" = "no" && enable_shared=no ! ! # On AIX, shared libraries and static libraries use the same namespace, and ! # are all built from PIC. ! case "$host_os" in ! aix3*) ! test "$enable_shared" = yes && enable_static=no ! if test -n "$RANLIB"; then ! archive_cmds="$archive_cmds~\$RANLIB \$lib" ! postinstall_cmds='$RANLIB $lib' fi ;; ! aix4*) ! if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then ! test "$enable_shared" = yes && enable_static=no ! fi ! ;; ! darwin* | rhapsody*) ! if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then ! archive_cmds_need_lc=no ! case "$host_os" in ! rhapsody* | darwin1.[012]) ! allow_undefined_flag='-undefined suppress' ! ;; ! *) # Darwin 1.3 on ! test -z ${LD_TWOLEVEL_NAMESPACE} && allow_undefined_flag='-flat_namespace -undefined suppress' ! ;; ! esac ! # FIXME: Relying on posixy $() will cause problems for ! # cross-compilation, but unfortunately the echo tests do not ! # yet detect zsh echo's removal of \ escapes. Also zsh mangles ! # `"' quotes if we put them in here... so don't! ! output_verbose_link_cmd='echo' ! archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring' ! module_cmds='$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' ! # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's ! archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ! module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ! hardcode_direct=no ! hardcode_automatic=yes ! hardcode_shlibpath_var=unsupported ! whole_archive_flag_spec='-all_load $convenience' ! link_all_deplibs=yes fi + ;; + esac + echo "$as_me:$LINENO: result: $enable_shared" >&5 + echo "${ECHO_T}$enable_shared" >&6 + + echo "$as_me:$LINENO: checking whether to build static libraries" >&5 + echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + echo "$as_me:$LINENO: result: $enable_static" >&5 + echo "${ECHO_T}$enable_static" >&6 + + # The else clause should only fire when bootstrapping the + # libtool distribution, otherwise you forgot to ship ltmain.sh + # with your package, and you will get complaints that there are + # no rules to generate ltmain.sh. + if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler \ + CC \ + LD \ + lt_prog_compiler_wl \ + lt_prog_compiler_pic \ + lt_prog_compiler_static \ + lt_prog_compiler_no_builtin_flag \ + export_dynamic_flag_spec \ + thread_safe_flag_spec \ + whole_archive_flag_spec \ + enable_shared_with_static_runtimes \ + old_archive_cmds \ + old_archive_from_new_cmds \ + predep_objects \ + postdep_objects \ + predeps \ + postdeps \ + compiler_lib_search_path \ + archive_cmds \ + archive_expsym_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + old_archive_from_expsyms_cmds \ + allow_undefined_flag \ + no_undefined_flag \ + export_symbols_cmds \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ + hardcode_automatic \ + module_cmds \ + module_expsym_cmds \ + lt_cv_prog_compiler_c_o \ + exclude_expsyms \ + include_expsyms; do + + case $var in + old_archive_cmds | \ + old_archive_from_new_cmds | \ + archive_cmds | \ + archive_expsym_cmds | \ + module_cmds | \ + module_expsym_cmds | \ + old_archive_from_expsyms_cmds | \ + export_symbols_cmds | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac done ! ! case $lt_echo in ! *'\$0 --fallback-echo"') ! lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ! ;; ! esac ! ! cfgfile="${ofile}T" ! trap "$rm \"$cfgfile\"; exit 1" 1 2 15 ! $rm -f "$cfgfile" ! { echo "$as_me:$LINENO: creating $ofile" >&5 ! echo "$as_me: creating $ofile" >&6;} ! ! cat <<__EOF__ >> "$cfgfile" ! #! $SHELL ! ! # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. ! # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) ! # NOTE: Changes made to this file will be lost: look at ltmain.sh. ! # ! # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 ! # Free Software Foundation, Inc. ! # ! # This file is part of GNU Libtool: ! # Originally by Gordon Matzigkeit , 1996 ! # ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2 of the License, or ! # (at your option) any later version. ! # ! # This program is distributed in the hope that it will be useful, but ! # WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! # General Public License for more details. ! # ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! # ! # As a special exception to the GNU General Public License, if you ! # distribute this file as part of a program that contains a ! # configuration script generated by Autoconf, you may include it under ! # the same distribution terms that you use for the rest of that program. ! ! # A sed program that does not truncate output. ! SED=$lt_SED ! ! # Sed that helps us avoid accidentally triggering echo(1) options like -n. ! Xsed="$SED -e s/^X//" ! ! # The HP-UX ksh and POSIX shell print the target directory to stdout ! # if CDPATH is set. ! if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi ! ! # The names of the tagged configurations supported by this script. ! available_tags= ! ! # ### BEGIN LIBTOOL CONFIG ! ! # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: ! ! # Shell to use when invoking shell scripts. ! SHELL=$lt_SHELL ! ! # Whether or not to build shared libraries. ! build_libtool_libs=$enable_shared ! ! # Whether or not to build static libraries. ! build_old_libs=$enable_static ! ! # Whether or not to add -lc for building shared libraries. ! build_libtool_need_lc=$archive_cmds_need_lc ! ! # Whether or not to disallow shared libs when runtime libs are static ! allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes ! ! # Whether or not to optimize for fast installation. ! fast_install=$enable_fast_install ! ! # The host system. ! host_alias=$host_alias ! host=$host ! ! # An echo program that does not interpret backslashes. ! echo=$lt_echo ! ! # The archiver. ! AR=$lt_AR ! AR_FLAGS=$lt_AR_FLAGS ! ! # A C compiler. ! LTCC=$lt_LTCC ! ! # A language-specific compiler. ! CC=$lt_compiler ! ! # Is the compiler the GNU C compiler? ! with_gcc=$GCC ! ! # An ERE matcher. ! EGREP=$lt_EGREP ! ! # The linker used to build libraries. ! LD=$lt_LD ! ! # Whether we need hard or soft links. ! LN_S=$lt_LN_S ! ! # A BSD-compatible nm program. ! NM=$lt_NM ! ! # A symbol stripping program ! STRIP=$STRIP ! ! # Used to examine libraries when file_magic_cmd begins "file" ! MAGIC_CMD=$MAGIC_CMD ! ! # Used on cygwin: DLL creation program. ! DLLTOOL="$DLLTOOL" ! ! # Used on cygwin: object dumper. ! OBJDUMP="$OBJDUMP" ! ! # Used on cygwin: assembler. ! AS="$AS" ! ! # The name of the directory that contains temporary libtool files. ! objdir=$objdir ! ! # How to create reloadable object files. ! reload_flag=$lt_reload_flag ! reload_cmds=$lt_reload_cmds ! ! # How to pass a linker flag through the compiler. ! wl=$lt_lt_prog_compiler_wl ! ! # Object file suffix (normally "o"). ! objext="$ac_objext" ! ! # Old archive suffix (normally "a"). ! libext="$libext" ! ! # Shared library suffix (normally ".so"). ! shrext='$shrext' ! ! # Executable file suffix (normally ""). ! exeext="$exeext" ! ! # Additional compiler flags for building library objects. ! pic_flag=$lt_lt_prog_compiler_pic ! pic_mode=$pic_mode ! ! # What is the maximum length of a command? ! max_cmd_len=$lt_cv_sys_max_cmd_len ! ! # Does compiler simultaneously support -c and -o options? ! compiler_c_o=$lt_lt_cv_prog_compiler_c_o ! ! # Must we lock files when doing compilation ? ! need_locks=$lt_need_locks ! ! # Do we need the lib prefix for modules? ! need_lib_prefix=$need_lib_prefix ! ! # Do we need a version for libraries? ! need_version=$need_version ! ! # Whether dlopen is supported. ! dlopen_support=$enable_dlopen ! ! # Whether dlopen of programs is supported. ! dlopen_self=$enable_dlopen_self ! ! # Whether dlopen of statically linked programs is supported. ! dlopen_self_static=$enable_dlopen_self_static ! ! # Compiler flag to prevent dynamic linking. ! link_static_flag=$lt_lt_prog_compiler_static ! ! # Compiler flag to turn off builtin functions. ! no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag ! ! # Compiler flag to allow reflexive dlopens. ! export_dynamic_flag_spec=$lt_export_dynamic_flag_spec ! ! # Compiler flag to generate shared objects directly from archives. ! whole_archive_flag_spec=$lt_whole_archive_flag_spec ! ! # Compiler flag to generate thread-safe objects. ! thread_safe_flag_spec=$lt_thread_safe_flag_spec ! ! # Library versioning type. ! version_type=$version_type ! ! # Format of library name prefix. ! libname_spec=$lt_libname_spec ! ! # List of archive names. First name is the real one, the rest are links. ! # The last name is the one that the linker finds with -lNAME. ! library_names_spec=$lt_library_names_spec ! ! # The coded name of the library, if different from the real name. ! soname_spec=$lt_soname_spec ! ! # Commands used to build and install an old-style archive. ! RANLIB=$lt_RANLIB ! old_archive_cmds=$lt_old_archive_cmds ! old_postinstall_cmds=$lt_old_postinstall_cmds ! old_postuninstall_cmds=$lt_old_postuninstall_cmds ! ! # Create an old-style archive from a shared archive. ! old_archive_from_new_cmds=$lt_old_archive_from_new_cmds ! ! # Create a temporary old-style archive to link instead of a shared archive. ! old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds ! ! # Commands used to build and install a shared archive. ! archive_cmds=$lt_archive_cmds ! archive_expsym_cmds=$lt_archive_expsym_cmds ! postinstall_cmds=$lt_postinstall_cmds ! postuninstall_cmds=$lt_postuninstall_cmds ! ! # Commands used to build a loadable module (assumed same as above if empty) ! module_cmds=$lt_module_cmds ! module_expsym_cmds=$lt_module_expsym_cmds ! ! # Commands to strip libraries. ! old_striplib=$lt_old_striplib ! striplib=$lt_striplib ! ! # Dependencies to place before the objects being linked to create a ! # shared library. ! predep_objects=$lt_predep_objects ! ! # Dependencies to place after the objects being linked to create a ! # shared library. ! postdep_objects=$lt_postdep_objects ! ! # Dependencies to place before the objects being linked to create a ! # shared library. ! predeps=$lt_predeps ! ! # Dependencies to place after the objects being linked to create a ! # shared library. ! postdeps=$lt_postdeps ! ! # The library search path used internally by the compiler when linking ! # a shared library. ! compiler_lib_search_path=$lt_compiler_lib_search_path ! ! # Method to check whether dependent libraries are shared objects. ! deplibs_check_method=$lt_deplibs_check_method ! ! # Command to use when deplibs_check_method == file_magic. ! file_magic_cmd=$lt_file_magic_cmd ! ! # Flag that allows shared libraries with undefined symbols to be built. ! allow_undefined_flag=$lt_allow_undefined_flag ! ! # Flag that forces no undefined symbols. ! no_undefined_flag=$lt_no_undefined_flag ! ! # Commands used to finish a libtool library installation in a directory. ! finish_cmds=$lt_finish_cmds ! ! # Same as above, but a single script fragment to be evaled but not shown. ! finish_eval=$lt_finish_eval ! ! # Take the output of nm and produce a listing of raw symbols and C names. ! global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe ! ! # Transform the output of nm in a proper C declaration ! global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl ! ! # Transform the output of nm in a C name address pair ! global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address ! ! # This is the shared library runtime path variable. ! runpath_var=$runpath_var ! ! # This is the shared library path variable. ! shlibpath_var=$shlibpath_var ! ! # Is shlibpath searched before the hard-coded library search path? ! shlibpath_overrides_runpath=$shlibpath_overrides_runpath ! ! # How to hardcode a shared library path into an executable. ! hardcode_action=$hardcode_action ! ! # Whether we should hardcode library paths into libraries. ! hardcode_into_libs=$hardcode_into_libs ! ! # Flag to hardcode \$libdir into a binary during linking. ! # This must work even if \$libdir does not exist. ! hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec ! ! # If ld is used when linking, flag to hardcode \$libdir into ! # a binary during linking. This must work even if \$libdir does ! # not exist. ! hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld ! ! # Whether we need a single -rpath flag with a separated argument. ! hardcode_libdir_separator=$lt_hardcode_libdir_separator ! ! # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the ! # resulting binary. ! hardcode_direct=$hardcode_direct ! ! # Set to yes if using the -LDIR flag during linking hardcodes DIR into the ! # resulting binary. ! hardcode_minus_L=$hardcode_minus_L ! ! # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into ! # the resulting binary. ! hardcode_shlibpath_var=$hardcode_shlibpath_var ! ! # Set to yes if building a shared library automatically hardcodes DIR into the library ! # and all subsequent libraries and executables linked against it. ! hardcode_automatic=$hardcode_automatic ! ! # Variables whose values should be saved in libtool wrapper scripts and ! # restored at relink time. ! variables_saved_for_relink="$variables_saved_for_relink" ! ! # Whether libtool must link a program against all its dependency libraries. ! link_all_deplibs=$link_all_deplibs ! ! # Compile-time system search path for libraries ! sys_lib_search_path_spec=$lt_sys_lib_search_path_spec ! ! # Run-time system search path for libraries ! sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec ! ! # Fix the shell variable \$srcfile for the compiler. ! fix_srcfile_path="$fix_srcfile_path" ! ! # Set to yes if exported symbols are required. ! always_export_symbols=$always_export_symbols ! ! # The commands to list exported symbols. ! export_symbols_cmds=$lt_export_symbols_cmds ! ! # The commands to extract the exported symbol list from a shared archive. ! extract_expsyms_cmds=$lt_extract_expsyms_cmds ! ! # Symbols that should not be listed in the preloaded symbols. ! exclude_expsyms=$lt_exclude_expsyms ! ! # Symbols that must always be exported. ! include_expsyms=$lt_include_expsyms ! ! # ### END LIBTOOL CONFIG ! ! __EOF__ ! ! ! case $host_os in ! aix3*) ! cat <<\EOF >> "$cfgfile" ! ! # AIX sometimes has problems with the GCC collect2 program. For some ! # reason, if we set the COLLECT_NAMES environment variable, the problems ! # vanish in a puff of smoke. ! if test "X${COLLECT_NAMES+set}" != Xset; then ! COLLECT_NAMES= ! export COLLECT_NAMES fi + EOF + ;; + esac + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + + else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + test -f Makefile && make "$ltmain" fi ! ! ! ac_ext=c ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ! ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_c_compiler_gnu ! ! CC="$lt_save_CC" ! ! ! # Check whether --with-tags or --without-tags was given. ! if test "${with_tags+set}" = set; then ! withval="$with_tags" ! tagnames="$withval" ! fi; ! ! if test -f "$ltmain" && test -n "$tagnames"; then ! if test ! -f "${ofile}"; then ! { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 ! echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} ! fi ! ! if test -z "$LTCC"; then ! eval "`$SHELL ${ofile} --config | grep '^LTCC='`" ! if test -z "$LTCC"; then ! { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 ! echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} ! else ! { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 ! echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} ! fi ! fi ! ! # Extract list of available tagged configurations in $ofile. ! # Note that this assumes the entire list is on one line. ! available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` ! ! lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," ! for tagname in $tagnames; do ! IFS="$lt_save_ifs" ! # Check whether tagname contains only valid characters ! case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in ! "") ;; ! *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 ! echo "$as_me: error: invalid tag name: $tagname" >&2;} ! { (exit 1); exit 1; }; } ! ;; ! esac ! ! if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null ! then ! { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 ! echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} ! { (exit 1); exit 1; }; } ! fi ! ! # Update the list of available tags. ! if test -n "$tagname"; then ! echo appending configuration tag \"$tagname\" to $ofile ! ! case $tagname in ! CXX) ! if test -n "$CXX" && test "X$CXX" != "Xno"; then ! ac_ext=cc ! ac_cpp='$CXXCPP $CPPFLAGS' ! ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ! ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ! ! ! ! ! archive_cmds_need_lc_CXX=no ! allow_undefined_flag_CXX= ! always_export_symbols_CXX=no ! archive_expsym_cmds_CXX= ! export_dynamic_flag_spec_CXX= ! hardcode_direct_CXX=no ! hardcode_libdir_flag_spec_CXX= ! hardcode_libdir_flag_spec_ld_CXX= ! hardcode_libdir_separator_CXX= ! hardcode_minus_L_CXX=no ! hardcode_automatic_CXX=no ! module_cmds_CXX= ! module_expsym_cmds_CXX= ! link_all_deplibs_CXX=unknown ! old_archive_cmds_CXX=$old_archive_cmds ! no_undefined_flag_CXX= ! whole_archive_flag_spec_CXX= ! enable_shared_with_static_runtimes_CXX=no ! ! # Dependencies to place before and after the object being linked: ! predep_objects_CXX= ! postdep_objects_CXX= ! predeps_CXX= ! postdeps_CXX= ! compiler_lib_search_path_CXX= ! ! # Source file extension for C++ test sources. ! ac_ext=cc ! ! # Object file extension for compiled C++ test sources. ! objext=o ! objext_CXX=$objext ! ! # Code to be used in simple compile tests ! lt_simple_compile_test_code="int some_variable = 0;\n" ! ! # Code to be used in simple link tests ! lt_simple_link_test_code='int main(int, char *) { return(0); }\n' ! ! # ltmain only uses $CC for tagged configurations so make sure $CC is set. ! ! # If no C compiler was specified, use CC. ! LTCC=${LTCC-"$CC"} ! ! # Allow CC to be a program name with arguments. ! compiler=$CC ! ! ! # Allow CC to be a program name with arguments. ! lt_save_CC=$CC ! lt_save_LD=$LD ! lt_save_GCC=$GCC ! GCC=$GXX ! lt_save_with_gnu_ld=$with_gnu_ld ! lt_save_path_LD=$lt_cv_path_LD ! if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then ! lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else ! unset lt_cv_prog_gnu_ld ! fi ! if test -n "${lt_cv_path_LDCXX+set}"; then ! lt_cv_path_LD=$lt_cv_path_LDCXX ! else ! unset lt_cv_path_LD fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + compiler=$CC + compiler_CXX=$CC + cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` + # We don't want -fno-exception wen compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' + else + lt_prog_compiler_no_builtin_flag_CXX= + fi ! if test "$GXX" = yes; then ! # Set up default GNU C++ configuration ! ! ! # Check whether --with-gnu-ld or --without-gnu-ld was given. ! if test "${with_gnu_ld+set}" = set; then ! withval="$with_gnu_ld" ! test "$withval" = no || with_gnu_ld=yes else ! with_gnu_ld=no ! fi; ! ac_prog=ld ! if test "$GCC" = yes; then ! # Check if gcc -print-prog-name=ld gives a path. ! echo "$as_me:$LINENO: checking for ld used by $CC" >&5 ! echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 ! case $host in ! *-*-mingw*) ! # gcc leaves a trailing carriage return which upsets mingw ! ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; ! *) ! ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; ! esac ! case $ac_prog in ! # Accept absolute paths. ! [\\/]* | ?:[\\/]*) ! re_direlt='/[^/][^/]*/\.\./' ! # Canonicalize the path of ld ! ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` ! while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ! ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` ! done ! test -z "$LD" && LD="$ac_prog" ! ;; ! "") ! # If it fails, then pretend we aren't using GCC. ! ac_prog=ld ! ;; ! *) ! # If it is relative, then search for the first ld in PATH. ! with_gnu_ld=unknown ! ;; ! esac ! elif test "$with_gnu_ld" = yes; then ! echo "$as_me:$LINENO: checking for GNU ld" >&5 ! echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else ! echo "$as_me:$LINENO: checking for non-GNU ld" >&5 ! echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 ! fi ! if test "${lt_cv_path_LD+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if test -z "$LD"; then ! lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ! for ac_dir in $PATH; do ! IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. ! if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then ! lt_cv_path_LD="$ac_dir/$ac_prog" ! # Check to see if the program is GNU ld. I'd rather use --version, ! # but apparently some GNU ld's only accept -v. ! # Break only if it was the GNU/non-GNU ld that we prefer. ! case `"$lt_cv_path_LD" -v 2>&1 &5 ! echo "${ECHO_T}$LD" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi ! test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 ! echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} ! { (exit 1); exit 1; }; } ! echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 ! echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 ! if test "${lt_cv_prog_gnu_ld+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! # I'd rather use --version here, but apparently some GNU ld's only accept -v. ! case `"$LD" -v 2>&1 &5 + echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 + with_gnu_ld=$lt_cv_prog_gnu_ld + + + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ + grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= fi ! # PORTME: fill in a description of your system's C++ link characteristics ! echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 ! echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 ! ld_shlibs_CXX=yes ! case $host_os in ! aix3*) ! # FIXME: insert proper C++ library support ! ld_shlibs_CXX=no ! ;; ! aix4* | aix5*) ! if test "$host_cpu" = ia64; then ! # On IA64, the linker does run time linking by default, so we don't ! # have to do anything special. ! aix_use_runtimelinking=no ! exp_sym_flag='-Bexport' ! no_entry_flag="" ! else ! aix_use_runtimelinking=no ! ! # Test if we are trying to use run time linking or normal ! # AIX style linking. If -brtl is somewhere in LDFLAGS, we ! # need to do runtime linking. ! case $host_os in aix4.[23]|aix4.[23].*|aix5*) ! for ld_flag in $LDFLAGS; do ! case $ld_flag in ! *-brtl*) ! aix_use_runtimelinking=yes ! break ! ;; ! esac ! done ! esac ! ! exp_sym_flag='-bexport' ! no_entry_flag='-bnoentry' ! fi ! ! # When large executables or shared objects are built, AIX ld can ! # have problems creating the table of contents. If linking a library ! # or program results in "error TOC overflow" add -mminimal-toc to ! # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not ! # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. ! ! archive_cmds_CXX='' ! hardcode_direct_CXX=yes ! hardcode_libdir_separator_CXX=':' ! link_all_deplibs_CXX=yes ! ! if test "$GXX" = yes; then ! case $host_os in aix4.012|aix4.012.*) ! # We only want to do this on AIX 4.2 and lower, the check ! # below for broken collect2 doesn't work under 4.3+ ! collect2name=`${CC} -print-prog-name=collect2` ! if test -f "$collect2name" && \ ! strings "$collect2name" | grep resolve_lib_name >/dev/null ! then ! # We have reworked collect2 ! hardcode_direct_CXX=yes ! else ! # We have old collect2 ! hardcode_direct_CXX=unsupported ! # It fails to find uninstalled libraries when the uninstalled ! # path is not listed in the libpath. Setting hardcode_minus_L ! # to unsupported forces relinking ! hardcode_minus_L_CXX=yes ! hardcode_libdir_flag_spec_CXX='-L$libdir' ! hardcode_libdir_separator_CXX= ! fi ! esac ! shared_flag='-shared' ! else ! # not using gcc ! if test "$host_cpu" = ia64; then ! # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release ! # chokes on -Wl,-G. The following line is correct: ! shared_flag='-G' ! else ! if test "$aix_use_runtimelinking" = yes; then ! shared_flag='${wl}-G' ! else ! shared_flag='${wl}-bM:SRE' ! fi ! fi ! fi ! ! # It seems that -bexpall does not export symbols beginning with ! # underscore (_), so it is better to generate a list of symbols to export. ! always_export_symbols_CXX=yes ! if test "$aix_use_runtimelinking" = yes; then ! # Warning - without using the other runtime loading flags (-brtl), ! # -berok will link without error, but may produce a broken library. ! allow_undefined_flag_CXX='-berok' ! # Determine the default libpath from the value encoded in an empty executable. ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! int ! main () ! { ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ! aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } ! }'` ! # Check for a 64-bit object if we didn't find anything. ! if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } ! }'`; fi else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ! ! hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" ! ! archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" ! else ! if test "$host_cpu" = ia64; then ! hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' ! allow_undefined_flag_CXX="-z nodefs" ! archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" ! else ! # Determine the default libpath from the value encoded in an empty executable. ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! int ! main () ! { ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ! aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } ! }'` ! # Check for a 64-bit object if we didn't find anything. ! if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } ! }'`; fi else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ! ! hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" ! # Warning - without using the other run time loading flags, ! # -berok will link without error, but may produce a broken library. ! no_undefined_flag_CXX=' ${wl}-bernotok' ! allow_undefined_flag_CXX=' ${wl}-berok' ! # -bexpall does not export symbols beginning with underscore (_) ! always_export_symbols_CXX=yes ! # Exported symbols can be pulled into shared objects from archives ! whole_archive_flag_spec_CXX=' ' ! archive_cmds_need_lc_CXX=yes ! # This is similar to how AIX traditionally builds it's shared libraries. ! archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' ! fi ! fi ! ;; ! chorus*) ! case $cc_basename in ! *) ! # FIXME: insert proper C++ library support ! ld_shlibs_CXX=no ! ;; ! esac ! ;; ! ! cygwin* | mingw* | pw32*) ! # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, ! # as there is no search path for DLLs. ! hardcode_libdir_flag_spec_CXX='-L$libdir' ! allow_undefined_flag_CXX=unsupported ! always_export_symbols_CXX=no ! enable_shared_with_static_runtimes_CXX=yes ! ! if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then ! archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' ! # If the export-symbols file already is a .def file (1st line ! # is EXPORTS), use it as is; otherwise, prepend... ! archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ! cp $export_symbols $output_objdir/$soname.def; ! else ! echo EXPORTS > $output_objdir/$soname.def; ! cat $export_symbols >> $output_objdir/$soname.def; ! fi~ ! $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' ! else ! ld_shlibs_CXX=no ! fi ! ;; ! ! darwin* | rhapsody*) ! if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then ! archive_cmds_need_lc_CXX=no ! case "$host_os" in ! rhapsody* | darwin1.[012]) ! allow_undefined_flag_CXX='-undefined suppress' ! ;; ! *) # Darwin 1.3 on ! test -z ${LD_TWOLEVEL_NAMESPACE} && allow_undefined_flag_CXX='-flat_namespace -undefined suppress' ! ;; ! esac ! lt_int_apple_cc_single_mod=no ! output_verbose_link_cmd='echo' ! if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then ! lt_int_apple_cc_single_mod=yes ! fi ! if test "X$lt_int_apple_cc_single_mod" = Xyes ; then ! archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' ! else ! archive_cmds_CXX='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' ! fi ! module_cmds_CXX='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' ! ! # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's ! if test "X$lt_int_apple_cc_single_mod" = Xyes ; then ! archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ! else ! archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ! fi ! module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ! hardcode_direct_CXX=no ! hardcode_automatic_CXX=yes ! hardcode_shlibpath_var_CXX=unsupported ! whole_archive_flag_spec_CXX='-all_load $convenience' ! link_all_deplibs_CXX=yes ! fi ! ;; ! ! dgux*) ! case $cc_basename in ! ec++) ! # FIXME: insert proper C++ library support ! ld_shlibs_CXX=no ! ;; ! ghcx) ! # Green Hills C++ Compiler ! # FIXME: insert proper C++ library support ! ld_shlibs_CXX=no ! ;; ! *) ! # FIXME: insert proper C++ library support ! ld_shlibs_CXX=no ! ;; ! esac ! ;; ! freebsd12*) ! # C++ shared libraries reported to be fairly broken before switch to ELF ! ld_shlibs_CXX=no ! ;; ! freebsd-elf*) ! archive_cmds_need_lc_CXX=no ! ;; ! freebsd*) ! # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF ! # conventions ! ld_shlibs_CXX=yes ! ;; ! gnu*) ! ;; ! hpux9*) ! hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' ! hardcode_libdir_separator_CXX=: ! export_dynamic_flag_spec_CXX='${wl}-E' ! hardcode_direct_CXX=yes ! hardcode_minus_L_CXX=yes # Not in the search PATH, ! # but as the default ! # location of the library. ! ! case $cc_basename in ! CC) ! # FIXME: insert proper C++ library support ! ld_shlibs_CXX=no ! ;; ! aCC) ! archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ! # Commands to make compiler produce verbose output that lists ! # what "hidden" libraries, object files and flags are used when ! # linking a shared library. ! # ! # There doesn't appear to be a way to prevent this compiler from ! # explicitly linking system object files so we need to strip them ! # from the output so that they don't get included in the library ! # dependencies. ! output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ! ;; ! *) ! if test "$GXX" = yes; then ! archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ! else ! # FIXME: insert proper C++ library support ! ld_shlibs_CXX=no ! fi ! ;; ! esac ! ;; ! hpux10*|hpux11*) ! if test $with_gnu_ld = no; then ! case "$host_cpu" in ! hppa*64*) ! hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' ! hardcode_libdir_flag_spec_ld_CXX='+b $libdir' ! hardcode_libdir_separator_CXX=: ! ;; ! ia64*) ! hardcode_libdir_flag_spec_CXX='-L$libdir' ! ;; ! *) ! hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' ! hardcode_libdir_separator_CXX=: ! export_dynamic_flag_spec_CXX='${wl}-E' ! ;; ! esac ! fi ! case "$host_cpu" in ! hppa*64*) ! hardcode_direct_CXX=no ! hardcode_shlibpath_var_CXX=no ! ;; ! ia64*) ! hardcode_direct_CXX=no ! hardcode_shlibpath_var_CXX=no ! hardcode_minus_L_CXX=yes # Not in the search PATH, ! # but as the default ! # location of the library. ! ;; ! *) ! hardcode_direct_CXX=yes ! hardcode_minus_L_CXX=yes # Not in the search PATH, ! # but as the default ! # location of the library. ! ;; ! esac ! ! case $cc_basename in ! CC) ! # FIXME: insert proper C++ library support ! ld_shlibs_CXX=no ! ;; ! aCC) ! case "$host_cpu" in ! hppa*64*|ia64*) ! archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ! ;; ! *) ! archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ! ;; ! esac ! # Commands to make compiler produce verbose output that lists ! # what "hidden" libraries, object files and flags are used when ! # linking a shared library. ! # ! # There doesn't appear to be a way to prevent this compiler from ! # explicitly linking system object files so we need to strip them ! # from the output so that they don't get included in the library ! # dependencies. ! output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ! ;; ! *) ! if test "$GXX" = yes; then ! if test $with_gnu_ld = no; then ! case "$host_cpu" in ! ia64*|hppa*64*) ! archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ! ;; ! *) ! archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ! ;; ! esac ! fi ! else ! # FIXME: insert proper C++ library support ! ld_shlibs_CXX=no ! fi ! ;; ! esac ! ;; ! irix5* | irix6*) ! case $cc_basename in ! CC) ! # SGI C++ ! archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' ! ! # Archives containing C++ object files must be created using ! # "CC -ar", where "CC" is the IRIX C++ compiler. This is ! # necessary to make sure instantiated templates are included ! # in the archive. ! old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ! ;; ! *) ! if test "$GXX" = yes; then ! if test "$with_gnu_ld" = no; then ! archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' ! else ! archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' ! fi ! fi ! link_all_deplibs_CXX=yes ! ;; ! esac ! hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ! hardcode_libdir_separator_CXX=: ! ;; ! linux*) ! case $cc_basename in ! KCC) ! # Kuck and Associates, Inc. (KAI) C++ Compiler ! ! # KCC will only create a shared library if the output file ! # ends with ".so" (or ".sl" for HP-UX), so rename the library ! # to its proper name (with version) after linking. ! archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' ! archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' ! # Commands to make compiler produce verbose output that lists ! # what "hidden" libraries, object files and flags are used when ! # linking a shared library. ! # ! # There doesn't appear to be a way to prevent this compiler from ! # explicitly linking system object files so we need to strip them ! # from the output so that they don't get included in the library ! # dependencies. ! output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ! ! hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' ! export_dynamic_flag_spec_CXX='${wl}--export-dynamic' ! ! # Archives containing C++ object files must be created using ! # "CC -Bstatic", where "CC" is the KAI C++ compiler. ! old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ! ;; ! icpc) ! # Intel C++ ! with_gnu_ld=yes ! archive_cmds_need_lc_CXX=no ! archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' ! archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ! hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' ! export_dynamic_flag_spec_CXX='${wl}--export-dynamic' ! whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ! ;; ! cxx) ! # Compaq C++ ! archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' ! archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' ! ! runpath_var=LD_RUN_PATH ! hardcode_libdir_flag_spec_CXX='-rpath $libdir' ! hardcode_libdir_separator_CXX=: ! ! # Commands to make compiler produce verbose output that lists ! # what "hidden" libraries, object files and flags are used when ! # linking a shared library. ! # ! # There doesn't appear to be a way to prevent this compiler from ! # explicitly linking system object files so we need to strip them ! # from the output so that they don't get included in the library ! # dependencies. ! output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ! ;; ! esac ! ;; ! lynxos*) ! # FIXME: insert proper C++ library support ! ld_shlibs_CXX=no ! ;; ! m88k*) ! # FIXME: insert proper C++ library support ! ld_shlibs_CXX=no ! ;; ! mvs*) ! case $cc_basename in ! cxx) ! # FIXME: insert proper C++ library support ! ld_shlibs_CXX=no ! ;; ! *) ! # FIXME: insert proper C++ library support ! ld_shlibs_CXX=no ! ;; ! esac ! ;; ! netbsd*) ! if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then ! archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' ! wlarc= ! hardcode_libdir_flag_spec_CXX='-R$libdir' ! hardcode_direct_CXX=yes ! hardcode_shlibpath_var_CXX=no fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + osf3*) + case $cc_basename in + KCC) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx) + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' + ;; + RCC) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ + $rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + sco*) + archive_cmds_need_lc_CXX=no + case $cc_basename in + CC) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC) + # Sun C++ 4.2, 5.x and Centerline C++ + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=no + case $host_os in + solaris2.0-5 | solaris2.0-5.*) ;; + *) + # The C++ compiler is used as linker so we must use $wl + # flag to pass the commands to the underlying system + # linker. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + link_all_deplibs_CXX=yes + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[LR]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx) + # Green Hills C++ Compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + fi + ;; + esac + ;; + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) + archive_cmds_need_lc_CXX=no + ;; + tandem*) + case $cc_basename in + NCC) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 + echo "${ECHO_T}$ld_shlibs_CXX" >&6 + test "$ld_shlibs_CXX" = no && can_build_shared=no + + GCC_CXX="$GXX" + LD_CXX="$LD" + + + cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + # The `*' in the case matches for architectures that use `case' in + # $output_verbose_cmd can trigger glob expansion during the loop + # eval without this substitution. + output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" + + for p in `eval $output_verbose_link_cmd`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" \ + || test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX="${prev}${p}" + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_CXX"; then + postdeps_CXX="${prev}${p}" + else + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$predep_objects_CXX"; then + predep_objects_CXX="$p" + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX="$p" + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac done ! ! # Clean up. ! rm -f a.out a.exe ! else ! echo "libtool.m4: error: problem compiling CXX test program" fi + + $rm -f confest.$objext + + case " $postdeps_CXX " in + *" -lc "*) archive_cmds_need_lc_CXX=no ;; + esac + + lt_prog_compiler_wl_CXX= + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX= + + echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 + echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + fi + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_CXX=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" + if test "$host_cpu" != ia64; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux*) + case $cc_basename in + KCC) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + icpc) + # Intel C++ + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + cxx) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + sco*) + case $cc_basename in + CC) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + *) + ;; + esac + ;; + solaris*) + case $cc_basename in + CC) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + unixware*) + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi + + echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 + echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6 + + # + # Check to make sure the PIC flag actually works. + # + if test -n "$lt_prog_compiler_pic_CXX"; then + echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 + echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6 + if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + lt_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:11036: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:11040: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s conftest.err; then + lt_prog_compiler_pic_works_CXX=yes + fi + fi + $rm conftest* + fi ! echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 ! echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 ! ! if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then ! case $lt_prog_compiler_pic_CXX in ! "" | " "*) ;; ! *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; ! esac else ! lt_prog_compiler_pic_CXX= ! lt_prog_compiler_can_build_shared_CXX=no fi + fi + case "$host_os" in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; + esac ! echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 ! echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 ! if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! lt_cv_prog_compiler_c_o_CXX=no ! $rm -r conftest 2>/dev/null ! mkdir conftest ! cd conftest ! mkdir out ! printf "$lt_simple_compile_test_code" > conftest.$ac_ext ! ! # According to Tom Tromey, Ian Lance Taylor reported there are C compilers ! # that will create temporary files in the current directory regardless of ! # the output directory. Thus, making CWD read-only will cause this test ! # to fail, enabling locking or at least warning the user not to do parallel ! # builds. ! chmod -w . ! ! lt_compiler_flag="-o out/conftest2.$ac_objext" ! # Insert the option either (1) after the last *FLAGS variable, or ! # (2) before a word containing "conftest.", or (3) at the end. ! # Note that $ac_compile itself does not contain backslashes and begins ! # with a dollar sign (not a hyphen), so the echo should work correctly. ! lt_compile=`echo "$ac_compile" | $SED \ ! -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ ! -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ ! -e 's:$: $lt_compiler_flag:'` ! (eval echo "\"\$as_me:11103: $lt_compile\"" >&5) ! (eval "$lt_compile" 2>out/conftest.err) ! ac_status=$? ! cat out/conftest.err >&5 ! echo "$as_me:11107: \$? = $ac_status" >&5 ! if (exit $ac_status) && test -s out/conftest2.$ac_objext ! then ! # The compiler can only warn and ignore the option if not recognized ! # So say no if there are warnings ! if test ! -s out/conftest.err; then ! lt_cv_prog_compiler_c_o_CXX=yes ! fi ! fi ! chmod u+w . ! $rm conftest* out/* ! rmdir out ! cd .. ! rmdir conftest ! $rm conftest* ! ! fi ! echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 ! echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6 ! ! ! hard_links="nottested" ! if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then ! # do not overwrite the value of need_locks provided by the user ! echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 ! echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 ! hard_links=yes ! $rm conftest* ! ln conftest.a conftest.b 2>/dev/null && hard_links=no ! touch conftest.a ! ln conftest.a conftest.b 2>&5 || hard_links=no ! ln conftest.a conftest.b 2>/dev/null && hard_links=no ! echo "$as_me:$LINENO: result: $hard_links" >&5 ! echo "${ECHO_T}$hard_links" >&6 ! if test "$hard_links" = no; then ! { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 ! echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} ! need_locks=warn ! fi else ! need_locks=no ! fi ! ! echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 ! echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 ! ! export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ! case $host_os in ! aix4* | aix5*) ! # If we're using GNU nm, then we don't want the "-C" option. ! # -C means demangle to AIX nm, but means don't demangle with GNU nm ! if $NM -V 2>&1 | grep 'GNU' > /dev/null; then ! export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' ! else ! export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi ! ;; ! pw32*) ! export_symbols_cmds_CXX="$ltdll_cmds" ! ;; ! cygwin* | mingw*) ! export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' ! ;; ! *) ! export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ! ;; ! esac ! ! echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 ! echo "${ECHO_T}$ld_shlibs_CXX" >&6 ! test "$ld_shlibs_CXX" = no && can_build_shared=no ! ! variables_saved_for_relink="PATH $shlibpath_var $runpath_var" ! if test "$GCC" = yes; then ! variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" ! fi ! ! # ! # Do we need to explicitly link libc? ! # ! case "x$archive_cmds_need_lc_CXX" in ! x|xyes) ! # Assume -lc should be added ! archive_cmds_need_lc_CXX=yes ! ! if test "$enable_shared" = yes && test "$GCC" = yes; then ! case $archive_cmds_CXX in ! *'~'*) ! # FIXME: we may have to deal with multi-command sequences. ! ;; ! '$CC '*) ! # Test whether the compiler implicitly links with -lc since on some ! # systems, -lgcc has to come before -lc. If gcc already passes -lc ! # to ld, don't add -lc before -lgcc. ! echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 ! echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 ! $rm conftest* ! printf "$lt_simple_compile_test_code" > conftest.$ac_ext ! ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } 2>conftest.err; then ! soname=conftest ! lib=conftest ! libobjs=conftest.$ac_objext ! deplibs= ! wl=$lt_prog_compiler_wl_CXX ! compiler_flags=-v ! linker_flags=-v ! verstring= ! output_objdir=. ! libname=conftest ! lt_save_allow_undefined_flag=$allow_undefined_flag_CXX ! allow_undefined_flag_CXX= ! if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 ! (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } ! then ! archive_cmds_need_lc_CXX=no ! else ! archive_cmds_need_lc_CXX=yes ! fi ! allow_undefined_flag_CXX=$lt_save_allow_undefined_flag ! else ! cat conftest.err 1>&5 ! fi ! $rm conftest* ! echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 ! echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6 ! ;; ! esac ! fi ! ;; ! esac ! ! echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 ! echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 ! hardcode_action_CXX= ! if test -n "$hardcode_libdir_flag_spec_CXX" || \ ! test -n "$runpath_var CXX" || \ ! test "X$hardcode_automatic_CXX"="Xyes" ; then ! ! # We can hardcode non-existant directories. ! if test "$hardcode_direct_CXX" != no && ! # If the only mechanism to avoid hardcoding is shlibpath_var, we ! # have to relink, otherwise we might link with an installed library ! # when we should be linking with a yet-to-be-installed one ! ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && ! test "$hardcode_minus_L_CXX" != no; then ! # Linking always hardcodes the temporary library directory. ! hardcode_action_CXX=relink ! else ! # We can link without hardcoding, and we can hardcode nonexisting dirs. ! hardcode_action_CXX=immediate ! fi ! else ! # We cannot hardcode anything, or else we can only hardcode existing ! # directories. ! hardcode_action_CXX=unsupported fi + echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 + echo "${ECHO_T}$hardcode_action_CXX" >&6 + + if test "$hardcode_action_CXX" = relink; then + # Fast installation is not supported + enable_fast_install=no + elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless fi ! ! striplib= ! old_striplib= ! echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 ! echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 ! if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then ! test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" ! test -z "$striplib" && striplib="$STRIP --strip-unneeded" ! echo "$as_me:$LINENO: result: yes" >&5 ! echo "${ECHO_T}yes" >&6 else ! # FIXME - insert some real tests, host_os isn't really good enough ! case $host_os in ! darwin*) ! if test -n "$STRIP" ; then ! striplib="$STRIP -x" ! echo "$as_me:$LINENO: result: yes" >&5 ! echo "${ECHO_T}yes" >&6 ! else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! fi ! ;; ! *) ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! ;; ! esac fi + echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 + echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 + library_names_spec= + libname_spec='lib$name' + soname_spec= + shrext=".so" + postinstall_cmds= + postuninstall_cmds= + finish_cmds= + finish_eval= + shlibpath_var= + shlibpath_overrides_runpath=unknown + version_type=none + dynamic_linker="$host_os ld.so" + sys_lib_dlsearch_path_spec="/lib /usr/lib" + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi else ! sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" ! fi ! need_lib_prefix=unknown ! hardcode_into_libs=no ! ! # when you set need_version to no, make sure it does not cause -set_version ! # flags to be left without arguments ! need_version=unknown ! ! case $host_os in ! aix3*) ! version_type=linux ! library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' ! shlibpath_var=LIBPATH ! ! # AIX 3 has no versioning support, so we append a major version to the name. ! soname_spec='${libname}${release}${shared_ext}$major' ! ;; ! ! aix4* | aix5*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! hardcode_into_libs=yes ! if test "$host_cpu" = ia64; then ! # AIX 5 supports IA64 ! library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' ! shlibpath_var=LD_LIBRARY_PATH ! else ! # With GCC up to 2.95.x, collect2 would create an import file ! # for dependence libraries. The import file would start with ! # the line `#! .'. This would cause the generated library to ! # depend on `.', always an invalid library. This was fixed in ! # development snapshots of GCC prior to 3.0. ! case $host_os in ! aix4 | aix4.[01] | aix4.[01].*) ! if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' ! echo ' yes ' ! echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then ! : ! else ! can_build_shared=no ! fi ! ;; ! esac ! # AIX (on Power*) has no versioning support, so currently we can not hardcode correct ! # soname into executable. Probably we can add versioning support to ! # collect2, so additional links can be useful in future. ! if test "$aix_use_runtimelinking" = yes; then ! # If using run time linking (on AIX 4.2 or later) use lib.so ! # instead of lib.a to let people know that these are not ! # typical AIX shared libraries. ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! else ! # We preserve .a as extension for shared libraries through AIX4.2 ! # and later when we are not doing run time linking. ! library_names_spec='${libname}${release}.a $libname.a' ! soname_spec='${libname}${release}${shared_ext}$major' ! fi ! shlibpath_var=LIBPATH ! fi ! ;; ! ! amigaos*) ! library_names_spec='$libname.ixlibrary $libname.a' ! # Create ${libname}_ixlibrary.a entries in /sys/libs. ! finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' ! ;; ! ! beos*) ! library_names_spec='${libname}${shared_ext}' ! dynamic_linker="$host_os ld.so" ! shlibpath_var=LIBRARY_PATH ! ;; ! ! bsdi4*) ! version_type=linux ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' ! shlibpath_var=LD_LIBRARY_PATH ! sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" ! sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" ! # the default ld.so.conf also contains /usr/contrib/lib and ! # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow ! # libtool to hard-code these into programs ! ;; ! ! cygwin* | mingw* | pw32*) ! version_type=windows ! shrext=".dll" ! need_version=no ! need_lib_prefix=no ! ! case $GCC,$host_os in ! yes,cygwin* | yes,mingw* | yes,pw32*) ! library_names_spec='$libname.dll.a' ! # DLL is installed to $(libdir)/../bin by postinstall_cmds ! postinstall_cmds='base_file=`basename \${file}`~ ! dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ ! dldir=$destdir/`dirname \$dlpath`~ ! test -d \$dldir || mkdir -p \$dldir~ ! $install_prog $dir/$dlname \$dldir/$dlname' ! postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ! dlpath=$dir/\$dldll~ ! $rm \$dlpath' ! shlibpath_overrides_runpath=yes ! ! case $host_os in ! cygwin*) ! # Cygwin DLLs use 'cyg' prefix rather than 'lib' ! soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ! sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib" ! ;; ! mingw*) ! # MinGW DLLs use traditional 'lib' prefix ! soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ! sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` ! if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then ! # It is most probably a Windows format PATH printed by ! # mingw gcc, but we are running on Cygwin. Gcc prints its search ! # path with ; separators, and with drive letters. We can handle the ! # drive letters (cygwin fileutils understands them), so leave them, ! # especially as we might pass files found there to a mingw objdump, ! # which wouldn't understand a cygwinified path. Ahh. ! sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ! else ! sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ! fi ! ;; ! pw32*) ! # pw32 DLLs use 'pw' prefix rather than 'lib' ! library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' ! ;; ! esac ! ;; ! ! *) ! library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ! ;; ! esac ! dynamic_linker='Win32 ld.exe' ! # FIXME: first we should search . and the directory the executable is in ! shlibpath_var=PATH ! ;; ! ! darwin* | rhapsody*) ! dynamic_linker="$host_os dyld" ! version_type=darwin ! need_lib_prefix=no ! need_version=no ! # FIXME: Relying on posixy $() will cause problems for ! # cross-compilation, but unfortunately the echo tests do not ! # yet detect zsh echo's removal of \ escapes. ! library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' ! soname_spec='${libname}${release}${major}$shared_ext' ! shlibpath_overrides_runpath=yes ! shlibpath_var=DYLD_LIBRARY_PATH ! shrext='$(test .$module = .yes && echo .so || echo .dylib)' ! # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. ! if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then ! sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` ! fi ! sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ! ;; ! ! dgux*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! ;; ! ! freebsd1*) ! dynamic_linker=no ! ;; ! ! freebsd*) ! objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` ! version_type=freebsd-$objformat ! case $version_type in ! freebsd-elf*) ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' ! need_version=no ! need_lib_prefix=no ! ;; ! freebsd-*) ! library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' ! need_version=yes ! ;; ! esac ! shlibpath_var=LD_LIBRARY_PATH ! case $host_os in ! freebsd2*) ! shlibpath_overrides_runpath=yes ! ;; ! freebsd3.01* | freebsdelf3.01*) ! shlibpath_overrides_runpath=yes ! hardcode_into_libs=yes ! ;; ! *) # from 3.2 on ! shlibpath_overrides_runpath=no ! hardcode_into_libs=yes ! ;; ! esac ! ;; ! ! gnu*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! hardcode_into_libs=yes ! ;; ! ! hpux9* | hpux10* | hpux11*) ! # Give a soname corresponding to the major version so that dld.sl refuses to ! # link against other versions. ! version_type=sunos ! need_lib_prefix=no ! need_version=no ! case "$host_cpu" in ! ia64*) ! shrext='.so' ! hardcode_into_libs=yes ! dynamic_linker="$host_os dld.so" ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! if test "X$HPUX_IA64_MODE" = X32; then ! sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" ! else ! sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" ! fi ! sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ! ;; ! hppa*64*) ! shrext='.sl' ! hardcode_into_libs=yes ! dynamic_linker="$host_os dld.sl" ! shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH ! shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" ! sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ! ;; ! *) ! shrext='.sl' ! dynamic_linker="$host_os dld.sl" ! shlibpath_var=SHLIB_PATH ! shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! ;; ! esac ! # HP-UX runs *really* slowly unless shared libraries are mode 555. ! postinstall_cmds='chmod 555 $lib' ! ;; ! ! irix5* | irix6* | nonstopux*) ! case $host_os in ! nonstopux*) version_type=nonstopux ;; ! *) ! if test "$lt_cv_prog_gnu_ld" = yes; then ! version_type=linux ! else ! version_type=irix ! fi ;; ! esac ! need_lib_prefix=no ! need_version=no ! soname_spec='${libname}${release}${shared_ext}$major' ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' ! case $host_os in ! irix5* | nonstopux*) ! libsuff= shlibsuff= ! ;; ! *) ! case $LD in # libtool.m4 will add one of these switches to LD ! *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") ! libsuff= shlibsuff= libmagic=32-bit;; ! *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") ! libsuff=32 shlibsuff=N32 libmagic=N32;; ! *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") ! libsuff=64 shlibsuff=64 libmagic=64-bit;; ! *) libsuff= shlibsuff= libmagic=never-match;; ! esac ! ;; ! esac ! shlibpath_var=LD_LIBRARY${shlibsuff}_PATH ! shlibpath_overrides_runpath=no ! sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" ! sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" ! hardcode_into_libs=yes ! ;; ! ! # No shared lib support for Linux oldld, aout, or coff. ! linux*oldld* | linux*aout* | linux*coff*) ! dynamic_linker=no ! ;; ! ! # This must be Linux ELF. ! linux*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=no ! # This implies no fast_install, which is unacceptable. ! # Some rework will be needed to allow for fast_install ! # before this can be enabled. ! hardcode_into_libs=yes ! ! # We used to test for /lib/ld.so.1 and disable shared libraries on ! # powerpc, because MkLinux only supported shared libraries with the ! # GNU dynamic linker. Since this was broken with cross compilers, ! # most powerpc-linux boxes support dynamic linking these days and ! # people can always --disable-shared, the test was removed, and we ! # assume the GNU/Linux dynamic linker is in use. ! dynamic_linker='GNU/Linux ld.so' ! ;; ! ! netbsd*) ! version_type=sunos ! need_lib_prefix=no ! need_version=no ! if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' ! dynamic_linker='NetBSD (a.out) ld.so' ! else ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! dynamic_linker='NetBSD ld.elf_so' ! fi ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! hardcode_into_libs=yes ! ;; ! ! newsos6) ! version_type=linux ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! ;; ! ! nto-qnx) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! ;; ! ! openbsd*) ! version_type=sunos ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' ! shlibpath_var=LD_LIBRARY_PATH ! if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then ! case $host_os in ! openbsd2.[89] | openbsd2.[89].*) ! shlibpath_overrides_runpath=no ! ;; ! *) ! shlibpath_overrides_runpath=yes ! ;; ! esac ! else ! shlibpath_overrides_runpath=yes ! fi ! ;; ! ! os2*) ! libname_spec='$name' ! shrext=".dll" ! need_lib_prefix=no ! library_names_spec='$libname${shared_ext} $libname.a' ! dynamic_linker='OS/2 ld.exe' ! shlibpath_var=LIBPATH ! ;; ! ! osf3* | osf4* | osf5*) ! version_type=osf ! need_lib_prefix=no ! need_version=no ! soname_spec='${libname}${release}${shared_ext}$major' ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! shlibpath_var=LD_LIBRARY_PATH ! sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" ! sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ! ;; ! ! sco3.2v5*) ! version_type=osf ! soname_spec='${libname}${release}${shared_ext}$major' ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! shlibpath_var=LD_LIBRARY_PATH ! ;; ! ! solaris*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! hardcode_into_libs=yes ! # ldd complains unless libraries are executable ! postinstall_cmds='chmod +x $lib' ! ;; ! ! sunos4*) ! version_type=sunos ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' ! finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! if test "$with_gnu_ld" = yes; then ! need_lib_prefix=no ! fi ! need_version=yes ! ;; ! ! sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) ! version_type=linux ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! case $host_vendor in ! sni) ! shlibpath_overrides_runpath=no ! need_lib_prefix=no ! export_dynamic_flag_spec='${wl}-Blargedynsym' ! runpath_var=LD_RUN_PATH ! ;; ! siemens) ! need_lib_prefix=no ! ;; ! motorola) ! need_lib_prefix=no ! need_version=no ! shlibpath_overrides_runpath=no ! sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ! ;; ! esac ! ;; ! ! sysv4*MP*) ! if test -d /usr/nec ;then ! version_type=linux ! library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' ! soname_spec='$libname${shared_ext}.$major' ! shlibpath_var=LD_LIBRARY_PATH ! fi ! ;; ! ! uts4*) ! version_type=linux ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! ;; ! ! *) ! dynamic_linker=no ! ;; ! esac ! echo "$as_me:$LINENO: result: $dynamic_linker" >&5 ! echo "${ECHO_T}$dynamic_linker" >&6 ! test "$dynamic_linker" = no && can_build_shared=no ! ! if test "x$enable_dlopen" != xyes; then ! enable_dlopen=unknown ! enable_dlopen_self=unknown ! enable_dlopen_self_static=unknown ! else ! lt_cv_dlopen=no ! lt_cv_dlopen_libs= ! ! case $host_os in ! beos*) ! lt_cv_dlopen="load_add_on" ! lt_cv_dlopen_libs= ! lt_cv_dlopen_self=yes ! ;; ! ! mingw* | pw32*) ! lt_cv_dlopen="LoadLibrary" ! lt_cv_dlopen_libs= ! ;; ! ! cygwin*) ! lt_cv_dlopen="dlopen" ! lt_cv_dlopen_libs= ! ;; ! ! darwin*) ! # if libdl is installed we need to link against it ! echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 ! echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 ! if test "${ac_cv_lib_dl_dlopen+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! ac_check_lib_save_LIBS=$LIBS ! LIBS="-ldl $LIBS" ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! /* Override any gcc2 internal prototype to avoid an error. */ ! #ifdef __cplusplus ! extern "C" ! #endif ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char dlopen (); ! int ! main () ! { ! dlopen (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_lib_dl_dlopen=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_lib_dl_dlopen=no fi + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS fi + echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 + echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 + if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" + else ! lt_cv_dlopen="dyld" ! lt_cv_dlopen_libs= ! lt_cv_dlopen_self=yes ! ! fi ! ! ;; ! ! *) ! echo "$as_me:$LINENO: checking for shl_load" >&5 ! echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 ! if test "${ac_cv_func_shl_load+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char shl_load (); below. ! Prefer to if __STDC__ is defined, since ! exists even on freestanding compilers. */ ! #ifdef __STDC__ ! # include ! #else ! # include ! #endif ! /* Override any gcc2 internal prototype to avoid an error. */ ! #ifdef __cplusplus ! extern "C" ! { ! #endif ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char shl_load (); ! /* The GNU C library defines this for functions which it implements ! to always fail with ENOSYS. Some functions are actually named ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub_shl_load) || defined (__stub___shl_load) ! choke me ! #else ! char (*f) () = shl_load; ! #endif ! #ifdef __cplusplus ! } ! #endif ! ! int ! main () ! { ! return f != shl_load; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_func_shl_load=yes else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_func_shl_load=no fi + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 ! echo "${ECHO_T}$ac_cv_func_shl_load" >&6 ! if test $ac_cv_func_shl_load = yes; then ! lt_cv_dlopen="shl_load" else ! echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 ! echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 ! if test "${ac_cv_lib_dld_shl_load+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! ac_check_lib_save_LIBS=$LIBS ! LIBS="-ldld $LIBS" ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! /* Override any gcc2 internal prototype to avoid an error. */ ! #ifdef __cplusplus ! extern "C" ! #endif ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char shl_load (); ! int ! main () ! { ! shl_load (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_lib_dld_shl_load=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_lib_dld_shl_load=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! LIBS=$ac_check_lib_save_LIBS fi + echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 + echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 + if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" + else + echo "$as_me:$LINENO: checking for dlopen" >&5 + echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 + if test "${ac_cv_func_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + /* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + #ifdef __STDC__ + # include + #else + # include + #endif + /* Override any gcc2 internal prototype to avoid an error. */ + #ifdef __cplusplus + extern "C" + { + #endif + /* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + char dlopen (); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined (__stub_dlopen) || defined (__stub___dlopen) + choke me + #else + char (*f) () = dlopen; + #endif + #ifdef __cplusplus + } + #endif + int + main () + { + return f != dlopen; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_dlopen=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_func_dlopen=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 ! echo "${ECHO_T}$ac_cv_func_dlopen" >&6 ! if test $ac_cv_func_dlopen = yes; then ! lt_cv_dlopen="dlopen" else ! echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 ! echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 ! if test "${ac_cv_lib_dl_dlopen+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! ac_check_lib_save_LIBS=$LIBS ! LIBS="-ldl $LIBS" ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! /* Override any gcc2 internal prototype to avoid an error. */ ! #ifdef __cplusplus ! extern "C" ! #endif ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char dlopen (); ! int ! main () ! { ! dlopen (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_lib_dl_dlopen=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_lib_dl_dlopen=no fi + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 ! echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 ! if test $ac_cv_lib_dl_dlopen = yes; then ! lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else ! echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 ! echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 ! if test "${ac_cv_lib_svld_dlopen+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! ac_check_lib_save_LIBS=$LIBS ! LIBS="-lsvld $LIBS" ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! /* Override any gcc2 internal prototype to avoid an error. */ ! #ifdef __cplusplus ! extern "C" ! #endif ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char dlopen (); ! int ! main () ! { ! dlopen (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_lib_svld_dlopen=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_lib_svld_dlopen=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! LIBS=$ac_check_lib_save_LIBS fi + echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 + echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 + if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" + else + echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 + echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 + if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-ldld $LIBS" + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + /* Override any gcc2 internal prototype to avoid an error. */ + #ifdef __cplusplus + extern "C" + #endif + /* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + char dld_link (); + int + main () + { + dld_link (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_dld_link=yes else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_lib_dld_dld_link=no fi + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi + echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 + echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 + if test $ac_cv_lib_dld_dld_link = yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi ! fi ! ! ! fi ! ! ! fi ! ! ! fi ! ! ! fi ! ! ;; ! esac ! ! if test "x$lt_cv_dlopen" != xno; then ! enable_dlopen=yes ! else ! enable_dlopen=no ! fi ! ! case $lt_cv_dlopen in ! dlopen) ! save_CPPFLAGS="$CPPFLAGS" ! test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" ! ! save_LDFLAGS="$LDFLAGS" ! eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" ! ! save_LIBS="$LIBS" ! LIBS="$lt_cv_dlopen_libs $LIBS" ! ! echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 ! echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 ! if test "${lt_cv_dlopen_self+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross + else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown cat > conftest.$ac_ext < ! #endif ! ! #include ! ! #ifdef RTLD_GLOBAL ! # define LT_DLGLOBAL RTLD_GLOBAL ! #else ! # ifdef DL_GLOBAL ! # define LT_DLGLOBAL DL_GLOBAL ! # else ! # define LT_DLGLOBAL 0 ! # endif ! #endif ! ! /* We may have to define LT_DLLAZY_OR_NOW in the command line if we ! find out it does not work in some platform. */ ! #ifndef LT_DLLAZY_OR_NOW ! # ifdef RTLD_LAZY ! # define LT_DLLAZY_OR_NOW RTLD_LAZY ! # else ! # ifdef DL_LAZY ! # define LT_DLLAZY_OR_NOW DL_LAZY ! # else ! # ifdef RTLD_NOW ! # define LT_DLLAZY_OR_NOW RTLD_NOW ! # else ! # ifdef DL_NOW ! # define LT_DLLAZY_OR_NOW DL_NOW ! # else ! # define LT_DLLAZY_OR_NOW 0 ! # endif ! # endif ! # endif ! # endif ! #endif ! ! #ifdef __cplusplus ! extern "C" void exit (int); ! #endif ! ! void fnord() { int i=42;} ! int main () ! { ! void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); ! int status = $lt_dlunknown; ! ! if (self) ! { ! if (dlsym (self,"fnord")) status = $lt_dlno_uscore; ! else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; ! /* dlclose (self); */ ! } ! ! exit (status); ! } EOF ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then ! (./conftest; exit; ) 2>/dev/null ! lt_status=$? ! case x$lt_status in ! x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; ! x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; ! x$lt_unknown|x*) lt_cv_dlopen_self=no ;; ! esac ! else : ! # compilation failed ! lt_cv_dlopen_self=no ! fi fi + rm -fr conftest* ! fi ! echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 ! echo "${ECHO_T}$lt_cv_dlopen_self" >&6 ! ! if test "x$lt_cv_dlopen_self" = xyes; then ! LDFLAGS="$LDFLAGS $link_static_flag" ! echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 ! echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 ! if test "${lt_cv_dlopen_self_static+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross + else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown cat > conftest.$ac_ext < ! #endif ! #include ! ! #ifdef RTLD_GLOBAL ! # define LT_DLGLOBAL RTLD_GLOBAL ! #else ! # ifdef DL_GLOBAL ! # define LT_DLGLOBAL DL_GLOBAL ! # else ! # define LT_DLGLOBAL 0 ! # endif ! #endif ! ! /* We may have to define LT_DLLAZY_OR_NOW in the command line if we ! find out it does not work in some platform. */ ! #ifndef LT_DLLAZY_OR_NOW ! # ifdef RTLD_LAZY ! # define LT_DLLAZY_OR_NOW RTLD_LAZY ! # else ! # ifdef DL_LAZY ! # define LT_DLLAZY_OR_NOW DL_LAZY ! # else ! # ifdef RTLD_NOW ! # define LT_DLLAZY_OR_NOW RTLD_NOW ! # else ! # ifdef DL_NOW ! # define LT_DLLAZY_OR_NOW DL_NOW ! # else ! # define LT_DLLAZY_OR_NOW 0 ! # endif ! # endif ! # endif ! # endif ! #endif ! ! #ifdef __cplusplus ! extern "C" void exit (int); ! #endif ! ! void fnord() { int i=42;} ! int main () ! { ! void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); ! int status = $lt_dlunknown; ! ! if (self) ! { ! if (dlsym (self,"fnord")) status = $lt_dlno_uscore; ! else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; ! /* dlclose (self); */ ! } ! ! exit (status); ! } EOF ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then ! (./conftest; exit; ) 2>/dev/null ! lt_status=$? ! case x$lt_status in ! x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; ! x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; ! x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; ! esac ! else : ! # compilation failed ! lt_cv_dlopen_self_static=no ! fi fi ! rm -fr conftest* ! ! ! fi ! echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 ! echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 ! fi ! ! CPPFLAGS="$save_CPPFLAGS" ! LDFLAGS="$save_LDFLAGS" ! LIBS="$save_LIBS" ! ;; ! esac ! ! case $lt_cv_dlopen_self in ! yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; ! *) enable_dlopen_self=unknown ;; ! esac ! ! case $lt_cv_dlopen_self_static in ! yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; ! *) enable_dlopen_self_static=unknown ;; ! esac fi ! ! # The else clause should only fire when bootstrapping the ! # libtool distribution, otherwise you forgot to ship ltmain.sh ! # with your package, and you will get complaints that there are ! # no rules to generate ltmain.sh. ! if test -f "$ltmain"; then ! # See if we are running on zsh, and set the options which allow our commands through ! # without removal of \ escapes. ! if test -n "${ZSH_VERSION+set}" ; then ! setopt NO_GLOB_SUBST ! fi ! # Now quote all the things that may contain metacharacters while being ! # careful not to overquote the AC_SUBSTed values. We take copies of the ! # variables and quote the copies for generation of the libtool script. ! for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \ ! libname_spec library_names_spec soname_spec extract_expsyms_cmds \ ! old_striplib striplib file_magic_cmd finish_cmds finish_eval \ ! deplibs_check_method reload_flag reload_cmds need_locks \ ! lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ ! lt_cv_sys_global_symbol_to_c_name_address \ ! sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ ! old_postinstall_cmds old_postuninstall_cmds \ ! compiler_CXX \ ! CC_CXX \ ! LD_CXX \ ! lt_prog_compiler_wl_CXX \ ! lt_prog_compiler_pic_CXX \ ! lt_prog_compiler_static_CXX \ ! lt_prog_compiler_no_builtin_flag_CXX \ ! export_dynamic_flag_spec_CXX \ ! thread_safe_flag_spec_CXX \ ! whole_archive_flag_spec_CXX \ ! enable_shared_with_static_runtimes_CXX \ ! old_archive_cmds_CXX \ ! old_archive_from_new_cmds_CXX \ ! predep_objects_CXX \ ! postdep_objects_CXX \ ! predeps_CXX \ ! postdeps_CXX \ ! compiler_lib_search_path_CXX \ ! archive_cmds_CXX \ ! archive_expsym_cmds_CXX \ ! postinstall_cmds_CXX \ ! postuninstall_cmds_CXX \ ! old_archive_from_expsyms_cmds_CXX \ ! allow_undefined_flag_CXX \ ! no_undefined_flag_CXX \ ! export_symbols_cmds_CXX \ ! hardcode_libdir_flag_spec_CXX \ ! hardcode_libdir_flag_spec_ld_CXX \ ! hardcode_libdir_separator_CXX \ ! hardcode_automatic_CXX \ ! module_cmds_CXX \ ! module_expsym_cmds_CXX \ ! lt_cv_prog_compiler_c_o_CXX \ ! exclude_expsyms_CXX \ ! include_expsyms_CXX; do ! ! case $var in ! old_archive_cmds_CXX | \ ! old_archive_from_new_cmds_CXX | \ ! archive_cmds_CXX | \ ! archive_expsym_cmds_CXX | \ ! module_cmds_CXX | \ ! module_expsym_cmds_CXX | \ ! old_archive_from_expsyms_cmds_CXX | \ ! export_symbols_cmds_CXX | \ ! extract_expsyms_cmds | reload_cmds | finish_cmds | \ ! postinstall_cmds | postuninstall_cmds | \ ! old_postinstall_cmds | old_postuninstall_cmds | \ ! sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) ! # Double-quote double-evaled strings. ! eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ! ;; ! *) ! eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ! ;; ! esac ! done ! ! case $lt_echo in ! *'\$0 --fallback-echo"') ! lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ! ;; esac + + cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" + # ### BEGIN LIBTOOL TAG CONFIG: $tagname + + # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + + # Shell to use when invoking shell scripts. + SHELL=$lt_SHELL + + # Whether or not to build shared libraries. + build_libtool_libs=$enable_shared + + # Whether or not to build static libraries. + build_old_libs=$enable_static + + # Whether or not to add -lc for building shared libraries. + build_libtool_need_lc=$archive_cmds_need_lc_CXX + + # Whether or not to disallow shared libs when runtime libs are static + allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + + # Whether or not to optimize for fast installation. + fast_install=$enable_fast_install + + # The host system. + host_alias=$host_alias + host=$host + + # An echo program that does not interpret backslashes. + echo=$lt_echo + + # The archiver. + AR=$lt_AR + AR_FLAGS=$lt_AR_FLAGS + + # A C compiler. + LTCC=$lt_LTCC + + # A language-specific compiler. + CC=$lt_compiler_CXX + + # Is the compiler the GNU C compiler? + with_gcc=$GCC_CXX + + # An ERE matcher. + EGREP=$lt_EGREP + + # The linker used to build libraries. + LD=$lt_LD_CXX + + # Whether we need hard or soft links. + LN_S=$lt_LN_S + + # A BSD-compatible nm program. + NM=$lt_NM + + # A symbol stripping program + STRIP=$STRIP + + # Used to examine libraries when file_magic_cmd begins "file" + MAGIC_CMD=$MAGIC_CMD + + # Used on cygwin: DLL creation program. + DLLTOOL="$DLLTOOL" + + # Used on cygwin: object dumper. + OBJDUMP="$OBJDUMP" + + # Used on cygwin: assembler. + AS="$AS" + + # The name of the directory that contains temporary libtool files. + objdir=$objdir + + # How to create reloadable object files. + reload_flag=$lt_reload_flag + reload_cmds=$lt_reload_cmds + + # How to pass a linker flag through the compiler. + wl=$lt_lt_prog_compiler_wl_CXX + + # Object file suffix (normally "o"). + objext="$ac_objext" + + # Old archive suffix (normally "a"). + libext="$libext" + + # Shared library suffix (normally ".so"). + shrext='$shrext' + + # Executable file suffix (normally ""). + exeext="$exeext" + + # Additional compiler flags for building library objects. + pic_flag=$lt_lt_prog_compiler_pic_CXX + pic_mode=$pic_mode + + # What is the maximum length of a command? + max_cmd_len=$lt_cv_sys_max_cmd_len + + # Does compiler simultaneously support -c and -o options? + compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + + # Must we lock files when doing compilation ? + need_locks=$lt_need_locks + + # Do we need the lib prefix for modules? + need_lib_prefix=$need_lib_prefix + + # Do we need a version for libraries? + need_version=$need_version + + # Whether dlopen is supported. + dlopen_support=$enable_dlopen + + # Whether dlopen of programs is supported. + dlopen_self=$enable_dlopen_self + + # Whether dlopen of statically linked programs is supported. + dlopen_self_static=$enable_dlopen_self_static + + # Compiler flag to prevent dynamic linking. + link_static_flag=$lt_lt_prog_compiler_static_CXX + + # Compiler flag to turn off builtin functions. + no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + + # Compiler flag to allow reflexive dlopens. + export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX + + # Compiler flag to generate shared objects directly from archives. + whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX + + # Compiler flag to generate thread-safe objects. + thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX + + # Library versioning type. + version_type=$version_type + + # Format of library name prefix. + libname_spec=$lt_libname_spec + + # List of archive names. First name is the real one, the rest are links. + # The last name is the one that the linker finds with -lNAME. + library_names_spec=$lt_library_names_spec + + # The coded name of the library, if different from the real name. + soname_spec=$lt_soname_spec + + # Commands used to build and install an old-style archive. + RANLIB=$lt_RANLIB + old_archive_cmds=$lt_old_archive_cmds_CXX + old_postinstall_cmds=$lt_old_postinstall_cmds + old_postuninstall_cmds=$lt_old_postuninstall_cmds + + # Create an old-style archive from a shared archive. + old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX + + # Create a temporary old-style archive to link instead of a shared archive. + old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + + # Commands used to build and install a shared archive. + archive_cmds=$lt_archive_cmds_CXX + archive_expsym_cmds=$lt_archive_expsym_cmds_CXX + postinstall_cmds=$lt_postinstall_cmds + postuninstall_cmds=$lt_postuninstall_cmds + + # Commands used to build a loadable module (assumed same as above if empty) + module_cmds=$lt_module_cmds_CXX + module_expsym_cmds=$lt_module_expsym_cmds_CXX + + # Commands to strip libraries. + old_striplib=$lt_old_striplib + striplib=$lt_striplib + + # Dependencies to place before the objects being linked to create a + # shared library. + predep_objects=$lt_predep_objects_CXX + + # Dependencies to place after the objects being linked to create a + # shared library. + postdep_objects=$lt_postdep_objects_CXX + + # Dependencies to place before the objects being linked to create a + # shared library. + predeps=$lt_predeps_CXX + + # Dependencies to place after the objects being linked to create a + # shared library. + postdeps=$lt_postdeps_CXX + + # The library search path used internally by the compiler when linking + # a shared library. + compiler_lib_search_path=$lt_compiler_lib_search_path_CXX + + # Method to check whether dependent libraries are shared objects. + deplibs_check_method=$lt_deplibs_check_method + + # Command to use when deplibs_check_method == file_magic. + file_magic_cmd=$lt_file_magic_cmd + + # Flag that allows shared libraries with undefined symbols to be built. + allow_undefined_flag=$lt_allow_undefined_flag_CXX + + # Flag that forces no undefined symbols. + no_undefined_flag=$lt_no_undefined_flag_CXX + + # Commands used to finish a libtool library installation in a directory. + finish_cmds=$lt_finish_cmds + + # Same as above, but a single script fragment to be evaled but not shown. + finish_eval=$lt_finish_eval + + # Take the output of nm and produce a listing of raw symbols and C names. + global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + + # Transform the output of nm in a proper C declaration + global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + + # Transform the output of nm in a C name address pair + global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + + # This is the shared library runtime path variable. + runpath_var=$runpath_var + + # This is the shared library path variable. + shlibpath_var=$shlibpath_var + + # Is shlibpath searched before the hard-coded library search path? + shlibpath_overrides_runpath=$shlibpath_overrides_runpath + + # How to hardcode a shared library path into an executable. + hardcode_action=$hardcode_action_CXX + + # Whether we should hardcode library paths into libraries. + hardcode_into_libs=$hardcode_into_libs + + # Flag to hardcode \$libdir into a binary during linking. + # This must work even if \$libdir does not exist. + hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + + # If ld is used when linking, flag to hardcode \$libdir into + # a binary during linking. This must work even if \$libdir does + # not exist. + hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX + + # Whether we need a single -rpath flag with a separated argument. + hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + + # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the + # resulting binary. + hardcode_direct=$hardcode_direct_CXX + + # Set to yes if using the -LDIR flag during linking hardcodes DIR into the + # resulting binary. + hardcode_minus_L=$hardcode_minus_L_CXX + + # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into + # the resulting binary. + hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + + # Set to yes if building a shared library automatically hardcodes DIR into the library + # and all subsequent libraries and executables linked against it. + hardcode_automatic=$hardcode_automatic_CXX + + # Variables whose values should be saved in libtool wrapper scripts and + # restored at relink time. + variables_saved_for_relink="$variables_saved_for_relink" + + # Whether libtool must link a program against all its dependency libraries. + link_all_deplibs=$link_all_deplibs_CXX + + # Compile-time system search path for libraries + sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + + # Run-time system search path for libraries + sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + + # Fix the shell variable \$srcfile for the compiler. + fix_srcfile_path="$fix_srcfile_path_CXX" + + # Set to yes if exported symbols are required. + always_export_symbols=$always_export_symbols_CXX + + # The commands to list exported symbols. + export_symbols_cmds=$lt_export_symbols_cmds_CXX + + # The commands to extract the exported symbol list from a shared archive. + extract_expsyms_cmds=$lt_extract_expsyms_cmds + + # Symbols that should not be listed in the preloaded symbols. + exclude_expsyms=$lt_exclude_expsyms_CXX + + # Symbols that must always be exported. + include_expsyms=$lt_include_expsyms_CXX + + # ### END LIBTOOL TAG CONFIG: $tagname + + __EOF__ + + + else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + test -f Makefile && make "$ltmain" + fi + + + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + + CC=$lt_save_CC + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ldcxx=$with_gnu_ld + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld + + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + + ac_ext=f + ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' + ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_f77_compiler_gnu + + + archive_cmds_need_lc_F77=no + allow_undefined_flag_F77= + always_export_symbols_F77=no + archive_expsym_cmds_F77= + export_dynamic_flag_spec_F77= + hardcode_direct_F77=no + hardcode_libdir_flag_spec_F77= + hardcode_libdir_flag_spec_ld_F77= + hardcode_libdir_separator_F77= + hardcode_minus_L_F77=no + hardcode_automatic_F77=no + module_cmds_F77= + module_expsym_cmds_F77= + link_all_deplibs_F77=unknown + old_archive_cmds_F77=$old_archive_cmds + no_undefined_flag_F77= + whole_archive_flag_spec_F77= + enable_shared_with_static_runtimes_F77=no + + # Source file extension for f77 test sources. + ac_ext=f + + # Object file extension for compiled f77 test sources. + objext=o + objext_F77=$objext + + # Code to be used in simple compile tests + lt_simple_compile_test_code=" subroutine t\n return\n end\n" + + # Code to be used in simple link tests + lt_simple_link_test_code=" program t\n end\n" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + + # If no C compiler was specified, use CC. + LTCC=${LTCC-"$CC"} + + # Allow CC to be a program name with arguments. + compiler=$CC + + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + CC=${F77-"f77"} + compiler=$CC + compiler_F77=$CC + cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` + + echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 + echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: $can_build_shared" >&5 + echo "${ECHO_T}$can_build_shared" >&6 + + echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 + echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case "$host_os" in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix4*) + test "$enable_shared" = yes && enable_static=no ;; esac + echo "$as_me:$LINENO: result: $enable_shared" >&5 + echo "${ECHO_T}$enable_shared" >&6 + echo "$as_me:$LINENO: checking whether to build static libraries" >&5 + echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + echo "$as_me:$LINENO: result: $enable_static" >&5 + echo "${ECHO_T}$enable_static" >&6 + + test "$ld_shlibs_F77" = no && can_build_shared=no + + GCC_F77="$G77" + LD_F77="$LD" + + lt_prog_compiler_wl_F77= + lt_prog_compiler_pic_F77= + lt_prog_compiler_static_F77= + + echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 + echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + + if test "$GCC" = yes; then + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_static_F77='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_F77='-fno-common' + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared_F77=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_F77=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_F77='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + else + lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_F77='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_F77='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + linux*) + case $CC in + icc|ecc) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-static' + ;; + ccc) + lt_prog_compiler_wl_F77='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_F77='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + + sco3.2v5*) + lt_prog_compiler_pic_F77='-Kpic' + lt_prog_compiler_static_F77='-dn' + ;; + + solaris*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sunos4*) + lt_prog_compiler_wl_F77='-Qoption ld ' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_F77='-Kconform_pic' + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; + + uts4*) + lt_prog_compiler_pic_F77='-pic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_F77=no + ;; + esac + fi + + echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 + echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 # ! # Check to make sure the PIC flag actually works. # ! if test -n "$lt_prog_compiler_pic_F77"; then ! echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 ! echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 ! if test "${lt_prog_compiler_pic_works_F77+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! lt_prog_compiler_pic_works_F77=no ! ac_outfile=conftest.$ac_objext ! printf "$lt_simple_compile_test_code" > conftest.$ac_ext ! lt_compiler_flag="$lt_prog_compiler_pic_F77" ! # Insert the option either (1) after the last *FLAGS variable, or ! # (2) before a word containing "conftest.", or (3) at the end. ! # Note that $ac_compile itself does not contain backslashes and begins ! # with a dollar sign (not a hyphen), so the echo should work correctly. ! # The option is referenced via a variable to avoid confusing sed. ! lt_compile=`echo "$ac_compile" | $SED \ ! -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ ! -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ ! -e 's:$: $lt_compiler_flag:'` ! (eval echo "\"\$as_me:13266: $lt_compile\"" >&5) ! (eval "$lt_compile" 2>conftest.err) ! ac_status=$? ! cat conftest.err >&5 ! echo "$as_me:13270: \$? = $ac_status" >&5 ! if (exit $ac_status) && test -s "$ac_outfile"; then ! # The compiler can only warn and ignore the option if not recognized ! # So say no if there are warnings ! if test ! -s conftest.err; then ! lt_prog_compiler_pic_works_F77=yes ! fi ! fi ! $rm conftest* ! ! fi ! echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 ! echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 ! ! if test x"$lt_prog_compiler_pic_works_F77" = xyes; then ! case $lt_prog_compiler_pic_F77 in ! "" | " "*) ;; ! *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; ! esac ! else ! lt_prog_compiler_pic_F77= ! lt_prog_compiler_can_build_shared_F77=no ! fi ! ! fi ! case "$host_os" in ! # For platforms which do not support PIC, -DPIC is meaningless: ! *djgpp*) ! lt_prog_compiler_pic_F77= ;; *) ! lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; ! esac ! ! echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 ! echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 ! if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! lt_cv_prog_compiler_c_o_F77=no ! $rm -r conftest 2>/dev/null ! mkdir conftest ! cd conftest ! mkdir out ! printf "$lt_simple_compile_test_code" > conftest.$ac_ext ! ! # According to Tom Tromey, Ian Lance Taylor reported there are C compilers ! # that will create temporary files in the current directory regardless of ! # the output directory. Thus, making CWD read-only will cause this test ! # to fail, enabling locking or at least warning the user not to do parallel ! # builds. ! chmod -w . ! ! lt_compiler_flag="-o out/conftest2.$ac_objext" ! # Insert the option either (1) after the last *FLAGS variable, or ! # (2) before a word containing "conftest.", or (3) at the end. ! # Note that $ac_compile itself does not contain backslashes and begins ! # with a dollar sign (not a hyphen), so the echo should work correctly. ! lt_compile=`echo "$ac_compile" | $SED \ ! -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ ! -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ ! -e 's:$: $lt_compiler_flag:'` ! (eval echo "\"\$as_me:13333: $lt_compile\"" >&5) ! (eval "$lt_compile" 2>out/conftest.err) ! ac_status=$? ! cat out/conftest.err >&5 ! echo "$as_me:13337: \$? = $ac_status" >&5 ! if (exit $ac_status) && test -s out/conftest2.$ac_objext ! then ! # The compiler can only warn and ignore the option if not recognized ! # So say no if there are warnings ! if test ! -s out/conftest.err; then ! lt_cv_prog_compiler_c_o_F77=yes ! fi ! fi ! chmod u+w . ! $rm conftest* out/* ! rmdir out ! cd .. ! rmdir conftest ! $rm conftest* ! ! fi ! echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 ! echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 ! ! ! hard_links="nottested" ! if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then ! # do not overwrite the value of need_locks provided by the user ! echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 ! echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 ! hard_links=yes ! $rm conftest* ! ln conftest.a conftest.b 2>/dev/null && hard_links=no ! touch conftest.a ! ln conftest.a conftest.b 2>&5 || hard_links=no ! ln conftest.a conftest.b 2>/dev/null && hard_links=no ! echo "$as_me:$LINENO: result: $hard_links" >&5 ! echo "${ECHO_T}$hard_links" >&6 ! if test "$hard_links" = no; then ! { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 ! echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} ! need_locks=warn ! fi ! else ! need_locks=no ! fi ! ! echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 ! echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 ! ! runpath_var= ! allow_undefined_flag_F77= ! enable_shared_with_static_runtimes_F77=no ! archive_cmds_F77= ! archive_expsym_cmds_F77= ! old_archive_From_new_cmds_F77= ! old_archive_from_expsyms_cmds_F77= ! export_dynamic_flag_spec_F77= ! whole_archive_flag_spec_F77= ! thread_safe_flag_spec_F77= ! hardcode_libdir_flag_spec_F77= ! hardcode_libdir_flag_spec_ld_F77= ! hardcode_libdir_separator_F77= ! hardcode_direct_F77=no ! hardcode_minus_L_F77=no ! hardcode_shlibpath_var_F77=unsupported ! link_all_deplibs_F77=unknown ! hardcode_automatic_F77=no ! module_cmds_F77= ! module_expsym_cmds_F77= ! always_export_symbols_F77=no ! export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ! # include_expsyms should be a list of space-separated symbols to be *always* ! # included in the symbol list ! include_expsyms_F77= ! # exclude_expsyms can be an extended regexp of symbols to exclude ! # it will be wrapped by ` (' and `)$', so one must not match beginning or ! # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', ! # as well as any symbol that contains `d'. ! exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" ! # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out ! # platforms (ab)use it in PIC code, but their linkers get confused if ! # the symbol is explicitly referenced. Since portable code cannot ! # rely on this symbol name, it's probably fine to never include it in ! # preloaded symbol tables. ! extract_expsyms_cmds= ! ! case $host_os in ! cygwin* | mingw* | pw32*) ! # FIXME: the MSVC++ port hasn't been tested in a loooong time ! # When not using gcc, we currently assume that we are using ! # Microsoft Visual C++. ! if test "$GCC" != yes; then ! with_gnu_ld=no ! fi ! ;; ! openbsd*) ! with_gnu_ld=no ! ;; ! esac ! ! ld_shlibs_F77=yes ! if test "$with_gnu_ld" = yes; then ! # If archive_cmds runs LD, not CC, wlarc should be empty ! wlarc='${wl}' ! ! # See if GNU ld supports shared libraries. ! case $host_os in ! aix3* | aix4* | aix5*) ! # On AIX/PPC, the GNU linker is very broken ! if test "$host_cpu" != ia64; then ! ld_shlibs_F77=no ! cat <&2 ! ! *** Warning: the GNU linker, at least up to release 2.9.1, is reported ! *** to be unable to reliably create shared libraries on AIX. ! *** Therefore, libtool is disabling shared libraries support. If you ! *** really care for shared libraries, you may want to modify your PATH ! *** so that a non-GNU linker is found, and then restart. ! ! EOF ! fi ! ;; ! ! amigaos*) ! archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' ! hardcode_libdir_flag_spec_F77='-L$libdir' ! hardcode_minus_L_F77=yes ! ! # Samuel A. Falvo II reports ! # that the semantics of dynamic libraries on AmigaOS, at least up ! # to version 4, is to share data among multiple programs linked ! # with the same dynamic library. Since this doesn't match the ! # behavior of shared libraries on other platforms, we can't use ! # them. ! ld_shlibs_F77=no ! ;; ! ! beos*) ! if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then ! allow_undefined_flag_F77=unsupported ! # Joseph Beckenbach says some releases of gcc ! # support --undefined. This deserves some investigation. FIXME ! archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ! else ! ld_shlibs_F77=no ! fi ! ;; ! ! cygwin* | mingw* | pw32*) ! # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, ! # as there is no search path for DLLs. ! hardcode_libdir_flag_spec_F77='-L$libdir' ! allow_undefined_flag_F77=unsupported ! always_export_symbols_F77=no ! enable_shared_with_static_runtimes_F77=yes ! export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' ! ! if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then ! archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' ! # If the export-symbols file already is a .def file (1st line ! # is EXPORTS), use it as is; otherwise, prepend... ! archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ! cp $export_symbols $output_objdir/$soname.def; ! else ! echo EXPORTS > $output_objdir/$soname.def; ! cat $export_symbols >> $output_objdir/$soname.def; ! fi~ ! $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' ! else ! ld_shlibs=no ! fi ! ;; ! ! netbsd*) ! if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then ! archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' ! wlarc= ! else ! archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ! archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ! fi ! ;; ! ! solaris* | sysv5*) ! if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ! ld_shlibs_F77=no ! cat <&2 ! ! *** Warning: The releases 2.8.* of the GNU linker cannot reliably ! *** create shared libraries on Solaris systems. Therefore, libtool ! *** is disabling shared libraries support. We urge you to upgrade GNU ! *** binutils to release 2.9.1 or newer. Another option is to modify ! *** your PATH or compiler configuration so that the native linker is ! *** used, and then restart. ! ! EOF ! elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then ! archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ! archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ! else ! ld_shlibs_F77=no ! fi ! ;; ! ! sunos4*) ! archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' ! wlarc= ! hardcode_direct_F77=yes ! hardcode_shlibpath_var_F77=no ! ;; ! ! *) ! if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then ! archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ! archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ! else ! ld_shlibs_F77=no ! fi ! ;; ! esac ! ! if test "$ld_shlibs_F77" = yes; then ! runpath_var=LD_RUN_PATH ! hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' ! export_dynamic_flag_spec_F77='${wl}--export-dynamic' ! # ancient GNU ld didn't support --whole-archive et. al. ! if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then ! whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' ! else ! whole_archive_flag_spec_F77= ! fi ! fi else ! # PORTME fill in a description of your system's linker (not GNU ld) ! case $host_os in ! aix3*) ! allow_undefined_flag_F77=unsupported ! always_export_symbols_F77=yes ! archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' ! # Note: this linker hardcodes the directories in LIBPATH if there ! # are no directories specified by -L. ! hardcode_minus_L_F77=yes ! if test "$GCC" = yes && test -z "$link_static_flag"; then ! # Neither direct hardcoding nor static linking is supported with a ! # broken collect2. ! hardcode_direct_F77=unsupported ! fi ! ;; ! ! aix4* | aix5*) ! if test "$host_cpu" = ia64; then ! # On IA64, the linker does run time linking by default, so we don't ! # have to do anything special. ! aix_use_runtimelinking=no ! exp_sym_flag='-Bexport' ! no_entry_flag="" ! else ! # If we're using GNU nm, then we don't want the "-C" option. ! # -C means demangle to AIX nm, but means don't demangle with GNU nm ! if $NM -V 2>&1 | grep 'GNU' > /dev/null; then ! export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' ! else ! export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' ! fi ! aix_use_runtimelinking=no ! ! # Test if we are trying to use run time linking or normal ! # AIX style linking. If -brtl is somewhere in LDFLAGS, we ! # need to do runtime linking. ! case $host_os in aix4.[23]|aix4.[23].*|aix5*) ! for ld_flag in $LDFLAGS; do ! if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then ! aix_use_runtimelinking=yes ! break ! fi ! done ! esac ! ! exp_sym_flag='-bexport' ! no_entry_flag='-bnoentry' ! fi ! ! # When large executables or shared objects are built, AIX ld can ! # have problems creating the table of contents. If linking a library ! # or program results in "error TOC overflow" add -mminimal-toc to ! # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not ! # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. ! ! archive_cmds_F77='' ! hardcode_direct_F77=yes ! hardcode_libdir_separator_F77=':' ! link_all_deplibs_F77=yes ! ! if test "$GCC" = yes; then ! case $host_os in aix4.012|aix4.012.*) ! # We only want to do this on AIX 4.2 and lower, the check ! # below for broken collect2 doesn't work under 4.3+ ! collect2name=`${CC} -print-prog-name=collect2` ! if test -f "$collect2name" && \ ! strings "$collect2name" | grep resolve_lib_name >/dev/null ! then ! # We have reworked collect2 ! hardcode_direct_F77=yes ! else ! # We have old collect2 ! hardcode_direct_F77=unsupported ! # It fails to find uninstalled libraries when the uninstalled ! # path is not listed in the libpath. Setting hardcode_minus_L ! # to unsupported forces relinking ! hardcode_minus_L_F77=yes ! hardcode_libdir_flag_spec_F77='-L$libdir' ! hardcode_libdir_separator_F77= ! fi ! esac ! shared_flag='-shared' ! else ! # not using gcc ! if test "$host_cpu" = ia64; then ! # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release ! # chokes on -Wl,-G. The following line is correct: ! shared_flag='-G' ! else ! if test "$aix_use_runtimelinking" = yes; then ! shared_flag='${wl}-G' ! else ! shared_flag='${wl}-bM:SRE' ! fi ! fi ! fi ! ! # It seems that -bexpall does not export symbols beginning with ! # underscore (_), so it is better to generate a list of symbols to export. ! always_export_symbols_F77=yes ! if test "$aix_use_runtimelinking" = yes; then ! # Warning - without using the other runtime loading flags (-brtl), ! # -berok will link without error, but may produce a broken library. ! allow_undefined_flag_F77='-berok' ! # Determine the default libpath from the value encoded in an empty executable. ! cat >conftest.$ac_ext <<_ACEOF ! program main ! ! end ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ! aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } ! }'` ! # Check for a 64-bit object if we didn't find anything. ! if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } ! }'`; fi ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ! ! hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" ! archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" ! else ! if test "$host_cpu" = ia64; then ! hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' ! allow_undefined_flag_F77="-z nodefs" ! archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" ! else ! # Determine the default libpath from the value encoded in an empty executable. ! cat >conftest.$ac_ext <<_ACEOF ! program main ! ! end ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ! aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } ! }'` ! # Check for a 64-bit object if we didn't find anything. ! if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } ! }'`; fi ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ! ! hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" ! # Warning - without using the other run time loading flags, ! # -berok will link without error, but may produce a broken library. ! no_undefined_flag_F77=' ${wl}-bernotok' ! allow_undefined_flag_F77=' ${wl}-berok' ! # -bexpall does not export symbols beginning with underscore (_) ! always_export_symbols_F77=yes ! # Exported symbols can be pulled into shared objects from archives ! whole_archive_flag_spec_F77=' ' ! archive_cmds_need_lc_F77=yes ! # This is similar to how AIX traditionally builds it's shared libraries. ! archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' ! fi ! fi ! ;; ! ! amigaos*) ! archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' ! hardcode_libdir_flag_spec_F77='-L$libdir' ! hardcode_minus_L_F77=yes ! # see comment about different semantics on the GNU ld section ! ld_shlibs_F77=no ! ;; ! ! bsdi4*) ! export_dynamic_flag_spec_F77=-rdynamic ! ;; ! ! cygwin* | mingw* | pw32*) ! # When not using gcc, we currently assume that we are using ! # Microsoft Visual C++. ! # hardcode_libdir_flag_spec is actually meaningless, as there is ! # no search path for DLLs. ! hardcode_libdir_flag_spec_F77=' ' ! allow_undefined_flag_F77=unsupported ! # Tell ltmain to make .lib files, not .a files. ! libext=lib ! # Tell ltmain to make .dll files, not .so files. ! shrext=".dll" ! # FIXME: Setting linknames here is a bad hack. ! archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' ! # The linker will automatically build a .lib file if we build a DLL. ! old_archive_From_new_cmds_F77='true' ! # FIXME: Should let the user specify the lib program. ! old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' ! fix_srcfile_path='`cygpath -w "$srcfile"`' ! enable_shared_with_static_runtimes_F77=yes ! ;; ! ! darwin* | rhapsody*) ! if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then ! archive_cmds_need_lc_F77=no ! case "$host_os" in ! rhapsody* | darwin1.[012]) ! allow_undefined_flag_F77='-undefined suppress' ! ;; ! *) # Darwin 1.3 on ! test -z ${LD_TWOLEVEL_NAMESPACE} && allow_undefined_flag_F77='-flat_namespace -undefined suppress' ! ;; ! esac ! # FIXME: Relying on posixy $() will cause problems for ! # cross-compilation, but unfortunately the echo tests do not ! # yet detect zsh echo's removal of \ escapes. Also zsh mangles ! # `"' quotes if we put them in here... so don't! ! lt_int_apple_cc_single_mod=no ! output_verbose_link_cmd='echo' ! if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then ! lt_int_apple_cc_single_mod=yes ! fi ! if test "X$lt_int_apple_cc_single_mod" = Xyes ; then ! archive_cmds_F77='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' ! else ! archive_cmds_F77='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' ! fi ! module_cmds_F77='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' ! # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's ! if test "X$lt_int_apple_cc_single_mod" = Xyes ; then ! archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ! else ! archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ! fi ! module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ! hardcode_direct_F77=no ! hardcode_automatic_F77=yes ! hardcode_shlibpath_var_F77=unsupported ! whole_archive_flag_spec_F77='-all_load $convenience' ! link_all_deplibs_F77=yes ! fi ! ;; ! ! dgux*) ! archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_libdir_flag_spec_F77='-L$libdir' ! hardcode_shlibpath_var_F77=no ! ;; ! ! freebsd1*) ! ld_shlibs_F77=no ! ;; ! ! # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor ! # support. Future versions do this automatically, but an explicit c++rt0.o ! # does not break anything, and helps significantly (at the cost of a little ! # extra space). ! freebsd2.2*) ! archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' ! hardcode_libdir_flag_spec_F77='-R$libdir' ! hardcode_direct_F77=yes ! hardcode_shlibpath_var_F77=no ! ;; ! ! # Unfortunately, older versions of FreeBSD 2 do not have this feature. ! freebsd2*) ! archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' ! hardcode_direct_F77=yes ! hardcode_minus_L_F77=yes ! hardcode_shlibpath_var_F77=no ! ;; ! ! # FreeBSD 3 and greater uses gcc -shared to do shared libraries. ! freebsd*) ! archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' ! hardcode_libdir_flag_spec_F77='-R$libdir' ! hardcode_direct_F77=yes ! hardcode_shlibpath_var_F77=no ! ;; ! ! hpux9*) ! if test "$GCC" = yes; then ! archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ! else ! archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ! fi ! hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' ! hardcode_libdir_separator_F77=: ! hardcode_direct_F77=yes ! ! # hardcode_minus_L: Not really in the search PATH, ! # but as the default location of the library. ! hardcode_minus_L_F77=yes ! export_dynamic_flag_spec_F77='${wl}-E' ! ;; ! ! hpux10* | hpux11*) ! if test "$GCC" = yes -a "$with_gnu_ld" = no; then ! case "$host_cpu" in ! hppa*64*|ia64*) ! archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ! ;; ! *) ! archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ! ;; ! esac ! else ! case "$host_cpu" in ! hppa*64*|ia64*) ! archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ! ;; ! *) ! archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ! ;; ! esac ! fi ! if test "$with_gnu_ld" = no; then ! case "$host_cpu" in ! hppa*64*) ! hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' ! hardcode_libdir_flag_spec_ld_F77='+b $libdir' ! hardcode_libdir_separator_F77=: ! hardcode_direct_F77=no ! hardcode_shlibpath_var_F77=no ! ;; ! ia64*) ! hardcode_libdir_flag_spec_F77='-L$libdir' ! hardcode_direct_F77=no ! hardcode_shlibpath_var_F77=no ! ! # hardcode_minus_L: Not really in the search PATH, ! # but as the default location of the library. ! hardcode_minus_L_F77=yes ! ;; ! *) ! hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' ! hardcode_libdir_separator_F77=: ! hardcode_direct_F77=yes ! export_dynamic_flag_spec_F77='${wl}-E' ! ! # hardcode_minus_L: Not really in the search PATH, ! # but as the default location of the library. ! hardcode_minus_L_F77=yes ! ;; ! esac ! fi ! ;; ! ! irix5* | irix6* | nonstopux*) ! if test "$GCC" = yes; then ! archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ! else ! archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' ! hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' ! fi ! hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' ! hardcode_libdir_separator_F77=: ! link_all_deplibs_F77=yes ! ;; ! ! netbsd*) ! if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then ! archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out ! else ! archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF ! fi ! hardcode_libdir_flag_spec_F77='-R$libdir' ! hardcode_direct_F77=yes ! hardcode_shlibpath_var_F77=no ! ;; ! ! newsos6) ! archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_direct_F77=yes ! hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' ! hardcode_libdir_separator_F77=: ! hardcode_shlibpath_var_F77=no ! ;; ! ! openbsd*) ! hardcode_direct_F77=yes ! hardcode_shlibpath_var_F77=no ! if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then ! archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ! hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ! export_dynamic_flag_spec_F77='${wl}-E' ! else ! case $host_os in ! openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) ! archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' ! hardcode_libdir_flag_spec_F77='-R$libdir' ! ;; ! *) ! archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ! hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ! ;; ! esac ! fi ! ;; ! ! os2*) ! hardcode_libdir_flag_spec_F77='-L$libdir' ! hardcode_minus_L_F77=yes ! allow_undefined_flag_F77=unsupported ! archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' ! old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ! ;; ! ! osf3*) ! if test "$GCC" = yes; then ! allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' ! archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ! else ! allow_undefined_flag_F77=' -expect_unresolved \*' ! archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' ! fi ! hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' ! hardcode_libdir_separator_F77=: ! ;; ! ! osf4* | osf5*) # as osf3* with the addition of -msym flag ! if test "$GCC" = yes; then ! allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' ! archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ! hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' ! else ! allow_undefined_flag_F77=' -expect_unresolved \*' ! archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' ! archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ ! $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' ! ! # Both c and cxx compiler support -rpath directly ! hardcode_libdir_flag_spec_F77='-rpath $libdir' ! fi ! hardcode_libdir_separator_F77=: ! ;; ! ! sco3.2v5*) ! archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_shlibpath_var_F77=no ! export_dynamic_flag_spec_F77='${wl}-Bexport' ! runpath_var=LD_RUN_PATH ! hardcode_runpath_var=yes ! ;; ! ! solaris*) ! no_undefined_flag_F77=' -z text' ! if test "$GCC" = yes; then ! archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ! archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ ! $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' ! else ! archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' ! archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ ! $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' ! fi ! hardcode_libdir_flag_spec_F77='-R$libdir' ! hardcode_shlibpath_var_F77=no ! case $host_os in ! solaris2.[0-5] | solaris2.[0-5].*) ;; ! *) # Supported since Solaris 2.6 (maybe 2.5.1?) ! whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; ! esac ! link_all_deplibs_F77=yes ! ;; ! ! sunos4*) ! if test "x$host_vendor" = xsequent; then ! # Use $CC to link under sequent, because it throws in some extra .o ! # files that make .init and .fini sections work. ! archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' ! else ! archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' ! fi ! hardcode_libdir_flag_spec_F77='-L$libdir' ! hardcode_direct_F77=yes ! hardcode_minus_L_F77=yes ! hardcode_shlibpath_var_F77=no ! ;; ! ! sysv4) ! case $host_vendor in ! sni) ! archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_direct_F77=yes # is this really true??? ! ;; ! siemens) ! ## LD is ld it makes a PLAMLIB ! ## CC just makes a GrossModule. ! archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' ! reload_cmds_F77='$CC -r -o $output$reload_objs' ! hardcode_direct_F77=no ! ;; ! motorola) ! archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie ! ;; ! esac ! runpath_var='LD_RUN_PATH' ! hardcode_shlibpath_var_F77=no ! ;; ! ! sysv4.3*) ! archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_shlibpath_var_F77=no ! export_dynamic_flag_spec_F77='-Bexport' ! ;; ! ! sysv4*MP*) ! if test -d /usr/nec; then ! archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_shlibpath_var_F77=no ! runpath_var=LD_RUN_PATH ! hardcode_runpath_var=yes ! ld_shlibs_F77=yes ! fi ! ;; ! ! sysv4.2uw2*) ! archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' ! hardcode_direct_F77=yes ! hardcode_minus_L_F77=no ! hardcode_shlibpath_var_F77=no ! hardcode_runpath_var=yes ! runpath_var=LD_RUN_PATH ! ;; ! ! sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) ! no_undefined_flag_F77='${wl}-z ${wl}text' ! if test "$GCC" = yes; then ! archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ! else ! archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ! fi ! runpath_var='LD_RUN_PATH' ! hardcode_shlibpath_var_F77=no ! ;; ! ! sysv5*) ! no_undefined_flag_F77=' -z text' ! # $CC -shared without GNU ld will not create a library from C++ ! # object files and a static libstdc++, better avoid it by now ! archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' ! archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ ! $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' ! hardcode_libdir_flag_spec_F77= ! hardcode_shlibpath_var_F77=no ! runpath_var='LD_RUN_PATH' ! ;; ! ! uts4*) ! archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_libdir_flag_spec_F77='-L$libdir' ! hardcode_shlibpath_var_F77=no ! ;; ! ! *) ! ld_shlibs_F77=no ! ;; ! esac fi + + echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 + echo "${ECHO_T}$ld_shlibs_F77" >&6 + test "$ld_shlibs_F77" = no && can_build_shared=no + + variables_saved_for_relink="PATH $shlibpath_var $runpath_var" + if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi + # + # Do we need to explicitly link libc? + # + case "x$archive_cmds_need_lc_F77" in + x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_F77=yes ! if test "$enable_shared" = yes && test "$GCC" = yes; then ! case $archive_cmds_F77 in ! *'~'*) ! # FIXME: we may have to deal with multi-command sequences. ! ;; ! '$CC '*) ! # Test whether the compiler implicitly links with -lc since on some ! # systems, -lgcc has to come before -lc. If gcc already passes -lc ! # to ld, don't add -lc before -lgcc. ! echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 ! echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 ! $rm conftest* ! printf "$lt_simple_compile_test_code" > conftest.$ac_ext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } 2>conftest.err; then ! soname=conftest ! lib=conftest ! libobjs=conftest.$ac_objext ! deplibs= ! wl=$lt_prog_compiler_wl_F77 ! compiler_flags=-v ! linker_flags=-v ! verstring= ! output_objdir=. ! libname=conftest ! lt_save_allow_undefined_flag=$allow_undefined_flag_F77 ! allow_undefined_flag_F77= ! if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 ! (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } ! then ! archive_cmds_need_lc_F77=no ! else ! archive_cmds_need_lc_F77=yes ! fi ! allow_undefined_flag_F77=$lt_save_allow_undefined_flag ! else ! cat conftest.err 1>&5 ! fi ! $rm conftest* ! echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 ! echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 ! ;; ! esac ! fi ! ;; ! esac ! ! echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 ! echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 ! hardcode_action_F77= ! if test -n "$hardcode_libdir_flag_spec_F77" || \ ! test -n "$runpath_var F77" || \ ! test "X$hardcode_automatic_F77"="Xyes" ; then ! ! # We can hardcode non-existant directories. ! if test "$hardcode_direct_F77" != no && ! # If the only mechanism to avoid hardcoding is shlibpath_var, we ! # have to relink, otherwise we might link with an installed library ! # when we should be linking with a yet-to-be-installed one ! ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && ! test "$hardcode_minus_L_F77" != no; then ! # Linking always hardcodes the temporary library directory. ! hardcode_action_F77=relink ! else ! # We can link without hardcoding, and we can hardcode nonexisting dirs. ! hardcode_action_F77=immediate ! fi else ! # We cannot hardcode anything, or else we can only hardcode existing ! # directories. ! hardcode_action_F77=unsupported fi + echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 + echo "${ECHO_T}$hardcode_action_F77" >&6 + if test "$hardcode_action_F77" = relink; then + # Fast installation is not supported + enable_fast_install=no + elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless + fi ! striplib= ! old_striplib= ! echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 ! echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 ! if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then ! test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" ! test -z "$striplib" && striplib="$STRIP --strip-unneeded" ! echo "$as_me:$LINENO: result: yes" >&5 ! echo "${ECHO_T}yes" >&6 ! else ! # FIXME - insert some real tests, host_os isn't really good enough ! case $host_os in ! darwin*) ! if test -n "$STRIP" ; then ! striplib="$STRIP -x" ! echo "$as_me:$LINENO: result: yes" >&5 ! echo "${ECHO_T}yes" >&6 ! else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! fi ! ;; ! *) ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! ;; ! esac ! fi ! echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 ! echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 ! library_names_spec= ! libname_spec='lib$name' ! soname_spec= ! shrext=".so" ! postinstall_cmds= ! postuninstall_cmds= ! finish_cmds= ! finish_eval= ! shlibpath_var= ! shlibpath_overrides_runpath=unknown ! version_type=none ! dynamic_linker="$host_os ld.so" ! sys_lib_dlsearch_path_spec="/lib /usr/lib" ! if test "$GCC" = yes; then ! sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` ! if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then ! # if the path contains ";" then we assume it to be the separator ! # otherwise default to the standard path separator (i.e. ":") - it is ! # assumed that no part of a normal pathname contains ";" but that should ! # okay in the real world where ";" in dirpaths is itself problematic. ! sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ! else ! sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ! fi ! else ! sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" ! fi ! need_lib_prefix=unknown ! hardcode_into_libs=no ! # when you set need_version to no, make sure it does not cause -set_version ! # flags to be left without arguments ! need_version=unknown + case $host_os in + aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH ! # AIX 3 has no versioning support, so we append a major version to the name. ! soname_spec='${libname}${release}${shared_ext}$major' ! ;; ! aix4* | aix5*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! hardcode_into_libs=yes ! if test "$host_cpu" = ia64; then ! # AIX 5 supports IA64 ! library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' ! shlibpath_var=LD_LIBRARY_PATH ! else ! # With GCC up to 2.95.x, collect2 would create an import file ! # for dependence libraries. The import file would start with ! # the line `#! .'. This would cause the generated library to ! # depend on `.', always an invalid library. This was fixed in ! # development snapshots of GCC prior to 3.0. ! case $host_os in ! aix4 | aix4.[01] | aix4.[01].*) ! if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' ! echo ' yes ' ! echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then ! : ! else ! can_build_shared=no ! fi ! ;; ! esac ! # AIX (on Power*) has no versioning support, so currently we can not hardcode correct ! # soname into executable. Probably we can add versioning support to ! # collect2, so additional links can be useful in future. ! if test "$aix_use_runtimelinking" = yes; then ! # If using run time linking (on AIX 4.2 or later) use lib.so ! # instead of lib.a to let people know that these are not ! # typical AIX shared libraries. ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! else ! # We preserve .a as extension for shared libraries through AIX4.2 ! # and later when we are not doing run time linking. ! library_names_spec='${libname}${release}.a $libname.a' ! soname_spec='${libname}${release}${shared_ext}$major' ! fi ! shlibpath_var=LIBPATH ! fi ! ;; ! ! amigaos*) ! library_names_spec='$libname.ixlibrary $libname.a' ! # Create ${libname}_ixlibrary.a entries in /sys/libs. ! finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' ! ;; ! ! beos*) ! library_names_spec='${libname}${shared_ext}' ! dynamic_linker="$host_os ld.so" ! shlibpath_var=LIBRARY_PATH ! ;; ! ! bsdi4*) ! version_type=linux ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' ! shlibpath_var=LD_LIBRARY_PATH ! sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" ! sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" ! # the default ld.so.conf also contains /usr/contrib/lib and ! # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow ! # libtool to hard-code these into programs ! ;; ! ! cygwin* | mingw* | pw32*) ! version_type=windows ! shrext=".dll" ! need_version=no ! need_lib_prefix=no ! ! case $GCC,$host_os in ! yes,cygwin* | yes,mingw* | yes,pw32*) ! library_names_spec='$libname.dll.a' ! # DLL is installed to $(libdir)/../bin by postinstall_cmds ! postinstall_cmds='base_file=`basename \${file}`~ ! dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ ! dldir=$destdir/`dirname \$dlpath`~ ! test -d \$dldir || mkdir -p \$dldir~ ! $install_prog $dir/$dlname \$dldir/$dlname' ! postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ! dlpath=$dir/\$dldll~ ! $rm \$dlpath' ! shlibpath_overrides_runpath=yes ! ! case $host_os in ! cygwin*) ! # Cygwin DLLs use 'cyg' prefix rather than 'lib' ! soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ! sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib" ! ;; ! mingw*) ! # MinGW DLLs use traditional 'lib' prefix ! soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ! sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` ! if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then ! # It is most probably a Windows format PATH printed by ! # mingw gcc, but we are running on Cygwin. Gcc prints its search ! # path with ; separators, and with drive letters. We can handle the ! # drive letters (cygwin fileutils understands them), so leave them, ! # especially as we might pass files found there to a mingw objdump, ! # which wouldn't understand a cygwinified path. Ahh. ! sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ! else ! sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ! fi ! ;; ! pw32*) ! # pw32 DLLs use 'pw' prefix rather than 'lib' ! library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' ! ;; ! esac ! ;; ! ! *) ! library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ! ;; ! esac ! dynamic_linker='Win32 ld.exe' ! # FIXME: first we should search . and the directory the executable is in ! shlibpath_var=PATH ! ;; ! ! darwin* | rhapsody*) ! dynamic_linker="$host_os dyld" ! version_type=darwin ! need_lib_prefix=no ! need_version=no ! # FIXME: Relying on posixy $() will cause problems for ! # cross-compilation, but unfortunately the echo tests do not ! # yet detect zsh echo's removal of \ escapes. ! library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' ! soname_spec='${libname}${release}${major}$shared_ext' ! shlibpath_overrides_runpath=yes ! shlibpath_var=DYLD_LIBRARY_PATH ! shrext='$(test .$module = .yes && echo .so || echo .dylib)' ! # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. ! if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then ! sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` ! fi ! sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ! ;; ! ! dgux*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! ;; ! ! freebsd1*) ! dynamic_linker=no ! ;; ! ! freebsd*) ! objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` ! version_type=freebsd-$objformat ! case $version_type in ! freebsd-elf*) ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' ! need_version=no ! need_lib_prefix=no ! ;; ! freebsd-*) ! library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' ! need_version=yes ! ;; ! esac ! shlibpath_var=LD_LIBRARY_PATH ! case $host_os in ! freebsd2*) ! shlibpath_overrides_runpath=yes ! ;; ! freebsd3.01* | freebsdelf3.01*) ! shlibpath_overrides_runpath=yes ! hardcode_into_libs=yes ! ;; ! *) # from 3.2 on ! shlibpath_overrides_runpath=no ! hardcode_into_libs=yes ! ;; ! esac ! ;; ! ! gnu*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! hardcode_into_libs=yes ! ;; ! ! hpux9* | hpux10* | hpux11*) ! # Give a soname corresponding to the major version so that dld.sl refuses to ! # link against other versions. ! version_type=sunos ! need_lib_prefix=no ! need_version=no ! case "$host_cpu" in ! ia64*) ! shrext='.so' ! hardcode_into_libs=yes ! dynamic_linker="$host_os dld.so" ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! if test "X$HPUX_IA64_MODE" = X32; then ! sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" ! else ! sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" ! fi ! sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ! ;; ! hppa*64*) ! shrext='.sl' ! hardcode_into_libs=yes ! dynamic_linker="$host_os dld.sl" ! shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH ! shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" ! sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ! ;; ! *) ! shrext='.sl' ! dynamic_linker="$host_os dld.sl" ! shlibpath_var=SHLIB_PATH ! shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! ;; ! esac ! # HP-UX runs *really* slowly unless shared libraries are mode 555. ! postinstall_cmds='chmod 555 $lib' ! ;; ! ! irix5* | irix6* | nonstopux*) ! case $host_os in ! nonstopux*) version_type=nonstopux ;; ! *) ! if test "$lt_cv_prog_gnu_ld" = yes; then ! version_type=linux ! else ! version_type=irix ! fi ;; ! esac ! need_lib_prefix=no ! need_version=no ! soname_spec='${libname}${release}${shared_ext}$major' ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' ! case $host_os in ! irix5* | nonstopux*) ! libsuff= shlibsuff= ! ;; ! *) ! case $LD in # libtool.m4 will add one of these switches to LD ! *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") ! libsuff= shlibsuff= libmagic=32-bit;; ! *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") ! libsuff=32 shlibsuff=N32 libmagic=N32;; ! *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") ! libsuff=64 shlibsuff=64 libmagic=64-bit;; ! *) libsuff= shlibsuff= libmagic=never-match;; ! esac ! ;; ! esac ! shlibpath_var=LD_LIBRARY${shlibsuff}_PATH ! shlibpath_overrides_runpath=no ! sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" ! sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" ! hardcode_into_libs=yes ! ;; ! ! # No shared lib support for Linux oldld, aout, or coff. ! linux*oldld* | linux*aout* | linux*coff*) ! dynamic_linker=no ! ;; ! ! # This must be Linux ELF. ! linux*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=no ! # This implies no fast_install, which is unacceptable. ! # Some rework will be needed to allow for fast_install ! # before this can be enabled. ! hardcode_into_libs=yes ! ! # We used to test for /lib/ld.so.1 and disable shared libraries on ! # powerpc, because MkLinux only supported shared libraries with the ! # GNU dynamic linker. Since this was broken with cross compilers, ! # most powerpc-linux boxes support dynamic linking these days and ! # people can always --disable-shared, the test was removed, and we ! # assume the GNU/Linux dynamic linker is in use. ! dynamic_linker='GNU/Linux ld.so' ! ;; ! ! netbsd*) ! version_type=sunos ! need_lib_prefix=no ! need_version=no ! if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' ! dynamic_linker='NetBSD (a.out) ld.so' ! else ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! dynamic_linker='NetBSD ld.elf_so' ! fi ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! hardcode_into_libs=yes ! ;; ! ! newsos6) ! version_type=linux ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! ;; ! ! nto-qnx) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! ;; ! ! openbsd*) ! version_type=sunos ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' ! shlibpath_var=LD_LIBRARY_PATH ! if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then ! case $host_os in ! openbsd2.[89] | openbsd2.[89].*) ! shlibpath_overrides_runpath=no ! ;; ! *) ! shlibpath_overrides_runpath=yes ! ;; ! esac ! else ! shlibpath_overrides_runpath=yes ! fi ! ;; ! ! os2*) ! libname_spec='$name' ! shrext=".dll" ! need_lib_prefix=no ! library_names_spec='$libname${shared_ext} $libname.a' ! dynamic_linker='OS/2 ld.exe' ! shlibpath_var=LIBPATH ! ;; ! ! osf3* | osf4* | osf5*) ! version_type=osf ! need_lib_prefix=no ! need_version=no ! soname_spec='${libname}${release}${shared_ext}$major' ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! shlibpath_var=LD_LIBRARY_PATH ! sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" ! sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ! ;; ! ! sco3.2v5*) ! version_type=osf ! soname_spec='${libname}${release}${shared_ext}$major' ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! shlibpath_var=LD_LIBRARY_PATH ! ;; ! ! solaris*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! hardcode_into_libs=yes ! # ldd complains unless libraries are executable ! postinstall_cmds='chmod +x $lib' ! ;; ! ! sunos4*) ! version_type=sunos ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' ! finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! if test "$with_gnu_ld" = yes; then ! need_lib_prefix=no ! fi ! need_version=yes ! ;; ! ! sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) ! version_type=linux ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! case $host_vendor in ! sni) ! shlibpath_overrides_runpath=no ! need_lib_prefix=no ! export_dynamic_flag_spec='${wl}-Blargedynsym' ! runpath_var=LD_RUN_PATH ! ;; ! siemens) ! need_lib_prefix=no ! ;; ! motorola) ! need_lib_prefix=no ! need_version=no ! shlibpath_overrides_runpath=no ! sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ! ;; ! esac ! ;; ! ! sysv4*MP*) ! if test -d /usr/nec ;then ! version_type=linux ! library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' ! soname_spec='$libname${shared_ext}.$major' ! shlibpath_var=LD_LIBRARY_PATH ! fi ! ;; ! ! uts4*) ! version_type=linux ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! ;; ! ! *) ! dynamic_linker=no ! ;; ! esac ! echo "$as_me:$LINENO: result: $dynamic_linker" >&5 ! echo "${ECHO_T}$dynamic_linker" >&6 ! test "$dynamic_linker" = no && can_build_shared=no ! ! ! # The else clause should only fire when bootstrapping the ! # libtool distribution, otherwise you forgot to ship ltmain.sh ! # with your package, and you will get complaints that there are ! # no rules to generate ltmain.sh. ! if test -f "$ltmain"; then ! # See if we are running on zsh, and set the options which allow our commands through ! # without removal of \ escapes. ! if test -n "${ZSH_VERSION+set}" ; then ! setopt NO_GLOB_SUBST ! fi ! # Now quote all the things that may contain metacharacters while being ! # careful not to overquote the AC_SUBSTed values. We take copies of the ! # variables and quote the copies for generation of the libtool script. ! for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \ ! libname_spec library_names_spec soname_spec extract_expsyms_cmds \ ! old_striplib striplib file_magic_cmd finish_cmds finish_eval \ ! deplibs_check_method reload_flag reload_cmds need_locks \ ! lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ ! lt_cv_sys_global_symbol_to_c_name_address \ ! sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ ! old_postinstall_cmds old_postuninstall_cmds \ ! compiler_F77 \ ! CC_F77 \ ! LD_F77 \ ! lt_prog_compiler_wl_F77 \ ! lt_prog_compiler_pic_F77 \ ! lt_prog_compiler_static_F77 \ ! lt_prog_compiler_no_builtin_flag_F77 \ ! export_dynamic_flag_spec_F77 \ ! thread_safe_flag_spec_F77 \ ! whole_archive_flag_spec_F77 \ ! enable_shared_with_static_runtimes_F77 \ ! old_archive_cmds_F77 \ ! old_archive_from_new_cmds_F77 \ ! predep_objects_F77 \ ! postdep_objects_F77 \ ! predeps_F77 \ ! postdeps_F77 \ ! compiler_lib_search_path_F77 \ ! archive_cmds_F77 \ ! archive_expsym_cmds_F77 \ ! postinstall_cmds_F77 \ ! postuninstall_cmds_F77 \ ! old_archive_from_expsyms_cmds_F77 \ ! allow_undefined_flag_F77 \ ! no_undefined_flag_F77 \ ! export_symbols_cmds_F77 \ ! hardcode_libdir_flag_spec_F77 \ ! hardcode_libdir_flag_spec_ld_F77 \ ! hardcode_libdir_separator_F77 \ ! hardcode_automatic_F77 \ ! module_cmds_F77 \ ! module_expsym_cmds_F77 \ ! lt_cv_prog_compiler_c_o_F77 \ ! exclude_expsyms_F77 \ ! include_expsyms_F77; do ! ! case $var in ! old_archive_cmds_F77 | \ ! old_archive_from_new_cmds_F77 | \ ! archive_cmds_F77 | \ ! archive_expsym_cmds_F77 | \ ! module_cmds_F77 | \ ! module_expsym_cmds_F77 | \ ! old_archive_from_expsyms_cmds_F77 | \ ! export_symbols_cmds_F77 | \ ! extract_expsyms_cmds | reload_cmds | finish_cmds | \ ! postinstall_cmds | postuninstall_cmds | \ ! old_postinstall_cmds | old_postuninstall_cmds | \ ! sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) ! # Double-quote double-evaled strings. ! eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ! ;; ! *) ! eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ! ;; ! esac ! done ! ! case $lt_echo in ! *'\$0 --fallback-echo"') ! lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ! ;; ! esac ! ! cfgfile="$ofile" ! ! cat <<__EOF__ >> "$cfgfile" ! # ### BEGIN LIBTOOL TAG CONFIG: $tagname ! ! # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: ! ! # Shell to use when invoking shell scripts. ! SHELL=$lt_SHELL ! ! # Whether or not to build shared libraries. ! build_libtool_libs=$enable_shared ! ! # Whether or not to build static libraries. ! build_old_libs=$enable_static ! ! # Whether or not to add -lc for building shared libraries. ! build_libtool_need_lc=$archive_cmds_need_lc_F77 ! ! # Whether or not to disallow shared libs when runtime libs are static ! allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 ! ! # Whether or not to optimize for fast installation. ! fast_install=$enable_fast_install ! ! # The host system. ! host_alias=$host_alias ! host=$host ! ! # An echo program that does not interpret backslashes. ! echo=$lt_echo ! ! # The archiver. ! AR=$lt_AR ! AR_FLAGS=$lt_AR_FLAGS ! ! # A C compiler. ! LTCC=$lt_LTCC ! ! # A language-specific compiler. ! CC=$lt_compiler_F77 ! ! # Is the compiler the GNU C compiler? ! with_gcc=$GCC_F77 ! ! # An ERE matcher. ! EGREP=$lt_EGREP ! ! # The linker used to build libraries. ! LD=$lt_LD_F77 ! ! # Whether we need hard or soft links. ! LN_S=$lt_LN_S ! ! # A BSD-compatible nm program. ! NM=$lt_NM ! ! # A symbol stripping program ! STRIP=$STRIP ! ! # Used to examine libraries when file_magic_cmd begins "file" ! MAGIC_CMD=$MAGIC_CMD ! ! # Used on cygwin: DLL creation program. ! DLLTOOL="$DLLTOOL" ! ! # Used on cygwin: object dumper. ! OBJDUMP="$OBJDUMP" ! ! # Used on cygwin: assembler. ! AS="$AS" ! ! # The name of the directory that contains temporary libtool files. ! objdir=$objdir ! ! # How to create reloadable object files. ! reload_flag=$lt_reload_flag ! reload_cmds=$lt_reload_cmds ! ! # How to pass a linker flag through the compiler. ! wl=$lt_lt_prog_compiler_wl_F77 ! ! # Object file suffix (normally "o"). ! objext="$ac_objext" ! ! # Old archive suffix (normally "a"). ! libext="$libext" ! ! # Shared library suffix (normally ".so"). ! shrext='$shrext' ! ! # Executable file suffix (normally ""). ! exeext="$exeext" ! ! # Additional compiler flags for building library objects. ! pic_flag=$lt_lt_prog_compiler_pic_F77 ! pic_mode=$pic_mode ! ! # What is the maximum length of a command? ! max_cmd_len=$lt_cv_sys_max_cmd_len ! ! # Does compiler simultaneously support -c and -o options? ! compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 ! ! # Must we lock files when doing compilation ? ! need_locks=$lt_need_locks ! ! # Do we need the lib prefix for modules? ! need_lib_prefix=$need_lib_prefix ! ! # Do we need a version for libraries? ! need_version=$need_version ! ! # Whether dlopen is supported. ! dlopen_support=$enable_dlopen ! ! # Whether dlopen of programs is supported. ! dlopen_self=$enable_dlopen_self ! ! # Whether dlopen of statically linked programs is supported. ! dlopen_self_static=$enable_dlopen_self_static ! ! # Compiler flag to prevent dynamic linking. ! link_static_flag=$lt_lt_prog_compiler_static_F77 ! ! # Compiler flag to turn off builtin functions. ! no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 ! ! # Compiler flag to allow reflexive dlopens. ! export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 ! ! # Compiler flag to generate shared objects directly from archives. ! whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 ! ! # Compiler flag to generate thread-safe objects. ! thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 ! ! # Library versioning type. ! version_type=$version_type ! ! # Format of library name prefix. ! libname_spec=$lt_libname_spec ! ! # List of archive names. First name is the real one, the rest are links. ! # The last name is the one that the linker finds with -lNAME. ! library_names_spec=$lt_library_names_spec ! ! # The coded name of the library, if different from the real name. ! soname_spec=$lt_soname_spec ! ! # Commands used to build and install an old-style archive. ! RANLIB=$lt_RANLIB ! old_archive_cmds=$lt_old_archive_cmds_F77 ! old_postinstall_cmds=$lt_old_postinstall_cmds ! old_postuninstall_cmds=$lt_old_postuninstall_cmds ! ! # Create an old-style archive from a shared archive. ! old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 ! ! # Create a temporary old-style archive to link instead of a shared archive. ! old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 ! ! # Commands used to build and install a shared archive. ! archive_cmds=$lt_archive_cmds_F77 ! archive_expsym_cmds=$lt_archive_expsym_cmds_F77 ! postinstall_cmds=$lt_postinstall_cmds ! postuninstall_cmds=$lt_postuninstall_cmds ! ! # Commands used to build a loadable module (assumed same as above if empty) ! module_cmds=$lt_module_cmds_F77 ! module_expsym_cmds=$lt_module_expsym_cmds_F77 ! ! # Commands to strip libraries. ! old_striplib=$lt_old_striplib ! striplib=$lt_striplib ! ! # Dependencies to place before the objects being linked to create a ! # shared library. ! predep_objects=$lt_predep_objects_F77 ! ! # Dependencies to place after the objects being linked to create a ! # shared library. ! postdep_objects=$lt_postdep_objects_F77 ! ! # Dependencies to place before the objects being linked to create a ! # shared library. ! predeps=$lt_predeps_F77 ! ! # Dependencies to place after the objects being linked to create a ! # shared library. ! postdeps=$lt_postdeps_F77 ! ! # The library search path used internally by the compiler when linking ! # a shared library. ! compiler_lib_search_path=$lt_compiler_lib_search_path_F77 ! ! # Method to check whether dependent libraries are shared objects. ! deplibs_check_method=$lt_deplibs_check_method ! ! # Command to use when deplibs_check_method == file_magic. ! file_magic_cmd=$lt_file_magic_cmd ! ! # Flag that allows shared libraries with undefined symbols to be built. ! allow_undefined_flag=$lt_allow_undefined_flag_F77 ! ! # Flag that forces no undefined symbols. ! no_undefined_flag=$lt_no_undefined_flag_F77 ! ! # Commands used to finish a libtool library installation in a directory. ! finish_cmds=$lt_finish_cmds ! ! # Same as above, but a single script fragment to be evaled but not shown. ! finish_eval=$lt_finish_eval ! ! # Take the output of nm and produce a listing of raw symbols and C names. ! global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe ! ! # Transform the output of nm in a proper C declaration ! global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl ! ! # Transform the output of nm in a C name address pair ! global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address ! ! # This is the shared library runtime path variable. ! runpath_var=$runpath_var ! ! # This is the shared library path variable. ! shlibpath_var=$shlibpath_var ! ! # Is shlibpath searched before the hard-coded library search path? ! shlibpath_overrides_runpath=$shlibpath_overrides_runpath ! ! # How to hardcode a shared library path into an executable. ! hardcode_action=$hardcode_action_F77 ! ! # Whether we should hardcode library paths into libraries. ! hardcode_into_libs=$hardcode_into_libs ! ! # Flag to hardcode \$libdir into a binary during linking. ! # This must work even if \$libdir does not exist. ! hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 ! ! # If ld is used when linking, flag to hardcode \$libdir into ! # a binary during linking. This must work even if \$libdir does ! # not exist. ! hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 ! ! # Whether we need a single -rpath flag with a separated argument. ! hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 ! ! # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the ! # resulting binary. ! hardcode_direct=$hardcode_direct_F77 ! ! # Set to yes if using the -LDIR flag during linking hardcodes DIR into the ! # resulting binary. ! hardcode_minus_L=$hardcode_minus_L_F77 ! ! # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into ! # the resulting binary. ! hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 ! ! # Set to yes if building a shared library automatically hardcodes DIR into the library ! # and all subsequent libraries and executables linked against it. ! hardcode_automatic=$hardcode_automatic_F77 ! ! # Variables whose values should be saved in libtool wrapper scripts and ! # restored at relink time. ! variables_saved_for_relink="$variables_saved_for_relink" ! ! # Whether libtool must link a program against all its dependency libraries. ! link_all_deplibs=$link_all_deplibs_F77 ! ! # Compile-time system search path for libraries ! sys_lib_search_path_spec=$lt_sys_lib_search_path_spec ! ! # Run-time system search path for libraries ! sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec ! ! # Fix the shell variable \$srcfile for the compiler. ! fix_srcfile_path="$fix_srcfile_path_F77" ! ! # Set to yes if exported symbols are required. ! always_export_symbols=$always_export_symbols_F77 ! ! # The commands to list exported symbols. ! export_symbols_cmds=$lt_export_symbols_cmds_F77 ! ! # The commands to extract the exported symbol list from a shared archive. ! extract_expsyms_cmds=$lt_extract_expsyms_cmds ! ! # Symbols that should not be listed in the preloaded symbols. ! exclude_expsyms=$lt_exclude_expsyms_F77 ! ! # Symbols that must always be exported. ! include_expsyms=$lt_include_expsyms_F77 ! ! # ### END LIBTOOL TAG CONFIG: $tagname ! ! __EOF__ else ! # If there is no Makefile yet, we rely on a make rule to execute ! # `config.status --recheck' to rerun these tests and create the ! # libtool script then. ! test -f Makefile && make "$ltmain" fi ! ac_ext=c ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ! ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_c_compiler_gnu ! ! CC="$lt_save_CC" ! ! else ! tagname="" ! fi ! ;; ! ! GCJ) ! if test -n "$GCJ" && test "X$GCJ" != "Xno"; then ! ! ! ! # Source file extension for Java test sources. ! ac_ext=java ! ! # Object file extension for compiled Java test sources. ! objext=o ! objext_GCJ=$objext ! ! # Code to be used in simple compile tests ! lt_simple_compile_test_code="class foo {}\n" ! ! # Code to be used in simple link tests ! lt_simple_link_test_code='public class conftest { public static void main(String argv) {}; }\n' ! ! # ltmain only uses $CC for tagged configurations so make sure $CC is set. ! ! # If no C compiler was specified, use CC. ! LTCC=${LTCC-"$CC"} ! ! # Allow CC to be a program name with arguments. ! compiler=$CC ! ! ! # Allow CC to be a program name with arguments. ! lt_save_CC="$CC" ! CC=${GCJ-"gcj"} ! compiler=$CC ! compiler_GCJ=$CC ! ! # GCJ did not exist at the time GCC didn't implicitly link libc in. ! archive_cmds_need_lc_GCJ=no ! ! ! lt_prog_compiler_no_builtin_flag_GCJ= ! ! if test "$GCC" = yes; then ! lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' ! ! echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 ! echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 ! if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! lt_cv_prog_compiler_rtti_exceptions=no ! ac_outfile=conftest.$ac_objext ! printf "$lt_simple_compile_test_code" > conftest.$ac_ext ! lt_compiler_flag="-fno-rtti -fno-exceptions" ! # Insert the option either (1) after the last *FLAGS variable, or ! # (2) before a word containing "conftest.", or (3) at the end. ! # Note that $ac_compile itself does not contain backslashes and begins ! # with a dollar sign (not a hyphen), so the echo should work correctly. ! # The option is referenced via a variable to avoid confusing sed. ! lt_compile=`echo "$ac_compile" | $SED \ ! -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ ! -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ ! -e 's:$: $lt_compiler_flag:'` ! (eval echo "\"\$as_me:15273: $lt_compile\"" >&5) ! (eval "$lt_compile" 2>conftest.err) ! ac_status=$? ! cat conftest.err >&5 ! echo "$as_me:15277: \$? = $ac_status" >&5 ! if (exit $ac_status) && test -s "$ac_outfile"; then ! # The compiler can only warn and ignore the option if not recognized ! # So say no if there are warnings ! if test ! -s conftest.err; then ! lt_cv_prog_compiler_rtti_exceptions=yes ! fi ! fi ! $rm conftest* fi + echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 + echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 + if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" + else + : + fi fi ! ! lt_prog_compiler_wl_GCJ= ! lt_prog_compiler_pic_GCJ= ! lt_prog_compiler_static_GCJ= ! ! echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 ! echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ! ! if test "$GCC" = yes; then ! lt_prog_compiler_wl_GCJ='-Wl,' ! lt_prog_compiler_static_GCJ='-static' ! ! case $host_os in ! aix*) ! # All AIX code is PIC. ! if test "$host_cpu" = ia64; then ! # AIX 5 now supports IA64 processor ! lt_prog_compiler_static_GCJ='-Bstatic' ! fi ! ;; ! ! amigaos*) ! # FIXME: we need at least 68020 code to build shared libraries, but ! # adding the `-m68020' flag to GCC prevents building anything better, ! # like `-m68040'. ! lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ! ;; ! ! beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) ! # PIC is the default for these OSes. ! ;; ! ! mingw* | pw32* | os2*) ! # This hack is so that the source file can tell whether it is being ! # built for inclusion in a dll (and should export symbols for example). ! lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ! ;; ! ! darwin* | rhapsody*) ! # PIC is the default on this platform ! # Common symbols not allowed in MH_DYLIB files ! lt_prog_compiler_pic_GCJ='-fno-common' ! ;; ! ! msdosdjgpp*) ! # Just because we use GCC doesn't mean we suddenly get shared libraries ! # on systems that don't support them. ! lt_prog_compiler_can_build_shared_GCJ=no ! enable_shared=no ! ;; ! ! sysv4*MP*) ! if test -d /usr/nec; then ! lt_prog_compiler_pic_GCJ=-Kconform_pic ! fi ! ;; ! ! hpux*) ! # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but ! # not for PA HP-UX. ! case "$host_cpu" in ! hppa*64*|ia64*) ! # +Z the default ! ;; ! *) ! lt_prog_compiler_pic_GCJ='-fPIC' ! ;; ! esac ! ;; ! ! *) ! lt_prog_compiler_pic_GCJ='-fPIC' ! ;; ! esac ! else ! # PORTME Check for flag to pass linker flags through the system compiler. ! case $host_os in ! aix*) ! lt_prog_compiler_wl_GCJ='-Wl,' ! if test "$host_cpu" = ia64; then ! # AIX 5 now supports IA64 processor ! lt_prog_compiler_static_GCJ='-Bstatic' ! else ! lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' ! fi ! ;; ! ! mingw* | pw32* | os2*) ! # This hack is so that the source file can tell whether it is being ! # built for inclusion in a dll (and should export symbols for example). ! lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ! ;; ! ! hpux9* | hpux10* | hpux11*) ! lt_prog_compiler_wl_GCJ='-Wl,' ! # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but ! # not for PA HP-UX. ! case "$host_cpu" in ! hppa*64*|ia64*) ! # +Z the default ! ;; ! *) ! lt_prog_compiler_pic_GCJ='+Z' ! ;; ! esac ! # Is there a better lt_prog_compiler_static that works with the bundled CC? ! lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' ! ;; ! ! irix5* | irix6* | nonstopux*) ! lt_prog_compiler_wl_GCJ='-Wl,' ! # PIC (with -KPIC) is the default. ! lt_prog_compiler_static_GCJ='-non_shared' ! ;; ! ! newsos6) ! lt_prog_compiler_pic_GCJ='-KPIC' ! lt_prog_compiler_static_GCJ='-Bstatic' ! ;; ! ! linux*) ! case $CC in ! icc|ecc) ! lt_prog_compiler_wl_GCJ='-Wl,' ! lt_prog_compiler_pic_GCJ='-KPIC' ! lt_prog_compiler_static_GCJ='-static' ! ;; ! ccc) ! lt_prog_compiler_wl_GCJ='-Wl,' ! # All Alpha code is PIC. ! lt_prog_compiler_static_GCJ='-non_shared' ! ;; ! esac ! ;; ! ! osf3* | osf4* | osf5*) ! lt_prog_compiler_wl_GCJ='-Wl,' ! # All OSF/1 code is PIC. ! lt_prog_compiler_static_GCJ='-non_shared' ! ;; ! ! sco3.2v5*) ! lt_prog_compiler_pic_GCJ='-Kpic' ! lt_prog_compiler_static_GCJ='-dn' ! ;; ! ! solaris*) ! lt_prog_compiler_wl_GCJ='-Wl,' ! lt_prog_compiler_pic_GCJ='-KPIC' ! lt_prog_compiler_static_GCJ='-Bstatic' ! ;; ! ! sunos4*) ! lt_prog_compiler_wl_GCJ='-Qoption ld ' ! lt_prog_compiler_pic_GCJ='-PIC' ! lt_prog_compiler_static_GCJ='-Bstatic' ! ;; ! ! sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) ! lt_prog_compiler_wl_GCJ='-Wl,' ! lt_prog_compiler_pic_GCJ='-KPIC' ! lt_prog_compiler_static_GCJ='-Bstatic' ! ;; ! ! sysv4*MP*) ! if test -d /usr/nec ;then ! lt_prog_compiler_pic_GCJ='-Kconform_pic' ! lt_prog_compiler_static_GCJ='-Bstatic' ! fi ! ;; ! ! uts4*) ! lt_prog_compiler_pic_GCJ='-pic' ! lt_prog_compiler_static_GCJ='-Bstatic' ! ;; ! ! *) ! lt_prog_compiler_can_build_shared_GCJ=no ! ;; ! esac ! fi ! ! echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 ! echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6 ! ! # ! # Check to make sure the PIC flag actually works. ! # ! if test -n "$lt_prog_compiler_pic_GCJ"; then ! echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 ! echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 ! if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! lt_prog_compiler_pic_works_GCJ=no ! ac_outfile=conftest.$ac_objext ! printf "$lt_simple_compile_test_code" > conftest.$ac_ext ! lt_compiler_flag="$lt_prog_compiler_pic_GCJ" ! # Insert the option either (1) after the last *FLAGS variable, or ! # (2) before a word containing "conftest.", or (3) at the end. ! # Note that $ac_compile itself does not contain backslashes and begins ! # with a dollar sign (not a hyphen), so the echo should work correctly. ! # The option is referenced via a variable to avoid confusing sed. ! lt_compile=`echo "$ac_compile" | $SED \ ! -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ ! -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ ! -e 's:$: $lt_compiler_flag:'` ! (eval echo "\"\$as_me:15505: $lt_compile\"" >&5) ! (eval "$lt_compile" 2>conftest.err) ! ac_status=$? ! cat conftest.err >&5 ! echo "$as_me:15509: \$? = $ac_status" >&5 ! if (exit $ac_status) && test -s "$ac_outfile"; then ! # The compiler can only warn and ignore the option if not recognized ! # So say no if there are warnings ! if test ! -s conftest.err; then ! lt_prog_compiler_pic_works_GCJ=yes ! fi ! fi ! $rm conftest* ! ! fi ! echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 ! echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 ! ! if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then ! case $lt_prog_compiler_pic_GCJ in ! "" | " "*) ;; ! *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; ! esac else ! lt_prog_compiler_pic_GCJ= ! lt_prog_compiler_can_build_shared_GCJ=no ! fi ! ! fi ! case "$host_os" in ! # For platforms which do not support PIC, -DPIC is meaningless: ! *djgpp*) ! lt_prog_compiler_pic_GCJ= ! ;; ! *) ! lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" ! ;; ! esac ! ! echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 ! echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 ! if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! lt_cv_prog_compiler_c_o_GCJ=no ! $rm -r conftest 2>/dev/null ! mkdir conftest ! cd conftest ! mkdir out ! printf "$lt_simple_compile_test_code" > conftest.$ac_ext ! ! # According to Tom Tromey, Ian Lance Taylor reported there are C compilers ! # that will create temporary files in the current directory regardless of ! # the output directory. Thus, making CWD read-only will cause this test ! # to fail, enabling locking or at least warning the user not to do parallel ! # builds. ! chmod -w . ! ! lt_compiler_flag="-o out/conftest2.$ac_objext" ! # Insert the option either (1) after the last *FLAGS variable, or ! # (2) before a word containing "conftest.", or (3) at the end. ! # Note that $ac_compile itself does not contain backslashes and begins ! # with a dollar sign (not a hyphen), so the echo should work correctly. ! lt_compile=`echo "$ac_compile" | $SED \ ! -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ ! -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ ! -e 's:$: $lt_compiler_flag:'` ! (eval echo "\"\$as_me:15572: $lt_compile\"" >&5) ! (eval "$lt_compile" 2>out/conftest.err) ! ac_status=$? ! cat out/conftest.err >&5 ! echo "$as_me:15576: \$? = $ac_status" >&5 ! if (exit $ac_status) && test -s out/conftest2.$ac_objext ! then ! # The compiler can only warn and ignore the option if not recognized ! # So say no if there are warnings ! if test ! -s out/conftest.err; then ! lt_cv_prog_compiler_c_o_GCJ=yes ! fi ! fi ! chmod u+w . ! $rm conftest* out/* ! rmdir out ! cd .. ! rmdir conftest ! $rm conftest* ! ! fi ! echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 ! echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 ! ! ! hard_links="nottested" ! if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then ! # do not overwrite the value of need_locks provided by the user ! echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 ! echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 ! hard_links=yes ! $rm conftest* ! ln conftest.a conftest.b 2>/dev/null && hard_links=no ! touch conftest.a ! ln conftest.a conftest.b 2>&5 || hard_links=no ! ln conftest.a conftest.b 2>/dev/null && hard_links=no ! echo "$as_me:$LINENO: result: $hard_links" >&5 ! echo "${ECHO_T}$hard_links" >&6 ! if test "$hard_links" = no; then ! { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 ! echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} ! need_locks=warn ! fi else ! need_locks=no fi ! ! echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 ! echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 ! ! runpath_var= ! allow_undefined_flag_GCJ= ! enable_shared_with_static_runtimes_GCJ=no ! archive_cmds_GCJ= ! archive_expsym_cmds_GCJ= ! old_archive_From_new_cmds_GCJ= ! old_archive_from_expsyms_cmds_GCJ= ! export_dynamic_flag_spec_GCJ= ! whole_archive_flag_spec_GCJ= ! thread_safe_flag_spec_GCJ= ! hardcode_libdir_flag_spec_GCJ= ! hardcode_libdir_flag_spec_ld_GCJ= ! hardcode_libdir_separator_GCJ= ! hardcode_direct_GCJ=no ! hardcode_minus_L_GCJ=no ! hardcode_shlibpath_var_GCJ=unsupported ! link_all_deplibs_GCJ=unknown ! hardcode_automatic_GCJ=no ! module_cmds_GCJ= ! module_expsym_cmds_GCJ= ! always_export_symbols_GCJ=no ! export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ! # include_expsyms should be a list of space-separated symbols to be *always* ! # included in the symbol list ! include_expsyms_GCJ= ! # exclude_expsyms can be an extended regexp of symbols to exclude ! # it will be wrapped by ` (' and `)$', so one must not match beginning or ! # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', ! # as well as any symbol that contains `d'. ! exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" ! # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out ! # platforms (ab)use it in PIC code, but their linkers get confused if ! # the symbol is explicitly referenced. Since portable code cannot ! # rely on this symbol name, it's probably fine to never include it in ! # preloaded symbol tables. ! extract_expsyms_cmds= ! ! case $host_os in ! cygwin* | mingw* | pw32*) ! # FIXME: the MSVC++ port hasn't been tested in a loooong time ! # When not using gcc, we currently assume that we are using ! # Microsoft Visual C++. ! if test "$GCC" != yes; then ! with_gnu_ld=no ! fi ! ;; ! openbsd*) ! with_gnu_ld=no ! ;; ! esac ! ! ld_shlibs_GCJ=yes ! if test "$with_gnu_ld" = yes; then ! # If archive_cmds runs LD, not CC, wlarc should be empty ! wlarc='${wl}' ! ! # See if GNU ld supports shared libraries. ! case $host_os in ! aix3* | aix4* | aix5*) ! # On AIX/PPC, the GNU linker is very broken ! if test "$host_cpu" != ia64; then ! ld_shlibs_GCJ=no ! cat <&2 ! ! *** Warning: the GNU linker, at least up to release 2.9.1, is reported ! *** to be unable to reliably create shared libraries on AIX. ! *** Therefore, libtool is disabling shared libraries support. If you ! *** really care for shared libraries, you may want to modify your PATH ! *** so that a non-GNU linker is found, and then restart. ! ! EOF ! fi ! ;; ! ! amigaos*) ! archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' ! hardcode_libdir_flag_spec_GCJ='-L$libdir' ! hardcode_minus_L_GCJ=yes ! ! # Samuel A. Falvo II reports ! # that the semantics of dynamic libraries on AmigaOS, at least up ! # to version 4, is to share data among multiple programs linked ! # with the same dynamic library. Since this doesn't match the ! # behavior of shared libraries on other platforms, we can't use ! # them. ! ld_shlibs_GCJ=no ! ;; ! ! beos*) ! if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then ! allow_undefined_flag_GCJ=unsupported ! # Joseph Beckenbach says some releases of gcc ! # support --undefined. This deserves some investigation. FIXME ! archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ! else ! ld_shlibs_GCJ=no ! fi ! ;; ! ! cygwin* | mingw* | pw32*) ! # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, ! # as there is no search path for DLLs. ! hardcode_libdir_flag_spec_GCJ='-L$libdir' ! allow_undefined_flag_GCJ=unsupported ! always_export_symbols_GCJ=no ! enable_shared_with_static_runtimes_GCJ=yes ! export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' ! ! if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then ! archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' ! # If the export-symbols file already is a .def file (1st line ! # is EXPORTS), use it as is; otherwise, prepend... ! archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ! cp $export_symbols $output_objdir/$soname.def; ! else ! echo EXPORTS > $output_objdir/$soname.def; ! cat $export_symbols >> $output_objdir/$soname.def; ! fi~ ! $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' ! else ! ld_shlibs=no ! fi ! ;; ! ! netbsd*) ! if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then ! archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' ! wlarc= ! else ! archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ! archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ! fi ! ;; ! ! solaris* | sysv5*) ! if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ! ld_shlibs_GCJ=no ! cat <&2 ! ! *** Warning: The releases 2.8.* of the GNU linker cannot reliably ! *** create shared libraries on Solaris systems. Therefore, libtool ! *** is disabling shared libraries support. We urge you to upgrade GNU ! *** binutils to release 2.9.1 or newer. Another option is to modify ! *** your PATH or compiler configuration so that the native linker is ! *** used, and then restart. ! ! EOF ! elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then ! archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ! archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ! else ! ld_shlibs_GCJ=no ! fi ! ;; ! ! sunos4*) ! archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' ! wlarc= ! hardcode_direct_GCJ=yes ! hardcode_shlibpath_var_GCJ=no ! ;; ! ! *) ! if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then ! archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ! archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ! else ! ld_shlibs_GCJ=no ! fi ! ;; ! esac ! ! if test "$ld_shlibs_GCJ" = yes; then ! runpath_var=LD_RUN_PATH ! hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' ! export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' ! # ancient GNU ld didn't support --whole-archive et. al. ! if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then ! whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' ! else ! whole_archive_flag_spec_GCJ= ! fi ! fi ! else ! # PORTME fill in a description of your system's linker (not GNU ld) ! case $host_os in ! aix3*) ! allow_undefined_flag_GCJ=unsupported ! always_export_symbols_GCJ=yes ! archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' ! # Note: this linker hardcodes the directories in LIBPATH if there ! # are no directories specified by -L. ! hardcode_minus_L_GCJ=yes ! if test "$GCC" = yes && test -z "$link_static_flag"; then ! # Neither direct hardcoding nor static linking is supported with a ! # broken collect2. ! hardcode_direct_GCJ=unsupported ! fi ! ;; ! ! aix4* | aix5*) ! if test "$host_cpu" = ia64; then ! # On IA64, the linker does run time linking by default, so we don't ! # have to do anything special. ! aix_use_runtimelinking=no ! exp_sym_flag='-Bexport' ! no_entry_flag="" ! else ! # If we're using GNU nm, then we don't want the "-C" option. ! # -C means demangle to AIX nm, but means don't demangle with GNU nm ! if $NM -V 2>&1 | grep 'GNU' > /dev/null; then ! export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' ! else ! export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' ! fi ! aix_use_runtimelinking=no ! ! # Test if we are trying to use run time linking or normal ! # AIX style linking. If -brtl is somewhere in LDFLAGS, we ! # need to do runtime linking. ! case $host_os in aix4.[23]|aix4.[23].*|aix5*) ! for ld_flag in $LDFLAGS; do ! if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then ! aix_use_runtimelinking=yes ! break ! fi ! done ! esac ! ! exp_sym_flag='-bexport' ! no_entry_flag='-bnoentry' ! fi ! ! # When large executables or shared objects are built, AIX ld can ! # have problems creating the table of contents. If linking a library ! # or program results in "error TOC overflow" add -mminimal-toc to ! # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not ! # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. ! ! archive_cmds_GCJ='' ! hardcode_direct_GCJ=yes ! hardcode_libdir_separator_GCJ=':' ! link_all_deplibs_GCJ=yes ! ! if test "$GCC" = yes; then ! case $host_os in aix4.012|aix4.012.*) ! # We only want to do this on AIX 4.2 and lower, the check ! # below for broken collect2 doesn't work under 4.3+ ! collect2name=`${CC} -print-prog-name=collect2` ! if test -f "$collect2name" && \ ! strings "$collect2name" | grep resolve_lib_name >/dev/null ! then ! # We have reworked collect2 ! hardcode_direct_GCJ=yes ! else ! # We have old collect2 ! hardcode_direct_GCJ=unsupported ! # It fails to find uninstalled libraries when the uninstalled ! # path is not listed in the libpath. Setting hardcode_minus_L ! # to unsupported forces relinking ! hardcode_minus_L_GCJ=yes ! hardcode_libdir_flag_spec_GCJ='-L$libdir' ! hardcode_libdir_separator_GCJ= ! fi ! esac ! shared_flag='-shared' ! else ! # not using gcc ! if test "$host_cpu" = ia64; then ! # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release ! # chokes on -Wl,-G. The following line is correct: ! shared_flag='-G' ! else ! if test "$aix_use_runtimelinking" = yes; then ! shared_flag='${wl}-G' ! else ! shared_flag='${wl}-bM:SRE' ! fi ! fi ! fi ! ! # It seems that -bexpall does not export symbols beginning with ! # underscore (_), so it is better to generate a list of symbols to export. ! always_export_symbols_GCJ=yes ! if test "$aix_use_runtimelinking" = yes; then ! # Warning - without using the other runtime loading flags (-brtl), ! # -berok will link without error, but may produce a broken library. ! allow_undefined_flag_GCJ='-berok' ! # Determine the default libpath from the value encoded in an empty executable. ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! int ! main () ! { ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ! aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } ! }'` ! # Check for a 64-bit object if we didn't find anything. ! if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } ! }'`; fi ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ! ! hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" ! archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" ! else ! if test "$host_cpu" = ia64; then ! hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' ! allow_undefined_flag_GCJ="-z nodefs" ! archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" ! else ! # Determine the default libpath from the value encoded in an empty executable. ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! int ! main () ! { ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ! aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } ! }'` ! # Check for a 64-bit object if we didn't find anything. ! if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } ! }'`; fi ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ! ! hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" ! # Warning - without using the other run time loading flags, ! # -berok will link without error, but may produce a broken library. ! no_undefined_flag_GCJ=' ${wl}-bernotok' ! allow_undefined_flag_GCJ=' ${wl}-berok' ! # -bexpall does not export symbols beginning with underscore (_) ! always_export_symbols_GCJ=yes ! # Exported symbols can be pulled into shared objects from archives ! whole_archive_flag_spec_GCJ=' ' ! archive_cmds_need_lc_GCJ=yes ! # This is similar to how AIX traditionally builds it's shared libraries. ! archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' ! fi ! fi ! ;; ! ! amigaos*) ! archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' ! hardcode_libdir_flag_spec_GCJ='-L$libdir' ! hardcode_minus_L_GCJ=yes ! # see comment about different semantics on the GNU ld section ! ld_shlibs_GCJ=no ! ;; ! ! bsdi4*) ! export_dynamic_flag_spec_GCJ=-rdynamic ! ;; ! ! cygwin* | mingw* | pw32*) ! # When not using gcc, we currently assume that we are using ! # Microsoft Visual C++. ! # hardcode_libdir_flag_spec is actually meaningless, as there is ! # no search path for DLLs. ! hardcode_libdir_flag_spec_GCJ=' ' ! allow_undefined_flag_GCJ=unsupported ! # Tell ltmain to make .lib files, not .a files. ! libext=lib ! # Tell ltmain to make .dll files, not .so files. ! shrext=".dll" ! # FIXME: Setting linknames here is a bad hack. ! archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' ! # The linker will automatically build a .lib file if we build a DLL. ! old_archive_From_new_cmds_GCJ='true' ! # FIXME: Should let the user specify the lib program. ! old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' ! fix_srcfile_path='`cygpath -w "$srcfile"`' ! enable_shared_with_static_runtimes_GCJ=yes ! ;; ! ! darwin* | rhapsody*) ! if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then ! archive_cmds_need_lc_GCJ=no ! case "$host_os" in ! rhapsody* | darwin1.[012]) ! allow_undefined_flag_GCJ='-undefined suppress' ! ;; ! *) # Darwin 1.3 on ! test -z ${LD_TWOLEVEL_NAMESPACE} && allow_undefined_flag_GCJ='-flat_namespace -undefined suppress' ! ;; ! esac ! # FIXME: Relying on posixy $() will cause problems for ! # cross-compilation, but unfortunately the echo tests do not ! # yet detect zsh echo's removal of \ escapes. Also zsh mangles ! # `"' quotes if we put them in here... so don't! ! lt_int_apple_cc_single_mod=no ! output_verbose_link_cmd='echo' ! if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then ! lt_int_apple_cc_single_mod=yes ! fi ! if test "X$lt_int_apple_cc_single_mod" = Xyes ; then ! archive_cmds_GCJ='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' ! else ! archive_cmds_GCJ='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' ! fi ! module_cmds_GCJ='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' ! # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's ! if test "X$lt_int_apple_cc_single_mod" = Xyes ; then ! archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ! else ! archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ! fi ! module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ! hardcode_direct_GCJ=no ! hardcode_automatic_GCJ=yes ! hardcode_shlibpath_var_GCJ=unsupported ! whole_archive_flag_spec_GCJ='-all_load $convenience' ! link_all_deplibs_GCJ=yes ! fi ! ;; ! ! dgux*) ! archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_libdir_flag_spec_GCJ='-L$libdir' ! hardcode_shlibpath_var_GCJ=no ! ;; ! ! freebsd1*) ! ld_shlibs_GCJ=no ! ;; ! ! # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor ! # support. Future versions do this automatically, but an explicit c++rt0.o ! # does not break anything, and helps significantly (at the cost of a little ! # extra space). ! freebsd2.2*) ! archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' ! hardcode_libdir_flag_spec_GCJ='-R$libdir' ! hardcode_direct_GCJ=yes ! hardcode_shlibpath_var_GCJ=no ! ;; ! ! # Unfortunately, older versions of FreeBSD 2 do not have this feature. ! freebsd2*) ! archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' ! hardcode_direct_GCJ=yes ! hardcode_minus_L_GCJ=yes ! hardcode_shlibpath_var_GCJ=no ! ;; ! ! # FreeBSD 3 and greater uses gcc -shared to do shared libraries. ! freebsd*) ! archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' ! hardcode_libdir_flag_spec_GCJ='-R$libdir' ! hardcode_direct_GCJ=yes ! hardcode_shlibpath_var_GCJ=no ! ;; ! ! hpux9*) ! if test "$GCC" = yes; then ! archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ! else ! archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ! fi ! hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' ! hardcode_libdir_separator_GCJ=: ! hardcode_direct_GCJ=yes ! ! # hardcode_minus_L: Not really in the search PATH, ! # but as the default location of the library. ! hardcode_minus_L_GCJ=yes ! export_dynamic_flag_spec_GCJ='${wl}-E' ! ;; ! ! hpux10* | hpux11*) ! if test "$GCC" = yes -a "$with_gnu_ld" = no; then ! case "$host_cpu" in ! hppa*64*|ia64*) ! archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ! ;; ! *) ! archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ! ;; ! esac ! else ! case "$host_cpu" in ! hppa*64*|ia64*) ! archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ! ;; ! *) ! archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ! ;; ! esac ! fi ! if test "$with_gnu_ld" = no; then ! case "$host_cpu" in ! hppa*64*) ! hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' ! hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' ! hardcode_libdir_separator_GCJ=: ! hardcode_direct_GCJ=no ! hardcode_shlibpath_var_GCJ=no ! ;; ! ia64*) ! hardcode_libdir_flag_spec_GCJ='-L$libdir' ! hardcode_direct_GCJ=no ! hardcode_shlibpath_var_GCJ=no ! ! # hardcode_minus_L: Not really in the search PATH, ! # but as the default location of the library. ! hardcode_minus_L_GCJ=yes ! ;; ! *) ! hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' ! hardcode_libdir_separator_GCJ=: ! hardcode_direct_GCJ=yes ! export_dynamic_flag_spec_GCJ='${wl}-E' ! ! # hardcode_minus_L: Not really in the search PATH, ! # but as the default location of the library. ! hardcode_minus_L_GCJ=yes ! ;; ! esac ! fi ! ;; ! ! irix5* | irix6* | nonstopux*) ! if test "$GCC" = yes; then ! archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ! else ! archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' ! hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' ! fi ! hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' ! hardcode_libdir_separator_GCJ=: ! link_all_deplibs_GCJ=yes ! ;; ! ! netbsd*) ! if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then ! archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out ! else ! archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF ! fi ! hardcode_libdir_flag_spec_GCJ='-R$libdir' ! hardcode_direct_GCJ=yes ! hardcode_shlibpath_var_GCJ=no ! ;; ! ! newsos6) ! archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_direct_GCJ=yes ! hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' ! hardcode_libdir_separator_GCJ=: ! hardcode_shlibpath_var_GCJ=no ! ;; ! ! openbsd*) ! hardcode_direct_GCJ=yes ! hardcode_shlibpath_var_GCJ=no ! if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then ! archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ! hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ! export_dynamic_flag_spec_GCJ='${wl}-E' ! else ! case $host_os in ! openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) ! archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' ! hardcode_libdir_flag_spec_GCJ='-R$libdir' ! ;; ! *) ! archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ! hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ! ;; ! esac ! fi ! ;; ! ! os2*) ! hardcode_libdir_flag_spec_GCJ='-L$libdir' ! hardcode_minus_L_GCJ=yes ! allow_undefined_flag_GCJ=unsupported ! archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' ! old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ! ;; ! ! osf3*) ! if test "$GCC" = yes; then ! allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' ! archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ! else ! allow_undefined_flag_GCJ=' -expect_unresolved \*' ! archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' ! fi ! hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' ! hardcode_libdir_separator_GCJ=: ! ;; ! ! osf4* | osf5*) # as osf3* with the addition of -msym flag ! if test "$GCC" = yes; then ! allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' ! archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ! hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' ! else ! allow_undefined_flag_GCJ=' -expect_unresolved \*' ! archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' ! archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ ! $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' ! ! # Both c and cxx compiler support -rpath directly ! hardcode_libdir_flag_spec_GCJ='-rpath $libdir' ! fi ! hardcode_libdir_separator_GCJ=: ! ;; ! ! sco3.2v5*) ! archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_shlibpath_var_GCJ=no ! export_dynamic_flag_spec_GCJ='${wl}-Bexport' ! runpath_var=LD_RUN_PATH ! hardcode_runpath_var=yes ! ;; ! ! solaris*) ! no_undefined_flag_GCJ=' -z text' ! if test "$GCC" = yes; then ! archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ! archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ ! $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' ! else ! archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' ! archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ ! $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' ! fi ! hardcode_libdir_flag_spec_GCJ='-R$libdir' ! hardcode_shlibpath_var_GCJ=no ! case $host_os in ! solaris2.[0-5] | solaris2.[0-5].*) ;; ! *) # Supported since Solaris 2.6 (maybe 2.5.1?) ! whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; ! esac ! link_all_deplibs_GCJ=yes ! ;; ! ! sunos4*) ! if test "x$host_vendor" = xsequent; then ! # Use $CC to link under sequent, because it throws in some extra .o ! # files that make .init and .fini sections work. ! archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' ! else ! archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' ! fi ! hardcode_libdir_flag_spec_GCJ='-L$libdir' ! hardcode_direct_GCJ=yes ! hardcode_minus_L_GCJ=yes ! hardcode_shlibpath_var_GCJ=no ! ;; ! ! sysv4) ! case $host_vendor in ! sni) ! archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_direct_GCJ=yes # is this really true??? ! ;; ! siemens) ! ## LD is ld it makes a PLAMLIB ! ## CC just makes a GrossModule. ! archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' ! reload_cmds_GCJ='$CC -r -o $output$reload_objs' ! hardcode_direct_GCJ=no ! ;; ! motorola) ! archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie ! ;; ! esac ! runpath_var='LD_RUN_PATH' ! hardcode_shlibpath_var_GCJ=no ! ;; ! ! sysv4.3*) ! archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_shlibpath_var_GCJ=no ! export_dynamic_flag_spec_GCJ='-Bexport' ! ;; ! ! sysv4*MP*) ! if test -d /usr/nec; then ! archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_shlibpath_var_GCJ=no ! runpath_var=LD_RUN_PATH ! hardcode_runpath_var=yes ! ld_shlibs_GCJ=yes ! fi ! ;; ! ! sysv4.2uw2*) ! archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' ! hardcode_direct_GCJ=yes ! hardcode_minus_L_GCJ=no ! hardcode_shlibpath_var_GCJ=no ! hardcode_runpath_var=yes ! runpath_var=LD_RUN_PATH ! ;; ! ! sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) ! no_undefined_flag_GCJ='${wl}-z ${wl}text' ! if test "$GCC" = yes; then ! archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ! else ! archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ! fi ! runpath_var='LD_RUN_PATH' ! hardcode_shlibpath_var_GCJ=no ! ;; ! ! sysv5*) ! no_undefined_flag_GCJ=' -z text' ! # $CC -shared without GNU ld will not create a library from C++ ! # object files and a static libstdc++, better avoid it by now ! archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' ! archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ ! $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' ! hardcode_libdir_flag_spec_GCJ= ! hardcode_shlibpath_var_GCJ=no ! runpath_var='LD_RUN_PATH' ! ;; ! ! uts4*) ! archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_libdir_flag_spec_GCJ='-L$libdir' ! hardcode_shlibpath_var_GCJ=no ! ;; ! ! *) ! ld_shlibs_GCJ=no ! ;; ! esac ! fi ! ! echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 ! echo "${ECHO_T}$ld_shlibs_GCJ" >&6 ! test "$ld_shlibs_GCJ" = no && can_build_shared=no ! ! variables_saved_for_relink="PATH $shlibpath_var $runpath_var" ! if test "$GCC" = yes; then ! variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi ! ! # ! # Do we need to explicitly link libc? ! # ! case "x$archive_cmds_need_lc_GCJ" in ! x|xyes) ! # Assume -lc should be added ! archive_cmds_need_lc_GCJ=yes ! ! if test "$enable_shared" = yes && test "$GCC" = yes; then ! case $archive_cmds_GCJ in ! *'~'*) ! # FIXME: we may have to deal with multi-command sequences. ! ;; ! '$CC '*) ! # Test whether the compiler implicitly links with -lc since on some ! # systems, -lgcc has to come before -lc. If gcc already passes -lc ! # to ld, don't add -lc before -lgcc. ! echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 ! echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 ! $rm conftest* ! printf "$lt_simple_compile_test_code" > conftest.$ac_ext ! ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } 2>conftest.err; then ! soname=conftest ! lib=conftest ! libobjs=conftest.$ac_objext ! deplibs= ! wl=$lt_prog_compiler_wl_GCJ ! compiler_flags=-v ! linker_flags=-v ! verstring= ! output_objdir=. ! libname=conftest ! lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ ! allow_undefined_flag_GCJ= ! if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 ! (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } ! then ! archive_cmds_need_lc_GCJ=no ! else ! archive_cmds_need_lc_GCJ=yes ! fi ! allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag ! else ! cat conftest.err 1>&5 ! fi ! $rm conftest* ! echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 ! echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6 ! ;; ! esac ! fi ! ;; ! esac ! ! echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 ! echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 ! hardcode_action_GCJ= ! if test -n "$hardcode_libdir_flag_spec_GCJ" || \ ! test -n "$runpath_var GCJ" || \ ! test "X$hardcode_automatic_GCJ"="Xyes" ; then ! ! # We can hardcode non-existant directories. ! if test "$hardcode_direct_GCJ" != no && ! # If the only mechanism to avoid hardcoding is shlibpath_var, we ! # have to relink, otherwise we might link with an installed library ! # when we should be linking with a yet-to-be-installed one ! ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && ! test "$hardcode_minus_L_GCJ" != no; then ! # Linking always hardcodes the temporary library directory. ! hardcode_action_GCJ=relink ! else ! # We can link without hardcoding, and we can hardcode nonexisting dirs. ! hardcode_action_GCJ=immediate ! fi else ! # We cannot hardcode anything, or else we can only hardcode existing ! # directories. ! hardcode_action_GCJ=unsupported fi ! echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 ! echo "${ECHO_T}$hardcode_action_GCJ" >&6 ! if test "$hardcode_action_GCJ" = relink; then ! # Fast installation is not supported ! enable_fast_install=no ! elif test "$shlibpath_overrides_runpath" = yes || ! test "$enable_shared" = no; then ! # Fast installation is not necessary ! enable_fast_install=needless ! fi ! striplib= ! old_striplib= ! echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 ! echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 ! if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then ! test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" ! test -z "$striplib" && striplib="$STRIP --strip-unneeded" ! echo "$as_me:$LINENO: result: yes" >&5 ! echo "${ECHO_T}yes" >&6 else ! # FIXME - insert some real tests, host_os isn't really good enough ! case $host_os in ! darwin*) ! if test -n "$STRIP" ; then ! striplib="$STRIP -x" ! echo "$as_me:$LINENO: result: yes" >&5 ! echo "${ECHO_T}yes" >&6 ! else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! fi ! ;; ! *) ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! ;; ! esac ! fi ! echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 ! echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 ! library_names_spec= ! libname_spec='lib$name' ! soname_spec= ! shrext=".so" ! postinstall_cmds= ! postuninstall_cmds= ! finish_cmds= ! finish_eval= ! shlibpath_var= ! shlibpath_overrides_runpath=unknown ! version_type=none ! dynamic_linker="$host_os ld.so" ! sys_lib_dlsearch_path_spec="/lib /usr/lib" ! if test "$GCC" = yes; then ! sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` ! if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then ! # if the path contains ";" then we assume it to be the separator ! # otherwise default to the standard path separator (i.e. ":") - it is ! # assumed that no part of a normal pathname contains ";" but that should ! # okay in the real world where ";" in dirpaths is itself problematic. ! sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ! else ! sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ! fi ! else ! sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" ! fi ! need_lib_prefix=unknown ! hardcode_into_libs=no ! # when you set need_version to no, make sure it does not cause -set_version ! # flags to be left without arguments ! need_version=unknown ! case $host_os in ! aix3*) ! version_type=linux ! library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' ! shlibpath_var=LIBPATH ! # AIX 3 has no versioning support, so we append a major version to the name. ! soname_spec='${libname}${release}${shared_ext}$major' ! ;; ! aix4* | aix5*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! hardcode_into_libs=yes ! if test "$host_cpu" = ia64; then ! # AIX 5 supports IA64 ! library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' ! shlibpath_var=LD_LIBRARY_PATH ! else ! # With GCC up to 2.95.x, collect2 would create an import file ! # for dependence libraries. The import file would start with ! # the line `#! .'. This would cause the generated library to ! # depend on `.', always an invalid library. This was fixed in ! # development snapshots of GCC prior to 3.0. ! case $host_os in ! aix4 | aix4.[01] | aix4.[01].*) ! if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' ! echo ' yes ' ! echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then ! : ! else ! can_build_shared=no ! fi ! ;; ! esac ! # AIX (on Power*) has no versioning support, so currently we can not hardcode correct ! # soname into executable. Probably we can add versioning support to ! # collect2, so additional links can be useful in future. ! if test "$aix_use_runtimelinking" = yes; then ! # If using run time linking (on AIX 4.2 or later) use lib.so ! # instead of lib.a to let people know that these are not ! # typical AIX shared libraries. ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! else ! # We preserve .a as extension for shared libraries through AIX4.2 ! # and later when we are not doing run time linking. ! library_names_spec='${libname}${release}.a $libname.a' ! soname_spec='${libname}${release}${shared_ext}$major' ! fi ! shlibpath_var=LIBPATH ! fi ;; ! ! amigaos*) ! library_names_spec='$libname.ixlibrary $libname.a' ! # Create ${libname}_ixlibrary.a entries in /sys/libs. ! finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' ;; ! ! beos*) ! library_names_spec='${libname}${shared_ext}' ! dynamic_linker="$host_os ld.so" ! shlibpath_var=LIBRARY_PATH ;; ! ! bsdi4*) ! version_type=linux ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' ! shlibpath_var=LD_LIBRARY_PATH ! sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" ! sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" ! # the default ld.so.conf also contains /usr/contrib/lib and ! # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow ! # libtool to hard-code these into programs ! ;; ! ! cygwin* | mingw* | pw32*) ! version_type=windows ! shrext=".dll" ! need_version=no ! need_lib_prefix=no ! ! case $GCC,$host_os in ! yes,cygwin* | yes,mingw* | yes,pw32*) ! library_names_spec='$libname.dll.a' ! # DLL is installed to $(libdir)/../bin by postinstall_cmds ! postinstall_cmds='base_file=`basename \${file}`~ ! dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ ! dldir=$destdir/`dirname \$dlpath`~ ! test -d \$dldir || mkdir -p \$dldir~ ! $install_prog $dir/$dlname \$dldir/$dlname' ! postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ! dlpath=$dir/\$dldll~ ! $rm \$dlpath' ! shlibpath_overrides_runpath=yes ! ! case $host_os in ! cygwin*) ! # Cygwin DLLs use 'cyg' prefix rather than 'lib' ! soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ! sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib" ! ;; ! mingw*) ! # MinGW DLLs use traditional 'lib' prefix ! soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ! sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` ! if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then ! # It is most probably a Windows format PATH printed by ! # mingw gcc, but we are running on Cygwin. Gcc prints its search ! # path with ; separators, and with drive letters. We can handle the ! # drive letters (cygwin fileutils understands them), so leave them, ! # especially as we might pass files found there to a mingw objdump, ! # which wouldn't understand a cygwinified path. Ahh. ! sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ! else ! sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ! fi ! ;; ! pw32*) ! # pw32 DLLs use 'pw' prefix rather than 'lib' ! library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' ! ;; ! esac ! ;; ! ! *) ! library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ! ;; ! esac ! dynamic_linker='Win32 ld.exe' ! # FIXME: first we should search . and the directory the executable is in ! shlibpath_var=PATH ! ;; ! ! darwin* | rhapsody*) ! dynamic_linker="$host_os dyld" ! version_type=darwin ! need_lib_prefix=no ! need_version=no ! # FIXME: Relying on posixy $() will cause problems for ! # cross-compilation, but unfortunately the echo tests do not ! # yet detect zsh echo's removal of \ escapes. ! library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' ! soname_spec='${libname}${release}${major}$shared_ext' ! shlibpath_overrides_runpath=yes ! shlibpath_var=DYLD_LIBRARY_PATH ! shrext='$(test .$module = .yes && echo .so || echo .dylib)' ! # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. ! if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then ! sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` ! fi ! sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ! ;; ! ! dgux*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! ;; ! ! freebsd1*) ! dynamic_linker=no ! ;; ! ! freebsd*) ! objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` ! version_type=freebsd-$objformat ! case $version_type in ! freebsd-elf*) ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' ! need_version=no ! need_lib_prefix=no ! ;; ! freebsd-*) ! library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' ! need_version=yes ! ;; ! esac ! shlibpath_var=LD_LIBRARY_PATH ! case $host_os in ! freebsd2*) ! shlibpath_overrides_runpath=yes ! ;; ! freebsd3.01* | freebsdelf3.01*) ! shlibpath_overrides_runpath=yes ! hardcode_into_libs=yes ! ;; ! *) # from 3.2 on ! shlibpath_overrides_runpath=no ! hardcode_into_libs=yes ! ;; ! esac ;; + + gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + + hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case "$host_cpu" in + ia64*) + shrext='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + + irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + + # No shared lib support for Linux oldld, aout, or coff. + linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + + # This must be Linux ELF. + linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + + netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + + newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + + nto-qnx) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + + openbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + + os2*) + libname_spec='$name' + shrext=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + + osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + + sco3.2v5*) + version_type=osf + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + ;; + solaris*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! hardcode_into_libs=yes ! # ldd complains unless libraries are executable ! postinstall_cmds='chmod +x $lib' ! ;; ! ! sunos4*) ! version_type=sunos ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' ! finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! if test "$with_gnu_ld" = yes; then ! need_lib_prefix=no ! fi ! need_version=yes ! ;; ! ! sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) ! version_type=linux ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! case $host_vendor in ! sni) ! shlibpath_overrides_runpath=no ! need_lib_prefix=no ! export_dynamic_flag_spec='${wl}-Blargedynsym' ! runpath_var=LD_RUN_PATH ! ;; ! siemens) ! need_lib_prefix=no ! ;; ! motorola) ! need_lib_prefix=no ! need_version=no ! shlibpath_overrides_runpath=no ! sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ! ;; ! esac ! ;; ! ! sysv4*MP*) ! if test -d /usr/nec ;then ! version_type=linux ! library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' ! soname_spec='$libname${shared_ext}.$major' ! shlibpath_var=LD_LIBRARY_PATH ! fi ! ;; ! ! uts4*) ! version_type=linux ! library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ! soname_spec='${libname}${release}${shared_ext}$major' ! shlibpath_var=LD_LIBRARY_PATH ! ;; ! ! *) ! dynamic_linker=no ;; esac + echo "$as_me:$LINENO: result: $dynamic_linker" >&5 + echo "${ECHO_T}$dynamic_linker" >&6 + test "$dynamic_linker" = no && can_build_shared=no ! if test "x$enable_dlopen" != xyes; then ! enable_dlopen=unknown ! enable_dlopen_self=unknown ! enable_dlopen_self_static=unknown ! else ! lt_cv_dlopen=no ! lt_cv_dlopen_libs= ! ! case $host_os in ! beos*) ! lt_cv_dlopen="load_add_on" ! lt_cv_dlopen_libs= ! lt_cv_dlopen_self=yes ! ;; ! ! mingw* | pw32*) ! lt_cv_dlopen="LoadLibrary" ! lt_cv_dlopen_libs= ! ;; ! ! cygwin*) ! lt_cv_dlopen="dlopen" ! lt_cv_dlopen_libs= ! ;; ! ! darwin*) ! # if libdl is installed we need to link against it ! echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 ! echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 ! if test "${ac_cv_lib_dl_dlopen+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! ac_check_lib_save_LIBS=$LIBS ! LIBS="-ldl $LIBS" ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! /* Override any gcc2 internal prototype to avoid an error. */ ! #ifdef __cplusplus ! extern "C" ! #endif ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char dlopen (); ! int ! main () ! { ! dlopen (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_lib_dl_dlopen=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_lib_dl_dlopen=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! LIBS=$ac_check_lib_save_LIBS fi + echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 + echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 + if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" + else ! lt_cv_dlopen="dyld" ! lt_cv_dlopen_libs= ! lt_cv_dlopen_self=yes ! fi ! ;; ! ! *) ! echo "$as_me:$LINENO: checking for shl_load" >&5 ! echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 ! if test "${ac_cv_func_shl_load+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char shl_load (); below. ! Prefer to if __STDC__ is defined, since ! exists even on freestanding compilers. */ ! #ifdef __STDC__ ! # include ! #else ! # include ! #endif ! /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus ! extern "C" ! { ! #endif ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char shl_load (); ! /* The GNU C library defines this for functions which it implements ! to always fail with ENOSYS. Some functions are actually named ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub_shl_load) || defined (__stub___shl_load) ! choke me ! #else ! char (*f) () = shl_load; #endif #ifdef __cplusplus } #endif ! int ! main () ! { ! return f != shl_load; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_func_shl_load=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_func_shl_load=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 ! echo "${ECHO_T}$ac_cv_func_shl_load" >&6 ! if test $ac_cv_func_shl_load = yes; then ! lt_cv_dlopen="shl_load" ! else ! echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 ! echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 ! if test "${ac_cv_lib_dld_shl_load+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! ac_check_lib_save_LIBS=$LIBS ! LIBS="-ldld $LIBS" ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus ! extern "C" #endif + /* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + char shl_load (); + int + main () + { + shl_load (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_shl_load=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_lib_dld_shl_load=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! LIBS=$ac_check_lib_save_LIBS ! fi ! echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 ! echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 ! if test $ac_cv_lib_dld_shl_load = yes; then ! lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" ! else ! echo "$as_me:$LINENO: checking for dlopen" >&5 ! echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 ! if test "${ac_cv_func_dlopen+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char dlopen (); below. ! Prefer to if __STDC__ is defined, since ! exists even on freestanding compilers. */ ! #ifdef __STDC__ ! # include #else ! # include ! #endif ! /* Override any gcc2 internal prototype to avoid an error. */ ! #ifdef __cplusplus ! extern "C" ! { ! #endif ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char dlopen (); ! /* The GNU C library defines this for functions which it implements ! to always fail with ENOSYS. Some functions are actually named ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub_dlopen) || defined (__stub___dlopen) ! choke me ! #else ! char (*f) () = dlopen; ! #endif ! #ifdef __cplusplus ! } #endif ! int ! main () ! { ! return f != dlopen; ! ; ! return 0; } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_func_dlopen=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_func_dlopen=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 ! echo "${ECHO_T}$ac_cv_func_dlopen" >&6 ! if test $ac_cv_func_dlopen = yes; then ! lt_cv_dlopen="dlopen" ! else ! echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 ! echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 ! if test "${ac_cv_lib_dl_dlopen+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! ac_check_lib_save_LIBS=$LIBS ! LIBS="-ldl $LIBS" ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! /* Override any gcc2 internal prototype to avoid an error. */ ! #ifdef __cplusplus ! extern "C" ! #endif ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char dlopen (); ! int ! main () { ! dlopen (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_lib_dl_dlopen=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_lib_dl_dlopen=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! LIBS=$ac_check_lib_save_LIBS ! fi ! echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 ! echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 ! if test $ac_cv_lib_dl_dlopen = yes; then ! lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" ! else ! echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 ! echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 ! if test "${ac_cv_lib_svld_dlopen+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! ac_check_lib_save_LIBS=$LIBS ! LIBS="-lsvld $LIBS" ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus + extern "C" + #endif + /* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + char dlopen (); + int + main () + { + dlopen (); + ; + return 0; } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_svld_dlopen=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_svld_dlopen=no + fi + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi + echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 + echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 + if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" + else + echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 + echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 + if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-ldld $LIBS" + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + + /* Override any gcc2 internal prototype to avoid an error. */ + #ifdef __cplusplus + extern "C" #endif ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char dld_link (); ! int ! main () ! { ! dld_link (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_lib_dld_dld_link=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_lib_dld_dld_link=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! LIBS=$ac_check_lib_save_LIBS ! fi ! echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 ! echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 ! if test $ac_cv_lib_dld_dld_link = yes; then ! lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" ! fi ! ! ! fi ! ! ! fi ! ! ! fi ! ! ! fi ! ! ! fi ! ! ;; ! esac ! ! if test "x$lt_cv_dlopen" != xno; then ! enable_dlopen=yes else ! enable_dlopen=no fi + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 + echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 + if test "${lt_cv_dlopen_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross + else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < + #endif + + #include + + #ifdef RTLD_GLOBAL + # define LT_DLGLOBAL RTLD_GLOBAL + #else + # ifdef DL_GLOBAL + # define LT_DLGLOBAL DL_GLOBAL + # else + # define LT_DLGLOBAL 0 + # endif + #endif + + /* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ + #ifndef LT_DLLAZY_OR_NOW + # ifdef RTLD_LAZY + # define LT_DLLAZY_OR_NOW RTLD_LAZY + # else + # ifdef DL_LAZY + # define LT_DLLAZY_OR_NOW DL_LAZY + # else + # ifdef RTLD_NOW + # define LT_DLLAZY_OR_NOW RTLD_NOW + # else + # ifdef DL_NOW + # define LT_DLLAZY_OR_NOW DL_NOW + # else + # define LT_DLLAZY_OR_NOW 0 + # endif + # endif + # endif + # endif + #endif + + #ifdef __cplusplus + extern "C" void exit (int); + #endif + + void fnord() { int i=42;} + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + + exit (status); + } + EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_unknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi fi + rm -fr conftest* fi ! echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 ! echo "${ECHO_T}$lt_cv_dlopen_self" >&6 ! if test "x$lt_cv_dlopen_self" = xyes; then ! LDFLAGS="$LDFLAGS $link_static_flag" ! echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 ! echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 ! if test "${lt_cv_dlopen_self_static+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross + else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown cat > conftest.$ac_ext < ! #endif ! ! #include ! ! #ifdef RTLD_GLOBAL ! # define LT_DLGLOBAL RTLD_GLOBAL ! #else ! # ifdef DL_GLOBAL ! # define LT_DLGLOBAL DL_GLOBAL ! # else ! # define LT_DLGLOBAL 0 ! # endif ! #endif ! ! /* We may have to define LT_DLLAZY_OR_NOW in the command line if we ! find out it does not work in some platform. */ ! #ifndef LT_DLLAZY_OR_NOW ! # ifdef RTLD_LAZY ! # define LT_DLLAZY_OR_NOW RTLD_LAZY ! # else ! # ifdef DL_LAZY ! # define LT_DLLAZY_OR_NOW DL_LAZY ! # else ! # ifdef RTLD_NOW ! # define LT_DLLAZY_OR_NOW RTLD_NOW ! # else ! # ifdef DL_NOW ! # define LT_DLLAZY_OR_NOW DL_NOW ! # else ! # define LT_DLLAZY_OR_NOW 0 ! # endif ! # endif ! # endif ! # endif ! #endif ! ! #ifdef __cplusplus ! extern "C" void exit (int); ! #endif ! ! void fnord() { int i=42;} ! int main () ! { ! void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); ! int status = $lt_dlunknown; ! ! if (self) ! { ! if (dlsym (self,"fnord")) status = $lt_dlno_uscore; ! else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; ! /* dlclose (self); */ ! } ! ! exit (status); ! } EOF ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then ! (./conftest; exit; ) 2>/dev/null ! lt_status=$? ! case x$lt_status in ! x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; ! x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; ! x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; ! esac ! else : ! # compilation failed ! lt_cv_dlopen_self_static=no ! fi ! fi ! rm -fr conftest* ! ! ! fi ! echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 ! echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 ! fi ! ! CPPFLAGS="$save_CPPFLAGS" ! LDFLAGS="$save_LDFLAGS" ! LIBS="$save_LIBS" ! ;; ! esac ! ! case $lt_cv_dlopen_self in ! yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; ! *) enable_dlopen_self=unknown ;; ! esac ! ! case $lt_cv_dlopen_self_static in ! yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; ! *) enable_dlopen_self_static=unknown ;; ! esac ! fi ! ! ! # The else clause should only fire when bootstrapping the ! # libtool distribution, otherwise you forgot to ship ltmain.sh ! # with your package, and you will get complaints that there are ! # no rules to generate ltmain.sh. ! if test -f "$ltmain"; then ! # See if we are running on zsh, and set the options which allow our commands through ! # without removal of \ escapes. ! if test -n "${ZSH_VERSION+set}" ; then ! setopt NO_GLOB_SUBST ! fi ! # Now quote all the things that may contain metacharacters while being ! # careful not to overquote the AC_SUBSTed values. We take copies of the ! # variables and quote the copies for generation of the libtool script. ! for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \ ! libname_spec library_names_spec soname_spec extract_expsyms_cmds \ ! old_striplib striplib file_magic_cmd finish_cmds finish_eval \ ! deplibs_check_method reload_flag reload_cmds need_locks \ ! lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ ! lt_cv_sys_global_symbol_to_c_name_address \ ! sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ ! old_postinstall_cmds old_postuninstall_cmds \ ! compiler_GCJ \ ! CC_GCJ \ ! LD_GCJ \ ! lt_prog_compiler_wl_GCJ \ ! lt_prog_compiler_pic_GCJ \ ! lt_prog_compiler_static_GCJ \ ! lt_prog_compiler_no_builtin_flag_GCJ \ ! export_dynamic_flag_spec_GCJ \ ! thread_safe_flag_spec_GCJ \ ! whole_archive_flag_spec_GCJ \ ! enable_shared_with_static_runtimes_GCJ \ ! old_archive_cmds_GCJ \ ! old_archive_from_new_cmds_GCJ \ ! predep_objects_GCJ \ ! postdep_objects_GCJ \ ! predeps_GCJ \ ! postdeps_GCJ \ ! compiler_lib_search_path_GCJ \ ! archive_cmds_GCJ \ ! archive_expsym_cmds_GCJ \ ! postinstall_cmds_GCJ \ ! postuninstall_cmds_GCJ \ ! old_archive_from_expsyms_cmds_GCJ \ ! allow_undefined_flag_GCJ \ ! no_undefined_flag_GCJ \ ! export_symbols_cmds_GCJ \ ! hardcode_libdir_flag_spec_GCJ \ ! hardcode_libdir_flag_spec_ld_GCJ \ ! hardcode_libdir_separator_GCJ \ ! hardcode_automatic_GCJ \ ! module_cmds_GCJ \ ! module_expsym_cmds_GCJ \ ! lt_cv_prog_compiler_c_o_GCJ \ ! exclude_expsyms_GCJ \ ! include_expsyms_GCJ; do ! ! case $var in ! old_archive_cmds_GCJ | \ ! old_archive_from_new_cmds_GCJ | \ ! archive_cmds_GCJ | \ ! archive_expsym_cmds_GCJ | \ ! module_cmds_GCJ | \ ! module_expsym_cmds_GCJ | \ ! old_archive_from_expsyms_cmds_GCJ | \ ! export_symbols_cmds_GCJ | \ ! extract_expsyms_cmds | reload_cmds | finish_cmds | \ ! postinstall_cmds | postuninstall_cmds | \ ! old_postinstall_cmds | old_postuninstall_cmds | \ ! sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) ! # Double-quote double-evaled strings. ! eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ! ;; ! *) ! eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ! ;; ! esac ! done ! ! case $lt_echo in ! *'\$0 --fallback-echo"') ! lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ! ;; ! esac ! ! cfgfile="$ofile" ! ! cat <<__EOF__ >> "$cfgfile" ! # ### BEGIN LIBTOOL TAG CONFIG: $tagname ! ! # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: ! ! # Shell to use when invoking shell scripts. ! SHELL=$lt_SHELL ! ! # Whether or not to build shared libraries. ! build_libtool_libs=$enable_shared ! ! # Whether or not to build static libraries. ! build_old_libs=$enable_static ! ! # Whether or not to add -lc for building shared libraries. ! build_libtool_need_lc=$archive_cmds_need_lc_GCJ ! ! # Whether or not to disallow shared libs when runtime libs are static ! allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ ! ! # Whether or not to optimize for fast installation. ! fast_install=$enable_fast_install ! ! # The host system. ! host_alias=$host_alias ! host=$host ! ! # An echo program that does not interpret backslashes. ! echo=$lt_echo ! ! # The archiver. ! AR=$lt_AR ! AR_FLAGS=$lt_AR_FLAGS ! ! # A C compiler. ! LTCC=$lt_LTCC ! ! # A language-specific compiler. ! CC=$lt_compiler_GCJ ! ! # Is the compiler the GNU C compiler? ! with_gcc=$GCC_GCJ ! ! # An ERE matcher. ! EGREP=$lt_EGREP ! ! # The linker used to build libraries. ! LD=$lt_LD_GCJ ! ! # Whether we need hard or soft links. ! LN_S=$lt_LN_S ! ! # A BSD-compatible nm program. ! NM=$lt_NM ! ! # A symbol stripping program ! STRIP=$STRIP ! ! # Used to examine libraries when file_magic_cmd begins "file" ! MAGIC_CMD=$MAGIC_CMD ! ! # Used on cygwin: DLL creation program. ! DLLTOOL="$DLLTOOL" ! ! # Used on cygwin: object dumper. ! OBJDUMP="$OBJDUMP" ! ! # Used on cygwin: assembler. ! AS="$AS" ! ! # The name of the directory that contains temporary libtool files. ! objdir=$objdir ! ! # How to create reloadable object files. ! reload_flag=$lt_reload_flag ! reload_cmds=$lt_reload_cmds ! ! # How to pass a linker flag through the compiler. ! wl=$lt_lt_prog_compiler_wl_GCJ ! ! # Object file suffix (normally "o"). ! objext="$ac_objext" ! ! # Old archive suffix (normally "a"). ! libext="$libext" ! ! # Shared library suffix (normally ".so"). ! shrext='$shrext' ! ! # Executable file suffix (normally ""). ! exeext="$exeext" ! ! # Additional compiler flags for building library objects. ! pic_flag=$lt_lt_prog_compiler_pic_GCJ ! pic_mode=$pic_mode ! ! # What is the maximum length of a command? ! max_cmd_len=$lt_cv_sys_max_cmd_len ! ! # Does compiler simultaneously support -c and -o options? ! compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ ! ! # Must we lock files when doing compilation ? ! need_locks=$lt_need_locks ! ! # Do we need the lib prefix for modules? ! need_lib_prefix=$need_lib_prefix ! ! # Do we need a version for libraries? ! need_version=$need_version ! ! # Whether dlopen is supported. ! dlopen_support=$enable_dlopen ! ! # Whether dlopen of programs is supported. ! dlopen_self=$enable_dlopen_self ! ! # Whether dlopen of statically linked programs is supported. ! dlopen_self_static=$enable_dlopen_self_static ! ! # Compiler flag to prevent dynamic linking. ! link_static_flag=$lt_lt_prog_compiler_static_GCJ ! ! # Compiler flag to turn off builtin functions. ! no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ ! ! # Compiler flag to allow reflexive dlopens. ! export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ ! ! # Compiler flag to generate shared objects directly from archives. ! whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ ! ! # Compiler flag to generate thread-safe objects. ! thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ ! ! # Library versioning type. ! version_type=$version_type ! ! # Format of library name prefix. ! libname_spec=$lt_libname_spec ! ! # List of archive names. First name is the real one, the rest are links. ! # The last name is the one that the linker finds with -lNAME. ! library_names_spec=$lt_library_names_spec ! ! # The coded name of the library, if different from the real name. ! soname_spec=$lt_soname_spec ! ! # Commands used to build and install an old-style archive. ! RANLIB=$lt_RANLIB ! old_archive_cmds=$lt_old_archive_cmds_GCJ ! old_postinstall_cmds=$lt_old_postinstall_cmds ! old_postuninstall_cmds=$lt_old_postuninstall_cmds ! ! # Create an old-style archive from a shared archive. ! old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ ! ! # Create a temporary old-style archive to link instead of a shared archive. ! old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ ! ! # Commands used to build and install a shared archive. ! archive_cmds=$lt_archive_cmds_GCJ ! archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ ! postinstall_cmds=$lt_postinstall_cmds ! postuninstall_cmds=$lt_postuninstall_cmds ! ! # Commands used to build a loadable module (assumed same as above if empty) ! module_cmds=$lt_module_cmds_GCJ ! module_expsym_cmds=$lt_module_expsym_cmds_GCJ ! ! # Commands to strip libraries. ! old_striplib=$lt_old_striplib ! striplib=$lt_striplib ! ! # Dependencies to place before the objects being linked to create a ! # shared library. ! predep_objects=$lt_predep_objects_GCJ ! ! # Dependencies to place after the objects being linked to create a ! # shared library. ! postdep_objects=$lt_postdep_objects_GCJ ! ! # Dependencies to place before the objects being linked to create a ! # shared library. ! predeps=$lt_predeps_GCJ ! ! # Dependencies to place after the objects being linked to create a ! # shared library. ! postdeps=$lt_postdeps_GCJ ! ! # The library search path used internally by the compiler when linking ! # a shared library. ! compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ ! ! # Method to check whether dependent libraries are shared objects. ! deplibs_check_method=$lt_deplibs_check_method ! ! # Command to use when deplibs_check_method == file_magic. ! file_magic_cmd=$lt_file_magic_cmd ! ! # Flag that allows shared libraries with undefined symbols to be built. ! allow_undefined_flag=$lt_allow_undefined_flag_GCJ ! ! # Flag that forces no undefined symbols. ! no_undefined_flag=$lt_no_undefined_flag_GCJ ! ! # Commands used to finish a libtool library installation in a directory. ! finish_cmds=$lt_finish_cmds ! ! # Same as above, but a single script fragment to be evaled but not shown. ! finish_eval=$lt_finish_eval ! ! # Take the output of nm and produce a listing of raw symbols and C names. ! global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe ! ! # Transform the output of nm in a proper C declaration ! global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl ! ! # Transform the output of nm in a C name address pair ! global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address ! ! # This is the shared library runtime path variable. ! runpath_var=$runpath_var ! ! # This is the shared library path variable. ! shlibpath_var=$shlibpath_var ! ! # Is shlibpath searched before the hard-coded library search path? ! shlibpath_overrides_runpath=$shlibpath_overrides_runpath ! ! # How to hardcode a shared library path into an executable. ! hardcode_action=$hardcode_action_GCJ ! ! # Whether we should hardcode library paths into libraries. ! hardcode_into_libs=$hardcode_into_libs ! ! # Flag to hardcode \$libdir into a binary during linking. ! # This must work even if \$libdir does not exist. ! hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ ! ! # If ld is used when linking, flag to hardcode \$libdir into ! # a binary during linking. This must work even if \$libdir does ! # not exist. ! hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ ! ! # Whether we need a single -rpath flag with a separated argument. ! hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ ! ! # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the ! # resulting binary. ! hardcode_direct=$hardcode_direct_GCJ ! ! # Set to yes if using the -LDIR flag during linking hardcodes DIR into the ! # resulting binary. ! hardcode_minus_L=$hardcode_minus_L_GCJ ! ! # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into ! # the resulting binary. ! hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ ! ! # Set to yes if building a shared library automatically hardcodes DIR into the library ! # and all subsequent libraries and executables linked against it. ! hardcode_automatic=$hardcode_automatic_GCJ ! ! # Variables whose values should be saved in libtool wrapper scripts and ! # restored at relink time. ! variables_saved_for_relink="$variables_saved_for_relink" ! ! # Whether libtool must link a program against all its dependency libraries. ! link_all_deplibs=$link_all_deplibs_GCJ ! ! # Compile-time system search path for libraries ! sys_lib_search_path_spec=$lt_sys_lib_search_path_spec ! ! # Run-time system search path for libraries ! sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec ! ! # Fix the shell variable \$srcfile for the compiler. ! fix_srcfile_path="$fix_srcfile_path_GCJ" ! ! # Set to yes if exported symbols are required. ! always_export_symbols=$always_export_symbols_GCJ ! ! # The commands to list exported symbols. ! export_symbols_cmds=$lt_export_symbols_cmds_GCJ ! ! # The commands to extract the exported symbol list from a shared archive. ! extract_expsyms_cmds=$lt_extract_expsyms_cmds ! ! # Symbols that should not be listed in the preloaded symbols. ! exclude_expsyms=$lt_exclude_expsyms_GCJ ! ! # Symbols that must always be exported. ! include_expsyms=$lt_include_expsyms_GCJ ! ! # ### END LIBTOOL TAG CONFIG: $tagname ! ! __EOF__ ! ! else ! # If there is no Makefile yet, we rely on a make rule to execute ! # `config.status --recheck' to rerun these tests and create the ! # libtool script then. ! test -f Makefile && make "$ltmain" fi ! ! ac_ext=c ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ! ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_c_compiler_gnu ! ! CC="$lt_save_CC" ! ! else ! tagname="" ! fi ! ;; ! ! RC) ! ! ! ! # Source file extension for RC test sources. ! ac_ext=rc ! ! # Object file extension for compiled RC test sources. ! objext=o ! objext_RC=$objext ! ! # Code to be used in simple compile tests ! lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' ! ! # Code to be used in simple link tests ! lt_simple_link_test_code="$lt_simple_compile_test_code" ! ! # ltmain only uses $CC for tagged configurations so make sure $CC is set. ! ! # If no C compiler was specified, use CC. ! LTCC=${LTCC-"$CC"} ! ! # Allow CC to be a program name with arguments. ! compiler=$CC ! ! ! # Allow CC to be a program name with arguments. ! lt_save_CC="$CC" ! CC=${RC-"windres"} ! compiler=$CC ! compiler_RC=$CC ! lt_cv_prog_compiler_c_o_RC=yes ! ! # The else clause should only fire when bootstrapping the ! # libtool distribution, otherwise you forgot to ship ltmain.sh ! # with your package, and you will get complaints that there are ! # no rules to generate ltmain.sh. ! if test -f "$ltmain"; then ! # See if we are running on zsh, and set the options which allow our commands through ! # without removal of \ escapes. ! if test -n "${ZSH_VERSION+set}" ; then ! setopt NO_GLOB_SUBST ! fi ! # Now quote all the things that may contain metacharacters while being ! # careful not to overquote the AC_SUBSTed values. We take copies of the ! # variables and quote the copies for generation of the libtool script. ! for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \ ! libname_spec library_names_spec soname_spec extract_expsyms_cmds \ ! old_striplib striplib file_magic_cmd finish_cmds finish_eval \ ! deplibs_check_method reload_flag reload_cmds need_locks \ ! lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ ! lt_cv_sys_global_symbol_to_c_name_address \ ! sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ ! old_postinstall_cmds old_postuninstall_cmds \ ! compiler_RC \ ! CC_RC \ ! LD_RC \ ! lt_prog_compiler_wl_RC \ ! lt_prog_compiler_pic_RC \ ! lt_prog_compiler_static_RC \ ! lt_prog_compiler_no_builtin_flag_RC \ ! export_dynamic_flag_spec_RC \ ! thread_safe_flag_spec_RC \ ! whole_archive_flag_spec_RC \ ! enable_shared_with_static_runtimes_RC \ ! old_archive_cmds_RC \ ! old_archive_from_new_cmds_RC \ ! predep_objects_RC \ ! postdep_objects_RC \ ! predeps_RC \ ! postdeps_RC \ ! compiler_lib_search_path_RC \ ! archive_cmds_RC \ ! archive_expsym_cmds_RC \ ! postinstall_cmds_RC \ ! postuninstall_cmds_RC \ ! old_archive_from_expsyms_cmds_RC \ ! allow_undefined_flag_RC \ ! no_undefined_flag_RC \ ! export_symbols_cmds_RC \ ! hardcode_libdir_flag_spec_RC \ ! hardcode_libdir_flag_spec_ld_RC \ ! hardcode_libdir_separator_RC \ ! hardcode_automatic_RC \ ! module_cmds_RC \ ! module_expsym_cmds_RC \ ! lt_cv_prog_compiler_c_o_RC \ ! exclude_expsyms_RC \ ! include_expsyms_RC; do ! ! case $var in ! old_archive_cmds_RC | \ ! old_archive_from_new_cmds_RC | \ ! archive_cmds_RC | \ ! archive_expsym_cmds_RC | \ ! module_cmds_RC | \ ! module_expsym_cmds_RC | \ ! old_archive_from_expsyms_cmds_RC | \ ! export_symbols_cmds_RC | \ ! extract_expsyms_cmds | reload_cmds | finish_cmds | \ ! postinstall_cmds | postuninstall_cmds | \ ! old_postinstall_cmds | old_postuninstall_cmds | \ ! sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) ! # Double-quote double-evaled strings. ! eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ! ;; ! *) ! eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ! ;; ! esac ! done ! ! case $lt_echo in ! *'\$0 --fallback-echo"') ! lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ! ;; ! esac ! ! cfgfile="$ofile" ! ! cat <<__EOF__ >> "$cfgfile" ! # ### BEGIN LIBTOOL TAG CONFIG: $tagname ! ! # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: ! ! # Shell to use when invoking shell scripts. ! SHELL=$lt_SHELL ! ! # Whether or not to build shared libraries. ! build_libtool_libs=$enable_shared ! ! # Whether or not to build static libraries. ! build_old_libs=$enable_static ! ! # Whether or not to add -lc for building shared libraries. ! build_libtool_need_lc=$archive_cmds_need_lc_RC ! ! # Whether or not to disallow shared libs when runtime libs are static ! allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC ! ! # Whether or not to optimize for fast installation. ! fast_install=$enable_fast_install ! ! # The host system. ! host_alias=$host_alias ! host=$host ! ! # An echo program that does not interpret backslashes. ! echo=$lt_echo ! ! # The archiver. ! AR=$lt_AR ! AR_FLAGS=$lt_AR_FLAGS ! ! # A C compiler. ! LTCC=$lt_LTCC ! ! # A language-specific compiler. ! CC=$lt_compiler_RC ! ! # Is the compiler the GNU C compiler? ! with_gcc=$GCC_RC ! ! # An ERE matcher. ! EGREP=$lt_EGREP ! ! # The linker used to build libraries. ! LD=$lt_LD_RC ! ! # Whether we need hard or soft links. ! LN_S=$lt_LN_S ! ! # A BSD-compatible nm program. ! NM=$lt_NM ! ! # A symbol stripping program ! STRIP=$STRIP ! ! # Used to examine libraries when file_magic_cmd begins "file" ! MAGIC_CMD=$MAGIC_CMD ! ! # Used on cygwin: DLL creation program. ! DLLTOOL="$DLLTOOL" ! ! # Used on cygwin: object dumper. ! OBJDUMP="$OBJDUMP" ! ! # Used on cygwin: assembler. ! AS="$AS" ! ! # The name of the directory that contains temporary libtool files. ! objdir=$objdir ! ! # How to create reloadable object files. ! reload_flag=$lt_reload_flag ! reload_cmds=$lt_reload_cmds ! ! # How to pass a linker flag through the compiler. ! wl=$lt_lt_prog_compiler_wl_RC ! ! # Object file suffix (normally "o"). ! objext="$ac_objext" ! ! # Old archive suffix (normally "a"). ! libext="$libext" ! ! # Shared library suffix (normally ".so"). ! shrext='$shrext' ! ! # Executable file suffix (normally ""). ! exeext="$exeext" ! ! # Additional compiler flags for building library objects. ! pic_flag=$lt_lt_prog_compiler_pic_RC ! pic_mode=$pic_mode ! ! # What is the maximum length of a command? ! max_cmd_len=$lt_cv_sys_max_cmd_len ! ! # Does compiler simultaneously support -c and -o options? ! compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC ! ! # Must we lock files when doing compilation ? ! need_locks=$lt_need_locks ! ! # Do we need the lib prefix for modules? ! need_lib_prefix=$need_lib_prefix ! ! # Do we need a version for libraries? ! need_version=$need_version ! ! # Whether dlopen is supported. ! dlopen_support=$enable_dlopen ! ! # Whether dlopen of programs is supported. ! dlopen_self=$enable_dlopen_self ! ! # Whether dlopen of statically linked programs is supported. ! dlopen_self_static=$enable_dlopen_self_static ! ! # Compiler flag to prevent dynamic linking. ! link_static_flag=$lt_lt_prog_compiler_static_RC ! ! # Compiler flag to turn off builtin functions. ! no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC ! ! # Compiler flag to allow reflexive dlopens. ! export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC ! ! # Compiler flag to generate shared objects directly from archives. ! whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC ! ! # Compiler flag to generate thread-safe objects. ! thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC ! ! # Library versioning type. ! version_type=$version_type ! ! # Format of library name prefix. ! libname_spec=$lt_libname_spec ! ! # List of archive names. First name is the real one, the rest are links. ! # The last name is the one that the linker finds with -lNAME. ! library_names_spec=$lt_library_names_spec ! ! # The coded name of the library, if different from the real name. ! soname_spec=$lt_soname_spec ! ! # Commands used to build and install an old-style archive. ! RANLIB=$lt_RANLIB ! old_archive_cmds=$lt_old_archive_cmds_RC ! old_postinstall_cmds=$lt_old_postinstall_cmds ! old_postuninstall_cmds=$lt_old_postuninstall_cmds ! ! # Create an old-style archive from a shared archive. ! old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC ! ! # Create a temporary old-style archive to link instead of a shared archive. ! old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC ! ! # Commands used to build and install a shared archive. ! archive_cmds=$lt_archive_cmds_RC ! archive_expsym_cmds=$lt_archive_expsym_cmds_RC ! postinstall_cmds=$lt_postinstall_cmds ! postuninstall_cmds=$lt_postuninstall_cmds ! ! # Commands used to build a loadable module (assumed same as above if empty) ! module_cmds=$lt_module_cmds_RC ! module_expsym_cmds=$lt_module_expsym_cmds_RC ! ! # Commands to strip libraries. ! old_striplib=$lt_old_striplib ! striplib=$lt_striplib ! ! # Dependencies to place before the objects being linked to create a ! # shared library. ! predep_objects=$lt_predep_objects_RC ! ! # Dependencies to place after the objects being linked to create a ! # shared library. ! postdep_objects=$lt_postdep_objects_RC ! ! # Dependencies to place before the objects being linked to create a ! # shared library. ! predeps=$lt_predeps_RC ! ! # Dependencies to place after the objects being linked to create a ! # shared library. ! postdeps=$lt_postdeps_RC ! ! # The library search path used internally by the compiler when linking ! # a shared library. ! compiler_lib_search_path=$lt_compiler_lib_search_path_RC ! ! # Method to check whether dependent libraries are shared objects. ! deplibs_check_method=$lt_deplibs_check_method ! ! # Command to use when deplibs_check_method == file_magic. ! file_magic_cmd=$lt_file_magic_cmd ! ! # Flag that allows shared libraries with undefined symbols to be built. ! allow_undefined_flag=$lt_allow_undefined_flag_RC ! ! # Flag that forces no undefined symbols. ! no_undefined_flag=$lt_no_undefined_flag_RC ! ! # Commands used to finish a libtool library installation in a directory. ! finish_cmds=$lt_finish_cmds ! ! # Same as above, but a single script fragment to be evaled but not shown. ! finish_eval=$lt_finish_eval ! ! # Take the output of nm and produce a listing of raw symbols and C names. ! global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe ! ! # Transform the output of nm in a proper C declaration ! global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl ! ! # Transform the output of nm in a C name address pair ! global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address ! ! # This is the shared library runtime path variable. ! runpath_var=$runpath_var ! ! # This is the shared library path variable. ! shlibpath_var=$shlibpath_var ! ! # Is shlibpath searched before the hard-coded library search path? ! shlibpath_overrides_runpath=$shlibpath_overrides_runpath ! ! # How to hardcode a shared library path into an executable. ! hardcode_action=$hardcode_action_RC ! ! # Whether we should hardcode library paths into libraries. ! hardcode_into_libs=$hardcode_into_libs ! ! # Flag to hardcode \$libdir into a binary during linking. ! # This must work even if \$libdir does not exist. ! hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC ! ! # If ld is used when linking, flag to hardcode \$libdir into ! # a binary during linking. This must work even if \$libdir does ! # not exist. ! hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC ! ! # Whether we need a single -rpath flag with a separated argument. ! hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC ! ! # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the ! # resulting binary. ! hardcode_direct=$hardcode_direct_RC ! ! # Set to yes if using the -LDIR flag during linking hardcodes DIR into the ! # resulting binary. ! hardcode_minus_L=$hardcode_minus_L_RC ! ! # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into ! # the resulting binary. ! hardcode_shlibpath_var=$hardcode_shlibpath_var_RC ! ! # Set to yes if building a shared library automatically hardcodes DIR into the library ! # and all subsequent libraries and executables linked against it. ! hardcode_automatic=$hardcode_automatic_RC ! ! # Variables whose values should be saved in libtool wrapper scripts and ! # restored at relink time. ! variables_saved_for_relink="$variables_saved_for_relink" ! ! # Whether libtool must link a program against all its dependency libraries. ! link_all_deplibs=$link_all_deplibs_RC ! ! # Compile-time system search path for libraries ! sys_lib_search_path_spec=$lt_sys_lib_search_path_spec ! ! # Run-time system search path for libraries ! sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec ! ! # Fix the shell variable \$srcfile for the compiler. ! fix_srcfile_path="$fix_srcfile_path_RC" ! ! # Set to yes if exported symbols are required. ! always_export_symbols=$always_export_symbols_RC ! ! # The commands to list exported symbols. ! export_symbols_cmds=$lt_export_symbols_cmds_RC ! ! # The commands to extract the exported symbol list from a shared archive. ! extract_expsyms_cmds=$lt_extract_expsyms_cmds ! ! # Symbols that should not be listed in the preloaded symbols. ! exclude_expsyms=$lt_exclude_expsyms_RC ! ! # Symbols that must always be exported. ! include_expsyms=$lt_include_expsyms_RC ! ! # ### END LIBTOOL TAG CONFIG: $tagname ! ! __EOF__ ! ! else ! # If there is no Makefile yet, we rely on a make rule to execute ! # `config.status --recheck' to rerun these tests and create the ! # libtool script then. ! test -f Makefile && make "$ltmain" fi + + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + + CC="$lt_save_CC" + + ;; + + *) + { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 + echo "$as_me: error: Unsupported tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 + echo "$as_me: error: unable to update list of available tagged configurations." >&2;} + { (exit 1); exit 1; }; } + fi fi ! ! ! # This can be used to rebuild libtool when needed ! LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" ! ! # Always use our own libtool. ! LIBTOOL='$(SHELL) $(top_builddir)/libtool' ! ! # Prevent multiple expansion ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ac_header_dirent=no ! for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do ! as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` ! echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 ! echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 ! if eval "test \"\${$as_ac_Header+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #include ! #include <$ac_hdr> ! ! int ! main () ! { ! if ((DIR *) 0) ! return 0; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! eval "$as_ac_Header=yes" ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! eval "$as_ac_Header=no" fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ! if test `eval echo '${'$as_ac_Header'}'` = yes; then ! cat >>confdefs.h <<_ACEOF ! #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 ! _ACEOF + ac_header_dirent=$ac_hdr; break fi ! done ! # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. ! if test $ac_header_dirent = dirent.h; then ! echo "$as_me:$LINENO: checking for library containing opendir" >&5 ! echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 ! if test "${ac_cv_search_opendir+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! ac_func_search_save_LIBS=$LIBS ! ac_cv_search_opendir=no ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! /* Override any gcc2 internal prototype to avoid an error. */ ! #ifdef __cplusplus ! extern "C" ! #endif ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char opendir (); ! int ! main () ! { ! opendir (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_search_opendir="none required" else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! if test "$ac_cv_search_opendir" = no; then ! for ac_lib in dir; do ! LIBS="-l$ac_lib $ac_func_search_save_LIBS" ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! /* Override any gcc2 internal prototype to avoid an error. */ ! #ifdef __cplusplus ! extern "C" ! #endif ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char opendir (); ! int ! main () ! { ! opendir (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_search_opendir="-l$ac_lib" ! break ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! done ! fi ! LIBS=$ac_func_search_save_LIBS fi + echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 + echo "${ECHO_T}$ac_cv_search_opendir" >&6 + if test "$ac_cv_search_opendir" != no; then + test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" fi + + else + echo "$as_me:$LINENO: checking for library containing opendir" >&5 + echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 + if test "${ac_cv_search_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_func_search_save_LIBS=$LIBS + ac_cv_search_opendir=no + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + + /* Override any gcc2 internal prototype to avoid an error. */ + #ifdef __cplusplus + extern "C" + #endif + /* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + char opendir (); + int + main () + { + opendir (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_opendir="none required" + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + fi + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + if test "$ac_cv_search_opendir" = no; then + for ac_lib in x; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ ! /* Override any gcc2 internal prototype to avoid an error. */ ! #ifdef __cplusplus ! extern "C" ! #endif ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char opendir (); ! int ! main () ! { ! opendir (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_search_opendir="-l$ac_lib" ! break ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! done ! fi ! LIBS=$ac_func_search_save_LIBS ! fi ! echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 ! echo "${ECHO_T}$ac_cv_search_opendir" >&6 ! if test "$ac_cv_search_opendir" != no; then ! test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" ! ! fi fi # Check whether --enable-ltdl-install or --disable-ltdl-install was given. if test "${enable_ltdl_install+set}" = set; then enableval="$enable_ltdl_install" + fi; *************** else *** 2891,2896 **** --- 18985,18991 ---- fi + if test x"${enable_ltdl_convenience-no}" != xno; then CONVENIENCE_LTDL_TRUE= CONVENIENCE_LTDL_FALSE='#' *************** else *** 2899,3414 **** CONVENIENCE_LTDL_FALSE= fi - echo $ac_n "checking which extension is used for shared libraries""... $ac_c" 1>&6 - echo "configure:2904: checking which extension is used for shared libraries" >&5 - if eval "test \"`echo '$''{'libltdl_cv_shlibext'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - ( - last= - for spec in $library_names_spec; do - last="$spec" - done - echo "$last" | sed 's/\[.*\]//;s/^[^.]*//;s/\$.*$//;s/\.$//' > conftest ! ) ! libltdl_cv_shlibext=`cat conftest` ! rm -f conftest ! fi ! echo "$ac_t""$libltdl_cv_shlibext" 1>&6 if test -n "$libltdl_cv_shlibext"; then ! cat >> confdefs.h <&6 ! echo "configure:2931: checking which variable specifies run-time library path" >&5 ! if eval "test \"`echo '$''{'libltdl_cv_shlibpath_var'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else libltdl_cv_shlibpath_var="$shlibpath_var" fi ! ! echo "$ac_t""$libltdl_cv_shlibpath_var" 1>&6 if test -n "$libltdl_cv_shlibpath_var"; then ! cat >> confdefs.h <&6 ! echo "configure:2947: checking for the default library search path" >&5 ! if eval "test \"`echo '$''{'libltdl_cv_sys_search_path'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec" fi ! ! echo "$ac_t""$libltdl_cv_sys_search_path" 1>&6 if test -n "$libltdl_cv_sys_search_path"; then - case "$host" in - *-*-mingw*) pathsep=";" ;; - *) pathsep=":" ;; - esac sys_search_path= for dir in $libltdl_cv_sys_search_path; do if test -z "$sys_search_path"; then sys_search_path="$dir" else ! sys_search_path="$sys_search_path$pathsep$dir" fi done ! cat >> confdefs.h <&6 ! echo "configure:2975: checking for objdir" >&5 ! if eval "test \"`echo '$''{'libltdl_cv_objdir'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else libltdl_cv_objdir="$objdir" ! if test -n "$objdir"; then ! : ! else ! rm -f .libs 2>/dev/null ! mkdir .libs 2>/dev/null ! if test -d .libs; then ! libltdl_cv_objdir=.libs else ! # MS-DOS does not allow filenames that begin with a dot. ! libltdl_cv_objdir=_libs fi ! rmdir .libs 2>/dev/null ! fi fi ! echo "$ac_t""$libltdl_cv_objdir" 1>&6 ! cat >> confdefs.h <&6 ! echo "configure:3002: checking whether libtool supports -dlopen/-dlpreopen" >&5 ! if eval "test \"`echo '$''{'libltdl_cv_preloaded_symbols'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! if test -n "$global_symbol_pipe"; then libltdl_cv_preloaded_symbols=yes else libltdl_cv_preloaded_symbols=no fi fi ! echo "$ac_t""$libltdl_cv_preloaded_symbols" 1>&6 ! if test x"$libltdl_cv_preloaded_symbols" = x"yes"; then ! cat >> confdefs.h <<\EOF #define HAVE_PRELOADED_SYMBOLS 1 ! EOF fi LIBADD_DL= ! echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 ! echo "configure:3024: checking for dlopen in -ldl" >&5 ! ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` ! if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! ac_save_LIBS="$LIBS" ! LIBS="-ldl $LIBS" ! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=yes" else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=no" ! fi ! rm -f conftest* ! LIBS="$ac_save_LIBS" fi ! if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ! cat >> confdefs.h <<\EOF ! #define HAVE_LIBDL 1 ! EOF ! LIBADD_DL="-ldl" else ! echo "$ac_t""no" 1>&6 ! echo $ac_n "checking for dlopen""... $ac_c" 1>&6 ! echo "configure:3065: checking for dlopen" >&5 ! if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char dlopen(); ! int main() { ! /* The GNU C library defines this for functions which it implements ! to always fail with ENOSYS. Some functions are actually named ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub_dlopen) || defined (__stub___dlopen) ! choke me ! #else ! dlopen(); ! #endif ! ; return 0; } ! EOF ! if { (eval echo configure:3093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! eval "ac_cv_func_dlopen=yes" else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_func_dlopen=no" fi ! rm -f conftest* fi ! if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ! cat >> confdefs.h <<\EOF #define HAVE_LIBDL 1 ! EOF else ! echo "$ac_t""no" 1>&6 ! echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6 ! echo "configure:3114: checking for dlopen in -lsvld" >&5 ! ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-%__p_%'` ! if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! ac_save_LIBS="$LIBS" LIBS="-lsvld $LIBS" ! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=yes" else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=no" ! fi ! rm -f conftest* ! LIBS="$ac_save_LIBS" fi ! if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ! cat >> confdefs.h <<\EOF #define HAVE_LIBDL 1 ! EOF ! LIBADD_DL="-lsvld" else ! echo "$ac_t""no" 1>&6 ! fi ! fi fi ! echo $ac_n "checking for shl_load""... $ac_c" 1>&6 ! echo "configure:3162: checking for shl_load" >&5 ! if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char shl_load(); ! ! int main() { ! /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ ! #if defined (__stub_shl_load) || defined (__stub___shl_load) choke me #else ! shl_load(); #endif ! ; return 0; } ! EOF ! if { (eval echo configure:3190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! eval "ac_cv_func_shl_load=yes" else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_func_shl_load=no" fi ! rm -f conftest* fi ! if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ! cat >> confdefs.h <<\EOF ! #define HAVE_SHL_LOAD 1 ! EOF ! ! else ! echo "$ac_t""no" 1>&6 ! echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 ! echo "configure:3211: checking for shl_load in -ldld" >&5 ! ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` ! if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! ac_save_LIBS="$LIBS" ! LIBS="-ldld $LIBS" ! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" fi - rm -f conftest* - LIBS="$ac_save_LIBS" - fi - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF - #define HAVE_SHL_LOAD 1 - EOF - LIBADD_DL="$LIBADD_DL -ldld" - else - echo "$ac_t""no" 1>&6 fi fi - echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 - echo "configure:3258: checking for dld_link in -ldld" >&5 - ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_save_LIBS="$LIBS" - LIBS="-ldld $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" fi ! rm -f conftest* ! LIBS="$ac_save_LIBS" fi ! if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ! cat >> confdefs.h <<\EOF ! #define HAVE_DLD 1 ! EOF ! test "x$ac_cv_lib_dld_shl_load" = yes || LIBADD_DL="$LIBADD_DL -ldld" ! else ! echo "$ac_t""no" 1>&6 fi ! if test "x$ac_cv_func_dlopen" = xyes || test "x$ac_cv_lib_dl_dlopen" = xyes; then ! LIBS_SAVE="$LIBS" ! LIBS="$LIBS $LIBADD_DL" ! for ac_func in dlerror do ! echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:3308: checking for $ac_func" >&5 ! if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char $ac_func(); ! ! int main() { ! /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else ! $ac_func(); #endif ! ; return 0; } ! EOF ! if { (eval echo configure:3336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! eval "ac_cv_func_$ac_func=yes" else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_func_$ac_func=no" fi ! rm -f conftest* fi - if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done ! LIBS="$LIBS_SAVE" fi ! echo $ac_n "checking for _ prefix in compiled symbols""... $ac_c" 1>&6 ! echo "configure:3364: checking for _ prefix in compiled symbols" >&5 ! if eval "test \"`echo '$''{'ac_cv_sys_symbol_underscore'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_sys_symbol_underscore=no ! cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ! # Now try to grab the symbols. ! ac_nlist=conftest.nm ! if { (eval echo configure:3376: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then ! # See whether the symbols have a leading underscore. ! if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then ! ac_cv_sys_symbol_underscore=yes ! else ! if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then ! : else ! echo "configure: cannot find nm_test_func in $ac_nlist" >&5 fi fi else ! echo "configure: cannot run $ac_cv_sys_global_symbol_pipe" >&5 fi ! else ! echo "configure: failed program was:" >&5 ! cat conftest.c >&5 ! fi ! rm -rf conftest* fi - echo "$ac_t""$ac_cv_sys_symbol_underscore" 1>&6 if test x"$ac_cv_sys_symbol_underscore" = xyes; then ! if test x"$ac_cv_func_dlopen" = xyes || ! test x"$ac_cv_lib_dl_dlopen" = xyes ; then ! echo $ac_n "checking whether we have to add an underscore for dlsym""... $ac_c" 1>&6 ! echo "configure:3403: checking whether we have to add an underscore for dlsym" >&5 ! if eval "test \"`echo '$''{'libltdl_cv_need_uscore'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! if test "$cross_compiling" = yes; then libltdl_cv_need_uscore=cross - else cat > conftest.$ac_ext <&5 ! echo $ECHO_N "checking which extension is used for loadable modules... $ECHO_C" >&6 ! if test "${libltdl_cv_shlibext+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! # Here in libltdl for libgcj we don't build modules for darwin. ! # So we say no. Then the extension gets .dylib which is the right ! # thing for shared libraries on darwin. ! case "$host_os" in ! darwin*) ! module=no ! ;; ! *) ! module=yes ! ;; ! esac ! eval libltdl_cv_shlibext=$shrext ! fi ! echo "$as_me:$LINENO: result: $libltdl_cv_shlibext" >&5 ! echo "${ECHO_T}$libltdl_cv_shlibext" >&6 if test -n "$libltdl_cv_shlibext"; then ! ! cat >>confdefs.h <<_ACEOF #define LTDL_SHLIB_EXT "$libltdl_cv_shlibext" ! _ACEOF fi ! ! echo "$as_me:$LINENO: checking which variable specifies run-time library path" >&5 ! echo $ECHO_N "checking which variable specifies run-time library path... $ECHO_C" >&6 ! if test "${libltdl_cv_shlibpath_var+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else libltdl_cv_shlibpath_var="$shlibpath_var" fi ! echo "$as_me:$LINENO: result: $libltdl_cv_shlibpath_var" >&5 ! echo "${ECHO_T}$libltdl_cv_shlibpath_var" >&6 if test -n "$libltdl_cv_shlibpath_var"; then ! ! cat >>confdefs.h <<_ACEOF #define LTDL_SHLIBPATH_VAR "$libltdl_cv_shlibpath_var" ! _ACEOF fi ! ! echo "$as_me:$LINENO: checking for the default library search path" >&5 ! echo $ECHO_N "checking for the default library search path... $ECHO_C" >&6 ! if test "${libltdl_cv_sys_search_path+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec" fi ! echo "$as_me:$LINENO: result: $libltdl_cv_sys_search_path" >&5 ! echo "${ECHO_T}$libltdl_cv_sys_search_path" >&6 if test -n "$libltdl_cv_sys_search_path"; then sys_search_path= for dir in $libltdl_cv_sys_search_path; do if test -z "$sys_search_path"; then sys_search_path="$dir" else ! sys_search_path="$sys_search_path$PATH_SEPARATOR$dir" fi done ! ! cat >>confdefs.h <<_ACEOF #define LTDL_SYSSEARCHPATH "$sys_search_path" ! _ACEOF fi ! echo "$as_me:$LINENO: checking for objdir" >&5 ! echo $ECHO_N "checking for objdir... $ECHO_C" >&6 ! if test "${libltdl_cv_objdir+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else libltdl_cv_objdir="$objdir" ! if test -n "$objdir"; then ! : else ! rm -f .libs 2>/dev/null ! mkdir .libs 2>/dev/null ! if test -d .libs; then ! libltdl_cv_objdir=.libs ! else ! # MS-DOS does not allow filenames that begin with a dot. ! libltdl_cv_objdir=_libs ! fi ! rmdir .libs 2>/dev/null fi ! fi + echo "$as_me:$LINENO: result: $libltdl_cv_objdir" >&5 + echo "${ECHO_T}$libltdl_cv_objdir" >&6 ! cat >>confdefs.h <<_ACEOF #define LTDL_OBJDIR "$libltdl_cv_objdir/" ! _ACEOF ! ! echo "$as_me:$LINENO: checking whether libtool supports -dlopen/-dlpreopen" >&5 ! echo $ECHO_N "checking whether libtool supports -dlopen/-dlpreopen... $ECHO_C" >&6 ! if test "${libltdl_cv_preloaded_symbols+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! if test -n "$lt_cv_sys_global_symbol_pipe"; then libltdl_cv_preloaded_symbols=yes else libltdl_cv_preloaded_symbols=no fi fi + echo "$as_me:$LINENO: result: $libltdl_cv_preloaded_symbols" >&5 + echo "${ECHO_T}$libltdl_cv_preloaded_symbols" >&6 + if test x"$libltdl_cv_preloaded_symbols" = xyes; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_PRELOADED_SYMBOLS 1 ! _ACEOF fi LIBADD_DL= ! ! ac_ext=c ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ! ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_c_compiler_gnu ! ! ! echo "$as_me:$LINENO: checking for shl_load" >&5 ! echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 ! if test "${ac_cv_func_shl_load+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char shl_load (); below. ! Prefer to if __STDC__ is defined, since ! exists even on freestanding compilers. */ ! #ifdef __STDC__ ! # include ! #else ! # include ! #endif /* Override any gcc2 internal prototype to avoid an error. */ + #ifdef __cplusplus + extern "C" + { + #endif /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char shl_load (); ! /* The GNU C library defines this for functions which it implements ! to always fail with ENOSYS. Some functions are actually named ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub_shl_load) || defined (__stub___shl_load) ! choke me ! #else ! char (*f) () = shl_load; ! #endif ! #ifdef __cplusplus ! } ! #endif ! int ! main () ! { ! return f != shl_load; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_func_shl_load=yes else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_shl_load=no fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 ! echo "${ECHO_T}$ac_cv_func_shl_load" >&6 ! if test $ac_cv_func_shl_load = yes; then ! ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_SHL_LOAD 1 ! _ACEOF ! else ! echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 ! echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 ! if test "${ac_cv_lib_dld_shl_load+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! ac_check_lib_save_LIBS=$LIBS ! LIBS="-ldld $LIBS" ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! /* Override any gcc2 internal prototype to avoid an error. */ + #ifdef __cplusplus + extern "C" + #endif /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char shl_load (); ! int ! main () ! { ! shl_load (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_lib_dld_shl_load=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_lib_dld_shl_load=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! LIBS=$ac_check_lib_save_LIBS ! fi ! echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 ! echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 ! if test $ac_cv_lib_dld_shl_load = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_SHL_LOAD 1 ! _ACEOF ! LIBADD_DL="$LIBADD_DL -ldld" else ! echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 ! echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 ! if test "${ac_cv_lib_dl_dlopen+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! ac_check_lib_save_LIBS=$LIBS ! LIBS="-ldl $LIBS" ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! /* Override any gcc2 internal prototype to avoid an error. */ ! #ifdef __cplusplus ! extern "C" ! #endif ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char dlopen (); ! int ! main () ! { ! dlopen (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_lib_dl_dlopen=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_lib_dl_dlopen=no fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! LIBS=$ac_check_lib_save_LIBS fi + echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 + echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 + if test $ac_cv_lib_dl_dlopen = yes; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_LIBDL 1 ! _ACEOF + LIBADD_DL="-ldl" libltdl_cv_lib_dl_dlopen="yes" else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #if HAVE_DLFCN_H ! # include ! #endif ! ! int ! main () ! { ! dlopen(0, 0); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_LIBDL 1 ! _ACEOF ! libltdl_cv_func_dlopen="yes" else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 ! echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 ! if test "${ac_cv_lib_svld_dlopen+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! /* Override any gcc2 internal prototype to avoid an error. */ + #ifdef __cplusplus + extern "C" + #endif /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char dlopen (); ! int ! main () ! { ! dlopen (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_lib_svld_dlopen=yes else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_svld_dlopen=no fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! LIBS=$ac_check_lib_save_LIBS ! fi ! echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 ! echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 ! if test $ac_cv_lib_svld_dlopen = yes; then ! ! cat >>confdefs.h <<\_ACEOF #define HAVE_LIBDL 1 ! _ACEOF + LIBADD_DL="-lsvld" libltdl_cv_func_dlopen="yes" else ! echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 ! echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 ! if test "${ac_cv_lib_dld_dld_link+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! ac_check_lib_save_LIBS=$LIBS ! LIBS="-ldld $LIBS" ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! /* Override any gcc2 internal prototype to avoid an error. */ ! #ifdef __cplusplus ! extern "C" ! #endif ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char dld_link (); ! int ! main () ! { ! dld_link (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_lib_dld_dld_link=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_dld_dld_link=no + fi + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS fi + echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 + echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 + if test $ac_cv_lib_dld_dld_link = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_DLD 1 ! _ACEOF ! ! LIBADD_DL="$LIBADD_DL -ldld" else ! echo "$as_me:$LINENO: checking for _dyld_func_lookup" >&5 ! echo $ECHO_N "checking for _dyld_func_lookup... $ECHO_C" >&6 ! if test "${ac_cv_func__dyld_func_lookup+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char _dyld_func_lookup (); below. ! Prefer to if __STDC__ is defined, since ! exists even on freestanding compilers. */ ! #ifdef __STDC__ ! # include ! #else ! # include ! #endif /* Override any gcc2 internal prototype to avoid an error. */ + #ifdef __cplusplus + extern "C" + { + #endif /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char _dyld_func_lookup (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ ! #if defined (__stub__dyld_func_lookup) || defined (__stub____dyld_func_lookup) choke me #else ! char (*f) () = _dyld_func_lookup; ! #endif ! #ifdef __cplusplus ! } #endif ! int ! main () ! { ! return f != _dyld_func_lookup; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_func__dyld_func_lookup=yes else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_func__dyld_func_lookup=no fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi + echo "$as_me:$LINENO: result: $ac_cv_func__dyld_func_lookup" >&5 + echo "${ECHO_T}$ac_cv_func__dyld_func_lookup" >&6 + if test $ac_cv_func__dyld_func_lookup = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_DYLD 1 ! _ACEOF fi fi fi fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! ! fi + fi ! ! if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes ! then ! lt_save_LIBS="$LIBS" ! LIBS="$LIBS $LIBADD_DL" ! ! for ac_func in dlerror do ! as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` ! echo "$as_me:$LINENO: checking for $ac_func" >&5 ! echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 ! if eval "test \"\${$as_ac_var+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char $ac_func (); below. ! Prefer to if __STDC__ is defined, since ! exists even on freestanding compilers. */ ! #ifdef __STDC__ ! # include ! #else ! # include ! #endif /* Override any gcc2 internal prototype to avoid an error. */ + #ifdef __cplusplus + extern "C" + { + #endif /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else ! char (*f) () = $ac_func; ! #endif ! #ifdef __cplusplus ! } #endif ! int ! main () ! { ! return f != $ac_func; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! eval "$as_ac_var=yes" else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! eval "$as_ac_var=no" fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi + echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 + echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 + if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 + _ACEOF fi done ! LIBS="$lt_save_LIBS" fi + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu ! ! ! echo "$as_me:$LINENO: checking for _ prefix in compiled symbols" >&5 ! echo $ECHO_N "checking for _ prefix in compiled symbols... $ECHO_C" >&6 ! if test "${ac_cv_sys_symbol_underscore+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_sys_symbol_underscore=no ! cat > conftest.$ac_ext <&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; then ! # Now try to grab the symbols. ! ac_nlist=conftest.nm ! if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist\"") >&5 ! (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && test -s "$ac_nlist"; then ! # See whether the symbols have a leading underscore. ! if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then ! ac_cv_sys_symbol_underscore=yes else ! if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then ! : ! else ! echo "configure: cannot find nm_test_func in $ac_nlist" >&5 ! fi fi + else + echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else ! echo "configure: failed program was:" >&5 ! cat conftest.c >&5 fi ! rm -rf conftest* fi + echo "$as_me:$LINENO: result: $ac_cv_sys_symbol_underscore" >&5 + echo "${ECHO_T}$ac_cv_sys_symbol_underscore" >&6 + if test x"$ac_cv_sys_symbol_underscore" = xyes; then ! if test x"$libltdl_cv_func_dlopen" = xyes || ! test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then ! echo "$as_me:$LINENO: checking whether we have to add an underscore for dlsym" >&5 ! echo $ECHO_N "checking whether we have to add an underscore for dlsym... $ECHO_C" >&6 ! if test "${libltdl_cv_need_uscore+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! libltdl_cv_need_uscore=unknown ! save_LIBS="$LIBS" ! LIBS="$LIBS $LIBADD_DL" ! if test "$cross_compiling" = yes; then : libltdl_cv_need_uscore=cross else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown cat > conftest.$ac_ext < #ifdef RTLD_GLOBAL ! # define LTDL_GLOBAL RTLD_GLOBAL #else ! # ifdef DL_GLOBAL ! # define LTDL_GLOBAL DL_GLOBAL ! # else ! # define LTDL_GLOBAL 0 ! # endif #endif ! /* We may have to define LTDL_LAZY_OR_NOW in the command line if we find out it does not work in some platform. */ ! #ifndef LTDL_LAZY_OR_NOW ! # ifdef RTLD_LAZY ! # define LTDL_LAZY_OR_NOW RTLD_LAZY ! # else ! # ifdef DL_LAZY ! # define LTDL_LAZY_OR_NOW DL_LAZY # else ! # ifdef RTLD_NOW ! # define LTDL_LAZY_OR_NOW RTLD_NOW ! # else ! # ifdef DL_NOW ! # define LTDL_LAZY_OR_NOW DL_NOW # else ! # define LTDL_LAZY_OR_NOW 0 # endif - # endif # endif - # endif #endif ! fnord() { int i=42;} ! main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); ! if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); ! if(ptr1 && !ptr2) { dlclose(self); exit(0); } } exit(1); } EOF ! if { (eval echo configure:3459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ! then ! libltdl_cv_need_uscore=no ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -fr conftest* ! libltdl_cv_need_uscore=yes fi rm -fr conftest* - fi ! fi ! echo "$ac_t""$libltdl_cv_need_uscore" 1>&6 fi fi if test x"$libltdl_cv_need_uscore" = xyes; then ! cat >> confdefs.h <<\EOF #define NEED_USCORE 1 ! EOF fi ! for ac_hdr in malloc.h memory.h stdlib.h stdio.h ctype.h dlfcn.h dl.h dld.h do ! ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ! echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:3491: checking for $ac_hdr" >&5 ! if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < ! EOF ! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3501: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ! if test -z "$ac_err"; then ! rm -rf conftest* ! eval "ac_cv_header_$ac_safe=yes" else ! echo "$ac_err" >&5 ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_header_$ac_safe=no" fi ! rm -f conftest* fi ! if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ! ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` ! cat >> confdefs.h <&6 fi done ! for ac_hdr in string.h strings.h do ! ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ! echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:3531: checking for $ac_hdr" >&5 ! if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < ! EOF ! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ! if test -z "$ac_err"; then ! rm -rf conftest* ! eval "ac_cv_header_$ac_safe=yes" else ! echo "$ac_err" >&5 ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_header_$ac_safe=no" fi ! rm -f conftest* fi ! if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ! ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` ! cat >> confdefs.h <&6 fi done for ac_func in strchr index do ! echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:3570: checking for $ac_func" >&5 ! if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char $ac_func(); ! ! int main() { ! /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else ! $ac_func(); #endif ! ; return 0; } ! EOF ! if { (eval echo configure:3598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! eval "ac_cv_func_$ac_func=yes" else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_func_$ac_func=no" fi ! rm -f conftest* fi ! ! if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ! ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >> confdefs.h <&6 fi done for ac_func in strrchr rindex do ! echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:3625: checking for $ac_func" >&5 ! if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char $ac_func(); ! int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else ! $ac_func(); #endif ! ; return 0; } ! EOF ! if { (eval echo configure:3653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! eval "ac_cv_func_$ac_func=yes" else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_func_$ac_func=no" fi ! rm -f conftest* fi ! ! if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ! ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >> confdefs.h <&6 fi done ! for ac_func in strcmp do ! echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:3680: checking for $ac_func" >&5 ! if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char $ac_func(); - int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else ! $ac_func(); #endif ! ; return 0; } ! EOF ! if { (eval echo configure:3708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! eval "ac_cv_func_$ac_func=yes" else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_func_$ac_func=no" fi ! rm -f conftest* fi - if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done ! trap '' 1 2 15 ! cat > confcache <<\EOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure ! # scripts and configure runs. It is not useful on other systems. ! # If it contains results you don't want to keep, you may remove or edit it. # ! # By default, configure uses ./config.cache as the cache file, ! # creating it if it does not exist already. You can give configure ! # the --cache-file=FILE option to use a different cache file; that is ! # what configure does when it calls configure scripts in ! # subdirectories, so they share the cache. ! # Giving --cache-file=/dev/null disables caching, for debugging configure. ! # config.status only pays attention to the cache file if you give it the ! # --recheck option to rerun configure. # ! EOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ! (set) 2>&1 | ! case `(ac_space=' '; set | grep ac_space) 2>&1` in ! *ac_space=\ *) ! # `set' does not quote correctly, so add quotes (double-quote substitution ! # turns \\\\ into \\, and sed turns \\ into \). ! sed -n \ ! -e "s/'/'\\\\''/g" \ ! -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ! ;; ! *) ! # `set' quotes correctly as required by POSIX, so do not add quotes. ! sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ! ;; ! esac >> confcache ! if cmp -s $cache_file confcache; then ! : ! else if test -w $cache_file; then ! echo "updating cache $cache_file" ! cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache - trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' ! # Any assignment to VPATH causes Sun make to only execute ! # the first set of double-colon rules, so remove it if not needed. ! # If there is a colon in the path, we need to keep it. if test "x$srcdir" = x.; then ! ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' fi - trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - DEFS=-DHAVE_CONFIG_H ! # Without the "./", some shells look in PATH for config.status. ! : ${CONFIG_STATUS=./config.status} ! echo creating $CONFIG_STATUS ! rm -f $CONFIG_STATUS ! cat > $CONFIG_STATUS </dev/null | sed 1q`: - # - # $0 $ac_configure_args - # # Compiler output produced by configure, useful for debugging ! # configure, is in ./config.log if it exists. ! ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" ! for ac_option do ! case "\$ac_option" in ! -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ! echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" ! exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; ! -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ! echo "$CONFIG_STATUS generated by autoconf version 2.13" ! exit 0 ;; ! -help | --help | --hel | --he | --h) ! echo "\$ac_cs_usage"; exit 0 ;; ! *) echo "\$ac_cs_usage"; exit 1 ;; ! esac done ! ac_given_srcdir=$srcdir ! ac_given_INSTALL="$INSTALL" ! trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 ! EOF ! cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF - $ac_vpsub - $extrasub - s%@SHELL@%$SHELL%g - s%@CFLAGS@%$CFLAGS%g - s%@CPPFLAGS@%$CPPFLAGS%g - s%@CXXFLAGS@%$CXXFLAGS%g - s%@FFLAGS@%$FFLAGS%g - s%@DEFS@%$DEFS%g - s%@LDFLAGS@%$LDFLAGS%g - s%@LIBS@%$LIBS%g - s%@exec_prefix@%$exec_prefix%g - s%@prefix@%$prefix%g - s%@program_transform_name@%$program_transform_name%g - s%@bindir@%$bindir%g - s%@sbindir@%$sbindir%g - s%@libexecdir@%$libexecdir%g - s%@datadir@%$datadir%g - s%@sysconfdir@%$sysconfdir%g - s%@sharedstatedir@%$sharedstatedir%g - s%@localstatedir@%$localstatedir%g - s%@libdir@%$libdir%g - s%@includedir@%$includedir%g - s%@oldincludedir@%$oldincludedir%g - s%@infodir@%$infodir%g - s%@mandir@%$mandir%g - s%@mkinstalldirs@%$mkinstalldirs%g - s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g - s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g - s%@INSTALL_DATA@%$INSTALL_DATA%g - s%@PACKAGE@%$PACKAGE%g - s%@VERSION@%$VERSION%g - s%@ACLOCAL@%$ACLOCAL%g - s%@AUTOCONF@%$AUTOCONF%g - s%@AUTOMAKE@%$AUTOMAKE%g - s%@AUTOHEADER@%$AUTOHEADER%g - s%@MAKEINFO@%$MAKEINFO%g - s%@SET_MAKE@%$SET_MAKE%g - s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g - s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g - s%@MAINT@%$MAINT%g - s%@CC@%$CC%g - s%@host@%$host%g - s%@host_alias@%$host_alias%g - s%@host_cpu@%$host_cpu%g - s%@host_vendor@%$host_vendor%g - s%@host_os@%$host_os%g - s%@build@%$build%g - s%@build_alias@%$build_alias%g - s%@build_cpu@%$build_cpu%g - s%@build_vendor@%$build_vendor%g - s%@build_os@%$build_os%g - s%@LN_S@%$LN_S%g - s%@OBJEXT@%$OBJEXT%g - s%@EXEEXT@%$EXEEXT%g - s%@RANLIB@%$RANLIB%g - s%@STRIP@%$STRIP%g - s%@DLLTOOL@%$DLLTOOL%g - s%@AS@%$AS%g - s%@OBJDUMP@%$OBJDUMP%g - s%@LIBTOOL@%$LIBTOOL%g - s%@LIBTOOL_DEPS@%$LIBTOOL_DEPS%g - s%@GCINCS@%$GCINCS%g - s%@CPP@%$CPP%g - s%@INSTALL_LTDL_TRUE@%$INSTALL_LTDL_TRUE%g - s%@INSTALL_LTDL_FALSE@%$INSTALL_LTDL_FALSE%g - s%@CONVENIENCE_LTDL_TRUE@%$CONVENIENCE_LTDL_TRUE%g - s%@CONVENIENCE_LTDL_FALSE@%$CONVENIENCE_LTDL_FALSE%g - s%@LIBADD_DL@%$LIBADD_DL%g ! CEOF ! EOF - cat >> $CONFIG_STATUS <<\EOF ! # Split the substitutions into bite-sized pieces for seds with ! # small command number limits, like on Digital OSF/1 and HP-UX. ! ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. ! ac_file=1 # Number of current file. ! ac_beg=1 # First line for current file. ! ac_end=$ac_max_sed_cmds # Line after last line for current file. ! ac_more_lines=: ! ac_sed_cmds="" ! while $ac_more_lines; do ! if test $ac_beg -gt 1; then ! sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file else ! sed "${ac_end}q" conftest.subs > conftest.s$ac_file fi ! if test ! -s conftest.s$ac_file; then ! ac_more_lines=false ! rm -f conftest.s$ac_file else ! if test -z "$ac_sed_cmds"; then ! ac_sed_cmds="sed -f conftest.s$ac_file" ! else ! ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" ! fi ! ac_file=`expr $ac_file + 1` ! ac_beg=$ac_end ! ac_end=`expr $ac_end + $ac_max_sed_cmds` fi done ! if test -z "$ac_sed_cmds"; then ! ac_sed_cmds=cat fi - EOF ! cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF ! for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then ! # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". ! case "$ac_file" in ! *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ! ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; ! *) ac_file_in="${ac_file}.in" ;; esac ! # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. ! # Remove last slash and all that follows it. Not all systems have dirname. ! ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` ! if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then ! # The file is in a subdirectory. ! test ! -d "$ac_dir" && mkdir "$ac_dir" ! ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" ! # A "../" for each directory in $ac_dir_suffix. ! ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` ! else ! ac_dir_suffix= ac_dots= fi ! case "$ac_given_srcdir" in ! .) srcdir=. ! if test -z "$ac_dots"; then top_srcdir=. ! else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; ! /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; ! *) # Relative path. ! srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" ! top_srcdir="$ac_dots$ac_given_srcdir" ;; esac ! case "$ac_given_INSTALL" in ! [/$]*) INSTALL="$ac_given_INSTALL" ;; ! *) INSTALL="$ac_dots$ac_given_INSTALL" ;; ! esac ! echo creating "$ac_file" ! rm -f "$ac_file" ! configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." ! case "$ac_file" in ! *Makefile*) ac_comsub="1i\\ ! # $configure_input" ;; ! *) ac_comsub= ;; esac ! ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` ! sed -e "$ac_comsub ! s%@configure_input@%$configure_input%g ! s%@srcdir@%$srcdir%g ! s%@top_srcdir@%$top_srcdir%g ! s%@INSTALL@%$INSTALL%g ! " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file ! fi; done ! rm -f conftest.s* # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ! ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' ! ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' ! ac_dC='\3' ! ac_dD='%g' ! # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". ! ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ! ac_uB='\([ ]\)%\1#\2define\3' ac_uC=' ' ! ac_uD='\4%g' ! # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ! ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ! ac_eB='$%\1#\2define\3' ! ac_eC=' ' ! ac_eD='%g' ! if test "${CONFIG_HEADERS+set}" != set; then ! EOF ! cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF ! fi ! for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". ! case "$ac_file" in ! *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ! ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; ! *) ac_file_in="${ac_file}.in" ;; esac ! echo creating $ac_file ! rm -f conftest.frag conftest.in conftest.out ! ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` ! cat $ac_file_inputs > conftest.in ! EOF ! # Transform confdefs.h into a sed script conftest.vals that substitutes ! # the proper values into config.h.in to produce config.h. And first: ! # Protect against being on the right side of a sed subst in config.status. ! # Protect against being in an unquoted here document in config.status. ! rm -f conftest.vals ! cat > conftest.hdr <<\EOF ! s/[\\&%]/\\&/g ! s%[\\$`]%\\&%g ! s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp ! s%ac_d%ac_u%gp ! s%ac_u%ac_e%gp ! EOF ! sed -n -f conftest.hdr confdefs.h > conftest.vals ! rm -f conftest.hdr # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. ! cat >> conftest.vals <<\EOF ! s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% ! EOF ! # Break up conftest.vals because some shells have a limit on ! # the size of here documents, and old seds have small limits too. rm -f conftest.tail ! while : do ! ac_lines=`grep -c . conftest.vals` ! # grep -c gives empty output for an empty file on some AIX systems. ! if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi ! # Write a limited-size here document to conftest.frag. ! echo ' cat > conftest.frag <> $CONFIG_STATUS ! sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS echo 'CEOF ! sed -f conftest.frag conftest.in > conftest.out ! rm -f conftest.in ! mv conftest.out conftest.in ! ' >> $CONFIG_STATUS ! sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail ! rm -f conftest.vals ! mv conftest.tail conftest.vals done ! rm -f conftest.vals ! cat >> $CONFIG_STATUS <<\EOF ! rm -f conftest.frag conftest.h ! echo "/* $ac_file. Generated automatically by configure. */" > conftest.h ! cat conftest.in >> conftest.h ! rm -f conftest.in ! if cmp -s $ac_file conftest.h 2>/dev/null; then ! echo "$ac_file is unchanged" ! rm -f conftest.h else ! # Remove last slash and all that follows it. Not all systems have dirname. ! ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` ! if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then ! # The file is in a subdirectory. ! test ! -d "$ac_dir" && mkdir "$ac_dir" fi ! rm -f $ac_file ! mv conftest.h $ac_file fi ! fi; done ! EOF ! cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF ! test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h ! exit 0 ! EOF chmod +x $CONFIG_STATUS ! rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 ! # Local Variables: ! # mode:shell-script ! # sh-indentation:2 ! # End: --- 19768,22505 ---- #include #ifdef RTLD_GLOBAL ! # define LT_DLGLOBAL RTLD_GLOBAL #else ! # ifdef DL_GLOBAL ! # define LT_DLGLOBAL DL_GLOBAL ! # else ! # define LT_DLGLOBAL 0 ! # endif #endif ! /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ ! #ifndef LT_DLLAZY_OR_NOW ! # ifdef RTLD_LAZY ! # define LT_DLLAZY_OR_NOW RTLD_LAZY # else ! # ifdef DL_LAZY ! # define LT_DLLAZY_OR_NOW DL_LAZY # else ! # ifdef RTLD_NOW ! # define LT_DLLAZY_OR_NOW RTLD_NOW ! # else ! # ifdef DL_NOW ! # define LT_DLLAZY_OR_NOW DL_NOW ! # else ! # define LT_DLLAZY_OR_NOW 0 ! # endif ! # endif # endif # endif #endif ! #ifdef __cplusplus ! extern "C" void exit (int); ! #endif ! ! void fnord() { int i=42;} ! int main () ! { ! void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); ! int status = $lt_dlunknown; + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + + exit (status); + } EOF ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then ! (./conftest; exit; ) 2>/dev/null ! lt_status=$? ! case x$lt_status in ! x$lt_dlno_uscore) libltdl_cv_need_uscore=no ;; ! x$lt_dlneed_uscore) libltdl_cv_need_uscore=yes ;; ! x$lt_unknown|x*) ;; ! esac ! else : ! # compilation failed ! ! fi fi rm -fr conftest* ! LIBS="$save_LIBS" ! fi ! echo "$as_me:$LINENO: result: $libltdl_cv_need_uscore" >&5 ! echo "${ECHO_T}$libltdl_cv_need_uscore" >&6 fi fi if test x"$libltdl_cv_need_uscore" = xyes; then ! ! cat >>confdefs.h <<\_ACEOF #define NEED_USCORE 1 ! _ACEOF fi + echo "$as_me:$LINENO: checking whether deplibs are loaded by dlopen" >&5 + echo $ECHO_N "checking whether deplibs are loaded by dlopen... $ECHO_C" >&6 + if test "${libltdl_cv_sys_dlopen_deplibs+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + # PORTME does your system automatically load deplibs for dlopen? + # or its logical equivalent (e.g. shl_load for HP-UX < 11) + # For now, we just catch OSes we know something about -- in the + # future, we'll try test this programmatically. + libltdl_cv_sys_dlopen_deplibs=unknown + case "$host_os" in + aix3*|aix4.1.*|aix4.2.*) + # Unknown whether this is true for these versions of AIX, but + # we want this `case' here to explicitly catch those versions. + libltdl_cv_sys_dlopen_deplibs=unknown + ;; + aix[45]*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + darwin*) + # Assuming the user has installed a libdl from somewhere, this is true + # If you are looking for one http://www.opendarwin.org/projects/dlcompat + libltdl_cv_sys_dlopen_deplibs=yes + ;; + gnu*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + hpux10*|hpux11*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + irix[12345]*|irix6.[01]*) + # Catch all versions of IRIX before 6.2, and indicate that we don't + # know how it worked for any of those versions. + libltdl_cv_sys_dlopen_deplibs=unknown + ;; + irix*) + # The case above catches anything before 6.2, and it's known that + # at 6.2 and later dlopen does load deplibs. + libltdl_cv_sys_dlopen_deplibs=yes + ;; + linux*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + netbsd*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + openbsd*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + osf[1234]*) + # dlopen did load deplibs (at least at 4.x), but until the 5.x series, + # it did *not* use an RPATH in a shared library to find objects the + # library depends on, so we explictly say `no'. + libltdl_cv_sys_dlopen_deplibs=no + ;; + osf5.0|osf5.0a|osf5.1) + # dlopen *does* load deplibs and with the right loader patch applied + # it even uses RPATH in a shared library to search for shared objects + # that the library depends on, but there's no easy way to know if that + # patch is installed. Since this is the case, all we can really + # say is unknown -- it depends on the patch being installed. If + # it is, this changes to `yes'. Without it, it would be `no'. + libltdl_cv_sys_dlopen_deplibs=unknown + ;; + osf*) + # the two cases above should catch all versions of osf <= 5.1. Read + # the comments above for what we know about them. + # At > 5.1, deplibs are loaded *and* any RPATH in a shared library + # is used to find them so we can finally say `yes'. + libltdl_cv_sys_dlopen_deplibs=yes + ;; + solaris*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + esac + fi + echo "$as_me:$LINENO: result: $libltdl_cv_sys_dlopen_deplibs" >&5 + echo "${ECHO_T}$libltdl_cv_sys_dlopen_deplibs" >&6 + if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then ! cat >>confdefs.h <<\_ACEOF ! #define LTDL_DLOPEN_DEPLIBS 1 ! _ACEOF ! ! fi ! ! ! for ac_header in argz.h do ! as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` ! if eval "test \"\${$as_ac_Header+set}\" = set"; then ! echo "$as_me:$LINENO: checking for $ac_header" >&5 ! echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 ! if eval "test \"\${$as_ac_Header+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! fi ! echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else ! # Is the header compilable? ! echo "$as_me:$LINENO: checking $ac_header usability" >&5 ! echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! $ac_includes_default ! #include <$ac_header> ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_header_compiler=yes else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_header_compiler=no fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 ! echo "${ECHO_T}$ac_header_compiler" >&6 ! ! # Is the header present? ! echo "$as_me:$LINENO: checking $ac_header presence" >&5 ! echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #include <$ac_header> ! _ACEOF ! if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } >/dev/null; then ! if test -s conftest.err; then ! ac_cpp_err=$ac_c_preproc_warn_flag ! else ! ac_cpp_err= ! fi ! else ! ac_cpp_err=yes fi ! if test -z "$ac_cpp_err"; then ! ac_header_preproc=yes else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_header_preproc=no ! fi ! rm -f conftest.err conftest.$ac_ext ! echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 ! echo "${ECHO_T}$ac_header_preproc" >&6 ! ! # So? What about this header? ! case $ac_header_compiler:$ac_header_preproc in ! yes:no ) ! { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 ! echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} ! { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 ! echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ! ( ! cat <<\_ASBOX ! ## ------------------------------------ ## ! ## Report this to bug-autoconf@gnu.org. ## ! ## ------------------------------------ ## ! _ASBOX ! ) | ! sed "s/^/$as_me: WARNING: /" >&2 ! ;; ! no:yes ) ! { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 ! echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} ! { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 ! echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} ! { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 ! echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ! ( ! cat <<\_ASBOX ! ## ------------------------------------ ## ! ## Report this to bug-autoconf@gnu.org. ## ! ## ------------------------------------ ## ! _ASBOX ! ) | ! sed "s/^/$as_me: WARNING: /" >&2 ! ;; ! esac ! echo "$as_me:$LINENO: checking for $ac_header" >&5 ! echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 ! if eval "test \"\${$as_ac_Header+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! eval "$as_ac_Header=$ac_header_preproc" ! fi ! echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ! fi + if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF + + fi + done ! ! echo "$as_me:$LINENO: checking for error_t" >&5 ! echo $ECHO_N "checking for error_t... $ECHO_C" >&6 ! if test "${ac_cv_type_error_t+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #if HAVE_ARGZ_H ! # include ! #endif ! ! int ! main () ! { ! if ((error_t *) 0) ! return 0; ! if (sizeof (error_t)) ! return 0; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_type_error_t=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_type_error_t=no ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $ac_cv_type_error_t" >&5 ! echo "${ECHO_T}$ac_cv_type_error_t" >&6 ! if test $ac_cv_type_error_t = yes; then ! ! cat >>confdefs.h <<_ACEOF ! #define HAVE_ERROR_T 1 ! _ACEOF ! ! ! else ! ! cat >>confdefs.h <<\_ACEOF ! #define error_t int ! _ACEOF ! ! fi ! ! ! ! ! ! ! ! for ac_func in argz_append argz_create_sep argz_insert argz_next argz_stringify do ! as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` ! echo "$as_me:$LINENO: checking for $ac_func" >&5 ! echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 ! if eval "test \"\${$as_ac_var+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char $ac_func (); below. ! Prefer to if __STDC__ is defined, since ! exists even on freestanding compilers. */ ! #ifdef __STDC__ ! # include ! #else ! # include ! #endif ! /* Override any gcc2 internal prototype to avoid an error. */ ! #ifdef __cplusplus ! extern "C" ! { ! #endif ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char $ac_func (); ! /* The GNU C library defines this for functions which it implements ! to always fail with ENOSYS. Some functions are actually named ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub_$ac_func) || defined (__stub___$ac_func) ! choke me ! #else ! char (*f) () = $ac_func; ! #endif ! #ifdef __cplusplus ! } ! #endif ! ! int ! main () ! { ! return f != $ac_func; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! eval "$as_ac_var=yes" else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! eval "$as_ac_var=no" fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 ! if test `eval echo '${'$as_ac_var'}'` = yes; then ! cat >>confdefs.h <<_ACEOF ! #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 ! _ACEOF ! ! fi ! done ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! for ac_header in assert.h ctype.h errno.h malloc.h memory.h stdlib.h \ ! stdio.h unistd.h ! do ! as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` ! if eval "test \"\${$as_ac_Header+set}\" = set"; then ! echo "$as_me:$LINENO: checking for $ac_header" >&5 ! echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 ! if eval "test \"\${$as_ac_Header+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! fi ! echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else ! # Is the header compilable? ! echo "$as_me:$LINENO: checking $ac_header usability" >&5 ! echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! $ac_includes_default ! #include <$ac_header> ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_header_compiler=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_header_compiler=no ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 ! echo "${ECHO_T}$ac_header_compiler" >&6 ! ! # Is the header present? ! echo "$as_me:$LINENO: checking $ac_header presence" >&5 ! echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #include <$ac_header> ! _ACEOF ! if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } >/dev/null; then ! if test -s conftest.err; then ! ac_cpp_err=$ac_c_preproc_warn_flag ! else ! ac_cpp_err= ! fi ! else ! ac_cpp_err=yes ! fi ! if test -z "$ac_cpp_err"; then ! ac_header_preproc=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_header_preproc=no ! fi ! rm -f conftest.err conftest.$ac_ext ! echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 ! echo "${ECHO_T}$ac_header_preproc" >&6 ! ! # So? What about this header? ! case $ac_header_compiler:$ac_header_preproc in ! yes:no ) ! { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 ! echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} ! { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 ! echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ! ( ! cat <<\_ASBOX ! ## ------------------------------------ ## ! ## Report this to bug-autoconf@gnu.org. ## ! ## ------------------------------------ ## ! _ASBOX ! ) | ! sed "s/^/$as_me: WARNING: /" >&2 ! ;; ! no:yes ) ! { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 ! echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} ! { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 ! echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} ! { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 ! echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ! ( ! cat <<\_ASBOX ! ## ------------------------------------ ## ! ## Report this to bug-autoconf@gnu.org. ## ! ## ------------------------------------ ## ! _ASBOX ! ) | ! sed "s/^/$as_me: WARNING: /" >&2 ! ;; ! esac ! echo "$as_me:$LINENO: checking for $ac_header" >&5 ! echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 ! if eval "test \"\${$as_ac_Header+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! eval "$as_ac_Header=$ac_header_preproc" ! fi ! echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ! ! fi ! if test `eval echo '${'$as_ac_Header'}'` = yes; then ! cat >>confdefs.h <<_ACEOF ! #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 ! _ACEOF ! ! fi ! ! done ! ! ! ! ! ! for ac_header in dl.h sys/dl.h dld.h mach-o/dyld.h ! do ! as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` ! if eval "test \"\${$as_ac_Header+set}\" = set"; then ! echo "$as_me:$LINENO: checking for $ac_header" >&5 ! echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 ! if eval "test \"\${$as_ac_Header+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! fi ! echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ! else ! # Is the header compilable? ! echo "$as_me:$LINENO: checking $ac_header usability" >&5 ! echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! $ac_includes_default ! #include <$ac_header> ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_header_compiler=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_header_compiler=no ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 ! echo "${ECHO_T}$ac_header_compiler" >&6 ! ! # Is the header present? ! echo "$as_me:$LINENO: checking $ac_header presence" >&5 ! echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #include <$ac_header> ! _ACEOF ! if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } >/dev/null; then ! if test -s conftest.err; then ! ac_cpp_err=$ac_c_preproc_warn_flag ! else ! ac_cpp_err= ! fi ! else ! ac_cpp_err=yes ! fi ! if test -z "$ac_cpp_err"; then ! ac_header_preproc=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_header_preproc=no ! fi ! rm -f conftest.err conftest.$ac_ext ! echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 ! echo "${ECHO_T}$ac_header_preproc" >&6 ! ! # So? What about this header? ! case $ac_header_compiler:$ac_header_preproc in ! yes:no ) ! { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 ! echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} ! { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 ! echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ! ( ! cat <<\_ASBOX ! ## ------------------------------------ ## ! ## Report this to bug-autoconf@gnu.org. ## ! ## ------------------------------------ ## ! _ASBOX ! ) | ! sed "s/^/$as_me: WARNING: /" >&2 ! ;; ! no:yes ) ! { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 ! echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} ! { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 ! echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} ! { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 ! echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ! ( ! cat <<\_ASBOX ! ## ------------------------------------ ## ! ## Report this to bug-autoconf@gnu.org. ## ! ## ------------------------------------ ## ! _ASBOX ! ) | ! sed "s/^/$as_me: WARNING: /" >&2 ! ;; ! esac ! echo "$as_me:$LINENO: checking for $ac_header" >&5 ! echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 ! if eval "test \"\${$as_ac_Header+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! eval "$as_ac_Header=$ac_header_preproc" ! fi ! echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ! ! fi ! if test `eval echo '${'$as_ac_Header'}'` = yes; then ! cat >>confdefs.h <<_ACEOF ! #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 ! _ACEOF ! ! fi ! ! done ! ! ! ! for ac_header in string.h strings.h ! do ! as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` ! if eval "test \"\${$as_ac_Header+set}\" = set"; then ! echo "$as_me:$LINENO: checking for $ac_header" >&5 ! echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 ! if eval "test \"\${$as_ac_Header+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! fi ! echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ! else ! # Is the header compilable? ! echo "$as_me:$LINENO: checking $ac_header usability" >&5 ! echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! $ac_includes_default ! #include <$ac_header> ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_header_compiler=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_header_compiler=no ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 ! echo "${ECHO_T}$ac_header_compiler" >&6 ! ! # Is the header present? ! echo "$as_me:$LINENO: checking $ac_header presence" >&5 ! echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #include <$ac_header> ! _ACEOF ! if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } >/dev/null; then ! if test -s conftest.err; then ! ac_cpp_err=$ac_c_preproc_warn_flag ! else ! ac_cpp_err= ! fi ! else ! ac_cpp_err=yes ! fi ! if test -z "$ac_cpp_err"; then ! ac_header_preproc=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_header_preproc=no ! fi ! rm -f conftest.err conftest.$ac_ext ! echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 ! echo "${ECHO_T}$ac_header_preproc" >&6 ! ! # So? What about this header? ! case $ac_header_compiler:$ac_header_preproc in ! yes:no ) ! { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 ! echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} ! { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 ! echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ! ( ! cat <<\_ASBOX ! ## ------------------------------------ ## ! ## Report this to bug-autoconf@gnu.org. ## ! ## ------------------------------------ ## ! _ASBOX ! ) | ! sed "s/^/$as_me: WARNING: /" >&2 ! ;; ! no:yes ) ! { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 ! echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} ! { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 ! echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} ! { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 ! echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ! ( ! cat <<\_ASBOX ! ## ------------------------------------ ## ! ## Report this to bug-autoconf@gnu.org. ## ! ## ------------------------------------ ## ! _ASBOX ! ) | ! sed "s/^/$as_me: WARNING: /" >&2 ! ;; ! esac ! echo "$as_me:$LINENO: checking for $ac_header" >&5 ! echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 ! if eval "test \"\${$as_ac_Header+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! eval "$as_ac_Header=$ac_header_preproc" ! fi ! echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ! ! fi ! if test `eval echo '${'$as_ac_Header'}'` = yes; then ! cat >>confdefs.h <<_ACEOF ! #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 ! _ACEOF ! break fi + done + + + for ac_func in strchr index do ! as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` ! echo "$as_me:$LINENO: checking for $ac_func" >&5 ! echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 ! if eval "test \"\${$as_ac_var+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char $ac_func (); below. ! Prefer to if __STDC__ is defined, since ! exists even on freestanding compilers. */ ! #ifdef __STDC__ ! # include ! #else ! # include ! #endif /* Override any gcc2 internal prototype to avoid an error. */ + #ifdef __cplusplus + extern "C" + { + #endif /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else ! char (*f) () = $ac_func; ! #endif ! #ifdef __cplusplus ! } #endif ! int ! main () ! { ! return f != $ac_func; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! eval "$as_ac_var=yes" else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! eval "$as_ac_var=no" fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 ! if test `eval echo '${'$as_ac_var'}'` = yes; then ! cat >>confdefs.h <<_ACEOF ! #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 ! _ACEOF break fi done + + for ac_func in strrchr rindex do ! as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` ! echo "$as_me:$LINENO: checking for $ac_func" >&5 ! echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 ! if eval "test \"\${$as_ac_var+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char $ac_func (); below. ! Prefer to if __STDC__ is defined, since ! exists even on freestanding compilers. */ ! #ifdef __STDC__ ! # include ! #else ! # include ! #endif /* Override any gcc2 internal prototype to avoid an error. */ + #ifdef __cplusplus + extern "C" + { + #endif /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char $ac_func (); ! /* The GNU C library defines this for functions which it implements ! to always fail with ENOSYS. Some functions are actually named ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub_$ac_func) || defined (__stub___$ac_func) ! choke me ! #else ! char (*f) () = $ac_func; ! #endif ! #ifdef __cplusplus ! } ! #endif ! int ! main () ! { ! return f != $ac_func; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! eval "$as_ac_var=yes" ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! eval "$as_ac_var=no" ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 ! if test `eval echo '${'$as_ac_var'}'` = yes; then ! cat >>confdefs.h <<_ACEOF ! #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 ! _ACEOF ! break ! fi ! done + + + for ac_func in memcpy bcopy + do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` + echo "$as_me:$LINENO: checking for $ac_func" >&5 + echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 + if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + /* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + #ifdef __STDC__ + # include + #else + # include + #endif + /* Override any gcc2 internal prototype to avoid an error. */ + #ifdef __cplusplus + extern "C" + { + #endif + /* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else ! char (*f) () = $ac_func; ! #endif ! #ifdef __cplusplus ! } #endif ! int ! main () ! { ! return f != $ac_func; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! eval "$as_ac_var=yes" else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! eval "$as_ac_var=no" fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 ! if test `eval echo '${'$as_ac_var'}'` = yes; then ! cat >>confdefs.h <<_ACEOF ! #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 ! _ACEOF break fi done ! ! ! for ac_func in memmove strcmp do ! as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` ! echo "$as_me:$LINENO: checking for $ac_func" >&5 ! echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 ! if eval "test \"\${$as_ac_var+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char $ac_func (); below. ! Prefer to if __STDC__ is defined, since ! exists even on freestanding compilers. */ ! #ifdef __STDC__ ! # include ! #else ! # include ! #endif /* Override any gcc2 internal prototype to avoid an error. */ + #ifdef __cplusplus + extern "C" + { + #endif /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char $ac_func (); ! /* The GNU C library defines this for functions which it implements ! to always fail with ENOSYS. Some functions are actually named ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub_$ac_func) || defined (__stub___$ac_func) ! choke me ! #else ! char (*f) () = $ac_func; ! #endif ! #ifdef __cplusplus ! } ! #endif ! ! int ! main () ! { ! return f != $ac_func; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! eval "$as_ac_var=yes" ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! eval "$as_ac_var=no" ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 ! if test `eval echo '${'$as_ac_var'}'` = yes; then ! cat >>confdefs.h <<_ACEOF ! #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 ! _ACEOF ! ! fi ! done ! ! + for ac_func in closedir opendir readdir + do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` + echo "$as_me:$LINENO: checking for $ac_func" >&5 + echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 + if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + /* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + #ifdef __STDC__ + # include + #else + # include + #endif + /* Override any gcc2 internal prototype to avoid an error. */ + #ifdef __cplusplus + extern "C" + { + #endif + /* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else ! char (*f) () = $ac_func; ! #endif ! #ifdef __cplusplus ! } #endif ! int ! main () ! { ! return f != $ac_func; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! eval "$as_ac_var=yes" else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! eval "$as_ac_var=no" fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi + echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 + echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 + if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 + _ACEOF fi done ! ## -------- ## ! ## Outputs. ## ! ## -------- ## ! ac_config_files="$ac_config_files Makefile" ! ! cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure ! # scripts and configure runs, see configure's option --config-cache. ! # It is not useful on other systems. If it contains results you don't ! # want to keep, you may remove or edit it. # ! # config.status only pays attention to the cache file if you give it ! # the --recheck option to rerun configure. # ! # `ac_cv_env_foo' variables (set or unset) will be overridden when ! # loading this file, other *unset* `ac_cv_foo' will be assigned the ! # following values. ! ! _ACEOF ! # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ! { ! (set) 2>&1 | ! case `(ac_space=' '; set | grep ac_space) 2>&1` in ! *ac_space=\ *) ! # `set' does not quote correctly, so add quotes (double-quote ! # substitution turns \\\\ into \\, and sed turns \\ into \). ! sed -n \ ! "s/'/'\\\\''/g; ! s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ! ;; ! *) ! # `set' quotes correctly as required by POSIX, so do not add quotes. ! sed -n \ ! "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ! ;; ! esac; ! } | ! sed ' ! t clear ! : clear ! s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ ! t end ! /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ ! : end' >>confcache ! if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then ! test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" ! cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' ! # VPATH may cause trouble with some makes, so we remove $(srcdir), ! # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and ! # trailing colons and then remove the whole line if VPATH becomes empty ! # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ! ac_vpsub='/^[ ]*VPATH[ ]*=/{ ! s/:*\$(srcdir):*/:/; ! s/:*\${srcdir}:*/:/; ! s/:*@srcdir@:*/:/; ! s/^\([^=]*=[ ]*\):*/\1/; ! s/:*$//; ! s/^[^=]*=[ ]*$//; ! }' fi DEFS=-DHAVE_CONFIG_H ! ac_libobjs= ! ac_ltlibobjs= ! for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue ! # 1. Remove the extension, and $U if already installed. ! ac_i=`echo "$ac_i" | ! sed 's/\$U\././;s/\.o$//;s/\.obj$//'` ! # 2. Add them. ! ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ! ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' ! done ! LIBOBJS=$ac_libobjs ! LTLIBOBJS=$ac_ltlibobjs ! ! ! if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then ! { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. ! Usually this means the macro was only invoked conditionally." >&5 ! echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. ! Usually this means the macro was only invoked conditionally." >&2;} ! { (exit 1); exit 1; }; } ! fi ! if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then ! { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. ! Usually this means the macro was only invoked conditionally." >&5 ! echo "$as_me: error: conditional \"AMDEP\" was never defined. ! Usually this means the macro was only invoked conditionally." >&2;} ! { (exit 1); exit 1; }; } ! fi ! if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then ! { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. ! Usually this means the macro was only invoked conditionally." >&5 ! echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. ! Usually this means the macro was only invoked conditionally." >&2;} ! { (exit 1); exit 1; }; } ! fi ! if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then ! { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. ! Usually this means the macro was only invoked conditionally." >&5 ! echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. ! Usually this means the macro was only invoked conditionally." >&2;} ! { (exit 1); exit 1; }; } ! fi ! if test -z "${INSTALL_LTDL_TRUE}" && test -z "${INSTALL_LTDL_FALSE}"; then ! { { echo "$as_me:$LINENO: error: conditional \"INSTALL_LTDL\" was never defined. ! Usually this means the macro was only invoked conditionally." >&5 ! echo "$as_me: error: conditional \"INSTALL_LTDL\" was never defined. ! Usually this means the macro was only invoked conditionally." >&2;} ! { (exit 1); exit 1; }; } ! fi ! if test -z "${CONVENIENCE_LTDL_TRUE}" && test -z "${CONVENIENCE_LTDL_FALSE}"; then ! { { echo "$as_me:$LINENO: error: conditional \"CONVENIENCE_LTDL\" was never defined. ! Usually this means the macro was only invoked conditionally." >&5 ! echo "$as_me: error: conditional \"CONVENIENCE_LTDL\" was never defined. ! Usually this means the macro was only invoked conditionally." >&2;} ! { (exit 1); exit 1; }; } ! fi ! ! : ${CONFIG_STATUS=./config.status} ! ac_clean_files_save=$ac_clean_files ! ac_clean_files="$ac_clean_files $CONFIG_STATUS" ! { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 ! echo "$as_me: creating $CONFIG_STATUS" >&6;} ! cat >$CONFIG_STATUS <<_ACEOF ! #! $SHELL ! # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging ! # configure, is in config.log if it exists. ! debug=false ! ac_cs_recheck=false ! ac_cs_silent=false ! SHELL=\${CONFIG_SHELL-$SHELL} ! _ACEOF ! ! cat >>$CONFIG_STATUS <<\_ACEOF ! ## --------------------- ## ! ## M4sh Initialization. ## ! ## --------------------- ## ! ! # Be Bourne compatible ! if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then ! emulate sh ! NULLCMD=: ! # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which ! # is contrary to our usage. Disable this feature. ! alias -g '${1+"$@"}'='"$@"' ! elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then ! set -o posix ! fi ! ! # Support unset when possible. ! if (FOO=FOO; unset FOO) >/dev/null 2>&1; then ! as_unset=unset ! else ! as_unset=false ! fi ! ! ! # Work around bugs in pre-3.0 UWIN ksh. ! $as_unset ENV MAIL MAILPATH ! PS1='$ ' ! PS2='> ' ! PS4='+ ' ! ! # NLS nuisances. ! for as_var in \ ! LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ ! LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ ! LC_TELEPHONE LC_TIME do ! if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then ! eval $as_var=C; export $as_var ! else ! $as_unset $as_var ! fi done ! # Required to use basename. ! if expr a : '\(a\)' >/dev/null 2>&1; then ! as_expr=expr ! else ! as_expr=false ! fi ! if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then ! as_basename=basename ! else ! as_basename=false ! fi ! # Name of the executable. ! as_me=`$as_basename "$0" || ! $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ ! X"$0" : 'X\(//\)$' \| \ ! X"$0" : 'X\(/\)$' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X/"$0" | ! sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } ! /^X\/\(\/\/\)$/{ s//\1/; q; } ! /^X\/\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! # PATH needs CR, and LINENO needs CR and PATH. ! # Avoid depending upon Character Ranges. ! as_cr_letters='abcdefghijklmnopqrstuvwxyz' ! as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' ! as_cr_Letters=$as_cr_letters$as_cr_LETTERS ! as_cr_digits='0123456789' ! as_cr_alnum=$as_cr_Letters$as_cr_digits ! ! # The user is always right. ! if test "${PATH_SEPARATOR+set}" != set; then ! echo "#! /bin/sh" >conf$$.sh ! echo "exit 0" >>conf$$.sh ! chmod +x conf$$.sh ! if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then ! PATH_SEPARATOR=';' else ! PATH_SEPARATOR=: fi ! rm -f conf$$.sh ! fi ! ! ! as_lineno_1=$LINENO ! as_lineno_2=$LINENO ! as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` ! test "x$as_lineno_1" != "x$as_lineno_2" && ! test "x$as_lineno_3" = "x$as_lineno_2" || { ! # Find who we are. Look in the path if we contain no path at all ! # relative or not. ! case $0 in ! *[\\/]* ) as_myself=$0 ;; ! *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break ! done ! ! ;; ! esac ! # We did not find ourselves, most probably we were run as `sh COMMAND' ! # in which case we are not to be found in the path. ! if test "x$as_myself" = x; then ! as_myself=$0 ! fi ! if test ! -f "$as_myself"; then ! { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 ! echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} ! { (exit 1); exit 1; }; } ! fi ! case $CONFIG_SHELL in ! '') ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for as_base in sh bash ksh sh5; do ! case $as_dir in ! /*) ! if ("$as_dir/$as_base" -c ' ! as_lineno_1=$LINENO ! as_lineno_2=$LINENO ! as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` ! test "x$as_lineno_1" != "x$as_lineno_2" && ! test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then ! $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } ! $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } ! CONFIG_SHELL=$as_dir/$as_base ! export CONFIG_SHELL ! exec "$CONFIG_SHELL" "$0" ${1+"$@"} ! fi;; ! esac ! done ! done ! ;; ! esac ! ! # Create $as_me.lineno as a copy of $as_myself, but with $LINENO ! # uniformly replaced by the line number. The first 'sed' inserts a ! # line-number line before each line; the second 'sed' does the real ! # work. The second script uses 'N' to pair each line-number line ! # with the numbered line, and appends trailing '-' during ! # substitution so that $LINENO is not a special case at line end. ! # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the ! # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) ! sed '=' <$as_myself | ! sed ' ! N ! s,$,-, ! : loop ! s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, ! t loop ! s,-$,, ! s,^['$as_cr_digits']*\n,, ! ' >$as_me.lineno && ! chmod +x $as_me.lineno || ! { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 ! echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} ! { (exit 1); exit 1; }; } ! ! # Don't try to exec as it changes $[0], causing all sort of problems ! # (the dirname of $[0] is not the place where we might find the ! # original and so on. Autoconf is especially sensible to this). ! . ./$as_me.lineno ! # Exit status is that of the last command. ! exit ! } ! ! ! case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in ! *c*,-n*) ECHO_N= ECHO_C=' ! ' ECHO_T=' ' ;; ! *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; ! *) ECHO_N= ECHO_C='\c' ECHO_T= ;; ! esac ! ! if expr a : '\(a\)' >/dev/null 2>&1; then ! as_expr=expr ! else ! as_expr=false ! fi ! ! rm -f conf$$ conf$$.exe conf$$.file ! echo >conf$$.file ! if ln -s conf$$.file conf$$ 2>/dev/null; then ! # We could just check for DJGPP; but this test a) works b) is more generic ! # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). ! if test -f conf$$.exe; then ! # Don't use ln at all; we don't have any links ! as_ln_s='cp -p' else ! as_ln_s='ln -s' fi + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi + rm -f conf$$ conf$$.exe conf$$.file + + if mkdir -p . 2>/dev/null; then + as_mkdir_p=: + else + as_mkdir_p=false + fi + + as_executable_p="test -f" + + # Sed expression to map a string onto a valid CPP name. + as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + + # Sed expression to map a string onto a valid variable name. + as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + + + # IFS + # We need space, tab and new line, in precisely that order. + as_nl=' + ' + IFS=" $as_nl" + + # CDPATH. + $as_unset CDPATH + + exec 6>&1 + + # Open the log real soon, to keep \$[0] and so on meaningful, and to + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. Logging --version etc. is OK. + exec 5>>config.log + { + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX + ## Running $as_me. ## + _ASBOX + } >&5 + cat >&5 <<_CSEOF + + This file was extended by libltdl $as_me 1.2, which was + generated by GNU Autoconf 2.57. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + + _CSEOF + echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 + echo >&5 + _ACEOF + + # Files that config.status was made for. + if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS + fi + + if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS + fi + + if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS + fi + + if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS + fi + + cat >>$CONFIG_STATUS <<\_ACEOF + + ac_cs_usage="\ + \`$as_me' instantiates files from templates according to the + current configuration. + + Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + + Configuration files: + $config_files + + Configuration headers: + $config_headers + + Configuration commands: + $config_commands + + Report bugs to ." + _ACEOF + + cat >>$CONFIG_STATUS <<_ACEOF + ac_cs_version="\\ + libltdl config.status 1.2 + configured by $0, generated by GNU Autoconf 2.57, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + + Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 + Free Software Foundation, Inc. + This config.status script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it." + srcdir=$srcdir + INSTALL="$INSTALL" + _ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # If no file are specified by the user, then we need to provide default + # value. By we need to know if files were specified by the user. + ac_need_defaults=: + while test $# != 0 + do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. + _ACEOF + cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 + Try \`$0 --help' for more information." >&5 + echo "$as_me: error: ambiguous option: $1 + Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 + Try \`$0 --help' for more information." >&5 + echo "$as_me: error: unrecognized option: $1 + Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + + esac + shift done ! ! ac_configure_extra_args= ! ! if $ac_cs_silent; then ! exec 6>/dev/null ! ac_configure_extra_args="$ac_configure_extra_args --silent" fi ! _ACEOF ! cat >>$CONFIG_STATUS <<_ACEOF ! if \$ac_cs_recheck; then ! echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 ! exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion ! fi ! _ACEOF ! ! cat >>$CONFIG_STATUS <<_ACEOF ! # ! # INIT-COMMANDS section. ! # ! ! AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" ! ! _ACEOF ! ! ! ! cat >>$CONFIG_STATUS <<\_ACEOF ! for ac_config_target in $ac_config_targets ! do ! case "$ac_config_target" in ! # Handling of arguments. ! "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; ! "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; ! "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config-h.in" ;; ! *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 ! echo "$as_me: error: invalid argument: $ac_config_target" >&2;} ! { (exit 1); exit 1; }; };; esac + done ! # If the user did not use the arguments to specify the items to instantiate, ! # then the envvar interface is used. Set only those that are not. ! # We use the long form for the default assignment because of an extremely ! # bizarre bug on SunOS 4.1.3. ! if $ac_need_defaults; then ! test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files ! test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers ! test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands ! fi ! # Have a temporary directory for convenience. Make it in the build tree ! # simply because there is no reason to put it here, and in addition, ! # creating and moving files from /tmp can sometimes cause problems. ! # Create a temporary directory, and hook for its removal unless debugging. ! $debug || ! { ! trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 ! trap '{ (exit 1); exit 1; }' 1 2 13 15 ! } ! ! # Create a (secure) tmp directory for tmp files. ! ! { ! tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && ! test -n "$tmp" && test -d "$tmp" ! } || ! { ! tmp=./confstat$$-$RANDOM ! (umask 077 && mkdir $tmp) ! } || ! { ! echo "$me: cannot create a temporary directory in ." >&2 ! { (exit 1); exit 1; } ! } ! ! _ACEOF ! ! cat >>$CONFIG_STATUS <<_ACEOF ! ! # ! # CONFIG_FILES section. ! # ! ! # No need to generate the scripts if there are no CONFIG_FILES. ! # This happens for instance when ./config.status config.h ! if test -n "\$CONFIG_FILES"; then ! # Protect against being on the right side of a sed subst in config.status. ! sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; ! s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF ! s,@SHELL@,$SHELL,;t t ! s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t ! s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t ! s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t ! s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t ! s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t ! s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t ! s,@exec_prefix@,$exec_prefix,;t t ! s,@prefix@,$prefix,;t t ! s,@program_transform_name@,$program_transform_name,;t t ! s,@bindir@,$bindir,;t t ! s,@sbindir@,$sbindir,;t t ! s,@libexecdir@,$libexecdir,;t t ! s,@datadir@,$datadir,;t t ! s,@sysconfdir@,$sysconfdir,;t t ! s,@sharedstatedir@,$sharedstatedir,;t t ! s,@localstatedir@,$localstatedir,;t t ! s,@libdir@,$libdir,;t t ! s,@includedir@,$includedir,;t t ! s,@oldincludedir@,$oldincludedir,;t t ! s,@infodir@,$infodir,;t t ! s,@mandir@,$mandir,;t t ! s,@build_alias@,$build_alias,;t t ! s,@host_alias@,$host_alias,;t t ! s,@target_alias@,$target_alias,;t t ! s,@DEFS@,$DEFS,;t t ! s,@ECHO_C@,$ECHO_C,;t t ! s,@ECHO_N@,$ECHO_N,;t t ! s,@ECHO_T@,$ECHO_T,;t t ! s,@LIBS@,$LIBS,;t t ! s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t ! s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t ! s,@INSTALL_DATA@,$INSTALL_DATA,;t t ! s,@CYGPATH_W@,$CYGPATH_W,;t t ! s,@PACKAGE@,$PACKAGE,;t t ! s,@VERSION@,$VERSION,;t t ! s,@ACLOCAL@,$ACLOCAL,;t t ! s,@AUTOCONF@,$AUTOCONF,;t t ! s,@AUTOMAKE@,$AUTOMAKE,;t t ! s,@AUTOHEADER@,$AUTOHEADER,;t t ! s,@MAKEINFO@,$MAKEINFO,;t t ! s,@AMTAR@,$AMTAR,;t t ! s,@install_sh@,$install_sh,;t t ! s,@STRIP@,$STRIP,;t t ! s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t ! s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t ! s,@AWK@,$AWK,;t t ! s,@SET_MAKE@,$SET_MAKE,;t t ! s,@am__leading_dot@,$am__leading_dot,;t t ! s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t ! s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t ! s,@MAINT@,$MAINT,;t t ! s,@CC@,$CC,;t t ! s,@CFLAGS@,$CFLAGS,;t t ! s,@LDFLAGS@,$LDFLAGS,;t t ! s,@CPPFLAGS@,$CPPFLAGS,;t t ! s,@ac_ct_CC@,$ac_ct_CC,;t t ! s,@EXEEXT@,$EXEEXT,;t t ! s,@OBJEXT@,$OBJEXT,;t t ! s,@DEPDIR@,$DEPDIR,;t t ! s,@am__include@,$am__include,;t t ! s,@am__quote@,$am__quote,;t t ! s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t ! s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t ! s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t ! s,@CCDEPMODE@,$CCDEPMODE,;t t ! s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t ! s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t ! s,@build@,$build,;t t ! s,@build_cpu@,$build_cpu,;t t ! s,@build_vendor@,$build_vendor,;t t ! s,@build_os@,$build_os,;t t ! s,@host@,$host,;t t ! s,@host_cpu@,$host_cpu,;t t ! s,@host_vendor@,$host_vendor,;t t ! s,@host_os@,$host_os,;t t ! s,@EGREP@,$EGREP,;t t ! s,@LN_S@,$LN_S,;t t ! s,@ECHO@,$ECHO,;t t ! s,@AR@,$AR,;t t ! s,@ac_ct_AR@,$ac_ct_AR,;t t ! s,@RANLIB@,$RANLIB,;t t ! s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t ! s,@DLLTOOL@,$DLLTOOL,;t t ! s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t ! s,@AS@,$AS,;t t ! s,@ac_ct_AS@,$ac_ct_AS,;t t ! s,@OBJDUMP@,$OBJDUMP,;t t ! s,@ac_ct_OBJDUMP@,$ac_ct_OBJDUMP,;t t ! s,@CPP@,$CPP,;t t ! s,@CXX@,$CXX,;t t ! s,@CXXFLAGS@,$CXXFLAGS,;t t ! s,@ac_ct_CXX@,$ac_ct_CXX,;t t ! s,@CXXDEPMODE@,$CXXDEPMODE,;t t ! s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t ! s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t ! s,@CXXCPP@,$CXXCPP,;t t ! s,@F77@,$F77,;t t ! s,@FFLAGS@,$FFLAGS,;t t ! s,@ac_ct_F77@,$ac_ct_F77,;t t ! s,@LIBTOOL@,$LIBTOOL,;t t ! s,@LIBTOOL_DEPS@,$LIBTOOL_DEPS,;t t ! s,@INSTALL_LTDL_TRUE@,$INSTALL_LTDL_TRUE,;t t ! s,@INSTALL_LTDL_FALSE@,$INSTALL_LTDL_FALSE,;t t ! s,@CONVENIENCE_LTDL_TRUE@,$CONVENIENCE_LTDL_TRUE,;t t ! s,@CONVENIENCE_LTDL_FALSE@,$CONVENIENCE_LTDL_FALSE,;t t ! s,@LIBADD_DL@,$LIBADD_DL,;t t ! s,@LIBOBJS@,$LIBOBJS,;t t ! s,@LTLIBOBJS@,$LTLIBOBJS,;t t ! CEOF ! ! _ACEOF ! ! cat >>$CONFIG_STATUS <<\_ACEOF ! # Split the substitutions into bite-sized pieces for seds with ! # small command number limits, like on Digital OSF/1 and HP-UX. ! ac_max_sed_lines=48 ! ac_sed_frag=1 # Number of current file. ! ac_beg=1 # First line for current file. ! ac_end=$ac_max_sed_lines # Line after last line for current file. ! ac_more_lines=: ! ac_sed_cmds= ! while $ac_more_lines; do ! if test $ac_beg -gt 1; then ! sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag ! else ! sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag ! fi ! if test ! -s $tmp/subs.frag; then ! ac_more_lines=false ! else ! # The purpose of the label and of the branching condition is to ! # speed up the sed processing (if there are no `@' at all, there ! # is no need to browse any of the substitutions). ! # These are the two extra sed commands mentioned above. ! (echo ':t ! /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed ! if test -z "$ac_sed_cmds"; then ! ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" ! else ! ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" ! fi ! ac_sed_frag=`expr $ac_sed_frag + 1` ! ac_beg=$ac_end ! ac_end=`expr $ac_end + $ac_max_sed_lines` ! fi ! done ! if test -z "$ac_sed_cmds"; then ! ac_sed_cmds=cat fi + fi # test -n "$CONFIG_FILES" ! _ACEOF ! cat >>$CONFIG_STATUS <<\_ACEOF ! for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue ! # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". ! case $ac_file in ! - | *:- | *:-:* ) # input from stdin ! cat >$tmp/stdin ! ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ! ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; ! *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ! ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; ! * ) ac_file_in=$ac_file.in ;; esac ! # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ! ac_dir=`(dirname "$ac_file") 2>/dev/null || ! $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X"$ac_file" : 'X\(//\)[^/]' \| \ ! X"$ac_file" : 'X\(//\)$' \| \ ! X"$ac_file" : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X"$ac_file" | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! { if $as_mkdir_p; then ! mkdir -p "$ac_dir" ! else ! as_dir="$ac_dir" ! as_dirs= ! while test ! -d "$as_dir"; do ! as_dirs="$as_dir $as_dirs" ! as_dir=`(dirname "$as_dir") 2>/dev/null || ! $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X"$as_dir" : 'X\(//\)[^/]' \| \ ! X"$as_dir" : 'X\(//\)$' \| \ ! X"$as_dir" : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X"$as_dir" | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! done ! test ! -n "$as_dirs" || mkdir $as_dirs ! fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 ! echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} ! { (exit 1); exit 1; }; }; } ! ac_builddir=. ! ! if test "$ac_dir" != .; then ! ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` ! # A "../" for each directory in $ac_dir_suffix. ! ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` ! else ! ac_dir_suffix= ac_top_builddir= ! fi ! ! case $srcdir in ! .) # No --srcdir option. We are building in place. ! ac_srcdir=. ! if test -z "$ac_top_builddir"; then ! ac_top_srcdir=. ! else ! ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` ! fi ;; ! [\\/]* | ?:[\\/]* ) # Absolute path. ! ac_srcdir=$srcdir$ac_dir_suffix; ! ac_top_srcdir=$srcdir ;; ! *) # Relative path. ! ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ! ac_top_srcdir=$ac_top_builddir$srcdir ;; ! esac ! # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be ! # absolute. ! ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ! ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ! ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ! ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` ! ! ! case $INSTALL in ! [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; ! *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac ! if test x"$ac_file" != x-; then ! { echo "$as_me:$LINENO: creating $ac_file" >&5 ! echo "$as_me: creating $ac_file" >&6;} ! rm -f "$ac_file" ! fi ! # Let's still pretend it is `configure' which instantiates (i.e., don't ! # use $as_me), people would be surprised to read: ! # /* config.h. Generated by config.status. */ ! if test x"$ac_file" = x-; then ! configure_input= ! else ! configure_input="$ac_file. " ! fi ! configure_input=$configure_input"Generated from `echo $ac_file_in | ! sed 's,.*/,,'` by configure." ! ! # First look for the input files in the build tree, otherwise in the ! # src tree. ! ac_file_inputs=`IFS=: ! for f in $ac_file_in; do ! case $f in ! -) echo $tmp/stdin ;; ! [\\/$]*) ! # Absolute (can't be DOS-style, as IFS=:) ! test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 ! echo "$as_me: error: cannot find input file: $f" >&2;} ! { (exit 1); exit 1; }; } ! echo $f;; ! *) # Relative ! if test -f "$f"; then ! # Build tree ! echo $f ! elif test -f "$srcdir/$f"; then ! # Source tree ! echo $srcdir/$f ! else ! # /dev/null tree ! { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 ! echo "$as_me: error: cannot find input file: $f" >&2;} ! { (exit 1); exit 1; }; } ! fi;; ! esac ! done` || { (exit 1); exit 1; } ! _ACEOF ! cat >>$CONFIG_STATUS <<_ACEOF ! sed "$ac_vpsub ! $extrasub ! _ACEOF ! cat >>$CONFIG_STATUS <<\_ACEOF ! :t ! /@[a-zA-Z_][a-zA-Z_0-9]*@/!b ! s,@configure_input@,$configure_input,;t t ! s,@srcdir@,$ac_srcdir,;t t ! s,@abs_srcdir@,$ac_abs_srcdir,;t t ! s,@top_srcdir@,$ac_top_srcdir,;t t ! s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t ! s,@builddir@,$ac_builddir,;t t ! s,@abs_builddir@,$ac_abs_builddir,;t t ! s,@top_builddir@,$ac_top_builddir,;t t ! s,@abs_top_builddir@,$ac_abs_top_builddir,;t t ! s,@INSTALL@,$ac_INSTALL,;t t ! " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out ! rm -f $tmp/stdin ! if test x"$ac_file" != x-; then ! mv $tmp/out $ac_file ! else ! cat $tmp/out ! rm -f $tmp/out ! fi ! ! done ! _ACEOF ! cat >>$CONFIG_STATUS <<\_ACEOF ! ! # ! # CONFIG_HEADER section. ! # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ! ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ! ac_dB='[ ].*$,\1#\2' ! ac_dC=' ' ! ac_dD=',;t' ! # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ! ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ! ac_uB='$,\1#\2define\3' ac_uC=' ' ! ac_uD=',;t' ! for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". ! case $ac_file in ! - | *:- | *:-:* ) # input from stdin ! cat >$tmp/stdin ! ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ! ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; ! *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ! ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; ! * ) ac_file_in=$ac_file.in ;; esac ! test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 ! echo "$as_me: creating $ac_file" >&6;} ! # First look for the input files in the build tree, otherwise in the ! # src tree. ! ac_file_inputs=`IFS=: ! for f in $ac_file_in; do ! case $f in ! -) echo $tmp/stdin ;; ! [\\/$]*) ! # Absolute (can't be DOS-style, as IFS=:) ! test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 ! echo "$as_me: error: cannot find input file: $f" >&2;} ! { (exit 1); exit 1; }; } ! echo $f;; ! *) # Relative ! if test -f "$f"; then ! # Build tree ! echo $f ! elif test -f "$srcdir/$f"; then ! # Source tree ! echo $srcdir/$f ! else ! # /dev/null tree ! { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 ! echo "$as_me: error: cannot find input file: $f" >&2;} ! { (exit 1); exit 1; }; } ! fi;; ! esac ! done` || { (exit 1); exit 1; } ! # Remove the trailing spaces. ! sed 's/[ ]*$//' $ac_file_inputs >$tmp/in ! _ACEOF ! # Transform confdefs.h into two sed scripts, `conftest.defines' and ! # `conftest.undefs', that substitutes the proper values into ! # config.h.in to produce config.h. The first handles `#define' ! # templates, and the second `#undef' templates. ! # And first: Protect against being on the right side of a sed subst in ! # config.status. Protect against being in an unquoted here document ! # in config.status. ! rm -f conftest.defines conftest.undefs ! # Using a here document instead of a string reduces the quoting nightmare. ! # Putting comments in sed scripts is not portable. ! # ! # `end' is used to avoid that the second main sed command (meant for ! # 0-ary CPP macros) applies to n-ary macro definitions. ! # See the Autoconf documentation for `clear'. ! cat >confdef2sed.sed <<\_ACEOF ! s/[\\&,]/\\&/g ! s,[\\$`],\\&,g ! t clear ! : clear ! s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp ! t end ! s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp ! : end ! _ACEOF ! # If some macros were called several times there might be several times ! # the same #defines, which is useless. Nevertheless, we may not want to ! # sort them, since we want the *last* AC-DEFINE to be honored. ! uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines ! sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs ! rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. ! cat >>conftest.undefs <<\_ACEOF ! s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, ! _ACEOF ! # Break up conftest.defines because some shells have a limit on the size ! # of here documents, and old seds have small limits too (100 cmds). ! echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS ! echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS ! echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS ! echo ' :' >>$CONFIG_STATUS ! rm -f conftest.tail ! while grep . conftest.defines >/dev/null ! do ! # Write a limited-size here document to $tmp/defines.sed. ! echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS ! # Speed up: don't consider the non `#define' lines. ! echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS ! # Work around the forget-to-reset-the-flag bug. ! echo 't clr' >>$CONFIG_STATUS ! echo ': clr' >>$CONFIG_STATUS ! sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS ! echo 'CEOF ! sed -f $tmp/defines.sed $tmp/in >$tmp/out ! rm -f $tmp/in ! mv $tmp/out $tmp/in ! ' >>$CONFIG_STATUS ! sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail ! rm -f conftest.defines ! mv conftest.tail conftest.defines ! done ! rm -f conftest.defines ! echo ' fi # grep' >>$CONFIG_STATUS ! echo >>$CONFIG_STATUS + # Break up conftest.undefs because some shells have a limit on the size + # of here documents, and old seds have small limits too (100 cmds). + echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail ! while grep . conftest.undefs >/dev/null do ! # Write a limited-size here document to $tmp/undefs.sed. ! echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS ! # Speed up: don't consider the non `#undef' ! echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS ! # Work around the forget-to-reset-the-flag bug. ! echo 't clr' >>$CONFIG_STATUS ! echo ': clr' >>$CONFIG_STATUS ! sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF ! sed -f $tmp/undefs.sed $tmp/in >$tmp/out ! rm -f $tmp/in ! mv $tmp/out $tmp/in ! ' >>$CONFIG_STATUS ! sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail ! rm -f conftest.undefs ! mv conftest.tail conftest.undefs done ! rm -f conftest.undefs ! cat >>$CONFIG_STATUS <<\_ACEOF ! # Let's still pretend it is `configure' which instantiates (i.e., don't ! # use $as_me), people would be surprised to read: ! # /* config.h. Generated by config.status. */ ! if test x"$ac_file" = x-; then ! echo "/* Generated by configure. */" >$tmp/config.h else ! echo "/* $ac_file. Generated by configure. */" >$tmp/config.h ! fi ! cat $tmp/in >>$tmp/config.h ! rm -f $tmp/in ! if test x"$ac_file" != x-; then ! if diff $ac_file $tmp/config.h >/dev/null 2>&1; then ! { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 ! echo "$as_me: $ac_file is unchanged" >&6;} ! else ! ac_dir=`(dirname "$ac_file") 2>/dev/null || ! $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X"$ac_file" : 'X\(//\)[^/]' \| \ ! X"$ac_file" : 'X\(//\)$' \| \ ! X"$ac_file" : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X"$ac_file" | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! { if $as_mkdir_p; then ! mkdir -p "$ac_dir" ! else ! as_dir="$ac_dir" ! as_dirs= ! while test ! -d "$as_dir"; do ! as_dirs="$as_dir $as_dirs" ! as_dir=`(dirname "$as_dir") 2>/dev/null || ! $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X"$as_dir" : 'X\(//\)[^/]' \| \ ! X"$as_dir" : 'X\(//\)$' \| \ ! X"$as_dir" : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X"$as_dir" | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! done ! test ! -n "$as_dirs" || mkdir $as_dirs ! fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 ! echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} ! { (exit 1); exit 1; }; }; } ! ! rm -f $ac_file ! mv $tmp/config.h $ac_file fi ! else ! cat $tmp/config.h ! rm -f $tmp/config.h fi ! # Compute $ac_file's index in $config_headers. ! _am_stamp_count=1 ! for _am_header in $config_headers :; do ! case $_am_header in ! $ac_file | $ac_file:* ) ! break ;; ! * ) ! _am_stamp_count=`expr $_am_stamp_count + 1` ;; ! esac ! done ! echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || ! $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X$ac_file : 'X\(//\)[^/]' \| \ ! X$ac_file : 'X\(//\)$' \| \ ! X$ac_file : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X$ac_file | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'`/stamp-h$_am_stamp_count ! done ! _ACEOF ! cat >>$CONFIG_STATUS <<\_ACEOF ! # ! # CONFIG_COMMANDS section. ! # ! for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ! ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ! ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ! ac_dir=`(dirname "$ac_dest") 2>/dev/null || ! $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X"$ac_dest" : 'X\(//\)[^/]' \| \ ! X"$ac_dest" : 'X\(//\)$' \| \ ! X"$ac_dest" : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X"$ac_dest" | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! ac_builddir=. + if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` + else + ac_dir_suffix= ac_top_builddir= + fi ! case $srcdir in ! .) # No --srcdir option. We are building in place. ! ac_srcdir=. ! if test -z "$ac_top_builddir"; then ! ac_top_srcdir=. ! else ! ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` ! fi ;; ! [\\/]* | ?:[\\/]* ) # Absolute path. ! ac_srcdir=$srcdir$ac_dir_suffix; ! ac_top_srcdir=$srcdir ;; ! *) # Relative path. ! ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ! ac_top_srcdir=$ac_top_builddir$srcdir ;; ! esac ! # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be ! # absolute. ! ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ! ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ! ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ! ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` ! ! { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 ! echo "$as_me: executing $ac_dest commands" >&6;} ! case $ac_dest in ! depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do ! # Strip MF so we end up with the name of the file. ! mf=`echo "$mf" | sed -e 's/:.*$//'` ! # Check whether this is an Automake generated Makefile or not. ! # We used to match only the files named `Makefile.in', but ! # some people rename them; so instead we look at the file content. ! # Grep'ing the first line is not enough: some people post-process ! # each Makefile.in and add a new line on top of each file to say so. ! # So let's grep whole file. ! if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then ! dirpart=`(dirname "$mf") 2>/dev/null || ! $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X"$mf" : 'X\(//\)[^/]' \| \ ! X"$mf" : 'X\(//\)$' \| \ ! X"$mf" : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X"$mf" | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! else ! continue ! fi ! grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue ! # Extract the definition of DEP_FILES from the Makefile without ! # running `make'. ! DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` ! test -z "$DEPDIR" && continue ! # When using ansi2knr, U may be empty or an underscore; expand it ! U=`sed -n -e '/^U = / s///p' < "$mf"` ! test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" ! # We invoke sed twice because it is the simplest approach to ! # changing $(DEPDIR) to its actual value in the expansion. ! for file in `sed -n -e ' ! /^DEP_FILES = .*\\\\$/ { ! s/^DEP_FILES = // ! :loop ! s/\\\\$// ! p ! n ! /\\\\$/ b loop ! p ! } ! /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ ! sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do ! # Make sure the directory exists. ! test -f "$dirpart/$file" && continue ! fdir=`(dirname "$file") 2>/dev/null || ! $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X"$file" : 'X\(//\)[^/]' \| \ ! X"$file" : 'X\(//\)$' \| \ ! X"$file" : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X"$file" | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! { if $as_mkdir_p; then ! mkdir -p $dirpart/$fdir ! else ! as_dir=$dirpart/$fdir ! as_dirs= ! while test ! -d "$as_dir"; do ! as_dirs="$as_dir $as_dirs" ! as_dir=`(dirname "$as_dir") 2>/dev/null || ! $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X"$as_dir" : 'X\(//\)[^/]' \| \ ! X"$as_dir" : 'X\(//\)$' \| \ ! X"$as_dir" : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X"$as_dir" | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! done ! test ! -n "$as_dirs" || mkdir $as_dirs ! fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 ! echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} ! { (exit 1); exit 1; }; }; } ! ! # echo "creating $dirpart/$file" ! echo '# dummy' > "$dirpart/$file" ! done ! done ! ;; ! esac ! done ! _ACEOF ! ! cat >>$CONFIG_STATUS <<\_ACEOF ! ! { (exit 0); exit 0; } ! _ACEOF chmod +x $CONFIG_STATUS ! ac_clean_files=$ac_clean_files_save ! # configure is writing to config.log, and then calls config.status. ! # config.status does its own redirection, appending to config.log. ! # Unfortunately, on DOS this fails, as config.log is still kept open ! # by configure, so config.status won't be able to write to it; its ! # output is simply discarded. So we exec the FD to /dev/null, ! # effectively closing config.log, so it can be properly (re)opened and ! # appended to by config.status. When coming back to configure, we ! # need to make the FD available again. ! if test "$no_create" != yes; then ! ac_cs_success=: ! ac_config_status_args= ! test "$silent" = yes && ! ac_config_status_args="$ac_config_status_args --quiet" ! exec 5>/dev/null ! $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false ! exec 5>>config.log ! # Use ||, not &&, to avoid exiting from the if with $? = 1, which ! # would make configure fail if this is the last instruction. ! $ac_cs_success || { (exit 1); exit 1; } ! fi ! diff -Nrc3pad gcc-3.3.3/libjava/libltdl/configure.ac gcc-3.4.0/libjava/libltdl/configure.ac *** gcc-3.3.3/libjava/libltdl/configure.ac 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/libltdl/configure.ac 2004-01-15 03:41:49.000000000 +0000 *************** *** 0 **** --- 1,77 ---- + ## Process this file with autoconf to create configure. -*- autoconf -*- + # Copyright 2001 Free Software Foundation, Inc. + # + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2 of the License, or + # (at your option) any later version. + # + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + # 02111-1307 USA + + + ## ------------------------ ## + ## Autoconf initialisation. ## + ## ------------------------ ## + AC_PREREQ(2.57) + AC_INIT([libltdl], [1.2], [bug-libtool@gnu.org]) + AC_CONFIG_SRCDIR([ltdl.c]) + + + ## ------------------------------- ## + ## Libltdl specific configuration. ## + ## ------------------------------- ## + + AC_CONFIG_AUX_DIR([.]) + + if test -z "$enable_ltdl_install$enable_ltdl_convenience"; then + if test -f ${srcdir}/ltmain.sh; then + # if libltdl is libtoolized, it is assumed to be stand-alone and + # installed unless the command line overrides it (tested above) + enable_ltdl_install=yes + else + AC_MSG_WARN([*** The top-level configure must select either]) + AC_MSG_WARN([*** [A""C_LIBLTDL_INSTALLABLE] or [A""C_LIBLTDL_CONVENIENCE].]) + AC_MSG_ERROR([*** Maybe you want to --enable-ltdl-install?]) + fi + fi + + + ## ------------------------ ## + ## Automake Initialisation. ## + ## ------------------------ ## + AM_INIT_AUTOMAKE(AC_PACKAGE_TARNAME, AC_PACKAGE_VERSION, -) + AM_CONFIG_HEADER([config.h:config-h.in]) + AM_MAINTAINER_MODE + + + ## ------------------ ## + ## C compiler checks. ## + ## ------------------ ## + AC_PROG_CC + AC_C_CONST + AC_C_INLINE + + + ## ----------------------- ## + ## Libtool initialisation. ## + ## ----------------------- ## + AC_LIBTOOL_WIN32_DLL + AC_PROG_LIBTOOL + AC_SUBST([LIBTOOL_DEPS]) + + AC_LIB_LTDL + + + ## -------- ## + ## Outputs. ## + ## -------- ## + AC_CONFIG_FILES([Makefile]) + AC_OUTPUT diff -Nrc3pad gcc-3.3.3/libjava/libltdl/configure.in gcc-3.4.0/libjava/libltdl/configure.in *** gcc-3.3.3/libjava/libltdl/configure.in 2001-07-03 22:33:24.000000000 +0000 --- gcc-3.4.0/libjava/libltdl/configure.in 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,64 **** - dnl Process this file with autoconf to create configure. - - AC_INIT(ltdl.c) - - AC_ARG_WITH(auxdir, - [ --with-auxdir=DIR path to autoconf auxiliary files], - [AC_CONFIG_AUX_DIR($with_auxdir) - dnl This is here just to satisfy automake. - ifelse(not,equal,[AC_CONFIG_AUX_DIR(../..)])], - [AC_CONFIG_AUX_DIR_DEFAULT]) - - # This is another blatant hack to work around automake bugs. - mkinstalldirs="$ac_aux_dir/mkinstalldirs" - AC_SUBST(mkinstalldirs) - - if test -z "$enable_ltdl_install$enable_ltdl_convenience"; then - if test -f ${srcdir}/ltconfig && test -f ${srcdir}/ltmain.sh; then - # if libltdl is libtoolized, it is assumed to be stand-alone and - # installed unless the command line overrides it (tested above) - enable_ltdl_install=yes - else - AC_MSG_WARN([*** The top-level configure must select either]) - AC_MSG_WARN([*** [A""C_LIBLTDL_INSTALLABLE] or [A""C_LIBLTDL_CONVENIENCE].]) - AC_MSG_ERROR([*** Maybe you want to --enable-ltdl-install?]) - fi - fi - - AM_INIT_AUTOMAKE(libltdl,1.1,-) - AM_CONFIG_HEADER(config.h) - AM_MAINTAINER_MODE - - AC_PROG_CC - AC_C_CONST - AC_C_INLINE - - AC_LIBTOOL_WIN32_DLL - AM_PROG_LIBTOOL - AC_SUBST(LIBTOOL_DEPS) - - AC_MSG_CHECKING([for garbage collector to use]) - AC_ARG_ENABLE(java-gc, - changequote(<<,>>)dnl - << --enable-java-gc=TYPE choose garbage collector [boehm]>>, - changequote([,]) - GC=$enableval, - GC=boehm) - - GCINCS= - if test "$GC" = "boehm"; then - GCINCS='-I$(top_srcdir)/../../boehm-gc/include' - GCINCS="$GCINCS `cat ../../boehm-gc/boehm-cflags`" - AC_DEFINE(HAVE_BOEHM_GC) - fi - AC_SUBST(GCINCS) - - AC_LIB_LTDL - - dnl Output the makefile - AC_OUTPUT(Makefile) - - # Local Variables: - # mode:shell-script - # sh-indentation:2 - # End: --- 0 ---- diff -Nrc3pad gcc-3.3.3/libjava/libltdl/.cvsignore gcc-3.4.0/libjava/libltdl/.cvsignore *** gcc-3.3.3/libjava/libltdl/.cvsignore 2002-04-28 18:41:51.000000000 +0000 --- gcc-3.4.0/libjava/libltdl/.cvsignore 2003-12-18 21:18:35.000000000 +0000 *************** libtool *** 8,10 **** --- 8,11 ---- *.lo *.la stamp-h + autom4te.cache diff -Nrc3pad gcc-3.3.3/libjava/libltdl/install-sh gcc-3.4.0/libjava/libltdl/install-sh *** gcc-3.3.3/libjava/libltdl/install-sh 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/libltdl/install-sh 2003-12-16 21:48:25.000000000 +0000 *************** *** 0 **** --- 1,294 ---- + #!/bin/sh + # + # install - install a program, script, or datafile + # + # This originates from X11R5 (mit/util/scripts/install.sh), which was + # later released in X11R6 (xc/config/util/install.sh) with the + # following copyright and license. + # + # Copyright (C) 1994 X Consortium + # + # Permission is hereby granted, free of charge, to any person obtaining a copy + # of this software and associated documentation files (the "Software"), to + # deal in the Software without restriction, including without limitation the + # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + # sell copies of the Software, and to permit persons to whom the Software is + # furnished to do so, subject to the following conditions: + # + # The above copyright notice and this permission notice shall be included in + # all copies or substantial portions of the Software. + # + # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- + # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + # + # Except as contained in this notice, the name of the X Consortium shall not + # be used in advertising or otherwise to promote the sale, use or other deal- + # ings in this Software without prior written authorization from the X Consor- + # tium. + # + # + # FSF changes to this file are in the public domain. + # + # Calling this script install-sh is preferred over install.sh, to prevent + # `make' implicit rules from creating a file called install from it + # when there is no Makefile. + # + # This script is compatible with the BSD install script, but was written + # from scratch. It can only install one file at a time, a restriction + # shared with many OS's install programs. + + + # set DOITPROG to echo to test this script + + # Don't use :- since 4.3BSD and earlier shells don't like it. + doit="${DOITPROG-}" + + + # put in absolute paths if you don't have them in your path; or use env. vars. + + mvprog="${MVPROG-mv}" + cpprog="${CPPROG-cp}" + chmodprog="${CHMODPROG-chmod}" + chownprog="${CHOWNPROG-chown}" + chgrpprog="${CHGRPPROG-chgrp}" + stripprog="${STRIPPROG-strip}" + rmprog="${RMPROG-rm}" + mkdirprog="${MKDIRPROG-mkdir}" + + transformbasename="" + transform_arg="" + instcmd="$mvprog" + chmodcmd="$chmodprog 0755" + chowncmd="" + chgrpcmd="" + stripcmd="" + rmcmd="$rmprog -f" + mvcmd="$mvprog" + src="" + dst="" + dir_arg="" + + while [ x"$1" != x ]; do + case $1 in + -c) instcmd=$cpprog + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd=$stripprog + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac + done + + if [ x"$src" = x ] + then + echo "$0: no input file specified" >&2 + exit 1 + else + : + fi + + if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d "$dst" ]; then + instcmd=: + chmodcmd="" + else + instcmd=$mkdirprog + fi + else + + # Waiting for this to be detected by the "$instcmd $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + + if [ -f "$src" ] || [ -d "$src" ] + then + : + else + echo "$0: $src does not exist" >&2 + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "$0: no destination specified" >&2 + exit 1 + else + : + fi + + # If destination is a directory, append the input filename; if your system + # does not like double slashes in filenames, you may need to add some logic + + if [ -d "$dst" ] + then + dst=$dst/`basename "$src"` + else + : + fi + fi + + ## this sed command emulates the dirname command + dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + + # Make sure that the destination directory exists. + # this part is taken from Noah Friedman's mkinstalldirs script + + # Skip lots of stat calls in the usual case. + if [ ! -d "$dstdir" ]; then + defaultIFS=' + ' + IFS="${IFS-$defaultIFS}" + + oIFS=$IFS + # Some sh's can't handle IFS=/ for some reason. + IFS='%' + set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` + IFS=$oIFS + + pathcomp='' + + while [ $# -ne 0 ] ; do + pathcomp=$pathcomp$1 + shift + + if [ ! -d "$pathcomp" ] ; + then + $mkdirprog "$pathcomp" + else + : + fi + + pathcomp=$pathcomp/ + done + fi + + if [ x"$dir_arg" != x ] + then + $doit $instcmd "$dst" && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi + else + + # If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename "$dst"` + else + dstfile=`basename "$dst" $transformbasename | + sed $transformarg`$transformbasename + fi + + # don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename "$dst"` + else + : + fi + + # Make a couple of temp file names in the proper directory. + + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up temp files at exit. + + trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 + trap '(exit $?); exit' 1 2 13 15 + + # Move or copy the file name to the temp name + + $doit $instcmd "$src" "$dsttmp" && + + # and set any options; do chmod last to preserve setuid bits + + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi && + + # Now remove or move aside any old file at destination location. We try this + # two ways since rm can't unlink itself on some systems and the destination + # file might be busy for other reasons. In this case, the final cleanup + # might fail but the new file should still install successfully. + + { + if [ -f "$dstdir/$dstfile" ] + then + $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null || + $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null || + { + echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 + (exit 1); exit + } + else + : + fi + } && + + # Now rename the file to the real destination. + + $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" + + fi && + + # The final little trick to "correctly" pass the exit status to the exit trap. + + { + (exit 0); exit + } diff -Nrc3pad gcc-3.3.3/libjava/libltdl/ltdl.c gcc-3.4.0/libjava/libltdl/ltdl.c *** gcc-3.3.3/libjava/libltdl/ltdl.c 2000-09-10 08:04:40.000000000 +0000 --- gcc-3.4.0/libjava/libltdl/ltdl.c 2003-12-25 19:33:06.000000000 +0000 *************** Foundation, Inc., 59 Temple Place, Suite *** 25,357 **** */ - #define _LTDL_COMPILE_ - #if HAVE_CONFIG_H ! #include #endif ! #if HAVE_STRING_H ! #include #endif ! #if HAVE_STRINGS_H ! #include #endif #if HAVE_CTYPE_H ! #include #endif #if HAVE_MALLOC_H ! #include #endif #if HAVE_MEMORY_H ! #include ! #endif ! ! #if HAVE_STDLIB_H ! #include #endif ! #if HAVE_STDIO_H ! #include #endif #if HAVE_BOEHM_GC #include #endif - #include "ltdl.h" ! #ifdef DLL_EXPORT ! # define LTDL_GLOBAL_DATA __declspec(dllexport) #else ! # define LTDL_GLOBAL_DATA #endif ! /* max. filename length */ ! #ifndef LTDL_FILENAME_MAX ! #define LTDL_FILENAME_MAX 1024 #endif ! #undef LTDL_READTEXT_MODE ! /* fopen() mode flags for reading a text file */ ! #ifdef _WIN32 ! #define LTDL_READTEXT_MODE "rt" #else ! #define LTDL_READTEXT_MODE "r" #endif ! #undef LTDL_SYMBOL_LENGTH ! /* This is the maximum symbol size that won't require malloc/free */ ! #define LTDL_SYMBOL_LENGTH 128 ! #undef LTDL_SYMBOL_OVERHEAD ! /* This accounts for the _LTX_ separator */ ! #define LTDL_SYMBOL_OVERHEAD 5 - /* NOTE: typedefed in ltdl.h - This structure is used for the list of registered loaders. */ - struct lt_dlloader_t { - struct lt_dlloader_t *next; - const char *loader_name; /* identifying name for each loader */ - const char *sym_prefix; /* prefix for symbols */ - lt_module_open_t *module_open; - lt_module_close_t *module_close; - lt_find_sym_t *find_sym; - lt_dlloader_exit_t *dlloader_exit; - lt_dlloader_data_t dlloader_data; - }; - typedef struct lt_dlhandle_t { - struct lt_dlhandle_t *next; - lt_dlloader_t *loader; /* dlopening interface */ - lt_dlinfo info; - int depcount; /* number of dependencies */ - lt_dlhandle *deplibs; /* dependencies */ - lt_module_t module; /* system module handle */ - lt_ptr_t system; /* system specific data */ - lt_ptr_t app_private; /* application private data */ - } lt_dlhandle_t; ! static const char objdir[] = LTDL_OBJDIR; ! #ifdef LTDL_SHLIB_EXT ! static const char shlib_ext[] = LTDL_SHLIB_EXT; #endif ! #ifdef LTDL_SYSSEARCHPATH ! static const char sys_search_path[] = LTDL_SYSSEARCHPATH; #endif ! /* Extract the diagnostic strings from the error table macro in the same ! order as the enumberated indices in ltdl.h. */ ! #define LTDL_ERROR(name, diagnostic) (diagnostic), ! static const char *ltdl_error_strings[] = { ! ltdl_error_table ! 0 }; - #undef LTDL_ERROR ! #ifdef __STDC__ ! # define LT_DLSTRERROR(name) ltdl_error_strings[LTDL_ERROR_##name] #else ! # define LT_DLSTRERROR(name) ltdl_error_strings[LTDL_ERROR_/**/name] #endif ! static const char *last_error = 0; - LTDL_GLOBAL_DATA lt_ptr_t (*lt_dlmalloc) LTDL_PARAMS((size_t size)) = (lt_ptr_t(*)LTDL_PARAMS((size_t)))malloc; - LTDL_GLOBAL_DATA void (*lt_dlfree) LTDL_PARAMS((lt_ptr_t ptr)) = (void(*)LTDL_PARAMS((lt_ptr_t)))free; #undef strdup ! #define strdup xstrdup ! static inline char * strdup(str) ! const char *str; { ! char *tmp; ! if (!str) ! return 0; ! tmp = (char*) lt_dlmalloc(strlen(str)+1); ! if (tmp) ! strcpy(tmp, str); ! return tmp; } #if ! HAVE_STRCMP #undef strcmp ! #define strcmp xstrcmp ! static inline int strcmp (str1, str2) ! const char *str1; ! const char *str2; { ! if (str1 == str2) ! return 0; ! if (str1 == 0) ! return -1; ! if (str2 == 0) ! return 1; ! ! for (;*str1 && *str2; str1++, str2++) ! if (*str1 != *str2) ! break; ! ! return (int)(*str1 - *str2); } #endif ! #if ! HAVE_STRCHR ! # if HAVE_INDEX ! # define strchr index ! # else ! # define strchr xstrchr ! static inline const char* ! strchr(str, ch) ! const char *str; ! int ch; { ! const char *p; ! for (p = str; *p != (char)ch && *p != '\0'; p++) ! /*NOWORK*/; ! return (*p == (char)ch) ? p : 0; } # endif #endif - #if ! HAVE_STRRCHR ! # if HAVE_RINDEX ! # define strrchr rindex ! # else ! # define strrchr xstrrchr ! static inline const char* ! strrchr(str, ch) ! const char *str; ! int ch; { ! const char *p; ! for (p = str; *p != '\0'; p++) ! /*NOWORK*/; ! while (*p != (char)ch && p >= str) ! p--; ! return (*p == (char)ch) ? p : 0; } - # endif #endif ! /* The Cygwin dlopen implementation prints a spurious error message to ! stderr if its call to LoadLibrary() fails for any reason. We can ! mitigate this by not using the Cygwin implementation, and falling ! back to our own LoadLibrary() wrapper. */ ! #if HAVE_LIBDL && !defined(__CYGWIN__) /* dynamic linking with dlopen/dlsym */ #if HAVE_DLFCN_H ! # include #endif #ifdef RTLD_GLOBAL ! # define LTDL_GLOBAL RTLD_GLOBAL #else ! # ifdef DL_GLOBAL ! # define LTDL_GLOBAL DL_GLOBAL ! # else ! # define LTDL_GLOBAL 0 ! # endif ! #endif ! /* We may have to define LTDL_LAZY_OR_NOW in the command line if we find out it does not work in some platform. */ ! #ifndef LTDL_LAZY_OR_NOW ! # ifdef RTLD_LAZY ! # define LTDL_LAZY_OR_NOW RTLD_LAZY ! # else ! # ifdef DL_LAZY ! # define LTDL_LAZY_OR_NOW DL_LAZY # else - # ifdef RTLD_NOW - # define LTDL_LAZY_OR_NOW RTLD_NOW - # else # ifdef DL_NOW ! # define LTDL_LAZY_OR_NOW DL_NOW ! # else ! # define LTDL_LAZY_OR_NOW 0 # endif ! # endif ! # endif ! # endif #endif - static lt_module_t - sys_dl_open (loader_data, filename) - lt_dlloader_data_t loader_data; - const char *filename; - { - lt_module_t module = dlopen(filename, LTDL_GLOBAL | LTDL_LAZY_OR_NOW); - if (!module) { #if HAVE_DLERROR ! last_error = dlerror(); #else ! last_error = LT_DLSTRERROR(CANNOT_OPEN); #endif ! } ! return module; } static int sys_dl_close (loader_data, module) ! lt_dlloader_data_t loader_data; ! lt_module_t module; { ! if (dlclose(module) != 0) { ! #if HAVE_DLERROR ! last_error = dlerror(); ! #else ! last_error = LT_DLSTRERROR(CANNOT_CLOSE); ! #endif ! return 1; ! } ! return 0; } ! static lt_ptr_t sys_dl_sym (loader_data, module, symbol) ! lt_dlloader_data_t loader_data; ! lt_module_t module; ! const char *symbol; { ! lt_ptr_t address = dlsym(module, symbol); ! ! if (!address) ! #if HAVE_DLERROR ! last_error = dlerror(); ! #else ! last_error = LT_DLSTRERROR(SYMBOL_NOT_FOUND); ! #endif ! return address; } ! static struct lt_user_dlloader sys_dl = { # ifdef NEED_USCORE ! "_", # else ! 0, # endif ! sys_dl_open, sys_dl_close, sys_dl_sym, 0, 0 }; ! #endif #if HAVE_SHL_LOAD /* dynamic linking with shl_load (HP-UX) (comments from gmodule) */ #ifdef HAVE_DL_H ! #include #endif /* some flags are missing on some systems, so we provide --- 25,1169 ---- */ #if HAVE_CONFIG_H ! # include #endif ! #if HAVE_UNISTD_H ! # include #endif ! #if HAVE_STDIO_H ! # include ! #endif ! ! #if HAVE_STDLIB_H ! # include ! #endif ! ! #if HAVE_STRING_H ! # include ! #else ! # if HAVE_STRINGS_H ! # include ! # endif #endif #if HAVE_CTYPE_H ! # include #endif #if HAVE_MALLOC_H ! # include #endif #if HAVE_MEMORY_H ! # include #endif ! #if HAVE_ERRNO_H ! # include #endif #if HAVE_BOEHM_GC #include #endif ! #ifndef __WINDOWS__ ! # ifdef __WIN32__ ! # define __WINDOWS__ ! # endif ! #endif ! ! ! #undef LT_USE_POSIX_DIRENT ! #ifdef HAVE_CLOSEDIR ! # ifdef HAVE_OPENDIR ! # ifdef HAVE_READDIR ! # ifdef HAVE_DIRENT_H ! # define LT_USE_POSIX_DIRENT ! # endif /* HAVE_DIRENT_H */ ! # endif /* HAVE_READDIR */ ! # endif /* HAVE_OPENDIR */ ! #endif /* HAVE_CLOSEDIR */ ! ! ! #undef LT_USE_WINDOWS_DIRENT_EMULATION ! #ifndef LT_USE_POSIX_DIRENT ! # ifdef __WINDOWS__ ! # define LT_USE_WINDOWS_DIRENT_EMULATION ! # endif /* __WINDOWS__ */ ! #endif /* LT_USE_POSIX_DIRENT */ ! ! ! #ifdef LT_USE_POSIX_DIRENT ! # include ! # define LT_D_NAMLEN(dirent) (strlen((dirent)->d_name)) #else ! # ifdef LT_USE_WINDOWS_DIRENT_EMULATION ! # define LT_D_NAMLEN(dirent) (strlen((dirent)->d_name)) ! # else ! # define dirent direct ! # define LT_D_NAMLEN(dirent) ((dirent)->d_namlen) ! # if HAVE_SYS_NDIR_H ! # include ! # endif ! # if HAVE_SYS_DIR_H ! # include ! # endif ! # if HAVE_NDIR_H ! # include ! # endif ! # endif #endif ! #if HAVE_ARGZ_H ! # include #endif ! #if HAVE_ASSERT_H ! # include #else ! # define assert(arg) ((void) 0) #endif ! #include "ltdl.h" ! #if WITH_DMALLOC ! # include ! #endif ! ! /* --- WINDOWS SUPPORT --- */ ! ! ! #ifdef DLL_EXPORT ! # define LT_GLOBAL_DATA __declspec(dllexport) ! #else ! # define LT_GLOBAL_DATA #endif ! ! /* fopen() mode flags for reading a text file */ ! #undef LT_READTEXT_MODE ! #ifdef __WINDOWS__ ! # define LT_READTEXT_MODE "rt" ! #else ! # define LT_READTEXT_MODE "r" #endif ! #ifdef LT_USE_WINDOWS_DIRENT_EMULATION ! ! #include ! ! #define dirent lt_dirent ! #define DIR lt_DIR ! ! struct dirent ! { ! char d_name[2048]; ! int d_namlen; }; ! typedef struct _DIR ! { ! HANDLE hSearch; ! WIN32_FIND_DATA Win32FindData; ! BOOL firsttime; ! struct dirent file_info; ! } DIR; ! ! #endif /* LT_USE_WINDOWS_DIRENT_EMULATION */ ! ! ! /* --- MANIFEST CONSTANTS --- */ ! ! ! /* Standard libltdl search path environment variable name */ ! #undef LTDL_SEARCHPATH_VAR ! #define LTDL_SEARCHPATH_VAR "LTDL_LIBRARY_PATH" ! ! /* Standard libtool archive file extension. */ ! #undef LTDL_ARCHIVE_EXT ! #define LTDL_ARCHIVE_EXT ".la" ! ! /* max. filename length */ ! #ifndef LT_FILENAME_MAX ! # define LT_FILENAME_MAX 1024 ! #endif ! ! /* This is the maximum symbol size that won't require malloc/free */ ! #undef LT_SYMBOL_LENGTH ! #define LT_SYMBOL_LENGTH 128 ! ! /* This accounts for the _LTX_ separator */ ! #undef LT_SYMBOL_OVERHEAD ! #define LT_SYMBOL_OVERHEAD 5 ! ! ! ! ! /* --- MEMORY HANDLING --- */ ! ! ! /* These are the functions used internally. In addition to making ! use of the associated function pointers above, they also perform ! error handling. */ ! static char *lt_estrdup LT_PARAMS((const char *str)); ! static lt_ptr lt_emalloc LT_PARAMS((size_t size)); ! static lt_ptr lt_erealloc LT_PARAMS((lt_ptr addr, size_t size)); ! ! /* static lt_ptr rpl_realloc LT_PARAMS((lt_ptr ptr, size_t size)); */ ! #define rpl_realloc realloc ! ! /* These are the pointers that can be changed by the caller: */ ! LT_GLOBAL_DATA lt_ptr (*lt_dlmalloc) LT_PARAMS((size_t size)) ! = (lt_ptr (*) LT_PARAMS((size_t))) malloc; ! LT_GLOBAL_DATA lt_ptr (*lt_dlrealloc) LT_PARAMS((lt_ptr ptr, size_t size)) ! = (lt_ptr (*) LT_PARAMS((lt_ptr, size_t))) rpl_realloc; ! LT_GLOBAL_DATA void (*lt_dlfree) LT_PARAMS((lt_ptr ptr)) ! = (void (*) LT_PARAMS((lt_ptr))) free; ! ! /* The following macros reduce the amount of typing needed to cast ! assigned memory. */ ! #if WITH_DMALLOC ! ! #define LT_DLMALLOC(tp, n) ((tp *) xmalloc ((n) * sizeof(tp))) ! #define LT_DLREALLOC(tp, p, n) ((tp *) xrealloc ((p), (n) * sizeof(tp))) ! #define LT_DLFREE(p) \ ! LT_STMT_START { if (p) (p) = (xfree (p), (lt_ptr) 0); } LT_STMT_END ! ! #define LT_EMALLOC(tp, n) ((tp *) xmalloc ((n) * sizeof(tp))) ! #define LT_EREALLOC(tp, p, n) ((tp *) xrealloc ((p), (n) * sizeof(tp))) ! #else ! ! #define LT_DLMALLOC(tp, n) ((tp *) lt_dlmalloc ((n) * sizeof(tp))) ! #define LT_DLREALLOC(tp, p, n) ((tp *) rpl_realloc ((p), (n) * sizeof(tp))) ! #define LT_DLFREE(p) \ ! LT_STMT_START { if (p) (p) = (lt_dlfree (p), (lt_ptr) 0); } LT_STMT_END ! ! #define LT_EMALLOC(tp, n) ((tp *) lt_emalloc ((n) * sizeof(tp))) ! #define LT_EREALLOC(tp, p, n) ((tp *) lt_erealloc ((p), (n) * sizeof(tp))) ! #endif ! #define LT_DLMEM_REASSIGN(p, q) LT_STMT_START { \ ! if ((p) != (q)) { if (p) lt_dlfree (p); (p) = (q); (q) = 0; } \ ! } LT_STMT_END ! ! ! /* --- REPLACEMENT FUNCTIONS --- */ #undef strdup ! #define strdup rpl_strdup ! static char *strdup LT_PARAMS((const char *str)); ! ! static char * strdup(str) ! const char *str; { ! char *tmp = 0; ! if (str) ! { ! tmp = LT_DLMALLOC (char, 1+ strlen (str)); ! if (tmp) ! { ! strcpy(tmp, str); ! } ! } ! ! return tmp; } + #if ! HAVE_STRCMP #undef strcmp ! #define strcmp rpl_strcmp ! static int strcmp LT_PARAMS((const char *str1, const char *str2)); ! ! static int strcmp (str1, str2) ! const char *str1; ! const char *str2; { ! if (str1 == str2) ! return 0; ! if (str1 == 0) ! return -1; ! if (str2 == 0) ! return 1; ! ! for (;*str1 && *str2; ++str1, ++str2) ! { ! if (*str1 != *str2) ! break; ! } ! ! return (int)(*str1 - *str2); } #endif ! #if ! HAVE_STRCHR ! # if HAVE_INDEX ! # define strchr index ! # else ! # define strchr rpl_strchr ! static const char *strchr LT_PARAMS((const char *str, int ch)); ! static const char* ! strchr(str, ch) ! const char *str; ! int ch; ! { ! const char *p; ! for (p = str; *p != (char)ch && *p != LT_EOS_CHAR; ++p) ! /*NOWORK*/; ! return (*p == (char)ch) ? p : 0; ! } ! ! # endif ! #endif /* !HAVE_STRCHR */ ! ! ! #if ! HAVE_STRRCHR ! ! # if HAVE_RINDEX ! # define strrchr rindex ! # else ! # define strrchr rpl_strrchr ! ! static const char *strrchr LT_PARAMS((const char *str, int ch)); ! ! static const char* ! strrchr(str, ch) ! const char *str; ! int ch; { ! const char *p, *q = 0; ! for (p = str; *p != LT_EOS_CHAR; ++p) ! { ! if (*p == (char) ch) ! { ! q = p; ! } ! } ! return q; } # endif + #endif + + /* NOTE: Neither bcopy nor the memcpy implementation below can + reliably handle copying in overlapping areas of memory. Use + memmove (for which there is a fallback implmentation below) + if you need that behaviour. */ + #if ! HAVE_MEMCPY + + # if HAVE_BCOPY + # define memcpy(dest, src, size) bcopy (src, dest, size) + # else + # define memcpy rpl_memcpy + + static lt_ptr memcpy LT_PARAMS((lt_ptr dest, const lt_ptr src, size_t size)); + + static lt_ptr + memcpy (dest, src, size) + lt_ptr dest; + const lt_ptr src; + size_t size; + { + size_t i = 0; + + for (i = 0; i < size; ++i) + { + dest[i] = src[i]; + } + + return dest; + } + + # endif /* !HAVE_BCOPY */ + #endif /* !HAVE_MEMCPY */ + + #if ! HAVE_MEMMOVE + # define memmove rpl_memmove + + static lt_ptr memmove LT_PARAMS((lt_ptr dest, const lt_ptr src, size_t size)); + + static lt_ptr + memmove (dest, src, size) + lt_ptr dest; + const lt_ptr src; + size_t size; + { + size_t i; + + if (dest < src) + for (i = 0; i < size; ++i) + { + dest[i] = src[i]; + } + else if (dest > src) + for (i = size -1; i >= 0; --i) + { + dest[i] = src[i]; + } + + return dest; + } + + #endif /* !HAVE_MEMMOVE */ + + #ifdef LT_USE_WINDOWS_DIRENT_EMULATION + + static void closedir LT_PARAMS((DIR *entry)); + + static void + closedir(entry) + DIR *entry; + { + assert(entry != (DIR *) NULL); + FindClose(entry->hSearch); + lt_dlfree((lt_ptr)entry); + } + + + static DIR * opendir LT_PARAMS((const char *path)); + + static DIR* + opendir (path) + const char *path; + { + char file_specification[LT_FILENAME_MAX]; + DIR *entry; + + assert(path != (char *) NULL); + (void) strncpy(file_specification,path,LT_FILENAME_MAX-1); + (void) strcat(file_specification,"\\"); + entry = LT_DLMALLOC (DIR,sizeof(DIR)); + if (entry != (DIR *) 0) + { + entry->firsttime = TRUE; + entry->hSearch = FindFirstFile(file_specification,&entry->Win32FindData); + } + if (entry->hSearch == INVALID_HANDLE_VALUE) + { + (void) strcat(file_specification,"\\*.*"); + entry->hSearch = FindFirstFile(file_specification,&entry->Win32FindData); + if (entry->hSearch == INVALID_HANDLE_VALUE) + { + LT_DLFREE (entry); + return (DIR *) 0; + } + } + return(entry); + } + + + static struct dirent *readdir LT_PARAMS((DIR *entry)); + + static struct dirent *readdir(entry) + DIR *entry; + { + int + status; + + if (entry == (DIR *) 0) + return((struct dirent *) 0); + if (!entry->firsttime) + { + status = FindNextFile(entry->hSearch,&entry->Win32FindData); + if (status == 0) + return((struct dirent *) 0); + } + entry->firsttime = FALSE; + (void) strncpy(entry->file_info.d_name,entry->Win32FindData.cFileName, + LT_FILENAME_MAX-1); + entry->file_info.d_namlen = strlen(entry->file_info.d_name); + return(&entry->file_info); + } + + #endif /* LT_USE_WINDOWS_DIRENT_EMULATION */ + + /* According to Alexandre Oliva , + ``realloc is not entirely portable'' + In any case we want to use the allocator supplied by the user without + burdening them with an lt_dlrealloc function pointer to maintain. + Instead implement our own version (with known boundary conditions) + using lt_dlmalloc and lt_dlfree. */ + + /* #undef realloc + #define realloc rpl_realloc + */ + #if 0 + /* You can't (re)define realloc unless you also (re)define malloc. + Right now, this code uses the size of the *destination* to decide + how much to copy. That's not right, but you can't know the size + of the source unless you know enough about, or wrote malloc. So + this code is disabled... */ + static lt_ptr + realloc (ptr, size) + lt_ptr ptr; + size_t size; + { + if (size == 0) + { + /* For zero or less bytes, free the original memory */ + if (ptr != 0) + { + lt_dlfree (ptr); + } + + return (lt_ptr) 0; + } + else if (ptr == 0) + { + /* Allow reallocation of a NULL pointer. */ + return lt_dlmalloc (size); + } + else + { + /* Allocate a new block, copy and free the old block. */ + lt_ptr mem = lt_dlmalloc (size); + + if (mem) + { + memcpy (mem, ptr, size); + lt_dlfree (ptr); + } + + /* Note that the contents of PTR are not damaged if there is + insufficient memory to realloc. */ + return mem; + } + } #endif ! #if ! HAVE_ARGZ_APPEND ! # define argz_append rpl_argz_append ! static error_t argz_append LT_PARAMS((char **pargz, size_t *pargz_len, ! const char *buf, size_t buf_len)); ! static error_t ! argz_append (pargz, pargz_len, buf, buf_len) ! char **pargz; ! size_t *pargz_len; ! const char *buf; ! size_t buf_len; ! { ! size_t argz_len; ! char *argz; ! assert (pargz); ! assert (pargz_len); ! assert ((*pargz && *pargz_len) || (!*pargz && !*pargz_len)); ! /* If nothing needs to be appended, no more work is required. */ ! if (buf_len == 0) ! return 0; ! ! /* Ensure there is enough room to append BUF_LEN. */ ! argz_len = *pargz_len + buf_len; ! argz = LT_DLREALLOC (char, *pargz, argz_len); ! if (!argz) ! return ENOMEM; ! ! /* Copy characters from BUF after terminating '\0' in ARGZ. */ ! memcpy (argz + *pargz_len, buf, buf_len); ! ! /* Assign new values. */ ! *pargz = argz; ! *pargz_len = argz_len; ! ! return 0; ! } ! #endif /* !HAVE_ARGZ_APPEND */ ! ! ! #if ! HAVE_ARGZ_CREATE_SEP ! # define argz_create_sep rpl_argz_create_sep ! ! static error_t argz_create_sep LT_PARAMS((const char *str, int delim, ! char **pargz, size_t *pargz_len)); ! ! static error_t ! argz_create_sep (str, delim, pargz, pargz_len) ! const char *str; ! int delim; ! char **pargz; ! size_t *pargz_len; { ! size_t argz_len; ! char *argz = 0; ! assert (str); ! assert (pargz); ! assert (pargz_len); ! /* Make a copy of STR, but replacing each occurence of ! DELIM with '\0'. */ ! argz_len = 1+ LT_STRLEN (str); ! if (argz_len) ! { ! const char *p; ! char *q; ! argz = LT_DLMALLOC (char, argz_len); ! if (!argz) ! return ENOMEM; ! ! for (p = str, q = argz; *p != LT_EOS_CHAR; ++p) ! { ! if (*p == delim) ! { ! /* Ignore leading delimiters, and fold consecutive ! delimiters in STR into a single '\0' in ARGZ. */ ! if ((q > argz) && (q[-1] != LT_EOS_CHAR)) ! *q++ = LT_EOS_CHAR; ! else ! --argz_len; ! } ! else ! *q++ = *p; ! } ! /* Copy terminating LT_EOS_CHAR. */ ! *q = *p; ! } ! ! /* If ARGZ_LEN has shrunk to nothing, release ARGZ's memory. */ ! if (!argz_len) ! LT_DLFREE (argz); ! ! /* Assign new values. */ ! *pargz = argz; ! *pargz_len = argz_len; ! ! return 0; } + #endif /* !HAVE_ARGZ_CREATE_SEP */ + #if ! HAVE_ARGZ_INSERT + # define argz_insert rpl_argz_insert + + static error_t argz_insert LT_PARAMS((char **pargz, size_t *pargz_len, + char *before, const char *entry)); + + static error_t + argz_insert (pargz, pargz_len, before, entry) + char **pargz; + size_t *pargz_len; + char *before; + const char *entry; + { + assert (pargz); + assert (pargz_len); + assert (entry && *entry); + + /* No BEFORE address indicates ENTRY should be inserted after the + current last element. */ + if (!before) + return argz_append (pargz, pargz_len, entry, 1+ LT_STRLEN (entry)); + + /* This probably indicates a programmer error, but to preserve + semantics, scan back to the start of an entry if BEFORE points + into the middle of it. */ + while ((before >= *pargz) && (before[-1] != LT_EOS_CHAR)) + --before; + + { + size_t entry_len = 1+ LT_STRLEN (entry); + size_t argz_len = *pargz_len + entry_len; + size_t offset = before - *pargz; + char *argz = LT_DLREALLOC (char, *pargz, argz_len); + + if (!argz) + return ENOMEM; + + /* Make BEFORE point to the equivalent offset in ARGZ that it + used to have in *PARGZ incase realloc() moved the block. */ + before = argz + offset; + + /* Move the ARGZ entries starting at BEFORE up into the new + space at the end -- making room to copy ENTRY into the + resulting gap. */ + memmove (before + entry_len, before, *pargz_len - offset); + memcpy (before, entry, entry_len); + + /* Assign new values. */ + *pargz = argz; + *pargz_len = argz_len; + } + + return 0; + } + #endif /* !HAVE_ARGZ_INSERT */ + + + #if ! HAVE_ARGZ_NEXT + # define argz_next rpl_argz_next + + static char *argz_next LT_PARAMS((char *argz, size_t argz_len, + const char *entry)); + + static char * + argz_next (argz, argz_len, entry) + char *argz; + size_t argz_len; + const char *entry; + { + assert ((argz && argz_len) || (!argz && !argz_len)); + + if (entry) + { + /* Either ARGZ/ARGZ_LEN is empty, or ENTRY points into an address + within the ARGZ vector. */ + assert ((!argz && !argz_len) + || ((argz <= entry) && (entry < (argz + argz_len)))); + + /* Move to the char immediately after the terminating + '\0' of ENTRY. */ + entry = 1+ strchr (entry, LT_EOS_CHAR); + + /* Return either the new ENTRY, or else NULL if ARGZ is + exhausted. */ + return (entry >= argz + argz_len) ? 0 : (char *) entry; + } + else + { + /* This should probably be flagged as a programmer error, + since starting an argz_next loop with the iterator set + to ARGZ is safer. To preserve semantics, handle the NULL + case by returning the start of ARGZ (if any). */ + if (argz_len > 0) + return argz; + else + return 0; + } + } + #endif /* !HAVE_ARGZ_NEXT */ + + + + #if ! HAVE_ARGZ_STRINGIFY + # define argz_stringify rpl_argz_stringify + + static void argz_stringify LT_PARAMS((char *argz, size_t argz_len, + int sep)); + + static void + argz_stringify (argz, argz_len, sep) + char *argz; + size_t argz_len; + int sep; + { + assert ((argz && argz_len) || (!argz && !argz_len)); + + if (sep) + { + --argz_len; /* don't stringify the terminating EOS */ + while (--argz_len > 0) + { + if (argz[argz_len] == LT_EOS_CHAR) + argz[argz_len] = sep; + } + } + } + #endif /* !HAVE_ARGZ_STRINGIFY */ + + + + + /* --- TYPE DEFINITIONS -- */ + + + /* This type is used for the array of caller data sets in each handler. */ + typedef struct { + lt_dlcaller_id key; + lt_ptr data; + } lt_caller_data; + + + + + /* --- OPAQUE STRUCTURES DECLARED IN LTDL.H --- */ + + + /* Extract the diagnostic strings from the error table macro in the same + order as the enumerated indices in ltdl.h. */ + + static const char *lt_dlerror_strings[] = + { + #define LT_ERROR(name, diagnostic) (diagnostic), + lt_dlerror_table + #undef LT_ERROR + + 0 + }; + + /* This structure is used for the list of registered loaders. */ + struct lt_dlloader { + struct lt_dlloader *next; + const char *loader_name; /* identifying name for each loader */ + const char *sym_prefix; /* prefix for symbols */ + lt_module_open *module_open; + lt_module_close *module_close; + lt_find_sym *find_sym; + lt_dlloader_exit *dlloader_exit; + lt_user_data dlloader_data; + }; + + struct lt_dlhandle_struct { + struct lt_dlhandle_struct *next; + lt_dlloader *loader; /* dlopening interface */ + lt_dlinfo info; + int depcount; /* number of dependencies */ + lt_dlhandle *deplibs; /* dependencies */ + lt_module module; /* system module handle */ + lt_ptr system; /* system specific data */ + lt_caller_data *caller_data; /* per caller associated data */ + int flags; /* various boolean stats */ + }; + + /* Various boolean flags can be stored in the flags field of an + lt_dlhandle_struct... */ + #define LT_DLGET_FLAG(handle, flag) (((handle)->flags & (flag)) == (flag)) + #define LT_DLSET_FLAG(handle, flag) ((handle)->flags |= (flag)) + + #define LT_DLRESIDENT_FLAG (0x01 << 0) + /* ...add more flags here... */ + + #define LT_DLIS_RESIDENT(handle) LT_DLGET_FLAG(handle, LT_DLRESIDENT_FLAG) + + + #define LT_DLSTRERROR(name) lt_dlerror_strings[LT_CONC(LT_ERROR_,name)] + + static const char objdir[] = LTDL_OBJDIR; + static const char archive_ext[] = LTDL_ARCHIVE_EXT; + #ifdef LTDL_SHLIB_EXT + static const char shlib_ext[] = LTDL_SHLIB_EXT; + #endif + #ifdef LTDL_SYSSEARCHPATH + static const char sys_search_path[] = LTDL_SYSSEARCHPATH; #endif ! ! ! ! /* --- MUTEX LOCKING --- */ ! ! ! /* Macros to make it easier to run the lock functions only if they have ! been registered. The reason for the complicated lock macro is to ! ensure that the stored error message from the last error is not ! accidentally erased if the current function doesn't generate an ! error of its own. */ ! #define LT_DLMUTEX_LOCK() LT_STMT_START { \ ! if (lt_dlmutex_lock_func) (*lt_dlmutex_lock_func)(); \ ! } LT_STMT_END ! #define LT_DLMUTEX_UNLOCK() LT_STMT_START { \ ! if (lt_dlmutex_unlock_func) (*lt_dlmutex_unlock_func)();\ ! } LT_STMT_END ! #define LT_DLMUTEX_SETERROR(errormsg) LT_STMT_START { \ ! if (lt_dlmutex_seterror_func) \ ! (*lt_dlmutex_seterror_func) (errormsg); \ ! else lt_dllast_error = (errormsg); } LT_STMT_END ! #define LT_DLMUTEX_GETERROR(errormsg) LT_STMT_START { \ ! if (lt_dlmutex_seterror_func) \ ! (errormsg) = (*lt_dlmutex_geterror_func) (); \ ! else (errormsg) = lt_dllast_error; } LT_STMT_END ! ! /* The mutex functions stored here are global, and are necessarily the ! same for all threads that wish to share access to libltdl. */ ! static lt_dlmutex_lock *lt_dlmutex_lock_func = 0; ! static lt_dlmutex_unlock *lt_dlmutex_unlock_func = 0; ! static lt_dlmutex_seterror *lt_dlmutex_seterror_func = 0; ! static lt_dlmutex_geterror *lt_dlmutex_geterror_func = 0; ! static const char *lt_dllast_error = 0; ! ! ! /* Either set or reset the mutex functions. Either all the arguments must ! be valid functions, or else all can be NULL to turn off locking entirely. ! The registered functions should be manipulating a static global lock ! from the lock() and unlock() callbacks, which needs to be reentrant. */ ! int ! lt_dlmutex_register (lock, unlock, seterror, geterror) ! lt_dlmutex_lock *lock; ! lt_dlmutex_unlock *unlock; ! lt_dlmutex_seterror *seterror; ! lt_dlmutex_geterror *geterror; ! { ! lt_dlmutex_unlock *old_unlock = unlock; ! int errors = 0; ! ! /* Lock using the old lock() callback, if any. */ ! LT_DLMUTEX_LOCK (); ! ! if ((lock && unlock && seterror && geterror) ! || !(lock || unlock || seterror || geterror)) ! { ! lt_dlmutex_lock_func = lock; ! lt_dlmutex_unlock_func = unlock; ! lt_dlmutex_geterror_func = geterror; ! } ! else ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_MUTEX_ARGS)); ! ++errors; ! } ! ! /* Use the old unlock() callback we saved earlier, if any. Otherwise ! record any errors using internal storage. */ ! if (old_unlock) ! (*old_unlock) (); ! ! /* Return the number of errors encountered during the execution of ! this function. */ ! return errors; ! } ! ! ! ! ! /* --- ERROR HANDLING --- */ ! ! ! static const char **user_error_strings = 0; ! static int errorcount = LT_ERROR_MAX; ! ! int ! lt_dladderror (diagnostic) ! const char *diagnostic; ! { ! int errindex = 0; ! int result = -1; ! const char **temp = (const char **) 0; ! ! assert (diagnostic); ! ! LT_DLMUTEX_LOCK (); ! ! errindex = errorcount - LT_ERROR_MAX; ! temp = LT_EREALLOC (const char *, user_error_strings, 1 + errindex); ! if (temp) ! { ! user_error_strings = temp; ! user_error_strings[errindex] = diagnostic; ! result = errorcount++; ! } ! ! LT_DLMUTEX_UNLOCK (); ! ! return result; ! } ! ! int ! lt_dlseterror (errindex) ! int errindex; ! { ! int errors = 0; ! ! LT_DLMUTEX_LOCK (); ! ! if (errindex >= errorcount || errindex < 0) ! { ! /* Ack! Error setting the error message! */ ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_ERRORCODE)); ! ++errors; ! } ! else if (errindex < LT_ERROR_MAX) ! { ! /* No error setting the error message! */ ! LT_DLMUTEX_SETERROR (lt_dlerror_strings[errindex]); ! } ! else ! { ! /* No error setting the error message! */ ! LT_DLMUTEX_SETERROR (user_error_strings[errindex - LT_ERROR_MAX]); ! } ! ! LT_DLMUTEX_UNLOCK (); ! ! return errors; ! } ! ! static lt_ptr ! lt_emalloc (size) ! size_t size; ! { ! lt_ptr mem = lt_dlmalloc (size); ! if (size && !mem) ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! return mem; ! } ! ! static lt_ptr ! lt_erealloc (addr, size) ! lt_ptr addr; ! size_t size; ! { ! lt_ptr mem = realloc (addr, size); ! if (size && !mem) ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! return mem; ! } ! ! static char * ! lt_estrdup (str) ! const char *str; ! { ! char *copy = strdup (str); ! if (LT_STRLEN (str) && !copy) ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! return copy; ! } ! ! ! ! ! /* --- DLOPEN() INTERFACE LOADER --- */ ! ! ! #if HAVE_LIBDL /* dynamic linking with dlopen/dlsym */ #if HAVE_DLFCN_H ! # include ! #endif ! ! #if HAVE_SYS_DL_H ! # include #endif #ifdef RTLD_GLOBAL ! # define LT_GLOBAL RTLD_GLOBAL #else ! # ifdef DL_GLOBAL ! # define LT_GLOBAL DL_GLOBAL ! # endif ! #endif /* !RTLD_GLOBAL */ ! #ifndef LT_GLOBAL ! # define LT_GLOBAL 0 ! #endif /* !LT_GLOBAL */ ! /* We may have to define LT_LAZY_OR_NOW in the command line if we find out it does not work in some platform. */ ! #ifndef LT_LAZY_OR_NOW ! # ifdef RTLD_LAZY ! # define LT_LAZY_OR_NOW RTLD_LAZY ! # else ! # ifdef DL_LAZY ! # define LT_LAZY_OR_NOW DL_LAZY ! # endif ! # endif /* !RTLD_LAZY */ ! #endif ! #ifndef LT_LAZY_OR_NOW ! # ifdef RTLD_NOW ! # define LT_LAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW ! # define LT_LAZY_OR_NOW DL_NOW # endif ! # endif /* !RTLD_NOW */ #endif + #ifndef LT_LAZY_OR_NOW + # define LT_LAZY_OR_NOW 0 + #endif /* !LT_LAZY_OR_NOW */ #if HAVE_DLERROR ! # define DLERROR(arg) dlerror () #else ! # define DLERROR(arg) LT_DLSTRERROR (arg) #endif ! ! static lt_module ! sys_dl_open (loader_data, filename) ! lt_user_data loader_data; ! const char *filename; ! { ! lt_module module = dlopen (filename, LT_GLOBAL | LT_LAZY_OR_NOW); ! ! if (!module) ! { ! LT_DLMUTEX_SETERROR (DLERROR (CANNOT_OPEN)); ! } ! ! return module; } static int sys_dl_close (loader_data, module) ! lt_user_data loader_data; ! lt_module module; { ! int errors = 0; ! ! if (dlclose (module) != 0) ! { ! LT_DLMUTEX_SETERROR (DLERROR (CANNOT_CLOSE)); ! ++errors; ! } ! ! return errors; } ! static lt_ptr sys_dl_sym (loader_data, module, symbol) ! lt_user_data loader_data; ! lt_module module; ! const char *symbol; { ! lt_ptr address = dlsym (module, symbol); ! ! if (!address) ! { ! LT_DLMUTEX_SETERROR (DLERROR (SYMBOL_NOT_FOUND)); ! } ! ! return address; } ! static struct lt_user_dlloader sys_dl = ! { # ifdef NEED_USCORE ! "_", # else ! 0, # endif ! sys_dl_open, sys_dl_close, sys_dl_sym, 0, 0 }; ! ! ! #endif /* HAVE_LIBDL */ ! ! ! ! /* --- SHL_LOAD() INTERFACE LOADER --- */ #if HAVE_SHL_LOAD /* dynamic linking with shl_load (HP-UX) (comments from gmodule) */ #ifdef HAVE_DL_H ! # include #endif /* some flags are missing on some systems, so we provide *************** static struct lt_user_dlloader sys_dl = *** 362,443 **** * BIND_DEFERRED - Delay code symbol resolution until actual reference. * * Optionally: ! * BIND_FIRST - Place the library at the head of the symbol search order. ! * BIND_NONFATAL - The default BIND_IMMEDIATE behavior is to treat all unsatisfied ! * symbols as fatal. This flag allows binding of unsatisfied code ! * symbols to be deferred until use. ! * [Perl: For certain libraries, like DCE, deferred binding often ! * causes run time problems. Adding BIND_NONFATAL to BIND_IMMEDIATE ! * still allows unresolved references in situations like this.] ! * BIND_NOSTART - Do not call the initializer for the shared library when the ! * library is loaded, nor on a future call to shl_unload(). ! * BIND_VERBOSE - Print verbose messages concerning possible unsatisfied symbols. * * hp9000s700/hp9000s800: ! * BIND_RESTRICTED - Restrict symbols visible by the library to those present at ! * library load time. ! * DYNAMIC_PATH - Allow the loader to dynamically search for the library specified ! * by the path argument. */ #ifndef DYNAMIC_PATH ! #define DYNAMIC_PATH 0 ! #endif /* DYNAMIC_PATH */ #ifndef BIND_RESTRICTED ! #define BIND_RESTRICTED 0 ! #endif /* BIND_RESTRICTED */ ! #define LTDL_BIND_FLAGS (BIND_IMMEDIATE | BIND_NONFATAL | DYNAMIC_PATH) ! static lt_module_t sys_shl_open (loader_data, filename) ! lt_dlloader_data_t loader_data; ! const char *filename; { ! lt_module_t module = shl_load(filename, LTDL_BIND_FLAGS, 0L); ! if (!module) { ! last_error = LT_DLSTRERROR(CANNOT_OPEN); } ! return module; } static int sys_shl_close (loader_data, module) ! lt_dlloader_data_t loader_data; ! lt_module_t module; { ! if (shl_unload((shl_t) (module)) != 0) { ! last_error = LT_DLSTRERROR(CANNOT_CLOSE); ! return 1; ! } ! return 0; } ! static lt_ptr_t sys_shl_sym (loader_data, module, symbol) ! lt_dlloader_data_t loader_data; ! lt_module_t module; ! const char *symbol; { ! lt_ptr_t address; ! if (module && shl_findsym((shl_t*) &module, ! symbol, TYPE_UNDEFINED, &address) == 0) ! if (address) ! return address; ! last_error = LT_DLSTRERROR(SYMBOL_NOT_FOUND); ! return 0; } ! static struct lt_user_dlloader ! sys_shl = { 0, sys_shl_open, sys_shl_close, sys_shl_sym, 0, 0 }; ! #undef LTDL_TYPE_TOP ! #define LTDL_TYPE_TOP &sys_shl - #endif ! #ifdef _WIN32 /* dynamic linking for Win32 */ --- 1174,1298 ---- * BIND_DEFERRED - Delay code symbol resolution until actual reference. * * Optionally: ! * BIND_FIRST - Place the library at the head of the symbol search ! * order. ! * BIND_NONFATAL - The default BIND_IMMEDIATE behavior is to treat all ! * unsatisfied symbols as fatal. This flag allows ! * binding of unsatisfied code symbols to be deferred ! * until use. ! * [Perl: For certain libraries, like DCE, deferred ! * binding often causes run time problems. Adding ! * BIND_NONFATAL to BIND_IMMEDIATE still allows ! * unresolved references in situations like this.] ! * BIND_NOSTART - Do not call the initializer for the shared library ! * when the library is loaded, nor on a future call to ! * shl_unload(). ! * BIND_VERBOSE - Print verbose messages concerning possible ! * unsatisfied symbols. * * hp9000s700/hp9000s800: ! * BIND_RESTRICTED - Restrict symbols visible by the library to those ! * present at library load time. ! * DYNAMIC_PATH - Allow the loader to dynamically search for the ! * library specified by the path argument. */ #ifndef DYNAMIC_PATH ! # define DYNAMIC_PATH 0 ! #endif #ifndef BIND_RESTRICTED ! # define BIND_RESTRICTED 0 ! #endif ! #define LT_BIND_FLAGS (BIND_IMMEDIATE | BIND_NONFATAL | DYNAMIC_PATH) ! static lt_module sys_shl_open (loader_data, filename) ! lt_user_data loader_data; ! const char *filename; { ! static shl_t self = (shl_t) 0; ! lt_module module = shl_load (filename, LT_BIND_FLAGS, 0L); ! ! /* Since searching for a symbol against a NULL module handle will also ! look in everything else that was already loaded and exported with ! the -E compiler flag, we always cache a handle saved before any ! modules are loaded. */ ! if (!self) ! { ! lt_ptr address; ! shl_findsym (&self, "main", TYPE_UNDEFINED, &address); ! } ! ! if (!filename) ! { ! module = self; ! } ! else ! { ! module = shl_load (filename, LT_BIND_FLAGS, 0L); ! ! if (!module) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); } ! } ! ! return module; } static int sys_shl_close (loader_data, module) ! lt_user_data loader_data; ! lt_module module; { ! int errors = 0; ! ! if (module && (shl_unload ((shl_t) (module)) != 0)) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); ! ++errors; ! } ! ! return errors; } ! static lt_ptr sys_shl_sym (loader_data, module, symbol) ! lt_user_data loader_data; ! lt_module module; ! const char *symbol; { ! lt_ptr address = 0; ! /* sys_shl_open should never return a NULL module handle */ ! if (module == (lt_module) 0) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); ! } ! else if (!shl_findsym((shl_t*) &module, symbol, TYPE_UNDEFINED, &address)) ! { ! if (!address) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); ! } ! } ! ! return address; } ! static struct lt_user_dlloader sys_shl = { ! 0, sys_shl_open, sys_shl_close, sys_shl_sym, 0, 0 ! }; ! #endif /* HAVE_SHL_LOAD */ ! ! ! /* --- LOADLIBRARY() INTERFACE LOADER --- */ ! ! #ifdef __WINDOWS__ /* dynamic linking for Win32 */ *************** sys_shl = { 0, sys_shl_open, sys_shl_clo *** 446,544 **** /* Forward declaration; required to implement handle search below. */ static lt_dlhandle handles; ! static lt_module_t sys_wll_open (loader_data, filename) ! lt_dlloader_data_t loader_data; ! const char *filename; { ! lt_dlhandle cur; ! lt_module_t module; ! char *searchname = 0; ! char *ext; ! char self_name_buf[MAX_PATH]; ! if (!filename) { ! /* Get the name of main module */ ! *self_name_buf = 0; ! GetModuleFileName(NULL, self_name_buf, sizeof(self_name_buf)); ! filename = ext = self_name_buf; ! } ! else ext = strrchr(filename, '.'); ! if (ext) { ! /* FILENAME already has an extension. */ ! searchname = strdup(filename); ! } else { ! /* Append a `.' to stop Windows from adding an ! implicit `.dll' extension. */ ! searchname = (char*)lt_dlmalloc(2+ strlen(filename)); ! if (!searchname) { ! last_error = LT_DLSTRERROR(NO_MEMORY); ! return 0; ! } ! strcpy(searchname, filename); ! strcat(searchname, "."); ! } ! module = LoadLibrary(searchname); ! lt_dlfree(searchname); ! ! /* libltdl expects this function to fail if it is unable ! to physically load the library. Sadly, LoadLibrary ! will search the loaded libraries for a match and return ! one of them if the path search load fails. ! We check whether LoadLibrary is returning a handle to ! an already loaded module, and simulate failure if we ! find one. */ ! cur = handles; ! while (cur) { ! if (!cur->module) { ! cur = 0; ! break; ! } ! if (cur->module == module) ! break; ! cur = cur->next; } ! if (cur || !module) { ! last_error = LT_DLSTRERROR(CANNOT_OPEN); ! return 0; } ! return module; } static int sys_wll_close (loader_data, module) ! lt_dlloader_data_t loader_data; ! lt_module_t module; { ! if (FreeLibrary(module) == 0) { ! last_error = LT_DLSTRERROR(CANNOT_CLOSE); ! return 1; ! } ! return 0; } ! static lt_ptr_t sys_wll_sym (loader_data, module, symbol) ! lt_dlloader_data_t loader_data; ! lt_module_t module; ! const char *symbol; { ! lt_ptr_t address = GetProcAddress(module, symbol); ! ! if (!address) ! last_error = LT_DLSTRERROR(SYMBOL_NOT_FOUND); ! return address; } ! static struct lt_user_dlloader ! sys_wll = { 0, sys_wll_open, sys_wll_close, sys_wll_sym, 0, 0 }; - #endif #ifdef __BEOS__ --- 1301,1436 ---- /* Forward declaration; required to implement handle search below. */ static lt_dlhandle handles; ! static lt_module sys_wll_open (loader_data, filename) ! lt_user_data loader_data; ! const char *filename; { ! lt_dlhandle cur; ! lt_module module = 0; ! const char *errormsg = 0; ! char *searchname = 0; ! char *ext; ! char self_name_buf[MAX_PATH]; ! if (!filename) ! { ! /* Get the name of main module */ ! *self_name_buf = 0; ! GetModuleFileName (NULL, self_name_buf, sizeof (self_name_buf)); ! filename = ext = self_name_buf; ! } ! else ! { ! ext = strrchr (filename, '.'); ! } ! if (ext) ! { ! /* FILENAME already has an extension. */ ! searchname = lt_estrdup (filename); ! } ! else ! { ! /* Append a `.' to stop Windows from adding an ! implicit `.dll' extension. */ ! searchname = LT_EMALLOC (char, 2+ LT_STRLEN (filename)); ! if (searchname) ! sprintf (searchname, "%s.", filename); ! } ! if (!searchname) ! return 0; ! #if __CYGWIN__ ! { ! char wpath[MAX_PATH]; ! cygwin_conv_to_full_win32_path(searchname, wpath); ! module = LoadLibrary(wpath); ! } ! #else ! module = LoadLibrary (searchname); ! #endif ! LT_DLFREE (searchname); ! /* libltdl expects this function to fail if it is unable ! to physically load the library. Sadly, LoadLibrary ! will search the loaded libraries for a match and return ! one of them if the path search load fails. ! ! We check whether LoadLibrary is returning a handle to ! an already loaded module, and simulate failure if we ! find one. */ ! LT_DLMUTEX_LOCK (); ! cur = handles; ! while (cur) ! { ! if (!cur->module) ! { ! cur = 0; ! break; } ! if (cur->module == module) ! { ! break; } ! cur = cur->next; ! } ! LT_DLMUTEX_UNLOCK (); ! ! if (cur || !module) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); ! module = 0; ! } ! ! return module; } static int sys_wll_close (loader_data, module) ! lt_user_data loader_data; ! lt_module module; { ! int errors = 0; ! ! if (FreeLibrary(module) == 0) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); ! ++errors; ! } ! ! return errors; } ! static lt_ptr sys_wll_sym (loader_data, module, symbol) ! lt_user_data loader_data; ! lt_module module; ! const char *symbol; { ! lt_ptr address = GetProcAddress (module, symbol); ! ! if (!address) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); ! } ! ! return address; } ! static struct lt_user_dlloader sys_wll = { ! 0, sys_wll_open, sys_wll_close, sys_wll_sym, 0, 0 ! }; ! ! #endif /* __WINDOWS__ */ ! ! ! ! ! /* --- LOAD_ADD_ON() INTERFACE LOADER --- */ #ifdef __BEOS__ *************** sys_wll = { 0, sys_wll_open, sys_wll_clo *** 546,607 **** #include ! static lt_module_t sys_bedl_open (loader_data, filename) ! lt_dlloader_data_t loader_data; ! const char *filename; { ! image_id image = 0; ! ! if (filename) { ! image = load_add_on(filename); ! } else { ! image_info info; ! int32 cookie = 0; ! if (get_next_image_info(0, &cookie, &info) == B_OK) ! image = load_add_on(info.name); ! } ! if (image <= 0) { ! last_error = LT_DLSTRERROR(CANNOT_OPEN); ! return 0; ! } ! return (lt_module_t) image; } static int sys_bedl_close (loader_data, module) ! lt_dlloader_data_t loader_data; ! lt_module_t module; { ! if (unload_add_on((image_id)module) != B_OK) { ! last_error = LT_DLSTRERROR(CANNOT_CLOSE); ! return 1; ! } ! return 0; } ! static lt_ptr_t sys_bedl_sym (loader_data, module, symbol) ! lt_dlloader_data_t loader_data; ! lt_module_t module; ! const char *symbol; { ! lt_ptr_t address = 0; ! image_id image = (image_id)module; ! ! if (get_image_symbol(image, symbol, B_SYMBOL_TYPE_ANY, ! &address) != B_OK) { ! last_error = LT_DLSTRERROR(SYMBOL_NOT_FOUND); ! return 0; ! } ! return address; } ! static struct lt_user_dlloader ! sys_bedl = { 0, sys_bedl_open, sys_bedl_close, sys_bedl_sym, 0, 0 }; - #endif #if HAVE_DLD --- 1438,1516 ---- #include ! static lt_module sys_bedl_open (loader_data, filename) ! lt_user_data loader_data; ! const char *filename; { ! image_id image = 0; ! if (filename) ! { ! image = load_add_on (filename); ! } ! else ! { ! image_info info; ! int32 cookie = 0; ! if (get_next_image_info (0, &cookie, &info) == B_OK) ! image = load_add_on (info.name); ! } ! ! if (image <= 0) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); ! image = 0; ! } ! ! return (lt_module) image; } static int sys_bedl_close (loader_data, module) ! lt_user_data loader_data; ! lt_module module; { ! int errors = 0; ! ! if (unload_add_on ((image_id) module) != B_OK) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); ! ++errors; ! } ! ! return errors; } ! static lt_ptr sys_bedl_sym (loader_data, module, symbol) ! lt_user_data loader_data; ! lt_module module; ! const char *symbol; { ! lt_ptr address = 0; ! image_id image = (image_id) module; ! ! if (get_image_symbol (image, symbol, B_SYMBOL_TYPE_ANY, address) != B_OK) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); ! address = 0; ! } ! ! return address; } ! static struct lt_user_dlloader sys_bedl = { ! 0, sys_bedl_open, sys_bedl_close, sys_bedl_sym, 0, 0 ! }; ! ! #endif /* __BEOS__ */ ! ! ! ! ! /* --- DLD_LINK() INTERFACE LOADER --- */ #if HAVE_DLD *************** sys_bedl = { 0, sys_bedl_open, sys_bedl_ *** 611,1984 **** #include #endif ! static lt_module_t sys_dld_open (loader_data, filename) ! lt_dlloader_data_t loader_data; ! const char *filename; { ! lt_module_t module = strdup(filename); ! if (!module) { ! last_error = LT_DLSTRERROR(NO_MEMORY); ! return 0; ! } ! if (dld_link(filename) != 0) { ! last_error = LT_DLSTRERROR(CANNOT_OPEN); ! lt_dlfree(module); ! return 0; ! } ! return module; } static int sys_dld_close (loader_data, module) ! lt_dlloader_data_t loader_data; ! lt_module_t module; { ! if (dld_unlink_by_file((char*)(module), 1) != 0) { ! last_error = LT_DLSTRERROR(CANNOT_CLOSE); ! return 1; ! } ! lt_dlfree(module); ! return 0; } ! static lt_ptr_t sys_dld_sym (loader_data, module, symbol) ! lt_dlloader_data_t loader_data; ! lt_module_t module; const char *symbol; { ! lt_ptr_t address = dld_get_func(symbol); ! if (!address) ! last_error = LT_DLSTRERROR(SYMBOL_NOT_FOUND); ! return address; } ! static struct lt_user_dlloader ! sys_dld = { 0, sys_dld_open, sys_dld_close, sys_dld_sym, 0, 0 }; #endif /* emulate dynamic linking using preloaded_symbols */ ! typedef struct lt_dlsymlists_t { ! struct lt_dlsymlists_t *next; ! const lt_dlsymlist *syms; } lt_dlsymlists_t; ! static const lt_dlsymlist *default_preloaded_symbols = 0; ! static lt_dlsymlists_t *preloaded_symbols = 0; static int presym_init (loader_data) ! lt_dlloader_data_t loader_data; { ! preloaded_symbols = 0; ! if (default_preloaded_symbols) ! return lt_dlpreload(default_preloaded_symbols); ! return 0; } static int ! presym_free_symlists LTDL_PARAMS((void)) { ! lt_dlsymlists_t *lists = preloaded_symbols; ! ! while (lists) { ! lt_dlsymlists_t *tmp = lists; ! ! lists = lists->next; ! lt_dlfree(tmp); ! } ! preloaded_symbols = 0; ! return 0; } static int presym_exit (loader_data) ! lt_dlloader_data_t loader_data; { ! presym_free_symlists(); ! return 0; } static int presym_add_symlist (preloaded) ! const lt_dlsymlist *preloaded; { ! lt_dlsymlists_t *tmp; ! lt_dlsymlists_t *lists = preloaded_symbols; ! ! while (lists) { ! if (lists->syms == preloaded) ! return 0; ! lists = lists->next; ! } ! tmp = (lt_dlsymlists_t*) lt_dlmalloc(sizeof(lt_dlsymlists_t)); ! if (!tmp) { ! last_error = LT_DLSTRERROR(NO_MEMORY); ! return 1; } ! tmp->syms = preloaded; ! tmp->next = preloaded_symbols; ! preloaded_symbols = tmp; ! return 0; } ! static lt_module_t presym_open (loader_data, filename) ! lt_dlloader_data_t loader_data; ! const char *filename; { ! lt_dlsymlists_t *lists = preloaded_symbols; ! if (!lists) { ! last_error = LT_DLSTRERROR(NO_SYMBOLS); ! return 0; ! } ! if (!filename) ! filename = "@PROGRAM@"; ! while (lists) { ! const lt_dlsymlist *syms = lists->syms; ! ! while (syms->name) { ! if (!syms->address && ! strcmp(syms->name, filename) == 0) { ! return (lt_module_t) syms; ! } ! syms++; ! } ! lists = lists->next; } ! last_error = LT_DLSTRERROR(FILE_NOT_FOUND); ! return 0; } static int presym_close (loader_data, module) ! lt_dlloader_data_t loader_data; ! lt_module_t module; { ! /* Just to silence gcc -Wall */ ! module = 0; ! return 0; } ! static lt_ptr_t presym_sym (loader_data, module, symbol) ! lt_dlloader_data_t loader_data; ! lt_module_t module; ! const char *symbol; { ! lt_dlsymlist *syms = (lt_dlsymlist*)(module); ! syms++; ! while (syms->address) { ! if (strcmp(syms->name, symbol) == 0) ! return syms->address; ! syms++; } ! last_error = LT_DLSTRERROR(SYMBOL_NOT_FOUND); ! return 0; } ! static struct lt_user_dlloader ! presym = { 0, presym_open, presym_close, presym_sym, presym_exit, 0 }; - static char *user_search_path = 0; - static lt_dlloader_t *loaders = 0; - static lt_dlhandle handles = 0; - static int initialized = 0; int ! lt_dlinit LTDL_PARAMS((void)) { ! /* initialize libltdl */ ! int errors = 0; ! if (initialized) { /* Initialize only at first call. */ ! initialized++; ! return 0; ! } ! handles = 0; ! user_search_path = 0; /* empty search path */ ! ! #if HAVE_LIBDL && !defined(__CYGWIN__) ! errors += lt_dlloader_add (lt_dlloader_next(0), &sys_dl, "dlopen"); ! #endif #if HAVE_SHL_LOAD ! errors += lt_dlloader_add (lt_dlloader_next(0), &sys_shl, "dlopen"); #endif ! #ifdef _WIN32 ! errors += lt_dlloader_add (lt_dlloader_next(0), &sys_wll, "dlopen"); #endif #ifdef __BEOS__ ! errors += lt_dlloader_add (lt_dlloader_next(0), &sys_bedl, "dlopen"); #endif #if HAVE_DLD ! errors += lt_dlloader_add (lt_dlloader_next(0), &sys_dld, "dld"); #endif ! errors += lt_dlloader_add (lt_dlloader_next(0), &presym, "dlpreload"); ! if (presym_init(presym.dlloader_data)) { ! last_error = LT_DLSTRERROR(INIT_LOADER); ! return 1; ! } ! if (errors != 0) { ! last_error = LT_DLSTRERROR(DLOPEN_NOT_SUPPORTED); ! return 1; } ! last_error = 0; ! initialized = 1; ! return 0; } int lt_dlpreload (preloaded) ! const lt_dlsymlist *preloaded; { ! if (preloaded) ! return presym_add_symlist(preloaded); ! presym_free_symlists(); ! if (default_preloaded_symbols) ! return lt_dlpreload(default_preloaded_symbols); ! return 0; } int lt_dlpreload_default (preloaded) ! const lt_dlsymlist *preloaded; { ! default_preloaded_symbols = preloaded; ! return 0; } int ! lt_dlexit LTDL_PARAMS((void)) { ! /* shut down libltdl */ ! lt_dlloader_t *loader = loaders; ! int errors, level; ! ! if (!initialized) { ! last_error = LT_DLSTRERROR(SHUTDOWN); ! return 1; ! } ! if (initialized != 1) { /* shut down only at last call. */ ! initialized--; ! return 0; } ! /* close all modules */ ! errors = 0; ! for (level = 1; handles; level++) { ! lt_dlhandle cur = handles; ! while (cur) { ! lt_dlhandle tmp = cur; ! cur = cur->next; ! if (tmp->info.ref_count <= level) ! if (lt_dlclose(tmp)) ! errors++; } } ! /* close all loaders */ ! while (loader) { ! lt_dlloader_t *next = loader->next; ! lt_dlloader_data_t data = loader->dlloader_data; ! if (loader->dlloader_exit && loader->dlloader_exit(data)) ! errors++; ! lt_dlfree (loader); ! loader = next; } ! initialized = 0; ! return errors; } static int tryall_dlopen (handle, filename) ! lt_dlhandle *handle; ! const char *filename; { ! lt_dlhandle cur = handles; ! lt_dlloader_t *loader = loaders; ! const char *saved_error = last_error; ! ! /* check whether the module was already opened */ ! while (cur) { ! /* try to dlopen the program itself? */ ! if (!cur->info.filename && !filename) ! break; ! if (cur->info.filename && filename && ! strcmp(cur->info.filename, filename) == 0) ! break; ! cur = cur->next; } ! if (cur) { ! cur->info.ref_count++; ! *handle = cur; ! return 0; } ! ! cur = *handle; ! if (filename) { ! cur->info.filename = strdup(filename); ! if (!cur->info.filename) { ! last_error = LT_DLSTRERROR(NO_MEMORY); ! return 1; ! } ! } else ! cur->info.filename = 0; ! while (loader) { ! lt_dlloader_data_t data = loader->dlloader_data; ! cur->module = loader->module_open(data, filename); ! if (cur->module != 0) ! break; ! loader = loader->next; } ! if (!loader) { ! if (cur->info.filename) ! lt_dlfree(cur->info.filename); ! return 1; } ! cur->loader = loader; ! last_error = saved_error; ! return 0; } static int find_module (handle, dir, libdir, dlname, old_name, installed) ! lt_dlhandle *handle; ! const char *dir; ! const char *libdir; ! const char *dlname; ! const char *old_name; ! int installed; { ! int error; ! char *filename; ! /* try to open the old library first; if it was dlpreopened, ! we want the preopened version of it, even if a dlopenable ! module is available */ ! if (old_name && tryall_dlopen(handle, old_name) == 0) ! return 0; ! /* try to open the dynamic library */ ! if (dlname) { ! /* try to open the installed module */ ! if (installed && libdir) { ! filename = (char*) ! lt_dlmalloc(strlen(libdir)+1+strlen(dlname)+1); ! if (!filename) { ! last_error = LT_DLSTRERROR(NO_MEMORY); ! return 1; ! } ! sprintf (filename, "%s/%s", libdir, dlname); ! error = tryall_dlopen(handle, filename) != 0; ! lt_dlfree(filename); ! if (!error) ! return 0; ! } ! /* try to open the not-installed module */ ! if (!installed) { ! filename = (char*) ! lt_dlmalloc((dir ? strlen(dir) : 0) ! + strlen(objdir) + strlen(dlname) + 1); ! if (!filename) { ! last_error = LT_DLSTRERROR(NO_MEMORY); ! return 1; ! } ! if (dir) ! strcpy(filename, dir); ! else ! *filename = 0; ! strcat(filename, objdir); ! strcat(filename, dlname); ! error = tryall_dlopen(handle, filename) != 0; ! lt_dlfree(filename); ! if (!error) ! return 0; ! } ! /* maybe it was moved to another directory */ ! { ! filename = (char*) ! lt_dlmalloc((dir ? strlen(dir) : 0) ! + strlen(dlname) + 1); ! if (dir) ! strcpy(filename, dir); ! else ! *filename = 0; ! strcat(filename, dlname); ! error = tryall_dlopen(handle, filename) != 0; ! lt_dlfree(filename); ! if (!error) ! return 0; ! } } ! return 1; } ! static char* ! canonicalize_path (path) ! const char *path; { ! char *canonical = 0; ! ! if (path && *path) { ! char *ptr = strdup (path); ! canonical = ptr; ! #ifdef LTDL_DIRSEP_CHAR ! /* Avoid this overhead where '/' is the only separator. */ ! while (ptr = strchr (ptr, LTDL_DIRSEP_CHAR)) ! *ptr++ = '/'; #endif ! } ! return canonical; } ! static lt_ptr_t ! find_file (basename, search_path, pdir, handle) ! const char *basename; ! const char *search_path; ! char **pdir; ! lt_dlhandle *handle; { ! /* when handle != NULL search a library, otherwise a file */ ! /* return NULL on failure, otherwise the file/handle */ ! lt_ptr_t result = 0; ! char *filename = 0; ! int filenamesize = 0; ! int lenbase = strlen(basename); ! char *canonical = 0, *next = 0; ! ! if (!search_path || !*search_path) { ! last_error = LT_DLSTRERROR(FILE_NOT_FOUND); ! return 0; ! } ! canonical = canonicalize_path (search_path); ! if (!canonical) { ! last_error = LT_DLSTRERROR(NO_MEMORY); ! goto cleanup; ! } ! next = canonical; ! while (next) { ! int lendir; ! char *cur = next; ! next = strchr(cur, LTDL_PATHSEP_CHAR); ! if (!next) ! next = cur + strlen(cur); ! lendir = next - cur; ! if (*next == LTDL_PATHSEP_CHAR) ! ++next; ! else ! next = 0; ! if (lendir == 0) ! continue; ! if (lendir + 1 + lenbase >= filenamesize) { ! if (filename) ! lt_dlfree(filename); ! filenamesize = lendir + 1 + lenbase + 1; ! filename = (char*) lt_dlmalloc(filenamesize); ! if (!filename) { ! last_error = LT_DLSTRERROR(NO_MEMORY); ! goto cleanup; ! } ! } ! strncpy(filename, cur, lendir); ! if (filename[lendir-1] != '/') ! filename[lendir++] = '/'; ! strcpy(filename+lendir, basename); ! if (handle) { ! if (tryall_dlopen(handle, filename) == 0) { ! result = (lt_ptr_t) handle; ! goto cleanup; ! } ! } else { ! FILE *file = fopen(filename, LTDL_READTEXT_MODE); ! if (file) { ! if (*pdir) ! lt_dlfree(*pdir); ! filename[lendir] = '\0'; ! *pdir = strdup(filename); ! if (!*pdir) { ! /* We could have even avoided the ! strdup, but there would be some ! memory overhead. */ ! *pdir = filename; ! filename = 0; ! } ! result = (lt_ptr_t) file; ! goto cleanup; ! } ! } } ! last_error = LT_DLSTRERROR(FILE_NOT_FOUND); ! cleanup: ! if (filename) ! lt_dlfree(filename); ! if (canonical) ! lt_dlfree(canonical); ! return result; } static int ! load_deplibs(handle, deplibs) ! lt_dlhandle handle; ! char *deplibs; { ! char *p, *save_search_path; ! int i; ! int ret = 1, depcount = 0; ! char **names = 0; ! lt_dlhandle *handles = 0; ! handle->depcount = 0; ! if (!deplibs) ! return 0; ! save_search_path = strdup(user_search_path); ! if (user_search_path && !save_search_path) { ! last_error = LT_DLSTRERROR(NO_MEMORY); ! return 1; } ! p = deplibs; ! /* extract search paths and count deplibs */ ! while (*p) { ! if (!isspace(*p)) { ! char *end = p+1; ! while (*end && !isspace(*end)) end++; ! if (strncmp(p, "-L", 2) == 0 || ! strncmp(p, "-R", 2) == 0) { ! char save = *end; ! *end = 0; /* set a temporary string terminator */ ! if (lt_dladdsearchdir(p+2)) ! goto cleanup; ! *end = save; ! } else ! depcount++; ! p = end; ! } else ! p++; } ! if (!depcount) { ! ret = 0; ! goto cleanup; } ! names = (char**)lt_dlmalloc(depcount * sizeof(char*)); ! if (!names) ! goto cleanup; ! handles = (lt_dlhandle*)lt_dlmalloc(depcount * sizeof(lt_dlhandle*)); ! if (!handles) ! goto cleanup; ! depcount = 0; ! /* now only extract the actual deplibs */ ! p = deplibs; ! while (*p) { ! if (!isspace(*p)) { ! char *end = p+1; ! while (*end && !isspace(*end)) end++; ! if (strncmp(p, "-L", 2) != 0 && ! strncmp(p, "-R", 2) != 0) { ! char *name; ! char save = *end; ! *end = 0; /* set a temporary string terminator */ ! if (strncmp(p, "-l", 2) == 0) { ! name = lt_dlmalloc(3+ /* "lib" */ ! strlen(p+2)+1); ! if (name) ! sprintf (name, "lib%s", p+2); ! } else ! name = strdup(p); ! if (name) ! names[depcount++] = name; ! else ! goto cleanup_names; ! *end = save; ! } ! p = end; ! } else ! p++; } ! /* load the deplibs (in reverse order) */ ! for (i = 0; i < depcount; i++) { ! lt_dlhandle handle = lt_dlopenext(names[depcount-1-i]); ! if (!handle) { ! int j; ! for (j = 0; j < i; j++) ! lt_dlclose(handles[j]); ! last_error = LT_DLSTRERROR(DEPLIB_NOT_FOUND); ! goto cleanup_names; } ! handles[i] = handle; } ! handle->depcount = depcount; ! handle->deplibs = handles; ! handles = 0; ! ret = 0; ! cleanup_names: ! for (i = 0; i < depcount; i++) ! lt_dlfree(names[i]); ! cleanup: ! if (names) ! lt_dlfree(names); ! if (handles) ! lt_dlfree(handles); ! /* restore the old search path */ ! if (user_search_path) ! lt_dlfree(user_search_path); ! user_search_path = save_search_path; ! return ret; } static int ! unload_deplibs(handle) ! lt_dlhandle handle; { ! int i; ! int errors = 0; ! ! if (!handle->depcount) ! return 0; ! for (i = 0; i < handle->depcount; i++) ! errors += lt_dlclose(handle->deplibs[i]); ! return errors; } ! static inline int trim (dest, str) ! char **dest; ! const char *str; { ! /* remove the leading and trailing "'" from str ! and store the result in dest */ ! char *tmp; ! const char *end = strrchr(str, '\''); ! int len = strlen(str); ! if (*dest) ! lt_dlfree(*dest); ! if (len > 3 && str[0] == '\'') { ! tmp = (char*) lt_dlmalloc(end - str); ! if (!tmp) { ! last_error = LT_DLSTRERROR(NO_MEMORY); ! return 1; ! } ! strncpy(tmp, &str[1], (end - str) - 1); ! tmp[len-3] = '\0'; ! *dest = tmp; ! } else ! *dest = 0; ! return 0; } ! static inline int ! free_vars( dlname, oldname, libdir, deplibs) ! char *dlname; ! char *oldname; ! char *libdir; ! char *deplibs; { ! if (dlname) ! lt_dlfree(dlname); ! if (oldname) ! lt_dlfree(oldname); ! if (libdir) ! lt_dlfree(libdir); ! if (deplibs) ! lt_dlfree(deplibs); ! return 0; } ! lt_dlhandle ! lt_dlopen (filename) ! const char *filename; { ! lt_dlhandle handle = 0, newhandle; ! const char *ext; ! const char *saved_error = last_error; ! char *canonical = 0, *basename = 0, *dir = 0, *name = 0; ! ! if (!filename) { ! handle = (lt_dlhandle) lt_dlmalloc(sizeof(lt_dlhandle_t)); ! if (!handle) { ! last_error = LT_DLSTRERROR(NO_MEMORY); ! return 0; ! } ! handle->info.ref_count = 0; ! handle->depcount = 0; ! handle->deplibs = 0; ! newhandle = handle; ! if (tryall_dlopen(&newhandle, 0) != 0) { ! lt_dlfree(handle); ! return 0; ! } ! goto register_handle; } ! canonical = canonicalize_path (filename); ! if (!canonical) { ! last_error = LT_DLSTRERROR(NO_MEMORY); ! if (handle) ! lt_dlfree(handle); ! return 0; } - basename = strrchr(canonical, '/'); - if (basename) { - basename++; - dir = (char*) lt_dlmalloc(basename - canonical + 1); - if (!dir) { - last_error = LT_DLSTRERROR(NO_MEMORY); - handle = 0; - goto cleanup; - } - strncpy(dir, canonical, basename - canonical); - dir[basename - canonical] = '\0'; - } else - basename = canonical; - /* check whether we open a libtool module (.la extension) */ - ext = strrchr(basename, '.'); - if (ext && strcmp(ext, ".la") == 0) { - /* this seems to be a libtool module */ - FILE *file; - int i; - char *dlname = 0, *old_name = 0; - char *libdir = 0, *deplibs = 0; - char *line; - int error = 0; - /* if we can't find the installed flag, it is probably an - installed libtool archive, produced with an old version - of libtool */ - int installed = 1; ! /* extract the module name from the file name */ ! name = (char*) lt_dlmalloc(ext - basename + 1); ! if (!name) { ! last_error = LT_DLSTRERROR(NO_MEMORY); ! handle = 0; ! goto cleanup; ! } ! /* canonicalize the module name */ ! for (i = 0; i < ext - basename; i++) ! if (isalnum((int)(basename[i]))) ! name[i] = basename[i]; ! else ! name[i] = '_'; ! name[ext - basename] = '\0'; ! /* now try to open the .la file */ ! file = fopen(filename, LTDL_READTEXT_MODE); ! if (!file) ! last_error = LT_DLSTRERROR(FILE_NOT_FOUND); ! if (!file && !dir) { ! /* try other directories */ ! file = (FILE*) find_file(basename, ! user_search_path, ! &dir, 0); ! if (!file) ! file = (FILE*) find_file(basename, ! getenv("LTDL_LIBRARY_PATH"), ! &dir, 0); #ifdef LTDL_SHLIBPATH_VAR ! if (!file) ! file = (FILE*) find_file(basename, ! getenv(LTDL_SHLIBPATH_VAR), ! &dir, 0); #endif #ifdef LTDL_SYSSEARCHPATH ! if (!file) ! file = (FILE*) find_file(basename, ! sys_search_path, ! &dir, 0); #endif } ! if (!file) { ! handle = 0; ! goto cleanup; ! } ! line = (char*) lt_dlmalloc(LTDL_FILENAME_MAX); ! if (!line) { ! fclose(file); ! last_error = LT_DLSTRERROR(NO_MEMORY); ! handle = 0; ! goto cleanup; ! } ! /* read the .la file */ ! while (!feof(file)) { ! if (!fgets(line, LTDL_FILENAME_MAX, file)) ! break; ! if (line[0] == '\n' || line[0] == '#') ! continue; ! # undef STR_DLNAME ! # define STR_DLNAME "dlname=" ! if (strncmp(line, STR_DLNAME, ! sizeof(STR_DLNAME) - 1) == 0) ! error = trim(&dlname, ! &line[sizeof(STR_DLNAME) - 1]); ! else ! # undef STR_OLD_LIBRARY ! # define STR_OLD_LIBRARY "old_library=" ! if (strncmp(line, STR_OLD_LIBRARY, ! sizeof(STR_OLD_LIBRARY) - 1) == 0) ! error = trim(&old_name, ! &line[sizeof(STR_OLD_LIBRARY) - 1]); ! else ! # undef STR_LIBDIR ! # define STR_LIBDIR "libdir=" ! if (strncmp(line, STR_LIBDIR, ! sizeof(STR_LIBDIR) - 1) == 0) ! error = trim(&libdir, ! &line[sizeof(STR_LIBDIR) - 1]); ! else ! # undef STR_DL_DEPLIBS ! # define STR_DL_DEPLIBS "dl_dependency_libs=" ! if (strncmp(line, STR_DL_DEPLIBS, ! sizeof(STR_DL_DEPLIBS) - 1) == 0) ! error = trim(&deplibs, ! &line[sizeof(STR_DL_DEPLIBS) - 1]); ! else ! if (strcmp(line, "installed=yes\n") == 0) ! installed = 1; ! else ! if (strcmp(line, "installed=no\n") == 0) ! installed = 0; ! else ! # undef STR_LIBRARY_NAMES ! # define STR_LIBRARY_NAMES "library_names=" ! if (! dlname && ! strncmp(line, STR_LIBRARY_NAMES, ! sizeof(STR_LIBRARY_NAMES) - 1) == 0) { ! char *last_libname; ! error = trim(&dlname, ! &line[sizeof(STR_LIBRARY_NAMES) - 1]); ! if (! error && dlname && ! (last_libname = strrchr(dlname, ' ')) != NULL) { ! last_libname = strdup(last_libname + 1); ! free(dlname); ! dlname = last_libname; ! } ! } ! if (error) ! break; ! } ! fclose(file); ! lt_dlfree(line); ! /* allocate the handle */ ! handle = (lt_dlhandle) lt_dlmalloc(sizeof(lt_dlhandle_t)); ! if (!handle || error) { ! if (handle) ! lt_dlfree(handle); ! if (!error) ! last_error = LT_DLSTRERROR(NO_MEMORY); ! free_vars(dlname, old_name, libdir, deplibs); ! /* handle is already set to 0 */ ! goto cleanup; ! } ! handle->info.ref_count = 0; ! if (load_deplibs(handle, deplibs) == 0) { ! newhandle = handle; ! /* find_module may replace newhandle */ ! if (find_module(&newhandle, dir, libdir, ! dlname, old_name, installed)) { ! unload_deplibs(handle); ! error = 1; ! } ! } else ! error = 1; ! free_vars(dlname, old_name, libdir, deplibs); ! if (error) { ! lt_dlfree(handle); ! handle = 0; ! goto cleanup; ! } ! if (handle != newhandle) ! unload_deplibs(handle); ! } else { ! /* not a libtool module */ ! handle = (lt_dlhandle) lt_dlmalloc(sizeof(lt_dlhandle_t)); ! if (!handle) { ! last_error = LT_DLSTRERROR(NO_MEMORY); ! /* handle is already set to 0 */ ! goto cleanup; } ! handle->info.ref_count = 0; ! /* non-libtool modules don't have dependencies */ ! handle->depcount = 0; ! handle->deplibs = 0; ! newhandle = handle; ! if (tryall_dlopen(&newhandle, filename) ! && (dir ! || (!find_file(basename, user_search_path, ! 0, &newhandle) ! && !find_file(basename, ! getenv("LTDL_LIBRARY_PATH"), ! 0, &newhandle) #ifdef LTDL_SHLIBPATH_VAR ! && !find_file(basename, ! getenv(LTDL_SHLIBPATH_VAR), ! 0, &newhandle) #endif #ifdef LTDL_SYSSEARCHPATH ! && !find_file(basename, sys_search_path, ! 0, &newhandle) #endif ! ))) { ! lt_dlfree(handle); ! handle = 0; ! goto cleanup; ! } ! } ! register_handle: ! if (newhandle != handle) { ! lt_dlfree(handle); ! handle = newhandle; } ! if (!handle->info.ref_count) { ! handle->info.ref_count = 1; ! handle->info.name = name; ! handle->next = handles; ! handles = handle; ! name = 0; /* don't free this during `cleanup' */ } ! last_error = saved_error; ! cleanup: ! if (dir) ! lt_dlfree(dir); ! if (name) ! lt_dlfree(name); ! if (canonical) ! lt_dlfree(canonical); ! return handle; } lt_dlhandle lt_dlopenext (filename) ! const char *filename; { ! lt_dlhandle handle; ! char *tmp; ! int len; ! const char *saved_error = last_error; ! ! if (!filename) ! return lt_dlopen(filename); ! len = strlen(filename); ! if (!len) { ! last_error = LT_DLSTRERROR(FILE_NOT_FOUND); ! return 0; } ! /* try the normal file name */ ! handle = lt_dlopen(filename); ! if (handle) ! return handle; ! /* try "filename.la" */ ! tmp = (char*) lt_dlmalloc(len+4); ! if (!tmp) { ! last_error = LT_DLSTRERROR(NO_MEMORY); ! return 0; } ! strcpy(tmp, filename); ! strcat(tmp, ".la"); ! handle = lt_dlopen(tmp); ! if (handle) { ! last_error = saved_error; ! lt_dlfree(tmp); ! return handle; } ! #ifdef LTDL_SHLIB_EXT ! /* try "filename.EXT" */ ! if (strlen(shlib_ext) > 3) { ! lt_dlfree(tmp); ! tmp = (char*) lt_dlmalloc(len + strlen(shlib_ext) + 1); ! if (!tmp) { ! last_error = LT_DLSTRERROR(NO_MEMORY); ! return 0; ! } ! strcpy(tmp, filename); ! } else ! tmp[len] = '\0'; ! strcat(tmp, shlib_ext); ! handle = lt_dlopen(tmp); ! if (handle) { ! last_error = saved_error; ! lt_dlfree(tmp); ! return handle; } ! #endif ! last_error = LT_DLSTRERROR(FILE_NOT_FOUND); ! lt_dlfree(tmp); ! return 0; } int lt_dlclose (handle) ! lt_dlhandle handle; { ! lt_dlhandle cur, last; ! ! /* check whether the handle is valid */ ! last = cur = handles; ! while (cur && handle != cur) { ! last = cur; ! cur = cur->next; ! } ! if (!cur) { ! last_error = LT_DLSTRERROR(INVALID_HANDLE); ! return 1; } ! handle->info.ref_count--; ! if (!handle->info.ref_count) { ! int error; ! lt_dlloader_data_t data = handle->loader->dlloader_data; ! ! if (handle != handles) ! last->next = handle->next; ! else ! handles = handle->next; ! error = handle->loader->module_close(data, handle->module); ! error += unload_deplibs(handle); ! if (handle->info.filename) ! lt_dlfree(handle->info.filename); ! if (handle->info.name) ! lt_dlfree(handle->info.name); ! lt_dlfree(handle); ! return error; } ! return 0; } ! lt_ptr_t lt_dlsym (handle, symbol) ! lt_dlhandle handle; ! const char *symbol; { ! int lensym; ! char lsym[LTDL_SYMBOL_LENGTH]; ! char *sym; ! lt_ptr_t address; ! lt_dlloader_data_t data; ! if (!handle) { ! last_error = LT_DLSTRERROR(INVALID_HANDLE); ! return 0; } ! if (!symbol) { ! last_error = LT_DLSTRERROR(SYMBOL_NOT_FOUND); ! return 0; } ! lensym = strlen(symbol); ! if (handle->loader->sym_prefix) ! lensym += strlen(handle->loader->sym_prefix); ! if (handle->info.name) ! lensym += strlen(handle->info.name); ! if (lensym + LTDL_SYMBOL_OVERHEAD < LTDL_SYMBOL_LENGTH) ! sym = lsym; ! else ! sym = (char*) lt_dlmalloc(lensym + LTDL_SYMBOL_OVERHEAD + 1); ! if (!sym) { ! last_error = LT_DLSTRERROR(BUFFER_OVERFLOW); ! return 0; } ! data = handle->loader->dlloader_data; ! if (handle->info.name) { ! const char *saved_error = last_error; ! ! /* this is a libtool module */ ! if (handle->loader->sym_prefix) { ! strcpy(sym, handle->loader->sym_prefix); ! strcat(sym, handle->info.name); ! } else ! strcpy(sym, handle->info.name); ! strcat(sym, "_LTX_"); ! strcat(sym, symbol); ! /* try "modulename_LTX_symbol" */ ! address = handle->loader->find_sym(data, handle->module, sym); ! if (address) { ! if (sym != lsym) ! lt_dlfree(sym); ! return address; ! } ! last_error = saved_error; } ! /* otherwise try "symbol" */ ! if (handle->loader->sym_prefix) { ! strcpy(sym, handle->loader->sym_prefix); ! strcat(sym, symbol); ! } else ! strcpy(sym, symbol); ! address = handle->loader->find_sym(data, handle->module, sym); ! if (sym != lsym) ! lt_dlfree(sym); ! return address; } const char * ! lt_dlerror LTDL_PARAMS((void)) { ! const char *error = last_error; ! ! last_error = 0; ! return error; } int lt_dladdsearchdir (search_dir) ! const char *search_dir; { ! if (!search_dir || !strlen(search_dir)) ! return 0; ! if (!user_search_path) { ! user_search_path = strdup(search_dir); ! if (!user_search_path) { ! last_error = LT_DLSTRERROR(NO_MEMORY); ! return 1; ! } ! } else { ! char *new_search_path = (char*) ! lt_dlmalloc(strlen(user_search_path) + ! strlen(search_dir) + 2); /* ':' + '\0' == 2 */ ! if (!new_search_path) { ! last_error = LT_DLSTRERROR(NO_MEMORY); ! return 1; ! } ! sprintf (new_search_path, "%s%c%s", user_search_path, ! LTDL_PATHSEP_CHAR, search_dir); ! lt_dlfree(user_search_path); ! user_search_path = new_search_path; } ! return 0; } int lt_dlsetsearchpath (search_path) ! const char *search_path; { ! if (user_search_path) ! lt_dlfree(user_search_path); ! user_search_path = 0; /* reset the search path */ ! if (!search_path || !strlen(search_path)) ! return 0; ! user_search_path = strdup(search_path); ! if (!user_search_path) ! return 1; ! return 0; } const char * ! lt_dlgetsearchpath LTDL_PARAMS((void)) { ! return user_search_path; } const lt_dlinfo * lt_dlgetinfo (handle) ! lt_dlhandle handle; { ! if (!handle) { ! last_error = LT_DLSTRERROR(INVALID_HANDLE); ! return 0; ! } ! return &(handle->info); } int lt_dlforeach (func, data) ! int (*func) LTDL_PARAMS((lt_dlhandle handle, lt_ptr_t data)); ! lt_ptr_t data; { ! lt_dlhandle cur = handles; ! while (cur) { ! lt_dlhandle tmp = cur; ! cur = cur->next; ! if (func(tmp, data)) ! return 1; } ! return 0; } int lt_dlloader_add (place, dlloader, loader_name) ! lt_dlloader_t *place; ! const struct lt_user_dlloader *dlloader; ! const char *loader_name; { ! lt_dlloader_t *node = 0, *ptr = 0; ! ! if ((dlloader == 0) /* diagnose null parameters */ ! || (dlloader->module_open == 0) ! || (dlloader->module_close == 0) ! || (dlloader->find_sym == 0)) { ! last_error = LT_DLSTRERROR(INVALID_LOADER); ! return 1; ! } ! /* Create a new dlloader node with copies of the user callbacks. */ ! node = (lt_dlloader_t *) lt_dlmalloc (sizeof (lt_dlloader_t)); ! if (node == 0) { ! last_error = LT_DLSTRERROR(NO_MEMORY); ! return 1; } - node->next = 0; - node->loader_name = loader_name; - node->sym_prefix = dlloader->sym_prefix; - node->dlloader_exit = dlloader->dlloader_exit; - node->module_open = dlloader->module_open; - node->module_close = dlloader->module_close; - node->find_sym = dlloader->find_sym; - node->dlloader_data = dlloader->dlloader_data; - - if (!loaders) - /* If there are no loaders, NODE becomes the list! */ - loaders = node; - else if (!place) { - /* If PLACE is not set, add NODE to the end of the - LOADERS list. */ - for (ptr = loaders; ptr->next; ptr = ptr->next) - /*NOWORK*/; - ptr->next = node; - } else if (loaders == place) { - /* If PLACE is the first loader, NODE goes first. */ - node->next = place; - loaders = node; - } else { - /* Find the node immediately preceding PLACE. */ - for (ptr = loaders; ptr->next != place; ptr = ptr->next) - /*NOWORK*/; ! if (ptr->next != place) { ! last_error = LT_DLSTRERROR(INVALID_LOADER); ! return 1; ! } ! /* Insert NODE between PTR and PLACE. */ ! node->next = place; ! ptr->next = node; } ! return 0; } int lt_dlloader_remove (loader_name) ! const char *loader_name; { ! lt_dlloader_t *place = lt_dlloader_find (loader_name); ! lt_dlhandle handle; ! int result = 0; ! if (!place) { ! last_error = LT_DLSTRERROR(INVALID_LOADER); ! return 1; ! } ! /* Fail if there are any open modules which use this loader. */ ! for (handle = handles; handle; handle = handle->next) ! if (handle->loader == place) { ! last_error = LT_DLSTRERROR(REMOVE_LOADER); ! return 1; ! } ! ! if (place == loaders) ! /* PLACE is the first loader in the list. */ ! loaders = loaders->next; ! else { ! /* Find the loader before the one being removed. */ ! lt_dlloader_t *prev; ! for (prev = loaders; prev->next; prev = prev->next) ! if (!strcmp (prev->next->loader_name, loader_name)) ! break; ! place = prev->next; ! prev->next = prev->next->next; } ! if (place->dlloader_exit) ! result = place->dlloader_exit (place->dlloader_data); ! lt_dlfree (place); ! return result; } ! lt_dlloader_t * lt_dlloader_next (place) ! lt_dlloader_t *place; { ! return place ? place->next : loaders; } ! const char * lt_dlloader_name (place) ! lt_dlloader_t *place; ! { ! if (!place) ! last_error = LT_DLSTRERROR(INVALID_LOADER); ! return place ? place->loader_name : 0; ! } ! ! lt_dlloader_data_t * ! lt_dlloader_data (place) ! lt_dlloader_t *place; ! { ! if (!place) ! last_error = LT_DLSTRERROR(INVALID_LOADER); ! return place ? &(place->dlloader_data) : 0; ! } ! ! lt_dlloader_t * ! lt_dlloader_find (loader_name) ! const char *loader_name; { ! lt_dlloader_t *place = 0; ! for (place = loaders; place; place = place->next) ! if (strcmp (place->loader_name, loader_name) == 0) ! break; ! return place; } ! static const char **user_error_strings = 0; ! static int errorcode = LTDL_ERROR_MAX; ! ! int ! lt_dladderror (diagnostic) ! const char *diagnostic; { ! int index = errorcode - LTDL_ERROR_MAX; ! const char **temp = 0; ! ! /* realloc is not entirely portable, so simulate it using ! lt_dlmalloc and lt_dlfree. */ ! temp = (const char **) lt_dlmalloc ((1+index) * sizeof(const char*)); ! if (temp == 0) { ! last_error = LT_DLSTRERROR(NO_MEMORY); ! return -1; ! } ! /* Build the new vector in the memory addressed by temp. */ ! temp[index] = diagnostic; ! while (--index >= 0) ! temp[index] = user_error_strings[index]; ! lt_dlfree (user_error_strings); ! user_error_strings = temp; ! return errorcode++; } ! int ! lt_dlseterror (index) ! int index; { ! if (index >= errorcode || index < 0) { ! last_error = LT_DLSTRERROR(INVALID_ERRORCODE); ! return 1; } ! ! if (index < LTDL_ERROR_MAX) ! last_error = ltdl_error_strings[errorcode]; ! else ! last_error = user_error_strings[errorcode - LTDL_ERROR_MAX]; ! return 0; } --- 1520,4486 ---- #include #endif ! static lt_module sys_dld_open (loader_data, filename) ! lt_user_data loader_data; ! const char *filename; { ! lt_module module = strdup (filename); ! ! if (dld_link (filename) != 0) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); ! LT_DLFREE (module); ! module = 0; ! } ! ! return module; } static int sys_dld_close (loader_data, module) ! lt_user_data loader_data; ! lt_module module; { ! int errors = 0; ! ! if (dld_unlink_by_file ((char*)(module), 1) != 0) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); ! ++errors; ! } ! else ! { ! LT_DLFREE (module); ! } ! ! return errors; } ! static lt_ptr sys_dld_sym (loader_data, module, symbol) ! lt_user_data loader_data; ! lt_module module; ! const char *symbol; ! { ! lt_ptr address = dld_get_func (symbol); ! ! if (!address) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); ! } ! ! return address; ! } ! ! static struct lt_user_dlloader sys_dld = { ! 0, sys_dld_open, sys_dld_close, sys_dld_sym, 0, 0 ! }; ! ! #endif /* HAVE_DLD */ ! ! /* --- DYLD() MACOSX/DARWIN INTERFACE LOADER --- */ ! #if HAVE_DYLD ! ! ! #if HAVE_MACH_O_DYLD_H ! # include ! #endif ! #include ! ! /* We have to put some stuff here that isn't in older dyld.h files */ ! #ifndef ENUM_DYLD_BOOL ! # define ENUM_DYLD_BOOL ! # undef FALSE ! # undef TRUE ! enum DYLD_BOOL { ! FALSE, ! TRUE ! }; ! #endif ! #ifndef LC_REQ_DYLD ! # define LC_REQ_DYLD 0x80000000 ! #endif ! #ifndef LC_LOAD_WEAK_DYLIB ! # define LC_LOAD_WEAK_DYLIB (0x18 | LC_REQ_DYLD) ! #endif ! static const struct mach_header * (*ltdl_NSAddImage)(const char *image_name, unsigned long options) = 0; ! static NSSymbol (*ltdl_NSLookupSymbolInImage)(const struct mach_header *image,const char *symbolName, unsigned long options) = 0; ! static enum DYLD_BOOL (*ltdl_NSIsSymbolNameDefinedInImage)(const struct mach_header *image, const char *symbolName) = 0; ! static enum DYLD_BOOL (*ltdl_NSMakePrivateModulePublic)(NSModule module) = 0; ! ! #ifndef NSADDIMAGE_OPTION_NONE ! #define NSADDIMAGE_OPTION_NONE 0x0 ! #endif ! #ifndef NSADDIMAGE_OPTION_RETURN_ON_ERROR ! #define NSADDIMAGE_OPTION_RETURN_ON_ERROR 0x1 ! #endif ! #ifndef NSADDIMAGE_OPTION_WITH_SEARCHING ! #define NSADDIMAGE_OPTION_WITH_SEARCHING 0x2 ! #endif ! #ifndef NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED ! #define NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED 0x4 ! #endif ! #ifndef NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME ! #define NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME 0x8 ! #endif ! #ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_BIND ! #define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND 0x0 ! #endif ! #ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW ! #define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW 0x1 ! #endif ! #ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY ! #define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY 0x2 ! #endif ! #ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR ! #define NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR 0x4 ! #endif ! ! ! static const char * ! lt_int_dyld_error(othererror) ! char* othererror; ! { ! /* return the dyld error string, or the passed in error string if none */ ! NSLinkEditErrors ler; ! int lerno; ! const char *errstr; ! const char *file; ! NSLinkEditError(&ler,&lerno,&file,&errstr); ! if (!errstr || !strlen(errstr)) errstr = othererror; ! return errstr; ! } ! ! static const struct mach_header * ! lt_int_dyld_get_mach_header_from_nsmodule(module) ! NSModule module; ! { ! /* There should probably be an apple dyld api for this */ ! int i=_dyld_image_count(); ! int j; ! const char *modname=NSNameOfModule(module); ! const struct mach_header *mh=NULL; ! if (!modname) return NULL; ! for (j = 0; j < i; j++) ! { ! if (!strcmp(_dyld_get_image_name(j),modname)) ! { ! mh=_dyld_get_image_header(j); ! break; ! } ! } ! return mh; ! } ! ! static const char* lt_int_dyld_lib_install_name(mh) ! const struct mach_header *mh; ! { ! /* NSAddImage is also used to get the loaded image, but it only works if the lib ! is installed, for uninstalled libs we need to check the install_names against ! each other. Note that this is still broken if DYLD_IMAGE_SUFFIX is set and a ! different lib was loaded as a result ! */ ! int j; ! struct load_command *lc; ! unsigned long offset = sizeof(struct mach_header); ! const struct mach_header *mh1; ! const char* retStr=NULL; ! for (j = 0; j < mh->ncmds; j++) ! { ! lc = (struct load_command*)(((unsigned long)mh) + offset); ! if (LC_ID_DYLIB == lc->cmd) ! { ! retStr=(char*)(((struct dylib_command*)lc)->dylib.name.offset + ! (unsigned long)lc); ! } ! offset += lc->cmdsize; ! } ! return retStr; ! } ! ! static const struct mach_header * ! lt_int_dyld_match_loaded_lib_by_install_name(const char *name) ! { ! int i=_dyld_image_count(); ! int j; ! const struct mach_header *mh=NULL; ! const char *id=NULL; ! for (j = 0; j < i; j++) ! { ! id=lt_int_dyld_lib_install_name(_dyld_get_image_header(j)); ! if ((id) && (!strcmp(id,name))) ! { ! mh=_dyld_get_image_header(j); ! break; ! } ! } ! return mh; ! } ! ! static NSSymbol ! lt_int_dyld_NSlookupSymbolInLinkedLibs(symbol,mh) const char *symbol; + const struct mach_header *mh; { ! /* Safe to assume our mh is good */ ! int j; ! struct load_command *lc; ! unsigned long offset = sizeof(struct mach_header); ! NSSymbol retSym = 0; ! const struct mach_header *mh1; ! if ((ltdl_NSLookupSymbolInImage) && NSIsSymbolNameDefined(symbol) ) ! { ! for (j = 0; j < mh->ncmds; j++) ! { ! lc = (struct load_command*)(((unsigned long)mh) + offset); ! if ((LC_LOAD_DYLIB == lc->cmd) || (LC_LOAD_WEAK_DYLIB == lc->cmd)) ! { ! mh1=lt_int_dyld_match_loaded_lib_by_install_name((char*)(((struct dylib_command*)lc)->dylib.name.offset + ! (unsigned long)lc)); ! if (!mh1) ! { ! /* Maybe NSAddImage can find it */ ! mh1=ltdl_NSAddImage((char*)(((struct dylib_command*)lc)->dylib.name.offset + ! (unsigned long)lc), ! NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED + ! NSADDIMAGE_OPTION_WITH_SEARCHING + ! NSADDIMAGE_OPTION_RETURN_ON_ERROR ); ! } ! if (mh1) ! { ! retSym = ltdl_NSLookupSymbolInImage(mh1, ! symbol, ! NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW ! | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR ! ); ! if (retSym) break; ! } ! } ! offset += lc->cmdsize; ! } ! } ! return retSym; ! } ! static int ! sys_dyld_init() ! { ! int retCode = 0; ! int err = 0; ! if (!_dyld_present()) { ! retCode=1; ! } ! else { ! err = _dyld_func_lookup("__dyld_NSAddImage",(unsigned long*)<dl_NSAddImage); ! err = _dyld_func_lookup("__dyld_NSLookupSymbolInImage",(unsigned long*)<dl_NSLookupSymbolInImage); ! err = _dyld_func_lookup("__dyld_NSIsSymbolNameDefinedInImage",(unsigned long*)<dl_NSIsSymbolNameDefinedInImage); ! err = _dyld_func_lookup("__dyld_NSMakePrivateModulePublic",(unsigned long*)<dl_NSMakePrivateModulePublic); ! } ! return retCode; } ! static lt_module ! sys_dyld_open (loader_data, filename) ! lt_user_data loader_data; ! const char *filename; ! { ! lt_module module = 0; ! NSObjectFileImage ofi = 0; ! NSObjectFileImageReturnCode ofirc; ! ! if (!filename) ! return (lt_module)-1; ! ofirc = NSCreateObjectFileImageFromFile(filename, &ofi); ! switch (ofirc) ! { ! case NSObjectFileImageSuccess: ! module = NSLinkModule(ofi, filename, ! NSLINKMODULE_OPTION_RETURN_ON_ERROR ! | NSLINKMODULE_OPTION_PRIVATE ! | NSLINKMODULE_OPTION_BINDNOW); ! NSDestroyObjectFileImage(ofi); ! if (module) ! ltdl_NSMakePrivateModulePublic(module); ! break; ! case NSObjectFileImageInappropriateFile: ! if (ltdl_NSIsSymbolNameDefinedInImage && ltdl_NSLookupSymbolInImage) ! { ! module = (lt_module)ltdl_NSAddImage(filename, NSADDIMAGE_OPTION_RETURN_ON_ERROR); ! break; ! } ! default: ! LT_DLMUTEX_SETERROR (lt_int_dyld_error(LT_DLSTRERROR(CANNOT_OPEN))); ! return 0; ! } ! if (!module) LT_DLMUTEX_SETERROR (lt_int_dyld_error(LT_DLSTRERROR(CANNOT_OPEN))); ! return module; ! } + static int + sys_dyld_close (loader_data, module) + lt_user_data loader_data; + lt_module module; + { + int retCode = 0; + int flags = 0; + unsigned long size=0; + if (module == (lt_module)-1) return 0; + #ifdef __BIG_ENDIAN__ + if (((struct mach_header *)module)->magic == MH_MAGIC) + #else + if (((struct mach_header *)module)->magic == MH_CIGAM) + #endif + { + LT_DLMUTEX_SETERROR("Can not close a dylib"); + retCode = 1; + } + else + { + #if 1 + /* Currently, if a module contains c++ static destructors and it is unloaded, we + get a segfault in atexit(), due to compiler and dynamic loader differences of + opinion, this works around that. + */ + if ((const struct section *)NULL != + getsectbynamefromheader(lt_int_dyld_get_mach_header_from_nsmodule(module), + "__DATA","__mod_term_func")) + { + flags += NSUNLINKMODULE_OPTION_KEEP_MEMORY_MAPPED; + } + #endif + #ifdef __ppc__ + flags += NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES; #endif + if (!NSUnLinkModule(module,flags)) + { + retCode=1; + LT_DLMUTEX_SETERROR (lt_int_dyld_error(LT_DLSTRERROR(CANNOT_CLOSE))); + } + } + + return retCode; + } + + static lt_ptr + sys_dyld_sym (loader_data, module, symbol) + lt_user_data loader_data; + lt_module module; + const char *symbol; + { + lt_ptr address = 0; + NSSymbol *nssym = 0; + void *unused; + const struct mach_header *mh=NULL; + if (module == (lt_module)-1) + { + _dyld_lookup_and_bind(symbol,(unsigned long*)&address,&unused); + return address; + } + #ifdef __BIG_ENDIAN__ + if (((struct mach_header *)module)->magic == MH_MAGIC) + #else + if (((struct mach_header *)module)->magic == MH_CIGAM) + #endif + { + if (ltdl_NSIsSymbolNameDefinedInImage && ltdl_NSLookupSymbolInImage) + { + mh=module; + if (ltdl_NSIsSymbolNameDefinedInImage((struct mach_header*)module,symbol)) + { + nssym = ltdl_NSLookupSymbolInImage((struct mach_header*)module, + symbol, + NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW + | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR + ); + } + } + + } + else { + nssym = NSLookupSymbolInModule(module, symbol); + } + if (!nssym) + { + if (!mh) mh=lt_int_dyld_get_mach_header_from_nsmodule(module); + nssym = lt_int_dyld_NSlookupSymbolInLinkedLibs(symbol,mh); + } + if (!nssym) + { + LT_DLMUTEX_SETERROR (lt_int_dyld_error(LT_DLSTRERROR(SYMBOL_NOT_FOUND))); + return NULL; + } + return NSAddressOfSymbol(nssym); + } + + static struct lt_user_dlloader sys_dyld = + { "_", sys_dyld_open, sys_dyld_close, sys_dyld_sym, 0, 0 }; + + + #endif /* HAVE_DYLD */ + + + /* --- DLPREOPEN() INTERFACE LOADER --- */ + /* emulate dynamic linking using preloaded_symbols */ ! typedef struct lt_dlsymlists_t ! { ! struct lt_dlsymlists_t *next; ! const lt_dlsymlist *syms; } lt_dlsymlists_t; ! static const lt_dlsymlist *default_preloaded_symbols = 0; ! static lt_dlsymlists_t *preloaded_symbols = 0; static int presym_init (loader_data) ! lt_user_data loader_data; { ! int errors = 0; ! ! LT_DLMUTEX_LOCK (); ! ! preloaded_symbols = 0; ! if (default_preloaded_symbols) ! { ! errors = lt_dlpreload (default_preloaded_symbols); ! } ! ! LT_DLMUTEX_UNLOCK (); ! ! return errors; } static int ! presym_free_symlists () { ! lt_dlsymlists_t *lists; ! ! LT_DLMUTEX_LOCK (); ! ! lists = preloaded_symbols; ! while (lists) ! { ! lt_dlsymlists_t *tmp = lists; ! ! lists = lists->next; ! LT_DLFREE (tmp); ! } ! preloaded_symbols = 0; ! ! LT_DLMUTEX_UNLOCK (); ! ! return 0; } static int presym_exit (loader_data) ! lt_user_data loader_data; { ! presym_free_symlists (); ! return 0; } static int presym_add_symlist (preloaded) ! const lt_dlsymlist *preloaded; { ! lt_dlsymlists_t *tmp; ! lt_dlsymlists_t *lists; ! int errors = 0; ! LT_DLMUTEX_LOCK (); ! ! lists = preloaded_symbols; ! while (lists) ! { ! if (lists->syms == preloaded) ! { ! goto done; } ! lists = lists->next; ! } ! ! tmp = LT_EMALLOC (lt_dlsymlists_t, 1); ! if (tmp) ! { ! memset (tmp, 0, sizeof(lt_dlsymlists_t)); ! tmp->syms = preloaded; ! tmp->next = preloaded_symbols; ! preloaded_symbols = tmp; ! } ! else ! { ! ++errors; ! } ! ! done: ! LT_DLMUTEX_UNLOCK (); ! return errors; } ! static lt_module presym_open (loader_data, filename) ! lt_user_data loader_data; ! const char *filename; { ! lt_dlsymlists_t *lists; ! lt_module module = (lt_module) 0; ! LT_DLMUTEX_LOCK (); ! lists = preloaded_symbols; ! ! if (!lists) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_SYMBOLS)); ! goto done; ! } ! ! /* Can't use NULL as the reflective symbol header, as NULL is ! used to mark the end of the entire symbol list. Self-dlpreopened ! symbols follow this magic number, chosen to be an unlikely ! clash with a real module name. */ ! if (!filename) ! { ! filename = "@PROGRAM@"; ! } ! ! while (lists) ! { ! const lt_dlsymlist *syms = lists->syms; ! ! while (syms->name) ! { ! if (!syms->address && strcmp(syms->name, filename) == 0) ! { ! module = (lt_module) syms; ! goto done; ! } ! ++syms; } ! ! lists = lists->next; ! } ! ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); ! ! done: ! LT_DLMUTEX_UNLOCK (); ! return module; } static int presym_close (loader_data, module) ! lt_user_data loader_data; ! lt_module module; { ! /* Just to silence gcc -Wall */ ! module = 0; ! return 0; } ! static lt_ptr presym_sym (loader_data, module, symbol) ! lt_user_data loader_data; ! lt_module module; ! const char *symbol; { ! lt_dlsymlist *syms = (lt_dlsymlist*) module; ! ++syms; ! while (syms->address) ! { ! if (strcmp(syms->name, symbol) == 0) ! { ! return syms->address; } ! ! ++syms; ! } ! ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); ! ! return 0; } ! static struct lt_user_dlloader presym = { ! 0, presym_open, presym_close, presym_sym, presym_exit, 0 ! }; + + + /* --- DYNAMIC MODULE LOADING --- */ + + + /* The type of a function used at each iteration of foreach_dirinpath(). */ + typedef int foreach_callback_func LT_PARAMS((char *filename, lt_ptr data1, + lt_ptr data2)); + + static int foreach_dirinpath LT_PARAMS((const char *search_path, + const char *base_name, + foreach_callback_func *func, + lt_ptr data1, lt_ptr data2)); + + static int find_file_callback LT_PARAMS((char *filename, lt_ptr data, + lt_ptr ignored)); + static int find_handle_callback LT_PARAMS((char *filename, lt_ptr data, + lt_ptr ignored)); + static int foreachfile_callback LT_PARAMS((char *filename, lt_ptr data1, + lt_ptr data2)); + + + static int canonicalize_path LT_PARAMS((const char *path, + char **pcanonical)); + static int argzize_path LT_PARAMS((const char *path, + char **pargz, + size_t *pargz_len)); + static FILE *find_file LT_PARAMS((const char *search_path, + const char *base_name, + char **pdir)); + static lt_dlhandle *find_handle LT_PARAMS((const char *search_path, + const char *base_name, + lt_dlhandle *handle)); + static int find_module LT_PARAMS((lt_dlhandle *handle, + const char *dir, + const char *libdir, + const char *dlname, + const char *old_name, + int installed)); + static int free_vars LT_PARAMS((char *dlname, char *oldname, + char *libdir, char *deplibs)); + static int load_deplibs LT_PARAMS((lt_dlhandle handle, + char *deplibs)); + static int trim LT_PARAMS((char **dest, + const char *str)); + static int try_dlopen LT_PARAMS((lt_dlhandle *handle, + const char *filename)); + static int tryall_dlopen LT_PARAMS((lt_dlhandle *handle, + const char *filename)); + static int unload_deplibs LT_PARAMS((lt_dlhandle handle)); + static int lt_argz_insert LT_PARAMS((char **pargz, + size_t *pargz_len, + char *before, + const char *entry)); + static int lt_argz_insertinorder LT_PARAMS((char **pargz, + size_t *pargz_len, + const char *entry)); + static int lt_argz_insertdir LT_PARAMS((char **pargz, + size_t *pargz_len, + const char *dirnam, + struct dirent *dp)); + static int lt_dlpath_insertdir LT_PARAMS((char **ppath, + char *before, + const char *dir)); + static int list_files_by_dir LT_PARAMS((const char *dirnam, + char **pargz, + size_t *pargz_len)); + static int file_not_found LT_PARAMS((void)); + + static char *user_search_path= 0; + static lt_dlloader *loaders = 0; + static lt_dlhandle handles = 0; + static int initialized = 0; + + /* Initialize libltdl. */ int ! lt_dlinit () { ! int errors = 0; ! LT_DLMUTEX_LOCK (); ! ! /* Initialize only at first call. */ ! if (++initialized == 1) ! { ! handles = 0; ! user_search_path = 0; /* empty search path */ ! ! #if HAVE_LIBDL ! errors += lt_dlloader_add (lt_dlloader_next (0), &sys_dl, "dlopen"); ! #endif #if HAVE_SHL_LOAD ! errors += lt_dlloader_add (lt_dlloader_next (0), &sys_shl, "dlopen"); #endif ! #ifdef __WINDOWS__ ! errors += lt_dlloader_add (lt_dlloader_next (0), &sys_wll, "dlopen"); #endif #ifdef __BEOS__ ! errors += lt_dlloader_add (lt_dlloader_next (0), &sys_bedl, "dlopen"); #endif #if HAVE_DLD ! errors += lt_dlloader_add (lt_dlloader_next (0), &sys_dld, "dld"); #endif ! #if HAVE_DYLD ! errors += lt_dlloader_add (lt_dlloader_next (0), &sys_dyld, "dyld"); ! errors += sys_dyld_init(); ! #endif ! errors += lt_dlloader_add (lt_dlloader_next (0), &presym, "dlpreload"); ! if (presym_init (presym.dlloader_data)) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INIT_LOADER)); ! ++errors; } ! else if (errors != 0) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (DLOPEN_NOT_SUPPORTED)); ! ++errors; ! } ! } ! ! LT_DLMUTEX_UNLOCK (); ! ! return errors; } int lt_dlpreload (preloaded) ! const lt_dlsymlist *preloaded; { ! int errors = 0; ! ! if (preloaded) ! { ! errors = presym_add_symlist (preloaded); ! } ! else ! { ! presym_free_symlists(); ! ! LT_DLMUTEX_LOCK (); ! if (default_preloaded_symbols) ! { ! errors = lt_dlpreload (default_preloaded_symbols); ! } ! LT_DLMUTEX_UNLOCK (); ! } ! ! return errors; } int lt_dlpreload_default (preloaded) ! const lt_dlsymlist *preloaded; { ! LT_DLMUTEX_LOCK (); ! default_preloaded_symbols = preloaded; ! LT_DLMUTEX_UNLOCK (); ! return 0; } int ! lt_dlexit () { ! /* shut down libltdl */ ! lt_dlloader *loader; ! int errors = 0; ! ! LT_DLMUTEX_LOCK (); ! loader = loaders; ! ! if (!initialized) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SHUTDOWN)); ! ++errors; ! goto done; ! } ! ! /* shut down only at last call. */ ! if (--initialized == 0) ! { ! int level; ! ! while (handles && LT_DLIS_RESIDENT (handles)) ! { ! handles = handles->next; } ! ! /* close all modules */ ! for (level = 1; handles; ++level) ! { ! lt_dlhandle cur = handles; ! int saw_nonresident = 0; ! ! while (cur) ! { ! lt_dlhandle tmp = cur; ! cur = cur->next; ! if (!LT_DLIS_RESIDENT (tmp)) ! saw_nonresident = 1; ! if (!LT_DLIS_RESIDENT (tmp) && tmp->info.ref_count <= level) ! { ! if (lt_dlclose (tmp)) ! { ! ++errors; ! } } + } + /* done if only resident modules are left */ + if (!saw_nonresident) + break; } ! ! /* close all loaders */ ! while (loader) ! { ! lt_dlloader *next = loader->next; ! lt_user_data data = loader->dlloader_data; ! if (loader->dlloader_exit && loader->dlloader_exit (data)) ! { ! ++errors; ! } ! ! LT_DLMEM_REASSIGN (loader, next); } + loaders = 0; + } ! done: ! LT_DLMUTEX_UNLOCK (); ! return errors; } static int tryall_dlopen (handle, filename) ! lt_dlhandle *handle; ! const char *filename; { ! lt_dlhandle cur; ! lt_dlloader *loader; ! const char *saved_error; ! int errors = 0; ! ! LT_DLMUTEX_GETERROR (saved_error); ! LT_DLMUTEX_LOCK (); ! ! cur = handles; ! loader = loaders; ! ! /* check whether the module was already opened */ ! while (cur) ! { ! /* try to dlopen the program itself? */ ! if (!cur->info.filename && !filename) ! { ! break; } ! if (cur->info.filename && filename ! && strcmp (cur->info.filename, filename) == 0) ! { ! break; } ! ! cur = cur->next; ! } ! ! if (cur) ! { ! ++cur->info.ref_count; ! *handle = cur; ! goto done; ! } ! ! cur = *handle; ! if (filename) ! { ! /* Comment out the check of file permissions using access. ! This call seems to always return -1 with error EACCES. ! */ ! /* We need to catch missing file errors early so that ! file_not_found() can detect what happened. ! if (access (filename, R_OK) != 0) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); ! ++errors; ! goto done; ! } */ ! ! cur->info.filename = lt_estrdup (filename); ! if (!cur->info.filename) ! { ! ++errors; ! goto done; } ! } ! else ! { ! cur->info.filename = 0; ! } ! ! while (loader) ! { ! lt_user_data data = loader->dlloader_data; ! ! cur->module = loader->module_open (data, filename); ! ! if (cur->module != 0) ! { ! break; } ! loader = loader->next; ! } ! ! if (!loader) ! { ! LT_DLFREE (cur->info.filename); ! ++errors; ! goto done; ! } ! ! cur->loader = loader; ! LT_DLMUTEX_SETERROR (saved_error); ! ! done: ! LT_DLMUTEX_UNLOCK (); ! ! return errors; ! } ! ! static int ! tryall_dlopen_module (handle, prefix, dirname, dlname) ! lt_dlhandle *handle; ! const char *prefix; ! const char *dirname; ! const char *dlname; ! { ! int error = 0; ! char *filename = 0; ! size_t filename_len = 0; ! size_t dirname_len = LT_STRLEN (dirname); ! ! assert (handle); ! assert (dirname); ! assert (dlname); ! #ifdef LT_DIRSEP_CHAR ! /* Only canonicalized names (i.e. with DIRSEP chars already converted) ! should make it into this function: */ ! assert (strchr (dirname, LT_DIRSEP_CHAR) == 0); ! #endif ! ! if (dirname_len > 0) ! if (dirname[dirname_len -1] == '/') ! --dirname_len; ! filename_len = dirname_len + 1 + LT_STRLEN (dlname); ! ! /* Allocate memory, and combine DIRNAME and MODULENAME into it. ! The PREFIX (if any) is handled below. */ ! filename = LT_EMALLOC (char, dirname_len + 1 + filename_len + 1); ! if (!filename) ! return 1; ! ! sprintf (filename, "%.*s/%s", (int) dirname_len, dirname, dlname); ! ! /* Now that we have combined DIRNAME and MODULENAME, if there is ! also a PREFIX to contend with, simply recurse with the arguments ! shuffled. Otherwise, attempt to open FILENAME as a module. */ ! if (prefix) ! { ! error += tryall_dlopen_module (handle, ! (const char *) 0, prefix, filename); ! } ! else if (tryall_dlopen (handle, filename) != 0) ! { ! ++error; ! } ! ! LT_DLFREE (filename); ! return error; } static int find_module (handle, dir, libdir, dlname, old_name, installed) ! lt_dlhandle *handle; ! const char *dir; ! const char *libdir; ! const char *dlname; ! const char *old_name; ! int installed; { ! /* Try to open the old library first; if it was dlpreopened, ! we want the preopened version of it, even if a dlopenable ! module is available. */ ! if (old_name && tryall_dlopen (handle, old_name) == 0) ! { ! return 0; ! } ! /* Try to open the dynamic library. */ ! if (dlname) ! { ! /* try to open the installed module */ ! if (installed && libdir) ! { ! if (tryall_dlopen_module (handle, ! (const char *) 0, libdir, dlname) == 0) ! return 0; } ! ! /* try to open the not-installed module */ ! if (!installed) ! { ! if (tryall_dlopen_module (handle, dir, objdir, dlname) == 0) ! return 0; ! } ! ! /* maybe it was moved to another directory */ ! { ! if (tryall_dlopen_module (handle, ! (const char *) 0, dir, dlname) == 0) ! return 0; ! } ! } ! ! return 1; } ! ! static int ! canonicalize_path (path, pcanonical) ! const char *path; ! char **pcanonical; { ! char *canonical = 0; ! ! assert (path && *path); ! assert (pcanonical); ! ! canonical = LT_EMALLOC (char, 1+ LT_STRLEN (path)); ! if (!canonical) ! return 1; ! ! { ! size_t dest = 0; ! size_t src; ! for (src = 0; path[src] != LT_EOS_CHAR; ++src) ! { ! /* Path separators are not copied to the beginning or end of ! the destination, or if another separator would follow ! immediately. */ ! if (path[src] == LT_PATHSEP_CHAR) ! { ! if ((dest == 0) ! || (path[1+ src] == LT_PATHSEP_CHAR) ! || (path[1+ src] == LT_EOS_CHAR)) ! continue; ! } ! ! /* Anything other than a directory separator is copied verbatim. */ ! if ((path[src] != '/') ! #ifdef LT_DIRSEP_CHAR ! && (path[src] != LT_DIRSEP_CHAR) #endif ! ) ! { ! canonical[dest++] = path[src]; ! } ! /* Directory separators are converted and copied only if they are ! not at the end of a path -- i.e. before a path separator or ! NULL terminator. */ ! else if ((path[1+ src] != LT_PATHSEP_CHAR) ! && (path[1+ src] != LT_EOS_CHAR) ! #ifdef LT_DIRSEP_CHAR ! && (path[1+ src] != LT_DIRSEP_CHAR) ! #endif ! && (path[1+ src] != '/')) ! { ! canonical[dest++] = '/'; ! } ! } ! /* Add an end-of-string marker at the end. */ ! canonical[dest] = LT_EOS_CHAR; ! } ! ! /* Assign new value. */ ! *pcanonical = canonical; ! ! return 0; } ! static int ! argzize_path (path, pargz, pargz_len) ! const char *path; ! char **pargz; ! size_t *pargz_len; { ! error_t error; ! assert (path); ! assert (pargz); ! assert (pargz_len); ! if ((error = argz_create_sep (path, LT_PATHSEP_CHAR, pargz, pargz_len))) ! { ! switch (error) ! { ! case ENOMEM: ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! break; ! default: ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (UNKNOWN)); ! break; } ! ! return 1; ! } ! ! return 0; } + /* Repeatedly call FUNC with each LT_PATHSEP_CHAR delimited element + of SEARCH_PATH and references to DATA1 and DATA2, until FUNC returns + non-zero or all elements are exhausted. If BASE_NAME is non-NULL, + it is appended to each SEARCH_PATH element before FUNC is called. */ static int ! foreach_dirinpath (search_path, base_name, func, data1, data2) ! const char *search_path; ! const char *base_name; ! foreach_callback_func *func; ! lt_ptr data1; ! lt_ptr data2; { ! int result = 0; ! int filenamesize = 0; ! size_t lenbase = LT_STRLEN (base_name); ! size_t argz_len = 0; ! char *argz = 0; ! char *filename = 0; ! char *canonical = 0; ! LT_DLMUTEX_LOCK (); ! ! if (!search_path || !*search_path) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); ! goto cleanup; ! } ! ! if (canonicalize_path (search_path, &canonical) != 0) ! goto cleanup; ! ! if (argzize_path (canonical, &argz, &argz_len) != 0) ! goto cleanup; ! ! { ! char *dir_name = 0; ! while ((dir_name = argz_next (argz, argz_len, dir_name))) ! { ! size_t lendir = LT_STRLEN (dir_name); ! ! if (lendir +1 +lenbase >= filenamesize) ! { ! LT_DLFREE (filename); ! filenamesize = lendir +1 +lenbase +1; /* "/d" + '/' + "f" + '\0' */ ! filename = LT_EMALLOC (char, filenamesize); ! if (!filename) ! goto cleanup; } ! ! assert (filenamesize > lendir); ! strcpy (filename, dir_name); ! ! if (base_name && *base_name) ! { ! if (filename[lendir -1] != '/') ! filename[lendir++] = '/'; ! strcpy (filename +lendir, base_name); ! } ! ! if ((result = (*func) (filename, data1, data2))) ! { ! break; ! } ! } ! } ! ! cleanup: ! LT_DLFREE (argz); ! LT_DLFREE (canonical); ! LT_DLFREE (filename); ! ! LT_DLMUTEX_UNLOCK (); ! ! return result; ! } ! ! /* If FILEPATH can be opened, store the name of the directory component ! in DATA1, and the opened FILE* structure address in DATA2. Otherwise ! DATA1 is unchanged, but DATA2 is set to a pointer to NULL. */ ! static int ! find_file_callback (filename, data1, data2) ! char *filename; ! lt_ptr data1; ! lt_ptr data2; ! { ! char **pdir = (char **) data1; ! FILE **pfile = (FILE **) data2; ! int is_done = 0; ! ! assert (filename && *filename); ! assert (pdir); ! assert (pfile); ! ! if ((*pfile = fopen (filename, LT_READTEXT_MODE))) ! { ! char *dirend = strrchr (filename, '/'); ! ! if (dirend > filename) ! *dirend = LT_EOS_CHAR; ! ! LT_DLFREE (*pdir); ! *pdir = lt_estrdup (filename); ! is_done = (*pdir == 0) ? -1 : 1; ! } ! ! return is_done; ! } ! ! static FILE * ! find_file (search_path, base_name, pdir) ! const char *search_path; ! const char *base_name; ! char **pdir; ! { ! FILE *file = 0; ! ! foreach_dirinpath (search_path, base_name, find_file_callback, pdir, &file); ! ! return file; ! } ! ! static int ! find_handle_callback (filename, data, ignored) ! char *filename; ! lt_ptr data; ! lt_ptr ignored; ! { ! lt_dlhandle *handle = (lt_dlhandle *) data; ! int notfound = access (filename, R_OK); ! ! /* Bail out if file cannot be read... */ ! if (notfound) ! return 0; ! ! /* Try to dlopen the file, but do not continue searching in any ! case. */ ! if (tryall_dlopen (handle, filename) != 0) ! *handle = 0; ! ! return 1; ! } ! ! /* If HANDLE was found return it, otherwise return 0. If HANDLE was ! found but could not be opened, *HANDLE will be set to 0. */ ! static lt_dlhandle * ! find_handle (search_path, base_name, handle) ! const char *search_path; ! const char *base_name; ! lt_dlhandle *handle; ! { ! if (!search_path) ! return 0; ! ! if (!foreach_dirinpath (search_path, base_name, find_handle_callback, ! handle, 0)) ! return 0; ! ! return handle; ! } ! ! static int ! load_deplibs (handle, deplibs) ! lt_dlhandle handle; ! char *deplibs; ! { ! #if LTDL_DLOPEN_DEPLIBS ! char *p, *save_search_path = 0; ! int depcount = 0; ! int i; ! char **names = 0; ! #endif ! int errors = 0; ! ! handle->depcount = 0; ! ! #if LTDL_DLOPEN_DEPLIBS ! if (!deplibs) ! { ! return errors; ! } ! ++errors; ! ! LT_DLMUTEX_LOCK (); ! if (user_search_path) ! { ! save_search_path = lt_estrdup (user_search_path); ! if (!save_search_path) ! goto cleanup; ! } ! ! /* extract search paths and count deplibs */ ! p = deplibs; ! while (*p) ! { ! if (!isspace ((int) *p)) ! { ! char *end = p+1; ! while (*end && !isspace((int) *end)) ! { ! ++end; ! } ! ! if (strncmp(p, "-L", 2) == 0 || strncmp(p, "-R", 2) == 0) ! { ! char save = *end; ! *end = 0; /* set a temporary string terminator */ ! if (lt_dladdsearchdir(p+2)) ! { ! goto cleanup; ! } ! *end = save; ! } ! else ! { ! ++depcount; ! } ! ! p = end; } ! else ! { ! ++p; } ! } ! ! /* restore the old search path */ ! LT_DLFREE (user_search_path); ! user_search_path = save_search_path; ! ! LT_DLMUTEX_UNLOCK (); ! ! if (!depcount) ! { ! errors = 0; ! goto cleanup; ! } ! ! names = LT_EMALLOC (char *, depcount * sizeof (char*)); ! if (!names) ! goto cleanup; ! ! /* now only extract the actual deplibs */ ! depcount = 0; ! p = deplibs; ! while (*p) ! { ! if (isspace ((int) *p)) ! { ! ++p; } ! else ! { ! char *end = p+1; ! while (*end && !isspace ((int) *end)) ! { ! ++end; ! } ! ! if (strncmp(p, "-L", 2) != 0 && strncmp(p, "-R", 2) != 0) ! { ! char *name; ! char save = *end; ! *end = 0; /* set a temporary string terminator */ ! if (strncmp(p, "-l", 2) == 0) ! { ! size_t name_len = 3+ /* "lib" */ LT_STRLEN (p + 2); ! name = LT_EMALLOC (char, 1+ name_len); ! if (name) ! sprintf (name, "lib%s", p+2); } ! else ! name = lt_estrdup(p); ! ! if (!name) ! goto cleanup_names; ! ! names[depcount++] = name; ! *end = save; ! } ! p = end; } ! } ! ! /* load the deplibs (in reverse order) ! At this stage, don't worry if the deplibs do not load correctly, ! they may already be statically linked into the loading application ! for instance. There will be a more enlightening error message ! later on if the loaded module cannot resolve all of its symbols. */ ! if (depcount) ! { ! int j = 0; ! ! handle->deplibs = (lt_dlhandle*) LT_EMALLOC (lt_dlhandle *, depcount); ! if (!handle->deplibs) ! goto cleanup; ! ! for (i = 0; i < depcount; ++i) ! { ! handle->deplibs[j] = lt_dlopenext(names[depcount-1-i]); ! if (handle->deplibs[j]) ! { ! ++j; ! } ! } ! ! handle->depcount = j; /* Number of successfully loaded deplibs */ ! errors = 0; ! } ! ! cleanup_names: ! for (i = 0; i < depcount; ++i) ! { ! LT_DLFREE (names[i]); ! } ! ! cleanup: ! LT_DLFREE (names); ! #endif ! ! return errors; } static int ! unload_deplibs (handle) ! lt_dlhandle handle; { ! int i; ! int errors = 0; ! ! if (handle->depcount) ! { ! for (i = 0; i < handle->depcount; ++i) ! { ! if (!LT_DLIS_RESIDENT (handle->deplibs[i])) ! { ! errors += lt_dlclose (handle->deplibs[i]); ! } ! } ! } ! ! return errors; } ! static int trim (dest, str) ! char **dest; ! const char *str; { ! /* remove the leading and trailing "'" from str ! and store the result in dest */ ! const char *end = strrchr (str, '\''); ! size_t len = LT_STRLEN (str); ! char *tmp; ! LT_DLFREE (*dest); ! ! if (len > 3 && str[0] == '\'') ! { ! tmp = LT_EMALLOC (char, end - str); ! if (!tmp) ! return 1; ! ! strncpy(tmp, &str[1], (end - str) - 1); ! tmp[len-3] = LT_EOS_CHAR; ! *dest = tmp; ! } ! else ! { ! *dest = 0; ! } ! ! return 0; } ! static int ! free_vars (dlname, oldname, libdir, deplibs) ! char *dlname; ! char *oldname; ! char *libdir; ! char *deplibs; { ! LT_DLFREE (dlname); ! LT_DLFREE (oldname); ! LT_DLFREE (libdir); ! LT_DLFREE (deplibs); ! ! return 0; } ! static int ! try_dlopen (phandle, filename) ! lt_dlhandle *phandle; ! const char *filename; { ! const char * ext = 0; ! const char * saved_error = 0; ! char * canonical = 0; ! char * base_name = 0; ! char * dir = 0; ! char * name = 0; ! int errors = 0; ! lt_dlhandle newhandle; ! ! assert (phandle); ! assert (*phandle == 0); ! ! LT_DLMUTEX_GETERROR (saved_error); ! ! /* dlopen self? */ ! if (!filename) ! { ! *phandle = (lt_dlhandle) LT_EMALLOC (struct lt_dlhandle_struct, 1); ! if (*phandle == 0) ! return 1; ! ! memset (*phandle, 0, sizeof(struct lt_dlhandle_struct)); ! newhandle = *phandle; ! ! /* lt_dlclose()ing yourself is very bad! Disallow it. */ ! LT_DLSET_FLAG (*phandle, LT_DLRESIDENT_FLAG); ! ! if (tryall_dlopen (&newhandle, 0) != 0) ! { ! LT_DLFREE (*phandle); ! return 1; } ! ! goto register_handle; ! } ! ! assert (filename && *filename); ! ! /* Doing this immediately allows internal functions to safely ! assume only canonicalized paths are passed. */ ! if (canonicalize_path (filename, &canonical) != 0) ! { ! ++errors; ! goto cleanup; ! } ! ! /* If the canonical module name is a path (relative or absolute) ! then split it into a directory part and a name part. */ ! base_name = strrchr (canonical, '/'); ! if (base_name) ! { ! size_t dirlen = (1+ base_name) - canonical; ! ! dir = LT_EMALLOC (char, 1+ dirlen); ! if (!dir) ! { ! ++errors; ! goto cleanup; } ! strncpy (dir, canonical, dirlen); ! dir[dirlen] = LT_EOS_CHAR; ! ! ++base_name; ! } ! else ! LT_DLMEM_REASSIGN (base_name, canonical); ! ! assert (base_name && *base_name); ! ! /* Check whether we are opening a libtool module (.la extension). */ ! ext = strrchr (base_name, '.'); ! if (ext && strcmp (ext, archive_ext) == 0) ! { ! /* this seems to be a libtool module */ ! FILE * file = 0; ! char * dlname = 0; ! char * old_name = 0; ! char * libdir = 0; ! char * deplibs = 0; ! char * line = 0; ! size_t line_len; ! ! /* if we can't find the installed flag, it is probably an ! installed libtool archive, produced with an old version ! of libtool */ ! int installed = 1; ! ! /* extract the module name from the file name */ ! name = LT_EMALLOC (char, ext - base_name + 1); ! if (!name) ! { ! ++errors; ! goto cleanup; ! } ! ! /* canonicalize the module name */ ! { ! size_t i; ! for (i = 0; i < ext - base_name; ++i) ! { ! if (isalnum ((int)(base_name[i]))) ! { ! name[i] = base_name[i]; ! } ! else ! { ! name[i] = '_'; ! } ! } ! name[ext - base_name] = LT_EOS_CHAR; ! } ! ! /* Now try to open the .la file. If there is no directory name ! component, try to find it first in user_search_path and then other ! prescribed paths. Otherwise (or in any case if the module was not ! yet found) try opening just the module name as passed. */ ! if (!dir) ! { ! const char *search_path; ! ! LT_DLMUTEX_LOCK (); ! search_path = user_search_path; ! if (search_path) ! file = find_file (user_search_path, base_name, &dir); ! LT_DLMUTEX_UNLOCK (); ! ! if (!file) ! { ! search_path = getenv (LTDL_SEARCHPATH_VAR); ! if (search_path) ! file = find_file (search_path, base_name, &dir); ! } ! #ifdef LTDL_SHLIBPATH_VAR ! if (!file) ! { ! search_path = getenv (LTDL_SHLIBPATH_VAR); ! if (search_path) ! file = find_file (search_path, base_name, &dir); ! } #endif #ifdef LTDL_SYSSEARCHPATH ! if (!file && sys_search_path) ! { ! file = find_file (sys_search_path, base_name, &dir); ! } #endif + } + if (!file) + { + file = fopen (filename, LT_READTEXT_MODE); + } + + /* If we didn't find the file by now, it really isn't there. Set + the status flag, and bail out. */ + if (!file) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); + ++errors; + goto cleanup; + } + + line_len = LT_FILENAME_MAX; + line = LT_EMALLOC (char, line_len); + if (!line) + { + fclose (file); + ++errors; + goto cleanup; + } + + /* read the .la file */ + while (!feof (file)) + { + if (!fgets (line, (int) line_len, file)) + { + break; + } + + /* Handle the case where we occasionally need to read a line + that is longer than the initial buffer size. */ + while ((line[LT_STRLEN(line) -1] != '\n') && (!feof (file))) + { + line = LT_DLREALLOC (char, line, line_len *2); + if (!fgets (&line[line_len -1], (int) line_len +1, file)) + { + break; } ! line_len *= 2; ! } ! ! if (line[0] == '\n' || line[0] == '#') ! { ! continue; ! } ! ! #undef STR_DLNAME ! #define STR_DLNAME "dlname=" ! if (strncmp (line, STR_DLNAME, sizeof (STR_DLNAME) - 1) == 0) ! { ! errors += trim (&dlname, &line[sizeof (STR_DLNAME) - 1]); ! } ! ! #undef STR_OLD_LIBRARY ! #define STR_OLD_LIBRARY "old_library=" ! else if (strncmp (line, STR_OLD_LIBRARY, ! sizeof (STR_OLD_LIBRARY) - 1) == 0) ! { ! errors += trim (&old_name, &line[sizeof (STR_OLD_LIBRARY) - 1]); ! } ! #undef STR_LIBDIR ! #define STR_LIBDIR "libdir=" ! else if (strncmp (line, STR_LIBDIR, sizeof (STR_LIBDIR) - 1) == 0) ! { ! errors += trim (&libdir, &line[sizeof(STR_LIBDIR) - 1]); ! } ! ! #undef STR_DL_DEPLIBS ! #define STR_DL_DEPLIBS "dependency_libs=" ! else if (strncmp (line, STR_DL_DEPLIBS, ! sizeof (STR_DL_DEPLIBS) - 1) == 0) ! { ! errors += trim (&deplibs, &line[sizeof (STR_DL_DEPLIBS) - 1]); ! } ! else if (strcmp (line, "installed=yes\n") == 0) ! { ! installed = 1; ! } ! else if (strcmp (line, "installed=no\n") == 0) ! { ! installed = 0; ! } ! ! #undef STR_LIBRARY_NAMES ! #define STR_LIBRARY_NAMES "library_names=" ! else if (! dlname && strncmp (line, STR_LIBRARY_NAMES, ! sizeof (STR_LIBRARY_NAMES) - 1) == 0) ! { ! char *last_libname; ! errors += trim (&dlname, &line[sizeof (STR_LIBRARY_NAMES) - 1]); ! if (!errors ! && dlname ! && (last_libname = strrchr (dlname, ' ')) != 0) ! { ! last_libname = lt_estrdup (last_libname + 1); ! if (!last_libname) ! { ! ++errors; ! goto cleanup; ! } ! LT_DLMEM_REASSIGN (dlname, last_libname); } ! } ! ! if (errors) ! break; ! } ! ! fclose (file); ! LT_DLFREE (line); ! ! /* allocate the handle */ ! *phandle = (lt_dlhandle) LT_EMALLOC (struct lt_dlhandle_struct, 1); ! if (*phandle == 0) ! ++errors; ! ! if (errors) ! { ! free_vars (dlname, old_name, libdir, deplibs); ! LT_DLFREE (*phandle); ! goto cleanup; ! } ! ! assert (*phandle); ! ! memset (*phandle, 0, sizeof(struct lt_dlhandle_struct)); ! if (load_deplibs (*phandle, deplibs) == 0) ! { ! newhandle = *phandle; ! /* find_module may replace newhandle */ ! if (find_module (&newhandle, dir, libdir, dlname, old_name, installed)) ! { ! unload_deplibs (*phandle); ! ++errors; ! } ! } ! else ! { ! ++errors; ! } ! ! free_vars (dlname, old_name, libdir, deplibs); ! if (errors) ! { ! LT_DLFREE (*phandle); ! goto cleanup; ! } ! ! if (*phandle != newhandle) ! { ! unload_deplibs (*phandle); ! } ! } ! else ! { ! /* not a libtool module */ ! *phandle = (lt_dlhandle) LT_EMALLOC (struct lt_dlhandle_struct, 1); ! if (*phandle == 0) ! { ! ++errors; ! goto cleanup; ! } ! ! memset (*phandle, 0, sizeof (struct lt_dlhandle_struct)); ! newhandle = *phandle; ! ! /* If the module has no directory name component, try to find it ! first in user_search_path and then other prescribed paths. ! Otherwise (or in any case if the module was not yet found) try ! opening just the module name as passed. */ ! if ((dir || (!find_handle (user_search_path, base_name, &newhandle) ! && !find_handle (getenv (LTDL_SEARCHPATH_VAR), base_name, ! &newhandle) #ifdef LTDL_SHLIBPATH_VAR ! && !find_handle (getenv (LTDL_SHLIBPATH_VAR), base_name, ! &newhandle) #endif #ifdef LTDL_SYSSEARCHPATH ! && !find_handle (sys_search_path, base_name, &newhandle) #endif ! ))) ! { ! if (tryall_dlopen (&newhandle, filename) != 0) ! { ! newhandle = NULL; ! } } ! ! if (!newhandle) ! { ! LT_DLFREE (*phandle); ! ++errors; ! goto cleanup; } ! } ! ! register_handle: ! LT_DLMEM_REASSIGN (*phandle, newhandle); ! ! if ((*phandle)->info.ref_count == 0) ! { ! (*phandle)->info.ref_count = 1; ! LT_DLMEM_REASSIGN ((*phandle)->info.name, name); ! ! LT_DLMUTEX_LOCK (); ! (*phandle)->next = handles; ! handles = *phandle; ! LT_DLMUTEX_UNLOCK (); ! } ! ! LT_DLMUTEX_SETERROR (saved_error); ! ! cleanup: ! LT_DLFREE (dir); ! LT_DLFREE (name); ! LT_DLFREE (canonical); ! ! return errors; ! } ! ! lt_dlhandle ! lt_dlopen (filename) ! const char *filename; ! { ! lt_dlhandle handle = 0; ! ! /* Just incase we missed a code path in try_dlopen() that reports ! an error, but forgets to reset handle... */ ! if (try_dlopen (&handle, filename) != 0) ! return 0; ! ! return handle; ! } ! ! /* If the last error messge store was `FILE_NOT_FOUND', then return ! non-zero. */ ! static int ! file_not_found () ! { ! const char *error = 0; ! ! LT_DLMUTEX_GETERROR (error); ! if (error == LT_DLSTRERROR (FILE_NOT_FOUND)) ! return 1; ! ! return 0; } + /* If FILENAME has an ARCHIVE_EXT or SHLIB_EXT extension, try to + open the FILENAME as passed. Otherwise try appending ARCHIVE_EXT, + and if a file is still not found try again with SHLIB_EXT appended + instead. */ lt_dlhandle lt_dlopenext (filename) ! const char *filename; { ! lt_dlhandle handle = 0; ! char * tmp = 0; ! char * ext = 0; ! size_t len; ! int errors = 0; ! ! if (!filename) ! { ! return lt_dlopen (filename); ! } ! ! assert (filename); ! ! len = LT_STRLEN (filename); ! ext = strrchr (filename, '.'); ! ! /* If FILENAME already bears a suitable extension, there is no need ! to try appending additional extensions. */ ! if (ext && ((strcmp (ext, archive_ext) == 0) ! #ifdef LTDL_SHLIB_EXT ! || (strcmp (ext, shlib_ext) == 0) ! #endif ! )) ! { ! return lt_dlopen (filename); ! } ! ! /* First try appending ARCHIVE_EXT. */ ! tmp = LT_EMALLOC (char, len + LT_STRLEN (archive_ext) + 1); ! if (!tmp) ! return 0; ! ! strcpy (tmp, filename); ! strcat (tmp, archive_ext); ! errors = try_dlopen (&handle, tmp); ! ! /* If we found FILENAME, stop searching -- whether we were able to ! load the file as a module or not. If the file exists but loading ! failed, it is better to return an error message here than to ! report FILE_NOT_FOUND when the alternatives (foo.so etc) are not ! in the module search path. */ ! if (handle || ((errors > 0) && !file_not_found ())) ! { ! LT_DLFREE (tmp); ! return handle; ! } ! ! #ifdef LTDL_SHLIB_EXT ! /* Try appending SHLIB_EXT. */ ! if (LT_STRLEN (shlib_ext) > LT_STRLEN (archive_ext)) ! { ! LT_DLFREE (tmp); ! tmp = LT_EMALLOC (char, len + LT_STRLEN (shlib_ext) + 1); ! if (!tmp) ! return 0; ! ! strcpy (tmp, filename); ! } ! else ! { ! tmp[len] = LT_EOS_CHAR; ! } ! ! strcat(tmp, shlib_ext); ! errors = try_dlopen (&handle, tmp); ! ! /* As before, if the file was found but loading failed, return now ! with the current error message. */ ! if (handle || ((errors > 0) && !file_not_found ())) ! { ! LT_DLFREE (tmp); ! return handle; ! } ! #endif ! ! /* Still here? Then we really did fail to locate any of the file ! names we tried. */ ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); ! LT_DLFREE (tmp); ! return 0; ! } ! ! ! static int ! lt_argz_insert (pargz, pargz_len, before, entry) ! char **pargz; ! size_t *pargz_len; ! char *before; ! const char *entry; ! { ! error_t error; ! ! if ((error = argz_insert (pargz, pargz_len, before, entry))) ! { ! switch (error) ! { ! case ENOMEM: ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! break; ! default: ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (UNKNOWN)); ! break; } ! return 1; ! } ! ! return 0; ! } ! ! static int ! lt_argz_insertinorder (pargz, pargz_len, entry) ! char **pargz; ! size_t *pargz_len; ! const char *entry; ! { ! char *before = 0; ! ! assert (pargz); ! assert (pargz_len); ! assert (entry && *entry); ! ! if (*pargz) ! while ((before = argz_next (*pargz, *pargz_len, before))) ! { ! int cmp = strcmp (entry, before); ! ! if (cmp < 0) break; ! if (cmp == 0) return 0; /* No duplicates! */ ! } ! ! return lt_argz_insert (pargz, pargz_len, before, entry); ! } ! ! static int ! lt_argz_insertdir (pargz, pargz_len, dirnam, dp) ! char **pargz; ! size_t *pargz_len; ! const char *dirnam; ! struct dirent *dp; ! { ! char *buf = 0; ! size_t buf_len = 0; ! char *end = 0; ! size_t end_offset = 0; ! size_t dir_len = 0; ! int errors = 0; ! ! assert (pargz); ! assert (pargz_len); ! assert (dp); ! ! dir_len = LT_STRLEN (dirnam); ! end = dp->d_name + LT_D_NAMLEN(dp); ! ! /* Ignore version numbers. */ ! { ! char *p; ! for (p = end; p -1 > dp->d_name; --p) ! if (strchr (".0123456789", p[-1]) == 0) ! break; ! ! if (*p == '.') ! end = p; ! } ! ! /* Ignore filename extension. */ ! { ! char *p; ! for (p = end -1; p > dp->d_name; --p) ! if (*p == '.') ! { ! end = p; ! break; } ! } ! ! /* Prepend the directory name. */ ! end_offset = end - dp->d_name; ! buf_len = dir_len + 1+ end_offset; ! buf = LT_EMALLOC (char, 1+ buf_len); ! if (!buf) ! return ++errors; ! ! assert (buf); ! ! strcpy (buf, dirnam); ! strcat (buf, "/"); ! strncat (buf, dp->d_name, end_offset); ! buf[buf_len] = LT_EOS_CHAR; ! ! /* Try to insert (in order) into ARGZ/ARGZ_LEN. */ ! if (lt_argz_insertinorder (pargz, pargz_len, buf) != 0) ! ++errors; ! ! LT_DLFREE (buf); ! ! return errors; ! } ! ! static int ! list_files_by_dir (dirnam, pargz, pargz_len) ! const char *dirnam; ! char **pargz; ! size_t *pargz_len; ! { ! DIR *dirp = 0; ! int errors = 0; ! ! assert (dirnam && *dirnam); ! assert (pargz); ! assert (pargz_len); ! assert (dirnam[LT_STRLEN(dirnam) -1] != '/'); ! ! dirp = opendir (dirnam); ! if (dirp) ! { ! struct dirent *dp = 0; ! ! while ((dp = readdir (dirp))) ! if (dp->d_name[0] != '.') ! if (lt_argz_insertdir (pargz, pargz_len, dirnam, dp)) ! { ! ++errors; ! break; ! } ! ! closedir (dirp); ! } ! else ! ++errors; ! ! return errors; ! } ! ! ! /* If there are any files in DIRNAME, call the function passed in ! DATA1 (with the name of each file and DATA2 as arguments). */ ! static int ! foreachfile_callback (dirname, data1, data2) ! char *dirname; ! lt_ptr data1; ! lt_ptr data2; ! { ! int (*func) LT_PARAMS((const char *filename, lt_ptr data)) ! = (int (*) LT_PARAMS((const char *filename, lt_ptr data))) data1; ! ! int is_done = 0; ! char *argz = 0; ! size_t argz_len = 0; ! ! if (list_files_by_dir (dirname, &argz, &argz_len) != 0) ! goto cleanup; ! if (!argz) ! goto cleanup; ! ! { ! char *filename = 0; ! while ((filename = argz_next (argz, argz_len, filename))) ! if ((is_done = (*func) (filename, data2))) ! break; ! } ! ! cleanup: ! LT_DLFREE (argz); ! ! return is_done; ! } ! ! ! /* Call FUNC for each unique extensionless file in SEARCH_PATH, along ! with DATA. The filenames passed to FUNC would be suitable for ! passing to lt_dlopenext. The extensions are stripped so that ! individual modules do not generate several entries (e.g. libfoo.la, ! libfoo.so, libfoo.so.1, libfoo.so.1.0.0). If SEARCH_PATH is NULL, ! then the same directories that lt_dlopen would search are examined. */ ! int ! lt_dlforeachfile (search_path, func, data) ! const char *search_path; ! int (*func) LT_PARAMS ((const char *filename, lt_ptr data)); ! lt_ptr data; ! { ! int is_done = 0; ! ! if (search_path) ! { ! /* If a specific path was passed, search only the directories ! listed in it. */ ! is_done = foreach_dirinpath (search_path, 0, ! foreachfile_callback, func, data); ! } ! else ! { ! /* Otherwise search the default paths. */ ! is_done = foreach_dirinpath (user_search_path, 0, ! foreachfile_callback, func, data); ! if (!is_done) ! { ! is_done = foreach_dirinpath (getenv("LTDL_LIBRARY_PATH"), 0, ! foreachfile_callback, func, data); } ! ! #ifdef LTDL_SHLIBPATH_VAR ! if (!is_done) ! { ! is_done = foreach_dirinpath (getenv(LTDL_SHLIBPATH_VAR), 0, ! foreachfile_callback, func, data); } ! #endif ! #ifdef LTDL_SYSSEARCHPATH ! if (!is_done) ! { ! is_done = foreach_dirinpath (getenv(LTDL_SYSSEARCHPATH), 0, ! foreachfile_callback, func, data); ! } ! #endif ! } ! ! return is_done; } int lt_dlclose (handle) ! lt_dlhandle handle; { ! lt_dlhandle cur, last; ! int errors = 0; ! ! LT_DLMUTEX_LOCK (); ! ! /* check whether the handle is valid */ ! last = cur = handles; ! while (cur && handle != cur) ! { ! last = cur; ! cur = cur->next; ! } ! ! if (!cur) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); ! ++errors; ! goto done; ! } ! ! handle->info.ref_count--; ! ! /* Note that even with resident modules, we must track the ref_count ! correctly incase the user decides to reset the residency flag ! later (even though the API makes no provision for that at the ! moment). */ ! if (handle->info.ref_count <= 0 && !LT_DLIS_RESIDENT (handle)) ! { ! lt_user_data data = handle->loader->dlloader_data; ! ! if (handle != handles) ! { ! last->next = handle->next; } ! else ! { ! handles = handle->next; } ! ! errors += handle->loader->module_close (data, handle->module); ! errors += unload_deplibs(handle); ! ! /* It is up to the callers to free the data itself. */ ! LT_DLFREE (handle->caller_data); ! ! LT_DLFREE (handle->info.filename); ! LT_DLFREE (handle->info.name); ! LT_DLFREE (handle); ! ! goto done; ! } ! ! if (LT_DLIS_RESIDENT (handle)) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CLOSE_RESIDENT_MODULE)); ! ++errors; ! } ! ! done: ! LT_DLMUTEX_UNLOCK (); ! ! return errors; } ! lt_ptr lt_dlsym (handle, symbol) ! lt_dlhandle handle; ! const char *symbol; { ! size_t lensym; ! char lsym[LT_SYMBOL_LENGTH]; ! char *sym; ! lt_ptr address; ! lt_user_data data; ! if (!handle) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); ! return 0; ! } ! ! if (!symbol) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); ! return 0; ! } ! ! lensym = LT_STRLEN (symbol) + LT_STRLEN (handle->loader->sym_prefix) ! + LT_STRLEN (handle->info.name); ! ! if (lensym + LT_SYMBOL_OVERHEAD < LT_SYMBOL_LENGTH) ! { ! sym = lsym; ! } ! else ! { ! sym = LT_EMALLOC (char, lensym + LT_SYMBOL_OVERHEAD + 1); ! if (!sym) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (BUFFER_OVERFLOW)); ! return 0; } ! } ! ! data = handle->loader->dlloader_data; ! if (handle->info.name) ! { ! const char *saved_error; ! ! LT_DLMUTEX_GETERROR (saved_error); ! ! /* this is a libtool module */ ! if (handle->loader->sym_prefix) ! { ! strcpy(sym, handle->loader->sym_prefix); ! strcat(sym, handle->info.name); } ! else ! { ! strcpy(sym, handle->info.name); } ! ! strcat(sym, "_LTX_"); ! strcat(sym, symbol); ! ! /* try "modulename_LTX_symbol" */ ! address = handle->loader->find_sym (data, handle->module, sym); ! if (address) ! { ! if (sym != lsym) ! { ! LT_DLFREE (sym); ! } ! return address; } ! LT_DLMUTEX_SETERROR (saved_error); ! } ! ! /* otherwise try "symbol" */ ! if (handle->loader->sym_prefix) ! { ! strcpy(sym, handle->loader->sym_prefix); ! strcat(sym, symbol); ! } ! else ! { ! strcpy(sym, symbol); ! } ! ! address = handle->loader->find_sym (data, handle->module, sym); ! if (sym != lsym) ! { ! LT_DLFREE (sym); ! } ! ! return address; } const char * ! lt_dlerror () { ! const char *error; ! ! LT_DLMUTEX_GETERROR (error); ! LT_DLMUTEX_SETERROR (0); ! ! return error ? error : LT_DLSTRERROR (UNKNOWN); ! } ! ! static int ! lt_dlpath_insertdir (ppath, before, dir) ! char **ppath; ! char *before; ! const char *dir; ! { ! int errors = 0; ! char *canonical = 0; ! char *argz = 0; ! size_t argz_len = 0; ! ! assert (ppath); ! assert (dir && *dir); ! ! if (canonicalize_path (dir, &canonical) != 0) ! { ! ++errors; ! goto cleanup; ! } ! ! assert (canonical && *canonical); ! ! /* If *PPATH is empty, set it to DIR. */ ! if (*ppath == 0) ! { ! assert (!before); /* BEFORE cannot be set without PPATH. */ ! assert (dir); /* Without DIR, don't call this function! */ ! ! *ppath = lt_estrdup (dir); ! if (*ppath == 0) ! ++errors; ! ! return errors; ! } ! ! assert (ppath && *ppath); ! ! if (argzize_path (*ppath, &argz, &argz_len) != 0) ! { ! ++errors; ! goto cleanup; ! } ! ! /* Convert BEFORE into an equivalent offset into ARGZ. This only works ! if *PPATH is already canonicalized, and hence does not change length ! with respect to ARGZ. We canonicalize each entry as it is added to ! the search path, and don't call this function with (uncanonicalized) ! user paths, so this is a fair assumption. */ ! if (before) ! { ! assert (*ppath <= before); ! assert (before - *ppath <= strlen (*ppath)); ! ! before = before - *ppath + argz; ! } ! ! if (lt_argz_insert (&argz, &argz_len, before, dir) != 0) ! { ! ++errors; ! goto cleanup; ! } ! ! argz_stringify (argz, argz_len, LT_PATHSEP_CHAR); ! LT_DLMEM_REASSIGN (*ppath, argz); ! ! cleanup: ! LT_DLFREE (canonical); ! LT_DLFREE (argz); ! ! return errors; } int lt_dladdsearchdir (search_dir) ! const char *search_dir; { ! int errors = 0; ! ! if (search_dir && *search_dir) ! { ! LT_DLMUTEX_LOCK (); ! if (lt_dlpath_insertdir (&user_search_path, 0, search_dir) != 0) ! ++errors; ! LT_DLMUTEX_UNLOCK (); ! } ! ! return errors; ! } ! ! int ! lt_dlinsertsearchdir (before, search_dir) ! const char *before; ! const char *search_dir; ! { ! int errors = 0; ! ! if (before) ! { ! LT_DLMUTEX_LOCK (); ! if ((before < user_search_path) ! || (before >= user_search_path + LT_STRLEN (user_search_path))) ! { ! LT_DLMUTEX_UNLOCK (); ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_POSITION)); ! return 1; } ! LT_DLMUTEX_UNLOCK (); ! } ! ! if (search_dir && *search_dir) ! { ! LT_DLMUTEX_LOCK (); ! if (lt_dlpath_insertdir (&user_search_path, ! (char *) before, search_dir) != 0) ! { ! ++errors; ! } ! LT_DLMUTEX_UNLOCK (); ! } ! ! return errors; } int lt_dlsetsearchpath (search_path) ! const char *search_path; { ! int errors = 0; ! ! LT_DLMUTEX_LOCK (); ! LT_DLFREE (user_search_path); ! LT_DLMUTEX_UNLOCK (); ! ! if (!search_path || !LT_STRLEN (search_path)) ! { ! return errors; ! } ! ! LT_DLMUTEX_LOCK (); ! if (canonicalize_path (search_path, &user_search_path) != 0) ! ++errors; ! LT_DLMUTEX_UNLOCK (); ! ! return errors; } const char * ! lt_dlgetsearchpath () { ! const char *saved_path; ! ! LT_DLMUTEX_LOCK (); ! saved_path = user_search_path; ! LT_DLMUTEX_UNLOCK (); ! ! return saved_path; ! } ! ! int ! lt_dlmakeresident (handle) ! lt_dlhandle handle; ! { ! int errors = 0; ! ! if (!handle) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); ! ++errors; ! } ! else ! { ! LT_DLSET_FLAG (handle, LT_DLRESIDENT_FLAG); ! } ! ! return errors; } + int + lt_dlisresident (handle) + lt_dlhandle handle; + { + if (!handle) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); + return -1; + } + + return LT_DLIS_RESIDENT (handle); + } + + + + + /* --- MODULE INFORMATION --- */ + const lt_dlinfo * lt_dlgetinfo (handle) ! lt_dlhandle handle; { ! if (!handle) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); ! return 0; ! } ! ! return &(handle->info); ! } ! ! lt_dlhandle ! lt_dlhandle_next (place) ! lt_dlhandle place; ! { ! return place ? place->next : handles; } int lt_dlforeach (func, data) ! int (*func) LT_PARAMS((lt_dlhandle handle, lt_ptr data)); ! lt_ptr data; { ! int errors = 0; ! lt_dlhandle cur; ! ! LT_DLMUTEX_LOCK (); ! ! cur = handles; ! while (cur) ! { ! lt_dlhandle tmp = cur; ! ! cur = cur->next; ! if ((*func) (tmp, data)) ! { ! ++errors; ! break; } ! } ! ! LT_DLMUTEX_UNLOCK (); ! ! return errors; ! } ! ! lt_dlcaller_id ! lt_dlcaller_register () ! { ! static lt_dlcaller_id last_caller_id = 0; ! int result; ! ! LT_DLMUTEX_LOCK (); ! result = ++last_caller_id; ! LT_DLMUTEX_UNLOCK (); ! ! return result; ! } ! ! lt_ptr ! lt_dlcaller_set_data (key, handle, data) ! lt_dlcaller_id key; ! lt_dlhandle handle; ! lt_ptr data; ! { ! int n_elements = 0; ! lt_ptr stale = (lt_ptr) 0; ! int i; ! ! /* This needs to be locked so that the caller data can be updated ! simultaneously by different threads. */ ! LT_DLMUTEX_LOCK (); ! ! if (handle->caller_data) ! while (handle->caller_data[n_elements].key) ! ++n_elements; ! ! for (i = 0; i < n_elements; ++i) ! { ! if (handle->caller_data[i].key == key) ! { ! stale = handle->caller_data[i].data; ! break; ! } ! } ! ! /* Ensure that there is enough room in this handle's caller_data ! array to accept a new element (and an empty end marker). */ ! if (i == n_elements) ! { ! lt_caller_data *temp ! = LT_DLREALLOC (lt_caller_data, handle->caller_data, 2+ n_elements); ! ! if (!temp) ! { ! stale = 0; ! goto done; ! } ! ! handle->caller_data = temp; ! ! /* We only need this if we needed to allocate a new caller_data. */ ! handle->caller_data[i].key = key; ! handle->caller_data[1+ i].key = 0; ! } ! ! handle->caller_data[i].data = data; ! ! done: ! LT_DLMUTEX_UNLOCK (); ! ! return stale; ! } ! ! lt_ptr ! lt_dlcaller_get_data (key, handle) ! lt_dlcaller_id key; ! lt_dlhandle handle; ! { ! lt_ptr result = (lt_ptr) 0; ! ! /* This needs to be locked so that the caller data isn't updated by ! another thread part way through this function. */ ! LT_DLMUTEX_LOCK (); ! ! /* Locate the index of the element with a matching KEY. */ ! { ! int i; ! for (i = 0; handle->caller_data[i].key; ++i) ! { ! if (handle->caller_data[i].key == key) ! { ! result = handle->caller_data[i].data; ! break; ! } ! } ! } ! ! LT_DLMUTEX_UNLOCK (); ! ! return result; } + + + /* --- USER MODULE LOADER API --- */ + + int lt_dlloader_add (place, dlloader, loader_name) ! lt_dlloader *place; ! const struct lt_user_dlloader *dlloader; ! const char *loader_name; { ! int errors = 0; ! lt_dlloader *node = 0, *ptr = 0; ! if ((dlloader == 0) /* diagnose null parameters */ ! || (dlloader->module_open == 0) ! || (dlloader->module_close == 0) ! || (dlloader->find_sym == 0)) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); ! return 1; ! } ! ! /* Create a new dlloader node with copies of the user callbacks. */ ! node = LT_EMALLOC (lt_dlloader, 1); ! if (!node) ! return 1; ! ! node->next = 0; ! node->loader_name = loader_name; ! node->sym_prefix = dlloader->sym_prefix; ! node->dlloader_exit = dlloader->dlloader_exit; ! node->module_open = dlloader->module_open; ! node->module_close = dlloader->module_close; ! node->find_sym = dlloader->find_sym; ! node->dlloader_data = dlloader->dlloader_data; ! ! LT_DLMUTEX_LOCK (); ! if (!loaders) ! { ! /* If there are no loaders, NODE becomes the list! */ ! loaders = node; ! } ! else if (!place) ! { ! /* If PLACE is not set, add NODE to the end of the ! LOADERS list. */ ! for (ptr = loaders; ptr->next; ptr = ptr->next) ! { ! /*NOWORK*/; } ! ptr->next = node; ! } ! else if (loaders == place) ! { ! /* If PLACE is the first loader, NODE goes first. */ ! node->next = place; ! loaders = node; ! } ! else ! { ! /* Find the node immediately preceding PLACE. */ ! for (ptr = loaders; ptr->next != place; ptr = ptr->next) ! { ! /*NOWORK*/; ! } ! if (ptr->next != place) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); ! ++errors; ! } ! else ! { ! /* Insert NODE between PTR and PLACE. */ ! node->next = place; ! ptr->next = node; } + } ! LT_DLMUTEX_UNLOCK (); ! ! return errors; } int lt_dlloader_remove (loader_name) ! const char *loader_name; { ! lt_dlloader *place = lt_dlloader_find (loader_name); ! lt_dlhandle handle; ! int errors = 0; ! if (!place) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); ! return 1; ! } ! LT_DLMUTEX_LOCK (); ! /* Fail if there are any open modules which use this loader. */ ! for (handle = handles; handle; handle = handle->next) ! { ! if (handle->loader == place) ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (REMOVE_LOADER)); ! ++errors; ! goto done; } ! } ! if (place == loaders) ! { ! /* PLACE is the first loader in the list. */ ! loaders = loaders->next; ! } ! else ! { ! /* Find the loader before the one being removed. */ ! lt_dlloader *prev; ! for (prev = loaders; prev->next; prev = prev->next) ! { ! if (!strcmp (prev->next->loader_name, loader_name)) ! { ! break; ! } ! } ! ! place = prev->next; ! prev->next = prev->next->next; ! } ! ! if (place->dlloader_exit) ! { ! errors = place->dlloader_exit (place->dlloader_data); ! } ! ! LT_DLFREE (place); ! ! done: ! LT_DLMUTEX_UNLOCK (); ! ! return errors; } ! lt_dlloader * lt_dlloader_next (place) ! lt_dlloader *place; { ! lt_dlloader *next; ! ! LT_DLMUTEX_LOCK (); ! next = place ? place->next : loaders; ! LT_DLMUTEX_UNLOCK (); ! ! return next; } ! const char * lt_dlloader_name (place) ! lt_dlloader *place; { ! const char *name = 0; ! if (place) ! { ! LT_DLMUTEX_LOCK (); ! name = place ? place->loader_name : 0; ! LT_DLMUTEX_UNLOCK (); ! } ! else ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); ! } ! return name; } ! lt_user_data * ! lt_dlloader_data (place) ! lt_dlloader *place; { ! lt_user_data *data = 0; ! if (place) ! { ! LT_DLMUTEX_LOCK (); ! data = place ? &(place->dlloader_data) : 0; ! LT_DLMUTEX_UNLOCK (); ! } ! else ! { ! LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); ! } ! return data; } ! lt_dlloader * ! lt_dlloader_find (loader_name) ! const char *loader_name; { ! lt_dlloader *place = 0; ! ! LT_DLMUTEX_LOCK (); ! for (place = loaders; place; place = place->next) ! { ! if (strcmp (place->loader_name, loader_name) == 0) ! { ! break; } ! } ! LT_DLMUTEX_UNLOCK (); ! return place; } diff -Nrc3pad gcc-3.3.3/libjava/libltdl/ltdl.h gcc-3.4.0/libjava/libltdl/ltdl.h *** gcc-3.3.3/libjava/libltdl/ltdl.h 2000-09-10 07:53:51.000000000 +0000 --- gcc-3.4.0/libjava/libltdl/ltdl.h 2003-12-16 21:48:24.000000000 +0000 *************** Software Foundation, Inc., 59 Temple Pla *** 25,250 **** */ /* Only include this header file once. */ ! #ifndef _LTDL_H_ ! #define _LTDL_H_ 1 ! /* Canonicalise Windows and Cygwin recognition macros. */ ! #ifdef __CYGWIN32__ ! # ifndef __CYGWIN__ ! # define __CYGWIN__ __CYGWIN32__ ! # endif ! #endif ! #ifdef _WIN32 ! # ifndef WIN32 ! # define WIN32 _WIN32 ! # endif ! #endif ! /* __BEGIN_DECLS should be used at the beginning of your declarations, ! so that C++ compilers don't mangle their names. Use __END_DECLS at the end of C declarations. */ - #undef __BEGIN_DECLS - #undef __END_DECLS #ifdef __cplusplus ! # define __BEGIN_DECLS extern "C" { ! # define __END_DECLS } #else ! # define __BEGIN_DECLS /* empty */ ! # define __END_DECLS /* empty */ #endif ! /* LTDL_PARAMS is a macro used to wrap function prototypes, so that compilers that don't understand ANSI C prototypes still work, and ANSI C ! compilers can issue warnings about type mismatches. */ ! #undef LTDL_PARAMS ! #undef lt_ptr_t #if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus) ! # define LTDL_PARAMS(protos) protos ! # define lt_ptr_t void* #else ! # define LTDL_PARAMS(protos) () ! # define lt_ptr_t char* #endif ! /* LTDL_STMT_START/END are used to create macros which expand to a ! a single compound statement in a portable way. */ ! #undef LTDL_STMT_START ! #undef LTDL_STMT_END #if defined (__GNUC__) && !defined (__STRICT_ANSI__) && !defined (__cplusplus) ! # define LTDL_STMT_START (void)( ! # define LTDL_STMT_END ) #else # if (defined (sun) || defined (__sun__)) ! # define LTDL_STMT_START if (1) ! # define LTDL_STMT_END else (void)0 # else ! # define LTDL_STMT_START do ! # define LTDL_STMT_END while (0) # endif #endif ! #ifdef WIN32 # ifndef __CYGWIN__ ! /* LTDL_DIRSEP_CHAR is accepted *in addition* to '/' as a directory separator when it is set. */ ! # define LTDL_DIRSEP_CHAR '\\' ! # define LTDL_PATHSEP_CHAR ';' # endif #endif ! #ifndef LTDL_PATHSEP_CHAR ! # define LTDL_PATHSEP_CHAR ':' #endif /* DLL building support on win32 hosts; mostly to workaround their ridiculous implementation of data symbol exporting. */ ! #ifndef LTDL_SCOPE ! # ifdef _WIN32 # ifdef DLL_EXPORT /* defined by libtool (if required) */ ! # define LTDL_SCOPE __declspec(dllexport) # endif # ifdef LIBLTDL_DLL_IMPORT /* define if linking with this dll */ ! # define LTDL_SCOPE extern __declspec(dllimport) # endif # endif ! # ifndef LTDL_SCOPE /* static linking or !_WIN32 */ ! # define LTDL_SCOPE extern # endif #endif - #include - /* Defining error strings alongside their symbolic names in a macro in - this way allows us to expand the macro in different contexts with - confidence that the enumeration of symbolic names will map correctly - onto the table of error strings. */ - #define ltdl_error_table \ - LTDL_ERROR(UNKNOWN, "unknown error") \ - LTDL_ERROR(DLOPEN_NOT_SUPPORTED, "dlopen support not available")\ - LTDL_ERROR(INVALID_LOADER, "invalid loader") \ - LTDL_ERROR(INIT_LOADER, "loader initialization failed") \ - LTDL_ERROR(REMOVE_LOADER, "loader removal failed") \ - LTDL_ERROR(FILE_NOT_FOUND, "file not found") \ - LTDL_ERROR(DEPLIB_NOT_FOUND, "dependency library not found") \ - LTDL_ERROR(NO_SYMBOLS, "no symbols defined") \ - LTDL_ERROR(CANNOT_OPEN, "can't open the module") \ - LTDL_ERROR(CANNOT_CLOSE, "can't close the module") \ - LTDL_ERROR(SYMBOL_NOT_FOUND, "symbol not found") \ - LTDL_ERROR(NO_MEMORY, "not enough memory") \ - LTDL_ERROR(INVALID_HANDLE, "invalid module handle") \ - LTDL_ERROR(BUFFER_OVERFLOW, "internal buffer overflow") \ - LTDL_ERROR(INVALID_ERRORCODE, "invalid errorcode") \ - LTDL_ERROR(SHUTDOWN, "library already shutdown") ! /* Enumerate the symbolic error names. */ ! #if defined(__STDC__) || defined(__cplusplus) ! # define LTDL_ERROR(name, diagnostic) LTDL_ERROR_##name, ! #else ! # define LTDL_ERROR(name, diagnostic) LTDL_ERROR_/**/name, ! #endif ! enum { ! ltdl_error_table ! LTDL_ERROR_MAX ! }; ! #undef LTDL_ERROR - /* An opaque handle for a successfully lt_dlopened module instance. */ - #ifdef _LTDL_COMPILE_ - typedef struct lt_dlhandle_t *lt_dlhandle; - #else - typedef lt_ptr_t lt_dlhandle; - #endif /* A preopened symbol. Arrays of this type comprise the exported symbols for a dlpreopened module. */ typedef struct { ! const char *name; ! lt_ptr_t address; } lt_dlsymlist; /* Read only information pertaining to a loaded module. */ typedef struct { ! char *filename; /* file name */ ! char *name; /* module name */ ! int ref_count; /* number of times lt_dlopened minus number of times lt_dlclosed. */ } lt_dlinfo; ! /* An opaque handle for a module loaded by a system call. This is only ! used internally by ltdl loaders, and by user module loaders. */ ! typedef lt_ptr_t lt_module_t; ! /* An opaque handle for a module loader. */ ! #ifdef _LTDL_COMPILE_ ! typedef struct lt_dlloader_t lt_dlloader_t; ! #else ! typedef lt_ptr_t lt_dlloader_t; ! #endif ! typedef lt_ptr_t lt_dlloader_data_t; /* Function pointer types for creating user defined module loaders. */ ! typedef lt_module_t lt_module_open_t LTDL_PARAMS((lt_dlloader_data_t loader_data, const char *filename)); ! typedef int lt_module_close_t LTDL_PARAMS((lt_dlloader_data_t loader_data, lt_module_t handle)); ! typedef lt_ptr_t lt_find_sym_t LTDL_PARAMS((lt_dlloader_data_t loader_data, lt_module_t handle, const char *symbol)); ! typedef int lt_dlloader_exit_t LTDL_PARAMS((lt_dlloader_data_t loader_data)); ! __BEGIN_DECLS ! /* Initialisation and finalisation functions for libltdl. */ ! extern int lt_dlinit LTDL_PARAMS((void)); ! extern int lt_dlexit LTDL_PARAMS((void)); ! /* Module search path manipultation. */ ! extern int lt_dladdsearchdir LTDL_PARAMS((const char *search_dir)); ! extern int lt_dlsetsearchpath LTDL_PARAMS((const char *search_path)); ! extern const char *lt_dlgetsearchpath LTDL_PARAMS((void)); - /* Portable libltdl versions of the system dlopen() API. */ - extern lt_dlhandle lt_dlopen LTDL_PARAMS((const char *filename)); - extern lt_dlhandle lt_dlopenext LTDL_PARAMS((const char *filename)); - extern lt_ptr_t lt_dlsym LTDL_PARAMS((lt_dlhandle handle, const char *name)); - extern const char *lt_dlerror LTDL_PARAMS((void)); - extern int lt_dlclose LTDL_PARAMS((lt_dlhandle handle)); ! /* Support for preloaded modules through lt_dlopen() API. */ ! extern int lt_dlpreload LTDL_PARAMS((const lt_dlsymlist *preloaded)); ! extern int lt_dlpreload_default LTDL_PARAMS((const lt_dlsymlist *preloaded)); - #define LTDL_SET_PRELOADED_SYMBOLS() LTDL_STMT_START{ \ - extern const lt_dlsymlist lt_preloaded_symbols[]; \ - lt_dlpreload_default(lt_preloaded_symbols); \ - }LTDL_STMT_END ! /* Managing user data associated with a loaded modules. */ ! extern const lt_dlinfo *lt_dlgetinfo LTDL_PARAMS((lt_dlhandle handle)); ! extern int lt_dlforeach LTDL_PARAMS(( ! int (*func)(lt_dlhandle handle, lt_ptr_t data), lt_ptr_t data)); ! /* User module loader API. */ ! struct lt_user_dlloader { ! const char *sym_prefix; ! lt_module_open_t *module_open; ! lt_module_close_t *module_close; ! lt_find_sym_t *find_sym; ! lt_dlloader_exit_t *dlloader_exit; ! lt_dlloader_data_t dlloader_data; }; ! extern lt_dlloader_t *lt_dlloader_next LTDL_PARAMS((lt_dlloader_t *place)); ! extern lt_dlloader_t *lt_dlloader_find LTDL_PARAMS((const char *loader_name)); ! extern const char *lt_dlloader_name LTDL_PARAMS((lt_dlloader_t *place)); ! extern lt_dlloader_data_t *lt_dlloader_data LTDL_PARAMS((lt_dlloader_t *place)); ! extern lt_dlloader_t *lt_find_dlloader LTDL_PARAMS((const char *loader_name)); ! extern int lt_dlloader_add LTDL_PARAMS((lt_dlloader_t *place, const struct lt_user_dlloader *dlloader, const char *loader_name)); ! extern int lt_dlloader_remove LTDL_PARAMS((const char *loader_name)); - /* Integrated lt_dlerror() messages for user loaders. */ - extern int lt_dladderror LTDL_PARAMS((const char *diagnostic)); - extern int lt_dlseterror LTDL_PARAMS((int errorcode)); - /* Pointers to memory management functions to be used by libltdl. */ - LTDL_SCOPE lt_ptr_t (*lt_dlmalloc)LTDL_PARAMS((size_t size)); - LTDL_SCOPE void (*lt_dlfree)LTDL_PARAMS((lt_ptr_t ptr)); ! __END_DECLS ! #endif /* !_LTDL_H_ */ --- 25,361 ---- */ /* Only include this header file once. */ ! #ifndef LTDL_H ! #define LTDL_H 1 ! #include /* for size_t declaration */ ! ! /* --- MACROS FOR PORTABILITY --- */ ! ! ! /* Saves on those hard to debug '\0' typos.... */ ! #define LT_EOS_CHAR '\0' ! ! /* LTDL_BEGIN_C_DECLS should be used at the beginning of your declarations, ! so that C++ compilers don't mangle their names. Use LTDL_END_C_DECLS at the end of C declarations. */ #ifdef __cplusplus ! # define LT_BEGIN_C_DECLS extern "C" { ! # define LT_END_C_DECLS } #else ! # define LT_BEGIN_C_DECLS /* empty */ ! # define LT_END_C_DECLS /* empty */ #endif ! LT_BEGIN_C_DECLS ! ! ! /* LT_PARAMS is a macro used to wrap function prototypes, so that compilers that don't understand ANSI C prototypes still work, and ANSI C ! compilers can issue warnings about type mismatches. */ #if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus) ! # define LT_PARAMS(protos) protos ! # define lt_ptr void* #else ! # define LT_PARAMS(protos) () ! # define lt_ptr char* #endif ! /* LT_STMT_START/END are used to create macros which expand to a ! a single compound statement in a portable way. */ #if defined (__GNUC__) && !defined (__STRICT_ANSI__) && !defined (__cplusplus) ! # define LT_STMT_START (void)( ! # define LT_STMT_END ) #else # if (defined (sun) || defined (__sun__)) ! # define LT_STMT_START if (1) ! # define LT_STMT_END else (void)0 # else ! # define LT_STMT_START do ! # define LT_STMT_END while (0) # endif #endif ! /* LT_CONC creates a new concatenated symbol for the compiler ! in a portable way. */ ! #if defined(__STDC__) || defined(__cplusplus) ! # define LT_CONC(s,t) s##t ! #else ! # define LT_CONC(s,t) s/**/t ! #endif ! ! /* LT_STRLEN can be used safely on NULL pointers. */ ! #define LT_STRLEN(s) (((s) && (s)[0]) ? strlen (s) : 0) ! ! ! ! /* --- WINDOWS SUPPORT --- */ ! ! ! /* Canonicalise Windows and Cygwin recognition macros. */ ! #ifdef __CYGWIN32__ # ifndef __CYGWIN__ ! # define __CYGWIN__ __CYGWIN32__ ! # endif ! #endif ! #if defined(_WIN32) || defined(WIN32) ! # ifndef __WINDOWS__ ! # ifdef _WIN32 ! # define __WINDOWS__ _WIN32 ! # else ! # ifdef WIN32 ! # define __WINDOWS__ WIN32 ! # endif ! # endif ! # endif ! #endif ! ! #ifdef __WINDOWS__ ! # ifndef __CYGWIN__ ! /* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory separator when it is set. */ ! # define LT_DIRSEP_CHAR '\\' ! # define LT_PATHSEP_CHAR ';' # endif #endif ! #ifndef LT_PATHSEP_CHAR ! # define LT_PATHSEP_CHAR ':' #endif /* DLL building support on win32 hosts; mostly to workaround their ridiculous implementation of data symbol exporting. */ ! #ifndef LT_SCOPE ! # ifdef __WINDOWS__ # ifdef DLL_EXPORT /* defined by libtool (if required) */ ! # define LT_SCOPE __declspec(dllexport) # endif # ifdef LIBLTDL_DLL_IMPORT /* define if linking with this dll */ ! # define LT_SCOPE extern __declspec(dllimport) # endif # endif ! # ifndef LT_SCOPE /* static linking or !__WINDOWS__ */ ! # define LT_SCOPE extern # endif #endif ! ! /* --- DYNAMIC MODULE LOADING API --- */ ! ! ! typedef struct lt_dlhandle_struct *lt_dlhandle; /* A loaded module. */ ! ! /* Initialisation and finalisation functions for libltdl. */ ! extern int lt_dlinit LT_PARAMS((void)); ! extern int lt_dlexit LT_PARAMS((void)); ! ! /* Module search path manipulation. */ ! extern int lt_dladdsearchdir LT_PARAMS((const char *search_dir)); ! extern int lt_dlinsertsearchdir LT_PARAMS((const char *before, ! const char *search_dir)); ! extern int lt_dlsetsearchpath LT_PARAMS((const char *search_path)); ! extern const char *lt_dlgetsearchpath LT_PARAMS((void)); ! extern int lt_dlforeachfile LT_PARAMS(( ! const char *search_path, ! int (*func) (const char *filename, lt_ptr data), ! lt_ptr data)); ! ! /* Portable libltdl versions of the system dlopen() API. */ ! extern lt_dlhandle lt_dlopen LT_PARAMS((const char *filename)); ! extern lt_dlhandle lt_dlopenext LT_PARAMS((const char *filename)); ! extern lt_ptr lt_dlsym LT_PARAMS((lt_dlhandle handle, ! const char *name)); ! extern const char *lt_dlerror LT_PARAMS((void)); ! extern int lt_dlclose LT_PARAMS((lt_dlhandle handle)); ! ! /* Module residency management. */ ! extern int lt_dlmakeresident LT_PARAMS((lt_dlhandle handle)); ! extern int lt_dlisresident LT_PARAMS((lt_dlhandle handle)); ! ! ! ! ! /* --- MUTEX LOCKING --- */ ! ! ! typedef void lt_dlmutex_lock LT_PARAMS((void)); ! typedef void lt_dlmutex_unlock LT_PARAMS((void)); ! typedef void lt_dlmutex_seterror LT_PARAMS((const char *errmsg)); ! typedef const char *lt_dlmutex_geterror LT_PARAMS((void)); ! ! extern int lt_dlmutex_register LT_PARAMS((lt_dlmutex_lock *lock, ! lt_dlmutex_unlock *unlock, ! lt_dlmutex_seterror *seterror, ! lt_dlmutex_geterror *geterror)); ! ! ! ! ! /* --- MEMORY HANDLING --- */ ! ! ! /* By default, the realloc function pointer is set to our internal ! realloc implementation which iself uses lt_dlmalloc and lt_dlfree. ! libltdl relies on a featureful realloc, but if you are sure yours ! has the right semantics then you can assign it directly. Generally, ! it is safe to assign just a malloc() and a free() function. */ ! LT_SCOPE lt_ptr (*lt_dlmalloc) LT_PARAMS((size_t size)); ! LT_SCOPE lt_ptr (*lt_dlrealloc) LT_PARAMS((lt_ptr ptr, size_t size)); ! LT_SCOPE void (*lt_dlfree) LT_PARAMS((lt_ptr ptr)); ! ! ! ! ! /* --- PRELOADED MODULE SUPPORT --- */ /* A preopened symbol. Arrays of this type comprise the exported symbols for a dlpreopened module. */ typedef struct { ! const char *name; ! lt_ptr address; } lt_dlsymlist; + extern int lt_dlpreload LT_PARAMS((const lt_dlsymlist *preloaded)); + extern int lt_dlpreload_default + LT_PARAMS((const lt_dlsymlist *preloaded)); + + #define LTDL_SET_PRELOADED_SYMBOLS() LT_STMT_START{ \ + extern const lt_dlsymlist lt_preloaded_symbols[]; \ + lt_dlpreload_default(lt_preloaded_symbols); \ + }LT_STMT_END + + + + + /* --- MODULE INFORMATION --- */ + + /* Read only information pertaining to a loaded module. */ typedef struct { ! char *filename; /* file name */ ! char *name; /* module name */ ! int ref_count; /* number of times lt_dlopened minus number of times lt_dlclosed. */ } lt_dlinfo; ! extern const lt_dlinfo *lt_dlgetinfo LT_PARAMS((lt_dlhandle handle)); ! extern lt_dlhandle lt_dlhandle_next LT_PARAMS((lt_dlhandle place)); ! extern int lt_dlforeach LT_PARAMS(( ! int (*func) (lt_dlhandle handle, lt_ptr data), ! lt_ptr data)); ! /* Associating user data with loaded modules. */ ! typedef unsigned lt_dlcaller_id; ! ! extern lt_dlcaller_id lt_dlcaller_register LT_PARAMS((void)); ! extern lt_ptr lt_dlcaller_set_data LT_PARAMS((lt_dlcaller_id key, ! lt_dlhandle handle, ! lt_ptr data)); ! extern lt_ptr lt_dlcaller_get_data LT_PARAMS((lt_dlcaller_id key, ! lt_dlhandle handle)); ! ! ! /* --- USER MODULE LOADER API --- */ ! ! ! typedef struct lt_dlloader lt_dlloader; ! typedef lt_ptr lt_user_data; ! typedef lt_ptr lt_module; /* Function pointer types for creating user defined module loaders. */ ! typedef lt_module lt_module_open LT_PARAMS((lt_user_data loader_data, ! const char *filename)); ! typedef int lt_module_close LT_PARAMS((lt_user_data loader_data, ! lt_module handle)); ! typedef lt_ptr lt_find_sym LT_PARAMS((lt_user_data loader_data, ! lt_module handle, ! const char *symbol)); ! typedef int lt_dlloader_exit LT_PARAMS((lt_user_data loader_data)); ! struct lt_user_dlloader { ! const char *sym_prefix; ! lt_module_open *module_open; ! lt_module_close *module_close; ! lt_find_sym *find_sym; ! lt_dlloader_exit *dlloader_exit; ! lt_user_data dlloader_data; ! }; ! extern lt_dlloader *lt_dlloader_next LT_PARAMS((lt_dlloader *place)); ! extern lt_dlloader *lt_dlloader_find LT_PARAMS(( ! const char *loader_name)); ! extern const char *lt_dlloader_name LT_PARAMS((lt_dlloader *place)); ! extern lt_user_data *lt_dlloader_data LT_PARAMS((lt_dlloader *place)); ! extern int lt_dlloader_add LT_PARAMS((lt_dlloader *place, ! const struct lt_user_dlloader *dlloader, ! const char *loader_name)); ! extern int lt_dlloader_remove LT_PARAMS(( ! const char *loader_name)); ! ! /* --- ERROR MESSAGE HANDLING --- */ ! /* Defining error strings alongside their symbolic names in a macro in ! this way allows us to expand the macro in different contexts with ! confidence that the enumeration of symbolic names will map correctly ! onto the table of error strings. */ ! #define lt_dlerror_table \ ! LT_ERROR(UNKNOWN, "unknown error") \ ! LT_ERROR(DLOPEN_NOT_SUPPORTED, "dlopen support not available") \ ! LT_ERROR(INVALID_LOADER, "invalid loader") \ ! LT_ERROR(INIT_LOADER, "loader initialization failed") \ ! LT_ERROR(REMOVE_LOADER, "loader removal failed") \ ! LT_ERROR(FILE_NOT_FOUND, "file not found") \ ! LT_ERROR(DEPLIB_NOT_FOUND, "dependency library not found") \ ! LT_ERROR(NO_SYMBOLS, "no symbols defined") \ ! LT_ERROR(CANNOT_OPEN, "can't open the module") \ ! LT_ERROR(CANNOT_CLOSE, "can't close the module") \ ! LT_ERROR(SYMBOL_NOT_FOUND, "symbol not found") \ ! LT_ERROR(NO_MEMORY, "not enough memory") \ ! LT_ERROR(INVALID_HANDLE, "invalid module handle") \ ! LT_ERROR(BUFFER_OVERFLOW, "internal buffer overflow") \ ! LT_ERROR(INVALID_ERRORCODE, "invalid errorcode") \ ! LT_ERROR(SHUTDOWN, "library already shutdown") \ ! LT_ERROR(CLOSE_RESIDENT_MODULE, "can't close resident module") \ ! LT_ERROR(INVALID_MUTEX_ARGS, "invalid mutex handler registration") \ ! LT_ERROR(INVALID_POSITION, "invalid search path insert position") ! /* Enumerate the symbolic error names. */ ! enum { ! #define LT_ERROR(name, diagnostic) LT_CONC(LT_ERROR_, name), ! lt_dlerror_table ! #undef LT_ERROR ! ! LT_ERROR_MAX }; ! /* These functions are only useful from inside custom module loaders. */ ! extern int lt_dladderror LT_PARAMS((const char *diagnostic)); ! extern int lt_dlseterror LT_PARAMS((int errorcode)); ! ! /* --- SOURCE COMPATIBILITY WITH OLD LIBLTDL --- */ ! ! #ifdef LT_NON_POSIX_NAMESPACE ! # define lt_ptr_t lt_ptr ! # define lt_module_t lt_module ! # define lt_module_open_t lt_module_open ! # define lt_module_close_t lt_module_close ! # define lt_find_sym_t lt_find_sym ! # define lt_dlloader_exit_t lt_dlloader_exit ! # define lt_dlloader_t lt_dlloader ! # define lt_dlloader_data_t lt_user_data ! #endif ! ! LT_END_C_DECLS ! ! #endif /* !LTDL_H */ diff -Nrc3pad gcc-3.3.3/libjava/libltdl/ltmain.sh gcc-3.4.0/libjava/libltdl/ltmain.sh *** gcc-3.3.3/libjava/libltdl/ltmain.sh 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/libltdl/ltmain.sh 2003-12-16 21:48:24.000000000 +0000 *************** *** 0 **** --- 1,6322 ---- + # ltmain.sh - Provide generalized library-building support services. + # NOTE: Changing this file will not affect anything until you rerun configure. + # + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003 + # Free Software Foundation, Inc. + # Originally by Gordon Matzigkeit , 1996 + # + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2 of the License, or + # (at your option) any later version. + # + # This program is distributed in the hope that it will be useful, but + # WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + # General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + # + # As a special exception to the GNU General Public License, if you + # distribute this file as part of a program that contains a + # configuration script generated by Autoconf, you may include it under + # the same distribution terms that you use for the rest of that program. + + # Check that we have a working $echo. + if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift + elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : + elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then + # Yippee, $echo works! + : + else + # Restart under the correct shell, and then maybe $echo will work. + exec $SHELL "$0" --no-reexec ${1+"$@"} + fi + + if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit 1 + fi + + # Global variables. + mode=$default_mode + nonopt= + prev= + prevopt= + run= + show="$echo" + show_help= + execute_dlfiles= + lo2o="s/\\.lo\$/.${objext}/" + o2lo="s/\\.${objext}\$/.lo/" + + ##################################### + # Shell function definitions: + # This seems to be the best place for them + + # Need a lot of goo to handle *both* DLLs and import libs + # Has to be a shell function in order to 'eat' the argument + # that is supplied when $file_magic_command is called. + win32_libid () { + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ + grep -E 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then + win32_nmres=`eval $NM -f posix -A $1 | \ + sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` + if test "X$win32_nmres" = "Ximport" ; then + win32_libid_type="x86 archive import" + else + win32_libid_type="x86 archive static" + fi + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $echo $win32_libid_type + } + + # End of Shell function definitions + ##################################### + + # Parse our command line options once, thoroughly. + while test "$#" -gt 0 + do + arg="$1" + shift + + case $arg in + -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + execute_dlfiles) + execute_dlfiles="$execute_dlfiles $arg" + ;; + tag) + tagname="$arg" + + # Check whether tagname contains only valid characters + case $tagname in + *[!-_A-Za-z0-9,/]*) + $echo "$progname: invalid tag name: $tagname" 1>&2 + exit 1 + ;; + esac + + case $tagname in + CC) + # Don't test for the "default" C tag, as we know, it's there, but + # not specially marked. + ;; + *) + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then + taglist="$taglist $tagname" + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`" + else + $echo "$progname: ignoring unknown tag $tagname" 1>&2 + fi + ;; + esac + ;; + *) + eval "$prev=\$arg" + ;; + esac + + prev= + prevopt= + continue + fi + + # Have we seen a non-optional argument yet? + case $arg in + --help) + show_help=yes + ;; + + --version) + $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" + $echo + $echo "Copyright (C) 2003 Free Software Foundation, Inc." + $echo "This is free software; see the source for copying conditions. There is NO" + $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + exit 0 + ;; + + --config) + ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0 + # Now print the configurations for the tags. + for tagname in $taglist; do + ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0" + done + exit 0 + ;; + + --debug) + $echo "$progname: enabling shell trace mode" + set -x + ;; + + --dry-run | -n) + run=: + ;; + + --features) + $echo "host: $host" + if test "$build_libtool_libs" = yes; then + $echo "enable shared libraries" + else + $echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + $echo "enable static libraries" + else + $echo "disable static libraries" + fi + exit 0 + ;; + + --finish) mode="finish" ;; + + --mode) prevopt="--mode" prev=mode ;; + --mode=*) mode="$optarg" ;; + + --preserve-dup-deps) duplicate_deps="yes" ;; + + --quiet | --silent) + show=: + ;; + + --tag) prevopt="--tag" prev=tag ;; + --tag=*) + set tag "$optarg" ${1+"$@"} + shift + prev=tag + ;; + + -dlopen) + prevopt="-dlopen" + prev=execute_dlfiles + ;; + + -*) + $echo "$modename: unrecognized option \`$arg'" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + + *) + nonopt="$arg" + break + ;; + esac + done + + if test -n "$prevopt"; then + $echo "$modename: option \`$prevopt' requires an argument" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + # If this variable is set in any of the actions, the command in it + # will be execed at the end. This prevents here-documents from being + # left over by shells. + exec_cmd= + + if test -z "$show_help"; then + + # Infer the operation mode. + if test -z "$mode"; then + $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 + $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2 + case $nonopt in + *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) + mode=link + for arg + do + case $arg in + -c) + mode=compile + break + ;; + esac + done + ;; + *db | *dbx | *strace | *truss) + mode=execute + ;; + *install*|cp|mv) + mode=install + ;; + *rm) + mode=uninstall + ;; + *) + # If we have no mode, but dlfiles were specified, then do execute mode. + test -n "$execute_dlfiles" && mode=execute + + # Just use the default operation mode. + if test -z "$mode"; then + if test -n "$nonopt"; then + $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 + else + $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 + fi + fi + ;; + esac + fi + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$execute_dlfiles" && test "$mode" != execute; then + $echo "$modename: unrecognized option \`-dlopen'" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$modename --help --mode=$mode' for more information." + + # These modes are in order of execution frequency so that they run quickly. + case $mode in + # libtool compile mode + compile) + modename="$modename: compile" + # Get the compilation command and the source file. + base_compile= + srcfile="$nonopt" # always keep a non-empty value in "srcfile" + suppress_output= + arg_mode=normal + libobj= + + for arg + do + case "$arg_mode" in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg="$arg" + arg_mode=normal + ;; + + target ) + libobj="$arg" + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + if test -n "$libobj" ; then + $echo "$modename: you cannot specify \`-o' more than once" 1>&2 + exit 1 + fi + arg_mode=target + continue + ;; + + -static) + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` + lastarg= + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" + + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + lastarg="$lastarg $arg" + done + IFS="$save_ifs" + lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` + + # Add the arguments to base_compile. + base_compile="$base_compile $lastarg" + continue + ;; + + * ) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg="$srcfile" + srcfile="$arg" + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` + + case $lastarg in + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + lastarg="\"$lastarg\"" + ;; + esac + + base_compile="$base_compile $lastarg" + done # for arg + + case $arg_mode in + arg) + $echo "$modename: you must specify an argument for -Xcompile" + exit 1 + ;; + target) + $echo "$modename: you must specify a target with \`-o'" 1>&2 + exit 1 + ;; + *) + # Get the name of the library object. + [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + xform='[cCFSifmso]' + case $libobj in + *.ada) xform=ada ;; + *.adb) xform=adb ;; + *.ads) xform=ads ;; + *.asm) xform=asm ;; + *.c++) xform=c++ ;; + *.cc) xform=cc ;; + *.ii) xform=ii ;; + *.class) xform=class ;; + *.cpp) xform=cpp ;; + *.cxx) xform=cxx ;; + *.f90) xform=f90 ;; + *.for) xform=for ;; + *.java) xform=java ;; + esac + + libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` + + case $libobj in + *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; + *) + $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 + exit 1 + ;; + esac + + # Infer tagged configuration to use if any are available and + # if one wasn't chosen via the "--tag" command line option. + # Only attempt this if the compiler in the base compile + # command doesn't match the default compiler. + if test -n "$available_tags" && test -z "$tagname"; then + case $base_compile in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`" + case "$base_compile " in + "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + $echo "$modename: unable to infer tagged configuration" + $echo "$modename: specify a tag with \`--tag'" 1>&2 + exit 1 + # else + # $echo "$modename: using $tagname tagged configuration" + fi + ;; + esac + fi + + objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$obj"; then + xdir= + else + xdir=$xdir/ + fi + lobj=${xdir}$objdir/$objname + + if test -z "$base_compile"; then + $echo "$modename: you must specify a compilation command" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + $run $rm $removelist + trap "$run $rm $removelist; exit 1" 1 2 15 + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2*) + pic_mode=default + ;; + esac + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" + removelist="$removelist $output_obj $lockfile" + trap "$run $rm $removelist; exit 1" 1 2 15 + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until $run ln "$0" "$lockfile" 2>/dev/null; do + $show "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + $echo "\ + *** ERROR, $lockfile exists and contains: + `cat $lockfile 2>/dev/null` + + This indicates that another process is trying to use the same + temporary object file, and libtool could not work around it because + your compiler does not support \`-c' and \`-o' together. If you + repeat this compilation, it may succeed, by chance, but you had better + avoid parallel builds (make -j) in this platform, or get a better + compiler." + + $run $rm $removelist + exit 1 + fi + $echo $srcfile > "$lockfile" + fi + + if test -n "$fix_srcfile_path"; then + eval srcfile=\"$fix_srcfile_path\" + fi + + $run $rm "$libobj" "${libobj}T" + + # Create a libtool object file (analogous to a ".la" file), + # but don't create it if we're doing a dry run. + test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then + $echo "\ + *** ERROR, $lockfile contains: + `cat $lockfile 2>/dev/null` + + but it should contain: + $srcfile + + This indicates that another process is trying to use the same + temporary object file, and libtool could not work around it because + your compiler does not support \`-c' and \`-o' together. If you + repeat this compilation, it may succeed, by chance, but you had better + avoid parallel builds (make -j) in this platform, or get a better + compiler." + + $run $rm $removelist + exit 1 + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + $show "$mv $output_obj $lobj" + if $run $mv $output_obj $lobj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the PIC object to the libtool object file. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then + $echo "\ + *** ERROR, $lockfile contains: + `cat $lockfile 2>/dev/null` + + but it should contain: + $srcfile + + This indicates that another process is trying to use the same + temporary object file, and libtool could not work around it because + your compiler does not support \`-c' and \`-o' together. If you + repeat this compilation, it may succeed, by chance, but you had better + avoid parallel builds (make -j) in this platform, or get a better + compiler." + + $run $rm $removelist + exit 1 + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + $show "$mv $output_obj $obj" + if $run $mv $output_obj $obj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the non-PIC object the libtool object file. + # Only append if the libtool object file exists. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + else + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + fi + build_libtool_libs=no + build_old_libs=yes + prefer_static_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + base_compile="$base_compile $arg" + shift + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test + ;; + *) qarg=$arg ;; + esac + libtool_args="$libtool_args $qarg" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + compile_command="$compile_command @OUTPUT@" + finalize_command="$finalize_command @OUTPUT@" + ;; + esac + + case $prev in + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + compile_command="$compile_command @SYMFILE@" + finalize_command="$finalize_command @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + else + dlprefiles="$dlprefiles $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols="$arg" + if test ! -f "$arg"; then + $echo "$modename: symbol file \`$arg' does not exist" + exit 1 + fi + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat $save_arg` + do + # moreargs="$moreargs $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit 1 + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + libobjs="$libobjs $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + non_pic_objects="$non_pic_objects $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit 1 + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + fi + done + else + $echo "$modename: link input file \`$save_arg' does not exist" + exit 1 + fi + arg=$save_arg + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit 1 + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) rpath="$rpath $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) xrpath="$xrpath $arg" ;; + esac + fi + prev= + continue + ;; + xcompiler) + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + xlinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $wl$qarg" + prev= + compile_command="$compile_command $wl$qarg" + finalize_command="$finalize_command $wl$qarg" + continue + ;; + xcclinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg="$arg" + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + compile_command="$compile_command $link_static_flag" + finalize_command="$finalize_command $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 + continue + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: more than one -exported-symbols argument is not allowed" + exit 1 + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + ;; + esac + continue + ;; + + -L*) + dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 + exit 1 + fi + dir="$absdir" + ;; + esac + case "$deplibs " in + *" -L$dir "*) ;; + *) + deplibs="$deplibs -L$dir" + lib_search_path="$lib_search_path $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + case :$dllsearchpath: in + *":$dir:"*) ;; + *) dllsearchpath="$dllsearchpath:$dir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-pw32* | *-*-beos*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-mingw* | *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd* | *-*-freebsd*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + deplibs="$deplibs -framework System" + continue + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd* | *-*-freebsd*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + deplibs="$deplibs $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # gcc -m* arguments should be passed to the linker via $compiler_flags + # in order to pass architecture information to the linker + # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo + # but this is not reliable with gcc because gcc may use -mfoo to + # select a different linker, different libraries, etc, while + # -Wl,-mfoo simply passes -mfoo to the linker. + -m*) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + if test "$with_gcc" = "yes" ; then + compiler_flags="$compiler_flags $arg" + fi + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + # The PATH hackery in wrapper scripts is required on Windows + # in order for the loader to find any dlls it needs. + $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 + $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -o) prev=output ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit 1 + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + continue + ;; + + -static) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Wl,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $wl$flag" + linker_flags="$linker_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # Some other compiler flag. + -* | +*) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + + *.$objext) + # A standard object. + objs="$objs $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit 1 + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + libobjs="$libobjs $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + non_pic_objects="$non_pic_objects $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit 1 + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + fi + ;; + + *.$libext) + # An archive. + deplibs="$deplibs $arg" + old_deplibs="$old_deplibs $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. + dlfiles="$dlfiles $arg" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + dlprefiles="$dlprefiles $arg" + prev= + else + deplibs="$deplibs $arg" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + done # argument parsing loop + + if test -n "$prev"; then + $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + # Infer tagged configuration to use if any are available and + # if one wasn't chosen via the "--tag" command line option. + # Only attempt this if the compiler in the base link + # command doesn't match the default compiler. + if test -n "$available_tags" && test -z "$tagname"; then + case $base_compile in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`" + case $base_compile in + "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) + # The compiler in $compile_command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + $echo "$modename: unable to infer tagged configuration" + $echo "$modename: specify a tag with \`--tag'" 1>&2 + exit 1 + # else + # $echo "$modename: using $tagname tagged configuration" + fi + ;; + esac + fi + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` + libobjs_save="$libobjs" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` + if test "X$output_objdir" = "X$output"; then + output_objdir="$objdir" + else + output_objdir="$output_objdir/$objdir" + fi + # Create the object directory. + if test ! -d "$output_objdir"; then + $show "$mkdir $output_objdir" + $run $mkdir $output_objdir + status=$? + if test "$status" -ne 0 && test ! -d "$output_objdir"; then + exit $status + fi + fi + + # Determine the type of output + case $output in + "") + $echo "$modename: you must specify an output file" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + case $host in + *cygwin* | *mingw* | *pw32*) + # don't eliminate duplcations in $postdeps and $predeps + duplicate_compiler_generated_deps=yes + ;; + *) + duplicate_compiler_generated_deps=$duplicate_deps + ;; + esac + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if test "X$duplicate_deps" = "Xyes" ; then + case "$libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + libs="$libs $deplib" + done + + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; + esac + pre_post_deps="$pre_post_deps $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries + case $linkmode in + lib) + passes="conv link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 + exit 1 + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + for pass in $passes; do + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + esac + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + for deplib in $libs; do + lib= + found=no + case $deplib in + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 + continue + fi + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` + for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do + for search_ext in .la $shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if (${SED} -e '2q' $lib | + grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + library_names= + old_library= + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + fi + ;; # -l + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + ;; + *) + $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) lib="$deplib" ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + if test "$deplibs_check_method" != pass_all; then + $echo + $echo "*** Warning: Trying to link with static lib archive $deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because the file extensions .$libext of this argument makes me believe" + $echo "*** that it is just a static archive that I should not used here." + else + $echo + $echo "*** Warning: Linking the shared library $output against the" + $echo "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + newdlprefiles="$newdlprefiles $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + newdlfiles="$newdlfiles $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + if test "$found" = yes || test -f "$lib"; then : + else + $echo "$modename: cannot find the library \`$lib'" 1>&2 + exit 1 + fi + + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit 1 + fi + + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + + # Read the .la file + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && dlfiles="$dlfiles $dlopen" + test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" + fi + + if test "$pass" = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit 1 + fi + # It is a libtool convenience library, so add in its objects. + convenience="$convenience $ladir/$objdir/$old_library" + old_convenience="$old_convenience $ladir/$objdir/$old_library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + elif test "$linkmode" != prog && test "$linkmode" != lib; then + $echo "$modename: \`$lib' is not a convenience library" 1>&2 + exit 1 + fi + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + for l in $old_library $library_names; do + linklib="$l" + done + if test -z "$linklib"; then + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit 1 + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 + exit 1 + fi + if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + dlprefiles="$dlprefiles $lib $dependency_libs" + else + newdlfiles="$newdlfiles $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 + $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 + abs_ladir="$ladir" + fi + ;; + esac + laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + $echo "$modename: warning: library \`$lib' was moved." 1>&2 + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$libdir" + absdir="$libdir" + fi + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + fi # $installed = yes + name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 + exit 1 + fi + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + newdlprefiles="$newdlprefiles $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + newdlprefiles="$newdlprefiles $dir/$dlname" + else + newdlprefiles="$newdlprefiles $dir/$linklib" + fi + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test "$linkmode" = prog && test "$pass" != link; then + newlib_search_path="$newlib_search_path $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { test "$prefer_static_libs" = no || test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var"; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath " in + *" $dir "*) ;; + *" $absdir "*) ;; + *) temp_rpath="$temp_rpath $dir" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + if test -n "$library_names" && + { test "$prefer_static_libs" = no || test -z "$old_library"; }; then + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" + need_relink=yes + fi + # This is a shared library + + # Warn about portability, can't link against -module's on some systems (darwin) + if test "$shouldnotlink" = yes && test "$pass" = link ; then + $echo + if test "$linkmode" = prog; then + $echo "*** Warning: Linking the executable $output against the loadable module" + else + $echo "*** Warning: Linking the shared library $output against the loadable module" + fi + $echo "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + realname="$2" + shift; shift + libname=`eval \\$echo \"$libname_spec\"` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw*) + major=`expr $current - $age` + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + soname=`$echo $soroot | ${SED} -e 's/^.*\///'` + newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + $show "extracting exported symbol list from \`$soname'" + save_ifs="$IFS"; IFS='~' + eval cmds=\"$extract_expsyms_cmds\" + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + $show "generating import library for \`$soname'" + save_ifs="$IFS"; IFS='~' + eval cmds=\"$old_archive_from_expsyms_cmds\" + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + case $host in + *-*-sco3.2v5* ) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a module then we can not link against it, someone + # is ignoring the new warnings I added + if /usr/bin/file -L $add 2> /dev/null | grep "bundle" >/dev/null ; then + $echo "** Warning, lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + $echo + $echo "** And there doesn't seem to be a static archive available" + $echo "** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + fi + esac + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$dir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case "$libdir" in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + $echo "$modename: configuration error: unsupported hardcode properties" + exit 1 + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && \ + test "$hardcode_minus_L" != yes && \ + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + fi + fi + fi + + if test "$linkmode" = prog || test "$mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case "$libdir" in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + $echo + $echo "*** Warning: This system can not link to static lib archive $lib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + $echo "*** But as you try to build a module library, libtool will still create " + $echo "*** a static module, that should work as long as the dlopening application" + $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + $echo + $echo "*** However, this would only work if libtool was able to extract symbol" + $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + $echo "*** not find such a program. So, this module is probably useless." + $echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + convenience="$convenience $dir/$old_library" + old_convenience="$old_convenience $dir/$old_library" + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) xrpath="$xrpath $temp_xrpath";; + esac;; + *) temp_deplibs="$temp_deplibs $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + newlib_search_path="$newlib_search_path $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + case $deplib in + -L*) path="$deplib" ;; + *.la) + dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$deplib" && dir="." + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + fi + ;; + esac + if grep "^installed=no" $deplib > /dev/null; then + path="$absdir/$objdir" + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit 1 + fi + if test "$absdir" != "$libdir"; then + $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 + fi + path="$absdir" + fi + depdepl= + case $host in + *-*-darwin*) + # we do not want to link against static libs, but need to link against shared + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$path/$depdepl" ; then + depdepl="$path/$depdepl" + fi + # do not add paths which are already there + case " $newlib_search_path " in + *" $path "*) ;; + *) newlib_search_path="$newlib_search_path $path";; + esac + path="" + fi + ;; + *) + path="-L$path" + ;; + esac + + ;; + -l*) + case $host in + *-*-darwin*) + # Again, we only want to link against shared libraries + eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` + for tmp in $newlib_search_path ; do + if test -f "$tmp/lib$tmp_libs.dylib" ; then + eval depdepl="$tmp/lib$tmp_libs.dylib" + break + fi + done + path="" + ;; + *) continue ;; + esac + ;; + *) continue ;; + esac + case " $deplibs " in + *" $depdepl "*) ;; + *) deplibs="$deplibs $depdepl" ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$deplibs $path" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) lib_search_path="$lib_search_path $dir" ;; + esac + done + newlib_search_path= + fi + + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs (they stay in deplibs) + tmp_libs= + for i in $dependency_libs ; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i="" + ;; + esac + if test -n "$i" ; then + tmp_libs="$tmp_libs $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 + fi + + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 + fi + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + objs="$objs$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + eval shared_ext=\"$shrext\" + eval libname=\"$libname_spec\" + ;; + *) + if test "$module" = no; then + $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + eval shared_ext=\"$shrext\" + eval libname=\"$libname_spec\" + else + libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 + exit 1 + else + $echo + $echo "*** Warning: Linking the shared library $output against the non-libtool" + $echo "*** objects $objs is not portable!" + libobjs="$libobjs $objs" + fi + fi + + if test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 + fi + + set dummy $rpath + if test "$#" -gt 2; then + $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 + fi + install_libdir="$2" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 + fi + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + IFS="$save_ifs" + + if test -n "$8"; then + $echo "$modename: too many parameters to \`-version-info'" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$2" + number_minor="$3" + number_revision="$4" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # which has an extra 1 added just for fun + # + case $version_type in + darwin|linux|osf|windows) + current=`expr $number_major + $number_minor` + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + current=`expr $number_major + $number_minor - 1` + age="$number_minor" + revision="$number_minor" + ;; + esac + ;; + no) + current="$2" + revision="$3" + age="$4" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; + *) + $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + ;; + esac + + case $revision in + 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; + *) + $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + ;; + esac + + case $age in + 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; + *) + $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + ;; + esac + + if test "$age" -gt "$current"; then + $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + minor_current=`expr $current + 1` + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current"; + ;; + + irix | nonstopux) + major=`expr $current - $age + 1` + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + iface=`expr $revision - $loop` + loop=`expr $loop - 1` + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + ;; + + osf) + major=.`expr $current - $age` + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + iface=`expr $current - $loop` + loop=`expr $loop - 1` + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring="$verstring:${current}.0" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + major=`expr $current - $age` + versuffix="-$major" + ;; + + *) + $echo "$modename: unknown library version type \`$version_type'" 1>&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit 1 + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + fi + + if test "$mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$echo "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + removelist="$removelist $p" + ;; + *) ;; + esac + done + if test -n "$removelist"; then + $show "${rm}r $removelist" + $run ${rm}r $removelist + fi + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + oldlibs="$oldlibs $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + for path in $notinst_path; do + lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'` + deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'` + dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'` + done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + temp_xrpath="$temp_xrpath -R$libdir" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) dlfiles="$dlfiles $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) dlprefiles="$dlprefiles $lib" ;; + esac + done + + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + deplibs="$deplibs -framework System" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + deplibs="$deplibs -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $rm conftest.c + cat > conftest.c </dev/null` + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null \ + | grep " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ + | ${SED} 10q \ + | $EGREP "$file_magic_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $echo + $echo "*** Warning: linker path does not have real file for library $a_deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $echo "*** with $libname but no candidates were found. (...for file magic test)" + else + $echo "*** with $libname and none of the candidates passed a file format test" + $echo "*** using a file magic. Last file checked: $potlib" + fi + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + for a_deplib in $deplibs; do + name="`expr $a_deplib : '-l\(.*\)'`" + # If $name is empty we are operating on a -L argument. + if test -n "$name" && test "$name" != "0"; then + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then + libname=`eval \\$echo \"$libname_spec\"` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval $echo \"$potent_lib\" 2>/dev/null \ + | ${SED} 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $echo + $echo "*** Warning: linker path does not have real file for library $a_deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $echo "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $echo "*** with $libname and none of the candidates passed a file format test" + $echo "*** using a regex pattern. Last file checked: $potlib" + fi + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ + -e 's/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` + done + fi + if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ + | grep . >/dev/null; then + $echo + if test "X$deplibs_check_method" = "Xnone"; then + $echo "*** Warning: inter-library dependencies are not supported in this platform." + else + $echo "*** Warning: inter-library dependencies are not known to be supported." + fi + $echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + fi + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + $echo + $echo "*** Warning: libtool could not satisfy all declared inter-library" + $echo "*** dependencies of module $libname. Therefore, libtool will create" + $echo "*** a static module, that should work as long as the dlopening" + $echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + $echo + $echo "*** However, this would only work if libtool was able to extract symbol" + $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + $echo "*** not find such a program. So, this module is probably useless." + $echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + $echo "*** The inter-library dependencies that have been dropped here will be" + $echo "*** automatically added whenever a program is linked with this library" + $echo "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + $echo + $echo "*** Since this library must not contain undefined symbols," + $echo "*** because either the platform does not support them or" + $echo "*** it was explicitly requested with -no-undefined," + $echo "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + dep_rpath="$dep_rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + if test -n "$hardcode_libdir_flag_spec_ld"; then + eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" + else + eval dep_rpath=\"$hardcode_libdir_flag_spec\" + fi + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + realname="$2" + shift; shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib="$output_objdir/$realname" + for link + do + linknames="$linknames $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + eval cmds=\"$export_symbols_cmds\" + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + if len=`expr "X$cmd" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + $show "$cmd" + $run eval "$cmd" || exit $? + skipped_export=false + else + # The command line is too long to execute in one step. + $show "using reloadable object file for export list..." + skipped_export=: + fi + done + IFS="$save_ifs" + if test -n "$export_symbols_regex"; then + $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" + $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + $show "$mv \"${export_symbols}T\" \"$export_symbols\"" + $run eval '$mv "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + tmp_deplibs="$tmp_deplibs $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + else + gentop="$output_objdir/${outputname}x" + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "$mkdir $gentop" + $run $mkdir "$gentop" + status=$? + if test "$status" -ne 0 && test ! -d "$gentop"; then + exit $status + fi + generated="$generated $gentop" + + for xlib in $convenience; do + # Extract the objects. + case $xlib in + [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; + *) xabs=`pwd`"/$xlib" ;; + esac + xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` + xdir="$gentop/$xlib" + + $show "${rm}r $xdir" + $run ${rm}r "$xdir" + $show "$mkdir $xdir" + $run $mkdir "$xdir" + status=$? + if test "$status" -ne 0 && test ! -d "$xdir"; then + exit $status + fi + # We will extract separately just the conflicting names and we will no + # longer touch any unique names. It is faster to leave these extract + # automatically by $AR in one run. + $show "(cd $xdir && $AR x $xabs)" + $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? + if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 + $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 + $AR t "$xabs" | sort | uniq -cd | while read -r count name + do + i=1 + while test "$i" -le "$count" + do + # Put our $i before any first dot (extension) + # Never overwrite any file + name_to="$name" + while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" + do + name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` + done + $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" + $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? + i=`expr $i + 1` + done + done + fi + + libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + done + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + linker_flags="$linker_flags $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval cmds=\"$module_expsym_cmds\" + else + eval cmds=\"$module_cmds\" + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval cmds=\"$archive_expsym_cmds\" + else + eval cmds=\"$archive_cmds\" + fi + fi + + if test "X$skipped_export" != "X:" && len=`expr "X$cmds" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise. + $echo "creating reloadable object files..." + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + delfiles= + last_robj= + k=1 + output=$output_objdir/$save_output-${k}.$objext + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + eval test_cmds=\"$reload_cmds $objlist $last_robj\" + if test "X$objlist" = X || + { len=`expr "X$test_cmds" : ".*"` && + test "$len" -le "$max_cmd_len"; }; then + objlist="$objlist $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + eval concat_cmds=\"$reload_cmds $objlist $last_robj\" + else + # All subsequent reloadable object files will link in + # the last one created. + eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" + fi + last_robj=$output_objdir/$save_output-${k}.$objext + k=`expr $k + 1` + output=$output_objdir/$save_output-${k}.$objext + objlist=$obj + len=1 + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + + if ${skipped_export-false}; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + libobjs=$output + # Append the command to create the export file. + eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" + fi + + # Set up a command to remove the reloadale object files + # after they are used. + i=0 + while test "$i" -lt "$k" + do + i=`expr $i + 1` + delfiles="$delfiles $output_objdir/$save_output-${i}.$objext" + done + + $echo "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval cmds=\"$archive_expsym_cmds\" + else + eval cmds=\"$archive_cmds\" + fi + + # Append the command to remove the reloadable object files + # to the just-reset $cmds. + eval cmds=\"\$cmds~$rm $delfiles\" + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? + exit 0 + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" + $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + obj) + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 + fi + + case $output in + *.lo) + if test -n "$objs$old_deplibs"; then + $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 + exit 1 + fi + libobj="$output" + obj=`$echo "X$output" | $Xsed -e "$lo2o"` + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $run $rm $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" + else + gentop="$output_objdir/${obj}x" + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "$mkdir $gentop" + $run $mkdir "$gentop" + status=$? + if test "$status" -ne 0 && test ! -d "$gentop"; then + exit $status + fi + generated="$generated $gentop" + + for xlib in $convenience; do + # Extract the objects. + case $xlib in + [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; + *) xabs=`pwd`"/$xlib" ;; + esac + xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` + xdir="$gentop/$xlib" + + $show "${rm}r $xdir" + $run ${rm}r "$xdir" + $show "$mkdir $xdir" + $run $mkdir "$xdir" + status=$? + if test "$status" -ne 0 && test ! -d "$xdir"; then + exit $status + fi + # We will extract separately just the conflicting names and we will no + # longer touch any unique names. It is faster to leave these extract + # automatically by $AR in one run. + $show "(cd $xdir && $AR x $xabs)" + $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? + if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 + $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 + $AR t "$xabs" | sort | uniq -cd | while read -r count name + do + i=1 + while test "$i" -le "$count" + do + # Put our $i before any first dot (extension) + # Never overwrite any file + name_to="$name" + while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" + do + name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` + done + $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" + $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? + i=`expr $i + 1` + done + done + fi + + reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + done + fi + fi + + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + + output="$obj" + eval cmds=\"$reload_cmds\" + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit 0 + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $run eval "echo timestamp > $libobj" || exit $? + exit 0 + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + eval cmds=\"$reload_cmds\" + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit 0 + ;; + + prog) + case $host in + *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; + esac + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 + fi + + if test "$preload" = yes; then + if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && + test "$dlopen_self_static" = unknown; then + $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." + fi + fi + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + + case $host in + *darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + if test "$tagname" = CXX ; then + compile_command="$compile_command ${wl}-bind_at_load" + finalize_command="$finalize_command ${wl}-bind_at_load" + fi + ;; + esac + + compile_command="$compile_command $compile_deplibs" + finalize_command="$finalize_command $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + case :$dllsearchpath: in + *":$libdir:"*) ;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + fi + + dlsyms= + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + dlsyms="${outputname}S.c" + else + $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 + fi + fi + + if test -n "$dlsyms"; then + case $dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${outputname}.nm" + + $show "$rm $nlist ${nlist}S ${nlist}T" + $run $rm "$nlist" "${nlist}S" "${nlist}T" + + # Parse the name list into a source file. + $show "creating $output_objdir/$dlsyms" + + test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ + /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ + /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ + + #ifdef __cplusplus + extern \"C\" { + #endif + + /* Prevent the only kind of declaration conflicts we can make. */ + #define lt_preloaded_symbols some_other_symbol + + /* External symbol declarations for the compiler. */\ + " + + if test "$dlself" = yes; then + $show "generating symbol list for \`$output'" + + test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + for arg in $progfiles; do + $show "extracting global C symbols from \`$arg'" + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + if test -n "$export_symbols_regex"; then + $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$output.exp" + $run $rm $export_symbols + $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + else + $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' + $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' + $run eval 'mv "$nlist"T "$nlist"' + fi + fi + + for arg in $dlprefiles; do + $show "extracting global C symbols from \`$arg'" + name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` + $run eval '$echo ": $name " >> "$nlist"' + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -z "$run"; then + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $mv "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if grep -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + grep -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' + else + $echo '/* NONE */' >> "$output_objdir/$dlsyms" + fi + + $echo >> "$output_objdir/$dlsyms" "\ + + #undef lt_preloaded_symbols + + #if defined (__STDC__) && __STDC__ + # define lt_ptr void * + #else + # define lt_ptr char * + # define const + #endif + + /* The mapping between symbol names and symbols. */ + const struct { + const char *name; + lt_ptr address; + } + lt_preloaded_symbols[] = + {\ + " + + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" + + $echo >> "$output_objdir/$dlsyms" "\ + {0, (lt_ptr) 0} + }; + + /* This works around a problem in FreeBSD linker */ + #ifdef FREEBSD_WORKAROUND + static const void *lt_preloaded_setup() { + return lt_preloaded_symbols; + } + #endif + + #ifdef __cplusplus + } + #endif\ + " + fi + + pic_flag_for_symtable= + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; + esac;; + *-*-hpux*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag";; + esac + esac + + # Now compile the dynamic symbol file. + $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" + $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? + + # Clean up the generated files. + $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" + $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" + + # Transform the symbol file into the correct name. + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + ;; + *) + $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 + exit 1 + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + fi + + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + # Replace the output file specification. + compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + $show "$link_command" + $run eval "$link_command" + status=$? + + # Delete the generated files. + if test -n "$dlsyms"; then + $show "$rm $output_objdir/${outputname}S.${objext}" + $run $rm "$output_objdir/${outputname}S.${objext}" + fi + + exit $status + fi + + if test -n "$shlibpath_var"; then + # We should set the shlibpath_var + rpath= + for dir in $temp_rpath; do + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) + # Absolute path. + rpath="$rpath$dir:" + ;; + *) + # Relative path: add a thisdir entry. + rpath="$rpath\$thisdir/$dir:" + ;; + esac + done + temp_rpath="$rpath" + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + rpath="$rpath$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $run $rm $output + # Link the executable and exit + $show "$link_command" + $run eval "$link_command" || exit $? + exit 0 + fi + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 + $echo "$modename: \`$output' will be relinked during installation" 1>&2 + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname + + $show "$link_command" + $run eval "$link_command" || exit $? + + # Now create the wrapper script. + $show "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + fi + + # Quote $echo for shipping. + if test "X$echo" = "X$SHELL $0 --fallback-echo"; then + case $0 in + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; + *) qecho="$SHELL `pwd`/$0 --fallback-echo";; + esac + qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` + else + qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` + fi + + # Only actually do things if our run command is non-null. + if test -z "$run"; then + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + cwrappersource=`$echo ${objdir}/lt-${output}.c` + cwrapper=`$echo ${output}.exe` + $rm $cwrappersource $cwrapper + trap "$rm $cwrappersource $cwrapper; exit 1" 1 2 15 + + cat > $cwrappersource <> $cwrappersource<<"EOF" + #include + #include + #include + #include + #include + #include + + #if defined(PATH_MAX) + # define LT_PATHMAX PATH_MAX + #elif defined(MAXPATHLEN) + # define LT_PATHMAX MAXPATHLEN + #else + # define LT_PATHMAX 1024 + #endif + + #ifndef DIR_SEPARATOR + #define DIR_SEPARATOR '/' + #endif + + #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) + #define HAVE_DOS_BASED_FILE_SYSTEM + #ifndef DIR_SEPARATOR_2 + #define DIR_SEPARATOR_2 '\\' + #endif + #endif + + #ifndef DIR_SEPARATOR_2 + # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) + #else /* DIR_SEPARATOR_2 */ + # define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) + #endif /* DIR_SEPARATOR_2 */ + + #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) + #define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ + } while (0) + + const char *program_name = NULL; + + void * xmalloc (size_t num); + char * xstrdup (const char *string); + char * basename (const char *name); + char * fnqualify(const char *path); + char * strendzap(char *str, const char *pat); + void lt_fatal (const char *message, ...); + + int + main (int argc, char *argv[]) + { + char **newargz; + int i; + + program_name = (char *) xstrdup ((char *) basename (argv[0])); + newargz = XMALLOC(char *, argc+2); + EOF + + cat >> $cwrappersource <> $cwrappersource <<"EOF" + newargz[1] = fnqualify(argv[0]); + /* we know the script has the same name, without the .exe */ + /* so make sure newargz[1] doesn't end in .exe */ + strendzap(newargz[1],".exe"); + for (i = 1; i < argc; i++) + newargz[i+1] = xstrdup(argv[i]); + newargz[argc+1] = NULL; + EOF + + cat >> $cwrappersource <> $cwrappersource <<"EOF" + } + + void * + xmalloc (size_t num) + { + void * p = (void *) malloc (num); + if (!p) + lt_fatal ("Memory exhausted"); + + return p; + } + + char * + xstrdup (const char *string) + { + return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL + ; + } + + char * + basename (const char *name) + { + const char *base; + + #if defined (HAVE_DOS_BASED_FILE_SYSTEM) + /* Skip over the disk name in MSDOS pathnames. */ + if (isalpha (name[0]) && name[1] == ':') + name += 2; + #endif + + for (base = name; *name; name++) + if (IS_DIR_SEPARATOR (*name)) + base = name + 1; + return (char *) base; + } + + char * + fnqualify(const char *path) + { + size_t size; + char *p; + char tmp[LT_PATHMAX + 1]; + + assert(path != NULL); + + /* Is it qualified already? */ + #if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha (path[0]) && path[1] == ':') + return xstrdup (path); + #endif + if (IS_DIR_SEPARATOR (path[0])) + return xstrdup (path); + + /* prepend the current directory */ + /* doesn't handle '~' */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */ + p = XMALLOC(char, size); + sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path); + return p; + } + + char * + strendzap(char *str, const char *pat) + { + size_t len, patlen; + + assert(str != NULL); + assert(pat != NULL); + + len = strlen(str); + patlen = strlen(pat); + + if (patlen <= len) + { + str += len - patlen; + if (strcmp(str, pat) == 0) + *str = '\0'; + } + return str; + } + + static void + lt_error_core (int exit_status, const char * mode, + const char * message, va_list ap) + { + fprintf (stderr, "%s: %s: ", program_name, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); + } + + void + lt_fatal (const char *message, ...) + { + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + va_end (ap); + } + EOF + # we should really use a build-platform specific compiler + # here, but OTOH, the wrappers (shell script and this C one) + # are only useful if you want to execute the "real" binary. + # Since the "real" binary is built for $host, then this + # wrapper might as well be built for $host, too. + $run $LTCC -s -o $cwrapper $cwrappersource + ;; + esac + $rm $output + trap "$rm $output; exit 1" 1 2 15 + + $echo > $output "\ + #! $SHELL + + # $output - temporary wrapper script for $objdir/$outputname + # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP + # + # The $output program cannot be directly executed until all the libtool + # libraries that it depends on are installed. + # + # This wrapper script should never be moved out of the build directory. + # If it is, it will not operate correctly. + + # Sed substitution that helps us do robust quoting. It backslashifies + # metacharacters that are still active within double-quoted strings. + Xsed='${SED} -e 1s/^X//' + sed_quote_subst='$sed_quote_subst' + + # The HP-UX ksh and POSIX shell print the target directory to stdout + # if CDPATH is set. + if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi + + relink_command=\"$relink_command\" + + # This environment variable determines our operation mode. + if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variable: + notinst_deplibs='$notinst_deplibs' + else + # When we are sourced in execute mode, \$file and \$echo are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + echo=\"$qecho\" + file=\"\$0\" + # Make sure echo works. + if test \"X\$1\" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift + elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then + # Yippee, \$echo works! + : + else + # Restart under the correct shell, and then maybe \$echo will work. + exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} + fi + fi\ + " + $echo >> $output "\ + + # Find the directory that this script lives in. + thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` + done + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" + " + + if test "$fast_install" = yes; then + $echo >> $output "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || \\ + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $mkdir \"\$progdir\" + else + $rm \"\$progdir/\$file\" + fi" + + $echo >> $output "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $echo \"\$relink_command_output\" >&2 + $rm \"\$progdir/\$file\" + exit 1 + fi + fi + + $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $rm \"\$progdir/\$program\"; + $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $rm \"\$progdir/\$file\" + fi" + else + $echo >> $output "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" + " + fi + + $echo >> $output "\ + + if test -f \"\$progdir/\$program\"; then" + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $echo >> $output "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + + export $shlibpath_var + " + fi + + # fixup the dll searchpath if we need to. + if test -n "$dllsearchpath"; then + $echo >> $output "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH + " + fi + + $echo >> $output "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. + " + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2*) + $echo >> $output "\ + exec \$progdir\\\\\$program \${1+\"\$@\"} + " + ;; + + *) + $echo >> $output "\ + exec \$progdir/\$program \${1+\"\$@\"} + " + ;; + esac + $echo >> $output "\ + \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" + exit 1 + fi + else + # The program doesn't exist. + \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 + \$echo \"This script is just a wrapper for \$program.\" 1>&2 + $echo \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi + fi\ + " + chmod +x $output + fi + exit 0 + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$old_deplibs $non_pic_objects" + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "$mkdir $gentop" + $run $mkdir "$gentop" + status=$? + if test "$status" -ne 0 && test ! -d "$gentop"; then + exit $status + fi + generated="$generated $gentop" + + # Add in members from convenience archives. + for xlib in $addlibs; do + # Extract the objects. + case $xlib in + [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; + *) xabs=`pwd`"/$xlib" ;; + esac + xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` + xdir="$gentop/$xlib" + + $show "${rm}r $xdir" + $run ${rm}r "$xdir" + $show "$mkdir $xdir" + $run $mkdir "$xdir" + status=$? + if test "$status" -ne 0 && test ! -d "$xdir"; then + exit $status + fi + # We will extract separately just the conflicting names and we will no + # longer touch any unique names. It is faster to leave these extract + # automatically by $AR in one run. + $show "(cd $xdir && $AR x $xabs)" + $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? + if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 + $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 + $AR t "$xabs" | sort | uniq -cd | while read -r count name + do + i=1 + while test "$i" -le "$count" + do + # Put our $i before any first dot (extension) + # Never overwrite any file + name_to="$name" + while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" + do + name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` + done + $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" + $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? + i=`expr $i + 1` + done + done + fi + + oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` + done + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + eval cmds=\"$old_archive_from_new_cmds\" + else + eval cmds=\"$old_archive_cmds\" + + if len=`expr "X$cmds" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # the command line is too long to link in one step, link in parts + $echo "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + # GNU ar 2.10+ was changed to match POSIX; thus no paths are + # encoded into archives. This makes 'ar r' malfunction in + # this piecewise linking case whenever conflicting object + # names appear in distinct ar calls; check, warn and compensate. + if (for obj in $save_oldobjs + do + $echo "X$obj" | $Xsed -e 's%^.*/%%' + done | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2 + $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2 + AR_FLAGS=cq + fi + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + for obj in $save_oldobjs + do + oldobjs="$objlist $obj" + objlist="$objlist $obj" + eval test_cmds=\"$old_archive_cmds\" + if len=`expr "X$test_cmds" : ".*"` && + test "$len" -le "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~$old_archive_cmds\" + fi + fi + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$generated"; then + $show "${rm}r$generated" + $run ${rm}r$generated + fi + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + $show "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + # Only create the output if not a dry run. + if test -z "$run"; then + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit 1 + fi + newdependency_libs="$newdependency_libs $libdir/$name" + ;; + *) newdependency_libs="$newdependency_libs $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + for lib in $dlfiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit 1 + fi + newdlfiles="$newdlfiles $libdir/$name" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit 1 + fi + newdlprefiles="$newdlprefiles $libdir/$name" + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlfiles="$newdlfiles $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlprefiles="$newdlprefiles $abs" + done + dlprefiles="$newdlprefiles" + fi + $rm $output + # place dlname in correct position for cygwin + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + esac + $echo > $output "\ + # $outputname - a libtool library file + # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP + # + # Please DO NOT delete this file! + # It is necessary for linking the library. + + # The name that we can dlopen(3). + dlname='$tdlname' + + # Names of this library. + library_names='$library_names' + + # The name of the static archive. + old_library='$old_library' + + # Libraries that this one depends upon. + dependency_libs='$dependency_libs' + + # Version information for $libname. + current=$current + age=$age + revision=$revision + + # Is this an already installed library? + installed=$installed + + # Should we warn about portability when linking against -modules? + shouldnotlink=$module + + # Files to dlopen/dlpreopen + dlopen='$dlfiles' + dlpreopen='$dlprefiles' + + # Directory that this library needs to be installed in: + libdir='$install_libdir'" + if test "$installed" = no && test "$need_relink" = yes; then + $echo >> $output "\ + relink_command=\"$relink_command\"" + fi + done + fi + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" + $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? + ;; + esac + exit 0 + ;; + + # libtool install mode + install) + modename="$modename: install" + + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then + # Aesthetically quote it. + arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + install_prog="$arg " + arg="$1" + shift + else + install_prog= + arg="$nonopt" + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog$arg" + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + for arg + do + if test -n "$dest"; then + files="$files $dest" + dest="$arg" + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) prev="-f" ;; + -g) prev="-g" ;; + -m) prev="-m" ;; + -o) prev="-o" ;; + -s) + stripme=" -s" + continue + ;; + -*) ;; + + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + prev= + else + dest="$arg" + continue + fi + ;; + esac + + # Aesthetically quote the argument. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog $arg" + done + + if test -z "$install_prog"; then + $echo "$modename: you must specify an install program" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + if test -n "$prev"; then + $echo "$modename: the \`$prev' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + if test -z "$files"; then + if test -z "$dest"; then + $echo "$modename: no file or destination specified" 1>&2 + else + $echo "$modename: you must specify a destination" 1>&2 + fi + $echo "$help" 1>&2 + exit 1 + fi + + # Strip any trailing slash from the destination. + dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` + test "X$destdir" = "X$dest" && destdir=. + destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` + + # Not a directory, so check to see that there is only one file specified. + set dummy $files + if test "$#" -gt 2; then + $echo "$modename: \`$dest' is not a directory" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + staticlibs="$staticlibs $file" + ;; + + *.la) + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + library_names= + old_library= + relink_command= + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) current_libdirs="$current_libdirs $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs="$future_libdirs $libdir" ;; + esac + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ + test "X$dir" = "X$file/" && dir= + dir="$dir$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + if test "$inst_prefix_dir" = "$destdir"; then + $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 + exit 1 + fi + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + fi + + $echo "$modename: warning: relinking \`$file'" 1>&2 + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + exit 1 + fi + fi + + # See the names of the shared library. + set dummy $library_names + if test -n "$2"; then + realname="$2" + shift + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + $show "$install_prog $dir/$srcname $destdir/$realname" + $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? + if test -n "$stripme" && test -n "$striplib"; then + $show "$striplib $destdir/$realname" + $run eval "$striplib $destdir/$realname" || exit $? + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + for linkname + do + if test "$linkname" != "$realname"; then + $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" + $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" + fi + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + eval cmds=\"$postinstall_cmds\" + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + # Install the pseudo-library for information purposes. + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + instname="$dir/$name"i + $show "$install_prog $instname $destdir/$name" + $run eval "$install_prog $instname $destdir/$name" || exit $? + + # Maybe install the static library, too. + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + esac + + # Install the libtool object if requested. + if test -n "$destfile"; then + $show "$install_prog $file $destfile" + $run eval "$install_prog $file $destfile" || exit $? + fi + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` + + $show "$install_prog $staticobj $staticdest" + $run eval "$install_prog \$staticobj \$staticdest" || exit $? + fi + exit 0 + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + file=`$echo $file|${SED} 's,.exe$,,'` + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin*|*mingw*) + wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` + ;; + *) + wrapper=$file + ;; + esac + if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then + notinst_deplibs= + relink_command= + + # To insure that "foo" is sourced, and not "foo.exe", + # finese the cygwin/MSYS system by explicitly sourcing "foo." + # which disallows the automatic-append-.exe behavior. + case $build in + *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; + *) wrapperdot=${wrapper} ;; + esac + # If there is no directory component, then add one. + case $file in + */* | *\\*) . ${wrapperdot} ;; + *) . ./${wrapperdot} ;; + esac + + # Check the variables that should have been set. + if test -z "$notinst_deplibs"; then + $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 + exit 1 + fi + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + # If there is no directory component, then add one. + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + fi + libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 + finalize=no + fi + done + + relink_command= + # To insure that "foo" is sourced, and not "foo.exe", + # finese the cygwin/MSYS system by explicitly sourcing "foo." + # which disallows the automatic-append-.exe behavior. + case $build in + *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; + *) wrapperdot=${wrapper} ;; + esac + # If there is no directory component, then add one. + case $file in + */* | *\\*) . ${wrapperdot} ;; + *) . ./${wrapperdot} ;; + esac + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + if test "$finalize" = yes && test -z "$run"; then + tmpdir="/tmp" + test -n "$TMPDIR" && tmpdir="$TMPDIR" + tmpdir="$tmpdir/libtool-$$" + if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : + else + $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 + continue + fi + file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + ${rm}r "$tmpdir" + continue + fi + file="$outputname" + else + $echo "$modename: warning: cannot relink \`$file'" 1>&2 + fi + else + # Install the binary that we compiled earlier. + file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyways + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` + ;; + esac + ;; + esac + $show "$install_prog$stripme $file $destfile" + $run eval "$install_prog\$stripme \$file \$destfile" || exit $? + test -n "$outputname" && ${rm}r "$tmpdir" + ;; + esac + done + + for file in $staticlibs; do + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + $show "$install_prog $file $oldlib" + $run eval "$install_prog \$file \$oldlib" || exit $? + + if test -n "$stripme" && test -n "$striplib"; then + $show "$old_striplib $oldlib" + $run eval "$old_striplib $oldlib" || exit $? + fi + + # Do each command in the postinstall commands. + eval cmds=\"$old_postinstall_cmds\" + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$future_libdirs"; then + $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 + fi + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + test -n "$run" && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $0 --finish$current_libdirs' + else + exit 0 + fi + ;; + + # libtool finish mode + finish) + modename="$modename: finish" + libdirs="$nonopt" + admincmds= + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for dir + do + libdirs="$libdirs $dir" + done + + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + eval cmds=\"$finish_cmds\" + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || admincmds="$admincmds + $cmd" + done + IFS="$save_ifs" + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $run eval "$cmds" || admincmds="$admincmds + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + test "$show" = : && exit 0 + + $echo "----------------------------------------------------------------------" + $echo "Libraries have been installed in:" + for libdir in $libdirs; do + $echo " $libdir" + done + $echo + $echo "If you ever happen to want to link against installed libraries" + $echo "in a given directory, LIBDIR, you must either use libtool, and" + $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + $echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + $echo " during execution" + fi + if test -n "$runpath_var"; then + $echo " - add LIBDIR to the \`$runpath_var' environment variable" + $echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $echo " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $echo " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + $echo + $echo "See any operating system documentation about shared libraries for" + $echo "more information, such as the ld(1) and ld.so(8) manual pages." + $echo "----------------------------------------------------------------------" + exit 0 + ;; + + # libtool execute mode + execute) + modename="$modename: execute" + + # The first argument is the command name. + cmd="$nonopt" + if test -z "$cmd"; then + $echo "$modename: you must specify a COMMAND" 1>&2 + $echo "$help" + exit 1 + fi + + # Handle -dlopen flags immediately. + for file in $execute_dlfiles; do + if test ! -f "$file"; then + $echo "$modename: \`$file' is not a file" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + dir= + case $file in + *.la) + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + # Read the libtool library. + dlname= + library_names= + + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" + continue + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit 1 + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + ;; + + *) + $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -*) ;; + *) + # Do a test to see if this is really a libtool program. + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` + args="$args \"$file\"" + done + + if test -z "$run"; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + if test "${save_LC_ALL+set}" = set; then + LC_ALL="$save_LC_ALL"; export LC_ALL + fi + if test "${save_LANG+set}" = set; then + LANG="$save_LANG"; export LANG + fi + + # Now prepare to actually exec the command. + exec_cmd="\$cmd$args" + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" + $echo "export $shlibpath_var" + fi + $echo "$cmd$args" + exit 0 + fi + ;; + + # libtool clean and uninstall mode + clean | uninstall) + modename="$modename: $mode" + rm="$nonopt" + files= + rmforce= + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + for arg + do + case $arg in + -f) rm="$rm $arg"; rmforce=yes ;; + -*) rm="$rm $arg" ;; + *) files="$files $arg" ;; + esac + done + + if test -z "$rm"; then + $echo "$modename: you must specify an RM program" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + rmdirs= + + origobjdir="$objdir" + for file in $files; do + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + if test "X$dir" = "X$file"; then + dir=. + objdir="$origobjdir" + else + objdir="$dir/$origobjdir" + fi + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + test "$mode" = uninstall && objdir="$dir" + + # Remember objdir for removal later, being careful to avoid duplicates + if test "$mode" = clean; then + case " $rmdirs " in + *" $objdir "*) ;; + *) rmdirs="$rmdirs $objdir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if (test -L "$file") >/dev/null 2>&1 \ + || (test -h "$file") >/dev/null 2>&1 \ + || test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi + + rmfiles="$file" + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + . $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + rmfiles="$rmfiles $objdir/$n" + done + test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" + test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + + if test "$mode" = uninstall; then + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + eval cmds=\"$postuninstall_cmds\" + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + eval cmds=\"$old_postuninstall_cmds\" + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + # FIXME: should reinstall the best remaining shared library. + fi + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + + # Read the .lo file + . $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" \ + && test "$pic_object" != none; then + rmfiles="$rmfiles $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" \ + && test "$non_pic_object" != none; then + rmfiles="$rmfiles $dir/$non_pic_object" + fi + fi + ;; + + *) + if test "$mode" = clean ; then + noexename=$name + case $file in + *.exe) + file=`$echo $file|${SED} 's,.exe$,,'` + noexename=`$echo $name|${SED} 's,.exe$,,'` + # $file with .exe has already been added to rmfiles, + # add $file without .exe + rmfiles="$rmfiles $file" + ;; + esac + # Do a test to see if this is a libtool program. + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + relink_command= + . $dir/$noexename + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + rmfiles="$rmfiles $objdir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + rmfiles="$rmfiles $objdir/lt-${noexename}.c" + fi + fi + fi + ;; + esac + $show "$rm $rmfiles" + $run $rm $rmfiles || exit_status=1 + done + objdir="$origobjdir" + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + $show "rmdir $dir" + $run rmdir $dir >/dev/null 2>&1 + fi + done + + exit $exit_status + ;; + + "") + $echo "$modename: you must specify a MODE" 1>&2 + $echo "$generic_help" 1>&2 + exit 1 + ;; + esac + + if test -z "$exec_cmd"; then + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$generic_help" 1>&2 + exit 1 + fi + fi # test -z "$show_help" + + if test -n "$exec_cmd"; then + eval exec $exec_cmd + exit 1 + fi + + # We need to display help for each of the modes. + case $mode in + "") $echo \ + "Usage: $modename [OPTION]... [MODE-ARG]... + + Provide generalized library-building support services. + + --config show all configuration variables + --debug enable verbose shell tracing + -n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --finish same as \`--mode=finish' + --help display this help message and exit + --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] + --quiet same as \`--silent' + --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + --version print version information + + MODE must be one of the following: + + clean remove files from the build directory + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + + MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for + a more detailed description of MODE. + + Report bugs to ." + exit 0 + ;; + + clean) + $echo \ + "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + + Remove files from the build directory. + + RM is the name of the program to use to delete files associated with each FILE + (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed + to RM. + + If FILE is a libtool library, object or program, all the files associated + with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + + compile) + $echo \ + "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + + Compile a source file into a libtool library object. + + This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -prefer-pic try to building PIC objects only + -prefer-non-pic try to building non-PIC objects only + -static always build a \`.o' file suitable for static linking + + COMPILE-COMMAND is a command to be used in creating a \`standard' object file + from the given SOURCEFILE. + + The output file name is determined by removing the directory component from + SOURCEFILE, then substituting the C source code suffix \`.c' with the + library object suffix, \`.lo'." + ;; + + execute) + $echo \ + "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... + + Automatically set library path, then run a program. + + This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + + This mode sets the library path environment variable according to \`-dlopen' + flags. + + If any of the ARGS are libtool executable wrappers, then they are translated + into their corresponding uninstalled binary, and any of their required library + directories are added to the library path. + + Then, COMMAND is executed, with ARGS as arguments." + ;; + + finish) + $echo \ + "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... + + Complete the installation of libtool libraries. + + Each LIBDIR is a directory that contains libtool libraries. + + The commands that this mode executes may require superuser privileges. Use + the \`--dry-run' option if you just want to see what would be executed." + ;; + + install) + $echo \ + "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... + + Install executables or libraries. + + INSTALL-COMMAND is the installation command. The first component should be + either the \`install' or \`cp' program. + + The rest of the components are interpreted as arguments to that command (only + BSD-compatible install options are recognized)." + ;; + + link) + $echo \ + "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... + + Link object files or libraries together to form another library, or to + create an executable program. + + LINK-COMMAND is a command using the C compiler that you would use to create + a program from several object files. + + The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -static do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + + All other options (arguments beginning with \`-') are ignored. + + Every other argument is treated as a filename. Files ending in \`.la' are + treated as uninstalled libtool libraries, other files are standard or library + object files. + + If the OUTPUT-FILE ends in \`.la', then a libtool library is created, + only library objects (\`.lo' files) may be specified, and \`-rpath' is + required, except when creating a convenience library. + + If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created + using \`ar' and \`ranlib', or on Windows using \`lib'. + + If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file + is created, otherwise an executable program is created." + ;; + + uninstall) + $echo \ + "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + + Remove libraries from an installation directory. + + RM is the name of the program to use to delete files associated with each FILE + (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed + to RM. + + If FILE is a libtool library, all the files associated with it are deleted. + Otherwise, only FILE itself is deleted using RM." + ;; + + *) + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + esac + + $echo + $echo "Try \`$modename --help' for more information about other modes." + + exit 0 + + # The TAGs below are defined such that we never get into a situation + # in which we disable both kinds of libraries. Given conflicting + # choices, we go for a static library, that is the most portable, + # since we can't tell whether shared libraries were disabled because + # the user asked for that or because the platform doesn't support + # them. This is particularly important on AIX, because we don't + # support having both static and shared libraries enabled at the same + # time on that platform, so we default to a shared-only configuration. + # If a disable-shared tag is given, we'll fallback to a static-only + # configuration. But we'll never go from static-only to shared-only. + + # ### BEGIN LIBTOOL TAG CONFIG: disable-shared + build_libtool_libs=no + build_old_libs=yes + # ### END LIBTOOL TAG CONFIG: disable-shared + + # ### BEGIN LIBTOOL TAG CONFIG: disable-static + build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` + # ### END LIBTOOL TAG CONFIG: disable-static + + # Local Variables: + # mode:shell-script + # sh-indentation:2 + # End: diff -Nrc3pad gcc-3.3.3/libjava/libltdl/Makefile.am gcc-3.4.0/libjava/libltdl/Makefile.am *** gcc-3.3.3/libjava/libltdl/Makefile.am 2000-09-10 08:04:40.000000000 +0000 --- gcc-3.4.0/libjava/libltdl/Makefile.am 2003-12-16 21:48:24.000000000 +0000 *************** if CONVENIENCE_LTDL *** 15,22 **** noinst_LTLIBRARIES = libltdlc.la endif libltdl_la_SOURCES = ltdl.c ! libltdl_la_LDFLAGS = -no-undefined -version-info 2:0:2 libltdl_la_LIBADD = $(LIBADD_DL) libltdlc_la_SOURCES = ltdl.c --- 15,26 ---- noinst_LTLIBRARIES = libltdlc.la endif + ## Make sure these will be cleaned even when they're not built by + ## default. + CLEANFILES = libltdl.la libltdlc.la + libltdl_la_SOURCES = ltdl.c ! libltdl_la_LDFLAGS = -no-undefined -version-info 4:0:1 libltdl_la_LIBADD = $(LIBADD_DL) libltdlc_la_SOURCES = ltdl.c *************** libltdlc_la_LIBADD = $(LIBADD_DL) *** 25,31 **** ## Because we do not have automatic dependency tracking: ltdl.lo: ltdl.h config.h ! $(OBJECTS): libtool libtool: $(LIBTOOL_DEPS) $(SHELL) ./config.status --recheck --- 29,35 ---- ## Because we do not have automatic dependency tracking: ltdl.lo: ltdl.h config.h ! $(libltdl_la_OBJECTS) $(libltdlc_la_OBJECTS): libtool libtool: $(LIBTOOL_DEPS) $(SHELL) ./config.status --recheck diff -Nrc3pad gcc-3.3.3/libjava/libltdl/Makefile.in gcc-3.4.0/libjava/libltdl/Makefile.in *** gcc-3.3.3/libjava/libltdl/Makefile.in 2004-02-14 20:34:20.000000000 +0000 --- gcc-3.4.0/libjava/libltdl/Makefile.in 2004-04-19 02:23:04.000000000 +0000 *************** *** 1,6 **** ! # Makefile.in generated automatically by automake 1.4 from Makefile.am ! # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. --- 1,8 ---- ! # Makefile.in generated by automake 1.7.9 from Makefile.am. ! # @configure_input@ ! # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 ! # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. *************** *** 10,254 **** # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. ! ! SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ - prefix = @prefix@ - exec_prefix = @exec_prefix@ - - bindir = @bindir@ - sbindir = @sbindir@ - libexecdir = @libexecdir@ - datadir = @datadir@ - sysconfdir = @sysconfdir@ - sharedstatedir = @sharedstatedir@ - localstatedir = @localstatedir@ - libdir = @libdir@ - infodir = @infodir@ - mandir = @mandir@ - includedir = @includedir@ - oldincludedir = /usr/include - - DESTDIR = - pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ - top_builddir = . ! ACLOCAL = @ACLOCAL@ ! AUTOCONF = @AUTOCONF@ ! AUTOMAKE = @AUTOMAKE@ ! AUTOHEADER = @AUTOHEADER@ ! INSTALL = @INSTALL@ ! INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) ! INSTALL_DATA = @INSTALL_DATA@ ! INSTALL_SCRIPT = @INSTALL_SCRIPT@ ! transform = @program_transform_name@ ! NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : - host_alias = @host_alias@ host_triplet = @host@ AS = @AS@ CC = @CC@ CXX = @CXX@ CXXCPP = @CXXCPP@ DLLTOOL = @DLLTOOL@ EXEEXT = @EXEEXT@ ! GCINCS = @GCINCS@ ! GCJ = @GCJ@ ! GCJFLAGS = @GCJFLAGS@ LIBADD_DL = @LIBADD_DL@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ STRIP = @STRIP@ VERSION = @VERSION@ ! mkinstalldirs = @mkinstalldirs@ AUTOMAKE_OPTIONS = no-dependencies foreign INCLUDES = $(GCINCS) ! @INSTALL_LTDL_TRUE@include_HEADERS = \ ! @INSTALL_LTDL_TRUE@ltdl.h ! @INSTALL_LTDL_TRUE@lib_LTLIBRARIES = \ ! @INSTALL_LTDL_TRUE@libltdl.la ! @INSTALL_LTDL_FALSE@noinst_HEADERS = \ ! @INSTALL_LTDL_FALSE@ltdl.h ! @CONVENIENCE_LTDL_TRUE@noinst_LTLIBRARIES = \ ! @CONVENIENCE_LTDL_TRUE@libltdlc.la libltdl_la_SOURCES = ltdl.c ! libltdl_la_LDFLAGS = -no-undefined -version-info 2:0:2 libltdl_la_LIBADD = $(LIBADD_DL) libltdlc_la_SOURCES = ltdl.c libltdlc_la_LIBADD = $(LIBADD_DL) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 CONFIG_HEADER = config.h ! CONFIG_CLEAN_FILES = ! LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) ! DEFS = @DEFS@ -I. -I$(srcdir) -I. ! CPPFLAGS = @CPPFLAGS@ ! LDFLAGS = @LDFLAGS@ ! LIBS = @LIBS@ ! libltdl_la_DEPENDENCIES = ! libltdl_la_OBJECTS = ltdl.lo ! libltdlc_la_LDFLAGS = ! libltdlc_la_DEPENDENCIES = ! libltdlc_la_OBJECTS = ltdl.lo ! CFLAGS = @CFLAGS@ ! COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) ! LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) ! LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ ! HEADERS = $(include_HEADERS) $(noinst_HEADERS) ! ! DIST_COMMON = README ./stamp-h.in COPYING.LIB ChangeLog Makefile.am \ ! Makefile.in acconfig.h acinclude.m4 aclocal.m4 config.h.in configure \ ! configure.in ! ! ! DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) ! TAR = tar ! GZIP_ENV = --best SOURCES = $(libltdl_la_SOURCES) $(libltdlc_la_SOURCES) - OBJECTS = $(libltdl_la_OBJECTS) $(libltdlc_la_OBJECTS) ! all: all-redirect ! .SUFFIXES: ! .SUFFIXES: .S .c .lo .o .obj .s ! $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ! cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile ! Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ! cd $(top_builddir) \ ! && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status ! $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4 ! cd $(srcdir) && $(ACLOCAL) ! config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck ! $(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) ! config.h: stamp-h ! @if test ! -f $@; then \ ! rm -f stamp-h; \ ! $(MAKE) stamp-h; \ ! else :; fi ! stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status ! cd $(top_builddir) \ ! && CONFIG_FILES= CONFIG_HEADERS=config.h \ ! $(SHELL) ./config.status ! @echo timestamp > stamp-h 2> /dev/null ! $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in @if test ! -f $@; then \ ! rm -f $(srcdir)/stamp-h.in; \ ! $(MAKE) $(srcdir)/stamp-h.in; \ else :; fi - $(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h - cd $(top_srcdir) && $(AUTOHEADER) - @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null ! mostlyclean-hdr: ! clean-hdr: distclean-hdr: ! -rm -f config.h ! ! maintainer-clean-hdr: ! ! mostlyclean-libLTLIBRARIES: ! ! clean-libLTLIBRARIES: ! -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) ! ! distclean-libLTLIBRARIES: ! ! maintainer-clean-libLTLIBRARIES: ! install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libdir) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ ! echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \ ! $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) ! list='$(lib_LTLIBRARIES)'; for p in $$list; do \ ! $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ done ! mostlyclean-noinstLTLIBRARIES: clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) ! ! distclean-noinstLTLIBRARIES: ! ! maintainer-clean-noinstLTLIBRARIES: ! ! .c.o: ! $(COMPILE) -c $< ! ! # FIXME: We should only use cygpath when building on Windows, ! # and only if it is available. ! .c.obj: ! $(COMPILE) -c `cygpath -w $<` ! ! .s.o: ! $(COMPILE) -c $< ! ! .S.o: ! $(COMPILE) -c $< mostlyclean-compile: ! -rm -f *.o core *.core ! -rm -f *.$(OBJEXT) ! ! clean-compile: distclean-compile: -rm -f *.tab.c ! maintainer-clean-compile: ! ! .c.lo: ! $(LIBTOOL) --mode=compile $(COMPILE) -c $< ! .s.lo: ! $(LIBTOOL) --mode=compile $(COMPILE) -c $< ! .S.lo: ! $(LIBTOOL) --mode=compile $(COMPILE) -c $< mostlyclean-libtool: -rm -f *.lo --- 12,297 ---- # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. ! @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . ! am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ ! install_sh_DATA = $(install_sh) -c -m 644 ! install_sh_PROGRAM = $(install_sh) -c ! install_sh_SCRIPT = $(install_sh) -c ! INSTALL_HEADER = $(INSTALL_DATA) ! transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ + ACLOCAL = @ACLOCAL@ + AMDEP_FALSE = @AMDEP_FALSE@ + AMDEP_TRUE = @AMDEP_TRUE@ + AMTAR = @AMTAR@ + AR = @AR@ AS = @AS@ + AUTOCONF = @AUTOCONF@ + AUTOHEADER = @AUTOHEADER@ + AUTOMAKE = @AUTOMAKE@ + AWK = @AWK@ CC = @CC@ + CCDEPMODE = @CCDEPMODE@ + CFLAGS = @CFLAGS@ + CONVENIENCE_LTDL_FALSE = @CONVENIENCE_LTDL_FALSE@ + CONVENIENCE_LTDL_TRUE = @CONVENIENCE_LTDL_TRUE@ + CPP = @CPP@ + CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ + CXXDEPMODE = @CXXDEPMODE@ + CXXFLAGS = @CXXFLAGS@ + CYGPATH_W = @CYGPATH_W@ + DEFS = @DEFS@ + DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ + ECHO = @ECHO@ + ECHO_C = @ECHO_C@ + ECHO_N = @ECHO_N@ + ECHO_T = @ECHO_T@ + EGREP = @EGREP@ EXEEXT = @EXEEXT@ ! F77 = @F77@ ! FFLAGS = @FFLAGS@ ! INSTALL_DATA = @INSTALL_DATA@ ! INSTALL_LTDL_FALSE = @INSTALL_LTDL_FALSE@ ! INSTALL_LTDL_TRUE = @INSTALL_LTDL_TRUE@ ! INSTALL_PROGRAM = @INSTALL_PROGRAM@ ! INSTALL_SCRIPT = @INSTALL_SCRIPT@ ! INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ ! LDFLAGS = @LDFLAGS@ LIBADD_DL = @LIBADD_DL@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ + LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ + MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ + MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ + PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ + SET_MAKE = @SET_MAKE@ + SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ! ac_ct_AR = @ac_ct_AR@ ! ac_ct_AS = @ac_ct_AS@ ! ac_ct_CC = @ac_ct_CC@ ! ac_ct_CXX = @ac_ct_CXX@ ! ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ ! ac_ct_F77 = @ac_ct_F77@ ! ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ ! ac_ct_RANLIB = @ac_ct_RANLIB@ ! ac_ct_STRIP = @ac_ct_STRIP@ ! am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ ! am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ ! am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ ! am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ ! am__include = @am__include@ ! am__leading_dot = @am__leading_dot@ ! am__quote = @am__quote@ ! bindir = @bindir@ ! build = @build@ ! build_alias = @build_alias@ ! build_cpu = @build_cpu@ ! build_os = @build_os@ ! build_vendor = @build_vendor@ ! datadir = @datadir@ ! exec_prefix = @exec_prefix@ ! host = @host@ ! host_alias = @host_alias@ ! host_cpu = @host_cpu@ ! host_os = @host_os@ ! host_vendor = @host_vendor@ ! includedir = @includedir@ ! infodir = @infodir@ ! install_sh = @install_sh@ ! libdir = @libdir@ ! libexecdir = @libexecdir@ ! localstatedir = @localstatedir@ ! mandir = @mandir@ ! oldincludedir = @oldincludedir@ ! prefix = @prefix@ ! program_transform_name = @program_transform_name@ ! sbindir = @sbindir@ ! sharedstatedir = @sharedstatedir@ ! sysconfdir = @sysconfdir@ ! target_alias = @target_alias@ AUTOMAKE_OPTIONS = no-dependencies foreign INCLUDES = $(GCINCS) ! @INSTALL_LTDL_TRUE@include_HEADERS = ltdl.h ! @INSTALL_LTDL_TRUE@lib_LTLIBRARIES = libltdl.la ! @INSTALL_LTDL_FALSE@noinst_HEADERS = ltdl.h ! @CONVENIENCE_LTDL_TRUE@noinst_LTLIBRARIES = libltdlc.la ! ! CLEANFILES = libltdl.la libltdlc.la libltdl_la_SOURCES = ltdl.c ! libltdl_la_LDFLAGS = -no-undefined -version-info 4:0:1 libltdl_la_LIBADD = $(LIBADD_DL) libltdlc_la_SOURCES = ltdl.c libltdlc_la_LIBADD = $(LIBADD_DL) + subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h ! CONFIG_CLEAN_FILES = ! LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) + libltdl_la_DEPENDENCIES = + am_libltdl_la_OBJECTS = ltdl.lo + libltdl_la_OBJECTS = $(am_libltdl_la_OBJECTS) + libltdlc_la_LDFLAGS = + libltdlc_la_DEPENDENCIES = + am_libltdlc_la_OBJECTS = ltdl.lo + libltdlc_la_OBJECTS = $(am_libltdlc_la_OBJECTS) ! DEFAULT_INCLUDES = -I. -I$(srcdir) -I. ! depcomp = ! am__depfiles_maybe = ! COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ ! $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) ! LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ ! $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) ! LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ ! $(AM_LDFLAGS) $(LDFLAGS) -o $@ ! DIST_SOURCES = $(libltdl_la_SOURCES) $(libltdlc_la_SOURCES) ! HEADERS = $(include_HEADERS) $(noinst_HEADERS) ! DIST_COMMON = README $(include_HEADERS) $(noinst_HEADERS) \ ! $(srcdir)/Makefile.in $(srcdir)/configure COPYING.LIB ChangeLog \ ! Makefile.am acinclude.m4 aclocal.m4 config-h.in config.guess \ ! config.sub configure configure.ac install-sh ltmain.sh missing \ ! mkinstalldirs SOURCES = $(libltdl_la_SOURCES) $(libltdlc_la_SOURCES) ! all: config.h ! $(MAKE) $(AM_MAKEFLAGS) all-am ! .SUFFIXES: ! .SUFFIXES: .c .lo .o .obj ! am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ ! configure.lineno ! $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) ! cd $(top_srcdir) && \ ! $(AUTOMAKE) --foreign Makefile ! Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status ! cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe) ! $(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck ! $(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) ! $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.ac acinclude.m4 ! cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) ! ! config.h: stamp-h1 @if test ! -f $@; then \ ! rm -f stamp-h1; \ ! $(MAKE) stamp-h1; \ else :; fi ! stamp-h1: $(srcdir)/config-h.in $(top_builddir)/config.status ! @rm -f stamp-h1 ! cd $(top_builddir) && $(SHELL) ./config.status config.h ! $(srcdir)/config-h.in: @MAINTAINER_MODE_TRUE@ $(top_srcdir)/configure.ac $(ACLOCAL_M4) ! cd $(top_srcdir) && $(AUTOHEADER) ! touch $(srcdir)/config-h.in distclean-hdr: ! -rm -f config.h stamp-h1 ! libLTLIBRARIES_INSTALL = $(INSTALL) install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libdir) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ ! f="`echo $$p | sed -e 's|^.*/||'`"; \ ! echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f"; \ ! $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) ! @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ ! p="`echo $$p | sed -e 's|^.*/||'`"; \ ! echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p"; \ ! $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ done ! clean-libLTLIBRARIES: ! -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) ! @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ ! dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ ! test "$$dir" = "$$p" && dir=.; \ ! echo "rm -f \"$${dir}/so_locations\""; \ ! rm -f "$${dir}/so_locations"; \ ! done clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) ! @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ ! dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ ! test "$$dir" = "$$p" && dir=.; \ ! echo "rm -f \"$${dir}/so_locations\""; \ ! rm -f "$${dir}/so_locations"; \ ! done ! libltdl.la: $(libltdl_la_OBJECTS) $(libltdl_la_DEPENDENCIES) ! $(LINK) -rpath $(libdir) $(libltdl_la_LDFLAGS) $(libltdl_la_OBJECTS) $(libltdl_la_LIBADD) $(LIBS) ! libltdlc.la: $(libltdlc_la_OBJECTS) $(libltdlc_la_DEPENDENCIES) ! $(LINK) $(libltdlc_la_LDFLAGS) $(libltdlc_la_OBJECTS) $(libltdlc_la_LIBADD) $(LIBS) mostlyclean-compile: ! -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c ! .c.o: ! $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< ! .c.obj: ! $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` ! .c.lo: ! $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< mostlyclean-libtool: -rm -f *.lo *************** clean-libtool: *** 257,457 **** -rm -rf .libs _libs distclean-libtool: ! ! maintainer-clean-libtool: ! ! libltdl.la: $(libltdl_la_OBJECTS) $(libltdl_la_DEPENDENCIES) ! $(LINK) -rpath $(libdir) $(libltdl_la_LDFLAGS) $(libltdl_la_OBJECTS) $(libltdl_la_LIBADD) $(LIBS) ! ! libltdlc.la: $(libltdlc_la_OBJECTS) $(libltdlc_la_DEPENDENCIES) ! $(LINK) $(libltdlc_la_LDFLAGS) $(libltdlc_la_OBJECTS) $(libltdlc_la_LIBADD) $(LIBS) ! install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(includedir) @list='$(include_HEADERS)'; for p in $$list; do \ ! if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ ! echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p"; \ ! $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) ! list='$(include_HEADERS)'; for p in $$list; do \ ! rm -f $(DESTDIR)$(includedir)/$$p; \ done tags: TAGS ! ID: $(HEADERS) $(SOURCES) $(LISP) ! list='$(SOURCES) $(HEADERS)'; \ ! unique=`for i in $$list; do echo $$i; done | \ ! awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ ! here=`pwd` && cd $(srcdir) \ ! && mkid -f$$here/ID $$unique $(LISP) ! TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ ! list='$(SOURCES) $(HEADERS)'; \ ! unique=`for i in $$list; do echo $$i; done | \ ! awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ ! test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \ ! || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS) ! mostlyclean-tags: ! clean-tags: distclean-tags: ! -rm -f TAGS ID ! ! maintainer-clean-tags: distdir = $(PACKAGE)-$(VERSION) ! top_distdir = $(distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist ! -rm -rf $(distdir) ! GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz ! mkdir $(distdir)/=build ! mkdir $(distdir)/=inst ! dc_install_base=`cd $(distdir)/=inst && pwd`; \ ! cd $(distdir)/=build \ ! && ../configure --srcdir=.. --prefix=$$dc_install_base \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ ! && $(MAKE) $(AM_MAKEFLAGS) dist ! -rm -rf $(distdir) ! @banner="$(distdir).tar.gz is ready for distribution"; \ ! dashes=`echo "$$banner" | sed s/./=/g`; \ ! echo "$$dashes"; \ ! echo "$$banner"; \ ! echo "$$dashes" ! dist: distdir ! -chmod -R a+r $(distdir) ! GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) ! -rm -rf $(distdir) ! dist-all: distdir ! -chmod -R a+r $(distdir) ! GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) ! -rm -rf $(distdir) ! distdir: $(DISTFILES) ! -rm -rf $(distdir) ! mkdir $(distdir) ! -chmod 777 $(distdir) ! @for file in $(DISTFILES); do \ ! d=$(srcdir); \ ! if test -d $$d/$$file; then \ ! cp -pr $$/$$file $(distdir)/$$file; \ ! else \ ! test -f $(distdir)/$$file \ ! || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ ! || cp -p $$d/$$file $(distdir)/$$file || :; \ ! fi; \ ! done ! info-am: ! info: info-am ! dvi-am: ! dvi: dvi-am check-am: all-am check: check-am ! installcheck-am: ! installcheck: installcheck-am ! all-recursive-am: config.h ! $(MAKE) $(AM_MAKEFLAGS) all-recursive ! install-exec-am: install-libLTLIBRARIES install-exec: install-exec-am - - install-data-am: install-includeHEADERS install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - install: install-am - uninstall-am: uninstall-libLTLIBRARIES uninstall-includeHEADERS - uninstall: uninstall-am - all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h - all-redirect: all-am - install-strip: - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install - installdirs: - $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) - mostlyclean-generic: clean-generic: distclean-generic: ! -rm -f Makefile $(CONFIG_CLEAN_FILES) ! -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: ! mostlyclean-am: mostlyclean-hdr mostlyclean-libLTLIBRARIES \ ! mostlyclean-noinstLTLIBRARIES mostlyclean-compile \ ! mostlyclean-libtool mostlyclean-tags \ ! mostlyclean-generic ! mostlyclean: mostlyclean-am ! clean-am: clean-hdr clean-libLTLIBRARIES clean-noinstLTLIBRARIES \ ! clean-compile clean-libtool clean-tags clean-generic \ ! mostlyclean-am ! clean: clean-am ! distclean-am: distclean-hdr distclean-libLTLIBRARIES \ ! distclean-noinstLTLIBRARIES distclean-compile \ ! distclean-libtool distclean-tags distclean-generic \ ! clean-am ! -rm -f libtool ! distclean: distclean-am ! -rm -f config.status ! maintainer-clean-am: maintainer-clean-hdr \ ! maintainer-clean-libLTLIBRARIES \ ! maintainer-clean-noinstLTLIBRARIES \ ! maintainer-clean-compile maintainer-clean-libtool \ ! maintainer-clean-tags maintainer-clean-generic \ ! distclean-am ! @echo "This command is intended for maintainers to use;" ! @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-am ! -rm -f config.status ! .PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ ! mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \ ! clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \ ! uninstall-libLTLIBRARIES install-libLTLIBRARIES \ ! mostlyclean-noinstLTLIBRARIES distclean-noinstLTLIBRARIES \ ! clean-noinstLTLIBRARIES maintainer-clean-noinstLTLIBRARIES \ ! mostlyclean-compile distclean-compile clean-compile \ ! maintainer-clean-compile mostlyclean-libtool distclean-libtool \ ! clean-libtool maintainer-clean-libtool uninstall-includeHEADERS \ ! install-includeHEADERS tags mostlyclean-tags distclean-tags clean-tags \ ! maintainer-clean-tags distdir info-am info dvi-am dvi check check-am \ ! installcheck-am installcheck all-recursive-am install-exec-am \ ! install-exec install-data-am install-data install-am install \ ! uninstall-am uninstall all-redirect all-am all installdirs \ ! mostlyclean-generic distclean-generic clean-generic \ ! maintainer-clean-generic clean mostlyclean distclean maintainer-clean ltdl.lo: ltdl.h config.h ! $(OBJECTS): libtool libtool: $(LIBTOOL_DEPS) $(SHELL) ./config.status --recheck --- 300,592 ---- -rm -rf .libs _libs distclean-libtool: ! -rm -f libtool ! uninstall-info-am: ! includeHEADERS_INSTALL = $(INSTALL_HEADER) install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(includedir) @list='$(include_HEADERS)'; for p in $$list; do \ ! if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ ! f="`echo $$p | sed -e 's|^.*/||'`"; \ ! echo " $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f"; \ ! $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) ! @list='$(include_HEADERS)'; for p in $$list; do \ ! f="`echo $$p | sed -e 's|^.*/||'`"; \ ! echo " rm -f $(DESTDIR)$(includedir)/$$f"; \ ! rm -f $(DESTDIR)$(includedir)/$$f; \ done + ETAGS = etags + ETAGSFLAGS = + + CTAGS = ctags + CTAGSFLAGS = + tags: TAGS ! ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ! list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ ! unique=`for i in $$list; do \ ! if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ! done | \ ! $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ ! mkid -fID $$unique ! TAGS: $(HEADERS) $(SOURCES) config-h.in $(TAGS_DEPENDENCIES) \ ! $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ ! list='$(SOURCES) $(HEADERS) config-h.in $(LISP) $(TAGS_FILES)'; \ ! unique=`for i in $$list; do \ ! if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ! done | \ ! $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ ! test -z "$(ETAGS_ARGS)$$tags$$unique" \ ! || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ ! $$tags $$unique ! ctags: CTAGS ! CTAGS: $(HEADERS) $(SOURCES) config-h.in $(TAGS_DEPENDENCIES) \ ! $(TAGS_FILES) $(LISP) ! tags=; \ ! here=`pwd`; \ ! list='$(SOURCES) $(HEADERS) config-h.in $(LISP) $(TAGS_FILES)'; \ ! unique=`for i in $$list; do \ ! if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ! done | \ ! $(AWK) ' { files[$$0] = 1; } \ ! END { for (i in files) print i; }'`; \ ! test -z "$(CTAGS_ARGS)$$tags$$unique" \ ! || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ ! $$tags $$unique ! GTAGS: ! here=`$(am__cd) $(top_builddir) && pwd` \ ! && cd $(top_srcdir) \ ! && gtags -i $(GTAGS_ARGS) $$here distclean-tags: ! -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags ! DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + top_distdir = . distdir = $(PACKAGE)-$(VERSION) ! ! am__remove_distdir = \ ! { test ! -d $(distdir) \ ! || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ ! && rm -fr $(distdir); }; } ! ! GZIP_ENV = --best ! distuninstallcheck_listfiles = find . -type f -print ! distcleancheck_listfiles = find . -type f -print ! ! distdir: $(DISTFILES) ! $(am__remove_distdir) ! mkdir $(distdir) ! @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ ! topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ ! list='$(DISTFILES)'; for file in $$list; do \ ! case $$file in \ ! $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ ! $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ ! esac; \ ! if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ ! dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ ! if test "$$dir" != "$$file" && test "$$dir" != "."; then \ ! dir="/$$dir"; \ ! $(mkinstalldirs) "$(distdir)$$dir"; \ ! else \ ! dir=''; \ ! fi; \ ! if test -d $$d/$$file; then \ ! if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ ! cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ ! fi; \ ! cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ ! else \ ! test -f $(distdir)/$$file \ ! || cp -p $$d/$$file $(distdir)/$$file \ ! || exit 1; \ ! fi; \ ! done ! -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ ! || chmod -R a+r $(distdir) ! dist-gzip: distdir ! $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz ! $(am__remove_distdir) ! ! dist dist-all: distdir ! $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz ! $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist ! $(am__remove_distdir) ! GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ! chmod -R a-w $(distdir); chmod a+w $(distdir) ! mkdir $(distdir)/_build ! mkdir $(distdir)/_inst ! chmod a-w $(distdir) ! dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ ! && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ ! && cd $(distdir)/_build \ ! && ../configure --srcdir=.. --prefix="$$dc_install_base" \ ! $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ ! && $(MAKE) $(AM_MAKEFLAGS) uninstall \ ! && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ ! distuninstallcheck \ ! && chmod -R a-w "$$dc_install_base" \ ! && ({ \ ! (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \ ! && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ ! && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ ! && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ ! distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ ! } || { rm -rf "$$dc_destdir"; exit 1; }) \ ! && rm -rf "$$dc_destdir" \ ! && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \ ! && rm -f $(distdir).tar.gz \ ! && $(MAKE) $(AM_MAKEFLAGS) distcleancheck ! $(am__remove_distdir) ! @echo "$(distdir).tar.gz is ready for distribution" | \ ! sed 'h;s/./=/g;p;x;p;x' ! distuninstallcheck: ! @cd $(distuninstallcheck_dir) \ ! && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ ! || { echo "ERROR: files left after uninstall:" ; \ ! if test -n "$(DESTDIR)"; then \ ! echo " (check DESTDIR support)"; \ ! fi ; \ ! $(distuninstallcheck_listfiles) ; \ ! exit 1; } >&2 ! distcleancheck: distclean ! @if test '$(srcdir)' = . ; then \ ! echo "ERROR: distcleancheck can only run from a VPATH build" ; \ ! exit 1 ; \ ! fi ! @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ ! || { echo "ERROR: files left in build directory after distclean:" ; \ ! $(distcleancheck_listfiles) ; \ ! exit 1; } >&2 check-am: all-am check: check-am ! all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h ! installdirs: ! $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) ! install: install-am install-exec: install-exec-am install-data: install-data-am + uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + installcheck: installcheck-am + install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: ! -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: ! @echo "This command is intended for maintainers to use" ! @echo "it deletes files that may require special tools to rebuild." ! clean: clean-am ! clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ ! clean-noinstLTLIBRARIES mostlyclean-am ! distclean: distclean-am ! -rm -f $(am__CONFIG_DISTCLEAN_FILES) ! -rm -f Makefile ! distclean-am: clean-am distclean-compile distclean-generic distclean-hdr \ ! distclean-libtool distclean-tags ! dvi: dvi-am ! dvi-am: ! info: info-am ! info-am: ! ! install-data-am: install-includeHEADERS ! ! install-exec-am: install-libLTLIBRARIES ! ! install-info: install-info-am ! ! install-man: ! ! installcheck-am: maintainer-clean: maintainer-clean-am ! -rm -f $(am__CONFIG_DISTCLEAN_FILES) ! -rm -rf $(top_srcdir)/autom4te.cache ! -rm -f Makefile ! maintainer-clean-am: distclean-am maintainer-clean-generic ! mostlyclean: mostlyclean-am ! ! mostlyclean-am: mostlyclean-compile mostlyclean-generic \ ! mostlyclean-libtool ! ! pdf: pdf-am ! ! pdf-am: ! ! ps: ps-am ! ! ps-am: ! ! uninstall-am: uninstall-includeHEADERS uninstall-info-am \ ! uninstall-libLTLIBRARIES ! ! .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ ! clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \ ! ctags dist dist-all dist-gzip distcheck distclean \ ! distclean-compile distclean-generic distclean-hdr \ ! distclean-libtool distclean-tags distcleancheck distdir \ ! distuninstallcheck dvi dvi-am info info-am install install-am \ ! install-data install-data-am install-exec install-exec-am \ ! install-includeHEADERS install-info install-info-am \ ! install-libLTLIBRARIES install-man install-strip installcheck \ ! installcheck-am installdirs maintainer-clean \ ! maintainer-clean-generic mostlyclean mostlyclean-compile \ ! mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ ! tags uninstall uninstall-am uninstall-includeHEADERS \ ! uninstall-info-am uninstall-libLTLIBRARIES ltdl.lo: ltdl.h config.h ! $(libltdl_la_OBJECTS) $(libltdlc_la_OBJECTS): libtool libtool: $(LIBTOOL_DEPS) $(SHELL) ./config.status --recheck *************** local-install-files: $(DISTFILES) *** 467,473 **** || cp $$d/$$file $(DESTDIR)$(datadir)/libtool/libltdl/$$file || :; \ fi; \ done - # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: --- 602,607 ---- diff -Nrc3pad gcc-3.3.3/libjava/libltdl/missing gcc-3.4.0/libjava/libltdl/missing *** gcc-3.3.3/libjava/libltdl/missing 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/libltdl/missing 2003-12-16 21:48:25.000000000 +0000 *************** *** 0 **** --- 1,336 ---- + #! /bin/sh + # Common stub for a few missing GNU programs while installing. + # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc. + # Originally by Fran,cois Pinard , 1996. + + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2, or (at your option) + # any later version. + + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + # 02111-1307, USA. + + # As a special exception to the GNU General Public License, if you + # distribute this file as part of a program that contains a + # configuration script generated by Autoconf, you may include it under + # the same distribution terms that you use for the rest of that program. + + if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + fi + + run=: + + # In the cases where this matters, `missing' is being run in the + # srcdir already. + if test -f configure.ac; then + configure_ac=configure.ac + else + configure_ac=configure.in + fi + + case "$1" in + --run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + ;; + esac + + # If it does not exist, or fails to run (possibly an outdated version), + # try to emulate it. + case "$1" in + + -h|--h|--he|--hel|--help) + echo "\ + $0 [OPTION]... PROGRAM [ARGUMENT]... + + Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an + error status if there is no known handling for PROGRAM. + + Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + + Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch]" + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing 0.4 - GNU automake" + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + + aclocal*) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ + WARNING: \`$1' is missing on your system. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ + WARNING: \`$1' is missing on your system. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ + WARNING: \`$1' is missing on your system. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case "$f" in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ + WARNING: \`$1' is missing on your system. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ + WARNING: \`$1' is needed, and you do not seem to have it handy on your + system. You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` + test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison|yacc) + echo 1>&2 "\ + WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if [ ! -f y.tab.h ]; then + echo >y.tab.h + fi + if [ ! -f y.tab.c ]; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex|flex) + echo 1>&2 "\ + WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if [ ! -f lex.yy.c ]; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ + WARNING: \`$1' is missing on your system. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` + fi + if [ -f "$file" ]; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit 1 + fi + ;; + + makeinfo) + if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then + # We have makeinfo, but it failed. + exit 1 + fi + + echo 1>&2 "\ + WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` + fi + touch $file + ;; + + tar) + shift + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + fi + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case "$firstarg" in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case "$firstarg" in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ + WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ + WARNING: \`$1' is needed, and you do not seem to have it handy on your + system. You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; + esac + + exit 0 diff -Nrc3pad gcc-3.3.3/libjava/libltdl/mkinstalldirs gcc-3.4.0/libjava/libltdl/mkinstalldirs *** gcc-3.3.3/libjava/libltdl/mkinstalldirs 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/libltdl/mkinstalldirs 2003-12-16 06:55:32.000000000 +0000 *************** *** 0 **** --- 1,111 ---- + #! /bin/sh + # mkinstalldirs --- make directory hierarchy + # Author: Noah Friedman + # Created: 1993-05-16 + # Public domain + + errstatus=0 + dirmode="" + + usage="\ + Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." + + # process command line arguments + while test $# -gt 0 ; do + case $1 in + -h | --help | --h*) # -h for help + echo "$usage" 1>&2 + exit 0 + ;; + -m) # -m PERM arg + shift + test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } + dirmode=$1 + shift + ;; + --) # stop option processing + shift + break + ;; + -*) # unknown option + echo "$usage" 1>&2 + exit 1 + ;; + *) # first non-opt arg + break + ;; + esac + done + + for file + do + if test -d "$file"; then + shift + else + break + fi + done + + case $# in + 0) exit 0 ;; + esac + + case $dirmode in + '') + if mkdir -p -- . 2>/dev/null; then + echo "mkdir -p -- $*" + exec mkdir -p -- "$@" + fi + ;; + *) + if mkdir -m "$dirmode" -p -- . 2>/dev/null; then + echo "mkdir -m $dirmode -p -- $*" + exec mkdir -m "$dirmode" -p -- "$@" + fi + ;; + esac + + for file + do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d + do + pathcomp="$pathcomp$d" + case $pathcomp in + -*) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + else + if test ! -z "$dirmode"; then + echo "chmod $dirmode $pathcomp" + lasterr="" + chmod "$dirmode" "$pathcomp" || lasterr=$? + + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi + fi + fi + + pathcomp="$pathcomp/" + done + done + + exit $errstatus + + # Local Variables: + # mode: shell-script + # sh-indentation: 2 + # End: + # mkinstalldirs ends here diff -Nrc3pad gcc-3.3.3/libjava/libltdl/README gcc-3.4.0/libjava/libltdl/README *** gcc-3.3.3/libjava/libltdl/README 2000-01-17 19:00:45.000000000 +0000 --- gcc-3.4.0/libjava/libltdl/README 2003-12-16 21:48:24.000000000 +0000 *************** It supports the following dlopen interfa *** 6,9 **** --- 6,10 ---- * LoadLibrary (Win16 and Win32) * load_add_on (BeOS) * GNU DLD (emulates dynamic linking for static libraries) + * dyld (darwin/Mac OS X) * libtool's dlpreopen diff -Nrc3pad gcc-3.3.3/libjava/libltdl/stamp-h.in gcc-3.4.0/libjava/libltdl/stamp-h.in *** gcc-3.3.3/libjava/libltdl/stamp-h.in 2004-02-14 20:34:20.000000000 +0000 --- gcc-3.4.0/libjava/libltdl/stamp-h.in 1970-01-01 00:00:00.000000000 +0000 *************** *** 1 **** - timestamp --- 0 ---- diff -Nrc3pad gcc-3.3.3/libjava/libtool-version gcc-3.4.0/libjava/libtool-version *** gcc-3.3.3/libjava/libtool-version 2002-12-20 01:47:32.000000000 +0000 --- gcc-3.4.0/libjava/libtool-version 2004-01-19 18:58:47.000000000 +0000 *************** *** 3,6 **** # a separate file so that version updates don't involve re-running # automake. # CURRENT:REVISION:AGE ! 4:0:0 --- 3,6 ---- # a separate file so that version updates don't involve re-running # automake. # CURRENT:REVISION:AGE ! 5:0:0 diff -Nrc3pad gcc-3.3.3/libjava/Makefile.am gcc-3.4.0/libjava/Makefile.am *** gcc-3.3.3/libjava/Makefile.am 2003-03-01 22:57:52.000000000 +0000 --- gcc-3.4.0/libjava/Makefile.am 2004-01-24 20:47:28.000000000 +0000 *************** *** 2,13 **** --- 2,24 ---- AUTOMAKE_OPTIONS = foreign + ACLOCAL_AMFLAGS = -I . + if TESTSUBDIR SUBDIRS = $(DIRLTDL) testsuite gcj include else SUBDIRS = $(DIRLTDL) gcj include endif + # write_entries_to_file - writes each entry in a list + # to the specified file. Each entry is written individually + # to accomodate systems with severe command-line-length + # limitations. + # Parameters: + # $(1): variable containing entries to iterate over + # $(2): output file + write_entries_to_file = $(shell rm -f $(2) || :) $(shell touch $(2)) $(foreach object,$(1),$(shell echo $(object) >> $(2))) + ## ################################################################ ## *************** cond_x_ltlibrary = *** 23,36 **** xlib_includes = endif ! toolexeclib_LTLIBRARIES = libgcj.la lib-org-xml-sax.la lib-org-w3c-dom.la $(cond_x_ltlibrary) toolexecmainlib_DATA = libgcj.spec jardir = $(datadir)/java jar_DATA = libgcj-@gcc_version@.jar ## FIXME: Using libdir violates GNU coding standards. secdir = $(libdir)/security ## For now, only on native systems. FIXME. if NATIVE --- 34,59 ---- xlib_includes = endif ! if GTK_AWT ! cond_gtk_ltlibrary = lib-gnu-java-awt-peer-gtk.la ! else ! cond_gtk_ltlibrary = ! endif ! ! toolexeclib_LTLIBRARIES = libgcj.la lib-org-xml-sax.la lib-org-w3c-dom.la \ ! $(cond_gtk_ltlibrary) $(cond_x_ltlibrary) toolexecmainlib_DATA = libgcj.spec + pkgconfigdir = $(libdir)/pkgconfig + pkgconfig_DATA = libgcj.pc + jardir = $(datadir)/java jar_DATA = libgcj-@gcc_version@.jar ## FIXME: Using libdir violates GNU coding standards. secdir = $(libdir)/security + ## Where to install default logging property file. + propdir = $(libdir) ## For now, only on native systems. FIXME. if NATIVE *************** if NULL_TARGET *** 52,61 **** ## In this case, gcj is found outside the build tree. However, zip is ## found in the build tree. ZIP = $(MULTIBUILDTOP)../$(COMPPATH)/fastjar/jar else ZIP = jar endif - GCJH = gcjh else # CANADIAN GCJH = $(MULTIBUILDTOP)../$(COMPPATH)/gcc/gcjh ZIP = $(MULTIBUILDTOP)../$(COMPPATH)/fastjar/jar --- 75,85 ---- ## In this case, gcj is found outside the build tree. However, zip is ## found in the build tree. ZIP = $(MULTIBUILDTOP)../$(COMPPATH)/fastjar/jar + GCJH = gcjh else ZIP = jar + GCJH = $(target_alias)-gcjh endif else # CANADIAN GCJH = $(MULTIBUILDTOP)../$(COMPPATH)/gcc/gcjh ZIP = $(MULTIBUILDTOP)../$(COMPPATH)/fastjar/jar *************** endif # CANADIAN *** 63,69 **** ## The compiler with whatever flags we want for both -c and -C ## compiles. ! GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 GCJCOMPILE = $(LIBTOOL) --tag=GCJ --mode=compile $(GCJ_WITH_FLAGS) -fclasspath= -fbootclasspath=$(here) $(JC1FLAGS) -MD -MT $@ -MF $(@:.lo=.d) -c GCJLINK = $(LIBTOOL) --tag=GCJ --mode=link $(GCJ) -L$(here) $(JC1FLAGS) $(LDFLAGS) -o $@ --- 87,93 ---- ## The compiler with whatever flags we want for both -c and -C ## compiles. ! GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated GCJCOMPILE = $(LIBTOOL) --tag=GCJ --mode=compile $(GCJ_WITH_FLAGS) -fclasspath= -fbootclasspath=$(here) $(JC1FLAGS) -MD -MT $@ -MF $(@:.lo=.d) -c GCJLINK = $(LIBTOOL) --tag=GCJ --mode=link $(GCJ) -L$(here) $(JC1FLAGS) $(LDFLAGS) -o $@ *************** GCC_UNWIND_INCLUDE = @GCC_UNWIND_INCLUDE *** 82,94 **** WARNINGS = -W -Wall ## We need _GNU_SOURCE defined for some Linux builds. It doesn't hurt ## to always define it. ! AM_CXXFLAGS = -fno-rtti -fnon-call-exceptions \ ## Some systems don't allow `$' in identifiers by default, so we force it. -fdollars-in-identifiers \ ## Detect bugs in the verifier implementation, and maybe other places. -Wswitch-enum \ @LIBGCJ_CXXFLAGS@ @X_CFLAGS@ $(WARNINGS) -D_GNU_SOURCE \ ! -DPREFIX="\"$(prefix)\"" if USING_GCC AM_CFLAGS = @LIBGCJ_CFLAGS@ $(WARNINGS) else --- 106,119 ---- WARNINGS = -W -Wall ## We need _GNU_SOURCE defined for some Linux builds. It doesn't hurt ## to always define it. ! AM_CXXFLAGS = -fno-rtti -fnon-call-exceptions $(THREADCXXFLAGS) \ ## Some systems don't allow `$' in identifiers by default, so we force it. -fdollars-in-identifiers \ ## Detect bugs in the verifier implementation, and maybe other places. -Wswitch-enum \ @LIBGCJ_CXXFLAGS@ @X_CFLAGS@ $(WARNINGS) -D_GNU_SOURCE \ ! -DPREFIX="\"$(prefix)\"" -DLIBDIR="\"$(libdir)\"" \ ! -DBOOT_CLASS_PATH="\"$(jardir)/$(jar_DATA)\"" if USING_GCC AM_CFLAGS = @LIBGCJ_CFLAGS@ $(WARNINGS) else *************** nat_files = $(nat_source_files:.cc=.lo) *** 115,120 **** --- 140,148 ---- x_nat_files = $(x_nat_source_files:.cc=.lo) ## Objects from C sources in subdirs. c_files = $(c_source_files:.c=.lo) + extra_cc_files = $(extra_cc_source_files:.cc=.lo) + ## Objects from gtk-related C sources in subdirs. + gtk_c_files = $(gtk_c_source_files:.c=.lo) ## Objects from Java sources in subdirs. javao_files = $(java_source_files:.java=.lo) \ $(built_java_source_files:.java=.lo) *************** libgcj_la_SOURCES = prims.cc jni.cc exce *** 124,136 **** resolve.cc defineclass.cc interpret.cc verify.cc \ $(nat_source_files) EXTRA_libgcj_la_SOURCES = boehm.cc nogc.cc posix-threads.cc no-threads.cc \ ! win32-threads.cc posix.cc win32.cc \ ! $(c_source_files) $(java_source_files) $(built_java_source_files) libgcj_la_DEPENDENCIES = libgcj-@gcc_version@.jar $(javao_files) \ ! $(c_files) $(GCOBJS) $(THREADOBJS) $(PLATFORMOBJS) $(LIBLTDL) \ ! $(LIBFFI) $(ZLIBS) $(GCLIBS) ! libgcj_la_LIBADD = $(javao_files) $(c_files) $(GCOBJS) \ $(THREADOBJS) $(PLATFORMOBJS) # Include THREADLIBS here to ensure that the correct version of # certain linuxthread functions get linked: --- 152,164 ---- resolve.cc defineclass.cc interpret.cc verify.cc \ $(nat_source_files) EXTRA_libgcj_la_SOURCES = boehm.cc nogc.cc posix-threads.cc no-threads.cc \ ! win32-threads.cc posix.cc win32.cc $(c_source_files) \ ! $(extra_cc_source_files) $(java_source_files) $(built_java_source_files) libgcj_la_DEPENDENCIES = libgcj-@gcc_version@.jar $(javao_files) \ ! $(c_files) $(extra_cc_files) $(GCOBJS) $(THREADOBJS) \ ! $(PLATFORMOBJS) $(LIBLTDL) $(LIBFFI) $(ZLIBS) $(GCLIBS) ! libgcj_la_LIBADD = $(javao_files) $(c_files) $(extra_cc_files) $(GCOBJS) \ $(THREADOBJS) $(PLATFORMOBJS) # Include THREADLIBS here to ensure that the correct version of # certain linuxthread functions get linked: *************** libgcj_la_LDFLAGS = -rpath $(toolexeclib *** 140,145 **** --- 168,290 ---- -version-info `grep -v '^\#' $(srcdir)/libtool-version` libgcj_la_LINK = $(LIBLINK) + # Gtk/Cairo JNI sources. + if GTK_CAIRO + gtk_cairo_c_source_files = \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeerMetrics.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGlyphVector.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c + else + gtk_cairo_c_source_files = + endif + + ## Gtk JNI sources. + gtk_c_source_files = \ + $(gtk_cairo_c_source_files) \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontMetrics.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCanvasPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImagePainter.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuBarPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPanelPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c \ + jni/gtk-peer/gthread-jni.c \ + jni/classpath/jcl.c \ + jni/classpath/jnilink.c \ + jni/classpath/native_state.c \ + jni/classpath/primlib.c + + ## Java sources for Gtk peers. + gtk_awt_peer_sources = \ + gnu/java/awt/peer/gtk/GdkClasspathFontPeer.java \ + gnu/java/awt/peer/gtk/GdkClasspathFontPeerMetrics.java \ + gnu/java/awt/peer/gtk/GdkFontMetrics.java \ + gnu/java/awt/peer/gtk/GdkGlyphVector.java \ + gnu/java/awt/peer/gtk/GdkGraphics.java \ + gnu/java/awt/peer/gtk/GdkGraphics2D.java \ + gnu/java/awt/peer/gtk/GdkPixbufDecoder.java \ + gnu/java/awt/peer/gtk/GtkArg.java \ + gnu/java/awt/peer/gtk/GtkArgList.java \ + gnu/java/awt/peer/gtk/GtkButtonPeer.java \ + gnu/java/awt/peer/gtk/GtkCanvasPeer.java \ + gnu/java/awt/peer/gtk/GtkCheckboxGroupPeer.java \ + gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java \ + gnu/java/awt/peer/gtk/GtkCheckboxPeer.java \ + gnu/java/awt/peer/gtk/GtkChoicePeer.java \ + gnu/java/awt/peer/gtk/GtkClipboard.java \ + gnu/java/awt/peer/gtk/GtkComponentPeer.java \ + gnu/java/awt/peer/gtk/GtkContainerPeer.java \ + gnu/java/awt/peer/gtk/GtkDialogPeer.java \ + gnu/java/awt/peer/gtk/GtkEmbeddedWindowPeer.java \ + gnu/java/awt/peer/gtk/GtkFileDialogPeer.java \ + gnu/java/awt/peer/gtk/GtkFontPeer.java \ + gnu/java/awt/peer/gtk/GtkFramePeer.java \ + gnu/java/awt/peer/gtk/GtkGenericPeer.java \ + gnu/java/awt/peer/gtk/GtkImage.java \ + gnu/java/awt/peer/gtk/GtkImagePainter.java \ + gnu/java/awt/peer/gtk/GtkLabelPeer.java \ + gnu/java/awt/peer/gtk/GtkListPeer.java \ + gnu/java/awt/peer/gtk/GtkMainThread.java \ + gnu/java/awt/peer/gtk/GtkMenuBarPeer.java \ + gnu/java/awt/peer/gtk/GtkMenuComponentPeer.java \ + gnu/java/awt/peer/gtk/GtkMenuItemPeer.java \ + gnu/java/awt/peer/gtk/GtkMenuPeer.java \ + gnu/java/awt/peer/gtk/GtkOffScreenImage.java \ + gnu/java/awt/peer/gtk/GtkPanelPeer.java \ + gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java \ + gnu/java/awt/peer/gtk/GtkScrollPanePeer.java \ + gnu/java/awt/peer/gtk/GtkScrollbarPeer.java \ + gnu/java/awt/peer/gtk/GtkTextAreaPeer.java \ + gnu/java/awt/peer/gtk/GtkTextComponentPeer.java \ + gnu/java/awt/peer/gtk/GtkTextFieldPeer.java \ + gnu/java/awt/peer/gtk/GtkToolkit.java \ + gnu/java/awt/peer/gtk/GtkWindowPeer.java + + gtk_c_headers = $(patsubst %.java,jniinclude/%.h,$(subst /,_,$(gtk_awt_peer_sources))) + + $(gtk_c_headers): $(gtk_awt_peer_sources) + @input=`echo $@ | sed -e 's,jniinclude/,,' -e 's,_,.,g' -e 's,.h$$,,'`; \ + echo "$(GCJH) -jni -d jniinclude -classpath '' -bootclasspath $(top_builddir) $$input"; \ + $(GCJH) -jni -d jniinclude -classpath '' -bootclasspath $(top_builddir) $$input + + lib_gnu_java_awt_peer_gtk_la_SOURCES = \ + $(gtk_awt_peer_sources) \ + $(gtk_c_source_files) \ + jni/gtk-peer/gthread-jni.h \ + jni/gtk-peer/gtkpeer.h \ + jni/classpath/jcl.h \ + jni/classpath/jnilink.h \ + jni/classpath/native_state.h \ + jni/classpath/primlib.h + + lib_gnu_java_awt_peer_gtk_la_LIBADD = $(GTK_LIBS) $(GLIB_LIBS) $(LIBART_LIBS) $(CAIRO_LIBS) $(PANGOFT2_LIBS) + lib_gnu_java_awt_peer_gtk_la_LDFLAGS = \ + ## The mysterious backslash is consumed by make. + -version-info `grep -v '^\#' $(srcdir)/libtool-version` + lib_org_w3c_dom_la_SOURCES = org/w3c/dom/Attr.java \ org/w3c/dom/CDATASection.java \ org/w3c/dom/CharacterData.java \ *************** org/w3c/dom/traversal/DocumentTraversal. *** 165,170 **** --- 310,320 ---- org/w3c/dom/traversal/NodeFilter.java \ org/w3c/dom/traversal/NodeIterator.java \ org/w3c/dom/traversal/TreeWalker.java + ## See jv_convert_LDADD. + lib_org_w3c_dom_la_LIBADD = -L$(here)/.libs libgcj.la + lib_org_w3c_dom_la_LDFLAGS = -rpath $(toolexeclibdir) \ + ## The mysterious backslash is consumed by make. + -version-info `grep -v '^\#' $(srcdir)/libtool-version` lib_org_xml_sax_la_SOURCES = org/xml/sax/ext/DeclHandler.java \ org/xml/sax/ext/LexicalHandler.java \ *************** org/xml/sax/SAXNotSupportedException.jav *** 196,201 **** --- 346,356 ---- org/xml/sax/SAXParseException.java \ org/xml/sax/XMLFilter.java \ org/xml/sax/XMLReader.java + ## See jv_convert_LDADD. + lib_org_xml_sax_la_LIBADD = -L$(here)/.libs libgcj.la + lib_org_xml_sax_la_LDFLAGS = -rpath $(toolexeclibdir) \ + ## The mysterious backslash is consumed by make. + -version-info `grep -v '^\#' $(srcdir)/libtool-version` lib_gnu_awt_xlib_la_SOURCES = $(x_nat_source_files) EXTRA_lib_gnu_awt_xlib_la_SOURCES = $(x_java_source_files) *************** all_java_source_files = \ *** 213,225 **** $(built_java_source_files) \ $(lib_org_xml_sax_la_SOURCES) \ $(lib_org_w3c_dom_la_SOURCES) \ $(x_java_source_files) all_java_class_files = $(all_java_source_files:.java=.class) .java.class: ! $(JAVAC) $(JCFLAGS) -classpath '' -bootclasspath $(here):$(srcdir) \ ! -d $(here) $< libgcj-@gcc_version@.jar: $(all_java_class_files) -@rm -f libgcj-@gcc_version@.jar --- 368,405 ---- $(built_java_source_files) \ $(lib_org_xml_sax_la_SOURCES) \ $(lib_org_w3c_dom_la_SOURCES) \ + $(gtk_awt_peer_sources) \ $(x_java_source_files) all_java_class_files = $(all_java_source_files:.java=.class) + if ONESTEP + + # Compile all classfiles in one go. + + libgcj-@gcc_version@.jar: $(all_java_source_files) + -@rm -f libgcj-@gcc_version@.jar + @echo Compiling Java sourcefiles... + @: $(call write_entries_to_file,$?,libgcj.sourcelist) + $(JAVAC) $(JCFLAGS) -classpath '' -bootclasspath $(here):$(srcdir) -d $(here) @libgcj.sourcelist + ## Note that we explicitly want to include directory information. + find java gnu javax org -type d -o -type f -name '*.class' | \ + sed -e '/\/\./d' -e '/\/xlib/d' | \ + $(ZIP) cfM0E@ $@ + + # This next rule seems backward, but reflects the fact + # that 1) all classfiles are compiled in one go when the + # libgcj jarfile is built and 2) anything which depends + # on a particular .class file must wait until the jarfile + # is built. + $(all_java_class_files): libgcj-@gcc_version@.jar + + else # !ONESTEP + + # Compile each classfile individually. + .java.class: ! $(JAVAC) $(JCFLAGS) -classpath '' -bootclasspath $(here):$(srcdir) -d $(here) $< libgcj-@gcc_version@.jar: $(all_java_class_files) -@rm -f libgcj-@gcc_version@.jar *************** libgcj-@gcc_version@.jar: $(all_java_cla *** 228,240 **** sed -e '/\/\./d' -e '/\/xlib/d' | \ $(ZIP) cfM0E@ $@ ! MOSTLYCLEANFILES = $(javao_files) $(nat_files) $(nat_headers) $(c_files) $(x_javao_files) $(x_nat_files) $(x_nat_headers) CLEANFILES = libgcj-@gcc_version@.jar clean-local: ! ## We just remove every .class file that was created. find . -name '*.class' -print | xargs rm -f # Just remove the objects from C++ sources, for testing the C++ compiler. clean-nat: rm -f $(nat_files) $(x_nat_files) --- 408,433 ---- sed -e '/\/\./d' -e '/\/xlib/d' | \ $(ZIP) cfM0E@ $@ ! endif ! ! # Note: The libtool objects are removed by mostlyclean-local ! # because of command-line-length issues. ! MOSTLYCLEANFILES = $(nat_headers) $(x_nat_headers) ! CLEANFILES = libgcj-@gcc_version@.jar + mostlyclean-local: + ## Use libtool rm to remove each libtool object + find . -name '*.lo' -print | xargs $(LIBTOOL) rm -f + clean-local: ! ## Remove every .class file that was created. find . -name '*.class' -print | xargs rm -f + distclean-local: + ## Remove every .d file that was created. + find . -name '*.d' -print | xargs rm -f + # Just remove the objects from C++ sources, for testing the C++ compiler. clean-nat: rm -f $(nat_files) $(x_nat_files) *************** SUFFIXES = .class .java .h *** 247,281 **** .java.lo: $(GCJCOMPILE) -o $@ $< ! ## This is GNU make specific. For the .o files in subdirs, use a ! ## special rule. The standard automake rule can't be overridden (this ! ## is a bug in automake), and it also won't put the .o files into ! ## subdirs. FIXME. $(nat_files) $(x_nat_files): %.lo: %.cc @echo '$(LTCXXCOMPILE) -MD -MT $@ -MF $(@:.lo=.pp) -c -o $@ $<'; \ $(LTCXXCOMPILE) -MD -MT $@ -MF $(@:.lo=.pp) -c -o $@ $< @-mv $(@:.lo=.pp) $(@:.lo=.d) ! ## FIXME: GNU make. $(c_files): %.lo: %.c $(LTCOMPILE) -c -o $@ $< $(c_files): java/lang/fdlibm.h java/lang/ieeefp.h java/lang/mprec.h ! ## FIXME: GNU make. ! $(javao_files) $(x_javao_files) $(lib_org_w3c_dom_la_OBJECTS) $(lib_org_xml_sax_la_OBJECTS): %.lo: %.java $(GCJCOMPILE) -o $@ $< ## Pass the list of object files to libtool in a temporary file to ## avoid tripping platform command line length limits. libgcj.la: $(libgcj_la_OBJECTS) $(libgcj_la_DEPENDENCIES) ! @: $(shell echo Creating list of files to link...) $(shell rm -f libgcj.objectlist || :) $(shell touch libgcj.objectlist) $(foreach object,$(libgcj_la_OBJECTS) $(libgcj_la_LIBADD),$(shell echo $(object) >> libgcj.objectlist)) $(libgcj_la_LINK) -objectlist libgcj.objectlist \ @GCLIBS@ @LIBFFI@ @ZLIBS@ \ -rpath $(toolexeclibdir) $(libgcj_la_LDFLAGS) $(LIBS) lib-gnu-awt-xlib.la: $(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_DEPENDENCIES) ! @: $(shell echo Creating list of files to link...) $(shell rm -f lib_gnu_awt_xlib.objectlist || :) $(shell touch lib_gnu_awt_xlib.objectlist) $(foreach object,$(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_LIBADD),$(shell echo $(object) >> lib_gnu_awt_xlib.objectlist)) $(lib_gnu_awt_xlib_la_LINK) -objectlist lib_gnu_awt_xlib.objectlist \ -rpath $(toolexeclibdir) $(lib_gnu_awt_xlib_la_LDFLAGS) $(LIBS) --- 440,504 ---- .java.lo: $(GCJCOMPILE) -o $@ $< ! ## FIXME: For the .o files in subdirs, use a special rule. The ! ## standard automake rule can't be overridden (this is a bug in ! ## automake), and it also won't put the .o files into subdirs. $(nat_files) $(x_nat_files): %.lo: %.cc @echo '$(LTCXXCOMPILE) -MD -MT $@ -MF $(@:.lo=.pp) -c -o $@ $<'; \ $(LTCXXCOMPILE) -MD -MT $@ -MF $(@:.lo=.pp) -c -o $@ $< @-mv $(@:.lo=.pp) $(@:.lo=.d) ! ## FIXME: see above $(c_files): %.lo: %.c $(LTCOMPILE) -c -o $@ $< + ## A special rule for interpret.lo for the time being. Our current + ## approach to stack-trace handling is fragile and will not work with + ## unit-at-a-time. So, for now we disable it. This will be fixed by + ## a larger patch in the future. + interpret.lo: interpret.cc + $(LTCXXCOMPILE) -fno-unit-at-a-time -c -o $@ $< + + $(extra_cc_files): %.lo: %.cc + $(LTCXXCOMPILE) -c -o $@ $< + $(c_files): java/lang/fdlibm.h java/lang/ieeefp.h java/lang/mprec.h ! ## FIXME: see above ! $(gtk_c_files): %.lo: %.c ! $(LTCOMPILE) -c -Ijniinclude -I$(srcdir)/jni/classpath -I$(srcdir)/jni/gtk-peer \ ! $(GTK_CFLAGS) $(LIBART_CFLAGS) $(CAIRO_LIBS) $(PANGOFT2_LIBS) -o $@ $< ! ! $(gtk_c_files): $(gtk_c_headers) ! ! ## FIXME: see above. ! ! ## Note: we omit StackTrace here, since it has an explicit rule a bit ! ## later, and GNU make will warn in this case. ! $(filter-out gnu/gcj/runtime/StackTrace.lo, $(javao_files)) $(x_javao_files) $(lib_org_w3c_dom_la_OBJECTS) $(lib_org_xml_sax_la_OBJECTS): %.lo: %.java $(GCJCOMPILE) -o $@ $< + $(gtk_awt_peer_sources:.java=.lo): %.lo: %.java + $(GCJCOMPILE) -fjni -o $@ $< + + ## A special case. The sibcall optimization can change the number of + ## frames on the stack, and StackTrace makes assumptions about this + ## number. + gnu/gcj/runtime/StackTrace.lo: gnu/gcj/runtime/StackTrace.java + $(GCJCOMPILE) -fno-optimize-sibling-calls -o $@ $< + ## Pass the list of object files to libtool in a temporary file to ## avoid tripping platform command line length limits. libgcj.la: $(libgcj_la_OBJECTS) $(libgcj_la_DEPENDENCIES) ! @echo Creating list of files to link... ! @: $(call write_entries_to_file,$(libgcj_la_OBJECTS) $(libgcj_la_LIBADD),libgcj.objectlist) $(libgcj_la_LINK) -objectlist libgcj.objectlist \ @GCLIBS@ @LIBFFI@ @ZLIBS@ \ -rpath $(toolexeclibdir) $(libgcj_la_LDFLAGS) $(LIBS) lib-gnu-awt-xlib.la: $(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_DEPENDENCIES) ! @echo Creating list of files to link... ! @: $(call write_entries_to_file,$(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_LIBADD),lib_gnu_awt_xlib.objectlist) $(lib_gnu_awt_xlib_la_LINK) -objectlist lib_gnu_awt_xlib.objectlist \ -rpath $(toolexeclibdir) $(lib_gnu_awt_xlib_la_LDFLAGS) $(LIBS) *************** lib-gnu-awt-xlib.la: $(lib_gnu_awt_xlib_ *** 286,292 **** ## .class.h: - ## FIXME: GNU make specific. $(GCJH) -classpath '' -bootclasspath $(top_builddir) $(basename $<) ## Header files used when compiling some of the nat* files. --- 509,514 ---- *************** ordinary_nat_headers = $(ordinary_java_s *** 296,304 **** inner_nat_headers = java/io/ObjectOutputStream$$PutField.h \ java/io/ObjectInputStream$$GetField.h \ java/lang/reflect/Proxy$$ProxyData.h \ ! java/lang/reflect/Proxy$$ProxyType.h nat_headers = $(ordinary_nat_headers) $(inner_nat_headers) x_nat_headers = $(x_java_source_files:.java=.h) --- 518,529 ---- inner_nat_headers = java/io/ObjectOutputStream$$PutField.h \ java/io/ObjectInputStream$$GetField.h \ java/lang/reflect/Proxy$$ProxyData.h \ ! java/lang/reflect/Proxy$$ProxyType.h \ ! gnu/java/net/PlainSocketImpl$$SocketInputStream.h \ ! gnu/java/net/PlainSocketImpl$$SocketOutputStream.h nat_headers = $(ordinary_nat_headers) $(inner_nat_headers) + nat_headers_install = $(ordinary_nat_headers) x_nat_headers = $(x_java_source_files:.java=.h) *************** java/io/ObjectOutputStream$$PutField.h: *** 381,386 **** --- 606,619 ---- $(GCJH) -classpath '' -bootclasspath $(top_builddir) \ 'java/io/ObjectOutputStream$$PutField' + gnu/java/net/PlainSocketImpl$$SocketInputStream.h: gnu/java/net/PlainSocketImpl.class + $(GCJH) -classpath '' -bootclasspath $(top_builddir) \ + 'gnu/java/net/PlainSocketImpl$$SocketInputStream' + + gnu/java/net/PlainSocketImpl$$SocketOutputStream.h: gnu/java/net/PlainSocketImpl.class + $(GCJH) -classpath '' -bootclasspath $(top_builddir) \ + 'gnu/java/net/PlainSocketImpl$$SocketOutputStream' + ## Headers we maintain by hand and which we want to install. extra_headers = java/lang/Object.h java/lang/Class.h *************** install-data-local: *** 393,399 **** $(PRE_INSTALL) ## We use a GNU make trick here so that we don't go over the command ## length limit of some shells. ! @: $(shell echo Creating list of headers to install...) $(shell rm -f tmp-ilist || :) $(shell touch tmp-ilist) $(foreach hdr,$(nat_headers) $(extra_headers),$(shell echo $(hdr) >> tmp-ilist)) @cat tmp-ilist | while read f; do \ d="`echo $$f | sed -e 's,/[^/]*$$,,'`"; \ $(mkinstalldirs) $(DESTDIR)$(includedir)/$$d; \ --- 626,633 ---- $(PRE_INSTALL) ## We use a GNU make trick here so that we don't go over the command ## length limit of some shells. ! @echo Creating list of headers to install... ! @: $(call write_entries_to_file,$(nat_headers_install) $(extra_headers),tmp-ilist) @cat tmp-ilist | while read f; do \ d="`echo $$f | sed -e 's,/[^/]*$$,,'`"; \ $(mkinstalldirs) $(DESTDIR)$(includedir)/$$d; \ *************** install-data-local: *** 409,414 **** --- 643,656 ---- echo " $(INSTALL_DATA) $(srcdir)/java/security/$$f $(DESTDIR)$(secdir)/$$f"; \ $(INSTALL_DATA) $(srcdir)/java/security/$$f $(DESTDIR)$(secdir)/$$f; \ done + ## Install inner class headers. + $(INSTALL_DATA) 'java/io/ObjectOutputStream$$PutField.h' $(DESTDIR)$(includedir)/java/io/ + $(INSTALL_DATA) 'java/io/ObjectInputStream$$GetField.h' $(DESTDIR)$(includedir)/java/io/ + $(INSTALL_DATA) 'java/lang/reflect/Proxy$$ProxyData.h' $(DESTDIR)$(includedir)/java/lang/reflect/ + $(INSTALL_DATA) 'java/lang/reflect/Proxy$$ProxyType.h' $(DESTDIR)$(includedir)/java/lang/reflect/ + $(INSTALL_DATA) 'gnu/java/net/PlainSocketImpl$$SocketInputStream.h' $(DESTDIR)$(includedir)/gnu/java/net/ + $(INSTALL_DATA) 'gnu/java/net/PlainSocketImpl$$SocketOutputStream.h' $(DESTDIR)$(includedir)/gnu/java/net/ + $(INSTALL_DATA) $(srcdir)/java/util/logging/logging.properties $(DESTDIR)$(propdir)/logging.properties ## ################################################################ *************** class-check: libgcj-@gcc_version@.jar *** 449,454 **** --- 691,701 ---- :; else ok=1; fi; \ done; exit $$ok + ## This rule checks whether write_entries_to_file works properly. + write-entries-to-file-check: + @echo Creating list of files to link... + @: $(call write_entries_to_file,$(libgcj_la_OBJECTS) $(libgcj_la_LIBADD),libgcj.objectlist) + ## ################################################################ ## *************** gnu/awt/j2d/IntegerGraphicsState.java \ *** 630,640 **** gnu/awt/j2d/MappedRaster.java \ gnu/java/awt/BitMaskExtent.java \ gnu/java/awt/Buffers.java \ gnu/java/awt/ComponentDataBlitOp.java \ ! gnu/java/awt/GLightweightPeer.java \ gnu/java/awt/EventModifier.java \ gnu/java/awt/image/ImageDecoder.java \ gnu/java/awt/image/XBMDecoder.java \ gnu/java/beans/editors/ColorEditor.java \ gnu/java/beans/editors/FontEditor.java \ gnu/java/beans/editors/NativeBooleanEditor.java \ --- 877,893 ---- gnu/awt/j2d/MappedRaster.java \ gnu/java/awt/BitMaskExtent.java \ gnu/java/awt/Buffers.java \ + gnu/java/awt/BitwiseXORComposite.java \ gnu/java/awt/ComponentDataBlitOp.java \ ! gnu/java/awt/ClasspathToolkit.java \ ! gnu/java/awt/EmbeddedWindow.java \ ! gnu/java/awt/EmbeddedWindowSupport.java \ gnu/java/awt/EventModifier.java \ gnu/java/awt/image/ImageDecoder.java \ gnu/java/awt/image/XBMDecoder.java \ + gnu/java/awt/peer/EmbeddedWindowPeer.java \ + gnu/java/awt/peer/GLightweightPeer.java \ + gnu/java/awt/peer/ClasspathFontPeer.java \ gnu/java/beans/editors/ColorEditor.java \ gnu/java/beans/editors/FontEditor.java \ gnu/java/beans/editors/NativeBooleanEditor.java \ *************** gnu/java/beans/BeanInfoEmbryo.java \ *** 650,655 **** --- 903,915 ---- gnu/java/beans/EmptyBeanInfo.java \ gnu/java/beans/ExplicitBeanInfo.java \ gnu/java/beans/IntrospectionIncubator.java \ + gnu/javax/rmi/CORBA/DelegateFactory.java \ + gnu/javax/rmi/CORBA/GetDelegateInstanceException.java \ + gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java \ + gnu/javax/rmi/CORBA/StubDelegateImpl.java \ + gnu/javax/rmi/CORBA/UtilDelegateImpl.java \ + gnu/javax/rmi/CORBA/ValueHandlerImpl.java \ + gnu/javax/rmi/PortableServer.java \ java/applet/Applet.java \ java/applet/AppletStub.java \ java/applet/AppletContext.java \ *************** java/awt/Graphics2D.java \ *** 689,694 **** --- 949,955 ---- java/awt/GraphicsConfiguration.java \ java/awt/GridBagConstraints.java \ java/awt/GridBagLayout.java \ + java/awt/GridBagLayoutInfo.java \ java/awt/GridLayout.java \ java/awt/IllegalComponentStateException.java \ java/awt/Image.java \ *************** java/awt/event/MouseWheelEvent.java \ *** 780,785 **** --- 1041,1062 ---- java/awt/event/MouseWheelListener.java \ java/awt/event/WindowFocusListener.java \ java/awt/event/WindowStateListener.java \ + java/awt/font/FontRenderContext.java \ + java/awt/font/ShapeGraphicAttribute.java \ + java/awt/font/MultipleMaster.java \ + java/awt/font/TransformAttribute.java \ + java/awt/font/GlyphJustificationInfo.java \ + java/awt/font/LineBreakMeasurer.java \ + java/awt/font/TextMeasurer.java \ + java/awt/font/TextLayout.java \ + java/awt/font/LineMetrics.java \ + java/awt/font/TextAttribute.java \ + java/awt/font/GlyphMetrics.java \ + java/awt/font/OpenType.java \ + java/awt/font/GlyphVector.java \ + java/awt/font/GraphicAttribute.java \ + java/awt/font/ImageGraphicAttribute.java \ + java/awt/font/NumericShaper.java \ java/awt/geom/AffineTransform.java \ java/awt/geom/Dimension2D.java \ java/awt/geom/Ellipse2D.java \ *************** java/awt/peer/MenuItemPeer.java \ *** 859,864 **** --- 1136,1142 ---- java/awt/peer/MenuPeer.java \ java/awt/peer/PanelPeer.java \ java/awt/peer/PopupMenuPeer.java \ + java/awt/peer/RobotPeer.java \ java/awt/peer/ScrollPanePeer.java \ java/awt/peer/ScrollbarPeer.java \ java/awt/peer/TextAreaPeer.java \ *************** java/awt/Stroke.java \ *** 901,907 **** --- 1179,1187 ---- java/awt/TexturePaint.java \ java/awt/dnd/peer/DragSourceContextPeer.java \ java/awt/dnd/peer/DropTargetContextPeer.java \ + java/awt/dnd/peer/DropTargetPeer.java \ java/awt/dnd/DnDConstants.java \ + java/awt/dnd/DnDEventMulticaster.java \ java/awt/dnd/DragGestureEvent.java \ java/awt/dnd/DragGestureListener.java \ java/awt/dnd/DragGestureRecognizer.java \ *************** java/beans/beancontext/BeanContextServic *** 957,962 **** --- 1237,1244 ---- java/beans/beancontext/BeanContextServiceRevokedListener.java \ java/beans/beancontext/BeanContextServices.java \ java/beans/beancontext/BeanContextServicesListener.java \ + java/beans/beancontext/BeanContextServicesSupport.java \ + java/beans/beancontext/BeanContextSupport.java \ java/beans/BeanDescriptor.java \ java/beans/BeanInfo.java \ java/beans/Beans.java \ *************** java/beans/VetoableChangeListenerProxy.j *** 985,999 **** java/beans/VetoableChangeSupport.java \ java/beans/Visibility.java \ java/beans/AppletInitializer.java \ javax/swing/border/AbstractBorder.java \ javax/swing/border/Border.java \ javax/swing/border/CompoundBorder.java \ javax/swing/border/EmptyBorder.java \ - javax/swing/border/MatteBorder.java \ - javax/swing/border/TitledBorder.java \ - javax/swing/border/BevelBorder.java \ javax/swing/border/EtchedBorder.java \ javax/swing/border/LineBorder.java \ javax/swing/GrayFilter.java \ javax/swing/AbstractAction.java \ javax/swing/AbstractButton.java \ --- 1267,1295 ---- java/beans/VetoableChangeSupport.java \ java/beans/Visibility.java \ java/beans/AppletInitializer.java \ + javax/rmi/BAD_OPERATION.java \ + javax/rmi/ORB.java \ + javax/rmi/PortableRemoteObject.java \ + javax/rmi/CORBA/ClassDesc.java \ + javax/rmi/CORBA/ObjectImpl.java \ + javax/rmi/CORBA/PortableRemoteObjectDelegate.java \ + javax/rmi/CORBA/StubDelegate.java \ + javax/rmi/CORBA/Stub.java \ + javax/rmi/CORBA/SystemException.java \ + javax/rmi/CORBA/Tie.java \ + javax/rmi/CORBA/UtilDelegate.java \ + javax/rmi/CORBA/Util.java \ + javax/rmi/CORBA/ValueHandler.java \ javax/swing/border/AbstractBorder.java \ + javax/swing/border/BevelBorder.java \ javax/swing/border/Border.java \ javax/swing/border/CompoundBorder.java \ javax/swing/border/EmptyBorder.java \ javax/swing/border/EtchedBorder.java \ javax/swing/border/LineBorder.java \ + javax/swing/border/MatteBorder.java \ + javax/swing/border/SoftBevelBorder.java \ + javax/swing/border/TitledBorder.java \ javax/swing/GrayFilter.java \ javax/swing/AbstractAction.java \ javax/swing/AbstractButton.java \ *************** javax/swing/plaf/basic/BasicOptionPaneUI *** 1007,1012 **** --- 1303,1310 ---- javax/swing/plaf/basic/BasicPanelUI.java \ javax/swing/plaf/basic/BasicRadioButtonUI.java \ javax/swing/plaf/basic/BasicScrollPaneUI.java \ + javax/swing/plaf/basic/BasicSplitPaneDivider.java \ + javax/swing/plaf/basic/BasicSplitPaneUI.java \ javax/swing/plaf/basic/BasicTabbedPaneUI.java \ javax/swing/plaf/basic/BasicTextUI.java \ javax/swing/plaf/basic/BasicToggleButtonUI.java \ *************** javax/swing/plaf/RootPaneUI.java \ *** 1051,1056 **** --- 1349,1355 ---- javax/swing/plaf/ScrollBarUI.java \ javax/swing/plaf/SeparatorUI.java \ javax/swing/plaf/SliderUI.java \ + javax/swing/plaf/SpinnerUI.java \ javax/swing/plaf/SplitPaneUI.java \ javax/swing/plaf/TableHeaderUI.java \ javax/swing/plaf/TableUI.java \ *************** javax/swing/filechooser/FileView.java \ *** 1068,1073 **** --- 1367,1373 ---- javax/swing/table/AbstractTableModel.java \ javax/swing/table/DefaultTableColumnModel.java \ javax/swing/table/DefaultTableModel.java \ + javax/swing/table/JTableHeader.java \ javax/swing/table/TableCellEditor.java \ javax/swing/table/TableCellRenderer.java \ javax/swing/table/TableColumn.java \ *************** javax/swing/JCheckBox.java \ *** 1094,1099 **** --- 1394,1400 ---- javax/swing/JComponent.java \ javax/swing/JDialog.java \ javax/swing/JEditorPane.java \ + javax/swing/JFormattedTextField.java \ javax/swing/JFrame.java \ javax/swing/JLabel.java \ javax/swing/JLayeredPane.java \ *************** javax/swing/text/ComponentView.java \ *** 1178,1183 **** --- 1479,1485 ---- javax/swing/text/DefaultCaret.java \ javax/swing/text/DefaultEditorKit.java \ javax/swing/text/Document.java \ + javax/swing/text/DocumentFilter.java \ javax/swing/text/EditorKit.java \ javax/swing/text/Element.java \ javax/swing/text/GapContent.java \ *************** javax/swing/text/Style.java \ *** 1191,1196 **** --- 1493,1499 ---- javax/swing/text/View.java \ javax/swing/text/ViewFactory.java \ javax/swing/text/MutableAttributeSet.java \ + javax/swing/text/NavigationFilter.java \ javax/swing/text/StyledDocument.java \ javax/swing/text/StyledEditorKit.java \ javax/swing/text/TextAction.java \ *************** javax/swing/JSplitPane.java \ *** 1268,1273 **** --- 1571,1578 ---- javax/swing/JTextPane.java \ javax/swing/JToolBar.java \ javax/swing/OverlayLayout.java \ + javax/swing/Popup.java \ + javax/swing/PopupFactory.java \ javax/swing/ProgressMonitor.java \ javax/swing/ProgressMonitorInputStream.java \ javax/swing/RepaintManager.java \ *************** gnu/java/rmi/registry/RegistryImpl.java *** 1351,1359 **** --- 1656,1667 ---- gnu/java/rmi/registry/RegistryImpl_Skel.java \ gnu/java/rmi/registry/RegistryImpl_Stub.java \ gnu/java/rmi/rmic/Compile_gcj.java \ + gnu/java/rmi/rmic/Compile_jikes.java \ + gnu/java/rmi/rmic/Compile_kjc.java \ gnu/java/rmi/rmic/Compiler.java \ gnu/java/rmi/rmic/CompilerProcess.java \ gnu/java/rmi/rmic/RMIC.java \ + gnu/java/rmi/rmic/RMICException.java \ gnu/java/rmi/rmic/TabbedWriter.java \ gnu/java/rmi/server/ConnectionRunnerPool.java \ gnu/java/rmi/server/ProtocolConstants.java \ *************** gnu/java/rmi/server/RMIDefaultSocketFact *** 1361,1366 **** --- 1669,1675 ---- gnu/java/rmi/server/RMIHashes.java \ gnu/java/rmi/server/RMIObjectInputStream.java \ gnu/java/rmi/server/RMIObjectOutputStream.java \ + gnu/java/rmi/server/RMIVoidValue.java \ gnu/java/rmi/server/UnicastConnection.java \ gnu/java/rmi/server/UnicastConnectionManager.java \ gnu/java/rmi/server/UnicastRef.java \ *************** javax/naming/ldap/UnsolicitedNotificatio *** 1481,1486 **** --- 1790,1852 ---- javax/naming/ldap/UnsolicitedNotificationEvent.java \ javax/naming/ldap/UnsolicitedNotificationListener.java \ javax/naming/OperationNotSupportedException.java \ + javax/print/attribute/Attribute.java \ + javax/print/attribute/AttributeSet.java \ + javax/print/attribute/AttributeSetUtilities.java \ + javax/print/attribute/DateTimeSyntax.java \ + javax/print/attribute/DocAttribute.java \ + javax/print/attribute/DocAttributeSet.java \ + javax/print/attribute/EnumSyntax.java \ + javax/print/attribute/HashAttributeSet.java \ + javax/print/attribute/HashDocAttributeSet.java \ + javax/print/attribute/HashPrintJobAttributeSet.java \ + javax/print/attribute/HashPrintRequestAttributeSet.java \ + javax/print/attribute/HashPrintServiceAttributeSet.java \ + javax/print/attribute/IntegerSyntax.java \ + javax/print/attribute/PrintJobAttribute.java \ + javax/print/attribute/PrintJobAttributeSet.java \ + javax/print/attribute/PrintRequestAttribute.java \ + javax/print/attribute/PrintRequestAttributeSet.java \ + javax/print/attribute/PrintServiceAttribute.java \ + javax/print/attribute/PrintServiceAttributeSet.java \ + javax/print/attribute/ResolutionSyntax.java \ + javax/print/attribute/SetOfIntegerSyntax.java \ + javax/print/attribute/Size2DSyntax.java \ + javax/print/attribute/SupportedValuesAttribute.java \ + javax/print/attribute/TextSyntax.java \ + javax/print/attribute/UnmodifiableSetException.java \ + javax/print/attribute/URISyntax.java \ + javax/print/attribute/standard/Copies.java \ + javax/print/attribute/standard/DateTimeAtCompleted.java \ + javax/print/attribute/standard/DateTimeAtCreation.java \ + javax/print/attribute/standard/DateTimeAtProcessing.java \ + javax/print/attribute/standard/DocumentName.java \ + javax/print/attribute/standard/JobHoldUntil.java \ + javax/print/attribute/standard/JobImpressions.java \ + javax/print/attribute/standard/JobImpressionsCompleted.java \ + javax/print/attribute/standard/JobKOctets.java \ + javax/print/attribute/standard/JobKOctetsProcessed.java \ + javax/print/attribute/standard/JobMediaSheets.java \ + javax/print/attribute/standard/JobMediaSheetsCompleted.java \ + javax/print/attribute/standard/JobMessageFromOperator.java \ + javax/print/attribute/standard/JobName.java \ + javax/print/attribute/standard/JobOriginatingUserName.java \ + javax/print/attribute/standard/JobPriority.java \ + javax/print/attribute/standard/JobPrioritySupported.java \ + javax/print/attribute/standard/NumberOfDocuments.java \ + javax/print/attribute/standard/NumberOfInterveningJobs.java \ + javax/print/attribute/standard/NumberUp.java \ + javax/print/attribute/standard/OutputDeviceAssigned.java \ + javax/print/attribute/standard/PagesPerMinute.java \ + javax/print/attribute/standard/PagesPerMinuteColor.java \ + javax/print/attribute/standard/PrinterInfo.java \ + javax/print/attribute/standard/PrinterLocation.java \ + javax/print/attribute/standard/PrinterMakeAndModel.java \ + javax/print/attribute/standard/PrinterMessageFromOperator.java \ + javax/print/attribute/standard/PrinterName.java \ + javax/print/attribute/standard/QueuedJobCount.java \ + javax/print/attribute/standard/RequestingUserName.java \ + javax/security/auth/x500/X500Principal.java \ javax/sql/ConnectionEvent.java \ javax/sql/ConnectionEventListener.java \ javax/sql/ConnectionPoolDataSource.java \ *************** java/util/Collection.java \ *** 1692,1697 **** --- 2058,2064 ---- java/util/Collections.java \ java/util/Comparator.java \ java/util/ConcurrentModificationException.java \ + java/util/Currency.java \ java/util/Date.java \ java/util/Dictionary.java \ java/util/EmptyStackException.java \ *************** java/util/TreeSet.java \ *** 1738,1743 **** --- 2105,2135 ---- java/util/TooManyListenersException.java \ java/util/Vector.java \ java/util/WeakHashMap.java \ + java/util/logging/ConsoleHandler.java \ + java/util/logging/ErrorManager.java \ + java/util/logging/FileHandler.java \ + java/util/logging/Filter.java \ + java/util/logging/Formatter.java \ + java/util/logging/Handler.java \ + java/util/logging/Level.java \ + java/util/logging/Logger.java \ + java/util/logging/LoggingPermission.java \ + java/util/logging/LogManager.java \ + java/util/logging/LogRecord.java \ + java/util/logging/MemoryHandler.java \ + java/util/logging/SimpleFormatter.java \ + java/util/logging/SocketHandler.java \ + java/util/logging/StreamHandler.java \ + java/util/logging/XMLFormatter.java \ + java/util/prefs/NodeChangeListener.java \ + java/util/prefs/Preferences.java \ + java/util/prefs/PreferenceChangeListener.java \ + java/util/prefs/NodeChangeEvent.java \ + java/util/prefs/InvalidPreferencesFormatException.java \ + java/util/prefs/AbstractPreferences.java \ + java/util/prefs/BackingStoreException.java \ + java/util/prefs/PreferenceChangeEvent.java \ + java/util/prefs/PreferencesFactory.java \ java/util/regex/Matcher.java \ java/util/regex/Pattern.java \ java/util/regex/PatternSyntaxException.java *************** gnu/gcj/RawData.java \ *** 1754,1778 **** gnu/gcj/io/DefaultMimeTypes.java \ gnu/gcj/io/MimeTypes.java \ gnu/gcj/io/SimpleSHSStream.java \ - gnu/gcj/protocol/core/Connection.java \ - gnu/gcj/protocol/core/Handler.java \ - gnu/gcj/protocol/core/CoreInputStream.java \ - gnu/gcj/protocol/file/Connection.java \ - gnu/gcj/protocol/file/Handler.java \ - gnu/gcj/protocol/http/Connection.java \ - gnu/gcj/protocol/http/Handler.java \ - gnu/gcj/protocol/jar/Connection.java \ - gnu/gcj/protocol/jar/Handler.java \ gnu/gcj/runtime/FileDeleter.java \ gnu/gcj/runtime/FinalizerThread.java \ gnu/gcj/runtime/FirstThread.java \ gnu/gcj/runtime/JNIWeakRef.java \ gnu/gcj/runtime/MethodRef.java \ gnu/gcj/runtime/NameFinder.java \ gnu/gcj/runtime/SharedLibLoader.java \ gnu/gcj/runtime/StackTrace.java \ gnu/gcj/runtime/StringBuffer.java \ gnu/gcj/runtime/VMClassLoader.java \ gnu/java/io/ClassLoaderObjectInputStream.java \ gnu/java/io/NullOutputStream.java \ gnu/java/io/ObjectIdentityWrapper.java \ --- 2146,2164 ---- gnu/gcj/io/DefaultMimeTypes.java \ gnu/gcj/io/MimeTypes.java \ gnu/gcj/io/SimpleSHSStream.java \ gnu/gcj/runtime/FileDeleter.java \ gnu/gcj/runtime/FinalizerThread.java \ gnu/gcj/runtime/FirstThread.java \ gnu/gcj/runtime/JNIWeakRef.java \ gnu/gcj/runtime/MethodRef.java \ gnu/gcj/runtime/NameFinder.java \ + gnu/gcj/runtime/SharedLibHelper.java \ gnu/gcj/runtime/SharedLibLoader.java \ gnu/gcj/runtime/StackTrace.java \ gnu/gcj/runtime/StringBuffer.java \ gnu/gcj/runtime/VMClassLoader.java \ + gnu/java/io/ASN1ParsingException.java \ + gnu/java/io/Base64InputStream.java \ gnu/java/io/ClassLoaderObjectInputStream.java \ gnu/java/io/NullOutputStream.java \ gnu/java/io/ObjectIdentityWrapper.java \ *************** gnu/java/locale/LocaleInformation_zh_HK. *** 1920,1940 **** gnu/java/locale/LocaleInformation_zh_SG.java \ gnu/java/locale/LocaleInformation_zh_TW.java \ gnu/java/math/MPN.java \ ! gnu/java/nio/ByteBufferImpl.java \ ! gnu/java/nio/CharBufferImpl.java \ gnu/java/nio/DatagramChannelImpl.java \ ! gnu/java/nio/DoubleBufferImpl.java \ ! gnu/java/nio/FileChannelImpl.java \ ! gnu/java/nio/FloatBufferImpl.java \ ! gnu/java/nio/IntBufferImpl.java \ ! gnu/java/nio/LongBufferImpl.java \ gnu/java/nio/PipeImpl.java \ gnu/java/nio/SelectionKeyImpl.java \ gnu/java/nio/SelectorImpl.java \ gnu/java/nio/SelectorProviderImpl.java \ gnu/java/nio/ServerSocketChannelImpl.java \ ! gnu/java/nio/ShortBufferImpl.java \ gnu/java/nio/SocketChannelImpl.java \ gnu/java/nio/charset/ISO_8859_1.java \ gnu/java/nio/charset/Provider.java \ gnu/java/nio/charset/US_ASCII.java \ --- 2306,2345 ---- gnu/java/locale/LocaleInformation_zh_SG.java \ gnu/java/locale/LocaleInformation_zh_TW.java \ gnu/java/math/MPN.java \ ! gnu/java/net/HeaderFieldHelper.java \ ! gnu/java/net/PlainDatagramSocketImpl.java \ ! gnu/java/net/PlainSocketImpl.java \ ! gnu/java/net/URLParseError.java \ ! gnu/java/net/protocol/core/Connection.java \ ! gnu/java/net/protocol/core/Handler.java \ ! gnu/java/net/protocol/core/CoreInputStream.java \ ! gnu/java/net/protocol/file/Connection.java \ ! gnu/java/net/protocol/file/Handler.java \ ! gnu/java/net/protocol/http/Connection.java \ ! gnu/java/net/protocol/http/Handler.java \ ! gnu/java/net/protocol/jar/Connection.java \ ! gnu/java/net/protocol/jar/Handler.java \ ! gnu/java/net/protocol/gcjlib/Connection.java \ ! gnu/java/net/protocol/gcjlib/Handler.java \ gnu/java/nio/DatagramChannelImpl.java \ ! gnu/java/nio/DatagramChannelSelectionKey.java \ ! gnu/java/nio/FileLockImpl.java \ ! gnu/java/nio/NIOConstants.java \ ! gnu/java/nio/NIODatagramSocket.java \ ! gnu/java/nio/NIOServerSocket.java \ ! gnu/java/nio/NIOSocket.java \ ! gnu/java/nio/ChannelInputStream.java \ ! gnu/java/nio/ChannelOutputStream.java \ ! gnu/java/nio/InputStreamChannel.java \ ! gnu/java/nio/OutputStreamChannel.java \ gnu/java/nio/PipeImpl.java \ gnu/java/nio/SelectionKeyImpl.java \ gnu/java/nio/SelectorImpl.java \ gnu/java/nio/SelectorProviderImpl.java \ gnu/java/nio/ServerSocketChannelImpl.java \ ! gnu/java/nio/ServerSocketChannelSelectionKey.java \ gnu/java/nio/SocketChannelImpl.java \ + gnu/java/nio/SocketChannelSelectionKey.java \ gnu/java/nio/charset/ISO_8859_1.java \ gnu/java/nio/charset/Provider.java \ gnu/java/nio/charset/US_ASCII.java \ *************** gnu/java/nio/charset/UTF_16Decoder.java *** 1944,1953 **** gnu/java/nio/charset/UTF_16Encoder.java \ gnu/java/nio/charset/UTF_16LE.java \ gnu/java/nio/charset/UTF_8.java \ gnu/java/security/der/DEREncodingException.java \ ! gnu/java/security/provider/DERReader.java \ ! gnu/java/security/provider/DERWriter.java \ gnu/java/security/provider/DefaultPolicy.java \ gnu/java/security/provider/DSAKeyPairGenerator.java \ gnu/java/security/provider/DSAParameterGenerator.java \ gnu/java/security/provider/DSAParameters.java \ --- 2349,2364 ---- gnu/java/nio/charset/UTF_16Encoder.java \ gnu/java/nio/charset/UTF_16LE.java \ gnu/java/nio/charset/UTF_8.java \ + gnu/java/security/Engine.java \ + gnu/java/security/OID.java \ + gnu/java/security/der/BitString.java \ + gnu/java/security/der/DER.java \ gnu/java/security/der/DEREncodingException.java \ ! gnu/java/security/der/DERReader.java \ ! gnu/java/security/der/DERValue.java \ ! gnu/java/security/der/DERWriter.java \ gnu/java/security/provider/DefaultPolicy.java \ + gnu/java/security/provider/DSAKeyFactory.java \ gnu/java/security/provider/DSAKeyPairGenerator.java \ gnu/java/security/provider/DSAParameterGenerator.java \ gnu/java/security/provider/DSAParameters.java \ *************** gnu/java/security/provider/GnuDSAPublicK *** 1958,1964 **** --- 2369,2380 ---- gnu/java/security/provider/MD5.java \ gnu/java/security/provider/SHA.java \ gnu/java/security/provider/SHA1PRNG.java \ + gnu/java/security/provider/X509CertificateFactory.java \ gnu/java/security/util/Prime.java \ + gnu/java/security/x509/X500DistinguishedName.java \ + gnu/java/security/x509/X509Certificate.java \ + gnu/java/security/x509/X509CRLEntry.java \ + gnu/java/security/x509/X509CRL.java \ gnu/java/text/BaseBreakIterator.java \ gnu/java/text/CharacterBreakIterator.java \ gnu/java/text/LineBreakIterator.java \ *************** gnu/java/text/SentenceBreakIterator.java *** 1966,1971 **** --- 2382,2392 ---- gnu/java/text/WordBreakIterator.java \ gnu/java/util/DoubleEnumeration.java \ gnu/java/util/EmptyEnumeration.java \ + gnu/java/util/prefs/MemoryBasedFactory.java \ + gnu/java/util/prefs/NodeReader.java \ + gnu/java/util/prefs/MemoryBasedPreferences.java \ + gnu/java/util/prefs/FileBasedFactory.java \ + gnu/java/util/prefs/NodeWriter.java \ java/lang/ref/PhantomReference.java \ java/lang/ref/Reference.java \ java/lang/ref/ReferenceQueue.java \ *************** java/net/NetPermission.java \ *** 2007,2014 **** java/net/NetworkInterface.java \ java/net/NoRouteToHostException.java \ java/net/PasswordAuthentication.java \ - java/net/PlainDatagramSocketImpl.java \ - java/net/PlainSocketImpl.java \ java/net/PortUnreachableException.java \ java/net/ProtocolException.java \ java/net/ServerSocket.java \ --- 2428,2433 ---- *************** java/nio/Buffer.java \ *** 2035,2050 **** --- 2454,2485 ---- java/nio/BufferOverflowException.java \ java/nio/BufferUnderflowException.java \ java/nio/ByteBuffer.java \ + java/nio/ByteBufferHelper.java \ + java/nio/ByteBufferImpl.java \ java/nio/ByteOrder.java \ java/nio/CharBuffer.java \ + java/nio/CharBufferImpl.java \ + java/nio/CharViewBufferImpl.java \ + java/nio/DirectByteBufferImpl.java \ java/nio/DoubleBuffer.java \ + java/nio/DoubleBufferImpl.java \ + java/nio/DoubleViewBufferImpl.java \ java/nio/FloatBuffer.java \ + java/nio/FloatBufferImpl.java \ + java/nio/FloatViewBufferImpl.java \ java/nio/IntBuffer.java \ + java/nio/IntBufferImpl.java \ + java/nio/IntViewBufferImpl.java \ java/nio/InvalidMarkException.java \ java/nio/LongBuffer.java \ + java/nio/LongBufferImpl.java \ + java/nio/LongViewBufferImpl.java \ java/nio/MappedByteBuffer.java \ + java/nio/MappedByteBufferImpl.java \ java/nio/ReadOnlyBufferException.java \ java/nio/ShortBuffer.java \ + java/nio/ShortBufferImpl.java \ + java/nio/ShortViewBufferImpl.java \ java/nio/channels/AlreadyConnectedException.java \ java/nio/channels/AsynchronousCloseException.java \ java/nio/channels/ByteChannel.java \ *************** java/nio/channels/ClosedSelectorExceptio *** 2057,2062 **** --- 2492,2498 ---- java/nio/channels/ConnectionPendingException.java \ java/nio/channels/DatagramChannel.java \ java/nio/channels/FileChannel.java \ + java/nio/channels/FileChannelImpl.java \ java/nio/channels/FileLock.java \ java/nio/channels/FileLockInterruptionException.java \ java/nio/channels/GatheringByteChannel.java \ *************** java/security/acl/NotOwnerException.java *** 2173,2178 **** --- 2609,2615 ---- java/security/acl/Permission.java \ java/security/cert/CRL.java \ java/security/cert/CRLException.java \ + java/security/cert/CRLSelector.java \ java/security/cert/Certificate.java \ java/security/cert/CertificateEncodingException.java \ java/security/cert/CertificateException.java \ *************** java/security/cert/CertificateFactorySpi *** 2182,2190 **** --- 2619,2648 ---- java/security/cert/CertificateNotYetValidException.java \ java/security/cert/CertificateParsingException.java \ java/security/cert/CertPath.java \ + java/security/cert/CertPathBuilder.java \ java/security/cert/CertPathBuilderException.java \ + java/security/cert/CertPathBuilderResult.java \ + java/security/cert/CertPathBuilderSpi.java \ + java/security/cert/CertPathParameters.java \ + java/security/cert/CertPathValidator.java \ java/security/cert/CertPathValidatorException.java \ + java/security/cert/CertPathValidatorResult.java \ + java/security/cert/CertPathValidatorSpi.java \ + java/security/cert/CertSelector.java \ + java/security/cert/CertStore.java \ java/security/cert/CertStoreException.java \ + java/security/cert/CertStoreParameters.java \ + java/security/cert/CertStoreSpi.java \ + java/security/cert/CollectionCertStoreParameters.java \ + java/security/cert/LDAPCertStoreParameters.java \ + java/security/cert/PKIXBuilderParameters.java \ + java/security/cert/PKIXCertPathBuilderResult.java \ + java/security/cert/PKIXCertPathChecker.java \ + java/security/cert/PKIXCertPathValidatorResult.java \ + java/security/cert/PKIXParameters.java \ + java/security/cert/PolicyNode.java \ + java/security/cert/PolicyQualifierInfo.java \ + java/security/cert/TrustAnchor.java \ java/security/cert/X509CRL.java \ java/security/cert/X509CRLEntry.java \ java/security/cert/X509Certificate.java \ *************** java/security/interfaces/DSAParams.java *** 2195,2200 **** --- 2653,2659 ---- java/security/interfaces/DSAPrivateKey.java \ java/security/interfaces/DSAPublicKey.java \ java/security/interfaces/RSAKey.java \ + java/security/interfaces/RSAMultiPrimePrivateCrtKey.java \ java/security/interfaces/RSAPrivateCrtKey.java \ java/security/interfaces/RSAPrivateKey.java \ java/security/interfaces/RSAPublicKey.java \ *************** java/security/spec/InvalidKeySpecExcepti *** 2207,2213 **** --- 2666,2675 ---- java/security/spec/InvalidParameterSpecException.java \ java/security/spec/KeySpec.java \ java/security/spec/PKCS8EncodedKeySpec.java \ + java/security/spec/PSSParameterSpec.java \ java/security/spec/RSAKeyGenParameterSpec.java \ + java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java\ + java/security/spec/RSAOtherPrimeInfo.java \ java/security/spec/RSAPrivateCrtKeySpec.java \ java/security/spec/RSAPrivateKeySpec.java \ java/security/spec/RSAPublicKeySpec.java \ *************** java/text/DecimalFormat.java \ *** 2257,2262 **** --- 2719,2725 ---- java/text/DecimalFormatSymbols.java \ java/text/FieldPosition.java \ java/text/Format.java \ + java/text/FormatCharacterIterator.java \ java/text/MessageFormat.java \ java/text/NumberFormat.java \ java/text/ParseException.java \ *************** c_source_files = \ *** 2313,2318 **** --- 2776,2783 ---- java/lang/e_sqrt.c java/lang/s_scalbn.c java/lang/sf_rint.c \ java/lang/k_cos.c java/lang/s_sin.c java/lang/sf_fabs.c + extra_cc_source_files = $(EXTRA_CC_FILES) + #java/awt/natToolkit.cc ## This lists all the C++ source files in subdirectories. *************** gnu/gcj/convert/natOutput_EUCJIS.cc \ *** 2328,2334 **** gnu/gcj/convert/natOutput_SJIS.cc \ gnu/gcj/io/natSimpleSHSStream.cc \ gnu/gcj/io/shs.cc \ - gnu/gcj/protocol/core/natCoreInputStream.cc \ gnu/gcj/runtime/natFinalizerThread.cc \ gnu/gcj/runtime/natFirstThread.cc \ gnu/gcj/runtime/natNameFinder.cc \ --- 2793,2798 ---- *************** gnu/gcj/runtime/natSharedLibLoader.cc \ *** 2336,2351 **** gnu/gcj/runtime/natStackTrace.cc \ gnu/gcj/runtime/natStringBuffer.cc \ gnu/gcj/runtime/natVMClassLoader.cc \ ! gnu/java/nio/natByteBufferImpl.cc \ ! gnu/java/nio/natCharBufferImpl.cc \ ! gnu/java/nio/natDoubleBufferImpl.cc \ ! gnu/java/nio/natFileChannelImpl.cc \ ! gnu/java/nio/natFloatBufferImpl.cc \ ! gnu/java/nio/natIntBufferImpl.cc \ ! gnu/java/nio/natLongBufferImpl.cc \ gnu/java/nio/natSelectorImpl.cc \ ! gnu/java/nio/natShortBufferImpl.cc \ ! gnu/java/nio/natSocketChannelImpl.cc \ java/io/natFile.cc \ java/io/natFileDescriptor.cc \ java/io/natObjectInputStream.cc \ --- 2800,2813 ---- gnu/gcj/runtime/natStackTrace.cc \ gnu/gcj/runtime/natStringBuffer.cc \ gnu/gcj/runtime/natVMClassLoader.cc \ ! gnu/java/awt/natEmbeddedWindow.cc \ ! gnu/java/net/natPlainDatagramSocketImpl.cc \ ! gnu/java/net/natPlainSocketImpl.cc \ ! gnu/java/net/protocol/core/natCoreInputStream.cc \ ! gnu/java/nio/natFileLockImpl.cc \ ! gnu/java/nio/natPipeImpl.cc \ gnu/java/nio/natSelectorImpl.cc \ ! gnu/java/nio/natNIOServerSocket.cc \ java/io/natFile.cc \ java/io/natFileDescriptor.cc \ java/io/natObjectInputStream.cc \ *************** java/lang/reflect/natMethod.cc \ *** 2372,2379 **** java/lang/reflect/natProxy.cc \ java/net/natNetworkInterface.cc \ java/net/natInetAddress.cc \ ! java/net/natPlainDatagramSocketImpl.cc \ ! java/net/natPlainSocketImpl.cc \ java/text/natCollator.cc \ java/util/natResourceBundle.cc \ java/util/natTimeZone.cc \ --- 2834,2841 ---- java/lang/reflect/natProxy.cc \ java/net/natNetworkInterface.cc \ java/net/natInetAddress.cc \ ! java/nio/natDirectByteBufferImpl.cc \ ! java/nio/channels/natFileChannelImpl.cc \ java/text/natCollator.cc \ java/util/natResourceBundle.cc \ java/util/natTimeZone.cc \ *************** gnu/awt/xlib/XFontMetrics.java \ *** 2411,2416 **** --- 2873,2879 ---- gnu/awt/xlib/XFramePeer.java \ gnu/awt/xlib/XGraphics.java \ gnu/awt/xlib/XGraphicsConfiguration.java \ + gnu/awt/xlib/XOffScreenImage.java \ gnu/awt/xlib/XPanelPeer.java \ gnu/awt/xlib/XToolkit.java *************** texinfo: TexinfoDoclet.class *** 2480,2486 **** ## Dependency tracking madness. ## - ## FIXME: depends on GNU make. -include deps.mk ## This is an evil hack to work around an automake limitation. We --- 2943,2948 ---- *************** texinfo: TexinfoDoclet.class *** 2490,2496 **** ## the C++ code whenever any .java file is touched. ## Also force all the class files to build first. This makes them build in ## the right order to improve performance. ! all-recursive: $(all_java_class_files) $(nat_headers) $(x_nat_headers) ## ################################################################ --- 2952,2958 ---- ## the C++ code whenever any .java file is touched. ## Also force all the class files to build first. This makes them build in ## the right order to improve performance. ! all-recursive: libgcj-@gcc_version@.jar $(nat_headers) $(x_nat_headers) ## ################################################################ *************** AM_MAKEFLAGS = \ *** 2506,2511 **** --- 2968,2974 ---- "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ "CFLAGS=$(CFLAGS)" \ "CXXFLAGS=$(CXXFLAGS)" \ + "CPPFLAGS=$(CPPFLAGS)" \ "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ "INSTALL=$(INSTALL)" \ diff -Nrc3pad gcc-3.3.3/libjava/Makefile.in gcc-3.4.0/libjava/Makefile.in *** gcc-3.3.3/libjava/Makefile.in 2004-02-14 20:34:20.000000000 +0000 --- gcc-3.4.0/libjava/Makefile.in 2004-04-19 02:23:04.000000000 +0000 *************** target_triplet = @target@ *** 66,71 **** --- 66,73 ---- AR = @AR@ AS = @AS@ BACKTRACESPEC = @BACKTRACESPEC@ + CAIRO_CFLAGS = @CAIRO_CFLAGS@ + CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CHECKREFSPEC = @CHECKREFSPEC@ COMPPATH = @COMPPATH@ *************** DIVIDESPEC = @DIVIDESPEC@ *** 76,81 **** --- 78,84 ---- DLLTOOL = @DLLTOOL@ EXCEPTIONSPEC = @EXCEPTIONSPEC@ EXEEXT = @EXEEXT@ + EXTRA_CC_FILES = @EXTRA_CC_FILES@ GCDEPS = @GCDEPS@ GCINCS = @GCINCS@ GCJ = @GCJ@ *************** GCLIBS = @GCLIBS@ *** 85,95 **** --- 88,110 ---- GCOBJS = @GCOBJS@ GCSPEC = @GCSPEC@ GCTESTSPEC = @GCTESTSPEC@ + GLIB_CFLAGS = @GLIB_CFLAGS@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GTK_CFLAGS = @GTK_CFLAGS@ + GTK_LIBS = @GTK_LIBS@ HASH_SYNC_SPEC = @HASH_SYNC_SPEC@ + HAVE_LIB = @HAVE_LIB@ IEEESPEC = @IEEESPEC@ INCLTDL = @INCLTDL@ INTERPRETER = @INTERPRETER@ JC1GCSPEC = @JC1GCSPEC@ + LIB = @LIB@ + LIBART_CFLAGS = @LIBART_CFLAGS@ + LIBART_CONFIG = @LIBART_CONFIG@ + LIBART_LIBS = @LIBART_LIBS@ LIBFFI = @LIBFFI@ LIBGCJDEBUG = @LIBGCJDEBUG@ LIBGCJTESTSPEC = @LIBGCJTESTSPEC@ *************** LIBICONV = @LIBICONV@ *** 100,123 **** --- 115,144 ---- LIBLTDL = @LIBLTDL@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ + LTLIB = @LTLIB@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ + PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ + PANGOFT2_LIBS = @PANGOFT2_LIBS@ PERL = @PERL@ + PKG_CONFIG = @PKG_CONFIG@ PLATFORMOBJS = @PLATFORMOBJS@ RANLIB = @RANLIB@ STRIP = @STRIP@ SYSDEP_SOURCES = @SYSDEP_SOURCES@ SYSTEMSPEC = @SYSTEMSPEC@ SYS_ZLIBS = @SYS_ZLIBS@ + THREADCXXFLAGS = @THREADCXXFLAGS@ THREADDEPS = @THREADDEPS@ THREADINCS = @THREADINCS@ THREADLDFLAGS = @THREADLDFLAGS@ THREADLIBS = @THREADLIBS@ THREADOBJS = @THREADOBJS@ THREADSPEC = @THREADSPEC@ + TOOLKIT = @TOOLKIT@ VERSION = @VERSION@ ZINCS = @ZINCS@ ZLIBS = @ZLIBS@ *************** toolexeclibdir = @toolexeclibdir@ *** 134,153 **** toolexecmainlibdir = @toolexecmainlibdir@ AUTOMAKE_OPTIONS = foreign @TESTSUBDIR_TRUE@SUBDIRS = @TESTSUBDIR_TRUE@$(DIRLTDL) testsuite gcj include @TESTSUBDIR_FALSE@SUBDIRS = @TESTSUBDIR_FALSE@$(DIRLTDL) gcj include @XLIB_AWT_TRUE@cond_x_ltlibrary = @XLIB_AWT_TRUE@lib-gnu-awt-xlib.la @XLIB_AWT_FALSE@cond_x_ltlibrary = @XLIB_AWT_TRUE@xlib_includes = @XLIB_AWT_TRUE@-I../libstdc++-v3/include -I../libstdc++-v3/include/$(target_alias) -I$(srcdir)/../libstdc++-v3/libsupc++ @XLIB_AWT_FALSE@xlib_includes = - toolexeclib_LTLIBRARIES = libgcj.la lib-org-xml-sax.la lib-org-w3c-dom.la $(cond_x_ltlibrary) toolexecmainlib_DATA = libgcj.spec jardir = $(datadir)/java jar_DATA = libgcj-@gcc_version@.jar secdir = $(libdir)/security @NATIVE_TRUE@bin_PROGRAMS = @NATIVE_TRUE@jv-convert gij rmic rmiregistry --- 155,193 ---- toolexecmainlibdir = @toolexecmainlibdir@ AUTOMAKE_OPTIONS = foreign + + ACLOCAL_AMFLAGS = -I . @TESTSUBDIR_TRUE@SUBDIRS = @TESTSUBDIR_TRUE@$(DIRLTDL) testsuite gcj include @TESTSUBDIR_FALSE@SUBDIRS = @TESTSUBDIR_FALSE@$(DIRLTDL) gcj include + + # write_entries_to_file - writes each entry in a list + # to the specified file. Each entry is written individually + # to accomodate systems with severe command-line-length + # limitations. + # Parameters: + # $(1): variable containing entries to iterate over + # $(2): output file + write_entries_to_file = $(shell rm -f $(2) || :) $(shell touch $(2)) $(foreach object,$(1),$(shell echo $(object) >> $(2))) @XLIB_AWT_TRUE@cond_x_ltlibrary = @XLIB_AWT_TRUE@lib-gnu-awt-xlib.la @XLIB_AWT_FALSE@cond_x_ltlibrary = @XLIB_AWT_TRUE@xlib_includes = @XLIB_AWT_TRUE@-I../libstdc++-v3/include -I../libstdc++-v3/include/$(target_alias) -I$(srcdir)/../libstdc++-v3/libsupc++ @XLIB_AWT_FALSE@xlib_includes = + @GTK_AWT_TRUE@cond_gtk_ltlibrary = @GTK_AWT_TRUE@lib-gnu-java-awt-peer-gtk.la + @GTK_AWT_FALSE@cond_gtk_ltlibrary = + + toolexeclib_LTLIBRARIES = libgcj.la lib-org-xml-sax.la lib-org-w3c-dom.la \ + $(cond_gtk_ltlibrary) $(cond_x_ltlibrary) toolexecmainlib_DATA = libgcj.spec + pkgconfigdir = $(libdir)/pkgconfig + pkgconfig_DATA = libgcj.pc + jardir = $(datadir)/java jar_DATA = libgcj-@gcc_version@.jar secdir = $(libdir)/security + propdir = $(libdir) @NATIVE_TRUE@bin_PROGRAMS = @NATIVE_TRUE@jv-convert gij rmic rmiregistry *************** bin_SCRIPTS = addr2name.awk *** 155,164 **** @CANADIAN_TRUE@@NULL_TARGET_TRUE@ZIP = @CANADIAN_TRUE@@NULL_TARGET_TRUE@$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/jar @CANADIAN_TRUE@@NULL_TARGET_FALSE@ZIP = @CANADIAN_TRUE@@NULL_TARGET_FALSE@jar @CANADIAN_FALSE@ZIP = @CANADIAN_FALSE@$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/jar ! @CANADIAN_TRUE@GCJH = @CANADIAN_TRUE@gcjh @CANADIAN_FALSE@GCJH = @CANADIAN_FALSE@$(MULTIBUILDTOP)../$(COMPPATH)/gcc/gcjh ! GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 GCJCOMPILE = $(LIBTOOL) --tag=GCJ --mode=compile $(GCJ_WITH_FLAGS) -fclasspath= -fbootclasspath=$(here) $(JC1FLAGS) -MD -MT $@ -MF $(@:.lo=.d) -c GCJLINK = $(LIBTOOL) --tag=GCJ --mode=link $(GCJ) -L$(here) $(JC1FLAGS) $(LDFLAGS) -o $@ --- 195,205 ---- @CANADIAN_TRUE@@NULL_TARGET_TRUE@ZIP = @CANADIAN_TRUE@@NULL_TARGET_TRUE@$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/jar @CANADIAN_TRUE@@NULL_TARGET_FALSE@ZIP = @CANADIAN_TRUE@@NULL_TARGET_FALSE@jar @CANADIAN_FALSE@ZIP = @CANADIAN_FALSE@$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/jar ! @CANADIAN_TRUE@@NULL_TARGET_TRUE@GCJH = @CANADIAN_TRUE@@NULL_TARGET_TRUE@gcjh ! @CANADIAN_TRUE@@NULL_TARGET_FALSE@GCJH = @CANADIAN_TRUE@@NULL_TARGET_FALSE@$(target_alias)-gcjh @CANADIAN_FALSE@GCJH = @CANADIAN_FALSE@$(MULTIBUILDTOP)../$(COMPPATH)/gcc/gcjh ! GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated GCJCOMPILE = $(LIBTOOL) --tag=GCJ --mode=compile $(GCJ_WITH_FLAGS) -fclasspath= -fbootclasspath=$(here) $(JC1FLAGS) -MD -MT $@ -MF $(@:.lo=.d) -c GCJLINK = $(LIBTOOL) --tag=GCJ --mode=link $(GCJ) -L$(here) $(JC1FLAGS) $(LDFLAGS) -o $@ *************** JAVAC = $(GCJ_WITH_FLAGS) -C *** 171,181 **** GCC_UNWIND_INCLUDE = @GCC_UNWIND_INCLUDE@ WARNINGS = -W -Wall ! AM_CXXFLAGS = -fno-rtti -fnon-call-exceptions \ -fdollars-in-identifiers \ -Wswitch-enum \ @LIBGCJ_CXXFLAGS@ @X_CFLAGS@ $(WARNINGS) -D_GNU_SOURCE \ ! -DPREFIX="\"$(prefix)\"" @USING_GCC_TRUE@AM_CFLAGS = @USING_GCC_TRUE@@LIBGCJ_CFLAGS@ $(WARNINGS) @USING_GCC_FALSE@AM_CFLAGS = @USING_GCC_FALSE@@LIBGCJ_CFLAGS@ --- 212,223 ---- GCC_UNWIND_INCLUDE = @GCC_UNWIND_INCLUDE@ WARNINGS = -W -Wall ! AM_CXXFLAGS = -fno-rtti -fnon-call-exceptions $(THREADCXXFLAGS) \ -fdollars-in-identifiers \ -Wswitch-enum \ @LIBGCJ_CXXFLAGS@ @X_CFLAGS@ $(WARNINGS) -D_GNU_SOURCE \ ! -DPREFIX="\"$(prefix)\"" -DLIBDIR="\"$(libdir)\"" \ ! -DBOOT_CLASS_PATH="\"$(jardir)/$(jar_DATA)\"" @USING_GCC_TRUE@AM_CFLAGS = @USING_GCC_TRUE@@LIBGCJ_CFLAGS@ $(WARNINGS) @USING_GCC_FALSE@AM_CFLAGS = @USING_GCC_FALSE@@LIBGCJ_CFLAGS@ *************** INCLUDES = -I$(top_srcdir) -Iinclude -I$ *** 193,198 **** --- 235,242 ---- nat_files = $(nat_source_files:.cc=.lo) x_nat_files = $(x_nat_source_files:.cc=.lo) c_files = $(c_source_files:.c=.lo) + extra_cc_files = $(extra_cc_source_files:.cc=.lo) + gtk_c_files = $(gtk_c_source_files:.c=.lo) javao_files = $(java_source_files:.java=.lo) \ $(built_java_source_files:.java=.lo) *************** libgcj_la_SOURCES = prims.cc jni.cc exce *** 203,217 **** $(nat_source_files) EXTRA_libgcj_la_SOURCES = boehm.cc nogc.cc posix-threads.cc no-threads.cc \ ! win32-threads.cc posix.cc win32.cc \ ! $(c_source_files) $(java_source_files) $(built_java_source_files) libgcj_la_DEPENDENCIES = libgcj-@gcc_version@.jar $(javao_files) \ ! $(c_files) $(GCOBJS) $(THREADOBJS) $(PLATFORMOBJS) $(LIBLTDL) \ ! $(LIBFFI) $(ZLIBS) $(GCLIBS) ! libgcj_la_LIBADD = $(javao_files) $(c_files) $(GCOBJS) \ $(THREADOBJS) $(PLATFORMOBJS) # Include THREADLIBS here to ensure that the correct version of --- 247,261 ---- $(nat_source_files) EXTRA_libgcj_la_SOURCES = boehm.cc nogc.cc posix-threads.cc no-threads.cc \ ! win32-threads.cc posix.cc win32.cc $(c_source_files) \ ! $(extra_cc_source_files) $(java_source_files) $(built_java_source_files) libgcj_la_DEPENDENCIES = libgcj-@gcc_version@.jar $(javao_files) \ ! $(c_files) $(extra_cc_files) $(GCOBJS) $(THREADOBJS) \ ! $(PLATFORMOBJS) $(LIBLTDL) $(LIBFFI) $(ZLIBS) $(GCLIBS) ! libgcj_la_LIBADD = $(javao_files) $(c_files) $(extra_cc_files) $(GCOBJS) \ $(THREADOBJS) $(PLATFORMOBJS) # Include THREADLIBS here to ensure that the correct version of *************** libgcj_la_LDFLAGS = -rpath $(toolexeclib *** 221,226 **** --- 265,378 ---- -version-info `grep -v '^\#' $(srcdir)/libtool-version` libgcj_la_LINK = $(LIBLINK) + @GTK_CAIRO_TRUE@gtk_cairo_c_source_files = @GTK_CAIRO_TRUE@\ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeer.c \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeerMetrics.c \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGlyphVector.c \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c + @GTK_CAIRO_FALSE@gtk_cairo_c_source_files = + + gtk_c_source_files = \ + $(gtk_cairo_c_source_files) \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontMetrics.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCanvasPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImagePainter.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuBarPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPanelPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c \ + jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c \ + jni/gtk-peer/gthread-jni.c \ + jni/classpath/jcl.c \ + jni/classpath/jnilink.c \ + jni/classpath/native_state.c \ + jni/classpath/primlib.c + + + gtk_awt_peer_sources = \ + gnu/java/awt/peer/gtk/GdkClasspathFontPeer.java \ + gnu/java/awt/peer/gtk/GdkClasspathFontPeerMetrics.java \ + gnu/java/awt/peer/gtk/GdkFontMetrics.java \ + gnu/java/awt/peer/gtk/GdkGlyphVector.java \ + gnu/java/awt/peer/gtk/GdkGraphics.java \ + gnu/java/awt/peer/gtk/GdkGraphics2D.java \ + gnu/java/awt/peer/gtk/GdkPixbufDecoder.java \ + gnu/java/awt/peer/gtk/GtkArg.java \ + gnu/java/awt/peer/gtk/GtkArgList.java \ + gnu/java/awt/peer/gtk/GtkButtonPeer.java \ + gnu/java/awt/peer/gtk/GtkCanvasPeer.java \ + gnu/java/awt/peer/gtk/GtkCheckboxGroupPeer.java \ + gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java \ + gnu/java/awt/peer/gtk/GtkCheckboxPeer.java \ + gnu/java/awt/peer/gtk/GtkChoicePeer.java \ + gnu/java/awt/peer/gtk/GtkClipboard.java \ + gnu/java/awt/peer/gtk/GtkComponentPeer.java \ + gnu/java/awt/peer/gtk/GtkContainerPeer.java \ + gnu/java/awt/peer/gtk/GtkDialogPeer.java \ + gnu/java/awt/peer/gtk/GtkEmbeddedWindowPeer.java \ + gnu/java/awt/peer/gtk/GtkFileDialogPeer.java \ + gnu/java/awt/peer/gtk/GtkFontPeer.java \ + gnu/java/awt/peer/gtk/GtkFramePeer.java \ + gnu/java/awt/peer/gtk/GtkGenericPeer.java \ + gnu/java/awt/peer/gtk/GtkImage.java \ + gnu/java/awt/peer/gtk/GtkImagePainter.java \ + gnu/java/awt/peer/gtk/GtkLabelPeer.java \ + gnu/java/awt/peer/gtk/GtkListPeer.java \ + gnu/java/awt/peer/gtk/GtkMainThread.java \ + gnu/java/awt/peer/gtk/GtkMenuBarPeer.java \ + gnu/java/awt/peer/gtk/GtkMenuComponentPeer.java \ + gnu/java/awt/peer/gtk/GtkMenuItemPeer.java \ + gnu/java/awt/peer/gtk/GtkMenuPeer.java \ + gnu/java/awt/peer/gtk/GtkOffScreenImage.java \ + gnu/java/awt/peer/gtk/GtkPanelPeer.java \ + gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java \ + gnu/java/awt/peer/gtk/GtkScrollPanePeer.java \ + gnu/java/awt/peer/gtk/GtkScrollbarPeer.java \ + gnu/java/awt/peer/gtk/GtkTextAreaPeer.java \ + gnu/java/awt/peer/gtk/GtkTextComponentPeer.java \ + gnu/java/awt/peer/gtk/GtkTextFieldPeer.java \ + gnu/java/awt/peer/gtk/GtkToolkit.java \ + gnu/java/awt/peer/gtk/GtkWindowPeer.java + + + gtk_c_headers = $(patsubst %.java,jniinclude/%.h,$(subst /,_,$(gtk_awt_peer_sources))) + + lib_gnu_java_awt_peer_gtk_la_SOURCES = \ + $(gtk_awt_peer_sources) \ + $(gtk_c_source_files) \ + jni/gtk-peer/gthread-jni.h \ + jni/gtk-peer/gtkpeer.h \ + jni/classpath/jcl.h \ + jni/classpath/jnilink.h \ + jni/classpath/native_state.h \ + jni/classpath/primlib.h + + + lib_gnu_java_awt_peer_gtk_la_LIBADD = $(GTK_LIBS) $(GLIB_LIBS) $(LIBART_LIBS) $(CAIRO_LIBS) $(PANGOFT2_LIBS) + lib_gnu_java_awt_peer_gtk_la_LDFLAGS = \ + -version-info `grep -v '^\#' $(srcdir)/libtool-version` + lib_org_w3c_dom_la_SOURCES = org/w3c/dom/Attr.java \ org/w3c/dom/CDATASection.java \ *************** org/w3c/dom/traversal/NodeFilter.java \ *** 248,253 **** --- 400,409 ---- org/w3c/dom/traversal/NodeIterator.java \ org/w3c/dom/traversal/TreeWalker.java + lib_org_w3c_dom_la_LIBADD = -L$(here)/.libs libgcj.la + lib_org_w3c_dom_la_LDFLAGS = -rpath $(toolexeclibdir) \ + -version-info `grep -v '^\#' $(srcdir)/libtool-version` + lib_org_xml_sax_la_SOURCES = org/xml/sax/ext/DeclHandler.java \ org/xml/sax/ext/LexicalHandler.java \ *************** org/xml/sax/SAXParseException.java \ *** 280,285 **** --- 436,445 ---- org/xml/sax/XMLFilter.java \ org/xml/sax/XMLReader.java + lib_org_xml_sax_la_LIBADD = -L$(here)/.libs libgcj.la + lib_org_xml_sax_la_LDFLAGS = -rpath $(toolexeclibdir) \ + -version-info `grep -v '^\#' $(srcdir)/libtool-version` + lib_gnu_awt_xlib_la_SOURCES = $(x_nat_source_files) EXTRA_lib_gnu_awt_xlib_la_SOURCES = $(x_java_source_files) *************** all_java_source_files = \ *** 297,308 **** $(built_java_source_files) \ $(lib_org_xml_sax_la_SOURCES) \ $(lib_org_w3c_dom_la_SOURCES) \ $(x_java_source_files) all_java_class_files = $(all_java_source_files:.java=.class) ! MOSTLYCLEANFILES = $(javao_files) $(nat_files) $(nat_headers) $(c_files) $(x_javao_files) $(x_nat_files) $(x_nat_headers) CLEANFILES = libgcj-@gcc_version@.jar SUFFIXES = .class .java .h --- 457,472 ---- $(built_java_source_files) \ $(lib_org_xml_sax_la_SOURCES) \ $(lib_org_w3c_dom_la_SOURCES) \ + $(gtk_awt_peer_sources) \ $(x_java_source_files) all_java_class_files = $(all_java_source_files:.java=.class) ! # Note: The libtool objects are removed by mostlyclean-local ! # because of command-line-length issues. ! MOSTLYCLEANFILES = $(nat_headers) $(x_nat_headers) ! CLEANFILES = libgcj-@gcc_version@.jar SUFFIXES = .class .java .h *************** ordinary_nat_headers = $(ordinary_java_s *** 314,323 **** inner_nat_headers = java/io/ObjectOutputStream$$PutField.h \ java/io/ObjectInputStream$$GetField.h \ java/lang/reflect/Proxy$$ProxyData.h \ ! java/lang/reflect/Proxy$$ProxyType.h nat_headers = $(ordinary_nat_headers) $(inner_nat_headers) x_nat_headers = $(x_java_source_files:.java=.h) --- 478,490 ---- inner_nat_headers = java/io/ObjectOutputStream$$PutField.h \ java/io/ObjectInputStream$$GetField.h \ java/lang/reflect/Proxy$$ProxyData.h \ ! java/lang/reflect/Proxy$$ProxyType.h \ ! gnu/java/net/PlainSocketImpl$$SocketInputStream.h \ ! gnu/java/net/PlainSocketImpl$$SocketOutputStream.h nat_headers = $(ordinary_nat_headers) $(inner_nat_headers) + nat_headers_install = $(ordinary_nat_headers) x_nat_headers = $(x_java_source_files:.java=.h) *************** gnu/awt/j2d/IntegerGraphicsState.java \ *** 408,418 **** gnu/awt/j2d/MappedRaster.java \ gnu/java/awt/BitMaskExtent.java \ gnu/java/awt/Buffers.java \ gnu/java/awt/ComponentDataBlitOp.java \ ! gnu/java/awt/GLightweightPeer.java \ gnu/java/awt/EventModifier.java \ gnu/java/awt/image/ImageDecoder.java \ gnu/java/awt/image/XBMDecoder.java \ gnu/java/beans/editors/ColorEditor.java \ gnu/java/beans/editors/FontEditor.java \ gnu/java/beans/editors/NativeBooleanEditor.java \ --- 575,591 ---- gnu/awt/j2d/MappedRaster.java \ gnu/java/awt/BitMaskExtent.java \ gnu/java/awt/Buffers.java \ + gnu/java/awt/BitwiseXORComposite.java \ gnu/java/awt/ComponentDataBlitOp.java \ ! gnu/java/awt/ClasspathToolkit.java \ ! gnu/java/awt/EmbeddedWindow.java \ ! gnu/java/awt/EmbeddedWindowSupport.java \ gnu/java/awt/EventModifier.java \ gnu/java/awt/image/ImageDecoder.java \ gnu/java/awt/image/XBMDecoder.java \ + gnu/java/awt/peer/EmbeddedWindowPeer.java \ + gnu/java/awt/peer/GLightweightPeer.java \ + gnu/java/awt/peer/ClasspathFontPeer.java \ gnu/java/beans/editors/ColorEditor.java \ gnu/java/beans/editors/FontEditor.java \ gnu/java/beans/editors/NativeBooleanEditor.java \ *************** gnu/java/beans/BeanInfoEmbryo.java \ *** 428,433 **** --- 601,613 ---- gnu/java/beans/EmptyBeanInfo.java \ gnu/java/beans/ExplicitBeanInfo.java \ gnu/java/beans/IntrospectionIncubator.java \ + gnu/javax/rmi/CORBA/DelegateFactory.java \ + gnu/javax/rmi/CORBA/GetDelegateInstanceException.java \ + gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java \ + gnu/javax/rmi/CORBA/StubDelegateImpl.java \ + gnu/javax/rmi/CORBA/UtilDelegateImpl.java \ + gnu/javax/rmi/CORBA/ValueHandlerImpl.java \ + gnu/javax/rmi/PortableServer.java \ java/applet/Applet.java \ java/applet/AppletStub.java \ java/applet/AppletContext.java \ *************** java/awt/Graphics2D.java \ *** 467,472 **** --- 647,653 ---- java/awt/GraphicsConfiguration.java \ java/awt/GridBagConstraints.java \ java/awt/GridBagLayout.java \ + java/awt/GridBagLayoutInfo.java \ java/awt/GridLayout.java \ java/awt/IllegalComponentStateException.java \ java/awt/Image.java \ *************** java/awt/event/MouseWheelEvent.java \ *** 558,563 **** --- 739,760 ---- java/awt/event/MouseWheelListener.java \ java/awt/event/WindowFocusListener.java \ java/awt/event/WindowStateListener.java \ + java/awt/font/FontRenderContext.java \ + java/awt/font/ShapeGraphicAttribute.java \ + java/awt/font/MultipleMaster.java \ + java/awt/font/TransformAttribute.java \ + java/awt/font/GlyphJustificationInfo.java \ + java/awt/font/LineBreakMeasurer.java \ + java/awt/font/TextMeasurer.java \ + java/awt/font/TextLayout.java \ + java/awt/font/LineMetrics.java \ + java/awt/font/TextAttribute.java \ + java/awt/font/GlyphMetrics.java \ + java/awt/font/OpenType.java \ + java/awt/font/GlyphVector.java \ + java/awt/font/GraphicAttribute.java \ + java/awt/font/ImageGraphicAttribute.java \ + java/awt/font/NumericShaper.java \ java/awt/geom/AffineTransform.java \ java/awt/geom/Dimension2D.java \ java/awt/geom/Ellipse2D.java \ *************** java/awt/peer/MenuItemPeer.java \ *** 637,642 **** --- 834,840 ---- java/awt/peer/MenuPeer.java \ java/awt/peer/PanelPeer.java \ java/awt/peer/PopupMenuPeer.java \ + java/awt/peer/RobotPeer.java \ java/awt/peer/ScrollPanePeer.java \ java/awt/peer/ScrollbarPeer.java \ java/awt/peer/TextAreaPeer.java \ *************** java/awt/Stroke.java \ *** 679,685 **** --- 877,885 ---- java/awt/TexturePaint.java \ java/awt/dnd/peer/DragSourceContextPeer.java \ java/awt/dnd/peer/DropTargetContextPeer.java \ + java/awt/dnd/peer/DropTargetPeer.java \ java/awt/dnd/DnDConstants.java \ + java/awt/dnd/DnDEventMulticaster.java \ java/awt/dnd/DragGestureEvent.java \ java/awt/dnd/DragGestureListener.java \ java/awt/dnd/DragGestureRecognizer.java \ *************** java/beans/beancontext/BeanContextServic *** 735,740 **** --- 935,942 ---- java/beans/beancontext/BeanContextServiceRevokedListener.java \ java/beans/beancontext/BeanContextServices.java \ java/beans/beancontext/BeanContextServicesListener.java \ + java/beans/beancontext/BeanContextServicesSupport.java \ + java/beans/beancontext/BeanContextSupport.java \ java/beans/BeanDescriptor.java \ java/beans/BeanInfo.java \ java/beans/Beans.java \ *************** java/beans/VetoableChangeListenerProxy.j *** 763,777 **** java/beans/VetoableChangeSupport.java \ java/beans/Visibility.java \ java/beans/AppletInitializer.java \ javax/swing/border/AbstractBorder.java \ javax/swing/border/Border.java \ javax/swing/border/CompoundBorder.java \ javax/swing/border/EmptyBorder.java \ - javax/swing/border/MatteBorder.java \ - javax/swing/border/TitledBorder.java \ - javax/swing/border/BevelBorder.java \ javax/swing/border/EtchedBorder.java \ javax/swing/border/LineBorder.java \ javax/swing/GrayFilter.java \ javax/swing/AbstractAction.java \ javax/swing/AbstractButton.java \ --- 965,993 ---- java/beans/VetoableChangeSupport.java \ java/beans/Visibility.java \ java/beans/AppletInitializer.java \ + javax/rmi/BAD_OPERATION.java \ + javax/rmi/ORB.java \ + javax/rmi/PortableRemoteObject.java \ + javax/rmi/CORBA/ClassDesc.java \ + javax/rmi/CORBA/ObjectImpl.java \ + javax/rmi/CORBA/PortableRemoteObjectDelegate.java \ + javax/rmi/CORBA/StubDelegate.java \ + javax/rmi/CORBA/Stub.java \ + javax/rmi/CORBA/SystemException.java \ + javax/rmi/CORBA/Tie.java \ + javax/rmi/CORBA/UtilDelegate.java \ + javax/rmi/CORBA/Util.java \ + javax/rmi/CORBA/ValueHandler.java \ javax/swing/border/AbstractBorder.java \ + javax/swing/border/BevelBorder.java \ javax/swing/border/Border.java \ javax/swing/border/CompoundBorder.java \ javax/swing/border/EmptyBorder.java \ javax/swing/border/EtchedBorder.java \ javax/swing/border/LineBorder.java \ + javax/swing/border/MatteBorder.java \ + javax/swing/border/SoftBevelBorder.java \ + javax/swing/border/TitledBorder.java \ javax/swing/GrayFilter.java \ javax/swing/AbstractAction.java \ javax/swing/AbstractButton.java \ *************** javax/swing/plaf/basic/BasicOptionPaneUI *** 785,790 **** --- 1001,1008 ---- javax/swing/plaf/basic/BasicPanelUI.java \ javax/swing/plaf/basic/BasicRadioButtonUI.java \ javax/swing/plaf/basic/BasicScrollPaneUI.java \ + javax/swing/plaf/basic/BasicSplitPaneDivider.java \ + javax/swing/plaf/basic/BasicSplitPaneUI.java \ javax/swing/plaf/basic/BasicTabbedPaneUI.java \ javax/swing/plaf/basic/BasicTextUI.java \ javax/swing/plaf/basic/BasicToggleButtonUI.java \ *************** javax/swing/plaf/RootPaneUI.java \ *** 829,834 **** --- 1047,1053 ---- javax/swing/plaf/ScrollBarUI.java \ javax/swing/plaf/SeparatorUI.java \ javax/swing/plaf/SliderUI.java \ + javax/swing/plaf/SpinnerUI.java \ javax/swing/plaf/SplitPaneUI.java \ javax/swing/plaf/TableHeaderUI.java \ javax/swing/plaf/TableUI.java \ *************** javax/swing/filechooser/FileView.java \ *** 846,851 **** --- 1065,1071 ---- javax/swing/table/AbstractTableModel.java \ javax/swing/table/DefaultTableColumnModel.java \ javax/swing/table/DefaultTableModel.java \ + javax/swing/table/JTableHeader.java \ javax/swing/table/TableCellEditor.java \ javax/swing/table/TableCellRenderer.java \ javax/swing/table/TableColumn.java \ *************** javax/swing/JCheckBox.java \ *** 872,877 **** --- 1092,1098 ---- javax/swing/JComponent.java \ javax/swing/JDialog.java \ javax/swing/JEditorPane.java \ + javax/swing/JFormattedTextField.java \ javax/swing/JFrame.java \ javax/swing/JLabel.java \ javax/swing/JLayeredPane.java \ *************** javax/swing/text/ComponentView.java \ *** 956,961 **** --- 1177,1183 ---- javax/swing/text/DefaultCaret.java \ javax/swing/text/DefaultEditorKit.java \ javax/swing/text/Document.java \ + javax/swing/text/DocumentFilter.java \ javax/swing/text/EditorKit.java \ javax/swing/text/Element.java \ javax/swing/text/GapContent.java \ *************** javax/swing/text/Style.java \ *** 969,974 **** --- 1191,1197 ---- javax/swing/text/View.java \ javax/swing/text/ViewFactory.java \ javax/swing/text/MutableAttributeSet.java \ + javax/swing/text/NavigationFilter.java \ javax/swing/text/StyledDocument.java \ javax/swing/text/StyledEditorKit.java \ javax/swing/text/TextAction.java \ *************** javax/swing/JSplitPane.java \ *** 1046,1051 **** --- 1269,1276 ---- javax/swing/JTextPane.java \ javax/swing/JToolBar.java \ javax/swing/OverlayLayout.java \ + javax/swing/Popup.java \ + javax/swing/PopupFactory.java \ javax/swing/ProgressMonitor.java \ javax/swing/ProgressMonitorInputStream.java \ javax/swing/RepaintManager.java \ *************** gnu/java/rmi/registry/RegistryImpl.java *** 1130,1138 **** --- 1355,1366 ---- gnu/java/rmi/registry/RegistryImpl_Skel.java \ gnu/java/rmi/registry/RegistryImpl_Stub.java \ gnu/java/rmi/rmic/Compile_gcj.java \ + gnu/java/rmi/rmic/Compile_jikes.java \ + gnu/java/rmi/rmic/Compile_kjc.java \ gnu/java/rmi/rmic/Compiler.java \ gnu/java/rmi/rmic/CompilerProcess.java \ gnu/java/rmi/rmic/RMIC.java \ + gnu/java/rmi/rmic/RMICException.java \ gnu/java/rmi/rmic/TabbedWriter.java \ gnu/java/rmi/server/ConnectionRunnerPool.java \ gnu/java/rmi/server/ProtocolConstants.java \ *************** gnu/java/rmi/server/RMIDefaultSocketFact *** 1140,1145 **** --- 1368,1374 ---- gnu/java/rmi/server/RMIHashes.java \ gnu/java/rmi/server/RMIObjectInputStream.java \ gnu/java/rmi/server/RMIObjectOutputStream.java \ + gnu/java/rmi/server/RMIVoidValue.java \ gnu/java/rmi/server/UnicastConnection.java \ gnu/java/rmi/server/UnicastConnectionManager.java \ gnu/java/rmi/server/UnicastRef.java \ *************** javax/naming/ldap/UnsolicitedNotificatio *** 1261,1266 **** --- 1490,1552 ---- javax/naming/ldap/UnsolicitedNotificationEvent.java \ javax/naming/ldap/UnsolicitedNotificationListener.java \ javax/naming/OperationNotSupportedException.java \ + javax/print/attribute/Attribute.java \ + javax/print/attribute/AttributeSet.java \ + javax/print/attribute/AttributeSetUtilities.java \ + javax/print/attribute/DateTimeSyntax.java \ + javax/print/attribute/DocAttribute.java \ + javax/print/attribute/DocAttributeSet.java \ + javax/print/attribute/EnumSyntax.java \ + javax/print/attribute/HashAttributeSet.java \ + javax/print/attribute/HashDocAttributeSet.java \ + javax/print/attribute/HashPrintJobAttributeSet.java \ + javax/print/attribute/HashPrintRequestAttributeSet.java \ + javax/print/attribute/HashPrintServiceAttributeSet.java \ + javax/print/attribute/IntegerSyntax.java \ + javax/print/attribute/PrintJobAttribute.java \ + javax/print/attribute/PrintJobAttributeSet.java \ + javax/print/attribute/PrintRequestAttribute.java \ + javax/print/attribute/PrintRequestAttributeSet.java \ + javax/print/attribute/PrintServiceAttribute.java \ + javax/print/attribute/PrintServiceAttributeSet.java \ + javax/print/attribute/ResolutionSyntax.java \ + javax/print/attribute/SetOfIntegerSyntax.java \ + javax/print/attribute/Size2DSyntax.java \ + javax/print/attribute/SupportedValuesAttribute.java \ + javax/print/attribute/TextSyntax.java \ + javax/print/attribute/UnmodifiableSetException.java \ + javax/print/attribute/URISyntax.java \ + javax/print/attribute/standard/Copies.java \ + javax/print/attribute/standard/DateTimeAtCompleted.java \ + javax/print/attribute/standard/DateTimeAtCreation.java \ + javax/print/attribute/standard/DateTimeAtProcessing.java \ + javax/print/attribute/standard/DocumentName.java \ + javax/print/attribute/standard/JobHoldUntil.java \ + javax/print/attribute/standard/JobImpressions.java \ + javax/print/attribute/standard/JobImpressionsCompleted.java \ + javax/print/attribute/standard/JobKOctets.java \ + javax/print/attribute/standard/JobKOctetsProcessed.java \ + javax/print/attribute/standard/JobMediaSheets.java \ + javax/print/attribute/standard/JobMediaSheetsCompleted.java \ + javax/print/attribute/standard/JobMessageFromOperator.java \ + javax/print/attribute/standard/JobName.java \ + javax/print/attribute/standard/JobOriginatingUserName.java \ + javax/print/attribute/standard/JobPriority.java \ + javax/print/attribute/standard/JobPrioritySupported.java \ + javax/print/attribute/standard/NumberOfDocuments.java \ + javax/print/attribute/standard/NumberOfInterveningJobs.java \ + javax/print/attribute/standard/NumberUp.java \ + javax/print/attribute/standard/OutputDeviceAssigned.java \ + javax/print/attribute/standard/PagesPerMinute.java \ + javax/print/attribute/standard/PagesPerMinuteColor.java \ + javax/print/attribute/standard/PrinterInfo.java \ + javax/print/attribute/standard/PrinterLocation.java \ + javax/print/attribute/standard/PrinterMakeAndModel.java \ + javax/print/attribute/standard/PrinterMessageFromOperator.java \ + javax/print/attribute/standard/PrinterName.java \ + javax/print/attribute/standard/QueuedJobCount.java \ + javax/print/attribute/standard/RequestingUserName.java \ + javax/security/auth/x500/X500Principal.java \ javax/sql/ConnectionEvent.java \ javax/sql/ConnectionEventListener.java \ javax/sql/ConnectionPoolDataSource.java \ *************** java/util/Collection.java \ *** 1468,1473 **** --- 1754,1760 ---- java/util/Collections.java \ java/util/Comparator.java \ java/util/ConcurrentModificationException.java \ + java/util/Currency.java \ java/util/Date.java \ java/util/Dictionary.java \ java/util/EmptyStackException.java \ *************** java/util/TreeSet.java \ *** 1514,1519 **** --- 1801,1831 ---- java/util/TooManyListenersException.java \ java/util/Vector.java \ java/util/WeakHashMap.java \ + java/util/logging/ConsoleHandler.java \ + java/util/logging/ErrorManager.java \ + java/util/logging/FileHandler.java \ + java/util/logging/Filter.java \ + java/util/logging/Formatter.java \ + java/util/logging/Handler.java \ + java/util/logging/Level.java \ + java/util/logging/Logger.java \ + java/util/logging/LoggingPermission.java \ + java/util/logging/LogManager.java \ + java/util/logging/LogRecord.java \ + java/util/logging/MemoryHandler.java \ + java/util/logging/SimpleFormatter.java \ + java/util/logging/SocketHandler.java \ + java/util/logging/StreamHandler.java \ + java/util/logging/XMLFormatter.java \ + java/util/prefs/NodeChangeListener.java \ + java/util/prefs/Preferences.java \ + java/util/prefs/PreferenceChangeListener.java \ + java/util/prefs/NodeChangeEvent.java \ + java/util/prefs/InvalidPreferencesFormatException.java \ + java/util/prefs/AbstractPreferences.java \ + java/util/prefs/BackingStoreException.java \ + java/util/prefs/PreferenceChangeEvent.java \ + java/util/prefs/PreferencesFactory.java \ java/util/regex/Matcher.java \ java/util/regex/Pattern.java \ java/util/regex/PatternSyntaxException.java *************** gnu/gcj/RawData.java \ *** 1525,1549 **** gnu/gcj/io/DefaultMimeTypes.java \ gnu/gcj/io/MimeTypes.java \ gnu/gcj/io/SimpleSHSStream.java \ - gnu/gcj/protocol/core/Connection.java \ - gnu/gcj/protocol/core/Handler.java \ - gnu/gcj/protocol/core/CoreInputStream.java \ - gnu/gcj/protocol/file/Connection.java \ - gnu/gcj/protocol/file/Handler.java \ - gnu/gcj/protocol/http/Connection.java \ - gnu/gcj/protocol/http/Handler.java \ - gnu/gcj/protocol/jar/Connection.java \ - gnu/gcj/protocol/jar/Handler.java \ gnu/gcj/runtime/FileDeleter.java \ gnu/gcj/runtime/FinalizerThread.java \ gnu/gcj/runtime/FirstThread.java \ gnu/gcj/runtime/JNIWeakRef.java \ gnu/gcj/runtime/MethodRef.java \ gnu/gcj/runtime/NameFinder.java \ gnu/gcj/runtime/SharedLibLoader.java \ gnu/gcj/runtime/StackTrace.java \ gnu/gcj/runtime/StringBuffer.java \ gnu/gcj/runtime/VMClassLoader.java \ gnu/java/io/ClassLoaderObjectInputStream.java \ gnu/java/io/NullOutputStream.java \ gnu/java/io/ObjectIdentityWrapper.java \ --- 1837,1855 ---- gnu/gcj/io/DefaultMimeTypes.java \ gnu/gcj/io/MimeTypes.java \ gnu/gcj/io/SimpleSHSStream.java \ gnu/gcj/runtime/FileDeleter.java \ gnu/gcj/runtime/FinalizerThread.java \ gnu/gcj/runtime/FirstThread.java \ gnu/gcj/runtime/JNIWeakRef.java \ gnu/gcj/runtime/MethodRef.java \ gnu/gcj/runtime/NameFinder.java \ + gnu/gcj/runtime/SharedLibHelper.java \ gnu/gcj/runtime/SharedLibLoader.java \ gnu/gcj/runtime/StackTrace.java \ gnu/gcj/runtime/StringBuffer.java \ gnu/gcj/runtime/VMClassLoader.java \ + gnu/java/io/ASN1ParsingException.java \ + gnu/java/io/Base64InputStream.java \ gnu/java/io/ClassLoaderObjectInputStream.java \ gnu/java/io/NullOutputStream.java \ gnu/java/io/ObjectIdentityWrapper.java \ *************** gnu/java/locale/LocaleInformation_zh_HK. *** 1691,1711 **** gnu/java/locale/LocaleInformation_zh_SG.java \ gnu/java/locale/LocaleInformation_zh_TW.java \ gnu/java/math/MPN.java \ ! gnu/java/nio/ByteBufferImpl.java \ ! gnu/java/nio/CharBufferImpl.java \ gnu/java/nio/DatagramChannelImpl.java \ ! gnu/java/nio/DoubleBufferImpl.java \ ! gnu/java/nio/FileChannelImpl.java \ ! gnu/java/nio/FloatBufferImpl.java \ ! gnu/java/nio/IntBufferImpl.java \ ! gnu/java/nio/LongBufferImpl.java \ gnu/java/nio/PipeImpl.java \ gnu/java/nio/SelectionKeyImpl.java \ gnu/java/nio/SelectorImpl.java \ gnu/java/nio/SelectorProviderImpl.java \ gnu/java/nio/ServerSocketChannelImpl.java \ ! gnu/java/nio/ShortBufferImpl.java \ gnu/java/nio/SocketChannelImpl.java \ gnu/java/nio/charset/ISO_8859_1.java \ gnu/java/nio/charset/Provider.java \ gnu/java/nio/charset/US_ASCII.java \ --- 1997,2036 ---- gnu/java/locale/LocaleInformation_zh_SG.java \ gnu/java/locale/LocaleInformation_zh_TW.java \ gnu/java/math/MPN.java \ ! gnu/java/net/HeaderFieldHelper.java \ ! gnu/java/net/PlainDatagramSocketImpl.java \ ! gnu/java/net/PlainSocketImpl.java \ ! gnu/java/net/URLParseError.java \ ! gnu/java/net/protocol/core/Connection.java \ ! gnu/java/net/protocol/core/Handler.java \ ! gnu/java/net/protocol/core/CoreInputStream.java \ ! gnu/java/net/protocol/file/Connection.java \ ! gnu/java/net/protocol/file/Handler.java \ ! gnu/java/net/protocol/http/Connection.java \ ! gnu/java/net/protocol/http/Handler.java \ ! gnu/java/net/protocol/jar/Connection.java \ ! gnu/java/net/protocol/jar/Handler.java \ ! gnu/java/net/protocol/gcjlib/Connection.java \ ! gnu/java/net/protocol/gcjlib/Handler.java \ gnu/java/nio/DatagramChannelImpl.java \ ! gnu/java/nio/DatagramChannelSelectionKey.java \ ! gnu/java/nio/FileLockImpl.java \ ! gnu/java/nio/NIOConstants.java \ ! gnu/java/nio/NIODatagramSocket.java \ ! gnu/java/nio/NIOServerSocket.java \ ! gnu/java/nio/NIOSocket.java \ ! gnu/java/nio/ChannelInputStream.java \ ! gnu/java/nio/ChannelOutputStream.java \ ! gnu/java/nio/InputStreamChannel.java \ ! gnu/java/nio/OutputStreamChannel.java \ gnu/java/nio/PipeImpl.java \ gnu/java/nio/SelectionKeyImpl.java \ gnu/java/nio/SelectorImpl.java \ gnu/java/nio/SelectorProviderImpl.java \ gnu/java/nio/ServerSocketChannelImpl.java \ ! gnu/java/nio/ServerSocketChannelSelectionKey.java \ gnu/java/nio/SocketChannelImpl.java \ + gnu/java/nio/SocketChannelSelectionKey.java \ gnu/java/nio/charset/ISO_8859_1.java \ gnu/java/nio/charset/Provider.java \ gnu/java/nio/charset/US_ASCII.java \ *************** gnu/java/nio/charset/UTF_16Decoder.java *** 1715,1724 **** gnu/java/nio/charset/UTF_16Encoder.java \ gnu/java/nio/charset/UTF_16LE.java \ gnu/java/nio/charset/UTF_8.java \ gnu/java/security/der/DEREncodingException.java \ ! gnu/java/security/provider/DERReader.java \ ! gnu/java/security/provider/DERWriter.java \ gnu/java/security/provider/DefaultPolicy.java \ gnu/java/security/provider/DSAKeyPairGenerator.java \ gnu/java/security/provider/DSAParameterGenerator.java \ gnu/java/security/provider/DSAParameters.java \ --- 2040,2055 ---- gnu/java/nio/charset/UTF_16Encoder.java \ gnu/java/nio/charset/UTF_16LE.java \ gnu/java/nio/charset/UTF_8.java \ + gnu/java/security/Engine.java \ + gnu/java/security/OID.java \ + gnu/java/security/der/BitString.java \ + gnu/java/security/der/DER.java \ gnu/java/security/der/DEREncodingException.java \ ! gnu/java/security/der/DERReader.java \ ! gnu/java/security/der/DERValue.java \ ! gnu/java/security/der/DERWriter.java \ gnu/java/security/provider/DefaultPolicy.java \ + gnu/java/security/provider/DSAKeyFactory.java \ gnu/java/security/provider/DSAKeyPairGenerator.java \ gnu/java/security/provider/DSAParameterGenerator.java \ gnu/java/security/provider/DSAParameters.java \ *************** gnu/java/security/provider/GnuDSAPublicK *** 1729,1735 **** --- 2060,2071 ---- gnu/java/security/provider/MD5.java \ gnu/java/security/provider/SHA.java \ gnu/java/security/provider/SHA1PRNG.java \ + gnu/java/security/provider/X509CertificateFactory.java \ gnu/java/security/util/Prime.java \ + gnu/java/security/x509/X500DistinguishedName.java \ + gnu/java/security/x509/X509Certificate.java \ + gnu/java/security/x509/X509CRLEntry.java \ + gnu/java/security/x509/X509CRL.java \ gnu/java/text/BaseBreakIterator.java \ gnu/java/text/CharacterBreakIterator.java \ gnu/java/text/LineBreakIterator.java \ *************** gnu/java/text/SentenceBreakIterator.java *** 1737,1742 **** --- 2073,2083 ---- gnu/java/text/WordBreakIterator.java \ gnu/java/util/DoubleEnumeration.java \ gnu/java/util/EmptyEnumeration.java \ + gnu/java/util/prefs/MemoryBasedFactory.java \ + gnu/java/util/prefs/NodeReader.java \ + gnu/java/util/prefs/MemoryBasedPreferences.java \ + gnu/java/util/prefs/FileBasedFactory.java \ + gnu/java/util/prefs/NodeWriter.java \ java/lang/ref/PhantomReference.java \ java/lang/ref/Reference.java \ java/lang/ref/ReferenceQueue.java \ *************** java/net/NetPermission.java \ *** 1778,1785 **** java/net/NetworkInterface.java \ java/net/NoRouteToHostException.java \ java/net/PasswordAuthentication.java \ - java/net/PlainDatagramSocketImpl.java \ - java/net/PlainSocketImpl.java \ java/net/PortUnreachableException.java \ java/net/ProtocolException.java \ java/net/ServerSocket.java \ --- 2119,2124 ---- *************** java/nio/Buffer.java \ *** 1806,1821 **** --- 2145,2176 ---- java/nio/BufferOverflowException.java \ java/nio/BufferUnderflowException.java \ java/nio/ByteBuffer.java \ + java/nio/ByteBufferHelper.java \ + java/nio/ByteBufferImpl.java \ java/nio/ByteOrder.java \ java/nio/CharBuffer.java \ + java/nio/CharBufferImpl.java \ + java/nio/CharViewBufferImpl.java \ + java/nio/DirectByteBufferImpl.java \ java/nio/DoubleBuffer.java \ + java/nio/DoubleBufferImpl.java \ + java/nio/DoubleViewBufferImpl.java \ java/nio/FloatBuffer.java \ + java/nio/FloatBufferImpl.java \ + java/nio/FloatViewBufferImpl.java \ java/nio/IntBuffer.java \ + java/nio/IntBufferImpl.java \ + java/nio/IntViewBufferImpl.java \ java/nio/InvalidMarkException.java \ java/nio/LongBuffer.java \ + java/nio/LongBufferImpl.java \ + java/nio/LongViewBufferImpl.java \ java/nio/MappedByteBuffer.java \ + java/nio/MappedByteBufferImpl.java \ java/nio/ReadOnlyBufferException.java \ java/nio/ShortBuffer.java \ + java/nio/ShortBufferImpl.java \ + java/nio/ShortViewBufferImpl.java \ java/nio/channels/AlreadyConnectedException.java \ java/nio/channels/AsynchronousCloseException.java \ java/nio/channels/ByteChannel.java \ *************** java/nio/channels/ClosedSelectorExceptio *** 1828,1833 **** --- 2183,2189 ---- java/nio/channels/ConnectionPendingException.java \ java/nio/channels/DatagramChannel.java \ java/nio/channels/FileChannel.java \ + java/nio/channels/FileChannelImpl.java \ java/nio/channels/FileLock.java \ java/nio/channels/FileLockInterruptionException.java \ java/nio/channels/GatheringByteChannel.java \ *************** java/security/acl/NotOwnerException.java *** 1944,1949 **** --- 2300,2306 ---- java/security/acl/Permission.java \ java/security/cert/CRL.java \ java/security/cert/CRLException.java \ + java/security/cert/CRLSelector.java \ java/security/cert/Certificate.java \ java/security/cert/CertificateEncodingException.java \ java/security/cert/CertificateException.java \ *************** java/security/cert/CertificateFactorySpi *** 1953,1961 **** --- 2310,2339 ---- java/security/cert/CertificateNotYetValidException.java \ java/security/cert/CertificateParsingException.java \ java/security/cert/CertPath.java \ + java/security/cert/CertPathBuilder.java \ java/security/cert/CertPathBuilderException.java \ + java/security/cert/CertPathBuilderResult.java \ + java/security/cert/CertPathBuilderSpi.java \ + java/security/cert/CertPathParameters.java \ + java/security/cert/CertPathValidator.java \ java/security/cert/CertPathValidatorException.java \ + java/security/cert/CertPathValidatorResult.java \ + java/security/cert/CertPathValidatorSpi.java \ + java/security/cert/CertSelector.java \ + java/security/cert/CertStore.java \ java/security/cert/CertStoreException.java \ + java/security/cert/CertStoreParameters.java \ + java/security/cert/CertStoreSpi.java \ + java/security/cert/CollectionCertStoreParameters.java \ + java/security/cert/LDAPCertStoreParameters.java \ + java/security/cert/PKIXBuilderParameters.java \ + java/security/cert/PKIXCertPathBuilderResult.java \ + java/security/cert/PKIXCertPathChecker.java \ + java/security/cert/PKIXCertPathValidatorResult.java \ + java/security/cert/PKIXParameters.java \ + java/security/cert/PolicyNode.java \ + java/security/cert/PolicyQualifierInfo.java \ + java/security/cert/TrustAnchor.java \ java/security/cert/X509CRL.java \ java/security/cert/X509CRLEntry.java \ java/security/cert/X509Certificate.java \ *************** java/security/interfaces/DSAParams.java *** 1966,1971 **** --- 2344,2350 ---- java/security/interfaces/DSAPrivateKey.java \ java/security/interfaces/DSAPublicKey.java \ java/security/interfaces/RSAKey.java \ + java/security/interfaces/RSAMultiPrimePrivateCrtKey.java \ java/security/interfaces/RSAPrivateCrtKey.java \ java/security/interfaces/RSAPrivateKey.java \ java/security/interfaces/RSAPublicKey.java \ *************** java/security/spec/InvalidKeySpecExcepti *** 1978,1984 **** --- 2357,2366 ---- java/security/spec/InvalidParameterSpecException.java \ java/security/spec/KeySpec.java \ java/security/spec/PKCS8EncodedKeySpec.java \ + java/security/spec/PSSParameterSpec.java \ java/security/spec/RSAKeyGenParameterSpec.java \ + java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java\ + java/security/spec/RSAOtherPrimeInfo.java \ java/security/spec/RSAPrivateCrtKeySpec.java \ java/security/spec/RSAPrivateKeySpec.java \ java/security/spec/RSAPublicKeySpec.java \ *************** java/text/DecimalFormat.java \ *** 2028,2033 **** --- 2410,2416 ---- java/text/DecimalFormatSymbols.java \ java/text/FieldPosition.java \ java/text/Format.java \ + java/text/FormatCharacterIterator.java \ java/text/MessageFormat.java \ java/text/NumberFormat.java \ java/text/ParseException.java \ *************** c_source_files = \ *** 2084,2089 **** --- 2467,2474 ---- java/lang/k_cos.c java/lang/s_sin.c java/lang/sf_fabs.c + extra_cc_source_files = $(EXTRA_CC_FILES) + #java/awt/natToolkit.cc nat_source_files = \ *************** gnu/gcj/convert/natOutput_EUCJIS.cc \ *** 2098,2104 **** gnu/gcj/convert/natOutput_SJIS.cc \ gnu/gcj/io/natSimpleSHSStream.cc \ gnu/gcj/io/shs.cc \ - gnu/gcj/protocol/core/natCoreInputStream.cc \ gnu/gcj/runtime/natFinalizerThread.cc \ gnu/gcj/runtime/natFirstThread.cc \ gnu/gcj/runtime/natNameFinder.cc \ --- 2483,2488 ---- *************** gnu/gcj/runtime/natSharedLibLoader.cc \ *** 2106,2121 **** gnu/gcj/runtime/natStackTrace.cc \ gnu/gcj/runtime/natStringBuffer.cc \ gnu/gcj/runtime/natVMClassLoader.cc \ ! gnu/java/nio/natByteBufferImpl.cc \ ! gnu/java/nio/natCharBufferImpl.cc \ ! gnu/java/nio/natDoubleBufferImpl.cc \ ! gnu/java/nio/natFileChannelImpl.cc \ ! gnu/java/nio/natFloatBufferImpl.cc \ ! gnu/java/nio/natIntBufferImpl.cc \ ! gnu/java/nio/natLongBufferImpl.cc \ gnu/java/nio/natSelectorImpl.cc \ ! gnu/java/nio/natShortBufferImpl.cc \ ! gnu/java/nio/natSocketChannelImpl.cc \ java/io/natFile.cc \ java/io/natFileDescriptor.cc \ java/io/natObjectInputStream.cc \ --- 2490,2503 ---- gnu/gcj/runtime/natStackTrace.cc \ gnu/gcj/runtime/natStringBuffer.cc \ gnu/gcj/runtime/natVMClassLoader.cc \ ! gnu/java/awt/natEmbeddedWindow.cc \ ! gnu/java/net/natPlainDatagramSocketImpl.cc \ ! gnu/java/net/natPlainSocketImpl.cc \ ! gnu/java/net/protocol/core/natCoreInputStream.cc \ ! gnu/java/nio/natFileLockImpl.cc \ ! gnu/java/nio/natPipeImpl.cc \ gnu/java/nio/natSelectorImpl.cc \ ! gnu/java/nio/natNIOServerSocket.cc \ java/io/natFile.cc \ java/io/natFileDescriptor.cc \ java/io/natObjectInputStream.cc \ *************** java/lang/reflect/natMethod.cc \ *** 2142,2149 **** java/lang/reflect/natProxy.cc \ java/net/natNetworkInterface.cc \ java/net/natInetAddress.cc \ ! java/net/natPlainDatagramSocketImpl.cc \ ! java/net/natPlainSocketImpl.cc \ java/text/natCollator.cc \ java/util/natResourceBundle.cc \ java/util/natTimeZone.cc \ --- 2524,2531 ---- java/lang/reflect/natProxy.cc \ java/net/natNetworkInterface.cc \ java/net/natInetAddress.cc \ ! java/nio/natDirectByteBufferImpl.cc \ ! java/nio/channels/natFileChannelImpl.cc \ java/text/natCollator.cc \ java/util/natResourceBundle.cc \ java/util/natTimeZone.cc \ *************** gnu/awt/xlib/XFontMetrics.java \ *** 2182,2187 **** --- 2564,2570 ---- gnu/awt/xlib/XFramePeer.java \ gnu/awt/xlib/XGraphics.java \ gnu/awt/xlib/XGraphicsConfiguration.java \ + gnu/awt/xlib/XOffScreenImage.java \ gnu/awt/xlib/XPanelPeer.java \ gnu/awt/xlib/XToolkit.java *************** AM_MAKEFLAGS = \ *** 2217,2222 **** --- 2600,2606 ---- "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ "CFLAGS=$(CFLAGS)" \ "CXXFLAGS=$(CXXFLAGS)" \ + "CPPFLAGS=$(CPPFLAGS)" \ "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ "INSTALL=$(INSTALL)" \ *************** MULTIDO = true *** 2263,2269 **** MULTICLEAN = true ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 CONFIG_HEADER = ./include/config.h ./gcj/libgcj-config.h ! CONFIG_CLEAN_FILES = libgcj.spec libgcj-test.spec LTLIBRARIES = $(toolexeclib_LTLIBRARIES) --- 2647,2653 ---- MULTICLEAN = true ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 CONFIG_HEADER = ./include/config.h ./gcj/libgcj-config.h ! CONFIG_CLEAN_FILES = libgcj.pc libgcj.spec libgcj-test.spec LTLIBRARIES = $(toolexeclib_LTLIBRARIES) *************** gnu/gcj/convert/JIS0212_to_Unicode.lo gn *** 2282,2315 **** gnu/gcj/convert/natIconv.lo gnu/gcj/convert/natInput_EUCJIS.lo \ gnu/gcj/convert/natInput_SJIS.lo gnu/gcj/convert/natOutput_EUCJIS.lo \ gnu/gcj/convert/natOutput_SJIS.lo gnu/gcj/io/natSimpleSHSStream.lo \ ! gnu/gcj/io/shs.lo gnu/gcj/protocol/core/natCoreInputStream.lo \ ! gnu/gcj/runtime/natFinalizerThread.lo gnu/gcj/runtime/natFirstThread.lo \ ! gnu/gcj/runtime/natNameFinder.lo gnu/gcj/runtime/natSharedLibLoader.lo \ ! gnu/gcj/runtime/natStackTrace.lo gnu/gcj/runtime/natStringBuffer.lo \ ! gnu/gcj/runtime/natVMClassLoader.lo gnu/java/nio/natByteBufferImpl.lo \ ! gnu/java/nio/natCharBufferImpl.lo gnu/java/nio/natDoubleBufferImpl.lo \ ! gnu/java/nio/natFileChannelImpl.lo gnu/java/nio/natFloatBufferImpl.lo \ ! gnu/java/nio/natIntBufferImpl.lo gnu/java/nio/natLongBufferImpl.lo \ ! gnu/java/nio/natSelectorImpl.lo gnu/java/nio/natShortBufferImpl.lo \ ! gnu/java/nio/natSocketChannelImpl.lo java/io/natFile.lo \ ! java/io/natFileDescriptor.lo java/io/natObjectInputStream.lo \ ! java/io/natVMObjectStreamClass.lo java/lang/natCharacter.lo \ ! java/lang/natClass.lo java/lang/natClassLoader.lo \ ! java/lang/natConcreteProcess.lo java/lang/natDouble.lo \ ! java/lang/natFloat.lo java/lang/natMath.lo java/lang/natObject.lo \ ! java/lang/natRuntime.lo java/lang/natString.lo \ java/lang/natStringBuffer.lo java/lang/natSystem.lo \ java/lang/natThread.lo java/lang/natVMSecurityManager.lo \ java/lang/ref/natReference.lo java/lang/reflect/natArray.lo \ java/lang/reflect/natConstructor.lo java/lang/reflect/natField.lo \ java/lang/reflect/natMethod.lo java/lang/reflect/natProxy.lo \ java/net/natNetworkInterface.lo java/net/natInetAddress.lo \ ! java/net/natPlainDatagramSocketImpl.lo java/net/natPlainSocketImpl.lo \ ! java/text/natCollator.lo java/util/natResourceBundle.lo \ ! java/util/natTimeZone.lo java/util/zip/natDeflater.lo \ ! java/util/zip/natInflater.lo ! lib_org_xml_sax_la_LDFLAGS = ! lib_org_xml_sax_la_LIBADD = lib_org_xml_sax_la_OBJECTS = org/xml/sax/ext/DeclHandler.lo \ org/xml/sax/ext/LexicalHandler.lo \ org/xml/sax/helpers/AttributeListImpl.lo \ --- 2666,2698 ---- gnu/gcj/convert/natIconv.lo gnu/gcj/convert/natInput_EUCJIS.lo \ gnu/gcj/convert/natInput_SJIS.lo gnu/gcj/convert/natOutput_EUCJIS.lo \ gnu/gcj/convert/natOutput_SJIS.lo gnu/gcj/io/natSimpleSHSStream.lo \ ! gnu/gcj/io/shs.lo gnu/gcj/runtime/natFinalizerThread.lo \ ! gnu/gcj/runtime/natFirstThread.lo gnu/gcj/runtime/natNameFinder.lo \ ! gnu/gcj/runtime/natSharedLibLoader.lo gnu/gcj/runtime/natStackTrace.lo \ ! gnu/gcj/runtime/natStringBuffer.lo gnu/gcj/runtime/natVMClassLoader.lo \ ! gnu/java/awt/natEmbeddedWindow.lo \ ! gnu/java/net/natPlainDatagramSocketImpl.lo \ ! gnu/java/net/natPlainSocketImpl.lo \ ! gnu/java/net/protocol/core/natCoreInputStream.lo \ ! gnu/java/nio/natFileLockImpl.lo gnu/java/nio/natPipeImpl.lo \ ! gnu/java/nio/natSelectorImpl.lo gnu/java/nio/natNIOServerSocket.lo \ ! java/io/natFile.lo java/io/natFileDescriptor.lo \ ! java/io/natObjectInputStream.lo java/io/natVMObjectStreamClass.lo \ ! java/lang/natCharacter.lo java/lang/natClass.lo \ ! java/lang/natClassLoader.lo java/lang/natConcreteProcess.lo \ ! java/lang/natDouble.lo java/lang/natFloat.lo java/lang/natMath.lo \ ! java/lang/natObject.lo java/lang/natRuntime.lo java/lang/natString.lo \ java/lang/natStringBuffer.lo java/lang/natSystem.lo \ java/lang/natThread.lo java/lang/natVMSecurityManager.lo \ java/lang/ref/natReference.lo java/lang/reflect/natArray.lo \ java/lang/reflect/natConstructor.lo java/lang/reflect/natField.lo \ java/lang/reflect/natMethod.lo java/lang/reflect/natProxy.lo \ java/net/natNetworkInterface.lo java/net/natInetAddress.lo \ ! java/nio/natDirectByteBufferImpl.lo \ ! java/nio/channels/natFileChannelImpl.lo java/text/natCollator.lo \ ! java/util/natResourceBundle.lo java/util/natTimeZone.lo \ ! java/util/zip/natDeflater.lo java/util/zip/natInflater.lo ! lib_org_xml_sax_la_DEPENDENCIES = libgcj.la lib_org_xml_sax_la_OBJECTS = org/xml/sax/ext/DeclHandler.lo \ org/xml/sax/ext/LexicalHandler.lo \ org/xml/sax/helpers/AttributeListImpl.lo \ *************** org/xml/sax/SAXException.lo org/xml/sax/ *** 2331,2338 **** org/xml/sax/SAXNotSupportedException.lo \ org/xml/sax/SAXParseException.lo org/xml/sax/XMLFilter.lo \ org/xml/sax/XMLReader.lo ! lib_org_w3c_dom_la_LDFLAGS = ! lib_org_w3c_dom_la_LIBADD = lib_org_w3c_dom_la_OBJECTS = org/w3c/dom/Attr.lo \ org/w3c/dom/CDATASection.lo org/w3c/dom/CharacterData.lo \ org/w3c/dom/Comment.lo org/w3c/dom/DOMException.lo \ --- 2714,2720 ---- org/xml/sax/SAXNotSupportedException.lo \ org/xml/sax/SAXParseException.lo org/xml/sax/XMLFilter.lo \ org/xml/sax/XMLReader.lo ! lib_org_w3c_dom_la_DEPENDENCIES = libgcj.la lib_org_w3c_dom_la_OBJECTS = org/w3c/dom/Attr.lo \ org/w3c/dom/CDATASection.lo org/w3c/dom/CharacterData.lo \ org/w3c/dom/Comment.lo org/w3c/dom/DOMException.lo \ *************** org/w3c/dom/traversal/DocumentTraversal. *** 2348,2353 **** --- 2730,2892 ---- org/w3c/dom/traversal/NodeFilter.lo \ org/w3c/dom/traversal/NodeIterator.lo \ org/w3c/dom/traversal/TreeWalker.lo + lib_gnu_java_awt_peer_gtk_la_DEPENDENCIES = + @GTK_CAIRO_FALSE@lib_gnu_java_awt_peer_gtk_la_OBJECTS = \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GdkClasspathFontPeer.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GdkClasspathFontPeerMetrics.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GdkFontMetrics.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GdkGlyphVector.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GdkGraphics.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GdkGraphics2D.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GdkPixbufDecoder.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkArg.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkArgList.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkButtonPeer.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkCanvasPeer.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkCheckboxGroupPeer.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkCheckboxPeer.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkChoicePeer.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkClipboard.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkComponentPeer.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkContainerPeer.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkDialogPeer.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkEmbeddedWindowPeer.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkFileDialogPeer.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkFontPeer.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkFramePeer.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkGenericPeer.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkImage.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkImagePainter.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkLabelPeer.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkListPeer.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkMainThread.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkMenuBarPeer.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkMenuComponentPeer.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkMenuItemPeer.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkMenuPeer.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkOffScreenImage.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkPanelPeer.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkPopupMenuPeer.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkScrollPanePeer.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkScrollbarPeer.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkTextAreaPeer.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkTextComponentPeer.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkTextFieldPeer.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkToolkit.lo \ + @GTK_CAIRO_FALSE@gnu/java/awt/peer/gtk/GtkWindowPeer.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontMetrics.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCanvasPeer.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImagePainter.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuBarPeer.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPanelPeer.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.lo \ + @GTK_CAIRO_FALSE@jni/gtk-peer/gthread-jni.lo jni/classpath/jcl.lo \ + @GTK_CAIRO_FALSE@jni/classpath/jnilink.lo jni/classpath/native_state.lo \ + @GTK_CAIRO_FALSE@jni/classpath/primlib.lo + @GTK_CAIRO_TRUE@lib_gnu_java_awt_peer_gtk_la_OBJECTS = \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GdkClasspathFontPeer.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GdkClasspathFontPeerMetrics.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GdkFontMetrics.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GdkGlyphVector.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GdkGraphics.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GdkGraphics2D.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GdkPixbufDecoder.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkArg.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkArgList.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkButtonPeer.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkCanvasPeer.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkCheckboxGroupPeer.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkCheckboxPeer.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkChoicePeer.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkClipboard.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkComponentPeer.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkContainerPeer.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkDialogPeer.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkEmbeddedWindowPeer.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkFileDialogPeer.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkFontPeer.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkFramePeer.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkGenericPeer.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkImage.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkImagePainter.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkLabelPeer.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkListPeer.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkMainThread.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkMenuBarPeer.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkMenuComponentPeer.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkMenuItemPeer.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkMenuPeer.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkOffScreenImage.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkPanelPeer.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkPopupMenuPeer.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkScrollPanePeer.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkScrollbarPeer.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkTextAreaPeer.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkTextComponentPeer.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkTextFieldPeer.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkToolkit.lo \ + @GTK_CAIRO_TRUE@gnu/java/awt/peer/gtk/GtkWindowPeer.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeer.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeerMetrics.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGlyphVector.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontMetrics.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCanvasPeer.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImagePainter.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuBarPeer.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPanelPeer.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.lo \ + @GTK_CAIRO_TRUE@jni/gtk-peer/gthread-jni.lo jni/classpath/jcl.lo \ + @GTK_CAIRO_TRUE@jni/classpath/jnilink.lo jni/classpath/native_state.lo \ + @GTK_CAIRO_TRUE@jni/classpath/primlib.lo lib_gnu_awt_xlib_la_OBJECTS = gnu/gcj/xlib/natClip.lo \ gnu/gcj/xlib/natColormap.lo gnu/gcj/xlib/natDisplay.lo \ gnu/gcj/xlib/natDrawable.lo gnu/gcj/xlib/natFont.lo \ *************** COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM *** 2382,2392 **** LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ ! DATA = $(jar_DATA) $(toolexecmainlib_DATA) DIST_COMMON = README COPYING ChangeLog Makefile.am Makefile.in NEWS \ THANKS acinclude.m4 aclocal.m4 configure configure.in \ ! libgcj-test.spec.in libgcj.spec.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) --- 2921,2931 ---- LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ ! DATA = $(jar_DATA) $(pkgconfig_DATA) $(toolexecmainlib_DATA) DIST_COMMON = README COPYING ChangeLog Makefile.am Makefile.in NEWS \ THANKS acinclude.m4 aclocal.m4 configure configure.in \ ! libgcj-test.spec.in libgcj.pc.in libgcj.spec.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 2407,2416 **** .deps/gnu/awt/xlib/XFontMetrics.P .deps/gnu/awt/xlib/XFramePeer.P \ .deps/gnu/awt/xlib/XGraphics.P \ .deps/gnu/awt/xlib/XGraphicsConfiguration.P \ ! .deps/gnu/awt/xlib/XPanelPeer.P .deps/gnu/awt/xlib/XToolkit.P \ ! .deps/gnu/classpath/Configuration.P .deps/gnu/gcj/Core.P \ ! .deps/gnu/gcj/RawData.P .deps/gnu/gcj/convert/BytesToUnicode.P \ ! .deps/gnu/gcj/convert/Convert.P .deps/gnu/gcj/convert/IOConverter.P \ .deps/gnu/gcj/convert/Input_8859_1.P \ .deps/gnu/gcj/convert/Input_ASCII.P \ .deps/gnu/gcj/convert/Input_EUCJIS.P \ --- 2946,2956 ---- .deps/gnu/awt/xlib/XFontMetrics.P .deps/gnu/awt/xlib/XFramePeer.P \ .deps/gnu/awt/xlib/XGraphics.P \ .deps/gnu/awt/xlib/XGraphicsConfiguration.P \ ! .deps/gnu/awt/xlib/XOffScreenImage.P .deps/gnu/awt/xlib/XPanelPeer.P \ ! .deps/gnu/awt/xlib/XToolkit.P .deps/gnu/classpath/Configuration.P \ ! .deps/gnu/gcj/Core.P .deps/gnu/gcj/RawData.P \ ! .deps/gnu/gcj/convert/BytesToUnicode.P .deps/gnu/gcj/convert/Convert.P \ ! .deps/gnu/gcj/convert/IOConverter.P \ .deps/gnu/gcj/convert/Input_8859_1.P \ .deps/gnu/gcj/convert/Input_ASCII.P \ .deps/gnu/gcj/convert/Input_EUCJIS.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 2434,2453 **** .deps/gnu/gcj/io/DefaultMimeTypes.P .deps/gnu/gcj/io/MimeTypes.P \ .deps/gnu/gcj/io/SimpleSHSStream.P \ .deps/gnu/gcj/io/natSimpleSHSStream.P .deps/gnu/gcj/io/shs.P \ ! .deps/gnu/gcj/natCore.P .deps/gnu/gcj/protocol/core/Connection.P \ ! .deps/gnu/gcj/protocol/core/CoreInputStream.P \ ! .deps/gnu/gcj/protocol/core/Handler.P \ ! .deps/gnu/gcj/protocol/core/natCoreInputStream.P \ ! .deps/gnu/gcj/protocol/file/Connection.P \ ! .deps/gnu/gcj/protocol/file/Handler.P \ ! .deps/gnu/gcj/protocol/http/Connection.P \ ! .deps/gnu/gcj/protocol/http/Handler.P \ ! .deps/gnu/gcj/protocol/jar/Connection.P \ ! .deps/gnu/gcj/protocol/jar/Handler.P \ ! .deps/gnu/gcj/runtime/FileDeleter.P \ .deps/gnu/gcj/runtime/FinalizerThread.P \ .deps/gnu/gcj/runtime/FirstThread.P .deps/gnu/gcj/runtime/JNIWeakRef.P \ .deps/gnu/gcj/runtime/MethodRef.P .deps/gnu/gcj/runtime/NameFinder.P \ .deps/gnu/gcj/runtime/SharedLibLoader.P \ .deps/gnu/gcj/runtime/StackTrace.P .deps/gnu/gcj/runtime/StringBuffer.P \ .deps/gnu/gcj/runtime/VMClassLoader.P \ --- 2974,2984 ---- .deps/gnu/gcj/io/DefaultMimeTypes.P .deps/gnu/gcj/io/MimeTypes.P \ .deps/gnu/gcj/io/SimpleSHSStream.P \ .deps/gnu/gcj/io/natSimpleSHSStream.P .deps/gnu/gcj/io/shs.P \ ! .deps/gnu/gcj/natCore.P .deps/gnu/gcj/runtime/FileDeleter.P \ .deps/gnu/gcj/runtime/FinalizerThread.P \ .deps/gnu/gcj/runtime/FirstThread.P .deps/gnu/gcj/runtime/JNIWeakRef.P \ .deps/gnu/gcj/runtime/MethodRef.P .deps/gnu/gcj/runtime/NameFinder.P \ + .deps/gnu/gcj/runtime/SharedLibHelper.P \ .deps/gnu/gcj/runtime/SharedLibLoader.P \ .deps/gnu/gcj/runtime/StackTrace.P .deps/gnu/gcj/runtime/StringBuffer.P \ .deps/gnu/gcj/runtime/VMClassLoader.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 2480,2491 **** .deps/gnu/gcj/xlib/natXColor.P .deps/gnu/gcj/xlib/natXConfigureEvent.P \ .deps/gnu/gcj/xlib/natXException.P .deps/gnu/gcj/xlib/natXExposeEvent.P \ .deps/gnu/gcj/xlib/natXImage.P .deps/gnu/gcj/xlib/natXUnmapEvent.P \ ! .deps/gnu/java/awt/BitMaskExtent.P .deps/gnu/java/awt/Buffers.P \ .deps/gnu/java/awt/ComponentDataBlitOp.P \ .deps/gnu/java/awt/EventModifier.P \ - .deps/gnu/java/awt/GLightweightPeer.P \ .deps/gnu/java/awt/image/ImageDecoder.P \ .deps/gnu/java/awt/image/XBMDecoder.P \ .deps/gnu/java/beans/BeanInfoEmbryo.P \ .deps/gnu/java/beans/EmptyBeanInfo.P \ .deps/gnu/java/beans/ExplicitBeanInfo.P \ --- 3011,3072 ---- .deps/gnu/gcj/xlib/natXColor.P .deps/gnu/gcj/xlib/natXConfigureEvent.P \ .deps/gnu/gcj/xlib/natXException.P .deps/gnu/gcj/xlib/natXExposeEvent.P \ .deps/gnu/gcj/xlib/natXImage.P .deps/gnu/gcj/xlib/natXUnmapEvent.P \ ! .deps/gnu/java/awt/BitMaskExtent.P \ ! .deps/gnu/java/awt/BitwiseXORComposite.P .deps/gnu/java/awt/Buffers.P \ ! .deps/gnu/java/awt/ClasspathToolkit.P \ .deps/gnu/java/awt/ComponentDataBlitOp.P \ + .deps/gnu/java/awt/EmbeddedWindow.P \ + .deps/gnu/java/awt/EmbeddedWindowSupport.P \ .deps/gnu/java/awt/EventModifier.P \ .deps/gnu/java/awt/image/ImageDecoder.P \ .deps/gnu/java/awt/image/XBMDecoder.P \ + .deps/gnu/java/awt/natEmbeddedWindow.P \ + .deps/gnu/java/awt/peer/ClasspathFontPeer.P \ + .deps/gnu/java/awt/peer/EmbeddedWindowPeer.P \ + .deps/gnu/java/awt/peer/GLightweightPeer.P \ + .deps/gnu/java/awt/peer/gtk/GdkClasspathFontPeer.P \ + .deps/gnu/java/awt/peer/gtk/GdkClasspathFontPeerMetrics.P \ + .deps/gnu/java/awt/peer/gtk/GdkFontMetrics.P \ + .deps/gnu/java/awt/peer/gtk/GdkGlyphVector.P \ + .deps/gnu/java/awt/peer/gtk/GdkGraphics.P \ + .deps/gnu/java/awt/peer/gtk/GdkGraphics2D.P \ + .deps/gnu/java/awt/peer/gtk/GdkPixbufDecoder.P \ + .deps/gnu/java/awt/peer/gtk/GtkArg.P \ + .deps/gnu/java/awt/peer/gtk/GtkArgList.P \ + .deps/gnu/java/awt/peer/gtk/GtkButtonPeer.P \ + .deps/gnu/java/awt/peer/gtk/GtkCanvasPeer.P \ + .deps/gnu/java/awt/peer/gtk/GtkCheckboxGroupPeer.P \ + .deps/gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.P \ + .deps/gnu/java/awt/peer/gtk/GtkCheckboxPeer.P \ + .deps/gnu/java/awt/peer/gtk/GtkChoicePeer.P \ + .deps/gnu/java/awt/peer/gtk/GtkClipboard.P \ + .deps/gnu/java/awt/peer/gtk/GtkComponentPeer.P \ + .deps/gnu/java/awt/peer/gtk/GtkContainerPeer.P \ + .deps/gnu/java/awt/peer/gtk/GtkDialogPeer.P \ + .deps/gnu/java/awt/peer/gtk/GtkEmbeddedWindowPeer.P \ + .deps/gnu/java/awt/peer/gtk/GtkFileDialogPeer.P \ + .deps/gnu/java/awt/peer/gtk/GtkFontPeer.P \ + .deps/gnu/java/awt/peer/gtk/GtkFramePeer.P \ + .deps/gnu/java/awt/peer/gtk/GtkGenericPeer.P \ + .deps/gnu/java/awt/peer/gtk/GtkImage.P \ + .deps/gnu/java/awt/peer/gtk/GtkImagePainter.P \ + .deps/gnu/java/awt/peer/gtk/GtkLabelPeer.P \ + .deps/gnu/java/awt/peer/gtk/GtkListPeer.P \ + .deps/gnu/java/awt/peer/gtk/GtkMainThread.P \ + .deps/gnu/java/awt/peer/gtk/GtkMenuBarPeer.P \ + .deps/gnu/java/awt/peer/gtk/GtkMenuComponentPeer.P \ + .deps/gnu/java/awt/peer/gtk/GtkMenuItemPeer.P \ + .deps/gnu/java/awt/peer/gtk/GtkMenuPeer.P \ + .deps/gnu/java/awt/peer/gtk/GtkOffScreenImage.P \ + .deps/gnu/java/awt/peer/gtk/GtkPanelPeer.P \ + .deps/gnu/java/awt/peer/gtk/GtkPopupMenuPeer.P \ + .deps/gnu/java/awt/peer/gtk/GtkScrollPanePeer.P \ + .deps/gnu/java/awt/peer/gtk/GtkScrollbarPeer.P \ + .deps/gnu/java/awt/peer/gtk/GtkTextAreaPeer.P \ + .deps/gnu/java/awt/peer/gtk/GtkTextComponentPeer.P \ + .deps/gnu/java/awt/peer/gtk/GtkTextFieldPeer.P \ + .deps/gnu/java/awt/peer/gtk/GtkToolkit.P \ + .deps/gnu/java/awt/peer/gtk/GtkWindowPeer.P \ .deps/gnu/java/beans/BeanInfoEmbryo.P \ .deps/gnu/java/beans/EmptyBeanInfo.P \ .deps/gnu/java/beans/ExplicitBeanInfo.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 2501,2506 **** --- 3082,3089 ---- .deps/gnu/java/beans/editors/NativeShortEditor.P \ .deps/gnu/java/beans/editors/StringEditor.P \ .deps/gnu/java/beans/info/ComponentBeanInfo.P \ + .deps/gnu/java/io/ASN1ParsingException.P \ + .deps/gnu/java/io/Base64InputStream.P \ .deps/gnu/java/io/ClassLoaderObjectInputStream.P \ .deps/gnu/java/io/NullOutputStream.P \ .deps/gnu/java/io/ObjectIdentityWrapper.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 2644,2661 **** .deps/gnu/java/locale/LocaleInformation_zh_HK.P \ .deps/gnu/java/locale/LocaleInformation_zh_SG.P \ .deps/gnu/java/locale/LocaleInformation_zh_TW.P \ ! .deps/gnu/java/math/MPN.P .deps/gnu/java/nio/ByteBufferImpl.P \ ! .deps/gnu/java/nio/CharBufferImpl.P \ .deps/gnu/java/nio/DatagramChannelImpl.P \ ! .deps/gnu/java/nio/DoubleBufferImpl.P \ ! .deps/gnu/java/nio/FileChannelImpl.P \ ! .deps/gnu/java/nio/FloatBufferImpl.P .deps/gnu/java/nio/IntBufferImpl.P \ ! .deps/gnu/java/nio/LongBufferImpl.P .deps/gnu/java/nio/PipeImpl.P \ .deps/gnu/java/nio/SelectionKeyImpl.P .deps/gnu/java/nio/SelectorImpl.P \ .deps/gnu/java/nio/SelectorProviderImpl.P \ .deps/gnu/java/nio/ServerSocketChannelImpl.P \ ! .deps/gnu/java/nio/ShortBufferImpl.P \ .deps/gnu/java/nio/SocketChannelImpl.P \ .deps/gnu/java/nio/charset/ISO_8859_1.P \ .deps/gnu/java/nio/charset/Provider.P \ .deps/gnu/java/nio/charset/US_ASCII.P \ --- 3227,3265 ---- .deps/gnu/java/locale/LocaleInformation_zh_HK.P \ .deps/gnu/java/locale/LocaleInformation_zh_SG.P \ .deps/gnu/java/locale/LocaleInformation_zh_TW.P \ ! .deps/gnu/java/math/MPN.P .deps/gnu/java/net/HeaderFieldHelper.P \ ! .deps/gnu/java/net/PlainDatagramSocketImpl.P \ ! .deps/gnu/java/net/PlainSocketImpl.P .deps/gnu/java/net/URLParseError.P \ ! .deps/gnu/java/net/natPlainDatagramSocketImpl.P \ ! .deps/gnu/java/net/natPlainSocketImpl.P \ ! .deps/gnu/java/net/protocol/core/Connection.P \ ! .deps/gnu/java/net/protocol/core/CoreInputStream.P \ ! .deps/gnu/java/net/protocol/core/Handler.P \ ! .deps/gnu/java/net/protocol/core/natCoreInputStream.P \ ! .deps/gnu/java/net/protocol/file/Connection.P \ ! .deps/gnu/java/net/protocol/file/Handler.P \ ! .deps/gnu/java/net/protocol/gcjlib/Connection.P \ ! .deps/gnu/java/net/protocol/gcjlib/Handler.P \ ! .deps/gnu/java/net/protocol/http/Connection.P \ ! .deps/gnu/java/net/protocol/http/Handler.P \ ! .deps/gnu/java/net/protocol/jar/Connection.P \ ! .deps/gnu/java/net/protocol/jar/Handler.P \ ! .deps/gnu/java/nio/ChannelInputStream.P \ ! .deps/gnu/java/nio/ChannelOutputStream.P \ .deps/gnu/java/nio/DatagramChannelImpl.P \ ! .deps/gnu/java/nio/DatagramChannelSelectionKey.P \ ! .deps/gnu/java/nio/FileLockImpl.P \ ! .deps/gnu/java/nio/InputStreamChannel.P \ ! .deps/gnu/java/nio/NIOConstants.P \ ! .deps/gnu/java/nio/NIODatagramSocket.P \ ! .deps/gnu/java/nio/NIOServerSocket.P .deps/gnu/java/nio/NIOSocket.P \ ! .deps/gnu/java/nio/OutputStreamChannel.P .deps/gnu/java/nio/PipeImpl.P \ .deps/gnu/java/nio/SelectionKeyImpl.P .deps/gnu/java/nio/SelectorImpl.P \ .deps/gnu/java/nio/SelectorProviderImpl.P \ .deps/gnu/java/nio/ServerSocketChannelImpl.P \ ! .deps/gnu/java/nio/ServerSocketChannelSelectionKey.P \ .deps/gnu/java/nio/SocketChannelImpl.P \ + .deps/gnu/java/nio/SocketChannelSelectionKey.P \ .deps/gnu/java/nio/charset/ISO_8859_1.P \ .deps/gnu/java/nio/charset/Provider.P \ .deps/gnu/java/nio/charset/US_ASCII.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 2664,2680 **** .deps/gnu/java/nio/charset/UTF_16Decoder.P \ .deps/gnu/java/nio/charset/UTF_16Encoder.P \ .deps/gnu/java/nio/charset/UTF_16LE.P \ ! .deps/gnu/java/nio/charset/UTF_8.P \ ! .deps/gnu/java/nio/natByteBufferImpl.P \ ! .deps/gnu/java/nio/natCharBufferImpl.P \ ! .deps/gnu/java/nio/natDoubleBufferImpl.P \ ! .deps/gnu/java/nio/natFileChannelImpl.P \ ! .deps/gnu/java/nio/natFloatBufferImpl.P \ ! .deps/gnu/java/nio/natIntBufferImpl.P \ ! .deps/gnu/java/nio/natLongBufferImpl.P \ ! .deps/gnu/java/nio/natSelectorImpl.P \ ! .deps/gnu/java/nio/natShortBufferImpl.P \ ! .deps/gnu/java/nio/natSocketChannelImpl.P \ .deps/gnu/java/rmi/RMIMarshalledObjectInputStream.P \ .deps/gnu/java/rmi/RMIMarshalledObjectOutputStream.P \ .deps/gnu/java/rmi/dgc/DGCImpl.P .deps/gnu/java/rmi/dgc/DGCImpl_Skel.P \ --- 3268,3276 ---- .deps/gnu/java/nio/charset/UTF_16Decoder.P \ .deps/gnu/java/nio/charset/UTF_16Encoder.P \ .deps/gnu/java/nio/charset/UTF_16LE.P \ ! .deps/gnu/java/nio/charset/UTF_8.P .deps/gnu/java/nio/natFileLockImpl.P \ ! .deps/gnu/java/nio/natNIOServerSocket.P \ ! .deps/gnu/java/nio/natPipeImpl.P .deps/gnu/java/nio/natSelectorImpl.P \ .deps/gnu/java/rmi/RMIMarshalledObjectInputStream.P \ .deps/gnu/java/rmi/RMIMarshalledObjectOutputStream.P \ .deps/gnu/java/rmi/dgc/DGCImpl.P .deps/gnu/java/rmi/dgc/DGCImpl_Skel.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 2683,2697 **** .deps/gnu/java/rmi/registry/RegistryImpl_Skel.P \ .deps/gnu/java/rmi/registry/RegistryImpl_Stub.P \ .deps/gnu/java/rmi/rmic/Compile_gcj.P \ .deps/gnu/java/rmi/rmic/Compiler.P \ .deps/gnu/java/rmi/rmic/CompilerProcess.P \ ! .deps/gnu/java/rmi/rmic/RMIC.P .deps/gnu/java/rmi/rmic/TabbedWriter.P \ .deps/gnu/java/rmi/server/ConnectionRunnerPool.P \ .deps/gnu/java/rmi/server/ProtocolConstants.P \ .deps/gnu/java/rmi/server/RMIDefaultSocketFactory.P \ .deps/gnu/java/rmi/server/RMIHashes.P \ .deps/gnu/java/rmi/server/RMIObjectInputStream.P \ .deps/gnu/java/rmi/server/RMIObjectOutputStream.P \ .deps/gnu/java/rmi/server/UnicastConnection.P \ .deps/gnu/java/rmi/server/UnicastConnectionManager.P \ .deps/gnu/java/rmi/server/UnicastRef.P \ --- 3279,3297 ---- .deps/gnu/java/rmi/registry/RegistryImpl_Skel.P \ .deps/gnu/java/rmi/registry/RegistryImpl_Stub.P \ .deps/gnu/java/rmi/rmic/Compile_gcj.P \ + .deps/gnu/java/rmi/rmic/Compile_jikes.P \ + .deps/gnu/java/rmi/rmic/Compile_kjc.P \ .deps/gnu/java/rmi/rmic/Compiler.P \ .deps/gnu/java/rmi/rmic/CompilerProcess.P \ ! .deps/gnu/java/rmi/rmic/RMIC.P .deps/gnu/java/rmi/rmic/RMICException.P \ ! .deps/gnu/java/rmi/rmic/TabbedWriter.P \ .deps/gnu/java/rmi/server/ConnectionRunnerPool.P \ .deps/gnu/java/rmi/server/ProtocolConstants.P \ .deps/gnu/java/rmi/server/RMIDefaultSocketFactory.P \ .deps/gnu/java/rmi/server/RMIHashes.P \ .deps/gnu/java/rmi/server/RMIObjectInputStream.P \ .deps/gnu/java/rmi/server/RMIObjectOutputStream.P \ + .deps/gnu/java/rmi/server/RMIVoidValue.P \ .deps/gnu/java/rmi/server/UnicastConnection.P \ .deps/gnu/java/rmi/server/UnicastConnectionManager.P \ .deps/gnu/java/rmi/server/UnicastRef.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 2699,2707 **** .deps/gnu/java/rmi/server/UnicastRemoteStub.P \ .deps/gnu/java/rmi/server/UnicastServer.P \ .deps/gnu/java/rmi/server/UnicastServerRef.P \ .deps/gnu/java/security/der/DEREncodingException.P \ ! .deps/gnu/java/security/provider/DERReader.P \ ! .deps/gnu/java/security/provider/DERWriter.P \ .deps/gnu/java/security/provider/DSAKeyPairGenerator.P \ .deps/gnu/java/security/provider/DSAParameterGenerator.P \ .deps/gnu/java/security/provider/DSAParameters.P \ --- 3299,3312 ---- .deps/gnu/java/rmi/server/UnicastRemoteStub.P \ .deps/gnu/java/rmi/server/UnicastServer.P \ .deps/gnu/java/rmi/server/UnicastServerRef.P \ + .deps/gnu/java/security/Engine.P .deps/gnu/java/security/OID.P \ + .deps/gnu/java/security/der/BitString.P \ + .deps/gnu/java/security/der/DER.P \ .deps/gnu/java/security/der/DEREncodingException.P \ ! .deps/gnu/java/security/der/DERReader.P \ ! .deps/gnu/java/security/der/DERValue.P \ ! .deps/gnu/java/security/der/DERWriter.P \ ! .deps/gnu/java/security/provider/DSAKeyFactory.P \ .deps/gnu/java/security/provider/DSAKeyPairGenerator.P \ .deps/gnu/java/security/provider/DSAParameterGenerator.P \ .deps/gnu/java/security/provider/DSAParameters.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 2713,2726 **** .deps/gnu/java/security/provider/MD5.P \ .deps/gnu/java/security/provider/SHA.P \ .deps/gnu/java/security/provider/SHA1PRNG.P \ .deps/gnu/java/security/util/Prime.P \ .deps/gnu/java/text/BaseBreakIterator.P \ .deps/gnu/java/text/CharacterBreakIterator.P \ .deps/gnu/java/text/LineBreakIterator.P \ .deps/gnu/java/text/SentenceBreakIterator.P \ .deps/gnu/java/text/WordBreakIterator.P \ .deps/gnu/java/util/DoubleEnumeration.P \ ! .deps/gnu/java/util/EmptyEnumeration.P .deps/interpret.P \ .deps/java/applet/Applet.P .deps/java/applet/AppletContext.P \ .deps/java/applet/AppletStub.P .deps/java/applet/AudioClip.P \ .deps/java/awt/AWTError.P .deps/java/awt/AWTEvent.P \ --- 3318,3348 ---- .deps/gnu/java/security/provider/MD5.P \ .deps/gnu/java/security/provider/SHA.P \ .deps/gnu/java/security/provider/SHA1PRNG.P \ + .deps/gnu/java/security/provider/X509CertificateFactory.P \ .deps/gnu/java/security/util/Prime.P \ + .deps/gnu/java/security/x509/X500DistinguishedName.P \ + .deps/gnu/java/security/x509/X509CRL.P \ + .deps/gnu/java/security/x509/X509CRLEntry.P \ + .deps/gnu/java/security/x509/X509Certificate.P \ .deps/gnu/java/text/BaseBreakIterator.P \ .deps/gnu/java/text/CharacterBreakIterator.P \ .deps/gnu/java/text/LineBreakIterator.P \ .deps/gnu/java/text/SentenceBreakIterator.P \ .deps/gnu/java/text/WordBreakIterator.P \ .deps/gnu/java/util/DoubleEnumeration.P \ ! .deps/gnu/java/util/EmptyEnumeration.P \ ! .deps/gnu/java/util/prefs/FileBasedFactory.P \ ! .deps/gnu/java/util/prefs/MemoryBasedFactory.P \ ! .deps/gnu/java/util/prefs/MemoryBasedPreferences.P \ ! .deps/gnu/java/util/prefs/NodeReader.P \ ! .deps/gnu/java/util/prefs/NodeWriter.P \ ! .deps/gnu/javax/rmi/CORBA/DelegateFactory.P \ ! .deps/gnu/javax/rmi/CORBA/GetDelegateInstanceException.P \ ! .deps/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.P \ ! .deps/gnu/javax/rmi/CORBA/StubDelegateImpl.P \ ! .deps/gnu/javax/rmi/CORBA/UtilDelegateImpl.P \ ! .deps/gnu/javax/rmi/CORBA/ValueHandlerImpl.P \ ! .deps/gnu/javax/rmi/PortableServer.P .deps/interpret.P \ .deps/java/applet/Applet.P .deps/java/applet/AppletContext.P \ .deps/java/applet/AppletStub.P .deps/java/applet/AudioClip.P \ .deps/java/awt/AWTError.P .deps/java/awt/AWTEvent.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 2751,2757 **** .deps/java/awt/GraphicsConfiguration.P .deps/java/awt/GraphicsDevice.P \ .deps/java/awt/GraphicsEnvironment.P \ .deps/java/awt/GridBagConstraints.P .deps/java/awt/GridBagLayout.P \ ! .deps/java/awt/GridLayout.P .deps/java/awt/HeadlessException.P \ .deps/java/awt/IllegalComponentStateException.P .deps/java/awt/Image.P \ .deps/java/awt/ImageCapabilities.P .deps/java/awt/Insets.P \ .deps/java/awt/ItemSelectable.P .deps/java/awt/JobAttributes.P \ --- 3373,3380 ---- .deps/java/awt/GraphicsConfiguration.P .deps/java/awt/GraphicsDevice.P \ .deps/java/awt/GraphicsEnvironment.P \ .deps/java/awt/GridBagConstraints.P .deps/java/awt/GridBagLayout.P \ ! .deps/java/awt/GridBagLayoutInfo.P .deps/java/awt/GridLayout.P \ ! .deps/java/awt/HeadlessException.P \ .deps/java/awt/IllegalComponentStateException.P .deps/java/awt/Image.P \ .deps/java/awt/ImageCapabilities.P .deps/java/awt/Insets.P \ .deps/java/awt/ItemSelectable.P .deps/java/awt/JobAttributes.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 2792,2797 **** --- 3415,3421 ---- .deps/java/awt/datatransfer/Transferable.P \ .deps/java/awt/datatransfer/UnsupportedFlavorException.P \ .deps/java/awt/dnd/Autoscroll.P .deps/java/awt/dnd/DnDConstants.P \ + .deps/java/awt/dnd/DnDEventMulticaster.P \ .deps/java/awt/dnd/DragGestureEvent.P \ .deps/java/awt/dnd/DragGestureListener.P \ .deps/java/awt/dnd/DragGestureRecognizer.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 2812,2817 **** --- 3436,3442 ---- .deps/java/awt/dnd/MouseDragGestureRecognizer.P \ .deps/java/awt/dnd/peer/DragSourceContextPeer.P \ .deps/java/awt/dnd/peer/DropTargetContextPeer.P \ + .deps/java/awt/dnd/peer/DropTargetPeer.P \ .deps/java/awt/event/AWTEventListener.P \ .deps/java/awt/event/AWTEventListenerProxy.P \ .deps/java/awt/event/ActionEvent.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 2848,2857 **** .deps/java/awt/event/WindowFocusListener.P \ .deps/java/awt/event/WindowListener.P \ .deps/java/awt/event/WindowStateListener.P \ ! .deps/java/awt/font/TextHitInfo.P .deps/java/awt/geom/AffineTransform.P \ ! .deps/java/awt/geom/Arc2D.P .deps/java/awt/geom/Area.P \ ! .deps/java/awt/geom/CubicCurve2D.P .deps/java/awt/geom/Dimension2D.P \ ! .deps/java/awt/geom/Ellipse2D.P \ .deps/java/awt/geom/FlatteningPathIterator.P \ .deps/java/awt/geom/GeneralPath.P \ .deps/java/awt/geom/IllegalPathStateException.P \ --- 3473,3493 ---- .deps/java/awt/event/WindowFocusListener.P \ .deps/java/awt/event/WindowListener.P \ .deps/java/awt/event/WindowStateListener.P \ ! .deps/java/awt/font/FontRenderContext.P \ ! .deps/java/awt/font/GlyphJustificationInfo.P \ ! .deps/java/awt/font/GlyphMetrics.P .deps/java/awt/font/GlyphVector.P \ ! .deps/java/awt/font/GraphicAttribute.P \ ! .deps/java/awt/font/ImageGraphicAttribute.P \ ! .deps/java/awt/font/LineBreakMeasurer.P \ ! .deps/java/awt/font/LineMetrics.P .deps/java/awt/font/MultipleMaster.P \ ! .deps/java/awt/font/NumericShaper.P .deps/java/awt/font/OpenType.P \ ! .deps/java/awt/font/ShapeGraphicAttribute.P \ ! .deps/java/awt/font/TextAttribute.P .deps/java/awt/font/TextHitInfo.P \ ! .deps/java/awt/font/TextLayout.P .deps/java/awt/font/TextMeasurer.P \ ! .deps/java/awt/font/TransformAttribute.P \ ! .deps/java/awt/geom/AffineTransform.P .deps/java/awt/geom/Arc2D.P \ ! .deps/java/awt/geom/Area.P .deps/java/awt/geom/CubicCurve2D.P \ ! .deps/java/awt/geom/Dimension2D.P .deps/java/awt/geom/Ellipse2D.P \ .deps/java/awt/geom/FlatteningPathIterator.P \ .deps/java/awt/geom/GeneralPath.P \ .deps/java/awt/geom/IllegalPathStateException.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 2915,2921 **** .deps/java/awt/peer/MenuComponentPeer.P \ .deps/java/awt/peer/MenuItemPeer.P .deps/java/awt/peer/MenuPeer.P \ .deps/java/awt/peer/PanelPeer.P .deps/java/awt/peer/PopupMenuPeer.P \ ! .deps/java/awt/peer/ScrollPanePeer.P \ .deps/java/awt/peer/ScrollbarPeer.P .deps/java/awt/peer/TextAreaPeer.P \ .deps/java/awt/peer/TextComponentPeer.P \ .deps/java/awt/peer/TextFieldPeer.P .deps/java/awt/peer/WindowPeer.P \ --- 3551,3557 ---- .deps/java/awt/peer/MenuComponentPeer.P \ .deps/java/awt/peer/MenuItemPeer.P .deps/java/awt/peer/MenuPeer.P \ .deps/java/awt/peer/PanelPeer.P .deps/java/awt/peer/PopupMenuPeer.P \ ! .deps/java/awt/peer/RobotPeer.P .deps/java/awt/peer/ScrollPanePeer.P \ .deps/java/awt/peer/ScrollbarPeer.P .deps/java/awt/peer/TextAreaPeer.P \ .deps/java/awt/peer/TextComponentPeer.P \ .deps/java/awt/peer/TextFieldPeer.P .deps/java/awt/peer/WindowPeer.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 2964,2969 **** --- 3600,3607 ---- .deps/java/beans/beancontext/BeanContextServiceRevokedListener.P \ .deps/java/beans/beancontext/BeanContextServices.P \ .deps/java/beans/beancontext/BeanContextServicesListener.P \ + .deps/java/beans/beancontext/BeanContextServicesSupport.P \ + .deps/java/beans/beancontext/BeanContextSupport.P \ .deps/java/io/BufferedInputStream.P \ .deps/java/io/BufferedOutputStream.P .deps/java/io/BufferedReader.P \ .deps/java/io/BufferedWriter.P .deps/java/io/ByteArrayInputStream.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 3121,3128 **** .deps/java/net/NetPermission.P .deps/java/net/NetworkInterface.P \ .deps/java/net/NoRouteToHostException.P \ .deps/java/net/PasswordAuthentication.P \ - .deps/java/net/PlainDatagramSocketImpl.P \ - .deps/java/net/PlainSocketImpl.P \ .deps/java/net/PortUnreachableException.P \ .deps/java/net/ProtocolException.P .deps/java/net/ServerSocket.P \ .deps/java/net/Socket.P .deps/java/net/SocketAddress.P \ --- 3759,3764 ---- *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 3138,3152 **** .deps/java/net/UnknownHostException.P \ .deps/java/net/UnknownServiceException.P \ .deps/java/net/natInetAddress.P .deps/java/net/natNetworkInterface.P \ ! .deps/java/net/natPlainDatagramSocketImpl.P \ ! .deps/java/net/natPlainSocketImpl.P .deps/java/nio/Buffer.P \ ! .deps/java/nio/BufferOverflowException.P \ .deps/java/nio/BufferUnderflowException.P .deps/java/nio/ByteBuffer.P \ .deps/java/nio/ByteOrder.P .deps/java/nio/CharBuffer.P \ ! .deps/java/nio/DoubleBuffer.P .deps/java/nio/FloatBuffer.P \ ! .deps/java/nio/IntBuffer.P .deps/java/nio/InvalidMarkException.P \ ! .deps/java/nio/LongBuffer.P .deps/java/nio/MappedByteBuffer.P \ .deps/java/nio/ReadOnlyBufferException.P .deps/java/nio/ShortBuffer.P \ .deps/java/nio/channels/AlreadyConnectedException.P \ .deps/java/nio/channels/AsynchronousCloseException.P \ .deps/java/nio/channels/ByteChannel.P \ --- 3774,3794 ---- .deps/java/net/UnknownHostException.P \ .deps/java/net/UnknownServiceException.P \ .deps/java/net/natInetAddress.P .deps/java/net/natNetworkInterface.P \ ! .deps/java/nio/Buffer.P .deps/java/nio/BufferOverflowException.P \ .deps/java/nio/BufferUnderflowException.P .deps/java/nio/ByteBuffer.P \ + .deps/java/nio/ByteBufferHelper.P .deps/java/nio/ByteBufferImpl.P \ .deps/java/nio/ByteOrder.P .deps/java/nio/CharBuffer.P \ ! .deps/java/nio/CharBufferImpl.P .deps/java/nio/CharViewBufferImpl.P \ ! .deps/java/nio/DirectByteBufferImpl.P .deps/java/nio/DoubleBuffer.P \ ! .deps/java/nio/DoubleBufferImpl.P .deps/java/nio/DoubleViewBufferImpl.P \ ! .deps/java/nio/FloatBuffer.P .deps/java/nio/FloatBufferImpl.P \ ! .deps/java/nio/FloatViewBufferImpl.P .deps/java/nio/IntBuffer.P \ ! .deps/java/nio/IntBufferImpl.P .deps/java/nio/IntViewBufferImpl.P \ ! .deps/java/nio/InvalidMarkException.P .deps/java/nio/LongBuffer.P \ ! .deps/java/nio/LongBufferImpl.P .deps/java/nio/LongViewBufferImpl.P \ ! .deps/java/nio/MappedByteBuffer.P .deps/java/nio/MappedByteBufferImpl.P \ .deps/java/nio/ReadOnlyBufferException.P .deps/java/nio/ShortBuffer.P \ + .deps/java/nio/ShortBufferImpl.P .deps/java/nio/ShortViewBufferImpl.P \ .deps/java/nio/channels/AlreadyConnectedException.P \ .deps/java/nio/channels/AsynchronousCloseException.P \ .deps/java/nio/channels/ByteChannel.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 3158,3163 **** --- 3800,3806 ---- .deps/java/nio/channels/ConnectionPendingException.P \ .deps/java/nio/channels/DatagramChannel.P \ .deps/java/nio/channels/FileChannel.P \ + .deps/java/nio/channels/FileChannelImpl.P \ .deps/java/nio/channels/FileLock.P \ .deps/java/nio/channels/FileLockInterruptionException.P \ .deps/java/nio/channels/GatheringByteChannel.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 3181,3186 **** --- 3824,3830 ---- .deps/java/nio/channels/UnresolvedAddressException.P \ .deps/java/nio/channels/UnsupportedAddressTypeException.P \ .deps/java/nio/channels/WritableByteChannel.P \ + .deps/java/nio/channels/natFileChannelImpl.P \ .deps/java/nio/channels/spi/AbstractInterruptibleChannel.P \ .deps/java/nio/channels/spi/AbstractSelectableChannel.P \ .deps/java/nio/channels/spi/AbstractSelectionKey.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 3198,3203 **** --- 3842,3848 ---- .deps/java/nio/charset/UnmappableCharacterException.P \ .deps/java/nio/charset/UnsupportedCharsetException.P \ .deps/java/nio/charset/spi/CharsetProvider.P \ + .deps/java/nio/natDirectByteBufferImpl.P \ .deps/java/rmi/AccessException.P .deps/java/rmi/AlreadyBoundException.P \ .deps/java/rmi/ConnectException.P .deps/java/rmi/ConnectIOException.P \ .deps/java/rmi/MarshalException.P .deps/java/rmi/MarshalledObject.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 3308,3317 **** --- 3953,3974 ---- .deps/java/security/acl/NotOwnerException.P \ .deps/java/security/acl/Owner.P .deps/java/security/acl/Permission.P \ .deps/java/security/cert/CRL.P .deps/java/security/cert/CRLException.P \ + .deps/java/security/cert/CRLSelector.P \ .deps/java/security/cert/CertPath.P \ + .deps/java/security/cert/CertPathBuilder.P \ .deps/java/security/cert/CertPathBuilderException.P \ + .deps/java/security/cert/CertPathBuilderResult.P \ + .deps/java/security/cert/CertPathBuilderSpi.P \ + .deps/java/security/cert/CertPathParameters.P \ + .deps/java/security/cert/CertPathValidator.P \ .deps/java/security/cert/CertPathValidatorException.P \ + .deps/java/security/cert/CertPathValidatorResult.P \ + .deps/java/security/cert/CertPathValidatorSpi.P \ + .deps/java/security/cert/CertSelector.P \ + .deps/java/security/cert/CertStore.P \ .deps/java/security/cert/CertStoreException.P \ + .deps/java/security/cert/CertStoreParameters.P \ + .deps/java/security/cert/CertStoreSpi.P \ .deps/java/security/cert/Certificate.P \ .deps/java/security/cert/CertificateEncodingException.P \ .deps/java/security/cert/CertificateException.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 3320,3325 **** --- 3977,3992 ---- .deps/java/security/cert/CertificateFactorySpi.P \ .deps/java/security/cert/CertificateNotYetValidException.P \ .deps/java/security/cert/CertificateParsingException.P \ + .deps/java/security/cert/CollectionCertStoreParameters.P \ + .deps/java/security/cert/LDAPCertStoreParameters.P \ + .deps/java/security/cert/PKIXBuilderParameters.P \ + .deps/java/security/cert/PKIXCertPathBuilderResult.P \ + .deps/java/security/cert/PKIXCertPathChecker.P \ + .deps/java/security/cert/PKIXCertPathValidatorResult.P \ + .deps/java/security/cert/PKIXParameters.P \ + .deps/java/security/cert/PolicyNode.P \ + .deps/java/security/cert/PolicyQualifierInfo.P \ + .deps/java/security/cert/TrustAnchor.P \ .deps/java/security/cert/X509CRL.P \ .deps/java/security/cert/X509CRLEntry.P \ .deps/java/security/cert/X509Certificate.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 3330,3335 **** --- 3997,4003 ---- .deps/java/security/interfaces/DSAPrivateKey.P \ .deps/java/security/interfaces/DSAPublicKey.P \ .deps/java/security/interfaces/RSAKey.P \ + .deps/java/security/interfaces/RSAMultiPrimePrivateCrtKey.P \ .deps/java/security/interfaces/RSAPrivateCrtKey.P \ .deps/java/security/interfaces/RSAPrivateKey.P \ .deps/java/security/interfaces/RSAPublicKey.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 3342,3348 **** --- 4010,4019 ---- .deps/java/security/spec/InvalidParameterSpecException.P \ .deps/java/security/spec/KeySpec.P \ .deps/java/security/spec/PKCS8EncodedKeySpec.P \ + .deps/java/security/spec/PSSParameterSpec.P \ .deps/java/security/spec/RSAKeyGenParameterSpec.P \ + .deps/java/security/spec/RSAMultiPrimePrivateCrtKeySpec.P \ + .deps/java/security/spec/RSAOtherPrimeInfo.P \ .deps/java/security/spec/RSAPrivateCrtKeySpec.P \ .deps/java/security/spec/RSAPrivateKeySpec.P \ .deps/java/security/spec/RSAPublicKeySpec.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 3372,3377 **** --- 4043,4049 ---- .deps/java/text/DateFormat.P .deps/java/text/DateFormatSymbols.P \ .deps/java/text/DecimalFormat.P .deps/java/text/DecimalFormatSymbols.P \ .deps/java/text/FieldPosition.P .deps/java/text/Format.P \ + .deps/java/text/FormatCharacterIterator.P \ .deps/java/text/MessageFormat.P .deps/java/text/NumberFormat.P \ .deps/java/text/ParseException.P .deps/java/text/ParsePosition.P \ .deps/java/text/RuleBasedCollator.P .deps/java/text/SimpleDateFormat.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 3383,3399 **** .deps/java/util/Calendar.P .deps/java/util/Collection.P \ .deps/java/util/Collections.P .deps/java/util/Comparator.P \ .deps/java/util/ConcurrentModificationException.P \ ! .deps/java/util/Date.P .deps/java/util/Dictionary.P \ ! .deps/java/util/EmptyStackException.P .deps/java/util/Enumeration.P \ ! .deps/java/util/EventListener.P .deps/java/util/EventListenerProxy.P \ ! .deps/java/util/EventObject.P .deps/java/util/GregorianCalendar.P \ ! .deps/java/util/HashMap.P .deps/java/util/HashSet.P \ ! .deps/java/util/Hashtable.P .deps/java/util/IdentityHashMap.P \ ! .deps/java/util/Iterator.P .deps/java/util/LinkedHashMap.P \ ! .deps/java/util/LinkedHashSet.P .deps/java/util/LinkedList.P \ ! .deps/java/util/List.P .deps/java/util/ListIterator.P \ ! .deps/java/util/ListResourceBundle.P .deps/java/util/Locale.P \ ! .deps/java/util/Map.P .deps/java/util/MissingResourceException.P \ .deps/java/util/NoSuchElementException.P .deps/java/util/Observable.P \ .deps/java/util/Observer.P .deps/java/util/Properties.P \ .deps/java/util/PropertyPermission.P \ --- 4055,4072 ---- .deps/java/util/Calendar.P .deps/java/util/Collection.P \ .deps/java/util/Collections.P .deps/java/util/Comparator.P \ .deps/java/util/ConcurrentModificationException.P \ ! .deps/java/util/Currency.P .deps/java/util/Date.P \ ! .deps/java/util/Dictionary.P .deps/java/util/EmptyStackException.P \ ! .deps/java/util/Enumeration.P .deps/java/util/EventListener.P \ ! .deps/java/util/EventListenerProxy.P .deps/java/util/EventObject.P \ ! .deps/java/util/GregorianCalendar.P .deps/java/util/HashMap.P \ ! .deps/java/util/HashSet.P .deps/java/util/Hashtable.P \ ! .deps/java/util/IdentityHashMap.P .deps/java/util/Iterator.P \ ! .deps/java/util/LinkedHashMap.P .deps/java/util/LinkedHashSet.P \ ! .deps/java/util/LinkedList.P .deps/java/util/List.P \ ! .deps/java/util/ListIterator.P .deps/java/util/ListResourceBundle.P \ ! .deps/java/util/Locale.P .deps/java/util/Map.P \ ! .deps/java/util/MissingResourceException.P \ .deps/java/util/NoSuchElementException.P .deps/java/util/Observable.P \ .deps/java/util/Observer.P .deps/java/util/Properties.P \ .deps/java/util/PropertyPermission.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 3411,3417 **** --- 4084,4111 ---- .deps/java/util/jar/JarException.P .deps/java/util/jar/JarFile.P \ .deps/java/util/jar/JarInputStream.P \ .deps/java/util/jar/JarOutputStream.P .deps/java/util/jar/Manifest.P \ + .deps/java/util/logging/ConsoleHandler.P \ + .deps/java/util/logging/ErrorManager.P \ + .deps/java/util/logging/FileHandler.P .deps/java/util/logging/Filter.P \ + .deps/java/util/logging/Formatter.P .deps/java/util/logging/Handler.P \ + .deps/java/util/logging/Level.P .deps/java/util/logging/LogManager.P \ + .deps/java/util/logging/LogRecord.P .deps/java/util/logging/Logger.P \ + .deps/java/util/logging/LoggingPermission.P \ + .deps/java/util/logging/MemoryHandler.P \ + .deps/java/util/logging/SimpleFormatter.P \ + .deps/java/util/logging/SocketHandler.P \ + .deps/java/util/logging/StreamHandler.P \ + .deps/java/util/logging/XMLFormatter.P \ .deps/java/util/natResourceBundle.P .deps/java/util/natTimeZone.P \ + .deps/java/util/prefs/AbstractPreferences.P \ + .deps/java/util/prefs/BackingStoreException.P \ + .deps/java/util/prefs/InvalidPreferencesFormatException.P \ + .deps/java/util/prefs/NodeChangeEvent.P \ + .deps/java/util/prefs/NodeChangeListener.P \ + .deps/java/util/prefs/PreferenceChangeEvent.P \ + .deps/java/util/prefs/PreferenceChangeListener.P \ + .deps/java/util/prefs/Preferences.P \ + .deps/java/util/prefs/PreferencesFactory.P \ .deps/java/util/regex/Matcher.P .deps/java/util/regex/Pattern.P \ .deps/java/util/regex/PatternSyntaxException.P \ .deps/java/util/zip/Adler32.P .deps/java/util/zip/CRC32.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 3533,3538 **** --- 4227,4297 ---- .deps/javax/naming/spi/ObjectFactoryBuilder.P \ .deps/javax/naming/spi/ResolveResult.P \ .deps/javax/naming/spi/Resolver.P .deps/javax/naming/spi/StateFactory.P \ + .deps/javax/print/attribute/Attribute.P \ + .deps/javax/print/attribute/AttributeSet.P \ + .deps/javax/print/attribute/AttributeSetUtilities.P \ + .deps/javax/print/attribute/DateTimeSyntax.P \ + .deps/javax/print/attribute/DocAttribute.P \ + .deps/javax/print/attribute/DocAttributeSet.P \ + .deps/javax/print/attribute/EnumSyntax.P \ + .deps/javax/print/attribute/HashAttributeSet.P \ + .deps/javax/print/attribute/HashDocAttributeSet.P \ + .deps/javax/print/attribute/HashPrintJobAttributeSet.P \ + .deps/javax/print/attribute/HashPrintRequestAttributeSet.P \ + .deps/javax/print/attribute/HashPrintServiceAttributeSet.P \ + .deps/javax/print/attribute/IntegerSyntax.P \ + .deps/javax/print/attribute/PrintJobAttribute.P \ + .deps/javax/print/attribute/PrintJobAttributeSet.P \ + .deps/javax/print/attribute/PrintRequestAttribute.P \ + .deps/javax/print/attribute/PrintRequestAttributeSet.P \ + .deps/javax/print/attribute/PrintServiceAttribute.P \ + .deps/javax/print/attribute/PrintServiceAttributeSet.P \ + .deps/javax/print/attribute/ResolutionSyntax.P \ + .deps/javax/print/attribute/SetOfIntegerSyntax.P \ + .deps/javax/print/attribute/Size2DSyntax.P \ + .deps/javax/print/attribute/SupportedValuesAttribute.P \ + .deps/javax/print/attribute/TextSyntax.P \ + .deps/javax/print/attribute/URISyntax.P \ + .deps/javax/print/attribute/UnmodifiableSetException.P \ + .deps/javax/print/attribute/standard/Copies.P \ + .deps/javax/print/attribute/standard/DateTimeAtCompleted.P \ + .deps/javax/print/attribute/standard/DateTimeAtCreation.P \ + .deps/javax/print/attribute/standard/DateTimeAtProcessing.P \ + .deps/javax/print/attribute/standard/DocumentName.P \ + .deps/javax/print/attribute/standard/JobHoldUntil.P \ + .deps/javax/print/attribute/standard/JobImpressions.P \ + .deps/javax/print/attribute/standard/JobImpressionsCompleted.P \ + .deps/javax/print/attribute/standard/JobKOctets.P \ + .deps/javax/print/attribute/standard/JobKOctetsProcessed.P \ + .deps/javax/print/attribute/standard/JobMediaSheets.P \ + .deps/javax/print/attribute/standard/JobMediaSheetsCompleted.P \ + .deps/javax/print/attribute/standard/JobMessageFromOperator.P \ + .deps/javax/print/attribute/standard/JobName.P \ + .deps/javax/print/attribute/standard/JobOriginatingUserName.P \ + .deps/javax/print/attribute/standard/JobPriority.P \ + .deps/javax/print/attribute/standard/JobPrioritySupported.P \ + .deps/javax/print/attribute/standard/NumberOfDocuments.P \ + .deps/javax/print/attribute/standard/NumberOfInterveningJobs.P \ + .deps/javax/print/attribute/standard/NumberUp.P \ + .deps/javax/print/attribute/standard/OutputDeviceAssigned.P \ + .deps/javax/print/attribute/standard/PagesPerMinute.P \ + .deps/javax/print/attribute/standard/PagesPerMinuteColor.P \ + .deps/javax/print/attribute/standard/PrinterInfo.P \ + .deps/javax/print/attribute/standard/PrinterLocation.P \ + .deps/javax/print/attribute/standard/PrinterMakeAndModel.P \ + .deps/javax/print/attribute/standard/PrinterMessageFromOperator.P \ + .deps/javax/print/attribute/standard/PrinterName.P \ + .deps/javax/print/attribute/standard/QueuedJobCount.P \ + .deps/javax/print/attribute/standard/RequestingUserName.P \ + .deps/javax/rmi/BAD_OPERATION.P .deps/javax/rmi/CORBA/ClassDesc.P \ + .deps/javax/rmi/CORBA/ObjectImpl.P \ + .deps/javax/rmi/CORBA/PortableRemoteObjectDelegate.P \ + .deps/javax/rmi/CORBA/Stub.P .deps/javax/rmi/CORBA/StubDelegate.P \ + .deps/javax/rmi/CORBA/SystemException.P .deps/javax/rmi/CORBA/Tie.P \ + .deps/javax/rmi/CORBA/Util.P .deps/javax/rmi/CORBA/UtilDelegate.P \ + .deps/javax/rmi/CORBA/ValueHandler.P .deps/javax/rmi/ORB.P \ + .deps/javax/rmi/PortableRemoteObject.P \ + .deps/javax/security/auth/x500/X500Principal.P \ .deps/javax/sql/ConnectionEvent.P \ .deps/javax/sql/ConnectionEventListener.P \ .deps/javax/sql/ConnectionPoolDataSource.P .deps/javax/sql/DataSource.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 3571,3583 **** .deps/javax/swing/JComboBox.P .deps/javax/swing/JComponent.P \ .deps/javax/swing/JDesktopPane.P .deps/javax/swing/JDialog.P \ .deps/javax/swing/JEditorPane.P .deps/javax/swing/JFileChooser.P \ ! .deps/javax/swing/JFrame.P .deps/javax/swing/JInternalFrame.P \ ! .deps/javax/swing/JLabel.P .deps/javax/swing/JLayeredPane.P \ ! .deps/javax/swing/JList.P .deps/javax/swing/JMenu.P \ ! .deps/javax/swing/JMenuBar.P .deps/javax/swing/JMenuItem.P \ ! .deps/javax/swing/JOptionPane.P .deps/javax/swing/JPanel.P \ ! .deps/javax/swing/JPasswordField.P .deps/javax/swing/JPopupMenu.P \ ! .deps/javax/swing/JProgressBar.P .deps/javax/swing/JRadioButton.P \ .deps/javax/swing/JRadioButtonMenuItem.P .deps/javax/swing/JRootPane.P \ .deps/javax/swing/JScrollBar.P .deps/javax/swing/JScrollPane.P \ .deps/javax/swing/JSeparator.P .deps/javax/swing/JSlider.P \ --- 4330,4343 ---- .deps/javax/swing/JComboBox.P .deps/javax/swing/JComponent.P \ .deps/javax/swing/JDesktopPane.P .deps/javax/swing/JDialog.P \ .deps/javax/swing/JEditorPane.P .deps/javax/swing/JFileChooser.P \ ! .deps/javax/swing/JFormattedTextField.P .deps/javax/swing/JFrame.P \ ! .deps/javax/swing/JInternalFrame.P .deps/javax/swing/JLabel.P \ ! .deps/javax/swing/JLayeredPane.P .deps/javax/swing/JList.P \ ! .deps/javax/swing/JMenu.P .deps/javax/swing/JMenuBar.P \ ! .deps/javax/swing/JMenuItem.P .deps/javax/swing/JOptionPane.P \ ! .deps/javax/swing/JPanel.P .deps/javax/swing/JPasswordField.P \ ! .deps/javax/swing/JPopupMenu.P .deps/javax/swing/JProgressBar.P \ ! .deps/javax/swing/JRadioButton.P \ .deps/javax/swing/JRadioButtonMenuItem.P .deps/javax/swing/JRootPane.P \ .deps/javax/swing/JScrollBar.P .deps/javax/swing/JScrollPane.P \ .deps/javax/swing/JSeparator.P .deps/javax/swing/JSlider.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 3592,3598 **** .deps/javax/swing/MenuElement.P \ .deps/javax/swing/MenuSelectionManager.P \ .deps/javax/swing/MutableComboBoxModel.P \ ! .deps/javax/swing/OverlayLayout.P .deps/javax/swing/ProgressMonitor.P \ .deps/javax/swing/ProgressMonitorInputStream.P \ .deps/javax/swing/Renderer.P .deps/javax/swing/RepaintManager.P \ .deps/javax/swing/RootPaneContainer.P \ --- 4352,4359 ---- .deps/javax/swing/MenuElement.P \ .deps/javax/swing/MenuSelectionManager.P \ .deps/javax/swing/MutableComboBoxModel.P \ ! .deps/javax/swing/OverlayLayout.P .deps/javax/swing/Popup.P \ ! .deps/javax/swing/PopupFactory.P .deps/javax/swing/ProgressMonitor.P \ .deps/javax/swing/ProgressMonitorInputStream.P \ .deps/javax/swing/Renderer.P .deps/javax/swing/RepaintManager.P \ .deps/javax/swing/RootPaneContainer.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 3614,3619 **** --- 4375,4381 ---- .deps/javax/swing/border/EtchedBorder.P \ .deps/javax/swing/border/LineBorder.P \ .deps/javax/swing/border/MatteBorder.P \ + .deps/javax/swing/border/SoftBevelBorder.P \ .deps/javax/swing/border/TitledBorder.P \ .deps/javax/swing/colorchooser/AbstractColorChooserPanel.P \ .deps/javax/swing/colorchooser/ColorChooserComponentFactory.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 3691,3697 **** .deps/javax/swing/plaf/ScrollBarUI.P \ .deps/javax/swing/plaf/ScrollPaneUI.P \ .deps/javax/swing/plaf/SeparatorUI.P .deps/javax/swing/plaf/SliderUI.P \ ! .deps/javax/swing/plaf/SplitPaneUI.P \ .deps/javax/swing/plaf/TabbedPaneUI.P \ .deps/javax/swing/plaf/TableHeaderUI.P .deps/javax/swing/plaf/TableUI.P \ .deps/javax/swing/plaf/TextUI.P .deps/javax/swing/plaf/ToolBarUI.P \ --- 4453,4459 ---- .deps/javax/swing/plaf/ScrollBarUI.P \ .deps/javax/swing/plaf/ScrollPaneUI.P \ .deps/javax/swing/plaf/SeparatorUI.P .deps/javax/swing/plaf/SliderUI.P \ ! .deps/javax/swing/plaf/SpinnerUI.P .deps/javax/swing/plaf/SplitPaneUI.P \ .deps/javax/swing/plaf/TabbedPaneUI.P \ .deps/javax/swing/plaf/TableHeaderUI.P .deps/javax/swing/plaf/TableUI.P \ .deps/javax/swing/plaf/TextUI.P .deps/javax/swing/plaf/ToolBarUI.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 3710,3715 **** --- 4472,4479 ---- .deps/javax/swing/plaf/basic/BasicPanelUI.P \ .deps/javax/swing/plaf/basic/BasicRadioButtonUI.P \ .deps/javax/swing/plaf/basic/BasicScrollPaneUI.P \ + .deps/javax/swing/plaf/basic/BasicSplitPaneDivider.P \ + .deps/javax/swing/plaf/basic/BasicSplitPaneUI.P \ .deps/javax/swing/plaf/basic/BasicTabbedPaneUI.P \ .deps/javax/swing/plaf/basic/BasicTextUI.P \ .deps/javax/swing/plaf/basic/BasicToggleButtonUI.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 3720,3725 **** --- 4484,4490 ---- .deps/javax/swing/table/DefaultTableCellRenderer.P \ .deps/javax/swing/table/DefaultTableColumnModel.P \ .deps/javax/swing/table/DefaultTableModel.P \ + .deps/javax/swing/table/JTableHeader.P \ .deps/javax/swing/table/TableCellEditor.P \ .deps/javax/swing/table/TableCellRenderer.P \ .deps/javax/swing/table/TableColumn.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 3733,3742 **** .deps/javax/swing/text/ComponentView.P \ .deps/javax/swing/text/DefaultCaret.P \ .deps/javax/swing/text/DefaultEditorKit.P \ ! .deps/javax/swing/text/Document.P .deps/javax/swing/text/EditorKit.P \ ! .deps/javax/swing/text/Element.P .deps/javax/swing/text/GapContent.P \ .deps/javax/swing/text/JTextComponent.P .deps/javax/swing/text/Keymap.P \ .deps/javax/swing/text/MutableAttributeSet.P \ .deps/javax/swing/text/PlainDocument.P \ .deps/javax/swing/text/PlainEditorKit.P \ .deps/javax/swing/text/Position.P .deps/javax/swing/text/Segment.P \ --- 4498,4510 ---- .deps/javax/swing/text/ComponentView.P \ .deps/javax/swing/text/DefaultCaret.P \ .deps/javax/swing/text/DefaultEditorKit.P \ ! .deps/javax/swing/text/Document.P \ ! .deps/javax/swing/text/DocumentFilter.P \ ! .deps/javax/swing/text/EditorKit.P .deps/javax/swing/text/Element.P \ ! .deps/javax/swing/text/GapContent.P \ .deps/javax/swing/text/JTextComponent.P .deps/javax/swing/text/Keymap.P \ .deps/javax/swing/text/MutableAttributeSet.P \ + .deps/javax/swing/text/NavigationFilter.P \ .deps/javax/swing/text/PlainDocument.P \ .deps/javax/swing/text/PlainEditorKit.P \ .deps/javax/swing/text/Position.P .deps/javax/swing/text/Segment.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 3786,3793 **** .deps/javax/transaction/UserTransaction.P \ .deps/javax/transaction/xa/XAException.P \ .deps/javax/transaction/xa/XAResource.P \ ! .deps/javax/transaction/xa/Xid.P .deps/jni.P .deps/no-threads.P \ ! .deps/nogc.P .deps/org/w3c/dom/Attr.P .deps/org/w3c/dom/CDATASection.P \ .deps/org/w3c/dom/CharacterData.P .deps/org/w3c/dom/Comment.P \ .deps/org/w3c/dom/DOMException.P .deps/org/w3c/dom/DOMImplementation.P \ .deps/org/w3c/dom/Document.P .deps/org/w3c/dom/DocumentFragment.P \ --- 4554,4597 ---- .deps/javax/transaction/UserTransaction.P \ .deps/javax/transaction/xa/XAException.P \ .deps/javax/transaction/xa/XAResource.P \ ! .deps/javax/transaction/xa/Xid.P .deps/jni.P .deps/jni/classpath/jcl.P \ ! .deps/jni/classpath/jnilink.P .deps/jni/classpath/native_state.P \ ! .deps/jni/classpath/primlib.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeer.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeerMetrics.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontMetrics.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGlyphVector.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCanvasPeer.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImagePainter.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuBarPeer.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPanelPeer.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.P \ ! .deps/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.P \ ! .deps/jni/gtk-peer/gthread-jni.P .deps/no-threads.P .deps/nogc.P \ ! .deps/org/w3c/dom/Attr.P .deps/org/w3c/dom/CDATASection.P \ .deps/org/w3c/dom/CharacterData.P .deps/org/w3c/dom/Comment.P \ .deps/org/w3c/dom/DOMException.P .deps/org/w3c/dom/DOMImplementation.P \ .deps/org/w3c/dom/Document.P .deps/org/w3c/dom/DocumentFragment.P \ *************** DEP_FILES = .deps/$(srcdir)/$(CONVERT_D *** 3827,3834 **** .deps/org/xml/sax/helpers/XMLReaderFactory.P .deps/posix-threads.P \ .deps/posix.P .deps/prims.P .deps/resolve.P .deps/verify.P \ .deps/win32-threads.P .deps/win32.P ! SOURCES = $(libgcj_la_SOURCES) $(EXTRA_libgcj_la_SOURCES) $(lib_org_xml_sax_la_SOURCES) $(lib_org_w3c_dom_la_SOURCES) $(lib_gnu_awt_xlib_la_SOURCES) $(EXTRA_lib_gnu_awt_xlib_la_SOURCES) $(jv_convert_SOURCES) $(EXTRA_jv_convert_SOURCES) $(gij_SOURCES) $(rmic_SOURCES) $(EXTRA_rmic_SOURCES) $(rmiregistry_SOURCES) $(EXTRA_rmiregistry_SOURCES) $(gen_from_JIS_SOURCES) $(EXTRA_gen_from_JIS_SOURCES) ! OBJECTS = $(libgcj_la_OBJECTS) $(lib_org_xml_sax_la_OBJECTS) $(lib_org_w3c_dom_la_OBJECTS) $(lib_gnu_awt_xlib_la_OBJECTS) $(jv_convert_OBJECTS) $(gij_OBJECTS) $(rmic_OBJECTS) $(rmiregistry_OBJECTS) $(gen_from_JIS_OBJECTS) all: all-redirect .SUFFIXES: --- 4631,4638 ---- .deps/org/xml/sax/helpers/XMLReaderFactory.P .deps/posix-threads.P \ .deps/posix.P .deps/prims.P .deps/resolve.P .deps/verify.P \ .deps/win32-threads.P .deps/win32.P ! SOURCES = $(libgcj_la_SOURCES) $(EXTRA_libgcj_la_SOURCES) $(lib_org_xml_sax_la_SOURCES) $(lib_org_w3c_dom_la_SOURCES) $(lib_gnu_java_awt_peer_gtk_la_SOURCES) $(lib_gnu_awt_xlib_la_SOURCES) $(EXTRA_lib_gnu_awt_xlib_la_SOURCES) $(jv_convert_SOURCES) $(EXTRA_jv_convert_SOURCES) $(gij_SOURCES) $(rmic_SOURCES) $(EXTRA_rmic_SOURCES) $(rmiregistry_SOURCES) $(EXTRA_rmiregistry_SOURCES) $(gen_from_JIS_SOURCES) $(EXTRA_gen_from_JIS_SOURCES) ! OBJECTS = $(libgcj_la_OBJECTS) $(lib_org_xml_sax_la_OBJECTS) $(lib_org_w3c_dom_la_OBJECTS) $(lib_gnu_java_awt_peer_gtk_la_OBJECTS) $(lib_gnu_awt_xlib_la_OBJECTS) $(jv_convert_OBJECTS) $(gij_OBJECTS) $(rmic_OBJECTS) $(rmiregistry_OBJECTS) $(gen_from_JIS_OBJECTS) all: all-redirect .SUFFIXES: *************** Makefile: $(srcdir)/Makefile.in $(top_b *** 3840,3852 **** cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status ! $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4 ! cd $(srcdir) && $(ACLOCAL) config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) libgcj.spec: $(top_builddir)/config.status libgcj.spec.in cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status libgcj-test.spec: $(top_builddir)/config.status libgcj-test.spec.in --- 4644,4660 ---- cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status ! $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4 \ ! ./acinclude.m4 ./aclocal.m4 ./glib-2.0.m4 ./gtk-2.0.m4 \ ! ./libart.m4 ! cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) + libgcj.pc: $(top_builddir)/config.status libgcj.pc.in + cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status libgcj.spec: $(top_builddir)/config.status libgcj.spec.in cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status libgcj-test.spec: $(top_builddir)/config.status libgcj-test.spec.in *************** lib-org-xml-sax.la: $(lib_org_xml_sax_la *** 3921,3926 **** --- 4729,4737 ---- lib-org-w3c-dom.la: $(lib_org_w3c_dom_la_OBJECTS) $(lib_org_w3c_dom_la_DEPENDENCIES) $(LINK) -rpath $(toolexeclibdir) $(lib_org_w3c_dom_la_LDFLAGS) $(lib_org_w3c_dom_la_OBJECTS) $(lib_org_w3c_dom_la_LIBADD) $(LIBS) + lib-gnu-java-awt-peer-gtk.la: $(lib_gnu_java_awt_peer_gtk_la_OBJECTS) $(lib_gnu_java_awt_peer_gtk_la_DEPENDENCIES) + $(LINK) -rpath $(toolexeclibdir) $(lib_gnu_java_awt_peer_gtk_la_LDFLAGS) $(lib_gnu_java_awt_peer_gtk_la_OBJECTS) $(lib_gnu_java_awt_peer_gtk_la_LIBADD) $(LIBS) + mostlyclean-binPROGRAMS: clean-binPROGRAMS: *************** uninstall-jarDATA: *** 4019,4024 **** --- 4830,4854 ---- rm -f $(DESTDIR)$(jardir)/$$p; \ done + install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(pkgconfigdir) + @list='$(pkgconfig_DATA)'; for p in $$list; do \ + if test -f $(srcdir)/$$p; then \ + echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgconfigdir)/$$p"; \ + $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgconfigdir)/$$p; \ + else if test -f $$p; then \ + echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pkgconfigdir)/$$p"; \ + $(INSTALL_DATA) $$p $(DESTDIR)$(pkgconfigdir)/$$p; \ + fi; fi; \ + done + + uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + list='$(pkgconfig_DATA)'; for p in $$list; do \ + rm -f $(DESTDIR)$(pkgconfigdir)/$$p; \ + done + install-toolexecmainlibDATA: $(toolexecmainlib_DATA) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(toolexecmainlibdir) *************** install-exec-am: install-toolexeclibLTLI *** 4253,4259 **** install-binSCRIPTS install-toolexecmainlibDATA install-exec: install-exec-recursive ! install-data-am: install-jarDATA install-data-local install-data: install-data-recursive install-am: all-am --- 5083,5090 ---- install-binSCRIPTS install-toolexecmainlibDATA install-exec: install-exec-recursive ! install-data-am: install-jarDATA install-pkgconfigDATA \ ! install-data-local install-data: install-data-recursive install-am: all-am *************** install-am: all-am *** 4261,4267 **** install: install-recursive uninstall-am: uninstall-toolexeclibLTLIBRARIES uninstall-binPROGRAMS \ uninstall-binSCRIPTS uninstall-jarDATA \ ! uninstall-toolexecmainlibDATA uninstall: uninstall-recursive all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(DATA) all-redirect: all-recursive --- 5092,5098 ---- install: install-recursive uninstall-am: uninstall-toolexeclibLTLIBRARIES uninstall-binPROGRAMS \ uninstall-binSCRIPTS uninstall-jarDATA \ ! uninstall-pkgconfigDATA uninstall-toolexecmainlibDATA uninstall: uninstall-recursive all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(DATA) all-redirect: all-recursive *************** installdirs: installdirs-recursive *** 4271,4276 **** --- 5102,5108 ---- installdirs-am: $(mkinstalldirs) $(DESTDIR)$(toolexeclibdir) $(DESTDIR)$(bindir) \ $(DESTDIR)$(bindir) $(DESTDIR)$(jardir) \ + $(DESTDIR)$(pkgconfigdir) \ $(DESTDIR)$(toolexecmainlibdir) *************** maintainer-clean-generic: *** 4288,4294 **** mostlyclean-am: mostlyclean-toolexeclibLTLIBRARIES mostlyclean-compile \ mostlyclean-libtool mostlyclean-binPROGRAMS \ mostlyclean-noinstPROGRAMS mostlyclean-tags \ ! mostlyclean-depend mostlyclean-generic mostlyclean: mostlyclean-recursive --- 5120,5127 ---- mostlyclean-am: mostlyclean-toolexeclibLTLIBRARIES mostlyclean-compile \ mostlyclean-libtool mostlyclean-binPROGRAMS \ mostlyclean-noinstPROGRAMS mostlyclean-tags \ ! mostlyclean-depend mostlyclean-generic \ ! mostlyclean-local mostlyclean: mostlyclean-recursive *************** clean: clean-recursive *** 4301,4307 **** distclean-am: distclean-toolexeclibLTLIBRARIES distclean-compile \ distclean-libtool distclean-binPROGRAMS \ distclean-noinstPROGRAMS distclean-tags \ ! distclean-depend distclean-generic clean-am -rm -f libtool distclean: distclean-recursive --- 5134,5141 ---- distclean-am: distclean-toolexeclibLTLIBRARIES distclean-compile \ distclean-libtool distclean-binPROGRAMS \ distclean-noinstPROGRAMS distclean-tags \ ! distclean-depend distclean-generic clean-am \ ! distclean-local -rm -f libtool distclean: distclean-recursive *************** distclean-binPROGRAMS clean-binPROGRAMS *** 4330,4336 **** uninstall-binPROGRAMS install-binPROGRAMS mostlyclean-noinstPROGRAMS \ distclean-noinstPROGRAMS clean-noinstPROGRAMS \ maintainer-clean-noinstPROGRAMS uninstall-binSCRIPTS install-binSCRIPTS \ ! uninstall-jarDATA install-jarDATA uninstall-toolexecmainlibDATA \ install-toolexecmainlibDATA install-data-recursive \ uninstall-data-recursive install-exec-recursive \ uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ --- 5164,5171 ---- uninstall-binPROGRAMS install-binPROGRAMS mostlyclean-noinstPROGRAMS \ distclean-noinstPROGRAMS clean-noinstPROGRAMS \ maintainer-clean-noinstPROGRAMS uninstall-binSCRIPTS install-binSCRIPTS \ ! uninstall-jarDATA install-jarDATA uninstall-pkgconfigDATA \ ! install-pkgconfigDATA uninstall-toolexecmainlibDATA \ install-toolexecmainlibDATA install-data-recursive \ uninstall-data-recursive install-exec-recursive \ uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ *************** installdirs mostlyclean-generic distclea *** 4347,4365 **** maintainer-clean-generic clean mostlyclean distclean maintainer-clean ! .java.class: ! $(JAVAC) $(JCFLAGS) -classpath '' -bootclasspath $(here):$(srcdir) \ ! -d $(here) $< ! libgcj-@gcc_version@.jar: $(all_java_class_files) ! -@rm -f libgcj-@gcc_version@.jar ! find java gnu javax org -type d -o -type f -name '*.class' | \ ! sed -e '/\/\./d' -e '/\/xlib/d' | \ ! $(ZIP) cfM0E@ $@ clean-local: find . -name '*.class' -print | xargs rm -f # Just remove the objects from C++ sources, for testing the C++ compiler. clean-nat: rm -f $(nat_files) $(x_nat_files) --- 5182,5230 ---- maintainer-clean-generic clean mostlyclean distclean maintainer-clean ! $(gtk_c_headers): $(gtk_awt_peer_sources) ! @input=`echo $@ | sed -e 's,jniinclude/,,' -e 's,_,.,g' -e 's,.h$$,,'`; \ ! echo "$(GCJH) -jni -d jniinclude -classpath '' -bootclasspath $(top_builddir) $$input"; \ ! $(GCJH) -jni -d jniinclude -classpath '' -bootclasspath $(top_builddir) $$input ! # Compile all classfiles in one go. ! ! @ONESTEP_TRUE@libgcj-@gcc_version@.jar: $(all_java_source_files) ! @ONESTEP_TRUE@ -@rm -f libgcj-@gcc_version@.jar ! @ONESTEP_TRUE@ @echo Compiling Java sourcefiles... ! @ONESTEP_TRUE@ @: $(call write_entries_to_file,$?,libgcj.sourcelist) ! @ONESTEP_TRUE@ $(JAVAC) $(JCFLAGS) -classpath '' -bootclasspath $(here):$(srcdir) -d $(here) @libgcj.sourcelist ! @ONESTEP_TRUE@ find java gnu javax org -type d -o -type f -name '*.class' | \ ! @ONESTEP_TRUE@ sed -e '/\/\./d' -e '/\/xlib/d' | \ ! @ONESTEP_TRUE@ $(ZIP) cfM0E@ $@ ! ! # This next rule seems backward, but reflects the fact ! # that 1) all classfiles are compiled in one go when the ! # libgcj jarfile is built and 2) anything which depends ! # on a particular .class file must wait until the jarfile ! # is built. ! @ONESTEP_TRUE@$(all_java_class_files): libgcj-@gcc_version@.jar ! ! # Compile each classfile individually. ! ! @ONESTEP_FALSE@.java.class: ! @ONESTEP_FALSE@ $(JAVAC) $(JCFLAGS) -classpath '' -bootclasspath $(here):$(srcdir) -d $(here) $< ! ! @ONESTEP_FALSE@libgcj-@gcc_version@.jar: $(all_java_class_files) ! @ONESTEP_FALSE@ -@rm -f libgcj-@gcc_version@.jar ! @ONESTEP_FALSE@ find java gnu javax org -type d -o -type f -name '*.class' | \ ! @ONESTEP_FALSE@ sed -e '/\/\./d' -e '/\/xlib/d' | \ ! @ONESTEP_FALSE@ $(ZIP) cfM0E@ $@ ! ! mostlyclean-local: ! find . -name '*.lo' -print | xargs $(LIBTOOL) rm -f clean-local: find . -name '*.class' -print | xargs rm -f + distclean-local: + find . -name '*.d' -print | xargs rm -f + # Just remove the objects from C++ sources, for testing the C++ compiler. clean-nat: rm -f $(nat_files) $(x_nat_files) *************** $(nat_files) $(x_nat_files): %.lo: %.cc *** 4378,4396 **** $(c_files): %.lo: %.c $(LTCOMPILE) -c -o $@ $< $(c_files): java/lang/fdlibm.h java/lang/ieeefp.h java/lang/mprec.h ! $(javao_files) $(x_javao_files) $(lib_org_w3c_dom_la_OBJECTS) $(lib_org_xml_sax_la_OBJECTS): %.lo: %.java $(GCJCOMPILE) -o $@ $< libgcj.la: $(libgcj_la_OBJECTS) $(libgcj_la_DEPENDENCIES) ! @: $(shell echo Creating list of files to link...) $(shell rm -f libgcj.objectlist || :) $(shell touch libgcj.objectlist) $(foreach object,$(libgcj_la_OBJECTS) $(libgcj_la_LIBADD),$(shell echo $(object) >> libgcj.objectlist)) $(libgcj_la_LINK) -objectlist libgcj.objectlist \ @GCLIBS@ @LIBFFI@ @ZLIBS@ \ -rpath $(toolexeclibdir) $(libgcj_la_LDFLAGS) $(LIBS) lib-gnu-awt-xlib.la: $(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_DEPENDENCIES) ! @: $(shell echo Creating list of files to link...) $(shell rm -f lib_gnu_awt_xlib.objectlist || :) $(shell touch lib_gnu_awt_xlib.objectlist) $(foreach object,$(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_LIBADD),$(shell echo $(object) >> lib_gnu_awt_xlib.objectlist)) $(lib_gnu_awt_xlib_la_LINK) -objectlist lib_gnu_awt_xlib.objectlist \ -rpath $(toolexeclibdir) $(lib_gnu_awt_xlib_la_LDFLAGS) $(LIBS) --- 5243,5281 ---- $(c_files): %.lo: %.c $(LTCOMPILE) -c -o $@ $< + interpret.lo: interpret.cc + $(LTCXXCOMPILE) -fno-unit-at-a-time -c -o $@ $< + + $(extra_cc_files): %.lo: %.cc + $(LTCXXCOMPILE) -c -o $@ $< + $(c_files): java/lang/fdlibm.h java/lang/ieeefp.h java/lang/mprec.h ! $(gtk_c_files): %.lo: %.c ! $(LTCOMPILE) -c -Ijniinclude -I$(srcdir)/jni/classpath -I$(srcdir)/jni/gtk-peer \ ! $(GTK_CFLAGS) $(LIBART_CFLAGS) $(CAIRO_LIBS) $(PANGOFT2_LIBS) -o $@ $< ! ! $(gtk_c_files): $(gtk_c_headers) ! ! $(filter-out gnu/gcj/runtime/StackTrace.lo, $(javao_files)) $(x_javao_files) $(lib_org_w3c_dom_la_OBJECTS) $(lib_org_xml_sax_la_OBJECTS): %.lo: %.java $(GCJCOMPILE) -o $@ $< + $(gtk_awt_peer_sources:.java=.lo): %.lo: %.java + $(GCJCOMPILE) -fjni -o $@ $< + + gnu/gcj/runtime/StackTrace.lo: gnu/gcj/runtime/StackTrace.java + $(GCJCOMPILE) -fno-optimize-sibling-calls -o $@ $< + libgcj.la: $(libgcj_la_OBJECTS) $(libgcj_la_DEPENDENCIES) ! @echo Creating list of files to link... ! @: $(call write_entries_to_file,$(libgcj_la_OBJECTS) $(libgcj_la_LIBADD),libgcj.objectlist) $(libgcj_la_LINK) -objectlist libgcj.objectlist \ @GCLIBS@ @LIBFFI@ @ZLIBS@ \ -rpath $(toolexeclibdir) $(libgcj_la_LDFLAGS) $(LIBS) lib-gnu-awt-xlib.la: $(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_DEPENDENCIES) ! @echo Creating list of files to link... ! @: $(call write_entries_to_file,$(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_LIBADD),lib_gnu_awt_xlib.objectlist) $(lib_gnu_awt_xlib_la_LINK) -objectlist lib_gnu_awt_xlib.objectlist \ -rpath $(toolexeclibdir) $(lib_gnu_awt_xlib_la_LDFLAGS) $(LIBS) *************** java/io/ObjectOutputStream$$PutField.h: *** 4476,4487 **** $(GCJH) -classpath '' -bootclasspath $(top_builddir) \ 'java/io/ObjectOutputStream$$PutField' $(extra_headers) $(srcdir)/java/lang/Object.h $(srcdir)/java/lang/Class.h: @: install-data-local: $(PRE_INSTALL) ! @: $(shell echo Creating list of headers to install...) $(shell rm -f tmp-ilist || :) $(shell touch tmp-ilist) $(foreach hdr,$(nat_headers) $(extra_headers),$(shell echo $(hdr) >> tmp-ilist)) @cat tmp-ilist | while read f; do \ d="`echo $$f | sed -e 's,/[^/]*$$,,'`"; \ $(mkinstalldirs) $(DESTDIR)$(includedir)/$$d; \ --- 5361,5381 ---- $(GCJH) -classpath '' -bootclasspath $(top_builddir) \ 'java/io/ObjectOutputStream$$PutField' + gnu/java/net/PlainSocketImpl$$SocketInputStream.h: gnu/java/net/PlainSocketImpl.class + $(GCJH) -classpath '' -bootclasspath $(top_builddir) \ + 'gnu/java/net/PlainSocketImpl$$SocketInputStream' + + gnu/java/net/PlainSocketImpl$$SocketOutputStream.h: gnu/java/net/PlainSocketImpl.class + $(GCJH) -classpath '' -bootclasspath $(top_builddir) \ + 'gnu/java/net/PlainSocketImpl$$SocketOutputStream' + $(extra_headers) $(srcdir)/java/lang/Object.h $(srcdir)/java/lang/Class.h: @: install-data-local: $(PRE_INSTALL) ! @echo Creating list of headers to install... ! @: $(call write_entries_to_file,$(nat_headers_install) $(extra_headers),tmp-ilist) @cat tmp-ilist | while read f; do \ d="`echo $$f | sed -e 's,/[^/]*$$,,'`"; \ $(mkinstalldirs) $(DESTDIR)$(includedir)/$$d; \ *************** install-data-local: *** 4495,4500 **** --- 5389,5401 ---- echo " $(INSTALL_DATA) $(srcdir)/java/security/$$f $(DESTDIR)$(secdir)/$$f"; \ $(INSTALL_DATA) $(srcdir)/java/security/$$f $(DESTDIR)$(secdir)/$$f; \ done + $(INSTALL_DATA) 'java/io/ObjectOutputStream$$PutField.h' $(DESTDIR)$(includedir)/java/io/ + $(INSTALL_DATA) 'java/io/ObjectInputStream$$GetField.h' $(DESTDIR)$(includedir)/java/io/ + $(INSTALL_DATA) 'java/lang/reflect/Proxy$$ProxyData.h' $(DESTDIR)$(includedir)/java/lang/reflect/ + $(INSTALL_DATA) 'java/lang/reflect/Proxy$$ProxyType.h' $(DESTDIR)$(includedir)/java/lang/reflect/ + $(INSTALL_DATA) 'gnu/java/net/PlainSocketImpl$$SocketInputStream.h' $(DESTDIR)$(includedir)/gnu/java/net/ + $(INSTALL_DATA) 'gnu/java/net/PlainSocketImpl$$SocketOutputStream.h' $(DESTDIR)$(includedir)/gnu/java/net/ + $(INSTALL_DATA) $(srcdir)/java/util/logging/logging.properties $(DESTDIR)$(propdir)/logging.properties maintainer-check: libgcj.la $(NM) .libs/libgcj.a | grep ' T ' \ *************** class-check: libgcj-@gcc_version@.jar *** 4517,4522 **** --- 5418,5427 ---- :; else ok=1; fi; \ done; exit $$ok + write-entries-to-file-check: + @echo Creating list of files to link... + @: $(call write_entries_to_file,$(libgcj_la_OBJECTS) $(libgcj_la_LIBADD),libgcj.objectlist) + # The Unicode consortium does not permit re-distributing the file JIS0201.TXT. # You can get it from ftp://ftp.unicode.org/Public/MAPPINGS/EASTASIA/JIS/. *************** texinfo: TexinfoDoclet.class *** 4601,4607 **** -include deps.mk ! all-recursive: $(all_java_class_files) $(nat_headers) $(x_nat_headers) # Multilib support. .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \ --- 5506,5512 ---- -include deps.mk ! all-recursive: libgcj-@gcc_version@.jar $(nat_headers) $(x_nat_headers) # Multilib support. .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \ diff -Nrc3pad gcc-3.3.3/libjava/mauve-libgcj gcc-3.4.0/libjava/mauve-libgcj *** gcc-3.3.3/libjava/mauve-libgcj 2003-06-07 18:42:28.000000000 +0000 --- gcc-3.4.0/libjava/mauve-libgcj 2003-12-18 20:23:48.000000000 +0000 *************** JLS1.2 *** 10,18 **** JDBC1.0 JDBC2.0 - # Cannot be compiled - !java.text.ACIAttribute - # The following tests seem to hang or crash the testsuite. # This a problem when running Mauve "standalone". !java.lang.reflect.Array.newInstance --- 10,15 ---- *************** JDBC2.0 *** 25,39 **** # The behaviour of the garbarge collector cannot be predicted. # Note the . at the end so we do test java.lang.reflect !java.lang.ref. - - # There are a bunch of valid tests we can't pass in - # this release. - !java.security.Signature.getInstance14 - !java.security.Security.getProviders - !java.security.Security.getAlgorithms - !java.security.MessageDigest.getInstance14 - !java.security.KeyPairGenerator.getInstance14 - !java.security.KeyFactory.getInstance14 - !java.security.AlgorithmParameters.getInstance14 - !java.security.AlgorithmParameterGenerator.getInstance14 - !java.net.DatagramSocket.DatagramSocketTest2 --- 22,24 ---- diff -Nrc3pad gcc-3.3.3/libjava/org/xml/sax/helpers/NewInstance.java gcc-3.4.0/libjava/org/xml/sax/helpers/NewInstance.java *** gcc-3.3.3/libjava/org/xml/sax/helpers/NewInstance.java 2002-12-20 03:50:17.000000000 +0000 --- gcc-3.4.0/libjava/org/xml/sax/helpers/NewInstance.java 2002-12-20 03:49:19.000000000 +0000 *************** *** 4,10 **** // and by David Brownell, dbrownell@users.sourceforge.net // NO WARRANTY! This class is in the Public Domain. ! // $Id: NewInstance.java,v 1.1.2.1 2002/12/20 03:50:17 tromey Exp $ package org.xml.sax.helpers; --- 4,10 ---- // and by David Brownell, dbrownell@users.sourceforge.net // NO WARRANTY! This class is in the Public Domain. ! // $Id: NewInstance.java,v 1.1.2.4 2002/01/29 21:34:14 dbrownell Exp $ package org.xml.sax.helpers; diff -Nrc3pad gcc-3.3.3/libjava/org/xml/sax/helpers/package.html gcc-3.4.0/libjava/org/xml/sax/helpers/package.html *** gcc-3.3.3/libjava/org/xml/sax/helpers/package.html 2002-12-20 03:50:17.000000000 +0000 --- gcc-3.4.0/libjava/org/xml/sax/helpers/package.html 2002-12-20 03:49:20.000000000 +0000 *************** *** 1,6 **** ! --- 1,6 ---- ! diff -Nrc3pad gcc-3.3.3/libjava/org/xml/sax/package.html gcc-3.4.0/libjava/org/xml/sax/package.html *** gcc-3.3.3/libjava/org/xml/sax/package.html 2002-12-20 03:50:17.000000000 +0000 --- gcc-3.4.0/libjava/org/xml/sax/package.html 2002-12-20 03:49:19.000000000 +0000 *************** *** 1,6 **** ! --- 1,6 ---- ! diff -Nrc3pad gcc-3.3.3/libjava/posix-threads.cc gcc-3.4.0/libjava/posix-threads.cc *** gcc-3.3.3/libjava/posix-threads.cc 2003-03-02 01:26:20.000000000 +0000 --- gcc-3.4.0/libjava/posix-threads.cc 2003-10-21 04:46:19.000000000 +0000 *************** _Jv_CondWait (_Jv_ConditionVariable_t *c *** 193,199 **** int _Jv_CondNotify (_Jv_ConditionVariable_t *cv, _Jv_Mutex_t *mu) { ! if (_Jv_PthreadCheckMonitor (mu)) return _JV_NOT_OWNER; _Jv_Thread_t *target; --- 193,199 ---- int _Jv_CondNotify (_Jv_ConditionVariable_t *cv, _Jv_Mutex_t *mu) { ! if (_Jv_MutexCheckMonitor (mu)) return _JV_NOT_OWNER; _Jv_Thread_t *target; *************** _Jv_CondNotify (_Jv_ConditionVariable_t *** 232,238 **** int _Jv_CondNotifyAll (_Jv_ConditionVariable_t *cv, _Jv_Mutex_t *mu) { ! if (_Jv_PthreadCheckMonitor (mu)) return _JV_NOT_OWNER; _Jv_Thread_t *target; --- 232,238 ---- int _Jv_CondNotifyAll (_Jv_ConditionVariable_t *cv, _Jv_Mutex_t *mu) { ! if (_Jv_MutexCheckMonitor (mu)) return _JV_NOT_OWNER; _Jv_Thread_t *target; diff -Nrc3pad gcc-3.3.3/libjava/prims.cc gcc-3.4.0/libjava/prims.cc *** gcc-3.3.3/libjava/prims.cc 2003-10-24 15:26:33.000000000 +0000 --- gcc-3.4.0/libjava/prims.cc 2004-01-14 22:49:58.000000000 +0000 *************** *** 1,6 **** // prims.cc - Code for core of runtime environment. ! /* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation This file is part of libgcj. --- 1,6 ---- // prims.cc - Code for core of runtime environment. ! /* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation This file is part of libgcj. *************** details. */ *** 70,77 **** // around for use if we run out of memory. static java::lang::OutOfMemoryError *no_memory; ! // Largest representable size_t. ! #define SIZE_T_MAX ((size_t) (~ (size_t) 0)) static const char *no_properties[] = { NULL }; --- 70,79 ---- // around for use if we run out of memory. static java::lang::OutOfMemoryError *no_memory; ! // Number of bytes in largest array object we create. This could be ! // increased to the largest size_t value, so long as the appropriate ! // functions are changed to take a size_t argument instead of jint. ! #define MAX_OBJECT_SIZE ((1<<31) - 1) static const char *no_properties[] = { NULL }; *************** unblock_signal (int signum) *** 136,186 **** #endif } - extern "C" void _Jv_ThrowSignal (jthrowable) __attribute ((noreturn)); - - // Just like _Jv_Throw, but fill in the stack trace first. Although - // this is declared extern in order that its name not be mangled, it - // is not intended to be used outside this file. - void - _Jv_ThrowSignal (jthrowable throwable) - { - throwable->fillInStackTrace (); - throw throwable; - } - #ifdef HANDLE_SEGV - static java::lang::NullPointerException *nullp; - SIGNAL_HANDLER (catch_segv) { unblock_signal (SIGSEGV); MAKE_THROW_FRAME (nullp); ! _Jv_ThrowSignal (nullp); } #endif - static java::lang::ArithmeticException *arithexception; - #ifdef HANDLE_FPE SIGNAL_HANDLER (catch_fpe) { unblock_signal (SIGFPE); #ifdef HANDLE_DIVIDE_OVERFLOW HANDLE_DIVIDE_OVERFLOW; #else MAKE_THROW_FRAME (arithexception); #endif ! _Jv_ThrowSignal (arithexception); } #endif jboolean ! _Jv_equalUtf8Consts (Utf8Const* a, Utf8Const *b) { int len; ! _Jv_ushort *aptr, *bptr; if (a == b) return true; if (a->hash != b->hash) --- 138,176 ---- #endif } #ifdef HANDLE_SEGV SIGNAL_HANDLER (catch_segv) { + java::lang::NullPointerException *nullp + = new java::lang::NullPointerException; unblock_signal (SIGSEGV); MAKE_THROW_FRAME (nullp); ! throw nullp; } #endif #ifdef HANDLE_FPE SIGNAL_HANDLER (catch_fpe) { + java::lang::ArithmeticException *arithexception + = new java::lang::ArithmeticException (JvNewStringLatin1 ("/ by zero")); unblock_signal (SIGFPE); #ifdef HANDLE_DIVIDE_OVERFLOW HANDLE_DIVIDE_OVERFLOW; #else MAKE_THROW_FRAME (arithexception); #endif ! throw arithexception; } #endif jboolean ! _Jv_equalUtf8Consts (const Utf8Const* a, const Utf8Const *b) { int len; ! const _Jv_ushort *aptr, *bptr; if (a == b) return true; if (a->hash != b->hash) *************** _Jv_equalUtf8Consts (Utf8Const* a, Utf8C *** 188,195 **** len = a->length; if (b->length != len) return false; ! aptr = (_Jv_ushort *)a->data; ! bptr = (_Jv_ushort *)b->data; len = (len + 1) >> 1; while (--len >= 0) if (*aptr++ != *bptr++) --- 178,185 ---- len = a->length; if (b->length != len) return false; ! aptr = (const _Jv_ushort *)a->data; ! bptr = (const _Jv_ushort *)b->data; len = (len + 1) >> 1; while (--len >= 0) if (*aptr++ != *bptr++) *************** _Jv_NewObjectArray (jsize count, jclass *** 493,498 **** --- 483,493 ---- // Ensure that elements pointer is properly aligned. jobjectArray obj = NULL; size_t size = (size_t) elements (obj); + // Check for overflow. + if (__builtin_expect ((size_t) count > + (MAX_OBJECT_SIZE - 1 - size) / sizeof (jobject), false)) + throw no_memory; + size += count * sizeof (jobject); jclass klass = _Jv_GetArrayClass (elementClass, *************** _Jv_NewPrimArray (jclass eltype, jint co *** 528,534 **** // Check for overflow. if (__builtin_expect ((size_t) count > ! (SIZE_T_MAX - size) / elsize, false)) throw no_memory; jclass klass = _Jv_GetArrayClass (eltype, 0); --- 523,529 ---- // Check for overflow. if (__builtin_expect ((size_t) count > ! (MAX_OBJECT_SIZE - size) / elsize, false)) throw no_memory; jclass klass = _Jv_GetArrayClass (eltype, 0); *************** _Jv_NewMultiArray (jclass array_type, ji *** 629,643 **** _Jv_ArrayVTable _Jv_##NAME##VTable; \ java::lang::Class _Jv_##NAME##Class __attribute__ ((aligned (8))); ! DECLARE_PRIM_TYPE(byte); ! DECLARE_PRIM_TYPE(short); ! DECLARE_PRIM_TYPE(int); ! DECLARE_PRIM_TYPE(long); ! DECLARE_PRIM_TYPE(boolean); ! DECLARE_PRIM_TYPE(char); ! DECLARE_PRIM_TYPE(float); ! DECLARE_PRIM_TYPE(double); ! DECLARE_PRIM_TYPE(void); void _Jv_InitPrimClass (jclass cl, char *cname, char sig, int len, --- 624,638 ---- _Jv_ArrayVTable _Jv_##NAME##VTable; \ java::lang::Class _Jv_##NAME##Class __attribute__ ((aligned (8))); ! DECLARE_PRIM_TYPE(byte) ! DECLARE_PRIM_TYPE(short) ! DECLARE_PRIM_TYPE(int) ! DECLARE_PRIM_TYPE(long) ! DECLARE_PRIM_TYPE(boolean) ! DECLARE_PRIM_TYPE(char) ! DECLARE_PRIM_TYPE(float) ! DECLARE_PRIM_TYPE(double) ! DECLARE_PRIM_TYPE(void) void _Jv_InitPrimClass (jclass cl, char *cname, char sig, int len, *************** _Jv_InitPrimClass (jclass cl, char *cnam *** 645,652 **** { using namespace java::lang::reflect; - _Jv_InitNewClassFields (cl); - // We must set the vtable for the class; the Java constructor // doesn't do this. (*(_Jv_VTable **) cl) = java::lang::Class::class$.vtable; --- 640,645 ---- *************** _Jv_CreateJavaVM (void* /*vm_args*/) *** 934,951 **** _Jv_InitClass (&java::lang::VMThrowable::class$); java::lang::VMThrowable::trace_enabled = 0; INIT_SEGV; #ifdef HANDLE_FPE INIT_FPE; - #else - arithexception = new java::lang::ArithmeticException - (JvNewStringLatin1 ("/ by zero")); #endif no_memory = new java::lang::OutOfMemoryError; ! java::lang::VMThrowable::trace_enabled = 1; ! #ifdef USE_LTDL LTDL_SET_PRELOADED_SYMBOLS (); #endif --- 927,950 ---- _Jv_InitClass (&java::lang::VMThrowable::class$); java::lang::VMThrowable::trace_enabled = 0; + // We have to initialize this fairly early, to avoid circular class + // initialization. In particular we want to start the + // initialization of ClassLoader before we start the initialization + // of VMClassLoader. + _Jv_InitClass (&java::lang::ClassLoader::class$); + // Once the bootstrap loader is in place, change it into a kind of + // system loader, by having it read the class path. + gnu::gcj::runtime::VMClassLoader::initialize(); + INIT_SEGV; #ifdef HANDLE_FPE INIT_FPE; #endif no_memory = new java::lang::OutOfMemoryError; ! java::lang::VMThrowable::trace_enabled = 1; ! #ifdef USE_LTDL LTDL_SET_PRELOADED_SYMBOLS (); #endif *************** jint *** 1109,1115 **** _Jv_divI (jint dividend, jint divisor) { if (__builtin_expect (divisor == 0, false)) ! _Jv_ThrowSignal (arithexception); if (dividend == (jint) 0x80000000L && divisor == -1) return dividend; --- 1108,1118 ---- _Jv_divI (jint dividend, jint divisor) { if (__builtin_expect (divisor == 0, false)) ! { ! java::lang::ArithmeticException *arithexception ! = new java::lang::ArithmeticException (JvNewStringLatin1 ("/ by zero")); ! throw arithexception; ! } if (dividend == (jint) 0x80000000L && divisor == -1) return dividend; *************** jint *** 1121,1131 **** _Jv_remI (jint dividend, jint divisor) { if (__builtin_expect (divisor == 0, false)) ! _Jv_ThrowSignal (arithexception); if (dividend == (jint) 0x80000000L && divisor == -1) return 0; ! return dividend % divisor; } --- 1124,1138 ---- _Jv_remI (jint dividend, jint divisor) { if (__builtin_expect (divisor == 0, false)) ! { ! java::lang::ArithmeticException *arithexception ! = new java::lang::ArithmeticException (JvNewStringLatin1 ("/ by zero")); ! throw arithexception; ! } if (dividend == (jint) 0x80000000L && divisor == -1) return 0; ! return dividend % divisor; } *************** jlong *** 1133,1140 **** _Jv_divJ (jlong dividend, jlong divisor) { if (__builtin_expect (divisor == 0, false)) ! _Jv_ThrowSignal (arithexception); ! if (dividend == (jlong) 0x8000000000000000LL && divisor == -1) return dividend; --- 1140,1151 ---- _Jv_divJ (jlong dividend, jlong divisor) { if (__builtin_expect (divisor == 0, false)) ! { ! java::lang::ArithmeticException *arithexception ! = new java::lang::ArithmeticException (JvNewStringLatin1 ("/ by zero")); ! throw arithexception; ! } ! if (dividend == (jlong) 0x8000000000000000LL && divisor == -1) return dividend; *************** jlong *** 1145,1154 **** _Jv_remJ (jlong dividend, jlong divisor) { if (__builtin_expect (divisor == 0, false)) ! _Jv_ThrowSignal (arithexception); ! if (dividend == (jlong) 0x8000000000000000LL && divisor == -1) return 0; return dividend % divisor; } --- 1156,1187 ---- _Jv_remJ (jlong dividend, jlong divisor) { if (__builtin_expect (divisor == 0, false)) ! { ! java::lang::ArithmeticException *arithexception ! = new java::lang::ArithmeticException (JvNewStringLatin1 ("/ by zero")); ! throw arithexception; ! } ! if (dividend == (jlong) 0x8000000000000000LL && divisor == -1) return 0; return dividend % divisor; } + + + + // Return true if SELF_KLASS can access a field or method in + // OTHER_KLASS. The field or method's access flags are specified in + // FLAGS. + jboolean + _Jv_CheckAccess (jclass self_klass, jclass other_klass, jint flags) + { + using namespace java::lang::reflect; + return ((self_klass == other_klass) + || ((flags & Modifier::PUBLIC) != 0) + || (((flags & Modifier::PROTECTED) != 0) + && other_klass->isAssignableFrom (self_klass)) + || (((flags & Modifier::PRIVATE) == 0) + && _Jv_ClassNameSamePackage (self_klass->name, + other_klass->name))); + } diff -Nrc3pad gcc-3.3.3/libjava/resolve.cc gcc-3.4.0/libjava/resolve.cc *** gcc-3.3.3/libjava/resolve.cc 2003-02-03 21:04:50.000000000 +0000 --- gcc-3.4.0/libjava/resolve.cc 2003-10-24 09:29:41.000000000 +0000 *************** *** 1,6 **** // resolve.cc - Code for linking and resolving classes and pool entries. ! /* Copyright (C) 1999, 2000, 2001 , 2002, 2003 Free Software Foundation This file is part of libgcj. --- 1,6 ---- // resolve.cc - Code for linking and resolving classes and pool entries. ! /* Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation This file is part of libgcj. *************** details. */ *** 11,16 **** --- 11,17 ---- /* Author: Kresten Krab Thorup */ #include + #include #include *************** details. */ *** 31,36 **** --- 32,38 ---- #include #include #include + #include #include using namespace gcj; *************** _Jv_ResolvePoolEntry (jclass klass, int *** 165,179 **** if (! _Jv_equalUtf8Consts (field->name, field_name)) continue; ! // now, check field access. ! ! if ( (cls == klass) ! || ((field->flags & Modifier::PUBLIC) != 0) ! || (((field->flags & Modifier::PROTECTED) != 0) ! && cls->isAssignableFrom (klass)) ! || (((field->flags & Modifier::PRIVATE) == 0) ! && _Jv_ClassNameSamePackage (cls->name, ! klass->name))) { /* resove the field using the class' own loader if necessary */ --- 167,173 ---- if (! _Jv_equalUtf8Consts (field->name, field_name)) continue; ! if (_Jv_CheckAccess (klass, cls, field->flags)) { /* resove the field using the class' own loader if necessary */ *************** _Jv_SearchMethodInClass (jclass cls, jcl *** 346,365 **** method_signature))) continue; ! if (cls == klass ! || ((method->accflags & Modifier::PUBLIC) != 0) ! || (((method->accflags & Modifier::PROTECTED) != 0) ! && cls->isAssignableFrom (klass)) ! || (((method->accflags & Modifier::PRIVATE) == 0) ! && _Jv_ClassNameSamePackage (cls->name, ! klass->name))) ! { ! return method; ! } else ! { ! throw new java::lang::IllegalAccessError; ! } } return 0; } --- 340,349 ---- method_signature))) continue; ! if (_Jv_CheckAccess (klass, cls, method->accflags)) ! return method; else ! throw new java::lang::IllegalAccessError; } return 0; } *************** _Jv_PrepareClass(jclass klass) *** 452,473 **** // resolved. if (klass->superclass) ! java::lang::ClassLoader::resolveClass0 (klass->superclass); _Jv_InterpClass *clz = (_Jv_InterpClass*)klass; /************ PART ONE: OBJECT LAYOUT ***************/ int instance_size; ! int static_size; // Although java.lang.Object is never interpreted, an interface can ! // have a null superclass. if (clz->superclass) instance_size = clz->superclass->size(); else instance_size = java::lang::Object::class$.size(); - static_size = 0; for (int i = 0; i < clz->field_count; i++) { --- 436,477 ---- // resolved. if (klass->superclass) ! java::lang::VMClassLoader::resolveClass (klass->superclass); _Jv_InterpClass *clz = (_Jv_InterpClass*)klass; /************ PART ONE: OBJECT LAYOUT ***************/ + // Compute the alignment for this type by searching through the + // superclasses and finding the maximum required alignment. We + // could consider caching this in the Class. + int max_align = __alignof__ (java::lang::Object); + jclass super = clz->superclass; + while (super != NULL) + { + int num = JvNumInstanceFields (super); + _Jv_Field *field = JvGetFirstInstanceField (super); + while (num > 0) + { + int field_align = get_alignment_from_class (field->type); + if (field_align > max_align) + max_align = field_align; + ++field; + --num; + } + super = super->superclass; + } + int instance_size; ! int static_size = 0; // Although java.lang.Object is never interpreted, an interface can ! // have a null superclass. Note that we have to lay out an ! // interface because it might have static fields. if (clz->superclass) instance_size = clz->superclass->size(); else instance_size = java::lang::Object::class$.size(); for (int i = 0; i < clz->field_count; i++) { *************** _Jv_PrepareClass(jclass klass) *** 509,518 **** instance_size = ROUND (instance_size, field_align); field->u.boffset = instance_size; instance_size += field_size; } } ! // set the instance size for the class clz->size_in_bytes = instance_size; // allocate static memory --- 513,527 ---- instance_size = ROUND (instance_size, field_align); field->u.boffset = instance_size; instance_size += field_size; + if (field_align > max_align) + max_align = field_align; } } ! // Set the instance size for the class. Note that first we round it ! // to the alignment required for this object; this keeps us in sync ! // with our current ABI. ! instance_size = ROUND (instance_size, max_align); clz->size_in_bytes = instance_size; // allocate static memory *************** _Jv_PrepareClass(jclass klass) *** 566,571 **** --- 575,590 ---- _Jv_InterpMethod *im = reinterpret_cast<_Jv_InterpMethod *> (imeth); _Jv_VerifyMethod (im); clz->methods[i].ncode = im->ncode (); + + // Resolve ctable entries pointing to this method. See + // _Jv_Defer_Resolution. + void **code = (void **)imeth->deferred; + while (code) + { + void **target = (void **)*code; + *code = clz->methods[i].ncode; + code = target; + } } } *************** _Jv_InitField (jobject obj, jclass klass *** 705,731 **** } } static int get_alignment_from_class (jclass klass) { if (klass == JvPrimClass (byte)) ! return __alignof__ (jbyte); else if (klass == JvPrimClass (short)) ! return __alignof__ (jshort); else if (klass == JvPrimClass (int)) ! return __alignof__ (jint); else if (klass == JvPrimClass (long)) ! return __alignof__ (jlong); else if (klass == JvPrimClass (boolean)) ! return __alignof__ (jboolean); else if (klass == JvPrimClass (char)) ! return __alignof__ (jchar); else if (klass == JvPrimClass (float)) ! return __alignof__ (jfloat); else if (klass == JvPrimClass (double)) ! return __alignof__ (jdouble); else ! return __alignof__ (jobject); } --- 724,762 ---- } } + template + struct aligner + { + T field; + }; + + #define ALIGNOF(TYPE) (__alignof__ (((aligner *) 0)->field)) + + // This returns the alignment of a type as it would appear in a + // structure. This can be different from the alignment of the type + // itself. For instance on x86 double is 8-aligned but struct{double} + // is 4-aligned. static int get_alignment_from_class (jclass klass) { if (klass == JvPrimClass (byte)) ! return ALIGNOF (jbyte); else if (klass == JvPrimClass (short)) ! return ALIGNOF (jshort); else if (klass == JvPrimClass (int)) ! return ALIGNOF (jint); else if (klass == JvPrimClass (long)) ! return ALIGNOF (jlong); else if (klass == JvPrimClass (boolean)) ! return ALIGNOF (jboolean); else if (klass == JvPrimClass (char)) ! return ALIGNOF (jchar); else if (klass == JvPrimClass (float)) ! return ALIGNOF (jfloat); else if (klass == JvPrimClass (double)) ! return ALIGNOF (jdouble); else ! return ALIGNOF (jobject); } *************** _Jv_InterpMethod::ncode () *** 947,953 **** } else { ! fun = (ffi_closure_fun)&_Jv_InterpMethod::run_normal; } FFI_PREP_RAW_CLOSURE (&closure->closure, --- 978,987 ---- } else { ! if (staticp) ! fun = (ffi_closure_fun)&_Jv_InterpMethod::run_class; ! else ! fun = (ffi_closure_fun)&_Jv_InterpMethod::run_normal; } FFI_PREP_RAW_CLOSURE (&closure->closure, *************** _Jv_InterpMethod::ncode () *** 959,965 **** return self->ncode; } - void * _Jv_JNIMethod::ncode () { --- 993,998 ---- *************** _Jv_JNIMethod::ncode () *** 1001,1014 **** memcpy (&jni_arg_types[offset], &closure->arg_types[0], arg_count * sizeof (ffi_type *)); ! // NOTE: This must agree with the JNICALL definition in jni.h ! #ifdef WIN32 ! #define FFI_JNI_ABI FFI_STDCALL ! #else ! #define FFI_JNI_ABI FFI_DEFAULT_ABI ! #endif ! ! if (ffi_prep_cif (&jni_cif, FFI_JNI_ABI, extra_args + arg_count, rtype, jni_arg_types) != FFI_OK) throw_internal_error ("ffi_prep_cif failed for JNI function"); --- 1034,1040 ---- memcpy (&jni_arg_types[offset], &closure->arg_types[0], arg_count * sizeof (ffi_type *)); ! if (ffi_prep_cif (&jni_cif, _Jv_platform_ffi_abi, extra_args + arg_count, rtype, jni_arg_types) != FFI_OK) throw_internal_error ("ffi_prep_cif failed for JNI function"); diff -Nrc3pad gcc-3.3.3/libjava/scripts/classes.pl gcc-3.4.0/libjava/scripts/classes.pl *** gcc-3.3.3/libjava/scripts/classes.pl 2000-12-11 21:50:39.000000000 +0000 --- gcc-3.4.0/libjava/scripts/classes.pl 2002-12-30 22:42:20.000000000 +0000 *************** *** 1,7 **** # classes.pl - A perl program to generate most of the contents of # javaprims.h automatically. ! # Copyright (C) 1998, 1999, 2000 Red Hat, Inc. # # This file is part of libjava. # --- 1,7 ---- # classes.pl - A perl program to generate most of the contents of # javaprims.h automatically. ! # Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc. # # This file is part of libjava. # *************** sub scan *** 119,123 **** &scan ("$dir/$_", $indent + 2); } ! print $spaces, "};\n"; } --- 119,123 ---- &scan ("$dir/$_", $indent + 2); } ! print $spaces, "}\n"; } diff -Nrc3pad gcc-3.3.3/libjava/scripts/MakeDefaultMimeTypes.java gcc-3.4.0/libjava/scripts/MakeDefaultMimeTypes.java *** gcc-3.3.3/libjava/scripts/MakeDefaultMimeTypes.java 2000-03-07 19:55:28.000000000 +0000 --- gcc-3.4.0/libjava/scripts/MakeDefaultMimeTypes.java 2004-01-08 05:20:31.000000000 +0000 *************** *** 1,4 **** ! /* Copyright (C) 2000 Free Software Foundation This file is part of libgcj. --- 1,4 ---- ! /* Copyright (C) 2000, 2003 Free Software Foundation This file is part of libgcj. *************** public class MakeDefaultMimeTypes *** 36,56 **** fatal ("error reading " + args[0]); } ! System.out.println ("// Do not edit this file! Create a new version with MakeDefaultMimeTypes.\ ! \ ! /* Copyright (C) 2000 Free Software Foundation\ ! \ ! This file is part of libgcj.\ ! \ ! This software is copyrighted work licensed under the terms of the\ ! Libgcj License. Please consult the file \"LIBGCJ_LICENSE\" for\ ! details. */\ ! \ ! package gnu.gcj.io; \ ! \ ! public class DefaultMimeTypes\ ! {\ ! public static final String[] types = {"); Enumeration keys = mime_table.keys(); Enumeration values = mime_table.elements(); --- 36,42 ---- fatal ("error reading " + args[0]); } ! System.out.println ("// Do not edit this file! Create a new version with MakeDefaultMimeTypes.\n\n/* Copyright (C) 2000 Free Software Foundation\n\n This file is part of libgcj.\n\nThis software is copyrighted work licensed under the terms of the\nLibgcj License. Please consult the file \"LIBGCJ_LICENSE\" for\ndetails. */\n\npackage gnu.gcj.io; \n\npublic class DefaultMimeTypes\n{\n public static final String[] types = {"); Enumeration keys = mime_table.keys(); Enumeration values = mime_table.elements(); *************** public class DefaultMimeTypes\ *** 85,93 **** } // Append last element with closing bracket ! result.append(" };\ ! }\ ! "); System.out.println(result); } } --- 71,77 ---- } // Append last element with closing bracket ! result.append(" };\n}\n"); System.out.println(result); } } diff -Nrc3pad gcc-3.3.3/libjava/sysdep/dwarf2-backtrace.cc gcc-3.4.0/libjava/sysdep/dwarf2-backtrace.cc *** gcc-3.3.3/libjava/sysdep/dwarf2-backtrace.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/sysdep/dwarf2-backtrace.cc 2003-10-22 16:35:16.000000000 +0000 *************** *** 0 **** --- 1,86 ---- + /* dwarf2-backtrac.cc - backtrace implementation driven by the dwarf2 + exception unwinder. */ + + /* Copyright (C) 2003 Free Software Foundation + + This file is part of libgcj. + + This software is copyrighted work licensed under the terms of the + Libgcj License. Please consult the file "LIBGCJ_LICENSE" for + details. */ + + /* Written by David Daney */ + + /* + Although this in theory could be 'C' instead of C++, saying that it + is C++ and including jvm.h makes it easier to insure that the proper + compiler options are used. There must be unwind tables for + backtrace because it is on the stack when _Unwind_Backtrace is + called. Compiling as C++ insures this. + + */ + + #include + + #include + + #include + + + extern "C" + { + int backtrace (void **, int); + } + + struct backtrace_state + { + int skip_count; + int current_level; + int max_level; + void **locations; + }; + + static _Unwind_Reason_Code + my_trace_fn (struct _Unwind_Context *uc, void *arg) + { + + struct backtrace_state *bs = (struct backtrace_state *) arg; + + if (bs->skip_count) + { + bs->skip_count--; + return _URC_NO_REASON; + } + + _Unwind_Ptr loc = _Unwind_GetIP (uc); + + if (bs->current_level < bs->max_level) + bs->locations[bs->current_level++] = (void *) loc; + + if (bs->current_level >= bs->max_level) + return _URC_END_OF_STACK; + else + return _URC_NO_REASON; + } + + /* + * backtrace is defined in (some versions of) libc. This definition + * must match so that it can replace the libc version at link time. + * + * Fill the locations array with at most len back trace locations. + * + * Returns the number of locations actually filled in. + * + */ + int + backtrace (void **locations, int len) + { + struct backtrace_state bs; + bs.skip_count = 1; /* Don't log the call to backtrace itself. */ + bs.current_level = 0; + bs.max_level = len; + bs.locations = locations; + + _Unwind_Backtrace (my_trace_fn, &bs); + return bs.current_level; + } diff -Nrc3pad gcc-3.3.3/libjava/sysdep/i386/locks.h gcc-3.4.0/libjava/sysdep/i386/locks.h *** gcc-3.3.3/libjava/sysdep/i386/locks.h 2002-03-21 00:26:46.000000000 +0000 --- gcc-3.4.0/libjava/sysdep/i386/locks.h 2004-01-16 17:25:25.000000000 +0000 *************** compare_and_swap(volatile obj_addr_t *ad *** 25,32 **** { char result; __asm__ __volatile__("lock; cmpxchgl %2, %0; setz %1" ! : "+m"(*(addr)), "=q"(result) ! : "r" (new_val), "a"(old) : "memory"); return (bool) result; } --- 25,32 ---- { char result; __asm__ __volatile__("lock; cmpxchgl %2, %0; setz %1" ! : "=m"(*addr), "=q"(result) ! : "r" (new_val), "a"(old), "m"(*addr) : "memory"); return (bool) result; } diff -Nrc3pad gcc-3.3.3/libjava/sysdep/ia64/locks.h gcc-3.4.0/libjava/sysdep/ia64/locks.h *** gcc-3.3.3/libjava/sysdep/ia64/locks.h 2002-03-10 03:31:07.000000000 +0000 --- gcc-3.4.0/libjava/sysdep/ia64/locks.h 2003-03-23 01:38:00.000000000 +0000 *************** details. */ *** 11,16 **** --- 11,18 ---- #ifndef __SYSDEP_LOCKS_H__ #define __SYSDEP_LOCKS_H__ + #include + typedef size_t obj_addr_t; /* Integer type big enough for object */ /* address. */ *************** compare_and_swap(volatile obj_addr_t *ad *** 19,29 **** obj_addr_t old, obj_addr_t new_val) { ! unsigned long oldval; ! __asm__ __volatile__("mov ar.ccv=%4 ;; cmpxchg8.acq %0=%1,%2,ar.ccv" ! : "=r"(oldval), "=m"(*addr) ! : "r"(new_val), "1"(*addr), "r"(old) : "memory"); ! return (oldval == old); } // The fact that *addr is volatile should cause the compiler to --- 21,27 ---- obj_addr_t old, obj_addr_t new_val) { ! return __sync_bool_compare_and_swap (addr, old, new_val); } // The fact that *addr is volatile should cause the compiler to *************** compare_and_swap(volatile obj_addr_t *ad *** 31,37 **** inline static void release_set(volatile obj_addr_t *addr, obj_addr_t new_val) { ! __asm__ __volatile__(" " : : : "memory"); *(addr) = new_val; } --- 29,35 ---- inline static void release_set(volatile obj_addr_t *addr, obj_addr_t new_val) { ! __asm__ __volatile__("" : : : "memory"); *(addr) = new_val; } *************** compare_and_swap_release(volatile obj_ad *** 40,50 **** obj_addr_t old, obj_addr_t new_val) { ! unsigned long oldval; ! __asm__ __volatile__("mov ar.ccv=%4 ;; cmpxchg8.rel %0=%1,%2,ar.ccv" ! : "=r"(oldval), "=m"(*addr) ! : "r"(new_val), "1"(*addr), "r"(old) : "memory"); ! return (oldval == old); } #endif --- 38,49 ---- obj_addr_t old, obj_addr_t new_val) { ! register unsigned long ar_ccv __asm__("ar.ccv") = old; ! unsigned long out; ! __asm__ __volatile__("cmpxchg8.rel %0=%1,%2,%4" ! : "=r"(out), "=m"(*addr) ! : "r"(new_val), "m"(*addr), "d"(ar_ccv) : "memory"); ! return (out == old); } #endif diff -Nrc3pad gcc-3.3.3/libjava/sysdep/mips/locks.h gcc-3.4.0/libjava/sysdep/mips/locks.h *** gcc-3.3.3/libjava/sysdep/mips/locks.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/sysdep/mips/locks.h 2003-10-22 16:35:17.000000000 +0000 *************** *** 0 **** --- 1,109 ---- + // locks.h - Thread synchronization primitives. MIPS implementation. + + /* Copyright (C) 2003 Free Software Foundation + + This file is part of libgcj. + + This software is copyrighted work licensed under the terms of the + Libgcj License. Please consult the file "LIBGCJ_LICENSE" for + details. */ + + #ifndef __SYSDEP_LOCKS_H__ + #define __SYSDEP_LOCKS_H__ + + /* Integer type big enough for object address. */ + typedef unsigned obj_addr_t __attribute__((__mode__(__pointer__))); + + + // Atomically replace *addr by new_val if it was initially equal to old. + // Return true if the comparison succeeded. + // Assumed to have acquire semantics, i.e. later memory operations + // cannot execute before the compare_and_swap finishes. + inline static bool + compare_and_swap(volatile obj_addr_t *addr, + obj_addr_t old, + obj_addr_t new_val) + { + long result; + __asm__ __volatile__(".set\tpush\n\t" + ".set\tnoreorder\n\t" + ".set\tnomacro\n\t" + "1:\n\t" + #if _MIPS_SIM == _ABIO32 + ".set\tmips2\n\t" + #endif + "ll\t%[result],0(%[addr])\n\t" + "bne\t%[result],%[old],2f\n\t" + "move\t%[result],$0\n\t" // delay slot + "move\t%[result],%[new_val]\n\t" + "sc\t%[result],0(%[addr])\n\t" + "beq\t%[result],$0,1b\n\t" + "nop\n\t" // delay slot + "2:\n\t" + ".set\tpop" + : [result] "=&r" (result) + : [addr] "r" (addr), [new_val] "r" (new_val), [old] "r"(old) + : "memory"); + return (bool) result; + } + + // Set *addr to new_val with release semantics, i.e. making sure + // that prior loads and stores complete before this + // assignment. + inline static void + release_set(volatile obj_addr_t *addr, obj_addr_t new_val) + { + __asm__ __volatile__(".set\tpush\n\t" + #if _MIPS_SIM == _ABIO32 + ".set\tmips2\n\t" + #endif + "sync\n\t" + ".set\tpop" : : : "memory"); + *(addr) = new_val; + } + + // Compare_and_swap with release semantics instead of acquire semantics. + // On many architecture, the operation makes both guarantees, so the + // implementation can be the same. + inline static bool + compare_and_swap_release(volatile obj_addr_t *addr, + obj_addr_t old, + obj_addr_t new_val) + { + __asm__ __volatile__(".set\tpush\n\t" + #if _MIPS_SIM == _ABIO32 + ".set\tmips2\n\t" + #endif + "sync\n\t" + ".set\tpop" : : : "memory"); + return compare_and_swap(addr, old, new_val); + } + + // Ensure that subsequent instructions do not execute on stale + // data that was loaded from memory before the barrier. + // On X86, the hardware ensures that reads are properly ordered. + inline static void + read_barrier() + { + __asm__ __volatile__(".set\tpush\n\t" + #if _MIPS_SIM == _ABIO32 + ".set\tmips2\n\t" + #endif + "sync\n\t" + ".set\tpop" : : : "memory"); + } + + // Ensure that prior stores to memory are completed with respect to other + // processors. + inline static void + write_barrier() + { + __asm__ __volatile__(".set\tpush\n\t" + #if _MIPS_SIM == _ABIO32 + ".set\tmips2\n\t" + #endif + "sync\n\t" + ".set\tpop" : : : "memory"); + } + + #endif // __SYSDEP_LOCKS_H__ diff -Nrc3pad gcc-3.3.3/libjava/sysdep/sparc/locks.h gcc-3.4.0/libjava/sysdep/sparc/locks.h *** gcc-3.3.3/libjava/sysdep/sparc/locks.h 2002-04-21 09:37:49.000000000 +0000 --- gcc-3.4.0/libjava/sysdep/sparc/locks.h 2003-10-28 14:19:23.000000000 +0000 *************** __cas_start_atomic(void) *** 54,64 **** unsigned int tmp; __asm__ __volatile__( "1: ldstub [%1], %0\n" ! " orcc %0, 0x0, %g0\n" " be 3f\n" " nop\n" "2: ldub [%1], %0\n" ! " orcc %0, 0x0, %g0\n" " bne 2b\n" " nop\n" "3:" : "=&r" (tmp) --- 54,64 ---- unsigned int tmp; __asm__ __volatile__( "1: ldstub [%1], %0\n" ! " orcc %0, 0x0, %%g0\n" " be 3f\n" " nop\n" "2: ldub [%1], %0\n" ! " orcc %0, 0x0, %%g0\n" " bne 2b\n" " nop\n" "3:" : "=&r" (tmp) diff -Nrc3pad gcc-3.3.3/libjava/sysdep/x86-64/locks.h gcc-3.4.0/libjava/sysdep/x86-64/locks.h *** gcc-3.3.3/libjava/sysdep/x86-64/locks.h 2002-10-01 09:02:08.000000000 +0000 --- gcc-3.4.0/libjava/sysdep/x86-64/locks.h 2004-01-16 17:25:26.000000000 +0000 *************** compare_and_swap(volatile obj_addr_t *ad *** 26,38 **** char result; #ifdef __x86_64__ __asm__ __volatile__("lock; cmpxchgq %2, %0; setz %1" ! : "+m"(*(addr)), "=q"(result) ! : "r" (new_val), "a"(old) : "memory"); #else __asm__ __volatile__("lock; cmpxchgl %2, %0; setz %1" ! : "+m"(*(addr)), "=q"(result) ! : "r" (new_val), "a"(old) : "memory"); #endif return (bool) result; --- 26,38 ---- char result; #ifdef __x86_64__ __asm__ __volatile__("lock; cmpxchgq %2, %0; setz %1" ! : "=m"(*(addr)), "=q"(result) ! : "r" (new_val), "a"(old), "m"(*addr) : "memory"); #else __asm__ __volatile__("lock; cmpxchgl %2, %0; setz %1" ! : "=m"(*(addr)), "=q"(result) ! : "r" (new_val), "a"(old), "m"(*addr) : "memory"); #endif return (bool) result; diff -Nrc3pad gcc-3.3.3/libjava/testsuite/ChangeLog gcc-3.4.0/libjava/testsuite/ChangeLog *** gcc-3.3.3/libjava/testsuite/ChangeLog 2004-02-14 20:20:19.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/ChangeLog 2004-04-19 01:59:55.000000000 +0000 *************** *** 1,52 **** ! 2004-02-14 Release Manager ! * GCC 3.3.3 Released. ! 2003-10-16 Release Manager ! * GCC 3.3.2 Released. ! 2003-08-04 Release Manager ! * GCC 3.3.1 Released. ! 2003-08-04 Release Manager ! * GCC 3.3.1 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. 2003-05-06 Tom Tromey * libjava.lang/verify.java: New file. * libjava.lang/verify.out: New file. ! 2003-05-02 Tom Tromey PR java/10459: * libjava.compile/pr10459_2.java: New file. * libjava.compile/pr10459.java: New file. ! 2003-05-01 Tom Tromey PR libgcj/10582: * libjava.lang/assign.java: New file. * libjava.lang/assign.out: New file. - 2003-04-16 Tom Tromey - - * libjava.mauve/xfails: Added some more failing tests. - 2003-04-16 Mark Mitchell PR middle-end/8866 --- 1,237 ---- ! 2004-04-18 Release Manager ! * GCC 3.4.0 released. ! 2004-01-12 Andreas Tobler ! * lib/libjava.exp: Add LD_LIBRARY_PATH_32/64 to get proper ! path setting for Ssolaris 32/64-bit testing. ! Reorganize LD_LIBRARY_PATH setting. ! 2004-01-09 Andrew Haley ! * lib/libjava.exp (bytecompile_file): Log compile command. ! 2004-01-07 Andreas Tobler ! PR libgcj/13011: ! * libjava.jar/simple.jar: Add a working MANIFEST.MF. ! 2003-12-03 Ralph Loader ! PR java/12374: ! * libjava.compile/PR12374.java: New file. ! 2003-12-01 Jeff Sturm ! PR optimization/13024 ! * libjava.compile/PR13024.java: New file. ! PR java/13237 ! * libjava.compile/PR13237.java: New file. ! 2003-11-18 Andreas Tobler ! ! * libjava.jar/jar.exp: Cleanup files and reset CLASSPATH. ! ! 2003-11-17 Jeff Sturm ! ! * libjava.compile/PR12857.java: New test case. ! ! 2003-11-14 Tom Tromey ! ! * libjava.jar/simple.jar: Replaced. ! ! 2003-11-13 Tom Fitzsimmons ! ! * libjava.jni/jniutf.c: New file. ! * libjava.jni/jniutf.java: New file. ! * libjava.jni/jniutf.out: New file. ! ! 2003-11-11 Tom Tromey ! ! For PR java/12915: ! * libjava.lang/PR12915.java: New file. ! * libjava.lang/PR12915.out: New file. ! ! * libjava.jacks/jacks.exp (gcj_jacks_write): Enable "assert" ! constraint. ! * libjava.jacks/jacks.xfail: Added new xfails. ! ! 2003-11-10 Tom Tromey ! ! For PR java/12996: ! * libjava.jar/simple.jar: New file. ! * libjava.jar/simple.xfail: New file. ! * libjava.jar/simple.out: New file. ! * libjava.jar/simple.java: New file. ! * libjava.jar/jar.exp: New file. ! ! 2003-11-08 Tom Tromey ! ! * libjava.jacks/jacks.xfail: Updated. ! ! 2003-11-03 Jeff Sturm ! ! PR java/12866: ! * libjava.compile/InnerExcept.java: New File. ! ! 2003-10-22 Tom Tromey ! ! PR libgcj/12416: ! * libjava.lang/PR12416.out: New file. ! * libjava.lang/PR12416.java: New file. ! ! PR libgcj/12656: ! * libjava.lang/PR12656.java: New file. ! * libjava.lang/PR12656.out: New file. ! ! 2003-10-21 Tom Tromey ! ! * lib/libjava.exp (find_javac): Use -Wno-unreachable-bytecode. ! ! 2003-10-08 Tom Tromey ! ! * libjava.mauve/xfails: Removed some tests. ! ! 2003-09-27 Tom Tromey ! ! * libjava.jacks/jacks.xfail: Updated for new passes. ! ! 2003-09-21 Ralph Loader ! ! PR java/12350 ! * libjava.lang/PR12350.java: New file. ! * libjava.lang/PR12350.out: New file. ! ! 2003-09-17 Ranjit Mathew ! ! PR java/9577 ! * libjava.cni/PR9577.java: New file. ! * libjava.cni/natPR9577.cc: New file. ! * libjava.cni/PR9577.out: New file. ! ! 2003-09-04 Jeff Sturm ! ! * libjava.compile/compile.exp: Test with -O3 rather than -O. ! * libjava.lang/lang.exp: Likewise. ! ! 2003-09-04 Jeff Sturm ! ! * lib/libjava.exp (libjava_arguments): Remove unneeded variables. ! (test_libjava_from_source): Likewise. ! (test_libjava_from_javac): Likewise. ! ! 2003-08-23 Andreas Tobler ! ! PR libgcj/8823 ! * libjava.lang/pr8823.xfail: Removed. ! ! 2003-08-19 Jeff Sturm ! ! * lib/libjava.exp (libjava_arguments): Add $libjava to the list of ! libraries. ! ! 2003-08-18 Tom Tromey ! ! PR libgcj/11951: ! * libjava.jni/pr11951.c: New file. ! * libjava.jni/pr11951.out: New file. ! * libjava.jni/pr11951.java: New file. ! ! 2003-08-12 Tom Tromey ! ! * libjava.jacks/jacks.xfail: Updated to account for new passes. ! * libjava.compile/abstr.xfail: Now can compile from bytecode. ! * libjava.compile/PR5641.xfail: Now can compile from bytecode. ! ! * libjava.mauve/mauve.exp (test_mauve_sim): Don't find ! DejaGNUTestHarness in gnu/testlet. ! (test_mauve): Use correct object extension. ! ! 2003-08-12 Tom Tromey ! ! * lib/libjava.exp (libjava_find_lib): Search for .so file first. ! (libjava_arguments): Don't add libraries to link line explictly. ! ! 2003-08-05 Tom Tromey ! ! For PR java/11600: ! * libjava.compile/PR11600.xfail: New file. ! * libjava.compile/PR11600.java: New file. ! ! 2003-08-04 Tom Tromey ! ! * libjava.jacks/jacks.exp (gcj_jacks_run): Just ignore errors ! from jacks. ! ! 2003-07-24 Tom Tromey ! ! For PR libgcj/7482: ! * libjava.lang/PR7482.java: New file. ! * libjava.lang/PR7482.out: New file. ! ! 2003-07-20 Tom Tromey ! ! * libjava.mauve/mauve.exp (mauve_find_harness_files): New proc. ! (test_mauve): Use it. ! (test_mauve_sim): Likewise. ! ! 2003-07-19 Tom Tromey ! ! * libjava.verify/verify.exp (gcj_verify_list_tests): Only change ! directory if new directory exists. ! ! 2003-07-13 Tom Tromey ! ! * libjava.verify/verify.exp: Fixed variable init. ! ! 2003-07-10 Tom Tromey ! ! * libjava.verify/verify.exp: New file. ! * libjava.verify/README.verify: New file. ! ! 2003-07-09 Jeff Sturm ! ! * libjava.lang/SyncTest.java (run): Cache .class value. ! ! 2003-06-08 Roger Sayle ! ! * libjava.lang/MathBuiltin.java: New test case. ! * libjava.lang/MathBuiltin.out: New file. ! ! 2003-06-05 Mark Wielaard ! ! * libjava.mauve/mauve.exp (test_mauve): Add -wno-deprecated to GCJ. ! ! PR libgcj/6181: ! * libjava.mauve/xfails: Remove getBeanInfo() failures. ! ! PR libgcj/6293: ! * libjava.mauve/xfails: Remove PipedStream.close() failure. ! ! 2003-05-31 Roger Sayle ! ! * libjava.lang/Overflow.java: New test. ! * libjava.lang/Overflow.out: New file. 2003-05-06 Tom Tromey * libjava.lang/verify.java: New file. * libjava.lang/verify.out: New file. ! 2003-05-01 Tom Tromey PR java/10459: * libjava.compile/pr10459_2.java: New file. * libjava.compile/pr10459.java: New file. ! 2003-04-30 Tom Tromey PR libgcj/10582: * libjava.lang/assign.java: New file. * libjava.lang/assign.out: New file. 2003-04-16 Mark Mitchell PR middle-end/8866 *************** *** 57,63 **** * libjava.lang/Throw_2.java (main): Make a successful test produce some output. ! 2003-03-10 Tom Tromey * libjava.lang/initfield.java: New file. * libjava.lang/initfield.out: New file. --- 242,271 ---- * libjava.lang/Throw_2.java (main): Make a successful test produce some output. ! 2003-03-22 Andreas Tobler ! ! * libjava.jni/jni.exp: Add compilation/link fix dor darwin dylibs. ! ! 2003-03-22 Tom Tromey ! ! * lib/libjava.exp (gcj_invoke): Moved... ! * libjava.jni/jni.exp: ...from here. ! ! * libjava.cni/shortfield.out: New file. ! * libjava.cni/shortfield.java: New file. ! * libjava.cni/natshortfield.cc: New file. ! * libjava.cni/natlongfield.cc: New file. ! * libjava.cni/longfield.out: New file. ! * libjava.cni/longfield.java: New file. ! ! * libjava.cni/cni.exp: New file. ! ! 2003-03-11 Tom Tromey ! ! * libjava.lang/initfield.java: New file. ! * libjava.lang/initfield.out: New file. ! ! 2003-03-08 Tom Tromey * libjava.lang/initfield.java: New file. * libjava.lang/initfield.out: New file. *************** *** 70,84 **** * libjava.mauve/xfails: Remove all AcuniaPropertiesTest failures 2003-02-16 Mark Wielaard * libjava.mauve/xfails: Add Class.reflect2 and String.getBytes FAILs. 2003-02-15 Mark Wielaard ! * lib/libjava.exp (test_libjava_from_javac): Use regsub not string map. ! * libjava.mauve/mauve.exp (mauve_compute_uses): Likewise. ! (test_mauve): Likewise. 2003-02-14 Mark Wielaard --- 278,301 ---- * libjava.mauve/xfails: Remove all AcuniaPropertiesTest failures + 2003-02-23 Tom Tromey + + * libjava.jacks/jacks.xfail: Most 4.7.10 tests pass now. + + 2003-02-16 Jeff Sturm + + * libjava.lang/CompareNaN.java: New test. + * libjava.lang/CompareNaN.out: New test. + 2003-02-16 Mark Wielaard * libjava.mauve/xfails: Add Class.reflect2 and String.getBytes FAILs. 2003-02-15 Mark Wielaard ! * lib/libjava.exp (test_libjava_from_javac): Use regsub not string map. ! * libjava.mauve/mauve.exp (mauve_compute_uses): Likewise. ! (test_mauve): Likewise. 2003-02-14 Mark Wielaard *************** *** 108,119 **** to find libgcc_s. Set JAVA_CLASSPATH to find libgcj.jar. 2003-01-31 Mark Wielaard ! * lib/libjava.exp (libjava_prune_warnings): Remove all unreachable bytecode warnings. 2003-01-28 Tom Tromey * libjava.jacks/jacks.xfail: More lexer tests now pass. 2003-01-27 Tom Tromey --- 325,339 ---- to find libgcc_s. Set JAVA_CLASSPATH to find libgcj.jar. 2003-01-31 Mark Wielaard ! * lib/libjava.exp (libjava_prune_warnings): Remove all unreachable bytecode warnings. 2003-01-28 Tom Tromey + * libjava.loader/TestEarlyGC.java: Added comment explaining + bytecode. + * libjava.jacks/jacks.xfail: More lexer tests now pass. 2003-01-27 Tom Tromey diff -Nrc3pad gcc-3.3.3/libjava/testsuite/lib/libjava.exp gcc-3.4.0/libjava/testsuite/lib/libjava.exp *** gcc-3.3.3/libjava/testsuite/lib/libjava.exp 2003-02-15 16:47:37.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/lib/libjava.exp 2004-01-12 21:19:26.000000000 +0000 *************** proc bytecompile_file { file objdir {cla *** 109,118 **** } set here [pwd] cd $dirname if {[catch { set q [eval exec "$javac [list $file] -d $objdir 2>@ stdout"] } msg]} then { ! verbose "couldn't compile $file: $msg" set r 0 } else { set r 1 --- 109,119 ---- } set here [pwd] cd $dirname + send_log "byte compile: $javac [list $file] -d $objdir 2>@ stdout\n" if {[catch { set q [eval exec "$javac [list $file] -d $objdir 2>@ stdout"] } msg]} then { ! send_log "couldn't compile $file: $msg\n" set r 0 } else { set r 1 *************** proc libjava_init { args } { *** 137,142 **** --- 138,144 ---- global env libgcj_jar global tool_root_dir global libjava_libgcc_s_path + global target_triplet if { $libjava_initialized == 1 } { return; } *************** proc libjava_init { args } { *** 173,184 **** if [info exists env(LD_LIBRARY_PATH)] { set original_ld_library_path $env(LD_LIBRARY_PATH) } else { ! if [info exists env(SHLIB_PATH)] { ! set original_ld_library_path $env(SHLIB_PATH) ! } else { ! set original_ld_library_path "" ! } } set wrapper_file ""; --- 175,194 ---- if [info exists env(LD_LIBRARY_PATH)] { set original_ld_library_path $env(LD_LIBRARY_PATH) + # For HP-UX. + } elseif [info exists env(SHLIB_PATH)] { + set original_ld_library_path $env(SHLIB_PATH) + # For Darwin. + } elseif [info exists env(DYLD_LIBRARY_PATH)] { + set original_ld_library_path $env(DYLD_LIBRARY_PATH) + # For Solaris 32 bit. + } elseif [info exists env(LD_LIBRARY_PATH_32)] { + set original_ld_library_path $env(LD_LIBRARY_PATH_32) + # For Solaris 64 bit. + } elseif [info exists env(LD_LIBRARY_PATH_64)] { + set original_ld_library_path $env(LD_LIBRARY_PATH_64) } else { ! set original_ld_library_path "" } set wrapper_file ""; *************** proc libjava_init { args } { *** 196,205 **** # Finally, add the gcc build directory so that we can find the # shared libgcc. This, like much of dejagnu, is hideous. set libjava_libgcc_s_path {} ! set gccdir [lookfor_file $tool_root_dir gcc/libgcc_s.so] if {$gccdir != ""} { set gccdir [file dirname $gccdir] lappend libjava_libgcc_s_path $gccdir set compiler ${gccdir}/xgcc if { [is_remote host] == 0 && [which $compiler] != 0 } { foreach i "[exec $compiler --print-multi-lib]" { --- 206,222 ---- # Finally, add the gcc build directory so that we can find the # shared libgcc. This, like much of dejagnu, is hideous. set libjava_libgcc_s_path {} ! ! if { [string match "powerpc-*-darwin*" $target_triplet] } { ! set so_extension "dylib" ! } else { ! set so_extension "so" ! } ! set gccdir [lookfor_file $tool_root_dir gcc/libgcc_s.${so_extension}] if {$gccdir != ""} { set gccdir [file dirname $gccdir] lappend libjava_libgcc_s_path $gccdir + verbose "libjava_libgcc_s_path = $libjava_libgcc_s_path" set compiler ${gccdir}/xgcc if { [is_remote host] == 0 && [which $compiler] != 0 } { foreach i "[exec $compiler --print-multi-lib]" { *************** proc libjava_init { args } { *** 209,215 **** if { "$mldir" == "." } { continue } ! if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]] == 1 } { lappend libjava_libgcc_s_path "${gccdir}/${mldir}" } } --- 226,232 ---- if { "$mldir" == "." } { continue } ! if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.${so_extension}.*]] == 1 } { lappend libjava_libgcc_s_path "${gccdir}/${mldir}" } } *************** proc libjava_init { args } { *** 227,254 **** # paths. However we can't simply use those libraries; we still need # libtool for linking. # Don't return the the lib${name}.la files here, since this causes the ! # libraries to be linked twice: once as lib${name}.so and another time # via gcj's implicit -l${name}. This is both unnecessary and causes the # Solaris ld to warn: attempted multiple inclusion of file. This warning # is not ignored by the dejagnu framework and cannot be disabled. proc libjava_find_lib {dir name} { global base_dir set gp [get_multilibs] ! foreach sub {.libs _libs} { ! if {$gp != ""} { ! if {[file exists $gp/$dir/$sub/lib${name}.a]} then { ! # Just return the `-L' option. The library itself ! # will be picked up via the spec file. ! return "-L$gp/$dir/$sub" } - } - # Just return the `-L' option. The library itself will be - # picked up via the spec file. - set lib [findfile $base_dir/../../$dir/$sub/lib${name}.a \ - "-L$base_dir/../../$dir/$sub" \ - ""] - if {$lib != ""} { - return $lib } } return "" --- 244,274 ---- # paths. However we can't simply use those libraries; we still need # libtool for linking. # Don't return the the lib${name}.la files here, since this causes the ! # libraries to be linked twice: once as lib${name}.so/dylib and another time # via gcj's implicit -l${name}. This is both unnecessary and causes the # Solaris ld to warn: attempted multiple inclusion of file. This warning # is not ignored by the dejagnu framework and cannot be disabled. proc libjava_find_lib {dir name} { global base_dir set gp [get_multilibs] ! foreach extension {so dll a} { ! foreach sub {.libs _libs} { ! if {$gp != ""} { ! if {[file exists $gp/$dir/$sub/lib${name}.${extension}]} then { ! # Just return the `-L' option. The library itself ! # will be picked up via the spec file. ! return "-L$gp/$dir/$sub" ! } ! } ! # Just return the `-L' option. The library itself will be ! # picked up via the spec file. ! set lib [findfile \ ! $base_dir/../../$dir/$sub/lib${name}.${extension} \ ! "-L$base_dir/../../$dir/$sub" \ ! ""] ! if {$lib != ""} { ! return $lib } } } return "" *************** proc gcj_cleanup {args} { *** 303,311 **** proc libjava_arguments {{mode compile}} { global base_dir global LIBJAVA - global LIBGC - global LIBQTHREADS - global LIBZ global srcdir subdir objdir global TOOL_OPTIONS global GCJ_UNDER_TEST --- 323,328 ---- *************** proc libjava_arguments {{mode compile}} *** 322,360 **** set libjava [libjava_find_lib libjava gcj] } - if [info exists LIBGC] { - set libgc $LIBGC; - } else { - set libgc [libjava_find_lib boehm-gc gcjgc] - } - - if [info exists LIBQTHREADS] { - set libqthreads $LIBQTHREADS - } else { - set libqthreads [libjava_find_lib qthreads gcjcoop] - } - - if [info exists LIBZ] { - set libz $LIBZ - } else { - set libz [libjava_find_lib zlib zgcj] - } - - # FIXME: there's no way to determine whether -lpthread is - # required. We should get this info from configure, or it should - # just be in the compiler driver. - verbose "using LIBJAVA = $libjava" 2 - verbose "using LIBGC = $libgc" 2 - verbose "using LIBQTHREADS = $libqthreads" 2 - verbose "using LIBZ = $libz" 2 set args "" # Basically we want to build up a colon separated path list from # the value of $libjava. set lpath {} ! foreach dir [list $libjava $libgc $libz] { foreach item [split $dir " "] { switch -glob -- $item { "-L*" { --- 339,352 ---- set libjava [libjava_find_lib libjava gcj] } verbose "using LIBJAVA = $libjava" 2 set args "" # Basically we want to build up a colon separated path list from # the value of $libjava. set lpath {} ! foreach dir [list $libjava] { foreach item [split $dir " "] { switch -glob -- $item { "-L*" { *************** proc libjava_arguments {{mode compile}} *** 365,370 **** --- 357,363 ---- } set lpath [concat $lpath $libjava_libgcc_s_path] + verbose "lpath = $lpath ; libgcc_s_path = $libjava_libgcc_s_path" set ld_library_path [join $lpath :] # That's enough to make things work for the normal case. *************** proc libjava_arguments {{mode compile}} *** 374,380 **** # Set variables the dynamic linker looks at. global original_ld_library_path setenv LD_LIBRARY_PATH "$ld_library_path:$original_ld_library_path" - setenv SHLIB_PATH "$ld_library_path:$original_ld_library_path" verbose "LD_LIBRARY_PATH = $env(LD_LIBRARY_PATH)" --- 367,372 ---- *************** proc libjava_arguments {{mode compile}} *** 384,396 **** set env(CLASSPATH) ".:$srcdir/$subdir:$objdir:$libgcj_jar" if {$mode == "link"} { ! global wrapper_file wrap_compile_flags; ! lappend args "additional_flags=$wrap_compile_flags"; ! lappend args "libs=$wrapper_file"; ! lappend args "libs=$libjava"; ! lappend args "libs=$libgc"; ! lappend args "libs=$libqthreads" ! lappend args "libs=$libz" lappend args debug } --- 376,385 ---- set env(CLASSPATH) ".:$srcdir/$subdir:$objdir:$libgcj_jar" if {$mode == "link"} { ! global wrapper_file wrap_compile_flags ! lappend args "additional_flags=$wrap_compile_flags" ! lappend args "libs=$wrapper_file" ! lappend args "libs=$libjava" lappend args debug } *************** proc libjava_arguments {{mode compile}} *** 427,435 **** # Avoid libtool wrapper scripts when possible. # but not if libtool warnings results in FAILs if {$mode == "link"} { ! if {! [istarget "*-*-cygwin*"] && ! [istarget "*-*-mingw*"] } { ! lappend args "additional_flags=-no-install" ! } } return $args --- 416,428 ---- # Avoid libtool wrapper scripts when possible. # but not if libtool warnings results in FAILs if {$mode == "link"} { ! if {! [istarget "*-*-cygwin*"] && ! [istarget "*-*-mingw*"] } { ! lappend args "additional_flags=-no-install" ! } ! if { [istarget "*-*-darwin*"] } { ! lappend args "additional_flags=-bind_at_load" ! lappend args "additional_flags=-multiply_defined suppress" ! } } return $args *************** proc gcj_link {program main files {optio *** 457,462 **** --- 450,497 ---- return 1 } + # Invoke the program and see what happens. Return 0 on failure. + proc gcj_invoke {program expectFile ld_library_additions} { + global env + set lib_path $env(LD_LIBRARY_PATH) + + set newval . + if {[llength $ld_library_additions] > 0} { + append newval :[join $ld_library_additions :] + } + append newval :$lib_path + + setenv LD_LIBRARY_PATH $newval + + verbose "LD_LIBRARY_PATH=$env(LD_LIBRARY_PATH)" + + set result [libjava_load ./$program] + set status [lindex $result 0] + set output [lindex $result 1] + + # Restore setting + setenv LD_LIBRARY_PATH $lib_path + + if {$status != "pass"} { + verbose "got $output" + fail "$program run" + untested "$program output" + return 0 + } + + set id [open $expectFile r] + set expected [read $id] + close $id + + if {! [string compare $output $expected]} { + pass "$program output" + return 1 + } else { + fail "$program output" + return 0 + } + } + # Invoke a program and check its output. EXECUTABLE is the program; # ARGS are the arguments to the program. Returns 1 if tests passed # (or things were left untested), 0 otherwise. *************** proc libjava_invoke {errname testName op *** 530,537 **** # proc test_libjava_from_source { options srcfile compile_args inpfile resultfile exec_args } { global base_dir - global LIBJAVA - global LIBGC global srcdir subdir objdir global TOOL_OPTIONS global GCJ_UNDER_TEST --- 565,570 ---- *************** proc test_libjava_from_source { options *** 637,644 **** # proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile exec_args } { global base_dir - global LIBJAVA - global LIBGC global srcdir subdir objdir global TOOL_OPTIONS global GCJ_UNDER_TEST --- 670,675 ---- *************** proc default_libjava_start { } { *** 876,887 **** # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH # (for the 64-bit ABI). The right way to do this would be to modify # unix.exp -- but that's not an option since it's part of DejaGNU ! # proper, so we do it here, by trickery. We really only need to do ! # this on IRIX, but it shouldn't hurt to do it anywhere else. ! proc ${tool}_set_ld_library_path { name element op } { setenv LD_LIBRARYN32_PATH [getenv LD_LIBRARY_PATH] setenv LD_LIBRARY64_PATH [getenv LD_LIBRARY_PATH] } trace variable env(LD_LIBRARY_PATH) w ${tool}_set_ld_library_path --- 907,923 ---- # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH # (for the 64-bit ABI). The right way to do this would be to modify # unix.exp -- but that's not an option since it's part of DejaGNU ! # proper, so we do it here, by trickery. ! # The same applies to darwin (DYLD_LIBRARY_PATH), solaris 32 bit ! # (LD_LIBRARY_PATH_32), solaris 64 bit (LD_LIBRARY_PATH_64), and HP-UX ! # (SHLIB_PATH). proc ${tool}_set_ld_library_path { name element op } { setenv LD_LIBRARYN32_PATH [getenv LD_LIBRARY_PATH] setenv LD_LIBRARY64_PATH [getenv LD_LIBRARY_PATH] + setenv SHLIB_PATH [getenv LD_LIBRARY_PATH] + setenv DYLD_LIBRARY_PATH [getenv LD_LIBRARY_PATH] + setenv LD_LIBRARY_PATH_32 [getenv LD_LIBRARY_PATH] + setenv LD_LIBRARY_PATH_64 [getenv LD_LIBRARY_PATH] } trace variable env(LD_LIBRARY_PATH) w ${tool}_set_ld_library_path diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.cni/cni.exp gcc-3.4.0/libjava/testsuite/libjava.cni/cni.exp *** gcc-3.3.3/libjava/testsuite/libjava.cni/cni.exp 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.cni/cni.exp 2003-03-22 07:14:53.000000000 +0000 *************** *** 0 **** --- 1,119 ---- + # Tests for CNI code. + + # Compile a single C++ file and produce a .o file. OPTIONS is a list + # of options to pass to the compiler. Returns 0 on failure, 1 on + # success. + proc gcj_cni_compile_cxx_to_o {file {options {}}} { + global srcdir + + set name [file rootname [file tail $file]] + set oname ${name}.o + + # Find the generated header. + lappend options "additional_flags=-I. -I.." + # Find libgcj headers. + lappend options "additional_flags=-I$srcdir/.." + + set x [libjava_prune_warnings \ + [target_compile $file $oname object $options]] + if {$x != ""} { + verbose "target_compile failed: $x" 2 + fail "[file tail $file] compilation" + return 0 + } + + pass "[file tail $file] compilation" + return 1 + } + + # Build header files given name of .java file. Return 0 on failure. + proc gcj_cni_build_headers {file} { + set gcjh [find_gcjh] + set jvscan [find_jvscan] + + set class_out [string trim \ + [libjava_prune_warnings \ + [lindex [local_exec "$jvscan --encoding=UTF-8 $file --list-class" "" "" 300] 1]]] + if {[string match "*parse error*" $class_out]} { + fail "$file header generation" + return 0 + } + + foreach file [split $class_out] { + set x [string trim [libjava_prune_warnings \ + [lindex [local_exec "$gcjh $file" "" "" 300] 1]]] + if {$x != ""} { + verbose "local_exec failed: $x" 2 + fail "$file header generation" + return 0 + } + } + + pass "$file header generation" + return 1 + } + + # Do all the work for a single CNI test. Return 0 on failure. + proc gcj_cni_test_one {file} { + global runtests + + # The base name. We use it for several purposes. + set main [file rootname [file tail $file]] + if {! [runtest_file_p $runtests $main]} { + # Simply skip it. + return 1 + } + + if {! [bytecompile_file $file [pwd]]} { + fail "bytecompile $file" + # FIXME - should use `untested' on all remaining tests. + # But that is hard. + return 0 + } + pass "bytecompile $file" + + if {! [gcj_cni_build_headers $file]} { + # FIXME + return 0 + } + + set cfile [file join [file dirname $file] nat$main.cc] + if {! [gcj_cni_compile_cxx_to_o $cfile]} { + # FIXME + return 0 + } + + if {! [gcj_link $main $main [list $file nat$main.o]]} { + # FIXME + return 0 + } + + if {! [gcj_invoke $main [file rootname $file].out {}]} { + # FIXME + return 0 + } + + # When we succeed we remove all our clutter. + eval gcj_cleanup [glob -nocomplain -- ${main}.*] [list $main nat$main.o] + + return 1 + } + + # Run the CNI tests. + proc gcj_cni_run {} { + global srcdir subdir + global build_triplet host_triplet + + # For now we only test CNI on native builds. + if {$build_triplet == $host_triplet} { + catch { lsort [glob -nocomplain ${srcdir}/${subdir}/*.java] } srcfiles + + foreach x $srcfiles { + gcj_cni_test_one $x + } + } else { + verbose "CNI tests not run in cross-compilation environment" + } + } + + gcj_cni_run diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.cni/longfield.java gcc-3.4.0/libjava/testsuite/libjava.cni/longfield.java *** gcc-3.3.3/libjava/testsuite/libjava.cni/longfield.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.cni/longfield.java 2003-03-22 07:14:53.000000000 +0000 *************** *** 0 **** --- 1,22 ---- + public class longfield + { + long lval = 232300; + boolean bval = true; + String sval = "maude"; + + public native void doitc (); + + public void doitj() + { + System.out.println(lval); + System.out.println(bval); + System.out.println(sval); + } + + public static void main(String[] args) + { + longfield f = new longfield(); + f.doitc(); + f.doitj(); + } + } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.cni/longfield.out gcc-3.4.0/libjava/testsuite/libjava.cni/longfield.out *** gcc-3.3.3/libjava/testsuite/libjava.cni/longfield.out 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.cni/longfield.out 2003-03-22 07:14:53.000000000 +0000 *************** *** 0 **** --- 1,6 ---- + 232300 + true + maude + 232300 + true + maude diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.cni/natlongfield.cc gcc-3.4.0/libjava/testsuite/libjava.cni/natlongfield.cc *** gcc-3.3.3/libjava/testsuite/libjava.cni/natlongfield.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.cni/natlongfield.cc 2003-03-22 07:14:53.000000000 +0000 *************** *** 0 **** --- 1,15 ---- + #include + + #include "longfield.h" + #include + #include + + void + longfield::doitc () + { + java::io::PrintStream *ps = java::lang::System::out; + + ps->println(lval); + ps->println(bval); + ps->println(sval); + } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.cni/natPR9577.cc gcc-3.4.0/libjava/testsuite/libjava.cni/natPR9577.cc *** gcc-3.3.3/libjava/testsuite/libjava.cni/natPR9577.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.cni/natPR9577.cc 2003-09-17 15:25:07.000000000 +0000 *************** *** 0 **** --- 1,9 ---- + #include + + #include "PR9577.h" + + void + PR9577::sayHello (JArray< ::java::lang::String *> *x, ::java::lang::Object *y) + { + printf( "Hello!\n"); + } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.cni/natshortfield.cc gcc-3.4.0/libjava/testsuite/libjava.cni/natshortfield.cc *** gcc-3.3.3/libjava/testsuite/libjava.cni/natshortfield.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.cni/natshortfield.cc 2003-03-22 07:14:53.000000000 +0000 *************** *** 0 **** --- 1,10 ---- + #include + #include "shortfield.h" + + void shortfield::ouch () + { + printf ("list: %d %d 0x%x\n", + modCount, + size__, + data); + } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.cni/PR9577.java gcc-3.4.0/libjava/testsuite/libjava.cni/PR9577.java *** gcc-3.3.3/libjava/testsuite/libjava.cni/PR9577.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.cni/PR9577.java 2003-09-17 15:25:07.000000000 +0000 *************** *** 0 **** --- 1,14 ---- + // Check if a method name is mangled properly in the presence + // of an array parameter sharing a part of the type name + // with a subsequent parameter. + + public class PR9577 + { + private native void sayHello (String[] s, Object o); + + public static void main (String[] args) + { + PR9577 x = new PR9577( ); + x.sayHello( null, null); + } + } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.cni/PR9577.out gcc-3.4.0/libjava/testsuite/libjava.cni/PR9577.out *** gcc-3.3.3/libjava/testsuite/libjava.cni/PR9577.out 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.cni/PR9577.out 2003-09-17 15:25:07.000000000 +0000 *************** *** 0 **** --- 1 ---- + Hello! diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.cni/shortfield.java gcc-3.4.0/libjava/testsuite/libjava.cni/shortfield.java *** gcc-3.3.3/libjava/testsuite/libjava.cni/shortfield.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.cni/shortfield.java 2003-03-22 07:14:53.000000000 +0000 *************** *** 0 **** --- 1,21 ---- + class shortfieldbase + { + short modCount; + } + + public class shortfield extends shortfieldbase + { + short size__; + int data; + + native void ouch (); + + public static void main (String[] s) + { + shortfield f = new shortfield(); + f.modCount = 99; + f.size__ = 2; + f.data = 0x12345678; + f.ouch(); + } + } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.cni/shortfield.out gcc-3.4.0/libjava/testsuite/libjava.cni/shortfield.out *** gcc-3.3.3/libjava/testsuite/libjava.cni/shortfield.out 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.cni/shortfield.out 2003-03-22 07:14:53.000000000 +0000 *************** *** 0 **** --- 1 ---- + list: 99 2 0x12345678 diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.compile/abstr.xfail gcc-3.4.0/libjava/testsuite/libjava.compile/abstr.xfail *** gcc-3.3.3/libjava/testsuite/libjava.compile/abstr.xfail 2000-12-16 02:06:29.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.compile/abstr.xfail 2003-08-12 20:32:28.000000000 +0000 *************** *** 1,2 **** no-link - xfail-byte --- 1 ---- diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.compile/compile.exp gcc-3.4.0/libjava/testsuite/libjava.compile/compile.exp *** gcc-3.3.3/libjava/testsuite/libjava.compile/compile.exp 2002-07-18 17:42:31.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.compile/compile.exp 2003-09-05 01:53:46.000000000 +0000 *************** foreach x $srcfiles { *** 12,18 **** lappend args no-exec test_libjava "" "$x" "" "" "" $args ! test_libjava "" "$x" "-O" "" "" $args } # Local Variables: --- 12,18 ---- lappend args no-exec test_libjava "" "$x" "" "" "" $args ! test_libjava "" "$x" "-O3" "" "" $args } # Local Variables: diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.compile/InnerExcept.java gcc-3.4.0/libjava/testsuite/libjava.compile/InnerExcept.java *** gcc-3.3.3/libjava/testsuite/libjava.compile/InnerExcept.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.compile/InnerExcept.java 2003-11-04 01:51:15.000000000 +0000 *************** *** 0 **** --- 1,19 ---- + import java.io.*; + + // Test case for http://gcc.gnu.org/PR12866 + // From Mark Wielaard + public class InnerExcept + { + static private void createFile() throws IOException + { + new File("/dev/null"); + } + + class Inner + { + private void m() throws IOException + { + createFile(); + } + } + } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.compile/PR11600.java gcc-3.4.0/libjava/testsuite/libjava.compile/PR11600.java *** gcc-3.3.3/libjava/testsuite/libjava.compile/PR11600.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.compile/PR11600.java 2003-08-05 19:43:20.000000000 +0000 *************** *** 0 **** --- 1,7 ---- + public class PR11600 implements Cloneable + { + public Object clone () + { + return super.clone (); + } + } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.compile/PR11600.xfail gcc-3.4.0/libjava/testsuite/libjava.compile/PR11600.xfail *** gcc-3.3.3/libjava/testsuite/libjava.compile/PR11600.xfail 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.compile/PR11600.xfail 2003-08-05 19:43:20.000000000 +0000 *************** *** 0 **** --- 1 ---- + shouldfail diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.compile/PR12374.java gcc-3.4.0/libjava/testsuite/libjava.compile/PR12374.java *** gcc-3.3.3/libjava/testsuite/libjava.compile/PR12374.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.compile/PR12374.java 2003-12-03 07:04:17.000000000 +0000 *************** *** 0 **** --- 1,27 ---- + public class PR12374 { + + /* We weren't coping with field refs on a string constant... */ + + Object Foo() + { + return "".CASE_INSENSITIVE_ORDER; + } + + /* Special casing access to array.length while analysing syntax is + evil. Especially when it means we can't cope with a type + called length. */ + + class length + { + static final int i = 2; + } + + int bar() + { + return length.i; + } + + public static void main (String[] argv) + { + } + } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.compile/PR12857.java gcc-3.4.0/libjava/testsuite/libjava.compile/PR12857.java *** gcc-3.3.3/libjava/testsuite/libjava.compile/PR12857.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.compile/PR12857.java 2003-11-18 04:19:24.000000000 +0000 *************** *** 0 **** --- 1,4 ---- + // Based on original test case from Yves Martin. + interface PR12857 { + static final String CONST = PR12857.class.getName(); + } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.compile/PR13024.java gcc-3.4.0/libjava/testsuite/libjava.compile/PR13024.java *** gcc-3.3.3/libjava/testsuite/libjava.compile/PR13024.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.compile/PR13024.java 2003-12-02 04:43:25.000000000 +0000 *************** *** 0 **** --- 1,18 ---- + import java.io.*; + import java.util.zip.*; + + class PR13024 { + void isZipOrJarArchive(File file) throws IOException { + ZipFile zipFile = null; + + try { + zipFile = new ZipFile(file); + } finally { + if (zipFile != null) { + try { + zipFile.close(); + } catch (IOException ignored) {} + } + } + } + } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.compile/PR13237.java gcc-3.4.0/libjava/testsuite/libjava.compile/PR13237.java *** gcc-3.3.3/libjava/testsuite/libjava.compile/PR13237.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.compile/PR13237.java 2003-12-02 04:43:25.000000000 +0000 *************** *** 0 **** --- 1,3 ---- + class PR13237 { + double kappa = Math.sqrt(2.0); + } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.compile/PR5641.xfail gcc-3.4.0/libjava/testsuite/libjava.compile/PR5641.xfail *** gcc-3.3.3/libjava/testsuite/libjava.compile/PR5641.xfail 2002-02-11 00:18:52.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.compile/PR5641.xfail 2003-08-12 20:32:28.000000000 +0000 *************** *** 1,2 **** no-link - xfail-byte --- 1 ---- diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.jacks/jacks.exp gcc-3.4.0/libjava/testsuite/libjava.jacks/jacks.exp *** gcc-3.3.3/libjava/testsuite/libjava.jacks/jacks.exp 2003-02-03 16:21:29.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.jacks/jacks.exp 2003-11-11 20:04:22.000000000 +0000 *************** proc gcj_jacks_write {filename} { *** 32,37 **** --- 32,38 ---- puts $fd "set JAVAC_ENCODING_FLAG --encoding=" puts $fd "set tcltest::testConstraints(encoding) 1" puts $fd "set tcltest::testConstraints(gcj) 1" + puts $fd "set tcltest::testConstraints(assert) 1" # "Time-consuming JVM limitation tests". # puts $fd "set tcltest::testConstraints(jvm) 1" close $fd *************** proc gcj_jacks_run {} { *** 89,102 **** gcj_jacks_write gcj_setup verbose "Running Jacks..." ! if {[catch {exec ./jacks gcj} msg]} { ! verbose "jacks invocation failure: $msg" ! fail "running jacks" ! } else { ! pass "running jacks" ! gcj_jacks_parse logging/gcj.log ! } cd $here } --- 90,100 ---- gcj_jacks_write gcj_setup verbose "Running Jacks..." ! # Just ignore error exits from the jacks program. ! # It will always error exit for us, since don't completely pass. ! catch {exec ./jacks gcj} msg ! gcj_jacks_parse logging/gcj.log cd $here } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.jacks/jacks.xfail gcc-3.4.0/libjava/testsuite/libjava.jacks/jacks.xfail *** gcc-3.3.3/libjava/testsuite/libjava.jacks/jacks.xfail 2003-03-10 16:39:31.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.jacks/jacks.xfail 2003-11-11 20:04:22.000000000 +0000 *************** *** 32,43 **** 14.19.exception-23 14.19.exception-24 14.20-block-4 - 14.20-block-5 14.20-block-9 - 14.20-block-10 14.20-local-2 14.20-label-5 - 14.20-label-6 14.20-label-8 14.20-label-9 14.20-label-10 --- 32,40 ---- *************** *** 47,55 **** 14.20-label-14 14.20-label-15 14.20-switch-8 - 14.20-switch-9 14.20-switch-14 - 14.20-switch-15 14.20-switch-17 14.20-switch-18 14.20-switch-19 --- 44,50 ---- *************** *** 59,65 **** 14.20-switch-23 14.20-switch-24 14.20-while-4 - 14.20-while-5 14.20-while-12 14.20-while-13 14.20-while-14 --- 54,59 ---- *************** *** 69,75 **** 14.20-while-18 14.20-while-19 14.20-do-6 - 14.20-do-7 14.20-do-9 14.20-do-10 14.20-do-11 --- 63,68 ---- *************** *** 96,104 **** 14.20-do-32 14.20-do-33 14.20-for-4 - 14.20-for-5 14.20-for-8 - 14.20-for-9 14.20-for-15 14.20-for-16 14.20-for-17 --- 89,95 ---- *************** *** 108,148 **** 14.20-for-21 14.20-for-22 14.20-abrupt-2 - 14.20-abrupt-3 14.20-abrupt-6 - 14.20-abrupt-7 14.20-abrupt-10 - 14.20-abrupt-11 14.20-abrupt-14 - 14.20-abrupt-15 14.20-synchronized-3 - 14.20-synchronized-4 14.20-try-3 - 14.20-try-4 14.20-try-9 - 14.20-try-10 14.20-try-14 - 14.20-try-15 14.20-try-18 - 14.20-try-19 14.20-try-22 - 14.20-try-23 14.20-try-27 - 14.20-try-28 14.20-try-31 - 14.20-try-32 14.20-catch-15 14.20-catch-17 14.20-if-6 - 14.20-if-7 14.20-for-update-1 8.1.1.1-default-abstract-11 8.1.1.1-default-abstract-13 8.1.1.1-default-abstract-15 8.1.1.1-default-abstract-19 8.1.1.1-default-abstract-21 - 8.1.1.1-default-abstract-22 - 8.1.1.1-default-abstract-24 8.1.1.1-default-abstract-25 8.1.2-static-1 8.1.2-static-11 --- 99,124 ---- *************** *** 152,158 **** 8.1.3-object-3 8.1.3-superclass-5 8.1.3-superclass-6 - 8.2-accessibility-inherited-member-5 8.8.5.1-example-1 8.8.5.1-example-3 8.8.5.1-qualified-1 --- 128,133 ---- *************** *** 223,243 **** 8.5-inheritance-3 8.5-inheritance-6 8.5.2-non-static-member-usage-2 - 8.4.6-miranda-2 - 8.4.6-miranda-3 - 8.4.6-miranda-4 8.4.6-inheritance-1 8.4.6-inheritance-2 8.4.6.2-hiding-3 8.4.6.4-multiple-3 8.4.6.4-multiple-4 - 8.4.6.4-multiple-5 8.4.6.4-multiple-7 8.4.6.4-multiple-8 8.4.6.4-abstract-1 8.4.6.4-abstract-2 - 8.4.6.4-abstract-4 - 8.4.6.4-abstract-9 8.4.6.4-abstract-10 8.4.6.1-override-3 8.4.6.3-modifier-8 --- 198,212 ---- *************** *** 252,269 **** 8.4.6.3-default-12 8.4.6.3-default-14 8.4.6.3-signature-4 - 8.4.6.3-signature-7 - 8.4.6.3-signature-9 - 8.4.6.3-signature-10 - 8.4.6.3-signature-12 - 8.4.6.3-signature-15 8.7-abrupt-1 8.7-complete-1 8.7-complete-3 - 5.1.3-dti-1 - 5.1.3-dti-2 - 5.1.3-fti-1 - 5.1.3-fti-2 5.1.2-bts-1 5.1.2-bts-2 5.1.2-bts-3 --- 221,229 ---- *************** *** 613,622 **** 9.2-implicit-4 9.2-implicit-6 9.2-implicit-7 - 9.2-implicit-11 - 9.2-implicit-12 9.2-implicit-15 - 9.2-implicit-17 9.2-implicit-18 9.2-implicit-19 3.2-valid-1 --- 573,579 ---- *************** *** 717,761 **** 4.5.4-static-5 4.5.4-parameter-2 4.5.4-parameter-3 ! 4.7.10-jvms-class-1 ! 4.7.10-jvms-class-2 ! 4.7.10-jvms-class-3 ! 4.7.10-jvms-class-4 ! 4.7.10-jvms-class-5 ! 4.7.10-jvms-class-10 ! 4.7.10-jvms-class-11 ! 4.7.10-jvms-class-12 ! 4.7.10-jvms-class-13 ! 4.7.10-jvms-class-14 ! 4.7.10-jvms-class-17 4.7.10-jvms-class-18 ! 4.7.10-jvms-class-19 ! 4.7.10-jvms-method-1 ! 4.7.10-jvms-method-2 ! 4.7.10-jvms-method-3 ! 4.7.10-jvms-method-4 ! 4.7.10-jvms-method-5 ! 4.7.10-jvms-method-10 ! 4.7.10-jvms-constructor-1 ! 4.7.10-jvms-constructor-2 ! 4.7.10-jvms-constructor-3 ! 4.7.10-jvms-constructor-4 ! 4.7.10-jvms-constructor-5 ! 4.7.10-jvms-constructor-10 ! 4.7.10-jvms-constructor-11 ! 4.7.10-jvms-constructor-12 ! 4.7.10-jvms-field-1 ! 4.7.10-jvms-field-2 ! 4.7.10-jvms-field-3 ! 4.7.10-jvms-field-4 ! 4.7.10-jvms-field-5 ! 4.7.10-jvms-field-10 ! 4.7.10-jvms-field-11 ! 4.7.10-jvms-lex-6 ! 4.7.10-jvms-lex-7 ! 4.7.10-jvms-lex-8 ! 4.7.10-jvms-lex-9 ! 4.7.10-jvms-lex-10 non-jls-argument-expansion-11 non-jls-argument-expansion-12 non-jls-argument-expansion-13 --- 674,689 ---- 4.5.4-static-5 4.5.4-parameter-2 4.5.4-parameter-3 ! 4.7.10-jvms-class-6 ! 4.7.10-jvms-class-7 ! 4.7.10-jvms-class-8 4.7.10-jvms-class-18 ! 4.7.10-jvms-method-6 ! 4.7.10-jvms-method-8 ! 4.7.10-jvms-constructor-6 ! 4.7.10-jvms-constructor-8 ! 4.7.10-jvms-field-6 ! 4.7.10-jvms-field-8 non-jls-argument-expansion-11 non-jls-argument-expansion-12 non-jls-argument-expansion-13 *************** non-jls-zip-2 *** 812,815 **** 15.20-2-runtime-1 15.15-runtime-3 15.15-runtime-4 ! 14.19.2-runtime-try-1 --- 740,767 ---- 15.20-2-runtime-1 15.15-runtime-3 15.15-runtime-4 ! non-jls-jsr41.4-definite-unassignment-fail-22 ! non-jls-jsr41.4-definite-unassignment-pass-2 ! non-jls-jsr41.4-definite-unassignment-pass-9 ! non-jls-jsr41.4-definite-unassignment-pass-10 ! non-jls-jsr41.4-definite-unassignment-try-1 ! non-jls-jsr41.4-definite-unassignment-try-2 ! non-jls-jsr41.4-definite-unassignment-try-3 ! non-jls-jsr41.4-definite-unassignment-try-4 ! non-jls-jsr41.4-definite-unassignment-try-5 ! non-jls-jsr41.4-definite-unassignment-try-6 ! non-jls-jsr41.4-definite-unassignment-try-7 ! non-jls-jsr41.4-definite-unassignment-try-8 ! non-jls-jsr41.4-loop-1 ! non-jls-jsr41.4-loop-2 ! non-jls-jsr41.4-loop-3 ! non-jls-jsr41.4-loop-7 ! non-jls-jsr41.4-loop-8 ! non-jls-jsr41.4-loop-9 ! non-jls-jsr41.4-loop-10 ! non-jls-jsr41.4-loop-11 ! non-jls-jsr41.4-loop-12 ! non-jls-jsr41.4-loop-13 ! non-jls-jsr41.4-loop-14 ! non-jls-jsr41.4-loop-15 ! non-jls-jsr41.2-clash-1 diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.jar/jar.exp gcc-3.4.0/libjava/testsuite/libjava.jar/jar.exp *** gcc-3.3.3/libjava/testsuite/libjava.jar/jar.exp 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.jar/jar.exp 2003-11-18 07:17:01.000000000 +0000 *************** *** 0 **** --- 1,67 ---- + # Tests for .jar files. + + # Compile a single .jar file to an executable. + # Returns 0 on failure. + proc gcj_jar_link {jarfile mainclass} { + } + + proc gcj_jar_compile_one {jarfile mainclass} { + set base [file rootname [file tail $jarfile]] + set out [file rootname $jarfile].out + + if {! [gcj_link $base $mainclass [list $jarfile]]} { + return + } + + gcj_invoke $base $out {} + } + + proc gcj_jar_interpret {jarfile} { + global INTERPRETER srcdir + + set gij [libjava_find_gij] + # libjava_find_gij will return `gij' if it couldn't find the + # program; in this case we want to skip the test. + if {$INTERPRETER != "yes" || $gij == "gij"} { + untested "$jarfile execution - gij test" + untested "$jarfile output - gij test" + return + } + + set opts(_) {} + set out [file rootname $jarfile].out + libjava_invoke $jarfile "gij test" opts $gij {} $out \ + -jar $jarfile + } + + proc gcj_jar_run {} { + global srcdir subdir env + foreach jar [lsort [glob -nocomplain ${srcdir}/${subdir}/*.jar]] { + set xff [file rootname $jar].xfail + set main {} + set interp 1 + foreach item [libjava_read_xfail $xff] { + if {[string match main=* $item]} { + set main [string range $item 5 end] + break + } elseif {$item == "no-interpret"} { + set interp 0 + } + } + + gcj_jar_compile_one $jar $main + if {$interp} { + gcj_jar_interpret $jar + } + } + # When we succeed we remove all our clutter. + eval gcj_cleanup [glob -nocomplain -- ${main}.*] [list $main ] + + # Reset CLASSPATH that we do not look into testsuite/libjava.jar for *.jar + # files which do not belong to the libgcj itself. + set env(CLASSPATH) "" + + return 1 + } + + gcj_jar_run diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.jar/simple.jar gcc-3.4.0/libjava/testsuite/libjava.jar/simple.jar *** gcc-3.3.3/libjava/testsuite/libjava.jar/simple.jar 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.jar/simple.jar 2004-01-07 18:54:00.000000000 +0000 *************** *** 0 **** --- 1,11 ---- + PK + å“$0 META-INF/PK + &|$0 .&I@>META-INF/MANIFEST.MFóMÌËLK-.Ñ K-*ÎÌϳR0Ô3àr.JM,IMÑuª´R0г4ÒMONæòMÌÌÓuÎI,.¶R(ÎÌ-ÈIåPK + .|$0¯ý»ˆ simple.classmPËJÃP=“´I“Fû2¾]¸KÍTÜ®Š + 7®nê¥Þ’GIo?«.\ø~”8Iz3ÌœÇ=Ì×÷Ç'Lœâˆ`-T:O¤ "tgâY„‰È¦áM<“mÃ$4R¡2Âvð0þÃ#]¨l:Þ3~™?Êâèe¡ej£E0óRü•Råá-Ë4‹¥HG\´8ðÆ“ja“0XC´Ñ%Øój‘p?X—ÃC=l:c•Éë2eq'â„ÃYç*Sú‚óu».Ø#¸Q^y¥*V{u‹³ÊÇ0˜R=ƒ#6aCðT퉻óŠ~ç þ’>W«š\ùƒ_z{½=yÇþ²ö#Ô®‡?PK + + å“$0 META-INF/PK + + &|$0 .&I@>'META-INF/MANIFEST.MFPK + + .|$0¯ý»ˆ ™simple.classPK³Ñ \ No newline at end of file diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.jar/simple.java gcc-3.4.0/libjava/testsuite/libjava.jar/simple.java *** gcc-3.3.3/libjava/testsuite/libjava.jar/simple.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.jar/simple.java 2003-11-10 21:30:10.000000000 +0000 *************** *** 0 **** --- 1,7 ---- + public class simple + { + public static void main(String[] args) + { + System.out.println("hi"); + } + } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.jar/simple.out gcc-3.4.0/libjava/testsuite/libjava.jar/simple.out *** gcc-3.3.3/libjava/testsuite/libjava.jar/simple.out 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.jar/simple.out 2003-11-10 21:30:10.000000000 +0000 *************** *** 0 **** --- 1 ---- + hi diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.jar/simple.xfail gcc-3.4.0/libjava/testsuite/libjava.jar/simple.xfail *** gcc-3.3.3/libjava/testsuite/libjava.jar/simple.xfail 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.jar/simple.xfail 2003-11-10 21:30:10.000000000 +0000 *************** *** 0 **** --- 1 ---- + main=simple diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.jni/jni.exp gcc-3.4.0/libjava/testsuite/libjava.jni/jni.exp *** gcc-3.3.3/libjava/testsuite/libjava.jni/jni.exp 2002-12-13 05:00:14.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.jni/jni.exp 2003-03-22 10:45:04.000000000 +0000 *************** *** 5,15 **** # success. proc gcj_jni_compile_c_to_so {file {options {}}} { global srcdir set name [file rootname [file tail $file]] ! set soname lib${name}.so ! lappend options "additional_flags=-shared -fPIC" # Find the generated header. lappend options "additional_flags=-I. -I.." # Find jni.h. --- 5,30 ---- # success. proc gcj_jni_compile_c_to_so {file {options {}}} { global srcdir + global host_triplet + verbose "options: $options" + set options_cxx $options + set options "" + + # apple uses a different extension for shared/dynamic libraries + # so we check against powerpc-apple-darwin and set them to + # dylib, else we assume it's .so + if { [ regexp {powerpc-apple-darwin} $host_triplet] } { + set so_extension "dylib" + set so_flag "-dynamiclib" + } else { + set so_extension "so" + set so_flag "-shared" + } set name [file rootname [file tail $file]] ! set soname lib${name}.${so_extension} ! lappend options "additional_flags=${so_flag} -fPIC" # Find the generated header. lappend options "additional_flags=-I. -I.." # Find jni.h. *************** proc gcj_jni_build_header {file} { *** 43,95 **** return 1 } ! # Invoke the program and see what happens. Return 0 on failure. ! proc gcj_invoke {program expectFile ld_library_additions} { ! global env ! set lib_path $env(LD_LIBRARY_PATH) ! ! set newval . ! if {[llength $ld_library_additions] > 0} { ! append newval :[join $ld_library_additions :] ! } ! append newval :$lib_path ! ! setenv LD_LIBRARY_PATH $newval ! setenv SHLIB_PATH $newval ! ! verbose "LD_LIBRARY_PATH=$env(LD_LIBRARY_PATH)" ! ! set result [libjava_load ./$program] ! set status [lindex $result 0] ! set output [lindex $result 1] ! ! # Restore setting ! setenv LD_LIBRARY_PATH $lib_path ! setenv SHLIB_PATH $lib_path ! ! if {$status != "pass"} { ! verbose "got $output" ! fail "$program run" ! untested "$program output" ! return 0 ! } ! set id [open $expectFile r] ! set expected [read $id] ! close $id ! if {! [string compare $output $expected]} { ! pass "$program output" ! return 1 } else { ! fail "$program output" ! return 0 } - } - - # Do all the work for a single JNI test. Return 0 on failure. - proc gcj_jni_test_one {file} { - global runtests # The base name. We use it for several purposes. set main [file rootname [file tail $file]] --- 58,77 ---- return 1 } ! # Do all the work for a single JNI test. Return 0 on failure. ! proc gcj_jni_test_one {file} { ! global runtests ! global host_triplet ! # apple uses a different extension for shared/dynamic libraries ! # so we check against powerpc-apple-darwin and set them to ! # dylib, else we assume it's .so ! if { [ regexp {powerpc-apple-darwin} $host_triplet] } { ! set so_extension "dylib" } else { ! set so_extension "so" } # The base name. We use it for several purposes. set main [file rootname [file tail $file]] *************** proc gcj_jni_test_one {file} { *** 156,162 **** } # When we succeed we remove all our clutter. ! eval gcj_cleanup [glob -nocomplain -- ${main}.*] [list $main lib${main}.so] return 1 } --- 138,144 ---- } # When we succeed we remove all our clutter. ! eval gcj_cleanup [glob -nocomplain -- ${main}.*] [list $main lib${main}.${so_extension}] return 1 } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.jni/jniutf.c gcc-3.4.0/libjava/testsuite/libjava.jni/jniutf.c *** gcc-3.3.3/libjava/testsuite/libjava.jni/jniutf.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.jni/jniutf.c 2003-11-14 01:43:14.000000000 +0000 *************** *** 0 **** --- 1,10 ---- + #include + + JNIEXPORT void JNICALL + Java_jniutf_printString (JNIEnv *env, jobject obj, jstring str) + { + const char *cstr; + + cstr = (*env)->GetStringUTFChars (env, str, NULL); + (*env)->ReleaseStringUTFChars (env, str, cstr); + } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.jni/jniutf.java gcc-3.4.0/libjava/testsuite/libjava.jni/jniutf.java *** gcc-3.3.3/libjava/testsuite/libjava.jni/jniutf.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.jni/jniutf.java 2003-11-14 01:43:14.000000000 +0000 *************** *** 0 **** --- 1,16 ---- + public class jniutf + { + native void printString (String str); + + static + { + System.loadLibrary ("jniutf"); + } + + public static void main (String[] args) + { + + String s1 = new String("\u3040\u3041\u3042\u3043\u3044\u3045\u3046\u3047\u3048\u3049\u304A\u304B\u304C\u304D\u304E\u304F\u3050\u3051\u3052\u3053\u3054\u3055\u3056\u3057\u3058\u3059\u305A\u305B"); + new jniutf().printString (s1); + } + } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.jni/pr11951.c gcc-3.4.0/libjava/testsuite/libjava.jni/pr11951.c *** gcc-3.3.3/libjava/testsuite/libjava.jni/pr11951.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.jni/pr11951.c 2003-08-18 14:35:34.000000000 +0000 *************** *** 0 **** --- 1,16 ---- + #include + #include + + JNIEXPORT void JNICALL + Java_pr11951_nmethod (JNIEnv *env, jclass myclass) + { + jmethodID method; + jobject r; + + method = (*env)->GetStaticMethodID (env, myclass, "dosomething", + "()Ljava/lang/Object;"); + r = (*env)->CallStaticObjectMethod (env, myclass, method); + printf ("%d\n", r == NULL); + + (*env)->ExceptionClear (env); + } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.jni/pr11951.java gcc-3.4.0/libjava/testsuite/libjava.jni/pr11951.java *** gcc-3.3.3/libjava/testsuite/libjava.jni/pr11951.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.jni/pr11951.java 2003-08-18 14:35:34.000000000 +0000 *************** *** 0 **** --- 1,14 ---- + public class pr11951 + { + public static Object dosomething() + { + throw new Error(); + } + + public static native void nmethod(); + + public static void main(String[] args) + { + nmethod(); + } + } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.jni/pr11951.out gcc-3.4.0/libjava/testsuite/libjava.jni/pr11951.out *** gcc-3.3.3/libjava/testsuite/libjava.jni/pr11951.out 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.jni/pr11951.out 2003-08-18 14:35:34.000000000 +0000 *************** *** 0 **** --- 1 ---- + 1 diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.lang/CompareNaN.java gcc-3.4.0/libjava/testsuite/libjava.lang/CompareNaN.java *** gcc-3.3.3/libjava/testsuite/libjava.lang/CompareNaN.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.lang/CompareNaN.java 2003-02-17 16:07:49.000000000 +0000 *************** *** 0 **** --- 1,15 ---- + /* + * JLS 4.2.3 specifies that (x op y) must be false if either x or y + * is NaN and op is one of <, >, <=, >=, or ==. + * + * Some targets may need specific options wired into libgcj.spec + * to pass this test. For example, alpha-linux requires -mieee + * to prevent an unrecoverable fp trap. + */ + + public class CompareNaN { + public static void main(String[] args) { + double x = Double.NaN; + System.out.println(x == x); + } + } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.lang/CompareNaN.out gcc-3.4.0/libjava/testsuite/libjava.lang/CompareNaN.out *** gcc-3.3.3/libjava/testsuite/libjava.lang/CompareNaN.out 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.lang/CompareNaN.out 2003-02-17 16:07:49.000000000 +0000 *************** *** 0 **** --- 1 ---- + false diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.lang/lang.exp gcc-3.4.0/libjava/testsuite/libjava.lang/lang.exp *** gcc-3.3.3/libjava/testsuite/libjava.lang/lang.exp 2002-07-18 17:42:31.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.lang/lang.exp 2003-09-05 01:53:47.000000000 +0000 *************** foreach x $srcfiles { *** 27,33 **** verbose "inpfile is $inpfile" test_libjava $options "${prefix}.java" "" $inpfile $resfile $args ! test_libjava $options "${prefix}.java" "-O" $inpfile $resfile $args } # Local Variables: --- 27,33 ---- verbose "inpfile is $inpfile" test_libjava $options "${prefix}.java" "" $inpfile $resfile $args ! test_libjava $options "${prefix}.java" "-O3" $inpfile $resfile $args } # Local Variables: diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.lang/MathBuiltin.java gcc-3.4.0/libjava/testsuite/libjava.lang/MathBuiltin.java *** gcc-3.3.3/libjava/testsuite/libjava.lang/MathBuiltin.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.lang/MathBuiltin.java 2003-06-08 18:17:53.000000000 +0000 *************** *** 0 **** --- 1,70 ---- + class MathBuiltin + { + static double abs(double x) + { + return Math.abs(x); + } + + static double atan(double x) + { + return Math.atan(x); + } + + static double atan2(double x, double y) + { + return Math.atan2(x,y); + } + + static double cos(double x) + { + return Math.cos(x); + } + + static double exp(double x) + { + return Math.exp(x); + } + + static double log(double x) + { + return Math.log(x); + } + + static double max(double x, double y) + { + return Math.max(x,y); + } + + static double min(double x, double y) + { + return Math.min(x,y); + } + + static double pow(double x, double y) + { + return Math.pow(x,y); + } + + static double sin(double x) + { + return Math.sin(x); + } + + static double sqrt(double x) + { + return Math.sqrt(x); + } + + static double tan(double x) + { + return Math.tan(x); + } + + public static void main(String argv[]) + { + double sum = abs (1.0) + atan (1.0) + atan2 (1.0, 1.0) + cos (1.0) + + exp (1.0) + log(1.0) + max(1.0, 1.0) + min (1.0, 1.0) + + pow (1.0, 1.0) + sin (1.0) + sqrt(1.0) + tan(1.0); + } + } + diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.lang/newarray_overflow.java gcc-3.4.0/libjava/testsuite/libjava.lang/newarray_overflow.java *** gcc-3.3.3/libjava/testsuite/libjava.lang/newarray_overflow.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.lang/newarray_overflow.java 2003-10-16 21:19:53.000000000 +0000 *************** *** 0 **** --- 1,88 ---- + /* This test checks for two slightly different overflow scenarios in + * array allocation. + * + * The first is that the number of bytes needed for an array size + * overflows on a 32 bit machine. + * + * The second is that on a 64 machine, the number of bytes silently + * gets truncated, resulting in too small an object being + * allocated. */ + + class newarray_overflow + { + static boolean failed = false; + + static void int_check() + { + int[] x; + try + { + x = new int [1 << 30]; + } + catch (OutOfMemoryError e) + { + return; + } + /* If we really get away with it (64 bit machine), that's cool. */ + if (x == null) { + System.err.println ("int check: new returned null."); + failed = true; + return; + } + try + { + // Only check a few places so we don't thrash too badly. + for (int i = 0; i < x.length; i += (1 << 24)) + if (x[i] != 0) + failed = true; + } + catch (Throwable e) + { + System.err.print ("int check: "); + System.err.println (e); + failed = true; + } + } + + static void object_check() + { + Object[] x; + try + { + x = new Object [1 << 30]; + System.err.println ("Alloc succeeded."); + System.err.println (x); + } + catch (OutOfMemoryError e) + { + return; + } + /* If we really get away with it (64 bit machine), that's cool. */ + if (x == null) { + System.err.println ("Object check: new returned null."); + failed = true; + return; + } + try + { + for (int i = 0; i < x.length; i += (1 << 24)) + if (x[i] != null) + failed = true; + } + catch (Throwable e) + { + System.err.print ("Object check: "); + System.err.println (e); + failed = true; + } + } + + public static void main (String[] ignore) + { + int_check(); + object_check(); + + if (!failed) + System.out.println ("ok"); + } + } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.lang/newarray_overflow.out gcc-3.4.0/libjava/testsuite/libjava.lang/newarray_overflow.out *** gcc-3.3.3/libjava/testsuite/libjava.lang/newarray_overflow.out 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.lang/newarray_overflow.out 2003-10-16 21:19:53.000000000 +0000 *************** *** 0 **** --- 1 ---- + ok diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.lang/Overflow.java gcc-3.4.0/libjava/testsuite/libjava.lang/Overflow.java *** gcc-3.3.3/libjava/testsuite/libjava.lang/Overflow.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.lang/Overflow.java 2003-05-31 13:23:32.000000000 +0000 *************** *** 0 **** --- 1,16 ---- + class Overflow + { + static int test(int x) + { + return (2*x)/2; + } + + public static void main(String argv[]) + { + int x = Integer.MAX_VALUE; + + if (test(x) == x) + throw new RuntimeException (); + } + } + diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.lang/PR12350.java gcc-3.4.0/libjava/testsuite/libjava.lang/PR12350.java *** gcc-3.3.3/libjava/testsuite/libjava.lang/PR12350.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.lang/PR12350.java 2003-09-22 08:17:49.000000000 +0000 *************** *** 0 **** --- 1,20 ---- + public class PR12350 + { + static public void main (String[] ignored) throws Throwable + { + StringBuffer b = new StringBuffer ("Good string. More than 16 chars."); + + // Should cause sharing. + String s = b.toString(); + + // Take a char by char unshared copy of s. + String t = new String (s.toCharArray()); + + b.substring (0, 4); // BUG: Clears shared flag. + b.replace (0, 4, "Bad "); // Modifies shared data. + + System.out.println (s); + assert s.equals (t); + } + + } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.lang/PR12350.out gcc-3.4.0/libjava/testsuite/libjava.lang/PR12350.out *** gcc-3.3.3/libjava/testsuite/libjava.lang/PR12350.out 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.lang/PR12350.out 2003-09-22 08:17:49.000000000 +0000 *************** *** 0 **** --- 1 ---- + Good string. More than 16 chars. diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.lang/PR12416.java gcc-3.4.0/libjava/testsuite/libjava.lang/PR12416.java *** gcc-3.3.3/libjava/testsuite/libjava.lang/PR12416.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.lang/PR12416.java 2003-10-22 19:28:15.000000000 +0000 *************** *** 0 **** --- 1,22 ---- + interface A + { + int a = 0; + } + interface B extends A + { + } + interface C extends A + { + } + + public class PR12416 implements B, C + { + static public void main (String[] unused) + { + java.lang.reflect.Field[] fields = PR12416.class.getFields(); + + for (int i = 0; i != fields.length; ++i) { + System.out.println (fields[i]); + } + } + } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.lang/PR12416.out gcc-3.4.0/libjava/testsuite/libjava.lang/PR12416.out *** gcc-3.3.3/libjava/testsuite/libjava.lang/PR12416.out 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.lang/PR12416.out 2003-10-22 19:28:15.000000000 +0000 *************** *** 0 **** --- 1 ---- + public static final int A.a diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.lang/PR12656.java gcc-3.4.0/libjava/testsuite/libjava.lang/PR12656.java *** gcc-3.3.3/libjava/testsuite/libjava.lang/PR12656.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.lang/PR12656.java 2003-10-22 18:04:35.000000000 +0000 *************** *** 0 **** --- 1,11 ---- + class PR12656_base + { + public static void main(String[] args) + { + System.out.println("Maude"); + } + } + + public class PR12656 extends PR12656_base + { + } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.lang/PR12656.out gcc-3.4.0/libjava/testsuite/libjava.lang/PR12656.out *** gcc-3.3.3/libjava/testsuite/libjava.lang/PR12656.out 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.lang/PR12656.out 2003-10-22 18:04:35.000000000 +0000 *************** *** 0 **** --- 1 ---- + Maude diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.lang/PR12915.java gcc-3.4.0/libjava/testsuite/libjava.lang/PR12915.java *** gcc-3.3.3/libjava/testsuite/libjava.lang/PR12915.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.lang/PR12915.java 2003-11-11 20:11:43.000000000 +0000 *************** *** 0 **** --- 1,6 ---- + public class PR12915 { + public static void main(String[] args) + { + System.out.println(((String) null) + ""); + } + } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.lang/PR12915.out gcc-3.4.0/libjava/testsuite/libjava.lang/PR12915.out *** gcc-3.3.3/libjava/testsuite/libjava.lang/PR12915.out 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.lang/PR12915.out 2003-11-11 20:11:43.000000000 +0000 *************** *** 0 **** --- 1 ---- + null diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.lang/PR7482.java gcc-3.4.0/libjava/testsuite/libjava.lang/PR7482.java *** gcc-3.3.3/libjava/testsuite/libjava.lang/PR7482.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.lang/PR7482.java 2003-07-24 17:17:24.000000000 +0000 *************** *** 0 **** --- 1,35 ---- + public class PR7482 + { + private interface I { } + private static class B { } + private static class U extends B implements I { } + private static class V extends B implements I { } + + static I field; + + private static void g1(Object o) + { + I val; + if (o == null) + val = new U(); + else + val = new V(); + field = val; + } + + private static I g2(Object o) + { + I val; + if (o == null) + val = new U(); + else + val = new V(); + return val; + } + + public static void main(String[] args) + { + g1(null); + g2(null); + } + } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.lang/pr8823.xfail gcc-3.4.0/libjava/testsuite/libjava.lang/pr8823.xfail *** gcc-3.3.3/libjava/testsuite/libjava.lang/pr8823.xfail 2003-01-28 01:35:48.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.lang/pr8823.xfail 1970-01-01 00:00:00.000000000 +0000 *************** *** 1 **** - xfail-byte --- 0 ---- diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.lang/StringBuffer_overflow.java gcc-3.4.0/libjava/testsuite/libjava.lang/StringBuffer_overflow.java *** gcc-3.3.3/libjava/testsuite/libjava.lang/StringBuffer_overflow.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.lang/StringBuffer_overflow.java 2003-10-16 21:35:42.000000000 +0000 *************** *** 0 **** --- 1,126 ---- + /* This tests some corner cases of arithmetic in StringBuffer. */ + + /* These tests can all be run on a 32 bit machine with modest amounts + * of memory. */ + + /* The symptom of the problem is that ArrayIndexOutOfBoundsException + * gets thrown, while the documentation says that + * StringIndexOutOfBoundsException should be thrown. */ + + class StringBuffer_overflow + { + /* Test correct exception on getChars. */ + static void getChars() + { + StringBuffer b = new StringBuffer ("x"); + char[] s = new char [1]; + try + { + // The substring we are attempting to obtain is invalid, + // so we should get a StringIndexOutOfBoundsException. + b.getChars (1, -1 << 31, s, 0); + Fail ("getChars", "no exception"); + } + catch (Throwable e) + { + ExpectStringIndex ("getChars()", e); + } + } + + /* Test correct exception on append with bogus count. */ + static void append() + { + StringBuffer s = new StringBuffer("a"); + try + { + s.append ("".toCharArray(), 1, (1<<31)-1); + Fail ("append", "no exception"); + } + catch (Throwable e) + { + ExpectStringIndex ("append", e); + } + } + + // Check that append still more or less works. + static void appendbasic() + { + StringBuffer s = new StringBuffer(); + + try + { + if (!new StringBuffer().append ("abcdefg".toCharArray()) + .toString().equals ("abcdefg")) + { + Fail ("appendbasic", "append gives incorrect result"); + } + } + catch (Throwable e) + { + Fail ("appendbasic", e); + } + } + + /* Test correct expception on substring with bogus indexes. */ + static void substring() + { + StringBuffer s = new StringBuffer ("abc"); + try + { + // end - begin == -2 - ((1<<31)-1) == (1<<31) - 1 > 0. */ + s.substring ((1<<31)-1, -2); + Fail ("substring", "no exception"); + } + catch (Throwable e) + { + ExpectStringIndex ("substring", e); + } + } + + static void insert() + { + StringBuffer s = new StringBuffer (""); + try + { + s.insert (0, "abcd".toCharArray(), (1<<31)-1, 1); + Fail ("insert", "no exception"); + } + catch (Throwable e) + { + ExpectStringIndex ("insert", e); + } + } + + + public static void main (String[] unused) + { + getChars(); + append(); + appendbasic(); + substring(); + insert(); + + if (tests_failed == 0) + { + System.out.println ("ok"); + } + } + + static int tests_failed = 0; + + static void ExpectStringIndex (String name, Throwable exception) + { + if (! (exception instanceof StringIndexOutOfBoundsException)) + { + Fail (name, exception); + } + } + static void Fail (String name, Object why) + { + ++tests_failed; + + System.err.print (name); + System.err.print ('\t'); + System.err.println (why); + } + } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.lang/StringBuffer_overflow.out gcc-3.4.0/libjava/testsuite/libjava.lang/StringBuffer_overflow.out *** gcc-3.3.3/libjava/testsuite/libjava.lang/StringBuffer_overflow.out 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.lang/StringBuffer_overflow.out 2003-10-16 21:35:42.000000000 +0000 *************** *** 0 **** --- 1 ---- + ok diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.lang/String_overflow.java gcc-3.4.0/libjava/testsuite/libjava.lang/String_overflow.java *** gcc-3.3.3/libjava/testsuite/libjava.lang/String_overflow.java 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.lang/String_overflow.java 2003-10-16 21:28:23.000000000 +0000 *************** *** 0 **** --- 1,140 ---- + class String_overflow + { + static void getChars() + { + String source = "abcdefg"; + char[] dest = new char [3]; + + try + { + source.getChars (0, 5, // Source + dest, (1<<31) - 1); + Fail ("getChars", "Should not have succeeded"); + } + catch (Throwable e) + { + ExpectArrayIndex ("getChars", e); + } + } + + /* How do I stop a compiler warning causing a test to fail? + static void getBytes() + { + String source = "abcdefg"; + byte[] dest = new byte[3]; + + try + { + source.getBytes (0, 5, dest, (1<<31) - 1); + Fail ("getBytes", "Should not have succeeded"); + } + catch (Throwable e) + { + ExpectArrayIndex ("getBytes", e); + } + } + */ + + static void regionMatches() + { + if ("abcdefg".regionMatches (4, "abcdefg", 4, -1)) + { + Fail ("regionMatches", "Should not return true"); + } + + try + { + if ("abcdefg".regionMatches (4, "abcdefg", 4, (1<<31)-1)) + { + Fail ("regionMatches (2nd)", "Should not return true"); + } + } + catch (Throwable e) + { + Fail ("regionMatches (2nd)", e); + } + } + + static void regionMatchesCase() + { + if ("abcdefg".regionMatches (true, 4, "abcdefg", 4, -1)) + { + Fail ("regionMatchesCase", "Should not return true"); + } + + try + { + if ("abcdefg".regionMatches (true, 4, "abcdefg", 4, (1<<31)-1)) + { + Fail ("regionMatchesCase (2nd)", "Should not return true"); + } + } + catch (Throwable e) + { + Fail ("regionMatchesCase (2nd)", e); + } + } + + static void startsWith() + { + // We make the arg pretty big to try and cause a segfault. + String s = new String ("abcdef"); + StringBuffer b = new StringBuffer (1000000); + b.setLength (1000000); + String arg = new String (b); + + try + { + s.startsWith (arg, (1<<31) - 1000000); + } + catch (Throwable e) + { + Fail ("startsWith", e); + } + } + + static void valueOf() + { + char[] array = new char[] {'a', 'b', 'c', 'd', 'e'}; + try + { + String.valueOf (array, 4, (1<<31)-1); + Fail ("valueOf", "should not succeed"); + } + catch (Throwable e) + { + ExpectArrayIndex ("valueOf", e); + } + } + + public static void main (String[] args) throws Throwable + { + getChars(); + // getBytes(); + regionMatches(); + regionMatchesCase(); + startsWith(); + valueOf(); + + if (tests_failed == 0) + System.out.println ("ok"); + } + + static void ExpectArrayIndex (String test, Throwable e) + { + if (e instanceof ArrayIndexOutOfBoundsException) + return; + + Fail (test, e); + } + + static void Fail (String test, Object problem) + { + ++tests_failed; + System.err.print (test); + System.err.print ('\t'); + System.err.println (problem); + } + + static int tests_failed; + } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.lang/String_overflow.out gcc-3.4.0/libjava/testsuite/libjava.lang/String_overflow.out *** gcc-3.3.3/libjava/testsuite/libjava.lang/String_overflow.out 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.lang/String_overflow.out 2003-10-16 21:28:23.000000000 +0000 *************** *** 0 **** --- 1 ---- + ok diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.lang/SyncTest.java gcc-3.4.0/libjava/testsuite/libjava.lang/SyncTest.java *** gcc-3.3.3/libjava/testsuite/libjava.lang/SyncTest.java 2001-07-31 02:13:46.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.lang/SyncTest.java 2003-07-09 21:07:42.000000000 +0000 *************** public class SyncTest implements Runnabl *** 3,10 **** static int counter; public void run() { for (int n = 0; n < 1000000; n++) ! synchronized (SyncTest.class) { counter++; } } --- 3,13 ---- static int counter; public void run() { + // We cache the .class value; otherwise this code is + // slow enough that it will time out in some situations. + Object lock = SyncTest.class; for (int n = 0; n < 1000000; n++) ! synchronized (lock) { counter++; } } diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.loader/TestEarlyGC.java gcc-3.4.0/libjava/testsuite/libjava.loader/TestEarlyGC.java *** gcc-3.3.3/libjava/testsuite/libjava.loader/TestEarlyGC.java 2002-11-04 04:17:38.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.loader/TestEarlyGC.java 2003-01-28 23:21:13.000000000 +0000 *************** public class TestEarlyGC extends ClassLo *** 2,7 **** --- 2,19 ---- static TestEarlyGC[] a = new TestEarlyGC[10]; + // Jeff Sturm writes: + // Reconstructed from bytecode (and memory). The singleton pattern + // is used as a class finalizer. + // public class C { + // private static C c; + // public C() { + // c = this; + // } + // protected void finalize() { + // System.out.println("finalized"); + // } + // } byte[] code = { -54,-2,-70,-66,0,3,0,45,0,32,1,0,1,67,7,0, 1,1,0,16,106,97,118,97,47,108,97,110,103,47,79,98, diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.mauve/mauve.exp gcc-3.4.0/libjava/testsuite/libjava.mauve/mauve.exp *** gcc-3.3.3/libjava/testsuite/libjava.mauve/mauve.exp 2003-02-15 16:47:37.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.mauve/mauve.exp 2003-08-12 17:59:17.000000000 +0000 *************** proc find_mauve_sources {} { *** 74,79 **** --- 74,89 ---- return 0 } + # Find all the harness files and return a list of them, with no + # suffix. + proc mauve_find_harness_files {} { + set result {} + foreach file [glob -nocomplain -- *.class gnu/testlet/*.class] { + lappend result [file root $file] + } + return $result + } + # Run all the Mauve tests. Return 1 on success, 0 on any failure. If # the tests are skipped, that is treated like success. proc test_mauve {} { *************** proc test_mauve {} { *** 111,117 **** # Append -B and -I so that libgcj.spec and libgcj.jar are found # before they're installed. ! set env(GCJ) "$GCJ_UNDER_TEST -B$objdir/../ -I$libgcj_jar" if {[catch { system "$env(MAUVEDIR)/configure --with-gcj 2>&1" --- 121,128 ---- # Append -B and -I so that libgcj.spec and libgcj.jar are found # before they're installed. ! # Append -Wno-deprecated since Mauve tests lots of deprecated stuff. ! set env(GCJ) "$GCJ_UNDER_TEST -Wno-deprecated -B$objdir/../ -I$libgcj_jar" if {[catch { system "$env(MAUVEDIR)/configure --with-gcj 2>&1" *************** proc test_mauve {} { *** 156,166 **** set link_args [concat [libjava_arguments link] \ [list "additional_flags=--main=DejaGNUTestHarness"]] set ok 1 set objlist {} ! foreach base {DejaGNUTestHarness gnu/testlet/SimpleTestHarness gnu/testlet/TestHarness gnu/testlet/Testlet gnu/testlet/ResourceNotFoundException gnu/testlet/config} { set file $base.class ! set obj $base.o set x [libjava_prune_warnings \ [target_compile [pwd]/$file $obj object $compile_args]] if {$x != ""} then { --- 167,183 ---- set link_args [concat [libjava_arguments link] \ [list "additional_flags=--main=DejaGNUTestHarness"]] + if {[string match "*libtool*" $compile_args]} { + set objext lo + } else { + set objext o + } + set ok 1 set objlist {} ! foreach base [mauve_find_harness_files] { set file $base.class ! set obj $base.$objext set x [libjava_prune_warnings \ [target_compile [pwd]/$file $obj object $compile_args]] if {$x != ""} then { *************** proc test_mauve {} { *** 183,189 **** --- 200,209 ---- regsub -all -- / $class . class set ok 1 + set this_olist {} foreach obj $uses($file) { + set obj [file rootname $obj].$objext + lappend this_olist $obj if {! [file exists $obj]} then { verbose "compiling $obj for test of $class" # The .class file does contain a $, but we can quote it between "'"s. *************** proc test_mauve {} { *** 205,211 **** } set x [libjava_prune_warnings \ ! [libjava_tcompile [concat $uses($file) $objlist] \ $Executable executable $link_args]] if {$x != ""} then { set proc_ok 0 --- 225,231 ---- } set x [libjava_prune_warnings \ ! [libjava_tcompile [concat $this_olist $objlist] \ $Executable executable $link_args]] if {$x != ""} then { set proc_ok 0 *************** proc test_mauve_sim {} { *** 297,305 **** set ok 1 set objlist {} ! foreach base {gnu/testlet/SimpleTestHarness gnu/testlet/TestHarness \ ! gnu/testlet/Testlet gnu/testlet/ResourceNotFoundException \ ! gnu/testlet/config} { set file $base.class set obj $base.o set x [libjava_prune_warnings \ --- 317,323 ---- set ok 1 set objlist {} ! foreach base [mauve_find_harness_files] { set file $base.class set obj $base.o set x [libjava_prune_warnings \ *************** proc test_mauve_sim {} { *** 316,323 **** return 0 } - lappend objlist gnu/testlet/DejaGNUTestHarness.o - set proc_ok 1 set Executable DejaGNUTestHarness foreach file $choices { --- 334,339 ---- *************** proc test_mauve_sim {} { *** 368,375 **** } set x [libjava_prune_warnings \ ! [target_compile gnu/testlet/DejaGNUTestHarness.class \ ! gnu/testlet/DejaGNUTestHarness.o object $compile_args]] if {$x != ""} then { fail "Compile DejaGNUTestHarness.java" set proc_ok 0 --- 384,391 ---- } set x [libjava_prune_warnings \ ! [target_compile DejaGNUTestHarness.class \ ! DejaGNUTestHarness.o object $compile_args]] if {$x != ""} then { fail "Compile DejaGNUTestHarness.java" set proc_ok 0 diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.mauve/xfails gcc-3.4.0/libjava/testsuite/libjava.mauve/xfails *** gcc-3.3.3/libjava/testsuite/libjava.mauve/xfails 2003-04-17 06:08:02.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.mauve/xfails 2003-12-31 10:29:05.000000000 +0000 *************** *** 1,15 **** - FAIL: gnu.testlet.java.beans.Introspector.jdk11: getBeanInfo (number 16) - FAIL: gnu.testlet.java.beans.Introspector.jdk11: getBeanInfo (number 17) - FAIL: gnu.testlet.java.beans.Introspector.jdk11: getBeanInfo (number 19) - FAIL: gnu.testlet.java.beans.Introspector.jdk11: getBeanInfo (number 21) - FAIL: gnu.testlet.java.beans.Introspector.jdk11: getBeanInfo (number 22) - FAIL: gnu.testlet.java.beans.Introspector.jdk11: getBeanInfo (number 24) - FAIL: gnu.testlet.java.beans.Introspector.jdk11: getBeanInfo (number 25) - FAIL: gnu.testlet.java.beans.Introspector.jdk11: getBeanInfo (number 27) - FAIL: gnu.testlet.java.beans.Introspector.jdk11: getBeanInfo (number 28) FAIL: gnu.testlet.java.io.BufferedByteOutputStream.interrupt: single-byte writes (number 3) FAIL: gnu.testlet.java.io.BufferedByteOutputStream.interrupt: single-byte writes (number 4) - FAIL: gnu.testlet.java.io.PipedStream.close (number 1) FAIL: gnu.testlet.java.io.Utf8Encoding.mojo: Four Byte Range Error (0) (number 1) FAIL: gnu.testlet.java.io.Utf8Encoding.mojo: Four Byte Range Error (1) (number 1) FAIL: gnu.testlet.java.io.Utf8Encoding.mojo: Five Bytes (0) (number 1) --- 1,5 ---- *************** FAIL: gnu.testlet.java.lang.Class.reflec *** 34,41 **** FAIL: gnu.testlet.java.lang.Class.reflect2: getDeclaredClasses (number 1) FAIL: gnu.testlet.java.lang.Class.reflect2: getDeclaredClasses (number 2) FAIL: gnu.testlet.java.lang.Class.reflect2: getDeclaredClasses (number 3) - FAIL: gnu.testlet.java.lang.Double.DoubleTest: Error: test_intValue returned wrong results CYGNUS: Float to int conversions - 1 (number 1) - FAIL: gnu.testlet.java.lang.Float.FloatTest: Error: test_intValue returned wrong results - 1 (number 1) FAIL: gnu.testlet.java.lang.String.getBytes13: String.getBytes("UTF-16") (number 1) FAIL: gnu.testlet.java.lang.String.getBytes13: String.getBytes("UnicodeBig") (number 1) FAIL: gnu.testlet.java.lang.String.getBytes13: String.getBytes("UnicodeBigUnmarked") (number 1) --- 24,29 ---- *************** FAIL: gnu.testlet.java.lang.String.getBy *** 46,58 **** FAIL: gnu.testlet.java.lang.String.getBytes14: String.getBytes("UTF-16LE") (number 1) FAIL: gnu.testlet.java.text.AttributedString.Test: Attribute key count (number 1) FAIL: gnu.testlet.java.text.DateFormatSymbols.Test: patterns (number 2) - FAIL: gnu.testlet.java.text.SimpleDateFormat.Test: equals() (number 1) - FAIL: gnu.testlet.java.text.SimpleDateFormat.Test: parse() strict (number 1) FAIL: gnu.testlet.java.text.SimpleDateFormat.getAndSet2DigitYearStart: get2DigitYearStart() initial (number 1) - FAIL: gnu.testlet.java.text.SimpleDateFormat.regress: CDT (number 1) - FAIL: gnu.testlet.java.text.SimpleDateFormat.regress: EDT (number 1) - FAIL: gnu.testlet.java.text.SimpleDateFormat.regress: EST (number 1) - FAIL: gnu.testlet.java.text.SimpleDateFormat.regress: PDT (number 1) FAIL: gnu.testlet.java.text.DateFormatSymbols.Test: invalid locale (number 1) FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: CollationElementIterator (number 1) FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 0 (number 1) --- 34,40 ---- *************** FAIL: gnu.testlet.java.text.CollationEle *** 88,130 **** FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: secondaryOrder() 7 (number 1) FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: secondaryOrder() 9 (number 1) FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: tertiaryOrder() 10 (number 1) ! FAIL: gnu.testlet.java.net.ServerSocket.ServerSocketTest: Error : test_params failed - 5getInetAddress did not return proper values (number 1) ! FAIL: gnu.testlet.java.net.Socket.SocketTest: Error : test_BasicServer failed - 11 exception was thrown :Illegal seek (number 1) FAIL: gnu.testlet.java.net.URLConnection.URLConnectionTest: Error in test_Basics - 2 should not have raised Throwable here (number 1) FAIL: gnu.testlet.java.net.URLConnection.URLConnectionTest: Error in test_getHeaderField - 2 4 header field wrong (number 1) FAIL: gnu.testlet.java.net.URL.URLTest: openStream (number 1) - FAIL: gnu.testlet.java.net.URL.URLTest: sameFile (number 2) FAIL: gnu.testlet.java.net.URL.URLTest: Error in test_toString - 5 exception should not be thrown here (number 1) - FAIL: gnu.testlet.java.net.URL.URLTest: new URL(string) (number 16) - FAIL: gnu.testlet.java.net.URL.URLTest: new URL(string) (number 18) - FAIL: gnu.testlet.java.net.URL.URLTest: new URL(protocol, host, file) (number 26) - FAIL: gnu.testlet.java.net.URL.URLTest: new URL(protocol, host, file) (number 54) FAIL: gnu.testlet.java.net.MulticastSocket.MulticastSocketTest: joinGroup() twice. (number 1) - FAIL: gnu.testlet.java.io.File.jdk11: getCanonicalPath () (number 1) - FAIL: gnu.testlet.java.io.ObjectInputOutput.InputTest: gnu.testlet.java.io.ObjectInputOutput.Test$GetPutField (number 1) - FAIL: gnu.testlet.java.io.ObjectInputOutput.OutputTest: Serializable: gnu.testlet.java.io.ObjectInputOutput.Test$Extern () (number 2) - FAIL: gnu.testlet.java.io.ObjectInputOutput.OutputTest: Serializable: test(str=null, x=0) (number 2) - FAIL: gnu.testlet.java.io.OutputStreamWriter.jdk11: OutputStreamWriter(writer, encoding) (number 1) - FAIL: gnu.testlet.java.io.OutputStreamWriter.jdk11: OutputStreamWriter(writer, encoding) // alias (number 1) - FAIL: gnu.testlet.java.lang.Double.DoubleTest: Error: test_shortbyteValue failed - 5 (number 1) - FAIL: gnu.testlet.java.lang.Float.FloatTest: Error: test_shortbyteValue failed - 5 (number 1) - FAIL: gnu.testlet.java.net.DatagramSocket.DatagramSocketTest2: Expected IOException (number 1) - FAIL: gnu.testlet.java.net.Socket.SocketTest: Error : test_params failed - 1 get port did not return proper values (number 1) - FAIL: gnu.testlet.java.net.Socket.jdk13: unexpected error: Success (number 1) - FAIL: gnu.testlet.java.sql.Date.DateTest: getHours (number 1) - FAIL: gnu.testlet.java.sql.Date.DateTest: getMinutes (number 1) - FAIL: gnu.testlet.java.sql.Date.DateTest: getSeconds (number 1) - FAIL: gnu.testlet.java.sql.Date.DateTest: setHours (number 1) - FAIL: gnu.testlet.java.sql.Date.DateTest: setMinutes (number 1) - FAIL: gnu.testlet.java.sql.Date.DateTest: setSeconds (number 1) - FAIL: gnu.testlet.java.sql.Date.DateTest: valueOf (number 1) - FAIL: gnu.testlet.java.sql.DriverManager.DriverManagerTest: getDriver (number 1) - FAIL: gnu.testlet.java.sql.Time.TimeTest: getDate (number 1) - FAIL: gnu.testlet.java.sql.Time.TimeTest: getDay (number 1) - FAIL: gnu.testlet.java.sql.Time.TimeTest: getMonth (number 1) - FAIL: gnu.testlet.java.sql.Time.TimeTest: getYear (number 1) - FAIL: gnu.testlet.java.sql.Time.TimeTest: setDate (number 1) - FAIL: gnu.testlet.java.sql.Time.TimeTest: setMonth (number 1) - FAIL: gnu.testlet.java.sql.Time.TimeTest: setYear (number 1) - FAIL: gnu.testlet.java.sql.Time.TimeTest: valueOf (number 1) - FAIL: gnu.testlet.java.sql.Timestamp.TimestampTest: valueOf (number 1) --- 70,143 ---- FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: secondaryOrder() 7 (number 1) FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: secondaryOrder() 9 (number 1) FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: tertiaryOrder() 10 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 2 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 2 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 4 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 4 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 6 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 6 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 8 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 8 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 10 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 10 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 12 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 12 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 14 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 14 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 16 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 16 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 18 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 18 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 20 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 20 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 22 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 22 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 24 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 24 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 26 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 26 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 28 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 28 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 30 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 30 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 32 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 32 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 34 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 34 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 36 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 36 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 38 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 38 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 40 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 40 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 42 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 42 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 44 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 44 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 46 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 46 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 48 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 48 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 50 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 50 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 52 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 52 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 54 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 54 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 56 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 56 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 58 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 58 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 60 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 60 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 62 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no primary difference 62 test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: wrong number of keys test string #4 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: next() 2 test string #5 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: no tertiary difference2 test string #5 (number 1) ! FAIL: gnu.testlet.java.text.CollationElementIterator.jdk11: not tertiary ordered0, 2 test set #0 (number 1) FAIL: gnu.testlet.java.net.URLConnection.URLConnectionTest: Error in test_Basics - 2 should not have raised Throwable here (number 1) FAIL: gnu.testlet.java.net.URLConnection.URLConnectionTest: Error in test_getHeaderField - 2 4 header field wrong (number 1) FAIL: gnu.testlet.java.net.URL.URLTest: openStream (number 1) FAIL: gnu.testlet.java.net.URL.URLTest: Error in test_toString - 5 exception should not be thrown here (number 1) FAIL: gnu.testlet.java.net.MulticastSocket.MulticastSocketTest: joinGroup() twice. (number 1) diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.verify/README.verify gcc-3.4.0/libjava/testsuite/libjava.verify/README.verify *** gcc-3.3.3/libjava/testsuite/libjava.verify/README.verify 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.verify/README.verify 2003-07-11 22:23:13.000000000 +0000 *************** *** 0 **** --- 1,10 ---- + The verifier tests come from Mauve. + See http://sources.redhat.com/mauve + + You want the "verify" module in the Mauve cvs repository. + + In Mauve, only the sources are checked in. However, these need + jasmin to be compiled to bytecode. Since jasmin would require either + another VM or gcj itself to already be working and installed (just to + compile it), we've chose to precompile all the .j files to .class + files and then import the result. diff -Nrc3pad gcc-3.3.3/libjava/testsuite/libjava.verify/verify.exp gcc-3.4.0/libjava/testsuite/libjava.verify/verify.exp *** gcc-3.3.3/libjava/testsuite/libjava.verify/verify.exp 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/libjava.verify/verify.exp 2003-07-19 15:43:20.000000000 +0000 *************** *** 0 **** --- 1,83 ---- + # Tests for class verifier. + + global gcj_verify_xfail + set {gcj_verify_xfail(gij verify of call.fail.Static)} 1 + set {gcj_verify_xfail(gij verify of simple.fail.dupfield)} 1 + set {gcj_verify_xfail(gij verify of simple.fail.dupinterface)} 1 + set {gcj_verify_xfail(gij verify of simple.fail.dupmethod)} 1 + set {gcj_verify_xfail(gij verify of subr.fail.jsr10)} 1 + set {gcj_verify_xfail(gij verify of subr.fail.jsr8)} 1 + + + proc gcj_verify_list_tests {srcdir} { + set result {} + if {[file exists $srcdir]} { + set here [pwd] + cd $srcdir + foreach item [lsort [glob -nocomplain */*/*.class]] { + lappend result [file rootname $item] + } + cd $here + } + return $result + } + + proc gcj_verify_test_gij {gij srcdir test shouldfail} { + global gcj_verify_xfail + + set testname "gij verify of $test" + verbose "invoking gij $test - shouldfail=$shouldfail" + set result [libjava_load $gij [list --cp $srcdir $test] ""] + set status [lindex $result 0] + set output [lindex $result 1] + + if {$shouldfail} { + # We match the few exceptions that are allowed. This may need + # updating from time to time. We do this rather than check the + # exit status because we want to catch the case where gij dies in + # some inappropriate way. + if {[string match *VerifyError* $output] + || [string match *AbstractMethodError* $output] + || [string match *IncompatibleClassChangeError* $output]} { + set cmd pass + } else { + set cmd fail + } + if {[info exists gcj_verify_xfail($testname)]} { + setup_xfail *-*-* + } + } else { + if {$status == "pass"} { + set cmd pass + } else { + set cmd fail + } + } + $cmd $testname + } + + proc gcj_verify_run {} { + global INTERPRETER srcdir + + set gij [libjava_find_gij] + set interpret 1 + # libjava_find_gij will return `gij' if it couldn't find the + # program; in this case we want to skip the test. + if {$INTERPRETER != "yes" || $gij == "gij"} { + set interpret 0 + } + + set testsdir $srcdir/libjava.verify/verify + foreach test [gcj_verify_list_tests $testsdir] { + set shouldfail [string match */fail/* $test] + + if {$interpret} { + regsub -all -- / $test . gijname + gcj_verify_test_gij $gij $testsdir $gijname $shouldfail + } + + # FIXME: run gcj --syntax-only here. + } + } + + gcj_verify_run diff -Nrc3pad gcc-3.3.3/libjava/testsuite/Makefile.in gcc-3.4.0/libjava/testsuite/Makefile.in *** gcc-3.3.3/libjava/testsuite/Makefile.in 2003-03-01 22:57:53.000000000 +0000 --- gcc-3.4.0/libjava/testsuite/Makefile.in 2004-01-13 17:37:23.000000000 +0000 *************** target_triplet = @target@ *** 66,71 **** --- 66,73 ---- AR = @AR@ AS = @AS@ BACKTRACESPEC = @BACKTRACESPEC@ + CAIRO_CFLAGS = @CAIRO_CFLAGS@ + CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CHECKREFSPEC = @CHECKREFSPEC@ COMPPATH = @COMPPATH@ *************** DIVIDESPEC = @DIVIDESPEC@ *** 76,81 **** --- 78,84 ---- DLLTOOL = @DLLTOOL@ EXCEPTIONSPEC = @EXCEPTIONSPEC@ EXEEXT = @EXEEXT@ + EXTRA_CC_FILES = @EXTRA_CC_FILES@ GCC_UNWIND_INCLUDE = @GCC_UNWIND_INCLUDE@ GCDEPS = @GCDEPS@ GCINCS = @GCINCS@ *************** GCLIBS = @GCLIBS@ *** 86,96 **** --- 89,111 ---- GCOBJS = @GCOBJS@ GCSPEC = @GCSPEC@ GCTESTSPEC = @GCTESTSPEC@ + GLIB_CFLAGS = @GLIB_CFLAGS@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GTK_CFLAGS = @GTK_CFLAGS@ + GTK_LIBS = @GTK_LIBS@ HASH_SYNC_SPEC = @HASH_SYNC_SPEC@ + HAVE_LIB = @HAVE_LIB@ IEEESPEC = @IEEESPEC@ INCLTDL = @INCLTDL@ INTERPRETER = @INTERPRETER@ JC1GCSPEC = @JC1GCSPEC@ + LIB = @LIB@ + LIBART_CFLAGS = @LIBART_CFLAGS@ + LIBART_CONFIG = @LIBART_CONFIG@ + LIBART_LIBS = @LIBART_LIBS@ LIBFFI = @LIBFFI@ LIBFFIINCS = @LIBFFIINCS@ LIBGCJDEBUG = @LIBGCJDEBUG@ *************** LIBICONV = @LIBICONV@ *** 102,125 **** --- 117,146 ---- LIBLTDL = @LIBLTDL@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ + LTLIB = @LTLIB@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ + PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@ + PANGOFT2_LIBS = @PANGOFT2_LIBS@ PERL = @PERL@ + PKG_CONFIG = @PKG_CONFIG@ PLATFORMOBJS = @PLATFORMOBJS@ RANLIB = @RANLIB@ STRIP = @STRIP@ SYSDEP_SOURCES = @SYSDEP_SOURCES@ SYSTEMSPEC = @SYSTEMSPEC@ SYS_ZLIBS = @SYS_ZLIBS@ + THREADCXXFLAGS = @THREADCXXFLAGS@ THREADDEPS = @THREADDEPS@ THREADINCS = @THREADINCS@ THREADLDFLAGS = @THREADLDFLAGS@ THREADLIBS = @THREADLIBS@ THREADOBJS = @THREADOBJS@ THREADSPEC = @THREADSPEC@ + TOOLKIT = @TOOLKIT@ VERSION = @VERSION@ ZINCS = @ZINCS@ ZLIBS = @ZLIBS@ diff -Nrc3pad gcc-3.3.3/libjava/verify.cc gcc-3.4.0/libjava/verify.cc *** gcc-3.3.3/libjava/verify.cc 2003-05-07 01:22:24.000000000 +0000 --- gcc-3.4.0/libjava/verify.cc 2004-03-19 17:40:03.000000000 +0000 *************** *** 1,4 **** ! // defineclass.cc - defining a class from .class format. /* Copyright (C) 2001, 2002, 2003 Free Software Foundation --- 1,4 ---- ! // verify.cc - verify bytecode /* Copyright (C) 2001, 2002, 2003 Free Software Foundation *************** details. */ *** 19,24 **** --- 19,29 ---- #include #include + // On Solaris 10/x86, indirectly includes , which + // defines PC since g++ predefines __EXTENSIONS__. Undef here to avoid clash + // with PC member of class _Jv_BytecodeVerifier below. + #undef PC + #ifdef INTERPRETER #include *************** private: *** 58,63 **** --- 63,69 ---- struct subr_info; struct subr_entry_info; struct linked_utf8; + struct ref_intersection; // The current PC. int PC; *************** private: *** 104,109 **** --- 110,118 ---- // but without this our utf8 objects would be collected. linked_utf8 *utf8_list; + // A linked list of all ref_intersection objects we allocate. + ref_intersection *isect_list; + struct linked_utf8 { _Jv_Utf8Const *val; *************** private: *** 189,197 **** // Everything after `reference_type' must be a reference type. reference_type, null_type, ! unresolved_reference_type, ! uninitialized_reference_type, ! uninitialized_unresolved_reference_type }; // Return the type_val corresponding to a primitive signature --- 198,416 ---- // Everything after `reference_type' must be a reference type. reference_type, null_type, ! uninitialized_reference_type ! }; ! ! // This represents a merged class type. Some verifiers (including ! // earlier versions of this one) will compute the intersection of ! // two class types when merging states. However, this loses ! // critical information about interfaces implemented by the various ! // classes. So instead we keep track of all the actual classes that ! // have been merged. ! struct ref_intersection ! { ! // Whether or not this type has been resolved. ! bool is_resolved; ! ! // Actual type data. ! union ! { ! // For a resolved reference type, this is a pointer to the class. ! jclass klass; ! // For other reference types, this it the name of the class. ! _Jv_Utf8Const *name; ! } data; ! ! // Link to the next reference in the intersection. ! ref_intersection *ref_next; ! ! // This is used to keep track of all the allocated ! // ref_intersection objects, so we can free them. ! // FIXME: we should allocate these in chunks. ! ref_intersection *alloc_next; ! ! ref_intersection (jclass klass, _Jv_BytecodeVerifier *verifier) ! : ref_next (NULL) ! { ! is_resolved = true; ! data.klass = klass; ! alloc_next = verifier->isect_list; ! verifier->isect_list = this; ! } ! ! ref_intersection (_Jv_Utf8Const *name, _Jv_BytecodeVerifier *verifier) ! : ref_next (NULL) ! { ! is_resolved = false; ! data.name = name; ! alloc_next = verifier->isect_list; ! verifier->isect_list = this; ! } ! ! ref_intersection (ref_intersection *dup, ref_intersection *tail, ! _Jv_BytecodeVerifier *verifier) ! : ref_next (tail) ! { ! is_resolved = dup->is_resolved; ! data = dup->data; ! alloc_next = verifier->isect_list; ! verifier->isect_list = this; ! } ! ! bool equals (ref_intersection *other, _Jv_BytecodeVerifier *verifier) ! { ! if (! is_resolved && ! other->is_resolved ! && _Jv_equalUtf8Consts (data.name, other->data.name)) ! return true; ! if (! is_resolved) ! resolve (verifier); ! if (! other->is_resolved) ! other->resolve (verifier); ! return data.klass == other->data.klass; ! } ! ! // Merge THIS type into OTHER, returning the result. This will ! // return OTHER if all the classes in THIS already appear in ! // OTHER. ! ref_intersection *merge (ref_intersection *other, ! _Jv_BytecodeVerifier *verifier) ! { ! ref_intersection *tail = other; ! for (ref_intersection *self = this; self != NULL; self = self->ref_next) ! { ! bool add = true; ! for (ref_intersection *iter = other; iter != NULL; ! iter = iter->ref_next) ! { ! if (iter->equals (self, verifier)) ! { ! add = false; ! break; ! } ! } ! ! if (add) ! tail = new ref_intersection (self, tail, verifier); ! } ! return tail; ! } ! ! void resolve (_Jv_BytecodeVerifier *verifier) ! { ! if (is_resolved) ! return; ! ! using namespace java::lang; ! java::lang::ClassLoader *loader ! = verifier->current_class->getClassLoaderInternal(); ! // We might see either kind of name. Sigh. ! if (data.name->data[0] == 'L' ! && data.name->data[data.name->length - 1] == ';') ! data.klass = _Jv_FindClassFromSignature (data.name->data, loader); ! else ! data.klass = Class::forName (_Jv_NewStringUtf8Const (data.name), ! false, loader); ! is_resolved = true; ! } ! ! // See if an object of type OTHER can be assigned to an object of ! // type *THIS. This might resolve classes in one chain or the ! // other. ! bool compatible (ref_intersection *other, ! _Jv_BytecodeVerifier *verifier) ! { ! ref_intersection *self = this; ! ! for (; self != NULL; self = self->ref_next) ! { ! ref_intersection *other_iter = other; ! ! for (; other_iter != NULL; other_iter = other_iter->ref_next) ! { ! // Avoid resolving if possible. ! if (! self->is_resolved ! && ! other_iter->is_resolved ! && _Jv_equalUtf8Consts (self->data.name, ! other_iter->data.name)) ! continue; ! ! if (! self->is_resolved) ! self->resolve(verifier); ! if (! other_iter->is_resolved) ! other_iter->resolve(verifier); ! ! if (! is_assignable_from_slow (self->data.klass, ! other_iter->data.klass)) ! return false; ! } ! } ! ! return true; ! } ! ! bool isarray () ! { ! // assert (ref_next == NULL); ! if (is_resolved) ! return data.klass->isArray (); ! else ! return data.name->data[0] == '['; ! } ! ! bool isinterface (_Jv_BytecodeVerifier *verifier) ! { ! // assert (ref_next == NULL); ! if (! is_resolved) ! resolve (verifier); ! return data.klass->isInterface (); ! } ! ! bool isabstract (_Jv_BytecodeVerifier *verifier) ! { ! // assert (ref_next == NULL); ! if (! is_resolved) ! resolve (verifier); ! using namespace java::lang::reflect; ! return Modifier::isAbstract (data.klass->getModifiers ()); ! } ! ! jclass getclass (_Jv_BytecodeVerifier *verifier) ! { ! if (! is_resolved) ! resolve (verifier); ! return data.klass; ! } ! ! int count_dimensions () ! { ! int ndims = 0; ! if (is_resolved) ! { ! jclass k = data.klass; ! while (k->isArray ()) ! { ! k = k->getComponentType (); ! ++ndims; ! } ! } ! else ! { ! char *p = data.name->data; ! while (*p++ == '[') ! ++ndims; ! } ! return ndims; ! } ! ! void *operator new (size_t bytes) ! { ! return _Jv_Malloc (bytes); ! } ! ! void operator delete (void *mem) ! { ! _Jv_Free (mem); ! } }; // Return the type_val corresponding to a primitive signature *************** private: *** 244,251 **** // TARGET haven't been prepared. static bool is_assignable_from_slow (jclass target, jclass source) { ! // This will terminate when SOURCE==Object. ! while (true) { if (source == target) return true; --- 463,483 ---- // TARGET haven't been prepared. static bool is_assignable_from_slow (jclass target, jclass source) { ! // First, strip arrays. ! while (target->isArray ()) ! { ! // If target is array, source must be as well. ! if (! source->isArray ()) ! return false; ! target = target->getComponentType (); ! source = source->getComponentType (); ! } ! ! // Quick success. ! if (target == &java::lang::Object::class$) ! return true; ! ! do { if (source == target) return true; *************** private: *** 253,301 **** if (target->isPrimitive () || source->isPrimitive ()) return false; ! if (target->isArray ()) ! { ! if (! source->isArray ()) ! return false; ! target = target->getComponentType (); ! source = source->getComponentType (); ! } ! else if (target->isInterface ()) { for (int i = 0; i < source->interface_count; ++i) { // We use a recursive call because we also need to // check superinterfaces. if (is_assignable_from_slow (target, source->interfaces[i])) - return true; - } - source = source->getSuperclass (); - if (source == NULL) - return false; - } - // We must do this check before we check to see if SOURCE is - // an interface. This way we know that any interface is - // assignable to an Object. - else if (target == &java::lang::Object::class$) - return true; - else if (source->isInterface ()) - { - for (int i = 0; i < target->interface_count; ++i) - { - // We use a recursive call because we also need to - // check superinterfaces. - if (is_assignable_from_slow (target->interfaces[i], source)) return true; } - target = target->getSuperclass (); - if (target == NULL) - return false; } ! else if (source == &java::lang::Object::class$) ! return false; ! else ! source = source->getSuperclass (); } } // This is used to keep track of which `jsr's correspond to a given --- 485,505 ---- if (target->isPrimitive () || source->isPrimitive ()) return false; ! if (target->isInterface ()) { for (int i = 0; i < source->interface_count; ++i) { // We use a recursive call because we also need to // check superinterfaces. if (is_assignable_from_slow (target, source->interfaces[i])) return true; } } ! source = source->getSuperclass (); } + while (source != NULL); + + return false; } // This is used to keep track of which `jsr's correspond to a given *************** private: *** 324,339 **** // verifier. struct type { ! // The type. type_val key; ! // Some associated data. ! union ! { ! // For a resolved reference type, this is a pointer to the class. ! jclass klass; ! // For other reference types, this it the name of the class. ! _Jv_Utf8Const *name; ! } data; // This is used when constructing a new object. It is the PC of the // `new' instruction which created the object. We use the special // value -2 to mean that this is uninitialized, and the special --- 528,539 ---- // verifier. struct type { ! // The type key. type_val key; ! ! // For reference types, the representation of the type. ! ref_intersection *klass; ! // This is used when constructing a new object. It is the PC of the // `new' instruction which created the object. We use the special // value -2 to mean that this is uninitialized, and the special *************** private: *** 348,354 **** type () { key = unsuitable_type; ! data.klass = NULL; pc = UNINIT; } --- 548,554 ---- type () { key = unsuitable_type; ! klass = NULL; pc = UNINIT; } *************** private: *** 357,381 **** type (type_val k) { key = k; ! data.klass = NULL; ! if (key == reference_type) ! data.klass = &java::lang::Object::class$; pc = UNINIT; } // Make a new instance given a class. ! type (jclass klass) { key = reference_type; ! data.klass = klass; pc = UNINIT; } // Make a new instance given the name of a class. ! type (_Jv_Utf8Const *n) { ! key = unresolved_reference_type; ! data.name = n; pc = UNINIT; } --- 557,582 ---- type (type_val k) { key = k; ! // For reference_type, if KLASS==NULL then that means we are ! // looking for a generic object of any kind, including an ! // uninitialized reference. ! klass = NULL; pc = UNINIT; } // Make a new instance given a class. ! type (jclass k, _Jv_BytecodeVerifier *verifier) { key = reference_type; ! klass = new ref_intersection (k, verifier); pc = UNINIT; } // Make a new instance given the name of a class. ! type (_Jv_Utf8Const *n, _Jv_BytecodeVerifier *verifier) { ! key = reference_type; ! klass = new ref_intersection (n, verifier); pc = UNINIT; } *************** private: *** 383,389 **** type (const type &t) { key = t.key; ! data = t.data; pc = t.pc; } --- 584,590 ---- type (const type &t) { key = t.key; ! klass = t.klass; pc = t.pc; } *************** private: *** 402,408 **** type& operator= (type_val k) { key = k; ! data.klass = NULL; pc = UNINIT; return *this; } --- 603,609 ---- type& operator= (type_val k) { key = k; ! klass = NULL; pc = UNINIT; return *this; } *************** private: *** 410,416 **** type& operator= (const type& t) { key = t.key; ! data = t.data; pc = t.pc; return *this; } --- 611,617 ---- type& operator= (const type& t) { key = t.key; ! klass = t.klass; pc = t.pc; return *this; } *************** private: *** 424,458 **** return *this; } - // If *THIS is an unresolved reference type, resolve it. - void resolve (_Jv_BytecodeVerifier *verifier) - { - if (key != unresolved_reference_type - && key != uninitialized_unresolved_reference_type) - return; - - using namespace java::lang; - java::lang::ClassLoader *loader - = verifier->current_class->getClassLoaderInternal(); - // We might see either kind of name. Sigh. - if (data.name->data[0] == 'L' - && data.name->data[data.name->length - 1] == ';') - data.klass = _Jv_FindClassFromSignature (data.name->data, loader); - else - data.klass = Class::forName (_Jv_NewStringUtf8Const (data.name), - false, loader); - key = (key == unresolved_reference_type - ? reference_type - : uninitialized_reference_type); - } - // Mark this type as the uninitialized result of `new'. void set_uninitialized (int npc, _Jv_BytecodeVerifier *verifier) { if (key == reference_type) key = uninitialized_reference_type; - else if (key == unresolved_reference_type) - key = uninitialized_unresolved_reference_type; else verifier->verify_fail ("internal error in type::uninitialized"); pc = npc; --- 625,635 ---- *************** private: *** 461,473 **** // Mark this type as now initialized. void set_initialized (int npc) { ! if (npc != UNINIT && pc == npc ! && (key == uninitialized_reference_type ! || key == uninitialized_unresolved_reference_type)) { ! key = (key == uninitialized_reference_type ! ? reference_type ! : unresolved_reference_type); pc = UNINIT; } } --- 638,646 ---- // Mark this type as now initialized. void set_initialized (int npc) { ! if (npc != UNINIT && pc == npc && key == uninitialized_reference_type) { ! key = reference_type; pc = UNINIT; } } *************** private: *** 488,501 **** // The `null' type is convertible to any initialized reference // type. ! if (key == null_type || k.key == null_type) ! return true; ! // Any reference type is convertible to Object. This is a special ! // case so we don't need to unnecessarily resolve a class. ! if (key == reference_type ! && data.klass == &java::lang::Object::class$) return true; // An initialized type and an uninitialized type are not // compatible. --- 661,676 ---- // The `null' type is convertible to any initialized reference // type. ! if (key == null_type) ! return k.key != uninitialized_reference_type; ! if (k.key == null_type) ! return key != uninitialized_reference_type; ! // A special case for a generic reference. ! if (klass == NULL) return true; + if (k.klass == NULL) + verifier->verify_fail ("programmer error in type::compatible"); // An initialized type and an uninitialized type are not // compatible. *************** private: *** 511,526 **** return false; } ! // Two unresolved types are equal if their names are the same. ! if (! isresolved () ! && ! k.isresolved () ! && _Jv_equalUtf8Consts (data.name, k.data.name)) ! return true; ! ! // We must resolve both types and check assignability. ! resolve (verifier); ! k.resolve (verifier); ! return is_assignable_from_slow (data.klass, k.data.klass); } bool isvoid () const --- 686,692 ---- return false; } ! return klass->compatible(k.klass, verifier); } bool isvoid () const *************** private: *** 545,553 **** // We treat null_type as not an array. This is ok based on the // current uses of this method. if (key == reference_type) ! return data.klass->isArray (); ! else if (key == unresolved_reference_type) ! return data.name->data[0] == '['; return false; } --- 711,717 ---- // We treat null_type as not an array. This is ok based on the // current uses of this method. if (key == reference_type) ! return klass->isarray (); return false; } *************** private: *** 558,590 **** bool isinterface (_Jv_BytecodeVerifier *verifier) { - resolve (verifier); if (key != reference_type) return false; ! return data.klass->isInterface (); } bool isabstract (_Jv_BytecodeVerifier *verifier) { - resolve (verifier); if (key != reference_type) return false; ! using namespace java::lang::reflect; ! return Modifier::isAbstract (data.klass->getModifiers ()); } // Return the element type of an array. type element_type (_Jv_BytecodeVerifier *verifier) { - // FIXME: maybe should do string manipulation here. - resolve (verifier); if (key != reference_type) verifier->verify_fail ("programmer error in type::element_type()", -1); ! jclass k = data.klass->getComponentType (); if (k->isPrimitive ()) return type (verifier->get_type_val_for_signature (k)); ! return type (k); } // Return the array type corresponding to an initialized --- 722,749 ---- bool isinterface (_Jv_BytecodeVerifier *verifier) { if (key != reference_type) return false; ! return klass->isinterface (verifier); } bool isabstract (_Jv_BytecodeVerifier *verifier) { if (key != reference_type) return false; ! return klass->isabstract (verifier); } // Return the element type of an array. type element_type (_Jv_BytecodeVerifier *verifier) { if (key != reference_type) verifier->verify_fail ("programmer error in type::element_type()", -1); ! jclass k = klass->getclass (verifier)->getComponentType (); if (k->isPrimitive ()) return type (verifier->get_type_val_for_signature (k)); ! return type (k, verifier); } // Return the array type corresponding to an initialized *************** private: *** 592,607 **** // types, but currently we don't need to. type to_array (_Jv_BytecodeVerifier *verifier) { ! // Resolving isn't ideal, because it might force us to load ! // another class, but it's easy. FIXME? ! if (key == unresolved_reference_type) ! resolve (verifier); ! ! if (key == reference_type) ! return type (_Jv_GetArrayClass (data.klass, ! data.klass->getClassLoaderInternal())); ! else verifier->verify_fail ("internal error in type::to_array()"); } bool isreference () const --- 751,762 ---- // types, but currently we don't need to. type to_array (_Jv_BytecodeVerifier *verifier) { ! if (key != reference_type) verifier->verify_fail ("internal error in type::to_array()"); + + jclass k = klass->getclass (verifier); + return type (_Jv_GetArrayClass (k, k->getClassLoaderInternal()), + verifier); } bool isreference () const *************** private: *** 616,624 **** bool isinitialized () const { ! return (key == reference_type ! || key == null_type ! || key == unresolved_reference_type); } bool isresolved () const --- 771,777 ---- bool isinitialized () const { ! return key == reference_type || key == null_type; } bool isresolved () const *************** private: *** 631,654 **** void verify_dimensions (int ndims, _Jv_BytecodeVerifier *verifier) { // The way this is written, we don't need to check isarray(). ! if (key == reference_type) ! { ! jclass k = data.klass; ! while (k->isArray () && ndims > 0) ! { ! k = k->getComponentType (); ! --ndims; ! } ! } ! else ! { ! // We know KEY == unresolved_reference_type. ! char *p = data.name->data; ! while (*p++ == '[' && ndims-- > 0) ! ; ! } ! if (ndims > 0) verifier->verify_fail ("array type has fewer dimensions than required"); } --- 784,793 ---- void verify_dimensions (int ndims, _Jv_BytecodeVerifier *verifier) { // The way this is written, we don't need to check isarray(). ! if (key != reference_type) ! verifier->verify_fail ("internal error in verify_dimensions: not a reference type"); ! if (klass->count_dimensions () < ndims) verifier->verify_fail ("array type has fewer dimensions than required"); } *************** private: *** 682,734 **** verifier->verify_fail ("merging different uninitialized types"); } ! if (! isresolved () ! && ! old_type.isresolved () ! && _Jv_equalUtf8Consts (data.name, old_type.data.name)) ! { ! // Types are identical. ! } ! else { ! resolve (verifier); ! old_type.resolve (verifier); ! ! jclass k = data.klass; ! jclass oldk = old_type.data.klass; ! ! int arraycount = 0; ! while (k->isArray () && oldk->isArray ()) ! { ! ++arraycount; ! k = k->getComponentType (); ! oldk = oldk->getComponentType (); ! } ! ! // Ordinarily this terminates when we hit Object... ! while (k != NULL) ! { ! if (is_assignable_from_slow (k, oldk)) ! break; ! k = k->getSuperclass (); ! changed = true; ! } ! // ... but K could have been an interface, in which ! // case we'll end up here. We just convert this ! // into Object. ! if (k == NULL) ! k = &java::lang::Object::class$; ! ! if (changed) ! { ! while (arraycount > 0) ! { ! java::lang::ClassLoader *loader ! = verifier->current_class->getClassLoaderInternal(); ! k = _Jv_GetArrayClass (k, loader); ! --arraycount; ! } ! data.klass = k; ! } } } } --- 821,832 ---- verifier->verify_fail ("merging different uninitialized types"); } ! ref_intersection *merged = old_type.klass->merge (klass, ! verifier); ! if (merged != klass) { ! klass = merged; ! changed = true; } } } *************** private: *** 782,790 **** case unused_by_subroutine_type: c = '_'; break; case reference_type: c = 'L'; break; case null_type: c = '@'; break; - case unresolved_reference_type: c = 'l'; break; case uninitialized_reference_type: c = 'U'; break; - case uninitialized_unresolved_reference_type: c = 'u'; break; } debug_print ("%c", c); } --- 880,886 ---- *************** private: *** 804,812 **** type *stack; // The local variables. type *locals; ! // This is used in subroutines to keep track of which local ! // variables have been accessed. ! bool *local_changed; // If not 0, then we are in a subroutine. The value is the PC of // the subroutine's entry point. We can use 0 as an exceptional // value because PC=0 can never be a subroutine. --- 900,908 ---- type *stack; // The local variables. type *locals; ! // Flags are used in subroutines to keep track of which local ! // variables have been accessed. They are also used after ! char *flags; // If not 0, then we are in a subroutine. The value is the PC of // the subroutine's entry point. We can use 0 as an exceptional // value because PC=0 can never be a subroutine. *************** private: *** 839,850 **** // `ret'. See handle_jsr_insn for more information. static const int NO_STACK = -1; state () : this_type () { stack = NULL; locals = NULL; ! local_changed = NULL; seen_subrs = NULL; } --- 935,955 ---- // `ret'. See handle_jsr_insn for more information. static const int NO_STACK = -1; + // This flag indicates that the local was changed in this + // subroutine. + static const int FLAG_CHANGED = 1; + // This is set only on the flags of the state of an instruction + // directly following a "jsr". It indicates that the local + // variable was changed by the subroutine corresponding to the + // "jsr". + static const int FLAG_USED = 2; + state () : this_type () { stack = NULL; locals = NULL; ! flags = NULL; seen_subrs = NULL; } *************** private: *** 857,868 **** for (int i = 0; i < max_stack; ++i) stack[i] = unsuitable_type; locals = new type[max_locals]; ! local_changed = (bool *) _Jv_Malloc (sizeof (bool) * max_locals); seen_subrs = NULL; for (int i = 0; i < max_locals; ++i) { locals[i] = unsuitable_type; ! local_changed[i] = false; } next = INVALID; subroutine = 0; --- 962,973 ---- for (int i = 0; i < max_stack; ++i) stack[i] = unsuitable_type; locals = new type[max_locals]; ! flags = (char *) _Jv_Malloc (sizeof (char) * max_locals); seen_subrs = NULL; for (int i = 0; i < max_locals; ++i) { locals[i] = unsuitable_type; ! flags[i] = 0; } next = INVALID; subroutine = 0; *************** private: *** 873,879 **** { stack = new type[max_stack]; locals = new type[max_locals]; ! local_changed = (bool *) _Jv_Malloc (sizeof (bool) * max_locals); seen_subrs = NULL; copy (orig, max_stack, max_locals, ret_semantics); next = INVALID; --- 978,984 ---- { stack = new type[max_stack]; locals = new type[max_locals]; ! flags = (char *) _Jv_Malloc (sizeof (char) * max_locals); seen_subrs = NULL; copy (orig, max_stack, max_locals, ret_semantics); next = INVALID; *************** private: *** 885,892 **** delete[] stack; if (locals) delete[] locals; ! if (local_changed) ! _Jv_Free (local_changed); clean_subrs (); } --- 990,997 ---- delete[] stack; if (locals) delete[] locals; ! if (flags) ! _Jv_Free (flags); clean_subrs (); } *************** private: *** 919,924 **** --- 1024,1030 ---- _Jv_Free (info); info = next; } + seen_subrs = NULL; } void copy (const state *copy, int max_stack, int max_locals, *************** private: *** 933,954 **** { // See push_jump_merge to understand this case. if (ret_semantics) ! locals[i] = type (copy->local_changed[i] ! ? unsuitable_type ! : unused_by_subroutine_type); else locals[i] = copy->locals[i]; ! local_changed[i] = copy->local_changed[i]; } clean_subrs (); if (copy->seen_subrs) { ! for (subr_info *info = seen_subrs; info != NULL; info = info->next) add_subr (info->pc); } - else - seen_subrs = NULL; this_type = copy->this_type; // Don't modify `next'. --- 1039,1076 ---- { // See push_jump_merge to understand this case. if (ret_semantics) ! { ! if ((copy->flags[i] & FLAG_CHANGED)) ! { ! // Changed in the subroutine, so we copy it here. ! locals[i] = copy->locals[i]; ! flags[i] |= FLAG_USED; ! } ! else ! { ! // Not changed in the subroutine. Use a special ! // type so the coming merge will overwrite. ! locals[i] = type (unused_by_subroutine_type); ! } ! } else locals[i] = copy->locals[i]; ! ! // Clear the flag unconditionally just so printouts look ok, ! // then only set it if we're still in a subroutine and it ! // did in fact change. ! flags[i] &= ~FLAG_CHANGED; ! if (subroutine && (copy->flags[i] & FLAG_CHANGED) != 0) ! flags[i] |= FLAG_CHANGED; } clean_subrs (); if (copy->seen_subrs) { ! for (subr_info *info = copy->seen_subrs; ! info != NULL; info = info->next) add_subr (info->pc); } this_type = copy->this_type; // Don't modify `next'. *************** private: *** 973,979 **** // nested subroutines, this information will be merged back into // parent by the `ret'. for (int i = 0; i < max_locals; ++i) ! local_changed[i] = false; } // Indicate that we've been in this this subroutine. --- 1095,1101 ---- // nested subroutines, this information will be merged back into // parent by the `ret'. for (int i = 0; i < max_locals; ++i) ! flags[i] &= ~FLAG_CHANGED; } // Indicate that we've been in this this subroutine. *************** private: *** 989,995 **** // state. Returns true if the new state was in fact changed. // Will throw an exception if the states are not mergeable. bool merge (state *state_old, bool ret_semantics, ! int max_locals, _Jv_BytecodeVerifier *verifier) { bool changed = false; --- 1111,1118 ---- // state. Returns true if the new state was in fact changed. // Will throw an exception if the states are not mergeable. bool merge (state *state_old, bool ret_semantics, ! int max_locals, _Jv_BytecodeVerifier *verifier, ! bool jsr_semantics = false) { bool changed = false; *************** private: *** 1031,1041 **** } } ! // Merge stacks. Special handling for NO_STACK case. if (state_old->stacktop == NO_STACK) { ! // Nothing to do in this case; we don't care about modifying ! // the old state. } else if (stacktop == NO_STACK) { --- 1154,1174 ---- } } ! // Merge stacks, including special handling for NO_STACK case. ! // If the destination is NO_STACK, this means it is the ! // instruction following a "jsr" and has not yet been processed ! // in any way. In this situation, if we are currently ! // processing a "ret", then we must *copy* any locals changed in ! // the subroutine into the current state. Merging in this ! // situation is incorrect because the locals we've noted didn't ! // come real program flow, they are just an artifact of how ! // we've chosen to handle the post-jsr state. ! bool copy_in_locals = ret_semantics && stacktop == NO_STACK; ! if (state_old->stacktop == NO_STACK) { ! // This can happen if we're doing a pass-through jsr merge. ! // Here we can just ignore the stack. } else if (stacktop == NO_STACK) { *************** private: *** 1064,1071 **** // only merge locals which changed in the subroutine. When // processing a `ret', STATE_OLD is the state at the point // of the `ret', and THIS is the state just after the `jsr'. ! if (! ret_semantics || state_old->local_changed[i]) { if (locals[i].merge (state_old->locals[i], true, verifier)) { // Note that we don't call `note_variable' here. --- 1197,1232 ---- // only merge locals which changed in the subroutine. When // processing a `ret', STATE_OLD is the state at the point // of the `ret', and THIS is the state just after the `jsr'. ! // See comment above for explanation of COPY_IN_LOCALS. ! if (copy_in_locals) ! { ! if ((state_old->flags[i] & FLAG_CHANGED) != 0) ! { ! locals[i] = state_old->locals[i]; ! changed = true; ! // There's no point in calling note_variable here, ! // since we call it under the same condition before ! // the loop ends. ! } ! } ! else if (jsr_semantics && (flags[i] & FLAG_USED) != 0) { + // We are processing the "pass-through" part of a jsr + // statement. In this particular case, the local was + // changed by the subroutine. So, we have no work to + // do, as the pre-jsr value does not survive the + // subroutine call. + } + else if (! ret_semantics + || (state_old->flags[i] & FLAG_CHANGED) != 0) + { + // If we have ordinary (not ret) semantics, then we have + // merging flow control, so we merge types. Or, we have + // jsr pass-through semantics and the type survives the + // subroutine (see above), so again we merge. Or, + // finally, we have ret semantics and this value did + // change, in which case we merge the change from the + // subroutine into the post-jsr instruction. if (locals[i].merge (state_old->locals[i], true, verifier)) { // Note that we don't call `note_variable' here. *************** private: *** 1081,1088 **** // If we're in a subroutine, we must compute the union of // all the changed local variables. ! if (state_old->local_changed[i]) note_variable (i); } return changed; --- 1242,1255 ---- // If we're in a subroutine, we must compute the union of // all the changed local variables. ! if ((state_old->flags[i] & FLAG_CHANGED) != 0) note_variable (i); + + // If we're returning from a subroutine, we must mark the + // post-jsr instruction with information about what changed, + // so that future "pass-through" jsr merges work correctly. + if (ret_semantics && (state_old->flags[i] & FLAG_CHANGED) != 0) + flags[i] |= FLAG_USED; } return changed; *************** private: *** 1127,1133 **** void note_variable (int index) { if (subroutine > 0) ! local_changed[index] = true; } // Mark each `new'd object we know of that was allocated at PC as --- 1294,1300 ---- void note_variable (int index) { if (subroutine > 0) ! flags[index] |= FLAG_CHANGED; } // Mark each `new'd object we know of that was allocated at PC as *************** private: *** 1168,1174 **** for (i = 0; i < max_locals; ++i) { locals[i].print (); ! debug_print (local_changed[i] ? "+" : " "); } if (subroutine == 0) debug_print (" | None"); --- 1335,1344 ---- for (i = 0; i < max_locals; ++i) { locals[i].print (); ! if ((flags[i] & FLAG_USED) != 0) ! debug_print ((flags[i] & FLAG_CHANGED) ? ">" : "<"); ! else ! debug_print ((flags[i] & FLAG_CHANGED) ? "+" : " "); } if (subroutine == 0) debug_print (" | None"); *************** private: *** 1359,1366 **** // schedule a new PC if there is a change. If RET_SEMANTICS is // true, then we are merging from a `ret' instruction into the // instruction after a `jsr'. This is a special case with its own ! // modified semantics. ! void push_jump_merge (int npc, state *nstate, bool ret_semantics = false) { bool changed = true; if (states[npc] == NULL) --- 1529,1542 ---- // schedule a new PC if there is a change. If RET_SEMANTICS is // true, then we are merging from a `ret' instruction into the // instruction after a `jsr'. This is a special case with its own ! // modified semantics. If JSR_SEMANTICS is true, then we're merging ! // some type information from a "jsr" instruction to the immediately ! // following instruction. In this situation we have to be careful ! // not to merge local variables whose values are modified by the ! // subroutine we're about to call. ! void push_jump_merge (int npc, state *nstate, ! bool ret_semantics = false, ! bool jsr_semantics = false) { bool changed = true; if (states[npc] == NULL) *************** private: *** 1374,1380 **** // which was not modified by the subroutine. states[npc] = new state (nstate, current_method->max_stack, current_method->max_locals, ret_semantics); ! debug_print ("== New state in push_jump_merge\n"); states[npc]->print ("New", npc, current_method->max_stack, current_method->max_locals); } --- 1550,1557 ---- // which was not modified by the subroutine. states[npc] = new state (nstate, current_method->max_stack, current_method->max_locals, ret_semantics); ! debug_print ("== New state in push_jump_merge (ret_semantics = %s)\n", ! ret_semantics ? "true" : "false"); states[npc]->print ("New", npc, current_method->max_stack, current_method->max_locals); } *************** private: *** 1386,1392 **** states[npc]->print (" To", npc, current_method->max_stack, current_method->max_locals); changed = states[npc]->merge (nstate, ret_semantics, ! current_method->max_locals, this); states[npc]->print ("New", npc, current_method->max_stack, current_method->max_locals); } --- 1563,1570 ---- states[npc]->print (" To", npc, current_method->max_stack, current_method->max_locals); changed = states[npc]->merge (nstate, ret_semantics, ! current_method->max_locals, this, ! jsr_semantics); states[npc]->print ("New", npc, current_method->max_stack, current_method->max_locals); } *************** private: *** 1580,1586 **** if (PC < current_method->code_length) { current_state->stacktop = state::NO_STACK; ! push_jump_merge (PC, current_state); } invalidate_pc (); } --- 1758,1764 ---- if (PC < current_method->code_length) { current_state->stacktop = state::NO_STACK; ! push_jump_merge (PC, current_state, false, true); } invalidate_pc (); } *************** private: *** 1624,1632 **** case unused_by_subroutine_type: case reference_type: case null_type: - case unresolved_reference_type: case uninitialized_reference_type: - case uninitialized_unresolved_reference_type: default: verify_fail ("unknown type in construct_primitive_array_type"); } --- 1802,1808 ---- *************** private: *** 1997,2005 **** check_pool_index (index); _Jv_Constants *pool = ¤t_class->constants; if (pool->tags[index] == JV_CONSTANT_ResolvedClass) ! return type (pool->data[index].clazz); else if (pool->tags[index] == JV_CONSTANT_Class) ! return type (pool->data[index].utf8); verify_fail ("expected class constant", start_PC); } --- 2173,2181 ---- check_pool_index (index); _Jv_Constants *pool = ¤t_class->constants; if (pool->tags[index] == JV_CONSTANT_ResolvedClass) ! return type (pool->data[index].clazz, this); else if (pool->tags[index] == JV_CONSTANT_Class) ! return type (pool->data[index].utf8, this); verify_fail ("expected class constant", start_PC); } *************** private: *** 2009,2015 **** _Jv_Constants *pool = ¤t_class->constants; if (pool->tags[index] == JV_CONSTANT_ResolvedString || pool->tags[index] == JV_CONSTANT_String) ! return type (&java::lang::String::class$); else if (pool->tags[index] == JV_CONSTANT_Integer) return type (int_type); else if (pool->tags[index] == JV_CONSTANT_Float) --- 2185,2191 ---- _Jv_Constants *pool = ¤t_class->constants; if (pool->tags[index] == JV_CONSTANT_ResolvedString || pool->tags[index] == JV_CONSTANT_String) ! return type (&java::lang::String::class$, this); else if (pool->tags[index] == JV_CONSTANT_Integer) return type (int_type); else if (pool->tags[index] == JV_CONSTANT_Float) *************** private: *** 2065,2071 **** if (class_type) *class_type = ct; if (field_type->data[0] == '[' || field_type->data[0] == 'L') ! return type (field_type); return get_type_val_for_signature (field_type->data[0]); } --- 2241,2247 ---- if (class_type) *class_type = ct; if (field_type->data[0] == '[' || field_type->data[0] == 'L') ! return type (field_type, this); return get_type_val_for_signature (field_type->data[0]); } *************** private: *** 2099,2105 **** ++p; ++p; _Jv_Utf8Const *name = make_utf8_const (start, p - start); ! return type (name); } // Casting to jchar here is ok since we are looking at an ASCII --- 2275,2281 ---- ++p; ++p; _Jv_Utf8Const *name = make_utf8_const (start, p - start); ! return type (name, this); } // Casting to jchar here is ok since we are looking at an ASCII *************** private: *** 2116,2122 **** jclass k = construct_primitive_array_type (rt); while (--arraycount > 0) k = _Jv_GetArrayClass (k, NULL); ! return type (k); } void compute_argument_types (_Jv_Utf8Const *signature, --- 2292,2298 ---- jclass k = construct_primitive_array_type (rt); while (--arraycount > 0) k = _Jv_GetArrayClass (k, NULL); ! return type (k, this); } void compute_argument_types (_Jv_Utf8Const *signature, *************** private: *** 2160,2166 **** using namespace java::lang::reflect; if (! Modifier::isStatic (current_method->self->accflags)) { ! type kurr (current_class); if (is_init) { kurr.set_uninitialized (type::SELF, this); --- 2336,2342 ---- using namespace java::lang::reflect; if (! Modifier::isStatic (current_method->self->accflags)) { ! type kurr (current_class, this); if (is_init) { kurr.set_uninitialized (type::SELF, this); *************** private: *** 2287,2293 **** { if (PC >= exception[i].start_pc.i && PC < exception[i].end_pc.i) { ! type handler (&java::lang::Throwable::class$); if (exception[i].handler_type.i != 0) handler = check_class_constant (exception[i].handler_type.i); push_exception_jump (handler, exception[i].handler_pc.i); --- 2463,2469 ---- { if (PC >= exception[i].start_pc.i && PC < exception[i].end_pc.i) { ! type handler (&java::lang::Throwable::class$, this); if (exception[i].handler_type.i != 0) handler = check_class_constant (exception[i].handler_type.i); push_exception_jump (handler, exception[i].handler_pc.i); *************** private: *** 2959,2991 **** { // In this case the PC doesn't matter. t.set_uninitialized (type::UNINIT, this); } type raw = pop_raw (); ! bool ok = false; ! if (! is_init && ! raw.isinitialized ()) ! { ! // This is a failure. ! } ! else if (is_init && raw.isnull ()) ! { ! // Another failure. ! } ! else if (t.compatible (raw, this)) ! { ! ok = true; ! } ! else if (opcode == op_invokeinterface) ! { ! // This is a hack. We might have merged two ! // items and gotten `Object'. This can happen ! // because we don't keep track of where merges ! // come from. This is safe as long as the ! // interpreter checks interfaces at runtime. ! type obj (&java::lang::Object::class$); ! ok = raw.compatible (obj, this); ! } ! ! if (! ok) verify_fail ("incompatible type on stack"); if (is_init) --- 3135,3147 ---- { // In this case the PC doesn't matter. t.set_uninitialized (type::UNINIT, this); + // FIXME: check to make sure that the + // call is to the right class. + // It must either be super or an exact class + // match. } type raw = pop_raw (); ! if (! t.compatible (raw, this)) verify_fail ("incompatible type on stack"); if (is_init) *************** private: *** 3017,3023 **** if (atype < boolean_type || atype > long_type) verify_fail ("type not primitive", start_PC); pop_type (int_type); ! push_type (construct_primitive_array_type (type_val (atype))); } break; case op_anewarray: --- 3173,3180 ---- if (atype < boolean_type || atype > long_type) verify_fail ("type not primitive", start_PC); pop_type (int_type); ! type t (construct_primitive_array_type (type_val (atype)), this); ! push_type (t); } break; case op_anewarray: *************** private: *** 3033,3039 **** } break; case op_athrow: ! pop_type (type (&java::lang::Throwable::class$)); invalidate_pc (); break; case op_checkcast: --- 3190,3196 ---- } break; case op_athrow: ! pop_type (type (&java::lang::Throwable::class$, this)); invalidate_pc (); break; case op_checkcast: *************** public: *** 3178,3183 **** --- 3335,3341 ---- flags = NULL; jsr_ptrs = NULL; utf8_list = NULL; + isect_list = NULL; entry_points = NULL; } *************** public: *** 3220,3225 **** --- 3378,3390 ---- _Jv_Free (entry_points); entry_points = next; } + + while (isect_list != NULL) + { + ref_intersection *next = isect_list->alloc_next; + delete isect_list; + isect_list = next; + } } }; diff -Nrc3pad gcc-3.3.3/libjava/win32.cc gcc-3.4.0/libjava/win32.cc *** gcc-3.3.3/libjava/win32.cc 2003-04-29 13:58:51.000000000 +0000 --- gcc-3.4.0/libjava/win32.cc 2003-12-16 22:54:21.000000000 +0000 *************** details. */ *** 10,21 **** #include #include - #include #include #include #include #include #include static LONG CALLBACK --- 10,23 ---- #include #include #include #include + #include #include #include + #include + #include #include static LONG CALLBACK *************** const char *_Jv_ThisExecutable (void) *** 38,43 **** --- 40,255 ---- return exec_name; } + // Helper classes and methods implementation + + #ifdef MINGW_LIBGCJ_UNICODE + + // We're using the OS W (UNICODE) API, which means that we're speaking + // the same language.... + jstring + _Jv_Win32NewString (LPCTSTR pcsz) + { + return JvNewString ((jchar*) pcsz, _tcslen (pcsz)); + } + + #else + + // We're using the OS A functions, which means we need to translate between + // UNICODE and the native character set. + + // First, let's set up some helper translation functions.... + + // Converts the native string to any specified jstring, returning the + // length of the jstring. If the specified jstring is null, we simply + // compute and return the length. + static int nativeToUnicode(LPCSTR pcsz, jstring jstr = 0) + { + jchar* buf = 0; + int len = 0; + if (jstr) + { + len = jstr->length(); + buf = JvGetStringChars(jstr); + } + return ::MultiByteToWideChar(GetACP(), 0, pcsz, + strlen(pcsz), (LPWSTR) buf, len); + } + + // Does the inverse of nativeToUnicode, with the same calling semantics. + static int unicodeToNative(jstring jstr, LPSTR buf, int buflen) + { + return ::WideCharToMultiByte(GetACP(), 0, (LPWSTR) JvGetStringChars(jstr), + jstr->length(), buf, buflen, NULL, NULL); + } + + // Convenience function when the caller only wants to compute the length + // of the native string. + static int unicodeToNative(jstring jstr) + { + return unicodeToNative(jstr, 0, 0); + } + + jstring + _Jv_Win32NewString (LPCTSTR pcsz) + { + // Compute the length, allocate the jstring, then perform the conversion. + int len = nativeToUnicode(pcsz); + jstring jstr = JvAllocString(len); + nativeToUnicode(pcsz, jstr); + return jstr; + } + + #endif // MINGW_LIBGCJ_UNICODE + + // class _Jv_Win32TempString + _Jv_Win32TempString::_Jv_Win32TempString(jstring jstr): + buf_(0) + { + if (jstr == 0) + return; + + // We need space for the string length plus a null terminator. + // Determine whether to use our stack-allocated buffer or a heap- + // allocated one. + #ifdef MINGW_LIBGCJ_UNICODE + // A UNICODE character is a UNICODE character is a UNICODE character.... + int len = jstr->length(); + #else + // Compute the length of the native character string. + int len = unicodeToNative(jstr); + #endif // MINGW_LIBGCJ_UNICODE + + int bytesNeeded = (len + 1) * sizeof(TCHAR); + if (bytesNeeded <= (int) sizeof(stackbuf_)) + buf_ = stackbuf_; + else + buf_ = (LPTSTR) _Jv_Malloc(bytesNeeded); + + #ifdef MINGW_LIBGCJ_UNICODE + // Copy the UNICODE characters to our buffer. + _tcsncpy(buf_, (LPCTSTR) JvGetStringChars (jstr), len); + #else + // Convert the UNICODE string to a native one. + unicodeToNative(jstr, buf_, len); + #endif // MINGW_LIBGCJ_UNICODE + + buf_[len] = 0; + } + + _Jv_Win32TempString::~_Jv_Win32TempString() + { + if (buf_ && buf_ != stackbuf_) + _Jv_Free (buf_); + } + + // class WSAEventWrapper + WSAEventWrapper::WSAEventWrapper (): + m_hEvent(0), + m_fd(0), + m_dwSelFlags(0) + {} + + WSAEventWrapper::WSAEventWrapper (int fd, DWORD dwSelFlags): + m_hEvent(0), + m_fd(0), + m_dwSelFlags(0) + { + init(fd, dwSelFlags); + } + + void WSAEventWrapper::init(int fd, DWORD dwSelFlags) + { + m_fd = fd; + m_dwSelFlags = dwSelFlags; + m_hEvent = WSACreateEvent (); + if (dwSelFlags) + WSAEventSelect(fd, m_hEvent, dwSelFlags); + } + + WSAEventWrapper::~WSAEventWrapper () + { + if (m_dwSelFlags) + { + WSAEventSelect(m_fd, m_hEvent, 0); + if (m_dwSelFlags & (FD_ACCEPT | FD_CONNECT)) + { + // Set the socket back to non-blocking mode. + // Ignore any error since we're in a destructor. + unsigned long lSockOpt = 0L; + // blocking mode + ::ioctlsocket (m_fd, FIONBIO, &lSockOpt); + } + } + WSACloseEvent (m_hEvent); + } + + // Error string text. + jstring + _Jv_WinStrError (LPCTSTR lpszPrologue, int nErrorCode) + { + LPTSTR lpMsgBuf = 0; + + DWORD dwFlags = FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS; + + FormatMessage (dwFlags, + NULL, + (DWORD) nErrorCode, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPTSTR) &lpMsgBuf, + 0, + NULL); + + jstring ret; + if (lpszPrologue) + { + LPTSTR lpszTemp = + (LPTSTR) _Jv_Malloc ((_tcslen (lpszPrologue) + + _tcslen (lpMsgBuf) + 3) * sizeof(TCHAR) ); + _tcscpy (lpszTemp, lpszPrologue); + _tcscat (lpszTemp, _T(": ")); + _tcscat (lpszTemp, lpMsgBuf); + ret = _Jv_Win32NewString (lpszTemp); + _Jv_Free (lpszTemp); + } + else + { + ret = _Jv_Win32NewString (lpMsgBuf); + } + + LocalFree(lpMsgBuf); + return ret; + } + + jstring + _Jv_WinStrError (int nErrorCode) + { + return _Jv_WinStrError (0, nErrorCode); + } + + void _Jv_ThrowIOException (DWORD dwErrorCode) + { + throw new java::io::IOException (_Jv_WinStrError (dwErrorCode)); + } + + void _Jv_ThrowIOException() + { + DWORD dwErrorCode = WSAGetLastError (); + _Jv_ThrowIOException (dwErrorCode); + } + + void _Jv_ThrowSocketException (DWORD dwErrorCode) + { + throw new java::net::SocketException (_Jv_WinStrError (dwErrorCode)); + } + + void _Jv_ThrowSocketException() + { + DWORD dwErrorCode = WSAGetLastError (); + _Jv_ThrowSocketException (dwErrorCode); + } + // Platform-specific VM initialization. void _Jv_platform_initialize (void) *************** _Jv_platform_initialize (void) *** 45,58 **** // Initialise winsock for networking WSADATA data; if (WSAStartup (MAKEWORD (1, 1), &data)) ! MessageBox (NULL, "Error initialising winsock library.", "Error", ! MB_OK | MB_ICONEXCLAMATION); // Install exception handler SetUnhandledExceptionFilter (win32_exception_handler); ! // Initialize our executable name ! GetModuleFileName(NULL, exec_name, sizeof(exec_name)); } // gettimeofday implementation. --- 257,273 ---- // Initialise winsock for networking WSADATA data; if (WSAStartup (MAKEWORD (1, 1), &data)) ! MessageBox (NULL, _T("Error initialising winsock library."), _T("Error"), ! MB_OK | MB_ICONEXCLAMATION); // Install exception handler SetUnhandledExceptionFilter (win32_exception_handler); ! // Initialize our executable name. ! // FIXME: We unconditionally use the ANSI function because ! // _Jv_ThisExecutable returns a const char*. We should really ! // change _Jv_ThisExecutable to return a jstring. ! GetModuleFileNameA(NULL, exec_name, sizeof(exec_name)); } // gettimeofday implementation. *************** __mingwthr_key_dtor (DWORD, void (*) (vo *** 79,143 **** return 0; } // Set platform-specific System properties. void _Jv_platform_initProperties (java::util::Properties* newprops) { // A convenience define. #define SET(Prop,Val) \ ! newprops->put(JvNewStringLatin1 (Prop), JvNewStringLatin1 (Val)) ! SET ("file.separator", "\\"); ! SET ("path.separator", ";"); ! SET ("line.separator", "\r\n"); // Use GetCurrentDirectory to set 'user.dir'. DWORD buflen = MAX_PATH; ! char *buffer = (char *) _Jv_MallocUnchecked (buflen); if (buffer != NULL) { if (GetCurrentDirectory (buflen, buffer)) ! SET ("user.dir", buffer); if (GetTempPath (buflen, buffer)) ! SET ("java.io.tmpdir", buffer); ! ! _Jv_Free (buffer); } // Use GetUserName to set 'user.name'. buflen = 257; // UNLEN + 1 ! buffer = (char *) _Jv_MallocUnchecked (buflen); ! if (buffer != NULL) ! { ! if (GetUserName (buffer, &buflen)) ! SET ("user.name", buffer); ! _Jv_Free (buffer); ! } ! // According to the api documentation for 'GetWindowsDirectory()', the ! // environmental variable HOMEPATH always specifies the user's home ! // directory or a default directory. On the 3 windows machines I checked ! // only 1 had it set. If it's not set, JDK1.3.1 seems to set it to ! // the windows directory, so we'll do the same. ! char *userHome = NULL; ! if ((userHome = ::getenv ("HOMEPATH")) == NULL ) ! { ! // Check HOME since it's what I use. ! if ((userHome = ::getenv ("HOME")) == NULL ) ! { ! // Not found - use the windows directory like JDK1.3.1 does. ! char *winHome = (char *) _Jv_MallocUnchecked (MAX_PATH); ! if (winHome != NULL) ! { ! if (GetWindowsDirectory (winHome, MAX_PATH)) ! SET ("user.home", winHome); ! _Jv_Free (winHome); ! } ! } ! } ! if (userHome != NULL) ! SET ("user.home", userHome); // Get and set some OS info. OSVERSIONINFO osvi; --- 294,370 ---- return 0; } + static bool dirExists (LPCTSTR dir) + { + DWORD dwAttrs = ::GetFileAttributes (dir); + return dwAttrs != 0xFFFFFFFF && + (dwAttrs & FILE_ATTRIBUTE_DIRECTORY) != 0; + } + + static void getUserHome(LPTSTR userHome, LPCTSTR userId) + { + LPTSTR uh = _tgetenv (_T("USERPROFILE")); + if (uh) + { + _tcscpy(userHome, uh); + } + else + { + // Make a half-hearted attempt to support this + // legacy version of Windows. Try %WINDIR%\Profiles\%USERNAME% + // and failing this, use %WINDIR%. + // + // See:http://java.sun.com/docs/books/tutorial/security1.2/summary/files.html#UserPolicy + // + // To do this correctly, we'd have to factor in the + // Windows version, but if we did that, then this attempt + // wouldn't be half-hearted. + TCHAR userHomePath[MAX_PATH], winHome[MAX_PATH]; + ::GetWindowsDirectory(winHome, MAX_PATH); + // assume this call always succeeds + + _stprintf(userHomePath, _T("%s\\Profiles\\%s"), winHome, userId); + if (dirExists (userHomePath)) + _tcscpy(userHome, userHomePath); + else + _tcscpy(userHome, winHome); + } + } + // Set platform-specific System properties. void _Jv_platform_initProperties (java::util::Properties* newprops) { // A convenience define. #define SET(Prop,Val) \ ! newprops->put(JvNewStringLatin1 (Prop), _Jv_Win32NewString (Val)) ! SET ("file.separator", _T("\\")); ! SET ("path.separator", _T(";")); ! SET ("line.separator", _T("\r\n")); // Use GetCurrentDirectory to set 'user.dir'. DWORD buflen = MAX_PATH; ! TCHAR buffer[buflen]; if (buffer != NULL) { if (GetCurrentDirectory (buflen, buffer)) ! SET ("user.dir", buffer); if (GetTempPath (buflen, buffer)) ! SET ("java.io.tmpdir", buffer); } // Use GetUserName to set 'user.name'. buflen = 257; // UNLEN + 1 ! TCHAR userName[buflen]; ! if (GetUserName (userName, &buflen)) ! SET ("user.name", userName); ! // Set user.home ! TCHAR userHome[MAX_PATH]; ! getUserHome(userHome, userName); ! SET ("user.home", userHome); // Get and set some OS info. OSVERSIONINFO osvi; *************** _Jv_platform_initProperties (java::util: *** 145,185 **** osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); if (GetVersionEx (&osvi)) { - char *buffer = (char *) _Jv_MallocUnchecked (30); if (buffer != NULL) { ! sprintf (buffer, "%d.%d", (int) osvi.dwMajorVersion, (int) osvi.dwMinorVersion); SET ("os.version", buffer); - _Jv_Free (buffer); } switch (osvi.dwPlatformId) { case VER_PLATFORM_WIN32_WINDOWS: if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 0) ! SET ("os.name", "Windows 95"); else if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 10) ! SET ("os.name", "Windows 98"); else if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 90) ! SET ("os.name", "Windows Me"); else ! SET ("os.name", "Windows ??"); break; case VER_PLATFORM_WIN32_NT: if (osvi.dwMajorVersion <= 4 ) ! SET ("os.name", "Windows NT"); else if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0) ! SET ("os.name", "Windows 2000"); else if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1) ! SET ("os.name", "Windows XP"); else ! SET ("os.name", "Windows NT ??"); break; default: ! SET ("os.name", "Windows UNKNOWN"); break; } } --- 372,410 ---- osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); if (GetVersionEx (&osvi)) { if (buffer != NULL) { ! _stprintf (buffer, _T("%d.%d"), (int) osvi.dwMajorVersion, (int) osvi.dwMinorVersion); SET ("os.version", buffer); } switch (osvi.dwPlatformId) { case VER_PLATFORM_WIN32_WINDOWS: if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 0) ! SET ("os.name", _T("Windows 95")); else if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 10) ! SET ("os.name", _T("Windows 98")); else if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 90) ! SET ("os.name", _T("Windows Me")); else ! SET ("os.name", _T("Windows ??")); break; case VER_PLATFORM_WIN32_NT: if (osvi.dwMajorVersion <= 4 ) ! SET ("os.name", _T("Windows NT")); else if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0) ! SET ("os.name", _T("Windows 2000")); else if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1) ! SET ("os.name", _T("Windows XP")); else ! SET ("os.name", _T("Windows NT ??")); break; default: ! SET ("os.name", _T("Windows UNKNOWN")); break; } } *************** _Jv_platform_initProperties (java::util: *** 190,212 **** switch (si.wProcessorArchitecture) { case PROCESSOR_ARCHITECTURE_INTEL: ! SET ("os.arch", "x86"); break; case PROCESSOR_ARCHITECTURE_MIPS: ! SET ("os.arch", "mips"); break; case PROCESSOR_ARCHITECTURE_ALPHA: ! SET ("os.arch", "alpha"); break; ! case PROCESSOR_ARCHITECTURE_PPC: ! SET ("os.arch", "ppc"); break; case PROCESSOR_ARCHITECTURE_IA64: ! SET ("os.arch", "ia64"); break; case PROCESSOR_ARCHITECTURE_UNKNOWN: default: ! SET ("os.arch", "unknown"); break; } } --- 415,437 ---- switch (si.wProcessorArchitecture) { case PROCESSOR_ARCHITECTURE_INTEL: ! SET ("os.arch", _T("x86")); break; case PROCESSOR_ARCHITECTURE_MIPS: ! SET ("os.arch", _T("mips")); break; case PROCESSOR_ARCHITECTURE_ALPHA: ! SET ("os.arch", _T("alpha")); break; ! case PROCESSOR_ARCHITECTURE_PPC: ! SET ("os.arch", _T("ppc")); break; case PROCESSOR_ARCHITECTURE_IA64: ! SET ("os.arch", _T("ia64")); break; case PROCESSOR_ARCHITECTURE_UNKNOWN: default: ! SET ("os.arch", _T("unknown")); break; } } *************** backtrace (void **__array, int __size) *** 233,242 **** return i; } - /* Placeholder implementation */ int ! _Jv_select (int, fd_set *, fd_set *, fd_set *, struct timeval *) { ! throw new java::lang::UnsupportedOperationException(JvNewStringUTF("_Jv_select() not implemented in Win32")); ! return 0; } --- 458,473 ---- return i; } int ! _Jv_pipe (int filedes[2]) { ! return _pipe (filedes, 4096, _O_BINARY); ! } ! ! void ! _Jv_platform_close_on_exec (HANDLE h) ! { ! // Mark the handle as non-inheritable. This has ! // no effect under Win9X. ! SetHandleInformation (h, HANDLE_FLAG_INHERIT, 0); } diff -Nrc3pad gcc-3.3.3/libjava/win32-threads.cc gcc-3.4.0/libjava/win32-threads.cc *** gcc-3.3.3/libjava/win32-threads.cc 2003-01-28 22:23:08.000000000 +0000 --- gcc-3.4.0/libjava/win32-threads.cc 2003-10-31 03:36:38.000000000 +0000 *************** ensure_condvar_initialized(_Jv_Condition *** 81,86 **** --- 81,96 ---- } } + inline void + ensure_interrupt_event_initialized(HANDLE& rhEvent) + { + if (!rhEvent) + { + rhEvent = CreateEvent (NULL, 0, 0, NULL); + if (!rhEvent) JvFail("CreateEvent() failed"); + } + } + // Reimplementation of the general algorithm described at // http://www.cs.wustl.edu/~schmidt/win32-cv-1.html (isomorphic to // 3.2, not a cut-and-paste). *************** _Jv_CondWait(_Jv_ConditionVariable_t *cv *** 91,96 **** --- 101,121 ---- if (mu->owner != GetCurrentThreadId ( )) return _JV_NOT_OWNER; + _Jv_Thread_t *current = _Jv_ThreadCurrentData (); + java::lang::Thread *current_obj = _Jv_ThreadCurrent (); + + // Now that we hold the interrupt mutex, check if this thread has been + // interrupted already. + EnterCriticalSection (¤t->interrupt_mutex); + ensure_interrupt_event_initialized (current->interrupt_event); + jboolean interrupted = current_obj->interrupt_flag; + LeaveCriticalSection (¤t->interrupt_mutex); + + if (interrupted) + { + return _JV_INTERRUPTED; + } + EnterCriticalSection (&cv->count_mutex); ensure_condvar_initialized (cv); cv->blocked_count++; *************** _Jv_CondWait(_Jv_ConditionVariable_t *cv *** 101,109 **** else if (millis == 0) time = INFINITE; else time = millis; ! _Jv_MutexUnlock (mu); ! DWORD rval = WaitForMultipleObjects (2, &(cv->ev[0]), 0, time); EnterCriticalSection(&cv->count_mutex); cv->blocked_count--; --- 126,169 ---- else if (millis == 0) time = INFINITE; else time = millis; ! // Record the current lock depth, so it can be restored ! // when we reacquire it. ! int count = mu->refcount; ! int curcount = count; ! // Call _Jv_MutexUnlock repeatedly until this thread ! // has completely released the monitor. ! while (curcount > 0) ! { ! _Jv_MutexUnlock (mu); ! --curcount; ! } ! ! // Set up our array of three events: ! // - the auto-reset event (for notify()) ! // - the manual-reset event (for notifyAll()) ! // - the interrupt event (for interrupt()) ! // We wait for any one of these to be signaled. ! HANDLE arh[3]; ! arh[0] = cv->ev[0]; ! arh[1] = cv->ev[1]; ! arh[2] = current->interrupt_event; ! DWORD rval = WaitForMultipleObjects (3, arh, 0, time); ! ! EnterCriticalSection (¤t->interrupt_mutex); ! ! // If we were unblocked by the third event (our thread's interrupt ! // event), set the thread's interrupt flag. I think this sanity ! // check guards against someone resetting our interrupt flag ! // in the time between when interrupt_mutex is released in ! // _Jv_ThreadInterrupt and the interval of time between the ! // WaitForMultipleObjects call we just made and our acquisition ! // of interrupt_mutex. ! if (rval == (WAIT_OBJECT_0 + 2)) ! current_obj->interrupt_flag = true; ! ! interrupted = current_obj->interrupt_flag; ! LeaveCriticalSection (¤t->interrupt_mutex); EnterCriticalSection(&cv->count_mutex); cv->blocked_count--; *************** _Jv_CondWait(_Jv_ConditionVariable_t *cv *** 115,123 **** if (last_waiter) ResetEvent (cv->ev[1]); ! _Jv_MutexLock (mu); ! ! return 0; } void --- 175,189 ---- if (last_waiter) ResetEvent (cv->ev[1]); ! // Call _Jv_MutexLock repeatedly until the mutex's refcount is the ! // same as before we originally released it. ! while (curcount < count) ! { ! _Jv_MutexLock (mu); ! ++curcount; ! } ! ! return interrupted ? _JV_INTERRUPTED : 0; } void *************** _Jv_ThreadInitData (java::lang::Thread* *** 197,202 **** --- 263,270 ---- _Jv_Thread_t *data = (_Jv_Thread_t*)_Jv_Malloc(sizeof(_Jv_Thread_t)); data->flags = 0; data->thread_obj = obj; + data->interrupt_event = 0; + InitializeCriticalSection (&data->interrupt_mutex); return data; } *************** _Jv_ThreadInitData (java::lang::Thread* *** 204,209 **** --- 272,280 ---- void _Jv_ThreadDestroyData (_Jv_Thread_t *data) { + DeleteCriticalSection (&data->interrupt_mutex); + if (data->interrupt_event) + CloseHandle(data->interrupt_event); _Jv_Free(data); } *************** _Jv_ThreadStart (java::lang::Thread *thr *** 308,318 **** else data->flags |= FLAG_DAEMON; ! HANDLE h = GC_CreateThread(NULL, 0, really_start, info, 0, &id); _Jv_ThreadSetPriority(data, thread->getPriority()); - - //if (!h) - //JvThrow (); } void --- 379,386 ---- else data->flags |= FLAG_DAEMON; ! GC_CreateThread(NULL, 0, really_start, info, 0, &id); _Jv_ThreadSetPriority(data, thread->getPriority()); } void *************** _Jv_ThreadWait (void) *** 326,334 **** } } void _Jv_ThreadInterrupt (_Jv_Thread_t *data) { ! MessageBox(NULL, "Unimplemented", "win32-threads.cc:_Jv_ThreadInterrupt", MB_OK); ! // FIXME: } --- 394,420 ---- } } + // + // Interrupt support + // + + HANDLE + _Jv_Win32GetInterruptEvent (void) + { + _Jv_Thread_t *current = _Jv_ThreadCurrentData (); + EnterCriticalSection (¤t->interrupt_mutex); + ensure_interrupt_event_initialized (current->interrupt_event); + HANDLE hEvent = current->interrupt_event; + LeaveCriticalSection (¤t->interrupt_mutex); + return hEvent; + } + void _Jv_ThreadInterrupt (_Jv_Thread_t *data) { ! EnterCriticalSection (&data->interrupt_mutex); ! ensure_interrupt_event_initialized (data->interrupt_event); ! data->thread_obj->interrupt_flag = true; ! SetEvent (data->interrupt_event); ! LeaveCriticalSection (&data->interrupt_mutex); } diff -Nrc3pad gcc-3.3.3/zlib/adler32.c gcc-3.4.0/zlib/adler32.c *** gcc-3.3.3/zlib/adler32.c 2002-03-11 22:11:16.000000000 +0000 --- gcc-3.4.0/zlib/adler32.c 2002-03-11 22:11:16.000000000 +0000 *************** *** 3,9 **** * For conditions of distribution and use, see copyright notice in zlib.h */ ! /* @(#) $Id: adler32.c,v 1.3 2002/03/11 22:11:16 tromey Exp $ */ #include "zlib.h" --- 3,9 ---- * For conditions of distribution and use, see copyright notice in zlib.h */ ! /* @(#) $Id: adler32.c,v 1.1.1.2 2002/03/11 21:53:23 tromey Exp $ */ #include "zlib.h" diff -Nrc3pad gcc-3.3.3/zlib/ChangeLog gcc-3.4.0/zlib/ChangeLog *** gcc-3.3.3/zlib/ChangeLog 2004-02-14 20:20:54.000000000 +0000 --- gcc-3.4.0/zlib/ChangeLog 2004-04-19 02:00:21.000000000 +0000 *************** *** 1,30 **** ! 2004-02-14 Release Manager ! ! * GCC 3.3.3 Released. ! ! 2003-10-16 Release Manager ! ! * GCC 3.3.2 Released. ! ! 2003-08-04 Release Manager ! ! * GCC 3.3.1 Released. ! ! 2003-08-04 Release Manager ! ! * GCC 3.3.1 Released. ! ! 2003-05-13 Release Manager ! ! * GCC 3.3 Released. ! ! 2003-05-13 Release Manager ! ! * GCC 3.3 Released. ! ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ChangeLog file for zlib --- 1,6 ---- ! 2004-04-18 Release Manager ! * GCC 3.4.0 released. ChangeLog file for zlib *************** Changes in 1.0.6 (19 Jan 1998) *** 253,259 **** - use _fdopen instead of fdopen for MSC >= 6.0 (Thomas Fanslau) - added makelcc.bat for lcc-win32 (Tom St Denis) - in Makefile.dj2, use copy and del instead of install and rm (Frank Donahoe) ! - Avoid expanded $Id: ChangeLog,v 1.6.20.7 2004/02/14 20:20:54 gdr Exp $. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion. - check for unistd.h in configure (for off_t) - remove useless check parameter in inflate_blocks_free - avoid useless assignment of s->check to itself in inflate_blocks_new --- 229,235 ---- - use _fdopen instead of fdopen for MSC >= 6.0 (Thomas Fanslau) - added makelcc.bat for lcc-win32 (Tom St Denis) - in Makefile.dj2, use copy and del instead of install and rm (Frank Donahoe) ! - Avoid expanded $Id: ChangeLog,v 1.5 2002/05/08 04:38:00 aoliva Exp $. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion. - check for unistd.h in configure (for off_t) - remove useless check parameter in inflate_blocks_free - avoid useless assignment of s->check to itself in inflate_blocks_new diff -Nrc3pad gcc-3.3.3/zlib/ChangeLog.gcj gcc-3.4.0/zlib/ChangeLog.gcj *** gcc-3.3.3/zlib/ChangeLog.gcj 2003-09-09 08:04:42.000000000 +0000 --- gcc-3.4.0/zlib/ChangeLog.gcj 2004-01-15 03:41:47.000000000 +0000 *************** *** 1,11 **** --- 1,26 ---- + 2004-01-14 Kelley Cook + + * configure.in: Add in AC_PREREQ(2.13) + 2003-09-09 Alan Modra * configure: Regenerate. + 2003-07-11 Nathanael Nerode + + PR bootstrap/7126 + * configure.in: Correct zlib version number. + * configure: Regenerate. + 2003-07-11 Gerald Pfeifer * README: Note that zlib is not part of GCC. + 2003-03-12 Andreas Schwab + + * configure.in: Avoid trailing /. in toolexeclibdir. + * configure: Rebuilt. + 2003-02-20 Alexandre Oliva * configure.in: Propagate ORIGINAL_LD_FOR_MULTILIBS to *************** *** 18,30 **** or if it doesn't support -print-multi-os-directory. * configure: Rebuilt. - 2003-01-27 Alexandre Oliva - - * configure.in (toolexecdir, toolexeclibdir): Set and AC_SUBST. - Remove USE_LIBDIR conditional. - * Makefile.am (toolexecdir, toolexeclibdir): Don't override. - * Makefile.in, configure: Rebuilt. - 2002-09-22 Kaveh R. Ghazi * Makefile.am (all-multi): Fix multilib parallel build. --- 33,38 ---- diff -Nrc3pad gcc-3.3.3/zlib/compress.c gcc-3.4.0/zlib/compress.c *** gcc-3.3.3/zlib/compress.c 2002-03-11 22:11:16.000000000 +0000 --- gcc-3.4.0/zlib/compress.c 2002-03-11 22:11:16.000000000 +0000 *************** *** 3,9 **** * For conditions of distribution and use, see copyright notice in zlib.h */ ! /* @(#) $Id: compress.c,v 1.3 2002/03/11 22:11:16 tromey Exp $ */ #include "zlib.h" --- 3,9 ---- * For conditions of distribution and use, see copyright notice in zlib.h */ ! /* @(#) $Id: compress.c,v 1.1.1.2 2002/03/11 21:53:23 tromey Exp $ */ #include "zlib.h" diff -Nrc3pad gcc-3.3.3/zlib/configure gcc-3.4.0/zlib/configure *** gcc-3.3.3/zlib/configure 2003-09-09 08:04:42.000000000 +0000 --- gcc-3.4.0/zlib/configure 2003-09-09 06:24:39.000000000 +0000 *************** fi *** 852,858 **** PACKAGE=zlib ! VERSION=1.1.3 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } --- 852,858 ---- PACKAGE=zlib ! VERSION=1.1.4 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } *************** else *** 1215,1221 **** if { (eval echo configure:1216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in ! *.c | *.o | *.obj) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done --- 1215,1221 ---- if { (eval echo configure:1216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in ! *.$ac_ext | *.c | *.o | *.obj) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done *************** irix5* | irix6*) *** 1580,1586 **** # This must be Linux ELF. linux-gnu*) case $host_cpu in ! alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* ) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM --- 1580,1586 ---- # This must be Linux ELF. linux-gnu*) case $host_cpu in ! alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* ) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM *************** EOF *** 2317,2323 **** # We ignore --with-system-zlib in this case. target_all=libzgcj.la else ! for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --- 2317,2323 ---- # We ignore --with-system-zlib in this case. target_all=libzgcj.la else ! for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 *************** else *** 2449,2472 **** #include #include - #if HAVE_SYS_TYPES_H - # include - #endif - - #if HAVE_STDLIB_H - # include - #endif - - #if HAVE_SYS_STAT_H - # include - #endif - - #if HAVE_UNISTD_H - # include - #endif - /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE /* Assume that all systems that can run configure have sys/param.h. */ # ifndef HAVE_SYS_PARAM_H --- 2449,2459 ---- #include #include /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE + # ifdef HAVE_UNISTD_H + # include + # endif /* Assume that all systems that can run configure have sys/param.h. */ # ifndef HAVE_SYS_PARAM_H *************** main() *** 2574,2580 **** } EOF ! if { (eval echo configure:2578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else --- 2561,2567 ---- } EOF ! if { (eval echo configure:2565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else *************** fi *** 2599,2610 **** for ac_func in memcpy strerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:2603: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:2590: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 2614,2620 ---- ; return 0; } EOF ! if { (eval echo configure:2618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** done *** 2654,2660 **** if test "$with_system_zlib" = yes; then echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6 ! echo "configure:2658: checking for deflate in -lz" >&5 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2641,2647 ---- if test "$with_system_zlib" = yes; then echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6 ! echo "configure:2645: checking for deflate in -lz" >&5 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** else *** 2662,2668 **** ac_save_LIBS="$LIBS" LIBS="-lz $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else --- 2660,2666 ---- deflate() ; return 0; } EOF ! if { (eval echo configure:2664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else *************** for ac_hdr in unistd.h *** 2705,2721 **** do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:2709: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* --- 2692,2708 ---- do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:2696: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* *************** else *** 2752,2757 **** --- 2739,2747 ---- fi if test "$GCC" = yes && $CC -print-multi-os-directory > /dev/null 2>&1; then multiosdir=/`$CC -print-multi-os-directory` + case $multiosdir in + /.) multiosdir= ;; # Avoid trailing /. + esac else multiosdir= fi *************** trap 'rm -f $CONFIG_STATUS conftest*; ex *** 2841,2874 **** # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. ! # ! # If the first sed substitution is executed (which looks for macros that ! # take arguments), then we branch to the quote section. Otherwise, ! # look for a macro that doesn't take arguments. ! cat >confdef2opt.sed <<\_ACEOF ! t clear ! : clear ! s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g ! t quote ! s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g ! t quote ! d ! : quote ! s,[ `~#$^&*(){}\\|;'"<>?],\\&,g ! s,\[,\\&,g ! s,\],\\&,g ! s,\$,$$,g ! p ! _ACEOF ! # We use echo to avoid assuming a particular line-breaking character. ! # The extra dot is to prevent the shell from consuming trailing ! # line-breaks from the sub-command output. A line-break within ! # single-quotes doesn't work because, if this script is created in a ! # platform that uses two characters for line-breaks (e.g., DOS), tr ! # would break. ! ac_LF_and_DOT=`echo; echo .` ! DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` ! rm -f confdef2opt.sed # Without the "./", some shells look in PATH for config.status. --- 2831,2845 ---- # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. ! cat > conftest.defs <<\EOF ! s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g ! s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g ! s%\[%\\&%g ! s%\]%\\&%g ! s%\$%$$%g ! EOF ! DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` ! rm -f conftest.defs # Without the "./", some shells look in PATH for config.status. diff -Nrc3pad gcc-3.3.3/zlib/configure.in gcc-3.4.0/zlib/configure.in *** gcc-3.3.3/zlib/configure.in 2003-02-20 09:12:20.000000000 +0000 --- gcc-3.4.0/zlib/configure.in 2004-01-15 03:41:47.000000000 +0000 *************** *** 1,5 **** --- 1,6 ---- dnl Process this with autoconf to create configure + AC_PREREQ(2.13) AC_INIT(zlib.h) # This works around the fact that libtool configuration may change LD *************** AC_CANONICAL_SYSTEM *** 35,41 **** mkinstalldirs="`cd $ac_aux_dir && ${PWDCMD-pwd}`/mkinstalldirs" AC_SUBST(mkinstalldirs) ! AM_INIT_AUTOMAKE(zlib, 1.1.3) AM_MAINTAINER_MODE --- 36,42 ---- mkinstalldirs="`cd $ac_aux_dir && ${PWDCMD-pwd}`/mkinstalldirs" AC_SUBST(mkinstalldirs) ! AM_INIT_AUTOMAKE(zlib, 1.1.4) AM_MAINTAINER_MODE *************** else *** 123,128 **** --- 124,132 ---- fi if test "$GCC" = yes && $CC -print-multi-os-directory > /dev/null 2>&1; then multiosdir=/`$CC -print-multi-os-directory` + case $multiosdir in + /.) multiosdir= ;; # Avoid trailing /. + esac else multiosdir= fi diff -Nrc3pad gcc-3.3.3/zlib/contrib/iostream2/zstream.h gcc-3.4.0/zlib/contrib/iostream2/zstream.h *** gcc-3.3.3/zlib/contrib/iostream2/zstream.h 2002-03-11 21:49:46.000000000 +0000 --- gcc-3.4.0/zlib/contrib/iostream2/zstream.h 2002-03-11 21:49:46.000000000 +0000 *************** *** 21,27 **** /* * zstream.h - C++ interface to the 'zlib' general purpose compression library ! * $Id: zstream.h,v 1.2 2002/03/11 21:49:46 tromey Exp $ */ #include --- 21,27 ---- /* * zstream.h - C++ interface to the 'zlib' general purpose compression library ! * $Id: zstream.h,v 1.1 1999/05/04 19:30:27 tromey Exp $ */ #include diff -Nrc3pad gcc-3.3.3/zlib/crc32.c gcc-3.4.0/zlib/crc32.c *** gcc-3.3.3/zlib/crc32.c 2002-03-11 22:11:16.000000000 +0000 --- gcc-3.4.0/zlib/crc32.c 2002-03-11 22:11:16.000000000 +0000 *************** *** 3,9 **** * For conditions of distribution and use, see copyright notice in zlib.h */ ! /* @(#) $Id: crc32.c,v 1.3 2002/03/11 22:11:16 tromey Exp $ */ #include "zlib.h" --- 3,9 ---- * For conditions of distribution and use, see copyright notice in zlib.h */ ! /* @(#) $Id: crc32.c,v 1.1.1.2 2002/03/11 21:53:23 tromey Exp $ */ #include "zlib.h" diff -Nrc3pad gcc-3.3.3/zlib/deflate.c gcc-3.4.0/zlib/deflate.c *** gcc-3.3.3/zlib/deflate.c 2002-03-11 22:11:16.000000000 +0000 --- gcc-3.4.0/zlib/deflate.c 2002-03-11 22:11:16.000000000 +0000 *************** *** 47,53 **** * */ ! /* @(#) $Id: deflate.c,v 1.3 2002/03/11 22:11:16 tromey Exp $ */ #include "deflate.h" --- 47,53 ---- * */ ! /* @(#) $Id: deflate.c,v 1.1.1.2 2002/03/11 21:53:23 tromey Exp $ */ #include "deflate.h" diff -Nrc3pad gcc-3.3.3/zlib/deflate.h gcc-3.4.0/zlib/deflate.h *** gcc-3.3.3/zlib/deflate.h 2002-03-11 22:11:16.000000000 +0000 --- gcc-3.4.0/zlib/deflate.h 2002-03-11 22:11:16.000000000 +0000 *************** *** 8,14 **** subject to change. Applications should only use zlib.h. */ ! /* @(#) $Id: deflate.h,v 1.3 2002/03/11 22:11:16 tromey Exp $ */ #ifndef _DEFLATE_H #define _DEFLATE_H --- 8,14 ---- subject to change. Applications should only use zlib.h. */ ! /* @(#) $Id: deflate.h,v 1.1.1.2 2002/03/11 21:53:23 tromey Exp $ */ #ifndef _DEFLATE_H #define _DEFLATE_H diff -Nrc3pad gcc-3.3.3/zlib/example.c gcc-3.4.0/zlib/example.c *** gcc-3.3.3/zlib/example.c 2002-03-11 22:11:16.000000000 +0000 --- gcc-3.4.0/zlib/example.c 2002-03-11 22:11:16.000000000 +0000 *************** *** 3,9 **** * For conditions of distribution and use, see copyright notice in zlib.h */ ! /* @(#) $Id: example.c,v 1.3 2002/03/11 22:11:16 tromey Exp $ */ #include #include "zlib.h" --- 3,9 ---- * For conditions of distribution and use, see copyright notice in zlib.h */ ! /* @(#) $Id: example.c,v 1.1.1.2 2002/03/11 21:53:23 tromey Exp $ */ #include #include "zlib.h" diff -Nrc3pad gcc-3.3.3/zlib/gzio.c gcc-3.4.0/zlib/gzio.c *** gcc-3.3.3/zlib/gzio.c 2002-03-11 22:11:17.000000000 +0000 --- gcc-3.4.0/zlib/gzio.c 2002-03-11 22:11:17.000000000 +0000 *************** *** 5,11 **** * Compile this file with -DNO_DEFLATE to avoid the compression code. */ ! /* @(#) $Id: gzio.c,v 1.3 2002/03/11 22:11:17 tromey Exp $ */ #include --- 5,11 ---- * Compile this file with -DNO_DEFLATE to avoid the compression code. */ ! /* @(#) $Id: gzio.c,v 1.1.1.2 2002/03/11 21:53:24 tromey Exp $ */ #include diff -Nrc3pad gcc-3.3.3/zlib/minigzip.c gcc-3.4.0/zlib/minigzip.c *** gcc-3.3.3/zlib/minigzip.c 2002-03-11 22:11:17.000000000 +0000 --- gcc-3.4.0/zlib/minigzip.c 2002-03-11 22:11:17.000000000 +0000 *************** *** 13,19 **** * or in pipe mode. */ ! /* @(#) $Id: minigzip.c,v 1.3 2002/03/11 22:11:17 tromey Exp $ */ #include #include "zlib.h" --- 13,19 ---- * or in pipe mode. */ ! /* @(#) $Id: minigzip.c,v 1.1.1.2 2002/03/11 21:53:26 tromey Exp $ */ #include #include "zlib.h" diff -Nrc3pad gcc-3.3.3/zlib/trees.c gcc-3.4.0/zlib/trees.c *** gcc-3.3.3/zlib/trees.c 2002-03-11 22:11:17.000000000 +0000 --- gcc-3.4.0/zlib/trees.c 2002-03-11 22:11:17.000000000 +0000 *************** *** 29,35 **** * Addison-Wesley, 1983. ISBN 0-201-06672-6. */ ! /* @(#) $Id: trees.c,v 1.3 2002/03/11 22:11:17 tromey Exp $ */ /* #define GEN_TREES_H */ --- 29,35 ---- * Addison-Wesley, 1983. ISBN 0-201-06672-6. */ ! /* @(#) $Id: trees.c,v 1.1.1.2 2002/03/11 21:53:27 tromey Exp $ */ /* #define GEN_TREES_H */ diff -Nrc3pad gcc-3.3.3/zlib/uncompr.c gcc-3.4.0/zlib/uncompr.c *** gcc-3.3.3/zlib/uncompr.c 2002-03-11 22:11:18.000000000 +0000 --- gcc-3.4.0/zlib/uncompr.c 2002-03-11 22:11:18.000000000 +0000 *************** *** 3,9 **** * For conditions of distribution and use, see copyright notice in zlib.h */ ! /* @(#) $Id: uncompr.c,v 1.3 2002/03/11 22:11:18 tromey Exp $ */ #include "zlib.h" --- 3,9 ---- * For conditions of distribution and use, see copyright notice in zlib.h */ ! /* @(#) $Id: uncompr.c,v 1.1.1.2 2002/03/11 21:53:27 tromey Exp $ */ #include "zlib.h" diff -Nrc3pad gcc-3.3.3/zlib/zconf.h gcc-3.4.0/zlib/zconf.h *** gcc-3.3.3/zlib/zconf.h 2002-03-11 22:11:18.000000000 +0000 --- gcc-3.4.0/zlib/zconf.h 2002-03-11 22:11:18.000000000 +0000 *************** *** 3,9 **** * For conditions of distribution and use, see copyright notice in zlib.h */ ! /* @(#) $Id: zconf.h,v 1.3 2002/03/11 22:11:18 tromey Exp $ */ #ifndef _ZCONF_H #define _ZCONF_H --- 3,9 ---- * For conditions of distribution and use, see copyright notice in zlib.h */ ! /* @(#) $Id: zconf.h,v 1.1.1.2 2002/03/11 21:53:27 tromey Exp $ */ #ifndef _ZCONF_H #define _ZCONF_H diff -Nrc3pad gcc-3.3.3/zlib/zutil.c gcc-3.4.0/zlib/zutil.c *** gcc-3.3.3/zlib/zutil.c 2002-03-11 22:11:18.000000000 +0000 --- gcc-3.4.0/zlib/zutil.c 2002-03-11 22:11:18.000000000 +0000 *************** *** 3,9 **** * For conditions of distribution and use, see copyright notice in zlib.h */ ! /* @(#) $Id: zutil.c,v 1.3 2002/03/11 22:11:18 tromey Exp $ */ #include "zutil.h" --- 3,9 ---- * For conditions of distribution and use, see copyright notice in zlib.h */ ! /* @(#) $Id: zutil.c,v 1.1.1.2 2002/03/11 21:53:27 tromey Exp $ */ #include "zutil.h" diff -Nrc3pad gcc-3.3.3/zlib/zutil.h gcc-3.4.0/zlib/zutil.h *** gcc-3.3.3/zlib/zutil.h 2002-03-11 22:11:18.000000000 +0000 --- gcc-3.4.0/zlib/zutil.h 2002-03-11 22:11:18.000000000 +0000 *************** *** 8,14 **** subject to change. Applications should only use zlib.h. */ ! /* @(#) $Id: zutil.h,v 1.3 2002/03/11 22:11:18 tromey Exp $ */ #ifndef _Z_UTIL_H #define _Z_UTIL_H --- 8,14 ---- subject to change. Applications should only use zlib.h. */ ! /* @(#) $Id: zutil.h,v 1.1.1.2 2002/03/11 21:53:28 tromey Exp $ */ #ifndef _Z_UTIL_H #define _Z_UTIL_H